diff --git a/vendor/dario.cat/mergo/.deepsource.toml b/vendor/dario.cat/mergo/.deepsource.toml new file mode 100644 index 000000000..a8bc979e0 --- /dev/null +++ b/vendor/dario.cat/mergo/.deepsource.toml @@ -0,0 +1,12 @@ +version = 1 + +test_patterns = [ + "*_test.go" +] + +[[analyzers]] +name = "go" +enabled = true + + [analyzers.meta] + import_path = "dario.cat/mergo" \ No newline at end of file diff --git a/vendor/dario.cat/mergo/.gitignore b/vendor/dario.cat/mergo/.gitignore new file mode 100644 index 000000000..45ad0f1ae --- /dev/null +++ b/vendor/dario.cat/mergo/.gitignore @@ -0,0 +1,36 @@ +#### joe made this: http://goel.io/joe + +#### go #### +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Golang/Intellij +.idea + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +#### vim #### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-v][a-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags diff --git a/vendor/dario.cat/mergo/.travis.yml b/vendor/dario.cat/mergo/.travis.yml new file mode 100644 index 000000000..d324c43ba --- /dev/null +++ b/vendor/dario.cat/mergo/.travis.yml @@ -0,0 +1,12 @@ +language: go +arch: + - amd64 + - ppc64le +install: + - go get -t + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls +script: + - go test -race -v ./... +after_script: + - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/vendor/dario.cat/mergo/CODE_OF_CONDUCT.md b/vendor/dario.cat/mergo/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..469b44907 --- /dev/null +++ b/vendor/dario.cat/mergo/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/dario.cat/mergo/CONTRIBUTING.md b/vendor/dario.cat/mergo/CONTRIBUTING.md new file mode 100644 index 000000000..0a1ff9f94 --- /dev/null +++ b/vendor/dario.cat/mergo/CONTRIBUTING.md @@ -0,0 +1,112 @@ + +# Contributing to mergo + +First off, thanks for taking the time to contribute! ❤️ + +All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 + +> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: +> - Star the project +> - Tweet about it +> - Refer this project in your project's readme +> - Mention the project at local meetups and tell your friends/colleagues + + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [I Have a Question](#i-have-a-question) +- [I Want To Contribute](#i-want-to-contribute) +- [Reporting Bugs](#reporting-bugs) +- [Suggesting Enhancements](#suggesting-enhancements) + +## Code of Conduct + +This project and everyone participating in it is governed by the +[mergo Code of Conduct](https://github.com/imdario/mergoblob/master/CODE_OF_CONDUCT.md). +By participating, you are expected to uphold this code. Please report unacceptable behavior +to <>. + + +## I Have a Question + +> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/imdario/mergo). + +Before you ask a question, it is best to search for existing [Issues](https://github.com/imdario/mergo/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. + +If you then still feel the need to ask a question and need clarification, we recommend the following: + +- Open an [Issue](https://github.com/imdario/mergo/issues/new). +- Provide as much context as you can about what you're running into. +- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. + +We will then take care of the issue as soon as possible. + +## I Want To Contribute + +> ### Legal Notice +> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. + +### Reporting Bugs + + +#### Before Submitting a Bug Report + +A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. + +- Make sure that you are using the latest version. +- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)). +- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/imdario/mergoissues?q=label%3Abug). +- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. +- Collect information about the bug: +- Stack trace (Traceback) +- OS, Platform and Version (Windows, Linux, macOS, x86, ARM) +- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. +- Possibly your input and the output +- Can you reliably reproduce the issue? And can you also reproduce it with older versions? + + +#### How Do I Submit a Good Bug Report? + +> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to . + + +We use GitHub issues to track bugs and errors. If you run into an issue with the project: + +- Open an [Issue](https://github.com/imdario/mergo/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) +- Explain the behavior you would expect and the actual behavior. +- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. +- Provide the information you collected in the previous section. + +Once it's filed: + +- The project team will label the issue accordingly. +- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. +- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be implemented by someone. + +### Suggesting Enhancements + +This section guides you through submitting an enhancement suggestion for mergo, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. + + +#### Before Submitting an Enhancement + +- Make sure that you are using the latest version. +- Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration. +- Perform a [search](https://github.com/imdario/mergo/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. +- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. + + +#### How Do I Submit a Good Enhancement Suggestion? + +Enhancement suggestions are tracked as [GitHub issues](https://github.com/imdario/mergo/issues). + +- Use a **clear and descriptive title** for the issue to identify the suggestion. +- Provide a **step-by-step description of the suggested enhancement** in as many details as possible. +- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. +- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. +- **Explain why this enhancement would be useful** to most mergo users. You may also want to point out the other projects that solved it better and which could serve as inspiration. + + +## Attribution +This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! diff --git a/vendor/dario.cat/mergo/LICENSE b/vendor/dario.cat/mergo/LICENSE new file mode 100644 index 000000000..686680298 --- /dev/null +++ b/vendor/dario.cat/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. 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. + * Neither the name of Google Inc. 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 +OWNER 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/vendor/dario.cat/mergo/README.md b/vendor/dario.cat/mergo/README.md new file mode 100644 index 000000000..0b3c48889 --- /dev/null +++ b/vendor/dario.cat/mergo/README.md @@ -0,0 +1,258 @@ +# Mergo + +[![GitHub release][5]][6] +[![GoCard][7]][8] +[![Test status][1]][2] +[![OpenSSF Scorecard][21]][22] +[![OpenSSF Best Practices][19]][20] +[![Coverage status][9]][10] +[![Sourcegraph][11]][12] +[![FOSSA status][13]][14] + +[![GoDoc][3]][4] +[![Become my sponsor][15]][16] +[![Tidelift][17]][18] + +[1]: https://github.com/imdario/mergo/workflows/tests/badge.svg?branch=master +[2]: https://github.com/imdario/mergo/actions/workflows/tests.yml +[3]: https://godoc.org/github.com/imdario/mergo?status.svg +[4]: https://godoc.org/github.com/imdario/mergo +[5]: https://img.shields.io/github/release/imdario/mergo.svg +[6]: https://github.com/imdario/mergo/releases +[7]: https://goreportcard.com/badge/imdario/mergo +[8]: https://goreportcard.com/report/github.com/imdario/mergo +[9]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master +[10]: https://coveralls.io/github/imdario/mergo?branch=master +[11]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg +[12]: https://sourcegraph.com/github.com/imdario/mergo?badge +[13]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield +[14]: https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield +[15]: https://img.shields.io/github/sponsors/imdario +[16]: https://github.com/sponsors/imdario +[17]: https://tidelift.com/badges/package/go/github.com%2Fimdario%2Fmergo +[18]: https://tidelift.com/subscription/pkg/go-github.com-imdario-mergo +[19]: https://bestpractices.coreinfrastructure.org/projects/7177/badge +[20]: https://bestpractices.coreinfrastructure.org/projects/7177 +[21]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo/badge +[22]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo + +A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. + +Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). + +Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. + +## Status + +Mergo is stable and frozen, ready for production. Check a short list of the projects using at large scale it [here](https://github.com/imdario/mergo#mergo-in-the-wild). + +No new features are accepted. They will be considered for a future v2 that improves the implementation and fixes bugs for corner cases. + +### Important notes + +#### 1.0.0 + +In [1.0.0](//github.com/imdario/mergo/releases/tag/1.0.0) Mergo moves to a vanity URL `dario.cat/mergo`. No more v1 versions will be released. + +If the vanity URL is causing issues in your project due to a dependency pulling Mergo - it isn't a direct dependency in your project - it is recommended to use [replace](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) to pin the version to the last one with the old import URL: + +``` +replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16 +``` + +#### 0.3.9 + +Please keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds support for go modules. + +Keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code. + +If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u dario.cat/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). + +### Donations + +If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes: + +Donate using Liberapay +Become my sponsor + +### Mergo in the wild + +Mergo is used by [thousands](https://deps.dev/go/dario.cat%2Fmergo/v1.0.0/dependents) [of](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.16/dependents) [projects](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.12), including: + +* [containerd/containerd](https://github.com/containerd/containerd) +* [datadog/datadog-agent](https://github.com/datadog/datadog-agent) +* [docker/cli/](https://github.com/docker/cli/) +* [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser) +* [go-micro/go-micro](https://github.com/go-micro/go-micro) +* [grafana/loki](https://github.com/grafana/loki) +* [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) +* [masterminds/sprig](github.com/Masterminds/sprig) +* [moby/moby](https://github.com/moby/moby) +* [slackhq/nebula](https://github.com/slackhq/nebula) +* [volcano-sh/volcano](https://github.com/volcano-sh/volcano) + +## Install + + go get dario.cat/mergo + + // use in your .go code + import ( + "dario.cat/mergo" + ) + +## Usage + +You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are zero values](https://golang.org/ref/spec#The_zero_value) too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). + +```go +if err := mergo.Merge(&dst, src); err != nil { + // ... +} +``` + +Also, you can merge overwriting values using the transformer `WithOverride`. + +```go +if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { + // ... +} +``` + +If you need to override pointers, so the source pointer's value is assigned to the destination's pointer, you must use `WithoutDereference`: + +```go +package main + +import ( + "fmt" + + "dario.cat/mergo" +) + +type Foo struct { + A *string + B int64 +} + +func main() { + first := "first" + second := "second" + src := Foo{ + A: &first, + B: 2, + } + + dest := Foo{ + A: &second, + B: 1, + } + + mergo.Merge(&dest, src, mergo.WithOverride, mergo.WithoutDereference) +} +``` + +Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field. + +```go +if err := mergo.Map(&dst, srcMap); err != nil { + // ... +} +``` + +Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. + +Here is a nice example: + +```go +package main + +import ( + "fmt" + "dario.cat/mergo" +) + +type Foo struct { + A string + B int64 +} + +func main() { + src := Foo{ + A: "one", + B: 2, + } + dest := Foo{ + A: "two", + } + mergo.Merge(&dest, src) + fmt.Println(dest) + // Will print + // {two 2} +} +``` + +Note: if test are failing due missing package, please execute: + + go get gopkg.in/yaml.v3 + +### Transformers + +Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`? + +```go +package main + +import ( + "fmt" + "dario.cat/mergo" + "reflect" + "time" +) + +type timeTransformer struct { +} + +func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { + if typ == reflect.TypeOf(time.Time{}) { + return func(dst, src reflect.Value) error { + if dst.CanSet() { + isZero := dst.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if result[0].Bool() { + dst.Set(src) + } + } + return nil + } + } + return nil +} + +type Snapshot struct { + Time time.Time + // ... +} + +func main() { + src := Snapshot{time.Now()} + dest := Snapshot{} + mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) + fmt.Println(dest) + // Will print + // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } +} +``` + +## Contact me + +If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario) + +## About + +Written by [Dario Castañé](http://dario.im). + +## License + +[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE). + +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large) diff --git a/vendor/dario.cat/mergo/SECURITY.md b/vendor/dario.cat/mergo/SECURITY.md new file mode 100644 index 000000000..a5de61f77 --- /dev/null +++ b/vendor/dario.cat/mergo/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.3.x | :white_check_mark: | +| < 0.3 | :x: | + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/vendor/dario.cat/mergo/doc.go b/vendor/dario.cat/mergo/doc.go new file mode 100644 index 000000000..7d96ec054 --- /dev/null +++ b/vendor/dario.cat/mergo/doc.go @@ -0,0 +1,148 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. + +Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). + +# Status + +It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc. + +# Important notes + +1.0.0 + +In 1.0.0 Mergo moves to a vanity URL `dario.cat/mergo`. + +0.3.9 + +Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules. + +Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We added an optional/variadic argument so that it won't break the existing code. + +If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u dario.cat/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). + +# Install + +Do your usual installation procedure: + + go get dario.cat/mergo + + // use in your .go code + import ( + "dario.cat/mergo" + ) + +# Usage + +You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). + + if err := mergo.Merge(&dst, src); err != nil { + // ... + } + +Also, you can merge overwriting values using the transformer WithOverride. + + if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { + // ... + } + +Additionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field. + + if err := mergo.Map(&dst, srcMap); err != nil { + // ... + } + +Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values. + +Here is a nice example: + + package main + + import ( + "fmt" + "dario.cat/mergo" + ) + + type Foo struct { + A string + B int64 + } + + func main() { + src := Foo{ + A: "one", + B: 2, + } + dest := Foo{ + A: "two", + } + mergo.Merge(&dest, src) + fmt.Println(dest) + // Will print + // {two 2} + } + +# Transformers + +Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time? + + package main + + import ( + "fmt" + "dario.cat/mergo" + "reflect" + "time" + ) + + type timeTransformer struct { + } + + func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { + if typ == reflect.TypeOf(time.Time{}) { + return func(dst, src reflect.Value) error { + if dst.CanSet() { + isZero := dst.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if result[0].Bool() { + dst.Set(src) + } + } + return nil + } + } + return nil + } + + type Snapshot struct { + Time time.Time + // ... + } + + func main() { + src := Snapshot{time.Now()} + dest := Snapshot{} + mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) + fmt.Println(dest) + // Will print + // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } + } + +# Contact me + +If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario + +# About + +Written by Dario Castañé: https://da.rio.hn + +# License + +BSD 3-Clause license, as Go language. +*/ +package mergo diff --git a/vendor/dario.cat/mergo/map.go b/vendor/dario.cat/mergo/map.go new file mode 100644 index 000000000..759b4f74f --- /dev/null +++ b/vendor/dario.cat/mergo/map.go @@ -0,0 +1,178 @@ +// Copyright 2014 Dario Castañé. All rights reserved. +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "fmt" + "reflect" + "unicode" + "unicode/utf8" +) + +func changeInitialCase(s string, mapper func(rune) rune) string { + if s == "" { + return s + } + r, n := utf8.DecodeRuneInString(s) + return string(mapper(r)) + s[n:] +} + +func isExported(field reflect.StructField) bool { + r, _ := utf8.DecodeRuneInString(field.Name) + return r >= 'A' && r <= 'Z' +} + +// Traverses recursively both values, assigning src's fields values to dst. +// The map argument tracks comparisons that have already been seen, which allows +// short circuiting on recursive types. +func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { + overwrite := config.Overwrite + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{typ, seen, addr} + } + zeroValue := reflect.Value{} + switch dst.Kind() { + case reflect.Map: + dstMap := dst.Interface().(map[string]interface{}) + for i, n := 0, src.NumField(); i < n; i++ { + srcType := src.Type() + field := srcType.Field(i) + if !isExported(field) { + continue + } + fieldName := field.Name + fieldName = changeInitialCase(fieldName, unicode.ToLower) + if _, ok := dstMap[fieldName]; !ok || (!isEmptyValue(reflect.ValueOf(src.Field(i).Interface()), !config.ShouldNotDereference) && overwrite) || config.overwriteWithEmptyValue { + dstMap[fieldName] = src.Field(i).Interface() + } + } + case reflect.Ptr: + if dst.IsNil() { + v := reflect.New(dst.Type().Elem()) + dst.Set(v) + } + dst = dst.Elem() + fallthrough + case reflect.Struct: + srcMap := src.Interface().(map[string]interface{}) + for key := range srcMap { + config.overwriteWithEmptyValue = true + srcValue := srcMap[key] + fieldName := changeInitialCase(key, unicode.ToUpper) + dstElement := dst.FieldByName(fieldName) + if dstElement == zeroValue { + // We discard it because the field doesn't exist. + continue + } + srcElement := reflect.ValueOf(srcValue) + dstKind := dstElement.Kind() + srcKind := srcElement.Kind() + if srcKind == reflect.Ptr && dstKind != reflect.Ptr { + srcElement = srcElement.Elem() + srcKind = reflect.TypeOf(srcElement.Interface()).Kind() + } else if dstKind == reflect.Ptr { + // Can this work? I guess it can't. + if srcKind != reflect.Ptr && srcElement.CanAddr() { + srcPtr := srcElement.Addr() + srcElement = reflect.ValueOf(srcPtr) + srcKind = reflect.Ptr + } + } + + if !srcElement.IsValid() { + continue + } + if srcKind == dstKind { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else if srcKind == reflect.Map { + if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else { + return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) + } + } + } + return +} + +// Map sets fields' values in dst from src. +// src can be a map with string keys or a struct. dst must be the opposite: +// if src is a map, dst must be a valid pointer to struct. If src is a struct, +// dst must be map[string]interface{}. +// It won't merge unexported (private) fields and will do recursively +// any exported field. +// If dst is a map, keys will be src fields' names in lower camel case. +// Missing key in src that doesn't match a field in dst will be skipped. This +// doesn't apply if dst is a map. +// This is separated method from Merge because it is cleaner and it keeps sane +// semantics: merging equal types, mapping different (restricted) types. +func Map(dst, src interface{}, opts ...func(*Config)) error { + return _map(dst, src, opts...) +} + +// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by +// non-empty src attribute values. +// Deprecated: Use Map(…) with WithOverride +func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { + return _map(dst, src, append(opts, WithOverride)...) +} + +func _map(dst, src interface{}, opts ...func(*Config)) error { + if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { + return ErrNonPointerArgument + } + var ( + vDst, vSrc reflect.Value + err error + ) + config := &Config{} + + for _, opt := range opts { + opt(config) + } + + if vDst, vSrc, err = resolveValues(dst, src); err != nil { + return err + } + // To be friction-less, we redirect equal-type arguments + // to deepMerge. Only because arguments can be anything. + if vSrc.Kind() == vDst.Kind() { + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) + } + switch vSrc.Kind() { + case reflect.Struct: + if vDst.Kind() != reflect.Map { + return ErrExpectedMapAsDestination + } + case reflect.Map: + if vDst.Kind() != reflect.Struct { + return ErrExpectedStructAsDestination + } + default: + return ErrNotSupported + } + return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config) +} diff --git a/vendor/dario.cat/mergo/merge.go b/vendor/dario.cat/mergo/merge.go new file mode 100644 index 000000000..fd47c95b2 --- /dev/null +++ b/vendor/dario.cat/mergo/merge.go @@ -0,0 +1,409 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "fmt" + "reflect" +) + +func hasMergeableFields(dst reflect.Value) (exported bool) { + for i, n := 0, dst.NumField(); i < n; i++ { + field := dst.Type().Field(i) + if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { + exported = exported || hasMergeableFields(dst.Field(i)) + } else if isExportedComponent(&field) { + exported = exported || len(field.PkgPath) == 0 + } + } + return +} + +func isExportedComponent(field *reflect.StructField) bool { + pkgPath := field.PkgPath + if len(pkgPath) > 0 { + return false + } + c := field.Name[0] + if 'a' <= c && c <= 'z' || c == '_' { + return false + } + return true +} + +type Config struct { + Transformers Transformers + Overwrite bool + ShouldNotDereference bool + AppendSlice bool + TypeCheck bool + overwriteWithEmptyValue bool + overwriteSliceWithEmptyValue bool + sliceDeepCopy bool + debug bool +} + +type Transformers interface { + Transformer(reflect.Type) func(dst, src reflect.Value) error +} + +// Traverses recursively both values, assigning src's fields values to dst. +// The map argument tracks comparisons that have already been seen, which allows +// short circuiting on recursive types. +func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { + overwrite := config.Overwrite + typeCheck := config.TypeCheck + overwriteWithEmptySrc := config.overwriteWithEmptyValue + overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue + sliceDeepCopy := config.sliceDeepCopy + + if !src.IsValid() { + return + } + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{typ, seen, addr} + } + + if config.Transformers != nil && !isReflectNil(dst) && dst.IsValid() { + if fn := config.Transformers.Transformer(dst.Type()); fn != nil { + err = fn(dst, src) + return + } + } + + switch dst.Kind() { + case reflect.Struct: + if hasMergeableFields(dst) { + for i, n := 0, dst.NumField(); i < n; i++ { + if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { + return + } + } + } else { + if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) { + dst.Set(src) + } + } + case reflect.Map: + if dst.IsNil() && !src.IsNil() { + if dst.CanSet() { + dst.Set(reflect.MakeMap(dst.Type())) + } else { + dst = src + return + } + } + + if src.Kind() != reflect.Map { + if overwrite && dst.CanSet() { + dst.Set(src) + } + return + } + + for _, key := range src.MapKeys() { + srcElement := src.MapIndex(key) + if !srcElement.IsValid() { + continue + } + dstElement := dst.MapIndex(key) + switch srcElement.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: + if srcElement.IsNil() { + if overwrite { + dst.SetMapIndex(key, srcElement) + } + continue + } + fallthrough + default: + if !srcElement.CanInterface() { + continue + } + switch reflect.TypeOf(srcElement.Interface()).Kind() { + case reflect.Struct: + fallthrough + case reflect.Ptr: + fallthrough + case reflect.Map: + srcMapElm := srcElement + dstMapElm := dstElement + if srcMapElm.CanInterface() { + srcMapElm = reflect.ValueOf(srcMapElm.Interface()) + if dstMapElm.IsValid() { + dstMapElm = reflect.ValueOf(dstMapElm.Interface()) + } + } + if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { + return + } + case reflect.Slice: + srcSlice := reflect.ValueOf(srcElement.Interface()) + + var dstSlice reflect.Value + if !dstElement.IsValid() || dstElement.IsNil() { + dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) + } else { + dstSlice = reflect.ValueOf(dstElement.Interface()) + } + + if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy { + if typeCheck && srcSlice.Type() != dstSlice.Type() { + return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + } + dstSlice = srcSlice + } else if config.AppendSlice { + if srcSlice.Type() != dstSlice.Type() { + return fmt.Errorf("cannot append two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + } + dstSlice = reflect.AppendSlice(dstSlice, srcSlice) + } else if sliceDeepCopy { + i := 0 + for ; i < srcSlice.Len() && i < dstSlice.Len(); i++ { + srcElement := srcSlice.Index(i) + dstElement := dstSlice.Index(i) + + if srcElement.CanInterface() { + srcElement = reflect.ValueOf(srcElement.Interface()) + } + if dstElement.CanInterface() { + dstElement = reflect.ValueOf(dstElement.Interface()) + } + + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } + + } + dst.SetMapIndex(key, dstSlice) + } + } + + if dstElement.IsValid() && !isEmptyValue(dstElement, !config.ShouldNotDereference) { + if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice { + continue + } + if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map && reflect.TypeOf(dstElement.Interface()).Kind() == reflect.Map { + continue + } + } + + if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement, !config.ShouldNotDereference)) { + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + dst.SetMapIndex(key, srcElement) + } + } + + // Ensure that all keys in dst are deleted if they are not in src. + if overwriteWithEmptySrc { + for _, key := range dst.MapKeys() { + srcElement := src.MapIndex(key) + if !srcElement.IsValid() { + dst.SetMapIndex(key, reflect.Value{}) + } + } + } + case reflect.Slice: + if !dst.CanSet() { + break + } + if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy { + dst.Set(src) + } else if config.AppendSlice { + if src.Type() != dst.Type() { + return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) + } + dst.Set(reflect.AppendSlice(dst, src)) + } else if sliceDeepCopy { + for i := 0; i < src.Len() && i < dst.Len(); i++ { + srcElement := src.Index(i) + dstElement := dst.Index(i) + if srcElement.CanInterface() { + srcElement = reflect.ValueOf(srcElement.Interface()) + } + if dstElement.CanInterface() { + dstElement = reflect.ValueOf(dstElement.Interface()) + } + + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } + } + case reflect.Ptr: + fallthrough + case reflect.Interface: + if isReflectNil(src) { + if overwriteWithEmptySrc && dst.CanSet() && src.Type().AssignableTo(dst.Type()) { + dst.Set(src) + } + break + } + + if src.Kind() != reflect.Interface { + if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) { + if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) { + dst.Set(src) + } + } else if src.Kind() == reflect.Ptr { + if !config.ShouldNotDereference { + if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + return + } + } else if src.Elem().Kind() != reflect.Struct { + if overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() { + dst.Set(src) + } + } + } else if dst.Elem().Type() == src.Type() { + if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { + return + } + } else { + return ErrDifferentArgumentsTypes + } + break + } + + if dst.IsNil() || overwrite { + if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) { + dst.Set(src) + } + break + } + + if dst.Elem().Kind() == src.Elem().Kind() { + if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + return + } + break + } + default: + mustSet := (isEmptyValue(dst, !config.ShouldNotDereference) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) + if mustSet { + if dst.CanSet() { + dst.Set(src) + } else { + dst = src + } + } + } + + return +} + +// Merge will fill any empty for value type attributes on the dst struct using corresponding +// src attributes if they themselves are not empty. dst and src must be valid same-type structs +// and dst must be a pointer to struct. +// It won't merge unexported (private) fields and will do recursively any exported field. +func Merge(dst, src interface{}, opts ...func(*Config)) error { + return merge(dst, src, opts...) +} + +// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by +// non-empty src attribute values. +// Deprecated: use Merge(…) with WithOverride +func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { + return merge(dst, src, append(opts, WithOverride)...) +} + +// WithTransformers adds transformers to merge, allowing to customize the merging of some types. +func WithTransformers(transformers Transformers) func(*Config) { + return func(config *Config) { + config.Transformers = transformers + } +} + +// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values. +func WithOverride(config *Config) { + config.Overwrite = true +} + +// WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values. +func WithOverwriteWithEmptyValue(config *Config) { + config.Overwrite = true + config.overwriteWithEmptyValue = true +} + +// WithOverrideEmptySlice will make merge override empty dst slice with empty src slice. +func WithOverrideEmptySlice(config *Config) { + config.overwriteSliceWithEmptyValue = true +} + +// WithoutDereference prevents dereferencing pointers when evaluating whether they are empty +// (i.e. a non-nil pointer is never considered empty). +func WithoutDereference(config *Config) { + config.ShouldNotDereference = true +} + +// WithAppendSlice will make merge append slices instead of overwriting it. +func WithAppendSlice(config *Config) { + config.AppendSlice = true +} + +// WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride). +func WithTypeCheck(config *Config) { + config.TypeCheck = true +} + +// WithSliceDeepCopy will merge slice element one by one with Overwrite flag. +func WithSliceDeepCopy(config *Config) { + config.sliceDeepCopy = true + config.Overwrite = true +} + +func merge(dst, src interface{}, opts ...func(*Config)) error { + if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { + return ErrNonPointerArgument + } + var ( + vDst, vSrc reflect.Value + err error + ) + + config := &Config{} + + for _, opt := range opts { + opt(config) + } + + if vDst, vSrc, err = resolveValues(dst, src); err != nil { + return err + } + if vDst.Type() != vSrc.Type() { + return ErrDifferentArgumentsTypes + } + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) +} + +// IsReflectNil is the reflect value provided nil +func isReflectNil(v reflect.Value) bool { + k := v.Kind() + switch k { + case reflect.Interface, reflect.Slice, reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr: + // Both interface and slice are nil if first word is 0. + // Both are always bigger than a word; assume flagIndir. + return v.IsNil() + default: + return false + } +} diff --git a/vendor/dario.cat/mergo/mergo.go b/vendor/dario.cat/mergo/mergo.go new file mode 100644 index 000000000..0a721e2d8 --- /dev/null +++ b/vendor/dario.cat/mergo/mergo.go @@ -0,0 +1,81 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "errors" + "reflect" +) + +// Errors reported by Mergo when it finds invalid arguments. +var ( + ErrNilArguments = errors.New("src and dst must not be nil") + ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type") + ErrNotSupported = errors.New("only structs, maps, and slices are supported") + ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") + ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") + ErrNonPointerArgument = errors.New("dst must be a pointer") +) + +// During deepMerge, must keep track of checks that are +// in progress. The comparison algorithm assumes that all +// checks in progress are true when it reencounters them. +// Visited are stored in a map indexed by 17 * a1 + a2; +type visit struct { + typ reflect.Type + next *visit + ptr uintptr +} + +// From src/pkg/encoding/json/encode.go. +func isEmptyValue(v reflect.Value, shouldDereference bool) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + if v.IsNil() { + return true + } + if shouldDereference { + return isEmptyValue(v.Elem(), shouldDereference) + } + return false + case reflect.Func: + return v.IsNil() + case reflect.Invalid: + return true + } + return false +} + +func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { + if dst == nil || src == nil { + err = ErrNilArguments + return + } + vDst = reflect.ValueOf(dst).Elem() + if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map && vDst.Kind() != reflect.Slice { + err = ErrNotSupported + return + } + vSrc = reflect.ValueOf(src) + // We check if vSrc is a pointer to dereference it. + if vSrc.Kind() == reflect.Ptr { + vSrc = vSrc.Elem() + } + return +} diff --git a/vendor/github.com/AdaLogics/go-fuzz-headers/LICENSE b/vendor/github.com/AdaLogics/go-fuzz-headers/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/github.com/AdaLogics/go-fuzz-headers/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/AdaLogics/go-fuzz-headers/README.md b/vendor/github.com/AdaLogics/go-fuzz-headers/README.md new file mode 100644 index 000000000..0a0d60c74 --- /dev/null +++ b/vendor/github.com/AdaLogics/go-fuzz-headers/README.md @@ -0,0 +1,93 @@ +# go-fuzz-headers +This repository contains various helper functions for go fuzzing. It is mostly used in combination with [go-fuzz](https://github.com/dvyukov/go-fuzz), but compatibility with fuzzing in the standard library will also be supported. Any coverage guided fuzzing engine that provides an array or slice of bytes can be used with go-fuzz-headers. + + +## Usage +Using go-fuzz-headers is easy. First create a new consumer with the bytes provided by the fuzzing engine: + +```go +import ( + fuzz "github.com/AdaLogics/go-fuzz-headers" +) +data := []byte{'R', 'a', 'n', 'd', 'o', 'm'} +f := fuzz.NewConsumer(data) + +``` + +This creates a `Consumer` that consumes the bytes of the input as it uses them to fuzz different types. + +After that, `f` can be used to easily create fuzzed instances of different types. Below are some examples: + +### Structs +One of the most useful features of go-fuzz-headers is its ability to fill structs with the data provided by the fuzzing engine. This is done with a single line: +```go +type Person struct { + Name string + Age int +} +p := Person{} +// Fill p with values based on the data provided by the fuzzing engine: +err := f.GenerateStruct(&p) +``` + +This includes nested structs too. In this example, the fuzz Consumer will also insert values in `p.BestFriend`: +```go +type PersonI struct { + Name string + Age int + BestFriend PersonII +} +type PersonII struct { + Name string + Age int +} +p := PersonI{} +err := f.GenerateStruct(&p) +``` + +If the consumer should insert values for unexported fields as well as exported, this can be enabled with: + +```go +f.AllowUnexportedFields() +``` + +...and disabled with: + +```go +f.DisallowUnexportedFields() +``` + +### Other types: + +Other useful APIs: + +```go +createdString, err := f.GetString() // Gets a string +createdInt, err := f.GetInt() // Gets an integer +createdByte, err := f.GetByte() // Gets a byte +createdBytes, err := f.GetBytes() // Gets a byte slice +createdBool, err := f.GetBool() // Gets a boolean +err := f.FuzzMap(target_map) // Fills a map +createdTarBytes, err := f.TarBytes() // Gets bytes of a valid tar archive +err := f.CreateFiles(inThisDir) // Fills inThisDir with files +createdString, err := f.GetStringFrom("anyCharInThisString", ofThisLength) // Gets a string that consists of chars from "anyCharInThisString" and has the exact length "ofThisLength" +``` + +Most APIs are added as they are needed. + +## Projects that use go-fuzz-headers +- [runC](https://github.com/opencontainers/runc) +- [Istio](https://github.com/istio/istio) +- [Vitess](https://github.com/vitessio/vitess) +- [Containerd](https://github.com/containerd/containerd) + +Feel free to add your own project to the list, if you use go-fuzz-headers to fuzz it. + + + + +## Status +The project is under development and will be updated regularly. + +## References +go-fuzz-headers' approach to fuzzing structs is strongly inspired by [gofuzz](https://github.com/google/gofuzz). \ No newline at end of file diff --git a/vendor/github.com/AdaLogics/go-fuzz-headers/consumer.go b/vendor/github.com/AdaLogics/go-fuzz-headers/consumer.go new file mode 100644 index 000000000..adfeedf5e --- /dev/null +++ b/vendor/github.com/AdaLogics/go-fuzz-headers/consumer.go @@ -0,0 +1,914 @@ +// Copyright 2023 The go-fuzz-headers Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gofuzzheaders + +import ( + "archive/tar" + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "math" + "os" + "path/filepath" + "reflect" + "strconv" + "strings" + "time" + "unsafe" +) + +var ( + MaxTotalLen uint32 = 2000000 + maxDepth = 100 +) + +func SetMaxTotalLen(newLen uint32) { + MaxTotalLen = newLen +} + +type ConsumeFuzzer struct { + data []byte + dataTotal uint32 + CommandPart []byte + RestOfArray []byte + NumberOfCalls int + position uint32 + fuzzUnexportedFields bool + curDepth int + Funcs map[reflect.Type]reflect.Value +} + +func IsDivisibleBy(n int, divisibleby int) bool { + return (n % divisibleby) == 0 +} + +func NewConsumer(fuzzData []byte) *ConsumeFuzzer { + return &ConsumeFuzzer{ + data: fuzzData, + dataTotal: uint32(len(fuzzData)), + Funcs: make(map[reflect.Type]reflect.Value), + curDepth: 0, + } +} + +func (f *ConsumeFuzzer) Split(minCalls, maxCalls int) error { + if f.dataTotal == 0 { + return errors.New("could not split") + } + numberOfCalls := int(f.data[0]) + if numberOfCalls < minCalls || numberOfCalls > maxCalls { + return errors.New("bad number of calls") + } + if int(f.dataTotal) < numberOfCalls+numberOfCalls+1 { + return errors.New("length of data does not match required parameters") + } + + // Define part 2 and 3 of the data array + commandPart := f.data[1 : numberOfCalls+1] + restOfArray := f.data[numberOfCalls+1:] + + // Just a small check. It is necessary + if len(commandPart) != numberOfCalls { + return errors.New("length of commandPart does not match number of calls") + } + + // Check if restOfArray is divisible by numberOfCalls + if !IsDivisibleBy(len(restOfArray), numberOfCalls) { + return errors.New("length of commandPart does not match number of calls") + } + f.CommandPart = commandPart + f.RestOfArray = restOfArray + f.NumberOfCalls = numberOfCalls + return nil +} + +func (f *ConsumeFuzzer) AllowUnexportedFields() { + f.fuzzUnexportedFields = true +} + +func (f *ConsumeFuzzer) DisallowUnexportedFields() { + f.fuzzUnexportedFields = false +} + +func (f *ConsumeFuzzer) GenerateStruct(targetStruct interface{}) error { + e := reflect.ValueOf(targetStruct).Elem() + return f.fuzzStruct(e, false) +} + +func (f *ConsumeFuzzer) setCustom(v reflect.Value) error { + // First: see if we have a fuzz function for it. + doCustom, ok := f.Funcs[v.Type()] + if !ok { + return fmt.Errorf("could not find a custom function") + } + + switch v.Kind() { + case reflect.Ptr: + if v.IsNil() { + if !v.CanSet() { + return fmt.Errorf("could not use a custom function") + } + v.Set(reflect.New(v.Type().Elem())) + } + case reflect.Map: + if v.IsNil() { + if !v.CanSet() { + return fmt.Errorf("could not use a custom function") + } + v.Set(reflect.MakeMap(v.Type())) + } + default: + return fmt.Errorf("could not use a custom function") + } + + verr := doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ + F: f, + })}) + + // check if we return an error + if verr[0].IsNil() { + return nil + } + return fmt.Errorf("could not use a custom function") +} + +func (f *ConsumeFuzzer) fuzzStruct(e reflect.Value, customFunctions bool) error { + if f.curDepth >= maxDepth { + // return err or nil here? + return nil + } + f.curDepth++ + defer func() { f.curDepth-- }() + + // We check if we should check for custom functions + if customFunctions && e.IsValid() && e.CanAddr() { + err := f.setCustom(e.Addr()) + if err != nil { + return err + } + } + + switch e.Kind() { + case reflect.Struct: + for i := 0; i < e.NumField(); i++ { + var v reflect.Value + if !e.Field(i).CanSet() { + if f.fuzzUnexportedFields { + v = reflect.NewAt(e.Field(i).Type(), unsafe.Pointer(e.Field(i).UnsafeAddr())).Elem() + } + if err := f.fuzzStruct(v, customFunctions); err != nil { + return err + } + } else { + v = e.Field(i) + if err := f.fuzzStruct(v, customFunctions); err != nil { + return err + } + } + } + case reflect.String: + str, err := f.GetString() + if err != nil { + return err + } + if e.CanSet() { + e.SetString(str) + } + case reflect.Slice: + var maxElements uint32 + // Byte slices should not be restricted + if e.Type().String() == "[]uint8" { + maxElements = 10000000 + } else { + maxElements = 50 + } + + randQty, err := f.GetUint32() + if err != nil { + return err + } + numOfElements := randQty % maxElements + if (f.dataTotal - f.position) < numOfElements { + numOfElements = f.dataTotal - f.position + } + + uu := reflect.MakeSlice(e.Type(), int(numOfElements), int(numOfElements)) + + for i := 0; i < int(numOfElements); i++ { + // If we have more than 10, then we can proceed with that. + if err := f.fuzzStruct(uu.Index(i), customFunctions); err != nil { + if i >= 10 { + if e.CanSet() { + e.Set(uu) + } + return nil + } else { + return err + } + } + } + if e.CanSet() { + e.Set(uu) + } + case reflect.Uint16: + newInt, err := f.GetUint16() + if err != nil { + return err + } + if e.CanSet() { + e.SetUint(uint64(newInt)) + } + case reflect.Uint32: + newInt, err := f.GetUint32() + if err != nil { + return err + } + if e.CanSet() { + e.SetUint(uint64(newInt)) + } + case reflect.Uint64: + newInt, err := f.GetInt() + if err != nil { + return err + } + if e.CanSet() { + e.SetUint(uint64(newInt)) + } + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + newInt, err := f.GetInt() + if err != nil { + return err + } + if e.CanSet() { + e.SetInt(int64(newInt)) + } + case reflect.Float32: + newFloat, err := f.GetFloat32() + if err != nil { + return err + } + if e.CanSet() { + e.SetFloat(float64(newFloat)) + } + case reflect.Float64: + newFloat, err := f.GetFloat64() + if err != nil { + return err + } + if e.CanSet() { + e.SetFloat(float64(newFloat)) + } + case reflect.Map: + if e.CanSet() { + e.Set(reflect.MakeMap(e.Type())) + const maxElements = 50 + randQty, err := f.GetInt() + if err != nil { + return err + } + numOfElements := randQty % maxElements + for i := 0; i < numOfElements; i++ { + key := reflect.New(e.Type().Key()).Elem() + if err := f.fuzzStruct(key, customFunctions); err != nil { + return err + } + val := reflect.New(e.Type().Elem()).Elem() + if err = f.fuzzStruct(val, customFunctions); err != nil { + return err + } + e.SetMapIndex(key, val) + } + } + case reflect.Ptr: + if e.CanSet() { + e.Set(reflect.New(e.Type().Elem())) + if err := f.fuzzStruct(e.Elem(), customFunctions); err != nil { + return err + } + return nil + } + case reflect.Uint8: + b, err := f.GetByte() + if err != nil { + return err + } + if e.CanSet() { + e.SetUint(uint64(b)) + } + } + return nil +} + +func (f *ConsumeFuzzer) GetStringArray() (reflect.Value, error) { + // The max size of the array: + const max uint32 = 20 + + arraySize := f.position + if arraySize > max { + arraySize = max + } + stringArray := reflect.MakeSlice(reflect.SliceOf(reflect.TypeOf("string")), int(arraySize), int(arraySize)) + if f.position+arraySize >= f.dataTotal { + return stringArray, errors.New("could not make string array") + } + + for i := 0; i < int(arraySize); i++ { + stringSize := uint32(f.data[f.position]) + if f.position+stringSize >= f.dataTotal { + return stringArray, nil + } + stringToAppend := string(f.data[f.position : f.position+stringSize]) + strVal := reflect.ValueOf(stringToAppend) + stringArray = reflect.Append(stringArray, strVal) + f.position += stringSize + } + return stringArray, nil +} + +func (f *ConsumeFuzzer) GetInt() (int, error) { + if f.position >= f.dataTotal { + return 0, errors.New("not enough bytes to create int") + } + returnInt := int(f.data[f.position]) + f.position++ + return returnInt, nil +} + +func (f *ConsumeFuzzer) GetByte() (byte, error) { + if f.position >= f.dataTotal { + return 0x00, errors.New("not enough bytes to get byte") + } + returnByte := f.data[f.position] + f.position++ + return returnByte, nil +} + +func (f *ConsumeFuzzer) GetNBytes(numberOfBytes int) ([]byte, error) { + if f.position >= f.dataTotal { + return nil, errors.New("not enough bytes to get byte") + } + returnBytes := make([]byte, 0, numberOfBytes) + for i := 0; i < numberOfBytes; i++ { + newByte, err := f.GetByte() + if err != nil { + return nil, err + } + returnBytes = append(returnBytes, newByte) + } + return returnBytes, nil +} + +func (f *ConsumeFuzzer) GetUint16() (uint16, error) { + u16, err := f.GetNBytes(2) + if err != nil { + return 0, err + } + littleEndian, err := f.GetBool() + if err != nil { + return 0, err + } + if littleEndian { + return binary.LittleEndian.Uint16(u16), nil + } + return binary.BigEndian.Uint16(u16), nil +} + +func (f *ConsumeFuzzer) GetUint32() (uint32, error) { + u32, err := f.GetNBytes(4) + if err != nil { + return 0, err + } + return binary.BigEndian.Uint32(u32), nil +} + +func (f *ConsumeFuzzer) GetUint64() (uint64, error) { + u64, err := f.GetNBytes(8) + if err != nil { + return 0, err + } + littleEndian, err := f.GetBool() + if err != nil { + return 0, err + } + if littleEndian { + return binary.LittleEndian.Uint64(u64), nil + } + return binary.BigEndian.Uint64(u64), nil +} + +func (f *ConsumeFuzzer) GetBytes() ([]byte, error) { + var length uint32 + var err error + length, err = f.GetUint32() + if err != nil { + return nil, errors.New("not enough bytes to create byte array") + } + + if length == 0 { + length = 30 + } + bytesLeft := f.dataTotal - f.position + if bytesLeft <= 0 { + return nil, errors.New("not enough bytes to create byte array") + } + + // If the length is the same as bytes left, we will not overflow + // the remaining bytes. + if length != bytesLeft { + length = length % bytesLeft + } + byteBegin := f.position + if byteBegin+length < byteBegin { + return nil, errors.New("numbers overflow") + } + f.position = byteBegin + length + return f.data[byteBegin:f.position], nil +} + +func (f *ConsumeFuzzer) GetString() (string, error) { + if f.position >= f.dataTotal { + return "nil", errors.New("not enough bytes to create string") + } + length, err := f.GetUint32() + if err != nil { + return "nil", errors.New("not enough bytes to create string") + } + if f.position > MaxTotalLen { + return "nil", errors.New("created too large a string") + } + byteBegin := f.position + if byteBegin >= f.dataTotal { + return "nil", errors.New("not enough bytes to create string") + } + if byteBegin+length > f.dataTotal { + return "nil", errors.New("not enough bytes to create string") + } + if byteBegin > byteBegin+length { + return "nil", errors.New("numbers overflow") + } + f.position = byteBegin + length + return string(f.data[byteBegin:f.position]), nil +} + +func (f *ConsumeFuzzer) GetBool() (bool, error) { + if f.position >= f.dataTotal { + return false, errors.New("not enough bytes to create bool") + } + if IsDivisibleBy(int(f.data[f.position]), 2) { + f.position++ + return true, nil + } else { + f.position++ + return false, nil + } +} + +func (f *ConsumeFuzzer) FuzzMap(m interface{}) error { + return f.GenerateStruct(m) +} + +func returnTarBytes(buf []byte) ([]byte, error) { + return buf, nil + // Count files + var fileCounter int + tr := tar.NewReader(bytes.NewReader(buf)) + for { + _, err := tr.Next() + if err == io.EOF { + break + } + if err != nil { + return nil, err + } + fileCounter++ + } + if fileCounter >= 1 { + return buf, nil + } + return nil, fmt.Errorf("not enough files were created\n") +} + +func setTarHeaderFormat(hdr *tar.Header, f *ConsumeFuzzer) error { + ind, err := f.GetInt() + if err != nil { + hdr.Format = tar.FormatGNU + //return nil + } + switch ind % 4 { + case 0: + hdr.Format = tar.FormatUnknown + case 1: + hdr.Format = tar.FormatUSTAR + case 2: + hdr.Format = tar.FormatPAX + case 3: + hdr.Format = tar.FormatGNU + } + return nil +} + +func setTarHeaderTypeflag(hdr *tar.Header, f *ConsumeFuzzer) error { + ind, err := f.GetInt() + if err != nil { + return err + } + switch ind % 13 { + case 0: + hdr.Typeflag = tar.TypeReg + case 1: + hdr.Typeflag = tar.TypeLink + linkname, err := f.GetString() + if err != nil { + return err + } + hdr.Linkname = linkname + case 2: + hdr.Typeflag = tar.TypeSymlink + linkname, err := f.GetString() + if err != nil { + return err + } + hdr.Linkname = linkname + case 3: + hdr.Typeflag = tar.TypeChar + case 4: + hdr.Typeflag = tar.TypeBlock + case 5: + hdr.Typeflag = tar.TypeDir + case 6: + hdr.Typeflag = tar.TypeFifo + case 7: + hdr.Typeflag = tar.TypeCont + case 8: + hdr.Typeflag = tar.TypeXHeader + case 9: + hdr.Typeflag = tar.TypeXGlobalHeader + case 10: + hdr.Typeflag = tar.TypeGNUSparse + case 11: + hdr.Typeflag = tar.TypeGNULongName + case 12: + hdr.Typeflag = tar.TypeGNULongLink + } + return nil +} + +func (f *ConsumeFuzzer) createTarFileBody() ([]byte, error) { + return f.GetBytes() + /*length, err := f.GetUint32() + if err != nil { + return nil, errors.New("not enough bytes to create byte array") + } + + // A bit of optimization to attempt to create a file body + // when we don't have as many bytes left as "length" + remainingBytes := f.dataTotal - f.position + if remainingBytes <= 0 { + return nil, errors.New("created too large a string") + } + if f.position+length > MaxTotalLen { + return nil, errors.New("created too large a string") + } + byteBegin := f.position + if byteBegin >= f.dataTotal { + return nil, errors.New("not enough bytes to create byte array") + } + if length == 0 { + return nil, errors.New("zero-length is not supported") + } + if byteBegin+length >= f.dataTotal { + return nil, errors.New("not enough bytes to create byte array") + } + if byteBegin+length < byteBegin { + return nil, errors.New("numbers overflow") + } + f.position = byteBegin + length + return f.data[byteBegin:f.position], nil*/ +} + +// getTarFileName is similar to GetString(), but creates string based +// on the length of f.data to reduce the likelihood of overflowing +// f.data. +func (f *ConsumeFuzzer) getTarFilename() (string, error) { + return f.GetString() + /*length, err := f.GetUint32() + if err != nil { + return "nil", errors.New("not enough bytes to create string") + } + + // A bit of optimization to attempt to create a file name + // when we don't have as many bytes left as "length" + remainingBytes := f.dataTotal - f.position + if remainingBytes <= 0 { + return "nil", errors.New("created too large a string") + } + if f.position > MaxTotalLen { + return "nil", errors.New("created too large a string") + } + byteBegin := f.position + if byteBegin >= f.dataTotal { + return "nil", errors.New("not enough bytes to create string") + } + if byteBegin+length > f.dataTotal { + return "nil", errors.New("not enough bytes to create string") + } + if byteBegin > byteBegin+length { + return "nil", errors.New("numbers overflow") + } + f.position = byteBegin + length + return string(f.data[byteBegin:f.position]), nil*/ +} + +type TarFile struct { + Hdr *tar.Header + Body []byte +} + +// TarBytes returns valid bytes for a tar archive +func (f *ConsumeFuzzer) TarBytes() ([]byte, error) { + numberOfFiles, err := f.GetInt() + if err != nil { + return nil, err + } + var tarFiles []*TarFile + tarFiles = make([]*TarFile, 0) + + const maxNoOfFiles = 100 + for i := 0; i < numberOfFiles%maxNoOfFiles; i++ { + var filename string + var filebody []byte + var sec, nsec int + var err error + + filename, err = f.getTarFilename() + if err != nil { + var sb strings.Builder + sb.WriteString("file-") + sb.WriteString(strconv.Itoa(i)) + filename = sb.String() + } + filebody, err = f.createTarFileBody() + if err != nil { + var sb strings.Builder + sb.WriteString("filebody-") + sb.WriteString(strconv.Itoa(i)) + filebody = []byte(sb.String()) + } + + sec, err = f.GetInt() + if err != nil { + sec = 1672531200 // beginning of 2023 + } + nsec, err = f.GetInt() + if err != nil { + nsec = 1703980800 // end of 2023 + } + + hdr := &tar.Header{ + Name: filename, + Size: int64(len(filebody)), + Mode: 0o600, + ModTime: time.Unix(int64(sec), int64(nsec)), + } + if err := setTarHeaderTypeflag(hdr, f); err != nil { + return []byte(""), err + } + if err := setTarHeaderFormat(hdr, f); err != nil { + return []byte(""), err + } + tf := &TarFile{ + Hdr: hdr, + Body: filebody, + } + tarFiles = append(tarFiles, tf) + } + + var buf bytes.Buffer + tw := tar.NewWriter(&buf) + defer tw.Close() + + for _, tf := range tarFiles { + tw.WriteHeader(tf.Hdr) + tw.Write(tf.Body) + } + return buf.Bytes(), nil +} + +// This is similar to TarBytes, but it returns a series of +// files instead of raw tar bytes. The advantage of this +// api is that it is cheaper in terms of cpu power to +// modify or check the files in the fuzzer with TarFiles() +// because it avoids creating a tar reader. +func (f *ConsumeFuzzer) TarFiles() ([]*TarFile, error) { + numberOfFiles, err := f.GetInt() + if err != nil { + return nil, err + } + var tarFiles []*TarFile + tarFiles = make([]*TarFile, 0) + + const maxNoOfFiles = 100 + for i := 0; i < numberOfFiles%maxNoOfFiles; i++ { + filename, err := f.getTarFilename() + if err != nil { + return tarFiles, err + } + filebody, err := f.createTarFileBody() + if err != nil { + return tarFiles, err + } + + sec, err := f.GetInt() + if err != nil { + return tarFiles, err + } + nsec, err := f.GetInt() + if err != nil { + return tarFiles, err + } + + hdr := &tar.Header{ + Name: filename, + Size: int64(len(filebody)), + Mode: 0o600, + ModTime: time.Unix(int64(sec), int64(nsec)), + } + if err := setTarHeaderTypeflag(hdr, f); err != nil { + hdr.Typeflag = tar.TypeReg + } + if err := setTarHeaderFormat(hdr, f); err != nil { + return tarFiles, err // should not happend + } + tf := &TarFile{ + Hdr: hdr, + Body: filebody, + } + tarFiles = append(tarFiles, tf) + } + return tarFiles, nil +} + +// CreateFiles creates pseudo-random files in rootDir. +// It creates subdirs and places the files there. +// It is the callers responsibility to ensure that +// rootDir exists. +func (f *ConsumeFuzzer) CreateFiles(rootDir string) error { + numberOfFiles, err := f.GetInt() + if err != nil { + return err + } + maxNumberOfFiles := numberOfFiles % 4000 // This is completely arbitrary + if maxNumberOfFiles == 0 { + return errors.New("maxNumberOfFiles is nil") + } + + var noOfCreatedFiles int + for i := 0; i < maxNumberOfFiles; i++ { + // The file to create: + fileName, err := f.GetString() + if err != nil { + if noOfCreatedFiles > 0 { + // If files have been created, we don't return an error. + break + } else { + return errors.New("could not get fileName") + } + } + if strings.Contains(fileName, "..") || (len(fileName) > 0 && fileName[0] == 47) || strings.Contains(fileName, "\\") { + continue + } + fullFilePath := filepath.Join(rootDir, fileName) + + // Find the subdirectory of the file + if subDir := filepath.Dir(fileName); subDir != "" && subDir != "." { + // create the dir first; avoid going outside the root dir + if strings.Contains(subDir, "../") || (len(subDir) > 0 && subDir[0] == 47) || strings.Contains(subDir, "\\") { + continue + } + dirPath := filepath.Join(rootDir, subDir) + if _, err := os.Stat(dirPath); os.IsNotExist(err) { + err2 := os.MkdirAll(dirPath, 0o777) + if err2 != nil { + continue + } + } + fullFilePath = filepath.Join(dirPath, fileName) + } else { + // Create symlink + createSymlink, err := f.GetBool() + if err != nil { + if noOfCreatedFiles > 0 { + break + } else { + return errors.New("could not create the symlink") + } + } + if createSymlink { + symlinkTarget, err := f.GetString() + if err != nil { + return err + } + err = os.Symlink(symlinkTarget, fullFilePath) + if err != nil { + return err + } + // stop loop here, since a symlink needs no further action + noOfCreatedFiles++ + continue + } + // We create a normal file + fileContents, err := f.GetBytes() + if err != nil { + if noOfCreatedFiles > 0 { + break + } else { + return errors.New("could not create the file") + } + } + err = os.WriteFile(fullFilePath, fileContents, 0o666) + if err != nil { + continue + } + noOfCreatedFiles++ + } + } + return nil +} + +// GetStringFrom returns a string that can only consist of characters +// included in possibleChars. It returns an error if the created string +// does not have the specified length. +func (f *ConsumeFuzzer) GetStringFrom(possibleChars string, length int) (string, error) { + if (f.dataTotal - f.position) < uint32(length) { + return "", errors.New("not enough bytes to create a string") + } + output := make([]byte, 0, length) + for i := 0; i < length; i++ { + charIndex, err := f.GetInt() + if err != nil { + return string(output), err + } + output = append(output, possibleChars[charIndex%len(possibleChars)]) + } + return string(output), nil +} + +func (f *ConsumeFuzzer) GetRune() ([]rune, error) { + stringToConvert, err := f.GetString() + if err != nil { + return []rune("nil"), err + } + return []rune(stringToConvert), nil +} + +func (f *ConsumeFuzzer) GetFloat32() (float32, error) { + u32, err := f.GetNBytes(4) + if err != nil { + return 0, err + } + littleEndian, err := f.GetBool() + if err != nil { + return 0, err + } + if littleEndian { + u32LE := binary.LittleEndian.Uint32(u32) + return math.Float32frombits(u32LE), nil + } + u32BE := binary.BigEndian.Uint32(u32) + return math.Float32frombits(u32BE), nil +} + +func (f *ConsumeFuzzer) GetFloat64() (float64, error) { + u64, err := f.GetNBytes(8) + if err != nil { + return 0, err + } + littleEndian, err := f.GetBool() + if err != nil { + return 0, err + } + if littleEndian { + u64LE := binary.LittleEndian.Uint64(u64) + return math.Float64frombits(u64LE), nil + } + u64BE := binary.BigEndian.Uint64(u64) + return math.Float64frombits(u64BE), nil +} + +func (f *ConsumeFuzzer) CreateSlice(targetSlice interface{}) error { + return f.GenerateStruct(targetSlice) +} diff --git a/vendor/github.com/AdaLogics/go-fuzz-headers/funcs.go b/vendor/github.com/AdaLogics/go-fuzz-headers/funcs.go new file mode 100644 index 000000000..8ca3a61b8 --- /dev/null +++ b/vendor/github.com/AdaLogics/go-fuzz-headers/funcs.go @@ -0,0 +1,62 @@ +// Copyright 2023 The go-fuzz-headers Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gofuzzheaders + +import ( + "fmt" + "reflect" +) + +type Continue struct { + F *ConsumeFuzzer +} + +func (f *ConsumeFuzzer) AddFuncs(fuzzFuncs []interface{}) { + for i := range fuzzFuncs { + v := reflect.ValueOf(fuzzFuncs[i]) + if v.Kind() != reflect.Func { + panic("Need only funcs!") + } + t := v.Type() + if t.NumIn() != 2 || t.NumOut() != 1 { + fmt.Println(t.NumIn(), t.NumOut()) + + panic("Need 2 in and 1 out params. In must be the type. Out must be an error") + } + argT := t.In(0) + switch argT.Kind() { + case reflect.Ptr, reflect.Map: + default: + panic("fuzzFunc must take pointer or map type") + } + if t.In(1) != reflect.TypeOf(Continue{}) { + panic("fuzzFunc's second parameter must be type Continue") + } + f.Funcs[argT] = v + } +} + +func (f *ConsumeFuzzer) GenerateWithCustom(targetStruct interface{}) error { + e := reflect.ValueOf(targetStruct).Elem() + return f.fuzzStruct(e, true) +} + +func (c Continue) GenerateStruct(targetStruct interface{}) error { + return c.F.GenerateStruct(targetStruct) +} + +func (c Continue) GenerateStructWithCustom(targetStruct interface{}) error { + return c.F.GenerateWithCustom(targetStruct) +} diff --git a/vendor/github.com/AdaLogics/go-fuzz-headers/sql.go b/vendor/github.com/AdaLogics/go-fuzz-headers/sql.go new file mode 100644 index 000000000..2afd49f84 --- /dev/null +++ b/vendor/github.com/AdaLogics/go-fuzz-headers/sql.go @@ -0,0 +1,556 @@ +// Copyright 2023 The go-fuzz-headers Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gofuzzheaders + +import ( + "fmt" + "strings" +) + +// returns a keyword by index +func getKeyword(f *ConsumeFuzzer) (string, error) { + index, err := f.GetInt() + if err != nil { + return keywords[0], err + } + for i, k := range keywords { + if i == index { + return k, nil + } + } + return keywords[0], fmt.Errorf("could not get a kw") +} + +// Simple utility function to check if a string +// slice contains a string. +func containsString(s []string, e string) bool { + for _, a := range s { + if a == e { + return true + } + } + return false +} + +// These keywords are used specifically for fuzzing Vitess +var keywords = []string{ + "accessible", "action", "add", "after", "against", "algorithm", + "all", "alter", "always", "analyze", "and", "as", "asc", "asensitive", + "auto_increment", "avg_row_length", "before", "begin", "between", + "bigint", "binary", "_binary", "_utf8mb4", "_utf8", "_latin1", "bit", + "blob", "bool", "boolean", "both", "by", "call", "cancel", "cascade", + "cascaded", "case", "cast", "channel", "change", "char", "character", + "charset", "check", "checksum", "coalesce", "code", "collate", "collation", + "column", "columns", "comment", "committed", "commit", "compact", "complete", + "compressed", "compression", "condition", "connection", "constraint", "continue", + "convert", "copy", "cume_dist", "substr", "substring", "create", "cross", + "csv", "current_date", "current_time", "current_timestamp", "current_user", + "cursor", "data", "database", "databases", "day", "day_hour", "day_microsecond", + "day_minute", "day_second", "date", "datetime", "dec", "decimal", "declare", + "default", "definer", "delay_key_write", "delayed", "delete", "dense_rank", + "desc", "describe", "deterministic", "directory", "disable", "discard", + "disk", "distinct", "distinctrow", "div", "double", "do", "drop", "dumpfile", + "duplicate", "dynamic", "each", "else", "elseif", "empty", "enable", + "enclosed", "encryption", "end", "enforced", "engine", "engines", "enum", + "error", "escape", "escaped", "event", "exchange", "exclusive", "exists", + "exit", "explain", "expansion", "export", "extended", "extract", "false", + "fetch", "fields", "first", "first_value", "fixed", "float", "float4", + "float8", "flush", "for", "force", "foreign", "format", "from", "full", + "fulltext", "function", "general", "generated", "geometry", "geometrycollection", + "get", "global", "gtid_executed", "grant", "group", "grouping", "groups", + "group_concat", "having", "header", "high_priority", "hosts", "hour", "hour_microsecond", + "hour_minute", "hour_second", "if", "ignore", "import", "in", "index", "indexes", + "infile", "inout", "inner", "inplace", "insensitive", "insert", "insert_method", + "int", "int1", "int2", "int3", "int4", "int8", "integer", "interval", + "into", "io_after_gtids", "is", "isolation", "iterate", "invoker", "join", + "json", "json_table", "key", "keys", "keyspaces", "key_block_size", "kill", "lag", + "language", "last", "last_value", "last_insert_id", "lateral", "lead", "leading", + "leave", "left", "less", "level", "like", "limit", "linear", "lines", + "linestring", "load", "local", "localtime", "localtimestamp", "lock", "logs", + "long", "longblob", "longtext", "loop", "low_priority", "manifest", + "master_bind", "match", "max_rows", "maxvalue", "mediumblob", "mediumint", + "mediumtext", "memory", "merge", "microsecond", "middleint", "min_rows", "minute", + "minute_microsecond", "minute_second", "mod", "mode", "modify", "modifies", + "multilinestring", "multipoint", "multipolygon", "month", "name", + "names", "natural", "nchar", "next", "no", "none", "not", "no_write_to_binlog", + "nth_value", "ntile", "null", "numeric", "of", "off", "offset", "on", + "only", "open", "optimize", "optimizer_costs", "option", "optionally", + "or", "order", "out", "outer", "outfile", "over", "overwrite", "pack_keys", + "parser", "partition", "partitioning", "password", "percent_rank", "plugins", + "point", "polygon", "precision", "primary", "privileges", "processlist", + "procedure", "query", "quarter", "range", "rank", "read", "reads", "read_write", + "real", "rebuild", "recursive", "redundant", "references", "regexp", "relay", + "release", "remove", "rename", "reorganize", "repair", "repeat", "repeatable", + "replace", "require", "resignal", "restrict", "return", "retry", "revert", + "revoke", "right", "rlike", "rollback", "row", "row_format", "row_number", + "rows", "s3", "savepoint", "schema", "schemas", "second", "second_microsecond", + "security", "select", "sensitive", "separator", "sequence", "serializable", + "session", "set", "share", "shared", "show", "signal", "signed", "slow", + "smallint", "spatial", "specific", "sql", "sqlexception", "sqlstate", + "sqlwarning", "sql_big_result", "sql_cache", "sql_calc_found_rows", + "sql_no_cache", "sql_small_result", "ssl", "start", "starting", + "stats_auto_recalc", "stats_persistent", "stats_sample_pages", "status", + "storage", "stored", "straight_join", "stream", "system", "vstream", + "table", "tables", "tablespace", "temporary", "temptable", "terminated", + "text", "than", "then", "time", "timestamp", "timestampadd", "timestampdiff", + "tinyblob", "tinyint", "tinytext", "to", "trailing", "transaction", "tree", + "traditional", "trigger", "triggers", "true", "truncate", "uncommitted", + "undefined", "undo", "union", "unique", "unlock", "unsigned", "update", + "upgrade", "usage", "use", "user", "user_resources", "using", "utc_date", + "utc_time", "utc_timestamp", "validation", "values", "variables", "varbinary", + "varchar", "varcharacter", "varying", "vgtid_executed", "virtual", "vindex", + "vindexes", "view", "vitess", "vitess_keyspaces", "vitess_metadata", + "vitess_migration", "vitess_migrations", "vitess_replication_status", + "vitess_shards", "vitess_tablets", "vschema", "warnings", "when", + "where", "while", "window", "with", "without", "work", "write", "xor", + "year", "year_month", "zerofill", +} + +// Keywords that could get an additional keyword +var needCustomString = []string{ + "DISTINCTROW", "FROM", // Select keywords: + "GROUP BY", "HAVING", "WINDOW", + "FOR", + "ORDER BY", "LIMIT", + "INTO", "PARTITION", "AS", // Insert Keywords: + "ON DUPLICATE KEY UPDATE", + "WHERE", "LIMIT", // Delete keywords + "INFILE", "INTO TABLE", "CHARACTER SET", // Load keywords + "TERMINATED BY", "ENCLOSED BY", + "ESCAPED BY", "STARTING BY", + "TERMINATED BY", "STARTING BY", + "IGNORE", + "VALUE", "VALUES", // Replace tokens + "SET", // Update tokens + "ENGINE =", // Drop tokens + "DEFINER =", "ON SCHEDULE", "RENAME TO", // Alter tokens + "COMMENT", "DO", "INITIAL_SIZE = ", "OPTIONS", +} + +var alterTableTokens = [][]string{ + {"CUSTOM_FUZZ_STRING"}, + {"CUSTOM_ALTTER_TABLE_OPTIONS"}, + {"PARTITION_OPTIONS_FOR_ALTER_TABLE"}, +} + +var alterTokens = [][]string{ + { + "DATABASE", "SCHEMA", "DEFINER = ", "EVENT", "FUNCTION", "INSTANCE", + "LOGFILE GROUP", "PROCEDURE", "SERVER", + }, + {"CUSTOM_FUZZ_STRING"}, + { + "ON SCHEDULE", "ON COMPLETION PRESERVE", "ON COMPLETION NOT PRESERVE", + "ADD UNDOFILE", "OPTIONS", + }, + {"RENAME TO", "INITIAL_SIZE = "}, + {"ENABLE", "DISABLE", "DISABLE ON SLAVE", "ENGINE"}, + {"COMMENT"}, + {"DO"}, +} + +var setTokens = [][]string{ + {"CHARACTER SET", "CHARSET", "CUSTOM_FUZZ_STRING", "NAMES"}, + {"CUSTOM_FUZZ_STRING", "DEFAULT", "="}, + {"CUSTOM_FUZZ_STRING"}, +} + +var dropTokens = [][]string{ + {"TEMPORARY", "UNDO"}, + { + "DATABASE", "SCHEMA", "EVENT", "INDEX", "LOGFILE GROUP", + "PROCEDURE", "FUNCTION", "SERVER", "SPATIAL REFERENCE SYSTEM", + "TABLE", "TABLESPACE", "TRIGGER", "VIEW", + }, + {"IF EXISTS"}, + {"CUSTOM_FUZZ_STRING"}, + {"ON", "ENGINE = ", "RESTRICT", "CASCADE"}, +} + +var renameTokens = [][]string{ + {"TABLE"}, + {"CUSTOM_FUZZ_STRING"}, + {"TO"}, + {"CUSTOM_FUZZ_STRING"}, +} + +var truncateTokens = [][]string{ + {"TABLE"}, + {"CUSTOM_FUZZ_STRING"}, +} + +var createTokens = [][]string{ + {"OR REPLACE", "TEMPORARY", "UNDO"}, // For create spatial reference system + { + "UNIQUE", "FULLTEXT", "SPATIAL", "ALGORITHM = UNDEFINED", "ALGORITHM = MERGE", + "ALGORITHM = TEMPTABLE", + }, + { + "DATABASE", "SCHEMA", "EVENT", "FUNCTION", "INDEX", "LOGFILE GROUP", + "PROCEDURE", "SERVER", "SPATIAL REFERENCE SYSTEM", "TABLE", "TABLESPACE", + "TRIGGER", "VIEW", + }, + {"IF NOT EXISTS"}, + {"CUSTOM_FUZZ_STRING"}, +} + +/* +// For future use. +var updateTokens = [][]string{ + {"LOW_PRIORITY"}, + {"IGNORE"}, + {"SET"}, + {"WHERE"}, + {"ORDER BY"}, + {"LIMIT"}, +} +*/ + +var replaceTokens = [][]string{ + {"LOW_PRIORITY", "DELAYED"}, + {"INTO"}, + {"PARTITION"}, + {"CUSTOM_FUZZ_STRING"}, + {"VALUES", "VALUE"}, +} + +var loadTokens = [][]string{ + {"DATA"}, + {"LOW_PRIORITY", "CONCURRENT", "LOCAL"}, + {"INFILE"}, + {"REPLACE", "IGNORE"}, + {"INTO TABLE"}, + {"PARTITION"}, + {"CHARACTER SET"}, + {"FIELDS", "COLUMNS"}, + {"TERMINATED BY"}, + {"OPTIONALLY"}, + {"ENCLOSED BY"}, + {"ESCAPED BY"}, + {"LINES"}, + {"STARTING BY"}, + {"TERMINATED BY"}, + {"IGNORE"}, + {"LINES", "ROWS"}, + {"CUSTOM_FUZZ_STRING"}, +} + +// These Are everything that comes after "INSERT" +var insertTokens = [][]string{ + {"LOW_PRIORITY", "DELAYED", "HIGH_PRIORITY", "IGNORE"}, + {"INTO"}, + {"PARTITION"}, + {"CUSTOM_FUZZ_STRING"}, + {"AS"}, + {"ON DUPLICATE KEY UPDATE"}, +} + +// These are everything that comes after "SELECT" +var selectTokens = [][]string{ + {"*", "CUSTOM_FUZZ_STRING", "DISTINCTROW"}, + {"HIGH_PRIORITY"}, + {"STRAIGHT_JOIN"}, + {"SQL_SMALL_RESULT", "SQL_BIG_RESULT", "SQL_BUFFER_RESULT"}, + {"SQL_NO_CACHE", "SQL_CALC_FOUND_ROWS"}, + {"CUSTOM_FUZZ_STRING"}, + {"FROM"}, + {"WHERE"}, + {"GROUP BY"}, + {"HAVING"}, + {"WINDOW"}, + {"ORDER BY"}, + {"LIMIT"}, + {"CUSTOM_FUZZ_STRING"}, + {"FOR"}, +} + +// These are everything that comes after "DELETE" +var deleteTokens = [][]string{ + {"LOW_PRIORITY", "QUICK", "IGNORE", "FROM", "AS"}, + {"PARTITION"}, + {"WHERE"}, + {"ORDER BY"}, + {"LIMIT"}, +} + +var alter_table_options = []string{ + "ADD", "COLUMN", "FIRST", "AFTER", "INDEX", "KEY", "FULLTEXT", "SPATIAL", + "CONSTRAINT", "UNIQUE", "FOREIGN KEY", "CHECK", "ENFORCED", "DROP", "ALTER", + "NOT", "INPLACE", "COPY", "SET", "VISIBLE", "INVISIBLE", "DEFAULT", "CHANGE", + "CHARACTER SET", "COLLATE", "DISABLE", "ENABLE", "KEYS", "TABLESPACE", "LOCK", + "FORCE", "MODIFY", "SHARED", "EXCLUSIVE", "NONE", "ORDER BY", "RENAME COLUMN", + "AS", "=", "ASC", "DESC", "WITH", "WITHOUT", "VALIDATION", "ADD PARTITION", + "DROP PARTITION", "DISCARD PARTITION", "IMPORT PARTITION", "TRUNCATE PARTITION", + "COALESCE PARTITION", "REORGANIZE PARTITION", "EXCHANGE PARTITION", + "ANALYZE PARTITION", "CHECK PARTITION", "OPTIMIZE PARTITION", "REBUILD PARTITION", + "REPAIR PARTITION", "REMOVE PARTITIONING", "USING", "BTREE", "HASH", "COMMENT", + "KEY_BLOCK_SIZE", "WITH PARSER", "AUTOEXTEND_SIZE", "AUTO_INCREMENT", "AVG_ROW_LENGTH", + "CHECKSUM", "INSERT_METHOD", "ROW_FORMAT", "DYNAMIC", "FIXED", "COMPRESSED", "REDUNDANT", + "COMPACT", "SECONDARY_ENGINE_ATTRIBUTE", "STATS_AUTO_RECALC", "STATS_PERSISTENT", + "STATS_SAMPLE_PAGES", "ZLIB", "LZ4", "ENGINE_ATTRIBUTE", "KEY_BLOCK_SIZE", "MAX_ROWS", + "MIN_ROWS", "PACK_KEYS", "PASSWORD", "COMPRESSION", "CONNECTION", "DIRECTORY", + "DELAY_KEY_WRITE", "ENCRYPTION", "STORAGE", "DISK", "MEMORY", "UNION", +} + +// Creates an 'alter table' statement. 'alter table' is an exception +// in that it has its own function. The majority of statements +// are created by 'createStmt()'. +func createAlterTableStmt(f *ConsumeFuzzer) (string, error) { + maxArgs, err := f.GetInt() + if err != nil { + return "", err + } + maxArgs = maxArgs % 30 + if maxArgs == 0 { + return "", fmt.Errorf("could not create alter table stmt") + } + + var stmt strings.Builder + stmt.WriteString("ALTER TABLE ") + for i := 0; i < maxArgs; i++ { + // Calculate if we get existing token or custom string + tokenType, err := f.GetInt() + if err != nil { + return "", err + } + if tokenType%4 == 1 { + customString, err := f.GetString() + if err != nil { + return "", err + } + stmt.WriteString(" " + customString) + } else { + tokenIndex, err := f.GetInt() + if err != nil { + return "", err + } + stmt.WriteString(" " + alter_table_options[tokenIndex%len(alter_table_options)]) + } + } + return stmt.String(), nil +} + +func chooseToken(tokens []string, f *ConsumeFuzzer) (string, error) { + index, err := f.GetInt() + if err != nil { + return "", err + } + var token strings.Builder + token.WriteString(tokens[index%len(tokens)]) + if token.String() == "CUSTOM_FUZZ_STRING" { + customFuzzString, err := f.GetString() + if err != nil { + return "", err + } + return customFuzzString, nil + } + + // Check if token requires an argument + if containsString(needCustomString, token.String()) { + customFuzzString, err := f.GetString() + if err != nil { + return "", err + } + token.WriteString(" " + customFuzzString) + } + return token.String(), nil +} + +var stmtTypes = map[string][][]string{ + "DELETE": deleteTokens, + "INSERT": insertTokens, + "SELECT": selectTokens, + "LOAD": loadTokens, + "REPLACE": replaceTokens, + "CREATE": createTokens, + "DROP": dropTokens, + "RENAME": renameTokens, + "TRUNCATE": truncateTokens, + "SET": setTokens, + "ALTER": alterTokens, + "ALTER TABLE": alterTableTokens, // ALTER TABLE has its own set of tokens +} + +var stmtTypeEnum = map[int]string{ + 0: "DELETE", + 1: "INSERT", + 2: "SELECT", + 3: "LOAD", + 4: "REPLACE", + 5: "CREATE", + 6: "DROP", + 7: "RENAME", + 8: "TRUNCATE", + 9: "SET", + 10: "ALTER", + 11: "ALTER TABLE", +} + +func createStmt(f *ConsumeFuzzer) (string, error) { + stmtIndex, err := f.GetInt() + if err != nil { + return "", err + } + stmtIndex = stmtIndex % len(stmtTypes) + + queryType := stmtTypeEnum[stmtIndex] + tokens := stmtTypes[queryType] + + // We have custom creator for ALTER TABLE + if queryType == "ALTER TABLE" { + query, err := createAlterTableStmt(f) + if err != nil { + return "", err + } + return query, nil + } + + // Here we are creating a query that is not + // an 'alter table' query. For available + // queries, see "stmtTypes" + + // First specify the first query keyword: + var query strings.Builder + query.WriteString(queryType) + + // Next create the args for the + queryArgs, err := createStmtArgs(tokens, f) + if err != nil { + return "", err + } + query.WriteString(" " + queryArgs) + return query.String(), nil +} + +// Creates the arguments of a statements. In a select statement +// that would be everything after "select". +func createStmtArgs(tokenslice [][]string, f *ConsumeFuzzer) (string, error) { + var query, token strings.Builder + + // We go through the tokens in the tokenslice, + // create the respective token and add it to + // "query" + for _, tokens := range tokenslice { + // For extra randomization, the fuzzer can + // choose to not include this token. + includeThisToken, err := f.GetBool() + if err != nil { + return "", err + } + if !includeThisToken { + continue + } + + // There may be several tokens to choose from: + if len(tokens) > 1 { + chosenToken, err := chooseToken(tokens, f) + if err != nil { + return "", err + } + query.WriteString(" " + chosenToken) + } else { + token.WriteString(tokens[0]) + + // In case the token is "CUSTOM_FUZZ_STRING" + // we will then create a non-structured string + if token.String() == "CUSTOM_FUZZ_STRING" { + customFuzzString, err := f.GetString() + if err != nil { + return "", err + } + query.WriteString(" " + customFuzzString) + continue + } + + // Check if token requires an argument. + // Tokens that take an argument can be found + // in 'needCustomString'. If so, we add a + // non-structured string to the token. + if containsString(needCustomString, token.String()) { + customFuzzString, err := f.GetString() + if err != nil { + return "", err + } + token.WriteString(fmt.Sprintf(" %s", customFuzzString)) + } + query.WriteString(fmt.Sprintf(" %s", token.String())) + } + } + return query.String(), nil +} + +// Creates a semi-structured query. It creates a string +// that is a combination of the keywords and random strings. +func createQuery(f *ConsumeFuzzer) (string, error) { + queryLen, err := f.GetInt() + if err != nil { + return "", err + } + maxLen := queryLen % 60 + if maxLen == 0 { + return "", fmt.Errorf("could not create a query") + } + var query strings.Builder + for i := 0; i < maxLen; i++ { + // Get a new token: + useKeyword, err := f.GetBool() + if err != nil { + return "", err + } + if useKeyword { + keyword, err := getKeyword(f) + if err != nil { + return "", err + } + query.WriteString(" " + keyword) + } else { + customString, err := f.GetString() + if err != nil { + return "", err + } + query.WriteString(" " + customString) + } + } + if query.String() == "" { + return "", fmt.Errorf("could not create a query") + } + return query.String(), nil +} + +// GetSQLString is the API that users interact with. +// +// Usage: +// +// f := NewConsumer(data) +// sqlString, err := f.GetSQLString() +func (f *ConsumeFuzzer) GetSQLString() (string, error) { + var query string + veryStructured, err := f.GetBool() + if err != nil { + return "", err + } + if veryStructured { + query, err = createStmt(f) + if err != nil { + return "", err + } + } else { + query, err = createQuery(f) + if err != nil { + return "", err + } + } + return query, nil +} diff --git a/vendor/github.com/BurntSushi/toml/.gitignore b/vendor/github.com/BurntSushi/toml/.gitignore new file mode 100644 index 000000000..fe79e3add --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.gitignore @@ -0,0 +1,2 @@ +/toml.test +/toml-test diff --git a/vendor/github.com/BurntSushi/toml/COPYING b/vendor/github.com/BurntSushi/toml/COPYING new file mode 100644 index 000000000..01b574320 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/COPYING @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 TOML authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md new file mode 100644 index 000000000..3651cfa96 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/README.md @@ -0,0 +1,120 @@ +TOML stands for Tom's Obvious, Minimal Language. This Go package provides a +reflection interface similar to Go's standard library `json` and `xml` packages. + +Compatible with TOML version [v1.0.0](https://toml.io/en/v1.0.0). + +Documentation: https://godocs.io/github.com/BurntSushi/toml + +See the [releases page](https://github.com/BurntSushi/toml/releases) for a +changelog; this information is also in the git tag annotations (e.g. `git show +v0.4.0`). + +This library requires Go 1.13 or newer; add it to your go.mod with: + + % go get github.com/BurntSushi/toml@latest + +It also comes with a TOML validator CLI tool: + + % go install github.com/BurntSushi/toml/cmd/tomlv@latest + % tomlv some-toml-file.toml + +### Examples +For the simplest example, consider some TOML file as just a list of keys and +values: + +```toml +Age = 25 +Cats = [ "Cauchy", "Plato" ] +Pi = 3.14 +Perfection = [ 6, 28, 496, 8128 ] +DOB = 1987-07-05T05:45:00Z +``` + +Which can be decoded with: + +```go +type Config struct { + Age int + Cats []string + Pi float64 + Perfection []int + DOB time.Time +} + +var conf Config +_, err := toml.Decode(tomlData, &conf) +``` + +You can also use struct tags if your struct field name doesn't map to a TOML key +value directly: + +```toml +some_key_NAME = "wat" +``` + +```go +type TOML struct { + ObscureKey string `toml:"some_key_NAME"` +} +``` + +Beware that like other decoders **only exported fields** are considered when +encoding and decoding; private fields are silently ignored. + +### Using the `Marshaler` and `encoding.TextUnmarshaler` interfaces +Here's an example that automatically parses values in a `mail.Address`: + +```toml +contacts = [ + "Donald Duck ", + "Scrooge McDuck ", +] +``` + +Can be decoded with: + +```go +// Create address type which satisfies the encoding.TextUnmarshaler interface. +type address struct { + *mail.Address +} + +func (a *address) UnmarshalText(text []byte) error { + var err error + a.Address, err = mail.ParseAddress(string(text)) + return err +} + +// Decode it. +func decode() { + blob := ` + contacts = [ + "Donald Duck ", + "Scrooge McDuck ", + ] + ` + + var contacts struct { + Contacts []address + } + + _, err := toml.Decode(blob, &contacts) + if err != nil { + log.Fatal(err) + } + + for _, c := range contacts.Contacts { + fmt.Printf("%#v\n", c.Address) + } + + // Output: + // &mail.Address{Name:"Donald Duck", Address:"donald@duckburg.com"} + // &mail.Address{Name:"Scrooge McDuck", Address:"scrooge@duckburg.com"} +} +``` + +To target TOML specifically you can implement `UnmarshalTOML` TOML interface in +a similar way. + +### More complex usage +See the [`_example/`](/_example) directory for a more complex example. diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go new file mode 100644 index 000000000..4d38f3bfc --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/decode.go @@ -0,0 +1,602 @@ +package toml + +import ( + "bytes" + "encoding" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "math" + "os" + "reflect" + "strconv" + "strings" + "time" +) + +// Unmarshaler is the interface implemented by objects that can unmarshal a +// TOML description of themselves. +type Unmarshaler interface { + UnmarshalTOML(interface{}) error +} + +// Unmarshal decodes the contents of data in TOML format into a pointer v. +// +// See [Decoder] for a description of the decoding process. +func Unmarshal(data []byte, v interface{}) error { + _, err := NewDecoder(bytes.NewReader(data)).Decode(v) + return err +} + +// Decode the TOML data in to the pointer v. +// +// See [Decoder] for a description of the decoding process. +func Decode(data string, v interface{}) (MetaData, error) { + return NewDecoder(strings.NewReader(data)).Decode(v) +} + +// DecodeFile reads the contents of a file and decodes it with [Decode]. +func DecodeFile(path string, v interface{}) (MetaData, error) { + fp, err := os.Open(path) + if err != nil { + return MetaData{}, err + } + defer fp.Close() + return NewDecoder(fp).Decode(v) +} + +// Primitive is a TOML value that hasn't been decoded into a Go value. +// +// This type can be used for any value, which will cause decoding to be delayed. +// You can use [PrimitiveDecode] to "manually" decode these values. +// +// NOTE: The underlying representation of a `Primitive` value is subject to +// change. Do not rely on it. +// +// NOTE: Primitive values are still parsed, so using them will only avoid the +// overhead of reflection. They can be useful when you don't know the exact type +// of TOML data until runtime. +type Primitive struct { + undecoded interface{} + context Key +} + +// The significand precision for float32 and float64 is 24 and 53 bits; this is +// the range a natural number can be stored in a float without loss of data. +const ( + maxSafeFloat32Int = 16777215 // 2^24-1 + maxSafeFloat64Int = int64(9007199254740991) // 2^53-1 +) + +// Decoder decodes TOML data. +// +// TOML tables correspond to Go structs or maps; they can be used +// interchangeably, but structs offer better type safety. +// +// TOML table arrays correspond to either a slice of structs or a slice of maps. +// +// TOML datetimes correspond to [time.Time]. Local datetimes are parsed in the +// local timezone. +// +// [time.Duration] types are treated as nanoseconds if the TOML value is an +// integer, or they're parsed with time.ParseDuration() if they're strings. +// +// All other TOML types (float, string, int, bool and array) correspond to the +// obvious Go types. +// +// An exception to the above rules is if a type implements the TextUnmarshaler +// interface, in which case any primitive TOML value (floats, strings, integers, +// booleans, datetimes) will be converted to a []byte and given to the value's +// UnmarshalText method. See the Unmarshaler example for a demonstration with +// email addresses. +// +// # Key mapping +// +// TOML keys can map to either keys in a Go map or field names in a Go struct. +// The special `toml` struct tag can be used to map TOML keys to struct fields +// that don't match the key name exactly (see the example). A case insensitive +// match to struct names will be tried if an exact match can't be found. +// +// The mapping between TOML values and Go values is loose. That is, there may +// exist TOML values that cannot be placed into your representation, and there +// may be parts of your representation that do not correspond to TOML values. +// This loose mapping can be made stricter by using the IsDefined and/or +// Undecoded methods on the MetaData returned. +// +// This decoder does not handle cyclic types. Decode will not terminate if a +// cyclic type is passed. +type Decoder struct { + r io.Reader +} + +// NewDecoder creates a new Decoder. +func NewDecoder(r io.Reader) *Decoder { + return &Decoder{r: r} +} + +var ( + unmarshalToml = reflect.TypeOf((*Unmarshaler)(nil)).Elem() + unmarshalText = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() + primitiveType = reflect.TypeOf((*Primitive)(nil)).Elem() +) + +// Decode TOML data in to the pointer `v`. +func (dec *Decoder) Decode(v interface{}) (MetaData, error) { + rv := reflect.ValueOf(v) + if rv.Kind() != reflect.Ptr { + s := "%q" + if reflect.TypeOf(v) == nil { + s = "%v" + } + + return MetaData{}, fmt.Errorf("toml: cannot decode to non-pointer "+s, reflect.TypeOf(v)) + } + if rv.IsNil() { + return MetaData{}, fmt.Errorf("toml: cannot decode to nil value of %q", reflect.TypeOf(v)) + } + + // Check if this is a supported type: struct, map, interface{}, or something + // that implements UnmarshalTOML or UnmarshalText. + rv = indirect(rv) + rt := rv.Type() + if rv.Kind() != reflect.Struct && rv.Kind() != reflect.Map && + !(rv.Kind() == reflect.Interface && rv.NumMethod() == 0) && + !rt.Implements(unmarshalToml) && !rt.Implements(unmarshalText) { + return MetaData{}, fmt.Errorf("toml: cannot decode to type %s", rt) + } + + // TODO: parser should read from io.Reader? Or at the very least, make it + // read from []byte rather than string + data, err := ioutil.ReadAll(dec.r) + if err != nil { + return MetaData{}, err + } + + p, err := parse(string(data)) + if err != nil { + return MetaData{}, err + } + + md := MetaData{ + mapping: p.mapping, + keyInfo: p.keyInfo, + keys: p.ordered, + decoded: make(map[string]struct{}, len(p.ordered)), + context: nil, + data: data, + } + return md, md.unify(p.mapping, rv) +} + +// PrimitiveDecode is just like the other Decode* functions, except it decodes a +// TOML value that has already been parsed. Valid primitive values can *only* be +// obtained from values filled by the decoder functions, including this method. +// (i.e., v may contain more [Primitive] values.) +// +// Meta data for primitive values is included in the meta data returned by the +// Decode* functions with one exception: keys returned by the Undecoded method +// will only reflect keys that were decoded. Namely, any keys hidden behind a +// Primitive will be considered undecoded. Executing this method will update the +// undecoded keys in the meta data. (See the example.) +func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error { + md.context = primValue.context + defer func() { md.context = nil }() + return md.unify(primValue.undecoded, rvalue(v)) +} + +// unify performs a sort of type unification based on the structure of `rv`, +// which is the client representation. +// +// Any type mismatch produces an error. Finding a type that we don't know +// how to handle produces an unsupported type error. +func (md *MetaData) unify(data interface{}, rv reflect.Value) error { + // Special case. Look for a `Primitive` value. + // TODO: #76 would make this superfluous after implemented. + if rv.Type() == primitiveType { + // Save the undecoded data and the key context into the primitive + // value. + context := make(Key, len(md.context)) + copy(context, md.context) + rv.Set(reflect.ValueOf(Primitive{ + undecoded: data, + context: context, + })) + return nil + } + + rvi := rv.Interface() + if v, ok := rvi.(Unmarshaler); ok { + return v.UnmarshalTOML(data) + } + if v, ok := rvi.(encoding.TextUnmarshaler); ok { + return md.unifyText(data, v) + } + + // TODO: + // The behavior here is incorrect whenever a Go type satisfies the + // encoding.TextUnmarshaler interface but also corresponds to a TOML hash or + // array. In particular, the unmarshaler should only be applied to primitive + // TOML values. But at this point, it will be applied to all kinds of values + // and produce an incorrect error whenever those values are hashes or arrays + // (including arrays of tables). + + k := rv.Kind() + + if k >= reflect.Int && k <= reflect.Uint64 { + return md.unifyInt(data, rv) + } + switch k { + case reflect.Ptr: + elem := reflect.New(rv.Type().Elem()) + err := md.unify(data, reflect.Indirect(elem)) + if err != nil { + return err + } + rv.Set(elem) + return nil + case reflect.Struct: + return md.unifyStruct(data, rv) + case reflect.Map: + return md.unifyMap(data, rv) + case reflect.Array: + return md.unifyArray(data, rv) + case reflect.Slice: + return md.unifySlice(data, rv) + case reflect.String: + return md.unifyString(data, rv) + case reflect.Bool: + return md.unifyBool(data, rv) + case reflect.Interface: + if rv.NumMethod() > 0 { /// Only empty interfaces are supported. + return md.e("unsupported type %s", rv.Type()) + } + return md.unifyAnything(data, rv) + case reflect.Float32, reflect.Float64: + return md.unifyFloat64(data, rv) + } + return md.e("unsupported type %s", rv.Kind()) +} + +func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error { + tmap, ok := mapping.(map[string]interface{}) + if !ok { + if mapping == nil { + return nil + } + return md.e("type mismatch for %s: expected table but found %T", + rv.Type().String(), mapping) + } + + for key, datum := range tmap { + var f *field + fields := cachedTypeFields(rv.Type()) + for i := range fields { + ff := &fields[i] + if ff.name == key { + f = ff + break + } + if f == nil && strings.EqualFold(ff.name, key) { + f = ff + } + } + if f != nil { + subv := rv + for _, i := range f.index { + subv = indirect(subv.Field(i)) + } + + if isUnifiable(subv) { + md.decoded[md.context.add(key).String()] = struct{}{} + md.context = append(md.context, key) + + err := md.unify(datum, subv) + if err != nil { + return err + } + md.context = md.context[0 : len(md.context)-1] + } else if f.name != "" { + return md.e("cannot write unexported field %s.%s", rv.Type().String(), f.name) + } + } + } + return nil +} + +func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error { + keyType := rv.Type().Key().Kind() + if keyType != reflect.String && keyType != reflect.Interface { + return fmt.Errorf("toml: cannot decode to a map with non-string key type (%s in %q)", + keyType, rv.Type()) + } + + tmap, ok := mapping.(map[string]interface{}) + if !ok { + if tmap == nil { + return nil + } + return md.badtype("map", mapping) + } + if rv.IsNil() { + rv.Set(reflect.MakeMap(rv.Type())) + } + for k, v := range tmap { + md.decoded[md.context.add(k).String()] = struct{}{} + md.context = append(md.context, k) + + rvval := reflect.Indirect(reflect.New(rv.Type().Elem())) + + err := md.unify(v, indirect(rvval)) + if err != nil { + return err + } + md.context = md.context[0 : len(md.context)-1] + + rvkey := indirect(reflect.New(rv.Type().Key())) + + switch keyType { + case reflect.Interface: + rvkey.Set(reflect.ValueOf(k)) + case reflect.String: + rvkey.SetString(k) + } + + rv.SetMapIndex(rvkey, rvval) + } + return nil +} + +func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error { + datav := reflect.ValueOf(data) + if datav.Kind() != reflect.Slice { + if !datav.IsValid() { + return nil + } + return md.badtype("slice", data) + } + if l := datav.Len(); l != rv.Len() { + return md.e("expected array length %d; got TOML array of length %d", rv.Len(), l) + } + return md.unifySliceArray(datav, rv) +} + +func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error { + datav := reflect.ValueOf(data) + if datav.Kind() != reflect.Slice { + if !datav.IsValid() { + return nil + } + return md.badtype("slice", data) + } + n := datav.Len() + if rv.IsNil() || rv.Cap() < n { + rv.Set(reflect.MakeSlice(rv.Type(), n, n)) + } + rv.SetLen(n) + return md.unifySliceArray(datav, rv) +} + +func (md *MetaData) unifySliceArray(data, rv reflect.Value) error { + l := data.Len() + for i := 0; i < l; i++ { + err := md.unify(data.Index(i).Interface(), indirect(rv.Index(i))) + if err != nil { + return err + } + } + return nil +} + +func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error { + _, ok := rv.Interface().(json.Number) + if ok { + if i, ok := data.(int64); ok { + rv.SetString(strconv.FormatInt(i, 10)) + } else if f, ok := data.(float64); ok { + rv.SetString(strconv.FormatFloat(f, 'f', -1, 64)) + } else { + return md.badtype("string", data) + } + return nil + } + + if s, ok := data.(string); ok { + rv.SetString(s) + return nil + } + return md.badtype("string", data) +} + +func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error { + rvk := rv.Kind() + + if num, ok := data.(float64); ok { + switch rvk { + case reflect.Float32: + if num < -math.MaxFloat32 || num > math.MaxFloat32 { + return md.parseErr(errParseRange{i: num, size: rvk.String()}) + } + fallthrough + case reflect.Float64: + rv.SetFloat(num) + default: + panic("bug") + } + return nil + } + + if num, ok := data.(int64); ok { + if (rvk == reflect.Float32 && (num < -maxSafeFloat32Int || num > maxSafeFloat32Int)) || + (rvk == reflect.Float64 && (num < -maxSafeFloat64Int || num > maxSafeFloat64Int)) { + return md.parseErr(errParseRange{i: num, size: rvk.String()}) + } + rv.SetFloat(float64(num)) + return nil + } + + return md.badtype("float", data) +} + +func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error { + _, ok := rv.Interface().(time.Duration) + if ok { + // Parse as string duration, and fall back to regular integer parsing + // (as nanosecond) if this is not a string. + if s, ok := data.(string); ok { + dur, err := time.ParseDuration(s) + if err != nil { + return md.parseErr(errParseDuration{s}) + } + rv.SetInt(int64(dur)) + return nil + } + } + + num, ok := data.(int64) + if !ok { + return md.badtype("integer", data) + } + + rvk := rv.Kind() + switch { + case rvk >= reflect.Int && rvk <= reflect.Int64: + if (rvk == reflect.Int8 && (num < math.MinInt8 || num > math.MaxInt8)) || + (rvk == reflect.Int16 && (num < math.MinInt16 || num > math.MaxInt16)) || + (rvk == reflect.Int32 && (num < math.MinInt32 || num > math.MaxInt32)) { + return md.parseErr(errParseRange{i: num, size: rvk.String()}) + } + rv.SetInt(num) + case rvk >= reflect.Uint && rvk <= reflect.Uint64: + unum := uint64(num) + if rvk == reflect.Uint8 && (num < 0 || unum > math.MaxUint8) || + rvk == reflect.Uint16 && (num < 0 || unum > math.MaxUint16) || + rvk == reflect.Uint32 && (num < 0 || unum > math.MaxUint32) { + return md.parseErr(errParseRange{i: num, size: rvk.String()}) + } + rv.SetUint(unum) + default: + panic("unreachable") + } + return nil +} + +func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error { + if b, ok := data.(bool); ok { + rv.SetBool(b) + return nil + } + return md.badtype("boolean", data) +} + +func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error { + rv.Set(reflect.ValueOf(data)) + return nil +} + +func (md *MetaData) unifyText(data interface{}, v encoding.TextUnmarshaler) error { + var s string + switch sdata := data.(type) { + case Marshaler: + text, err := sdata.MarshalTOML() + if err != nil { + return err + } + s = string(text) + case encoding.TextMarshaler: + text, err := sdata.MarshalText() + if err != nil { + return err + } + s = string(text) + case fmt.Stringer: + s = sdata.String() + case string: + s = sdata + case bool: + s = fmt.Sprintf("%v", sdata) + case int64: + s = fmt.Sprintf("%d", sdata) + case float64: + s = fmt.Sprintf("%f", sdata) + default: + return md.badtype("primitive (string-like)", data) + } + if err := v.UnmarshalText([]byte(s)); err != nil { + return err + } + return nil +} + +func (md *MetaData) badtype(dst string, data interface{}) error { + return md.e("incompatible types: TOML value has type %T; destination has type %s", data, dst) +} + +func (md *MetaData) parseErr(err error) error { + k := md.context.String() + return ParseError{ + LastKey: k, + Position: md.keyInfo[k].pos, + Line: md.keyInfo[k].pos.Line, + err: err, + input: string(md.data), + } +} + +func (md *MetaData) e(format string, args ...interface{}) error { + f := "toml: " + if len(md.context) > 0 { + f = fmt.Sprintf("toml: (last key %q): ", md.context) + p := md.keyInfo[md.context.String()].pos + if p.Line > 0 { + f = fmt.Sprintf("toml: line %d (last key %q): ", p.Line, md.context) + } + } + return fmt.Errorf(f+format, args...) +} + +// rvalue returns a reflect.Value of `v`. All pointers are resolved. +func rvalue(v interface{}) reflect.Value { + return indirect(reflect.ValueOf(v)) +} + +// indirect returns the value pointed to by a pointer. +// +// Pointers are followed until the value is not a pointer. New values are +// allocated for each nil pointer. +// +// An exception to this rule is if the value satisfies an interface of interest +// to us (like encoding.TextUnmarshaler). +func indirect(v reflect.Value) reflect.Value { + if v.Kind() != reflect.Ptr { + if v.CanSet() { + pv := v.Addr() + pvi := pv.Interface() + if _, ok := pvi.(encoding.TextUnmarshaler); ok { + return pv + } + if _, ok := pvi.(Unmarshaler); ok { + return pv + } + } + return v + } + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + return indirect(reflect.Indirect(v)) +} + +func isUnifiable(rv reflect.Value) bool { + if rv.CanSet() { + return true + } + rvi := rv.Interface() + if _, ok := rvi.(encoding.TextUnmarshaler); ok { + return true + } + if _, ok := rvi.(Unmarshaler); ok { + return true + } + return false +} diff --git a/vendor/github.com/BurntSushi/toml/decode_go116.go b/vendor/github.com/BurntSushi/toml/decode_go116.go new file mode 100644 index 000000000..086d0b686 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/decode_go116.go @@ -0,0 +1,19 @@ +//go:build go1.16 +// +build go1.16 + +package toml + +import ( + "io/fs" +) + +// DecodeFS reads the contents of a file from [fs.FS] and decodes it with +// [Decode]. +func DecodeFS(fsys fs.FS, path string, v interface{}) (MetaData, error) { + fp, err := fsys.Open(path) + if err != nil { + return MetaData{}, err + } + defer fp.Close() + return NewDecoder(fp).Decode(v) +} diff --git a/vendor/github.com/BurntSushi/toml/deprecated.go b/vendor/github.com/BurntSushi/toml/deprecated.go new file mode 100644 index 000000000..b9e309717 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/deprecated.go @@ -0,0 +1,29 @@ +package toml + +import ( + "encoding" + "io" +) + +// TextMarshaler is an alias for encoding.TextMarshaler. +// +// Deprecated: use encoding.TextMarshaler +type TextMarshaler encoding.TextMarshaler + +// TextUnmarshaler is an alias for encoding.TextUnmarshaler. +// +// Deprecated: use encoding.TextUnmarshaler +type TextUnmarshaler encoding.TextUnmarshaler + +// PrimitiveDecode is an alias for MetaData.PrimitiveDecode(). +// +// Deprecated: use MetaData.PrimitiveDecode. +func PrimitiveDecode(primValue Primitive, v interface{}) error { + md := MetaData{decoded: make(map[string]struct{})} + return md.unify(primValue.undecoded, rvalue(v)) +} + +// DecodeReader is an alias for NewDecoder(r).Decode(v). +// +// Deprecated: use NewDecoder(reader).Decode(&value). +func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) } diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go new file mode 100644 index 000000000..81a7c0fe9 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/doc.go @@ -0,0 +1,11 @@ +// Package toml implements decoding and encoding of TOML files. +// +// This package supports TOML v1.0.0, as specified at https://toml.io +// +// There is also support for delaying decoding with the Primitive type, and +// querying the set of keys in a TOML document with the MetaData type. +// +// The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator, +// and can be used to verify if TOML document is valid. It can also be used to +// print the type of each key. +package toml diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go new file mode 100644 index 000000000..9cd25d757 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/encode.go @@ -0,0 +1,759 @@ +package toml + +import ( + "bufio" + "encoding" + "encoding/json" + "errors" + "fmt" + "io" + "math" + "reflect" + "sort" + "strconv" + "strings" + "time" + + "github.com/BurntSushi/toml/internal" +) + +type tomlEncodeError struct{ error } + +var ( + errArrayNilElement = errors.New("toml: cannot encode array with nil element") + errNonString = errors.New("toml: cannot encode a map with non-string key type") + errNoKey = errors.New("toml: top-level values must be Go maps or structs") + errAnything = errors.New("") // used in testing +) + +var dblQuotedReplacer = strings.NewReplacer( + "\"", "\\\"", + "\\", "\\\\", + "\x00", `\u0000`, + "\x01", `\u0001`, + "\x02", `\u0002`, + "\x03", `\u0003`, + "\x04", `\u0004`, + "\x05", `\u0005`, + "\x06", `\u0006`, + "\x07", `\u0007`, + "\b", `\b`, + "\t", `\t`, + "\n", `\n`, + "\x0b", `\u000b`, + "\f", `\f`, + "\r", `\r`, + "\x0e", `\u000e`, + "\x0f", `\u000f`, + "\x10", `\u0010`, + "\x11", `\u0011`, + "\x12", `\u0012`, + "\x13", `\u0013`, + "\x14", `\u0014`, + "\x15", `\u0015`, + "\x16", `\u0016`, + "\x17", `\u0017`, + "\x18", `\u0018`, + "\x19", `\u0019`, + "\x1a", `\u001a`, + "\x1b", `\u001b`, + "\x1c", `\u001c`, + "\x1d", `\u001d`, + "\x1e", `\u001e`, + "\x1f", `\u001f`, + "\x7f", `\u007f`, +) + +var ( + marshalToml = reflect.TypeOf((*Marshaler)(nil)).Elem() + marshalText = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + timeType = reflect.TypeOf((*time.Time)(nil)).Elem() +) + +// Marshaler is the interface implemented by types that can marshal themselves +// into valid TOML. +type Marshaler interface { + MarshalTOML() ([]byte, error) +} + +// Encoder encodes a Go to a TOML document. +// +// The mapping between Go values and TOML values should be precisely the same as +// for [Decode]. +// +// time.Time is encoded as a RFC 3339 string, and time.Duration as its string +// representation. +// +// The [Marshaler] and [encoding.TextMarshaler] interfaces are supported to +// encoding the value as custom TOML. +// +// If you want to write arbitrary binary data then you will need to use +// something like base64 since TOML does not have any binary types. +// +// When encoding TOML hashes (Go maps or structs), keys without any sub-hashes +// are encoded first. +// +// Go maps will be sorted alphabetically by key for deterministic output. +// +// The toml struct tag can be used to provide the key name; if omitted the +// struct field name will be used. If the "omitempty" option is present the +// following value will be skipped: +// +// - arrays, slices, maps, and string with len of 0 +// - struct with all zero values +// - bool false +// +// If omitzero is given all int and float types with a value of 0 will be +// skipped. +// +// Encoding Go values without a corresponding TOML representation will return an +// error. Examples of this includes maps with non-string keys, slices with nil +// elements, embedded non-struct types, and nested slices containing maps or +// structs. (e.g. [][]map[string]string is not allowed but []map[string]string +// is okay, as is []map[string][]string). +// +// NOTE: only exported keys are encoded due to the use of reflection. Unexported +// keys are silently discarded. +type Encoder struct { + // String to use for a single indentation level; default is two spaces. + Indent string + + w *bufio.Writer + hasWritten bool // written any output to w yet? +} + +// NewEncoder create a new Encoder. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{ + w: bufio.NewWriter(w), + Indent: " ", + } +} + +// Encode writes a TOML representation of the Go value to the [Encoder]'s writer. +// +// An error is returned if the value given cannot be encoded to a valid TOML +// document. +func (enc *Encoder) Encode(v interface{}) error { + rv := eindirect(reflect.ValueOf(v)) + err := enc.safeEncode(Key([]string{}), rv) + if err != nil { + return err + } + return enc.w.Flush() +} + +func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) { + defer func() { + if r := recover(); r != nil { + if terr, ok := r.(tomlEncodeError); ok { + err = terr.error + return + } + panic(r) + } + }() + enc.encode(key, rv) + return nil +} + +func (enc *Encoder) encode(key Key, rv reflect.Value) { + // If we can marshal the type to text, then we use that. This prevents the + // encoder for handling these types as generic structs (or whatever the + // underlying type of a TextMarshaler is). + switch { + case isMarshaler(rv): + enc.writeKeyValue(key, rv, false) + return + case rv.Type() == primitiveType: // TODO: #76 would make this superfluous after implemented. + enc.encode(key, reflect.ValueOf(rv.Interface().(Primitive).undecoded)) + return + } + + k := rv.Kind() + switch k { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, + reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, + reflect.Uint64, + reflect.Float32, reflect.Float64, reflect.String, reflect.Bool: + enc.writeKeyValue(key, rv, false) + case reflect.Array, reflect.Slice: + if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) { + enc.eArrayOfTables(key, rv) + } else { + enc.writeKeyValue(key, rv, false) + } + case reflect.Interface: + if rv.IsNil() { + return + } + enc.encode(key, rv.Elem()) + case reflect.Map: + if rv.IsNil() { + return + } + enc.eTable(key, rv) + case reflect.Ptr: + if rv.IsNil() { + return + } + enc.encode(key, rv.Elem()) + case reflect.Struct: + enc.eTable(key, rv) + default: + encPanic(fmt.Errorf("unsupported type for key '%s': %s", key, k)) + } +} + +// eElement encodes any value that can be an array element. +func (enc *Encoder) eElement(rv reflect.Value) { + switch v := rv.Interface().(type) { + case time.Time: // Using TextMarshaler adds extra quotes, which we don't want. + format := time.RFC3339Nano + switch v.Location() { + case internal.LocalDatetime: + format = "2006-01-02T15:04:05.999999999" + case internal.LocalDate: + format = "2006-01-02" + case internal.LocalTime: + format = "15:04:05.999999999" + } + switch v.Location() { + default: + enc.wf(v.Format(format)) + case internal.LocalDatetime, internal.LocalDate, internal.LocalTime: + enc.wf(v.In(time.UTC).Format(format)) + } + return + case Marshaler: + s, err := v.MarshalTOML() + if err != nil { + encPanic(err) + } + if s == nil { + encPanic(errors.New("MarshalTOML returned nil and no error")) + } + enc.w.Write(s) + return + case encoding.TextMarshaler: + s, err := v.MarshalText() + if err != nil { + encPanic(err) + } + if s == nil { + encPanic(errors.New("MarshalText returned nil and no error")) + } + enc.writeQuoted(string(s)) + return + case time.Duration: + enc.writeQuoted(v.String()) + return + case json.Number: + n, _ := rv.Interface().(json.Number) + + if n == "" { /// Useful zero value. + enc.w.WriteByte('0') + return + } else if v, err := n.Int64(); err == nil { + enc.eElement(reflect.ValueOf(v)) + return + } else if v, err := n.Float64(); err == nil { + enc.eElement(reflect.ValueOf(v)) + return + } + encPanic(fmt.Errorf("unable to convert %q to int64 or float64", n)) + } + + switch rv.Kind() { + case reflect.Ptr: + enc.eElement(rv.Elem()) + return + case reflect.String: + enc.writeQuoted(rv.String()) + case reflect.Bool: + enc.wf(strconv.FormatBool(rv.Bool())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + enc.wf(strconv.FormatInt(rv.Int(), 10)) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + enc.wf(strconv.FormatUint(rv.Uint(), 10)) + case reflect.Float32: + f := rv.Float() + if math.IsNaN(f) { + enc.wf("nan") + } else if math.IsInf(f, 0) { + enc.wf("%cinf", map[bool]byte{true: '-', false: '+'}[math.Signbit(f)]) + } else { + enc.wf(floatAddDecimal(strconv.FormatFloat(f, 'f', -1, 32))) + } + case reflect.Float64: + f := rv.Float() + if math.IsNaN(f) { + enc.wf("nan") + } else if math.IsInf(f, 0) { + enc.wf("%cinf", map[bool]byte{true: '-', false: '+'}[math.Signbit(f)]) + } else { + enc.wf(floatAddDecimal(strconv.FormatFloat(f, 'f', -1, 64))) + } + case reflect.Array, reflect.Slice: + enc.eArrayOrSliceElement(rv) + case reflect.Struct: + enc.eStruct(nil, rv, true) + case reflect.Map: + enc.eMap(nil, rv, true) + case reflect.Interface: + enc.eElement(rv.Elem()) + default: + encPanic(fmt.Errorf("unexpected type: %T", rv.Interface())) + } +} + +// By the TOML spec, all floats must have a decimal with at least one number on +// either side. +func floatAddDecimal(fstr string) string { + if !strings.Contains(fstr, ".") { + return fstr + ".0" + } + return fstr +} + +func (enc *Encoder) writeQuoted(s string) { + enc.wf("\"%s\"", dblQuotedReplacer.Replace(s)) +} + +func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) { + length := rv.Len() + enc.wf("[") + for i := 0; i < length; i++ { + elem := eindirect(rv.Index(i)) + enc.eElement(elem) + if i != length-1 { + enc.wf(", ") + } + } + enc.wf("]") +} + +func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { + if len(key) == 0 { + encPanic(errNoKey) + } + for i := 0; i < rv.Len(); i++ { + trv := eindirect(rv.Index(i)) + if isNil(trv) { + continue + } + enc.newline() + enc.wf("%s[[%s]]", enc.indentStr(key), key) + enc.newline() + enc.eMapOrStruct(key, trv, false) + } +} + +func (enc *Encoder) eTable(key Key, rv reflect.Value) { + if len(key) == 1 { + // Output an extra newline between top-level tables. + // (The newline isn't written if nothing else has been written though.) + enc.newline() + } + if len(key) > 0 { + enc.wf("%s[%s]", enc.indentStr(key), key) + enc.newline() + } + enc.eMapOrStruct(key, rv, false) +} + +func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value, inline bool) { + switch rv.Kind() { + case reflect.Map: + enc.eMap(key, rv, inline) + case reflect.Struct: + enc.eStruct(key, rv, inline) + default: + // Should never happen? + panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String()) + } +} + +func (enc *Encoder) eMap(key Key, rv reflect.Value, inline bool) { + rt := rv.Type() + if rt.Key().Kind() != reflect.String { + encPanic(errNonString) + } + + // Sort keys so that we have deterministic output. And write keys directly + // underneath this key first, before writing sub-structs or sub-maps. + var mapKeysDirect, mapKeysSub []string + for _, mapKey := range rv.MapKeys() { + k := mapKey.String() + if typeIsTable(tomlTypeOfGo(eindirect(rv.MapIndex(mapKey)))) { + mapKeysSub = append(mapKeysSub, k) + } else { + mapKeysDirect = append(mapKeysDirect, k) + } + } + + var writeMapKeys = func(mapKeys []string, trailC bool) { + sort.Strings(mapKeys) + for i, mapKey := range mapKeys { + val := eindirect(rv.MapIndex(reflect.ValueOf(mapKey))) + if isNil(val) { + continue + } + + if inline { + enc.writeKeyValue(Key{mapKey}, val, true) + if trailC || i != len(mapKeys)-1 { + enc.wf(", ") + } + } else { + enc.encode(key.add(mapKey), val) + } + } + } + + if inline { + enc.wf("{") + } + writeMapKeys(mapKeysDirect, len(mapKeysSub) > 0) + writeMapKeys(mapKeysSub, false) + if inline { + enc.wf("}") + } +} + +const is32Bit = (32 << (^uint(0) >> 63)) == 32 + +func pointerTo(t reflect.Type) reflect.Type { + if t.Kind() == reflect.Ptr { + return pointerTo(t.Elem()) + } + return t +} + +func (enc *Encoder) eStruct(key Key, rv reflect.Value, inline bool) { + // Write keys for fields directly under this key first, because if we write + // a field that creates a new table then all keys under it will be in that + // table (not the one we're writing here). + // + // Fields is a [][]int: for fieldsDirect this always has one entry (the + // struct index). For fieldsSub it contains two entries: the parent field + // index from tv, and the field indexes for the fields of the sub. + var ( + rt = rv.Type() + fieldsDirect, fieldsSub [][]int + addFields func(rt reflect.Type, rv reflect.Value, start []int) + ) + addFields = func(rt reflect.Type, rv reflect.Value, start []int) { + for i := 0; i < rt.NumField(); i++ { + f := rt.Field(i) + isEmbed := f.Anonymous && pointerTo(f.Type).Kind() == reflect.Struct + if f.PkgPath != "" && !isEmbed { /// Skip unexported fields. + continue + } + opts := getOptions(f.Tag) + if opts.skip { + continue + } + + frv := eindirect(rv.Field(i)) + + if is32Bit { + // Copy so it works correct on 32bit archs; not clear why this + // is needed. See #314, and https://www.reddit.com/r/golang/comments/pnx8v4 + // This also works fine on 64bit, but 32bit archs are somewhat + // rare and this is a wee bit faster. + copyStart := make([]int, len(start)) + copy(copyStart, start) + start = copyStart + } + + // Treat anonymous struct fields with tag names as though they are + // not anonymous, like encoding/json does. + // + // Non-struct anonymous fields use the normal encoding logic. + if isEmbed { + if getOptions(f.Tag).name == "" && frv.Kind() == reflect.Struct { + addFields(frv.Type(), frv, append(start, f.Index...)) + continue + } + } + + if typeIsTable(tomlTypeOfGo(frv)) { + fieldsSub = append(fieldsSub, append(start, f.Index...)) + } else { + fieldsDirect = append(fieldsDirect, append(start, f.Index...)) + } + } + } + addFields(rt, rv, nil) + + writeFields := func(fields [][]int) { + for _, fieldIndex := range fields { + fieldType := rt.FieldByIndex(fieldIndex) + fieldVal := rv.FieldByIndex(fieldIndex) + + opts := getOptions(fieldType.Tag) + if opts.skip { + continue + } + if opts.omitempty && isEmpty(fieldVal) { + continue + } + + fieldVal = eindirect(fieldVal) + + if isNil(fieldVal) { /// Don't write anything for nil fields. + continue + } + + keyName := fieldType.Name + if opts.name != "" { + keyName = opts.name + } + + if opts.omitzero && isZero(fieldVal) { + continue + } + + if inline { + enc.writeKeyValue(Key{keyName}, fieldVal, true) + if fieldIndex[0] != len(fields)-1 { + enc.wf(", ") + } + } else { + enc.encode(key.add(keyName), fieldVal) + } + } + } + + if inline { + enc.wf("{") + } + writeFields(fieldsDirect) + writeFields(fieldsSub) + if inline { + enc.wf("}") + } +} + +// tomlTypeOfGo returns the TOML type name of the Go value's type. +// +// It is used to determine whether the types of array elements are mixed (which +// is forbidden). If the Go value is nil, then it is illegal for it to be an +// array element, and valueIsNil is returned as true. +// +// The type may be `nil`, which means no concrete TOML type could be found. +func tomlTypeOfGo(rv reflect.Value) tomlType { + if isNil(rv) || !rv.IsValid() { + return nil + } + + if rv.Kind() == reflect.Struct { + if rv.Type() == timeType { + return tomlDatetime + } + if isMarshaler(rv) { + return tomlString + } + return tomlHash + } + + if isMarshaler(rv) { + return tomlString + } + + switch rv.Kind() { + case reflect.Bool: + return tomlBool + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, + reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, + reflect.Uint64: + return tomlInteger + case reflect.Float32, reflect.Float64: + return tomlFloat + case reflect.Array, reflect.Slice: + if isTableArray(rv) { + return tomlArrayHash + } + return tomlArray + case reflect.Ptr, reflect.Interface: + return tomlTypeOfGo(rv.Elem()) + case reflect.String: + return tomlString + case reflect.Map: + return tomlHash + default: + encPanic(errors.New("unsupported type: " + rv.Kind().String())) + panic("unreachable") + } +} + +func isMarshaler(rv reflect.Value) bool { + return rv.Type().Implements(marshalText) || rv.Type().Implements(marshalToml) +} + +// isTableArray reports if all entries in the array or slice are a table. +func isTableArray(arr reflect.Value) bool { + if isNil(arr) || !arr.IsValid() || arr.Len() == 0 { + return false + } + + ret := true + for i := 0; i < arr.Len(); i++ { + tt := tomlTypeOfGo(eindirect(arr.Index(i))) + // Don't allow nil. + if tt == nil { + encPanic(errArrayNilElement) + } + + if ret && !typeEqual(tomlHash, tt) { + ret = false + } + } + return ret +} + +type tagOptions struct { + skip bool // "-" + name string + omitempty bool + omitzero bool +} + +func getOptions(tag reflect.StructTag) tagOptions { + t := tag.Get("toml") + if t == "-" { + return tagOptions{skip: true} + } + var opts tagOptions + parts := strings.Split(t, ",") + opts.name = parts[0] + for _, s := range parts[1:] { + switch s { + case "omitempty": + opts.omitempty = true + case "omitzero": + opts.omitzero = true + } + } + return opts +} + +func isZero(rv reflect.Value) bool { + switch rv.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return rv.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return rv.Uint() == 0 + case reflect.Float32, reflect.Float64: + return rv.Float() == 0.0 + } + return false +} + +func isEmpty(rv reflect.Value) bool { + switch rv.Kind() { + case reflect.Array, reflect.Slice, reflect.Map, reflect.String: + return rv.Len() == 0 + case reflect.Struct: + if rv.Type().Comparable() { + return reflect.Zero(rv.Type()).Interface() == rv.Interface() + } + // Need to also check if all the fields are empty, otherwise something + // like this with uncomparable types will always return true: + // + // type a struct{ field b } + // type b struct{ s []string } + // s := a{field: b{s: []string{"AAA"}}} + for i := 0; i < rv.NumField(); i++ { + if !isEmpty(rv.Field(i)) { + return false + } + } + return true + case reflect.Bool: + return !rv.Bool() + case reflect.Ptr: + return rv.IsNil() + } + return false +} + +func (enc *Encoder) newline() { + if enc.hasWritten { + enc.wf("\n") + } +} + +// Write a key/value pair: +// +// key = +// +// This is also used for "k = v" in inline tables; so something like this will +// be written in three calls: +// +// ┌───────────────────┐ +// │ ┌───┐ ┌────┐│ +// v v v v vv +// key = {k = 1, k2 = 2} +func (enc *Encoder) writeKeyValue(key Key, val reflect.Value, inline bool) { + /// Marshaler used on top-level document; call eElement() to just call + /// Marshal{TOML,Text}. + if len(key) == 0 { + enc.eElement(val) + return + } + enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) + enc.eElement(val) + if !inline { + enc.newline() + } +} + +func (enc *Encoder) wf(format string, v ...interface{}) { + _, err := fmt.Fprintf(enc.w, format, v...) + if err != nil { + encPanic(err) + } + enc.hasWritten = true +} + +func (enc *Encoder) indentStr(key Key) string { + return strings.Repeat(enc.Indent, len(key)-1) +} + +func encPanic(err error) { + panic(tomlEncodeError{err}) +} + +// Resolve any level of pointers to the actual value (e.g. **string → string). +func eindirect(v reflect.Value) reflect.Value { + if v.Kind() != reflect.Ptr && v.Kind() != reflect.Interface { + if isMarshaler(v) { + return v + } + if v.CanAddr() { /// Special case for marshalers; see #358. + if pv := v.Addr(); isMarshaler(pv) { + return pv + } + } + return v + } + + if v.IsNil() { + return v + } + + return eindirect(v.Elem()) +} + +func isNil(rv reflect.Value) bool { + switch rv.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return rv.IsNil() + default: + return false + } +} diff --git a/vendor/github.com/BurntSushi/toml/error.go b/vendor/github.com/BurntSushi/toml/error.go new file mode 100644 index 000000000..efd68865b --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/error.go @@ -0,0 +1,279 @@ +package toml + +import ( + "fmt" + "strings" +) + +// ParseError is returned when there is an error parsing the TOML syntax such as +// invalid syntax, duplicate keys, etc. +// +// In addition to the error message itself, you can also print detailed location +// information with context by using [ErrorWithPosition]: +// +// toml: error: Key 'fruit' was already created and cannot be used as an array. +// +// At line 4, column 2-7: +// +// 2 | fruit = [] +// 3 | +// 4 | [[fruit]] # Not allowed +// ^^^^^ +// +// [ErrorWithUsage] can be used to print the above with some more detailed usage +// guidance: +// +// toml: error: newlines not allowed within inline tables +// +// At line 1, column 18: +// +// 1 | x = [{ key = 42 # +// ^ +// +// Error help: +// +// Inline tables must always be on a single line: +// +// table = {key = 42, second = 43} +// +// It is invalid to split them over multiple lines like so: +// +// # INVALID +// table = { +// key = 42, +// second = 43 +// } +// +// Use regular for this: +// +// [table] +// key = 42 +// second = 43 +type ParseError struct { + Message string // Short technical message. + Usage string // Longer message with usage guidance; may be blank. + Position Position // Position of the error + LastKey string // Last parsed key, may be blank. + + // Line the error occurred. + // + // Deprecated: use [Position]. + Line int + + err error + input string +} + +// Position of an error. +type Position struct { + Line int // Line number, starting at 1. + Start int // Start of error, as byte offset starting at 0. + Len int // Lenght in bytes. +} + +func (pe ParseError) Error() string { + msg := pe.Message + if msg == "" { // Error from errorf() + msg = pe.err.Error() + } + + if pe.LastKey == "" { + return fmt.Sprintf("toml: line %d: %s", pe.Position.Line, msg) + } + return fmt.Sprintf("toml: line %d (last key %q): %s", + pe.Position.Line, pe.LastKey, msg) +} + +// ErrorWithPosition returns the error with detailed location context. +// +// See the documentation on [ParseError]. +func (pe ParseError) ErrorWithPosition() string { + if pe.input == "" { // Should never happen, but just in case. + return pe.Error() + } + + var ( + lines = strings.Split(pe.input, "\n") + col = pe.column(lines) + b = new(strings.Builder) + ) + + msg := pe.Message + if msg == "" { + msg = pe.err.Error() + } + + // TODO: don't show control characters as literals? This may not show up + // well everywhere. + + if pe.Position.Len == 1 { + fmt.Fprintf(b, "toml: error: %s\n\nAt line %d, column %d:\n\n", + msg, pe.Position.Line, col+1) + } else { + fmt.Fprintf(b, "toml: error: %s\n\nAt line %d, column %d-%d:\n\n", + msg, pe.Position.Line, col, col+pe.Position.Len) + } + if pe.Position.Line > 2 { + fmt.Fprintf(b, "% 7d | %s\n", pe.Position.Line-2, lines[pe.Position.Line-3]) + } + if pe.Position.Line > 1 { + fmt.Fprintf(b, "% 7d | %s\n", pe.Position.Line-1, lines[pe.Position.Line-2]) + } + fmt.Fprintf(b, "% 7d | %s\n", pe.Position.Line, lines[pe.Position.Line-1]) + fmt.Fprintf(b, "% 10s%s%s\n", "", strings.Repeat(" ", col), strings.Repeat("^", pe.Position.Len)) + return b.String() +} + +// ErrorWithUsage returns the error with detailed location context and usage +// guidance. +// +// See the documentation on [ParseError]. +func (pe ParseError) ErrorWithUsage() string { + m := pe.ErrorWithPosition() + if u, ok := pe.err.(interface{ Usage() string }); ok && u.Usage() != "" { + lines := strings.Split(strings.TrimSpace(u.Usage()), "\n") + for i := range lines { + if lines[i] != "" { + lines[i] = " " + lines[i] + } + } + return m + "Error help:\n\n" + strings.Join(lines, "\n") + "\n" + } + return m +} + +func (pe ParseError) column(lines []string) int { + var pos, col int + for i := range lines { + ll := len(lines[i]) + 1 // +1 for the removed newline + if pos+ll >= pe.Position.Start { + col = pe.Position.Start - pos + if col < 0 { // Should never happen, but just in case. + col = 0 + } + break + } + pos += ll + } + + return col +} + +type ( + errLexControl struct{ r rune } + errLexEscape struct{ r rune } + errLexUTF8 struct{ b byte } + errLexInvalidNum struct{ v string } + errLexInvalidDate struct{ v string } + errLexInlineTableNL struct{} + errLexStringNL struct{} + errParseRange struct { + i interface{} // int or float + size string // "int64", "uint16", etc. + } + errParseDuration struct{ d string } +) + +func (e errLexControl) Error() string { + return fmt.Sprintf("TOML files cannot contain control characters: '0x%02x'", e.r) +} +func (e errLexControl) Usage() string { return "" } + +func (e errLexEscape) Error() string { return fmt.Sprintf(`invalid escape in string '\%c'`, e.r) } +func (e errLexEscape) Usage() string { return usageEscape } +func (e errLexUTF8) Error() string { return fmt.Sprintf("invalid UTF-8 byte: 0x%02x", e.b) } +func (e errLexUTF8) Usage() string { return "" } +func (e errLexInvalidNum) Error() string { return fmt.Sprintf("invalid number: %q", e.v) } +func (e errLexInvalidNum) Usage() string { return "" } +func (e errLexInvalidDate) Error() string { return fmt.Sprintf("invalid date: %q", e.v) } +func (e errLexInvalidDate) Usage() string { return "" } +func (e errLexInlineTableNL) Error() string { return "newlines not allowed within inline tables" } +func (e errLexInlineTableNL) Usage() string { return usageInlineNewline } +func (e errLexStringNL) Error() string { return "strings cannot contain newlines" } +func (e errLexStringNL) Usage() string { return usageStringNewline } +func (e errParseRange) Error() string { return fmt.Sprintf("%v is out of range for %s", e.i, e.size) } +func (e errParseRange) Usage() string { return usageIntOverflow } +func (e errParseDuration) Error() string { return fmt.Sprintf("invalid duration: %q", e.d) } +func (e errParseDuration) Usage() string { return usageDuration } + +const usageEscape = ` +A '\' inside a "-delimited string is interpreted as an escape character. + +The following escape sequences are supported: +\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX + +To prevent a '\' from being recognized as an escape character, use either: + +- a ' or '''-delimited string; escape characters aren't processed in them; or +- write two backslashes to get a single backslash: '\\'. + +If you're trying to add a Windows path (e.g. "C:\Users\martin") then using '/' +instead of '\' will usually also work: "C:/Users/martin". +` + +const usageInlineNewline = ` +Inline tables must always be on a single line: + + table = {key = 42, second = 43} + +It is invalid to split them over multiple lines like so: + + # INVALID + table = { + key = 42, + second = 43 + } + +Use regular for this: + + [table] + key = 42 + second = 43 +` + +const usageStringNewline = ` +Strings must always be on a single line, and cannot span more than one line: + + # INVALID + string = "Hello, + world!" + +Instead use """ or ''' to split strings over multiple lines: + + string = """Hello, + world!""" +` + +const usageIntOverflow = ` +This number is too large; this may be an error in the TOML, but it can also be a +bug in the program that uses too small of an integer. + +The maximum and minimum values are: + + size │ lowest │ highest + ───────┼────────────────┼────────── + int8 │ -128 │ 127 + int16 │ -32,768 │ 32,767 + int32 │ -2,147,483,648 │ 2,147,483,647 + int64 │ -9.2 × 10¹⁷ │ 9.2 × 10¹⁷ + uint8 │ 0 │ 255 + uint16 │ 0 │ 65535 + uint32 │ 0 │ 4294967295 + uint64 │ 0 │ 1.8 × 10¹⁸ + +int refers to int32 on 32-bit systems and int64 on 64-bit systems. +` + +const usageDuration = ` +A duration must be as "number", without any spaces. Valid units are: + + ns nanoseconds (billionth of a second) + us, µs microseconds (millionth of a second) + ms milliseconds (thousands of a second) + s seconds + m minutes + h hours + +You can combine multiple units; for example "5m10s" for 5 minutes and 10 +seconds. +` diff --git a/vendor/github.com/BurntSushi/toml/internal/tz.go b/vendor/github.com/BurntSushi/toml/internal/tz.go new file mode 100644 index 000000000..022f15bc2 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/internal/tz.go @@ -0,0 +1,36 @@ +package internal + +import "time" + +// Timezones used for local datetime, date, and time TOML types. +// +// The exact way times and dates without a timezone should be interpreted is not +// well-defined in the TOML specification and left to the implementation. These +// defaults to current local timezone offset of the computer, but this can be +// changed by changing these variables before decoding. +// +// TODO: +// Ideally we'd like to offer people the ability to configure the used timezone +// by setting Decoder.Timezone and Encoder.Timezone; however, this is a bit +// tricky: the reason we use three different variables for this is to support +// round-tripping – without these specific TZ names we wouldn't know which +// format to use. +// +// There isn't a good way to encode this right now though, and passing this sort +// of information also ties in to various related issues such as string format +// encoding, encoding of comments, etc. +// +// So, for the time being, just put this in internal until we can write a good +// comprehensive API for doing all of this. +// +// The reason they're exported is because they're referred from in e.g. +// internal/tag. +// +// Note that this behaviour is valid according to the TOML spec as the exact +// behaviour is left up to implementations. +var ( + localOffset = func() int { _, o := time.Now().Zone(); return o }() + LocalDatetime = time.FixedZone("datetime-local", localOffset) + LocalDate = time.FixedZone("date-local", localOffset) + LocalTime = time.FixedZone("time-local", localOffset) +) diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go new file mode 100644 index 000000000..3545a6ad6 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/lex.go @@ -0,0 +1,1283 @@ +package toml + +import ( + "fmt" + "reflect" + "runtime" + "strings" + "unicode" + "unicode/utf8" +) + +type itemType int + +const ( + itemError itemType = iota + itemNIL // used in the parser to indicate no type + itemEOF + itemText + itemString + itemRawString + itemMultilineString + itemRawMultilineString + itemBool + itemInteger + itemFloat + itemDatetime + itemArray // the start of an array + itemArrayEnd + itemTableStart + itemTableEnd + itemArrayTableStart + itemArrayTableEnd + itemKeyStart + itemKeyEnd + itemCommentStart + itemInlineTableStart + itemInlineTableEnd +) + +const eof = 0 + +type stateFn func(lx *lexer) stateFn + +func (p Position) String() string { + return fmt.Sprintf("at line %d; start %d; length %d", p.Line, p.Start, p.Len) +} + +type lexer struct { + input string + start int + pos int + line int + state stateFn + items chan item + tomlNext bool + + // Allow for backing up up to 4 runes. This is necessary because TOML + // contains 3-rune tokens (""" and '''). + prevWidths [4]int + nprev int // how many of prevWidths are in use + atEOF bool // If we emit an eof, we can still back up, but it is not OK to call next again. + + // A stack of state functions used to maintain context. + // + // The idea is to reuse parts of the state machine in various places. For + // example, values can appear at the top level or within arbitrarily nested + // arrays. The last state on the stack is used after a value has been lexed. + // Similarly for comments. + stack []stateFn +} + +type item struct { + typ itemType + val string + err error + pos Position +} + +func (lx *lexer) nextItem() item { + for { + select { + case item := <-lx.items: + return item + default: + lx.state = lx.state(lx) + //fmt.Printf(" STATE %-24s current: %-10s stack: %s\n", lx.state, lx.current(), lx.stack) + } + } +} + +func lex(input string, tomlNext bool) *lexer { + lx := &lexer{ + input: input, + state: lexTop, + items: make(chan item, 10), + stack: make([]stateFn, 0, 10), + line: 1, + tomlNext: tomlNext, + } + return lx +} + +func (lx *lexer) push(state stateFn) { + lx.stack = append(lx.stack, state) +} + +func (lx *lexer) pop() stateFn { + if len(lx.stack) == 0 { + return lx.errorf("BUG in lexer: no states to pop") + } + last := lx.stack[len(lx.stack)-1] + lx.stack = lx.stack[0 : len(lx.stack)-1] + return last +} + +func (lx *lexer) current() string { + return lx.input[lx.start:lx.pos] +} + +func (lx lexer) getPos() Position { + p := Position{ + Line: lx.line, + Start: lx.start, + Len: lx.pos - lx.start, + } + if p.Len <= 0 { + p.Len = 1 + } + return p +} + +func (lx *lexer) emit(typ itemType) { + // Needed for multiline strings ending with an incomplete UTF-8 sequence. + if lx.start > lx.pos { + lx.error(errLexUTF8{lx.input[lx.pos]}) + return + } + lx.items <- item{typ: typ, pos: lx.getPos(), val: lx.current()} + lx.start = lx.pos +} + +func (lx *lexer) emitTrim(typ itemType) { + lx.items <- item{typ: typ, pos: lx.getPos(), val: strings.TrimSpace(lx.current())} + lx.start = lx.pos +} + +func (lx *lexer) next() (r rune) { + if lx.atEOF { + panic("BUG in lexer: next called after EOF") + } + if lx.pos >= len(lx.input) { + lx.atEOF = true + return eof + } + + if lx.input[lx.pos] == '\n' { + lx.line++ + } + lx.prevWidths[3] = lx.prevWidths[2] + lx.prevWidths[2] = lx.prevWidths[1] + lx.prevWidths[1] = lx.prevWidths[0] + if lx.nprev < 4 { + lx.nprev++ + } + + r, w := utf8.DecodeRuneInString(lx.input[lx.pos:]) + if r == utf8.RuneError { + lx.error(errLexUTF8{lx.input[lx.pos]}) + return utf8.RuneError + } + + // Note: don't use peek() here, as this calls next(). + if isControl(r) || (r == '\r' && (len(lx.input)-1 == lx.pos || lx.input[lx.pos+1] != '\n')) { + lx.errorControlChar(r) + return utf8.RuneError + } + + lx.prevWidths[0] = w + lx.pos += w + return r +} + +// ignore skips over the pending input before this point. +func (lx *lexer) ignore() { + lx.start = lx.pos +} + +// backup steps back one rune. Can be called 4 times between calls to next. +func (lx *lexer) backup() { + if lx.atEOF { + lx.atEOF = false + return + } + if lx.nprev < 1 { + panic("BUG in lexer: backed up too far") + } + w := lx.prevWidths[0] + lx.prevWidths[0] = lx.prevWidths[1] + lx.prevWidths[1] = lx.prevWidths[2] + lx.prevWidths[2] = lx.prevWidths[3] + lx.nprev-- + + lx.pos -= w + if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' { + lx.line-- + } +} + +// accept consumes the next rune if it's equal to `valid`. +func (lx *lexer) accept(valid rune) bool { + if lx.next() == valid { + return true + } + lx.backup() + return false +} + +// peek returns but does not consume the next rune in the input. +func (lx *lexer) peek() rune { + r := lx.next() + lx.backup() + return r +} + +// skip ignores all input that matches the given predicate. +func (lx *lexer) skip(pred func(rune) bool) { + for { + r := lx.next() + if pred(r) { + continue + } + lx.backup() + lx.ignore() + return + } +} + +// error stops all lexing by emitting an error and returning `nil`. +// +// Note that any value that is a character is escaped if it's a special +// character (newlines, tabs, etc.). +func (lx *lexer) error(err error) stateFn { + if lx.atEOF { + return lx.errorPrevLine(err) + } + lx.items <- item{typ: itemError, pos: lx.getPos(), err: err} + return nil +} + +// errorfPrevline is like error(), but sets the position to the last column of +// the previous line. +// +// This is so that unexpected EOF or NL errors don't show on a new blank line. +func (lx *lexer) errorPrevLine(err error) stateFn { + pos := lx.getPos() + pos.Line-- + pos.Len = 1 + pos.Start = lx.pos - 1 + lx.items <- item{typ: itemError, pos: pos, err: err} + return nil +} + +// errorPos is like error(), but allows explicitly setting the position. +func (lx *lexer) errorPos(start, length int, err error) stateFn { + pos := lx.getPos() + pos.Start = start + pos.Len = length + lx.items <- item{typ: itemError, pos: pos, err: err} + return nil +} + +// errorf is like error, and creates a new error. +func (lx *lexer) errorf(format string, values ...interface{}) stateFn { + if lx.atEOF { + pos := lx.getPos() + pos.Line-- + pos.Len = 1 + pos.Start = lx.pos - 1 + lx.items <- item{typ: itemError, pos: pos, err: fmt.Errorf(format, values...)} + return nil + } + lx.items <- item{typ: itemError, pos: lx.getPos(), err: fmt.Errorf(format, values...)} + return nil +} + +func (lx *lexer) errorControlChar(cc rune) stateFn { + return lx.errorPos(lx.pos-1, 1, errLexControl{cc}) +} + +// lexTop consumes elements at the top level of TOML data. +func lexTop(lx *lexer) stateFn { + r := lx.next() + if isWhitespace(r) || isNL(r) { + return lexSkip(lx, lexTop) + } + switch r { + case '#': + lx.push(lexTop) + return lexCommentStart + case '[': + return lexTableStart + case eof: + if lx.pos > lx.start { + return lx.errorf("unexpected EOF") + } + lx.emit(itemEOF) + return nil + } + + // At this point, the only valid item can be a key, so we back up + // and let the key lexer do the rest. + lx.backup() + lx.push(lexTopEnd) + return lexKeyStart +} + +// lexTopEnd is entered whenever a top-level item has been consumed. (A value +// or a table.) It must see only whitespace, and will turn back to lexTop +// upon a newline. If it sees EOF, it will quit the lexer successfully. +func lexTopEnd(lx *lexer) stateFn { + r := lx.next() + switch { + case r == '#': + // a comment will read to a newline for us. + lx.push(lexTop) + return lexCommentStart + case isWhitespace(r): + return lexTopEnd + case isNL(r): + lx.ignore() + return lexTop + case r == eof: + lx.emit(itemEOF) + return nil + } + return lx.errorf( + "expected a top-level item to end with a newline, comment, or EOF, but got %q instead", + r) +} + +// lexTable lexes the beginning of a table. Namely, it makes sure that +// it starts with a character other than '.' and ']'. +// It assumes that '[' has already been consumed. +// It also handles the case that this is an item in an array of tables. +// e.g., '[[name]]'. +func lexTableStart(lx *lexer) stateFn { + if lx.peek() == '[' { + lx.next() + lx.emit(itemArrayTableStart) + lx.push(lexArrayTableEnd) + } else { + lx.emit(itemTableStart) + lx.push(lexTableEnd) + } + return lexTableNameStart +} + +func lexTableEnd(lx *lexer) stateFn { + lx.emit(itemTableEnd) + return lexTopEnd +} + +func lexArrayTableEnd(lx *lexer) stateFn { + if r := lx.next(); r != ']' { + return lx.errorf("expected end of table array name delimiter ']', but got %q instead", r) + } + lx.emit(itemArrayTableEnd) + return lexTopEnd +} + +func lexTableNameStart(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.peek(); { + case r == ']' || r == eof: + return lx.errorf("unexpected end of table name (table names cannot be empty)") + case r == '.': + return lx.errorf("unexpected table separator (table names cannot be empty)") + case r == '"' || r == '\'': + lx.ignore() + lx.push(lexTableNameEnd) + return lexQuotedName + default: + lx.push(lexTableNameEnd) + return lexBareName + } +} + +// lexTableNameEnd reads the end of a piece of a table name, optionally +// consuming whitespace. +func lexTableNameEnd(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.next(); { + case isWhitespace(r): + return lexTableNameEnd + case r == '.': + lx.ignore() + return lexTableNameStart + case r == ']': + return lx.pop() + default: + return lx.errorf("expected '.' or ']' to end table name, but got %q instead", r) + } +} + +// lexBareName lexes one part of a key or table. +// +// It assumes that at least one valid character for the table has already been +// read. +// +// Lexes only one part, e.g. only 'a' inside 'a.b'. +func lexBareName(lx *lexer) stateFn { + r := lx.next() + if isBareKeyChar(r, lx.tomlNext) { + return lexBareName + } + lx.backup() + lx.emit(itemText) + return lx.pop() +} + +// lexBareName lexes one part of a key or table. +// +// It assumes that at least one valid character for the table has already been +// read. +// +// Lexes only one part, e.g. only '"a"' inside '"a".b'. +func lexQuotedName(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r): + return lexSkip(lx, lexValue) + case r == '"': + lx.ignore() // ignore the '"' + return lexString + case r == '\'': + lx.ignore() // ignore the "'" + return lexRawString + case r == eof: + return lx.errorf("unexpected EOF; expected value") + default: + return lx.errorf("expected value but found %q instead", r) + } +} + +// lexKeyStart consumes all key parts until a '='. +func lexKeyStart(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.peek(); { + case r == '=' || r == eof: + return lx.errorf("unexpected '=': key name appears blank") + case r == '.': + return lx.errorf("unexpected '.': keys cannot start with a '.'") + case r == '"' || r == '\'': + lx.ignore() + fallthrough + default: // Bare key + lx.emit(itemKeyStart) + return lexKeyNameStart + } +} + +func lexKeyNameStart(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.peek(); { + case r == '=' || r == eof: + return lx.errorf("unexpected '='") + case r == '.': + return lx.errorf("unexpected '.'") + case r == '"' || r == '\'': + lx.ignore() + lx.push(lexKeyEnd) + return lexQuotedName + default: + lx.push(lexKeyEnd) + return lexBareName + } +} + +// lexKeyEnd consumes the end of a key and trims whitespace (up to the key +// separator). +func lexKeyEnd(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.next(); { + case isWhitespace(r): + return lexSkip(lx, lexKeyEnd) + case r == eof: + return lx.errorf("unexpected EOF; expected key separator '='") + case r == '.': + lx.ignore() + return lexKeyNameStart + case r == '=': + lx.emit(itemKeyEnd) + return lexSkip(lx, lexValue) + default: + return lx.errorf("expected '.' or '=', but got %q instead", r) + } +} + +// lexValue starts the consumption of a value anywhere a value is expected. +// lexValue will ignore whitespace. +// After a value is lexed, the last state on the next is popped and returned. +func lexValue(lx *lexer) stateFn { + // We allow whitespace to precede a value, but NOT newlines. + // In array syntax, the array states are responsible for ignoring newlines. + r := lx.next() + switch { + case isWhitespace(r): + return lexSkip(lx, lexValue) + case isDigit(r): + lx.backup() // avoid an extra state and use the same as above + return lexNumberOrDateStart + } + switch r { + case '[': + lx.ignore() + lx.emit(itemArray) + return lexArrayValue + case '{': + lx.ignore() + lx.emit(itemInlineTableStart) + return lexInlineTableValue + case '"': + if lx.accept('"') { + if lx.accept('"') { + lx.ignore() // Ignore """ + return lexMultilineString + } + lx.backup() + } + lx.ignore() // ignore the '"' + return lexString + case '\'': + if lx.accept('\'') { + if lx.accept('\'') { + lx.ignore() // Ignore """ + return lexMultilineRawString + } + lx.backup() + } + lx.ignore() // ignore the "'" + return lexRawString + case '.': // special error case, be kind to users + return lx.errorf("floats must start with a digit, not '.'") + case 'i', 'n': + if (lx.accept('n') && lx.accept('f')) || (lx.accept('a') && lx.accept('n')) { + lx.emit(itemFloat) + return lx.pop() + } + case '-', '+': + return lexDecimalNumberStart + } + if unicode.IsLetter(r) { + // Be permissive here; lexBool will give a nice error if the + // user wrote something like + // x = foo + // (i.e. not 'true' or 'false' but is something else word-like.) + lx.backup() + return lexBool + } + if r == eof { + return lx.errorf("unexpected EOF; expected value") + } + return lx.errorf("expected value but found %q instead", r) +} + +// lexArrayValue consumes one value in an array. It assumes that '[' or ',' +// have already been consumed. All whitespace and newlines are ignored. +func lexArrayValue(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r) || isNL(r): + return lexSkip(lx, lexArrayValue) + case r == '#': + lx.push(lexArrayValue) + return lexCommentStart + case r == ',': + return lx.errorf("unexpected comma") + case r == ']': + return lexArrayEnd + } + + lx.backup() + lx.push(lexArrayValueEnd) + return lexValue +} + +// lexArrayValueEnd consumes everything between the end of an array value and +// the next value (or the end of the array): it ignores whitespace and newlines +// and expects either a ',' or a ']'. +func lexArrayValueEnd(lx *lexer) stateFn { + switch r := lx.next(); { + case isWhitespace(r) || isNL(r): + return lexSkip(lx, lexArrayValueEnd) + case r == '#': + lx.push(lexArrayValueEnd) + return lexCommentStart + case r == ',': + lx.ignore() + return lexArrayValue // move on to the next value + case r == ']': + return lexArrayEnd + default: + return lx.errorf("expected a comma (',') or array terminator (']'), but got %s", runeOrEOF(r)) + } +} + +// lexArrayEnd finishes the lexing of an array. +// It assumes that a ']' has just been consumed. +func lexArrayEnd(lx *lexer) stateFn { + lx.ignore() + lx.emit(itemArrayEnd) + return lx.pop() +} + +// lexInlineTableValue consumes one key/value pair in an inline table. +// It assumes that '{' or ',' have already been consumed. Whitespace is ignored. +func lexInlineTableValue(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r): + return lexSkip(lx, lexInlineTableValue) + case isNL(r): + if lx.tomlNext { + return lexSkip(lx, lexInlineTableValue) + } + return lx.errorPrevLine(errLexInlineTableNL{}) + case r == '#': + lx.push(lexInlineTableValue) + return lexCommentStart + case r == ',': + return lx.errorf("unexpected comma") + case r == '}': + return lexInlineTableEnd + } + lx.backup() + lx.push(lexInlineTableValueEnd) + return lexKeyStart +} + +// lexInlineTableValueEnd consumes everything between the end of an inline table +// key/value pair and the next pair (or the end of the table): +// it ignores whitespace and expects either a ',' or a '}'. +func lexInlineTableValueEnd(lx *lexer) stateFn { + switch r := lx.next(); { + case isWhitespace(r): + return lexSkip(lx, lexInlineTableValueEnd) + case isNL(r): + if lx.tomlNext { + return lexSkip(lx, lexInlineTableValueEnd) + } + return lx.errorPrevLine(errLexInlineTableNL{}) + case r == '#': + lx.push(lexInlineTableValueEnd) + return lexCommentStart + case r == ',': + lx.ignore() + lx.skip(isWhitespace) + if lx.peek() == '}' { + if lx.tomlNext { + return lexInlineTableValueEnd + } + return lx.errorf("trailing comma not allowed in inline tables") + } + return lexInlineTableValue + case r == '}': + return lexInlineTableEnd + default: + return lx.errorf("expected a comma or an inline table terminator '}', but got %s instead", runeOrEOF(r)) + } +} + +func runeOrEOF(r rune) string { + if r == eof { + return "end of file" + } + return "'" + string(r) + "'" +} + +// lexInlineTableEnd finishes the lexing of an inline table. +// It assumes that a '}' has just been consumed. +func lexInlineTableEnd(lx *lexer) stateFn { + lx.ignore() + lx.emit(itemInlineTableEnd) + return lx.pop() +} + +// lexString consumes the inner contents of a string. It assumes that the +// beginning '"' has already been consumed and ignored. +func lexString(lx *lexer) stateFn { + r := lx.next() + switch { + case r == eof: + return lx.errorf(`unexpected EOF; expected '"'`) + case isNL(r): + return lx.errorPrevLine(errLexStringNL{}) + case r == '\\': + lx.push(lexString) + return lexStringEscape + case r == '"': + lx.backup() + lx.emit(itemString) + lx.next() + lx.ignore() + return lx.pop() + } + return lexString +} + +// lexMultilineString consumes the inner contents of a string. It assumes that +// the beginning '"""' has already been consumed and ignored. +func lexMultilineString(lx *lexer) stateFn { + r := lx.next() + switch r { + default: + return lexMultilineString + case eof: + return lx.errorf(`unexpected EOF; expected '"""'`) + case '\\': + return lexMultilineStringEscape + case '"': + /// Found " → try to read two more "". + if lx.accept('"') { + if lx.accept('"') { + /// Peek ahead: the string can contain " and "", including at the + /// end: """str""""" + /// 6 or more at the end, however, is an error. + if lx.peek() == '"' { + /// Check if we already lexed 5 's; if so we have 6 now, and + /// that's just too many man! + /// + /// Second check is for the edge case: + /// + /// two quotes allowed. + /// vv + /// """lol \"""""" + /// ^^ ^^^---- closing three + /// escaped + /// + /// But ugly, but it works + if strings.HasSuffix(lx.current(), `"""""`) && !strings.HasSuffix(lx.current(), `\"""""`) { + return lx.errorf(`unexpected '""""""'`) + } + lx.backup() + lx.backup() + return lexMultilineString + } + + lx.backup() /// backup: don't include the """ in the item. + lx.backup() + lx.backup() + lx.emit(itemMultilineString) + lx.next() /// Read over ''' again and discard it. + lx.next() + lx.next() + lx.ignore() + return lx.pop() + } + lx.backup() + } + return lexMultilineString + } +} + +// lexRawString consumes a raw string. Nothing can be escaped in such a string. +// It assumes that the beginning "'" has already been consumed and ignored. +func lexRawString(lx *lexer) stateFn { + r := lx.next() + switch { + default: + return lexRawString + case r == eof: + return lx.errorf(`unexpected EOF; expected "'"`) + case isNL(r): + return lx.errorPrevLine(errLexStringNL{}) + case r == '\'': + lx.backup() + lx.emit(itemRawString) + lx.next() + lx.ignore() + return lx.pop() + } +} + +// lexMultilineRawString consumes a raw string. Nothing can be escaped in such a +// string. It assumes that the beginning triple-' has already been consumed and +// ignored. +func lexMultilineRawString(lx *lexer) stateFn { + r := lx.next() + switch r { + default: + return lexMultilineRawString + case eof: + return lx.errorf(`unexpected EOF; expected "'''"`) + case '\'': + /// Found ' → try to read two more ''. + if lx.accept('\'') { + if lx.accept('\'') { + /// Peek ahead: the string can contain ' and '', including at the + /// end: '''str''''' + /// 6 or more at the end, however, is an error. + if lx.peek() == '\'' { + /// Check if we already lexed 5 's; if so we have 6 now, and + /// that's just too many man! + if strings.HasSuffix(lx.current(), "'''''") { + return lx.errorf(`unexpected "''''''"`) + } + lx.backup() + lx.backup() + return lexMultilineRawString + } + + lx.backup() /// backup: don't include the ''' in the item. + lx.backup() + lx.backup() + lx.emit(itemRawMultilineString) + lx.next() /// Read over ''' again and discard it. + lx.next() + lx.next() + lx.ignore() + return lx.pop() + } + lx.backup() + } + return lexMultilineRawString + } +} + +// lexMultilineStringEscape consumes an escaped character. It assumes that the +// preceding '\\' has already been consumed. +func lexMultilineStringEscape(lx *lexer) stateFn { + if isNL(lx.next()) { /// \ escaping newline. + return lexMultilineString + } + lx.backup() + lx.push(lexMultilineString) + return lexStringEscape(lx) +} + +func lexStringEscape(lx *lexer) stateFn { + r := lx.next() + switch r { + case 'e': + if !lx.tomlNext { + return lx.error(errLexEscape{r}) + } + fallthrough + case 'b': + fallthrough + case 't': + fallthrough + case 'n': + fallthrough + case 'f': + fallthrough + case 'r': + fallthrough + case '"': + fallthrough + case ' ', '\t': + // Inside """ .. """ strings you can use \ to escape newlines, and any + // amount of whitespace can be between the \ and \n. + fallthrough + case '\\': + return lx.pop() + case 'x': + if !lx.tomlNext { + return lx.error(errLexEscape{r}) + } + return lexHexEscape + case 'u': + return lexShortUnicodeEscape + case 'U': + return lexLongUnicodeEscape + } + return lx.error(errLexEscape{r}) +} + +func lexHexEscape(lx *lexer) stateFn { + var r rune + for i := 0; i < 2; i++ { + r = lx.next() + if !isHexadecimal(r) { + return lx.errorf( + `expected two hexadecimal digits after '\x', but got %q instead`, + lx.current()) + } + } + return lx.pop() +} + +func lexShortUnicodeEscape(lx *lexer) stateFn { + var r rune + for i := 0; i < 4; i++ { + r = lx.next() + if !isHexadecimal(r) { + return lx.errorf( + `expected four hexadecimal digits after '\u', but got %q instead`, + lx.current()) + } + } + return lx.pop() +} + +func lexLongUnicodeEscape(lx *lexer) stateFn { + var r rune + for i := 0; i < 8; i++ { + r = lx.next() + if !isHexadecimal(r) { + return lx.errorf( + `expected eight hexadecimal digits after '\U', but got %q instead`, + lx.current()) + } + } + return lx.pop() +} + +// lexNumberOrDateStart processes the first character of a value which begins +// with a digit. It exists to catch values starting with '0', so that +// lexBaseNumberOrDate can differentiate base prefixed integers from other +// types. +func lexNumberOrDateStart(lx *lexer) stateFn { + r := lx.next() + switch r { + case '0': + return lexBaseNumberOrDate + } + + if !isDigit(r) { + // The only way to reach this state is if the value starts + // with a digit, so specifically treat anything else as an + // error. + return lx.errorf("expected a digit but got %q", r) + } + + return lexNumberOrDate +} + +// lexNumberOrDate consumes either an integer, float or datetime. +func lexNumberOrDate(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexNumberOrDate + } + switch r { + case '-', ':': + return lexDatetime + case '_': + return lexDecimalNumber + case '.', 'e', 'E': + return lexFloat + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexDatetime consumes a Datetime, to a first approximation. +// The parser validates that it matches one of the accepted formats. +func lexDatetime(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexDatetime + } + switch r { + case '-', ':', 'T', 't', ' ', '.', 'Z', 'z', '+': + return lexDatetime + } + + lx.backup() + lx.emitTrim(itemDatetime) + return lx.pop() +} + +// lexHexInteger consumes a hexadecimal integer after seeing the '0x' prefix. +func lexHexInteger(lx *lexer) stateFn { + r := lx.next() + if isHexadecimal(r) { + return lexHexInteger + } + switch r { + case '_': + return lexHexInteger + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexOctalInteger consumes an octal integer after seeing the '0o' prefix. +func lexOctalInteger(lx *lexer) stateFn { + r := lx.next() + if isOctal(r) { + return lexOctalInteger + } + switch r { + case '_': + return lexOctalInteger + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexBinaryInteger consumes a binary integer after seeing the '0b' prefix. +func lexBinaryInteger(lx *lexer) stateFn { + r := lx.next() + if isBinary(r) { + return lexBinaryInteger + } + switch r { + case '_': + return lexBinaryInteger + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexDecimalNumber consumes a decimal float or integer. +func lexDecimalNumber(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexDecimalNumber + } + switch r { + case '.', 'e', 'E': + return lexFloat + case '_': + return lexDecimalNumber + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexDecimalNumber consumes the first digit of a number beginning with a sign. +// It assumes the sign has already been consumed. Values which start with a sign +// are only allowed to be decimal integers or floats. +// +// The special "nan" and "inf" values are also recognized. +func lexDecimalNumberStart(lx *lexer) stateFn { + r := lx.next() + + // Special error cases to give users better error messages + switch r { + case 'i': + if !lx.accept('n') || !lx.accept('f') { + return lx.errorf("invalid float: '%s'", lx.current()) + } + lx.emit(itemFloat) + return lx.pop() + case 'n': + if !lx.accept('a') || !lx.accept('n') { + return lx.errorf("invalid float: '%s'", lx.current()) + } + lx.emit(itemFloat) + return lx.pop() + case '0': + p := lx.peek() + switch p { + case 'b', 'o', 'x': + return lx.errorf("cannot use sign with non-decimal numbers: '%s%c'", lx.current(), p) + } + case '.': + return lx.errorf("floats must start with a digit, not '.'") + } + + if isDigit(r) { + return lexDecimalNumber + } + + return lx.errorf("expected a digit but got %q", r) +} + +// lexBaseNumberOrDate differentiates between the possible values which +// start with '0'. It assumes that before reaching this state, the initial '0' +// has been consumed. +func lexBaseNumberOrDate(lx *lexer) stateFn { + r := lx.next() + // Note: All datetimes start with at least two digits, so we don't + // handle date characters (':', '-', etc.) here. + if isDigit(r) { + return lexNumberOrDate + } + switch r { + case '_': + // Can only be decimal, because there can't be an underscore + // between the '0' and the base designator, and dates can't + // contain underscores. + return lexDecimalNumber + case '.', 'e', 'E': + return lexFloat + case 'b': + r = lx.peek() + if !isBinary(r) { + lx.errorf("not a binary number: '%s%c'", lx.current(), r) + } + return lexBinaryInteger + case 'o': + r = lx.peek() + if !isOctal(r) { + lx.errorf("not an octal number: '%s%c'", lx.current(), r) + } + return lexOctalInteger + case 'x': + r = lx.peek() + if !isHexadecimal(r) { + lx.errorf("not a hexidecimal number: '%s%c'", lx.current(), r) + } + return lexHexInteger + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexFloat consumes the elements of a float. It allows any sequence of +// float-like characters, so floats emitted by the lexer are only a first +// approximation and must be validated by the parser. +func lexFloat(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexFloat + } + switch r { + case '_', '.', '-', '+', 'e', 'E': + return lexFloat + } + + lx.backup() + lx.emit(itemFloat) + return lx.pop() +} + +// lexBool consumes a bool string: 'true' or 'false. +func lexBool(lx *lexer) stateFn { + var rs []rune + for { + r := lx.next() + if !unicode.IsLetter(r) { + lx.backup() + break + } + rs = append(rs, r) + } + s := string(rs) + switch s { + case "true", "false": + lx.emit(itemBool) + return lx.pop() + } + return lx.errorf("expected value but found %q instead", s) +} + +// lexCommentStart begins the lexing of a comment. It will emit +// itemCommentStart and consume no characters, passing control to lexComment. +func lexCommentStart(lx *lexer) stateFn { + lx.ignore() + lx.emit(itemCommentStart) + return lexComment +} + +// lexComment lexes an entire comment. It assumes that '#' has been consumed. +// It will consume *up to* the first newline character, and pass control +// back to the last state on the stack. +func lexComment(lx *lexer) stateFn { + switch r := lx.next(); { + case isNL(r) || r == eof: + lx.backup() + lx.emit(itemText) + return lx.pop() + default: + return lexComment + } +} + +// lexSkip ignores all slurped input and moves on to the next state. +func lexSkip(lx *lexer, nextState stateFn) stateFn { + lx.ignore() + return nextState +} + +func (s stateFn) String() string { + name := runtime.FuncForPC(reflect.ValueOf(s).Pointer()).Name() + if i := strings.LastIndexByte(name, '.'); i > -1 { + name = name[i+1:] + } + if s == nil { + name = "" + } + return name + "()" +} + +func (itype itemType) String() string { + switch itype { + case itemError: + return "Error" + case itemNIL: + return "NIL" + case itemEOF: + return "EOF" + case itemText: + return "Text" + case itemString, itemRawString, itemMultilineString, itemRawMultilineString: + return "String" + case itemBool: + return "Bool" + case itemInteger: + return "Integer" + case itemFloat: + return "Float" + case itemDatetime: + return "DateTime" + case itemTableStart: + return "TableStart" + case itemTableEnd: + return "TableEnd" + case itemKeyStart: + return "KeyStart" + case itemKeyEnd: + return "KeyEnd" + case itemArray: + return "Array" + case itemArrayEnd: + return "ArrayEnd" + case itemCommentStart: + return "CommentStart" + case itemInlineTableStart: + return "InlineTableStart" + case itemInlineTableEnd: + return "InlineTableEnd" + } + panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype))) +} + +func (item item) String() string { + return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val) +} + +func isWhitespace(r rune) bool { return r == '\t' || r == ' ' } +func isNL(r rune) bool { return r == '\n' || r == '\r' } +func isControl(r rune) bool { // Control characters except \t, \r, \n + switch r { + case '\t', '\r', '\n': + return false + default: + return (r >= 0x00 && r <= 0x1f) || r == 0x7f + } +} +func isDigit(r rune) bool { return r >= '0' && r <= '9' } +func isBinary(r rune) bool { return r == '0' || r == '1' } +func isOctal(r rune) bool { return r >= '0' && r <= '7' } +func isHexadecimal(r rune) bool { + return (r >= '0' && r <= '9') || (r >= 'a' && r <= 'f') || (r >= 'A' && r <= 'F') +} + +func isBareKeyChar(r rune, tomlNext bool) bool { + if tomlNext { + return (r >= 'A' && r <= 'Z') || + (r >= 'a' && r <= 'z') || + (r >= '0' && r <= '9') || + r == '_' || r == '-' || + r == 0xb2 || r == 0xb3 || r == 0xb9 || (r >= 0xbc && r <= 0xbe) || + (r >= 0xc0 && r <= 0xd6) || (r >= 0xd8 && r <= 0xf6) || (r >= 0xf8 && r <= 0x037d) || + (r >= 0x037f && r <= 0x1fff) || + (r >= 0x200c && r <= 0x200d) || (r >= 0x203f && r <= 0x2040) || + (r >= 0x2070 && r <= 0x218f) || (r >= 0x2460 && r <= 0x24ff) || + (r >= 0x2c00 && r <= 0x2fef) || (r >= 0x3001 && r <= 0xd7ff) || + (r >= 0xf900 && r <= 0xfdcf) || (r >= 0xfdf0 && r <= 0xfffd) || + (r >= 0x10000 && r <= 0xeffff) + } + + return (r >= 'A' && r <= 'Z') || + (r >= 'a' && r <= 'z') || + (r >= '0' && r <= '9') || + r == '_' || r == '-' +} diff --git a/vendor/github.com/BurntSushi/toml/meta.go b/vendor/github.com/BurntSushi/toml/meta.go new file mode 100644 index 000000000..2e78b24e9 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/meta.go @@ -0,0 +1,121 @@ +package toml + +import ( + "strings" +) + +// MetaData allows access to meta information about TOML data that's not +// accessible otherwise. +// +// It allows checking if a key is defined in the TOML data, whether any keys +// were undecoded, and the TOML type of a key. +type MetaData struct { + context Key // Used only during decoding. + + keyInfo map[string]keyInfo + mapping map[string]interface{} + keys []Key + decoded map[string]struct{} + data []byte // Input file; for errors. +} + +// IsDefined reports if the key exists in the TOML data. +// +// The key should be specified hierarchically, for example to access the TOML +// key "a.b.c" you would use IsDefined("a", "b", "c"). Keys are case sensitive. +// +// Returns false for an empty key. +func (md *MetaData) IsDefined(key ...string) bool { + if len(key) == 0 { + return false + } + + var ( + hash map[string]interface{} + ok bool + hashOrVal interface{} = md.mapping + ) + for _, k := range key { + if hash, ok = hashOrVal.(map[string]interface{}); !ok { + return false + } + if hashOrVal, ok = hash[k]; !ok { + return false + } + } + return true +} + +// Type returns a string representation of the type of the key specified. +// +// Type will return the empty string if given an empty key or a key that does +// not exist. Keys are case sensitive. +func (md *MetaData) Type(key ...string) string { + if ki, ok := md.keyInfo[Key(key).String()]; ok { + return ki.tomlType.typeString() + } + return "" +} + +// Keys returns a slice of every key in the TOML data, including key groups. +// +// Each key is itself a slice, where the first element is the top of the +// hierarchy and the last is the most specific. The list will have the same +// order as the keys appeared in the TOML data. +// +// All keys returned are non-empty. +func (md *MetaData) Keys() []Key { + return md.keys +} + +// Undecoded returns all keys that have not been decoded in the order in which +// they appear in the original TOML document. +// +// This includes keys that haven't been decoded because of a [Primitive] value. +// Once the Primitive value is decoded, the keys will be considered decoded. +// +// Also note that decoding into an empty interface will result in no decoding, +// and so no keys will be considered decoded. +// +// In this sense, the Undecoded keys correspond to keys in the TOML document +// that do not have a concrete type in your representation. +func (md *MetaData) Undecoded() []Key { + undecoded := make([]Key, 0, len(md.keys)) + for _, key := range md.keys { + if _, ok := md.decoded[key.String()]; !ok { + undecoded = append(undecoded, key) + } + } + return undecoded +} + +// Key represents any TOML key, including key groups. Use [MetaData.Keys] to get +// values of this type. +type Key []string + +func (k Key) String() string { + ss := make([]string, len(k)) + for i := range k { + ss[i] = k.maybeQuoted(i) + } + return strings.Join(ss, ".") +} + +func (k Key) maybeQuoted(i int) string { + if k[i] == "" { + return `""` + } + for _, c := range k[i] { + if !isBareKeyChar(c, false) { + return `"` + dblQuotedReplacer.Replace(k[i]) + `"` + } + } + return k[i] +} + +func (k Key) add(piece string) Key { + newKey := make(Key, len(k)+1) + copy(newKey, k) + newKey[len(k)] = piece + return newKey +} diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go new file mode 100644 index 000000000..9c1915369 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/parse.go @@ -0,0 +1,811 @@ +package toml + +import ( + "fmt" + "os" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/BurntSushi/toml/internal" +) + +type parser struct { + lx *lexer + context Key // Full key for the current hash in scope. + currentKey string // Base key name for everything except hashes. + pos Position // Current position in the TOML file. + tomlNext bool + + ordered []Key // List of keys in the order that they appear in the TOML data. + + keyInfo map[string]keyInfo // Map keyname → info about the TOML key. + mapping map[string]interface{} // Map keyname → key value. + implicits map[string]struct{} // Record implicit keys (e.g. "key.group.names"). +} + +type keyInfo struct { + pos Position + tomlType tomlType +} + +func parse(data string) (p *parser, err error) { + _, tomlNext := os.LookupEnv("BURNTSUSHI_TOML_110") + + defer func() { + if r := recover(); r != nil { + if pErr, ok := r.(ParseError); ok { + pErr.input = data + err = pErr + return + } + panic(r) + } + }() + + // Read over BOM; do this here as the lexer calls utf8.DecodeRuneInString() + // which mangles stuff. UTF-16 BOM isn't strictly valid, but some tools add + // it anyway. + if strings.HasPrefix(data, "\xff\xfe") || strings.HasPrefix(data, "\xfe\xff") { // UTF-16 + data = data[2:] + } else if strings.HasPrefix(data, "\xef\xbb\xbf") { // UTF-8 + data = data[3:] + } + + // Examine first few bytes for NULL bytes; this probably means it's a UTF-16 + // file (second byte in surrogate pair being NULL). Again, do this here to + // avoid having to deal with UTF-8/16 stuff in the lexer. + ex := 6 + if len(data) < 6 { + ex = len(data) + } + if i := strings.IndexRune(data[:ex], 0); i > -1 { + return nil, ParseError{ + Message: "files cannot contain NULL bytes; probably using UTF-16; TOML files must be UTF-8", + Position: Position{Line: 1, Start: i, Len: 1}, + Line: 1, + input: data, + } + } + + p = &parser{ + keyInfo: make(map[string]keyInfo), + mapping: make(map[string]interface{}), + lx: lex(data, tomlNext), + ordered: make([]Key, 0), + implicits: make(map[string]struct{}), + tomlNext: tomlNext, + } + for { + item := p.next() + if item.typ == itemEOF { + break + } + p.topLevel(item) + } + + return p, nil +} + +func (p *parser) panicErr(it item, err error) { + panic(ParseError{ + err: err, + Position: it.pos, + Line: it.pos.Len, + LastKey: p.current(), + }) +} + +func (p *parser) panicItemf(it item, format string, v ...interface{}) { + panic(ParseError{ + Message: fmt.Sprintf(format, v...), + Position: it.pos, + Line: it.pos.Len, + LastKey: p.current(), + }) +} + +func (p *parser) panicf(format string, v ...interface{}) { + panic(ParseError{ + Message: fmt.Sprintf(format, v...), + Position: p.pos, + Line: p.pos.Line, + LastKey: p.current(), + }) +} + +func (p *parser) next() item { + it := p.lx.nextItem() + //fmt.Printf("ITEM %-18s line %-3d │ %q\n", it.typ, it.pos.Line, it.val) + if it.typ == itemError { + if it.err != nil { + panic(ParseError{ + Position: it.pos, + Line: it.pos.Line, + LastKey: p.current(), + err: it.err, + }) + } + + p.panicItemf(it, "%s", it.val) + } + return it +} + +func (p *parser) nextPos() item { + it := p.next() + p.pos = it.pos + return it +} + +func (p *parser) bug(format string, v ...interface{}) { + panic(fmt.Sprintf("BUG: "+format+"\n\n", v...)) +} + +func (p *parser) expect(typ itemType) item { + it := p.next() + p.assertEqual(typ, it.typ) + return it +} + +func (p *parser) assertEqual(expected, got itemType) { + if expected != got { + p.bug("Expected '%s' but got '%s'.", expected, got) + } +} + +func (p *parser) topLevel(item item) { + switch item.typ { + case itemCommentStart: // # .. + p.expect(itemText) + case itemTableStart: // [ .. ] + name := p.nextPos() + + var key Key + for ; name.typ != itemTableEnd && name.typ != itemEOF; name = p.next() { + key = append(key, p.keyString(name)) + } + p.assertEqual(itemTableEnd, name.typ) + + p.addContext(key, false) + p.setType("", tomlHash, item.pos) + p.ordered = append(p.ordered, key) + case itemArrayTableStart: // [[ .. ]] + name := p.nextPos() + + var key Key + for ; name.typ != itemArrayTableEnd && name.typ != itemEOF; name = p.next() { + key = append(key, p.keyString(name)) + } + p.assertEqual(itemArrayTableEnd, name.typ) + + p.addContext(key, true) + p.setType("", tomlArrayHash, item.pos) + p.ordered = append(p.ordered, key) + case itemKeyStart: // key = .. + outerContext := p.context + /// Read all the key parts (e.g. 'a' and 'b' in 'a.b') + k := p.nextPos() + var key Key + for ; k.typ != itemKeyEnd && k.typ != itemEOF; k = p.next() { + key = append(key, p.keyString(k)) + } + p.assertEqual(itemKeyEnd, k.typ) + + /// The current key is the last part. + p.currentKey = key[len(key)-1] + + /// All the other parts (if any) are the context; need to set each part + /// as implicit. + context := key[:len(key)-1] + for i := range context { + p.addImplicitContext(append(p.context, context[i:i+1]...)) + } + p.ordered = append(p.ordered, p.context.add(p.currentKey)) + + /// Set value. + vItem := p.next() + val, typ := p.value(vItem, false) + p.set(p.currentKey, val, typ, vItem.pos) + + /// Remove the context we added (preserving any context from [tbl] lines). + p.context = outerContext + p.currentKey = "" + default: + p.bug("Unexpected type at top level: %s", item.typ) + } +} + +// Gets a string for a key (or part of a key in a table name). +func (p *parser) keyString(it item) string { + switch it.typ { + case itemText: + return it.val + case itemString, itemMultilineString, + itemRawString, itemRawMultilineString: + s, _ := p.value(it, false) + return s.(string) + default: + p.bug("Unexpected key type: %s", it.typ) + } + panic("unreachable") +} + +var datetimeRepl = strings.NewReplacer( + "z", "Z", + "t", "T", + " ", "T") + +// value translates an expected value from the lexer into a Go value wrapped +// as an empty interface. +func (p *parser) value(it item, parentIsArray bool) (interface{}, tomlType) { + switch it.typ { + case itemString: + return p.replaceEscapes(it, it.val), p.typeOfPrimitive(it) + case itemMultilineString: + return p.replaceEscapes(it, p.stripEscapedNewlines(stripFirstNewline(it.val))), p.typeOfPrimitive(it) + case itemRawString: + return it.val, p.typeOfPrimitive(it) + case itemRawMultilineString: + return stripFirstNewline(it.val), p.typeOfPrimitive(it) + case itemInteger: + return p.valueInteger(it) + case itemFloat: + return p.valueFloat(it) + case itemBool: + switch it.val { + case "true": + return true, p.typeOfPrimitive(it) + case "false": + return false, p.typeOfPrimitive(it) + default: + p.bug("Expected boolean value, but got '%s'.", it.val) + } + case itemDatetime: + return p.valueDatetime(it) + case itemArray: + return p.valueArray(it) + case itemInlineTableStart: + return p.valueInlineTable(it, parentIsArray) + default: + p.bug("Unexpected value type: %s", it.typ) + } + panic("unreachable") +} + +func (p *parser) valueInteger(it item) (interface{}, tomlType) { + if !numUnderscoresOK(it.val) { + p.panicItemf(it, "Invalid integer %q: underscores must be surrounded by digits", it.val) + } + if numHasLeadingZero(it.val) { + p.panicItemf(it, "Invalid integer %q: cannot have leading zeroes", it.val) + } + + num, err := strconv.ParseInt(it.val, 0, 64) + if err != nil { + // Distinguish integer values. Normally, it'd be a bug if the lexer + // provides an invalid integer, but it's possible that the number is + // out of range of valid values (which the lexer cannot determine). + // So mark the former as a bug but the latter as a legitimate user + // error. + if e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange { + p.panicErr(it, errParseRange{i: it.val, size: "int64"}) + } else { + p.bug("Expected integer value, but got '%s'.", it.val) + } + } + return num, p.typeOfPrimitive(it) +} + +func (p *parser) valueFloat(it item) (interface{}, tomlType) { + parts := strings.FieldsFunc(it.val, func(r rune) bool { + switch r { + case '.', 'e', 'E': + return true + } + return false + }) + for _, part := range parts { + if !numUnderscoresOK(part) { + p.panicItemf(it, "Invalid float %q: underscores must be surrounded by digits", it.val) + } + } + if len(parts) > 0 && numHasLeadingZero(parts[0]) { + p.panicItemf(it, "Invalid float %q: cannot have leading zeroes", it.val) + } + if !numPeriodsOK(it.val) { + // As a special case, numbers like '123.' or '1.e2', + // which are valid as far as Go/strconv are concerned, + // must be rejected because TOML says that a fractional + // part consists of '.' followed by 1+ digits. + p.panicItemf(it, "Invalid float %q: '.' must be followed by one or more digits", it.val) + } + val := strings.Replace(it.val, "_", "", -1) + if val == "+nan" || val == "-nan" { // Go doesn't support this, but TOML spec does. + val = "nan" + } + num, err := strconv.ParseFloat(val, 64) + if err != nil { + if e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange { + p.panicErr(it, errParseRange{i: it.val, size: "float64"}) + } else { + p.panicItemf(it, "Invalid float value: %q", it.val) + } + } + return num, p.typeOfPrimitive(it) +} + +var dtTypes = []struct { + fmt string + zone *time.Location + next bool +}{ + {time.RFC3339Nano, time.Local, false}, + {"2006-01-02T15:04:05.999999999", internal.LocalDatetime, false}, + {"2006-01-02", internal.LocalDate, false}, + {"15:04:05.999999999", internal.LocalTime, false}, + + // tomlNext + {"2006-01-02T15:04Z07:00", time.Local, true}, + {"2006-01-02T15:04", internal.LocalDatetime, true}, + {"15:04", internal.LocalTime, true}, +} + +func (p *parser) valueDatetime(it item) (interface{}, tomlType) { + it.val = datetimeRepl.Replace(it.val) + var ( + t time.Time + ok bool + err error + ) + for _, dt := range dtTypes { + if dt.next && !p.tomlNext { + continue + } + t, err = time.ParseInLocation(dt.fmt, it.val, dt.zone) + if err == nil { + ok = true + break + } + } + if !ok { + p.panicItemf(it, "Invalid TOML Datetime: %q.", it.val) + } + return t, p.typeOfPrimitive(it) +} + +func (p *parser) valueArray(it item) (interface{}, tomlType) { + p.setType(p.currentKey, tomlArray, it.pos) + + var ( + types []tomlType + + // Initialize to a non-nil empty slice. This makes it consistent with + // how S = [] decodes into a non-nil slice inside something like struct + // { S []string }. See #338 + array = []interface{}{} + ) + for it = p.next(); it.typ != itemArrayEnd; it = p.next() { + if it.typ == itemCommentStart { + p.expect(itemText) + continue + } + + val, typ := p.value(it, true) + array = append(array, val) + types = append(types, typ) + + // XXX: types isn't used here, we need it to record the accurate type + // information. + // + // Not entirely sure how to best store this; could use "key[0]", + // "key[1]" notation, or maybe store it on the Array type? + _ = types + } + return array, tomlArray +} + +func (p *parser) valueInlineTable(it item, parentIsArray bool) (interface{}, tomlType) { + var ( + hash = make(map[string]interface{}) + outerContext = p.context + outerKey = p.currentKey + ) + + p.context = append(p.context, p.currentKey) + prevContext := p.context + p.currentKey = "" + + p.addImplicit(p.context) + p.addContext(p.context, parentIsArray) + + /// Loop over all table key/value pairs. + for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() { + if it.typ == itemCommentStart { + p.expect(itemText) + continue + } + + /// Read all key parts. + k := p.nextPos() + var key Key + for ; k.typ != itemKeyEnd && k.typ != itemEOF; k = p.next() { + key = append(key, p.keyString(k)) + } + p.assertEqual(itemKeyEnd, k.typ) + + /// The current key is the last part. + p.currentKey = key[len(key)-1] + + /// All the other parts (if any) are the context; need to set each part + /// as implicit. + context := key[:len(key)-1] + for i := range context { + p.addImplicitContext(append(p.context, context[i:i+1]...)) + } + p.ordered = append(p.ordered, p.context.add(p.currentKey)) + + /// Set the value. + val, typ := p.value(p.next(), false) + p.set(p.currentKey, val, typ, it.pos) + hash[p.currentKey] = val + + /// Restore context. + p.context = prevContext + } + p.context = outerContext + p.currentKey = outerKey + return hash, tomlHash +} + +// numHasLeadingZero checks if this number has leading zeroes, allowing for '0', +// +/- signs, and base prefixes. +func numHasLeadingZero(s string) bool { + if len(s) > 1 && s[0] == '0' && !(s[1] == 'b' || s[1] == 'o' || s[1] == 'x') { // Allow 0b, 0o, 0x + return true + } + if len(s) > 2 && (s[0] == '-' || s[0] == '+') && s[1] == '0' { + return true + } + return false +} + +// numUnderscoresOK checks whether each underscore in s is surrounded by +// characters that are not underscores. +func numUnderscoresOK(s string) bool { + switch s { + case "nan", "+nan", "-nan", "inf", "-inf", "+inf": + return true + } + accept := false + for _, r := range s { + if r == '_' { + if !accept { + return false + } + } + + // isHexadecimal is a superset of all the permissable characters + // surrounding an underscore. + accept = isHexadecimal(r) + } + return accept +} + +// numPeriodsOK checks whether every period in s is followed by a digit. +func numPeriodsOK(s string) bool { + period := false + for _, r := range s { + if period && !isDigit(r) { + return false + } + period = r == '.' + } + return !period +} + +// Set the current context of the parser, where the context is either a hash or +// an array of hashes, depending on the value of the `array` parameter. +// +// Establishing the context also makes sure that the key isn't a duplicate, and +// will create implicit hashes automatically. +func (p *parser) addContext(key Key, array bool) { + var ok bool + + // Always start at the top level and drill down for our context. + hashContext := p.mapping + keyContext := make(Key, 0) + + // We only need implicit hashes for key[0:-1] + for _, k := range key[0 : len(key)-1] { + _, ok = hashContext[k] + keyContext = append(keyContext, k) + + // No key? Make an implicit hash and move on. + if !ok { + p.addImplicit(keyContext) + hashContext[k] = make(map[string]interface{}) + } + + // If the hash context is actually an array of tables, then set + // the hash context to the last element in that array. + // + // Otherwise, it better be a table, since this MUST be a key group (by + // virtue of it not being the last element in a key). + switch t := hashContext[k].(type) { + case []map[string]interface{}: + hashContext = t[len(t)-1] + case map[string]interface{}: + hashContext = t + default: + p.panicf("Key '%s' was already created as a hash.", keyContext) + } + } + + p.context = keyContext + if array { + // If this is the first element for this array, then allocate a new + // list of tables for it. + k := key[len(key)-1] + if _, ok := hashContext[k]; !ok { + hashContext[k] = make([]map[string]interface{}, 0, 4) + } + + // Add a new table. But make sure the key hasn't already been used + // for something else. + if hash, ok := hashContext[k].([]map[string]interface{}); ok { + hashContext[k] = append(hash, make(map[string]interface{})) + } else { + p.panicf("Key '%s' was already created and cannot be used as an array.", key) + } + } else { + p.setValue(key[len(key)-1], make(map[string]interface{})) + } + p.context = append(p.context, key[len(key)-1]) +} + +// set calls setValue and setType. +func (p *parser) set(key string, val interface{}, typ tomlType, pos Position) { + p.setValue(key, val) + p.setType(key, typ, pos) +} + +// setValue sets the given key to the given value in the current context. +// It will make sure that the key hasn't already been defined, account for +// implicit key groups. +func (p *parser) setValue(key string, value interface{}) { + var ( + tmpHash interface{} + ok bool + hash = p.mapping + keyContext Key + ) + for _, k := range p.context { + keyContext = append(keyContext, k) + if tmpHash, ok = hash[k]; !ok { + p.bug("Context for key '%s' has not been established.", keyContext) + } + switch t := tmpHash.(type) { + case []map[string]interface{}: + // The context is a table of hashes. Pick the most recent table + // defined as the current hash. + hash = t[len(t)-1] + case map[string]interface{}: + hash = t + default: + p.panicf("Key '%s' has already been defined.", keyContext) + } + } + keyContext = append(keyContext, key) + + if _, ok := hash[key]; ok { + // Normally redefining keys isn't allowed, but the key could have been + // defined implicitly and it's allowed to be redefined concretely. (See + // the `valid/implicit-and-explicit-after.toml` in toml-test) + // + // But we have to make sure to stop marking it as an implicit. (So that + // another redefinition provokes an error.) + // + // Note that since it has already been defined (as a hash), we don't + // want to overwrite it. So our business is done. + if p.isArray(keyContext) { + p.removeImplicit(keyContext) + hash[key] = value + return + } + if p.isImplicit(keyContext) { + p.removeImplicit(keyContext) + return + } + + // Otherwise, we have a concrete key trying to override a previous + // key, which is *always* wrong. + p.panicf("Key '%s' has already been defined.", keyContext) + } + + hash[key] = value +} + +// setType sets the type of a particular value at a given key. It should be +// called immediately AFTER setValue. +// +// Note that if `key` is empty, then the type given will be applied to the +// current context (which is either a table or an array of tables). +func (p *parser) setType(key string, typ tomlType, pos Position) { + keyContext := make(Key, 0, len(p.context)+1) + keyContext = append(keyContext, p.context...) + if len(key) > 0 { // allow type setting for hashes + keyContext = append(keyContext, key) + } + // Special case to make empty keys ("" = 1) work. + // Without it it will set "" rather than `""`. + // TODO: why is this needed? And why is this only needed here? + if len(keyContext) == 0 { + keyContext = Key{""} + } + p.keyInfo[keyContext.String()] = keyInfo{tomlType: typ, pos: pos} +} + +// Implicit keys need to be created when tables are implied in "a.b.c.d = 1" and +// "[a.b.c]" (the "a", "b", and "c" hashes are never created explicitly). +func (p *parser) addImplicit(key Key) { p.implicits[key.String()] = struct{}{} } +func (p *parser) removeImplicit(key Key) { delete(p.implicits, key.String()) } +func (p *parser) isImplicit(key Key) bool { _, ok := p.implicits[key.String()]; return ok } +func (p *parser) isArray(key Key) bool { return p.keyInfo[key.String()].tomlType == tomlArray } +func (p *parser) addImplicitContext(key Key) { p.addImplicit(key); p.addContext(key, false) } + +// current returns the full key name of the current context. +func (p *parser) current() string { + if len(p.currentKey) == 0 { + return p.context.String() + } + if len(p.context) == 0 { + return p.currentKey + } + return fmt.Sprintf("%s.%s", p.context, p.currentKey) +} + +func stripFirstNewline(s string) string { + if len(s) > 0 && s[0] == '\n' { + return s[1:] + } + if len(s) > 1 && s[0] == '\r' && s[1] == '\n' { + return s[2:] + } + return s +} + +// stripEscapedNewlines removes whitespace after line-ending backslashes in +// multiline strings. +// +// A line-ending backslash is an unescaped \ followed only by whitespace until +// the next newline. After a line-ending backslash, all whitespace is removed +// until the next non-whitespace character. +func (p *parser) stripEscapedNewlines(s string) string { + var b strings.Builder + var i int + for { + ix := strings.Index(s[i:], `\`) + if ix < 0 { + b.WriteString(s) + return b.String() + } + i += ix + + if len(s) > i+1 && s[i+1] == '\\' { + // Escaped backslash. + i += 2 + continue + } + // Scan until the next non-whitespace. + j := i + 1 + whitespaceLoop: + for ; j < len(s); j++ { + switch s[j] { + case ' ', '\t', '\r', '\n': + default: + break whitespaceLoop + } + } + if j == i+1 { + // Not a whitespace escape. + i++ + continue + } + if !strings.Contains(s[i:j], "\n") { + // This is not a line-ending backslash. + // (It's a bad escape sequence, but we can let + // replaceEscapes catch it.) + i++ + continue + } + b.WriteString(s[:i]) + s = s[j:] + i = 0 + } +} + +func (p *parser) replaceEscapes(it item, str string) string { + replaced := make([]rune, 0, len(str)) + s := []byte(str) + r := 0 + for r < len(s) { + if s[r] != '\\' { + c, size := utf8.DecodeRune(s[r:]) + r += size + replaced = append(replaced, c) + continue + } + r += 1 + if r >= len(s) { + p.bug("Escape sequence at end of string.") + return "" + } + switch s[r] { + default: + p.bug("Expected valid escape code after \\, but got %q.", s[r]) + case ' ', '\t': + p.panicItemf(it, "invalid escape: '\\%c'", s[r]) + case 'b': + replaced = append(replaced, rune(0x0008)) + r += 1 + case 't': + replaced = append(replaced, rune(0x0009)) + r += 1 + case 'n': + replaced = append(replaced, rune(0x000A)) + r += 1 + case 'f': + replaced = append(replaced, rune(0x000C)) + r += 1 + case 'r': + replaced = append(replaced, rune(0x000D)) + r += 1 + case 'e': + if p.tomlNext { + replaced = append(replaced, rune(0x001B)) + r += 1 + } + case '"': + replaced = append(replaced, rune(0x0022)) + r += 1 + case '\\': + replaced = append(replaced, rune(0x005C)) + r += 1 + case 'x': + if p.tomlNext { + escaped := p.asciiEscapeToUnicode(it, s[r+1:r+3]) + replaced = append(replaced, escaped) + r += 3 + } + case 'u': + // At this point, we know we have a Unicode escape of the form + // `uXXXX` at [r, r+5). (Because the lexer guarantees this + // for us.) + escaped := p.asciiEscapeToUnicode(it, s[r+1:r+5]) + replaced = append(replaced, escaped) + r += 5 + case 'U': + // At this point, we know we have a Unicode escape of the form + // `uXXXX` at [r, r+9). (Because the lexer guarantees this + // for us.) + escaped := p.asciiEscapeToUnicode(it, s[r+1:r+9]) + replaced = append(replaced, escaped) + r += 9 + } + } + return string(replaced) +} + +func (p *parser) asciiEscapeToUnicode(it item, bs []byte) rune { + s := string(bs) + hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32) + if err != nil { + p.bug("Could not parse '%s' as a hexadecimal number, but the lexer claims it's OK: %s", s, err) + } + if !utf8.ValidRune(rune(hex)) { + p.panicItemf(it, "Escaped character '\\u%s' is not valid UTF-8.", s) + } + return rune(hex) +} diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go new file mode 100644 index 000000000..254ca82e5 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/type_fields.go @@ -0,0 +1,242 @@ +package toml + +// Struct field handling is adapted from code in encoding/json: +// +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the Go distribution. + +import ( + "reflect" + "sort" + "sync" +) + +// A field represents a single field found in a struct. +type field struct { + name string // the name of the field (`toml` tag included) + tag bool // whether field has a `toml` tag + index []int // represents the depth of an anonymous field + typ reflect.Type // the type of the field +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from toml tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that TOML should recognize for the given +// type. The algorithm is breadth-first search over the set of structs to +// include - the top struct and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + var count map[reflect.Type]int + var nextCount map[reflect.Type]int + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" && !sf.Anonymous { // unexported + continue + } + opts := getOptions(sf.Tag) + if opts.skip { + continue + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := opts.name != "" + name := opts.name + if name == "" { + name = sf.Name + } + fields = append(fields, field{name, tagged, index, ft}) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + f := field{name: ft.Name(), index: index, typ: ft} + next = append(next, f) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with TOML tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// TOML tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} diff --git a/vendor/github.com/BurntSushi/toml/type_toml.go b/vendor/github.com/BurntSushi/toml/type_toml.go new file mode 100644 index 000000000..4e90d7737 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/type_toml.go @@ -0,0 +1,70 @@ +package toml + +// tomlType represents any Go type that corresponds to a TOML type. +// While the first draft of the TOML spec has a simplistic type system that +// probably doesn't need this level of sophistication, we seem to be militating +// toward adding real composite types. +type tomlType interface { + typeString() string +} + +// typeEqual accepts any two types and returns true if they are equal. +func typeEqual(t1, t2 tomlType) bool { + if t1 == nil || t2 == nil { + return false + } + return t1.typeString() == t2.typeString() +} + +func typeIsTable(t tomlType) bool { + return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash) +} + +type tomlBaseType string + +func (btype tomlBaseType) typeString() string { + return string(btype) +} + +func (btype tomlBaseType) String() string { + return btype.typeString() +} + +var ( + tomlInteger tomlBaseType = "Integer" + tomlFloat tomlBaseType = "Float" + tomlDatetime tomlBaseType = "Datetime" + tomlString tomlBaseType = "String" + tomlBool tomlBaseType = "Bool" + tomlArray tomlBaseType = "Array" + tomlHash tomlBaseType = "Hash" + tomlArrayHash tomlBaseType = "ArrayHash" +) + +// typeOfPrimitive returns a tomlType of any primitive value in TOML. +// Primitive values are: Integer, Float, Datetime, String and Bool. +// +// Passing a lexer item other than the following will cause a BUG message +// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime. +func (p *parser) typeOfPrimitive(lexItem item) tomlType { + switch lexItem.typ { + case itemInteger: + return tomlInteger + case itemFloat: + return tomlFloat + case itemDatetime: + return tomlDatetime + case itemString: + return tomlString + case itemMultilineString: + return tomlString + case itemRawString: + return tomlString + case itemRawMultilineString: + return tomlString + case itemBool: + return tomlBool + } + p.bug("Cannot infer primitive type of lex item '%s'.", lexItem) + panic("unreachable") +} diff --git a/vendor/github.com/Masterminds/goutils/.travis.yml b/vendor/github.com/Masterminds/goutils/.travis.yml new file mode 100644 index 000000000..4025e01ec --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/.travis.yml @@ -0,0 +1,18 @@ +language: go + +go: + - 1.6 + - 1.7 + - 1.8 + - tip + +script: + - go test -v + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/06e3328629952dabe3e0 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always diff --git a/vendor/github.com/Masterminds/goutils/CHANGELOG.md b/vendor/github.com/Masterminds/goutils/CHANGELOG.md new file mode 100644 index 000000000..d700ec47f --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/CHANGELOG.md @@ -0,0 +1,8 @@ +# 1.0.1 (2017-05-31) + +## Fixed +- #21: Fix generation of alphanumeric strings (thanks @dbarranco) + +# 1.0.0 (2014-04-30) + +- Initial release. diff --git a/vendor/github.com/Masterminds/goutils/LICENSE.txt b/vendor/github.com/Masterminds/goutils/LICENSE.txt new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/Masterminds/goutils/README.md b/vendor/github.com/Masterminds/goutils/README.md new file mode 100644 index 000000000..163ffe72a --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/README.md @@ -0,0 +1,70 @@ +GoUtils +=========== +[![Stability: Maintenance](https://masterminds.github.io/stability/maintenance.svg)](https://masterminds.github.io/stability/maintenance.html) +[![GoDoc](https://godoc.org/github.com/Masterminds/goutils?status.png)](https://godoc.org/github.com/Masterminds/goutils) [![Build Status](https://travis-ci.org/Masterminds/goutils.svg?branch=master)](https://travis-ci.org/Masterminds/goutils) [![Build status](https://ci.appveyor.com/api/projects/status/sc2b1ew0m7f0aiju?svg=true)](https://ci.appveyor.com/project/mattfarina/goutils) + + +GoUtils provides users with utility functions to manipulate strings in various ways. It is a Go implementation of some +string manipulation libraries of Java Apache Commons. GoUtils includes the following Java Apache Commons classes: +* WordUtils +* RandomStringUtils +* StringUtils (partial implementation) + +## Installation +If you have Go set up on your system, from the GOPATH directory within the command line/terminal, enter this: + + go get github.com/Masterminds/goutils + +If you do not have Go set up on your system, please follow the [Go installation directions from the documenation](http://golang.org/doc/install), and then follow the instructions above to install GoUtils. + + +## Documentation +GoUtils doc is available here: [![GoDoc](https://godoc.org/github.com/Masterminds/goutils?status.png)](https://godoc.org/github.com/Masterminds/goutils) + + +## Usage +The code snippets below show examples of how to use GoUtils. Some functions return errors while others do not. The first instance below, which does not return an error, is the `Initials` function (located within the `wordutils.go` file). + + package main + + import ( + "fmt" + "github.com/Masterminds/goutils" + ) + + func main() { + + // EXAMPLE 1: A goutils function which returns no errors + fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" + + } +Some functions return errors mainly due to illegal arguements used as parameters. The code example below illustrates how to deal with function that returns an error. In this instance, the function is the `Random` function (located within the `randomstringutils.go` file). + + package main + + import ( + "fmt" + "github.com/Masterminds/goutils" + ) + + func main() { + + // EXAMPLE 2: A goutils function which returns an error + rand1, err1 := goutils.Random (-1, 0, 0, true, true) + + if err1 != nil { + fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) + } else { + fmt.Println(rand1) + } + + } + +## License +GoUtils is licensed under the Apache License, Version 2.0. Please check the LICENSE.txt file or visit http://www.apache.org/licenses/LICENSE-2.0 for a copy of the license. + +## Issue Reporting +Make suggestions or report issues using the Git issue tracker: https://github.com/Masterminds/goutils/issues + +## Website +* [GoUtils webpage](http://Masterminds.github.io/goutils/) diff --git a/vendor/github.com/Masterminds/goutils/appveyor.yml b/vendor/github.com/Masterminds/goutils/appveyor.yml new file mode 100644 index 000000000..657564a84 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/appveyor.yml @@ -0,0 +1,21 @@ +version: build-{build}.{branch} + +clone_folder: C:\gopath\src\github.com\Masterminds\goutils +shallow_clone: true + +environment: + GOPATH: C:\gopath + +platform: + - x64 + +build: off + +install: + - go version + - go env + +test_script: + - go test -v + +deploy: off diff --git a/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go b/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go new file mode 100644 index 000000000..8dbd92485 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go @@ -0,0 +1,230 @@ +/* +Copyright 2014 Alexander Okoli + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package goutils + +import ( + "crypto/rand" + "fmt" + "math" + "math/big" + "unicode" +) + +/* +CryptoRandomNonAlphaNumeric creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of all characters (ASCII/Unicode values between 0 to 2,147,483,647 (math.MaxInt32)). + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) +*/ +func CryptoRandomNonAlphaNumeric(count int) (string, error) { + return CryptoRandomAlphaNumericCustom(count, false, false) +} + +/* +CryptoRandomAscii creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of characters whose ASCII value is between 32 and 126 (inclusive). + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) +*/ +func CryptoRandomAscii(count int) (string, error) { + return CryptoRandom(count, 32, 127, false, false) +} + +/* +CryptoRandomNumeric creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of numeric characters. + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) +*/ +func CryptoRandomNumeric(count int) (string, error) { + return CryptoRandom(count, 0, 0, false, true) +} + +/* +CryptoRandomAlphabetic creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. + +Parameters: + count - the length of random string to create + letters - if true, generated string may include alphabetic characters + numbers - if true, generated string may include numeric characters + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) +*/ +func CryptoRandomAlphabetic(count int) (string, error) { + return CryptoRandom(count, 0, 0, true, false) +} + +/* +CryptoRandomAlphaNumeric creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of alpha-numeric characters. + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) +*/ +func CryptoRandomAlphaNumeric(count int) (string, error) { + return CryptoRandom(count, 0, 0, true, true) +} + +/* +CryptoRandomAlphaNumericCustom creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. + +Parameters: + count - the length of random string to create + letters - if true, generated string may include alphabetic characters + numbers - if true, generated string may include numeric characters + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) +*/ +func CryptoRandomAlphaNumericCustom(count int, letters bool, numbers bool) (string, error) { + return CryptoRandom(count, 0, 0, letters, numbers) +} + +/* +CryptoRandom creates a random string based on a variety of options, using using golang's crypto/rand source of randomness. +If the parameters start and end are both 0, start and end are set to ' ' and 'z', the ASCII printable characters, will be used, +unless letters and numbers are both false, in which case, start and end are set to 0 and math.MaxInt32, respectively. +If chars is not nil, characters stored in chars that are between start and end are chosen. + +Parameters: + count - the length of random string to create + start - the position in set of chars (ASCII/Unicode int) to start at + end - the position in set of chars (ASCII/Unicode int) to end before + letters - if true, generated string may include alphabetic characters + numbers - if true, generated string may include numeric characters + chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. + +Returns: + string - the random string + error - an error stemming from invalid parameters: if count < 0; or the provided chars array is empty; or end <= start; or end > len(chars) +*/ +func CryptoRandom(count int, start int, end int, letters bool, numbers bool, chars ...rune) (string, error) { + if count == 0 { + return "", nil + } else if count < 0 { + err := fmt.Errorf("randomstringutils illegal argument: Requested random string length %v is less than 0.", count) // equiv to err := errors.New("...") + return "", err + } + if chars != nil && len(chars) == 0 { + err := fmt.Errorf("randomstringutils illegal argument: The chars array must not be empty") + return "", err + } + + if start == 0 && end == 0 { + if chars != nil { + end = len(chars) + } else { + if !letters && !numbers { + end = math.MaxInt32 + } else { + end = 'z' + 1 + start = ' ' + } + } + } else { + if end <= start { + err := fmt.Errorf("randomstringutils illegal argument: Parameter end (%v) must be greater than start (%v)", end, start) + return "", err + } + + if chars != nil && end > len(chars) { + err := fmt.Errorf("randomstringutils illegal argument: Parameter end (%v) cannot be greater than len(chars) (%v)", end, len(chars)) + return "", err + } + } + + buffer := make([]rune, count) + gap := end - start + + // high-surrogates range, (\uD800-\uDBFF) = 55296 - 56319 + // low-surrogates range, (\uDC00-\uDFFF) = 56320 - 57343 + + for count != 0 { + count-- + var ch rune + if chars == nil { + ch = rune(getCryptoRandomInt(gap) + int64(start)) + } else { + ch = chars[getCryptoRandomInt(gap)+int64(start)] + } + + if letters && unicode.IsLetter(ch) || numbers && unicode.IsDigit(ch) || !letters && !numbers { + if ch >= 56320 && ch <= 57343 { // low surrogate range + if count == 0 { + count++ + } else { + // Insert low surrogate + buffer[count] = ch + count-- + // Insert high surrogate + buffer[count] = rune(55296 + getCryptoRandomInt(128)) + } + } else if ch >= 55296 && ch <= 56191 { // High surrogates range (Partial) + if count == 0 { + count++ + } else { + // Insert low surrogate + buffer[count] = rune(56320 + getCryptoRandomInt(128)) + count-- + // Insert high surrogate + buffer[count] = ch + } + } else if ch >= 56192 && ch <= 56319 { + // private high surrogate, skip it + count++ + } else { + // not one of the surrogates* + buffer[count] = ch + } + } else { + count++ + } + } + return string(buffer), nil +} + +func getCryptoRandomInt(count int) int64 { + nBig, err := rand.Int(rand.Reader, big.NewInt(int64(count))) + if err != nil { + panic(err) + } + return nBig.Int64() +} diff --git a/vendor/github.com/Masterminds/goutils/randomstringutils.go b/vendor/github.com/Masterminds/goutils/randomstringutils.go new file mode 100644 index 000000000..272670231 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/randomstringutils.go @@ -0,0 +1,248 @@ +/* +Copyright 2014 Alexander Okoli + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package goutils + +import ( + "fmt" + "math" + "math/rand" + "time" + "unicode" +) + +// RANDOM provides the time-based seed used to generate random numbers +var RANDOM = rand.New(rand.NewSource(time.Now().UnixNano())) + +/* +RandomNonAlphaNumeric creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of all characters (ASCII/Unicode values between 0 to 2,147,483,647 (math.MaxInt32)). + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func RandomNonAlphaNumeric(count int) (string, error) { + return RandomAlphaNumericCustom(count, false, false) +} + +/* +RandomAscii creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of characters whose ASCII value is between 32 and 126 (inclusive). + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func RandomAscii(count int) (string, error) { + return Random(count, 32, 127, false, false) +} + +/* +RandomNumeric creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of numeric characters. + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func RandomNumeric(count int) (string, error) { + return Random(count, 0, 0, false, true) +} + +/* +RandomAlphabetic creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of alphabetic characters. + +Parameters: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func RandomAlphabetic(count int) (string, error) { + return Random(count, 0, 0, true, false) +} + +/* +RandomAlphaNumeric creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of alpha-numeric characters. + +Parameter: + count - the length of random string to create + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func RandomAlphaNumeric(count int) (string, error) { + return Random(count, 0, 0, true, true) +} + +/* +RandomAlphaNumericCustom creates a random string whose length is the number of characters specified. +Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. + +Parameters: + count - the length of random string to create + letters - if true, generated string may include alphabetic characters + numbers - if true, generated string may include numeric characters + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func RandomAlphaNumericCustom(count int, letters bool, numbers bool) (string, error) { + return Random(count, 0, 0, letters, numbers) +} + +/* +Random creates a random string based on a variety of options, using default source of randomness. +This method has exactly the same semantics as RandomSeed(int, int, int, bool, bool, []char, *rand.Rand), but +instead of using an externally supplied source of randomness, it uses the internal *rand.Rand instance. + +Parameters: + count - the length of random string to create + start - the position in set of chars (ASCII/Unicode int) to start at + end - the position in set of chars (ASCII/Unicode int) to end before + letters - if true, generated string may include alphabetic characters + numbers - if true, generated string may include numeric characters + chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. + +Returns: + string - the random string + error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) +*/ +func Random(count int, start int, end int, letters bool, numbers bool, chars ...rune) (string, error) { + return RandomSeed(count, start, end, letters, numbers, chars, RANDOM) +} + +/* +RandomSeed creates a random string based on a variety of options, using supplied source of randomness. +If the parameters start and end are both 0, start and end are set to ' ' and 'z', the ASCII printable characters, will be used, +unless letters and numbers are both false, in which case, start and end are set to 0 and math.MaxInt32, respectively. +If chars is not nil, characters stored in chars that are between start and end are chosen. +This method accepts a user-supplied *rand.Rand instance to use as a source of randomness. By seeding a single *rand.Rand instance +with a fixed seed and using it for each call, the same random sequence of strings can be generated repeatedly and predictably. + +Parameters: + count - the length of random string to create + start - the position in set of chars (ASCII/Unicode decimals) to start at + end - the position in set of chars (ASCII/Unicode decimals) to end before + letters - if true, generated string may include alphabetic characters + numbers - if true, generated string may include numeric characters + chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. + random - a source of randomness. + +Returns: + string - the random string + error - an error stemming from invalid parameters: if count < 0; or the provided chars array is empty; or end <= start; or end > len(chars) +*/ +func RandomSeed(count int, start int, end int, letters bool, numbers bool, chars []rune, random *rand.Rand) (string, error) { + + if count == 0 { + return "", nil + } else if count < 0 { + err := fmt.Errorf("randomstringutils illegal argument: Requested random string length %v is less than 0.", count) // equiv to err := errors.New("...") + return "", err + } + if chars != nil && len(chars) == 0 { + err := fmt.Errorf("randomstringutils illegal argument: The chars array must not be empty") + return "", err + } + + if start == 0 && end == 0 { + if chars != nil { + end = len(chars) + } else { + if !letters && !numbers { + end = math.MaxInt32 + } else { + end = 'z' + 1 + start = ' ' + } + } + } else { + if end <= start { + err := fmt.Errorf("randomstringutils illegal argument: Parameter end (%v) must be greater than start (%v)", end, start) + return "", err + } + + if chars != nil && end > len(chars) { + err := fmt.Errorf("randomstringutils illegal argument: Parameter end (%v) cannot be greater than len(chars) (%v)", end, len(chars)) + return "", err + } + } + + buffer := make([]rune, count) + gap := end - start + + // high-surrogates range, (\uD800-\uDBFF) = 55296 - 56319 + // low-surrogates range, (\uDC00-\uDFFF) = 56320 - 57343 + + for count != 0 { + count-- + var ch rune + if chars == nil { + ch = rune(random.Intn(gap) + start) + } else { + ch = chars[random.Intn(gap)+start] + } + + if letters && unicode.IsLetter(ch) || numbers && unicode.IsDigit(ch) || !letters && !numbers { + if ch >= 56320 && ch <= 57343 { // low surrogate range + if count == 0 { + count++ + } else { + // Insert low surrogate + buffer[count] = ch + count-- + // Insert high surrogate + buffer[count] = rune(55296 + random.Intn(128)) + } + } else if ch >= 55296 && ch <= 56191 { // High surrogates range (Partial) + if count == 0 { + count++ + } else { + // Insert low surrogate + buffer[count] = rune(56320 + random.Intn(128)) + count-- + // Insert high surrogate + buffer[count] = ch + } + } else if ch >= 56192 && ch <= 56319 { + // private high surrogate, skip it + count++ + } else { + // not one of the surrogates* + buffer[count] = ch + } + } else { + count++ + } + } + return string(buffer), nil +} diff --git a/vendor/github.com/Masterminds/goutils/stringutils.go b/vendor/github.com/Masterminds/goutils/stringutils.go new file mode 100644 index 000000000..741bb530e --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/stringutils.go @@ -0,0 +1,240 @@ +/* +Copyright 2014 Alexander Okoli + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package goutils + +import ( + "bytes" + "fmt" + "strings" + "unicode" +) + +// Typically returned by functions where a searched item cannot be found +const INDEX_NOT_FOUND = -1 + +/* +Abbreviate abbreviates a string using ellipses. This will turn the string "Now is the time for all good men" into "Now is the time for..." + +Specifically, the algorithm is as follows: + + - If str is less than maxWidth characters long, return it. + - Else abbreviate it to (str[0:maxWidth - 3] + "..."). + - If maxWidth is less than 4, return an illegal argument error. + - In no case will it return a string of length greater than maxWidth. + +Parameters: + str - the string to check + maxWidth - maximum length of result string, must be at least 4 + +Returns: + string - abbreviated string + error - if the width is too small +*/ +func Abbreviate(str string, maxWidth int) (string, error) { + return AbbreviateFull(str, 0, maxWidth) +} + +/* +AbbreviateFull abbreviates a string using ellipses. This will turn the string "Now is the time for all good men" into "...is the time for..." +This function works like Abbreviate(string, int), but allows you to specify a "left edge" offset. Note that this left edge is not +necessarily going to be the leftmost character in the result, or the first character following the ellipses, but it will appear +somewhere in the result. +In no case will it return a string of length greater than maxWidth. + +Parameters: + str - the string to check + offset - left edge of source string + maxWidth - maximum length of result string, must be at least 4 + +Returns: + string - abbreviated string + error - if the width is too small +*/ +func AbbreviateFull(str string, offset int, maxWidth int) (string, error) { + if str == "" { + return "", nil + } + if maxWidth < 4 { + err := fmt.Errorf("stringutils illegal argument: Minimum abbreviation width is 4") + return "", err + } + if len(str) <= maxWidth { + return str, nil + } + if offset > len(str) { + offset = len(str) + } + if len(str)-offset < (maxWidth - 3) { // 15 - 5 < 10 - 3 = 10 < 7 + offset = len(str) - (maxWidth - 3) + } + abrevMarker := "..." + if offset <= 4 { + return str[0:maxWidth-3] + abrevMarker, nil // str.substring(0, maxWidth - 3) + abrevMarker; + } + if maxWidth < 7 { + err := fmt.Errorf("stringutils illegal argument: Minimum abbreviation width with offset is 7") + return "", err + } + if (offset + maxWidth - 3) < len(str) { // 5 + (10-3) < 15 = 12 < 15 + abrevStr, _ := Abbreviate(str[offset:len(str)], (maxWidth - 3)) + return abrevMarker + abrevStr, nil // abrevMarker + abbreviate(str.substring(offset), maxWidth - 3); + } + return abrevMarker + str[(len(str)-(maxWidth-3)):len(str)], nil // abrevMarker + str.substring(str.length() - (maxWidth - 3)); +} + +/* +DeleteWhiteSpace deletes all whitespaces from a string as defined by unicode.IsSpace(rune). +It returns the string without whitespaces. + +Parameter: + str - the string to delete whitespace from, may be nil + +Returns: + the string without whitespaces +*/ +func DeleteWhiteSpace(str string) string { + if str == "" { + return str + } + sz := len(str) + var chs bytes.Buffer + count := 0 + for i := 0; i < sz; i++ { + ch := rune(str[i]) + if !unicode.IsSpace(ch) { + chs.WriteRune(ch) + count++ + } + } + if count == sz { + return str + } + return chs.String() +} + +/* +IndexOfDifference compares two strings, and returns the index at which the strings begin to differ. + +Parameters: + str1 - the first string + str2 - the second string + +Returns: + the index where str1 and str2 begin to differ; -1 if they are equal +*/ +func IndexOfDifference(str1 string, str2 string) int { + if str1 == str2 { + return INDEX_NOT_FOUND + } + if IsEmpty(str1) || IsEmpty(str2) { + return 0 + } + var i int + for i = 0; i < len(str1) && i < len(str2); i++ { + if rune(str1[i]) != rune(str2[i]) { + break + } + } + if i < len(str2) || i < len(str1) { + return i + } + return INDEX_NOT_FOUND +} + +/* +IsBlank checks if a string is whitespace or empty (""). Observe the following behavior: + + goutils.IsBlank("") = true + goutils.IsBlank(" ") = true + goutils.IsBlank("bob") = false + goutils.IsBlank(" bob ") = false + +Parameter: + str - the string to check + +Returns: + true - if the string is whitespace or empty ("") +*/ +func IsBlank(str string) bool { + strLen := len(str) + if str == "" || strLen == 0 { + return true + } + for i := 0; i < strLen; i++ { + if unicode.IsSpace(rune(str[i])) == false { + return false + } + } + return true +} + +/* +IndexOf returns the index of the first instance of sub in str, with the search beginning from the +index start point specified. -1 is returned if sub is not present in str. + +An empty string ("") will return -1 (INDEX_NOT_FOUND). A negative start position is treated as zero. +A start position greater than the string length returns -1. + +Parameters: + str - the string to check + sub - the substring to find + start - the start position; negative treated as zero + +Returns: + the first index where the sub string was found (always >= start) +*/ +func IndexOf(str string, sub string, start int) int { + + if start < 0 { + start = 0 + } + + if len(str) < start { + return INDEX_NOT_FOUND + } + + if IsEmpty(str) || IsEmpty(sub) { + return INDEX_NOT_FOUND + } + + partialIndex := strings.Index(str[start:len(str)], sub) + if partialIndex == -1 { + return INDEX_NOT_FOUND + } + return partialIndex + start +} + +// IsEmpty checks if a string is empty (""). Returns true if empty, and false otherwise. +func IsEmpty(str string) bool { + return len(str) == 0 +} + +// Returns either the passed in string, or if the string is empty, the value of defaultStr. +func DefaultString(str string, defaultStr string) string { + if IsEmpty(str) { + return defaultStr + } + return str +} + +// Returns either the passed in string, or if the string is whitespace, empty (""), the value of defaultStr. +func DefaultIfBlank(str string, defaultStr string) string { + if IsBlank(str) { + return defaultStr + } + return str +} diff --git a/vendor/github.com/Masterminds/goutils/wordutils.go b/vendor/github.com/Masterminds/goutils/wordutils.go new file mode 100644 index 000000000..034cad8e2 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/wordutils.go @@ -0,0 +1,357 @@ +/* +Copyright 2014 Alexander Okoli + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package goutils provides utility functions to manipulate strings in various ways. +The code snippets below show examples of how to use goutils. Some functions return +errors while others do not, so usage would vary as a result. + +Example: + + package main + + import ( + "fmt" + "github.com/aokoli/goutils" + ) + + func main() { + + // EXAMPLE 1: A goutils function which returns no errors + fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" + + + + // EXAMPLE 2: A goutils function which returns an error + rand1, err1 := goutils.Random (-1, 0, 0, true, true) + + if err1 != nil { + fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) + } else { + fmt.Println(rand1) + } + } +*/ +package goutils + +import ( + "bytes" + "strings" + "unicode" +) + +// VERSION indicates the current version of goutils +const VERSION = "1.0.0" + +/* +Wrap wraps a single line of text, identifying words by ' '. +New lines will be separated by '\n'. Very long words, such as URLs will not be wrapped. +Leading spaces on a new line are stripped. Trailing spaces are not stripped. + +Parameters: + str - the string to be word wrapped + wrapLength - the column (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 + +Returns: + a line with newlines inserted +*/ +func Wrap(str string, wrapLength int) string { + return WrapCustom(str, wrapLength, "", false) +} + +/* +WrapCustom wraps a single line of text, identifying words by ' '. +Leading spaces on a new line are stripped. Trailing spaces are not stripped. + +Parameters: + str - the string to be word wrapped + wrapLength - the column number (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 + newLineStr - the string to insert for a new line, "" uses '\n' + wrapLongWords - true if long words (such as URLs) should be wrapped + +Returns: + a line with newlines inserted +*/ +func WrapCustom(str string, wrapLength int, newLineStr string, wrapLongWords bool) string { + + if str == "" { + return "" + } + if newLineStr == "" { + newLineStr = "\n" // TODO Assumes "\n" is seperator. Explore SystemUtils.LINE_SEPARATOR from Apache Commons + } + if wrapLength < 1 { + wrapLength = 1 + } + + inputLineLength := len(str) + offset := 0 + + var wrappedLine bytes.Buffer + + for inputLineLength-offset > wrapLength { + + if rune(str[offset]) == ' ' { + offset++ + continue + } + + end := wrapLength + offset + 1 + spaceToWrapAt := strings.LastIndex(str[offset:end], " ") + offset + + if spaceToWrapAt >= offset { + // normal word (not longer than wrapLength) + wrappedLine.WriteString(str[offset:spaceToWrapAt]) + wrappedLine.WriteString(newLineStr) + offset = spaceToWrapAt + 1 + + } else { + // long word or URL + if wrapLongWords { + end := wrapLength + offset + // long words are wrapped one line at a time + wrappedLine.WriteString(str[offset:end]) + wrappedLine.WriteString(newLineStr) + offset += wrapLength + } else { + // long words aren't wrapped, just extended beyond limit + end := wrapLength + offset + index := strings.IndexRune(str[end:len(str)], ' ') + if index == -1 { + wrappedLine.WriteString(str[offset:len(str)]) + offset = inputLineLength + } else { + spaceToWrapAt = index + end + wrappedLine.WriteString(str[offset:spaceToWrapAt]) + wrappedLine.WriteString(newLineStr) + offset = spaceToWrapAt + 1 + } + } + } + } + + wrappedLine.WriteString(str[offset:len(str)]) + + return wrappedLine.String() + +} + +/* +Capitalize capitalizes all the delimiter separated words in a string. Only the first letter of each word is changed. +To convert the rest of each word to lowercase at the same time, use CapitalizeFully(str string, delimiters ...rune). +The delimiters represent a set of characters understood to separate words. The first string character +and the first non-delimiter character after a delimiter will be capitalized. A "" input string returns "". +Capitalization uses the Unicode title case, normally equivalent to upper case. + +Parameters: + str - the string to capitalize + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + +Returns: + capitalized string +*/ +func Capitalize(str string, delimiters ...rune) string { + + var delimLen int + + if delimiters == nil { + delimLen = -1 + } else { + delimLen = len(delimiters) + } + + if str == "" || delimLen == 0 { + return str + } + + buffer := []rune(str) + capitalizeNext := true + for i := 0; i < len(buffer); i++ { + ch := buffer[i] + if isDelimiter(ch, delimiters...) { + capitalizeNext = true + } else if capitalizeNext { + buffer[i] = unicode.ToTitle(ch) + capitalizeNext = false + } + } + return string(buffer) + +} + +/* +CapitalizeFully converts all the delimiter separated words in a string into capitalized words, that is each word is made up of a +titlecase character and then a series of lowercase characters. The delimiters represent a set of characters understood +to separate words. The first string character and the first non-delimiter character after a delimiter will be capitalized. +Capitalization uses the Unicode title case, normally equivalent to upper case. + +Parameters: + str - the string to capitalize fully + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + +Returns: + capitalized string +*/ +func CapitalizeFully(str string, delimiters ...rune) string { + + var delimLen int + + if delimiters == nil { + delimLen = -1 + } else { + delimLen = len(delimiters) + } + + if str == "" || delimLen == 0 { + return str + } + str = strings.ToLower(str) + return Capitalize(str, delimiters...) +} + +/* +Uncapitalize uncapitalizes all the whitespace separated words in a string. Only the first letter of each word is changed. +The delimiters represent a set of characters understood to separate words. The first string character and the first non-delimiter +character after a delimiter will be uncapitalized. Whitespace is defined by unicode.IsSpace(char). + +Parameters: + str - the string to uncapitalize fully + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + +Returns: + uncapitalized string +*/ +func Uncapitalize(str string, delimiters ...rune) string { + + var delimLen int + + if delimiters == nil { + delimLen = -1 + } else { + delimLen = len(delimiters) + } + + if str == "" || delimLen == 0 { + return str + } + + buffer := []rune(str) + uncapitalizeNext := true // TODO Always makes capitalize/un apply to first char. + for i := 0; i < len(buffer); i++ { + ch := buffer[i] + if isDelimiter(ch, delimiters...) { + uncapitalizeNext = true + } else if uncapitalizeNext { + buffer[i] = unicode.ToLower(ch) + uncapitalizeNext = false + } + } + return string(buffer) +} + +/* +SwapCase swaps the case of a string using a word based algorithm. + +Conversion algorithm: + + Upper case character converts to Lower case + Title case character converts to Lower case + Lower case character after Whitespace or at start converts to Title case + Other Lower case character converts to Upper case + Whitespace is defined by unicode.IsSpace(char). + +Parameters: + str - the string to swap case + +Returns: + the changed string +*/ +func SwapCase(str string) string { + if str == "" { + return str + } + buffer := []rune(str) + + whitespace := true + + for i := 0; i < len(buffer); i++ { + ch := buffer[i] + if unicode.IsUpper(ch) { + buffer[i] = unicode.ToLower(ch) + whitespace = false + } else if unicode.IsTitle(ch) { + buffer[i] = unicode.ToLower(ch) + whitespace = false + } else if unicode.IsLower(ch) { + if whitespace { + buffer[i] = unicode.ToTitle(ch) + whitespace = false + } else { + buffer[i] = unicode.ToUpper(ch) + } + } else { + whitespace = unicode.IsSpace(ch) + } + } + return string(buffer) +} + +/* +Initials extracts the initial letters from each word in the string. The first letter of the string and all first +letters after the defined delimiters are returned as a new string. Their case is not changed. If the delimiters +parameter is excluded, then Whitespace is used. Whitespace is defined by unicode.IsSpacea(char). An empty delimiter array returns an empty string. + +Parameters: + str - the string to get initials from + delimiters - set of characters to determine words, exclusion of this parameter means whitespace would be delimeter +Returns: + string of initial letters +*/ +func Initials(str string, delimiters ...rune) string { + if str == "" { + return str + } + if delimiters != nil && len(delimiters) == 0 { + return "" + } + strLen := len(str) + var buf bytes.Buffer + lastWasGap := true + for i := 0; i < strLen; i++ { + ch := rune(str[i]) + + if isDelimiter(ch, delimiters...) { + lastWasGap = true + } else if lastWasGap { + buf.WriteRune(ch) + lastWasGap = false + } + } + return buf.String() +} + +// private function (lower case func name) +func isDelimiter(ch rune, delimiters ...rune) bool { + if delimiters == nil { + return unicode.IsSpace(ch) + } + for _, delimiter := range delimiters { + if ch == delimiter { + return true + } + } + return false +} diff --git a/vendor/github.com/Masterminds/semver/v3/.gitignore b/vendor/github.com/Masterminds/semver/v3/.gitignore new file mode 100644 index 000000000..6b061e617 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/.gitignore @@ -0,0 +1 @@ +_fuzz/ \ No newline at end of file diff --git a/vendor/github.com/Masterminds/semver/v3/.golangci.yml b/vendor/github.com/Masterminds/semver/v3/.golangci.yml new file mode 100644 index 000000000..fbc633259 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/.golangci.yml @@ -0,0 +1,27 @@ +run: + deadline: 2m + +linters: + disable-all: true + enable: + - misspell + - govet + - staticcheck + - errcheck + - unparam + - ineffassign + - nakedret + - gocyclo + - dupl + - goimports + - revive + - gosec + - gosimple + - typecheck + - unused + +linters-settings: + gofmt: + simplify: true + dupl: + threshold: 600 diff --git a/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md new file mode 100644 index 000000000..f95a504fe --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md @@ -0,0 +1,242 @@ +# Changelog + +## 3.3.0 (2024-08-27) + +### Added + +- #238: Add LessThanEqual and GreaterThanEqual functions (thanks @grosser) +- #213: nil version equality checking (thanks @KnutZuidema) + +### Changed + +- #241: Simplify StrictNewVersion parsing (thanks @grosser) +- Testing support up through Go 1.23 +- Minimum version set to 1.21 as this is what's tested now +- Fuzz testing now supports caching + +## 3.2.1 (2023-04-10) + +### Changed + +- #198: Improved testing around pre-release names +- #200: Improved code scanning with addition of CodeQL +- #201: Testing now includes Go 1.20. Go 1.17 has been dropped +- #202: Migrated Fuzz testing to Go built-in Fuzzing. CI runs daily +- #203: Docs updated for security details + +### Fixed + +- #199: Fixed issue with range transformations + +## 3.2.0 (2022-11-28) + +### Added + +- #190: Added text marshaling and unmarshaling +- #167: Added JSON marshalling for constraints (thanks @SimonTheLeg) +- #173: Implement encoding.TextMarshaler and encoding.TextUnmarshaler on Version (thanks @MarkRosemaker) +- #179: Added New() version constructor (thanks @kazhuravlev) + +### Changed + +- #182/#183: Updated CI testing setup + +### Fixed + +- #186: Fixing issue where validation of constraint section gave false positives +- #176: Fix constraints check with *-0 (thanks @mtt0) +- #181: Fixed Caret operator (^) gives unexpected results when the minor version in constraint is 0 (thanks @arshchimni) +- #161: Fixed godoc (thanks @afirth) + +## 3.1.1 (2020-11-23) + +### Fixed + +- #158: Fixed issue with generated regex operation order that could cause problem + +## 3.1.0 (2020-04-15) + +### Added + +- #131: Add support for serializing/deserializing SQL (thanks @ryancurrah) + +### Changed + +- #148: More accurate validation messages on constraints + +## 3.0.3 (2019-12-13) + +### Fixed + +- #141: Fixed issue with <= comparison + +## 3.0.2 (2019-11-14) + +### Fixed + +- #134: Fixed broken constraint checking with ^0.0 (thanks @krmichelos) + +## 3.0.1 (2019-09-13) + +### Fixed + +- #125: Fixes issue with module path for v3 + +## 3.0.0 (2019-09-12) + +This is a major release of the semver package which includes API changes. The Go +API is compatible with ^1. The Go API was not changed because many people are using +`go get` without Go modules for their applications and API breaking changes cause +errors which we have or would need to support. + +The changes in this release are the handling based on the data passed into the +functions. These are described in the added and changed sections below. + +### Added + +- StrictNewVersion function. This is similar to NewVersion but will return an + error if the version passed in is not a strict semantic version. For example, + 1.2.3 would pass but v1.2.3 or 1.2 would fail because they are not strictly + speaking semantic versions. This function is faster, performs fewer operations, + and uses fewer allocations than NewVersion. +- Fuzzing has been performed on NewVersion, StrictNewVersion, and NewConstraint. + The Makefile contains the operations used. For more information on you can start + on Wikipedia at https://en.wikipedia.org/wiki/Fuzzing +- Now using Go modules + +### Changed + +- NewVersion has proper prerelease and metadata validation with error messages + to signal an issue with either of them +- ^ now operates using a similar set of rules to npm/js and Rust/Cargo. If the + version is >=1 the ^ ranges works the same as v1. For major versions of 0 the + rules have changed. The minor version is treated as the stable version unless + a patch is specified and then it is equivalent to =. One difference from npm/js + is that prereleases there are only to a specific version (e.g. 1.2.3). + Prereleases here look over multiple versions and follow semantic version + ordering rules. This pattern now follows along with the expected and requested + handling of this packaged by numerous users. + +## 1.5.0 (2019-09-11) + +### Added + +- #103: Add basic fuzzing for `NewVersion()` (thanks @jesse-c) + +### Changed + +- #82: Clarify wildcard meaning in range constraints and update tests for it (thanks @greysteil) +- #83: Clarify caret operator range for pre-1.0.0 dependencies (thanks @greysteil) +- #72: Adding docs comment pointing to vert for a cli +- #71: Update the docs on pre-release comparator handling +- #89: Test with new go versions (thanks @thedevsaddam) +- #87: Added $ to ValidPrerelease for better validation (thanks @jeremycarroll) + +### Fixed + +- #78: Fix unchecked error in example code (thanks @ravron) +- #70: Fix the handling of pre-releases and the 0.0.0 release edge case +- #97: Fixed copyright file for proper display on GitHub +- #107: Fix handling prerelease when sorting alphanum and num +- #109: Fixed where Validate sometimes returns wrong message on error + +## 1.4.2 (2018-04-10) + +### Changed + +- #72: Updated the docs to point to vert for a console appliaction +- #71: Update the docs on pre-release comparator handling + +### Fixed + +- #70: Fix the handling of pre-releases and the 0.0.0 release edge case + +## 1.4.1 (2018-04-02) + +### Fixed + +- Fixed #64: Fix pre-release precedence issue (thanks @uudashr) + +## 1.4.0 (2017-10-04) + +### Changed + +- #61: Update NewVersion to parse ints with a 64bit int size (thanks @zknill) + +## 1.3.1 (2017-07-10) + +### Fixed + +- Fixed #57: number comparisons in prerelease sometimes inaccurate + +## 1.3.0 (2017-05-02) + +### Added + +- #45: Added json (un)marshaling support (thanks @mh-cbon) +- Stability marker. See https://masterminds.github.io/stability/ + +### Fixed + +- #51: Fix handling of single digit tilde constraint (thanks @dgodd) + +### Changed + +- #55: The godoc icon moved from png to svg + +## 1.2.3 (2017-04-03) + +### Fixed + +- #46: Fixed 0.x.x and 0.0.x in constraints being treated as * + +## Release 1.2.2 (2016-12-13) + +### Fixed + +- #34: Fixed issue where hyphen range was not working with pre-release parsing. + +## Release 1.2.1 (2016-11-28) + +### Fixed + +- #24: Fixed edge case issue where constraint "> 0" does not handle "0.0.1-alpha" + properly. + +## Release 1.2.0 (2016-11-04) + +### Added + +- #20: Added MustParse function for versions (thanks @adamreese) +- #15: Added increment methods on versions (thanks @mh-cbon) + +### Fixed + +- Issue #21: Per the SemVer spec (section 9) a pre-release is unstable and + might not satisfy the intended compatibility. The change here ignores pre-releases + on constraint checks (e.g., ~ or ^) when a pre-release is not part of the + constraint. For example, `^1.2.3` will ignore pre-releases while + `^1.2.3-alpha` will include them. + +## Release 1.1.1 (2016-06-30) + +### Changed + +- Issue #9: Speed up version comparison performance (thanks @sdboyer) +- Issue #8: Added benchmarks (thanks @sdboyer) +- Updated Go Report Card URL to new location +- Updated Readme to add code snippet formatting (thanks @mh-cbon) +- Updating tagging to v[SemVer] structure for compatibility with other tools. + +## Release 1.1.0 (2016-03-11) + +- Issue #2: Implemented validation to provide reasons a versions failed a + constraint. + +## Release 1.0.1 (2015-12-31) + +- Fixed #1: * constraint failing on valid versions. + +## Release 1.0.0 (2015-10-20) + +- Initial release diff --git a/vendor/github.com/Masterminds/semver/v3/LICENSE.txt b/vendor/github.com/Masterminds/semver/v3/LICENSE.txt new file mode 100644 index 000000000..9ff7da9c4 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2014-2019, Matt Butcher and Matt Farina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/Masterminds/semver/v3/Makefile b/vendor/github.com/Masterminds/semver/v3/Makefile new file mode 100644 index 000000000..9ca87a2c7 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/Makefile @@ -0,0 +1,31 @@ +GOPATH=$(shell go env GOPATH) +GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint + +.PHONY: lint +lint: $(GOLANGCI_LINT) + @echo "==> Linting codebase" + @$(GOLANGCI_LINT) run + +.PHONY: test +test: + @echo "==> Running tests" + GO111MODULE=on go test -v + +.PHONY: test-cover +test-cover: + @echo "==> Running Tests with coverage" + GO111MODULE=on go test -cover . + +.PHONY: fuzz +fuzz: + @echo "==> Running Fuzz Tests" + go env GOCACHE + go test -fuzz=FuzzNewVersion -fuzztime=15s . + go test -fuzz=FuzzStrictNewVersion -fuzztime=15s . + go test -fuzz=FuzzNewConstraint -fuzztime=15s . + +$(GOLANGCI_LINT): + # Install golangci-lint. The configuration for it is in the .golangci.yml + # file in the root of the repository + echo ${GOPATH} + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.56.2 diff --git a/vendor/github.com/Masterminds/semver/v3/README.md b/vendor/github.com/Masterminds/semver/v3/README.md new file mode 100644 index 000000000..ed5693608 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/README.md @@ -0,0 +1,258 @@ +# SemVer + +The `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifically it provides the ability to: + +* Parse semantic versions +* Sort semantic versions +* Check if a semantic version fits within a set of constraints +* Optionally work with a `v` prefix + +[![Stability: +Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html) +[![](https://github.com/Masterminds/semver/workflows/Tests/badge.svg)](https://github.com/Masterminds/semver/actions) +[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/Masterminds/semver/v3) +[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/semver)](https://goreportcard.com/report/github.com/Masterminds/semver) + +## Package Versions + +Note, import `github.com/Masterminds/semver/v3` to use the latest version. + +There are three major versions fo the `semver` package. + +* 3.x.x is the stable and active version. This version is focused on constraint + compatibility for range handling in other tools from other languages. It has + a similar API to the v1 releases. The development of this version is on the master + branch. The documentation for this version is below. +* 2.x was developed primarily for [dep](https://github.com/golang/dep). There are + no tagged releases and the development was performed by [@sdboyer](https://github.com/sdboyer). + There are API breaking changes from v1. This version lives on the [2.x branch](https://github.com/Masterminds/semver/tree/2.x). +* 1.x.x is the original release. It is no longer maintained. You should use the + v3 release instead. You can read the documentation for the 1.x.x release + [here](https://github.com/Masterminds/semver/blob/release-1/README.md). + +## Parsing Semantic Versions + +There are two functions that can parse semantic versions. The `StrictNewVersion` +function only parses valid version 2 semantic versions as outlined in the +specification. The `NewVersion` function attempts to coerce a version into a +semantic version and parse it. For example, if there is a leading v or a version +listed without all 3 parts (e.g. `v1.2`) it will attempt to coerce it into a valid +semantic version (e.g., 1.2.0). In both cases a `Version` object is returned +that can be sorted, compared, and used in constraints. + +When parsing a version an error is returned if there is an issue parsing the +version. For example, + + v, err := semver.NewVersion("1.2.3-beta.1+build345") + +The version object has methods to get the parts of the version, compare it to +other versions, convert the version back into a string, and get the original +string. Getting the original string is useful if the semantic version was coerced +into a valid form. + +## Sorting Semantic Versions + +A set of versions can be sorted using the `sort` package from the standard library. +For example, + +```go +raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} +vs := make([]*semver.Version, len(raw)) +for i, r := range raw { + v, err := semver.NewVersion(r) + if err != nil { + t.Errorf("Error parsing version: %s", err) + } + + vs[i] = v +} + +sort.Sort(semver.Collection(vs)) +``` + +## Checking Version Constraints + +There are two methods for comparing versions. One uses comparison methods on +`Version` instances and the other uses `Constraints`. There are some important +differences to notes between these two methods of comparison. + +1. When two versions are compared using functions such as `Compare`, `LessThan`, + and others it will follow the specification and always include pre-releases + within the comparison. It will provide an answer that is valid with the + comparison section of the spec at https://semver.org/#spec-item-11 +2. When constraint checking is used for checks or validation it will follow a + different set of rules that are common for ranges with tools like npm/js + and Rust/Cargo. This includes considering pre-releases to be invalid if the + ranges does not include one. If you want to have it include pre-releases a + simple solution is to include `-0` in your range. +3. Constraint ranges can have some complex rules including the shorthand use of + ~ and ^. For more details on those see the options below. + +There are differences between the two methods or checking versions because the +comparison methods on `Version` follow the specification while comparison ranges +are not part of the specification. Different packages and tools have taken it +upon themselves to come up with range rules. This has resulted in differences. +For example, npm/js and Cargo/Rust follow similar patterns while PHP has a +different pattern for ^. The comparison features in this package follow the +npm/js and Cargo/Rust lead because applications using it have followed similar +patters with their versions. + +Checking a version against version constraints is one of the most featureful +parts of the package. + +```go +c, err := semver.NewConstraint(">= 1.2.3") +if err != nil { + // Handle constraint not being parsable. +} + +v, err := semver.NewVersion("1.3") +if err != nil { + // Handle version not being parsable. +} +// Check if the version meets the constraints. The variable a will be true. +a := c.Check(v) +``` + +### Basic Comparisons + +There are two elements to the comparisons. First, a comparison string is a list +of space or comma separated AND comparisons. These are then separated by || (OR) +comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a +comparison that's greater than or equal to 1.2 and less than 3.0.0 or is +greater than or equal to 4.2.3. + +The basic comparisons are: + +* `=`: equal (aliased to no operator) +* `!=`: not equal +* `>`: greater than +* `<`: less than +* `>=`: greater than or equal to +* `<=`: less than or equal to + +### Working With Prerelease Versions + +Pre-releases, for those not familiar with them, are used for software releases +prior to stable or generally available releases. Examples of pre-releases include +development, alpha, beta, and release candidate releases. A pre-release may be +a version such as `1.2.3-beta.1` while the stable release would be `1.2.3`. In the +order of precedence, pre-releases come before their associated releases. In this +example `1.2.3-beta.1 < 1.2.3`. + +According to the Semantic Version specification, pre-releases may not be +API compliant with their release counterpart. It says, + +> A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. + +SemVer's comparisons using constraints without a pre-release comparator will skip +pre-release versions. For example, `>=1.2.3` will skip pre-releases when looking +at a list of releases while `>=1.2.3-0` will evaluate and find pre-releases. + +The reason for the `0` as a pre-release version in the example comparison is +because pre-releases can only contain ASCII alphanumerics and hyphens (along with +`.` separators), per the spec. Sorting happens in ASCII sort order, again per the +spec. The lowest character is a `0` in ASCII sort order +(see an [ASCII Table](http://www.asciitable.com/)) + +Understanding ASCII sort ordering is important because A-Z comes before a-z. That +means `>=1.2.3-BETA` will return `1.2.3-alpha`. What you might expect from case +sensitivity doesn't apply here. This is due to ASCII sort ordering which is what +the spec specifies. + +### Hyphen Range Comparisons + +There are multiple methods to handle ranges and the first is hyphens ranges. +These look like: + +* `1.2 - 1.4.5` which is equivalent to `>= 1.2 <= 1.4.5` +* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` + +Note that `1.2-1.4.5` without whitespace is parsed completely differently; it's +parsed as a single constraint `1.2.0` with _prerelease_ `1.4.5`. + +### Wildcards In Comparisons + +The `x`, `X`, and `*` characters can be used as a wildcard character. This works +for all comparison operators. When used on the `=` operator it falls +back to the patch level comparison (see tilde below). For example, + +* `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` +* `>= 1.2.x` is equivalent to `>= 1.2.0` +* `<= 2.x` is equivalent to `< 3` +* `*` is equivalent to `>= 0.0.0` + +### Tilde Range Comparisons (Patch) + +The tilde (`~`) comparison operator is for patch level ranges when a minor +version is specified and major level changes when the minor number is missing. +For example, + +* `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0` +* `~1` is equivalent to `>= 1, < 2` +* `~2.3` is equivalent to `>= 2.3, < 2.4` +* `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` +* `~1.x` is equivalent to `>= 1, < 2` + +### Caret Range Comparisons (Major) + +The caret (`^`) comparison operator is for major level changes once a stable +(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts +as the API stability level. This is useful when comparisons of API versions as a +major change is API breaking. For example, + +* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` +* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` +* `^2.3` is equivalent to `>= 2.3, < 3` +* `^2.x` is equivalent to `>= 2.0.0, < 3` +* `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` +* `^0.2` is equivalent to `>=0.2.0 <0.3.0` +* `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` +* `^0.0` is equivalent to `>=0.0.0 <0.1.0` +* `^0` is equivalent to `>=0.0.0 <1.0.0` + +## Validation + +In addition to testing a version against a constraint, a version can be validated +against a constraint. When validation fails a slice of errors containing why a +version didn't meet the constraint is returned. For example, + +```go +c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") +if err != nil { + // Handle constraint not being parseable. +} + +v, err := semver.NewVersion("1.3") +if err != nil { + // Handle version not being parseable. +} + +// Validate a version against a constraint. +a, msgs := c.Validate(v) +// a is false +for _, m := range msgs { + fmt.Println(m) + + // Loops over the errors which would read + // "1.3 is greater than 1.2.3" + // "1.3 is less than 1.4" +} +``` + +## Contribute + +If you find an issue or want to contribute please file an [issue](https://github.com/Masterminds/semver/issues) +or [create a pull request](https://github.com/Masterminds/semver/pulls). + +## Security + +Security is an important consideration for this project. The project currently +uses the following tools to help discover security issues: + +* [CodeQL](https://github.com/Masterminds/semver) +* [gosec](https://github.com/securego/gosec) +* Daily Fuzz testing + +If you believe you have found a security vulnerability you can privately disclose +it through the [GitHub security page](https://github.com/Masterminds/semver/security). diff --git a/vendor/github.com/Masterminds/semver/v3/SECURITY.md b/vendor/github.com/Masterminds/semver/v3/SECURITY.md new file mode 100644 index 000000000..a30a66b1f --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +## Supported Versions + +The following versions of semver are currently supported: + +| Version | Supported | +| ------- | ------------------ | +| 3.x | :white_check_mark: | +| 2.x | :x: | +| 1.x | :x: | + +Fixes are only released for the latest minor version in the form of a patch release. + +## Reporting a Vulnerability + +You can privately disclose a vulnerability through GitHubs +[private vulnerability reporting](https://github.com/Masterminds/semver/security/advisories) +mechanism. diff --git a/vendor/github.com/Masterminds/semver/v3/collection.go b/vendor/github.com/Masterminds/semver/v3/collection.go new file mode 100644 index 000000000..a78235895 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/collection.go @@ -0,0 +1,24 @@ +package semver + +// Collection is a collection of Version instances and implements the sort +// interface. See the sort package for more details. +// https://golang.org/pkg/sort/ +type Collection []*Version + +// Len returns the length of a collection. The number of Version instances +// on the slice. +func (c Collection) Len() int { + return len(c) +} + +// Less is needed for the sort interface to compare two Version objects on the +// slice. If checks if one is less than the other. +func (c Collection) Less(i, j int) bool { + return c[i].LessThan(c[j]) +} + +// Swap is needed for the sort interface to replace the Version objects +// at two different positions in the slice. +func (c Collection) Swap(i, j int) { + c[i], c[j] = c[j], c[i] +} diff --git a/vendor/github.com/Masterminds/semver/v3/constraints.go b/vendor/github.com/Masterminds/semver/v3/constraints.go new file mode 100644 index 000000000..8461c7ed9 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/constraints.go @@ -0,0 +1,594 @@ +package semver + +import ( + "bytes" + "errors" + "fmt" + "regexp" + "strings" +) + +// Constraints is one or more constraint that a semantic version can be +// checked against. +type Constraints struct { + constraints [][]*constraint +} + +// NewConstraint returns a Constraints instance that a Version instance can +// be checked against. If there is a parse error it will be returned. +func NewConstraint(c string) (*Constraints, error) { + + // Rewrite - ranges into a comparison operation. + c = rewriteRange(c) + + ors := strings.Split(c, "||") + or := make([][]*constraint, len(ors)) + for k, v := range ors { + + // TODO: Find a way to validate and fetch all the constraints in a simpler form + + // Validate the segment + if !validConstraintRegex.MatchString(v) { + return nil, fmt.Errorf("improper constraint: %s", v) + } + + cs := findConstraintRegex.FindAllString(v, -1) + if cs == nil { + cs = append(cs, v) + } + result := make([]*constraint, len(cs)) + for i, s := range cs { + pc, err := parseConstraint(s) + if err != nil { + return nil, err + } + + result[i] = pc + } + or[k] = result + } + + o := &Constraints{constraints: or} + return o, nil +} + +// Check tests if a version satisfies the constraints. +func (cs Constraints) Check(v *Version) bool { + // TODO(mattfarina): For v4 of this library consolidate the Check and Validate + // functions as the underlying functions make that possible now. + // loop over the ORs and check the inner ANDs + for _, o := range cs.constraints { + joy := true + for _, c := range o { + if check, _ := c.check(v); !check { + joy = false + break + } + } + + if joy { + return true + } + } + + return false +} + +// Validate checks if a version satisfies a constraint. If not a slice of +// reasons for the failure are returned in addition to a bool. +func (cs Constraints) Validate(v *Version) (bool, []error) { + // loop over the ORs and check the inner ANDs + var e []error + + // Capture the prerelease message only once. When it happens the first time + // this var is marked + var prerelesase bool + for _, o := range cs.constraints { + joy := true + for _, c := range o { + // Before running the check handle the case there the version is + // a prerelease and the check is not searching for prereleases. + if c.con.pre == "" && v.pre != "" { + if !prerelesase { + em := fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + e = append(e, em) + prerelesase = true + } + joy = false + + } else { + + if _, err := c.check(v); err != nil { + e = append(e, err) + joy = false + } + } + } + + if joy { + return true, []error{} + } + } + + return false, e +} + +func (cs Constraints) String() string { + buf := make([]string, len(cs.constraints)) + var tmp bytes.Buffer + + for k, v := range cs.constraints { + tmp.Reset() + vlen := len(v) + for kk, c := range v { + tmp.WriteString(c.string()) + + // Space separate the AND conditions + if vlen > 1 && kk < vlen-1 { + tmp.WriteString(" ") + } + } + buf[k] = tmp.String() + } + + return strings.Join(buf, " || ") +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (cs *Constraints) UnmarshalText(text []byte) error { + temp, err := NewConstraint(string(text)) + if err != nil { + return err + } + + *cs = *temp + + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface. +func (cs Constraints) MarshalText() ([]byte, error) { + return []byte(cs.String()), nil +} + +var constraintOps map[string]cfunc +var constraintRegex *regexp.Regexp +var constraintRangeRegex *regexp.Regexp + +// Used to find individual constraints within a multi-constraint string +var findConstraintRegex *regexp.Regexp + +// Used to validate an segment of ANDs is valid +var validConstraintRegex *regexp.Regexp + +const cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` + + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + +func init() { + constraintOps = map[string]cfunc{ + "": constraintTildeOrEqual, + "=": constraintTildeOrEqual, + "!=": constraintNotEqual, + ">": constraintGreaterThan, + "<": constraintLessThan, + ">=": constraintGreaterThanEqual, + "=>": constraintGreaterThanEqual, + "<=": constraintLessThanEqual, + "=<": constraintLessThanEqual, + "~": constraintTilde, + "~>": constraintTilde, + "^": constraintCaret, + } + + ops := `=||!=|>|<|>=|=>|<=|=<|~|~>|\^` + + constraintRegex = regexp.MustCompile(fmt.Sprintf( + `^\s*(%s)\s*(%s)\s*$`, + ops, + cvRegex)) + + constraintRangeRegex = regexp.MustCompile(fmt.Sprintf( + `\s*(%s)\s+-\s+(%s)\s*`, + cvRegex, cvRegex)) + + findConstraintRegex = regexp.MustCompile(fmt.Sprintf( + `(%s)\s*(%s)`, + ops, + cvRegex)) + + // The first time a constraint shows up will look slightly different from + // future times it shows up due to a leading space or comma in a given + // string. + validConstraintRegex = regexp.MustCompile(fmt.Sprintf( + `^(\s*(%s)\s*(%s)\s*)((?:\s+|,\s*)(%s)\s*(%s)\s*)*$`, + ops, + cvRegex, + ops, + cvRegex)) +} + +// An individual constraint +type constraint struct { + // The version used in the constraint check. For example, if a constraint + // is '<= 2.0.0' the con a version instance representing 2.0.0. + con *Version + + // The original parsed version (e.g., 4.x from != 4.x) + orig string + + // The original operator for the constraint + origfunc string + + // When an x is used as part of the version (e.g., 1.x) + minorDirty bool + dirty bool + patchDirty bool +} + +// Check if a version meets the constraint +func (c *constraint) check(v *Version) (bool, error) { + return constraintOps[c.origfunc](v, c) +} + +// String prints an individual constraint into a string +func (c *constraint) string() string { + return c.origfunc + c.orig +} + +type cfunc func(v *Version, c *constraint) (bool, error) + +func parseConstraint(c string) (*constraint, error) { + if len(c) > 0 { + m := constraintRegex.FindStringSubmatch(c) + if m == nil { + return nil, fmt.Errorf("improper constraint: %s", c) + } + + cs := &constraint{ + orig: m[2], + origfunc: m[1], + } + + ver := m[2] + minorDirty := false + patchDirty := false + dirty := false + if isX(m[3]) || m[3] == "" { + ver = fmt.Sprintf("0.0.0%s", m[6]) + dirty = true + } else if isX(strings.TrimPrefix(m[4], ".")) || m[4] == "" { + minorDirty = true + dirty = true + ver = fmt.Sprintf("%s.0.0%s", m[3], m[6]) + } else if isX(strings.TrimPrefix(m[5], ".")) || m[5] == "" { + dirty = true + patchDirty = true + ver = fmt.Sprintf("%s%s.0%s", m[3], m[4], m[6]) + } + + con, err := NewVersion(ver) + if err != nil { + + // The constraintRegex should catch any regex parsing errors. So, + // we should never get here. + return nil, errors.New("constraint Parser Error") + } + + cs.con = con + cs.minorDirty = minorDirty + cs.patchDirty = patchDirty + cs.dirty = dirty + + return cs, nil + } + + // The rest is the special case where an empty string was passed in which + // is equivalent to * or >=0.0.0 + con, err := StrictNewVersion("0.0.0") + if err != nil { + + // The constraintRegex should catch any regex parsing errors. So, + // we should never get here. + return nil, errors.New("constraint Parser Error") + } + + cs := &constraint{ + con: con, + orig: c, + origfunc: "", + minorDirty: false, + patchDirty: false, + dirty: true, + } + return cs, nil +} + +// Constraint functions +func constraintNotEqual(v *Version, c *constraint) (bool, error) { + if c.dirty { + + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + if c.con.Major() != v.Major() { + return true, nil + } + if c.con.Minor() != v.Minor() && !c.minorDirty { + return true, nil + } else if c.minorDirty { + return false, fmt.Errorf("%s is equal to %s", v, c.orig) + } else if c.con.Patch() != v.Patch() && !c.patchDirty { + return true, nil + } else if c.patchDirty { + // Need to handle prereleases if present + if v.Prerelease() != "" || c.con.Prerelease() != "" { + eq := comparePrerelease(v.Prerelease(), c.con.Prerelease()) != 0 + if eq { + return true, nil + } + return false, fmt.Errorf("%s is equal to %s", v, c.orig) + } + return false, fmt.Errorf("%s is equal to %s", v, c.orig) + } + } + + eq := v.Equal(c.con) + if eq { + return false, fmt.Errorf("%s is equal to %s", v, c.orig) + } + + return true, nil +} + +func constraintGreaterThan(v *Version, c *constraint) (bool, error) { + + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + var eq bool + + if !c.dirty { + eq = v.Compare(c.con) == 1 + if eq { + return true, nil + } + return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) + } + + if v.Major() > c.con.Major() { + return true, nil + } else if v.Major() < c.con.Major() { + return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) + } else if c.minorDirty { + // This is a range case such as >11. When the version is something like + // 11.1.0 is it not > 11. For that we would need 12 or higher + return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) + } else if c.patchDirty { + // This is for ranges such as >11.1. A version of 11.1.1 is not greater + // which one of 11.2.1 is greater + eq = v.Minor() > c.con.Minor() + if eq { + return true, nil + } + return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) + } + + // If we have gotten here we are not comparing pre-preleases and can use the + // Compare function to accomplish that. + eq = v.Compare(c.con) == 1 + if eq { + return true, nil + } + return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) +} + +func constraintLessThan(v *Version, c *constraint) (bool, error) { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + eq := v.Compare(c.con) < 0 + if eq { + return true, nil + } + return false, fmt.Errorf("%s is greater than or equal to %s", v, c.orig) +} + +func constraintGreaterThanEqual(v *Version, c *constraint) (bool, error) { + + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + eq := v.Compare(c.con) >= 0 + if eq { + return true, nil + } + return false, fmt.Errorf("%s is less than %s", v, c.orig) +} + +func constraintLessThanEqual(v *Version, c *constraint) (bool, error) { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + var eq bool + + if !c.dirty { + eq = v.Compare(c.con) <= 0 + if eq { + return true, nil + } + return false, fmt.Errorf("%s is greater than %s", v, c.orig) + } + + if v.Major() > c.con.Major() { + return false, fmt.Errorf("%s is greater than %s", v, c.orig) + } else if v.Major() == c.con.Major() && v.Minor() > c.con.Minor() && !c.minorDirty { + return false, fmt.Errorf("%s is greater than %s", v, c.orig) + } + + return true, nil +} + +// ~*, ~>* --> >= 0.0.0 (any) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0, <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0, <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0, <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3, <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0, <1.3.0 +func constraintTilde(v *Version, c *constraint) (bool, error) { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + if v.LessThan(c.con) { + return false, fmt.Errorf("%s is less than %s", v, c.orig) + } + + // ~0.0.0 is a special case where all constraints are accepted. It's + // equivalent to >= 0.0.0. + if c.con.Major() == 0 && c.con.Minor() == 0 && c.con.Patch() == 0 && + !c.minorDirty && !c.patchDirty { + return true, nil + } + + if v.Major() != c.con.Major() { + return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig) + } + + if v.Minor() != c.con.Minor() && !c.minorDirty { + return false, fmt.Errorf("%s does not have same major and minor version as %s", v, c.orig) + } + + return true, nil +} + +// When there is a .x (dirty) status it automatically opts in to ~. Otherwise +// it's a straight = +func constraintTildeOrEqual(v *Version, c *constraint) (bool, error) { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + if c.dirty { + return constraintTilde(v, c) + } + + eq := v.Equal(c.con) + if eq { + return true, nil + } + + return false, fmt.Errorf("%s is not equal to %s", v, c.orig) +} + +// ^* --> (any) +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2 --> >=1.2.0 <2.0.0 +// ^1 --> >=1.0.0 <2.0.0 +// ^0.2.3 --> >=0.2.3 <0.3.0 +// ^0.2 --> >=0.2.0 <0.3.0 +// ^0.0.3 --> >=0.0.3 <0.0.4 +// ^0.0 --> >=0.0.0 <0.1.0 +// ^0 --> >=0.0.0 <1.0.0 +func constraintCaret(v *Version, c *constraint) (bool, error) { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + } + + // This less than handles prereleases + if v.LessThan(c.con) { + return false, fmt.Errorf("%s is less than %s", v, c.orig) + } + + var eq bool + + // ^ when the major > 0 is >=x.y.z < x+1 + if c.con.Major() > 0 || c.minorDirty { + + // ^ has to be within a major range for > 0. Everything less than was + // filtered out with the LessThan call above. This filters out those + // that greater but not within the same major range. + eq = v.Major() == c.con.Major() + if eq { + return true, nil + } + return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig) + } + + // ^ when the major is 0 and minor > 0 is >=0.y.z < 0.y+1 + if c.con.Major() == 0 && v.Major() > 0 { + return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig) + } + // If the con Minor is > 0 it is not dirty + if c.con.Minor() > 0 || c.patchDirty { + eq = v.Minor() == c.con.Minor() + if eq { + return true, nil + } + return false, fmt.Errorf("%s does not have same minor version as %s. Expected minor versions to match when constraint major version is 0", v, c.orig) + } + // ^ when the minor is 0 and minor > 0 is =0.0.z + if c.con.Minor() == 0 && v.Minor() > 0 { + return false, fmt.Errorf("%s does not have same minor version as %s", v, c.orig) + } + + // At this point the major is 0 and the minor is 0 and not dirty. The patch + // is not dirty so we need to check if they are equal. If they are not equal + eq = c.con.Patch() == v.Patch() + if eq { + return true, nil + } + return false, fmt.Errorf("%s does not equal %s. Expect version and constraint to equal when major and minor versions are 0", v, c.orig) +} + +func isX(x string) bool { + switch x { + case "x", "*", "X": + return true + default: + return false + } +} + +func rewriteRange(i string) string { + m := constraintRangeRegex.FindAllStringSubmatch(i, -1) + if m == nil { + return i + } + o := i + for _, v := range m { + t := fmt.Sprintf(">= %s, <= %s ", v[1], v[11]) + o = strings.Replace(o, v[0], t, 1) + } + + return o +} diff --git a/vendor/github.com/Masterminds/semver/v3/doc.go b/vendor/github.com/Masterminds/semver/v3/doc.go new file mode 100644 index 000000000..74f97caa5 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/doc.go @@ -0,0 +1,184 @@ +/* +Package semver provides the ability to work with Semantic Versions (http://semver.org) in Go. + +Specifically it provides the ability to: + + - Parse semantic versions + - Sort semantic versions + - Check if a semantic version fits within a set of constraints + - Optionally work with a `v` prefix + +# Parsing Semantic Versions + +There are two functions that can parse semantic versions. The `StrictNewVersion` +function only parses valid version 2 semantic versions as outlined in the +specification. The `NewVersion` function attempts to coerce a version into a +semantic version and parse it. For example, if there is a leading v or a version +listed without all 3 parts (e.g. 1.2) it will attempt to coerce it into a valid +semantic version (e.g., 1.2.0). In both cases a `Version` object is returned +that can be sorted, compared, and used in constraints. + +When parsing a version an optional error can be returned if there is an issue +parsing the version. For example, + + v, err := semver.NewVersion("1.2.3-beta.1+b345") + +The version object has methods to get the parts of the version, compare it to +other versions, convert the version back into a string, and get the original +string. For more details please see the documentation +at https://godoc.org/github.com/Masterminds/semver. + +# Sorting Semantic Versions + +A set of versions can be sorted using the `sort` package from the standard library. +For example, + + raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} + vs := make([]*semver.Version, len(raw)) + for i, r := range raw { + v, err := semver.NewVersion(r) + if err != nil { + t.Errorf("Error parsing version: %s", err) + } + + vs[i] = v + } + + sort.Sort(semver.Collection(vs)) + +# Checking Version Constraints and Comparing Versions + +There are two methods for comparing versions. One uses comparison methods on +`Version` instances and the other is using Constraints. There are some important +differences to notes between these two methods of comparison. + + 1. When two versions are compared using functions such as `Compare`, `LessThan`, + and others it will follow the specification and always include prereleases + within the comparison. It will provide an answer valid with the comparison + spec section at https://semver.org/#spec-item-11 + 2. When constraint checking is used for checks or validation it will follow a + different set of rules that are common for ranges with tools like npm/js + and Rust/Cargo. This includes considering prereleases to be invalid if the + ranges does not include on. If you want to have it include pre-releases a + simple solution is to include `-0` in your range. + 3. Constraint ranges can have some complex rules including the shorthard use of + ~ and ^. For more details on those see the options below. + +There are differences between the two methods or checking versions because the +comparison methods on `Version` follow the specification while comparison ranges +are not part of the specification. Different packages and tools have taken it +upon themselves to come up with range rules. This has resulted in differences. +For example, npm/js and Cargo/Rust follow similar patterns which PHP has a +different pattern for ^. The comparison features in this package follow the +npm/js and Cargo/Rust lead because applications using it have followed similar +patters with their versions. + +Checking a version against version constraints is one of the most featureful +parts of the package. + + c, err := semver.NewConstraint(">= 1.2.3") + if err != nil { + // Handle constraint not being parsable. + } + + v, err := semver.NewVersion("1.3") + if err != nil { + // Handle version not being parsable. + } + // Check if the version meets the constraints. The a variable will be true. + a := c.Check(v) + +# Basic Comparisons + +There are two elements to the comparisons. First, a comparison string is a list +of comma or space separated AND comparisons. These are then separated by || (OR) +comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a +comparison that's greater than or equal to 1.2 and less than 3.0.0 or is +greater than or equal to 4.2.3. This can also be written as +`">= 1.2, < 3.0.0 || >= 4.2.3"` + +The basic comparisons are: + + - `=`: equal (aliased to no operator) + - `!=`: not equal + - `>`: greater than + - `<`: less than + - `>=`: greater than or equal to + - `<=`: less than or equal to + +# Hyphen Range Comparisons + +There are multiple methods to handle ranges and the first is hyphens ranges. +These look like: + + - `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5` + - `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` + +# Wildcards In Comparisons + +The `x`, `X`, and `*` characters can be used as a wildcard character. This works +for all comparison operators. When used on the `=` operator it falls +back to the tilde operation. For example, + + - `1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` + - `>= 1.2.x` is equivalent to `>= 1.2.0` + - `<= 2.x` is equivalent to `<= 3` + - `*` is equivalent to `>= 0.0.0` + +Tilde Range Comparisons (Patch) + +The tilde (`~`) comparison operator is for patch level ranges when a minor +version is specified and major level changes when the minor number is missing. +For example, + + - `~1.2.3` is equivalent to `>= 1.2.3 < 1.3.0` + - `~1` is equivalent to `>= 1, < 2` + - `~2.3` is equivalent to `>= 2.3 < 2.4` + - `~1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` + - `~1.x` is equivalent to `>= 1 < 2` + +Caret Range Comparisons (Major) + +The caret (`^`) comparison operator is for major level changes once a stable +(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts +as the API stability level. This is useful when comparisons of API versions as a +major change is API breaking. For example, + + - `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` + - `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` + - `^2.3` is equivalent to `>= 2.3, < 3` + - `^2.x` is equivalent to `>= 2.0.0, < 3` + - `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` + - `^0.2` is equivalent to `>=0.2.0 <0.3.0` + - `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` + - `^0.0` is equivalent to `>=0.0.0 <0.1.0` + - `^0` is equivalent to `>=0.0.0 <1.0.0` + +# Validation + +In addition to testing a version against a constraint, a version can be validated +against a constraint. When validation fails a slice of errors containing why a +version didn't meet the constraint is returned. For example, + + c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") + if err != nil { + // Handle constraint not being parseable. + } + + v, _ := semver.NewVersion("1.3") + if err != nil { + // Handle version not being parseable. + } + + // Validate a version against a constraint. + a, msgs := c.Validate(v) + // a is false + for _, m := range msgs { + fmt.Println(m) + + // Loops over the errors which would read + // "1.3 is greater than 1.2.3" + // "1.3 is less than 1.4" + } +*/ +package semver diff --git a/vendor/github.com/Masterminds/semver/v3/version.go b/vendor/github.com/Masterminds/semver/v3/version.go new file mode 100644 index 000000000..ff499fb66 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/version.go @@ -0,0 +1,639 @@ +package semver + +import ( + "bytes" + "database/sql/driver" + "encoding/json" + "errors" + "fmt" + "regexp" + "strconv" + "strings" +) + +// The compiled version of the regex created at init() is cached here so it +// only needs to be created once. +var versionRegex *regexp.Regexp + +var ( + // ErrInvalidSemVer is returned a version is found to be invalid when + // being parsed. + ErrInvalidSemVer = errors.New("Invalid Semantic Version") + + // ErrEmptyString is returned when an empty string is passed in for parsing. + ErrEmptyString = errors.New("Version string empty") + + // ErrInvalidCharacters is returned when invalid characters are found as + // part of a version + ErrInvalidCharacters = errors.New("Invalid characters in version") + + // ErrSegmentStartsZero is returned when a version segment starts with 0. + // This is invalid in SemVer. + ErrSegmentStartsZero = errors.New("Version segment starts with 0") + + // ErrInvalidMetadata is returned when the metadata is an invalid format + ErrInvalidMetadata = errors.New("Invalid Metadata string") + + // ErrInvalidPrerelease is returned when the pre-release is an invalid format + ErrInvalidPrerelease = errors.New("Invalid Prerelease string") +) + +// semVerRegex is the regular expression used to parse a semantic version. +const semVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + +// Version represents a single semantic version. +type Version struct { + major, minor, patch uint64 + pre string + metadata string + original string +} + +func init() { + versionRegex = regexp.MustCompile("^" + semVerRegex + "$") +} + +const ( + num string = "0123456789" + allowed string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + num +) + +// StrictNewVersion parses a given version and returns an instance of Version or +// an error if unable to parse the version. Only parses valid semantic versions. +// Performs checking that can find errors within the version. +// If you want to coerce a version such as 1 or 1.2 and parse it as the 1.x +// releases of semver did, use the NewVersion() function. +func StrictNewVersion(v string) (*Version, error) { + // Parsing here does not use RegEx in order to increase performance and reduce + // allocations. + + if len(v) == 0 { + return nil, ErrEmptyString + } + + // Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build + parts := strings.SplitN(v, ".", 3) + if len(parts) != 3 { + return nil, ErrInvalidSemVer + } + + sv := &Version{ + original: v, + } + + // Extract build metadata + if strings.Contains(parts[2], "+") { + extra := strings.SplitN(parts[2], "+", 2) + sv.metadata = extra[1] + parts[2] = extra[0] + if err := validateMetadata(sv.metadata); err != nil { + return nil, err + } + } + + // Extract build prerelease + if strings.Contains(parts[2], "-") { + extra := strings.SplitN(parts[2], "-", 2) + sv.pre = extra[1] + parts[2] = extra[0] + if err := validatePrerelease(sv.pre); err != nil { + return nil, err + } + } + + // Validate the number segments are valid. This includes only having positive + // numbers and no leading 0's. + for _, p := range parts { + if !containsOnly(p, num) { + return nil, ErrInvalidCharacters + } + + if len(p) > 1 && p[0] == '0' { + return nil, ErrSegmentStartsZero + } + } + + // Extract major, minor, and patch + var err error + sv.major, err = strconv.ParseUint(parts[0], 10, 64) + if err != nil { + return nil, err + } + + sv.minor, err = strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return nil, err + } + + sv.patch, err = strconv.ParseUint(parts[2], 10, 64) + if err != nil { + return nil, err + } + + return sv, nil +} + +// NewVersion parses a given version and returns an instance of Version or +// an error if unable to parse the version. If the version is SemVer-ish it +// attempts to convert it to SemVer. If you want to validate it was a strict +// semantic version at parse time see StrictNewVersion(). +func NewVersion(v string) (*Version, error) { + m := versionRegex.FindStringSubmatch(v) + if m == nil { + return nil, ErrInvalidSemVer + } + + sv := &Version{ + metadata: m[8], + pre: m[5], + original: v, + } + + var err error + sv.major, err = strconv.ParseUint(m[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("Error parsing version segment: %s", err) + } + + if m[2] != "" { + sv.minor, err = strconv.ParseUint(strings.TrimPrefix(m[2], "."), 10, 64) + if err != nil { + return nil, fmt.Errorf("Error parsing version segment: %s", err) + } + } else { + sv.minor = 0 + } + + if m[3] != "" { + sv.patch, err = strconv.ParseUint(strings.TrimPrefix(m[3], "."), 10, 64) + if err != nil { + return nil, fmt.Errorf("Error parsing version segment: %s", err) + } + } else { + sv.patch = 0 + } + + // Perform some basic due diligence on the extra parts to ensure they are + // valid. + + if sv.pre != "" { + if err = validatePrerelease(sv.pre); err != nil { + return nil, err + } + } + + if sv.metadata != "" { + if err = validateMetadata(sv.metadata); err != nil { + return nil, err + } + } + + return sv, nil +} + +// New creates a new instance of Version with each of the parts passed in as +// arguments instead of parsing a version string. +func New(major, minor, patch uint64, pre, metadata string) *Version { + v := Version{ + major: major, + minor: minor, + patch: patch, + pre: pre, + metadata: metadata, + original: "", + } + + v.original = v.String() + + return &v +} + +// MustParse parses a given version and panics on error. +func MustParse(v string) *Version { + sv, err := NewVersion(v) + if err != nil { + panic(err) + } + return sv +} + +// String converts a Version object to a string. +// Note, if the original version contained a leading v this version will not. +// See the Original() method to retrieve the original value. Semantic Versions +// don't contain a leading v per the spec. Instead it's optional on +// implementation. +func (v Version) String() string { + var buf bytes.Buffer + + fmt.Fprintf(&buf, "%d.%d.%d", v.major, v.minor, v.patch) + if v.pre != "" { + fmt.Fprintf(&buf, "-%s", v.pre) + } + if v.metadata != "" { + fmt.Fprintf(&buf, "+%s", v.metadata) + } + + return buf.String() +} + +// Original returns the original value passed in to be parsed. +func (v *Version) Original() string { + return v.original +} + +// Major returns the major version. +func (v Version) Major() uint64 { + return v.major +} + +// Minor returns the minor version. +func (v Version) Minor() uint64 { + return v.minor +} + +// Patch returns the patch version. +func (v Version) Patch() uint64 { + return v.patch +} + +// Prerelease returns the pre-release version. +func (v Version) Prerelease() string { + return v.pre +} + +// Metadata returns the metadata on the version. +func (v Version) Metadata() string { + return v.metadata +} + +// originalVPrefix returns the original 'v' prefix if any. +func (v Version) originalVPrefix() string { + // Note, only lowercase v is supported as a prefix by the parser. + if v.original != "" && v.original[:1] == "v" { + return v.original[:1] + } + return "" +} + +// IncPatch produces the next patch version. +// If the current version does not have prerelease/metadata information, +// it unsets metadata and prerelease values, increments patch number. +// If the current version has any of prerelease or metadata information, +// it unsets both values and keeps current patch value +func (v Version) IncPatch() Version { + vNext := v + // according to http://semver.org/#spec-item-9 + // Pre-release versions have a lower precedence than the associated normal version. + // according to http://semver.org/#spec-item-10 + // Build metadata SHOULD be ignored when determining version precedence. + if v.pre != "" { + vNext.metadata = "" + vNext.pre = "" + } else { + vNext.metadata = "" + vNext.pre = "" + vNext.patch = v.patch + 1 + } + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext +} + +// IncMinor produces the next minor version. +// Sets patch to 0. +// Increments minor number. +// Unsets metadata. +// Unsets prerelease status. +func (v Version) IncMinor() Version { + vNext := v + vNext.metadata = "" + vNext.pre = "" + vNext.patch = 0 + vNext.minor = v.minor + 1 + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext +} + +// IncMajor produces the next major version. +// Sets patch to 0. +// Sets minor to 0. +// Increments major number. +// Unsets metadata. +// Unsets prerelease status. +func (v Version) IncMajor() Version { + vNext := v + vNext.metadata = "" + vNext.pre = "" + vNext.patch = 0 + vNext.minor = 0 + vNext.major = v.major + 1 + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext +} + +// SetPrerelease defines the prerelease value. +// Value must not include the required 'hyphen' prefix. +func (v Version) SetPrerelease(prerelease string) (Version, error) { + vNext := v + if len(prerelease) > 0 { + if err := validatePrerelease(prerelease); err != nil { + return vNext, err + } + } + vNext.pre = prerelease + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext, nil +} + +// SetMetadata defines metadata value. +// Value must not include the required 'plus' prefix. +func (v Version) SetMetadata(metadata string) (Version, error) { + vNext := v + if len(metadata) > 0 { + if err := validateMetadata(metadata); err != nil { + return vNext, err + } + } + vNext.metadata = metadata + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext, nil +} + +// LessThan tests if one version is less than another one. +func (v *Version) LessThan(o *Version) bool { + return v.Compare(o) < 0 +} + +// LessThanEqual tests if one version is less or equal than another one. +func (v *Version) LessThanEqual(o *Version) bool { + return v.Compare(o) <= 0 +} + +// GreaterThan tests if one version is greater than another one. +func (v *Version) GreaterThan(o *Version) bool { + return v.Compare(o) > 0 +} + +// GreaterThanEqual tests if one version is greater or equal than another one. +func (v *Version) GreaterThanEqual(o *Version) bool { + return v.Compare(o) >= 0 +} + +// Equal tests if two versions are equal to each other. +// Note, versions can be equal with different metadata since metadata +// is not considered part of the comparable version. +func (v *Version) Equal(o *Version) bool { + if v == o { + return true + } + if v == nil || o == nil { + return false + } + return v.Compare(o) == 0 +} + +// Compare compares this version to another one. It returns -1, 0, or 1 if +// the version smaller, equal, or larger than the other version. +// +// Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is +// lower than the version without a prerelease. Compare always takes into account +// prereleases. If you want to work with ranges using typical range syntaxes that +// skip prereleases if the range is not looking for them use constraints. +func (v *Version) Compare(o *Version) int { + // Compare the major, minor, and patch version for differences. If a + // difference is found return the comparison. + if d := compareSegment(v.Major(), o.Major()); d != 0 { + return d + } + if d := compareSegment(v.Minor(), o.Minor()); d != 0 { + return d + } + if d := compareSegment(v.Patch(), o.Patch()); d != 0 { + return d + } + + // At this point the major, minor, and patch versions are the same. + ps := v.pre + po := o.Prerelease() + + if ps == "" && po == "" { + return 0 + } + if ps == "" { + return 1 + } + if po == "" { + return -1 + } + + return comparePrerelease(ps, po) +} + +// UnmarshalJSON implements JSON.Unmarshaler interface. +func (v *Version) UnmarshalJSON(b []byte) error { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + temp, err := NewVersion(s) + if err != nil { + return err + } + v.major = temp.major + v.minor = temp.minor + v.patch = temp.patch + v.pre = temp.pre + v.metadata = temp.metadata + v.original = temp.original + return nil +} + +// MarshalJSON implements JSON.Marshaler interface. +func (v Version) MarshalJSON() ([]byte, error) { + return json.Marshal(v.String()) +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (v *Version) UnmarshalText(text []byte) error { + temp, err := NewVersion(string(text)) + if err != nil { + return err + } + + *v = *temp + + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface. +func (v Version) MarshalText() ([]byte, error) { + return []byte(v.String()), nil +} + +// Scan implements the SQL.Scanner interface. +func (v *Version) Scan(value interface{}) error { + var s string + s, _ = value.(string) + temp, err := NewVersion(s) + if err != nil { + return err + } + v.major = temp.major + v.minor = temp.minor + v.patch = temp.patch + v.pre = temp.pre + v.metadata = temp.metadata + v.original = temp.original + return nil +} + +// Value implements the Driver.Valuer interface. +func (v Version) Value() (driver.Value, error) { + return v.String(), nil +} + +func compareSegment(v, o uint64) int { + if v < o { + return -1 + } + if v > o { + return 1 + } + + return 0 +} + +func comparePrerelease(v, o string) int { + // split the prelease versions by their part. The separator, per the spec, + // is a . + sparts := strings.Split(v, ".") + oparts := strings.Split(o, ".") + + // Find the longer length of the parts to know how many loop iterations to + // go through. + slen := len(sparts) + olen := len(oparts) + + l := slen + if olen > slen { + l = olen + } + + // Iterate over each part of the prereleases to compare the differences. + for i := 0; i < l; i++ { + // Since the lentgh of the parts can be different we need to create + // a placeholder. This is to avoid out of bounds issues. + stemp := "" + if i < slen { + stemp = sparts[i] + } + + otemp := "" + if i < olen { + otemp = oparts[i] + } + + d := comparePrePart(stemp, otemp) + if d != 0 { + return d + } + } + + // Reaching here means two versions are of equal value but have different + // metadata (the part following a +). They are not identical in string form + // but the version comparison finds them to be equal. + return 0 +} + +func comparePrePart(s, o string) int { + // Fastpath if they are equal + if s == o { + return 0 + } + + // When s or o are empty we can use the other in an attempt to determine + // the response. + if s == "" { + if o != "" { + return -1 + } + return 1 + } + + if o == "" { + if s != "" { + return 1 + } + return -1 + } + + // When comparing strings "99" is greater than "103". To handle + // cases like this we need to detect numbers and compare them. According + // to the semver spec, numbers are always positive. If there is a - at the + // start like -99 this is to be evaluated as an alphanum. numbers always + // have precedence over alphanum. Parsing as Uints because negative numbers + // are ignored. + + oi, n1 := strconv.ParseUint(o, 10, 64) + si, n2 := strconv.ParseUint(s, 10, 64) + + // The case where both are strings compare the strings + if n1 != nil && n2 != nil { + if s > o { + return 1 + } + return -1 + } else if n1 != nil { + // o is a string and s is a number + return -1 + } else if n2 != nil { + // s is a string and o is a number + return 1 + } + // Both are numbers + if si > oi { + return 1 + } + return -1 +} + +// Like strings.ContainsAny but does an only instead of any. +func containsOnly(s string, comp string) bool { + return strings.IndexFunc(s, func(r rune) bool { + return !strings.ContainsRune(comp, r) + }) == -1 +} + +// From the spec, "Identifiers MUST comprise only +// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. +// Numeric identifiers MUST NOT include leading zeroes.". These segments can +// be dot separated. +func validatePrerelease(p string) error { + eparts := strings.Split(p, ".") + for _, p := range eparts { + if containsOnly(p, num) { + if len(p) > 1 && p[0] == '0' { + return ErrSegmentStartsZero + } + } else if !containsOnly(p, allowed) { + return ErrInvalidPrerelease + } + } + + return nil +} + +// From the spec, "Build metadata MAY be denoted by +// appending a plus sign and a series of dot separated identifiers immediately +// following the patch or pre-release version. Identifiers MUST comprise only +// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty." +func validateMetadata(m string) error { + eparts := strings.Split(m, ".") + for _, p := range eparts { + if !containsOnly(p, allowed) { + return ErrInvalidMetadata + } + } + return nil +} diff --git a/vendor/github.com/Masterminds/sprig/v3/.gitignore b/vendor/github.com/Masterminds/sprig/v3/.gitignore new file mode 100644 index 000000000..5e3002f88 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/.gitignore @@ -0,0 +1,2 @@ +vendor/ +/.glide diff --git a/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md b/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md new file mode 100644 index 000000000..b5ef766a7 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md @@ -0,0 +1,401 @@ +# Changelog + +## Release 3.3.0 (2024-08-29) + +### Added + +- #400: added sha512sum function (thanks @itzik-elayev) + +### Changed + +- #407: Removed duplicate documentation (functions were documentated in 2 places) +- #290: Corrected copy/paster oops in math documentation (thanks @zzhu41) +- #369: Corrected template reference in docs (thanks @chey) +- #375: Added link to URL documenation (thanks @carlpett) +- #406: Updated the mergo dependency which had a breaking change (which was accounted for) +- #376: Fixed documentation error (thanks @jheyduk) +- #404: Updated dependency tree +- #391: Fixed misspelling (thanks @chrishalbert) +- #405: Updated Go versions used in testing + +## Release 3.2.3 (2022-11-29) + +### Changed + +- Updated docs (thanks @book987 @aJetHorn @neelayu @pellizzetti @apricote @SaigyoujiYuyuko233 @AlekSi) +- #348: Updated huandu/xstrings which fixed a snake case bug (thanks @yxxhero) +- #353: Updated masterminds/semver which included bug fixes +- #354: Updated golang.org/x/crypto which included bug fixes + +## Release 3.2.2 (2021-02-04) + +This is a re-release of 3.2.1 to satisfy something with the Go module system. + +## Release 3.2.1 (2021-02-04) + +### Changed + +- Upgraded `Masterminds/goutils` to `v1.1.1`. see the [Security Advisory](https://github.com/Masterminds/goutils/security/advisories/GHSA-xg2h-wx96-xgxr) + +## Release 3.2.0 (2020-12-14) + +### Added + +- #211: Added randInt function (thanks @kochurovro) +- #223: Added fromJson and mustFromJson functions (thanks @mholt) +- #242: Added a bcrypt function (thanks @robbiet480) +- #253: Added randBytes function (thanks @MikaelSmith) +- #254: Added dig function for dicts (thanks @nyarly) +- #257: Added regexQuoteMeta for quoting regex metadata (thanks @rheaton) +- #261: Added filepath functions osBase, osDir, osExt, osClean, osIsAbs (thanks @zugl) +- #268: Added and and all functions for testing conditions (thanks @phuslu) +- #181: Added float64 arithmetic addf, add1f, subf, divf, mulf, maxf, and minf + (thanks @andrewmostello) +- #265: Added chunk function to split array into smaller arrays (thanks @karelbilek) +- #270: Extend certificate functions to handle non-RSA keys + add support for + ed25519 keys (thanks @misberner) + +### Changed + +- Removed testing and support for Go 1.12. ed25519 support requires Go 1.13 or newer +- Using semver 3.1.1 and mergo 0.3.11 + +### Fixed + +- #249: Fix htmlDateInZone example (thanks @spawnia) + +NOTE: The dependency github.com/imdario/mergo reverted the breaking change in +0.3.9 via 0.3.10 release. + +## Release 3.1.0 (2020-04-16) + +NOTE: The dependency github.com/imdario/mergo made a behavior change in 0.3.9 +that impacts sprig functionality. Do not use sprig with a version newer than 0.3.8. + +### Added + +- #225: Added support for generating htpasswd hash (thanks @rustycl0ck) +- #224: Added duration filter (thanks @frebib) +- #205: Added `seq` function (thanks @thadc23) + +### Changed + +- #203: Unlambda functions with correct signature (thanks @muesli) +- #236: Updated the license formatting for GitHub display purposes +- #238: Updated package dependency versions. Note, mergo not updated to 0.3.9 + as it causes a breaking change for sprig. That issue is tracked at + https://github.com/imdario/mergo/issues/139 + +### Fixed + +- #229: Fix `seq` example in docs (thanks @kalmant) + +## Release 3.0.2 (2019-12-13) + +### Fixed + +- #220: Updating to semver v3.0.3 to fix issue with <= ranges +- #218: fix typo elyptical->elliptic in ecdsa key description (thanks @laverya) + +## Release 3.0.1 (2019-12-08) + +### Fixed + +- #212: Updated semver fixing broken constraint checking with ^0.0 + +## Release 3.0.0 (2019-10-02) + +### Added + +- #187: Added durationRound function (thanks @yjp20) +- #189: Added numerous template functions that return errors rather than panic (thanks @nrvnrvn) +- #193: Added toRawJson support (thanks @Dean-Coakley) +- #197: Added get support to dicts (thanks @Dean-Coakley) + +### Changed + +- #186: Moving dependency management to Go modules +- #186: Updated semver to v3. This has changes in the way ^ is handled +- #194: Updated documentation on merging and how it copies. Added example using deepCopy +- #196: trunc now supports negative values (thanks @Dean-Coakley) + +## Release 2.22.0 (2019-10-02) + +### Added + +- #173: Added getHostByName function to resolve dns names to ips (thanks @fcgravalos) +- #195: Added deepCopy function for use with dicts + +### Changed + +- Updated merge and mergeOverwrite documentation to explain copying and how to + use deepCopy with it + +## Release 2.21.0 (2019-09-18) + +### Added + +- #122: Added encryptAES/decryptAES functions (thanks @n0madic) +- #128: Added toDecimal support (thanks @Dean-Coakley) +- #169: Added list contcat (thanks @astorath) +- #174: Added deepEqual function (thanks @bonifaido) +- #170: Added url parse and join functions (thanks @astorath) + +### Changed + +- #171: Updated glide config for Google UUID to v1 and to add ranges to semver and testify + +### Fixed + +- #172: Fix semver wildcard example (thanks @piepmatz) +- #175: Fix dateInZone doc example (thanks @s3than) + +## Release 2.20.0 (2019-06-18) + +### Added + +- #164: Adding function to get unix epoch for a time (@mattfarina) +- #166: Adding tests for date_in_zone (@mattfarina) + +### Changed + +- #144: Fix function comments based on best practices from Effective Go (@CodeLingoTeam) +- #150: Handles pointer type for time.Time in "htmlDate" (@mapreal19) +- #161, #157, #160, #153, #158, #156, #155, #159, #152 documentation updates (@badeadan) + +### Fixed + +## Release 2.19.0 (2019-03-02) + +IMPORTANT: This release reverts a change from 2.18.0 + +In the previous release (2.18), we prematurely merged a partial change to the crypto functions that led to creating two sets of crypto functions (I blame @technosophos -- since that's me). This release rolls back that change, and does what was originally intended: It alters the existing crypto functions to use secure random. + +We debated whether this classifies as a change worthy of major revision, but given the proximity to the last release, we have decided that treating 2.18 as a faulty release is the correct course of action. We apologize for any inconvenience. + +### Changed + +- Fix substr panic 35fb796 (Alexey igrychev) +- Remove extra period 1eb7729 (Matthew Lorimor) +- Make random string functions use crypto by default 6ceff26 (Matthew Lorimor) +- README edits/fixes/suggestions 08fe136 (Lauri Apple) + + +## Release 2.18.0 (2019-02-12) + +### Added + +- Added mergeOverwrite function +- cryptographic functions that use secure random (see fe1de12) + +### Changed + +- Improve documentation of regexMatch function, resolves #139 90b89ce (Jan Tagscherer) +- Handle has for nil list 9c10885 (Daniel Cohen) +- Document behaviour of mergeOverwrite fe0dbe9 (Lukas Rieder) +- doc: adds missing documentation. 4b871e6 (Fernandez Ludovic) +- Replace outdated goutils imports 01893d2 (Matthew Lorimor) +- Surface crypto secure random strings from goutils fe1de12 (Matthew Lorimor) +- Handle untyped nil values as paramters to string functions 2b2ec8f (Morten Torkildsen) + +### Fixed + +- Fix dict merge issue and provide mergeOverwrite .dst .src1 to overwrite from src -> dst 4c59c12 (Lukas Rieder) +- Fix substr var names and comments d581f80 (Dean Coakley) +- Fix substr documentation 2737203 (Dean Coakley) + +## Release 2.17.1 (2019-01-03) + +### Fixed + +The 2.17.0 release did not have a version pinned for xstrings, which caused compilation failures when xstrings < 1.2 was used. This adds the correct version string to glide.yaml. + +## Release 2.17.0 (2019-01-03) + +### Added + +- adds alder32sum function and test 6908fc2 (marshallford) +- Added kebabcase function ca331a1 (Ilyes512) + +### Changed + +- Update goutils to 1.1.0 4e1125d (Matt Butcher) + +### Fixed + +- Fix 'has' documentation e3f2a85 (dean-coakley) +- docs(dict): fix typo in pick example dc424f9 (Dustin Specker) +- fixes spelling errors... not sure how that happened 4cf188a (marshallford) + +## Release 2.16.0 (2018-08-13) + +### Added + +- add splitn function fccb0b0 (Helgi Þorbjörnsson) +- Add slice func df28ca7 (gongdo) +- Generate serial number a3bdffd (Cody Coons) +- Extract values of dict with values function df39312 (Lawrence Jones) + +### Changed + +- Modify panic message for list.slice ae38335 (gongdo) +- Minor improvement in code quality - Removed an unreachable piece of code at defaults.go#L26:6 - Resolve formatting issues. 5834241 (Abhishek Kashyap) +- Remove duplicated documentation 1d97af1 (Matthew Fisher) +- Test on go 1.11 49df809 (Helgi Þormar Þorbjörnsson) + +### Fixed + +- Fix file permissions c5f40b5 (gongdo) +- Fix example for buildCustomCert 7779e0d (Tin Lam) + +## Release 2.15.0 (2018-04-02) + +### Added + +- #68 and #69: Add json helpers to docs (thanks @arunvelsriram) +- #66: Add ternary function (thanks @binoculars) +- #67: Allow keys function to take multiple dicts (thanks @binoculars) +- #89: Added sha1sum to crypto function (thanks @benkeil) +- #81: Allow customizing Root CA that used by genSignedCert (thanks @chenzhiwei) +- #92: Add travis testing for go 1.10 +- #93: Adding appveyor config for windows testing + +### Changed + +- #90: Updating to more recent dependencies +- #73: replace satori/go.uuid with google/uuid (thanks @petterw) + +### Fixed + +- #76: Fixed documentation typos (thanks @Thiht) +- Fixed rounding issue on the `ago` function. Note, the removes support for Go 1.8 and older + +## Release 2.14.1 (2017-12-01) + +### Fixed + +- #60: Fix typo in function name documentation (thanks @neil-ca-moore) +- #61: Removing line with {{ due to blocking github pages genertion +- #64: Update the list functions to handle int, string, and other slices for compatibility + +## Release 2.14.0 (2017-10-06) + +This new version of Sprig adds a set of functions for generating and working with SSL certificates. + +- `genCA` generates an SSL Certificate Authority +- `genSelfSignedCert` generates an SSL self-signed certificate +- `genSignedCert` generates an SSL certificate and key based on a given CA + +## Release 2.13.0 (2017-09-18) + +This release adds new functions, including: + +- `regexMatch`, `regexFindAll`, `regexFind`, `regexReplaceAll`, `regexReplaceAllLiteral`, and `regexSplit` to work with regular expressions +- `floor`, `ceil`, and `round` math functions +- `toDate` converts a string to a date +- `nindent` is just like `indent` but also prepends a new line +- `ago` returns the time from `time.Now` + +### Added + +- #40: Added basic regex functionality (thanks @alanquillin) +- #41: Added ceil floor and round functions (thanks @alanquillin) +- #48: Added toDate function (thanks @andreynering) +- #50: Added nindent function (thanks @binoculars) +- #46: Added ago function (thanks @slayer) + +### Changed + +- #51: Updated godocs to include new string functions (thanks @curtisallen) +- #49: Added ability to merge multiple dicts (thanks @binoculars) + +## Release 2.12.0 (2017-05-17) + +- `snakecase`, `camelcase`, and `shuffle` are three new string functions +- `fail` allows you to bail out of a template render when conditions are not met + +## Release 2.11.0 (2017-05-02) + +- Added `toJson` and `toPrettyJson` +- Added `merge` +- Refactored documentation + +## Release 2.10.0 (2017-03-15) + +- Added `semver` and `semverCompare` for Semantic Versions +- `list` replaces `tuple` +- Fixed issue with `join` +- Added `first`, `last`, `initial`, `rest`, `prepend`, `append`, `toString`, `toStrings`, `sortAlpha`, `reverse`, `coalesce`, `pluck`, `pick`, `compact`, `keys`, `omit`, `uniq`, `has`, `without` + +## Release 2.9.0 (2017-02-23) + +- Added `splitList` to split a list +- Added crypto functions of `genPrivateKey` and `derivePassword` + +## Release 2.8.0 (2016-12-21) + +- Added access to several path functions (`base`, `dir`, `clean`, `ext`, and `abs`) +- Added functions for _mutating_ dictionaries (`set`, `unset`, `hasKey`) + +## Release 2.7.0 (2016-12-01) + +- Added `sha256sum` to generate a hash of an input +- Added functions to convert a numeric or string to `int`, `int64`, `float64` + +## Release 2.6.0 (2016-10-03) + +- Added a `uuidv4` template function for generating UUIDs inside of a template. + +## Release 2.5.0 (2016-08-19) + +- New `trimSuffix`, `trimPrefix`, `hasSuffix`, and `hasPrefix` functions +- New aliases have been added for a few functions that didn't follow the naming conventions (`trimAll` and `abbrevBoth`) +- `trimall` and `abbrevboth` (notice the case) are deprecated and will be removed in 3.0.0 + +## Release 2.4.0 (2016-08-16) + +- Adds two functions: `until` and `untilStep` + +## Release 2.3.0 (2016-06-21) + +- cat: Concatenate strings with whitespace separators. +- replace: Replace parts of a string: `replace " " "-" "Me First"` renders "Me-First" +- plural: Format plurals: `len "foo" | plural "one foo" "many foos"` renders "many foos" +- indent: Indent blocks of text in a way that is sensitive to "\n" characters. + +## Release 2.2.0 (2016-04-21) + +- Added a `genPrivateKey` function (Thanks @bacongobbler) + +## Release 2.1.0 (2016-03-30) + +- `default` now prints the default value when it does not receive a value down the pipeline. It is much safer now to do `{{.Foo | default "bar"}}`. +- Added accessors for "hermetic" functions. These return only functions that, when given the same input, produce the same output. + +## Release 2.0.0 (2016-03-29) + +Because we switched from `int` to `int64` as the return value for all integer math functions, the library's major version number has been incremented. + +- `min` complements `max` (formerly `biggest`) +- `empty` indicates that a value is the empty value for its type +- `tuple` creates a tuple inside of a template: `{{$t := tuple "a", "b" "c"}}` +- `dict` creates a dictionary inside of a template `{{$d := dict "key1" "val1" "key2" "val2"}}` +- Date formatters have been added for HTML dates (as used in `date` input fields) +- Integer math functions can convert from a number of types, including `string` (via `strconv.ParseInt`). + +## Release 1.2.0 (2016-02-01) + +- Added quote and squote +- Added b32enc and b32dec +- add now takes varargs +- biggest now takes varargs + +## Release 1.1.0 (2015-12-29) + +- Added #4: Added contains function. strings.Contains, but with the arguments + switched to simplify common pipelines. (thanks krancour) +- Added Travis-CI testing support + +## Release 1.0.0 (2015-12-23) + +- Initial release diff --git a/vendor/github.com/Masterminds/sprig/v3/LICENSE.txt b/vendor/github.com/Masterminds/sprig/v3/LICENSE.txt new file mode 100644 index 000000000..f311b1eaa --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013-2020 Masterminds + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/Masterminds/sprig/v3/Makefile b/vendor/github.com/Masterminds/sprig/v3/Makefile new file mode 100644 index 000000000..78d409cde --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/Makefile @@ -0,0 +1,9 @@ +.PHONY: test +test: + @echo "==> Running tests" + GO111MODULE=on go test -v + +.PHONY: test-cover +test-cover: + @echo "==> Running Tests with coverage" + GO111MODULE=on go test -cover . diff --git a/vendor/github.com/Masterminds/sprig/v3/README.md b/vendor/github.com/Masterminds/sprig/v3/README.md new file mode 100644 index 000000000..3e22c60e1 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/README.md @@ -0,0 +1,100 @@ +# Sprig: Template functions for Go templates + +[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/Masterminds/sprig/v3) +[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/sprig)](https://goreportcard.com/report/github.com/Masterminds/sprig) +[![Stability: Sustained](https://masterminds.github.io/stability/sustained.svg)](https://masterminds.github.io/stability/sustained.html) +[![](https://github.com/Masterminds/sprig/workflows/Tests/badge.svg)](https://github.com/Masterminds/sprig/actions) + +The Go language comes with a [built-in template +language](http://golang.org/pkg/text/template/), but not +very many template functions. Sprig is a library that provides more than 100 commonly +used template functions. + +It is inspired by the template functions found in +[Twig](http://twig.sensiolabs.org/documentation) and in various +JavaScript libraries, such as [underscore.js](http://underscorejs.org/). + +## IMPORTANT NOTES + +Sprig leverages [mergo](https://github.com/imdario/mergo) to handle merges. In +its v0.3.9 release, there was a behavior change that impacts merging template +functions in sprig. It is currently recommended to use v0.3.10 or later of that package. +Using v0.3.9 will cause sprig tests to fail. + +## Package Versions + +There are two active major versions of the `sprig` package. + +* v3 is currently stable release series on the `master` branch. The Go API should + remain compatible with v2, the current stable version. Behavior change behind + some functions is the reason for the new major version. +* v2 is the previous stable release series. It has been more than three years since + the initial release of v2. You can read the documentation and see the code + on the [release-2](https://github.com/Masterminds/sprig/tree/release-2) branch. + Bug fixes to this major version will continue for some time. + +## Usage + +**Template developers**: Please use Sprig's [function documentation](http://masterminds.github.io/sprig/) for +detailed instructions and code snippets for the >100 template functions available. + +**Go developers**: If you'd like to include Sprig as a library in your program, +our API documentation is available [at GoDoc.org](http://godoc.org/github.com/Masterminds/sprig). + +For standard usage, read on. + +### Load the Sprig library + +To load the Sprig `FuncMap`: + +```go + +import ( + "github.com/Masterminds/sprig/v3" + "html/template" +) + +// This example illustrates that the FuncMap *must* be set before the +// templates themselves are loaded. +tpl := template.Must( + template.New("base").Funcs(sprig.FuncMap()).ParseGlob("*.html") +) + + +``` + +### Calling the functions inside of templates + +By convention, all functions are lowercase. This seems to follow the Go +idiom for template functions (as opposed to template methods, which are +TitleCase). For example, this: + +``` +{{ "hello!" | upper | repeat 5 }} +``` + +produces this: + +``` +HELLO!HELLO!HELLO!HELLO!HELLO! +``` + +## Principles Driving Our Function Selection + +We followed these principles to decide which functions to add and how to implement them: + +- Use template functions to build layout. The following + types of operations are within the domain of template functions: + - Formatting + - Layout + - Simple type conversions + - Utilities that assist in handling common formatting and layout needs (e.g. arithmetic) +- Template functions should not return errors unless there is no way to print + a sensible value. For example, converting a string to an integer should not + produce an error if conversion fails. Instead, it should display a default + value. +- Simple math is necessary for grid layouts, pagers, and so on. Complex math + (anything other than arithmetic) should be done outside of templates. +- Template functions only deal with the data passed into them. They never retrieve + data from a source. +- Finally, do not override core Go template functions. diff --git a/vendor/github.com/Masterminds/sprig/v3/crypto.go b/vendor/github.com/Masterminds/sprig/v3/crypto.go new file mode 100644 index 000000000..75fe027e4 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/crypto.go @@ -0,0 +1,659 @@ +package sprig + +import ( + "bytes" + "crypto" + "crypto/aes" + "crypto/cipher" + "crypto/dsa" + "crypto/ecdsa" + "crypto/ed25519" + "crypto/elliptic" + "crypto/hmac" + "crypto/rand" + "crypto/rsa" + "crypto/sha1" + "crypto/sha256" + "crypto/sha512" + "crypto/x509" + "crypto/x509/pkix" + "encoding/asn1" + "encoding/base64" + "encoding/binary" + "encoding/hex" + "encoding/pem" + "errors" + "fmt" + "hash/adler32" + "io" + "math/big" + "net" + "time" + + "strings" + + "github.com/google/uuid" + bcrypt_lib "golang.org/x/crypto/bcrypt" + "golang.org/x/crypto/scrypt" +) + +func sha512sum(input string) string { + hash := sha512.Sum512([]byte(input)) + return hex.EncodeToString(hash[:]) +} + +func sha256sum(input string) string { + hash := sha256.Sum256([]byte(input)) + return hex.EncodeToString(hash[:]) +} + +func sha1sum(input string) string { + hash := sha1.Sum([]byte(input)) + return hex.EncodeToString(hash[:]) +} + +func adler32sum(input string) string { + hash := adler32.Checksum([]byte(input)) + return fmt.Sprintf("%d", hash) +} + +func bcrypt(input string) string { + hash, err := bcrypt_lib.GenerateFromPassword([]byte(input), bcrypt_lib.DefaultCost) + if err != nil { + return fmt.Sprintf("failed to encrypt string with bcrypt: %s", err) + } + + return string(hash) +} + +func htpasswd(username string, password string) string { + if strings.Contains(username, ":") { + return fmt.Sprintf("invalid username: %s", username) + } + return fmt.Sprintf("%s:%s", username, bcrypt(password)) +} + +func randBytes(count int) (string, error) { + buf := make([]byte, count) + if _, err := rand.Read(buf); err != nil { + return "", err + } + return base64.StdEncoding.EncodeToString(buf), nil +} + +// uuidv4 provides a safe and secure UUID v4 implementation +func uuidv4() string { + return uuid.New().String() +} + +var masterPasswordSeed = "com.lyndir.masterpassword" + +var passwordTypeTemplates = map[string][][]byte{ + "maximum": {[]byte("anoxxxxxxxxxxxxxxxxx"), []byte("axxxxxxxxxxxxxxxxxno")}, + "long": {[]byte("CvcvnoCvcvCvcv"), []byte("CvcvCvcvnoCvcv"), []byte("CvcvCvcvCvcvno"), []byte("CvccnoCvcvCvcv"), []byte("CvccCvcvnoCvcv"), + []byte("CvccCvcvCvcvno"), []byte("CvcvnoCvccCvcv"), []byte("CvcvCvccnoCvcv"), []byte("CvcvCvccCvcvno"), []byte("CvcvnoCvcvCvcc"), + []byte("CvcvCvcvnoCvcc"), []byte("CvcvCvcvCvccno"), []byte("CvccnoCvccCvcv"), []byte("CvccCvccnoCvcv"), []byte("CvccCvccCvcvno"), + []byte("CvcvnoCvccCvcc"), []byte("CvcvCvccnoCvcc"), []byte("CvcvCvccCvccno"), []byte("CvccnoCvcvCvcc"), []byte("CvccCvcvnoCvcc"), + []byte("CvccCvcvCvccno")}, + "medium": {[]byte("CvcnoCvc"), []byte("CvcCvcno")}, + "short": {[]byte("Cvcn")}, + "basic": {[]byte("aaanaaan"), []byte("aannaaan"), []byte("aaannaaa")}, + "pin": {[]byte("nnnn")}, +} + +var templateCharacters = map[byte]string{ + 'V': "AEIOU", + 'C': "BCDFGHJKLMNPQRSTVWXYZ", + 'v': "aeiou", + 'c': "bcdfghjklmnpqrstvwxyz", + 'A': "AEIOUBCDFGHJKLMNPQRSTVWXYZ", + 'a': "AEIOUaeiouBCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz", + 'n': "0123456789", + 'o': "@&%?,=[]_:-+*$#!'^~;()/.", + 'x': "AEIOUaeiouBCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz0123456789!@#$%^&*()", +} + +func derivePassword(counter uint32, passwordType, password, user, site string) string { + var templates = passwordTypeTemplates[passwordType] + if templates == nil { + return fmt.Sprintf("cannot find password template %s", passwordType) + } + + var buffer bytes.Buffer + buffer.WriteString(masterPasswordSeed) + binary.Write(&buffer, binary.BigEndian, uint32(len(user))) + buffer.WriteString(user) + + salt := buffer.Bytes() + key, err := scrypt.Key([]byte(password), salt, 32768, 8, 2, 64) + if err != nil { + return fmt.Sprintf("failed to derive password: %s", err) + } + + buffer.Truncate(len(masterPasswordSeed)) + binary.Write(&buffer, binary.BigEndian, uint32(len(site))) + buffer.WriteString(site) + binary.Write(&buffer, binary.BigEndian, counter) + + var hmacv = hmac.New(sha256.New, key) + hmacv.Write(buffer.Bytes()) + var seed = hmacv.Sum(nil) + var temp = templates[int(seed[0])%len(templates)] + + buffer.Truncate(0) + for i, element := range temp { + passChars := templateCharacters[element] + passChar := passChars[int(seed[i+1])%len(passChars)] + buffer.WriteByte(passChar) + } + + return buffer.String() +} + +func generatePrivateKey(typ string) string { + var priv interface{} + var err error + switch typ { + case "", "rsa": + // good enough for government work + priv, err = rsa.GenerateKey(rand.Reader, 4096) + case "dsa": + key := new(dsa.PrivateKey) + // again, good enough for government work + if err = dsa.GenerateParameters(&key.Parameters, rand.Reader, dsa.L2048N256); err != nil { + return fmt.Sprintf("failed to generate dsa params: %s", err) + } + err = dsa.GenerateKey(key, rand.Reader) + priv = key + case "ecdsa": + // again, good enough for government work + priv, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + case "ed25519": + _, priv, err = ed25519.GenerateKey(rand.Reader) + default: + return "Unknown type " + typ + } + if err != nil { + return fmt.Sprintf("failed to generate private key: %s", err) + } + + return string(pem.EncodeToMemory(pemBlockForKey(priv))) +} + +// DSAKeyFormat stores the format for DSA keys. +// Used by pemBlockForKey +type DSAKeyFormat struct { + Version int + P, Q, G, Y, X *big.Int +} + +func pemBlockForKey(priv interface{}) *pem.Block { + switch k := priv.(type) { + case *rsa.PrivateKey: + return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)} + case *dsa.PrivateKey: + val := DSAKeyFormat{ + P: k.P, Q: k.Q, G: k.G, + Y: k.Y, X: k.X, + } + bytes, _ := asn1.Marshal(val) + return &pem.Block{Type: "DSA PRIVATE KEY", Bytes: bytes} + case *ecdsa.PrivateKey: + b, _ := x509.MarshalECPrivateKey(k) + return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b} + default: + // attempt PKCS#8 format for all other keys + b, err := x509.MarshalPKCS8PrivateKey(k) + if err != nil { + return nil + } + return &pem.Block{Type: "PRIVATE KEY", Bytes: b} + } +} + +func parsePrivateKeyPEM(pemBlock string) (crypto.PrivateKey, error) { + block, _ := pem.Decode([]byte(pemBlock)) + if block == nil { + return nil, errors.New("no PEM data in input") + } + + if block.Type == "PRIVATE KEY" { + priv, err := x509.ParsePKCS8PrivateKey(block.Bytes) + if err != nil { + return nil, fmt.Errorf("decoding PEM as PKCS#8: %s", err) + } + return priv, nil + } else if !strings.HasSuffix(block.Type, " PRIVATE KEY") { + return nil, fmt.Errorf("no private key data in PEM block of type %s", block.Type) + } + + switch block.Type[:len(block.Type)-12] { // strip " PRIVATE KEY" + case "RSA": + priv, err := x509.ParsePKCS1PrivateKey(block.Bytes) + if err != nil { + return nil, fmt.Errorf("parsing RSA private key from PEM: %s", err) + } + return priv, nil + case "EC": + priv, err := x509.ParseECPrivateKey(block.Bytes) + if err != nil { + return nil, fmt.Errorf("parsing EC private key from PEM: %s", err) + } + return priv, nil + case "DSA": + var k DSAKeyFormat + _, err := asn1.Unmarshal(block.Bytes, &k) + if err != nil { + return nil, fmt.Errorf("parsing DSA private key from PEM: %s", err) + } + priv := &dsa.PrivateKey{ + PublicKey: dsa.PublicKey{ + Parameters: dsa.Parameters{ + P: k.P, Q: k.Q, G: k.G, + }, + Y: k.Y, + }, + X: k.X, + } + return priv, nil + default: + return nil, fmt.Errorf("invalid private key type %s", block.Type) + } +} + +func getPublicKey(priv crypto.PrivateKey) (crypto.PublicKey, error) { + switch k := priv.(type) { + case interface{ Public() crypto.PublicKey }: + return k.Public(), nil + case *dsa.PrivateKey: + return &k.PublicKey, nil + default: + return nil, fmt.Errorf("unable to get public key for type %T", priv) + } +} + +type certificate struct { + Cert string + Key string +} + +func buildCustomCertificate(b64cert string, b64key string) (certificate, error) { + crt := certificate{} + + cert, err := base64.StdEncoding.DecodeString(b64cert) + if err != nil { + return crt, errors.New("unable to decode base64 certificate") + } + + key, err := base64.StdEncoding.DecodeString(b64key) + if err != nil { + return crt, errors.New("unable to decode base64 private key") + } + + decodedCert, _ := pem.Decode(cert) + if decodedCert == nil { + return crt, errors.New("unable to decode certificate") + } + _, err = x509.ParseCertificate(decodedCert.Bytes) + if err != nil { + return crt, fmt.Errorf( + "error parsing certificate: decodedCert.Bytes: %s", + err, + ) + } + + _, err = parsePrivateKeyPEM(string(key)) + if err != nil { + return crt, fmt.Errorf( + "error parsing private key: %s", + err, + ) + } + + crt.Cert = string(cert) + crt.Key = string(key) + + return crt, nil +} + +func generateCertificateAuthority( + cn string, + daysValid int, +) (certificate, error) { + priv, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return certificate{}, fmt.Errorf("error generating rsa key: %s", err) + } + + return generateCertificateAuthorityWithKeyInternal(cn, daysValid, priv) +} + +func generateCertificateAuthorityWithPEMKey( + cn string, + daysValid int, + privPEM string, +) (certificate, error) { + priv, err := parsePrivateKeyPEM(privPEM) + if err != nil { + return certificate{}, fmt.Errorf("parsing private key: %s", err) + } + return generateCertificateAuthorityWithKeyInternal(cn, daysValid, priv) +} + +func generateCertificateAuthorityWithKeyInternal( + cn string, + daysValid int, + priv crypto.PrivateKey, +) (certificate, error) { + ca := certificate{} + + template, err := getBaseCertTemplate(cn, nil, nil, daysValid) + if err != nil { + return ca, err + } + // Override KeyUsage and IsCA + template.KeyUsage = x509.KeyUsageKeyEncipherment | + x509.KeyUsageDigitalSignature | + x509.KeyUsageCertSign + template.IsCA = true + + ca.Cert, ca.Key, err = getCertAndKey(template, priv, template, priv) + + return ca, err +} + +func generateSelfSignedCertificate( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, +) (certificate, error) { + priv, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return certificate{}, fmt.Errorf("error generating rsa key: %s", err) + } + return generateSelfSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, priv) +} + +func generateSelfSignedCertificateWithPEMKey( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, + privPEM string, +) (certificate, error) { + priv, err := parsePrivateKeyPEM(privPEM) + if err != nil { + return certificate{}, fmt.Errorf("parsing private key: %s", err) + } + return generateSelfSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, priv) +} + +func generateSelfSignedCertificateWithKeyInternal( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, + priv crypto.PrivateKey, +) (certificate, error) { + cert := certificate{} + + template, err := getBaseCertTemplate(cn, ips, alternateDNS, daysValid) + if err != nil { + return cert, err + } + + cert.Cert, cert.Key, err = getCertAndKey(template, priv, template, priv) + + return cert, err +} + +func generateSignedCertificate( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, + ca certificate, +) (certificate, error) { + priv, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return certificate{}, fmt.Errorf("error generating rsa key: %s", err) + } + return generateSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, ca, priv) +} + +func generateSignedCertificateWithPEMKey( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, + ca certificate, + privPEM string, +) (certificate, error) { + priv, err := parsePrivateKeyPEM(privPEM) + if err != nil { + return certificate{}, fmt.Errorf("parsing private key: %s", err) + } + return generateSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, ca, priv) +} + +func generateSignedCertificateWithKeyInternal( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, + ca certificate, + priv crypto.PrivateKey, +) (certificate, error) { + cert := certificate{} + + decodedSignerCert, _ := pem.Decode([]byte(ca.Cert)) + if decodedSignerCert == nil { + return cert, errors.New("unable to decode certificate") + } + signerCert, err := x509.ParseCertificate(decodedSignerCert.Bytes) + if err != nil { + return cert, fmt.Errorf( + "error parsing certificate: decodedSignerCert.Bytes: %s", + err, + ) + } + signerKey, err := parsePrivateKeyPEM(ca.Key) + if err != nil { + return cert, fmt.Errorf( + "error parsing private key: %s", + err, + ) + } + + template, err := getBaseCertTemplate(cn, ips, alternateDNS, daysValid) + if err != nil { + return cert, err + } + + cert.Cert, cert.Key, err = getCertAndKey( + template, + priv, + signerCert, + signerKey, + ) + + return cert, err +} + +func getCertAndKey( + template *x509.Certificate, + signeeKey crypto.PrivateKey, + parent *x509.Certificate, + signingKey crypto.PrivateKey, +) (string, string, error) { + signeePubKey, err := getPublicKey(signeeKey) + if err != nil { + return "", "", fmt.Errorf("error retrieving public key from signee key: %s", err) + } + derBytes, err := x509.CreateCertificate( + rand.Reader, + template, + parent, + signeePubKey, + signingKey, + ) + if err != nil { + return "", "", fmt.Errorf("error creating certificate: %s", err) + } + + certBuffer := bytes.Buffer{} + if err := pem.Encode( + &certBuffer, + &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}, + ); err != nil { + return "", "", fmt.Errorf("error pem-encoding certificate: %s", err) + } + + keyBuffer := bytes.Buffer{} + if err := pem.Encode( + &keyBuffer, + pemBlockForKey(signeeKey), + ); err != nil { + return "", "", fmt.Errorf("error pem-encoding key: %s", err) + } + + return certBuffer.String(), keyBuffer.String(), nil +} + +func getBaseCertTemplate( + cn string, + ips []interface{}, + alternateDNS []interface{}, + daysValid int, +) (*x509.Certificate, error) { + ipAddresses, err := getNetIPs(ips) + if err != nil { + return nil, err + } + dnsNames, err := getAlternateDNSStrs(alternateDNS) + if err != nil { + return nil, err + } + serialNumberUpperBound := new(big.Int).Lsh(big.NewInt(1), 128) + serialNumber, err := rand.Int(rand.Reader, serialNumberUpperBound) + if err != nil { + return nil, err + } + return &x509.Certificate{ + SerialNumber: serialNumber, + Subject: pkix.Name{ + CommonName: cn, + }, + IPAddresses: ipAddresses, + DNSNames: dnsNames, + NotBefore: time.Now(), + NotAfter: time.Now().Add(time.Hour * 24 * time.Duration(daysValid)), + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: []x509.ExtKeyUsage{ + x509.ExtKeyUsageServerAuth, + x509.ExtKeyUsageClientAuth, + }, + BasicConstraintsValid: true, + }, nil +} + +func getNetIPs(ips []interface{}) ([]net.IP, error) { + if ips == nil { + return []net.IP{}, nil + } + var ipStr string + var ok bool + var netIP net.IP + netIPs := make([]net.IP, len(ips)) + for i, ip := range ips { + ipStr, ok = ip.(string) + if !ok { + return nil, fmt.Errorf("error parsing ip: %v is not a string", ip) + } + netIP = net.ParseIP(ipStr) + if netIP == nil { + return nil, fmt.Errorf("error parsing ip: %s", ipStr) + } + netIPs[i] = netIP + } + return netIPs, nil +} + +func getAlternateDNSStrs(alternateDNS []interface{}) ([]string, error) { + if alternateDNS == nil { + return []string{}, nil + } + var dnsStr string + var ok bool + alternateDNSStrs := make([]string, len(alternateDNS)) + for i, dns := range alternateDNS { + dnsStr, ok = dns.(string) + if !ok { + return nil, fmt.Errorf( + "error processing alternate dns name: %v is not a string", + dns, + ) + } + alternateDNSStrs[i] = dnsStr + } + return alternateDNSStrs, nil +} + +func encryptAES(password string, plaintext string) (string, error) { + if plaintext == "" { + return "", nil + } + + key := make([]byte, 32) + copy(key, []byte(password)) + block, err := aes.NewCipher(key) + if err != nil { + return "", err + } + + content := []byte(plaintext) + blockSize := block.BlockSize() + padding := blockSize - len(content)%blockSize + padtext := bytes.Repeat([]byte{byte(padding)}, padding) + content = append(content, padtext...) + + ciphertext := make([]byte, aes.BlockSize+len(content)) + + iv := ciphertext[:aes.BlockSize] + if _, err := io.ReadFull(rand.Reader, iv); err != nil { + return "", err + } + + mode := cipher.NewCBCEncrypter(block, iv) + mode.CryptBlocks(ciphertext[aes.BlockSize:], content) + + return base64.StdEncoding.EncodeToString(ciphertext), nil +} + +func decryptAES(password string, crypt64 string) (string, error) { + if crypt64 == "" { + return "", nil + } + + key := make([]byte, 32) + copy(key, []byte(password)) + + crypt, err := base64.StdEncoding.DecodeString(crypt64) + if err != nil { + return "", err + } + + block, err := aes.NewCipher(key) + if err != nil { + return "", err + } + + iv := crypt[:aes.BlockSize] + crypt = crypt[aes.BlockSize:] + decrypted := make([]byte, len(crypt)) + mode := cipher.NewCBCDecrypter(block, iv) + mode.CryptBlocks(decrypted, crypt) + + return string(decrypted[:len(decrypted)-int(decrypted[len(decrypted)-1])]), nil +} diff --git a/vendor/github.com/Masterminds/sprig/v3/date.go b/vendor/github.com/Masterminds/sprig/v3/date.go new file mode 100644 index 000000000..ed022ddac --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/date.go @@ -0,0 +1,152 @@ +package sprig + +import ( + "strconv" + "time" +) + +// Given a format and a date, format the date string. +// +// Date can be a `time.Time` or an `int, int32, int64`. +// In the later case, it is treated as seconds since UNIX +// epoch. +func date(fmt string, date interface{}) string { + return dateInZone(fmt, date, "Local") +} + +func htmlDate(date interface{}) string { + return dateInZone("2006-01-02", date, "Local") +} + +func htmlDateInZone(date interface{}, zone string) string { + return dateInZone("2006-01-02", date, zone) +} + +func dateInZone(fmt string, date interface{}, zone string) string { + var t time.Time + switch date := date.(type) { + default: + t = time.Now() + case time.Time: + t = date + case *time.Time: + t = *date + case int64: + t = time.Unix(date, 0) + case int: + t = time.Unix(int64(date), 0) + case int32: + t = time.Unix(int64(date), 0) + } + + loc, err := time.LoadLocation(zone) + if err != nil { + loc, _ = time.LoadLocation("UTC") + } + + return t.In(loc).Format(fmt) +} + +func dateModify(fmt string, date time.Time) time.Time { + d, err := time.ParseDuration(fmt) + if err != nil { + return date + } + return date.Add(d) +} + +func mustDateModify(fmt string, date time.Time) (time.Time, error) { + d, err := time.ParseDuration(fmt) + if err != nil { + return time.Time{}, err + } + return date.Add(d), nil +} + +func dateAgo(date interface{}) string { + var t time.Time + + switch date := date.(type) { + default: + t = time.Now() + case time.Time: + t = date + case int64: + t = time.Unix(date, 0) + case int: + t = time.Unix(int64(date), 0) + } + // Drop resolution to seconds + duration := time.Since(t).Round(time.Second) + return duration.String() +} + +func duration(sec interface{}) string { + var n int64 + switch value := sec.(type) { + default: + n = 0 + case string: + n, _ = strconv.ParseInt(value, 10, 64) + case int64: + n = value + } + return (time.Duration(n) * time.Second).String() +} + +func durationRound(duration interface{}) string { + var d time.Duration + switch duration := duration.(type) { + default: + d = 0 + case string: + d, _ = time.ParseDuration(duration) + case int64: + d = time.Duration(duration) + case time.Time: + d = time.Since(duration) + } + + u := uint64(d) + neg := d < 0 + if neg { + u = -u + } + + var ( + year = uint64(time.Hour) * 24 * 365 + month = uint64(time.Hour) * 24 * 30 + day = uint64(time.Hour) * 24 + hour = uint64(time.Hour) + minute = uint64(time.Minute) + second = uint64(time.Second) + ) + switch { + case u > year: + return strconv.FormatUint(u/year, 10) + "y" + case u > month: + return strconv.FormatUint(u/month, 10) + "mo" + case u > day: + return strconv.FormatUint(u/day, 10) + "d" + case u > hour: + return strconv.FormatUint(u/hour, 10) + "h" + case u > minute: + return strconv.FormatUint(u/minute, 10) + "m" + case u > second: + return strconv.FormatUint(u/second, 10) + "s" + } + return "0s" +} + +func toDate(fmt, str string) time.Time { + t, _ := time.ParseInLocation(fmt, str, time.Local) + return t +} + +func mustToDate(fmt, str string) (time.Time, error) { + return time.ParseInLocation(fmt, str, time.Local) +} + +func unixEpoch(date time.Time) string { + return strconv.FormatInt(date.Unix(), 10) +} diff --git a/vendor/github.com/Masterminds/sprig/v3/defaults.go b/vendor/github.com/Masterminds/sprig/v3/defaults.go new file mode 100644 index 000000000..b9f979666 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/defaults.go @@ -0,0 +1,163 @@ +package sprig + +import ( + "bytes" + "encoding/json" + "math/rand" + "reflect" + "strings" + "time" +) + +func init() { + rand.Seed(time.Now().UnixNano()) +} + +// dfault checks whether `given` is set, and returns default if not set. +// +// This returns `d` if `given` appears not to be set, and `given` otherwise. +// +// For numeric types 0 is unset. +// For strings, maps, arrays, and slices, len() = 0 is considered unset. +// For bool, false is unset. +// Structs are never considered unset. +// +// For everything else, including pointers, a nil value is unset. +func dfault(d interface{}, given ...interface{}) interface{} { + + if empty(given) || empty(given[0]) { + return d + } + return given[0] +} + +// empty returns true if the given value has the zero value for its type. +func empty(given interface{}) bool { + g := reflect.ValueOf(given) + if !g.IsValid() { + return true + } + + // Basically adapted from text/template.isTrue + switch g.Kind() { + default: + return g.IsNil() + case reflect.Array, reflect.Slice, reflect.Map, reflect.String: + return g.Len() == 0 + case reflect.Bool: + return !g.Bool() + case reflect.Complex64, reflect.Complex128: + return g.Complex() == 0 + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return g.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return g.Uint() == 0 + case reflect.Float32, reflect.Float64: + return g.Float() == 0 + case reflect.Struct: + return false + } +} + +// coalesce returns the first non-empty value. +func coalesce(v ...interface{}) interface{} { + for _, val := range v { + if !empty(val) { + return val + } + } + return nil +} + +// all returns true if empty(x) is false for all values x in the list. +// If the list is empty, return true. +func all(v ...interface{}) bool { + for _, val := range v { + if empty(val) { + return false + } + } + return true +} + +// any returns true if empty(x) is false for any x in the list. +// If the list is empty, return false. +func any(v ...interface{}) bool { + for _, val := range v { + if !empty(val) { + return true + } + } + return false +} + +// fromJson decodes JSON into a structured value, ignoring errors. +func fromJson(v string) interface{} { + output, _ := mustFromJson(v) + return output +} + +// mustFromJson decodes JSON into a structured value, returning errors. +func mustFromJson(v string) (interface{}, error) { + var output interface{} + err := json.Unmarshal([]byte(v), &output) + return output, err +} + +// toJson encodes an item into a JSON string +func toJson(v interface{}) string { + output, _ := json.Marshal(v) + return string(output) +} + +func mustToJson(v interface{}) (string, error) { + output, err := json.Marshal(v) + if err != nil { + return "", err + } + return string(output), nil +} + +// toPrettyJson encodes an item into a pretty (indented) JSON string +func toPrettyJson(v interface{}) string { + output, _ := json.MarshalIndent(v, "", " ") + return string(output) +} + +func mustToPrettyJson(v interface{}) (string, error) { + output, err := json.MarshalIndent(v, "", " ") + if err != nil { + return "", err + } + return string(output), nil +} + +// toRawJson encodes an item into a JSON string with no escaping of HTML characters. +func toRawJson(v interface{}) string { + output, err := mustToRawJson(v) + if err != nil { + panic(err) + } + return string(output) +} + +// mustToRawJson encodes an item into a JSON string with no escaping of HTML characters. +func mustToRawJson(v interface{}) (string, error) { + buf := new(bytes.Buffer) + enc := json.NewEncoder(buf) + enc.SetEscapeHTML(false) + err := enc.Encode(&v) + if err != nil { + return "", err + } + return strings.TrimSuffix(buf.String(), "\n"), nil +} + +// ternary returns the first value if the last value is true, otherwise returns the second value. +func ternary(vt interface{}, vf interface{}, v bool) interface{} { + if v { + return vt + } + + return vf +} diff --git a/vendor/github.com/Masterminds/sprig/v3/dict.go b/vendor/github.com/Masterminds/sprig/v3/dict.go new file mode 100644 index 000000000..4315b3542 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/dict.go @@ -0,0 +1,174 @@ +package sprig + +import ( + "dario.cat/mergo" + "github.com/mitchellh/copystructure" +) + +func get(d map[string]interface{}, key string) interface{} { + if val, ok := d[key]; ok { + return val + } + return "" +} + +func set(d map[string]interface{}, key string, value interface{}) map[string]interface{} { + d[key] = value + return d +} + +func unset(d map[string]interface{}, key string) map[string]interface{} { + delete(d, key) + return d +} + +func hasKey(d map[string]interface{}, key string) bool { + _, ok := d[key] + return ok +} + +func pluck(key string, d ...map[string]interface{}) []interface{} { + res := []interface{}{} + for _, dict := range d { + if val, ok := dict[key]; ok { + res = append(res, val) + } + } + return res +} + +func keys(dicts ...map[string]interface{}) []string { + k := []string{} + for _, dict := range dicts { + for key := range dict { + k = append(k, key) + } + } + return k +} + +func pick(dict map[string]interface{}, keys ...string) map[string]interface{} { + res := map[string]interface{}{} + for _, k := range keys { + if v, ok := dict[k]; ok { + res[k] = v + } + } + return res +} + +func omit(dict map[string]interface{}, keys ...string) map[string]interface{} { + res := map[string]interface{}{} + + omit := make(map[string]bool, len(keys)) + for _, k := range keys { + omit[k] = true + } + + for k, v := range dict { + if _, ok := omit[k]; !ok { + res[k] = v + } + } + return res +} + +func dict(v ...interface{}) map[string]interface{} { + dict := map[string]interface{}{} + lenv := len(v) + for i := 0; i < lenv; i += 2 { + key := strval(v[i]) + if i+1 >= lenv { + dict[key] = "" + continue + } + dict[key] = v[i+1] + } + return dict +} + +func merge(dst map[string]interface{}, srcs ...map[string]interface{}) interface{} { + for _, src := range srcs { + if err := mergo.Merge(&dst, src); err != nil { + // Swallow errors inside of a template. + return "" + } + } + return dst +} + +func mustMerge(dst map[string]interface{}, srcs ...map[string]interface{}) (interface{}, error) { + for _, src := range srcs { + if err := mergo.Merge(&dst, src); err != nil { + return nil, err + } + } + return dst, nil +} + +func mergeOverwrite(dst map[string]interface{}, srcs ...map[string]interface{}) interface{} { + for _, src := range srcs { + if err := mergo.MergeWithOverwrite(&dst, src); err != nil { + // Swallow errors inside of a template. + return "" + } + } + return dst +} + +func mustMergeOverwrite(dst map[string]interface{}, srcs ...map[string]interface{}) (interface{}, error) { + for _, src := range srcs { + if err := mergo.MergeWithOverwrite(&dst, src); err != nil { + return nil, err + } + } + return dst, nil +} + +func values(dict map[string]interface{}) []interface{} { + values := []interface{}{} + for _, value := range dict { + values = append(values, value) + } + + return values +} + +func deepCopy(i interface{}) interface{} { + c, err := mustDeepCopy(i) + if err != nil { + panic("deepCopy error: " + err.Error()) + } + + return c +} + +func mustDeepCopy(i interface{}) (interface{}, error) { + return copystructure.Copy(i) +} + +func dig(ps ...interface{}) (interface{}, error) { + if len(ps) < 3 { + panic("dig needs at least three arguments") + } + dict := ps[len(ps)-1].(map[string]interface{}) + def := ps[len(ps)-2] + ks := make([]string, len(ps)-2) + for i := 0; i < len(ks); i++ { + ks[i] = ps[i].(string) + } + + return digFromDict(dict, def, ks) +} + +func digFromDict(dict map[string]interface{}, d interface{}, ks []string) (interface{}, error) { + k, ns := ks[0], ks[1:len(ks)] + step, has := dict[k] + if !has { + return d, nil + } + if len(ns) == 0 { + return step, nil + } + return digFromDict(step.(map[string]interface{}), d, ns) +} diff --git a/vendor/github.com/Masterminds/sprig/v3/doc.go b/vendor/github.com/Masterminds/sprig/v3/doc.go new file mode 100644 index 000000000..91031d6d1 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/doc.go @@ -0,0 +1,19 @@ +/* +Package sprig provides template functions for Go. + +This package contains a number of utility functions for working with data +inside of Go `html/template` and `text/template` files. + +To add these functions, use the `template.Funcs()` method: + + t := template.New("foo").Funcs(sprig.FuncMap()) + +Note that you should add the function map before you parse any template files. + + In several cases, Sprig reverses the order of arguments from the way they + appear in the standard library. This is to make it easier to pipe + arguments into functions. + +See http://masterminds.github.io/sprig/ for more detailed documentation on each of the available functions. +*/ +package sprig diff --git a/vendor/github.com/Masterminds/sprig/v3/functions.go b/vendor/github.com/Masterminds/sprig/v3/functions.go new file mode 100644 index 000000000..cda47d26f --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/functions.go @@ -0,0 +1,385 @@ +package sprig + +import ( + "errors" + "html/template" + "math/rand" + "os" + "path" + "path/filepath" + "reflect" + "strconv" + "strings" + ttemplate "text/template" + "time" + + util "github.com/Masterminds/goutils" + "github.com/huandu/xstrings" + "github.com/shopspring/decimal" +) + +// FuncMap produces the function map. +// +// Use this to pass the functions into the template engine: +// +// tpl := template.New("foo").Funcs(sprig.FuncMap())) +func FuncMap() template.FuncMap { + return HtmlFuncMap() +} + +// HermeticTxtFuncMap returns a 'text/template'.FuncMap with only repeatable functions. +func HermeticTxtFuncMap() ttemplate.FuncMap { + r := TxtFuncMap() + for _, name := range nonhermeticFunctions { + delete(r, name) + } + return r +} + +// HermeticHtmlFuncMap returns an 'html/template'.Funcmap with only repeatable functions. +func HermeticHtmlFuncMap() template.FuncMap { + r := HtmlFuncMap() + for _, name := range nonhermeticFunctions { + delete(r, name) + } + return r +} + +// TxtFuncMap returns a 'text/template'.FuncMap +func TxtFuncMap() ttemplate.FuncMap { + return ttemplate.FuncMap(GenericFuncMap()) +} + +// HtmlFuncMap returns an 'html/template'.Funcmap +func HtmlFuncMap() template.FuncMap { + return template.FuncMap(GenericFuncMap()) +} + +// GenericFuncMap returns a copy of the basic function map as a map[string]interface{}. +func GenericFuncMap() map[string]interface{} { + gfm := make(map[string]interface{}, len(genericMap)) + for k, v := range genericMap { + gfm[k] = v + } + return gfm +} + +// These functions are not guaranteed to evaluate to the same result for given input, because they +// refer to the environment or global state. +var nonhermeticFunctions = []string{ + // Date functions + "date", + "date_in_zone", + "date_modify", + "now", + "htmlDate", + "htmlDateInZone", + "dateInZone", + "dateModify", + + // Strings + "randAlphaNum", + "randAlpha", + "randAscii", + "randNumeric", + "randBytes", + "uuidv4", + + // OS + "env", + "expandenv", + + // Network + "getHostByName", +} + +var genericMap = map[string]interface{}{ + "hello": func() string { return "Hello!" }, + + // Date functions + "ago": dateAgo, + "date": date, + "date_in_zone": dateInZone, + "date_modify": dateModify, + "dateInZone": dateInZone, + "dateModify": dateModify, + "duration": duration, + "durationRound": durationRound, + "htmlDate": htmlDate, + "htmlDateInZone": htmlDateInZone, + "must_date_modify": mustDateModify, + "mustDateModify": mustDateModify, + "mustToDate": mustToDate, + "now": time.Now, + "toDate": toDate, + "unixEpoch": unixEpoch, + + // Strings + "abbrev": abbrev, + "abbrevboth": abbrevboth, + "trunc": trunc, + "trim": strings.TrimSpace, + "upper": strings.ToUpper, + "lower": strings.ToLower, + "title": strings.Title, + "untitle": untitle, + "substr": substring, + // Switch order so that "foo" | repeat 5 + "repeat": func(count int, str string) string { return strings.Repeat(str, count) }, + // Deprecated: Use trimAll. + "trimall": func(a, b string) string { return strings.Trim(b, a) }, + // Switch order so that "$foo" | trimall "$" + "trimAll": func(a, b string) string { return strings.Trim(b, a) }, + "trimSuffix": func(a, b string) string { return strings.TrimSuffix(b, a) }, + "trimPrefix": func(a, b string) string { return strings.TrimPrefix(b, a) }, + "nospace": util.DeleteWhiteSpace, + "initials": initials, + "randAlphaNum": randAlphaNumeric, + "randAlpha": randAlpha, + "randAscii": randAscii, + "randNumeric": randNumeric, + "swapcase": util.SwapCase, + "shuffle": xstrings.Shuffle, + "snakecase": xstrings.ToSnakeCase, + // camelcase used to call xstrings.ToCamelCase, but that function had a breaking change in version + // 1.5 that moved it from upper camel case to lower camel case. This is a breaking change for sprig. + // A new xstrings.ToPascalCase function was added that provided upper camel case. + "camelcase": xstrings.ToPascalCase, + "kebabcase": xstrings.ToKebabCase, + "wrap": func(l int, s string) string { return util.Wrap(s, l) }, + "wrapWith": func(l int, sep, str string) string { return util.WrapCustom(str, l, sep, true) }, + // Switch order so that "foobar" | contains "foo" + "contains": func(substr string, str string) bool { return strings.Contains(str, substr) }, + "hasPrefix": func(substr string, str string) bool { return strings.HasPrefix(str, substr) }, + "hasSuffix": func(substr string, str string) bool { return strings.HasSuffix(str, substr) }, + "quote": quote, + "squote": squote, + "cat": cat, + "indent": indent, + "nindent": nindent, + "replace": replace, + "plural": plural, + "sha1sum": sha1sum, + "sha256sum": sha256sum, + "sha512sum": sha512sum, + "adler32sum": adler32sum, + "toString": strval, + + // Wrap Atoi to stop errors. + "atoi": func(a string) int { i, _ := strconv.Atoi(a); return i }, + "int64": toInt64, + "int": toInt, + "float64": toFloat64, + "seq": seq, + "toDecimal": toDecimal, + + //"gt": func(a, b int) bool {return a > b}, + //"gte": func(a, b int) bool {return a >= b}, + //"lt": func(a, b int) bool {return a < b}, + //"lte": func(a, b int) bool {return a <= b}, + + // split "/" foo/bar returns map[int]string{0: foo, 1: bar} + "split": split, + "splitList": func(sep, orig string) []string { return strings.Split(orig, sep) }, + // splitn "/" foo/bar/fuu returns map[int]string{0: foo, 1: bar/fuu} + "splitn": splitn, + "toStrings": strslice, + + "until": until, + "untilStep": untilStep, + + // VERY basic arithmetic. + "add1": func(i interface{}) int64 { return toInt64(i) + 1 }, + "add": func(i ...interface{}) int64 { + var a int64 = 0 + for _, b := range i { + a += toInt64(b) + } + return a + }, + "sub": func(a, b interface{}) int64 { return toInt64(a) - toInt64(b) }, + "div": func(a, b interface{}) int64 { return toInt64(a) / toInt64(b) }, + "mod": func(a, b interface{}) int64 { return toInt64(a) % toInt64(b) }, + "mul": func(a interface{}, v ...interface{}) int64 { + val := toInt64(a) + for _, b := range v { + val = val * toInt64(b) + } + return val + }, + "randInt": func(min, max int) int { return rand.Intn(max-min) + min }, + "add1f": func(i interface{}) float64 { + return execDecimalOp(i, []interface{}{1}, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Add(d2) }) + }, + "addf": func(i ...interface{}) float64 { + a := interface{}(float64(0)) + return execDecimalOp(a, i, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Add(d2) }) + }, + "subf": func(a interface{}, v ...interface{}) float64 { + return execDecimalOp(a, v, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Sub(d2) }) + }, + "divf": func(a interface{}, v ...interface{}) float64 { + return execDecimalOp(a, v, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Div(d2) }) + }, + "mulf": func(a interface{}, v ...interface{}) float64 { + return execDecimalOp(a, v, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Mul(d2) }) + }, + "biggest": max, + "max": max, + "min": min, + "maxf": maxf, + "minf": minf, + "ceil": ceil, + "floor": floor, + "round": round, + + // string slices. Note that we reverse the order b/c that's better + // for template processing. + "join": join, + "sortAlpha": sortAlpha, + + // Defaults + "default": dfault, + "empty": empty, + "coalesce": coalesce, + "all": all, + "any": any, + "compact": compact, + "mustCompact": mustCompact, + "fromJson": fromJson, + "toJson": toJson, + "toPrettyJson": toPrettyJson, + "toRawJson": toRawJson, + "mustFromJson": mustFromJson, + "mustToJson": mustToJson, + "mustToPrettyJson": mustToPrettyJson, + "mustToRawJson": mustToRawJson, + "ternary": ternary, + "deepCopy": deepCopy, + "mustDeepCopy": mustDeepCopy, + + // Reflection + "typeOf": typeOf, + "typeIs": typeIs, + "typeIsLike": typeIsLike, + "kindOf": kindOf, + "kindIs": kindIs, + "deepEqual": reflect.DeepEqual, + + // OS: + "env": os.Getenv, + "expandenv": os.ExpandEnv, + + // Network: + "getHostByName": getHostByName, + + // Paths: + "base": path.Base, + "dir": path.Dir, + "clean": path.Clean, + "ext": path.Ext, + "isAbs": path.IsAbs, + + // Filepaths: + "osBase": filepath.Base, + "osClean": filepath.Clean, + "osDir": filepath.Dir, + "osExt": filepath.Ext, + "osIsAbs": filepath.IsAbs, + + // Encoding: + "b64enc": base64encode, + "b64dec": base64decode, + "b32enc": base32encode, + "b32dec": base32decode, + + // Data Structures: + "tuple": list, // FIXME: with the addition of append/prepend these are no longer immutable. + "list": list, + "dict": dict, + "get": get, + "set": set, + "unset": unset, + "hasKey": hasKey, + "pluck": pluck, + "keys": keys, + "pick": pick, + "omit": omit, + "merge": merge, + "mergeOverwrite": mergeOverwrite, + "mustMerge": mustMerge, + "mustMergeOverwrite": mustMergeOverwrite, + "values": values, + + "append": push, "push": push, + "mustAppend": mustPush, "mustPush": mustPush, + "prepend": prepend, + "mustPrepend": mustPrepend, + "first": first, + "mustFirst": mustFirst, + "rest": rest, + "mustRest": mustRest, + "last": last, + "mustLast": mustLast, + "initial": initial, + "mustInitial": mustInitial, + "reverse": reverse, + "mustReverse": mustReverse, + "uniq": uniq, + "mustUniq": mustUniq, + "without": without, + "mustWithout": mustWithout, + "has": has, + "mustHas": mustHas, + "slice": slice, + "mustSlice": mustSlice, + "concat": concat, + "dig": dig, + "chunk": chunk, + "mustChunk": mustChunk, + + // Crypto: + "bcrypt": bcrypt, + "htpasswd": htpasswd, + "genPrivateKey": generatePrivateKey, + "derivePassword": derivePassword, + "buildCustomCert": buildCustomCertificate, + "genCA": generateCertificateAuthority, + "genCAWithKey": generateCertificateAuthorityWithPEMKey, + "genSelfSignedCert": generateSelfSignedCertificate, + "genSelfSignedCertWithKey": generateSelfSignedCertificateWithPEMKey, + "genSignedCert": generateSignedCertificate, + "genSignedCertWithKey": generateSignedCertificateWithPEMKey, + "encryptAES": encryptAES, + "decryptAES": decryptAES, + "randBytes": randBytes, + + // UUIDs: + "uuidv4": uuidv4, + + // SemVer: + "semver": semver, + "semverCompare": semverCompare, + + // Flow Control: + "fail": func(msg string) (string, error) { return "", errors.New(msg) }, + + // Regex + "regexMatch": regexMatch, + "mustRegexMatch": mustRegexMatch, + "regexFindAll": regexFindAll, + "mustRegexFindAll": mustRegexFindAll, + "regexFind": regexFind, + "mustRegexFind": mustRegexFind, + "regexReplaceAll": regexReplaceAll, + "mustRegexReplaceAll": mustRegexReplaceAll, + "regexReplaceAllLiteral": regexReplaceAllLiteral, + "mustRegexReplaceAllLiteral": mustRegexReplaceAllLiteral, + "regexSplit": regexSplit, + "mustRegexSplit": mustRegexSplit, + "regexQuoteMeta": regexQuoteMeta, + + // URLs: + "urlParse": urlParse, + "urlJoin": urlJoin, +} diff --git a/vendor/github.com/Masterminds/sprig/v3/list.go b/vendor/github.com/Masterminds/sprig/v3/list.go new file mode 100644 index 000000000..ca0fbb789 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/list.go @@ -0,0 +1,464 @@ +package sprig + +import ( + "fmt" + "math" + "reflect" + "sort" +) + +// Reflection is used in these functions so that slices and arrays of strings, +// ints, and other types not implementing []interface{} can be worked with. +// For example, this is useful if you need to work on the output of regexs. + +func list(v ...interface{}) []interface{} { + return v +} + +func push(list interface{}, v interface{}) []interface{} { + l, err := mustPush(list, v) + if err != nil { + panic(err) + } + + return l +} + +func mustPush(list interface{}, v interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + nl := make([]interface{}, l) + for i := 0; i < l; i++ { + nl[i] = l2.Index(i).Interface() + } + + return append(nl, v), nil + + default: + return nil, fmt.Errorf("Cannot push on type %s", tp) + } +} + +func prepend(list interface{}, v interface{}) []interface{} { + l, err := mustPrepend(list, v) + if err != nil { + panic(err) + } + + return l +} + +func mustPrepend(list interface{}, v interface{}) ([]interface{}, error) { + //return append([]interface{}{v}, list...) + + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + nl := make([]interface{}, l) + for i := 0; i < l; i++ { + nl[i] = l2.Index(i).Interface() + } + + return append([]interface{}{v}, nl...), nil + + default: + return nil, fmt.Errorf("Cannot prepend on type %s", tp) + } +} + +func chunk(size int, list interface{}) [][]interface{} { + l, err := mustChunk(size, list) + if err != nil { + panic(err) + } + + return l +} + +func mustChunk(size int, list interface{}) ([][]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + + cs := int(math.Floor(float64(l-1)/float64(size)) + 1) + nl := make([][]interface{}, cs) + + for i := 0; i < cs; i++ { + clen := size + if i == cs-1 { + clen = int(math.Floor(math.Mod(float64(l), float64(size)))) + if clen == 0 { + clen = size + } + } + + nl[i] = make([]interface{}, clen) + + for j := 0; j < clen; j++ { + ix := i*size + j + nl[i][j] = l2.Index(ix).Interface() + } + } + + return nl, nil + + default: + return nil, fmt.Errorf("Cannot chunk type %s", tp) + } +} + +func last(list interface{}) interface{} { + l, err := mustLast(list) + if err != nil { + panic(err) + } + + return l +} + +func mustLast(list interface{}) (interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + return l2.Index(l - 1).Interface(), nil + default: + return nil, fmt.Errorf("Cannot find last on type %s", tp) + } +} + +func first(list interface{}) interface{} { + l, err := mustFirst(list) + if err != nil { + panic(err) + } + + return l +} + +func mustFirst(list interface{}) (interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + return l2.Index(0).Interface(), nil + default: + return nil, fmt.Errorf("Cannot find first on type %s", tp) + } +} + +func rest(list interface{}) []interface{} { + l, err := mustRest(list) + if err != nil { + panic(err) + } + + return l +} + +func mustRest(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + nl := make([]interface{}, l-1) + for i := 1; i < l; i++ { + nl[i-1] = l2.Index(i).Interface() + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot find rest on type %s", tp) + } +} + +func initial(list interface{}) []interface{} { + l, err := mustInitial(list) + if err != nil { + panic(err) + } + + return l +} + +func mustInitial(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + nl := make([]interface{}, l-1) + for i := 0; i < l-1; i++ { + nl[i] = l2.Index(i).Interface() + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot find initial on type %s", tp) + } +} + +func sortAlpha(list interface{}) []string { + k := reflect.Indirect(reflect.ValueOf(list)).Kind() + switch k { + case reflect.Slice, reflect.Array: + a := strslice(list) + s := sort.StringSlice(a) + s.Sort() + return s + } + return []string{strval(list)} +} + +func reverse(v interface{}) []interface{} { + l, err := mustReverse(v) + if err != nil { + panic(err) + } + + return l +} + +func mustReverse(v interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(v).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(v) + + l := l2.Len() + // We do not sort in place because the incoming array should not be altered. + nl := make([]interface{}, l) + for i := 0; i < l; i++ { + nl[l-i-1] = l2.Index(i).Interface() + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot find reverse on type %s", tp) + } +} + +func compact(list interface{}) []interface{} { + l, err := mustCompact(list) + if err != nil { + panic(err) + } + + return l +} + +func mustCompact(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + nl := []interface{}{} + var item interface{} + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if !empty(item) { + nl = append(nl, item) + } + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot compact on type %s", tp) + } +} + +func uniq(list interface{}) []interface{} { + l, err := mustUniq(list) + if err != nil { + panic(err) + } + + return l +} + +func mustUniq(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + dest := []interface{}{} + var item interface{} + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if !inList(dest, item) { + dest = append(dest, item) + } + } + + return dest, nil + default: + return nil, fmt.Errorf("Cannot find uniq on type %s", tp) + } +} + +func inList(haystack []interface{}, needle interface{}) bool { + for _, h := range haystack { + if reflect.DeepEqual(needle, h) { + return true + } + } + return false +} + +func without(list interface{}, omit ...interface{}) []interface{} { + l, err := mustWithout(list, omit...) + if err != nil { + panic(err) + } + + return l +} + +func mustWithout(list interface{}, omit ...interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + res := []interface{}{} + var item interface{} + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if !inList(omit, item) { + res = append(res, item) + } + } + + return res, nil + default: + return nil, fmt.Errorf("Cannot find without on type %s", tp) + } +} + +func has(needle interface{}, haystack interface{}) bool { + l, err := mustHas(needle, haystack) + if err != nil { + panic(err) + } + + return l +} + +func mustHas(needle interface{}, haystack interface{}) (bool, error) { + if haystack == nil { + return false, nil + } + tp := reflect.TypeOf(haystack).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(haystack) + var item interface{} + l := l2.Len() + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if reflect.DeepEqual(needle, item) { + return true, nil + } + } + + return false, nil + default: + return false, fmt.Errorf("Cannot find has on type %s", tp) + } +} + +// $list := [1, 2, 3, 4, 5] +// slice $list -> list[0:5] = list[:] +// slice $list 0 3 -> list[0:3] = list[:3] +// slice $list 3 5 -> list[3:5] +// slice $list 3 -> list[3:5] = list[3:] +func slice(list interface{}, indices ...interface{}) interface{} { + l, err := mustSlice(list, indices...) + if err != nil { + panic(err) + } + + return l +} + +func mustSlice(list interface{}, indices ...interface{}) (interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + var start, end int + if len(indices) > 0 { + start = toInt(indices[0]) + } + if len(indices) < 2 { + end = l + } else { + end = toInt(indices[1]) + } + + return l2.Slice(start, end).Interface(), nil + default: + return nil, fmt.Errorf("list should be type of slice or array but %s", tp) + } +} + +func concat(lists ...interface{}) interface{} { + var res []interface{} + for _, list := range lists { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + for i := 0; i < l2.Len(); i++ { + res = append(res, l2.Index(i).Interface()) + } + default: + panic(fmt.Sprintf("Cannot concat type %s as list", tp)) + } + } + return res +} diff --git a/vendor/github.com/Masterminds/sprig/v3/network.go b/vendor/github.com/Masterminds/sprig/v3/network.go new file mode 100644 index 000000000..108d78a94 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/network.go @@ -0,0 +1,12 @@ +package sprig + +import ( + "math/rand" + "net" +) + +func getHostByName(name string) string { + addrs, _ := net.LookupHost(name) + //TODO: add error handing when release v3 comes out + return addrs[rand.Intn(len(addrs))] +} diff --git a/vendor/github.com/Masterminds/sprig/v3/numeric.go b/vendor/github.com/Masterminds/sprig/v3/numeric.go new file mode 100644 index 000000000..f68e4182e --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/numeric.go @@ -0,0 +1,186 @@ +package sprig + +import ( + "fmt" + "math" + "strconv" + "strings" + + "github.com/spf13/cast" + "github.com/shopspring/decimal" +) + +// toFloat64 converts 64-bit floats +func toFloat64(v interface{}) float64 { + return cast.ToFloat64(v) +} + +func toInt(v interface{}) int { + return cast.ToInt(v) +} + +// toInt64 converts integer types to 64-bit integers +func toInt64(v interface{}) int64 { + return cast.ToInt64(v) +} + +func max(a interface{}, i ...interface{}) int64 { + aa := toInt64(a) + for _, b := range i { + bb := toInt64(b) + if bb > aa { + aa = bb + } + } + return aa +} + +func maxf(a interface{}, i ...interface{}) float64 { + aa := toFloat64(a) + for _, b := range i { + bb := toFloat64(b) + aa = math.Max(aa, bb) + } + return aa +} + +func min(a interface{}, i ...interface{}) int64 { + aa := toInt64(a) + for _, b := range i { + bb := toInt64(b) + if bb < aa { + aa = bb + } + } + return aa +} + +func minf(a interface{}, i ...interface{}) float64 { + aa := toFloat64(a) + for _, b := range i { + bb := toFloat64(b) + aa = math.Min(aa, bb) + } + return aa +} + +func until(count int) []int { + step := 1 + if count < 0 { + step = -1 + } + return untilStep(0, count, step) +} + +func untilStep(start, stop, step int) []int { + v := []int{} + + if stop < start { + if step >= 0 { + return v + } + for i := start; i > stop; i += step { + v = append(v, i) + } + return v + } + + if step <= 0 { + return v + } + for i := start; i < stop; i += step { + v = append(v, i) + } + return v +} + +func floor(a interface{}) float64 { + aa := toFloat64(a) + return math.Floor(aa) +} + +func ceil(a interface{}) float64 { + aa := toFloat64(a) + return math.Ceil(aa) +} + +func round(a interface{}, p int, rOpt ...float64) float64 { + roundOn := .5 + if len(rOpt) > 0 { + roundOn = rOpt[0] + } + val := toFloat64(a) + places := toFloat64(p) + + var round float64 + pow := math.Pow(10, places) + digit := pow * val + _, div := math.Modf(digit) + if div >= roundOn { + round = math.Ceil(digit) + } else { + round = math.Floor(digit) + } + return round / pow +} + +// converts unix octal to decimal +func toDecimal(v interface{}) int64 { + result, err := strconv.ParseInt(fmt.Sprint(v), 8, 64) + if err != nil { + return 0 + } + return result +} + +func seq(params ...int) string { + increment := 1 + switch len(params) { + case 0: + return "" + case 1: + start := 1 + end := params[0] + if end < start { + increment = -1 + } + return intArrayToString(untilStep(start, end+increment, increment), " ") + case 3: + start := params[0] + end := params[2] + step := params[1] + if end < start { + increment = -1 + if step > 0 { + return "" + } + } + return intArrayToString(untilStep(start, end+increment, step), " ") + case 2: + start := params[0] + end := params[1] + step := 1 + if end < start { + step = -1 + } + return intArrayToString(untilStep(start, end+step, step), " ") + default: + return "" + } +} + +func intArrayToString(slice []int, delimeter string) string { + return strings.Trim(strings.Join(strings.Fields(fmt.Sprint(slice)), delimeter), "[]") +} + +// performs a float and subsequent decimal.Decimal conversion on inputs, +// and iterates through a and b executing the mathmetical operation f +func execDecimalOp(a interface{}, b []interface{}, f func(d1, d2 decimal.Decimal) decimal.Decimal) float64 { + prt := decimal.NewFromFloat(toFloat64(a)) + for _, x := range b { + dx := decimal.NewFromFloat(toFloat64(x)) + prt = f(prt, dx) + } + rslt, _ := prt.Float64() + return rslt +} diff --git a/vendor/github.com/Masterminds/sprig/v3/reflect.go b/vendor/github.com/Masterminds/sprig/v3/reflect.go new file mode 100644 index 000000000..8a65c132f --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/reflect.go @@ -0,0 +1,28 @@ +package sprig + +import ( + "fmt" + "reflect" +) + +// typeIs returns true if the src is the type named in target. +func typeIs(target string, src interface{}) bool { + return target == typeOf(src) +} + +func typeIsLike(target string, src interface{}) bool { + t := typeOf(src) + return target == t || "*"+target == t +} + +func typeOf(src interface{}) string { + return fmt.Sprintf("%T", src) +} + +func kindIs(target string, src interface{}) bool { + return target == kindOf(src) +} + +func kindOf(src interface{}) string { + return reflect.ValueOf(src).Kind().String() +} diff --git a/vendor/github.com/Masterminds/sprig/v3/regex.go b/vendor/github.com/Masterminds/sprig/v3/regex.go new file mode 100644 index 000000000..fab551018 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/regex.go @@ -0,0 +1,83 @@ +package sprig + +import ( + "regexp" +) + +func regexMatch(regex string, s string) bool { + match, _ := regexp.MatchString(regex, s) + return match +} + +func mustRegexMatch(regex string, s string) (bool, error) { + return regexp.MatchString(regex, s) +} + +func regexFindAll(regex string, s string, n int) []string { + r := regexp.MustCompile(regex) + return r.FindAllString(s, n) +} + +func mustRegexFindAll(regex string, s string, n int) ([]string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return []string{}, err + } + return r.FindAllString(s, n), nil +} + +func regexFind(regex string, s string) string { + r := regexp.MustCompile(regex) + return r.FindString(s) +} + +func mustRegexFind(regex string, s string) (string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return "", err + } + return r.FindString(s), nil +} + +func regexReplaceAll(regex string, s string, repl string) string { + r := regexp.MustCompile(regex) + return r.ReplaceAllString(s, repl) +} + +func mustRegexReplaceAll(regex string, s string, repl string) (string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return "", err + } + return r.ReplaceAllString(s, repl), nil +} + +func regexReplaceAllLiteral(regex string, s string, repl string) string { + r := regexp.MustCompile(regex) + return r.ReplaceAllLiteralString(s, repl) +} + +func mustRegexReplaceAllLiteral(regex string, s string, repl string) (string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return "", err + } + return r.ReplaceAllLiteralString(s, repl), nil +} + +func regexSplit(regex string, s string, n int) []string { + r := regexp.MustCompile(regex) + return r.Split(s, n) +} + +func mustRegexSplit(regex string, s string, n int) ([]string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return []string{}, err + } + return r.Split(s, n), nil +} + +func regexQuoteMeta(s string) string { + return regexp.QuoteMeta(s) +} diff --git a/vendor/github.com/Masterminds/sprig/v3/semver.go b/vendor/github.com/Masterminds/sprig/v3/semver.go new file mode 100644 index 000000000..3fbe08aa6 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/semver.go @@ -0,0 +1,23 @@ +package sprig + +import ( + sv2 "github.com/Masterminds/semver/v3" +) + +func semverCompare(constraint, version string) (bool, error) { + c, err := sv2.NewConstraint(constraint) + if err != nil { + return false, err + } + + v, err := sv2.NewVersion(version) + if err != nil { + return false, err + } + + return c.Check(v), nil +} + +func semver(version string) (*sv2.Version, error) { + return sv2.NewVersion(version) +} diff --git a/vendor/github.com/Masterminds/sprig/v3/strings.go b/vendor/github.com/Masterminds/sprig/v3/strings.go new file mode 100644 index 000000000..e0ae628c8 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/strings.go @@ -0,0 +1,236 @@ +package sprig + +import ( + "encoding/base32" + "encoding/base64" + "fmt" + "reflect" + "strconv" + "strings" + + util "github.com/Masterminds/goutils" +) + +func base64encode(v string) string { + return base64.StdEncoding.EncodeToString([]byte(v)) +} + +func base64decode(v string) string { + data, err := base64.StdEncoding.DecodeString(v) + if err != nil { + return err.Error() + } + return string(data) +} + +func base32encode(v string) string { + return base32.StdEncoding.EncodeToString([]byte(v)) +} + +func base32decode(v string) string { + data, err := base32.StdEncoding.DecodeString(v) + if err != nil { + return err.Error() + } + return string(data) +} + +func abbrev(width int, s string) string { + if width < 4 { + return s + } + r, _ := util.Abbreviate(s, width) + return r +} + +func abbrevboth(left, right int, s string) string { + if right < 4 || left > 0 && right < 7 { + return s + } + r, _ := util.AbbreviateFull(s, left, right) + return r +} +func initials(s string) string { + // Wrap this just to eliminate the var args, which templates don't do well. + return util.Initials(s) +} + +func randAlphaNumeric(count int) string { + // It is not possible, it appears, to actually generate an error here. + r, _ := util.CryptoRandomAlphaNumeric(count) + return r +} + +func randAlpha(count int) string { + r, _ := util.CryptoRandomAlphabetic(count) + return r +} + +func randAscii(count int) string { + r, _ := util.CryptoRandomAscii(count) + return r +} + +func randNumeric(count int) string { + r, _ := util.CryptoRandomNumeric(count) + return r +} + +func untitle(str string) string { + return util.Uncapitalize(str) +} + +func quote(str ...interface{}) string { + out := make([]string, 0, len(str)) + for _, s := range str { + if s != nil { + out = append(out, fmt.Sprintf("%q", strval(s))) + } + } + return strings.Join(out, " ") +} + +func squote(str ...interface{}) string { + out := make([]string, 0, len(str)) + for _, s := range str { + if s != nil { + out = append(out, fmt.Sprintf("'%v'", s)) + } + } + return strings.Join(out, " ") +} + +func cat(v ...interface{}) string { + v = removeNilElements(v) + r := strings.TrimSpace(strings.Repeat("%v ", len(v))) + return fmt.Sprintf(r, v...) +} + +func indent(spaces int, v string) string { + pad := strings.Repeat(" ", spaces) + return pad + strings.Replace(v, "\n", "\n"+pad, -1) +} + +func nindent(spaces int, v string) string { + return "\n" + indent(spaces, v) +} + +func replace(old, new, src string) string { + return strings.Replace(src, old, new, -1) +} + +func plural(one, many string, count int) string { + if count == 1 { + return one + } + return many +} + +func strslice(v interface{}) []string { + switch v := v.(type) { + case []string: + return v + case []interface{}: + b := make([]string, 0, len(v)) + for _, s := range v { + if s != nil { + b = append(b, strval(s)) + } + } + return b + default: + val := reflect.ValueOf(v) + switch val.Kind() { + case reflect.Array, reflect.Slice: + l := val.Len() + b := make([]string, 0, l) + for i := 0; i < l; i++ { + value := val.Index(i).Interface() + if value != nil { + b = append(b, strval(value)) + } + } + return b + default: + if v == nil { + return []string{} + } + + return []string{strval(v)} + } + } +} + +func removeNilElements(v []interface{}) []interface{} { + newSlice := make([]interface{}, 0, len(v)) + for _, i := range v { + if i != nil { + newSlice = append(newSlice, i) + } + } + return newSlice +} + +func strval(v interface{}) string { + switch v := v.(type) { + case string: + return v + case []byte: + return string(v) + case error: + return v.Error() + case fmt.Stringer: + return v.String() + default: + return fmt.Sprintf("%v", v) + } +} + +func trunc(c int, s string) string { + if c < 0 && len(s)+c > 0 { + return s[len(s)+c:] + } + if c >= 0 && len(s) > c { + return s[:c] + } + return s +} + +func join(sep string, v interface{}) string { + return strings.Join(strslice(v), sep) +} + +func split(sep, orig string) map[string]string { + parts := strings.Split(orig, sep) + res := make(map[string]string, len(parts)) + for i, v := range parts { + res["_"+strconv.Itoa(i)] = v + } + return res +} + +func splitn(sep string, n int, orig string) map[string]string { + parts := strings.SplitN(orig, sep, n) + res := make(map[string]string, len(parts)) + for i, v := range parts { + res["_"+strconv.Itoa(i)] = v + } + return res +} + +// substring creates a substring of the given string. +// +// If start is < 0, this calls string[:end]. +// +// If start is >= 0 and end < 0 or end bigger than s length, this calls string[start:] +// +// Otherwise, this calls string[start, end]. +func substring(start, end int, s string) string { + if start < 0 { + return s[:end] + } + if end < 0 || end > len(s) { + return s[start:] + } + return s[start:end] +} diff --git a/vendor/github.com/Masterminds/sprig/v3/url.go b/vendor/github.com/Masterminds/sprig/v3/url.go new file mode 100644 index 000000000..b8e120e19 --- /dev/null +++ b/vendor/github.com/Masterminds/sprig/v3/url.go @@ -0,0 +1,66 @@ +package sprig + +import ( + "fmt" + "net/url" + "reflect" +) + +func dictGetOrEmpty(dict map[string]interface{}, key string) string { + value, ok := dict[key] + if !ok { + return "" + } + tp := reflect.TypeOf(value).Kind() + if tp != reflect.String { + panic(fmt.Sprintf("unable to parse %s key, must be of type string, but %s found", key, tp.String())) + } + return reflect.ValueOf(value).String() +} + +// parses given URL to return dict object +func urlParse(v string) map[string]interface{} { + dict := map[string]interface{}{} + parsedURL, err := url.Parse(v) + if err != nil { + panic(fmt.Sprintf("unable to parse url: %s", err)) + } + dict["scheme"] = parsedURL.Scheme + dict["host"] = parsedURL.Host + dict["hostname"] = parsedURL.Hostname() + dict["path"] = parsedURL.Path + dict["query"] = parsedURL.RawQuery + dict["opaque"] = parsedURL.Opaque + dict["fragment"] = parsedURL.Fragment + if parsedURL.User != nil { + dict["userinfo"] = parsedURL.User.String() + } else { + dict["userinfo"] = "" + } + + return dict +} + +// join given dict to URL string +func urlJoin(d map[string]interface{}) string { + resURL := url.URL{ + Scheme: dictGetOrEmpty(d, "scheme"), + Host: dictGetOrEmpty(d, "host"), + Path: dictGetOrEmpty(d, "path"), + RawQuery: dictGetOrEmpty(d, "query"), + Opaque: dictGetOrEmpty(d, "opaque"), + Fragment: dictGetOrEmpty(d, "fragment"), + } + userinfo := dictGetOrEmpty(d, "userinfo") + var user *url.Userinfo + if userinfo != "" { + tempURL, err := url.Parse(fmt.Sprintf("proto://%s@host", userinfo)) + if err != nil { + panic(fmt.Sprintf("unable to parse userinfo in dict: %s", err)) + } + user = tempURL.User + } + + resURL.User = user + return resURL.String() +} diff --git a/vendor/github.com/Masterminds/squirrel/.gitignore b/vendor/github.com/Masterminds/squirrel/.gitignore new file mode 100644 index 000000000..4a0699f0b --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/.gitignore @@ -0,0 +1 @@ +squirrel.test \ No newline at end of file diff --git a/vendor/github.com/Masterminds/squirrel/.travis.yml b/vendor/github.com/Masterminds/squirrel/.travis.yml new file mode 100644 index 000000000..7bb6da487 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/.travis.yml @@ -0,0 +1,30 @@ +language: go + +go: + - 1.11.x + - 1.12.x + - 1.13.x + +services: + - mysql + - postgresql + +# Setting sudo access to false will let Travis CI use containers rather than +# VMs to run the tests. For more details see: +# - http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +# - http://docs.travis-ci.com/user/workers/standard-infrastructure/ +sudo: false + +before_script: + - mysql -e 'CREATE DATABASE squirrel;' + - psql -c 'CREATE DATABASE squirrel;' -U postgres + +script: + - go test + - cd integration + - go test -args -driver sqlite3 + - go test -args -driver mysql -dataSource travis@/squirrel + - go test -args -driver postgres -dataSource 'postgres://postgres@localhost/squirrel?sslmode=disable' + +notifications: + irc: "irc.freenode.net#masterminds" diff --git a/vendor/github.com/Masterminds/squirrel/LICENSE b/vendor/github.com/Masterminds/squirrel/LICENSE new file mode 100644 index 000000000..b459007fd --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Squirrel: The Masterminds +Copyright (c) 2014-2015, Lann Martin. Copyright (C) 2015-2016, Google. Copyright (C) 2015, Matt Farina and Matt Butcher. + + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/Masterminds/squirrel/README.md b/vendor/github.com/Masterminds/squirrel/README.md new file mode 100644 index 000000000..1d37f282f --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/README.md @@ -0,0 +1,142 @@ +[![Stability: Maintenance](https://masterminds.github.io/stability/maintenance.svg)](https://masterminds.github.io/stability/maintenance.html) +### Squirrel is "complete". +Bug fixes will still be merged (slowly). Bug reports are welcome, but I will not necessarily respond to them. If another fork (or substantially similar project) actively improves on what Squirrel does, let me know and I may link to it here. + + +# Squirrel - fluent SQL generator for Go + +```go +import "github.com/Masterminds/squirrel" +``` + + +[![GoDoc](https://godoc.org/github.com/Masterminds/squirrel?status.png)](https://godoc.org/github.com/Masterminds/squirrel) +[![Build Status](https://api.travis-ci.org/Masterminds/squirrel.svg?branch=master)](https://travis-ci.org/Masterminds/squirrel) + +**Squirrel is not an ORM.** For an application of Squirrel, check out +[structable, a table-struct mapper](https://github.com/Masterminds/structable) + + +Squirrel helps you build SQL queries from composable parts: + +```go +import sq "github.com/Masterminds/squirrel" + +users := sq.Select("*").From("users").Join("emails USING (email_id)") + +active := users.Where(sq.Eq{"deleted_at": nil}) + +sql, args, err := active.ToSql() + +sql == "SELECT * FROM users JOIN emails USING (email_id) WHERE deleted_at IS NULL" +``` + +```go +sql, args, err := sq. + Insert("users").Columns("name", "age"). + Values("moe", 13).Values("larry", sq.Expr("? + 5", 12)). + ToSql() + +sql == "INSERT INTO users (name,age) VALUES (?,?),(?,? + 5)" +``` + +Squirrel can also execute queries directly: + +```go +stooges := users.Where(sq.Eq{"username": []string{"moe", "larry", "curly", "shemp"}}) +three_stooges := stooges.Limit(3) +rows, err := three_stooges.RunWith(db).Query() + +// Behaves like: +rows, err := db.Query("SELECT * FROM users WHERE username IN (?,?,?,?) LIMIT 3", + "moe", "larry", "curly", "shemp") +``` + +Squirrel makes conditional query building a breeze: + +```go +if len(q) > 0 { + users = users.Where("name LIKE ?", fmt.Sprint("%", q, "%")) +} +``` + +Squirrel wants to make your life easier: + +```go +// StmtCache caches Prepared Stmts for you +dbCache := sq.NewStmtCache(db) + +// StatementBuilder keeps your syntax neat +mydb := sq.StatementBuilder.RunWith(dbCache) +select_users := mydb.Select("*").From("users") +``` + +Squirrel loves PostgreSQL: + +```go +psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar) + +// You use question marks for placeholders... +sql, _, _ := psql.Select("*").From("elephants").Where("name IN (?,?)", "Dumbo", "Verna").ToSql() + +/// ...squirrel replaces them using PlaceholderFormat. +sql == "SELECT * FROM elephants WHERE name IN ($1,$2)" + + +/// You can retrieve id ... +query := sq.Insert("nodes"). + Columns("uuid", "type", "data"). + Values(node.Uuid, node.Type, node.Data). + Suffix("RETURNING \"id\""). + RunWith(m.db). + PlaceholderFormat(sq.Dollar) + +query.QueryRow().Scan(&node.id) +``` + +You can escape question marks by inserting two question marks: + +```sql +SELECT * FROM nodes WHERE meta->'format' ??| array[?,?] +``` + +will generate with the Dollar Placeholder: + +```sql +SELECT * FROM nodes WHERE meta->'format' ?| array[$1,$2] +``` + +## FAQ + +* **How can I build an IN query on composite keys / tuples, e.g. `WHERE (col1, col2) IN ((1,2),(3,4))`? ([#104](https://github.com/Masterminds/squirrel/issues/104))** + + Squirrel does not explicitly support tuples, but you can get the same effect with e.g.: + + ```go + sq.Or{ + sq.Eq{"col1": 1, "col2": 2}, + sq.Eq{"col1": 3, "col2": 4}} + ``` + + ```sql + WHERE (col1 = 1 AND col2 = 2) OR (col1 = 3 AND col2 = 4) + ``` + + (which should produce the same query plan as the tuple version) + +* **Why doesn't `Eq{"mynumber": []uint8{1,2,3}}` turn into an `IN` query? ([#114](https://github.com/Masterminds/squirrel/issues/114))** + + Values of type `[]byte` are handled specially by `database/sql`. In Go, [`byte` is just an alias of `uint8`](https://golang.org/pkg/builtin/#byte), so there is no way to distinguish `[]uint8` from `[]byte`. + +* **Some features are poorly documented!** + + This isn't a frequent complaints section! + +* **Some features are poorly documented?** + + Yes. The tests should be considered a part of the documentation; take a look at those for ideas on how to express more complex queries. + +## License + +Squirrel is released under the +[MIT License](http://www.opensource.org/licenses/MIT). diff --git a/vendor/github.com/Masterminds/squirrel/case.go b/vendor/github.com/Masterminds/squirrel/case.go new file mode 100644 index 000000000..299e14b9d --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/case.go @@ -0,0 +1,128 @@ +package squirrel + +import ( + "bytes" + "errors" + + "github.com/lann/builder" +) + +func init() { + builder.Register(CaseBuilder{}, caseData{}) +} + +// sqlizerBuffer is a helper that allows to write many Sqlizers one by one +// without constant checks for errors that may come from Sqlizer +type sqlizerBuffer struct { + bytes.Buffer + args []interface{} + err error +} + +// WriteSql converts Sqlizer to SQL strings and writes it to buffer +func (b *sqlizerBuffer) WriteSql(item Sqlizer) { + if b.err != nil { + return + } + + var str string + var args []interface{} + str, args, b.err = nestedToSql(item) + + if b.err != nil { + return + } + + b.WriteString(str) + b.WriteByte(' ') + b.args = append(b.args, args...) +} + +func (b *sqlizerBuffer) ToSql() (string, []interface{}, error) { + return b.String(), b.args, b.err +} + +// whenPart is a helper structure to describe SQLs "WHEN ... THEN ..." expression +type whenPart struct { + when Sqlizer + then Sqlizer +} + +func newWhenPart(when interface{}, then interface{}) whenPart { + return whenPart{newPart(when), newPart(then)} +} + +// caseData holds all the data required to build a CASE SQL construct +type caseData struct { + What Sqlizer + WhenParts []whenPart + Else Sqlizer +} + +// ToSql implements Sqlizer +func (d *caseData) ToSql() (sqlStr string, args []interface{}, err error) { + if len(d.WhenParts) == 0 { + err = errors.New("case expression must contain at lease one WHEN clause") + + return + } + + sql := sqlizerBuffer{} + + sql.WriteString("CASE ") + if d.What != nil { + sql.WriteSql(d.What) + } + + for _, p := range d.WhenParts { + sql.WriteString("WHEN ") + sql.WriteSql(p.when) + sql.WriteString("THEN ") + sql.WriteSql(p.then) + } + + if d.Else != nil { + sql.WriteString("ELSE ") + sql.WriteSql(d.Else) + } + + sql.WriteString("END") + + return sql.ToSql() +} + +// CaseBuilder builds SQL CASE construct which could be used as parts of queries. +type CaseBuilder builder.Builder + +// ToSql builds the query into a SQL string and bound args. +func (b CaseBuilder) ToSql() (string, []interface{}, error) { + data := builder.GetStruct(b).(caseData) + return data.ToSql() +} + +// MustSql builds the query into a SQL string and bound args. +// It panics if there are any errors. +func (b CaseBuilder) MustSql() (string, []interface{}) { + sql, args, err := b.ToSql() + if err != nil { + panic(err) + } + return sql, args +} + +// what sets optional value for CASE construct "CASE [value] ..." +func (b CaseBuilder) what(expr interface{}) CaseBuilder { + return builder.Set(b, "What", newPart(expr)).(CaseBuilder) +} + +// When adds "WHEN ... THEN ..." part to CASE construct +func (b CaseBuilder) When(when interface{}, then interface{}) CaseBuilder { + // TODO: performance hint: replace slice of WhenPart with just slice of parts + // where even indices of the slice belong to "when"s and odd indices belong to "then"s + return builder.Append(b, "WhenParts", newWhenPart(when, then)).(CaseBuilder) +} + +// What sets optional "ELSE ..." part for CASE construct +func (b CaseBuilder) Else(expr interface{}) CaseBuilder { + return builder.Set(b, "Else", newPart(expr)).(CaseBuilder) +} diff --git a/vendor/github.com/Masterminds/squirrel/delete.go b/vendor/github.com/Masterminds/squirrel/delete.go new file mode 100644 index 000000000..f3f31e63e --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/delete.go @@ -0,0 +1,191 @@ +package squirrel + +import ( + "bytes" + "database/sql" + "fmt" + "strings" + + "github.com/lann/builder" +) + +type deleteData struct { + PlaceholderFormat PlaceholderFormat + RunWith BaseRunner + Prefixes []Sqlizer + From string + WhereParts []Sqlizer + OrderBys []string + Limit string + Offset string + Suffixes []Sqlizer +} + +func (d *deleteData) Exec() (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return ExecWith(d.RunWith, d) +} + +func (d *deleteData) ToSql() (sqlStr string, args []interface{}, err error) { + if len(d.From) == 0 { + err = fmt.Errorf("delete statements must specify a From table") + return + } + + sql := &bytes.Buffer{} + + if len(d.Prefixes) > 0 { + args, err = appendToSql(d.Prefixes, sql, " ", args) + if err != nil { + return + } + + sql.WriteString(" ") + } + + sql.WriteString("DELETE FROM ") + sql.WriteString(d.From) + + if len(d.WhereParts) > 0 { + sql.WriteString(" WHERE ") + args, err = appendToSql(d.WhereParts, sql, " AND ", args) + if err != nil { + return + } + } + + if len(d.OrderBys) > 0 { + sql.WriteString(" ORDER BY ") + sql.WriteString(strings.Join(d.OrderBys, ", ")) + } + + if len(d.Limit) > 0 { + sql.WriteString(" LIMIT ") + sql.WriteString(d.Limit) + } + + if len(d.Offset) > 0 { + sql.WriteString(" OFFSET ") + sql.WriteString(d.Offset) + } + + if len(d.Suffixes) > 0 { + sql.WriteString(" ") + args, err = appendToSql(d.Suffixes, sql, " ", args) + if err != nil { + return + } + } + + sqlStr, err = d.PlaceholderFormat.ReplacePlaceholders(sql.String()) + return +} + +// Builder + +// DeleteBuilder builds SQL DELETE statements. +type DeleteBuilder builder.Builder + +func init() { + builder.Register(DeleteBuilder{}, deleteData{}) +} + +// Format methods + +// PlaceholderFormat sets PlaceholderFormat (e.g. Question or Dollar) for the +// query. +func (b DeleteBuilder) PlaceholderFormat(f PlaceholderFormat) DeleteBuilder { + return builder.Set(b, "PlaceholderFormat", f).(DeleteBuilder) +} + +// Runner methods + +// RunWith sets a Runner (like database/sql.DB) to be used with e.g. Exec. +func (b DeleteBuilder) RunWith(runner BaseRunner) DeleteBuilder { + return setRunWith(b, runner).(DeleteBuilder) +} + +// Exec builds and Execs the query with the Runner set by RunWith. +func (b DeleteBuilder) Exec() (sql.Result, error) { + data := builder.GetStruct(b).(deleteData) + return data.Exec() +} + +// SQL methods + +// ToSql builds the query into a SQL string and bound args. +func (b DeleteBuilder) ToSql() (string, []interface{}, error) { + data := builder.GetStruct(b).(deleteData) + return data.ToSql() +} + +// MustSql builds the query into a SQL string and bound args. +// It panics if there are any errors. +func (b DeleteBuilder) MustSql() (string, []interface{}) { + sql, args, err := b.ToSql() + if err != nil { + panic(err) + } + return sql, args +} + +// Prefix adds an expression to the beginning of the query +func (b DeleteBuilder) Prefix(sql string, args ...interface{}) DeleteBuilder { + return b.PrefixExpr(Expr(sql, args...)) +} + +// PrefixExpr adds an expression to the very beginning of the query +func (b DeleteBuilder) PrefixExpr(expr Sqlizer) DeleteBuilder { + return builder.Append(b, "Prefixes", expr).(DeleteBuilder) +} + +// From sets the table to be deleted from. +func (b DeleteBuilder) From(from string) DeleteBuilder { + return builder.Set(b, "From", from).(DeleteBuilder) +} + +// Where adds WHERE expressions to the query. +// +// See SelectBuilder.Where for more information. +func (b DeleteBuilder) Where(pred interface{}, args ...interface{}) DeleteBuilder { + return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(DeleteBuilder) +} + +// OrderBy adds ORDER BY expressions to the query. +func (b DeleteBuilder) OrderBy(orderBys ...string) DeleteBuilder { + return builder.Extend(b, "OrderBys", orderBys).(DeleteBuilder) +} + +// Limit sets a LIMIT clause on the query. +func (b DeleteBuilder) Limit(limit uint64) DeleteBuilder { + return builder.Set(b, "Limit", fmt.Sprintf("%d", limit)).(DeleteBuilder) +} + +// Offset sets a OFFSET clause on the query. +func (b DeleteBuilder) Offset(offset uint64) DeleteBuilder { + return builder.Set(b, "Offset", fmt.Sprintf("%d", offset)).(DeleteBuilder) +} + +// Suffix adds an expression to the end of the query +func (b DeleteBuilder) Suffix(sql string, args ...interface{}) DeleteBuilder { + return b.SuffixExpr(Expr(sql, args...)) +} + +// SuffixExpr adds an expression to the end of the query +func (b DeleteBuilder) SuffixExpr(expr Sqlizer) DeleteBuilder { + return builder.Append(b, "Suffixes", expr).(DeleteBuilder) +} + +func (b DeleteBuilder) Query() (*sql.Rows, error) { + data := builder.GetStruct(b).(deleteData) + return data.Query() +} + +func (d *deleteData) Query() (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return QueryWith(d.RunWith, d) +} diff --git a/vendor/github.com/Masterminds/squirrel/delete_ctx.go b/vendor/github.com/Masterminds/squirrel/delete_ctx.go new file mode 100644 index 000000000..de83c55df --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/delete_ctx.go @@ -0,0 +1,69 @@ +// +build go1.8 + +package squirrel + +import ( + "context" + "database/sql" + + "github.com/lann/builder" +) + +func (d *deleteData) ExecContext(ctx context.Context) (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(ExecerContext) + if !ok { + return nil, NoContextSupport + } + return ExecContextWith(ctx, ctxRunner, d) +} + +func (d *deleteData) QueryContext(ctx context.Context) (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(QueryerContext) + if !ok { + return nil, NoContextSupport + } + return QueryContextWith(ctx, ctxRunner, d) +} + +func (d *deleteData) QueryRowContext(ctx context.Context) RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRowerContext) + if !ok { + if _, ok := d.RunWith.(QueryerContext); !ok { + return &Row{err: RunnerNotQueryRunner} + } + return &Row{err: NoContextSupport} + } + return QueryRowContextWith(ctx, queryRower, d) +} + +// ExecContext builds and ExecContexts the query with the Runner set by RunWith. +func (b DeleteBuilder) ExecContext(ctx context.Context) (sql.Result, error) { + data := builder.GetStruct(b).(deleteData) + return data.ExecContext(ctx) +} + +// QueryContext builds and QueryContexts the query with the Runner set by RunWith. +func (b DeleteBuilder) QueryContext(ctx context.Context) (*sql.Rows, error) { + data := builder.GetStruct(b).(deleteData) + return data.QueryContext(ctx) +} + +// QueryRowContext builds and QueryRowContexts the query with the Runner set by RunWith. +func (b DeleteBuilder) QueryRowContext(ctx context.Context) RowScanner { + data := builder.GetStruct(b).(deleteData) + return data.QueryRowContext(ctx) +} + +// ScanContext is a shortcut for QueryRowContext().Scan. +func (b DeleteBuilder) ScanContext(ctx context.Context, dest ...interface{}) error { + return b.QueryRowContext(ctx).Scan(dest...) +} diff --git a/vendor/github.com/Masterminds/squirrel/expr.go b/vendor/github.com/Masterminds/squirrel/expr.go new file mode 100644 index 000000000..eba1b4579 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/expr.go @@ -0,0 +1,419 @@ +package squirrel + +import ( + "bytes" + "database/sql/driver" + "fmt" + "reflect" + "sort" + "strings" +) + +const ( + // Portable true/false literals. + sqlTrue = "(1=1)" + sqlFalse = "(1=0)" +) + +type expr struct { + sql string + args []interface{} +} + +// Expr builds an expression from a SQL fragment and arguments. +// +// Ex: +// Expr("FROM_UNIXTIME(?)", t) +func Expr(sql string, args ...interface{}) Sqlizer { + return expr{sql: sql, args: args} +} + +func (e expr) ToSql() (sql string, args []interface{}, err error) { + simple := true + for _, arg := range e.args { + if _, ok := arg.(Sqlizer); ok { + simple = false + } + } + if simple { + return e.sql, e.args, nil + } + + buf := &bytes.Buffer{} + ap := e.args + sp := e.sql + + var isql string + var iargs []interface{} + + for err == nil && len(ap) > 0 && len(sp) > 0 { + i := strings.Index(sp, "?") + if i < 0 { + // no more placeholders + break + } + if len(sp) > i+1 && sp[i+1:i+2] == "?" { + // escaped "??"; append it and step past + buf.WriteString(sp[:i+2]) + sp = sp[i+2:] + continue + } + + if as, ok := ap[0].(Sqlizer); ok { + // sqlizer argument; expand it and append the result + isql, iargs, err = as.ToSql() + buf.WriteString(sp[:i]) + buf.WriteString(isql) + args = append(args, iargs...) + } else { + // normal argument; append it and the placeholder + buf.WriteString(sp[:i+1]) + args = append(args, ap[0]) + } + + // step past the argument and placeholder + ap = ap[1:] + sp = sp[i+1:] + } + + // append the remaining sql and arguments + buf.WriteString(sp) + return buf.String(), append(args, ap...), err +} + +type concatExpr []interface{} + +func (ce concatExpr) ToSql() (sql string, args []interface{}, err error) { + for _, part := range ce { + switch p := part.(type) { + case string: + sql += p + case Sqlizer: + pSql, pArgs, err := p.ToSql() + if err != nil { + return "", nil, err + } + sql += pSql + args = append(args, pArgs...) + default: + return "", nil, fmt.Errorf("%#v is not a string or Sqlizer", part) + } + } + return +} + +// ConcatExpr builds an expression by concatenating strings and other expressions. +// +// Ex: +// name_expr := Expr("CONCAT(?, ' ', ?)", firstName, lastName) +// ConcatExpr("COALESCE(full_name,", name_expr, ")") +func ConcatExpr(parts ...interface{}) concatExpr { + return concatExpr(parts) +} + +// aliasExpr helps to alias part of SQL query generated with underlying "expr" +type aliasExpr struct { + expr Sqlizer + alias string +} + +// Alias allows to define alias for column in SelectBuilder. Useful when column is +// defined as complex expression like IF or CASE +// Ex: +// .Column(Alias(caseStmt, "case_column")) +func Alias(expr Sqlizer, alias string) aliasExpr { + return aliasExpr{expr, alias} +} + +func (e aliasExpr) ToSql() (sql string, args []interface{}, err error) { + sql, args, err = e.expr.ToSql() + if err == nil { + sql = fmt.Sprintf("(%s) AS %s", sql, e.alias) + } + return +} + +// Eq is syntactic sugar for use with Where/Having/Set methods. +type Eq map[string]interface{} + +func (eq Eq) toSQL(useNotOpr bool) (sql string, args []interface{}, err error) { + if len(eq) == 0 { + // Empty Sql{} evaluates to true. + sql = sqlTrue + return + } + + var ( + exprs []string + equalOpr = "=" + inOpr = "IN" + nullOpr = "IS" + inEmptyExpr = sqlFalse + ) + + if useNotOpr { + equalOpr = "<>" + inOpr = "NOT IN" + nullOpr = "IS NOT" + inEmptyExpr = sqlTrue + } + + sortedKeys := getSortedKeys(eq) + for _, key := range sortedKeys { + var expr string + val := eq[key] + + switch v := val.(type) { + case driver.Valuer: + if val, err = v.Value(); err != nil { + return + } + } + + r := reflect.ValueOf(val) + if r.Kind() == reflect.Ptr { + if r.IsNil() { + val = nil + } else { + val = r.Elem().Interface() + } + } + + if val == nil { + expr = fmt.Sprintf("%s %s NULL", key, nullOpr) + } else { + if isListType(val) { + valVal := reflect.ValueOf(val) + if valVal.Len() == 0 { + expr = inEmptyExpr + if args == nil { + args = []interface{}{} + } + } else { + for i := 0; i < valVal.Len(); i++ { + args = append(args, valVal.Index(i).Interface()) + } + expr = fmt.Sprintf("%s %s (%s)", key, inOpr, Placeholders(valVal.Len())) + } + } else { + expr = fmt.Sprintf("%s %s ?", key, equalOpr) + args = append(args, val) + } + } + exprs = append(exprs, expr) + } + sql = strings.Join(exprs, " AND ") + return +} + +func (eq Eq) ToSql() (sql string, args []interface{}, err error) { + return eq.toSQL(false) +} + +// NotEq is syntactic sugar for use with Where/Having/Set methods. +// Ex: +// .Where(NotEq{"id": 1}) == "id <> 1" +type NotEq Eq + +func (neq NotEq) ToSql() (sql string, args []interface{}, err error) { + return Eq(neq).toSQL(true) +} + +// Like is syntactic sugar for use with LIKE conditions. +// Ex: +// .Where(Like{"name": "%irrel"}) +type Like map[string]interface{} + +func (lk Like) toSql(opr string) (sql string, args []interface{}, err error) { + var exprs []string + for key, val := range lk { + expr := "" + + switch v := val.(type) { + case driver.Valuer: + if val, err = v.Value(); err != nil { + return + } + } + + if val == nil { + err = fmt.Errorf("cannot use null with like operators") + return + } else { + if isListType(val) { + err = fmt.Errorf("cannot use array or slice with like operators") + return + } else { + expr = fmt.Sprintf("%s %s ?", key, opr) + args = append(args, val) + } + } + exprs = append(exprs, expr) + } + sql = strings.Join(exprs, " AND ") + return +} + +func (lk Like) ToSql() (sql string, args []interface{}, err error) { + return lk.toSql("LIKE") +} + +// NotLike is syntactic sugar for use with LIKE conditions. +// Ex: +// .Where(NotLike{"name": "%irrel"}) +type NotLike Like + +func (nlk NotLike) ToSql() (sql string, args []interface{}, err error) { + return Like(nlk).toSql("NOT LIKE") +} + +// ILike is syntactic sugar for use with ILIKE conditions. +// Ex: +// .Where(ILike{"name": "sq%"}) +type ILike Like + +func (ilk ILike) ToSql() (sql string, args []interface{}, err error) { + return Like(ilk).toSql("ILIKE") +} + +// NotILike is syntactic sugar for use with ILIKE conditions. +// Ex: +// .Where(NotILike{"name": "sq%"}) +type NotILike Like + +func (nilk NotILike) ToSql() (sql string, args []interface{}, err error) { + return Like(nilk).toSql("NOT ILIKE") +} + +// Lt is syntactic sugar for use with Where/Having/Set methods. +// Ex: +// .Where(Lt{"id": 1}) +type Lt map[string]interface{} + +func (lt Lt) toSql(opposite, orEq bool) (sql string, args []interface{}, err error) { + var ( + exprs []string + opr = "<" + ) + + if opposite { + opr = ">" + } + + if orEq { + opr = fmt.Sprintf("%s%s", opr, "=") + } + + sortedKeys := getSortedKeys(lt) + for _, key := range sortedKeys { + var expr string + val := lt[key] + + switch v := val.(type) { + case driver.Valuer: + if val, err = v.Value(); err != nil { + return + } + } + + if val == nil { + err = fmt.Errorf("cannot use null with less than or greater than operators") + return + } + if isListType(val) { + err = fmt.Errorf("cannot use array or slice with less than or greater than operators") + return + } + expr = fmt.Sprintf("%s %s ?", key, opr) + args = append(args, val) + + exprs = append(exprs, expr) + } + sql = strings.Join(exprs, " AND ") + return +} + +func (lt Lt) ToSql() (sql string, args []interface{}, err error) { + return lt.toSql(false, false) +} + +// LtOrEq is syntactic sugar for use with Where/Having/Set methods. +// Ex: +// .Where(LtOrEq{"id": 1}) == "id <= 1" +type LtOrEq Lt + +func (ltOrEq LtOrEq) ToSql() (sql string, args []interface{}, err error) { + return Lt(ltOrEq).toSql(false, true) +} + +// Gt is syntactic sugar for use with Where/Having/Set methods. +// Ex: +// .Where(Gt{"id": 1}) == "id > 1" +type Gt Lt + +func (gt Gt) ToSql() (sql string, args []interface{}, err error) { + return Lt(gt).toSql(true, false) +} + +// GtOrEq is syntactic sugar for use with Where/Having/Set methods. +// Ex: +// .Where(GtOrEq{"id": 1}) == "id >= 1" +type GtOrEq Lt + +func (gtOrEq GtOrEq) ToSql() (sql string, args []interface{}, err error) { + return Lt(gtOrEq).toSql(true, true) +} + +type conj []Sqlizer + +func (c conj) join(sep, defaultExpr string) (sql string, args []interface{}, err error) { + if len(c) == 0 { + return defaultExpr, []interface{}{}, nil + } + var sqlParts []string + for _, sqlizer := range c { + partSQL, partArgs, err := nestedToSql(sqlizer) + if err != nil { + return "", nil, err + } + if partSQL != "" { + sqlParts = append(sqlParts, partSQL) + args = append(args, partArgs...) + } + } + if len(sqlParts) > 0 { + sql = fmt.Sprintf("(%s)", strings.Join(sqlParts, sep)) + } + return +} + +// And conjunction Sqlizers +type And conj + +func (a And) ToSql() (string, []interface{}, error) { + return conj(a).join(" AND ", sqlTrue) +} + +// Or conjunction Sqlizers +type Or conj + +func (o Or) ToSql() (string, []interface{}, error) { + return conj(o).join(" OR ", sqlFalse) +} + +func getSortedKeys(exp map[string]interface{}) []string { + sortedKeys := make([]string, 0, len(exp)) + for k := range exp { + sortedKeys = append(sortedKeys, k) + } + sort.Strings(sortedKeys) + return sortedKeys +} + +func isListType(val interface{}) bool { + if driver.IsValue(val) { + return false + } + valVal := reflect.ValueOf(val) + return valVal.Kind() == reflect.Array || valVal.Kind() == reflect.Slice +} diff --git a/vendor/github.com/Masterminds/squirrel/insert.go b/vendor/github.com/Masterminds/squirrel/insert.go new file mode 100644 index 000000000..c23a57935 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/insert.go @@ -0,0 +1,298 @@ +package squirrel + +import ( + "bytes" + "database/sql" + "errors" + "fmt" + "io" + "sort" + "strings" + + "github.com/lann/builder" +) + +type insertData struct { + PlaceholderFormat PlaceholderFormat + RunWith BaseRunner + Prefixes []Sqlizer + StatementKeyword string + Options []string + Into string + Columns []string + Values [][]interface{} + Suffixes []Sqlizer + Select *SelectBuilder +} + +func (d *insertData) Exec() (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return ExecWith(d.RunWith, d) +} + +func (d *insertData) Query() (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return QueryWith(d.RunWith, d) +} + +func (d *insertData) QueryRow() RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRower) + if !ok { + return &Row{err: RunnerNotQueryRunner} + } + return QueryRowWith(queryRower, d) +} + +func (d *insertData) ToSql() (sqlStr string, args []interface{}, err error) { + if len(d.Into) == 0 { + err = errors.New("insert statements must specify a table") + return + } + if len(d.Values) == 0 && d.Select == nil { + err = errors.New("insert statements must have at least one set of values or select clause") + return + } + + sql := &bytes.Buffer{} + + if len(d.Prefixes) > 0 { + args, err = appendToSql(d.Prefixes, sql, " ", args) + if err != nil { + return + } + + sql.WriteString(" ") + } + + if d.StatementKeyword == "" { + sql.WriteString("INSERT ") + } else { + sql.WriteString(d.StatementKeyword) + sql.WriteString(" ") + } + + if len(d.Options) > 0 { + sql.WriteString(strings.Join(d.Options, " ")) + sql.WriteString(" ") + } + + sql.WriteString("INTO ") + sql.WriteString(d.Into) + sql.WriteString(" ") + + if len(d.Columns) > 0 { + sql.WriteString("(") + sql.WriteString(strings.Join(d.Columns, ",")) + sql.WriteString(") ") + } + + if d.Select != nil { + args, err = d.appendSelectToSQL(sql, args) + } else { + args, err = d.appendValuesToSQL(sql, args) + } + if err != nil { + return + } + + if len(d.Suffixes) > 0 { + sql.WriteString(" ") + args, err = appendToSql(d.Suffixes, sql, " ", args) + if err != nil { + return + } + } + + sqlStr, err = d.PlaceholderFormat.ReplacePlaceholders(sql.String()) + return +} + +func (d *insertData) appendValuesToSQL(w io.Writer, args []interface{}) ([]interface{}, error) { + if len(d.Values) == 0 { + return args, errors.New("values for insert statements are not set") + } + + io.WriteString(w, "VALUES ") + + valuesStrings := make([]string, len(d.Values)) + for r, row := range d.Values { + valueStrings := make([]string, len(row)) + for v, val := range row { + if vs, ok := val.(Sqlizer); ok { + vsql, vargs, err := vs.ToSql() + if err != nil { + return nil, err + } + valueStrings[v] = vsql + args = append(args, vargs...) + } else { + valueStrings[v] = "?" + args = append(args, val) + } + } + valuesStrings[r] = fmt.Sprintf("(%s)", strings.Join(valueStrings, ",")) + } + + io.WriteString(w, strings.Join(valuesStrings, ",")) + + return args, nil +} + +func (d *insertData) appendSelectToSQL(w io.Writer, args []interface{}) ([]interface{}, error) { + if d.Select == nil { + return args, errors.New("select clause for insert statements are not set") + } + + selectClause, sArgs, err := d.Select.ToSql() + if err != nil { + return args, err + } + + io.WriteString(w, selectClause) + args = append(args, sArgs...) + + return args, nil +} + +// Builder + +// InsertBuilder builds SQL INSERT statements. +type InsertBuilder builder.Builder + +func init() { + builder.Register(InsertBuilder{}, insertData{}) +} + +// Format methods + +// PlaceholderFormat sets PlaceholderFormat (e.g. Question or Dollar) for the +// query. +func (b InsertBuilder) PlaceholderFormat(f PlaceholderFormat) InsertBuilder { + return builder.Set(b, "PlaceholderFormat", f).(InsertBuilder) +} + +// Runner methods + +// RunWith sets a Runner (like database/sql.DB) to be used with e.g. Exec. +func (b InsertBuilder) RunWith(runner BaseRunner) InsertBuilder { + return setRunWith(b, runner).(InsertBuilder) +} + +// Exec builds and Execs the query with the Runner set by RunWith. +func (b InsertBuilder) Exec() (sql.Result, error) { + data := builder.GetStruct(b).(insertData) + return data.Exec() +} + +// Query builds and Querys the query with the Runner set by RunWith. +func (b InsertBuilder) Query() (*sql.Rows, error) { + data := builder.GetStruct(b).(insertData) + return data.Query() +} + +// QueryRow builds and QueryRows the query with the Runner set by RunWith. +func (b InsertBuilder) QueryRow() RowScanner { + data := builder.GetStruct(b).(insertData) + return data.QueryRow() +} + +// Scan is a shortcut for QueryRow().Scan. +func (b InsertBuilder) Scan(dest ...interface{}) error { + return b.QueryRow().Scan(dest...) +} + +// SQL methods + +// ToSql builds the query into a SQL string and bound args. +func (b InsertBuilder) ToSql() (string, []interface{}, error) { + data := builder.GetStruct(b).(insertData) + return data.ToSql() +} + +// MustSql builds the query into a SQL string and bound args. +// It panics if there are any errors. +func (b InsertBuilder) MustSql() (string, []interface{}) { + sql, args, err := b.ToSql() + if err != nil { + panic(err) + } + return sql, args +} + +// Prefix adds an expression to the beginning of the query +func (b InsertBuilder) Prefix(sql string, args ...interface{}) InsertBuilder { + return b.PrefixExpr(Expr(sql, args...)) +} + +// PrefixExpr adds an expression to the very beginning of the query +func (b InsertBuilder) PrefixExpr(expr Sqlizer) InsertBuilder { + return builder.Append(b, "Prefixes", expr).(InsertBuilder) +} + +// Options adds keyword options before the INTO clause of the query. +func (b InsertBuilder) Options(options ...string) InsertBuilder { + return builder.Extend(b, "Options", options).(InsertBuilder) +} + +// Into sets the INTO clause of the query. +func (b InsertBuilder) Into(from string) InsertBuilder { + return builder.Set(b, "Into", from).(InsertBuilder) +} + +// Columns adds insert columns to the query. +func (b InsertBuilder) Columns(columns ...string) InsertBuilder { + return builder.Extend(b, "Columns", columns).(InsertBuilder) +} + +// Values adds a single row's values to the query. +func (b InsertBuilder) Values(values ...interface{}) InsertBuilder { + return builder.Append(b, "Values", values).(InsertBuilder) +} + +// Suffix adds an expression to the end of the query +func (b InsertBuilder) Suffix(sql string, args ...interface{}) InsertBuilder { + return b.SuffixExpr(Expr(sql, args...)) +} + +// SuffixExpr adds an expression to the end of the query +func (b InsertBuilder) SuffixExpr(expr Sqlizer) InsertBuilder { + return builder.Append(b, "Suffixes", expr).(InsertBuilder) +} + +// SetMap set columns and values for insert builder from a map of column name and value +// note that it will reset all previous columns and values was set if any +func (b InsertBuilder) SetMap(clauses map[string]interface{}) InsertBuilder { + // Keep the columns in a consistent order by sorting the column key string. + cols := make([]string, 0, len(clauses)) + for col := range clauses { + cols = append(cols, col) + } + sort.Strings(cols) + + vals := make([]interface{}, 0, len(clauses)) + for _, col := range cols { + vals = append(vals, clauses[col]) + } + + b = builder.Set(b, "Columns", cols).(InsertBuilder) + b = builder.Set(b, "Values", [][]interface{}{vals}).(InsertBuilder) + + return b +} + +// Select set Select clause for insert query +// If Values and Select are used, then Select has higher priority +func (b InsertBuilder) Select(sb SelectBuilder) InsertBuilder { + return builder.Set(b, "Select", &sb).(InsertBuilder) +} + +func (b InsertBuilder) statementKeyword(keyword string) InsertBuilder { + return builder.Set(b, "StatementKeyword", keyword).(InsertBuilder) +} diff --git a/vendor/github.com/Masterminds/squirrel/insert_ctx.go b/vendor/github.com/Masterminds/squirrel/insert_ctx.go new file mode 100644 index 000000000..4541c2fed --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/insert_ctx.go @@ -0,0 +1,69 @@ +// +build go1.8 + +package squirrel + +import ( + "context" + "database/sql" + + "github.com/lann/builder" +) + +func (d *insertData) ExecContext(ctx context.Context) (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(ExecerContext) + if !ok { + return nil, NoContextSupport + } + return ExecContextWith(ctx, ctxRunner, d) +} + +func (d *insertData) QueryContext(ctx context.Context) (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(QueryerContext) + if !ok { + return nil, NoContextSupport + } + return QueryContextWith(ctx, ctxRunner, d) +} + +func (d *insertData) QueryRowContext(ctx context.Context) RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRowerContext) + if !ok { + if _, ok := d.RunWith.(QueryerContext); !ok { + return &Row{err: RunnerNotQueryRunner} + } + return &Row{err: NoContextSupport} + } + return QueryRowContextWith(ctx, queryRower, d) +} + +// ExecContext builds and ExecContexts the query with the Runner set by RunWith. +func (b InsertBuilder) ExecContext(ctx context.Context) (sql.Result, error) { + data := builder.GetStruct(b).(insertData) + return data.ExecContext(ctx) +} + +// QueryContext builds and QueryContexts the query with the Runner set by RunWith. +func (b InsertBuilder) QueryContext(ctx context.Context) (*sql.Rows, error) { + data := builder.GetStruct(b).(insertData) + return data.QueryContext(ctx) +} + +// QueryRowContext builds and QueryRowContexts the query with the Runner set by RunWith. +func (b InsertBuilder) QueryRowContext(ctx context.Context) RowScanner { + data := builder.GetStruct(b).(insertData) + return data.QueryRowContext(ctx) +} + +// ScanContext is a shortcut for QueryRowContext().Scan. +func (b InsertBuilder) ScanContext(ctx context.Context, dest ...interface{}) error { + return b.QueryRowContext(ctx).Scan(dest...) +} diff --git a/vendor/github.com/Masterminds/squirrel/part.go b/vendor/github.com/Masterminds/squirrel/part.go new file mode 100644 index 000000000..c58f68f1a --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/part.go @@ -0,0 +1,63 @@ +package squirrel + +import ( + "fmt" + "io" +) + +type part struct { + pred interface{} + args []interface{} +} + +func newPart(pred interface{}, args ...interface{}) Sqlizer { + return &part{pred, args} +} + +func (p part) ToSql() (sql string, args []interface{}, err error) { + switch pred := p.pred.(type) { + case nil: + // no-op + case Sqlizer: + sql, args, err = nestedToSql(pred) + case string: + sql = pred + args = p.args + default: + err = fmt.Errorf("expected string or Sqlizer, not %T", pred) + } + return +} + +func nestedToSql(s Sqlizer) (string, []interface{}, error) { + if raw, ok := s.(rawSqlizer); ok { + return raw.toSqlRaw() + } else { + return s.ToSql() + } +} + +func appendToSql(parts []Sqlizer, w io.Writer, sep string, args []interface{}) ([]interface{}, error) { + for i, p := range parts { + partSql, partArgs, err := nestedToSql(p) + if err != nil { + return nil, err + } else if len(partSql) == 0 { + continue + } + + if i > 0 { + _, err := io.WriteString(w, sep) + if err != nil { + return nil, err + } + } + + _, err = io.WriteString(w, partSql) + if err != nil { + return nil, err + } + args = append(args, partArgs...) + } + return args, nil +} diff --git a/vendor/github.com/Masterminds/squirrel/placeholder.go b/vendor/github.com/Masterminds/squirrel/placeholder.go new file mode 100644 index 000000000..8e97a6c62 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/placeholder.go @@ -0,0 +1,114 @@ +package squirrel + +import ( + "bytes" + "fmt" + "strings" +) + +// PlaceholderFormat is the interface that wraps the ReplacePlaceholders method. +// +// ReplacePlaceholders takes a SQL statement and replaces each question mark +// placeholder with a (possibly different) SQL placeholder. +type PlaceholderFormat interface { + ReplacePlaceholders(sql string) (string, error) +} + +type placeholderDebugger interface { + debugPlaceholder() string +} + +var ( + // Question is a PlaceholderFormat instance that leaves placeholders as + // question marks. + Question = questionFormat{} + + // Dollar is a PlaceholderFormat instance that replaces placeholders with + // dollar-prefixed positional placeholders (e.g. $1, $2, $3). + Dollar = dollarFormat{} + + // Colon is a PlaceholderFormat instance that replaces placeholders with + // colon-prefixed positional placeholders (e.g. :1, :2, :3). + Colon = colonFormat{} + + // AtP is a PlaceholderFormat instance that replaces placeholders with + // "@p"-prefixed positional placeholders (e.g. @p1, @p2, @p3). + AtP = atpFormat{} +) + +type questionFormat struct{} + +func (questionFormat) ReplacePlaceholders(sql string) (string, error) { + return sql, nil +} + +func (questionFormat) debugPlaceholder() string { + return "?" +} + +type dollarFormat struct{} + +func (dollarFormat) ReplacePlaceholders(sql string) (string, error) { + return replacePositionalPlaceholders(sql, "$") +} + +func (dollarFormat) debugPlaceholder() string { + return "$" +} + +type colonFormat struct{} + +func (colonFormat) ReplacePlaceholders(sql string) (string, error) { + return replacePositionalPlaceholders(sql, ":") +} + +func (colonFormat) debugPlaceholder() string { + return ":" +} + +type atpFormat struct{} + +func (atpFormat) ReplacePlaceholders(sql string) (string, error) { + return replacePositionalPlaceholders(sql, "@p") +} + +func (atpFormat) debugPlaceholder() string { + return "@p" +} + +// Placeholders returns a string with count ? placeholders joined with commas. +func Placeholders(count int) string { + if count < 1 { + return "" + } + + return strings.Repeat(",?", count)[1:] +} + +func replacePositionalPlaceholders(sql, prefix string) (string, error) { + buf := &bytes.Buffer{} + i := 0 + for { + p := strings.Index(sql, "?") + if p == -1 { + break + } + + if len(sql[p:]) > 1 && sql[p:p+2] == "??" { // escape ?? => ? + buf.WriteString(sql[:p]) + buf.WriteString("?") + if len(sql[p:]) == 1 { + break + } + sql = sql[p+2:] + } else { + i++ + buf.WriteString(sql[:p]) + fmt.Fprintf(buf, "%s%d", prefix, i) + sql = sql[p+1:] + } + } + + buf.WriteString(sql) + return buf.String(), nil +} diff --git a/vendor/github.com/Masterminds/squirrel/row.go b/vendor/github.com/Masterminds/squirrel/row.go new file mode 100644 index 000000000..74ffda92b --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/row.go @@ -0,0 +1,22 @@ +package squirrel + +// RowScanner is the interface that wraps the Scan method. +// +// Scan behaves like database/sql.Row.Scan. +type RowScanner interface { + Scan(...interface{}) error +} + +// Row wraps database/sql.Row to let squirrel return new errors on Scan. +type Row struct { + RowScanner + err error +} + +// Scan returns Row.err or calls RowScanner.Scan. +func (r *Row) Scan(dest ...interface{}) error { + if r.err != nil { + return r.err + } + return r.RowScanner.Scan(dest...) +} diff --git a/vendor/github.com/Masterminds/squirrel/select.go b/vendor/github.com/Masterminds/squirrel/select.go new file mode 100644 index 000000000..d55ce4c74 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/select.go @@ -0,0 +1,403 @@ +package squirrel + +import ( + "bytes" + "database/sql" + "fmt" + "strings" + + "github.com/lann/builder" +) + +type selectData struct { + PlaceholderFormat PlaceholderFormat + RunWith BaseRunner + Prefixes []Sqlizer + Options []string + Columns []Sqlizer + From Sqlizer + Joins []Sqlizer + WhereParts []Sqlizer + GroupBys []string + HavingParts []Sqlizer + OrderByParts []Sqlizer + Limit string + Offset string + Suffixes []Sqlizer +} + +func (d *selectData) Exec() (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return ExecWith(d.RunWith, d) +} + +func (d *selectData) Query() (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return QueryWith(d.RunWith, d) +} + +func (d *selectData) QueryRow() RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRower) + if !ok { + return &Row{err: RunnerNotQueryRunner} + } + return QueryRowWith(queryRower, d) +} + +func (d *selectData) ToSql() (sqlStr string, args []interface{}, err error) { + sqlStr, args, err = d.toSqlRaw() + if err != nil { + return + } + + sqlStr, err = d.PlaceholderFormat.ReplacePlaceholders(sqlStr) + return +} + +func (d *selectData) toSqlRaw() (sqlStr string, args []interface{}, err error) { + if len(d.Columns) == 0 { + err = fmt.Errorf("select statements must have at least one result column") + return + } + + sql := &bytes.Buffer{} + + if len(d.Prefixes) > 0 { + args, err = appendToSql(d.Prefixes, sql, " ", args) + if err != nil { + return + } + + sql.WriteString(" ") + } + + sql.WriteString("SELECT ") + + if len(d.Options) > 0 { + sql.WriteString(strings.Join(d.Options, " ")) + sql.WriteString(" ") + } + + if len(d.Columns) > 0 { + args, err = appendToSql(d.Columns, sql, ", ", args) + if err != nil { + return + } + } + + if d.From != nil { + sql.WriteString(" FROM ") + args, err = appendToSql([]Sqlizer{d.From}, sql, "", args) + if err != nil { + return + } + } + + if len(d.Joins) > 0 { + sql.WriteString(" ") + args, err = appendToSql(d.Joins, sql, " ", args) + if err != nil { + return + } + } + + if len(d.WhereParts) > 0 { + sql.WriteString(" WHERE ") + args, err = appendToSql(d.WhereParts, sql, " AND ", args) + if err != nil { + return + } + } + + if len(d.GroupBys) > 0 { + sql.WriteString(" GROUP BY ") + sql.WriteString(strings.Join(d.GroupBys, ", ")) + } + + if len(d.HavingParts) > 0 { + sql.WriteString(" HAVING ") + args, err = appendToSql(d.HavingParts, sql, " AND ", args) + if err != nil { + return + } + } + + if len(d.OrderByParts) > 0 { + sql.WriteString(" ORDER BY ") + args, err = appendToSql(d.OrderByParts, sql, ", ", args) + if err != nil { + return + } + } + + if len(d.Limit) > 0 { + sql.WriteString(" LIMIT ") + sql.WriteString(d.Limit) + } + + if len(d.Offset) > 0 { + sql.WriteString(" OFFSET ") + sql.WriteString(d.Offset) + } + + if len(d.Suffixes) > 0 { + sql.WriteString(" ") + + args, err = appendToSql(d.Suffixes, sql, " ", args) + if err != nil { + return + } + } + + sqlStr = sql.String() + return +} + +// Builder + +// SelectBuilder builds SQL SELECT statements. +type SelectBuilder builder.Builder + +func init() { + builder.Register(SelectBuilder{}, selectData{}) +} + +// Format methods + +// PlaceholderFormat sets PlaceholderFormat (e.g. Question or Dollar) for the +// query. +func (b SelectBuilder) PlaceholderFormat(f PlaceholderFormat) SelectBuilder { + return builder.Set(b, "PlaceholderFormat", f).(SelectBuilder) +} + +// Runner methods + +// RunWith sets a Runner (like database/sql.DB) to be used with e.g. Exec. +// For most cases runner will be a database connection. +// +// Internally we use this to mock out the database connection for testing. +func (b SelectBuilder) RunWith(runner BaseRunner) SelectBuilder { + return setRunWith(b, runner).(SelectBuilder) +} + +// Exec builds and Execs the query with the Runner set by RunWith. +func (b SelectBuilder) Exec() (sql.Result, error) { + data := builder.GetStruct(b).(selectData) + return data.Exec() +} + +// Query builds and Querys the query with the Runner set by RunWith. +func (b SelectBuilder) Query() (*sql.Rows, error) { + data := builder.GetStruct(b).(selectData) + return data.Query() +} + +// QueryRow builds and QueryRows the query with the Runner set by RunWith. +func (b SelectBuilder) QueryRow() RowScanner { + data := builder.GetStruct(b).(selectData) + return data.QueryRow() +} + +// Scan is a shortcut for QueryRow().Scan. +func (b SelectBuilder) Scan(dest ...interface{}) error { + return b.QueryRow().Scan(dest...) +} + +// SQL methods + +// ToSql builds the query into a SQL string and bound args. +func (b SelectBuilder) ToSql() (string, []interface{}, error) { + data := builder.GetStruct(b).(selectData) + return data.ToSql() +} + +func (b SelectBuilder) toSqlRaw() (string, []interface{}, error) { + data := builder.GetStruct(b).(selectData) + return data.toSqlRaw() +} + +// MustSql builds the query into a SQL string and bound args. +// It panics if there are any errors. +func (b SelectBuilder) MustSql() (string, []interface{}) { + sql, args, err := b.ToSql() + if err != nil { + panic(err) + } + return sql, args +} + +// Prefix adds an expression to the beginning of the query +func (b SelectBuilder) Prefix(sql string, args ...interface{}) SelectBuilder { + return b.PrefixExpr(Expr(sql, args...)) +} + +// PrefixExpr adds an expression to the very beginning of the query +func (b SelectBuilder) PrefixExpr(expr Sqlizer) SelectBuilder { + return builder.Append(b, "Prefixes", expr).(SelectBuilder) +} + +// Distinct adds a DISTINCT clause to the query. +func (b SelectBuilder) Distinct() SelectBuilder { + return b.Options("DISTINCT") +} + +// Options adds select option to the query +func (b SelectBuilder) Options(options ...string) SelectBuilder { + return builder.Extend(b, "Options", options).(SelectBuilder) +} + +// Columns adds result columns to the query. +func (b SelectBuilder) Columns(columns ...string) SelectBuilder { + parts := make([]interface{}, 0, len(columns)) + for _, str := range columns { + parts = append(parts, newPart(str)) + } + return builder.Extend(b, "Columns", parts).(SelectBuilder) +} + +// RemoveColumns remove all columns from query. +// Must add a new column with Column or Columns methods, otherwise +// return a error. +func (b SelectBuilder) RemoveColumns() SelectBuilder { + return builder.Delete(b, "Columns").(SelectBuilder) +} + +// Column adds a result column to the query. +// Unlike Columns, Column accepts args which will be bound to placeholders in +// the columns string, for example: +// Column("IF(col IN ("+squirrel.Placeholders(3)+"), 1, 0) as col", 1, 2, 3) +func (b SelectBuilder) Column(column interface{}, args ...interface{}) SelectBuilder { + return builder.Append(b, "Columns", newPart(column, args...)).(SelectBuilder) +} + +// From sets the FROM clause of the query. +func (b SelectBuilder) From(from string) SelectBuilder { + return builder.Set(b, "From", newPart(from)).(SelectBuilder) +} + +// FromSelect sets a subquery into the FROM clause of the query. +func (b SelectBuilder) FromSelect(from SelectBuilder, alias string) SelectBuilder { + // Prevent misnumbered parameters in nested selects (#183). + from = from.PlaceholderFormat(Question) + return builder.Set(b, "From", Alias(from, alias)).(SelectBuilder) +} + +// JoinClause adds a join clause to the query. +func (b SelectBuilder) JoinClause(pred interface{}, args ...interface{}) SelectBuilder { + return builder.Append(b, "Joins", newPart(pred, args...)).(SelectBuilder) +} + +// Join adds a JOIN clause to the query. +func (b SelectBuilder) Join(join string, rest ...interface{}) SelectBuilder { + return b.JoinClause("JOIN "+join, rest...) +} + +// LeftJoin adds a LEFT JOIN clause to the query. +func (b SelectBuilder) LeftJoin(join string, rest ...interface{}) SelectBuilder { + return b.JoinClause("LEFT JOIN "+join, rest...) +} + +// RightJoin adds a RIGHT JOIN clause to the query. +func (b SelectBuilder) RightJoin(join string, rest ...interface{}) SelectBuilder { + return b.JoinClause("RIGHT JOIN "+join, rest...) +} + +// InnerJoin adds a INNER JOIN clause to the query. +func (b SelectBuilder) InnerJoin(join string, rest ...interface{}) SelectBuilder { + return b.JoinClause("INNER JOIN "+join, rest...) +} + +// CrossJoin adds a CROSS JOIN clause to the query. +func (b SelectBuilder) CrossJoin(join string, rest ...interface{}) SelectBuilder { + return b.JoinClause("CROSS JOIN "+join, rest...) +} + +// Where adds an expression to the WHERE clause of the query. +// +// Expressions are ANDed together in the generated SQL. +// +// Where accepts several types for its pred argument: +// +// nil OR "" - ignored. +// +// string - SQL expression. +// If the expression has SQL placeholders then a set of arguments must be passed +// as well, one for each placeholder. +// +// map[string]interface{} OR Eq - map of SQL expressions to values. Each key is +// transformed into an expression like " = ?", with the corresponding value +// bound to the placeholder. If the value is nil, the expression will be " +// IS NULL". If the value is an array or slice, the expression will be " IN +// (?,?,...)", with one placeholder for each item in the value. These expressions +// are ANDed together. +// +// Where will panic if pred isn't any of the above types. +func (b SelectBuilder) Where(pred interface{}, args ...interface{}) SelectBuilder { + if pred == nil || pred == "" { + return b + } + return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(SelectBuilder) +} + +// GroupBy adds GROUP BY expressions to the query. +func (b SelectBuilder) GroupBy(groupBys ...string) SelectBuilder { + return builder.Extend(b, "GroupBys", groupBys).(SelectBuilder) +} + +// Having adds an expression to the HAVING clause of the query. +// +// See Where. +func (b SelectBuilder) Having(pred interface{}, rest ...interface{}) SelectBuilder { + return builder.Append(b, "HavingParts", newWherePart(pred, rest...)).(SelectBuilder) +} + +// OrderByClause adds ORDER BY clause to the query. +func (b SelectBuilder) OrderByClause(pred interface{}, args ...interface{}) SelectBuilder { + return builder.Append(b, "OrderByParts", newPart(pred, args...)).(SelectBuilder) +} + +// OrderBy adds ORDER BY expressions to the query. +func (b SelectBuilder) OrderBy(orderBys ...string) SelectBuilder { + for _, orderBy := range orderBys { + b = b.OrderByClause(orderBy) + } + + return b +} + +// Limit sets a LIMIT clause on the query. +func (b SelectBuilder) Limit(limit uint64) SelectBuilder { + return builder.Set(b, "Limit", fmt.Sprintf("%d", limit)).(SelectBuilder) +} + +// Limit ALL allows to access all records with limit +func (b SelectBuilder) RemoveLimit() SelectBuilder { + return builder.Delete(b, "Limit").(SelectBuilder) +} + +// Offset sets a OFFSET clause on the query. +func (b SelectBuilder) Offset(offset uint64) SelectBuilder { + return builder.Set(b, "Offset", fmt.Sprintf("%d", offset)).(SelectBuilder) +} + +// RemoveOffset removes OFFSET clause. +func (b SelectBuilder) RemoveOffset() SelectBuilder { + return builder.Delete(b, "Offset").(SelectBuilder) +} + +// Suffix adds an expression to the end of the query +func (b SelectBuilder) Suffix(sql string, args ...interface{}) SelectBuilder { + return b.SuffixExpr(Expr(sql, args...)) +} + +// SuffixExpr adds an expression to the end of the query +func (b SelectBuilder) SuffixExpr(expr Sqlizer) SelectBuilder { + return builder.Append(b, "Suffixes", expr).(SelectBuilder) +} diff --git a/vendor/github.com/Masterminds/squirrel/select_ctx.go b/vendor/github.com/Masterminds/squirrel/select_ctx.go new file mode 100644 index 000000000..4c42c13f4 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/select_ctx.go @@ -0,0 +1,69 @@ +// +build go1.8 + +package squirrel + +import ( + "context" + "database/sql" + + "github.com/lann/builder" +) + +func (d *selectData) ExecContext(ctx context.Context) (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(ExecerContext) + if !ok { + return nil, NoContextSupport + } + return ExecContextWith(ctx, ctxRunner, d) +} + +func (d *selectData) QueryContext(ctx context.Context) (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(QueryerContext) + if !ok { + return nil, NoContextSupport + } + return QueryContextWith(ctx, ctxRunner, d) +} + +func (d *selectData) QueryRowContext(ctx context.Context) RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRowerContext) + if !ok { + if _, ok := d.RunWith.(QueryerContext); !ok { + return &Row{err: RunnerNotQueryRunner} + } + return &Row{err: NoContextSupport} + } + return QueryRowContextWith(ctx, queryRower, d) +} + +// ExecContext builds and ExecContexts the query with the Runner set by RunWith. +func (b SelectBuilder) ExecContext(ctx context.Context) (sql.Result, error) { + data := builder.GetStruct(b).(selectData) + return data.ExecContext(ctx) +} + +// QueryContext builds and QueryContexts the query with the Runner set by RunWith. +func (b SelectBuilder) QueryContext(ctx context.Context) (*sql.Rows, error) { + data := builder.GetStruct(b).(selectData) + return data.QueryContext(ctx) +} + +// QueryRowContext builds and QueryRowContexts the query with the Runner set by RunWith. +func (b SelectBuilder) QueryRowContext(ctx context.Context) RowScanner { + data := builder.GetStruct(b).(selectData) + return data.QueryRowContext(ctx) +} + +// ScanContext is a shortcut for QueryRowContext().Scan. +func (b SelectBuilder) ScanContext(ctx context.Context, dest ...interface{}) error { + return b.QueryRowContext(ctx).Scan(dest...) +} diff --git a/vendor/github.com/Masterminds/squirrel/squirrel.go b/vendor/github.com/Masterminds/squirrel/squirrel.go new file mode 100644 index 000000000..46d456eb6 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/squirrel.go @@ -0,0 +1,183 @@ +// Package squirrel provides a fluent SQL generator. +// +// See https://github.com/Masterminds/squirrel for examples. +package squirrel + +import ( + "bytes" + "database/sql" + "fmt" + "strings" + + "github.com/lann/builder" +) + +// Sqlizer is the interface that wraps the ToSql method. +// +// ToSql returns a SQL representation of the Sqlizer, along with a slice of args +// as passed to e.g. database/sql.Exec. It can also return an error. +type Sqlizer interface { + ToSql() (string, []interface{}, error) +} + +// rawSqlizer is expected to do what Sqlizer does, but without finalizing placeholders. +// This is useful for nested queries. +type rawSqlizer interface { + toSqlRaw() (string, []interface{}, error) +} + +// Execer is the interface that wraps the Exec method. +// +// Exec executes the given query as implemented by database/sql.Exec. +type Execer interface { + Exec(query string, args ...interface{}) (sql.Result, error) +} + +// Queryer is the interface that wraps the Query method. +// +// Query executes the given query as implemented by database/sql.Query. +type Queryer interface { + Query(query string, args ...interface{}) (*sql.Rows, error) +} + +// QueryRower is the interface that wraps the QueryRow method. +// +// QueryRow executes the given query as implemented by database/sql.QueryRow. +type QueryRower interface { + QueryRow(query string, args ...interface{}) RowScanner +} + +// BaseRunner groups the Execer and Queryer interfaces. +type BaseRunner interface { + Execer + Queryer +} + +// Runner groups the Execer, Queryer, and QueryRower interfaces. +type Runner interface { + Execer + Queryer + QueryRower +} + +// WrapStdSql wraps a type implementing the standard SQL interface with methods that +// squirrel expects. +func WrapStdSql(stdSql StdSql) Runner { + return &stdsqlRunner{stdSql} +} + +// StdSql encompasses the standard methods of the *sql.DB type, and other types that +// wrap these methods. +type StdSql interface { + Query(string, ...interface{}) (*sql.Rows, error) + QueryRow(string, ...interface{}) *sql.Row + Exec(string, ...interface{}) (sql.Result, error) +} + +type stdsqlRunner struct { + StdSql +} + +func (r *stdsqlRunner) QueryRow(query string, args ...interface{}) RowScanner { + return r.StdSql.QueryRow(query, args...) +} + +func setRunWith(b interface{}, runner BaseRunner) interface{} { + switch r := runner.(type) { + case StdSqlCtx: + runner = WrapStdSqlCtx(r) + case StdSql: + runner = WrapStdSql(r) + } + return builder.Set(b, "RunWith", runner) +} + +// RunnerNotSet is returned by methods that need a Runner if it isn't set. +var RunnerNotSet = fmt.Errorf("cannot run; no Runner set (RunWith)") + +// RunnerNotQueryRunner is returned by QueryRow if the RunWith value doesn't implement QueryRower. +var RunnerNotQueryRunner = fmt.Errorf("cannot QueryRow; Runner is not a QueryRower") + +// ExecWith Execs the SQL returned by s with db. +func ExecWith(db Execer, s Sqlizer) (res sql.Result, err error) { + query, args, err := s.ToSql() + if err != nil { + return + } + return db.Exec(query, args...) +} + +// QueryWith Querys the SQL returned by s with db. +func QueryWith(db Queryer, s Sqlizer) (rows *sql.Rows, err error) { + query, args, err := s.ToSql() + if err != nil { + return + } + return db.Query(query, args...) +} + +// QueryRowWith QueryRows the SQL returned by s with db. +func QueryRowWith(db QueryRower, s Sqlizer) RowScanner { + query, args, err := s.ToSql() + return &Row{RowScanner: db.QueryRow(query, args...), err: err} +} + +// DebugSqlizer calls ToSql on s and shows the approximate SQL to be executed +// +// If ToSql returns an error, the result of this method will look like: +// "[ToSql error: %s]" or "[DebugSqlizer error: %s]" +// +// IMPORTANT: As its name suggests, this function should only be used for +// debugging. While the string result *might* be valid SQL, this function does +// not try very hard to ensure it. Additionally, executing the output of this +// function with any untrusted user input is certainly insecure. +func DebugSqlizer(s Sqlizer) string { + sql, args, err := s.ToSql() + if err != nil { + return fmt.Sprintf("[ToSql error: %s]", err) + } + + var placeholder string + downCast, ok := s.(placeholderDebugger) + if !ok { + placeholder = "?" + } else { + placeholder = downCast.debugPlaceholder() + } + // TODO: dedupe this with placeholder.go + buf := &bytes.Buffer{} + i := 0 + for { + p := strings.Index(sql, placeholder) + if p == -1 { + break + } + if len(sql[p:]) > 1 && sql[p:p+2] == "??" { // escape ?? => ? + buf.WriteString(sql[:p]) + buf.WriteString("?") + if len(sql[p:]) == 1 { + break + } + sql = sql[p+2:] + } else { + if i+1 > len(args) { + return fmt.Sprintf( + "[DebugSqlizer error: too many placeholders in %#v for %d args]", + sql, len(args)) + } + buf.WriteString(sql[:p]) + fmt.Fprintf(buf, "'%v'", args[i]) + // advance our sql string "cursor" beyond the arg we placed + sql = sql[p+1:] + i++ + } + } + if i < len(args) { + return fmt.Sprintf( + "[DebugSqlizer error: not enough placeholders in %#v for %d args]", + sql, len(args)) + } + // "append" any remaning sql that won't need interpolating + buf.WriteString(sql) + return buf.String() +} diff --git a/vendor/github.com/Masterminds/squirrel/squirrel_ctx.go b/vendor/github.com/Masterminds/squirrel/squirrel_ctx.go new file mode 100644 index 000000000..c20148ad3 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/squirrel_ctx.go @@ -0,0 +1,93 @@ +// +build go1.8 + +package squirrel + +import ( + "context" + "database/sql" + "errors" +) + +// NoContextSupport is returned if a db doesn't support Context. +var NoContextSupport = errors.New("DB does not support Context") + +// ExecerContext is the interface that wraps the ExecContext method. +// +// Exec executes the given query as implemented by database/sql.ExecContext. +type ExecerContext interface { + ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) +} + +// QueryerContext is the interface that wraps the QueryContext method. +// +// QueryContext executes the given query as implemented by database/sql.QueryContext. +type QueryerContext interface { + QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) +} + +// QueryRowerContext is the interface that wraps the QueryRowContext method. +// +// QueryRowContext executes the given query as implemented by database/sql.QueryRowContext. +type QueryRowerContext interface { + QueryRowContext(ctx context.Context, query string, args ...interface{}) RowScanner +} + +// RunnerContext groups the Runner interface, along with the Context versions of each of +// its methods +type RunnerContext interface { + Runner + QueryerContext + QueryRowerContext + ExecerContext +} + +// WrapStdSqlCtx wraps a type implementing the standard SQL interface plus the context +// versions of the methods with methods that squirrel expects. +func WrapStdSqlCtx(stdSqlCtx StdSqlCtx) RunnerContext { + return &stdsqlCtxRunner{stdSqlCtx} +} + +// StdSqlCtx encompasses the standard methods of the *sql.DB type, along with the Context +// versions of those methods, and other types that wrap these methods. +type StdSqlCtx interface { + StdSql + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) +} + +type stdsqlCtxRunner struct { + StdSqlCtx +} + +func (r *stdsqlCtxRunner) QueryRow(query string, args ...interface{}) RowScanner { + return r.StdSqlCtx.QueryRow(query, args...) +} + +func (r *stdsqlCtxRunner) QueryRowContext(ctx context.Context, query string, args ...interface{}) RowScanner { + return r.StdSqlCtx.QueryRowContext(ctx, query, args...) +} + +// ExecContextWith ExecContexts the SQL returned by s with db. +func ExecContextWith(ctx context.Context, db ExecerContext, s Sqlizer) (res sql.Result, err error) { + query, args, err := s.ToSql() + if err != nil { + return + } + return db.ExecContext(ctx, query, args...) +} + +// QueryContextWith QueryContexts the SQL returned by s with db. +func QueryContextWith(ctx context.Context, db QueryerContext, s Sqlizer) (rows *sql.Rows, err error) { + query, args, err := s.ToSql() + if err != nil { + return + } + return db.QueryContext(ctx, query, args...) +} + +// QueryRowContextWith QueryRowContexts the SQL returned by s with db. +func QueryRowContextWith(ctx context.Context, db QueryRowerContext, s Sqlizer) RowScanner { + query, args, err := s.ToSql() + return &Row{RowScanner: db.QueryRowContext(ctx, query, args...), err: err} +} diff --git a/vendor/github.com/Masterminds/squirrel/statement.go b/vendor/github.com/Masterminds/squirrel/statement.go new file mode 100644 index 000000000..9420c67f8 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/statement.go @@ -0,0 +1,104 @@ +package squirrel + +import "github.com/lann/builder" + +// StatementBuilderType is the type of StatementBuilder. +type StatementBuilderType builder.Builder + +// Select returns a SelectBuilder for this StatementBuilderType. +func (b StatementBuilderType) Select(columns ...string) SelectBuilder { + return SelectBuilder(b).Columns(columns...) +} + +// Insert returns a InsertBuilder for this StatementBuilderType. +func (b StatementBuilderType) Insert(into string) InsertBuilder { + return InsertBuilder(b).Into(into) +} + +// Replace returns a InsertBuilder for this StatementBuilderType with the +// statement keyword set to "REPLACE". +func (b StatementBuilderType) Replace(into string) InsertBuilder { + return InsertBuilder(b).statementKeyword("REPLACE").Into(into) +} + +// Update returns a UpdateBuilder for this StatementBuilderType. +func (b StatementBuilderType) Update(table string) UpdateBuilder { + return UpdateBuilder(b).Table(table) +} + +// Delete returns a DeleteBuilder for this StatementBuilderType. +func (b StatementBuilderType) Delete(from string) DeleteBuilder { + return DeleteBuilder(b).From(from) +} + +// PlaceholderFormat sets the PlaceholderFormat field for any child builders. +func (b StatementBuilderType) PlaceholderFormat(f PlaceholderFormat) StatementBuilderType { + return builder.Set(b, "PlaceholderFormat", f).(StatementBuilderType) +} + +// RunWith sets the RunWith field for any child builders. +func (b StatementBuilderType) RunWith(runner BaseRunner) StatementBuilderType { + return setRunWith(b, runner).(StatementBuilderType) +} + +// Where adds WHERE expressions to the query. +// +// See SelectBuilder.Where for more information. +func (b StatementBuilderType) Where(pred interface{}, args ...interface{}) StatementBuilderType { + return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(StatementBuilderType) +} + +// StatementBuilder is a parent builder for other builders, e.g. SelectBuilder. +var StatementBuilder = StatementBuilderType(builder.EmptyBuilder).PlaceholderFormat(Question) + +// Select returns a new SelectBuilder, optionally setting some result columns. +// +// See SelectBuilder.Columns. +func Select(columns ...string) SelectBuilder { + return StatementBuilder.Select(columns...) +} + +// Insert returns a new InsertBuilder with the given table name. +// +// See InsertBuilder.Into. +func Insert(into string) InsertBuilder { + return StatementBuilder.Insert(into) +} + +// Replace returns a new InsertBuilder with the statement keyword set to +// "REPLACE" and with the given table name. +// +// See InsertBuilder.Into. +func Replace(into string) InsertBuilder { + return StatementBuilder.Replace(into) +} + +// Update returns a new UpdateBuilder with the given table name. +// +// See UpdateBuilder.Table. +func Update(table string) UpdateBuilder { + return StatementBuilder.Update(table) +} + +// Delete returns a new DeleteBuilder with the given table name. +// +// See DeleteBuilder.Table. +func Delete(from string) DeleteBuilder { + return StatementBuilder.Delete(from) +} + +// Case returns a new CaseBuilder +// "what" represents case value +func Case(what ...interface{}) CaseBuilder { + b := CaseBuilder(builder.EmptyBuilder) + + switch len(what) { + case 0: + case 1: + b = b.what(what[0]) + default: + b = b.what(newPart(what[0], what[1:]...)) + + } + return b +} diff --git a/vendor/github.com/Masterminds/squirrel/stmtcacher.go b/vendor/github.com/Masterminds/squirrel/stmtcacher.go new file mode 100644 index 000000000..5bf267a13 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/stmtcacher.go @@ -0,0 +1,121 @@ +package squirrel + +import ( + "database/sql" + "fmt" + "sync" +) + +// Prepareer is the interface that wraps the Prepare method. +// +// Prepare executes the given query as implemented by database/sql.Prepare. +type Preparer interface { + Prepare(query string) (*sql.Stmt, error) +} + +// DBProxy groups the Execer, Queryer, QueryRower, and Preparer interfaces. +type DBProxy interface { + Execer + Queryer + QueryRower + Preparer +} + +// NOTE: NewStmtCache is defined in stmtcacher_ctx.go (Go >= 1.8) or stmtcacher_noctx.go (Go < 1.8). + +// StmtCache wraps and delegates down to a Preparer type +// +// It also automatically prepares all statements sent to the underlying Preparer calls +// for Exec, Query and QueryRow and caches the returns *sql.Stmt using the provided +// query as the key. So that it can be automatically re-used. +type StmtCache struct { + prep Preparer + cache map[string]*sql.Stmt + mu sync.Mutex +} + +// Prepare delegates down to the underlying Preparer and caches the result +// using the provided query as a key +func (sc *StmtCache) Prepare(query string) (*sql.Stmt, error) { + sc.mu.Lock() + defer sc.mu.Unlock() + + stmt, ok := sc.cache[query] + if ok { + return stmt, nil + } + stmt, err := sc.prep.Prepare(query) + if err == nil { + sc.cache[query] = stmt + } + return stmt, err +} + +// Exec delegates down to the underlying Preparer using a prepared statement +func (sc *StmtCache) Exec(query string, args ...interface{}) (res sql.Result, err error) { + stmt, err := sc.Prepare(query) + if err != nil { + return + } + return stmt.Exec(args...) +} + +// Query delegates down to the underlying Preparer using a prepared statement +func (sc *StmtCache) Query(query string, args ...interface{}) (rows *sql.Rows, err error) { + stmt, err := sc.Prepare(query) + if err != nil { + return + } + return stmt.Query(args...) +} + +// QueryRow delegates down to the underlying Preparer using a prepared statement +func (sc *StmtCache) QueryRow(query string, args ...interface{}) RowScanner { + stmt, err := sc.Prepare(query) + if err != nil { + return &Row{err: err} + } + return stmt.QueryRow(args...) +} + +// Clear removes and closes all the currently cached prepared statements +func (sc *StmtCache) Clear() (err error) { + sc.mu.Lock() + defer sc.mu.Unlock() + + for key, stmt := range sc.cache { + delete(sc.cache, key) + + if stmt == nil { + continue + } + + if cerr := stmt.Close(); cerr != nil { + err = cerr + } + } + + if err != nil { + return fmt.Errorf("one or more Stmt.Close failed; last error: %v", err) + } + + return +} + +type DBProxyBeginner interface { + DBProxy + Begin() (*sql.Tx, error) +} + +type stmtCacheProxy struct { + DBProxy + db *sql.DB +} + +func NewStmtCacheProxy(db *sql.DB) DBProxyBeginner { + return &stmtCacheProxy{DBProxy: NewStmtCache(db), db: db} +} + +func (sp *stmtCacheProxy) Begin() (*sql.Tx, error) { + return sp.db.Begin() +} diff --git a/vendor/github.com/Masterminds/squirrel/stmtcacher_ctx.go b/vendor/github.com/Masterminds/squirrel/stmtcacher_ctx.go new file mode 100644 index 000000000..53603cf4c --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/stmtcacher_ctx.go @@ -0,0 +1,86 @@ +// +build go1.8 + +package squirrel + +import ( + "context" + "database/sql" +) + +// PrepareerContext is the interface that wraps the Prepare and PrepareContext methods. +// +// Prepare executes the given query as implemented by database/sql.Prepare. +// PrepareContext executes the given query as implemented by database/sql.PrepareContext. +type PreparerContext interface { + Preparer + PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) +} + +// DBProxyContext groups the Execer, Queryer, QueryRower and PreparerContext interfaces. +type DBProxyContext interface { + Execer + Queryer + QueryRower + PreparerContext +} + +// NewStmtCache returns a *StmtCache wrapping a PreparerContext that caches Prepared Stmts. +// +// Stmts are cached based on the string value of their queries. +func NewStmtCache(prep PreparerContext) *StmtCache { + return &StmtCache{prep: prep, cache: make(map[string]*sql.Stmt)} +} + +// NewStmtCacher is deprecated +// +// Use NewStmtCache instead +func NewStmtCacher(prep PreparerContext) DBProxyContext { + return NewStmtCache(prep) +} + +// PrepareContext delegates down to the underlying PreparerContext and caches the result +// using the provided query as a key +func (sc *StmtCache) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) { + ctxPrep, ok := sc.prep.(PreparerContext) + if !ok { + return nil, NoContextSupport + } + sc.mu.Lock() + defer sc.mu.Unlock() + stmt, ok := sc.cache[query] + if ok { + return stmt, nil + } + stmt, err := ctxPrep.PrepareContext(ctx, query) + if err == nil { + sc.cache[query] = stmt + } + return stmt, err +} + +// ExecContext delegates down to the underlying PreparerContext using a prepared statement +func (sc *StmtCache) ExecContext(ctx context.Context, query string, args ...interface{}) (res sql.Result, err error) { + stmt, err := sc.PrepareContext(ctx, query) + if err != nil { + return + } + return stmt.ExecContext(ctx, args...) +} + +// QueryContext delegates down to the underlying PreparerContext using a prepared statement +func (sc *StmtCache) QueryContext(ctx context.Context, query string, args ...interface{}) (rows *sql.Rows, err error) { + stmt, err := sc.PrepareContext(ctx, query) + if err != nil { + return + } + return stmt.QueryContext(ctx, args...) +} + +// QueryRowContext delegates down to the underlying PreparerContext using a prepared statement +func (sc *StmtCache) QueryRowContext(ctx context.Context, query string, args ...interface{}) RowScanner { + stmt, err := sc.PrepareContext(ctx, query) + if err != nil { + return &Row{err: err} + } + return stmt.QueryRowContext(ctx, args...) +} diff --git a/vendor/github.com/Masterminds/squirrel/stmtcacher_noctx.go b/vendor/github.com/Masterminds/squirrel/stmtcacher_noctx.go new file mode 100644 index 000000000..deac96777 --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/stmtcacher_noctx.go @@ -0,0 +1,21 @@ +// +build !go1.8 + +package squirrel + +import ( + "database/sql" +) + +// NewStmtCacher returns a DBProxy wrapping prep that caches Prepared Stmts. +// +// Stmts are cached based on the string value of their queries. +func NewStmtCache(prep Preparer) *StmtCache { + return &StmtCacher{prep: prep, cache: make(map[string]*sql.Stmt)} +} + +// NewStmtCacher is deprecated +// +// Use NewStmtCache instead +func NewStmtCacher(prep Preparer) DBProxy { + return NewStmtCache(prep) +} diff --git a/vendor/github.com/Masterminds/squirrel/update.go b/vendor/github.com/Masterminds/squirrel/update.go new file mode 100644 index 000000000..eb2a9c4dd --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/update.go @@ -0,0 +1,288 @@ +package squirrel + +import ( + "bytes" + "database/sql" + "fmt" + "sort" + "strings" + + "github.com/lann/builder" +) + +type updateData struct { + PlaceholderFormat PlaceholderFormat + RunWith BaseRunner + Prefixes []Sqlizer + Table string + SetClauses []setClause + From Sqlizer + WhereParts []Sqlizer + OrderBys []string + Limit string + Offset string + Suffixes []Sqlizer +} + +type setClause struct { + column string + value interface{} +} + +func (d *updateData) Exec() (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return ExecWith(d.RunWith, d) +} + +func (d *updateData) Query() (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + return QueryWith(d.RunWith, d) +} + +func (d *updateData) QueryRow() RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRower) + if !ok { + return &Row{err: RunnerNotQueryRunner} + } + return QueryRowWith(queryRower, d) +} + +func (d *updateData) ToSql() (sqlStr string, args []interface{}, err error) { + if len(d.Table) == 0 { + err = fmt.Errorf("update statements must specify a table") + return + } + if len(d.SetClauses) == 0 { + err = fmt.Errorf("update statements must have at least one Set clause") + return + } + + sql := &bytes.Buffer{} + + if len(d.Prefixes) > 0 { + args, err = appendToSql(d.Prefixes, sql, " ", args) + if err != nil { + return + } + + sql.WriteString(" ") + } + + sql.WriteString("UPDATE ") + sql.WriteString(d.Table) + + sql.WriteString(" SET ") + setSqls := make([]string, len(d.SetClauses)) + for i, setClause := range d.SetClauses { + var valSql string + if vs, ok := setClause.value.(Sqlizer); ok { + vsql, vargs, err := vs.ToSql() + if err != nil { + return "", nil, err + } + if _, ok := vs.(SelectBuilder); ok { + valSql = fmt.Sprintf("(%s)", vsql) + } else { + valSql = vsql + } + args = append(args, vargs...) + } else { + valSql = "?" + args = append(args, setClause.value) + } + setSqls[i] = fmt.Sprintf("%s = %s", setClause.column, valSql) + } + sql.WriteString(strings.Join(setSqls, ", ")) + + if d.From != nil { + sql.WriteString(" FROM ") + args, err = appendToSql([]Sqlizer{d.From}, sql, "", args) + if err != nil { + return + } + } + + if len(d.WhereParts) > 0 { + sql.WriteString(" WHERE ") + args, err = appendToSql(d.WhereParts, sql, " AND ", args) + if err != nil { + return + } + } + + if len(d.OrderBys) > 0 { + sql.WriteString(" ORDER BY ") + sql.WriteString(strings.Join(d.OrderBys, ", ")) + } + + if len(d.Limit) > 0 { + sql.WriteString(" LIMIT ") + sql.WriteString(d.Limit) + } + + if len(d.Offset) > 0 { + sql.WriteString(" OFFSET ") + sql.WriteString(d.Offset) + } + + if len(d.Suffixes) > 0 { + sql.WriteString(" ") + args, err = appendToSql(d.Suffixes, sql, " ", args) + if err != nil { + return + } + } + + sqlStr, err = d.PlaceholderFormat.ReplacePlaceholders(sql.String()) + return +} + +// Builder + +// UpdateBuilder builds SQL UPDATE statements. +type UpdateBuilder builder.Builder + +func init() { + builder.Register(UpdateBuilder{}, updateData{}) +} + +// Format methods + +// PlaceholderFormat sets PlaceholderFormat (e.g. Question or Dollar) for the +// query. +func (b UpdateBuilder) PlaceholderFormat(f PlaceholderFormat) UpdateBuilder { + return builder.Set(b, "PlaceholderFormat", f).(UpdateBuilder) +} + +// Runner methods + +// RunWith sets a Runner (like database/sql.DB) to be used with e.g. Exec. +func (b UpdateBuilder) RunWith(runner BaseRunner) UpdateBuilder { + return setRunWith(b, runner).(UpdateBuilder) +} + +// Exec builds and Execs the query with the Runner set by RunWith. +func (b UpdateBuilder) Exec() (sql.Result, error) { + data := builder.GetStruct(b).(updateData) + return data.Exec() +} + +func (b UpdateBuilder) Query() (*sql.Rows, error) { + data := builder.GetStruct(b).(updateData) + return data.Query() +} + +func (b UpdateBuilder) QueryRow() RowScanner { + data := builder.GetStruct(b).(updateData) + return data.QueryRow() +} + +func (b UpdateBuilder) Scan(dest ...interface{}) error { + return b.QueryRow().Scan(dest...) +} + +// SQL methods + +// ToSql builds the query into a SQL string and bound args. +func (b UpdateBuilder) ToSql() (string, []interface{}, error) { + data := builder.GetStruct(b).(updateData) + return data.ToSql() +} + +// MustSql builds the query into a SQL string and bound args. +// It panics if there are any errors. +func (b UpdateBuilder) MustSql() (string, []interface{}) { + sql, args, err := b.ToSql() + if err != nil { + panic(err) + } + return sql, args +} + +// Prefix adds an expression to the beginning of the query +func (b UpdateBuilder) Prefix(sql string, args ...interface{}) UpdateBuilder { + return b.PrefixExpr(Expr(sql, args...)) +} + +// PrefixExpr adds an expression to the very beginning of the query +func (b UpdateBuilder) PrefixExpr(expr Sqlizer) UpdateBuilder { + return builder.Append(b, "Prefixes", expr).(UpdateBuilder) +} + +// Table sets the table to be updated. +func (b UpdateBuilder) Table(table string) UpdateBuilder { + return builder.Set(b, "Table", table).(UpdateBuilder) +} + +// Set adds SET clauses to the query. +func (b UpdateBuilder) Set(column string, value interface{}) UpdateBuilder { + return builder.Append(b, "SetClauses", setClause{column: column, value: value}).(UpdateBuilder) +} + +// SetMap is a convenience method which calls .Set for each key/value pair in clauses. +func (b UpdateBuilder) SetMap(clauses map[string]interface{}) UpdateBuilder { + keys := make([]string, len(clauses)) + i := 0 + for key := range clauses { + keys[i] = key + i++ + } + sort.Strings(keys) + for _, key := range keys { + val, _ := clauses[key] + b = b.Set(key, val) + } + return b +} + +// From adds FROM clause to the query +// FROM is valid construct in postgresql only. +func (b UpdateBuilder) From(from string) UpdateBuilder { + return builder.Set(b, "From", newPart(from)).(UpdateBuilder) +} + +// FromSelect sets a subquery into the FROM clause of the query. +func (b UpdateBuilder) FromSelect(from SelectBuilder, alias string) UpdateBuilder { + // Prevent misnumbered parameters in nested selects (#183). + from = from.PlaceholderFormat(Question) + return builder.Set(b, "From", Alias(from, alias)).(UpdateBuilder) +} + +// Where adds WHERE expressions to the query. +// +// See SelectBuilder.Where for more information. +func (b UpdateBuilder) Where(pred interface{}, args ...interface{}) UpdateBuilder { + return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(UpdateBuilder) +} + +// OrderBy adds ORDER BY expressions to the query. +func (b UpdateBuilder) OrderBy(orderBys ...string) UpdateBuilder { + return builder.Extend(b, "OrderBys", orderBys).(UpdateBuilder) +} + +// Limit sets a LIMIT clause on the query. +func (b UpdateBuilder) Limit(limit uint64) UpdateBuilder { + return builder.Set(b, "Limit", fmt.Sprintf("%d", limit)).(UpdateBuilder) +} + +// Offset sets a OFFSET clause on the query. +func (b UpdateBuilder) Offset(offset uint64) UpdateBuilder { + return builder.Set(b, "Offset", fmt.Sprintf("%d", offset)).(UpdateBuilder) +} + +// Suffix adds an expression to the end of the query +func (b UpdateBuilder) Suffix(sql string, args ...interface{}) UpdateBuilder { + return b.SuffixExpr(Expr(sql, args...)) +} + +// SuffixExpr adds an expression to the end of the query +func (b UpdateBuilder) SuffixExpr(expr Sqlizer) UpdateBuilder { + return builder.Append(b, "Suffixes", expr).(UpdateBuilder) +} diff --git a/vendor/github.com/Masterminds/squirrel/update_ctx.go b/vendor/github.com/Masterminds/squirrel/update_ctx.go new file mode 100644 index 000000000..ad479f96f --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/update_ctx.go @@ -0,0 +1,69 @@ +// +build go1.8 + +package squirrel + +import ( + "context" + "database/sql" + + "github.com/lann/builder" +) + +func (d *updateData) ExecContext(ctx context.Context) (sql.Result, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(ExecerContext) + if !ok { + return nil, NoContextSupport + } + return ExecContextWith(ctx, ctxRunner, d) +} + +func (d *updateData) QueryContext(ctx context.Context) (*sql.Rows, error) { + if d.RunWith == nil { + return nil, RunnerNotSet + } + ctxRunner, ok := d.RunWith.(QueryerContext) + if !ok { + return nil, NoContextSupport + } + return QueryContextWith(ctx, ctxRunner, d) +} + +func (d *updateData) QueryRowContext(ctx context.Context) RowScanner { + if d.RunWith == nil { + return &Row{err: RunnerNotSet} + } + queryRower, ok := d.RunWith.(QueryRowerContext) + if !ok { + if _, ok := d.RunWith.(QueryerContext); !ok { + return &Row{err: RunnerNotQueryRunner} + } + return &Row{err: NoContextSupport} + } + return QueryRowContextWith(ctx, queryRower, d) +} + +// ExecContext builds and ExecContexts the query with the Runner set by RunWith. +func (b UpdateBuilder) ExecContext(ctx context.Context) (sql.Result, error) { + data := builder.GetStruct(b).(updateData) + return data.ExecContext(ctx) +} + +// QueryContext builds and QueryContexts the query with the Runner set by RunWith. +func (b UpdateBuilder) QueryContext(ctx context.Context) (*sql.Rows, error) { + data := builder.GetStruct(b).(updateData) + return data.QueryContext(ctx) +} + +// QueryRowContext builds and QueryRowContexts the query with the Runner set by RunWith. +func (b UpdateBuilder) QueryRowContext(ctx context.Context) RowScanner { + data := builder.GetStruct(b).(updateData) + return data.QueryRowContext(ctx) +} + +// ScanContext is a shortcut for QueryRowContext().Scan. +func (b UpdateBuilder) ScanContext(ctx context.Context, dest ...interface{}) error { + return b.QueryRowContext(ctx).Scan(dest...) +} diff --git a/vendor/github.com/Masterminds/squirrel/where.go b/vendor/github.com/Masterminds/squirrel/where.go new file mode 100644 index 000000000..976b63ace --- /dev/null +++ b/vendor/github.com/Masterminds/squirrel/where.go @@ -0,0 +1,30 @@ +package squirrel + +import ( + "fmt" +) + +type wherePart part + +func newWherePart(pred interface{}, args ...interface{}) Sqlizer { + return &wherePart{pred: pred, args: args} +} + +func (p wherePart) ToSql() (sql string, args []interface{}, err error) { + switch pred := p.pred.(type) { + case nil: + // no-op + case rawSqlizer: + return pred.toSqlRaw() + case Sqlizer: + return pred.ToSql() + case map[string]interface{}: + return Eq(pred).ToSql() + case string: + sql = pred + args = p.args + default: + err = fmt.Errorf("expected string-keyed map or string, not %T", pred) + } + return +} diff --git a/vendor/github.com/asaskevich/govalidator/.gitignore b/vendor/github.com/asaskevich/govalidator/.gitignore new file mode 100644 index 000000000..8d69a9418 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/.gitignore @@ -0,0 +1,15 @@ +bin/ +.idea/ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + diff --git a/vendor/github.com/asaskevich/govalidator/.travis.yml b/vendor/github.com/asaskevich/govalidator/.travis.yml new file mode 100644 index 000000000..bb83c6670 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/.travis.yml @@ -0,0 +1,12 @@ +language: go +dist: xenial +go: + - '1.10' + - '1.11' + - '1.12' + - '1.13' + - 'tip' + +script: + - go test -coverpkg=./... -coverprofile=coverage.info -timeout=5s + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md b/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..4b462b0d8 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +This project adheres to [The Code Manifesto](http://codemanifesto.com) +as its guidelines for contributor interactions. + +## The Code Manifesto + +We want to work in an ecosystem that empowers developers to reach their +potential — one that encourages growth and effective collaboration. A space +that is safe for all. + +A space such as this benefits everyone that participates in it. It encourages +new developers to enter our field. It is through discussion and collaboration +that we grow, and through growth that we improve. + +In the effort to create such a place, we hold to these values: + +1. **Discrimination limits us.** This includes discrimination on the basis of + race, gender, sexual orientation, gender identity, age, nationality, + technology and any other arbitrary exclusion of a group of people. +2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort + levels. Remember that, and if brought to your attention, heed it. +3. **We are our biggest assets.** None of us were born masters of our trade. + Each of us has been helped along the way. Return that favor, when and where + you can. +4. **We are resources for the future.** As an extension of #3, share what you + know. Make yourself a resource to help those that come after you. +5. **Respect defines us.** Treat others as you wish to be treated. Make your + discussions, criticisms and debates from a position of respectfulness. Ask + yourself, is it true? Is it necessary? Is it constructive? Anything less is + unacceptable. +6. **Reactions require grace.** Angry responses are valid, but abusive language + and vindictive actions are toxic. When something happens that offends you, + handle it assertively, but be respectful. Escalate reasonably, and try to + allow the offender an opportunity to explain themselves, and possibly + correct the issue. +7. **Opinions are just that: opinions.** Each and every one of us, due to our + background and upbringing, have varying opinions. That is perfectly + acceptable. Remember this: if you respect your own opinions, you should + respect the opinions of others. +8. **To err is human.** You might not intend it, but mistakes do happen and + contribute to build experience. Tolerate honest mistakes, and don't + hesitate to apologize if you make one yourself. diff --git a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md new file mode 100644 index 000000000..7ed268a1e --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md @@ -0,0 +1,63 @@ +#### Support +If you do have a contribution to the package, feel free to create a Pull Request or an Issue. + +#### What to contribute +If you don't know what to do, there are some features and functions that need to be done + +- [ ] Refactor code +- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check +- [ ] Create actual list of contributors and projects that currently using this package +- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) +- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) +- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new +- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc +- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) +- [ ] Implement fuzzing testing +- [ ] Implement some struct/map/array utilities +- [ ] Implement map/array validation +- [ ] Implement benchmarking +- [ ] Implement batch of examples +- [ ] Look at forks for new features and fixes + +#### Advice +Feel free to create what you want, but keep in mind when you implement new features: +- Code must be clear and readable, names of variables/constants clearly describes what they are doing +- Public functions must be documented and described in source file and added to README.md to the list of available functions +- There are must be unit-tests for any new functions and improvements + +## Financial contributions + +We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator). +Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. + + +## Credits + + +### Contributors + +Thank you to all the people who have already contributed to govalidator! + + + +### Backers + +Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)] + + + + +### Sponsors + +Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor)) + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/LICENSE b/vendor/github.com/asaskevich/govalidator/LICENSE new file mode 100644 index 000000000..cacba9102 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2020 Alex Saskevich + +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. \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md new file mode 100644 index 000000000..2c3fc35eb --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/README.md @@ -0,0 +1,622 @@ +govalidator +=========== +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GoDoc](https://godoc.org/github.com/asaskevich/govalidator?status.png)](https://godoc.org/github.com/asaskevich/govalidator) +[![Build Status](https://travis-ci.org/asaskevich/govalidator.svg?branch=master)](https://travis-ci.org/asaskevich/govalidator) +[![Coverage](https://codecov.io/gh/asaskevich/govalidator/branch/master/graph/badge.svg)](https://codecov.io/gh/asaskevich/govalidator) [![Go Report Card](https://goreportcard.com/badge/github.com/asaskevich/govalidator)](https://goreportcard.com/report/github.com/asaskevich/govalidator) [![GoSearch](http://go-search.org/badge?id=github.com%2Fasaskevich%2Fgovalidator)](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [![Backers on Open Collective](https://opencollective.com/govalidator/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/govalidator/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield) + +A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js). + +#### Installation +Make sure that Go is installed on your computer. +Type the following command in your terminal: + + go get github.com/asaskevich/govalidator + +or you can get specified release of the package with `gopkg.in`: + + go get gopkg.in/asaskevich/govalidator.v10 + +After it the package is ready to use. + + +#### Import package in your project +Add following line in your `*.go` file: +```go +import "github.com/asaskevich/govalidator" +``` +If you are unhappy to use long `govalidator`, you can do something like this: +```go +import ( + valid "github.com/asaskevich/govalidator" +) +``` + +#### Activate behavior to require all fields have a validation tag by default +`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function. + +`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors. + +```go +import "github.com/asaskevich/govalidator" + +func init() { + govalidator.SetFieldsRequiredByDefault(true) +} +``` + +Here's some code to explain it: +```go +// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): +type exampleStruct struct { + Name string `` + Email string `valid:"email"` +} + +// this, however, will only fail when Email is empty or an invalid email address: +type exampleStruct2 struct { + Name string `valid:"-"` + Email string `valid:"email"` +} + +// lastly, this will only fail when Email is an invalid email address but not when it's empty: +type exampleStruct2 struct { + Name string `valid:"-"` + Email string `valid:"email,optional"` +} +``` + +#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123)) +##### Custom validator function signature +A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible. +```go +import "github.com/asaskevich/govalidator" + +// old signature +func(i interface{}) bool + +// new signature +func(i interface{}, o interface{}) bool +``` + +##### Adding a custom validator +This was changed to prevent data races when accessing custom validators. +```go +import "github.com/asaskevich/govalidator" + +// before +govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool { + // ... +} + +// after +govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool { + // ... +}) +``` + +#### List of functions: +```go +func Abs(value float64) float64 +func BlackList(str, chars string) string +func ByteLength(str string, params ...string) bool +func CamelCaseToUnderscore(str string) string +func Contains(str, substring string) bool +func Count(array []interface{}, iterator ConditionIterator) int +func Each(array []interface{}, iterator Iterator) +func ErrorByField(e error, field string) string +func ErrorsByField(e error) map[string]string +func Filter(array []interface{}, iterator ConditionIterator) []interface{} +func Find(array []interface{}, iterator ConditionIterator) interface{} +func GetLine(s string, index int) (string, error) +func GetLines(s string) []string +func HasLowerCase(str string) bool +func HasUpperCase(str string) bool +func HasWhitespace(str string) bool +func HasWhitespaceOnly(str string) bool +func InRange(value interface{}, left interface{}, right interface{}) bool +func InRangeFloat32(value, left, right float32) bool +func InRangeFloat64(value, left, right float64) bool +func InRangeInt(value, left, right interface{}) bool +func IsASCII(str string) bool +func IsAlpha(str string) bool +func IsAlphanumeric(str string) bool +func IsBase64(str string) bool +func IsByteLength(str string, min, max int) bool +func IsCIDR(str string) bool +func IsCRC32(str string) bool +func IsCRC32b(str string) bool +func IsCreditCard(str string) bool +func IsDNSName(str string) bool +func IsDataURI(str string) bool +func IsDialString(str string) bool +func IsDivisibleBy(str, num string) bool +func IsEmail(str string) bool +func IsExistingEmail(email string) bool +func IsFilePath(str string) (bool, int) +func IsFloat(str string) bool +func IsFullWidth(str string) bool +func IsHalfWidth(str string) bool +func IsHash(str string, algorithm string) bool +func IsHexadecimal(str string) bool +func IsHexcolor(str string) bool +func IsHost(str string) bool +func IsIP(str string) bool +func IsIPv4(str string) bool +func IsIPv6(str string) bool +func IsISBN(str string, version int) bool +func IsISBN10(str string) bool +func IsISBN13(str string) bool +func IsISO3166Alpha2(str string) bool +func IsISO3166Alpha3(str string) bool +func IsISO4217(str string) bool +func IsISO693Alpha2(str string) bool +func IsISO693Alpha3b(str string) bool +func IsIn(str string, params ...string) bool +func IsInRaw(str string, params ...string) bool +func IsInt(str string) bool +func IsJSON(str string) bool +func IsLatitude(str string) bool +func IsLongitude(str string) bool +func IsLowerCase(str string) bool +func IsMAC(str string) bool +func IsMD4(str string) bool +func IsMD5(str string) bool +func IsMagnetURI(str string) bool +func IsMongoID(str string) bool +func IsMultibyte(str string) bool +func IsNatural(value float64) bool +func IsNegative(value float64) bool +func IsNonNegative(value float64) bool +func IsNonPositive(value float64) bool +func IsNotNull(str string) bool +func IsNull(str string) bool +func IsNumeric(str string) bool +func IsPort(str string) bool +func IsPositive(value float64) bool +func IsPrintableASCII(str string) bool +func IsRFC3339(str string) bool +func IsRFC3339WithoutZone(str string) bool +func IsRGBcolor(str string) bool +func IsRegex(str string) bool +func IsRequestURI(rawurl string) bool +func IsRequestURL(rawurl string) bool +func IsRipeMD128(str string) bool +func IsRipeMD160(str string) bool +func IsRsaPub(str string, params ...string) bool +func IsRsaPublicKey(str string, keylen int) bool +func IsSHA1(str string) bool +func IsSHA256(str string) bool +func IsSHA384(str string) bool +func IsSHA512(str string) bool +func IsSSN(str string) bool +func IsSemver(str string) bool +func IsTiger128(str string) bool +func IsTiger160(str string) bool +func IsTiger192(str string) bool +func IsTime(str string, format string) bool +func IsType(v interface{}, params ...string) bool +func IsURL(str string) bool +func IsUTFDigit(str string) bool +func IsUTFLetter(str string) bool +func IsUTFLetterNumeric(str string) bool +func IsUTFNumeric(str string) bool +func IsUUID(str string) bool +func IsUUIDv3(str string) bool +func IsUUIDv4(str string) bool +func IsUUIDv5(str string) bool +func IsULID(str string) bool +func IsUnixTime(str string) bool +func IsUpperCase(str string) bool +func IsVariableWidth(str string) bool +func IsWhole(value float64) bool +func LeftTrim(str, chars string) string +func Map(array []interface{}, iterator ResultIterator) []interface{} +func Matches(str, pattern string) bool +func MaxStringLength(str string, params ...string) bool +func MinStringLength(str string, params ...string) bool +func NormalizeEmail(str string) (string, error) +func PadBoth(str string, padStr string, padLen int) string +func PadLeft(str string, padStr string, padLen int) string +func PadRight(str string, padStr string, padLen int) string +func PrependPathToErrors(err error, path string) error +func Range(str string, params ...string) bool +func RemoveTags(s string) string +func ReplacePattern(str, pattern, replace string) string +func Reverse(s string) string +func RightTrim(str, chars string) string +func RuneLength(str string, params ...string) bool +func SafeFileName(str string) string +func SetFieldsRequiredByDefault(value bool) +func SetNilPtrAllowedByRequired(value bool) +func Sign(value float64) float64 +func StringLength(str string, params ...string) bool +func StringMatches(s string, params ...string) bool +func StripLow(str string, keepNewLines bool) string +func ToBoolean(str string) (bool, error) +func ToFloat(str string) (float64, error) +func ToInt(value interface{}) (res int64, err error) +func ToJSON(obj interface{}) (string, error) +func ToString(obj interface{}) string +func Trim(str, chars string) string +func Truncate(str string, length int, ending string) string +func TruncatingErrorf(str string, args ...interface{}) error +func UnderscoreToCamelCase(s string) string +func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error) +func ValidateStruct(s interface{}) (bool, error) +func WhiteList(str, chars string) string +type ConditionIterator +type CustomTypeValidator +type Error +func (e Error) Error() string +type Errors +func (es Errors) Error() string +func (es Errors) Errors() []error +type ISO3166Entry +type ISO693Entry +type InterfaceParamValidator +type Iterator +type ParamValidator +type ResultIterator +type UnsupportedTypeError +func (e *UnsupportedTypeError) Error() string +type Validator +``` + +#### Examples +###### IsURL +```go +println(govalidator.IsURL(`http://user@pass:domain.com/path/page`)) +``` +###### IsType +```go +println(govalidator.IsType("Bob", "string")) +println(govalidator.IsType(1, "int")) +i := 1 +println(govalidator.IsType(&i, "*int")) +``` + +IsType can be used through the tag `type` which is essential for map validation: +```go +type User struct { + Name string `valid:"type(string)"` + Age int `valid:"type(int)"` + Meta interface{} `valid:"type(string)"` +} +result, err := govalidator.ValidateStruct(User{"Bob", 20, "meta"}) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` +###### ToString +```go +type User struct { + FirstName string + LastName string +} + +str := govalidator.ToString(&User{"John", "Juan"}) +println(str) +``` +###### Each, Map, Filter, Count for slices +Each iterates over the slice/array and calls Iterator for every item +```go +data := []interface{}{1, 2, 3, 4, 5} +var fn govalidator.Iterator = func(value interface{}, index int) { + println(value.(int)) +} +govalidator.Each(data, fn) +``` +```go +data := []interface{}{1, 2, 3, 4, 5} +var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} { + return value.(int) * 3 +} +_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15} +``` +```go +data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} +var fn govalidator.ConditionIterator = func(value interface{}, index int) bool { + return value.(int)%2 == 0 +} +_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10} +_ = govalidator.Count(data, fn) // result = 5 +``` +###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2) +If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this: +```go +govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { + return str == "duck" +}) +``` +For completely custom validators (interface-based), see below. + +Here is a list of available validators for struct fields (validator - used function): +```go +"email": IsEmail, +"url": IsURL, +"dialstring": IsDialString, +"requrl": IsRequestURL, +"requri": IsRequestURI, +"alpha": IsAlpha, +"utfletter": IsUTFLetter, +"alphanum": IsAlphanumeric, +"utfletternum": IsUTFLetterNumeric, +"numeric": IsNumeric, +"utfnumeric": IsUTFNumeric, +"utfdigit": IsUTFDigit, +"hexadecimal": IsHexadecimal, +"hexcolor": IsHexcolor, +"rgbcolor": IsRGBcolor, +"lowercase": IsLowerCase, +"uppercase": IsUpperCase, +"int": IsInt, +"float": IsFloat, +"null": IsNull, +"uuid": IsUUID, +"uuidv3": IsUUIDv3, +"uuidv4": IsUUIDv4, +"uuidv5": IsUUIDv5, +"creditcard": IsCreditCard, +"isbn10": IsISBN10, +"isbn13": IsISBN13, +"json": IsJSON, +"multibyte": IsMultibyte, +"ascii": IsASCII, +"printableascii": IsPrintableASCII, +"fullwidth": IsFullWidth, +"halfwidth": IsHalfWidth, +"variablewidth": IsVariableWidth, +"base64": IsBase64, +"datauri": IsDataURI, +"ip": IsIP, +"port": IsPort, +"ipv4": IsIPv4, +"ipv6": IsIPv6, +"dns": IsDNSName, +"host": IsHost, +"mac": IsMAC, +"latitude": IsLatitude, +"longitude": IsLongitude, +"ssn": IsSSN, +"semver": IsSemver, +"rfc3339": IsRFC3339, +"rfc3339WithoutZone": IsRFC3339WithoutZone, +"ISO3166Alpha2": IsISO3166Alpha2, +"ISO3166Alpha3": IsISO3166Alpha3, +"ulid": IsULID, +``` +Validators with parameters + +```go +"range(min|max)": Range, +"length(min|max)": ByteLength, +"runelength(min|max)": RuneLength, +"stringlength(min|max)": StringLength, +"matches(pattern)": StringMatches, +"in(string1|string2|...|stringN)": IsIn, +"rsapub(keylength)" : IsRsaPub, +"minstringlength(int): MinStringLength, +"maxstringlength(int): MaxStringLength, +``` +Validators with parameters for any type + +```go +"type(type)": IsType, +``` + +And here is small example of usage: +```go +type Post struct { + Title string `valid:"alphanum,required"` + Message string `valid:"duck,ascii"` + Message2 string `valid:"animal(dog)"` + AuthorIP string `valid:"ipv4"` + Date string `valid:"-"` +} +post := &Post{ + Title: "My Example Post", + Message: "duck", + Message2: "dog", + AuthorIP: "123.234.54.3", +} + +// Add your own struct validation tags +govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { + return str == "duck" +}) + +// Add your own struct validation tags with parameter +govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool { + species := params[0] + return str == species +}) +govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$") + +result, err := govalidator.ValidateStruct(post) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` +###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338) +If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}` + +So here is small example of usage: +```go +var mapTemplate = map[string]interface{}{ + "name":"required,alpha", + "family":"required,alpha", + "email":"required,email", + "cell-phone":"numeric", + "address":map[string]interface{}{ + "line1":"required,alphanum", + "line2":"alphanum", + "postal-code":"numeric", + }, +} + +var inputMap = map[string]interface{}{ + "name":"Bob", + "family":"Smith", + "email":"foo@bar.baz", + "address":map[string]interface{}{ + "line1":"", + "line2":"", + "postal-code":"", + }, +} + +result, err := govalidator.ValidateMap(inputMap, mapTemplate) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` + +###### WhiteList +```go +// Remove all characters from string ignoring characters between "a" and "z" +println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa") +``` + +###### Custom validation functions +Custom validation using your own domain specific validators is also available - here's an example of how to use it: +```go +import "github.com/asaskevich/govalidator" + +type CustomByteArray [6]byte // custom types are supported and can be validated + +type StructWithCustomByteArray struct { + ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence + Email string `valid:"email"` + CustomMinLength int `valid:"-"` +} + +govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool { + switch v := context.(type) { // you can type switch on the context interface being validated + case StructWithCustomByteArray: + // you can check and validate against some other field in the context, + // return early or not validate against the context at all – your choice + case SomeOtherType: + // ... + default: + // expecting some other type? Throw/panic here or continue + } + + switch v := i.(type) { // type switch on the struct field being validated + case CustomByteArray: + for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes + if e != 0 { + return true + } + } + } + return false +}) +govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool { + switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation + case StructWithCustomByteArray: + return len(v.ID) >= v.CustomMinLength + } + return false +}) +``` + +###### Loop over Error() +By default .Error() returns all errors in a single String. To access each error you can do this: +```go + if err != nil { + errs := err.(govalidator.Errors).Errors() + for _, e := range errs { + fmt.Println(e.Error()) + } + } +``` + +###### Custom error messages +Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it: +```go +type Ticket struct { + Id int64 `json:"id"` + FirstName string `json:"firstname" valid:"required~First name is blank"` +} +``` + +#### Notes +Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator). +Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator). + +#### Support +If you do have a contribution to the package, feel free to create a Pull Request or an Issue. + +#### What to contribute +If you don't know what to do, there are some features and functions that need to be done + +- [ ] Refactor code +- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check +- [ ] Create actual list of contributors and projects that currently using this package +- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) +- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) +- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new +- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc +- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) +- [ ] Implement fuzzing testing +- [ ] Implement some struct/map/array utilities +- [ ] Implement map/array validation +- [ ] Implement benchmarking +- [ ] Implement batch of examples +- [ ] Look at forks for new features and fixes + +#### Advice +Feel free to create what you want, but keep in mind when you implement new features: +- Code must be clear and readable, names of variables/constants clearly describes what they are doing +- Public functions must be documented and described in source file and added to README.md to the list of available functions +- There are must be unit-tests for any new functions and improvements + +## Credits +### Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + +#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors) +* [Daniel Lohse](https://github.com/annismckenzie) +* [Attila Oláh](https://github.com/attilaolah) +* [Daniel Korner](https://github.com/Dadie) +* [Steven Wilkin](https://github.com/stevenwilkin) +* [Deiwin Sarjas](https://github.com/deiwin) +* [Noah Shibley](https://github.com/slugmobile) +* [Nathan Davies](https://github.com/nathj07) +* [Matt Sanford](https://github.com/mzsanford) +* [Simon ccl1115](https://github.com/ccl1115) + + + + +### Backers + +Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)] + + + + +### Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)] + + + + + + + + + + + + + + + +## License +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) diff --git a/vendor/github.com/asaskevich/govalidator/arrays.go b/vendor/github.com/asaskevich/govalidator/arrays.go new file mode 100644 index 000000000..3e1da7cb4 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/arrays.go @@ -0,0 +1,87 @@ +package govalidator + +// Iterator is the function that accepts element of slice/array and its index +type Iterator func(interface{}, int) + +// ResultIterator is the function that accepts element of slice/array and its index and returns any result +type ResultIterator func(interface{}, int) interface{} + +// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean +type ConditionIterator func(interface{}, int) bool + +// ReduceIterator is the function that accepts two element of slice/array and returns result of merging those values +type ReduceIterator func(interface{}, interface{}) interface{} + +// Some validates that any item of array corresponds to ConditionIterator. Returns boolean. +func Some(array []interface{}, iterator ConditionIterator) bool { + res := false + for index, data := range array { + res = res || iterator(data, index) + } + return res +} + +// Every validates that every item of array corresponds to ConditionIterator. Returns boolean. +func Every(array []interface{}, iterator ConditionIterator) bool { + res := true + for index, data := range array { + res = res && iterator(data, index) + } + return res +} + +// Reduce boils down a list of values into a single value by ReduceIterator +func Reduce(array []interface{}, iterator ReduceIterator, initialValue interface{}) interface{} { + for _, data := range array { + initialValue = iterator(initialValue, data) + } + return initialValue +} + +// Each iterates over the slice and apply Iterator to every item +func Each(array []interface{}, iterator Iterator) { + for index, data := range array { + iterator(data, index) + } +} + +// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result. +func Map(array []interface{}, iterator ResultIterator) []interface{} { + var result = make([]interface{}, len(array)) + for index, data := range array { + result[index] = iterator(data, index) + } + return result +} + +// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise. +func Find(array []interface{}, iterator ConditionIterator) interface{} { + for index, data := range array { + if iterator(data, index) { + return data + } + } + return nil +} + +// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice. +func Filter(array []interface{}, iterator ConditionIterator) []interface{} { + var result = make([]interface{}, 0) + for index, data := range array { + if iterator(data, index) { + result = append(result, data) + } + } + return result +} + +// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator. +func Count(array []interface{}, iterator ConditionIterator) int { + count := 0 + for index, data := range array { + if iterator(data, index) { + count = count + 1 + } + } + return count +} diff --git a/vendor/github.com/asaskevich/govalidator/converter.go b/vendor/github.com/asaskevich/govalidator/converter.go new file mode 100644 index 000000000..d68e990fc --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/converter.go @@ -0,0 +1,81 @@ +package govalidator + +import ( + "encoding/json" + "fmt" + "reflect" + "strconv" +) + +// ToString convert the input to a string. +func ToString(obj interface{}) string { + res := fmt.Sprintf("%v", obj) + return res +} + +// ToJSON convert the input to a valid JSON string +func ToJSON(obj interface{}) (string, error) { + res, err := json.Marshal(obj) + if err != nil { + res = []byte("") + } + return string(res), err +} + +// ToFloat convert the input string to a float, or 0.0 if the input is not a float. +func ToFloat(value interface{}) (res float64, err error) { + val := reflect.ValueOf(value) + + switch value.(type) { + case int, int8, int16, int32, int64: + res = float64(val.Int()) + case uint, uint8, uint16, uint32, uint64: + res = float64(val.Uint()) + case float32, float64: + res = val.Float() + case string: + res, err = strconv.ParseFloat(val.String(), 64) + if err != nil { + res = 0 + } + default: + err = fmt.Errorf("ToInt: unknown interface type %T", value) + res = 0 + } + + return +} + +// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer. +func ToInt(value interface{}) (res int64, err error) { + val := reflect.ValueOf(value) + + switch value.(type) { + case int, int8, int16, int32, int64: + res = val.Int() + case uint, uint8, uint16, uint32, uint64: + res = int64(val.Uint()) + case float32, float64: + res = int64(val.Float()) + case string: + if IsInt(val.String()) { + res, err = strconv.ParseInt(val.String(), 0, 64) + if err != nil { + res = 0 + } + } else { + err = fmt.Errorf("ToInt: invalid numeric format %g", value) + res = 0 + } + default: + err = fmt.Errorf("ToInt: unknown interface type %T", value) + res = 0 + } + + return +} + +// ToBoolean convert the input string to a boolean. +func ToBoolean(str string) (bool, error) { + return strconv.ParseBool(str) +} diff --git a/vendor/github.com/asaskevich/govalidator/doc.go b/vendor/github.com/asaskevich/govalidator/doc.go new file mode 100644 index 000000000..55dce62dc --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/doc.go @@ -0,0 +1,3 @@ +package govalidator + +// A package of validators and sanitizers for strings, structures and collections. diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go new file mode 100644 index 000000000..1da2336f4 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/error.go @@ -0,0 +1,47 @@ +package govalidator + +import ( + "sort" + "strings" +) + +// Errors is an array of multiple errors and conforms to the error interface. +type Errors []error + +// Errors returns itself. +func (es Errors) Errors() []error { + return es +} + +func (es Errors) Error() string { + var errs []string + for _, e := range es { + errs = append(errs, e.Error()) + } + sort.Strings(errs) + return strings.Join(errs, ";") +} + +// Error encapsulates a name, an error and whether there's a custom error message or not. +type Error struct { + Name string + Err error + CustomErrorMessageExists bool + + // Validator indicates the name of the validator that failed + Validator string + Path []string +} + +func (e Error) Error() string { + if e.CustomErrorMessageExists { + return e.Err.Error() + } + + errName := e.Name + if len(e.Path) > 0 { + errName = strings.Join(append(e.Path, e.Name), ".") + } + + return errName + ": " + e.Err.Error() +} diff --git a/vendor/github.com/asaskevich/govalidator/numerics.go b/vendor/github.com/asaskevich/govalidator/numerics.go new file mode 100644 index 000000000..5041d9e86 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/numerics.go @@ -0,0 +1,100 @@ +package govalidator + +import ( + "math" +) + +// Abs returns absolute value of number +func Abs(value float64) float64 { + return math.Abs(value) +} + +// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise +func Sign(value float64) float64 { + if value > 0 { + return 1 + } else if value < 0 { + return -1 + } else { + return 0 + } +} + +// IsNegative returns true if value < 0 +func IsNegative(value float64) bool { + return value < 0 +} + +// IsPositive returns true if value > 0 +func IsPositive(value float64) bool { + return value > 0 +} + +// IsNonNegative returns true if value >= 0 +func IsNonNegative(value float64) bool { + return value >= 0 +} + +// IsNonPositive returns true if value <= 0 +func IsNonPositive(value float64) bool { + return value <= 0 +} + +// InRangeInt returns true if value lies between left and right border +func InRangeInt(value, left, right interface{}) bool { + value64, _ := ToInt(value) + left64, _ := ToInt(left) + right64, _ := ToInt(right) + if left64 > right64 { + left64, right64 = right64, left64 + } + return value64 >= left64 && value64 <= right64 +} + +// InRangeFloat32 returns true if value lies between left and right border +func InRangeFloat32(value, left, right float32) bool { + if left > right { + left, right = right, left + } + return value >= left && value <= right +} + +// InRangeFloat64 returns true if value lies between left and right border +func InRangeFloat64(value, left, right float64) bool { + if left > right { + left, right = right, left + } + return value >= left && value <= right +} + +// InRange returns true if value lies between left and right border, generic type to handle int, float32, float64 and string. +// All types must the same type. +// False if value doesn't lie in range or if it incompatible or not comparable +func InRange(value interface{}, left interface{}, right interface{}) bool { + switch value.(type) { + case int: + intValue, _ := ToInt(value) + intLeft, _ := ToInt(left) + intRight, _ := ToInt(right) + return InRangeInt(intValue, intLeft, intRight) + case float32, float64: + intValue, _ := ToFloat(value) + intLeft, _ := ToFloat(left) + intRight, _ := ToFloat(right) + return InRangeFloat64(intValue, intLeft, intRight) + case string: + return value.(string) >= left.(string) && value.(string) <= right.(string) + default: + return false + } +} + +// IsWhole returns true if value is whole number +func IsWhole(value float64) bool { + return math.Remainder(value, 1) == 0 +} + +// IsNatural returns true if value is natural number (positive and whole) +func IsNatural(value float64) bool { + return IsWhole(value) && IsPositive(value) +} diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go new file mode 100644 index 000000000..bafc3765e --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/patterns.go @@ -0,0 +1,113 @@ +package govalidator + +import "regexp" + +// Basic regular expressions for validating strings +const ( + Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" + CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" + ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" + ISBN13 string = "^(?:[0-9]{13})$" + UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" + UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" + Alpha string = "^[a-zA-Z]+$" + Alphanumeric string = "^[a-zA-Z0-9]+$" + Numeric string = "^[0-9]+$" + Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" + Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" + Hexadecimal string = "^[0-9a-fA-F]+$" + Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" + ASCII string = "^[\x00-\x7F]+$" + Multibyte string = "[^\x00-\x7F]" + FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" + HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" + Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" + PrintableASCII string = "^[\x20-\x7E]+$" + DataURI string = "^data:.+\\/(.+);base64$" + MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$" + Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" + Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" + DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` + IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` + URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` + URLUsername string = `(\S+(:\S*)?@)` + URLPath string = `((\/|\?|#)[^\s]*)` + URLPort string = `(:(\d{1,5}))` + URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` + URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` + URL = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` + SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` + WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` + UnixPath string = `^(/[^/\x00]*)+/?$` + WinARPath string = `^(?:(?:[a-zA-Z]:|\\\\[a-z0-9_.$●-]+\\[a-z0-9_.$●-]+)\\|\\?[^\\/:*?"<>|\r\n]+\\?)(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` + UnixARPath string = `^((\.{0,2}/)?([^/\x00]*))+/?$` + Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" + tagName string = "valid" + hasLowerCase string = ".*[[:lower:]]" + hasUpperCase string = ".*[[:upper:]]" + hasWhitespace string = ".*[[:space:]]" + hasWhitespaceOnly string = "^[[:space:]]+$" + IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$" + IMSI string = "^\\d{14,15}$" + E164 string = `^\+?[1-9]\d{1,14}$` +) + +// Used by IsFilePath func +const ( + // Unknown is unresolved OS type + Unknown = iota + // Win is Windows type + Win + // Unix is *nix OS types + Unix +) + +var ( + userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") + hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") + userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") + rxEmail = regexp.MustCompile(Email) + rxCreditCard = regexp.MustCompile(CreditCard) + rxISBN10 = regexp.MustCompile(ISBN10) + rxISBN13 = regexp.MustCompile(ISBN13) + rxUUID3 = regexp.MustCompile(UUID3) + rxUUID4 = regexp.MustCompile(UUID4) + rxUUID5 = regexp.MustCompile(UUID5) + rxUUID = regexp.MustCompile(UUID) + rxAlpha = regexp.MustCompile(Alpha) + rxAlphanumeric = regexp.MustCompile(Alphanumeric) + rxNumeric = regexp.MustCompile(Numeric) + rxInt = regexp.MustCompile(Int) + rxFloat = regexp.MustCompile(Float) + rxHexadecimal = regexp.MustCompile(Hexadecimal) + rxHexcolor = regexp.MustCompile(Hexcolor) + rxRGBcolor = regexp.MustCompile(RGBcolor) + rxASCII = regexp.MustCompile(ASCII) + rxPrintableASCII = regexp.MustCompile(PrintableASCII) + rxMultibyte = regexp.MustCompile(Multibyte) + rxFullWidth = regexp.MustCompile(FullWidth) + rxHalfWidth = regexp.MustCompile(HalfWidth) + rxBase64 = regexp.MustCompile(Base64) + rxDataURI = regexp.MustCompile(DataURI) + rxMagnetURI = regexp.MustCompile(MagnetURI) + rxLatitude = regexp.MustCompile(Latitude) + rxLongitude = regexp.MustCompile(Longitude) + rxDNSName = regexp.MustCompile(DNSName) + rxURL = regexp.MustCompile(URL) + rxSSN = regexp.MustCompile(SSN) + rxWinPath = regexp.MustCompile(WinPath) + rxUnixPath = regexp.MustCompile(UnixPath) + rxARWinPath = regexp.MustCompile(WinARPath) + rxARUnixPath = regexp.MustCompile(UnixARPath) + rxSemver = regexp.MustCompile(Semver) + rxHasLowerCase = regexp.MustCompile(hasLowerCase) + rxHasUpperCase = regexp.MustCompile(hasUpperCase) + rxHasWhitespace = regexp.MustCompile(hasWhitespace) + rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) + rxIMEI = regexp.MustCompile(IMEI) + rxIMSI = regexp.MustCompile(IMSI) + rxE164 = regexp.MustCompile(E164) +) diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go new file mode 100644 index 000000000..c573abb51 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/types.go @@ -0,0 +1,656 @@ +package govalidator + +import ( + "reflect" + "regexp" + "sort" + "sync" +) + +// Validator is a wrapper for a validator function that returns bool and accepts string. +type Validator func(str string) bool + +// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type. +// The second parameter should be the context (in the case of validating a struct: the whole object being validated). +type CustomTypeValidator func(i interface{}, o interface{}) bool + +// ParamValidator is a wrapper for validator functions that accept additional parameters. +type ParamValidator func(str string, params ...string) bool + +// InterfaceParamValidator is a wrapper for functions that accept variants parameters for an interface value +type InterfaceParamValidator func(in interface{}, params ...string) bool +type tagOptionsMap map[string]tagOption + +func (t tagOptionsMap) orderedKeys() []string { + var keys []string + for k := range t { + keys = append(keys, k) + } + + sort.Slice(keys, func(a, b int) bool { + return t[keys[a]].order < t[keys[b]].order + }) + + return keys +} + +type tagOption struct { + name string + customErrorMessage string + order int +} + +// UnsupportedTypeError is a wrapper for reflect.Type +type UnsupportedTypeError struct { + Type reflect.Type +} + +// stringValues is a slice of reflect.Value holding *reflect.StringValue. +// It implements the methods to sort by string. +type stringValues []reflect.Value + +// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value +var InterfaceParamTagMap = map[string]InterfaceParamValidator{ + "type": IsType, +} + +// InterfaceParamTagRegexMap maps interface param tags to their respective regexes. +var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{ + "type": regexp.MustCompile(`^type\((.*)\)$`), +} + +// ParamTagMap is a map of functions accept variants parameters +var ParamTagMap = map[string]ParamValidator{ + "length": ByteLength, + "range": Range, + "runelength": RuneLength, + "stringlength": StringLength, + "matches": StringMatches, + "in": IsInRaw, + "rsapub": IsRsaPub, + "minstringlength": MinStringLength, + "maxstringlength": MaxStringLength, +} + +// ParamTagRegexMap maps param tags to their respective regexes. +var ParamTagRegexMap = map[string]*regexp.Regexp{ + "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"), + "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"), + "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"), + "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"), + "in": regexp.MustCompile(`^in\((.*)\)`), + "matches": regexp.MustCompile(`^matches\((.+)\)$`), + "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"), + "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"), + "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"), +} + +type customTypeTagMap struct { + validators map[string]CustomTypeValidator + + sync.RWMutex +} + +func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) { + tm.RLock() + defer tm.RUnlock() + v, ok := tm.validators[name] + return v, ok +} + +func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) { + tm.Lock() + defer tm.Unlock() + tm.validators[name] = ctv +} + +// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function. +// Use this to validate compound or custom types that need to be handled as a whole, e.g. +// `type UUID [16]byte` (this would be handled as an array of bytes). +var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)} + +// TagMap is a map of functions, that can be used as tags for ValidateStruct function. +var TagMap = map[string]Validator{ + "email": IsEmail, + "url": IsURL, + "dialstring": IsDialString, + "requrl": IsRequestURL, + "requri": IsRequestURI, + "alpha": IsAlpha, + "utfletter": IsUTFLetter, + "alphanum": IsAlphanumeric, + "utfletternum": IsUTFLetterNumeric, + "numeric": IsNumeric, + "utfnumeric": IsUTFNumeric, + "utfdigit": IsUTFDigit, + "hexadecimal": IsHexadecimal, + "hexcolor": IsHexcolor, + "rgbcolor": IsRGBcolor, + "lowercase": IsLowerCase, + "uppercase": IsUpperCase, + "int": IsInt, + "float": IsFloat, + "null": IsNull, + "notnull": IsNotNull, + "uuid": IsUUID, + "uuidv3": IsUUIDv3, + "uuidv4": IsUUIDv4, + "uuidv5": IsUUIDv5, + "creditcard": IsCreditCard, + "isbn10": IsISBN10, + "isbn13": IsISBN13, + "json": IsJSON, + "multibyte": IsMultibyte, + "ascii": IsASCII, + "printableascii": IsPrintableASCII, + "fullwidth": IsFullWidth, + "halfwidth": IsHalfWidth, + "variablewidth": IsVariableWidth, + "base64": IsBase64, + "datauri": IsDataURI, + "ip": IsIP, + "port": IsPort, + "ipv4": IsIPv4, + "ipv6": IsIPv6, + "dns": IsDNSName, + "host": IsHost, + "mac": IsMAC, + "latitude": IsLatitude, + "longitude": IsLongitude, + "ssn": IsSSN, + "semver": IsSemver, + "rfc3339": IsRFC3339, + "rfc3339WithoutZone": IsRFC3339WithoutZone, + "ISO3166Alpha2": IsISO3166Alpha2, + "ISO3166Alpha3": IsISO3166Alpha3, + "ISO4217": IsISO4217, + "IMEI": IsIMEI, + "ulid": IsULID, +} + +// ISO3166Entry stores country codes +type ISO3166Entry struct { + EnglishShortName string + FrenchShortName string + Alpha2Code string + Alpha3Code string + Numeric string +} + +//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" +var ISO3166List = []ISO3166Entry{ + {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"}, + {"Albania", "Albanie (l')", "AL", "ALB", "008"}, + {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"}, + {"Algeria", "Algérie (l')", "DZ", "DZA", "012"}, + {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"}, + {"Andorra", "Andorre (l')", "AD", "AND", "020"}, + {"Angola", "Angola (l')", "AO", "AGO", "024"}, + {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"}, + {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"}, + {"Argentina", "Argentine (l')", "AR", "ARG", "032"}, + {"Australia", "Australie (l')", "AU", "AUS", "036"}, + {"Austria", "Autriche (l')", "AT", "AUT", "040"}, + {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"}, + {"Bahrain", "Bahreïn", "BH", "BHR", "048"}, + {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"}, + {"Armenia", "Arménie (l')", "AM", "ARM", "051"}, + {"Barbados", "Barbade (la)", "BB", "BRB", "052"}, + {"Belgium", "Belgique (la)", "BE", "BEL", "056"}, + {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"}, + {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"}, + {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"}, + {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"}, + {"Botswana", "Botswana (le)", "BW", "BWA", "072"}, + {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"}, + {"Brazil", "Brésil (le)", "BR", "BRA", "076"}, + {"Belize", "Belize (le)", "BZ", "BLZ", "084"}, + {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"}, + {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"}, + {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"}, + {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"}, + {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"}, + {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"}, + {"Burundi", "Burundi (le)", "BI", "BDI", "108"}, + {"Belarus", "Bélarus (le)", "BY", "BLR", "112"}, + {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"}, + {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"}, + {"Canada", "Canada (le)", "CA", "CAN", "124"}, + {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"}, + {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"}, + {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"}, + {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"}, + {"Chad", "Tchad (le)", "TD", "TCD", "148"}, + {"Chile", "Chili (le)", "CL", "CHL", "152"}, + {"China", "Chine (la)", "CN", "CHN", "156"}, + {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"}, + {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"}, + {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"}, + {"Colombia", "Colombie (la)", "CO", "COL", "170"}, + {"Comoros (the)", "Comores (les)", "KM", "COM", "174"}, + {"Mayotte", "Mayotte", "YT", "MYT", "175"}, + {"Congo (the)", "Congo (le)", "CG", "COG", "178"}, + {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"}, + {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"}, + {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"}, + {"Croatia", "Croatie (la)", "HR", "HRV", "191"}, + {"Cuba", "Cuba", "CU", "CUB", "192"}, + {"Cyprus", "Chypre", "CY", "CYP", "196"}, + {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"}, + {"Benin", "Bénin (le)", "BJ", "BEN", "204"}, + {"Denmark", "Danemark (le)", "DK", "DNK", "208"}, + {"Dominica", "Dominique (la)", "DM", "DMA", "212"}, + {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"}, + {"Ecuador", "Équateur (l')", "EC", "ECU", "218"}, + {"El Salvador", "El Salvador", "SV", "SLV", "222"}, + {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"}, + {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"}, + {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"}, + {"Estonia", "Estonie (l')", "EE", "EST", "233"}, + {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"}, + {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"}, + {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"}, + {"Fiji", "Fidji (les)", "FJ", "FJI", "242"}, + {"Finland", "Finlande (la)", "FI", "FIN", "246"}, + {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"}, + {"France", "France (la)", "FR", "FRA", "250"}, + {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"}, + {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"}, + {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"}, + {"Djibouti", "Djibouti", "DJ", "DJI", "262"}, + {"Gabon", "Gabon (le)", "GA", "GAB", "266"}, + {"Georgia", "Géorgie (la)", "GE", "GEO", "268"}, + {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"}, + {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"}, + {"Germany", "Allemagne (l')", "DE", "DEU", "276"}, + {"Ghana", "Ghana (le)", "GH", "GHA", "288"}, + {"Gibraltar", "Gibraltar", "GI", "GIB", "292"}, + {"Kiribati", "Kiribati", "KI", "KIR", "296"}, + {"Greece", "Grèce (la)", "GR", "GRC", "300"}, + {"Greenland", "Groenland (le)", "GL", "GRL", "304"}, + {"Grenada", "Grenade (la)", "GD", "GRD", "308"}, + {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"}, + {"Guam", "Guam", "GU", "GUM", "316"}, + {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"}, + {"Guinea", "Guinée (la)", "GN", "GIN", "324"}, + {"Guyana", "Guyana (le)", "GY", "GUY", "328"}, + {"Haiti", "Haïti", "HT", "HTI", "332"}, + {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"}, + {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"}, + {"Honduras", "Honduras (le)", "HN", "HND", "340"}, + {"Hong Kong", "Hong Kong", "HK", "HKG", "344"}, + {"Hungary", "Hongrie (la)", "HU", "HUN", "348"}, + {"Iceland", "Islande (l')", "IS", "ISL", "352"}, + {"India", "Inde (l')", "IN", "IND", "356"}, + {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"}, + {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"}, + {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"}, + {"Ireland", "Irlande (l')", "IE", "IRL", "372"}, + {"Israel", "Israël", "IL", "ISR", "376"}, + {"Italy", "Italie (l')", "IT", "ITA", "380"}, + {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"}, + {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"}, + {"Japan", "Japon (le)", "JP", "JPN", "392"}, + {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"}, + {"Jordan", "Jordanie (la)", "JO", "JOR", "400"}, + {"Kenya", "Kenya (le)", "KE", "KEN", "404"}, + {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"}, + {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"}, + {"Kuwait", "Koweït (le)", "KW", "KWT", "414"}, + {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"}, + {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"}, + {"Lebanon", "Liban (le)", "LB", "LBN", "422"}, + {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"}, + {"Latvia", "Lettonie (la)", "LV", "LVA", "428"}, + {"Liberia", "Libéria (le)", "LR", "LBR", "430"}, + {"Libya", "Libye (la)", "LY", "LBY", "434"}, + {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"}, + {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"}, + {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"}, + {"Macao", "Macao", "MO", "MAC", "446"}, + {"Madagascar", "Madagascar", "MG", "MDG", "450"}, + {"Malawi", "Malawi (le)", "MW", "MWI", "454"}, + {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"}, + {"Maldives", "Maldives (les)", "MV", "MDV", "462"}, + {"Mali", "Mali (le)", "ML", "MLI", "466"}, + {"Malta", "Malte", "MT", "MLT", "470"}, + {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"}, + {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"}, + {"Mauritius", "Maurice", "MU", "MUS", "480"}, + {"Mexico", "Mexique (le)", "MX", "MEX", "484"}, + {"Monaco", "Monaco", "MC", "MCO", "492"}, + {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"}, + {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"}, + {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"}, + {"Montserrat", "Montserrat", "MS", "MSR", "500"}, + {"Morocco", "Maroc (le)", "MA", "MAR", "504"}, + {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"}, + {"Oman", "Oman", "OM", "OMN", "512"}, + {"Namibia", "Namibie (la)", "NA", "NAM", "516"}, + {"Nauru", "Nauru", "NR", "NRU", "520"}, + {"Nepal", "Népal (le)", "NP", "NPL", "524"}, + {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"}, + {"Curaçao", "Curaçao", "CW", "CUW", "531"}, + {"Aruba", "Aruba", "AW", "ABW", "533"}, + {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"}, + {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"}, + {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"}, + {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"}, + {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"}, + {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"}, + {"Niger (the)", "Niger (le)", "NE", "NER", "562"}, + {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"}, + {"Niue", "Niue", "NU", "NIU", "570"}, + {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"}, + {"Norway", "Norvège (la)", "NO", "NOR", "578"}, + {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"}, + {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"}, + {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"}, + {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"}, + {"Palau", "Palaos (les)", "PW", "PLW", "585"}, + {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"}, + {"Panama", "Panama (le)", "PA", "PAN", "591"}, + {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"}, + {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"}, + {"Peru", "Pérou (le)", "PE", "PER", "604"}, + {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"}, + {"Pitcairn", "Pitcairn", "PN", "PCN", "612"}, + {"Poland", "Pologne (la)", "PL", "POL", "616"}, + {"Portugal", "Portugal (le)", "PT", "PRT", "620"}, + {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"}, + {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"}, + {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"}, + {"Qatar", "Qatar (le)", "QA", "QAT", "634"}, + {"Réunion", "Réunion (La)", "RE", "REU", "638"}, + {"Romania", "Roumanie (la)", "RO", "ROU", "642"}, + {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"}, + {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"}, + {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"}, + {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"}, + {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"}, + {"Anguilla", "Anguilla", "AI", "AIA", "660"}, + {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"}, + {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"}, + {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"}, + {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"}, + {"San Marino", "Saint-Marin", "SM", "SMR", "674"}, + {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"}, + {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"}, + {"Senegal", "Sénégal (le)", "SN", "SEN", "686"}, + {"Serbia", "Serbie (la)", "RS", "SRB", "688"}, + {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"}, + {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"}, + {"Singapore", "Singapour", "SG", "SGP", "702"}, + {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"}, + {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"}, + {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"}, + {"Somalia", "Somalie (la)", "SO", "SOM", "706"}, + {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"}, + {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"}, + {"Spain", "Espagne (l')", "ES", "ESP", "724"}, + {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"}, + {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"}, + {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"}, + {"Suriname", "Suriname (le)", "SR", "SUR", "740"}, + {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"}, + {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"}, + {"Sweden", "Suède (la)", "SE", "SWE", "752"}, + {"Switzerland", "Suisse (la)", "CH", "CHE", "756"}, + {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"}, + {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"}, + {"Thailand", "Thaïlande (la)", "TH", "THA", "764"}, + {"Togo", "Togo (le)", "TG", "TGO", "768"}, + {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"}, + {"Tonga", "Tonga (les)", "TO", "TON", "776"}, + {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"}, + {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"}, + {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"}, + {"Turkey", "Turquie (la)", "TR", "TUR", "792"}, + {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"}, + {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"}, + {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"}, + {"Uganda", "Ouganda (l')", "UG", "UGA", "800"}, + {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"}, + {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"}, + {"Egypt", "Égypte (l')", "EG", "EGY", "818"}, + {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"}, + {"Guernsey", "Guernesey", "GG", "GGY", "831"}, + {"Jersey", "Jersey", "JE", "JEY", "832"}, + {"Isle of Man", "Île de Man", "IM", "IMN", "833"}, + {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"}, + {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"}, + {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"}, + {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"}, + {"Uruguay", "Uruguay (l')", "UY", "URY", "858"}, + {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"}, + {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"}, + {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"}, + {"Samoa", "Samoa (le)", "WS", "WSM", "882"}, + {"Yemen", "Yémen (le)", "YE", "YEM", "887"}, + {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"}, +} + +// ISO4217List is the list of ISO currency codes +var ISO4217List = []string{ + "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", + "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", + "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", + "DJF", "DKK", "DOP", "DZD", + "EGP", "ERN", "ETB", "EUR", + "FJD", "FKP", + "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", + "HKD", "HNL", "HRK", "HTG", "HUF", + "IDR", "ILS", "INR", "IQD", "IRR", "ISK", + "JMD", "JOD", "JPY", + "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", + "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", + "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", + "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", + "OMR", + "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", + "QAR", + "RON", "RSD", "RUB", "RWF", + "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "STN", "SVC", "SYP", "SZL", + "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", + "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", + "VEF", "VES", "VND", "VUV", + "WST", + "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", + "YER", + "ZAR", "ZMW", "ZWL", +} + +// ISO693Entry stores ISO language codes +type ISO693Entry struct { + Alpha3bCode string + Alpha2Code string + English string +} + +//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json +var ISO693List = []ISO693Entry{ + {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"}, + {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"}, + {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"}, + {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"}, + {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"}, + {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"}, + {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"}, + {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"}, + {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"}, + {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"}, + {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"}, + {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"}, + {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"}, + {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"}, + {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"}, + {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"}, + {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"}, + {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"}, + {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"}, + {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"}, + {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"}, + {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"}, + {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"}, + {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"}, + {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"}, + {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"}, + {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"}, + {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"}, + {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"}, + {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"}, + {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"}, + {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"}, + {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"}, + {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"}, + {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"}, + {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"}, + {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"}, + {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"}, + {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"}, + {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"}, + {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"}, + {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"}, + {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"}, + {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"}, + {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"}, + {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"}, + {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"}, + {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"}, + {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"}, + {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"}, + {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"}, + {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"}, + {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"}, + {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"}, + {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"}, + {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"}, + {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"}, + {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"}, + {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"}, + {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"}, + {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"}, + {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"}, + {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"}, + {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"}, + {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"}, + {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"}, + {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"}, + {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"}, + {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"}, + {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"}, + {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"}, + {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"}, + {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"}, + {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"}, + {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"}, + {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"}, + {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"}, + {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"}, + {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"}, + {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"}, + {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"}, + {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"}, + {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"}, + {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"}, + {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"}, + {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"}, + {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"}, + {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"}, + {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"}, + {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"}, + {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"}, + {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"}, + {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"}, + {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"}, + {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"}, + {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"}, + {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"}, + {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"}, + {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"}, + {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"}, + {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"}, + {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"}, + {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"}, + {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"}, + {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"}, + {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"}, + {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"}, + {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"}, + {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"}, + {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"}, + {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"}, + {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"}, + {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"}, + {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"}, + {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"}, + {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"}, + {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"}, + {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"}, + {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"}, + {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"}, + {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"}, + {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"}, + {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"}, + {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"}, + {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"}, + {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"}, + {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"}, + {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"}, + {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"}, + {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"}, + {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"}, + {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"}, + {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"}, + {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"}, + {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"}, + {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"}, + {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"}, + {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"}, + {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"}, + {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"}, + {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"}, + {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"}, + {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"}, + {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"}, + {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"}, + {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"}, + {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"}, + {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"}, + {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"}, + {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"}, + {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"}, + {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"}, + {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"}, + {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"}, + {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"}, + {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"}, + {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"}, + {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"}, + {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"}, + {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"}, + {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"}, + {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"}, + {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"}, + {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"}, + {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"}, + {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"}, + {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"}, + {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"}, + {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"}, + {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"}, + {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"}, + {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"}, + {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"}, + {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"}, + {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"}, + {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"}, + {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"}, + {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"}, + {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"}, + {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"}, + {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"}, + {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"}, + {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"}, + {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"}, +} diff --git a/vendor/github.com/asaskevich/govalidator/utils.go b/vendor/github.com/asaskevich/govalidator/utils.go new file mode 100644 index 000000000..f4c30f824 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/utils.go @@ -0,0 +1,270 @@ +package govalidator + +import ( + "errors" + "fmt" + "html" + "math" + "path" + "regexp" + "strings" + "unicode" + "unicode/utf8" +) + +// Contains checks if the string contains the substring. +func Contains(str, substring string) bool { + return strings.Contains(str, substring) +} + +// Matches checks if string matches the pattern (pattern is regular expression) +// In case of error return false +func Matches(str, pattern string) bool { + match, _ := regexp.MatchString(pattern, str) + return match +} + +// LeftTrim trims characters from the left side of the input. +// If second argument is empty, it will remove leading spaces. +func LeftTrim(str, chars string) string { + if chars == "" { + return strings.TrimLeftFunc(str, unicode.IsSpace) + } + r, _ := regexp.Compile("^[" + chars + "]+") + return r.ReplaceAllString(str, "") +} + +// RightTrim trims characters from the right side of the input. +// If second argument is empty, it will remove trailing spaces. +func RightTrim(str, chars string) string { + if chars == "" { + return strings.TrimRightFunc(str, unicode.IsSpace) + } + r, _ := regexp.Compile("[" + chars + "]+$") + return r.ReplaceAllString(str, "") +} + +// Trim trims characters from both sides of the input. +// If second argument is empty, it will remove spaces. +func Trim(str, chars string) string { + return LeftTrim(RightTrim(str, chars), chars) +} + +// WhiteList removes characters that do not appear in the whitelist. +func WhiteList(str, chars string) string { + pattern := "[^" + chars + "]+" + r, _ := regexp.Compile(pattern) + return r.ReplaceAllString(str, "") +} + +// BlackList removes characters that appear in the blacklist. +func BlackList(str, chars string) string { + pattern := "[" + chars + "]+" + r, _ := regexp.Compile(pattern) + return r.ReplaceAllString(str, "") +} + +// StripLow removes characters with a numerical value < 32 and 127, mostly control characters. +// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD). +func StripLow(str string, keepNewLines bool) string { + chars := "" + if keepNewLines { + chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F" + } else { + chars = "\x00-\x1F\x7F" + } + return BlackList(str, chars) +} + +// ReplacePattern replaces regular expression pattern in string +func ReplacePattern(str, pattern, replace string) string { + r, _ := regexp.Compile(pattern) + return r.ReplaceAllString(str, replace) +} + +// Escape replaces <, >, & and " with HTML entities. +var Escape = html.EscapeString + +func addSegment(inrune, segment []rune) []rune { + if len(segment) == 0 { + return inrune + } + if len(inrune) != 0 { + inrune = append(inrune, '_') + } + inrune = append(inrune, segment...) + return inrune +} + +// UnderscoreToCamelCase converts from underscore separated form to camel case form. +// Ex.: my_func => MyFunc +func UnderscoreToCamelCase(s string) string { + return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1) +} + +// CamelCaseToUnderscore converts from camel case form to underscore separated form. +// Ex.: MyFunc => my_func +func CamelCaseToUnderscore(str string) string { + var output []rune + var segment []rune + for _, r := range str { + + // not treat number as separate segment + if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) { + output = addSegment(output, segment) + segment = nil + } + segment = append(segment, unicode.ToLower(r)) + } + output = addSegment(output, segment) + return string(output) +} + +// Reverse returns reversed string +func Reverse(s string) string { + r := []rune(s) + for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { + r[i], r[j] = r[j], r[i] + } + return string(r) +} + +// GetLines splits string by "\n" and return array of lines +func GetLines(s string) []string { + return strings.Split(s, "\n") +} + +// GetLine returns specified line of multiline string +func GetLine(s string, index int) (string, error) { + lines := GetLines(s) + if index < 0 || index >= len(lines) { + return "", errors.New("line index out of bounds") + } + return lines[index], nil +} + +// RemoveTags removes all tags from HTML string +func RemoveTags(s string) string { + return ReplacePattern(s, "<[^>]*>", "") +} + +// SafeFileName returns safe string that can be used in file names +func SafeFileName(str string) string { + name := strings.ToLower(str) + name = path.Clean(path.Base(name)) + name = strings.Trim(name, " ") + separators, err := regexp.Compile(`[ &_=+:]`) + if err == nil { + name = separators.ReplaceAllString(name, "-") + } + legal, err := regexp.Compile(`[^[:alnum:]-.]`) + if err == nil { + name = legal.ReplaceAllString(name, "") + } + for strings.Contains(name, "--") { + name = strings.Replace(name, "--", "-", -1) + } + return name +} + +// NormalizeEmail canonicalize an email address. +// The local part of the email address is lowercased for all domains; the hostname is always lowercased and +// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). +// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and +// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are +// normalized to @gmail.com. +func NormalizeEmail(str string) (string, error) { + if !IsEmail(str) { + return "", fmt.Errorf("%s is not an email", str) + } + parts := strings.Split(str, "@") + parts[0] = strings.ToLower(parts[0]) + parts[1] = strings.ToLower(parts[1]) + if parts[1] == "gmail.com" || parts[1] == "googlemail.com" { + parts[1] = "gmail.com" + parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0] + } + return strings.Join(parts, "@"), nil +} + +// Truncate a string to the closest length without breaking words. +func Truncate(str string, length int, ending string) string { + var aftstr, befstr string + if len(str) > length { + words := strings.Fields(str) + before, present := 0, 0 + for i := range words { + befstr = aftstr + before = present + aftstr = aftstr + words[i] + " " + present = len(aftstr) + if present > length && i != 0 { + if (length - before) < (present - length) { + return Trim(befstr, " /\\.,\"'#!?&@+-") + ending + } + return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending + } + } + } + + return str +} + +// PadLeft pads left side of a string if size of string is less then indicated pad length +func PadLeft(str string, padStr string, padLen int) string { + return buildPadStr(str, padStr, padLen, true, false) +} + +// PadRight pads right side of a string if size of string is less then indicated pad length +func PadRight(str string, padStr string, padLen int) string { + return buildPadStr(str, padStr, padLen, false, true) +} + +// PadBoth pads both sides of a string if size of string is less then indicated pad length +func PadBoth(str string, padStr string, padLen int) string { + return buildPadStr(str, padStr, padLen, true, true) +} + +// PadString either left, right or both sides. +// Note that padding string can be unicode and more then one character +func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string { + + // When padded length is less then the current string size + if padLen < utf8.RuneCountInString(str) { + return str + } + + padLen -= utf8.RuneCountInString(str) + + targetLen := padLen + + targetLenLeft := targetLen + targetLenRight := targetLen + if padLeft && padRight { + targetLenLeft = padLen / 2 + targetLenRight = padLen - targetLenLeft + } + + strToRepeatLen := utf8.RuneCountInString(padStr) + + repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen))) + repeatedString := strings.Repeat(padStr, repeatTimes) + + leftSide := "" + if padLeft { + leftSide = repeatedString[0:targetLenLeft] + } + + rightSide := "" + if padRight { + rightSide = repeatedString[0:targetLenRight] + } + + return leftSide + str + rightSide +} + +// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object +func TruncatingErrorf(str string, args ...interface{}) error { + n := strings.Count(str, "%s") + return fmt.Errorf(str, args[:n]...) +} diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go new file mode 100644 index 000000000..c9c4fac06 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/validator.go @@ -0,0 +1,1768 @@ +// Package govalidator is package of validators and sanitizers for strings, structs and collections. +package govalidator + +import ( + "bytes" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/json" + "encoding/pem" + "fmt" + "io/ioutil" + "net" + "net/url" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" + "unicode" + "unicode/utf8" +) + +var ( + fieldsRequiredByDefault bool + nilPtrAllowedByRequired = false + notNumberRegexp = regexp.MustCompile("[^0-9]+") + whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`) + paramsRegexp = regexp.MustCompile(`\(.*\)$`) +) + +const maxURLRuneCount = 2083 +const minURLRuneCount = 3 +const rfc3339WithoutZone = "2006-01-02T15:04:05" + +// SetFieldsRequiredByDefault causes validation to fail when struct fields +// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). +// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): +// type exampleStruct struct { +// Name string `` +// Email string `valid:"email"` +// This, however, will only fail when Email is empty or an invalid email address: +// type exampleStruct2 struct { +// Name string `valid:"-"` +// Email string `valid:"email"` +// Lastly, this will only fail when Email is an invalid email address but not when it's empty: +// type exampleStruct2 struct { +// Name string `valid:"-"` +// Email string `valid:"email,optional"` +func SetFieldsRequiredByDefault(value bool) { + fieldsRequiredByDefault = value +} + +// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required. +// The validation will still reject ptr fields in their zero value state. Example with this enabled: +// type exampleStruct struct { +// Name *string `valid:"required"` +// With `Name` set to "", this will be considered invalid input and will cause a validation error. +// With `Name` set to nil, this will be considered valid by validation. +// By default this is disabled. +func SetNilPtrAllowedByRequired(value bool) { + nilPtrAllowedByRequired = value +} + +// IsEmail checks if the string is an email. +func IsEmail(str string) bool { + // TODO uppercase letters are not supported + return rxEmail.MatchString(str) +} + +// IsExistingEmail checks if the string is an email of existing domain +func IsExistingEmail(email string) bool { + + if len(email) < 6 || len(email) > 254 { + return false + } + at := strings.LastIndex(email, "@") + if at <= 0 || at > len(email)-3 { + return false + } + user := email[:at] + host := email[at+1:] + if len(user) > 64 { + return false + } + switch host { + case "localhost", "example.com": + return true + } + if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) { + return false + } + if _, err := net.LookupMX(host); err != nil { + if _, err := net.LookupIP(host); err != nil { + return false + } + } + + return true +} + +// IsURL checks if the string is an URL. +func IsURL(str string) bool { + if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") { + return false + } + strTemp := str + if strings.Contains(str, ":") && !strings.Contains(str, "://") { + // support no indicated urlscheme but with colon for port number + // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString + strTemp = "http://" + str + } + u, err := url.Parse(strTemp) + if err != nil { + return false + } + if strings.HasPrefix(u.Host, ".") { + return false + } + if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) { + return false + } + return rxURL.MatchString(str) +} + +// IsRequestURL checks if the string rawurl, assuming +// it was received in an HTTP request, is a valid +// URL confirm to RFC 3986 +func IsRequestURL(rawurl string) bool { + url, err := url.ParseRequestURI(rawurl) + if err != nil { + return false //Couldn't even parse the rawurl + } + if len(url.Scheme) == 0 { + return false //No Scheme found + } + return true +} + +// IsRequestURI checks if the string rawurl, assuming +// it was received in an HTTP request, is an +// absolute URI or an absolute path. +func IsRequestURI(rawurl string) bool { + _, err := url.ParseRequestURI(rawurl) + return err == nil +} + +// IsAlpha checks if the string contains only letters (a-zA-Z). Empty string is valid. +func IsAlpha(str string) bool { + if IsNull(str) { + return true + } + return rxAlpha.MatchString(str) +} + +//IsUTFLetter checks if the string contains only unicode letter characters. +//Similar to IsAlpha but for all languages. Empty string is valid. +func IsUTFLetter(str string) bool { + if IsNull(str) { + return true + } + + for _, c := range str { + if !unicode.IsLetter(c) { + return false + } + } + return true + +} + +// IsAlphanumeric checks if the string contains only letters and numbers. Empty string is valid. +func IsAlphanumeric(str string) bool { + if IsNull(str) { + return true + } + return rxAlphanumeric.MatchString(str) +} + +// IsUTFLetterNumeric checks if the string contains only unicode letters and numbers. Empty string is valid. +func IsUTFLetterNumeric(str string) bool { + if IsNull(str) { + return true + } + for _, c := range str { + if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok + return false + } + } + return true + +} + +// IsNumeric checks if the string contains only numbers. Empty string is valid. +func IsNumeric(str string) bool { + if IsNull(str) { + return true + } + return rxNumeric.MatchString(str) +} + +// IsUTFNumeric checks if the string contains only unicode numbers of any kind. +// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid. +func IsUTFNumeric(str string) bool { + if IsNull(str) { + return true + } + if strings.IndexAny(str, "+-") > 0 { + return false + } + if len(str) > 1 { + str = strings.TrimPrefix(str, "-") + str = strings.TrimPrefix(str, "+") + } + for _, c := range str { + if !unicode.IsNumber(c) { //numbers && minus sign are ok + return false + } + } + return true + +} + +// IsUTFDigit checks if the string contains only unicode radix-10 decimal digits. Empty string is valid. +func IsUTFDigit(str string) bool { + if IsNull(str) { + return true + } + if strings.IndexAny(str, "+-") > 0 { + return false + } + if len(str) > 1 { + str = strings.TrimPrefix(str, "-") + str = strings.TrimPrefix(str, "+") + } + for _, c := range str { + if !unicode.IsDigit(c) { //digits && minus sign are ok + return false + } + } + return true + +} + +// IsHexadecimal checks if the string is a hexadecimal number. +func IsHexadecimal(str string) bool { + return rxHexadecimal.MatchString(str) +} + +// IsHexcolor checks if the string is a hexadecimal color. +func IsHexcolor(str string) bool { + return rxHexcolor.MatchString(str) +} + +// IsRGBcolor checks if the string is a valid RGB color in form rgb(RRR, GGG, BBB). +func IsRGBcolor(str string) bool { + return rxRGBcolor.MatchString(str) +} + +// IsLowerCase checks if the string is lowercase. Empty string is valid. +func IsLowerCase(str string) bool { + if IsNull(str) { + return true + } + return str == strings.ToLower(str) +} + +// IsUpperCase checks if the string is uppercase. Empty string is valid. +func IsUpperCase(str string) bool { + if IsNull(str) { + return true + } + return str == strings.ToUpper(str) +} + +// HasLowerCase checks if the string contains at least 1 lowercase. Empty string is valid. +func HasLowerCase(str string) bool { + if IsNull(str) { + return true + } + return rxHasLowerCase.MatchString(str) +} + +// HasUpperCase checks if the string contains as least 1 uppercase. Empty string is valid. +func HasUpperCase(str string) bool { + if IsNull(str) { + return true + } + return rxHasUpperCase.MatchString(str) +} + +// IsInt checks if the string is an integer. Empty string is valid. +func IsInt(str string) bool { + if IsNull(str) { + return true + } + return rxInt.MatchString(str) +} + +// IsFloat checks if the string is a float. +func IsFloat(str string) bool { + return str != "" && rxFloat.MatchString(str) +} + +// IsDivisibleBy checks if the string is a number that's divisible by another. +// If second argument is not valid integer or zero, it's return false. +// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero). +func IsDivisibleBy(str, num string) bool { + f, _ := ToFloat(str) + p := int64(f) + q, _ := ToInt(num) + if q == 0 { + return false + } + return (p == 0) || (p%q == 0) +} + +// IsNull checks if the string is null. +func IsNull(str string) bool { + return len(str) == 0 +} + +// IsNotNull checks if the string is not null. +func IsNotNull(str string) bool { + return !IsNull(str) +} + +// HasWhitespaceOnly checks the string only contains whitespace +func HasWhitespaceOnly(str string) bool { + return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) +} + +// HasWhitespace checks if the string contains any whitespace +func HasWhitespace(str string) bool { + return len(str) > 0 && rxHasWhitespace.MatchString(str) +} + +// IsByteLength checks if the string's length (in bytes) falls in a range. +func IsByteLength(str string, min, max int) bool { + return len(str) >= min && len(str) <= max +} + +// IsUUIDv3 checks if the string is a UUID version 3. +func IsUUIDv3(str string) bool { + return rxUUID3.MatchString(str) +} + +// IsUUIDv4 checks if the string is a UUID version 4. +func IsUUIDv4(str string) bool { + return rxUUID4.MatchString(str) +} + +// IsUUIDv5 checks if the string is a UUID version 5. +func IsUUIDv5(str string) bool { + return rxUUID5.MatchString(str) +} + +// IsUUID checks if the string is a UUID (version 3, 4 or 5). +func IsUUID(str string) bool { + return rxUUID.MatchString(str) +} + +// Byte to index table for O(1) lookups when unmarshaling. +// We use 0xFF as sentinel value for invalid indexes. +var ulidDec = [...]byte{ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, 0x15, 0xFF, + 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, 0x1D, 0x1E, + 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, + 0x15, 0xFF, 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +} + +// EncodedSize is the length of a text encoded ULID. +const ulidEncodedSize = 26 + +// IsULID checks if the string is a ULID. +// +// Implementation got from: +// https://github.com/oklog/ulid (Apache-2.0 License) +// +func IsULID(str string) bool { + // Check if a base32 encoded ULID is the right length. + if len(str) != ulidEncodedSize { + return false + } + + // Check if all the characters in a base32 encoded ULID are part of the + // expected base32 character set. + if ulidDec[str[0]] == 0xFF || + ulidDec[str[1]] == 0xFF || + ulidDec[str[2]] == 0xFF || + ulidDec[str[3]] == 0xFF || + ulidDec[str[4]] == 0xFF || + ulidDec[str[5]] == 0xFF || + ulidDec[str[6]] == 0xFF || + ulidDec[str[7]] == 0xFF || + ulidDec[str[8]] == 0xFF || + ulidDec[str[9]] == 0xFF || + ulidDec[str[10]] == 0xFF || + ulidDec[str[11]] == 0xFF || + ulidDec[str[12]] == 0xFF || + ulidDec[str[13]] == 0xFF || + ulidDec[str[14]] == 0xFF || + ulidDec[str[15]] == 0xFF || + ulidDec[str[16]] == 0xFF || + ulidDec[str[17]] == 0xFF || + ulidDec[str[18]] == 0xFF || + ulidDec[str[19]] == 0xFF || + ulidDec[str[20]] == 0xFF || + ulidDec[str[21]] == 0xFF || + ulidDec[str[22]] == 0xFF || + ulidDec[str[23]] == 0xFF || + ulidDec[str[24]] == 0xFF || + ulidDec[str[25]] == 0xFF { + return false + } + + // Check if the first character in a base32 encoded ULID will overflow. This + // happens because the base32 representation encodes 130 bits, while the + // ULID is only 128 bits. + // + // See https://github.com/oklog/ulid/issues/9 for details. + if str[0] > '7' { + return false + } + return true +} + +// IsCreditCard checks if the string is a credit card. +func IsCreditCard(str string) bool { + sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") + if !rxCreditCard.MatchString(sanitized) { + return false + } + + number, _ := ToInt(sanitized) + number, lastDigit := number / 10, number % 10 + + var sum int64 + for i:=0; number > 0; i++ { + digit := number % 10 + + if i % 2 == 0 { + digit *= 2 + if digit > 9 { + digit -= 9 + } + } + + sum += digit + number = number / 10 + } + + return (sum + lastDigit) % 10 == 0 +} + +// IsISBN10 checks if the string is an ISBN version 10. +func IsISBN10(str string) bool { + return IsISBN(str, 10) +} + +// IsISBN13 checks if the string is an ISBN version 13. +func IsISBN13(str string) bool { + return IsISBN(str, 13) +} + +// IsISBN checks if the string is an ISBN (version 10 or 13). +// If version value is not equal to 10 or 13, it will be checks both variants. +func IsISBN(str string, version int) bool { + sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") + var checksum int32 + var i int32 + if version == 10 { + if !rxISBN10.MatchString(sanitized) { + return false + } + for i = 0; i < 9; i++ { + checksum += (i + 1) * int32(sanitized[i]-'0') + } + if sanitized[9] == 'X' { + checksum += 10 * 10 + } else { + checksum += 10 * int32(sanitized[9]-'0') + } + if checksum%11 == 0 { + return true + } + return false + } else if version == 13 { + if !rxISBN13.MatchString(sanitized) { + return false + } + factor := []int32{1, 3} + for i = 0; i < 12; i++ { + checksum += factor[i%2] * int32(sanitized[i]-'0') + } + return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0 + } + return IsISBN(str, 10) || IsISBN(str, 13) +} + +// IsJSON checks if the string is valid JSON (note: uses json.Unmarshal). +func IsJSON(str string) bool { + var js json.RawMessage + return json.Unmarshal([]byte(str), &js) == nil +} + +// IsMultibyte checks if the string contains one or more multibyte chars. Empty string is valid. +func IsMultibyte(str string) bool { + if IsNull(str) { + return true + } + return rxMultibyte.MatchString(str) +} + +// IsASCII checks if the string contains ASCII chars only. Empty string is valid. +func IsASCII(str string) bool { + if IsNull(str) { + return true + } + return rxASCII.MatchString(str) +} + +// IsPrintableASCII checks if the string contains printable ASCII chars only. Empty string is valid. +func IsPrintableASCII(str string) bool { + if IsNull(str) { + return true + } + return rxPrintableASCII.MatchString(str) +} + +// IsFullWidth checks if the string contains any full-width chars. Empty string is valid. +func IsFullWidth(str string) bool { + if IsNull(str) { + return true + } + return rxFullWidth.MatchString(str) +} + +// IsHalfWidth checks if the string contains any half-width chars. Empty string is valid. +func IsHalfWidth(str string) bool { + if IsNull(str) { + return true + } + return rxHalfWidth.MatchString(str) +} + +// IsVariableWidth checks if the string contains a mixture of full and half-width chars. Empty string is valid. +func IsVariableWidth(str string) bool { + if IsNull(str) { + return true + } + return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str) +} + +// IsBase64 checks if a string is base64 encoded. +func IsBase64(str string) bool { + return rxBase64.MatchString(str) +} + +// IsFilePath checks is a string is Win or Unix file path and returns it's type. +func IsFilePath(str string) (bool, int) { + if rxWinPath.MatchString(str) { + //check windows path limit see: + // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath + if len(str[3:]) > 32767 { + return false, Win + } + return true, Win + } else if rxUnixPath.MatchString(str) { + return true, Unix + } + return false, Unknown +} + +//IsWinFilePath checks both relative & absolute paths in Windows +func IsWinFilePath(str string) bool { + if rxARWinPath.MatchString(str) { + //check windows path limit see: + // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath + if len(str[3:]) > 32767 { + return false + } + return true + } + return false +} + +//IsUnixFilePath checks both relative & absolute paths in Unix +func IsUnixFilePath(str string) bool { + if rxARUnixPath.MatchString(str) { + return true + } + return false +} + +// IsDataURI checks if a string is base64 encoded data URI such as an image +func IsDataURI(str string) bool { + dataURI := strings.Split(str, ",") + if !rxDataURI.MatchString(dataURI[0]) { + return false + } + return IsBase64(dataURI[1]) +} + +// IsMagnetURI checks if a string is valid magnet URI +func IsMagnetURI(str string) bool { + return rxMagnetURI.MatchString(str) +} + +// IsISO3166Alpha2 checks if a string is valid two-letter country code +func IsISO3166Alpha2(str string) bool { + for _, entry := range ISO3166List { + if str == entry.Alpha2Code { + return true + } + } + return false +} + +// IsISO3166Alpha3 checks if a string is valid three-letter country code +func IsISO3166Alpha3(str string) bool { + for _, entry := range ISO3166List { + if str == entry.Alpha3Code { + return true + } + } + return false +} + +// IsISO693Alpha2 checks if a string is valid two-letter language code +func IsISO693Alpha2(str string) bool { + for _, entry := range ISO693List { + if str == entry.Alpha2Code { + return true + } + } + return false +} + +// IsISO693Alpha3b checks if a string is valid three-letter language code +func IsISO693Alpha3b(str string) bool { + for _, entry := range ISO693List { + if str == entry.Alpha3bCode { + return true + } + } + return false +} + +// IsDNSName will validate the given string as a DNS name +func IsDNSName(str string) bool { + if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 { + // constraints already violated + return false + } + return !IsIP(str) && rxDNSName.MatchString(str) +} + +// IsHash checks if a string is a hash of type algorithm. +// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b'] +func IsHash(str string, algorithm string) bool { + var len string + algo := strings.ToLower(algorithm) + + if algo == "crc32" || algo == "crc32b" { + len = "8" + } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" { + len = "32" + } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" { + len = "40" + } else if algo == "tiger192" { + len = "48" + } else if algo == "sha3-224" { + len = "56" + } else if algo == "sha256" || algo == "sha3-256" { + len = "64" + } else if algo == "sha384" || algo == "sha3-384" { + len = "96" + } else if algo == "sha512" || algo == "sha3-512" { + len = "128" + } else { + return false + } + + return Matches(str, "^[a-f0-9]{"+len+"}$") +} + +// IsSHA3224 checks is a string is a SHA3-224 hash. Alias for `IsHash(str, "sha3-224")` +func IsSHA3224(str string) bool { + return IsHash(str, "sha3-224") +} + +// IsSHA3256 checks is a string is a SHA3-256 hash. Alias for `IsHash(str, "sha3-256")` +func IsSHA3256(str string) bool { + return IsHash(str, "sha3-256") +} + +// IsSHA3384 checks is a string is a SHA3-384 hash. Alias for `IsHash(str, "sha3-384")` +func IsSHA3384(str string) bool { + return IsHash(str, "sha3-384") +} + +// IsSHA3512 checks is a string is a SHA3-512 hash. Alias for `IsHash(str, "sha3-512")` +func IsSHA3512(str string) bool { + return IsHash(str, "sha3-512") +} + +// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")` +func IsSHA512(str string) bool { + return IsHash(str, "sha512") +} + +// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")` +func IsSHA384(str string) bool { + return IsHash(str, "sha384") +} + +// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")` +func IsSHA256(str string) bool { + return IsHash(str, "sha256") +} + +// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")` +func IsTiger192(str string) bool { + return IsHash(str, "tiger192") +} + +// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")` +func IsTiger160(str string) bool { + return IsHash(str, "tiger160") +} + +// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")` +func IsRipeMD160(str string) bool { + return IsHash(str, "ripemd160") +} + +// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")` +func IsSHA1(str string) bool { + return IsHash(str, "sha1") +} + +// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")` +func IsTiger128(str string) bool { + return IsHash(str, "tiger128") +} + +// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")` +func IsRipeMD128(str string) bool { + return IsHash(str, "ripemd128") +} + +// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")` +func IsCRC32(str string) bool { + return IsHash(str, "crc32") +} + +// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")` +func IsCRC32b(str string) bool { + return IsHash(str, "crc32b") +} + +// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")` +func IsMD5(str string) bool { + return IsHash(str, "md5") +} + +// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")` +func IsMD4(str string) bool { + return IsHash(str, "md4") +} + +// IsDialString validates the given string for usage with the various Dial() functions +func IsDialString(str string) bool { + if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) { + return true + } + + return false +} + +// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP` +func IsIP(str string) bool { + return net.ParseIP(str) != nil +} + +// IsPort checks if a string represents a valid port +func IsPort(str string) bool { + if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 { + return true + } + return false +} + +// IsIPv4 checks if the string is an IP version 4. +func IsIPv4(str string) bool { + ip := net.ParseIP(str) + return ip != nil && strings.Contains(str, ".") +} + +// IsIPv6 checks if the string is an IP version 6. +func IsIPv6(str string) bool { + ip := net.ParseIP(str) + return ip != nil && strings.Contains(str, ":") +} + +// IsCIDR checks if the string is an valid CIDR notiation (IPV4 & IPV6) +func IsCIDR(str string) bool { + _, _, err := net.ParseCIDR(str) + return err == nil +} + +// IsMAC checks if a string is valid MAC address. +// Possible MAC formats: +// 01:23:45:67:89:ab +// 01:23:45:67:89:ab:cd:ef +// 01-23-45-67-89-ab +// 01-23-45-67-89-ab-cd-ef +// 0123.4567.89ab +// 0123.4567.89ab.cdef +func IsMAC(str string) bool { + _, err := net.ParseMAC(str) + return err == nil +} + +// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name +func IsHost(str string) bool { + return IsIP(str) || IsDNSName(str) +} + +// IsMongoID checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. +func IsMongoID(str string) bool { + return rxHexadecimal.MatchString(str) && (len(str) == 24) +} + +// IsLatitude checks if a string is valid latitude. +func IsLatitude(str string) bool { + return rxLatitude.MatchString(str) +} + +// IsLongitude checks if a string is valid longitude. +func IsLongitude(str string) bool { + return rxLongitude.MatchString(str) +} + +// IsIMEI checks if a string is valid IMEI +func IsIMEI(str string) bool { + return rxIMEI.MatchString(str) +} + +// IsIMSI checks if a string is valid IMSI +func IsIMSI(str string) bool { + if !rxIMSI.MatchString(str) { + return false + } + + mcc, err := strconv.ParseInt(str[0:3], 10, 32) + if err != nil { + return false + } + + switch mcc { + case 202, 204, 206, 208, 212, 213, 214, 216, 218, 219: + case 220, 221, 222, 226, 228, 230, 231, 232, 234, 235: + case 238, 240, 242, 244, 246, 247, 248, 250, 255, 257: + case 259, 260, 262, 266, 268, 270, 272, 274, 276, 278: + case 280, 282, 283, 284, 286, 288, 289, 290, 292, 293: + case 294, 295, 297, 302, 308, 310, 311, 312, 313, 314: + case 315, 316, 330, 332, 334, 338, 340, 342, 344, 346: + case 348, 350, 352, 354, 356, 358, 360, 362, 363, 364: + case 365, 366, 368, 370, 372, 374, 376, 400, 401, 402: + case 404, 405, 406, 410, 412, 413, 414, 415, 416, 417: + case 418, 419, 420, 421, 422, 424, 425, 426, 427, 428: + case 429, 430, 431, 432, 434, 436, 437, 438, 440, 441: + case 450, 452, 454, 455, 456, 457, 460, 461, 466, 467: + case 470, 472, 502, 505, 510, 514, 515, 520, 525, 528: + case 530, 536, 537, 539, 540, 541, 542, 543, 544, 545: + case 546, 547, 548, 549, 550, 551, 552, 553, 554, 555: + case 602, 603, 604, 605, 606, 607, 608, 609, 610, 611: + case 612, 613, 614, 615, 616, 617, 618, 619, 620, 621: + case 622, 623, 624, 625, 626, 627, 628, 629, 630, 631: + case 632, 633, 634, 635, 636, 637, 638, 639, 640, 641: + case 642, 643, 645, 646, 647, 648, 649, 650, 651, 652: + case 653, 654, 655, 657, 658, 659, 702, 704, 706, 708: + case 710, 712, 714, 716, 722, 724, 730, 732, 734, 736: + case 738, 740, 742, 744, 746, 748, 750, 995: + return true + default: + return false + } + return true +} + +// IsRsaPublicKey checks if a string is valid public key with provided length +func IsRsaPublicKey(str string, keylen int) bool { + bb := bytes.NewBufferString(str) + pemBytes, err := ioutil.ReadAll(bb) + if err != nil { + return false + } + block, _ := pem.Decode(pemBytes) + if block != nil && block.Type != "PUBLIC KEY" { + return false + } + var der []byte + + if block != nil { + der = block.Bytes + } else { + der, err = base64.StdEncoding.DecodeString(str) + if err != nil { + return false + } + } + + key, err := x509.ParsePKIXPublicKey(der) + if err != nil { + return false + } + pubkey, ok := key.(*rsa.PublicKey) + if !ok { + return false + } + bitlen := len(pubkey.N.Bytes()) * 8 + return bitlen == int(keylen) +} + +// IsRegex checks if a give string is a valid regex with RE2 syntax or not +func IsRegex(str string) bool { + if _, err := regexp.Compile(str); err == nil { + return true + } + return false +} + +func toJSONName(tag string) string { + if tag == "" { + return "" + } + + // JSON name always comes first. If there's no options then split[0] is + // JSON name, if JSON name is not set, then split[0] is an empty string. + split := strings.SplitN(tag, ",", 2) + + name := split[0] + + // However it is possible that the field is skipped when + // (de-)serializing from/to JSON, in which case assume that there is no + // tag name to use + if name == "-" { + return "" + } + return name +} + +func prependPathToErrors(err error, path string) error { + switch err2 := err.(type) { + case Error: + err2.Path = append([]string{path}, err2.Path...) + return err2 + case Errors: + errors := err2.Errors() + for i, err3 := range errors { + errors[i] = prependPathToErrors(err3, path) + } + return err2 + } + return err +} + +// ValidateArray performs validation according to condition iterator that validates every element of the array +func ValidateArray(array []interface{}, iterator ConditionIterator) bool { + return Every(array, iterator) +} + +// ValidateMap use validation map for fields. +// result will be equal to `false` if there are any errors. +// s is the map containing the data to be validated. +// m is the validation map in the form: +// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} +func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { + if s == nil { + return true, nil + } + result := true + var err error + var errs Errors + var index int + val := reflect.ValueOf(s) + for key, value := range s { + presentResult := true + validator, ok := m[key] + if !ok { + presentResult = false + var err error + err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key) + err = prependPathToErrors(err, key) + errs = append(errs, err) + } + valueField := reflect.ValueOf(value) + mapResult := true + typeResult := true + structResult := true + resultField := true + switch subValidator := validator.(type) { + case map[string]interface{}: + var err error + if v, ok := value.(map[string]interface{}); !ok { + mapResult = false + err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String()) + err = prependPathToErrors(err, key) + errs = append(errs, err) + } else { + mapResult, err = ValidateMap(v, subValidator) + if err != nil { + mapResult = false + err = prependPathToErrors(err, key) + errs = append(errs, err) + } + } + case string: + if (valueField.Kind() == reflect.Struct || + (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && + subValidator != "-" { + var err error + structResult, err = ValidateStruct(valueField.Interface()) + if err != nil { + err = prependPathToErrors(err, key) + errs = append(errs, err) + } + } + resultField, err = typeCheck(valueField, reflect.StructField{ + Name: key, + PkgPath: "", + Type: val.Type(), + Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)), + Offset: 0, + Index: []int{index}, + Anonymous: false, + }, val, nil) + if err != nil { + errs = append(errs, err) + } + case nil: + // already handlerd when checked before + default: + typeResult = false + err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String()) + err = prependPathToErrors(err, key) + errs = append(errs, err) + } + result = result && presentResult && typeResult && resultField && structResult && mapResult + index++ + } + // checks required keys + requiredResult := true + for key, value := range m { + if schema, ok := value.(string); ok { + tags := parseTagIntoMap(schema) + if required, ok := tags["required"]; ok { + if _, ok := s[key]; !ok { + requiredResult = false + if required.customErrorMessage != "" { + err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}} + } else { + err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}} + } + errs = append(errs, err) + } + } + } + } + + if len(errs) > 0 { + err = errs + } + return result && requiredResult, err +} + +// ValidateStruct use tags for fields. +// result will be equal to `false` if there are any errors. +// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail) +func ValidateStruct(s interface{}) (bool, error) { + if s == nil { + return true, nil + } + result := true + var err error + val := reflect.ValueOf(s) + if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { + val = val.Elem() + } + // we only accept structs + if val.Kind() != reflect.Struct { + return false, fmt.Errorf("function only accepts structs; got %s", val.Kind()) + } + var errs Errors + for i := 0; i < val.NumField(); i++ { + valueField := val.Field(i) + typeField := val.Type().Field(i) + if typeField.PkgPath != "" { + continue // Private field + } + structResult := true + if valueField.Kind() == reflect.Interface { + valueField = valueField.Elem() + } + if (valueField.Kind() == reflect.Struct || + (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && + typeField.Tag.Get(tagName) != "-" { + var err error + structResult, err = ValidateStruct(valueField.Interface()) + if err != nil { + err = prependPathToErrors(err, typeField.Name) + errs = append(errs, err) + } + } + resultField, err2 := typeCheck(valueField, typeField, val, nil) + if err2 != nil { + + // Replace structure name with JSON name if there is a tag on the variable + jsonTag := toJSONName(typeField.Tag.Get("json")) + if jsonTag != "" { + switch jsonError := err2.(type) { + case Error: + jsonError.Name = jsonTag + err2 = jsonError + case Errors: + for i2, err3 := range jsonError { + switch customErr := err3.(type) { + case Error: + customErr.Name = jsonTag + jsonError[i2] = customErr + } + } + + err2 = jsonError + } + } + + errs = append(errs, err2) + } + result = result && resultField && structResult + } + if len(errs) > 0 { + err = errs + } + return result, err +} + +// ValidateStructAsync performs async validation of the struct and returns results through the channels +func ValidateStructAsync(s interface{}) (<-chan bool, <-chan error) { + res := make(chan bool) + errors := make(chan error) + + go func() { + defer close(res) + defer close(errors) + + isValid, isFailed := ValidateStruct(s) + + res <- isValid + errors <- isFailed + }() + + return res, errors +} + +// ValidateMapAsync performs async validation of the map and returns results through the channels +func ValidateMapAsync(s map[string]interface{}, m map[string]interface{}) (<-chan bool, <-chan error) { + res := make(chan bool) + errors := make(chan error) + + go func() { + defer close(res) + defer close(errors) + + isValid, isFailed := ValidateMap(s, m) + + res <- isValid + errors <- isFailed + }() + + return res, errors +} + +// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""} +func parseTagIntoMap(tag string) tagOptionsMap { + optionsMap := make(tagOptionsMap) + options := strings.Split(tag, ",") + + for i, option := range options { + option = strings.TrimSpace(option) + + validationOptions := strings.Split(option, "~") + if !isValidTag(validationOptions[0]) { + continue + } + if len(validationOptions) == 2 { + optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i} + } else { + optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i} + } + } + return optionsMap +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("\\'\"!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +// IsSSN will validate the given string as a U.S. Social Security Number +func IsSSN(str string) bool { + if str == "" || len(str) != 11 { + return false + } + return rxSSN.MatchString(str) +} + +// IsSemver checks if string is valid semantic version +func IsSemver(str string) bool { + return rxSemver.MatchString(str) +} + +// IsType checks if interface is of some type +func IsType(v interface{}, params ...string) bool { + if len(params) == 1 { + typ := params[0] + return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1) + } + return false +} + +// IsTime checks if string is valid according to given format +func IsTime(str string, format string) bool { + _, err := time.Parse(format, str) + return err == nil +} + +// IsUnixTime checks if string is valid unix timestamp value +func IsUnixTime(str string) bool { + if _, err := strconv.Atoi(str); err == nil { + return true + } + return false +} + +// IsRFC3339 checks if string is valid timestamp value according to RFC3339 +func IsRFC3339(str string) bool { + return IsTime(str, time.RFC3339) +} + +// IsRFC3339WithoutZone checks if string is valid timestamp value according to RFC3339 which excludes the timezone. +func IsRFC3339WithoutZone(str string) bool { + return IsTime(str, rfc3339WithoutZone) +} + +// IsISO4217 checks if string is valid ISO currency code +func IsISO4217(str string) bool { + for _, currency := range ISO4217List { + if str == currency { + return true + } + } + + return false +} + +// ByteLength checks string's length +func ByteLength(str string, params ...string) bool { + if len(params) == 2 { + min, _ := ToInt(params[0]) + max, _ := ToInt(params[1]) + return len(str) >= int(min) && len(str) <= int(max) + } + + return false +} + +// RuneLength checks string's length +// Alias for StringLength +func RuneLength(str string, params ...string) bool { + return StringLength(str, params...) +} + +// IsRsaPub checks whether string is valid RSA key +// Alias for IsRsaPublicKey +func IsRsaPub(str string, params ...string) bool { + if len(params) == 1 { + len, _ := ToInt(params[0]) + return IsRsaPublicKey(str, int(len)) + } + + return false +} + +// StringMatches checks if a string matches a given pattern. +func StringMatches(s string, params ...string) bool { + if len(params) == 1 { + pattern := params[0] + return Matches(s, pattern) + } + return false +} + +// StringLength checks string's length (including multi byte strings) +func StringLength(str string, params ...string) bool { + + if len(params) == 2 { + strLength := utf8.RuneCountInString(str) + min, _ := ToInt(params[0]) + max, _ := ToInt(params[1]) + return strLength >= int(min) && strLength <= int(max) + } + + return false +} + +// MinStringLength checks string's minimum length (including multi byte strings) +func MinStringLength(str string, params ...string) bool { + + if len(params) == 1 { + strLength := utf8.RuneCountInString(str) + min, _ := ToInt(params[0]) + return strLength >= int(min) + } + + return false +} + +// MaxStringLength checks string's maximum length (including multi byte strings) +func MaxStringLength(str string, params ...string) bool { + + if len(params) == 1 { + strLength := utf8.RuneCountInString(str) + max, _ := ToInt(params[0]) + return strLength <= int(max) + } + + return false +} + +// Range checks string's length +func Range(str string, params ...string) bool { + if len(params) == 2 { + value, _ := ToFloat(str) + min, _ := ToFloat(params[0]) + max, _ := ToFloat(params[1]) + return InRange(value, min, max) + } + + return false +} + +// IsInRaw checks if string is in list of allowed values +func IsInRaw(str string, params ...string) bool { + if len(params) == 1 { + rawParams := params[0] + + parsedParams := strings.Split(rawParams, "|") + + return IsIn(str, parsedParams...) + } + + return false +} + +// IsIn checks if string str is a member of the set of strings params +func IsIn(str string, params ...string) bool { + for _, param := range params { + if str == param { + return true + } + } + + return false +} + +func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) { + if nilPtrAllowedByRequired { + k := v.Kind() + if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() { + return true, nil + } + } + + if requiredOption, isRequired := options["required"]; isRequired { + if len(requiredOption.customErrorMessage) > 0 { + return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}} + } + return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}} + } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional { + return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}} + } + // not required and empty is valid + return true, nil +} + +func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) { + if !v.IsValid() { + return false, nil + } + + tag := t.Tag.Get(tagName) + + // checks if the field should be ignored + switch tag { + case "": + if v.Kind() != reflect.Slice && v.Kind() != reflect.Map { + if !fieldsRequiredByDefault { + return true, nil + } + return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}} + } + case "-": + return true, nil + } + + isRootType := false + if options == nil { + isRootType = true + options = parseTagIntoMap(tag) + } + + if isEmptyValue(v) { + // an empty value is not validated, checks only required + isValid, resultErr = checkRequired(v, t, options) + for key := range options { + delete(options, key) + } + return isValid, resultErr + } + + var customTypeErrors Errors + optionsOrder := options.orderedKeys() + for _, validatorName := range optionsOrder { + validatorStruct := options[validatorName] + if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok { + delete(options, validatorName) + + if result := validatefunc(v.Interface(), o.Interface()); !result { + if len(validatorStruct.customErrorMessage) > 0 { + customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)}) + continue + } + customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)}) + } + } + } + + if len(customTypeErrors.Errors()) > 0 { + return false, customTypeErrors + } + + if isRootType { + // Ensure that we've checked the value by all specified validators before report that the value is valid + defer func() { + delete(options, "optional") + delete(options, "required") + + if isValid && resultErr == nil && len(options) != 0 { + optionsOrder := options.orderedKeys() + for _, validator := range optionsOrder { + isValid = false + resultErr = Error{t.Name, fmt.Errorf( + "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}} + return + } + } + }() + } + + for _, validatorSpec := range optionsOrder { + validatorStruct := options[validatorSpec] + var negate bool + validator := validatorSpec + customMsgExists := len(validatorStruct.customErrorMessage) > 0 + + // checks whether the tag looks like '!something' or 'something' + if validator[0] == '!' { + validator = validator[1:] + negate = true + } + + // checks for interface param validators + for key, value := range InterfaceParamTagRegexMap { + ps := value.FindStringSubmatch(validator) + if len(ps) == 0 { + continue + } + + validatefunc, ok := InterfaceParamTagMap[key] + if !ok { + continue + } + + delete(options, validatorSpec) + + field := fmt.Sprint(v) + if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + } + } + + switch v.Kind() { + case reflect.Bool, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Float32, reflect.Float64, + reflect.String: + // for each tag option checks the map of validator functions + for _, validatorSpec := range optionsOrder { + validatorStruct := options[validatorSpec] + var negate bool + validator := validatorSpec + customMsgExists := len(validatorStruct.customErrorMessage) > 0 + + // checks whether the tag looks like '!something' or 'something' + if validator[0] == '!' { + validator = validator[1:] + negate = true + } + + // checks for param validators + for key, value := range ParamTagRegexMap { + ps := value.FindStringSubmatch(validator) + if len(ps) == 0 { + continue + } + + validatefunc, ok := ParamTagMap[key] + if !ok { + continue + } + + delete(options, validatorSpec) + + switch v.Kind() { + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + + field := fmt.Sprint(v) // make value into string, then validate with regex + if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + default: + // type not yet supported, fail + return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}} + } + } + + if validatefunc, ok := TagMap[validator]; ok { + delete(options, validatorSpec) + + switch v.Kind() { + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + field := fmt.Sprint(v) // make value into string, then validate with regex + if result := validatefunc(field); !result && !negate || result && negate { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + default: + //Not Yet Supported Types (Fail here!) + err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v) + return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}} + } + } + } + return true, nil + case reflect.Map: + if v.Type().Key().Kind() != reflect.String { + return false, &UnsupportedTypeError{v.Type()} + } + var sv stringValues + sv = v.MapKeys() + sort.Sort(sv) + result := true + for i, k := range sv { + var resultItem bool + var err error + if v.MapIndex(k).Kind() != reflect.Struct { + resultItem, err = typeCheck(v.MapIndex(k), t, o, options) + if err != nil { + return false, err + } + } else { + resultItem, err = ValidateStruct(v.MapIndex(k).Interface()) + if err != nil { + err = prependPathToErrors(err, t.Name+"."+sv[i].Interface().(string)) + return false, err + } + } + result = result && resultItem + } + return result, nil + case reflect.Slice, reflect.Array: + result := true + for i := 0; i < v.Len(); i++ { + var resultItem bool + var err error + if v.Index(i).Kind() != reflect.Struct { + resultItem, err = typeCheck(v.Index(i), t, o, options) + if err != nil { + return false, err + } + } else { + resultItem, err = ValidateStruct(v.Index(i).Interface()) + if err != nil { + err = prependPathToErrors(err, t.Name+"."+strconv.Itoa(i)) + return false, err + } + } + result = result && resultItem + } + return result, nil + case reflect.Interface: + // If the value is an interface then encode its element + if v.IsNil() { + return true, nil + } + return ValidateStruct(v.Interface()) + case reflect.Ptr: + // If the value is a pointer then checks its element + if v.IsNil() { + return true, nil + } + return typeCheck(v.Elem(), t, o, options) + case reflect.Struct: + return true, nil + default: + return false, &UnsupportedTypeError{v.Type()} + } +} + +func stripParams(validatorString string) string { + return paramsRegexp.ReplaceAllString(validatorString, "") +} + +// isEmptyValue checks whether value empty or not +func isEmptyValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.String, reflect.Array: + return v.Len() == 0 + case reflect.Map, reflect.Slice: + return v.Len() == 0 || v.IsNil() + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + + return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) +} + +// ErrorByField returns error for specified field of the struct +// validated by ValidateStruct or empty string if there are no errors +// or this field doesn't exists or doesn't have any errors. +func ErrorByField(e error, field string) string { + if e == nil { + return "" + } + return ErrorsByField(e)[field] +} + +// ErrorsByField returns map of errors of the struct validated +// by ValidateStruct or empty map if there are no errors. +func ErrorsByField(e error) map[string]string { + m := make(map[string]string) + if e == nil { + return m + } + // prototype for ValidateStruct + + switch e := e.(type) { + case Error: + m[e.Name] = e.Err.Error() + case Errors: + for _, item := range e.Errors() { + n := ErrorsByField(item) + for k, v := range n { + m[k] = v + } + } + } + + return m +} + +// Error returns string equivalent for reflect.Type +func (e *UnsupportedTypeError) Error() string { + return "validator: unsupported type: " + e.Type.String() +} + +func (sv stringValues) Len() int { return len(sv) } +func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } +func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) } +func (sv stringValues) get(i int) string { return sv[i].String() } + +func IsE164(str string) bool { + return rxE164.MatchString(str) +} diff --git a/vendor/github.com/asaskevich/govalidator/wercker.yml b/vendor/github.com/asaskevich/govalidator/wercker.yml new file mode 100644 index 000000000..bc5f7b086 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/wercker.yml @@ -0,0 +1,15 @@ +box: golang +build: + steps: + - setup-go-workspace + + - script: + name: go get + code: | + go version + go get -t ./... + + - script: + name: go test + code: | + go test -race -v ./... diff --git a/vendor/github.com/blang/semver/v4/LICENSE b/vendor/github.com/blang/semver/v4/LICENSE new file mode 100644 index 000000000..5ba5c86fc --- /dev/null +++ b/vendor/github.com/blang/semver/v4/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2014 Benedikt Lang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/github.com/blang/semver/v4/json.go b/vendor/github.com/blang/semver/v4/json.go new file mode 100644 index 000000000..a74bf7c44 --- /dev/null +++ b/vendor/github.com/blang/semver/v4/json.go @@ -0,0 +1,23 @@ +package semver + +import ( + "encoding/json" +) + +// MarshalJSON implements the encoding/json.Marshaler interface. +func (v Version) MarshalJSON() ([]byte, error) { + return json.Marshal(v.String()) +} + +// UnmarshalJSON implements the encoding/json.Unmarshaler interface. +func (v *Version) UnmarshalJSON(data []byte) (err error) { + var versionString string + + if err = json.Unmarshal(data, &versionString); err != nil { + return + } + + *v, err = Parse(versionString) + + return +} diff --git a/vendor/github.com/blang/semver/v4/range.go b/vendor/github.com/blang/semver/v4/range.go new file mode 100644 index 000000000..95f7139b9 --- /dev/null +++ b/vendor/github.com/blang/semver/v4/range.go @@ -0,0 +1,416 @@ +package semver + +import ( + "fmt" + "strconv" + "strings" + "unicode" +) + +type wildcardType int + +const ( + noneWildcard wildcardType = iota + majorWildcard wildcardType = 1 + minorWildcard wildcardType = 2 + patchWildcard wildcardType = 3 +) + +func wildcardTypefromInt(i int) wildcardType { + switch i { + case 1: + return majorWildcard + case 2: + return minorWildcard + case 3: + return patchWildcard + default: + return noneWildcard + } +} + +type comparator func(Version, Version) bool + +var ( + compEQ comparator = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) == 0 + } + compNE = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) != 0 + } + compGT = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) == 1 + } + compGE = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) >= 0 + } + compLT = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) == -1 + } + compLE = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) <= 0 + } +) + +type versionRange struct { + v Version + c comparator +} + +// rangeFunc creates a Range from the given versionRange. +func (vr *versionRange) rangeFunc() Range { + return Range(func(v Version) bool { + return vr.c(v, vr.v) + }) +} + +// Range represents a range of versions. +// A Range can be used to check if a Version satisfies it: +// +// range, err := semver.ParseRange(">1.0.0 <2.0.0") +// range(semver.MustParse("1.1.1") // returns true +type Range func(Version) bool + +// OR combines the existing Range with another Range using logical OR. +func (rf Range) OR(f Range) Range { + return Range(func(v Version) bool { + return rf(v) || f(v) + }) +} + +// AND combines the existing Range with another Range using logical AND. +func (rf Range) AND(f Range) Range { + return Range(func(v Version) bool { + return rf(v) && f(v) + }) +} + +// ParseRange parses a range and returns a Range. +// If the range could not be parsed an error is returned. +// +// Valid ranges are: +// - "<1.0.0" +// - "<=1.0.0" +// - ">1.0.0" +// - ">=1.0.0" +// - "1.0.0", "=1.0.0", "==1.0.0" +// - "!1.0.0", "!=1.0.0" +// +// A Range can consist of multiple ranges separated by space: +// Ranges can be linked by logical AND: +// - ">1.0.0 <2.0.0" would match between both ranges, so "1.1.1" and "1.8.7" but not "1.0.0" or "2.0.0" +// - ">1.0.0 <3.0.0 !2.0.3-beta.2" would match every version between 1.0.0 and 3.0.0 except 2.0.3-beta.2 +// +// Ranges can also be linked by logical OR: +// - "<2.0.0 || >=3.0.0" would match "1.x.x" and "3.x.x" but not "2.x.x" +// +// AND has a higher precedence than OR. It's not possible to use brackets. +// +// Ranges can be combined by both AND and OR +// +// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` +func ParseRange(s string) (Range, error) { + parts := splitAndTrim(s) + orParts, err := splitORParts(parts) + if err != nil { + return nil, err + } + expandedParts, err := expandWildcardVersion(orParts) + if err != nil { + return nil, err + } + var orFn Range + for _, p := range expandedParts { + var andFn Range + for _, ap := range p { + opStr, vStr, err := splitComparatorVersion(ap) + if err != nil { + return nil, err + } + vr, err := buildVersionRange(opStr, vStr) + if err != nil { + return nil, fmt.Errorf("Could not parse Range %q: %s", ap, err) + } + rf := vr.rangeFunc() + + // Set function + if andFn == nil { + andFn = rf + } else { // Combine with existing function + andFn = andFn.AND(rf) + } + } + if orFn == nil { + orFn = andFn + } else { + orFn = orFn.OR(andFn) + } + + } + return orFn, nil +} + +// splitORParts splits the already cleaned parts by '||'. +// Checks for invalid positions of the operator and returns an +// error if found. +func splitORParts(parts []string) ([][]string, error) { + var ORparts [][]string + last := 0 + for i, p := range parts { + if p == "||" { + if i == 0 { + return nil, fmt.Errorf("First element in range is '||'") + } + ORparts = append(ORparts, parts[last:i]) + last = i + 1 + } + } + if last == len(parts) { + return nil, fmt.Errorf("Last element in range is '||'") + } + ORparts = append(ORparts, parts[last:]) + return ORparts, nil +} + +// buildVersionRange takes a slice of 2: operator and version +// and builds a versionRange, otherwise an error. +func buildVersionRange(opStr, vStr string) (*versionRange, error) { + c := parseComparator(opStr) + if c == nil { + return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, "")) + } + v, err := Parse(vStr) + if err != nil { + return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err) + } + + return &versionRange{ + v: v, + c: c, + }, nil + +} + +// inArray checks if a byte is contained in an array of bytes +func inArray(s byte, list []byte) bool { + for _, el := range list { + if el == s { + return true + } + } + return false +} + +// splitAndTrim splits a range string by spaces and cleans whitespaces +func splitAndTrim(s string) (result []string) { + last := 0 + var lastChar byte + excludeFromSplit := []byte{'>', '<', '='} + for i := 0; i < len(s); i++ { + if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) { + if last < i-1 { + result = append(result, s[last:i]) + } + last = i + 1 + } else if s[i] != ' ' { + lastChar = s[i] + } + } + if last < len(s)-1 { + result = append(result, s[last:]) + } + + for i, v := range result { + result[i] = strings.Replace(v, " ", "", -1) + } + + // parts := strings.Split(s, " ") + // for _, x := range parts { + // if s := strings.TrimSpace(x); len(s) != 0 { + // result = append(result, s) + // } + // } + return +} + +// splitComparatorVersion splits the comparator from the version. +// Input must be free of leading or trailing spaces. +func splitComparatorVersion(s string) (string, string, error) { + i := strings.IndexFunc(s, unicode.IsDigit) + if i == -1 { + return "", "", fmt.Errorf("Could not get version from string: %q", s) + } + return strings.TrimSpace(s[0:i]), s[i:], nil +} + +// getWildcardType will return the type of wildcard that the +// passed version contains +func getWildcardType(vStr string) wildcardType { + parts := strings.Split(vStr, ".") + nparts := len(parts) + wildcard := parts[nparts-1] + + possibleWildcardType := wildcardTypefromInt(nparts) + if wildcard == "x" { + return possibleWildcardType + } + + return noneWildcard +} + +// createVersionFromWildcard will convert a wildcard version +// into a regular version, replacing 'x's with '0's, handling +// special cases like '1.x.x' and '1.x' +func createVersionFromWildcard(vStr string) string { + // handle 1.x.x + vStr2 := strings.Replace(vStr, ".x.x", ".x", 1) + vStr2 = strings.Replace(vStr2, ".x", ".0", 1) + parts := strings.Split(vStr2, ".") + + // handle 1.x + if len(parts) == 2 { + return vStr2 + ".0" + } + + return vStr2 +} + +// incrementMajorVersion will increment the major version +// of the passed version +func incrementMajorVersion(vStr string) (string, error) { + parts := strings.Split(vStr, ".") + i, err := strconv.Atoi(parts[0]) + if err != nil { + return "", err + } + parts[0] = strconv.Itoa(i + 1) + + return strings.Join(parts, "."), nil +} + +// incrementMajorVersion will increment the minor version +// of the passed version +func incrementMinorVersion(vStr string) (string, error) { + parts := strings.Split(vStr, ".") + i, err := strconv.Atoi(parts[1]) + if err != nil { + return "", err + } + parts[1] = strconv.Itoa(i + 1) + + return strings.Join(parts, "."), nil +} + +// expandWildcardVersion will expand wildcards inside versions +// following these rules: +// +// * when dealing with patch wildcards: +// >= 1.2.x will become >= 1.2.0 +// <= 1.2.x will become < 1.3.0 +// > 1.2.x will become >= 1.3.0 +// < 1.2.x will become < 1.2.0 +// != 1.2.x will become < 1.2.0 >= 1.3.0 +// +// * when dealing with minor wildcards: +// >= 1.x will become >= 1.0.0 +// <= 1.x will become < 2.0.0 +// > 1.x will become >= 2.0.0 +// < 1.0 will become < 1.0.0 +// != 1.x will become < 1.0.0 >= 2.0.0 +// +// * when dealing with wildcards without +// version operator: +// 1.2.x will become >= 1.2.0 < 1.3.0 +// 1.x will become >= 1.0.0 < 2.0.0 +func expandWildcardVersion(parts [][]string) ([][]string, error) { + var expandedParts [][]string + for _, p := range parts { + var newParts []string + for _, ap := range p { + if strings.Contains(ap, "x") { + opStr, vStr, err := splitComparatorVersion(ap) + if err != nil { + return nil, err + } + + versionWildcardType := getWildcardType(vStr) + flatVersion := createVersionFromWildcard(vStr) + + var resultOperator string + var shouldIncrementVersion bool + switch opStr { + case ">": + resultOperator = ">=" + shouldIncrementVersion = true + case ">=": + resultOperator = ">=" + case "<": + resultOperator = "<" + case "<=": + resultOperator = "<" + shouldIncrementVersion = true + case "", "=", "==": + newParts = append(newParts, ">="+flatVersion) + resultOperator = "<" + shouldIncrementVersion = true + case "!=", "!": + newParts = append(newParts, "<"+flatVersion) + resultOperator = ">=" + shouldIncrementVersion = true + } + + var resultVersion string + if shouldIncrementVersion { + switch versionWildcardType { + case patchWildcard: + resultVersion, _ = incrementMinorVersion(flatVersion) + case minorWildcard: + resultVersion, _ = incrementMajorVersion(flatVersion) + } + } else { + resultVersion = flatVersion + } + + ap = resultOperator + resultVersion + } + newParts = append(newParts, ap) + } + expandedParts = append(expandedParts, newParts) + } + + return expandedParts, nil +} + +func parseComparator(s string) comparator { + switch s { + case "==": + fallthrough + case "": + fallthrough + case "=": + return compEQ + case ">": + return compGT + case ">=": + return compGE + case "<": + return compLT + case "<=": + return compLE + case "!": + fallthrough + case "!=": + return compNE + } + + return nil +} + +// MustParseRange is like ParseRange but panics if the range cannot be parsed. +func MustParseRange(s string) Range { + r, err := ParseRange(s) + if err != nil { + panic(`semver: ParseRange(` + s + `): ` + err.Error()) + } + return r +} diff --git a/vendor/github.com/blang/semver/v4/semver.go b/vendor/github.com/blang/semver/v4/semver.go new file mode 100644 index 000000000..307de610f --- /dev/null +++ b/vendor/github.com/blang/semver/v4/semver.go @@ -0,0 +1,476 @@ +package semver + +import ( + "errors" + "fmt" + "strconv" + "strings" +) + +const ( + numbers string = "0123456789" + alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + alphanum = alphas + numbers +) + +// SpecVersion is the latest fully supported spec version of semver +var SpecVersion = Version{ + Major: 2, + Minor: 0, + Patch: 0, +} + +// Version represents a semver compatible version +type Version struct { + Major uint64 + Minor uint64 + Patch uint64 + Pre []PRVersion + Build []string //No Precedence +} + +// Version to string +func (v Version) String() string { + b := make([]byte, 0, 5) + b = strconv.AppendUint(b, v.Major, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Minor, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Patch, 10) + + if len(v.Pre) > 0 { + b = append(b, '-') + b = append(b, v.Pre[0].String()...) + + for _, pre := range v.Pre[1:] { + b = append(b, '.') + b = append(b, pre.String()...) + } + } + + if len(v.Build) > 0 { + b = append(b, '+') + b = append(b, v.Build[0]...) + + for _, build := range v.Build[1:] { + b = append(b, '.') + b = append(b, build...) + } + } + + return string(b) +} + +// FinalizeVersion discards prerelease and build number and only returns +// major, minor and patch number. +func (v Version) FinalizeVersion() string { + b := make([]byte, 0, 5) + b = strconv.AppendUint(b, v.Major, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Minor, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Patch, 10) + return string(b) +} + +// Equals checks if v is equal to o. +func (v Version) Equals(o Version) bool { + return (v.Compare(o) == 0) +} + +// EQ checks if v is equal to o. +func (v Version) EQ(o Version) bool { + return (v.Compare(o) == 0) +} + +// NE checks if v is not equal to o. +func (v Version) NE(o Version) bool { + return (v.Compare(o) != 0) +} + +// GT checks if v is greater than o. +func (v Version) GT(o Version) bool { + return (v.Compare(o) == 1) +} + +// GTE checks if v is greater than or equal to o. +func (v Version) GTE(o Version) bool { + return (v.Compare(o) >= 0) +} + +// GE checks if v is greater than or equal to o. +func (v Version) GE(o Version) bool { + return (v.Compare(o) >= 0) +} + +// LT checks if v is less than o. +func (v Version) LT(o Version) bool { + return (v.Compare(o) == -1) +} + +// LTE checks if v is less than or equal to o. +func (v Version) LTE(o Version) bool { + return (v.Compare(o) <= 0) +} + +// LE checks if v is less than or equal to o. +func (v Version) LE(o Version) bool { + return (v.Compare(o) <= 0) +} + +// Compare compares Versions v to o: +// -1 == v is less than o +// 0 == v is equal to o +// 1 == v is greater than o +func (v Version) Compare(o Version) int { + if v.Major != o.Major { + if v.Major > o.Major { + return 1 + } + return -1 + } + if v.Minor != o.Minor { + if v.Minor > o.Minor { + return 1 + } + return -1 + } + if v.Patch != o.Patch { + if v.Patch > o.Patch { + return 1 + } + return -1 + } + + // Quick comparison if a version has no prerelease versions + if len(v.Pre) == 0 && len(o.Pre) == 0 { + return 0 + } else if len(v.Pre) == 0 && len(o.Pre) > 0 { + return 1 + } else if len(v.Pre) > 0 && len(o.Pre) == 0 { + return -1 + } + + i := 0 + for ; i < len(v.Pre) && i < len(o.Pre); i++ { + if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { + continue + } else if comp == 1 { + return 1 + } else { + return -1 + } + } + + // If all pr versions are the equal but one has further prversion, this one greater + if i == len(v.Pre) && i == len(o.Pre) { + return 0 + } else if i == len(v.Pre) && i < len(o.Pre) { + return -1 + } else { + return 1 + } + +} + +// IncrementPatch increments the patch version +func (v *Version) IncrementPatch() error { + v.Patch++ + return nil +} + +// IncrementMinor increments the minor version +func (v *Version) IncrementMinor() error { + v.Minor++ + v.Patch = 0 + return nil +} + +// IncrementMajor increments the major version +func (v *Version) IncrementMajor() error { + v.Major++ + v.Minor = 0 + v.Patch = 0 + return nil +} + +// Validate validates v and returns error in case +func (v Version) Validate() error { + // Major, Minor, Patch already validated using uint64 + + for _, pre := range v.Pre { + if !pre.IsNum { //Numeric prerelease versions already uint64 + if len(pre.VersionStr) == 0 { + return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) + } + if !containsOnly(pre.VersionStr, alphanum) { + return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) + } + } + } + + for _, build := range v.Build { + if len(build) == 0 { + return fmt.Errorf("Build meta data can not be empty %q", build) + } + if !containsOnly(build, alphanum) { + return fmt.Errorf("Invalid character(s) found in build meta data %q", build) + } + } + + return nil +} + +// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error +func New(s string) (*Version, error) { + v, err := Parse(s) + vp := &v + return vp, err +} + +// Make is an alias for Parse, parses version string and returns a validated Version or error +func Make(s string) (Version, error) { + return Parse(s) +} + +// ParseTolerant allows for certain version specifications that do not strictly adhere to semver +// specs to be parsed by this library. It does so by normalizing versions before passing them to +// Parse(). It currently trims spaces, removes a "v" prefix, adds a 0 patch number to versions +// with only major and minor components specified, and removes leading 0s. +func ParseTolerant(s string) (Version, error) { + s = strings.TrimSpace(s) + s = strings.TrimPrefix(s, "v") + + // Split into major.minor.(patch+pr+meta) + parts := strings.SplitN(s, ".", 3) + // Remove leading zeros. + for i, p := range parts { + if len(p) > 1 { + p = strings.TrimLeft(p, "0") + if len(p) == 0 || !strings.ContainsAny(p[0:1], "0123456789") { + p = "0" + p + } + parts[i] = p + } + } + // Fill up shortened versions. + if len(parts) < 3 { + if strings.ContainsAny(parts[len(parts)-1], "+-") { + return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") + } + for len(parts) < 3 { + parts = append(parts, "0") + } + } + s = strings.Join(parts, ".") + + return Parse(s) +} + +// Parse parses version string and returns a validated Version or error +func Parse(s string) (Version, error) { + if len(s) == 0 { + return Version{}, errors.New("Version string empty") + } + + // Split into major.minor.(patch+pr+meta) + parts := strings.SplitN(s, ".", 3) + if len(parts) != 3 { + return Version{}, errors.New("No Major.Minor.Patch elements found") + } + + // Major + if !containsOnly(parts[0], numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) + } + if hasLeadingZeroes(parts[0]) { + return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) + } + major, err := strconv.ParseUint(parts[0], 10, 64) + if err != nil { + return Version{}, err + } + + // Minor + if !containsOnly(parts[1], numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) + } + if hasLeadingZeroes(parts[1]) { + return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) + } + minor, err := strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return Version{}, err + } + + v := Version{} + v.Major = major + v.Minor = minor + + var build, prerelease []string + patchStr := parts[2] + + if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { + build = strings.Split(patchStr[buildIndex+1:], ".") + patchStr = patchStr[:buildIndex] + } + + if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { + prerelease = strings.Split(patchStr[preIndex+1:], ".") + patchStr = patchStr[:preIndex] + } + + if !containsOnly(patchStr, numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) + } + if hasLeadingZeroes(patchStr) { + return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) + } + patch, err := strconv.ParseUint(patchStr, 10, 64) + if err != nil { + return Version{}, err + } + + v.Patch = patch + + // Prerelease + for _, prstr := range prerelease { + parsedPR, err := NewPRVersion(prstr) + if err != nil { + return Version{}, err + } + v.Pre = append(v.Pre, parsedPR) + } + + // Build meta data + for _, str := range build { + if len(str) == 0 { + return Version{}, errors.New("Build meta data is empty") + } + if !containsOnly(str, alphanum) { + return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) + } + v.Build = append(v.Build, str) + } + + return v, nil +} + +// MustParse is like Parse but panics if the version cannot be parsed. +func MustParse(s string) Version { + v, err := Parse(s) + if err != nil { + panic(`semver: Parse(` + s + `): ` + err.Error()) + } + return v +} + +// PRVersion represents a PreRelease Version +type PRVersion struct { + VersionStr string + VersionNum uint64 + IsNum bool +} + +// NewPRVersion creates a new valid prerelease version +func NewPRVersion(s string) (PRVersion, error) { + if len(s) == 0 { + return PRVersion{}, errors.New("Prerelease is empty") + } + v := PRVersion{} + if containsOnly(s, numbers) { + if hasLeadingZeroes(s) { + return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) + } + num, err := strconv.ParseUint(s, 10, 64) + + // Might never be hit, but just in case + if err != nil { + return PRVersion{}, err + } + v.VersionNum = num + v.IsNum = true + } else if containsOnly(s, alphanum) { + v.VersionStr = s + v.IsNum = false + } else { + return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) + } + return v, nil +} + +// IsNumeric checks if prerelease-version is numeric +func (v PRVersion) IsNumeric() bool { + return v.IsNum +} + +// Compare compares two PreRelease Versions v and o: +// -1 == v is less than o +// 0 == v is equal to o +// 1 == v is greater than o +func (v PRVersion) Compare(o PRVersion) int { + if v.IsNum && !o.IsNum { + return -1 + } else if !v.IsNum && o.IsNum { + return 1 + } else if v.IsNum && o.IsNum { + if v.VersionNum == o.VersionNum { + return 0 + } else if v.VersionNum > o.VersionNum { + return 1 + } else { + return -1 + } + } else { // both are Alphas + if v.VersionStr == o.VersionStr { + return 0 + } else if v.VersionStr > o.VersionStr { + return 1 + } else { + return -1 + } + } +} + +// PreRelease version to string +func (v PRVersion) String() string { + if v.IsNum { + return strconv.FormatUint(v.VersionNum, 10) + } + return v.VersionStr +} + +func containsOnly(s string, set string) bool { + return strings.IndexFunc(s, func(r rune) bool { + return !strings.ContainsRune(set, r) + }) == -1 +} + +func hasLeadingZeroes(s string) bool { + return len(s) > 1 && s[0] == '0' +} + +// NewBuildVersion creates a new valid build version +func NewBuildVersion(s string) (string, error) { + if len(s) == 0 { + return "", errors.New("Buildversion is empty") + } + if !containsOnly(s, alphanum) { + return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) + } + return s, nil +} + +// FinalizeVersion returns the major, minor and patch number only and discards +// prerelease and build number. +func FinalizeVersion(s string) (string, error) { + v, err := Parse(s) + if err != nil { + return "", err + } + v.Pre = nil + v.Build = nil + + finalVer := v.String() + return finalVer, nil +} diff --git a/vendor/github.com/blang/semver/v4/sort.go b/vendor/github.com/blang/semver/v4/sort.go new file mode 100644 index 000000000..e18f88082 --- /dev/null +++ b/vendor/github.com/blang/semver/v4/sort.go @@ -0,0 +1,28 @@ +package semver + +import ( + "sort" +) + +// Versions represents multiple versions. +type Versions []Version + +// Len returns length of version collection +func (s Versions) Len() int { + return len(s) +} + +// Swap swaps two versions inside the collection by its indices +func (s Versions) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +// Less checks if version at index i is less than version at index j +func (s Versions) Less(i, j int) bool { + return s[i].LT(s[j]) +} + +// Sort sorts a slice of versions +func Sort(versions []Version) { + sort.Sort(Versions(versions)) +} diff --git a/vendor/github.com/blang/semver/v4/sql.go b/vendor/github.com/blang/semver/v4/sql.go new file mode 100644 index 000000000..db958134f --- /dev/null +++ b/vendor/github.com/blang/semver/v4/sql.go @@ -0,0 +1,30 @@ +package semver + +import ( + "database/sql/driver" + "fmt" +) + +// Scan implements the database/sql.Scanner interface. +func (v *Version) Scan(src interface{}) (err error) { + var str string + switch src := src.(type) { + case string: + str = src + case []byte: + str = string(src) + default: + return fmt.Errorf("version.Scan: cannot convert %T to string", src) + } + + if t, err := Parse(str); err == nil { + *v = t + } + + return +} + +// Value implements the database/sql/driver.Valuer interface. +func (v Version) Value() (driver.Value, error) { + return v.String(), nil +} diff --git a/vendor/github.com/containerd/containerd/LICENSE b/vendor/github.com/containerd/containerd/LICENSE new file mode 100644 index 000000000..584149b6e --- /dev/null +++ b/vendor/github.com/containerd/containerd/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/containerd/containerd/NOTICE b/vendor/github.com/containerd/containerd/NOTICE new file mode 100644 index 000000000..8915f0277 --- /dev/null +++ b/vendor/github.com/containerd/containerd/NOTICE @@ -0,0 +1,16 @@ +Docker +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/containerd/containerd/archive/compression/compression.go b/vendor/github.com/containerd/containerd/archive/compression/compression.go new file mode 100644 index 000000000..23ddfab1a --- /dev/null +++ b/vendor/github.com/containerd/containerd/archive/compression/compression.go @@ -0,0 +1,323 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package compression + +import ( + "bufio" + "bytes" + "compress/gzip" + "context" + "encoding/binary" + "fmt" + "io" + "os" + "os/exec" + "strconv" + "sync" + + "github.com/containerd/log" + "github.com/klauspost/compress/zstd" +) + +type ( + // Compression is the state represents if compressed or not. + Compression int +) + +const ( + // Uncompressed represents the uncompressed. + Uncompressed Compression = iota + // Gzip is gzip compression algorithm. + Gzip + // Zstd is zstd compression algorithm. + Zstd +) + +const disablePigzEnv = "CONTAINERD_DISABLE_PIGZ" + +var ( + initPigz sync.Once + unpigzPath string +) + +var ( + bufioReader32KPool = &sync.Pool{ + New: func() interface{} { return bufio.NewReaderSize(nil, 32*1024) }, + } +) + +// DecompressReadCloser include the stream after decompress and the compress method detected. +type DecompressReadCloser interface { + io.ReadCloser + // GetCompression returns the compress method which is used before decompressing + GetCompression() Compression +} + +type readCloserWrapper struct { + io.Reader + compression Compression + closer func() error +} + +func (r *readCloserWrapper) Close() error { + if r.closer != nil { + return r.closer() + } + return nil +} + +func (r *readCloserWrapper) GetCompression() Compression { + return r.compression +} + +type writeCloserWrapper struct { + io.Writer + closer func() error +} + +func (w *writeCloserWrapper) Close() error { + if w.closer != nil { + w.closer() + } + return nil +} + +type bufferedReader struct { + buf *bufio.Reader +} + +func newBufferedReader(r io.Reader) *bufferedReader { + buf := bufioReader32KPool.Get().(*bufio.Reader) + buf.Reset(r) + return &bufferedReader{buf} +} + +func (r *bufferedReader) Read(p []byte) (n int, err error) { + if r.buf == nil { + return 0, io.EOF + } + n, err = r.buf.Read(p) + if err == io.EOF { + r.buf.Reset(nil) + bufioReader32KPool.Put(r.buf) + r.buf = nil + } + return +} + +func (r *bufferedReader) Peek(n int) ([]byte, error) { + if r.buf == nil { + return nil, io.EOF + } + return r.buf.Peek(n) +} + +const ( + zstdMagicSkippableStart = 0x184D2A50 + zstdMagicSkippableMask = 0xFFFFFFF0 +) + +var ( + gzipMagic = []byte{0x1F, 0x8B, 0x08} + zstdMagic = []byte{0x28, 0xb5, 0x2f, 0xfd} +) + +type matcher = func([]byte) bool + +func magicNumberMatcher(m []byte) matcher { + return func(source []byte) bool { + return bytes.HasPrefix(source, m) + } +} + +// zstdMatcher detects zstd compression algorithm. +// There are two frame formats defined by Zstandard: Zstandard frames and Skippable frames. +// See https://tools.ietf.org/id/draft-kucherawy-dispatch-zstd-00.html#rfc.section.2 for more details. +func zstdMatcher() matcher { + return func(source []byte) bool { + if bytes.HasPrefix(source, zstdMagic) { + // Zstandard frame + return true + } + // skippable frame + if len(source) < 8 { + return false + } + // magic number from 0x184D2A50 to 0x184D2A5F. + if binary.LittleEndian.Uint32(source[:4])&zstdMagicSkippableMask == zstdMagicSkippableStart { + return true + } + return false + } +} + +// DetectCompression detects the compression algorithm of the source. +func DetectCompression(source []byte) Compression { + for compression, fn := range map[Compression]matcher{ + Gzip: magicNumberMatcher(gzipMagic), + Zstd: zstdMatcher(), + } { + if fn(source) { + return compression + } + } + return Uncompressed +} + +// DecompressStream decompresses the archive and returns a ReaderCloser with the decompressed archive. +func DecompressStream(archive io.Reader) (DecompressReadCloser, error) { + buf := newBufferedReader(archive) + bs, err := buf.Peek(10) + if err != nil && err != io.EOF { + // Note: we'll ignore any io.EOF error because there are some odd + // cases where the layer.tar file will be empty (zero bytes) and + // that results in an io.EOF from the Peek() call. So, in those + // cases we'll just treat it as a non-compressed stream and + // that means just create an empty layer. + // See Issue docker/docker#18170 + return nil, err + } + + switch compression := DetectCompression(bs); compression { + case Uncompressed: + return &readCloserWrapper{ + Reader: buf, + compression: compression, + }, nil + case Gzip: + ctx, cancel := context.WithCancel(context.Background()) + gzReader, err := gzipDecompress(ctx, buf) + if err != nil { + cancel() + return nil, err + } + + return &readCloserWrapper{ + Reader: gzReader, + compression: compression, + closer: func() error { + cancel() + return gzReader.Close() + }, + }, nil + case Zstd: + zstdReader, err := zstd.NewReader(buf) + if err != nil { + return nil, err + } + return &readCloserWrapper{ + Reader: zstdReader, + compression: compression, + closer: func() error { + zstdReader.Close() + return nil + }, + }, nil + + default: + return nil, fmt.Errorf("unsupported compression format %s", (&compression).Extension()) + } +} + +// CompressStream compresses the dest with specified compression algorithm. +func CompressStream(dest io.Writer, compression Compression) (io.WriteCloser, error) { + switch compression { + case Uncompressed: + return &writeCloserWrapper{dest, nil}, nil + case Gzip: + return gzip.NewWriter(dest), nil + case Zstd: + return zstd.NewWriter(dest) + default: + return nil, fmt.Errorf("unsupported compression format %s", (&compression).Extension()) + } +} + +// Extension returns the extension of a file that uses the specified compression algorithm. +func (compression *Compression) Extension() string { + switch *compression { + case Gzip: + return "gz" + case Zstd: + return "zst" + } + return "" +} + +func gzipDecompress(ctx context.Context, buf io.Reader) (io.ReadCloser, error) { + initPigz.Do(func() { + if unpigzPath = detectPigz(); unpigzPath != "" { + log.L.Debug("using pigz for decompression") + } + }) + + if unpigzPath == "" { + return gzip.NewReader(buf) + } + + return cmdStream(exec.CommandContext(ctx, unpigzPath, "-d", "-c"), buf) +} + +func cmdStream(cmd *exec.Cmd, in io.Reader) (io.ReadCloser, error) { + reader, writer := io.Pipe() + + cmd.Stdin = in + cmd.Stdout = writer + + var errBuf bytes.Buffer + cmd.Stderr = &errBuf + + if err := cmd.Start(); err != nil { + return nil, err + } + + go func() { + if err := cmd.Wait(); err != nil { + writer.CloseWithError(fmt.Errorf("%s: %s", err, errBuf.String())) + } else { + writer.Close() + } + }() + + return reader, nil +} + +func detectPigz() string { + path, err := exec.LookPath("unpigz") + if err != nil { + log.L.WithError(err).Debug("unpigz not found, falling back to go gzip") + return "" + } + + // Check if pigz disabled via CONTAINERD_DISABLE_PIGZ env variable + value := os.Getenv(disablePigzEnv) + if value == "" { + return path + } + + disable, err := strconv.ParseBool(value) + if err != nil { + log.L.WithError(err).Warnf("could not parse %s: %s", disablePigzEnv, value) + return path + } + + if disable { + return "" + } + + return path +} diff --git a/vendor/github.com/containerd/containerd/archive/compression/compression_fuzzer.go b/vendor/github.com/containerd/containerd/archive/compression/compression_fuzzer.go new file mode 100644 index 000000000..3516494ac --- /dev/null +++ b/vendor/github.com/containerd/containerd/archive/compression/compression_fuzzer.go @@ -0,0 +1,28 @@ +//go:build gofuzz + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package compression + +import ( + "bytes" +) + +func FuzzDecompressStream(data []byte) int { + _, _ = DecompressStream(bytes.NewReader(data)) + return 1 +} diff --git a/vendor/github.com/containerd/containerd/content/adaptor.go b/vendor/github.com/containerd/containerd/content/adaptor.go new file mode 100644 index 000000000..88bad2610 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/adaptor.go @@ -0,0 +1,52 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package content + +import ( + "strings" + + "github.com/containerd/containerd/filters" +) + +// AdaptInfo returns `filters.Adaptor` that handles `content.Info`. +func AdaptInfo(info Info) filters.Adaptor { + return filters.AdapterFunc(func(fieldpath []string) (string, bool) { + if len(fieldpath) == 0 { + return "", false + } + + switch fieldpath[0] { + case "digest": + return info.Digest.String(), true + case "size": + // TODO: support size based filtering + case "labels": + return checkMap(fieldpath[1:], info.Labels) + } + + return "", false + }) +} + +func checkMap(fieldpath []string, m map[string]string) (string, bool) { + if len(m) == 0 { + return "", false + } + + value, ok := m[strings.Join(fieldpath, ".")] + return value, ok +} diff --git a/vendor/github.com/containerd/containerd/content/content.go b/vendor/github.com/containerd/containerd/content/content.go new file mode 100644 index 000000000..2dc7bf8b5 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/content.go @@ -0,0 +1,207 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package content + +import ( + "context" + "io" + "time" + + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// Store combines the methods of content-oriented interfaces into a set that +// are commonly provided by complete implementations. +// +// Overall content lifecycle: +// - Ingester is used to initiate a write operation (aka ingestion) +// - IngestManager is used to manage (e.g. list, abort) active ingestions +// - Once an ingestion is complete (see Writer.Commit), Provider is used to +// query a single piece of content by its digest +// - Manager is used to manage (e.g. list, delete) previously committed content +// +// Note that until ingestion is complete, its content is not visible through +// Provider or Manager. Once ingestion is complete, it is no longer exposed +// through IngestManager. +type Store interface { + Manager + Provider + IngestManager + Ingester +} + +// ReaderAt extends the standard io.ReaderAt interface with reporting of Size and io.Closer +type ReaderAt interface { + io.ReaderAt + io.Closer + Size() int64 +} + +// Provider provides a reader interface for specific content +type Provider interface { + // ReaderAt only requires desc.Digest to be set. + // Other fields in the descriptor may be used internally for resolving + // the location of the actual data. + ReaderAt(ctx context.Context, desc ocispec.Descriptor) (ReaderAt, error) +} + +// Ingester writes content +type Ingester interface { + // Writer initiates a writing operation (aka ingestion). A single ingestion + // is uniquely identified by its ref, provided using a WithRef option. + // Writer can be called multiple times with the same ref to access the same + // ingestion. + // Once all the data is written, use Writer.Commit to complete the ingestion. + Writer(ctx context.Context, opts ...WriterOpt) (Writer, error) +} + +// IngestManager provides methods for managing ingestions. An ingestion is a +// not-yet-complete writing operation initiated using Ingester and identified +// by a ref string. +type IngestManager interface { + // Status returns the status of the provided ref. + Status(ctx context.Context, ref string) (Status, error) + + // ListStatuses returns the status of any active ingestions whose ref match + // the provided regular expression. If empty, all active ingestions will be + // returned. + ListStatuses(ctx context.Context, filters ...string) ([]Status, error) + + // Abort completely cancels the ingest operation targeted by ref. + Abort(ctx context.Context, ref string) error +} + +// Info holds content specific information +type Info struct { + Digest digest.Digest + Size int64 + CreatedAt time.Time + UpdatedAt time.Time + Labels map[string]string +} + +// Status of a content operation (i.e. an ingestion) +type Status struct { + Ref string + Offset int64 + Total int64 + Expected digest.Digest + StartedAt time.Time + UpdatedAt time.Time +} + +// WalkFunc defines the callback for a blob walk. +type WalkFunc func(Info) error + +// InfoReaderProvider provides both info and reader for the specific content. +type InfoReaderProvider interface { + InfoProvider + Provider +} + +// InfoProvider provides info for content inspection. +type InfoProvider interface { + // Info will return metadata about content available in the content store. + // + // If the content is not present, ErrNotFound will be returned. + Info(ctx context.Context, dgst digest.Digest) (Info, error) +} + +// Manager provides methods for inspecting, listing and removing content. +type Manager interface { + InfoProvider + + // Update updates mutable information related to content. + // If one or more fieldpaths are provided, only those + // fields will be updated. + // Mutable fields: + // labels.* + Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error) + + // Walk will call fn for each item in the content store which + // match the provided filters. If no filters are given all + // items will be walked. + Walk(ctx context.Context, fn WalkFunc, filters ...string) error + + // Delete removes the content from the store. + Delete(ctx context.Context, dgst digest.Digest) error +} + +// Writer handles writing of content into a content store +type Writer interface { + // Close closes the writer, if the writer has not been + // committed this allows resuming or aborting. + // Calling Close on a closed writer will not error. + io.WriteCloser + + // Digest may return empty digest or panics until committed. + Digest() digest.Digest + + // Commit commits the blob (but no roll-back is guaranteed on an error). + // size and expected can be zero-value when unknown. + // Commit always closes the writer, even on error. + // ErrAlreadyExists aborts the writer. + Commit(ctx context.Context, size int64, expected digest.Digest, opts ...Opt) error + + // Status returns the current state of write + Status() (Status, error) + + // Truncate updates the size of the target blob + Truncate(size int64) error +} + +// Opt is used to alter the mutable properties of content +type Opt func(*Info) error + +// WithLabels allows labels to be set on content +func WithLabels(labels map[string]string) Opt { + return func(info *Info) error { + info.Labels = labels + return nil + } +} + +// WriterOpts is internally used by WriterOpt. +type WriterOpts struct { + Ref string + Desc ocispec.Descriptor +} + +// WriterOpt is used for passing options to Ingester.Writer. +type WriterOpt func(*WriterOpts) error + +// WithDescriptor specifies an OCI descriptor. +// Writer may optionally use the descriptor internally for resolving +// the location of the actual data. +// Write does not require any field of desc to be set. +// If the data size is unknown, desc.Size should be set to 0. +// Some implementations may also accept negative values as "unknown". +func WithDescriptor(desc ocispec.Descriptor) WriterOpt { + return func(opts *WriterOpts) error { + opts.Desc = desc + return nil + } +} + +// WithRef specifies a ref string. +func WithRef(ref string) WriterOpt { + return func(opts *WriterOpts) error { + opts.Ref = ref + return nil + } +} diff --git a/vendor/github.com/containerd/containerd/content/helpers.go b/vendor/github.com/containerd/containerd/content/helpers.go new file mode 100644 index 000000000..93bcdde10 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/helpers.go @@ -0,0 +1,340 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package content + +import ( + "context" + "errors" + "fmt" + "io" + "sync" + "time" + + "github.com/containerd/log" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/pkg/randutil" +) + +var ErrReset = errors.New("writer has been reset") + +var bufPool = sync.Pool{ + New: func() interface{} { + buffer := make([]byte, 1<<20) + return &buffer + }, +} + +type reader interface { + Reader() io.Reader +} + +// NewReader returns a io.Reader from a ReaderAt +func NewReader(ra ReaderAt) io.Reader { + if rd, ok := ra.(reader); ok { + return rd.Reader() + } + return io.NewSectionReader(ra, 0, ra.Size()) +} + +// ReadBlob retrieves the entire contents of the blob from the provider. +// +// Avoid using this for large blobs, such as layers. +func ReadBlob(ctx context.Context, provider Provider, desc ocispec.Descriptor) ([]byte, error) { + if int64(len(desc.Data)) == desc.Size && digest.FromBytes(desc.Data) == desc.Digest { + return desc.Data, nil + } + + ra, err := provider.ReaderAt(ctx, desc) + if err != nil { + return nil, err + } + defer ra.Close() + + p := make([]byte, ra.Size()) + + n, err := ra.ReadAt(p, 0) + if err == io.EOF { + if int64(n) != ra.Size() { + err = io.ErrUnexpectedEOF + } else { + err = nil + } + } + return p, err +} + +// WriteBlob writes data with the expected digest into the content store. If +// expected already exists, the method returns immediately and the reader will +// not be consumed. +// +// This is useful when the digest and size are known beforehand. +// +// Copy is buffered, so no need to wrap reader in buffered io. +func WriteBlob(ctx context.Context, cs Ingester, ref string, r io.Reader, desc ocispec.Descriptor, opts ...Opt) error { + cw, err := OpenWriter(ctx, cs, WithRef(ref), WithDescriptor(desc)) + if err != nil { + if !errdefs.IsAlreadyExists(err) { + return fmt.Errorf("failed to open writer: %w", err) + } + + return nil // already present + } + defer cw.Close() + + return Copy(ctx, cw, r, desc.Size, desc.Digest, opts...) +} + +// OpenWriter opens a new writer for the given reference, retrying if the writer +// is locked until the reference is available or returns an error. +func OpenWriter(ctx context.Context, cs Ingester, opts ...WriterOpt) (Writer, error) { + var ( + cw Writer + err error + retry = 16 + ) + for { + cw, err = cs.Writer(ctx, opts...) + if err != nil { + if !errdefs.IsUnavailable(err) { + return nil, err + } + + // TODO: Check status to determine if the writer is active, + // continue waiting while active, otherwise return lock + // error or abort. Requires asserting for an ingest manager + + select { + case <-time.After(time.Millisecond * time.Duration(randutil.Intn(retry))): + if retry < 2048 { + retry = retry << 1 + } + continue + case <-ctx.Done(): + // Propagate lock error + return nil, err + } + + } + break + } + + return cw, err +} + +// Copy copies data with the expected digest from the reader into the +// provided content store writer. This copy commits the writer. +// +// This is useful when the digest and size are known beforehand. When +// the size or digest is unknown, these values may be empty. +// +// Copy is buffered, so no need to wrap reader in buffered io. +func Copy(ctx context.Context, cw Writer, or io.Reader, size int64, expected digest.Digest, opts ...Opt) error { + ws, err := cw.Status() + if err != nil { + return fmt.Errorf("failed to get status: %w", err) + } + r := or + if ws.Offset > 0 { + r, err = seekReader(or, ws.Offset, size) + if err != nil { + return fmt.Errorf("unable to resume write to %v: %w", ws.Ref, err) + } + } + + for i := 0; ; i++ { + if i >= 1 { + log.G(ctx).WithField("digest", expected).Debugf("retrying copy due to reset") + } + copied, err := copyWithBuffer(cw, r) + if errors.Is(err, ErrReset) { + ws, err := cw.Status() + if err != nil { + return fmt.Errorf("failed to get status: %w", err) + } + r, err = seekReader(or, ws.Offset, size) + if err != nil { + return fmt.Errorf("unable to resume write to %v: %w", ws.Ref, err) + } + continue + } + if err != nil { + return fmt.Errorf("failed to copy: %w", err) + } + if size != 0 && copied < size-ws.Offset { + // Short writes would return its own error, this indicates a read failure + return fmt.Errorf("failed to read expected number of bytes: %w", io.ErrUnexpectedEOF) + } + if err := cw.Commit(ctx, size, expected, opts...); err != nil { + if errors.Is(err, ErrReset) { + ws, err := cw.Status() + if err != nil { + return fmt.Errorf("failed to get status: %w", err) + } + r, err = seekReader(or, ws.Offset, size) + if err != nil { + return fmt.Errorf("unable to resume write to %v: %w", ws.Ref, err) + } + continue + } + if !errdefs.IsAlreadyExists(err) { + return fmt.Errorf("failed commit on ref %q: %w", ws.Ref, err) + } + } + return nil + } +} + +// CopyReaderAt copies to a writer from a given reader at for the given +// number of bytes. This copy does not commit the writer. +func CopyReaderAt(cw Writer, ra ReaderAt, n int64) error { + ws, err := cw.Status() + if err != nil { + return err + } + + copied, err := copyWithBuffer(cw, io.NewSectionReader(ra, ws.Offset, n)) + if err != nil { + return fmt.Errorf("failed to copy: %w", err) + } + if copied < n { + // Short writes would return its own error, this indicates a read failure + return fmt.Errorf("failed to read expected number of bytes: %w", io.ErrUnexpectedEOF) + } + return nil +} + +// CopyReader copies to a writer from a given reader, returning +// the number of bytes copied. +// Note: if the writer has a non-zero offset, the total number +// of bytes read may be greater than those copied if the reader +// is not an io.Seeker. +// This copy does not commit the writer. +func CopyReader(cw Writer, r io.Reader) (int64, error) { + ws, err := cw.Status() + if err != nil { + return 0, fmt.Errorf("failed to get status: %w", err) + } + + if ws.Offset > 0 { + r, err = seekReader(r, ws.Offset, 0) + if err != nil { + return 0, fmt.Errorf("unable to resume write to %v: %w", ws.Ref, err) + } + } + + return copyWithBuffer(cw, r) +} + +// seekReader attempts to seek the reader to the given offset, either by +// resolving `io.Seeker`, by detecting `io.ReaderAt`, or discarding +// up to the given offset. +func seekReader(r io.Reader, offset, size int64) (io.Reader, error) { + // attempt to resolve r as a seeker and setup the offset. + seeker, ok := r.(io.Seeker) + if ok { + nn, err := seeker.Seek(offset, io.SeekStart) + if nn != offset { + if err == nil { + err = fmt.Errorf("unexpected seek location without seek error") + } + return nil, fmt.Errorf("failed to seek to offset %v: %w", offset, err) + } + + if err != nil { + return nil, err + } + + return r, nil + } + + // ok, let's try io.ReaderAt! + readerAt, ok := r.(io.ReaderAt) + if ok && size > offset { + sr := io.NewSectionReader(readerAt, offset, size) + return sr, nil + } + + // well then, let's just discard up to the offset + n, err := copyWithBuffer(io.Discard, io.LimitReader(r, offset)) + if err != nil { + return nil, fmt.Errorf("failed to discard to offset: %w", err) + } + if n != offset { + return nil, errors.New("unable to discard to offset") + } + + return r, nil +} + +// copyWithBuffer is very similar to io.CopyBuffer https://golang.org/pkg/io/#CopyBuffer +// but instead of using Read to read from the src, we use ReadAtLeast to make sure we have +// a full buffer before we do a write operation to dst to reduce overheads associated +// with the write operations of small buffers. +func copyWithBuffer(dst io.Writer, src io.Reader) (written int64, err error) { + // If the reader has a WriteTo method, use it to do the copy. + // Avoids an allocation and a copy. + if wt, ok := src.(io.WriterTo); ok { + return wt.WriteTo(dst) + } + // Similarly, if the writer has a ReadFrom method, use it to do the copy. + if rt, ok := dst.(io.ReaderFrom); ok { + return rt.ReadFrom(src) + } + bufRef := bufPool.Get().(*[]byte) + defer bufPool.Put(bufRef) + buf := *bufRef + for { + nr, er := io.ReadAtLeast(src, buf, len(buf)) + if nr > 0 { + nw, ew := dst.Write(buf[0:nr]) + if nw > 0 { + written += int64(nw) + } + if ew != nil { + err = ew + break + } + if nr != nw { + err = io.ErrShortWrite + break + } + } + if er != nil { + // If an EOF happens after reading fewer than the requested bytes, + // ReadAtLeast returns ErrUnexpectedEOF. + if er != io.EOF && er != io.ErrUnexpectedEOF { + err = er + } + break + } + } + return +} + +// Exists returns whether an attempt to access the content would not error out +// with an ErrNotFound error. It will return an encountered error if it was +// different than ErrNotFound. +func Exists(ctx context.Context, provider InfoProvider, desc ocispec.Descriptor) (bool, error) { + _, err := provider.Info(ctx, desc.Digest) + if errdefs.IsNotFound(err) { + return false, nil + } + return err == nil, err +} diff --git a/vendor/github.com/containerd/containerd/content/local/content_local_fuzzer.go b/vendor/github.com/containerd/containerd/content/local/content_local_fuzzer.go new file mode 100644 index 000000000..a523f28d9 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/content_local_fuzzer.go @@ -0,0 +1,76 @@ +//go:build gofuzz + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "bufio" + "bytes" + "context" + _ "crypto/sha256" + "io" + "testing" + + "github.com/opencontainers/go-digest" + + "github.com/containerd/containerd/content" +) + +func FuzzContentStoreWriter(data []byte) int { + t := &testing.T{} + ctx := context.Background() + ctx, _, cs, cleanup := contentStoreEnv(t) + defer cleanup() + + cw, err := cs.Writer(ctx, content.WithRef("myref")) + if err != nil { + return 0 + } + if err := cw.Close(); err != nil { + return 0 + } + + // reopen, so we can test things + cw, err = cs.Writer(ctx, content.WithRef("myref")) + if err != nil { + return 0 + } + + err = checkCopyFuzz(int64(len(data)), cw, bufio.NewReader(io.NopCloser(bytes.NewReader(data)))) + if err != nil { + return 0 + } + expected := digest.FromBytes(data) + + if err = cw.Commit(ctx, int64(len(data)), expected); err != nil { + return 0 + } + return 1 +} + +func checkCopyFuzz(size int64, dst io.Writer, src io.Reader) error { + nn, err := io.Copy(dst, src) + if err != nil { + return err + } + + if nn != size { + return err + } + return nil +} diff --git a/vendor/github.com/containerd/containerd/content/local/locks.go b/vendor/github.com/containerd/containerd/content/local/locks.go new file mode 100644 index 000000000..1e59f39b3 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/locks.go @@ -0,0 +1,62 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "fmt" + "sync" + "time" + + "github.com/containerd/containerd/errdefs" +) + +// Handles locking references + +type lock struct { + since time.Time +} + +var ( + // locks lets us lock in process + locks = make(map[string]*lock) + locksMu sync.Mutex +) + +func tryLock(ref string) error { + locksMu.Lock() + defer locksMu.Unlock() + + if v, ok := locks[ref]; ok { + // Returning the duration may help developers distinguish dead locks (long duration) from + // lock contentions (short duration). + now := time.Now() + return fmt.Errorf( + "ref %s locked for %s (since %s): %w", ref, now.Sub(v.since), v.since, + errdefs.ErrUnavailable, + ) + } + + locks[ref] = &lock{time.Now()} + return nil +} + +func unlock(ref string) { + locksMu.Lock() + defer locksMu.Unlock() + + delete(locks, ref) +} diff --git a/vendor/github.com/containerd/containerd/content/local/readerat.go b/vendor/github.com/containerd/containerd/content/local/readerat.go new file mode 100644 index 000000000..899e85c0b --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/readerat.go @@ -0,0 +1,72 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "fmt" + "io" + "os" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" +) + +// readerat implements io.ReaderAt in a completely stateless manner by opening +// the referenced file for each call to ReadAt. +type sizeReaderAt struct { + size int64 + fp *os.File +} + +// OpenReader creates ReaderAt from a file +func OpenReader(p string) (content.ReaderAt, error) { + fi, err := os.Stat(p) + if err != nil { + if !os.IsNotExist(err) { + return nil, err + } + + return nil, fmt.Errorf("blob not found: %w", errdefs.ErrNotFound) + } + + fp, err := os.Open(p) + if err != nil { + if !os.IsNotExist(err) { + return nil, err + } + + return nil, fmt.Errorf("blob not found: %w", errdefs.ErrNotFound) + } + + return sizeReaderAt{size: fi.Size(), fp: fp}, nil +} + +func (ra sizeReaderAt) ReadAt(p []byte, offset int64) (int, error) { + return ra.fp.ReadAt(p, offset) +} + +func (ra sizeReaderAt) Size() int64 { + return ra.size +} + +func (ra sizeReaderAt) Close() error { + return ra.fp.Close() +} + +func (ra sizeReaderAt) Reader() io.Reader { + return io.LimitReader(ra.fp, ra.size) +} diff --git a/vendor/github.com/containerd/containerd/content/local/store.go b/vendor/github.com/containerd/containerd/content/local/store.go new file mode 100644 index 000000000..e1baee4c2 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/store.go @@ -0,0 +1,705 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "context" + "fmt" + "io" + "os" + "path/filepath" + "strconv" + "strings" + "sync" + "time" + + "github.com/containerd/log" + "github.com/sirupsen/logrus" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/filters" + "github.com/containerd/containerd/pkg/randutil" + + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +var bufPool = sync.Pool{ + New: func() interface{} { + buffer := make([]byte, 1<<20) + return &buffer + }, +} + +// LabelStore is used to store mutable labels for digests +type LabelStore interface { + // Get returns all the labels for the given digest + Get(digest.Digest) (map[string]string, error) + + // Set sets all the labels for a given digest + Set(digest.Digest, map[string]string) error + + // Update replaces the given labels for a digest, + // a key with an empty value removes a label. + Update(digest.Digest, map[string]string) (map[string]string, error) +} + +// Store is digest-keyed store for content. All data written into the store is +// stored under a verifiable digest. +// +// Store can generally support multi-reader, single-writer ingest of data, +// including resumable ingest. +type store struct { + root string + ls LabelStore +} + +// NewStore returns a local content store +func NewStore(root string) (content.Store, error) { + return NewLabeledStore(root, nil) +} + +// NewLabeledStore returns a new content store using the provided label store +// +// Note: content stores which are used underneath a metadata store may not +// require labels and should use `NewStore`. `NewLabeledStore` is primarily +// useful for tests or standalone implementations. +func NewLabeledStore(root string, ls LabelStore) (content.Store, error) { + if err := os.MkdirAll(filepath.Join(root, "ingest"), 0777); err != nil { + return nil, err + } + + return &store{ + root: root, + ls: ls, + }, nil +} + +func (s *store) Info(ctx context.Context, dgst digest.Digest) (content.Info, error) { + p, err := s.blobPath(dgst) + if err != nil { + return content.Info{}, fmt.Errorf("calculating blob info path: %w", err) + } + + fi, err := os.Stat(p) + if err != nil { + if os.IsNotExist(err) { + err = fmt.Errorf("content %v: %w", dgst, errdefs.ErrNotFound) + } + + return content.Info{}, err + } + var labels map[string]string + if s.ls != nil { + labels, err = s.ls.Get(dgst) + if err != nil { + return content.Info{}, err + } + } + return s.info(dgst, fi, labels), nil +} + +func (s *store) info(dgst digest.Digest, fi os.FileInfo, labels map[string]string) content.Info { + return content.Info{ + Digest: dgst, + Size: fi.Size(), + CreatedAt: fi.ModTime(), + UpdatedAt: getATime(fi), + Labels: labels, + } +} + +// ReaderAt returns an io.ReaderAt for the blob. +func (s *store) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error) { + p, err := s.blobPath(desc.Digest) + if err != nil { + return nil, fmt.Errorf("calculating blob path for ReaderAt: %w", err) + } + + reader, err := OpenReader(p) + if err != nil { + return nil, fmt.Errorf("blob %s expected at %s: %w", desc.Digest, p, err) + } + + return reader, nil +} + +// Delete removes a blob by its digest. +// +// While this is safe to do concurrently, safe exist-removal logic must hold +// some global lock on the store. +func (s *store) Delete(ctx context.Context, dgst digest.Digest) error { + bp, err := s.blobPath(dgst) + if err != nil { + return fmt.Errorf("calculating blob path for delete: %w", err) + } + + if err := os.RemoveAll(bp); err != nil { + if !os.IsNotExist(err) { + return err + } + + return fmt.Errorf("content %v: %w", dgst, errdefs.ErrNotFound) + } + + return nil +} + +func (s *store) Update(ctx context.Context, info content.Info, fieldpaths ...string) (content.Info, error) { + if s.ls == nil { + return content.Info{}, fmt.Errorf("update not supported on immutable content store: %w", errdefs.ErrFailedPrecondition) + } + + p, err := s.blobPath(info.Digest) + if err != nil { + return content.Info{}, fmt.Errorf("calculating blob path for update: %w", err) + } + + fi, err := os.Stat(p) + if err != nil { + if os.IsNotExist(err) { + err = fmt.Errorf("content %v: %w", info.Digest, errdefs.ErrNotFound) + } + + return content.Info{}, err + } + + var ( + all bool + labels map[string]string + ) + if len(fieldpaths) > 0 { + for _, path := range fieldpaths { + if strings.HasPrefix(path, "labels.") { + if labels == nil { + labels = map[string]string{} + } + + key := strings.TrimPrefix(path, "labels.") + labels[key] = info.Labels[key] + continue + } + + switch path { + case "labels": + all = true + labels = info.Labels + default: + return content.Info{}, fmt.Errorf("cannot update %q field on content info %q: %w", path, info.Digest, errdefs.ErrInvalidArgument) + } + } + } else { + all = true + labels = info.Labels + } + + if all { + err = s.ls.Set(info.Digest, labels) + } else { + labels, err = s.ls.Update(info.Digest, labels) + } + if err != nil { + return content.Info{}, err + } + + info = s.info(info.Digest, fi, labels) + info.UpdatedAt = time.Now() + + if err := os.Chtimes(p, info.UpdatedAt, info.CreatedAt); err != nil { + log.G(ctx).WithError(err).Warnf("could not change access time for %s", info.Digest) + } + + return info, nil +} + +func (s *store) Walk(ctx context.Context, fn content.WalkFunc, fs ...string) error { + root := filepath.Join(s.root, "blobs") + + filter, err := filters.ParseAll(fs...) + if err != nil { + return err + } + + var alg digest.Algorithm + return filepath.Walk(root, func(path string, fi os.FileInfo, err error) error { + if err != nil { + return err + } + if !fi.IsDir() && !alg.Available() { + return nil + } + + // TODO(stevvooe): There are few more cases with subdirs that should be + // handled in case the layout gets corrupted. This isn't strict enough + // and may spew bad data. + + if path == root { + return nil + } + if filepath.Dir(path) == root { + alg = digest.Algorithm(filepath.Base(path)) + + if !alg.Available() { + alg = "" + return filepath.SkipDir + } + + // descending into a hash directory + return nil + } + + dgst := digest.NewDigestFromEncoded(alg, filepath.Base(path)) + if err := dgst.Validate(); err != nil { + // log error but don't report + log.L.WithError(err).WithField("path", path).Error("invalid digest for blob path") + // if we see this, it could mean some sort of corruption of the + // store or extra paths not expected previously. + } + + var labels map[string]string + if s.ls != nil { + labels, err = s.ls.Get(dgst) + if err != nil { + return err + } + } + + info := s.info(dgst, fi, labels) + if !filter.Match(content.AdaptInfo(info)) { + return nil + } + return fn(info) + }) +} + +func (s *store) Status(ctx context.Context, ref string) (content.Status, error) { + return s.status(s.ingestRoot(ref)) +} + +func (s *store) ListStatuses(ctx context.Context, fs ...string) ([]content.Status, error) { + fp, err := os.Open(filepath.Join(s.root, "ingest")) + if err != nil { + return nil, err + } + + defer fp.Close() + + fis, err := fp.Readdir(-1) + if err != nil { + return nil, err + } + + filter, err := filters.ParseAll(fs...) + if err != nil { + return nil, err + } + + var active []content.Status + for _, fi := range fis { + p := filepath.Join(s.root, "ingest", fi.Name()) + stat, err := s.status(p) + if err != nil { + if !os.IsNotExist(err) { + return nil, err + } + + // TODO(stevvooe): This is a common error if uploads are being + // completed while making this listing. Need to consider taking a + // lock on the whole store to coordinate this aspect. + // + // Another option is to cleanup downloads asynchronously and + // coordinate this method with the cleanup process. + // + // For now, we just skip them, as they really don't exist. + continue + } + + if filter.Match(adaptStatus(stat)) { + active = append(active, stat) + } + } + + return active, nil +} + +// WalkStatusRefs is used to walk all status references +// Failed status reads will be logged and ignored, if +// this function is called while references are being altered, +// these error messages may be produced. +func (s *store) WalkStatusRefs(ctx context.Context, fn func(string) error) error { + fp, err := os.Open(filepath.Join(s.root, "ingest")) + if err != nil { + return err + } + + defer fp.Close() + + fis, err := fp.Readdir(-1) + if err != nil { + return err + } + + for _, fi := range fis { + rf := filepath.Join(s.root, "ingest", fi.Name(), "ref") + + ref, err := readFileString(rf) + if err != nil { + log.G(ctx).WithError(err).WithField("path", rf).Error("failed to read ingest ref") + continue + } + + if err := fn(ref); err != nil { + return err + } + } + + return nil +} + +// status works like stat above except uses the path to the ingest. +func (s *store) status(ingestPath string) (content.Status, error) { + dp := filepath.Join(ingestPath, "data") + fi, err := os.Stat(dp) + if err != nil { + if os.IsNotExist(err) { + err = fmt.Errorf("%s: %w", err.Error(), errdefs.ErrNotFound) + } + return content.Status{}, err + } + + ref, err := readFileString(filepath.Join(ingestPath, "ref")) + if err != nil { + if os.IsNotExist(err) { + err = fmt.Errorf("%s: %w", err.Error(), errdefs.ErrNotFound) + } + return content.Status{}, err + } + + startedAt, err := readFileTimestamp(filepath.Join(ingestPath, "startedat")) + if err != nil { + return content.Status{}, fmt.Errorf("could not read startedat: %w", err) + } + + updatedAt, err := readFileTimestamp(filepath.Join(ingestPath, "updatedat")) + if err != nil { + return content.Status{}, fmt.Errorf("could not read updatedat: %w", err) + } + + // because we don't write updatedat on every write, the mod time may + // actually be more up to date. + if fi.ModTime().After(updatedAt) { + updatedAt = fi.ModTime() + } + + return content.Status{ + Ref: ref, + Offset: fi.Size(), + Total: s.total(ingestPath), + UpdatedAt: updatedAt, + StartedAt: startedAt, + }, nil +} + +func adaptStatus(status content.Status) filters.Adaptor { + return filters.AdapterFunc(func(fieldpath []string) (string, bool) { + if len(fieldpath) == 0 { + return "", false + } + switch fieldpath[0] { + case "ref": + return status.Ref, true + } + + return "", false + }) +} + +// total attempts to resolve the total expected size for the write. +func (s *store) total(ingestPath string) int64 { + totalS, err := readFileString(filepath.Join(ingestPath, "total")) + if err != nil { + return 0 + } + + total, err := strconv.ParseInt(totalS, 10, 64) + if err != nil { + // represents a corrupted file, should probably remove. + return 0 + } + + return total +} + +// Writer begins or resumes the active writer identified by ref. If the writer +// is already in use, an error is returned. Only one writer may be in use per +// ref at a time. +// +// The argument `ref` is used to uniquely identify a long-lived writer transaction. +func (s *store) Writer(ctx context.Context, opts ...content.WriterOpt) (content.Writer, error) { + var wOpts content.WriterOpts + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil, err + } + } + // TODO(AkihiroSuda): we could create a random string or one calculated based on the context + // https://github.com/containerd/containerd/issues/2129#issuecomment-380255019 + if wOpts.Ref == "" { + return nil, fmt.Errorf("ref must not be empty: %w", errdefs.ErrInvalidArgument) + } + var lockErr error + for count := uint64(0); count < 10; count++ { + if err := tryLock(wOpts.Ref); err != nil { + if !errdefs.IsUnavailable(err) { + return nil, err + } + + lockErr = err + } else { + lockErr = nil + break + } + time.Sleep(time.Millisecond * time.Duration(randutil.Intn(1< 0 && status.Total > 0 && total != status.Total { + return status, fmt.Errorf("provided total differs from status: %v != %v", total, status.Total) + } + + //nolint:dupword + // TODO(stevvooe): slow slow slow!!, send to goroutine or use resumable hashes + fp, err := os.Open(data) + if err != nil { + return status, err + } + + p := bufPool.Get().(*[]byte) + status.Offset, err = io.CopyBuffer(digester.Hash(), fp, *p) + bufPool.Put(p) + fp.Close() + return status, err +} + +// writer provides the main implementation of the Writer method. The caller +// must hold the lock correctly and release on error if there is a problem. +func (s *store) writer(ctx context.Context, ref string, total int64, expected digest.Digest) (content.Writer, error) { + // TODO(stevvooe): Need to actually store expected here. We have + // code in the service that shouldn't be dealing with this. + if expected != "" { + p, err := s.blobPath(expected) + if err != nil { + return nil, fmt.Errorf("calculating expected blob path for writer: %w", err) + } + if _, err := os.Stat(p); err == nil { + return nil, fmt.Errorf("content %v: %w", expected, errdefs.ErrAlreadyExists) + } + } + + path, refp, data := s.ingestPaths(ref) + + var ( + digester = digest.Canonical.Digester() + offset int64 + startedAt time.Time + updatedAt time.Time + ) + + foundValidIngest := false + // ensure that the ingest path has been created. + if err := os.Mkdir(path, 0755); err != nil { + if !os.IsExist(err) { + return nil, err + } + status, err := s.resumeStatus(ref, total, digester) + if err == nil { + foundValidIngest = true + updatedAt = status.UpdatedAt + startedAt = status.StartedAt + total = status.Total + offset = status.Offset + } else { + logrus.Infof("failed to resume the status from path %s: %s. will recreate them", path, err.Error()) + } + } + + if !foundValidIngest { + startedAt = time.Now() + updatedAt = startedAt + + // the ingest is new, we need to setup the target location. + // write the ref to a file for later use + if err := os.WriteFile(refp, []byte(ref), 0666); err != nil { + return nil, err + } + + if err := writeTimestampFile(filepath.Join(path, "startedat"), startedAt); err != nil { + return nil, err + } + + if err := writeTimestampFile(filepath.Join(path, "updatedat"), startedAt); err != nil { + return nil, err + } + + if total > 0 { + if err := os.WriteFile(filepath.Join(path, "total"), []byte(fmt.Sprint(total)), 0666); err != nil { + return nil, err + } + } + } + + fp, err := os.OpenFile(data, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + return nil, fmt.Errorf("failed to open data file: %w", err) + } + + if _, err := fp.Seek(offset, io.SeekStart); err != nil { + fp.Close() + return nil, fmt.Errorf("could not seek to current write offset: %w", err) + } + + return &writer{ + s: s, + fp: fp, + ref: ref, + path: path, + offset: offset, + total: total, + digester: digester, + startedAt: startedAt, + updatedAt: updatedAt, + }, nil +} + +// Abort an active transaction keyed by ref. If the ingest is active, it will +// be cancelled. Any resources associated with the ingest will be cleaned. +func (s *store) Abort(ctx context.Context, ref string) error { + root := s.ingestRoot(ref) + if err := os.RemoveAll(root); err != nil { + if os.IsNotExist(err) { + return fmt.Errorf("ingest ref %q: %w", ref, errdefs.ErrNotFound) + } + + return err + } + + return nil +} + +func (s *store) blobPath(dgst digest.Digest) (string, error) { + if err := dgst.Validate(); err != nil { + return "", fmt.Errorf("cannot calculate blob path from invalid digest: %v: %w", err, errdefs.ErrInvalidArgument) + } + + return filepath.Join(s.root, "blobs", dgst.Algorithm().String(), dgst.Encoded()), nil +} + +func (s *store) ingestRoot(ref string) string { + // we take a digest of the ref to keep the ingest paths constant length. + // Note that this is not the current or potential digest of incoming content. + dgst := digest.FromString(ref) + return filepath.Join(s.root, "ingest", dgst.Encoded()) +} + +// ingestPaths are returned. The paths are the following: +// +// - root: entire ingest directory +// - ref: name of the starting ref, must be unique +// - data: file where data is written +func (s *store) ingestPaths(ref string) (string, string, string) { + var ( + fp = s.ingestRoot(ref) + rp = filepath.Join(fp, "ref") + dp = filepath.Join(fp, "data") + ) + + return fp, rp, dp +} + +func readFileString(path string) (string, error) { + p, err := os.ReadFile(path) + return string(p), err +} + +// readFileTimestamp reads a file with just a timestamp present. +func readFileTimestamp(p string) (time.Time, error) { + b, err := os.ReadFile(p) + if err != nil { + if os.IsNotExist(err) { + err = fmt.Errorf("%s: %w", err.Error(), errdefs.ErrNotFound) + } + return time.Time{}, err + } + + var t time.Time + if err := t.UnmarshalText(b); err != nil { + return time.Time{}, fmt.Errorf("could not parse timestamp file %v: %w", p, err) + } + + return t, nil +} + +func writeTimestampFile(p string, t time.Time) error { + b, err := t.MarshalText() + if err != nil { + return err + } + return writeToCompletion(p, b, 0666) +} + +func writeToCompletion(path string, data []byte, mode os.FileMode) error { + tmp := fmt.Sprintf("%s.tmp", path) + f, err := os.OpenFile(tmp, os.O_RDWR|os.O_CREATE|os.O_TRUNC|os.O_SYNC, mode) + if err != nil { + return fmt.Errorf("create tmp file: %w", err) + } + _, err = f.Write(data) + f.Close() + if err != nil { + return fmt.Errorf("write tmp file: %w", err) + } + err = os.Rename(tmp, path) + if err != nil { + return fmt.Errorf("rename tmp file: %w", err) + } + return nil +} diff --git a/vendor/github.com/containerd/containerd/content/local/store_bsd.go b/vendor/github.com/containerd/containerd/content/local/store_bsd.go new file mode 100644 index 000000000..7dcc19232 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/store_bsd.go @@ -0,0 +1,33 @@ +//go:build darwin || freebsd || netbsd + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" + "syscall" + "time" +) + +func getATime(fi os.FileInfo) time.Time { + if st, ok := fi.Sys().(*syscall.Stat_t); ok { + return time.Unix(st.Atimespec.Unix()) + } + + return fi.ModTime() +} diff --git a/vendor/github.com/containerd/containerd/content/local/store_openbsd.go b/vendor/github.com/containerd/containerd/content/local/store_openbsd.go new file mode 100644 index 000000000..45dfa9997 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/store_openbsd.go @@ -0,0 +1,33 @@ +//go:build openbsd + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" + "syscall" + "time" +) + +func getATime(fi os.FileInfo) time.Time { + if st, ok := fi.Sys().(*syscall.Stat_t); ok { + return time.Unix(st.Atim.Unix()) + } + + return fi.ModTime() +} diff --git a/vendor/github.com/containerd/containerd/content/local/store_unix.go b/vendor/github.com/containerd/containerd/content/local/store_unix.go new file mode 100644 index 000000000..cb01c91c7 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/store_unix.go @@ -0,0 +1,33 @@ +//go:build linux || solaris + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" + "syscall" + "time" +) + +func getATime(fi os.FileInfo) time.Time { + if st, ok := fi.Sys().(*syscall.Stat_t); ok { + return time.Unix(st.Atim.Unix()) + } + + return fi.ModTime() +} diff --git a/vendor/github.com/containerd/containerd/content/local/store_windows.go b/vendor/github.com/containerd/containerd/content/local/store_windows.go new file mode 100644 index 000000000..bce849979 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/store_windows.go @@ -0,0 +1,26 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" + "time" +) + +func getATime(fi os.FileInfo) time.Time { + return fi.ModTime() +} diff --git a/vendor/github.com/containerd/containerd/content/local/test_helper.go b/vendor/github.com/containerd/containerd/content/local/test_helper.go new file mode 100644 index 000000000..42de01cae --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/test_helper.go @@ -0,0 +1,38 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "context" + "testing" + + "github.com/containerd/containerd/content" +) + +func contentStoreEnv(t testing.TB) (context.Context, string, content.Store, func()) { + tmpdir := t.TempDir() + + cs, err := NewStore(tmpdir) + if err != nil { + t.Fatal(err) + } + + ctx, cancel := context.WithCancel(context.Background()) + return ctx, tmpdir, cs, func() { + cancel() + } +} diff --git a/vendor/github.com/containerd/containerd/content/local/writer.go b/vendor/github.com/containerd/containerd/content/local/writer.go new file mode 100644 index 000000000..0cd8f2d04 --- /dev/null +++ b/vendor/github.com/containerd/containerd/content/local/writer.go @@ -0,0 +1,209 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "context" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "runtime" + "time" + + "github.com/containerd/log" + "github.com/opencontainers/go-digest" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" +) + +// writer represents a write transaction against the blob store. +type writer struct { + s *store + fp *os.File // opened data file + path string // path to writer dir + ref string // ref key + offset int64 + total int64 + digester digest.Digester + startedAt time.Time + updatedAt time.Time +} + +func (w *writer) Status() (content.Status, error) { + return content.Status{ + Ref: w.ref, + Offset: w.offset, + Total: w.total, + StartedAt: w.startedAt, + UpdatedAt: w.updatedAt, + }, nil +} + +// Digest returns the current digest of the content, up to the current write. +// +// Cannot be called concurrently with `Write`. +func (w *writer) Digest() digest.Digest { + return w.digester.Digest() +} + +// Write p to the transaction. +// +// Note that writes are unbuffered to the backing file. When writing, it is +// recommended to wrap in a bufio.Writer or, preferably, use io.CopyBuffer. +func (w *writer) Write(p []byte) (n int, err error) { + n, err = w.fp.Write(p) + w.digester.Hash().Write(p[:n]) + w.offset += int64(len(p)) + w.updatedAt = time.Now() + return n, err +} + +func (w *writer) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + // Ensure even on error the writer is fully closed + defer unlock(w.ref) + + var base content.Info + for _, opt := range opts { + if err := opt(&base); err != nil { + return err + } + } + + fp := w.fp + w.fp = nil + + if fp == nil { + return fmt.Errorf("cannot commit on closed writer: %w", errdefs.ErrFailedPrecondition) + } + + if err := fp.Sync(); err != nil { + fp.Close() + return fmt.Errorf("sync failed: %w", err) + } + + fi, err := fp.Stat() + closeErr := fp.Close() + if err != nil { + return fmt.Errorf("stat on ingest file failed: %w", err) + } + if closeErr != nil { + return fmt.Errorf("failed to close ingest file: %w", closeErr) + } + + if size > 0 && size != fi.Size() { + return fmt.Errorf("unexpected commit size %d, expected %d: %w", fi.Size(), size, errdefs.ErrFailedPrecondition) + } + + dgst := w.digester.Digest() + if expected != "" && expected != dgst { + return fmt.Errorf("unexpected commit digest %s, expected %s: %w", dgst, expected, errdefs.ErrFailedPrecondition) + } + + var ( + ingest = filepath.Join(w.path, "data") + target, _ = w.s.blobPath(dgst) // ignore error because we calculated this dgst + ) + + // make sure parent directories of blob exist + if err := os.MkdirAll(filepath.Dir(target), 0755); err != nil { + return err + } + + if _, err := os.Stat(target); err == nil { + // collision with the target file! + if err := os.RemoveAll(w.path); err != nil { + log.G(ctx).WithField("ref", w.ref).WithField("path", w.path).Error("failed to remove ingest directory") + } + return fmt.Errorf("content %v: %w", dgst, errdefs.ErrAlreadyExists) + } + + if err := os.Rename(ingest, target); err != nil { + return err + } + + // Ingest has now been made available in the content store, attempt to complete + // setting metadata but errors should only be logged and not returned since + // the content store cannot be cleanly rolled back. + + commitTime := time.Now() + if err := os.Chtimes(target, commitTime, commitTime); err != nil { + log.G(ctx).WithField("digest", dgst).Error("failed to change file time to commit time") + } + + // clean up!! + if err := os.RemoveAll(w.path); err != nil { + log.G(ctx).WithField("ref", w.ref).WithField("path", w.path).Error("failed to remove ingest directory") + } + + if w.s.ls != nil && base.Labels != nil { + if err := w.s.ls.Set(dgst, base.Labels); err != nil { + log.G(ctx).WithField("digest", dgst).Error("failed to set labels") + } + } + + // change to readonly, more important for read, but provides _some_ + // protection from this point on. We use the existing perms with a mask + // only allowing reads honoring the umask on creation. + // + // This removes write and exec, only allowing read per the creation umask. + // + // NOTE: Windows does not support this operation + if runtime.GOOS != "windows" { + if err := os.Chmod(target, (fi.Mode()&os.ModePerm)&^0333); err != nil { + log.G(ctx).WithField("ref", w.ref).Error("failed to make readonly") + } + } + + return nil +} + +// Close the writer, flushing any unwritten data and leaving the progress in +// tact. +// +// If one needs to resume the transaction, a new writer can be obtained from +// `Ingester.Writer` using the same key. The write can then be continued +// from it was left off. +// +// To abandon a transaction completely, first call close then `IngestManager.Abort` to +// clean up the associated resources. +func (w *writer) Close() (err error) { + if w.fp != nil { + w.fp.Sync() + err = w.fp.Close() + writeTimestampFile(filepath.Join(w.path, "updatedat"), w.updatedAt) + w.fp = nil + unlock(w.ref) + return + } + + return nil +} + +func (w *writer) Truncate(size int64) error { + if size != 0 { + return errors.New("Truncate: unsupported size") + } + w.offset = 0 + w.digester.Hash().Reset() + if _, err := w.fp.Seek(0, io.SeekStart); err != nil { + return err + } + return w.fp.Truncate(0) +} diff --git a/vendor/github.com/containerd/containerd/errdefs/errors.go b/vendor/github.com/containerd/containerd/errdefs/errors.go new file mode 100644 index 000000000..de22cadd4 --- /dev/null +++ b/vendor/github.com/containerd/containerd/errdefs/errors.go @@ -0,0 +1,72 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package errdefs defines the common errors used throughout containerd +// packages. +// +// Use with fmt.Errorf to add context to an error. +// +// To detect an error class, use the IsXXX functions to tell whether an error +// is of a certain type. +package errdefs + +import ( + "github.com/containerd/errdefs" +) + +// Definitions of common error types used throughout containerd. All containerd +// errors returned by most packages will map into one of these errors classes. +// Packages should return errors of these types when they want to instruct a +// client to take a particular action. +// +// These errors map closely to grpc errors. +var ( + ErrUnknown = errdefs.ErrUnknown + ErrInvalidArgument = errdefs.ErrInvalidArgument + ErrNotFound = errdefs.ErrNotFound + ErrAlreadyExists = errdefs.ErrAlreadyExists + ErrPermissionDenied = errdefs.ErrPermissionDenied + ErrResourceExhausted = errdefs.ErrResourceExhausted + ErrFailedPrecondition = errdefs.ErrFailedPrecondition + ErrConflict = errdefs.ErrConflict + ErrNotModified = errdefs.ErrNotModified + ErrAborted = errdefs.ErrAborted + ErrOutOfRange = errdefs.ErrOutOfRange + ErrNotImplemented = errdefs.ErrNotImplemented + ErrInternal = errdefs.ErrInternal + ErrUnavailable = errdefs.ErrUnavailable + ErrDataLoss = errdefs.ErrDataLoss + ErrUnauthenticated = errdefs.ErrUnauthenticated + + IsCanceled = errdefs.IsCanceled + IsUnknown = errdefs.IsUnknown + IsInvalidArgument = errdefs.IsInvalidArgument + IsDeadlineExceeded = errdefs.IsDeadlineExceeded + IsNotFound = errdefs.IsNotFound + IsAlreadyExists = errdefs.IsAlreadyExists + IsPermissionDenied = errdefs.IsPermissionDenied + IsResourceExhausted = errdefs.IsResourceExhausted + IsFailedPrecondition = errdefs.IsFailedPrecondition + IsConflict = errdefs.IsConflict + IsNotModified = errdefs.IsNotModified + IsAborted = errdefs.IsAborted + IsOutOfRange = errdefs.IsOutOfRange + IsNotImplemented = errdefs.IsNotImplemented + IsInternal = errdefs.IsInternal + IsUnavailable = errdefs.IsUnavailable + IsDataLoss = errdefs.IsDataLoss + IsUnauthorized = errdefs.IsUnauthorized +) diff --git a/vendor/github.com/containerd/containerd/errdefs/grpc.go b/vendor/github.com/containerd/containerd/errdefs/grpc.go new file mode 100644 index 000000000..7a9b33e05 --- /dev/null +++ b/vendor/github.com/containerd/containerd/errdefs/grpc.go @@ -0,0 +1,147 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errdefs + +import ( + "context" + "fmt" + "strings" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ToGRPC will attempt to map the backend containerd error into a grpc error, +// using the original error message as a description. +// +// Further information may be extracted from certain errors depending on their +// type. +// +// If the error is unmapped, the original error will be returned to be handled +// by the regular grpc error handling stack. +func ToGRPC(err error) error { + if err == nil { + return nil + } + + if isGRPCError(err) { + // error has already been mapped to grpc + return err + } + + switch { + case IsInvalidArgument(err): + return status.Errorf(codes.InvalidArgument, err.Error()) + case IsNotFound(err): + return status.Errorf(codes.NotFound, err.Error()) + case IsAlreadyExists(err): + return status.Errorf(codes.AlreadyExists, err.Error()) + case IsFailedPrecondition(err): + return status.Errorf(codes.FailedPrecondition, err.Error()) + case IsUnavailable(err): + return status.Errorf(codes.Unavailable, err.Error()) + case IsNotImplemented(err): + return status.Errorf(codes.Unimplemented, err.Error()) + case IsCanceled(err): + return status.Errorf(codes.Canceled, err.Error()) + case IsDeadlineExceeded(err): + return status.Errorf(codes.DeadlineExceeded, err.Error()) + } + + return err +} + +// ToGRPCf maps the error to grpc error codes, assembling the formatting string +// and combining it with the target error string. +// +// This is equivalent to errdefs.ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) +func ToGRPCf(err error, format string, args ...interface{}) error { + return ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) +} + +// FromGRPC returns the underlying error from a grpc service based on the grpc error code +func FromGRPC(err error) error { + if err == nil { + return nil + } + + var cls error // divide these into error classes, becomes the cause + + switch code(err) { + case codes.InvalidArgument: + cls = ErrInvalidArgument + case codes.AlreadyExists: + cls = ErrAlreadyExists + case codes.NotFound: + cls = ErrNotFound + case codes.Unavailable: + cls = ErrUnavailable + case codes.FailedPrecondition: + cls = ErrFailedPrecondition + case codes.Unimplemented: + cls = ErrNotImplemented + case codes.Canceled: + cls = context.Canceled + case codes.DeadlineExceeded: + cls = context.DeadlineExceeded + default: + cls = ErrUnknown + } + + msg := rebaseMessage(cls, err) + if msg != "" { + err = fmt.Errorf("%s: %w", msg, cls) + } else { + err = cls + } + + return err +} + +// rebaseMessage removes the repeats for an error at the end of an error +// string. This will happen when taking an error over grpc then remapping it. +// +// Effectively, we just remove the string of cls from the end of err if it +// appears there. +func rebaseMessage(cls error, err error) string { + desc := errDesc(err) + clss := cls.Error() + if desc == clss { + return "" + } + + return strings.TrimSuffix(desc, ": "+clss) +} + +func isGRPCError(err error) bool { + _, ok := status.FromError(err) + return ok +} + +func code(err error) codes.Code { + if s, ok := status.FromError(err); ok { + return s.Code() + } + return codes.Unknown +} + +func errDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() +} diff --git a/vendor/github.com/containerd/containerd/filters/adaptor.go b/vendor/github.com/containerd/containerd/filters/adaptor.go new file mode 100644 index 000000000..5a9c559c1 --- /dev/null +++ b/vendor/github.com/containerd/containerd/filters/adaptor.go @@ -0,0 +1,33 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package filters + +// Adaptor specifies the mapping of fieldpaths to a type. For the given field +// path, the value and whether it is present should be returned. The mapping of +// the fieldpath to a field is deferred to the adaptor implementation, but +// should generally follow protobuf field path/mask semantics. +type Adaptor interface { + Field(fieldpath []string) (value string, present bool) +} + +// AdapterFunc allows implementation specific matching of fieldpaths +type AdapterFunc func(fieldpath []string) (string, bool) + +// Field returns the field name and true if it exists +func (fn AdapterFunc) Field(fieldpath []string) (string, bool) { + return fn(fieldpath) +} diff --git a/vendor/github.com/containerd/containerd/filters/filter.go b/vendor/github.com/containerd/containerd/filters/filter.go new file mode 100644 index 000000000..dcc569a4b --- /dev/null +++ b/vendor/github.com/containerd/containerd/filters/filter.go @@ -0,0 +1,178 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package filters defines a syntax and parser that can be used for the +// filtration of items across the containerd API. The core is built on the +// concept of protobuf field paths, with quoting. Several operators allow the +// user to flexibly select items based on field presence, equality, inequality +// and regular expressions. Flexible adaptors support working with any type. +// +// The syntax is fairly familiar, if you've used container ecosystem +// projects. At the core, we base it on the concept of protobuf field +// paths, augmenting with the ability to quote portions of the field path +// to match arbitrary labels. These "selectors" come in the following +// syntax: +// +// ``` +// [] +// ``` +// +// A basic example is as follows: +// +// ``` +// name==foo +// ``` +// +// This would match all objects that have a field `name` with the value +// `foo`. If we only want to test if the field is present, we can omit the +// operator. This is most useful for matching labels in containerd. The +// following will match objects that have the field "labels" and have the +// label "foo" defined: +// +// ``` +// labels.foo +// ``` +// +// We also allow for quoting of parts of the field path to allow matching +// of arbitrary items: +// +// ``` +// labels."very complex label"==something +// ``` +// +// We also define `!=` and `~=` as operators. The `!=` will match all +// objects that don't match the value for a field and `~=` will compile the +// target value as a regular expression and match the field value against that. +// +// Selectors can be combined using a comma, such that the resulting +// selector will require all selectors are matched for the object to match. +// The following example will match objects that are named `foo` and have +// the label `bar`: +// +// ``` +// name==foo,labels.bar +// ``` +package filters + +import ( + "regexp" + + "github.com/containerd/log" +) + +// Filter matches specific resources based the provided filter +type Filter interface { + Match(adaptor Adaptor) bool +} + +// FilterFunc is a function that handles matching with an adaptor +type FilterFunc func(Adaptor) bool + +// Match matches the FilterFunc returning true if the object matches the filter +func (fn FilterFunc) Match(adaptor Adaptor) bool { + return fn(adaptor) +} + +// Always is a filter that always returns true for any type of object +var Always FilterFunc = func(adaptor Adaptor) bool { + return true +} + +// Any allows multiple filters to be matched against the object +type Any []Filter + +// Match returns true if any of the provided filters are true +func (m Any) Match(adaptor Adaptor) bool { + for _, m := range m { + if m.Match(adaptor) { + return true + } + } + + return false +} + +// All allows multiple filters to be matched against the object +type All []Filter + +// Match only returns true if all filters match the object +func (m All) Match(adaptor Adaptor) bool { + for _, m := range m { + if !m.Match(adaptor) { + return false + } + } + + return true +} + +type operator int + +const ( + operatorPresent = iota + operatorEqual + operatorNotEqual + operatorMatches +) + +func (op operator) String() string { + switch op { + case operatorPresent: + return "?" + case operatorEqual: + return "==" + case operatorNotEqual: + return "!=" + case operatorMatches: + return "~=" + } + + return "unknown" +} + +type selector struct { + fieldpath []string + operator operator + value string + re *regexp.Regexp +} + +func (m selector) Match(adaptor Adaptor) bool { + value, present := adaptor.Field(m.fieldpath) + + switch m.operator { + case operatorPresent: + return present + case operatorEqual: + return present && value == m.value + case operatorNotEqual: + return value != m.value + case operatorMatches: + if m.re == nil { + r, err := regexp.Compile(m.value) + if err != nil { + log.L.Errorf("error compiling regexp %q", m.value) + return false + } + + m.re = r + } + + return m.re.MatchString(value) + default: + return false + } +} diff --git a/vendor/github.com/containerd/containerd/filters/parser.go b/vendor/github.com/containerd/containerd/filters/parser.go new file mode 100644 index 000000000..32767909b --- /dev/null +++ b/vendor/github.com/containerd/containerd/filters/parser.go @@ -0,0 +1,290 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package filters + +import ( + "fmt" + "io" + + "github.com/containerd/containerd/errdefs" +) + +/* +Parse the strings into a filter that may be used with an adaptor. + +The filter is made up of zero or more selectors. + +The format is a comma separated list of expressions, in the form of +``, known as selectors. All selectors must match the +target object for the filter to be true. + +We define the operators "==" for equality, "!=" for not equal and "~=" for a +regular expression. If the operator and value are not present, the matcher will +test for the presence of a value, as defined by the target object. + +The formal grammar is as follows: + +selectors := selector ("," selector)* +selector := fieldpath (operator value) +fieldpath := field ('.' field)* +field := quoted | [A-Za-z] [A-Za-z0-9_]+ +operator := "==" | "!=" | "~=" +value := quoted | [^\s,]+ +quoted := +*/ +func Parse(s string) (Filter, error) { + // special case empty to match all + if s == "" { + return Always, nil + } + + p := parser{input: s} + return p.parse() +} + +// ParseAll parses each filter in ss and returns a filter that will return true +// if any filter matches the expression. +// +// If no filters are provided, the filter will match anything. +func ParseAll(ss ...string) (Filter, error) { + if len(ss) == 0 { + return Always, nil + } + + var fs []Filter + for _, s := range ss { + f, err := Parse(s) + if err != nil { + return nil, fmt.Errorf("%s: %w", err.Error(), errdefs.ErrInvalidArgument) + } + + fs = append(fs, f) + } + + return Any(fs), nil +} + +type parser struct { + input string + scanner scanner +} + +func (p *parser) parse() (Filter, error) { + p.scanner.init(p.input) + + ss, err := p.selectors() + if err != nil { + return nil, fmt.Errorf("filters: %w", err) + } + + return ss, nil +} + +func (p *parser) selectors() (Filter, error) { + s, err := p.selector() + if err != nil { + return nil, err + } + + ss := All{s} + +loop: + for { + tok := p.scanner.peek() + switch tok { + case ',': + pos, tok, _ := p.scanner.scan() + if tok != tokenSeparator { + return nil, p.mkerr(pos, "expected a separator") + } + + s, err := p.selector() + if err != nil { + return nil, err + } + + ss = append(ss, s) + case tokenEOF: + break loop + default: + return nil, p.mkerr(p.scanner.ppos, "unexpected input: %v", string(tok)) + } + } + + return ss, nil +} + +func (p *parser) selector() (selector, error) { + fieldpath, err := p.fieldpath() + if err != nil { + return selector{}, err + } + + switch p.scanner.peek() { + case ',', tokenSeparator, tokenEOF: + return selector{ + fieldpath: fieldpath, + operator: operatorPresent, + }, nil + } + + op, err := p.operator() + if err != nil { + return selector{}, err + } + + var allowAltQuotes bool + if op == operatorMatches { + allowAltQuotes = true + } + + value, err := p.value(allowAltQuotes) + if err != nil { + if err == io.EOF { + return selector{}, io.ErrUnexpectedEOF + } + return selector{}, err + } + + return selector{ + fieldpath: fieldpath, + value: value, + operator: op, + }, nil +} + +func (p *parser) fieldpath() ([]string, error) { + f, err := p.field() + if err != nil { + return nil, err + } + + fs := []string{f} +loop: + for { + tok := p.scanner.peek() // lookahead to consume field separator + + switch tok { + case '.': + pos, tok, _ := p.scanner.scan() // consume separator + if tok != tokenSeparator { + return nil, p.mkerr(pos, "expected a field separator (`.`)") + } + + f, err := p.field() + if err != nil { + return nil, err + } + + fs = append(fs, f) + default: + // let the layer above handle the other bad cases. + break loop + } + } + + return fs, nil +} + +func (p *parser) field() (string, error) { + pos, tok, s := p.scanner.scan() + switch tok { + case tokenField: + return s, nil + case tokenQuoted: + return p.unquote(pos, s, false) + case tokenIllegal: + return "", p.mkerr(pos, p.scanner.err) + } + + return "", p.mkerr(pos, "expected field or quoted") +} + +func (p *parser) operator() (operator, error) { + pos, tok, s := p.scanner.scan() + switch tok { + case tokenOperator: + switch s { + case "==": + return operatorEqual, nil + case "!=": + return operatorNotEqual, nil + case "~=": + return operatorMatches, nil + default: + return 0, p.mkerr(pos, "unsupported operator %q", s) + } + case tokenIllegal: + return 0, p.mkerr(pos, p.scanner.err) + } + + return 0, p.mkerr(pos, `expected an operator ("=="|"!="|"~=")`) +} + +func (p *parser) value(allowAltQuotes bool) (string, error) { + pos, tok, s := p.scanner.scan() + + switch tok { + case tokenValue, tokenField: + return s, nil + case tokenQuoted: + return p.unquote(pos, s, allowAltQuotes) + case tokenIllegal: + return "", p.mkerr(pos, p.scanner.err) + } + + return "", p.mkerr(pos, "expected value or quoted") +} + +func (p *parser) unquote(pos int, s string, allowAlts bool) (string, error) { + if !allowAlts && s[0] != '\'' && s[0] != '"' { + return "", p.mkerr(pos, "invalid quote encountered") + } + + uq, err := unquote(s) + if err != nil { + return "", p.mkerr(pos, "unquoting failed: %v", err) + } + + return uq, nil +} + +type parseError struct { + input string + pos int + msg string +} + +func (pe parseError) Error() string { + if pe.pos < len(pe.input) { + before := pe.input[:pe.pos] + location := pe.input[pe.pos : pe.pos+1] // need to handle end + after := pe.input[pe.pos+1:] + + return fmt.Sprintf("[%s >|%s|< %s]: %v", before, location, after, pe.msg) + } + + return fmt.Sprintf("[%s]: %v", pe.input, pe.msg) +} + +func (p *parser) mkerr(pos int, format string, args ...interface{}) error { + return fmt.Errorf("parse error: %w", parseError{ + input: p.input, + pos: pos, + msg: fmt.Sprintf(format, args...), + }) +} diff --git a/vendor/github.com/containerd/containerd/filters/quote.go b/vendor/github.com/containerd/containerd/filters/quote.go new file mode 100644 index 000000000..5c800ef84 --- /dev/null +++ b/vendor/github.com/containerd/containerd/filters/quote.go @@ -0,0 +1,252 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package filters + +import ( + "errors" + "unicode/utf8" +) + +// NOTE(stevvooe): Most of this code in this file is copied from the stdlib +// strconv package and modified to be able to handle quoting with `/` and `|` +// as delimiters. The copyright is held by the Go authors. + +var errQuoteSyntax = errors.New("quote syntax error") + +// UnquoteChar decodes the first character or byte in the escaped string +// or character literal represented by the string s. +// It returns four values: +// +// 1. value, the decoded Unicode code point or byte value; +// 2. multibyte, a boolean indicating whether the decoded character requires a multibyte UTF-8 representation; +// 3. tail, the remainder of the string after the character; and +// 4. an error that will be nil if the character is syntactically valid. +// +// The second argument, quote, specifies the type of literal being parsed +// and therefore which escaped quote character is permitted. +// If set to a single quote, it permits the sequence \' and disallows unescaped '. +// If set to a double quote, it permits \" and disallows unescaped ". +// If set to zero, it does not permit either escape and allows both quote characters to appear unescaped. +// +// This is from Go strconv package, modified to support `|` and `/` as double +// quotes for use with regular expressions. +func unquoteChar(s string, quote byte) (value rune, multibyte bool, tail string, err error) { + // easy cases + switch c := s[0]; { + case c == quote && (quote == '\'' || quote == '"' || quote == '/' || quote == '|'): + err = errQuoteSyntax + return + case c >= utf8.RuneSelf: + r, size := utf8.DecodeRuneInString(s) + return r, true, s[size:], nil + case c != '\\': + return rune(s[0]), false, s[1:], nil + } + + // hard case: c is backslash + if len(s) <= 1 { + err = errQuoteSyntax + return + } + c := s[1] + s = s[2:] + + switch c { + case 'a': + value = '\a' + case 'b': + value = '\b' + case 'f': + value = '\f' + case 'n': + value = '\n' + case 'r': + value = '\r' + case 't': + value = '\t' + case 'v': + value = '\v' + case 'x', 'u', 'U': + n := 0 + switch c { + case 'x': + n = 2 + case 'u': + n = 4 + case 'U': + n = 8 + } + var v rune + if len(s) < n { + err = errQuoteSyntax + return + } + for j := 0; j < n; j++ { + x, ok := unhex(s[j]) + if !ok { + err = errQuoteSyntax + return + } + v = v<<4 | x + } + s = s[n:] + if c == 'x' { + // single-byte string, possibly not UTF-8 + value = v + break + } + if v > utf8.MaxRune { + err = errQuoteSyntax + return + } + value = v + multibyte = true + case '0', '1', '2', '3', '4', '5', '6', '7': + v := rune(c) - '0' + if len(s) < 2 { + err = errQuoteSyntax + return + } + for j := 0; j < 2; j++ { // one digit already; two more + x := rune(s[j]) - '0' + if x < 0 || x > 7 { + err = errQuoteSyntax + return + } + v = (v << 3) | x + } + s = s[2:] + if v > 255 { + err = errQuoteSyntax + return + } + value = v + case '\\': + value = '\\' + case '\'', '"', '|', '/': + if c != quote { + err = errQuoteSyntax + return + } + value = rune(c) + default: + err = errQuoteSyntax + return + } + tail = s + return +} + +// unquote interprets s as a single-quoted, double-quoted, +// or backquoted Go string literal, returning the string value +// that s quotes. (If s is single-quoted, it would be a Go +// character literal; Unquote returns the corresponding +// one-character string.) +// +// This is modified from the standard library to support `|` and `/` as quote +// characters for use with regular expressions. +func unquote(s string) (string, error) { + n := len(s) + if n < 2 { + return "", errQuoteSyntax + } + quote := s[0] + if quote != s[n-1] { + return "", errQuoteSyntax + } + s = s[1 : n-1] + + if quote == '`' { + if contains(s, '`') { + return "", errQuoteSyntax + } + if contains(s, '\r') { + // -1 because we know there is at least one \r to remove. + buf := make([]byte, 0, len(s)-1) + for i := 0; i < len(s); i++ { + if s[i] != '\r' { + buf = append(buf, s[i]) + } + } + return string(buf), nil + } + return s, nil + } + if quote != '"' && quote != '\'' && quote != '|' && quote != '/' { + return "", errQuoteSyntax + } + if contains(s, '\n') { + return "", errQuoteSyntax + } + + // Is it trivial? Avoid allocation. + if !contains(s, '\\') && !contains(s, quote) { + switch quote { + case '"', '/', '|': // pipe and slash are treated like double quote + return s, nil + case '\'': + r, size := utf8.DecodeRuneInString(s) + if size == len(s) && (r != utf8.RuneError || size != 1) { + return s, nil + } + } + } + + var runeTmp [utf8.UTFMax]byte + buf := make([]byte, 0, 3*len(s)/2) // Try to avoid more allocations. + for len(s) > 0 { + c, multibyte, ss, err := unquoteChar(s, quote) + if err != nil { + return "", err + } + s = ss + if c < utf8.RuneSelf || !multibyte { + buf = append(buf, byte(c)) + } else { + n := utf8.EncodeRune(runeTmp[:], c) + buf = append(buf, runeTmp[:n]...) + } + if quote == '\'' && len(s) != 0 { + // single-quoted must be single character + return "", errQuoteSyntax + } + } + return string(buf), nil +} + +// contains reports whether the string contains the byte c. +func contains(s string, c byte) bool { + for i := 0; i < len(s); i++ { + if s[i] == c { + return true + } + } + return false +} + +func unhex(b byte) (v rune, ok bool) { + c := rune(b) + switch { + case '0' <= c && c <= '9': + return c - '0', true + case 'a' <= c && c <= 'f': + return c - 'a' + 10, true + case 'A' <= c && c <= 'F': + return c - 'A' + 10, true + } + return +} diff --git a/vendor/github.com/containerd/containerd/filters/scanner.go b/vendor/github.com/containerd/containerd/filters/scanner.go new file mode 100644 index 000000000..6a485467b --- /dev/null +++ b/vendor/github.com/containerd/containerd/filters/scanner.go @@ -0,0 +1,297 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package filters + +import ( + "unicode" + "unicode/utf8" +) + +const ( + tokenEOF = -(iota + 1) + tokenQuoted + tokenValue + tokenField + tokenSeparator + tokenOperator + tokenIllegal +) + +type token rune + +func (t token) String() string { + switch t { + case tokenEOF: + return "EOF" + case tokenQuoted: + return "Quoted" + case tokenValue: + return "Value" + case tokenField: + return "Field" + case tokenSeparator: + return "Separator" + case tokenOperator: + return "Operator" + case tokenIllegal: + return "Illegal" + } + + return string(t) +} + +func (t token) GoString() string { + return "token" + t.String() +} + +type scanner struct { + input string + pos int + ppos int // bounds the current rune in the string + value bool + err string +} + +func (s *scanner) init(input string) { + s.input = input + s.pos = 0 + s.ppos = 0 +} + +func (s *scanner) next() rune { + if s.pos >= len(s.input) { + return tokenEOF + } + s.pos = s.ppos + + r, w := utf8.DecodeRuneInString(s.input[s.ppos:]) + s.ppos += w + if r == utf8.RuneError { + if w > 0 { + s.error("rune error") + return tokenIllegal + } + return tokenEOF + } + + if r == 0 { + s.error("unexpected null") + return tokenIllegal + } + + return r +} + +func (s *scanner) peek() rune { + pos := s.pos + ppos := s.ppos + ch := s.next() + s.pos = pos + s.ppos = ppos + return ch +} + +func (s *scanner) scan() (nextp int, tk token, text string) { + var ( + ch = s.next() + pos = s.pos + ) + +chomp: + switch { + case ch == tokenEOF: + case ch == tokenIllegal: + case isQuoteRune(ch): + if !s.scanQuoted(ch) { + return pos, tokenIllegal, s.input[pos:s.ppos] + } + return pos, tokenQuoted, s.input[pos:s.ppos] + case isSeparatorRune(ch): + s.value = false + return pos, tokenSeparator, s.input[pos:s.ppos] + case isOperatorRune(ch): + s.scanOperator() + s.value = true + return pos, tokenOperator, s.input[pos:s.ppos] + case unicode.IsSpace(ch): + // chomp + ch = s.next() + pos = s.pos + goto chomp + case s.value: + s.scanValue() + s.value = false + return pos, tokenValue, s.input[pos:s.ppos] + case isFieldRune(ch): + s.scanField() + return pos, tokenField, s.input[pos:s.ppos] + } + + return s.pos, token(ch), "" +} + +func (s *scanner) scanField() { + for { + ch := s.peek() + if !isFieldRune(ch) { + break + } + s.next() + } +} + +func (s *scanner) scanOperator() { + for { + ch := s.peek() + switch ch { + case '=', '!', '~': + s.next() + default: + return + } + } +} + +func (s *scanner) scanValue() { + for { + ch := s.peek() + if !isValueRune(ch) { + break + } + s.next() + } +} + +func (s *scanner) scanQuoted(quote rune) bool { + var illegal bool + ch := s.next() // read character after quote + for ch != quote { + if ch == '\n' || ch < 0 { + s.error("quoted literal not terminated") + return false + } + if ch == '\\' { + var legal bool + ch, legal = s.scanEscape(quote) + if !legal { + illegal = true + } + } else { + ch = s.next() + } + } + return !illegal +} + +func (s *scanner) scanEscape(quote rune) (ch rune, legal bool) { + ch = s.next() // read character after '/' + switch ch { + case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', quote: + // nothing to do + ch = s.next() + legal = true + case '0', '1', '2', '3', '4', '5', '6', '7': + ch, legal = s.scanDigits(ch, 8, 3) + case 'x': + ch, legal = s.scanDigits(s.next(), 16, 2) + case 'u': + ch, legal = s.scanDigits(s.next(), 16, 4) + case 'U': + ch, legal = s.scanDigits(s.next(), 16, 8) + default: + s.error("illegal escape sequence") + } + return +} + +func (s *scanner) scanDigits(ch rune, base, n int) (rune, bool) { + for n > 0 && digitVal(ch) < base { + ch = s.next() + n-- + } + if n > 0 { + s.error("illegal numeric escape sequence") + return ch, false + } + return ch, true +} + +func (s *scanner) error(msg string) { + if s.err == "" { + s.err = msg + } +} + +func digitVal(ch rune) int { + switch { + case '0' <= ch && ch <= '9': + return int(ch - '0') + case 'a' <= ch && ch <= 'f': + return int(ch - 'a' + 10) + case 'A' <= ch && ch <= 'F': + return int(ch - 'A' + 10) + } + return 16 // larger than any legal digit val +} + +func isFieldRune(r rune) bool { + return (r == '_' || isAlphaRune(r) || isDigitRune(r)) +} + +func isAlphaRune(r rune) bool { + return r >= 'A' && r <= 'Z' || r >= 'a' && r <= 'z' +} + +func isDigitRune(r rune) bool { + return r >= '0' && r <= '9' +} + +func isOperatorRune(r rune) bool { + switch r { + case '=', '!', '~': + return true + } + + return false +} + +func isQuoteRune(r rune) bool { + switch r { + case '/', '|', '"': // maybe add single quoting? + return true + } + + return false +} + +func isSeparatorRune(r rune) bool { + switch r { + case ',', '.': + return true + } + + return false +} + +func isValueRune(r rune) bool { + return r != ',' && !unicode.IsSpace(r) && + (unicode.IsLetter(r) || + unicode.IsDigit(r) || + unicode.IsNumber(r) || + unicode.IsGraphic(r) || + unicode.IsPunct(r)) +} diff --git a/vendor/github.com/containerd/containerd/images/annotations.go b/vendor/github.com/containerd/containerd/images/annotations.go new file mode 100644 index 000000000..47d92104c --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/annotations.go @@ -0,0 +1,23 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +const ( + // AnnotationImageName is an annotation on a Descriptor in an index.json + // containing the `Name` value as used by an `Image` struct + AnnotationImageName = "io.containerd.image.name" +) diff --git a/vendor/github.com/containerd/containerd/images/diffid.go b/vendor/github.com/containerd/containerd/images/diffid.go new file mode 100644 index 000000000..85577eede --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/diffid.go @@ -0,0 +1,81 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +import ( + "context" + "io" + + "github.com/containerd/containerd/archive/compression" + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/labels" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/sirupsen/logrus" +) + +// GetDiffID gets the diff ID of the layer blob descriptor. +func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (digest.Digest, error) { + switch desc.MediaType { + case + // If the layer is already uncompressed, we can just return its digest + MediaTypeDockerSchema2Layer, + ocispec.MediaTypeImageLayer, + MediaTypeDockerSchema2LayerForeign, + ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated + return desc.Digest, nil + } + info, err := cs.Info(ctx, desc.Digest) + if err != nil { + return "", err + } + v, ok := info.Labels[labels.LabelUncompressed] + if ok { + // Fast path: if the image is already unpacked, we can use the label value + return digest.Parse(v) + } + // if the image is not unpacked, we may not have the label + ra, err := cs.ReaderAt(ctx, desc) + if err != nil { + return "", err + } + defer ra.Close() + r := content.NewReader(ra) + uR, err := compression.DecompressStream(r) + if err != nil { + return "", err + } + defer uR.Close() + digester := digest.Canonical.Digester() + hashW := digester.Hash() + if _, err := io.Copy(hashW, uR); err != nil { + return "", err + } + if err := ra.Close(); err != nil { + return "", err + } + digest := digester.Digest() + // memorize the computed value + if info.Labels == nil { + info.Labels = make(map[string]string) + } + info.Labels[labels.LabelUncompressed] = digest.String() + if _, err := cs.Update(ctx, info, "labels"); err != nil { + logrus.WithError(err).Warnf("failed to set %s label for %s", labels.LabelUncompressed, desc.Digest) + } + return digest, nil +} diff --git a/vendor/github.com/containerd/containerd/images/handlers.go b/vendor/github.com/containerd/containerd/images/handlers.go new file mode 100644 index 000000000..a685092e2 --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/handlers.go @@ -0,0 +1,323 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +import ( + "context" + "errors" + "fmt" + "sort" + + "github.com/containerd/platforms" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sync/errgroup" + "golang.org/x/sync/semaphore" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" +) + +var ( + // ErrSkipDesc is used to skip processing of a descriptor and + // its descendants. + ErrSkipDesc = errors.New("skip descriptor") + + // ErrStopHandler is used to signify that the descriptor + // has been handled and should not be handled further. + // This applies only to a single descriptor in a handler + // chain and does not apply to descendant descriptors. + ErrStopHandler = errors.New("stop handler") + + // ErrEmptyWalk is used when the WalkNotEmpty handlers return no + // children (e.g.: they were filtered out). + ErrEmptyWalk = errors.New("image might be filtered out") +) + +// Handler handles image manifests +type Handler interface { + Handle(ctx context.Context, desc ocispec.Descriptor) (subdescs []ocispec.Descriptor, err error) +} + +// HandlerFunc function implementing the Handler interface +type HandlerFunc func(ctx context.Context, desc ocispec.Descriptor) (subdescs []ocispec.Descriptor, err error) + +// Handle image manifests +func (fn HandlerFunc) Handle(ctx context.Context, desc ocispec.Descriptor) (subdescs []ocispec.Descriptor, err error) { + return fn(ctx, desc) +} + +// Handlers returns a handler that will run the handlers in sequence. +// +// A handler may return `ErrStopHandler` to stop calling additional handlers +func Handlers(handlers ...Handler) HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) (subdescs []ocispec.Descriptor, err error) { + var children []ocispec.Descriptor + for _, handler := range handlers { + ch, err := handler.Handle(ctx, desc) + if err != nil { + if errors.Is(err, ErrStopHandler) { + break + } + return nil, err + } + + children = append(children, ch...) + } + + return children, nil + } +} + +// Walk the resources of an image and call the handler for each. If the handler +// decodes the sub-resources for each image, +// +// This differs from dispatch in that each sibling resource is considered +// synchronously. +func Walk(ctx context.Context, handler Handler, descs ...ocispec.Descriptor) error { + for _, desc := range descs { + + children, err := handler.Handle(ctx, desc) + if err != nil { + if errors.Is(err, ErrSkipDesc) { + continue // don't traverse the children. + } + return err + } + + if len(children) > 0 { + if err := Walk(ctx, handler, children...); err != nil { + return err + } + } + } + return nil +} + +// WalkNotEmpty works the same way Walk does, with the exception that it ensures that +// some children are still found by Walking the descriptors (for example, not all of +// them have been filtered out by one of the handlers). If there are no children, +// then an ErrEmptyWalk error is returned. +func WalkNotEmpty(ctx context.Context, handler Handler, descs ...ocispec.Descriptor) error { + isEmpty := true + var notEmptyHandler HandlerFunc = func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + children, err := handler.Handle(ctx, desc) + if err != nil { + return children, err + } + + if len(children) > 0 { + isEmpty = false + } + + return children, nil + } + + err := Walk(ctx, notEmptyHandler, descs...) + if err != nil { + return err + } + + if isEmpty { + return ErrEmptyWalk + } + + return nil +} + +// Dispatch runs the provided handler for content specified by the descriptors. +// If the handler decode subresources, they will be visited, as well. +// +// Handlers for siblings are run in parallel on the provided descriptors. A +// handler may return `ErrSkipDesc` to signal to the dispatcher to not traverse +// any children. +// +// A concurrency limiter can be passed in to limit the number of concurrent +// handlers running. When limiter is nil, there is no limit. +// +// Typically, this function will be used with `FetchHandler`, often composed +// with other handlers. +// +// If any handler returns an error, the dispatch session will be canceled. +func Dispatch(ctx context.Context, handler Handler, limiter *semaphore.Weighted, descs ...ocispec.Descriptor) error { + eg, ctx2 := errgroup.WithContext(ctx) + for _, desc := range descs { + desc := desc + + if limiter != nil { + if err := limiter.Acquire(ctx, 1); err != nil { + return err + } + } + + eg.Go(func() error { + desc := desc + + children, err := handler.Handle(ctx2, desc) + if limiter != nil { + limiter.Release(1) + } + if err != nil { + if errors.Is(err, ErrSkipDesc) { + return nil // don't traverse the children. + } + return err + } + + if len(children) > 0 { + return Dispatch(ctx2, handler, limiter, children...) + } + + return nil + }) + } + + return eg.Wait() +} + +// ChildrenHandler decodes well-known manifest types and returns their children. +// +// This is useful for supporting recursive fetch and other use cases where you +// want to do a full walk of resources. +// +// One can also replace this with another implementation to allow descending of +// arbitrary types. +func ChildrenHandler(provider content.Provider) HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + return Children(ctx, provider, desc) + } +} + +// SetChildrenLabels is a handler wrapper which sets labels for the content on +// the children returned by the handler and passes through the children. +// Must follow a handler that returns the children to be labeled. +func SetChildrenLabels(manager content.Manager, f HandlerFunc) HandlerFunc { + return SetChildrenMappedLabels(manager, f, nil) +} + +// SetChildrenMappedLabels is a handler wrapper which sets labels for the content on +// the children returned by the handler and passes through the children. +// Must follow a handler that returns the children to be labeled. +// The label map allows the caller to control the labels per child descriptor. +// For returned labels, the index of the child will be appended to the end +// except for the first index when the returned label does not end with '.'. +func SetChildrenMappedLabels(manager content.Manager, f HandlerFunc, labelMap func(ocispec.Descriptor) []string) HandlerFunc { + if labelMap == nil { + labelMap = ChildGCLabels + } + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + children, err := f(ctx, desc) + if err != nil { + return children, err + } + + if len(children) > 0 { + var ( + info = content.Info{ + Digest: desc.Digest, + Labels: map[string]string{}, + } + fields = []string{} + keys = map[string]uint{} + ) + for _, ch := range children { + labelKeys := labelMap(ch) + for _, key := range labelKeys { + idx := keys[key] + keys[key] = idx + 1 + if idx > 0 || key[len(key)-1] == '.' { + key = fmt.Sprintf("%s%d", key, idx) + } + + info.Labels[key] = ch.Digest.String() + fields = append(fields, "labels."+key) + } + } + + _, err := manager.Update(ctx, info, fields...) + if err != nil { + return nil, err + } + } + + return children, err + } +} + +// FilterPlatforms is a handler wrapper which limits the descriptors returned +// based on matching the specified platform matcher. +func FilterPlatforms(f HandlerFunc, m platforms.Matcher) HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + children, err := f(ctx, desc) + if err != nil { + return children, err + } + + var descs []ocispec.Descriptor + + if m == nil { + descs = children + } else { + for _, d := range children { + if d.Platform == nil || m.Match(*d.Platform) { + descs = append(descs, d) + } + } + } + + return descs, nil + } +} + +// LimitManifests is a handler wrapper which filters the manifest descriptors +// returned using the provided platform. +// The results will be ordered according to the comparison operator and +// use the ordering in the manifests for equal matches. +// A limit of 0 or less is considered no limit. +// A not found error is returned if no manifest is matched. +func LimitManifests(f HandlerFunc, m platforms.MatchComparer, n int) HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + children, err := f(ctx, desc) + if err != nil { + return children, err + } + + switch desc.MediaType { + case ocispec.MediaTypeImageIndex, MediaTypeDockerSchema2ManifestList: + sort.SliceStable(children, func(i, j int) bool { + if children[i].Platform == nil { + return false + } + if children[j].Platform == nil { + return true + } + return m.Less(*children[i].Platform, *children[j].Platform) + }) + + if n > 0 { + if len(children) == 0 { + return children, fmt.Errorf("no match for platform in manifest: %w", errdefs.ErrNotFound) + } + if len(children) > n { + children = children[:n] + } + } + default: + // only limit manifests from an index + } + return children, nil + } +} diff --git a/vendor/github.com/containerd/containerd/images/image.go b/vendor/github.com/containerd/containerd/images/image.go new file mode 100644 index 000000000..b934e3496 --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/image.go @@ -0,0 +1,444 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +import ( + "context" + "encoding/json" + "fmt" + "sort" + "time" + + "github.com/containerd/log" + "github.com/containerd/platforms" + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" +) + +// Image provides the model for how containerd views container images. +type Image struct { + // Name of the image. + // + // To be pulled, it must be a reference compatible with resolvers. + // + // This field is required. + Name string + + // Labels provide runtime decoration for the image record. + // + // There is no default behavior for how these labels are propagated. They + // only decorate the static metadata object. + // + // This field is optional. + Labels map[string]string + + // Target describes the root content for this image. Typically, this is + // a manifest, index or manifest list. + Target ocispec.Descriptor + + CreatedAt, UpdatedAt time.Time +} + +// DeleteOptions provide options on image delete +type DeleteOptions struct { + Synchronous bool +} + +// DeleteOpt allows configuring a delete operation +type DeleteOpt func(context.Context, *DeleteOptions) error + +// SynchronousDelete is used to indicate that an image deletion and removal of +// the image resources should occur synchronously before returning a result. +func SynchronousDelete() DeleteOpt { + return func(ctx context.Context, o *DeleteOptions) error { + o.Synchronous = true + return nil + } +} + +// Store and interact with images +type Store interface { + Get(ctx context.Context, name string) (Image, error) + List(ctx context.Context, filters ...string) ([]Image, error) + Create(ctx context.Context, image Image) (Image, error) + + // Update will replace the data in the store with the provided image. If + // one or more fieldpaths are provided, only those fields will be updated. + Update(ctx context.Context, image Image, fieldpaths ...string) (Image, error) + + Delete(ctx context.Context, name string, opts ...DeleteOpt) error +} + +// TODO(stevvooe): Many of these functions make strong platform assumptions, +// which are untrue in a lot of cases. More refactoring must be done here to +// make this work in all cases. + +// Config resolves the image configuration descriptor. +// +// The caller can then use the descriptor to resolve and process the +// configuration of the image. +func (image *Image) Config(ctx context.Context, provider content.Provider, platform platforms.MatchComparer) (ocispec.Descriptor, error) { + return Config(ctx, provider, image.Target, platform) +} + +// RootFS returns the unpacked diffids that make up and images rootfs. +// +// These are used to verify that a set of layers unpacked to the expected +// values. +func (image *Image) RootFS(ctx context.Context, provider content.Provider, platform platforms.MatchComparer) ([]digest.Digest, error) { + desc, err := image.Config(ctx, provider, platform) + if err != nil { + return nil, err + } + return RootFS(ctx, provider, desc) +} + +// Size returns the total size of an image's packed resources. +func (image *Image) Size(ctx context.Context, provider content.Provider, platform platforms.MatchComparer) (int64, error) { + var size int64 + return size, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + if desc.Size < 0 { + return nil, fmt.Errorf("invalid size %v in %v (%v)", desc.Size, desc.Digest, desc.MediaType) + } + size += desc.Size + return nil, nil + }), LimitManifests(FilterPlatforms(ChildrenHandler(provider), platform), platform, 1)), image.Target) +} + +type platformManifest struct { + p *ocispec.Platform + m *ocispec.Manifest +} + +// Manifest resolves a manifest from the image for the given platform. +// +// When a manifest descriptor inside of a manifest index does not have +// a platform defined, the platform from the image config is considered. +// +// If the descriptor points to a non-index manifest, then the manifest is +// unmarshalled and returned without considering the platform inside of the +// config. +// +// TODO(stevvooe): This violates the current platform agnostic approach to this +// package by returning a specific manifest type. We'll need to refactor this +// to return a manifest descriptor or decide that we want to bring the API in +// this direction because this abstraction is not needed. +func Manifest(ctx context.Context, provider content.Provider, image ocispec.Descriptor, platform platforms.MatchComparer) (ocispec.Manifest, error) { + var ( + limit = 1 + m []platformManifest + wasIndex bool + ) + + if err := Walk(ctx, HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + switch desc.MediaType { + case MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + p, err := content.ReadBlob(ctx, provider, desc) + if err != nil { + return nil, err + } + + if err := validateMediaType(p, desc.MediaType); err != nil { + return nil, fmt.Errorf("manifest: invalid desc %s: %w", desc.Digest, err) + } + + var manifest ocispec.Manifest + if err := json.Unmarshal(p, &manifest); err != nil { + return nil, err + } + + if desc.Digest != image.Digest && platform != nil { + if desc.Platform != nil && !platform.Match(*desc.Platform) { + return nil, nil + } + + if desc.Platform == nil { + p, err := content.ReadBlob(ctx, provider, manifest.Config) + if err != nil { + return nil, err + } + + var image ocispec.Image + if err := json.Unmarshal(p, &image); err != nil { + return nil, err + } + + if !platform.Match(platforms.Normalize(ocispec.Platform{OS: image.OS, Architecture: image.Architecture})) { + return nil, nil + } + + } + } + + m = append(m, platformManifest{ + p: desc.Platform, + m: &manifest, + }) + + return nil, nil + case MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex: + p, err := content.ReadBlob(ctx, provider, desc) + if err != nil { + return nil, err + } + + if err := validateMediaType(p, desc.MediaType); err != nil { + return nil, fmt.Errorf("manifest: invalid desc %s: %w", desc.Digest, err) + } + + var idx ocispec.Index + if err := json.Unmarshal(p, &idx); err != nil { + return nil, err + } + + if platform == nil { + return idx.Manifests, nil + } + + var descs []ocispec.Descriptor + for _, d := range idx.Manifests { + if d.Platform == nil || platform.Match(*d.Platform) { + descs = append(descs, d) + } + } + + sort.SliceStable(descs, func(i, j int) bool { + if descs[i].Platform == nil { + return false + } + if descs[j].Platform == nil { + return true + } + return platform.Less(*descs[i].Platform, *descs[j].Platform) + }) + + wasIndex = true + + if len(descs) > limit { + return descs[:limit], nil + } + return descs, nil + } + return nil, fmt.Errorf("unexpected media type %v for %v: %w", desc.MediaType, desc.Digest, errdefs.ErrNotFound) + }), image); err != nil { + return ocispec.Manifest{}, err + } + + if len(m) == 0 { + err := fmt.Errorf("manifest %v: %w", image.Digest, errdefs.ErrNotFound) + if wasIndex { + err = fmt.Errorf("no match for platform in manifest %v: %w", image.Digest, errdefs.ErrNotFound) + } + return ocispec.Manifest{}, err + } + return *m[0].m, nil +} + +// Config resolves the image configuration descriptor using a content provided +// to resolve child resources on the image. +// +// The caller can then use the descriptor to resolve and process the +// configuration of the image. +func Config(ctx context.Context, provider content.Provider, image ocispec.Descriptor, platform platforms.MatchComparer) (ocispec.Descriptor, error) { + manifest, err := Manifest(ctx, provider, image, platform) + if err != nil { + return ocispec.Descriptor{}, err + } + return manifest.Config, err +} + +// Platforms returns one or more platforms supported by the image. +func Platforms(ctx context.Context, provider content.Provider, image ocispec.Descriptor) ([]ocispec.Platform, error) { + var platformSpecs []ocispec.Platform + return platformSpecs, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + if desc.Platform != nil { + if desc.Platform.OS == "unknown" || desc.Platform.Architecture == "unknown" { + return nil, ErrSkipDesc + } + platformSpecs = append(platformSpecs, *desc.Platform) + return nil, ErrSkipDesc + } + + switch desc.MediaType { + case MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig: + p, err := content.ReadBlob(ctx, provider, desc) + if err != nil { + return nil, err + } + + var image ocispec.Image + if err := json.Unmarshal(p, &image); err != nil { + return nil, err + } + + platformSpecs = append(platformSpecs, + platforms.Normalize(ocispec.Platform{OS: image.OS, Architecture: image.Architecture})) + } + return nil, nil + }), ChildrenHandler(provider)), image) +} + +// Check returns nil if the all components of an image are available in the +// provider for the specified platform. +// +// If available is true, the caller can assume that required represents the +// complete set of content required for the image. +// +// missing will have the components that are part of required but not available +// in the provider. +// +// If there is a problem resolving content, an error will be returned. +func Check(ctx context.Context, provider content.Provider, image ocispec.Descriptor, platform platforms.MatchComparer) (available bool, required, present, missing []ocispec.Descriptor, err error) { + mfst, err := Manifest(ctx, provider, image, platform) + if err != nil { + if errdefs.IsNotFound(err) { + return false, []ocispec.Descriptor{image}, nil, []ocispec.Descriptor{image}, nil + } + + return false, nil, nil, nil, fmt.Errorf("failed to check image %v: %w", image.Digest, err) + } + + // TODO(stevvooe): It is possible that referenced components could have + // children, but this is rare. For now, we ignore this and only verify + // that manifest components are present. + required = append([]ocispec.Descriptor{mfst.Config}, mfst.Layers...) + + for _, desc := range required { + ra, err := provider.ReaderAt(ctx, desc) + if err != nil { + if errdefs.IsNotFound(err) { + missing = append(missing, desc) + continue + } else { + return false, nil, nil, nil, fmt.Errorf("failed to check image %v: %w", desc.Digest, err) + } + } + ra.Close() + present = append(present, desc) + + } + + return true, required, present, missing, nil +} + +// Children returns the immediate children of content described by the descriptor. +func Children(ctx context.Context, provider content.Provider, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + var descs []ocispec.Descriptor + switch desc.MediaType { + case MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + p, err := content.ReadBlob(ctx, provider, desc) + if err != nil { + return nil, err + } + + if err := validateMediaType(p, desc.MediaType); err != nil { + return nil, fmt.Errorf("children: invalid desc %s: %w", desc.Digest, err) + } + + // TODO(stevvooe): We just assume oci manifest, for now. There may be + // subtle differences from the docker version. + var manifest ocispec.Manifest + if err := json.Unmarshal(p, &manifest); err != nil { + return nil, err + } + + descs = append(descs, manifest.Config) + descs = append(descs, manifest.Layers...) + case MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex: + p, err := content.ReadBlob(ctx, provider, desc) + if err != nil { + return nil, err + } + + if err := validateMediaType(p, desc.MediaType); err != nil { + return nil, fmt.Errorf("children: invalid desc %s: %w", desc.Digest, err) + } + + var index ocispec.Index + if err := json.Unmarshal(p, &index); err != nil { + return nil, err + } + + descs = append(descs, index.Manifests...) + default: + if IsLayerType(desc.MediaType) || IsKnownConfig(desc.MediaType) { + // childless data types. + return nil, nil + } + log.G(ctx).Debugf("encountered unknown type %v; children may not be fetched", desc.MediaType) + } + + return descs, nil +} + +// unknownDocument represents a manifest, manifest list, or index that has not +// yet been validated. +type unknownDocument struct { + MediaType string `json:"mediaType,omitempty"` + Config json.RawMessage `json:"config,omitempty"` + Layers json.RawMessage `json:"layers,omitempty"` + Manifests json.RawMessage `json:"manifests,omitempty"` + FSLayers json.RawMessage `json:"fsLayers,omitempty"` // schema 1 +} + +// validateMediaType returns an error if the byte slice is invalid JSON or if +// the media type identifies the blob as one format but it contains elements of +// another format. +func validateMediaType(b []byte, mt string) error { + var doc unknownDocument + if err := json.Unmarshal(b, &doc); err != nil { + return err + } + if len(doc.FSLayers) != 0 { + return fmt.Errorf("media-type: schema 1 not supported") + } + switch mt { + case MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + if len(doc.Manifests) != 0 || + doc.MediaType == MediaTypeDockerSchema2ManifestList || + doc.MediaType == ocispec.MediaTypeImageIndex { + return fmt.Errorf("media-type: expected manifest but found index (%s)", mt) + } + case MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex: + if len(doc.Config) != 0 || len(doc.Layers) != 0 || + doc.MediaType == MediaTypeDockerSchema2Manifest || + doc.MediaType == ocispec.MediaTypeImageManifest { + return fmt.Errorf("media-type: expected index but found manifest (%s)", mt) + } + } + return nil +} + +// RootFS returns the unpacked diffids that make up and images rootfs. +// +// These are used to verify that a set of layers unpacked to the expected +// values. +func RootFS(ctx context.Context, provider content.Provider, configDesc ocispec.Descriptor) ([]digest.Digest, error) { + p, err := content.ReadBlob(ctx, provider, configDesc) + if err != nil { + return nil, err + } + + var config ocispec.Image + if err := json.Unmarshal(p, &config); err != nil { + return nil, err + } + return config.RootFS.DiffIDs, nil +} diff --git a/vendor/github.com/containerd/containerd/images/importexport.go b/vendor/github.com/containerd/containerd/images/importexport.go new file mode 100644 index 000000000..843adcadc --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/importexport.go @@ -0,0 +1,37 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +import ( + "context" + "io" + + "github.com/containerd/containerd/content" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// Importer is the interface for image importer. +type Importer interface { + // Import imports an image from a tar stream. + Import(ctx context.Context, store content.Store, reader io.Reader) (ocispec.Descriptor, error) +} + +// Exporter is the interface for image exporter. +type Exporter interface { + // Export exports an image to a tar stream. + Export(ctx context.Context, store content.Provider, desc ocispec.Descriptor, writer io.Writer) error +} diff --git a/vendor/github.com/containerd/containerd/images/labels.go b/vendor/github.com/containerd/containerd/images/labels.go new file mode 100644 index 000000000..06dfed572 --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/labels.go @@ -0,0 +1,21 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +const ( + ConvertedDockerSchema1LabelKey = "io.containerd.image/converted-docker-schema1" +) diff --git a/vendor/github.com/containerd/containerd/images/mediatypes.go b/vendor/github.com/containerd/containerd/images/mediatypes.go new file mode 100644 index 000000000..d3b28d42d --- /dev/null +++ b/vendor/github.com/containerd/containerd/images/mediatypes.go @@ -0,0 +1,215 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package images + +import ( + "context" + "fmt" + "sort" + "strings" + + "github.com/containerd/containerd/errdefs" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// mediatype definitions for image components handled in containerd. +// +// oci components are generally referenced directly, although we may centralize +// here for clarity. +const ( + MediaTypeDockerSchema2Layer = "application/vnd.docker.image.rootfs.diff.tar" + MediaTypeDockerSchema2LayerForeign = "application/vnd.docker.image.rootfs.foreign.diff.tar" + MediaTypeDockerSchema2LayerGzip = "application/vnd.docker.image.rootfs.diff.tar.gzip" + MediaTypeDockerSchema2LayerForeignGzip = "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip" + MediaTypeDockerSchema2Config = "application/vnd.docker.container.image.v1+json" + MediaTypeDockerSchema2Manifest = "application/vnd.docker.distribution.manifest.v2+json" + MediaTypeDockerSchema2ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json" + + // Checkpoint/Restore Media Types + + MediaTypeContainerd1Checkpoint = "application/vnd.containerd.container.criu.checkpoint.criu.tar" + MediaTypeContainerd1CheckpointPreDump = "application/vnd.containerd.container.criu.checkpoint.predump.tar" + MediaTypeContainerd1Resource = "application/vnd.containerd.container.resource.tar" + MediaTypeContainerd1RW = "application/vnd.containerd.container.rw.tar" + MediaTypeContainerd1CheckpointConfig = "application/vnd.containerd.container.checkpoint.config.v1+proto" + MediaTypeContainerd1CheckpointOptions = "application/vnd.containerd.container.checkpoint.options.v1+proto" + MediaTypeContainerd1CheckpointRuntimeName = "application/vnd.containerd.container.checkpoint.runtime.name" + MediaTypeContainerd1CheckpointRuntimeOptions = "application/vnd.containerd.container.checkpoint.runtime.options+proto" + + // MediaTypeDockerSchema1Manifest is the legacy Docker schema1 manifest + MediaTypeDockerSchema1Manifest = "application/vnd.docker.distribution.manifest.v1+prettyjws" + + // Encrypted media types + + MediaTypeImageLayerEncrypted = ocispec.MediaTypeImageLayer + "+encrypted" + MediaTypeImageLayerGzipEncrypted = ocispec.MediaTypeImageLayerGzip + "+encrypted" +) + +// DiffCompression returns the compression as defined by the layer diff media +// type. For Docker media types without compression, "unknown" is returned to +// indicate that the media type may be compressed. If the media type is not +// recognized as a layer diff, then it returns errdefs.ErrNotImplemented +func DiffCompression(ctx context.Context, mediaType string) (string, error) { + base, ext := parseMediaTypes(mediaType) + switch base { + case MediaTypeDockerSchema2Layer, MediaTypeDockerSchema2LayerForeign: + if len(ext) > 0 { + // Type is wrapped + return "", nil + } + // These media types may have been compressed but failed to + // use the correct media type. The decompression function + // should detect and handle this case. + return "unknown", nil + case MediaTypeDockerSchema2LayerGzip, MediaTypeDockerSchema2LayerForeignGzip: + if len(ext) > 0 { + // Type is wrapped + return "", nil + } + return "gzip", nil + case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // Non-distributable layers are deprecated + if len(ext) > 0 { + switch ext[len(ext)-1] { + case "gzip": + return "gzip", nil + case "zstd": + return "zstd", nil + } + } + return "", nil + default: + return "", fmt.Errorf("unrecognised mediatype %s: %w", mediaType, errdefs.ErrNotImplemented) + } +} + +// parseMediaTypes splits the media type into the base type and +// an array of sorted extensions +func parseMediaTypes(mt string) (mediaType string, suffixes []string) { + if mt == "" { + return "", []string{} + } + mediaType, ext, ok := strings.Cut(mt, "+") + if !ok { + return mediaType, []string{} + } + + // Splitting the extensions following the mediatype "(+)gzip+encrypted". + // We expect this to be a limited list, so add an arbitrary limit (50). + // + // Note that DiffCompression is only using the last element, so perhaps we + // should split on the last "+" only. + suffixes = strings.SplitN(ext, "+", 50) + sort.Strings(suffixes) + return mediaType, suffixes +} + +// IsNonDistributable returns true if the media type is non-distributable. +func IsNonDistributable(mt string) bool { + return strings.HasPrefix(mt, "application/vnd.oci.image.layer.nondistributable.") || + strings.HasPrefix(mt, "application/vnd.docker.image.rootfs.foreign.") +} + +// IsLayerType returns true if the media type is a layer +func IsLayerType(mt string) bool { + if strings.HasPrefix(mt, "application/vnd.oci.image.layer.") { + return true + } + + // Parse Docker media types, strip off any + suffixes first + switch base, _ := parseMediaTypes(mt); base { + case MediaTypeDockerSchema2Layer, MediaTypeDockerSchema2LayerGzip, + MediaTypeDockerSchema2LayerForeign, MediaTypeDockerSchema2LayerForeignGzip: + return true + } + return false +} + +// IsDockerType returns true if the media type has "application/vnd.docker." prefix +func IsDockerType(mt string) bool { + return strings.HasPrefix(mt, "application/vnd.docker.") +} + +// IsManifestType returns true if the media type is an OCI-compatible manifest. +// No support for schema1 manifest. +func IsManifestType(mt string) bool { + switch mt { + case MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + return true + default: + return false + } +} + +// IsIndexType returns true if the media type is an OCI-compatible index. +func IsIndexType(mt string) bool { + switch mt { + case ocispec.MediaTypeImageIndex, MediaTypeDockerSchema2ManifestList: + return true + default: + return false + } +} + +// IsConfigType returns true if the media type is an OCI-compatible image config. +// No support for containerd checkpoint configs. +func IsConfigType(mt string) bool { + switch mt { + case MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig: + return true + default: + return false + } +} + +// IsKnownConfig returns true if the media type is a known config type, +// including containerd checkpoint configs +func IsKnownConfig(mt string) bool { + switch mt { + case MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig, + MediaTypeContainerd1Checkpoint, MediaTypeContainerd1CheckpointConfig: + return true + } + return false +} + +// ChildGCLabels returns the label for a given descriptor to reference it +func ChildGCLabels(desc ocispec.Descriptor) []string { + mt := desc.MediaType + if IsKnownConfig(mt) { + return []string{"containerd.io/gc.ref.content.config"} + } + + switch mt { + case MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + return []string{"containerd.io/gc.ref.content.m."} + } + + if IsLayerType(mt) { + return []string{"containerd.io/gc.ref.content.l."} + } + + return []string{"containerd.io/gc.ref.content."} +} + +// ChildGCLabelsFilterLayers returns the labels for a given descriptor to +// reference it, skipping layer media types +func ChildGCLabelsFilterLayers(desc ocispec.Descriptor) []string { + if IsLayerType(desc.MediaType) { + return nil + } + return ChildGCLabels(desc) +} diff --git a/vendor/github.com/containerd/containerd/labels/labels.go b/vendor/github.com/containerd/containerd/labels/labels.go new file mode 100644 index 000000000..0f9bab5c5 --- /dev/null +++ b/vendor/github.com/containerd/containerd/labels/labels.go @@ -0,0 +1,29 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package labels + +// LabelUncompressed is added to compressed layer contents. +// The value is digest of the uncompressed content. +const LabelUncompressed = "containerd.io/uncompressed" + +// LabelSharedNamespace is added to a namespace to allow that namespaces +// contents to be shared. +const LabelSharedNamespace = "containerd.io/namespace.shareable" + +// LabelDistributionSource is added to content to indicate its origin. +// e.g., "containerd.io/distribution.source.docker.io=library/redis" +const LabelDistributionSource = "containerd.io/distribution.source" diff --git a/vendor/github.com/containerd/containerd/labels/validate.go b/vendor/github.com/containerd/containerd/labels/validate.go new file mode 100644 index 000000000..f83b5dde2 --- /dev/null +++ b/vendor/github.com/containerd/containerd/labels/validate.go @@ -0,0 +1,41 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package labels + +import ( + "fmt" + + "github.com/containerd/containerd/errdefs" +) + +const ( + maxSize = 4096 + // maximum length of key portion of error message if len of key + len of value > maxSize + keyMaxLen = 64 +) + +// Validate a label's key and value are under 4096 bytes +func Validate(k, v string) error { + total := len(k) + len(v) + if total > maxSize { + if len(k) > keyMaxLen { + k = k[:keyMaxLen] + } + return fmt.Errorf("label key and value length (%d bytes) greater than maximum size (%d bytes), key: %s: %w", total, maxSize, k, errdefs.ErrInvalidArgument) + } + return nil +} diff --git a/vendor/github.com/containerd/containerd/log/context_deprecated.go b/vendor/github.com/containerd/containerd/log/context_deprecated.go new file mode 100644 index 000000000..9e9e8b491 --- /dev/null +++ b/vendor/github.com/containerd/containerd/log/context_deprecated.go @@ -0,0 +1,149 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package log + +import ( + "context" + + "github.com/containerd/log" +) + +// G is a shorthand for [GetLogger]. +// +// Deprecated: use [log.G]. +var G = log.G + +// L is an alias for the standard logger. +// +// Deprecated: use [log.L]. +var L = log.L + +// Fields type to pass to "WithFields". +// +// Deprecated: use [log.Fields]. +type Fields = log.Fields + +// Entry is a logging entry. +// +// Deprecated: use [log.Entry]. +type Entry = log.Entry + +// RFC3339NanoFixed is [time.RFC3339Nano] with nanoseconds padded using +// zeros to ensure the formatted time is always the same number of +// characters. +// +// Deprecated: use [log.RFC3339NanoFixed]. +const RFC3339NanoFixed = log.RFC3339NanoFixed + +// Level is a logging level. +// +// Deprecated: use [log.Level]. +type Level = log.Level + +// Supported log levels. +const ( + // TraceLevel level. + // + // Deprecated: use [log.TraceLevel]. + TraceLevel Level = log.TraceLevel + + // DebugLevel level. + // + // Deprecated: use [log.DebugLevel]. + DebugLevel Level = log.DebugLevel + + // InfoLevel level. + // + // Deprecated: use [log.InfoLevel]. + InfoLevel Level = log.InfoLevel + + // WarnLevel level. + // + // Deprecated: use [log.WarnLevel]. + WarnLevel Level = log.WarnLevel + + // ErrorLevel level + // + // Deprecated: use [log.ErrorLevel]. + ErrorLevel Level = log.ErrorLevel + + // FatalLevel level. + // + // Deprecated: use [log.FatalLevel]. + FatalLevel Level = log.FatalLevel + + // PanicLevel level. + // + // Deprecated: use [log.PanicLevel]. + PanicLevel Level = log.PanicLevel +) + +// SetLevel sets log level globally. It returns an error if the given +// level is not supported. +// +// Deprecated: use [log.SetLevel]. +func SetLevel(level string) error { + return log.SetLevel(level) +} + +// GetLevel returns the current log level. +// +// Deprecated: use [log.GetLevel]. +func GetLevel() log.Level { + return log.GetLevel() +} + +// OutputFormat specifies a log output format. +// +// Deprecated: use [log.OutputFormat]. +type OutputFormat = log.OutputFormat + +// Supported log output formats. +const ( + // TextFormat represents the text logging format. + // + // Deprecated: use [log.TextFormat]. + TextFormat log.OutputFormat = "text" + + // JSONFormat represents the JSON logging format. + // + // Deprecated: use [log.JSONFormat]. + JSONFormat log.OutputFormat = "json" +) + +// SetFormat sets the log output format. +// +// Deprecated: use [log.SetFormat]. +func SetFormat(format OutputFormat) error { + return log.SetFormat(format) +} + +// WithLogger returns a new context with the provided logger. Use in +// combination with logger.WithField(s) for great effect. +// +// Deprecated: use [log.WithLogger]. +func WithLogger(ctx context.Context, logger *log.Entry) context.Context { + return log.WithLogger(ctx, logger) +} + +// GetLogger retrieves the current logger from the context. If no logger is +// available, the default logger is returned. +// +// Deprecated: use [log.GetLogger]. +func GetLogger(ctx context.Context) *log.Entry { + return log.GetLogger(ctx) +} diff --git a/vendor/github.com/containerd/containerd/pkg/randutil/randutil.go b/vendor/github.com/containerd/containerd/pkg/randutil/randutil.go new file mode 100644 index 000000000..f4b657d7d --- /dev/null +++ b/vendor/github.com/containerd/containerd/pkg/randutil/randutil.go @@ -0,0 +1,48 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package randutil provides utilities for [cyrpto/rand]. +package randutil + +import ( + "crypto/rand" + "math" + "math/big" +) + +// Int63n is similar to [math/rand.Int63n] but uses [crypto/rand.Reader] under the hood. +func Int63n(n int64) int64 { + b, err := rand.Int(rand.Reader, big.NewInt(n)) + if err != nil { + panic(err) + } + return b.Int64() +} + +// Int63 is similar to [math/rand.Int63] but uses [crypto/rand.Reader] under the hood. +func Int63() int64 { + return Int63n(math.MaxInt64) +} + +// Intn is similar to [math/rand.Intn] but uses [crypto/rand.Reader] under the hood. +func Intn(n int) int { + return int(Int63n(int64(n))) +} + +// Int is similar to [math/rand.Int] but uses [crypto/rand.Reader] under the hood. +func Int() int { + return int(Int63()) +} diff --git a/vendor/github.com/containerd/containerd/reference/reference.go b/vendor/github.com/containerd/containerd/reference/reference.go new file mode 100644 index 000000000..9329a9aab --- /dev/null +++ b/vendor/github.com/containerd/containerd/reference/reference.go @@ -0,0 +1,179 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package reference + +import ( + "errors" + "net/url" + "path" + "regexp" + "strings" + + digest "github.com/opencontainers/go-digest" +) + +var ( + // ErrInvalid is returned when there is an invalid reference + ErrInvalid = errors.New("invalid reference") + // ErrObjectRequired is returned when the object is required + ErrObjectRequired = errors.New("object required") + // ErrHostnameRequired is returned when the hostname is required + ErrHostnameRequired = errors.New("hostname required") +) + +// Spec defines the main components of a reference specification. +// +// A reference specification is a schema-less URI parsed into common +// components. The two main components, locator and object, are required to be +// supported by remotes. It represents a superset of the naming define in +// docker's reference schema. It aims to be compatible but not prescriptive. +// +// While the interpretation of the components, locator and object, are up to +// the remote, we define a few common parts, accessible via helper methods. +// +// The first is the hostname, which is part of the locator. This doesn't need +// to map to a physical resource, but it must parse as a hostname. We refer to +// this as the namespace. +// +// The other component made accessible by helper method is the digest. This is +// part of the object identifier, always prefixed with an '@'. If present, the +// remote may use the digest portion directly or resolve it against a prefix. +// If the object does not include the `@` symbol, the return value for `Digest` +// will be empty. +type Spec struct { + // Locator is the host and path portion of the specification. The host + // portion may refer to an actual host or just a namespace of related + // images. + // + // Typically, the locator may used to resolve the remote to fetch specific + // resources. + Locator string + + // Object contains the identifier for the remote resource. Classically, + // this is a tag but can refer to anything in a remote. By convention, any + // portion that may be a partial or whole digest will be preceded by an + // `@`. Anything preceding the `@` will be referred to as the "tag". + // + // In practice, we will see this broken down into the following formats: + // + // 1. + // 2. @ + // 3. @ + // + // We define the tag to be anything except '@' and ':'. may + // be a full valid digest or shortened version, possibly with elided + // algorithm. + Object string +} + +var splitRe = regexp.MustCompile(`[:@]`) + +// Parse parses the string into a structured ref. +func Parse(s string) (Spec, error) { + if strings.Contains(s, "://") { + return Spec{}, ErrInvalid + } + + u, err := url.Parse("dummy://" + s) + if err != nil { + return Spec{}, err + } + + if u.Scheme != "dummy" { + return Spec{}, ErrInvalid + } + + if u.Host == "" { + return Spec{}, ErrHostnameRequired + } + + var object string + + if idx := splitRe.FindStringIndex(u.Path); idx != nil { + // This allows us to retain the @ to signify digests or shortened digests in + // the object. + object = u.Path[idx[0]:] + if object[:1] == ":" { + object = object[1:] + } + u.Path = u.Path[:idx[0]] + } + + return Spec{ + Locator: path.Join(u.Host, u.Path), + Object: object, + }, nil +} + +// Hostname returns the hostname portion of the locator. +// +// Remotes are not required to directly access the resources at this host. This +// method is provided for convenience. +func (r Spec) Hostname() string { + i := strings.Index(r.Locator, "/") + + if i < 0 { + return r.Locator + } + return r.Locator[:i] +} + +// Digest returns the digest portion of the reference spec. This may be a +// partial or invalid digest, which may be used to lookup a complete digest. +func (r Spec) Digest() digest.Digest { + i := strings.Index(r.Object, "@") + + if i < 0 { + return "" + } + return digest.Digest(r.Object[i+1:]) +} + +// String returns the normalized string for the ref. +func (r Spec) String() string { + if r.Object == "" { + return r.Locator + } + if r.Object[:1] == "@" { + return r.Locator + r.Object + } + + return r.Locator + ":" + r.Object +} + +// SplitObject provides two parts of the object spec, delimited by an "@" +// symbol. It does not perform any validation on correctness of the values +// returned, and it's the callers' responsibility to validate the result. +// +// If an "@" delimiter is found, it returns the part *including* the "@" +// delimiter as "tag", and the part after the "@" as digest. +// +// The example below produces "docker.io/library/ubuntu:latest@" and +// "sha256:deadbeef"; +// +// t, d := SplitObject("docker.io/library/ubuntu:latest@sha256:deadbeef") +// fmt.Println(t) // docker.io/library/ubuntu:latest@ +// fmt.Println(d) // sha256:deadbeef +// +// Deprecated: use [Parse] and [Spec.Digest] instead. +func SplitObject(obj string) (tag string, dgst digest.Digest) { + if i := strings.Index(obj, "@"); i >= 0 { + // Offset by one so preserve the "@" in the tag returned. + return obj[:i+1], digest.Digest(obj[i+1:]) + } + return obj, "" +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go b/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go new file mode 100644 index 000000000..244e03509 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go @@ -0,0 +1,225 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package auth + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "strings" + "time" + + remoteserrors "github.com/containerd/containerd/remotes/errors" + "github.com/containerd/containerd/version" + "github.com/containerd/log" +) + +var ( + // ErrNoToken is returned if a request is successful but the body does not + // contain an authorization token. + ErrNoToken = errors.New("authorization server did not include a token in the response") +) + +// GenerateTokenOptions generates options for fetching a token based on a challenge +func GenerateTokenOptions(ctx context.Context, host, username, secret string, c Challenge) (TokenOptions, error) { + realm, ok := c.Parameters["realm"] + if !ok { + return TokenOptions{}, errors.New("no realm specified for token auth challenge") + } + + realmURL, err := url.Parse(realm) + if err != nil { + return TokenOptions{}, fmt.Errorf("invalid token auth challenge realm: %w", err) + } + + to := TokenOptions{ + Realm: realmURL.String(), + Service: c.Parameters["service"], + Username: username, + Secret: secret, + } + + scope, ok := c.Parameters["scope"] + if ok { + to.Scopes = append(to.Scopes, strings.Split(scope, " ")...) + } else { + log.G(ctx).WithField("host", host).Debug("no scope specified for token auth challenge") + } + + return to, nil +} + +// TokenOptions are options for requesting a token +type TokenOptions struct { + Realm string + Service string + Scopes []string + Username string + Secret string + + // FetchRefreshToken enables fetching a refresh token (aka "identity token", "offline token") along with the bearer token. + // + // For HTTP GET mode (FetchToken), FetchRefreshToken sets `offline_token=true` in the request. + // https://docs.docker.com/registry/spec/auth/token/#requesting-a-token + // + // For HTTP POST mode (FetchTokenWithOAuth), FetchRefreshToken sets `access_type=offline` in the request. + // https://docs.docker.com/registry/spec/auth/oauth/#getting-a-token + FetchRefreshToken bool +} + +// OAuthTokenResponse is response from fetching token with a OAuth POST request +type OAuthTokenResponse struct { + AccessToken string `json:"access_token"` + RefreshToken string `json:"refresh_token"` + ExpiresIn int `json:"expires_in"` + IssuedAt time.Time `json:"issued_at"` + Scope string `json:"scope"` +} + +// FetchTokenWithOAuth fetches a token using a POST request +func FetchTokenWithOAuth(ctx context.Context, client *http.Client, headers http.Header, clientID string, to TokenOptions) (*OAuthTokenResponse, error) { + form := url.Values{} + if len(to.Scopes) > 0 { + form.Set("scope", strings.Join(to.Scopes, " ")) + } + form.Set("service", to.Service) + form.Set("client_id", clientID) + + if to.Username == "" { + form.Set("grant_type", "refresh_token") + form.Set("refresh_token", to.Secret) + } else { + form.Set("grant_type", "password") + form.Set("username", to.Username) + form.Set("password", to.Secret) + } + if to.FetchRefreshToken { + form.Set("access_type", "offline") + } + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, to.Realm, strings.NewReader(form.Encode())) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") + for k, v := range headers { + req.Header[k] = append(req.Header[k], v...) + } + if len(req.Header.Get("User-Agent")) == 0 { + req.Header.Set("User-Agent", "containerd/"+version.Version) + } + + resp, err := client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if resp.StatusCode < 200 || resp.StatusCode >= 400 { + return nil, remoteserrors.NewUnexpectedStatusErr(resp) + } + + decoder := json.NewDecoder(resp.Body) + + var tr OAuthTokenResponse + if err = decoder.Decode(&tr); err != nil { + return nil, fmt.Errorf("unable to decode token response: %w", err) + } + + if tr.AccessToken == "" { + return nil, ErrNoToken + } + + return &tr, nil +} + +// FetchTokenResponse is response from fetching token with GET request +type FetchTokenResponse struct { + Token string `json:"token"` + AccessToken string `json:"access_token"` + ExpiresIn int `json:"expires_in"` + IssuedAt time.Time `json:"issued_at"` + RefreshToken string `json:"refresh_token"` +} + +// FetchToken fetches a token using a GET request +func FetchToken(ctx context.Context, client *http.Client, headers http.Header, to TokenOptions) (*FetchTokenResponse, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, to.Realm, nil) + if err != nil { + return nil, err + } + + for k, v := range headers { + req.Header[k] = append(req.Header[k], v...) + } + if len(req.Header.Get("User-Agent")) == 0 { + req.Header.Set("User-Agent", "containerd/"+version.Version) + } + + reqParams := req.URL.Query() + + if to.Service != "" { + reqParams.Add("service", to.Service) + } + + for _, scope := range to.Scopes { + reqParams.Add("scope", scope) + } + + if to.Secret != "" { + req.SetBasicAuth(to.Username, to.Secret) + } + + if to.FetchRefreshToken { + reqParams.Add("offline_token", "true") + } + + req.URL.RawQuery = reqParams.Encode() + + resp, err := client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if resp.StatusCode < 200 || resp.StatusCode >= 400 { + return nil, remoteserrors.NewUnexpectedStatusErr(resp) + } + + decoder := json.NewDecoder(resp.Body) + + var tr FetchTokenResponse + if err = decoder.Decode(&tr); err != nil { + return nil, fmt.Errorf("unable to decode token response: %w", err) + } + + // `access_token` is equivalent to `token` and if both are specified + // the choice is undefined. Canonicalize `access_token` by sticking + // things in `token`. + if tr.AccessToken != "" { + tr.Token = tr.AccessToken + } + + if tr.Token == "" { + return nil, ErrNoToken + } + + return &tr, nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/auth/parse.go b/vendor/github.com/containerd/containerd/remotes/docker/auth/parse.go new file mode 100644 index 000000000..e4529a776 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/auth/parse.go @@ -0,0 +1,200 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package auth + +import ( + "net/http" + "sort" + "strings" +) + +// AuthenticationScheme defines scheme of the authentication method +type AuthenticationScheme byte + +const ( + // BasicAuth is scheme for Basic HTTP Authentication RFC 7617 + BasicAuth AuthenticationScheme = 1 << iota + // DigestAuth is scheme for HTTP Digest Access Authentication RFC 7616 + DigestAuth + // BearerAuth is scheme for OAuth 2.0 Bearer Tokens RFC 6750 + BearerAuth +) + +// Challenge carries information from a WWW-Authenticate response header. +// See RFC 2617. +type Challenge struct { + // scheme is the auth-scheme according to RFC 2617 + Scheme AuthenticationScheme + + // parameters are the auth-params according to RFC 2617 + Parameters map[string]string +} + +type byScheme []Challenge + +func (bs byScheme) Len() int { return len(bs) } +func (bs byScheme) Swap(i, j int) { bs[i], bs[j] = bs[j], bs[i] } + +// Sort in priority order: token > digest > basic +func (bs byScheme) Less(i, j int) bool { return bs[i].Scheme > bs[j].Scheme } + +// Octet types from RFC 2616. +type octetType byte + +var octetTypes [256]octetType + +const ( + isToken octetType = 1 << iota + isSpace +) + +func init() { + // OCTET = + // CHAR = + // CTL = + // CR = + // LF = + // SP = + // HT = + // <"> = + // CRLF = CR LF + // LWS = [CRLF] 1*( SP | HT ) + // TEXT = + // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> + // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT + // token = 1* + // qdtext = > + + for c := 0; c < 256; c++ { + var t octetType + isCtl := c <= 31 || c == 127 + isChar := 0 <= c && c <= 127 + isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) + if strings.ContainsRune(" \t\r\n", rune(c)) { + t |= isSpace + } + if isChar && !isCtl && !isSeparator { + t |= isToken + } + octetTypes[c] = t + } +} + +// ParseAuthHeader parses challenges from WWW-Authenticate header +func ParseAuthHeader(header http.Header) []Challenge { + challenges := []Challenge{} + for _, h := range header[http.CanonicalHeaderKey("WWW-Authenticate")] { + v, p := parseValueAndParams(h) + var s AuthenticationScheme + switch v { + case "basic": + s = BasicAuth + case "digest": + s = DigestAuth + case "bearer": + s = BearerAuth + default: + continue + } + challenges = append(challenges, Challenge{Scheme: s, Parameters: p}) + } + sort.Stable(byScheme(challenges)) + return challenges +} + +func parseValueAndParams(header string) (value string, params map[string]string) { + params = make(map[string]string) + value, s := expectToken(header) + if value == "" { + return + } + value = strings.ToLower(value) + for { + var pkey string + pkey, s = expectToken(skipSpace(s)) + if pkey == "" { + return + } + if !strings.HasPrefix(s, "=") { + return + } + var pvalue string + pvalue, s = expectTokenOrQuoted(s[1:]) + pkey = strings.ToLower(pkey) + params[pkey] = pvalue + s = skipSpace(s) + if !strings.HasPrefix(s, ",") { + return + } + s = s[1:] + } +} + +func skipSpace(s string) (rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isSpace == 0 { + break + } + } + return s[i:] +} + +func expectToken(s string) (token, rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isToken == 0 { + break + } + } + return s[:i], s[i:] +} + +func expectTokenOrQuoted(s string) (value string, rest string) { + if !strings.HasPrefix(s, "\"") { + return expectToken(s) + } + s = s[1:] + for i := 0; i < len(s); i++ { + switch s[i] { + case '"': + return s[:i], s[i+1:] + case '\\': + p := make([]byte, len(s)-1) + j := copy(p, s[:i]) + escape := true + for i = i + 1; i < len(s); i++ { + b := s[i] + switch { + case escape: + escape = false + p[j] = b + j++ + case b == '\\': + escape = true + case b == '"': + return string(p[:j]), s[i+1:] + default: + p[j] = b + j++ + } + } + return "", "" + } + } + return "", "" +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go b/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go new file mode 100644 index 000000000..2bf388e8c --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go @@ -0,0 +1,362 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "encoding/base64" + "errors" + "fmt" + "net/http" + "strings" + "sync" + + "github.com/containerd/log" + + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/remotes/docker/auth" + remoteerrors "github.com/containerd/containerd/remotes/errors" +) + +type dockerAuthorizer struct { + credentials func(string) (string, string, error) + + client *http.Client + header http.Header + mu sync.RWMutex + + // indexed by host name + handlers map[string]*authHandler + + onFetchRefreshToken OnFetchRefreshToken +} + +type authorizerConfig struct { + credentials func(string) (string, string, error) + client *http.Client + header http.Header + onFetchRefreshToken OnFetchRefreshToken +} + +// AuthorizerOpt configures an authorizer +type AuthorizerOpt func(*authorizerConfig) + +// WithAuthClient provides the HTTP client for the authorizer +func WithAuthClient(client *http.Client) AuthorizerOpt { + return func(opt *authorizerConfig) { + opt.client = client + } +} + +// WithAuthCreds provides a credential function to the authorizer +func WithAuthCreds(creds func(string) (string, string, error)) AuthorizerOpt { + return func(opt *authorizerConfig) { + opt.credentials = creds + } +} + +// WithAuthHeader provides HTTP headers for authorization +func WithAuthHeader(hdr http.Header) AuthorizerOpt { + return func(opt *authorizerConfig) { + opt.header = hdr + } +} + +// OnFetchRefreshToken is called on fetching request token. +type OnFetchRefreshToken func(ctx context.Context, refreshToken string, req *http.Request) + +// WithFetchRefreshToken enables fetching "refresh token" (aka "identity token", "offline token"). +func WithFetchRefreshToken(f OnFetchRefreshToken) AuthorizerOpt { + return func(opt *authorizerConfig) { + opt.onFetchRefreshToken = f + } +} + +// NewDockerAuthorizer creates an authorizer using Docker's registry +// authentication spec. +// See https://docs.docker.com/registry/spec/auth/ +func NewDockerAuthorizer(opts ...AuthorizerOpt) Authorizer { + var ao authorizerConfig + for _, opt := range opts { + opt(&ao) + } + + if ao.client == nil { + ao.client = http.DefaultClient + } + + return &dockerAuthorizer{ + credentials: ao.credentials, + client: ao.client, + header: ao.header, + handlers: make(map[string]*authHandler), + onFetchRefreshToken: ao.onFetchRefreshToken, + } +} + +// Authorize handles auth request. +func (a *dockerAuthorizer) Authorize(ctx context.Context, req *http.Request) error { + // skip if there is no auth handler + ah := a.getAuthHandler(req.URL.Host) + if ah == nil { + return nil + } + + auth, refreshToken, err := ah.authorize(ctx) + if err != nil { + return err + } + + req.Header.Set("Authorization", auth) + + if refreshToken != "" { + a.mu.RLock() + onFetchRefreshToken := a.onFetchRefreshToken + a.mu.RUnlock() + if onFetchRefreshToken != nil { + onFetchRefreshToken(ctx, refreshToken, req) + } + } + return nil +} + +func (a *dockerAuthorizer) getAuthHandler(host string) *authHandler { + a.mu.Lock() + defer a.mu.Unlock() + + return a.handlers[host] +} + +func (a *dockerAuthorizer) AddResponses(ctx context.Context, responses []*http.Response) error { + last := responses[len(responses)-1] + host := last.Request.URL.Host + + a.mu.Lock() + defer a.mu.Unlock() + for _, c := range auth.ParseAuthHeader(last.Header) { + if c.Scheme == auth.BearerAuth { + if retry, err := invalidAuthorization(ctx, c, responses); err != nil { + delete(a.handlers, host) + return err + } else if retry { + delete(a.handlers, host) + } + + // reuse existing handler + // + // assume that one registry will return the common + // challenge information, including realm and service. + // and the resource scope is only different part + // which can be provided by each request. + if _, ok := a.handlers[host]; ok { + return nil + } + + var username, secret string + if a.credentials != nil { + var err error + username, secret, err = a.credentials(host) + if err != nil { + return err + } + } + + common, err := auth.GenerateTokenOptions(ctx, host, username, secret, c) + if err != nil { + return err + } + common.FetchRefreshToken = a.onFetchRefreshToken != nil + + a.handlers[host] = newAuthHandler(a.client, a.header, c.Scheme, common) + return nil + } else if c.Scheme == auth.BasicAuth && a.credentials != nil { + username, secret, err := a.credentials(host) + if err != nil { + return err + } + + if username == "" || secret == "" { + return fmt.Errorf("%w: no basic auth credentials", ErrInvalidAuthorization) + } + + a.handlers[host] = newAuthHandler(a.client, a.header, c.Scheme, auth.TokenOptions{ + Username: username, + Secret: secret, + }) + return nil + } + } + return fmt.Errorf("failed to find supported auth scheme: %w", errdefs.ErrNotImplemented) +} + +// authResult is used to control limit rate. +type authResult struct { + sync.WaitGroup + token string + refreshToken string + err error +} + +// authHandler is used to handle auth request per registry server. +type authHandler struct { + sync.Mutex + + header http.Header + + client *http.Client + + // only support basic and bearer schemes + scheme auth.AuthenticationScheme + + // common contains common challenge answer + common auth.TokenOptions + + // scopedTokens caches token indexed by scopes, which used in + // bearer auth case + scopedTokens map[string]*authResult +} + +func newAuthHandler(client *http.Client, hdr http.Header, scheme auth.AuthenticationScheme, opts auth.TokenOptions) *authHandler { + return &authHandler{ + header: hdr, + client: client, + scheme: scheme, + common: opts, + scopedTokens: map[string]*authResult{}, + } +} + +func (ah *authHandler) authorize(ctx context.Context) (string, string, error) { + switch ah.scheme { + case auth.BasicAuth: + return ah.doBasicAuth(ctx) + case auth.BearerAuth: + return ah.doBearerAuth(ctx) + default: + return "", "", fmt.Errorf("failed to find supported auth scheme: %s: %w", string(ah.scheme), errdefs.ErrNotImplemented) + } +} + +func (ah *authHandler) doBasicAuth(ctx context.Context) (string, string, error) { + username, secret := ah.common.Username, ah.common.Secret + + if username == "" || secret == "" { + return "", "", fmt.Errorf("failed to handle basic auth because missing username or secret") + } + + auth := base64.StdEncoding.EncodeToString([]byte(username + ":" + secret)) + return fmt.Sprintf("Basic %s", auth), "", nil +} + +func (ah *authHandler) doBearerAuth(ctx context.Context) (token, refreshToken string, err error) { + // copy common tokenOptions + to := ah.common + + to.Scopes = GetTokenScopes(ctx, to.Scopes) + + // Docs: https://docs.docker.com/registry/spec/auth/scope + scoped := strings.Join(to.Scopes, " ") + + ah.Lock() + if r, exist := ah.scopedTokens[scoped]; exist { + ah.Unlock() + r.Wait() + return r.token, r.refreshToken, r.err + } + + // only one fetch token job + r := new(authResult) + r.Add(1) + ah.scopedTokens[scoped] = r + ah.Unlock() + + defer func() { + token = fmt.Sprintf("Bearer %s", token) + r.token, r.refreshToken, r.err = token, refreshToken, err + r.Done() + }() + + // fetch token for the resource scope + if to.Secret != "" { + defer func() { + if err != nil { + err = fmt.Errorf("failed to fetch oauth token: %w", err) + } + }() + // credential information is provided, use oauth POST endpoint + // TODO: Allow setting client_id + resp, err := auth.FetchTokenWithOAuth(ctx, ah.client, ah.header, "containerd-client", to) + if err != nil { + var errStatus remoteerrors.ErrUnexpectedStatus + if errors.As(err, &errStatus) { + // Registries without support for POST may return 404 for POST /v2/token. + // As of September 2017, GCR is known to return 404. + // As of February 2018, JFrog Artifactory is known to return 401. + // As of January 2022, ACR is known to return 400. + if (errStatus.StatusCode == 405 && to.Username != "") || errStatus.StatusCode == 404 || errStatus.StatusCode == 401 || errStatus.StatusCode == 400 { + resp, err := auth.FetchToken(ctx, ah.client, ah.header, to) + if err != nil { + return "", "", err + } + return resp.Token, resp.RefreshToken, nil + } + log.G(ctx).WithFields(log.Fields{ + "status": errStatus.Status, + "body": string(errStatus.Body), + }).Debugf("token request failed") + } + return "", "", err + } + return resp.AccessToken, resp.RefreshToken, nil + } + // do request anonymously + resp, err := auth.FetchToken(ctx, ah.client, ah.header, to) + if err != nil { + return "", "", fmt.Errorf("failed to fetch anonymous token: %w", err) + } + return resp.Token, resp.RefreshToken, nil +} + +func invalidAuthorization(ctx context.Context, c auth.Challenge, responses []*http.Response) (retry bool, _ error) { + errStr := c.Parameters["error"] + if errStr == "" { + return retry, nil + } + + n := len(responses) + if n == 1 || (n > 1 && !sameRequest(responses[n-2].Request, responses[n-1].Request)) { + limitedErr := errStr + errLenghLimit := 64 + if len(limitedErr) > errLenghLimit { + limitedErr = limitedErr[:errLenghLimit] + "..." + } + log.G(ctx).WithField("error", limitedErr).Debug("authorization error using bearer token, retrying") + return true, nil + } + + return retry, fmt.Errorf("server message: %s: %w", errStr, ErrInvalidAuthorization) +} + +func sameRequest(r1, r2 *http.Request) bool { + if r1.Method != r2.Method { + return false + } + if *r1.URL != *r2.URL { + return false + } + return true +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/converter.go b/vendor/github.com/containerd/containerd/remotes/docker/converter.go new file mode 100644 index 000000000..95a68d70e --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/converter.go @@ -0,0 +1,87 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/remotes" + "github.com/containerd/log" + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// LegacyConfigMediaType should be replaced by OCI image spec. +// +// More detail: docker/distribution#1622 +const LegacyConfigMediaType = "application/octet-stream" + +// ConvertManifest changes application/octet-stream to schema2 config media type if need. +// +// NOTE: +// 1. original manifest will be deleted by next gc round. +// 2. don't cover manifest list. +func ConvertManifest(ctx context.Context, store content.Store, desc ocispec.Descriptor) (ocispec.Descriptor, error) { + if !(desc.MediaType == images.MediaTypeDockerSchema2Manifest || + desc.MediaType == ocispec.MediaTypeImageManifest) { + + log.G(ctx).Warnf("do nothing for media type: %s", desc.MediaType) + return desc, nil + } + + // read manifest data + mb, err := content.ReadBlob(ctx, store, desc) + if err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to read index data: %w", err) + } + + var manifest ocispec.Manifest + if err := json.Unmarshal(mb, &manifest); err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to unmarshal data into manifest: %w", err) + } + + // check config media type + if manifest.Config.MediaType != LegacyConfigMediaType { + return desc, nil + } + + manifest.Config.MediaType = images.MediaTypeDockerSchema2Config + data, err := json.MarshalIndent(manifest, "", " ") + if err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to marshal manifest: %w", err) + } + + // update manifest with gc labels + desc.Digest = digest.Canonical.FromBytes(data) + desc.Size = int64(len(data)) + + labels := map[string]string{} + for i, c := range append([]ocispec.Descriptor{manifest.Config}, manifest.Layers...) { + labels[fmt.Sprintf("containerd.io/gc.ref.content.%d", i)] = c.Digest.String() + } + + ref := remotes.MakeRefKey(ctx, desc) + if err := content.WriteBlob(ctx, store, ref, bytes.NewReader(data), desc, content.WithLabels(labels)); err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to update content: %w", err) + } + return desc, nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go b/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go new file mode 100644 index 000000000..aa7cf4666 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go @@ -0,0 +1,55 @@ +//go:build gofuzz + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "os" + + fuzz "github.com/AdaLogics/go-fuzz-headers" + "github.com/containerd/containerd/content/local" + "github.com/containerd/log" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/sirupsen/logrus" +) + +func FuzzConvertManifest(data []byte) int { + ctx := context.Background() + + // Do not log the message below + // level=warning msg="do nothing for media type: ..." + log.G(ctx).Logger.SetLevel(logrus.PanicLevel) + + f := fuzz.NewConsumer(data) + desc := ocispec.Descriptor{} + err := f.GenerateStruct(&desc) + if err != nil { + return 0 + } + tmpdir, err := os.MkdirTemp("", "fuzzing-") + if err != nil { + return 0 + } + cs, err := local.NewStore(tmpdir) + if err != nil { + return 0 + } + _, _ = ConvertManifest(ctx, cs, desc) + return 1 +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/errcode.go b/vendor/github.com/containerd/containerd/remotes/docker/errcode.go new file mode 100644 index 000000000..8c623bcbe --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/errcode.go @@ -0,0 +1,283 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "encoding/json" + "fmt" + "strings" +) + +// ErrorCoder is the base interface for ErrorCode and Error allowing +// users of each to just call ErrorCode to get the real ID of each +type ErrorCoder interface { + ErrorCode() ErrorCode +} + +// ErrorCode represents the error type. The errors are serialized via strings +// and the integer format may change and should *never* be exported. +type ErrorCode int + +var _ error = ErrorCode(0) + +// ErrorCode just returns itself +func (ec ErrorCode) ErrorCode() ErrorCode { + return ec +} + +// Error returns the ID/Value +func (ec ErrorCode) Error() string { + // NOTE(stevvooe): Cannot use message here since it may have unpopulated args. + return strings.ToLower(strings.Replace(ec.String(), "_", " ", -1)) +} + +// Descriptor returns the descriptor for the error code. +func (ec ErrorCode) Descriptor() ErrorDescriptor { + d, ok := errorCodeToDescriptors[ec] + + if !ok { + return ErrorCodeUnknown.Descriptor() + } + + return d +} + +// String returns the canonical identifier for this error code. +func (ec ErrorCode) String() string { + return ec.Descriptor().Value +} + +// Message returned the human-readable error message for this error code. +func (ec ErrorCode) Message() string { + return ec.Descriptor().Message +} + +// MarshalText encodes the receiver into UTF-8-encoded text and returns the +// result. +func (ec ErrorCode) MarshalText() (text []byte, err error) { + return []byte(ec.String()), nil +} + +// UnmarshalText decodes the form generated by MarshalText. +func (ec *ErrorCode) UnmarshalText(text []byte) error { + desc, ok := idToDescriptors[string(text)] + + if !ok { + desc = ErrorCodeUnknown.Descriptor() + } + + *ec = desc.Code + + return nil +} + +// WithMessage creates a new Error struct based on the passed-in info and +// overrides the Message property. +func (ec ErrorCode) WithMessage(message string) Error { + return Error{ + Code: ec, + Message: message, + } +} + +// WithDetail creates a new Error struct based on the passed-in info and +// set the Detail property appropriately +func (ec ErrorCode) WithDetail(detail interface{}) Error { + return Error{ + Code: ec, + Message: ec.Message(), + }.WithDetail(detail) +} + +// WithArgs creates a new Error struct and sets the Args slice +func (ec ErrorCode) WithArgs(args ...interface{}) Error { + return Error{ + Code: ec, + Message: ec.Message(), + }.WithArgs(args...) +} + +// Error provides a wrapper around ErrorCode with extra Details provided. +type Error struct { + Code ErrorCode `json:"code"` + Message string `json:"message"` + Detail interface{} `json:"detail,omitempty"` + + // TODO(duglin): See if we need an "args" property so we can do the + // variable substitution right before showing the message to the user +} + +var _ error = Error{} + +// ErrorCode returns the ID/Value of this Error +func (e Error) ErrorCode() ErrorCode { + return e.Code +} + +// Error returns a human readable representation of the error. +func (e Error) Error() string { + return fmt.Sprintf("%s: %s", e.Code.Error(), e.Message) +} + +// WithDetail will return a new Error, based on the current one, but with +// some Detail info added +func (e Error) WithDetail(detail interface{}) Error { + return Error{ + Code: e.Code, + Message: e.Message, + Detail: detail, + } +} + +// WithArgs uses the passed-in list of interface{} as the substitution +// variables in the Error's Message string, but returns a new Error +func (e Error) WithArgs(args ...interface{}) Error { + return Error{ + Code: e.Code, + Message: fmt.Sprintf(e.Code.Message(), args...), + Detail: e.Detail, + } +} + +// ErrorDescriptor provides relevant information about a given error code. +type ErrorDescriptor struct { + // Code is the error code that this descriptor describes. + Code ErrorCode + + // Value provides a unique, string key, often captilized with + // underscores, to identify the error code. This value is used as the + // keyed value when serializing api errors. + Value string + + // Message is a short, human readable description of the error condition + // included in API responses. + Message string + + // Description provides a complete account of the errors purpose, suitable + // for use in documentation. + Description string + + // HTTPStatusCode provides the http status code that is associated with + // this error condition. + HTTPStatusCode int +} + +// ParseErrorCode returns the value by the string error code. +// `ErrorCodeUnknown` will be returned if the error is not known. +func ParseErrorCode(value string) ErrorCode { + ed, ok := idToDescriptors[value] + if ok { + return ed.Code + } + + return ErrorCodeUnknown +} + +// Errors provides the envelope for multiple errors and a few sugar methods +// for use within the application. +type Errors []error + +var _ error = Errors{} + +func (errs Errors) Error() string { + switch len(errs) { + case 0: + return "" + case 1: + return errs[0].Error() + default: + msg := "errors:\n" + for _, err := range errs { + msg += err.Error() + "\n" + } + return msg + } +} + +// Len returns the current number of errors. +func (errs Errors) Len() int { + return len(errs) +} + +// MarshalJSON converts slice of error, ErrorCode or Error into a +// slice of Error - then serializes +func (errs Errors) MarshalJSON() ([]byte, error) { + var tmpErrs struct { + Errors []Error `json:"errors,omitempty"` + } + + for _, daErr := range errs { + var err Error + + switch daErr := daErr.(type) { + case ErrorCode: + err = daErr.WithDetail(nil) + case Error: + err = daErr + default: + err = ErrorCodeUnknown.WithDetail(daErr) + + } + + // If the Error struct was setup and they forgot to set the + // Message field (meaning its "") then grab it from the ErrCode + msg := err.Message + if msg == "" { + msg = err.Code.Message() + } + + tmpErrs.Errors = append(tmpErrs.Errors, Error{ + Code: err.Code, + Message: msg, + Detail: err.Detail, + }) + } + + return json.Marshal(tmpErrs) +} + +// UnmarshalJSON deserializes []Error and then converts it into slice of +// Error or ErrorCode +func (errs *Errors) UnmarshalJSON(data []byte) error { + var tmpErrs struct { + Errors []Error + } + + if err := json.Unmarshal(data, &tmpErrs); err != nil { + return err + } + + var newErrs Errors + for _, daErr := range tmpErrs.Errors { + // If Message is empty or exactly matches the Code's message string + // then just use the Code, no need for a full Error struct + if daErr.Detail == nil && (daErr.Message == "" || daErr.Message == daErr.Code.Message()) { + // Error's w/o details get converted to ErrorCode + newErrs = append(newErrs, daErr.Code) + } else { + // Error's w/ details are untouched + newErrs = append(newErrs, Error{ + Code: daErr.Code, + Message: daErr.Message, + Detail: daErr.Detail, + }) + } + } + + *errs = newErrs + return nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/errdesc.go b/vendor/github.com/containerd/containerd/remotes/docker/errdesc.go new file mode 100644 index 000000000..b2bd4d82b --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/errdesc.go @@ -0,0 +1,154 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "fmt" + "net/http" + "sort" + "sync" +) + +var ( + errorCodeToDescriptors = map[ErrorCode]ErrorDescriptor{} + idToDescriptors = map[string]ErrorDescriptor{} + groupToDescriptors = map[string][]ErrorDescriptor{} +) + +var ( + // ErrorCodeUnknown is a generic error that can be used as a last + // resort if there is no situation-specific error message that can be used + ErrorCodeUnknown = Register("errcode", ErrorDescriptor{ + Value: "UNKNOWN", + Message: "unknown error", + Description: `Generic error returned when the error does not have an + API classification.`, + HTTPStatusCode: http.StatusInternalServerError, + }) + + // ErrorCodeUnsupported is returned when an operation is not supported. + ErrorCodeUnsupported = Register("errcode", ErrorDescriptor{ + Value: "UNSUPPORTED", + Message: "The operation is unsupported.", + Description: `The operation was unsupported due to a missing + implementation or invalid set of parameters.`, + HTTPStatusCode: http.StatusMethodNotAllowed, + }) + + // ErrorCodeUnauthorized is returned if a request requires + // authentication. + ErrorCodeUnauthorized = Register("errcode", ErrorDescriptor{ + Value: "UNAUTHORIZED", + Message: "authentication required", + Description: `The access controller was unable to authenticate + the client. Often this will be accompanied by a + Www-Authenticate HTTP response header indicating how to + authenticate.`, + HTTPStatusCode: http.StatusUnauthorized, + }) + + // ErrorCodeDenied is returned if a client does not have sufficient + // permission to perform an action. + ErrorCodeDenied = Register("errcode", ErrorDescriptor{ + Value: "DENIED", + Message: "requested access to the resource is denied", + Description: `The access controller denied access for the + operation on a resource.`, + HTTPStatusCode: http.StatusForbidden, + }) + + // ErrorCodeUnavailable provides a common error to report unavailability + // of a service or endpoint. + ErrorCodeUnavailable = Register("errcode", ErrorDescriptor{ + Value: "UNAVAILABLE", + Message: "service unavailable", + Description: "Returned when a service is not available", + HTTPStatusCode: http.StatusServiceUnavailable, + }) + + // ErrorCodeTooManyRequests is returned if a client attempts too many + // times to contact a service endpoint. + ErrorCodeTooManyRequests = Register("errcode", ErrorDescriptor{ + Value: "TOOMANYREQUESTS", + Message: "too many requests", + Description: `Returned when a client attempts to contact a + service too many times`, + HTTPStatusCode: http.StatusTooManyRequests, + }) +) + +var nextCode = 1000 +var registerLock sync.Mutex + +// Register will make the passed-in error known to the environment and +// return a new ErrorCode +func Register(group string, descriptor ErrorDescriptor) ErrorCode { + registerLock.Lock() + defer registerLock.Unlock() + + descriptor.Code = ErrorCode(nextCode) + + if _, ok := idToDescriptors[descriptor.Value]; ok { + panic(fmt.Sprintf("ErrorValue %q is already registered", descriptor.Value)) + } + if _, ok := errorCodeToDescriptors[descriptor.Code]; ok { + panic(fmt.Sprintf("ErrorCode %v is already registered", descriptor.Code)) + } + + groupToDescriptors[group] = append(groupToDescriptors[group], descriptor) + errorCodeToDescriptors[descriptor.Code] = descriptor + idToDescriptors[descriptor.Value] = descriptor + + nextCode++ + return descriptor.Code +} + +type byValue []ErrorDescriptor + +func (a byValue) Len() int { return len(a) } +func (a byValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byValue) Less(i, j int) bool { return a[i].Value < a[j].Value } + +// GetGroupNames returns the list of Error group names that are registered +func GetGroupNames() []string { + keys := []string{} + + for k := range groupToDescriptors { + keys = append(keys, k) + } + sort.Strings(keys) + return keys +} + +// GetErrorCodeGroup returns the named group of error descriptors +func GetErrorCodeGroup(name string) []ErrorDescriptor { + desc := groupToDescriptors[name] + sort.Sort(byValue(desc)) + return desc +} + +// GetErrorAllDescriptors returns a slice of all ErrorDescriptors that are +// registered, irrespective of what group they're in +func GetErrorAllDescriptors() []ErrorDescriptor { + result := []ErrorDescriptor{} + + for _, group := range GetGroupNames() { + result = append(result, GetErrorCodeGroup(group)...) + } + sort.Sort(byValue(result)) + return result +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go b/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go new file mode 100644 index 000000000..c4c401ad1 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go @@ -0,0 +1,314 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/containerd/log" + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/images" +) + +type dockerFetcher struct { + *dockerBase +} + +func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + ctx = log.WithLogger(ctx, log.G(ctx).WithField("digest", desc.Digest)) + + hosts := r.filterHosts(HostCapabilityPull) + if len(hosts) == 0 { + return nil, fmt.Errorf("no pull hosts: %w", errdefs.ErrNotFound) + } + + ctx, err := ContextWithRepositoryScope(ctx, r.refspec, false) + if err != nil { + return nil, err + } + + return newHTTPReadSeeker(desc.Size, func(offset int64) (io.ReadCloser, error) { + // firstly try fetch via external urls + for _, us := range desc.URLs { + u, err := url.Parse(us) + if err != nil { + log.G(ctx).WithError(err).Debugf("failed to parse %q", us) + continue + } + if u.Scheme != "http" && u.Scheme != "https" { + log.G(ctx).Debug("non-http(s) alternative url is unsupported") + continue + } + ctx = log.WithLogger(ctx, log.G(ctx).WithField("url", u)) + log.G(ctx).Info("request") + + // Try this first, parse it + host := RegistryHost{ + Client: http.DefaultClient, + Host: u.Host, + Scheme: u.Scheme, + Path: u.Path, + Capabilities: HostCapabilityPull, + } + req := r.request(host, http.MethodGet) + // Strip namespace from base + req.path = u.Path + if u.RawQuery != "" { + req.path = req.path + "?" + u.RawQuery + } + + rc, err := r.open(ctx, req, desc.MediaType, offset) + if err != nil { + if errdefs.IsNotFound(err) { + continue // try one of the other urls. + } + + return nil, err + } + + return rc, nil + } + + // Try manifests endpoints for manifests types + switch desc.MediaType { + case images.MediaTypeDockerSchema2Manifest, images.MediaTypeDockerSchema2ManifestList, + images.MediaTypeDockerSchema1Manifest, + ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex: + + var firstErr error + for _, host := range r.hosts { + req := r.request(host, http.MethodGet, "manifests", desc.Digest.String()) + if err := req.addNamespace(r.refspec.Hostname()); err != nil { + return nil, err + } + + rc, err := r.open(ctx, req, desc.MediaType, offset) + if err != nil { + // Store the error for referencing later + if firstErr == nil { + firstErr = err + } + continue // try another host + } + + return rc, nil + } + + return nil, firstErr + } + + // Finally use blobs endpoints + var firstErr error + for _, host := range r.hosts { + req := r.request(host, http.MethodGet, "blobs", desc.Digest.String()) + if err := req.addNamespace(r.refspec.Hostname()); err != nil { + return nil, err + } + + rc, err := r.open(ctx, req, desc.MediaType, offset) + if err != nil { + // Store the error for referencing later + if firstErr == nil { + firstErr = err + } + continue // try another host + } + + return rc, nil + } + + if errdefs.IsNotFound(firstErr) { + firstErr = fmt.Errorf("could not fetch content descriptor %v (%v) from remote: %w", + desc.Digest, desc.MediaType, errdefs.ErrNotFound, + ) + } + + return nil, firstErr + + }) +} + +func (r dockerFetcher) createGetReq(ctx context.Context, host RegistryHost, ps ...string) (*request, int64, error) { + headReq := r.request(host, http.MethodHead, ps...) + if err := headReq.addNamespace(r.refspec.Hostname()); err != nil { + return nil, 0, err + } + + headResp, err := headReq.doWithRetries(ctx, nil) + if err != nil { + return nil, 0, err + } + if headResp.Body != nil { + headResp.Body.Close() + } + if headResp.StatusCode > 299 { + return nil, 0, fmt.Errorf("unexpected HEAD status code %v: %s", headReq.String(), headResp.Status) + } + + getReq := r.request(host, http.MethodGet, ps...) + if err := getReq.addNamespace(r.refspec.Hostname()); err != nil { + return nil, 0, err + } + return getReq, headResp.ContentLength, nil +} + +func (r dockerFetcher) FetchByDigest(ctx context.Context, dgst digest.Digest) (io.ReadCloser, ocispec.Descriptor, error) { + var desc ocispec.Descriptor + ctx = log.WithLogger(ctx, log.G(ctx).WithField("digest", dgst)) + + hosts := r.filterHosts(HostCapabilityPull) + if len(hosts) == 0 { + return nil, desc, fmt.Errorf("no pull hosts: %w", errdefs.ErrNotFound) + } + + ctx, err := ContextWithRepositoryScope(ctx, r.refspec, false) + if err != nil { + return nil, desc, err + } + + var ( + getReq *request + sz int64 + firstErr error + ) + + for _, host := range r.hosts { + getReq, sz, err = r.createGetReq(ctx, host, "blobs", dgst.String()) + if err == nil { + break + } + // Store the error for referencing later + if firstErr == nil { + firstErr = err + } + } + + if getReq == nil { + // Fall back to the "manifests" endpoint + for _, host := range r.hosts { + getReq, sz, err = r.createGetReq(ctx, host, "manifests", dgst.String()) + if err == nil { + break + } + // Store the error for referencing later + if firstErr == nil { + firstErr = err + } + } + } + + if getReq == nil { + if errdefs.IsNotFound(firstErr) { + firstErr = fmt.Errorf("could not fetch content %v from remote: %w", dgst, errdefs.ErrNotFound) + } + if firstErr == nil { + firstErr = fmt.Errorf("could not fetch content %v from remote: (unknown)", dgst) + } + return nil, desc, firstErr + } + + seeker, err := newHTTPReadSeeker(sz, func(offset int64) (io.ReadCloser, error) { + return r.open(ctx, getReq, "", offset) + }) + if err != nil { + return nil, desc, err + } + + desc = ocispec.Descriptor{ + MediaType: "application/octet-stream", + Digest: dgst, + Size: sz, + } + return seeker, desc, nil +} + +func (r dockerFetcher) open(ctx context.Context, req *request, mediatype string, offset int64) (_ io.ReadCloser, retErr error) { + if mediatype == "" { + req.header.Set("Accept", "*/*") + } else { + req.header.Set("Accept", strings.Join([]string{mediatype, `*/*`}, ", ")) + } + + if offset > 0 { + // Note: "Accept-Ranges: bytes" cannot be trusted as some endpoints + // will return the header without supporting the range. The content + // range must always be checked. + req.header.Set("Range", fmt.Sprintf("bytes=%d-", offset)) + } + + resp, err := req.doWithRetries(ctx, nil) + if err != nil { + return nil, err + } + defer func() { + if retErr != nil { + resp.Body.Close() + } + }() + + if resp.StatusCode > 299 { + // TODO(stevvooe): When doing a offset specific request, we should + // really distinguish between a 206 and a 200. In the case of 200, we + // can discard the bytes, hiding the seek behavior from the + // implementation. + + if resp.StatusCode == http.StatusNotFound { + return nil, fmt.Errorf("content at %v not found: %w", req.String(), errdefs.ErrNotFound) + } + var registryErr Errors + if err := json.NewDecoder(resp.Body).Decode(®istryErr); err != nil || registryErr.Len() < 1 { + return nil, fmt.Errorf("unexpected status code %v: %v", req.String(), resp.Status) + } + return nil, fmt.Errorf("unexpected status code %v: %s - Server message: %s", req.String(), resp.Status, registryErr.Error()) + } + if offset > 0 { + cr := resp.Header.Get("content-range") + if cr != "" { + if !strings.HasPrefix(cr, fmt.Sprintf("bytes %d-", offset)) { + return nil, fmt.Errorf("unhandled content range in response: %v", cr) + + } + } else { + // TODO: Should any cases where use of content range + // without the proper header be considered? + // 206 responses? + + // Discard up to offset + // Could use buffer pool here but this case should be rare + n, err := io.Copy(io.Discard, io.LimitReader(resp.Body, offset)) + if err != nil { + return nil, fmt.Errorf("failed to discard to offset: %w", err) + } + if n != offset { + return nil, errors.New("unable to discard to offset") + } + + } + } + + return resp.Body, nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/fetcher_fuzz.go b/vendor/github.com/containerd/containerd/remotes/docker/fetcher_fuzz.go new file mode 100644 index 000000000..f396a74f4 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/fetcher_fuzz.go @@ -0,0 +1,74 @@ +//go:build gofuzz + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" +) + +func FuzzFetcher(data []byte) int { + dataLen := len(data) + if dataLen == 0 { + return -1 + } + + s := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + rw.Header().Set("content-range", fmt.Sprintf("bytes %d-%d/%d", 0, dataLen-1, dataLen)) + rw.Header().Set("content-length", fmt.Sprintf("%d", dataLen)) + rw.Write(data) + })) + defer s.Close() + + u, err := url.Parse(s.URL) + if err != nil { + return 0 + } + + f := dockerFetcher{&dockerBase{ + repository: "nonempty", + }} + host := RegistryHost{ + Client: s.Client(), + Host: u.Host, + Scheme: u.Scheme, + Path: u.Path, + } + + ctx := context.Background() + req := f.request(host, http.MethodGet) + rc, err := f.open(ctx, req, "", 0) + if err != nil { + return 0 + } + b, err := io.ReadAll(rc) + if err != nil { + return 0 + } + + expected := data + if len(b) != len(expected) { + panic("len of request is not equal to len of expected but should be") + } + return 1 +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/handler.go b/vendor/github.com/containerd/containerd/remotes/docker/handler.go new file mode 100644 index 000000000..ccec49013 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/handler.go @@ -0,0 +1,149 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "fmt" + "net/url" + "strings" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/labels" + "github.com/containerd/containerd/reference" + "github.com/containerd/log" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// AppendDistributionSourceLabel updates the label of blob with distribution source. +func AppendDistributionSourceLabel(manager content.Manager, ref string) (images.HandlerFunc, error) { + refspec, err := reference.Parse(ref) + if err != nil { + return nil, err + } + + u, err := url.Parse("dummy://" + refspec.Locator) + if err != nil { + return nil, err + } + + source, repo := u.Hostname(), strings.TrimPrefix(u.Path, "/") + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + info, err := manager.Info(ctx, desc.Digest) + if err != nil { + return nil, err + } + + key := distributionSourceLabelKey(source) + + originLabel := "" + if info.Labels != nil { + originLabel = info.Labels[key] + } + value := appendDistributionSourceLabel(originLabel, repo) + + // The repo name has been limited under 256 and the distribution + // label might hit the limitation of label size, when blob data + // is used as the very, very common layer. + if err := labels.Validate(key, value); err != nil { + log.G(ctx).Warnf("skip to append distribution label: %s", err) + return nil, nil + } + + info = content.Info{ + Digest: desc.Digest, + Labels: map[string]string{ + key: value, + }, + } + _, err = manager.Update(ctx, info, fmt.Sprintf("labels.%s", key)) + return nil, err + }, nil +} + +func appendDistributionSourceLabel(originLabel, repo string) string { + repos := []string{} + if originLabel != "" { + repos = strings.Split(originLabel, ",") + } + repos = append(repos, repo) + + // use empty string to present duplicate items + for i := 1; i < len(repos); i++ { + tmp, j := repos[i], i-1 + for ; j >= 0 && repos[j] >= tmp; j-- { + if repos[j] == tmp { + tmp = "" + } + repos[j+1] = repos[j] + } + repos[j+1] = tmp + } + + i := 0 + for ; i < len(repos) && repos[i] == ""; i++ { + } + + return strings.Join(repos[i:], ",") +} + +func distributionSourceLabelKey(source string) string { + return fmt.Sprintf("%s.%s", labels.LabelDistributionSource, source) +} + +// selectRepositoryMountCandidate will select the repo which has longest +// common prefix components as the candidate. +func selectRepositoryMountCandidate(refspec reference.Spec, sources map[string]string) string { + u, err := url.Parse("dummy://" + refspec.Locator) + if err != nil { + // NOTE: basically, it won't be error here + return "" + } + + source, target := u.Hostname(), strings.TrimPrefix(u.Path, "/") + repoLabel, ok := sources[distributionSourceLabelKey(source)] + if !ok || repoLabel == "" { + return "" + } + + n, match := 0, "" + components := strings.Split(target, "/") + for _, repo := range strings.Split(repoLabel, ",") { + // the target repo is not a candidate + if repo == target { + continue + } + + if l := commonPrefixComponents(components, repo); l >= n { + n, match = l, repo + } + } + return match +} + +func commonPrefixComponents(components []string, target string) int { + targetComponents := strings.Split(target, "/") + + i := 0 + for ; i < len(components) && i < len(targetComponents); i++ { + if components[i] != targetComponents[i] { + break + } + } + return i +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go b/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go new file mode 100644 index 000000000..deb888cbc --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go @@ -0,0 +1,179 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "bytes" + "fmt" + "io" + + "github.com/containerd/log" + + "github.com/containerd/containerd/errdefs" +) + +const maxRetry = 3 + +type httpReadSeeker struct { + size int64 + offset int64 + rc io.ReadCloser + open func(offset int64) (io.ReadCloser, error) + closed bool + + errsWithNoProgress int +} + +func newHTTPReadSeeker(size int64, open func(offset int64) (io.ReadCloser, error)) (io.ReadCloser, error) { + return &httpReadSeeker{ + size: size, + open: open, + }, nil +} + +func (hrs *httpReadSeeker) Read(p []byte) (n int, err error) { + if hrs.closed { + return 0, io.EOF + } + + rd, err := hrs.reader() + if err != nil { + return 0, err + } + + n, err = rd.Read(p) + hrs.offset += int64(n) + if n > 0 || err == nil { + hrs.errsWithNoProgress = 0 + } + if err == io.ErrUnexpectedEOF { + // connection closed unexpectedly. try reconnecting. + if n == 0 { + hrs.errsWithNoProgress++ + if hrs.errsWithNoProgress > maxRetry { + return // too many retries for this offset with no progress + } + } + if hrs.rc != nil { + if clsErr := hrs.rc.Close(); clsErr != nil { + log.L.WithError(clsErr).Error("httpReadSeeker: failed to close ReadCloser") + } + hrs.rc = nil + } + if _, err2 := hrs.reader(); err2 == nil { + return n, nil + } + } else if err == io.EOF { + // The CRI's imagePullProgressTimeout relies on responseBody.Close to + // update the process monitor's status. If the err is io.EOF, close + // the connection since there is no more available data. + if hrs.rc != nil { + if clsErr := hrs.rc.Close(); clsErr != nil { + log.L.WithError(clsErr).Error("httpReadSeeker: failed to close ReadCloser after io.EOF") + } + hrs.rc = nil + } + } + return +} + +func (hrs *httpReadSeeker) Close() error { + if hrs.closed { + return nil + } + hrs.closed = true + if hrs.rc != nil { + return hrs.rc.Close() + } + + return nil +} + +func (hrs *httpReadSeeker) Seek(offset int64, whence int) (int64, error) { + if hrs.closed { + return 0, fmt.Errorf("Fetcher.Seek: closed: %w", errdefs.ErrUnavailable) + } + + abs := hrs.offset + switch whence { + case io.SeekStart: + abs = offset + case io.SeekCurrent: + abs += offset + case io.SeekEnd: + if hrs.size == -1 { + return 0, fmt.Errorf("Fetcher.Seek: unknown size, cannot seek from end: %w", errdefs.ErrUnavailable) + } + abs = hrs.size + offset + default: + return 0, fmt.Errorf("Fetcher.Seek: invalid whence: %w", errdefs.ErrInvalidArgument) + } + + if abs < 0 { + return 0, fmt.Errorf("Fetcher.Seek: negative offset: %w", errdefs.ErrInvalidArgument) + } + + if abs != hrs.offset { + if hrs.rc != nil { + if err := hrs.rc.Close(); err != nil { + log.L.WithError(err).Error("Fetcher.Seek: failed to close ReadCloser") + } + + hrs.rc = nil + } + + hrs.offset = abs + } + + return hrs.offset, nil +} + +func (hrs *httpReadSeeker) reader() (io.Reader, error) { + if hrs.rc != nil { + return hrs.rc, nil + } + + if hrs.size == -1 || hrs.offset < hrs.size { + // only try to reopen the body request if we are seeking to a value + // less than the actual size. + if hrs.open == nil { + return nil, fmt.Errorf("cannot open: %w", errdefs.ErrNotImplemented) + } + + rc, err := hrs.open(hrs.offset) + if err != nil { + return nil, fmt.Errorf("httpReadSeeker: failed open: %w", err) + } + + if hrs.rc != nil { + if err := hrs.rc.Close(); err != nil { + log.L.WithError(err).Error("httpReadSeeker: failed to close ReadCloser") + } + } + hrs.rc = rc + } else { + // There is an edge case here where offset == size of the content. If + // we seek, we will probably get an error for content that cannot be + // sought (?). In that case, we should err on committing the content, + // as the length is already satisfied but we just return the empty + // reader instead. + + hrs.rc = io.NopCloser(bytes.NewReader([]byte{})) + } + + return hrs.rc, nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go new file mode 100644 index 000000000..f97ab144e --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go @@ -0,0 +1,563 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + "sync" + "time" + + "github.com/containerd/log" + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/remotes" + remoteserrors "github.com/containerd/containerd/remotes/errors" +) + +type dockerPusher struct { + *dockerBase + object string + + // TODO: namespace tracker + tracker StatusTracker +} + +// Writer implements Ingester API of content store. This allows the client +// to receive ErrUnavailable when there is already an on-going upload. +// Note that the tracker MUST implement StatusTrackLocker interface to avoid +// race condition on StatusTracker. +func (p dockerPusher) Writer(ctx context.Context, opts ...content.WriterOpt) (content.Writer, error) { + var wOpts content.WriterOpts + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil, err + } + } + if wOpts.Ref == "" { + return nil, fmt.Errorf("ref must not be empty: %w", errdefs.ErrInvalidArgument) + } + return p.push(ctx, wOpts.Desc, wOpts.Ref, true) +} + +func (p dockerPusher) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) { + return p.push(ctx, desc, remotes.MakeRefKey(ctx, desc), false) +} + +func (p dockerPusher) push(ctx context.Context, desc ocispec.Descriptor, ref string, unavailableOnFail bool) (content.Writer, error) { + if l, ok := p.tracker.(StatusTrackLocker); ok { + l.Lock(ref) + defer l.Unlock(ref) + } + ctx, err := ContextWithRepositoryScope(ctx, p.refspec, true) + if err != nil { + return nil, err + } + status, err := p.tracker.GetStatus(ref) + if err == nil { + if status.Committed && status.Offset == status.Total { + return nil, fmt.Errorf("ref %v: %w", ref, errdefs.ErrAlreadyExists) + } + if unavailableOnFail && status.ErrClosed == nil { + // Another push of this ref is happening elsewhere. The rest of function + // will continue only when `errdefs.IsNotFound(err) == true` (i.e. there + // is no actively-tracked ref already). + return nil, fmt.Errorf("push is on-going: %w", errdefs.ErrUnavailable) + } + // TODO: Handle incomplete status + } else if !errdefs.IsNotFound(err) { + return nil, fmt.Errorf("failed to get status: %w", err) + } + + hosts := p.filterHosts(HostCapabilityPush) + if len(hosts) == 0 { + return nil, fmt.Errorf("no push hosts: %w", errdefs.ErrNotFound) + } + + var ( + isManifest bool + existCheck []string + host = hosts[0] + ) + + switch desc.MediaType { + case images.MediaTypeDockerSchema2Manifest, images.MediaTypeDockerSchema2ManifestList, + ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex: + isManifest = true + existCheck = getManifestPath(p.object, desc.Digest) + default: + existCheck = []string{"blobs", desc.Digest.String()} + } + + req := p.request(host, http.MethodHead, existCheck...) + req.header.Set("Accept", strings.Join([]string{desc.MediaType, `*/*`}, ", ")) + + log.G(ctx).WithField("url", req.String()).Debugf("checking and pushing to") + + resp, err := req.doWithRetries(ctx, nil) + if err != nil { + if !errors.Is(err, ErrInvalidAuthorization) { + return nil, err + } + log.G(ctx).WithError(err).Debugf("Unable to check existence, continuing with push") + } else { + if resp.StatusCode == http.StatusOK { + var exists bool + if isManifest && existCheck[1] != desc.Digest.String() { + dgstHeader := digest.Digest(resp.Header.Get("Docker-Content-Digest")) + if dgstHeader == desc.Digest { + exists = true + } + } else { + exists = true + } + + if exists { + p.tracker.SetStatus(ref, Status{ + Committed: true, + PushStatus: PushStatus{ + Exists: true, + }, + Status: content.Status{ + Ref: ref, + Total: desc.Size, + Offset: desc.Size, + // TODO: Set updated time? + }, + }) + resp.Body.Close() + return nil, fmt.Errorf("content %v on remote: %w", desc.Digest, errdefs.ErrAlreadyExists) + } + } else if resp.StatusCode != http.StatusNotFound { + err := remoteserrors.NewUnexpectedStatusErr(resp) + log.G(ctx).WithField("resp", resp).WithField("body", string(err.(remoteserrors.ErrUnexpectedStatus).Body)).Debug("unexpected response") + resp.Body.Close() + return nil, err + } + resp.Body.Close() + } + + if isManifest { + putPath := getManifestPath(p.object, desc.Digest) + req = p.request(host, http.MethodPut, putPath...) + req.header.Add("Content-Type", desc.MediaType) + } else { + // Start upload request + req = p.request(host, http.MethodPost, "blobs", "uploads/") + + mountedFrom := "" + var resp *http.Response + if fromRepo := selectRepositoryMountCandidate(p.refspec, desc.Annotations); fromRepo != "" { + preq := requestWithMountFrom(req, desc.Digest.String(), fromRepo) + pctx := ContextWithAppendPullRepositoryScope(ctx, fromRepo) + + // NOTE: the fromRepo might be private repo and + // auth service still can grant token without error. + // but the post request will fail because of 401. + // + // for the private repo, we should remove mount-from + // query and send the request again. + resp, err = preq.doWithRetries(pctx, nil) + if err != nil { + return nil, err + } + + switch resp.StatusCode { + case http.StatusUnauthorized: + log.G(ctx).Debugf("failed to mount from repository %s", fromRepo) + + resp.Body.Close() + resp = nil + case http.StatusCreated: + mountedFrom = path.Join(p.refspec.Hostname(), fromRepo) + } + } + + if resp == nil { + resp, err = req.doWithRetries(ctx, nil) + if err != nil { + if errors.Is(err, ErrInvalidAuthorization) { + return nil, fmt.Errorf("push access denied, repository does not exist or may require authorization: %w", err) + } + return nil, err + } + } + defer resp.Body.Close() + + switch resp.StatusCode { + case http.StatusOK, http.StatusAccepted, http.StatusNoContent: + case http.StatusCreated: + p.tracker.SetStatus(ref, Status{ + Committed: true, + PushStatus: PushStatus{ + MountedFrom: mountedFrom, + }, + Status: content.Status{ + Ref: ref, + Total: desc.Size, + Offset: desc.Size, + }, + }) + return nil, fmt.Errorf("content %v on remote: %w", desc.Digest, errdefs.ErrAlreadyExists) + default: + err := remoteserrors.NewUnexpectedStatusErr(resp) + log.G(ctx).WithField("resp", resp).WithField("body", string(err.(remoteserrors.ErrUnexpectedStatus).Body)).Debug("unexpected response") + return nil, err + } + + var ( + location = resp.Header.Get("Location") + lurl *url.URL + lhost = host + ) + // Support paths without host in location + if strings.HasPrefix(location, "/") { + lurl, err = url.Parse(lhost.Scheme + "://" + lhost.Host + location) + if err != nil { + return nil, fmt.Errorf("unable to parse location %v: %w", location, err) + } + } else { + if !strings.Contains(location, "://") { + location = lhost.Scheme + "://" + location + } + lurl, err = url.Parse(location) + if err != nil { + return nil, fmt.Errorf("unable to parse location %v: %w", location, err) + } + + if lurl.Host != lhost.Host || lhost.Scheme != lurl.Scheme { + lhost.Scheme = lurl.Scheme + lhost.Host = lurl.Host + + // Check if different than what was requested, accounting for fallback in the transport layer + requested := resp.Request.URL + if requested.Host != lhost.Host || requested.Scheme != lhost.Scheme { + // Strip authorizer if change to host or scheme + lhost.Authorizer = nil + log.G(ctx).WithField("host", lhost.Host).WithField("scheme", lhost.Scheme).Debug("upload changed destination, authorizer removed") + } + } + } + q := lurl.Query() + q.Add("digest", desc.Digest.String()) + + req = p.request(lhost, http.MethodPut) + req.header.Set("Content-Type", "application/octet-stream") + req.path = lurl.Path + "?" + q.Encode() + } + p.tracker.SetStatus(ref, Status{ + Status: content.Status{ + Ref: ref, + Total: desc.Size, + Expected: desc.Digest, + StartedAt: time.Now(), + }, + }) + + // TODO: Support chunked upload + + pushw := newPushWriter(p.dockerBase, ref, desc.Digest, p.tracker, isManifest) + + req.body = func() (io.ReadCloser, error) { + pr, pw := io.Pipe() + pushw.setPipe(pw) + return pr, nil + } + req.size = desc.Size + + go func() { + resp, err := req.doWithRetries(ctx, nil) + if err != nil { + pushw.setError(err) + return + } + + switch resp.StatusCode { + case http.StatusOK, http.StatusCreated, http.StatusNoContent: + default: + err := remoteserrors.NewUnexpectedStatusErr(resp) + log.G(ctx).WithField("resp", resp).WithField("body", string(err.(remoteserrors.ErrUnexpectedStatus).Body)).Debug("unexpected response") + pushw.setError(err) + return + } + pushw.setResponse(resp) + }() + + return pushw, nil +} + +func getManifestPath(object string, dgst digest.Digest) []string { + if i := strings.IndexByte(object, '@'); i >= 0 { + if object[i+1:] != dgst.String() { + // use digest, not tag + object = "" + } else { + // strip @ for registry path to make tag + object = object[:i] + } + + } + + if object == "" { + return []string{"manifests", dgst.String()} + } + + return []string{"manifests", object} +} + +type pushWriter struct { + base *dockerBase + ref string + + pipe *io.PipeWriter + + done chan struct{} + closeOnce sync.Once + + pipeC chan *io.PipeWriter + respC chan *http.Response + errC chan error + + isManifest bool + + expected digest.Digest + tracker StatusTracker +} + +func newPushWriter(db *dockerBase, ref string, expected digest.Digest, tracker StatusTracker, isManifest bool) *pushWriter { + // Initialize and create response + return &pushWriter{ + base: db, + ref: ref, + expected: expected, + tracker: tracker, + pipeC: make(chan *io.PipeWriter, 1), + respC: make(chan *http.Response, 1), + errC: make(chan error, 1), + done: make(chan struct{}), + isManifest: isManifest, + } +} + +func (pw *pushWriter) setPipe(p *io.PipeWriter) { + select { + case <-pw.done: + case pw.pipeC <- p: + } +} + +func (pw *pushWriter) setError(err error) { + select { + case <-pw.done: + case pw.errC <- err: + } +} + +func (pw *pushWriter) setResponse(resp *http.Response) { + select { + case <-pw.done: + case pw.respC <- resp: + } +} + +func (pw *pushWriter) replacePipe(p *io.PipeWriter) error { + if pw.pipe == nil { + pw.pipe = p + return nil + } + + pw.pipe.CloseWithError(content.ErrReset) + pw.pipe = p + + // If content has already been written, the bytes + // cannot be written again and the caller must reset + status, err := pw.tracker.GetStatus(pw.ref) + if err != nil { + return err + } + status.Offset = 0 + status.UpdatedAt = time.Now() + pw.tracker.SetStatus(pw.ref, status) + return content.ErrReset +} + +func (pw *pushWriter) Write(p []byte) (n int, err error) { + status, err := pw.tracker.GetStatus(pw.ref) + if err != nil { + return n, err + } + + if pw.pipe == nil { + select { + case <-pw.done: + return 0, io.ErrClosedPipe + case p := <-pw.pipeC: + pw.replacePipe(p) + } + } else { + select { + case <-pw.done: + return 0, io.ErrClosedPipe + case p := <-pw.pipeC: + return 0, pw.replacePipe(p) + default: + } + } + + n, err = pw.pipe.Write(p) + if errors.Is(err, io.ErrClosedPipe) { + // if the pipe is closed, we might have the original error on the error + // channel - so we should try and get it + select { + case <-pw.done: + case err = <-pw.errC: + pw.Close() + case p := <-pw.pipeC: + return 0, pw.replacePipe(p) + case resp := <-pw.respC: + pw.setResponse(resp) + } + } + status.Offset += int64(n) + status.UpdatedAt = time.Now() + pw.tracker.SetStatus(pw.ref, status) + return +} + +func (pw *pushWriter) Close() error { + // Ensure pipeC is closed but handle `Close()` being + // called multiple times without panicking + pw.closeOnce.Do(func() { + close(pw.done) + }) + if pw.pipe != nil { + status, err := pw.tracker.GetStatus(pw.ref) + if err == nil && !status.Committed { + // Closing an incomplete writer. Record this as an error so that following write can retry it. + status.ErrClosed = errors.New("closed incomplete writer") + pw.tracker.SetStatus(pw.ref, status) + } + return pw.pipe.Close() + } + return nil +} + +func (pw *pushWriter) Status() (content.Status, error) { + status, err := pw.tracker.GetStatus(pw.ref) + if err != nil { + return content.Status{}, err + } + return status.Status, nil + +} + +func (pw *pushWriter) Digest() digest.Digest { + // TODO: Get rid of this function? + return pw.expected +} + +func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + // Check whether read has already thrown an error + if _, err := pw.pipe.Write([]byte{}); err != nil && !errors.Is(err, io.ErrClosedPipe) { + return fmt.Errorf("pipe error before commit: %w", err) + } + + if err := pw.pipe.Close(); err != nil { + return err + } + // TODO: timeout waiting for response + var resp *http.Response + select { + case <-pw.done: + return io.ErrClosedPipe + case err := <-pw.errC: + pw.Close() + return err + case resp = <-pw.respC: + defer resp.Body.Close() + case p := <-pw.pipeC: + // check whether the pipe has changed in the commit, because sometimes Write + // can complete successfully, but the pipe may have changed. In that case, the + // content needs to be reset. + return pw.replacePipe(p) + } + + // 201 is specified return status, some registries return + // 200, 202 or 204. + switch resp.StatusCode { + case http.StatusOK, http.StatusCreated, http.StatusNoContent, http.StatusAccepted: + default: + return remoteserrors.NewUnexpectedStatusErr(resp) + } + + status, err := pw.tracker.GetStatus(pw.ref) + if err != nil { + return fmt.Errorf("failed to get status: %w", err) + } + + if size > 0 && size != status.Offset { + return fmt.Errorf("unexpected size %d, expected %d", status.Offset, size) + } + + if expected == "" { + expected = status.Expected + } + + actual, err := digest.Parse(resp.Header.Get("Docker-Content-Digest")) + if err != nil { + return fmt.Errorf("invalid content digest in response: %w", err) + } + + if actual != expected { + return fmt.Errorf("got digest %s, expected %s", actual, expected) + } + + status.Committed = true + status.UpdatedAt = time.Now() + pw.tracker.SetStatus(pw.ref, status) + + return nil +} + +func (pw *pushWriter) Truncate(size int64) error { + // TODO: if blob close request and start new request at offset + // TODO: always error on manifest + return errors.New("cannot truncate remote upload") +} + +func requestWithMountFrom(req *request, mount, from string) *request { + creq := *req + + sep := "?" + if strings.Contains(creq.path, sep) { + sep = "&" + } + + creq.path = creq.path + sep + "mount=" + mount + "&from=" + from + + return &creq +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/registry.go b/vendor/github.com/containerd/containerd/remotes/docker/registry.go new file mode 100644 index 000000000..98cafcd06 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/registry.go @@ -0,0 +1,244 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "errors" + "net" + "net/http" +) + +// HostCapabilities represent the capabilities of the registry +// host. This also represents the set of operations for which +// the registry host may be trusted to perform. +// +// For example pushing is a capability which should only be +// performed on an upstream source, not a mirror. +// Resolving (the process of converting a name into a digest) +// must be considered a trusted operation and only done by +// a host which is trusted (or more preferably by secure process +// which can prove the provenance of the mapping). A public +// mirror should never be trusted to do a resolve action. +// +// | Registry Type | Pull | Resolve | Push | +// |------------------|------|---------|------| +// | Public Registry | yes | yes | yes | +// | Private Registry | yes | yes | yes | +// | Public Mirror | yes | no | no | +// | Private Mirror | yes | yes | no | +type HostCapabilities uint8 + +const ( + // HostCapabilityPull represents the capability to fetch manifests + // and blobs by digest + HostCapabilityPull HostCapabilities = 1 << iota + + // HostCapabilityResolve represents the capability to fetch manifests + // by name + HostCapabilityResolve + + // HostCapabilityPush represents the capability to push blobs and + // manifests + HostCapabilityPush + + // Reserved for future capabilities (i.e. search, catalog, remove) +) + +// Has checks whether the capabilities list has the provide capability +func (c HostCapabilities) Has(t HostCapabilities) bool { + return c&t == t +} + +// RegistryHost represents a complete configuration for a registry +// host, representing the capabilities, authorizations, connection +// configuration, and location. +type RegistryHost struct { + Client *http.Client + Authorizer Authorizer + Host string + Scheme string + Path string + Capabilities HostCapabilities + Header http.Header +} + +func (h RegistryHost) isProxy(refhost string) bool { + if refhost != h.Host { + if refhost != "docker.io" || h.Host != "registry-1.docker.io" { + return true + } + } + return false +} + +// RegistryHosts fetches the registry hosts for a given namespace, +// provided by the host component of an distribution image reference. +type RegistryHosts func(string) ([]RegistryHost, error) + +// Registries joins multiple registry configuration functions, using the same +// order as provided within the arguments. When an empty registry configuration +// is returned with a nil error, the next function will be called. +// NOTE: This function will not join configurations, as soon as a non-empty +// configuration is returned from a configuration function, it will be returned +// to the caller. +func Registries(registries ...RegistryHosts) RegistryHosts { + return func(host string) ([]RegistryHost, error) { + for _, registry := range registries { + config, err := registry(host) + if err != nil { + return config, err + } + if len(config) > 0 { + return config, nil + } + } + return nil, nil + } +} + +type registryOpts struct { + authorizer Authorizer + plainHTTP func(string) (bool, error) + host func(string) (string, error) + client *http.Client +} + +// RegistryOpt defines a registry default option +type RegistryOpt func(*registryOpts) + +// WithPlainHTTP configures registries to use plaintext http scheme +// for the provided host match function. +func WithPlainHTTP(f func(string) (bool, error)) RegistryOpt { + return func(opts *registryOpts) { + opts.plainHTTP = f + } +} + +// WithAuthorizer configures the default authorizer for a registry +func WithAuthorizer(a Authorizer) RegistryOpt { + return func(opts *registryOpts) { + opts.authorizer = a + } +} + +// WithHostTranslator defines the default translator to use for registry hosts +func WithHostTranslator(h func(string) (string, error)) RegistryOpt { + return func(opts *registryOpts) { + opts.host = h + } +} + +// WithClient configures the default http client for a registry +func WithClient(c *http.Client) RegistryOpt { + return func(opts *registryOpts) { + opts.client = c + } +} + +// ConfigureDefaultRegistries is used to create a default configuration for +// registries. For more advanced configurations or per-domain setups, +// the RegistryHosts interface should be used directly. +// NOTE: This function will always return a non-empty value or error +func ConfigureDefaultRegistries(ropts ...RegistryOpt) RegistryHosts { + var opts registryOpts + for _, opt := range ropts { + opt(&opts) + } + + return func(host string) ([]RegistryHost, error) { + config := RegistryHost{ + Client: opts.client, + Authorizer: opts.authorizer, + Host: host, + Scheme: "https", + Path: "/v2", + Capabilities: HostCapabilityPull | HostCapabilityResolve | HostCapabilityPush, + } + + if config.Client == nil { + config.Client = http.DefaultClient + } + + if opts.plainHTTP != nil { + match, err := opts.plainHTTP(host) + if err != nil { + return nil, err + } + if match { + config.Scheme = "http" + } + } + + if opts.host != nil { + var err error + config.Host, err = opts.host(config.Host) + if err != nil { + return nil, err + } + } else if host == "docker.io" { + config.Host = "registry-1.docker.io" + } + + return []RegistryHost{config}, nil + } +} + +// MatchAllHosts is a host match function which is always true. +func MatchAllHosts(string) (bool, error) { + return true, nil +} + +// MatchLocalhost is a host match function which returns true for +// localhost. +// +// Note: this does not handle matching of ip addresses in octal, +// decimal or hex form. +func MatchLocalhost(host string) (bool, error) { + switch { + case host == "::1": + return true, nil + case host == "[::1]": + return true, nil + } + h, p, err := net.SplitHostPort(host) + + // addrError helps distinguish between errors of form + // "no colon in address" and "too many colons in address". + // The former is fine as the host string need not have a + // port. Latter needs to be handled. + addrError := &net.AddrError{ + Err: "missing port in address", + Addr: host, + } + if err != nil { + if err.Error() != addrError.Error() { + return false, err + } + // host string without any port specified + h = host + } else if len(p) == 0 { + return false, errors.New("invalid host name format") + } + + // use ipv4 dotted decimal for further checking + if h == "localhost" { + h = "127.0.0.1" + } + ip := net.ParseIP(h) + + return ip.IsLoopback(), nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/resolver.go b/vendor/github.com/containerd/containerd/remotes/docker/resolver.go new file mode 100644 index 000000000..4ca2b921e --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/resolver.go @@ -0,0 +1,800 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "crypto/tls" + "errors" + "fmt" + "io" + "net" + "net/http" + "net/url" + "path" + "strings" + + "github.com/containerd/log" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/reference" + "github.com/containerd/containerd/remotes" + "github.com/containerd/containerd/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. + remoteerrors "github.com/containerd/containerd/remotes/errors" + "github.com/containerd/containerd/tracing" + "github.com/containerd/containerd/version" +) + +var ( + // ErrInvalidAuthorization is used when credentials are passed to a server but + // those credentials are rejected. + ErrInvalidAuthorization = errors.New("authorization failed") + + // MaxManifestSize represents the largest size accepted from a registry + // during resolution. Larger manifests may be accepted using a + // resolution method other than the registry. + // + // NOTE: The max supported layers by some runtimes is 128 and individual + // layers will not contribute more than 256 bytes, making a + // reasonable limit for a large image manifests of 32K bytes. + // 4M bytes represents a much larger upper bound for images which may + // contain large annotations or be non-images. A proper manifest + // design puts large metadata in subobjects, as is consistent the + // intent of the manifest design. + MaxManifestSize int64 = 4 * 1048 * 1048 +) + +// Authorizer is used to authorize HTTP requests based on 401 HTTP responses. +// An Authorizer is responsible for caching tokens or credentials used by +// requests. +type Authorizer interface { + // Authorize sets the appropriate `Authorization` header on the given + // request. + // + // If no authorization is found for the request, the request remains + // unmodified. It may also add an `Authorization` header as + // "bearer " + // "basic " + // + // It may return remotes/errors.ErrUnexpectedStatus, which for example, + // can be used by the caller to find out the status code returned by the registry. + Authorize(context.Context, *http.Request) error + + // AddResponses adds a 401 response for the authorizer to consider when + // authorizing requests. The last response should be unauthorized and + // the previous requests are used to consider redirects and retries + // that may have led to the 401. + // + // If response is not handled, returns `ErrNotImplemented` + AddResponses(context.Context, []*http.Response) error +} + +// ResolverOptions are used to configured a new Docker register resolver +type ResolverOptions struct { + // Hosts returns registry host configurations for a namespace. + Hosts RegistryHosts + + // Headers are the HTTP request header fields sent by the resolver + Headers http.Header + + // Tracker is used to track uploads to the registry. This is used + // since the registry does not have upload tracking and the existing + // mechanism for getting blob upload status is expensive. + Tracker StatusTracker + + // Authorizer is used to authorize registry requests + // + // Deprecated: use Hosts. + Authorizer Authorizer + + // Credentials provides username and secret given a host. + // If username is empty but a secret is given, that secret + // is interpreted as a long lived token. + // + // Deprecated: use Hosts. + Credentials func(string) (string, string, error) + + // Host provides the hostname given a namespace. + // + // Deprecated: use Hosts. + Host func(string) (string, error) + + // PlainHTTP specifies to use plain http and not https + // + // Deprecated: use Hosts. + PlainHTTP bool + + // Client is the http client to used when making registry requests + // + // Deprecated: use Hosts. + Client *http.Client +} + +// DefaultHost is the default host function. +func DefaultHost(ns string) (string, error) { + if ns == "docker.io" { + return "registry-1.docker.io", nil + } + return ns, nil +} + +type dockerResolver struct { + hosts RegistryHosts + header http.Header + resolveHeader http.Header + tracker StatusTracker +} + +// NewResolver returns a new resolver to a Docker registry +func NewResolver(options ResolverOptions) remotes.Resolver { + if options.Tracker == nil { + options.Tracker = NewInMemoryTracker() + } + + if options.Headers == nil { + options.Headers = make(http.Header) + } else { + // make a copy of the headers to avoid race due to concurrent map write + options.Headers = options.Headers.Clone() + } + if _, ok := options.Headers["User-Agent"]; !ok { + options.Headers.Set("User-Agent", "containerd/"+version.Version) + } + + resolveHeader := http.Header{} + if _, ok := options.Headers["Accept"]; !ok { + // set headers for all the types we support for resolution. + resolveHeader.Set("Accept", strings.Join([]string{ + images.MediaTypeDockerSchema2Manifest, + images.MediaTypeDockerSchema2ManifestList, + ocispec.MediaTypeImageManifest, + ocispec.MediaTypeImageIndex, "*/*", + }, ", ")) + } else { + resolveHeader["Accept"] = options.Headers["Accept"] + delete(options.Headers, "Accept") + } + + if options.Hosts == nil { + opts := []RegistryOpt{} + if options.Host != nil { + opts = append(opts, WithHostTranslator(options.Host)) + } + + if options.Authorizer == nil { + options.Authorizer = NewDockerAuthorizer( + WithAuthClient(options.Client), + WithAuthHeader(options.Headers), + WithAuthCreds(options.Credentials)) + } + opts = append(opts, WithAuthorizer(options.Authorizer)) + + if options.Client != nil { + opts = append(opts, WithClient(options.Client)) + } + if options.PlainHTTP { + opts = append(opts, WithPlainHTTP(MatchAllHosts)) + } else { + opts = append(opts, WithPlainHTTP(MatchLocalhost)) + } + options.Hosts = ConfigureDefaultRegistries(opts...) + } + return &dockerResolver{ + hosts: options.Hosts, + header: options.Headers, + resolveHeader: resolveHeader, + tracker: options.Tracker, + } +} + +func getManifestMediaType(resp *http.Response) string { + // Strip encoding data (manifests should always be ascii JSON) + contentType := resp.Header.Get("Content-Type") + if sp := strings.IndexByte(contentType, ';'); sp != -1 { + contentType = contentType[0:sp] + } + + // As of Apr 30 2019 the registry.access.redhat.com registry does not specify + // the content type of any data but uses schema1 manifests. + if contentType == "text/plain" { + contentType = images.MediaTypeDockerSchema1Manifest + } + return contentType +} + +type countingReader struct { + reader io.Reader + bytesRead int64 +} + +func (r *countingReader) Read(p []byte) (int, error) { + n, err := r.reader.Read(p) + r.bytesRead += int64(n) + return n, err +} + +var _ remotes.Resolver = &dockerResolver{} + +func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocispec.Descriptor, error) { + base, err := r.resolveDockerBase(ref) + if err != nil { + return "", ocispec.Descriptor{}, err + } + refspec := base.refspec + if refspec.Object == "" { + return "", ocispec.Descriptor{}, reference.ErrObjectRequired + } + + var ( + firstErr error + paths [][]string + dgst = refspec.Digest() + caps = HostCapabilityPull + ) + + if dgst != "" { + if err := dgst.Validate(); err != nil { + // need to fail here, since we can't actually resolve the invalid + // digest. + return "", ocispec.Descriptor{}, err + } + + // turns out, we have a valid digest, make a url. + paths = append(paths, []string{"manifests", dgst.String()}) + + // fallback to blobs on not found. + paths = append(paths, []string{"blobs", dgst.String()}) + } else { + // Add + paths = append(paths, []string{"manifests", refspec.Object}) + caps |= HostCapabilityResolve + } + + hosts := base.filterHosts(caps) + if len(hosts) == 0 { + return "", ocispec.Descriptor{}, fmt.Errorf("no resolve hosts: %w", errdefs.ErrNotFound) + } + + ctx, err = ContextWithRepositoryScope(ctx, refspec, false) + if err != nil { + return "", ocispec.Descriptor{}, err + } + + for _, u := range paths { + for _, host := range hosts { + ctx := log.WithLogger(ctx, log.G(ctx).WithField("host", host.Host)) + + req := base.request(host, http.MethodHead, u...) + if err := req.addNamespace(base.refspec.Hostname()); err != nil { + return "", ocispec.Descriptor{}, err + } + + for key, value := range r.resolveHeader { + req.header[key] = append(req.header[key], value...) + } + + log.G(ctx).Debug("resolving") + resp, err := req.doWithRetries(ctx, nil) + if err != nil { + if errors.Is(err, ErrInvalidAuthorization) { + err = fmt.Errorf("pull access denied, repository does not exist or may require authorization: %w", err) + } + // Store the error for referencing later + if firstErr == nil { + firstErr = err + } + log.G(ctx).WithError(err).Info("trying next host") + continue // try another host + } + resp.Body.Close() // don't care about body contents. + + if resp.StatusCode > 299 { + if resp.StatusCode == http.StatusNotFound { + log.G(ctx).Info("trying next host - response was http.StatusNotFound") + continue + } + if resp.StatusCode > 399 { + // Set firstErr when encountering the first non-404 status code. + if firstErr == nil { + firstErr = remoteerrors.NewUnexpectedStatusErr(resp) + } + continue // try another host + } + return "", ocispec.Descriptor{}, remoteerrors.NewUnexpectedStatusErr(resp) + } + size := resp.ContentLength + contentType := getManifestMediaType(resp) + + // if no digest was provided, then only a resolve + // trusted registry was contacted, in this case use + // the digest header (or content from GET) + if dgst == "" { + // this is the only point at which we trust the registry. we use the + // content headers to assemble a descriptor for the name. when this becomes + // more robust, we mostly get this information from a secure trust store. + dgstHeader := digest.Digest(resp.Header.Get("Docker-Content-Digest")) + + if dgstHeader != "" && size != -1 { + if err := dgstHeader.Validate(); err != nil { + return "", ocispec.Descriptor{}, fmt.Errorf("%q in header not a valid digest: %w", dgstHeader, err) + } + dgst = dgstHeader + } + } + if dgst == "" || size == -1 { + log.G(ctx).Debug("no Docker-Content-Digest header, fetching manifest instead") + + req = base.request(host, http.MethodGet, u...) + if err := req.addNamespace(base.refspec.Hostname()); err != nil { + return "", ocispec.Descriptor{}, err + } + + for key, value := range r.resolveHeader { + req.header[key] = append(req.header[key], value...) + } + + resp, err := req.doWithRetries(ctx, nil) + if err != nil { + return "", ocispec.Descriptor{}, err + } + + bodyReader := countingReader{reader: resp.Body} + + contentType = getManifestMediaType(resp) + err = func() error { + defer resp.Body.Close() + if dgst != "" { + _, err = io.Copy(io.Discard, &bodyReader) + return err + } + + if contentType == images.MediaTypeDockerSchema1Manifest { + b, err := schema1.ReadStripSignature(&bodyReader) + if err != nil { + return err + } + + dgst = digest.FromBytes(b) + return nil + } + + dgst, err = digest.FromReader(&bodyReader) + return err + }() + if err != nil { + return "", ocispec.Descriptor{}, err + } + size = bodyReader.bytesRead + } + // Prevent resolving to excessively large manifests + if size > MaxManifestSize { + if firstErr == nil { + firstErr = fmt.Errorf("rejecting %d byte manifest for %s: %w", size, ref, errdefs.ErrNotFound) + } + continue + } + + desc := ocispec.Descriptor{ + Digest: dgst, + MediaType: contentType, + Size: size, + } + + log.G(ctx).WithField("desc.digest", desc.Digest).Debug("resolved") + return ref, desc, nil + } + } + + // If above loop terminates without return, then there was an error. + // "firstErr" contains the first non-404 error. That is, "firstErr == nil" + // means that either no registries were given or each registry returned 404. + + if firstErr == nil { + firstErr = fmt.Errorf("%s: %w", ref, errdefs.ErrNotFound) + } + + return "", ocispec.Descriptor{}, firstErr +} + +func (r *dockerResolver) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error) { + base, err := r.resolveDockerBase(ref) + if err != nil { + return nil, err + } + + return dockerFetcher{ + dockerBase: base, + }, nil +} + +func (r *dockerResolver) Pusher(ctx context.Context, ref string) (remotes.Pusher, error) { + base, err := r.resolveDockerBase(ref) + if err != nil { + return nil, err + } + + return dockerPusher{ + dockerBase: base, + object: base.refspec.Object, + tracker: r.tracker, + }, nil +} + +func (r *dockerResolver) resolveDockerBase(ref string) (*dockerBase, error) { + refspec, err := reference.Parse(ref) + if err != nil { + return nil, err + } + + return r.base(refspec) +} + +type dockerBase struct { + refspec reference.Spec + repository string + hosts []RegistryHost + header http.Header +} + +func (r *dockerResolver) base(refspec reference.Spec) (*dockerBase, error) { + host := refspec.Hostname() + hosts, err := r.hosts(host) + if err != nil { + return nil, err + } + return &dockerBase{ + refspec: refspec, + repository: strings.TrimPrefix(refspec.Locator, host+"/"), + hosts: hosts, + header: r.header, + }, nil +} + +func (r *dockerBase) filterHosts(caps HostCapabilities) (hosts []RegistryHost) { + for _, host := range r.hosts { + if host.Capabilities.Has(caps) { + hosts = append(hosts, host) + } + } + return +} + +func (r *dockerBase) request(host RegistryHost, method string, ps ...string) *request { + header := r.header.Clone() + if header == nil { + header = http.Header{} + } + + for key, value := range host.Header { + header[key] = append(header[key], value...) + } + parts := append([]string{"/", host.Path, r.repository}, ps...) + p := path.Join(parts...) + // Join strips trailing slash, re-add ending "/" if included + if len(parts) > 0 && strings.HasSuffix(parts[len(parts)-1], "/") { + p = p + "/" + } + return &request{ + method: method, + path: p, + header: header, + host: host, + } +} + +func (r *request) authorize(ctx context.Context, req *http.Request) error { + // Check if has header for host + if r.host.Authorizer != nil { + if err := r.host.Authorizer.Authorize(ctx, req); err != nil { + return err + } + } + + return nil +} + +func (r *request) addNamespace(ns string) (err error) { + if !r.host.isProxy(ns) { + return nil + } + var q url.Values + // Parse query + if i := strings.IndexByte(r.path, '?'); i > 0 { + r.path = r.path[:i+1] + q, err = url.ParseQuery(r.path[i+1:]) + if err != nil { + return + } + } else { + r.path = r.path + "?" + q = url.Values{} + } + q.Add("ns", ns) + + r.path = r.path + q.Encode() + + return +} + +type request struct { + method string + path string + header http.Header + host RegistryHost + body func() (io.ReadCloser, error) + size int64 +} + +func (r *request) do(ctx context.Context) (*http.Response, error) { + u := r.host.Scheme + "://" + r.host.Host + r.path + req, err := http.NewRequestWithContext(ctx, r.method, u, nil) + if err != nil { + return nil, err + } + if r.header == nil { + req.Header = http.Header{} + } else { + req.Header = r.header.Clone() // headers need to be copied to avoid concurrent map access + } + if r.body != nil { + body, err := r.body() + if err != nil { + return nil, err + } + req.Body = body + req.GetBody = r.body + if r.size > 0 { + req.ContentLength = r.size + } + } + + ctx = log.WithLogger(ctx, log.G(ctx).WithField("url", u)) + log.G(ctx).WithFields(requestFields(req)).Debug("do request") + if err := r.authorize(ctx, req); err != nil { + return nil, fmt.Errorf("failed to authorize: %w", err) + } + + client := &http.Client{} + if r.host.Client != nil { + *client = *r.host.Client + } + if client.CheckRedirect == nil { + client.CheckRedirect = func(req *http.Request, via []*http.Request) error { + if len(via) >= 10 { + return errors.New("stopped after 10 redirects") + } + if err := r.authorize(ctx, req); err != nil { + return fmt.Errorf("failed to authorize redirect: %w", err) + } + return nil + } + } + + tracing.UpdateHTTPClient(client, tracing.Name("remotes.docker.resolver", "HTTPRequest")) + + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf("failed to do request: %w", err) + } + log.G(ctx).WithFields(responseFields(resp)).Debug("fetch response received") + return resp, nil +} + +func (r *request) doWithRetries(ctx context.Context, responses []*http.Response) (*http.Response, error) { + resp, err := r.do(ctx) + if err != nil { + return nil, err + } + + responses = append(responses, resp) + retry, err := r.retryRequest(ctx, responses) + if err != nil { + resp.Body.Close() + return nil, err + } + if retry { + resp.Body.Close() + return r.doWithRetries(ctx, responses) + } + return resp, err +} + +func (r *request) retryRequest(ctx context.Context, responses []*http.Response) (bool, error) { + if len(responses) > 5 { + return false, nil + } + last := responses[len(responses)-1] + switch last.StatusCode { + case http.StatusUnauthorized: + log.G(ctx).WithField("header", last.Header.Get("WWW-Authenticate")).Debug("Unauthorized") + if r.host.Authorizer != nil { + if err := r.host.Authorizer.AddResponses(ctx, responses); err == nil { + return true, nil + } else if !errdefs.IsNotImplemented(err) { + return false, err + } + } + + return false, nil + case http.StatusMethodNotAllowed: + // Support registries which have not properly implemented the HEAD method for + // manifests endpoint + if r.method == http.MethodHead && strings.Contains(r.path, "/manifests/") { + r.method = http.MethodGet + return true, nil + } + case http.StatusRequestTimeout, http.StatusTooManyRequests: + return true, nil + } + + // TODO: Handle 50x errors accounting for attempt history + return false, nil +} + +func (r *request) String() string { + return r.host.Scheme + "://" + r.host.Host + r.path +} + +func requestFields(req *http.Request) log.Fields { + fields := map[string]interface{}{ + "request.method": req.Method, + } + for k, vals := range req.Header { + k = strings.ToLower(k) + if k == "authorization" { + continue + } + for i, v := range vals { + field := "request.header." + k + if i > 0 { + field = fmt.Sprintf("%s.%d", field, i) + } + fields[field] = v + } + } + + return fields +} + +func responseFields(resp *http.Response) log.Fields { + fields := map[string]interface{}{ + "response.status": resp.Status, + } + for k, vals := range resp.Header { + k = strings.ToLower(k) + for i, v := range vals { + field := "response.header." + k + if i > 0 { + field = fmt.Sprintf("%s.%d", field, i) + } + fields[field] = v + } + } + + return fields +} + +// IsLocalhost checks if the registry host is local. +func IsLocalhost(host string) bool { + if h, _, err := net.SplitHostPort(host); err == nil { + host = h + } + + if host == "localhost" { + return true + } + + ip := net.ParseIP(host) + return ip.IsLoopback() +} + +// NewHTTPFallback returns http.RoundTripper which allows fallback from https to +// http for registry endpoints with configurations for both http and TLS, +// such as defaulted localhost endpoints. +func NewHTTPFallback(transport http.RoundTripper) http.RoundTripper { + return &httpFallback{ + super: transport, + } +} + +type httpFallback struct { + super http.RoundTripper + host string +} + +func (f *httpFallback) RoundTrip(r *http.Request) (*http.Response, error) { + // only fall back if the same host had previously fell back + if f.host != r.URL.Host { + resp, err := f.super.RoundTrip(r) + if !isTLSError(err) { + return resp, err + } + } + + plainHTTPUrl := *r.URL + plainHTTPUrl.Scheme = "http" + + plainHTTPRequest := *r + plainHTTPRequest.URL = &plainHTTPUrl + + if f.host != r.URL.Host { + f.host = r.URL.Host + + // update body on the second attempt + if r.Body != nil && r.GetBody != nil { + body, err := r.GetBody() + if err != nil { + return nil, err + } + plainHTTPRequest.Body = body + } + } + + return f.super.RoundTrip(&plainHTTPRequest) +} + +func isTLSError(err error) bool { + if err == nil { + return false + } + var tlsErr tls.RecordHeaderError + if errors.As(err, &tlsErr) && string(tlsErr.RecordHeader[:]) == "HTTP/" { + return true + } + if strings.Contains(err.Error(), "TLS handshake timeout") { + return true + } + + return false +} + +// HTTPFallback is an http.RoundTripper which allows fallback from https to http +// for registry endpoints with configurations for both http and TLS, such as +// defaulted localhost endpoints. +// +// Deprecated: Use NewHTTPFallback instead. +type HTTPFallback struct { + http.RoundTripper +} + +func (f HTTPFallback) RoundTrip(r *http.Request) (*http.Response, error) { + resp, err := f.RoundTripper.RoundTrip(r) + var tlsErr tls.RecordHeaderError + if errors.As(err, &tlsErr) && string(tlsErr.RecordHeader[:]) == "HTTP/" { + // server gave HTTP response to HTTPS client + plainHTTPUrl := *r.URL + plainHTTPUrl.Scheme = "http" + + plainHTTPRequest := *r + plainHTTPRequest.URL = &plainHTTPUrl + + if r.Body != nil && r.GetBody != nil { + body, err := r.GetBody() + if err != nil { + return nil, err + } + plainHTTPRequest.Body = body + } + + return f.RoundTripper.RoundTrip(&plainHTTPRequest) + } + + return resp, err +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go b/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go new file mode 100644 index 000000000..b38c73855 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go @@ -0,0 +1,609 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package schema1 provides a converter to fetch an image formatted in Docker Image Manifest v2, Schema 1. +// +// Deprecated: use images formatted in Docker Image Manifest v2, Schema 2, or OCI Image Spec v1. +package schema1 + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + "strings" + "sync" + "time" + + "github.com/containerd/log" + digest "github.com/opencontainers/go-digest" + specs "github.com/opencontainers/image-spec/specs-go" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sync/errgroup" + + "github.com/containerd/containerd/archive/compression" + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/labels" + "github.com/containerd/containerd/remotes" +) + +const ( + manifestSizeLimit = 8e6 // 8MB + labelDockerSchema1EmptyLayer = "containerd.io/docker.schema1.empty-layer" +) + +type blobState struct { + diffID digest.Digest + empty bool +} + +// Converter converts schema1 manifests to schema2 on fetch +type Converter struct { + contentStore content.Store + fetcher remotes.Fetcher + + pulledManifest *manifest + + mu sync.Mutex + blobMap map[digest.Digest]blobState + layerBlobs map[digest.Digest]ocispec.Descriptor +} + +// NewConverter returns a new converter +func NewConverter(contentStore content.Store, fetcher remotes.Fetcher) *Converter { + return &Converter{ + contentStore: contentStore, + fetcher: fetcher, + blobMap: map[digest.Digest]blobState{}, + layerBlobs: map[digest.Digest]ocispec.Descriptor{}, + } +} + +// Handle fetching descriptors for a docker media type +func (c *Converter) Handle(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + switch desc.MediaType { + case images.MediaTypeDockerSchema1Manifest: + if err := c.fetchManifest(ctx, desc); err != nil { + return nil, err + } + + m := c.pulledManifest + if len(m.FSLayers) != len(m.History) { + return nil, errors.New("invalid schema 1 manifest, history and layer mismatch") + } + descs := make([]ocispec.Descriptor, 0, len(c.pulledManifest.FSLayers)) + + for i := range m.FSLayers { + if _, ok := c.blobMap[c.pulledManifest.FSLayers[i].BlobSum]; !ok { + empty, err := isEmptyLayer([]byte(m.History[i].V1Compatibility)) + if err != nil { + return nil, err + } + + // Do no attempt to download a known empty blob + if !empty { + descs = append([]ocispec.Descriptor{ + { + MediaType: images.MediaTypeDockerSchema2LayerGzip, + Digest: c.pulledManifest.FSLayers[i].BlobSum, + Size: -1, + }, + }, descs...) + } + c.blobMap[c.pulledManifest.FSLayers[i].BlobSum] = blobState{ + empty: empty, + } + } + } + return descs, nil + case images.MediaTypeDockerSchema2LayerGzip: + if c.pulledManifest == nil { + return nil, errors.New("manifest required for schema 1 blob pull") + } + return nil, c.fetchBlob(ctx, desc) + default: + return nil, fmt.Errorf("%v not support for schema 1 manifests", desc.MediaType) + } +} + +// ConvertOptions provides options on converting a docker schema1 manifest. +type ConvertOptions struct { + // ManifestMediaType specifies the media type of the manifest OCI descriptor. + ManifestMediaType string + + // ConfigMediaType specifies the media type of the manifest config OCI + // descriptor. + ConfigMediaType string +} + +// ConvertOpt allows configuring a convert operation. +type ConvertOpt func(context.Context, *ConvertOptions) error + +// UseDockerSchema2 is used to indicate that a schema1 manifest should be +// converted into the media types for a docker schema2 manifest. +func UseDockerSchema2() ConvertOpt { + return func(ctx context.Context, o *ConvertOptions) error { + o.ManifestMediaType = images.MediaTypeDockerSchema2Manifest + o.ConfigMediaType = images.MediaTypeDockerSchema2Config + return nil + } +} + +// Convert a docker manifest to an OCI descriptor +func (c *Converter) Convert(ctx context.Context, opts ...ConvertOpt) (ocispec.Descriptor, error) { + co := ConvertOptions{ + ManifestMediaType: ocispec.MediaTypeImageManifest, + ConfigMediaType: ocispec.MediaTypeImageConfig, + } + for _, opt := range opts { + if err := opt(ctx, &co); err != nil { + return ocispec.Descriptor{}, err + } + } + + history, diffIDs, err := c.schema1ManifestHistory() + if err != nil { + return ocispec.Descriptor{}, fmt.Errorf("schema 1 conversion failed: %w", err) + } + + var img ocispec.Image + if err := json.Unmarshal([]byte(c.pulledManifest.History[0].V1Compatibility), &img); err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to unmarshal image from schema 1 history: %w", err) + } + + img.History = history + img.RootFS = ocispec.RootFS{ + Type: "layers", + DiffIDs: diffIDs, + } + + b, err := json.MarshalIndent(img, "", " ") + if err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to marshal image: %w", err) + } + + config := ocispec.Descriptor{ + MediaType: co.ConfigMediaType, + Digest: digest.Canonical.FromBytes(b), + Size: int64(len(b)), + } + + layers := make([]ocispec.Descriptor, len(diffIDs)) + for i, diffID := range diffIDs { + layers[i] = c.layerBlobs[diffID] + } + + manifest := ocispec.Manifest{ + Versioned: specs.Versioned{ + SchemaVersion: 2, + }, + Config: config, + Layers: layers, + } + + mb, err := json.MarshalIndent(manifest, "", " ") + if err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to marshal image: %w", err) + } + + desc := ocispec.Descriptor{ + MediaType: co.ManifestMediaType, + Digest: digest.Canonical.FromBytes(mb), + Size: int64(len(mb)), + } + + labels := map[string]string{} + labels["containerd.io/gc.ref.content.0"] = manifest.Config.Digest.String() + for i, ch := range manifest.Layers { + labels[fmt.Sprintf("containerd.io/gc.ref.content.%d", i+1)] = ch.Digest.String() + } + + ref := remotes.MakeRefKey(ctx, desc) + if err := content.WriteBlob(ctx, c.contentStore, ref, bytes.NewReader(mb), desc, content.WithLabels(labels)); err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to write image manifest: %w", err) + } + + ref = remotes.MakeRefKey(ctx, config) + if err := content.WriteBlob(ctx, c.contentStore, ref, bytes.NewReader(b), config); err != nil { + return ocispec.Descriptor{}, fmt.Errorf("failed to write image config: %w", err) + } + + return desc, nil +} + +// ReadStripSignature reads in a schema1 manifest and returns a byte array +// with the "signatures" field stripped +func ReadStripSignature(schema1Blob io.Reader) ([]byte, error) { + b, err := io.ReadAll(io.LimitReader(schema1Blob, manifestSizeLimit)) // limit to 8MB + if err != nil { + return nil, err + } + + return stripSignature(b) +} + +func (c *Converter) fetchManifest(ctx context.Context, desc ocispec.Descriptor) error { + log.G(ctx).Debug("fetch schema 1") + + rc, err := c.fetcher.Fetch(ctx, desc) + if err != nil { + return err + } + + b, err := ReadStripSignature(rc) + rc.Close() + if err != nil { + return err + } + + var m manifest + if err := json.Unmarshal(b, &m); err != nil { + return err + } + if len(m.Manifests) != 0 || len(m.Layers) != 0 { + return errors.New("converter: expected schema1 document but found extra keys") + } + c.pulledManifest = &m + + return nil +} + +func (c *Converter) fetchBlob(ctx context.Context, desc ocispec.Descriptor) error { + log.G(ctx).Debug("fetch blob") + + var ( + ref = remotes.MakeRefKey(ctx, desc) + calc = newBlobStateCalculator() + compressMethod = compression.Gzip + ) + + // size may be unknown, set to zero for content ingest + ingestDesc := desc + if ingestDesc.Size == -1 { + ingestDesc.Size = 0 + } + + cw, err := content.OpenWriter(ctx, c.contentStore, content.WithRef(ref), content.WithDescriptor(ingestDesc)) + if err != nil { + if !errdefs.IsAlreadyExists(err) { + return err + } + + reuse, err := c.reuseLabelBlobState(ctx, desc) + if err != nil { + return err + } + + if reuse { + return nil + } + + ra, err := c.contentStore.ReaderAt(ctx, desc) + if err != nil { + return err + } + defer ra.Close() + + r, err := compression.DecompressStream(content.NewReader(ra)) + if err != nil { + return err + } + + compressMethod = r.GetCompression() + _, err = io.Copy(calc, r) + r.Close() + if err != nil { + return err + } + } else { + defer cw.Close() + + rc, err := c.fetcher.Fetch(ctx, desc) + if err != nil { + return err + } + defer rc.Close() + + eg, _ := errgroup.WithContext(ctx) + pr, pw := io.Pipe() + + eg.Go(func() error { + r, err := compression.DecompressStream(pr) + if err != nil { + return err + } + + compressMethod = r.GetCompression() + _, err = io.Copy(calc, r) + r.Close() + pr.CloseWithError(err) + return err + }) + + eg.Go(func() error { + defer pw.Close() + + return content.Copy(ctx, cw, io.TeeReader(rc, pw), ingestDesc.Size, ingestDesc.Digest) + }) + + if err := eg.Wait(); err != nil { + return err + } + } + + if desc.Size == -1 { + info, err := c.contentStore.Info(ctx, desc.Digest) + if err != nil { + return fmt.Errorf("failed to get blob info: %w", err) + } + desc.Size = info.Size + } + + if compressMethod == compression.Uncompressed { + log.G(ctx).WithField("id", desc.Digest).Debugf("changed media type for uncompressed schema1 layer blob") + desc.MediaType = images.MediaTypeDockerSchema2Layer + } + + state := calc.State() + + cinfo := content.Info{ + Digest: desc.Digest, + Labels: map[string]string{ + labels.LabelUncompressed: state.diffID.String(), + labelDockerSchema1EmptyLayer: strconv.FormatBool(state.empty), + }, + } + + if _, err := c.contentStore.Update(ctx, cinfo, "labels."+labels.LabelUncompressed, fmt.Sprintf("labels.%s", labelDockerSchema1EmptyLayer)); err != nil { + return fmt.Errorf("failed to update uncompressed label: %w", err) + } + + c.mu.Lock() + c.blobMap[desc.Digest] = state + c.layerBlobs[state.diffID] = desc + c.mu.Unlock() + + return nil +} + +func (c *Converter) reuseLabelBlobState(ctx context.Context, desc ocispec.Descriptor) (bool, error) { + cinfo, err := c.contentStore.Info(ctx, desc.Digest) + if err != nil { + return false, fmt.Errorf("failed to get blob info: %w", err) + } + desc.Size = cinfo.Size + + diffID, ok := cinfo.Labels[labels.LabelUncompressed] + if !ok { + return false, nil + } + + emptyVal, ok := cinfo.Labels[labelDockerSchema1EmptyLayer] + if !ok { + return false, nil + } + + isEmpty, err := strconv.ParseBool(emptyVal) + if err != nil { + log.G(ctx).WithField("id", desc.Digest).Warnf("failed to parse bool from label %s: %v", labelDockerSchema1EmptyLayer, isEmpty) + return false, nil + } + + bState := blobState{empty: isEmpty} + + if bState.diffID, err = digest.Parse(diffID); err != nil { + log.G(ctx).WithField("id", desc.Digest).Warnf("failed to parse digest from label %s: %v", labels.LabelUncompressed, diffID) + return false, nil + } + + // NOTE: there is no need to read header to get compression method + // because there are only two kinds of methods. + if bState.diffID == desc.Digest { + desc.MediaType = images.MediaTypeDockerSchema2Layer + } else { + desc.MediaType = images.MediaTypeDockerSchema2LayerGzip + } + + c.mu.Lock() + c.blobMap[desc.Digest] = bState + c.layerBlobs[bState.diffID] = desc + c.mu.Unlock() + return true, nil +} + +func (c *Converter) schema1ManifestHistory() ([]ocispec.History, []digest.Digest, error) { + if c.pulledManifest == nil { + return nil, nil, errors.New("missing schema 1 manifest for conversion") + } + m := *c.pulledManifest + + if len(m.History) == 0 { + return nil, nil, errors.New("no history") + } + + history := make([]ocispec.History, len(m.History)) + diffIDs := []digest.Digest{} + for i := range m.History { + var h v1History + if err := json.Unmarshal([]byte(m.History[i].V1Compatibility), &h); err != nil { + return nil, nil, fmt.Errorf("failed to unmarshal history: %w", err) + } + + blobSum := m.FSLayers[i].BlobSum + + state := c.blobMap[blobSum] + + history[len(history)-i-1] = ocispec.History{ + Author: h.Author, + Comment: h.Comment, + Created: &h.Created, + CreatedBy: strings.Join(h.ContainerConfig.Cmd, " "), + EmptyLayer: state.empty, + } + + if !state.empty { + diffIDs = append([]digest.Digest{state.diffID}, diffIDs...) + + } + } + + return history, diffIDs, nil +} + +type fsLayer struct { + BlobSum digest.Digest `json:"blobSum"` +} + +type history struct { + V1Compatibility string `json:"v1Compatibility"` +} + +type manifest struct { + FSLayers []fsLayer `json:"fsLayers"` + History []history `json:"history"` + Layers json.RawMessage `json:"layers,omitempty"` // OCI manifest + Manifests json.RawMessage `json:"manifests,omitempty"` // OCI index +} + +type v1History struct { + Author string `json:"author,omitempty"` + Created time.Time `json:"created"` + Comment string `json:"comment,omitempty"` + ThrowAway *bool `json:"throwaway,omitempty"` + Size *int `json:"Size,omitempty"` // used before ThrowAway field + ContainerConfig struct { + Cmd []string `json:"Cmd,omitempty"` + } `json:"container_config,omitempty"` +} + +// isEmptyLayer returns whether the v1 compatibility history describes an +// empty layer. A return value of true indicates the layer is empty, +// however false does not indicate non-empty. +func isEmptyLayer(compatHistory []byte) (bool, error) { + var h v1History + if err := json.Unmarshal(compatHistory, &h); err != nil { + return false, err + } + + if h.ThrowAway != nil { + return *h.ThrowAway, nil + } + if h.Size != nil { + return *h.Size == 0, nil + } + + // If no `Size` or `throwaway` field is given, then + // it cannot be determined whether the layer is empty + // from the history, return false + return false, nil +} + +type signature struct { + Signatures []jsParsedSignature `json:"signatures"` +} + +type jsParsedSignature struct { + Protected string `json:"protected"` +} + +type protectedBlock struct { + Length int `json:"formatLength"` + Tail string `json:"formatTail"` +} + +// joseBase64UrlDecode decodes the given string using the standard base64 url +// decoder but first adds the appropriate number of trailing '=' characters in +// accordance with the jose specification. +// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2 +func joseBase64UrlDecode(s string) ([]byte, error) { + switch len(s) % 4 { + case 0: + case 2: + s += "==" + case 3: + s += "=" + default: + return nil, errors.New("illegal base64url string") + } + return base64.URLEncoding.DecodeString(s) +} + +func stripSignature(b []byte) ([]byte, error) { + var sig signature + if err := json.Unmarshal(b, &sig); err != nil { + return nil, err + } + if len(sig.Signatures) == 0 { + return nil, errors.New("no signatures") + } + pb, err := joseBase64UrlDecode(sig.Signatures[0].Protected) + if err != nil { + return nil, fmt.Errorf("could not decode %s: %w", sig.Signatures[0].Protected, err) + } + + var protected protectedBlock + if err := json.Unmarshal(pb, &protected); err != nil { + return nil, err + } + + if protected.Length > len(b) { + return nil, errors.New("invalid protected length block") + } + + tail, err := joseBase64UrlDecode(protected.Tail) + if err != nil { + return nil, fmt.Errorf("invalid tail base 64 value: %w", err) + } + + return append(b[:protected.Length], tail...), nil +} + +type blobStateCalculator struct { + empty bool + digester digest.Digester +} + +func newBlobStateCalculator() *blobStateCalculator { + return &blobStateCalculator{ + empty: true, + digester: digest.Canonical.Digester(), + } +} + +func (c *blobStateCalculator) Write(p []byte) (int, error) { + if c.empty { + for _, b := range p { + if b != 0x00 { + c.empty = false + break + } + } + } + return c.digester.Hash().Write(p) +} + +func (c *blobStateCalculator) State() blobState { + return blobState{ + empty: c.empty, + diffID: c.digester.Digest(), + } +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/scope.go b/vendor/github.com/containerd/containerd/remotes/docker/scope.go new file mode 100644 index 000000000..95b4810ab --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/scope.go @@ -0,0 +1,101 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "context" + "fmt" + "net/url" + "sort" + "strings" + + "github.com/containerd/containerd/reference" +) + +// RepositoryScope returns a repository scope string such as "repository:foo/bar:pull" +// for "host/foo/bar:baz". +// When push is true, both pull and push are added to the scope. +func RepositoryScope(refspec reference.Spec, push bool) (string, error) { + u, err := url.Parse("dummy://" + refspec.Locator) + if err != nil { + return "", err + } + s := "repository:" + strings.TrimPrefix(u.Path, "/") + ":pull" + if push { + s += ",push" + } + return s, nil +} + +// tokenScopesKey is used for the key for context.WithValue(). +// value: []string (e.g. {"registry:foo/bar:pull"}) +type tokenScopesKey struct{} + +// ContextWithRepositoryScope returns a context with tokenScopesKey{} and the repository scope value. +func ContextWithRepositoryScope(ctx context.Context, refspec reference.Spec, push bool) (context.Context, error) { + s, err := RepositoryScope(refspec, push) + if err != nil { + return nil, err + } + return WithScope(ctx, s), nil +} + +// WithScope appends a custom registry auth scope to the context. +func WithScope(ctx context.Context, scope string) context.Context { + var scopes []string + if v := ctx.Value(tokenScopesKey{}); v != nil { + scopes = v.([]string) + scopes = append(scopes, scope) + } else { + scopes = []string{scope} + } + return context.WithValue(ctx, tokenScopesKey{}, scopes) +} + +// ContextWithAppendPullRepositoryScope is used to append repository pull +// scope into existing scopes indexed by the tokenScopesKey{}. +func ContextWithAppendPullRepositoryScope(ctx context.Context, repo string) context.Context { + return WithScope(ctx, fmt.Sprintf("repository:%s:pull", repo)) +} + +// GetTokenScopes returns deduplicated and sorted scopes from ctx.Value(tokenScopesKey{}) and common scopes. +func GetTokenScopes(ctx context.Context, common []string) []string { + scopes := []string{} + if x := ctx.Value(tokenScopesKey{}); x != nil { + scopes = append(scopes, x.([]string)...) + } + + scopes = append(scopes, common...) + sort.Strings(scopes) + + if len(scopes) == 0 { + return scopes + } + + l := 0 + for idx := 1; idx < len(scopes); idx++ { + // Note: this comparison is unaware of the scope grammar (https://docs.docker.com/registry/spec/auth/scope/) + // So, "repository:foo/bar:pull,push" != "repository:foo/bar:push,pull", although semantically they are equal. + if scopes[l] == scopes[idx] { + continue + } + + l++ + scopes[l] = scopes[idx] + } + return scopes[:l+1] +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/status.go b/vendor/github.com/containerd/containerd/remotes/docker/status.go new file mode 100644 index 000000000..1a9227725 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/status.go @@ -0,0 +1,101 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package docker + +import ( + "fmt" + "sync" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/moby/locker" +) + +// Status of a content operation +type Status struct { + content.Status + + Committed bool + + // ErrClosed contains error encountered on close. + ErrClosed error + + // UploadUUID is used by the Docker registry to reference blob uploads + UploadUUID string + + // PushStatus contains status related to push. + PushStatus +} + +type PushStatus struct { + // MountedFrom is the source content was cross-repo mounted from (empty if no cross-repo mount was performed). + MountedFrom string + + // Exists indicates whether content already exists in the repository and wasn't uploaded. + Exists bool +} + +// StatusTracker to track status of operations +type StatusTracker interface { + GetStatus(string) (Status, error) + SetStatus(string, Status) +} + +// StatusTrackLocker to track status of operations with lock +type StatusTrackLocker interface { + StatusTracker + Lock(string) + Unlock(string) +} + +type memoryStatusTracker struct { + statuses map[string]Status + m sync.Mutex + locker *locker.Locker +} + +// NewInMemoryTracker returns a StatusTracker that tracks content status in-memory +func NewInMemoryTracker() StatusTrackLocker { + return &memoryStatusTracker{ + statuses: map[string]Status{}, + locker: locker.New(), + } +} + +func (t *memoryStatusTracker) GetStatus(ref string) (Status, error) { + t.m.Lock() + defer t.m.Unlock() + status, ok := t.statuses[ref] + if !ok { + return Status{}, fmt.Errorf("status for ref %v: %w", ref, errdefs.ErrNotFound) + } + return status, nil +} + +func (t *memoryStatusTracker) SetStatus(ref string, status Status) { + t.m.Lock() + t.statuses[ref] = status + t.m.Unlock() +} + +func (t *memoryStatusTracker) Lock(ref string) { + t.locker.Lock(ref) +} + +func (t *memoryStatusTracker) Unlock(ref string) { + t.locker.Unlock(ref) +} diff --git a/vendor/github.com/containerd/containerd/remotes/errors/errors.go b/vendor/github.com/containerd/containerd/remotes/errors/errors.go new file mode 100644 index 000000000..f60ff0fc2 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/errors/errors.go @@ -0,0 +1,55 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errors + +import ( + "fmt" + "io" + "net/http" +) + +var _ error = ErrUnexpectedStatus{} + +// ErrUnexpectedStatus is returned if a registry API request returned with unexpected HTTP status +type ErrUnexpectedStatus struct { + Status string + StatusCode int + Body []byte + RequestURL, RequestMethod string +} + +func (e ErrUnexpectedStatus) Error() string { + return fmt.Sprintf("unexpected status from %s request to %s: %s", e.RequestMethod, e.RequestURL, e.Status) +} + +// NewUnexpectedStatusErr creates an ErrUnexpectedStatus from HTTP response +func NewUnexpectedStatusErr(resp *http.Response) error { + var b []byte + if resp.Body != nil { + b, _ = io.ReadAll(io.LimitReader(resp.Body, 64000)) // 64KB + } + err := ErrUnexpectedStatus{ + Body: b, + Status: resp.Status, + StatusCode: resp.StatusCode, + RequestMethod: resp.Request.Method, + } + if resp.Request.URL != nil { + err.RequestURL = resp.Request.URL.String() + } + return err +} diff --git a/vendor/github.com/containerd/containerd/remotes/handlers.go b/vendor/github.com/containerd/containerd/remotes/handlers.go new file mode 100644 index 000000000..365ff5fc0 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/handlers.go @@ -0,0 +1,414 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package remotes + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "strings" + "sync" + + "github.com/containerd/log" + "github.com/containerd/platforms" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sync/semaphore" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/labels" +) + +type refKeyPrefix struct{} + +// WithMediaTypeKeyPrefix adds a custom key prefix for a media type which is used when storing +// data in the content store from the FetchHandler. +// +// Used in `MakeRefKey` to determine what the key prefix should be. +func WithMediaTypeKeyPrefix(ctx context.Context, mediaType, prefix string) context.Context { + var values map[string]string + if v := ctx.Value(refKeyPrefix{}); v != nil { + values = v.(map[string]string) + } else { + values = make(map[string]string) + } + + values[mediaType] = prefix + return context.WithValue(ctx, refKeyPrefix{}, values) +} + +// MakeRefKey returns a unique reference for the descriptor. This reference can be +// used to lookup ongoing processes related to the descriptor. This function +// may look to the context to namespace the reference appropriately. +func MakeRefKey(ctx context.Context, desc ocispec.Descriptor) string { + key := desc.Digest.String() + if desc.Annotations != nil { + if name, ok := desc.Annotations[ocispec.AnnotationRefName]; ok { + key = fmt.Sprintf("%s@%s", name, desc.Digest.String()) + } + } + + if v := ctx.Value(refKeyPrefix{}); v != nil { + values := v.(map[string]string) + if prefix := values[desc.MediaType]; prefix != "" { + return prefix + "-" + key + } + } + + switch mt := desc.MediaType; { + case mt == images.MediaTypeDockerSchema2Manifest || mt == ocispec.MediaTypeImageManifest: + return "manifest-" + key + case mt == images.MediaTypeDockerSchema2ManifestList || mt == ocispec.MediaTypeImageIndex: + return "index-" + key + case images.IsLayerType(mt): + return "layer-" + key + case images.IsKnownConfig(mt): + return "config-" + key + default: + log.G(ctx).Warnf("reference for unknown type: %s", mt) + return "unknown-" + key + } +} + +// FetchHandler returns a handler that will fetch all content into the ingester +// discovered in a call to Dispatch. Use with ChildrenHandler to do a full +// recursive fetch. +func FetchHandler(ingester content.Ingester, fetcher Fetcher) images.HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) (subdescs []ocispec.Descriptor, err error) { + ctx = log.WithLogger(ctx, log.G(ctx).WithFields(log.Fields{ + "digest": desc.Digest, + "mediatype": desc.MediaType, + "size": desc.Size, + })) + + switch desc.MediaType { + case images.MediaTypeDockerSchema1Manifest: + return nil, fmt.Errorf("%v not supported", desc.MediaType) + default: + err := Fetch(ctx, ingester, fetcher, desc) + if errdefs.IsAlreadyExists(err) { + return nil, nil + } + return nil, err + } + } +} + +// Fetch fetches the given digest into the provided ingester +func Fetch(ctx context.Context, ingester content.Ingester, fetcher Fetcher, desc ocispec.Descriptor) error { + log.G(ctx).Debug("fetch") + + cw, err := content.OpenWriter(ctx, ingester, content.WithRef(MakeRefKey(ctx, desc)), content.WithDescriptor(desc)) + if err != nil { + return err + } + defer cw.Close() + + ws, err := cw.Status() + if err != nil { + return err + } + + if desc.Size == 0 { + // most likely a poorly configured registry/web front end which responded with no + // Content-Length header; unable (not to mention useless) to commit a 0-length entry + // into the content store. Error out here otherwise the error sent back is confusing + return fmt.Errorf("unable to fetch descriptor (%s) which reports content size of zero: %w", desc.Digest, errdefs.ErrInvalidArgument) + } + if ws.Offset == desc.Size { + // If writer is already complete, commit and return + err := cw.Commit(ctx, desc.Size, desc.Digest) + if err != nil && !errdefs.IsAlreadyExists(err) { + return fmt.Errorf("failed commit on ref %q: %w", ws.Ref, err) + } + return err + } + + if desc.Size == int64(len(desc.Data)) { + return content.Copy(ctx, cw, bytes.NewReader(desc.Data), desc.Size, desc.Digest) + } + + rc, err := fetcher.Fetch(ctx, desc) + if err != nil { + return err + } + defer rc.Close() + + return content.Copy(ctx, cw, rc, desc.Size, desc.Digest) +} + +// PushHandler returns a handler that will push all content from the provider +// using a writer from the pusher. +func PushHandler(pusher Pusher, provider content.Provider) images.HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + ctx = log.WithLogger(ctx, log.G(ctx).WithFields(log.Fields{ + "digest": desc.Digest, + "mediatype": desc.MediaType, + "size": desc.Size, + })) + + err := push(ctx, provider, pusher, desc) + return nil, err + } +} + +func push(ctx context.Context, provider content.Provider, pusher Pusher, desc ocispec.Descriptor) error { + log.G(ctx).Debug("push") + + var ( + cw content.Writer + err error + ) + if cs, ok := pusher.(content.Ingester); ok { + cw, err = content.OpenWriter(ctx, cs, content.WithRef(MakeRefKey(ctx, desc)), content.WithDescriptor(desc)) + } else { + cw, err = pusher.Push(ctx, desc) + } + if err != nil { + if !errdefs.IsAlreadyExists(err) { + return err + } + + return nil + } + defer cw.Close() + + ra, err := provider.ReaderAt(ctx, desc) + if err != nil { + return err + } + defer ra.Close() + + rd := io.NewSectionReader(ra, 0, desc.Size) + return content.Copy(ctx, cw, rd, desc.Size, desc.Digest) +} + +// PushContent pushes content specified by the descriptor from the provider. +// +// Base handlers can be provided which will be called before any push specific +// handlers. +// +// If the passed in content.Provider is also a content.InfoProvider (such as +// content.Manager) then this will also annotate the distribution sources using +// labels prefixed with "containerd.io/distribution.source". +func PushContent(ctx context.Context, pusher Pusher, desc ocispec.Descriptor, store content.Provider, limiter *semaphore.Weighted, platform platforms.MatchComparer, wrapper func(h images.Handler) images.Handler) error { + + var m sync.Mutex + manifests := []ocispec.Descriptor{} + indexStack := []ocispec.Descriptor{} + + filterHandler := images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + switch desc.MediaType { + case images.MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + m.Lock() + manifests = append(manifests, desc) + m.Unlock() + return nil, images.ErrStopHandler + case images.MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex: + m.Lock() + indexStack = append(indexStack, desc) + m.Unlock() + return nil, images.ErrStopHandler + default: + return nil, nil + } + }) + + pushHandler := PushHandler(pusher, store) + + platformFilterhandler := images.FilterPlatforms(images.ChildrenHandler(store), platform) + + var handler images.Handler + if m, ok := store.(content.InfoProvider); ok { + annotateHandler := annotateDistributionSourceHandler(platformFilterhandler, m) + handler = images.Handlers(annotateHandler, filterHandler, pushHandler) + } else { + handler = images.Handlers(platformFilterhandler, filterHandler, pushHandler) + } + + if wrapper != nil { + handler = wrapper(handler) + } + + if err := images.Dispatch(ctx, handler, limiter, desc); err != nil { + return err + } + + if err := images.Dispatch(ctx, pushHandler, limiter, manifests...); err != nil { + return err + } + + // Iterate in reverse order as seen, parent always uploaded after child + for i := len(indexStack) - 1; i >= 0; i-- { + err := images.Dispatch(ctx, pushHandler, limiter, indexStack[i]) + if err != nil { + // TODO(estesp): until we have a more complete method for index push, we need to report + // missing dependencies in an index/manifest list by sensing the "400 Bad Request" + // as a marker for this problem + if errors.Unwrap(err) != nil && strings.Contains(errors.Unwrap(err).Error(), "400 Bad Request") { + return fmt.Errorf("manifest list/index references to blobs and/or manifests are missing in your target registry: %w", err) + } + return err + } + } + + return nil +} + +// SkipNonDistributableBlobs returns a handler that skips blobs that have a media type that is "non-distributeable". +// An example of this kind of content would be a Windows base layer, which is not supposed to be redistributed. +// +// This is based on the media type of the content: +// - application/vnd.oci.image.layer.nondistributable +// - application/vnd.docker.image.rootfs.foreign +func SkipNonDistributableBlobs(f images.HandlerFunc) images.HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + if images.IsNonDistributable(desc.MediaType) { + log.G(ctx).WithField("digest", desc.Digest).WithField("mediatype", desc.MediaType).Debug("Skipping non-distributable blob") + return nil, images.ErrSkipDesc + } + + if images.IsLayerType(desc.MediaType) { + return nil, nil + } + + children, err := f(ctx, desc) + if err != nil { + return nil, err + } + if len(children) == 0 { + return nil, nil + } + + out := make([]ocispec.Descriptor, 0, len(children)) + for _, child := range children { + if !images.IsNonDistributable(child.MediaType) { + out = append(out, child) + } else { + log.G(ctx).WithField("digest", child.Digest).WithField("mediatype", child.MediaType).Debug("Skipping non-distributable blob") + } + } + return out, nil + } +} + +// FilterManifestByPlatformHandler allows Handler to handle non-target +// platform's manifest and configuration data. +func FilterManifestByPlatformHandler(f images.HandlerFunc, m platforms.Matcher) images.HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + children, err := f(ctx, desc) + if err != nil { + return nil, err + } + + // no platform information + if desc.Platform == nil || m == nil { + return children, nil + } + + var descs []ocispec.Descriptor + switch desc.MediaType { + case images.MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + if m.Match(*desc.Platform) { + descs = children + } else { + for _, child := range children { + if child.MediaType == images.MediaTypeDockerSchema2Config || + child.MediaType == ocispec.MediaTypeImageConfig { + + descs = append(descs, child) + } + } + } + default: + descs = children + } + return descs, nil + } +} + +// annotateDistributionSourceHandler add distribution source label into +// annotation of config or blob descriptor. +func annotateDistributionSourceHandler(f images.HandlerFunc, provider content.InfoProvider) images.HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + children, err := f(ctx, desc) + if err != nil { + return nil, err + } + + // Distribution source is only used for config or blob but may be inherited from + // a manifest or manifest list + switch desc.MediaType { + case images.MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest, + images.MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex: + default: + return children, nil + } + + parentSourceAnnotations := desc.Annotations + var parentLabels map[string]string + if pi, err := provider.Info(ctx, desc.Digest); err != nil { + if !errdefs.IsNotFound(err) { + return nil, err + } + } else { + parentLabels = pi.Labels + } + + for i := range children { + child := children[i] + + info, err := provider.Info(ctx, child.Digest) + if err != nil { + if !errdefs.IsNotFound(err) { + return nil, err + } + } + copyDistributionSourceLabels(info.Labels, &child) + + // Annotate with parent labels for cross repo mount or fetch. + // Parent sources may apply to all children since most registries + // enforce that children exist before the manifests. + copyDistributionSourceLabels(parentSourceAnnotations, &child) + copyDistributionSourceLabels(parentLabels, &child) + + children[i] = child + } + return children, nil + } +} + +func copyDistributionSourceLabels(from map[string]string, to *ocispec.Descriptor) { + for k, v := range from { + if !strings.HasPrefix(k, labels.LabelDistributionSource+".") { + continue + } + + if to.Annotations == nil { + to.Annotations = make(map[string]string) + } else { + // Only propagate the parent label if the child doesn't already have it. + if _, has := to.Annotations[k]; has { + continue + } + } + to.Annotations[k] = v + } +} diff --git a/vendor/github.com/containerd/containerd/remotes/resolver.go b/vendor/github.com/containerd/containerd/remotes/resolver.go new file mode 100644 index 000000000..f200c84bc --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/resolver.go @@ -0,0 +1,94 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package remotes + +import ( + "context" + "io" + + "github.com/containerd/containerd/content" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// Resolver provides remotes based on a locator. +type Resolver interface { + // Resolve attempts to resolve the reference into a name and descriptor. + // + // The argument `ref` should be a scheme-less URI representing the remote. + // Structurally, it has a host and path. The "host" can be used to directly + // reference a specific host or be matched against a specific handler. + // + // The returned name should be used to identify the referenced entity. + // Depending on the remote namespace, this may be immutable or mutable. + // While the name may differ from ref, it should itself be a valid ref. + // + // If the resolution fails, an error will be returned. + Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error) + + // Fetcher returns a new fetcher for the provided reference. + // All content fetched from the returned fetcher will be + // from the namespace referred to by ref. + Fetcher(ctx context.Context, ref string) (Fetcher, error) + + // Pusher returns a new pusher for the provided reference + // The returned Pusher should satisfy content.Ingester and concurrent attempts + // to push the same blob using the Ingester API should result in ErrUnavailable. + Pusher(ctx context.Context, ref string) (Pusher, error) +} + +// Fetcher fetches content. +// A fetcher implementation may implement the FetcherByDigest interface too. +type Fetcher interface { + // Fetch the resource identified by the descriptor. + Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) +} + +// FetcherByDigest fetches content by the digest. +type FetcherByDigest interface { + // FetchByDigest fetches the resource identified by the digest. + // + // FetcherByDigest usually returns an incomplete descriptor. + // Typically, the media type is always set to "application/octet-stream", + // and the annotations are unset. + FetchByDigest(ctx context.Context, dgst digest.Digest) (io.ReadCloser, ocispec.Descriptor, error) +} + +// Pusher pushes content +type Pusher interface { + // Push returns a content writer for the given resource identified + // by the descriptor. + Push(ctx context.Context, d ocispec.Descriptor) (content.Writer, error) +} + +// FetcherFunc allows package users to implement a Fetcher with just a +// function. +type FetcherFunc func(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) + +// Fetch content +func (fn FetcherFunc) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + return fn(ctx, desc) +} + +// PusherFunc allows package users to implement a Pusher with just a +// function. +type PusherFunc func(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) + +// Push content +func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) { + return fn(ctx, desc) +} diff --git a/vendor/github.com/containerd/containerd/tracing/helpers.go b/vendor/github.com/containerd/containerd/tracing/helpers.go new file mode 100644 index 000000000..981da6c79 --- /dev/null +++ b/vendor/github.com/containerd/containerd/tracing/helpers.go @@ -0,0 +1,94 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package tracing + +import ( + "encoding/json" + "fmt" + "strings" + + "go.opentelemetry.io/otel/attribute" +) + +const ( + spanDelimiter = "." +) + +func makeSpanName(names ...string) string { + return strings.Join(names, spanDelimiter) +} + +func any(k string, v interface{}) attribute.KeyValue { + if v == nil { + return attribute.String(k, "") + } + + switch typed := v.(type) { + case bool: + return attribute.Bool(k, typed) + case []bool: + return attribute.BoolSlice(k, typed) + case int: + return attribute.Int(k, typed) + case []int: + return attribute.IntSlice(k, typed) + case int8: + return attribute.Int(k, int(typed)) + case []int8: + ls := make([]int, 0, len(typed)) + for _, i := range typed { + ls = append(ls, int(i)) + } + return attribute.IntSlice(k, ls) + case int16: + return attribute.Int(k, int(typed)) + case []int16: + ls := make([]int, 0, len(typed)) + for _, i := range typed { + ls = append(ls, int(i)) + } + return attribute.IntSlice(k, ls) + case int32: + return attribute.Int64(k, int64(typed)) + case []int32: + ls := make([]int64, 0, len(typed)) + for _, i := range typed { + ls = append(ls, int64(i)) + } + return attribute.Int64Slice(k, ls) + case int64: + return attribute.Int64(k, typed) + case []int64: + return attribute.Int64Slice(k, typed) + case float64: + return attribute.Float64(k, typed) + case []float64: + return attribute.Float64Slice(k, typed) + case string: + return attribute.String(k, typed) + case []string: + return attribute.StringSlice(k, typed) + } + + if stringer, ok := v.(fmt.Stringer); ok { + return attribute.String(k, stringer.String()) + } + if b, err := json.Marshal(v); b != nil && err == nil { + return attribute.String(k, string(b)) + } + return attribute.String(k, fmt.Sprintf("%v", v)) +} diff --git a/vendor/github.com/containerd/containerd/tracing/log.go b/vendor/github.com/containerd/containerd/tracing/log.go new file mode 100644 index 000000000..98fa16f93 --- /dev/null +++ b/vendor/github.com/containerd/containerd/tracing/log.go @@ -0,0 +1,66 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package tracing + +import ( + "github.com/sirupsen/logrus" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// NewLogrusHook creates a new logrus hook +func NewLogrusHook() *LogrusHook { + return &LogrusHook{} +} + +// LogrusHook is a logrus hook which adds logrus events to active spans. +// If the span is not recording or the span context is invalid, the hook is a no-op. +type LogrusHook struct{} + +// Levels returns the logrus levels that this hook is interested in. +func (h *LogrusHook) Levels() []logrus.Level { + return logrus.AllLevels +} + +// Fire is called when a log event occurs. +func (h *LogrusHook) Fire(entry *logrus.Entry) error { + span := trace.SpanFromContext(entry.Context) + if span == nil { + return nil + } + + if !span.SpanContext().IsValid() || !span.IsRecording() { + return nil + } + + span.AddEvent( + entry.Message, + trace.WithAttributes(logrusDataToAttrs(entry.Data)...), + trace.WithAttributes(attribute.String("level", entry.Level.String())), + trace.WithTimestamp(entry.Time), + ) + + return nil +} + +func logrusDataToAttrs(data logrus.Fields) []attribute.KeyValue { + attrs := make([]attribute.KeyValue, 0, len(data)) + for k, v := range data { + attrs = append(attrs, any(k, v)) + } + return attrs +} diff --git a/vendor/github.com/containerd/containerd/tracing/tracing.go b/vendor/github.com/containerd/containerd/tracing/tracing.go new file mode 100644 index 000000000..80d2b95c0 --- /dev/null +++ b/vendor/github.com/containerd/containerd/tracing/tracing.go @@ -0,0 +1,129 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package tracing + +import ( + "context" + "net/http" + + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + "go.opentelemetry.io/otel/trace" +) + +// StartConfig defines configuration for a new span object. +type StartConfig struct { + spanOpts []trace.SpanStartOption +} + +type SpanOpt func(config *StartConfig) + +// WithHTTPRequest marks span as a HTTP request operation from client to server. +// It'll append attributes from the HTTP request object and mark it with `SpanKindClient` type. +// +// Deprecated: use upstream functionality from otelhttp directly instead. This function is kept for API compatibility +// but no longer works as expected due to required functionality no longer exported in OpenTelemetry libraries. +func WithHTTPRequest(_ *http.Request) SpanOpt { + return func(config *StartConfig) { + config.spanOpts = append(config.spanOpts, + trace.WithSpanKind(trace.SpanKindClient), // A client making a request to a server + ) + } +} + +// UpdateHTTPClient updates the http client with the necessary otel transport +func UpdateHTTPClient(client *http.Client, name string) { + client.Transport = otelhttp.NewTransport( + client.Transport, + otelhttp.WithSpanNameFormatter(func(operation string, r *http.Request) string { + return name + }), + ) +} + +// StartSpan starts child span in a context. +func StartSpan(ctx context.Context, opName string, opts ...SpanOpt) (context.Context, *Span) { + config := StartConfig{} + for _, fn := range opts { + fn(&config) + } + tracer := otel.Tracer("") + if parent := trace.SpanFromContext(ctx); parent != nil && parent.SpanContext().IsValid() { + tracer = parent.TracerProvider().Tracer("") + } + ctx, span := tracer.Start(ctx, opName, config.spanOpts...) + return ctx, &Span{otelSpan: span} +} + +// SpanFromContext returns the current Span from the context. +func SpanFromContext(ctx context.Context) *Span { + return &Span{ + otelSpan: trace.SpanFromContext(ctx), + } +} + +// Span is wrapper around otel trace.Span. +// Span is the individual component of a trace. It represents a +// single named and timed operation of a workflow that is traced. +type Span struct { + otelSpan trace.Span +} + +// End completes the span. +func (s *Span) End() { + s.otelSpan.End() +} + +// AddEvent adds an event with provided name and options. +func (s *Span) AddEvent(name string, options ...trace.EventOption) { + s.otelSpan.AddEvent(name, options...) +} + +// SetStatus sets the status of the current span. +// If an error is encountered, it records the error and sets span status to Error. +func (s *Span) SetStatus(err error) { + if err != nil { + s.otelSpan.RecordError(err) + s.otelSpan.SetStatus(codes.Error, err.Error()) + } else { + s.otelSpan.SetStatus(codes.Ok, "") + } +} + +// SetAttributes sets kv as attributes of the span. +func (s *Span) SetAttributes(kv ...attribute.KeyValue) { + s.otelSpan.SetAttributes(kv...) +} + +// Name sets the span name by joining a list of strings in dot separated format. +func Name(names ...string) string { + return makeSpanName(names...) +} + +// Attribute takes a key value pair and returns attribute.KeyValue type. +func Attribute(k string, v interface{}) attribute.KeyValue { + return any(k, v) +} + +// HTTPStatusCodeAttributes generates attributes of the HTTP namespace as specified by the OpenTelemetry +// specification for a span. +func HTTPStatusCodeAttributes(code int) []attribute.KeyValue { + return []attribute.KeyValue{semconv.HTTPStatusCodeKey.Int(code)} +} diff --git a/vendor/github.com/containerd/containerd/version/version.go b/vendor/github.com/containerd/containerd/version/version.go new file mode 100644 index 000000000..c61791188 --- /dev/null +++ b/vendor/github.com/containerd/containerd/version/version.go @@ -0,0 +1,34 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package version + +import "runtime" + +var ( + // Package is filled at linking time + Package = "github.com/containerd/containerd" + + // Version holds the complete version number. Filled in at linking time. + Version = "1.7.23+unknown" + + // Revision is filled with the VCS (e.g. git) revision being used to build + // the program at linking time. + Revision = "" + + // GoVersion is Go tree's version. + GoVersion = runtime.Version() +) diff --git a/vendor/github.com/containerd/errdefs/LICENSE b/vendor/github.com/containerd/errdefs/LICENSE new file mode 100644 index 000000000..584149b6e --- /dev/null +++ b/vendor/github.com/containerd/errdefs/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/containerd/errdefs/README.md b/vendor/github.com/containerd/errdefs/README.md new file mode 100644 index 000000000..bd418c63f --- /dev/null +++ b/vendor/github.com/containerd/errdefs/README.md @@ -0,0 +1,13 @@ +# errdefs + +A Go package for defining and checking common containerd errors. + +## Project details + +**errdefs** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. diff --git a/vendor/github.com/containerd/errdefs/errors.go b/vendor/github.com/containerd/errdefs/errors.go new file mode 100644 index 000000000..f654d1964 --- /dev/null +++ b/vendor/github.com/containerd/errdefs/errors.go @@ -0,0 +1,443 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package errdefs defines the common errors used throughout containerd +// packages. +// +// Use with fmt.Errorf to add context to an error. +// +// To detect an error class, use the IsXXX functions to tell whether an error +// is of a certain type. +package errdefs + +import ( + "context" + "errors" +) + +// Definitions of common error types used throughout containerd. All containerd +// errors returned by most packages will map into one of these errors classes. +// Packages should return errors of these types when they want to instruct a +// client to take a particular action. +// +// These errors map closely to grpc errors. +var ( + ErrUnknown = errUnknown{} + ErrInvalidArgument = errInvalidArgument{} + ErrNotFound = errNotFound{} + ErrAlreadyExists = errAlreadyExists{} + ErrPermissionDenied = errPermissionDenied{} + ErrResourceExhausted = errResourceExhausted{} + ErrFailedPrecondition = errFailedPrecondition{} + ErrConflict = errConflict{} + ErrNotModified = errNotModified{} + ErrAborted = errAborted{} + ErrOutOfRange = errOutOfRange{} + ErrNotImplemented = errNotImplemented{} + ErrInternal = errInternal{} + ErrUnavailable = errUnavailable{} + ErrDataLoss = errDataLoss{} + ErrUnauthenticated = errUnauthorized{} +) + +// cancelled maps to Moby's "ErrCancelled" +type cancelled interface { + Cancelled() +} + +// IsCanceled returns true if the error is due to `context.Canceled`. +func IsCanceled(err error) bool { + return errors.Is(err, context.Canceled) || isInterface[cancelled](err) +} + +type errUnknown struct{} + +func (errUnknown) Error() string { return "unknown" } + +func (errUnknown) Unknown() {} + +func (e errUnknown) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// unknown maps to Moby's "ErrUnknown" +type unknown interface { + Unknown() +} + +// IsUnknown returns true if the error is due to an unknown error, +// unhandled condition or unexpected response. +func IsUnknown(err error) bool { + return errors.Is(err, errUnknown{}) || isInterface[unknown](err) +} + +type errInvalidArgument struct{} + +func (errInvalidArgument) Error() string { return "invalid argument" } + +func (errInvalidArgument) InvalidParameter() {} + +func (e errInvalidArgument) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// invalidParameter maps to Moby's "ErrInvalidParameter" +type invalidParameter interface { + InvalidParameter() +} + +// IsInvalidArgument returns true if the error is due to an invalid argument +func IsInvalidArgument(err error) bool { + return errors.Is(err, ErrInvalidArgument) || isInterface[invalidParameter](err) +} + +// deadlineExceed maps to Moby's "ErrDeadline" +type deadlineExceeded interface { + DeadlineExceeded() +} + +// IsDeadlineExceeded returns true if the error is due to +// `context.DeadlineExceeded`. +func IsDeadlineExceeded(err error) bool { + return errors.Is(err, context.DeadlineExceeded) || isInterface[deadlineExceeded](err) +} + +type errNotFound struct{} + +func (errNotFound) Error() string { return "not found" } + +func (errNotFound) NotFound() {} + +func (e errNotFound) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// notFound maps to Moby's "ErrNotFound" +type notFound interface { + NotFound() +} + +// IsNotFound returns true if the error is due to a missing object +func IsNotFound(err error) bool { + return errors.Is(err, ErrNotFound) || isInterface[notFound](err) +} + +type errAlreadyExists struct{} + +func (errAlreadyExists) Error() string { return "already exists" } + +func (errAlreadyExists) AlreadyExists() {} + +func (e errAlreadyExists) WithMessage(msg string) error { + return customMessage{e, msg} +} + +type alreadyExists interface { + AlreadyExists() +} + +// IsAlreadyExists returns true if the error is due to an already existing +// metadata item +func IsAlreadyExists(err error) bool { + return errors.Is(err, ErrAlreadyExists) || isInterface[alreadyExists](err) +} + +type errPermissionDenied struct{} + +func (errPermissionDenied) Error() string { return "permission denied" } + +func (errPermissionDenied) Forbidden() {} + +func (e errPermissionDenied) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// forbidden maps to Moby's "ErrForbidden" +type forbidden interface { + Forbidden() +} + +// IsPermissionDenied returns true if the error is due to permission denied +// or forbidden (403) response +func IsPermissionDenied(err error) bool { + return errors.Is(err, ErrPermissionDenied) || isInterface[forbidden](err) +} + +type errResourceExhausted struct{} + +func (errResourceExhausted) Error() string { return "resource exhausted" } + +func (errResourceExhausted) ResourceExhausted() {} + +func (e errResourceExhausted) WithMessage(msg string) error { + return customMessage{e, msg} +} + +type resourceExhausted interface { + ResourceExhausted() +} + +// IsResourceExhausted returns true if the error is due to +// a lack of resources or too many attempts. +func IsResourceExhausted(err error) bool { + return errors.Is(err, errResourceExhausted{}) || isInterface[resourceExhausted](err) +} + +type errFailedPrecondition struct{} + +func (e errFailedPrecondition) Error() string { return "failed precondition" } + +func (errFailedPrecondition) FailedPrecondition() {} + +func (e errFailedPrecondition) WithMessage(msg string) error { + return customMessage{e, msg} +} + +type failedPrecondition interface { + FailedPrecondition() +} + +// IsFailedPrecondition returns true if an operation could not proceed due to +// the lack of a particular condition +func IsFailedPrecondition(err error) bool { + return errors.Is(err, errFailedPrecondition{}) || isInterface[failedPrecondition](err) +} + +type errConflict struct{} + +func (errConflict) Error() string { return "conflict" } + +func (errConflict) Conflict() {} + +func (e errConflict) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// conflict maps to Moby's "ErrConflict" +type conflict interface { + Conflict() +} + +// IsConflict returns true if an operation could not proceed due to +// a conflict. +func IsConflict(err error) bool { + return errors.Is(err, errConflict{}) || isInterface[conflict](err) +} + +type errNotModified struct{} + +func (errNotModified) Error() string { return "not modified" } + +func (errNotModified) NotModified() {} + +func (e errNotModified) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// notModified maps to Moby's "ErrNotModified" +type notModified interface { + NotModified() +} + +// IsNotModified returns true if an operation could not proceed due +// to an object not modified from a previous state. +func IsNotModified(err error) bool { + return errors.Is(err, errNotModified{}) || isInterface[notModified](err) +} + +type errAborted struct{} + +func (errAborted) Error() string { return "aborted" } + +func (errAborted) Aborted() {} + +func (e errAborted) WithMessage(msg string) error { + return customMessage{e, msg} +} + +type aborted interface { + Aborted() +} + +// IsAborted returns true if an operation was aborted. +func IsAborted(err error) bool { + return errors.Is(err, errAborted{}) || isInterface[aborted](err) +} + +type errOutOfRange struct{} + +func (errOutOfRange) Error() string { return "out of range" } + +func (errOutOfRange) OutOfRange() {} + +func (e errOutOfRange) WithMessage(msg string) error { + return customMessage{e, msg} +} + +type outOfRange interface { + OutOfRange() +} + +// IsOutOfRange returns true if an operation could not proceed due +// to data being out of the expected range. +func IsOutOfRange(err error) bool { + return errors.Is(err, errOutOfRange{}) || isInterface[outOfRange](err) +} + +type errNotImplemented struct{} + +func (errNotImplemented) Error() string { return "not implemented" } + +func (errNotImplemented) NotImplemented() {} + +func (e errNotImplemented) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// notImplemented maps to Moby's "ErrNotImplemented" +type notImplemented interface { + NotImplemented() +} + +// IsNotImplemented returns true if the error is due to not being implemented +func IsNotImplemented(err error) bool { + return errors.Is(err, errNotImplemented{}) || isInterface[notImplemented](err) +} + +type errInternal struct{} + +func (errInternal) Error() string { return "internal" } + +func (errInternal) System() {} + +func (e errInternal) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// system maps to Moby's "ErrSystem" +type system interface { + System() +} + +// IsInternal returns true if the error returns to an internal or system error +func IsInternal(err error) bool { + return errors.Is(err, errInternal{}) || isInterface[system](err) +} + +type errUnavailable struct{} + +func (errUnavailable) Error() string { return "unavailable" } + +func (errUnavailable) Unavailable() {} + +func (e errUnavailable) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// unavailable maps to Moby's "ErrUnavailable" +type unavailable interface { + Unavailable() +} + +// IsUnavailable returns true if the error is due to a resource being unavailable +func IsUnavailable(err error) bool { + return errors.Is(err, errUnavailable{}) || isInterface[unavailable](err) +} + +type errDataLoss struct{} + +func (errDataLoss) Error() string { return "data loss" } + +func (errDataLoss) DataLoss() {} + +func (e errDataLoss) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// dataLoss maps to Moby's "ErrDataLoss" +type dataLoss interface { + DataLoss() +} + +// IsDataLoss returns true if data during an operation was lost or corrupted +func IsDataLoss(err error) bool { + return errors.Is(err, errDataLoss{}) || isInterface[dataLoss](err) +} + +type errUnauthorized struct{} + +func (errUnauthorized) Error() string { return "unauthorized" } + +func (errUnauthorized) Unauthorized() {} + +func (e errUnauthorized) WithMessage(msg string) error { + return customMessage{e, msg} +} + +// unauthorized maps to Moby's "ErrUnauthorized" +type unauthorized interface { + Unauthorized() +} + +// IsUnauthorized returns true if the error indicates that the user was +// unauthenticated or unauthorized. +func IsUnauthorized(err error) bool { + return errors.Is(err, errUnauthorized{}) || isInterface[unauthorized](err) +} + +func isInterface[T any](err error) bool { + for { + switch x := err.(type) { + case T: + return true + case customMessage: + err = x.err + case interface{ Unwrap() error }: + err = x.Unwrap() + if err == nil { + return false + } + case interface{ Unwrap() []error }: + for _, err := range x.Unwrap() { + if isInterface[T](err) { + return true + } + } + return false + default: + return false + } + } +} + +// customMessage is used to provide a defined error with a custom message. +// The message is not wrapped but can be compared by the `Is(error) bool` interface. +type customMessage struct { + err error + msg string +} + +func (c customMessage) Is(err error) bool { + return c.err == err +} + +func (c customMessage) As(target any) bool { + return errors.As(c.err, target) +} + +func (c customMessage) Error() string { + return c.msg +} diff --git a/vendor/github.com/containerd/errdefs/resolve.go b/vendor/github.com/containerd/errdefs/resolve.go new file mode 100644 index 000000000..c02d4a73f --- /dev/null +++ b/vendor/github.com/containerd/errdefs/resolve.go @@ -0,0 +1,147 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errdefs + +import "context" + +// Resolve returns the first error found in the error chain which matches an +// error defined in this package or context error. A raw, unwrapped error is +// returned or ErrUnknown if no matching error is found. +// +// This is useful for determining a response code based on the outermost wrapped +// error rather than the original cause. For example, a not found error deep +// in the code may be wrapped as an invalid argument. When determining status +// code from Is* functions, the depth or ordering of the error is not +// considered. +// +// The search order is depth first, a wrapped error returned from any part of +// the chain from `Unwrap() error` will be returned before any joined errors +// as returned by `Unwrap() []error`. +func Resolve(err error) error { + if err == nil { + return nil + } + err = firstError(err) + if err == nil { + err = ErrUnknown + } + return err +} + +func firstError(err error) error { + for { + switch err { + case ErrUnknown, + ErrInvalidArgument, + ErrNotFound, + ErrAlreadyExists, + ErrPermissionDenied, + ErrResourceExhausted, + ErrFailedPrecondition, + ErrConflict, + ErrNotModified, + ErrAborted, + ErrOutOfRange, + ErrNotImplemented, + ErrInternal, + ErrUnavailable, + ErrDataLoss, + ErrUnauthenticated, + context.DeadlineExceeded, + context.Canceled: + return err + } + switch e := err.(type) { + case customMessage: + err = e.err + case unknown: + return ErrUnknown + case invalidParameter: + return ErrInvalidArgument + case notFound: + return ErrNotFound + case alreadyExists: + return ErrAlreadyExists + case forbidden: + return ErrPermissionDenied + case resourceExhausted: + return ErrResourceExhausted + case failedPrecondition: + return ErrFailedPrecondition + case conflict: + return ErrConflict + case notModified: + return ErrNotModified + case aborted: + return ErrAborted + case errOutOfRange: + return ErrOutOfRange + case notImplemented: + return ErrNotImplemented + case system: + return ErrInternal + case unavailable: + return ErrUnavailable + case dataLoss: + return ErrDataLoss + case unauthorized: + return ErrUnauthenticated + case deadlineExceeded: + return context.DeadlineExceeded + case cancelled: + return context.Canceled + case interface{ Unwrap() error }: + err = e.Unwrap() + if err == nil { + return nil + } + case interface{ Unwrap() []error }: + for _, ue := range e.Unwrap() { + if fe := firstError(ue); fe != nil { + return fe + } + } + return nil + case interface{ Is(error) bool }: + for _, target := range []error{ErrUnknown, + ErrInvalidArgument, + ErrNotFound, + ErrAlreadyExists, + ErrPermissionDenied, + ErrResourceExhausted, + ErrFailedPrecondition, + ErrConflict, + ErrNotModified, + ErrAborted, + ErrOutOfRange, + ErrNotImplemented, + ErrInternal, + ErrUnavailable, + ErrDataLoss, + ErrUnauthenticated, + context.DeadlineExceeded, + context.Canceled} { + if e.Is(target) { + return target + } + } + return nil + default: + return nil + } + } +} diff --git a/vendor/github.com/containerd/log/.golangci.yml b/vendor/github.com/containerd/log/.golangci.yml new file mode 100644 index 000000000..a695775df --- /dev/null +++ b/vendor/github.com/containerd/log/.golangci.yml @@ -0,0 +1,30 @@ +linters: + enable: + - exportloopref # Checks for pointers to enclosing loop variables + - gofmt + - goimports + - gosec + - ineffassign + - misspell + - nolintlint + - revive + - staticcheck + - tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17 + - unconvert + - unused + - vet + - dupword # Checks for duplicate words in the source code + disable: + - errcheck + +run: + timeout: 5m + skip-dirs: + - api + - cluster + - design + - docs + - docs/man + - releases + - reports + - test # e2e scripts diff --git a/vendor/github.com/containerd/log/LICENSE b/vendor/github.com/containerd/log/LICENSE new file mode 100644 index 000000000..584149b6e --- /dev/null +++ b/vendor/github.com/containerd/log/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/containerd/log/README.md b/vendor/github.com/containerd/log/README.md new file mode 100644 index 000000000..00e084988 --- /dev/null +++ b/vendor/github.com/containerd/log/README.md @@ -0,0 +1,17 @@ +# log + +A Go package providing a common logging interface across containerd repositories and a way for clients to use and configure logging in containerd packages. + +This package is not intended to be used as a standalone logging package outside of the containerd ecosystem and is intended as an interface wrapper around a logging implementation. +In the future this package may be replaced with a common go logging interface. + +## Project details + +**log** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. + diff --git a/vendor/github.com/containerd/log/context.go b/vendor/github.com/containerd/log/context.go new file mode 100644 index 000000000..20153066f --- /dev/null +++ b/vendor/github.com/containerd/log/context.go @@ -0,0 +1,182 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package log provides types and functions related to logging, passing +// loggers through a context, and attaching context to the logger. +// +// # Transitional types +// +// This package contains various types that are aliases for types in [logrus]. +// These aliases are intended for transitioning away from hard-coding logrus +// as logging implementation. Consumers of this package are encouraged to use +// the type-aliases from this package instead of directly using their logrus +// equivalent. +// +// The intent is to replace these aliases with locally defined types and +// interfaces once all consumers are no longer directly importing logrus +// types. +// +// IMPORTANT: due to the transitional purpose of this package, it is not +// guaranteed for the full logrus API to be provided in the future. As +// outlined, these aliases are provided as a step to transition away from +// a specific implementation which, as a result, exposes the full logrus API. +// While no decisions have been made on the ultimate design and interface +// provided by this package, we do not expect carrying "less common" features. +package log + +import ( + "context" + "fmt" + + "github.com/sirupsen/logrus" +) + +// G is a shorthand for [GetLogger]. +// +// We may want to define this locally to a package to get package tagged log +// messages. +var G = GetLogger + +// L is an alias for the standard logger. +var L = &Entry{ + Logger: logrus.StandardLogger(), + // Default is three fields plus a little extra room. + Data: make(Fields, 6), +} + +type loggerKey struct{} + +// Fields type to pass to "WithFields". +type Fields = map[string]any + +// Entry is a logging entry. It contains all the fields passed with +// [Entry.WithFields]. It's finally logged when Trace, Debug, Info, Warn, +// Error, Fatal or Panic is called on it. These objects can be reused and +// passed around as much as you wish to avoid field duplication. +// +// Entry is a transitional type, and currently an alias for [logrus.Entry]. +type Entry = logrus.Entry + +// RFC3339NanoFixed is [time.RFC3339Nano] with nanoseconds padded using +// zeros to ensure the formatted time is always the same number of +// characters. +const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" + +// Level is a logging level. +type Level = logrus.Level + +// Supported log levels. +const ( + // TraceLevel level. Designates finer-grained informational events + // than [DebugLevel]. + TraceLevel Level = logrus.TraceLevel + + // DebugLevel level. Usually only enabled when debugging. Very verbose + // logging. + DebugLevel Level = logrus.DebugLevel + + // InfoLevel level. General operational entries about what's going on + // inside the application. + InfoLevel Level = logrus.InfoLevel + + // WarnLevel level. Non-critical entries that deserve eyes. + WarnLevel Level = logrus.WarnLevel + + // ErrorLevel level. Logs errors that should definitely be noted. + // Commonly used for hooks to send errors to an error tracking service. + ErrorLevel Level = logrus.ErrorLevel + + // FatalLevel level. Logs and then calls "logger.Exit(1)". It exits + // even if the logging level is set to Panic. + FatalLevel Level = logrus.FatalLevel + + // PanicLevel level. This is the highest level of severity. Logs and + // then calls panic with the message passed to Debug, Info, ... + PanicLevel Level = logrus.PanicLevel +) + +// SetLevel sets log level globally. It returns an error if the given +// level is not supported. +// +// level can be one of: +// +// - "trace" ([TraceLevel]) +// - "debug" ([DebugLevel]) +// - "info" ([InfoLevel]) +// - "warn" ([WarnLevel]) +// - "error" ([ErrorLevel]) +// - "fatal" ([FatalLevel]) +// - "panic" ([PanicLevel]) +func SetLevel(level string) error { + lvl, err := logrus.ParseLevel(level) + if err != nil { + return err + } + + L.Logger.SetLevel(lvl) + return nil +} + +// GetLevel returns the current log level. +func GetLevel() Level { + return L.Logger.GetLevel() +} + +// OutputFormat specifies a log output format. +type OutputFormat string + +// Supported log output formats. +const ( + // TextFormat represents the text logging format. + TextFormat OutputFormat = "text" + + // JSONFormat represents the JSON logging format. + JSONFormat OutputFormat = "json" +) + +// SetFormat sets the log output format ([TextFormat] or [JSONFormat]). +func SetFormat(format OutputFormat) error { + switch format { + case TextFormat: + L.Logger.SetFormatter(&logrus.TextFormatter{ + TimestampFormat: RFC3339NanoFixed, + FullTimestamp: true, + }) + return nil + case JSONFormat: + L.Logger.SetFormatter(&logrus.JSONFormatter{ + TimestampFormat: RFC3339NanoFixed, + }) + return nil + default: + return fmt.Errorf("unknown log format: %s", format) + } +} + +// WithLogger returns a new context with the provided logger. Use in +// combination with logger.WithField(s) for great effect. +func WithLogger(ctx context.Context, logger *Entry) context.Context { + return context.WithValue(ctx, loggerKey{}, logger.WithContext(ctx)) +} + +// GetLogger retrieves the current logger from the context. If no logger is +// available, the default logger is returned. +func GetLogger(ctx context.Context) *Entry { + if logger := ctx.Value(loggerKey{}); logger != nil { + return logger.(*Entry) + } + return L.WithContext(ctx) +} diff --git a/vendor/github.com/containerd/platforms/.gitattributes b/vendor/github.com/containerd/platforms/.gitattributes new file mode 100644 index 000000000..a0717e4b3 --- /dev/null +++ b/vendor/github.com/containerd/platforms/.gitattributes @@ -0,0 +1 @@ +*.go text eol=lf \ No newline at end of file diff --git a/vendor/github.com/containerd/platforms/.golangci.yml b/vendor/github.com/containerd/platforms/.golangci.yml new file mode 100644 index 000000000..a695775df --- /dev/null +++ b/vendor/github.com/containerd/platforms/.golangci.yml @@ -0,0 +1,30 @@ +linters: + enable: + - exportloopref # Checks for pointers to enclosing loop variables + - gofmt + - goimports + - gosec + - ineffassign + - misspell + - nolintlint + - revive + - staticcheck + - tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17 + - unconvert + - unused + - vet + - dupword # Checks for duplicate words in the source code + disable: + - errcheck + +run: + timeout: 5m + skip-dirs: + - api + - cluster + - design + - docs + - docs/man + - releases + - reports + - test # e2e scripts diff --git a/vendor/github.com/containerd/platforms/LICENSE b/vendor/github.com/containerd/platforms/LICENSE new file mode 100644 index 000000000..584149b6e --- /dev/null +++ b/vendor/github.com/containerd/platforms/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/containerd/platforms/README.md b/vendor/github.com/containerd/platforms/README.md new file mode 100644 index 000000000..2059de771 --- /dev/null +++ b/vendor/github.com/containerd/platforms/README.md @@ -0,0 +1,32 @@ +# platforms + +A Go package for formatting, normalizing and matching container platforms. + +This package is based on the Open Containers Image Spec definition of a [platform](https://github.com/opencontainers/image-spec/blob/main/specs-go/v1/descriptor.go#L52). + +## Platform Specifier + +While the OCI platform specifications provide a tool for components to +specify structured information, user input typically doesn't need the full +context and much can be inferred. To solve this problem, this package introduces +"specifiers". A specifier has the format +`||/[/]`. The user can provide either the +operating system or the architecture or both. + +An example of a common specifier is `linux/amd64`. If the host has a default +runtime that matches this, the user can simply provide the component that +matters. For example, if an image provides `amd64` and `arm64` support, the +operating system, `linux` can be inferred, so they only have to provide +`arm64` or `amd64`. Similar behavior is implemented for operating systems, +where the architecture may be known but a runtime may support images from +different operating systems. + +## Project details + +**platforms** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. \ No newline at end of file diff --git a/vendor/github.com/containerd/platforms/compare.go b/vendor/github.com/containerd/platforms/compare.go new file mode 100644 index 000000000..3913ef663 --- /dev/null +++ b/vendor/github.com/containerd/platforms/compare.go @@ -0,0 +1,203 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "strconv" + "strings" + + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// MatchComparer is able to match and compare platforms to +// filter and sort platforms. +type MatchComparer interface { + Matcher + + Less(specs.Platform, specs.Platform) bool +} + +// platformVector returns an (ordered) vector of appropriate specs.Platform +// objects to try matching for the given platform object (see platforms.Only). +func platformVector(platform specs.Platform) []specs.Platform { + vector := []specs.Platform{platform} + + switch platform.Architecture { + case "amd64": + if amd64Version, err := strconv.Atoi(strings.TrimPrefix(platform.Variant, "v")); err == nil && amd64Version > 1 { + for amd64Version--; amd64Version >= 1; amd64Version-- { + vector = append(vector, specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v" + strconv.Itoa(amd64Version), + }) + } + } + vector = append(vector, specs.Platform{ + Architecture: "386", + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + }) + case "arm": + if armVersion, err := strconv.Atoi(strings.TrimPrefix(platform.Variant, "v")); err == nil && armVersion > 5 { + for armVersion--; armVersion >= 5; armVersion-- { + vector = append(vector, specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v" + strconv.Itoa(armVersion), + }) + } + } + case "arm64": + variant := platform.Variant + if variant == "" { + variant = "v8" + } + vector = append(vector, platformVector(specs.Platform{ + Architecture: "arm", + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: variant, + })...) + } + + return vector +} + +// Only returns a match comparer for a single platform +// using default resolution logic for the platform. +// +// For arm/v8, will also match arm/v7, arm/v6 and arm/v5 +// For arm/v7, will also match arm/v6 and arm/v5 +// For arm/v6, will also match arm/v5 +// For amd64, will also match 386 +func Only(platform specs.Platform) MatchComparer { + return Ordered(platformVector(Normalize(platform))...) +} + +// OnlyStrict returns a match comparer for a single platform. +// +// Unlike Only, OnlyStrict does not match sub platforms. +// So, "arm/vN" will not match "arm/vM" where M < N, +// and "amd64" will not also match "386". +// +// OnlyStrict matches non-canonical forms. +// So, "arm64" matches "arm/64/v8". +func OnlyStrict(platform specs.Platform) MatchComparer { + return Ordered(Normalize(platform)) +} + +// Ordered returns a platform MatchComparer which matches any of the platforms +// but orders them in order they are provided. +func Ordered(platforms ...specs.Platform) MatchComparer { + matchers := make([]Matcher, len(platforms)) + for i := range platforms { + matchers[i] = NewMatcher(platforms[i]) + } + return orderedPlatformComparer{ + matchers: matchers, + } +} + +// Any returns a platform MatchComparer which matches any of the platforms +// with no preference for ordering. +func Any(platforms ...specs.Platform) MatchComparer { + matchers := make([]Matcher, len(platforms)) + for i := range platforms { + matchers[i] = NewMatcher(platforms[i]) + } + return anyPlatformComparer{ + matchers: matchers, + } +} + +// All is a platform MatchComparer which matches all platforms +// with preference for ordering. +var All MatchComparer = allPlatformComparer{} + +type orderedPlatformComparer struct { + matchers []Matcher +} + +func (c orderedPlatformComparer) Match(platform specs.Platform) bool { + for _, m := range c.matchers { + if m.Match(platform) { + return true + } + } + return false +} + +func (c orderedPlatformComparer) Less(p1 specs.Platform, p2 specs.Platform) bool { + for _, m := range c.matchers { + p1m := m.Match(p1) + p2m := m.Match(p2) + if p1m && !p2m { + return true + } + if p1m || p2m { + return false + } + } + return false +} + +type anyPlatformComparer struct { + matchers []Matcher +} + +func (c anyPlatformComparer) Match(platform specs.Platform) bool { + for _, m := range c.matchers { + if m.Match(platform) { + return true + } + } + return false +} + +func (c anyPlatformComparer) Less(p1, p2 specs.Platform) bool { + var p1m, p2m bool + for _, m := range c.matchers { + if !p1m && m.Match(p1) { + p1m = true + } + if !p2m && m.Match(p2) { + p2m = true + } + if p1m && p2m { + return false + } + } + // If one matches, and the other does, sort match first + return p1m && !p2m +} + +type allPlatformComparer struct{} + +func (allPlatformComparer) Match(specs.Platform) bool { + return true +} + +func (allPlatformComparer) Less(specs.Platform, specs.Platform) bool { + return false +} diff --git a/vendor/github.com/containerd/platforms/cpuinfo.go b/vendor/github.com/containerd/platforms/cpuinfo.go new file mode 100644 index 000000000..91f50e8c8 --- /dev/null +++ b/vendor/github.com/containerd/platforms/cpuinfo.go @@ -0,0 +1,43 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + "sync" + + "github.com/containerd/log" +) + +// Present the ARM instruction set architecture, eg: v7, v8 +// Don't use this value directly; call cpuVariant() instead. +var cpuVariantValue string + +var cpuVariantOnce sync.Once + +func cpuVariant() string { + cpuVariantOnce.Do(func() { + if isArmArch(runtime.GOARCH) { + var err error + cpuVariantValue, err = getCPUVariant() + if err != nil { + log.L.Errorf("Error getCPUVariant for OS %s: %v", runtime.GOOS, err) + } + } + }) + return cpuVariantValue +} diff --git a/vendor/github.com/containerd/platforms/cpuinfo_linux.go b/vendor/github.com/containerd/platforms/cpuinfo_linux.go new file mode 100644 index 000000000..98c7001f9 --- /dev/null +++ b/vendor/github.com/containerd/platforms/cpuinfo_linux.go @@ -0,0 +1,160 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "os" + "runtime" + "strings" + + "golang.org/x/sys/unix" +) + +// getMachineArch retrieves the machine architecture through system call +func getMachineArch() (string, error) { + var uname unix.Utsname + err := unix.Uname(&uname) + if err != nil { + return "", err + } + + arch := string(uname.Machine[:bytes.IndexByte(uname.Machine[:], 0)]) + + return arch, nil +} + +// For Linux, the kernel has already detected the ABI, ISA and Features. +// So we don't need to access the ARM registers to detect platform information +// by ourselves. We can just parse these information from /proc/cpuinfo +func getCPUInfo(pattern string) (info string, err error) { + + cpuinfo, err := os.Open("/proc/cpuinfo") + if err != nil { + return "", err + } + defer cpuinfo.Close() + + // Start to Parse the Cpuinfo line by line. For SMP SoC, we parse + // the first core is enough. + scanner := bufio.NewScanner(cpuinfo) + for scanner.Scan() { + newline := scanner.Text() + list := strings.Split(newline, ":") + + if len(list) > 1 && strings.EqualFold(strings.TrimSpace(list[0]), pattern) { + return strings.TrimSpace(list[1]), nil + } + } + + // Check whether the scanner encountered errors + err = scanner.Err() + if err != nil { + return "", err + } + + return "", fmt.Errorf("getCPUInfo for pattern %s: %w", pattern, errNotFound) +} + +// getCPUVariantFromArch get CPU variant from arch through a system call +func getCPUVariantFromArch(arch string) (string, error) { + + var variant string + + arch = strings.ToLower(arch) + + if arch == "aarch64" { + variant = "8" + } else if arch[0:4] == "armv" && len(arch) >= 5 { + // Valid arch format is in form of armvXx + switch arch[3:5] { + case "v8": + variant = "8" + case "v7": + variant = "7" + case "v6": + variant = "6" + case "v5": + variant = "5" + case "v4": + variant = "4" + case "v3": + variant = "3" + default: + variant = "unknown" + } + } else { + return "", fmt.Errorf("getCPUVariantFromArch invalid arch: %s, %w", arch, errInvalidArgument) + } + return variant, nil +} + +// getCPUVariant returns cpu variant for ARM +// We first try reading "Cpu architecture" field from /proc/cpuinfo +// If we can't find it, then fall back using a system call +// This is to cover running ARM in emulated environment on x86 host as this field in /proc/cpuinfo +// was not present. +func getCPUVariant() (string, error) { + variant, err := getCPUInfo("Cpu architecture") + if err != nil { + if errors.Is(err, errNotFound) { + // Let's try getting CPU variant from machine architecture + arch, err := getMachineArch() + if err != nil { + return "", fmt.Errorf("failure getting machine architecture: %v", err) + } + + variant, err = getCPUVariantFromArch(arch) + if err != nil { + return "", fmt.Errorf("failure getting CPU variant from machine architecture: %v", err) + } + } else { + return "", fmt.Errorf("failure getting CPU variant: %v", err) + } + } + + // handle edge case for Raspberry Pi ARMv6 devices (which due to a kernel quirk, report "CPU architecture: 7") + // https://www.raspberrypi.org/forums/viewtopic.php?t=12614 + if runtime.GOARCH == "arm" && variant == "7" { + model, err := getCPUInfo("model name") + if err == nil && strings.HasPrefix(strings.ToLower(model), "armv6-compatible") { + variant = "6" + } + } + + switch strings.ToLower(variant) { + case "8", "aarch64": + variant = "v8" + case "7", "7m", "?(12)", "?(13)", "?(14)", "?(15)", "?(16)", "?(17)": + variant = "v7" + case "6", "6tej": + variant = "v6" + case "5", "5t", "5te", "5tej": + variant = "v5" + case "4", "4t": + variant = "v4" + case "3": + variant = "v3" + default: + variant = "unknown" + } + + return variant, nil +} diff --git a/vendor/github.com/containerd/platforms/cpuinfo_other.go b/vendor/github.com/containerd/platforms/cpuinfo_other.go new file mode 100644 index 000000000..97a1fe8a3 --- /dev/null +++ b/vendor/github.com/containerd/platforms/cpuinfo_other.go @@ -0,0 +1,55 @@ +//go:build !linux + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "fmt" + "runtime" +) + +func getCPUVariant() (string, error) { + + var variant string + + if runtime.GOOS == "windows" || runtime.GOOS == "darwin" { + // Windows/Darwin only supports v7 for ARM32 and v8 for ARM64 and so we can use + // runtime.GOARCH to determine the variants + switch runtime.GOARCH { + case "arm64": + variant = "v8" + case "arm": + variant = "v7" + default: + variant = "unknown" + } + } else if runtime.GOOS == "freebsd" { + // FreeBSD supports ARMv6 and ARMv7 as well as ARMv4 and ARMv5 (though deprecated) + // detecting those variants is currently unimplemented + switch runtime.GOARCH { + case "arm64": + variant = "v8" + default: + variant = "unknown" + } + } else { + return "", fmt.Errorf("getCPUVariant for OS %s: %v", runtime.GOOS, errNotImplemented) + } + + return variant, nil +} diff --git a/vendor/github.com/containerd/platforms/database.go b/vendor/github.com/containerd/platforms/database.go new file mode 100644 index 000000000..2e26fd3b4 --- /dev/null +++ b/vendor/github.com/containerd/platforms/database.go @@ -0,0 +1,109 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + "strings" +) + +// These function are generated from https://golang.org/src/go/build/syslist.go. +// +// We use switch statements because they are slightly faster than map lookups +// and use a little less memory. + +// isKnownOS returns true if we know about the operating system. +// +// The OS value should be normalized before calling this function. +func isKnownOS(os string) bool { + switch os { + case "aix", "android", "darwin", "dragonfly", "freebsd", "hurd", "illumos", "ios", "js", "linux", "nacl", "netbsd", "openbsd", "plan9", "solaris", "windows", "zos": + return true + } + return false +} + +// isArmArch returns true if the architecture is ARM. +// +// The arch value should be normalized before being passed to this function. +func isArmArch(arch string) bool { + switch arch { + case "arm", "arm64": + return true + } + return false +} + +// isKnownArch returns true if we know about the architecture. +// +// The arch value should be normalized before being passed to this function. +func isKnownArch(arch string) bool { + switch arch { + case "386", "amd64", "amd64p32", "arm", "armbe", "arm64", "arm64be", "ppc64", "ppc64le", "loong64", "mips", "mipsle", "mips64", "mips64le", "mips64p32", "mips64p32le", "ppc", "riscv", "riscv64", "s390", "s390x", "sparc", "sparc64", "wasm": + return true + } + return false +} + +func normalizeOS(os string) string { + if os == "" { + return runtime.GOOS + } + os = strings.ToLower(os) + + switch os { + case "macos": + os = "darwin" + } + return os +} + +// normalizeArch normalizes the architecture. +func normalizeArch(arch, variant string) (string, string) { + arch, variant = strings.ToLower(arch), strings.ToLower(variant) + switch arch { + case "i386": + arch = "386" + variant = "" + case "x86_64", "x86-64", "amd64": + arch = "amd64" + if variant == "v1" { + variant = "" + } + case "aarch64", "arm64": + arch = "arm64" + switch variant { + case "8", "v8": + variant = "" + } + case "armhf": + arch = "arm" + variant = "v7" + case "armel": + arch = "arm" + variant = "v6" + case "arm": + switch variant { + case "", "7": + variant = "v7" + case "5", "6", "8": + variant = "v" + variant + } + } + + return arch, variant +} diff --git a/vendor/github.com/containerd/platforms/defaults.go b/vendor/github.com/containerd/platforms/defaults.go new file mode 100644 index 000000000..9d898d60e --- /dev/null +++ b/vendor/github.com/containerd/platforms/defaults.go @@ -0,0 +1,29 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +// DefaultString returns the default string specifier for the platform, +// with [PR#6](https://github.com/containerd/platforms/pull/6) the result +// may now also include the OSVersion from the provided platform specification. +func DefaultString() string { + return FormatAll(DefaultSpec()) +} + +// DefaultStrict returns strict form of Default. +func DefaultStrict() MatchComparer { + return OnlyStrict(DefaultSpec()) +} diff --git a/vendor/github.com/containerd/platforms/defaults_darwin.go b/vendor/github.com/containerd/platforms/defaults_darwin.go new file mode 100644 index 000000000..72355ca85 --- /dev/null +++ b/vendor/github.com/containerd/platforms/defaults_darwin.go @@ -0,0 +1,44 @@ +//go:build darwin + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// DefaultSpec returns the current platform's default platform specification. +func DefaultSpec() specs.Platform { + return specs.Platform{ + OS: runtime.GOOS, + Architecture: runtime.GOARCH, + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant(), + } +} + +// Default returns the default matcher for the platform. +func Default() MatchComparer { + return Ordered(DefaultSpec(), specs.Platform{ + // darwin runtime also supports Linux binary via runu/LKL + OS: "linux", + Architecture: runtime.GOARCH, + }) +} diff --git a/vendor/github.com/containerd/platforms/defaults_freebsd.go b/vendor/github.com/containerd/platforms/defaults_freebsd.go new file mode 100644 index 000000000..d3fe89e07 --- /dev/null +++ b/vendor/github.com/containerd/platforms/defaults_freebsd.go @@ -0,0 +1,43 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// DefaultSpec returns the current platform's default platform specification. +func DefaultSpec() specs.Platform { + return specs.Platform{ + OS: runtime.GOOS, + Architecture: runtime.GOARCH, + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant(), + } +} + +// Default returns the default matcher for the platform. +func Default() MatchComparer { + return Ordered(DefaultSpec(), specs.Platform{ + OS: "linux", + Architecture: runtime.GOARCH, + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant(), + }) +} diff --git a/vendor/github.com/containerd/platforms/defaults_unix.go b/vendor/github.com/containerd/platforms/defaults_unix.go new file mode 100644 index 000000000..44acc47eb --- /dev/null +++ b/vendor/github.com/containerd/platforms/defaults_unix.go @@ -0,0 +1,40 @@ +//go:build !windows && !darwin && !freebsd + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// DefaultSpec returns the current platform's default platform specification. +func DefaultSpec() specs.Platform { + return specs.Platform{ + OS: runtime.GOOS, + Architecture: runtime.GOARCH, + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant(), + } +} + +// Default returns the default matcher for the platform. +func Default() MatchComparer { + return Only(DefaultSpec()) +} diff --git a/vendor/github.com/containerd/platforms/defaults_windows.go b/vendor/github.com/containerd/platforms/defaults_windows.go new file mode 100644 index 000000000..427ed72eb --- /dev/null +++ b/vendor/github.com/containerd/platforms/defaults_windows.go @@ -0,0 +1,118 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "fmt" + "runtime" + "strconv" + "strings" + + specs "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sys/windows" +) + +// DefaultSpec returns the current platform's default platform specification. +func DefaultSpec() specs.Platform { + major, minor, build := windows.RtlGetNtVersionNumbers() + return specs.Platform{ + OS: runtime.GOOS, + Architecture: runtime.GOARCH, + OSVersion: fmt.Sprintf("%d.%d.%d", major, minor, build), + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant(), + } +} + +type windowsmatcher struct { + specs.Platform + osVersionPrefix string + defaultMatcher Matcher +} + +// Match matches platform with the same windows major, minor +// and build version. +func (m windowsmatcher) Match(p specs.Platform) bool { + match := m.defaultMatcher.Match(p) + + if match && m.OS == "windows" { + // HPC containers do not have OS version filled + if m.OSVersion == "" || p.OSVersion == "" { + return true + } + + hostOsVersion := getOSVersion(m.osVersionPrefix) + ctrOsVersion := getOSVersion(p.OSVersion) + return checkHostAndContainerCompat(hostOsVersion, ctrOsVersion) + } + + return match +} + +func getOSVersion(osVersionPrefix string) osVersion { + parts := strings.Split(osVersionPrefix, ".") + if len(parts) < 3 { + return osVersion{} + } + + majorVersion, _ := strconv.Atoi(parts[0]) + minorVersion, _ := strconv.Atoi(parts[1]) + buildNumber, _ := strconv.Atoi(parts[2]) + + return osVersion{ + MajorVersion: uint8(majorVersion), + MinorVersion: uint8(minorVersion), + Build: uint16(buildNumber), + } +} + +// Less sorts matched platforms in front of other platforms. +// For matched platforms, it puts platforms with larger revision +// number in front. +func (m windowsmatcher) Less(p1, p2 specs.Platform) bool { + m1, m2 := m.Match(p1), m.Match(p2) + if m1 && m2 { + r1, r2 := revision(p1.OSVersion), revision(p2.OSVersion) + return r1 > r2 + } + return m1 && !m2 +} + +func revision(v string) int { + parts := strings.Split(v, ".") + if len(parts) < 4 { + return 0 + } + r, err := strconv.Atoi(parts[3]) + if err != nil { + return 0 + } + return r +} + +func prefix(v string) string { + parts := strings.Split(v, ".") + if len(parts) < 4 { + return v + } + return strings.Join(parts[0:3], ".") +} + +// Default returns the current platform's default platform specification. +func Default() MatchComparer { + return Only(DefaultSpec()) +} diff --git a/vendor/github.com/containerd/platforms/errors.go b/vendor/github.com/containerd/platforms/errors.go new file mode 100644 index 000000000..5ad721e77 --- /dev/null +++ b/vendor/github.com/containerd/platforms/errors.go @@ -0,0 +1,30 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import "errors" + +// These errors mirror the errors defined in [github.com/containerd/containerd/errdefs], +// however, they are not exported as they are not expected to be used as sentinel +// errors by consumers of this package. +// +//nolint:unused // not all errors are used on all platforms. +var ( + errNotFound = errors.New("not found") + errInvalidArgument = errors.New("invalid argument") + errNotImplemented = errors.New("not implemented") +) diff --git a/vendor/github.com/containerd/platforms/platform_compat_windows.go b/vendor/github.com/containerd/platforms/platform_compat_windows.go new file mode 100644 index 000000000..89e66f0c0 --- /dev/null +++ b/vendor/github.com/containerd/platforms/platform_compat_windows.go @@ -0,0 +1,78 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +// osVersion is a wrapper for Windows version information +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx +type osVersion struct { + Version uint32 + MajorVersion uint8 + MinorVersion uint8 + Build uint16 +} + +// Windows Client and Server build numbers. +// +// See: +// https://learn.microsoft.com/en-us/windows/release-health/release-information +// https://learn.microsoft.com/en-us/windows/release-health/windows-server-release-info +// https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information +const ( + // rs5 (version 1809, codename "Redstone 5") corresponds to Windows Server + // 2019 (ltsc2019), and Windows 10 (October 2018 Update). + rs5 = 17763 + + // v21H2Server corresponds to Windows Server 2022 (ltsc2022). + v21H2Server = 20348 + + // v22H2Win11 corresponds to Windows 11 (2022 Update). + v22H2Win11 = 22621 +) + +// List of stable ABI compliant ltsc releases +// Note: List must be sorted in ascending order +var compatLTSCReleases = []uint16{ + v21H2Server, +} + +// CheckHostAndContainerCompat checks if given host and container +// OS versions are compatible. +// It includes support for stable ABI compliant versions as well. +// Every release after WS 2022 will support the previous ltsc +// container image. Stable ABI is in preview mode for windows 11 client. +// Refer: https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2022%2Cwindows-10#windows-server-host-os-compatibility +func checkHostAndContainerCompat(host, ctr osVersion) bool { + // check major minor versions of host and guest + if host.MajorVersion != ctr.MajorVersion || + host.MinorVersion != ctr.MinorVersion { + return false + } + + // If host is < WS 2022, exact version match is required + if host.Build < v21H2Server { + return host.Build == ctr.Build + } + + var supportedLtscRelease uint16 + for i := len(compatLTSCReleases) - 1; i >= 0; i-- { + if host.Build >= compatLTSCReleases[i] { + supportedLtscRelease = compatLTSCReleases[i] + break + } + } + return ctr.Build >= supportedLtscRelease && ctr.Build <= host.Build +} diff --git a/vendor/github.com/containerd/platforms/platforms.go b/vendor/github.com/containerd/platforms/platforms.go new file mode 100644 index 000000000..1bbbdb91d --- /dev/null +++ b/vendor/github.com/containerd/platforms/platforms.go @@ -0,0 +1,308 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package platforms provides a toolkit for normalizing, matching and +// specifying container platforms. +// +// Centered around OCI platform specifications, we define a string-based +// specifier syntax that can be used for user input. With a specifier, users +// only need to specify the parts of the platform that are relevant to their +// context, providing an operating system or architecture or both. +// +// How do I use this package? +// +// The vast majority of use cases should simply use the match function with +// user input. The first step is to parse a specifier into a matcher: +// +// m, err := Parse("linux") +// if err != nil { ... } +// +// Once you have a matcher, use it to match against the platform declared by a +// component, typically from an image or runtime. Since extracting an images +// platform is a little more involved, we'll use an example against the +// platform default: +// +// if ok := m.Match(Default()); !ok { /* doesn't match */ } +// +// This can be composed in loops for resolving runtimes or used as a filter for +// fetch and select images. +// +// More details of the specifier syntax and platform spec follow. +// +// # Declaring Platform Support +// +// Components that have strict platform requirements should use the OCI +// platform specification to declare their support. Typically, this will be +// images and runtimes that should make these declaring which platform they +// support specifically. This looks roughly as follows: +// +// type Platform struct { +// Architecture string +// OS string +// Variant string +// } +// +// Most images and runtimes should at least set Architecture and OS, according +// to their GOARCH and GOOS values, respectively (follow the OCI image +// specification when in doubt). ARM should set variant under certain +// discussions, which are outlined below. +// +// # Platform Specifiers +// +// While the OCI platform specifications provide a tool for components to +// specify structured information, user input typically doesn't need the full +// context and much can be inferred. To solve this problem, we introduced +// "specifiers". A specifier has the format +// `||/[/]`. The user can provide either the +// operating system or the architecture or both. +// +// An example of a common specifier is `linux/amd64`. If the host has a default +// of runtime that matches this, the user can simply provide the component that +// matters. For example, if a image provides amd64 and arm64 support, the +// operating system, `linux` can be inferred, so they only have to provide +// `arm64` or `amd64`. Similar behavior is implemented for operating systems, +// where the architecture may be known but a runtime may support images from +// different operating systems. +// +// # Normalization +// +// Because not all users are familiar with the way the Go runtime represents +// platforms, several normalizations have been provided to make this package +// easier to user. +// +// The following are performed for architectures: +// +// Value Normalized +// aarch64 arm64 +// armhf arm +// armel arm/v6 +// i386 386 +// x86_64 amd64 +// x86-64 amd64 +// +// We also normalize the operating system `macos` to `darwin`. +// +// # ARM Support +// +// To qualify ARM architecture, the Variant field is used to qualify the arm +// version. The most common arm version, v7, is represented without the variant +// unless it is explicitly provided. This is treated as equivalent to armhf. A +// previous architecture, armel, will be normalized to arm/v6. +// +// Similarly, the most common arm64 version v8, and most common amd64 version v1 +// are represented without the variant. +// +// While these normalizations are provided, their support on arm platforms has +// not yet been fully implemented and tested. +package platforms + +import ( + "fmt" + "path" + "regexp" + "runtime" + "strconv" + "strings" + + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +var ( + specifierRe = regexp.MustCompile(`^[A-Za-z0-9_-]+$`) + osAndVersionRe = regexp.MustCompile(`^([A-Za-z0-9_-]+)(?:\(([A-Za-z0-9_.-]*)\))?$`) +) + +const osAndVersionFormat = "%s(%s)" + +// Platform is a type alias for convenience, so there is no need to import image-spec package everywhere. +type Platform = specs.Platform + +// Matcher matches platforms specifications, provided by an image or runtime. +type Matcher interface { + Match(platform specs.Platform) bool +} + +// NewMatcher returns a simple matcher based on the provided platform +// specification. The returned matcher only looks for equality based on os, +// architecture and variant. +// +// One may implement their own matcher if this doesn't provide the required +// functionality. +// +// Applications should opt to use `Match` over directly parsing specifiers. +func NewMatcher(platform specs.Platform) Matcher { + return newDefaultMatcher(platform) +} + +type matcher struct { + specs.Platform +} + +func (m *matcher) Match(platform specs.Platform) bool { + normalized := Normalize(platform) + return m.OS == normalized.OS && + m.Architecture == normalized.Architecture && + m.Variant == normalized.Variant +} + +func (m *matcher) String() string { + return FormatAll(m.Platform) +} + +// ParseAll parses a list of platform specifiers into a list of platform. +func ParseAll(specifiers []string) ([]specs.Platform, error) { + platforms := make([]specs.Platform, len(specifiers)) + for i, s := range specifiers { + p, err := Parse(s) + if err != nil { + return nil, fmt.Errorf("invalid platform %s: %w", s, err) + } + platforms[i] = p + } + return platforms, nil +} + +// Parse parses the platform specifier syntax into a platform declaration. +// +// Platform specifiers are in the format `[()]||[()]/[/]`. +// The minimum required information for a platform specifier is the operating +// system or architecture. The OSVersion can be part of the OS like `windows(10.0.17763)` +// When an OSVersion is specified, then specs.Platform.OSVersion is populated with that value, +// and an empty string otherwise. +// If there is only a single string (no slashes), the +// value will be matched against the known set of operating systems, then fall +// back to the known set of architectures. The missing component will be +// inferred based on the local environment. +func Parse(specifier string) (specs.Platform, error) { + if strings.Contains(specifier, "*") { + // TODO(stevvooe): need to work out exact wildcard handling + return specs.Platform{}, fmt.Errorf("%q: wildcards not yet supported: %w", specifier, errInvalidArgument) + } + + // Limit to 4 elements to prevent unbounded split + parts := strings.SplitN(specifier, "/", 4) + + var p specs.Platform + for i, part := range parts { + if i == 0 { + // First element is [()] + osVer := osAndVersionRe.FindStringSubmatch(part) + if osVer == nil { + return specs.Platform{}, fmt.Errorf("%q is an invalid OS component of %q: OSAndVersion specifier component must match %q: %w", part, specifier, osAndVersionRe.String(), errInvalidArgument) + } + + p.OS = normalizeOS(osVer[1]) + p.OSVersion = osVer[2] + } else { + if !specifierRe.MatchString(part) { + return specs.Platform{}, fmt.Errorf("%q is an invalid component of %q: platform specifier component must match %q: %w", part, specifier, specifierRe.String(), errInvalidArgument) + } + } + } + + switch len(parts) { + case 1: + // in this case, we will test that the value might be an OS (with or + // without the optional OSVersion specified) and look it up. + // If it is not known, we'll treat it as an architecture. Since + // we have very little information about the platform here, we are + // going to be a little more strict if we don't know about the argument + // value. + if isKnownOS(p.OS) { + // picks a default architecture + p.Architecture = runtime.GOARCH + if p.Architecture == "arm" && cpuVariant() != "v7" { + p.Variant = cpuVariant() + } + + return p, nil + } + + p.Architecture, p.Variant = normalizeArch(parts[0], "") + if p.Architecture == "arm" && p.Variant == "v7" { + p.Variant = "" + } + if isKnownArch(p.Architecture) { + p.OS = runtime.GOOS + return p, nil + } + + return specs.Platform{}, fmt.Errorf("%q: unknown operating system or architecture: %w", specifier, errInvalidArgument) + case 2: + // In this case, we treat as a regular OS[(OSVersion)]/arch pair. We don't care + // about whether or not we know of the platform. + p.Architecture, p.Variant = normalizeArch(parts[1], "") + if p.Architecture == "arm" && p.Variant == "v7" { + p.Variant = "" + } + + return p, nil + case 3: + // we have a fully specified variant, this is rare + p.Architecture, p.Variant = normalizeArch(parts[1], parts[2]) + if p.Architecture == "arm64" && p.Variant == "" { + p.Variant = "v8" + } + + return p, nil + } + + return specs.Platform{}, fmt.Errorf("%q: cannot parse platform specifier: %w", specifier, errInvalidArgument) +} + +// MustParse is like Parses but panics if the specifier cannot be parsed. +// Simplifies initialization of global variables. +func MustParse(specifier string) specs.Platform { + p, err := Parse(specifier) + if err != nil { + panic("platform: Parse(" + strconv.Quote(specifier) + "): " + err.Error()) + } + return p +} + +// Format returns a string specifier from the provided platform specification. +func Format(platform specs.Platform) string { + if platform.OS == "" { + return "unknown" + } + + return path.Join(platform.OS, platform.Architecture, platform.Variant) +} + +// FormatAll returns a string specifier that also includes the OSVersion from the +// provided platform specification. +func FormatAll(platform specs.Platform) string { + if platform.OS == "" { + return "unknown" + } + + if platform.OSVersion != "" { + OSAndVersion := fmt.Sprintf(osAndVersionFormat, platform.OS, platform.OSVersion) + return path.Join(OSAndVersion, platform.Architecture, platform.Variant) + } + return path.Join(platform.OS, platform.Architecture, platform.Variant) +} + +// Normalize validates and translate the platform to the canonical value. +// +// For example, if "Aarch64" is encountered, we change it to "arm64" or if +// "x86_64" is encountered, it becomes "amd64". +func Normalize(platform specs.Platform) specs.Platform { + platform.OS = normalizeOS(platform.OS) + platform.Architecture, platform.Variant = normalizeArch(platform.Architecture, platform.Variant) + + return platform +} diff --git a/vendor/github.com/containerd/platforms/platforms_other.go b/vendor/github.com/containerd/platforms/platforms_other.go new file mode 100644 index 000000000..03f4dcd99 --- /dev/null +++ b/vendor/github.com/containerd/platforms/platforms_other.go @@ -0,0 +1,30 @@ +//go:build !windows + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// NewMatcher returns the default Matcher for containerd +func newDefaultMatcher(platform specs.Platform) Matcher { + return &matcher{ + Platform: Normalize(platform), + } +} diff --git a/vendor/github.com/containerd/platforms/platforms_windows.go b/vendor/github.com/containerd/platforms/platforms_windows.go new file mode 100644 index 000000000..950e2a2dd --- /dev/null +++ b/vendor/github.com/containerd/platforms/platforms_windows.go @@ -0,0 +1,34 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// NewMatcher returns a Windows matcher that will match on osVersionPrefix if +// the platform is Windows otherwise use the default matcher +func newDefaultMatcher(platform specs.Platform) Matcher { + prefix := prefix(platform.OSVersion) + return windowsmatcher{ + Platform: platform, + osVersionPrefix: prefix, + defaultMatcher: &matcher{ + Platform: Normalize(platform), + }, + } +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md b/vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md new file mode 100644 index 000000000..04b5685ab --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md @@ -0,0 +1,178 @@ +# Changelog # +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] ## + +## [0.3.4] - 2024-10-09 ## + +### Fixed ### +- Previously, some testing mocks we had resulted in us doing `import "testing"` + in non-`_test.go` code, which made some downstreams like Kubernetes unhappy. + This has been fixed. (#32) + +## [0.3.3] - 2024-09-30 ## + +### Fixed ### +- The mode and owner verification logic in `MkdirAll` has been removed. This + was originally intended to protect against some theoretical attacks but upon + further consideration these protections don't actually buy us anything and + they were causing spurious errors with more complicated filesystem setups. +- The "is the created directory empty" logic in `MkdirAll` has also been + removed. This was not causing us issues yet, but some pseudofilesystems (such + as `cgroup`) create non-empty directories and so this logic would've been + wrong for such cases. + +## [0.3.2] - 2024-09-13 ## + +### Changed ### +- Passing the `S_ISUID` or `S_ISGID` modes to `MkdirAllInRoot` will now return + an explicit error saying that those bits are ignored by `mkdirat(2)`. In the + past a different error was returned, but since the silent ignoring behaviour + is codified in the man pages a more explicit error seems apt. While silently + ignoring these bits would be the most compatible option, it could lead to + users thinking their code sets these bits when it doesn't. Programs that need + to deal with compatibility can mask the bits themselves. (#23, #25) + +### Fixed ### +- If a directory has `S_ISGID` set, then all child directories will have + `S_ISGID` set when created and a different gid will be used for any inode + created under the directory. Previously, the "expected owner and mode" + validation in `securejoin.MkdirAll` did not correctly handle this. We now + correctly handle this case. (#24, #25) + +## [0.3.1] - 2024-07-23 ## + +### Changed ### +- By allowing `Open(at)InRoot` to opt-out of the extra work done by `MkdirAll` + to do the necessary "partial lookups", `Open(at)InRoot` now does less work + for both implementations (resulting in a many-fold decrease in the number of + operations for `openat2`, and a modest improvement for non-`openat2`) and is + far more guaranteed to match the correct `openat2(RESOLVE_IN_ROOT)` + behaviour. +- We now use `readlinkat(fd, "")` where possible. For `Open(at)InRoot` this + effectively just means that we no longer risk getting spurious errors during + rename races. However, for our hardened procfs handler, this in theory should + prevent mount attacks from tricking us when doing magic-link readlinks (even + when using the unsafe host `/proc` handle). Unfortunately `Reopen` is still + potentially vulnerable to those kinds of somewhat-esoteric attacks. + + Technically this [will only work on post-2.6.39 kernels][linux-readlinkat-emptypath] + but it seems incredibly unlikely anyone is using `filepath-securejoin` on a + pre-2011 kernel. + +### Fixed ### +- Several improvements were made to the errors returned by `Open(at)InRoot` and + `MkdirAll` when dealing with invalid paths under the emulated (ie. + non-`openat2`) implementation. Previously, some paths would return the wrong + error (`ENOENT` when the last component was a non-directory), and other paths + would be returned as though they were acceptable (trailing-slash components + after a non-directory would be ignored by `Open(at)InRoot`). + + These changes were done to match `openat2`'s behaviour and purely is a + consistency fix (most users are going to be using `openat2` anyway). + +[linux-readlinkat-emptypath]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=65cfc6722361570bfe255698d9cd4dccaf47570d + +## [0.3.0] - 2024-07-11 ## + +### Added ### +- A new set of `*os.File`-based APIs have been added. These are adapted from + [libpathrs][] and we strongly suggest using them if possible (as they provide + far more protection against attacks than `SecureJoin`): + + - `Open(at)InRoot` resolves a path inside a rootfs and returns an `*os.File` + handle to the path. Note that the handle returned is an `O_PATH` handle, + which cannot be used for reading or writing (as well as some other + operations -- [see open(2) for more details][open.2]) + + - `Reopen` takes an `O_PATH` file handle and safely re-opens it to upgrade + it to a regular handle. This can also be used with non-`O_PATH` handles, + but `O_PATH` is the most obvious application. + + - `MkdirAll` is an implementation of `os.MkdirAll` that is safe to use to + create a directory tree within a rootfs. + + As these are new APIs, they may change in the future. However, they should be + safe to start migrating to as we have extensive tests ensuring they behave + correctly and are safe against various races and other attacks. + +[libpathrs]: https://github.com/openSUSE/libpathrs +[open.2]: https://www.man7.org/linux/man-pages/man2/open.2.html + +## [0.2.5] - 2024-05-03 ## + +### Changed ### +- Some minor changes were made to how lexical components (like `..` and `.`) + are handled during path generation in `SecureJoin`. There is no behaviour + change as a result of this fix (the resulting paths are the same). + +### Fixed ### +- The error returned when we hit a symlink loop now references the correct + path. (#10) + +## [0.2.4] - 2023-09-06 ## + +### Security ### +- This release fixes a potential security issue in filepath-securejoin when + used on Windows ([GHSA-6xv5-86q9-7xr8][], which could be used to generate + paths outside of the provided rootfs in certain cases), as well as improving + the overall behaviour of filepath-securejoin when dealing with Windows paths + that contain volume names. Thanks to Paulo Gomes for discovering and fixing + these issues. + +### Fixed ### +- Switch to GitHub Actions for CI so we can test on Windows as well as Linux + and MacOS. + +[GHSA-6xv5-86q9-7xr8]: https://github.com/advisories/GHSA-6xv5-86q9-7xr8 + +## [0.2.3] - 2021-06-04 ## + +### Changed ### +- Switch to Go 1.13-style `%w` error wrapping, letting us drop the dependency + on `github.com/pkg/errors`. + +## [0.2.2] - 2018-09-05 ## + +### Changed ### +- Use `syscall.ELOOP` as the base error for symlink loops, rather than our own + (internal) error. This allows callers to more easily use `errors.Is` to check + for this case. + +## [0.2.1] - 2018-09-05 ## + +### Fixed ### +- Use our own `IsNotExist` implementation, which lets us handle `ENOTDIR` + properly within `SecureJoin`. + +## [0.2.0] - 2017-07-19 ## + +We now have 100% test coverage! + +### Added ### +- Add a `SecureJoinVFS` API that can be used for mocking (as we do in our new + tests) or for implementing custom handling of lookup operations (such as for + rootless containers, where work is necessary to access directories with weird + modes because we don't have `CAP_DAC_READ_SEARCH` or `CAP_DAC_OVERRIDE`). + +## 0.1.0 - 2017-07-19 + +This is our first release of `github.com/cyphar/filepath-securejoin`, +containing a full implementation with a coverage of 93.5% (the only missing +cases are the error cases, which are hard to mocktest at the moment). + +[Unreleased]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.4...HEAD +[0.3.3]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.3...v0.3.4 +[0.3.3]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.2...v0.3.3 +[0.3.2]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.1...v0.3.2 +[0.3.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.5...v0.3.0 +[0.2.5]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.4...v0.2.5 +[0.2.4]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.3...v0.2.4 +[0.2.3]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.2...v0.2.3 +[0.2.2]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.1.0...v0.2.0 diff --git a/vendor/github.com/cyphar/filepath-securejoin/LICENSE b/vendor/github.com/cyphar/filepath-securejoin/LICENSE new file mode 100644 index 000000000..cb1ab88da --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/LICENSE @@ -0,0 +1,28 @@ +Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved. +Copyright (C) 2017-2024 SUSE LLC. 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. + * Neither the name of Google Inc. 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 +OWNER 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/vendor/github.com/cyphar/filepath-securejoin/README.md b/vendor/github.com/cyphar/filepath-securejoin/README.md new file mode 100644 index 000000000..eaeb53fcd --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/README.md @@ -0,0 +1,169 @@ +## `filepath-securejoin` ## + +[![Go Documentation](https://pkg.go.dev/badge/github.com/cyphar/filepath-securejoin.svg)](https://pkg.go.dev/github.com/cyphar/filepath-securejoin) +[![Build Status](https://github.com/cyphar/filepath-securejoin/actions/workflows/ci.yml/badge.svg)](https://github.com/cyphar/filepath-securejoin/actions/workflows/ci.yml) + +### Old API ### + +This library was originally just an implementation of `SecureJoin` which was +[intended to be included in the Go standard library][go#20126] as a safer +`filepath.Join` that would restrict the path lookup to be inside a root +directory. + +The implementation was based on code that existed in several container +runtimes. Unfortunately, this API is **fundamentally unsafe** against attackers +that can modify path components after `SecureJoin` returns and before the +caller uses the path, allowing for some fairly trivial TOCTOU attacks. + +`SecureJoin` (and `SecureJoinVFS`) are still provided by this library to +support legacy users, but new users are strongly suggested to avoid using +`SecureJoin` and instead use the [new api](#new-api) or switch to +[libpathrs][libpathrs]. + +With the above limitations in mind, this library guarantees the following: + +* If no error is set, the resulting string **must** be a child path of + `root` and will not contain any symlink path components (they will all be + expanded). + +* When expanding symlinks, all symlink path components **must** be resolved + relative to the provided root. In particular, this can be considered a + userspace implementation of how `chroot(2)` operates on file paths. Note that + these symlinks will **not** be expanded lexically (`filepath.Clean` is not + called on the input before processing). + +* Non-existent path components are unaffected by `SecureJoin` (similar to + `filepath.EvalSymlinks`'s semantics). + +* The returned path will always be `filepath.Clean`ed and thus not contain any + `..` components. + +A (trivial) implementation of this function on GNU/Linux systems could be done +with the following (note that this requires root privileges and is far more +opaque than the implementation in this library, and also requires that +`readlink` is inside the `root` path and is trustworthy): + +```go +package securejoin + +import ( + "os/exec" + "path/filepath" +) + +func SecureJoin(root, unsafePath string) (string, error) { + unsafePath = string(filepath.Separator) + unsafePath + cmd := exec.Command("chroot", root, + "readlink", "--canonicalize-missing", "--no-newline", unsafePath) + output, err := cmd.CombinedOutput() + if err != nil { + return "", err + } + expanded := string(output) + return filepath.Join(root, expanded), nil +} +``` + +[libpathrs]: https://github.com/openSUSE/libpathrs +[go#20126]: https://github.com/golang/go/issues/20126 + +### New API ### + +While we recommend users switch to [libpathrs][libpathrs] as soon as it has a +stable release, some methods implemented by libpathrs have been ported to this +library to ease the transition. These APIs are only supported on Linux. + +These APIs are implemented such that `filepath-securejoin` will +opportunistically use certain newer kernel APIs that make these operations far +more secure. In particular: + +* All of the lookup operations will use [`openat2`][openat2.2] on new enough + kernels (Linux 5.6 or later) to restrict lookups through magic-links and + bind-mounts (for certain operations) and to make use of `RESOLVE_IN_ROOT` to + efficiently resolve symlinks within a rootfs. + +* The APIs provide hardening against a malicious `/proc` mount to either detect + or avoid being tricked by a `/proc` that is not legitimate. This is done + using [`openat2`][openat2.2] for all users, and privileged users will also be + further protected by using [`fsopen`][fsopen.2] and [`open_tree`][open_tree.2] + (Linux 5.2 or later). + +[openat2.2]: https://www.man7.org/linux/man-pages/man2/openat2.2.html +[fsopen.2]: https://github.com/brauner/man-pages-md/blob/main/fsopen.md +[open_tree.2]: https://github.com/brauner/man-pages-md/blob/main/open_tree.md + +#### `OpenInRoot` #### + +```go +func OpenInRoot(root, unsafePath string) (*os.File, error) +func OpenatInRoot(root *os.File, unsafePath string) (*os.File, error) +func Reopen(handle *os.File, flags int) (*os.File, error) +``` + +`OpenInRoot` is a much safer version of + +```go +path, err := securejoin.SecureJoin(root, unsafePath) +file, err := os.OpenFile(path, unix.O_PATH|unix.O_CLOEXEC) +``` + +that protects against various race attacks that could lead to serious security +issues, depending on the application. Note that the returned `*os.File` is an +`O_PATH` file descriptor, which is quite restricted. Callers will probably need +to use `Reopen` to get a more usable handle (this split is done to provide +useful features like PTY spawning and to avoid users accidentally opening bad +inodes that could cause a DoS). + +Callers need to be careful in how they use the returned `*os.File`. Usually it +is only safe to operate on the handle directly, and it is very easy to create a +security issue. [libpathrs][libpathrs] provides far more helpers to make using +these handles safer -- there is currently no plan to port them to +`filepath-securejoin`. + +`OpenatInRoot` is like `OpenInRoot` except that the root is provided using an +`*os.File`. This allows you to ensure that multiple `OpenatInRoot` (or +`MkdirAllHandle`) calls are operating on the same rootfs. + +> **NOTE**: Unlike `SecureJoin`, `OpenInRoot` will error out as soon as it hits +> a dangling symlink or non-existent path. This is in contrast to `SecureJoin` +> which treated non-existent components as though they were real directories, +> and would allow for partial resolution of dangling symlinks. These behaviours +> are at odds with how Linux treats non-existent paths and dangling symlinks, +> and so these are no longer allowed. + +#### `MkdirAll` #### + +```go +func MkdirAll(root, unsafePath string, mode int) error +func MkdirAllHandle(root *os.File, unsafePath string, mode int) (*os.File, error) +``` + +`MkdirAll` is a much safer version of + +```go +path, err := securejoin.SecureJoin(root, unsafePath) +err = os.MkdirAll(path, mode) +``` + +that protects against the same kinds of races that `OpenInRoot` protects +against. + +`MkdirAllHandle` is like `MkdirAll` except that the root is provided using an +`*os.File` (the reason for this is the same as with `OpenatInRoot`) and an +`*os.File` of the final created directory is returned (this directory is +guaranteed to be effectively identical to the directory created by +`MkdirAllHandle`, which is not possible to ensure by just using `OpenatInRoot` +after `MkdirAll`). + +> **NOTE**: Unlike `SecureJoin`, `MkdirAll` will error out as soon as it hits +> a dangling symlink or non-existent path. This is in contrast to `SecureJoin` +> which treated non-existent components as though they were real directories, +> and would allow for partial resolution of dangling symlinks. These behaviours +> are at odds with how Linux treats non-existent paths and dangling symlinks, +> and so these are no longer allowed. This means that `MkdirAll` will not +> create non-existent directories referenced by a dangling symlink. + +### License ### + +The license of this project is the same as Go, which is a BSD 3-clause license +available in the `LICENSE` file. diff --git a/vendor/github.com/cyphar/filepath-securejoin/VERSION b/vendor/github.com/cyphar/filepath-securejoin/VERSION new file mode 100644 index 000000000..42045acae --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/VERSION @@ -0,0 +1 @@ +0.3.4 diff --git a/vendor/github.com/cyphar/filepath-securejoin/doc.go b/vendor/github.com/cyphar/filepath-securejoin/doc.go new file mode 100644 index 000000000..1ec7d065e --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/doc.go @@ -0,0 +1,39 @@ +// Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved. +// Copyright (C) 2017-2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package securejoin implements a set of helpers to make it easier to write Go +// code that is safe against symlink-related escape attacks. The primary idea +// is to let you resolve a path within a rootfs directory as if the rootfs was +// a chroot. +// +// securejoin has two APIs, a "legacy" API and a "modern" API. +// +// The legacy API is [SecureJoin] and [SecureJoinVFS]. These methods are +// **not** safe against race conditions where an attacker changes the +// filesystem after (or during) the [SecureJoin] operation. +// +// The new API is made up of [OpenInRoot] and [MkdirAll] (and derived +// functions). These are safe against racing attackers and have several other +// protections that are not provided by the legacy API. There are many more +// operations that most programs expect to be able to do safely, but we do not +// provide explicit support for them because we want to encourage users to +// switch to [libpathrs](https://github.com/openSUSE/libpathrs) which is a +// cross-language next-generation library that is entirely designed around +// operating on paths safely. +// +// securejoin has been used by several container runtimes (Docker, runc, +// Kubernetes, etc) for quite a few years as a de-facto standard for operating +// on container filesystem paths "safely". However, most users still use the +// legacy API which is unsafe against various attacks (there is a fairly long +// history of CVEs in dependent as a result). Users should switch to the modern +// API as soon as possible (or even better, switch to libpathrs). +// +// This project was initially intended to be included in the Go standard +// library, but [it was rejected](https://go.dev/issue/20126). There is now a +// [new Go proposal](https://go.dev/issue/67002) for a safe path resolution API +// that shares some of the goals of filepath-securejoin. However, that design +// is intended to work like `openat2(RESOLVE_BENEATH)` which does not fit the +// usecase of container runtimes and most system tools. +package securejoin diff --git a/vendor/github.com/cyphar/filepath-securejoin/join.go b/vendor/github.com/cyphar/filepath-securejoin/join.go new file mode 100644 index 000000000..e0ee3f2b5 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/join.go @@ -0,0 +1,125 @@ +// Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved. +// Copyright (C) 2017-2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "errors" + "os" + "path/filepath" + "strings" + "syscall" +) + +const maxSymlinkLimit = 255 + +// IsNotExist tells you if err is an error that implies that either the path +// accessed does not exist (or path components don't exist). This is +// effectively a more broad version of [os.IsNotExist]. +func IsNotExist(err error) bool { + // Check that it's not actually an ENOTDIR, which in some cases is a more + // convoluted case of ENOENT (usually involving weird paths). + return errors.Is(err, os.ErrNotExist) || errors.Is(err, syscall.ENOTDIR) || errors.Is(err, syscall.ENOENT) +} + +// SecureJoinVFS joins the two given path components (similar to [filepath.Join]) except +// that the returned path is guaranteed to be scoped inside the provided root +// path (when evaluated). Any symbolic links in the path are evaluated with the +// given root treated as the root of the filesystem, similar to a chroot. The +// filesystem state is evaluated through the given [VFS] interface (if nil, the +// standard [os].* family of functions are used). +// +// Note that the guarantees provided by this function only apply if the path +// components in the returned string are not modified (in other words are not +// replaced with symlinks on the filesystem) after this function has returned. +// Such a symlink race is necessarily out-of-scope of SecureJoinVFS. +// +// NOTE: Due to the above limitation, Linux users are strongly encouraged to +// use [OpenInRoot] instead, which does safely protect against these kinds of +// attacks. There is no way to solve this problem with SecureJoinVFS because +// the API is fundamentally wrong (you cannot return a "safe" path string and +// guarantee it won't be modified afterwards). +// +// Volume names in unsafePath are always discarded, regardless if they are +// provided via direct input or when evaluating symlinks. Therefore: +// +// "C:\Temp" + "D:\path\to\file.txt" results in "C:\Temp\path\to\file.txt" +func SecureJoinVFS(root, unsafePath string, vfs VFS) (string, error) { + // Use the os.* VFS implementation if none was specified. + if vfs == nil { + vfs = osVFS{} + } + + unsafePath = filepath.FromSlash(unsafePath) + var ( + currentPath string + remainingPath = unsafePath + linksWalked int + ) + for remainingPath != "" { + if v := filepath.VolumeName(remainingPath); v != "" { + remainingPath = remainingPath[len(v):] + } + + // Get the next path component. + var part string + if i := strings.IndexRune(remainingPath, filepath.Separator); i == -1 { + part, remainingPath = remainingPath, "" + } else { + part, remainingPath = remainingPath[:i], remainingPath[i+1:] + } + + // Apply the component lexically to the path we are building. + // currentPath does not contain any symlinks, and we are lexically + // dealing with a single component, so it's okay to do a filepath.Clean + // here. + nextPath := filepath.Join(string(filepath.Separator), currentPath, part) + if nextPath == string(filepath.Separator) { + currentPath = "" + continue + } + fullPath := root + string(filepath.Separator) + nextPath + + // Figure out whether the path is a symlink. + fi, err := vfs.Lstat(fullPath) + if err != nil && !IsNotExist(err) { + return "", err + } + // Treat non-existent path components the same as non-symlinks (we + // can't do any better here). + if IsNotExist(err) || fi.Mode()&os.ModeSymlink == 0 { + currentPath = nextPath + continue + } + + // It's a symlink, so get its contents and expand it by prepending it + // to the yet-unparsed path. + linksWalked++ + if linksWalked > maxSymlinkLimit { + return "", &os.PathError{Op: "SecureJoin", Path: root + string(filepath.Separator) + unsafePath, Err: syscall.ELOOP} + } + + dest, err := vfs.Readlink(fullPath) + if err != nil { + return "", err + } + remainingPath = dest + string(filepath.Separator) + remainingPath + // Absolute symlinks reset any work we've already done. + if filepath.IsAbs(dest) { + currentPath = "" + } + } + + // There should be no lexical components like ".." left in the path here, + // but for safety clean up the path before joining it to the root. + finalPath := filepath.Join(string(filepath.Separator), currentPath) + return filepath.Join(root, finalPath), nil +} + +// SecureJoin is a wrapper around [SecureJoinVFS] that just uses the [os].* library +// of functions as the [VFS]. If in doubt, use this function over [SecureJoinVFS]. +func SecureJoin(root, unsafePath string) (string, error) { + return SecureJoinVFS(root, unsafePath, nil) +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/lookup_linux.go b/vendor/github.com/cyphar/filepath-securejoin/lookup_linux.go new file mode 100644 index 000000000..290befa15 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/lookup_linux.go @@ -0,0 +1,389 @@ +//go:build linux + +// Copyright (C) 2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "errors" + "fmt" + "os" + "path" + "path/filepath" + "slices" + "strings" + + "golang.org/x/sys/unix" +) + +type symlinkStackEntry struct { + // (dir, remainingPath) is what we would've returned if the link didn't + // exist. This matches what openat2(RESOLVE_IN_ROOT) would return in + // this case. + dir *os.File + remainingPath string + // linkUnwalked is the remaining path components from the original + // Readlink which we have yet to walk. When this slice is empty, we + // drop the link from the stack. + linkUnwalked []string +} + +func (se symlinkStackEntry) String() string { + return fmt.Sprintf("<%s>/%s [->%s]", se.dir.Name(), se.remainingPath, strings.Join(se.linkUnwalked, "/")) +} + +func (se symlinkStackEntry) Close() { + _ = se.dir.Close() +} + +type symlinkStack []*symlinkStackEntry + +func (s *symlinkStack) IsEmpty() bool { + return s == nil || len(*s) == 0 +} + +func (s *symlinkStack) Close() { + if s != nil { + for _, link := range *s { + link.Close() + } + // TODO: Switch to clear once we switch to Go 1.21. + *s = nil + } +} + +var ( + errEmptyStack = errors.New("[internal] stack is empty") + errBrokenSymlinkStack = errors.New("[internal error] broken symlink stack") +) + +func (s *symlinkStack) popPart(part string) error { + if s == nil || s.IsEmpty() { + // If there is nothing in the symlink stack, then the part was from the + // real path provided by the user, and this is a no-op. + return errEmptyStack + } + if part == "." { + // "." components are no-ops -- we drop them when doing SwapLink. + return nil + } + + tailEntry := (*s)[len(*s)-1] + + // Double-check that we are popping the component we expect. + if len(tailEntry.linkUnwalked) == 0 { + return fmt.Errorf("%w: trying to pop component %q of empty stack entry %s", errBrokenSymlinkStack, part, tailEntry) + } + headPart := tailEntry.linkUnwalked[0] + if headPart != part { + return fmt.Errorf("%w: trying to pop component %q but the last stack entry is %s (%q)", errBrokenSymlinkStack, part, tailEntry, headPart) + } + + // Drop the component, but keep the entry around in case we are dealing + // with a "tail-chained" symlink. + tailEntry.linkUnwalked = tailEntry.linkUnwalked[1:] + return nil +} + +func (s *symlinkStack) PopPart(part string) error { + if err := s.popPart(part); err != nil { + if errors.Is(err, errEmptyStack) { + // Skip empty stacks. + err = nil + } + return err + } + + // Clean up any of the trailing stack entries that are empty. + for lastGood := len(*s) - 1; lastGood >= 0; lastGood-- { + entry := (*s)[lastGood] + if len(entry.linkUnwalked) > 0 { + break + } + entry.Close() + (*s) = (*s)[:lastGood] + } + return nil +} + +func (s *symlinkStack) push(dir *os.File, remainingPath, linkTarget string) error { + if s == nil { + return nil + } + // Split the link target and clean up any "" parts. + linkTargetParts := slices.DeleteFunc( + strings.Split(linkTarget, "/"), + func(part string) bool { return part == "" || part == "." }) + + // Copy the directory so the caller doesn't close our copy. + dirCopy, err := dupFile(dir) + if err != nil { + return err + } + + // Add to the stack. + *s = append(*s, &symlinkStackEntry{ + dir: dirCopy, + remainingPath: remainingPath, + linkUnwalked: linkTargetParts, + }) + return nil +} + +func (s *symlinkStack) SwapLink(linkPart string, dir *os.File, remainingPath, linkTarget string) error { + // If we are currently inside a symlink resolution, remove the symlink + // component from the last symlink entry, but don't remove the entry even + // if it's empty. If we are a "tail-chained" symlink (a trailing symlink we + // hit during a symlink resolution) we need to keep the old symlink until + // we finish the resolution. + if err := s.popPart(linkPart); err != nil { + if !errors.Is(err, errEmptyStack) { + return err + } + // Push the component regardless of whether the stack was empty. + } + return s.push(dir, remainingPath, linkTarget) +} + +func (s *symlinkStack) PopTopSymlink() (*os.File, string, bool) { + if s == nil || s.IsEmpty() { + return nil, "", false + } + tailEntry := (*s)[0] + *s = (*s)[1:] + return tailEntry.dir, tailEntry.remainingPath, true +} + +// partialLookupInRoot tries to lookup as much of the request path as possible +// within the provided root (a-la RESOLVE_IN_ROOT) and opens the final existing +// component of the requested path, returning a file handle to the final +// existing component and a string containing the remaining path components. +func partialLookupInRoot(root *os.File, unsafePath string) (*os.File, string, error) { + return lookupInRoot(root, unsafePath, true) +} + +func completeLookupInRoot(root *os.File, unsafePath string) (*os.File, error) { + handle, remainingPath, err := lookupInRoot(root, unsafePath, false) + if remainingPath != "" && err == nil { + // should never happen + err = fmt.Errorf("[bug] non-empty remaining path when doing a non-partial lookup: %q", remainingPath) + } + // lookupInRoot(partial=false) will always close the handle if an error is + // returned, so no need to double-check here. + return handle, err +} + +func lookupInRoot(root *os.File, unsafePath string, partial bool) (Handle *os.File, _ string, _ error) { + unsafePath = filepath.ToSlash(unsafePath) // noop + + // This is very similar to SecureJoin, except that we operate on the + // components using file descriptors. We then return the last component we + // managed open, along with the remaining path components not opened. + + // Try to use openat2 if possible. + if hasOpenat2() { + return lookupOpenat2(root, unsafePath, partial) + } + + // Get the "actual" root path from /proc/self/fd. This is necessary if the + // root is some magic-link like /proc/$pid/root, in which case we want to + // make sure when we do checkProcSelfFdPath that we are using the correct + // root path. + logicalRootPath, err := procSelfFdReadlink(root) + if err != nil { + return nil, "", fmt.Errorf("get real root path: %w", err) + } + + currentDir, err := dupFile(root) + if err != nil { + return nil, "", fmt.Errorf("clone root fd: %w", err) + } + defer func() { + // If a handle is not returned, close the internal handle. + if Handle == nil { + _ = currentDir.Close() + } + }() + + // symlinkStack is used to emulate how openat2(RESOLVE_IN_ROOT) treats + // dangling symlinks. If we hit a non-existent path while resolving a + // symlink, we need to return the (dir, remainingPath) that we had when we + // hit the symlink (treating the symlink as though it were a regular file). + // The set of (dir, remainingPath) sets is stored within the symlinkStack + // and we add and remove parts when we hit symlink and non-symlink + // components respectively. We need a stack because of recursive symlinks + // (symlinks that contain symlink components in their target). + // + // Note that the stack is ONLY used for book-keeping. All of the actual + // path walking logic is still based on currentPath/remainingPath and + // currentDir (as in SecureJoin). + var symStack *symlinkStack + if partial { + symStack = new(symlinkStack) + defer symStack.Close() + } + + var ( + linksWalked int + currentPath string + remainingPath = unsafePath + ) + for remainingPath != "" { + // Save the current remaining path so if the part is not real we can + // return the path including the component. + oldRemainingPath := remainingPath + + // Get the next path component. + var part string + if i := strings.IndexByte(remainingPath, '/'); i == -1 { + part, remainingPath = remainingPath, "" + } else { + part, remainingPath = remainingPath[:i], remainingPath[i+1:] + } + // If we hit an empty component, we need to treat it as though it is + // "." so that trailing "/" and "//" components on a non-directory + // correctly return the right error code. + if part == "" { + part = "." + } + + // Apply the component lexically to the path we are building. + // currentPath does not contain any symlinks, and we are lexically + // dealing with a single component, so it's okay to do a filepath.Clean + // here. + nextPath := path.Join("/", currentPath, part) + // If we logically hit the root, just clone the root rather than + // opening the part and doing all of the other checks. + if nextPath == "/" { + if err := symStack.PopPart(part); err != nil { + return nil, "", fmt.Errorf("walking into root with part %q failed: %w", part, err) + } + // Jump to root. + rootClone, err := dupFile(root) + if err != nil { + return nil, "", fmt.Errorf("clone root fd: %w", err) + } + _ = currentDir.Close() + currentDir = rootClone + currentPath = nextPath + continue + } + + // Try to open the next component. + nextDir, err := openatFile(currentDir, part, unix.O_PATH|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0) + switch { + case err == nil: + st, err := nextDir.Stat() + if err != nil { + _ = nextDir.Close() + return nil, "", fmt.Errorf("stat component %q: %w", part, err) + } + + switch st.Mode() & os.ModeType { + case os.ModeSymlink: + // readlinkat implies AT_EMPTY_PATH since Linux 2.6.39. See + // Linux commit 65cfc6722361 ("readlinkat(), fchownat() and + // fstatat() with empty relative pathnames"). + linkDest, err := readlinkatFile(nextDir, "") + // We don't need the handle anymore. + _ = nextDir.Close() + if err != nil { + return nil, "", err + } + + linksWalked++ + if linksWalked > maxSymlinkLimit { + return nil, "", &os.PathError{Op: "securejoin.lookupInRoot", Path: logicalRootPath + "/" + unsafePath, Err: unix.ELOOP} + } + + // Swap out the symlink's component for the link entry itself. + if err := symStack.SwapLink(part, currentDir, oldRemainingPath, linkDest); err != nil { + return nil, "", fmt.Errorf("walking into symlink %q failed: push symlink: %w", part, err) + } + + // Update our logical remaining path. + remainingPath = linkDest + "/" + remainingPath + // Absolute symlinks reset any work we've already done. + if path.IsAbs(linkDest) { + // Jump to root. + rootClone, err := dupFile(root) + if err != nil { + return nil, "", fmt.Errorf("clone root fd: %w", err) + } + _ = currentDir.Close() + currentDir = rootClone + currentPath = "/" + } + + default: + // If we are dealing with a directory, simply walk into it. + _ = currentDir.Close() + currentDir = nextDir + currentPath = nextPath + + // The part was real, so drop it from the symlink stack. + if err := symStack.PopPart(part); err != nil { + return nil, "", fmt.Errorf("walking into directory %q failed: %w", part, err) + } + + // If we are operating on a .., make sure we haven't escaped. + // We only have to check for ".." here because walking down + // into a regular component component cannot cause you to + // escape. This mirrors the logic in RESOLVE_IN_ROOT, except we + // have to check every ".." rather than only checking after a + // rename or mount on the system. + if part == ".." { + // Make sure the root hasn't moved. + if err := checkProcSelfFdPath(logicalRootPath, root); err != nil { + return nil, "", fmt.Errorf("root path moved during lookup: %w", err) + } + // Make sure the path is what we expect. + fullPath := logicalRootPath + nextPath + if err := checkProcSelfFdPath(fullPath, currentDir); err != nil { + return nil, "", fmt.Errorf("walking into %q had unexpected result: %w", part, err) + } + } + } + + default: + if !partial { + return nil, "", err + } + // If there are any remaining components in the symlink stack, we + // are still within a symlink resolution and thus we hit a dangling + // symlink. So pretend that the first symlink in the stack we hit + // was an ENOENT (to match openat2). + if oldDir, remainingPath, ok := symStack.PopTopSymlink(); ok { + _ = currentDir.Close() + return oldDir, remainingPath, err + } + // We have hit a final component that doesn't exist, so we have our + // partial open result. Note that we have to use the OLD remaining + // path, since the lookup failed. + return currentDir, oldRemainingPath, err + } + } + + // If the unsafePath had a trailing slash, we need to make sure we try to + // do a relative "." open so that we will correctly return an error when + // the final component is a non-directory (to match openat2). In the + // context of openat2, a trailing slash and a trailing "/." are completely + // equivalent. + if strings.HasSuffix(unsafePath, "/") { + nextDir, err := openatFile(currentDir, ".", unix.O_PATH|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0) + if err != nil { + if !partial { + _ = currentDir.Close() + currentDir = nil + } + return currentDir, "", err + } + _ = currentDir.Close() + currentDir = nextDir + } + + // All of the components existed! + return currentDir, "", nil +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/mkdir_linux.go b/vendor/github.com/cyphar/filepath-securejoin/mkdir_linux.go new file mode 100644 index 000000000..b5f674524 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/mkdir_linux.go @@ -0,0 +1,207 @@ +//go:build linux + +// Copyright (C) 2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "slices" + "strings" + + "golang.org/x/sys/unix" +) + +var ( + errInvalidMode = errors.New("invalid permission mode") + errPossibleAttack = errors.New("possible attack detected") +) + +// MkdirAllHandle is equivalent to [MkdirAll], except that it is safer to use +// in two respects: +// +// - The caller provides the root directory as an *[os.File] (preferably O_PATH) +// handle. This means that the caller can be sure which root directory is +// being used. Note that this can be emulated by using /proc/self/fd/... as +// the root path with [os.MkdirAll]. +// +// - Once all of the directories have been created, an *[os.File] O_PATH handle +// to the directory at unsafePath is returned to the caller. This is done in +// an effectively-race-free way (an attacker would only be able to swap the +// final directory component), which is not possible to emulate with +// [MkdirAll]. +// +// In addition, the returned handle is obtained far more efficiently than doing +// a brand new lookup of unsafePath (such as with [SecureJoin] or openat2) after +// doing [MkdirAll]. If you intend to open the directory after creating it, you +// should use MkdirAllHandle. +func MkdirAllHandle(root *os.File, unsafePath string, mode int) (_ *os.File, Err error) { + // Make sure there are no os.FileMode bits set. + if mode&^0o7777 != 0 { + return nil, fmt.Errorf("%w for mkdir 0o%.3o", errInvalidMode, mode) + } + // On Linux, mkdirat(2) (and os.Mkdir) silently ignore the suid and sgid + // bits. We could also silently ignore them but since we have very few + // users it seems more prudent to return an error so users notice that + // these bits will not be set. + if mode&^0o1777 != 0 { + return nil, fmt.Errorf("%w for mkdir 0o%.3o: suid and sgid are ignored by mkdir", errInvalidMode, mode) + } + + // Try to open as much of the path as possible. + currentDir, remainingPath, err := partialLookupInRoot(root, unsafePath) + defer func() { + if Err != nil { + _ = currentDir.Close() + } + }() + if err != nil && !errors.Is(err, unix.ENOENT) { + return nil, fmt.Errorf("find existing subpath of %q: %w", unsafePath, err) + } + + // If there is an attacker deleting directories as we walk into them, + // detect this proactively. Note this is guaranteed to detect if the + // attacker deleted any part of the tree up to currentDir. + // + // Once we walk into a dead directory, partialLookupInRoot would not be + // able to walk further down the tree (directories must be empty before + // they are deleted), and if the attacker has removed the entire tree we + // can be sure that anything that was originally inside a dead directory + // must also be deleted and thus is a dead directory in its own right. + // + // This is mostly a quality-of-life check, because mkdir will simply fail + // later if the attacker deletes the tree after this check. + if err := isDeadInode(currentDir); err != nil { + return nil, fmt.Errorf("finding existing subpath of %q: %w", unsafePath, err) + } + + // Re-open the path to match the O_DIRECTORY reopen loop later (so that we + // always return a non-O_PATH handle). We also check that we actually got a + // directory. + if reopenDir, err := Reopen(currentDir, unix.O_DIRECTORY|unix.O_CLOEXEC); errors.Is(err, unix.ENOTDIR) { + return nil, fmt.Errorf("cannot create subdirectories in %q: %w", currentDir.Name(), unix.ENOTDIR) + } else if err != nil { + return nil, fmt.Errorf("re-opening handle to %q: %w", currentDir.Name(), err) + } else { + _ = currentDir.Close() + currentDir = reopenDir + } + + remainingParts := strings.Split(remainingPath, string(filepath.Separator)) + if slices.Contains(remainingParts, "..") { + // The path contained ".." components after the end of the "real" + // components. We could try to safely resolve ".." here but that would + // add a bunch of extra logic for something that it's not clear even + // needs to be supported. So just return an error. + // + // If we do filepath.Clean(remainingPath) then we end up with the + // problem that ".." can erase a trailing dangling symlink and produce + // a path that doesn't quite match what the user asked for. + return nil, fmt.Errorf("%w: yet-to-be-created path %q contains '..' components", unix.ENOENT, remainingPath) + } + + // Make sure the mode doesn't have any type bits. + mode &^= unix.S_IFMT + + // Create the remaining components. + for _, part := range remainingParts { + switch part { + case "", ".": + // Skip over no-op paths. + continue + } + + // NOTE: mkdir(2) will not follow trailing symlinks, so we can safely + // create the final component without worrying about symlink-exchange + // attacks. + if err := unix.Mkdirat(int(currentDir.Fd()), part, uint32(mode)); err != nil { + err = &os.PathError{Op: "mkdirat", Path: currentDir.Name() + "/" + part, Err: err} + // Make the error a bit nicer if the directory is dead. + if err2 := isDeadInode(currentDir); err2 != nil { + err = fmt.Errorf("%w (%w)", err, err2) + } + return nil, err + } + + // Get a handle to the next component. O_DIRECTORY means we don't need + // to use O_PATH. + var nextDir *os.File + if hasOpenat2() { + nextDir, err = openat2File(currentDir, part, &unix.OpenHow{ + Flags: unix.O_NOFOLLOW | unix.O_DIRECTORY | unix.O_CLOEXEC, + Resolve: unix.RESOLVE_BENEATH | unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_NO_XDEV, + }) + } else { + nextDir, err = openatFile(currentDir, part, unix.O_NOFOLLOW|unix.O_DIRECTORY|unix.O_CLOEXEC, 0) + } + if err != nil { + return nil, err + } + _ = currentDir.Close() + currentDir = nextDir + + // It's possible that the directory we just opened was swapped by an + // attacker. Unfortunately there isn't much we can do to protect + // against this, and MkdirAll's behaviour is that we will reuse + // existing directories anyway so the need to protect against this is + // incredibly limited (and arguably doesn't even deserve mention here). + // + // Ideally we might want to check that the owner and mode match what we + // would've created -- unfortunately, it is non-trivial to verify that + // the owner and mode of the created directory match. While plain Unix + // DAC rules seem simple enough to emulate, there are a bunch of other + // factors that can change the mode or owner of created directories + // (default POSIX ACLs, mount options like uid=1,gid=2,umask=0 on + // filesystems like vfat, etc etc). We used to try to verify this but + // it just lead to a series of spurious errors. + // + // We could also check that the directory is non-empty, but + // unfortunately some pseduofilesystems (like cgroupfs) create + // non-empty directories, which would result in different spurious + // errors. + } + return currentDir, nil +} + +// MkdirAll is a race-safe alternative to the [os.MkdirAll] function, +// where the new directory is guaranteed to be within the root directory (if an +// attacker can move directories from inside the root to outside the root, the +// created directory tree might be outside of the root but the key constraint +// is that at no point will we walk outside of the directory tree we are +// creating). +// +// Effectively, MkdirAll(root, unsafePath, mode) is equivalent to +// +// path, _ := securejoin.SecureJoin(root, unsafePath) +// err := os.MkdirAll(path, mode) +// +// But is much safer. The above implementation is unsafe because if an attacker +// can modify the filesystem tree between [SecureJoin] and [os.MkdirAll], it is +// possible for MkdirAll to resolve unsafe symlink components and create +// directories outside of the root. +// +// If you plan to open the directory after you have created it or want to use +// an open directory handle as the root, you should use [MkdirAllHandle] instead. +// This function is a wrapper around [MkdirAllHandle]. +// +// NOTE: The mode argument must be set the unix mode bits (unix.S_I...), not +// the Go generic mode bits ([os.FileMode]...). +func MkdirAll(root, unsafePath string, mode int) error { + rootDir, err := os.OpenFile(root, unix.O_PATH|unix.O_DIRECTORY|unix.O_CLOEXEC, 0) + if err != nil { + return err + } + defer rootDir.Close() + + f, err := MkdirAllHandle(rootDir, unsafePath, mode) + if err != nil { + return err + } + _ = f.Close() + return nil +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/open_linux.go b/vendor/github.com/cyphar/filepath-securejoin/open_linux.go new file mode 100644 index 000000000..230be73f0 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/open_linux.go @@ -0,0 +1,103 @@ +//go:build linux + +// Copyright (C) 2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "fmt" + "os" + "strconv" + + "golang.org/x/sys/unix" +) + +// OpenatInRoot is equivalent to [OpenInRoot], except that the root is provided +// using an *[os.File] handle, to ensure that the correct root directory is used. +func OpenatInRoot(root *os.File, unsafePath string) (*os.File, error) { + handle, err := completeLookupInRoot(root, unsafePath) + if err != nil { + return nil, &os.PathError{Op: "securejoin.OpenInRoot", Path: unsafePath, Err: err} + } + return handle, nil +} + +// OpenInRoot safely opens the provided unsafePath within the root. +// Effectively, OpenInRoot(root, unsafePath) is equivalent to +// +// path, _ := securejoin.SecureJoin(root, unsafePath) +// handle, err := os.OpenFile(path, unix.O_PATH|unix.O_CLOEXEC) +// +// But is much safer. The above implementation is unsafe because if an attacker +// can modify the filesystem tree between [SecureJoin] and [os.OpenFile], it is +// possible for the returned file to be outside of the root. +// +// Note that the returned handle is an O_PATH handle, meaning that only a very +// limited set of operations will work on the handle. This is done to avoid +// accidentally opening an untrusted file that could cause issues (such as a +// disconnected TTY that could cause a DoS, or some other issue). In order to +// use the returned handle, you can "upgrade" it to a proper handle using +// [Reopen]. +func OpenInRoot(root, unsafePath string) (*os.File, error) { + rootDir, err := os.OpenFile(root, unix.O_PATH|unix.O_DIRECTORY|unix.O_CLOEXEC, 0) + if err != nil { + return nil, err + } + defer rootDir.Close() + return OpenatInRoot(rootDir, unsafePath) +} + +// Reopen takes an *[os.File] handle and re-opens it through /proc/self/fd. +// Reopen(file, flags) is effectively equivalent to +// +// fdPath := fmt.Sprintf("/proc/self/fd/%d", file.Fd()) +// os.OpenFile(fdPath, flags|unix.O_CLOEXEC) +// +// But with some extra hardenings to ensure that we are not tricked by a +// maliciously-configured /proc mount. While this attack scenario is not +// common, in container runtimes it is possible for higher-level runtimes to be +// tricked into configuring an unsafe /proc that can be used to attack file +// operations. See [CVE-2019-19921] for more details. +// +// [CVE-2019-19921]: https://github.com/advisories/GHSA-fh74-hm69-rqjw +func Reopen(handle *os.File, flags int) (*os.File, error) { + procRoot, err := getProcRoot() + if err != nil { + return nil, err + } + + // We can't operate on /proc/thread-self/fd/$n directly when doing a + // re-open, so we need to open /proc/thread-self/fd and then open a single + // final component. + procFdDir, closer, err := procThreadSelf(procRoot, "fd/") + if err != nil { + return nil, fmt.Errorf("get safe /proc/thread-self/fd handle: %w", err) + } + defer procFdDir.Close() + defer closer() + + // Try to detect if there is a mount on top of the magic-link we are about + // to open. If we are using unsafeHostProcRoot(), this could change after + // we check it (and there's nothing we can do about that) but for + // privateProcRoot() this should be guaranteed to be safe (at least since + // Linux 5.12[1], when anonymous mount namespaces were completely isolated + // from external mounts including mount propagation events). + // + // [1]: Linux commit ee2e3f50629f ("mount: fix mounting of detached mounts + // onto targets that reside on shared mounts"). + fdStr := strconv.Itoa(int(handle.Fd())) + if err := checkSymlinkOvermount(procRoot, procFdDir, fdStr); err != nil { + return nil, fmt.Errorf("check safety of /proc/thread-self/fd/%s magiclink: %w", fdStr, err) + } + + flags |= unix.O_CLOEXEC + // Rather than just wrapping openatFile, open-code it so we can copy + // handle.Name(). + reopenFd, err := unix.Openat(int(procFdDir.Fd()), fdStr, flags, 0) + if err != nil { + return nil, fmt.Errorf("reopen fd %d: %w", handle.Fd(), err) + } + return os.NewFile(uintptr(reopenFd), handle.Name()), nil +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/openat2_linux.go b/vendor/github.com/cyphar/filepath-securejoin/openat2_linux.go new file mode 100644 index 000000000..ae3b381ef --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/openat2_linux.go @@ -0,0 +1,128 @@ +//go:build linux + +// Copyright (C) 2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "strings" + "sync" + + "golang.org/x/sys/unix" +) + +var hasOpenat2 = sync.OnceValue(func() bool { + fd, err := unix.Openat2(unix.AT_FDCWD, ".", &unix.OpenHow{ + Flags: unix.O_PATH | unix.O_CLOEXEC, + Resolve: unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_IN_ROOT, + }) + if err != nil { + return false + } + _ = unix.Close(fd) + return true +}) + +func scopedLookupShouldRetry(how *unix.OpenHow, err error) bool { + // RESOLVE_IN_ROOT (and RESOLVE_BENEATH) can return -EAGAIN if we resolve + // ".." while a mount or rename occurs anywhere on the system. This could + // happen spuriously, or as the result of an attacker trying to mess with + // us during lookup. + // + // In addition, scoped lookups have a "safety check" at the end of + // complete_walk which will return -EXDEV if the final path is not in the + // root. + return how.Resolve&(unix.RESOLVE_IN_ROOT|unix.RESOLVE_BENEATH) != 0 && + (errors.Is(err, unix.EAGAIN) || errors.Is(err, unix.EXDEV)) +} + +const scopedLookupMaxRetries = 10 + +func openat2File(dir *os.File, path string, how *unix.OpenHow) (*os.File, error) { + fullPath := dir.Name() + "/" + path + // Make sure we always set O_CLOEXEC. + how.Flags |= unix.O_CLOEXEC + var tries int + for tries < scopedLookupMaxRetries { + fd, err := unix.Openat2(int(dir.Fd()), path, how) + if err != nil { + if scopedLookupShouldRetry(how, err) { + // We retry a couple of times to avoid the spurious errors, and + // if we are being attacked then returning -EAGAIN is the best + // we can do. + tries++ + continue + } + return nil, &os.PathError{Op: "openat2", Path: fullPath, Err: err} + } + // If we are using RESOLVE_IN_ROOT, the name we generated may be wrong. + // NOTE: The procRoot code MUST NOT use RESOLVE_IN_ROOT, otherwise + // you'll get infinite recursion here. + if how.Resolve&unix.RESOLVE_IN_ROOT == unix.RESOLVE_IN_ROOT { + if actualPath, err := rawProcSelfFdReadlink(fd); err == nil { + fullPath = actualPath + } + } + return os.NewFile(uintptr(fd), fullPath), nil + } + return nil, &os.PathError{Op: "openat2", Path: fullPath, Err: errPossibleAttack} +} + +func lookupOpenat2(root *os.File, unsafePath string, partial bool) (*os.File, string, error) { + if !partial { + file, err := openat2File(root, unsafePath, &unix.OpenHow{ + Flags: unix.O_PATH | unix.O_CLOEXEC, + Resolve: unix.RESOLVE_IN_ROOT | unix.RESOLVE_NO_MAGICLINKS, + }) + return file, "", err + } + return partialLookupOpenat2(root, unsafePath) +} + +// partialLookupOpenat2 is an alternative implementation of +// partialLookupInRoot, using openat2(RESOLVE_IN_ROOT) to more safely get a +// handle to the deepest existing child of the requested path within the root. +func partialLookupOpenat2(root *os.File, unsafePath string) (*os.File, string, error) { + // TODO: Implement this as a git-bisect-like binary search. + + unsafePath = filepath.ToSlash(unsafePath) // noop + endIdx := len(unsafePath) + var lastError error + for endIdx > 0 { + subpath := unsafePath[:endIdx] + + handle, err := openat2File(root, subpath, &unix.OpenHow{ + Flags: unix.O_PATH | unix.O_CLOEXEC, + Resolve: unix.RESOLVE_IN_ROOT | unix.RESOLVE_NO_MAGICLINKS, + }) + if err == nil { + // Jump over the slash if we have a non-"" remainingPath. + if endIdx < len(unsafePath) { + endIdx += 1 + } + // We found a subpath! + return handle, unsafePath[endIdx:], lastError + } + if errors.Is(err, unix.ENOENT) || errors.Is(err, unix.ENOTDIR) { + // That path doesn't exist, let's try the next directory up. + endIdx = strings.LastIndexByte(subpath, '/') + lastError = err + continue + } + return nil, "", fmt.Errorf("open subpath: %w", err) + } + // If we couldn't open anything, the whole subpath is missing. Return a + // copy of the root fd so that the caller doesn't close this one by + // accident. + rootClone, err := dupFile(root) + if err != nil { + return nil, "", err + } + return rootClone, unsafePath, lastError +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/openat_linux.go b/vendor/github.com/cyphar/filepath-securejoin/openat_linux.go new file mode 100644 index 000000000..949fb5f2d --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/openat_linux.go @@ -0,0 +1,59 @@ +//go:build linux + +// Copyright (C) 2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "os" + "path/filepath" + + "golang.org/x/sys/unix" +) + +func dupFile(f *os.File) (*os.File, error) { + fd, err := unix.FcntlInt(f.Fd(), unix.F_DUPFD_CLOEXEC, 0) + if err != nil { + return nil, os.NewSyscallError("fcntl(F_DUPFD_CLOEXEC)", err) + } + return os.NewFile(uintptr(fd), f.Name()), nil +} + +func openatFile(dir *os.File, path string, flags int, mode int) (*os.File, error) { + // Make sure we always set O_CLOEXEC. + flags |= unix.O_CLOEXEC + fd, err := unix.Openat(int(dir.Fd()), path, flags, uint32(mode)) + if err != nil { + return nil, &os.PathError{Op: "openat", Path: dir.Name() + "/" + path, Err: err} + } + // All of the paths we use with openatFile(2) are guaranteed to be + // lexically safe, so we can use path.Join here. + fullPath := filepath.Join(dir.Name(), path) + return os.NewFile(uintptr(fd), fullPath), nil +} + +func fstatatFile(dir *os.File, path string, flags int) (unix.Stat_t, error) { + var stat unix.Stat_t + if err := unix.Fstatat(int(dir.Fd()), path, &stat, flags); err != nil { + return stat, &os.PathError{Op: "fstatat", Path: dir.Name() + "/" + path, Err: err} + } + return stat, nil +} + +func readlinkatFile(dir *os.File, path string) (string, error) { + size := 4096 + for { + linkBuf := make([]byte, size) + n, err := unix.Readlinkat(int(dir.Fd()), path, linkBuf) + if err != nil { + return "", &os.PathError{Op: "readlinkat", Path: dir.Name() + "/" + path, Err: err} + } + if n != size { + return string(linkBuf[:n]), nil + } + // Possible truncation, resize the buffer. + size *= 2 + } +} diff --git a/vendor/github.com/cyphar/filepath-securejoin/procfs_linux.go b/vendor/github.com/cyphar/filepath-securejoin/procfs_linux.go new file mode 100644 index 000000000..8cc827d70 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/procfs_linux.go @@ -0,0 +1,440 @@ +//go:build linux + +// Copyright (C) 2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import ( + "errors" + "fmt" + "os" + "runtime" + "strconv" + "sync" + + "golang.org/x/sys/unix" +) + +func fstat(f *os.File) (unix.Stat_t, error) { + var stat unix.Stat_t + if err := unix.Fstat(int(f.Fd()), &stat); err != nil { + return stat, &os.PathError{Op: "fstat", Path: f.Name(), Err: err} + } + return stat, nil +} + +func fstatfs(f *os.File) (unix.Statfs_t, error) { + var statfs unix.Statfs_t + if err := unix.Fstatfs(int(f.Fd()), &statfs); err != nil { + return statfs, &os.PathError{Op: "fstatfs", Path: f.Name(), Err: err} + } + return statfs, nil +} + +// The kernel guarantees that the root inode of a procfs mount has an +// f_type of PROC_SUPER_MAGIC and st_ino of PROC_ROOT_INO. +const ( + procSuperMagic = 0x9fa0 // PROC_SUPER_MAGIC + procRootIno = 1 // PROC_ROOT_INO +) + +func verifyProcRoot(procRoot *os.File) error { + if statfs, err := fstatfs(procRoot); err != nil { + return err + } else if statfs.Type != procSuperMagic { + return fmt.Errorf("%w: incorrect procfs root filesystem type 0x%x", errUnsafeProcfs, statfs.Type) + } + if stat, err := fstat(procRoot); err != nil { + return err + } else if stat.Ino != procRootIno { + return fmt.Errorf("%w: incorrect procfs root inode number %d", errUnsafeProcfs, stat.Ino) + } + return nil +} + +var hasNewMountApi = sync.OnceValue(func() bool { + // All of the pieces of the new mount API we use (fsopen, fsconfig, + // fsmount, open_tree) were added together in Linux 5.1[1,2], so we can + // just check for one of the syscalls and the others should also be + // available. + // + // Just try to use open_tree(2) to open a file without OPEN_TREE_CLONE. + // This is equivalent to openat(2), but tells us if open_tree is + // available (and thus all of the other basic new mount API syscalls). + // open_tree(2) is most light-weight syscall to test here. + // + // [1]: merge commit 400913252d09 + // [2]: + fd, err := unix.OpenTree(-int(unix.EBADF), "/", unix.OPEN_TREE_CLOEXEC) + if err != nil { + return false + } + _ = unix.Close(fd) + return true +}) + +func fsopen(fsName string, flags int) (*os.File, error) { + // Make sure we always set O_CLOEXEC. + flags |= unix.FSOPEN_CLOEXEC + fd, err := unix.Fsopen(fsName, flags) + if err != nil { + return nil, os.NewSyscallError("fsopen "+fsName, err) + } + return os.NewFile(uintptr(fd), "fscontext:"+fsName), nil +} + +func fsmount(ctx *os.File, flags, mountAttrs int) (*os.File, error) { + // Make sure we always set O_CLOEXEC. + flags |= unix.FSMOUNT_CLOEXEC + fd, err := unix.Fsmount(int(ctx.Fd()), flags, mountAttrs) + if err != nil { + return nil, os.NewSyscallError("fsmount "+ctx.Name(), err) + } + return os.NewFile(uintptr(fd), "fsmount:"+ctx.Name()), nil +} + +func newPrivateProcMount() (*os.File, error) { + procfsCtx, err := fsopen("proc", unix.FSOPEN_CLOEXEC) + if err != nil { + return nil, err + } + defer procfsCtx.Close() + + // Try to configure hidepid=ptraceable,subset=pid if possible, but ignore errors. + _ = unix.FsconfigSetString(int(procfsCtx.Fd()), "hidepid", "ptraceable") + _ = unix.FsconfigSetString(int(procfsCtx.Fd()), "subset", "pid") + + // Get an actual handle. + if err := unix.FsconfigCreate(int(procfsCtx.Fd())); err != nil { + return nil, os.NewSyscallError("fsconfig create procfs", err) + } + return fsmount(procfsCtx, unix.FSMOUNT_CLOEXEC, unix.MS_RDONLY|unix.MS_NODEV|unix.MS_NOEXEC|unix.MS_NOSUID) +} + +func openTree(dir *os.File, path string, flags uint) (*os.File, error) { + dirFd := -int(unix.EBADF) + dirName := "." + if dir != nil { + dirFd = int(dir.Fd()) + dirName = dir.Name() + } + // Make sure we always set O_CLOEXEC. + flags |= unix.OPEN_TREE_CLOEXEC + fd, err := unix.OpenTree(dirFd, path, flags) + if err != nil { + return nil, &os.PathError{Op: "open_tree", Path: path, Err: err} + } + return os.NewFile(uintptr(fd), dirName+"/"+path), nil +} + +func clonePrivateProcMount() (_ *os.File, Err error) { + // Try to make a clone without using AT_RECURSIVE if we can. If this works, + // we can be sure there are no over-mounts and so if the root is valid then + // we're golden. Otherwise, we have to deal with over-mounts. + procfsHandle, err := openTree(nil, "/proc", unix.OPEN_TREE_CLONE) + if err != nil || hookForcePrivateProcRootOpenTreeAtRecursive(procfsHandle) { + procfsHandle, err = openTree(nil, "/proc", unix.OPEN_TREE_CLONE|unix.AT_RECURSIVE) + } + if err != nil { + return nil, fmt.Errorf("creating a detached procfs clone: %w", err) + } + defer func() { + if Err != nil { + _ = procfsHandle.Close() + } + }() + if err := verifyProcRoot(procfsHandle); err != nil { + return nil, err + } + return procfsHandle, nil +} + +func privateProcRoot() (*os.File, error) { + if !hasNewMountApi() || hookForceGetProcRootUnsafe() { + return nil, fmt.Errorf("new mount api: %w", unix.ENOTSUP) + } + // Try to create a new procfs mount from scratch if we can. This ensures we + // can get a procfs mount even if /proc is fake (for whatever reason). + procRoot, err := newPrivateProcMount() + if err != nil || hookForcePrivateProcRootOpenTree(procRoot) { + // Try to clone /proc then... + procRoot, err = clonePrivateProcMount() + } + return procRoot, err +} + +func unsafeHostProcRoot() (_ *os.File, Err error) { + procRoot, err := os.OpenFile("/proc", unix.O_PATH|unix.O_NOFOLLOW|unix.O_DIRECTORY|unix.O_CLOEXEC, 0) + if err != nil { + return nil, err + } + defer func() { + if Err != nil { + _ = procRoot.Close() + } + }() + if err := verifyProcRoot(procRoot); err != nil { + return nil, err + } + return procRoot, nil +} + +func doGetProcRoot() (*os.File, error) { + procRoot, err := privateProcRoot() + if err != nil { + // Fall back to using a /proc handle if making a private mount failed. + // If we have openat2, at least we can avoid some kinds of over-mount + // attacks, but without openat2 there's not much we can do. + procRoot, err = unsafeHostProcRoot() + } + return procRoot, err +} + +var getProcRoot = sync.OnceValues(func() (*os.File, error) { + return doGetProcRoot() +}) + +var hasProcThreadSelf = sync.OnceValue(func() bool { + return unix.Access("/proc/thread-self/", unix.F_OK) == nil +}) + +var errUnsafeProcfs = errors.New("unsafe procfs detected") + +type procThreadSelfCloser func() + +// procThreadSelf returns a handle to /proc/thread-self/ (or an +// equivalent handle on older kernels where /proc/thread-self doesn't exist). +// Once finished with the handle, you must call the returned closer function +// (runtime.UnlockOSThread). You must not pass the returned *os.File to other +// Go threads or use the handle after calling the closer. +// +// This is similar to ProcThreadSelf from runc, but with extra hardening +// applied and using *os.File. +func procThreadSelf(procRoot *os.File, subpath string) (_ *os.File, _ procThreadSelfCloser, Err error) { + // We need to lock our thread until the caller is done with the handle + // because between getting the handle and using it we could get interrupted + // by the Go runtime and hit the case where the underlying thread is + // swapped out and the original thread is killed, resulting in + // pull-your-hair-out-hard-to-debug issues in the caller. + runtime.LockOSThread() + defer func() { + if Err != nil { + runtime.UnlockOSThread() + } + }() + + // Figure out what prefix we want to use. + threadSelf := "thread-self/" + if !hasProcThreadSelf() || hookForceProcSelfTask() { + /// Pre-3.17 kernels don't have /proc/thread-self, so do it manually. + threadSelf = "self/task/" + strconv.Itoa(unix.Gettid()) + "/" + if _, err := fstatatFile(procRoot, threadSelf, unix.AT_SYMLINK_NOFOLLOW); err != nil || hookForceProcSelf() { + // In this case, we running in a pid namespace that doesn't match + // the /proc mount we have. This can happen inside runc. + // + // Unfortunately, there is no nice way to get the correct TID to + // use here because of the age of the kernel, so we have to just + // use /proc/self and hope that it works. + threadSelf = "self/" + } + } + + // Grab the handle. + var ( + handle *os.File + err error + ) + if hasOpenat2() { + // We prefer being able to use RESOLVE_NO_XDEV if we can, to be + // absolutely sure we are operating on a clean /proc handle that + // doesn't have any cheeky overmounts that could trick us (including + // symlink mounts on top of /proc/thread-self). RESOLVE_BENEATH isn't + // strictly needed, but just use it since we have it. + // + // NOTE: /proc/self is technically a magic-link (the contents of the + // symlink are generated dynamically), but it doesn't use + // nd_jump_link() so RESOLVE_NO_MAGICLINKS allows it. + // + // NOTE: We MUST NOT use RESOLVE_IN_ROOT here, as openat2File uses + // procSelfFdReadlink to clean up the returned f.Name() if we use + // RESOLVE_IN_ROOT (which would lead to an infinite recursion). + handle, err = openat2File(procRoot, threadSelf+subpath, &unix.OpenHow{ + Flags: unix.O_PATH | unix.O_NOFOLLOW | unix.O_CLOEXEC, + Resolve: unix.RESOLVE_BENEATH | unix.RESOLVE_NO_XDEV | unix.RESOLVE_NO_MAGICLINKS, + }) + if err != nil { + return nil, nil, fmt.Errorf("%w: %w", errUnsafeProcfs, err) + } + } else { + handle, err = openatFile(procRoot, threadSelf+subpath, unix.O_PATH|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0) + if err != nil { + return nil, nil, fmt.Errorf("%w: %w", errUnsafeProcfs, err) + } + defer func() { + if Err != nil { + _ = handle.Close() + } + }() + // We can't detect bind-mounts of different parts of procfs on top of + // /proc (a-la RESOLVE_NO_XDEV), but we can at least be sure that we + // aren't on the wrong filesystem here. + if statfs, err := fstatfs(handle); err != nil { + return nil, nil, err + } else if statfs.Type != procSuperMagic { + return nil, nil, fmt.Errorf("%w: incorrect /proc/self/fd filesystem type 0x%x", errUnsafeProcfs, statfs.Type) + } + } + return handle, runtime.UnlockOSThread, nil +} + +var hasStatxMountId = sync.OnceValue(func() bool { + var ( + stx unix.Statx_t + // We don't care which mount ID we get. The kernel will give us the + // unique one if it is supported. + wantStxMask uint32 = unix.STATX_MNT_ID_UNIQUE | unix.STATX_MNT_ID + ) + err := unix.Statx(-int(unix.EBADF), "/", 0, int(wantStxMask), &stx) + return err == nil && stx.Mask&wantStxMask != 0 +}) + +func getMountId(dir *os.File, path string) (uint64, error) { + // If we don't have statx(STATX_MNT_ID*) support, we can't do anything. + if !hasStatxMountId() { + return 0, nil + } + + var ( + stx unix.Statx_t + // We don't care which mount ID we get. The kernel will give us the + // unique one if it is supported. + wantStxMask uint32 = unix.STATX_MNT_ID_UNIQUE | unix.STATX_MNT_ID + ) + + err := unix.Statx(int(dir.Fd()), path, unix.AT_EMPTY_PATH|unix.AT_SYMLINK_NOFOLLOW, int(wantStxMask), &stx) + if stx.Mask&wantStxMask == 0 { + // It's not a kernel limitation, for some reason we couldn't get a + // mount ID. Assume it's some kind of attack. + err = fmt.Errorf("%w: could not get mount id", errUnsafeProcfs) + } + if err != nil { + return 0, &os.PathError{Op: "statx(STATX_MNT_ID_...)", Path: dir.Name() + "/" + path, Err: err} + } + return stx.Mnt_id, nil +} + +func checkSymlinkOvermount(procRoot *os.File, dir *os.File, path string) error { + // Get the mntId of our procfs handle. + expectedMountId, err := getMountId(procRoot, "") + if err != nil { + return err + } + // Get the mntId of the target magic-link. + gotMountId, err := getMountId(dir, path) + if err != nil { + return err + } + // As long as the directory mount is alive, even with wrapping mount IDs, + // we would expect to see a different mount ID here. (Of course, if we're + // using unsafeHostProcRoot() then an attaker could change this after we + // did this check.) + if expectedMountId != gotMountId { + return fmt.Errorf("%w: symlink %s/%s has an overmount obscuring the real link (mount ids do not match %d != %d)", errUnsafeProcfs, dir.Name(), path, expectedMountId, gotMountId) + } + return nil +} + +func doRawProcSelfFdReadlink(procRoot *os.File, fd int) (string, error) { + fdPath := fmt.Sprintf("fd/%d", fd) + procFdLink, closer, err := procThreadSelf(procRoot, fdPath) + if err != nil { + return "", fmt.Errorf("get safe /proc/thread-self/%s handle: %w", fdPath, err) + } + defer procFdLink.Close() + defer closer() + + // Try to detect if there is a mount on top of the magic-link. Since we use the handle directly + // provide to the closure. If the closure uses the handle directly, this + // should be safe in general (a mount on top of the path afterwards would + // not affect the handle itself) and will definitely be safe if we are + // using privateProcRoot() (at least since Linux 5.12[1], when anonymous + // mount namespaces were completely isolated from external mounts including + // mount propagation events). + // + // [1]: Linux commit ee2e3f50629f ("mount: fix mounting of detached mounts + // onto targets that reside on shared mounts"). + if err := checkSymlinkOvermount(procRoot, procFdLink, ""); err != nil { + return "", fmt.Errorf("check safety of /proc/thread-self/fd/%d magiclink: %w", fd, err) + } + + // readlinkat implies AT_EMPTY_PATH since Linux 2.6.39. See Linux commit + // 65cfc6722361 ("readlinkat(), fchownat() and fstatat() with empty + // relative pathnames"). + return readlinkatFile(procFdLink, "") +} + +func rawProcSelfFdReadlink(fd int) (string, error) { + procRoot, err := getProcRoot() + if err != nil { + return "", err + } + return doRawProcSelfFdReadlink(procRoot, fd) +} + +func procSelfFdReadlink(f *os.File) (string, error) { + return rawProcSelfFdReadlink(int(f.Fd())) +} + +var ( + errPossibleBreakout = errors.New("possible breakout detected") + errInvalidDirectory = errors.New("wandered into deleted directory") + errDeletedInode = errors.New("cannot verify path of deleted inode") +) + +func isDeadInode(file *os.File) error { + // If the nlink of a file drops to 0, there is an attacker deleting + // directories during our walk, which could result in weird /proc values. + // It's better to error out in this case. + stat, err := fstat(file) + if err != nil { + return fmt.Errorf("check for dead inode: %w", err) + } + if stat.Nlink == 0 { + err := errDeletedInode + if stat.Mode&unix.S_IFMT == unix.S_IFDIR { + err = errInvalidDirectory + } + return fmt.Errorf("%w %q", err, file.Name()) + } + return nil +} + +func checkProcSelfFdPath(path string, file *os.File) error { + if err := isDeadInode(file); err != nil { + return err + } + actualPath, err := procSelfFdReadlink(file) + if err != nil { + return fmt.Errorf("get path of handle: %w", err) + } + if actualPath != path { + return fmt.Errorf("%w: handle path %q doesn't match expected path %q", errPossibleBreakout, actualPath, path) + } + return nil +} + +// Test hooks used in the procfs tests to verify that the fallback logic works. +// See testing_mocks_linux_test.go and procfs_linux_test.go for more details. +var ( + hookForcePrivateProcRootOpenTree = hookDummyFile + hookForcePrivateProcRootOpenTreeAtRecursive = hookDummyFile + hookForceGetProcRootUnsafe = hookDummy + + hookForceProcSelfTask = hookDummy + hookForceProcSelf = hookDummy +) + +func hookDummy() bool { return false } +func hookDummyFile(_ *os.File) bool { return false } diff --git a/vendor/github.com/cyphar/filepath-securejoin/vfs.go b/vendor/github.com/cyphar/filepath-securejoin/vfs.go new file mode 100644 index 000000000..36373f8c5 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/vfs.go @@ -0,0 +1,35 @@ +// Copyright (C) 2017-2024 SUSE LLC. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package securejoin + +import "os" + +// In future this should be moved into a separate package, because now there +// are several projects (umoci and go-mtree) that are using this sort of +// interface. + +// VFS is the minimal interface necessary to use [SecureJoinVFS]. A nil VFS is +// equivalent to using the standard [os].* family of functions. This is mainly +// used for the purposes of mock testing, but also can be used to otherwise use +// [SecureJoinVFS] with VFS-like system. +type VFS interface { + // Lstat returns an [os.FileInfo] describing the named file. If the + // file is a symbolic link, the returned [os.FileInfo] describes the + // symbolic link. Lstat makes no attempt to follow the link. + // The semantics are identical to [os.Lstat]. + Lstat(name string) (os.FileInfo, error) + + // Readlink returns the destination of the named symbolic link. + // The semantics are identical to [os.Readlink]. + Readlink(name string) (string, error) +} + +// osVFS is the "nil" VFS, in that it just passes everything through to the os +// module. +type osVFS struct{} + +func (o osVFS) Lstat(name string) (os.FileInfo, error) { return os.Lstat(name) } + +func (o osVFS) Readlink(name string) (string, error) { return os.Readlink(name) } diff --git a/vendor/github.com/distribution/reference/.gitattributes b/vendor/github.com/distribution/reference/.gitattributes new file mode 100644 index 000000000..d207b1802 --- /dev/null +++ b/vendor/github.com/distribution/reference/.gitattributes @@ -0,0 +1 @@ +*.go text eol=lf diff --git a/vendor/github.com/distribution/reference/.gitignore b/vendor/github.com/distribution/reference/.gitignore new file mode 100644 index 000000000..dc07e6b04 --- /dev/null +++ b/vendor/github.com/distribution/reference/.gitignore @@ -0,0 +1,2 @@ +# Cover profiles +*.out diff --git a/vendor/github.com/distribution/reference/.golangci.yml b/vendor/github.com/distribution/reference/.golangci.yml new file mode 100644 index 000000000..793f0bb7e --- /dev/null +++ b/vendor/github.com/distribution/reference/.golangci.yml @@ -0,0 +1,18 @@ +linters: + enable: + - bodyclose + - dupword # Checks for duplicate words in the source code + - gofmt + - goimports + - ineffassign + - misspell + - revive + - staticcheck + - unconvert + - unused + - vet + disable: + - errcheck + +run: + deadline: 2m diff --git a/vendor/github.com/distribution/reference/CODE-OF-CONDUCT.md b/vendor/github.com/distribution/reference/CODE-OF-CONDUCT.md new file mode 100644 index 000000000..48f6704c6 --- /dev/null +++ b/vendor/github.com/distribution/reference/CODE-OF-CONDUCT.md @@ -0,0 +1,5 @@ +# Code of Conduct + +We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). + +Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) in order to report violations of the Code of Conduct. diff --git a/vendor/github.com/distribution/reference/CONTRIBUTING.md b/vendor/github.com/distribution/reference/CONTRIBUTING.md new file mode 100644 index 000000000..ab2194665 --- /dev/null +++ b/vendor/github.com/distribution/reference/CONTRIBUTING.md @@ -0,0 +1,114 @@ +# Contributing to the reference library + +## Community help + +If you need help, please ask in the [#distribution](https://cloud-native.slack.com/archives/C01GVR8SY4R) channel on CNCF community slack. +[Click here for an invite to the CNCF community slack](https://slack.cncf.io/) + +## Reporting security issues + +The maintainers take security seriously. If you discover a security +issue, please bring it to their attention right away! + +Please **DO NOT** file a public issue, instead send your report privately to +[cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io). + +## Reporting an issue properly + +By following these simple rules you will get better and faster feedback on your issue. + + - search the bugtracker for an already reported issue + +### If you found an issue that describes your problem: + + - please read other user comments first, and confirm this is the same issue: a given error condition might be indicative of different problems - you may also find a workaround in the comments + - please refrain from adding "same thing here" or "+1" comments + - you don't need to comment on an issue to get notified of updates: just hit the "subscribe" button + - comment if you have some new, technical and relevant information to add to the case + - __DO NOT__ comment on closed issues or merged PRs. If you think you have a related problem, open up a new issue and reference the PR or issue. + +### If you have not found an existing issue that describes your problem: + + 1. create a new issue, with a succinct title that describes your issue: + - bad title: "It doesn't work with my docker" + - good title: "Private registry push fail: 400 error with E_INVALID_DIGEST" + 2. copy the output of (or similar for other container tools): + - `docker version` + - `docker info` + - `docker exec registry --version` + 3. copy the command line you used to launch your Registry + 4. restart your docker daemon in debug mode (add `-D` to the daemon launch arguments) + 5. reproduce your problem and get your docker daemon logs showing the error + 6. if relevant, copy your registry logs that show the error + 7. provide any relevant detail about your specific Registry configuration (e.g., storage backend used) + 8. indicate if you are using an enterprise proxy, Nginx, or anything else between you and your Registry + +## Contributing Code + +Contributions should be made via pull requests. Pull requests will be reviewed +by one or more maintainers or reviewers and merged when acceptable. + +You should follow the basic GitHub workflow: + + 1. Use your own [fork](https://help.github.com/en/articles/about-forks) + 2. Create your [change](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#successful-changes) + 3. Test your code + 4. [Commit](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#commit-messages) your work, always [sign your commits](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#commit-messages) + 5. Push your change to your fork and create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) + +Refer to [containerd's contribution guide](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#successful-changes) +for tips on creating a successful contribution. + +## Sign your work + +The sign-off is a simple line at the end of the explanation for the patch. Your +signature certifies that you wrote the patch or otherwise have the right to pass +it on as an open-source patch. The rules are pretty simple: if you can certify +the below (from [developercertificate.org](http://developercertificate.org/)): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +Then you just add a line to every git commit message: + + Signed-off-by: Joe Smith + +Use your real name (sorry, no pseudonyms or anonymous contributions.) + +If you set your `user.name` and `user.email` git configs, you can sign your +commit automatically with `git commit -s`. diff --git a/vendor/github.com/distribution/reference/GOVERNANCE.md b/vendor/github.com/distribution/reference/GOVERNANCE.md new file mode 100644 index 000000000..200045b05 --- /dev/null +++ b/vendor/github.com/distribution/reference/GOVERNANCE.md @@ -0,0 +1,144 @@ +# distribution/reference Project Governance + +Distribution [Code of Conduct](./CODE-OF-CONDUCT.md) can be found here. + +For specific guidance on practical contribution steps please +see our [CONTRIBUTING.md](./CONTRIBUTING.md) guide. + +## Maintainership + +There are different types of maintainers, with different responsibilities, but +all maintainers have 3 things in common: + +1) They share responsibility in the project's success. +2) They have made a long-term, recurring time investment to improve the project. +3) They spend that time doing whatever needs to be done, not necessarily what +is the most interesting or fun. + +Maintainers are often under-appreciated, because their work is harder to appreciate. +It's easy to appreciate a really cool and technically advanced feature. It's harder +to appreciate the absence of bugs, the slow but steady improvement in stability, +or the reliability of a release process. But those things distinguish a good +project from a great one. + +## Reviewers + +A reviewer is a core role within the project. +They share in reviewing issues and pull requests and their LGTM counts towards the +required LGTM count to merge a code change into the project. + +Reviewers are part of the organization but do not have write access. +Becoming a reviewer is a core aspect in the journey to becoming a maintainer. + +## Adding maintainers + +Maintainers are first and foremost contributors that have shown they are +committed to the long term success of a project. Contributors wanting to become +maintainers are expected to be deeply involved in contributing code, pull +request review, and triage of issues in the project for more than three months. + +Just contributing does not make you a maintainer, it is about building trust +with the current maintainers of the project and being a person that they can +depend on and trust to make decisions in the best interest of the project. + +Periodically, the existing maintainers curate a list of contributors that have +shown regular activity on the project over the prior months. From this list, +maintainer candidates are selected and proposed in a pull request or a +maintainers communication channel. + +After a candidate has been announced to the maintainers, the existing +maintainers are given five business days to discuss the candidate, raise +objections and cast their vote. Votes may take place on the communication +channel or via pull request comment. Candidates must be approved by at least 66% +of the current maintainers by adding their vote on the mailing list. The +reviewer role has the same process but only requires 33% of current maintainers. +Only maintainers of the repository that the candidate is proposed for are +allowed to vote. + +If a candidate is approved, a maintainer will contact the candidate to invite +the candidate to open a pull request that adds the contributor to the +MAINTAINERS file. The voting process may take place inside a pull request if a +maintainer has already discussed the candidacy with the candidate and a +maintainer is willing to be a sponsor by opening the pull request. The candidate +becomes a maintainer once the pull request is merged. + +## Stepping down policy + +Life priorities, interests, and passions can change. If you're a maintainer but +feel you must remove yourself from the list, inform other maintainers that you +intend to step down, and if possible, help find someone to pick up your work. +At the very least, ensure your work can be continued where you left off. + +After you've informed other maintainers, create a pull request to remove +yourself from the MAINTAINERS file. + +## Removal of inactive maintainers + +Similar to the procedure for adding new maintainers, existing maintainers can +be removed from the list if they do not show significant activity on the +project. Periodically, the maintainers review the list of maintainers and their +activity over the last three months. + +If a maintainer has shown insufficient activity over this period, a neutral +person will contact the maintainer to ask if they want to continue being +a maintainer. If the maintainer decides to step down as a maintainer, they +open a pull request to be removed from the MAINTAINERS file. + +If the maintainer wants to remain a maintainer, but is unable to perform the +required duties they can be removed with a vote of at least 66% of the current +maintainers. In this case, maintainers should first propose the change to +maintainers via the maintainers communication channel, then open a pull request +for voting. The voting period is five business days. The voting pull request +should not come as a surpise to any maintainer and any discussion related to +performance must not be discussed on the pull request. + +## How are decisions made? + +Docker distribution is an open-source project with an open design philosophy. +This means that the repository is the source of truth for EVERY aspect of the +project, including its philosophy, design, road map, and APIs. *If it's part of +the project, it's in the repo. If it's in the repo, it's part of the project.* + +As a result, all decisions can be expressed as changes to the repository. An +implementation change is a change to the source code. An API change is a change +to the API specification. A philosophy change is a change to the philosophy +manifesto, and so on. + +All decisions affecting distribution, big and small, follow the same 3 steps: + +* Step 1: Open a pull request. Anyone can do this. + +* Step 2: Discuss the pull request. Anyone can do this. + +* Step 3: Merge or refuse the pull request. Who does this depends on the nature +of the pull request and which areas of the project it affects. + +## Helping contributors with the DCO + +The [DCO or `Sign your work`](./CONTRIBUTING.md#sign-your-work) +requirement is not intended as a roadblock or speed bump. + +Some contributors are not as familiar with `git`, or have used a web +based editor, and thus asking them to `git commit --amend -s` is not the best +way forward. + +In this case, maintainers can update the commits based on clause (c) of the DCO. +The most trivial way for a contributor to allow the maintainer to do this, is to +add a DCO signature in a pull requests's comment, or a maintainer can simply +note that the change is sufficiently trivial that it does not substantially +change the existing contribution - i.e., a spelling change. + +When you add someone's DCO, please also add your own to keep a log. + +## I'm a maintainer. Should I make pull requests too? + +Yes. Nobody should ever push to master directly. All changes should be +made through a pull request. + +## Conflict Resolution + +If you have a technical dispute that you feel has reached an impasse with a +subset of the community, any contributor may open an issue, specifically +calling for a resolution vote of the current core maintainers to resolve the +dispute. The same voting quorums required (2/3) for adding and removing +maintainers will apply to conflict resolution. diff --git a/vendor/github.com/distribution/reference/LICENSE b/vendor/github.com/distribution/reference/LICENSE new file mode 100644 index 000000000..e06d20818 --- /dev/null +++ b/vendor/github.com/distribution/reference/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/vendor/github.com/distribution/reference/MAINTAINERS b/vendor/github.com/distribution/reference/MAINTAINERS new file mode 100644 index 000000000..9e0a60c8b --- /dev/null +++ b/vendor/github.com/distribution/reference/MAINTAINERS @@ -0,0 +1,26 @@ +# Distribution project maintainers & reviewers +# +# See GOVERNANCE.md for maintainer versus reviewer roles +# +# MAINTAINERS (cncf-distribution-maintainers@lists.cncf.io) +# GitHub ID, Name, Email address +"chrispat","Chris Patterson","chrispat@github.com" +"clarkbw","Bryan Clark","clarkbw@github.com" +"corhere","Cory Snider","csnider@mirantis.com" +"deleteriousEffect","Hayley Swimelar","hswimelar@gitlab.com" +"heww","He Weiwei","hweiwei@vmware.com" +"joaodrp","João Pereira","jpereira@gitlab.com" +"justincormack","Justin Cormack","justin.cormack@docker.com" +"squizzi","Kyle Squizzato","ksquizzato@mirantis.com" +"milosgajdos","Milos Gajdos","milosthegajdos@gmail.com" +"sargun","Sargun Dhillon","sargun@sargun.me" +"wy65701436","Wang Yan","wangyan@vmware.com" +"stevelasker","Steve Lasker","steve.lasker@microsoft.com" +# +# REVIEWERS +# GitHub ID, Name, Email address +"dmcgowan","Derek McGowan","derek@mcgstyle.net" +"stevvooe","Stephen Day","stevvooe@gmail.com" +"thajeztah","Sebastiaan van Stijn","github@gone.nl" +"DavidSpek", "David van der Spek", "vanderspek.david@gmail.com" +"Jamstah", "James Hewitt", "james.hewitt@gmail.com" diff --git a/vendor/github.com/distribution/reference/Makefile b/vendor/github.com/distribution/reference/Makefile new file mode 100644 index 000000000..c78576b75 --- /dev/null +++ b/vendor/github.com/distribution/reference/Makefile @@ -0,0 +1,25 @@ +# Project packages. +PACKAGES=$(shell go list ./...) + +# Flags passed to `go test` +BUILDFLAGS ?= +TESTFLAGS ?= + +.PHONY: all build test coverage +.DEFAULT: all + +all: build + +build: ## no binaries to build, so just check compilation suceeds + go build ${BUILDFLAGS} ./... + +test: ## run tests + go test ${TESTFLAGS} ./... + +coverage: ## generate coverprofiles from the unit tests + rm -f coverage.txt + go test ${TESTFLAGS} -cover -coverprofile=cover.out ./... + +.PHONY: help +help: + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_\/%-]+:.*?##/ { printf " \033[36m%-27s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) diff --git a/vendor/github.com/distribution/reference/README.md b/vendor/github.com/distribution/reference/README.md new file mode 100644 index 000000000..172a02e0b --- /dev/null +++ b/vendor/github.com/distribution/reference/README.md @@ -0,0 +1,30 @@ +# Distribution reference + +Go library to handle references to container images. + + + +[![Build Status](https://github.com/distribution/reference/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/distribution/reference/actions?query=workflow%3ACI) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/distribution/reference) +[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE) +[![codecov](https://codecov.io/gh/distribution/reference/branch/main/graph/badge.svg)](https://codecov.io/gh/distribution/reference) +[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fdistribution%2Freference.svg?type=shield)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fdistribution%2Freference?ref=badge_shield) + +This repository contains a library for handling references to container images held in container registries. Please see [godoc](https://pkg.go.dev/github.com/distribution/reference) for details. + +## Contribution + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute +issues, fixes, and patches to this project. + +## Communication + +For async communication and long running discussions please use issues and pull requests on the github repo. +This will be the best place to discuss design and implementation. + +For sync communication we have a #distribution channel in the [CNCF Slack](https://slack.cncf.io/) +that everyone is welcome to join and chat about development. + +## Licenses + +The distribution codebase is released under the [Apache 2.0 license](LICENSE). diff --git a/vendor/github.com/distribution/reference/SECURITY.md b/vendor/github.com/distribution/reference/SECURITY.md new file mode 100644 index 000000000..aaf983c0f --- /dev/null +++ b/vendor/github.com/distribution/reference/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +## Reporting a Vulnerability + +The maintainers take security seriously. If you discover a security issue, please bring it to their attention right away! + +Please DO NOT file a public issue, instead send your report privately to cncf-distribution-security@lists.cncf.io. diff --git a/vendor/github.com/distribution/reference/distribution-logo.svg b/vendor/github.com/distribution/reference/distribution-logo.svg new file mode 100644 index 000000000..cc9f4073b --- /dev/null +++ b/vendor/github.com/distribution/reference/distribution-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vendor/github.com/distribution/reference/helpers.go b/vendor/github.com/distribution/reference/helpers.go new file mode 100644 index 000000000..d10c7ef83 --- /dev/null +++ b/vendor/github.com/distribution/reference/helpers.go @@ -0,0 +1,42 @@ +package reference + +import "path" + +// IsNameOnly returns true if reference only contains a repo name. +func IsNameOnly(ref Named) bool { + if _, ok := ref.(NamedTagged); ok { + return false + } + if _, ok := ref.(Canonical); ok { + return false + } + return true +} + +// FamiliarName returns the familiar name string +// for the given named, familiarizing if needed. +func FamiliarName(ref Named) string { + if nn, ok := ref.(normalizedNamed); ok { + return nn.Familiar().Name() + } + return ref.Name() +} + +// FamiliarString returns the familiar string representation +// for the given reference, familiarizing if needed. +func FamiliarString(ref Reference) string { + if nn, ok := ref.(normalizedNamed); ok { + return nn.Familiar().String() + } + return ref.String() +} + +// FamiliarMatch reports whether ref matches the specified pattern. +// See [path.Match] for supported patterns. +func FamiliarMatch(pattern string, ref Reference) (bool, error) { + matched, err := path.Match(pattern, FamiliarString(ref)) + if namedRef, isNamed := ref.(Named); isNamed && !matched { + matched, _ = path.Match(pattern, FamiliarName(namedRef)) + } + return matched, err +} diff --git a/vendor/github.com/distribution/reference/normalize.go b/vendor/github.com/distribution/reference/normalize.go new file mode 100644 index 000000000..f4128314c --- /dev/null +++ b/vendor/github.com/distribution/reference/normalize.go @@ -0,0 +1,255 @@ +package reference + +import ( + "fmt" + "strings" + + "github.com/opencontainers/go-digest" +) + +const ( + // legacyDefaultDomain is the legacy domain for Docker Hub (which was + // originally named "the Docker Index"). This domain is still used for + // authentication and image search, which were part of the "v1" Docker + // registry specification. + // + // This domain will continue to be supported, but there are plans to consolidate + // legacy domains to new "canonical" domains. Once those domains are decided + // on, we must update the normalization functions, but preserve compatibility + // with existing installs, clients, and user configuration. + legacyDefaultDomain = "index.docker.io" + + // defaultDomain is the default domain used for images on Docker Hub. + // It is used to normalize "familiar" names to canonical names, for example, + // to convert "ubuntu" to "docker.io/library/ubuntu:latest". + // + // Note that actual domain of Docker Hub's registry is registry-1.docker.io. + // This domain will continue to be supported, but there are plans to consolidate + // legacy domains to new "canonical" domains. Once those domains are decided + // on, we must update the normalization functions, but preserve compatibility + // with existing installs, clients, and user configuration. + defaultDomain = "docker.io" + + // officialRepoPrefix is the namespace used for official images on Docker Hub. + // It is used to normalize "familiar" names to canonical names, for example, + // to convert "ubuntu" to "docker.io/library/ubuntu:latest". + officialRepoPrefix = "library/" + + // defaultTag is the default tag if no tag is provided. + defaultTag = "latest" +) + +// normalizedNamed represents a name which has been +// normalized and has a familiar form. A familiar name +// is what is used in Docker UI. An example normalized +// name is "docker.io/library/ubuntu" and corresponding +// familiar name of "ubuntu". +type normalizedNamed interface { + Named + Familiar() Named +} + +// ParseNormalizedNamed parses a string into a named reference +// transforming a familiar name from Docker UI to a fully +// qualified reference. If the value may be an identifier +// use ParseAnyReference. +func ParseNormalizedNamed(s string) (Named, error) { + if ok := anchoredIdentifierRegexp.MatchString(s); ok { + return nil, fmt.Errorf("invalid repository name (%s), cannot specify 64-byte hexadecimal strings", s) + } + domain, remainder := splitDockerDomain(s) + var remote string + if tagSep := strings.IndexRune(remainder, ':'); tagSep > -1 { + remote = remainder[:tagSep] + } else { + remote = remainder + } + if strings.ToLower(remote) != remote { + return nil, fmt.Errorf("invalid reference format: repository name (%s) must be lowercase", remote) + } + + ref, err := Parse(domain + "/" + remainder) + if err != nil { + return nil, err + } + named, isNamed := ref.(Named) + if !isNamed { + return nil, fmt.Errorf("reference %s has no name", ref.String()) + } + return named, nil +} + +// namedTaggedDigested is a reference that has both a tag and a digest. +type namedTaggedDigested interface { + NamedTagged + Digested +} + +// ParseDockerRef normalizes the image reference following the docker convention, +// which allows for references to contain both a tag and a digest. It returns a +// reference that is either tagged or digested. For references containing both +// a tag and a digest, it returns a digested reference. For example, the following +// reference: +// +// docker.io/library/busybox:latest@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa +// +// Is returned as a digested reference (with the ":latest" tag removed): +// +// docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa +// +// References that are already "tagged" or "digested" are returned unmodified: +// +// // Already a digested reference +// docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa +// +// // Already a named reference +// docker.io/library/busybox:latest +func ParseDockerRef(ref string) (Named, error) { + named, err := ParseNormalizedNamed(ref) + if err != nil { + return nil, err + } + if canonical, ok := named.(namedTaggedDigested); ok { + // The reference is both tagged and digested; only return digested. + newNamed, err := WithName(canonical.Name()) + if err != nil { + return nil, err + } + return WithDigest(newNamed, canonical.Digest()) + } + return TagNameOnly(named), nil +} + +// splitDockerDomain splits a repository name to domain and remote-name. +// If no valid domain is found, the default domain is used. Repository name +// needs to be already validated before. +func splitDockerDomain(name string) (domain, remoteName string) { + maybeDomain, maybeRemoteName, ok := strings.Cut(name, "/") + if !ok { + // Fast-path for single element ("familiar" names), such as "ubuntu" + // or "ubuntu:latest". Familiar names must be handled separately, to + // prevent them from being handled as "hostname:port". + // + // Canonicalize them as "docker.io/library/name[:tag]" + + // FIXME(thaJeztah): account for bare "localhost" or "example.com" names, which SHOULD be considered a domain. + return defaultDomain, officialRepoPrefix + name + } + + switch { + case maybeDomain == localhost: + // localhost is a reserved namespace and always considered a domain. + domain, remoteName = maybeDomain, maybeRemoteName + case maybeDomain == legacyDefaultDomain: + // canonicalize the Docker Hub and legacy "Docker Index" domains. + domain, remoteName = defaultDomain, maybeRemoteName + case strings.ContainsAny(maybeDomain, ".:"): + // Likely a domain or IP-address: + // + // - contains a "." (e.g., "example.com" or "127.0.0.1") + // - contains a ":" (e.g., "example:5000", "::1", or "[::1]:5000") + domain, remoteName = maybeDomain, maybeRemoteName + case strings.ToLower(maybeDomain) != maybeDomain: + // Uppercase namespaces are not allowed, so if the first element + // is not lowercase, we assume it to be a domain-name. + domain, remoteName = maybeDomain, maybeRemoteName + default: + // None of the above: it's not a domain, so use the default, and + // use the name input the remote-name. + domain, remoteName = defaultDomain, name + } + + if domain == defaultDomain && !strings.ContainsRune(remoteName, '/') { + // Canonicalize "familiar" names, but only on Docker Hub, not + // on other domains: + // + // "docker.io/ubuntu[:tag]" => "docker.io/library/ubuntu[:tag]" + remoteName = officialRepoPrefix + remoteName + } + + return domain, remoteName +} + +// familiarizeName returns a shortened version of the name familiar +// to the Docker UI. Familiar names have the default domain +// "docker.io" and "library/" repository prefix removed. +// For example, "docker.io/library/redis" will have the familiar +// name "redis" and "docker.io/dmcgowan/myapp" will be "dmcgowan/myapp". +// Returns a familiarized named only reference. +func familiarizeName(named namedRepository) repository { + repo := repository{ + domain: named.Domain(), + path: named.Path(), + } + + if repo.domain == defaultDomain { + repo.domain = "" + // Handle official repositories which have the pattern "library/" + if strings.HasPrefix(repo.path, officialRepoPrefix) { + // TODO(thaJeztah): this check may be too strict, as it assumes the + // "library/" namespace does not have nested namespaces. While this + // is true (currently), technically it would be possible for Docker + // Hub to use those (e.g. "library/distros/ubuntu:latest"). + // See https://github.com/distribution/distribution/pull/3769#issuecomment-1302031785. + if remainder := strings.TrimPrefix(repo.path, officialRepoPrefix); !strings.ContainsRune(remainder, '/') { + repo.path = remainder + } + } + } + return repo +} + +func (r reference) Familiar() Named { + return reference{ + namedRepository: familiarizeName(r.namedRepository), + tag: r.tag, + digest: r.digest, + } +} + +func (r repository) Familiar() Named { + return familiarizeName(r) +} + +func (t taggedReference) Familiar() Named { + return taggedReference{ + namedRepository: familiarizeName(t.namedRepository), + tag: t.tag, + } +} + +func (c canonicalReference) Familiar() Named { + return canonicalReference{ + namedRepository: familiarizeName(c.namedRepository), + digest: c.digest, + } +} + +// TagNameOnly adds the default tag "latest" to a reference if it only has +// a repo name. +func TagNameOnly(ref Named) Named { + if IsNameOnly(ref) { + namedTagged, err := WithTag(ref, defaultTag) + if err != nil { + // Default tag must be valid, to create a NamedTagged + // type with non-validated input the WithTag function + // should be used instead + panic(err) + } + return namedTagged + } + return ref +} + +// ParseAnyReference parses a reference string as a possible identifier, +// full digest, or familiar name. +func ParseAnyReference(ref string) (Reference, error) { + if ok := anchoredIdentifierRegexp.MatchString(ref); ok { + return digestReference("sha256:" + ref), nil + } + if dgst, err := digest.Parse(ref); err == nil { + return digestReference(dgst), nil + } + + return ParseNormalizedNamed(ref) +} diff --git a/vendor/github.com/distribution/reference/reference.go b/vendor/github.com/distribution/reference/reference.go new file mode 100644 index 000000000..900398bde --- /dev/null +++ b/vendor/github.com/distribution/reference/reference.go @@ -0,0 +1,432 @@ +// Package reference provides a general type to represent any way of referencing images within the registry. +// Its main purpose is to abstract tags and digests (content-addressable hash). +// +// Grammar +// +// reference := name [ ":" tag ] [ "@" digest ] +// name := [domain '/'] remote-name +// domain := host [':' port-number] +// host := domain-name | IPv4address | \[ IPv6address \] ; rfc3986 appendix-A +// domain-name := domain-component ['.' domain-component]* +// domain-component := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/ +// port-number := /[0-9]+/ +// path-component := alpha-numeric [separator alpha-numeric]* +// path (or "remote-name") := path-component ['/' path-component]* +// alpha-numeric := /[a-z0-9]+/ +// separator := /[_.]|__|[-]*/ +// +// tag := /[\w][\w.-]{0,127}/ +// +// digest := digest-algorithm ":" digest-hex +// digest-algorithm := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]* +// digest-algorithm-separator := /[+.-_]/ +// digest-algorithm-component := /[A-Za-z][A-Za-z0-9]*/ +// digest-hex := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value +// +// identifier := /[a-f0-9]{64}/ +package reference + +import ( + "errors" + "fmt" + "strings" + + "github.com/opencontainers/go-digest" +) + +const ( + // RepositoryNameTotalLengthMax is the maximum total number of characters in a repository name. + RepositoryNameTotalLengthMax = 255 + + // NameTotalLengthMax is the maximum total number of characters in a repository name. + // + // Deprecated: use [RepositoryNameTotalLengthMax] instead. + NameTotalLengthMax = RepositoryNameTotalLengthMax +) + +var ( + // ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference. + ErrReferenceInvalidFormat = errors.New("invalid reference format") + + // ErrTagInvalidFormat represents an error while trying to parse a string as a tag. + ErrTagInvalidFormat = errors.New("invalid tag format") + + // ErrDigestInvalidFormat represents an error while trying to parse a string as a tag. + ErrDigestInvalidFormat = errors.New("invalid digest format") + + // ErrNameContainsUppercase is returned for invalid repository names that contain uppercase characters. + ErrNameContainsUppercase = errors.New("repository name must be lowercase") + + // ErrNameEmpty is returned for empty, invalid repository names. + ErrNameEmpty = errors.New("repository name must have at least one component") + + // ErrNameTooLong is returned when a repository name is longer than RepositoryNameTotalLengthMax. + ErrNameTooLong = fmt.Errorf("repository name must not be more than %v characters", RepositoryNameTotalLengthMax) + + // ErrNameNotCanonical is returned when a name is not canonical. + ErrNameNotCanonical = errors.New("repository name must be canonical") +) + +// Reference is an opaque object reference identifier that may include +// modifiers such as a hostname, name, tag, and digest. +type Reference interface { + // String returns the full reference + String() string +} + +// Field provides a wrapper type for resolving correct reference types when +// working with encoding. +type Field struct { + reference Reference +} + +// AsField wraps a reference in a Field for encoding. +func AsField(reference Reference) Field { + return Field{reference} +} + +// Reference unwraps the reference type from the field to +// return the Reference object. This object should be +// of the appropriate type to further check for different +// reference types. +func (f Field) Reference() Reference { + return f.reference +} + +// MarshalText serializes the field to byte text which +// is the string of the reference. +func (f Field) MarshalText() (p []byte, err error) { + return []byte(f.reference.String()), nil +} + +// UnmarshalText parses text bytes by invoking the +// reference parser to ensure the appropriately +// typed reference object is wrapped by field. +func (f *Field) UnmarshalText(p []byte) error { + r, err := Parse(string(p)) + if err != nil { + return err + } + + f.reference = r + return nil +} + +// Named is an object with a full name +type Named interface { + Reference + Name() string +} + +// Tagged is an object which has a tag +type Tagged interface { + Reference + Tag() string +} + +// NamedTagged is an object including a name and tag. +type NamedTagged interface { + Named + Tag() string +} + +// Digested is an object which has a digest +// in which it can be referenced by +type Digested interface { + Reference + Digest() digest.Digest +} + +// Canonical reference is an object with a fully unique +// name including a name with domain and digest +type Canonical interface { + Named + Digest() digest.Digest +} + +// namedRepository is a reference to a repository with a name. +// A namedRepository has both domain and path components. +type namedRepository interface { + Named + Domain() string + Path() string +} + +// Domain returns the domain part of the [Named] reference. +func Domain(named Named) string { + if r, ok := named.(namedRepository); ok { + return r.Domain() + } + domain, _ := splitDomain(named.Name()) + return domain +} + +// Path returns the name without the domain part of the [Named] reference. +func Path(named Named) (name string) { + if r, ok := named.(namedRepository); ok { + return r.Path() + } + _, path := splitDomain(named.Name()) + return path +} + +// splitDomain splits a named reference into a hostname and path string. +// If no valid hostname is found, the hostname is empty and the full value +// is returned as name +func splitDomain(name string) (string, string) { + match := anchoredNameRegexp.FindStringSubmatch(name) + if len(match) != 3 { + return "", name + } + return match[1], match[2] +} + +// Parse parses s and returns a syntactically valid Reference. +// If an error was encountered it is returned, along with a nil Reference. +func Parse(s string) (Reference, error) { + matches := ReferenceRegexp.FindStringSubmatch(s) + if matches == nil { + if s == "" { + return nil, ErrNameEmpty + } + if ReferenceRegexp.FindStringSubmatch(strings.ToLower(s)) != nil { + return nil, ErrNameContainsUppercase + } + return nil, ErrReferenceInvalidFormat + } + + var repo repository + + nameMatch := anchoredNameRegexp.FindStringSubmatch(matches[1]) + if len(nameMatch) == 3 { + repo.domain = nameMatch[1] + repo.path = nameMatch[2] + } else { + repo.domain = "" + repo.path = matches[1] + } + + if len(repo.path) > RepositoryNameTotalLengthMax { + return nil, ErrNameTooLong + } + + ref := reference{ + namedRepository: repo, + tag: matches[2], + } + if matches[3] != "" { + var err error + ref.digest, err = digest.Parse(matches[3]) + if err != nil { + return nil, err + } + } + + r := getBestReferenceType(ref) + if r == nil { + return nil, ErrNameEmpty + } + + return r, nil +} + +// ParseNamed parses s and returns a syntactically valid reference implementing +// the Named interface. The reference must have a name and be in the canonical +// form, otherwise an error is returned. +// If an error was encountered it is returned, along with a nil Reference. +func ParseNamed(s string) (Named, error) { + named, err := ParseNormalizedNamed(s) + if err != nil { + return nil, err + } + if named.String() != s { + return nil, ErrNameNotCanonical + } + return named, nil +} + +// WithName returns a named object representing the given string. If the input +// is invalid ErrReferenceInvalidFormat will be returned. +func WithName(name string) (Named, error) { + match := anchoredNameRegexp.FindStringSubmatch(name) + if match == nil || len(match) != 3 { + return nil, ErrReferenceInvalidFormat + } + + if len(match[2]) > RepositoryNameTotalLengthMax { + return nil, ErrNameTooLong + } + + return repository{ + domain: match[1], + path: match[2], + }, nil +} + +// WithTag combines the name from "name" and the tag from "tag" to form a +// reference incorporating both the name and the tag. +func WithTag(name Named, tag string) (NamedTagged, error) { + if !anchoredTagRegexp.MatchString(tag) { + return nil, ErrTagInvalidFormat + } + var repo repository + if r, ok := name.(namedRepository); ok { + repo.domain = r.Domain() + repo.path = r.Path() + } else { + repo.path = name.Name() + } + if canonical, ok := name.(Canonical); ok { + return reference{ + namedRepository: repo, + tag: tag, + digest: canonical.Digest(), + }, nil + } + return taggedReference{ + namedRepository: repo, + tag: tag, + }, nil +} + +// WithDigest combines the name from "name" and the digest from "digest" to form +// a reference incorporating both the name and the digest. +func WithDigest(name Named, digest digest.Digest) (Canonical, error) { + if !anchoredDigestRegexp.MatchString(digest.String()) { + return nil, ErrDigestInvalidFormat + } + var repo repository + if r, ok := name.(namedRepository); ok { + repo.domain = r.Domain() + repo.path = r.Path() + } else { + repo.path = name.Name() + } + if tagged, ok := name.(Tagged); ok { + return reference{ + namedRepository: repo, + tag: tagged.Tag(), + digest: digest, + }, nil + } + return canonicalReference{ + namedRepository: repo, + digest: digest, + }, nil +} + +// TrimNamed removes any tag or digest from the named reference. +func TrimNamed(ref Named) Named { + repo := repository{} + if r, ok := ref.(namedRepository); ok { + repo.domain, repo.path = r.Domain(), r.Path() + } else { + repo.domain, repo.path = splitDomain(ref.Name()) + } + return repo +} + +func getBestReferenceType(ref reference) Reference { + if ref.Name() == "" { + // Allow digest only references + if ref.digest != "" { + return digestReference(ref.digest) + } + return nil + } + if ref.tag == "" { + if ref.digest != "" { + return canonicalReference{ + namedRepository: ref.namedRepository, + digest: ref.digest, + } + } + return ref.namedRepository + } + if ref.digest == "" { + return taggedReference{ + namedRepository: ref.namedRepository, + tag: ref.tag, + } + } + + return ref +} + +type reference struct { + namedRepository + tag string + digest digest.Digest +} + +func (r reference) String() string { + return r.Name() + ":" + r.tag + "@" + r.digest.String() +} + +func (r reference) Tag() string { + return r.tag +} + +func (r reference) Digest() digest.Digest { + return r.digest +} + +type repository struct { + domain string + path string +} + +func (r repository) String() string { + return r.Name() +} + +func (r repository) Name() string { + if r.domain == "" { + return r.path + } + return r.domain + "/" + r.path +} + +func (r repository) Domain() string { + return r.domain +} + +func (r repository) Path() string { + return r.path +} + +type digestReference digest.Digest + +func (d digestReference) String() string { + return digest.Digest(d).String() +} + +func (d digestReference) Digest() digest.Digest { + return digest.Digest(d) +} + +type taggedReference struct { + namedRepository + tag string +} + +func (t taggedReference) String() string { + return t.Name() + ":" + t.tag +} + +func (t taggedReference) Tag() string { + return t.tag +} + +type canonicalReference struct { + namedRepository + digest digest.Digest +} + +func (c canonicalReference) String() string { + return c.Name() + "@" + c.digest.String() +} + +func (c canonicalReference) Digest() digest.Digest { + return c.digest +} diff --git a/vendor/github.com/distribution/reference/regexp.go b/vendor/github.com/distribution/reference/regexp.go new file mode 100644 index 000000000..65bc49d79 --- /dev/null +++ b/vendor/github.com/distribution/reference/regexp.go @@ -0,0 +1,163 @@ +package reference + +import ( + "regexp" + "strings" +) + +// DigestRegexp matches well-formed digests, including algorithm (e.g. "sha256:"). +var DigestRegexp = regexp.MustCompile(digestPat) + +// DomainRegexp matches hostname or IP-addresses, optionally including a port +// number. It defines the structure of potential domain components that may be +// part of image names. This is purposely a subset of what is allowed by DNS to +// ensure backwards compatibility with Docker image names. It may be a subset of +// DNS domain name, an IPv4 address in decimal format, or an IPv6 address between +// square brackets (excluding zone identifiers as defined by [RFC 6874] or special +// addresses such as IPv4-Mapped). +// +// [RFC 6874]: https://www.rfc-editor.org/rfc/rfc6874. +var DomainRegexp = regexp.MustCompile(domainAndPort) + +// IdentifierRegexp is the format for string identifier used as a +// content addressable identifier using sha256. These identifiers +// are like digests without the algorithm, since sha256 is used. +var IdentifierRegexp = regexp.MustCompile(identifier) + +// NameRegexp is the format for the name component of references, including +// an optional domain and port, but without tag or digest suffix. +var NameRegexp = regexp.MustCompile(namePat) + +// ReferenceRegexp is the full supported format of a reference. The regexp +// is anchored and has capturing groups for name, tag, and digest +// components. +var ReferenceRegexp = regexp.MustCompile(referencePat) + +// TagRegexp matches valid tag names. From [docker/docker:graph/tags.go]. +// +// [docker/docker:graph/tags.go]: https://github.com/moby/moby/blob/v1.6.0/graph/tags.go#L26-L28 +var TagRegexp = regexp.MustCompile(tag) + +const ( + // alphanumeric defines the alphanumeric atom, typically a + // component of names. This only allows lower case characters and digits. + alphanumeric = `[a-z0-9]+` + + // separator defines the separators allowed to be embedded in name + // components. This allows one period, one or two underscore and multiple + // dashes. Repeated dashes and underscores are intentionally treated + // differently. In order to support valid hostnames as name components, + // supporting repeated dash was added. Additionally double underscore is + // now allowed as a separator to loosen the restriction for previously + // supported names. + separator = `(?:[._]|__|[-]+)` + + // localhost is treated as a special value for domain-name. Any other + // domain-name without a "." or a ":port" are considered a path component. + localhost = `localhost` + + // domainNameComponent restricts the registry domain component of a + // repository name to start with a component as defined by DomainRegexp. + domainNameComponent = `(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])` + + // optionalPort matches an optional port-number including the port separator + // (e.g. ":80"). + optionalPort = `(?::[0-9]+)?` + + // tag matches valid tag names. From docker/docker:graph/tags.go. + tag = `[\w][\w.-]{0,127}` + + // digestPat matches well-formed digests, including algorithm (e.g. "sha256:"). + // + // TODO(thaJeztah): this should follow the same rules as https://pkg.go.dev/github.com/opencontainers/go-digest@v1.0.0#DigestRegexp + // so that go-digest defines the canonical format. Note that the go-digest is + // more relaxed: + // - it allows multiple algorithms (e.g. "sha256+b64:") to allow + // future expansion of supported algorithms. + // - it allows the "" value to use urlsafe base64 encoding as defined + // in [rfc4648, section 5]. + // + // [rfc4648, section 5]: https://www.rfc-editor.org/rfc/rfc4648#section-5. + digestPat = `[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}` + + // identifier is the format for a content addressable identifier using sha256. + // These identifiers are like digests without the algorithm, since sha256 is used. + identifier = `([a-f0-9]{64})` + + // ipv6address are enclosed between square brackets and may be represented + // in many ways, see rfc5952. Only IPv6 in compressed or uncompressed format + // are allowed, IPv6 zone identifiers (rfc6874) or Special addresses such as + // IPv4-Mapped are deliberately excluded. + ipv6address = `\[(?:[a-fA-F0-9:]+)\]` +) + +var ( + // domainName defines the structure of potential domain components + // that may be part of image names. This is purposely a subset of what is + // allowed by DNS to ensure backwards compatibility with Docker image + // names. This includes IPv4 addresses on decimal format. + domainName = domainNameComponent + anyTimes(`\.`+domainNameComponent) + + // host defines the structure of potential domains based on the URI + // Host subcomponent on rfc3986. It may be a subset of DNS domain name, + // or an IPv4 address in decimal format, or an IPv6 address between square + // brackets (excluding zone identifiers as defined by rfc6874 or special + // addresses such as IPv4-Mapped). + host = `(?:` + domainName + `|` + ipv6address + `)` + + // allowed by the URI Host subcomponent on rfc3986 to ensure backwards + // compatibility with Docker image names. + domainAndPort = host + optionalPort + + // anchoredTagRegexp matches valid tag names, anchored at the start and + // end of the matched string. + anchoredTagRegexp = regexp.MustCompile(anchored(tag)) + + // anchoredDigestRegexp matches valid digests, anchored at the start and + // end of the matched string. + anchoredDigestRegexp = regexp.MustCompile(anchored(digestPat)) + + // pathComponent restricts path-components to start with an alphanumeric + // character, with following parts able to be separated by a separator + // (one period, one or two underscore and multiple dashes). + pathComponent = alphanumeric + anyTimes(separator+alphanumeric) + + // remoteName matches the remote-name of a repository. It consists of one + // or more forward slash (/) delimited path-components: + // + // pathComponent[[/pathComponent] ...] // e.g., "library/ubuntu" + remoteName = pathComponent + anyTimes(`/`+pathComponent) + namePat = optional(domainAndPort+`/`) + remoteName + + // anchoredNameRegexp is used to parse a name value, capturing the + // domain and trailing components. + anchoredNameRegexp = regexp.MustCompile(anchored(optional(capture(domainAndPort), `/`), capture(remoteName))) + + referencePat = anchored(capture(namePat), optional(`:`, capture(tag)), optional(`@`, capture(digestPat))) + + // anchoredIdentifierRegexp is used to check or match an + // identifier value, anchored at start and end of string. + anchoredIdentifierRegexp = regexp.MustCompile(anchored(identifier)) +) + +// optional wraps the expression in a non-capturing group and makes the +// production optional. +func optional(res ...string) string { + return `(?:` + strings.Join(res, "") + `)?` +} + +// anyTimes wraps the expression in a non-capturing group that can occur +// any number of times. +func anyTimes(res ...string) string { + return `(?:` + strings.Join(res, "") + `)*` +} + +// capture wraps the expression in a capturing group. +func capture(res ...string) string { + return `(` + strings.Join(res, "") + `)` +} + +// anchored anchors the regular expression by adding start and end delimiters. +func anchored(res ...string) string { + return `^` + strings.Join(res, "") + `$` +} diff --git a/vendor/github.com/distribution/reference/sort.go b/vendor/github.com/distribution/reference/sort.go new file mode 100644 index 000000000..416c37b07 --- /dev/null +++ b/vendor/github.com/distribution/reference/sort.go @@ -0,0 +1,75 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package reference + +import ( + "sort" +) + +// Sort sorts string references preferring higher information references. +// +// The precedence is as follows: +// +// 1. [Named] + [Tagged] + [Digested] (e.g., "docker.io/library/busybox:latest@sha256:") +// 2. [Named] + [Tagged] (e.g., "docker.io/library/busybox:latest") +// 3. [Named] + [Digested] (e.g., "docker.io/library/busybo@sha256:") +// 4. [Named] (e.g., "docker.io/library/busybox") +// 5. [Digested] (e.g., "docker.io@sha256:") +// 6. Parse error +func Sort(references []string) []string { + var prefs []Reference + var bad []string + + for _, ref := range references { + pref, err := ParseAnyReference(ref) + if err != nil { + bad = append(bad, ref) + } else { + prefs = append(prefs, pref) + } + } + sort.Slice(prefs, func(a, b int) bool { + ar := refRank(prefs[a]) + br := refRank(prefs[b]) + if ar == br { + return prefs[a].String() < prefs[b].String() + } + return ar < br + }) + sort.Strings(bad) + var refs []string + for _, pref := range prefs { + refs = append(refs, pref.String()) + } + return append(refs, bad...) +} + +func refRank(ref Reference) uint8 { + if _, ok := ref.(Named); ok { + if _, ok = ref.(Tagged); ok { + if _, ok = ref.(Digested); ok { + return 1 + } + return 2 + } + if _, ok = ref.(Digested); ok { + return 3 + } + return 4 + } + return 5 +} diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS new file mode 100644 index 000000000..d6d23b3de --- /dev/null +++ b/vendor/github.com/docker/cli/AUTHORS @@ -0,0 +1,890 @@ +# File @generated by scripts/docs/generate-authors.sh. DO NOT EDIT. +# This file lists all contributors to the repository. +# See scripts/docs/generate-authors.sh to make modifications. + +A. Lester Buck III +Aanand Prasad +Aaron L. Xu +Aaron Lehmann +Aaron.L.Xu +Abdur Rehman +Abhinandan Prativadi +Abin Shahab +Abreto FU +Ace Tang +Addam Hardy +Adolfo Ochagavía +Adrian Plata +Adrien Duermael +Adrien Folie +Adyanth Hosavalike +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Akhil Mohan +Akihiro Suda +Akim Demaille +Alan Thompson +Albert Callarisa +Alberto Roura +Albin Kerouanton +Aleksa Sarai +Aleksander Piotrowski +Alessandro Boch +Alex Couture-Beil +Alex Mavrogiannis +Alex Mayer +Alexander Boyd +Alexander Chneerov +Alexander Larsson +Alexander Morozov +Alexander Ryabov +Alexandre González +Alexey Igrychev +Alexis Couvreur +Alfred Landrum +Ali Rostami +Alicia Lauerman +Allen Sun +Alvin Deng +Amen Belayneh +Amey Shrivastava <72866602+AmeyShrivastava@users.noreply.github.com> +Amir Goldstein +Amit Krishnan +Amit Shukla +Amy Lindburg +Anca Iordache +Anda Xu +Andrea Luzzardi +Andreas Köhler +Andres G. Aragoneses +Andres Leon Rangel +Andrew France +Andrew Hsu +Andrew Macpherson +Andrew McDonnell +Andrew Po +Andrey Petrov +Andrii Berehuliak +André Martins +Andy Goldstein +Andy Rothfusz +Anil Madhavapeddy +Ankush Agarwal +Anne Henmi +Anton Polonskiy +Antonio Murdaca +Antonis Kalipetis +Anusha Ragunathan +Ao Li +Arash Deshmeh +Arko Dasgupta +Arnaud Porterie +Arnaud Rebillout +Arthur Peka +Ashly Mathew +Ashwini Oruganti +Aslam Ahemad +Azat Khuyiyakhmetov +Bardia Keyoumarsi +Barnaby Gray +Bastiaan Bakker +BastianHofmann +Ben Bodenmiller +Ben Bonnefoy +Ben Creasy +Ben Firshman +Benjamin Boudreau +Benjamin Böhmke +Benjamin Nater +Benoit Sigoure +Bhumika Bayani +Bill Wang +Bin Liu +Bingshen Wang +Bishal Das +Bjorn Neergaard +Boaz Shuster +Boban Acimovic +Bogdan Anton +Boris Pruessmann +Brad Baker +Bradley Cicenas +Brandon Mitchell +Brandon Philips +Brent Salisbury +Bret Fisher +Brian (bex) Exelbierd +Brian Goff +Brian Tracy +Brian Wieder +Bruno Sousa +Bryan Bess +Bryan Boreham +Bryan Murphy +bryfry +Cameron Spear +Cao Weiwei +Carlo Mion +Carlos Alexandro Becker +Carlos de Paula +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Faragher +Chao Wang +Charles Chan +Charles Law +Charles Smith +Charlie Drage +Charlotte Mach +ChaYoung You +Chee Hau Lim +Chen Chuanliang +Chen Hanxiao +Chen Mingjie +Chen Qiu +Chris Chinchilla +Chris Couzens +Chris Gavin +Chris Gibson +Chris McKinnel +Chris Snow +Chris Vermilion +Chris Weyl +Christian Persson +Christian Stefanescu +Christophe Robin +Christophe Vidal +Christopher Biscardi +Christopher Crone +Christopher Jones +Christopher Svensson +Christy Norman +Chun Chen +Clinton Kitson +Coenraad Loubser +Colin Hebert +Collin Guarino +Colm Hally +Comical Derskeal <27731088+derskeal@users.noreply.github.com> +Conner Crosby +Corey Farrell +Corey Quon +Cory Bennet +Cory Snider +Craig Osterhout +Craig Wilhite +Cristian Staretu +Daehyeok Mun +Dafydd Crosby +Daisuke Ito +dalanlan +Damien Nadé +Dan Cotora +Danial Gharib +Daniel Artine +Daniel Cassidy +Daniel Dao +Daniel Farrell +Daniel Gasienica +Daniel Goosen +Daniel Helfand +Daniel Hiltgen +Daniel J Walsh +Daniel Nephin +Daniel Norberg +Daniel Watkins +Daniel Zhang +Daniil Nikolenko +Danny Berger +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Dave Goodchild +Dave Henderson +Dave Tucker +David Alvarez +David Beitey +David Calavera +David Cramer +David Dooling +David Gageot +David Karlsson +David Lechner +David Scott +David Sheets +David Williamson +David Xia +David Young +Deng Guangxing +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Docter +dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Derek McGowan +Des Preston +Deshi Xiao +Dharmit Shah +Dhawal Yogesh Bhanushali +Dieter Reuter +Dima Stopel +Dimitry Andric +Ding Fei +Diogo Monica +Djordje Lukic +Dmitriy Fishman +Dmitry Gusev +Dmitry Smirnov +Dmitry V. Krivenok +Dominik Braun +Don Kjer +Dong Chen +DongGeon Lee +Doug Davis +Drew Erny +Ed Costello +Ed Morley <501702+edmorley@users.noreply.github.com> +Elango Sivanandam +Eli Uriegas +Eli Uriegas +Elias Faxö +Elliot Luo <956941328@qq.com> +Eric Bode +Eric Curtin +Eric Engestrom +Eric G. Noriega +Eric Rosenberg +Eric Sage +Eric-Olivier Lamey +Erica Windisch +Erik Hollensbe +Erik Humphrey +Erik St. Martin +Essam A. Hassan +Ethan Haynes +Euan Kemp +Eugene Yakubovich +Evan Allrich +Evan Hazlett +Evan Krall +Evan Lezar +Evelyn Xu +Everett Toews +Fabio Falci +Fabrizio Soppelsa +Felix Geyer +Felix Hupfeld +Felix Rabe +fezzik1620 +Filip Jareš +Flavio Crisciani +Florian Klein +Forest Johnson +Foysal Iqbal +François Scala +Fred Lifton +Frederic Hemberger +Frederick F. Kautz IV +Frederik Nordahl Jul Sabroe +Frieder Bluemle +Gabriel Gore +Gabriel Nicolas Avellaneda +Gabriela Georgieva +Gaetan de Villele +Gang Qiao +Gary Schaetz +Genki Takiuchi +George MacRorie +George Xie +Gianluca Borello +Gildas Cuisinier +Gio d'Amelio +Gleb Stsenov +Goksu Toprak +Gou Rao +Govind Rai +Graeme Wiebe +Grant Reaber +Greg Pflaum +Gsealy +Guilhem Lettron +Guillaume J. Charmes +Guillaume Le Floch +Guillaume Tardif +gwx296173 +Günther Jungbluth +Hakan Özler +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harold Cooper +Harry Zhang +He Simei +Hector S +Helen Xie +Henning Sprang +Henry N +Hernan Garcia +Hongbin Lu +Hu Keping +Huayi Zhang +Hugo Chastel +Hugo Gabriel Eyherabide +huqun +Huu Nguyen +Hyzhou Zhy +Iain Samuel McLean Elder +Ian Campbell +Ian Philpot +Ignacio Capurro +Ilya Dmitrichenko +Ilya Khlopotov +Ilya Sotkov +Ioan Eugen Stan +Isabel Jimenez +Ivan Grcic +Ivan Grund +Ivan Markin +Jacob Atzen +Jacob Tomlinson +Jacopo Rigoli +Jaivish Kothari +Jake Lambert +Jake Sanders +Jake Stokes +Jakub Panek +James Nesbitt +James Turnbull +Jamie Hannaford +Jan Koprowski +Jan Pazdziora +Jan-Jaap Driessen +Jana Radhakrishnan +Jared Hocutt +Jasmine Hegman +Jason Hall +Jason Heiss +Jason Plum +Jay Kamat +Jean Lecordier +Jean Rouge +Jean-Christophe Sirot +Jean-Pierre Huynh +Jeff Lindsay +Jeff Nickoloff +Jeff Silberman +Jennings Zhang +Jeremy Chambers +Jeremy Unruh +Jeremy Yallop +Jeroen Franse +Jesse Adametz +Jessica Frazelle +Jezeniel Zapanta +Jian Zhang +Jie Luo +Jilles Oldenbeuving +Jim Galasyn +Jim Lin +Jimmy Leger +Jimmy Song +jimmyxian +Jintao Zhang +Joao Fernandes +Joe Abbey +Joe Doliner +Joe Gordon +Joel Handwell +Joey Geiger +Joffrey F +Johan Euphrosine +Johannes 'fish' Ziemke +John Feminella +John Harris +John Howard +John Howard +John Laswell +John Maguire +John Mulhausen +John Starks +John Stephens +John Tims +John V. Martinez +John Willis +Jon Johnson +Jon Zeolla +Jonatas Baldin +Jonathan Boulle +Jonathan Lee +Jonathan Lomas +Jonathan McCrohan +Jonathan Warriss-Simmons +Jonh Wendell +Jordan Jennings +Jorge Vallecillo +Jose J. Escobar <53836904+jescobar-docker@users.noreply.github.com> +Joseph Kern +Josh Bodah +Josh Chorlton +Josh Hawn +Josh Horwitz +Josh Soref +Julian +Julien Barbier +Julien Kassar +Julien Maitrehenry +Justas Brazauskas +Justin Chadwell +Justin Cormack +Justin Simonelis +Justyn Temme +Jyrki Puttonen +Jérémie Drouet +Jérôme Petazzoni +Jörg Thalheim +Kai Blin +Kai Qiang Wu (Kennan) +Kara Alexandra +Kareem Khazem +Karthik Nayak +Kat Samperi +Kathryn Spiers +Katie McLaughlin +Ke Xu +Kei Ohmura +Keith Hudgins +Kelton Bassingthwaite +Ken Cochrane +Ken ICHIKAWA +Kenfe-Mickaël Laventure +Kevin Alvarez +Kevin Burke +Kevin Feyrer +Kevin Kern +Kevin Kirsche +Kevin Meredith +Kevin Richardson +Kevin Woblick +khaled souf +Kim Eik +Kir Kolyshkin +Kotaro Yoshimatsu +Krasi Georgiev +Kris-Mikael Krister +Kun Zhang +Kunal Kushwaha +Kyle Mitofsky +Lachlan Cooper +Lai Jiangshan +Lars Kellogg-Stedman +Laura Brehm +Laura Frank +Laurent Erignoux +Lee Gaines +Lei Jitang +Lennie +Leo Gallucci +Leonid Skorospelov +Lewis Daly +Li Fu Bang +Li Yi +Li Yi +Liang-Chi Hsieh +Lihua Tang +Lily Guo +Lin Lu +Linus Heckemann +Liping Xue +Liron Levin +liwenqi +lixiaobing10051267 +Lloyd Dewolf +Lorenzo Fontana +Louis Opter +Luca Favatella +Luca Marturana +Lucas Chan +Luis Henrique Mulinari +Luka Hartwig +Lukas Heeren +Lukasz Zajaczkowski +Lydell Manganti +Lénaïc Huard +Ma Shimiao +Mabin +Maciej Kalisz +Madhav Puri +Madhu Venugopal +Madhur Batra +Malte Janduda +Manjunath A Kumatagi +Mansi Nahar +mapk0y +Marc Bihlmaier +Marc Cornellà +Marco Mariani +Marco Spiess +Marco Vedovati +Marcus Martins +Marianna Tessel +Marius Ileana +Marius Sturm +Mark Oates +Marsh Macy +Martin Mosegaard Amdisen +Mary Anthony +Mason Fish +Mason Malone +Mateusz Major +Mathieu Champlon +Mathieu Rollet +Matt Gucci +Matt Robenolt +Matteo Orefice +Matthew Heon +Matthieu Hauglustaine +Mauro Porras P +Max Shytikov +Maxime Petazzoni +Maximillian Fan Xavier +Mei ChunTao +Melroy van den Berg +Metal <2466052+tedhexaflow@users.noreply.github.com> +Micah Zoltu +Michael A. Smith +Michael Bridgen +Michael Crosby +Michael Friis +Michael Irwin +Michael Käufl +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Steinert +Michael West +Michal Minář +Michał Czeraszkiewicz +Miguel Angel Alvarez Cabrerizo +Mihai Borobocea +Mihuleacc Sergiu +Mike Brown +Mike Casas +Mike Dalton +Mike Danese +Mike Dillon +Mike Goelzer +Mike MacCana +mikelinjie <294893458@qq.com> +Mikhail Vasin +Milind Chawre +Mindaugas Rukas +Miroslav Gula +Misty Stanley-Jones +Mohammad Banikazemi +Mohammed Aaqib Ansari +Mohini Anne Dsouza +Moorthy RS +Morgan Bauer +Morten Hekkvang +Morten Linderud +Moysés Borges +Mozi <29089388+pzhlkj6612@users.noreply.github.com> +Mrunal Patel +muicoder +Murukesh Mohanan +Muthukumar R +Máximo Cuadros +Mårten Cassel +Nace Oroz +Nahum Shalman +Nalin Dahyabhai +Nao YONASHIRO +Nassim 'Nass' Eddequiouaq +Natalie Parker +Nate Brennand +Nathan Hsieh +Nathan LeClaire +Nathan McCauley +Neil Peterson +Nick Adcock +Nick Santos +Nico Stapelbroek +Nicola Kabar +Nicolas Borboën +Nicolas De Loof +Nikhil Chawla +Nikolas Garofil +Nikolay Milovanov +Nir Soffer +Nishant Totla +NIWA Hideyuki +Noah Treuhaft +O.S. Tezer +Oded Arbel +Odin Ugedal +ohmystack +OKA Naoya +Oliver Pomeroy +Olle Jonsson +Olli Janatuinen +Oscar Wieman +Otto Kekäläinen +Ovidio Mallo +Pascal Borreli +Patrick Böänziger +Patrick Daigle <114765035+pdaig@users.noreply.github.com> +Patrick Hemmer +Patrick Lang +Paul +Paul Kehrer +Paul Lietar +Paul Mulders +Paul Seyfert +Paul Weaver +Pavel Pospisil +Paweł Gronowski +Paweł Pokrywka +Paweł Szczekutowicz +Peeyush Gupta +Per Lundberg +Peter Dave Hello +Peter Edge +Peter Hsu +Peter Jaffe +Peter Kehl +Peter Nagy +Peter Salvatore +Peter Waller +Phil Estes +Philip Alexander Etling +Philipp Gillé +Philipp Schmied +Phong Tran +pidster +Pieter E Smit +pixelistik +Pratik Karki +Prayag Verma +Preston Cowley +Pure White +Qiang Huang +Qinglan Peng +QQ喵 +qudongfang +Raghavendra K T +Rahul Kadyan +Rahul Zoldyck +Ravi Shekhar Jethani +Ray Tsang +Reficul +Remy Suen +Renaud Gaubert +Ricardo N Feliciano +Rich Moyse +Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com> +Richard Mathie +Richard Scothern +Rick Wieman +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Gulewich +Rob Murray +Robert Wallis +Robin Naundorf +Robin Speekenbrink +Roch Feuillade +Rodolfo Ortiz +Rogelio Canedo +Rohan Verma +Roland Kammerer +Roman Dudin +Rory Hunter +Ross Boucher +Rubens Figueiredo +Rui Cao +Ryan Belgrave +Ryan Detzel +Ryan Stelly +Ryan Wilson-Perkin +Ryan Zhang +Sainath Grandhi +Sakeven Jiang +Sally O'Malley +Sam Neirinck +Sam Thibault +Samarth Shah +Sambuddha Basu +Sami Tabet +Samuel Cochran +Samuel Karp +Sandro Jäckel +Santhosh Manohar +Sargun Dhillon +Saswat Bhattacharya +Saurabh Kumar +Scott Brenner +Scott Collier +Sean Christopherson +Sean Rodman +Sebastiaan van Stijn +Sergey Tryuber +Serhat Gülçiçek +Sevki Hasirci +Shaun Kaasten +Sheng Yang +Shijiang Wei +Shishir Mahajan +Shoubhik Bose +Shukui Yang +Sian Lerk Lau +Sidhartha Mani +sidharthamani +Silvin Lubecki +Simei He +Simon Ferquel +Simon Heimberg +Sindhu S +Slava Semushin +Solomon Hykes +Song Gao +Spencer Brown +Spring Lee +squeegels +Srini Brahmaroutu +Stefan S. +Stefan Scherer +Stefan Weil +Stephane Jeandeaux +Stephen Day +Stephen Rust +Steve Durrheimer +Steve Richards +Steven Burgess +Stoica-Marcu Floris-Andrei +Subhajit Ghosh +Sun Jianbo +Sune Keller +Sungwon Han +Sunny Gogoi +Sven Dowideit +Sylvain Baubeau +Sébastien HOUZÉ +T K Sourabh +TAGOMORI Satoshi +taiji-tech +Takeshi Koenuma +Takuya Noguchi +Taylor Jones +Teiva Harsanyi +Tejaswini Duggaraju +Tengfei Wang +Teppei Fukuda +Thatcher Peskens +Thibault Coupin +Thomas Gazagnaire +Thomas Krzero +Thomas Leonard +Thomas Léveil +Thomas Riccardi +Thomas Swift +Tianon Gravi +Tianyi Wang +Tibor Vass +Tim Dettrick +Tim Hockin +Tim Sampson +Tim Smith +Tim Waugh +Tim Wraight +timfeirg +Timothy Hobbs +Tobias Bradtke +Tobias Gesellchen +Todd Whiteman +Tom Denham +Tom Fotherby +Tom Klingenberg +Tom Milligan +Tom X. Tobin +Tomas Bäckman +Tomas Tomecek +Tomasz Kopczynski +Tomáš Hrčka +Tony Abboud +Tõnis Tiigi +Trapier Marshall +Travis Cline +Tristan Carel +Tycho Andersen +Tycho Andersen +uhayate +Ulrich Bareth +Ulysses Souza +Umesh Yadav +Vaclav Struhar +Valentin Lorentz +Vardan Pogosian +Venkateswara Reddy Bukkasamudram +Veres Lajos +Victor Vieux +Victoria Bialas +Viktor Stanchev +Ville Skyttä +Vimal Raghubir +Vincent Batts +Vincent Bernat +Vincent Demeester +Vincent Woo +Vishnu Kannan +Vivek Goyal +Wang Jie +Wang Lei +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Wang Yumu <37442693@qq.com> +Wataru Ishida +Wayne Song +Wen Cheng Ma +Wenzhi Liang +Wes Morgan +Wewang Xiaorenfine +William Henry +Xianglin Gao +Xiaodong Liu +Xiaodong Zhang +Xiaoxi He +Xinbo Weng +Xuecong Liao +Yan Feng +Yanqiang Miao +Yassine Tijani +Yi EungJun +Ying Li +Yong Tang +Yosef Fertel +Yu Peng +Yuan Sun +Yucheng Wu +Yue Zhang +Yunxiang Huang +Zachary Romero +Zander Mackie +zebrilee +Zeel B Patel +Zhang Kun +Zhang Wei +Zhang Wentao +ZhangHang +zhenghenghuo +Zhou Hao +Zhoulin Xie +Zhu Guihua +Álex González +Álvaro Lázaro +Átila Camurça Alves +Александр Менщиков <__Singleton__@hackerdom.ru> +徐俊杰 diff --git a/vendor/github.com/docker/cli/LICENSE b/vendor/github.com/docker/cli/LICENSE new file mode 100644 index 000000000..9c8e20ab8 --- /dev/null +++ b/vendor/github.com/docker/cli/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2017 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/cli/NOTICE b/vendor/github.com/docker/cli/NOTICE new file mode 100644 index 000000000..58b19b6d1 --- /dev/null +++ b/vendor/github.com/docker/cli/NOTICE @@ -0,0 +1,19 @@ +Docker +Copyright 2012-2017 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +This product contains software (https://github.com/creack/pty) developed +by Keith Rarick, licensed under the MIT License. + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/cli/cli/config/config.go b/vendor/github.com/docker/cli/cli/config/config.go new file mode 100644 index 000000000..952f6e71f --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/config.go @@ -0,0 +1,131 @@ +package config + +import ( + "fmt" + "io" + "os" + "path/filepath" + "strings" + "sync" + + "github.com/docker/cli/cli/config/configfile" + "github.com/docker/cli/cli/config/credentials" + "github.com/docker/cli/cli/config/types" + "github.com/docker/docker/pkg/homedir" + "github.com/pkg/errors" +) + +const ( + // EnvOverrideConfigDir is the name of the environment variable that can be + // used to override the location of the client configuration files (~/.docker). + // + // It takes priority over the default, but can be overridden by the "--config" + // command line option. + EnvOverrideConfigDir = "DOCKER_CONFIG" + + // ConfigFileName is the name of the client configuration file inside the + // config-directory. + ConfigFileName = "config.json" + configFileDir = ".docker" + contextsDir = "contexts" +) + +var ( + initConfigDir = new(sync.Once) + configDir string +) + +// resetConfigDir is used in testing to reset the "configDir" package variable +// and its sync.Once to force re-lookup between tests. +func resetConfigDir() { + configDir = "" + initConfigDir = new(sync.Once) +} + +// Dir returns the directory the configuration file is stored in +func Dir() string { + initConfigDir.Do(func() { + configDir = os.Getenv(EnvOverrideConfigDir) + if configDir == "" { + configDir = filepath.Join(homedir.Get(), configFileDir) + } + }) + return configDir +} + +// ContextStoreDir returns the directory the docker contexts are stored in +func ContextStoreDir() string { + return filepath.Join(Dir(), contextsDir) +} + +// SetDir sets the directory the configuration file is stored in +func SetDir(dir string) { + // trigger the sync.Once to synchronise with Dir() + initConfigDir.Do(func() {}) + configDir = filepath.Clean(dir) +} + +// Path returns the path to a file relative to the config dir +func Path(p ...string) (string, error) { + path := filepath.Join(append([]string{Dir()}, p...)...) + if !strings.HasPrefix(path, Dir()+string(filepath.Separator)) { + return "", errors.Errorf("path %q is outside of root config directory %q", path, Dir()) + } + return path, nil +} + +// LoadFromReader is a convenience function that creates a ConfigFile object from +// a reader +func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) { + configFile := configfile.ConfigFile{ + AuthConfigs: make(map[string]types.AuthConfig), + } + err := configFile.LoadFromReader(configData) + return &configFile, err +} + +// Load reads the configuration files in the given directory, and sets up +// the auth config information and returns values. +func Load(configDir string) (*configfile.ConfigFile, error) { + if configDir == "" { + configDir = Dir() + } + return load(configDir) +} + +func load(configDir string) (*configfile.ConfigFile, error) { + filename := filepath.Join(configDir, ConfigFileName) + configFile := configfile.New(filename) + + file, err := os.Open(filename) + if err != nil { + if os.IsNotExist(err) { + // + // if file is there but we can't stat it for any reason other + // than it doesn't exist then stop + return configFile, nil + } + // if file is there but we can't stat it for any reason other + // than it doesn't exist then stop + return configFile, nil + } + defer file.Close() + err = configFile.LoadFromReader(file) + if err != nil { + err = errors.Wrap(err, filename) + } + return configFile, err +} + +// LoadDefaultConfigFile attempts to load the default config file and returns +// an initialized ConfigFile struct if none is found. +func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile { + configFile, err := load(Dir()) + if err != nil { + _, _ = fmt.Fprintf(stderr, "WARNING: Error loading config file: %v\n", err) + } + if !configFile.ContainsAuth() { + configFile.CredentialsStore = credentials.DetectDefaultStore(configFile.CredentialsStore) + } + return configFile +} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file.go b/vendor/github.com/docker/cli/cli/config/configfile/file.go new file mode 100644 index 000000000..442c31110 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/configfile/file.go @@ -0,0 +1,352 @@ +package configfile + +import ( + "encoding/base64" + "encoding/json" + "io" + "os" + "path/filepath" + "strings" + + "github.com/docker/cli/cli/config/credentials" + "github.com/docker/cli/cli/config/types" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// ConfigFile ~/.docker/config.json file info +type ConfigFile struct { + AuthConfigs map[string]types.AuthConfig `json:"auths"` + HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` + PsFormat string `json:"psFormat,omitempty"` + ImagesFormat string `json:"imagesFormat,omitempty"` + NetworksFormat string `json:"networksFormat,omitempty"` + PluginsFormat string `json:"pluginsFormat,omitempty"` + VolumesFormat string `json:"volumesFormat,omitempty"` + StatsFormat string `json:"statsFormat,omitempty"` + DetachKeys string `json:"detachKeys,omitempty"` + CredentialsStore string `json:"credsStore,omitempty"` + CredentialHelpers map[string]string `json:"credHelpers,omitempty"` + Filename string `json:"-"` // Note: for internal use only + ServiceInspectFormat string `json:"serviceInspectFormat,omitempty"` + ServicesFormat string `json:"servicesFormat,omitempty"` + TasksFormat string `json:"tasksFormat,omitempty"` + SecretFormat string `json:"secretFormat,omitempty"` + ConfigFormat string `json:"configFormat,omitempty"` + NodesFormat string `json:"nodesFormat,omitempty"` + PruneFilters []string `json:"pruneFilters,omitempty"` + Proxies map[string]ProxyConfig `json:"proxies,omitempty"` + Experimental string `json:"experimental,omitempty"` + CurrentContext string `json:"currentContext,omitempty"` + CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"` + Plugins map[string]map[string]string `json:"plugins,omitempty"` + Aliases map[string]string `json:"aliases,omitempty"` +} + +// ProxyConfig contains proxy configuration settings +type ProxyConfig struct { + HTTPProxy string `json:"httpProxy,omitempty"` + HTTPSProxy string `json:"httpsProxy,omitempty"` + NoProxy string `json:"noProxy,omitempty"` + FTPProxy string `json:"ftpProxy,omitempty"` + AllProxy string `json:"allProxy,omitempty"` +} + +// New initializes an empty configuration file for the given filename 'fn' +func New(fn string) *ConfigFile { + return &ConfigFile{ + AuthConfigs: make(map[string]types.AuthConfig), + HTTPHeaders: make(map[string]string), + Filename: fn, + Plugins: make(map[string]map[string]string), + Aliases: make(map[string]string), + } +} + +// LoadFromReader reads the configuration data given and sets up the auth config +// information with given directory and populates the receiver object +func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error { + if err := json.NewDecoder(configData).Decode(configFile); err != nil && !errors.Is(err, io.EOF) { + return err + } + var err error + for addr, ac := range configFile.AuthConfigs { + if ac.Auth != "" { + ac.Username, ac.Password, err = decodeAuth(ac.Auth) + if err != nil { + return err + } + } + ac.Auth = "" + ac.ServerAddress = addr + configFile.AuthConfigs[addr] = ac + } + return nil +} + +// ContainsAuth returns whether there is authentication configured +// in this file or not. +func (configFile *ConfigFile) ContainsAuth() bool { + return configFile.CredentialsStore != "" || + len(configFile.CredentialHelpers) > 0 || + len(configFile.AuthConfigs) > 0 +} + +// GetAuthConfigs returns the mapping of repo to auth configuration +func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig { + if configFile.AuthConfigs == nil { + configFile.AuthConfigs = make(map[string]types.AuthConfig) + } + return configFile.AuthConfigs +} + +// SaveToWriter encodes and writes out all the authorization information to +// the given writer +func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error { + // Encode sensitive data into a new/temp struct + tmpAuthConfigs := make(map[string]types.AuthConfig, len(configFile.AuthConfigs)) + for k, authConfig := range configFile.AuthConfigs { + authCopy := authConfig + // encode and save the authstring, while blanking out the original fields + authCopy.Auth = encodeAuth(&authCopy) + authCopy.Username = "" + authCopy.Password = "" + authCopy.ServerAddress = "" + tmpAuthConfigs[k] = authCopy + } + + saveAuthConfigs := configFile.AuthConfigs + configFile.AuthConfigs = tmpAuthConfigs + defer func() { configFile.AuthConfigs = saveAuthConfigs }() + + // User-Agent header is automatically set, and should not be stored in the configuration + for v := range configFile.HTTPHeaders { + if strings.EqualFold(v, "User-Agent") { + delete(configFile.HTTPHeaders, v) + } + } + + data, err := json.MarshalIndent(configFile, "", "\t") + if err != nil { + return err + } + _, err = writer.Write(data) + return err +} + +// Save encodes and writes out all the authorization information +func (configFile *ConfigFile) Save() (retErr error) { + if configFile.Filename == "" { + return errors.Errorf("Can't save config with empty filename") + } + + dir := filepath.Dir(configFile.Filename) + if err := os.MkdirAll(dir, 0o700); err != nil { + return err + } + temp, err := os.CreateTemp(dir, filepath.Base(configFile.Filename)) + if err != nil { + return err + } + defer func() { + temp.Close() + if retErr != nil { + if err := os.Remove(temp.Name()); err != nil { + logrus.WithError(err).WithField("file", temp.Name()).Debug("Error cleaning up temp file") + } + } + }() + + err = configFile.SaveToWriter(temp) + if err != nil { + return err + } + + if err := temp.Close(); err != nil { + return errors.Wrap(err, "error closing temp file") + } + + // Handle situation where the configfile is a symlink + cfgFile := configFile.Filename + if f, err := os.Readlink(cfgFile); err == nil { + cfgFile = f + } + + // Try copying the current config file (if any) ownership and permissions + copyFilePermissions(cfgFile, temp.Name()) + return os.Rename(temp.Name(), cfgFile) +} + +// ParseProxyConfig computes proxy configuration by retrieving the config for the provided host and +// then checking this against any environment variables provided to the container +func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts map[string]*string) map[string]*string { + var cfgKey string + + if _, ok := configFile.Proxies[host]; !ok { + cfgKey = "default" + } else { + cfgKey = host + } + + config := configFile.Proxies[cfgKey] + permitted := map[string]*string{ + "HTTP_PROXY": &config.HTTPProxy, + "HTTPS_PROXY": &config.HTTPSProxy, + "NO_PROXY": &config.NoProxy, + "FTP_PROXY": &config.FTPProxy, + "ALL_PROXY": &config.AllProxy, + } + m := runOpts + if m == nil { + m = make(map[string]*string) + } + for k := range permitted { + if *permitted[k] == "" { + continue + } + if _, ok := m[k]; !ok { + m[k] = permitted[k] + } + if _, ok := m[strings.ToLower(k)]; !ok { + m[strings.ToLower(k)] = permitted[k] + } + } + return m +} + +// encodeAuth creates a base64 encoded string to containing authorization information +func encodeAuth(authConfig *types.AuthConfig) string { + if authConfig.Username == "" && authConfig.Password == "" { + return "" + } + + authStr := authConfig.Username + ":" + authConfig.Password + msg := []byte(authStr) + encoded := make([]byte, base64.StdEncoding.EncodedLen(len(msg))) + base64.StdEncoding.Encode(encoded, msg) + return string(encoded) +} + +// decodeAuth decodes a base64 encoded string and returns username and password +func decodeAuth(authStr string) (string, string, error) { + if authStr == "" { + return "", "", nil + } + + decLen := base64.StdEncoding.DecodedLen(len(authStr)) + decoded := make([]byte, decLen) + authByte := []byte(authStr) + n, err := base64.StdEncoding.Decode(decoded, authByte) + if err != nil { + return "", "", err + } + if n > decLen { + return "", "", errors.Errorf("Something went wrong decoding auth config") + } + userName, password, ok := strings.Cut(string(decoded), ":") + if !ok || userName == "" { + return "", "", errors.Errorf("Invalid auth configuration file") + } + return userName, strings.Trim(password, "\x00"), nil +} + +// GetCredentialsStore returns a new credentials store from the settings in the +// configuration file +func (configFile *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store { + if helper := getConfiguredCredentialStore(configFile, registryHostname); helper != "" { + return newNativeStore(configFile, helper) + } + return credentials.NewFileStore(configFile) +} + +// var for unit testing. +var newNativeStore = func(configFile *ConfigFile, helperSuffix string) credentials.Store { + return credentials.NewNativeStore(configFile, helperSuffix) +} + +// GetAuthConfig for a repository from the credential store +func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error) { + return configFile.GetCredentialsStore(registryHostname).Get(registryHostname) +} + +// getConfiguredCredentialStore returns the credential helper configured for the +// given registry, the default credsStore, or the empty string if neither are +// configured. +func getConfiguredCredentialStore(c *ConfigFile, registryHostname string) string { + if c.CredentialHelpers != nil && registryHostname != "" { + if helper, exists := c.CredentialHelpers[registryHostname]; exists { + return helper + } + } + return c.CredentialsStore +} + +// GetAllCredentials returns all of the credentials stored in all of the +// configured credential stores. +func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error) { + auths := make(map[string]types.AuthConfig) + addAll := func(from map[string]types.AuthConfig) { + for reg, ac := range from { + auths[reg] = ac + } + } + + defaultStore := configFile.GetCredentialsStore("") + newAuths, err := defaultStore.GetAll() + if err != nil { + return nil, err + } + addAll(newAuths) + + // Auth configs from a registry-specific helper should override those from the default store. + for registryHostname := range configFile.CredentialHelpers { + newAuth, err := configFile.GetAuthConfig(registryHostname) + if err != nil { + logrus.WithError(err).Warnf("Failed to get credentials for registry: %s", registryHostname) + continue + } + auths[registryHostname] = newAuth + } + return auths, nil +} + +// GetFilename returns the file name that this config file is based on. +func (configFile *ConfigFile) GetFilename() string { + return configFile.Filename +} + +// PluginConfig retrieves the requested option for the given plugin. +func (configFile *ConfigFile) PluginConfig(pluginname, option string) (string, bool) { + if configFile.Plugins == nil { + return "", false + } + pluginConfig, ok := configFile.Plugins[pluginname] + if !ok { + return "", false + } + value, ok := pluginConfig[option] + return value, ok +} + +// SetPluginConfig sets the option to the given value for the given +// plugin. Passing a value of "" will remove the option. If removing +// the final config item for a given plugin then also cleans up the +// overall plugin entry. +func (configFile *ConfigFile) SetPluginConfig(pluginname, option, value string) { + if configFile.Plugins == nil { + configFile.Plugins = make(map[string]map[string]string) + } + pluginConfig, ok := configFile.Plugins[pluginname] + if !ok { + pluginConfig = make(map[string]string) + configFile.Plugins[pluginname] = pluginConfig + } + if value != "" { + pluginConfig[option] = value + } else { + delete(pluginConfig, option) + } + if len(pluginConfig) == 0 { + delete(configFile.Plugins, pluginname) + } +} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go b/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go new file mode 100644 index 000000000..06b811e7d --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go @@ -0,0 +1,35 @@ +//go:build !windows + +package configfile + +import ( + "os" + "syscall" +) + +// copyFilePermissions copies file ownership and permissions from "src" to "dst", +// ignoring any error during the process. +func copyFilePermissions(src, dst string) { + var ( + mode os.FileMode = 0o600 + uid, gid int + ) + + fi, err := os.Stat(src) + if err != nil { + return + } + if fi.Mode().IsRegular() { + mode = fi.Mode() + } + if err := os.Chmod(dst, mode); err != nil { + return + } + + uid = int(fi.Sys().(*syscall.Stat_t).Uid) + gid = int(fi.Sys().(*syscall.Stat_t).Gid) + + if uid > 0 && gid > 0 { + _ = os.Chown(dst, uid, gid) + } +} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go b/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go new file mode 100644 index 000000000..42fffc39a --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go @@ -0,0 +1,5 @@ +package configfile + +func copyFilePermissions(src, dst string) { + // TODO implement for Windows +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/credentials.go b/vendor/github.com/docker/cli/cli/config/credentials/credentials.go new file mode 100644 index 000000000..28d58ec48 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/credentials.go @@ -0,0 +1,17 @@ +package credentials + +import ( + "github.com/docker/cli/cli/config/types" +) + +// Store is the interface that any credentials store must implement. +type Store interface { + // Erase removes credentials from the store for a given server. + Erase(serverAddress string) error + // Get retrieves credentials from the store for a given server. + Get(serverAddress string) (types.AuthConfig, error) + // GetAll retrieves all the credentials from the store. + GetAll() (map[string]types.AuthConfig, error) + // Store saves credentials in the store. + Store(authConfig types.AuthConfig) error +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go new file mode 100644 index 000000000..a36afc41f --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go @@ -0,0 +1,22 @@ +package credentials + +import "os/exec" + +// DetectDefaultStore return the default credentials store for the platform if +// no user-defined store is passed, and the store executable is available. +func DetectDefaultStore(store string) string { + if store != "" { + // use user-defined + return store + } + + platformDefault := defaultCredentialsStore() + if platformDefault == "" { + return "" + } + + if _, err := exec.LookPath(remoteCredentialsPrefix + platformDefault); err != nil { + return "" + } + return platformDefault +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go new file mode 100644 index 000000000..5d42dec62 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go @@ -0,0 +1,5 @@ +package credentials + +func defaultCredentialsStore() string { + return "osxkeychain" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go new file mode 100644 index 000000000..a9012c6d4 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go @@ -0,0 +1,13 @@ +package credentials + +import ( + "os/exec" +) + +func defaultCredentialsStore() string { + if _, err := exec.LookPath("pass"); err == nil { + return "pass" + } + + return "secretservice" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go new file mode 100644 index 000000000..40c16eb83 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go @@ -0,0 +1,7 @@ +//go:build !windows && !darwin && !linux + +package credentials + +func defaultCredentialsStore() string { + return "" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go new file mode 100644 index 000000000..bb799ca61 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go @@ -0,0 +1,5 @@ +package credentials + +func defaultCredentialsStore() string { + return "wincred" +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go new file mode 100644 index 000000000..ea30fc300 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go @@ -0,0 +1,81 @@ +package credentials + +import ( + "strings" + + "github.com/docker/cli/cli/config/types" +) + +type store interface { + Save() error + GetAuthConfigs() map[string]types.AuthConfig + GetFilename() string +} + +// fileStore implements a credentials store using +// the docker configuration file to keep the credentials in plain text. +type fileStore struct { + file store +} + +// NewFileStore creates a new file credentials store. +func NewFileStore(file store) Store { + return &fileStore{file: file} +} + +// Erase removes the given credentials from the file store. +func (c *fileStore) Erase(serverAddress string) error { + delete(c.file.GetAuthConfigs(), serverAddress) + return c.file.Save() +} + +// Get retrieves credentials for a specific server from the file store. +func (c *fileStore) Get(serverAddress string) (types.AuthConfig, error) { + authConfig, ok := c.file.GetAuthConfigs()[serverAddress] + if !ok { + // Maybe they have a legacy config file, we will iterate the keys converting + // them to the new format and testing + for r, ac := range c.file.GetAuthConfigs() { + if serverAddress == ConvertToHostname(r) { + return ac, nil + } + } + + authConfig = types.AuthConfig{} + } + return authConfig, nil +} + +func (c *fileStore) GetAll() (map[string]types.AuthConfig, error) { + return c.file.GetAuthConfigs(), nil +} + +// Store saves the given credentials in the file store. +func (c *fileStore) Store(authConfig types.AuthConfig) error { + authConfigs := c.file.GetAuthConfigs() + authConfigs[authConfig.ServerAddress] = authConfig + return c.file.Save() +} + +func (c *fileStore) GetFilename() string { + return c.file.GetFilename() +} + +func (c *fileStore) IsFileStore() bool { + return true +} + +// ConvertToHostname converts a registry url which has http|https prepended +// to just an hostname. +// Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies. +func ConvertToHostname(url string) string { + stripped := url + if strings.HasPrefix(url, "http://") { + stripped = strings.TrimPrefix(url, "http://") + } else if strings.HasPrefix(url, "https://") { + stripped = strings.TrimPrefix(url, "https://") + } + + hostName, _, _ := strings.Cut(stripped, "/") + return hostName +} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/native_store.go b/vendor/github.com/docker/cli/cli/config/credentials/native_store.go new file mode 100644 index 000000000..b9af145b9 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/credentials/native_store.go @@ -0,0 +1,147 @@ +package credentials + +import ( + "github.com/docker/cli/cli/config/types" + "github.com/docker/docker-credential-helpers/client" + "github.com/docker/docker-credential-helpers/credentials" +) + +const ( + remoteCredentialsPrefix = "docker-credential-" //nolint:gosec // ignore G101: Potential hardcoded credentials + tokenUsername = "" +) + +// nativeStore implements a credentials store +// using native keychain to keep credentials secure. +// It piggybacks into a file store to keep users' emails. +type nativeStore struct { + programFunc client.ProgramFunc + fileStore Store +} + +// NewNativeStore creates a new native store that +// uses a remote helper program to manage credentials. +func NewNativeStore(file store, helperSuffix string) Store { + name := remoteCredentialsPrefix + helperSuffix + return &nativeStore{ + programFunc: client.NewShellProgramFunc(name), + fileStore: NewFileStore(file), + } +} + +// Erase removes the given credentials from the native store. +func (c *nativeStore) Erase(serverAddress string) error { + if err := client.Erase(c.programFunc, serverAddress); err != nil { + return err + } + + // Fallback to plain text store to remove email + return c.fileStore.Erase(serverAddress) +} + +// Get retrieves credentials for a specific server from the native store. +func (c *nativeStore) Get(serverAddress string) (types.AuthConfig, error) { + // load user email if it exist or an empty auth config. + auth, _ := c.fileStore.Get(serverAddress) + + creds, err := c.getCredentialsFromStore(serverAddress) + if err != nil { + return auth, err + } + auth.Username = creds.Username + auth.IdentityToken = creds.IdentityToken + auth.Password = creds.Password + auth.ServerAddress = creds.ServerAddress + + return auth, nil +} + +// GetAll retrieves all the credentials from the native store. +func (c *nativeStore) GetAll() (map[string]types.AuthConfig, error) { + auths, err := c.listCredentialsInStore() + if err != nil { + return nil, err + } + + // Emails are only stored in the file store. + // This call can be safely eliminated when emails are removed. + fileConfigs, _ := c.fileStore.GetAll() + + authConfigs := make(map[string]types.AuthConfig) + for registry := range auths { + creds, err := c.getCredentialsFromStore(registry) + if err != nil { + return nil, err + } + ac := fileConfigs[registry] // might contain Email + ac.Username = creds.Username + ac.Password = creds.Password + ac.IdentityToken = creds.IdentityToken + if ac.ServerAddress == "" { + ac.ServerAddress = creds.ServerAddress + } + authConfigs[registry] = ac + } + + return authConfigs, nil +} + +// Store saves the given credentials in the file store. +func (c *nativeStore) Store(authConfig types.AuthConfig) error { + if err := c.storeCredentialsInStore(authConfig); err != nil { + return err + } + authConfig.Username = "" + authConfig.Password = "" + authConfig.IdentityToken = "" + + // Fallback to old credential in plain text to save only the email + return c.fileStore.Store(authConfig) +} + +// storeCredentialsInStore executes the command to store the credentials in the native store. +func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error { + creds := &credentials.Credentials{ + ServerURL: config.ServerAddress, + Username: config.Username, + Secret: config.Password, + } + + if config.IdentityToken != "" { + creds.Username = tokenUsername + creds.Secret = config.IdentityToken + } + + return client.Store(c.programFunc, creds) +} + +// getCredentialsFromStore executes the command to get the credentials from the native store. +func (c *nativeStore) getCredentialsFromStore(serverAddress string) (types.AuthConfig, error) { + var ret types.AuthConfig + + creds, err := client.Get(c.programFunc, serverAddress) + if err != nil { + if credentials.IsErrCredentialsNotFound(err) { + // do not return an error if the credentials are not + // in the keychain. Let docker ask for new credentials. + return ret, nil + } + return ret, err + } + + if creds.Username == tokenUsername { + ret.IdentityToken = creds.Secret + } else { + ret.Password = creds.Secret + ret.Username = creds.Username + } + + ret.ServerAddress = serverAddress + return ret, nil +} + +// listCredentialsInStore returns a listing of stored credentials as a map of +// URL -> username. +func (c *nativeStore) listCredentialsInStore() (map[string]string, error) { + return client.List(c.programFunc) +} diff --git a/vendor/github.com/docker/cli/cli/config/types/authconfig.go b/vendor/github.com/docker/cli/cli/config/types/authconfig.go new file mode 100644 index 000000000..056af6b84 --- /dev/null +++ b/vendor/github.com/docker/cli/cli/config/types/authconfig.go @@ -0,0 +1,22 @@ +package types + +// AuthConfig contains authorization information for connecting to a Registry +type AuthConfig struct { + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + Auth string `json:"auth,omitempty"` + + // Email is an optional value associated with the username. + // This field is deprecated and will be removed in a later + // version of docker. + Email string `json:"email,omitempty"` + + ServerAddress string `json:"serveraddress,omitempty"` + + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + IdentityToken string `json:"identitytoken,omitempty"` + + // RegistryToken is a bearer token to be sent to a registry + RegistryToken string `json:"registrytoken,omitempty"` +} diff --git a/vendor/github.com/docker/distribution/.dockerignore b/vendor/github.com/docker/distribution/.dockerignore new file mode 100644 index 000000000..e660fd93d --- /dev/null +++ b/vendor/github.com/docker/distribution/.dockerignore @@ -0,0 +1 @@ +bin/ diff --git a/vendor/github.com/docker/distribution/.gitignore b/vendor/github.com/docker/distribution/.gitignore new file mode 100644 index 000000000..4cf7888e9 --- /dev/null +++ b/vendor/github.com/docker/distribution/.gitignore @@ -0,0 +1,38 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# never checkin from the bin file (for now) +bin/* + +# Test key files +*.pem + +# Cover profiles +*.out + +# Editor/IDE specific files. +*.sublime-project +*.sublime-workspace +.idea/* diff --git a/vendor/github.com/docker/distribution/.golangci.yml b/vendor/github.com/docker/distribution/.golangci.yml new file mode 100644 index 000000000..61dd0e00e --- /dev/null +++ b/vendor/github.com/docker/distribution/.golangci.yml @@ -0,0 +1,33 @@ +linters: + enable: + - staticcheck + - unconvert + - gofmt + - goimports + - golint + - ineffassign + - vet + - unused + - misspell + disable: + - errcheck + +linters-settings: + revive: + rules: + # TODO(thaJeztah): temporarily disabled the "unused-parameter" check. + # It produces many warnings, and some of those may need to be looked at. + - name: unused-parameter + disabled: true + +run: + deadline: 2m + skip-dirs: + - vendor + +issues: + exclude-rules: + # io/ioutil is deprecated, but won't be removed until Go v2. It's safe to ignore for the release/2.8 branch. + - text: "SA1019: \"io/ioutil\" has been deprecated since Go 1.16" + linters: + - staticcheck diff --git a/vendor/github.com/docker/distribution/.mailmap b/vendor/github.com/docker/distribution/.mailmap new file mode 100644 index 000000000..d7b832d9e --- /dev/null +++ b/vendor/github.com/docker/distribution/.mailmap @@ -0,0 +1,54 @@ +Stephen J Day Stephen Day +Stephen J Day Stephen Day +Olivier Gambier Olivier Gambier +Brian Bland Brian Bland +Brian Bland Brian Bland +Josh Hawn Josh Hawn +Richard Scothern Richard +Richard Scothern Richard Scothern +Andrew Meredith Andrew Meredith +harche harche +Jessie Frazelle +Sharif Nassar Sharif Nassar +Sven Dowideit Sven Dowideit +Vincent Giersch Vincent Giersch +davidli davidli +Omer Cohen Omer Cohen +Eric Yang Eric Yang +Nikita Tarasov Nikita +Yu Wang yuwaMSFT2 +Yu Wang Yu Wang (UC) +Olivier Gambier dmp +Olivier Gambier Olivier +Olivier Gambier Olivier +Elsan Li 李楠 elsanli(李楠) +Rui Cao ruicao +Gwendolynne Barr gbarr01 +Haibing Zhou 周海兵 zhouhaibing089 +Feng Honglin tifayuki +Helen Xie Helen-xie +Mike Brown Mike Brown +Manish Tomar Manish Tomar +Sakeven Jiang sakeven +Milos Gajdos Milos Gajdos +Derek McGowan Derek McGowa +Adrian Plata Adrian Plata <@users.noreply.github.com> +Sebastiaan van Stijn Sebastiaan van Stijn +Vishesh Jindal Vishesh Jindal +Wang Yan Wang Yan +Chris Patterson Chris Patterson +Eohyung Lee Eohyung Lee +João Pereira <484633+joaodrp@users.noreply.github.com> +Smasherr Smasherr +Thomas Berger Thomas Berger +Samuel Karp Samuel Karp +Justin Cormack +sayboras +CrazyMax <1951866+crazy-max@users.noreply.github.com> +Hayley Swimelar +Jose D. Gomez R +Shengjing Zhu +Silvin Lubecki <31478878+silvin-lubecki@users.noreply.github.com> +James Hewitt +Marcus Pettersen Irgens +Ben Manuel diff --git a/vendor/github.com/docker/distribution/BUILDING.md b/vendor/github.com/docker/distribution/BUILDING.md new file mode 100644 index 000000000..4c43b03cb --- /dev/null +++ b/vendor/github.com/docker/distribution/BUILDING.md @@ -0,0 +1,117 @@ + +# Building the registry source + +## Use-case + +This is useful if you intend to actively work on the registry. + +### Alternatives + +Most people should use the [official Registry docker image](https://hub.docker.com/r/library/registry/). + +People looking for advanced operational use cases might consider rolling their own image with a custom Dockerfile inheriting `FROM registry:2`. + +OS X users who want to run natively can do so following [the instructions here](https://github.com/docker/docker.github.io/blob/master/registry/recipes/osx-setup-guide.md). + +### Gotchas + +You are expected to know your way around with go & git. + +If you are a casual user with no development experience, and no preliminary knowledge of go, building from source is probably not a good solution for you. + +## Build the development environment + +The first prerequisite of properly building distribution targets is to have a Go +development environment setup. Please follow [How to Write Go Code](https://golang.org/doc/code.html) +for proper setup. If done correctly, you should have a GOROOT and GOPATH set in the +environment. + +If a Go development environment is setup, one can use `go get` to install the +`registry` command from the current latest: + + go get github.com/docker/distribution/cmd/registry + +The above will install the source repository into the `GOPATH`. + +Now create the directory for the registry data (this might require you to set permissions properly) + + mkdir -p /var/lib/registry + +... or alternatively `export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere` if you want to store data into another location. + +The `registry` +binary can then be run with the following: + + $ $GOPATH/bin/registry --version + $GOPATH/bin/registry github.com/docker/distribution v2.0.0-alpha.1+unknown + +> __NOTE:__ While you do not need to use `go get` to checkout the distribution +> project, for these build instructions to work, the project must be checked +> out in the correct location in the `GOPATH`. This should almost always be +> `$GOPATH/src/github.com/docker/distribution`. + +The registry can be run with the default config using the following +incantation: + + $ $GOPATH/bin/registry serve $GOPATH/src/github.com/docker/distribution/cmd/registry/config-example.yml + INFO[0000] endpoint local-5003 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] endpoint local-8083 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] listening on :5000 app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] debug server listening localhost:5001 + +If it is working, one should see the above log messages. + +### Repeatable Builds + +For the full development experience, one should `cd` into +`$GOPATH/src/github.com/docker/distribution`. From there, the regular `go` +commands, such as `go test`, should work per package (please see +[Developing](#developing) if they don't work). + +A `Makefile` has been provided as a convenience to support repeatable builds. +Please install the following into `GOPATH` for it to work: + + go get github.com/golang/lint/golint + +Once these commands are available in the `GOPATH`, run `make` to get a full +build: + + $ make + + clean + + fmt + + vet + + lint + + build + github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar + github.com/sirupsen/logrus + github.com/docker/libtrust + ... + github.com/yvasiyarov/gorelic + github.com/docker/distribution/registry/handlers + github.com/docker/distribution/cmd/registry + + test + ... + ok github.com/docker/distribution/digest 7.875s + ok github.com/docker/distribution/manifest 0.028s + ok github.com/docker/distribution/notifications 17.322s + ? github.com/docker/distribution/registry [no test files] + ok github.com/docker/distribution/registry/api/v2 0.101s + ? github.com/docker/distribution/registry/auth [no test files] + ok github.com/docker/distribution/registry/auth/silly 0.011s + ... + + /Users/sday/go/src/github.com/docker/distribution/bin/registry + + /Users/sday/go/src/github.com/docker/distribution/bin/registry-api-descriptor-template + + binaries + +The above provides a repeatable build using the contents of the vendor +directory. This includes formatting, vetting, linting, building, +testing and generating tagged binaries. We can verify this worked by running +the registry binary generated in the "./bin" directory: + + $ ./bin/registry --version + ./bin/registry github.com/docker/distribution v2.0.0-alpha.2-80-g16d8b2c.m + +### Optional build tags + +Optional [build tags](http://golang.org/pkg/go/build/) can be provided using +the environment variable `BUILDTAGS`. diff --git a/vendor/github.com/docker/distribution/CONTRIBUTING.md b/vendor/github.com/docker/distribution/CONTRIBUTING.md new file mode 100644 index 000000000..4c067d9e7 --- /dev/null +++ b/vendor/github.com/docker/distribution/CONTRIBUTING.md @@ -0,0 +1,148 @@ +# Contributing to the registry + +## Before reporting an issue... + +### If your problem is with... + + - automated builds + - your account on the [Docker Hub](https://hub.docker.com/) + - any other [Docker Hub](https://hub.docker.com/) issue + +Then please do not report your issue here - you should instead report it to [https://support.docker.com](https://support.docker.com) + +### If you... + + - need help setting up your registry + - can't figure out something + - are not sure what's going on or what your problem is + +Then please do not open an issue here yet - you should first try one of the following support forums: + + - irc: #docker-distribution on freenode + - mailing-list: or https://groups.google.com/a/dockerproject.org/forum/#!forum/distribution + +### Reporting security issues + +The Docker maintainers take security seriously. If you discover a security +issue, please bring it to their attention right away! + +Please **DO NOT** file a public issue, instead send your report privately to +[security@docker.com](mailto:security@docker.com). + +## Reporting an issue properly + +By following these simple rules you will get better and faster feedback on your issue. + + - search the bugtracker for an already reported issue + +### If you found an issue that describes your problem: + + - please read other user comments first, and confirm this is the same issue: a given error condition might be indicative of different problems - you may also find a workaround in the comments + - please refrain from adding "same thing here" or "+1" comments + - you don't need to comment on an issue to get notified of updates: just hit the "subscribe" button + - comment if you have some new, technical and relevant information to add to the case + - __DO NOT__ comment on closed issues or merged PRs. If you think you have a related problem, open up a new issue and reference the PR or issue. + +### If you have not found an existing issue that describes your problem: + + 1. create a new issue, with a succinct title that describes your issue: + - bad title: "It doesn't work with my docker" + - good title: "Private registry push fail: 400 error with E_INVALID_DIGEST" + 2. copy the output of: + - `docker version` + - `docker info` + - `docker exec registry --version` + 3. copy the command line you used to launch your Registry + 4. restart your docker daemon in debug mode (add `-D` to the daemon launch arguments) + 5. reproduce your problem and get your docker daemon logs showing the error + 6. if relevant, copy your registry logs that show the error + 7. provide any relevant detail about your specific Registry configuration (e.g., storage backend used) + 8. indicate if you are using an enterprise proxy, Nginx, or anything else between you and your Registry + +## Contributing a patch for a known bug, or a small correction + +You should follow the basic GitHub workflow: + + 1. fork + 2. commit a change + 3. make sure the tests pass + 4. PR + +Additionally, you must [sign your commits](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work). It's very simple: + + - configure your name with git: `git config user.name "Real Name" && git config user.email mail@example.com` + - sign your commits using `-s`: `git commit -s -m "My commit"` + +Some simple rules to ensure quick merge: + + - clearly point to the issue(s) you want to fix in your PR comment (e.g., `closes #12345`) + - prefer multiple (smaller) PRs addressing individual issues over a big one trying to address multiple issues at once + - if you need to amend your PR following comments, please squash instead of adding more commits + +## Contributing new features + +You are heavily encouraged to first discuss what you want to do. You can do so on the irc channel, or by opening an issue that clearly describes the use case you want to fulfill, or the problem you are trying to solve. + +If this is a major new feature, you should then submit a proposal that describes your technical solution and reasoning. +If you did discuss it first, this will likely be greenlighted very fast. It's advisable to address all feedback on this proposal before starting actual work. + +Then you should submit your implementation, clearly linking to the issue (and possible proposal). + +Your PR will be reviewed by the community, then ultimately by the project maintainers, before being merged. + +It's mandatory to: + + - interact respectfully with other community members and maintainers - more generally, you are expected to abide by the [Docker community rules](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#docker-community-guidelines) + - address maintainers' comments and modify your submission accordingly + - write tests for any new code + +Complying to these simple rules will greatly accelerate the review process, and will ensure you have a pleasant experience in contributing code to the Registry. + +Have a look at a great, successful contribution: the [Swift driver PR](https://github.com/docker/distribution/pull/493) + +## Coding Style + +Unless explicitly stated, we follow all coding guidelines from the Go +community. While some of these standards may seem arbitrary, they somehow seem +to result in a solid, consistent codebase. + +It is possible that the code base does not currently comply with these +guidelines. We are not looking for a massive PR that fixes this, since that +goes against the spirit of the guidelines. All new contributions should make a +best effort to clean up and make the code base better than they left it. +Obviously, apply your best judgement. Remember, the goal here is to make the +code base easier for humans to navigate and understand. Always keep that in +mind when nudging others to comply. + +The rules: + +1. All code should be formatted with `gofmt -s`. +2. All code should pass the default levels of + [`golint`](https://github.com/golang/lint). +3. All code should follow the guidelines covered in [Effective + Go](http://golang.org/doc/effective_go.html) and [Go Code Review + Comments](https://github.com/golang/go/wiki/CodeReviewComments). +4. Comment the code. Tell us the why, the history and the context. +5. Document _all_ declarations and methods, even private ones. Declare + expectations, caveats and anything else that may be important. If a type + gets exported, having the comments already there will ensure it's ready. +6. Variable name length should be proportional to its context and no longer. + `noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`. + In practice, short methods will have short variable names and globals will + have longer names. +7. No underscores in package names. If you need a compound name, step back, + and re-examine why you need a compound name. If you still think you need a + compound name, lose the underscore. +8. No utils or helpers packages. If a function is not general enough to + warrant its own package, it has not been written generally enough to be a + part of a util package. Just leave it unexported and well-documented. +9. All tests should run with `go test` and outside tooling should not be + required. No, we don't need another unit testing framework. Assertion + packages are acceptable if they provide _real_ incremental value. +10. Even though we call these "rules" above, they are actually just + guidelines. Since you've read all the rules, you now know that. + +If you are having trouble getting into the mood of idiomatic Go, we recommend +reading through [Effective Go](http://golang.org/doc/effective_go.html). The +[Go Blog](http://blog.golang.org/) is also a great resource. Drinking the +kool-aid is a lot easier than going thirsty. diff --git a/vendor/github.com/docker/distribution/Dockerfile b/vendor/github.com/docker/distribution/Dockerfile new file mode 100644 index 000000000..ebd42c242 --- /dev/null +++ b/vendor/github.com/docker/distribution/Dockerfile @@ -0,0 +1,60 @@ +# syntax=docker/dockerfile:1 + +ARG GO_VERSION=1.20.8 +ARG ALPINE_VERSION=3.18 +ARG XX_VERSION=1.2.1 + +FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base +COPY --from=xx / / +RUN apk add --no-cache bash coreutils file git +ENV GO111MODULE=auto +ENV CGO_ENABLED=0 +WORKDIR /go/src/github.com/docker/distribution + +FROM base AS version +ARG PKG="github.com/docker/distribution" +RUN --mount=target=. \ + VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi); \ + echo "-X ${PKG}/version.Version=${VERSION#v} -X ${PKG}/version.Revision=${REVISION} -X ${PKG}/version.Package=${PKG}" | tee /tmp/.ldflags; \ + echo -n "${VERSION}" | tee /tmp/.version; + +FROM base AS build +ARG TARGETPLATFORM +ARG LDFLAGS="-s -w" +ARG BUILDTAGS="include_oss,include_gcs" +RUN --mount=type=bind,target=/go/src/github.com/docker/distribution,rw \ + --mount=type=cache,target=/root/.cache/go-build \ + --mount=target=/go/pkg/mod,type=cache \ + --mount=type=bind,source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \ + set -x ; xx-go build -tags "${BUILDTAGS}" -trimpath -ldflags "$(cat /tmp/.ldflags) ${LDFLAGS}" -o /usr/bin/registry ./cmd/registry \ + && xx-verify --static /usr/bin/registry + +FROM scratch AS binary +COPY --from=build /usr/bin/registry / + +FROM base AS releaser +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +WORKDIR /work +RUN --mount=from=binary,target=/build \ + --mount=type=bind,target=/src \ + --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \ + VERSION=$(cat /tmp/.version) \ + && mkdir -p /out \ + && cp /build/registry /src/README.md /src/LICENSE . \ + && tar -czvf "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.gz" * \ + && sha256sum -z "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.gz" | awk '{ print $1 }' > "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.gz.sha256" + +FROM scratch AS artifact +COPY --from=releaser /out / + +FROM alpine:${ALPINE_VERSION} +RUN apk add --no-cache ca-certificates +COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml +COPY --from=binary /registry /bin/registry +VOLUME ["/var/lib/registry"] +EXPOSE 5000 +ENTRYPOINT ["registry"] +CMD ["serve", "/etc/docker/registry/config.yml"] diff --git a/vendor/github.com/docker/distribution/LICENSE b/vendor/github.com/docker/distribution/LICENSE new file mode 100644 index 000000000..e06d20818 --- /dev/null +++ b/vendor/github.com/docker/distribution/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/vendor/github.com/docker/distribution/MAINTAINERS b/vendor/github.com/docker/distribution/MAINTAINERS new file mode 100644 index 000000000..3183620c5 --- /dev/null +++ b/vendor/github.com/docker/distribution/MAINTAINERS @@ -0,0 +1,243 @@ +# Distribution maintainers file +# +# This file describes who runs the docker/distribution project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# + +[Rules] + + [Rules.maintainers] + + title = "What is a maintainer?" + + text = """ +There are different types of maintainers, with different responsibilities, but +all maintainers have 3 things in common: + +1) They share responsibility in the project's success. +2) They have made a long-term, recurring time investment to improve the project. +3) They spend that time doing whatever needs to be done, not necessarily what +is the most interesting or fun. + +Maintainers are often under-appreciated, because their work is harder to appreciate. +It's easy to appreciate a really cool and technically advanced feature. It's harder +to appreciate the absence of bugs, the slow but steady improvement in stability, +or the reliability of a release process. But those things distinguish a good +project from a great one. +""" + + [Rules.reviewer] + + title = "What is a reviewer?" + + text = """ +A reviewer is a core role within the project. +They share in reviewing issues and pull requests and their LGTM count towards the +required LGTM count to merge a code change into the project. + +Reviewers are part of the organization but do not have write access. +Becoming a reviewer is a core aspect in the journey to becoming a maintainer. +""" + + [Rules.adding-maintainers] + + title = "How are maintainers added?" + + text = """ +Maintainers are first and foremost contributors that have shown they are +committed to the long term success of a project. Contributors wanting to become +maintainers are expected to be deeply involved in contributing code, pull +request review, and triage of issues in the project for more than three months. + +Just contributing does not make you a maintainer, it is about building trust +with the current maintainers of the project and being a person that they can +depend on and trust to make decisions in the best interest of the project. + +Periodically, the existing maintainers curate a list of contributors that have +shown regular activity on the project over the prior months. From this list, +maintainer candidates are selected and proposed on the maintainers mailing list. + +After a candidate has been announced on the maintainers mailing list, the +existing maintainers are given five business days to discuss the candidate, +raise objections and cast their vote. Candidates must be approved by at least 66% of the current maintainers by adding their vote on the mailing +list. Only maintainers of the repository that the candidate is proposed for are +allowed to vote. + +If a candidate is approved, a maintainer will contact the candidate to invite +the candidate to open a pull request that adds the contributor to the +MAINTAINERS file. The candidate becomes a maintainer once the pull request is +merged. +""" + + [Rules.stepping-down-policy] + + title = "Stepping down policy" + + text = """ +Life priorities, interests, and passions can change. If you're a maintainer but +feel you must remove yourself from the list, inform other maintainers that you +intend to step down, and if possible, help find someone to pick up your work. +At the very least, ensure your work can be continued where you left off. + +After you've informed other maintainers, create a pull request to remove +yourself from the MAINTAINERS file. +""" + + [Rules.inactive-maintainers] + + title = "Removal of inactive maintainers" + + text = """ +Similar to the procedure for adding new maintainers, existing maintainers can +be removed from the list if they do not show significant activity on the +project. Periodically, the maintainers review the list of maintainers and their +activity over the last three months. + +If a maintainer has shown insufficient activity over this period, a neutral +person will contact the maintainer to ask if they want to continue being +a maintainer. If the maintainer decides to step down as a maintainer, they +open a pull request to be removed from the MAINTAINERS file. + +If the maintainer wants to remain a maintainer, but is unable to perform the +required duties they can be removed with a vote of at least 66% of +the current maintainers. An e-mail is sent to the +mailing list, inviting maintainers of the project to vote. The voting period is +five business days. Issues related to a maintainer's performance should be +discussed with them among the other maintainers so that they are not surprised +by a pull request removing them. +""" + + [Rules.decisions] + + title = "How are decisions made?" + + text = """ +Short answer: EVERYTHING IS A PULL REQUEST. + +distribution is an open-source project with an open design philosophy. This means +that the repository is the source of truth for EVERY aspect of the project, +including its philosophy, design, road map, and APIs. *If it's part of the +project, it's in the repo. If it's in the repo, it's part of the project.* + +As a result, all decisions can be expressed as changes to the repository. An +implementation change is a change to the source code. An API change is a change +to the API specification. A philosophy change is a change to the philosophy +manifesto, and so on. + +All decisions affecting distribution, big and small, follow the same 3 steps: + +* Step 1: Open a pull request. Anyone can do this. + +* Step 2: Discuss the pull request. Anyone can do this. + +* Step 3: Merge or refuse the pull request. Who does this depends on the nature +of the pull request and which areas of the project it affects. +""" + + [Rules.DCO] + + title = "Helping contributors with the DCO" + + text = """ +The [DCO or `Sign your work`]( +https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work) +requirement is not intended as a roadblock or speed bump. + +Some distribution contributors are not as familiar with `git`, or have used a web +based editor, and thus asking them to `git commit --amend -s` is not the best +way forward. + +In this case, maintainers can update the commits based on clause (c) of the DCO. +The most trivial way for a contributor to allow the maintainer to do this, is to +add a DCO signature in a pull requests's comment, or a maintainer can simply +note that the change is sufficiently trivial that it does not substantially +change the existing contribution - i.e., a spelling change. + +When you add someone's DCO, please also add your own to keep a log. +""" + + [Rules."no direct push"] + + title = "I'm a maintainer. Should I make pull requests too?" + + text = """ +Yes. Nobody should ever push to master directly. All changes should be +made through a pull request. +""" + + [Rules.tsc] + + title = "Conflict Resolution and technical disputes" + + text = """ +distribution defers to the [Technical Steering Committee](https://github.com/moby/tsc) for escalations and resolution on disputes for technical matters." + """ + + [Rules.meta] + + title = "How is this process changed?" + + text = "Just like everything else: by making a pull request :)" + +# Current project organization +[Org] + + [Org.Maintainers] + people = [ + "dmcgowan", + "dmp42", + "stevvooe", + ] + [Org.Reviewers] + people = [ + "manishtomar", + "caervs", + "davidswu", + "RobbKistler" + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.caervs] + Name = "Ryan Abrams" + Email = "rdabrams@gmail.com" + GitHub = "caervs" + + [people.davidswu] + Name = "David Wu" + Email = "dwu7401@gmail.com" + GitHub = "davidswu" + + [people.dmcgowan] + Name = "Derek McGowan" + Email = "derek@mcgstyle.net" + GitHub = "dmcgowan" + + [people.dmp42] + Name = "Olivier Gambier" + Email = "olivier@docker.com" + GitHub = "dmp42" + + [people.manishtomar] + Name = "Manish Tomar" + Email = "manish.tomar@docker.com" + GitHub = "manishtomar" + + [people.RobbKistler] + Name = "Robb Kistler" + Email = "robb.kistler@docker.com" + GitHub = "RobbKistler" + + [people.stevvooe] + Name = "Stephen Day" + Email = "stephen.day@docker.com" + GitHub = "stevvooe" diff --git a/vendor/github.com/docker/distribution/Makefile b/vendor/github.com/docker/distribution/Makefile new file mode 100644 index 000000000..dcdbcb547 --- /dev/null +++ b/vendor/github.com/docker/distribution/Makefile @@ -0,0 +1,102 @@ +# Root directory of the project (absolute path). +ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + +# Used to populate version variable in main package. +VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) +REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) + + +PKG=github.com/docker/distribution + +# Project packages. +PACKAGES=$(shell go list -tags "${BUILDTAGS}" ./... | grep -v /vendor/) +INTEGRATION_PACKAGE=${PKG} +COVERAGE_PACKAGES=$(filter-out ${PKG}/registry/storage/driver/%,${PACKAGES}) + + +# Project binaries. +COMMANDS=registry digest registry-api-descriptor-template + +# Allow turning off function inlining and variable registerization +ifeq (${DISABLE_OPTIMIZATION},true) + GO_GCFLAGS=-gcflags "-N -l" + VERSION:="$(VERSION)-noopt" +endif + +WHALE = "+" + +# Go files +# +TESTFLAGS_RACE= +GOFILES=$(shell find . -type f -name '*.go') +GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",) +GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) $(EXTRA_LDFLAGS)' + +BINARIES=$(addprefix bin/,$(COMMANDS)) + +# Flags passed to `go test` +TESTFLAGS ?= -v $(TESTFLAGS_RACE) +TESTFLAGS_PARALLEL ?= 8 + +.PHONY: all build binaries check clean test test-race test-full integration coverage +.DEFAULT: all + +all: binaries + +# This only needs to be generated by hand when cutting full releases. +version/version.go: + @echo "$(WHALE) $@" + ./version/version.sh > $@ + +check: ## run all linters (TODO: enable "unused", "varcheck", "ineffassign", "unconvert", "staticheck", "goimports", "structcheck") + @echo "$(WHALE) $@" + @GO111MODULE=off golangci-lint --build-tags "${BUILDTAGS}" run + +test: ## run tests, except integration test with test.short + @echo "$(WHALE) $@" + @go test ${GO_TAGS} -test.short ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) + +test-race: ## run tests, except integration test with test.short and race + @echo "$(WHALE) $@" + @go test ${GO_TAGS} -race -test.short ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) + +test-full: ## run tests, except integration tests + @echo "$(WHALE) $@" + @go test ${GO_TAGS} ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) + +integration: ## run integration tests + @echo "$(WHALE) $@" + @go test ${TESTFLAGS} -parallel ${TESTFLAGS_PARALLEL} ${INTEGRATION_PACKAGE} + +coverage: ## generate coverprofiles from the unit tests + @echo "$(WHALE) $@" + @rm -f coverage.txt + @go test ${GO_TAGS} -i ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${COVERAGE_PACKAGES}) 2> /dev/null + @( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${COVERAGE_PACKAGES}); do \ + go test ${GO_TAGS} ${TESTFLAGS} \ + -cover \ + -coverprofile=profile.out \ + -covermode=atomic $$pkg || exit; \ + if [ -f profile.out ]; then \ + cat profile.out >> coverage.txt; \ + rm profile.out; \ + fi; \ + done ) + +FORCE: + +# Build a binary from a cmd. +bin/%: cmd/% FORCE + @echo "$(WHALE) $@${BINARY_SUFFIX}" + @go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< + +binaries: $(BINARIES) ## build binaries + @echo "$(WHALE) $@" + +build: + @echo "$(WHALE) $@" + @go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${GO_LDFLAGS} ${GO_TAGS} $(PACKAGES) + +clean: ## clean up binaries + @echo "$(WHALE) $@" + @rm -f $(BINARIES) diff --git a/vendor/github.com/docker/distribution/README.md b/vendor/github.com/docker/distribution/README.md new file mode 100644 index 000000000..e513c18e9 --- /dev/null +++ b/vendor/github.com/docker/distribution/README.md @@ -0,0 +1,130 @@ +# Distribution + +The Docker toolset to pack, ship, store, and deliver content. + +This repository provides the Docker Registry 2.0 implementation +for storing and distributing Docker images. It supersedes the +[docker/docker-registry](https://github.com/docker/docker-registry) +project with a new API design, focused around security and performance. + + + +[![Circle CI](https://circleci.com/gh/docker/distribution/tree/master.svg?style=svg)](https://circleci.com/gh/docker/distribution/tree/master) +[![GoDoc](https://godoc.org/github.com/docker/distribution?status.svg)](https://godoc.org/github.com/docker/distribution) + +This repository contains the following components: + +|**Component** |Description | +|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **registry** | An implementation of the [Docker Registry HTTP API V2](docs/spec/api.md) for use with docker 1.6+. | +| **libraries** | A rich set of libraries for interacting with distribution components. Please see [godoc](https://godoc.org/github.com/docker/distribution) for details. **Note**: These libraries are **unstable**. | +| **specifications** | _Distribution_ related specifications are available in [docs/spec](docs/spec) | +| **documentation** | Docker's full documentation set is available at [docs.docker.com](https://docs.docker.com). This repository [contains the subset](docs/) related just to the registry. | + +### How does this integrate with Docker engine? + +This project should provide an implementation to a V2 API for use in the [Docker +core project](https://github.com/docker/docker). The API should be embeddable +and simplify the process of securely pulling and pushing content from `docker` +daemons. + +### What are the long term goals of the Distribution project? + +The _Distribution_ project has the further long term goal of providing a +secure tool chain for distributing content. The specifications, APIs and tools +should be as useful with Docker as they are without. + +Our goal is to design a professional grade and extensible content distribution +system that allow users to: + +* Enjoy an efficient, secured and reliable way to store, manage, package and + exchange content +* Hack/roll their own on top of healthy open-source components +* Implement their own home made solution through good specs, and solid + extensions mechanism. + +## More about Registry 2.0 + +The new registry implementation provides the following benefits: + +- faster push and pull +- new, more efficient implementation +- simplified deployment +- pluggable storage backend +- webhook notifications + +For information on upcoming functionality, please see [ROADMAP.md](ROADMAP.md). + +### Who needs to deploy a registry? + +By default, Docker users pull images from Docker's public registry instance. +[Installing Docker](https://docs.docker.com/engine/installation/) gives users this +ability. Users can also push images to a repository on Docker's public registry, +if they have a [Docker Hub](https://hub.docker.com/) account. + +For some users and even companies, this default behavior is sufficient. For +others, it is not. + +For example, users with their own software products may want to maintain a +registry for private, company images. Also, you may wish to deploy your own +image repository for images used to test or in continuous integration. For these +use cases and others, [deploying your own registry instance](https://github.com/docker/docker.github.io/blob/master/registry/deploying.md) +may be the better choice. + +### Migration to Registry 2.0 + +For those who have previously deployed their own registry based on the Registry +1.0 implementation and wish to deploy a Registry 2.0 while retaining images, +data migration is required. A tool to assist with migration efforts has been +created. For more information see [docker/migrator](https://github.com/docker/migrator). + +## Contribute + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute +issues, fixes, and patches to this project. If you are contributing code, see +the instructions for [building a development environment](BUILDING.md). + +## Support + +If any issues are encountered while using the _Distribution_ project, several +avenues are available for support: + + + + + + + + + + + + + + + + + + +
+ IRC + + #docker-distribution on FreeNode +
+ Issue Tracker + + github.com/docker/distribution/issues +
+ Google Groups + + https://groups.google.com/a/dockerproject.org/forum/#!forum/distribution +
+ Mailing List + + docker@dockerproject.org +
+ + +## License + +This project is distributed under [Apache License, Version 2.0](LICENSE). diff --git a/vendor/github.com/docker/distribution/ROADMAP.md b/vendor/github.com/docker/distribution/ROADMAP.md new file mode 100644 index 000000000..701127afe --- /dev/null +++ b/vendor/github.com/docker/distribution/ROADMAP.md @@ -0,0 +1,267 @@ +# Roadmap + +The Distribution Project consists of several components, some of which are +still being defined. This document defines the high-level goals of the +project, identifies the current components, and defines the release- +relationship to the Docker Platform. + +* [Distribution Goals](#distribution-goals) +* [Distribution Components](#distribution-components) +* [Project Planning](#project-planning): release-relationship to the Docker Platform. + +This road map is a living document, providing an overview of the goals and +considerations made in respect of the future of the project. + +## Distribution Goals + +- Replace the existing [docker registry](github.com/docker/docker-registry) + implementation as the primary implementation. +- Replace the existing push and pull code in the docker engine with the + distribution package. +- Define a strong data model for distributing docker images +- Provide a flexible distribution tool kit for use in the docker platform +- Unlock new distribution models + +## Distribution Components + +Components of the Distribution Project are managed via github [milestones](https://github.com/docker/distribution/milestones). Upcoming +features and bugfixes for a component will be added to the relevant milestone. If a feature or +bugfix is not part of a milestone, it is currently unscheduled for +implementation. + +* [Registry](#registry) +* [Distribution Package](#distribution-package) + +*** + +### Registry + +The new Docker registry is the main portion of the distribution repository. +Registry 2.0 is the first release of the next-generation registry. This was +primarily focused on implementing the [new registry +API](https://github.com/docker/distribution/blob/master/docs/spec/api.md), +with a focus on security and performance. + +Following from the Distribution project goals above, we have a set of goals +for registry v2 that we would like to follow in the design. New features +should be compared against these goals. + +#### Data Storage and Distribution First + +The registry's first goal is to provide a reliable, consistent storage +location for Docker images. The registry should only provide the minimal +amount of indexing required to fetch image data and no more. + +This means we should be selective in new features and API additions, including +those that may require expensive, ever growing indexes. Requests should be +servable in "constant time". + +#### Content Addressability + +All data objects used in the registry API should be content addressable. +Content identifiers should be secure and verifiable. This provides a secure, +reliable base from which to build more advanced content distribution systems. + +#### Content Agnostic + +In the past, changes to the image format would require large changes in Docker +and the Registry. By decoupling the distribution and image format, we can +allow the formats to progress without having to coordinate between the two. +This means that we should be focused on decoupling Docker from the registry +just as much as decoupling the registry from Docker. Such an approach will +allow us to unlock new distribution models that haven't been possible before. + +We can take this further by saying that the new registry should be content +agnostic. The registry provides a model of names, tags, manifests and content +addresses and that model can be used to work with content. + +#### Simplicity + +The new registry should be closer to a microservice component than its +predecessor. This means it should have a narrower API and a low number of +service dependencies. It should be easy to deploy. + +This means that other solutions should be explored before changing the API or +adding extra dependencies. If functionality is required, can it be added as an +extension or companion service. + +#### Extensibility + +The registry should provide extension points to add functionality. By keeping +the scope narrow, but providing the ability to add functionality. + +Features like search, indexing, synchronization and registry explorers fall +into this category. No such feature should be added unless we've found it +impossible to do through an extension. + +#### Active Feature Discussions + +The following are feature discussions that are currently active. + +If you don't see your favorite, unimplemented feature, feel free to contact us +via IRC or the mailing list and we can talk about adding it. The goal here is +to make sure that new features go through a rigid design process before +landing in the registry. + +##### Proxying to other Registries + +A _pull-through caching_ mode exists for the registry, but is restricted from +within the docker client to only mirror the official Docker Hub. This functionality +can be expanded when image provenance has been specified and implemented in the +distribution project. + +##### Metadata storage + +Metadata for the registry is currently stored with the manifest and layer data on +the storage backend. While this is a big win for simplicity and reliably maintaining +state, it comes with the cost of consistency and high latency. The mutable registry +metadata operations should be abstracted behind an API which will allow ACID compliant +storage systems to handle metadata. + +##### Peer to Peer transfer + +Discussion has started here: https://docs.google.com/document/d/1rYDpSpJiQWmCQy8Cuiaa3NH-Co33oK_SC9HeXYo87QA/edit + +##### Indexing, Search and Discovery + +The original registry provided some implementation of search for use with +private registries. Support has been elided from V2 since we'd like to both +decouple search functionality from the registry. The makes the registry +simpler to deploy, especially in use cases where search is not needed, and +let's us decouple the image format from the registry. + +There are explorations into using the catalog API and notification system to +build external indexes. The current line of thought is that we will define a +common search API to index and query docker images. Such a system could be run +as a companion to a registry or set of registries to power discovery. + +The main issue with search and discovery is that there are so many ways to +accomplish it. There are two aspects to this project. The first is deciding on +how it will be done, including an API definition that can work with changing +data formats. The second is the process of integrating with `docker search`. +We expect that someone attempts to address the problem with the existing tools +and propose it as a standard search API or uses it to inform a standardization +process. Once this has been explored, we integrate with the docker client. + +Please see the following for more detail: + +- https://github.com/docker/distribution/issues/206 + +##### Deletes + +> __NOTE:__ Deletes are a much asked for feature. Before requesting this +feature or participating in discussion, we ask that you read this section in +full and understand the problems behind deletes. + +While, at first glance, implementing deleting seems simple, there are a number +mitigating factors that make many solutions not ideal or even pathological in +the context of a registry. The following paragraph discuss the background and +approaches that could be applied to arrive at a solution. + +The goal of deletes in any system is to remove unused or unneeded data. Only +data requested for deletion should be removed and no other data. Removing +unintended data is worse than _not_ removing data that was requested for +removal but ideally, both are supported. Generally, according to this rule, we +err on holding data longer than needed, ensuring that it is only removed when +we can be certain that it can be removed. With the current behavior, we opt to +hold onto the data forever, ensuring that data cannot be incorrectly removed. + +To understand the problems with implementing deletes, one must understand the +data model. All registry data is stored in a filesystem layout, implemented on +a "storage driver", effectively a _virtual file system_ (VFS). The storage +system must assume that this VFS layer will be eventually consistent and has +poor read- after-write consistency, since this is the lower common denominator +among the storage drivers. This is mitigated by writing values in reverse- +dependent order, but makes wider transactional operations unsafe. + +Layered on the VFS model is a content-addressable _directed, acyclic graph_ +(DAG) made up of blobs. Manifests reference layers. Tags reference manifests. +Since the same data can be referenced by multiple manifests, we only store +data once, even if it is in different repositories. Thus, we have a set of +blobs, referenced by tags and manifests. If we want to delete a blob we need +to be certain that it is no longer referenced by another manifest or tag. When +we delete a manifest, we also can try to delete the referenced blobs. Deciding +whether or not a blob has an active reference is the crux of the problem. + +Conceptually, deleting a manifest and its resources is quite simple. Just find +all the manifests, enumerate the referenced blobs and delete the blobs not in +that set. An astute observer will recognize this as a garbage collection +problem. As with garbage collection in programming languages, this is very +simple when one always has a consistent view. When one adds parallelism and an +inconsistent view of data, it becomes very challenging. + +A simple example can demonstrate this. Let's say we are deleting a manifest +_A_ in one process. We scan the manifest and decide that all the blobs are +ready for deletion. Concurrently, we have another process accepting a new +manifest _B_ referencing one or more blobs from the manifest _A_. Manifest _B_ +is accepted and all the blobs are considered present, so the operation +proceeds. The original process then deletes the referenced blobs, assuming +they were unreferenced. The manifest _B_, which we thought had all of its data +present, can no longer be served by the registry, since the dependent data has +been deleted. + +Deleting data from the registry safely requires some way to coordinate this +operation. The following approaches are being considered: + +- _Reference Counting_ - Maintain a count of references to each blob. This is + challenging for a number of reasons: 1. maintaining a consistent consensus + of reference counts across a set of Registries and 2. Building the initial + list of reference counts for an existing registry. These challenges can be + met with a consensus protocol like Paxos or Raft in the first case and a + necessary but simple scan in the second.. +- _Lock the World GC_ - Halt all writes to the data store. Walk the data store + and find all blob references. Delete all unreferenced blobs. This approach + is very simple but requires disabling writes for a period of time while the + service reads all data. This is slow and expensive but very accurate and + effective. +- _Generational GC_ - Do something similar to above but instead of blocking + writes, writes are sent to another storage backend while reads are broadcast + to the new and old backends. GC is then performed on the read-only portion. + Because writes land in the new backend, the data in the read-only section + can be safely deleted. The main drawbacks of this approach are complexity + and coordination. +- _Centralized Oracle_ - Using a centralized, transactional database, we can + know exactly which data is referenced at any given time. This avoids + coordination problem by managing this data in a single location. We trade + off metadata scalability for simplicity and performance. This is a very good + option for most registry deployments. This would create a bottleneck for + registry metadata. However, metadata is generally not the main bottleneck + when serving images. + +Please let us know if other solutions exist that we have yet to enumerate. +Note that for any approach, implementation is a massive consideration. For +example, a mark-sweep based solution may seem simple but the amount of work in +coordination offset the extra work it might take to build a _Centralized +Oracle_. We'll accept proposals for any solution but please coordinate with us +before dropping code. + +At this time, we have traded off simplicity and ease of deployment for disk +space. Simplicity and ease of deployment tend to reduce developer involvement, +which is currently the most expensive resource in software engineering. Taking +on any solution for deletes will greatly effect these factors, trading off +very cheap disk space for a complex deployment and operational story. + +Please see the following issues for more detail: + +- https://github.com/docker/distribution/issues/422 +- https://github.com/docker/distribution/issues/461 +- https://github.com/docker/distribution/issues/462 + +### Distribution Package + +At its core, the Distribution Project is a set of Go packages that make up +Distribution Components. At this time, most of these packages make up the +Registry implementation. + +The package itself is considered unstable. If you're using it, please take care to vendor the dependent version. + +For feature additions, please see the Registry section. In the future, we may break out a +separate Roadmap for distribution-specific features that apply to more than +just the registry. + +*** + +### Project Planning + +An [Open-Source Planning Process](https://github.com/docker/distribution/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/docker/distribution/wiki) define the goals for each Milestone and identify current progress. + diff --git a/vendor/github.com/docker/distribution/blobs.go b/vendor/github.com/docker/distribution/blobs.go new file mode 100644 index 000000000..671372abf --- /dev/null +++ b/vendor/github.com/docker/distribution/blobs.go @@ -0,0 +1,265 @@ +package distribution + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "time" + + "github.com/distribution/reference" + "github.com/opencontainers/go-digest" + v1 "github.com/opencontainers/image-spec/specs-go/v1" +) + +var ( + // ErrBlobExists returned when blob already exists + ErrBlobExists = errors.New("blob exists") + + // ErrBlobDigestUnsupported when blob digest is an unsupported version. + ErrBlobDigestUnsupported = errors.New("unsupported blob digest") + + // ErrBlobUnknown when blob is not found. + ErrBlobUnknown = errors.New("unknown blob") + + // ErrBlobUploadUnknown returned when upload is not found. + ErrBlobUploadUnknown = errors.New("blob upload unknown") + + // ErrBlobInvalidLength returned when the blob has an expected length on + // commit, meaning mismatched with the descriptor or an invalid value. + ErrBlobInvalidLength = errors.New("blob invalid length") +) + +// ErrBlobInvalidDigest returned when digest check fails. +type ErrBlobInvalidDigest struct { + Digest digest.Digest + Reason error +} + +func (err ErrBlobInvalidDigest) Error() string { + return fmt.Sprintf("invalid digest for referenced layer: %v, %v", + err.Digest, err.Reason) +} + +// ErrBlobMounted returned when a blob is mounted from another repository +// instead of initiating an upload session. +type ErrBlobMounted struct { + From reference.Canonical + Descriptor Descriptor +} + +func (err ErrBlobMounted) Error() string { + return fmt.Sprintf("blob mounted from: %v to: %v", + err.From, err.Descriptor) +} + +// Descriptor describes targeted content. Used in conjunction with a blob +// store, a descriptor can be used to fetch, store and target any kind of +// blob. The struct also describes the wire protocol format. Fields should +// only be added but never changed. +type Descriptor struct { + // MediaType describe the type of the content. All text based formats are + // encoded as utf-8. + MediaType string `json:"mediaType,omitempty"` + + // Size in bytes of content. + Size int64 `json:"size,omitempty"` + + // Digest uniquely identifies the content. A byte stream can be verified + // against this digest. + Digest digest.Digest `json:"digest,omitempty"` + + // URLs contains the source URLs of this content. + URLs []string `json:"urls,omitempty"` + + // Annotations contains arbitrary metadata relating to the targeted content. + Annotations map[string]string `json:"annotations,omitempty"` + + // Platform describes the platform which the image in the manifest runs on. + // This should only be used when referring to a manifest. + Platform *v1.Platform `json:"platform,omitempty"` + + // NOTE: Before adding a field here, please ensure that all + // other options have been exhausted. Much of the type relationships + // depend on the simplicity of this type. +} + +// Descriptor returns the descriptor, to make it satisfy the Describable +// interface. Note that implementations of Describable are generally objects +// which can be described, not simply descriptors; this exception is in place +// to make it more convenient to pass actual descriptors to functions that +// expect Describable objects. +func (d Descriptor) Descriptor() Descriptor { + return d +} + +// BlobStatter makes blob descriptors available by digest. The service may +// provide a descriptor of a different digest if the provided digest is not +// canonical. +type BlobStatter interface { + // Stat provides metadata about a blob identified by the digest. If the + // blob is unknown to the describer, ErrBlobUnknown will be returned. + Stat(ctx context.Context, dgst digest.Digest) (Descriptor, error) +} + +// BlobDeleter enables deleting blobs from storage. +type BlobDeleter interface { + Delete(ctx context.Context, dgst digest.Digest) error +} + +// BlobEnumerator enables iterating over blobs from storage +type BlobEnumerator interface { + Enumerate(ctx context.Context, ingester func(dgst digest.Digest) error) error +} + +// BlobDescriptorService manages metadata about a blob by digest. Most +// implementations will not expose such an interface explicitly. Such mappings +// should be maintained by interacting with the BlobIngester. Hence, this is +// left off of BlobService and BlobStore. +type BlobDescriptorService interface { + BlobStatter + + // SetDescriptor assigns the descriptor to the digest. The provided digest and + // the digest in the descriptor must map to identical content but they may + // differ on their algorithm. The descriptor must have the canonical + // digest of the content and the digest algorithm must match the + // annotators canonical algorithm. + // + // Such a facility can be used to map blobs between digest domains, with + // the restriction that the algorithm of the descriptor must match the + // canonical algorithm (ie sha256) of the annotator. + SetDescriptor(ctx context.Context, dgst digest.Digest, desc Descriptor) error + + // Clear enables descriptors to be unlinked + Clear(ctx context.Context, dgst digest.Digest) error +} + +// BlobDescriptorServiceFactory creates middleware for BlobDescriptorService. +type BlobDescriptorServiceFactory interface { + BlobAccessController(svc BlobDescriptorService) BlobDescriptorService +} + +// ReadSeekCloser is the primary reader type for blob data, combining +// io.ReadSeeker with io.Closer. +type ReadSeekCloser interface { + io.ReadSeeker + io.Closer +} + +// BlobProvider describes operations for getting blob data. +type BlobProvider interface { + // Get returns the entire blob identified by digest along with the descriptor. + Get(ctx context.Context, dgst digest.Digest) ([]byte, error) + + // Open provides a ReadSeekCloser to the blob identified by the provided + // descriptor. If the blob is not known to the service, an error will be + // returned. + Open(ctx context.Context, dgst digest.Digest) (ReadSeekCloser, error) +} + +// BlobServer can serve blobs via http. +type BlobServer interface { + // ServeBlob attempts to serve the blob, identified by dgst, via http. The + // service may decide to redirect the client elsewhere or serve the data + // directly. + // + // This handler only issues successful responses, such as 2xx or 3xx, + // meaning it serves data or issues a redirect. If the blob is not + // available, an error will be returned and the caller may still issue a + // response. + // + // The implementation may serve the same blob from a different digest + // domain. The appropriate headers will be set for the blob, unless they + // have already been set by the caller. + ServeBlob(ctx context.Context, w http.ResponseWriter, r *http.Request, dgst digest.Digest) error +} + +// BlobIngester ingests blob data. +type BlobIngester interface { + // Put inserts the content p into the blob service, returning a descriptor + // or an error. + Put(ctx context.Context, mediaType string, p []byte) (Descriptor, error) + + // Create allocates a new blob writer to add a blob to this service. The + // returned handle can be written to and later resumed using an opaque + // identifier. With this approach, one can Close and Resume a BlobWriter + // multiple times until the BlobWriter is committed or cancelled. + Create(ctx context.Context, options ...BlobCreateOption) (BlobWriter, error) + + // Resume attempts to resume a write to a blob, identified by an id. + Resume(ctx context.Context, id string) (BlobWriter, error) +} + +// BlobCreateOption is a general extensible function argument for blob creation +// methods. A BlobIngester may choose to honor any or none of the given +// BlobCreateOptions, which can be specific to the implementation of the +// BlobIngester receiving them. +// TODO (brianbland): unify this with ManifestServiceOption in the future +type BlobCreateOption interface { + Apply(interface{}) error +} + +// CreateOptions is a collection of blob creation modifiers relevant to general +// blob storage intended to be configured by the BlobCreateOption.Apply method. +type CreateOptions struct { + Mount struct { + ShouldMount bool + From reference.Canonical + // Stat allows to pass precalculated descriptor to link and return. + // Blob access check will be skipped if set. + Stat *Descriptor + } +} + +// BlobWriter provides a handle for inserting data into a blob store. +// Instances should be obtained from BlobWriteService.Writer and +// BlobWriteService.Resume. If supported by the store, a writer can be +// recovered with the id. +type BlobWriter interface { + io.WriteCloser + io.ReaderFrom + + // Size returns the number of bytes written to this blob. + Size() int64 + + // ID returns the identifier for this writer. The ID can be used with the + // Blob service to later resume the write. + ID() string + + // StartedAt returns the time this blob write was started. + StartedAt() time.Time + + // Commit completes the blob writer process. The content is verified + // against the provided provisional descriptor, which may result in an + // error. Depending on the implementation, written data may be validated + // against the provisional descriptor fields. If MediaType is not present, + // the implementation may reject the commit or assign "application/octet- + // stream" to the blob. The returned descriptor may have a different + // digest depending on the blob store, referred to as the canonical + // descriptor. + Commit(ctx context.Context, provisional Descriptor) (canonical Descriptor, err error) + + // Cancel ends the blob write without storing any data and frees any + // associated resources. Any data written thus far will be lost. Cancel + // implementations should allow multiple calls even after a commit that + // result in a no-op. This allows use of Cancel in a defer statement, + // increasing the assurance that it is correctly called. + Cancel(ctx context.Context) error +} + +// BlobService combines the operations to access, read and write blobs. This +// can be used to describe remote blob services. +type BlobService interface { + BlobStatter + BlobProvider + BlobIngester +} + +// BlobStore represent the entire suite of blob related operations. Such an +// implementation can access, read, write, delete and serve blobs. +type BlobStore interface { + BlobService + BlobServer + BlobDeleter +} diff --git a/vendor/github.com/docker/distribution/doc.go b/vendor/github.com/docker/distribution/doc.go new file mode 100644 index 000000000..bdd8cb708 --- /dev/null +++ b/vendor/github.com/docker/distribution/doc.go @@ -0,0 +1,7 @@ +// Package distribution will define the interfaces for the components of +// docker distribution. The goal is to allow users to reliably package, ship +// and store content related to docker images. +// +// This is currently a work in progress. More details are available in the +// README.md. +package distribution diff --git a/vendor/github.com/docker/distribution/docker-bake.hcl b/vendor/github.com/docker/distribution/docker-bake.hcl new file mode 100644 index 000000000..91686e608 --- /dev/null +++ b/vendor/github.com/docker/distribution/docker-bake.hcl @@ -0,0 +1,56 @@ +group "default" { + targets = ["image-local"] +} + +// Special target: https://github.com/docker/metadata-action#bake-definition +target "docker-metadata-action" { + tags = ["registry:local"] +} + +target "binary" { + target = "binary" + output = ["./bin"] +} + +target "artifact" { + target = "artifact" + output = ["./bin"] +} + +target "artifact-all" { + inherits = ["artifact"] + platforms = [ + "linux/amd64", + "linux/arm/v6", + "linux/arm/v7", + "linux/arm64", + "linux/ppc64le", + "linux/s390x" + ] +} + +// Special target: https://github.com/docker/metadata-action#bake-definition +target "docker-metadata-action" { + tags = ["registry:local"] +} + +target "image" { + inherits = ["docker-metadata-action"] +} + +target "image-local" { + inherits = ["image"] + output = ["type=docker"] +} + +target "image-all" { + inherits = ["image"] + platforms = [ + "linux/amd64", + "linux/arm/v6", + "linux/arm/v7", + "linux/arm64", + "linux/ppc64le", + "linux/s390x" + ] +} diff --git a/vendor/github.com/docker/distribution/errors.go b/vendor/github.com/docker/distribution/errors.go new file mode 100644 index 000000000..8e0b788d6 --- /dev/null +++ b/vendor/github.com/docker/distribution/errors.go @@ -0,0 +1,119 @@ +package distribution + +import ( + "errors" + "fmt" + "strings" + + "github.com/opencontainers/go-digest" +) + +// ErrAccessDenied is returned when an access to a requested resource is +// denied. +var ErrAccessDenied = errors.New("access denied") + +// ErrManifestNotModified is returned when a conditional manifest GetByTag +// returns nil due to the client indicating it has the latest version +var ErrManifestNotModified = errors.New("manifest not modified") + +// ErrUnsupported is returned when an unimplemented or unsupported action is +// performed +var ErrUnsupported = errors.New("operation unsupported") + +// ErrSchemaV1Unsupported is returned when a client tries to upload a schema v1 +// manifest but the registry is configured to reject it +var ErrSchemaV1Unsupported = errors.New("manifest schema v1 unsupported") + +// ErrTagUnknown is returned if the given tag is not known by the tag service +type ErrTagUnknown struct { + Tag string +} + +func (err ErrTagUnknown) Error() string { + return fmt.Sprintf("unknown tag=%s", err.Tag) +} + +// ErrRepositoryUnknown is returned if the named repository is not known by +// the registry. +type ErrRepositoryUnknown struct { + Name string +} + +func (err ErrRepositoryUnknown) Error() string { + return fmt.Sprintf("unknown repository name=%s", err.Name) +} + +// ErrRepositoryNameInvalid should be used to denote an invalid repository +// name. Reason may set, indicating the cause of invalidity. +type ErrRepositoryNameInvalid struct { + Name string + Reason error +} + +func (err ErrRepositoryNameInvalid) Error() string { + return fmt.Sprintf("repository name %q invalid: %v", err.Name, err.Reason) +} + +// ErrManifestUnknown is returned if the manifest is not known by the +// registry. +type ErrManifestUnknown struct { + Name string + Tag string +} + +func (err ErrManifestUnknown) Error() string { + return fmt.Sprintf("unknown manifest name=%s tag=%s", err.Name, err.Tag) +} + +// ErrManifestUnknownRevision is returned when a manifest cannot be found by +// revision within a repository. +type ErrManifestUnknownRevision struct { + Name string + Revision digest.Digest +} + +func (err ErrManifestUnknownRevision) Error() string { + return fmt.Sprintf("unknown manifest name=%s revision=%s", err.Name, err.Revision) +} + +// ErrManifestUnverified is returned when the registry is unable to verify +// the manifest. +type ErrManifestUnverified struct{} + +func (ErrManifestUnverified) Error() string { + return "unverified manifest" +} + +// ErrManifestVerification provides a type to collect errors encountered +// during manifest verification. Currently, it accepts errors of all types, +// but it may be narrowed to those involving manifest verification. +type ErrManifestVerification []error + +func (errs ErrManifestVerification) Error() string { + var parts []string + for _, err := range errs { + parts = append(parts, err.Error()) + } + + return fmt.Sprintf("errors verifying manifest: %v", strings.Join(parts, ",")) +} + +// ErrManifestBlobUnknown returned when a referenced blob cannot be found. +type ErrManifestBlobUnknown struct { + Digest digest.Digest +} + +func (err ErrManifestBlobUnknown) Error() string { + return fmt.Sprintf("unknown blob %v on manifest", err.Digest) +} + +// ErrManifestNameInvalid should be used to denote an invalid manifest +// name. Reason may set, indicating the cause of invalidity. +type ErrManifestNameInvalid struct { + Name string + Reason error +} + +func (err ErrManifestNameInvalid) Error() string { + return fmt.Sprintf("manifest name %q invalid: %v", err.Name, err.Reason) +} diff --git a/vendor/github.com/docker/distribution/manifests.go b/vendor/github.com/docker/distribution/manifests.go new file mode 100644 index 000000000..8f84a220a --- /dev/null +++ b/vendor/github.com/docker/distribution/manifests.go @@ -0,0 +1,125 @@ +package distribution + +import ( + "context" + "fmt" + "mime" + + "github.com/opencontainers/go-digest" +) + +// Manifest represents a registry object specifying a set of +// references and an optional target +type Manifest interface { + // References returns a list of objects which make up this manifest. + // A reference is anything which can be represented by a + // distribution.Descriptor. These can consist of layers, resources or other + // manifests. + // + // While no particular order is required, implementations should return + // them from highest to lowest priority. For example, one might want to + // return the base layer before the top layer. + References() []Descriptor + + // Payload provides the serialized format of the manifest, in addition to + // the media type. + Payload() (mediaType string, payload []byte, err error) +} + +// ManifestBuilder creates a manifest allowing one to include dependencies. +// Instances can be obtained from a version-specific manifest package. Manifest +// specific data is passed into the function which creates the builder. +type ManifestBuilder interface { + // Build creates the manifest from his builder. + Build(ctx context.Context) (Manifest, error) + + // References returns a list of objects which have been added to this + // builder. The dependencies are returned in the order they were added, + // which should be from base to head. + References() []Descriptor + + // AppendReference includes the given object in the manifest after any + // existing dependencies. If the add fails, such as when adding an + // unsupported dependency, an error may be returned. + // + // The destination of the reference is dependent on the manifest type and + // the dependency type. + AppendReference(dependency Describable) error +} + +// ManifestService describes operations on image manifests. +type ManifestService interface { + // Exists returns true if the manifest exists. + Exists(ctx context.Context, dgst digest.Digest) (bool, error) + + // Get retrieves the manifest specified by the given digest + Get(ctx context.Context, dgst digest.Digest, options ...ManifestServiceOption) (Manifest, error) + + // Put creates or updates the given manifest returning the manifest digest + Put(ctx context.Context, manifest Manifest, options ...ManifestServiceOption) (digest.Digest, error) + + // Delete removes the manifest specified by the given digest. Deleting + // a manifest that doesn't exist will return ErrManifestNotFound + Delete(ctx context.Context, dgst digest.Digest) error +} + +// ManifestEnumerator enables iterating over manifests +type ManifestEnumerator interface { + // Enumerate calls ingester for each manifest. + Enumerate(ctx context.Context, ingester func(digest.Digest) error) error +} + +// Describable is an interface for descriptors +type Describable interface { + Descriptor() Descriptor +} + +// ManifestMediaTypes returns the supported media types for manifests. +func ManifestMediaTypes() (mediaTypes []string) { + for t := range mappings { + if t != "" { + mediaTypes = append(mediaTypes, t) + } + } + return +} + +// UnmarshalFunc implements manifest unmarshalling a given MediaType +type UnmarshalFunc func([]byte) (Manifest, Descriptor, error) + +var mappings = make(map[string]UnmarshalFunc) + +// UnmarshalManifest looks up manifest unmarshal functions based on +// MediaType +func UnmarshalManifest(ctHeader string, p []byte) (Manifest, Descriptor, error) { + // Need to look up by the actual media type, not the raw contents of + // the header. Strip semicolons and anything following them. + var mediaType string + if ctHeader != "" { + var err error + mediaType, _, err = mime.ParseMediaType(ctHeader) + if err != nil { + return nil, Descriptor{}, err + } + } + + unmarshalFunc, ok := mappings[mediaType] + if !ok { + unmarshalFunc, ok = mappings[""] + if !ok { + return nil, Descriptor{}, fmt.Errorf("unsupported manifest media type and no default available: %s", mediaType) + } + } + + return unmarshalFunc(p) +} + +// RegisterManifestSchema registers an UnmarshalFunc for a given schema type. This +// should be called from specific +func RegisterManifestSchema(mediaType string, u UnmarshalFunc) error { + if _, ok := mappings[mediaType]; ok { + return fmt.Errorf("manifest media type registration would overwrite existing: %s", mediaType) + } + mappings[mediaType] = u + return nil +} diff --git a/vendor/github.com/docker/distribution/metrics/prometheus.go b/vendor/github.com/docker/distribution/metrics/prometheus.go new file mode 100644 index 000000000..b5a532144 --- /dev/null +++ b/vendor/github.com/docker/distribution/metrics/prometheus.go @@ -0,0 +1,13 @@ +package metrics + +import "github.com/docker/go-metrics" + +const ( + // NamespacePrefix is the namespace of prometheus metrics + NamespacePrefix = "registry" +) + +var ( + // StorageNamespace is the prometheus namespace of blob/cache related operations + StorageNamespace = metrics.NewNamespace(NamespacePrefix, "storage", nil) +) diff --git a/vendor/github.com/docker/distribution/registry.go b/vendor/github.com/docker/distribution/registry.go new file mode 100644 index 000000000..d0deee65d --- /dev/null +++ b/vendor/github.com/docker/distribution/registry.go @@ -0,0 +1,118 @@ +package distribution + +import ( + "context" + + "github.com/distribution/reference" +) + +// Scope defines the set of items that match a namespace. +type Scope interface { + // Contains returns true if the name belongs to the namespace. + Contains(name string) bool +} + +type fullScope struct{} + +func (f fullScope) Contains(string) bool { + return true +} + +// GlobalScope represents the full namespace scope which contains +// all other scopes. +var GlobalScope = Scope(fullScope{}) + +// Namespace represents a collection of repositories, addressable by name. +// Generally, a namespace is backed by a set of one or more services, +// providing facilities such as registry access, trust, and indexing. +type Namespace interface { + // Scope describes the names that can be used with this Namespace. The + // global namespace will have a scope that matches all names. The scope + // effectively provides an identity for the namespace. + Scope() Scope + + // Repository should return a reference to the named repository. The + // registry may or may not have the repository but should always return a + // reference. + Repository(ctx context.Context, name reference.Named) (Repository, error) + + // Repositories fills 'repos' with a lexicographically sorted catalog of repositories + // up to the size of 'repos' and returns the value 'n' for the number of entries + // which were filled. 'last' contains an offset in the catalog, and 'err' will be + // set to io.EOF if there are no more entries to obtain. + Repositories(ctx context.Context, repos []string, last string) (n int, err error) + + // Blobs returns a blob enumerator to access all blobs + Blobs() BlobEnumerator + + // BlobStatter returns a BlobStatter to control + BlobStatter() BlobStatter +} + +// RepositoryEnumerator describes an operation to enumerate repositories +type RepositoryEnumerator interface { + Enumerate(ctx context.Context, ingester func(string) error) error +} + +// RepositoryRemover removes given repository +type RepositoryRemover interface { + Remove(ctx context.Context, name reference.Named) error +} + +// ManifestServiceOption is a function argument for Manifest Service methods +type ManifestServiceOption interface { + Apply(ManifestService) error +} + +// WithTag allows a tag to be passed into Put +func WithTag(tag string) ManifestServiceOption { + return WithTagOption{tag} +} + +// WithTagOption holds a tag +type WithTagOption struct{ Tag string } + +// Apply conforms to the ManifestServiceOption interface +func (o WithTagOption) Apply(m ManifestService) error { + // no implementation + return nil +} + +// WithManifestMediaTypes lists the media types the client wishes +// the server to provide. +func WithManifestMediaTypes(mediaTypes []string) ManifestServiceOption { + return WithManifestMediaTypesOption{mediaTypes} +} + +// WithManifestMediaTypesOption holds a list of accepted media types +type WithManifestMediaTypesOption struct{ MediaTypes []string } + +// Apply conforms to the ManifestServiceOption interface +func (o WithManifestMediaTypesOption) Apply(m ManifestService) error { + // no implementation + return nil +} + +// Repository is a named collection of manifests and layers. +type Repository interface { + // Named returns the name of the repository. + Named() reference.Named + + // Manifests returns a reference to this repository's manifest service. + // with the supplied options applied. + Manifests(ctx context.Context, options ...ManifestServiceOption) (ManifestService, error) + + // Blobs returns a reference to this repository's blob service. + Blobs(ctx context.Context) BlobStore + + // TODO(stevvooe): The above BlobStore return can probably be relaxed to + // be a BlobService for use with clients. This will allow such + // implementations to avoid implementing ServeBlob. + + // Tags returns a reference to this repositories tag service + Tags(ctx context.Context) TagService +} + +// TODO(stevvooe): Must add close methods to all these. May want to change the +// way instances are created to better reflect internal dependency +// relationships. diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/errors.go b/vendor/github.com/docker/distribution/registry/api/errcode/errors.go new file mode 100644 index 000000000..4c35b879a --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/errcode/errors.go @@ -0,0 +1,267 @@ +package errcode + +import ( + "encoding/json" + "fmt" + "strings" +) + +// ErrorCoder is the base interface for ErrorCode and Error allowing +// users of each to just call ErrorCode to get the real ID of each +type ErrorCoder interface { + ErrorCode() ErrorCode +} + +// ErrorCode represents the error type. The errors are serialized via strings +// and the integer format may change and should *never* be exported. +type ErrorCode int + +var _ error = ErrorCode(0) + +// ErrorCode just returns itself +func (ec ErrorCode) ErrorCode() ErrorCode { + return ec +} + +// Error returns the ID/Value +func (ec ErrorCode) Error() string { + // NOTE(stevvooe): Cannot use message here since it may have unpopulated args. + return strings.ToLower(strings.Replace(ec.String(), "_", " ", -1)) +} + +// Descriptor returns the descriptor for the error code. +func (ec ErrorCode) Descriptor() ErrorDescriptor { + d, ok := errorCodeToDescriptors[ec] + + if !ok { + return ErrorCodeUnknown.Descriptor() + } + + return d +} + +// String returns the canonical identifier for this error code. +func (ec ErrorCode) String() string { + return ec.Descriptor().Value +} + +// Message returned the human-readable error message for this error code. +func (ec ErrorCode) Message() string { + return ec.Descriptor().Message +} + +// MarshalText encodes the receiver into UTF-8-encoded text and returns the +// result. +func (ec ErrorCode) MarshalText() (text []byte, err error) { + return []byte(ec.String()), nil +} + +// UnmarshalText decodes the form generated by MarshalText. +func (ec *ErrorCode) UnmarshalText(text []byte) error { + desc, ok := idToDescriptors[string(text)] + + if !ok { + desc = ErrorCodeUnknown.Descriptor() + } + + *ec = desc.Code + + return nil +} + +// WithMessage creates a new Error struct based on the passed-in info and +// overrides the Message property. +func (ec ErrorCode) WithMessage(message string) Error { + return Error{ + Code: ec, + Message: message, + } +} + +// WithDetail creates a new Error struct based on the passed-in info and +// set the Detail property appropriately +func (ec ErrorCode) WithDetail(detail interface{}) Error { + return Error{ + Code: ec, + Message: ec.Message(), + }.WithDetail(detail) +} + +// WithArgs creates a new Error struct and sets the Args slice +func (ec ErrorCode) WithArgs(args ...interface{}) Error { + return Error{ + Code: ec, + Message: ec.Message(), + }.WithArgs(args...) +} + +// Error provides a wrapper around ErrorCode with extra Details provided. +type Error struct { + Code ErrorCode `json:"code"` + Message string `json:"message"` + Detail interface{} `json:"detail,omitempty"` + + // TODO(duglin): See if we need an "args" property so we can do the + // variable substitution right before showing the message to the user +} + +var _ error = Error{} + +// ErrorCode returns the ID/Value of this Error +func (e Error) ErrorCode() ErrorCode { + return e.Code +} + +// Error returns a human readable representation of the error. +func (e Error) Error() string { + return fmt.Sprintf("%s: %s", e.Code.Error(), e.Message) +} + +// WithDetail will return a new Error, based on the current one, but with +// some Detail info added +func (e Error) WithDetail(detail interface{}) Error { + return Error{ + Code: e.Code, + Message: e.Message, + Detail: detail, + } +} + +// WithArgs uses the passed-in list of interface{} as the substitution +// variables in the Error's Message string, but returns a new Error +func (e Error) WithArgs(args ...interface{}) Error { + return Error{ + Code: e.Code, + Message: fmt.Sprintf(e.Code.Message(), args...), + Detail: e.Detail, + } +} + +// ErrorDescriptor provides relevant information about a given error code. +type ErrorDescriptor struct { + // Code is the error code that this descriptor describes. + Code ErrorCode + + // Value provides a unique, string key, often captilized with + // underscores, to identify the error code. This value is used as the + // keyed value when serializing api errors. + Value string + + // Message is a short, human readable decription of the error condition + // included in API responses. + Message string + + // Description provides a complete account of the errors purpose, suitable + // for use in documentation. + Description string + + // HTTPStatusCode provides the http status code that is associated with + // this error condition. + HTTPStatusCode int +} + +// ParseErrorCode returns the value by the string error code. +// `ErrorCodeUnknown` will be returned if the error is not known. +func ParseErrorCode(value string) ErrorCode { + ed, ok := idToDescriptors[value] + if ok { + return ed.Code + } + + return ErrorCodeUnknown +} + +// Errors provides the envelope for multiple errors and a few sugar methods +// for use within the application. +type Errors []error + +var _ error = Errors{} + +func (errs Errors) Error() string { + switch len(errs) { + case 0: + return "" + case 1: + return errs[0].Error() + default: + msg := "errors:\n" + for _, err := range errs { + msg += err.Error() + "\n" + } + return msg + } +} + +// Len returns the current number of errors. +func (errs Errors) Len() int { + return len(errs) +} + +// MarshalJSON converts slice of error, ErrorCode or Error into a +// slice of Error - then serializes +func (errs Errors) MarshalJSON() ([]byte, error) { + var tmpErrs struct { + Errors []Error `json:"errors,omitempty"` + } + + for _, daErr := range errs { + var err Error + + switch daErr := daErr.(type) { + case ErrorCode: + err = daErr.WithDetail(nil) + case Error: + err = daErr + default: + err = ErrorCodeUnknown.WithDetail(daErr) + + } + + // If the Error struct was setup and they forgot to set the + // Message field (meaning its "") then grab it from the ErrCode + msg := err.Message + if msg == "" { + msg = err.Code.Message() + } + + tmpErrs.Errors = append(tmpErrs.Errors, Error{ + Code: err.Code, + Message: msg, + Detail: err.Detail, + }) + } + + return json.Marshal(tmpErrs) +} + +// UnmarshalJSON deserializes []Error and then converts it into slice of +// Error or ErrorCode +func (errs *Errors) UnmarshalJSON(data []byte) error { + var tmpErrs struct { + Errors []Error + } + + if err := json.Unmarshal(data, &tmpErrs); err != nil { + return err + } + + var newErrs Errors + for _, daErr := range tmpErrs.Errors { + // If Message is empty or exactly matches the Code's message string + // then just use the Code, no need for a full Error struct + if daErr.Detail == nil && (daErr.Message == "" || daErr.Message == daErr.Code.Message()) { + // Error's w/o details get converted to ErrorCode + newErrs = append(newErrs, daErr.Code) + } else { + // Error's w/ details are untouched + newErrs = append(newErrs, Error{ + Code: daErr.Code, + Message: daErr.Message, + Detail: daErr.Detail, + }) + } + } + + *errs = newErrs + return nil +} diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/handler.go b/vendor/github.com/docker/distribution/registry/api/errcode/handler.go new file mode 100644 index 000000000..d77e70473 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/errcode/handler.go @@ -0,0 +1,40 @@ +package errcode + +import ( + "encoding/json" + "net/http" +) + +// ServeJSON attempts to serve the errcode in a JSON envelope. It marshals err +// and sets the content-type header to 'application/json'. It will handle +// ErrorCoder and Errors, and if necessary will create an envelope. +func ServeJSON(w http.ResponseWriter, err error) error { + w.Header().Set("Content-Type", "application/json; charset=utf-8") + var sc int + + switch errs := err.(type) { + case Errors: + if len(errs) < 1 { + break + } + + if err, ok := errs[0].(ErrorCoder); ok { + sc = err.ErrorCode().Descriptor().HTTPStatusCode + } + case ErrorCoder: + sc = errs.ErrorCode().Descriptor().HTTPStatusCode + err = Errors{err} // create an envelope. + default: + // We just have an unhandled error type, so just place in an envelope + // and move along. + err = Errors{err} + } + + if sc == 0 { + sc = http.StatusInternalServerError + } + + w.WriteHeader(sc) + + return json.NewEncoder(w).Encode(err) +} diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/register.go b/vendor/github.com/docker/distribution/registry/api/errcode/register.go new file mode 100644 index 000000000..d1e8826c6 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/errcode/register.go @@ -0,0 +1,138 @@ +package errcode + +import ( + "fmt" + "net/http" + "sort" + "sync" +) + +var ( + errorCodeToDescriptors = map[ErrorCode]ErrorDescriptor{} + idToDescriptors = map[string]ErrorDescriptor{} + groupToDescriptors = map[string][]ErrorDescriptor{} +) + +var ( + // ErrorCodeUnknown is a generic error that can be used as a last + // resort if there is no situation-specific error message that can be used + ErrorCodeUnknown = Register("errcode", ErrorDescriptor{ + Value: "UNKNOWN", + Message: "unknown error", + Description: `Generic error returned when the error does not have an + API classification.`, + HTTPStatusCode: http.StatusInternalServerError, + }) + + // ErrorCodeUnsupported is returned when an operation is not supported. + ErrorCodeUnsupported = Register("errcode", ErrorDescriptor{ + Value: "UNSUPPORTED", + Message: "The operation is unsupported.", + Description: `The operation was unsupported due to a missing + implementation or invalid set of parameters.`, + HTTPStatusCode: http.StatusMethodNotAllowed, + }) + + // ErrorCodeUnauthorized is returned if a request requires + // authentication. + ErrorCodeUnauthorized = Register("errcode", ErrorDescriptor{ + Value: "UNAUTHORIZED", + Message: "authentication required", + Description: `The access controller was unable to authenticate + the client. Often this will be accompanied by a + Www-Authenticate HTTP response header indicating how to + authenticate.`, + HTTPStatusCode: http.StatusUnauthorized, + }) + + // ErrorCodeDenied is returned if a client does not have sufficient + // permission to perform an action. + ErrorCodeDenied = Register("errcode", ErrorDescriptor{ + Value: "DENIED", + Message: "requested access to the resource is denied", + Description: `The access controller denied access for the + operation on a resource.`, + HTTPStatusCode: http.StatusForbidden, + }) + + // ErrorCodeUnavailable provides a common error to report unavailability + // of a service or endpoint. + ErrorCodeUnavailable = Register("errcode", ErrorDescriptor{ + Value: "UNAVAILABLE", + Message: "service unavailable", + Description: "Returned when a service is not available", + HTTPStatusCode: http.StatusServiceUnavailable, + }) + + // ErrorCodeTooManyRequests is returned if a client attempts too many + // times to contact a service endpoint. + ErrorCodeTooManyRequests = Register("errcode", ErrorDescriptor{ + Value: "TOOMANYREQUESTS", + Message: "too many requests", + Description: `Returned when a client attempts to contact a + service too many times`, + HTTPStatusCode: http.StatusTooManyRequests, + }) +) + +var nextCode = 1000 +var registerLock sync.Mutex + +// Register will make the passed-in error known to the environment and +// return a new ErrorCode +func Register(group string, descriptor ErrorDescriptor) ErrorCode { + registerLock.Lock() + defer registerLock.Unlock() + + descriptor.Code = ErrorCode(nextCode) + + if _, ok := idToDescriptors[descriptor.Value]; ok { + panic(fmt.Sprintf("ErrorValue %q is already registered", descriptor.Value)) + } + if _, ok := errorCodeToDescriptors[descriptor.Code]; ok { + panic(fmt.Sprintf("ErrorCode %v is already registered", descriptor.Code)) + } + + groupToDescriptors[group] = append(groupToDescriptors[group], descriptor) + errorCodeToDescriptors[descriptor.Code] = descriptor + idToDescriptors[descriptor.Value] = descriptor + + nextCode++ + return descriptor.Code +} + +type byValue []ErrorDescriptor + +func (a byValue) Len() int { return len(a) } +func (a byValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byValue) Less(i, j int) bool { return a[i].Value < a[j].Value } + +// GetGroupNames returns the list of Error group names that are registered +func GetGroupNames() []string { + keys := []string{} + + for k := range groupToDescriptors { + keys = append(keys, k) + } + sort.Strings(keys) + return keys +} + +// GetErrorCodeGroup returns the named group of error descriptors +func GetErrorCodeGroup(name string) []ErrorDescriptor { + desc := groupToDescriptors[name] + sort.Sort(byValue(desc)) + return desc +} + +// GetErrorAllDescriptors returns a slice of all ErrorDescriptors that are +// registered, irrespective of what group they're in +func GetErrorAllDescriptors() []ErrorDescriptor { + result := []ErrorDescriptor{} + + for _, group := range GetGroupNames() { + result = append(result, GetErrorCodeGroup(group)...) + } + sort.Sort(byValue(result)) + return result +} diff --git a/vendor/github.com/docker/distribution/registry/api/v2/descriptors.go b/vendor/github.com/docker/distribution/registry/api/v2/descriptors.go new file mode 100644 index 000000000..7fceefbc6 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/v2/descriptors.go @@ -0,0 +1,1613 @@ +package v2 + +import ( + "net/http" + "regexp" + + "github.com/distribution/reference" + "github.com/docker/distribution/registry/api/errcode" + "github.com/opencontainers/go-digest" +) + +var ( + nameParameterDescriptor = ParameterDescriptor{ + Name: "name", + Type: "string", + Format: reference.NameRegexp.String(), + Required: true, + Description: `Name of the target repository.`, + } + + referenceParameterDescriptor = ParameterDescriptor{ + Name: "reference", + Type: "string", + Format: reference.TagRegexp.String(), + Required: true, + Description: `Tag or digest of the target manifest.`, + } + + uuidParameterDescriptor = ParameterDescriptor{ + Name: "uuid", + Type: "opaque", + Required: true, + Description: "A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.", + } + + digestPathParameter = ParameterDescriptor{ + Name: "digest", + Type: "path", + Required: true, + Format: digest.DigestRegexp.String(), + Description: `Digest of desired blob.`, + } + + hostHeader = ParameterDescriptor{ + Name: "Host", + Type: "string", + Description: "Standard HTTP Host Header. Should be set to the registry host.", + Format: "", + Examples: []string{"registry-1.docker.io"}, + } + + authHeader = ParameterDescriptor{ + Name: "Authorization", + Type: "string", + Description: "An RFC7235 compliant authorization header.", + Format: " ", + Examples: []string{"Bearer dGhpcyBpcyBhIGZha2UgYmVhcmVyIHRva2VuIQ=="}, + } + + authChallengeHeader = ParameterDescriptor{ + Name: "WWW-Authenticate", + Type: "string", + Description: "An RFC7235 compliant authentication challenge header.", + Format: ` realm="", ..."`, + Examples: []string{ + `Bearer realm="https://auth.docker.com/", service="registry.docker.com", scopes="repository:library/ubuntu:pull"`, + }, + } + + contentLengthZeroHeader = ParameterDescriptor{ + Name: "Content-Length", + Description: "The `Content-Length` header must be zero and the body must be empty.", + Type: "integer", + Format: "0", + } + + dockerUploadUUIDHeader = ParameterDescriptor{ + Name: "Docker-Upload-UUID", + Description: "Identifies the docker upload uuid for the current request.", + Type: "uuid", + Format: "", + } + + digestHeader = ParameterDescriptor{ + Name: "Docker-Content-Digest", + Description: "Digest of the targeted content for the request.", + Type: "digest", + Format: "", + } + + linkHeader = ParameterDescriptor{ + Name: "Link", + Type: "link", + Description: "RFC5988 compliant rel='next' with URL to next result set, if available", + Format: `<?n=&last=>; rel="next"`, + } + + paginationParameters = []ParameterDescriptor{ + { + Name: "n", + Type: "integer", + Description: "Limit the number of entries in each response. It not present, all entries will be returned.", + Format: "", + Required: false, + }, + { + Name: "last", + Type: "string", + Description: "Result set will include values lexically after last.", + Format: "", + Required: false, + }, + } + + unauthorizedResponseDescriptor = ResponseDescriptor{ + Name: "Authentication Required", + StatusCode: http.StatusUnauthorized, + Description: "The client is not authenticated.", + Headers: []ParameterDescriptor{ + authChallengeHeader, + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeUnauthorized, + }, + } + + invalidPaginationResponseDescriptor = ResponseDescriptor{ + Name: "Invalid pagination number", + Description: "The received parameter n was invalid in some way, as described by the error code. The client should resolve the issue and retry the request.", + StatusCode: http.StatusBadRequest, + Body: BodyDescriptor{ + ContentType: "application/json", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodePaginationNumberInvalid, + }, + } + + repositoryNotFoundResponseDescriptor = ResponseDescriptor{ + Name: "No Such Repository Error", + StatusCode: http.StatusNotFound, + Description: "The repository is not known to the registry.", + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameUnknown, + }, + } + + deniedResponseDescriptor = ResponseDescriptor{ + Name: "Access Denied", + StatusCode: http.StatusForbidden, + Description: "The client does not have required access to the repository.", + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeDenied, + }, + } + + tooManyRequestsDescriptor = ResponseDescriptor{ + Name: "Too Many Requests", + StatusCode: http.StatusTooManyRequests, + Description: "The client made too many requests within a time interval.", + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeTooManyRequests, + }, + } +) + +const ( + manifestBody = `{ + "name": , + "tag": , + "fsLayers": [ + { + "blobSum": "" + }, + ... + ] + ], + "history": , + "signature": +}` + + errorsBody = `{ + "errors:" [ + { + "code": , + "message": "", + "detail": ... + }, + ... + ] +}` +) + +// APIDescriptor exports descriptions of the layout of the v2 registry API. +var APIDescriptor = struct { + // RouteDescriptors provides a list of the routes available in the API. + RouteDescriptors []RouteDescriptor +}{ + RouteDescriptors: routeDescriptors, +} + +// RouteDescriptor describes a route specified by name. +type RouteDescriptor struct { + // Name is the name of the route, as specified in RouteNameXXX exports. + // These names a should be considered a unique reference for a route. If + // the route is registered with gorilla, this is the name that will be + // used. + Name string + + // Path is a gorilla/mux-compatible regexp that can be used to match the + // route. For any incoming method and path, only one route descriptor + // should match. + Path string + + // Entity should be a short, human-readalbe description of the object + // targeted by the endpoint. + Entity string + + // Description should provide an accurate overview of the functionality + // provided by the route. + Description string + + // Methods should describe the various HTTP methods that may be used on + // this route, including request and response formats. + Methods []MethodDescriptor +} + +// MethodDescriptor provides a description of the requests that may be +// conducted with the target method. +type MethodDescriptor struct { + + // Method is an HTTP method, such as GET, PUT or POST. + Method string + + // Description should provide an overview of the functionality provided by + // the covered method, suitable for use in documentation. Use of markdown + // here is encouraged. + Description string + + // Requests is a slice of request descriptors enumerating how this + // endpoint may be used. + Requests []RequestDescriptor +} + +// RequestDescriptor covers a particular set of headers and parameters that +// can be carried out with the parent method. Its most helpful to have one +// RequestDescriptor per API use case. +type RequestDescriptor struct { + // Name provides a short identifier for the request, usable as a title or + // to provide quick context for the particular request. + Name string + + // Description should cover the requests purpose, covering any details for + // this particular use case. + Description string + + // Headers describes headers that must be used with the HTTP request. + Headers []ParameterDescriptor + + // PathParameters enumerate the parameterized path components for the + // given request, as defined in the route's regular expression. + PathParameters []ParameterDescriptor + + // QueryParameters provides a list of query parameters for the given + // request. + QueryParameters []ParameterDescriptor + + // Body describes the format of the request body. + Body BodyDescriptor + + // Successes enumerates the possible responses that are considered to be + // the result of a successful request. + Successes []ResponseDescriptor + + // Failures covers the possible failures from this particular request. + Failures []ResponseDescriptor +} + +// ResponseDescriptor describes the components of an API response. +type ResponseDescriptor struct { + // Name provides a short identifier for the response, usable as a title or + // to provide quick context for the particular response. + Name string + + // Description should provide a brief overview of the role of the + // response. + Description string + + // StatusCode specifies the status received by this particular response. + StatusCode int + + // Headers covers any headers that may be returned from the response. + Headers []ParameterDescriptor + + // Fields describes any fields that may be present in the response. + Fields []ParameterDescriptor + + // ErrorCodes enumerates the error codes that may be returned along with + // the response. + ErrorCodes []errcode.ErrorCode + + // Body describes the body of the response, if any. + Body BodyDescriptor +} + +// BodyDescriptor describes a request body and its expected content type. For +// the most part, it should be example json or some placeholder for body +// data in documentation. +type BodyDescriptor struct { + ContentType string + Format string +} + +// ParameterDescriptor describes the format of a request parameter, which may +// be a header, path parameter or query parameter. +type ParameterDescriptor struct { + // Name is the name of the parameter, either of the path component or + // query parameter. + Name string + + // Type specifies the type of the parameter, such as string, integer, etc. + Type string + + // Description provides a human-readable description of the parameter. + Description string + + // Required means the field is required when set. + Required bool + + // Format is a specifying the string format accepted by this parameter. + Format string + + // Regexp is a compiled regular expression that can be used to validate + // the contents of the parameter. + Regexp *regexp.Regexp + + // Examples provides multiple examples for the values that might be valid + // for this parameter. + Examples []string +} + +var routeDescriptors = []RouteDescriptor{ + { + Name: RouteNameBase, + Path: "/v2/", + Entity: "Base", + Description: `Base V2 API route. Typically, this can be used for lightweight version checks and to validate registry authentication.`, + Methods: []MethodDescriptor{ + { + Method: "GET", + Description: "Check that the endpoint implements Docker Registry API V2.", + Requests: []RequestDescriptor{ + { + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + Successes: []ResponseDescriptor{ + { + Description: "The API implements V2 protocol and is accessible.", + StatusCode: http.StatusOK, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "The registry does not implement the V2 API.", + StatusCode: http.StatusNotFound, + }, + unauthorizedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + }, + }, + { + Name: RouteNameTags, + Path: "/v2/{name:" + reference.NameRegexp.String() + "}/tags/list", + Entity: "Tags", + Description: "Retrieve information about tags.", + Methods: []MethodDescriptor{ + { + Method: "GET", + Description: "Fetch the tags under the repository identified by `name`.", + Requests: []RequestDescriptor{ + { + Name: "Tags", + Description: "Return all tags for the repository", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + }, + Successes: []ResponseDescriptor{ + { + StatusCode: http.StatusOK, + Description: "A list of tags for the named repository.", + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: `{ + "name": , + "tags": [ + , + ... + ] +}`, + }, + }, + }, + Failures: []ResponseDescriptor{ + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + { + Name: "Tags Paginated", + Description: "Return a portion of the tags for the specified repository.", + PathParameters: []ParameterDescriptor{nameParameterDescriptor}, + QueryParameters: paginationParameters, + Successes: []ResponseDescriptor{ + { + StatusCode: http.StatusOK, + Description: "A list of tags for the named repository.", + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + linkHeader, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: `{ + "name": , + "tags": [ + , + ... + ], +}`, + }, + }, + }, + Failures: []ResponseDescriptor{ + invalidPaginationResponseDescriptor, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + }, + }, + { + Name: RouteNameManifest, + Path: "/v2/{name:" + reference.NameRegexp.String() + "}/manifests/{reference:" + reference.TagRegexp.String() + "|" + digest.DigestRegexp.String() + "}", + Entity: "Manifest", + Description: "Create, update, delete and retrieve manifests.", + Methods: []MethodDescriptor{ + { + Method: "GET", + Description: "Fetch the manifest identified by `name` and `reference` where `reference` can be a tag or digest. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.", + Requests: []RequestDescriptor{ + { + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + referenceParameterDescriptor, + }, + Successes: []ResponseDescriptor{ + { + Description: "The manifest identified by `name` and `reference`. The contents can be used to identify and resolve resources required to run the specified image.", + StatusCode: http.StatusOK, + Headers: []ParameterDescriptor{ + digestHeader, + }, + Body: BodyDescriptor{ + ContentType: "", + Format: manifestBody, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "The name or reference was invalid.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameInvalid, + ErrorCodeTagInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + { + Method: "PUT", + Description: "Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.", + Requests: []RequestDescriptor{ + { + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + referenceParameterDescriptor, + }, + Body: BodyDescriptor{ + ContentType: "", + Format: manifestBody, + }, + Successes: []ResponseDescriptor{ + { + Description: "The manifest has been accepted by the registry and is stored under the specified `name` and `tag`.", + StatusCode: http.StatusCreated, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Description: "The canonical location url of the uploaded manifest.", + Format: "", + }, + contentLengthZeroHeader, + digestHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Name: "Invalid Manifest", + Description: "The received manifest was invalid in some way, as described by the error codes. The client should resolve the issue and retry the request.", + StatusCode: http.StatusBadRequest, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameInvalid, + ErrorCodeTagInvalid, + ErrorCodeManifestInvalid, + ErrorCodeManifestUnverified, + ErrorCodeBlobUnknown, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + { + Name: "Missing Layer(s)", + Description: "One or more layers may be missing during a manifest upload. If so, the missing layers will be enumerated in the error response.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeBlobUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: `{ + "errors:" [{ + "code": "BLOB_UNKNOWN", + "message": "blob unknown to registry", + "detail": { + "digest": "" + } + }, + ... + ] +}`, + }, + }, + { + Name: "Not allowed", + Description: "Manifest put is not allowed because the registry is configured as a pull-through cache or for some other reason", + StatusCode: http.StatusMethodNotAllowed, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeUnsupported, + }, + }, + }, + }, + }, + }, + { + Method: "DELETE", + Description: "Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.", + Requests: []RequestDescriptor{ + { + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + referenceParameterDescriptor, + }, + Successes: []ResponseDescriptor{ + { + StatusCode: http.StatusAccepted, + }, + }, + Failures: []ResponseDescriptor{ + { + Name: "Invalid Name or Reference", + Description: "The specified `name` or `reference` were invalid and the delete was unable to proceed.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameInvalid, + ErrorCodeTagInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + { + Name: "Unknown Manifest", + Description: "The specified `name` or `reference` are unknown to the registry and the delete was unable to proceed. Clients can assume the manifest was already deleted if this response is returned.", + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameUnknown, + ErrorCodeManifestUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Name: "Not allowed", + Description: "Manifest delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled.", + StatusCode: http.StatusMethodNotAllowed, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeUnsupported, + }, + }, + }, + }, + }, + }, + }, + }, + + { + Name: RouteNameBlob, + Path: "/v2/{name:" + reference.NameRegexp.String() + "}/blobs/{digest:" + digest.DigestRegexp.String() + "}", + Entity: "Blob", + Description: "Operations on blobs identified by `name` and `digest`. Used to fetch or delete layers by digest.", + Methods: []MethodDescriptor{ + { + Method: "GET", + Description: "Retrieve the blob from the registry identified by `digest`. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.", + Requests: []RequestDescriptor{ + { + Name: "Fetch Blob", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + digestPathParameter, + }, + Successes: []ResponseDescriptor{ + { + Description: "The blob identified by `digest` is available. The blob content will be present in the body of the request.", + StatusCode: http.StatusOK, + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "The length of the requested blob content.", + Format: "", + }, + digestHeader, + }, + Body: BodyDescriptor{ + ContentType: "application/octet-stream", + Format: "", + }, + }, + { + Description: "The blob identified by `digest` is available at the provided location.", + StatusCode: http.StatusTemporaryRedirect, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Description: "The location where the layer should be accessible.", + Format: "", + }, + digestHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "There was a problem with the request that needs to be addressed by the client, such as an invalid `name` or `tag`.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameInvalid, + ErrorCodeDigestInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The blob, identified by `name` and `digest`, is unknown to the registry.", + StatusCode: http.StatusNotFound, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameUnknown, + ErrorCodeBlobUnknown, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + { + Name: "Fetch Blob Part", + Description: "This endpoint may also support RFC7233 compliant range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is returned, range requests can be used to fetch partial content.", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + { + Name: "Range", + Type: "string", + Description: "HTTP Range header specifying blob chunk.", + Format: "bytes=-", + }, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + digestPathParameter, + }, + Successes: []ResponseDescriptor{ + { + Description: "The blob identified by `digest` is available. The specified chunk of blob content will be present in the body of the request.", + StatusCode: http.StatusPartialContent, + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "The length of the requested blob chunk.", + Format: "", + }, + { + Name: "Content-Range", + Type: "byte range", + Description: "Content range of blob chunk.", + Format: "bytes -/", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/octet-stream", + Format: "", + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "There was a problem with the request that needs to be addressed by the client, such as an invalid `name` or `tag`.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameInvalid, + ErrorCodeDigestInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameUnknown, + ErrorCodeBlobUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The range specification cannot be satisfied for the requested content. This can happen when the range is not formatted correctly or if the range is outside of the valid size of the content.", + StatusCode: http.StatusRequestedRangeNotSatisfiable, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + { + Method: "DELETE", + Description: "Delete the blob identified by `name` and `digest`", + Requests: []RequestDescriptor{ + { + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + digestPathParameter, + }, + Successes: []ResponseDescriptor{ + { + StatusCode: http.StatusAccepted, + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "0", + Format: "0", + }, + digestHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Name: "Invalid Name or Digest", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + }, + }, + { + Description: "The blob, identified by `name` and `digest`, is unknown to the registry.", + StatusCode: http.StatusNotFound, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameUnknown, + ErrorCodeBlobUnknown, + }, + }, + { + Description: "Blob delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled", + StatusCode: http.StatusMethodNotAllowed, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeUnsupported, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + + // TODO(stevvooe): We may want to add a PUT request here to + // kickoff an upload of a blob, integrated with the blob upload + // API. + }, + }, + + { + Name: RouteNameBlobUpload, + Path: "/v2/{name:" + reference.NameRegexp.String() + "}/blobs/uploads/", + Entity: "Initiate Blob Upload", + Description: "Initiate a blob upload. This endpoint can be used to create resumable uploads or monolithic uploads.", + Methods: []MethodDescriptor{ + { + Method: "POST", + Description: "Initiate a resumable blob upload. If successful, an upload location will be provided to complete the upload. Optionally, if the `digest` parameter is present, the request body will be used to complete the upload in a single request.", + Requests: []RequestDescriptor{ + { + Name: "Initiate Monolithic Blob Upload", + Description: "Upload a blob identified by the `digest` parameter in single request. This upload will not be resumable unless a recoverable error is returned.", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + { + Name: "Content-Length", + Type: "integer", + Format: "", + }, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + }, + QueryParameters: []ParameterDescriptor{ + { + Name: "digest", + Type: "query", + Format: "", + Regexp: digest.DigestRegexp, + Description: `Digest of uploaded blob. If present, the upload will be completed, in a single request, with contents of the request body as the resulting blob.`, + }, + }, + Body: BodyDescriptor{ + ContentType: "application/octect-stream", + Format: "", + }, + Successes: []ResponseDescriptor{ + { + Description: "The blob has been created in the registry and is available at the provided location.", + StatusCode: http.StatusCreated, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Format: "", + }, + contentLengthZeroHeader, + dockerUploadUUIDHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Name: "Invalid Name or Digest", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + }, + }, + { + Name: "Not allowed", + Description: "Blob upload is not allowed because the registry is configured as a pull-through cache or for some other reason", + StatusCode: http.StatusMethodNotAllowed, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeUnsupported, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + { + Name: "Initiate Resumable Blob Upload", + Description: "Initiate a resumable blob upload with an empty request body.", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + contentLengthZeroHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + }, + Successes: []ResponseDescriptor{ + { + Description: "The upload has been created. The `Location` header must be used to complete the upload. The response should be identical to a `GET` request on the contents of the returned `Location` header.", + StatusCode: http.StatusAccepted, + Headers: []ParameterDescriptor{ + contentLengthZeroHeader, + { + Name: "Location", + Type: "url", + Format: "/v2//blobs/uploads/", + Description: "The location of the created upload. Clients should use the contents verbatim to complete the upload, adding parameters where required.", + }, + { + Name: "Range", + Format: "0-0", + Description: "Range header indicating the progress of the upload. When starting an upload, it will return an empty range, since no content has been received.", + }, + dockerUploadUUIDHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Name: "Invalid Name or Digest", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + { + Name: "Mount Blob", + Description: "Mount a blob identified by the `mount` parameter from another repository.", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + contentLengthZeroHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + }, + QueryParameters: []ParameterDescriptor{ + { + Name: "mount", + Type: "query", + Format: "", + Regexp: digest.DigestRegexp, + Description: `Digest of blob to mount from the source repository.`, + }, + { + Name: "from", + Type: "query", + Format: "", + Regexp: reference.NameRegexp, + Description: `Name of the source repository.`, + }, + }, + Successes: []ResponseDescriptor{ + { + Description: "The blob has been mounted in the repository and is available at the provided location.", + StatusCode: http.StatusCreated, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Format: "", + }, + contentLengthZeroHeader, + dockerUploadUUIDHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Name: "Invalid Name or Digest", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + }, + }, + { + Name: "Not allowed", + Description: "Blob mount is not allowed because the registry is configured as a pull-through cache or for some other reason", + StatusCode: http.StatusMethodNotAllowed, + ErrorCodes: []errcode.ErrorCode{ + errcode.ErrorCodeUnsupported, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + }, + }, + + { + Name: RouteNameBlobUploadChunk, + Path: "/v2/{name:" + reference.NameRegexp.String() + "}/blobs/uploads/{uuid:[a-zA-Z0-9-_.=]+}", + Entity: "Blob Upload", + Description: "Interact with blob uploads. Clients should never assemble URLs for this endpoint and should only take it through the `Location` header on related API requests. The `Location` header and its parameters should be preserved by clients, using the latest value returned via upload related API calls.", + Methods: []MethodDescriptor{ + { + Method: "GET", + Description: "Retrieve status of upload identified by `uuid`. The primary purpose of this endpoint is to resolve the current status of a resumable upload.", + Requests: []RequestDescriptor{ + { + Description: "Retrieve the progress of the current upload, as reported by the `Range` header.", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + uuidParameterDescriptor, + }, + Successes: []ResponseDescriptor{ + { + Name: "Upload Progress", + Description: "The upload is known and in progress. The last received offset is available in the `Range` header.", + StatusCode: http.StatusNoContent, + Headers: []ParameterDescriptor{ + { + Name: "Range", + Type: "header", + Format: "0-", + Description: "Range indicating the current progress of the upload.", + }, + contentLengthZeroHeader, + dockerUploadUUIDHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "There was an error processing the upload and it must be restarted.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + ErrorCodeBlobUploadInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The upload is unknown to the registry. The upload must be restarted.", + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeBlobUploadUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + { + Method: "PATCH", + Description: "Upload a chunk of data for the specified upload.", + Requests: []RequestDescriptor{ + { + Name: "Stream upload", + Description: "Upload a stream of data to upload without completing the upload.", + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + uuidParameterDescriptor, + }, + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + }, + Body: BodyDescriptor{ + ContentType: "application/octet-stream", + Format: "", + }, + Successes: []ResponseDescriptor{ + { + Name: "Data Accepted", + Description: "The stream of data has been accepted and the current progress is available in the range header. The updated upload location is available in the `Location` header.", + StatusCode: http.StatusNoContent, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Format: "/v2//blobs/uploads/", + Description: "The location of the upload. Clients should assume this changes after each request. Clients should use the contents verbatim to complete the upload, adding parameters where required.", + }, + { + Name: "Range", + Type: "header", + Format: "0-", + Description: "Range indicating the current progress of the upload.", + }, + contentLengthZeroHeader, + dockerUploadUUIDHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "There was an error processing the upload and it must be restarted.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + ErrorCodeBlobUploadInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The upload is unknown to the registry. The upload must be restarted.", + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeBlobUploadUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + { + Name: "Chunked upload", + Description: "Upload a chunk of data to specified upload without completing the upload. The data will be uploaded to the specified Content Range.", + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + uuidParameterDescriptor, + }, + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + { + Name: "Content-Range", + Type: "header", + Format: "-", + Required: true, + Description: "Range of bytes identifying the desired block of content represented by the body. Start must the end offset retrieved via status check plus one. Note that this is a non-standard use of the `Content-Range` header.", + }, + { + Name: "Content-Length", + Type: "integer", + Format: "", + Description: "Length of the chunk being uploaded, corresponding the length of the request body.", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/octet-stream", + Format: "", + }, + Successes: []ResponseDescriptor{ + { + Name: "Chunk Accepted", + Description: "The chunk of data has been accepted and the current progress is available in the range header. The updated upload location is available in the `Location` header.", + StatusCode: http.StatusNoContent, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Format: "/v2//blobs/uploads/", + Description: "The location of the upload. Clients should assume this changes after each request. Clients should use the contents verbatim to complete the upload, adding parameters where required.", + }, + { + Name: "Range", + Type: "header", + Format: "0-", + Description: "Range indicating the current progress of the upload.", + }, + contentLengthZeroHeader, + dockerUploadUUIDHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "There was an error processing the upload and it must be restarted.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + ErrorCodeBlobUploadInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The upload is unknown to the registry. The upload must be restarted.", + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeBlobUploadUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The `Content-Range` specification cannot be accepted, either because it does not overlap with the current progress or it is invalid.", + StatusCode: http.StatusRequestedRangeNotSatisfiable, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + { + Method: "PUT", + Description: "Complete the upload specified by `uuid`, optionally appending the body as the final chunk.", + Requests: []RequestDescriptor{ + { + Description: "Complete the upload, providing all the data in the body, if necessary. A request without a body will just complete the upload with previously uploaded content.", + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + { + Name: "Content-Length", + Type: "integer", + Format: "", + Description: "Length of the data being uploaded, corresponding to the length of the request body. May be zero if no data is provided.", + }, + }, + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + uuidParameterDescriptor, + }, + QueryParameters: []ParameterDescriptor{ + { + Name: "digest", + Type: "string", + Format: "", + Regexp: digest.DigestRegexp, + Required: true, + Description: `Digest of uploaded blob.`, + }, + }, + Body: BodyDescriptor{ + ContentType: "application/octet-stream", + Format: "", + }, + Successes: []ResponseDescriptor{ + { + Name: "Upload Complete", + Description: "The upload has been completed and accepted by the registry. The canonical location will be available in the `Location` header.", + StatusCode: http.StatusNoContent, + Headers: []ParameterDescriptor{ + { + Name: "Location", + Type: "url", + Format: "", + Description: "The canonical location of the blob for retrieval", + }, + { + Name: "Content-Range", + Type: "header", + Format: "-", + Description: "Range of bytes identifying the desired block of content represented by the body. Start must match the end of offset retrieved via status check. Note that this is a non-standard use of the `Content-Range` header.", + }, + contentLengthZeroHeader, + digestHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "There was an error processing the upload and it must be restarted.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeDigestInvalid, + ErrorCodeNameInvalid, + ErrorCodeBlobUploadInvalid, + errcode.ErrorCodeUnsupported, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The upload is unknown to the registry. The upload must be restarted.", + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeBlobUploadUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + { + Method: "DELETE", + Description: "Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished uploads will eventually timeout.", + Requests: []RequestDescriptor{ + { + Description: "Cancel the upload specified by `uuid`.", + PathParameters: []ParameterDescriptor{ + nameParameterDescriptor, + uuidParameterDescriptor, + }, + Headers: []ParameterDescriptor{ + hostHeader, + authHeader, + contentLengthZeroHeader, + }, + Successes: []ResponseDescriptor{ + { + Name: "Upload Deleted", + Description: "The upload has been successfully deleted.", + StatusCode: http.StatusNoContent, + Headers: []ParameterDescriptor{ + contentLengthZeroHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + { + Description: "An error was encountered processing the delete. The client may ignore this error.", + StatusCode: http.StatusBadRequest, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeNameInvalid, + ErrorCodeBlobUploadInvalid, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + { + Description: "The upload is unknown to the registry. The client may ignore this error and assume the upload has been deleted.", + StatusCode: http.StatusNotFound, + ErrorCodes: []errcode.ErrorCode{ + ErrorCodeBlobUploadUnknown, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: errorsBody, + }, + }, + unauthorizedResponseDescriptor, + repositoryNotFoundResponseDescriptor, + deniedResponseDescriptor, + tooManyRequestsDescriptor, + }, + }, + }, + }, + }, + }, + { + Name: RouteNameCatalog, + Path: "/v2/_catalog", + Entity: "Catalog", + Description: "List a set of available repositories in the local registry cluster. Does not provide any indication of what may be available upstream. Applications can only determine if a repository is available but not if it is not available.", + Methods: []MethodDescriptor{ + { + Method: "GET", + Description: "Retrieve a sorted, json list of repositories available in the registry.", + Requests: []RequestDescriptor{ + { + Name: "Catalog Fetch", + Description: "Request an unabridged list of repositories available. The implementation may impose a maximum limit and return a partial set with pagination links.", + Successes: []ResponseDescriptor{ + { + Description: "Returns the unabridged list of repositories as a json response.", + StatusCode: http.StatusOK, + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + }, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: `{ + "repositories": [ + , + ... + ] +}`, + }, + }, + }, + }, + { + Name: "Catalog Fetch Paginated", + Description: "Return the specified portion of repositories.", + QueryParameters: paginationParameters, + Successes: []ResponseDescriptor{ + { + StatusCode: http.StatusOK, + Body: BodyDescriptor{ + ContentType: "application/json; charset=utf-8", + Format: `{ + "repositories": [ + , + ... + ] + "next": "?last=&n=" +}`, + }, + Headers: []ParameterDescriptor{ + { + Name: "Content-Length", + Type: "integer", + Description: "Length of the JSON response body.", + Format: "", + }, + linkHeader, + }, + }, + }, + Failures: []ResponseDescriptor{ + invalidPaginationResponseDescriptor, + }, + }, + }, + }, + }, + }, +} + +var routeDescriptorsMap map[string]RouteDescriptor + +func init() { + routeDescriptorsMap = make(map[string]RouteDescriptor, len(routeDescriptors)) + + for _, descriptor := range routeDescriptors { + routeDescriptorsMap[descriptor.Name] = descriptor + } +} diff --git a/vendor/github.com/docker/distribution/registry/api/v2/doc.go b/vendor/github.com/docker/distribution/registry/api/v2/doc.go new file mode 100644 index 000000000..cde011959 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/v2/doc.go @@ -0,0 +1,9 @@ +// Package v2 describes routes, urls and the error codes used in the Docker +// Registry JSON HTTP API V2. In addition to declarations, descriptors are +// provided for routes and error codes that can be used for implementation and +// automatically generating documentation. +// +// Definitions here are considered to be locked down for the V2 registry api. +// Any changes must be considered carefully and should not proceed without a +// change proposal in docker core. +package v2 diff --git a/vendor/github.com/docker/distribution/registry/api/v2/errors.go b/vendor/github.com/docker/distribution/registry/api/v2/errors.go new file mode 100644 index 000000000..87e9f3c14 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/v2/errors.go @@ -0,0 +1,145 @@ +package v2 + +import ( + "net/http" + + "github.com/docker/distribution/registry/api/errcode" +) + +const errGroup = "registry.api.v2" + +var ( + // ErrorCodeDigestInvalid is returned when uploading a blob if the + // provided digest does not match the blob contents. + ErrorCodeDigestInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "DIGEST_INVALID", + Message: "provided digest did not match uploaded content", + Description: `When a blob is uploaded, the registry will check that + the content matches the digest provided by the client. The error may + include a detail structure with the key "digest", including the + invalid digest string. This error may also be returned when a manifest + includes an invalid layer digest.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeSizeInvalid is returned when uploading a blob if the provided + ErrorCodeSizeInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "SIZE_INVALID", + Message: "provided length did not match content length", + Description: `When a layer is uploaded, the provided size will be + checked against the uploaded content. If they do not match, this error + will be returned.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeNameInvalid is returned when the name in the manifest does not + // match the provided name. + ErrorCodeNameInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "NAME_INVALID", + Message: "invalid repository name", + Description: `Invalid repository name encountered either during + manifest validation or any API operation.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeTagInvalid is returned when the tag in the manifest does not + // match the provided tag. + ErrorCodeTagInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "TAG_INVALID", + Message: "manifest tag did not match URI", + Description: `During a manifest upload, if the tag in the manifest + does not match the uri tag, this error will be returned.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeNameUnknown when the repository name is not known. + ErrorCodeNameUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "NAME_UNKNOWN", + Message: "repository name not known to registry", + Description: `This is returned if the name used during an operation is + unknown to the registry.`, + HTTPStatusCode: http.StatusNotFound, + }) + + // ErrorCodeManifestUnknown returned when image manifest is unknown. + ErrorCodeManifestUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "MANIFEST_UNKNOWN", + Message: "manifest unknown", + Description: `This error is returned when the manifest, identified by + name and tag is unknown to the repository.`, + HTTPStatusCode: http.StatusNotFound, + }) + + // ErrorCodeManifestInvalid returned when an image manifest is invalid, + // typically during a PUT operation. This error encompasses all errors + // encountered during manifest validation that aren't signature errors. + ErrorCodeManifestInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "MANIFEST_INVALID", + Message: "manifest invalid", + Description: `During upload, manifests undergo several checks ensuring + validity. If those checks fail, this error may be returned, unless a + more specific error is included. The detail will contain information + the failed validation.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeManifestUnverified is returned when the manifest fails + // signature verification. + ErrorCodeManifestUnverified = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "MANIFEST_UNVERIFIED", + Message: "manifest failed signature verification", + Description: `During manifest upload, if the manifest fails signature + verification, this error will be returned.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeManifestBlobUnknown is returned when a manifest blob is + // unknown to the registry. + ErrorCodeManifestBlobUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "MANIFEST_BLOB_UNKNOWN", + Message: "blob unknown to registry", + Description: `This error may be returned when a manifest blob is + unknown to the registry.`, + HTTPStatusCode: http.StatusBadRequest, + }) + + // ErrorCodeBlobUnknown is returned when a blob is unknown to the + // registry. This can happen when the manifest references a nonexistent + // layer or the result is not found by a blob fetch. + ErrorCodeBlobUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "BLOB_UNKNOWN", + Message: "blob unknown to registry", + Description: `This error may be returned when a blob is unknown to the + registry in a specified repository. This can be returned with a + standard get or if a manifest references an unknown layer during + upload.`, + HTTPStatusCode: http.StatusNotFound, + }) + + // ErrorCodeBlobUploadUnknown is returned when an upload is unknown. + ErrorCodeBlobUploadUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "BLOB_UPLOAD_UNKNOWN", + Message: "blob upload unknown to registry", + Description: `If a blob upload has been cancelled or was never + started, this error code may be returned.`, + HTTPStatusCode: http.StatusNotFound, + }) + + // ErrorCodeBlobUploadInvalid is returned when an upload is invalid. + ErrorCodeBlobUploadInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "BLOB_UPLOAD_INVALID", + Message: "blob upload invalid", + Description: `The blob upload encountered an error and can no + longer proceed.`, + HTTPStatusCode: http.StatusNotFound, + }) + + ErrorCodePaginationNumberInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ + Value: "PAGINATION_NUMBER_INVALID", + Message: "invalid number of results requested", + Description: `Returned when the "n" parameter (number of results + to return) is not an integer, "n" is negative or "n" is bigger than + the maximum allowed.`, + HTTPStatusCode: http.StatusBadRequest, + }) +) diff --git a/vendor/github.com/docker/distribution/registry/api/v2/headerparser.go b/vendor/github.com/docker/distribution/registry/api/v2/headerparser.go new file mode 100644 index 000000000..9bc41a3a6 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/v2/headerparser.go @@ -0,0 +1,161 @@ +package v2 + +import ( + "fmt" + "regexp" + "strings" + "unicode" +) + +var ( + // according to rfc7230 + reToken = regexp.MustCompile(`^[^"(),/:;<=>?@[\]{}[:space:][:cntrl:]]+`) + reQuotedValue = regexp.MustCompile(`^[^\\"]+`) + reEscapedCharacter = regexp.MustCompile(`^[[:blank:][:graph:]]`) +) + +// parseForwardedHeader is a benevolent parser of Forwarded header defined in rfc7239. The header contains +// a comma-separated list of forwarding key-value pairs. Each list element is set by single proxy. The +// function parses only the first element of the list, which is set by the very first proxy. It returns a map +// of corresponding key-value pairs and an unparsed slice of the input string. +// +// Examples of Forwarded header values: +// +// 1. Forwarded: For=192.0.2.43; Proto=https,For="[2001:db8:cafe::17]",For=unknown +// 2. Forwarded: for="192.0.2.43:443"; host="registry.example.org", for="10.10.05.40:80" +// +// The first will be parsed into {"for": "192.0.2.43", "proto": "https"} while the second into +// {"for": "192.0.2.43:443", "host": "registry.example.org"}. +func parseForwardedHeader(forwarded string) (map[string]string, string, error) { + // Following are states of forwarded header parser. Any state could transition to a failure. + const ( + // terminating state; can transition to Parameter + stateElement = iota + // terminating state; can transition to KeyValueDelimiter + stateParameter + // can transition to Value + stateKeyValueDelimiter + // can transition to one of { QuotedValue, PairEnd } + stateValue + // can transition to one of { EscapedCharacter, PairEnd } + stateQuotedValue + // can transition to one of { QuotedValue } + stateEscapedCharacter + // terminating state; can transition to one of { Parameter, Element } + statePairEnd + ) + + var ( + parameter string + value string + parse = forwarded[:] + res = map[string]string{} + state = stateElement + ) + +Loop: + for { + // skip spaces unless in quoted value + if state != stateQuotedValue && state != stateEscapedCharacter { + parse = strings.TrimLeftFunc(parse, unicode.IsSpace) + } + + if len(parse) == 0 { + if state != stateElement && state != statePairEnd && state != stateParameter { + return nil, parse, fmt.Errorf("unexpected end of input") + } + // terminating + break + } + + switch state { + // terminate at list element delimiter + case stateElement: + if parse[0] == ',' { + parse = parse[1:] + break Loop + } + state = stateParameter + + // parse parameter (the key of key-value pair) + case stateParameter: + match := reToken.FindString(parse) + if len(match) == 0 { + return nil, parse, fmt.Errorf("failed to parse token at position %d", len(forwarded)-len(parse)) + } + parameter = strings.ToLower(match) + parse = parse[len(match):] + state = stateKeyValueDelimiter + + // parse '=' + case stateKeyValueDelimiter: + if parse[0] != '=' { + return nil, parse, fmt.Errorf("expected '=', not '%c' at position %d", parse[0], len(forwarded)-len(parse)) + } + parse = parse[1:] + state = stateValue + + // parse value or quoted value + case stateValue: + if parse[0] == '"' { + parse = parse[1:] + state = stateQuotedValue + } else { + value = reToken.FindString(parse) + if len(value) == 0 { + return nil, parse, fmt.Errorf("failed to parse value at position %d", len(forwarded)-len(parse)) + } + if _, exists := res[parameter]; exists { + return nil, parse, fmt.Errorf("duplicate parameter %q at position %d", parameter, len(forwarded)-len(parse)) + } + res[parameter] = value + parse = parse[len(value):] + value = "" + state = statePairEnd + } + + // parse a part of quoted value until the first backslash + case stateQuotedValue: + match := reQuotedValue.FindString(parse) + value += match + parse = parse[len(match):] + switch { + case len(parse) == 0: + return nil, parse, fmt.Errorf("unterminated quoted string") + case parse[0] == '"': + res[parameter] = value + value = "" + parse = parse[1:] + state = statePairEnd + case parse[0] == '\\': + parse = parse[1:] + state = stateEscapedCharacter + } + + // parse escaped character in a quoted string, ignore the backslash + // transition back to QuotedValue state + case stateEscapedCharacter: + c := reEscapedCharacter.FindString(parse) + if len(c) == 0 { + return nil, parse, fmt.Errorf("invalid escape sequence at position %d", len(forwarded)-len(parse)-1) + } + value += c + parse = parse[1:] + state = stateQuotedValue + + // expect either a new key-value pair, new list or end of input + case statePairEnd: + switch parse[0] { + case ';': + parse = parse[1:] + state = stateParameter + case ',': + state = stateElement + default: + return nil, parse, fmt.Errorf("expected ',' or ';', not %c at position %d", parse[0], len(forwarded)-len(parse)) + } + } + } + + return res, parse, nil +} diff --git a/vendor/github.com/docker/distribution/registry/api/v2/routes.go b/vendor/github.com/docker/distribution/registry/api/v2/routes.go new file mode 100644 index 000000000..9612ac2e5 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/v2/routes.go @@ -0,0 +1,40 @@ +package v2 + +import "github.com/gorilla/mux" + +// The following are definitions of the name under which all V2 routes are +// registered. These symbols can be used to look up a route based on the name. +const ( + RouteNameBase = "base" + RouteNameManifest = "manifest" + RouteNameTags = "tags" + RouteNameBlob = "blob" + RouteNameBlobUpload = "blob-upload" + RouteNameBlobUploadChunk = "blob-upload-chunk" + RouteNameCatalog = "catalog" +) + +// Router builds a gorilla router with named routes for the various API +// methods. This can be used directly by both server implementations and +// clients. +func Router() *mux.Router { + return RouterWithPrefix("") +} + +// RouterWithPrefix builds a gorilla router with a configured prefix +// on all routes. +func RouterWithPrefix(prefix string) *mux.Router { + rootRouter := mux.NewRouter() + router := rootRouter + if prefix != "" { + router = router.PathPrefix(prefix).Subrouter() + } + + router.StrictSlash(true) + + for _, descriptor := range routeDescriptors { + router.Path(descriptor.Path).Name(descriptor.Name) + } + + return rootRouter +} diff --git a/vendor/github.com/docker/distribution/registry/api/v2/urls.go b/vendor/github.com/docker/distribution/registry/api/v2/urls.go new file mode 100644 index 000000000..ab6406335 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/api/v2/urls.go @@ -0,0 +1,254 @@ +package v2 + +import ( + "fmt" + "net/http" + "net/url" + "strings" + + "github.com/distribution/reference" + "github.com/gorilla/mux" +) + +// URLBuilder creates registry API urls from a single base endpoint. It can be +// used to create urls for use in a registry client or server. +// +// All urls will be created from the given base, including the api version. +// For example, if a root of "/foo/" is provided, urls generated will be fall +// under "/foo/v2/...". Most application will only provide a schema, host and +// port, such as "https://localhost:5000/". +type URLBuilder struct { + root *url.URL // url root (ie http://localhost/) + router *mux.Router + relative bool +} + +// NewURLBuilder creates a URLBuilder with provided root url object. +func NewURLBuilder(root *url.URL, relative bool) *URLBuilder { + return &URLBuilder{ + root: root, + router: Router(), + relative: relative, + } +} + +// NewURLBuilderFromString workes identically to NewURLBuilder except it takes +// a string argument for the root, returning an error if it is not a valid +// url. +func NewURLBuilderFromString(root string, relative bool) (*URLBuilder, error) { + u, err := url.Parse(root) + if err != nil { + return nil, err + } + + return NewURLBuilder(u, relative), nil +} + +// NewURLBuilderFromRequest uses information from an *http.Request to +// construct the root url. +func NewURLBuilderFromRequest(r *http.Request, relative bool) *URLBuilder { + var ( + scheme = "http" + host = r.Host + ) + + if r.TLS != nil { + scheme = "https" + } else if len(r.URL.Scheme) > 0 { + scheme = r.URL.Scheme + } + + // Handle fowarded headers + // Prefer "Forwarded" header as defined by rfc7239 if given + // see https://tools.ietf.org/html/rfc7239 + if forwarded := r.Header.Get("Forwarded"); len(forwarded) > 0 { + forwardedHeader, _, err := parseForwardedHeader(forwarded) + if err == nil { + if fproto := forwardedHeader["proto"]; len(fproto) > 0 { + scheme = fproto + } + if fhost := forwardedHeader["host"]; len(fhost) > 0 { + host = fhost + } + } + } else { + if forwardedProto := r.Header.Get("X-Forwarded-Proto"); len(forwardedProto) > 0 { + scheme = forwardedProto + } + if forwardedHost := r.Header.Get("X-Forwarded-Host"); len(forwardedHost) > 0 { + // According to the Apache mod_proxy docs, X-Forwarded-Host can be a + // comma-separated list of hosts, to which each proxy appends the + // requested host. We want to grab the first from this comma-separated + // list. + hosts := strings.SplitN(forwardedHost, ",", 2) + host = strings.TrimSpace(hosts[0]) + } + } + + basePath := routeDescriptorsMap[RouteNameBase].Path + + requestPath := r.URL.Path + index := strings.Index(requestPath, basePath) + + u := &url.URL{ + Scheme: scheme, + Host: host, + } + + if index > 0 { + // N.B. index+1 is important because we want to include the trailing / + u.Path = requestPath[0 : index+1] + } + + return NewURLBuilder(u, relative) +} + +// BuildBaseURL constructs a base url for the API, typically just "/v2/". +func (ub *URLBuilder) BuildBaseURL() (string, error) { + route := ub.cloneRoute(RouteNameBase) + + baseURL, err := route.URL() + if err != nil { + return "", err + } + + return baseURL.String(), nil +} + +// BuildCatalogURL constructs a url get a catalog of repositories +func (ub *URLBuilder) BuildCatalogURL(values ...url.Values) (string, error) { + route := ub.cloneRoute(RouteNameCatalog) + + catalogURL, err := route.URL() + if err != nil { + return "", err + } + + return appendValuesURL(catalogURL, values...).String(), nil +} + +// BuildTagsURL constructs a url to list the tags in the named repository. +func (ub *URLBuilder) BuildTagsURL(name reference.Named) (string, error) { + route := ub.cloneRoute(RouteNameTags) + + tagsURL, err := route.URL("name", name.Name()) + if err != nil { + return "", err + } + + return tagsURL.String(), nil +} + +// BuildManifestURL constructs a url for the manifest identified by name and +// reference. The argument reference may be either a tag or digest. +func (ub *URLBuilder) BuildManifestURL(ref reference.Named) (string, error) { + route := ub.cloneRoute(RouteNameManifest) + + tagOrDigest := "" + switch v := ref.(type) { + case reference.Tagged: + tagOrDigest = v.Tag() + case reference.Digested: + tagOrDigest = v.Digest().String() + default: + return "", fmt.Errorf("reference must have a tag or digest") + } + + manifestURL, err := route.URL("name", ref.Name(), "reference", tagOrDigest) + if err != nil { + return "", err + } + + return manifestURL.String(), nil +} + +// BuildBlobURL constructs the url for the blob identified by name and dgst. +func (ub *URLBuilder) BuildBlobURL(ref reference.Canonical) (string, error) { + route := ub.cloneRoute(RouteNameBlob) + + layerURL, err := route.URL("name", ref.Name(), "digest", ref.Digest().String()) + if err != nil { + return "", err + } + + return layerURL.String(), nil +} + +// BuildBlobUploadURL constructs a url to begin a blob upload in the +// repository identified by name. +func (ub *URLBuilder) BuildBlobUploadURL(name reference.Named, values ...url.Values) (string, error) { + route := ub.cloneRoute(RouteNameBlobUpload) + + uploadURL, err := route.URL("name", name.Name()) + if err != nil { + return "", err + } + + return appendValuesURL(uploadURL, values...).String(), nil +} + +// BuildBlobUploadChunkURL constructs a url for the upload identified by uuid, +// including any url values. This should generally not be used by clients, as +// this url is provided by server implementations during the blob upload +// process. +func (ub *URLBuilder) BuildBlobUploadChunkURL(name reference.Named, uuid string, values ...url.Values) (string, error) { + route := ub.cloneRoute(RouteNameBlobUploadChunk) + + uploadURL, err := route.URL("name", name.Name(), "uuid", uuid) + if err != nil { + return "", err + } + + return appendValuesURL(uploadURL, values...).String(), nil +} + +// clondedRoute returns a clone of the named route from the router. Routes +// must be cloned to avoid modifying them during url generation. +func (ub *URLBuilder) cloneRoute(name string) clonedRoute { + route := new(mux.Route) + root := new(url.URL) + + *route = *ub.router.GetRoute(name) // clone the route + *root = *ub.root + + return clonedRoute{Route: route, root: root, relative: ub.relative} +} + +type clonedRoute struct { + *mux.Route + root *url.URL + relative bool +} + +func (cr clonedRoute) URL(pairs ...string) (*url.URL, error) { + routeURL, err := cr.Route.URL(pairs...) + if err != nil { + return nil, err + } + + if cr.relative { + return routeURL, nil + } + + if routeURL.Scheme == "" && routeURL.User == nil && routeURL.Host == "" { + routeURL.Path = routeURL.Path[1:] + } + + url := cr.root.ResolveReference(routeURL) + url.Scheme = cr.root.Scheme + return url, nil +} + +// appendValuesURL appends the parameters to the url. +func appendValuesURL(u *url.URL, values ...url.Values) *url.URL { + merged := u.Query() + + for _, v := range values { + for k, vv := range v { + merged[k] = append(merged[k], vv...) + } + } + + u.RawQuery = merged.Encode() + return u +} diff --git a/vendor/github.com/docker/distribution/registry/client/auth/api_version.go b/vendor/github.com/docker/distribution/registry/client/auth/api_version.go new file mode 100644 index 000000000..7d8f1d957 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/auth/api_version.go @@ -0,0 +1,58 @@ +package auth + +import ( + "net/http" + "strings" +) + +// APIVersion represents a version of an API including its +// type and version number. +type APIVersion struct { + // Type refers to the name of a specific API specification + // such as "registry" + Type string + + // Version is the version of the API specification implemented, + // This may omit the revision number and only include + // the major and minor version, such as "2.0" + Version string +} + +// String returns the string formatted API Version +func (v APIVersion) String() string { + return v.Type + "/" + v.Version +} + +// APIVersions gets the API versions out of an HTTP response using the provided +// version header as the key for the HTTP header. +func APIVersions(resp *http.Response, versionHeader string) []APIVersion { + versions := []APIVersion{} + if versionHeader != "" { + for _, supportedVersions := range resp.Header[http.CanonicalHeaderKey(versionHeader)] { + for _, version := range strings.Fields(supportedVersions) { + versions = append(versions, ParseAPIVersion(version)) + } + } + } + return versions +} + +// ParseAPIVersion parses an API version string into an APIVersion +// Format (Expected, not enforced): +// API version string = '/' +// API type = [a-z][a-z0-9]* +// API version = [0-9]+(\.[0-9]+)? +// TODO(dmcgowan): Enforce format, add error condition, remove unknown type +func ParseAPIVersion(versionStr string) APIVersion { + idx := strings.IndexRune(versionStr, '/') + if idx == -1 { + return APIVersion{ + Type: "unknown", + Version: versionStr, + } + } + return APIVersion{ + Type: strings.ToLower(versionStr[:idx]), + Version: versionStr[idx+1:], + } +} diff --git a/vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go b/vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go new file mode 100644 index 000000000..2c3ebe165 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go @@ -0,0 +1,27 @@ +package challenge + +import ( + "net/url" + "strings" +) + +// FROM: https://golang.org/src/net/http/http.go +// Given a string of the form "host", "host:port", or "[ipv6::address]:port", +// return true if the string includes a port. +func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } + +// FROM: http://golang.org/src/net/http/transport.go +var portMap = map[string]string{ + "http": "80", + "https": "443", +} + +// canonicalAddr returns url.Host but always with a ":port" suffix +// FROM: http://golang.org/src/net/http/transport.go +func canonicalAddr(url *url.URL) string { + addr := url.Host + if !hasPort(addr) { + return addr + ":" + portMap[url.Scheme] + } + return addr +} diff --git a/vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go b/vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go new file mode 100644 index 000000000..fe238210c --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go @@ -0,0 +1,237 @@ +package challenge + +import ( + "fmt" + "net/http" + "net/url" + "strings" + "sync" +) + +// Challenge carries information from a WWW-Authenticate response header. +// See RFC 2617. +type Challenge struct { + // Scheme is the auth-scheme according to RFC 2617 + Scheme string + + // Parameters are the auth-params according to RFC 2617 + Parameters map[string]string +} + +// Manager manages the challenges for endpoints. +// The challenges are pulled out of HTTP responses. Only +// responses which expect challenges should be added to +// the manager, since a non-unauthorized request will be +// viewed as not requiring challenges. +type Manager interface { + // GetChallenges returns the challenges for the given + // endpoint URL. + GetChallenges(endpoint url.URL) ([]Challenge, error) + + // AddResponse adds the response to the challenge + // manager. The challenges will be parsed out of + // the WWW-Authenicate headers and added to the + // URL which was produced the response. If the + // response was authorized, any challenges for the + // endpoint will be cleared. + AddResponse(resp *http.Response) error +} + +// NewSimpleManager returns an instance of +// Manger which only maps endpoints to challenges +// based on the responses which have been added the +// manager. The simple manager will make no attempt to +// perform requests on the endpoints or cache the responses +// to a backend. +func NewSimpleManager() Manager { + return &simpleManager{ + Challenges: make(map[string][]Challenge), + } +} + +type simpleManager struct { + sync.RWMutex + Challenges map[string][]Challenge +} + +func normalizeURL(endpoint *url.URL) { + endpoint.Host = strings.ToLower(endpoint.Host) + endpoint.Host = canonicalAddr(endpoint) +} + +func (m *simpleManager) GetChallenges(endpoint url.URL) ([]Challenge, error) { + normalizeURL(&endpoint) + + m.RLock() + defer m.RUnlock() + challenges := m.Challenges[endpoint.String()] + return challenges, nil +} + +func (m *simpleManager) AddResponse(resp *http.Response) error { + challenges := ResponseChallenges(resp) + if resp.Request == nil { + return fmt.Errorf("missing request reference") + } + urlCopy := url.URL{ + Path: resp.Request.URL.Path, + Host: resp.Request.URL.Host, + Scheme: resp.Request.URL.Scheme, + } + normalizeURL(&urlCopy) + + m.Lock() + defer m.Unlock() + m.Challenges[urlCopy.String()] = challenges + return nil +} + +// Octet types from RFC 2616. +type octetType byte + +var octetTypes [256]octetType + +const ( + isToken octetType = 1 << iota + isSpace +) + +func init() { + // OCTET = + // CHAR = + // CTL = + // CR = + // LF = + // SP = + // HT = + // <"> = + // CRLF = CR LF + // LWS = [CRLF] 1*( SP | HT ) + // TEXT = + // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> + // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT + // token = 1* + // qdtext = > + + for c := 0; c < 256; c++ { + var t octetType + isCtl := c <= 31 || c == 127 + isChar := 0 <= c && c <= 127 + isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) + if strings.ContainsRune(" \t\r\n", rune(c)) { + t |= isSpace + } + if isChar && !isCtl && !isSeparator { + t |= isToken + } + octetTypes[c] = t + } +} + +// ResponseChallenges returns a list of authorization challenges +// for the given http Response. Challenges are only checked if +// the response status code was a 401. +func ResponseChallenges(resp *http.Response) []Challenge { + if resp.StatusCode == http.StatusUnauthorized { + // Parse the WWW-Authenticate Header and store the challenges + // on this endpoint object. + return parseAuthHeader(resp.Header) + } + + return nil +} + +func parseAuthHeader(header http.Header) []Challenge { + challenges := []Challenge{} + for _, h := range header[http.CanonicalHeaderKey("WWW-Authenticate")] { + v, p := parseValueAndParams(h) + if v != "" { + challenges = append(challenges, Challenge{Scheme: v, Parameters: p}) + } + } + return challenges +} + +func parseValueAndParams(header string) (value string, params map[string]string) { + params = make(map[string]string) + value, s := expectToken(header) + if value == "" { + return + } + value = strings.ToLower(value) + s = "," + skipSpace(s) + for strings.HasPrefix(s, ",") { + var pkey string + pkey, s = expectToken(skipSpace(s[1:])) + if pkey == "" { + return + } + if !strings.HasPrefix(s, "=") { + return + } + var pvalue string + pvalue, s = expectTokenOrQuoted(s[1:]) + if pvalue == "" { + return + } + pkey = strings.ToLower(pkey) + params[pkey] = pvalue + s = skipSpace(s) + } + return +} + +func skipSpace(s string) (rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isSpace == 0 { + break + } + } + return s[i:] +} + +func expectToken(s string) (token, rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isToken == 0 { + break + } + } + return s[:i], s[i:] +} + +func expectTokenOrQuoted(s string) (value string, rest string) { + if !strings.HasPrefix(s, "\"") { + return expectToken(s) + } + s = s[1:] + for i := 0; i < len(s); i++ { + switch s[i] { + case '"': + return s[:i], s[i+1:] + case '\\': + p := make([]byte, len(s)-1) + j := copy(p, s[:i]) + escape := true + for i = i + 1; i < len(s); i++ { + b := s[i] + switch { + case escape: + escape = false + p[j] = b + j++ + case b == '\\': + escape = true + case b == '"': + return string(p[:j]), s[i+1:] + default: + p[j] = b + j++ + } + } + return "", "" + } + } + return "", "" +} diff --git a/vendor/github.com/docker/distribution/registry/client/auth/session.go b/vendor/github.com/docker/distribution/registry/client/auth/session.go new file mode 100644 index 000000000..aad8a0e6f --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/auth/session.go @@ -0,0 +1,530 @@ +package auth + +import ( + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "strings" + "sync" + "time" + + "github.com/docker/distribution/registry/client" + "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/docker/distribution/registry/client/transport" +) + +var ( + // ErrNoBasicAuthCredentials is returned if a request can't be authorized with + // basic auth due to lack of credentials. + ErrNoBasicAuthCredentials = errors.New("no basic auth credentials") + + // ErrNoToken is returned if a request is successful but the body does not + // contain an authorization token. + ErrNoToken = errors.New("authorization server did not include a token in the response") +) + +const defaultClientID = "registry-client" + +// AuthenticationHandler is an interface for authorizing a request from +// params from a "WWW-Authenicate" header for a single scheme. +type AuthenticationHandler interface { + // Scheme returns the scheme as expected from the "WWW-Authenicate" header. + Scheme() string + + // AuthorizeRequest adds the authorization header to a request (if needed) + // using the parameters from "WWW-Authenticate" method. The parameters + // values depend on the scheme. + AuthorizeRequest(req *http.Request, params map[string]string) error +} + +// CredentialStore is an interface for getting credentials for +// a given URL +type CredentialStore interface { + // Basic returns basic auth for the given URL + Basic(*url.URL) (string, string) + + // RefreshToken returns a refresh token for the + // given URL and service + RefreshToken(*url.URL, string) string + + // SetRefreshToken sets the refresh token if none + // is provided for the given url and service + SetRefreshToken(realm *url.URL, service, token string) +} + +// NewAuthorizer creates an authorizer which can handle multiple authentication +// schemes. The handlers are tried in order, the higher priority authentication +// methods should be first. The challengeMap holds a list of challenges for +// a given root API endpoint (for example "https://registry-1.docker.io/v2/"). +func NewAuthorizer(manager challenge.Manager, handlers ...AuthenticationHandler) transport.RequestModifier { + return &endpointAuthorizer{ + challenges: manager, + handlers: handlers, + } +} + +type endpointAuthorizer struct { + challenges challenge.Manager + handlers []AuthenticationHandler +} + +func (ea *endpointAuthorizer) ModifyRequest(req *http.Request) error { + pingPath := req.URL.Path + if v2Root := strings.Index(req.URL.Path, "/v2/"); v2Root != -1 { + pingPath = pingPath[:v2Root+4] + } else if v1Root := strings.Index(req.URL.Path, "/v1/"); v1Root != -1 { + pingPath = pingPath[:v1Root] + "/v2/" + } else { + return nil + } + + ping := url.URL{ + Host: req.URL.Host, + Scheme: req.URL.Scheme, + Path: pingPath, + } + + challenges, err := ea.challenges.GetChallenges(ping) + if err != nil { + return err + } + + if len(challenges) > 0 { + for _, handler := range ea.handlers { + for _, c := range challenges { + if c.Scheme != handler.Scheme() { + continue + } + if err := handler.AuthorizeRequest(req, c.Parameters); err != nil { + return err + } + } + } + } + + return nil +} + +// This is the minimum duration a token can last (in seconds). +// A token must not live less than 60 seconds because older versions +// of the Docker client didn't read their expiration from the token +// response and assumed 60 seconds. So to remain compatible with +// those implementations, a token must live at least this long. +const minimumTokenLifetimeSeconds = 60 + +// Private interface for time used by this package to enable tests to provide their own implementation. +type clock interface { + Now() time.Time +} + +type tokenHandler struct { + creds CredentialStore + transport http.RoundTripper + clock clock + + offlineAccess bool + forceOAuth bool + clientID string + scopes []Scope + + tokenLock sync.Mutex + tokenCache string + tokenExpiration time.Time + + logger Logger +} + +// Scope is a type which is serializable to a string +// using the allow scope grammar. +type Scope interface { + String() string +} + +// RepositoryScope represents a token scope for access +// to a repository. +type RepositoryScope struct { + Repository string + Class string + Actions []string +} + +// String returns the string representation of the repository +// using the scope grammar +func (rs RepositoryScope) String() string { + repoType := "repository" + // Keep existing format for image class to maintain backwards compatibility + // with authorization servers which do not support the expanded grammar. + if rs.Class != "" && rs.Class != "image" { + repoType = fmt.Sprintf("%s(%s)", repoType, rs.Class) + } + return fmt.Sprintf("%s:%s:%s", repoType, rs.Repository, strings.Join(rs.Actions, ",")) +} + +// RegistryScope represents a token scope for access +// to resources in the registry. +type RegistryScope struct { + Name string + Actions []string +} + +// String returns the string representation of the user +// using the scope grammar +func (rs RegistryScope) String() string { + return fmt.Sprintf("registry:%s:%s", rs.Name, strings.Join(rs.Actions, ",")) +} + +// Logger defines the injectable logging interface, used on TokenHandlers. +type Logger interface { + Debugf(format string, args ...interface{}) +} + +func logDebugf(logger Logger, format string, args ...interface{}) { + if logger == nil { + return + } + logger.Debugf(format, args...) +} + +// TokenHandlerOptions is used to configure a new token handler +type TokenHandlerOptions struct { + Transport http.RoundTripper + Credentials CredentialStore + + OfflineAccess bool + ForceOAuth bool + ClientID string + Scopes []Scope + Logger Logger +} + +// An implementation of clock for providing real time data. +type realClock struct{} + +// Now implements clock +func (realClock) Now() time.Time { return time.Now() } + +// NewTokenHandler creates a new AuthenicationHandler which supports +// fetching tokens from a remote token server. +func NewTokenHandler(transport http.RoundTripper, creds CredentialStore, scope string, actions ...string) AuthenticationHandler { + // Create options... + return NewTokenHandlerWithOptions(TokenHandlerOptions{ + Transport: transport, + Credentials: creds, + Scopes: []Scope{ + RepositoryScope{ + Repository: scope, + Actions: actions, + }, + }, + }) +} + +// NewTokenHandlerWithOptions creates a new token handler using the provided +// options structure. +func NewTokenHandlerWithOptions(options TokenHandlerOptions) AuthenticationHandler { + handler := &tokenHandler{ + transport: options.Transport, + creds: options.Credentials, + offlineAccess: options.OfflineAccess, + forceOAuth: options.ForceOAuth, + clientID: options.ClientID, + scopes: options.Scopes, + clock: realClock{}, + logger: options.Logger, + } + + return handler +} + +func (th *tokenHandler) client() *http.Client { + return &http.Client{ + Transport: th.transport, + Timeout: 15 * time.Second, + } +} + +func (th *tokenHandler) Scheme() string { + return "bearer" +} + +func (th *tokenHandler) AuthorizeRequest(req *http.Request, params map[string]string) error { + var additionalScopes []string + if fromParam := req.URL.Query().Get("from"); fromParam != "" { + additionalScopes = append(additionalScopes, RepositoryScope{ + Repository: fromParam, + Actions: []string{"pull"}, + }.String()) + } + + token, err := th.getToken(params, additionalScopes...) + if err != nil { + return err + } + + req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token)) + + return nil +} + +func (th *tokenHandler) getToken(params map[string]string, additionalScopes ...string) (string, error) { + th.tokenLock.Lock() + defer th.tokenLock.Unlock() + scopes := make([]string, 0, len(th.scopes)+len(additionalScopes)) + for _, scope := range th.scopes { + scopes = append(scopes, scope.String()) + } + var addedScopes bool + for _, scope := range additionalScopes { + if hasScope(scopes, scope) { + continue + } + scopes = append(scopes, scope) + addedScopes = true + } + + now := th.clock.Now() + if now.After(th.tokenExpiration) || addedScopes { + token, expiration, err := th.fetchToken(params, scopes) + if err != nil { + return "", err + } + + // do not update cache for added scope tokens + if !addedScopes { + th.tokenCache = token + th.tokenExpiration = expiration + } + + return token, nil + } + + return th.tokenCache, nil +} + +func hasScope(scopes []string, scope string) bool { + for _, s := range scopes { + if s == scope { + return true + } + } + return false +} + +type postTokenResponse struct { + AccessToken string `json:"access_token"` + RefreshToken string `json:"refresh_token"` + ExpiresIn int `json:"expires_in"` + IssuedAt time.Time `json:"issued_at"` + Scope string `json:"scope"` +} + +func (th *tokenHandler) fetchTokenWithOAuth(realm *url.URL, refreshToken, service string, scopes []string) (token string, expiration time.Time, err error) { + form := url.Values{} + form.Set("scope", strings.Join(scopes, " ")) + form.Set("service", service) + + clientID := th.clientID + if clientID == "" { + // Use default client, this is a required field + clientID = defaultClientID + } + form.Set("client_id", clientID) + + if refreshToken != "" { + form.Set("grant_type", "refresh_token") + form.Set("refresh_token", refreshToken) + } else if th.creds != nil { + form.Set("grant_type", "password") + username, password := th.creds.Basic(realm) + form.Set("username", username) + form.Set("password", password) + + // attempt to get a refresh token + form.Set("access_type", "offline") + } else { + // refuse to do oauth without a grant type + return "", time.Time{}, fmt.Errorf("no supported grant type") + } + + resp, err := th.client().PostForm(realm.String(), form) + if err != nil { + return "", time.Time{}, err + } + defer resp.Body.Close() + + if !client.SuccessStatus(resp.StatusCode) { + err := client.HandleErrorResponse(resp) + return "", time.Time{}, err + } + + decoder := json.NewDecoder(resp.Body) + + var tr postTokenResponse + if err = decoder.Decode(&tr); err != nil { + return "", time.Time{}, fmt.Errorf("unable to decode token response: %s", err) + } + + if tr.RefreshToken != "" && tr.RefreshToken != refreshToken { + th.creds.SetRefreshToken(realm, service, tr.RefreshToken) + } + + if tr.ExpiresIn < minimumTokenLifetimeSeconds { + // The default/minimum lifetime. + tr.ExpiresIn = minimumTokenLifetimeSeconds + logDebugf(th.logger, "Increasing token expiration to: %d seconds", tr.ExpiresIn) + } + + if tr.IssuedAt.IsZero() { + // issued_at is optional in the token response. + tr.IssuedAt = th.clock.Now().UTC() + } + + return tr.AccessToken, tr.IssuedAt.Add(time.Duration(tr.ExpiresIn) * time.Second), nil +} + +type getTokenResponse struct { + Token string `json:"token"` + AccessToken string `json:"access_token"` + ExpiresIn int `json:"expires_in"` + IssuedAt time.Time `json:"issued_at"` + RefreshToken string `json:"refresh_token"` +} + +func (th *tokenHandler) fetchTokenWithBasicAuth(realm *url.URL, service string, scopes []string) (token string, expiration time.Time, err error) { + + req, err := http.NewRequest("GET", realm.String(), nil) + if err != nil { + return "", time.Time{}, err + } + + reqParams := req.URL.Query() + + if service != "" { + reqParams.Add("service", service) + } + + for _, scope := range scopes { + reqParams.Add("scope", scope) + } + + if th.offlineAccess { + reqParams.Add("offline_token", "true") + clientID := th.clientID + if clientID == "" { + clientID = defaultClientID + } + reqParams.Add("client_id", clientID) + } + + if th.creds != nil { + username, password := th.creds.Basic(realm) + if username != "" && password != "" { + reqParams.Add("account", username) + req.SetBasicAuth(username, password) + } + } + + req.URL.RawQuery = reqParams.Encode() + + resp, err := th.client().Do(req) + if err != nil { + return "", time.Time{}, err + } + defer resp.Body.Close() + + if !client.SuccessStatus(resp.StatusCode) { + err := client.HandleErrorResponse(resp) + return "", time.Time{}, err + } + + decoder := json.NewDecoder(resp.Body) + + var tr getTokenResponse + if err = decoder.Decode(&tr); err != nil { + return "", time.Time{}, fmt.Errorf("unable to decode token response: %s", err) + } + + if tr.RefreshToken != "" && th.creds != nil { + th.creds.SetRefreshToken(realm, service, tr.RefreshToken) + } + + // `access_token` is equivalent to `token` and if both are specified + // the choice is undefined. Canonicalize `access_token` by sticking + // things in `token`. + if tr.AccessToken != "" { + tr.Token = tr.AccessToken + } + + if tr.Token == "" { + return "", time.Time{}, ErrNoToken + } + + if tr.ExpiresIn < minimumTokenLifetimeSeconds { + // The default/minimum lifetime. + tr.ExpiresIn = minimumTokenLifetimeSeconds + logDebugf(th.logger, "Increasing token expiration to: %d seconds", tr.ExpiresIn) + } + + if tr.IssuedAt.IsZero() { + // issued_at is optional in the token response. + tr.IssuedAt = th.clock.Now().UTC() + } + + return tr.Token, tr.IssuedAt.Add(time.Duration(tr.ExpiresIn) * time.Second), nil +} + +func (th *tokenHandler) fetchToken(params map[string]string, scopes []string) (token string, expiration time.Time, err error) { + realm, ok := params["realm"] + if !ok { + return "", time.Time{}, errors.New("no realm specified for token auth challenge") + } + + // TODO(dmcgowan): Handle empty scheme and relative realm + realmURL, err := url.Parse(realm) + if err != nil { + return "", time.Time{}, fmt.Errorf("invalid token auth challenge realm: %s", err) + } + + service := params["service"] + + var refreshToken string + + if th.creds != nil { + refreshToken = th.creds.RefreshToken(realmURL, service) + } + + if refreshToken != "" || th.forceOAuth { + return th.fetchTokenWithOAuth(realmURL, refreshToken, service, scopes) + } + + return th.fetchTokenWithBasicAuth(realmURL, service, scopes) +} + +type basicHandler struct { + creds CredentialStore +} + +// NewBasicHandler creaters a new authentiation handler which adds +// basic authentication credentials to a request. +func NewBasicHandler(creds CredentialStore) AuthenticationHandler { + return &basicHandler{ + creds: creds, + } +} + +func (*basicHandler) Scheme() string { + return "basic" +} + +func (bh *basicHandler) AuthorizeRequest(req *http.Request, params map[string]string) error { + if bh.creds != nil { + username, password := bh.creds.Basic(req.URL) + if username != "" && password != "" { + req.SetBasicAuth(username, password) + return nil + } + } + return ErrNoBasicAuthCredentials +} diff --git a/vendor/github.com/docker/distribution/registry/client/blob_writer.go b/vendor/github.com/docker/distribution/registry/client/blob_writer.go new file mode 100644 index 000000000..dac030c73 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/blob_writer.go @@ -0,0 +1,164 @@ +package client + +import ( + "bytes" + "context" + "fmt" + "io" + "io/ioutil" + "net/http" + "time" + + "github.com/docker/distribution" +) + +type httpBlobUpload struct { + statter distribution.BlobStatter + client *http.Client + + uuid string + startedAt time.Time + + location string // always the last value of the location header. + offset int64 + closed bool +} + +func (hbu *httpBlobUpload) Reader() (io.ReadCloser, error) { + panic("Not implemented") +} + +func (hbu *httpBlobUpload) handleErrorResponse(resp *http.Response) error { + if resp.StatusCode == http.StatusNotFound { + return distribution.ErrBlobUploadUnknown + } + return HandleErrorResponse(resp) +} + +func (hbu *httpBlobUpload) ReadFrom(r io.Reader) (n int64, err error) { + req, err := http.NewRequest("PATCH", hbu.location, ioutil.NopCloser(r)) + if err != nil { + return 0, err + } + defer req.Body.Close() + + req.Header.Set("Content-Type", "application/octet-stream") + + resp, err := hbu.client.Do(req) + if err != nil { + return 0, err + } + + if !SuccessStatus(resp.StatusCode) { + return 0, hbu.handleErrorResponse(resp) + } + + hbu.uuid = resp.Header.Get("Docker-Upload-UUID") + hbu.location, err = sanitizeLocation(resp.Header.Get("Location"), hbu.location) + if err != nil { + return 0, err + } + rng := resp.Header.Get("Range") + var start, end int64 + if n, err := fmt.Sscanf(rng, "%d-%d", &start, &end); err != nil { + return 0, err + } else if n != 2 || end < start { + return 0, fmt.Errorf("bad range format: %s", rng) + } + + return (end - start + 1), nil + +} + +func (hbu *httpBlobUpload) Write(p []byte) (n int, err error) { + req, err := http.NewRequest("PATCH", hbu.location, bytes.NewReader(p)) + if err != nil { + return 0, err + } + req.Header.Set("Content-Range", fmt.Sprintf("%d-%d", hbu.offset, hbu.offset+int64(len(p)-1))) + req.Header.Set("Content-Length", fmt.Sprintf("%d", len(p))) + req.Header.Set("Content-Type", "application/octet-stream") + + resp, err := hbu.client.Do(req) + if err != nil { + return 0, err + } + + if !SuccessStatus(resp.StatusCode) { + return 0, hbu.handleErrorResponse(resp) + } + + hbu.uuid = resp.Header.Get("Docker-Upload-UUID") + hbu.location, err = sanitizeLocation(resp.Header.Get("Location"), hbu.location) + if err != nil { + return 0, err + } + rng := resp.Header.Get("Range") + var start, end int + if n, err := fmt.Sscanf(rng, "%d-%d", &start, &end); err != nil { + return 0, err + } else if n != 2 || end < start { + return 0, fmt.Errorf("bad range format: %s", rng) + } + + return (end - start + 1), nil + +} + +func (hbu *httpBlobUpload) Size() int64 { + return hbu.offset +} + +func (hbu *httpBlobUpload) ID() string { + return hbu.uuid +} + +func (hbu *httpBlobUpload) StartedAt() time.Time { + return hbu.startedAt +} + +func (hbu *httpBlobUpload) Commit(ctx context.Context, desc distribution.Descriptor) (distribution.Descriptor, error) { + // TODO(dmcgowan): Check if already finished, if so just fetch + req, err := http.NewRequest("PUT", hbu.location, nil) + if err != nil { + return distribution.Descriptor{}, err + } + + values := req.URL.Query() + values.Set("digest", desc.Digest.String()) + req.URL.RawQuery = values.Encode() + + resp, err := hbu.client.Do(req) + if err != nil { + return distribution.Descriptor{}, err + } + defer resp.Body.Close() + + if !SuccessStatus(resp.StatusCode) { + return distribution.Descriptor{}, hbu.handleErrorResponse(resp) + } + + return hbu.statter.Stat(ctx, desc.Digest) +} + +func (hbu *httpBlobUpload) Cancel(ctx context.Context) error { + req, err := http.NewRequest("DELETE", hbu.location, nil) + if err != nil { + return err + } + resp, err := hbu.client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusNotFound || SuccessStatus(resp.StatusCode) { + return nil + } + return hbu.handleErrorResponse(resp) +} + +func (hbu *httpBlobUpload) Close() error { + hbu.closed = true + return nil +} diff --git a/vendor/github.com/docker/distribution/registry/client/errors.go b/vendor/github.com/docker/distribution/registry/client/errors.go new file mode 100644 index 000000000..ce9902034 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/errors.go @@ -0,0 +1,160 @@ +package client + +import ( + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "mime" + "net/http" + + "github.com/docker/distribution/registry/api/errcode" + "github.com/docker/distribution/registry/client/auth/challenge" +) + +// ErrNoErrorsInBody is returned when an HTTP response body parses to an empty +// errcode.Errors slice. +var ErrNoErrorsInBody = errors.New("no error details found in HTTP response body") + +// UnexpectedHTTPStatusError is returned when an unexpected HTTP status is +// returned when making a registry api call. +type UnexpectedHTTPStatusError struct { + Status string +} + +func (e *UnexpectedHTTPStatusError) Error() string { + return fmt.Sprintf("received unexpected HTTP status: %s", e.Status) +} + +// UnexpectedHTTPResponseError is returned when an expected HTTP status code +// is returned, but the content was unexpected and failed to be parsed. +type UnexpectedHTTPResponseError struct { + ParseErr error + StatusCode int + Response []byte +} + +func (e *UnexpectedHTTPResponseError) Error() string { + return fmt.Sprintf("error parsing HTTP %d response body: %s: %q", e.StatusCode, e.ParseErr.Error(), string(e.Response)) +} + +func parseHTTPErrorResponse(resp *http.Response) error { + var errors errcode.Errors + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + statusCode := resp.StatusCode + ctHeader := resp.Header.Get("Content-Type") + + if ctHeader == "" { + return makeError(statusCode, string(body)) + } + + contentType, _, err := mime.ParseMediaType(ctHeader) + if err != nil { + return fmt.Errorf("failed parsing content-type: %w", err) + } + + if contentType != "application/json" && contentType != "application/vnd.api+json" { + return makeError(statusCode, string(body)) + } + + // For backward compatibility, handle irregularly formatted + // messages that contain a "details" field. + var detailsErr struct { + Details string `json:"details"` + } + err = json.Unmarshal(body, &detailsErr) + if err == nil && detailsErr.Details != "" { + return makeError(statusCode, detailsErr.Details) + } + + if err := json.Unmarshal(body, &errors); err != nil { + return &UnexpectedHTTPResponseError{ + ParseErr: err, + StatusCode: statusCode, + Response: body, + } + } + + if len(errors) == 0 { + // If there was no error specified in the body, return + // UnexpectedHTTPResponseError. + return &UnexpectedHTTPResponseError{ + ParseErr: ErrNoErrorsInBody, + StatusCode: statusCode, + Response: body, + } + } + + return errors +} + +func makeError(statusCode int, details string) error { + switch statusCode { + case http.StatusUnauthorized: + return errcode.ErrorCodeUnauthorized.WithMessage(details) + case http.StatusForbidden: + return errcode.ErrorCodeDenied.WithMessage(details) + case http.StatusTooManyRequests: + return errcode.ErrorCodeTooManyRequests.WithMessage(details) + default: + return errcode.ErrorCodeUnknown.WithMessage(details) + } +} + +func makeErrorList(err error) []error { + if errL, ok := err.(errcode.Errors); ok { + return []error(errL) + } + return []error{err} +} + +func mergeErrors(err1, err2 error) error { + return errcode.Errors(append(makeErrorList(err1), makeErrorList(err2)...)) +} + +// HandleErrorResponse returns error parsed from HTTP response for an +// unsuccessful HTTP response code (in the range 400 - 499 inclusive). An +// UnexpectedHTTPStatusError returned for response code outside of expected +// range. +func HandleErrorResponse(resp *http.Response) error { + if resp.StatusCode >= 400 && resp.StatusCode < 500 { + // Check for OAuth errors within the `WWW-Authenticate` header first + // See https://tools.ietf.org/html/rfc6750#section-3 + for _, c := range challenge.ResponseChallenges(resp) { + if c.Scheme == "bearer" { + var err errcode.Error + // codes defined at https://tools.ietf.org/html/rfc6750#section-3.1 + switch c.Parameters["error"] { + case "invalid_token": + err.Code = errcode.ErrorCodeUnauthorized + case "insufficient_scope": + err.Code = errcode.ErrorCodeDenied + default: + continue + } + if description := c.Parameters["error_description"]; description != "" { + err.Message = description + } else { + err.Message = err.Code.Message() + } + return mergeErrors(err, parseHTTPErrorResponse(resp)) + } + } + err := parseHTTPErrorResponse(resp) + if uErr, ok := err.(*UnexpectedHTTPResponseError); ok && resp.StatusCode == 401 { + return errcode.ErrorCodeUnauthorized.WithDetail(uErr.Response) + } + return err + } + return &UnexpectedHTTPStatusError{Status: resp.Status} +} + +// SuccessStatus returns true if the argument is a successful HTTP response +// code (in the range 200 - 399 inclusive). +func SuccessStatus(status int) bool { + return status >= 200 && status <= 399 +} diff --git a/vendor/github.com/docker/distribution/registry/client/repository.go b/vendor/github.com/docker/distribution/registry/client/repository.go new file mode 100644 index 000000000..fd42a1e66 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/repository.go @@ -0,0 +1,870 @@ +package client + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "strconv" + "strings" + "time" + + "github.com/distribution/reference" + "github.com/docker/distribution" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/distribution/registry/storage/cache" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/opencontainers/go-digest" +) + +// Registry provides an interface for calling Repositories, which returns a catalog of repositories. +type Registry interface { + Repositories(ctx context.Context, repos []string, last string) (n int, err error) +} + +// checkHTTPRedirect is a callback that can manipulate redirected HTTP +// requests. It is used to preserve Accept and Range headers. +func checkHTTPRedirect(req *http.Request, via []*http.Request) error { + if len(via) >= 10 { + return errors.New("stopped after 10 redirects") + } + + if len(via) > 0 { + for headerName, headerVals := range via[0].Header { + if headerName != "Accept" && headerName != "Range" { + continue + } + for _, val := range headerVals { + // Don't add to redirected request if redirected + // request already has a header with the same + // name and value. + hasValue := false + for _, existingVal := range req.Header[headerName] { + if existingVal == val { + hasValue = true + break + } + } + if !hasValue { + req.Header.Add(headerName, val) + } + } + } + } + + return nil +} + +// NewRegistry creates a registry namespace which can be used to get a listing of repositories +func NewRegistry(baseURL string, transport http.RoundTripper) (Registry, error) { + ub, err := v2.NewURLBuilderFromString(baseURL, false) + if err != nil { + return nil, err + } + + client := &http.Client{ + Transport: transport, + Timeout: 1 * time.Minute, + CheckRedirect: checkHTTPRedirect, + } + + return ®istry{ + client: client, + ub: ub, + }, nil +} + +type registry struct { + client *http.Client + ub *v2.URLBuilder +} + +// Repositories returns a lexigraphically sorted catalog given a base URL. The 'entries' slice will be filled up to the size +// of the slice, starting at the value provided in 'last'. The number of entries will be returned along with io.EOF if there +// are no more entries +func (r *registry) Repositories(ctx context.Context, entries []string, last string) (int, error) { + var numFilled int + var returnErr error + + values := buildCatalogValues(len(entries), last) + u, err := r.ub.BuildCatalogURL(values) + if err != nil { + return 0, err + } + + resp, err := r.client.Get(u) + if err != nil { + return 0, err + } + defer resp.Body.Close() + + if SuccessStatus(resp.StatusCode) { + var ctlg struct { + Repositories []string `json:"repositories"` + } + decoder := json.NewDecoder(resp.Body) + + if err := decoder.Decode(&ctlg); err != nil { + return 0, err + } + + copy(entries, ctlg.Repositories) + numFilled = len(ctlg.Repositories) + + link := resp.Header.Get("Link") + if link == "" { + returnErr = io.EOF + } + } else { + return 0, HandleErrorResponse(resp) + } + + return numFilled, returnErr +} + +// NewRepository creates a new Repository for the given repository name and base URL. +func NewRepository(name reference.Named, baseURL string, transport http.RoundTripper) (distribution.Repository, error) { + ub, err := v2.NewURLBuilderFromString(baseURL, false) + if err != nil { + return nil, err + } + + client := &http.Client{ + Transport: transport, + CheckRedirect: checkHTTPRedirect, + // TODO(dmcgowan): create cookie jar + } + + return &repository{ + client: client, + ub: ub, + name: name, + }, nil +} + +type repository struct { + client *http.Client + ub *v2.URLBuilder + name reference.Named +} + +func (r *repository) Named() reference.Named { + return r.name +} + +func (r *repository) Blobs(ctx context.Context) distribution.BlobStore { + statter := &blobStatter{ + name: r.name, + ub: r.ub, + client: r.client, + } + return &blobs{ + name: r.name, + ub: r.ub, + client: r.client, + statter: cache.NewCachedBlobStatter(memory.NewInMemoryBlobDescriptorCacheProvider(), statter), + } +} + +func (r *repository) Manifests(ctx context.Context, options ...distribution.ManifestServiceOption) (distribution.ManifestService, error) { + // todo(richardscothern): options should be sent over the wire + return &manifests{ + name: r.name, + ub: r.ub, + client: r.client, + etags: make(map[string]string), + }, nil +} + +func (r *repository) Tags(ctx context.Context) distribution.TagService { + return &tags{ + client: r.client, + ub: r.ub, + name: r.Named(), + } +} + +// tags implements remote tagging operations. +type tags struct { + client *http.Client + ub *v2.URLBuilder + name reference.Named +} + +// All returns all tags +func (t *tags) All(ctx context.Context) ([]string, error) { + var tags []string + + listURLStr, err := t.ub.BuildTagsURL(t.name) + if err != nil { + return tags, err + } + + listURL, err := url.Parse(listURLStr) + if err != nil { + return tags, err + } + + for { + resp, err := t.client.Get(listURL.String()) + if err != nil { + return tags, err + } + defer resp.Body.Close() + + if SuccessStatus(resp.StatusCode) { + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return tags, err + } + + tagsResponse := struct { + Tags []string `json:"tags"` + }{} + if err := json.Unmarshal(b, &tagsResponse); err != nil { + return tags, err + } + tags = append(tags, tagsResponse.Tags...) + if link := resp.Header.Get("Link"); link != "" { + linkURLStr := strings.Trim(strings.Split(link, ";")[0], "<>") + linkURL, err := url.Parse(linkURLStr) + if err != nil { + return tags, err + } + + listURL = listURL.ResolveReference(linkURL) + } else { + return tags, nil + } + } else { + return tags, HandleErrorResponse(resp) + } + } +} + +func descriptorFromResponse(response *http.Response) (distribution.Descriptor, error) { + desc := distribution.Descriptor{} + headers := response.Header + + ctHeader := headers.Get("Content-Type") + if ctHeader == "" { + return distribution.Descriptor{}, errors.New("missing or empty Content-Type header") + } + desc.MediaType = ctHeader + + digestHeader := headers.Get("Docker-Content-Digest") + if digestHeader == "" { + bytes, err := ioutil.ReadAll(response.Body) + if err != nil { + return distribution.Descriptor{}, err + } + _, desc, err := distribution.UnmarshalManifest(ctHeader, bytes) + if err != nil { + return distribution.Descriptor{}, err + } + return desc, nil + } + + dgst, err := digest.Parse(digestHeader) + if err != nil { + return distribution.Descriptor{}, err + } + desc.Digest = dgst + + lengthHeader := headers.Get("Content-Length") + if lengthHeader == "" { + return distribution.Descriptor{}, errors.New("missing or empty Content-Length header") + } + length, err := strconv.ParseInt(lengthHeader, 10, 64) + if err != nil { + return distribution.Descriptor{}, err + } + desc.Size = length + + return desc, nil + +} + +// Get issues a HEAD request for a Manifest against its named endpoint in order +// to construct a descriptor for the tag. If the registry doesn't support HEADing +// a manifest, fallback to GET. +func (t *tags) Get(ctx context.Context, tag string) (distribution.Descriptor, error) { + ref, err := reference.WithTag(t.name, tag) + if err != nil { + return distribution.Descriptor{}, err + } + u, err := t.ub.BuildManifestURL(ref) + if err != nil { + return distribution.Descriptor{}, err + } + + newRequest := func(method string) (*http.Response, error) { + req, err := http.NewRequest(method, u, nil) + if err != nil { + return nil, err + } + + for _, t := range distribution.ManifestMediaTypes() { + req.Header.Add("Accept", t) + } + resp, err := t.client.Do(req) + return resp, err + } + + resp, err := newRequest("HEAD") + if err != nil { + return distribution.Descriptor{}, err + } + defer resp.Body.Close() + + switch { + case resp.StatusCode >= 200 && resp.StatusCode < 400 && len(resp.Header.Get("Docker-Content-Digest")) > 0: + // if the response is a success AND a Docker-Content-Digest can be retrieved from the headers + return descriptorFromResponse(resp) + default: + // if the response is an error - there will be no body to decode. + // Issue a GET request: + // - for data from a server that does not handle HEAD + // - to get error details in case of a failure + resp, err = newRequest("GET") + if err != nil { + return distribution.Descriptor{}, err + } + defer resp.Body.Close() + + if resp.StatusCode >= 200 && resp.StatusCode < 400 { + return descriptorFromResponse(resp) + } + return distribution.Descriptor{}, HandleErrorResponse(resp) + } +} + +func (t *tags) Lookup(ctx context.Context, digest distribution.Descriptor) ([]string, error) { + panic("not implemented") +} + +func (t *tags) Tag(ctx context.Context, tag string, desc distribution.Descriptor) error { + panic("not implemented") +} + +func (t *tags) Untag(ctx context.Context, tag string) error { + panic("not implemented") +} + +type manifests struct { + name reference.Named + ub *v2.URLBuilder + client *http.Client + etags map[string]string +} + +func (ms *manifests) Exists(ctx context.Context, dgst digest.Digest) (bool, error) { + ref, err := reference.WithDigest(ms.name, dgst) + if err != nil { + return false, err + } + u, err := ms.ub.BuildManifestURL(ref) + if err != nil { + return false, err + } + + resp, err := ms.client.Head(u) + if err != nil { + return false, err + } + + if SuccessStatus(resp.StatusCode) { + return true, nil + } else if resp.StatusCode == http.StatusNotFound { + return false, nil + } + return false, HandleErrorResponse(resp) +} + +// AddEtagToTag allows a client to supply an eTag to Get which will be +// used for a conditional HTTP request. If the eTag matches, a nil manifest +// and ErrManifestNotModified error will be returned. etag is automatically +// quoted when added to this map. +func AddEtagToTag(tag, etag string) distribution.ManifestServiceOption { + return etagOption{tag, etag} +} + +type etagOption struct{ tag, etag string } + +func (o etagOption) Apply(ms distribution.ManifestService) error { + if ms, ok := ms.(*manifests); ok { + ms.etags[o.tag] = fmt.Sprintf(`"%s"`, o.etag) + return nil + } + return fmt.Errorf("etag options is a client-only option") +} + +// ReturnContentDigest allows a client to set a the content digest on +// a successful request from the 'Docker-Content-Digest' header. This +// returned digest is represents the digest which the registry uses +// to refer to the content and can be used to delete the content. +func ReturnContentDigest(dgst *digest.Digest) distribution.ManifestServiceOption { + return contentDigestOption{dgst} +} + +type contentDigestOption struct{ digest *digest.Digest } + +func (o contentDigestOption) Apply(ms distribution.ManifestService) error { + return nil +} + +func (ms *manifests) Get(ctx context.Context, dgst digest.Digest, options ...distribution.ManifestServiceOption) (distribution.Manifest, error) { + var ( + digestOrTag string + ref reference.Named + err error + contentDgst *digest.Digest + mediaTypes []string + ) + + for _, option := range options { + switch opt := option.(type) { + case distribution.WithTagOption: + digestOrTag = opt.Tag + ref, err = reference.WithTag(ms.name, opt.Tag) + if err != nil { + return nil, err + } + case contentDigestOption: + contentDgst = opt.digest + case distribution.WithManifestMediaTypesOption: + mediaTypes = opt.MediaTypes + default: + err := option.Apply(ms) + if err != nil { + return nil, err + } + } + } + + if digestOrTag == "" { + digestOrTag = dgst.String() + ref, err = reference.WithDigest(ms.name, dgst) + if err != nil { + return nil, err + } + } + + if len(mediaTypes) == 0 { + mediaTypes = distribution.ManifestMediaTypes() + } + + u, err := ms.ub.BuildManifestURL(ref) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", u, nil) + if err != nil { + return nil, err + } + + for _, t := range mediaTypes { + req.Header.Add("Accept", t) + } + + if _, ok := ms.etags[digestOrTag]; ok { + req.Header.Set("If-None-Match", ms.etags[digestOrTag]) + } + + resp, err := ms.client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode == http.StatusNotModified { + return nil, distribution.ErrManifestNotModified + } else if SuccessStatus(resp.StatusCode) { + if contentDgst != nil { + dgst, err := digest.Parse(resp.Header.Get("Docker-Content-Digest")) + if err == nil { + *contentDgst = dgst + } + } + mt := resp.Header.Get("Content-Type") + body, err := ioutil.ReadAll(resp.Body) + + if err != nil { + return nil, err + } + m, _, err := distribution.UnmarshalManifest(mt, body) + if err != nil { + return nil, err + } + return m, nil + } + return nil, HandleErrorResponse(resp) +} + +// Put puts a manifest. A tag can be specified using an options parameter which uses some shared state to hold the +// tag name in order to build the correct upload URL. +func (ms *manifests) Put(ctx context.Context, m distribution.Manifest, options ...distribution.ManifestServiceOption) (digest.Digest, error) { + ref := ms.name + var tagged bool + + for _, option := range options { + if opt, ok := option.(distribution.WithTagOption); ok { + var err error + ref, err = reference.WithTag(ref, opt.Tag) + if err != nil { + return "", err + } + tagged = true + } else { + err := option.Apply(ms) + if err != nil { + return "", err + } + } + } + mediaType, p, err := m.Payload() + if err != nil { + return "", err + } + + if !tagged { + // generate a canonical digest and Put by digest + _, d, err := distribution.UnmarshalManifest(mediaType, p) + if err != nil { + return "", err + } + ref, err = reference.WithDigest(ref, d.Digest) + if err != nil { + return "", err + } + } + + manifestURL, err := ms.ub.BuildManifestURL(ref) + if err != nil { + return "", err + } + + putRequest, err := http.NewRequest("PUT", manifestURL, bytes.NewReader(p)) + if err != nil { + return "", err + } + + putRequest.Header.Set("Content-Type", mediaType) + + resp, err := ms.client.Do(putRequest) + if err != nil { + return "", err + } + defer resp.Body.Close() + + if SuccessStatus(resp.StatusCode) { + dgstHeader := resp.Header.Get("Docker-Content-Digest") + dgst, err := digest.Parse(dgstHeader) + if err != nil { + return "", err + } + + return dgst, nil + } + + return "", HandleErrorResponse(resp) +} + +func (ms *manifests) Delete(ctx context.Context, dgst digest.Digest) error { + ref, err := reference.WithDigest(ms.name, dgst) + if err != nil { + return err + } + u, err := ms.ub.BuildManifestURL(ref) + if err != nil { + return err + } + req, err := http.NewRequest("DELETE", u, nil) + if err != nil { + return err + } + + resp, err := ms.client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if SuccessStatus(resp.StatusCode) { + return nil + } + return HandleErrorResponse(resp) +} + +// todo(richardscothern): Restore interface and implementation with merge of #1050 +/*func (ms *manifests) Enumerate(ctx context.Context, manifests []distribution.Manifest, last distribution.Manifest) (n int, err error) { + panic("not supported") +}*/ + +type blobs struct { + name reference.Named + ub *v2.URLBuilder + client *http.Client + + statter distribution.BlobDescriptorService + distribution.BlobDeleter +} + +func sanitizeLocation(location, base string) (string, error) { + baseURL, err := url.Parse(base) + if err != nil { + return "", err + } + + locationURL, err := url.Parse(location) + if err != nil { + return "", err + } + + return baseURL.ResolveReference(locationURL).String(), nil +} + +func (bs *blobs) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { + return bs.statter.Stat(ctx, dgst) + +} + +func (bs *blobs) Get(ctx context.Context, dgst digest.Digest) ([]byte, error) { + reader, err := bs.Open(ctx, dgst) + if err != nil { + return nil, err + } + defer reader.Close() + + return ioutil.ReadAll(reader) +} + +func (bs *blobs) Open(ctx context.Context, dgst digest.Digest) (distribution.ReadSeekCloser, error) { + ref, err := reference.WithDigest(bs.name, dgst) + if err != nil { + return nil, err + } + blobURL, err := bs.ub.BuildBlobURL(ref) + if err != nil { + return nil, err + } + + return transport.NewHTTPReadSeeker(bs.client, blobURL, + func(resp *http.Response) error { + if resp.StatusCode == http.StatusNotFound { + return distribution.ErrBlobUnknown + } + return HandleErrorResponse(resp) + }), nil +} + +func (bs *blobs) ServeBlob(ctx context.Context, w http.ResponseWriter, r *http.Request, dgst digest.Digest) error { + panic("not implemented") +} + +func (bs *blobs) Put(ctx context.Context, mediaType string, p []byte) (distribution.Descriptor, error) { + writer, err := bs.Create(ctx) + if err != nil { + return distribution.Descriptor{}, err + } + dgstr := digest.Canonical.Digester() + n, err := io.Copy(writer, io.TeeReader(bytes.NewReader(p), dgstr.Hash())) + if err != nil { + return distribution.Descriptor{}, err + } + if n < int64(len(p)) { + return distribution.Descriptor{}, fmt.Errorf("short copy: wrote %d of %d", n, len(p)) + } + + desc := distribution.Descriptor{ + MediaType: mediaType, + Size: int64(len(p)), + Digest: dgstr.Digest(), + } + + return writer.Commit(ctx, desc) +} + +type optionFunc func(interface{}) error + +func (f optionFunc) Apply(v interface{}) error { + return f(v) +} + +// WithMountFrom returns a BlobCreateOption which designates that the blob should be +// mounted from the given canonical reference. +func WithMountFrom(ref reference.Canonical) distribution.BlobCreateOption { + return optionFunc(func(v interface{}) error { + opts, ok := v.(*distribution.CreateOptions) + if !ok { + return fmt.Errorf("unexpected options type: %T", v) + } + + opts.Mount.ShouldMount = true + opts.Mount.From = ref + + return nil + }) +} + +func (bs *blobs) Create(ctx context.Context, options ...distribution.BlobCreateOption) (distribution.BlobWriter, error) { + var opts distribution.CreateOptions + + for _, option := range options { + err := option.Apply(&opts) + if err != nil { + return nil, err + } + } + + var values []url.Values + + if opts.Mount.ShouldMount { + values = append(values, url.Values{"from": {opts.Mount.From.Name()}, "mount": {opts.Mount.From.Digest().String()}}) + } + + u, err := bs.ub.BuildBlobUploadURL(bs.name, values...) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", u, nil) + if err != nil { + return nil, err + } + + resp, err := bs.client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + switch resp.StatusCode { + case http.StatusCreated: + desc, err := bs.statter.Stat(ctx, opts.Mount.From.Digest()) + if err != nil { + return nil, err + } + return nil, distribution.ErrBlobMounted{From: opts.Mount.From, Descriptor: desc} + case http.StatusAccepted: + // TODO(dmcgowan): Check for invalid UUID + uuid := resp.Header.Get("Docker-Upload-UUID") + location, err := sanitizeLocation(resp.Header.Get("Location"), u) + if err != nil { + return nil, err + } + + return &httpBlobUpload{ + statter: bs.statter, + client: bs.client, + uuid: uuid, + startedAt: time.Now(), + location: location, + }, nil + default: + return nil, HandleErrorResponse(resp) + } +} + +func (bs *blobs) Resume(ctx context.Context, id string) (distribution.BlobWriter, error) { + panic("not implemented") +} + +func (bs *blobs) Delete(ctx context.Context, dgst digest.Digest) error { + return bs.statter.Clear(ctx, dgst) +} + +type blobStatter struct { + name reference.Named + ub *v2.URLBuilder + client *http.Client +} + +func (bs *blobStatter) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { + ref, err := reference.WithDigest(bs.name, dgst) + if err != nil { + return distribution.Descriptor{}, err + } + u, err := bs.ub.BuildBlobURL(ref) + if err != nil { + return distribution.Descriptor{}, err + } + + resp, err := bs.client.Head(u) + if err != nil { + return distribution.Descriptor{}, err + } + defer resp.Body.Close() + + if SuccessStatus(resp.StatusCode) { + lengthHeader := resp.Header.Get("Content-Length") + if lengthHeader == "" { + return distribution.Descriptor{}, fmt.Errorf("missing content-length header for request: %s", u) + } + + length, err := strconv.ParseInt(lengthHeader, 10, 64) + if err != nil { + return distribution.Descriptor{}, fmt.Errorf("error parsing content-length: %v", err) + } + + return distribution.Descriptor{ + MediaType: resp.Header.Get("Content-Type"), + Size: length, + Digest: dgst, + }, nil + } else if resp.StatusCode == http.StatusNotFound { + return distribution.Descriptor{}, distribution.ErrBlobUnknown + } + return distribution.Descriptor{}, HandleErrorResponse(resp) +} + +func buildCatalogValues(maxEntries int, last string) url.Values { + values := url.Values{} + + if maxEntries > 0 { + values.Add("n", strconv.Itoa(maxEntries)) + } + + if last != "" { + values.Add("last", last) + } + + return values +} + +func (bs *blobStatter) Clear(ctx context.Context, dgst digest.Digest) error { + ref, err := reference.WithDigest(bs.name, dgst) + if err != nil { + return err + } + blobURL, err := bs.ub.BuildBlobURL(ref) + if err != nil { + return err + } + + req, err := http.NewRequest("DELETE", blobURL, nil) + if err != nil { + return err + } + + resp, err := bs.client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if SuccessStatus(resp.StatusCode) { + return nil + } + return HandleErrorResponse(resp) +} + +func (bs *blobStatter) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error { + return nil +} diff --git a/vendor/github.com/docker/distribution/registry/client/transport/http_reader.go b/vendor/github.com/docker/distribution/registry/client/transport/http_reader.go new file mode 100644 index 000000000..9120dbed6 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/transport/http_reader.go @@ -0,0 +1,249 @@ +package transport + +import ( + "errors" + "fmt" + "io" + "net/http" + "regexp" + "strconv" +) + +var ( + contentRangeRegexp = regexp.MustCompile(`bytes ([0-9]+)-([0-9]+)/([0-9]+|\\*)`) + + // ErrWrongCodeForByteRange is returned if the client sends a request + // with a Range header but the server returns a 2xx or 3xx code other + // than 206 Partial Content. + ErrWrongCodeForByteRange = errors.New("expected HTTP 206 from byte range request") +) + +// ReadSeekCloser combines io.ReadSeeker with io.Closer. +type ReadSeekCloser interface { + io.ReadSeeker + io.Closer +} + +// NewHTTPReadSeeker handles reading from an HTTP endpoint using a GET +// request. When seeking and starting a read from a non-zero offset +// the a "Range" header will be added which sets the offset. +// TODO(dmcgowan): Move this into a separate utility package +func NewHTTPReadSeeker(client *http.Client, url string, errorHandler func(*http.Response) error) ReadSeekCloser { + return &httpReadSeeker{ + client: client, + url: url, + errorHandler: errorHandler, + } +} + +type httpReadSeeker struct { + client *http.Client + url string + + // errorHandler creates an error from an unsuccessful HTTP response. + // This allows the error to be created with the HTTP response body + // without leaking the body through a returned error. + errorHandler func(*http.Response) error + + size int64 + + // rc is the remote read closer. + rc io.ReadCloser + // readerOffset tracks the offset as of the last read. + readerOffset int64 + // seekOffset allows Seek to override the offset. Seek changes + // seekOffset instead of changing readOffset directly so that + // connection resets can be delayed and possibly avoided if the + // seek is undone (i.e. seeking to the end and then back to the + // beginning). + seekOffset int64 + err error +} + +func (hrs *httpReadSeeker) Read(p []byte) (n int, err error) { + if hrs.err != nil { + return 0, hrs.err + } + + // If we sought to a different position, we need to reset the + // connection. This logic is here instead of Seek so that if + // a seek is undone before the next read, the connection doesn't + // need to be closed and reopened. A common example of this is + // seeking to the end to determine the length, and then seeking + // back to the original position. + if hrs.readerOffset != hrs.seekOffset { + hrs.reset() + } + + hrs.readerOffset = hrs.seekOffset + + rd, err := hrs.reader() + if err != nil { + return 0, err + } + + n, err = rd.Read(p) + hrs.seekOffset += int64(n) + hrs.readerOffset += int64(n) + + return n, err +} + +func (hrs *httpReadSeeker) Seek(offset int64, whence int) (int64, error) { + if hrs.err != nil { + return 0, hrs.err + } + + lastReaderOffset := hrs.readerOffset + + if whence == io.SeekStart && hrs.rc == nil { + // If no request has been made yet, and we are seeking to an + // absolute position, set the read offset as well to avoid an + // unnecessary request. + hrs.readerOffset = offset + } + + _, err := hrs.reader() + if err != nil { + hrs.readerOffset = lastReaderOffset + return 0, err + } + + newOffset := hrs.seekOffset + + switch whence { + case io.SeekCurrent: + newOffset += offset + case io.SeekEnd: + if hrs.size < 0 { + return 0, errors.New("content length not known") + } + newOffset = hrs.size + offset + case io.SeekStart: + newOffset = offset + } + + if newOffset < 0 { + err = errors.New("cannot seek to negative position") + } else { + hrs.seekOffset = newOffset + } + + return hrs.seekOffset, err +} + +func (hrs *httpReadSeeker) Close() error { + if hrs.err != nil { + return hrs.err + } + + // close and release reader chain + if hrs.rc != nil { + hrs.rc.Close() + } + + hrs.rc = nil + + hrs.err = errors.New("httpLayer: closed") + + return nil +} + +func (hrs *httpReadSeeker) reset() { + if hrs.err != nil { + return + } + if hrs.rc != nil { + hrs.rc.Close() + hrs.rc = nil + } +} + +func (hrs *httpReadSeeker) reader() (io.Reader, error) { + if hrs.err != nil { + return nil, hrs.err + } + + if hrs.rc != nil { + return hrs.rc, nil + } + + req, err := http.NewRequest("GET", hrs.url, nil) + if err != nil { + return nil, err + } + + if hrs.readerOffset > 0 { + // If we are at different offset, issue a range request from there. + req.Header.Add("Range", fmt.Sprintf("bytes=%d-", hrs.readerOffset)) + // TODO: get context in here + // context.GetLogger(hrs.context).Infof("Range: %s", req.Header.Get("Range")) + } + + resp, err := hrs.client.Do(req) + if err != nil { + return nil, err + } + + // Normally would use client.SuccessStatus, but that would be a cyclic + // import + if resp.StatusCode >= 200 && resp.StatusCode <= 399 { + if hrs.readerOffset > 0 { + if resp.StatusCode != http.StatusPartialContent { + return nil, ErrWrongCodeForByteRange + } + + contentRange := resp.Header.Get("Content-Range") + if contentRange == "" { + return nil, errors.New("no Content-Range header found in HTTP 206 response") + } + + submatches := contentRangeRegexp.FindStringSubmatch(contentRange) + if len(submatches) < 4 { + return nil, fmt.Errorf("could not parse Content-Range header: %s", contentRange) + } + + startByte, err := strconv.ParseUint(submatches[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("could not parse start of range in Content-Range header: %s", contentRange) + } + + if startByte != uint64(hrs.readerOffset) { + return nil, fmt.Errorf("received Content-Range starting at offset %d instead of requested %d", startByte, hrs.readerOffset) + } + + endByte, err := strconv.ParseUint(submatches[2], 10, 64) + if err != nil { + return nil, fmt.Errorf("could not parse end of range in Content-Range header: %s", contentRange) + } + + if submatches[3] == "*" { + hrs.size = -1 + } else { + size, err := strconv.ParseUint(submatches[3], 10, 64) + if err != nil { + return nil, fmt.Errorf("could not parse total size in Content-Range header: %s", contentRange) + } + + if endByte+1 != size { + return nil, fmt.Errorf("range in Content-Range stops before the end of the content: %s", contentRange) + } + + hrs.size = int64(size) + } + } else if resp.StatusCode == http.StatusOK { + hrs.size = resp.ContentLength + } else { + hrs.size = -1 + } + hrs.rc = resp.Body + } else { + defer resp.Body.Close() + if hrs.errorHandler != nil { + return nil, hrs.errorHandler(resp) + } + return nil, fmt.Errorf("unexpected status resolving reader: %v", resp.Status) + } + + return hrs.rc, nil +} diff --git a/vendor/github.com/docker/distribution/registry/client/transport/transport.go b/vendor/github.com/docker/distribution/registry/client/transport/transport.go new file mode 100644 index 000000000..30e45fab0 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/client/transport/transport.go @@ -0,0 +1,147 @@ +package transport + +import ( + "io" + "net/http" + "sync" +) + +// RequestModifier represents an object which will do an inplace +// modification of an HTTP request. +type RequestModifier interface { + ModifyRequest(*http.Request) error +} + +type headerModifier http.Header + +// NewHeaderRequestModifier returns a new RequestModifier which will +// add the given headers to a request. +func NewHeaderRequestModifier(header http.Header) RequestModifier { + return headerModifier(header) +} + +func (h headerModifier) ModifyRequest(req *http.Request) error { + for k, s := range http.Header(h) { + req.Header[k] = append(req.Header[k], s...) + } + + return nil +} + +// NewTransport creates a new transport which will apply modifiers to +// the request on a RoundTrip call. +func NewTransport(base http.RoundTripper, modifiers ...RequestModifier) http.RoundTripper { + return &transport{ + Modifiers: modifiers, + Base: base, + } +} + +// transport is an http.RoundTripper that makes HTTP requests after +// copying and modifying the request +type transport struct { + Modifiers []RequestModifier + Base http.RoundTripper + + mu sync.Mutex // guards modReq + modReq map[*http.Request]*http.Request // original -> modified +} + +// RoundTrip authorizes and authenticates the request with an +// access token. If no token exists or token is expired, +// tries to refresh/fetch a new token. +func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) { + req2 := cloneRequest(req) + for _, modifier := range t.Modifiers { + if err := modifier.ModifyRequest(req2); err != nil { + return nil, err + } + } + + t.setModReq(req, req2) + res, err := t.base().RoundTrip(req2) + if err != nil { + t.setModReq(req, nil) + return nil, err + } + res.Body = &onEOFReader{ + rc: res.Body, + fn: func() { t.setModReq(req, nil) }, + } + return res, nil +} + +// CancelRequest cancels an in-flight request by closing its connection. +func (t *transport) CancelRequest(req *http.Request) { + type canceler interface { + CancelRequest(*http.Request) + } + if cr, ok := t.base().(canceler); ok { + t.mu.Lock() + modReq := t.modReq[req] + delete(t.modReq, req) + t.mu.Unlock() + cr.CancelRequest(modReq) + } +} + +func (t *transport) base() http.RoundTripper { + if t.Base != nil { + return t.Base + } + return http.DefaultTransport +} + +func (t *transport) setModReq(orig, mod *http.Request) { + t.mu.Lock() + defer t.mu.Unlock() + if t.modReq == nil { + t.modReq = make(map[*http.Request]*http.Request) + } + if mod == nil { + delete(t.modReq, orig) + } else { + t.modReq[orig] = mod + } +} + +// cloneRequest returns a clone of the provided *http.Request. +// The clone is a shallow copy of the struct and its Header map. +func cloneRequest(r *http.Request) *http.Request { + // shallow copy of the struct + r2 := new(http.Request) + *r2 = *r + // deep copy of the Header + r2.Header = make(http.Header, len(r.Header)) + for k, s := range r.Header { + r2.Header[k] = append([]string(nil), s...) + } + + return r2 +} + +type onEOFReader struct { + rc io.ReadCloser + fn func() +} + +func (r *onEOFReader) Read(p []byte) (n int, err error) { + n, err = r.rc.Read(p) + if err == io.EOF { + r.runFunc() + } + return +} + +func (r *onEOFReader) Close() error { + err := r.rc.Close() + r.runFunc() + return err +} + +func (r *onEOFReader) runFunc() { + if fn := r.fn; fn != nil { + fn() + r.fn = nil + } +} diff --git a/vendor/github.com/docker/distribution/registry/storage/cache/cache.go b/vendor/github.com/docker/distribution/registry/storage/cache/cache.go new file mode 100644 index 000000000..10a390919 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/storage/cache/cache.go @@ -0,0 +1,35 @@ +// Package cache provides facilities to speed up access to the storage +// backend. +package cache + +import ( + "fmt" + + "github.com/docker/distribution" +) + +// BlobDescriptorCacheProvider provides repository scoped +// BlobDescriptorService cache instances and a global descriptor cache. +type BlobDescriptorCacheProvider interface { + distribution.BlobDescriptorService + + RepositoryScoped(repo string) (distribution.BlobDescriptorService, error) +} + +// ValidateDescriptor provides a helper function to ensure that caches have +// common criteria for admitting descriptors. +func ValidateDescriptor(desc distribution.Descriptor) error { + if err := desc.Digest.Validate(); err != nil { + return err + } + + if desc.Size < 0 { + return fmt.Errorf("cache: invalid length in descriptor: %v < 0", desc.Size) + } + + if desc.MediaType == "" { + return fmt.Errorf("cache: empty mediatype on descriptor: %v", desc) + } + + return nil +} diff --git a/vendor/github.com/docker/distribution/registry/storage/cache/cachedblobdescriptorstore.go b/vendor/github.com/docker/distribution/registry/storage/cache/cachedblobdescriptorstore.go new file mode 100644 index 000000000..ac4c45211 --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/storage/cache/cachedblobdescriptorstore.go @@ -0,0 +1,129 @@ +package cache + +import ( + "context" + + "github.com/docker/distribution" + prometheus "github.com/docker/distribution/metrics" + "github.com/opencontainers/go-digest" +) + +// Metrics is used to hold metric counters +// related to the number of times a cache was +// hit or missed. +type Metrics struct { + Requests uint64 + Hits uint64 + Misses uint64 +} + +// Logger can be provided on the MetricsTracker to log errors. +// +// Usually, this is just a proxy to dcontext.GetLogger. +type Logger interface { + Errorf(format string, args ...interface{}) +} + +// MetricsTracker represents a metric tracker +// which simply counts the number of hits and misses. +type MetricsTracker interface { + Hit() + Miss() + Metrics() Metrics + Logger(context.Context) Logger +} + +type cachedBlobStatter struct { + cache distribution.BlobDescriptorService + backend distribution.BlobDescriptorService + tracker MetricsTracker +} + +var ( + // cacheCount is the number of total cache request received/hits/misses + cacheCount = prometheus.StorageNamespace.NewLabeledCounter("cache", "The number of cache request received", "type") +) + +// NewCachedBlobStatter creates a new statter which prefers a cache and +// falls back to a backend. +func NewCachedBlobStatter(cache distribution.BlobDescriptorService, backend distribution.BlobDescriptorService) distribution.BlobDescriptorService { + return &cachedBlobStatter{ + cache: cache, + backend: backend, + } +} + +// NewCachedBlobStatterWithMetrics creates a new statter which prefers a cache and +// falls back to a backend. Hits and misses will send to the tracker. +func NewCachedBlobStatterWithMetrics(cache distribution.BlobDescriptorService, backend distribution.BlobDescriptorService, tracker MetricsTracker) distribution.BlobStatter { + return &cachedBlobStatter{ + cache: cache, + backend: backend, + tracker: tracker, + } +} + +func (cbds *cachedBlobStatter) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { + cacheCount.WithValues("Request").Inc(1) + desc, err := cbds.cache.Stat(ctx, dgst) + if err != nil { + if err != distribution.ErrBlobUnknown { + logErrorf(ctx, cbds.tracker, "error retrieving descriptor from cache: %v", err) + } + + goto fallback + } + cacheCount.WithValues("Hit").Inc(1) + if cbds.tracker != nil { + cbds.tracker.Hit() + } + return desc, nil +fallback: + cacheCount.WithValues("Miss").Inc(1) + if cbds.tracker != nil { + cbds.tracker.Miss() + } + desc, err = cbds.backend.Stat(ctx, dgst) + if err != nil { + return desc, err + } + + if err := cbds.cache.SetDescriptor(ctx, dgst, desc); err != nil { + logErrorf(ctx, cbds.tracker, "error adding descriptor %v to cache: %v", desc.Digest, err) + } + + return desc, err + +} + +func (cbds *cachedBlobStatter) Clear(ctx context.Context, dgst digest.Digest) error { + err := cbds.cache.Clear(ctx, dgst) + if err != nil { + return err + } + + err = cbds.backend.Clear(ctx, dgst) + if err != nil { + return err + } + return nil +} + +func (cbds *cachedBlobStatter) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error { + if err := cbds.cache.SetDescriptor(ctx, dgst, desc); err != nil { + logErrorf(ctx, cbds.tracker, "error adding descriptor %v to cache: %v", desc.Digest, err) + } + return nil +} + +func logErrorf(ctx context.Context, tracker MetricsTracker, format string, args ...interface{}) { + if tracker == nil { + return + } + + logger := tracker.Logger(ctx) + if logger == nil { + return + } + logger.Errorf(format, args...) +} diff --git a/vendor/github.com/docker/distribution/registry/storage/cache/memory/memory.go b/vendor/github.com/docker/distribution/registry/storage/cache/memory/memory.go new file mode 100644 index 000000000..f2953b02c --- /dev/null +++ b/vendor/github.com/docker/distribution/registry/storage/cache/memory/memory.go @@ -0,0 +1,179 @@ +package memory + +import ( + "context" + "sync" + + "github.com/distribution/reference" + "github.com/docker/distribution" + "github.com/docker/distribution/registry/storage/cache" + "github.com/opencontainers/go-digest" +) + +type inMemoryBlobDescriptorCacheProvider struct { + global *mapBlobDescriptorCache + repositories map[string]*mapBlobDescriptorCache + mu sync.RWMutex +} + +// NewInMemoryBlobDescriptorCacheProvider returns a new mapped-based cache for +// storing blob descriptor data. +func NewInMemoryBlobDescriptorCacheProvider() cache.BlobDescriptorCacheProvider { + return &inMemoryBlobDescriptorCacheProvider{ + global: newMapBlobDescriptorCache(), + repositories: make(map[string]*mapBlobDescriptorCache), + } +} + +func (imbdcp *inMemoryBlobDescriptorCacheProvider) RepositoryScoped(repo string) (distribution.BlobDescriptorService, error) { + if _, err := reference.ParseNormalizedNamed(repo); err != nil { + return nil, err + } + + imbdcp.mu.RLock() + defer imbdcp.mu.RUnlock() + + return &repositoryScopedInMemoryBlobDescriptorCache{ + repo: repo, + parent: imbdcp, + repository: imbdcp.repositories[repo], + }, nil +} + +func (imbdcp *inMemoryBlobDescriptorCacheProvider) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { + return imbdcp.global.Stat(ctx, dgst) +} + +func (imbdcp *inMemoryBlobDescriptorCacheProvider) Clear(ctx context.Context, dgst digest.Digest) error { + return imbdcp.global.Clear(ctx, dgst) +} + +func (imbdcp *inMemoryBlobDescriptorCacheProvider) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error { + _, err := imbdcp.Stat(ctx, dgst) + if err == distribution.ErrBlobUnknown { + + if dgst.Algorithm() != desc.Digest.Algorithm() && dgst != desc.Digest { + // if the digests differ, set the other canonical mapping + if err := imbdcp.global.SetDescriptor(ctx, desc.Digest, desc); err != nil { + return err + } + } + + // unknown, just set it + return imbdcp.global.SetDescriptor(ctx, dgst, desc) + } + + // we already know it, do nothing + return err +} + +// repositoryScopedInMemoryBlobDescriptorCache provides the request scoped +// repository cache. Instances are not thread-safe but the delegated +// operations are. +type repositoryScopedInMemoryBlobDescriptorCache struct { + repo string + parent *inMemoryBlobDescriptorCacheProvider // allows lazy allocation of repo's map + repository *mapBlobDescriptorCache +} + +func (rsimbdcp *repositoryScopedInMemoryBlobDescriptorCache) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { + rsimbdcp.parent.mu.Lock() + repo := rsimbdcp.repository + rsimbdcp.parent.mu.Unlock() + + if repo == nil { + return distribution.Descriptor{}, distribution.ErrBlobUnknown + } + + return repo.Stat(ctx, dgst) +} + +func (rsimbdcp *repositoryScopedInMemoryBlobDescriptorCache) Clear(ctx context.Context, dgst digest.Digest) error { + rsimbdcp.parent.mu.Lock() + repo := rsimbdcp.repository + rsimbdcp.parent.mu.Unlock() + + if repo == nil { + return distribution.ErrBlobUnknown + } + + return repo.Clear(ctx, dgst) +} + +func (rsimbdcp *repositoryScopedInMemoryBlobDescriptorCache) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error { + rsimbdcp.parent.mu.Lock() + repo := rsimbdcp.repository + if repo == nil { + // allocate map since we are setting it now. + var ok bool + // have to read back value since we may have allocated elsewhere. + repo, ok = rsimbdcp.parent.repositories[rsimbdcp.repo] + if !ok { + repo = newMapBlobDescriptorCache() + rsimbdcp.parent.repositories[rsimbdcp.repo] = repo + } + rsimbdcp.repository = repo + } + rsimbdcp.parent.mu.Unlock() + + if err := repo.SetDescriptor(ctx, dgst, desc); err != nil { + return err + } + + return rsimbdcp.parent.SetDescriptor(ctx, dgst, desc) +} + +// mapBlobDescriptorCache provides a simple map-based implementation of the +// descriptor cache. +type mapBlobDescriptorCache struct { + descriptors map[digest.Digest]distribution.Descriptor + mu sync.RWMutex +} + +var _ distribution.BlobDescriptorService = &mapBlobDescriptorCache{} + +func newMapBlobDescriptorCache() *mapBlobDescriptorCache { + return &mapBlobDescriptorCache{ + descriptors: make(map[digest.Digest]distribution.Descriptor), + } +} + +func (mbdc *mapBlobDescriptorCache) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { + if err := dgst.Validate(); err != nil { + return distribution.Descriptor{}, err + } + + mbdc.mu.RLock() + defer mbdc.mu.RUnlock() + + desc, ok := mbdc.descriptors[dgst] + if !ok { + return distribution.Descriptor{}, distribution.ErrBlobUnknown + } + + return desc, nil +} + +func (mbdc *mapBlobDescriptorCache) Clear(ctx context.Context, dgst digest.Digest) error { + mbdc.mu.Lock() + defer mbdc.mu.Unlock() + + delete(mbdc.descriptors, dgst) + return nil +} + +func (mbdc *mapBlobDescriptorCache) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error { + if err := dgst.Validate(); err != nil { + return err + } + + if err := cache.ValidateDescriptor(desc); err != nil { + return err + } + + mbdc.mu.Lock() + defer mbdc.mu.Unlock() + + mbdc.descriptors[dgst] = desc + return nil +} diff --git a/vendor/github.com/docker/distribution/tags.go b/vendor/github.com/docker/distribution/tags.go new file mode 100644 index 000000000..f22df2b85 --- /dev/null +++ b/vendor/github.com/docker/distribution/tags.go @@ -0,0 +1,27 @@ +package distribution + +import ( + "context" +) + +// TagService provides access to information about tagged objects. +type TagService interface { + // Get retrieves the descriptor identified by the tag. Some + // implementations may differentiate between "trusted" tags and + // "untrusted" tags. If a tag is "untrusted", the mapping will be returned + // as an ErrTagUntrusted error, with the target descriptor. + Get(ctx context.Context, tag string) (Descriptor, error) + + // Tag associates the tag with the provided descriptor, updating the + // current association, if needed. + Tag(ctx context.Context, tag string, desc Descriptor) error + + // Untag removes the given tag association + Untag(ctx context.Context, tag string) error + + // All returns the set of tags managed by this tag service + All(ctx context.Context) ([]string, error) + + // Lookup returns the set of tags referencing the given digest. + Lookup(ctx context.Context, digest Descriptor) ([]string, error) +} diff --git a/vendor/github.com/docker/distribution/vendor.conf b/vendor/github.com/docker/distribution/vendor.conf new file mode 100644 index 000000000..20818428f --- /dev/null +++ b/vendor/github.com/docker/distribution/vendor.conf @@ -0,0 +1,52 @@ +github.com/Azure/azure-sdk-for-go 4650843026a7fdec254a8d9cf893693a254edd0b +github.com/Azure/go-autorest eaa7994b2278094c904d31993d26f56324db3052 +github.com/sirupsen/logrus 3d4380f53a34dcdc95f0c1db702615992b38d9a4 +github.com/aws/aws-sdk-go f831d5a0822a1ad72420ab18c6269bca1ddaf490 +github.com/bshuster-repo/logrus-logstash-hook d2c0ecc1836d91814e15e23bb5dc309c3ef51f4a +github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 +github.com/bugsnag/bugsnag-go b1d153021fcd90ca3f080db36bec96dc690fb274 +github.com/bugsnag/osext 0dd3f918b21bec95ace9dc86c7e70266cfc5c702 +github.com/bugsnag/panicwrap e2c28503fcd0675329da73bf48b33404db873782 +github.com/denverdino/aliyungo afedced274aa9a7fcdd47ac97018f0f8db4e5de2 +github.com/dgrijalva/jwt-go 4bbdd8ac624fc7a9ef7aec841c43d99b5fe65a29 https://github.com/golang-jwt/jwt.git # v3.2.2 +github.com/distribution/reference 49c28499d219290c3226822e9cfcd4ede6d75379 # v0.5.0 +github.com/docker/go-metrics 399ea8c73916000c64c2c76e8da00ca82f8387ab +github.com/docker/libtrust fa567046d9b14f6aa788882a950d69651d230b21 +github.com/garyburd/redigo 535138d7bcd717d6531c701ef5933d98b1866257 +github.com/go-ini/ini 2ba15ac2dc9cdf88c110ec2dc0ced7fa45f5678c +github.com/golang/protobuf 8d92cf5fc15a4382f8964b08e1f42a75c0591aa3 +github.com/gorilla/handlers 60c7bfde3e33c201519a200a4507a158cc03a17b +github.com/gorilla/mux 599cba5e7b6137d46ddf58fb1765f5d928e69604 +github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +github.com/jmespath/go-jmespath bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d +github.com/marstr/guid 8bd9a64bf37eb297b492a4101fb28e80ac0b290f +github.com/satori/go.uuid f58768cc1a7a7e77a3bd49e98cdd21419399b6a3 +github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c +github.com/miekg/dns 271c58e0c14f552178ea321a545ff9af38930f39 +github.com/mitchellh/mapstructure 482a9fd5fa83e8c4e7817413b80f3eb8feec03ef +github.com/ncw/swift a0320860b16212c2b59b4912bb6508cda1d7cee6 +github.com/prometheus/client_golang c332b6f63c0658a65eca15c0e5247ded801cf564 +github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c +github.com/prometheus/common 89604d197083d4781071d3c65855d24ecfb0a563 +github.com/prometheus/procfs cb4147076ac75738c9a7d279075a253c0cc5acbd +github.com/Shopify/logrus-bugsnag 577dee27f20dd8f1a529f82210094af593be12bd +github.com/spf13/cobra 312092086bed4968099259622145a0c9ae280064 +github.com/spf13/pflag 5644820622454e71517561946e3d94b9f9db6842 +github.com/xenolf/lego a9d8cec0e6563575e5868a005359ac97911b5985 +github.com/yvasiyarov/go-metrics 57bccd1ccd43f94bb17fdd8bf3007059b802f85e +github.com/yvasiyarov/gorelic a9bba5b9ab508a086f9a12b8c51fab68478e2128 +github.com/yvasiyarov/newrelic_platform_go b21fdbd4370f3717f3bbd2bf41c223bc273068e6 +golang.org/x/crypto c10c31b5e94b6f7a0283272dc2bb27163dcea24b +golang.org/x/net 4876518f9e71663000c348837735820161a42df7 +golang.org/x/oauth2 045497edb6234273d67dbc25da3f2ddbc4c4cacf +golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb +google.golang.org/api 9bf6e6e569ff057f75d9604a46c52928f17d2b54 +google.golang.org/appengine 12d5545dc1cfa6047a286d5e853841b6471f4c19 +google.golang.org/cloud 975617b05ea8a58727e6c1a06b6161ff4185a9f2 +google.golang.org/grpc d3ddb4469d5a1b949fc7a7da7c1d6a0d1b6de994 +gopkg.in/check.v1 64131543e7896d5bcc6bd5a76287eb75ea96c673 +gopkg.in/square/go-jose.v1 40d457b439244b546f023d056628e5184136899b +gopkg.in/yaml.v2 v2.2.1 +rsc.io/letsencrypt e770c10b0f1a64775ae91d240407ce00d1a5bdeb https://github.com/dmcgowan/letsencrypt.git +github.com/opencontainers/go-digest ea51bea511f75cfa3ef6098cc253c5c3609b037a # v1.0.0 +github.com/opencontainers/image-spec 67d2d5658fe0476ab9bf414cec164077ebff3920 # v1.0.2 diff --git a/vendor/github.com/docker/docker-credential-helpers/LICENSE b/vendor/github.com/docker/docker-credential-helpers/LICENSE new file mode 100644 index 000000000..1ea555e2a --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2016 David Calavera + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/docker/docker-credential-helpers/client/client.go b/vendor/github.com/docker/docker-credential-helpers/client/client.go new file mode 100644 index 000000000..d1d0434cb --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/client/client.go @@ -0,0 +1,121 @@ +package client + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + + "github.com/docker/docker-credential-helpers/credentials" +) + +// isValidCredsMessage checks if 'msg' contains invalid credentials error message. +// It returns whether the logs are free of invalid credentials errors and the error if it isn't. +// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername. +func isValidCredsMessage(msg string) error { + if credentials.IsCredentialsMissingServerURLMessage(msg) { + return credentials.NewErrCredentialsMissingServerURL() + } + + if credentials.IsCredentialsMissingUsernameMessage(msg) { + return credentials.NewErrCredentialsMissingUsername() + } + + return nil +} + +// Store uses an external program to save credentials. +func Store(program ProgramFunc, creds *credentials.Credentials) error { + cmd := program("store") + + buffer := new(bytes.Buffer) + if err := json.NewEncoder(buffer).Encode(creds); err != nil { + return err + } + cmd.Input(buffer) + + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return fmt.Errorf("error storing credentials - err: %v, out: `%s`", err, t) + } + + return nil +} + +// Get executes an external program to get the credentials from a native store. +func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error) { + cmd := program("get") + cmd.Input(strings.NewReader(serverURL)) + + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if credentials.IsErrCredentialsNotFoundMessage(t) { + return nil, credentials.NewErrCredentialsNotFound() + } + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return nil, fmt.Errorf("error getting credentials - err: %v, out: `%s`", err, t) + } + + resp := &credentials.Credentials{ + ServerURL: serverURL, + } + + if err := json.NewDecoder(bytes.NewReader(out)).Decode(resp); err != nil { + return nil, err + } + + return resp, nil +} + +// Erase executes a program to remove the server credentials from the native store. +func Erase(program ProgramFunc, serverURL string) error { + cmd := program("erase") + cmd.Input(strings.NewReader(serverURL)) + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return fmt.Errorf("error erasing credentials - err: %v, out: `%s`", err, t) + } + + return nil +} + +// List executes a program to list server credentials in the native store. +func List(program ProgramFunc) (map[string]string, error) { + cmd := program("list") + cmd.Input(strings.NewReader("unused")) + out, err := cmd.Output() + if err != nil { + t := strings.TrimSpace(string(out)) + + if isValidErr := isValidCredsMessage(t); isValidErr != nil { + err = isValidErr + } + + return nil, fmt.Errorf("error listing credentials - err: %v, out: `%s`", err, t) + } + + var resp map[string]string + if err = json.NewDecoder(bytes.NewReader(out)).Decode(&resp); err != nil { + return nil, err + } + + return resp, nil +} diff --git a/vendor/github.com/docker/docker-credential-helpers/client/command.go b/vendor/github.com/docker/docker-credential-helpers/client/command.go new file mode 100644 index 000000000..0183c0639 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/client/command.go @@ -0,0 +1,57 @@ +package client + +import ( + "fmt" + "io" + "os" + + exec "golang.org/x/sys/execabs" +) + +// Program is an interface to execute external programs. +type Program interface { + Output() ([]byte, error) + Input(in io.Reader) +} + +// ProgramFunc is a type of function that initializes programs based on arguments. +type ProgramFunc func(args ...string) Program + +// NewShellProgramFunc creates programs that are executed in a Shell. +func NewShellProgramFunc(name string) ProgramFunc { + return NewShellProgramFuncWithEnv(name, nil) +} + +// NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables +func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc { + return func(args ...string) Program { + return &Shell{cmd: createProgramCmdRedirectErr(name, args, env)} + } +} + +func createProgramCmdRedirectErr(commandName string, args []string, env *map[string]string) *exec.Cmd { + programCmd := exec.Command(commandName, args...) + programCmd.Env = os.Environ() + if env != nil { + for k, v := range *env { + programCmd.Env = append(programCmd.Env, fmt.Sprintf("%s=%s", k, v)) + } + } + programCmd.Stderr = os.Stderr + return programCmd +} + +// Shell invokes shell commands to talk with a remote credentials helper. +type Shell struct { + cmd *exec.Cmd +} + +// Output returns responses from the remote credentials helper. +func (s *Shell) Output() ([]byte, error) { + return s.cmd.Output() +} + +// Input sets the input to send to a remote credentials helper. +func (s *Shell) Input(in io.Reader) { + s.cmd.Stdin = in +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go new file mode 100644 index 000000000..91d9d4bba --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go @@ -0,0 +1,186 @@ +package credentials + +import ( + "bufio" + "bytes" + "encoding/json" + "fmt" + "io" + "os" + "strings" +) + +// Credentials holds the information shared between docker and the credentials store. +type Credentials struct { + ServerURL string + Username string + Secret string +} + +// isValid checks the integrity of Credentials object such that no credentials lack +// a server URL or a username. +// It returns whether the credentials are valid and the error if it isn't. +// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername +func (c *Credentials) isValid() (bool, error) { + if len(c.ServerURL) == 0 { + return false, NewErrCredentialsMissingServerURL() + } + + if len(c.Username) == 0 { + return false, NewErrCredentialsMissingUsername() + } + + return true, nil +} + +// CredsLabel holds the way Docker credentials should be labeled as such in credentials stores that allow labelling. +// That label allows to filter out non-Docker credentials too at lookup/search in macOS keychain, +// Windows credentials manager and Linux libsecret. Default value is "Docker Credentials" +var CredsLabel = "Docker Credentials" + +// SetCredsLabel is a simple setter for CredsLabel +func SetCredsLabel(label string) { + CredsLabel = label +} + +// Serve initializes the credentials helper and parses the action argument. +// This function is designed to be called from a command line interface. +// It uses os.Args[1] as the key for the action. +// It uses os.Stdin as input and os.Stdout as output. +// This function terminates the program with os.Exit(1) if there is an error. +func Serve(helper Helper) { + var err error + if len(os.Args) != 2 { + err = fmt.Errorf("Usage: %s ", os.Args[0]) + } + + if err == nil { + err = HandleCommand(helper, os.Args[1], os.Stdin, os.Stdout) + } + + if err != nil { + fmt.Fprintf(os.Stdout, "%v\n", err) + os.Exit(1) + } +} + +// HandleCommand uses a helper and a key to run a credential action. +func HandleCommand(helper Helper, key string, in io.Reader, out io.Writer) error { + switch key { + case "store": + return Store(helper, in) + case "get": + return Get(helper, in, out) + case "erase": + return Erase(helper, in) + case "list": + return List(helper, out) + case "version": + return PrintVersion(out) + } + return fmt.Errorf("Unknown credential action `%s`", key) +} + +// Store uses a helper and an input reader to save credentials. +// The reader must contain the JSON serialization of a Credentials struct. +func Store(helper Helper, reader io.Reader) error { + scanner := bufio.NewScanner(reader) + + buffer := new(bytes.Buffer) + for scanner.Scan() { + buffer.Write(scanner.Bytes()) + } + + if err := scanner.Err(); err != nil && err != io.EOF { + return err + } + + var creds Credentials + if err := json.NewDecoder(buffer).Decode(&creds); err != nil { + return err + } + + if ok, err := creds.isValid(); !ok { + return err + } + + return helper.Add(&creds) +} + +// Get retrieves the credentials for a given server url. +// The reader must contain the server URL to search. +// The writer is used to write the JSON serialization of the credentials. +func Get(helper Helper, reader io.Reader, writer io.Writer) error { + scanner := bufio.NewScanner(reader) + + buffer := new(bytes.Buffer) + for scanner.Scan() { + buffer.Write(scanner.Bytes()) + } + + if err := scanner.Err(); err != nil && err != io.EOF { + return err + } + + serverURL := strings.TrimSpace(buffer.String()) + if len(serverURL) == 0 { + return NewErrCredentialsMissingServerURL() + } + + username, secret, err := helper.Get(serverURL) + if err != nil { + return err + } + + resp := Credentials{ + ServerURL: serverURL, + Username: username, + Secret: secret, + } + + buffer.Reset() + if err := json.NewEncoder(buffer).Encode(resp); err != nil { + return err + } + + fmt.Fprint(writer, buffer.String()) + return nil +} + +// Erase removes credentials from the store. +// The reader must contain the server URL to remove. +func Erase(helper Helper, reader io.Reader) error { + scanner := bufio.NewScanner(reader) + + buffer := new(bytes.Buffer) + for scanner.Scan() { + buffer.Write(scanner.Bytes()) + } + + if err := scanner.Err(); err != nil && err != io.EOF { + return err + } + + serverURL := strings.TrimSpace(buffer.String()) + if len(serverURL) == 0 { + return NewErrCredentialsMissingServerURL() + } + + return helper.Delete(serverURL) +} + +// List returns all the serverURLs of keys in +// the OS store as a list of strings +func List(helper Helper, writer io.Writer) error { + accts, err := helper.List() + if err != nil { + return err + } + return json.NewEncoder(writer).Encode(accts) +} + +// PrintVersion outputs the current version. +func PrintVersion(writer io.Writer) error { + fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version) + return nil +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/error.go b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go new file mode 100644 index 000000000..fe6a5aef4 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go @@ -0,0 +1,102 @@ +package credentials + +const ( + // ErrCredentialsNotFound standardizes the not found error, so every helper returns + // the same message and docker can handle it properly. + errCredentialsNotFoundMessage = "credentials not found in native keychain" + + // ErrCredentialsMissingServerURL and ErrCredentialsMissingUsername standardize + // invalid credentials or credentials management operations + errCredentialsMissingServerURLMessage = "no credentials server URL" + errCredentialsMissingUsernameMessage = "no credentials username" +) + +// errCredentialsNotFound represents an error +// raised when credentials are not in the store. +type errCredentialsNotFound struct{} + +// Error returns the standard error message +// for when the credentials are not in the store. +func (errCredentialsNotFound) Error() string { + return errCredentialsNotFoundMessage +} + +// NewErrCredentialsNotFound creates a new error +// for when the credentials are not in the store. +func NewErrCredentialsNotFound() error { + return errCredentialsNotFound{} +} + +// IsErrCredentialsNotFound returns true if the error +// was caused by not having a set of credentials in a store. +func IsErrCredentialsNotFound(err error) bool { + _, ok := err.(errCredentialsNotFound) + return ok +} + +// IsErrCredentialsNotFoundMessage returns true if the error +// was caused by not having a set of credentials in a store. +// +// This function helps to check messages returned by an +// external program via its standard output. +func IsErrCredentialsNotFoundMessage(err string) bool { + return err == errCredentialsNotFoundMessage +} + +// errCredentialsMissingServerURL represents an error raised +// when the credentials object has no server URL or when no +// server URL is provided to a credentials operation requiring +// one. +type errCredentialsMissingServerURL struct{} + +func (errCredentialsMissingServerURL) Error() string { + return errCredentialsMissingServerURLMessage +} + +// errCredentialsMissingUsername represents an error raised +// when the credentials object has no username or when no +// username is provided to a credentials operation requiring +// one. +type errCredentialsMissingUsername struct{} + +func (errCredentialsMissingUsername) Error() string { + return errCredentialsMissingUsernameMessage +} + +// NewErrCredentialsMissingServerURL creates a new error for +// errCredentialsMissingServerURL. +func NewErrCredentialsMissingServerURL() error { + return errCredentialsMissingServerURL{} +} + +// NewErrCredentialsMissingUsername creates a new error for +// errCredentialsMissingUsername. +func NewErrCredentialsMissingUsername() error { + return errCredentialsMissingUsername{} +} + +// IsCredentialsMissingServerURL returns true if the error +// was an errCredentialsMissingServerURL. +func IsCredentialsMissingServerURL(err error) bool { + _, ok := err.(errCredentialsMissingServerURL) + return ok +} + +// IsCredentialsMissingServerURLMessage checks for an +// errCredentialsMissingServerURL in the error message. +func IsCredentialsMissingServerURLMessage(err string) bool { + return err == errCredentialsMissingServerURLMessage +} + +// IsCredentialsMissingUsername returns true if the error +// was an errCredentialsMissingUsername. +func IsCredentialsMissingUsername(err error) bool { + _, ok := err.(errCredentialsMissingUsername) + return ok +} + +// IsCredentialsMissingUsernameMessage checks for an +// errCredentialsMissingUsername in the error message. +func IsCredentialsMissingUsernameMessage(err string) bool { + return err == errCredentialsMissingUsernameMessage +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go b/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go new file mode 100644 index 000000000..135acd254 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go @@ -0,0 +1,14 @@ +package credentials + +// Helper is the interface a credentials store helper must implement. +type Helper interface { + // Add appends credentials to the store. + Add(*Credentials) error + // Delete removes credentials from the store. + Delete(serverURL string) error + // Get retrieves credentials from the store. + // It returns username and secret as strings. + Get(serverURL string) (string, string, error) + // List returns the stored serverURLs and their associated usernames. + List() (map[string]string, error) +} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/version.go b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go new file mode 100644 index 000000000..84377c263 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go @@ -0,0 +1,16 @@ +package credentials + +var ( + // Name is filled at linking time + Name = "" + + // Package is filled at linking time + Package = "github.com/docker/docker-credential-helpers" + + // Version holds the complete version number. Filled in at linking time. + Version = "v0.0.0+unknown" + + // Revision is filled with the VCS (e.g. git) revision being used to build + // the program at linking time. + Revision = "" +) diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS new file mode 100644 index 000000000..48d04f9a9 --- /dev/null +++ b/vendor/github.com/docker/docker/AUTHORS @@ -0,0 +1,2429 @@ +# File @generated by hack/generate-authors.sh. DO NOT EDIT. +# This file lists all contributors to the repository. +# See hack/generate-authors.sh to make modifications. + +Aanand Prasad +Aaron Davidson +Aaron Feng +Aaron Hnatiw +Aaron Huslage +Aaron L. Xu +Aaron Lehmann +Aaron Welch +Abel Muiño +Abhijeet Kasurde +Abhinandan Prativadi +Abhinav Ajgaonkar +Abhishek Chanda +Abhishek Sharma +Abin Shahab +Abirdcfly +Ada Mancini +Adam Avilla +Adam Dobrawy +Adam Eijdenberg +Adam Kunk +Adam Miller +Adam Mills +Adam Pointer +Adam Singer +Adam Thornton +Adam Walz +Adam Williams +AdamKorcz +Addam Hardy +Aditi Rajagopal +Aditya +Adnan Khan +Adolfo Ochagavía +Adria Casas +Adrian Moisey +Adrian Mouat +Adrian Oprea +Adrien Folie +Adrien Gallouët +Ahmed Kamal +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Ajey Charantimath +ajneu +Akash Gupta +Akhil Mohan +Akihiro Matsushima +Akihiro Suda +Akim Demaille +Akira Koyasu +Akshay Karle +Akshay Moghe +Al Tobey +alambike +Alan Hoyle +Alan Scherger +Alan Thompson +Albert Callarisa +Albert Zhang +Albin Kerouanton +Alec Benson +Alejandro González Hevia +Aleksa Sarai +Aleksandr Chebotov +Aleksandrs Fadins +Alena Prokharchyk +Alessandro Boch +Alessio Biancalana +Alex Chan +Alex Chen +Alex Coventry +Alex Crawford +Alex Ellis +Alex Gaynor +Alex Goodman +Alex Nordlund +Alex Olshansky +Alex Samorukov +Alex Stockinger +Alex Warhawk +Alexander Artemenko +Alexander Boyd +Alexander Larsson +Alexander Midlash +Alexander Morozov +Alexander Polakov +Alexander Shopov +Alexandre Beslic +Alexandre Garnier +Alexandre González +Alexandre Jomin +Alexandru Sfirlogea +Alexei Margasov +Alexey Guskov +Alexey Kotlyarov +Alexey Shamrin +Alexis Ries +Alexis Thomas +Alfred Landrum +Ali Dehghani +Alicia Lauerman +Alihan Demir +Allen Madsen +Allen Sun +almoehi +Alvaro Saurin +Alvin Deng +Alvin Richards +amangoel +Amen Belayneh +Ameya Gawde +Amir Goldstein +Amit Bakshi +Amit Krishnan +Amit Shukla +Amr Gawish +Amy Lindburg +Anand Patil +AnandkumarPatel +Anatoly Borodin +Anca Iordache +Anchal Agrawal +Anda Xu +Anders Janmyr +Andre Dublin <81dublin@gmail.com> +Andre Granovsky +Andrea Denisse Gómez +Andrea Luzzardi +Andrea Turli +Andreas Elvers +Andreas Köhler +Andreas Savvides +Andreas Tiefenthaler +Andrei Gherzan +Andrei Ushakov +Andrei Vagin +Andrew C. Bodine +Andrew Clay Shafer +Andrew Duckworth +Andrew France +Andrew Gerrand +Andrew Guenther +Andrew He +Andrew Hsu +Andrew Kim +Andrew Kuklewicz +Andrew Macgregor +Andrew Macpherson +Andrew Martin +Andrew McDonnell +Andrew Munsell +Andrew Pennebaker +Andrew Po +Andrew Weiss +Andrew Williams +Andrews Medina +Andrey Kolomentsev +Andrey Petrov +Andrey Stolbovsky +André Martins +Andy Chambers +andy diller +Andy Goldstein +Andy Kipp +Andy Lindeman +Andy Rothfusz +Andy Smith +Andy Wilson +Andy Zhang +Aneesh Kulkarni +Anes Hasicic +Angel Velazquez +Anil Belur +Anil Madhavapeddy +Ankit Jain +Ankush Agarwal +Anonmily +Anran Qiao +Anshul Pundir +Anthon van der Neut +Anthony Baire +Anthony Bishopric +Anthony Dahanne +Anthony Sottile +Anton Löfgren +Anton Nikitin +Anton Polonskiy +Anton Tiurin +Antonio Murdaca +Antonis Kalipetis +Antony Messerli +Anuj Bahuguna +Anuj Varma +Anusha Ragunathan +Anyu Wang +apocas +Arash Deshmeh +arcosx +ArikaChen +Arko Dasgupta +Arnaud Lefebvre +Arnaud Porterie +Arnaud Rebillout +Artem Khramov +Arthur Barr +Arthur Gautier +Artur Meyster +Arun Gupta +Asad Saeeduddin +Asbjørn Enge +Austin Vazquez +averagehuman +Avi Das +Avi Kivity +Avi Miller +Avi Vaid +ayoshitake +Azat Khuyiyakhmetov +Bao Yonglei +Bardia Keyoumarsi +Barnaby Gray +Barry Allard +Bartłomiej Piotrowski +Bastiaan Bakker +Bastien Pascard +bdevloed +Bearice Ren +Ben Bonnefoy +Ben Firshman +Ben Golub +Ben Gould +Ben Hall +Ben Langfeld +Ben Lovy +Ben Sargent +Ben Severson +Ben Toews +Ben Wiklund +Benjamin Atkin +Benjamin Baker +Benjamin Boudreau +Benjamin Böhmke +Benjamin Wang +Benjamin Yolken +Benny Ng +Benoit Chesneau +Bernerd Schaefer +Bernhard M. Wiedemann +Bert Goethals +Bertrand Roussel +Bevisy Zhang +Bharath Thiruveedula +Bhiraj Butala +Bhumika Bayani +Bilal Amarni +Bill Wang +Billy Ridgway +Bily Zhang +Bin Liu +Bingshen Wang +Bjorn Neergaard +Blake Geno +Boaz Shuster +bobby abbott +Bojun Zhu +Boqin Qin +Boris Pruessmann +Boshi Lian +Bouke Haarsma +Boyd Hemphill +boynux +Bradley Cicenas +Bradley Wright +Brandon Liu +Brandon Philips +Brandon Rhodes +Brendan Dixon +Brennan Kinney <5098581+polarathene@users.noreply.github.com> +Brent Salisbury +Brett Higgins +Brett Kochendorfer +Brett Milford +Brett Randall +Brian (bex) Exelbierd +Brian Bland +Brian DeHamer +Brian Dorsey +Brian Flad +Brian Goff +Brian McCallister +Brian Olsen +Brian Schwind +Brian Shumate +Brian Torres-Gil +Brian Trump +Brice Jaglin +Briehan Lombaard +Brielle Broder +Bruno Bigras +Bruno Binet +Bruno Gazzera +Bruno Renié +Bruno Tavares +Bryan Bess +Bryan Boreham +Bryan Matsuo +Bryan Murphy +Burke Libbey +Byung Kang +Caleb Spare +Calen Pennington +Cameron Boehmer +Cameron Sparr +Cameron Spear +Campbell Allen +Candid Dauth +Cao Weiwei +Carl Henrik Lunde +Carl Loa Odin +Carl X. Su +Carlo Mion +Carlos Alexandro Becker +Carlos de Paula +Carlos Sanchez +Carol Fager-Higgins +Cary +Casey Bisson +Catalin Pirvu +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Swenson +Chance Zibolski +Chander Govindarajan +Chanhun Jeong +Chao Wang +Charles Chan +Charles Hooper +Charles Law +Charles Lindsay +Charles Merriam +Charles Sarrazin +Charles Smith +Charlie Drage +Charlie Lewis +Chase Bolt +ChaYoung You +Chee Hau Lim +Chen Chao +Chen Chuanliang +Chen Hanxiao +Chen Min +Chen Mingjie +Chen Qiu +Cheng-mean Liu +Chengfei Shang +Chengguang Xu +Chenyang Yan +chenyuzhu +Chetan Birajdar +Chewey +Chia-liang Kao +Chiranjeevi Tirunagari +chli +Cholerae Hu +Chris Alfonso +Chris Armstrong +Chris Dias +Chris Dituri +Chris Fordham +Chris Gavin +Chris Gibson +Chris Khoo +Chris Kreussling (Flatbush Gardener) +Chris McKinnel +Chris McKinnel +Chris Price +Chris Seto +Chris Snow +Chris St. Pierre +Chris Stivers +Chris Swan +Chris Telfer +Chris Wahl +Chris Weyl +Chris White +Christian Becker +Christian Berendt +Christian Brauner +Christian Böhme +Christian Muehlhaeuser +Christian Persson +Christian Rotzoll +Christian Simon +Christian Stefanescu +Christoph Ziebuhr +Christophe Mehay +Christophe Troestler +Christophe Vidal +Christopher Biscardi +Christopher Crone +Christopher Currie +Christopher Jones +Christopher Latham +Christopher Rigor +Christy Norman +Chun Chen +Ciro S. Costa +Clayton Coleman +Clint Armstrong +Clinton Kitson +clubby789 +Cody Roseborough +Coenraad Loubser +Colin Dunklau +Colin Hebert +Colin Panisset +Colin Rice +Colin Walters +Collin Guarino +Colm Hally +companycy +Conor Evans +Corbin Coleman +Corey Farrell +Cory Forsyth +Cory Snider +cressie176 +Cristian Ariza +Cristian Staretu +cristiano balducci +Cristina Yenyxe Gonzalez Garcia +Cruceru Calin-Cristian +cui fliter +CUI Wei +Cuong Manh Le +Cyprian Gracz +Cyril F +Da McGrady +Daan van Berkel +Daehyeok Mun +Dafydd Crosby +dalanlan +Damian Smyth +Damien Nadé +Damien Nozay +Damjan Georgievski +Dan Anolik +Dan Buch +Dan Cotora +Dan Feldman +Dan Griffin +Dan Hirsch +Dan Keder +Dan Levy +Dan McPherson +Dan Plamadeala +Dan Stine +Dan Williams +Dani Hodovic +Dani Louca +Daniel Antlinger +Daniel Black +Daniel Dao +Daniel Exner +Daniel Farrell +Daniel Garcia +Daniel Gasienica +Daniel Grunwell +Daniel Helfand +Daniel Hiltgen +Daniel J Walsh +Daniel Menet +Daniel Mizyrycki +Daniel Nephin +Daniel Norberg +Daniel Nordberg +Daniel P. Berrangé +Daniel Robinson +Daniel S +Daniel Sweet +Daniel Von Fange +Daniel Watkins +Daniel X Moore +Daniel YC Lin +Daniel Zhang +Daniele Rondina +Danny Berger +Danny Milosavljevic +Danny Yates +Danyal Khaliq +Darren Coxall +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Davanum Srinivas +Dave Barboza +Dave Goodchild +Dave Henderson +Dave MacDonald +Dave Tucker +David Anderson +David Bellotti +David Calavera +David Chung +David Corking +David Cramer +David Currie +David Davis +David Dooling +David Gageot +David Gebler +David Glasser +David Karlsson <35727626+dvdksn@users.noreply.github.com> +David Lawrence +David Lechner +David M. Karr +David Mackey +David Manouchehri +David Mat +David Mcanulty +David McKay +David O'Rourke +David P Hilton +David Pelaez +David R. Jenni +David Röthlisberger +David Sheets +David Sissitka +David Trott +David Wang <00107082@163.com> +David Williamson +David Xia +David Young +Davide Ceretti +Dawn Chen +dbdd +dcylabs +Debayan De +Deborah Gertrude Digges +deed02392 +Deep Debroy +Deng Guangxing +Deni Bertovic +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Chen +Dennis Chen +Dennis Docter +Derek +Derek +Derek Ch +Derek McGowan +Deric Crago +Deshi Xiao +Devon Estes +Devvyn Murphy +Dharmit Shah +Dhawal Yogesh Bhanushali +Dhilip Kumars +Diego Romero +Diego Siqueira +Dieter Reuter +Dillon Dixon +Dima Stopel +Dimitri John Ledkov +Dimitris Mandalidis +Dimitris Rozakis +Dimitry Andric +Dinesh Subhraveti +Ding Fei +dingwei +Diogo Monica +DiuDiugirl +Djibril Koné +Djordje Lukic +dkumor +Dmitri Logvinenko +Dmitri Shuralyov +Dmitry Demeshchuk +Dmitry Gusev +Dmitry Kononenko +Dmitry Sharshakov +Dmitry Shyshkin +Dmitry Smirnov +Dmitry V. Krivenok +Dmitry Vorobev +Dmytro Iakovliev +docker-unir[bot] +Dolph Mathews +Dominic Tubach +Dominic Yin +Dominik Dingel +Dominik Finkbeiner +Dominik Honnef +Don Kirkby +Don Kjer +Don Spaulding +Donald Huang +Dong Chen +Donghwa Kim +Donovan Jones +Dorin Geman +Doron Podoleanu +Doug Davis +Doug MacEachern +Doug Tangren +Douglas Curtis +Dr Nic Williams +dragon788 +Dražen Lučanin +Drew Erny +Drew Hubl +Dustin Sallings +Ed Costello +Edmund Wagner +Eiichi Tsukata +Eike Herzbach +Eivin Giske Skaaren +Eivind Uggedal +Elan Ruusamäe +Elango Sivanandam +Elena Morozova +Eli Uriegas +Elias Faxö +Elias Koromilas +Elias Probst +Elijah Zupancic +eluck +Elvir Kuric +Emil Davtyan +Emil Hernvall +Emily Maier +Emily Rose +Emir Ozer +Eng Zer Jun +Enguerran +Enrico Weigelt, metux IT consult +Eohyung Lee +epeterso +er0k +Eric Barch +Eric Curtin +Eric G. Noriega +Eric Hanchrow +Eric Lee +Eric Mountain +Eric Myhre +Eric Paris +Eric Rafaloff +Eric Rosenberg +Eric Sage +Eric Soderstrom +Eric Yang +Eric-Olivier Lamey +Erica Windisch +Erich Cordoba +Erik Bray +Erik Dubbelboer +Erik Hollensbe +Erik Inge Bolsø +Erik Kristensen +Erik Sipsma +Erik St. Martin +Erik Weathers +Erno Hopearuoho +Erwin van der Koogh +Espen Suenson +Ethan Bell +Ethan Mosbaugh +Euan Harris +Euan Kemp +Eugen Krizo +Eugene Yakubovich +Evan Allrich +Evan Carmi +Evan Hazlett +Evan Krall +Evan Lezar +Evan Phoenix +Evan Wies +Evelyn Xu +Everett Toews +Evgeniy Makhrov +Evgeny Shmarnev +Evgeny Vereshchagin +Ewa Czechowska +Eystein Måløy Stenberg +ezbercih +Ezra Silvera +Fabian Kramm +Fabian Lauer +Fabian Raetz +Fabiano Rosas +Fabio Falci +Fabio Kung +Fabio Rapposelli +Fabio Rehm +Fabrizio Regini +Fabrizio Soppelsa +Faiz Khan +falmp +Fangming Fang +Fangyuan Gao <21551127@zju.edu.cn> +fanjiyun +Fareed Dudhia +Fathi Boudra +Federico Gimenez +Felipe Oliveira +Felipe Ruhland +Felix Abecassis +Felix Geisendörfer +Felix Hupfeld +Felix Rabe +Felix Ruess +Felix Schindler +Feng Yan +Fengtu Wang +Ferenc Szabo +Fernando +Fero Volar +Feroz Salam +Ferran Rodenas +Filipe Brandenburger +Filipe Oliveira +Flavio Castelli +Flavio Crisciani +Florian +Florian Klein +Florian Maier +Florian Noeding +Florian Schmaus +Florian Weingarten +Florin Asavoaie +Florin Patan +fonglh +Foysal Iqbal +Francesc Campoy +Francesco Degrassi +Francesco Mari +Francis Chuang +Francisco Carriedo +Francisco Souza +Frank Groeneveld +Frank Herrmann +Frank Macreery +Frank Rosquin +Frank Villaro-Dixon +Frank Yang +Fred Lifton +Frederick F. Kautz IV +Frederico F. de Oliveira +Frederik Loeffert +Frederik Nordahl Jul Sabroe +Freek Kalter +Frieder Bluemle +frobnicaty <92033765+frobnicaty@users.noreply.github.com> +Frédéric Dalleau +Fu JinLin +Félix Baylac-Jacqué +Félix Cantournet +Gabe Rosenhouse +Gabor Nagy +Gabriel Adrian Samfira +Gabriel Goller +Gabriel L. Somlo +Gabriel Linder +Gabriel Monroy +Gabriel Nicolas Avellaneda +Gaetan de Villele +Galen Sampson +Gang Qiao +Gareth Rushgrove +Garrett Barboza +Gary Schaetz +Gaurav +Gaurav Singh +Gaël PORTAY +Genki Takiuchi +GennadySpb +Geoff Levand +Geoffrey Bachelet +Geon Kim +George Kontridze +George MacRorie +George Xie +Georgi Hristozov +Georgy Yakovlev +Gereon Frey +German DZ +Gert van Valkenhoef +Gerwim Feiken +Ghislain Bourgeois +Giampaolo Mancini +Gianluca Borello +Gildas Cuisinier +Giovan Isa Musthofa +gissehel +Giuseppe Mazzotta +Giuseppe Scrivano +Gleb Fotengauer-Malinovskiy +Gleb M Borisov +Glyn Normington +GoBella +Goffert van Gool +Goldwyn Rodrigues +Gopikannan Venugopalsamy +Gosuke Miyashita +Gou Rao +Govinda Fichtner +Grant Millar +Grant Reaber +Graydon Hoare +Greg Fausak +Greg Pflaum +Greg Stephens +Greg Thornton +Grzegorz Jaśkiewicz +Guilhem Lettron +Guilherme Salgado +Guillaume Dufour +Guillaume J. Charmes +Gunadhya S. <6939749+gunadhya@users.noreply.github.com> +Guoqiang QI +guoxiuyan +Guri +Gurjeet Singh +Guruprasad +Gustav Sinder +gwx296173 +Günter Zöchbauer +Haichao Yang +haikuoliu +haining.cao +Hakan Özler +Hamish Hutchings +Hannes Ljungberg +Hans Kristian Flaatten +Hans Rødtang +Hao Shu Wei +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harald Niesche +Harley Laue +Harold Cooper +Harrison Turton +Harry Zhang +Harshal Patil +Harshal Patil +He Simei +He Xiaoxi +He Xin +heartlock <21521209@zju.edu.cn> +Hector Castro +Helen Xie +Henning Sprang +Hiroshi Hatake +Hiroyuki Sasagawa +Hobofan +Hollie Teal +Hong Xu +Hongbin Lu +Hongxu Jia +Honza Pokorny +Hsing-Hui Hsu +Hsing-Yu (David) Chen +hsinko <21551195@zju.edu.cn> +Hu Keping +Hu Tao +HuanHuan Ye +Huanzhong Zhang +Huayi Zhang +Hugo Barrera +Hugo Duncan +Hugo Marisco <0x6875676f@gmail.com> +Hui Kang +Hunter Blanks +huqun +Huu Nguyen +Hyeongkyu Lee +Hyzhou Zhy +Iago López Galeiras +Ian Bishop +Ian Bull +Ian Calvert +Ian Campbell +Ian Chen +Ian Lee +Ian Main +Ian Philpot +Ian Truslove +Iavael +Icaro Seara +Ignacio Capurro +Igor Dolzhikov +Igor Karpovich +Iliana Weller +Ilkka Laukkanen +Illia Antypenko +Illo Abdulrahim +Ilya Dmitrichenko +Ilya Gusev +Ilya Khlopotov +imre Fitos +inglesp +Ingo Gottwald +Innovimax +Isaac Dupree +Isabel Jimenez +Isaiah Grace +Isao Jonas +Iskander Sharipov +Ivan Babrou +Ivan Fraixedes +Ivan Grcic +Ivan Markin +J Bruni +J. Nunn +Jack Danger Canty +Jack Laxson +Jacob Atzen +Jacob Edelman +Jacob Tomlinson +Jacob Vallejo +Jacob Wen +Jaime Cepeda +Jaivish Kothari +Jake Champlin +Jake Moshenko +Jake Sanders +Jakub Drahos +Jakub Guzik +James Allen +James Carey +James Carr +James DeFelice +James Harrison Fisher +James Kyburz +James Kyle +James Lal +James Mills +James Nesbitt +James Nugent +James Sanders +James Turnbull +James Watkins-Harvey +Jamie Hannaford +Jamshid Afshar +Jan Breig +Jan Chren +Jan Garcia +Jan Götte +Jan Keromnes +Jan Koprowski +Jan Pazdziora +Jan Toebes +Jan-Gerd Tenberge +Jan-Jaap Driessen +Jana Radhakrishnan +Jannick Fahlbusch +Januar Wayong +Jared Biel +Jared Hocutt +Jaroslaw Zabiello +Jasmine Hegman +Jason A. Donenfeld +Jason Divock +Jason Giedymin +Jason Green +Jason Hall +Jason Heiss +Jason Livesay +Jason McVetta +Jason Plum +Jason Shepherd +Jason Smith +Jason Sommer +Jason Stangroome +Javier Bassi +jaxgeller +Jay +Jay Kamat +Jay Lim +Jean Rouge +Jean-Baptiste Barth +Jean-Baptiste Dalido +Jean-Christophe Berthon +Jean-Michel Rouet +Jean-Paul Calderone +Jean-Pierre Huynh +Jean-Tiare Le Bigot +Jeeva S. Chelladhurai +Jeff Anderson +Jeff Hajewski +Jeff Johnston +Jeff Lindsay +Jeff Mickey +Jeff Minard +Jeff Nickoloff +Jeff Silberman +Jeff Welch +Jeff Zvier +Jeffrey Bolle +Jeffrey Morgan +Jeffrey van Gogh +Jenny Gebske +Jeremy Chambers +Jeremy Grosser +Jeremy Huntwork +Jeremy Price +Jeremy Qian +Jeremy Unruh +Jeremy Yallop +Jeroen Franse +Jeroen Jacobs +Jesse Dearing +Jesse Dubay +Jessica Frazelle +Jeyanthinath Muthuram +Jezeniel Zapanta +Jhon Honce +Ji.Zhilong +Jian Liao +Jian Zhang +Jiang Jinyang +Jianyong Wu +Jie Luo +Jie Ma +Jihyun Hwang +Jilles Oldenbeuving +Jim Alateras +Jim Carroll +Jim Ehrismann +Jim Galasyn +Jim Lin +Jim Minter +Jim Perrin +Jimmy Cuadra +Jimmy Puckett +Jimmy Song +Jinsoo Park +Jintao Zhang +Jiri Appl +Jiri Popelka +Jiuyue Ma +Jiří Župka +Joakim Roubert +Joao Fernandes +Joao Trindade +Joe Beda +Joe Doliner +Joe Ferguson +Joe Gordon +Joe Shaw +Joe Van Dyk +Joel Friedly +Joel Handwell +Joel Hansson +Joel Wurtz +Joey Geiger +Joey Geiger +Joey Gibson +Joffrey F +Johan Euphrosine +Johan Rydberg +Johanan Lieberman +Johannes 'fish' Ziemke +John Costa +John Feminella +John Gardiner Myers +John Gossman +John Harris +John Howard +John Laswell +John Maguire +John Mulhausen +John OBrien III +John Starks +John Stephens +John Tims +John V. Martinez +John Warwick +John Willis +Jon Johnson +Jon Surrell +Jon Wedaman +Jonas Dohse +Jonas Heinrich +Jonas Pfenniger +Jonathan A. Schweder +Jonathan A. Sternberg +Jonathan Boulle +Jonathan Camp +Jonathan Choy +Jonathan Dowland +Jonathan Lebon +Jonathan Lomas +Jonathan McCrohan +Jonathan Mueller +Jonathan Pares +Jonathan Rudenberg +Jonathan Stoppani +Jonh Wendell +Joni Sar +Joost Cassee +Jordan Arentsen +Jordan Jennings +Jordan Sissel +Jordi Massaguer Pla +Jorge Marin +Jorit Kleine-Möllhoff +Jose Diaz-Gonzalez +Joseph Anthony Pasquale Holsten +Joseph Hager +Joseph Kern +Joseph Rothrock +Josh +Josh Bodah +Josh Bonczkowski +Josh Chorlton +Josh Eveleth +Josh Hawn +Josh Horwitz +Josh Poimboeuf +Josh Soref +Josh Wilson +Josiah Kiehl +José Tomás Albornoz +Joyce Jang +JP +Julian Taylor +Julien Barbier +Julien Bisconti +Julien Bordellier +Julien Dubois +Julien Kassar +Julien Maitrehenry +Julien Pervillé +Julien Pivotto +Julio Guerra +Julio Montes +Jun Du +Jun-Ru Chang +junxu +Jussi Nummelin +Justas Brazauskas +Justen Martin +Justin Chadwell +Justin Cormack +Justin Force +Justin Keller <85903732+jk-vb@users.noreply.github.com> +Justin Menga +Justin Plock +Justin Simonelis +Justin Terry +Justyn Temme +Jyrki Puttonen +Jérémy Leherpeur +Jérôme Petazzoni +Jörg Thalheim +K. Heller +Kai Blin +Kai Qiang Wu (Kennan) +Kaijie Chen +Kamil Domański +Kamjar Gerami +Kanstantsin Shautsou +Kara Alexandra +Karan Lyons +Kareem Khazem +kargakis +Karl Grzeszczak +Karol Duleba +Karthik Karanth +Karthik Nayak +Kasper Fabæch Brandt +Kate Heddleston +Katie McLaughlin +Kato Kazuyoshi +Katrina Owen +Kawsar Saiyeed +Kay Yan +kayrus +Kazuhiro Sera +Kazuyoshi Kato +Ke Li +Ke Xu +Kei Ohmura +Keith Hudgins +Keli Hu +Ken Bannister +Ken Cochrane +Ken Herner +Ken ICHIKAWA +Ken Reese +Kenfe-Mickaël Laventure +Kenjiro Nakayama +Kent Johnson +Kenta Tada +Kevin "qwazerty" Houdebert +Kevin Alvarez +Kevin Burke +Kevin Clark +Kevin Feyrer +Kevin J. Lynagh +Kevin Jing Qiu +Kevin Kern +Kevin Menard +Kevin Meredith +Kevin P. Kucharczyk +Kevin Parsons +Kevin Richardson +Kevin Shi +Kevin Wallace +Kevin Yap +Keyvan Fatehi +kies +Kim BKC Carlbacker +Kim Eik +Kimbro Staken +Kir Kolyshkin +Kiran Gangadharan +Kirill SIbirev +Kirk Easterson +knappe +Kohei Tsuruta +Koichi Shiraishi +Konrad Kleine +Konrad Ponichtera +Konstantin Gribov +Konstantin L +Konstantin Pelykh +Kostadin Plachkov +kpcyrd +Krasi Georgiev +Krasimir Georgiev +Kris-Mikael Krister +Kristian Haugene +Kristina Zabunova +Krystian Wojcicki +Kunal Kushwaha +Kunal Tyagi +Kyle Conroy +Kyle Linden +Kyle Squizzato +Kyle Wuolle +kyu +Lachlan Coote +Lai Jiangshan +Lajos Papp +Lakshan Perera +Lalatendu Mohanty +Lance Chen +Lance Kinley +Lars Butler +Lars Kellogg-Stedman +Lars R. Damerow +Lars-Magnus Skog +Laszlo Meszaros +Laura Brehm +Laura Frank +Laurent Bernaille +Laurent Erignoux +Laurie Voss +Leandro Motta Barros +Leandro Siqueira +Lee Calcote +Lee Chao <932819864@qq.com> +Lee, Meng-Han +Lei Gong +Lei Jitang +Leiiwang +Len Weincier +Lennie +Leo Gallucci +Leonardo Nodari +Leonardo Taccari +Leszek Kowalski +Levi Blackstone +Levi Gross +Levi Harrison +Lewis Daly +Lewis Marshall +Lewis Peckover +Li Yi +Liam Macgillavry +Liana Lo +Liang Mingqiang +Liang-Chi Hsieh +liangwei +Liao Qingwei +Lifubang +Lihua Tang +Lily Guo +limeidan +Lin Lu +LingFaKe +Linus Heckemann +Liran Tal +Liron Levin +Liu Bo +Liu Hua +liwenqi +lixiaobing10051267 +Liz Zhang +LIZAO LI +Lizzie Dixon <_@lizzie.io> +Lloyd Dewolf +Lokesh Mandvekar +longliqiang88 <394564827@qq.com> +Lorenz Leutgeb +Lorenzo Fontana +Lotus Fenn +Louis Delossantos +Louis Opter +Luboslav Pivarc +Luca Favatella +Luca Marturana +Luca Orlandi +Luca-Bogdan Grigorescu +Lucas Chan +Lucas Chi +Lucas Molas +Lucas Silvestre +Luciano Mores +Luis Henrique Mulinari +Luis Martínez de Bartolomé Izquierdo +Luiz Svoboda +Lukas Heeren +Lukas Waslowski +lukaspustina +Lukasz Zajaczkowski +Luke Marsden +Lyn +Lynda O'Leary +Lénaïc Huard +Ma Müller +Ma Shimiao +Mabin +Madhan Raj Mookkandy +Madhav Puri +Madhu Venugopal +Mageee +Mahesh Tiyyagura +malnick +Malte Janduda +Manfred Touron +Manfred Zabarauskas +Manjunath A Kumatagi +Mansi Nahar +Manuel Meurer +Manuel Rüger +Manuel Woelker +mapk0y +Marat Radchenko +Marc Abramowitz +Marc Kuo +Marc Tamsky +Marcel Edmund Franke +Marcelo Horacio Fortino +Marcelo Salazar +Marco Hennings +Marcus Cobden +Marcus Farkas +Marcus Linke +Marcus Martins +Marcus Ramberg +Marek Goldmann +Marian Marinov +Marianna Tessel +Mario Loriedo +Marius Gundersen +Marius Sturm +Marius Voila +Mark Allen +Mark Feit +Mark Jeromin +Mark McGranaghan +Mark McKinstry +Mark Milstein +Mark Oates +Mark Parker +Mark Vainomaa +Mark West +Markan Patel +Marko Mikulicic +Marko Tibold +Markus Fix +Markus Kortlang +Martijn Dwars +Martijn van Oosterhout +Martin Braun +Martin Dojcak +Martin Honermeyer +Martin Jirku +Martin Kelly +Martin Mosegaard Amdisen +Martin Muzatko +Martin Redmond +Maru Newby +Mary Anthony +Masahito Zembutsu +Masato Ohba +Masayuki Morita +Mason Malone +Mateusz Sulima +Mathias Monnerville +Mathieu Champlon +Mathieu Le Marec - Pasquet +Mathieu Parent +Mathieu Paturel +Matt Apperson +Matt Bachmann +Matt Bajor +Matt Bentley +Matt Haggard +Matt Hoyle +Matt McCormick +Matt Moore +Matt Morrison <3maven@gmail.com> +Matt Richardson +Matt Rickard +Matt Robenolt +Matt Schurenko +Matt Williams +Matthew Heon +Matthew Lapworth +Matthew Mayer +Matthew Mosesohn +Matthew Mueller +Matthew Riley +Matthias Klumpp +Matthias Kühnle +Matthias Rampke +Matthieu Fronton +Matthieu Hauglustaine +Mattias Jernberg +Mauricio Garavaglia +mauriyouth +Max Harmathy +Max Shytikov +Max Timchenko +Maxim Fedchyshyn +Maxim Ivanov +Maxim Kulkin +Maxim Treskin +Maxime Petazzoni +Maximiliano Maccanti +Maxwell +Meaglith Ma +meejah +Megan Kostick +Mehul Kar +Mei ChunTao +Mengdi Gao +Menghui Chen +Mert Yazıcıoğlu +mgniu +Micah Zoltu +Michael A. Smith +Michael Beskin +Michael Bridgen +Michael Brown +Michael Chiang +Michael Crosby +Michael Currie +Michael Friis +Michael Gorsuch +Michael Grauer +Michael Holzheu +Michael Hudson-Doyle +Michael Huettermann +Michael Irwin +Michael Kebe +Michael Kuehn +Michael Käufl +Michael Neale +Michael Nussbaum +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Stapelberg +Michael Steinert +Michael Thies +Michael Weidmann +Michael West +Michael Zhao +Michal Fojtik +Michal Gebauer +Michal Jemala +Michal Kostrzewa +Michal Minář +Michal Rostecki +Michal Wieczorek +Michaël Pailloncy +Michał Czeraszkiewicz +Michał Gryko +Michał Kosek +Michiel de Jong +Mickaël Fortunato +Mickaël Remars +Miguel Angel Fernández +Miguel Morales +Miguel Perez +Mihai Borobocea +Mihuleacc Sergiu +Mikael Davranche +Mike Brown +Mike Bush +Mike Casas +Mike Chelen +Mike Danese +Mike Dillon +Mike Dougherty +Mike Estes +Mike Gaffney +Mike Goelzer +Mike Leone +Mike Lundy +Mike MacCana +Mike Naberezny +Mike Snitzer +Mike Sul +mikelinjie <294893458@qq.com> +Mikhail Sobolev +Miklos Szegedi +Milas Bowman +Milind Chawre +Miloslav Trmač +mingqing +Mingzhen Feng +Misty Stanley-Jones +Mitch Capper +Mizuki Urushida +mlarcher +Mohammad Banikazemi +Mohammad Nasirifar +Mohammed Aaqib Ansari +Mohd Sadiq +Mohit Soni +Moorthy RS +Morgan Bauer +Morgante Pell +Morgy93 +Morten Siebuhr +Morton Fox +Moysés Borges +mrfly +Mrunal Patel +Muayyad Alsadi +Muhammad Zohaib Aslam +Mustafa Akın +Muthukumar R +Máximo Cuadros +Médi-Rémi Hashim +Nace Oroz +Nahum Shalman +Nakul Pathak +Nalin Dahyabhai +Nan Monnand Deng +Naoki Orii +Natalie Parker +Natanael Copa +Natasha Jarus +Nate Brennand +Nate Eagleson +Nate Jones +Nathan Carlson +Nathan Herald +Nathan Hsieh +Nathan Kleyn +Nathan LeClaire +Nathan McCauley +Nathan Williams +Naveed Jamil +Neal McBurnett +Neil Horman +Neil Peterson +Nelson Chen +Neyazul Haque +Nghia Tran +Niall O'Higgins +Nicholas E. Rabenau +Nick Adcock +Nick DeCoursin +Nick Irvine +Nick Neisen +Nick Parker +Nick Payne +Nick Russo +Nick Santos +Nick Stenning +Nick Stinemates +Nick Wood +NickrenREN +Nicola Kabar +Nicolas Borboën +Nicolas De Loof +Nicolas Dudebout +Nicolas Goy +Nicolas Kaiser +Nicolas Sterchele +Nicolas V Castet +Nicolás Hock Isaza +Niel Drummond +Nigel Poulton +Nik Nyby +Nikhil Chawla +NikolaMandic +Nikolas Garofil +Nikolay Edigaryev +Nikolay Milovanov +ningmingxiao +Nirmal Mehta +Nishant Totla +NIWA Hideyuki +Noah Meyerhans +Noah Treuhaft +NobodyOnSE +noducks +Nolan Darilek +Nolan Miles +Noriki Nakamura +nponeccop +Nurahmadie +Nuutti Kotivuori +nzwsch +O.S. Tezer +objectified +Odin Ugedal +Oguz Bilgic +Oh Jinkyun +Ohad Schneider +ohmystack +Ole Reifschneider +Oliver Neal +Oliver Reason +Olivier Gambier +Olle Jonsson +Olli Janatuinen +Olly Pomeroy +Omri Shiv +Onur Filiz +Oriol Francès +Oscar Bonilla <6f6231@gmail.com> +oscar.chen <2972789494@qq.com> +Oskar Niburski +Otto Kekäläinen +Ouyang Liduo +Ovidio Mallo +Panagiotis Moustafellos +Paolo G. Giarrusso +Pascal +Pascal Bach +Pascal Borreli +Pascal Hartig +Patrick Böänziger +Patrick Devine +Patrick Haas +Patrick Hemmer +Patrick Stapleton +Patrik Cyvoct +pattichen +Paul "TBBle" Hampson +Paul +paul +Paul Annesley +Paul Bellamy +Paul Bowsher +Paul Furtado +Paul Hammond +Paul Jimenez +Paul Kehrer +Paul Lietar +Paul Liljenberg +Paul Morie +Paul Nasrat +Paul Seiffert +Paul Weaver +Paulo Gomes +Paulo Ribeiro +Pavel Lobashov +Pavel Matěja +Pavel Pletenev +Pavel Pospisil +Pavel Sutyrin +Pavel Tikhomirov +Pavlos Ratis +Pavol Vargovcik +Pawel Konczalski +Paweł Gronowski +payall4u +Peeyush Gupta +Peggy Li +Pei Su +Peng Tao +Penghan Wang +Per Weijnitz +perhapszzy@sina.com +Pete Woods +Peter Bourgon +Peter Braden +Peter Bücker +Peter Choi +Peter Dave Hello +Peter Edge +Peter Ericson +Peter Esbensen +Peter Jaffe +Peter Kang +Peter Malmgren +Peter Salvatore +Peter Volpe +Peter Waller +Petr Švihlík +Petros Angelatos +Phil +Phil Estes +Phil Sphicas +Phil Spitler +Philip Alexander Etling +Philip K. Warren +Philip Monroe +Philipp Fruck +Philipp Gillé +Philipp Wahala +Philipp Weissensteiner +Phillip Alexander +phineas +pidster +Piergiuliano Bossi +Pierre +Pierre Carrier +Pierre Dal-Pra +Pierre Wacrenier +Pierre-Alain RIVIERE +Piotr Bogdan +Piotr Karbowski +Porjo +Poul Kjeldager Sørensen +Pradeep Chhetri +Pradip Dhara +Pradipta Kr. Banerjee +Prasanna Gautam +Pratik Karki +Prayag Verma +Priya Wadhwa +Projjol Banerji +Przemek Hejman +Puneet Pruthi +Pure White +pysqz +Qiang Huang +Qin TianHuan +Qinglan Peng +Quan Tian +qudongfang +Quentin Brossard +Quentin Perez +Quentin Tayssier +r0n22 +Rachit Sharma +Radostin Stoyanov +Rafal Jeczalik +Rafe Colton +Raghavendra K T +Raghuram Devarakonda +Raja Sami +Rajat Pandit +Rajdeep Dua +Ralf Sippl +Ralle +Ralph Bean +Ramkumar Ramachandra +Ramon Brooker +Ramon van Alteren +RaviTeja Pothana +Ray Tsang +ReadmeCritic +realityone +Recursive Madman +Reficul +Regan McCooey +Remi Rampin +Remy Suen +Renato Riccieri Santos Zannon +Renaud Gaubert +Rhys Hiltner +Ri Xu +Ricardo N Feliciano +Rich Horwood +Rich Moyse +Rich Seymour +Richard Burnison +Richard Hansen +Richard Harvey +Richard Mathie +Richard Metzler +Richard Scothern +Richo Healey +Rick Bradley +Rick van de Loo +Rick Wieman +Rik Nijessen +Riku Voipio +Riley Guerin +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Cowsill <42620235+rcowsill@users.noreply.github.com> +Rob Gulewich +Rob Murray +Rob Vesse +Robert Bachmann +Robert Bittle +Robert Obryk +Robert Schneider +Robert Shade +Robert Stern +Robert Terhaar +Robert Wallis +Robert Wang +Roberto G. Hashioka +Roberto Muñoz Fernández +Robin Naundorf +Robin Schneider +Robin Speekenbrink +Robin Thoni +robpc +Rodolfo Carvalho +Rodrigo Campos +Rodrigo Vaz +Roel Van Nyen +Roger Peppe +Rohit Jnagal +Rohit Kadam +Rohit Kapur +Rojin George +Roland Huß +Roland Kammerer +Roland Moriz +Roma Sokolov +Roman Dudin +Roman Mazur +Roman Strashkin +Roman Volosatovs +Roman Zabaluev +Ron Smits +Ron Williams +Rong Gao +Rong Zhang +Rongxiang Song +Rony Weng +root +root +root +root +Rory Hunter +Rory McCune +Ross Boucher +Rovanion Luckey +Roy Reznik +Royce Remer +Rozhnov Alexandr +Rudolph Gottesheim +Rui Cao +Rui Lopes +Ruilin Li +Runshen Zhu +Russ Magee +Ryan Abrams +Ryan Anderson +Ryan Aslett +Ryan Barry +Ryan Belgrave +Ryan Campbell +Ryan Detzel +Ryan Fowler +Ryan Liu +Ryan McLaughlin +Ryan O'Donnell +Ryan Seto +Ryan Shea +Ryan Simmen +Ryan Stelly +Ryan Thomas +Ryan Trauntvein +Ryan Wallner +Ryan Zhang +ryancooper7 +RyanDeng +Ryo Nakao +Ryoga Saito +Régis Behmo +Rémy Greinhofer +s. rannou +Sabin Basyal +Sachin Joshi +Sagar Hani +Sainath Grandhi +Sakeven Jiang +Salahuddin Khan +Sally O'Malley +Sam Abed +Sam Alba +Sam Bailey +Sam J Sharpe +Sam Neirinck +Sam Reis +Sam Rijs +Sam Thibault +Sam Whited +Sambuddha Basu +Sami Wagiaalla +Samuel Andaya +Samuel Dion-Girardeau +Samuel Karp +Samuel PHAN +sanchayanghosh +Sandeep Bansal +Sankar சங்கர் +Sanket Saurav +Santhosh Manohar +sapphiredev +Sargun Dhillon +Sascha Andres +Sascha Grunert +SataQiu +Satnam Singh +Satoshi Amemiya +Satoshi Tagomori +Scott Bessler +Scott Collier +Scott Johnston +Scott Moser +Scott Percival +Scott Stamp +Scott Walls +sdreyesg +Sean Christopherson +Sean Cronin +Sean Lee +Sean McIntyre +Sean OMeara +Sean P. Kane +Sean Rodman +Sebastiaan van Steenis +Sebastiaan van Stijn +Sebastian Höffner +Sebastian Radloff +Sebastian Thomschke +Sebastien Goasguen +Senthil Kumar Selvaraj +Senthil Kumaran +SeongJae Park +Seongyeol Lim +Serge Hallyn +Sergey Alekseev +Sergey Evstifeev +Sergii Kabashniuk +Sergio Lopez +Serhat Gülçiçek +SeungUkLee +Sevki Hasirci +Shane Canon +Shane da Silva +Shaun Kaasten +shaunol +Shawn Landden +Shawn Siefkas +shawnhe +Shayan Pooya +Shayne Wang +Shekhar Gulati +Sheng Yang +Shengbo Song +Shengjing Zhu +Shev Yan +Shih-Yuan Lee +Shihao Xia +Shijiang Wei +Shijun Qin +Shishir Mahajan +Shoubhik Bose +Shourya Sarcar +Shu-Wai Chow +shuai-z +Shukui Yang +Sian Lerk Lau +Siarhei Rasiukevich +Sidhartha Mani +sidharthamani +Silas Sewell +Silvan Jegen +Simão Reis +Simon Barendse +Simon Eskildsen +Simon Ferquel +Simon Leinen +Simon Menke +Simon Taranto +Simon Vikstrom +Sindhu S +Sjoerd Langkemper +skanehira +Smark Meng +Solganik Alexander +Solomon Hykes +Song Gao +Soshi Katsuta +Sotiris Salloumis +Soulou +Spencer Brown +Spencer Smith +Spike Curtis +Sridatta Thatipamala +Sridhar Ratnakumar +Srini Brahmaroutu +Srinivasan Srivatsan +Staf Wagemakers +Stanislav Bondarenko +Stanislav Levin +Steeve Morin +Stefan Berger +Stefan Gehrig +Stefan J. Wernli +Stefan Praszalowicz +Stefan S. +Stefan Scherer +Stefan Staudenmeyer +Stefan Weil +Steffen Butzer +Stephan Henningsen +Stephan Spindler +Stephen Benjamin +Stephen Crosby +Stephen Day +Stephen Drake +Stephen Rust +Steve Desmond +Steve Dougherty +Steve Durrheimer +Steve Francia +Steve Koch +Steven Burgess +Steven Erenst +Steven Hartland +Steven Iveson +Steven Merrill +Steven Richards +Steven Taylor +Stéphane Este-Gracias +Stig Larsson +Su Wang +Subhajit Ghosh +Sujith Haridasan +Sun Gengze <690388648@qq.com> +Sun Jianbo +Sune Keller +Sunny Gogoi +Suryakumar Sudar +Sven Dowideit +Swapnil Daingade +Sylvain Baubeau +Sylvain Bellemare +Sébastien +Sébastien HOUZÉ +Sébastien Luttringer +Sébastien Stormacq +Sören Tempel +Tabakhase +Tadej Janež +Takuto Sato +tang0th +Tangi Colin +Tatsuki Sugiura +Tatsushi Inagaki +Taylan Isikdemir +Taylor Jones +Ted M. Young +Tehmasp Chaudhri +Tejaswini Duggaraju +Tejesh Mehta +Terry Chu +terryding77 <550147740@qq.com> +Thatcher Peskens +theadactyl +Thell 'Bo' Fowler +Thermionix +Thiago Alves Silva +Thijs Terlouw +Thomas Bikeev +Thomas Frössman +Thomas Gazagnaire +Thomas Graf +Thomas Grainger +Thomas Hansen +Thomas Ledos +Thomas Leonard +Thomas Léveil +Thomas Orozco +Thomas Riccardi +Thomas Schroeter +Thomas Sjögren +Thomas Swift +Thomas Tanaka +Thomas Texier +Ti Zhou +Tiago Seabra +Tianon Gravi +Tianyi Wang +Tibor Vass +Tiffany Jernigan +Tiffany Low +Till Claassen +Till Wegmüller +Tim +Tim Bart +Tim Bosse +Tim Dettrick +Tim Düsterhus +Tim Hockin +Tim Potter +Tim Ruffles +Tim Smith +Tim Terhorst +Tim Wagner +Tim Wang +Tim Waugh +Tim Wraight +Tim Zju <21651152@zju.edu.cn> +timchenxiaoyu <837829664@qq.com> +timfeirg +Timo Rothenpieler +Timothy Hobbs +tjwebb123 +tobe +Tobias Bieniek +Tobias Bradtke +Tobias Gesellchen +Tobias Klauser +Tobias Munk +Tobias Pfandzelter +Tobias Schmidt +Tobias Schwab +Todd Crane +Todd Lunter +Todd Whiteman +Toli Kuznets +Tom Barlow +Tom Booth +Tom Denham +Tom Fotherby +Tom Howe +Tom Hulihan +Tom Maaswinkel +Tom Parker +Tom Sweeney +Tom Wilkie +Tom X. Tobin +Tom Zhao +Tomas Janousek +Tomas Kral +Tomas Tomecek +Tomasz Kopczynski +Tomasz Lipinski +Tomasz Nurkiewicz +Tomek Mańko +Tommaso Visconti +Tomoya Tabuchi +Tomáš Hrčka +tonic +Tonny Xu +Tony Abboud +Tony Daws +Tony Miller +toogley +Torstein Husebø +Toshiaki Makita +Tõnis Tiigi +Trace Andreason +tracylihui <793912329@qq.com> +Trapier Marshall +Travis Cline +Travis Thieman +Trent Ogren +Trevor +Trevor Pounds +Trevor Sullivan +Trishna Guha +Tristan Carel +Troy Denton +Tudor Brindus +Ty Alexander +Tycho Andersen +Tyler Brock +Tyler Brown +Tzu-Jung Lee +uhayate +Ulysse Carion +Umesh Yadav +Utz Bacher +vagrant +Vaidas Jablonskis +Valentin Kulesh +vanderliang +Velko Ivanov +Veres Lajos +Victor Algaze +Victor Coisne +Victor Costan +Victor I. Wood +Victor Lyuboslavsky +Victor Marmol +Victor Palma +Victor Vieux +Victoria Bialas +Vijaya Kumar K +Vikas Choudhary +Vikram bir Singh +Viktor Stanchev +Viktor Vojnovski +VinayRaghavanKS +Vincent Batts +Vincent Bernat +Vincent Boulineau +Vincent Demeester +Vincent Giersch +Vincent Mayers +Vincent Woo +Vinod Kulkarni +Vishal Doshi +Vishnu Kannan +Vitaly Ostrosablin +Vitor Anjos +Vitor Monteiro +Vivek Agarwal +Vivek Dasgupta +Vivek Goyal +Vladimir Bulyga +Vladimir Kirillov +Vladimir Pouzanov +Vladimir Rutsky +Vladimir Varankin +VladimirAus +Vladislav Kolesnikov +Vlastimil Zeman +Vojtech Vitek (V-Teq) +Walter Leibbrandt +Walter Stanish +Wang Chao +Wang Guoliang +Wang Jie +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Wang Yumu <37442693@qq.com> +wanghuaiqing +Ward Vandewege +WarheadsSE +Wassim Dhif +Wataru Ishida +Wayne Chang +Wayne Song +Weerasak Chongnguluam +Wei Fu +Wei Wu +Wei-Ting Kuo +weipeng +weiyan +Weiyang Zhu +Wen Cheng Ma +Wendel Fleming +Wenjun Tang +Wenkai Yin +wenlxie +Wenxuan Zhao +Wenyu You <21551128@zju.edu.cn> +Wenzhi Liang +Wes Morgan +Wesley Pettit +Wewang Xiaorenfine +Wiktor Kwapisiewicz +Will Dietz +Will Rouesnel +Will Weaver +willhf +William Delanoue +William Henry +William Hubbs +William Martin +William Riancho +William Thurston +Wilson Júnior +Wing-Kam Wong +WiseTrem +Wolfgang Nagele +Wolfgang Powisch +Wonjun Kim +WuLonghui +xamyzhao +Xia Wu +Xian Chaobo +Xianglin Gao +Xianjie +Xianlu Bird +Xiao YongBiao +Xiao Zhang +XiaoBing Jiang +Xiaodong Liu +Xiaodong Zhang +Xiaohua Ding +Xiaoxi He +Xiaoxu Chen +Xiaoyu Zhang +xichengliudui <1693291525@qq.com> +xiekeyang +Ximo Guanter Gonzálbez +xin.li +Xinbo Weng +Xinfeng Liu +Xinzi Zhou +Xiuming Chen +Xuecong Liao +xuzhaokui +Yadnyawalkya Tale +Yahya +yalpul +YAMADA Tsuyoshi +Yamasaki Masahide +Yamazaki Masashi +Yan Feng +Yan Zhu +Yang Bai +Yang Li +Yang Pengfei +yangchenliang +Yann Autissier +Yanqiang Miao +Yao Zaiyong +Yash Murty +Yassine Tijani +Yasunori Mahata +Yazhong Liu +Yestin Sun +Yi EungJun +Yibai Zhang +Yihang Ho +Ying Li +Yohei Ueda +Yong Tang +Yongxin Li +Yongzhi Pan +Yosef Fertel +You-Sheng Yang (楊有勝) +youcai +Youcef YEKHLEF +Youfu Zhang +Yu Changchun +Yu Chengxia +Yu Peng +Yu-Ju Hong +Yuan Sun +Yuanhong Peng +Yue Zhang +Yufei Xiong +Yuhao Fang +Yuichiro Kaneko +YujiOshima +Yunxiang Huang +Yurii Rashkovskii +Yusuf Tarık Günaydın +Yves Blusseau <90z7oey02@sneakemail.com> +Yves Junqueira +Zac Dover +Zach Borboa +Zach Gershman +Zachary Jaffee +Zain Memon +Zaiste! +Zane DeGraffenried +Zefan Li +Zen Lin(Zhinan Lin) +Zhang Kun +Zhang Wei +Zhang Wentao +zhangguanzhang +ZhangHang +zhangxianwei +Zhenan Ye <21551168@zju.edu.cn> +zhenghenghuo +Zhenhai Gao +Zhenkun Bi +ZhiPeng Lu +zhipengzuo +Zhou Hao +Zhoulin Xie +Zhu Guihua +Zhu Kunjia +Zhuoyun Wei +Ziheng Liu +Zilin Du +zimbatm +Ziming Dong +ZJUshuaizhou <21551191@zju.edu.cn> +zmarouf +Zoltan Tombol +Zou Yu +zqh +Zuhayr Elahi +Zunayed Ali +Álvaro Lázaro +Átila Camurça Alves +吴小白 <296015668@qq.com> +尹吉峰 +屈骏 +徐俊杰 +慕陶 +搏通 +黄艳红00139573 +정재영 diff --git a/vendor/github.com/docker/docker/LICENSE b/vendor/github.com/docker/docker/LICENSE new file mode 100644 index 000000000..6d8d58fb6 --- /dev/null +++ b/vendor/github.com/docker/docker/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/docker/NOTICE b/vendor/github.com/docker/docker/NOTICE new file mode 100644 index 000000000..58b19b6d1 --- /dev/null +++ b/vendor/github.com/docker/docker/NOTICE @@ -0,0 +1,19 @@ +Docker +Copyright 2012-2017 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +This product contains software (https://github.com/creack/pty) developed +by Keith Rarick, licensed under the MIT License. + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/docker/api/types/filters/errors.go b/vendor/github.com/docker/docker/api/types/filters/errors.go new file mode 100644 index 000000000..f52f69440 --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/filters/errors.go @@ -0,0 +1,37 @@ +package filters + +import "fmt" + +// invalidFilter indicates that the provided filter or its value is invalid +type invalidFilter struct { + Filter string + Value []string +} + +func (e invalidFilter) Error() string { + msg := "invalid filter" + if e.Filter != "" { + msg += " '" + e.Filter + if e.Value != nil { + msg = fmt.Sprintf("%s=%s", msg, e.Value) + } + msg += "'" + } + return msg +} + +// InvalidParameter marks this error as ErrInvalidParameter +func (e invalidFilter) InvalidParameter() {} + +// unreachableCode is an error indicating that the code path was not expected to be reached. +type unreachableCode struct { + Filter string + Value []string +} + +// System marks this error as ErrSystem +func (e unreachableCode) System() {} + +func (e unreachableCode) Error() string { + return fmt.Sprintf("unreachable code reached for filter: %q with values: %s", e.Filter, e.Value) +} diff --git a/vendor/github.com/docker/docker/api/types/filters/parse.go b/vendor/github.com/docker/docker/api/types/filters/parse.go new file mode 100644 index 000000000..0c39ab5f1 --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/filters/parse.go @@ -0,0 +1,346 @@ +/* +Package filters provides tools for encoding a mapping of keys to a set of +multiple values. +*/ +package filters // import "github.com/docker/docker/api/types/filters" + +import ( + "encoding/json" + "regexp" + "strings" + + "github.com/docker/docker/api/types/versions" +) + +// Args stores a mapping of keys to a set of multiple values. +type Args struct { + fields map[string]map[string]bool +} + +// KeyValuePair are used to initialize a new Args +type KeyValuePair struct { + Key string + Value string +} + +// Arg creates a new KeyValuePair for initializing Args +func Arg(key, value string) KeyValuePair { + return KeyValuePair{Key: key, Value: value} +} + +// NewArgs returns a new Args populated with the initial args +func NewArgs(initialArgs ...KeyValuePair) Args { + args := Args{fields: map[string]map[string]bool{}} + for _, arg := range initialArgs { + args.Add(arg.Key, arg.Value) + } + return args +} + +// Keys returns all the keys in list of Args +func (args Args) Keys() []string { + keys := make([]string, 0, len(args.fields)) + for k := range args.fields { + keys = append(keys, k) + } + return keys +} + +// MarshalJSON returns a JSON byte representation of the Args +func (args Args) MarshalJSON() ([]byte, error) { + if len(args.fields) == 0 { + return []byte("{}"), nil + } + return json.Marshal(args.fields) +} + +// ToJSON returns the Args as a JSON encoded string +func ToJSON(a Args) (string, error) { + if a.Len() == 0 { + return "", nil + } + buf, err := json.Marshal(a) + return string(buf), err +} + +// ToParamWithVersion encodes Args as a JSON string. If version is less than 1.22 +// then the encoded format will use an older legacy format where the values are a +// list of strings, instead of a set. +// +// Deprecated: do not use in any new code; use ToJSON instead +func ToParamWithVersion(version string, a Args) (string, error) { + if a.Len() == 0 { + return "", nil + } + + if version != "" && versions.LessThan(version, "1.22") { + buf, err := json.Marshal(convertArgsToSlice(a.fields)) + return string(buf), err + } + + return ToJSON(a) +} + +// FromJSON decodes a JSON encoded string into Args +func FromJSON(p string) (Args, error) { + args := NewArgs() + + if p == "" { + return args, nil + } + + raw := []byte(p) + err := json.Unmarshal(raw, &args) + if err == nil { + return args, nil + } + + // Fallback to parsing arguments in the legacy slice format + deprecated := map[string][]string{} + if legacyErr := json.Unmarshal(raw, &deprecated); legacyErr != nil { + return args, &invalidFilter{} + } + + args.fields = deprecatedArgs(deprecated) + return args, nil +} + +// UnmarshalJSON populates the Args from JSON encode bytes +func (args Args) UnmarshalJSON(raw []byte) error { + return json.Unmarshal(raw, &args.fields) +} + +// Get returns the list of values associated with the key +func (args Args) Get(key string) []string { + values := args.fields[key] + if values == nil { + return make([]string, 0) + } + slice := make([]string, 0, len(values)) + for key := range values { + slice = append(slice, key) + } + return slice +} + +// Add a new value to the set of values +func (args Args) Add(key, value string) { + if _, ok := args.fields[key]; ok { + args.fields[key][value] = true + } else { + args.fields[key] = map[string]bool{value: true} + } +} + +// Del removes a value from the set +func (args Args) Del(key, value string) { + if _, ok := args.fields[key]; ok { + delete(args.fields[key], value) + if len(args.fields[key]) == 0 { + delete(args.fields, key) + } + } +} + +// Len returns the number of keys in the mapping +func (args Args) Len() int { + return len(args.fields) +} + +// MatchKVList returns true if all the pairs in sources exist as key=value +// pairs in the mapping at key, or if there are no values at key. +func (args Args) MatchKVList(key string, sources map[string]string) bool { + fieldValues := args.fields[key] + + // do not filter if there is no filter set or cannot determine filter + if len(fieldValues) == 0 { + return true + } + + if len(sources) == 0 { + return false + } + + for value := range fieldValues { + testK, testV, hasValue := strings.Cut(value, "=") + + v, ok := sources[testK] + if !ok { + return false + } + if hasValue && testV != v { + return false + } + } + + return true +} + +// Match returns true if any of the values at key match the source string +func (args Args) Match(field, source string) bool { + if args.ExactMatch(field, source) { + return true + } + + fieldValues := args.fields[field] + for name2match := range fieldValues { + match, err := regexp.MatchString(name2match, source) + if err != nil { + continue + } + if match { + return true + } + } + return false +} + +// GetBoolOrDefault returns a boolean value of the key if the key is present +// and is intepretable as a boolean value. Otherwise the default value is returned. +// Error is not nil only if the filter values are not valid boolean or are conflicting. +func (args Args) GetBoolOrDefault(key string, defaultValue bool) (bool, error) { + fieldValues, ok := args.fields[key] + + if !ok { + return defaultValue, nil + } + + if len(fieldValues) == 0 { + return defaultValue, &invalidFilter{key, nil} + } + + isFalse := fieldValues["0"] || fieldValues["false"] + isTrue := fieldValues["1"] || fieldValues["true"] + + conflicting := isFalse && isTrue + invalid := !isFalse && !isTrue + + if conflicting || invalid { + return defaultValue, &invalidFilter{key, args.Get(key)} + } else if isFalse { + return false, nil + } else if isTrue { + return true, nil + } + + // This code shouldn't be reached. + return defaultValue, &unreachableCode{Filter: key, Value: args.Get(key)} +} + +// ExactMatch returns true if the source matches exactly one of the values. +func (args Args) ExactMatch(key, source string) bool { + fieldValues, ok := args.fields[key] + // do not filter if there is no filter set or cannot determine filter + if !ok || len(fieldValues) == 0 { + return true + } + + // try to match full name value to avoid O(N) regular expression matching + return fieldValues[source] +} + +// UniqueExactMatch returns true if there is only one value and the source +// matches exactly the value. +func (args Args) UniqueExactMatch(key, source string) bool { + fieldValues := args.fields[key] + // do not filter if there is no filter set or cannot determine filter + if len(fieldValues) == 0 { + return true + } + if len(args.fields[key]) != 1 { + return false + } + + // try to match full name value to avoid O(N) regular expression matching + return fieldValues[source] +} + +// FuzzyMatch returns true if the source matches exactly one value, or the +// source has one of the values as a prefix. +func (args Args) FuzzyMatch(key, source string) bool { + if args.ExactMatch(key, source) { + return true + } + + fieldValues := args.fields[key] + for prefix := range fieldValues { + if strings.HasPrefix(source, prefix) { + return true + } + } + return false +} + +// Contains returns true if the key exists in the mapping +func (args Args) Contains(field string) bool { + _, ok := args.fields[field] + return ok +} + +// Validate compared the set of accepted keys against the keys in the mapping. +// An error is returned if any mapping keys are not in the accepted set. +func (args Args) Validate(accepted map[string]bool) error { + for name := range args.fields { + if !accepted[name] { + return &invalidFilter{name, nil} + } + } + return nil +} + +// WalkValues iterates over the list of values for a key in the mapping and calls +// op() for each value. If op returns an error the iteration stops and the +// error is returned. +func (args Args) WalkValues(field string, op func(value string) error) error { + if _, ok := args.fields[field]; !ok { + return nil + } + for v := range args.fields[field] { + if err := op(v); err != nil { + return err + } + } + return nil +} + +// Clone returns a copy of args. +func (args Args) Clone() (newArgs Args) { + newArgs.fields = make(map[string]map[string]bool, len(args.fields)) + for k, m := range args.fields { + var mm map[string]bool + if m != nil { + mm = make(map[string]bool, len(m)) + for kk, v := range m { + mm[kk] = v + } + } + newArgs.fields[k] = mm + } + return newArgs +} + +func deprecatedArgs(d map[string][]string) map[string]map[string]bool { + m := map[string]map[string]bool{} + for k, v := range d { + values := map[string]bool{} + for _, vv := range v { + values[vv] = true + } + m[k] = values + } + return m +} + +func convertArgsToSlice(f map[string]map[string]bool) map[string][]string { + m := map[string][]string{} + for k, v := range f { + values := []string{} + for kk := range v { + if v[kk] { + values = append(values, kk) + } + } + m[k] = values + } + return m +} diff --git a/vendor/github.com/docker/docker/api/types/registry/authconfig.go b/vendor/github.com/docker/docker/api/types/registry/authconfig.go new file mode 100644 index 000000000..97a924e37 --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/registry/authconfig.go @@ -0,0 +1,99 @@ +package registry // import "github.com/docker/docker/api/types/registry" +import ( + "encoding/base64" + "encoding/json" + "io" + "strings" + + "github.com/pkg/errors" +) + +// AuthHeader is the name of the header used to send encoded registry +// authorization credentials for registry operations (push/pull). +const AuthHeader = "X-Registry-Auth" + +// AuthConfig contains authorization information for connecting to a Registry. +type AuthConfig struct { + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + Auth string `json:"auth,omitempty"` + + // Email is an optional value associated with the username. + // This field is deprecated and will be removed in a later + // version of docker. + Email string `json:"email,omitempty"` + + ServerAddress string `json:"serveraddress,omitempty"` + + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + IdentityToken string `json:"identitytoken,omitempty"` + + // RegistryToken is a bearer token to be sent to a registry + RegistryToken string `json:"registrytoken,omitempty"` +} + +// EncodeAuthConfig serializes the auth configuration as a base64url encoded +// RFC4648, section 5) JSON string for sending through the X-Registry-Auth header. +// +// For details on base64url encoding, see: +// - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5 +func EncodeAuthConfig(authConfig AuthConfig) (string, error) { + buf, err := json.Marshal(authConfig) + if err != nil { + return "", errInvalidParameter{err} + } + return base64.URLEncoding.EncodeToString(buf), nil +} + +// DecodeAuthConfig decodes base64url encoded (RFC4648, section 5) JSON +// authentication information as sent through the X-Registry-Auth header. +// +// This function always returns an AuthConfig, even if an error occurs. It is up +// to the caller to decide if authentication is required, and if the error can +// be ignored. +// +// For details on base64url encoding, see: +// - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5 +func DecodeAuthConfig(authEncoded string) (*AuthConfig, error) { + if authEncoded == "" { + return &AuthConfig{}, nil + } + + authJSON := base64.NewDecoder(base64.URLEncoding, strings.NewReader(authEncoded)) + return decodeAuthConfigFromReader(authJSON) +} + +// DecodeAuthConfigBody decodes authentication information as sent as JSON in the +// body of a request. This function is to provide backward compatibility with old +// clients and API versions. Current clients and API versions expect authentication +// to be provided through the X-Registry-Auth header. +// +// Like DecodeAuthConfig, this function always returns an AuthConfig, even if an +// error occurs. It is up to the caller to decide if authentication is required, +// and if the error can be ignored. +func DecodeAuthConfigBody(rdr io.ReadCloser) (*AuthConfig, error) { + return decodeAuthConfigFromReader(rdr) +} + +func decodeAuthConfigFromReader(rdr io.Reader) (*AuthConfig, error) { + authConfig := &AuthConfig{} + if err := json.NewDecoder(rdr).Decode(authConfig); err != nil { + // always return an (empty) AuthConfig to increase compatibility with + // the existing API. + return &AuthConfig{}, invalid(err) + } + return authConfig, nil +} + +func invalid(err error) error { + return errInvalidParameter{errors.Wrap(err, "invalid X-Registry-Auth header")} +} + +type errInvalidParameter struct{ error } + +func (errInvalidParameter) InvalidParameter() {} + +func (e errInvalidParameter) Cause() error { return e.error } + +func (e errInvalidParameter) Unwrap() error { return e.error } diff --git a/vendor/github.com/docker/docker/api/types/registry/authenticate.go b/vendor/github.com/docker/docker/api/types/registry/authenticate.go new file mode 100644 index 000000000..f0a2113e4 --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/registry/authenticate.go @@ -0,0 +1,21 @@ +package registry // import "github.com/docker/docker/api/types/registry" + +// ---------------------------------------------------------------------------- +// DO NOT EDIT THIS FILE +// This file was generated by `swagger generate operation` +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// AuthenticateOKBody authenticate o k body +// swagger:model AuthenticateOKBody +type AuthenticateOKBody struct { + + // An opaque token used to authenticate a user after a successful login + // Required: true + IdentityToken string `json:"IdentityToken"` + + // The status of the authentication + // Required: true + Status string `json:"Status"` +} diff --git a/vendor/github.com/docker/docker/api/types/registry/registry.go b/vendor/github.com/docker/docker/api/types/registry/registry.go new file mode 100644 index 000000000..05cb31075 --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/registry/registry.go @@ -0,0 +1,122 @@ +package registry // import "github.com/docker/docker/api/types/registry" + +import ( + "encoding/json" + "net" + + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// ServiceConfig stores daemon registry services configuration. +type ServiceConfig struct { + AllowNondistributableArtifactsCIDRs []*NetIPNet + AllowNondistributableArtifactsHostnames []string + InsecureRegistryCIDRs []*NetIPNet `json:"InsecureRegistryCIDRs"` + IndexConfigs map[string]*IndexInfo `json:"IndexConfigs"` + Mirrors []string +} + +// NetIPNet is the net.IPNet type, which can be marshalled and +// unmarshalled to JSON +type NetIPNet net.IPNet + +// String returns the CIDR notation of ipnet +func (ipnet *NetIPNet) String() string { + return (*net.IPNet)(ipnet).String() +} + +// MarshalJSON returns the JSON representation of the IPNet +func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) { + return json.Marshal((*net.IPNet)(ipnet).String()) +} + +// UnmarshalJSON sets the IPNet from a byte array of JSON +func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) { + var ipnetStr string + if err = json.Unmarshal(b, &ipnetStr); err == nil { + var cidr *net.IPNet + if _, cidr, err = net.ParseCIDR(ipnetStr); err == nil { + *ipnet = NetIPNet(*cidr) + } + } + return +} + +// IndexInfo contains information about a registry +// +// RepositoryInfo Examples: +// +// { +// "Index" : { +// "Name" : "docker.io", +// "Mirrors" : ["https://registry-2.docker.io/v1/", "https://registry-3.docker.io/v1/"], +// "Secure" : true, +// "Official" : true, +// }, +// "RemoteName" : "library/debian", +// "LocalName" : "debian", +// "CanonicalName" : "docker.io/debian" +// "Official" : true, +// } +// +// { +// "Index" : { +// "Name" : "127.0.0.1:5000", +// "Mirrors" : [], +// "Secure" : false, +// "Official" : false, +// }, +// "RemoteName" : "user/repo", +// "LocalName" : "127.0.0.1:5000/user/repo", +// "CanonicalName" : "127.0.0.1:5000/user/repo", +// "Official" : false, +// } +type IndexInfo struct { + // Name is the name of the registry, such as "docker.io" + Name string + // Mirrors is a list of mirrors, expressed as URIs + Mirrors []string + // Secure is set to false if the registry is part of the list of + // insecure registries. Insecure registries accept HTTP and/or accept + // HTTPS with certificates from unknown CAs. + Secure bool + // Official indicates whether this is an official registry + Official bool +} + +// SearchResult describes a search result returned from a registry +type SearchResult struct { + // StarCount indicates the number of stars this repository has + StarCount int `json:"star_count"` + // IsOfficial is true if the result is from an official repository. + IsOfficial bool `json:"is_official"` + // Name is the name of the repository + Name string `json:"name"` + // IsAutomated indicates whether the result is automated. + // + // Deprecated: the "is_automated" field is deprecated and will always be "false" in the future. + IsAutomated bool `json:"is_automated"` + // Description is a textual description of the repository + Description string `json:"description"` +} + +// SearchResults lists a collection search results returned from a registry +type SearchResults struct { + // Query contains the query string that generated the search results + Query string `json:"query"` + // NumResults indicates the number of results the query returned + NumResults int `json:"num_results"` + // Results is a slice containing the actual results for the search + Results []SearchResult `json:"results"` +} + +// DistributionInspect describes the result obtained from contacting the +// registry to retrieve image metadata +type DistributionInspect struct { + // Descriptor contains information about the manifest, including + // the content addressable digest + Descriptor ocispec.Descriptor + // Platforms contains the list of platforms supported by the image, + // obtained by parsing the manifest + Platforms []ocispec.Platform +} diff --git a/vendor/github.com/docker/docker/api/types/versions/README.md b/vendor/github.com/docker/docker/api/types/versions/README.md new file mode 100644 index 000000000..1ef911edb --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/versions/README.md @@ -0,0 +1,14 @@ +# Legacy API type versions + +This package includes types for legacy API versions. The stable version of the API types live in `api/types/*.go`. + +Consider moving a type here when you need to keep backwards compatibility in the API. This legacy types are organized by the latest API version they appear in. For instance, types in the `v1p19` package are valid for API versions below or equal `1.19`. Types in the `v1p20` package are valid for the API version `1.20`, since the versions below that will use the legacy types in `v1p19`. + +## Package name conventions + +The package name convention is to use `v` as a prefix for the version number and `p`(patch) as a separator. We use this nomenclature due to a few restrictions in the Go package name convention: + +1. We cannot use `.` because it's interpreted by the language, think of `v1.20.CallFunction`. +2. We cannot use `_` because golint complains about it. The code is actually valid, but it looks probably more weird: `v1_20.CallFunction`. + +For instance, if you want to modify a type that was available in the version `1.21` of the API but it will have different fields in the version `1.22`, you want to create a new package under `api/types/versions/v1p21`. diff --git a/vendor/github.com/docker/docker/api/types/versions/compare.go b/vendor/github.com/docker/docker/api/types/versions/compare.go new file mode 100644 index 000000000..621725a36 --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/versions/compare.go @@ -0,0 +1,65 @@ +package versions // import "github.com/docker/docker/api/types/versions" + +import ( + "strconv" + "strings" +) + +// compare compares two version strings +// returns -1 if v1 < v2, 1 if v1 > v2, 0 otherwise. +func compare(v1, v2 string) int { + if v1 == v2 { + return 0 + } + var ( + currTab = strings.Split(v1, ".") + otherTab = strings.Split(v2, ".") + ) + + maxVer := len(currTab) + if len(otherTab) > maxVer { + maxVer = len(otherTab) + } + for i := 0; i < maxVer; i++ { + var currInt, otherInt int + + if len(currTab) > i { + currInt, _ = strconv.Atoi(currTab[i]) + } + if len(otherTab) > i { + otherInt, _ = strconv.Atoi(otherTab[i]) + } + if currInt > otherInt { + return 1 + } + if otherInt > currInt { + return -1 + } + } + return 0 +} + +// LessThan checks if a version is less than another +func LessThan(v, other string) bool { + return compare(v, other) == -1 +} + +// LessThanOrEqualTo checks if a version is less than or equal to another +func LessThanOrEqualTo(v, other string) bool { + return compare(v, other) <= 0 +} + +// GreaterThan checks if a version is greater than another +func GreaterThan(v, other string) bool { + return compare(v, other) == 1 +} + +// GreaterThanOrEqualTo checks if a version is greater than or equal to another +func GreaterThanOrEqualTo(v, other string) bool { + return compare(v, other) >= 0 +} + +// Equal checks if a version is equal to another +func Equal(v, other string) bool { + return compare(v, other) == 0 +} diff --git a/vendor/github.com/docker/docker/errdefs/defs.go b/vendor/github.com/docker/docker/errdefs/defs.go new file mode 100644 index 000000000..a5523c3e9 --- /dev/null +++ b/vendor/github.com/docker/docker/errdefs/defs.go @@ -0,0 +1,69 @@ +package errdefs + +// ErrNotFound signals that the requested object doesn't exist +type ErrNotFound interface { + NotFound() +} + +// ErrInvalidParameter signals that the user input is invalid +type ErrInvalidParameter interface { + InvalidParameter() +} + +// ErrConflict signals that some internal state conflicts with the requested action and can't be performed. +// A change in state should be able to clear this error. +type ErrConflict interface { + Conflict() +} + +// ErrUnauthorized is used to signify that the user is not authorized to perform a specific action +type ErrUnauthorized interface { + Unauthorized() +} + +// ErrUnavailable signals that the requested action/subsystem is not available. +type ErrUnavailable interface { + Unavailable() +} + +// ErrForbidden signals that the requested action cannot be performed under any circumstances. +// When a ErrForbidden is returned, the caller should never retry the action. +type ErrForbidden interface { + Forbidden() +} + +// ErrSystem signals that some internal error occurred. +// An example of this would be a failed mount request. +type ErrSystem interface { + System() +} + +// ErrNotModified signals that an action can't be performed because it's already in the desired state +type ErrNotModified interface { + NotModified() +} + +// ErrNotImplemented signals that the requested action/feature is not implemented on the system as configured. +type ErrNotImplemented interface { + NotImplemented() +} + +// ErrUnknown signals that the kind of error that occurred is not known. +type ErrUnknown interface { + Unknown() +} + +// ErrCancelled signals that the action was cancelled. +type ErrCancelled interface { + Cancelled() +} + +// ErrDeadline signals that the deadline was reached before the action completed. +type ErrDeadline interface { + DeadlineExceeded() +} + +// ErrDataLoss indicates that data was lost or there is data corruption. +type ErrDataLoss interface { + DataLoss() +} diff --git a/vendor/github.com/docker/docker/errdefs/doc.go b/vendor/github.com/docker/docker/errdefs/doc.go new file mode 100644 index 000000000..c211f174f --- /dev/null +++ b/vendor/github.com/docker/docker/errdefs/doc.go @@ -0,0 +1,8 @@ +// Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. +// Errors that cross the package boundary should implement one (and only one) of these interfaces. +// +// Packages should not reference these interfaces directly, only implement them. +// To check if a particular error implements one of these interfaces, there are helper +// functions provided (e.g. `Is`) which can be used rather than asserting the interfaces directly. +// If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`). +package errdefs // import "github.com/docker/docker/errdefs" diff --git a/vendor/github.com/docker/docker/errdefs/helpers.go b/vendor/github.com/docker/docker/errdefs/helpers.go new file mode 100644 index 000000000..042de4b7b --- /dev/null +++ b/vendor/github.com/docker/docker/errdefs/helpers.go @@ -0,0 +1,279 @@ +package errdefs + +import "context" + +type errNotFound struct{ error } + +func (errNotFound) NotFound() {} + +func (e errNotFound) Cause() error { + return e.error +} + +func (e errNotFound) Unwrap() error { + return e.error +} + +// NotFound is a helper to create an error of the class with the same name from any error type +func NotFound(err error) error { + if err == nil || IsNotFound(err) { + return err + } + return errNotFound{err} +} + +type errInvalidParameter struct{ error } + +func (errInvalidParameter) InvalidParameter() {} + +func (e errInvalidParameter) Cause() error { + return e.error +} + +func (e errInvalidParameter) Unwrap() error { + return e.error +} + +// InvalidParameter is a helper to create an error of the class with the same name from any error type +func InvalidParameter(err error) error { + if err == nil || IsInvalidParameter(err) { + return err + } + return errInvalidParameter{err} +} + +type errConflict struct{ error } + +func (errConflict) Conflict() {} + +func (e errConflict) Cause() error { + return e.error +} + +func (e errConflict) Unwrap() error { + return e.error +} + +// Conflict is a helper to create an error of the class with the same name from any error type +func Conflict(err error) error { + if err == nil || IsConflict(err) { + return err + } + return errConflict{err} +} + +type errUnauthorized struct{ error } + +func (errUnauthorized) Unauthorized() {} + +func (e errUnauthorized) Cause() error { + return e.error +} + +func (e errUnauthorized) Unwrap() error { + return e.error +} + +// Unauthorized is a helper to create an error of the class with the same name from any error type +func Unauthorized(err error) error { + if err == nil || IsUnauthorized(err) { + return err + } + return errUnauthorized{err} +} + +type errUnavailable struct{ error } + +func (errUnavailable) Unavailable() {} + +func (e errUnavailable) Cause() error { + return e.error +} + +func (e errUnavailable) Unwrap() error { + return e.error +} + +// Unavailable is a helper to create an error of the class with the same name from any error type +func Unavailable(err error) error { + if err == nil || IsUnavailable(err) { + return err + } + return errUnavailable{err} +} + +type errForbidden struct{ error } + +func (errForbidden) Forbidden() {} + +func (e errForbidden) Cause() error { + return e.error +} + +func (e errForbidden) Unwrap() error { + return e.error +} + +// Forbidden is a helper to create an error of the class with the same name from any error type +func Forbidden(err error) error { + if err == nil || IsForbidden(err) { + return err + } + return errForbidden{err} +} + +type errSystem struct{ error } + +func (errSystem) System() {} + +func (e errSystem) Cause() error { + return e.error +} + +func (e errSystem) Unwrap() error { + return e.error +} + +// System is a helper to create an error of the class with the same name from any error type +func System(err error) error { + if err == nil || IsSystem(err) { + return err + } + return errSystem{err} +} + +type errNotModified struct{ error } + +func (errNotModified) NotModified() {} + +func (e errNotModified) Cause() error { + return e.error +} + +func (e errNotModified) Unwrap() error { + return e.error +} + +// NotModified is a helper to create an error of the class with the same name from any error type +func NotModified(err error) error { + if err == nil || IsNotModified(err) { + return err + } + return errNotModified{err} +} + +type errNotImplemented struct{ error } + +func (errNotImplemented) NotImplemented() {} + +func (e errNotImplemented) Cause() error { + return e.error +} + +func (e errNotImplemented) Unwrap() error { + return e.error +} + +// NotImplemented is a helper to create an error of the class with the same name from any error type +func NotImplemented(err error) error { + if err == nil || IsNotImplemented(err) { + return err + } + return errNotImplemented{err} +} + +type errUnknown struct{ error } + +func (errUnknown) Unknown() {} + +func (e errUnknown) Cause() error { + return e.error +} + +func (e errUnknown) Unwrap() error { + return e.error +} + +// Unknown is a helper to create an error of the class with the same name from any error type +func Unknown(err error) error { + if err == nil || IsUnknown(err) { + return err + } + return errUnknown{err} +} + +type errCancelled struct{ error } + +func (errCancelled) Cancelled() {} + +func (e errCancelled) Cause() error { + return e.error +} + +func (e errCancelled) Unwrap() error { + return e.error +} + +// Cancelled is a helper to create an error of the class with the same name from any error type +func Cancelled(err error) error { + if err == nil || IsCancelled(err) { + return err + } + return errCancelled{err} +} + +type errDeadline struct{ error } + +func (errDeadline) DeadlineExceeded() {} + +func (e errDeadline) Cause() error { + return e.error +} + +func (e errDeadline) Unwrap() error { + return e.error +} + +// Deadline is a helper to create an error of the class with the same name from any error type +func Deadline(err error) error { + if err == nil || IsDeadline(err) { + return err + } + return errDeadline{err} +} + +type errDataLoss struct{ error } + +func (errDataLoss) DataLoss() {} + +func (e errDataLoss) Cause() error { + return e.error +} + +func (e errDataLoss) Unwrap() error { + return e.error +} + +// DataLoss is a helper to create an error of the class with the same name from any error type +func DataLoss(err error) error { + if err == nil || IsDataLoss(err) { + return err + } + return errDataLoss{err} +} + +// FromContext returns the error class from the passed in context +func FromContext(ctx context.Context) error { + e := ctx.Err() + if e == nil { + return nil + } + + if e == context.Canceled { + return Cancelled(e) + } + if e == context.DeadlineExceeded { + return Deadline(e) + } + return Unknown(e) +} diff --git a/vendor/github.com/docker/docker/errdefs/http_helpers.go b/vendor/github.com/docker/docker/errdefs/http_helpers.go new file mode 100644 index 000000000..ebcd78930 --- /dev/null +++ b/vendor/github.com/docker/docker/errdefs/http_helpers.go @@ -0,0 +1,46 @@ +package errdefs + +import ( + "net/http" +) + +// FromStatusCode creates an errdef error, based on the provided HTTP status-code +func FromStatusCode(err error, statusCode int) error { + if err == nil { + return nil + } + switch statusCode { + case http.StatusNotFound: + err = NotFound(err) + case http.StatusBadRequest: + err = InvalidParameter(err) + case http.StatusConflict: + err = Conflict(err) + case http.StatusUnauthorized: + err = Unauthorized(err) + case http.StatusServiceUnavailable: + err = Unavailable(err) + case http.StatusForbidden: + err = Forbidden(err) + case http.StatusNotModified: + err = NotModified(err) + case http.StatusNotImplemented: + err = NotImplemented(err) + case http.StatusInternalServerError: + if !IsSystem(err) && !IsUnknown(err) && !IsDataLoss(err) && !IsDeadline(err) && !IsCancelled(err) { + err = System(err) + } + default: + switch { + case statusCode >= 200 && statusCode < 400: + // it's a client error + case statusCode >= 400 && statusCode < 500: + err = InvalidParameter(err) + case statusCode >= 500 && statusCode < 600: + err = System(err) + default: + err = Unknown(err) + } + } + return err +} diff --git a/vendor/github.com/docker/docker/errdefs/is.go b/vendor/github.com/docker/docker/errdefs/is.go new file mode 100644 index 000000000..f94034cbd --- /dev/null +++ b/vendor/github.com/docker/docker/errdefs/is.go @@ -0,0 +1,123 @@ +package errdefs + +import ( + "context" + "errors" +) + +type causer interface { + Cause() error +} + +type wrapErr interface { + Unwrap() error +} + +func getImplementer(err error) error { + switch e := err.(type) { + case + ErrNotFound, + ErrInvalidParameter, + ErrConflict, + ErrUnauthorized, + ErrUnavailable, + ErrForbidden, + ErrSystem, + ErrNotModified, + ErrNotImplemented, + ErrCancelled, + ErrDeadline, + ErrDataLoss, + ErrUnknown: + return err + case causer: + return getImplementer(e.Cause()) + case wrapErr: + return getImplementer(e.Unwrap()) + default: + return err + } +} + +// IsNotFound returns if the passed in error is an ErrNotFound +func IsNotFound(err error) bool { + _, ok := getImplementer(err).(ErrNotFound) + return ok +} + +// IsInvalidParameter returns if the passed in error is an ErrInvalidParameter +func IsInvalidParameter(err error) bool { + _, ok := getImplementer(err).(ErrInvalidParameter) + return ok +} + +// IsConflict returns if the passed in error is an ErrConflict +func IsConflict(err error) bool { + _, ok := getImplementer(err).(ErrConflict) + return ok +} + +// IsUnauthorized returns if the passed in error is an ErrUnauthorized +func IsUnauthorized(err error) bool { + _, ok := getImplementer(err).(ErrUnauthorized) + return ok +} + +// IsUnavailable returns if the passed in error is an ErrUnavailable +func IsUnavailable(err error) bool { + _, ok := getImplementer(err).(ErrUnavailable) + return ok +} + +// IsForbidden returns if the passed in error is an ErrForbidden +func IsForbidden(err error) bool { + _, ok := getImplementer(err).(ErrForbidden) + return ok +} + +// IsSystem returns if the passed in error is an ErrSystem +func IsSystem(err error) bool { + _, ok := getImplementer(err).(ErrSystem) + return ok +} + +// IsNotModified returns if the passed in error is a NotModified error +func IsNotModified(err error) bool { + _, ok := getImplementer(err).(ErrNotModified) + return ok +} + +// IsNotImplemented returns if the passed in error is an ErrNotImplemented +func IsNotImplemented(err error) bool { + _, ok := getImplementer(err).(ErrNotImplemented) + return ok +} + +// IsUnknown returns if the passed in error is an ErrUnknown +func IsUnknown(err error) bool { + _, ok := getImplementer(err).(ErrUnknown) + return ok +} + +// IsCancelled returns if the passed in error is an ErrCancelled +func IsCancelled(err error) bool { + _, ok := getImplementer(err).(ErrCancelled) + return ok +} + +// IsDeadline returns if the passed in error is an ErrDeadline +func IsDeadline(err error) bool { + _, ok := getImplementer(err).(ErrDeadline) + return ok +} + +// IsDataLoss returns if the passed in error is an ErrDataLoss +func IsDataLoss(err error) bool { + _, ok := getImplementer(err).(ErrDataLoss) + return ok +} + +// IsContext returns if the passed in error is due to context cancellation or deadline exceeded. +func IsContext(err error) bool { + return errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir.go b/vendor/github.com/docker/docker/pkg/homedir/homedir.go new file mode 100644 index 000000000..590683206 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir.go @@ -0,0 +1,44 @@ +package homedir + +import ( + "os" + "os/user" + "runtime" +) + +// Key returns the env var name for the user's home dir based on +// the platform being run on. +// +// Deprecated: this function is no longer used, and will be removed in the next release. +func Key() string { + return envKeyName +} + +// Get returns the home directory of the current user with the help of +// environment variables depending on the target operating system. +// Returned path should be used with "path/filepath" to form new paths. +// +// On non-Windows platforms, it falls back to nss lookups, if the home +// directory cannot be obtained from environment-variables. +// +// If linking statically with cgo enabled against glibc, ensure the +// osusergo build tag is used. +// +// If needing to do nss lookups, do not disable cgo or set osusergo. +func Get() string { + home, _ := os.UserHomeDir() + if home == "" && runtime.GOOS != "windows" { + if u, err := user.Current(); err == nil { + return u.HomeDir + } + } + return home +} + +// GetShortcutString returns the string that is shortcut to user's home directory +// in the native shell of the platform running on. +// +// Deprecated: this function is no longer used, and will be removed in the next release. +func GetShortcutString() string { + return homeShortCut +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go new file mode 100644 index 000000000..ded1c7c8c --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go @@ -0,0 +1,105 @@ +package homedir // import "github.com/docker/docker/pkg/homedir" + +import ( + "errors" + "os" + "path/filepath" + "strings" +) + +// GetRuntimeDir returns XDG_RUNTIME_DIR. +// XDG_RUNTIME_DIR is typically configured via pam_systemd. +// GetRuntimeDir returns non-nil error if XDG_RUNTIME_DIR is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetRuntimeDir() (string, error) { + if xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); xdgRuntimeDir != "" { + return xdgRuntimeDir, nil + } + return "", errors.New("could not get XDG_RUNTIME_DIR") +} + +// StickRuntimeDirContents sets the sticky bit on files that are under +// XDG_RUNTIME_DIR, so that the files won't be periodically removed by the system. +// +// StickyRuntimeDir returns slice of sticked files. +// StickyRuntimeDir returns nil error if XDG_RUNTIME_DIR is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func StickRuntimeDirContents(files []string) ([]string, error) { + runtimeDir, err := GetRuntimeDir() + if err != nil { + // ignore error if runtimeDir is empty + return nil, nil + } + runtimeDir, err = filepath.Abs(runtimeDir) + if err != nil { + return nil, err + } + var sticked []string + for _, f := range files { + f, err = filepath.Abs(f) + if err != nil { + return sticked, err + } + if strings.HasPrefix(f, runtimeDir+"/") { + if err = stick(f); err != nil { + return sticked, err + } + sticked = append(sticked, f) + } + } + return sticked, nil +} + +func stick(f string) error { + st, err := os.Stat(f) + if err != nil { + return err + } + m := st.Mode() + m |= os.ModeSticky + return os.Chmod(f, m) +} + +// GetDataHome returns XDG_DATA_HOME. +// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set. +// If HOME and XDG_DATA_HOME are not set, getpwent(3) is consulted to determine the users home directory. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetDataHome() (string, error) { + if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" { + return xdgDataHome, nil + } + home := Get() + if home == "" { + return "", errors.New("could not get either XDG_DATA_HOME or HOME") + } + return filepath.Join(home, ".local", "share"), nil +} + +// GetConfigHome returns XDG_CONFIG_HOME. +// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set. +// If HOME and XDG_CONFIG_HOME are not set, getpwent(3) is consulted to determine the users home directory. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetConfigHome() (string, error) { + if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" { + return xdgConfigHome, nil + } + home := Get() + if home == "" { + return "", errors.New("could not get either XDG_CONFIG_HOME or HOME") + } + return filepath.Join(home, ".config"), nil +} + +// GetLibHome returns $HOME/.local/lib +// If HOME is not set, getpwent(3) is consulted to determine the users home directory. +func GetLibHome() (string, error) { + home := Get() + if home == "" { + return "", errors.New("could not get HOME") + } + return filepath.Join(home, ".local/lib"), nil +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go new file mode 100644 index 000000000..4eeb26b5d --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go @@ -0,0 +1,32 @@ +//go:build !linux + +package homedir // import "github.com/docker/docker/pkg/homedir" + +import ( + "errors" +) + +// GetRuntimeDir is unsupported on non-linux system. +func GetRuntimeDir() (string, error) { + return "", errors.New("homedir.GetRuntimeDir() is not supported on this system") +} + +// StickRuntimeDirContents is unsupported on non-linux system. +func StickRuntimeDirContents(files []string) ([]string, error) { + return nil, errors.New("homedir.StickRuntimeDirContents() is not supported on this system") +} + +// GetDataHome is unsupported on non-linux system. +func GetDataHome() (string, error) { + return "", errors.New("homedir.GetDataHome() is not supported on this system") +} + +// GetConfigHome is unsupported on non-linux system. +func GetConfigHome() (string, error) { + return "", errors.New("homedir.GetConfigHome() is not supported on this system") +} + +// GetLibHome is unsupported on non-linux system. +func GetLibHome() (string, error) { + return "", errors.New("homedir.GetLibHome() is not supported on this system") +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go new file mode 100644 index 000000000..feae4d736 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go @@ -0,0 +1,8 @@ +//go:build !windows + +package homedir // import "github.com/docker/docker/pkg/homedir" + +const ( + envKeyName = "HOME" + homeShortCut = "~" +) diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go new file mode 100644 index 000000000..37f4ee670 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go @@ -0,0 +1,6 @@ +package homedir // import "github.com/docker/docker/pkg/homedir" + +const ( + envKeyName = "USERPROFILE" + homeShortCut = "%USERPROFILE%" // be careful while using in format functions +) diff --git a/vendor/github.com/docker/docker/pkg/ioutils/buffer.go b/vendor/github.com/docker/docker/pkg/ioutils/buffer.go new file mode 100644 index 000000000..466f79294 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/ioutils/buffer.go @@ -0,0 +1,51 @@ +package ioutils // import "github.com/docker/docker/pkg/ioutils" + +import ( + "errors" + "io" +) + +var errBufferFull = errors.New("buffer is full") + +type fixedBuffer struct { + buf []byte + pos int + lastRead int +} + +func (b *fixedBuffer) Write(p []byte) (int, error) { + n := copy(b.buf[b.pos:cap(b.buf)], p) + b.pos += n + + if n < len(p) { + if b.pos == cap(b.buf) { + return n, errBufferFull + } + return n, io.ErrShortWrite + } + return n, nil +} + +func (b *fixedBuffer) Read(p []byte) (int, error) { + n := copy(p, b.buf[b.lastRead:b.pos]) + b.lastRead += n + return n, nil +} + +func (b *fixedBuffer) Len() int { + return b.pos - b.lastRead +} + +func (b *fixedBuffer) Cap() int { + return cap(b.buf) +} + +func (b *fixedBuffer) Reset() { + b.pos = 0 + b.lastRead = 0 + b.buf = b.buf[:0] +} + +func (b *fixedBuffer) String() string { + return string(b.buf[b.lastRead:b.pos]) +} diff --git a/vendor/github.com/docker/docker/pkg/ioutils/bytespipe.go b/vendor/github.com/docker/docker/pkg/ioutils/bytespipe.go new file mode 100644 index 000000000..c1cfa62fd --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/ioutils/bytespipe.go @@ -0,0 +1,187 @@ +package ioutils // import "github.com/docker/docker/pkg/ioutils" + +import ( + "errors" + "io" + "sync" +) + +// maxCap is the highest capacity to use in byte slices that buffer data. +const maxCap = 1e6 + +// minCap is the lowest capacity to use in byte slices that buffer data +const minCap = 64 + +// blockThreshold is the minimum number of bytes in the buffer which will cause +// a write to BytesPipe to block when allocating a new slice. +const blockThreshold = 1e6 + +var ( + // ErrClosed is returned when Write is called on a closed BytesPipe. + ErrClosed = errors.New("write to closed BytesPipe") + + bufPools = make(map[int]*sync.Pool) + bufPoolsLock sync.Mutex +) + +// BytesPipe is io.ReadWriteCloser which works similarly to pipe(queue). +// All written data may be read at most once. Also, BytesPipe allocates +// and releases new byte slices to adjust to current needs, so the buffer +// won't be overgrown after peak loads. +type BytesPipe struct { + mu sync.Mutex + wait *sync.Cond + buf []*fixedBuffer + bufLen int + closeErr error // error to return from next Read. set to nil if not closed. + readBlock bool // check read BytesPipe is Wait() or not +} + +// NewBytesPipe creates new BytesPipe, initialized by specified slice. +// If buf is nil, then it will be initialized with slice which cap is 64. +// buf will be adjusted in a way that len(buf) == 0, cap(buf) == cap(buf). +func NewBytesPipe() *BytesPipe { + bp := &BytesPipe{} + bp.buf = append(bp.buf, getBuffer(minCap)) + bp.wait = sync.NewCond(&bp.mu) + return bp +} + +// Write writes p to BytesPipe. +// It can allocate new []byte slices in a process of writing. +func (bp *BytesPipe) Write(p []byte) (int, error) { + bp.mu.Lock() + defer bp.mu.Unlock() + + written := 0 +loop0: + for { + if bp.closeErr != nil { + return written, ErrClosed + } + + if len(bp.buf) == 0 { + bp.buf = append(bp.buf, getBuffer(64)) + } + // get the last buffer + b := bp.buf[len(bp.buf)-1] + + n, err := b.Write(p) + written += n + bp.bufLen += n + + // errBufferFull is an error we expect to get if the buffer is full + if err != nil && err != errBufferFull { + bp.wait.Broadcast() + return written, err + } + + // if there was enough room to write all then break + if len(p) == n { + break + } + + // more data: write to the next slice + p = p[n:] + + // make sure the buffer doesn't grow too big from this write + for bp.bufLen >= blockThreshold { + if bp.readBlock { + bp.wait.Broadcast() + } + bp.wait.Wait() + if bp.closeErr != nil { + continue loop0 + } + } + + // add new byte slice to the buffers slice and continue writing + nextCap := b.Cap() * 2 + if nextCap > maxCap { + nextCap = maxCap + } + bp.buf = append(bp.buf, getBuffer(nextCap)) + } + bp.wait.Broadcast() + return written, nil +} + +// CloseWithError causes further reads from a BytesPipe to return immediately. +func (bp *BytesPipe) CloseWithError(err error) error { + bp.mu.Lock() + if err != nil { + bp.closeErr = err + } else { + bp.closeErr = io.EOF + } + bp.wait.Broadcast() + bp.mu.Unlock() + return nil +} + +// Close causes further reads from a BytesPipe to return immediately. +func (bp *BytesPipe) Close() error { + return bp.CloseWithError(nil) +} + +// Read reads bytes from BytesPipe. +// Data could be read only once. +func (bp *BytesPipe) Read(p []byte) (n int, err error) { + bp.mu.Lock() + defer bp.mu.Unlock() + if bp.bufLen == 0 { + if bp.closeErr != nil { + return 0, bp.closeErr + } + bp.readBlock = true + bp.wait.Wait() + bp.readBlock = false + if bp.bufLen == 0 && bp.closeErr != nil { + return 0, bp.closeErr + } + } + + for bp.bufLen > 0 { + b := bp.buf[0] + read, _ := b.Read(p) // ignore error since fixedBuffer doesn't really return an error + n += read + bp.bufLen -= read + + if b.Len() == 0 { + // it's empty so return it to the pool and move to the next one + returnBuffer(b) + bp.buf[0] = nil + bp.buf = bp.buf[1:] + } + + if len(p) == read { + break + } + + p = p[read:] + } + + bp.wait.Broadcast() + return +} + +func returnBuffer(b *fixedBuffer) { + b.Reset() + bufPoolsLock.Lock() + pool := bufPools[b.Cap()] + bufPoolsLock.Unlock() + if pool != nil { + pool.Put(b) + } +} + +func getBuffer(size int) *fixedBuffer { + bufPoolsLock.Lock() + pool, ok := bufPools[size] + if !ok { + pool = &sync.Pool{New: func() interface{} { return &fixedBuffer{buf: make([]byte, 0, size)} }} + bufPools[size] = pool + } + bufPoolsLock.Unlock() + return pool.Get().(*fixedBuffer) +} diff --git a/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go b/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go new file mode 100644 index 000000000..82671d8cd --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go @@ -0,0 +1,161 @@ +package ioutils // import "github.com/docker/docker/pkg/ioutils" + +import ( + "io" + "os" + "path/filepath" +) + +// NewAtomicFileWriter returns WriteCloser so that writing to it writes to a +// temporary file and closing it atomically changes the temporary file to +// destination path. Writing and closing concurrently is not allowed. +func NewAtomicFileWriter(filename string, perm os.FileMode) (io.WriteCloser, error) { + f, err := os.CreateTemp(filepath.Dir(filename), ".tmp-"+filepath.Base(filename)) + if err != nil { + return nil, err + } + + abspath, err := filepath.Abs(filename) + if err != nil { + return nil, err + } + return &atomicFileWriter{ + f: f, + fn: abspath, + perm: perm, + }, nil +} + +// AtomicWriteFile atomically writes data to a file named by filename. +func AtomicWriteFile(filename string, data []byte, perm os.FileMode) error { + f, err := NewAtomicFileWriter(filename, perm) + if err != nil { + return err + } + n, err := f.Write(data) + if err == nil && n < len(data) { + err = io.ErrShortWrite + f.(*atomicFileWriter).writeErr = err + } + if err1 := f.Close(); err == nil { + err = err1 + } + return err +} + +type atomicFileWriter struct { + f *os.File + fn string + writeErr error + perm os.FileMode +} + +func (w *atomicFileWriter) Write(dt []byte) (int, error) { + n, err := w.f.Write(dt) + if err != nil { + w.writeErr = err + } + return n, err +} + +func (w *atomicFileWriter) Close() (retErr error) { + defer func() { + if retErr != nil || w.writeErr != nil { + os.Remove(w.f.Name()) + } + }() + if err := w.f.Sync(); err != nil { + w.f.Close() + return err + } + if err := w.f.Close(); err != nil { + return err + } + if err := os.Chmod(w.f.Name(), w.perm); err != nil { + return err + } + if w.writeErr == nil { + return os.Rename(w.f.Name(), w.fn) + } + return nil +} + +// AtomicWriteSet is used to atomically write a set +// of files and ensure they are visible at the same time. +// Must be committed to a new directory. +type AtomicWriteSet struct { + root string +} + +// NewAtomicWriteSet creates a new atomic write set to +// atomically create a set of files. The given directory +// is used as the base directory for storing files before +// commit. If no temporary directory is given the system +// default is used. +func NewAtomicWriteSet(tmpDir string) (*AtomicWriteSet, error) { + td, err := os.MkdirTemp(tmpDir, "write-set-") + if err != nil { + return nil, err + } + + return &AtomicWriteSet{ + root: td, + }, nil +} + +// WriteFile writes a file to the set, guaranteeing the file +// has been synced. +func (ws *AtomicWriteSet) WriteFile(filename string, data []byte, perm os.FileMode) error { + f, err := ws.FileWriter(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) + if err != nil { + return err + } + n, err := f.Write(data) + if err == nil && n < len(data) { + err = io.ErrShortWrite + } + if err1 := f.Close(); err == nil { + err = err1 + } + return err +} + +type syncFileCloser struct { + *os.File +} + +func (w syncFileCloser) Close() error { + err := w.File.Sync() + if err1 := w.File.Close(); err == nil { + err = err1 + } + return err +} + +// FileWriter opens a file writer inside the set. The file +// should be synced and closed before calling commit. +func (ws *AtomicWriteSet) FileWriter(name string, flag int, perm os.FileMode) (io.WriteCloser, error) { + f, err := os.OpenFile(filepath.Join(ws.root, name), flag, perm) + if err != nil { + return nil, err + } + return syncFileCloser{f}, nil +} + +// Cancel cancels the set and removes all temporary data +// created in the set. +func (ws *AtomicWriteSet) Cancel() error { + return os.RemoveAll(ws.root) +} + +// Commit moves all created files to the target directory. The +// target directory must not exist and the parent of the target +// directory must exist. +func (ws *AtomicWriteSet) Commit(target string) error { + return os.Rename(ws.root, target) +} + +// String returns the location the set is writing to. +func (ws *AtomicWriteSet) String() string { + return ws.root +} diff --git a/vendor/github.com/docker/docker/pkg/ioutils/readers.go b/vendor/github.com/docker/docker/pkg/ioutils/readers.go new file mode 100644 index 000000000..e03d3fee7 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/ioutils/readers.go @@ -0,0 +1,172 @@ +package ioutils // import "github.com/docker/docker/pkg/ioutils" + +import ( + "context" + "io" + "runtime/debug" + "sync/atomic" + + // make sure crypto.SHA256, crypto.sha512 and crypto.SHA384 are registered + // TODO remove once https://github.com/opencontainers/go-digest/pull/64 is merged. + _ "crypto/sha256" + _ "crypto/sha512" + + "github.com/containerd/log" +) + +// ReadCloserWrapper wraps an io.Reader, and implements an io.ReadCloser +// It calls the given callback function when closed. It should be constructed +// with NewReadCloserWrapper +type ReadCloserWrapper struct { + io.Reader + closer func() error + closed atomic.Bool +} + +// Close calls back the passed closer function +func (r *ReadCloserWrapper) Close() error { + if !r.closed.CompareAndSwap(false, true) { + subsequentCloseWarn("ReadCloserWrapper") + return nil + } + return r.closer() +} + +// NewReadCloserWrapper returns a new io.ReadCloser. +func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser { + return &ReadCloserWrapper{ + Reader: r, + closer: closer, + } +} + +type readerErrWrapper struct { + reader io.Reader + closer func() +} + +func (r *readerErrWrapper) Read(p []byte) (int, error) { + n, err := r.reader.Read(p) + if err != nil { + r.closer() + } + return n, err +} + +// NewReaderErrWrapper returns a new io.Reader. +func NewReaderErrWrapper(r io.Reader, closer func()) io.Reader { + return &readerErrWrapper{ + reader: r, + closer: closer, + } +} + +// OnEOFReader wraps an io.ReadCloser and a function +// the function will run at the end of file or close the file. +type OnEOFReader struct { + Rc io.ReadCloser + Fn func() +} + +func (r *OnEOFReader) Read(p []byte) (n int, err error) { + n, err = r.Rc.Read(p) + if err == io.EOF { + r.runFunc() + } + return +} + +// Close closes the file and run the function. +func (r *OnEOFReader) Close() error { + err := r.Rc.Close() + r.runFunc() + return err +} + +func (r *OnEOFReader) runFunc() { + if fn := r.Fn; fn != nil { + fn() + r.Fn = nil + } +} + +// cancelReadCloser wraps an io.ReadCloser with a context for cancelling read +// operations. +type cancelReadCloser struct { + cancel func() + pR *io.PipeReader // Stream to read from + pW *io.PipeWriter + closed atomic.Bool +} + +// NewCancelReadCloser creates a wrapper that closes the ReadCloser when the +// context is cancelled. The returned io.ReadCloser must be closed when it is +// no longer needed. +func NewCancelReadCloser(ctx context.Context, in io.ReadCloser) io.ReadCloser { + pR, pW := io.Pipe() + + // Create a context used to signal when the pipe is closed + doneCtx, cancel := context.WithCancel(context.Background()) + + p := &cancelReadCloser{ + cancel: cancel, + pR: pR, + pW: pW, + } + + go func() { + _, err := io.Copy(pW, in) + select { + case <-ctx.Done(): + // If the context was closed, p.closeWithError + // was already called. Calling it again would + // change the error that Read returns. + default: + p.closeWithError(err) + } + in.Close() + }() + go func() { + for { + select { + case <-ctx.Done(): + p.closeWithError(ctx.Err()) + case <-doneCtx.Done(): + return + } + } + }() + + return p +} + +// Read wraps the Read method of the pipe that provides data from the wrapped +// ReadCloser. +func (p *cancelReadCloser) Read(buf []byte) (n int, err error) { + return p.pR.Read(buf) +} + +// closeWithError closes the wrapper and its underlying reader. It will +// cause future calls to Read to return err. +func (p *cancelReadCloser) closeWithError(err error) { + p.pW.CloseWithError(err) + p.cancel() +} + +// Close closes the wrapper its underlying reader. It will cause +// future calls to Read to return io.EOF. +func (p *cancelReadCloser) Close() error { + if !p.closed.CompareAndSwap(false, true) { + subsequentCloseWarn("cancelReadCloser") + return nil + } + p.closeWithError(io.EOF) + return nil +} + +func subsequentCloseWarn(name string) { + log.G(context.TODO()).Error("subsequent attempt to close " + name) + if log.GetLevel() >= log.DebugLevel { + log.G(context.TODO()).Errorf("stack trace: %s", string(debug.Stack())) + } +} diff --git a/vendor/github.com/docker/docker/pkg/ioutils/writeflusher.go b/vendor/github.com/docker/docker/pkg/ioutils/writeflusher.go new file mode 100644 index 000000000..91b8d1826 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/ioutils/writeflusher.go @@ -0,0 +1,92 @@ +package ioutils // import "github.com/docker/docker/pkg/ioutils" + +import ( + "io" + "sync" +) + +// WriteFlusher wraps the Write and Flush operation ensuring that every write +// is a flush. In addition, the Close method can be called to intercept +// Read/Write calls if the targets lifecycle has already ended. +type WriteFlusher struct { + w io.Writer + flusher flusher + flushed chan struct{} + flushedOnce sync.Once + closed chan struct{} + closeLock sync.Mutex +} + +type flusher interface { + Flush() +} + +var errWriteFlusherClosed = io.EOF + +func (wf *WriteFlusher) Write(b []byte) (n int, err error) { + select { + case <-wf.closed: + return 0, errWriteFlusherClosed + default: + } + + n, err = wf.w.Write(b) + wf.Flush() // every write is a flush. + return n, err +} + +// Flush the stream immediately. +func (wf *WriteFlusher) Flush() { + select { + case <-wf.closed: + return + default: + } + + wf.flushedOnce.Do(func() { + close(wf.flushed) + }) + wf.flusher.Flush() +} + +// Flushed returns the state of flushed. +// If it's flushed, return true, or else it return false. +func (wf *WriteFlusher) Flushed() bool { + // BUG(stevvooe): Remove this method. Its use is inherently racy. Seems to + // be used to detect whether or a response code has been issued or not. + // Another hook should be used instead. + var flushed bool + select { + case <-wf.flushed: + flushed = true + default: + } + return flushed +} + +// Close closes the write flusher, disallowing any further writes to the +// target. After the flusher is closed, all calls to write or flush will +// result in an error. +func (wf *WriteFlusher) Close() error { + wf.closeLock.Lock() + defer wf.closeLock.Unlock() + + select { + case <-wf.closed: + return errWriteFlusherClosed + default: + close(wf.closed) + } + return nil +} + +// NewWriteFlusher returns a new WriteFlusher. +func NewWriteFlusher(w io.Writer) *WriteFlusher { + var fl flusher + if f, ok := w.(flusher); ok { + fl = f + } else { + fl = &NopFlusher{} + } + return &WriteFlusher{w: w, flusher: fl, closed: make(chan struct{}), flushed: make(chan struct{})} +} diff --git a/vendor/github.com/docker/docker/pkg/ioutils/writers.go b/vendor/github.com/docker/docker/pkg/ioutils/writers.go new file mode 100644 index 000000000..1f50602f2 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/ioutils/writers.go @@ -0,0 +1,74 @@ +package ioutils // import "github.com/docker/docker/pkg/ioutils" + +import ( + "io" + "sync/atomic" +) + +// NopWriter represents a type which write operation is nop. +type NopWriter struct{} + +func (*NopWriter) Write(buf []byte) (int, error) { + return len(buf), nil +} + +type nopWriteCloser struct { + io.Writer +} + +func (w *nopWriteCloser) Close() error { return nil } + +// NopWriteCloser returns a nopWriteCloser. +func NopWriteCloser(w io.Writer) io.WriteCloser { + return &nopWriteCloser{w} +} + +// NopFlusher represents a type which flush operation is nop. +type NopFlusher struct{} + +// Flush is a nop operation. +func (f *NopFlusher) Flush() {} + +type writeCloserWrapper struct { + io.Writer + closer func() error + closed atomic.Bool +} + +func (r *writeCloserWrapper) Close() error { + if !r.closed.CompareAndSwap(false, true) { + subsequentCloseWarn("WriteCloserWrapper") + return nil + } + return r.closer() +} + +// NewWriteCloserWrapper returns a new io.WriteCloser. +func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser { + return &writeCloserWrapper{ + Writer: r, + closer: closer, + } +} + +// WriteCounter wraps a concrete io.Writer and hold a count of the number +// of bytes written to the writer during a "session". +// This can be convenient when write return is masked +// (e.g., json.Encoder.Encode()) +type WriteCounter struct { + Count int64 + Writer io.Writer +} + +// NewWriteCounter returns a new WriteCounter. +func NewWriteCounter(w io.Writer) *WriteCounter { + return &WriteCounter{ + Writer: w, + } +} + +func (wc *WriteCounter) Write(p []byte) (count int, err error) { + count, err = wc.Writer.Write(p) + wc.Count += int64(count) + return +} diff --git a/vendor/github.com/docker/docker/registry/auth.go b/vendor/github.com/docker/docker/registry/auth.go new file mode 100644 index 000000000..f685892c1 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/auth.go @@ -0,0 +1,199 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "context" + "net/http" + "net/url" + "strings" + "time" + + "github.com/containerd/log" + "github.com/docker/distribution/registry/client/auth" + "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/docker/api/types/registry" + "github.com/pkg/errors" +) + +// AuthClientID is used the ClientID used for the token server +const AuthClientID = "docker" + +type loginCredentialStore struct { + authConfig *registry.AuthConfig +} + +func (lcs loginCredentialStore) Basic(*url.URL) (string, string) { + return lcs.authConfig.Username, lcs.authConfig.Password +} + +func (lcs loginCredentialStore) RefreshToken(*url.URL, string) string { + return lcs.authConfig.IdentityToken +} + +func (lcs loginCredentialStore) SetRefreshToken(u *url.URL, service, token string) { + lcs.authConfig.IdentityToken = token +} + +type staticCredentialStore struct { + auth *registry.AuthConfig +} + +// NewStaticCredentialStore returns a credential store +// which always returns the same credential values. +func NewStaticCredentialStore(auth *registry.AuthConfig) auth.CredentialStore { + return staticCredentialStore{ + auth: auth, + } +} + +func (scs staticCredentialStore) Basic(*url.URL) (string, string) { + if scs.auth == nil { + return "", "" + } + return scs.auth.Username, scs.auth.Password +} + +func (scs staticCredentialStore) RefreshToken(*url.URL, string) string { + if scs.auth == nil { + return "" + } + return scs.auth.IdentityToken +} + +func (scs staticCredentialStore) SetRefreshToken(*url.URL, string, string) { +} + +// loginV2 tries to login to the v2 registry server. The given registry +// endpoint will be pinged to get authorization challenges. These challenges +// will be used to authenticate against the registry to validate credentials. +func loginV2(authConfig *registry.AuthConfig, endpoint APIEndpoint, userAgent string) (string, string, error) { + var ( + endpointStr = strings.TrimRight(endpoint.URL.String(), "/") + "/v2/" + modifiers = Headers(userAgent, nil) + authTransport = transport.NewTransport(newTransport(endpoint.TLSConfig), modifiers...) + credentialAuthConfig = *authConfig + creds = loginCredentialStore{authConfig: &credentialAuthConfig} + ) + + log.G(context.TODO()).Debugf("attempting v2 login to registry endpoint %s", endpointStr) + + loginClient, err := v2AuthHTTPClient(endpoint.URL, authTransport, modifiers, creds, nil) + if err != nil { + return "", "", err + } + + req, err := http.NewRequest(http.MethodGet, endpointStr, nil) + if err != nil { + return "", "", err + } + + resp, err := loginClient.Do(req) + if err != nil { + err = translateV2AuthError(err) + return "", "", err + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusOK { + return "Login Succeeded", credentialAuthConfig.IdentityToken, nil + } + + // TODO(dmcgowan): Attempt to further interpret result, status code and error code string + return "", "", errors.Errorf("login attempt to %s failed with status: %d %s", endpointStr, resp.StatusCode, http.StatusText(resp.StatusCode)) +} + +func v2AuthHTTPClient(endpoint *url.URL, authTransport http.RoundTripper, modifiers []transport.RequestModifier, creds auth.CredentialStore, scopes []auth.Scope) (*http.Client, error) { + challengeManager, err := PingV2Registry(endpoint, authTransport) + if err != nil { + return nil, err + } + + tokenHandlerOptions := auth.TokenHandlerOptions{ + Transport: authTransport, + Credentials: creds, + OfflineAccess: true, + ClientID: AuthClientID, + Scopes: scopes, + } + tokenHandler := auth.NewTokenHandlerWithOptions(tokenHandlerOptions) + basicHandler := auth.NewBasicHandler(creds) + modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler, basicHandler)) + + return &http.Client{ + Transport: transport.NewTransport(authTransport, modifiers...), + Timeout: 15 * time.Second, + }, nil +} + +// ConvertToHostname normalizes a registry URL which has http|https prepended +// to just its hostname. It is used to match credentials, which may be either +// stored as hostname or as hostname including scheme (in legacy configuration +// files). +func ConvertToHostname(url string) string { + stripped := url + if strings.HasPrefix(url, "http://") { + stripped = strings.TrimPrefix(url, "http://") + } else if strings.HasPrefix(url, "https://") { + stripped = strings.TrimPrefix(url, "https://") + } + return strings.SplitN(stripped, "/", 2)[0] +} + +// ResolveAuthConfig matches an auth configuration to a server address or a URL +func ResolveAuthConfig(authConfigs map[string]registry.AuthConfig, index *registry.IndexInfo) registry.AuthConfig { + configKey := GetAuthConfigKey(index) + // First try the happy case + if c, found := authConfigs[configKey]; found || index.Official { + return c + } + + // Maybe they have a legacy config file, we will iterate the keys converting + // them to the new format and testing + for registryURL, ac := range authConfigs { + if configKey == ConvertToHostname(registryURL) { + return ac + } + } + + // When all else fails, return an empty auth config + return registry.AuthConfig{} +} + +// PingResponseError is used when the response from a ping +// was received but invalid. +type PingResponseError struct { + Err error +} + +func (err PingResponseError) Error() string { + return err.Err.Error() +} + +// PingV2Registry attempts to ping a v2 registry and on success return a +// challenge manager for the supported authentication types. +// If a response is received but cannot be interpreted, a PingResponseError will be returned. +func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, error) { + pingClient := &http.Client{ + Transport: transport, + Timeout: 15 * time.Second, + } + endpointStr := strings.TrimRight(endpoint.String(), "/") + "/v2/" + req, err := http.NewRequest(http.MethodGet, endpointStr, nil) + if err != nil { + return nil, err + } + resp, err := pingClient.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + challengeManager := challenge.NewSimpleManager() + if err := challengeManager.AddResponse(resp); err != nil { + return nil, PingResponseError{ + Err: err, + } + } + + return challengeManager, nil +} diff --git a/vendor/github.com/docker/docker/registry/config.go b/vendor/github.com/docker/docker/registry/config.go new file mode 100644 index 000000000..84b0a63ad --- /dev/null +++ b/vendor/github.com/docker/docker/registry/config.go @@ -0,0 +1,437 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "context" + "net" + "net/url" + "regexp" + "strconv" + "strings" + + "github.com/containerd/log" + "github.com/distribution/reference" + "github.com/docker/docker/api/types/registry" +) + +// ServiceOptions holds command line options. +type ServiceOptions struct { + AllowNondistributableArtifacts []string `json:"allow-nondistributable-artifacts,omitempty"` + Mirrors []string `json:"registry-mirrors,omitempty"` + InsecureRegistries []string `json:"insecure-registries,omitempty"` +} + +// serviceConfig holds daemon configuration for the registry service. +type serviceConfig registry.ServiceConfig + +// TODO(thaJeztah) both the "index.docker.io" and "registry-1.docker.io" domains +// are here for historic reasons and backward-compatibility. These domains +// are still supported by Docker Hub (and will continue to be supported), but +// there are new domains already in use, and plans to consolidate all legacy +// domains to new "canonical" domains. Once those domains are decided on, we +// should update these consts (but making sure to preserve compatibility with +// existing installs, clients, and user configuration). +const ( + // DefaultNamespace is the default namespace + DefaultNamespace = "docker.io" + // DefaultRegistryHost is the hostname for the default (Docker Hub) registry + // used for pushing and pulling images. This hostname is hard-coded to handle + // the conversion from image references without registry name (e.g. "ubuntu", + // or "ubuntu:latest"), as well as references using the "docker.io" domain + // name, which is used as canonical reference for images on Docker Hub, but + // does not match the domain-name of Docker Hub's registry. + DefaultRegistryHost = "registry-1.docker.io" + // IndexHostname is the index hostname, used for authentication and image search. + IndexHostname = "index.docker.io" + // IndexServer is used for user auth and image search + IndexServer = "https://" + IndexHostname + "/v1/" + // IndexName is the name of the index + IndexName = "docker.io" +) + +var ( + // DefaultV2Registry is the URI of the default (Docker Hub) registry. + DefaultV2Registry = &url.URL{ + Scheme: "https", + Host: DefaultRegistryHost, + } + + emptyServiceConfig, _ = newServiceConfig(ServiceOptions{}) + validHostPortRegex = regexp.MustCompile(`^` + reference.DomainRegexp.String() + `$`) + + // for mocking in unit tests + lookupIP = net.LookupIP + + // certsDir is used to override defaultCertsDir. + certsDir string +) + +// SetCertsDir allows the default certs directory to be changed. This function +// is used at daemon startup to set the correct location when running in +// rootless mode. +func SetCertsDir(path string) { + certsDir = path +} + +// CertsDir is the directory where certificates are stored. +func CertsDir() string { + if certsDir != "" { + return certsDir + } + return defaultCertsDir +} + +// newServiceConfig returns a new instance of ServiceConfig +func newServiceConfig(options ServiceOptions) (*serviceConfig, error) { + config := &serviceConfig{} + if err := config.loadAllowNondistributableArtifacts(options.AllowNondistributableArtifacts); err != nil { + return nil, err + } + if err := config.loadMirrors(options.Mirrors); err != nil { + return nil, err + } + if err := config.loadInsecureRegistries(options.InsecureRegistries); err != nil { + return nil, err + } + + return config, nil +} + +// copy constructs a new ServiceConfig with a copy of the configuration in config. +func (config *serviceConfig) copy() *registry.ServiceConfig { + ic := make(map[string]*registry.IndexInfo) + for key, value := range config.IndexConfigs { + ic[key] = value + } + return ®istry.ServiceConfig{ + AllowNondistributableArtifactsCIDRs: append([]*registry.NetIPNet(nil), config.AllowNondistributableArtifactsCIDRs...), + AllowNondistributableArtifactsHostnames: append([]string(nil), config.AllowNondistributableArtifactsHostnames...), + InsecureRegistryCIDRs: append([]*registry.NetIPNet(nil), config.InsecureRegistryCIDRs...), + IndexConfigs: ic, + Mirrors: append([]string(nil), config.Mirrors...), + } +} + +// loadAllowNondistributableArtifacts loads allow-nondistributable-artifacts registries into config. +func (config *serviceConfig) loadAllowNondistributableArtifacts(registries []string) error { + cidrs := map[string]*registry.NetIPNet{} + hostnames := map[string]bool{} + + for _, r := range registries { + if _, err := ValidateIndexName(r); err != nil { + return err + } + if hasScheme(r) { + return invalidParamf("allow-nondistributable-artifacts registry %s should not contain '://'", r) + } + + if _, ipnet, err := net.ParseCIDR(r); err == nil { + // Valid CIDR. + cidrs[ipnet.String()] = (*registry.NetIPNet)(ipnet) + } else if err = validateHostPort(r); err == nil { + // Must be `host:port` if not CIDR. + hostnames[r] = true + } else { + return invalidParamWrapf(err, "allow-nondistributable-artifacts registry %s is not valid", r) + } + } + + config.AllowNondistributableArtifactsCIDRs = make([]*registry.NetIPNet, 0, len(cidrs)) + for _, c := range cidrs { + config.AllowNondistributableArtifactsCIDRs = append(config.AllowNondistributableArtifactsCIDRs, c) + } + + config.AllowNondistributableArtifactsHostnames = make([]string, 0, len(hostnames)) + for h := range hostnames { + config.AllowNondistributableArtifactsHostnames = append(config.AllowNondistributableArtifactsHostnames, h) + } + + return nil +} + +// loadMirrors loads mirrors to config, after removing duplicates. +// Returns an error if mirrors contains an invalid mirror. +func (config *serviceConfig) loadMirrors(mirrors []string) error { + mMap := map[string]struct{}{} + unique := []string{} + + for _, mirror := range mirrors { + m, err := ValidateMirror(mirror) + if err != nil { + return err + } + if _, exist := mMap[m]; !exist { + mMap[m] = struct{}{} + unique = append(unique, m) + } + } + + config.Mirrors = unique + + // Configure public registry since mirrors may have changed. + config.IndexConfigs = map[string]*registry.IndexInfo{ + IndexName: { + Name: IndexName, + Mirrors: unique, + Secure: true, + Official: true, + }, + } + + return nil +} + +// loadInsecureRegistries loads insecure registries to config +func (config *serviceConfig) loadInsecureRegistries(registries []string) error { + // Localhost is by default considered as an insecure registry. This is a + // stop-gap for people who are running a private registry on localhost. + registries = append(registries, "127.0.0.0/8") + + var ( + insecureRegistryCIDRs = make([]*registry.NetIPNet, 0) + indexConfigs = make(map[string]*registry.IndexInfo) + ) + +skip: + for _, r := range registries { + // validate insecure registry + if _, err := ValidateIndexName(r); err != nil { + return err + } + if strings.HasPrefix(strings.ToLower(r), "http://") { + log.G(context.TODO()).Warnf("insecure registry %s should not contain 'http://' and 'http://' has been removed from the insecure registry config", r) + r = r[7:] + } else if strings.HasPrefix(strings.ToLower(r), "https://") { + log.G(context.TODO()).Warnf("insecure registry %s should not contain 'https://' and 'https://' has been removed from the insecure registry config", r) + r = r[8:] + } else if hasScheme(r) { + return invalidParamf("insecure registry %s should not contain '://'", r) + } + // Check if CIDR was passed to --insecure-registry + _, ipnet, err := net.ParseCIDR(r) + if err == nil { + // Valid CIDR. If ipnet is already in config.InsecureRegistryCIDRs, skip. + data := (*registry.NetIPNet)(ipnet) + for _, value := range insecureRegistryCIDRs { + if value.IP.String() == data.IP.String() && value.Mask.String() == data.Mask.String() { + continue skip + } + } + // ipnet is not found, add it in config.InsecureRegistryCIDRs + insecureRegistryCIDRs = append(insecureRegistryCIDRs, data) + } else { + if err := validateHostPort(r); err != nil { + return invalidParamWrapf(err, "insecure registry %s is not valid", r) + } + // Assume `host:port` if not CIDR. + indexConfigs[r] = ®istry.IndexInfo{ + Name: r, + Mirrors: make([]string, 0), + Secure: false, + Official: false, + } + } + } + + // Configure public registry. + indexConfigs[IndexName] = ®istry.IndexInfo{ + Name: IndexName, + Mirrors: config.Mirrors, + Secure: true, + Official: true, + } + config.InsecureRegistryCIDRs = insecureRegistryCIDRs + config.IndexConfigs = indexConfigs + + return nil +} + +// allowNondistributableArtifacts returns true if the provided hostname is part of the list of registries +// that allow push of nondistributable artifacts. +// +// The list can contain elements with CIDR notation to specify a whole subnet. If the subnet contains an IP +// of the registry specified by hostname, true is returned. +// +// hostname should be a URL.Host (`host:port` or `host`) where the `host` part can be either a domain name +// or an IP address. If it is a domain name, then it will be resolved to IP addresses for matching. If +// resolution fails, CIDR matching is not performed. +func (config *serviceConfig) allowNondistributableArtifacts(hostname string) bool { + for _, h := range config.AllowNondistributableArtifactsHostnames { + if h == hostname { + return true + } + } + + return isCIDRMatch(config.AllowNondistributableArtifactsCIDRs, hostname) +} + +// isSecureIndex returns false if the provided indexName is part of the list of insecure registries +// Insecure registries accept HTTP and/or accept HTTPS with certificates from unknown CAs. +// +// The list of insecure registries can contain an element with CIDR notation to specify a whole subnet. +// If the subnet contains one of the IPs of the registry specified by indexName, the latter is considered +// insecure. +// +// indexName should be a URL.Host (`host:port` or `host`) where the `host` part can be either a domain name +// or an IP address. If it is a domain name, then it will be resolved in order to check if the IP is contained +// in a subnet. If the resolving is not successful, isSecureIndex will only try to match hostname to any element +// of insecureRegistries. +func (config *serviceConfig) isSecureIndex(indexName string) bool { + // Check for configured index, first. This is needed in case isSecureIndex + // is called from anything besides newIndexInfo, in order to honor per-index configurations. + if index, ok := config.IndexConfigs[indexName]; ok { + return index.Secure + } + + return !isCIDRMatch(config.InsecureRegistryCIDRs, indexName) +} + +// isCIDRMatch returns true if URLHost matches an element of cidrs. URLHost is a URL.Host (`host:port` or `host`) +// where the `host` part can be either a domain name or an IP address. If it is a domain name, then it will be +// resolved to IP addresses for matching. If resolution fails, false is returned. +func isCIDRMatch(cidrs []*registry.NetIPNet, URLHost string) bool { + host, _, err := net.SplitHostPort(URLHost) + if err != nil { + // Assume URLHost is of the form `host` without the port and go on. + host = URLHost + } + + addrs, err := lookupIP(host) + if err != nil { + ip := net.ParseIP(host) + if ip != nil { + addrs = []net.IP{ip} + } + + // if ip == nil, then `host` is neither an IP nor it could be looked up, + // either because the index is unreachable, or because the index is behind an HTTP proxy. + // So, len(addrs) == 0 and we're not aborting. + } + + // Try CIDR notation only if addrs has any elements, i.e. if `host`'s IP could be determined. + for _, addr := range addrs { + for _, ipnet := range cidrs { + // check if the addr falls in the subnet + if (*net.IPNet)(ipnet).Contains(addr) { + return true + } + } + } + + return false +} + +// ValidateMirror validates an HTTP(S) registry mirror. It is used by the daemon +// to validate the daemon configuration. +func ValidateMirror(val string) (string, error) { + uri, err := url.Parse(val) + if err != nil { + return "", invalidParamWrapf(err, "invalid mirror: %q is not a valid URI", val) + } + if uri.Scheme != "http" && uri.Scheme != "https" { + return "", invalidParamf("invalid mirror: unsupported scheme %q in %q", uri.Scheme, uri) + } + if uri.RawQuery != "" || uri.Fragment != "" { + return "", invalidParamf("invalid mirror: query or fragment at end of the URI %q", uri) + } + if uri.User != nil { + // strip password from output + uri.User = url.UserPassword(uri.User.Username(), "xxxxx") + return "", invalidParamf("invalid mirror: username/password not allowed in URI %q", uri) + } + return strings.TrimSuffix(val, "/") + "/", nil +} + +// ValidateIndexName validates an index name. It is used by the daemon to +// validate the daemon configuration. +func ValidateIndexName(val string) (string, error) { + // TODO: upstream this to check to reference package + if val == "index.docker.io" { + val = "docker.io" + } + if strings.HasPrefix(val, "-") || strings.HasSuffix(val, "-") { + return "", invalidParamf("invalid index name (%s). Cannot begin or end with a hyphen", val) + } + return val, nil +} + +func hasScheme(reposName string) bool { + return strings.Contains(reposName, "://") +} + +func validateHostPort(s string) error { + // Split host and port, and in case s can not be splitted, assume host only + host, port, err := net.SplitHostPort(s) + if err != nil { + host = s + port = "" + } + // If match against the `host:port` pattern fails, + // it might be `IPv6:port`, which will be captured by net.ParseIP(host) + if !validHostPortRegex.MatchString(s) && net.ParseIP(host) == nil { + return invalidParamf("invalid host %q", host) + } + if port != "" { + v, err := strconv.Atoi(port) + if err != nil { + return err + } + if v < 0 || v > 65535 { + return invalidParamf("invalid port %q", port) + } + } + return nil +} + +// newIndexInfo returns IndexInfo configuration from indexName +func newIndexInfo(config *serviceConfig, indexName string) (*registry.IndexInfo, error) { + var err error + indexName, err = ValidateIndexName(indexName) + if err != nil { + return nil, err + } + + // Return any configured index info, first. + if index, ok := config.IndexConfigs[indexName]; ok { + return index, nil + } + + // Construct a non-configured index info. + return ®istry.IndexInfo{ + Name: indexName, + Mirrors: make([]string, 0), + Secure: config.isSecureIndex(indexName), + Official: false, + }, nil +} + +// GetAuthConfigKey special-cases using the full index address of the official +// index as the AuthConfig key, and uses the (host)name[:port] for private indexes. +func GetAuthConfigKey(index *registry.IndexInfo) string { + if index.Official { + return IndexServer + } + return index.Name +} + +// newRepositoryInfo validates and breaks down a repository name into a RepositoryInfo +func newRepositoryInfo(config *serviceConfig, name reference.Named) (*RepositoryInfo, error) { + index, err := newIndexInfo(config, reference.Domain(name)) + if err != nil { + return nil, err + } + official := !strings.ContainsRune(reference.FamiliarName(name), '/') + + return &RepositoryInfo{ + Name: reference.TrimNamed(name), + Index: index, + Official: official, + }, nil +} + +// ParseRepositoryInfo performs the breakdown of a repository name into a +// [RepositoryInfo], but lacks registry configuration. +// +// It is used by the Docker cli to interact with registry-related endpoints. +func ParseRepositoryInfo(reposName reference.Named) (*RepositoryInfo, error) { + return newRepositoryInfo(emptyServiceConfig, reposName) +} diff --git a/vendor/github.com/docker/docker/registry/config_unix.go b/vendor/github.com/docker/docker/registry/config_unix.go new file mode 100644 index 000000000..214204930 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/config_unix.go @@ -0,0 +1,16 @@ +//go:build !windows + +package registry // import "github.com/docker/docker/registry" + +// defaultCertsDir is the platform-specific default directory where certificates +// are stored. On Linux, it may be overridden through certsDir, for example, when +// running in rootless mode. +const defaultCertsDir = "/etc/docker/certs.d" + +// cleanPath is used to ensure that a directory name is valid on the target +// platform. It will be passed in something *similar* to a URL such as +// https:/index.docker.io/v1. Not all platforms support directory names +// which contain those characters (such as : on Windows) +func cleanPath(s string) string { + return s +} diff --git a/vendor/github.com/docker/docker/registry/config_windows.go b/vendor/github.com/docker/docker/registry/config_windows.go new file mode 100644 index 000000000..2674f2818 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/config_windows.go @@ -0,0 +1,20 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "os" + "path/filepath" + "strings" +) + +// defaultCertsDir is the platform-specific default directory where certificates +// are stored. On Linux, it may be overridden through certsDir, for example, when +// running in rootless mode. +var defaultCertsDir = os.Getenv("programdata") + `\docker\certs.d` + +// cleanPath is used to ensure that a directory name is valid on the target +// platform. It will be passed in something *similar* to a URL such as +// https:\index.docker.io\v1. Not all platforms support directory names +// which contain those characters (such as : on Windows) +func cleanPath(s string) string { + return filepath.FromSlash(strings.ReplaceAll(s, ":", "")) +} diff --git a/vendor/github.com/docker/docker/registry/errors.go b/vendor/github.com/docker/docker/registry/errors.go new file mode 100644 index 000000000..7dc20ad8f --- /dev/null +++ b/vendor/github.com/docker/docker/registry/errors.go @@ -0,0 +1,36 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "net/url" + + "github.com/docker/distribution/registry/api/errcode" + "github.com/docker/docker/errdefs" + "github.com/pkg/errors" +) + +func translateV2AuthError(err error) error { + switch e := err.(type) { + case *url.Error: + switch e2 := e.Err.(type) { + case errcode.Error: + switch e2.Code { + case errcode.ErrorCodeUnauthorized: + return errdefs.Unauthorized(err) + } + } + } + + return err +} + +func invalidParam(err error) error { + return errdefs.InvalidParameter(err) +} + +func invalidParamf(format string, args ...interface{}) error { + return errdefs.InvalidParameter(errors.Errorf(format, args...)) +} + +func invalidParamWrapf(err error, format string, args ...interface{}) error { + return errdefs.InvalidParameter(errors.Wrapf(err, format, args...)) +} diff --git a/vendor/github.com/docker/docker/registry/registry.go b/vendor/github.com/docker/docker/registry/registry.go new file mode 100644 index 000000000..7866dcd0d --- /dev/null +++ b/vendor/github.com/docker/docker/registry/registry.go @@ -0,0 +1,136 @@ +// Package registry contains client primitives to interact with a remote Docker registry. +package registry // import "github.com/docker/docker/registry" + +import ( + "context" + "crypto/tls" + "net" + "net/http" + "os" + "path/filepath" + "strings" + "time" + + "github.com/containerd/log" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/go-connections/tlsconfig" +) + +// HostCertsDir returns the config directory for a specific host. +func HostCertsDir(hostname string) string { + return filepath.Join(CertsDir(), cleanPath(hostname)) +} + +// newTLSConfig constructs a client TLS configuration based on server defaults +func newTLSConfig(hostname string, isSecure bool) (*tls.Config, error) { + // PreferredServerCipherSuites should have no effect + tlsConfig := tlsconfig.ServerDefault() + + tlsConfig.InsecureSkipVerify = !isSecure + + if isSecure && CertsDir() != "" { + hostDir := HostCertsDir(hostname) + log.G(context.TODO()).Debugf("hostDir: %s", hostDir) + if err := ReadCertsDirectory(tlsConfig, hostDir); err != nil { + return nil, err + } + } + + return tlsConfig, nil +} + +func hasFile(files []os.DirEntry, name string) bool { + for _, f := range files { + if f.Name() == name { + return true + } + } + return false +} + +// ReadCertsDirectory reads the directory for TLS certificates +// including roots and certificate pairs and updates the +// provided TLS configuration. +func ReadCertsDirectory(tlsConfig *tls.Config, directory string) error { + fs, err := os.ReadDir(directory) + if err != nil && !os.IsNotExist(err) { + return invalidParam(err) + } + + for _, f := range fs { + if strings.HasSuffix(f.Name(), ".crt") { + if tlsConfig.RootCAs == nil { + systemPool, err := tlsconfig.SystemCertPool() + if err != nil { + return invalidParamWrapf(err, "unable to get system cert pool") + } + tlsConfig.RootCAs = systemPool + } + log.G(context.TODO()).Debugf("crt: %s", filepath.Join(directory, f.Name())) + data, err := os.ReadFile(filepath.Join(directory, f.Name())) + if err != nil { + return err + } + tlsConfig.RootCAs.AppendCertsFromPEM(data) + } + if strings.HasSuffix(f.Name(), ".cert") { + certName := f.Name() + keyName := certName[:len(certName)-5] + ".key" + log.G(context.TODO()).Debugf("cert: %s", filepath.Join(directory, f.Name())) + if !hasFile(fs, keyName) { + return invalidParamf("missing key %s for client certificate %s. CA certificates must use the extension .crt", keyName, certName) + } + cert, err := tls.LoadX509KeyPair(filepath.Join(directory, certName), filepath.Join(directory, keyName)) + if err != nil { + return err + } + tlsConfig.Certificates = append(tlsConfig.Certificates, cert) + } + if strings.HasSuffix(f.Name(), ".key") { + keyName := f.Name() + certName := keyName[:len(keyName)-4] + ".cert" + log.G(context.TODO()).Debugf("key: %s", filepath.Join(directory, f.Name())) + if !hasFile(fs, certName) { + return invalidParamf("missing client certificate %s for key %s", certName, keyName) + } + } + } + + return nil +} + +// Headers returns request modifiers with a User-Agent and metaHeaders +func Headers(userAgent string, metaHeaders http.Header) []transport.RequestModifier { + modifiers := []transport.RequestModifier{} + if userAgent != "" { + modifiers = append(modifiers, transport.NewHeaderRequestModifier(http.Header{ + "User-Agent": []string{userAgent}, + })) + } + if metaHeaders != nil { + modifiers = append(modifiers, transport.NewHeaderRequestModifier(metaHeaders)) + } + return modifiers +} + +// newTransport returns a new HTTP transport. If tlsConfig is nil, it uses the +// default TLS configuration. +func newTransport(tlsConfig *tls.Config) *http.Transport { + if tlsConfig == nil { + tlsConfig = tlsconfig.ServerDefault() + } + + direct := &net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + } + + return &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: direct.DialContext, + TLSHandshakeTimeout: 10 * time.Second, + TLSClientConfig: tlsConfig, + // TODO(dmcgowan): Call close idle connections when complete and use keep alive + DisableKeepAlives: true, + } +} diff --git a/vendor/github.com/docker/docker/registry/search.go b/vendor/github.com/docker/docker/registry/search.go new file mode 100644 index 000000000..75a544410 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/search.go @@ -0,0 +1,163 @@ +package registry + +import ( + "context" + "net/http" + "strconv" + "strings" + + "github.com/containerd/log" + "github.com/docker/distribution/registry/client/auth" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/errdefs" + "github.com/pkg/errors" +) + +var acceptedSearchFilterTags = map[string]bool{ + "is-automated": true, // Deprecated: the "is_automated" field is deprecated and will always be false in the future. + "is-official": true, + "stars": true, +} + +// Search queries the public registry for repositories matching the specified +// search term and filters. +func (s *Service) Search(ctx context.Context, searchFilters filters.Args, term string, limit int, authConfig *registry.AuthConfig, headers map[string][]string) ([]registry.SearchResult, error) { + if err := searchFilters.Validate(acceptedSearchFilterTags); err != nil { + return nil, err + } + + // TODO(thaJeztah): the "is-automated" field is deprecated; reset the field for the next release (v26.0.0). Return early when using "is-automated=true", and ignore "is-automated=false". + isAutomated, err := searchFilters.GetBoolOrDefault("is-automated", false) + if err != nil { + return nil, err + } + isOfficial, err := searchFilters.GetBoolOrDefault("is-official", false) + if err != nil { + return nil, err + } + + hasStarFilter := 0 + if searchFilters.Contains("stars") { + hasStars := searchFilters.Get("stars") + for _, hasStar := range hasStars { + iHasStar, err := strconv.Atoi(hasStar) + if err != nil { + return nil, errdefs.InvalidParameter(errors.Wrapf(err, "invalid filter 'stars=%s'", hasStar)) + } + if iHasStar > hasStarFilter { + hasStarFilter = iHasStar + } + } + } + + // TODO(thaJeztah): the "is-automated" field is deprecated. Reset the field for the next release (v26.0.0) if any "true" values are present. + unfilteredResult, err := s.searchUnfiltered(ctx, term, limit, authConfig, headers) + if err != nil { + return nil, err + } + + filteredResults := []registry.SearchResult{} + for _, result := range unfilteredResult.Results { + if searchFilters.Contains("is-automated") { + if isAutomated != result.IsAutomated { //nolint:staticcheck // ignore SA1019 for old API versions. + continue + } + } + if searchFilters.Contains("is-official") { + if isOfficial != result.IsOfficial { + continue + } + } + if searchFilters.Contains("stars") { + if result.StarCount < hasStarFilter { + continue + } + } + filteredResults = append(filteredResults, result) + } + + return filteredResults, nil +} + +func (s *Service) searchUnfiltered(ctx context.Context, term string, limit int, authConfig *registry.AuthConfig, headers http.Header) (*registry.SearchResults, error) { + // TODO Use ctx when searching for repositories + if hasScheme(term) { + return nil, invalidParamf("invalid repository name: repository name (%s) should not have a scheme", term) + } + + indexName, remoteName := splitReposSearchTerm(term) + + // Search is a long-running operation, just lock s.config to avoid block others. + s.mu.RLock() + index, err := newIndexInfo(s.config, indexName) + s.mu.RUnlock() + + if err != nil { + return nil, err + } + if index.Official { + // If pull "library/foo", it's stored locally under "foo" + remoteName = strings.TrimPrefix(remoteName, "library/") + } + + endpoint, err := newV1Endpoint(index, headers) + if err != nil { + return nil, err + } + + var client *http.Client + if authConfig != nil && authConfig.IdentityToken != "" && authConfig.Username != "" { + creds := NewStaticCredentialStore(authConfig) + scopes := []auth.Scope{ + auth.RegistryScope{ + Name: "catalog", + Actions: []string{"search"}, + }, + } + + // TODO(thaJeztah); is there a reason not to include other headers here? (originally added in 19d48f0b8ba59eea9f2cac4ad1c7977712a6b7ac) + modifiers := Headers(headers.Get("User-Agent"), nil) + v2Client, err := v2AuthHTTPClient(endpoint.URL, endpoint.client.Transport, modifiers, creds, scopes) + if err != nil { + return nil, err + } + // Copy non transport http client features + v2Client.Timeout = endpoint.client.Timeout + v2Client.CheckRedirect = endpoint.client.CheckRedirect + v2Client.Jar = endpoint.client.Jar + + log.G(ctx).Debugf("using v2 client for search to %s", endpoint.URL) + client = v2Client + } else { + client = endpoint.client + if err := authorizeClient(client, authConfig, endpoint); err != nil { + return nil, err + } + } + + return newSession(client, endpoint).searchRepositories(remoteName, limit) +} + +// splitReposSearchTerm breaks a search term into an index name and remote name +func splitReposSearchTerm(reposName string) (string, string) { + nameParts := strings.SplitN(reposName, "/", 2) + if len(nameParts) == 1 || (!strings.Contains(nameParts[0], ".") && + !strings.Contains(nameParts[0], ":") && nameParts[0] != "localhost") { + // This is a Docker Hub repository (ex: samalba/hipache or ubuntu), + // use the default Docker Hub registry (docker.io) + return IndexName, reposName + } + return nameParts[0], nameParts[1] +} + +// ParseSearchIndexInfo will use repository name to get back an indexInfo. +// +// TODO(thaJeztah) this function is only used by the CLI, and used to get +// information of the registry (to provide credentials if needed). We should +// move this function (or equivalent) to the CLI, as it's doing too much just +// for that. +func ParseSearchIndexInfo(reposName string) (*registry.IndexInfo, error) { + indexName, _ := splitReposSearchTerm(reposName) + return newIndexInfo(emptyServiceConfig, indexName) +} diff --git a/vendor/github.com/docker/docker/registry/search_endpoint_v1.go b/vendor/github.com/docker/docker/registry/search_endpoint_v1.go new file mode 100644 index 000000000..f6c369a93 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/search_endpoint_v1.go @@ -0,0 +1,200 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "context" + "crypto/tls" + "encoding/json" + "net/http" + "net/url" + "strings" + + "github.com/containerd/log" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/docker/api/types/registry" +) + +// v1PingResult contains the information returned when pinging a registry. It +// indicates whether the registry claims to be a standalone registry. +type v1PingResult struct { + // Standalone is set to true if the registry indicates it is a + // standalone registry in the X-Docker-Registry-Standalone + // header + Standalone bool `json:"standalone"` +} + +// v1Endpoint stores basic information about a V1 registry endpoint. +type v1Endpoint struct { + client *http.Client + URL *url.URL + IsSecure bool +} + +// newV1Endpoint parses the given address to return a registry endpoint. +// TODO: remove. This is only used by search. +func newV1Endpoint(index *registry.IndexInfo, headers http.Header) (*v1Endpoint, error) { + tlsConfig, err := newTLSConfig(index.Name, index.Secure) + if err != nil { + return nil, err + } + + endpoint, err := newV1EndpointFromStr(GetAuthConfigKey(index), tlsConfig, headers) + if err != nil { + return nil, err + } + + if endpoint.String() == IndexServer { + // Skip the check, we know this one is valid + // (and we never want to fall back to http in case of error) + return endpoint, nil + } + + // Try HTTPS ping to registry + endpoint.URL.Scheme = "https" + if _, err := endpoint.ping(); err != nil { + if endpoint.IsSecure { + // If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry` + // in case that's what they need. DO NOT accept unknown CA certificates, and DO NOT fall back to HTTP. + return nil, invalidParamf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host) + } + + // registry is insecure and HTTPS failed, fallback to HTTP. + log.G(context.TODO()).WithError(err).Debugf("error from registry %q marked as insecure - insecurely falling back to HTTP", endpoint) + endpoint.URL.Scheme = "http" + if _, err2 := endpoint.ping(); err2 != nil { + return nil, invalidParamf("invalid registry endpoint %q. HTTPS attempt: %v. HTTP attempt: %v", endpoint, err, err2) + } + } + + return endpoint, nil +} + +// trimV1Address trims the "v1" version suffix off the address and returns +// the trimmed address. It returns an error on "v2" endpoints. +func trimV1Address(address string) (string, error) { + trimmed := strings.TrimSuffix(address, "/") + if strings.HasSuffix(trimmed, "/v2") { + return "", invalidParamf("search is not supported on v2 endpoints: %s", address) + } + return strings.TrimSuffix(trimmed, "/v1"), nil +} + +func newV1EndpointFromStr(address string, tlsConfig *tls.Config, headers http.Header) (*v1Endpoint, error) { + if !strings.HasPrefix(address, "http://") && !strings.HasPrefix(address, "https://") { + address = "https://" + address + } + + address, err := trimV1Address(address) + if err != nil { + return nil, err + } + + uri, err := url.Parse(address) + if err != nil { + return nil, invalidParam(err) + } + + // TODO(tiborvass): make sure a ConnectTimeout transport is used + tr := newTransport(tlsConfig) + + return &v1Endpoint{ + IsSecure: tlsConfig == nil || !tlsConfig.InsecureSkipVerify, + URL: uri, + client: httpClient(transport.NewTransport(tr, Headers("", headers)...)), + }, nil +} + +// Get the formatted URL for the root of this registry Endpoint +func (e *v1Endpoint) String() string { + return e.URL.String() + "/v1/" +} + +// ping returns a v1PingResult which indicates whether the registry is standalone or not. +func (e *v1Endpoint) ping() (v1PingResult, error) { + if e.String() == IndexServer { + // Skip the check, we know this one is valid + // (and we never want to fallback to http in case of error) + return v1PingResult{}, nil + } + + pingURL := e.String() + "_ping" + log.G(context.TODO()).WithField("url", pingURL).Debug("attempting v1 ping for registry endpoint") + req, err := http.NewRequest(http.MethodGet, pingURL, nil) + if err != nil { + return v1PingResult{}, invalidParam(err) + } + + resp, err := e.client.Do(req) + if err != nil { + return v1PingResult{}, invalidParam(err) + } + + defer resp.Body.Close() + + if v := resp.Header.Get("X-Docker-Registry-Standalone"); v != "" { + info := v1PingResult{} + // Accepted values are "1", and "true" (case-insensitive). + if v == "1" || strings.EqualFold(v, "true") { + info.Standalone = true + } + log.G(context.TODO()).Debugf("v1PingResult.Standalone (from X-Docker-Registry-Standalone header): %t", info.Standalone) + return info, nil + } + + // If the header is absent, we assume true for compatibility with earlier + // versions of the registry. default to true + info := v1PingResult{ + Standalone: true, + } + if err := json.NewDecoder(resp.Body).Decode(&info); err != nil { + log.G(context.TODO()).WithError(err).Debug("error unmarshaling _ping response") + // don't stop here. Just assume sane defaults + } + + log.G(context.TODO()).Debugf("v1PingResult.Standalone: %t", info.Standalone) + return info, nil +} + +// httpClient returns an HTTP client structure which uses the given transport +// and contains the necessary headers for redirected requests +func httpClient(transport http.RoundTripper) *http.Client { + return &http.Client{ + Transport: transport, + CheckRedirect: addRequiredHeadersToRedirectedRequests, + } +} + +func trustedLocation(req *http.Request) bool { + var ( + trusteds = []string{"docker.com", "docker.io"} + hostname = strings.SplitN(req.Host, ":", 2)[0] + ) + if req.URL.Scheme != "https" { + return false + } + + for _, trusted := range trusteds { + if hostname == trusted || strings.HasSuffix(hostname, "."+trusted) { + return true + } + } + return false +} + +// addRequiredHeadersToRedirectedRequests adds the necessary redirection headers +// for redirected requests +func addRequiredHeadersToRedirectedRequests(req *http.Request, via []*http.Request) error { + if len(via) != 0 && via[0] != nil { + if trustedLocation(req) && trustedLocation(via[0]) { + req.Header = via[0].Header + return nil + } + for k, v := range via[0].Header { + if k != "Authorization" { + for _, vv := range v { + req.Header.Add(k, vv) + } + } + } + } + return nil +} diff --git a/vendor/github.com/docker/docker/registry/search_session.go b/vendor/github.com/docker/docker/registry/search_session.go new file mode 100644 index 000000000..c334143c6 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/search_session.go @@ -0,0 +1,218 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + // this is required for some certificates + "context" + _ "crypto/sha512" + "encoding/json" + "fmt" + "net/http" + "net/http/cookiejar" + "net/url" + "strings" + "sync" + + "github.com/containerd/log" + "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/errdefs" + "github.com/docker/docker/pkg/ioutils" + "github.com/pkg/errors" +) + +// A session is used to communicate with a V1 registry +type session struct { + indexEndpoint *v1Endpoint + client *http.Client +} + +type authTransport struct { + http.RoundTripper + *registry.AuthConfig + + alwaysSetBasicAuth bool + token []string + + mu sync.Mutex // guards modReq + modReq map[*http.Request]*http.Request // original -> modified +} + +// newAuthTransport handles the auth layer when communicating with a v1 registry (private or official) +// +// For private v1 registries, set alwaysSetBasicAuth to true. +// +// For the official v1 registry, if there isn't already an Authorization header in the request, +// but there is an X-Docker-Token header set to true, then Basic Auth will be used to set the Authorization header. +// After sending the request with the provided base http.RoundTripper, if an X-Docker-Token header, representing +// a token, is present in the response, then it gets cached and sent in the Authorization header of all subsequent +// requests. +// +// If the server sends a token without the client having requested it, it is ignored. +// +// This RoundTripper also has a CancelRequest method important for correct timeout handling. +func newAuthTransport(base http.RoundTripper, authConfig *registry.AuthConfig, alwaysSetBasicAuth bool) *authTransport { + if base == nil { + base = http.DefaultTransport + } + return &authTransport{ + RoundTripper: base, + AuthConfig: authConfig, + alwaysSetBasicAuth: alwaysSetBasicAuth, + modReq: make(map[*http.Request]*http.Request), + } +} + +// cloneRequest returns a clone of the provided *http.Request. +// The clone is a shallow copy of the struct and its Header map. +func cloneRequest(r *http.Request) *http.Request { + // shallow copy of the struct + r2 := new(http.Request) + *r2 = *r + // deep copy of the Header + r2.Header = make(http.Header, len(r.Header)) + for k, s := range r.Header { + r2.Header[k] = append([]string(nil), s...) + } + + return r2 +} + +// RoundTrip changes an HTTP request's headers to add the necessary +// authentication-related headers +func (tr *authTransport) RoundTrip(orig *http.Request) (*http.Response, error) { + // Authorization should not be set on 302 redirect for untrusted locations. + // This logic mirrors the behavior in addRequiredHeadersToRedirectedRequests. + // As the authorization logic is currently implemented in RoundTrip, + // a 302 redirect is detected by looking at the Referrer header as go http package adds said header. + // This is safe as Docker doesn't set Referrer in other scenarios. + if orig.Header.Get("Referer") != "" && !trustedLocation(orig) { + return tr.RoundTripper.RoundTrip(orig) + } + + req := cloneRequest(orig) + tr.mu.Lock() + tr.modReq[orig] = req + tr.mu.Unlock() + + if tr.alwaysSetBasicAuth { + if tr.AuthConfig == nil { + return nil, errors.New("unexpected error: empty auth config") + } + req.SetBasicAuth(tr.Username, tr.Password) + return tr.RoundTripper.RoundTrip(req) + } + + // Don't override + if req.Header.Get("Authorization") == "" { + if req.Header.Get("X-Docker-Token") == "true" && tr.AuthConfig != nil && len(tr.Username) > 0 { + req.SetBasicAuth(tr.Username, tr.Password) + } else if len(tr.token) > 0 { + req.Header.Set("Authorization", "Token "+strings.Join(tr.token, ",")) + } + } + resp, err := tr.RoundTripper.RoundTrip(req) + if err != nil { + tr.mu.Lock() + delete(tr.modReq, orig) + tr.mu.Unlock() + return nil, err + } + if len(resp.Header["X-Docker-Token"]) > 0 { + tr.token = resp.Header["X-Docker-Token"] + } + resp.Body = &ioutils.OnEOFReader{ + Rc: resp.Body, + Fn: func() { + tr.mu.Lock() + delete(tr.modReq, orig) + tr.mu.Unlock() + }, + } + return resp, nil +} + +// CancelRequest cancels an in-flight request by closing its connection. +func (tr *authTransport) CancelRequest(req *http.Request) { + type canceler interface { + CancelRequest(*http.Request) + } + if cr, ok := tr.RoundTripper.(canceler); ok { + tr.mu.Lock() + modReq := tr.modReq[req] + delete(tr.modReq, req) + tr.mu.Unlock() + cr.CancelRequest(modReq) + } +} + +func authorizeClient(client *http.Client, authConfig *registry.AuthConfig, endpoint *v1Endpoint) error { + var alwaysSetBasicAuth bool + + // If we're working with a standalone private registry over HTTPS, send Basic Auth headers + // alongside all our requests. + if endpoint.String() != IndexServer && endpoint.URL.Scheme == "https" { + info, err := endpoint.ping() + if err != nil { + return err + } + if info.Standalone && authConfig != nil { + log.G(context.TODO()).Debugf("Endpoint %s is eligible for private registry. Enabling decorator.", endpoint.String()) + alwaysSetBasicAuth = true + } + } + + // Annotate the transport unconditionally so that v2 can + // properly fallback on v1 when an image is not found. + client.Transport = newAuthTransport(client.Transport, authConfig, alwaysSetBasicAuth) + + jar, err := cookiejar.New(nil) + if err != nil { + return errdefs.System(errors.New("cookiejar.New is not supposed to return an error")) + } + client.Jar = jar + + return nil +} + +func newSession(client *http.Client, endpoint *v1Endpoint) *session { + return &session{ + client: client, + indexEndpoint: endpoint, + } +} + +// defaultSearchLimit is the default value for maximum number of returned search results. +const defaultSearchLimit = 25 + +// searchRepositories performs a search against the remote repository +func (r *session) searchRepositories(term string, limit int) (*registry.SearchResults, error) { + if limit == 0 { + limit = defaultSearchLimit + } + if limit < 1 || limit > 100 { + return nil, invalidParamf("limit %d is outside the range of [1, 100]", limit) + } + u := r.indexEndpoint.String() + "search?q=" + url.QueryEscape(term) + "&n=" + url.QueryEscape(fmt.Sprintf("%d", limit)) + log.G(context.TODO()).WithField("url", u).Debug("searchRepositories") + + req, err := http.NewRequest(http.MethodGet, u, nil) + if err != nil { + return nil, invalidParamWrapf(err, "error building request") + } + // Have the AuthTransport send authentication, when logged in. + req.Header.Set("X-Docker-Token", "true") + res, err := r.client.Do(req) + if err != nil { + return nil, errdefs.System(err) + } + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + // TODO(thaJeztah): return upstream response body for errors (see https://github.com/moby/moby/issues/27286). + return nil, errdefs.Unknown(fmt.Errorf("Unexpected status code %d", res.StatusCode)) + } + result := ®istry.SearchResults{} + err = json.NewDecoder(res.Body).Decode(result) + if err != nil { + return nil, errdefs.System(errors.Wrap(err, "error decoding registry search results")) + } + return result, nil +} diff --git a/vendor/github.com/docker/docker/registry/service.go b/vendor/github.com/docker/docker/registry/service.go new file mode 100644 index 000000000..6881c1105 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/service.go @@ -0,0 +1,145 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "context" + "crypto/tls" + "net/url" + "strings" + "sync" + + "github.com/containerd/log" + "github.com/distribution/reference" + "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/errdefs" +) + +// Service is a registry service. It tracks configuration data such as a list +// of mirrors. +type Service struct { + config *serviceConfig + mu sync.RWMutex +} + +// NewService returns a new instance of [Service] ready to be installed into +// an engine. +func NewService(options ServiceOptions) (*Service, error) { + config, err := newServiceConfig(options) + + return &Service{config: config}, err +} + +// ServiceConfig returns a copy of the public registry service's configuration. +func (s *Service) ServiceConfig() *registry.ServiceConfig { + s.mu.RLock() + defer s.mu.RUnlock() + return s.config.copy() +} + +// ReplaceConfig prepares a transaction which will atomically replace the +// registry service's configuration when the returned commit function is called. +func (s *Service) ReplaceConfig(options ServiceOptions) (commit func(), err error) { + config, err := newServiceConfig(options) + if err != nil { + return nil, err + } + return func() { + s.mu.Lock() + defer s.mu.Unlock() + s.config = config + }, nil +} + +// Auth contacts the public registry with the provided credentials, +// and returns OK if authentication was successful. +// It can be used to verify the validity of a client's credentials. +func (s *Service) Auth(ctx context.Context, authConfig *registry.AuthConfig, userAgent string) (status, token string, err error) { + // TODO Use ctx when searching for repositories + registryHostName := IndexHostname + + if authConfig.ServerAddress != "" { + serverAddress := authConfig.ServerAddress + if !strings.HasPrefix(serverAddress, "https://") && !strings.HasPrefix(serverAddress, "http://") { + serverAddress = "https://" + serverAddress + } + u, err := url.Parse(serverAddress) + if err != nil { + return "", "", invalidParamWrapf(err, "unable to parse server address") + } + registryHostName = u.Host + } + + // Lookup endpoints for authentication using "LookupPushEndpoints", which + // excludes mirrors to prevent sending credentials of the upstream registry + // to a mirror. + endpoints, err := s.LookupPushEndpoints(registryHostName) + if err != nil { + return "", "", invalidParam(err) + } + + for _, endpoint := range endpoints { + status, token, err = loginV2(authConfig, endpoint, userAgent) + if err == nil { + return + } + if errdefs.IsUnauthorized(err) { + // Failed to authenticate; don't continue with (non-TLS) endpoints. + return status, token, err + } + log.G(ctx).WithError(err).Infof("Error logging in to endpoint, trying next endpoint") + } + + return "", "", err +} + +// ResolveRepository splits a repository name into its components +// and configuration of the associated registry. +func (s *Service) ResolveRepository(name reference.Named) (*RepositoryInfo, error) { + s.mu.RLock() + defer s.mu.RUnlock() + return newRepositoryInfo(s.config, name) +} + +// APIEndpoint represents a remote API endpoint +type APIEndpoint struct { + Mirror bool + URL *url.URL + Version APIVersion // Deprecated: v1 registries are deprecated, and endpoints are always v2. + AllowNondistributableArtifacts bool + Official bool + TrimHostname bool + TLSConfig *tls.Config +} + +// LookupPullEndpoints creates a list of v2 endpoints to try to pull from, in order of preference. +// It gives preference to mirrors over the actual registry, and HTTPS over plain HTTP. +func (s *Service) LookupPullEndpoints(hostname string) (endpoints []APIEndpoint, err error) { + s.mu.RLock() + defer s.mu.RUnlock() + + return s.lookupV2Endpoints(hostname) +} + +// LookupPushEndpoints creates a list of v2 endpoints to try to push to, in order of preference. +// It gives preference to HTTPS over plain HTTP. Mirrors are not included. +func (s *Service) LookupPushEndpoints(hostname string) (endpoints []APIEndpoint, err error) { + s.mu.RLock() + defer s.mu.RUnlock() + + allEndpoints, err := s.lookupV2Endpoints(hostname) + if err == nil { + for _, endpoint := range allEndpoints { + if !endpoint.Mirror { + endpoints = append(endpoints, endpoint) + } + } + } + return endpoints, err +} + +// IsInsecureRegistry returns true if the registry at given host is configured as +// insecure registry. +func (s *Service) IsInsecureRegistry(host string) bool { + s.mu.RLock() + defer s.mu.RUnlock() + return !s.config.isSecureIndex(host) +} diff --git a/vendor/github.com/docker/docker/registry/service_v2.go b/vendor/github.com/docker/docker/registry/service_v2.go new file mode 100644 index 000000000..5d09e11c9 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/service_v2.go @@ -0,0 +1,80 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "net/url" + "strings" + + "github.com/docker/go-connections/tlsconfig" +) + +func (s *Service) lookupV2Endpoints(hostname string) (endpoints []APIEndpoint, err error) { + ana := s.config.allowNondistributableArtifacts(hostname) + + if hostname == DefaultNamespace || hostname == IndexHostname { + for _, mirror := range s.config.Mirrors { + if !strings.HasPrefix(mirror, "http://") && !strings.HasPrefix(mirror, "https://") { + mirror = "https://" + mirror + } + mirrorURL, err := url.Parse(mirror) + if err != nil { + return nil, invalidParam(err) + } + mirrorTLSConfig, err := newTLSConfig(mirrorURL.Host, s.config.isSecureIndex(mirrorURL.Host)) + if err != nil { + return nil, err + } + endpoints = append(endpoints, APIEndpoint{ + URL: mirrorURL, + Version: APIVersion2, //nolint:staticcheck // ignore SA1019 (Version is deprecated) to allow potential consumers to transition. + Mirror: true, + TrimHostname: true, + TLSConfig: mirrorTLSConfig, + }) + } + endpoints = append(endpoints, APIEndpoint{ + URL: DefaultV2Registry, + Version: APIVersion2, //nolint:staticcheck // ignore SA1019 (Version is deprecated) to allow potential consumers to transition. + Official: true, + TrimHostname: true, + TLSConfig: tlsconfig.ServerDefault(), + + AllowNondistributableArtifacts: ana, + }) + + return endpoints, nil + } + + tlsConfig, err := newTLSConfig(hostname, s.config.isSecureIndex(hostname)) + if err != nil { + return nil, err + } + + endpoints = []APIEndpoint{ + { + URL: &url.URL{ + Scheme: "https", + Host: hostname, + }, + Version: APIVersion2, //nolint:staticcheck // ignore SA1019 (Version is deprecated) to allow potential consumers to transition. + AllowNondistributableArtifacts: ana, + TrimHostname: true, + TLSConfig: tlsConfig, + }, + } + + if tlsConfig.InsecureSkipVerify { + endpoints = append(endpoints, APIEndpoint{ + URL: &url.URL{ + Scheme: "http", + Host: hostname, + }, + Version: APIVersion2, //nolint:staticcheck // ignore SA1019 (Version is deprecated) to allow potential consumers to transition. + AllowNondistributableArtifacts: ana, + TrimHostname: true, + // used to check if supposed to be secure via InsecureSkipVerify + TLSConfig: tlsConfig, + }) + } + + return endpoints, nil +} diff --git a/vendor/github.com/docker/docker/registry/types.go b/vendor/github.com/docker/docker/registry/types.go new file mode 100644 index 000000000..54aa0bd19 --- /dev/null +++ b/vendor/github.com/docker/docker/registry/types.go @@ -0,0 +1,41 @@ +package registry // import "github.com/docker/docker/registry" + +import ( + "github.com/distribution/reference" + "github.com/docker/docker/api/types/registry" +) + +// APIVersion is an integral representation of an API version (presently +// either 1 or 2) +// +// Deprecated: v1 registries are deprecated, and endpoints are always v2. +type APIVersion int + +func (av APIVersion) String() string { + return apiVersions[av] +} + +// API Version identifiers. +const ( + APIVersion1 APIVersion = 1 // Deprecated: v1 registries are deprecated, and endpoints are always v2. + APIVersion2 APIVersion = 2 // Deprecated: v1 registries are deprecated, and endpoints are always v2. +) + +var apiVersions = map[APIVersion]string{ + APIVersion1: "v1", + APIVersion2: "v2", +} + +// RepositoryInfo describes a repository +type RepositoryInfo struct { + Name reference.Named + // Index points to registry information + Index *registry.IndexInfo + // Official indicates whether the repository is considered official. + // If the registry is official, and the normalized name does not + // contain a '/' (e.g. "foo"), then it is considered an official repo. + Official bool + // Class represents the class of the repository, such as "plugin" + // or "image". + Class string +} diff --git a/vendor/github.com/docker/go-connections/LICENSE b/vendor/github.com/docker/go-connections/LICENSE new file mode 100644 index 000000000..b55b37bc3 --- /dev/null +++ b/vendor/github.com/docker/go-connections/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/go-connections/tlsconfig/certpool.go b/vendor/github.com/docker/go-connections/tlsconfig/certpool.go new file mode 100644 index 000000000..f84c624ba --- /dev/null +++ b/vendor/github.com/docker/go-connections/tlsconfig/certpool.go @@ -0,0 +1,16 @@ +package tlsconfig + +import ( + "crypto/x509" + "runtime" +) + +// SystemCertPool returns a copy of the system cert pool, +// returns an error if failed to load or empty pool on windows. +func SystemCertPool() (*x509.CertPool, error) { + certpool, err := x509.SystemCertPool() + if err != nil && runtime.GOOS == "windows" { + return x509.NewCertPool(), nil + } + return certpool, err +} diff --git a/vendor/github.com/docker/go-connections/tlsconfig/config.go b/vendor/github.com/docker/go-connections/tlsconfig/config.go new file mode 100644 index 000000000..606c98a38 --- /dev/null +++ b/vendor/github.com/docker/go-connections/tlsconfig/config.go @@ -0,0 +1,261 @@ +// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. +// +// As a reminder from https://golang.org/pkg/crypto/tls/#Config: +// +// A Config structure is used to configure a TLS client or server. After one has been passed to a TLS function it must not be modified. +// A Config may be reused; the tls package will also not modify it. +package tlsconfig + +import ( + "crypto/tls" + "crypto/x509" + "encoding/pem" + "errors" + "fmt" + "os" +) + +// Options represents the information needed to create client and server TLS configurations. +type Options struct { + CAFile string + + // If either CertFile or KeyFile is empty, Client() will not load them + // preventing the client from authenticating to the server. + // However, Server() requires them and will error out if they are empty. + CertFile string + KeyFile string + + // client-only option + InsecureSkipVerify bool + // server-only option + ClientAuth tls.ClientAuthType + // If ExclusiveRootPools is set, then if a CA file is provided, the root pool used for TLS + // creds will include exclusively the roots in that CA file. If no CA file is provided, + // the system pool will be used. + ExclusiveRootPools bool + MinVersion uint16 + // If Passphrase is set, it will be used to decrypt a TLS private key + // if the key is encrypted. + // + // Deprecated: Use of encrypted TLS private keys has been deprecated, and + // will be removed in a future release. Golang has deprecated support for + // legacy PEM encryption (as specified in RFC 1423), as it is insecure by + // design (see https://go-review.googlesource.com/c/go/+/264159). + Passphrase string +} + +// Extra (server-side) accepted CBC cipher suites - will phase out in the future +var acceptedCBCCiphers = []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, +} + +// DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls +// options struct but wants to use a commonly accepted set of TLS cipher suites, with +// known weak algorithms removed. +var DefaultServerAcceptedCiphers = append(clientCipherSuites, acceptedCBCCiphers...) + +// ServerDefault returns a secure-enough TLS configuration for the server TLS configuration. +func ServerDefault(ops ...func(*tls.Config)) *tls.Config { + tlsConfig := &tls.Config{ + // Avoid fallback by default to SSL protocols < TLS1.2 + MinVersion: tls.VersionTLS12, + PreferServerCipherSuites: true, + CipherSuites: DefaultServerAcceptedCiphers, + } + + for _, op := range ops { + op(tlsConfig) + } + + return tlsConfig +} + +// ClientDefault returns a secure-enough TLS configuration for the client TLS configuration. +func ClientDefault(ops ...func(*tls.Config)) *tls.Config { + tlsConfig := &tls.Config{ + // Prefer TLS1.2 as the client minimum + MinVersion: tls.VersionTLS12, + CipherSuites: clientCipherSuites, + } + + for _, op := range ops { + op(tlsConfig) + } + + return tlsConfig +} + +// certPool returns an X.509 certificate pool from `caFile`, the certificate file. +func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) { + // If we should verify the server, we need to load a trusted ca + var ( + certPool *x509.CertPool + err error + ) + if exclusivePool { + certPool = x509.NewCertPool() + } else { + certPool, err = SystemCertPool() + if err != nil { + return nil, fmt.Errorf("failed to read system certificates: %v", err) + } + } + pemData, err := os.ReadFile(caFile) + if err != nil { + return nil, fmt.Errorf("could not read CA certificate %q: %v", caFile, err) + } + if !certPool.AppendCertsFromPEM(pemData) { + return nil, fmt.Errorf("failed to append certificates from PEM file: %q", caFile) + } + return certPool, nil +} + +// allTLSVersions lists all the TLS versions and is used by the code that validates +// a uint16 value as a TLS version. +var allTLSVersions = map[uint16]struct{}{ + tls.VersionTLS10: {}, + tls.VersionTLS11: {}, + tls.VersionTLS12: {}, + tls.VersionTLS13: {}, +} + +// isValidMinVersion checks that the input value is a valid tls minimum version +func isValidMinVersion(version uint16) bool { + _, ok := allTLSVersions[version] + return ok +} + +// adjustMinVersion sets the MinVersion on `config`, the input configuration. +// It assumes the current MinVersion on the `config` is the lowest allowed. +func adjustMinVersion(options Options, config *tls.Config) error { + if options.MinVersion > 0 { + if !isValidMinVersion(options.MinVersion) { + return fmt.Errorf("invalid minimum TLS version: %x", options.MinVersion) + } + if options.MinVersion < config.MinVersion { + return fmt.Errorf("requested minimum TLS version is too low. Should be at-least: %x", config.MinVersion) + } + config.MinVersion = options.MinVersion + } + + return nil +} + +// IsErrEncryptedKey returns true if the 'err' is an error of incorrect +// password when trying to decrypt a TLS private key. +// +// Deprecated: Use of encrypted TLS private keys has been deprecated, and +// will be removed in a future release. Golang has deprecated support for +// legacy PEM encryption (as specified in RFC 1423), as it is insecure by +// design (see https://go-review.googlesource.com/c/go/+/264159). +func IsErrEncryptedKey(err error) bool { + return errors.Is(err, x509.IncorrectPasswordError) +} + +// getPrivateKey returns the private key in 'keyBytes', in PEM-encoded format. +// If the private key is encrypted, 'passphrase' is used to decrypted the +// private key. +func getPrivateKey(keyBytes []byte, passphrase string) ([]byte, error) { + // this section makes some small changes to code from notary/tuf/utils/x509.go + pemBlock, _ := pem.Decode(keyBytes) + if pemBlock == nil { + return nil, fmt.Errorf("no valid private key found") + } + + var err error + if x509.IsEncryptedPEMBlock(pemBlock) { //nolint:staticcheck // Ignore SA1019 (IsEncryptedPEMBlock is deprecated) + keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(passphrase)) //nolint:staticcheck // Ignore SA1019 (DecryptPEMBlock is deprecated) + if err != nil { + return nil, fmt.Errorf("private key is encrypted, but could not decrypt it: %w", err) + } + keyBytes = pem.EncodeToMemory(&pem.Block{Type: pemBlock.Type, Bytes: keyBytes}) + } + + return keyBytes, nil +} + +// getCert returns a Certificate from the CertFile and KeyFile in 'options', +// if the key is encrypted, the Passphrase in 'options' will be used to +// decrypt it. +func getCert(options Options) ([]tls.Certificate, error) { + if options.CertFile == "" && options.KeyFile == "" { + return nil, nil + } + + cert, err := os.ReadFile(options.CertFile) + if err != nil { + return nil, err + } + + prKeyBytes, err := os.ReadFile(options.KeyFile) + if err != nil { + return nil, err + } + + prKeyBytes, err = getPrivateKey(prKeyBytes, options.Passphrase) + if err != nil { + return nil, err + } + + tlsCert, err := tls.X509KeyPair(cert, prKeyBytes) + if err != nil { + return nil, err + } + + return []tls.Certificate{tlsCert}, nil +} + +// Client returns a TLS configuration meant to be used by a client. +func Client(options Options) (*tls.Config, error) { + tlsConfig := ClientDefault() + tlsConfig.InsecureSkipVerify = options.InsecureSkipVerify + if !options.InsecureSkipVerify && options.CAFile != "" { + CAs, err := certPool(options.CAFile, options.ExclusiveRootPools) + if err != nil { + return nil, err + } + tlsConfig.RootCAs = CAs + } + + tlsCerts, err := getCert(options) + if err != nil { + return nil, fmt.Errorf("could not load X509 key pair: %w", err) + } + tlsConfig.Certificates = tlsCerts + + if err := adjustMinVersion(options, tlsConfig); err != nil { + return nil, err + } + + return tlsConfig, nil +} + +// Server returns a TLS configuration meant to be used by a server. +func Server(options Options) (*tls.Config, error) { + tlsConfig := ServerDefault() + tlsConfig.ClientAuth = options.ClientAuth + tlsCert, err := tls.LoadX509KeyPair(options.CertFile, options.KeyFile) + if err != nil { + if os.IsNotExist(err) { + return nil, fmt.Errorf("could not load X509 key pair (cert: %q, key: %q): %v", options.CertFile, options.KeyFile, err) + } + return nil, fmt.Errorf("error reading X509 key pair - make sure the key is not encrypted (cert: %q, key: %q): %v", options.CertFile, options.KeyFile, err) + } + tlsConfig.Certificates = []tls.Certificate{tlsCert} + if options.ClientAuth >= tls.VerifyClientCertIfGiven && options.CAFile != "" { + CAs, err := certPool(options.CAFile, options.ExclusiveRootPools) + if err != nil { + return nil, err + } + tlsConfig.ClientCAs = CAs + } + + if err := adjustMinVersion(options, tlsConfig); err != nil { + return nil, err + } + + return tlsConfig, nil +} diff --git a/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go b/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go new file mode 100644 index 000000000..a82f9fa52 --- /dev/null +++ b/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go @@ -0,0 +1,14 @@ +// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. +package tlsconfig + +import ( + "crypto/tls" +) + +// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) +var clientCipherSuites = []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, +} diff --git a/vendor/github.com/docker/go-metrics/CONTRIBUTING.md b/vendor/github.com/docker/go-metrics/CONTRIBUTING.md new file mode 100644 index 000000000..b8a512c36 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# Contributing + +## Sign your work + +The sign-off is a simple line at the end of the explanation for the patch. Your +signature certifies that you wrote the patch or otherwise have the right to pass +it on as an open-source patch. The rules are pretty simple: if you can certify +the below (from [developercertificate.org](http://developercertificate.org/)): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +Then you just add a line to every git commit message: + + Signed-off-by: Joe Smith + +Use your real name (sorry, no pseudonyms or anonymous contributions.) + +If you set your `user.name` and `user.email` git configs, you can sign your +commit automatically with `git commit -s`. diff --git a/vendor/github.com/docker/go-metrics/LICENSE b/vendor/github.com/docker/go-metrics/LICENSE new file mode 100644 index 000000000..8f3fee627 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2016 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/go-metrics/LICENSE.docs b/vendor/github.com/docker/go-metrics/LICENSE.docs new file mode 100644 index 000000000..e26cd4fc8 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/LICENSE.docs @@ -0,0 +1,425 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public licenses. +Notwithstanding, Creative Commons may elect to apply one of its public +licenses to material it publishes and in those instances will be +considered the "Licensor." Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the public +licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/vendor/github.com/docker/go-metrics/NOTICE b/vendor/github.com/docker/go-metrics/NOTICE new file mode 100644 index 000000000..8915f0277 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/NOTICE @@ -0,0 +1,16 @@ +Docker +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/go-metrics/README.md b/vendor/github.com/docker/go-metrics/README.md new file mode 100644 index 000000000..a9e947cb5 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/README.md @@ -0,0 +1,91 @@ +# go-metrics [![GoDoc](https://godoc.org/github.com/docker/go-metrics?status.svg)](https://godoc.org/github.com/docker/go-metrics) ![Badge Badge](http://doyouevenbadge.com/github.com/docker/go-metrics) + +This package is small wrapper around the prometheus go client to help enforce convention and best practices for metrics collection in Docker projects. + +## Best Practices + +This packages is meant to be used for collecting metrics in Docker projects. +It is not meant to be used as a replacement for the prometheus client but to help enforce consistent naming across metrics collected. +If you have not already read the prometheus best practices around naming and labels you can read the page [here](https://prometheus.io/docs/practices/naming/). + +The following are a few Docker specific rules that will help you name and work with metrics in your project. + +1. Namespace and Subsystem + +This package provides you with a namespace type that allows you to specify the same namespace and subsystem for your metrics. + +```go +ns := metrics.NewNamespace("engine", "daemon", metrics.Labels{ + "version": dockerversion.Version, + "commit": dockerversion.GitCommit, +}) +``` + +In the example above we are creating metrics for the Docker engine's daemon package. +`engine` would be the namespace in this example where `daemon` is the subsystem or package where we are collecting the metrics. + +A namespace also allows you to attach constant labels to the metrics such as the git commit and version that it is collecting. + +2. Declaring your Metrics + +Try to keep all your metric declarations in one file. +This makes it easy for others to see what constant labels are defined on the namespace and what labels are defined on the metrics when they are created. + +3. Use labels instead of multiple metrics + +Labels allow you to define one metric such as the time it takes to perform a certain action on an object. +If we wanted to collect timings on various container actions such as create, start, and delete then we can define one metric called `container_actions` and use labels to specify the type of action. + + +```go +containerActions = ns.NewLabeledTimer("container_actions", "The number of milliseconds it takes to process each container action", "action") +``` + +The last parameter is the label name or key. +When adding a data point to the metric you will use the `WithValues` function to specify the `action` that you are collecting for. + +```go +containerActions.WithValues("create").UpdateSince(start) +``` + +4. Always use a unit + +The metric name should describe what you are measuring but you also need to provide the unit that it is being measured with. +For a timer, the standard unit is seconds and a counter's standard unit is a total. +For gauges you must provide the unit. +This package provides a standard set of units for use within the Docker projects. + +```go +Nanoseconds Unit = "nanoseconds" +Seconds Unit = "seconds" +Bytes Unit = "bytes" +Total Unit = "total" +``` + +If you need to use a unit but it is not defined in the package please open a PR to add it but first try to see if one of the already created units will work for your metric, i.e. seconds or nanoseconds vs adding milliseconds. + +## Docs + +Package documentation can be found [here](https://godoc.org/github.com/docker/go-metrics). + +## HTTP Metrics + +To instrument a http handler, you can wrap the code like this: + +```go +namespace := metrics.NewNamespace("docker_distribution", "http", metrics.Labels{"handler": "your_http_handler_name"}) +httpMetrics := namespace.NewDefaultHttpMetrics() +metrics.Register(namespace) +instrumentedHandler = metrics.InstrumentHandler(httpMetrics, unInstrumentedHandler) +``` +Note: The `handler` label must be provided when a new namespace is created. + +## Additional Metrics + +Additional metrics are also defined here that are not available in the prometheus client. +If you need a custom metrics and it is generic enough to be used by multiple projects, define it here. + + +## Copyright and license + +Copyright © 2016 Docker, Inc. All rights reserved, except as follows. Code is released under the Apache 2.0 license. The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "LICENSE.docs". You may obtain a duplicate copy of the same license, titled CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/. diff --git a/vendor/github.com/docker/go-metrics/counter.go b/vendor/github.com/docker/go-metrics/counter.go new file mode 100644 index 000000000..fe36316a4 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/counter.go @@ -0,0 +1,52 @@ +package metrics + +import "github.com/prometheus/client_golang/prometheus" + +// Counter is a metrics that can only increment its current count +type Counter interface { + // Inc adds Sum(vs) to the counter. Sum(vs) must be positive. + // + // If len(vs) == 0, increments the counter by 1. + Inc(vs ...float64) +} + +// LabeledCounter is counter that must have labels populated before use. +type LabeledCounter interface { + WithValues(vs ...string) Counter +} + +type labeledCounter struct { + pc *prometheus.CounterVec +} + +func (lc *labeledCounter) WithValues(vs ...string) Counter { + return &counter{pc: lc.pc.WithLabelValues(vs...)} +} + +func (lc *labeledCounter) Describe(ch chan<- *prometheus.Desc) { + lc.pc.Describe(ch) +} + +func (lc *labeledCounter) Collect(ch chan<- prometheus.Metric) { + lc.pc.Collect(ch) +} + +type counter struct { + pc prometheus.Counter +} + +func (c *counter) Inc(vs ...float64) { + if len(vs) == 0 { + c.pc.Inc() + } + + c.pc.Add(sumFloat64(vs...)) +} + +func (c *counter) Describe(ch chan<- *prometheus.Desc) { + c.pc.Describe(ch) +} + +func (c *counter) Collect(ch chan<- prometheus.Metric) { + c.pc.Collect(ch) +} diff --git a/vendor/github.com/docker/go-metrics/docs.go b/vendor/github.com/docker/go-metrics/docs.go new file mode 100644 index 000000000..8fbdfc697 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/docs.go @@ -0,0 +1,3 @@ +// This package is small wrapper around the prometheus go client to help enforce convention and best practices for metrics collection in Docker projects. + +package metrics diff --git a/vendor/github.com/docker/go-metrics/gauge.go b/vendor/github.com/docker/go-metrics/gauge.go new file mode 100644 index 000000000..74296e877 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/gauge.go @@ -0,0 +1,72 @@ +package metrics + +import "github.com/prometheus/client_golang/prometheus" + +// Gauge is a metric that allows incrementing and decrementing a value +type Gauge interface { + Inc(...float64) + Dec(...float64) + + // Add adds the provided value to the gauge's current value + Add(float64) + + // Set replaces the gauge's current value with the provided value + Set(float64) +} + +// LabeledGauge describes a gauge the must have values populated before use. +type LabeledGauge interface { + WithValues(labels ...string) Gauge +} + +type labeledGauge struct { + pg *prometheus.GaugeVec +} + +func (lg *labeledGauge) WithValues(labels ...string) Gauge { + return &gauge{pg: lg.pg.WithLabelValues(labels...)} +} + +func (lg *labeledGauge) Describe(c chan<- *prometheus.Desc) { + lg.pg.Describe(c) +} + +func (lg *labeledGauge) Collect(c chan<- prometheus.Metric) { + lg.pg.Collect(c) +} + +type gauge struct { + pg prometheus.Gauge +} + +func (g *gauge) Inc(vs ...float64) { + if len(vs) == 0 { + g.pg.Inc() + } + + g.Add(sumFloat64(vs...)) +} + +func (g *gauge) Dec(vs ...float64) { + if len(vs) == 0 { + g.pg.Dec() + } + + g.Add(-sumFloat64(vs...)) +} + +func (g *gauge) Add(v float64) { + g.pg.Add(v) +} + +func (g *gauge) Set(v float64) { + g.pg.Set(v) +} + +func (g *gauge) Describe(c chan<- *prometheus.Desc) { + g.pg.Describe(c) +} + +func (g *gauge) Collect(c chan<- prometheus.Metric) { + g.pg.Collect(c) +} diff --git a/vendor/github.com/docker/go-metrics/handler.go b/vendor/github.com/docker/go-metrics/handler.go new file mode 100644 index 000000000..05601e9ec --- /dev/null +++ b/vendor/github.com/docker/go-metrics/handler.go @@ -0,0 +1,74 @@ +package metrics + +import ( + "net/http" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" +) + +// HTTPHandlerOpts describes a set of configurable options of http metrics +type HTTPHandlerOpts struct { + DurationBuckets []float64 + RequestSizeBuckets []float64 + ResponseSizeBuckets []float64 +} + +const ( + InstrumentHandlerResponseSize = iota + InstrumentHandlerRequestSize + InstrumentHandlerDuration + InstrumentHandlerCounter + InstrumentHandlerInFlight +) + +type HTTPMetric struct { + prometheus.Collector + handlerType int +} + +var ( + defaultDurationBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 25, 60} + defaultRequestSizeBuckets = prometheus.ExponentialBuckets(1024, 2, 22) //1K to 4G + defaultResponseSizeBuckets = defaultRequestSizeBuckets +) + +// Handler returns the global http.Handler that provides the prometheus +// metrics format on GET requests. This handler is no longer instrumented. +func Handler() http.Handler { + return promhttp.Handler() +} + +func InstrumentHandler(metrics []*HTTPMetric, handler http.Handler) http.HandlerFunc { + return InstrumentHandlerFunc(metrics, handler.ServeHTTP) +} + +func InstrumentHandlerFunc(metrics []*HTTPMetric, handlerFunc http.HandlerFunc) http.HandlerFunc { + var handler http.Handler + handler = http.HandlerFunc(handlerFunc) + for _, metric := range metrics { + switch metric.handlerType { + case InstrumentHandlerResponseSize: + if collector, ok := metric.Collector.(prometheus.ObserverVec); ok { + handler = promhttp.InstrumentHandlerResponseSize(collector, handler) + } + case InstrumentHandlerRequestSize: + if collector, ok := metric.Collector.(prometheus.ObserverVec); ok { + handler = promhttp.InstrumentHandlerRequestSize(collector, handler) + } + case InstrumentHandlerDuration: + if collector, ok := metric.Collector.(prometheus.ObserverVec); ok { + handler = promhttp.InstrumentHandlerDuration(collector, handler) + } + case InstrumentHandlerCounter: + if collector, ok := metric.Collector.(*prometheus.CounterVec); ok { + handler = promhttp.InstrumentHandlerCounter(collector, handler) + } + case InstrumentHandlerInFlight: + if collector, ok := metric.Collector.(prometheus.Gauge); ok { + handler = promhttp.InstrumentHandlerInFlight(collector, handler) + } + } + } + return handler.ServeHTTP +} diff --git a/vendor/github.com/docker/go-metrics/helpers.go b/vendor/github.com/docker/go-metrics/helpers.go new file mode 100644 index 000000000..68b7f51b3 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/helpers.go @@ -0,0 +1,10 @@ +package metrics + +func sumFloat64(vs ...float64) float64 { + var sum float64 + for _, v := range vs { + sum += v + } + + return sum +} diff --git a/vendor/github.com/docker/go-metrics/namespace.go b/vendor/github.com/docker/go-metrics/namespace.go new file mode 100644 index 000000000..798315451 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/namespace.go @@ -0,0 +1,315 @@ +package metrics + +import ( + "fmt" + "sync" + + "github.com/prometheus/client_golang/prometheus" +) + +type Labels map[string]string + +// NewNamespace returns a namespaces that is responsible for managing a collection of +// metrics for a particual namespace and subsystem +// +// labels allows const labels to be added to all metrics created in this namespace +// and are commonly used for data like application version and git commit +func NewNamespace(name, subsystem string, labels Labels) *Namespace { + if labels == nil { + labels = make(map[string]string) + } + return &Namespace{ + name: name, + subsystem: subsystem, + labels: labels, + } +} + +// Namespace describes a set of metrics that share a namespace and subsystem. +type Namespace struct { + name string + subsystem string + labels Labels + mu sync.Mutex + metrics []prometheus.Collector +} + +// WithConstLabels returns a namespace with the provided set of labels merged +// with the existing constant labels on the namespace. +// +// Only metrics created with the returned namespace will get the new constant +// labels. The returned namespace must be registered separately. +func (n *Namespace) WithConstLabels(labels Labels) *Namespace { + n.mu.Lock() + ns := &Namespace{ + name: n.name, + subsystem: n.subsystem, + labels: mergeLabels(n.labels, labels), + } + n.mu.Unlock() + return ns +} + +func (n *Namespace) NewCounter(name, help string) Counter { + c := &counter{pc: prometheus.NewCounter(n.newCounterOpts(name, help))} + n.Add(c) + return c +} + +func (n *Namespace) NewLabeledCounter(name, help string, labels ...string) LabeledCounter { + c := &labeledCounter{pc: prometheus.NewCounterVec(n.newCounterOpts(name, help), labels)} + n.Add(c) + return c +} + +func (n *Namespace) newCounterOpts(name, help string) prometheus.CounterOpts { + return prometheus.CounterOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: makeName(name, Total), + Help: help, + ConstLabels: prometheus.Labels(n.labels), + } +} + +func (n *Namespace) NewTimer(name, help string) Timer { + t := &timer{ + m: prometheus.NewHistogram(n.newTimerOpts(name, help)), + } + n.Add(t) + return t +} + +func (n *Namespace) NewLabeledTimer(name, help string, labels ...string) LabeledTimer { + t := &labeledTimer{ + m: prometheus.NewHistogramVec(n.newTimerOpts(name, help), labels), + } + n.Add(t) + return t +} + +func (n *Namespace) newTimerOpts(name, help string) prometheus.HistogramOpts { + return prometheus.HistogramOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: makeName(name, Seconds), + Help: help, + ConstLabels: prometheus.Labels(n.labels), + } +} + +func (n *Namespace) NewGauge(name, help string, unit Unit) Gauge { + g := &gauge{ + pg: prometheus.NewGauge(n.newGaugeOpts(name, help, unit)), + } + n.Add(g) + return g +} + +func (n *Namespace) NewLabeledGauge(name, help string, unit Unit, labels ...string) LabeledGauge { + g := &labeledGauge{ + pg: prometheus.NewGaugeVec(n.newGaugeOpts(name, help, unit), labels), + } + n.Add(g) + return g +} + +func (n *Namespace) newGaugeOpts(name, help string, unit Unit) prometheus.GaugeOpts { + return prometheus.GaugeOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: makeName(name, unit), + Help: help, + ConstLabels: prometheus.Labels(n.labels), + } +} + +func (n *Namespace) Describe(ch chan<- *prometheus.Desc) { + n.mu.Lock() + defer n.mu.Unlock() + + for _, metric := range n.metrics { + metric.Describe(ch) + } +} + +func (n *Namespace) Collect(ch chan<- prometheus.Metric) { + n.mu.Lock() + defer n.mu.Unlock() + + for _, metric := range n.metrics { + metric.Collect(ch) + } +} + +func (n *Namespace) Add(collector prometheus.Collector) { + n.mu.Lock() + n.metrics = append(n.metrics, collector) + n.mu.Unlock() +} + +func (n *Namespace) NewDesc(name, help string, unit Unit, labels ...string) *prometheus.Desc { + name = makeName(name, unit) + namespace := n.name + if n.subsystem != "" { + namespace = fmt.Sprintf("%s_%s", namespace, n.subsystem) + } + name = fmt.Sprintf("%s_%s", namespace, name) + return prometheus.NewDesc(name, help, labels, prometheus.Labels(n.labels)) +} + +// mergeLabels merges two or more labels objects into a single map, favoring +// the later labels. +func mergeLabels(lbs ...Labels) Labels { + merged := make(Labels) + + for _, target := range lbs { + for k, v := range target { + merged[k] = v + } + } + + return merged +} + +func makeName(name string, unit Unit) string { + if unit == "" { + return name + } + + return fmt.Sprintf("%s_%s", name, unit) +} + +func (n *Namespace) NewDefaultHttpMetrics(handlerName string) []*HTTPMetric { + return n.NewHttpMetricsWithOpts(handlerName, HTTPHandlerOpts{ + DurationBuckets: defaultDurationBuckets, + RequestSizeBuckets: defaultResponseSizeBuckets, + ResponseSizeBuckets: defaultResponseSizeBuckets, + }) +} + +func (n *Namespace) NewHttpMetrics(handlerName string, durationBuckets, requestSizeBuckets, responseSizeBuckets []float64) []*HTTPMetric { + return n.NewHttpMetricsWithOpts(handlerName, HTTPHandlerOpts{ + DurationBuckets: durationBuckets, + RequestSizeBuckets: requestSizeBuckets, + ResponseSizeBuckets: responseSizeBuckets, + }) +} + +func (n *Namespace) NewHttpMetricsWithOpts(handlerName string, opts HTTPHandlerOpts) []*HTTPMetric { + var httpMetrics []*HTTPMetric + inFlightMetric := n.NewInFlightGaugeMetric(handlerName) + requestTotalMetric := n.NewRequestTotalMetric(handlerName) + requestDurationMetric := n.NewRequestDurationMetric(handlerName, opts.DurationBuckets) + requestSizeMetric := n.NewRequestSizeMetric(handlerName, opts.RequestSizeBuckets) + responseSizeMetric := n.NewResponseSizeMetric(handlerName, opts.ResponseSizeBuckets) + httpMetrics = append(httpMetrics, inFlightMetric, requestDurationMetric, requestTotalMetric, requestSizeMetric, responseSizeMetric) + return httpMetrics +} + +func (n *Namespace) NewInFlightGaugeMetric(handlerName string) *HTTPMetric { + labels := prometheus.Labels(n.labels) + labels["handler"] = handlerName + metric := prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: "in_flight_requests", + Help: "The in-flight HTTP requests", + ConstLabels: prometheus.Labels(labels), + }) + httpMetric := &HTTPMetric{ + Collector: metric, + handlerType: InstrumentHandlerInFlight, + } + n.Add(httpMetric) + return httpMetric +} + +func (n *Namespace) NewRequestTotalMetric(handlerName string) *HTTPMetric { + labels := prometheus.Labels(n.labels) + labels["handler"] = handlerName + metric := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: "requests_total", + Help: "Total number of HTTP requests made.", + ConstLabels: prometheus.Labels(labels), + }, + []string{"code", "method"}, + ) + httpMetric := &HTTPMetric{ + Collector: metric, + handlerType: InstrumentHandlerCounter, + } + n.Add(httpMetric) + return httpMetric +} +func (n *Namespace) NewRequestDurationMetric(handlerName string, buckets []float64) *HTTPMetric { + if len(buckets) == 0 { + panic("DurationBuckets must be provided") + } + labels := prometheus.Labels(n.labels) + labels["handler"] = handlerName + opts := prometheus.HistogramOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: "request_duration_seconds", + Help: "The HTTP request latencies in seconds.", + Buckets: buckets, + ConstLabels: prometheus.Labels(labels), + } + metric := prometheus.NewHistogramVec(opts, []string{"method"}) + httpMetric := &HTTPMetric{ + Collector: metric, + handlerType: InstrumentHandlerDuration, + } + n.Add(httpMetric) + return httpMetric +} + +func (n *Namespace) NewRequestSizeMetric(handlerName string, buckets []float64) *HTTPMetric { + if len(buckets) == 0 { + panic("RequestSizeBuckets must be provided") + } + labels := prometheus.Labels(n.labels) + labels["handler"] = handlerName + opts := prometheus.HistogramOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: "request_size_bytes", + Help: "The HTTP request sizes in bytes.", + Buckets: buckets, + ConstLabels: prometheus.Labels(labels), + } + metric := prometheus.NewHistogramVec(opts, []string{}) + httpMetric := &HTTPMetric{ + Collector: metric, + handlerType: InstrumentHandlerRequestSize, + } + n.Add(httpMetric) + return httpMetric +} + +func (n *Namespace) NewResponseSizeMetric(handlerName string, buckets []float64) *HTTPMetric { + if len(buckets) == 0 { + panic("ResponseSizeBuckets must be provided") + } + labels := prometheus.Labels(n.labels) + labels["handler"] = handlerName + opts := prometheus.HistogramOpts{ + Namespace: n.name, + Subsystem: n.subsystem, + Name: "response_size_bytes", + Help: "The HTTP response sizes in bytes.", + Buckets: buckets, + ConstLabels: prometheus.Labels(labels), + } + metrics := prometheus.NewHistogramVec(opts, []string{}) + httpMetric := &HTTPMetric{ + Collector: metrics, + handlerType: InstrumentHandlerResponseSize, + } + n.Add(httpMetric) + return httpMetric +} diff --git a/vendor/github.com/docker/go-metrics/register.go b/vendor/github.com/docker/go-metrics/register.go new file mode 100644 index 000000000..708358df0 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/register.go @@ -0,0 +1,15 @@ +package metrics + +import "github.com/prometheus/client_golang/prometheus" + +// Register adds all the metrics in the provided namespace to the global +// metrics registry +func Register(n *Namespace) { + prometheus.MustRegister(n) +} + +// Deregister removes all the metrics in the provided namespace from the +// global metrics registry +func Deregister(n *Namespace) { + prometheus.Unregister(n) +} diff --git a/vendor/github.com/docker/go-metrics/timer.go b/vendor/github.com/docker/go-metrics/timer.go new file mode 100644 index 000000000..824c98739 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/timer.go @@ -0,0 +1,85 @@ +package metrics + +import ( + "time" + + "github.com/prometheus/client_golang/prometheus" +) + +// StartTimer begins a timer observation at the callsite. When the target +// operation is completed, the caller should call the return done func(). +func StartTimer(timer Timer) (done func()) { + start := time.Now() + return func() { + timer.Update(time.Since(start)) + } +} + +// Timer is a metric that allows collecting the duration of an action in seconds +type Timer interface { + // Update records an observation, duration, and converts to the target + // units. + Update(duration time.Duration) + + // UpdateSince will add the duration from the provided starting time to the + // timer's summary with the precisions that was used in creation of the timer + UpdateSince(time.Time) +} + +// LabeledTimer is a timer that must have label values populated before use. +type LabeledTimer interface { + WithValues(labels ...string) *labeledTimerObserver +} + +type labeledTimer struct { + m *prometheus.HistogramVec +} + +type labeledTimerObserver struct { + m prometheus.Observer +} + +func (lbo *labeledTimerObserver) Update(duration time.Duration) { + lbo.m.Observe(duration.Seconds()) +} + +func (lbo *labeledTimerObserver) UpdateSince(since time.Time) { + lbo.m.Observe(time.Since(since).Seconds()) +} + +func (lt *labeledTimer) WithValues(labels ...string) *labeledTimerObserver { + return &labeledTimerObserver{m: lt.m.WithLabelValues(labels...)} +} + +func (lt *labeledTimer) Describe(c chan<- *prometheus.Desc) { + lt.m.Describe(c) +} + +func (lt *labeledTimer) Collect(c chan<- prometheus.Metric) { + lt.m.Collect(c) +} + +type timer struct { + m prometheus.Observer +} + +func (t *timer) Update(duration time.Duration) { + t.m.Observe(duration.Seconds()) +} + +func (t *timer) UpdateSince(since time.Time) { + t.m.Observe(time.Since(since).Seconds()) +} + +func (t *timer) Describe(c chan<- *prometheus.Desc) { + c <- t.m.(prometheus.Metric).Desc() +} + +func (t *timer) Collect(c chan<- prometheus.Metric) { + // Are there any observers that don't implement Collector? It is really + // unclear what the point of the upstream change was, but we'll let this + // panic if we get an observer that doesn't implement collector. In this + // case, we should almost always see metricVec objects, so this should + // never panic. + t.m.(prometheus.Collector).Collect(c) +} diff --git a/vendor/github.com/docker/go-metrics/unit.go b/vendor/github.com/docker/go-metrics/unit.go new file mode 100644 index 000000000..c96622f90 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/unit.go @@ -0,0 +1,12 @@ +package metrics + +// Unit represents the type or precision of a metric that is appended to +// the metrics fully qualified name +type Unit string + +const ( + Nanoseconds Unit = "nanoseconds" + Seconds Unit = "seconds" + Bytes Unit = "bytes" + Total Unit = "total" +) diff --git a/vendor/github.com/fatih/color/LICENSE.md b/vendor/github.com/fatih/color/LICENSE.md new file mode 100644 index 000000000..25fdaf639 --- /dev/null +++ b/vendor/github.com/fatih/color/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Fatih Arslan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md new file mode 100644 index 000000000..5152bf59b --- /dev/null +++ b/vendor/github.com/fatih/color/README.md @@ -0,0 +1,178 @@ +# color [![](https://github.com/fatih/color/workflows/build/badge.svg)](https://github.com/fatih/color/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/fatih/color)](https://pkg.go.dev/github.com/fatih/color) + +Color lets you use colorized outputs in terms of [ANSI Escape +Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It +has support for Windows too! The API can be used in several ways, pick one that +suits you. + +![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg) + + +## Install + +```bash +go get github.com/fatih/color +``` + +## Examples + +### Standard colors + +```go +// Print with default helper functions +color.Cyan("Prints text in cyan.") + +// A newline will be appended automatically +color.Blue("Prints %s in blue.", "text") + +// These are using the default foreground colors +color.Red("We have red") +color.Magenta("And many others ..") + +``` + +### Mix and reuse colors + +```go +// Create a new color object +c := color.New(color.FgCyan).Add(color.Underline) +c.Println("Prints cyan text with an underline.") + +// Or just add them to New() +d := color.New(color.FgCyan, color.Bold) +d.Printf("This prints bold cyan %s\n", "too!.") + +// Mix up foreground and background colors, create new mixes! +red := color.New(color.FgRed) + +boldRed := red.Add(color.Bold) +boldRed.Println("This will print text in bold red.") + +whiteBackground := red.Add(color.BgWhite) +whiteBackground.Println("Red text with white background.") +``` + +### Use your own output (io.Writer) + +```go +// Use your own io.Writer output +color.New(color.FgBlue).Fprintln(myWriter, "blue color!") + +blue := color.New(color.FgBlue) +blue.Fprint(writer, "This will print text in blue.") +``` + +### Custom print functions (PrintFunc) + +```go +// Create a custom print function for convenience +red := color.New(color.FgRed).PrintfFunc() +red("Warning") +red("Error: %s", err) + +// Mix up multiple attributes +notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() +notice("Don't forget this...") +``` + +### Custom fprint functions (FprintFunc) + +```go +blue := color.New(color.FgBlue).FprintfFunc() +blue(myWriter, "important notice: %s", stars) + +// Mix up with multiple attributes +success := color.New(color.Bold, color.FgGreen).FprintlnFunc() +success(myWriter, "Don't forget this...") +``` + +### Insert into noncolor strings (SprintFunc) + +```go +// Create SprintXxx functions to mix strings with other non-colorized strings: +yellow := color.New(color.FgYellow).SprintFunc() +red := color.New(color.FgRed).SprintFunc() +fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) + +info := color.New(color.FgWhite, color.BgGreen).SprintFunc() +fmt.Printf("This %s rocks!\n", info("package")) + +// Use helper functions +fmt.Println("This", color.RedString("warning"), "should be not neglected.") +fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") + +// Windows supported too! Just don't forget to change the output to color.Output +fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) +``` + +### Plug into existing code + +```go +// Use handy standard colors +color.Set(color.FgYellow) + +fmt.Println("Existing text will now be in yellow") +fmt.Printf("This one %s\n", "too") + +color.Unset() // Don't forget to unset + +// You can mix up parameters +color.Set(color.FgMagenta, color.Bold) +defer color.Unset() // Use it in your function + +fmt.Println("All text will now be bold magenta.") +``` + +### Disable/Enable color + +There might be a case where you want to explicitly disable/enable color output. the +`go-isatty` package will automatically disable color output for non-tty output streams +(for example if the output were piped directly to `less`). + +The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment +variable is set (regardless of its value). + +`Color` has support to disable/enable colors programatically both globally and +for single color definitions. For example suppose you have a CLI app and a +`--no-color` bool flag. You can easily disable the color output with: + +```go +var flagNoColor = flag.Bool("no-color", false, "Disable color output") + +if *flagNoColor { + color.NoColor = true // disables colorized output +} +``` + +It also has support for single color definitions (local). You can +disable/enable color output on the fly: + +```go +c := color.New(color.FgCyan) +c.Println("Prints cyan text") + +c.DisableColor() +c.Println("This is printed without any color") + +c.EnableColor() +c.Println("This prints again cyan...") +``` + +## GitHub Actions + +To output color in GitHub Actions (or other CI systems that support ANSI colors), make sure to set `color.NoColor = false` so that it bypasses the check for non-tty output streams. + +## Todo + +* Save/Return previous values +* Evaluate fmt.Formatter interface + + +## Credits + + * [Fatih Arslan](https://github.com/fatih) + * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) + +## License + +The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go new file mode 100644 index 000000000..98a60f3c8 --- /dev/null +++ b/vendor/github.com/fatih/color/color.go @@ -0,0 +1,618 @@ +package color + +import ( + "fmt" + "io" + "os" + "strconv" + "strings" + "sync" + + "github.com/mattn/go-colorable" + "github.com/mattn/go-isatty" +) + +var ( + // NoColor defines if the output is colorized or not. It's dynamically set to + // false or true based on the stdout's file descriptor referring to a terminal + // or not. It's also set to true if the NO_COLOR environment variable is + // set (regardless of its value). This is a global option and affects all + // colors. For more control over each color block use the methods + // DisableColor() individually. + NoColor = noColorExists() || os.Getenv("TERM") == "dumb" || + (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) + + // Output defines the standard output of the print functions. By default + // os.Stdout is used. + Output = colorable.NewColorableStdout() + + // Error defines a color supporting writer for os.Stderr. + Error = colorable.NewColorableStderr() + + // colorsCache is used to reduce the count of created Color objects and + // allows to reuse already created objects with required Attribute. + colorsCache = make(map[Attribute]*Color) + colorsCacheMu sync.Mutex // protects colorsCache +) + +// noColorExists returns true if the environment variable NO_COLOR exists. +func noColorExists() bool { + _, exists := os.LookupEnv("NO_COLOR") + return exists +} + +// Color defines a custom color object which is defined by SGR parameters. +type Color struct { + params []Attribute + noColor *bool +} + +// Attribute defines a single SGR Code +type Attribute int + +const escape = "\x1b" + +// Base attributes +const ( + Reset Attribute = iota + Bold + Faint + Italic + Underline + BlinkSlow + BlinkRapid + ReverseVideo + Concealed + CrossedOut +) + +// Foreground text colors +const ( + FgBlack Attribute = iota + 30 + FgRed + FgGreen + FgYellow + FgBlue + FgMagenta + FgCyan + FgWhite +) + +// Foreground Hi-Intensity text colors +const ( + FgHiBlack Attribute = iota + 90 + FgHiRed + FgHiGreen + FgHiYellow + FgHiBlue + FgHiMagenta + FgHiCyan + FgHiWhite +) + +// Background text colors +const ( + BgBlack Attribute = iota + 40 + BgRed + BgGreen + BgYellow + BgBlue + BgMagenta + BgCyan + BgWhite +) + +// Background Hi-Intensity text colors +const ( + BgHiBlack Attribute = iota + 100 + BgHiRed + BgHiGreen + BgHiYellow + BgHiBlue + BgHiMagenta + BgHiCyan + BgHiWhite +) + +// New returns a newly created color object. +func New(value ...Attribute) *Color { + c := &Color{ + params: make([]Attribute, 0), + } + + if noColorExists() { + c.noColor = boolPtr(true) + } + + c.Add(value...) + return c +} + +// Set sets the given parameters immediately. It will change the color of +// output with the given SGR parameters until color.Unset() is called. +func Set(p ...Attribute) *Color { + c := New(p...) + c.Set() + return c +} + +// Unset resets all escape attributes and clears the output. Usually should +// be called after Set(). +func Unset() { + if NoColor { + return + } + + fmt.Fprintf(Output, "%s[%dm", escape, Reset) +} + +// Set sets the SGR sequence. +func (c *Color) Set() *Color { + if c.isNoColorSet() { + return c + } + + fmt.Fprintf(Output, c.format()) + return c +} + +func (c *Color) unset() { + if c.isNoColorSet() { + return + } + + Unset() +} + +func (c *Color) setWriter(w io.Writer) *Color { + if c.isNoColorSet() { + return c + } + + fmt.Fprintf(w, c.format()) + return c +} + +func (c *Color) unsetWriter(w io.Writer) { + if c.isNoColorSet() { + return + } + + if NoColor { + return + } + + fmt.Fprintf(w, "%s[%dm", escape, Reset) +} + +// Add is used to chain SGR parameters. Use as many as parameters to combine +// and create custom color objects. Example: Add(color.FgRed, color.Underline). +func (c *Color) Add(value ...Attribute) *Color { + c.params = append(c.params, value...) + return c +} + +func (c *Color) prepend(value Attribute) { + c.params = append(c.params, 0) + copy(c.params[1:], c.params[0:]) + c.params[0] = value +} + +// Fprint formats using the default formats for its operands and writes to w. +// Spaces are added between operands when neither is a string. +// It returns the number of bytes written and any write error encountered. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprint(w, a...) +} + +// Print formats using the default formats for its operands and writes to +// standard output. Spaces are added between operands when neither is a +// string. It returns the number of bytes written and any write error +// encountered. This is the standard fmt.Print() method wrapped with the given +// color. +func (c *Color) Print(a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprint(Output, a...) +} + +// Fprintf formats according to a format specifier and writes to w. +// It returns the number of bytes written and any write error encountered. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprintf(w, format, a...) +} + +// Printf formats according to a format specifier and writes to standard output. +// It returns the number of bytes written and any write error encountered. +// This is the standard fmt.Printf() method wrapped with the given color. +func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprintf(Output, format, a...) +} + +// Fprintln formats using the default formats for its operands and writes to w. +// Spaces are always added between operands and a newline is appended. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprintln(w, a...) +} + +// Println formats using the default formats for its operands and writes to +// standard output. Spaces are always added between operands and a newline is +// appended. It returns the number of bytes written and any write error +// encountered. This is the standard fmt.Print() method wrapped with the given +// color. +func (c *Color) Println(a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprintln(Output, a...) +} + +// Sprint is just like Print, but returns a string instead of printing it. +func (c *Color) Sprint(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) +} + +// Sprintln is just like Println, but returns a string instead of printing it. +func (c *Color) Sprintln(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) +} + +// Sprintf is just like Printf, but returns a string instead of printing it. +func (c *Color) Sprintf(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) +} + +// FprintFunc returns a new function that prints the passed arguments as +// colorized with color.Fprint(). +func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { + return func(w io.Writer, a ...interface{}) { + c.Fprint(w, a...) + } +} + +// PrintFunc returns a new function that prints the passed arguments as +// colorized with color.Print(). +func (c *Color) PrintFunc() func(a ...interface{}) { + return func(a ...interface{}) { + c.Print(a...) + } +} + +// FprintfFunc returns a new function that prints the passed arguments as +// colorized with color.Fprintf(). +func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) { + return func(w io.Writer, format string, a ...interface{}) { + c.Fprintf(w, format, a...) + } +} + +// PrintfFunc returns a new function that prints the passed arguments as +// colorized with color.Printf(). +func (c *Color) PrintfFunc() func(format string, a ...interface{}) { + return func(format string, a ...interface{}) { + c.Printf(format, a...) + } +} + +// FprintlnFunc returns a new function that prints the passed arguments as +// colorized with color.Fprintln(). +func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) { + return func(w io.Writer, a ...interface{}) { + c.Fprintln(w, a...) + } +} + +// PrintlnFunc returns a new function that prints the passed arguments as +// colorized with color.Println(). +func (c *Color) PrintlnFunc() func(a ...interface{}) { + return func(a ...interface{}) { + c.Println(a...) + } +} + +// SprintFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprint(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output, example: +// +// put := New(FgYellow).SprintFunc() +// fmt.Fprintf(color.Output, "This is a %s", put("warning")) +func (c *Color) SprintFunc() func(a ...interface{}) string { + return func(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) + } +} + +// SprintfFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprintf(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output. +func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { + return func(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) + } +} + +// SprintlnFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprintln(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output. +func (c *Color) SprintlnFunc() func(a ...interface{}) string { + return func(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) + } +} + +// sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" +// an example output might be: "1;36" -> bold cyan +func (c *Color) sequence() string { + format := make([]string, len(c.params)) + for i, v := range c.params { + format[i] = strconv.Itoa(int(v)) + } + + return strings.Join(format, ";") +} + +// wrap wraps the s string with the colors attributes. The string is ready to +// be printed. +func (c *Color) wrap(s string) string { + if c.isNoColorSet() { + return s + } + + return c.format() + s + c.unformat() +} + +func (c *Color) format() string { + return fmt.Sprintf("%s[%sm", escape, c.sequence()) +} + +func (c *Color) unformat() string { + return fmt.Sprintf("%s[%dm", escape, Reset) +} + +// DisableColor disables the color output. Useful to not change any existing +// code and still being able to output. Can be used for flags like +// "--no-color". To enable back use EnableColor() method. +func (c *Color) DisableColor() { + c.noColor = boolPtr(true) +} + +// EnableColor enables the color output. Use it in conjunction with +// DisableColor(). Otherwise this method has no side effects. +func (c *Color) EnableColor() { + c.noColor = boolPtr(false) +} + +func (c *Color) isNoColorSet() bool { + // check first if we have user set action + if c.noColor != nil { + return *c.noColor + } + + // if not return the global option, which is disabled by default + return NoColor +} + +// Equals returns a boolean value indicating whether two colors are equal. +func (c *Color) Equals(c2 *Color) bool { + if len(c.params) != len(c2.params) { + return false + } + + for _, attr := range c.params { + if !c2.attrExists(attr) { + return false + } + } + + return true +} + +func (c *Color) attrExists(a Attribute) bool { + for _, attr := range c.params { + if attr == a { + return true + } + } + + return false +} + +func boolPtr(v bool) *bool { + return &v +} + +func getCachedColor(p Attribute) *Color { + colorsCacheMu.Lock() + defer colorsCacheMu.Unlock() + + c, ok := colorsCache[p] + if !ok { + c = New(p) + colorsCache[p] = c + } + + return c +} + +func colorPrint(format string, p Attribute, a ...interface{}) { + c := getCachedColor(p) + + if !strings.HasSuffix(format, "\n") { + format += "\n" + } + + if len(a) == 0 { + c.Print(format) + } else { + c.Printf(format, a...) + } +} + +func colorString(format string, p Attribute, a ...interface{}) string { + c := getCachedColor(p) + + if len(a) == 0 { + return c.SprintFunc()(format) + } + + return c.SprintfFunc()(format, a...) +} + +// Black is a convenient helper function to print with black foreground. A +// newline is appended to format by default. +func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) } + +// Red is a convenient helper function to print with red foreground. A +// newline is appended to format by default. +func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) } + +// Green is a convenient helper function to print with green foreground. A +// newline is appended to format by default. +func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) } + +// Yellow is a convenient helper function to print with yellow foreground. +// A newline is appended to format by default. +func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) } + +// Blue is a convenient helper function to print with blue foreground. A +// newline is appended to format by default. +func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) } + +// Magenta is a convenient helper function to print with magenta foreground. +// A newline is appended to format by default. +func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) } + +// Cyan is a convenient helper function to print with cyan foreground. A +// newline is appended to format by default. +func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) } + +// White is a convenient helper function to print with white foreground. A +// newline is appended to format by default. +func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) } + +// BlackString is a convenient helper function to return a string with black +// foreground. +func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) } + +// RedString is a convenient helper function to return a string with red +// foreground. +func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) } + +// GreenString is a convenient helper function to return a string with green +// foreground. +func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) } + +// YellowString is a convenient helper function to return a string with yellow +// foreground. +func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) } + +// BlueString is a convenient helper function to return a string with blue +// foreground. +func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) } + +// MagentaString is a convenient helper function to return a string with magenta +// foreground. +func MagentaString(format string, a ...interface{}) string { + return colorString(format, FgMagenta, a...) +} + +// CyanString is a convenient helper function to return a string with cyan +// foreground. +func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) } + +// WhiteString is a convenient helper function to return a string with white +// foreground. +func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) } + +// HiBlack is a convenient helper function to print with hi-intensity black foreground. A +// newline is appended to format by default. +func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) } + +// HiRed is a convenient helper function to print with hi-intensity red foreground. A +// newline is appended to format by default. +func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) } + +// HiGreen is a convenient helper function to print with hi-intensity green foreground. A +// newline is appended to format by default. +func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) } + +// HiYellow is a convenient helper function to print with hi-intensity yellow foreground. +// A newline is appended to format by default. +func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) } + +// HiBlue is a convenient helper function to print with hi-intensity blue foreground. A +// newline is appended to format by default. +func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) } + +// HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. +// A newline is appended to format by default. +func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) } + +// HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A +// newline is appended to format by default. +func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) } + +// HiWhite is a convenient helper function to print with hi-intensity white foreground. A +// newline is appended to format by default. +func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) } + +// HiBlackString is a convenient helper function to return a string with hi-intensity black +// foreground. +func HiBlackString(format string, a ...interface{}) string { + return colorString(format, FgHiBlack, a...) +} + +// HiRedString is a convenient helper function to return a string with hi-intensity red +// foreground. +func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) } + +// HiGreenString is a convenient helper function to return a string with hi-intensity green +// foreground. +func HiGreenString(format string, a ...interface{}) string { + return colorString(format, FgHiGreen, a...) +} + +// HiYellowString is a convenient helper function to return a string with hi-intensity yellow +// foreground. +func HiYellowString(format string, a ...interface{}) string { + return colorString(format, FgHiYellow, a...) +} + +// HiBlueString is a convenient helper function to return a string with hi-intensity blue +// foreground. +func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) } + +// HiMagentaString is a convenient helper function to return a string with hi-intensity magenta +// foreground. +func HiMagentaString(format string, a ...interface{}) string { + return colorString(format, FgHiMagenta, a...) +} + +// HiCyanString is a convenient helper function to return a string with hi-intensity cyan +// foreground. +func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) } + +// HiWhiteString is a convenient helper function to return a string with hi-intensity white +// foreground. +func HiWhiteString(format string, a ...interface{}) string { + return colorString(format, FgHiWhite, a...) +} diff --git a/vendor/github.com/fatih/color/doc.go b/vendor/github.com/fatih/color/doc.go new file mode 100644 index 000000000..04541de78 --- /dev/null +++ b/vendor/github.com/fatih/color/doc.go @@ -0,0 +1,135 @@ +/* +Package color is an ANSI color package to output colorized or SGR defined +output to the standard output. The API can be used in several way, pick one +that suits you. + +Use simple and default helper functions with predefined foreground colors: + + color.Cyan("Prints text in cyan.") + + // a newline will be appended automatically + color.Blue("Prints %s in blue.", "text") + + // More default foreground colors.. + color.Red("We have red") + color.Yellow("Yellow color too!") + color.Magenta("And many others ..") + + // Hi-intensity colors + color.HiGreen("Bright green color.") + color.HiBlack("Bright black means gray..") + color.HiWhite("Shiny white color!") + +However there are times where custom color mixes are required. Below are some +examples to create custom color objects and use the print functions of each +separate color object. + + // Create a new color object + c := color.New(color.FgCyan).Add(color.Underline) + c.Println("Prints cyan text with an underline.") + + // Or just add them to New() + d := color.New(color.FgCyan, color.Bold) + d.Printf("This prints bold cyan %s\n", "too!.") + + + // Mix up foreground and background colors, create new mixes! + red := color.New(color.FgRed) + + boldRed := red.Add(color.Bold) + boldRed.Println("This will print text in bold red.") + + whiteBackground := red.Add(color.BgWhite) + whiteBackground.Println("Red text with White background.") + + // Use your own io.Writer output + color.New(color.FgBlue).Fprintln(myWriter, "blue color!") + + blue := color.New(color.FgBlue) + blue.Fprint(myWriter, "This will print text in blue.") + +You can create PrintXxx functions to simplify even more: + + // Create a custom print function for convenient + red := color.New(color.FgRed).PrintfFunc() + red("warning") + red("error: %s", err) + + // Mix up multiple attributes + notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() + notice("don't forget this...") + +You can also FprintXxx functions to pass your own io.Writer: + + blue := color.New(FgBlue).FprintfFunc() + blue(myWriter, "important notice: %s", stars) + + // Mix up with multiple attributes + success := color.New(color.Bold, color.FgGreen).FprintlnFunc() + success(myWriter, don't forget this...") + + +Or create SprintXxx functions to mix strings with other non-colorized strings: + + yellow := New(FgYellow).SprintFunc() + red := New(FgRed).SprintFunc() + + fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Printf("this %s rocks!\n", info("package")) + +Windows support is enabled by default. All Print functions work as intended. +However only for color.SprintXXX functions, user should use fmt.FprintXXX and +set the output to color.Output: + + fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) + +Using with existing code is possible. Just use the Set() method to set the +standard output to the given parameters. That way a rewrite of an existing +code is not required. + + // Use handy standard colors. + color.Set(color.FgYellow) + + fmt.Println("Existing text will be now in Yellow") + fmt.Printf("This one %s\n", "too") + + color.Unset() // don't forget to unset + + // You can mix up parameters + color.Set(color.FgMagenta, color.Bold) + defer color.Unset() // use it in your function + + fmt.Println("All text will be now bold magenta.") + +There might be a case where you want to disable color output (for example to +pipe the standard output of your app to somewhere else). `Color` has support to +disable colors both globally and for single color definition. For example +suppose you have a CLI app and a `--no-color` bool flag. You can easily disable +the color output with: + + var flagNoColor = flag.Bool("no-color", false, "Disable color output") + + if *flagNoColor { + color.NoColor = true // disables colorized output + } + +You can also disable the color by setting the NO_COLOR environment variable to any value. + +It also has support for single color definitions (local). You can +disable/enable color output on the fly: + + c := color.New(color.FgCyan) + c.Println("Prints cyan text") + + c.DisableColor() + c.Println("This is printed without any color") + + c.EnableColor() + c.Println("This prints again cyan...") +*/ +package color diff --git a/vendor/github.com/felixge/httpsnoop/.gitignore b/vendor/github.com/felixge/httpsnoop/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/github.com/felixge/httpsnoop/LICENSE.txt b/vendor/github.com/felixge/httpsnoop/LICENSE.txt new file mode 100644 index 000000000..e028b46a9 --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/vendor/github.com/felixge/httpsnoop/Makefile b/vendor/github.com/felixge/httpsnoop/Makefile new file mode 100644 index 000000000..4e12afdd9 --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/Makefile @@ -0,0 +1,10 @@ +.PHONY: ci generate clean + +ci: clean generate + go test -race -v ./... + +generate: + go generate . + +clean: + rm -rf *_generated*.go diff --git a/vendor/github.com/felixge/httpsnoop/README.md b/vendor/github.com/felixge/httpsnoop/README.md new file mode 100644 index 000000000..cf6b42f3d --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/README.md @@ -0,0 +1,95 @@ +# httpsnoop + +Package httpsnoop provides an easy way to capture http related metrics (i.e. +response time, bytes written, and http status code) from your application's +http.Handlers. + +Doing this requires non-trivial wrapping of the http.ResponseWriter interface, +which is also exposed for users interested in a more low-level API. + +[![Go Reference](https://pkg.go.dev/badge/github.com/felixge/httpsnoop.svg)](https://pkg.go.dev/github.com/felixge/httpsnoop) +[![Build Status](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml/badge.svg)](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml) + +## Usage Example + +```go +// myH is your app's http handler, perhaps a http.ServeMux or similar. +var myH http.Handler +// wrappedH wraps myH in order to log every request. +wrappedH := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + m := httpsnoop.CaptureMetrics(myH, w, r) + log.Printf( + "%s %s (code=%d dt=%s written=%d)", + r.Method, + r.URL, + m.Code, + m.Duration, + m.Written, + ) +}) +http.ListenAndServe(":8080", wrappedH) +``` + +## Why this package exists + +Instrumenting an application's http.Handler is surprisingly difficult. + +However if you google for e.g. "capture ResponseWriter status code" you'll find +lots of advise and code examples that suggest it to be a fairly trivial +undertaking. Unfortunately everything I've seen so far has a high chance of +breaking your application. + +The main problem is that a `http.ResponseWriter` often implements additional +interfaces such as `http.Flusher`, `http.CloseNotifier`, `http.Hijacker`, `http.Pusher`, and +`io.ReaderFrom`. So the naive approach of just wrapping `http.ResponseWriter` +in your own struct that also implements the `http.ResponseWriter` interface +will hide the additional interfaces mentioned above. This has a high change of +introducing subtle bugs into any non-trivial application. + +Another approach I've seen people take is to return a struct that implements +all of the interfaces above. However, that's also problematic, because it's +difficult to fake some of these interfaces behaviors when the underlying +`http.ResponseWriter` doesn't have an implementation. It's also dangerous, +because an application may choose to operate differently, merely because it +detects the presence of these additional interfaces. + +This package solves this problem by checking which additional interfaces a +`http.ResponseWriter` implements, returning a wrapped version implementing the +exact same set of interfaces. + +Additionally this package properly handles edge cases such as `WriteHeader` not +being called, or called more than once, as well as concurrent calls to +`http.ResponseWriter` methods, and even calls happening after the wrapped +`ServeHTTP` has already returned. + +Unfortunately this package is not perfect either. It's possible that it is +still missing some interfaces provided by the go core (let me know if you find +one), and it won't work for applications adding their own interfaces into the +mix. You can however use `httpsnoop.Unwrap(w)` to access the underlying +`http.ResponseWriter` and type-assert the result to its other interfaces. + +However, hopefully the explanation above has sufficiently scared you of rolling +your own solution to this problem. httpsnoop may still break your application, +but at least it tries to avoid it as much as possible. + +Anyway, the real problem here is that smuggling additional interfaces inside +`http.ResponseWriter` is a problematic design choice, but it probably goes as +deep as the Go language specification itself. But that's okay, I still prefer +Go over the alternatives ;). + +## Performance + +``` +BenchmarkBaseline-8 20000 94912 ns/op +BenchmarkCaptureMetrics-8 20000 95461 ns/op +``` + +As you can see, using `CaptureMetrics` on a vanilla http.Handler introduces an +overhead of ~500 ns per http request on my machine. However, the margin of +error appears to be larger than that, therefor it should be reasonable to +assume that the overhead introduced by `CaptureMetrics` is absolutely +negligible. + +## License + +MIT diff --git a/vendor/github.com/felixge/httpsnoop/capture_metrics.go b/vendor/github.com/felixge/httpsnoop/capture_metrics.go new file mode 100644 index 000000000..bec7b71b3 --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/capture_metrics.go @@ -0,0 +1,86 @@ +package httpsnoop + +import ( + "io" + "net/http" + "time" +) + +// Metrics holds metrics captured from CaptureMetrics. +type Metrics struct { + // Code is the first http response code passed to the WriteHeader func of + // the ResponseWriter. If no such call is made, a default code of 200 is + // assumed instead. + Code int + // Duration is the time it took to execute the handler. + Duration time.Duration + // Written is the number of bytes successfully written by the Write or + // ReadFrom function of the ResponseWriter. ResponseWriters may also write + // data to their underlaying connection directly (e.g. headers), but those + // are not tracked. Therefor the number of Written bytes will usually match + // the size of the response body. + Written int64 +} + +// CaptureMetrics wraps the given hnd, executes it with the given w and r, and +// returns the metrics it captured from it. +func CaptureMetrics(hnd http.Handler, w http.ResponseWriter, r *http.Request) Metrics { + return CaptureMetricsFn(w, func(ww http.ResponseWriter) { + hnd.ServeHTTP(ww, r) + }) +} + +// CaptureMetricsFn wraps w and calls fn with the wrapped w and returns the +// resulting metrics. This is very similar to CaptureMetrics (which is just +// sugar on top of this func), but is a more usable interface if your +// application doesn't use the Go http.Handler interface. +func CaptureMetricsFn(w http.ResponseWriter, fn func(http.ResponseWriter)) Metrics { + m := Metrics{Code: http.StatusOK} + m.CaptureMetrics(w, fn) + return m +} + +// CaptureMetrics wraps w and calls fn with the wrapped w and updates +// Metrics m with the resulting metrics. This is similar to CaptureMetricsFn, +// but allows one to customize starting Metrics object. +func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWriter)) { + var ( + start = time.Now() + headerWritten bool + hooks = Hooks{ + WriteHeader: func(next WriteHeaderFunc) WriteHeaderFunc { + return func(code int) { + next(code) + + if !(code >= 100 && code <= 199) && !headerWritten { + m.Code = code + headerWritten = true + } + } + }, + + Write: func(next WriteFunc) WriteFunc { + return func(p []byte) (int, error) { + n, err := next(p) + + m.Written += int64(n) + headerWritten = true + return n, err + } + }, + + ReadFrom: func(next ReadFromFunc) ReadFromFunc { + return func(src io.Reader) (int64, error) { + n, err := next(src) + + headerWritten = true + m.Written += n + return n, err + } + }, + } + ) + + fn(Wrap(w, hooks)) + m.Duration += time.Since(start) +} diff --git a/vendor/github.com/felixge/httpsnoop/docs.go b/vendor/github.com/felixge/httpsnoop/docs.go new file mode 100644 index 000000000..203c35b3c --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/docs.go @@ -0,0 +1,10 @@ +// Package httpsnoop provides an easy way to capture http related metrics (i.e. +// response time, bytes written, and http status code) from your application's +// http.Handlers. +// +// Doing this requires non-trivial wrapping of the http.ResponseWriter +// interface, which is also exposed for users interested in a more low-level +// API. +package httpsnoop + +//go:generate go run codegen/main.go diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go new file mode 100644 index 000000000..101cedde6 --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go @@ -0,0 +1,436 @@ +// +build go1.8 +// Code generated by "httpsnoop/codegen"; DO NOT EDIT. + +package httpsnoop + +import ( + "bufio" + "io" + "net" + "net/http" +) + +// HeaderFunc is part of the http.ResponseWriter interface. +type HeaderFunc func() http.Header + +// WriteHeaderFunc is part of the http.ResponseWriter interface. +type WriteHeaderFunc func(code int) + +// WriteFunc is part of the http.ResponseWriter interface. +type WriteFunc func(b []byte) (int, error) + +// FlushFunc is part of the http.Flusher interface. +type FlushFunc func() + +// CloseNotifyFunc is part of the http.CloseNotifier interface. +type CloseNotifyFunc func() <-chan bool + +// HijackFunc is part of the http.Hijacker interface. +type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) + +// ReadFromFunc is part of the io.ReaderFrom interface. +type ReadFromFunc func(src io.Reader) (int64, error) + +// PushFunc is part of the http.Pusher interface. +type PushFunc func(target string, opts *http.PushOptions) error + +// Hooks defines a set of method interceptors for methods included in +// http.ResponseWriter as well as some others. You can think of them as +// middleware for the function calls they target. See Wrap for more details. +type Hooks struct { + Header func(HeaderFunc) HeaderFunc + WriteHeader func(WriteHeaderFunc) WriteHeaderFunc + Write func(WriteFunc) WriteFunc + Flush func(FlushFunc) FlushFunc + CloseNotify func(CloseNotifyFunc) CloseNotifyFunc + Hijack func(HijackFunc) HijackFunc + ReadFrom func(ReadFromFunc) ReadFromFunc + Push func(PushFunc) PushFunc +} + +// Wrap returns a wrapped version of w that provides the exact same interface +// as w. Specifically if w implements any combination of: +// +// - http.Flusher +// - http.CloseNotifier +// - http.Hijacker +// - io.ReaderFrom +// - http.Pusher +// +// The wrapped version will implement the exact same combination. If no hooks +// are set, the wrapped version also behaves exactly as w. Hooks targeting +// methods not supported by w are ignored. Any other hooks will intercept the +// method they target and may modify the call's arguments and/or return values. +// The CaptureMetrics implementation serves as a working example for how the +// hooks can be used. +func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { + rw := &rw{w: w, h: hooks} + _, i0 := w.(http.Flusher) + _, i1 := w.(http.CloseNotifier) + _, i2 := w.(http.Hijacker) + _, i3 := w.(io.ReaderFrom) + _, i4 := w.(http.Pusher) + switch { + // combination 1/32 + case !i0 && !i1 && !i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + }{rw, rw} + // combination 2/32 + case !i0 && !i1 && !i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Pusher + }{rw, rw, rw} + // combination 3/32 + case !i0 && !i1 && !i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + }{rw, rw, rw} + // combination 4/32 + case !i0 && !i1 && !i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw} + // combination 5/32 + case !i0 && !i1 && i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + }{rw, rw, rw} + // combination 6/32 + case !i0 && !i1 && i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + http.Pusher + }{rw, rw, rw, rw} + // combination 7/32 + case !i0 && !i1 && i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 8/32 + case !i0 && !i1 && i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 9/32 + case !i0 && i1 && !i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + }{rw, rw, rw} + // combination 10/32 + case !i0 && i1 && !i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Pusher + }{rw, rw, rw, rw} + // combination 11/32 + case !i0 && i1 && !i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 12/32 + case !i0 && i1 && !i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 13/32 + case !i0 && i1 && i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + }{rw, rw, rw, rw} + // combination 14/32 + case !i0 && i1 && i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 15/32 + case !i0 && i1 && i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 16/32 + case !i0 && i1 && i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 17/32 + case i0 && !i1 && !i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + }{rw, rw, rw} + // combination 18/32 + case i0 && !i1 && !i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Pusher + }{rw, rw, rw, rw} + // combination 19/32 + case i0 && !i1 && !i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 20/32 + case i0 && !i1 && !i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 21/32 + case i0 && !i1 && i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + }{rw, rw, rw, rw} + // combination 22/32 + case i0 && !i1 && i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 23/32 + case i0 && !i1 && i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 24/32 + case i0 && !i1 && i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 25/32 + case i0 && i1 && !i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + }{rw, rw, rw, rw} + // combination 26/32 + case i0 && i1 && !i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Pusher + }{rw, rw, rw, rw, rw} + // combination 27/32 + case i0 && i1 && !i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 28/32 + case i0 && i1 && !i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 29/32 + case i0 && i1 && i2 && !i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + }{rw, rw, rw, rw, rw} + // combination 30/32 + case i0 && i1 && i2 && !i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + http.Pusher + }{rw, rw, rw, rw, rw, rw} + // combination 31/32 + case i0 && i1 && i2 && i3 && !i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw, rw} + // combination 32/32 + case i0 && i1 && i2 && i3 && i4: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + http.Pusher + }{rw, rw, rw, rw, rw, rw, rw} + } + panic("unreachable") +} + +type rw struct { + w http.ResponseWriter + h Hooks +} + +func (w *rw) Unwrap() http.ResponseWriter { + return w.w +} + +func (w *rw) Header() http.Header { + f := w.w.(http.ResponseWriter).Header + if w.h.Header != nil { + f = w.h.Header(f) + } + return f() +} + +func (w *rw) WriteHeader(code int) { + f := w.w.(http.ResponseWriter).WriteHeader + if w.h.WriteHeader != nil { + f = w.h.WriteHeader(f) + } + f(code) +} + +func (w *rw) Write(b []byte) (int, error) { + f := w.w.(http.ResponseWriter).Write + if w.h.Write != nil { + f = w.h.Write(f) + } + return f(b) +} + +func (w *rw) Flush() { + f := w.w.(http.Flusher).Flush + if w.h.Flush != nil { + f = w.h.Flush(f) + } + f() +} + +func (w *rw) CloseNotify() <-chan bool { + f := w.w.(http.CloseNotifier).CloseNotify + if w.h.CloseNotify != nil { + f = w.h.CloseNotify(f) + } + return f() +} + +func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) { + f := w.w.(http.Hijacker).Hijack + if w.h.Hijack != nil { + f = w.h.Hijack(f) + } + return f() +} + +func (w *rw) ReadFrom(src io.Reader) (int64, error) { + f := w.w.(io.ReaderFrom).ReadFrom + if w.h.ReadFrom != nil { + f = w.h.ReadFrom(f) + } + return f(src) +} + +func (w *rw) Push(target string, opts *http.PushOptions) error { + f := w.w.(http.Pusher).Push + if w.h.Push != nil { + f = w.h.Push(f) + } + return f(target, opts) +} + +type Unwrapper interface { + Unwrap() http.ResponseWriter +} + +// Unwrap returns the underlying http.ResponseWriter from within zero or more +// layers of httpsnoop wrappers. +func Unwrap(w http.ResponseWriter) http.ResponseWriter { + if rw, ok := w.(Unwrapper); ok { + // recurse until rw.Unwrap() returns a non-Unwrapper + return Unwrap(rw.Unwrap()) + } else { + return w + } +} diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go new file mode 100644 index 000000000..e0951df15 --- /dev/null +++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go @@ -0,0 +1,278 @@ +// +build !go1.8 +// Code generated by "httpsnoop/codegen"; DO NOT EDIT. + +package httpsnoop + +import ( + "bufio" + "io" + "net" + "net/http" +) + +// HeaderFunc is part of the http.ResponseWriter interface. +type HeaderFunc func() http.Header + +// WriteHeaderFunc is part of the http.ResponseWriter interface. +type WriteHeaderFunc func(code int) + +// WriteFunc is part of the http.ResponseWriter interface. +type WriteFunc func(b []byte) (int, error) + +// FlushFunc is part of the http.Flusher interface. +type FlushFunc func() + +// CloseNotifyFunc is part of the http.CloseNotifier interface. +type CloseNotifyFunc func() <-chan bool + +// HijackFunc is part of the http.Hijacker interface. +type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) + +// ReadFromFunc is part of the io.ReaderFrom interface. +type ReadFromFunc func(src io.Reader) (int64, error) + +// Hooks defines a set of method interceptors for methods included in +// http.ResponseWriter as well as some others. You can think of them as +// middleware for the function calls they target. See Wrap for more details. +type Hooks struct { + Header func(HeaderFunc) HeaderFunc + WriteHeader func(WriteHeaderFunc) WriteHeaderFunc + Write func(WriteFunc) WriteFunc + Flush func(FlushFunc) FlushFunc + CloseNotify func(CloseNotifyFunc) CloseNotifyFunc + Hijack func(HijackFunc) HijackFunc + ReadFrom func(ReadFromFunc) ReadFromFunc +} + +// Wrap returns a wrapped version of w that provides the exact same interface +// as w. Specifically if w implements any combination of: +// +// - http.Flusher +// - http.CloseNotifier +// - http.Hijacker +// - io.ReaderFrom +// +// The wrapped version will implement the exact same combination. If no hooks +// are set, the wrapped version also behaves exactly as w. Hooks targeting +// methods not supported by w are ignored. Any other hooks will intercept the +// method they target and may modify the call's arguments and/or return values. +// The CaptureMetrics implementation serves as a working example for how the +// hooks can be used. +func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { + rw := &rw{w: w, h: hooks} + _, i0 := w.(http.Flusher) + _, i1 := w.(http.CloseNotifier) + _, i2 := w.(http.Hijacker) + _, i3 := w.(io.ReaderFrom) + switch { + // combination 1/16 + case !i0 && !i1 && !i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + }{rw, rw} + // combination 2/16 + case !i0 && !i1 && !i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + io.ReaderFrom + }{rw, rw, rw} + // combination 3/16 + case !i0 && !i1 && i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + }{rw, rw, rw} + // combination 4/16 + case !i0 && !i1 && i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 5/16 + case !i0 && i1 && !i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + }{rw, rw, rw} + // combination 6/16 + case !i0 && i1 && !i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 7/16 + case !i0 && i1 && i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + }{rw, rw, rw, rw} + // combination 8/16 + case !i0 && i1 && i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 9/16 + case i0 && !i1 && !i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + }{rw, rw, rw} + // combination 10/16 + case i0 && !i1 && !i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + io.ReaderFrom + }{rw, rw, rw, rw} + // combination 11/16 + case i0 && !i1 && i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + }{rw, rw, rw, rw} + // combination 12/16 + case i0 && !i1 && i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 13/16 + case i0 && i1 && !i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + }{rw, rw, rw, rw} + // combination 14/16 + case i0 && i1 && !i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + io.ReaderFrom + }{rw, rw, rw, rw, rw} + // combination 15/16 + case i0 && i1 && i2 && !i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + }{rw, rw, rw, rw, rw} + // combination 16/16 + case i0 && i1 && i2 && i3: + return struct { + Unwrapper + http.ResponseWriter + http.Flusher + http.CloseNotifier + http.Hijacker + io.ReaderFrom + }{rw, rw, rw, rw, rw, rw} + } + panic("unreachable") +} + +type rw struct { + w http.ResponseWriter + h Hooks +} + +func (w *rw) Unwrap() http.ResponseWriter { + return w.w +} + +func (w *rw) Header() http.Header { + f := w.w.(http.ResponseWriter).Header + if w.h.Header != nil { + f = w.h.Header(f) + } + return f() +} + +func (w *rw) WriteHeader(code int) { + f := w.w.(http.ResponseWriter).WriteHeader + if w.h.WriteHeader != nil { + f = w.h.WriteHeader(f) + } + f(code) +} + +func (w *rw) Write(b []byte) (int, error) { + f := w.w.(http.ResponseWriter).Write + if w.h.Write != nil { + f = w.h.Write(f) + } + return f(b) +} + +func (w *rw) Flush() { + f := w.w.(http.Flusher).Flush + if w.h.Flush != nil { + f = w.h.Flush(f) + } + f() +} + +func (w *rw) CloseNotify() <-chan bool { + f := w.w.(http.CloseNotifier).CloseNotify + if w.h.CloseNotify != nil { + f = w.h.CloseNotify(f) + } + return f() +} + +func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) { + f := w.w.(http.Hijacker).Hijack + if w.h.Hijack != nil { + f = w.h.Hijack(f) + } + return f() +} + +func (w *rw) ReadFrom(src io.Reader) (int64, error) { + f := w.w.(io.ReaderFrom).ReadFrom + if w.h.ReadFrom != nil { + f = w.h.ReadFrom(f) + } + return f(src) +} + +type Unwrapper interface { + Unwrap() http.ResponseWriter +} + +// Unwrap returns the underlying http.ResponseWriter from within zero or more +// layers of httpsnoop wrappers. +func Unwrap(w http.ResponseWriter) http.ResponseWriter { + if rw, ok := w.(Unwrapper); ok { + // recurse until rw.Unwrap() returns a non-Unwrapper + return Unwrap(rw.Unwrap()) + } else { + return w + } +} diff --git a/vendor/github.com/go-gorp/gorp/v3/.gitignore b/vendor/github.com/go-gorp/gorp/v3/.gitignore new file mode 100644 index 000000000..a96e5fec5 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/.gitignore @@ -0,0 +1,11 @@ +_test +*.test +_testmain.go +_obj +*~ +*.6 +6.out +gorptest.bin +tmp +.idea +coverage.out diff --git a/vendor/github.com/go-gorp/gorp/v3/.travis.yml b/vendor/github.com/go-gorp/gorp/v3/.travis.yml new file mode 100644 index 000000000..958d260ac --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/.travis.yml @@ -0,0 +1,36 @@ +language: go +go: +- "1.15.x" +- "1.16.x" +- tip + +matrix: + allow_failures: + - go: tip + +services: +- mysql +- postgresql +- sqlite3 + +env: + global: + - secure: RriLxF6+2yMl67hdVv8ImXlu0h62mhcpqjaOgYNU+IEbUQ7hx96CKY6gkpYubW3BgApvF5RH6j3+HKvh2kGp0XhDOYOQCODfBSaSipZ5Aa5RKjsEYLtuVIobvJ80awR9hUeql69+WXs0/s72WThG0qTbOUY4pqHWfteeY235hWM= + +install: + - go get -t -d + - go get -t -d -tags integration + +before_script: +- mysql -e "CREATE DATABASE gorptest;" +- mysql -u root -e "GRANT ALL ON gorptest.* TO gorptest@localhost IDENTIFIED BY 'gorptest'" +- psql -c "CREATE DATABASE gorptest;" -U postgres +- psql -c "CREATE USER "gorptest" WITH SUPERUSER PASSWORD 'gorptest';" -U postgres +- go get github.com/lib/pq +- go get github.com/mattn/go-sqlite3 +- go get github.com/ziutek/mymysql/godrv +- go get github.com/go-sql-driver/mysql +- go get golang.org/x/tools/cmd/cover +- go get github.com/mattn/goveralls + +script: ./test_all.sh diff --git a/vendor/github.com/go-gorp/gorp/v3/CONTRIBUTING.md b/vendor/github.com/go-gorp/gorp/v3/CONTRIBUTING.md new file mode 100644 index 000000000..7bc145fd7 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributions are very welcome! + +## First: Create an Issue + +Even if your fix is simple, we'd like to have an issue to relate to +the PR. Discussion about the architecture and value can go on the +issue, leaving PR comments exclusively for coding style. + +## Second: Make Your PR + +- Fork the `master` branch +- Make your change +- Make a PR against the `master` branch + +You don't need to wait for comments on the issue before making your +PR. If you do wait for comments, you'll have a better chance of +getting your PR accepted the first time around, but it's not +necessary. + +## Third: Be Patient + +- If your change breaks backward compatibility, this becomes + especially true. + +We all have lives and jobs, and many of us are no longer on projects +that make use of `gorp`. We will get back to you, but it might take a +while. + +## Fourth: Consider Becoming a Maintainer + +We really do need help. We will likely ask you for help after a good +PR, but if we don't, please create an issue requesting maintainership. +Considering how few of us are currently active, we are unlikely to +refuse good help. diff --git a/vendor/github.com/go-gorp/gorp/v3/LICENSE b/vendor/github.com/go-gorp/gorp/v3/LICENSE new file mode 100644 index 000000000..b661111d0 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2012 James Cooper + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/go-gorp/gorp/v3/README.md b/vendor/github.com/go-gorp/gorp/v3/README.md new file mode 100644 index 000000000..983fe4343 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/README.md @@ -0,0 +1,809 @@ +# Go Relational Persistence + +[![build status](https://github.com/go-gorp/gorp/actions/workflows/go.yml/badge.svg)](https://github.com/go-gorp/gorp/actions) +[![issues](https://img.shields.io/github/issues/go-gorp/gorp.svg)](https://github.com/go-gorp/gorp/issues) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-gorp/gorp/v3.svg)](https://pkg.go.dev/github.com/go-gorp/gorp/v3) + +### Update 2016-11-13: Future versions + +As many of the maintainers have become busy with other projects, +progress toward the ever-elusive v2 has slowed to the point that we're +only occasionally making progress outside of merging pull requests. +In the interest of continuing to release, I'd like to lean toward a +more maintainable path forward. + +For the moment, I am releasing a v2 tag with the current feature set +from master, as some of those features have been actively used and +relied on by more than one project. Our next goal is to continue +cleaning up the code base with non-breaking changes as much as +possible, but if/when a breaking change is needed, we'll just release +new versions. This allows us to continue development at whatever pace +we're capable of, without delaying the release of features or refusing +PRs. + +## Introduction + +I hesitate to call gorp an ORM. Go doesn't really have objects, at +least not in the classic Smalltalk/Java sense. There goes the "O". +gorp doesn't know anything about the relationships between your +structs (at least not yet). So the "R" is questionable too (but I use +it in the name because, well, it seemed more clever). + +The "M" is alive and well. Given some Go structs and a database, gorp +should remove a fair amount of boilerplate busy-work from your code. + +I hope that gorp saves you time, minimizes the drudgery of getting +data in and out of your database, and helps your code focus on +algorithms, not infrastructure. + +* Bind struct fields to table columns via API or tag +* Support for embedded structs +* Support for transactions +* Forward engineer db schema from structs (great for unit tests) +* Pre/post insert/update/delete hooks +* Automatically generate insert/update/delete statements for a struct +* Automatic binding of auto increment PKs back to struct after insert +* Delete by primary key(s) +* Select by primary key(s) +* Optional trace sql logging +* Bind arbitrary SQL queries to a struct +* Bind slice to SELECT query results without type assertions +* Use positional or named bind parameters in custom SELECT queries +* Optional optimistic locking using a version column (for + update/deletes) + +## Installation + +Use `go get` or your favorite vendoring tool, using whichever import +path you'd like. + +## Versioning + +We use semantic version tags. Feel free to import through `gopkg.in` +(e.g. `gopkg.in/gorp.v2`) to get the latest tag for a major version, +or check out the tag using your favorite vendoring tool. + +Development is not very active right now, but we have plans to +restructure `gorp` as we continue to move toward a more extensible +system. Whenever a breaking change is needed, the major version will +be bumped. + +The `master` branch is where all development is done, and breaking +changes may happen from time to time. That said, if you want to live +on the bleeding edge and are comfortable updating your code when we +make a breaking change, you may use `github.com/go-gorp/gorp` as your +import path. + +Check the version tags to see what's available. We'll make a good +faith effort to add badges for new versions, but we make no +guarantees. + +## Supported Go versions + +This package is guaranteed to be compatible with the latest 2 major +versions of Go. + +Any earlier versions are only supported on a best effort basis and can +be dropped any time. Go has a great compatibility promise. Upgrading +your program to a newer version of Go should never really be a +problem. + +## Migration guide + +#### Pre-v2 to v2 +Automatic mapping of the version column used in optimistic locking has +been removed as it could cause problems if the type was not int. The +version column must now explicitly be set with +`tablemap.SetVersionCol()`. + +## Help/Support + +Use our [`gitter` channel](https://gitter.im/go-gorp/gorp). We used +to use IRC, but with most of us being pulled in many directions, we +often need the email notifications from `gitter` to yell at us to sign +in. + +## Quickstart + +```go +package main + +import ( + "database/sql" + "gopkg.in/gorp.v1" + _ "github.com/mattn/go-sqlite3" + "log" + "time" +) + +func main() { + // initialize the DbMap + dbmap := initDb() + defer dbmap.Db.Close() + + // delete any existing rows + err := dbmap.TruncateTables() + checkErr(err, "TruncateTables failed") + + // create two posts + p1 := newPost("Go 1.1 released!", "Lorem ipsum lorem ipsum") + p2 := newPost("Go 1.2 released!", "Lorem ipsum lorem ipsum") + + // insert rows - auto increment PKs will be set properly after the insert + err = dbmap.Insert(&p1, &p2) + checkErr(err, "Insert failed") + + // use convenience SelectInt + count, err := dbmap.SelectInt("select count(*) from posts") + checkErr(err, "select count(*) failed") + log.Println("Rows after inserting:", count) + + // update a row + p2.Title = "Go 1.2 is better than ever" + count, err = dbmap.Update(&p2) + checkErr(err, "Update failed") + log.Println("Rows updated:", count) + + // fetch one row - note use of "post_id" instead of "Id" since column is aliased + // + // Postgres users should use $1 instead of ? placeholders + // See 'Known Issues' below + // + err = dbmap.SelectOne(&p2, "select * from posts where post_id=?", p2.Id) + checkErr(err, "SelectOne failed") + log.Println("p2 row:", p2) + + // fetch all rows + var posts []Post + _, err = dbmap.Select(&posts, "select * from posts order by post_id") + checkErr(err, "Select failed") + log.Println("All rows:") + for x, p := range posts { + log.Printf(" %d: %v\n", x, p) + } + + // delete row by PK + count, err = dbmap.Delete(&p1) + checkErr(err, "Delete failed") + log.Println("Rows deleted:", count) + + // delete row manually via Exec + _, err = dbmap.Exec("delete from posts where post_id=?", p2.Id) + checkErr(err, "Exec failed") + + // confirm count is zero + count, err = dbmap.SelectInt("select count(*) from posts") + checkErr(err, "select count(*) failed") + log.Println("Row count - should be zero:", count) + + log.Println("Done!") +} + +type Post struct { + // db tag lets you specify the column name if it differs from the struct field + Id int64 `db:"post_id"` + Created int64 + Title string `db:",size:50"` // Column size set to 50 + Body string `db:"article_body,size:1024"` // Set both column name and size +} + +func newPost(title, body string) Post { + return Post{ + Created: time.Now().UnixNano(), + Title: title, + Body: body, + } +} + +func initDb() *gorp.DbMap { + // connect to db using standard Go database/sql API + // use whatever database/sql driver you wish + db, err := sql.Open("sqlite3", "/tmp/post_db.bin") + checkErr(err, "sql.Open failed") + + // construct a gorp DbMap + dbmap := &gorp.DbMap{Db: db, Dialect: gorp.SqliteDialect{}} + + // add a table, setting the table name to 'posts' and + // specifying that the Id property is an auto incrementing PK + dbmap.AddTableWithName(Post{}, "posts").SetKeys(true, "Id") + + // create the table. in a production system you'd generally + // use a migration tool, or create the tables via scripts + err = dbmap.CreateTablesIfNotExists() + checkErr(err, "Create tables failed") + + return dbmap +} + +func checkErr(err error, msg string) { + if err != nil { + log.Fatalln(msg, err) + } +} +``` + +## Examples + +### Mapping structs to tables + +First define some types: + +```go +type Invoice struct { + Id int64 + Created int64 + Updated int64 + Memo string + PersonId int64 +} + +type Person struct { + Id int64 + Created int64 + Updated int64 + FName string + LName string +} + +// Example of using tags to alias fields to column names +// The 'db' value is the column name +// +// A hyphen will cause gorp to skip this field, similar to the +// Go json package. +// +// This is equivalent to using the ColMap methods: +// +// table := dbmap.AddTableWithName(Product{}, "product") +// table.ColMap("Id").Rename("product_id") +// table.ColMap("Price").Rename("unit_price") +// table.ColMap("IgnoreMe").SetTransient(true) +// +// You can optionally declare the field to be a primary key and/or autoincrement +// +type Product struct { + Id int64 `db:"product_id, primarykey, autoincrement"` + Price int64 `db:"unit_price"` + IgnoreMe string `db:"-"` +} +``` + +Then create a mapper, typically you'd do this one time at app startup: + +```go +// connect to db using standard Go database/sql API +// use whatever database/sql driver you wish +db, err := sql.Open("mymysql", "tcp:localhost:3306*mydb/myuser/mypassword") + +// construct a gorp DbMap +dbmap := &gorp.DbMap{Db: db, Dialect: gorp.MySQLDialect{"InnoDB", "UTF8"}} + +// register the structs you wish to use with gorp +// you can also use the shorter dbmap.AddTable() if you +// don't want to override the table name +// +// SetKeys(true) means we have a auto increment primary key, which +// will get automatically bound to your struct post-insert +// +t1 := dbmap.AddTableWithName(Invoice{}, "invoice_test").SetKeys(true, "Id") +t2 := dbmap.AddTableWithName(Person{}, "person_test").SetKeys(true, "Id") +t3 := dbmap.AddTableWithName(Product{}, "product_test").SetKeys(true, "Id") +``` + +### Struct Embedding + +gorp supports embedding structs. For example: + +```go +type Names struct { + FirstName string + LastName string +} + +type WithEmbeddedStruct struct { + Id int64 + Names +} + +es := &WithEmbeddedStruct{-1, Names{FirstName: "Alice", LastName: "Smith"}} +err := dbmap.Insert(es) +``` + +See the `TestWithEmbeddedStruct` function in `gorp_test.go` for a full example. + +### Create/Drop Tables ### + +Automatically create / drop registered tables. This is useful for unit tests +but is entirely optional. You can of course use gorp with tables created manually, +or with a separate migration tool (like [sql-migrate](https://github.com/rubenv/sql-migrate), [goose](https://bitbucket.org/liamstask/goose) or [migrate](https://github.com/mattes/migrate)). + +```go +// create all registered tables +dbmap.CreateTables() + +// same as above, but uses "if not exists" clause to skip tables that are +// already defined +dbmap.CreateTablesIfNotExists() + +// drop +dbmap.DropTables() +``` + +### SQL Logging + +Optionally you can pass in a logger to trace all SQL statements. +I recommend enabling this initially while you're getting the feel for what +gorp is doing on your behalf. + +Gorp defines a `GorpLogger` interface that Go's built in `log.Logger` satisfies. +However, you can write your own `GorpLogger` implementation, or use a package such +as `glog` if you want more control over how statements are logged. + +```go +// Will log all SQL statements + args as they are run +// The first arg is a string prefix to prepend to all log messages +dbmap.TraceOn("[gorp]", log.New(os.Stdout, "myapp:", log.Lmicroseconds)) + +// Turn off tracing +dbmap.TraceOff() +``` + +### Insert + +```go +// Must declare as pointers so optional callback hooks +// can operate on your data, not copies +inv1 := &Invoice{0, 100, 200, "first order", 0} +inv2 := &Invoice{0, 100, 200, "second order", 0} + +// Insert your rows +err := dbmap.Insert(inv1, inv2) + +// Because we called SetKeys(true) on Invoice, the Id field +// will be populated after the Insert() automatically +fmt.Printf("inv1.Id=%d inv2.Id=%d\n", inv1.Id, inv2.Id) +``` + +### Update + +Continuing the above example, use the `Update` method to modify an Invoice: + +```go +// count is the # of rows updated, which should be 1 in this example +count, err := dbmap.Update(inv1) +``` + +### Delete + +If you have primary key(s) defined for a struct, you can use the `Delete` +method to remove rows: + +```go +count, err := dbmap.Delete(inv1) +``` + +### Select by Key + +Use the `Get` method to fetch a single row by primary key. It returns +nil if no row is found. + +```go +// fetch Invoice with Id=99 +obj, err := dbmap.Get(Invoice{}, 99) +inv := obj.(*Invoice) +``` + +### Ad Hoc SQL + +#### SELECT + +`Select()` and `SelectOne()` provide a simple way to bind arbitrary queries to a slice +or a single struct. + +```go +// Select a slice - first return value is not needed when a slice pointer is passed to Select() +var posts []Post +_, err := dbmap.Select(&posts, "select * from post order by id") + +// You can also use primitive types +var ids []string +_, err := dbmap.Select(&ids, "select id from post") + +// Select a single row. +// Returns an error if no row found, or if more than one row is found +var post Post +err := dbmap.SelectOne(&post, "select * from post where id=?", id) +``` + +Want to do joins? Just write the SQL and the struct. gorp will bind them: + +```go +// Define a type for your join +// It *must* contain all the columns in your SELECT statement +// +// The names here should match the aliased column names you specify +// in your SQL - no additional binding work required. simple. +// +type InvoicePersonView struct { + InvoiceId int64 + PersonId int64 + Memo string + FName string +} + +// Create some rows +p1 := &Person{0, 0, 0, "bob", "smith"} +err = dbmap.Insert(p1) +checkErr(err, "Insert failed") + +// notice how we can wire up p1.Id to the invoice easily +inv1 := &Invoice{0, 0, 0, "xmas order", p1.Id} +err = dbmap.Insert(inv1) +checkErr(err, "Insert failed") + +// Run your query +query := "select i.Id InvoiceId, p.Id PersonId, i.Memo, p.FName " + + "from invoice_test i, person_test p " + + "where i.PersonId = p.Id" + +// pass a slice to Select() +var list []InvoicePersonView +_, err := dbmap.Select(&list, query) + +// this should test true +expected := InvoicePersonView{inv1.Id, p1.Id, inv1.Memo, p1.FName} +if reflect.DeepEqual(list[0], expected) { + fmt.Println("Woot! My join worked!") +} +``` + +#### SELECT string or int64 + +gorp provides a few convenience methods for selecting a single string or int64. + +```go +// select single int64 from db (use $1 instead of ? for postgresql) +i64, err := dbmap.SelectInt("select count(*) from foo where blah=?", blahVal) + +// select single string from db: +s, err := dbmap.SelectStr("select name from foo where blah=?", blahVal) + +``` + +#### Named bind parameters + +You may use a map or struct to bind parameters by name. This is currently +only supported in SELECT queries. + +```go +_, err := dbm.Select(&dest, "select * from Foo where name = :name and age = :age", map[string]interface{}{ + "name": "Rob", + "age": 31, +}) +``` + +#### UPDATE / DELETE + +You can execute raw SQL if you wish. Particularly good for batch operations. + +```go +res, err := dbmap.Exec("delete from invoice_test where PersonId=?", 10) +``` + +### Transactions + +You can batch operations into a transaction: + +```go +func InsertInv(dbmap *DbMap, inv *Invoice, per *Person) error { + // Start a new transaction + trans, err := dbmap.Begin() + if err != nil { + return err + } + + err = trans.Insert(per) + checkErr(err, "Insert failed") + + inv.PersonId = per.Id + err = trans.Insert(inv) + checkErr(err, "Insert failed") + + // if the commit is successful, a nil error is returned + return trans.Commit() +} +``` + +### Hooks + +Use hooks to update data before/after saving to the db. Good for timestamps: + +```go +// implement the PreInsert and PreUpdate hooks +func (i *Invoice) PreInsert(s gorp.SqlExecutor) error { + i.Created = time.Now().UnixNano() + i.Updated = i.Created + return nil +} + +func (i *Invoice) PreUpdate(s gorp.SqlExecutor) error { + i.Updated = time.Now().UnixNano() + return nil +} + +// You can use the SqlExecutor to cascade additional SQL +// Take care to avoid cycles. gorp won't prevent them. +// +// Here's an example of a cascading delete +// +func (p *Person) PreDelete(s gorp.SqlExecutor) error { + query := "delete from invoice_test where PersonId=?" + + _, err := s.Exec(query, p.Id) + + if err != nil { + return err + } + return nil +} +``` + +Full list of hooks that you can implement: + + PostGet + PreInsert + PostInsert + PreUpdate + PostUpdate + PreDelete + PostDelete + + All have the same signature. for example: + + func (p *MyStruct) PostUpdate(s gorp.SqlExecutor) error + +### Optimistic Locking + +#### Note that this behaviour has changed in v2. See [Migration Guide](#migration-guide). + +gorp provides a simple optimistic locking feature, similar to Java's +JPA, that will raise an error if you try to update/delete a row whose +`version` column has a value different than the one in memory. This +provides a safe way to do "select then update" style operations +without explicit read and write locks. + +```go +// Version is an auto-incremented number, managed by gorp +// If this property is present on your struct, update +// operations will be constrained +// +// For example, say we defined Person as: + +type Person struct { + Id int64 + Created int64 + Updated int64 + FName string + LName string + + // automatically used as the Version col + // use table.SetVersionCol("columnName") to map a different + // struct field as the version field + Version int64 +} + +p1 := &Person{0, 0, 0, "Bob", "Smith", 0} +err = dbmap.Insert(p1) // Version is now 1 +checkErr(err, "Insert failed") + +obj, err := dbmap.Get(Person{}, p1.Id) +p2 := obj.(*Person) +p2.LName = "Edwards" +_,err = dbmap.Update(p2) // Version is now 2 +checkErr(err, "Update failed") + +p1.LName = "Howard" + +// Raises error because p1.Version == 1, which is out of date +count, err := dbmap.Update(p1) +_, ok := err.(gorp.OptimisticLockError) +if ok { + // should reach this statement + + // in a real app you might reload the row and retry, or + // you might propegate this to the user, depending on the desired + // semantics + fmt.Printf("Tried to update row with stale data: %v\n", err) +} else { + // some other db error occurred - log or return up the stack + fmt.Printf("Unknown db err: %v\n", err) +} +``` +### Adding INDEX(es) on column(s) beyond the primary key ### + +Indexes are frequently critical for performance. Here is how to add +them to your tables. + +NB: SqlServer and Oracle need testing and possible adjustment to the +CreateIndexSuffix() and DropIndexSuffix() methods to make AddIndex() +work for them. + +In the example below we put an index both on the Id field, and on the +AcctId field. + +``` +type Account struct { + Id int64 + AcctId string // e.g. this might be a long uuid for portability +} + +// indexType (the 2nd param to AddIndex call) is "Btree" or "Hash" for MySQL. +// demonstrate adding a second index on AcctId, and constrain that field to have unique values. +dbm.AddTable(iptab.Account{}).SetKeys(true, "Id").AddIndex("AcctIdIndex", "Btree", []string{"AcctId"}).SetUnique(true) + +err = dbm.CreateTablesIfNotExists() +checkErr(err, "CreateTablesIfNotExists failed") + +err = dbm.CreateIndex() +checkErr(err, "CreateIndex failed") + +``` +Check the effect of the CreateIndex() call in mysql: +``` +$ mysql + +MariaDB [test]> show create table Account; ++---------+--------------------------+ +| Account | CREATE TABLE `Account` ( + `Id` bigint(20) NOT NULL AUTO_INCREMENT, + `AcctId` varchar(255) DEFAULT NULL, + PRIMARY KEY (`Id`), + UNIQUE KEY `AcctIdIndex` (`AcctId`) USING BTREE <<<--- yes! index added. +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ++---------+--------------------------+ + +``` + + +## Database Drivers + +gorp uses the Go 1 `database/sql` package. A full list of compliant +drivers is available here: + +http://code.google.com/p/go-wiki/wiki/SQLDrivers + +Sadly, SQL databases differ on various issues. gorp provides a Dialect +interface that should be implemented per database vendor. Dialects +are provided for: + +* MySQL +* PostgreSQL +* sqlite3 + +Each of these three databases pass the test suite. See `gorp_test.go` +for example DSNs for these three databases. + +Support is also provided for: + +* Oracle (contributed by @klaidliadon) +* SQL Server (contributed by @qrawl) - use driver: + github.com/denisenkom/go-mssqldb + +Note that these databases are not covered by CI and I (@coopernurse) +have no good way to test them locally. So please try them and send +patches as needed, but expect a bit more unpredicability. + +## Sqlite3 Extensions + +In order to use sqlite3 extensions you need to first register a custom driver: + +```go +import ( + "database/sql" + + // use whatever database/sql driver you wish + sqlite "github.com/mattn/go-sqlite3" +) + +func customDriver() (*sql.DB, error) { + + // create custom driver with extensions defined + sql.Register("sqlite3-custom", &sqlite.SQLiteDriver{ + Extensions: []string{ + "mod_spatialite", + }, + }) + + // now you can then connect using the 'sqlite3-custom' driver instead of 'sqlite3' + return sql.Open("sqlite3-custom", "/tmp/post_db.bin") +} +``` + +## Known Issues + +### SQL placeholder portability + +Different databases use different strings to indicate variable +placeholders in prepared SQL statements. Unlike some database +abstraction layers (such as JDBC), Go's `database/sql` does not +standardize this. + +SQL generated by gorp in the `Insert`, `Update`, `Delete`, and `Get` +methods delegates to a Dialect implementation for each database, and +will generate portable SQL. + +Raw SQL strings passed to `Exec`, `Select`, `SelectOne`, `SelectInt`, +etc will not be parsed. Consequently you may have portability issues +if you write a query like this: + +```go +// works on MySQL and Sqlite3, but not with Postgresql err := +dbmap.SelectOne(&val, "select * from foo where id = ?", 30) +``` + +In `Select` and `SelectOne` you can use named parameters to work +around this. The following is portable: + +```go +err := dbmap.SelectOne(&val, "select * from foo where id = :id", +map[string]interface{} { "id": 30}) +``` + +Additionally, when using Postgres as your database, you should utilize +`$1` instead of `?` placeholders as utilizing `?` placeholders when +querying Postgres will result in `pq: operator does not exist` +errors. Alternatively, use `dbMap.Dialect.BindVar(varIdx)` to get the +proper variable binding for your dialect. + +### time.Time and time zones + +gorp will pass `time.Time` fields through to the `database/sql` +driver, but note that the behavior of this type varies across database +drivers. + +MySQL users should be especially cautious. See: +https://github.com/ziutek/mymysql/pull/77 + +To avoid any potential issues with timezone/DST, consider: + +- Using an integer field for time data and storing UNIX time. +- Using a custom time type that implements some SQL types: + - [`"database/sql".Scanner`](https://golang.org/pkg/database/sql/#Scanner) + - [`"database/sql/driver".Valuer`](https://golang.org/pkg/database/sql/driver/#Valuer) + +## Running the tests + +The included tests may be run against MySQL, Postgresql, or sqlite3. +You must set two environment variables so the test code knows which +driver to use, and how to connect to your database. + +```sh +# MySQL example: +export GORP_TEST_DSN=gomysql_test/gomysql_test/abc123 +export GORP_TEST_DIALECT=mysql + +# run the tests +go test + +# run the tests and benchmarks +go test -bench="Bench" -benchtime 10 +``` + +Valid `GORP_TEST_DIALECT` values are: "mysql"(for mymysql), +"gomysql"(for go-sql-driver), "postgres", "sqlite" See the +`test_all.sh` script for examples of all 3 databases. This is the +script I run locally to test the library. + +## Performance + +gorp uses reflection to construct SQL queries and bind parameters. +See the BenchmarkNativeCrud vs BenchmarkGorpCrud in gorp_test.go for a +simple perf test. On my MacBook Pro gorp is about 2-3% slower than +hand written SQL. + + +## Contributors + +* matthias-margush - column aliasing via tags +* Rob Figueiredo - @robfig +* Quinn Slack - @sqs diff --git a/vendor/github.com/go-gorp/gorp/v3/column.go b/vendor/github.com/go-gorp/gorp/v3/column.go new file mode 100644 index 000000000..383e9efb6 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/column.go @@ -0,0 +1,76 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import "reflect" + +// ColumnMap represents a mapping between a Go struct field and a single +// column in a table. +// Unique and MaxSize only inform the +// CreateTables() function and are not used by Insert/Update/Delete/Get. +type ColumnMap struct { + // Column name in db table + ColumnName string + + // If true, this column is skipped in generated SQL statements + Transient bool + + // If true, " unique" is added to create table statements. + // Not used elsewhere + Unique bool + + // Query used for getting generated id after insert + GeneratedIdQuery string + + // Passed to Dialect.ToSqlType() to assist in informing the + // correct column type to map to in CreateTables() + MaxSize int + + DefaultValue string + + fieldName string + gotype reflect.Type + isPK bool + isAutoIncr bool + isNotNull bool +} + +// Rename allows you to specify the column name in the table +// +// Example: table.ColMap("Updated").Rename("date_updated") +// +func (c *ColumnMap) Rename(colname string) *ColumnMap { + c.ColumnName = colname + return c +} + +// SetTransient allows you to mark the column as transient. If true +// this column will be skipped when SQL statements are generated +func (c *ColumnMap) SetTransient(b bool) *ColumnMap { + c.Transient = b + return c +} + +// SetUnique adds "unique" to the create table statements for this +// column, if b is true. +func (c *ColumnMap) SetUnique(b bool) *ColumnMap { + c.Unique = b + return c +} + +// SetNotNull adds "not null" to the create table statements for this +// column, if nn is true. +func (c *ColumnMap) SetNotNull(nn bool) *ColumnMap { + c.isNotNull = nn + return c +} + +// SetMaxSize specifies the max length of values of this column. This is +// passed to the dialect.ToSqlType() function, which can use the value +// to alter the generated type for "create table" statements +func (c *ColumnMap) SetMaxSize(size int) *ColumnMap { + c.MaxSize = size + return c +} diff --git a/vendor/github.com/go-gorp/gorp/v3/db.go b/vendor/github.com/go-gorp/gorp/v3/db.go new file mode 100644 index 000000000..d78062e5b --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/db.go @@ -0,0 +1,985 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "bytes" + "context" + "database/sql" + "database/sql/driver" + "errors" + "fmt" + "log" + "reflect" + "strconv" + "strings" + "time" +) + +// DbMap is the root gorp mapping object. Create one of these for each +// database schema you wish to map. Each DbMap contains a list of +// mapped tables. +// +// Example: +// +// dialect := gorp.MySQLDialect{"InnoDB", "UTF8"} +// dbmap := &gorp.DbMap{Db: db, Dialect: dialect} +// +type DbMap struct { + ctx context.Context + + // Db handle to use with this map + Db *sql.DB + + // Dialect implementation to use with this map + Dialect Dialect + + TypeConverter TypeConverter + + // ExpandSlices when enabled will convert slice arguments in mappers into flat + // values. It will modify the query, adding more placeholders, and the mapper, + // adding each item of the slice as a new unique entry in the mapper. For + // example, given the scenario bellow: + // + // dbmap.Select(&output, "SELECT 1 FROM example WHERE id IN (:IDs)", map[string]interface{}{ + // "IDs": []int64{1, 2, 3}, + // }) + // + // The executed query would be: + // + // SELECT 1 FROM example WHERE id IN (:IDs0,:IDs1,:IDs2) + // + // With the mapper: + // + // map[string]interface{}{ + // "IDs": []int64{1, 2, 3}, + // "IDs0": int64(1), + // "IDs1": int64(2), + // "IDs2": int64(3), + // } + // + // It is also flexible for custom slice types. The value just need to + // implement stringer or numberer interfaces. + // + // type CustomValue string + // + // const ( + // CustomValueHey CustomValue = "hey" + // CustomValueOh CustomValue = "oh" + // ) + // + // type CustomValues []CustomValue + // + // func (c CustomValues) ToStringSlice() []string { + // values := make([]string, len(c)) + // for i := range c { + // values[i] = string(c[i]) + // } + // return values + // } + // + // func query() { + // // ... + // result, err := dbmap.Select(&output, "SELECT 1 FROM example WHERE value IN (:Values)", map[string]interface{}{ + // "Values": CustomValues([]CustomValue{CustomValueHey}), + // }) + // // ... + // } + ExpandSliceArgs bool + + tables []*TableMap + tablesDynamic map[string]*TableMap // tables that use same go-struct and different db table names + logger GorpLogger + logPrefix string +} + +func (m *DbMap) dynamicTableAdd(tableName string, tbl *TableMap) { + if m.tablesDynamic == nil { + m.tablesDynamic = make(map[string]*TableMap) + } + m.tablesDynamic[tableName] = tbl +} + +func (m *DbMap) dynamicTableFind(tableName string) (*TableMap, bool) { + if m.tablesDynamic == nil { + return nil, false + } + tbl, found := m.tablesDynamic[tableName] + return tbl, found +} + +func (m *DbMap) dynamicTableMap() map[string]*TableMap { + if m.tablesDynamic == nil { + m.tablesDynamic = make(map[string]*TableMap) + } + return m.tablesDynamic +} + +func (m *DbMap) WithContext(ctx context.Context) SqlExecutor { + copy := &DbMap{} + *copy = *m + copy.ctx = ctx + return copy +} + +func (m *DbMap) CreateIndex() error { + var err error + dialect := reflect.TypeOf(m.Dialect) + for _, table := range m.tables { + for _, index := range table.indexes { + err = m.createIndexImpl(dialect, table, index) + if err != nil { + break + } + } + } + + for _, table := range m.dynamicTableMap() { + for _, index := range table.indexes { + err = m.createIndexImpl(dialect, table, index) + if err != nil { + break + } + } + } + + return err +} + +func (m *DbMap) createIndexImpl(dialect reflect.Type, + table *TableMap, + index *IndexMap) error { + s := bytes.Buffer{} + s.WriteString("create") + if index.Unique { + s.WriteString(" unique") + } + s.WriteString(" index") + s.WriteString(fmt.Sprintf(" %s on %s", index.IndexName, table.TableName)) + if dname := dialect.Name(); dname == "PostgresDialect" && index.IndexType != "" { + s.WriteString(fmt.Sprintf(" %s %s", m.Dialect.CreateIndexSuffix(), index.IndexType)) + } + s.WriteString(" (") + for x, col := range index.columns { + if x > 0 { + s.WriteString(", ") + } + s.WriteString(m.Dialect.QuoteField(col)) + } + s.WriteString(")") + + if dname := dialect.Name(); dname == "MySQLDialect" && index.IndexType != "" { + s.WriteString(fmt.Sprintf(" %s %s", m.Dialect.CreateIndexSuffix(), index.IndexType)) + } + s.WriteString(";") + _, err := m.Exec(s.String()) + return err +} + +func (t *TableMap) DropIndex(name string) error { + + var err error + dialect := reflect.TypeOf(t.dbmap.Dialect) + for _, idx := range t.indexes { + if idx.IndexName == name { + s := bytes.Buffer{} + s.WriteString(fmt.Sprintf("DROP INDEX %s", idx.IndexName)) + + if dname := dialect.Name(); dname == "MySQLDialect" { + s.WriteString(fmt.Sprintf(" %s %s", t.dbmap.Dialect.DropIndexSuffix(), t.TableName)) + } + s.WriteString(";") + _, e := t.dbmap.Exec(s.String()) + if e != nil { + err = e + } + break + } + } + t.ResetSql() + return err +} + +// AddTable registers the given interface type with gorp. The table name +// will be given the name of the TypeOf(i). You must call this function, +// or AddTableWithName, for any struct type you wish to persist with +// the given DbMap. +// +// This operation is idempotent. If i's type is already mapped, the +// existing *TableMap is returned +func (m *DbMap) AddTable(i interface{}) *TableMap { + return m.AddTableWithName(i, "") +} + +// AddTableWithName has the same behavior as AddTable, but sets +// table.TableName to name. +func (m *DbMap) AddTableWithName(i interface{}, name string) *TableMap { + return m.AddTableWithNameAndSchema(i, "", name) +} + +// AddTableWithNameAndSchema has the same behavior as AddTable, but sets +// table.TableName to name. +func (m *DbMap) AddTableWithNameAndSchema(i interface{}, schema string, name string) *TableMap { + t := reflect.TypeOf(i) + if name == "" { + name = t.Name() + } + + // check if we have a table for this type already + // if so, update the name and return the existing pointer + for i := range m.tables { + table := m.tables[i] + if table.gotype == t { + table.TableName = name + return table + } + } + + tmap := &TableMap{gotype: t, TableName: name, SchemaName: schema, dbmap: m} + var primaryKey []*ColumnMap + tmap.Columns, primaryKey = m.readStructColumns(t) + m.tables = append(m.tables, tmap) + if len(primaryKey) > 0 { + tmap.keys = append(tmap.keys, primaryKey...) + } + + return tmap +} + +// AddTableDynamic registers the given interface type with gorp. +// The table name will be dynamically determined at runtime by +// using the GetTableName method on DynamicTable interface +func (m *DbMap) AddTableDynamic(inp DynamicTable, schema string) *TableMap { + + val := reflect.ValueOf(inp) + elm := val.Elem() + t := elm.Type() + name := inp.TableName() + if name == "" { + panic("Missing table name in DynamicTable instance") + } + + // Check if there is another dynamic table with the same name + if _, found := m.dynamicTableFind(name); found { + panic(fmt.Sprintf("A table with the same name %v already exists", name)) + } + + tmap := &TableMap{gotype: t, TableName: name, SchemaName: schema, dbmap: m} + var primaryKey []*ColumnMap + tmap.Columns, primaryKey = m.readStructColumns(t) + if len(primaryKey) > 0 { + tmap.keys = append(tmap.keys, primaryKey...) + } + + m.dynamicTableAdd(name, tmap) + + return tmap +} + +func (m *DbMap) readStructColumns(t reflect.Type) (cols []*ColumnMap, primaryKey []*ColumnMap) { + primaryKey = make([]*ColumnMap, 0) + n := t.NumField() + for i := 0; i < n; i++ { + f := t.Field(i) + if f.Anonymous && f.Type.Kind() == reflect.Struct { + // Recursively add nested fields in embedded structs. + subcols, subpk := m.readStructColumns(f.Type) + // Don't append nested fields that have the same field + // name as an already-mapped field. + for _, subcol := range subcols { + shouldAppend := true + for _, col := range cols { + if !subcol.Transient && subcol.fieldName == col.fieldName { + shouldAppend = false + break + } + } + if shouldAppend { + cols = append(cols, subcol) + } + } + if subpk != nil { + primaryKey = append(primaryKey, subpk...) + } + } else { + // Tag = Name { ',' Option } + // Option = OptionKey [ ':' OptionValue ] + cArguments := strings.Split(f.Tag.Get("db"), ",") + columnName := cArguments[0] + var maxSize int + var defaultValue string + var isAuto bool + var isPK bool + var isNotNull bool + for _, argString := range cArguments[1:] { + argString = strings.TrimSpace(argString) + arg := strings.SplitN(argString, ":", 2) + + // check mandatory/unexpected option values + switch arg[0] { + case "size", "default": + // options requiring value + if len(arg) == 1 { + panic(fmt.Sprintf("missing option value for option %v on field %v", arg[0], f.Name)) + } + default: + // options where value is invalid (currently all other options) + if len(arg) == 2 { + panic(fmt.Sprintf("unexpected option value for option %v on field %v", arg[0], f.Name)) + } + } + + switch arg[0] { + case "size": + maxSize, _ = strconv.Atoi(arg[1]) + case "default": + defaultValue = arg[1] + case "primarykey": + isPK = true + case "autoincrement": + isAuto = true + case "notnull": + isNotNull = true + default: + panic(fmt.Sprintf("Unrecognized tag option for field %v: %v", f.Name, arg)) + } + } + if columnName == "" { + columnName = f.Name + } + + gotype := f.Type + valueType := gotype + if valueType.Kind() == reflect.Ptr { + valueType = valueType.Elem() + } + value := reflect.New(valueType).Interface() + if m.TypeConverter != nil { + // Make a new pointer to a value of type gotype and + // pass it to the TypeConverter's FromDb method to see + // if a different type should be used for the column + // type during table creation. + scanner, useHolder := m.TypeConverter.FromDb(value) + if useHolder { + value = scanner.Holder + gotype = reflect.TypeOf(value) + } + } + if typer, ok := value.(SqlTyper); ok { + gotype = reflect.TypeOf(typer.SqlType()) + } else if typer, ok := value.(legacySqlTyper); ok { + log.Printf("Deprecation Warning: update your SqlType methods to return a driver.Value") + gotype = reflect.TypeOf(typer.SqlType()) + } else if valuer, ok := value.(driver.Valuer); ok { + // Only check for driver.Valuer if SqlTyper wasn't + // found. + v, err := valuer.Value() + if err == nil && v != nil { + gotype = reflect.TypeOf(v) + } + } + cm := &ColumnMap{ + ColumnName: columnName, + DefaultValue: defaultValue, + Transient: columnName == "-", + fieldName: f.Name, + gotype: gotype, + isPK: isPK, + isAutoIncr: isAuto, + isNotNull: isNotNull, + MaxSize: maxSize, + } + if isPK { + primaryKey = append(primaryKey, cm) + } + // Check for nested fields of the same field name and + // override them. + shouldAppend := true + for index, col := range cols { + if !col.Transient && col.fieldName == cm.fieldName { + cols[index] = cm + shouldAppend = false + break + } + } + if shouldAppend { + cols = append(cols, cm) + } + } + + } + return +} + +// CreateTables iterates through TableMaps registered to this DbMap and +// executes "create table" statements against the database for each. +// +// This is particularly useful in unit tests where you want to create +// and destroy the schema automatically. +func (m *DbMap) CreateTables() error { + return m.createTables(false) +} + +// CreateTablesIfNotExists is similar to CreateTables, but starts +// each statement with "create table if not exists" so that existing +// tables do not raise errors +func (m *DbMap) CreateTablesIfNotExists() error { + return m.createTables(true) +} + +func (m *DbMap) createTables(ifNotExists bool) error { + var err error + for i := range m.tables { + table := m.tables[i] + sql := table.SqlForCreate(ifNotExists) + _, err = m.Exec(sql) + if err != nil { + return err + } + } + + for _, tbl := range m.dynamicTableMap() { + sql := tbl.SqlForCreate(ifNotExists) + _, err = m.Exec(sql) + if err != nil { + return err + } + } + + return err +} + +// DropTable drops an individual table. +// Returns an error when the table does not exist. +func (m *DbMap) DropTable(table interface{}) error { + t := reflect.TypeOf(table) + + tableName := "" + if dyn, ok := table.(DynamicTable); ok { + tableName = dyn.TableName() + } + + return m.dropTable(t, tableName, false) +} + +// DropTableIfExists drops an individual table when the table exists. +func (m *DbMap) DropTableIfExists(table interface{}) error { + t := reflect.TypeOf(table) + + tableName := "" + if dyn, ok := table.(DynamicTable); ok { + tableName = dyn.TableName() + } + + return m.dropTable(t, tableName, true) +} + +// DropTables iterates through TableMaps registered to this DbMap and +// executes "drop table" statements against the database for each. +func (m *DbMap) DropTables() error { + return m.dropTables(false) +} + +// DropTablesIfExists is the same as DropTables, but uses the "if exists" clause to +// avoid errors for tables that do not exist. +func (m *DbMap) DropTablesIfExists() error { + return m.dropTables(true) +} + +// Goes through all the registered tables, dropping them one by one. +// If an error is encountered, then it is returned and the rest of +// the tables are not dropped. +func (m *DbMap) dropTables(addIfExists bool) (err error) { + for _, table := range m.tables { + err = m.dropTableImpl(table, addIfExists) + if err != nil { + return err + } + } + + for _, table := range m.dynamicTableMap() { + err = m.dropTableImpl(table, addIfExists) + if err != nil { + return err + } + } + + return err +} + +// Implementation of dropping a single table. +func (m *DbMap) dropTable(t reflect.Type, name string, addIfExists bool) error { + table := tableOrNil(m, t, name) + if table == nil { + return fmt.Errorf("table %s was not registered", table.TableName) + } + + return m.dropTableImpl(table, addIfExists) +} + +func (m *DbMap) dropTableImpl(table *TableMap, ifExists bool) (err error) { + tableDrop := "drop table" + if ifExists { + tableDrop = m.Dialect.IfTableExists(tableDrop, table.SchemaName, table.TableName) + } + _, err = m.Exec(fmt.Sprintf("%s %s;", tableDrop, m.Dialect.QuotedTableForQuery(table.SchemaName, table.TableName))) + return err +} + +// TruncateTables iterates through TableMaps registered to this DbMap and +// executes "truncate table" statements against the database for each, or in the case of +// sqlite, a "delete from" with no "where" clause, which uses the truncate optimization +// (http://www.sqlite.org/lang_delete.html) +func (m *DbMap) TruncateTables() error { + var err error + for i := range m.tables { + table := m.tables[i] + _, e := m.Exec(fmt.Sprintf("%s %s;", m.Dialect.TruncateClause(), m.Dialect.QuotedTableForQuery(table.SchemaName, table.TableName))) + if e != nil { + err = e + } + } + + for _, table := range m.dynamicTableMap() { + _, e := m.Exec(fmt.Sprintf("%s %s;", m.Dialect.TruncateClause(), m.Dialect.QuotedTableForQuery(table.SchemaName, table.TableName))) + if e != nil { + err = e + } + } + + return err +} + +// Insert runs a SQL INSERT statement for each element in list. List +// items must be pointers. +// +// Any interface whose TableMap has an auto-increment primary key will +// have its last insert id bound to the PK field on the struct. +// +// The hook functions PreInsert() and/or PostInsert() will be executed +// before/after the INSERT statement if the interface defines them. +// +// Panics if any interface in the list has not been registered with AddTable +func (m *DbMap) Insert(list ...interface{}) error { + return insert(m, m, list...) +} + +// Update runs a SQL UPDATE statement for each element in list. List +// items must be pointers. +// +// The hook functions PreUpdate() and/or PostUpdate() will be executed +// before/after the UPDATE statement if the interface defines them. +// +// Returns the number of rows updated. +// +// Returns an error if SetKeys has not been called on the TableMap +// Panics if any interface in the list has not been registered with AddTable +func (m *DbMap) Update(list ...interface{}) (int64, error) { + return update(m, m, nil, list...) +} + +// UpdateColumns runs a SQL UPDATE statement for each element in list. List +// items must be pointers. +// +// Only the columns accepted by filter are included in the UPDATE. +// +// The hook functions PreUpdate() and/or PostUpdate() will be executed +// before/after the UPDATE statement if the interface defines them. +// +// Returns the number of rows updated. +// +// Returns an error if SetKeys has not been called on the TableMap +// Panics if any interface in the list has not been registered with AddTable +func (m *DbMap) UpdateColumns(filter ColumnFilter, list ...interface{}) (int64, error) { + return update(m, m, filter, list...) +} + +// Delete runs a SQL DELETE statement for each element in list. List +// items must be pointers. +// +// The hook functions PreDelete() and/or PostDelete() will be executed +// before/after the DELETE statement if the interface defines them. +// +// Returns the number of rows deleted. +// +// Returns an error if SetKeys has not been called on the TableMap +// Panics if any interface in the list has not been registered with AddTable +func (m *DbMap) Delete(list ...interface{}) (int64, error) { + return delete(m, m, list...) +} + +// Get runs a SQL SELECT to fetch a single row from the table based on the +// primary key(s) +// +// i should be an empty value for the struct to load. keys should be +// the primary key value(s) for the row to load. If multiple keys +// exist on the table, the order should match the column order +// specified in SetKeys() when the table mapping was defined. +// +// The hook function PostGet() will be executed after the SELECT +// statement if the interface defines them. +// +// Returns a pointer to a struct that matches or nil if no row is found. +// +// Returns an error if SetKeys has not been called on the TableMap +// Panics if any interface in the list has not been registered with AddTable +func (m *DbMap) Get(i interface{}, keys ...interface{}) (interface{}, error) { + return get(m, m, i, keys...) +} + +// Select runs an arbitrary SQL query, binding the columns in the result +// to fields on the struct specified by i. args represent the bind +// parameters for the SQL statement. +// +// Column names on the SELECT statement should be aliased to the field names +// on the struct i. Returns an error if one or more columns in the result +// do not match. It is OK if fields on i are not part of the SQL +// statement. +// +// The hook function PostGet() will be executed after the SELECT +// statement if the interface defines them. +// +// Values are returned in one of two ways: +// 1. If i is a struct or a pointer to a struct, returns a slice of pointers to +// matching rows of type i. +// 2. If i is a pointer to a slice, the results will be appended to that slice +// and nil returned. +// +// i does NOT need to be registered with AddTable() +func (m *DbMap) Select(i interface{}, query string, args ...interface{}) ([]interface{}, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return hookedselect(m, m, i, query, args...) +} + +// Exec runs an arbitrary SQL statement. args represent the bind parameters. +// This is equivalent to running: Exec() using database/sql +func (m *DbMap) Exec(query string, args ...interface{}) (sql.Result, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + if m.logger != nil { + now := time.Now() + defer m.trace(now, query, args...) + } + return maybeExpandNamedQueryAndExec(m, query, args...) +} + +// SelectInt is a convenience wrapper around the gorp.SelectInt function +func (m *DbMap) SelectInt(query string, args ...interface{}) (int64, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectInt(m, query, args...) +} + +// SelectNullInt is a convenience wrapper around the gorp.SelectNullInt function +func (m *DbMap) SelectNullInt(query string, args ...interface{}) (sql.NullInt64, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectNullInt(m, query, args...) +} + +// SelectFloat is a convenience wrapper around the gorp.SelectFloat function +func (m *DbMap) SelectFloat(query string, args ...interface{}) (float64, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectFloat(m, query, args...) +} + +// SelectNullFloat is a convenience wrapper around the gorp.SelectNullFloat function +func (m *DbMap) SelectNullFloat(query string, args ...interface{}) (sql.NullFloat64, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectNullFloat(m, query, args...) +} + +// SelectStr is a convenience wrapper around the gorp.SelectStr function +func (m *DbMap) SelectStr(query string, args ...interface{}) (string, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectStr(m, query, args...) +} + +// SelectNullStr is a convenience wrapper around the gorp.SelectNullStr function +func (m *DbMap) SelectNullStr(query string, args ...interface{}) (sql.NullString, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectNullStr(m, query, args...) +} + +// SelectOne is a convenience wrapper around the gorp.SelectOne function +func (m *DbMap) SelectOne(holder interface{}, query string, args ...interface{}) error { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectOne(m, m, holder, query, args...) +} + +// Begin starts a gorp Transaction +func (m *DbMap) Begin() (*Transaction, error) { + if m.logger != nil { + now := time.Now() + defer m.trace(now, "begin;") + } + tx, err := begin(m) + if err != nil { + return nil, err + } + return &Transaction{ + dbmap: m, + tx: tx, + closed: false, + }, nil +} + +// TableFor returns the *TableMap corresponding to the given Go Type +// If no table is mapped to that type an error is returned. +// If checkPK is true and the mapped table has no registered PKs, an error is returned. +func (m *DbMap) TableFor(t reflect.Type, checkPK bool) (*TableMap, error) { + table := tableOrNil(m, t, "") + if table == nil { + return nil, fmt.Errorf("no table found for type: %v", t.Name()) + } + + if checkPK && len(table.keys) < 1 { + e := fmt.Sprintf("gorp: no keys defined for table: %s", + table.TableName) + return nil, errors.New(e) + } + + return table, nil +} + +// DynamicTableFor returns the *TableMap for the dynamic table corresponding +// to the input tablename +// If no table is mapped to that tablename an error is returned. +// If checkPK is true and the mapped table has no registered PKs, an error is returned. +func (m *DbMap) DynamicTableFor(tableName string, checkPK bool) (*TableMap, error) { + table, found := m.dynamicTableFind(tableName) + if !found { + return nil, fmt.Errorf("gorp: no table found for name: %v", tableName) + } + + if checkPK && len(table.keys) < 1 { + e := fmt.Sprintf("gorp: no keys defined for table: %s", + table.TableName) + return nil, errors.New(e) + } + + return table, nil +} + +// Prepare creates a prepared statement for later queries or executions. +// Multiple queries or executions may be run concurrently from the returned statement. +// This is equivalent to running: Prepare() using database/sql +func (m *DbMap) Prepare(query string) (*sql.Stmt, error) { + if m.logger != nil { + now := time.Now() + defer m.trace(now, query, nil) + } + return prepare(m, query) +} + +func tableOrNil(m *DbMap, t reflect.Type, name string) *TableMap { + if name != "" { + // Search by table name (dynamic tables) + if table, found := m.dynamicTableFind(name); found { + return table + } + return nil + } + + for i := range m.tables { + table := m.tables[i] + if table.gotype == t { + return table + } + } + return nil +} + +func (m *DbMap) tableForPointer(ptr interface{}, checkPK bool) (*TableMap, reflect.Value, error) { + ptrv := reflect.ValueOf(ptr) + if ptrv.Kind() != reflect.Ptr { + e := fmt.Sprintf("gorp: passed non-pointer: %v (kind=%v)", ptr, + ptrv.Kind()) + return nil, reflect.Value{}, errors.New(e) + } + elem := ptrv.Elem() + ifc := elem.Interface() + var t *TableMap + var err error + tableName := "" + if dyn, isDyn := ptr.(DynamicTable); isDyn { + tableName = dyn.TableName() + t, err = m.DynamicTableFor(tableName, checkPK) + } else { + etype := reflect.TypeOf(ifc) + t, err = m.TableFor(etype, checkPK) + } + + if err != nil { + return nil, reflect.Value{}, err + } + + return t, elem, nil +} + +func (m *DbMap) QueryRow(query string, args ...interface{}) *sql.Row { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + if m.logger != nil { + now := time.Now() + defer m.trace(now, query, args...) + } + return queryRow(m, query, args...) +} + +func (m *DbMap) Query(q string, args ...interface{}) (*sql.Rows, error) { + if m.ExpandSliceArgs { + expandSliceArgs(&q, args...) + } + + if m.logger != nil { + now := time.Now() + defer m.trace(now, q, args...) + } + return query(m, q, args...) +} + +func (m *DbMap) trace(started time.Time, query string, args ...interface{}) { + if m.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + if m.logger != nil { + var margs = argsString(args...) + m.logger.Printf("%s%s [%s] (%v)", m.logPrefix, query, margs, (time.Now().Sub(started))) + } +} + +type stringer interface { + ToStringSlice() []string +} + +type numberer interface { + ToInt64Slice() []int64 +} + +func expandSliceArgs(query *string, args ...interface{}) { + for _, arg := range args { + mapper, ok := arg.(map[string]interface{}) + if !ok { + continue + } + + for key, value := range mapper { + var replacements []string + + // add flexibility for any custom type to be convert to one of the + // acceptable formats. + if v, ok := value.(stringer); ok { + value = v.ToStringSlice() + } + if v, ok := value.(numberer); ok { + value = v.ToInt64Slice() + } + + switch v := value.(type) { + case []string: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []uint: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []uint8: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []uint16: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []uint32: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []uint64: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []int: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []int8: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []int16: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []int32: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []int64: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []float32: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + case []float64: + for id, replace := range v { + mapper[fmt.Sprintf("%s%d", key, id)] = replace + replacements = append(replacements, fmt.Sprintf(":%s%d", key, id)) + } + default: + continue + } + + if len(replacements) == 0 { + continue + } + + *query = strings.Replace(*query, fmt.Sprintf(":%s", key), strings.Join(replacements, ","), -1) + } + } +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect.go b/vendor/github.com/go-gorp/gorp/v3/dialect.go new file mode 100644 index 000000000..fdea2b203 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect.go @@ -0,0 +1,105 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "reflect" +) + +// The Dialect interface encapsulates behaviors that differ across +// SQL databases. At present the Dialect is only used by CreateTables() +// but this could change in the future +type Dialect interface { + // adds a suffix to any query, usually ";" + QuerySuffix() string + + // ToSqlType returns the SQL column type to use when creating a + // table of the given Go Type. maxsize can be used to switch based on + // size. For example, in MySQL []byte could map to BLOB, MEDIUMBLOB, + // or LONGBLOB depending on the maxsize + ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string + + // string to append to primary key column definitions + AutoIncrStr() string + + // string to bind autoincrement columns to. Empty string will + // remove reference to those columns in the INSERT statement. + AutoIncrBindValue() string + + AutoIncrInsertSuffix(col *ColumnMap) string + + // string to append to "create table" statement for vendor specific + // table attributes + CreateTableSuffix() string + + // string to append to "create index" statement + CreateIndexSuffix() string + + // string to append to "drop index" statement + DropIndexSuffix() string + + // string to truncate tables + TruncateClause() string + + // bind variable string to use when forming SQL statements + // in many dbs it is "?", but Postgres appears to use $1 + // + // i is a zero based index of the bind variable in this statement + // + BindVar(i int) string + + // Handles quoting of a field name to ensure that it doesn't raise any + // SQL parsing exceptions by using a reserved word as a field name. + QuoteField(field string) string + + // Handles building up of a schema.database string that is compatible with + // the given dialect + // + // schema - The schema that lives in + // table - The table name + QuotedTableForQuery(schema string, table string) string + + // Existence clause for table creation / deletion + IfSchemaNotExists(command, schema string) string + IfTableExists(command, schema, table string) string + IfTableNotExists(command, schema, table string) string +} + +// IntegerAutoIncrInserter is implemented by dialects that can perform +// inserts with automatically incremented integer primary keys. If +// the dialect can handle automatic assignment of more than just +// integers, see TargetedAutoIncrInserter. +type IntegerAutoIncrInserter interface { + InsertAutoIncr(exec SqlExecutor, insertSql string, params ...interface{}) (int64, error) +} + +// TargetedAutoIncrInserter is implemented by dialects that can +// perform automatic assignment of any primary key type (i.e. strings +// for uuids, integers for serials, etc). +type TargetedAutoIncrInserter interface { + // InsertAutoIncrToTarget runs an insert operation and assigns the + // automatically generated primary key directly to the passed in + // target. The target should be a pointer to the primary key + // field of the value being inserted. + InsertAutoIncrToTarget(exec SqlExecutor, insertSql string, target interface{}, params ...interface{}) error +} + +// TargetQueryInserter is implemented by dialects that can perform +// assignment of integer primary key type by executing a query +// like "select sequence.currval from dual". +type TargetQueryInserter interface { + // TargetQueryInserter runs an insert operation and assigns the + // automatically generated primary key retrived by the query + // extracted from the GeneratedIdQuery field of the id column. + InsertQueryToTarget(exec SqlExecutor, insertSql, idSql string, target interface{}, params ...interface{}) error +} + +func standardInsertAutoIncr(exec SqlExecutor, insertSql string, params ...interface{}) (int64, error) { + res, err := exec.Exec(insertSql, params...) + if err != nil { + return 0, err + } + return res.LastInsertId() +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect_mysql.go b/vendor/github.com/go-gorp/gorp/v3/dialect_mysql.go new file mode 100644 index 000000000..d068ebe85 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect_mysql.go @@ -0,0 +1,169 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" + "strings" + "time" +) + +// Implementation of Dialect for MySQL databases. +type MySQLDialect struct { + + // Engine is the storage engine to use "InnoDB" vs "MyISAM" for example + Engine string + + // Encoding is the character encoding to use for created tables + Encoding string +} + +func (d MySQLDialect) QuerySuffix() string { return ";" } + +func (d MySQLDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string { + switch val.Kind() { + case reflect.Ptr: + return d.ToSqlType(val.Elem(), maxsize, isAutoIncr) + case reflect.Bool: + return "boolean" + case reflect.Int8: + return "tinyint" + case reflect.Uint8: + return "tinyint unsigned" + case reflect.Int16: + return "smallint" + case reflect.Uint16: + return "smallint unsigned" + case reflect.Int, reflect.Int32: + return "int" + case reflect.Uint, reflect.Uint32: + return "int unsigned" + case reflect.Int64: + return "bigint" + case reflect.Uint64: + return "bigint unsigned" + case reflect.Float64, reflect.Float32: + return "double" + case reflect.Slice: + if val.Elem().Kind() == reflect.Uint8 { + return "mediumblob" + } + } + + switch val.Name() { + case "NullInt64": + return "bigint" + case "NullFloat64": + return "double" + case "NullBool": + return "tinyint" + case "Time": + return "datetime" + } + + if maxsize < 1 { + maxsize = 255 + } + + /* == About varchar(N) == + * N is number of characters. + * A varchar column can store up to 65535 bytes. + * Remember that 1 character is 3 bytes in utf-8 charset. + * Also remember that each row can store up to 65535 bytes, + * and you have some overheads, so it's not possible for a + * varchar column to have 65535/3 characters really. + * So it would be better to use 'text' type in stead of + * large varchar type. + */ + if maxsize < 256 { + return fmt.Sprintf("varchar(%d)", maxsize) + } else { + return "text" + } +} + +// Returns auto_increment +func (d MySQLDialect) AutoIncrStr() string { + return "auto_increment" +} + +func (d MySQLDialect) AutoIncrBindValue() string { + return "null" +} + +func (d MySQLDialect) AutoIncrInsertSuffix(col *ColumnMap) string { + return "" +} + +// Returns engine=%s charset=%s based on values stored on struct +func (d MySQLDialect) CreateTableSuffix() string { + if d.Engine == "" || d.Encoding == "" { + msg := "gorp - undefined" + + if d.Engine == "" { + msg += " MySQLDialect.Engine" + } + if d.Engine == "" && d.Encoding == "" { + msg += "," + } + if d.Encoding == "" { + msg += " MySQLDialect.Encoding" + } + msg += ". Check that your MySQLDialect was correctly initialized when declared." + panic(msg) + } + + return fmt.Sprintf(" engine=%s charset=%s", d.Engine, d.Encoding) +} + +func (d MySQLDialect) CreateIndexSuffix() string { + return "using" +} + +func (d MySQLDialect) DropIndexSuffix() string { + return "on" +} + +func (d MySQLDialect) TruncateClause() string { + return "truncate" +} + +func (d MySQLDialect) SleepClause(s time.Duration) string { + return fmt.Sprintf("sleep(%f)", s.Seconds()) +} + +// Returns "?" +func (d MySQLDialect) BindVar(i int) string { + return "?" +} + +func (d MySQLDialect) InsertAutoIncr(exec SqlExecutor, insertSql string, params ...interface{}) (int64, error) { + return standardInsertAutoIncr(exec, insertSql, params...) +} + +func (d MySQLDialect) QuoteField(f string) string { + return "`" + f + "`" +} + +func (d MySQLDialect) QuotedTableForQuery(schema string, table string) string { + if strings.TrimSpace(schema) == "" { + return d.QuoteField(table) + } + + return schema + "." + d.QuoteField(table) +} + +func (d MySQLDialect) IfSchemaNotExists(command, schema string) string { + return fmt.Sprintf("%s if not exists", command) +} + +func (d MySQLDialect) IfTableExists(command, schema, table string) string { + return fmt.Sprintf("%s if exists", command) +} + +func (d MySQLDialect) IfTableNotExists(command, schema, table string) string { + return fmt.Sprintf("%s if not exists", command) +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect_oracle.go b/vendor/github.com/go-gorp/gorp/v3/dialect_oracle.go new file mode 100644 index 000000000..01a99b8a1 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect_oracle.go @@ -0,0 +1,139 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" + "strings" +) + +// Implementation of Dialect for Oracle databases. +type OracleDialect struct{} + +func (d OracleDialect) QuerySuffix() string { return "" } + +func (d OracleDialect) CreateIndexSuffix() string { return "" } + +func (d OracleDialect) DropIndexSuffix() string { return "" } + +func (d OracleDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string { + switch val.Kind() { + case reflect.Ptr: + return d.ToSqlType(val.Elem(), maxsize, isAutoIncr) + case reflect.Bool: + return "boolean" + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32: + if isAutoIncr { + return "serial" + } + return "integer" + case reflect.Int64, reflect.Uint64: + if isAutoIncr { + return "bigserial" + } + return "bigint" + case reflect.Float64: + return "double precision" + case reflect.Float32: + return "real" + case reflect.Slice: + if val.Elem().Kind() == reflect.Uint8 { + return "bytea" + } + } + + switch val.Name() { + case "NullInt64": + return "bigint" + case "NullFloat64": + return "double precision" + case "NullBool": + return "boolean" + case "NullTime", "Time": + return "timestamp with time zone" + } + + if maxsize > 0 { + return fmt.Sprintf("varchar(%d)", maxsize) + } else { + return "text" + } + +} + +// Returns empty string +func (d OracleDialect) AutoIncrStr() string { + return "" +} + +func (d OracleDialect) AutoIncrBindValue() string { + return "NULL" +} + +func (d OracleDialect) AutoIncrInsertSuffix(col *ColumnMap) string { + return "" +} + +// Returns suffix +func (d OracleDialect) CreateTableSuffix() string { + return "" +} + +func (d OracleDialect) TruncateClause() string { + return "truncate" +} + +// Returns "$(i+1)" +func (d OracleDialect) BindVar(i int) string { + return fmt.Sprintf(":%d", i+1) +} + +// After executing the insert uses the ColMap IdQuery to get the generated id +func (d OracleDialect) InsertQueryToTarget(exec SqlExecutor, insertSql, idSql string, target interface{}, params ...interface{}) error { + _, err := exec.Exec(insertSql, params...) + if err != nil { + return err + } + id, err := exec.SelectInt(idSql) + if err != nil { + return err + } + switch target.(type) { + case *int64: + *(target.(*int64)) = id + case *int32: + *(target.(*int32)) = int32(id) + case int: + *(target.(*int)) = int(id) + default: + return fmt.Errorf("Id field can be int, int32 or int64") + } + return nil +} + +func (d OracleDialect) QuoteField(f string) string { + return `"` + strings.ToUpper(f) + `"` +} + +func (d OracleDialect) QuotedTableForQuery(schema string, table string) string { + if strings.TrimSpace(schema) == "" { + return d.QuoteField(table) + } + + return schema + "." + d.QuoteField(table) +} + +func (d OracleDialect) IfSchemaNotExists(command, schema string) string { + return fmt.Sprintf("%s if not exists", command) +} + +func (d OracleDialect) IfTableExists(command, schema, table string) string { + return fmt.Sprintf("%s if exists", command) +} + +func (d OracleDialect) IfTableNotExists(command, schema, table string) string { + return fmt.Sprintf("%s if not exists", command) +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect_postgres.go b/vendor/github.com/go-gorp/gorp/v3/dialect_postgres.go new file mode 100644 index 000000000..7a9c50bf8 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect_postgres.go @@ -0,0 +1,149 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" + "strings" + "time" +) + +type PostgresDialect struct { + suffix string + LowercaseFields bool +} + +func (d PostgresDialect) QuerySuffix() string { return ";" } + +func (d PostgresDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string { + switch val.Kind() { + case reflect.Ptr: + return d.ToSqlType(val.Elem(), maxsize, isAutoIncr) + case reflect.Bool: + return "boolean" + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32: + if isAutoIncr { + return "serial" + } + return "integer" + case reflect.Int64, reflect.Uint64: + if isAutoIncr { + return "bigserial" + } + return "bigint" + case reflect.Float64: + return "double precision" + case reflect.Float32: + return "real" + case reflect.Slice: + if val.Elem().Kind() == reflect.Uint8 { + return "bytea" + } + } + + switch val.Name() { + case "NullInt64": + return "bigint" + case "NullFloat64": + return "double precision" + case "NullBool": + return "boolean" + case "Time", "NullTime": + return "timestamp with time zone" + } + + if maxsize > 0 { + return fmt.Sprintf("varchar(%d)", maxsize) + } else { + return "text" + } + +} + +// Returns empty string +func (d PostgresDialect) AutoIncrStr() string { + return "" +} + +func (d PostgresDialect) AutoIncrBindValue() string { + return "default" +} + +func (d PostgresDialect) AutoIncrInsertSuffix(col *ColumnMap) string { + return " returning " + d.QuoteField(col.ColumnName) +} + +// Returns suffix +func (d PostgresDialect) CreateTableSuffix() string { + return d.suffix +} + +func (d PostgresDialect) CreateIndexSuffix() string { + return "using" +} + +func (d PostgresDialect) DropIndexSuffix() string { + return "" +} + +func (d PostgresDialect) TruncateClause() string { + return "truncate" +} + +func (d PostgresDialect) SleepClause(s time.Duration) string { + return fmt.Sprintf("pg_sleep(%f)", s.Seconds()) +} + +// Returns "$(i+1)" +func (d PostgresDialect) BindVar(i int) string { + return fmt.Sprintf("$%d", i+1) +} + +func (d PostgresDialect) InsertAutoIncrToTarget(exec SqlExecutor, insertSql string, target interface{}, params ...interface{}) error { + rows, err := exec.Query(insertSql, params...) + if err != nil { + return err + } + defer rows.Close() + + if !rows.Next() { + return fmt.Errorf("No serial value returned for insert: %s Encountered error: %s", insertSql, rows.Err()) + } + if err := rows.Scan(target); err != nil { + return err + } + if rows.Next() { + return fmt.Errorf("more than two serial value returned for insert: %s", insertSql) + } + return rows.Err() +} + +func (d PostgresDialect) QuoteField(f string) string { + if d.LowercaseFields { + return `"` + strings.ToLower(f) + `"` + } + return `"` + f + `"` +} + +func (d PostgresDialect) QuotedTableForQuery(schema string, table string) string { + if strings.TrimSpace(schema) == "" { + return d.QuoteField(table) + } + + return schema + "." + d.QuoteField(table) +} + +func (d PostgresDialect) IfSchemaNotExists(command, schema string) string { + return fmt.Sprintf("%s if not exists", command) +} + +func (d PostgresDialect) IfTableExists(command, schema, table string) string { + return fmt.Sprintf("%s if exists", command) +} + +func (d PostgresDialect) IfTableNotExists(command, schema, table string) string { + return fmt.Sprintf("%s if not exists", command) +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect_snowflake.go b/vendor/github.com/go-gorp/gorp/v3/dialect_snowflake.go new file mode 100644 index 000000000..2e2cb8952 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect_snowflake.go @@ -0,0 +1,152 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" + "strings" +) + +type SnowflakeDialect struct { + suffix string + LowercaseFields bool +} + +func (d SnowflakeDialect) QuerySuffix() string { return ";" } + +func (d SnowflakeDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string { + switch val.Kind() { + case reflect.Ptr: + return d.ToSqlType(val.Elem(), maxsize, isAutoIncr) + case reflect.Bool: + return "boolean" + case reflect.Int, + reflect.Int8, + reflect.Int16, + reflect.Int32, + reflect.Uint, + reflect.Uint8, + reflect.Uint16, + reflect.Uint32: + + if isAutoIncr { + return "serial" + } + return "integer" + case reflect.Int64, reflect.Uint64: + if isAutoIncr { + return "bigserial" + } + return "bigint" + case reflect.Float64: + return "double precision" + case reflect.Float32: + return "real" + case reflect.Slice: + if val.Elem().Kind() == reflect.Uint8 { + return "binary" + } + } + + switch val.Name() { + case "NullInt64": + return "bigint" + case "NullFloat64": + return "double precision" + case "NullBool": + return "boolean" + case "Time", "NullTime": + return "timestamp with time zone" + } + + if maxsize > 0 { + return fmt.Sprintf("varchar(%d)", maxsize) + } else { + return "text" + } + +} + +// Returns empty string +func (d SnowflakeDialect) AutoIncrStr() string { + return "" +} + +func (d SnowflakeDialect) AutoIncrBindValue() string { + return "default" +} + +func (d SnowflakeDialect) AutoIncrInsertSuffix(col *ColumnMap) string { + return "" +} + +// Returns suffix +func (d SnowflakeDialect) CreateTableSuffix() string { + return d.suffix +} + +func (d SnowflakeDialect) CreateIndexSuffix() string { + return "" +} + +func (d SnowflakeDialect) DropIndexSuffix() string { + return "" +} + +func (d SnowflakeDialect) TruncateClause() string { + return "truncate" +} + +// Returns "$(i+1)" +func (d SnowflakeDialect) BindVar(i int) string { + return "?" +} + +func (d SnowflakeDialect) InsertAutoIncrToTarget(exec SqlExecutor, insertSql string, target interface{}, params ...interface{}) error { + rows, err := exec.Query(insertSql, params...) + if err != nil { + return err + } + defer rows.Close() + + if !rows.Next() { + return fmt.Errorf("No serial value returned for insert: %s Encountered error: %s", insertSql, rows.Err()) + } + if err := rows.Scan(target); err != nil { + return err + } + if rows.Next() { + return fmt.Errorf("more than two serial value returned for insert: %s", insertSql) + } + return rows.Err() +} + +func (d SnowflakeDialect) QuoteField(f string) string { + if d.LowercaseFields { + return `"` + strings.ToLower(f) + `"` + } + return `"` + f + `"` +} + +func (d SnowflakeDialect) QuotedTableForQuery(schema string, table string) string { + if strings.TrimSpace(schema) == "" { + return d.QuoteField(table) + } + + return schema + "." + d.QuoteField(table) +} + +func (d SnowflakeDialect) IfSchemaNotExists(command, schema string) string { + return fmt.Sprintf("%s if not exists", command) +} + +func (d SnowflakeDialect) IfTableExists(command, schema, table string) string { + return fmt.Sprintf("%s if exists", command) +} + +func (d SnowflakeDialect) IfTableNotExists(command, schema, table string) string { + return fmt.Sprintf("%s if not exists", command) +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect_sqlite.go b/vendor/github.com/go-gorp/gorp/v3/dialect_sqlite.go new file mode 100644 index 000000000..2296275b9 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect_sqlite.go @@ -0,0 +1,112 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" +) + +type SqliteDialect struct { + suffix string +} + +func (d SqliteDialect) QuerySuffix() string { return ";" } + +func (d SqliteDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string { + switch val.Kind() { + case reflect.Ptr: + return d.ToSqlType(val.Elem(), maxsize, isAutoIncr) + case reflect.Bool: + return "integer" + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return "integer" + case reflect.Float64, reflect.Float32: + return "real" + case reflect.Slice: + if val.Elem().Kind() == reflect.Uint8 { + return "blob" + } + } + + switch val.Name() { + case "NullInt64": + return "integer" + case "NullFloat64": + return "real" + case "NullBool": + return "integer" + case "Time": + return "datetime" + } + + if maxsize < 1 { + maxsize = 255 + } + return fmt.Sprintf("varchar(%d)", maxsize) +} + +// Returns autoincrement +func (d SqliteDialect) AutoIncrStr() string { + return "autoincrement" +} + +func (d SqliteDialect) AutoIncrBindValue() string { + return "null" +} + +func (d SqliteDialect) AutoIncrInsertSuffix(col *ColumnMap) string { + return "" +} + +// Returns suffix +func (d SqliteDialect) CreateTableSuffix() string { + return d.suffix +} + +func (d SqliteDialect) CreateIndexSuffix() string { + return "" +} + +func (d SqliteDialect) DropIndexSuffix() string { + return "" +} + +// With sqlite, there technically isn't a TRUNCATE statement, +// but a DELETE FROM uses a truncate optimization: +// http://www.sqlite.org/lang_delete.html +func (d SqliteDialect) TruncateClause() string { + return "delete from" +} + +// Returns "?" +func (d SqliteDialect) BindVar(i int) string { + return "?" +} + +func (d SqliteDialect) InsertAutoIncr(exec SqlExecutor, insertSql string, params ...interface{}) (int64, error) { + return standardInsertAutoIncr(exec, insertSql, params...) +} + +func (d SqliteDialect) QuoteField(f string) string { + return `"` + f + `"` +} + +// sqlite does not have schemas like PostgreSQL does, so just escape it like normal +func (d SqliteDialect) QuotedTableForQuery(schema string, table string) string { + return d.QuoteField(table) +} + +func (d SqliteDialect) IfSchemaNotExists(command, schema string) string { + return fmt.Sprintf("%s if not exists", command) +} + +func (d SqliteDialect) IfTableExists(command, schema, table string) string { + return fmt.Sprintf("%s if exists", command) +} + +func (d SqliteDialect) IfTableNotExists(command, schema, table string) string { + return fmt.Sprintf("%s if not exists", command) +} diff --git a/vendor/github.com/go-gorp/gorp/v3/dialect_sqlserver.go b/vendor/github.com/go-gorp/gorp/v3/dialect_sqlserver.go new file mode 100644 index 000000000..ec06aed66 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/dialect_sqlserver.go @@ -0,0 +1,145 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" + "strings" +) + +// Implementation of Dialect for Microsoft SQL Server databases. +// Use gorp.SqlServerDialect{"2005"} for legacy datatypes. +// Tested with driver: github.com/denisenkom/go-mssqldb + +type SqlServerDialect struct { + + // If set to "2005" legacy datatypes will be used + Version string +} + +func (d SqlServerDialect) ToSqlType(val reflect.Type, maxsize int, isAutoIncr bool) string { + switch val.Kind() { + case reflect.Ptr: + return d.ToSqlType(val.Elem(), maxsize, isAutoIncr) + case reflect.Bool: + return "bit" + case reflect.Int8: + return "tinyint" + case reflect.Uint8: + return "smallint" + case reflect.Int16: + return "smallint" + case reflect.Uint16: + return "int" + case reflect.Int, reflect.Int32: + return "int" + case reflect.Uint, reflect.Uint32: + return "bigint" + case reflect.Int64: + return "bigint" + case reflect.Uint64: + return "numeric(20,0)" + case reflect.Float32: + return "float(24)" + case reflect.Float64: + return "float(53)" + case reflect.Slice: + if val.Elem().Kind() == reflect.Uint8 { + return "varbinary" + } + } + + switch val.Name() { + case "NullInt64": + return "bigint" + case "NullFloat64": + return "float(53)" + case "NullBool": + return "bit" + case "NullTime", "Time": + if d.Version == "2005" { + return "datetime" + } + return "datetime2" + } + + if maxsize < 1 { + if d.Version == "2005" { + maxsize = 255 + } else { + return fmt.Sprintf("nvarchar(max)") + } + } + return fmt.Sprintf("nvarchar(%d)", maxsize) +} + +// Returns auto_increment +func (d SqlServerDialect) AutoIncrStr() string { + return "identity(0,1)" +} + +// Empty string removes autoincrement columns from the INSERT statements. +func (d SqlServerDialect) AutoIncrBindValue() string { + return "" +} + +func (d SqlServerDialect) AutoIncrInsertSuffix(col *ColumnMap) string { + return "" +} + +func (d SqlServerDialect) CreateTableSuffix() string { return ";" } + +func (d SqlServerDialect) TruncateClause() string { + return "truncate table" +} + +// Returns "?" +func (d SqlServerDialect) BindVar(i int) string { + return "?" +} + +func (d SqlServerDialect) InsertAutoIncr(exec SqlExecutor, insertSql string, params ...interface{}) (int64, error) { + return standardInsertAutoIncr(exec, insertSql, params...) +} + +func (d SqlServerDialect) QuoteField(f string) string { + return "[" + strings.Replace(f, "]", "]]", -1) + "]" +} + +func (d SqlServerDialect) QuotedTableForQuery(schema string, table string) string { + if strings.TrimSpace(schema) == "" { + return d.QuoteField(table) + } + return d.QuoteField(schema) + "." + d.QuoteField(table) +} + +func (d SqlServerDialect) QuerySuffix() string { return ";" } + +func (d SqlServerDialect) IfSchemaNotExists(command, schema string) string { + s := fmt.Sprintf("if schema_id(N'%s') is null %s", schema, command) + return s +} + +func (d SqlServerDialect) IfTableExists(command, schema, table string) string { + var schema_clause string + if strings.TrimSpace(schema) != "" { + schema_clause = fmt.Sprintf("%s.", d.QuoteField(schema)) + } + s := fmt.Sprintf("if object_id('%s%s') is not null %s", schema_clause, d.QuoteField(table), command) + return s +} + +func (d SqlServerDialect) IfTableNotExists(command, schema, table string) string { + var schema_clause string + if strings.TrimSpace(schema) != "" { + schema_clause = fmt.Sprintf("%s.", schema) + } + s := fmt.Sprintf("if object_id('%s%s') is null %s", schema_clause, table, command) + return s +} + +func (d SqlServerDialect) CreateIndexSuffix() string { return "" } +func (d SqlServerDialect) DropIndexSuffix() string { return "" } diff --git a/vendor/github.com/go-gorp/gorp/v3/doc.go b/vendor/github.com/go-gorp/gorp/v3/doc.go new file mode 100644 index 000000000..593f1c3c1 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/doc.go @@ -0,0 +1,11 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +// Package gorp provides a simple way to marshal Go structs to and from +// SQL databases. It uses the database/sql package, and should work with any +// compliant database/sql driver. +// +// Source code and project home: +// https://github.com/go-gorp/gorp +package gorp diff --git a/vendor/github.com/go-gorp/gorp/v3/errors.go b/vendor/github.com/go-gorp/gorp/v3/errors.go new file mode 100644 index 000000000..752ad1bca --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/errors.go @@ -0,0 +1,31 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" +) + +// A non-fatal error, when a select query returns columns that do not exist +// as fields in the struct it is being mapped to +// TODO: discuss wether this needs an error. encoding/json silently ignores missing fields +type NoFieldInTypeError struct { + TypeName string + MissingColNames []string +} + +func (err *NoFieldInTypeError) Error() string { + return fmt.Sprintf("gorp: no fields %+v in type %s", err.MissingColNames, err.TypeName) +} + +// returns true if the error is non-fatal (ie, we shouldn't immediately return) +func NonFatalError(err error) bool { + switch err.(type) { + case *NoFieldInTypeError: + return true + default: + return false + } +} diff --git a/vendor/github.com/go-gorp/gorp/v3/gorp.go b/vendor/github.com/go-gorp/gorp/v3/gorp.go new file mode 100644 index 000000000..fc6545676 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/gorp.go @@ -0,0 +1,672 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "context" + "database/sql" + "database/sql/driver" + "fmt" + "reflect" + "regexp" + "strings" + "time" +) + +// OracleString (empty string is null) +// TODO: move to dialect/oracle?, rename to String? +type OracleString struct { + sql.NullString +} + +// Scan implements the Scanner interface. +func (os *OracleString) Scan(value interface{}) error { + if value == nil { + os.String, os.Valid = "", false + return nil + } + os.Valid = true + return os.NullString.Scan(value) +} + +// Value implements the driver Valuer interface. +func (os OracleString) Value() (driver.Value, error) { + if !os.Valid || os.String == "" { + return nil, nil + } + return os.String, nil +} + +// SqlTyper is a type that returns its database type. Most of the +// time, the type can just use "database/sql/driver".Valuer; but when +// it returns nil for its empty value, it needs to implement SqlTyper +// to have its column type detected properly during table creation. +type SqlTyper interface { + SqlType() driver.Value +} + +// legacySqlTyper prevents breaking clients who depended on the previous +// SqlTyper interface +type legacySqlTyper interface { + SqlType() driver.Valuer +} + +// for fields that exists in DB table, but not exists in struct +type dummyField struct{} + +// Scan implements the Scanner interface. +func (nt *dummyField) Scan(value interface{}) error { + return nil +} + +var zeroVal reflect.Value +var versFieldConst = "[gorp_ver_field]" + +// The TypeConverter interface provides a way to map a value of one +// type to another type when persisting to, or loading from, a database. +// +// Example use cases: Implement type converter to convert bool types to "y"/"n" strings, +// or serialize a struct member as a JSON blob. +type TypeConverter interface { + // ToDb converts val to another type. Called before INSERT/UPDATE operations + ToDb(val interface{}) (interface{}, error) + + // FromDb returns a CustomScanner appropriate for this type. This will be used + // to hold values returned from SELECT queries. + // + // In particular the CustomScanner returned should implement a Binder + // function appropriate for the Go type you wish to convert the db value to + // + // If bool==false, then no custom scanner will be used for this field. + FromDb(target interface{}) (CustomScanner, bool) +} + +// SqlExecutor exposes gorp operations that can be run from Pre/Post +// hooks. This hides whether the current operation that triggered the +// hook is in a transaction. +// +// See the DbMap function docs for each of the functions below for more +// information. +type SqlExecutor interface { + WithContext(ctx context.Context) SqlExecutor + Get(i interface{}, keys ...interface{}) (interface{}, error) + Insert(list ...interface{}) error + Update(list ...interface{}) (int64, error) + Delete(list ...interface{}) (int64, error) + Exec(query string, args ...interface{}) (sql.Result, error) + Select(i interface{}, query string, args ...interface{}) ([]interface{}, error) + SelectInt(query string, args ...interface{}) (int64, error) + SelectNullInt(query string, args ...interface{}) (sql.NullInt64, error) + SelectFloat(query string, args ...interface{}) (float64, error) + SelectNullFloat(query string, args ...interface{}) (sql.NullFloat64, error) + SelectStr(query string, args ...interface{}) (string, error) + SelectNullStr(query string, args ...interface{}) (sql.NullString, error) + SelectOne(holder interface{}, query string, args ...interface{}) error + Query(query string, args ...interface{}) (*sql.Rows, error) + QueryRow(query string, args ...interface{}) *sql.Row +} + +// DynamicTable allows the users of gorp to dynamically +// use different database table names during runtime +// while sharing the same golang struct for in-memory data +type DynamicTable interface { + TableName() string + SetTableName(string) +} + +// Compile-time check that DbMap and Transaction implement the SqlExecutor +// interface. +var _, _ SqlExecutor = &DbMap{}, &Transaction{} + +func argValue(a interface{}) interface{} { + v, ok := a.(driver.Valuer) + if !ok { + return a + } + vV := reflect.ValueOf(v) + if vV.Kind() == reflect.Ptr && vV.IsNil() { + return nil + } + ret, err := v.Value() + if err != nil { + return a + } + return ret +} + +func argsString(args ...interface{}) string { + var margs string + for i, a := range args { + v := argValue(a) + switch v.(type) { + case string: + v = fmt.Sprintf("%q", v) + default: + v = fmt.Sprintf("%v", v) + } + margs += fmt.Sprintf("%d:%s", i+1, v) + if i+1 < len(args) { + margs += " " + } + } + return margs +} + +// Calls the Exec function on the executor, but attempts to expand any eligible named +// query arguments first. +func maybeExpandNamedQueryAndExec(e SqlExecutor, query string, args ...interface{}) (sql.Result, error) { + dbMap := extractDbMap(e) + + if len(args) == 1 { + query, args = maybeExpandNamedQuery(dbMap, query, args) + } + + return exec(e, query, args...) +} + +func extractDbMap(e SqlExecutor) *DbMap { + switch m := e.(type) { + case *DbMap: + return m + case *Transaction: + return m.dbmap + } + return nil +} + +// executor exposes the sql.DB and sql.Tx functions so that it can be used +// on internal functions that need to be agnostic to the underlying object. +type executor interface { + Exec(query string, args ...interface{}) (sql.Result, error) + Prepare(query string) (*sql.Stmt, error) + QueryRow(query string, args ...interface{}) *sql.Row + Query(query string, args ...interface{}) (*sql.Rows, error) + ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) + QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row + QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) +} + +func extractExecutorAndContext(e SqlExecutor) (executor, context.Context) { + switch m := e.(type) { + case *DbMap: + return m.Db, m.ctx + case *Transaction: + return m.tx, m.ctx + } + return nil, nil +} + +// maybeExpandNamedQuery checks the given arg to see if it's eligible to be used +// as input to a named query. If so, it rewrites the query to use +// dialect-dependent bindvars and instantiates the corresponding slice of +// parameters by extracting data from the map / struct. +// If not, returns the input values unchanged. +func maybeExpandNamedQuery(m *DbMap, query string, args []interface{}) (string, []interface{}) { + var ( + arg = args[0] + argval = reflect.ValueOf(arg) + ) + if argval.Kind() == reflect.Ptr { + argval = argval.Elem() + } + + if argval.Kind() == reflect.Map && argval.Type().Key().Kind() == reflect.String { + return expandNamedQuery(m, query, func(key string) reflect.Value { + return argval.MapIndex(reflect.ValueOf(key)) + }) + } + if argval.Kind() != reflect.Struct { + return query, args + } + if _, ok := arg.(time.Time); ok { + // time.Time is driver.Value + return query, args + } + if _, ok := arg.(driver.Valuer); ok { + // driver.Valuer will be converted to driver.Value. + return query, args + } + + return expandNamedQuery(m, query, argval.FieldByName) +} + +var keyRegexp = regexp.MustCompile(`:[[:word:]]+`) + +// expandNamedQuery accepts a query with placeholders of the form ":key", and a +// single arg of Kind Struct or Map[string]. It returns the query with the +// dialect's placeholders, and a slice of args ready for positional insertion +// into the query. +func expandNamedQuery(m *DbMap, query string, keyGetter func(key string) reflect.Value) (string, []interface{}) { + var ( + n int + args []interface{} + ) + return keyRegexp.ReplaceAllStringFunc(query, func(key string) string { + val := keyGetter(key[1:]) + if !val.IsValid() { + return key + } + args = append(args, val.Interface()) + newVar := m.Dialect.BindVar(n) + n++ + return newVar + }), args +} + +func columnToFieldIndex(m *DbMap, t reflect.Type, name string, cols []string) ([][]int, error) { + colToFieldIndex := make([][]int, len(cols)) + + // check if type t is a mapped table - if so we'll + // check the table for column aliasing below + tableMapped := false + table := tableOrNil(m, t, name) + if table != nil { + tableMapped = true + } + + // Loop over column names and find field in i to bind to + // based on column name. all returned columns must match + // a field in the i struct + missingColNames := []string{} + for x := range cols { + colName := strings.ToLower(cols[x]) + field, found := t.FieldByNameFunc(func(fieldName string) bool { + field, _ := t.FieldByName(fieldName) + cArguments := strings.Split(field.Tag.Get("db"), ",") + fieldName = cArguments[0] + + if fieldName == "-" { + return false + } else if fieldName == "" { + fieldName = field.Name + } + if tableMapped { + colMap := colMapOrNil(table, fieldName) + if colMap != nil { + fieldName = colMap.ColumnName + } + } + return colName == strings.ToLower(fieldName) + }) + if found { + colToFieldIndex[x] = field.Index + } + if colToFieldIndex[x] == nil { + missingColNames = append(missingColNames, colName) + } + } + if len(missingColNames) > 0 { + return colToFieldIndex, &NoFieldInTypeError{ + TypeName: t.Name(), + MissingColNames: missingColNames, + } + } + return colToFieldIndex, nil +} + +func fieldByName(val reflect.Value, fieldName string) *reflect.Value { + // try to find field by exact match + f := val.FieldByName(fieldName) + + if f != zeroVal { + return &f + } + + // try to find by case insensitive match - only the Postgres driver + // seems to require this - in the case where columns are aliased in the sql + fieldNameL := strings.ToLower(fieldName) + fieldCount := val.NumField() + t := val.Type() + for i := 0; i < fieldCount; i++ { + sf := t.Field(i) + if strings.ToLower(sf.Name) == fieldNameL { + f := val.Field(i) + return &f + } + } + + return nil +} + +// toSliceType returns the element type of the given object, if the object is a +// "*[]*Element" or "*[]Element". If not, returns nil. +// err is returned if the user was trying to pass a pointer-to-slice but failed. +func toSliceType(i interface{}) (reflect.Type, error) { + t := reflect.TypeOf(i) + if t.Kind() != reflect.Ptr { + // If it's a slice, return a more helpful error message + if t.Kind() == reflect.Slice { + return nil, fmt.Errorf("gorp: cannot SELECT into a non-pointer slice: %v", t) + } + return nil, nil + } + if t = t.Elem(); t.Kind() != reflect.Slice { + return nil, nil + } + return t.Elem(), nil +} + +func toType(i interface{}) (reflect.Type, error) { + t := reflect.TypeOf(i) + + // If a Pointer to a type, follow + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + + if t.Kind() != reflect.Struct { + return nil, fmt.Errorf("gorp: cannot SELECT into this type: %v", reflect.TypeOf(i)) + } + return t, nil +} + +type foundTable struct { + table *TableMap + dynName *string +} + +func tableFor(m *DbMap, t reflect.Type, i interface{}) (*foundTable, error) { + if dyn, isDynamic := i.(DynamicTable); isDynamic { + tableName := dyn.TableName() + table, err := m.DynamicTableFor(tableName, true) + if err != nil { + return nil, err + } + return &foundTable{ + table: table, + dynName: &tableName, + }, nil + } + table, err := m.TableFor(t, true) + if err != nil { + return nil, err + } + return &foundTable{table: table}, nil +} + +func get(m *DbMap, exec SqlExecutor, i interface{}, + keys ...interface{}) (interface{}, error) { + + t, err := toType(i) + if err != nil { + return nil, err + } + + foundTable, err := tableFor(m, t, i) + if err != nil { + return nil, err + } + table := foundTable.table + + plan := table.bindGet() + + v := reflect.New(t) + if foundTable.dynName != nil { + retDyn := v.Interface().(DynamicTable) + retDyn.SetTableName(*foundTable.dynName) + } + + dest := make([]interface{}, len(plan.argFields)) + + conv := m.TypeConverter + custScan := make([]CustomScanner, 0) + + for x, fieldName := range plan.argFields { + f := v.Elem().FieldByName(fieldName) + target := f.Addr().Interface() + if conv != nil { + scanner, ok := conv.FromDb(target) + if ok { + target = scanner.Holder + custScan = append(custScan, scanner) + } + } + dest[x] = target + } + + row := exec.QueryRow(plan.query, keys...) + err = row.Scan(dest...) + if err != nil { + if err == sql.ErrNoRows { + err = nil + } + return nil, err + } + + for _, c := range custScan { + err = c.Bind() + if err != nil { + return nil, err + } + } + + if v, ok := v.Interface().(HasPostGet); ok { + err := v.PostGet(exec) + if err != nil { + return nil, err + } + } + + return v.Interface(), nil +} + +func delete(m *DbMap, exec SqlExecutor, list ...interface{}) (int64, error) { + count := int64(0) + for _, ptr := range list { + table, elem, err := m.tableForPointer(ptr, true) + if err != nil { + return -1, err + } + + eval := elem.Addr().Interface() + if v, ok := eval.(HasPreDelete); ok { + err = v.PreDelete(exec) + if err != nil { + return -1, err + } + } + + bi, err := table.bindDelete(elem) + if err != nil { + return -1, err + } + + res, err := exec.Exec(bi.query, bi.args...) + if err != nil { + return -1, err + } + rows, err := res.RowsAffected() + if err != nil { + return -1, err + } + + if rows == 0 && bi.existingVersion > 0 { + return lockError(m, exec, table.TableName, + bi.existingVersion, elem, bi.keys...) + } + + count += rows + + if v, ok := eval.(HasPostDelete); ok { + err := v.PostDelete(exec) + if err != nil { + return -1, err + } + } + } + + return count, nil +} + +func update(m *DbMap, exec SqlExecutor, colFilter ColumnFilter, list ...interface{}) (int64, error) { + count := int64(0) + for _, ptr := range list { + table, elem, err := m.tableForPointer(ptr, true) + if err != nil { + return -1, err + } + + eval := elem.Addr().Interface() + if v, ok := eval.(HasPreUpdate); ok { + err = v.PreUpdate(exec) + if err != nil { + return -1, err + } + } + + bi, err := table.bindUpdate(elem, colFilter) + if err != nil { + return -1, err + } + + res, err := exec.Exec(bi.query, bi.args...) + if err != nil { + return -1, err + } + + rows, err := res.RowsAffected() + if err != nil { + return -1, err + } + + if rows == 0 && bi.existingVersion > 0 { + return lockError(m, exec, table.TableName, + bi.existingVersion, elem, bi.keys...) + } + + if bi.versField != "" { + elem.FieldByName(bi.versField).SetInt(bi.existingVersion + 1) + } + + count += rows + + if v, ok := eval.(HasPostUpdate); ok { + err = v.PostUpdate(exec) + if err != nil { + return -1, err + } + } + } + return count, nil +} + +func insert(m *DbMap, exec SqlExecutor, list ...interface{}) error { + for _, ptr := range list { + table, elem, err := m.tableForPointer(ptr, false) + if err != nil { + return err + } + + eval := elem.Addr().Interface() + if v, ok := eval.(HasPreInsert); ok { + err := v.PreInsert(exec) + if err != nil { + return err + } + } + + bi, err := table.bindInsert(elem) + if err != nil { + return err + } + + if bi.autoIncrIdx > -1 { + f := elem.FieldByName(bi.autoIncrFieldName) + switch inserter := m.Dialect.(type) { + case IntegerAutoIncrInserter: + id, err := inserter.InsertAutoIncr(exec, bi.query, bi.args...) + if err != nil { + return err + } + k := f.Kind() + if (k == reflect.Int) || (k == reflect.Int16) || (k == reflect.Int32) || (k == reflect.Int64) { + f.SetInt(id) + } else if (k == reflect.Uint) || (k == reflect.Uint16) || (k == reflect.Uint32) || (k == reflect.Uint64) { + f.SetUint(uint64(id)) + } else { + return fmt.Errorf("gorp: cannot set autoincrement value on non-Int field. SQL=%s autoIncrIdx=%d autoIncrFieldName=%s", bi.query, bi.autoIncrIdx, bi.autoIncrFieldName) + } + case TargetedAutoIncrInserter: + err := inserter.InsertAutoIncrToTarget(exec, bi.query, f.Addr().Interface(), bi.args...) + if err != nil { + return err + } + case TargetQueryInserter: + var idQuery = table.ColMap(bi.autoIncrFieldName).GeneratedIdQuery + if idQuery == "" { + return fmt.Errorf("gorp: cannot set %s value if its ColumnMap.GeneratedIdQuery is empty", bi.autoIncrFieldName) + } + err := inserter.InsertQueryToTarget(exec, bi.query, idQuery, f.Addr().Interface(), bi.args...) + if err != nil { + return err + } + default: + return fmt.Errorf("gorp: cannot use autoincrement fields on dialects that do not implement an autoincrementing interface") + } + } else { + _, err := exec.Exec(bi.query, bi.args...) + if err != nil { + return err + } + } + + if v, ok := eval.(HasPostInsert); ok { + err := v.PostInsert(exec) + if err != nil { + return err + } + } + } + return nil +} + +func exec(e SqlExecutor, query string, args ...interface{}) (sql.Result, error) { + executor, ctx := extractExecutorAndContext(e) + + if ctx != nil { + return executor.ExecContext(ctx, query, args...) + } + + return executor.Exec(query, args...) +} + +func prepare(e SqlExecutor, query string) (*sql.Stmt, error) { + executor, ctx := extractExecutorAndContext(e) + + if ctx != nil { + return executor.PrepareContext(ctx, query) + } + + return executor.Prepare(query) +} + +func queryRow(e SqlExecutor, query string, args ...interface{}) *sql.Row { + executor, ctx := extractExecutorAndContext(e) + + if ctx != nil { + return executor.QueryRowContext(ctx, query, args...) + } + + return executor.QueryRow(query, args...) +} + +func query(e SqlExecutor, query string, args ...interface{}) (*sql.Rows, error) { + executor, ctx := extractExecutorAndContext(e) + + if ctx != nil { + return executor.QueryContext(ctx, query, args...) + } + + return executor.Query(query, args...) +} + +func begin(m *DbMap) (*sql.Tx, error) { + if m.ctx != nil { + return m.Db.BeginTx(m.ctx, nil) + } + + return m.Db.Begin() +} diff --git a/vendor/github.com/go-gorp/gorp/v3/hooks.go b/vendor/github.com/go-gorp/gorp/v3/hooks.go new file mode 100644 index 000000000..1e80bca7e --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/hooks.go @@ -0,0 +1,42 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +//++ TODO v2-phase3: HasPostGet => PostGetter, HasPostDelete => PostDeleter, etc. + +// HasPostGet provides PostGet() which will be executed after the GET statement. +type HasPostGet interface { + PostGet(SqlExecutor) error +} + +// HasPostDelete provides PostDelete() which will be executed after the DELETE statement +type HasPostDelete interface { + PostDelete(SqlExecutor) error +} + +// HasPostUpdate provides PostUpdate() which will be executed after the UPDATE statement +type HasPostUpdate interface { + PostUpdate(SqlExecutor) error +} + +// HasPostInsert provides PostInsert() which will be executed after the INSERT statement +type HasPostInsert interface { + PostInsert(SqlExecutor) error +} + +// HasPreDelete provides PreDelete() which will be executed before the DELETE statement. +type HasPreDelete interface { + PreDelete(SqlExecutor) error +} + +// HasPreUpdate provides PreUpdate() which will be executed before UPDATE statement. +type HasPreUpdate interface { + PreUpdate(SqlExecutor) error +} + +// HasPreInsert provides PreInsert() which will be executed before INSERT statement. +type HasPreInsert interface { + PreInsert(SqlExecutor) error +} diff --git a/vendor/github.com/go-gorp/gorp/v3/index.go b/vendor/github.com/go-gorp/gorp/v3/index.go new file mode 100644 index 000000000..df1cf5520 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/index.go @@ -0,0 +1,49 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +// IndexMap represents a mapping between a Go struct field and a single +// index in a table. +// Unique and MaxSize only inform the +// CreateTables() function and are not used by Insert/Update/Delete/Get. +type IndexMap struct { + // Index name in db table + IndexName string + + // If true, " unique" is added to create index statements. + // Not used elsewhere + Unique bool + + // Index type supported by Dialect + // Postgres: B-tree, Hash, GiST and GIN. + // Mysql: Btree, Hash. + // Sqlite: nil. + IndexType string + + // Columns name for single and multiple indexes + columns []string +} + +// Rename allows you to specify the index name in the table +// +// Example: table.IndMap("customer_test_idx").Rename("customer_idx") +// +func (idx *IndexMap) Rename(indname string) *IndexMap { + idx.IndexName = indname + return idx +} + +// SetUnique adds "unique" to the create index statements for this +// index, if b is true. +func (idx *IndexMap) SetUnique(b bool) *IndexMap { + idx.Unique = b + return idx +} + +// SetIndexType specifies the index type supported by chousen SQL Dialect +func (idx *IndexMap) SetIndexType(indtype string) *IndexMap { + idx.IndexType = indtype + return idx +} diff --git a/vendor/github.com/go-gorp/gorp/v3/lockerror.go b/vendor/github.com/go-gorp/gorp/v3/lockerror.go new file mode 100644 index 000000000..7e81891e2 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/lockerror.go @@ -0,0 +1,56 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "fmt" + "reflect" +) + +// OptimisticLockError is returned by Update() or Delete() if the +// struct being modified has a Version field and the value is not equal to +// the current value in the database +type OptimisticLockError struct { + // Table name where the lock error occurred + TableName string + + // Primary key values of the row being updated/deleted + Keys []interface{} + + // true if a row was found with those keys, indicating the + // LocalVersion is stale. false if no value was found with those + // keys, suggesting the row has been deleted since loaded, or + // was never inserted to begin with + RowExists bool + + // Version value on the struct passed to Update/Delete. This value is + // out of sync with the database. + LocalVersion int64 +} + +// Error returns a description of the cause of the lock error +func (e OptimisticLockError) Error() string { + if e.RowExists { + return fmt.Sprintf("gorp: OptimisticLockError table=%s keys=%v out of date version=%d", e.TableName, e.Keys, e.LocalVersion) + } + + return fmt.Sprintf("gorp: OptimisticLockError no row found for table=%s keys=%v", e.TableName, e.Keys) +} + +func lockError(m *DbMap, exec SqlExecutor, tableName string, + existingVer int64, elem reflect.Value, + keys ...interface{}) (int64, error) { + + existing, err := get(m, exec, elem.Interface(), keys...) + if err != nil { + return -1, err + } + + ole := OptimisticLockError{tableName, keys, true, existingVer} + if existing == nil { + ole.RowExists = false + } + return -1, ole +} diff --git a/vendor/github.com/go-gorp/gorp/v3/logging.go b/vendor/github.com/go-gorp/gorp/v3/logging.go new file mode 100644 index 000000000..e8cba3db2 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/logging.go @@ -0,0 +1,42 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import "fmt" + +// GorpLogger is a deprecated alias of Logger. +type GorpLogger = Logger + +// Logger is the type that gorp uses to log SQL statements. +// See DbMap.TraceOn. +type Logger interface { + Printf(format string, v ...interface{}) +} + +// TraceOn turns on SQL statement logging for this DbMap. After this is +// called, all SQL statements will be sent to the logger. If prefix is +// a non-empty string, it will be written to the front of all logged +// strings, which can aid in filtering log lines. +// +// Use TraceOn if you want to spy on the SQL statements that gorp +// generates. +// +// Note that the base log.Logger type satisfies Logger, but adapters can +// easily be written for other logging packages (e.g., the golang-sanctioned +// glog framework). +func (m *DbMap) TraceOn(prefix string, logger Logger) { + m.logger = logger + if prefix == "" { + m.logPrefix = prefix + } else { + m.logPrefix = fmt.Sprintf("%s ", prefix) + } +} + +// TraceOff turns off tracing. It is idempotent. +func (m *DbMap) TraceOff() { + m.logger = nil + m.logPrefix = "" +} diff --git a/vendor/github.com/go-gorp/gorp/v3/nulltypes.go b/vendor/github.com/go-gorp/gorp/v3/nulltypes.go new file mode 100644 index 000000000..87b21f83f --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/nulltypes.go @@ -0,0 +1,65 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "database/sql/driver" + "log" + "time" +) + +// A nullable Time value +type NullTime struct { + Time time.Time + Valid bool // Valid is true if Time is not NULL +} + +// Scan implements the Scanner interface. +func (nt *NullTime) Scan(value interface{}) error { + log.Printf("Time scan value is: %#v", value) + switch t := value.(type) { + case time.Time: + nt.Time, nt.Valid = t, true + case []byte: + v := strToTime(string(t)) + if v != nil { + nt.Valid = true + nt.Time = *v + } + case string: + v := strToTime(t) + if v != nil { + nt.Valid = true + nt.Time = *v + } + } + return nil +} + +func strToTime(v string) *time.Time { + for _, dtfmt := range []string{ + "2006-01-02 15:04:05.999999999", + "2006-01-02T15:04:05.999999999", + "2006-01-02 15:04:05", + "2006-01-02T15:04:05", + "2006-01-02 15:04", + "2006-01-02T15:04", + "2006-01-02", + "2006-01-02 15:04:05-07:00", + } { + if t, err := time.Parse(dtfmt, v); err == nil { + return &t + } + } + return nil +} + +// Value implements the driver Valuer interface. +func (nt NullTime) Value() (driver.Value, error) { + if !nt.Valid { + return nil, nil + } + return nt.Time, nil +} diff --git a/vendor/github.com/go-gorp/gorp/v3/select.go b/vendor/github.com/go-gorp/gorp/v3/select.go new file mode 100644 index 000000000..2d2d59618 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/select.go @@ -0,0 +1,359 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "database/sql" + "fmt" + "reflect" +) + +// SelectInt executes the given query, which should be a SELECT statement for a single +// integer column, and returns the value of the first row returned. If no rows are +// found, zero is returned. +func SelectInt(e SqlExecutor, query string, args ...interface{}) (int64, error) { + var h int64 + err := selectVal(e, &h, query, args...) + if err != nil && err != sql.ErrNoRows { + return 0, err + } + return h, nil +} + +// SelectNullInt executes the given query, which should be a SELECT statement for a single +// integer column, and returns the value of the first row returned. If no rows are +// found, the empty sql.NullInt64 value is returned. +func SelectNullInt(e SqlExecutor, query string, args ...interface{}) (sql.NullInt64, error) { + var h sql.NullInt64 + err := selectVal(e, &h, query, args...) + if err != nil && err != sql.ErrNoRows { + return h, err + } + return h, nil +} + +// SelectFloat executes the given query, which should be a SELECT statement for a single +// float column, and returns the value of the first row returned. If no rows are +// found, zero is returned. +func SelectFloat(e SqlExecutor, query string, args ...interface{}) (float64, error) { + var h float64 + err := selectVal(e, &h, query, args...) + if err != nil && err != sql.ErrNoRows { + return 0, err + } + return h, nil +} + +// SelectNullFloat executes the given query, which should be a SELECT statement for a single +// float column, and returns the value of the first row returned. If no rows are +// found, the empty sql.NullInt64 value is returned. +func SelectNullFloat(e SqlExecutor, query string, args ...interface{}) (sql.NullFloat64, error) { + var h sql.NullFloat64 + err := selectVal(e, &h, query, args...) + if err != nil && err != sql.ErrNoRows { + return h, err + } + return h, nil +} + +// SelectStr executes the given query, which should be a SELECT statement for a single +// char/varchar column, and returns the value of the first row returned. If no rows are +// found, an empty string is returned. +func SelectStr(e SqlExecutor, query string, args ...interface{}) (string, error) { + var h string + err := selectVal(e, &h, query, args...) + if err != nil && err != sql.ErrNoRows { + return "", err + } + return h, nil +} + +// SelectNullStr executes the given query, which should be a SELECT +// statement for a single char/varchar column, and returns the value +// of the first row returned. If no rows are found, the empty +// sql.NullString is returned. +func SelectNullStr(e SqlExecutor, query string, args ...interface{}) (sql.NullString, error) { + var h sql.NullString + err := selectVal(e, &h, query, args...) + if err != nil && err != sql.ErrNoRows { + return h, err + } + return h, nil +} + +// SelectOne executes the given query (which should be a SELECT statement) +// and binds the result to holder, which must be a pointer. +// +// If no row is found, an error (sql.ErrNoRows specifically) will be returned +// +// If more than one row is found, an error will be returned. +// +func SelectOne(m *DbMap, e SqlExecutor, holder interface{}, query string, args ...interface{}) error { + t := reflect.TypeOf(holder) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } else { + return fmt.Errorf("gorp: SelectOne holder must be a pointer, but got: %t", holder) + } + + // Handle pointer to pointer + isptr := false + if t.Kind() == reflect.Ptr { + isptr = true + t = t.Elem() + } + + if t.Kind() == reflect.Struct { + var nonFatalErr error + + list, err := hookedselect(m, e, holder, query, args...) + if err != nil { + if !NonFatalError(err) { // FIXME: double negative, rename NonFatalError to FatalError + return err + } + nonFatalErr = err + } + + dest := reflect.ValueOf(holder) + if isptr { + dest = dest.Elem() + } + + if list != nil && len(list) > 0 { // FIXME: invert if/else + // check for multiple rows + if len(list) > 1 { + return fmt.Errorf("gorp: multiple rows returned for: %s - %v", query, args) + } + + // Initialize if nil + if dest.IsNil() { + dest.Set(reflect.New(t)) + } + + // only one row found + src := reflect.ValueOf(list[0]) + dest.Elem().Set(src.Elem()) + } else { + // No rows found, return a proper error. + return sql.ErrNoRows + } + + return nonFatalErr + } + + return selectVal(e, holder, query, args...) +} + +func selectVal(e SqlExecutor, holder interface{}, query string, args ...interface{}) error { + if len(args) == 1 { + switch m := e.(type) { + case *DbMap: + query, args = maybeExpandNamedQuery(m, query, args) + case *Transaction: + query, args = maybeExpandNamedQuery(m.dbmap, query, args) + } + } + rows, err := e.Query(query, args...) + if err != nil { + return err + } + defer rows.Close() + + if !rows.Next() { + if err := rows.Err(); err != nil { + return err + } + return sql.ErrNoRows + } + + return rows.Scan(holder) +} + +func hookedselect(m *DbMap, exec SqlExecutor, i interface{}, query string, + args ...interface{}) ([]interface{}, error) { + + var nonFatalErr error + + list, err := rawselect(m, exec, i, query, args...) + if err != nil { + if !NonFatalError(err) { + return nil, err + } + nonFatalErr = err + } + + // Determine where the results are: written to i, or returned in list + if t, _ := toSliceType(i); t == nil { + for _, v := range list { + if v, ok := v.(HasPostGet); ok { + err := v.PostGet(exec) + if err != nil { + return nil, err + } + } + } + } else { + resultsValue := reflect.Indirect(reflect.ValueOf(i)) + for i := 0; i < resultsValue.Len(); i++ { + if v, ok := resultsValue.Index(i).Interface().(HasPostGet); ok { + err := v.PostGet(exec) + if err != nil { + return nil, err + } + } + } + } + return list, nonFatalErr +} + +func rawselect(m *DbMap, exec SqlExecutor, i interface{}, query string, + args ...interface{}) ([]interface{}, error) { + var ( + appendToSlice = false // Write results to i directly? + intoStruct = true // Selecting into a struct? + pointerElements = true // Are the slice elements pointers (vs values)? + ) + + var nonFatalErr error + + tableName := "" + var dynObj DynamicTable + isDynamic := false + if dynObj, isDynamic = i.(DynamicTable); isDynamic { + tableName = dynObj.TableName() + } + + // get type for i, verifying it's a supported destination + t, err := toType(i) + if err != nil { + var err2 error + if t, err2 = toSliceType(i); t == nil { + if err2 != nil { + return nil, err2 + } + return nil, err + } + pointerElements = t.Kind() == reflect.Ptr + if pointerElements { + t = t.Elem() + } + appendToSlice = true + intoStruct = t.Kind() == reflect.Struct + } + + // If the caller supplied a single struct/map argument, assume a "named + // parameter" query. Extract the named arguments from the struct/map, create + // the flat arg slice, and rewrite the query to use the dialect's placeholder. + if len(args) == 1 { + query, args = maybeExpandNamedQuery(m, query, args) + } + + // Run the query + rows, err := exec.Query(query, args...) + if err != nil { + return nil, err + } + defer rows.Close() + + // Fetch the column names as returned from db + cols, err := rows.Columns() + if err != nil { + return nil, err + } + + if !intoStruct && len(cols) > 1 { + return nil, fmt.Errorf("gorp: select into non-struct slice requires 1 column, got %d", len(cols)) + } + + var colToFieldIndex [][]int + if intoStruct { + colToFieldIndex, err = columnToFieldIndex(m, t, tableName, cols) + if err != nil { + if !NonFatalError(err) { + return nil, err + } + nonFatalErr = err + } + } + + conv := m.TypeConverter + + // Add results to one of these two slices. + var ( + list = make([]interface{}, 0) + sliceValue = reflect.Indirect(reflect.ValueOf(i)) + ) + + for { + if !rows.Next() { + // if error occured return rawselect + if rows.Err() != nil { + return nil, rows.Err() + } + // time to exit from outer "for" loop + break + } + v := reflect.New(t) + + if isDynamic { + v.Interface().(DynamicTable).SetTableName(tableName) + } + + dest := make([]interface{}, len(cols)) + + custScan := make([]CustomScanner, 0) + + for x := range cols { + f := v.Elem() + if intoStruct { + index := colToFieldIndex[x] + if index == nil { + // this field is not present in the struct, so create a dummy + // value for rows.Scan to scan into + var dummy dummyField + dest[x] = &dummy + continue + } + f = f.FieldByIndex(index) + } + target := f.Addr().Interface() + if conv != nil { + scanner, ok := conv.FromDb(target) + if ok { + target = scanner.Holder + custScan = append(custScan, scanner) + } + } + dest[x] = target + } + + err = rows.Scan(dest...) + if err != nil { + return nil, err + } + + for _, c := range custScan { + err = c.Bind() + if err != nil { + return nil, err + } + } + + if appendToSlice { + if !pointerElements { + v = v.Elem() + } + sliceValue.Set(reflect.Append(sliceValue, v)) + } else { + list = append(list, v.Interface()) + } + } + + if appendToSlice && sliceValue.IsNil() { + sliceValue.Set(reflect.MakeSlice(sliceValue.Type(), 0, 0)) + } + + return list, nonFatalErr +} diff --git a/vendor/github.com/go-gorp/gorp/v3/table.go b/vendor/github.com/go-gorp/gorp/v3/table.go new file mode 100644 index 000000000..5931b2d9e --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/table.go @@ -0,0 +1,258 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "bytes" + "fmt" + "reflect" + "strings" +) + +// TableMap represents a mapping between a Go struct and a database table +// Use dbmap.AddTable() or dbmap.AddTableWithName() to create these +type TableMap struct { + // Name of database table. + TableName string + SchemaName string + gotype reflect.Type + Columns []*ColumnMap + keys []*ColumnMap + indexes []*IndexMap + uniqueTogether [][]string + version *ColumnMap + insertPlan bindPlan + updatePlan bindPlan + deletePlan bindPlan + getPlan bindPlan + dbmap *DbMap +} + +// ResetSql removes cached insert/update/select/delete SQL strings +// associated with this TableMap. Call this if you've modified +// any column names or the table name itself. +func (t *TableMap) ResetSql() { + t.insertPlan = bindPlan{} + t.updatePlan = bindPlan{} + t.deletePlan = bindPlan{} + t.getPlan = bindPlan{} +} + +// SetKeys lets you specify the fields on a struct that map to primary +// key columns on the table. If isAutoIncr is set, result.LastInsertId() +// will be used after INSERT to bind the generated id to the Go struct. +// +// Automatically calls ResetSql() to ensure SQL statements are regenerated. +// +// Panics if isAutoIncr is true, and fieldNames length != 1 +// +func (t *TableMap) SetKeys(isAutoIncr bool, fieldNames ...string) *TableMap { + if isAutoIncr && len(fieldNames) != 1 { + panic(fmt.Sprintf( + "gorp: SetKeys: fieldNames length must be 1 if key is auto-increment. (Saw %v fieldNames)", + len(fieldNames))) + } + t.keys = make([]*ColumnMap, 0) + for _, name := range fieldNames { + colmap := t.ColMap(name) + colmap.isPK = true + colmap.isAutoIncr = isAutoIncr + t.keys = append(t.keys, colmap) + } + t.ResetSql() + + return t +} + +// SetUniqueTogether lets you specify uniqueness constraints across multiple +// columns on the table. Each call adds an additional constraint for the +// specified columns. +// +// Automatically calls ResetSql() to ensure SQL statements are regenerated. +// +// Panics if fieldNames length < 2. +// +func (t *TableMap) SetUniqueTogether(fieldNames ...string) *TableMap { + if len(fieldNames) < 2 { + panic(fmt.Sprintf( + "gorp: SetUniqueTogether: must provide at least two fieldNames to set uniqueness constraint.")) + } + + columns := make([]string, 0, len(fieldNames)) + for _, name := range fieldNames { + columns = append(columns, name) + } + + for _, existingColumns := range t.uniqueTogether { + if equal(existingColumns, columns) { + return t + } + } + t.uniqueTogether = append(t.uniqueTogether, columns) + t.ResetSql() + + return t +} + +// ColMap returns the ColumnMap pointer matching the given struct field +// name. It panics if the struct does not contain a field matching this +// name. +func (t *TableMap) ColMap(field string) *ColumnMap { + col := colMapOrNil(t, field) + if col == nil { + e := fmt.Sprintf("No ColumnMap in table %s type %s with field %s", + t.TableName, t.gotype.Name(), field) + + panic(e) + } + return col +} + +func colMapOrNil(t *TableMap, field string) *ColumnMap { + for _, col := range t.Columns { + if col.fieldName == field || col.ColumnName == field { + return col + } + } + return nil +} + +// IdxMap returns the IndexMap pointer matching the given index name. +func (t *TableMap) IdxMap(field string) *IndexMap { + for _, idx := range t.indexes { + if idx.IndexName == field { + return idx + } + } + return nil +} + +// AddIndex registers the index with gorp for specified table with given parameters. +// This operation is idempotent. If index is already mapped, the +// existing *IndexMap is returned +// Function will panic if one of the given for index columns does not exists +// +// Automatically calls ResetSql() to ensure SQL statements are regenerated. +// +func (t *TableMap) AddIndex(name string, idxtype string, columns []string) *IndexMap { + // check if we have a index with this name already + for _, idx := range t.indexes { + if idx.IndexName == name { + return idx + } + } + for _, icol := range columns { + if res := t.ColMap(icol); res == nil { + e := fmt.Sprintf("No ColumnName in table %s to create index on", t.TableName) + panic(e) + } + } + + idx := &IndexMap{IndexName: name, Unique: false, IndexType: idxtype, columns: columns} + t.indexes = append(t.indexes, idx) + t.ResetSql() + return idx +} + +// SetVersionCol sets the column to use as the Version field. By default +// the "Version" field is used. Returns the column found, or panics +// if the struct does not contain a field matching this name. +// +// Automatically calls ResetSql() to ensure SQL statements are regenerated. +func (t *TableMap) SetVersionCol(field string) *ColumnMap { + c := t.ColMap(field) + t.version = c + t.ResetSql() + return c +} + +// SqlForCreateTable gets a sequence of SQL commands that will create +// the specified table and any associated schema +func (t *TableMap) SqlForCreate(ifNotExists bool) string { + s := bytes.Buffer{} + dialect := t.dbmap.Dialect + + if strings.TrimSpace(t.SchemaName) != "" { + schemaCreate := "create schema" + if ifNotExists { + s.WriteString(dialect.IfSchemaNotExists(schemaCreate, t.SchemaName)) + } else { + s.WriteString(schemaCreate) + } + s.WriteString(fmt.Sprintf(" %s;", t.SchemaName)) + } + + tableCreate := "create table" + if ifNotExists { + s.WriteString(dialect.IfTableNotExists(tableCreate, t.SchemaName, t.TableName)) + } else { + s.WriteString(tableCreate) + } + s.WriteString(fmt.Sprintf(" %s (", dialect.QuotedTableForQuery(t.SchemaName, t.TableName))) + + x := 0 + for _, col := range t.Columns { + if !col.Transient { + if x > 0 { + s.WriteString(", ") + } + stype := dialect.ToSqlType(col.gotype, col.MaxSize, col.isAutoIncr) + s.WriteString(fmt.Sprintf("%s %s", dialect.QuoteField(col.ColumnName), stype)) + + if col.isPK || col.isNotNull { + s.WriteString(" not null") + } + if col.isPK && len(t.keys) == 1 { + s.WriteString(" primary key") + } + if col.Unique { + s.WriteString(" unique") + } + if col.isAutoIncr { + s.WriteString(fmt.Sprintf(" %s", dialect.AutoIncrStr())) + } + + x++ + } + } + if len(t.keys) > 1 { + s.WriteString(", primary key (") + for x := range t.keys { + if x > 0 { + s.WriteString(", ") + } + s.WriteString(dialect.QuoteField(t.keys[x].ColumnName)) + } + s.WriteString(")") + } + if len(t.uniqueTogether) > 0 { + for _, columns := range t.uniqueTogether { + s.WriteString(", unique (") + for i, column := range columns { + if i > 0 { + s.WriteString(", ") + } + s.WriteString(dialect.QuoteField(column)) + } + s.WriteString(")") + } + } + s.WriteString(") ") + s.WriteString(dialect.CreateTableSuffix()) + s.WriteString(dialect.QuerySuffix()) + return s.String() +} + +func equal(a, b []string) bool { + if len(a) != len(b) { + return false + } + for i := range a { + if a[i] != b[i] { + return false + } + } + return true +} diff --git a/vendor/github.com/go-gorp/gorp/v3/table_bindings.go b/vendor/github.com/go-gorp/gorp/v3/table_bindings.go new file mode 100644 index 000000000..43c0b3dd4 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/table_bindings.go @@ -0,0 +1,305 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "bytes" + "fmt" + "reflect" + "sync" +) + +// CustomScanner binds a database column value to a Go type +type CustomScanner struct { + // After a row is scanned, Holder will contain the value from the database column. + // Initialize the CustomScanner with the concrete Go type you wish the database + // driver to scan the raw column into. + Holder interface{} + // Target typically holds a pointer to the target struct field to bind the Holder + // value to. + Target interface{} + // Binder is a custom function that converts the holder value to the target type + // and sets target accordingly. This function should return error if a problem + // occurs converting the holder to the target. + Binder func(holder interface{}, target interface{}) error +} + +// Used to filter columns when selectively updating +type ColumnFilter func(*ColumnMap) bool + +func acceptAllFilter(col *ColumnMap) bool { + return true +} + +// Bind is called automatically by gorp after Scan() +func (me CustomScanner) Bind() error { + return me.Binder(me.Holder, me.Target) +} + +type bindPlan struct { + query string + argFields []string + keyFields []string + versField string + autoIncrIdx int + autoIncrFieldName string + once sync.Once +} + +func (plan *bindPlan) createBindInstance(elem reflect.Value, conv TypeConverter) (bindInstance, error) { + bi := bindInstance{query: plan.query, autoIncrIdx: plan.autoIncrIdx, autoIncrFieldName: plan.autoIncrFieldName, versField: plan.versField} + if plan.versField != "" { + bi.existingVersion = elem.FieldByName(plan.versField).Int() + } + + var err error + + for i := 0; i < len(plan.argFields); i++ { + k := plan.argFields[i] + if k == versFieldConst { + newVer := bi.existingVersion + 1 + bi.args = append(bi.args, newVer) + if bi.existingVersion == 0 { + elem.FieldByName(plan.versField).SetInt(int64(newVer)) + } + } else { + val := elem.FieldByName(k).Interface() + if conv != nil { + val, err = conv.ToDb(val) + if err != nil { + return bindInstance{}, err + } + } + bi.args = append(bi.args, val) + } + } + + for i := 0; i < len(plan.keyFields); i++ { + k := plan.keyFields[i] + val := elem.FieldByName(k).Interface() + if conv != nil { + val, err = conv.ToDb(val) + if err != nil { + return bindInstance{}, err + } + } + bi.keys = append(bi.keys, val) + } + + return bi, nil +} + +type bindInstance struct { + query string + args []interface{} + keys []interface{} + existingVersion int64 + versField string + autoIncrIdx int + autoIncrFieldName string +} + +func (t *TableMap) bindInsert(elem reflect.Value) (bindInstance, error) { + plan := &t.insertPlan + plan.once.Do(func() { + plan.autoIncrIdx = -1 + + s := bytes.Buffer{} + s2 := bytes.Buffer{} + s.WriteString(fmt.Sprintf("insert into %s (", t.dbmap.Dialect.QuotedTableForQuery(t.SchemaName, t.TableName))) + + x := 0 + first := true + for y := range t.Columns { + col := t.Columns[y] + if !(col.isAutoIncr && t.dbmap.Dialect.AutoIncrBindValue() == "") { + if !col.Transient { + if !first { + s.WriteString(",") + s2.WriteString(",") + } + s.WriteString(t.dbmap.Dialect.QuoteField(col.ColumnName)) + + if col.isAutoIncr { + s2.WriteString(t.dbmap.Dialect.AutoIncrBindValue()) + plan.autoIncrIdx = y + plan.autoIncrFieldName = col.fieldName + } else { + if col.DefaultValue == "" { + s2.WriteString(t.dbmap.Dialect.BindVar(x)) + if col == t.version { + plan.versField = col.fieldName + plan.argFields = append(plan.argFields, versFieldConst) + } else { + plan.argFields = append(plan.argFields, col.fieldName) + } + x++ + } else { + s2.WriteString(col.DefaultValue) + } + } + first = false + } + } else { + plan.autoIncrIdx = y + plan.autoIncrFieldName = col.fieldName + } + } + s.WriteString(") values (") + s.WriteString(s2.String()) + s.WriteString(")") + if plan.autoIncrIdx > -1 { + s.WriteString(t.dbmap.Dialect.AutoIncrInsertSuffix(t.Columns[plan.autoIncrIdx])) + } + s.WriteString(t.dbmap.Dialect.QuerySuffix()) + + plan.query = s.String() + }) + + return plan.createBindInstance(elem, t.dbmap.TypeConverter) +} + +func (t *TableMap) bindUpdate(elem reflect.Value, colFilter ColumnFilter) (bindInstance, error) { + if colFilter == nil { + colFilter = acceptAllFilter + } + + plan := &t.updatePlan + plan.once.Do(func() { + s := bytes.Buffer{} + s.WriteString(fmt.Sprintf("update %s set ", t.dbmap.Dialect.QuotedTableForQuery(t.SchemaName, t.TableName))) + x := 0 + + for y := range t.Columns { + col := t.Columns[y] + if !col.isAutoIncr && !col.Transient && colFilter(col) { + if x > 0 { + s.WriteString(", ") + } + s.WriteString(t.dbmap.Dialect.QuoteField(col.ColumnName)) + s.WriteString("=") + s.WriteString(t.dbmap.Dialect.BindVar(x)) + + if col == t.version { + plan.versField = col.fieldName + plan.argFields = append(plan.argFields, versFieldConst) + } else { + plan.argFields = append(plan.argFields, col.fieldName) + } + x++ + } + } + + s.WriteString(" where ") + for y := range t.keys { + col := t.keys[y] + if y > 0 { + s.WriteString(" and ") + } + s.WriteString(t.dbmap.Dialect.QuoteField(col.ColumnName)) + s.WriteString("=") + s.WriteString(t.dbmap.Dialect.BindVar(x)) + + plan.argFields = append(plan.argFields, col.fieldName) + plan.keyFields = append(plan.keyFields, col.fieldName) + x++ + } + if plan.versField != "" { + s.WriteString(" and ") + s.WriteString(t.dbmap.Dialect.QuoteField(t.version.ColumnName)) + s.WriteString("=") + s.WriteString(t.dbmap.Dialect.BindVar(x)) + plan.argFields = append(plan.argFields, plan.versField) + } + s.WriteString(t.dbmap.Dialect.QuerySuffix()) + + plan.query = s.String() + }) + + return plan.createBindInstance(elem, t.dbmap.TypeConverter) +} + +func (t *TableMap) bindDelete(elem reflect.Value) (bindInstance, error) { + plan := &t.deletePlan + plan.once.Do(func() { + s := bytes.Buffer{} + s.WriteString(fmt.Sprintf("delete from %s", t.dbmap.Dialect.QuotedTableForQuery(t.SchemaName, t.TableName))) + + for y := range t.Columns { + col := t.Columns[y] + if !col.Transient { + if col == t.version { + plan.versField = col.fieldName + } + } + } + + s.WriteString(" where ") + for x := range t.keys { + k := t.keys[x] + if x > 0 { + s.WriteString(" and ") + } + s.WriteString(t.dbmap.Dialect.QuoteField(k.ColumnName)) + s.WriteString("=") + s.WriteString(t.dbmap.Dialect.BindVar(x)) + + plan.keyFields = append(plan.keyFields, k.fieldName) + plan.argFields = append(plan.argFields, k.fieldName) + } + if plan.versField != "" { + s.WriteString(" and ") + s.WriteString(t.dbmap.Dialect.QuoteField(t.version.ColumnName)) + s.WriteString("=") + s.WriteString(t.dbmap.Dialect.BindVar(len(plan.argFields))) + + plan.argFields = append(plan.argFields, plan.versField) + } + s.WriteString(t.dbmap.Dialect.QuerySuffix()) + + plan.query = s.String() + }) + + return plan.createBindInstance(elem, t.dbmap.TypeConverter) +} + +func (t *TableMap) bindGet() *bindPlan { + plan := &t.getPlan + plan.once.Do(func() { + s := bytes.Buffer{} + s.WriteString("select ") + + x := 0 + for _, col := range t.Columns { + if !col.Transient { + if x > 0 { + s.WriteString(",") + } + s.WriteString(t.dbmap.Dialect.QuoteField(col.ColumnName)) + plan.argFields = append(plan.argFields, col.fieldName) + x++ + } + } + s.WriteString(" from ") + s.WriteString(t.dbmap.Dialect.QuotedTableForQuery(t.SchemaName, t.TableName)) + s.WriteString(" where ") + for x := range t.keys { + col := t.keys[x] + if x > 0 { + s.WriteString(" and ") + } + s.WriteString(t.dbmap.Dialect.QuoteField(col.ColumnName)) + s.WriteString("=") + s.WriteString(t.dbmap.Dialect.BindVar(x)) + + plan.keyFields = append(plan.keyFields, col.fieldName) + } + s.WriteString(t.dbmap.Dialect.QuerySuffix()) + + plan.query = s.String() + }) + + return plan +} diff --git a/vendor/github.com/go-gorp/gorp/v3/test_all.sh b/vendor/github.com/go-gorp/gorp/v3/test_all.sh new file mode 100644 index 000000000..91007d645 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/test_all.sh @@ -0,0 +1,23 @@ +#!/bin/bash -ex + +# on macs, you may need to: +# export GOBUILDFLAG=-ldflags -linkmode=external + +echo "Running unit tests" +go test -race + +echo "Testing against postgres" +export GORP_TEST_DSN="host=postgres user=gorptest password=gorptest dbname=gorptest sslmode=disable" +export GORP_TEST_DIALECT=postgres +go test -tags integration $GOBUILDFLAG $@ . + +echo "Testing against sqlite" +export GORP_TEST_DSN=/tmp/gorptest.bin +export GORP_TEST_DIALECT=sqlite +go test -tags integration $GOBUILDFLAG $@ . +rm -f /tmp/gorptest.bin + +echo "Testing against mysql" +export GORP_TEST_DSN="gorptest:gorptest@tcp(mysql)/gorptest" +export GORP_TEST_DIALECT=mysql +go test -tags integration $GOBUILDFLAG $@ . diff --git a/vendor/github.com/go-gorp/gorp/v3/transaction.go b/vendor/github.com/go-gorp/gorp/v3/transaction.go new file mode 100644 index 000000000..d505d94c9 --- /dev/null +++ b/vendor/github.com/go-gorp/gorp/v3/transaction.go @@ -0,0 +1,239 @@ +// Copyright 2012 James Cooper. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gorp + +import ( + "context" + "database/sql" + "time" +) + +// Transaction represents a database transaction. +// Insert/Update/Delete/Get/Exec operations will be run in the context +// of that transaction. Transactions should be terminated with +// a call to Commit() or Rollback() +type Transaction struct { + ctx context.Context + dbmap *DbMap + tx *sql.Tx + closed bool +} + +func (t *Transaction) WithContext(ctx context.Context) SqlExecutor { + copy := &Transaction{} + *copy = *t + copy.ctx = ctx + return copy +} + +// Insert has the same behavior as DbMap.Insert(), but runs in a transaction. +func (t *Transaction) Insert(list ...interface{}) error { + return insert(t.dbmap, t, list...) +} + +// Update had the same behavior as DbMap.Update(), but runs in a transaction. +func (t *Transaction) Update(list ...interface{}) (int64, error) { + return update(t.dbmap, t, nil, list...) +} + +// UpdateColumns had the same behavior as DbMap.UpdateColumns(), but runs in a transaction. +func (t *Transaction) UpdateColumns(filter ColumnFilter, list ...interface{}) (int64, error) { + return update(t.dbmap, t, filter, list...) +} + +// Delete has the same behavior as DbMap.Delete(), but runs in a transaction. +func (t *Transaction) Delete(list ...interface{}) (int64, error) { + return delete(t.dbmap, t, list...) +} + +// Get has the same behavior as DbMap.Get(), but runs in a transaction. +func (t *Transaction) Get(i interface{}, keys ...interface{}) (interface{}, error) { + return get(t.dbmap, t, i, keys...) +} + +// Select has the same behavior as DbMap.Select(), but runs in a transaction. +func (t *Transaction) Select(i interface{}, query string, args ...interface{}) ([]interface{}, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return hookedselect(t.dbmap, t, i, query, args...) +} + +// Exec has the same behavior as DbMap.Exec(), but runs in a transaction. +func (t *Transaction) Exec(query string, args ...interface{}) (sql.Result, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, query, args...) + } + return maybeExpandNamedQueryAndExec(t, query, args...) +} + +// SelectInt is a convenience wrapper around the gorp.SelectInt function. +func (t *Transaction) SelectInt(query string, args ...interface{}) (int64, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectInt(t, query, args...) +} + +// SelectNullInt is a convenience wrapper around the gorp.SelectNullInt function. +func (t *Transaction) SelectNullInt(query string, args ...interface{}) (sql.NullInt64, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectNullInt(t, query, args...) +} + +// SelectFloat is a convenience wrapper around the gorp.SelectFloat function. +func (t *Transaction) SelectFloat(query string, args ...interface{}) (float64, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectFloat(t, query, args...) +} + +// SelectNullFloat is a convenience wrapper around the gorp.SelectNullFloat function. +func (t *Transaction) SelectNullFloat(query string, args ...interface{}) (sql.NullFloat64, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectNullFloat(t, query, args...) +} + +// SelectStr is a convenience wrapper around the gorp.SelectStr function. +func (t *Transaction) SelectStr(query string, args ...interface{}) (string, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectStr(t, query, args...) +} + +// SelectNullStr is a convenience wrapper around the gorp.SelectNullStr function. +func (t *Transaction) SelectNullStr(query string, args ...interface{}) (sql.NullString, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectNullStr(t, query, args...) +} + +// SelectOne is a convenience wrapper around the gorp.SelectOne function. +func (t *Transaction) SelectOne(holder interface{}, query string, args ...interface{}) error { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + return SelectOne(t.dbmap, t, holder, query, args...) +} + +// Commit commits the underlying database transaction. +func (t *Transaction) Commit() error { + if !t.closed { + t.closed = true + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, "commit;") + } + return t.tx.Commit() + } + + return sql.ErrTxDone +} + +// Rollback rolls back the underlying database transaction. +func (t *Transaction) Rollback() error { + if !t.closed { + t.closed = true + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, "rollback;") + } + return t.tx.Rollback() + } + + return sql.ErrTxDone +} + +// Savepoint creates a savepoint with the given name. The name is interpolated +// directly into the SQL SAVEPOINT statement, so you must sanitize it if it is +// derived from user input. +func (t *Transaction) Savepoint(name string) error { + query := "savepoint " + t.dbmap.Dialect.QuoteField(name) + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, query, nil) + } + _, err := exec(t, query) + return err +} + +// RollbackToSavepoint rolls back to the savepoint with the given name. The +// name is interpolated directly into the SQL SAVEPOINT statement, so you must +// sanitize it if it is derived from user input. +func (t *Transaction) RollbackToSavepoint(savepoint string) error { + query := "rollback to savepoint " + t.dbmap.Dialect.QuoteField(savepoint) + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, query, nil) + } + _, err := exec(t, query) + return err +} + +// ReleaseSavepint releases the savepoint with the given name. The name is +// interpolated directly into the SQL SAVEPOINT statement, so you must sanitize +// it if it is derived from user input. +func (t *Transaction) ReleaseSavepoint(savepoint string) error { + query := "release savepoint " + t.dbmap.Dialect.QuoteField(savepoint) + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, query, nil) + } + _, err := exec(t, query) + return err +} + +// Prepare has the same behavior as DbMap.Prepare(), but runs in a transaction. +func (t *Transaction) Prepare(query string) (*sql.Stmt, error) { + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, query, nil) + } + return prepare(t, query) +} + +func (t *Transaction) QueryRow(query string, args ...interface{}) *sql.Row { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&query, args...) + } + + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, query, args...) + } + return queryRow(t, query, args...) +} + +func (t *Transaction) Query(q string, args ...interface{}) (*sql.Rows, error) { + if t.dbmap.ExpandSliceArgs { + expandSliceArgs(&q, args...) + } + + if t.dbmap.logger != nil { + now := time.Now() + defer t.dbmap.trace(now, q, args...) + } + return query(t, q, args...) +} diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go new file mode 100644 index 000000000..30568e768 --- /dev/null +++ b/vendor/github.com/go-logr/logr/funcr/funcr.go @@ -0,0 +1,914 @@ +/* +Copyright 2021 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package funcr implements formatting of structured log messages and +// optionally captures the call site and timestamp. +// +// The simplest way to use it is via its implementation of a +// github.com/go-logr/logr.LogSink with output through an arbitrary +// "write" function. See New and NewJSON for details. +// +// # Custom LogSinks +// +// For users who need more control, a funcr.Formatter can be embedded inside +// your own custom LogSink implementation. This is useful when the LogSink +// needs to implement additional methods, for example. +// +// # Formatting +// +// This will respect logr.Marshaler, fmt.Stringer, and error interfaces for +// values which are being logged. When rendering a struct, funcr will use Go's +// standard JSON tags (all except "string"). +package funcr + +import ( + "bytes" + "encoding" + "encoding/json" + "fmt" + "path/filepath" + "reflect" + "runtime" + "strconv" + "strings" + "time" + + "github.com/go-logr/logr" +) + +// New returns a logr.Logger which is implemented by an arbitrary function. +func New(fn func(prefix, args string), opts Options) logr.Logger { + return logr.New(newSink(fn, NewFormatter(opts))) +} + +// NewJSON returns a logr.Logger which is implemented by an arbitrary function +// and produces JSON output. +func NewJSON(fn func(obj string), opts Options) logr.Logger { + fnWrapper := func(_, obj string) { + fn(obj) + } + return logr.New(newSink(fnWrapper, NewFormatterJSON(opts))) +} + +// Underlier exposes access to the underlying logging function. Since +// callers only have a logr.Logger, they have to know which +// implementation is in use, so this interface is less of an +// abstraction and more of a way to test type conversion. +type Underlier interface { + GetUnderlying() func(prefix, args string) +} + +func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink { + l := &fnlogger{ + Formatter: formatter, + write: fn, + } + // For skipping fnlogger.Info and fnlogger.Error. + l.Formatter.AddCallDepth(1) + return l +} + +// Options carries parameters which influence the way logs are generated. +type Options struct { + // LogCaller tells funcr to add a "caller" key to some or all log lines. + // This has some overhead, so some users might not want it. + LogCaller MessageClass + + // LogCallerFunc tells funcr to also log the calling function name. This + // has no effect if caller logging is not enabled (see Options.LogCaller). + LogCallerFunc bool + + // LogTimestamp tells funcr to add a "ts" key to log lines. This has some + // overhead, so some users might not want it. + LogTimestamp bool + + // TimestampFormat tells funcr how to render timestamps when LogTimestamp + // is enabled. If not specified, a default format will be used. For more + // details, see docs for Go's time.Layout. + TimestampFormat string + + // LogInfoLevel tells funcr what key to use to log the info level. + // If not specified, the info level will be logged as "level". + // If this is set to "", the info level will not be logged at all. + LogInfoLevel *string + + // Verbosity tells funcr which V logs to produce. Higher values enable + // more logs. Info logs at or below this level will be written, while logs + // above this level will be discarded. + Verbosity int + + // RenderBuiltinsHook allows users to mutate the list of key-value pairs + // while a log line is being rendered. The kvList argument follows logr + // conventions - each pair of slice elements is comprised of a string key + // and an arbitrary value (verified and sanitized before calling this + // hook). The value returned must follow the same conventions. This hook + // can be used to audit or modify logged data. For example, you might want + // to prefix all of funcr's built-in keys with some string. This hook is + // only called for built-in (provided by funcr itself) key-value pairs. + // Equivalent hooks are offered for key-value pairs saved via + // logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and + // for user-provided pairs (see RenderArgsHook). + RenderBuiltinsHook func(kvList []any) []any + + // RenderValuesHook is the same as RenderBuiltinsHook, except that it is + // only called for key-value pairs saved via logr.Logger.WithValues. See + // RenderBuiltinsHook for more details. + RenderValuesHook func(kvList []any) []any + + // RenderArgsHook is the same as RenderBuiltinsHook, except that it is only + // called for key-value pairs passed directly to Info and Error. See + // RenderBuiltinsHook for more details. + RenderArgsHook func(kvList []any) []any + + // MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct + // that contains a struct, etc.) it may log. Every time it finds a struct, + // slice, array, or map the depth is increased by one. When the maximum is + // reached, the value will be converted to a string indicating that the max + // depth has been exceeded. If this field is not specified, a default + // value will be used. + MaxLogDepth int +} + +// MessageClass indicates which category or categories of messages to consider. +type MessageClass int + +const ( + // None ignores all message classes. + None MessageClass = iota + // All considers all message classes. + All + // Info only considers info messages. + Info + // Error only considers error messages. + Error +) + +// fnlogger inherits some of its LogSink implementation from Formatter +// and just needs to add some glue code. +type fnlogger struct { + Formatter + write func(prefix, args string) +} + +func (l fnlogger) WithName(name string) logr.LogSink { + l.Formatter.AddName(name) + return &l +} + +func (l fnlogger) WithValues(kvList ...any) logr.LogSink { + l.Formatter.AddValues(kvList) + return &l +} + +func (l fnlogger) WithCallDepth(depth int) logr.LogSink { + l.Formatter.AddCallDepth(depth) + return &l +} + +func (l fnlogger) Info(level int, msg string, kvList ...any) { + prefix, args := l.FormatInfo(level, msg, kvList) + l.write(prefix, args) +} + +func (l fnlogger) Error(err error, msg string, kvList ...any) { + prefix, args := l.FormatError(err, msg, kvList) + l.write(prefix, args) +} + +func (l fnlogger) GetUnderlying() func(prefix, args string) { + return l.write +} + +// Assert conformance to the interfaces. +var _ logr.LogSink = &fnlogger{} +var _ logr.CallDepthLogSink = &fnlogger{} +var _ Underlier = &fnlogger{} + +// NewFormatter constructs a Formatter which emits a JSON-like key=value format. +func NewFormatter(opts Options) Formatter { + return newFormatter(opts, outputKeyValue) +} + +// NewFormatterJSON constructs a Formatter which emits strict JSON. +func NewFormatterJSON(opts Options) Formatter { + return newFormatter(opts, outputJSON) +} + +// Defaults for Options. +const defaultTimestampFormat = "2006-01-02 15:04:05.000000" +const defaultMaxLogDepth = 16 + +func newFormatter(opts Options, outfmt outputFormat) Formatter { + if opts.TimestampFormat == "" { + opts.TimestampFormat = defaultTimestampFormat + } + if opts.MaxLogDepth == 0 { + opts.MaxLogDepth = defaultMaxLogDepth + } + if opts.LogInfoLevel == nil { + opts.LogInfoLevel = new(string) + *opts.LogInfoLevel = "level" + } + f := Formatter{ + outputFormat: outfmt, + prefix: "", + values: nil, + depth: 0, + opts: &opts, + } + return f +} + +// Formatter is an opaque struct which can be embedded in a LogSink +// implementation. It should be constructed with NewFormatter. Some of +// its methods directly implement logr.LogSink. +type Formatter struct { + outputFormat outputFormat + prefix string + values []any + valuesStr string + depth int + opts *Options + groupName string // for slog groups + groups []groupDef +} + +// outputFormat indicates which outputFormat to use. +type outputFormat int + +const ( + // outputKeyValue emits a JSON-like key=value format, but not strict JSON. + outputKeyValue outputFormat = iota + // outputJSON emits strict JSON. + outputJSON +) + +// groupDef represents a saved group. The values may be empty, but we don't +// know if we need to render the group until the final record is rendered. +type groupDef struct { + name string + values string +} + +// PseudoStruct is a list of key-value pairs that gets logged as a struct. +type PseudoStruct []any + +// render produces a log line, ready to use. +func (f Formatter) render(builtins, args []any) string { + // Empirically bytes.Buffer is faster than strings.Builder for this. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + + if f.outputFormat == outputJSON { + buf.WriteByte('{') // for the whole record + } + + // Render builtins + vals := builtins + if hook := f.opts.RenderBuiltinsHook; hook != nil { + vals = hook(f.sanitize(vals)) + } + f.flatten(buf, vals, false) // keys are ours, no need to escape + continuing := len(builtins) > 0 + + // Turn the inner-most group into a string + argsStr := func() string { + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + + vals = args + if hook := f.opts.RenderArgsHook; hook != nil { + vals = hook(f.sanitize(vals)) + } + f.flatten(buf, vals, true) // escape user-provided keys + + return buf.String() + }() + + // Render the stack of groups from the inside out. + bodyStr := f.renderGroup(f.groupName, f.valuesStr, argsStr) + for i := len(f.groups) - 1; i >= 0; i-- { + grp := &f.groups[i] + if grp.values == "" && bodyStr == "" { + // no contents, so we must elide the whole group + continue + } + bodyStr = f.renderGroup(grp.name, grp.values, bodyStr) + } + + if bodyStr != "" { + if continuing { + buf.WriteByte(f.comma()) + } + buf.WriteString(bodyStr) + } + + if f.outputFormat == outputJSON { + buf.WriteByte('}') // for the whole record + } + + return buf.String() +} + +// renderGroup returns a string representation of the named group with rendered +// values and args. If the name is empty, this will return the values and args, +// joined. If the name is not empty, this will return a single key-value pair, +// where the value is a grouping of the values and args. If the values and +// args are both empty, this will return an empty string, even if the name was +// specified. +func (f Formatter) renderGroup(name string, values string, args string) string { + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + + needClosingBrace := false + if name != "" && (values != "" || args != "") { + buf.WriteString(f.quoted(name, true)) // escape user-provided keys + buf.WriteByte(f.colon()) + buf.WriteByte('{') + needClosingBrace = true + } + + continuing := false + if values != "" { + buf.WriteString(values) + continuing = true + } + + if args != "" { + if continuing { + buf.WriteByte(f.comma()) + } + buf.WriteString(args) + } + + if needClosingBrace { + buf.WriteByte('}') + } + + return buf.String() +} + +// flatten renders a list of key-value pairs into a buffer. If escapeKeys is +// true, the keys are assumed to have non-JSON-compatible characters in them +// and must be evaluated for escapes. +// +// This function returns a potentially modified version of kvList, which +// ensures that there is a value for every key (adding a value if needed) and +// that each key is a string (substituting a key if needed). +func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, escapeKeys bool) []any { + // This logic overlaps with sanitize() but saves one type-cast per key, + // which can be measurable. + if len(kvList)%2 != 0 { + kvList = append(kvList, noValue) + } + copied := false + for i := 0; i < len(kvList); i += 2 { + k, ok := kvList[i].(string) + if !ok { + if !copied { + newList := make([]any, len(kvList)) + copy(newList, kvList) + kvList = newList + copied = true + } + k = f.nonStringKey(kvList[i]) + kvList[i] = k + } + v := kvList[i+1] + + if i > 0 { + if f.outputFormat == outputJSON { + buf.WriteByte(f.comma()) + } else { + // In theory the format could be something we don't understand. In + // practice, we control it, so it won't be. + buf.WriteByte(' ') + } + } + + buf.WriteString(f.quoted(k, escapeKeys)) + buf.WriteByte(f.colon()) + buf.WriteString(f.pretty(v)) + } + return kvList +} + +func (f Formatter) quoted(str string, escape bool) string { + if escape { + return prettyString(str) + } + // this is faster + return `"` + str + `"` +} + +func (f Formatter) comma() byte { + if f.outputFormat == outputJSON { + return ',' + } + return ' ' +} + +func (f Formatter) colon() byte { + if f.outputFormat == outputJSON { + return ':' + } + return '=' +} + +func (f Formatter) pretty(value any) string { + return f.prettyWithFlags(value, 0, 0) +} + +const ( + flagRawStruct = 0x1 // do not print braces on structs +) + +// TODO: This is not fast. Most of the overhead goes here. +func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { + if depth > f.opts.MaxLogDepth { + return `""` + } + + // Handle types that take full control of logging. + if v, ok := value.(logr.Marshaler); ok { + // Replace the value with what the type wants to get logged. + // That then gets handled below via reflection. + value = invokeMarshaler(v) + } + + // Handle types that want to format themselves. + switch v := value.(type) { + case fmt.Stringer: + value = invokeStringer(v) + case error: + value = invokeError(v) + } + + // Handling the most common types without reflect is a small perf win. + switch v := value.(type) { + case bool: + return strconv.FormatBool(v) + case string: + return prettyString(v) + case int: + return strconv.FormatInt(int64(v), 10) + case int8: + return strconv.FormatInt(int64(v), 10) + case int16: + return strconv.FormatInt(int64(v), 10) + case int32: + return strconv.FormatInt(int64(v), 10) + case int64: + return strconv.FormatInt(int64(v), 10) + case uint: + return strconv.FormatUint(uint64(v), 10) + case uint8: + return strconv.FormatUint(uint64(v), 10) + case uint16: + return strconv.FormatUint(uint64(v), 10) + case uint32: + return strconv.FormatUint(uint64(v), 10) + case uint64: + return strconv.FormatUint(v, 10) + case uintptr: + return strconv.FormatUint(uint64(v), 10) + case float32: + return strconv.FormatFloat(float64(v), 'f', -1, 32) + case float64: + return strconv.FormatFloat(v, 'f', -1, 64) + case complex64: + return `"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `"` + case complex128: + return `"` + strconv.FormatComplex(v, 'f', -1, 128) + `"` + case PseudoStruct: + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + v = f.sanitize(v) + if flags&flagRawStruct == 0 { + buf.WriteByte('{') + } + for i := 0; i < len(v); i += 2 { + if i > 0 { + buf.WriteByte(f.comma()) + } + k, _ := v[i].(string) // sanitize() above means no need to check success + // arbitrary keys might need escaping + buf.WriteString(prettyString(k)) + buf.WriteByte(f.colon()) + buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1)) + } + if flags&flagRawStruct == 0 { + buf.WriteByte('}') + } + return buf.String() + } + + buf := bytes.NewBuffer(make([]byte, 0, 256)) + t := reflect.TypeOf(value) + if t == nil { + return "null" + } + v := reflect.ValueOf(value) + switch t.Kind() { + case reflect.Bool: + return strconv.FormatBool(v.Bool()) + case reflect.String: + return prettyString(v.String()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return strconv.FormatInt(int64(v.Int()), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return strconv.FormatUint(uint64(v.Uint()), 10) + case reflect.Float32: + return strconv.FormatFloat(float64(v.Float()), 'f', -1, 32) + case reflect.Float64: + return strconv.FormatFloat(v.Float(), 'f', -1, 64) + case reflect.Complex64: + return `"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `"` + case reflect.Complex128: + return `"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `"` + case reflect.Struct: + if flags&flagRawStruct == 0 { + buf.WriteByte('{') + } + printComma := false // testing i>0 is not enough because of JSON omitted fields + for i := 0; i < t.NumField(); i++ { + fld := t.Field(i) + if fld.PkgPath != "" { + // reflect says this field is only defined for non-exported fields. + continue + } + if !v.Field(i).CanInterface() { + // reflect isn't clear exactly what this means, but we can't use it. + continue + } + name := "" + omitempty := false + if tag, found := fld.Tag.Lookup("json"); found { + if tag == "-" { + continue + } + if comma := strings.Index(tag, ","); comma != -1 { + if n := tag[:comma]; n != "" { + name = n + } + rest := tag[comma:] + if strings.Contains(rest, ",omitempty,") || strings.HasSuffix(rest, ",omitempty") { + omitempty = true + } + } else { + name = tag + } + } + if omitempty && isEmpty(v.Field(i)) { + continue + } + if printComma { + buf.WriteByte(f.comma()) + } + printComma = true // if we got here, we are rendering a field + if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" { + buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1)) + continue + } + if name == "" { + name = fld.Name + } + // field names can't contain characters which need escaping + buf.WriteString(f.quoted(name, false)) + buf.WriteByte(f.colon()) + buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1)) + } + if flags&flagRawStruct == 0 { + buf.WriteByte('}') + } + return buf.String() + case reflect.Slice, reflect.Array: + // If this is outputing as JSON make sure this isn't really a json.RawMessage. + // If so just emit "as-is" and don't pretty it as that will just print + // it as [X,Y,Z,...] which isn't terribly useful vs the string form you really want. + if f.outputFormat == outputJSON { + if rm, ok := value.(json.RawMessage); ok { + // If it's empty make sure we emit an empty value as the array style would below. + if len(rm) > 0 { + buf.Write(rm) + } else { + buf.WriteString("null") + } + return buf.String() + } + } + buf.WriteByte('[') + for i := 0; i < v.Len(); i++ { + if i > 0 { + buf.WriteByte(f.comma()) + } + e := v.Index(i) + buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1)) + } + buf.WriteByte(']') + return buf.String() + case reflect.Map: + buf.WriteByte('{') + // This does not sort the map keys, for best perf. + it := v.MapRange() + i := 0 + for it.Next() { + if i > 0 { + buf.WriteByte(f.comma()) + } + // If a map key supports TextMarshaler, use it. + keystr := "" + if m, ok := it.Key().Interface().(encoding.TextMarshaler); ok { + txt, err := m.MarshalText() + if err != nil { + keystr = fmt.Sprintf("", err.Error()) + } else { + keystr = string(txt) + } + keystr = prettyString(keystr) + } else { + // prettyWithFlags will produce already-escaped values + keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1) + if t.Key().Kind() != reflect.String { + // JSON only does string keys. Unlike Go's standard JSON, we'll + // convert just about anything to a string. + keystr = prettyString(keystr) + } + } + buf.WriteString(keystr) + buf.WriteByte(f.colon()) + buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1)) + i++ + } + buf.WriteByte('}') + return buf.String() + case reflect.Ptr, reflect.Interface: + if v.IsNil() { + return "null" + } + return f.prettyWithFlags(v.Elem().Interface(), 0, depth) + } + return fmt.Sprintf(`""`, t.Kind().String()) +} + +func prettyString(s string) string { + // Avoid escaping (which does allocations) if we can. + if needsEscape(s) { + return strconv.Quote(s) + } + b := bytes.NewBuffer(make([]byte, 0, 1024)) + b.WriteByte('"') + b.WriteString(s) + b.WriteByte('"') + return b.String() +} + +// needsEscape determines whether the input string needs to be escaped or not, +// without doing any allocations. +func needsEscape(s string) bool { + for _, r := range s { + if !strconv.IsPrint(r) || r == '\\' || r == '"' { + return true + } + } + return false +} + +func isEmpty(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Complex64, reflect.Complex128: + return v.Complex() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} + +func invokeMarshaler(m logr.Marshaler) (ret any) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("", r) + } + }() + return m.MarshalLog() +} + +func invokeStringer(s fmt.Stringer) (ret string) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("", r) + } + }() + return s.String() +} + +func invokeError(e error) (ret string) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("", r) + } + }() + return e.Error() +} + +// Caller represents the original call site for a log line, after considering +// logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File and +// Line fields will always be provided, while the Func field is optional. +// Users can set the render hook fields in Options to examine logged key-value +// pairs, one of which will be {"caller", Caller} if the Options.LogCaller +// field is enabled for the given MessageClass. +type Caller struct { + // File is the basename of the file for this call site. + File string `json:"file"` + // Line is the line number in the file for this call site. + Line int `json:"line"` + // Func is the function name for this call site, or empty if + // Options.LogCallerFunc is not enabled. + Func string `json:"function,omitempty"` +} + +func (f Formatter) caller() Caller { + // +1 for this frame, +1 for Info/Error. + pc, file, line, ok := runtime.Caller(f.depth + 2) + if !ok { + return Caller{"", 0, ""} + } + fn := "" + if f.opts.LogCallerFunc { + if fp := runtime.FuncForPC(pc); fp != nil { + fn = fp.Name() + } + } + + return Caller{filepath.Base(file), line, fn} +} + +const noValue = "" + +func (f Formatter) nonStringKey(v any) string { + return fmt.Sprintf("", f.snippet(v)) +} + +// snippet produces a short snippet string of an arbitrary value. +func (f Formatter) snippet(v any) string { + const snipLen = 16 + + snip := f.pretty(v) + if len(snip) > snipLen { + snip = snip[:snipLen] + } + return snip +} + +// sanitize ensures that a list of key-value pairs has a value for every key +// (adding a value if needed) and that each key is a string (substituting a key +// if needed). +func (f Formatter) sanitize(kvList []any) []any { + if len(kvList)%2 != 0 { + kvList = append(kvList, noValue) + } + for i := 0; i < len(kvList); i += 2 { + _, ok := kvList[i].(string) + if !ok { + kvList[i] = f.nonStringKey(kvList[i]) + } + } + return kvList +} + +// startGroup opens a new group scope (basically a sub-struct), which locks all +// the current saved values and starts them anew. This is needed to satisfy +// slog. +func (f *Formatter) startGroup(name string) { + // Unnamed groups are just inlined. + if name == "" { + return + } + + n := len(f.groups) + f.groups = append(f.groups[:n:n], groupDef{f.groupName, f.valuesStr}) + + // Start collecting new values. + f.groupName = name + f.valuesStr = "" + f.values = nil +} + +// Init configures this Formatter from runtime info, such as the call depth +// imposed by logr itself. +// Note that this receiver is a pointer, so depth can be saved. +func (f *Formatter) Init(info logr.RuntimeInfo) { + f.depth += info.CallDepth +} + +// Enabled checks whether an info message at the given level should be logged. +func (f Formatter) Enabled(level int) bool { + return level <= f.opts.Verbosity +} + +// GetDepth returns the current depth of this Formatter. This is useful for +// implementations which do their own caller attribution. +func (f Formatter) GetDepth() int { + return f.depth +} + +// FormatInfo renders an Info log message into strings. The prefix will be +// empty when no names were set (via AddNames), or when the output is +// configured for JSON. +func (f Formatter) FormatInfo(level int, msg string, kvList []any) (prefix, argsStr string) { + args := make([]any, 0, 64) // using a constant here impacts perf + prefix = f.prefix + if f.outputFormat == outputJSON { + args = append(args, "logger", prefix) + prefix = "" + } + if f.opts.LogTimestamp { + args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) + } + if policy := f.opts.LogCaller; policy == All || policy == Info { + args = append(args, "caller", f.caller()) + } + if key := *f.opts.LogInfoLevel; key != "" { + args = append(args, key, level) + } + args = append(args, "msg", msg) + return prefix, f.render(args, kvList) +} + +// FormatError renders an Error log message into strings. The prefix will be +// empty when no names were set (via AddNames), or when the output is +// configured for JSON. +func (f Formatter) FormatError(err error, msg string, kvList []any) (prefix, argsStr string) { + args := make([]any, 0, 64) // using a constant here impacts perf + prefix = f.prefix + if f.outputFormat == outputJSON { + args = append(args, "logger", prefix) + prefix = "" + } + if f.opts.LogTimestamp { + args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) + } + if policy := f.opts.LogCaller; policy == All || policy == Error { + args = append(args, "caller", f.caller()) + } + args = append(args, "msg", msg) + var loggableErr any + if err != nil { + loggableErr = err.Error() + } + args = append(args, "error", loggableErr) + return prefix, f.render(args, kvList) +} + +// AddName appends the specified name. funcr uses '/' characters to separate +// name elements. Callers should not pass '/' in the provided name string, but +// this library does not actually enforce that. +func (f *Formatter) AddName(name string) { + if len(f.prefix) > 0 { + f.prefix += "/" + } + f.prefix += name +} + +// AddValues adds key-value pairs to the set of saved values to be logged with +// each log line. +func (f *Formatter) AddValues(kvList []any) { + // Three slice args forces a copy. + n := len(f.values) + f.values = append(f.values[:n:n], kvList...) + + vals := f.values + if hook := f.opts.RenderValuesHook; hook != nil { + vals = hook(f.sanitize(vals)) + } + + // Pre-render values, so we don't have to do it on each Info/Error call. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + f.flatten(buf, vals, true) // escape user-provided keys + f.valuesStr = buf.String() +} + +// AddCallDepth increases the number of stack-frames to skip when attributing +// the log line to a file and line. +func (f *Formatter) AddCallDepth(depth int) { + f.depth += depth +} diff --git a/vendor/github.com/go-logr/logr/funcr/slogsink.go b/vendor/github.com/go-logr/logr/funcr/slogsink.go new file mode 100644 index 000000000..7bd84761e --- /dev/null +++ b/vendor/github.com/go-logr/logr/funcr/slogsink.go @@ -0,0 +1,105 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package funcr + +import ( + "context" + "log/slog" + + "github.com/go-logr/logr" +) + +var _ logr.SlogSink = &fnlogger{} + +const extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink + +func (l fnlogger) Handle(_ context.Context, record slog.Record) error { + kvList := make([]any, 0, 2*record.NumAttrs()) + record.Attrs(func(attr slog.Attr) bool { + kvList = attrToKVs(attr, kvList) + return true + }) + + if record.Level >= slog.LevelError { + l.WithCallDepth(extraSlogSinkDepth).Error(nil, record.Message, kvList...) + } else { + level := l.levelFromSlog(record.Level) + l.WithCallDepth(extraSlogSinkDepth).Info(level, record.Message, kvList...) + } + return nil +} + +func (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink { + kvList := make([]any, 0, 2*len(attrs)) + for _, attr := range attrs { + kvList = attrToKVs(attr, kvList) + } + l.AddValues(kvList) + return &l +} + +func (l fnlogger) WithGroup(name string) logr.SlogSink { + l.startGroup(name) + return &l +} + +// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups +// and other details of slog. +func attrToKVs(attr slog.Attr, kvList []any) []any { + attrVal := attr.Value.Resolve() + if attrVal.Kind() == slog.KindGroup { + groupVal := attrVal.Group() + grpKVs := make([]any, 0, 2*len(groupVal)) + for _, attr := range groupVal { + grpKVs = attrToKVs(attr, grpKVs) + } + if attr.Key == "" { + // slog says we have to inline these + kvList = append(kvList, grpKVs...) + } else { + kvList = append(kvList, attr.Key, PseudoStruct(grpKVs)) + } + } else if attr.Key != "" { + kvList = append(kvList, attr.Key, attrVal.Any()) + } + + return kvList +} + +// levelFromSlog adjusts the level by the logger's verbosity and negates it. +// It ensures that the result is >= 0. This is necessary because the result is +// passed to a LogSink and that API did not historically document whether +// levels could be negative or what that meant. +// +// Some example usage: +// +// logrV0 := getMyLogger() +// logrV2 := logrV0.V(2) +// slogV2 := slog.New(logr.ToSlogHandler(logrV2)) +// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) +// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) +// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) +func (l fnlogger) levelFromSlog(level slog.Level) int { + result := -level + if result < 0 { + result = 0 // because LogSink doesn't expect negative V levels + } + return int(result) +} diff --git a/vendor/github.com/go-logr/logr/slogr/slogr.go b/vendor/github.com/go-logr/logr/slogr/slogr.go new file mode 100644 index 000000000..36432c56f --- /dev/null +++ b/vendor/github.com/go-logr/logr/slogr/slogr.go @@ -0,0 +1,61 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package slogr enables usage of a slog.Handler with logr.Logger as front-end +// API and of a logr.LogSink through the slog.Handler and thus slog.Logger +// APIs. +// +// See the README in the top-level [./logr] package for a discussion of +// interoperability. +// +// Deprecated: use the main logr package instead. +package slogr + +import ( + "log/slog" + + "github.com/go-logr/logr" +) + +// NewLogr returns a logr.Logger which writes to the slog.Handler. +// +// Deprecated: use [logr.FromSlogHandler] instead. +func NewLogr(handler slog.Handler) logr.Logger { + return logr.FromSlogHandler(handler) +} + +// NewSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger. +// +// Deprecated: use [logr.ToSlogHandler] instead. +func NewSlogHandler(logger logr.Logger) slog.Handler { + return logr.ToSlogHandler(logger) +} + +// ToSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger. +// +// Deprecated: use [logr.ToSlogHandler] instead. +func ToSlogHandler(logger logr.Logger) slog.Handler { + return logr.ToSlogHandler(logger) +} + +// SlogSink is an optional interface that a LogSink can implement to support +// logging through the slog.Logger or slog.Handler APIs better. +// +// Deprecated: use [logr.SlogSink] instead. +type SlogSink = logr.SlogSink diff --git a/vendor/github.com/go-logr/stdr/LICENSE b/vendor/github.com/go-logr/stdr/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/github.com/go-logr/stdr/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-logr/stdr/README.md b/vendor/github.com/go-logr/stdr/README.md new file mode 100644 index 000000000..515866789 --- /dev/null +++ b/vendor/github.com/go-logr/stdr/README.md @@ -0,0 +1,6 @@ +# Minimal Go logging using logr and Go's standard library + +[![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/stdr.svg)](https://pkg.go.dev/github.com/go-logr/stdr) + +This package implements the [logr interface](https://github.com/go-logr/logr) +in terms of Go's standard log package(https://pkg.go.dev/log). diff --git a/vendor/github.com/go-logr/stdr/stdr.go b/vendor/github.com/go-logr/stdr/stdr.go new file mode 100644 index 000000000..93a8aab51 --- /dev/null +++ b/vendor/github.com/go-logr/stdr/stdr.go @@ -0,0 +1,170 @@ +/* +Copyright 2019 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package stdr implements github.com/go-logr/logr.Logger in terms of +// Go's standard log package. +package stdr + +import ( + "log" + "os" + + "github.com/go-logr/logr" + "github.com/go-logr/logr/funcr" +) + +// The global verbosity level. See SetVerbosity(). +var globalVerbosity int + +// SetVerbosity sets the global level against which all info logs will be +// compared. If this is greater than or equal to the "V" of the logger, the +// message will be logged. A higher value here means more logs will be written. +// The previous verbosity value is returned. This is not concurrent-safe - +// callers must be sure to call it from only one goroutine. +func SetVerbosity(v int) int { + old := globalVerbosity + globalVerbosity = v + return old +} + +// New returns a logr.Logger which is implemented by Go's standard log package, +// or something like it. If std is nil, this will use a default logger +// instead. +// +// Example: stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile))) +func New(std StdLogger) logr.Logger { + return NewWithOptions(std, Options{}) +} + +// NewWithOptions returns a logr.Logger which is implemented by Go's standard +// log package, or something like it. See New for details. +func NewWithOptions(std StdLogger, opts Options) logr.Logger { + if std == nil { + // Go's log.Default() is only available in 1.16 and higher. + std = log.New(os.Stderr, "", log.LstdFlags) + } + + if opts.Depth < 0 { + opts.Depth = 0 + } + + fopts := funcr.Options{ + LogCaller: funcr.MessageClass(opts.LogCaller), + } + + sl := &logger{ + Formatter: funcr.NewFormatter(fopts), + std: std, + } + + // For skipping our own logger.Info/Error. + sl.Formatter.AddCallDepth(1 + opts.Depth) + + return logr.New(sl) +} + +// Options carries parameters which influence the way logs are generated. +type Options struct { + // Depth biases the assumed number of call frames to the "true" caller. + // This is useful when the calling code calls a function which then calls + // stdr (e.g. a logging shim to another API). Values less than zero will + // be treated as zero. + Depth int + + // LogCaller tells stdr to add a "caller" key to some or all log lines. + // Go's log package has options to log this natively, too. + LogCaller MessageClass + + // TODO: add an option to log the date/time +} + +// MessageClass indicates which category or categories of messages to consider. +type MessageClass int + +const ( + // None ignores all message classes. + None MessageClass = iota + // All considers all message classes. + All + // Info only considers info messages. + Info + // Error only considers error messages. + Error +) + +// StdLogger is the subset of the Go stdlib log.Logger API that is needed for +// this adapter. +type StdLogger interface { + // Output is the same as log.Output and log.Logger.Output. + Output(calldepth int, logline string) error +} + +type logger struct { + funcr.Formatter + std StdLogger +} + +var _ logr.LogSink = &logger{} +var _ logr.CallDepthLogSink = &logger{} + +func (l logger) Enabled(level int) bool { + return globalVerbosity >= level +} + +func (l logger) Info(level int, msg string, kvList ...interface{}) { + prefix, args := l.FormatInfo(level, msg, kvList) + if prefix != "" { + args = prefix + ": " + args + } + _ = l.std.Output(l.Formatter.GetDepth()+1, args) +} + +func (l logger) Error(err error, msg string, kvList ...interface{}) { + prefix, args := l.FormatError(err, msg, kvList) + if prefix != "" { + args = prefix + ": " + args + } + _ = l.std.Output(l.Formatter.GetDepth()+1, args) +} + +func (l logger) WithName(name string) logr.LogSink { + l.Formatter.AddName(name) + return &l +} + +func (l logger) WithValues(kvList ...interface{}) logr.LogSink { + l.Formatter.AddValues(kvList) + return &l +} + +func (l logger) WithCallDepth(depth int) logr.LogSink { + l.Formatter.AddCallDepth(depth) + return &l +} + +// Underlier exposes access to the underlying logging implementation. Since +// callers only have a logr.Logger, they have to know which implementation is +// in use, so this interface is less of an abstraction and more of way to test +// type conversion. +type Underlier interface { + GetUnderlying() StdLogger +} + +// GetUnderlying returns the StdLogger underneath this logger. Since StdLogger +// is itself an interface, the result may or may not be a Go log.Logger. +func (l logger) GetUnderlying() StdLogger { + return l.std +} diff --git a/vendor/github.com/go-logr/zapr/.gitignore b/vendor/github.com/go-logr/zapr/.gitignore new file mode 100644 index 000000000..b72f9be20 --- /dev/null +++ b/vendor/github.com/go-logr/zapr/.gitignore @@ -0,0 +1,2 @@ +*~ +*.swp diff --git a/vendor/github.com/go-logr/zapr/.golangci.yaml b/vendor/github.com/go-logr/zapr/.golangci.yaml new file mode 100644 index 000000000..64246c50c --- /dev/null +++ b/vendor/github.com/go-logr/zapr/.golangci.yaml @@ -0,0 +1,20 @@ +issues: + exclude-use-default: false + +linters: + disable-all: true + enable: + - asciicheck + - errcheck + - forcetypeassert + - gocritic + - gofmt + - goimports + - gosimple + - govet + - ineffassign + - misspell + - revive + - staticcheck + - typecheck + - unused diff --git a/vendor/github.com/go-logr/zapr/LICENSE b/vendor/github.com/go-logr/zapr/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/vendor/github.com/go-logr/zapr/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-logr/zapr/README.md b/vendor/github.com/go-logr/zapr/README.md new file mode 100644 index 000000000..ff332da3a --- /dev/null +++ b/vendor/github.com/go-logr/zapr/README.md @@ -0,0 +1,107 @@ +Zapr :zap: +========== + +A [logr](https://github.com/go-logr/logr) implementation using +[Zap](https://github.com/uber-go/zap). Can also be used as +[slog](https://pkg.go.dev/log/slog) handler. + +Usage +----- + +Via logr: + +```go +package main + +import ( + "fmt" + + "go.uber.org/zap" + "github.com/go-logr/logr" + "github.com/go-logr/zapr" +) + +func main() { + var log logr.Logger + + zapLog, err := zap.NewDevelopment() + if err != nil { + panic(fmt.Sprintf("who watches the watchmen (%v)?", err)) + } + log = zapr.NewLogger(zapLog) + + log.Info("Logr in action!", "the answer", 42) +} +``` + +Via slog: + +``` +package main + +import ( + "fmt" + "log/slog" + + "github.com/go-logr/logr/slogr" + "github.com/go-logr/zapr" + "go.uber.org/zap" +) + +func main() { + var log *slog.Logger + + zapLog, err := zap.NewDevelopment() + if err != nil { + panic(fmt.Sprintf("who watches the watchmen (%v)?", err)) + } + log = slog.New(slogr.NewSlogHandler(zapr.NewLogger(zapLog))) + + log.Info("Logr in action!", "the answer", 42) +} +``` + +Increasing Verbosity +-------------------- + +Zap uses semantically named levels for logging (`DebugLevel`, `InfoLevel`, +`WarningLevel`, ...). Logr uses arbitrary numeric levels. By default logr's +`V(0)` is zap's `InfoLevel` and `V(1)` is zap's `DebugLevel` (which is +numerically -1). Zap does not have named levels that are more verbose than +`DebugLevel`, but it's possible to fake it. + +As of zap v1.19.0 you can do something like the following in your setup code: + +```go + zc := zap.NewProductionConfig() + zc.Level = zap.NewAtomicLevelAt(zapcore.Level(-2)) + z, err := zc.Build() + if err != nil { + // ... + } + log := zapr.NewLogger(z) +``` + +Zap's levels get more verbose as the number gets smaller and more important and +the number gets larger (`DebugLevel` is -1, `InfoLevel` is 0, `WarnLevel` is 1, +and so on). + +The `-2` in the above snippet means that `log.V(2).Info()` calls will be active. +`-3` would enable `log.V(3).Info()`, etc. Note that zap's levels are `int8` +which means the most verbose level you can give it is -128. The zapr +implementation will cap `V()` levels greater than 127 to 127, so setting the +zap level to -128 really means "activate all logs". + +Implementation Details +---------------------- + +For the most part, concepts in Zap correspond directly with those in logr. + +Unlike Zap, all fields *must* be in the form of sugared fields -- +it's illegal to pass a strongly-typed Zap field in a key position to any +of the logging methods (`Log`, `Error`). + +The zapr `logr.LogSink` implementation also implements `logr.SlogHandler`. That +enables `slogr.NewSlogHandler` to provide a `slog.Handler` which just passes +parameters through to zapr. zapr handles special slog values (Group, +LogValuer), regardless of which front-end API is used. diff --git a/vendor/github.com/go-logr/zapr/slogzapr.go b/vendor/github.com/go-logr/zapr/slogzapr.go new file mode 100644 index 000000000..84f56e435 --- /dev/null +++ b/vendor/github.com/go-logr/zapr/slogzapr.go @@ -0,0 +1,183 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package zapr + +import ( + "context" + "log/slog" + "runtime" + + "github.com/go-logr/logr/slogr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +var _ slogr.SlogSink = &zapLogger{} + +func (zl *zapLogger) Handle(_ context.Context, record slog.Record) error { + zapLevel := zap.InfoLevel + intLevel := 0 + isError := false + switch { + case record.Level >= slog.LevelError: + zapLevel = zap.ErrorLevel + isError = true + case record.Level >= slog.LevelWarn: + zapLevel = zap.WarnLevel + case record.Level >= 0: + // Already set above -> info. + default: + zapLevel = zapcore.Level(record.Level) + intLevel = int(-zapLevel) + } + + if checkedEntry := zl.l.Check(zapLevel, record.Message); checkedEntry != nil { + checkedEntry.Time = record.Time + checkedEntry.Caller = pcToCallerEntry(record.PC) + var fieldsBuffer [2]zap.Field + fields := fieldsBuffer[:0] + if !isError && zl.numericLevelKey != "" { + // Record verbosity for info entries. + fields = append(fields, zap.Int(zl.numericLevelKey, intLevel)) + } + // Inline all attributes. + fields = append(fields, zap.Inline(zapcore.ObjectMarshalerFunc(func(enc zapcore.ObjectEncoder) error { + record.Attrs(func(attr slog.Attr) bool { + encodeSlog(enc, attr) + return true + }) + return nil + }))) + checkedEntry.Write(fields...) + } + return nil +} + +func encodeSlog(enc zapcore.ObjectEncoder, attr slog.Attr) { + if attr.Equal(slog.Attr{}) { + // Ignore empty attribute. + return + } + + // Check in order of expected frequency, most common ones first. + // + // Usage statistics for parameters from Kubernetes 152876a3e, + // calculated with k/k/test/integration/logs/benchmark: + // + // kube-controller-manager -v10: + // strings: 10043 (85%) + // with API objects: 2 (0% of all arguments) + // types and their number of usage: NodeStatus:2 + // numbers: 792 (6%) + // ObjectRef: 292 (2%) + // others: 595 (5%) + // + // kube-scheduler -v10: + // strings: 1325 (40%) + // with API objects: 109 (3% of all arguments) + // types and their number of usage: PersistentVolume:50 PersistentVolumeClaim:59 + // numbers: 473 (14%) + // ObjectRef: 1305 (39%) + // others: 176 (5%) + + kind := attr.Value.Kind() + switch kind { + case slog.KindString: + enc.AddString(attr.Key, attr.Value.String()) + case slog.KindLogValuer: + // This includes klog.KObj. + encodeSlog(enc, slog.Attr{ + Key: attr.Key, + Value: attr.Value.Resolve(), + }) + case slog.KindInt64: + enc.AddInt64(attr.Key, attr.Value.Int64()) + case slog.KindUint64: + enc.AddUint64(attr.Key, attr.Value.Uint64()) + case slog.KindFloat64: + enc.AddFloat64(attr.Key, attr.Value.Float64()) + case slog.KindBool: + enc.AddBool(attr.Key, attr.Value.Bool()) + case slog.KindDuration: + enc.AddDuration(attr.Key, attr.Value.Duration()) + case slog.KindTime: + enc.AddTime(attr.Key, attr.Value.Time()) + case slog.KindGroup: + attrs := attr.Value.Group() + if attr.Key == "" { + // Inline group. + for _, attr := range attrs { + encodeSlog(enc, attr) + } + return + } + if len(attrs) == 0 { + // Ignore empty group. + return + } + _ = enc.AddObject(attr.Key, marshalAttrs(attrs)) + default: + // We have to go through reflection in zap.Any to get support + // for e.g. fmt.Stringer. + zap.Any(attr.Key, attr.Value.Any()).AddTo(enc) + } +} + +type marshalAttrs []slog.Attr + +func (attrs marshalAttrs) MarshalLogObject(enc zapcore.ObjectEncoder) error { + for _, attr := range attrs { + encodeSlog(enc, attr) + } + return nil +} + +var _ zapcore.ObjectMarshaler = marshalAttrs(nil) + +func pcToCallerEntry(pc uintptr) zapcore.EntryCaller { + if pc == 0 { + return zapcore.EntryCaller{} + } + // Same as https://cs.opensource.google/go/x/exp/+/642cacee:slog/record.go;drc=642cacee5cc05231f45555a333d07f1005ffc287;l=70 + fs := runtime.CallersFrames([]uintptr{pc}) + f, _ := fs.Next() + if f.File == "" { + return zapcore.EntryCaller{} + } + return zapcore.EntryCaller{ + Defined: true, + PC: pc, + File: f.File, + Line: f.Line, + Function: f.Function, + } +} + +func (zl *zapLogger) WithAttrs(attrs []slog.Attr) slogr.SlogSink { + newLogger := *zl + newLogger.l = newLogger.l.With(zap.Inline(marshalAttrs(attrs))) + return &newLogger +} + +func (zl *zapLogger) WithGroup(name string) slogr.SlogSink { + newLogger := *zl + newLogger.l = newLogger.l.With(zap.Namespace(name)) + return &newLogger +} diff --git a/vendor/github.com/go-logr/zapr/zapr.go b/vendor/github.com/go-logr/zapr/zapr.go new file mode 100644 index 000000000..c8503ab9e --- /dev/null +++ b/vendor/github.com/go-logr/zapr/zapr.go @@ -0,0 +1,307 @@ +/* +Copyright 2019 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Copyright 2018 Solly Ross +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package zapr defines an implementation of the github.com/go-logr/logr +// interfaces built on top of Zap (go.uber.org/zap). +// +// # Usage +// +// A new logr.Logger can be constructed from an existing zap.Logger using +// the NewLogger function: +// +// log := zapr.NewLogger(someZapLogger) +// +// # Implementation Details +// +// For the most part, concepts in Zap correspond directly with those in +// logr. +// +// Unlike Zap, all fields *must* be in the form of sugared fields -- +// it's illegal to pass a strongly-typed Zap field in a key position +// to any of the log methods. +// +// Levels in logr correspond to custom debug levels in Zap. Any given level +// in logr is represents by its inverse in zap (`zapLevel = -1*logrLevel`). +// For example V(2) is equivalent to log level -2 in Zap, while V(1) is +// equivalent to Zap's DebugLevel. +package zapr + +import ( + "fmt" + + "github.com/go-logr/logr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +// NB: right now, we always use the equivalent of sugared logging. +// This is necessary, since logr doesn't define non-suggared types, +// and using zap-specific non-suggared types would make uses tied +// directly to Zap. + +// zapLogger is a logr.Logger that uses Zap to log. The level has already been +// converted to a Zap level, which is to say that `logrLevel = -1*zapLevel`. +type zapLogger struct { + // NB: this looks very similar to zap.SugaredLogger, but + // deals with our desire to have multiple verbosity levels. + l *zap.Logger + + // numericLevelKey controls whether the numeric logr level is + // added to each Info log message and with which key. + numericLevelKey string + + // errorKey is the field name used for the error in + // Logger.Error calls. + errorKey string + + // allowZapFields enables logging of strongly-typed Zap + // fields. It is off by default because it breaks + // implementation agnosticism. + allowZapFields bool + + // panicMessages enables log messages for invalid log calls + // that explain why a call was invalid (for example, + // non-string key). This is enabled by default. + panicMessages bool +} + +const ( + // noLevel tells handleFields to not inject a numeric log level field. + noLevel = -1 +) + +// handleFields converts a bunch of arbitrary key-value pairs into Zap fields. It takes +// additional pre-converted Zap fields, for use with automatically attached fields, like +// `error`. +func (zl *zapLogger) handleFields(lvl int, args []interface{}, additional ...zap.Field) []zap.Field { + injectNumericLevel := zl.numericLevelKey != "" && lvl != noLevel + + // a slightly modified version of zap.SugaredLogger.sweetenFields + if len(args) == 0 { + // fast-return if we have no suggared fields and no "v" field. + if !injectNumericLevel { + return additional + } + // Slightly slower fast path when we need to inject "v". + return append(additional, zap.Int(zl.numericLevelKey, lvl)) + } + + // unlike Zap, we can be pretty sure users aren't passing structured + // fields (since logr has no concept of that), so guess that we need a + // little less space. + numFields := len(args)/2 + len(additional) + if injectNumericLevel { + numFields++ + } + fields := make([]zap.Field, 0, numFields) + if injectNumericLevel { + fields = append(fields, zap.Int(zl.numericLevelKey, lvl)) + } + for i := 0; i < len(args); { + // Check just in case for strongly-typed Zap fields, + // which might be illegal (since it breaks + // implementation agnosticism). If disabled, we can + // give a better error message. + if field, ok := args[i].(zap.Field); ok { + if zl.allowZapFields { + fields = append(fields, field) + i++ + continue + } + if zl.panicMessages { + zl.l.WithOptions(zap.AddCallerSkip(1)).DPanic("strongly-typed Zap Field passed to logr", zapIt("zap field", args[i])) + } + break + } + + // make sure this isn't a mismatched key + if i == len(args)-1 { + if zl.panicMessages { + zl.l.WithOptions(zap.AddCallerSkip(1)).DPanic("odd number of arguments passed as key-value pairs for logging", zapIt("ignored key", args[i])) + } + break + } + + // process a key-value pair, + // ensuring that the key is a string + key, val := args[i], args[i+1] + keyStr, isString := key.(string) + if !isString { + // if the key isn't a string, DPanic and stop logging + if zl.panicMessages { + zl.l.WithOptions(zap.AddCallerSkip(1)).DPanic("non-string key argument passed to logging, ignoring all later arguments", zapIt("invalid key", key)) + } + break + } + + fields = append(fields, zapIt(keyStr, val)) + i += 2 + } + + return append(fields, additional...) +} + +func invokeMarshaler(field string, m logr.Marshaler) (f string, ret interface{}) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("PANIC=%s", r) + f = field + "Error" + } + }() + return field, m.MarshalLog() +} + +func (zl *zapLogger) Init(ri logr.RuntimeInfo) { + zl.l = zl.l.WithOptions(zap.AddCallerSkip(ri.CallDepth)) +} + +// Zap levels are int8 - make sure we stay in bounds. logr itself should +// ensure we never get negative values. +func toZapLevel(lvl int) zapcore.Level { + if lvl > 127 { + lvl = 127 + } + // zap levels are inverted. + return 0 - zapcore.Level(lvl) +} + +func (zl zapLogger) Enabled(lvl int) bool { + return zl.l.Core().Enabled(toZapLevel(lvl)) +} + +func (zl *zapLogger) Info(lvl int, msg string, keysAndVals ...interface{}) { + if checkedEntry := zl.l.Check(toZapLevel(lvl), msg); checkedEntry != nil { + checkedEntry.Write(zl.handleFields(lvl, keysAndVals)...) + } +} + +func (zl *zapLogger) Error(err error, msg string, keysAndVals ...interface{}) { + if checkedEntry := zl.l.Check(zap.ErrorLevel, msg); checkedEntry != nil { + checkedEntry.Write(zl.handleFields(noLevel, keysAndVals, zap.NamedError(zl.errorKey, err))...) + } +} + +func (zl *zapLogger) WithValues(keysAndValues ...interface{}) logr.LogSink { + newLogger := *zl + newLogger.l = zl.l.With(zl.handleFields(noLevel, keysAndValues)...) + return &newLogger +} + +func (zl *zapLogger) WithName(name string) logr.LogSink { + newLogger := *zl + newLogger.l = zl.l.Named(name) + return &newLogger +} + +func (zl *zapLogger) WithCallDepth(depth int) logr.LogSink { + newLogger := *zl + newLogger.l = zl.l.WithOptions(zap.AddCallerSkip(depth)) + return &newLogger +} + +// Underlier exposes access to the underlying logging implementation. Since +// callers only have a logr.Logger, they have to know which implementation is +// in use, so this interface is less of an abstraction and more of way to test +// type conversion. +type Underlier interface { + GetUnderlying() *zap.Logger +} + +func (zl *zapLogger) GetUnderlying() *zap.Logger { + return zl.l +} + +// NewLogger creates a new logr.Logger using the given Zap Logger to log. +func NewLogger(l *zap.Logger) logr.Logger { + return NewLoggerWithOptions(l) +} + +// NewLoggerWithOptions creates a new logr.Logger using the given Zap Logger to +// log and applies additional options. +func NewLoggerWithOptions(l *zap.Logger, opts ...Option) logr.Logger { + // creates a new logger skipping one level of callstack + log := l.WithOptions(zap.AddCallerSkip(1)) + zl := &zapLogger{ + l: log, + } + zl.errorKey = "error" + zl.panicMessages = true + for _, option := range opts { + option(zl) + } + return logr.New(zl) +} + +// Option is one additional parameter for NewLoggerWithOptions. +type Option func(*zapLogger) + +// LogInfoLevel controls whether a numeric log level is added to +// Info log message. The empty string disables this, a non-empty +// string is the key for the additional field. Errors and +// internal panic messages do not have a log level and thus +// are always logged without this extra field. +func LogInfoLevel(key string) Option { + return func(zl *zapLogger) { + zl.numericLevelKey = key + } +} + +// ErrorKey replaces the default "error" field name used for the error +// in Logger.Error calls. +func ErrorKey(key string) Option { + return func(zl *zapLogger) { + zl.errorKey = key + } +} + +// AllowZapFields controls whether strongly-typed Zap fields may +// be passed instead of a key/value pair. This is disabled by +// default because it breaks implementation agnosticism. +func AllowZapFields(allowed bool) Option { + return func(zl *zapLogger) { + zl.allowZapFields = allowed + } +} + +// DPanicOnBugs controls whether extra log messages are emitted for +// invalid log calls with zap's DPanic method. Depending on the +// configuration of the zap logger, the program then panics after +// emitting the log message which is useful in development because +// such invalid log calls are bugs in the program. The log messages +// explain why a call was invalid (for example, non-string +// key). Emitting them is enabled by default. +func DPanicOnBugs(enabled bool) Option { + return func(zl *zapLogger) { + zl.panicMessages = enabled + } +} + +var _ logr.LogSink = &zapLogger{} +var _ logr.CallDepthLogSink = &zapLogger{} diff --git a/vendor/github.com/go-logr/zapr/zapr_noslog.go b/vendor/github.com/go-logr/zapr/zapr_noslog.go new file mode 100644 index 000000000..ec8517b79 --- /dev/null +++ b/vendor/github.com/go-logr/zapr/zapr_noslog.go @@ -0,0 +1,34 @@ +//go:build !go1.21 +// +build !go1.21 + +/* +Copyright 2023 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package zapr + +import ( + "github.com/go-logr/logr" + "go.uber.org/zap" +) + +func zapIt(field string, val interface{}) zap.Field { + // Handle types that implement logr.Marshaler: log the replacement + // object instead of the original one. + if marshaler, ok := val.(logr.Marshaler); ok { + field, val = invokeMarshaler(field, marshaler) + } + return zap.Any(field, val) +} diff --git a/vendor/github.com/go-logr/zapr/zapr_slog.go b/vendor/github.com/go-logr/zapr/zapr_slog.go new file mode 100644 index 000000000..f07203604 --- /dev/null +++ b/vendor/github.com/go-logr/zapr/zapr_slog.go @@ -0,0 +1,48 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package zapr + +import ( + "log/slog" + + "github.com/go-logr/logr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +func zapIt(field string, val interface{}) zap.Field { + switch valTyped := val.(type) { + case logr.Marshaler: + // Handle types that implement logr.Marshaler: log the replacement + // object instead of the original one. + field, val = invokeMarshaler(field, valTyped) + case slog.LogValuer: + // The same for slog.LogValuer. We let slog.Value handle + // potential panics and recursion. + val = slog.AnyValue(val).Resolve() + } + if slogValue, ok := val.(slog.Value); ok { + return zap.Inline(zapcore.ObjectMarshalerFunc(func(enc zapcore.ObjectEncoder) error { + encodeSlog(enc, slog.Attr{Key: field, Value: slogValue}) + return nil + })) + } + return zap.Any(field, val) +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/.editorconfig b/vendor/github.com/go-task/slim-sprig/v3/.editorconfig new file mode 100644 index 000000000..b0c95367e --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org + +root = true + +[*] +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true +indent_style = tab +indent_size = 8 + +[*.{md,yml,yaml,json}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-task/slim-sprig/v3/.gitattributes b/vendor/github.com/go-task/slim-sprig/v3/.gitattributes new file mode 100644 index 000000000..176a458f9 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/vendor/github.com/go-task/slim-sprig/v3/.gitignore b/vendor/github.com/go-task/slim-sprig/v3/.gitignore new file mode 100644 index 000000000..5e3002f88 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/.gitignore @@ -0,0 +1,2 @@ +vendor/ +/.glide diff --git a/vendor/github.com/go-task/slim-sprig/v3/CHANGELOG.md b/vendor/github.com/go-task/slim-sprig/v3/CHANGELOG.md new file mode 100644 index 000000000..2ce45dd4e --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/CHANGELOG.md @@ -0,0 +1,383 @@ +# Changelog + +## Release 3.2.3 (2022-11-29) + +### Changed + +- Updated docs (thanks @book987 @aJetHorn @neelayu @pellizzetti @apricote @SaigyoujiYuyuko233 @AlekSi) +- #348: Updated huandu/xstrings which fixed a snake case bug (thanks @yxxhero) +- #353: Updated masterminds/semver which included bug fixes +- #354: Updated golang.org/x/crypto which included bug fixes + +## Release 3.2.2 (2021-02-04) + +This is a re-release of 3.2.1 to satisfy something with the Go module system. + +## Release 3.2.1 (2021-02-04) + +### Changed + +- Upgraded `Masterminds/goutils` to `v1.1.1`. see the [Security Advisory](https://github.com/Masterminds/goutils/security/advisories/GHSA-xg2h-wx96-xgxr) + +## Release 3.2.0 (2020-12-14) + +### Added + +- #211: Added randInt function (thanks @kochurovro) +- #223: Added fromJson and mustFromJson functions (thanks @mholt) +- #242: Added a bcrypt function (thanks @robbiet480) +- #253: Added randBytes function (thanks @MikaelSmith) +- #254: Added dig function for dicts (thanks @nyarly) +- #257: Added regexQuoteMeta for quoting regex metadata (thanks @rheaton) +- #261: Added filepath functions osBase, osDir, osExt, osClean, osIsAbs (thanks @zugl) +- #268: Added and and all functions for testing conditions (thanks @phuslu) +- #181: Added float64 arithmetic addf, add1f, subf, divf, mulf, maxf, and minf + (thanks @andrewmostello) +- #265: Added chunk function to split array into smaller arrays (thanks @karelbilek) +- #270: Extend certificate functions to handle non-RSA keys + add support for + ed25519 keys (thanks @misberner) + +### Changed + +- Removed testing and support for Go 1.12. ed25519 support requires Go 1.13 or newer +- Using semver 3.1.1 and mergo 0.3.11 + +### Fixed + +- #249: Fix htmlDateInZone example (thanks @spawnia) + +NOTE: The dependency github.com/imdario/mergo reverted the breaking change in +0.3.9 via 0.3.10 release. + +## Release 3.1.0 (2020-04-16) + +NOTE: The dependency github.com/imdario/mergo made a behavior change in 0.3.9 +that impacts sprig functionality. Do not use sprig with a version newer than 0.3.8. + +### Added + +- #225: Added support for generating htpasswd hash (thanks @rustycl0ck) +- #224: Added duration filter (thanks @frebib) +- #205: Added `seq` function (thanks @thadc23) + +### Changed + +- #203: Unlambda functions with correct signature (thanks @muesli) +- #236: Updated the license formatting for GitHub display purposes +- #238: Updated package dependency versions. Note, mergo not updated to 0.3.9 + as it causes a breaking change for sprig. That issue is tracked at + https://github.com/imdario/mergo/issues/139 + +### Fixed + +- #229: Fix `seq` example in docs (thanks @kalmant) + +## Release 3.0.2 (2019-12-13) + +### Fixed + +- #220: Updating to semver v3.0.3 to fix issue with <= ranges +- #218: fix typo elyptical->elliptic in ecdsa key description (thanks @laverya) + +## Release 3.0.1 (2019-12-08) + +### Fixed + +- #212: Updated semver fixing broken constraint checking with ^0.0 + +## Release 3.0.0 (2019-10-02) + +### Added + +- #187: Added durationRound function (thanks @yjp20) +- #189: Added numerous template functions that return errors rather than panic (thanks @nrvnrvn) +- #193: Added toRawJson support (thanks @Dean-Coakley) +- #197: Added get support to dicts (thanks @Dean-Coakley) + +### Changed + +- #186: Moving dependency management to Go modules +- #186: Updated semver to v3. This has changes in the way ^ is handled +- #194: Updated documentation on merging and how it copies. Added example using deepCopy +- #196: trunc now supports negative values (thanks @Dean-Coakley) + +## Release 2.22.0 (2019-10-02) + +### Added + +- #173: Added getHostByName function to resolve dns names to ips (thanks @fcgravalos) +- #195: Added deepCopy function for use with dicts + +### Changed + +- Updated merge and mergeOverwrite documentation to explain copying and how to + use deepCopy with it + +## Release 2.21.0 (2019-09-18) + +### Added + +- #122: Added encryptAES/decryptAES functions (thanks @n0madic) +- #128: Added toDecimal support (thanks @Dean-Coakley) +- #169: Added list contcat (thanks @astorath) +- #174: Added deepEqual function (thanks @bonifaido) +- #170: Added url parse and join functions (thanks @astorath) + +### Changed + +- #171: Updated glide config for Google UUID to v1 and to add ranges to semver and testify + +### Fixed + +- #172: Fix semver wildcard example (thanks @piepmatz) +- #175: Fix dateInZone doc example (thanks @s3than) + +## Release 2.20.0 (2019-06-18) + +### Added + +- #164: Adding function to get unix epoch for a time (@mattfarina) +- #166: Adding tests for date_in_zone (@mattfarina) + +### Changed + +- #144: Fix function comments based on best practices from Effective Go (@CodeLingoTeam) +- #150: Handles pointer type for time.Time in "htmlDate" (@mapreal19) +- #161, #157, #160, #153, #158, #156, #155, #159, #152 documentation updates (@badeadan) + +### Fixed + +## Release 2.19.0 (2019-03-02) + +IMPORTANT: This release reverts a change from 2.18.0 + +In the previous release (2.18), we prematurely merged a partial change to the crypto functions that led to creating two sets of crypto functions (I blame @technosophos -- since that's me). This release rolls back that change, and does what was originally intended: It alters the existing crypto functions to use secure random. + +We debated whether this classifies as a change worthy of major revision, but given the proximity to the last release, we have decided that treating 2.18 as a faulty release is the correct course of action. We apologize for any inconvenience. + +### Changed + +- Fix substr panic 35fb796 (Alexey igrychev) +- Remove extra period 1eb7729 (Matthew Lorimor) +- Make random string functions use crypto by default 6ceff26 (Matthew Lorimor) +- README edits/fixes/suggestions 08fe136 (Lauri Apple) + + +## Release 2.18.0 (2019-02-12) + +### Added + +- Added mergeOverwrite function +- cryptographic functions that use secure random (see fe1de12) + +### Changed + +- Improve documentation of regexMatch function, resolves #139 90b89ce (Jan Tagscherer) +- Handle has for nil list 9c10885 (Daniel Cohen) +- Document behaviour of mergeOverwrite fe0dbe9 (Lukas Rieder) +- doc: adds missing documentation. 4b871e6 (Fernandez Ludovic) +- Replace outdated goutils imports 01893d2 (Matthew Lorimor) +- Surface crypto secure random strings from goutils fe1de12 (Matthew Lorimor) +- Handle untyped nil values as paramters to string functions 2b2ec8f (Morten Torkildsen) + +### Fixed + +- Fix dict merge issue and provide mergeOverwrite .dst .src1 to overwrite from src -> dst 4c59c12 (Lukas Rieder) +- Fix substr var names and comments d581f80 (Dean Coakley) +- Fix substr documentation 2737203 (Dean Coakley) + +## Release 2.17.1 (2019-01-03) + +### Fixed + +The 2.17.0 release did not have a version pinned for xstrings, which caused compilation failures when xstrings < 1.2 was used. This adds the correct version string to glide.yaml. + +## Release 2.17.0 (2019-01-03) + +### Added + +- adds alder32sum function and test 6908fc2 (marshallford) +- Added kebabcase function ca331a1 (Ilyes512) + +### Changed + +- Update goutils to 1.1.0 4e1125d (Matt Butcher) + +### Fixed + +- Fix 'has' documentation e3f2a85 (dean-coakley) +- docs(dict): fix typo in pick example dc424f9 (Dustin Specker) +- fixes spelling errors... not sure how that happened 4cf188a (marshallford) + +## Release 2.16.0 (2018-08-13) + +### Added + +- add splitn function fccb0b0 (Helgi Þorbjörnsson) +- Add slice func df28ca7 (gongdo) +- Generate serial number a3bdffd (Cody Coons) +- Extract values of dict with values function df39312 (Lawrence Jones) + +### Changed + +- Modify panic message for list.slice ae38335 (gongdo) +- Minor improvement in code quality - Removed an unreachable piece of code at defaults.go#L26:6 - Resolve formatting issues. 5834241 (Abhishek Kashyap) +- Remove duplicated documentation 1d97af1 (Matthew Fisher) +- Test on go 1.11 49df809 (Helgi Þormar Þorbjörnsson) + +### Fixed + +- Fix file permissions c5f40b5 (gongdo) +- Fix example for buildCustomCert 7779e0d (Tin Lam) + +## Release 2.15.0 (2018-04-02) + +### Added + +- #68 and #69: Add json helpers to docs (thanks @arunvelsriram) +- #66: Add ternary function (thanks @binoculars) +- #67: Allow keys function to take multiple dicts (thanks @binoculars) +- #89: Added sha1sum to crypto function (thanks @benkeil) +- #81: Allow customizing Root CA that used by genSignedCert (thanks @chenzhiwei) +- #92: Add travis testing for go 1.10 +- #93: Adding appveyor config for windows testing + +### Changed + +- #90: Updating to more recent dependencies +- #73: replace satori/go.uuid with google/uuid (thanks @petterw) + +### Fixed + +- #76: Fixed documentation typos (thanks @Thiht) +- Fixed rounding issue on the `ago` function. Note, the removes support for Go 1.8 and older + +## Release 2.14.1 (2017-12-01) + +### Fixed + +- #60: Fix typo in function name documentation (thanks @neil-ca-moore) +- #61: Removing line with {{ due to blocking github pages genertion +- #64: Update the list functions to handle int, string, and other slices for compatibility + +## Release 2.14.0 (2017-10-06) + +This new version of Sprig adds a set of functions for generating and working with SSL certificates. + +- `genCA` generates an SSL Certificate Authority +- `genSelfSignedCert` generates an SSL self-signed certificate +- `genSignedCert` generates an SSL certificate and key based on a given CA + +## Release 2.13.0 (2017-09-18) + +This release adds new functions, including: + +- `regexMatch`, `regexFindAll`, `regexFind`, `regexReplaceAll`, `regexReplaceAllLiteral`, and `regexSplit` to work with regular expressions +- `floor`, `ceil`, and `round` math functions +- `toDate` converts a string to a date +- `nindent` is just like `indent` but also prepends a new line +- `ago` returns the time from `time.Now` + +### Added + +- #40: Added basic regex functionality (thanks @alanquillin) +- #41: Added ceil floor and round functions (thanks @alanquillin) +- #48: Added toDate function (thanks @andreynering) +- #50: Added nindent function (thanks @binoculars) +- #46: Added ago function (thanks @slayer) + +### Changed + +- #51: Updated godocs to include new string functions (thanks @curtisallen) +- #49: Added ability to merge multiple dicts (thanks @binoculars) + +## Release 2.12.0 (2017-05-17) + +- `snakecase`, `camelcase`, and `shuffle` are three new string functions +- `fail` allows you to bail out of a template render when conditions are not met + +## Release 2.11.0 (2017-05-02) + +- Added `toJson` and `toPrettyJson` +- Added `merge` +- Refactored documentation + +## Release 2.10.0 (2017-03-15) + +- Added `semver` and `semverCompare` for Semantic Versions +- `list` replaces `tuple` +- Fixed issue with `join` +- Added `first`, `last`, `intial`, `rest`, `prepend`, `append`, `toString`, `toStrings`, `sortAlpha`, `reverse`, `coalesce`, `pluck`, `pick`, `compact`, `keys`, `omit`, `uniq`, `has`, `without` + +## Release 2.9.0 (2017-02-23) + +- Added `splitList` to split a list +- Added crypto functions of `genPrivateKey` and `derivePassword` + +## Release 2.8.0 (2016-12-21) + +- Added access to several path functions (`base`, `dir`, `clean`, `ext`, and `abs`) +- Added functions for _mutating_ dictionaries (`set`, `unset`, `hasKey`) + +## Release 2.7.0 (2016-12-01) + +- Added `sha256sum` to generate a hash of an input +- Added functions to convert a numeric or string to `int`, `int64`, `float64` + +## Release 2.6.0 (2016-10-03) + +- Added a `uuidv4` template function for generating UUIDs inside of a template. + +## Release 2.5.0 (2016-08-19) + +- New `trimSuffix`, `trimPrefix`, `hasSuffix`, and `hasPrefix` functions +- New aliases have been added for a few functions that didn't follow the naming conventions (`trimAll` and `abbrevBoth`) +- `trimall` and `abbrevboth` (notice the case) are deprecated and will be removed in 3.0.0 + +## Release 2.4.0 (2016-08-16) + +- Adds two functions: `until` and `untilStep` + +## Release 2.3.0 (2016-06-21) + +- cat: Concatenate strings with whitespace separators. +- replace: Replace parts of a string: `replace " " "-" "Me First"` renders "Me-First" +- plural: Format plurals: `len "foo" | plural "one foo" "many foos"` renders "many foos" +- indent: Indent blocks of text in a way that is sensitive to "\n" characters. + +## Release 2.2.0 (2016-04-21) + +- Added a `genPrivateKey` function (Thanks @bacongobbler) + +## Release 2.1.0 (2016-03-30) + +- `default` now prints the default value when it does not receive a value down the pipeline. It is much safer now to do `{{.Foo | default "bar"}}`. +- Added accessors for "hermetic" functions. These return only functions that, when given the same input, produce the same output. + +## Release 2.0.0 (2016-03-29) + +Because we switched from `int` to `int64` as the return value for all integer math functions, the library's major version number has been incremented. + +- `min` complements `max` (formerly `biggest`) +- `empty` indicates that a value is the empty value for its type +- `tuple` creates a tuple inside of a template: `{{$t := tuple "a", "b" "c"}}` +- `dict` creates a dictionary inside of a template `{{$d := dict "key1" "val1" "key2" "val2"}}` +- Date formatters have been added for HTML dates (as used in `date` input fields) +- Integer math functions can convert from a number of types, including `string` (via `strconv.ParseInt`). + +## Release 1.2.0 (2016-02-01) + +- Added quote and squote +- Added b32enc and b32dec +- add now takes varargs +- biggest now takes varargs + +## Release 1.1.0 (2015-12-29) + +- Added #4: Added contains function. strings.Contains, but with the arguments + switched to simplify common pipelines. (thanks krancour) +- Added Travis-CI testing support + +## Release 1.0.0 (2015-12-23) + +- Initial release diff --git a/vendor/github.com/go-task/slim-sprig/v3/LICENSE.txt b/vendor/github.com/go-task/slim-sprig/v3/LICENSE.txt new file mode 100644 index 000000000..f311b1eaa --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013-2020 Masterminds + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/go-task/slim-sprig/v3/README.md b/vendor/github.com/go-task/slim-sprig/v3/README.md new file mode 100644 index 000000000..b5ab56425 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/README.md @@ -0,0 +1,73 @@ +# Slim-Sprig: Template functions for Go templates [![Go Reference](https://pkg.go.dev/badge/github.com/go-task/slim-sprig/v3.svg)](https://pkg.go.dev/github.com/go-task/slim-sprig/v3) + +Slim-Sprig is a fork of [Sprig](https://github.com/Masterminds/sprig), but with +all functions that depend on external (non standard library) or crypto packages +removed. +The reason for this is to make this library more lightweight. Most of these +functions (specially crypto ones) are not needed on most apps, but costs a lot +in terms of binary size and compilation time. + +## Usage + +**Template developers**: Please use Slim-Sprig's [function documentation](https://go-task.github.io/slim-sprig/) for +detailed instructions and code snippets for the >100 template functions available. + +**Go developers**: If you'd like to include Slim-Sprig as a library in your program, +our API documentation is available [at GoDoc.org](http://godoc.org/github.com/go-task/slim-sprig). + +For standard usage, read on. + +### Load the Slim-Sprig library + +To load the Slim-Sprig `FuncMap`: + +```go + +import ( + "html/template" + + "github.com/go-task/slim-sprig" +) + +// This example illustrates that the FuncMap *must* be set before the +// templates themselves are loaded. +tpl := template.Must( + template.New("base").Funcs(sprig.FuncMap()).ParseGlob("*.html") +) +``` + +### Calling the functions inside of templates + +By convention, all functions are lowercase. This seems to follow the Go +idiom for template functions (as opposed to template methods, which are +TitleCase). For example, this: + +``` +{{ "hello!" | upper | repeat 5 }} +``` + +produces this: + +``` +HELLO!HELLO!HELLO!HELLO!HELLO! +``` + +## Principles Driving Our Function Selection + +We followed these principles to decide which functions to add and how to implement them: + +- Use template functions to build layout. The following + types of operations are within the domain of template functions: + - Formatting + - Layout + - Simple type conversions + - Utilities that assist in handling common formatting and layout needs (e.g. arithmetic) +- Template functions should not return errors unless there is no way to print + a sensible value. For example, converting a string to an integer should not + produce an error if conversion fails. Instead, it should display a default + value. +- Simple math is necessary for grid layouts, pagers, and so on. Complex math + (anything other than arithmetic) should be done outside of templates. +- Template functions only deal with the data passed into them. They never retrieve + data from a source. +- Finally, do not override core Go template functions. diff --git a/vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml b/vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml new file mode 100644 index 000000000..8e6346bb1 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml @@ -0,0 +1,12 @@ +# https://taskfile.dev + +version: '3' + +tasks: + default: + cmds: + - task: test + + test: + cmds: + - go test -v . diff --git a/vendor/github.com/go-task/slim-sprig/v3/crypto.go b/vendor/github.com/go-task/slim-sprig/v3/crypto.go new file mode 100644 index 000000000..d06e516d4 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/crypto.go @@ -0,0 +1,24 @@ +package sprig + +import ( + "crypto/sha1" + "crypto/sha256" + "encoding/hex" + "fmt" + "hash/adler32" +) + +func sha256sum(input string) string { + hash := sha256.Sum256([]byte(input)) + return hex.EncodeToString(hash[:]) +} + +func sha1sum(input string) string { + hash := sha1.Sum([]byte(input)) + return hex.EncodeToString(hash[:]) +} + +func adler32sum(input string) string { + hash := adler32.Checksum([]byte(input)) + return fmt.Sprintf("%d", hash) +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/date.go b/vendor/github.com/go-task/slim-sprig/v3/date.go new file mode 100644 index 000000000..ed022ddac --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/date.go @@ -0,0 +1,152 @@ +package sprig + +import ( + "strconv" + "time" +) + +// Given a format and a date, format the date string. +// +// Date can be a `time.Time` or an `int, int32, int64`. +// In the later case, it is treated as seconds since UNIX +// epoch. +func date(fmt string, date interface{}) string { + return dateInZone(fmt, date, "Local") +} + +func htmlDate(date interface{}) string { + return dateInZone("2006-01-02", date, "Local") +} + +func htmlDateInZone(date interface{}, zone string) string { + return dateInZone("2006-01-02", date, zone) +} + +func dateInZone(fmt string, date interface{}, zone string) string { + var t time.Time + switch date := date.(type) { + default: + t = time.Now() + case time.Time: + t = date + case *time.Time: + t = *date + case int64: + t = time.Unix(date, 0) + case int: + t = time.Unix(int64(date), 0) + case int32: + t = time.Unix(int64(date), 0) + } + + loc, err := time.LoadLocation(zone) + if err != nil { + loc, _ = time.LoadLocation("UTC") + } + + return t.In(loc).Format(fmt) +} + +func dateModify(fmt string, date time.Time) time.Time { + d, err := time.ParseDuration(fmt) + if err != nil { + return date + } + return date.Add(d) +} + +func mustDateModify(fmt string, date time.Time) (time.Time, error) { + d, err := time.ParseDuration(fmt) + if err != nil { + return time.Time{}, err + } + return date.Add(d), nil +} + +func dateAgo(date interface{}) string { + var t time.Time + + switch date := date.(type) { + default: + t = time.Now() + case time.Time: + t = date + case int64: + t = time.Unix(date, 0) + case int: + t = time.Unix(int64(date), 0) + } + // Drop resolution to seconds + duration := time.Since(t).Round(time.Second) + return duration.String() +} + +func duration(sec interface{}) string { + var n int64 + switch value := sec.(type) { + default: + n = 0 + case string: + n, _ = strconv.ParseInt(value, 10, 64) + case int64: + n = value + } + return (time.Duration(n) * time.Second).String() +} + +func durationRound(duration interface{}) string { + var d time.Duration + switch duration := duration.(type) { + default: + d = 0 + case string: + d, _ = time.ParseDuration(duration) + case int64: + d = time.Duration(duration) + case time.Time: + d = time.Since(duration) + } + + u := uint64(d) + neg := d < 0 + if neg { + u = -u + } + + var ( + year = uint64(time.Hour) * 24 * 365 + month = uint64(time.Hour) * 24 * 30 + day = uint64(time.Hour) * 24 + hour = uint64(time.Hour) + minute = uint64(time.Minute) + second = uint64(time.Second) + ) + switch { + case u > year: + return strconv.FormatUint(u/year, 10) + "y" + case u > month: + return strconv.FormatUint(u/month, 10) + "mo" + case u > day: + return strconv.FormatUint(u/day, 10) + "d" + case u > hour: + return strconv.FormatUint(u/hour, 10) + "h" + case u > minute: + return strconv.FormatUint(u/minute, 10) + "m" + case u > second: + return strconv.FormatUint(u/second, 10) + "s" + } + return "0s" +} + +func toDate(fmt, str string) time.Time { + t, _ := time.ParseInLocation(fmt, str, time.Local) + return t +} + +func mustToDate(fmt, str string) (time.Time, error) { + return time.ParseInLocation(fmt, str, time.Local) +} + +func unixEpoch(date time.Time) string { + return strconv.FormatInt(date.Unix(), 10) +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/defaults.go b/vendor/github.com/go-task/slim-sprig/v3/defaults.go new file mode 100644 index 000000000..b9f979666 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/defaults.go @@ -0,0 +1,163 @@ +package sprig + +import ( + "bytes" + "encoding/json" + "math/rand" + "reflect" + "strings" + "time" +) + +func init() { + rand.Seed(time.Now().UnixNano()) +} + +// dfault checks whether `given` is set, and returns default if not set. +// +// This returns `d` if `given` appears not to be set, and `given` otherwise. +// +// For numeric types 0 is unset. +// For strings, maps, arrays, and slices, len() = 0 is considered unset. +// For bool, false is unset. +// Structs are never considered unset. +// +// For everything else, including pointers, a nil value is unset. +func dfault(d interface{}, given ...interface{}) interface{} { + + if empty(given) || empty(given[0]) { + return d + } + return given[0] +} + +// empty returns true if the given value has the zero value for its type. +func empty(given interface{}) bool { + g := reflect.ValueOf(given) + if !g.IsValid() { + return true + } + + // Basically adapted from text/template.isTrue + switch g.Kind() { + default: + return g.IsNil() + case reflect.Array, reflect.Slice, reflect.Map, reflect.String: + return g.Len() == 0 + case reflect.Bool: + return !g.Bool() + case reflect.Complex64, reflect.Complex128: + return g.Complex() == 0 + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return g.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return g.Uint() == 0 + case reflect.Float32, reflect.Float64: + return g.Float() == 0 + case reflect.Struct: + return false + } +} + +// coalesce returns the first non-empty value. +func coalesce(v ...interface{}) interface{} { + for _, val := range v { + if !empty(val) { + return val + } + } + return nil +} + +// all returns true if empty(x) is false for all values x in the list. +// If the list is empty, return true. +func all(v ...interface{}) bool { + for _, val := range v { + if empty(val) { + return false + } + } + return true +} + +// any returns true if empty(x) is false for any x in the list. +// If the list is empty, return false. +func any(v ...interface{}) bool { + for _, val := range v { + if !empty(val) { + return true + } + } + return false +} + +// fromJson decodes JSON into a structured value, ignoring errors. +func fromJson(v string) interface{} { + output, _ := mustFromJson(v) + return output +} + +// mustFromJson decodes JSON into a structured value, returning errors. +func mustFromJson(v string) (interface{}, error) { + var output interface{} + err := json.Unmarshal([]byte(v), &output) + return output, err +} + +// toJson encodes an item into a JSON string +func toJson(v interface{}) string { + output, _ := json.Marshal(v) + return string(output) +} + +func mustToJson(v interface{}) (string, error) { + output, err := json.Marshal(v) + if err != nil { + return "", err + } + return string(output), nil +} + +// toPrettyJson encodes an item into a pretty (indented) JSON string +func toPrettyJson(v interface{}) string { + output, _ := json.MarshalIndent(v, "", " ") + return string(output) +} + +func mustToPrettyJson(v interface{}) (string, error) { + output, err := json.MarshalIndent(v, "", " ") + if err != nil { + return "", err + } + return string(output), nil +} + +// toRawJson encodes an item into a JSON string with no escaping of HTML characters. +func toRawJson(v interface{}) string { + output, err := mustToRawJson(v) + if err != nil { + panic(err) + } + return string(output) +} + +// mustToRawJson encodes an item into a JSON string with no escaping of HTML characters. +func mustToRawJson(v interface{}) (string, error) { + buf := new(bytes.Buffer) + enc := json.NewEncoder(buf) + enc.SetEscapeHTML(false) + err := enc.Encode(&v) + if err != nil { + return "", err + } + return strings.TrimSuffix(buf.String(), "\n"), nil +} + +// ternary returns the first value if the last value is true, otherwise returns the second value. +func ternary(vt interface{}, vf interface{}, v bool) interface{} { + if v { + return vt + } + + return vf +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/dict.go b/vendor/github.com/go-task/slim-sprig/v3/dict.go new file mode 100644 index 000000000..77ebc61b1 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/dict.go @@ -0,0 +1,118 @@ +package sprig + +func get(d map[string]interface{}, key string) interface{} { + if val, ok := d[key]; ok { + return val + } + return "" +} + +func set(d map[string]interface{}, key string, value interface{}) map[string]interface{} { + d[key] = value + return d +} + +func unset(d map[string]interface{}, key string) map[string]interface{} { + delete(d, key) + return d +} + +func hasKey(d map[string]interface{}, key string) bool { + _, ok := d[key] + return ok +} + +func pluck(key string, d ...map[string]interface{}) []interface{} { + res := []interface{}{} + for _, dict := range d { + if val, ok := dict[key]; ok { + res = append(res, val) + } + } + return res +} + +func keys(dicts ...map[string]interface{}) []string { + k := []string{} + for _, dict := range dicts { + for key := range dict { + k = append(k, key) + } + } + return k +} + +func pick(dict map[string]interface{}, keys ...string) map[string]interface{} { + res := map[string]interface{}{} + for _, k := range keys { + if v, ok := dict[k]; ok { + res[k] = v + } + } + return res +} + +func omit(dict map[string]interface{}, keys ...string) map[string]interface{} { + res := map[string]interface{}{} + + omit := make(map[string]bool, len(keys)) + for _, k := range keys { + omit[k] = true + } + + for k, v := range dict { + if _, ok := omit[k]; !ok { + res[k] = v + } + } + return res +} + +func dict(v ...interface{}) map[string]interface{} { + dict := map[string]interface{}{} + lenv := len(v) + for i := 0; i < lenv; i += 2 { + key := strval(v[i]) + if i+1 >= lenv { + dict[key] = "" + continue + } + dict[key] = v[i+1] + } + return dict +} + +func values(dict map[string]interface{}) []interface{} { + values := []interface{}{} + for _, value := range dict { + values = append(values, value) + } + + return values +} + +func dig(ps ...interface{}) (interface{}, error) { + if len(ps) < 3 { + panic("dig needs at least three arguments") + } + dict := ps[len(ps)-1].(map[string]interface{}) + def := ps[len(ps)-2] + ks := make([]string, len(ps)-2) + for i := 0; i < len(ks); i++ { + ks[i] = ps[i].(string) + } + + return digFromDict(dict, def, ks) +} + +func digFromDict(dict map[string]interface{}, d interface{}, ks []string) (interface{}, error) { + k, ns := ks[0], ks[1:len(ks)] + step, has := dict[k] + if !has { + return d, nil + } + if len(ns) == 0 { + return step, nil + } + return digFromDict(step.(map[string]interface{}), d, ns) +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/doc.go b/vendor/github.com/go-task/slim-sprig/v3/doc.go new file mode 100644 index 000000000..aabb9d448 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/doc.go @@ -0,0 +1,19 @@ +/* +Package sprig provides template functions for Go. + +This package contains a number of utility functions for working with data +inside of Go `html/template` and `text/template` files. + +To add these functions, use the `template.Funcs()` method: + + t := templates.New("foo").Funcs(sprig.FuncMap()) + +Note that you should add the function map before you parse any template files. + + In several cases, Sprig reverses the order of arguments from the way they + appear in the standard library. This is to make it easier to pipe + arguments into functions. + +See http://masterminds.github.io/sprig/ for more detailed documentation on each of the available functions. +*/ +package sprig diff --git a/vendor/github.com/go-task/slim-sprig/v3/functions.go b/vendor/github.com/go-task/slim-sprig/v3/functions.go new file mode 100644 index 000000000..5ea74f899 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/functions.go @@ -0,0 +1,317 @@ +package sprig + +import ( + "errors" + "html/template" + "math/rand" + "os" + "path" + "path/filepath" + "reflect" + "strconv" + "strings" + ttemplate "text/template" + "time" +) + +// FuncMap produces the function map. +// +// Use this to pass the functions into the template engine: +// +// tpl := template.New("foo").Funcs(sprig.FuncMap())) +// +func FuncMap() template.FuncMap { + return HtmlFuncMap() +} + +// HermeticTxtFuncMap returns a 'text/template'.FuncMap with only repeatable functions. +func HermeticTxtFuncMap() ttemplate.FuncMap { + r := TxtFuncMap() + for _, name := range nonhermeticFunctions { + delete(r, name) + } + return r +} + +// HermeticHtmlFuncMap returns an 'html/template'.Funcmap with only repeatable functions. +func HermeticHtmlFuncMap() template.FuncMap { + r := HtmlFuncMap() + for _, name := range nonhermeticFunctions { + delete(r, name) + } + return r +} + +// TxtFuncMap returns a 'text/template'.FuncMap +func TxtFuncMap() ttemplate.FuncMap { + return ttemplate.FuncMap(GenericFuncMap()) +} + +// HtmlFuncMap returns an 'html/template'.Funcmap +func HtmlFuncMap() template.FuncMap { + return template.FuncMap(GenericFuncMap()) +} + +// GenericFuncMap returns a copy of the basic function map as a map[string]interface{}. +func GenericFuncMap() map[string]interface{} { + gfm := make(map[string]interface{}, len(genericMap)) + for k, v := range genericMap { + gfm[k] = v + } + return gfm +} + +// These functions are not guaranteed to evaluate to the same result for given input, because they +// refer to the environment or global state. +var nonhermeticFunctions = []string{ + // Date functions + "date", + "date_in_zone", + "date_modify", + "now", + "htmlDate", + "htmlDateInZone", + "dateInZone", + "dateModify", + + // Strings + "randAlphaNum", + "randAlpha", + "randAscii", + "randNumeric", + "randBytes", + "uuidv4", + + // OS + "env", + "expandenv", + + // Network + "getHostByName", +} + +var genericMap = map[string]interface{}{ + "hello": func() string { return "Hello!" }, + + // Date functions + "ago": dateAgo, + "date": date, + "date_in_zone": dateInZone, + "date_modify": dateModify, + "dateInZone": dateInZone, + "dateModify": dateModify, + "duration": duration, + "durationRound": durationRound, + "htmlDate": htmlDate, + "htmlDateInZone": htmlDateInZone, + "must_date_modify": mustDateModify, + "mustDateModify": mustDateModify, + "mustToDate": mustToDate, + "now": time.Now, + "toDate": toDate, + "unixEpoch": unixEpoch, + + // Strings + "trunc": trunc, + "trim": strings.TrimSpace, + "upper": strings.ToUpper, + "lower": strings.ToLower, + "title": strings.Title, + "substr": substring, + // Switch order so that "foo" | repeat 5 + "repeat": func(count int, str string) string { return strings.Repeat(str, count) }, + // Deprecated: Use trimAll. + "trimall": func(a, b string) string { return strings.Trim(b, a) }, + // Switch order so that "$foo" | trimall "$" + "trimAll": func(a, b string) string { return strings.Trim(b, a) }, + "trimSuffix": func(a, b string) string { return strings.TrimSuffix(b, a) }, + "trimPrefix": func(a, b string) string { return strings.TrimPrefix(b, a) }, + // Switch order so that "foobar" | contains "foo" + "contains": func(substr string, str string) bool { return strings.Contains(str, substr) }, + "hasPrefix": func(substr string, str string) bool { return strings.HasPrefix(str, substr) }, + "hasSuffix": func(substr string, str string) bool { return strings.HasSuffix(str, substr) }, + "quote": quote, + "squote": squote, + "cat": cat, + "indent": indent, + "nindent": nindent, + "replace": replace, + "plural": plural, + "sha1sum": sha1sum, + "sha256sum": sha256sum, + "adler32sum": adler32sum, + "toString": strval, + + // Wrap Atoi to stop errors. + "atoi": func(a string) int { i, _ := strconv.Atoi(a); return i }, + "int64": toInt64, + "int": toInt, + "float64": toFloat64, + "seq": seq, + "toDecimal": toDecimal, + + //"gt": func(a, b int) bool {return a > b}, + //"gte": func(a, b int) bool {return a >= b}, + //"lt": func(a, b int) bool {return a < b}, + //"lte": func(a, b int) bool {return a <= b}, + + // split "/" foo/bar returns map[int]string{0: foo, 1: bar} + "split": split, + "splitList": func(sep, orig string) []string { return strings.Split(orig, sep) }, + // splitn "/" foo/bar/fuu returns map[int]string{0: foo, 1: bar/fuu} + "splitn": splitn, + "toStrings": strslice, + + "until": until, + "untilStep": untilStep, + + // VERY basic arithmetic. + "add1": func(i interface{}) int64 { return toInt64(i) + 1 }, + "add": func(i ...interface{}) int64 { + var a int64 = 0 + for _, b := range i { + a += toInt64(b) + } + return a + }, + "sub": func(a, b interface{}) int64 { return toInt64(a) - toInt64(b) }, + "div": func(a, b interface{}) int64 { return toInt64(a) / toInt64(b) }, + "mod": func(a, b interface{}) int64 { return toInt64(a) % toInt64(b) }, + "mul": func(a interface{}, v ...interface{}) int64 { + val := toInt64(a) + for _, b := range v { + val = val * toInt64(b) + } + return val + }, + "randInt": func(min, max int) int { return rand.Intn(max-min) + min }, + "biggest": max, + "max": max, + "min": min, + "maxf": maxf, + "minf": minf, + "ceil": ceil, + "floor": floor, + "round": round, + + // string slices. Note that we reverse the order b/c that's better + // for template processing. + "join": join, + "sortAlpha": sortAlpha, + + // Defaults + "default": dfault, + "empty": empty, + "coalesce": coalesce, + "all": all, + "any": any, + "compact": compact, + "mustCompact": mustCompact, + "fromJson": fromJson, + "toJson": toJson, + "toPrettyJson": toPrettyJson, + "toRawJson": toRawJson, + "mustFromJson": mustFromJson, + "mustToJson": mustToJson, + "mustToPrettyJson": mustToPrettyJson, + "mustToRawJson": mustToRawJson, + "ternary": ternary, + + // Reflection + "typeOf": typeOf, + "typeIs": typeIs, + "typeIsLike": typeIsLike, + "kindOf": kindOf, + "kindIs": kindIs, + "deepEqual": reflect.DeepEqual, + + // OS: + "env": os.Getenv, + "expandenv": os.ExpandEnv, + + // Network: + "getHostByName": getHostByName, + + // Paths: + "base": path.Base, + "dir": path.Dir, + "clean": path.Clean, + "ext": path.Ext, + "isAbs": path.IsAbs, + + // Filepaths: + "osBase": filepath.Base, + "osClean": filepath.Clean, + "osDir": filepath.Dir, + "osExt": filepath.Ext, + "osIsAbs": filepath.IsAbs, + + // Encoding: + "b64enc": base64encode, + "b64dec": base64decode, + "b32enc": base32encode, + "b32dec": base32decode, + + // Data Structures: + "tuple": list, // FIXME: with the addition of append/prepend these are no longer immutable. + "list": list, + "dict": dict, + "get": get, + "set": set, + "unset": unset, + "hasKey": hasKey, + "pluck": pluck, + "keys": keys, + "pick": pick, + "omit": omit, + "values": values, + + "append": push, "push": push, + "mustAppend": mustPush, "mustPush": mustPush, + "prepend": prepend, + "mustPrepend": mustPrepend, + "first": first, + "mustFirst": mustFirst, + "rest": rest, + "mustRest": mustRest, + "last": last, + "mustLast": mustLast, + "initial": initial, + "mustInitial": mustInitial, + "reverse": reverse, + "mustReverse": mustReverse, + "uniq": uniq, + "mustUniq": mustUniq, + "without": without, + "mustWithout": mustWithout, + "has": has, + "mustHas": mustHas, + "slice": slice, + "mustSlice": mustSlice, + "concat": concat, + "dig": dig, + "chunk": chunk, + "mustChunk": mustChunk, + + // Flow Control: + "fail": func(msg string) (string, error) { return "", errors.New(msg) }, + + // Regex + "regexMatch": regexMatch, + "mustRegexMatch": mustRegexMatch, + "regexFindAll": regexFindAll, + "mustRegexFindAll": mustRegexFindAll, + "regexFind": regexFind, + "mustRegexFind": mustRegexFind, + "regexReplaceAll": regexReplaceAll, + "mustRegexReplaceAll": mustRegexReplaceAll, + "regexReplaceAllLiteral": regexReplaceAllLiteral, + "mustRegexReplaceAllLiteral": mustRegexReplaceAllLiteral, + "regexSplit": regexSplit, + "mustRegexSplit": mustRegexSplit, + "regexQuoteMeta": regexQuoteMeta, + + // URLs: + "urlParse": urlParse, + "urlJoin": urlJoin, +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/list.go b/vendor/github.com/go-task/slim-sprig/v3/list.go new file mode 100644 index 000000000..ca0fbb789 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/list.go @@ -0,0 +1,464 @@ +package sprig + +import ( + "fmt" + "math" + "reflect" + "sort" +) + +// Reflection is used in these functions so that slices and arrays of strings, +// ints, and other types not implementing []interface{} can be worked with. +// For example, this is useful if you need to work on the output of regexs. + +func list(v ...interface{}) []interface{} { + return v +} + +func push(list interface{}, v interface{}) []interface{} { + l, err := mustPush(list, v) + if err != nil { + panic(err) + } + + return l +} + +func mustPush(list interface{}, v interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + nl := make([]interface{}, l) + for i := 0; i < l; i++ { + nl[i] = l2.Index(i).Interface() + } + + return append(nl, v), nil + + default: + return nil, fmt.Errorf("Cannot push on type %s", tp) + } +} + +func prepend(list interface{}, v interface{}) []interface{} { + l, err := mustPrepend(list, v) + if err != nil { + panic(err) + } + + return l +} + +func mustPrepend(list interface{}, v interface{}) ([]interface{}, error) { + //return append([]interface{}{v}, list...) + + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + nl := make([]interface{}, l) + for i := 0; i < l; i++ { + nl[i] = l2.Index(i).Interface() + } + + return append([]interface{}{v}, nl...), nil + + default: + return nil, fmt.Errorf("Cannot prepend on type %s", tp) + } +} + +func chunk(size int, list interface{}) [][]interface{} { + l, err := mustChunk(size, list) + if err != nil { + panic(err) + } + + return l +} + +func mustChunk(size int, list interface{}) ([][]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + + cs := int(math.Floor(float64(l-1)/float64(size)) + 1) + nl := make([][]interface{}, cs) + + for i := 0; i < cs; i++ { + clen := size + if i == cs-1 { + clen = int(math.Floor(math.Mod(float64(l), float64(size)))) + if clen == 0 { + clen = size + } + } + + nl[i] = make([]interface{}, clen) + + for j := 0; j < clen; j++ { + ix := i*size + j + nl[i][j] = l2.Index(ix).Interface() + } + } + + return nl, nil + + default: + return nil, fmt.Errorf("Cannot chunk type %s", tp) + } +} + +func last(list interface{}) interface{} { + l, err := mustLast(list) + if err != nil { + panic(err) + } + + return l +} + +func mustLast(list interface{}) (interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + return l2.Index(l - 1).Interface(), nil + default: + return nil, fmt.Errorf("Cannot find last on type %s", tp) + } +} + +func first(list interface{}) interface{} { + l, err := mustFirst(list) + if err != nil { + panic(err) + } + + return l +} + +func mustFirst(list interface{}) (interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + return l2.Index(0).Interface(), nil + default: + return nil, fmt.Errorf("Cannot find first on type %s", tp) + } +} + +func rest(list interface{}) []interface{} { + l, err := mustRest(list) + if err != nil { + panic(err) + } + + return l +} + +func mustRest(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + nl := make([]interface{}, l-1) + for i := 1; i < l; i++ { + nl[i-1] = l2.Index(i).Interface() + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot find rest on type %s", tp) + } +} + +func initial(list interface{}) []interface{} { + l, err := mustInitial(list) + if err != nil { + panic(err) + } + + return l +} + +func mustInitial(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + nl := make([]interface{}, l-1) + for i := 0; i < l-1; i++ { + nl[i] = l2.Index(i).Interface() + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot find initial on type %s", tp) + } +} + +func sortAlpha(list interface{}) []string { + k := reflect.Indirect(reflect.ValueOf(list)).Kind() + switch k { + case reflect.Slice, reflect.Array: + a := strslice(list) + s := sort.StringSlice(a) + s.Sort() + return s + } + return []string{strval(list)} +} + +func reverse(v interface{}) []interface{} { + l, err := mustReverse(v) + if err != nil { + panic(err) + } + + return l +} + +func mustReverse(v interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(v).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(v) + + l := l2.Len() + // We do not sort in place because the incoming array should not be altered. + nl := make([]interface{}, l) + for i := 0; i < l; i++ { + nl[l-i-1] = l2.Index(i).Interface() + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot find reverse on type %s", tp) + } +} + +func compact(list interface{}) []interface{} { + l, err := mustCompact(list) + if err != nil { + panic(err) + } + + return l +} + +func mustCompact(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + nl := []interface{}{} + var item interface{} + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if !empty(item) { + nl = append(nl, item) + } + } + + return nl, nil + default: + return nil, fmt.Errorf("Cannot compact on type %s", tp) + } +} + +func uniq(list interface{}) []interface{} { + l, err := mustUniq(list) + if err != nil { + panic(err) + } + + return l +} + +func mustUniq(list interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + dest := []interface{}{} + var item interface{} + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if !inList(dest, item) { + dest = append(dest, item) + } + } + + return dest, nil + default: + return nil, fmt.Errorf("Cannot find uniq on type %s", tp) + } +} + +func inList(haystack []interface{}, needle interface{}) bool { + for _, h := range haystack { + if reflect.DeepEqual(needle, h) { + return true + } + } + return false +} + +func without(list interface{}, omit ...interface{}) []interface{} { + l, err := mustWithout(list, omit...) + if err != nil { + panic(err) + } + + return l +} + +func mustWithout(list interface{}, omit ...interface{}) ([]interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + res := []interface{}{} + var item interface{} + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if !inList(omit, item) { + res = append(res, item) + } + } + + return res, nil + default: + return nil, fmt.Errorf("Cannot find without on type %s", tp) + } +} + +func has(needle interface{}, haystack interface{}) bool { + l, err := mustHas(needle, haystack) + if err != nil { + panic(err) + } + + return l +} + +func mustHas(needle interface{}, haystack interface{}) (bool, error) { + if haystack == nil { + return false, nil + } + tp := reflect.TypeOf(haystack).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(haystack) + var item interface{} + l := l2.Len() + for i := 0; i < l; i++ { + item = l2.Index(i).Interface() + if reflect.DeepEqual(needle, item) { + return true, nil + } + } + + return false, nil + default: + return false, fmt.Errorf("Cannot find has on type %s", tp) + } +} + +// $list := [1, 2, 3, 4, 5] +// slice $list -> list[0:5] = list[:] +// slice $list 0 3 -> list[0:3] = list[:3] +// slice $list 3 5 -> list[3:5] +// slice $list 3 -> list[3:5] = list[3:] +func slice(list interface{}, indices ...interface{}) interface{} { + l, err := mustSlice(list, indices...) + if err != nil { + panic(err) + } + + return l +} + +func mustSlice(list interface{}, indices ...interface{}) (interface{}, error) { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + + l := l2.Len() + if l == 0 { + return nil, nil + } + + var start, end int + if len(indices) > 0 { + start = toInt(indices[0]) + } + if len(indices) < 2 { + end = l + } else { + end = toInt(indices[1]) + } + + return l2.Slice(start, end).Interface(), nil + default: + return nil, fmt.Errorf("list should be type of slice or array but %s", tp) + } +} + +func concat(lists ...interface{}) interface{} { + var res []interface{} + for _, list := range lists { + tp := reflect.TypeOf(list).Kind() + switch tp { + case reflect.Slice, reflect.Array: + l2 := reflect.ValueOf(list) + for i := 0; i < l2.Len(); i++ { + res = append(res, l2.Index(i).Interface()) + } + default: + panic(fmt.Sprintf("Cannot concat type %s as list", tp)) + } + } + return res +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/network.go b/vendor/github.com/go-task/slim-sprig/v3/network.go new file mode 100644 index 000000000..108d78a94 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/network.go @@ -0,0 +1,12 @@ +package sprig + +import ( + "math/rand" + "net" +) + +func getHostByName(name string) string { + addrs, _ := net.LookupHost(name) + //TODO: add error handing when release v3 comes out + return addrs[rand.Intn(len(addrs))] +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/numeric.go b/vendor/github.com/go-task/slim-sprig/v3/numeric.go new file mode 100644 index 000000000..98cbb37a1 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/numeric.go @@ -0,0 +1,228 @@ +package sprig + +import ( + "fmt" + "math" + "reflect" + "strconv" + "strings" +) + +// toFloat64 converts 64-bit floats +func toFloat64(v interface{}) float64 { + if str, ok := v.(string); ok { + iv, err := strconv.ParseFloat(str, 64) + if err != nil { + return 0 + } + return iv + } + + val := reflect.Indirect(reflect.ValueOf(v)) + switch val.Kind() { + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + return float64(val.Int()) + case reflect.Uint8, reflect.Uint16, reflect.Uint32: + return float64(val.Uint()) + case reflect.Uint, reflect.Uint64: + return float64(val.Uint()) + case reflect.Float32, reflect.Float64: + return val.Float() + case reflect.Bool: + if val.Bool() { + return 1 + } + return 0 + default: + return 0 + } +} + +func toInt(v interface{}) int { + //It's not optimal. Bud I don't want duplicate toInt64 code. + return int(toInt64(v)) +} + +// toInt64 converts integer types to 64-bit integers +func toInt64(v interface{}) int64 { + if str, ok := v.(string); ok { + iv, err := strconv.ParseInt(str, 10, 64) + if err != nil { + return 0 + } + return iv + } + + val := reflect.Indirect(reflect.ValueOf(v)) + switch val.Kind() { + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + return val.Int() + case reflect.Uint8, reflect.Uint16, reflect.Uint32: + return int64(val.Uint()) + case reflect.Uint, reflect.Uint64: + tv := val.Uint() + if tv <= math.MaxInt64 { + return int64(tv) + } + // TODO: What is the sensible thing to do here? + return math.MaxInt64 + case reflect.Float32, reflect.Float64: + return int64(val.Float()) + case reflect.Bool: + if val.Bool() { + return 1 + } + return 0 + default: + return 0 + } +} + +func max(a interface{}, i ...interface{}) int64 { + aa := toInt64(a) + for _, b := range i { + bb := toInt64(b) + if bb > aa { + aa = bb + } + } + return aa +} + +func maxf(a interface{}, i ...interface{}) float64 { + aa := toFloat64(a) + for _, b := range i { + bb := toFloat64(b) + aa = math.Max(aa, bb) + } + return aa +} + +func min(a interface{}, i ...interface{}) int64 { + aa := toInt64(a) + for _, b := range i { + bb := toInt64(b) + if bb < aa { + aa = bb + } + } + return aa +} + +func minf(a interface{}, i ...interface{}) float64 { + aa := toFloat64(a) + for _, b := range i { + bb := toFloat64(b) + aa = math.Min(aa, bb) + } + return aa +} + +func until(count int) []int { + step := 1 + if count < 0 { + step = -1 + } + return untilStep(0, count, step) +} + +func untilStep(start, stop, step int) []int { + v := []int{} + + if stop < start { + if step >= 0 { + return v + } + for i := start; i > stop; i += step { + v = append(v, i) + } + return v + } + + if step <= 0 { + return v + } + for i := start; i < stop; i += step { + v = append(v, i) + } + return v +} + +func floor(a interface{}) float64 { + aa := toFloat64(a) + return math.Floor(aa) +} + +func ceil(a interface{}) float64 { + aa := toFloat64(a) + return math.Ceil(aa) +} + +func round(a interface{}, p int, rOpt ...float64) float64 { + roundOn := .5 + if len(rOpt) > 0 { + roundOn = rOpt[0] + } + val := toFloat64(a) + places := toFloat64(p) + + var round float64 + pow := math.Pow(10, places) + digit := pow * val + _, div := math.Modf(digit) + if div >= roundOn { + round = math.Ceil(digit) + } else { + round = math.Floor(digit) + } + return round / pow +} + +// converts unix octal to decimal +func toDecimal(v interface{}) int64 { + result, err := strconv.ParseInt(fmt.Sprint(v), 8, 64) + if err != nil { + return 0 + } + return result +} + +func seq(params ...int) string { + increment := 1 + switch len(params) { + case 0: + return "" + case 1: + start := 1 + end := params[0] + if end < start { + increment = -1 + } + return intArrayToString(untilStep(start, end+increment, increment), " ") + case 3: + start := params[0] + end := params[2] + step := params[1] + if end < start { + increment = -1 + if step > 0 { + return "" + } + } + return intArrayToString(untilStep(start, end+increment, step), " ") + case 2: + start := params[0] + end := params[1] + step := 1 + if end < start { + step = -1 + } + return intArrayToString(untilStep(start, end+step, step), " ") + default: + return "" + } +} + +func intArrayToString(slice []int, delimeter string) string { + return strings.Trim(strings.Join(strings.Fields(fmt.Sprint(slice)), delimeter), "[]") +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/reflect.go b/vendor/github.com/go-task/slim-sprig/v3/reflect.go new file mode 100644 index 000000000..8a65c132f --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/reflect.go @@ -0,0 +1,28 @@ +package sprig + +import ( + "fmt" + "reflect" +) + +// typeIs returns true if the src is the type named in target. +func typeIs(target string, src interface{}) bool { + return target == typeOf(src) +} + +func typeIsLike(target string, src interface{}) bool { + t := typeOf(src) + return target == t || "*"+target == t +} + +func typeOf(src interface{}) string { + return fmt.Sprintf("%T", src) +} + +func kindIs(target string, src interface{}) bool { + return target == kindOf(src) +} + +func kindOf(src interface{}) string { + return reflect.ValueOf(src).Kind().String() +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/regex.go b/vendor/github.com/go-task/slim-sprig/v3/regex.go new file mode 100644 index 000000000..fab551018 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/regex.go @@ -0,0 +1,83 @@ +package sprig + +import ( + "regexp" +) + +func regexMatch(regex string, s string) bool { + match, _ := regexp.MatchString(regex, s) + return match +} + +func mustRegexMatch(regex string, s string) (bool, error) { + return regexp.MatchString(regex, s) +} + +func regexFindAll(regex string, s string, n int) []string { + r := regexp.MustCompile(regex) + return r.FindAllString(s, n) +} + +func mustRegexFindAll(regex string, s string, n int) ([]string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return []string{}, err + } + return r.FindAllString(s, n), nil +} + +func regexFind(regex string, s string) string { + r := regexp.MustCompile(regex) + return r.FindString(s) +} + +func mustRegexFind(regex string, s string) (string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return "", err + } + return r.FindString(s), nil +} + +func regexReplaceAll(regex string, s string, repl string) string { + r := regexp.MustCompile(regex) + return r.ReplaceAllString(s, repl) +} + +func mustRegexReplaceAll(regex string, s string, repl string) (string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return "", err + } + return r.ReplaceAllString(s, repl), nil +} + +func regexReplaceAllLiteral(regex string, s string, repl string) string { + r := regexp.MustCompile(regex) + return r.ReplaceAllLiteralString(s, repl) +} + +func mustRegexReplaceAllLiteral(regex string, s string, repl string) (string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return "", err + } + return r.ReplaceAllLiteralString(s, repl), nil +} + +func regexSplit(regex string, s string, n int) []string { + r := regexp.MustCompile(regex) + return r.Split(s, n) +} + +func mustRegexSplit(regex string, s string, n int) ([]string, error) { + r, err := regexp.Compile(regex) + if err != nil { + return []string{}, err + } + return r.Split(s, n), nil +} + +func regexQuoteMeta(s string) string { + return regexp.QuoteMeta(s) +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/strings.go b/vendor/github.com/go-task/slim-sprig/v3/strings.go new file mode 100644 index 000000000..3c62d6b6f --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/strings.go @@ -0,0 +1,189 @@ +package sprig + +import ( + "encoding/base32" + "encoding/base64" + "fmt" + "reflect" + "strconv" + "strings" +) + +func base64encode(v string) string { + return base64.StdEncoding.EncodeToString([]byte(v)) +} + +func base64decode(v string) string { + data, err := base64.StdEncoding.DecodeString(v) + if err != nil { + return err.Error() + } + return string(data) +} + +func base32encode(v string) string { + return base32.StdEncoding.EncodeToString([]byte(v)) +} + +func base32decode(v string) string { + data, err := base32.StdEncoding.DecodeString(v) + if err != nil { + return err.Error() + } + return string(data) +} + +func quote(str ...interface{}) string { + out := make([]string, 0, len(str)) + for _, s := range str { + if s != nil { + out = append(out, fmt.Sprintf("%q", strval(s))) + } + } + return strings.Join(out, " ") +} + +func squote(str ...interface{}) string { + out := make([]string, 0, len(str)) + for _, s := range str { + if s != nil { + out = append(out, fmt.Sprintf("'%v'", s)) + } + } + return strings.Join(out, " ") +} + +func cat(v ...interface{}) string { + v = removeNilElements(v) + r := strings.TrimSpace(strings.Repeat("%v ", len(v))) + return fmt.Sprintf(r, v...) +} + +func indent(spaces int, v string) string { + pad := strings.Repeat(" ", spaces) + return pad + strings.Replace(v, "\n", "\n"+pad, -1) +} + +func nindent(spaces int, v string) string { + return "\n" + indent(spaces, v) +} + +func replace(old, new, src string) string { + return strings.Replace(src, old, new, -1) +} + +func plural(one, many string, count int) string { + if count == 1 { + return one + } + return many +} + +func strslice(v interface{}) []string { + switch v := v.(type) { + case []string: + return v + case []interface{}: + b := make([]string, 0, len(v)) + for _, s := range v { + if s != nil { + b = append(b, strval(s)) + } + } + return b + default: + val := reflect.ValueOf(v) + switch val.Kind() { + case reflect.Array, reflect.Slice: + l := val.Len() + b := make([]string, 0, l) + for i := 0; i < l; i++ { + value := val.Index(i).Interface() + if value != nil { + b = append(b, strval(value)) + } + } + return b + default: + if v == nil { + return []string{} + } + + return []string{strval(v)} + } + } +} + +func removeNilElements(v []interface{}) []interface{} { + newSlice := make([]interface{}, 0, len(v)) + for _, i := range v { + if i != nil { + newSlice = append(newSlice, i) + } + } + return newSlice +} + +func strval(v interface{}) string { + switch v := v.(type) { + case string: + return v + case []byte: + return string(v) + case error: + return v.Error() + case fmt.Stringer: + return v.String() + default: + return fmt.Sprintf("%v", v) + } +} + +func trunc(c int, s string) string { + if c < 0 && len(s)+c > 0 { + return s[len(s)+c:] + } + if c >= 0 && len(s) > c { + return s[:c] + } + return s +} + +func join(sep string, v interface{}) string { + return strings.Join(strslice(v), sep) +} + +func split(sep, orig string) map[string]string { + parts := strings.Split(orig, sep) + res := make(map[string]string, len(parts)) + for i, v := range parts { + res["_"+strconv.Itoa(i)] = v + } + return res +} + +func splitn(sep string, n int, orig string) map[string]string { + parts := strings.SplitN(orig, sep, n) + res := make(map[string]string, len(parts)) + for i, v := range parts { + res["_"+strconv.Itoa(i)] = v + } + return res +} + +// substring creates a substring of the given string. +// +// If start is < 0, this calls string[:end]. +// +// If start is >= 0 and end < 0 or end bigger than s length, this calls string[start:] +// +// Otherwise, this calls string[start, end]. +func substring(start, end int, s string) string { + if start < 0 { + return s[:end] + } + if end < 0 || end > len(s) { + return s[start:] + } + return s[start:end] +} diff --git a/vendor/github.com/go-task/slim-sprig/v3/url.go b/vendor/github.com/go-task/slim-sprig/v3/url.go new file mode 100644 index 000000000..b8e120e19 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/v3/url.go @@ -0,0 +1,66 @@ +package sprig + +import ( + "fmt" + "net/url" + "reflect" +) + +func dictGetOrEmpty(dict map[string]interface{}, key string) string { + value, ok := dict[key] + if !ok { + return "" + } + tp := reflect.TypeOf(value).Kind() + if tp != reflect.String { + panic(fmt.Sprintf("unable to parse %s key, must be of type string, but %s found", key, tp.String())) + } + return reflect.ValueOf(value).String() +} + +// parses given URL to return dict object +func urlParse(v string) map[string]interface{} { + dict := map[string]interface{}{} + parsedURL, err := url.Parse(v) + if err != nil { + panic(fmt.Sprintf("unable to parse url: %s", err)) + } + dict["scheme"] = parsedURL.Scheme + dict["host"] = parsedURL.Host + dict["hostname"] = parsedURL.Hostname() + dict["path"] = parsedURL.Path + dict["query"] = parsedURL.RawQuery + dict["opaque"] = parsedURL.Opaque + dict["fragment"] = parsedURL.Fragment + if parsedURL.User != nil { + dict["userinfo"] = parsedURL.User.String() + } else { + dict["userinfo"] = "" + } + + return dict +} + +// join given dict to URL string +func urlJoin(d map[string]interface{}) string { + resURL := url.URL{ + Scheme: dictGetOrEmpty(d, "scheme"), + Host: dictGetOrEmpty(d, "host"), + Path: dictGetOrEmpty(d, "path"), + RawQuery: dictGetOrEmpty(d, "query"), + Opaque: dictGetOrEmpty(d, "opaque"), + Fragment: dictGetOrEmpty(d, "fragment"), + } + userinfo := dictGetOrEmpty(d, "userinfo") + var user *url.Userinfo + if userinfo != "" { + tempURL, err := url.Parse(fmt.Sprintf("proto://%s@host", userinfo)) + if err != nil { + panic(fmt.Sprintf("unable to parse userinfo in dict: %s", err)) + } + user = tempURL.User + } + + resURL.User = user + return resURL.String() +} diff --git a/vendor/github.com/gobwas/glob/.gitignore b/vendor/github.com/gobwas/glob/.gitignore new file mode 100644 index 000000000..b4ae623be --- /dev/null +++ b/vendor/github.com/gobwas/glob/.gitignore @@ -0,0 +1,8 @@ +glob.iml +.idea +*.cpu +*.mem +*.test +*.dot +*.png +*.svg diff --git a/vendor/github.com/gobwas/glob/.travis.yml b/vendor/github.com/gobwas/glob/.travis.yml new file mode 100644 index 000000000..e8a276826 --- /dev/null +++ b/vendor/github.com/gobwas/glob/.travis.yml @@ -0,0 +1,9 @@ +sudo: false + +language: go + +go: + - 1.5.3 + +script: + - go test -v ./... diff --git a/vendor/github.com/gobwas/glob/LICENSE b/vendor/github.com/gobwas/glob/LICENSE new file mode 100644 index 000000000..9d4735cad --- /dev/null +++ b/vendor/github.com/gobwas/glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Sergey Kamardin + +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. \ No newline at end of file diff --git a/vendor/github.com/gobwas/glob/bench.sh b/vendor/github.com/gobwas/glob/bench.sh new file mode 100644 index 000000000..804cf22e6 --- /dev/null +++ b/vendor/github.com/gobwas/glob/bench.sh @@ -0,0 +1,26 @@ +#! /bin/bash + +bench() { + filename="/tmp/$1-$2.bench" + if test -e "${filename}"; + then + echo "Already exists ${filename}" + else + backup=`git rev-parse --abbrev-ref HEAD` + git checkout $1 + echo -n "Creating ${filename}... " + go test ./... -run=NONE -bench=$2 > "${filename}" -benchmem + echo "OK" + git checkout ${backup} + sleep 5 + fi +} + + +to=$1 +current=`git rev-parse --abbrev-ref HEAD` + +bench ${to} $2 +bench ${current} $2 + +benchcmp $3 "/tmp/${to}-$2.bench" "/tmp/${current}-$2.bench" diff --git a/vendor/github.com/gobwas/glob/compiler/compiler.go b/vendor/github.com/gobwas/glob/compiler/compiler.go new file mode 100644 index 000000000..02e7de80a --- /dev/null +++ b/vendor/github.com/gobwas/glob/compiler/compiler.go @@ -0,0 +1,525 @@ +package compiler + +// TODO use constructor with all matchers, and to their structs private +// TODO glue multiple Text nodes (like after QuoteMeta) + +import ( + "fmt" + "reflect" + + "github.com/gobwas/glob/match" + "github.com/gobwas/glob/syntax/ast" + "github.com/gobwas/glob/util/runes" +) + +func optimizeMatcher(matcher match.Matcher) match.Matcher { + switch m := matcher.(type) { + + case match.Any: + if len(m.Separators) == 0 { + return match.NewSuper() + } + + case match.AnyOf: + if len(m.Matchers) == 1 { + return m.Matchers[0] + } + + return m + + case match.List: + if m.Not == false && len(m.List) == 1 { + return match.NewText(string(m.List)) + } + + return m + + case match.BTree: + m.Left = optimizeMatcher(m.Left) + m.Right = optimizeMatcher(m.Right) + + r, ok := m.Value.(match.Text) + if !ok { + return m + } + + var ( + leftNil = m.Left == nil + rightNil = m.Right == nil + ) + if leftNil && rightNil { + return match.NewText(r.Str) + } + + _, leftSuper := m.Left.(match.Super) + lp, leftPrefix := m.Left.(match.Prefix) + la, leftAny := m.Left.(match.Any) + + _, rightSuper := m.Right.(match.Super) + rs, rightSuffix := m.Right.(match.Suffix) + ra, rightAny := m.Right.(match.Any) + + switch { + case leftSuper && rightSuper: + return match.NewContains(r.Str, false) + + case leftSuper && rightNil: + return match.NewSuffix(r.Str) + + case rightSuper && leftNil: + return match.NewPrefix(r.Str) + + case leftNil && rightSuffix: + return match.NewPrefixSuffix(r.Str, rs.Suffix) + + case rightNil && leftPrefix: + return match.NewPrefixSuffix(lp.Prefix, r.Str) + + case rightNil && leftAny: + return match.NewSuffixAny(r.Str, la.Separators) + + case leftNil && rightAny: + return match.NewPrefixAny(r.Str, ra.Separators) + } + + return m + } + + return matcher +} + +func compileMatchers(matchers []match.Matcher) (match.Matcher, error) { + if len(matchers) == 0 { + return nil, fmt.Errorf("compile error: need at least one matcher") + } + if len(matchers) == 1 { + return matchers[0], nil + } + if m := glueMatchers(matchers); m != nil { + return m, nil + } + + idx := -1 + maxLen := -1 + var val match.Matcher + for i, matcher := range matchers { + if l := matcher.Len(); l != -1 && l >= maxLen { + maxLen = l + idx = i + val = matcher + } + } + + if val == nil { // not found matcher with static length + r, err := compileMatchers(matchers[1:]) + if err != nil { + return nil, err + } + return match.NewBTree(matchers[0], nil, r), nil + } + + left := matchers[:idx] + var right []match.Matcher + if len(matchers) > idx+1 { + right = matchers[idx+1:] + } + + var l, r match.Matcher + var err error + if len(left) > 0 { + l, err = compileMatchers(left) + if err != nil { + return nil, err + } + } + + if len(right) > 0 { + r, err = compileMatchers(right) + if err != nil { + return nil, err + } + } + + return match.NewBTree(val, l, r), nil +} + +func glueMatchers(matchers []match.Matcher) match.Matcher { + if m := glueMatchersAsEvery(matchers); m != nil { + return m + } + if m := glueMatchersAsRow(matchers); m != nil { + return m + } + return nil +} + +func glueMatchersAsRow(matchers []match.Matcher) match.Matcher { + if len(matchers) <= 1 { + return nil + } + + var ( + c []match.Matcher + l int + ) + for _, matcher := range matchers { + if ml := matcher.Len(); ml == -1 { + return nil + } else { + c = append(c, matcher) + l += ml + } + } + return match.NewRow(l, c...) +} + +func glueMatchersAsEvery(matchers []match.Matcher) match.Matcher { + if len(matchers) <= 1 { + return nil + } + + var ( + hasAny bool + hasSuper bool + hasSingle bool + min int + separator []rune + ) + + for i, matcher := range matchers { + var sep []rune + + switch m := matcher.(type) { + case match.Super: + sep = []rune{} + hasSuper = true + + case match.Any: + sep = m.Separators + hasAny = true + + case match.Single: + sep = m.Separators + hasSingle = true + min++ + + case match.List: + if !m.Not { + return nil + } + sep = m.List + hasSingle = true + min++ + + default: + return nil + } + + // initialize + if i == 0 { + separator = sep + } + + if runes.Equal(sep, separator) { + continue + } + + return nil + } + + if hasSuper && !hasAny && !hasSingle { + return match.NewSuper() + } + + if hasAny && !hasSuper && !hasSingle { + return match.NewAny(separator) + } + + if (hasAny || hasSuper) && min > 0 && len(separator) == 0 { + return match.NewMin(min) + } + + every := match.NewEveryOf() + + if min > 0 { + every.Add(match.NewMin(min)) + + if !hasAny && !hasSuper { + every.Add(match.NewMax(min)) + } + } + + if len(separator) > 0 { + every.Add(match.NewContains(string(separator), true)) + } + + return every +} + +func minimizeMatchers(matchers []match.Matcher) []match.Matcher { + var done match.Matcher + var left, right, count int + + for l := 0; l < len(matchers); l++ { + for r := len(matchers); r > l; r-- { + if glued := glueMatchers(matchers[l:r]); glued != nil { + var swap bool + + if done == nil { + swap = true + } else { + cl, gl := done.Len(), glued.Len() + swap = cl > -1 && gl > -1 && gl > cl + swap = swap || count < r-l + } + + if swap { + done = glued + left = l + right = r + count = r - l + } + } + } + } + + if done == nil { + return matchers + } + + next := append(append([]match.Matcher{}, matchers[:left]...), done) + if right < len(matchers) { + next = append(next, matchers[right:]...) + } + + if len(next) == len(matchers) { + return next + } + + return minimizeMatchers(next) +} + +// minimizeAnyOf tries to apply some heuristics to minimize number of nodes in given tree +func minimizeTree(tree *ast.Node) *ast.Node { + switch tree.Kind { + case ast.KindAnyOf: + return minimizeTreeAnyOf(tree) + default: + return nil + } +} + +// minimizeAnyOf tries to find common children of given node of AnyOf pattern +// it searches for common children from left and from right +// if any common children are found – then it returns new optimized ast tree +// else it returns nil +func minimizeTreeAnyOf(tree *ast.Node) *ast.Node { + if !areOfSameKind(tree.Children, ast.KindPattern) { + return nil + } + + commonLeft, commonRight := commonChildren(tree.Children) + commonLeftCount, commonRightCount := len(commonLeft), len(commonRight) + if commonLeftCount == 0 && commonRightCount == 0 { // there are no common parts + return nil + } + + var result []*ast.Node + if commonLeftCount > 0 { + result = append(result, ast.NewNode(ast.KindPattern, nil, commonLeft...)) + } + + var anyOf []*ast.Node + for _, child := range tree.Children { + reuse := child.Children[commonLeftCount : len(child.Children)-commonRightCount] + var node *ast.Node + if len(reuse) == 0 { + // this pattern is completely reduced by commonLeft and commonRight patterns + // so it become nothing + node = ast.NewNode(ast.KindNothing, nil) + } else { + node = ast.NewNode(ast.KindPattern, nil, reuse...) + } + anyOf = appendIfUnique(anyOf, node) + } + switch { + case len(anyOf) == 1 && anyOf[0].Kind != ast.KindNothing: + result = append(result, anyOf[0]) + case len(anyOf) > 1: + result = append(result, ast.NewNode(ast.KindAnyOf, nil, anyOf...)) + } + + if commonRightCount > 0 { + result = append(result, ast.NewNode(ast.KindPattern, nil, commonRight...)) + } + + return ast.NewNode(ast.KindPattern, nil, result...) +} + +func commonChildren(nodes []*ast.Node) (commonLeft, commonRight []*ast.Node) { + if len(nodes) <= 1 { + return + } + + // find node that has least number of children + idx := leastChildren(nodes) + if idx == -1 { + return + } + tree := nodes[idx] + treeLength := len(tree.Children) + + // allocate max able size for rightCommon slice + // to get ability insert elements in reverse order (from end to start) + // without sorting + commonRight = make([]*ast.Node, treeLength) + lastRight := treeLength // will use this to get results as commonRight[lastRight:] + + var ( + breakLeft bool + breakRight bool + commonTotal int + ) + for i, j := 0, treeLength-1; commonTotal < treeLength && j >= 0 && !(breakLeft && breakRight); i, j = i+1, j-1 { + treeLeft := tree.Children[i] + treeRight := tree.Children[j] + + for k := 0; k < len(nodes) && !(breakLeft && breakRight); k++ { + // skip least children node + if k == idx { + continue + } + + restLeft := nodes[k].Children[i] + restRight := nodes[k].Children[j+len(nodes[k].Children)-treeLength] + + breakLeft = breakLeft || !treeLeft.Equal(restLeft) + + // disable searching for right common parts, if left part is already overlapping + breakRight = breakRight || (!breakLeft && j <= i) + breakRight = breakRight || !treeRight.Equal(restRight) + } + + if !breakLeft { + commonTotal++ + commonLeft = append(commonLeft, treeLeft) + } + if !breakRight { + commonTotal++ + lastRight = j + commonRight[j] = treeRight + } + } + + commonRight = commonRight[lastRight:] + + return +} + +func appendIfUnique(target []*ast.Node, val *ast.Node) []*ast.Node { + for _, n := range target { + if reflect.DeepEqual(n, val) { + return target + } + } + return append(target, val) +} + +func areOfSameKind(nodes []*ast.Node, kind ast.Kind) bool { + for _, n := range nodes { + if n.Kind != kind { + return false + } + } + return true +} + +func leastChildren(nodes []*ast.Node) int { + min := -1 + idx := -1 + for i, n := range nodes { + if idx == -1 || (len(n.Children) < min) { + min = len(n.Children) + idx = i + } + } + return idx +} + +func compileTreeChildren(tree *ast.Node, sep []rune) ([]match.Matcher, error) { + var matchers []match.Matcher + for _, desc := range tree.Children { + m, err := compile(desc, sep) + if err != nil { + return nil, err + } + matchers = append(matchers, optimizeMatcher(m)) + } + return matchers, nil +} + +func compile(tree *ast.Node, sep []rune) (m match.Matcher, err error) { + switch tree.Kind { + case ast.KindAnyOf: + // todo this could be faster on pattern_alternatives_combine_lite (see glob_test.go) + if n := minimizeTree(tree); n != nil { + return compile(n, sep) + } + matchers, err := compileTreeChildren(tree, sep) + if err != nil { + return nil, err + } + return match.NewAnyOf(matchers...), nil + + case ast.KindPattern: + if len(tree.Children) == 0 { + return match.NewNothing(), nil + } + matchers, err := compileTreeChildren(tree, sep) + if err != nil { + return nil, err + } + m, err = compileMatchers(minimizeMatchers(matchers)) + if err != nil { + return nil, err + } + + case ast.KindAny: + m = match.NewAny(sep) + + case ast.KindSuper: + m = match.NewSuper() + + case ast.KindSingle: + m = match.NewSingle(sep) + + case ast.KindNothing: + m = match.NewNothing() + + case ast.KindList: + l := tree.Value.(ast.List) + m = match.NewList([]rune(l.Chars), l.Not) + + case ast.KindRange: + r := tree.Value.(ast.Range) + m = match.NewRange(r.Lo, r.Hi, r.Not) + + case ast.KindText: + t := tree.Value.(ast.Text) + m = match.NewText(t.Text) + + default: + return nil, fmt.Errorf("could not compile tree: unknown node type") + } + + return optimizeMatcher(m), nil +} + +func Compile(tree *ast.Node, sep []rune) (match.Matcher, error) { + m, err := compile(tree, sep) + if err != nil { + return nil, err + } + + return m, nil +} diff --git a/vendor/github.com/gobwas/glob/glob.go b/vendor/github.com/gobwas/glob/glob.go new file mode 100644 index 000000000..2afde343a --- /dev/null +++ b/vendor/github.com/gobwas/glob/glob.go @@ -0,0 +1,80 @@ +package glob + +import ( + "github.com/gobwas/glob/compiler" + "github.com/gobwas/glob/syntax" +) + +// Glob represents compiled glob pattern. +type Glob interface { + Match(string) bool +} + +// Compile creates Glob for given pattern and strings (if any present after pattern) as separators. +// The pattern syntax is: +// +// pattern: +// { term } +// +// term: +// `*` matches any sequence of non-separator characters +// `**` matches any sequence of characters +// `?` matches any single non-separator character +// `[` [ `!` ] { character-range } `]` +// character class (must be non-empty) +// `{` pattern-list `}` +// pattern alternatives +// c matches character c (c != `*`, `**`, `?`, `\`, `[`, `{`, `}`) +// `\` c matches character c +// +// character-range: +// c matches character c (c != `\\`, `-`, `]`) +// `\` c matches character c +// lo `-` hi matches character c for lo <= c <= hi +// +// pattern-list: +// pattern { `,` pattern } +// comma-separated (without spaces) patterns +// +func Compile(pattern string, separators ...rune) (Glob, error) { + ast, err := syntax.Parse(pattern) + if err != nil { + return nil, err + } + + matcher, err := compiler.Compile(ast, separators) + if err != nil { + return nil, err + } + + return matcher, nil +} + +// MustCompile is the same as Compile, except that if Compile returns error, this will panic +func MustCompile(pattern string, separators ...rune) Glob { + g, err := Compile(pattern, separators...) + if err != nil { + panic(err) + } + + return g +} + +// QuoteMeta returns a string that quotes all glob pattern meta characters +// inside the argument text; For example, QuoteMeta(`{foo*}`) returns `\[foo\*\]`. +func QuoteMeta(s string) string { + b := make([]byte, 2*len(s)) + + // a byte loop is correct because all meta characters are ASCII + j := 0 + for i := 0; i < len(s); i++ { + if syntax.Special(s[i]) { + b[j] = '\\' + j++ + } + b[j] = s[i] + j++ + } + + return string(b[0:j]) +} diff --git a/vendor/github.com/gobwas/glob/match/any.go b/vendor/github.com/gobwas/glob/match/any.go new file mode 100644 index 000000000..514a9a5c4 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/any.go @@ -0,0 +1,45 @@ +package match + +import ( + "fmt" + "github.com/gobwas/glob/util/strings" +) + +type Any struct { + Separators []rune +} + +func NewAny(s []rune) Any { + return Any{s} +} + +func (self Any) Match(s string) bool { + return strings.IndexAnyRunes(s, self.Separators) == -1 +} + +func (self Any) Index(s string) (int, []int) { + found := strings.IndexAnyRunes(s, self.Separators) + switch found { + case -1: + case 0: + return 0, segments0 + default: + s = s[:found] + } + + segments := acquireSegments(len(s)) + for i := range s { + segments = append(segments, i) + } + segments = append(segments, len(s)) + + return 0, segments +} + +func (self Any) Len() int { + return lenNo +} + +func (self Any) String() string { + return fmt.Sprintf("", string(self.Separators)) +} diff --git a/vendor/github.com/gobwas/glob/match/any_of.go b/vendor/github.com/gobwas/glob/match/any_of.go new file mode 100644 index 000000000..8e65356cd --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/any_of.go @@ -0,0 +1,82 @@ +package match + +import "fmt" + +type AnyOf struct { + Matchers Matchers +} + +func NewAnyOf(m ...Matcher) AnyOf { + return AnyOf{Matchers(m)} +} + +func (self *AnyOf) Add(m Matcher) error { + self.Matchers = append(self.Matchers, m) + return nil +} + +func (self AnyOf) Match(s string) bool { + for _, m := range self.Matchers { + if m.Match(s) { + return true + } + } + + return false +} + +func (self AnyOf) Index(s string) (int, []int) { + index := -1 + + segments := acquireSegments(len(s)) + for _, m := range self.Matchers { + idx, seg := m.Index(s) + if idx == -1 { + continue + } + + if index == -1 || idx < index { + index = idx + segments = append(segments[:0], seg...) + continue + } + + if idx > index { + continue + } + + // here idx == index + segments = appendMerge(segments, seg) + } + + if index == -1 { + releaseSegments(segments) + return -1, nil + } + + return index, segments +} + +func (self AnyOf) Len() (l int) { + l = -1 + for _, m := range self.Matchers { + ml := m.Len() + switch { + case l == -1: + l = ml + continue + + case ml == -1: + return -1 + + case l != ml: + return -1 + } + } + + return +} + +func (self AnyOf) String() string { + return fmt.Sprintf("", self.Matchers) +} diff --git a/vendor/github.com/gobwas/glob/match/btree.go b/vendor/github.com/gobwas/glob/match/btree.go new file mode 100644 index 000000000..a8130e93e --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/btree.go @@ -0,0 +1,146 @@ +package match + +import ( + "fmt" + "unicode/utf8" +) + +type BTree struct { + Value Matcher + Left Matcher + Right Matcher + ValueLengthRunes int + LeftLengthRunes int + RightLengthRunes int + LengthRunes int +} + +func NewBTree(Value, Left, Right Matcher) (tree BTree) { + tree.Value = Value + tree.Left = Left + tree.Right = Right + + lenOk := true + if tree.ValueLengthRunes = Value.Len(); tree.ValueLengthRunes == -1 { + lenOk = false + } + + if Left != nil { + if tree.LeftLengthRunes = Left.Len(); tree.LeftLengthRunes == -1 { + lenOk = false + } + } + + if Right != nil { + if tree.RightLengthRunes = Right.Len(); tree.RightLengthRunes == -1 { + lenOk = false + } + } + + if lenOk { + tree.LengthRunes = tree.LeftLengthRunes + tree.ValueLengthRunes + tree.RightLengthRunes + } else { + tree.LengthRunes = -1 + } + + return tree +} + +func (self BTree) Len() int { + return self.LengthRunes +} + +// todo? +func (self BTree) Index(s string) (int, []int) { + return -1, nil +} + +func (self BTree) Match(s string) bool { + inputLen := len(s) + + // self.Length, self.RLen and self.LLen are values meaning the length of runes for each part + // here we manipulating byte length for better optimizations + // but these checks still works, cause minLen of 1-rune string is 1 byte. + if self.LengthRunes != -1 && self.LengthRunes > inputLen { + return false + } + + // try to cut unnecessary parts + // by knowledge of length of right and left part + var offset, limit int + if self.LeftLengthRunes >= 0 { + offset = self.LeftLengthRunes + } + if self.RightLengthRunes >= 0 { + limit = inputLen - self.RightLengthRunes + } else { + limit = inputLen + } + + for offset < limit { + // search for matching part in substring + index, segments := self.Value.Index(s[offset:limit]) + if index == -1 { + releaseSegments(segments) + return false + } + + l := s[:offset+index] + var left bool + if self.Left != nil { + left = self.Left.Match(l) + } else { + left = l == "" + } + + if left { + for i := len(segments) - 1; i >= 0; i-- { + length := segments[i] + + var right bool + var r string + // if there is no string for the right branch + if inputLen <= offset+index+length { + r = "" + } else { + r = s[offset+index+length:] + } + + if self.Right != nil { + right = self.Right.Match(r) + } else { + right = r == "" + } + + if right { + releaseSegments(segments) + return true + } + } + } + + _, step := utf8.DecodeRuneInString(s[offset+index:]) + offset += index + step + + releaseSegments(segments) + } + + return false +} + +func (self BTree) String() string { + const n string = "" + var l, r string + if self.Left == nil { + l = n + } else { + l = self.Left.String() + } + if self.Right == nil { + r = n + } else { + r = self.Right.String() + } + + return fmt.Sprintf("%s]>", l, self.Value, r) +} diff --git a/vendor/github.com/gobwas/glob/match/contains.go b/vendor/github.com/gobwas/glob/match/contains.go new file mode 100644 index 000000000..0998e95b0 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/contains.go @@ -0,0 +1,58 @@ +package match + +import ( + "fmt" + "strings" +) + +type Contains struct { + Needle string + Not bool +} + +func NewContains(needle string, not bool) Contains { + return Contains{needle, not} +} + +func (self Contains) Match(s string) bool { + return strings.Contains(s, self.Needle) != self.Not +} + +func (self Contains) Index(s string) (int, []int) { + var offset int + + idx := strings.Index(s, self.Needle) + + if !self.Not { + if idx == -1 { + return -1, nil + } + + offset = idx + len(self.Needle) + if len(s) <= offset { + return 0, []int{offset} + } + s = s[offset:] + } else if idx != -1 { + s = s[:idx] + } + + segments := acquireSegments(len(s) + 1) + for i := range s { + segments = append(segments, offset+i) + } + + return 0, append(segments, offset+len(s)) +} + +func (self Contains) Len() int { + return lenNo +} + +func (self Contains) String() string { + var not string + if self.Not { + not = "!" + } + return fmt.Sprintf("", not, self.Needle) +} diff --git a/vendor/github.com/gobwas/glob/match/every_of.go b/vendor/github.com/gobwas/glob/match/every_of.go new file mode 100644 index 000000000..7c968ee36 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/every_of.go @@ -0,0 +1,99 @@ +package match + +import ( + "fmt" +) + +type EveryOf struct { + Matchers Matchers +} + +func NewEveryOf(m ...Matcher) EveryOf { + return EveryOf{Matchers(m)} +} + +func (self *EveryOf) Add(m Matcher) error { + self.Matchers = append(self.Matchers, m) + return nil +} + +func (self EveryOf) Len() (l int) { + for _, m := range self.Matchers { + if ml := m.Len(); l > 0 { + l += ml + } else { + return -1 + } + } + + return +} + +func (self EveryOf) Index(s string) (int, []int) { + var index int + var offset int + + // make `in` with cap as len(s), + // cause it is the maximum size of output segments values + next := acquireSegments(len(s)) + current := acquireSegments(len(s)) + + sub := s + for i, m := range self.Matchers { + idx, seg := m.Index(sub) + if idx == -1 { + releaseSegments(next) + releaseSegments(current) + return -1, nil + } + + if i == 0 { + // we use copy here instead of `current = seg` + // cause seg is a slice from reusable buffer `in` + // and it could be overwritten in next iteration + current = append(current, seg...) + } else { + // clear the next + next = next[:0] + + delta := index - (idx + offset) + for _, ex := range current { + for _, n := range seg { + if ex+delta == n { + next = append(next, n) + } + } + } + + if len(next) == 0 { + releaseSegments(next) + releaseSegments(current) + return -1, nil + } + + current = append(current[:0], next...) + } + + index = idx + offset + sub = s[index:] + offset += idx + } + + releaseSegments(next) + + return index, current +} + +func (self EveryOf) Match(s string) bool { + for _, m := range self.Matchers { + if !m.Match(s) { + return false + } + } + + return true +} + +func (self EveryOf) String() string { + return fmt.Sprintf("", self.Matchers) +} diff --git a/vendor/github.com/gobwas/glob/match/list.go b/vendor/github.com/gobwas/glob/match/list.go new file mode 100644 index 000000000..7fd763ecd --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/list.go @@ -0,0 +1,49 @@ +package match + +import ( + "fmt" + "github.com/gobwas/glob/util/runes" + "unicode/utf8" +) + +type List struct { + List []rune + Not bool +} + +func NewList(list []rune, not bool) List { + return List{list, not} +} + +func (self List) Match(s string) bool { + r, w := utf8.DecodeRuneInString(s) + if len(s) > w { + return false + } + + inList := runes.IndexRune(self.List, r) != -1 + return inList == !self.Not +} + +func (self List) Len() int { + return lenOne +} + +func (self List) Index(s string) (int, []int) { + for i, r := range s { + if self.Not == (runes.IndexRune(self.List, r) == -1) { + return i, segmentsByRuneLength[utf8.RuneLen(r)] + } + } + + return -1, nil +} + +func (self List) String() string { + var not string + if self.Not { + not = "!" + } + + return fmt.Sprintf("", not, string(self.List)) +} diff --git a/vendor/github.com/gobwas/glob/match/match.go b/vendor/github.com/gobwas/glob/match/match.go new file mode 100644 index 000000000..f80e007fb --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/match.go @@ -0,0 +1,81 @@ +package match + +// todo common table of rune's length + +import ( + "fmt" + "strings" +) + +const lenOne = 1 +const lenZero = 0 +const lenNo = -1 + +type Matcher interface { + Match(string) bool + Index(string) (int, []int) + Len() int + String() string +} + +type Matchers []Matcher + +func (m Matchers) String() string { + var s []string + for _, matcher := range m { + s = append(s, fmt.Sprint(matcher)) + } + + return fmt.Sprintf("%s", strings.Join(s, ",")) +} + +// appendMerge merges and sorts given already SORTED and UNIQUE segments. +func appendMerge(target, sub []int) []int { + lt, ls := len(target), len(sub) + out := make([]int, 0, lt+ls) + + for x, y := 0, 0; x < lt || y < ls; { + if x >= lt { + out = append(out, sub[y:]...) + break + } + + if y >= ls { + out = append(out, target[x:]...) + break + } + + xValue := target[x] + yValue := sub[y] + + switch { + + case xValue == yValue: + out = append(out, xValue) + x++ + y++ + + case xValue < yValue: + out = append(out, xValue) + x++ + + case yValue < xValue: + out = append(out, yValue) + y++ + + } + } + + target = append(target[:0], out...) + + return target +} + +func reverseSegments(input []int) { + l := len(input) + m := l / 2 + + for i := 0; i < m; i++ { + input[i], input[l-i-1] = input[l-i-1], input[i] + } +} diff --git a/vendor/github.com/gobwas/glob/match/max.go b/vendor/github.com/gobwas/glob/match/max.go new file mode 100644 index 000000000..d72f69eff --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/max.go @@ -0,0 +1,49 @@ +package match + +import ( + "fmt" + "unicode/utf8" +) + +type Max struct { + Limit int +} + +func NewMax(l int) Max { + return Max{l} +} + +func (self Max) Match(s string) bool { + var l int + for range s { + l += 1 + if l > self.Limit { + return false + } + } + + return true +} + +func (self Max) Index(s string) (int, []int) { + segments := acquireSegments(self.Limit + 1) + segments = append(segments, 0) + var count int + for i, r := range s { + count++ + if count > self.Limit { + break + } + segments = append(segments, i+utf8.RuneLen(r)) + } + + return 0, segments +} + +func (self Max) Len() int { + return lenNo +} + +func (self Max) String() string { + return fmt.Sprintf("", self.Limit) +} diff --git a/vendor/github.com/gobwas/glob/match/min.go b/vendor/github.com/gobwas/glob/match/min.go new file mode 100644 index 000000000..db57ac8eb --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/min.go @@ -0,0 +1,57 @@ +package match + +import ( + "fmt" + "unicode/utf8" +) + +type Min struct { + Limit int +} + +func NewMin(l int) Min { + return Min{l} +} + +func (self Min) Match(s string) bool { + var l int + for range s { + l += 1 + if l >= self.Limit { + return true + } + } + + return false +} + +func (self Min) Index(s string) (int, []int) { + var count int + + c := len(s) - self.Limit + 1 + if c <= 0 { + return -1, nil + } + + segments := acquireSegments(c) + for i, r := range s { + count++ + if count >= self.Limit { + segments = append(segments, i+utf8.RuneLen(r)) + } + } + + if len(segments) == 0 { + return -1, nil + } + + return 0, segments +} + +func (self Min) Len() int { + return lenNo +} + +func (self Min) String() string { + return fmt.Sprintf("", self.Limit) +} diff --git a/vendor/github.com/gobwas/glob/match/nothing.go b/vendor/github.com/gobwas/glob/match/nothing.go new file mode 100644 index 000000000..0d4ecd36b --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/nothing.go @@ -0,0 +1,27 @@ +package match + +import ( + "fmt" +) + +type Nothing struct{} + +func NewNothing() Nothing { + return Nothing{} +} + +func (self Nothing) Match(s string) bool { + return len(s) == 0 +} + +func (self Nothing) Index(s string) (int, []int) { + return 0, segments0 +} + +func (self Nothing) Len() int { + return lenZero +} + +func (self Nothing) String() string { + return fmt.Sprintf("") +} diff --git a/vendor/github.com/gobwas/glob/match/prefix.go b/vendor/github.com/gobwas/glob/match/prefix.go new file mode 100644 index 000000000..a7347250e --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/prefix.go @@ -0,0 +1,50 @@ +package match + +import ( + "fmt" + "strings" + "unicode/utf8" +) + +type Prefix struct { + Prefix string +} + +func NewPrefix(p string) Prefix { + return Prefix{p} +} + +func (self Prefix) Index(s string) (int, []int) { + idx := strings.Index(s, self.Prefix) + if idx == -1 { + return -1, nil + } + + length := len(self.Prefix) + var sub string + if len(s) > idx+length { + sub = s[idx+length:] + } else { + sub = "" + } + + segments := acquireSegments(len(sub) + 1) + segments = append(segments, length) + for i, r := range sub { + segments = append(segments, length+i+utf8.RuneLen(r)) + } + + return idx, segments +} + +func (self Prefix) Len() int { + return lenNo +} + +func (self Prefix) Match(s string) bool { + return strings.HasPrefix(s, self.Prefix) +} + +func (self Prefix) String() string { + return fmt.Sprintf("", self.Prefix) +} diff --git a/vendor/github.com/gobwas/glob/match/prefix_any.go b/vendor/github.com/gobwas/glob/match/prefix_any.go new file mode 100644 index 000000000..8ee58fe1b --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/prefix_any.go @@ -0,0 +1,55 @@ +package match + +import ( + "fmt" + "strings" + "unicode/utf8" + + sutil "github.com/gobwas/glob/util/strings" +) + +type PrefixAny struct { + Prefix string + Separators []rune +} + +func NewPrefixAny(s string, sep []rune) PrefixAny { + return PrefixAny{s, sep} +} + +func (self PrefixAny) Index(s string) (int, []int) { + idx := strings.Index(s, self.Prefix) + if idx == -1 { + return -1, nil + } + + n := len(self.Prefix) + sub := s[idx+n:] + i := sutil.IndexAnyRunes(sub, self.Separators) + if i > -1 { + sub = sub[:i] + } + + seg := acquireSegments(len(sub) + 1) + seg = append(seg, n) + for i, r := range sub { + seg = append(seg, n+i+utf8.RuneLen(r)) + } + + return idx, seg +} + +func (self PrefixAny) Len() int { + return lenNo +} + +func (self PrefixAny) Match(s string) bool { + if !strings.HasPrefix(s, self.Prefix) { + return false + } + return sutil.IndexAnyRunes(s[len(self.Prefix):], self.Separators) == -1 +} + +func (self PrefixAny) String() string { + return fmt.Sprintf("", self.Prefix, string(self.Separators)) +} diff --git a/vendor/github.com/gobwas/glob/match/prefix_suffix.go b/vendor/github.com/gobwas/glob/match/prefix_suffix.go new file mode 100644 index 000000000..8208085a1 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/prefix_suffix.go @@ -0,0 +1,62 @@ +package match + +import ( + "fmt" + "strings" +) + +type PrefixSuffix struct { + Prefix, Suffix string +} + +func NewPrefixSuffix(p, s string) PrefixSuffix { + return PrefixSuffix{p, s} +} + +func (self PrefixSuffix) Index(s string) (int, []int) { + prefixIdx := strings.Index(s, self.Prefix) + if prefixIdx == -1 { + return -1, nil + } + + suffixLen := len(self.Suffix) + if suffixLen <= 0 { + return prefixIdx, []int{len(s) - prefixIdx} + } + + if (len(s) - prefixIdx) <= 0 { + return -1, nil + } + + segments := acquireSegments(len(s) - prefixIdx) + for sub := s[prefixIdx:]; ; { + suffixIdx := strings.LastIndex(sub, self.Suffix) + if suffixIdx == -1 { + break + } + + segments = append(segments, suffixIdx+suffixLen) + sub = sub[:suffixIdx] + } + + if len(segments) == 0 { + releaseSegments(segments) + return -1, nil + } + + reverseSegments(segments) + + return prefixIdx, segments +} + +func (self PrefixSuffix) Len() int { + return lenNo +} + +func (self PrefixSuffix) Match(s string) bool { + return strings.HasPrefix(s, self.Prefix) && strings.HasSuffix(s, self.Suffix) +} + +func (self PrefixSuffix) String() string { + return fmt.Sprintf("", self.Prefix, self.Suffix) +} diff --git a/vendor/github.com/gobwas/glob/match/range.go b/vendor/github.com/gobwas/glob/match/range.go new file mode 100644 index 000000000..ce30245a4 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/range.go @@ -0,0 +1,48 @@ +package match + +import ( + "fmt" + "unicode/utf8" +) + +type Range struct { + Lo, Hi rune + Not bool +} + +func NewRange(lo, hi rune, not bool) Range { + return Range{lo, hi, not} +} + +func (self Range) Len() int { + return lenOne +} + +func (self Range) Match(s string) bool { + r, w := utf8.DecodeRuneInString(s) + if len(s) > w { + return false + } + + inRange := r >= self.Lo && r <= self.Hi + + return inRange == !self.Not +} + +func (self Range) Index(s string) (int, []int) { + for i, r := range s { + if self.Not != (r >= self.Lo && r <= self.Hi) { + return i, segmentsByRuneLength[utf8.RuneLen(r)] + } + } + + return -1, nil +} + +func (self Range) String() string { + var not string + if self.Not { + not = "!" + } + return fmt.Sprintf("", not, string(self.Lo), string(self.Hi)) +} diff --git a/vendor/github.com/gobwas/glob/match/row.go b/vendor/github.com/gobwas/glob/match/row.go new file mode 100644 index 000000000..4379042e4 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/row.go @@ -0,0 +1,77 @@ +package match + +import ( + "fmt" +) + +type Row struct { + Matchers Matchers + RunesLength int + Segments []int +} + +func NewRow(len int, m ...Matcher) Row { + return Row{ + Matchers: Matchers(m), + RunesLength: len, + Segments: []int{len}, + } +} + +func (self Row) matchAll(s string) bool { + var idx int + for _, m := range self.Matchers { + length := m.Len() + + var next, i int + for next = range s[idx:] { + i++ + if i == length { + break + } + } + + if i < length || !m.Match(s[idx:idx+next+1]) { + return false + } + + idx += next + 1 + } + + return true +} + +func (self Row) lenOk(s string) bool { + var i int + for range s { + i++ + if i > self.RunesLength { + return false + } + } + return self.RunesLength == i +} + +func (self Row) Match(s string) bool { + return self.lenOk(s) && self.matchAll(s) +} + +func (self Row) Len() (l int) { + return self.RunesLength +} + +func (self Row) Index(s string) (int, []int) { + for i := range s { + if len(s[i:]) < self.RunesLength { + break + } + if self.matchAll(s[i:]) { + return i, self.Segments + } + } + return -1, nil +} + +func (self Row) String() string { + return fmt.Sprintf("", self.RunesLength, self.Matchers) +} diff --git a/vendor/github.com/gobwas/glob/match/segments.go b/vendor/github.com/gobwas/glob/match/segments.go new file mode 100644 index 000000000..9ea6f3094 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/segments.go @@ -0,0 +1,91 @@ +package match + +import ( + "sync" +) + +type SomePool interface { + Get() []int + Put([]int) +} + +var segmentsPools [1024]sync.Pool + +func toPowerOfTwo(v int) int { + v-- + v |= v >> 1 + v |= v >> 2 + v |= v >> 4 + v |= v >> 8 + v |= v >> 16 + v++ + + return v +} + +const ( + cacheFrom = 16 + cacheToAndHigher = 1024 + cacheFromIndex = 15 + cacheToAndHigherIndex = 1023 +) + +var ( + segments0 = []int{0} + segments1 = []int{1} + segments2 = []int{2} + segments3 = []int{3} + segments4 = []int{4} +) + +var segmentsByRuneLength [5][]int = [5][]int{ + 0: segments0, + 1: segments1, + 2: segments2, + 3: segments3, + 4: segments4, +} + +func init() { + for i := cacheToAndHigher; i >= cacheFrom; i >>= 1 { + func(i int) { + segmentsPools[i-1] = sync.Pool{New: func() interface{} { + return make([]int, 0, i) + }} + }(i) + } +} + +func getTableIndex(c int) int { + p := toPowerOfTwo(c) + switch { + case p >= cacheToAndHigher: + return cacheToAndHigherIndex + case p <= cacheFrom: + return cacheFromIndex + default: + return p - 1 + } +} + +func acquireSegments(c int) []int { + // make []int with less capacity than cacheFrom + // is faster than acquiring it from pool + if c < cacheFrom { + return make([]int, 0, c) + } + + return segmentsPools[getTableIndex(c)].Get().([]int)[:0] +} + +func releaseSegments(s []int) { + c := cap(s) + + // make []int with less capacity than cacheFrom + // is faster than acquiring it from pool + if c < cacheFrom { + return + } + + segmentsPools[getTableIndex(c)].Put(s) +} diff --git a/vendor/github.com/gobwas/glob/match/single.go b/vendor/github.com/gobwas/glob/match/single.go new file mode 100644 index 000000000..ee6e3954c --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/single.go @@ -0,0 +1,43 @@ +package match + +import ( + "fmt" + "github.com/gobwas/glob/util/runes" + "unicode/utf8" +) + +// single represents ? +type Single struct { + Separators []rune +} + +func NewSingle(s []rune) Single { + return Single{s} +} + +func (self Single) Match(s string) bool { + r, w := utf8.DecodeRuneInString(s) + if len(s) > w { + return false + } + + return runes.IndexRune(self.Separators, r) == -1 +} + +func (self Single) Len() int { + return lenOne +} + +func (self Single) Index(s string) (int, []int) { + for i, r := range s { + if runes.IndexRune(self.Separators, r) == -1 { + return i, segmentsByRuneLength[utf8.RuneLen(r)] + } + } + + return -1, nil +} + +func (self Single) String() string { + return fmt.Sprintf("", string(self.Separators)) +} diff --git a/vendor/github.com/gobwas/glob/match/suffix.go b/vendor/github.com/gobwas/glob/match/suffix.go new file mode 100644 index 000000000..85bea8c68 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/suffix.go @@ -0,0 +1,35 @@ +package match + +import ( + "fmt" + "strings" +) + +type Suffix struct { + Suffix string +} + +func NewSuffix(s string) Suffix { + return Suffix{s} +} + +func (self Suffix) Len() int { + return lenNo +} + +func (self Suffix) Match(s string) bool { + return strings.HasSuffix(s, self.Suffix) +} + +func (self Suffix) Index(s string) (int, []int) { + idx := strings.Index(s, self.Suffix) + if idx == -1 { + return -1, nil + } + + return 0, []int{idx + len(self.Suffix)} +} + +func (self Suffix) String() string { + return fmt.Sprintf("", self.Suffix) +} diff --git a/vendor/github.com/gobwas/glob/match/suffix_any.go b/vendor/github.com/gobwas/glob/match/suffix_any.go new file mode 100644 index 000000000..c5106f819 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/suffix_any.go @@ -0,0 +1,43 @@ +package match + +import ( + "fmt" + "strings" + + sutil "github.com/gobwas/glob/util/strings" +) + +type SuffixAny struct { + Suffix string + Separators []rune +} + +func NewSuffixAny(s string, sep []rune) SuffixAny { + return SuffixAny{s, sep} +} + +func (self SuffixAny) Index(s string) (int, []int) { + idx := strings.Index(s, self.Suffix) + if idx == -1 { + return -1, nil + } + + i := sutil.LastIndexAnyRunes(s[:idx], self.Separators) + 1 + + return i, []int{idx + len(self.Suffix) - i} +} + +func (self SuffixAny) Len() int { + return lenNo +} + +func (self SuffixAny) Match(s string) bool { + if !strings.HasSuffix(s, self.Suffix) { + return false + } + return sutil.IndexAnyRunes(s[:len(s)-len(self.Suffix)], self.Separators) == -1 +} + +func (self SuffixAny) String() string { + return fmt.Sprintf("", string(self.Separators), self.Suffix) +} diff --git a/vendor/github.com/gobwas/glob/match/super.go b/vendor/github.com/gobwas/glob/match/super.go new file mode 100644 index 000000000..3875950bb --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/super.go @@ -0,0 +1,33 @@ +package match + +import ( + "fmt" +) + +type Super struct{} + +func NewSuper() Super { + return Super{} +} + +func (self Super) Match(s string) bool { + return true +} + +func (self Super) Len() int { + return lenNo +} + +func (self Super) Index(s string) (int, []int) { + segments := acquireSegments(len(s) + 1) + for i := range s { + segments = append(segments, i) + } + segments = append(segments, len(s)) + + return 0, segments +} + +func (self Super) String() string { + return fmt.Sprintf("") +} diff --git a/vendor/github.com/gobwas/glob/match/text.go b/vendor/github.com/gobwas/glob/match/text.go new file mode 100644 index 000000000..0a17616d3 --- /dev/null +++ b/vendor/github.com/gobwas/glob/match/text.go @@ -0,0 +1,45 @@ +package match + +import ( + "fmt" + "strings" + "unicode/utf8" +) + +// raw represents raw string to match +type Text struct { + Str string + RunesLength int + BytesLength int + Segments []int +} + +func NewText(s string) Text { + return Text{ + Str: s, + RunesLength: utf8.RuneCountInString(s), + BytesLength: len(s), + Segments: []int{len(s)}, + } +} + +func (self Text) Match(s string) bool { + return self.Str == s +} + +func (self Text) Len() int { + return self.RunesLength +} + +func (self Text) Index(s string) (int, []int) { + index := strings.Index(s, self.Str) + if index == -1 { + return -1, nil + } + + return index, self.Segments +} + +func (self Text) String() string { + return fmt.Sprintf("", self.Str) +} diff --git a/vendor/github.com/gobwas/glob/readme.md b/vendor/github.com/gobwas/glob/readme.md new file mode 100644 index 000000000..f58144e73 --- /dev/null +++ b/vendor/github.com/gobwas/glob/readme.md @@ -0,0 +1,148 @@ +# glob.[go](https://golang.org) + +[![GoDoc][godoc-image]][godoc-url] [![Build Status][travis-image]][travis-url] + +> Go Globbing Library. + +## Install + +```shell + go get github.com/gobwas/glob +``` + +## Example + +```go + +package main + +import "github.com/gobwas/glob" + +func main() { + var g glob.Glob + + // create simple glob + g = glob.MustCompile("*.github.com") + g.Match("api.github.com") // true + + // quote meta characters and then create simple glob + g = glob.MustCompile(glob.QuoteMeta("*.github.com")) + g.Match("*.github.com") // true + + // create new glob with set of delimiters as ["."] + g = glob.MustCompile("api.*.com", '.') + g.Match("api.github.com") // true + g.Match("api.gi.hub.com") // false + + // create new glob with set of delimiters as ["."] + // but now with super wildcard + g = glob.MustCompile("api.**.com", '.') + g.Match("api.github.com") // true + g.Match("api.gi.hub.com") // true + + // create glob with single symbol wildcard + g = glob.MustCompile("?at") + g.Match("cat") // true + g.Match("fat") // true + g.Match("at") // false + + // create glob with single symbol wildcard and delimiters ['f'] + g = glob.MustCompile("?at", 'f') + g.Match("cat") // true + g.Match("fat") // false + g.Match("at") // false + + // create glob with character-list matchers + g = glob.MustCompile("[abc]at") + g.Match("cat") // true + g.Match("bat") // true + g.Match("fat") // false + g.Match("at") // false + + // create glob with character-list matchers + g = glob.MustCompile("[!abc]at") + g.Match("cat") // false + g.Match("bat") // false + g.Match("fat") // true + g.Match("at") // false + + // create glob with character-range matchers + g = glob.MustCompile("[a-c]at") + g.Match("cat") // true + g.Match("bat") // true + g.Match("fat") // false + g.Match("at") // false + + // create glob with character-range matchers + g = glob.MustCompile("[!a-c]at") + g.Match("cat") // false + g.Match("bat") // false + g.Match("fat") // true + g.Match("at") // false + + // create glob with pattern-alternatives list + g = glob.MustCompile("{cat,bat,[fr]at}") + g.Match("cat") // true + g.Match("bat") // true + g.Match("fat") // true + g.Match("rat") // true + g.Match("at") // false + g.Match("zat") // false +} + +``` + +## Performance + +This library is created for compile-once patterns. This means, that compilation could take time, but +strings matching is done faster, than in case when always parsing template. + +If you will not use compiled `glob.Glob` object, and do `g := glob.MustCompile(pattern); g.Match(...)` every time, then your code will be much more slower. + +Run `go test -bench=.` from source root to see the benchmarks: + +Pattern | Fixture | Match | Speed (ns/op) +--------|---------|-------|-------------- +`[a-z][!a-x]*cat*[h][!b]*eyes*` | `my cat has very bright eyes` | `true` | 432 +`[a-z][!a-x]*cat*[h][!b]*eyes*` | `my dog has very bright eyes` | `false` | 199 +`https://*.google.*` | `https://account.google.com` | `true` | 96 +`https://*.google.*` | `https://google.com` | `false` | 66 +`{https://*.google.*,*yandex.*,*yahoo.*,*mail.ru}` | `http://yahoo.com` | `true` | 163 +`{https://*.google.*,*yandex.*,*yahoo.*,*mail.ru}` | `http://google.com` | `false` | 197 +`{https://*gobwas.com,http://exclude.gobwas.com}` | `https://safe.gobwas.com` | `true` | 22 +`{https://*gobwas.com,http://exclude.gobwas.com}` | `http://safe.gobwas.com` | `false` | 24 +`abc*` | `abcdef` | `true` | 8.15 +`abc*` | `af` | `false` | 5.68 +`*def` | `abcdef` | `true` | 8.84 +`*def` | `af` | `false` | 5.74 +`ab*ef` | `abcdef` | `true` | 15.2 +`ab*ef` | `af` | `false` | 10.4 + +The same things with `regexp` package: + +Pattern | Fixture | Match | Speed (ns/op) +--------|---------|-------|-------------- +`^[a-z][^a-x].*cat.*[h][^b].*eyes.*$` | `my cat has very bright eyes` | `true` | 2553 +`^[a-z][^a-x].*cat.*[h][^b].*eyes.*$` | `my dog has very bright eyes` | `false` | 1383 +`^https:\/\/.*\.google\..*$` | `https://account.google.com` | `true` | 1205 +`^https:\/\/.*\.google\..*$` | `https://google.com` | `false` | 767 +`^(https:\/\/.*\.google\..*|.*yandex\..*|.*yahoo\..*|.*mail\.ru)$` | `http://yahoo.com` | `true` | 1435 +`^(https:\/\/.*\.google\..*|.*yandex\..*|.*yahoo\..*|.*mail\.ru)$` | `http://google.com` | `false` | 1674 +`^(https:\/\/.*gobwas\.com|http://exclude.gobwas.com)$` | `https://safe.gobwas.com` | `true` | 1039 +`^(https:\/\/.*gobwas\.com|http://exclude.gobwas.com)$` | `http://safe.gobwas.com` | `false` | 272 +`^abc.*$` | `abcdef` | `true` | 237 +`^abc.*$` | `af` | `false` | 100 +`^.*def$` | `abcdef` | `true` | 464 +`^.*def$` | `af` | `false` | 265 +`^ab.*ef$` | `abcdef` | `true` | 375 +`^ab.*ef$` | `af` | `false` | 145 + +[godoc-image]: https://godoc.org/github.com/gobwas/glob?status.svg +[godoc-url]: https://godoc.org/github.com/gobwas/glob +[travis-image]: https://travis-ci.org/gobwas/glob.svg?branch=master +[travis-url]: https://travis-ci.org/gobwas/glob + +## Syntax + +Syntax is inspired by [standard wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm), +except that `**` is aka super-asterisk, that do not sensitive for separators. \ No newline at end of file diff --git a/vendor/github.com/gobwas/glob/syntax/ast/ast.go b/vendor/github.com/gobwas/glob/syntax/ast/ast.go new file mode 100644 index 000000000..3220a694a --- /dev/null +++ b/vendor/github.com/gobwas/glob/syntax/ast/ast.go @@ -0,0 +1,122 @@ +package ast + +import ( + "bytes" + "fmt" +) + +type Node struct { + Parent *Node + Children []*Node + Value interface{} + Kind Kind +} + +func NewNode(k Kind, v interface{}, ch ...*Node) *Node { + n := &Node{ + Kind: k, + Value: v, + } + for _, c := range ch { + Insert(n, c) + } + return n +} + +func (a *Node) Equal(b *Node) bool { + if a.Kind != b.Kind { + return false + } + if a.Value != b.Value { + return false + } + if len(a.Children) != len(b.Children) { + return false + } + for i, c := range a.Children { + if !c.Equal(b.Children[i]) { + return false + } + } + return true +} + +func (a *Node) String() string { + var buf bytes.Buffer + buf.WriteString(a.Kind.String()) + if a.Value != nil { + buf.WriteString(" =") + buf.WriteString(fmt.Sprintf("%v", a.Value)) + } + if len(a.Children) > 0 { + buf.WriteString(" [") + for i, c := range a.Children { + if i > 0 { + buf.WriteString(", ") + } + buf.WriteString(c.String()) + } + buf.WriteString("]") + } + return buf.String() +} + +func Insert(parent *Node, children ...*Node) { + parent.Children = append(parent.Children, children...) + for _, ch := range children { + ch.Parent = parent + } +} + +type List struct { + Not bool + Chars string +} + +type Range struct { + Not bool + Lo, Hi rune +} + +type Text struct { + Text string +} + +type Kind int + +const ( + KindNothing Kind = iota + KindPattern + KindList + KindRange + KindText + KindAny + KindSuper + KindSingle + KindAnyOf +) + +func (k Kind) String() string { + switch k { + case KindNothing: + return "Nothing" + case KindPattern: + return "Pattern" + case KindList: + return "List" + case KindRange: + return "Range" + case KindText: + return "Text" + case KindAny: + return "Any" + case KindSuper: + return "Super" + case KindSingle: + return "Single" + case KindAnyOf: + return "AnyOf" + default: + return "" + } +} diff --git a/vendor/github.com/gobwas/glob/syntax/ast/parser.go b/vendor/github.com/gobwas/glob/syntax/ast/parser.go new file mode 100644 index 000000000..429b40943 --- /dev/null +++ b/vendor/github.com/gobwas/glob/syntax/ast/parser.go @@ -0,0 +1,157 @@ +package ast + +import ( + "errors" + "fmt" + "github.com/gobwas/glob/syntax/lexer" + "unicode/utf8" +) + +type Lexer interface { + Next() lexer.Token +} + +type parseFn func(*Node, Lexer) (parseFn, *Node, error) + +func Parse(lexer Lexer) (*Node, error) { + var parser parseFn + + root := NewNode(KindPattern, nil) + + var ( + tree *Node + err error + ) + for parser, tree = parserMain, root; parser != nil; { + parser, tree, err = parser(tree, lexer) + if err != nil { + return nil, err + } + } + + return root, nil +} + +func parserMain(tree *Node, lex Lexer) (parseFn, *Node, error) { + for { + token := lex.Next() + switch token.Type { + case lexer.EOF: + return nil, tree, nil + + case lexer.Error: + return nil, tree, errors.New(token.Raw) + + case lexer.Text: + Insert(tree, NewNode(KindText, Text{token.Raw})) + return parserMain, tree, nil + + case lexer.Any: + Insert(tree, NewNode(KindAny, nil)) + return parserMain, tree, nil + + case lexer.Super: + Insert(tree, NewNode(KindSuper, nil)) + return parserMain, tree, nil + + case lexer.Single: + Insert(tree, NewNode(KindSingle, nil)) + return parserMain, tree, nil + + case lexer.RangeOpen: + return parserRange, tree, nil + + case lexer.TermsOpen: + a := NewNode(KindAnyOf, nil) + Insert(tree, a) + + p := NewNode(KindPattern, nil) + Insert(a, p) + + return parserMain, p, nil + + case lexer.Separator: + p := NewNode(KindPattern, nil) + Insert(tree.Parent, p) + + return parserMain, p, nil + + case lexer.TermsClose: + return parserMain, tree.Parent.Parent, nil + + default: + return nil, tree, fmt.Errorf("unexpected token: %s", token) + } + } + return nil, tree, fmt.Errorf("unknown error") +} + +func parserRange(tree *Node, lex Lexer) (parseFn, *Node, error) { + var ( + not bool + lo rune + hi rune + chars string + ) + for { + token := lex.Next() + switch token.Type { + case lexer.EOF: + return nil, tree, errors.New("unexpected end") + + case lexer.Error: + return nil, tree, errors.New(token.Raw) + + case lexer.Not: + not = true + + case lexer.RangeLo: + r, w := utf8.DecodeRuneInString(token.Raw) + if len(token.Raw) > w { + return nil, tree, fmt.Errorf("unexpected length of lo character") + } + lo = r + + case lexer.RangeBetween: + // + + case lexer.RangeHi: + r, w := utf8.DecodeRuneInString(token.Raw) + if len(token.Raw) > w { + return nil, tree, fmt.Errorf("unexpected length of lo character") + } + + hi = r + + if hi < lo { + return nil, tree, fmt.Errorf("hi character '%s' should be greater than lo '%s'", string(hi), string(lo)) + } + + case lexer.Text: + chars = token.Raw + + case lexer.RangeClose: + isRange := lo != 0 && hi != 0 + isChars := chars != "" + + if isChars == isRange { + return nil, tree, fmt.Errorf("could not parse range") + } + + if isRange { + Insert(tree, NewNode(KindRange, Range{ + Lo: lo, + Hi: hi, + Not: not, + })) + } else { + Insert(tree, NewNode(KindList, List{ + Chars: chars, + Not: not, + })) + } + + return parserMain, tree, nil + } + } +} diff --git a/vendor/github.com/gobwas/glob/syntax/lexer/lexer.go b/vendor/github.com/gobwas/glob/syntax/lexer/lexer.go new file mode 100644 index 000000000..a1c8d1962 --- /dev/null +++ b/vendor/github.com/gobwas/glob/syntax/lexer/lexer.go @@ -0,0 +1,273 @@ +package lexer + +import ( + "bytes" + "fmt" + "github.com/gobwas/glob/util/runes" + "unicode/utf8" +) + +const ( + char_any = '*' + char_comma = ',' + char_single = '?' + char_escape = '\\' + char_range_open = '[' + char_range_close = ']' + char_terms_open = '{' + char_terms_close = '}' + char_range_not = '!' + char_range_between = '-' +) + +var specials = []byte{ + char_any, + char_single, + char_escape, + char_range_open, + char_range_close, + char_terms_open, + char_terms_close, +} + +func Special(c byte) bool { + return bytes.IndexByte(specials, c) != -1 +} + +type tokens []Token + +func (i *tokens) shift() (ret Token) { + ret = (*i)[0] + copy(*i, (*i)[1:]) + *i = (*i)[:len(*i)-1] + return +} + +func (i *tokens) push(v Token) { + *i = append(*i, v) +} + +func (i *tokens) empty() bool { + return len(*i) == 0 +} + +var eof rune = 0 + +type lexer struct { + data string + pos int + err error + + tokens tokens + termsLevel int + + lastRune rune + lastRuneSize int + hasRune bool +} + +func NewLexer(source string) *lexer { + l := &lexer{ + data: source, + tokens: tokens(make([]Token, 0, 4)), + } + return l +} + +func (l *lexer) Next() Token { + if l.err != nil { + return Token{Error, l.err.Error()} + } + if !l.tokens.empty() { + return l.tokens.shift() + } + + l.fetchItem() + return l.Next() +} + +func (l *lexer) peek() (r rune, w int) { + if l.pos == len(l.data) { + return eof, 0 + } + + r, w = utf8.DecodeRuneInString(l.data[l.pos:]) + if r == utf8.RuneError { + l.errorf("could not read rune") + r = eof + w = 0 + } + + return +} + +func (l *lexer) read() rune { + if l.hasRune { + l.hasRune = false + l.seek(l.lastRuneSize) + return l.lastRune + } + + r, s := l.peek() + l.seek(s) + + l.lastRune = r + l.lastRuneSize = s + + return r +} + +func (l *lexer) seek(w int) { + l.pos += w +} + +func (l *lexer) unread() { + if l.hasRune { + l.errorf("could not unread rune") + return + } + l.seek(-l.lastRuneSize) + l.hasRune = true +} + +func (l *lexer) errorf(f string, v ...interface{}) { + l.err = fmt.Errorf(f, v...) +} + +func (l *lexer) inTerms() bool { + return l.termsLevel > 0 +} + +func (l *lexer) termsEnter() { + l.termsLevel++ +} + +func (l *lexer) termsLeave() { + l.termsLevel-- +} + +var inTextBreakers = []rune{char_single, char_any, char_range_open, char_terms_open} +var inTermsBreakers = append(inTextBreakers, char_terms_close, char_comma) + +func (l *lexer) fetchItem() { + r := l.read() + switch { + case r == eof: + l.tokens.push(Token{EOF, ""}) + + case r == char_terms_open: + l.termsEnter() + l.tokens.push(Token{TermsOpen, string(r)}) + + case r == char_comma && l.inTerms(): + l.tokens.push(Token{Separator, string(r)}) + + case r == char_terms_close && l.inTerms(): + l.tokens.push(Token{TermsClose, string(r)}) + l.termsLeave() + + case r == char_range_open: + l.tokens.push(Token{RangeOpen, string(r)}) + l.fetchRange() + + case r == char_single: + l.tokens.push(Token{Single, string(r)}) + + case r == char_any: + if l.read() == char_any { + l.tokens.push(Token{Super, string(r) + string(r)}) + } else { + l.unread() + l.tokens.push(Token{Any, string(r)}) + } + + default: + l.unread() + + var breakers []rune + if l.inTerms() { + breakers = inTermsBreakers + } else { + breakers = inTextBreakers + } + l.fetchText(breakers) + } +} + +func (l *lexer) fetchRange() { + var wantHi bool + var wantClose bool + var seenNot bool + for { + r := l.read() + if r == eof { + l.errorf("unexpected end of input") + return + } + + if wantClose { + if r != char_range_close { + l.errorf("expected close range character") + } else { + l.tokens.push(Token{RangeClose, string(r)}) + } + return + } + + if wantHi { + l.tokens.push(Token{RangeHi, string(r)}) + wantClose = true + continue + } + + if !seenNot && r == char_range_not { + l.tokens.push(Token{Not, string(r)}) + seenNot = true + continue + } + + if n, w := l.peek(); n == char_range_between { + l.seek(w) + l.tokens.push(Token{RangeLo, string(r)}) + l.tokens.push(Token{RangeBetween, string(n)}) + wantHi = true + continue + } + + l.unread() // unread first peek and fetch as text + l.fetchText([]rune{char_range_close}) + wantClose = true + } +} + +func (l *lexer) fetchText(breakers []rune) { + var data []rune + var escaped bool + +reading: + for { + r := l.read() + if r == eof { + break + } + + if !escaped { + if r == char_escape { + escaped = true + continue + } + + if runes.IndexRune(breakers, r) != -1 { + l.unread() + break reading + } + } + + escaped = false + data = append(data, r) + } + + if len(data) > 0 { + l.tokens.push(Token{Text, string(data)}) + } +} diff --git a/vendor/github.com/gobwas/glob/syntax/lexer/token.go b/vendor/github.com/gobwas/glob/syntax/lexer/token.go new file mode 100644 index 000000000..2797c4e83 --- /dev/null +++ b/vendor/github.com/gobwas/glob/syntax/lexer/token.go @@ -0,0 +1,88 @@ +package lexer + +import "fmt" + +type TokenType int + +const ( + EOF TokenType = iota + Error + Text + Char + Any + Super + Single + Not + Separator + RangeOpen + RangeClose + RangeLo + RangeHi + RangeBetween + TermsOpen + TermsClose +) + +func (tt TokenType) String() string { + switch tt { + case EOF: + return "eof" + + case Error: + return "error" + + case Text: + return "text" + + case Char: + return "char" + + case Any: + return "any" + + case Super: + return "super" + + case Single: + return "single" + + case Not: + return "not" + + case Separator: + return "separator" + + case RangeOpen: + return "range_open" + + case RangeClose: + return "range_close" + + case RangeLo: + return "range_lo" + + case RangeHi: + return "range_hi" + + case RangeBetween: + return "range_between" + + case TermsOpen: + return "terms_open" + + case TermsClose: + return "terms_close" + + default: + return "undef" + } +} + +type Token struct { + Type TokenType + Raw string +} + +func (t Token) String() string { + return fmt.Sprintf("%v<%q>", t.Type, t.Raw) +} diff --git a/vendor/github.com/gobwas/glob/syntax/syntax.go b/vendor/github.com/gobwas/glob/syntax/syntax.go new file mode 100644 index 000000000..1d168b148 --- /dev/null +++ b/vendor/github.com/gobwas/glob/syntax/syntax.go @@ -0,0 +1,14 @@ +package syntax + +import ( + "github.com/gobwas/glob/syntax/ast" + "github.com/gobwas/glob/syntax/lexer" +) + +func Parse(s string) (*ast.Node, error) { + return ast.Parse(lexer.NewLexer(s)) +} + +func Special(b byte) bool { + return lexer.Special(b) +} diff --git a/vendor/github.com/gobwas/glob/util/runes/runes.go b/vendor/github.com/gobwas/glob/util/runes/runes.go new file mode 100644 index 000000000..a72355641 --- /dev/null +++ b/vendor/github.com/gobwas/glob/util/runes/runes.go @@ -0,0 +1,154 @@ +package runes + +func Index(s, needle []rune) int { + ls, ln := len(s), len(needle) + + switch { + case ln == 0: + return 0 + case ln == 1: + return IndexRune(s, needle[0]) + case ln == ls: + if Equal(s, needle) { + return 0 + } + return -1 + case ln > ls: + return -1 + } + +head: + for i := 0; i < ls && ls-i >= ln; i++ { + for y := 0; y < ln; y++ { + if s[i+y] != needle[y] { + continue head + } + } + + return i + } + + return -1 +} + +func LastIndex(s, needle []rune) int { + ls, ln := len(s), len(needle) + + switch { + case ln == 0: + if ls == 0 { + return 0 + } + return ls + case ln == 1: + return IndexLastRune(s, needle[0]) + case ln == ls: + if Equal(s, needle) { + return 0 + } + return -1 + case ln > ls: + return -1 + } + +head: + for i := ls - 1; i >= 0 && i >= ln; i-- { + for y := ln - 1; y >= 0; y-- { + if s[i-(ln-y-1)] != needle[y] { + continue head + } + } + + return i - ln + 1 + } + + return -1 +} + +// IndexAny returns the index of the first instance of any Unicode code point +// from chars in s, or -1 if no Unicode code point from chars is present in s. +func IndexAny(s, chars []rune) int { + if len(chars) > 0 { + for i, c := range s { + for _, m := range chars { + if c == m { + return i + } + } + } + } + return -1 +} + +func Contains(s, needle []rune) bool { + return Index(s, needle) >= 0 +} + +func Max(s []rune) (max rune) { + for _, r := range s { + if r > max { + max = r + } + } + + return +} + +func Min(s []rune) rune { + min := rune(-1) + for _, r := range s { + if min == -1 { + min = r + continue + } + + if r < min { + min = r + } + } + + return min +} + +func IndexRune(s []rune, r rune) int { + for i, c := range s { + if c == r { + return i + } + } + return -1 +} + +func IndexLastRune(s []rune, r rune) int { + for i := len(s) - 1; i >= 0; i-- { + if s[i] == r { + return i + } + } + + return -1 +} + +func Equal(a, b []rune) bool { + if len(a) == len(b) { + for i := 0; i < len(a); i++ { + if a[i] != b[i] { + return false + } + } + + return true + } + + return false +} + +// HasPrefix tests whether the string s begins with prefix. +func HasPrefix(s, prefix []rune) bool { + return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix) +} + +// HasSuffix tests whether the string s ends with suffix. +func HasSuffix(s, suffix []rune) bool { + return len(s) >= len(suffix) && Equal(s[len(s)-len(suffix):], suffix) +} diff --git a/vendor/github.com/gobwas/glob/util/strings/strings.go b/vendor/github.com/gobwas/glob/util/strings/strings.go new file mode 100644 index 000000000..e8ee1920b --- /dev/null +++ b/vendor/github.com/gobwas/glob/util/strings/strings.go @@ -0,0 +1,39 @@ +package strings + +import ( + "strings" + "unicode/utf8" +) + +func IndexAnyRunes(s string, rs []rune) int { + for _, r := range rs { + if i := strings.IndexRune(s, r); i != -1 { + return i + } + } + + return -1 +} + +func LastIndexAnyRunes(s string, rs []rune) int { + for _, r := range rs { + i := -1 + if 0 <= r && r < utf8.RuneSelf { + i = strings.LastIndexByte(s, byte(r)) + } else { + sub := s + for len(sub) > 0 { + j := strings.IndexRune(s, r) + if j == -1 { + break + } + i = j + sub = sub[i+1:] + } + } + if i != -1 { + return i + } + } + return -1 +} diff --git a/vendor/github.com/google/pprof/AUTHORS b/vendor/github.com/google/pprof/AUTHORS new file mode 100644 index 000000000..fd736cb1c --- /dev/null +++ b/vendor/github.com/google/pprof/AUTHORS @@ -0,0 +1,7 @@ +# This is the official list of pprof authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. +# Names should be added to this file as: +# Name or Organization +# The email address is not required for organizations. +Google Inc. \ No newline at end of file diff --git a/vendor/github.com/google/pprof/CONTRIBUTORS b/vendor/github.com/google/pprof/CONTRIBUTORS new file mode 100644 index 000000000..8c8c37d2c --- /dev/null +++ b/vendor/github.com/google/pprof/CONTRIBUTORS @@ -0,0 +1,16 @@ +# People who have agreed to one of the CLAs and can contribute patches. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# https://developers.google.com/open-source/cla/individual +# https://developers.google.com/open-source/cla/corporate +# +# Names should be added to this file as: +# Name +Raul Silvera +Tipp Moseley +Hyoun Kyu Cho +Martin Spier +Taco de Wolff +Andrew Hunter diff --git a/vendor/github.com/google/pprof/LICENSE b/vendor/github.com/google/pprof/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/google/pprof/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/google/pprof/profile/encode.go b/vendor/github.com/google/pprof/profile/encode.go new file mode 100644 index 000000000..8ce9d3cf3 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/encode.go @@ -0,0 +1,596 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package profile + +import ( + "errors" + "sort" + "strings" +) + +func (p *Profile) decoder() []decoder { + return profileDecoder +} + +// preEncode populates the unexported fields to be used by encode +// (with suffix X) from the corresponding exported fields. The +// exported fields are cleared up to facilitate testing. +func (p *Profile) preEncode() { + strings := make(map[string]int) + addString(strings, "") + + for _, st := range p.SampleType { + st.typeX = addString(strings, st.Type) + st.unitX = addString(strings, st.Unit) + } + + for _, s := range p.Sample { + s.labelX = nil + var keys []string + for k := range s.Label { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + vs := s.Label[k] + for _, v := range vs { + s.labelX = append(s.labelX, + label{ + keyX: addString(strings, k), + strX: addString(strings, v), + }, + ) + } + } + var numKeys []string + for k := range s.NumLabel { + numKeys = append(numKeys, k) + } + sort.Strings(numKeys) + for _, k := range numKeys { + keyX := addString(strings, k) + vs := s.NumLabel[k] + units := s.NumUnit[k] + for i, v := range vs { + var unitX int64 + if len(units) != 0 { + unitX = addString(strings, units[i]) + } + s.labelX = append(s.labelX, + label{ + keyX: keyX, + numX: v, + unitX: unitX, + }, + ) + } + } + s.locationIDX = make([]uint64, len(s.Location)) + for i, loc := range s.Location { + s.locationIDX[i] = loc.ID + } + } + + for _, m := range p.Mapping { + m.fileX = addString(strings, m.File) + m.buildIDX = addString(strings, m.BuildID) + } + + for _, l := range p.Location { + for i, ln := range l.Line { + if ln.Function != nil { + l.Line[i].functionIDX = ln.Function.ID + } else { + l.Line[i].functionIDX = 0 + } + } + if l.Mapping != nil { + l.mappingIDX = l.Mapping.ID + } else { + l.mappingIDX = 0 + } + } + for _, f := range p.Function { + f.nameX = addString(strings, f.Name) + f.systemNameX = addString(strings, f.SystemName) + f.filenameX = addString(strings, f.Filename) + } + + p.dropFramesX = addString(strings, p.DropFrames) + p.keepFramesX = addString(strings, p.KeepFrames) + + if pt := p.PeriodType; pt != nil { + pt.typeX = addString(strings, pt.Type) + pt.unitX = addString(strings, pt.Unit) + } + + p.commentX = nil + for _, c := range p.Comments { + p.commentX = append(p.commentX, addString(strings, c)) + } + + p.defaultSampleTypeX = addString(strings, p.DefaultSampleType) + p.docURLX = addString(strings, p.DocURL) + + p.stringTable = make([]string, len(strings)) + for s, i := range strings { + p.stringTable[i] = s + } +} + +func (p *Profile) encode(b *buffer) { + for _, x := range p.SampleType { + encodeMessage(b, 1, x) + } + for _, x := range p.Sample { + encodeMessage(b, 2, x) + } + for _, x := range p.Mapping { + encodeMessage(b, 3, x) + } + for _, x := range p.Location { + encodeMessage(b, 4, x) + } + for _, x := range p.Function { + encodeMessage(b, 5, x) + } + encodeStrings(b, 6, p.stringTable) + encodeInt64Opt(b, 7, p.dropFramesX) + encodeInt64Opt(b, 8, p.keepFramesX) + encodeInt64Opt(b, 9, p.TimeNanos) + encodeInt64Opt(b, 10, p.DurationNanos) + if pt := p.PeriodType; pt != nil && (pt.typeX != 0 || pt.unitX != 0) { + encodeMessage(b, 11, p.PeriodType) + } + encodeInt64Opt(b, 12, p.Period) + encodeInt64s(b, 13, p.commentX) + encodeInt64(b, 14, p.defaultSampleTypeX) + encodeInt64Opt(b, 15, p.docURLX) +} + +var profileDecoder = []decoder{ + nil, // 0 + // repeated ValueType sample_type = 1 + func(b *buffer, m message) error { + x := new(ValueType) + pp := m.(*Profile) + pp.SampleType = append(pp.SampleType, x) + return decodeMessage(b, x) + }, + // repeated Sample sample = 2 + func(b *buffer, m message) error { + x := new(Sample) + pp := m.(*Profile) + pp.Sample = append(pp.Sample, x) + return decodeMessage(b, x) + }, + // repeated Mapping mapping = 3 + func(b *buffer, m message) error { + x := new(Mapping) + pp := m.(*Profile) + pp.Mapping = append(pp.Mapping, x) + return decodeMessage(b, x) + }, + // repeated Location location = 4 + func(b *buffer, m message) error { + x := new(Location) + x.Line = b.tmpLines[:0] // Use shared space temporarily + pp := m.(*Profile) + pp.Location = append(pp.Location, x) + err := decodeMessage(b, x) + b.tmpLines = x.Line[:0] + // Copy to shrink size and detach from shared space. + x.Line = append([]Line(nil), x.Line...) + return err + }, + // repeated Function function = 5 + func(b *buffer, m message) error { + x := new(Function) + pp := m.(*Profile) + pp.Function = append(pp.Function, x) + return decodeMessage(b, x) + }, + // repeated string string_table = 6 + func(b *buffer, m message) error { + err := decodeStrings(b, &m.(*Profile).stringTable) + if err != nil { + return err + } + if m.(*Profile).stringTable[0] != "" { + return errors.New("string_table[0] must be ''") + } + return nil + }, + // int64 drop_frames = 7 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).dropFramesX) }, + // int64 keep_frames = 8 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).keepFramesX) }, + // int64 time_nanos = 9 + func(b *buffer, m message) error { + if m.(*Profile).TimeNanos != 0 { + return errConcatProfile + } + return decodeInt64(b, &m.(*Profile).TimeNanos) + }, + // int64 duration_nanos = 10 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).DurationNanos) }, + // ValueType period_type = 11 + func(b *buffer, m message) error { + x := new(ValueType) + pp := m.(*Profile) + pp.PeriodType = x + return decodeMessage(b, x) + }, + // int64 period = 12 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).Period) }, + // repeated int64 comment = 13 + func(b *buffer, m message) error { return decodeInt64s(b, &m.(*Profile).commentX) }, + // int64 defaultSampleType = 14 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).defaultSampleTypeX) }, + // string doc_link = 15; + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).docURLX) }, +} + +// postDecode takes the unexported fields populated by decode (with +// suffix X) and populates the corresponding exported fields. +// The unexported fields are cleared up to facilitate testing. +func (p *Profile) postDecode() error { + var err error + mappings := make(map[uint64]*Mapping, len(p.Mapping)) + mappingIds := make([]*Mapping, len(p.Mapping)+1) + for _, m := range p.Mapping { + m.File, err = getString(p.stringTable, &m.fileX, err) + m.BuildID, err = getString(p.stringTable, &m.buildIDX, err) + if m.ID < uint64(len(mappingIds)) { + mappingIds[m.ID] = m + } else { + mappings[m.ID] = m + } + + // If this a main linux kernel mapping with a relocation symbol suffix + // ("[kernel.kallsyms]_text"), extract said suffix. + // It is fairly hacky to handle at this level, but the alternatives appear even worse. + const prefix = "[kernel.kallsyms]" + if strings.HasPrefix(m.File, prefix) { + m.KernelRelocationSymbol = m.File[len(prefix):] + } + } + + functions := make(map[uint64]*Function, len(p.Function)) + functionIds := make([]*Function, len(p.Function)+1) + for _, f := range p.Function { + f.Name, err = getString(p.stringTable, &f.nameX, err) + f.SystemName, err = getString(p.stringTable, &f.systemNameX, err) + f.Filename, err = getString(p.stringTable, &f.filenameX, err) + if f.ID < uint64(len(functionIds)) { + functionIds[f.ID] = f + } else { + functions[f.ID] = f + } + } + + locations := make(map[uint64]*Location, len(p.Location)) + locationIds := make([]*Location, len(p.Location)+1) + for _, l := range p.Location { + if id := l.mappingIDX; id < uint64(len(mappingIds)) { + l.Mapping = mappingIds[id] + } else { + l.Mapping = mappings[id] + } + l.mappingIDX = 0 + for i, ln := range l.Line { + if id := ln.functionIDX; id != 0 { + l.Line[i].functionIDX = 0 + if id < uint64(len(functionIds)) { + l.Line[i].Function = functionIds[id] + } else { + l.Line[i].Function = functions[id] + } + } + } + if l.ID < uint64(len(locationIds)) { + locationIds[l.ID] = l + } else { + locations[l.ID] = l + } + } + + for _, st := range p.SampleType { + st.Type, err = getString(p.stringTable, &st.typeX, err) + st.Unit, err = getString(p.stringTable, &st.unitX, err) + } + + // Pre-allocate space for all locations. + numLocations := 0 + for _, s := range p.Sample { + numLocations += len(s.locationIDX) + } + locBuffer := make([]*Location, numLocations) + + for _, s := range p.Sample { + if len(s.labelX) > 0 { + labels := make(map[string][]string, len(s.labelX)) + numLabels := make(map[string][]int64, len(s.labelX)) + numUnits := make(map[string][]string, len(s.labelX)) + for _, l := range s.labelX { + var key, value string + key, err = getString(p.stringTable, &l.keyX, err) + if l.strX != 0 { + value, err = getString(p.stringTable, &l.strX, err) + labels[key] = append(labels[key], value) + } else if l.numX != 0 || l.unitX != 0 { + numValues := numLabels[key] + units := numUnits[key] + if l.unitX != 0 { + var unit string + unit, err = getString(p.stringTable, &l.unitX, err) + units = padStringArray(units, len(numValues)) + numUnits[key] = append(units, unit) + } + numLabels[key] = append(numLabels[key], l.numX) + } + } + if len(labels) > 0 { + s.Label = labels + } + if len(numLabels) > 0 { + s.NumLabel = numLabels + for key, units := range numUnits { + if len(units) > 0 { + numUnits[key] = padStringArray(units, len(numLabels[key])) + } + } + s.NumUnit = numUnits + } + } + + s.Location = locBuffer[:len(s.locationIDX)] + locBuffer = locBuffer[len(s.locationIDX):] + for i, lid := range s.locationIDX { + if lid < uint64(len(locationIds)) { + s.Location[i] = locationIds[lid] + } else { + s.Location[i] = locations[lid] + } + } + s.locationIDX = nil + } + + p.DropFrames, err = getString(p.stringTable, &p.dropFramesX, err) + p.KeepFrames, err = getString(p.stringTable, &p.keepFramesX, err) + + if pt := p.PeriodType; pt == nil { + p.PeriodType = &ValueType{} + } + + if pt := p.PeriodType; pt != nil { + pt.Type, err = getString(p.stringTable, &pt.typeX, err) + pt.Unit, err = getString(p.stringTable, &pt.unitX, err) + } + + for _, i := range p.commentX { + var c string + c, err = getString(p.stringTable, &i, err) + p.Comments = append(p.Comments, c) + } + + p.commentX = nil + p.DefaultSampleType, err = getString(p.stringTable, &p.defaultSampleTypeX, err) + p.DocURL, err = getString(p.stringTable, &p.docURLX, err) + p.stringTable = nil + return err +} + +// padStringArray pads arr with enough empty strings to make arr +// length l when arr's length is less than l. +func padStringArray(arr []string, l int) []string { + if l <= len(arr) { + return arr + } + return append(arr, make([]string, l-len(arr))...) +} + +func (p *ValueType) decoder() []decoder { + return valueTypeDecoder +} + +func (p *ValueType) encode(b *buffer) { + encodeInt64Opt(b, 1, p.typeX) + encodeInt64Opt(b, 2, p.unitX) +} + +var valueTypeDecoder = []decoder{ + nil, // 0 + // optional int64 type = 1 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*ValueType).typeX) }, + // optional int64 unit = 2 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*ValueType).unitX) }, +} + +func (p *Sample) decoder() []decoder { + return sampleDecoder +} + +func (p *Sample) encode(b *buffer) { + encodeUint64s(b, 1, p.locationIDX) + encodeInt64s(b, 2, p.Value) + for _, x := range p.labelX { + encodeMessage(b, 3, x) + } +} + +var sampleDecoder = []decoder{ + nil, // 0 + // repeated uint64 location = 1 + func(b *buffer, m message) error { return decodeUint64s(b, &m.(*Sample).locationIDX) }, + // repeated int64 value = 2 + func(b *buffer, m message) error { return decodeInt64s(b, &m.(*Sample).Value) }, + // repeated Label label = 3 + func(b *buffer, m message) error { + s := m.(*Sample) + n := len(s.labelX) + s.labelX = append(s.labelX, label{}) + return decodeMessage(b, &s.labelX[n]) + }, +} + +func (p label) decoder() []decoder { + return labelDecoder +} + +func (p label) encode(b *buffer) { + encodeInt64Opt(b, 1, p.keyX) + encodeInt64Opt(b, 2, p.strX) + encodeInt64Opt(b, 3, p.numX) + encodeInt64Opt(b, 4, p.unitX) +} + +var labelDecoder = []decoder{ + nil, // 0 + // optional int64 key = 1 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*label).keyX) }, + // optional int64 str = 2 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*label).strX) }, + // optional int64 num = 3 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*label).numX) }, + // optional int64 num = 4 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*label).unitX) }, +} + +func (p *Mapping) decoder() []decoder { + return mappingDecoder +} + +func (p *Mapping) encode(b *buffer) { + encodeUint64Opt(b, 1, p.ID) + encodeUint64Opt(b, 2, p.Start) + encodeUint64Opt(b, 3, p.Limit) + encodeUint64Opt(b, 4, p.Offset) + encodeInt64Opt(b, 5, p.fileX) + encodeInt64Opt(b, 6, p.buildIDX) + encodeBoolOpt(b, 7, p.HasFunctions) + encodeBoolOpt(b, 8, p.HasFilenames) + encodeBoolOpt(b, 9, p.HasLineNumbers) + encodeBoolOpt(b, 10, p.HasInlineFrames) +} + +var mappingDecoder = []decoder{ + nil, // 0 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Mapping).ID) }, // optional uint64 id = 1 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Mapping).Start) }, // optional uint64 memory_offset = 2 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Mapping).Limit) }, // optional uint64 memory_limit = 3 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Mapping).Offset) }, // optional uint64 file_offset = 4 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Mapping).fileX) }, // optional int64 filename = 5 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Mapping).buildIDX) }, // optional int64 build_id = 6 + func(b *buffer, m message) error { return decodeBool(b, &m.(*Mapping).HasFunctions) }, // optional bool has_functions = 7 + func(b *buffer, m message) error { return decodeBool(b, &m.(*Mapping).HasFilenames) }, // optional bool has_filenames = 8 + func(b *buffer, m message) error { return decodeBool(b, &m.(*Mapping).HasLineNumbers) }, // optional bool has_line_numbers = 9 + func(b *buffer, m message) error { return decodeBool(b, &m.(*Mapping).HasInlineFrames) }, // optional bool has_inline_frames = 10 +} + +func (p *Location) decoder() []decoder { + return locationDecoder +} + +func (p *Location) encode(b *buffer) { + encodeUint64Opt(b, 1, p.ID) + encodeUint64Opt(b, 2, p.mappingIDX) + encodeUint64Opt(b, 3, p.Address) + for i := range p.Line { + encodeMessage(b, 4, &p.Line[i]) + } + encodeBoolOpt(b, 5, p.IsFolded) +} + +var locationDecoder = []decoder{ + nil, // 0 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Location).ID) }, // optional uint64 id = 1; + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Location).mappingIDX) }, // optional uint64 mapping_id = 2; + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Location).Address) }, // optional uint64 address = 3; + func(b *buffer, m message) error { // repeated Line line = 4 + pp := m.(*Location) + n := len(pp.Line) + pp.Line = append(pp.Line, Line{}) + return decodeMessage(b, &pp.Line[n]) + }, + func(b *buffer, m message) error { return decodeBool(b, &m.(*Location).IsFolded) }, // optional bool is_folded = 5; +} + +func (p *Line) decoder() []decoder { + return lineDecoder +} + +func (p *Line) encode(b *buffer) { + encodeUint64Opt(b, 1, p.functionIDX) + encodeInt64Opt(b, 2, p.Line) + encodeInt64Opt(b, 3, p.Column) +} + +var lineDecoder = []decoder{ + nil, // 0 + // optional uint64 function_id = 1 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Line).functionIDX) }, + // optional int64 line = 2 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Line).Line) }, + // optional int64 column = 3 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Line).Column) }, +} + +func (p *Function) decoder() []decoder { + return functionDecoder +} + +func (p *Function) encode(b *buffer) { + encodeUint64Opt(b, 1, p.ID) + encodeInt64Opt(b, 2, p.nameX) + encodeInt64Opt(b, 3, p.systemNameX) + encodeInt64Opt(b, 4, p.filenameX) + encodeInt64Opt(b, 5, p.StartLine) +} + +var functionDecoder = []decoder{ + nil, // 0 + // optional uint64 id = 1 + func(b *buffer, m message) error { return decodeUint64(b, &m.(*Function).ID) }, + // optional int64 function_name = 2 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Function).nameX) }, + // optional int64 function_system_name = 3 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Function).systemNameX) }, + // repeated int64 filename = 4 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Function).filenameX) }, + // optional int64 start_line = 5 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Function).StartLine) }, +} + +func addString(strings map[string]int, s string) int64 { + i, ok := strings[s] + if !ok { + i = len(strings) + strings[s] = i + } + return int64(i) +} + +func getString(strings []string, strng *int64, err error) (string, error) { + if err != nil { + return "", err + } + s := int(*strng) + if s < 0 || s >= len(strings) { + return "", errMalformed + } + *strng = 0 + return strings[s], nil +} diff --git a/vendor/github.com/google/pprof/profile/filter.go b/vendor/github.com/google/pprof/profile/filter.go new file mode 100644 index 000000000..c794b9390 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/filter.go @@ -0,0 +1,274 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package profile + +// Implements methods to filter samples from profiles. + +import "regexp" + +// FilterSamplesByName filters the samples in a profile and only keeps +// samples where at least one frame matches focus but none match ignore. +// Returns true is the corresponding regexp matched at least one sample. +func (p *Profile) FilterSamplesByName(focus, ignore, hide, show *regexp.Regexp) (fm, im, hm, hnm bool) { + if focus == nil && ignore == nil && hide == nil && show == nil { + fm = true // Missing focus implies a match + return + } + focusOrIgnore := make(map[uint64]bool) + hidden := make(map[uint64]bool) + for _, l := range p.Location { + if ignore != nil && l.matchesName(ignore) { + im = true + focusOrIgnore[l.ID] = false + } else if focus == nil || l.matchesName(focus) { + fm = true + focusOrIgnore[l.ID] = true + } + + if hide != nil && l.matchesName(hide) { + hm = true + l.Line = l.unmatchedLines(hide) + if len(l.Line) == 0 { + hidden[l.ID] = true + } + } + if show != nil { + l.Line = l.matchedLines(show) + if len(l.Line) == 0 { + hidden[l.ID] = true + } else { + hnm = true + } + } + } + + s := make([]*Sample, 0, len(p.Sample)) + for _, sample := range p.Sample { + if focusedAndNotIgnored(sample.Location, focusOrIgnore) { + if len(hidden) > 0 { + var locs []*Location + for _, loc := range sample.Location { + if !hidden[loc.ID] { + locs = append(locs, loc) + } + } + if len(locs) == 0 { + // Remove sample with no locations (by not adding it to s). + continue + } + sample.Location = locs + } + s = append(s, sample) + } + } + p.Sample = s + + return +} + +// ShowFrom drops all stack frames above the highest matching frame and returns +// whether a match was found. If showFrom is nil it returns false and does not +// modify the profile. +// +// Example: consider a sample with frames [A, B, C, B], where A is the root. +// ShowFrom(nil) returns false and has frames [A, B, C, B]. +// ShowFrom(A) returns true and has frames [A, B, C, B]. +// ShowFrom(B) returns true and has frames [B, C, B]. +// ShowFrom(C) returns true and has frames [C, B]. +// ShowFrom(D) returns false and drops the sample because no frames remain. +func (p *Profile) ShowFrom(showFrom *regexp.Regexp) (matched bool) { + if showFrom == nil { + return false + } + // showFromLocs stores location IDs that matched ShowFrom. + showFromLocs := make(map[uint64]bool) + // Apply to locations. + for _, loc := range p.Location { + if filterShowFromLocation(loc, showFrom) { + showFromLocs[loc.ID] = true + matched = true + } + } + // For all samples, strip locations after the highest matching one. + s := make([]*Sample, 0, len(p.Sample)) + for _, sample := range p.Sample { + for i := len(sample.Location) - 1; i >= 0; i-- { + if showFromLocs[sample.Location[i].ID] { + sample.Location = sample.Location[:i+1] + s = append(s, sample) + break + } + } + } + p.Sample = s + return matched +} + +// filterShowFromLocation tests a showFrom regex against a location, removes +// lines after the last match and returns whether a match was found. If the +// mapping is matched, then all lines are kept. +func filterShowFromLocation(loc *Location, showFrom *regexp.Regexp) bool { + if m := loc.Mapping; m != nil && showFrom.MatchString(m.File) { + return true + } + if i := loc.lastMatchedLineIndex(showFrom); i >= 0 { + loc.Line = loc.Line[:i+1] + return true + } + return false +} + +// lastMatchedLineIndex returns the index of the last line that matches a regex, +// or -1 if no match is found. +func (loc *Location) lastMatchedLineIndex(re *regexp.Regexp) int { + for i := len(loc.Line) - 1; i >= 0; i-- { + if fn := loc.Line[i].Function; fn != nil { + if re.MatchString(fn.Name) || re.MatchString(fn.Filename) { + return i + } + } + } + return -1 +} + +// FilterTagsByName filters the tags in a profile and only keeps +// tags that match show and not hide. +func (p *Profile) FilterTagsByName(show, hide *regexp.Regexp) (sm, hm bool) { + matchRemove := func(name string) bool { + matchShow := show == nil || show.MatchString(name) + matchHide := hide != nil && hide.MatchString(name) + + if matchShow { + sm = true + } + if matchHide { + hm = true + } + return !matchShow || matchHide + } + for _, s := range p.Sample { + for lab := range s.Label { + if matchRemove(lab) { + delete(s.Label, lab) + } + } + for lab := range s.NumLabel { + if matchRemove(lab) { + delete(s.NumLabel, lab) + } + } + } + return +} + +// matchesName returns whether the location matches the regular +// expression. It checks any available function names, file names, and +// mapping object filename. +func (loc *Location) matchesName(re *regexp.Regexp) bool { + for _, ln := range loc.Line { + if fn := ln.Function; fn != nil { + if re.MatchString(fn.Name) || re.MatchString(fn.Filename) { + return true + } + } + } + if m := loc.Mapping; m != nil && re.MatchString(m.File) { + return true + } + return false +} + +// unmatchedLines returns the lines in the location that do not match +// the regular expression. +func (loc *Location) unmatchedLines(re *regexp.Regexp) []Line { + if m := loc.Mapping; m != nil && re.MatchString(m.File) { + return nil + } + var lines []Line + for _, ln := range loc.Line { + if fn := ln.Function; fn != nil { + if re.MatchString(fn.Name) || re.MatchString(fn.Filename) { + continue + } + } + lines = append(lines, ln) + } + return lines +} + +// matchedLines returns the lines in the location that match +// the regular expression. +func (loc *Location) matchedLines(re *regexp.Regexp) []Line { + if m := loc.Mapping; m != nil && re.MatchString(m.File) { + return loc.Line + } + var lines []Line + for _, ln := range loc.Line { + if fn := ln.Function; fn != nil { + if !re.MatchString(fn.Name) && !re.MatchString(fn.Filename) { + continue + } + } + lines = append(lines, ln) + } + return lines +} + +// focusedAndNotIgnored looks up a slice of ids against a map of +// focused/ignored locations. The map only contains locations that are +// explicitly focused or ignored. Returns whether there is at least +// one focused location but no ignored locations. +func focusedAndNotIgnored(locs []*Location, m map[uint64]bool) bool { + var f bool + for _, loc := range locs { + if focus, focusOrIgnore := m[loc.ID]; focusOrIgnore { + if focus { + // Found focused location. Must keep searching in case there + // is an ignored one as well. + f = true + } else { + // Found ignored location. Can return false right away. + return false + } + } + } + return f +} + +// TagMatch selects tags for filtering +type TagMatch func(s *Sample) bool + +// FilterSamplesByTag removes all samples from the profile, except +// those that match focus and do not match the ignore regular +// expression. +func (p *Profile) FilterSamplesByTag(focus, ignore TagMatch) (fm, im bool) { + samples := make([]*Sample, 0, len(p.Sample)) + for _, s := range p.Sample { + focused, ignored := true, false + if focus != nil { + focused = focus(s) + } + if ignore != nil { + ignored = ignore(s) + } + fm = fm || focused + im = im || ignored + if focused && !ignored { + samples = append(samples, s) + } + } + p.Sample = samples + return +} diff --git a/vendor/github.com/google/pprof/profile/index.go b/vendor/github.com/google/pprof/profile/index.go new file mode 100644 index 000000000..bef1d6046 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/index.go @@ -0,0 +1,64 @@ +// Copyright 2016 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package profile + +import ( + "fmt" + "strconv" + "strings" +) + +// SampleIndexByName returns the appropriate index for a value of sample index. +// If numeric, it returns the number, otherwise it looks up the text in the +// profile sample types. +func (p *Profile) SampleIndexByName(sampleIndex string) (int, error) { + if sampleIndex == "" { + if dst := p.DefaultSampleType; dst != "" { + for i, t := range sampleTypes(p) { + if t == dst { + return i, nil + } + } + } + // By default select the last sample value + return len(p.SampleType) - 1, nil + } + if i, err := strconv.Atoi(sampleIndex); err == nil { + if i < 0 || i >= len(p.SampleType) { + return 0, fmt.Errorf("sample_index %s is outside the range [0..%d]", sampleIndex, len(p.SampleType)-1) + } + return i, nil + } + + // Remove the inuse_ prefix to support legacy pprof options + // "inuse_space" and "inuse_objects" for profiles containing types + // "space" and "objects". + noInuse := strings.TrimPrefix(sampleIndex, "inuse_") + for i, t := range p.SampleType { + if t.Type == sampleIndex || t.Type == noInuse { + return i, nil + } + } + + return 0, fmt.Errorf("sample_index %q must be one of: %v", sampleIndex, sampleTypes(p)) +} + +func sampleTypes(p *Profile) []string { + types := make([]string, len(p.SampleType)) + for i, t := range p.SampleType { + types[i] = t.Type + } + return types +} diff --git a/vendor/github.com/google/pprof/profile/legacy_java_profile.go b/vendor/github.com/google/pprof/profile/legacy_java_profile.go new file mode 100644 index 000000000..4580bab18 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/legacy_java_profile.go @@ -0,0 +1,315 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file implements parsers to convert java legacy profiles into +// the profile.proto format. + +package profile + +import ( + "bytes" + "fmt" + "io" + "path/filepath" + "regexp" + "strconv" + "strings" +) + +var ( + attributeRx = regexp.MustCompile(`([\w ]+)=([\w ]+)`) + javaSampleRx = regexp.MustCompile(` *(\d+) +(\d+) +@ +([ x0-9a-f]*)`) + javaLocationRx = regexp.MustCompile(`^\s*0x([[:xdigit:]]+)\s+(.*)\s*$`) + javaLocationFileLineRx = regexp.MustCompile(`^(.*)\s+\((.+):(-?[[:digit:]]+)\)$`) + javaLocationPathRx = regexp.MustCompile(`^(.*)\s+\((.*)\)$`) +) + +// javaCPUProfile returns a new Profile from profilez data. +// b is the profile bytes after the header, period is the profiling +// period, and parse is a function to parse 8-byte chunks from the +// profile in its native endianness. +func javaCPUProfile(b []byte, period int64, parse func(b []byte) (uint64, []byte)) (*Profile, error) { + p := &Profile{ + Period: period * 1000, + PeriodType: &ValueType{Type: "cpu", Unit: "nanoseconds"}, + SampleType: []*ValueType{{Type: "samples", Unit: "count"}, {Type: "cpu", Unit: "nanoseconds"}}, + } + var err error + var locs map[uint64]*Location + if b, locs, err = parseCPUSamples(b, parse, false, p); err != nil { + return nil, err + } + + if err = parseJavaLocations(b, locs, p); err != nil { + return nil, err + } + + // Strip out addresses for better merge. + if err = p.Aggregate(true, true, true, true, false, false); err != nil { + return nil, err + } + + return p, nil +} + +// parseJavaProfile returns a new profile from heapz or contentionz +// data. b is the profile bytes after the header. +func parseJavaProfile(b []byte) (*Profile, error) { + h := bytes.SplitAfterN(b, []byte("\n"), 2) + if len(h) < 2 { + return nil, errUnrecognized + } + + p := &Profile{ + PeriodType: &ValueType{}, + } + header := string(bytes.TrimSpace(h[0])) + + var err error + var pType string + switch header { + case "--- heapz 1 ---": + pType = "heap" + case "--- contentionz 1 ---": + pType = "contention" + default: + return nil, errUnrecognized + } + + if b, err = parseJavaHeader(pType, h[1], p); err != nil { + return nil, err + } + var locs map[uint64]*Location + if b, locs, err = parseJavaSamples(pType, b, p); err != nil { + return nil, err + } + if err = parseJavaLocations(b, locs, p); err != nil { + return nil, err + } + + // Strip out addresses for better merge. + if err = p.Aggregate(true, true, true, true, false, false); err != nil { + return nil, err + } + + return p, nil +} + +// parseJavaHeader parses the attribute section on a java profile and +// populates a profile. Returns the remainder of the buffer after all +// attributes. +func parseJavaHeader(pType string, b []byte, p *Profile) ([]byte, error) { + nextNewLine := bytes.IndexByte(b, byte('\n')) + for nextNewLine != -1 { + line := string(bytes.TrimSpace(b[0:nextNewLine])) + if line != "" { + h := attributeRx.FindStringSubmatch(line) + if h == nil { + // Not a valid attribute, exit. + return b, nil + } + + attribute, value := strings.TrimSpace(h[1]), strings.TrimSpace(h[2]) + var err error + switch pType + "/" + attribute { + case "heap/format", "cpu/format", "contention/format": + if value != "java" { + return nil, errUnrecognized + } + case "heap/resolution": + p.SampleType = []*ValueType{ + {Type: "inuse_objects", Unit: "count"}, + {Type: "inuse_space", Unit: value}, + } + case "contention/resolution": + p.SampleType = []*ValueType{ + {Type: "contentions", Unit: "count"}, + {Type: "delay", Unit: value}, + } + case "contention/sampling period": + p.PeriodType = &ValueType{ + Type: "contentions", Unit: "count", + } + if p.Period, err = strconv.ParseInt(value, 0, 64); err != nil { + return nil, fmt.Errorf("failed to parse attribute %s: %v", line, err) + } + case "contention/ms since reset": + millis, err := strconv.ParseInt(value, 0, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse attribute %s: %v", line, err) + } + p.DurationNanos = millis * 1000 * 1000 + default: + return nil, errUnrecognized + } + } + // Grab next line. + b = b[nextNewLine+1:] + nextNewLine = bytes.IndexByte(b, byte('\n')) + } + return b, nil +} + +// parseJavaSamples parses the samples from a java profile and +// populates the Samples in a profile. Returns the remainder of the +// buffer after the samples. +func parseJavaSamples(pType string, b []byte, p *Profile) ([]byte, map[uint64]*Location, error) { + nextNewLine := bytes.IndexByte(b, byte('\n')) + locs := make(map[uint64]*Location) + for nextNewLine != -1 { + line := string(bytes.TrimSpace(b[0:nextNewLine])) + if line != "" { + sample := javaSampleRx.FindStringSubmatch(line) + if sample == nil { + // Not a valid sample, exit. + return b, locs, nil + } + + // Java profiles have data/fields inverted compared to other + // profile types. + var err error + value1, value2, value3 := sample[2], sample[1], sample[3] + addrs, err := parseHexAddresses(value3) + if err != nil { + return nil, nil, fmt.Errorf("malformed sample: %s: %v", line, err) + } + + var sloc []*Location + for _, addr := range addrs { + loc := locs[addr] + if locs[addr] == nil { + loc = &Location{ + Address: addr, + } + p.Location = append(p.Location, loc) + locs[addr] = loc + } + sloc = append(sloc, loc) + } + s := &Sample{ + Value: make([]int64, 2), + Location: sloc, + } + + if s.Value[0], err = strconv.ParseInt(value1, 0, 64); err != nil { + return nil, nil, fmt.Errorf("parsing sample %s: %v", line, err) + } + if s.Value[1], err = strconv.ParseInt(value2, 0, 64); err != nil { + return nil, nil, fmt.Errorf("parsing sample %s: %v", line, err) + } + + switch pType { + case "heap": + const javaHeapzSamplingRate = 524288 // 512K + if s.Value[0] == 0 { + return nil, nil, fmt.Errorf("parsing sample %s: second value must be non-zero", line) + } + s.NumLabel = map[string][]int64{"bytes": {s.Value[1] / s.Value[0]}} + s.Value[0], s.Value[1] = scaleHeapSample(s.Value[0], s.Value[1], javaHeapzSamplingRate) + case "contention": + if period := p.Period; period != 0 { + s.Value[0] = s.Value[0] * p.Period + s.Value[1] = s.Value[1] * p.Period + } + } + p.Sample = append(p.Sample, s) + } + // Grab next line. + b = b[nextNewLine+1:] + nextNewLine = bytes.IndexByte(b, byte('\n')) + } + return b, locs, nil +} + +// parseJavaLocations parses the location information in a java +// profile and populates the Locations in a profile. It uses the +// location addresses from the profile as both the ID of each +// location. +func parseJavaLocations(b []byte, locs map[uint64]*Location, p *Profile) error { + r := bytes.NewBuffer(b) + fns := make(map[string]*Function) + for { + line, err := r.ReadString('\n') + if err != nil { + if err != io.EOF { + return err + } + if line == "" { + break + } + } + + if line = strings.TrimSpace(line); line == "" { + continue + } + + jloc := javaLocationRx.FindStringSubmatch(line) + if len(jloc) != 3 { + continue + } + addr, err := strconv.ParseUint(jloc[1], 16, 64) + if err != nil { + return fmt.Errorf("parsing sample %s: %v", line, err) + } + loc := locs[addr] + if loc == nil { + // Unused/unseen + continue + } + var lineFunc, lineFile string + var lineNo int64 + + if fileLine := javaLocationFileLineRx.FindStringSubmatch(jloc[2]); len(fileLine) == 4 { + // Found a line of the form: "function (file:line)" + lineFunc, lineFile = fileLine[1], fileLine[2] + if n, err := strconv.ParseInt(fileLine[3], 10, 64); err == nil && n > 0 { + lineNo = n + } + } else if filePath := javaLocationPathRx.FindStringSubmatch(jloc[2]); len(filePath) == 3 { + // If there's not a file:line, it's a shared library path. + // The path isn't interesting, so just give the .so. + lineFunc, lineFile = filePath[1], filepath.Base(filePath[2]) + } else if strings.Contains(jloc[2], "generated stub/JIT") { + lineFunc = "STUB" + } else { + // Treat whole line as the function name. This is used by the + // java agent for internal states such as "GC" or "VM". + lineFunc = jloc[2] + } + fn := fns[lineFunc] + + if fn == nil { + fn = &Function{ + Name: lineFunc, + SystemName: lineFunc, + Filename: lineFile, + } + fns[lineFunc] = fn + p.Function = append(p.Function, fn) + } + loc.Line = []Line{ + { + Function: fn, + Line: lineNo, + }, + } + loc.Address = 0 + } + + p.remapLocationIDs() + p.remapFunctionIDs() + p.remapMappingIDs() + + return nil +} diff --git a/vendor/github.com/google/pprof/profile/legacy_profile.go b/vendor/github.com/google/pprof/profile/legacy_profile.go new file mode 100644 index 000000000..8d07fd6c2 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/legacy_profile.go @@ -0,0 +1,1228 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file implements parsers to convert legacy profiles into the +// profile.proto format. + +package profile + +import ( + "bufio" + "bytes" + "fmt" + "io" + "math" + "regexp" + "strconv" + "strings" +) + +var ( + countStartRE = regexp.MustCompile(`\A(\S+) profile: total \d+\z`) + countRE = regexp.MustCompile(`\A(\d+) @(( 0x[0-9a-f]+)+)\z`) + + heapHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] *@ *(heap[_a-z0-9]*)/?(\d*)`) + heapSampleRE = regexp.MustCompile(`(-?\d+): *(-?\d+) *\[ *(\d+): *(\d+) *] @([ x0-9a-f]*)`) + + contentionSampleRE = regexp.MustCompile(`(\d+) *(\d+) @([ x0-9a-f]*)`) + + hexNumberRE = regexp.MustCompile(`0x[0-9a-f]+`) + + growthHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ growthz?`) + + fragmentationHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ fragmentationz?`) + + threadzStartRE = regexp.MustCompile(`--- threadz \d+ ---`) + threadStartRE = regexp.MustCompile(`--- Thread ([[:xdigit:]]+) \(name: (.*)/(\d+)\) stack: ---`) + + // Regular expressions to parse process mappings. Support the format used by Linux /proc/.../maps and other tools. + // Recommended format: + // Start End object file name offset(optional) linker build id + // 0x40000-0x80000 /path/to/binary (@FF00) abc123456 + spaceDigits = `\s+[[:digit:]]+` + hexPair = `\s+[[:xdigit:]]+:[[:xdigit:]]+` + oSpace = `\s*` + // Capturing expressions. + cHex = `(?:0x)?([[:xdigit:]]+)` + cHexRange = `\s*` + cHex + `[\s-]?` + oSpace + cHex + `:?` + cSpaceString = `(?:\s+(\S+))?` + cSpaceHex = `(?:\s+([[:xdigit:]]+))?` + cSpaceAtOffset = `(?:\s+\(@([[:xdigit:]]+)\))?` + cPerm = `(?:\s+([-rwxp]+))?` + + procMapsRE = regexp.MustCompile(`^` + cHexRange + cPerm + cSpaceHex + hexPair + spaceDigits + cSpaceString) + briefMapsRE = regexp.MustCompile(`^` + cHexRange + cPerm + cSpaceString + cSpaceAtOffset + cSpaceHex) + + // Regular expression to parse log data, of the form: + // ... file:line] msg... + logInfoRE = regexp.MustCompile(`^[^\[\]]+:[0-9]+]\s`) +) + +func isSpaceOrComment(line string) bool { + trimmed := strings.TrimSpace(line) + return len(trimmed) == 0 || trimmed[0] == '#' +} + +// parseGoCount parses a Go count profile (e.g., threadcreate or +// goroutine) and returns a new Profile. +func parseGoCount(b []byte) (*Profile, error) { + s := bufio.NewScanner(bytes.NewBuffer(b)) + // Skip comments at the beginning of the file. + for s.Scan() && isSpaceOrComment(s.Text()) { + } + if err := s.Err(); err != nil { + return nil, err + } + m := countStartRE.FindStringSubmatch(s.Text()) + if m == nil { + return nil, errUnrecognized + } + profileType := m[1] + p := &Profile{ + PeriodType: &ValueType{Type: profileType, Unit: "count"}, + Period: 1, + SampleType: []*ValueType{{Type: profileType, Unit: "count"}}, + } + locations := make(map[uint64]*Location) + for s.Scan() { + line := s.Text() + if isSpaceOrComment(line) { + continue + } + if strings.HasPrefix(line, "---") { + break + } + m := countRE.FindStringSubmatch(line) + if m == nil { + return nil, errMalformed + } + n, err := strconv.ParseInt(m[1], 0, 64) + if err != nil { + return nil, errMalformed + } + fields := strings.Fields(m[2]) + locs := make([]*Location, 0, len(fields)) + for _, stk := range fields { + addr, err := strconv.ParseUint(stk, 0, 64) + if err != nil { + return nil, errMalformed + } + // Adjust all frames by -1 to land on top of the call instruction. + addr-- + loc := locations[addr] + if loc == nil { + loc = &Location{ + Address: addr, + } + locations[addr] = loc + p.Location = append(p.Location, loc) + } + locs = append(locs, loc) + } + p.Sample = append(p.Sample, &Sample{ + Location: locs, + Value: []int64{n}, + }) + } + if err := s.Err(); err != nil { + return nil, err + } + + if err := parseAdditionalSections(s, p); err != nil { + return nil, err + } + return p, nil +} + +// remapLocationIDs ensures there is a location for each address +// referenced by a sample, and remaps the samples to point to the new +// location ids. +func (p *Profile) remapLocationIDs() { + seen := make(map[*Location]bool, len(p.Location)) + var locs []*Location + + for _, s := range p.Sample { + for _, l := range s.Location { + if seen[l] { + continue + } + l.ID = uint64(len(locs) + 1) + locs = append(locs, l) + seen[l] = true + } + } + p.Location = locs +} + +func (p *Profile) remapFunctionIDs() { + seen := make(map[*Function]bool, len(p.Function)) + var fns []*Function + + for _, l := range p.Location { + for _, ln := range l.Line { + fn := ln.Function + if fn == nil || seen[fn] { + continue + } + fn.ID = uint64(len(fns) + 1) + fns = append(fns, fn) + seen[fn] = true + } + } + p.Function = fns +} + +// remapMappingIDs matches location addresses with existing mappings +// and updates them appropriately. This is O(N*M), if this ever shows +// up as a bottleneck, evaluate sorting the mappings and doing a +// binary search, which would make it O(N*log(M)). +func (p *Profile) remapMappingIDs() { + // Some profile handlers will incorrectly set regions for the main + // executable if its section is remapped. Fix them through heuristics. + + if len(p.Mapping) > 0 { + // Remove the initial mapping if named '/anon_hugepage' and has a + // consecutive adjacent mapping. + if m := p.Mapping[0]; strings.HasPrefix(m.File, "/anon_hugepage") { + if len(p.Mapping) > 1 && m.Limit == p.Mapping[1].Start { + p.Mapping = p.Mapping[1:] + } + } + } + + // Subtract the offset from the start of the main mapping if it + // ends up at a recognizable start address. + if len(p.Mapping) > 0 { + const expectedStart = 0x400000 + if m := p.Mapping[0]; m.Start-m.Offset == expectedStart { + m.Start = expectedStart + m.Offset = 0 + } + } + + // Associate each location with an address to the corresponding + // mapping. Create fake mapping if a suitable one isn't found. + var fake *Mapping +nextLocation: + for _, l := range p.Location { + a := l.Address + if l.Mapping != nil || a == 0 { + continue + } + for _, m := range p.Mapping { + if m.Start <= a && a < m.Limit { + l.Mapping = m + continue nextLocation + } + } + // Work around legacy handlers failing to encode the first + // part of mappings split into adjacent ranges. + for _, m := range p.Mapping { + if m.Offset != 0 && m.Start-m.Offset <= a && a < m.Start { + m.Start -= m.Offset + m.Offset = 0 + l.Mapping = m + continue nextLocation + } + } + // If there is still no mapping, create a fake one. + // This is important for the Go legacy handler, which produced + // no mappings. + if fake == nil { + fake = &Mapping{ + ID: 1, + Limit: ^uint64(0), + } + p.Mapping = append(p.Mapping, fake) + } + l.Mapping = fake + } + + // Reset all mapping IDs. + for i, m := range p.Mapping { + m.ID = uint64(i + 1) + } +} + +var cpuInts = []func([]byte) (uint64, []byte){ + get32l, + get32b, + get64l, + get64b, +} + +func get32l(b []byte) (uint64, []byte) { + if len(b) < 4 { + return 0, nil + } + return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24, b[4:] +} + +func get32b(b []byte) (uint64, []byte) { + if len(b) < 4 { + return 0, nil + } + return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24, b[4:] +} + +func get64l(b []byte) (uint64, []byte) { + if len(b) < 8 { + return 0, nil + } + return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56, b[8:] +} + +func get64b(b []byte) (uint64, []byte) { + if len(b) < 8 { + return 0, nil + } + return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56, b[8:] +} + +// parseCPU parses a profilez legacy profile and returns a newly +// populated Profile. +// +// The general format for profilez samples is a sequence of words in +// binary format. The first words are a header with the following data: +// +// 1st word -- 0 +// 2nd word -- 3 +// 3rd word -- 0 if a c++ application, 1 if a java application. +// 4th word -- Sampling period (in microseconds). +// 5th word -- Padding. +func parseCPU(b []byte) (*Profile, error) { + var parse func([]byte) (uint64, []byte) + var n1, n2, n3, n4, n5 uint64 + for _, parse = range cpuInts { + var tmp []byte + n1, tmp = parse(b) + n2, tmp = parse(tmp) + n3, tmp = parse(tmp) + n4, tmp = parse(tmp) + n5, tmp = parse(tmp) + + if tmp != nil && n1 == 0 && n2 == 3 && n3 == 0 && n4 > 0 && n5 == 0 { + b = tmp + return cpuProfile(b, int64(n4), parse) + } + if tmp != nil && n1 == 0 && n2 == 3 && n3 == 1 && n4 > 0 && n5 == 0 { + b = tmp + return javaCPUProfile(b, int64(n4), parse) + } + } + return nil, errUnrecognized +} + +// cpuProfile returns a new Profile from C++ profilez data. +// b is the profile bytes after the header, period is the profiling +// period, and parse is a function to parse 8-byte chunks from the +// profile in its native endianness. +func cpuProfile(b []byte, period int64, parse func(b []byte) (uint64, []byte)) (*Profile, error) { + p := &Profile{ + Period: period * 1000, + PeriodType: &ValueType{Type: "cpu", Unit: "nanoseconds"}, + SampleType: []*ValueType{ + {Type: "samples", Unit: "count"}, + {Type: "cpu", Unit: "nanoseconds"}, + }, + } + var err error + if b, _, err = parseCPUSamples(b, parse, true, p); err != nil { + return nil, err + } + + // If *most* samples have the same second-to-the-bottom frame, it + // strongly suggests that it is an uninteresting artifact of + // measurement -- a stack frame pushed by the signal handler. The + // bottom frame is always correct as it is picked up from the signal + // structure, not the stack. Check if this is the case and if so, + // remove. + + // Remove up to two frames. + maxiter := 2 + // Allow one different sample for this many samples with the same + // second-to-last frame. + similarSamples := 32 + margin := len(p.Sample) / similarSamples + + for iter := 0; iter < maxiter; iter++ { + addr1 := make(map[uint64]int) + for _, s := range p.Sample { + if len(s.Location) > 1 { + a := s.Location[1].Address + addr1[a] = addr1[a] + 1 + } + } + + for id1, count := range addr1 { + if count >= len(p.Sample)-margin { + // Found uninteresting frame, strip it out from all samples + for _, s := range p.Sample { + if len(s.Location) > 1 && s.Location[1].Address == id1 { + s.Location = append(s.Location[:1], s.Location[2:]...) + } + } + break + } + } + } + + if err := p.ParseMemoryMap(bytes.NewBuffer(b)); err != nil { + return nil, err + } + + cleanupDuplicateLocations(p) + return p, nil +} + +func cleanupDuplicateLocations(p *Profile) { + // The profile handler may duplicate the leaf frame, because it gets + // its address both from stack unwinding and from the signal + // context. Detect this and delete the duplicate, which has been + // adjusted by -1. The leaf address should not be adjusted as it is + // not a call. + for _, s := range p.Sample { + if len(s.Location) > 1 && s.Location[0].Address == s.Location[1].Address+1 { + s.Location = append(s.Location[:1], s.Location[2:]...) + } + } +} + +// parseCPUSamples parses a collection of profilez samples from a +// profile. +// +// profilez samples are a repeated sequence of stack frames of the +// form: +// +// 1st word -- The number of times this stack was encountered. +// 2nd word -- The size of the stack (StackSize). +// 3rd word -- The first address on the stack. +// ... +// StackSize + 2 -- The last address on the stack +// +// The last stack trace is of the form: +// +// 1st word -- 0 +// 2nd word -- 1 +// 3rd word -- 0 +// +// Addresses from stack traces may point to the next instruction after +// each call. Optionally adjust by -1 to land somewhere on the actual +// call (except for the leaf, which is not a call). +func parseCPUSamples(b []byte, parse func(b []byte) (uint64, []byte), adjust bool, p *Profile) ([]byte, map[uint64]*Location, error) { + locs := make(map[uint64]*Location) + for len(b) > 0 { + var count, nstk uint64 + count, b = parse(b) + nstk, b = parse(b) + if b == nil || nstk > uint64(len(b)/4) { + return nil, nil, errUnrecognized + } + var sloc []*Location + addrs := make([]uint64, nstk) + for i := 0; i < int(nstk); i++ { + addrs[i], b = parse(b) + } + + if count == 0 && nstk == 1 && addrs[0] == 0 { + // End of data marker + break + } + for i, addr := range addrs { + if adjust && i > 0 { + addr-- + } + loc := locs[addr] + if loc == nil { + loc = &Location{ + Address: addr, + } + locs[addr] = loc + p.Location = append(p.Location, loc) + } + sloc = append(sloc, loc) + } + p.Sample = append(p.Sample, + &Sample{ + Value: []int64{int64(count), int64(count) * p.Period}, + Location: sloc, + }) + } + // Reached the end without finding the EOD marker. + return b, locs, nil +} + +// parseHeap parses a heapz legacy or a growthz profile and +// returns a newly populated Profile. +func parseHeap(b []byte) (p *Profile, err error) { + s := bufio.NewScanner(bytes.NewBuffer(b)) + if !s.Scan() { + if err := s.Err(); err != nil { + return nil, err + } + return nil, errUnrecognized + } + p = &Profile{} + + sampling := "" + hasAlloc := false + + line := s.Text() + p.PeriodType = &ValueType{Type: "space", Unit: "bytes"} + if header := heapHeaderRE.FindStringSubmatch(line); header != nil { + sampling, p.Period, hasAlloc, err = parseHeapHeader(line) + if err != nil { + return nil, err + } + } else if header = growthHeaderRE.FindStringSubmatch(line); header != nil { + p.Period = 1 + } else if header = fragmentationHeaderRE.FindStringSubmatch(line); header != nil { + p.Period = 1 + } else { + return nil, errUnrecognized + } + + if hasAlloc { + // Put alloc before inuse so that default pprof selection + // will prefer inuse_space. + p.SampleType = []*ValueType{ + {Type: "alloc_objects", Unit: "count"}, + {Type: "alloc_space", Unit: "bytes"}, + {Type: "inuse_objects", Unit: "count"}, + {Type: "inuse_space", Unit: "bytes"}, + } + } else { + p.SampleType = []*ValueType{ + {Type: "objects", Unit: "count"}, + {Type: "space", Unit: "bytes"}, + } + } + + locs := make(map[uint64]*Location) + for s.Scan() { + line := strings.TrimSpace(s.Text()) + + if isSpaceOrComment(line) { + continue + } + + if isMemoryMapSentinel(line) { + break + } + + value, blocksize, addrs, err := parseHeapSample(line, p.Period, sampling, hasAlloc) + if err != nil { + return nil, err + } + + var sloc []*Location + for _, addr := range addrs { + // Addresses from stack traces point to the next instruction after + // each call. Adjust by -1 to land somewhere on the actual call. + addr-- + loc := locs[addr] + if locs[addr] == nil { + loc = &Location{ + Address: addr, + } + p.Location = append(p.Location, loc) + locs[addr] = loc + } + sloc = append(sloc, loc) + } + + p.Sample = append(p.Sample, &Sample{ + Value: value, + Location: sloc, + NumLabel: map[string][]int64{"bytes": {blocksize}}, + }) + } + if err := s.Err(); err != nil { + return nil, err + } + if err := parseAdditionalSections(s, p); err != nil { + return nil, err + } + return p, nil +} + +func parseHeapHeader(line string) (sampling string, period int64, hasAlloc bool, err error) { + header := heapHeaderRE.FindStringSubmatch(line) + if header == nil { + return "", 0, false, errUnrecognized + } + + if len(header[6]) > 0 { + if period, err = strconv.ParseInt(header[6], 10, 64); err != nil { + return "", 0, false, errUnrecognized + } + } + + if (header[3] != header[1] && header[3] != "0") || (header[4] != header[2] && header[4] != "0") { + hasAlloc = true + } + + switch header[5] { + case "heapz_v2", "heap_v2": + return "v2", period, hasAlloc, nil + case "heapprofile": + return "", 1, hasAlloc, nil + case "heap": + return "v2", period / 2, hasAlloc, nil + default: + return "", 0, false, errUnrecognized + } +} + +// parseHeapSample parses a single row from a heap profile into a new Sample. +func parseHeapSample(line string, rate int64, sampling string, includeAlloc bool) (value []int64, blocksize int64, addrs []uint64, err error) { + sampleData := heapSampleRE.FindStringSubmatch(line) + if len(sampleData) != 6 { + return nil, 0, nil, fmt.Errorf("unexpected number of sample values: got %d, want 6", len(sampleData)) + } + + // This is a local-scoped helper function to avoid needing to pass + // around rate, sampling and many return parameters. + addValues := func(countString, sizeString string, label string) error { + count, err := strconv.ParseInt(countString, 10, 64) + if err != nil { + return fmt.Errorf("malformed sample: %s: %v", line, err) + } + size, err := strconv.ParseInt(sizeString, 10, 64) + if err != nil { + return fmt.Errorf("malformed sample: %s: %v", line, err) + } + if count == 0 && size != 0 { + return fmt.Errorf("%s count was 0 but %s bytes was %d", label, label, size) + } + if count != 0 { + blocksize = size / count + if sampling == "v2" { + count, size = scaleHeapSample(count, size, rate) + } + } + value = append(value, count, size) + return nil + } + + if includeAlloc { + if err := addValues(sampleData[3], sampleData[4], "allocation"); err != nil { + return nil, 0, nil, err + } + } + + if err := addValues(sampleData[1], sampleData[2], "inuse"); err != nil { + return nil, 0, nil, err + } + + addrs, err = parseHexAddresses(sampleData[5]) + if err != nil { + return nil, 0, nil, fmt.Errorf("malformed sample: %s: %v", line, err) + } + + return value, blocksize, addrs, nil +} + +// parseHexAddresses extracts hex numbers from a string, attempts to convert +// each to an unsigned 64-bit number and returns the resulting numbers as a +// slice, or an error if the string contains hex numbers which are too large to +// handle (which means a malformed profile). +func parseHexAddresses(s string) ([]uint64, error) { + hexStrings := hexNumberRE.FindAllString(s, -1) + var addrs []uint64 + for _, s := range hexStrings { + if addr, err := strconv.ParseUint(s, 0, 64); err == nil { + addrs = append(addrs, addr) + } else { + return nil, fmt.Errorf("failed to parse as hex 64-bit number: %s", s) + } + } + return addrs, nil +} + +// scaleHeapSample adjusts the data from a heapz Sample to +// account for its probability of appearing in the collected +// data. heapz profiles are a sampling of the memory allocations +// requests in a program. We estimate the unsampled value by dividing +// each collected sample by its probability of appearing in the +// profile. heapz v2 profiles rely on a poisson process to determine +// which samples to collect, based on the desired average collection +// rate R. The probability of a sample of size S to appear in that +// profile is 1-exp(-S/R). +func scaleHeapSample(count, size, rate int64) (int64, int64) { + if count == 0 || size == 0 { + return 0, 0 + } + + if rate <= 1 { + // if rate==1 all samples were collected so no adjustment is needed. + // if rate<1 treat as unknown and skip scaling. + return count, size + } + + avgSize := float64(size) / float64(count) + scale := 1 / (1 - math.Exp(-avgSize/float64(rate))) + + return int64(float64(count) * scale), int64(float64(size) * scale) +} + +// parseContention parses a mutex or contention profile. There are 2 cases: +// "--- contentionz " for legacy C++ profiles (and backwards compatibility) +// "--- mutex:" or "--- contention:" for profiles generated by the Go runtime. +func parseContention(b []byte) (*Profile, error) { + s := bufio.NewScanner(bytes.NewBuffer(b)) + if !s.Scan() { + if err := s.Err(); err != nil { + return nil, err + } + return nil, errUnrecognized + } + + switch l := s.Text(); { + case strings.HasPrefix(l, "--- contentionz "): + case strings.HasPrefix(l, "--- mutex:"): + case strings.HasPrefix(l, "--- contention:"): + default: + return nil, errUnrecognized + } + + p := &Profile{ + PeriodType: &ValueType{Type: "contentions", Unit: "count"}, + Period: 1, + SampleType: []*ValueType{ + {Type: "contentions", Unit: "count"}, + {Type: "delay", Unit: "nanoseconds"}, + }, + } + + var cpuHz int64 + // Parse text of the form "attribute = value" before the samples. + const delimiter = "=" + for s.Scan() { + line := s.Text() + if line = strings.TrimSpace(line); isSpaceOrComment(line) { + continue + } + if strings.HasPrefix(line, "---") { + break + } + attr := strings.SplitN(line, delimiter, 2) + if len(attr) != 2 { + break + } + key, val := strings.TrimSpace(attr[0]), strings.TrimSpace(attr[1]) + var err error + switch key { + case "cycles/second": + if cpuHz, err = strconv.ParseInt(val, 0, 64); err != nil { + return nil, errUnrecognized + } + case "sampling period": + if p.Period, err = strconv.ParseInt(val, 0, 64); err != nil { + return nil, errUnrecognized + } + case "ms since reset": + ms, err := strconv.ParseInt(val, 0, 64) + if err != nil { + return nil, errUnrecognized + } + p.DurationNanos = ms * 1000 * 1000 + case "format": + // CPP contentionz profiles don't have format. + return nil, errUnrecognized + case "resolution": + // CPP contentionz profiles don't have resolution. + return nil, errUnrecognized + case "discarded samples": + default: + return nil, errUnrecognized + } + } + if err := s.Err(); err != nil { + return nil, err + } + + locs := make(map[uint64]*Location) + for { + line := strings.TrimSpace(s.Text()) + if strings.HasPrefix(line, "---") { + break + } + if !isSpaceOrComment(line) { + value, addrs, err := parseContentionSample(line, p.Period, cpuHz) + if err != nil { + return nil, err + } + var sloc []*Location + for _, addr := range addrs { + // Addresses from stack traces point to the next instruction after + // each call. Adjust by -1 to land somewhere on the actual call. + addr-- + loc := locs[addr] + if locs[addr] == nil { + loc = &Location{ + Address: addr, + } + p.Location = append(p.Location, loc) + locs[addr] = loc + } + sloc = append(sloc, loc) + } + p.Sample = append(p.Sample, &Sample{ + Value: value, + Location: sloc, + }) + } + if !s.Scan() { + break + } + } + if err := s.Err(); err != nil { + return nil, err + } + + if err := parseAdditionalSections(s, p); err != nil { + return nil, err + } + + return p, nil +} + +// parseContentionSample parses a single row from a contention profile +// into a new Sample. +func parseContentionSample(line string, period, cpuHz int64) (value []int64, addrs []uint64, err error) { + sampleData := contentionSampleRE.FindStringSubmatch(line) + if sampleData == nil { + return nil, nil, errUnrecognized + } + + v1, err := strconv.ParseInt(sampleData[1], 10, 64) + if err != nil { + return nil, nil, fmt.Errorf("malformed sample: %s: %v", line, err) + } + v2, err := strconv.ParseInt(sampleData[2], 10, 64) + if err != nil { + return nil, nil, fmt.Errorf("malformed sample: %s: %v", line, err) + } + + // Unsample values if period and cpuHz are available. + // - Delays are scaled to cycles and then to nanoseconds. + // - Contentions are scaled to cycles. + if period > 0 { + if cpuHz > 0 { + cpuGHz := float64(cpuHz) / 1e9 + v1 = int64(float64(v1) * float64(period) / cpuGHz) + } + v2 = v2 * period + } + + value = []int64{v2, v1} + addrs, err = parseHexAddresses(sampleData[3]) + if err != nil { + return nil, nil, fmt.Errorf("malformed sample: %s: %v", line, err) + } + + return value, addrs, nil +} + +// parseThread parses a Threadz profile and returns a new Profile. +func parseThread(b []byte) (*Profile, error) { + s := bufio.NewScanner(bytes.NewBuffer(b)) + // Skip past comments and empty lines seeking a real header. + for s.Scan() && isSpaceOrComment(s.Text()) { + } + + line := s.Text() + if m := threadzStartRE.FindStringSubmatch(line); m != nil { + // Advance over initial comments until first stack trace. + for s.Scan() { + if line = s.Text(); isMemoryMapSentinel(line) || strings.HasPrefix(line, "-") { + break + } + } + } else if t := threadStartRE.FindStringSubmatch(line); len(t) != 4 { + return nil, errUnrecognized + } + + p := &Profile{ + SampleType: []*ValueType{{Type: "thread", Unit: "count"}}, + PeriodType: &ValueType{Type: "thread", Unit: "count"}, + Period: 1, + } + + locs := make(map[uint64]*Location) + // Recognize each thread and populate profile samples. + for !isMemoryMapSentinel(line) { + if strings.HasPrefix(line, "---- no stack trace for") { + break + } + if t := threadStartRE.FindStringSubmatch(line); len(t) != 4 { + return nil, errUnrecognized + } + + var addrs []uint64 + var err error + line, addrs, err = parseThreadSample(s) + if err != nil { + return nil, err + } + if len(addrs) == 0 { + // We got a --same as previous threads--. Bump counters. + if len(p.Sample) > 0 { + s := p.Sample[len(p.Sample)-1] + s.Value[0]++ + } + continue + } + + var sloc []*Location + for i, addr := range addrs { + // Addresses from stack traces point to the next instruction after + // each call. Adjust by -1 to land somewhere on the actual call + // (except for the leaf, which is not a call). + if i > 0 { + addr-- + } + loc := locs[addr] + if locs[addr] == nil { + loc = &Location{ + Address: addr, + } + p.Location = append(p.Location, loc) + locs[addr] = loc + } + sloc = append(sloc, loc) + } + + p.Sample = append(p.Sample, &Sample{ + Value: []int64{1}, + Location: sloc, + }) + } + + if err := parseAdditionalSections(s, p); err != nil { + return nil, err + } + + cleanupDuplicateLocations(p) + return p, nil +} + +// parseThreadSample parses a symbolized or unsymbolized stack trace. +// Returns the first line after the traceback, the sample (or nil if +// it hits a 'same-as-previous' marker) and an error. +func parseThreadSample(s *bufio.Scanner) (nextl string, addrs []uint64, err error) { + var line string + sameAsPrevious := false + for s.Scan() { + line = strings.TrimSpace(s.Text()) + if line == "" { + continue + } + + if strings.HasPrefix(line, "---") { + break + } + if strings.Contains(line, "same as previous thread") { + sameAsPrevious = true + continue + } + + curAddrs, err := parseHexAddresses(line) + if err != nil { + return "", nil, fmt.Errorf("malformed sample: %s: %v", line, err) + } + addrs = append(addrs, curAddrs...) + } + if err := s.Err(); err != nil { + return "", nil, err + } + if sameAsPrevious { + return line, nil, nil + } + return line, addrs, nil +} + +// parseAdditionalSections parses any additional sections in the +// profile, ignoring any unrecognized sections. +func parseAdditionalSections(s *bufio.Scanner, p *Profile) error { + for !isMemoryMapSentinel(s.Text()) && s.Scan() { + } + if err := s.Err(); err != nil { + return err + } + return p.ParseMemoryMapFromScanner(s) +} + +// ParseProcMaps parses a memory map in the format of /proc/self/maps. +// ParseMemoryMap should be called after setting on a profile to +// associate locations to the corresponding mapping based on their +// address. +func ParseProcMaps(rd io.Reader) ([]*Mapping, error) { + s := bufio.NewScanner(rd) + return parseProcMapsFromScanner(s) +} + +func parseProcMapsFromScanner(s *bufio.Scanner) ([]*Mapping, error) { + var mapping []*Mapping + + var attrs []string + const delimiter = "=" + r := strings.NewReplacer() + for s.Scan() { + line := r.Replace(removeLoggingInfo(s.Text())) + m, err := parseMappingEntry(line) + if err != nil { + if err == errUnrecognized { + // Recognize assignments of the form: attr=value, and replace + // $attr with value on subsequent mappings. + if attr := strings.SplitN(line, delimiter, 2); len(attr) == 2 { + attrs = append(attrs, "$"+strings.TrimSpace(attr[0]), strings.TrimSpace(attr[1])) + r = strings.NewReplacer(attrs...) + } + // Ignore any unrecognized entries + continue + } + return nil, err + } + if m == nil { + continue + } + mapping = append(mapping, m) + } + if err := s.Err(); err != nil { + return nil, err + } + return mapping, nil +} + +// removeLoggingInfo detects and removes log prefix entries generated +// by the glog package. If no logging prefix is detected, the string +// is returned unmodified. +func removeLoggingInfo(line string) string { + if match := logInfoRE.FindStringIndex(line); match != nil { + return line[match[1]:] + } + return line +} + +// ParseMemoryMap parses a memory map in the format of +// /proc/self/maps, and overrides the mappings in the current profile. +// It renumbers the samples and locations in the profile correspondingly. +func (p *Profile) ParseMemoryMap(rd io.Reader) error { + return p.ParseMemoryMapFromScanner(bufio.NewScanner(rd)) +} + +// ParseMemoryMapFromScanner parses a memory map in the format of +// /proc/self/maps or a variety of legacy format, and overrides the +// mappings in the current profile. It renumbers the samples and +// locations in the profile correspondingly. +func (p *Profile) ParseMemoryMapFromScanner(s *bufio.Scanner) error { + mapping, err := parseProcMapsFromScanner(s) + if err != nil { + return err + } + p.Mapping = append(p.Mapping, mapping...) + p.massageMappings() + p.remapLocationIDs() + p.remapFunctionIDs() + p.remapMappingIDs() + return nil +} + +func parseMappingEntry(l string) (*Mapping, error) { + var start, end, perm, file, offset, buildID string + if me := procMapsRE.FindStringSubmatch(l); len(me) == 6 { + start, end, perm, offset, file = me[1], me[2], me[3], me[4], me[5] + } else if me := briefMapsRE.FindStringSubmatch(l); len(me) == 7 { + start, end, perm, file, offset, buildID = me[1], me[2], me[3], me[4], me[5], me[6] + } else { + return nil, errUnrecognized + } + + var err error + mapping := &Mapping{ + File: file, + BuildID: buildID, + } + if perm != "" && !strings.Contains(perm, "x") { + // Skip non-executable entries. + return nil, nil + } + if mapping.Start, err = strconv.ParseUint(start, 16, 64); err != nil { + return nil, errUnrecognized + } + if mapping.Limit, err = strconv.ParseUint(end, 16, 64); err != nil { + return nil, errUnrecognized + } + if offset != "" { + if mapping.Offset, err = strconv.ParseUint(offset, 16, 64); err != nil { + return nil, errUnrecognized + } + } + return mapping, nil +} + +var memoryMapSentinels = []string{ + "--- Memory map: ---", + "MAPPED_LIBRARIES:", +} + +// isMemoryMapSentinel returns true if the string contains one of the +// known sentinels for memory map information. +func isMemoryMapSentinel(line string) bool { + for _, s := range memoryMapSentinels { + if strings.Contains(line, s) { + return true + } + } + return false +} + +func (p *Profile) addLegacyFrameInfo() { + switch { + case isProfileType(p, heapzSampleTypes): + p.DropFrames, p.KeepFrames = allocRxStr, allocSkipRxStr + case isProfileType(p, contentionzSampleTypes): + p.DropFrames, p.KeepFrames = lockRxStr, "" + default: + p.DropFrames, p.KeepFrames = cpuProfilerRxStr, "" + } +} + +var heapzSampleTypes = [][]string{ + {"allocations", "size"}, // early Go pprof profiles + {"objects", "space"}, + {"inuse_objects", "inuse_space"}, + {"alloc_objects", "alloc_space"}, + {"alloc_objects", "alloc_space", "inuse_objects", "inuse_space"}, // Go pprof legacy profiles +} +var contentionzSampleTypes = [][]string{ + {"contentions", "delay"}, +} + +func isProfileType(p *Profile, types [][]string) bool { + st := p.SampleType +nextType: + for _, t := range types { + if len(st) != len(t) { + continue + } + + for i := range st { + if st[i].Type != t[i] { + continue nextType + } + } + return true + } + return false +} + +var allocRxStr = strings.Join([]string{ + // POSIX entry points. + `calloc`, + `cfree`, + `malloc`, + `free`, + `memalign`, + `do_memalign`, + `(__)?posix_memalign`, + `pvalloc`, + `valloc`, + `realloc`, + + // TC malloc. + `tcmalloc::.*`, + `tc_calloc`, + `tc_cfree`, + `tc_malloc`, + `tc_free`, + `tc_memalign`, + `tc_posix_memalign`, + `tc_pvalloc`, + `tc_valloc`, + `tc_realloc`, + `tc_new`, + `tc_delete`, + `tc_newarray`, + `tc_deletearray`, + `tc_new_nothrow`, + `tc_newarray_nothrow`, + + // Memory-allocation routines on OS X. + `malloc_zone_malloc`, + `malloc_zone_calloc`, + `malloc_zone_valloc`, + `malloc_zone_realloc`, + `malloc_zone_memalign`, + `malloc_zone_free`, + + // Go runtime + `runtime\..*`, + + // Other misc. memory allocation routines + `BaseArena::.*`, + `(::)?do_malloc_no_errno`, + `(::)?do_malloc_pages`, + `(::)?do_malloc`, + `DoSampledAllocation`, + `MallocedMemBlock::MallocedMemBlock`, + `_M_allocate`, + `__builtin_(vec_)?delete`, + `__builtin_(vec_)?new`, + `__gnu_cxx::new_allocator::allocate`, + `__libc_malloc`, + `__malloc_alloc_template::allocate`, + `allocate`, + `cpp_alloc`, + `operator new(\[\])?`, + `simple_alloc::allocate`, +}, `|`) + +var allocSkipRxStr = strings.Join([]string{ + // Preserve Go runtime frames that appear in the middle/bottom of + // the stack. + `runtime\.panic`, + `runtime\.reflectcall`, + `runtime\.call[0-9]*`, +}, `|`) + +var cpuProfilerRxStr = strings.Join([]string{ + `ProfileData::Add`, + `ProfileData::prof_handler`, + `CpuProfiler::prof_handler`, + `__pthread_sighandler`, + `__restore`, +}, `|`) + +var lockRxStr = strings.Join([]string{ + `RecordLockProfileData`, + `(base::)?RecordLockProfileData.*`, + `(base::)?SubmitMutexProfileData.*`, + `(base::)?SubmitSpinLockProfileData.*`, + `(base::Mutex::)?AwaitCommon.*`, + `(base::Mutex::)?Unlock.*`, + `(base::Mutex::)?UnlockSlow.*`, + `(base::Mutex::)?ReaderUnlock.*`, + `(base::MutexLock::)?~MutexLock.*`, + `(Mutex::)?AwaitCommon.*`, + `(Mutex::)?Unlock.*`, + `(Mutex::)?UnlockSlow.*`, + `(Mutex::)?ReaderUnlock.*`, + `(MutexLock::)?~MutexLock.*`, + `(SpinLock::)?Unlock.*`, + `(SpinLock::)?SlowUnlock.*`, + `(SpinLockHolder::)?~SpinLockHolder.*`, +}, `|`) diff --git a/vendor/github.com/google/pprof/profile/merge.go b/vendor/github.com/google/pprof/profile/merge.go new file mode 100644 index 000000000..ba4d74640 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/merge.go @@ -0,0 +1,674 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package profile + +import ( + "encoding/binary" + "fmt" + "sort" + "strconv" + "strings" +) + +// Compact performs garbage collection on a profile to remove any +// unreferenced fields. This is useful to reduce the size of a profile +// after samples or locations have been removed. +func (p *Profile) Compact() *Profile { + p, _ = Merge([]*Profile{p}) + return p +} + +// Merge merges all the profiles in profs into a single Profile. +// Returns a new profile independent of the input profiles. The merged +// profile is compacted to eliminate unused samples, locations, +// functions and mappings. Profiles must have identical profile sample +// and period types or the merge will fail. profile.Period of the +// resulting profile will be the maximum of all profiles, and +// profile.TimeNanos will be the earliest nonzero one. Merges are +// associative with the caveat of the first profile having some +// specialization in how headers are combined. There may be other +// subtleties now or in the future regarding associativity. +func Merge(srcs []*Profile) (*Profile, error) { + if len(srcs) == 0 { + return nil, fmt.Errorf("no profiles to merge") + } + p, err := combineHeaders(srcs) + if err != nil { + return nil, err + } + + pm := &profileMerger{ + p: p, + samples: make(map[sampleKey]*Sample, len(srcs[0].Sample)), + locations: make(map[locationKey]*Location, len(srcs[0].Location)), + functions: make(map[functionKey]*Function, len(srcs[0].Function)), + mappings: make(map[mappingKey]*Mapping, len(srcs[0].Mapping)), + } + + for _, src := range srcs { + // Clear the profile-specific hash tables + pm.locationsByID = makeLocationIDMap(len(src.Location)) + pm.functionsByID = make(map[uint64]*Function, len(src.Function)) + pm.mappingsByID = make(map[uint64]mapInfo, len(src.Mapping)) + + if len(pm.mappings) == 0 && len(src.Mapping) > 0 { + // The Mapping list has the property that the first mapping + // represents the main binary. Take the first Mapping we see, + // otherwise the operations below will add mappings in an + // arbitrary order. + pm.mapMapping(src.Mapping[0]) + } + + for _, s := range src.Sample { + if !isZeroSample(s) { + pm.mapSample(s) + } + } + } + + for _, s := range p.Sample { + if isZeroSample(s) { + // If there are any zero samples, re-merge the profile to GC + // them. + return Merge([]*Profile{p}) + } + } + + return p, nil +} + +// Normalize normalizes the source profile by multiplying each value in profile by the +// ratio of the sum of the base profile's values of that sample type to the sum of the +// source profile's value of that sample type. +func (p *Profile) Normalize(pb *Profile) error { + + if err := p.compatible(pb); err != nil { + return err + } + + baseVals := make([]int64, len(p.SampleType)) + for _, s := range pb.Sample { + for i, v := range s.Value { + baseVals[i] += v + } + } + + srcVals := make([]int64, len(p.SampleType)) + for _, s := range p.Sample { + for i, v := range s.Value { + srcVals[i] += v + } + } + + normScale := make([]float64, len(baseVals)) + for i := range baseVals { + if srcVals[i] == 0 { + normScale[i] = 0.0 + } else { + normScale[i] = float64(baseVals[i]) / float64(srcVals[i]) + } + } + p.ScaleN(normScale) + return nil +} + +func isZeroSample(s *Sample) bool { + for _, v := range s.Value { + if v != 0 { + return false + } + } + return true +} + +type profileMerger struct { + p *Profile + + // Memoization tables within a profile. + locationsByID locationIDMap + functionsByID map[uint64]*Function + mappingsByID map[uint64]mapInfo + + // Memoization tables for profile entities. + samples map[sampleKey]*Sample + locations map[locationKey]*Location + functions map[functionKey]*Function + mappings map[mappingKey]*Mapping +} + +type mapInfo struct { + m *Mapping + offset int64 +} + +func (pm *profileMerger) mapSample(src *Sample) *Sample { + // Check memoization table + k := pm.sampleKey(src) + if ss, ok := pm.samples[k]; ok { + for i, v := range src.Value { + ss.Value[i] += v + } + return ss + } + + // Make new sample. + s := &Sample{ + Location: make([]*Location, len(src.Location)), + Value: make([]int64, len(src.Value)), + Label: make(map[string][]string, len(src.Label)), + NumLabel: make(map[string][]int64, len(src.NumLabel)), + NumUnit: make(map[string][]string, len(src.NumLabel)), + } + for i, l := range src.Location { + s.Location[i] = pm.mapLocation(l) + } + for k, v := range src.Label { + vv := make([]string, len(v)) + copy(vv, v) + s.Label[k] = vv + } + for k, v := range src.NumLabel { + u := src.NumUnit[k] + vv := make([]int64, len(v)) + uu := make([]string, len(u)) + copy(vv, v) + copy(uu, u) + s.NumLabel[k] = vv + s.NumUnit[k] = uu + } + copy(s.Value, src.Value) + pm.samples[k] = s + pm.p.Sample = append(pm.p.Sample, s) + return s +} + +func (pm *profileMerger) sampleKey(sample *Sample) sampleKey { + // Accumulate contents into a string. + var buf strings.Builder + buf.Grow(64) // Heuristic to avoid extra allocs + + // encode a number + putNumber := func(v uint64) { + var num [binary.MaxVarintLen64]byte + n := binary.PutUvarint(num[:], v) + buf.Write(num[:n]) + } + + // encode a string prefixed with its length. + putDelimitedString := func(s string) { + putNumber(uint64(len(s))) + buf.WriteString(s) + } + + for _, l := range sample.Location { + // Get the location in the merged profile, which may have a different ID. + if loc := pm.mapLocation(l); loc != nil { + putNumber(loc.ID) + } + } + putNumber(0) // Delimiter + + for _, l := range sortedKeys1(sample.Label) { + putDelimitedString(l) + values := sample.Label[l] + putNumber(uint64(len(values))) + for _, v := range values { + putDelimitedString(v) + } + } + + for _, l := range sortedKeys2(sample.NumLabel) { + putDelimitedString(l) + values := sample.NumLabel[l] + putNumber(uint64(len(values))) + for _, v := range values { + putNumber(uint64(v)) + } + units := sample.NumUnit[l] + putNumber(uint64(len(units))) + for _, v := range units { + putDelimitedString(v) + } + } + + return sampleKey(buf.String()) +} + +type sampleKey string + +// sortedKeys1 returns the sorted keys found in a string->[]string map. +// +// Note: this is currently non-generic since github pprof runs golint, +// which does not support generics. When that issue is fixed, it can +// be merged with sortedKeys2 and made into a generic function. +func sortedKeys1(m map[string][]string) []string { + if len(m) == 0 { + return nil + } + keys := make([]string, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + sort.Strings(keys) + return keys +} + +// sortedKeys2 returns the sorted keys found in a string->[]int64 map. +// +// Note: this is currently non-generic since github pprof runs golint, +// which does not support generics. When that issue is fixed, it can +// be merged with sortedKeys1 and made into a generic function. +func sortedKeys2(m map[string][]int64) []string { + if len(m) == 0 { + return nil + } + keys := make([]string, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + sort.Strings(keys) + return keys +} + +func (pm *profileMerger) mapLocation(src *Location) *Location { + if src == nil { + return nil + } + + if l := pm.locationsByID.get(src.ID); l != nil { + return l + } + + mi := pm.mapMapping(src.Mapping) + l := &Location{ + ID: uint64(len(pm.p.Location) + 1), + Mapping: mi.m, + Address: uint64(int64(src.Address) + mi.offset), + Line: make([]Line, len(src.Line)), + IsFolded: src.IsFolded, + } + for i, ln := range src.Line { + l.Line[i] = pm.mapLine(ln) + } + // Check memoization table. Must be done on the remapped location to + // account for the remapped mapping ID. + k := l.key() + if ll, ok := pm.locations[k]; ok { + pm.locationsByID.set(src.ID, ll) + return ll + } + pm.locationsByID.set(src.ID, l) + pm.locations[k] = l + pm.p.Location = append(pm.p.Location, l) + return l +} + +// key generates locationKey to be used as a key for maps. +func (l *Location) key() locationKey { + key := locationKey{ + addr: l.Address, + isFolded: l.IsFolded, + } + if l.Mapping != nil { + // Normalizes address to handle address space randomization. + key.addr -= l.Mapping.Start + key.mappingID = l.Mapping.ID + } + lines := make([]string, len(l.Line)*3) + for i, line := range l.Line { + if line.Function != nil { + lines[i*2] = strconv.FormatUint(line.Function.ID, 16) + } + lines[i*2+1] = strconv.FormatInt(line.Line, 16) + lines[i*2+2] = strconv.FormatInt(line.Column, 16) + } + key.lines = strings.Join(lines, "|") + return key +} + +type locationKey struct { + addr, mappingID uint64 + lines string + isFolded bool +} + +func (pm *profileMerger) mapMapping(src *Mapping) mapInfo { + if src == nil { + return mapInfo{} + } + + if mi, ok := pm.mappingsByID[src.ID]; ok { + return mi + } + + // Check memoization tables. + mk := src.key() + if m, ok := pm.mappings[mk]; ok { + mi := mapInfo{m, int64(m.Start) - int64(src.Start)} + pm.mappingsByID[src.ID] = mi + return mi + } + m := &Mapping{ + ID: uint64(len(pm.p.Mapping) + 1), + Start: src.Start, + Limit: src.Limit, + Offset: src.Offset, + File: src.File, + KernelRelocationSymbol: src.KernelRelocationSymbol, + BuildID: src.BuildID, + HasFunctions: src.HasFunctions, + HasFilenames: src.HasFilenames, + HasLineNumbers: src.HasLineNumbers, + HasInlineFrames: src.HasInlineFrames, + } + pm.p.Mapping = append(pm.p.Mapping, m) + + // Update memoization tables. + pm.mappings[mk] = m + mi := mapInfo{m, 0} + pm.mappingsByID[src.ID] = mi + return mi +} + +// key generates encoded strings of Mapping to be used as a key for +// maps. +func (m *Mapping) key() mappingKey { + // Normalize addresses to handle address space randomization. + // Round up to next 4K boundary to avoid minor discrepancies. + const mapsizeRounding = 0x1000 + + size := m.Limit - m.Start + size = size + mapsizeRounding - 1 + size = size - (size % mapsizeRounding) + key := mappingKey{ + size: size, + offset: m.Offset, + } + + switch { + case m.BuildID != "": + key.buildIDOrFile = m.BuildID + case m.File != "": + key.buildIDOrFile = m.File + default: + // A mapping containing neither build ID nor file name is a fake mapping. A + // key with empty buildIDOrFile is used for fake mappings so that they are + // treated as the same mapping during merging. + } + return key +} + +type mappingKey struct { + size, offset uint64 + buildIDOrFile string +} + +func (pm *profileMerger) mapLine(src Line) Line { + ln := Line{ + Function: pm.mapFunction(src.Function), + Line: src.Line, + Column: src.Column, + } + return ln +} + +func (pm *profileMerger) mapFunction(src *Function) *Function { + if src == nil { + return nil + } + if f, ok := pm.functionsByID[src.ID]; ok { + return f + } + k := src.key() + if f, ok := pm.functions[k]; ok { + pm.functionsByID[src.ID] = f + return f + } + f := &Function{ + ID: uint64(len(pm.p.Function) + 1), + Name: src.Name, + SystemName: src.SystemName, + Filename: src.Filename, + StartLine: src.StartLine, + } + pm.functions[k] = f + pm.functionsByID[src.ID] = f + pm.p.Function = append(pm.p.Function, f) + return f +} + +// key generates a struct to be used as a key for maps. +func (f *Function) key() functionKey { + return functionKey{ + f.StartLine, + f.Name, + f.SystemName, + f.Filename, + } +} + +type functionKey struct { + startLine int64 + name, systemName, fileName string +} + +// combineHeaders checks that all profiles can be merged and returns +// their combined profile. +func combineHeaders(srcs []*Profile) (*Profile, error) { + for _, s := range srcs[1:] { + if err := srcs[0].compatible(s); err != nil { + return nil, err + } + } + + var timeNanos, durationNanos, period int64 + var comments []string + seenComments := map[string]bool{} + var docURL string + var defaultSampleType string + for _, s := range srcs { + if timeNanos == 0 || s.TimeNanos < timeNanos { + timeNanos = s.TimeNanos + } + durationNanos += s.DurationNanos + if period == 0 || period < s.Period { + period = s.Period + } + for _, c := range s.Comments { + if seen := seenComments[c]; !seen { + comments = append(comments, c) + seenComments[c] = true + } + } + if defaultSampleType == "" { + defaultSampleType = s.DefaultSampleType + } + if docURL == "" { + docURL = s.DocURL + } + } + + p := &Profile{ + SampleType: make([]*ValueType, len(srcs[0].SampleType)), + + DropFrames: srcs[0].DropFrames, + KeepFrames: srcs[0].KeepFrames, + + TimeNanos: timeNanos, + DurationNanos: durationNanos, + PeriodType: srcs[0].PeriodType, + Period: period, + + Comments: comments, + DefaultSampleType: defaultSampleType, + DocURL: docURL, + } + copy(p.SampleType, srcs[0].SampleType) + return p, nil +} + +// compatible determines if two profiles can be compared/merged. +// returns nil if the profiles are compatible; otherwise an error with +// details on the incompatibility. +func (p *Profile) compatible(pb *Profile) error { + if !equalValueType(p.PeriodType, pb.PeriodType) { + return fmt.Errorf("incompatible period types %v and %v", p.PeriodType, pb.PeriodType) + } + + if len(p.SampleType) != len(pb.SampleType) { + return fmt.Errorf("incompatible sample types %v and %v", p.SampleType, pb.SampleType) + } + + for i := range p.SampleType { + if !equalValueType(p.SampleType[i], pb.SampleType[i]) { + return fmt.Errorf("incompatible sample types %v and %v", p.SampleType, pb.SampleType) + } + } + return nil +} + +// equalValueType returns true if the two value types are semantically +// equal. It ignores the internal fields used during encode/decode. +func equalValueType(st1, st2 *ValueType) bool { + return st1.Type == st2.Type && st1.Unit == st2.Unit +} + +// locationIDMap is like a map[uint64]*Location, but provides efficiency for +// ids that are densely numbered, which is often the case. +type locationIDMap struct { + dense []*Location // indexed by id for id < len(dense) + sparse map[uint64]*Location // indexed by id for id >= len(dense) +} + +func makeLocationIDMap(n int) locationIDMap { + return locationIDMap{ + dense: make([]*Location, n), + sparse: map[uint64]*Location{}, + } +} + +func (lm locationIDMap) get(id uint64) *Location { + if id < uint64(len(lm.dense)) { + return lm.dense[int(id)] + } + return lm.sparse[id] +} + +func (lm locationIDMap) set(id uint64, loc *Location) { + if id < uint64(len(lm.dense)) { + lm.dense[id] = loc + return + } + lm.sparse[id] = loc +} + +// CompatibilizeSampleTypes makes profiles compatible to be compared/merged. It +// keeps sample types that appear in all profiles only and drops/reorders the +// sample types as necessary. +// +// In the case of sample types order is not the same for given profiles the +// order is derived from the first profile. +// +// Profiles are modified in-place. +// +// It returns an error if the sample type's intersection is empty. +func CompatibilizeSampleTypes(ps []*Profile) error { + sTypes := commonSampleTypes(ps) + if len(sTypes) == 0 { + return fmt.Errorf("profiles have empty common sample type list") + } + for _, p := range ps { + if err := compatibilizeSampleTypes(p, sTypes); err != nil { + return err + } + } + return nil +} + +// commonSampleTypes returns sample types that appear in all profiles in the +// order how they ordered in the first profile. +func commonSampleTypes(ps []*Profile) []string { + if len(ps) == 0 { + return nil + } + sTypes := map[string]int{} + for _, p := range ps { + for _, st := range p.SampleType { + sTypes[st.Type]++ + } + } + var res []string + for _, st := range ps[0].SampleType { + if sTypes[st.Type] == len(ps) { + res = append(res, st.Type) + } + } + return res +} + +// compatibilizeSampleTypes drops sample types that are not present in sTypes +// list and reorder them if needed. +// +// It sets DefaultSampleType to sType[0] if it is not in sType list. +// +// It assumes that all sample types from the sTypes list are present in the +// given profile otherwise it returns an error. +func compatibilizeSampleTypes(p *Profile, sTypes []string) error { + if len(sTypes) == 0 { + return fmt.Errorf("sample type list is empty") + } + defaultSampleType := sTypes[0] + reMap, needToModify := make([]int, len(sTypes)), false + for i, st := range sTypes { + if st == p.DefaultSampleType { + defaultSampleType = p.DefaultSampleType + } + idx := searchValueType(p.SampleType, st) + if idx < 0 { + return fmt.Errorf("%q sample type is not found in profile", st) + } + reMap[i] = idx + if idx != i { + needToModify = true + } + } + if !needToModify && len(sTypes) == len(p.SampleType) { + return nil + } + p.DefaultSampleType = defaultSampleType + oldSampleTypes := p.SampleType + p.SampleType = make([]*ValueType, len(sTypes)) + for i, idx := range reMap { + p.SampleType[i] = oldSampleTypes[idx] + } + values := make([]int64, len(sTypes)) + for _, s := range p.Sample { + for i, idx := range reMap { + values[i] = s.Value[idx] + } + s.Value = s.Value[:len(values)] + copy(s.Value, values) + } + return nil +} + +func searchValueType(vts []*ValueType, s string) int { + for i, vt := range vts { + if vt.Type == s { + return i + } + } + return -1 +} diff --git a/vendor/github.com/google/pprof/profile/profile.go b/vendor/github.com/google/pprof/profile/profile.go new file mode 100644 index 000000000..f47a24390 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/profile.go @@ -0,0 +1,869 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package profile provides a representation of profile.proto and +// methods to encode/decode profiles in this format. +package profile + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "math" + "path/filepath" + "regexp" + "sort" + "strings" + "sync" + "time" +) + +// Profile is an in-memory representation of profile.proto. +type Profile struct { + SampleType []*ValueType + DefaultSampleType string + Sample []*Sample + Mapping []*Mapping + Location []*Location + Function []*Function + Comments []string + DocURL string + + DropFrames string + KeepFrames string + + TimeNanos int64 + DurationNanos int64 + PeriodType *ValueType + Period int64 + + // The following fields are modified during encoding and copying, + // so are protected by a Mutex. + encodeMu sync.Mutex + + commentX []int64 + docURLX int64 + dropFramesX int64 + keepFramesX int64 + stringTable []string + defaultSampleTypeX int64 +} + +// ValueType corresponds to Profile.ValueType +type ValueType struct { + Type string // cpu, wall, inuse_space, etc + Unit string // seconds, nanoseconds, bytes, etc + + typeX int64 + unitX int64 +} + +// Sample corresponds to Profile.Sample +type Sample struct { + Location []*Location + Value []int64 + // Label is a per-label-key map to values for string labels. + // + // In general, having multiple values for the given label key is strongly + // discouraged - see docs for the sample label field in profile.proto. The + // main reason this unlikely state is tracked here is to make the + // decoding->encoding roundtrip not lossy. But we expect that the value + // slices present in this map are always of length 1. + Label map[string][]string + // NumLabel is a per-label-key map to values for numeric labels. See a note + // above on handling multiple values for a label. + NumLabel map[string][]int64 + // NumUnit is a per-label-key map to the unit names of corresponding numeric + // label values. The unit info may be missing even if the label is in + // NumLabel, see the docs in profile.proto for details. When the value is + // slice is present and not nil, its length must be equal to the length of + // the corresponding value slice in NumLabel. + NumUnit map[string][]string + + locationIDX []uint64 + labelX []label +} + +// label corresponds to Profile.Label +type label struct { + keyX int64 + // Exactly one of the two following values must be set + strX int64 + numX int64 // Integer value for this label + // can be set if numX has value + unitX int64 +} + +// Mapping corresponds to Profile.Mapping +type Mapping struct { + ID uint64 + Start uint64 + Limit uint64 + Offset uint64 + File string + BuildID string + HasFunctions bool + HasFilenames bool + HasLineNumbers bool + HasInlineFrames bool + + fileX int64 + buildIDX int64 + + // Name of the kernel relocation symbol ("_text" or "_stext"), extracted from File. + // For linux kernel mappings generated by some tools, correct symbolization depends + // on knowing which of the two possible relocation symbols was used for `Start`. + // This is given to us as a suffix in `File` (e.g. "[kernel.kallsyms]_stext"). + // + // Note, this public field is not persisted in the proto. For the purposes of + // copying / merging / hashing profiles, it is considered subsumed by `File`. + KernelRelocationSymbol string +} + +// Location corresponds to Profile.Location +type Location struct { + ID uint64 + Mapping *Mapping + Address uint64 + Line []Line + IsFolded bool + + mappingIDX uint64 +} + +// Line corresponds to Profile.Line +type Line struct { + Function *Function + Line int64 + Column int64 + + functionIDX uint64 +} + +// Function corresponds to Profile.Function +type Function struct { + ID uint64 + Name string + SystemName string + Filename string + StartLine int64 + + nameX int64 + systemNameX int64 + filenameX int64 +} + +// Parse parses a profile and checks for its validity. The input +// may be a gzip-compressed encoded protobuf or one of many legacy +// profile formats which may be unsupported in the future. +func Parse(r io.Reader) (*Profile, error) { + data, err := io.ReadAll(r) + if err != nil { + return nil, err + } + return ParseData(data) +} + +// ParseData parses a profile from a buffer and checks for its +// validity. +func ParseData(data []byte) (*Profile, error) { + var p *Profile + var err error + if len(data) >= 2 && data[0] == 0x1f && data[1] == 0x8b { + gz, err := gzip.NewReader(bytes.NewBuffer(data)) + if err == nil { + data, err = io.ReadAll(gz) + } + if err != nil { + return nil, fmt.Errorf("decompressing profile: %v", err) + } + } + if p, err = ParseUncompressed(data); err != nil && err != errNoData && err != errConcatProfile { + p, err = parseLegacy(data) + } + + if err != nil { + return nil, fmt.Errorf("parsing profile: %v", err) + } + + if err := p.CheckValid(); err != nil { + return nil, fmt.Errorf("malformed profile: %v", err) + } + return p, nil +} + +var errUnrecognized = fmt.Errorf("unrecognized profile format") +var errMalformed = fmt.Errorf("malformed profile format") +var errNoData = fmt.Errorf("empty input file") +var errConcatProfile = fmt.Errorf("concatenated profiles detected") + +func parseLegacy(data []byte) (*Profile, error) { + parsers := []func([]byte) (*Profile, error){ + parseCPU, + parseHeap, + parseGoCount, // goroutine, threadcreate + parseThread, + parseContention, + parseJavaProfile, + } + + for _, parser := range parsers { + p, err := parser(data) + if err == nil { + p.addLegacyFrameInfo() + return p, nil + } + if err != errUnrecognized { + return nil, err + } + } + return nil, errUnrecognized +} + +// ParseUncompressed parses an uncompressed protobuf into a profile. +func ParseUncompressed(data []byte) (*Profile, error) { + if len(data) == 0 { + return nil, errNoData + } + p := &Profile{} + if err := unmarshal(data, p); err != nil { + return nil, err + } + + if err := p.postDecode(); err != nil { + return nil, err + } + + return p, nil +} + +var libRx = regexp.MustCompile(`([.]so$|[.]so[._][0-9]+)`) + +// massageMappings applies heuristic-based changes to the profile +// mappings to account for quirks of some environments. +func (p *Profile) massageMappings() { + // Merge adjacent regions with matching names, checking that the offsets match + if len(p.Mapping) > 1 { + mappings := []*Mapping{p.Mapping[0]} + for _, m := range p.Mapping[1:] { + lm := mappings[len(mappings)-1] + if adjacent(lm, m) { + lm.Limit = m.Limit + if m.File != "" { + lm.File = m.File + } + if m.BuildID != "" { + lm.BuildID = m.BuildID + } + p.updateLocationMapping(m, lm) + continue + } + mappings = append(mappings, m) + } + p.Mapping = mappings + } + + // Use heuristics to identify main binary and move it to the top of the list of mappings + for i, m := range p.Mapping { + file := strings.TrimSpace(strings.Replace(m.File, "(deleted)", "", -1)) + if len(file) == 0 { + continue + } + if len(libRx.FindStringSubmatch(file)) > 0 { + continue + } + if file[0] == '[' { + continue + } + // Swap what we guess is main to position 0. + p.Mapping[0], p.Mapping[i] = p.Mapping[i], p.Mapping[0] + break + } + + // Keep the mapping IDs neatly sorted + for i, m := range p.Mapping { + m.ID = uint64(i + 1) + } +} + +// adjacent returns whether two mapping entries represent the same +// mapping that has been split into two. Check that their addresses are adjacent, +// and if the offsets match, if they are available. +func adjacent(m1, m2 *Mapping) bool { + if m1.File != "" && m2.File != "" { + if m1.File != m2.File { + return false + } + } + if m1.BuildID != "" && m2.BuildID != "" { + if m1.BuildID != m2.BuildID { + return false + } + } + if m1.Limit != m2.Start { + return false + } + if m1.Offset != 0 && m2.Offset != 0 { + offset := m1.Offset + (m1.Limit - m1.Start) + if offset != m2.Offset { + return false + } + } + return true +} + +func (p *Profile) updateLocationMapping(from, to *Mapping) { + for _, l := range p.Location { + if l.Mapping == from { + l.Mapping = to + } + } +} + +func serialize(p *Profile) []byte { + p.encodeMu.Lock() + p.preEncode() + b := marshal(p) + p.encodeMu.Unlock() + return b +} + +// Write writes the profile as a gzip-compressed marshaled protobuf. +func (p *Profile) Write(w io.Writer) error { + zw := gzip.NewWriter(w) + defer zw.Close() + _, err := zw.Write(serialize(p)) + return err +} + +// WriteUncompressed writes the profile as a marshaled protobuf. +func (p *Profile) WriteUncompressed(w io.Writer) error { + _, err := w.Write(serialize(p)) + return err +} + +// CheckValid tests whether the profile is valid. Checks include, but are +// not limited to: +// - len(Profile.Sample[n].value) == len(Profile.value_unit) +// - Sample.id has a corresponding Profile.Location +func (p *Profile) CheckValid() error { + // Check that sample values are consistent + sampleLen := len(p.SampleType) + if sampleLen == 0 && len(p.Sample) != 0 { + return fmt.Errorf("missing sample type information") + } + for _, s := range p.Sample { + if s == nil { + return fmt.Errorf("profile has nil sample") + } + if len(s.Value) != sampleLen { + return fmt.Errorf("mismatch: sample has %d values vs. %d types", len(s.Value), len(p.SampleType)) + } + for _, l := range s.Location { + if l == nil { + return fmt.Errorf("sample has nil location") + } + } + } + + // Check that all mappings/locations/functions are in the tables + // Check that there are no duplicate ids + mappings := make(map[uint64]*Mapping, len(p.Mapping)) + for _, m := range p.Mapping { + if m == nil { + return fmt.Errorf("profile has nil mapping") + } + if m.ID == 0 { + return fmt.Errorf("found mapping with reserved ID=0") + } + if mappings[m.ID] != nil { + return fmt.Errorf("multiple mappings with same id: %d", m.ID) + } + mappings[m.ID] = m + } + functions := make(map[uint64]*Function, len(p.Function)) + for _, f := range p.Function { + if f == nil { + return fmt.Errorf("profile has nil function") + } + if f.ID == 0 { + return fmt.Errorf("found function with reserved ID=0") + } + if functions[f.ID] != nil { + return fmt.Errorf("multiple functions with same id: %d", f.ID) + } + functions[f.ID] = f + } + locations := make(map[uint64]*Location, len(p.Location)) + for _, l := range p.Location { + if l == nil { + return fmt.Errorf("profile has nil location") + } + if l.ID == 0 { + return fmt.Errorf("found location with reserved id=0") + } + if locations[l.ID] != nil { + return fmt.Errorf("multiple locations with same id: %d", l.ID) + } + locations[l.ID] = l + if m := l.Mapping; m != nil { + if m.ID == 0 || mappings[m.ID] != m { + return fmt.Errorf("inconsistent mapping %p: %d", m, m.ID) + } + } + for _, ln := range l.Line { + f := ln.Function + if f == nil { + return fmt.Errorf("location id: %d has a line with nil function", l.ID) + } + if f.ID == 0 || functions[f.ID] != f { + return fmt.Errorf("inconsistent function %p: %d", f, f.ID) + } + } + } + return nil +} + +// Aggregate merges the locations in the profile into equivalence +// classes preserving the request attributes. It also updates the +// samples to point to the merged locations. +func (p *Profile) Aggregate(inlineFrame, function, filename, linenumber, columnnumber, address bool) error { + for _, m := range p.Mapping { + m.HasInlineFrames = m.HasInlineFrames && inlineFrame + m.HasFunctions = m.HasFunctions && function + m.HasFilenames = m.HasFilenames && filename + m.HasLineNumbers = m.HasLineNumbers && linenumber + } + + // Aggregate functions + if !function || !filename { + for _, f := range p.Function { + if !function { + f.Name = "" + f.SystemName = "" + } + if !filename { + f.Filename = "" + } + } + } + + // Aggregate locations + if !inlineFrame || !address || !linenumber || !columnnumber { + for _, l := range p.Location { + if !inlineFrame && len(l.Line) > 1 { + l.Line = l.Line[len(l.Line)-1:] + } + if !linenumber { + for i := range l.Line { + l.Line[i].Line = 0 + l.Line[i].Column = 0 + } + } + if !columnnumber { + for i := range l.Line { + l.Line[i].Column = 0 + } + } + if !address { + l.Address = 0 + } + } + } + + return p.CheckValid() +} + +// NumLabelUnits returns a map of numeric label keys to the units +// associated with those keys and a map of those keys to any units +// that were encountered but not used. +// Unit for a given key is the first encountered unit for that key. If multiple +// units are encountered for values paired with a particular key, then the first +// unit encountered is used and all other units are returned in sorted order +// in map of ignored units. +// If no units are encountered for a particular key, the unit is then inferred +// based on the key. +func (p *Profile) NumLabelUnits() (map[string]string, map[string][]string) { + numLabelUnits := map[string]string{} + ignoredUnits := map[string]map[string]bool{} + encounteredKeys := map[string]bool{} + + // Determine units based on numeric tags for each sample. + for _, s := range p.Sample { + for k := range s.NumLabel { + encounteredKeys[k] = true + for _, unit := range s.NumUnit[k] { + if unit == "" { + continue + } + if wantUnit, ok := numLabelUnits[k]; !ok { + numLabelUnits[k] = unit + } else if wantUnit != unit { + if v, ok := ignoredUnits[k]; ok { + v[unit] = true + } else { + ignoredUnits[k] = map[string]bool{unit: true} + } + } + } + } + } + // Infer units for keys without any units associated with + // numeric tag values. + for key := range encounteredKeys { + unit := numLabelUnits[key] + if unit == "" { + switch key { + case "alignment", "request": + numLabelUnits[key] = "bytes" + default: + numLabelUnits[key] = key + } + } + } + + // Copy ignored units into more readable format + unitsIgnored := make(map[string][]string, len(ignoredUnits)) + for key, values := range ignoredUnits { + units := make([]string, len(values)) + i := 0 + for unit := range values { + units[i] = unit + i++ + } + sort.Strings(units) + unitsIgnored[key] = units + } + + return numLabelUnits, unitsIgnored +} + +// String dumps a text representation of a profile. Intended mainly +// for debugging purposes. +func (p *Profile) String() string { + ss := make([]string, 0, len(p.Comments)+len(p.Sample)+len(p.Mapping)+len(p.Location)) + for _, c := range p.Comments { + ss = append(ss, "Comment: "+c) + } + if url := p.DocURL; url != "" { + ss = append(ss, fmt.Sprintf("Doc: %s", url)) + } + if pt := p.PeriodType; pt != nil { + ss = append(ss, fmt.Sprintf("PeriodType: %s %s", pt.Type, pt.Unit)) + } + ss = append(ss, fmt.Sprintf("Period: %d", p.Period)) + if p.TimeNanos != 0 { + ss = append(ss, fmt.Sprintf("Time: %v", time.Unix(0, p.TimeNanos))) + } + if p.DurationNanos != 0 { + ss = append(ss, fmt.Sprintf("Duration: %.4v", time.Duration(p.DurationNanos))) + } + + ss = append(ss, "Samples:") + var sh1 string + for _, s := range p.SampleType { + dflt := "" + if s.Type == p.DefaultSampleType { + dflt = "[dflt]" + } + sh1 = sh1 + fmt.Sprintf("%s/%s%s ", s.Type, s.Unit, dflt) + } + ss = append(ss, strings.TrimSpace(sh1)) + for _, s := range p.Sample { + ss = append(ss, s.string()) + } + + ss = append(ss, "Locations") + for _, l := range p.Location { + ss = append(ss, l.string()) + } + + ss = append(ss, "Mappings") + for _, m := range p.Mapping { + ss = append(ss, m.string()) + } + + return strings.Join(ss, "\n") + "\n" +} + +// string dumps a text representation of a mapping. Intended mainly +// for debugging purposes. +func (m *Mapping) string() string { + bits := "" + if m.HasFunctions { + bits = bits + "[FN]" + } + if m.HasFilenames { + bits = bits + "[FL]" + } + if m.HasLineNumbers { + bits = bits + "[LN]" + } + if m.HasInlineFrames { + bits = bits + "[IN]" + } + return fmt.Sprintf("%d: %#x/%#x/%#x %s %s %s", + m.ID, + m.Start, m.Limit, m.Offset, + m.File, + m.BuildID, + bits) +} + +// string dumps a text representation of a location. Intended mainly +// for debugging purposes. +func (l *Location) string() string { + ss := []string{} + locStr := fmt.Sprintf("%6d: %#x ", l.ID, l.Address) + if m := l.Mapping; m != nil { + locStr = locStr + fmt.Sprintf("M=%d ", m.ID) + } + if l.IsFolded { + locStr = locStr + "[F] " + } + if len(l.Line) == 0 { + ss = append(ss, locStr) + } + for li := range l.Line { + lnStr := "??" + if fn := l.Line[li].Function; fn != nil { + lnStr = fmt.Sprintf("%s %s:%d:%d s=%d", + fn.Name, + fn.Filename, + l.Line[li].Line, + l.Line[li].Column, + fn.StartLine) + if fn.Name != fn.SystemName { + lnStr = lnStr + "(" + fn.SystemName + ")" + } + } + ss = append(ss, locStr+lnStr) + // Do not print location details past the first line + locStr = " " + } + return strings.Join(ss, "\n") +} + +// string dumps a text representation of a sample. Intended mainly +// for debugging purposes. +func (s *Sample) string() string { + ss := []string{} + var sv string + for _, v := range s.Value { + sv = fmt.Sprintf("%s %10d", sv, v) + } + sv = sv + ": " + for _, l := range s.Location { + sv = sv + fmt.Sprintf("%d ", l.ID) + } + ss = append(ss, sv) + const labelHeader = " " + if len(s.Label) > 0 { + ss = append(ss, labelHeader+labelsToString(s.Label)) + } + if len(s.NumLabel) > 0 { + ss = append(ss, labelHeader+numLabelsToString(s.NumLabel, s.NumUnit)) + } + return strings.Join(ss, "\n") +} + +// labelsToString returns a string representation of a +// map representing labels. +func labelsToString(labels map[string][]string) string { + ls := []string{} + for k, v := range labels { + ls = append(ls, fmt.Sprintf("%s:%v", k, v)) + } + sort.Strings(ls) + return strings.Join(ls, " ") +} + +// numLabelsToString returns a string representation of a map +// representing numeric labels. +func numLabelsToString(numLabels map[string][]int64, numUnits map[string][]string) string { + ls := []string{} + for k, v := range numLabels { + units := numUnits[k] + var labelString string + if len(units) == len(v) { + values := make([]string, len(v)) + for i, vv := range v { + values[i] = fmt.Sprintf("%d %s", vv, units[i]) + } + labelString = fmt.Sprintf("%s:%v", k, values) + } else { + labelString = fmt.Sprintf("%s:%v", k, v) + } + ls = append(ls, labelString) + } + sort.Strings(ls) + return strings.Join(ls, " ") +} + +// SetLabel sets the specified key to the specified value for all samples in the +// profile. +func (p *Profile) SetLabel(key string, value []string) { + for _, sample := range p.Sample { + if sample.Label == nil { + sample.Label = map[string][]string{key: value} + } else { + sample.Label[key] = value + } + } +} + +// RemoveLabel removes all labels associated with the specified key for all +// samples in the profile. +func (p *Profile) RemoveLabel(key string) { + for _, sample := range p.Sample { + delete(sample.Label, key) + } +} + +// HasLabel returns true if a sample has a label with indicated key and value. +func (s *Sample) HasLabel(key, value string) bool { + for _, v := range s.Label[key] { + if v == value { + return true + } + } + return false +} + +// SetNumLabel sets the specified key to the specified value for all samples in the +// profile. "unit" is a slice that describes the units that each corresponding member +// of "values" is measured in (e.g. bytes or seconds). If there is no relevant +// unit for a given value, that member of "unit" should be the empty string. +// "unit" must either have the same length as "value", or be nil. +func (p *Profile) SetNumLabel(key string, value []int64, unit []string) { + for _, sample := range p.Sample { + if sample.NumLabel == nil { + sample.NumLabel = map[string][]int64{key: value} + } else { + sample.NumLabel[key] = value + } + if sample.NumUnit == nil { + sample.NumUnit = map[string][]string{key: unit} + } else { + sample.NumUnit[key] = unit + } + } +} + +// RemoveNumLabel removes all numerical labels associated with the specified key for all +// samples in the profile. +func (p *Profile) RemoveNumLabel(key string) { + for _, sample := range p.Sample { + delete(sample.NumLabel, key) + delete(sample.NumUnit, key) + } +} + +// DiffBaseSample returns true if a sample belongs to the diff base and false +// otherwise. +func (s *Sample) DiffBaseSample() bool { + return s.HasLabel("pprof::base", "true") +} + +// Scale multiplies all sample values in a profile by a constant and keeps +// only samples that have at least one non-zero value. +func (p *Profile) Scale(ratio float64) { + if ratio == 1 { + return + } + ratios := make([]float64, len(p.SampleType)) + for i := range p.SampleType { + ratios[i] = ratio + } + p.ScaleN(ratios) +} + +// ScaleN multiplies each sample values in a sample by a different amount +// and keeps only samples that have at least one non-zero value. +func (p *Profile) ScaleN(ratios []float64) error { + if len(p.SampleType) != len(ratios) { + return fmt.Errorf("mismatched scale ratios, got %d, want %d", len(ratios), len(p.SampleType)) + } + allOnes := true + for _, r := range ratios { + if r != 1 { + allOnes = false + break + } + } + if allOnes { + return nil + } + fillIdx := 0 + for _, s := range p.Sample { + keepSample := false + for i, v := range s.Value { + if ratios[i] != 1 { + val := int64(math.Round(float64(v) * ratios[i])) + s.Value[i] = val + keepSample = keepSample || val != 0 + } + } + if keepSample { + p.Sample[fillIdx] = s + fillIdx++ + } + } + p.Sample = p.Sample[:fillIdx] + return nil +} + +// HasFunctions determines if all locations in this profile have +// symbolized function information. +func (p *Profile) HasFunctions() bool { + for _, l := range p.Location { + if l.Mapping != nil && !l.Mapping.HasFunctions { + return false + } + } + return true +} + +// HasFileLines determines if all locations in this profile have +// symbolized file and line number information. +func (p *Profile) HasFileLines() bool { + for _, l := range p.Location { + if l.Mapping != nil && (!l.Mapping.HasFilenames || !l.Mapping.HasLineNumbers) { + return false + } + } + return true +} + +// Unsymbolizable returns true if a mapping points to a binary for which +// locations can't be symbolized in principle, at least now. Examples are +// "[vdso]", "[vsyscall]" and some others, see the code. +func (m *Mapping) Unsymbolizable() bool { + name := filepath.Base(m.File) + return strings.HasPrefix(name, "[") || strings.HasPrefix(name, "linux-vdso") || strings.HasPrefix(m.File, "/dev/dri/") || m.File == "//anon" +} + +// Copy makes a fully independent copy of a profile. +func (p *Profile) Copy() *Profile { + pp := &Profile{} + if err := unmarshal(serialize(p), pp); err != nil { + panic(err) + } + if err := pp.postDecode(); err != nil { + panic(err) + } + + return pp +} diff --git a/vendor/github.com/google/pprof/profile/proto.go b/vendor/github.com/google/pprof/profile/proto.go new file mode 100644 index 000000000..a15696ba1 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/proto.go @@ -0,0 +1,367 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file is a simple protocol buffer encoder and decoder. +// The format is described at +// https://developers.google.com/protocol-buffers/docs/encoding +// +// A protocol message must implement the message interface: +// decoder() []decoder +// encode(*buffer) +// +// The decode method returns a slice indexed by field number that gives the +// function to decode that field. +// The encode method encodes its receiver into the given buffer. +// +// The two methods are simple enough to be implemented by hand rather than +// by using a protocol compiler. +// +// See profile.go for examples of messages implementing this interface. +// +// There is no support for groups, message sets, or "has" bits. + +package profile + +import ( + "errors" + "fmt" +) + +type buffer struct { + field int // field tag + typ int // proto wire type code for field + u64 uint64 + data []byte + tmp [16]byte + tmpLines []Line // temporary storage used while decoding "repeated Line". +} + +type decoder func(*buffer, message) error + +type message interface { + decoder() []decoder + encode(*buffer) +} + +func marshal(m message) []byte { + var b buffer + m.encode(&b) + return b.data +} + +func encodeVarint(b *buffer, x uint64) { + for x >= 128 { + b.data = append(b.data, byte(x)|0x80) + x >>= 7 + } + b.data = append(b.data, byte(x)) +} + +func encodeLength(b *buffer, tag int, len int) { + encodeVarint(b, uint64(tag)<<3|2) + encodeVarint(b, uint64(len)) +} + +func encodeUint64(b *buffer, tag int, x uint64) { + // append varint to b.data + encodeVarint(b, uint64(tag)<<3) + encodeVarint(b, x) +} + +func encodeUint64s(b *buffer, tag int, x []uint64) { + if len(x) > 2 { + // Use packed encoding + n1 := len(b.data) + for _, u := range x { + encodeVarint(b, u) + } + n2 := len(b.data) + encodeLength(b, tag, n2-n1) + n3 := len(b.data) + copy(b.tmp[:], b.data[n2:n3]) + copy(b.data[n1+(n3-n2):], b.data[n1:n2]) + copy(b.data[n1:], b.tmp[:n3-n2]) + return + } + for _, u := range x { + encodeUint64(b, tag, u) + } +} + +func encodeUint64Opt(b *buffer, tag int, x uint64) { + if x == 0 { + return + } + encodeUint64(b, tag, x) +} + +func encodeInt64(b *buffer, tag int, x int64) { + u := uint64(x) + encodeUint64(b, tag, u) +} + +func encodeInt64s(b *buffer, tag int, x []int64) { + if len(x) > 2 { + // Use packed encoding + n1 := len(b.data) + for _, u := range x { + encodeVarint(b, uint64(u)) + } + n2 := len(b.data) + encodeLength(b, tag, n2-n1) + n3 := len(b.data) + copy(b.tmp[:], b.data[n2:n3]) + copy(b.data[n1+(n3-n2):], b.data[n1:n2]) + copy(b.data[n1:], b.tmp[:n3-n2]) + return + } + for _, u := range x { + encodeInt64(b, tag, u) + } +} + +func encodeInt64Opt(b *buffer, tag int, x int64) { + if x == 0 { + return + } + encodeInt64(b, tag, x) +} + +func encodeString(b *buffer, tag int, x string) { + encodeLength(b, tag, len(x)) + b.data = append(b.data, x...) +} + +func encodeStrings(b *buffer, tag int, x []string) { + for _, s := range x { + encodeString(b, tag, s) + } +} + +func encodeBool(b *buffer, tag int, x bool) { + if x { + encodeUint64(b, tag, 1) + } else { + encodeUint64(b, tag, 0) + } +} + +func encodeBoolOpt(b *buffer, tag int, x bool) { + if x { + encodeBool(b, tag, x) + } +} + +func encodeMessage(b *buffer, tag int, m message) { + n1 := len(b.data) + m.encode(b) + n2 := len(b.data) + encodeLength(b, tag, n2-n1) + n3 := len(b.data) + copy(b.tmp[:], b.data[n2:n3]) + copy(b.data[n1+(n3-n2):], b.data[n1:n2]) + copy(b.data[n1:], b.tmp[:n3-n2]) +} + +func unmarshal(data []byte, m message) (err error) { + b := buffer{data: data, typ: 2} + return decodeMessage(&b, m) +} + +func le64(p []byte) uint64 { + return uint64(p[0]) | uint64(p[1])<<8 | uint64(p[2])<<16 | uint64(p[3])<<24 | uint64(p[4])<<32 | uint64(p[5])<<40 | uint64(p[6])<<48 | uint64(p[7])<<56 +} + +func le32(p []byte) uint32 { + return uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 | uint32(p[3])<<24 +} + +func decodeVarint(data []byte) (uint64, []byte, error) { + var u uint64 + for i := 0; ; i++ { + if i >= 10 || i >= len(data) { + return 0, nil, errors.New("bad varint") + } + u |= uint64(data[i]&0x7F) << uint(7*i) + if data[i]&0x80 == 0 { + return u, data[i+1:], nil + } + } +} + +func decodeField(b *buffer, data []byte) ([]byte, error) { + x, data, err := decodeVarint(data) + if err != nil { + return nil, err + } + b.field = int(x >> 3) + b.typ = int(x & 7) + b.data = nil + b.u64 = 0 + switch b.typ { + case 0: + b.u64, data, err = decodeVarint(data) + if err != nil { + return nil, err + } + case 1: + if len(data) < 8 { + return nil, errors.New("not enough data") + } + b.u64 = le64(data[:8]) + data = data[8:] + case 2: + var n uint64 + n, data, err = decodeVarint(data) + if err != nil { + return nil, err + } + if n > uint64(len(data)) { + return nil, errors.New("too much data") + } + b.data = data[:n] + data = data[n:] + case 5: + if len(data) < 4 { + return nil, errors.New("not enough data") + } + b.u64 = uint64(le32(data[:4])) + data = data[4:] + default: + return nil, fmt.Errorf("unknown wire type: %d", b.typ) + } + + return data, nil +} + +func checkType(b *buffer, typ int) error { + if b.typ != typ { + return errors.New("type mismatch") + } + return nil +} + +func decodeMessage(b *buffer, m message) error { + if err := checkType(b, 2); err != nil { + return err + } + dec := m.decoder() + data := b.data + for len(data) > 0 { + // pull varint field# + type + var err error + data, err = decodeField(b, data) + if err != nil { + return err + } + if b.field >= len(dec) || dec[b.field] == nil { + continue + } + if err := dec[b.field](b, m); err != nil { + return err + } + } + return nil +} + +func decodeInt64(b *buffer, x *int64) error { + if err := checkType(b, 0); err != nil { + return err + } + *x = int64(b.u64) + return nil +} + +func decodeInt64s(b *buffer, x *[]int64) error { + if b.typ == 2 { + // Packed encoding + data := b.data + for len(data) > 0 { + var u uint64 + var err error + + if u, data, err = decodeVarint(data); err != nil { + return err + } + *x = append(*x, int64(u)) + } + return nil + } + var i int64 + if err := decodeInt64(b, &i); err != nil { + return err + } + *x = append(*x, i) + return nil +} + +func decodeUint64(b *buffer, x *uint64) error { + if err := checkType(b, 0); err != nil { + return err + } + *x = b.u64 + return nil +} + +func decodeUint64s(b *buffer, x *[]uint64) error { + if b.typ == 2 { + data := b.data + // Packed encoding + for len(data) > 0 { + var u uint64 + var err error + + if u, data, err = decodeVarint(data); err != nil { + return err + } + *x = append(*x, u) + } + return nil + } + var u uint64 + if err := decodeUint64(b, &u); err != nil { + return err + } + *x = append(*x, u) + return nil +} + +func decodeString(b *buffer, x *string) error { + if err := checkType(b, 2); err != nil { + return err + } + *x = string(b.data) + return nil +} + +func decodeStrings(b *buffer, x *[]string) error { + var s string + if err := decodeString(b, &s); err != nil { + return err + } + *x = append(*x, s) + return nil +} + +func decodeBool(b *buffer, x *bool) error { + if err := checkType(b, 0); err != nil { + return err + } + if int64(b.u64) == 0 { + *x = false + } else { + *x = true + } + return nil +} diff --git a/vendor/github.com/google/pprof/profile/prune.go b/vendor/github.com/google/pprof/profile/prune.go new file mode 100644 index 000000000..b2f9fd546 --- /dev/null +++ b/vendor/github.com/google/pprof/profile/prune.go @@ -0,0 +1,194 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Implements methods to remove frames from profiles. + +package profile + +import ( + "fmt" + "regexp" + "strings" +) + +var ( + reservedNames = []string{"(anonymous namespace)", "operator()"} + bracketRx = func() *regexp.Regexp { + var quotedNames []string + for _, name := range append(reservedNames, "(") { + quotedNames = append(quotedNames, regexp.QuoteMeta(name)) + } + return regexp.MustCompile(strings.Join(quotedNames, "|")) + }() +) + +// simplifyFunc does some primitive simplification of function names. +func simplifyFunc(f string) string { + // Account for leading '.' on the PPC ELF v1 ABI. + funcName := strings.TrimPrefix(f, ".") + // Account for unsimplified names -- try to remove the argument list by trimming + // starting from the first '(', but skipping reserved names that have '('. + for _, ind := range bracketRx.FindAllStringSubmatchIndex(funcName, -1) { + foundReserved := false + for _, res := range reservedNames { + if funcName[ind[0]:ind[1]] == res { + foundReserved = true + break + } + } + if !foundReserved { + funcName = funcName[:ind[0]] + break + } + } + return funcName +} + +// Prune removes all nodes beneath a node matching dropRx, and not +// matching keepRx. If the root node of a Sample matches, the sample +// will have an empty stack. +func (p *Profile) Prune(dropRx, keepRx *regexp.Regexp) { + prune := make(map[uint64]bool) + pruneBeneath := make(map[uint64]bool) + + // simplifyFunc can be expensive, so cache results. + // Note that the same function name can be encountered many times due + // different lines and addresses in the same function. + pruneCache := map[string]bool{} // Map from function to whether or not to prune + pruneFromHere := func(s string) bool { + if r, ok := pruneCache[s]; ok { + return r + } + funcName := simplifyFunc(s) + if dropRx.MatchString(funcName) { + if keepRx == nil || !keepRx.MatchString(funcName) { + pruneCache[s] = true + return true + } + } + pruneCache[s] = false + return false + } + + for _, loc := range p.Location { + var i int + for i = len(loc.Line) - 1; i >= 0; i-- { + if fn := loc.Line[i].Function; fn != nil && fn.Name != "" { + if pruneFromHere(fn.Name) { + break + } + } + } + + if i >= 0 { + // Found matching entry to prune. + pruneBeneath[loc.ID] = true + + // Remove the matching location. + if i == len(loc.Line)-1 { + // Matched the top entry: prune the whole location. + prune[loc.ID] = true + } else { + loc.Line = loc.Line[i+1:] + } + } + } + + // Prune locs from each Sample + for _, sample := range p.Sample { + // Scan from the root to the leaves to find the prune location. + // Do not prune frames before the first user frame, to avoid + // pruning everything. + foundUser := false + for i := len(sample.Location) - 1; i >= 0; i-- { + id := sample.Location[i].ID + if !prune[id] && !pruneBeneath[id] { + foundUser = true + continue + } + if !foundUser { + continue + } + if prune[id] { + sample.Location = sample.Location[i+1:] + break + } + if pruneBeneath[id] { + sample.Location = sample.Location[i:] + break + } + } + } +} + +// RemoveUninteresting prunes and elides profiles using built-in +// tables of uninteresting function names. +func (p *Profile) RemoveUninteresting() error { + var keep, drop *regexp.Regexp + var err error + + if p.DropFrames != "" { + if drop, err = regexp.Compile("^(" + p.DropFrames + ")$"); err != nil { + return fmt.Errorf("failed to compile regexp %s: %v", p.DropFrames, err) + } + if p.KeepFrames != "" { + if keep, err = regexp.Compile("^(" + p.KeepFrames + ")$"); err != nil { + return fmt.Errorf("failed to compile regexp %s: %v", p.KeepFrames, err) + } + } + p.Prune(drop, keep) + } + return nil +} + +// PruneFrom removes all nodes beneath the lowest node matching dropRx, not including itself. +// +// Please see the example below to understand this method as well as +// the difference from Prune method. +// +// A sample contains Location of [A,B,C,B,D] where D is the top frame and there's no inline. +// +// PruneFrom(A) returns [A,B,C,B,D] because there's no node beneath A. +// Prune(A, nil) returns [B,C,B,D] by removing A itself. +// +// PruneFrom(B) returns [B,C,B,D] by removing all nodes beneath the first B when scanning from the bottom. +// Prune(B, nil) returns [D] because a matching node is found by scanning from the root. +func (p *Profile) PruneFrom(dropRx *regexp.Regexp) { + pruneBeneath := make(map[uint64]bool) + + for _, loc := range p.Location { + for i := 0; i < len(loc.Line); i++ { + if fn := loc.Line[i].Function; fn != nil && fn.Name != "" { + funcName := simplifyFunc(fn.Name) + if dropRx.MatchString(funcName) { + // Found matching entry to prune. + pruneBeneath[loc.ID] = true + loc.Line = loc.Line[i:] + break + } + } + } + } + + // Prune locs from each Sample + for _, sample := range p.Sample { + // Scan from the bottom leaf to the root to find the prune location. + for i, loc := range sample.Location { + if pruneBeneath[loc.ID] { + sample.Location = sample.Location[i:] + break + } + } + } +} diff --git a/vendor/github.com/gorilla/mux/AUTHORS b/vendor/github.com/gorilla/mux/AUTHORS new file mode 100644 index 000000000..b722392ee --- /dev/null +++ b/vendor/github.com/gorilla/mux/AUTHORS @@ -0,0 +1,8 @@ +# This is the official list of gorilla/mux authors for copyright purposes. +# +# Please keep the list sorted. + +Google LLC (https://opensource.google.com/) +Kamil Kisielk +Matt Silverlock +Rodrigo Moraes (https://github.com/moraes) diff --git a/vendor/github.com/gorilla/mux/LICENSE b/vendor/github.com/gorilla/mux/LICENSE new file mode 100644 index 000000000..6903df638 --- /dev/null +++ b/vendor/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012-2018 The Gorilla Authors. 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. + * Neither the name of Google Inc. 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 +OWNER 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/vendor/github.com/gorilla/mux/README.md b/vendor/github.com/gorilla/mux/README.md new file mode 100644 index 000000000..35eea9f10 --- /dev/null +++ b/vendor/github.com/gorilla/mux/README.md @@ -0,0 +1,805 @@ +# gorilla/mux + +[![GoDoc](https://godoc.org/github.com/gorilla/mux?status.svg)](https://godoc.org/github.com/gorilla/mux) +[![CircleCI](https://circleci.com/gh/gorilla/mux.svg?style=svg)](https://circleci.com/gh/gorilla/mux) +[![Sourcegraph](https://sourcegraph.com/github.com/gorilla/mux/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/mux?badge) + +![Gorilla Logo](https://cloud-cdn.questionable.services/gorilla-icon-64.png) + +https://www.gorillatoolkit.org/pkg/mux + +Package `gorilla/mux` implements a request router and dispatcher for matching incoming requests to +their respective handler. + +The name mux stands for "HTTP request multiplexer". Like the standard `http.ServeMux`, `mux.Router` matches incoming requests against a list of registered routes and calls a handler for the route that matches the URL or other conditions. The main features are: + +* It implements the `http.Handler` interface so it is compatible with the standard `http.ServeMux`. +* Requests can be matched based on URL host, path, path prefix, schemes, header and query values, HTTP methods or using custom matchers. +* URL hosts, paths and query values can have variables with an optional regular expression. +* Registered URLs can be built, or "reversed", which helps maintaining references to resources. +* Routes can be used as subrouters: nested routes are only tested if the parent route matches. This is useful to define groups of routes that share common conditions like a host, a path prefix or other repeated attributes. As a bonus, this optimizes request matching. + +--- + +* [Install](#install) +* [Examples](#examples) +* [Matching Routes](#matching-routes) +* [Static Files](#static-files) +* [Serving Single Page Applications](#serving-single-page-applications) (e.g. React, Vue, Ember.js, etc.) +* [Registered URLs](#registered-urls) +* [Walking Routes](#walking-routes) +* [Graceful Shutdown](#graceful-shutdown) +* [Middleware](#middleware) +* [Handling CORS Requests](#handling-cors-requests) +* [Testing Handlers](#testing-handlers) +* [Full Example](#full-example) + +--- + +## Install + +With a [correctly configured](https://golang.org/doc/install#testing) Go toolchain: + +```sh +go get -u github.com/gorilla/mux +``` + +## Examples + +Let's start registering a couple of URL paths and handlers: + +```go +func main() { + r := mux.NewRouter() + r.HandleFunc("/", HomeHandler) + r.HandleFunc("/products", ProductsHandler) + r.HandleFunc("/articles", ArticlesHandler) + http.Handle("/", r) +} +``` + +Here we register three routes mapping URL paths to handlers. This is equivalent to how `http.HandleFunc()` works: if an incoming request URL matches one of the paths, the corresponding handler is called passing (`http.ResponseWriter`, `*http.Request`) as parameters. + +Paths can have variables. They are defined using the format `{name}` or `{name:pattern}`. If a regular expression pattern is not defined, the matched variable will be anything until the next slash. For example: + +```go +r := mux.NewRouter() +r.HandleFunc("/products/{key}", ProductHandler) +r.HandleFunc("/articles/{category}/", ArticlesCategoryHandler) +r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler) +``` + +The names are used to create a map of route variables which can be retrieved calling `mux.Vars()`: + +```go +func ArticlesCategoryHandler(w http.ResponseWriter, r *http.Request) { + vars := mux.Vars(r) + w.WriteHeader(http.StatusOK) + fmt.Fprintf(w, "Category: %v\n", vars["category"]) +} +``` + +And this is all you need to know about the basic usage. More advanced options are explained below. + +### Matching Routes + +Routes can also be restricted to a domain or subdomain. Just define a host pattern to be matched. They can also have variables: + +```go +r := mux.NewRouter() +// Only matches if domain is "www.example.com". +r.Host("www.example.com") +// Matches a dynamic subdomain. +r.Host("{subdomain:[a-z]+}.example.com") +``` + +There are several other matchers that can be added. To match path prefixes: + +```go +r.PathPrefix("/products/") +``` + +...or HTTP methods: + +```go +r.Methods("GET", "POST") +``` + +...or URL schemes: + +```go +r.Schemes("https") +``` + +...or header values: + +```go +r.Headers("X-Requested-With", "XMLHttpRequest") +``` + +...or query values: + +```go +r.Queries("key", "value") +``` + +...or to use a custom matcher function: + +```go +r.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool { + return r.ProtoMajor == 0 +}) +``` + +...and finally, it is possible to combine several matchers in a single route: + +```go +r.HandleFunc("/products", ProductsHandler). + Host("www.example.com"). + Methods("GET"). + Schemes("http") +``` + +Routes are tested in the order they were added to the router. If two routes match, the first one wins: + +```go +r := mux.NewRouter() +r.HandleFunc("/specific", specificHandler) +r.PathPrefix("/").Handler(catchAllHandler) +``` + +Setting the same matching conditions again and again can be boring, so we have a way to group several routes that share the same requirements. We call it "subrouting". + +For example, let's say we have several URLs that should only match when the host is `www.example.com`. Create a route for that host and get a "subrouter" from it: + +```go +r := mux.NewRouter() +s := r.Host("www.example.com").Subrouter() +``` + +Then register routes in the subrouter: + +```go +s.HandleFunc("/products/", ProductsHandler) +s.HandleFunc("/products/{key}", ProductHandler) +s.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler) +``` + +The three URL paths we registered above will only be tested if the domain is `www.example.com`, because the subrouter is tested first. This is not only convenient, but also optimizes request matching. You can create subrouters combining any attribute matchers accepted by a route. + +Subrouters can be used to create domain or path "namespaces": you define subrouters in a central place and then parts of the app can register its paths relatively to a given subrouter. + +There's one more thing about subroutes. When a subrouter has a path prefix, the inner routes use it as base for their paths: + +```go +r := mux.NewRouter() +s := r.PathPrefix("/products").Subrouter() +// "/products/" +s.HandleFunc("/", ProductsHandler) +// "/products/{key}/" +s.HandleFunc("/{key}/", ProductHandler) +// "/products/{key}/details" +s.HandleFunc("/{key}/details", ProductDetailsHandler) +``` + + +### Static Files + +Note that the path provided to `PathPrefix()` represents a "wildcard": calling +`PathPrefix("/static/").Handler(...)` means that the handler will be passed any +request that matches "/static/\*". This makes it easy to serve static files with mux: + +```go +func main() { + var dir string + + flag.StringVar(&dir, "dir", ".", "the directory to serve files from. Defaults to the current dir") + flag.Parse() + r := mux.NewRouter() + + // This will serve files under http://localhost:8000/static/ + r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir(dir)))) + + srv := &http.Server{ + Handler: r, + Addr: "127.0.0.1:8000", + // Good practice: enforce timeouts for servers you create! + WriteTimeout: 15 * time.Second, + ReadTimeout: 15 * time.Second, + } + + log.Fatal(srv.ListenAndServe()) +} +``` + +### Serving Single Page Applications + +Most of the time it makes sense to serve your SPA on a separate web server from your API, +but sometimes it's desirable to serve them both from one place. It's possible to write a simple +handler for serving your SPA (for use with React Router's [BrowserRouter](https://reacttraining.com/react-router/web/api/BrowserRouter) for example), and leverage +mux's powerful routing for your API endpoints. + +```go +package main + +import ( + "encoding/json" + "log" + "net/http" + "os" + "path/filepath" + "time" + + "github.com/gorilla/mux" +) + +// spaHandler implements the http.Handler interface, so we can use it +// to respond to HTTP requests. The path to the static directory and +// path to the index file within that static directory are used to +// serve the SPA in the given static directory. +type spaHandler struct { + staticPath string + indexPath string +} + +// ServeHTTP inspects the URL path to locate a file within the static dir +// on the SPA handler. If a file is found, it will be served. If not, the +// file located at the index path on the SPA handler will be served. This +// is suitable behavior for serving an SPA (single page application). +func (h spaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + // get the absolute path to prevent directory traversal + path, err := filepath.Abs(r.URL.Path) + if err != nil { + // if we failed to get the absolute path respond with a 400 bad request + // and stop + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + // prepend the path with the path to the static directory + path = filepath.Join(h.staticPath, path) + + // check whether a file exists at the given path + _, err = os.Stat(path) + if os.IsNotExist(err) { + // file does not exist, serve index.html + http.ServeFile(w, r, filepath.Join(h.staticPath, h.indexPath)) + return + } else if err != nil { + // if we got an error (that wasn't that the file doesn't exist) stating the + // file, return a 500 internal server error and stop + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + // otherwise, use http.FileServer to serve the static dir + http.FileServer(http.Dir(h.staticPath)).ServeHTTP(w, r) +} + +func main() { + router := mux.NewRouter() + + router.HandleFunc("/api/health", func(w http.ResponseWriter, r *http.Request) { + // an example API handler + json.NewEncoder(w).Encode(map[string]bool{"ok": true}) + }) + + spa := spaHandler{staticPath: "build", indexPath: "index.html"} + router.PathPrefix("/").Handler(spa) + + srv := &http.Server{ + Handler: router, + Addr: "127.0.0.1:8000", + // Good practice: enforce timeouts for servers you create! + WriteTimeout: 15 * time.Second, + ReadTimeout: 15 * time.Second, + } + + log.Fatal(srv.ListenAndServe()) +} +``` + +### Registered URLs + +Now let's see how to build registered URLs. + +Routes can be named. All routes that define a name can have their URLs built, or "reversed". We define a name calling `Name()` on a route. For example: + +```go +r := mux.NewRouter() +r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). + Name("article") +``` + +To build a URL, get the route and call the `URL()` method, passing a sequence of key/value pairs for the route variables. For the previous route, we would do: + +```go +url, err := r.Get("article").URL("category", "technology", "id", "42") +``` + +...and the result will be a `url.URL` with the following path: + +``` +"/articles/technology/42" +``` + +This also works for host and query value variables: + +```go +r := mux.NewRouter() +r.Host("{subdomain}.example.com"). + Path("/articles/{category}/{id:[0-9]+}"). + Queries("filter", "{filter}"). + HandlerFunc(ArticleHandler). + Name("article") + +// url.String() will be "http://news.example.com/articles/technology/42?filter=gorilla" +url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42", + "filter", "gorilla") +``` + +All variables defined in the route are required, and their values must conform to the corresponding patterns. These requirements guarantee that a generated URL will always match a registered route -- the only exception is for explicitly defined "build-only" routes which never match. + +Regex support also exists for matching Headers within a route. For example, we could do: + +```go +r.HeadersRegexp("Content-Type", "application/(text|json)") +``` + +...and the route will match both requests with a Content-Type of `application/json` as well as `application/text` + +There's also a way to build only the URL host or path for a route: use the methods `URLHost()` or `URLPath()` instead. For the previous route, we would do: + +```go +// "http://news.example.com/" +host, err := r.Get("article").URLHost("subdomain", "news") + +// "/articles/technology/42" +path, err := r.Get("article").URLPath("category", "technology", "id", "42") +``` + +And if you use subrouters, host and path defined separately can be built as well: + +```go +r := mux.NewRouter() +s := r.Host("{subdomain}.example.com").Subrouter() +s.Path("/articles/{category}/{id:[0-9]+}"). + HandlerFunc(ArticleHandler). + Name("article") + +// "http://news.example.com/articles/technology/42" +url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42") +``` + +### Walking Routes + +The `Walk` function on `mux.Router` can be used to visit all of the routes that are registered on a router. For example, +the following prints all of the registered routes: + +```go +package main + +import ( + "fmt" + "net/http" + "strings" + + "github.com/gorilla/mux" +) + +func handler(w http.ResponseWriter, r *http.Request) { + return +} + +func main() { + r := mux.NewRouter() + r.HandleFunc("/", handler) + r.HandleFunc("/products", handler).Methods("POST") + r.HandleFunc("/articles", handler).Methods("GET") + r.HandleFunc("/articles/{id}", handler).Methods("GET", "PUT") + r.HandleFunc("/authors", handler).Queries("surname", "{surname}") + err := r.Walk(func(route *mux.Route, router *mux.Router, ancestors []*mux.Route) error { + pathTemplate, err := route.GetPathTemplate() + if err == nil { + fmt.Println("ROUTE:", pathTemplate) + } + pathRegexp, err := route.GetPathRegexp() + if err == nil { + fmt.Println("Path regexp:", pathRegexp) + } + queriesTemplates, err := route.GetQueriesTemplates() + if err == nil { + fmt.Println("Queries templates:", strings.Join(queriesTemplates, ",")) + } + queriesRegexps, err := route.GetQueriesRegexp() + if err == nil { + fmt.Println("Queries regexps:", strings.Join(queriesRegexps, ",")) + } + methods, err := route.GetMethods() + if err == nil { + fmt.Println("Methods:", strings.Join(methods, ",")) + } + fmt.Println() + return nil + }) + + if err != nil { + fmt.Println(err) + } + + http.Handle("/", r) +} +``` + +### Graceful Shutdown + +Go 1.8 introduced the ability to [gracefully shutdown](https://golang.org/doc/go1.8#http_shutdown) a `*http.Server`. Here's how to do that alongside `mux`: + +```go +package main + +import ( + "context" + "flag" + "log" + "net/http" + "os" + "os/signal" + "time" + + "github.com/gorilla/mux" +) + +func main() { + var wait time.Duration + flag.DurationVar(&wait, "graceful-timeout", time.Second * 15, "the duration for which the server gracefully wait for existing connections to finish - e.g. 15s or 1m") + flag.Parse() + + r := mux.NewRouter() + // Add your routes as needed + + srv := &http.Server{ + Addr: "0.0.0.0:8080", + // Good practice to set timeouts to avoid Slowloris attacks. + WriteTimeout: time.Second * 15, + ReadTimeout: time.Second * 15, + IdleTimeout: time.Second * 60, + Handler: r, // Pass our instance of gorilla/mux in. + } + + // Run our server in a goroutine so that it doesn't block. + go func() { + if err := srv.ListenAndServe(); err != nil { + log.Println(err) + } + }() + + c := make(chan os.Signal, 1) + // We'll accept graceful shutdowns when quit via SIGINT (Ctrl+C) + // SIGKILL, SIGQUIT or SIGTERM (Ctrl+/) will not be caught. + signal.Notify(c, os.Interrupt) + + // Block until we receive our signal. + <-c + + // Create a deadline to wait for. + ctx, cancel := context.WithTimeout(context.Background(), wait) + defer cancel() + // Doesn't block if no connections, but will otherwise wait + // until the timeout deadline. + srv.Shutdown(ctx) + // Optionally, you could run srv.Shutdown in a goroutine and block on + // <-ctx.Done() if your application should wait for other services + // to finalize based on context cancellation. + log.Println("shutting down") + os.Exit(0) +} +``` + +### Middleware + +Mux supports the addition of middlewares to a [Router](https://godoc.org/github.com/gorilla/mux#Router), which are executed in the order they are added if a match is found, including its subrouters. +Middlewares are (typically) small pieces of code which take one request, do something with it, and pass it down to another middleware or the final handler. Some common use cases for middleware are request logging, header manipulation, or `ResponseWriter` hijacking. + +Mux middlewares are defined using the de facto standard type: + +```go +type MiddlewareFunc func(http.Handler) http.Handler +``` + +Typically, the returned handler is a closure which does something with the http.ResponseWriter and http.Request passed to it, and then calls the handler passed as parameter to the MiddlewareFunc. This takes advantage of closures being able access variables from the context where they are created, while retaining the signature enforced by the receivers. + +A very basic middleware which logs the URI of the request being handled could be written as: + +```go +func loggingMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Do stuff here + log.Println(r.RequestURI) + // Call the next handler, which can be another middleware in the chain, or the final handler. + next.ServeHTTP(w, r) + }) +} +``` + +Middlewares can be added to a router using `Router.Use()`: + +```go +r := mux.NewRouter() +r.HandleFunc("/", handler) +r.Use(loggingMiddleware) +``` + +A more complex authentication middleware, which maps session token to users, could be written as: + +```go +// Define our struct +type authenticationMiddleware struct { + tokenUsers map[string]string +} + +// Initialize it somewhere +func (amw *authenticationMiddleware) Populate() { + amw.tokenUsers["00000000"] = "user0" + amw.tokenUsers["aaaaaaaa"] = "userA" + amw.tokenUsers["05f717e5"] = "randomUser" + amw.tokenUsers["deadbeef"] = "user0" +} + +// Middleware function, which will be called for each request +func (amw *authenticationMiddleware) Middleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + token := r.Header.Get("X-Session-Token") + + if user, found := amw.tokenUsers[token]; found { + // We found the token in our map + log.Printf("Authenticated user %s\n", user) + // Pass down the request to the next middleware (or final handler) + next.ServeHTTP(w, r) + } else { + // Write an error and stop the handler chain + http.Error(w, "Forbidden", http.StatusForbidden) + } + }) +} +``` + +```go +r := mux.NewRouter() +r.HandleFunc("/", handler) + +amw := authenticationMiddleware{} +amw.Populate() + +r.Use(amw.Middleware) +``` + +Note: The handler chain will be stopped if your middleware doesn't call `next.ServeHTTP()` with the corresponding parameters. This can be used to abort a request if the middleware writer wants to. Middlewares _should_ write to `ResponseWriter` if they _are_ going to terminate the request, and they _should not_ write to `ResponseWriter` if they _are not_ going to terminate it. + +### Handling CORS Requests + +[CORSMethodMiddleware](https://godoc.org/github.com/gorilla/mux#CORSMethodMiddleware) intends to make it easier to strictly set the `Access-Control-Allow-Methods` response header. + +* You will still need to use your own CORS handler to set the other CORS headers such as `Access-Control-Allow-Origin` +* The middleware will set the `Access-Control-Allow-Methods` header to all the method matchers (e.g. `r.Methods(http.MethodGet, http.MethodPut, http.MethodOptions)` -> `Access-Control-Allow-Methods: GET,PUT,OPTIONS`) on a route +* If you do not specify any methods, then: +> _Important_: there must be an `OPTIONS` method matcher for the middleware to set the headers. + +Here is an example of using `CORSMethodMiddleware` along with a custom `OPTIONS` handler to set all the required CORS headers: + +```go +package main + +import ( + "net/http" + "github.com/gorilla/mux" +) + +func main() { + r := mux.NewRouter() + + // IMPORTANT: you must specify an OPTIONS method matcher for the middleware to set CORS headers + r.HandleFunc("/foo", fooHandler).Methods(http.MethodGet, http.MethodPut, http.MethodPatch, http.MethodOptions) + r.Use(mux.CORSMethodMiddleware(r)) + + http.ListenAndServe(":8080", r) +} + +func fooHandler(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + if r.Method == http.MethodOptions { + return + } + + w.Write([]byte("foo")) +} +``` + +And an request to `/foo` using something like: + +```bash +curl localhost:8080/foo -v +``` + +Would look like: + +```bash +* Trying ::1... +* TCP_NODELAY set +* Connected to localhost (::1) port 8080 (#0) +> GET /foo HTTP/1.1 +> Host: localhost:8080 +> User-Agent: curl/7.59.0 +> Accept: */* +> +< HTTP/1.1 200 OK +< Access-Control-Allow-Methods: GET,PUT,PATCH,OPTIONS +< Access-Control-Allow-Origin: * +< Date: Fri, 28 Jun 2019 20:13:30 GMT +< Content-Length: 3 +< Content-Type: text/plain; charset=utf-8 +< +* Connection #0 to host localhost left intact +foo +``` + +### Testing Handlers + +Testing handlers in a Go web application is straightforward, and _mux_ doesn't complicate this any further. Given two files: `endpoints.go` and `endpoints_test.go`, here's how we'd test an application using _mux_. + +First, our simple HTTP handler: + +```go +// endpoints.go +package main + +func HealthCheckHandler(w http.ResponseWriter, r *http.Request) { + // A very simple health check. + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + + // In the future we could report back on the status of our DB, or our cache + // (e.g. Redis) by performing a simple PING, and include them in the response. + io.WriteString(w, `{"alive": true}`) +} + +func main() { + r := mux.NewRouter() + r.HandleFunc("/health", HealthCheckHandler) + + log.Fatal(http.ListenAndServe("localhost:8080", r)) +} +``` + +Our test code: + +```go +// endpoints_test.go +package main + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +func TestHealthCheckHandler(t *testing.T) { + // Create a request to pass to our handler. We don't have any query parameters for now, so we'll + // pass 'nil' as the third parameter. + req, err := http.NewRequest("GET", "/health", nil) + if err != nil { + t.Fatal(err) + } + + // We create a ResponseRecorder (which satisfies http.ResponseWriter) to record the response. + rr := httptest.NewRecorder() + handler := http.HandlerFunc(HealthCheckHandler) + + // Our handlers satisfy http.Handler, so we can call their ServeHTTP method + // directly and pass in our Request and ResponseRecorder. + handler.ServeHTTP(rr, req) + + // Check the status code is what we expect. + if status := rr.Code; status != http.StatusOK { + t.Errorf("handler returned wrong status code: got %v want %v", + status, http.StatusOK) + } + + // Check the response body is what we expect. + expected := `{"alive": true}` + if rr.Body.String() != expected { + t.Errorf("handler returned unexpected body: got %v want %v", + rr.Body.String(), expected) + } +} +``` + +In the case that our routes have [variables](#examples), we can pass those in the request. We could write +[table-driven tests](https://dave.cheney.net/2013/06/09/writing-table-driven-tests-in-go) to test multiple +possible route variables as needed. + +```go +// endpoints.go +func main() { + r := mux.NewRouter() + // A route with a route variable: + r.HandleFunc("/metrics/{type}", MetricsHandler) + + log.Fatal(http.ListenAndServe("localhost:8080", r)) +} +``` + +Our test file, with a table-driven test of `routeVariables`: + +```go +// endpoints_test.go +func TestMetricsHandler(t *testing.T) { + tt := []struct{ + routeVariable string + shouldPass bool + }{ + {"goroutines", true}, + {"heap", true}, + {"counters", true}, + {"queries", true}, + {"adhadaeqm3k", false}, + } + + for _, tc := range tt { + path := fmt.Sprintf("/metrics/%s", tc.routeVariable) + req, err := http.NewRequest("GET", path, nil) + if err != nil { + t.Fatal(err) + } + + rr := httptest.NewRecorder() + + // Need to create a router that we can pass the request through so that the vars will be added to the context + router := mux.NewRouter() + router.HandleFunc("/metrics/{type}", MetricsHandler) + router.ServeHTTP(rr, req) + + // In this case, our MetricsHandler returns a non-200 response + // for a route variable it doesn't know about. + if rr.Code == http.StatusOK && !tc.shouldPass { + t.Errorf("handler should have failed on routeVariable %s: got %v want %v", + tc.routeVariable, rr.Code, http.StatusOK) + } + } +} +``` + +## Full Example + +Here's a complete, runnable example of a small `mux` based server: + +```go +package main + +import ( + "net/http" + "log" + "github.com/gorilla/mux" +) + +func YourHandler(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("Gorilla!\n")) +} + +func main() { + r := mux.NewRouter() + // Routes consist of a path and a handler function. + r.HandleFunc("/", YourHandler) + + // Bind to a port and pass our router in + log.Fatal(http.ListenAndServe(":8000", r)) +} +``` + +## License + +BSD licensed. See the LICENSE file for details. diff --git a/vendor/github.com/gorilla/mux/doc.go b/vendor/github.com/gorilla/mux/doc.go new file mode 100644 index 000000000..bd5a38b55 --- /dev/null +++ b/vendor/github.com/gorilla/mux/doc.go @@ -0,0 +1,306 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package mux implements a request router and dispatcher. + +The name mux stands for "HTTP request multiplexer". Like the standard +http.ServeMux, mux.Router matches incoming requests against a list of +registered routes and calls a handler for the route that matches the URL +or other conditions. The main features are: + + * Requests can be matched based on URL host, path, path prefix, schemes, + header and query values, HTTP methods or using custom matchers. + * URL hosts, paths and query values can have variables with an optional + regular expression. + * Registered URLs can be built, or "reversed", which helps maintaining + references to resources. + * Routes can be used as subrouters: nested routes are only tested if the + parent route matches. This is useful to define groups of routes that + share common conditions like a host, a path prefix or other repeated + attributes. As a bonus, this optimizes request matching. + * It implements the http.Handler interface so it is compatible with the + standard http.ServeMux. + +Let's start registering a couple of URL paths and handlers: + + func main() { + r := mux.NewRouter() + r.HandleFunc("/", HomeHandler) + r.HandleFunc("/products", ProductsHandler) + r.HandleFunc("/articles", ArticlesHandler) + http.Handle("/", r) + } + +Here we register three routes mapping URL paths to handlers. This is +equivalent to how http.HandleFunc() works: if an incoming request URL matches +one of the paths, the corresponding handler is called passing +(http.ResponseWriter, *http.Request) as parameters. + +Paths can have variables. They are defined using the format {name} or +{name:pattern}. If a regular expression pattern is not defined, the matched +variable will be anything until the next slash. For example: + + r := mux.NewRouter() + r.HandleFunc("/products/{key}", ProductHandler) + r.HandleFunc("/articles/{category}/", ArticlesCategoryHandler) + r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler) + +Groups can be used inside patterns, as long as they are non-capturing (?:re). For example: + + r.HandleFunc("/articles/{category}/{sort:(?:asc|desc|new)}", ArticlesCategoryHandler) + +The names are used to create a map of route variables which can be retrieved +calling mux.Vars(): + + vars := mux.Vars(request) + category := vars["category"] + +Note that if any capturing groups are present, mux will panic() during parsing. To prevent +this, convert any capturing groups to non-capturing, e.g. change "/{sort:(asc|desc)}" to +"/{sort:(?:asc|desc)}". This is a change from prior versions which behaved unpredictably +when capturing groups were present. + +And this is all you need to know about the basic usage. More advanced options +are explained below. + +Routes can also be restricted to a domain or subdomain. Just define a host +pattern to be matched. They can also have variables: + + r := mux.NewRouter() + // Only matches if domain is "www.example.com". + r.Host("www.example.com") + // Matches a dynamic subdomain. + r.Host("{subdomain:[a-z]+}.domain.com") + +There are several other matchers that can be added. To match path prefixes: + + r.PathPrefix("/products/") + +...or HTTP methods: + + r.Methods("GET", "POST") + +...or URL schemes: + + r.Schemes("https") + +...or header values: + + r.Headers("X-Requested-With", "XMLHttpRequest") + +...or query values: + + r.Queries("key", "value") + +...or to use a custom matcher function: + + r.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool { + return r.ProtoMajor == 0 + }) + +...and finally, it is possible to combine several matchers in a single route: + + r.HandleFunc("/products", ProductsHandler). + Host("www.example.com"). + Methods("GET"). + Schemes("http") + +Setting the same matching conditions again and again can be boring, so we have +a way to group several routes that share the same requirements. +We call it "subrouting". + +For example, let's say we have several URLs that should only match when the +host is "www.example.com". Create a route for that host and get a "subrouter" +from it: + + r := mux.NewRouter() + s := r.Host("www.example.com").Subrouter() + +Then register routes in the subrouter: + + s.HandleFunc("/products/", ProductsHandler) + s.HandleFunc("/products/{key}", ProductHandler) + s.HandleFunc("/articles/{category}/{id:[0-9]+}"), ArticleHandler) + +The three URL paths we registered above will only be tested if the domain is +"www.example.com", because the subrouter is tested first. This is not +only convenient, but also optimizes request matching. You can create +subrouters combining any attribute matchers accepted by a route. + +Subrouters can be used to create domain or path "namespaces": you define +subrouters in a central place and then parts of the app can register its +paths relatively to a given subrouter. + +There's one more thing about subroutes. When a subrouter has a path prefix, +the inner routes use it as base for their paths: + + r := mux.NewRouter() + s := r.PathPrefix("/products").Subrouter() + // "/products/" + s.HandleFunc("/", ProductsHandler) + // "/products/{key}/" + s.HandleFunc("/{key}/", ProductHandler) + // "/products/{key}/details" + s.HandleFunc("/{key}/details", ProductDetailsHandler) + +Note that the path provided to PathPrefix() represents a "wildcard": calling +PathPrefix("/static/").Handler(...) means that the handler will be passed any +request that matches "/static/*". This makes it easy to serve static files with mux: + + func main() { + var dir string + + flag.StringVar(&dir, "dir", ".", "the directory to serve files from. Defaults to the current dir") + flag.Parse() + r := mux.NewRouter() + + // This will serve files under http://localhost:8000/static/ + r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir(dir)))) + + srv := &http.Server{ + Handler: r, + Addr: "127.0.0.1:8000", + // Good practice: enforce timeouts for servers you create! + WriteTimeout: 15 * time.Second, + ReadTimeout: 15 * time.Second, + } + + log.Fatal(srv.ListenAndServe()) + } + +Now let's see how to build registered URLs. + +Routes can be named. All routes that define a name can have their URLs built, +or "reversed". We define a name calling Name() on a route. For example: + + r := mux.NewRouter() + r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). + Name("article") + +To build a URL, get the route and call the URL() method, passing a sequence of +key/value pairs for the route variables. For the previous route, we would do: + + url, err := r.Get("article").URL("category", "technology", "id", "42") + +...and the result will be a url.URL with the following path: + + "/articles/technology/42" + +This also works for host and query value variables: + + r := mux.NewRouter() + r.Host("{subdomain}.domain.com"). + Path("/articles/{category}/{id:[0-9]+}"). + Queries("filter", "{filter}"). + HandlerFunc(ArticleHandler). + Name("article") + + // url.String() will be "http://news.domain.com/articles/technology/42?filter=gorilla" + url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42", + "filter", "gorilla") + +All variables defined in the route are required, and their values must +conform to the corresponding patterns. These requirements guarantee that a +generated URL will always match a registered route -- the only exception is +for explicitly defined "build-only" routes which never match. + +Regex support also exists for matching Headers within a route. For example, we could do: + + r.HeadersRegexp("Content-Type", "application/(text|json)") + +...and the route will match both requests with a Content-Type of `application/json` as well as +`application/text` + +There's also a way to build only the URL host or path for a route: +use the methods URLHost() or URLPath() instead. For the previous route, +we would do: + + // "http://news.domain.com/" + host, err := r.Get("article").URLHost("subdomain", "news") + + // "/articles/technology/42" + path, err := r.Get("article").URLPath("category", "technology", "id", "42") + +And if you use subrouters, host and path defined separately can be built +as well: + + r := mux.NewRouter() + s := r.Host("{subdomain}.domain.com").Subrouter() + s.Path("/articles/{category}/{id:[0-9]+}"). + HandlerFunc(ArticleHandler). + Name("article") + + // "http://news.domain.com/articles/technology/42" + url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42") + +Mux supports the addition of middlewares to a Router, which are executed in the order they are added if a match is found, including its subrouters. Middlewares are (typically) small pieces of code which take one request, do something with it, and pass it down to another middleware or the final handler. Some common use cases for middleware are request logging, header manipulation, or ResponseWriter hijacking. + + type MiddlewareFunc func(http.Handler) http.Handler + +Typically, the returned handler is a closure which does something with the http.ResponseWriter and http.Request passed to it, and then calls the handler passed as parameter to the MiddlewareFunc (closures can access variables from the context where they are created). + +A very basic middleware which logs the URI of the request being handled could be written as: + + func simpleMw(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Do stuff here + log.Println(r.RequestURI) + // Call the next handler, which can be another middleware in the chain, or the final handler. + next.ServeHTTP(w, r) + }) + } + +Middlewares can be added to a router using `Router.Use()`: + + r := mux.NewRouter() + r.HandleFunc("/", handler) + r.Use(simpleMw) + +A more complex authentication middleware, which maps session token to users, could be written as: + + // Define our struct + type authenticationMiddleware struct { + tokenUsers map[string]string + } + + // Initialize it somewhere + func (amw *authenticationMiddleware) Populate() { + amw.tokenUsers["00000000"] = "user0" + amw.tokenUsers["aaaaaaaa"] = "userA" + amw.tokenUsers["05f717e5"] = "randomUser" + amw.tokenUsers["deadbeef"] = "user0" + } + + // Middleware function, which will be called for each request + func (amw *authenticationMiddleware) Middleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + token := r.Header.Get("X-Session-Token") + + if user, found := amw.tokenUsers[token]; found { + // We found the token in our map + log.Printf("Authenticated user %s\n", user) + next.ServeHTTP(w, r) + } else { + http.Error(w, "Forbidden", http.StatusForbidden) + } + }) + } + + r := mux.NewRouter() + r.HandleFunc("/", handler) + + amw := authenticationMiddleware{tokenUsers: make(map[string]string)} + amw.Populate() + + r.Use(amw.Middleware) + +Note: The handler chain will be stopped if your middleware doesn't call `next.ServeHTTP()` with the corresponding parameters. This can be used to abort a request if the middleware writer wants to. + +*/ +package mux diff --git a/vendor/github.com/gorilla/mux/middleware.go b/vendor/github.com/gorilla/mux/middleware.go new file mode 100644 index 000000000..cb51c565e --- /dev/null +++ b/vendor/github.com/gorilla/mux/middleware.go @@ -0,0 +1,74 @@ +package mux + +import ( + "net/http" + "strings" +) + +// MiddlewareFunc is a function which receives an http.Handler and returns another http.Handler. +// Typically, the returned handler is a closure which does something with the http.ResponseWriter and http.Request passed +// to it, and then calls the handler passed as parameter to the MiddlewareFunc. +type MiddlewareFunc func(http.Handler) http.Handler + +// middleware interface is anything which implements a MiddlewareFunc named Middleware. +type middleware interface { + Middleware(handler http.Handler) http.Handler +} + +// Middleware allows MiddlewareFunc to implement the middleware interface. +func (mw MiddlewareFunc) Middleware(handler http.Handler) http.Handler { + return mw(handler) +} + +// Use appends a MiddlewareFunc to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router. +func (r *Router) Use(mwf ...MiddlewareFunc) { + for _, fn := range mwf { + r.middlewares = append(r.middlewares, fn) + } +} + +// useInterface appends a middleware to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router. +func (r *Router) useInterface(mw middleware) { + r.middlewares = append(r.middlewares, mw) +} + +// CORSMethodMiddleware automatically sets the Access-Control-Allow-Methods response header +// on requests for routes that have an OPTIONS method matcher to all the method matchers on +// the route. Routes that do not explicitly handle OPTIONS requests will not be processed +// by the middleware. See examples for usage. +func CORSMethodMiddleware(r *Router) MiddlewareFunc { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + allMethods, err := getAllMethodsForRoute(r, req) + if err == nil { + for _, v := range allMethods { + if v == http.MethodOptions { + w.Header().Set("Access-Control-Allow-Methods", strings.Join(allMethods, ",")) + } + } + } + + next.ServeHTTP(w, req) + }) + } +} + +// getAllMethodsForRoute returns all the methods from method matchers matching a given +// request. +func getAllMethodsForRoute(r *Router, req *http.Request) ([]string, error) { + var allMethods []string + + for _, route := range r.routes { + var match RouteMatch + if route.Match(req, &match) || match.MatchErr == ErrMethodMismatch { + methods, err := route.GetMethods() + if err != nil { + return nil, err + } + + allMethods = append(allMethods, methods...) + } + } + + return allMethods, nil +} diff --git a/vendor/github.com/gorilla/mux/mux.go b/vendor/github.com/gorilla/mux/mux.go new file mode 100644 index 000000000..782a34b22 --- /dev/null +++ b/vendor/github.com/gorilla/mux/mux.go @@ -0,0 +1,606 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "context" + "errors" + "fmt" + "net/http" + "path" + "regexp" +) + +var ( + // ErrMethodMismatch is returned when the method in the request does not match + // the method defined against the route. + ErrMethodMismatch = errors.New("method is not allowed") + // ErrNotFound is returned when no route match is found. + ErrNotFound = errors.New("no matching route was found") +) + +// NewRouter returns a new router instance. +func NewRouter() *Router { + return &Router{namedRoutes: make(map[string]*Route)} +} + +// Router registers routes to be matched and dispatches a handler. +// +// It implements the http.Handler interface, so it can be registered to serve +// requests: +// +// var router = mux.NewRouter() +// +// func main() { +// http.Handle("/", router) +// } +// +// Or, for Google App Engine, register it in a init() function: +// +// func init() { +// http.Handle("/", router) +// } +// +// This will send all incoming requests to the router. +type Router struct { + // Configurable Handler to be used when no route matches. + NotFoundHandler http.Handler + + // Configurable Handler to be used when the request method does not match the route. + MethodNotAllowedHandler http.Handler + + // Routes to be matched, in order. + routes []*Route + + // Routes by name for URL building. + namedRoutes map[string]*Route + + // If true, do not clear the request context after handling the request. + // + // Deprecated: No effect, since the context is stored on the request itself. + KeepContext bool + + // Slice of middlewares to be called after a match is found + middlewares []middleware + + // configuration shared with `Route` + routeConf +} + +// common route configuration shared between `Router` and `Route` +type routeConf struct { + // If true, "/path/foo%2Fbar/to" will match the path "/path/{var}/to" + useEncodedPath bool + + // If true, when the path pattern is "/path/", accessing "/path" will + // redirect to the former and vice versa. + strictSlash bool + + // If true, when the path pattern is "/path//to", accessing "/path//to" + // will not redirect + skipClean bool + + // Manager for the variables from host and path. + regexp routeRegexpGroup + + // List of matchers. + matchers []matcher + + // The scheme used when building URLs. + buildScheme string + + buildVarsFunc BuildVarsFunc +} + +// returns an effective deep copy of `routeConf` +func copyRouteConf(r routeConf) routeConf { + c := r + + if r.regexp.path != nil { + c.regexp.path = copyRouteRegexp(r.regexp.path) + } + + if r.regexp.host != nil { + c.regexp.host = copyRouteRegexp(r.regexp.host) + } + + c.regexp.queries = make([]*routeRegexp, 0, len(r.regexp.queries)) + for _, q := range r.regexp.queries { + c.regexp.queries = append(c.regexp.queries, copyRouteRegexp(q)) + } + + c.matchers = make([]matcher, len(r.matchers)) + copy(c.matchers, r.matchers) + + return c +} + +func copyRouteRegexp(r *routeRegexp) *routeRegexp { + c := *r + return &c +} + +// Match attempts to match the given request against the router's registered routes. +// +// If the request matches a route of this router or one of its subrouters the Route, +// Handler, and Vars fields of the the match argument are filled and this function +// returns true. +// +// If the request does not match any of this router's or its subrouters' routes +// then this function returns false. If available, a reason for the match failure +// will be filled in the match argument's MatchErr field. If the match failure type +// (eg: not found) has a registered handler, the handler is assigned to the Handler +// field of the match argument. +func (r *Router) Match(req *http.Request, match *RouteMatch) bool { + for _, route := range r.routes { + if route.Match(req, match) { + // Build middleware chain if no error was found + if match.MatchErr == nil { + for i := len(r.middlewares) - 1; i >= 0; i-- { + match.Handler = r.middlewares[i].Middleware(match.Handler) + } + } + return true + } + } + + if match.MatchErr == ErrMethodMismatch { + if r.MethodNotAllowedHandler != nil { + match.Handler = r.MethodNotAllowedHandler + return true + } + + return false + } + + // Closest match for a router (includes sub-routers) + if r.NotFoundHandler != nil { + match.Handler = r.NotFoundHandler + match.MatchErr = ErrNotFound + return true + } + + match.MatchErr = ErrNotFound + return false +} + +// ServeHTTP dispatches the handler registered in the matched route. +// +// When there is a match, the route variables can be retrieved calling +// mux.Vars(request). +func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) { + if !r.skipClean { + path := req.URL.Path + if r.useEncodedPath { + path = req.URL.EscapedPath() + } + // Clean path to canonical form and redirect. + if p := cleanPath(path); p != path { + + // Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query. + // This matches with fix in go 1.2 r.c. 4 for same problem. Go Issue: + // http://code.google.com/p/go/issues/detail?id=5252 + url := *req.URL + url.Path = p + p = url.String() + + w.Header().Set("Location", p) + w.WriteHeader(http.StatusMovedPermanently) + return + } + } + var match RouteMatch + var handler http.Handler + if r.Match(req, &match) { + handler = match.Handler + req = requestWithVars(req, match.Vars) + req = requestWithRoute(req, match.Route) + } + + if handler == nil && match.MatchErr == ErrMethodMismatch { + handler = methodNotAllowedHandler() + } + + if handler == nil { + handler = http.NotFoundHandler() + } + + handler.ServeHTTP(w, req) +} + +// Get returns a route registered with the given name. +func (r *Router) Get(name string) *Route { + return r.namedRoutes[name] +} + +// GetRoute returns a route registered with the given name. This method +// was renamed to Get() and remains here for backwards compatibility. +func (r *Router) GetRoute(name string) *Route { + return r.namedRoutes[name] +} + +// StrictSlash defines the trailing slash behavior for new routes. The initial +// value is false. +// +// When true, if the route path is "/path/", accessing "/path" will perform a redirect +// to the former and vice versa. In other words, your application will always +// see the path as specified in the route. +// +// When false, if the route path is "/path", accessing "/path/" will not match +// this route and vice versa. +// +// The re-direct is a HTTP 301 (Moved Permanently). Note that when this is set for +// routes with a non-idempotent method (e.g. POST, PUT), the subsequent re-directed +// request will be made as a GET by most clients. Use middleware or client settings +// to modify this behaviour as needed. +// +// Special case: when a route sets a path prefix using the PathPrefix() method, +// strict slash is ignored for that route because the redirect behavior can't +// be determined from a prefix alone. However, any subrouters created from that +// route inherit the original StrictSlash setting. +func (r *Router) StrictSlash(value bool) *Router { + r.strictSlash = value + return r +} + +// SkipClean defines the path cleaning behaviour for new routes. The initial +// value is false. Users should be careful about which routes are not cleaned +// +// When true, if the route path is "/path//to", it will remain with the double +// slash. This is helpful if you have a route like: /fetch/http://xkcd.com/534/ +// +// When false, the path will be cleaned, so /fetch/http://xkcd.com/534/ will +// become /fetch/http/xkcd.com/534 +func (r *Router) SkipClean(value bool) *Router { + r.skipClean = value + return r +} + +// UseEncodedPath tells the router to match the encoded original path +// to the routes. +// For eg. "/path/foo%2Fbar/to" will match the path "/path/{var}/to". +// +// If not called, the router will match the unencoded path to the routes. +// For eg. "/path/foo%2Fbar/to" will match the path "/path/foo/bar/to" +func (r *Router) UseEncodedPath() *Router { + r.useEncodedPath = true + return r +} + +// ---------------------------------------------------------------------------- +// Route factories +// ---------------------------------------------------------------------------- + +// NewRoute registers an empty route. +func (r *Router) NewRoute() *Route { + // initialize a route with a copy of the parent router's configuration + route := &Route{routeConf: copyRouteConf(r.routeConf), namedRoutes: r.namedRoutes} + r.routes = append(r.routes, route) + return route +} + +// Name registers a new route with a name. +// See Route.Name(). +func (r *Router) Name(name string) *Route { + return r.NewRoute().Name(name) +} + +// Handle registers a new route with a matcher for the URL path. +// See Route.Path() and Route.Handler(). +func (r *Router) Handle(path string, handler http.Handler) *Route { + return r.NewRoute().Path(path).Handler(handler) +} + +// HandleFunc registers a new route with a matcher for the URL path. +// See Route.Path() and Route.HandlerFunc(). +func (r *Router) HandleFunc(path string, f func(http.ResponseWriter, + *http.Request)) *Route { + return r.NewRoute().Path(path).HandlerFunc(f) +} + +// Headers registers a new route with a matcher for request header values. +// See Route.Headers(). +func (r *Router) Headers(pairs ...string) *Route { + return r.NewRoute().Headers(pairs...) +} + +// Host registers a new route with a matcher for the URL host. +// See Route.Host(). +func (r *Router) Host(tpl string) *Route { + return r.NewRoute().Host(tpl) +} + +// MatcherFunc registers a new route with a custom matcher function. +// See Route.MatcherFunc(). +func (r *Router) MatcherFunc(f MatcherFunc) *Route { + return r.NewRoute().MatcherFunc(f) +} + +// Methods registers a new route with a matcher for HTTP methods. +// See Route.Methods(). +func (r *Router) Methods(methods ...string) *Route { + return r.NewRoute().Methods(methods...) +} + +// Path registers a new route with a matcher for the URL path. +// See Route.Path(). +func (r *Router) Path(tpl string) *Route { + return r.NewRoute().Path(tpl) +} + +// PathPrefix registers a new route with a matcher for the URL path prefix. +// See Route.PathPrefix(). +func (r *Router) PathPrefix(tpl string) *Route { + return r.NewRoute().PathPrefix(tpl) +} + +// Queries registers a new route with a matcher for URL query values. +// See Route.Queries(). +func (r *Router) Queries(pairs ...string) *Route { + return r.NewRoute().Queries(pairs...) +} + +// Schemes registers a new route with a matcher for URL schemes. +// See Route.Schemes(). +func (r *Router) Schemes(schemes ...string) *Route { + return r.NewRoute().Schemes(schemes...) +} + +// BuildVarsFunc registers a new route with a custom function for modifying +// route variables before building a URL. +func (r *Router) BuildVarsFunc(f BuildVarsFunc) *Route { + return r.NewRoute().BuildVarsFunc(f) +} + +// Walk walks the router and all its sub-routers, calling walkFn for each route +// in the tree. The routes are walked in the order they were added. Sub-routers +// are explored depth-first. +func (r *Router) Walk(walkFn WalkFunc) error { + return r.walk(walkFn, []*Route{}) +} + +// SkipRouter is used as a return value from WalkFuncs to indicate that the +// router that walk is about to descend down to should be skipped. +var SkipRouter = errors.New("skip this router") + +// WalkFunc is the type of the function called for each route visited by Walk. +// At every invocation, it is given the current route, and the current router, +// and a list of ancestor routes that lead to the current route. +type WalkFunc func(route *Route, router *Router, ancestors []*Route) error + +func (r *Router) walk(walkFn WalkFunc, ancestors []*Route) error { + for _, t := range r.routes { + err := walkFn(t, r, ancestors) + if err == SkipRouter { + continue + } + if err != nil { + return err + } + for _, sr := range t.matchers { + if h, ok := sr.(*Router); ok { + ancestors = append(ancestors, t) + err := h.walk(walkFn, ancestors) + if err != nil { + return err + } + ancestors = ancestors[:len(ancestors)-1] + } + } + if h, ok := t.handler.(*Router); ok { + ancestors = append(ancestors, t) + err := h.walk(walkFn, ancestors) + if err != nil { + return err + } + ancestors = ancestors[:len(ancestors)-1] + } + } + return nil +} + +// ---------------------------------------------------------------------------- +// Context +// ---------------------------------------------------------------------------- + +// RouteMatch stores information about a matched route. +type RouteMatch struct { + Route *Route + Handler http.Handler + Vars map[string]string + + // MatchErr is set to appropriate matching error + // It is set to ErrMethodMismatch if there is a mismatch in + // the request method and route method + MatchErr error +} + +type contextKey int + +const ( + varsKey contextKey = iota + routeKey +) + +// Vars returns the route variables for the current request, if any. +func Vars(r *http.Request) map[string]string { + if rv := r.Context().Value(varsKey); rv != nil { + return rv.(map[string]string) + } + return nil +} + +// CurrentRoute returns the matched route for the current request, if any. +// This only works when called inside the handler of the matched route +// because the matched route is stored in the request context which is cleared +// after the handler returns. +func CurrentRoute(r *http.Request) *Route { + if rv := r.Context().Value(routeKey); rv != nil { + return rv.(*Route) + } + return nil +} + +func requestWithVars(r *http.Request, vars map[string]string) *http.Request { + ctx := context.WithValue(r.Context(), varsKey, vars) + return r.WithContext(ctx) +} + +func requestWithRoute(r *http.Request, route *Route) *http.Request { + ctx := context.WithValue(r.Context(), routeKey, route) + return r.WithContext(ctx) +} + +// ---------------------------------------------------------------------------- +// Helpers +// ---------------------------------------------------------------------------- + +// cleanPath returns the canonical path for p, eliminating . and .. elements. +// Borrowed from the net/http package. +func cleanPath(p string) string { + if p == "" { + return "/" + } + if p[0] != '/' { + p = "/" + p + } + np := path.Clean(p) + // path.Clean removes trailing slash except for root; + // put the trailing slash back if necessary. + if p[len(p)-1] == '/' && np != "/" { + np += "/" + } + + return np +} + +// uniqueVars returns an error if two slices contain duplicated strings. +func uniqueVars(s1, s2 []string) error { + for _, v1 := range s1 { + for _, v2 := range s2 { + if v1 == v2 { + return fmt.Errorf("mux: duplicated route variable %q", v2) + } + } + } + return nil +} + +// checkPairs returns the count of strings passed in, and an error if +// the count is not an even number. +func checkPairs(pairs ...string) (int, error) { + length := len(pairs) + if length%2 != 0 { + return length, fmt.Errorf( + "mux: number of parameters must be multiple of 2, got %v", pairs) + } + return length, nil +} + +// mapFromPairsToString converts variadic string parameters to a +// string to string map. +func mapFromPairsToString(pairs ...string) (map[string]string, error) { + length, err := checkPairs(pairs...) + if err != nil { + return nil, err + } + m := make(map[string]string, length/2) + for i := 0; i < length; i += 2 { + m[pairs[i]] = pairs[i+1] + } + return m, nil +} + +// mapFromPairsToRegex converts variadic string parameters to a +// string to regex map. +func mapFromPairsToRegex(pairs ...string) (map[string]*regexp.Regexp, error) { + length, err := checkPairs(pairs...) + if err != nil { + return nil, err + } + m := make(map[string]*regexp.Regexp, length/2) + for i := 0; i < length; i += 2 { + regex, err := regexp.Compile(pairs[i+1]) + if err != nil { + return nil, err + } + m[pairs[i]] = regex + } + return m, nil +} + +// matchInArray returns true if the given string value is in the array. +func matchInArray(arr []string, value string) bool { + for _, v := range arr { + if v == value { + return true + } + } + return false +} + +// matchMapWithString returns true if the given key/value pairs exist in a given map. +func matchMapWithString(toCheck map[string]string, toMatch map[string][]string, canonicalKey bool) bool { + for k, v := range toCheck { + // Check if key exists. + if canonicalKey { + k = http.CanonicalHeaderKey(k) + } + if values := toMatch[k]; values == nil { + return false + } else if v != "" { + // If value was defined as an empty string we only check that the + // key exists. Otherwise we also check for equality. + valueExists := false + for _, value := range values { + if v == value { + valueExists = true + break + } + } + if !valueExists { + return false + } + } + } + return true +} + +// matchMapWithRegex returns true if the given key/value pairs exist in a given map compiled against +// the given regex +func matchMapWithRegex(toCheck map[string]*regexp.Regexp, toMatch map[string][]string, canonicalKey bool) bool { + for k, v := range toCheck { + // Check if key exists. + if canonicalKey { + k = http.CanonicalHeaderKey(k) + } + if values := toMatch[k]; values == nil { + return false + } else if v != nil { + // If value was defined as an empty string we only check that the + // key exists. Otherwise we also check for equality. + valueExists := false + for _, value := range values { + if v.MatchString(value) { + valueExists = true + break + } + } + if !valueExists { + return false + } + } + } + return true +} + +// methodNotAllowed replies to the request with an HTTP status code 405. +func methodNotAllowed(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusMethodNotAllowed) +} + +// methodNotAllowedHandler returns a simple request handler +// that replies to each request with a status code 405. +func methodNotAllowedHandler() http.Handler { return http.HandlerFunc(methodNotAllowed) } diff --git a/vendor/github.com/gorilla/mux/regexp.go b/vendor/github.com/gorilla/mux/regexp.go new file mode 100644 index 000000000..0144842bb --- /dev/null +++ b/vendor/github.com/gorilla/mux/regexp.go @@ -0,0 +1,388 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "bytes" + "fmt" + "net/http" + "net/url" + "regexp" + "strconv" + "strings" +) + +type routeRegexpOptions struct { + strictSlash bool + useEncodedPath bool +} + +type regexpType int + +const ( + regexpTypePath regexpType = 0 + regexpTypeHost regexpType = 1 + regexpTypePrefix regexpType = 2 + regexpTypeQuery regexpType = 3 +) + +// newRouteRegexp parses a route template and returns a routeRegexp, +// used to match a host, a path or a query string. +// +// It will extract named variables, assemble a regexp to be matched, create +// a "reverse" template to build URLs and compile regexps to validate variable +// values used in URL building. +// +// Previously we accepted only Python-like identifiers for variable +// names ([a-zA-Z_][a-zA-Z0-9_]*), but currently the only restriction is that +// name and pattern can't be empty, and names can't contain a colon. +func newRouteRegexp(tpl string, typ regexpType, options routeRegexpOptions) (*routeRegexp, error) { + // Check if it is well-formed. + idxs, errBraces := braceIndices(tpl) + if errBraces != nil { + return nil, errBraces + } + // Backup the original. + template := tpl + // Now let's parse it. + defaultPattern := "[^/]+" + if typ == regexpTypeQuery { + defaultPattern = ".*" + } else if typ == regexpTypeHost { + defaultPattern = "[^.]+" + } + // Only match strict slash if not matching + if typ != regexpTypePath { + options.strictSlash = false + } + // Set a flag for strictSlash. + endSlash := false + if options.strictSlash && strings.HasSuffix(tpl, "/") { + tpl = tpl[:len(tpl)-1] + endSlash = true + } + varsN := make([]string, len(idxs)/2) + varsR := make([]*regexp.Regexp, len(idxs)/2) + pattern := bytes.NewBufferString("") + pattern.WriteByte('^') + reverse := bytes.NewBufferString("") + var end int + var err error + for i := 0; i < len(idxs); i += 2 { + // Set all values we are interested in. + raw := tpl[end:idxs[i]] + end = idxs[i+1] + parts := strings.SplitN(tpl[idxs[i]+1:end-1], ":", 2) + name := parts[0] + patt := defaultPattern + if len(parts) == 2 { + patt = parts[1] + } + // Name or pattern can't be empty. + if name == "" || patt == "" { + return nil, fmt.Errorf("mux: missing name or pattern in %q", + tpl[idxs[i]:end]) + } + // Build the regexp pattern. + fmt.Fprintf(pattern, "%s(?P<%s>%s)", regexp.QuoteMeta(raw), varGroupName(i/2), patt) + + // Build the reverse template. + fmt.Fprintf(reverse, "%s%%s", raw) + + // Append variable name and compiled pattern. + varsN[i/2] = name + varsR[i/2], err = regexp.Compile(fmt.Sprintf("^%s$", patt)) + if err != nil { + return nil, err + } + } + // Add the remaining. + raw := tpl[end:] + pattern.WriteString(regexp.QuoteMeta(raw)) + if options.strictSlash { + pattern.WriteString("[/]?") + } + if typ == regexpTypeQuery { + // Add the default pattern if the query value is empty + if queryVal := strings.SplitN(template, "=", 2)[1]; queryVal == "" { + pattern.WriteString(defaultPattern) + } + } + if typ != regexpTypePrefix { + pattern.WriteByte('$') + } + + var wildcardHostPort bool + if typ == regexpTypeHost { + if !strings.Contains(pattern.String(), ":") { + wildcardHostPort = true + } + } + reverse.WriteString(raw) + if endSlash { + reverse.WriteByte('/') + } + // Compile full regexp. + reg, errCompile := regexp.Compile(pattern.String()) + if errCompile != nil { + return nil, errCompile + } + + // Check for capturing groups which used to work in older versions + if reg.NumSubexp() != len(idxs)/2 { + panic(fmt.Sprintf("route %s contains capture groups in its regexp. ", template) + + "Only non-capturing groups are accepted: e.g. (?:pattern) instead of (pattern)") + } + + // Done! + return &routeRegexp{ + template: template, + regexpType: typ, + options: options, + regexp: reg, + reverse: reverse.String(), + varsN: varsN, + varsR: varsR, + wildcardHostPort: wildcardHostPort, + }, nil +} + +// routeRegexp stores a regexp to match a host or path and information to +// collect and validate route variables. +type routeRegexp struct { + // The unmodified template. + template string + // The type of match + regexpType regexpType + // Options for matching + options routeRegexpOptions + // Expanded regexp. + regexp *regexp.Regexp + // Reverse template. + reverse string + // Variable names. + varsN []string + // Variable regexps (validators). + varsR []*regexp.Regexp + // Wildcard host-port (no strict port match in hostname) + wildcardHostPort bool +} + +// Match matches the regexp against the URL host or path. +func (r *routeRegexp) Match(req *http.Request, match *RouteMatch) bool { + if r.regexpType == regexpTypeHost { + host := getHost(req) + if r.wildcardHostPort { + // Don't be strict on the port match + if i := strings.Index(host, ":"); i != -1 { + host = host[:i] + } + } + return r.regexp.MatchString(host) + } + + if r.regexpType == regexpTypeQuery { + return r.matchQueryString(req) + } + path := req.URL.Path + if r.options.useEncodedPath { + path = req.URL.EscapedPath() + } + return r.regexp.MatchString(path) +} + +// url builds a URL part using the given values. +func (r *routeRegexp) url(values map[string]string) (string, error) { + urlValues := make([]interface{}, len(r.varsN), len(r.varsN)) + for k, v := range r.varsN { + value, ok := values[v] + if !ok { + return "", fmt.Errorf("mux: missing route variable %q", v) + } + if r.regexpType == regexpTypeQuery { + value = url.QueryEscape(value) + } + urlValues[k] = value + } + rv := fmt.Sprintf(r.reverse, urlValues...) + if !r.regexp.MatchString(rv) { + // The URL is checked against the full regexp, instead of checking + // individual variables. This is faster but to provide a good error + // message, we check individual regexps if the URL doesn't match. + for k, v := range r.varsN { + if !r.varsR[k].MatchString(values[v]) { + return "", fmt.Errorf( + "mux: variable %q doesn't match, expected %q", values[v], + r.varsR[k].String()) + } + } + } + return rv, nil +} + +// getURLQuery returns a single query parameter from a request URL. +// For a URL with foo=bar&baz=ding, we return only the relevant key +// value pair for the routeRegexp. +func (r *routeRegexp) getURLQuery(req *http.Request) string { + if r.regexpType != regexpTypeQuery { + return "" + } + templateKey := strings.SplitN(r.template, "=", 2)[0] + val, ok := findFirstQueryKey(req.URL.RawQuery, templateKey) + if ok { + return templateKey + "=" + val + } + return "" +} + +// findFirstQueryKey returns the same result as (*url.URL).Query()[key][0]. +// If key was not found, empty string and false is returned. +func findFirstQueryKey(rawQuery, key string) (value string, ok bool) { + query := []byte(rawQuery) + for len(query) > 0 { + foundKey := query + if i := bytes.IndexAny(foundKey, "&;"); i >= 0 { + foundKey, query = foundKey[:i], foundKey[i+1:] + } else { + query = query[:0] + } + if len(foundKey) == 0 { + continue + } + var value []byte + if i := bytes.IndexByte(foundKey, '='); i >= 0 { + foundKey, value = foundKey[:i], foundKey[i+1:] + } + if len(foundKey) < len(key) { + // Cannot possibly be key. + continue + } + keyString, err := url.QueryUnescape(string(foundKey)) + if err != nil { + continue + } + if keyString != key { + continue + } + valueString, err := url.QueryUnescape(string(value)) + if err != nil { + continue + } + return valueString, true + } + return "", false +} + +func (r *routeRegexp) matchQueryString(req *http.Request) bool { + return r.regexp.MatchString(r.getURLQuery(req)) +} + +// braceIndices returns the first level curly brace indices from a string. +// It returns an error in case of unbalanced braces. +func braceIndices(s string) ([]int, error) { + var level, idx int + var idxs []int + for i := 0; i < len(s); i++ { + switch s[i] { + case '{': + if level++; level == 1 { + idx = i + } + case '}': + if level--; level == 0 { + idxs = append(idxs, idx, i+1) + } else if level < 0 { + return nil, fmt.Errorf("mux: unbalanced braces in %q", s) + } + } + } + if level != 0 { + return nil, fmt.Errorf("mux: unbalanced braces in %q", s) + } + return idxs, nil +} + +// varGroupName builds a capturing group name for the indexed variable. +func varGroupName(idx int) string { + return "v" + strconv.Itoa(idx) +} + +// ---------------------------------------------------------------------------- +// routeRegexpGroup +// ---------------------------------------------------------------------------- + +// routeRegexpGroup groups the route matchers that carry variables. +type routeRegexpGroup struct { + host *routeRegexp + path *routeRegexp + queries []*routeRegexp +} + +// setMatch extracts the variables from the URL once a route matches. +func (v routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) { + // Store host variables. + if v.host != nil { + host := getHost(req) + if v.host.wildcardHostPort { + // Don't be strict on the port match + if i := strings.Index(host, ":"); i != -1 { + host = host[:i] + } + } + matches := v.host.regexp.FindStringSubmatchIndex(host) + if len(matches) > 0 { + extractVars(host, matches, v.host.varsN, m.Vars) + } + } + path := req.URL.Path + if r.useEncodedPath { + path = req.URL.EscapedPath() + } + // Store path variables. + if v.path != nil { + matches := v.path.regexp.FindStringSubmatchIndex(path) + if len(matches) > 0 { + extractVars(path, matches, v.path.varsN, m.Vars) + // Check if we should redirect. + if v.path.options.strictSlash { + p1 := strings.HasSuffix(path, "/") + p2 := strings.HasSuffix(v.path.template, "/") + if p1 != p2 { + u, _ := url.Parse(req.URL.String()) + if p1 { + u.Path = u.Path[:len(u.Path)-1] + } else { + u.Path += "/" + } + m.Handler = http.RedirectHandler(u.String(), http.StatusMovedPermanently) + } + } + } + } + // Store query string variables. + for _, q := range v.queries { + queryURL := q.getURLQuery(req) + matches := q.regexp.FindStringSubmatchIndex(queryURL) + if len(matches) > 0 { + extractVars(queryURL, matches, q.varsN, m.Vars) + } + } +} + +// getHost tries its best to return the request host. +// According to section 14.23 of RFC 2616 the Host header +// can include the port number if the default value of 80 is not used. +func getHost(r *http.Request) string { + if r.URL.IsAbs() { + return r.URL.Host + } + return r.Host +} + +func extractVars(input string, matches []int, names []string, output map[string]string) { + for i, name := range names { + output[name] = input[matches[2*i+2]:matches[2*i+3]] + } +} diff --git a/vendor/github.com/gorilla/mux/route.go b/vendor/github.com/gorilla/mux/route.go new file mode 100644 index 000000000..750afe570 --- /dev/null +++ b/vendor/github.com/gorilla/mux/route.go @@ -0,0 +1,736 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "errors" + "fmt" + "net/http" + "net/url" + "regexp" + "strings" +) + +// Route stores information to match a request and build URLs. +type Route struct { + // Request handler for the route. + handler http.Handler + // If true, this route never matches: it is only used to build URLs. + buildOnly bool + // The name used to build URLs. + name string + // Error resulted from building a route. + err error + + // "global" reference to all named routes + namedRoutes map[string]*Route + + // config possibly passed in from `Router` + routeConf +} + +// SkipClean reports whether path cleaning is enabled for this route via +// Router.SkipClean. +func (r *Route) SkipClean() bool { + return r.skipClean +} + +// Match matches the route against the request. +func (r *Route) Match(req *http.Request, match *RouteMatch) bool { + if r.buildOnly || r.err != nil { + return false + } + + var matchErr error + + // Match everything. + for _, m := range r.matchers { + if matched := m.Match(req, match); !matched { + if _, ok := m.(methodMatcher); ok { + matchErr = ErrMethodMismatch + continue + } + + // Ignore ErrNotFound errors. These errors arise from match call + // to Subrouters. + // + // This prevents subsequent matching subrouters from failing to + // run middleware. If not ignored, the middleware would see a + // non-nil MatchErr and be skipped, even when there was a + // matching route. + if match.MatchErr == ErrNotFound { + match.MatchErr = nil + } + + matchErr = nil + return false + } + } + + if matchErr != nil { + match.MatchErr = matchErr + return false + } + + if match.MatchErr == ErrMethodMismatch && r.handler != nil { + // We found a route which matches request method, clear MatchErr + match.MatchErr = nil + // Then override the mis-matched handler + match.Handler = r.handler + } + + // Yay, we have a match. Let's collect some info about it. + if match.Route == nil { + match.Route = r + } + if match.Handler == nil { + match.Handler = r.handler + } + if match.Vars == nil { + match.Vars = make(map[string]string) + } + + // Set variables. + r.regexp.setMatch(req, match, r) + return true +} + +// ---------------------------------------------------------------------------- +// Route attributes +// ---------------------------------------------------------------------------- + +// GetError returns an error resulted from building the route, if any. +func (r *Route) GetError() error { + return r.err +} + +// BuildOnly sets the route to never match: it is only used to build URLs. +func (r *Route) BuildOnly() *Route { + r.buildOnly = true + return r +} + +// Handler -------------------------------------------------------------------- + +// Handler sets a handler for the route. +func (r *Route) Handler(handler http.Handler) *Route { + if r.err == nil { + r.handler = handler + } + return r +} + +// HandlerFunc sets a handler function for the route. +func (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route { + return r.Handler(http.HandlerFunc(f)) +} + +// GetHandler returns the handler for the route, if any. +func (r *Route) GetHandler() http.Handler { + return r.handler +} + +// Name ----------------------------------------------------------------------- + +// Name sets the name for the route, used to build URLs. +// It is an error to call Name more than once on a route. +func (r *Route) Name(name string) *Route { + if r.name != "" { + r.err = fmt.Errorf("mux: route already has name %q, can't set %q", + r.name, name) + } + if r.err == nil { + r.name = name + r.namedRoutes[name] = r + } + return r +} + +// GetName returns the name for the route, if any. +func (r *Route) GetName() string { + return r.name +} + +// ---------------------------------------------------------------------------- +// Matchers +// ---------------------------------------------------------------------------- + +// matcher types try to match a request. +type matcher interface { + Match(*http.Request, *RouteMatch) bool +} + +// addMatcher adds a matcher to the route. +func (r *Route) addMatcher(m matcher) *Route { + if r.err == nil { + r.matchers = append(r.matchers, m) + } + return r +} + +// addRegexpMatcher adds a host or path matcher and builder to a route. +func (r *Route) addRegexpMatcher(tpl string, typ regexpType) error { + if r.err != nil { + return r.err + } + if typ == regexpTypePath || typ == regexpTypePrefix { + if len(tpl) > 0 && tpl[0] != '/' { + return fmt.Errorf("mux: path must start with a slash, got %q", tpl) + } + if r.regexp.path != nil { + tpl = strings.TrimRight(r.regexp.path.template, "/") + tpl + } + } + rr, err := newRouteRegexp(tpl, typ, routeRegexpOptions{ + strictSlash: r.strictSlash, + useEncodedPath: r.useEncodedPath, + }) + if err != nil { + return err + } + for _, q := range r.regexp.queries { + if err = uniqueVars(rr.varsN, q.varsN); err != nil { + return err + } + } + if typ == regexpTypeHost { + if r.regexp.path != nil { + if err = uniqueVars(rr.varsN, r.regexp.path.varsN); err != nil { + return err + } + } + r.regexp.host = rr + } else { + if r.regexp.host != nil { + if err = uniqueVars(rr.varsN, r.regexp.host.varsN); err != nil { + return err + } + } + if typ == regexpTypeQuery { + r.regexp.queries = append(r.regexp.queries, rr) + } else { + r.regexp.path = rr + } + } + r.addMatcher(rr) + return nil +} + +// Headers -------------------------------------------------------------------- + +// headerMatcher matches the request against header values. +type headerMatcher map[string]string + +func (m headerMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchMapWithString(m, r.Header, true) +} + +// Headers adds a matcher for request header values. +// It accepts a sequence of key/value pairs to be matched. For example: +// +// r := mux.NewRouter() +// r.Headers("Content-Type", "application/json", +// "X-Requested-With", "XMLHttpRequest") +// +// The above route will only match if both request header values match. +// If the value is an empty string, it will match any value if the key is set. +func (r *Route) Headers(pairs ...string) *Route { + if r.err == nil { + var headers map[string]string + headers, r.err = mapFromPairsToString(pairs...) + return r.addMatcher(headerMatcher(headers)) + } + return r +} + +// headerRegexMatcher matches the request against the route given a regex for the header +type headerRegexMatcher map[string]*regexp.Regexp + +func (m headerRegexMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchMapWithRegex(m, r.Header, true) +} + +// HeadersRegexp accepts a sequence of key/value pairs, where the value has regex +// support. For example: +// +// r := mux.NewRouter() +// r.HeadersRegexp("Content-Type", "application/(text|json)", +// "X-Requested-With", "XMLHttpRequest") +// +// The above route will only match if both the request header matches both regular expressions. +// If the value is an empty string, it will match any value if the key is set. +// Use the start and end of string anchors (^ and $) to match an exact value. +func (r *Route) HeadersRegexp(pairs ...string) *Route { + if r.err == nil { + var headers map[string]*regexp.Regexp + headers, r.err = mapFromPairsToRegex(pairs...) + return r.addMatcher(headerRegexMatcher(headers)) + } + return r +} + +// Host ----------------------------------------------------------------------- + +// Host adds a matcher for the URL host. +// It accepts a template with zero or more URL variables enclosed by {}. +// Variables can define an optional regexp pattern to be matched: +// +// - {name} matches anything until the next dot. +// +// - {name:pattern} matches the given regexp pattern. +// +// For example: +// +// r := mux.NewRouter() +// r.Host("www.example.com") +// r.Host("{subdomain}.domain.com") +// r.Host("{subdomain:[a-z]+}.domain.com") +// +// Variable names must be unique in a given route. They can be retrieved +// calling mux.Vars(request). +func (r *Route) Host(tpl string) *Route { + r.err = r.addRegexpMatcher(tpl, regexpTypeHost) + return r +} + +// MatcherFunc ---------------------------------------------------------------- + +// MatcherFunc is the function signature used by custom matchers. +type MatcherFunc func(*http.Request, *RouteMatch) bool + +// Match returns the match for a given request. +func (m MatcherFunc) Match(r *http.Request, match *RouteMatch) bool { + return m(r, match) +} + +// MatcherFunc adds a custom function to be used as request matcher. +func (r *Route) MatcherFunc(f MatcherFunc) *Route { + return r.addMatcher(f) +} + +// Methods -------------------------------------------------------------------- + +// methodMatcher matches the request against HTTP methods. +type methodMatcher []string + +func (m methodMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchInArray(m, r.Method) +} + +// Methods adds a matcher for HTTP methods. +// It accepts a sequence of one or more methods to be matched, e.g.: +// "GET", "POST", "PUT". +func (r *Route) Methods(methods ...string) *Route { + for k, v := range methods { + methods[k] = strings.ToUpper(v) + } + return r.addMatcher(methodMatcher(methods)) +} + +// Path ----------------------------------------------------------------------- + +// Path adds a matcher for the URL path. +// It accepts a template with zero or more URL variables enclosed by {}. The +// template must start with a "/". +// Variables can define an optional regexp pattern to be matched: +// +// - {name} matches anything until the next slash. +// +// - {name:pattern} matches the given regexp pattern. +// +// For example: +// +// r := mux.NewRouter() +// r.Path("/products/").Handler(ProductsHandler) +// r.Path("/products/{key}").Handler(ProductsHandler) +// r.Path("/articles/{category}/{id:[0-9]+}"). +// Handler(ArticleHandler) +// +// Variable names must be unique in a given route. They can be retrieved +// calling mux.Vars(request). +func (r *Route) Path(tpl string) *Route { + r.err = r.addRegexpMatcher(tpl, regexpTypePath) + return r +} + +// PathPrefix ----------------------------------------------------------------- + +// PathPrefix adds a matcher for the URL path prefix. This matches if the given +// template is a prefix of the full URL path. See Route.Path() for details on +// the tpl argument. +// +// Note that it does not treat slashes specially ("/foobar/" will be matched by +// the prefix "/foo") so you may want to use a trailing slash here. +// +// Also note that the setting of Router.StrictSlash() has no effect on routes +// with a PathPrefix matcher. +func (r *Route) PathPrefix(tpl string) *Route { + r.err = r.addRegexpMatcher(tpl, regexpTypePrefix) + return r +} + +// Query ---------------------------------------------------------------------- + +// Queries adds a matcher for URL query values. +// It accepts a sequence of key/value pairs. Values may define variables. +// For example: +// +// r := mux.NewRouter() +// r.Queries("foo", "bar", "id", "{id:[0-9]+}") +// +// The above route will only match if the URL contains the defined queries +// values, e.g.: ?foo=bar&id=42. +// +// If the value is an empty string, it will match any value if the key is set. +// +// Variables can define an optional regexp pattern to be matched: +// +// - {name} matches anything until the next slash. +// +// - {name:pattern} matches the given regexp pattern. +func (r *Route) Queries(pairs ...string) *Route { + length := len(pairs) + if length%2 != 0 { + r.err = fmt.Errorf( + "mux: number of parameters must be multiple of 2, got %v", pairs) + return nil + } + for i := 0; i < length; i += 2 { + if r.err = r.addRegexpMatcher(pairs[i]+"="+pairs[i+1], regexpTypeQuery); r.err != nil { + return r + } + } + + return r +} + +// Schemes -------------------------------------------------------------------- + +// schemeMatcher matches the request against URL schemes. +type schemeMatcher []string + +func (m schemeMatcher) Match(r *http.Request, match *RouteMatch) bool { + scheme := r.URL.Scheme + // https://golang.org/pkg/net/http/#Request + // "For [most] server requests, fields other than Path and RawQuery will be + // empty." + // Since we're an http muxer, the scheme is either going to be http or https + // though, so we can just set it based on the tls termination state. + if scheme == "" { + if r.TLS == nil { + scheme = "http" + } else { + scheme = "https" + } + } + return matchInArray(m, scheme) +} + +// Schemes adds a matcher for URL schemes. +// It accepts a sequence of schemes to be matched, e.g.: "http", "https". +// If the request's URL has a scheme set, it will be matched against. +// Generally, the URL scheme will only be set if a previous handler set it, +// such as the ProxyHeaders handler from gorilla/handlers. +// If unset, the scheme will be determined based on the request's TLS +// termination state. +// The first argument to Schemes will be used when constructing a route URL. +func (r *Route) Schemes(schemes ...string) *Route { + for k, v := range schemes { + schemes[k] = strings.ToLower(v) + } + if len(schemes) > 0 { + r.buildScheme = schemes[0] + } + return r.addMatcher(schemeMatcher(schemes)) +} + +// BuildVarsFunc -------------------------------------------------------------- + +// BuildVarsFunc is the function signature used by custom build variable +// functions (which can modify route variables before a route's URL is built). +type BuildVarsFunc func(map[string]string) map[string]string + +// BuildVarsFunc adds a custom function to be used to modify build variables +// before a route's URL is built. +func (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route { + if r.buildVarsFunc != nil { + // compose the old and new functions + old := r.buildVarsFunc + r.buildVarsFunc = func(m map[string]string) map[string]string { + return f(old(m)) + } + } else { + r.buildVarsFunc = f + } + return r +} + +// Subrouter ------------------------------------------------------------------ + +// Subrouter creates a subrouter for the route. +// +// It will test the inner routes only if the parent route matched. For example: +// +// r := mux.NewRouter() +// s := r.Host("www.example.com").Subrouter() +// s.HandleFunc("/products/", ProductsHandler) +// s.HandleFunc("/products/{key}", ProductHandler) +// s.HandleFunc("/articles/{category}/{id:[0-9]+}"), ArticleHandler) +// +// Here, the routes registered in the subrouter won't be tested if the host +// doesn't match. +func (r *Route) Subrouter() *Router { + // initialize a subrouter with a copy of the parent route's configuration + router := &Router{routeConf: copyRouteConf(r.routeConf), namedRoutes: r.namedRoutes} + r.addMatcher(router) + return router +} + +// ---------------------------------------------------------------------------- +// URL building +// ---------------------------------------------------------------------------- + +// URL builds a URL for the route. +// +// It accepts a sequence of key/value pairs for the route variables. For +// example, given this route: +// +// r := mux.NewRouter() +// r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). +// Name("article") +// +// ...a URL for it can be built using: +// +// url, err := r.Get("article").URL("category", "technology", "id", "42") +// +// ...which will return an url.URL with the following path: +// +// "/articles/technology/42" +// +// This also works for host variables: +// +// r := mux.NewRouter() +// r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). +// Host("{subdomain}.domain.com"). +// Name("article") +// +// // url.String() will be "http://news.domain.com/articles/technology/42" +// url, err := r.Get("article").URL("subdomain", "news", +// "category", "technology", +// "id", "42") +// +// The scheme of the resulting url will be the first argument that was passed to Schemes: +// +// // url.String() will be "https://example.com" +// r := mux.NewRouter() +// url, err := r.Host("example.com") +// .Schemes("https", "http").URL() +// +// All variables defined in the route are required, and their values must +// conform to the corresponding patterns. +func (r *Route) URL(pairs ...string) (*url.URL, error) { + if r.err != nil { + return nil, r.err + } + values, err := r.prepareVars(pairs...) + if err != nil { + return nil, err + } + var scheme, host, path string + queries := make([]string, 0, len(r.regexp.queries)) + if r.regexp.host != nil { + if host, err = r.regexp.host.url(values); err != nil { + return nil, err + } + scheme = "http" + if r.buildScheme != "" { + scheme = r.buildScheme + } + } + if r.regexp.path != nil { + if path, err = r.regexp.path.url(values); err != nil { + return nil, err + } + } + for _, q := range r.regexp.queries { + var query string + if query, err = q.url(values); err != nil { + return nil, err + } + queries = append(queries, query) + } + return &url.URL{ + Scheme: scheme, + Host: host, + Path: path, + RawQuery: strings.Join(queries, "&"), + }, nil +} + +// URLHost builds the host part of the URL for a route. See Route.URL(). +// +// The route must have a host defined. +func (r *Route) URLHost(pairs ...string) (*url.URL, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp.host == nil { + return nil, errors.New("mux: route doesn't have a host") + } + values, err := r.prepareVars(pairs...) + if err != nil { + return nil, err + } + host, err := r.regexp.host.url(values) + if err != nil { + return nil, err + } + u := &url.URL{ + Scheme: "http", + Host: host, + } + if r.buildScheme != "" { + u.Scheme = r.buildScheme + } + return u, nil +} + +// URLPath builds the path part of the URL for a route. See Route.URL(). +// +// The route must have a path defined. +func (r *Route) URLPath(pairs ...string) (*url.URL, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp.path == nil { + return nil, errors.New("mux: route doesn't have a path") + } + values, err := r.prepareVars(pairs...) + if err != nil { + return nil, err + } + path, err := r.regexp.path.url(values) + if err != nil { + return nil, err + } + return &url.URL{ + Path: path, + }, nil +} + +// GetPathTemplate returns the template used to build the +// route match. +// This is useful for building simple REST API documentation and for instrumentation +// against third-party services. +// An error will be returned if the route does not define a path. +func (r *Route) GetPathTemplate() (string, error) { + if r.err != nil { + return "", r.err + } + if r.regexp.path == nil { + return "", errors.New("mux: route doesn't have a path") + } + return r.regexp.path.template, nil +} + +// GetPathRegexp returns the expanded regular expression used to match route path. +// This is useful for building simple REST API documentation and for instrumentation +// against third-party services. +// An error will be returned if the route does not define a path. +func (r *Route) GetPathRegexp() (string, error) { + if r.err != nil { + return "", r.err + } + if r.regexp.path == nil { + return "", errors.New("mux: route does not have a path") + } + return r.regexp.path.regexp.String(), nil +} + +// GetQueriesRegexp returns the expanded regular expressions used to match the +// route queries. +// This is useful for building simple REST API documentation and for instrumentation +// against third-party services. +// An error will be returned if the route does not have queries. +func (r *Route) GetQueriesRegexp() ([]string, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp.queries == nil { + return nil, errors.New("mux: route doesn't have queries") + } + queries := make([]string, 0, len(r.regexp.queries)) + for _, query := range r.regexp.queries { + queries = append(queries, query.regexp.String()) + } + return queries, nil +} + +// GetQueriesTemplates returns the templates used to build the +// query matching. +// This is useful for building simple REST API documentation and for instrumentation +// against third-party services. +// An error will be returned if the route does not define queries. +func (r *Route) GetQueriesTemplates() ([]string, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp.queries == nil { + return nil, errors.New("mux: route doesn't have queries") + } + queries := make([]string, 0, len(r.regexp.queries)) + for _, query := range r.regexp.queries { + queries = append(queries, query.template) + } + return queries, nil +} + +// GetMethods returns the methods the route matches against +// This is useful for building simple REST API documentation and for instrumentation +// against third-party services. +// An error will be returned if route does not have methods. +func (r *Route) GetMethods() ([]string, error) { + if r.err != nil { + return nil, r.err + } + for _, m := range r.matchers { + if methods, ok := m.(methodMatcher); ok { + return []string(methods), nil + } + } + return nil, errors.New("mux: route doesn't have methods") +} + +// GetHostTemplate returns the template used to build the +// route match. +// This is useful for building simple REST API documentation and for instrumentation +// against third-party services. +// An error will be returned if the route does not define a host. +func (r *Route) GetHostTemplate() (string, error) { + if r.err != nil { + return "", r.err + } + if r.regexp.host == nil { + return "", errors.New("mux: route doesn't have a host") + } + return r.regexp.host.template, nil +} + +// prepareVars converts the route variable pairs into a map. If the route has a +// BuildVarsFunc, it is invoked. +func (r *Route) prepareVars(pairs ...string) (map[string]string, error) { + m, err := mapFromPairsToString(pairs...) + if err != nil { + return nil, err + } + return r.buildVars(m), nil +} + +func (r *Route) buildVars(m map[string]string) map[string]string { + if r.buildVarsFunc != nil { + m = r.buildVarsFunc(m) + } + return m +} diff --git a/vendor/github.com/gorilla/mux/test_helpers.go b/vendor/github.com/gorilla/mux/test_helpers.go new file mode 100644 index 000000000..5f5c496de --- /dev/null +++ b/vendor/github.com/gorilla/mux/test_helpers.go @@ -0,0 +1,19 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import "net/http" + +// SetURLVars sets the URL variables for the given request, to be accessed via +// mux.Vars for testing route behaviour. Arguments are not modified, a shallow +// copy is returned. +// +// This API should only be used for testing purposes; it provides a way to +// inject variables into the request context. Alternatively, URL variables +// can be set by making a route that captures the required variables, +// starting a server and sending the request to that server. +func SetURLVars(r *http.Request, val map[string]string) *http.Request { + return requestWithVars(r, val) +} diff --git a/vendor/github.com/gosuri/uitable/.travis.yml b/vendor/github.com/gosuri/uitable/.travis.yml new file mode 100644 index 000000000..26fc3b438 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/.travis.yml @@ -0,0 +1,6 @@ +language: go +sudo: false +install: + - go get ./... +go: + - tip diff --git a/vendor/github.com/gosuri/uitable/LICENSE b/vendor/github.com/gosuri/uitable/LICENSE new file mode 100644 index 000000000..e436d9043 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/LICENSE @@ -0,0 +1,10 @@ +MIT License +=========== + +Copyright (c) 2015, Greg Osuri + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/gosuri/uitable/Makefile b/vendor/github.com/gosuri/uitable/Makefile new file mode 100644 index 000000000..60246a8a9 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/Makefile @@ -0,0 +1,4 @@ +test: + @go test ./... + +.PHONY: test diff --git a/vendor/github.com/gosuri/uitable/README.md b/vendor/github.com/gosuri/uitable/README.md new file mode 100644 index 000000000..683b538d1 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/README.md @@ -0,0 +1,67 @@ +# uitable [![GoDoc](https://godoc.org/github.com/gosuri/uitable?status.svg)](https://godoc.org/github.com/gosuri/uitable) [![Build Status](https://travis-ci.org/gosuri/uitable.svg?branch=master)](https://travis-ci.org/gosuri/uitable) + +uitable is a go library for representing data as tables for terminal applications. It provides primitives for sizing and wrapping columns to improve readability. + +## Example Usage + +Full source code for the example is available at [example/main.go](example/main.go) + +```go +table := uitable.New() +table.MaxColWidth = 50 + +table.AddRow("NAME", "BIRTHDAY", "BIO") +for _, hacker := range hackers { + table.AddRow(hacker.Name, hacker.Birthday, hacker.Bio) +} +fmt.Println(table) +``` + +Will render the data as: + +```sh +NAME BIRTHDAY BIO +Ada Lovelace December 10, 1815 Ada was a British mathematician and writer, chi... +Alan Turing June 23, 1912 Alan was a British pioneering computer scientis... +``` + +For wrapping in two columns: + +```go +table = uitable.New() +table.MaxColWidth = 80 +table.Wrap = true // wrap columns + +for _, hacker := range hackers { + table.AddRow("Name:", hacker.Name) + table.AddRow("Birthday:", hacker.Birthday) + table.AddRow("Bio:", hacker.Bio) + table.AddRow("") // blank +} +fmt.Println(table) +``` + +Will render the data as: + +``` +Name: Ada Lovelace +Birthday: December 10, 1815 +Bio: Ada was a British mathematician and writer, chiefly known for her work on + Charles Babbage's early mechanical general-purpose computer, the Analytical + Engine + +Name: Alan Turing +Birthday: June 23, 1912 +Bio: Alan was a British pioneering computer scientist, mathematician, logician, + cryptanalyst and theoretical biologist +``` + +## Installation + +``` +$ go get -v github.com/gosuri/uitable +``` + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/gosuri/uitable/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + diff --git a/vendor/github.com/gosuri/uitable/table.go b/vendor/github.com/gosuri/uitable/table.go new file mode 100644 index 000000000..b764e5150 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/table.go @@ -0,0 +1,205 @@ +// Package uitable provides a decorator for formating data as a table +package uitable + +import ( + "fmt" + "strings" + "sync" + + "github.com/fatih/color" + "github.com/gosuri/uitable/util/strutil" + "github.com/gosuri/uitable/util/wordwrap" +) + +// Separator is the default column seperator +var Separator = "\t" + +// Table represents a decorator that renders the data in formatted in a table +type Table struct { + // Rows is the collection of rows in the table + Rows []*Row + + // MaxColWidth is the maximum allowed width for cells in the table + MaxColWidth uint + + // Wrap when set to true wraps the contents of the columns when the length exceeds the MaxColWidth + Wrap bool + + // Separator is the seperator for columns in the table. Default is "\t" + Separator string + + mtx *sync.RWMutex + rightAlign map[int]bool +} + +// New returns a new Table with default values +func New() *Table { + return &Table{ + Separator: Separator, + mtx: new(sync.RWMutex), + rightAlign: map[int]bool{}, + } +} + +// AddRow adds a new row to the table +func (t *Table) AddRow(data ...interface{}) *Table { + t.mtx.Lock() + defer t.mtx.Unlock() + r := NewRow(data...) + t.Rows = append(t.Rows, r) + return t +} + +// Bytes returns the []byte value of table +func (t *Table) Bytes() []byte { + return []byte(t.String()) +} + +func (t *Table) RightAlign(col int) { + t.mtx.Lock() + t.rightAlign[col] = true + t.mtx.Unlock() +} + +// String returns the string value of table +func (t *Table) String() string { + t.mtx.RLock() + defer t.mtx.RUnlock() + + if len(t.Rows) == 0 { + return "" + } + + // determine the width for each column (cell in a row) + var colwidths []uint + for _, row := range t.Rows { + for i, cell := range row.Cells { + // resize colwidth array + if i+1 > len(colwidths) { + colwidths = append(colwidths, 0) + } + cellwidth := cell.LineWidth() + if t.MaxColWidth != 0 && cellwidth > t.MaxColWidth { + cellwidth = t.MaxColWidth + } + + if cellwidth > colwidths[i] { + colwidths[i] = cellwidth + } + } + } + + var lines []string + for _, row := range t.Rows { + row.Separator = t.Separator + for i, cell := range row.Cells { + cell.Width = colwidths[i] + cell.Wrap = t.Wrap + cell.RightAlign = t.rightAlign[i] + } + lines = append(lines, row.String()) + } + return strutil.Join(lines, "\n") +} + +// Row represents a row in a table +type Row struct { + // Cells is the group of cell for the row + Cells []*Cell + + // Separator for tabular columns + Separator string +} + +// NewRow returns a new Row and adds the data to the row +func NewRow(data ...interface{}) *Row { + r := &Row{Cells: make([]*Cell, len(data))} + for i, d := range data { + r.Cells[i] = &Cell{Data: d} + } + return r +} + +// String returns the string representation of the row +func (r *Row) String() string { + // get the max number of lines for each cell + var lc int // line count + for _, cell := range r.Cells { + if clc := len(strings.Split(cell.String(), "\n")); clc > lc { + lc = clc + } + } + + // allocate a two-dimentional array of cells for each line and add size them + cells := make([][]*Cell, lc) + for x := 0; x < lc; x++ { + cells[x] = make([]*Cell, len(r.Cells)) + for y := 0; y < len(r.Cells); y++ { + cells[x][y] = &Cell{Width: r.Cells[y].Width} + } + } + + // insert each line in a cell as new cell in the cells array + for y, cell := range r.Cells { + lines := strings.Split(cell.String(), "\n") + for x, line := range lines { + cells[x][y].Data = line + } + } + + // format each line + lines := make([]string, lc) + for x := range lines { + line := make([]string, len(cells[x])) + for y := range cells[x] { + line[y] = cells[x][y].String() + } + lines[x] = strutil.Join(line, r.Separator) + } + return strings.Join(lines, "\n") +} + +// Cell represents a column in a row +type Cell struct { + // Width is the width of the cell + Width uint + + // Wrap when true wraps the contents of the cell when the lenght exceeds the width + Wrap bool + + // RightAlign when true aligns contents to the right + RightAlign bool + + // Data is the cell data + Data interface{} +} + +// LineWidth returns the max width of all the lines in a cell +func (c *Cell) LineWidth() uint { + width := 0 + for _, s := range strings.Split(c.String(), "\n") { + w := strutil.StringWidth(s) + if w > width { + width = w + } + } + return uint(width) +} + +// String returns the string formated representation of the cell +func (c *Cell) String() string { + if c.Data == nil { + return strutil.PadLeft(" ", int(c.Width), ' ') + } + col := color.New(color.FgBlack) + col.DisableColor() + s := fmt.Sprintf("%v", col.Sprint(c.Data)) + if c.Width > 0 { + if c.Wrap && uint(len(s)) > c.Width { + return wordwrap.WrapString(s, c.Width) + } else { + return strutil.Resize(s, c.Width, c.RightAlign) + } + } + return s +} diff --git a/vendor/github.com/gosuri/uitable/util/strutil/strutil.go b/vendor/github.com/gosuri/uitable/util/strutil/strutil.go new file mode 100644 index 000000000..53f30a8fd --- /dev/null +++ b/vendor/github.com/gosuri/uitable/util/strutil/strutil.go @@ -0,0 +1,101 @@ +// Package strutil provides various utilities for manipulating strings +package strutil + +import ( + "bytes" + "regexp" + + "github.com/mattn/go-runewidth" +) + +const ansi = "[\u001B\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" + +var re = regexp.MustCompile(ansi) + +// PadRight returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified Unicode character. +func PadRight(str string, length int, pad byte) string { + slen := StringWidth(str) + if slen >= length { + return str + } + buf := bytes.NewBufferString(str) + for i := 0; i < length-slen; i++ { + buf.WriteByte(pad) + } + return buf.String() +} + +// PadLeft returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified Unicode character. +func PadLeft(str string, length int, pad byte) string { + slen := StringWidth(str) + if slen >= length { + return str + } + var buf bytes.Buffer + for i := 0; i < length-slen; i++ { + buf.WriteByte(pad) + } + buf.WriteString(str) + return buf.String() +} + +// Resize resizes the string with the given length. It ellipses with '...' when the string's length exceeds +// the desired length or pads spaces to the right of the string when length is smaller than desired +func Resize(s string, length uint, rightAlign bool) string { + slen := StringWidth(s) + n := int(length) + if slen == n { + return s + } + // Pads only when length of the string smaller than len needed + if rightAlign { + s = PadLeft(s, n, ' ') + } else { + s = PadRight(s, n, ' ') + } + if slen > n { + rs := []rune(s) + var buf bytes.Buffer + w := 0 + for _, r := range rs { + buf.WriteRune(r) + rw := RuneWidth(r) + if w+rw >= n-3 { + break + } + w += rw + } + buf.WriteString("...") + s = buf.String() + } + return s +} + +// Join joins the list of the string with the delim provided. +// Returns an empty string for empty list +func Join(list []string, delim string) string { + if len(list) == 0 { + return "" + } + var buf bytes.Buffer + for i := 0; i < len(list)-1; i++ { + buf.WriteString(list[i] + delim) + } + buf.WriteString(list[len(list)-1]) + return buf.String() +} + +// Strip strips the string of all colors +func Strip(s string) string { + return re.ReplaceAllString(s, "") +} + +// StringWidth returns the actual width of the string without colors +func StringWidth(s string) int { + return runewidth.StringWidth(Strip(s)) +} + +// RuneWidth returns the actual width of the rune +func RuneWidth(s rune) int { + return runewidth.RuneWidth(s) +} diff --git a/vendor/github.com/gosuri/uitable/util/wordwrap/LICENSE.md b/vendor/github.com/gosuri/uitable/util/wordwrap/LICENSE.md new file mode 100644 index 000000000..229851590 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/util/wordwrap/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/gosuri/uitable/util/wordwrap/README.md b/vendor/github.com/gosuri/uitable/util/wordwrap/README.md new file mode 100644 index 000000000..60ae31170 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/util/wordwrap/README.md @@ -0,0 +1,39 @@ +# go-wordwrap + +`go-wordwrap` (Golang package: `wordwrap`) is a package for Go that +automatically wraps words into multiple lines. The primary use case for this +is in formatting CLI output, but of course word wrapping is a generally useful +thing to do. + +## Installation and Usage + +Install using `go get github.com/mitchellh/go-wordwrap`. + +Full documentation is available at +http://godoc.org/github.com/mitchellh/go-wordwrap + +Below is an example of its usage ignoring errors: + +```go +wrapped := wordwrap.WrapString("foo bar baz", 3) +fmt.Println(wrapped) +``` + +Would output: + +``` +foo +bar +baz +``` + +## Word Wrap Algorithm + +This library doesn't use any clever algorithm for word wrapping. The wrapping +is actually very naive: whenever there is whitespace or an explicit linebreak. +The goal of this library is for word wrapping CLI output, so the input is +typically pretty well controlled human language. Because of this, the naive +approach typically works just fine. + +In the future, we'd like to make the algorithm more advanced. We would do +so without breaking the API. diff --git a/vendor/github.com/gosuri/uitable/util/wordwrap/wordwrap.go b/vendor/github.com/gosuri/uitable/util/wordwrap/wordwrap.go new file mode 100644 index 000000000..b2c63b879 --- /dev/null +++ b/vendor/github.com/gosuri/uitable/util/wordwrap/wordwrap.go @@ -0,0 +1,85 @@ +// Package wordwrap provides methods for wrapping the contents of a string +package wordwrap + +import ( + "bytes" + "unicode" + + "github.com/gosuri/uitable/util/strutil" +) + +// WrapString wraps the given string within lim width in characters. +// +// Wrapping is currently naive and only happens at white-space. A future +// version of the library will implement smarter wrapping. This means that +// pathological cases can dramatically reach past the limit, such as a very +// long word. +func WrapString(s string, lim uint) string { + // Initialize a buffer with a slightly larger size to account for breaks + init := make([]byte, 0, len(s)) + buf := bytes.NewBuffer(init) + + var current uint + var wordBuf, spaceBuf bytes.Buffer + var wordWidth, spaceWidth int + + for _, char := range s { + if char == '\n' { + if wordBuf.Len() == 0 { + if current+uint(spaceWidth) > lim { + current = 0 + } else { + current += uint(spaceWidth) + spaceBuf.WriteTo(buf) + spaceWidth += strutil.StringWidth(buf.String()) + } + spaceBuf.Reset() + spaceWidth = 0 + } else { + current += uint(spaceWidth + wordWidth) + spaceBuf.WriteTo(buf) + spaceBuf.Reset() + wordBuf.WriteTo(buf) + wordBuf.Reset() + spaceWidth = 0 + wordWidth = 0 + } + buf.WriteRune(char) + current = 0 + } else if unicode.IsSpace(char) { + if spaceBuf.Len() == 0 || wordBuf.Len() > 0 { + current += uint(spaceWidth + wordWidth) + spaceBuf.WriteTo(buf) + spaceBuf.Reset() + wordBuf.WriteTo(buf) + wordBuf.Reset() + spaceWidth = 0 + wordWidth = 0 + } + + spaceBuf.WriteRune(char) + spaceWidth += strutil.RuneWidth(char) + } else { + wordBuf.WriteRune(char) + wordWidth += strutil.RuneWidth(char) + + if current+uint(spaceWidth+wordWidth) > lim && uint(wordWidth) < lim { + buf.WriteRune('\n') + current = 0 + spaceBuf.Reset() + spaceWidth = 0 + } + } + } + + if wordBuf.Len() == 0 { + if current+uint(spaceWidth) <= lim { + spaceBuf.WriteTo(buf) + } + } else { + spaceBuf.WriteTo(buf) + wordBuf.WriteTo(buf) + } + + return buf.String() +} diff --git a/vendor/github.com/hashicorp/errwrap/LICENSE b/vendor/github.com/hashicorp/errwrap/LICENSE new file mode 100644 index 000000000..c33dcc7c9 --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/LICENSE @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md new file mode 100644 index 000000000..444df08f8 --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/README.md @@ -0,0 +1,89 @@ +# errwrap + +`errwrap` is a package for Go that formalizes the pattern of wrapping errors +and checking if an error contains another error. + +There is a common pattern in Go of taking a returned `error` value and +then wrapping it (such as with `fmt.Errorf`) before returning it. The problem +with this pattern is that you completely lose the original `error` structure. + +Arguably the _correct_ approach is that you should make a custom structure +implementing the `error` interface, and have the original error as a field +on that structure, such [as this example](http://golang.org/pkg/os/#PathError). +This is a good approach, but you have to know the entire chain of possible +rewrapping that happens, when you might just care about one. + +`errwrap` formalizes this pattern (it doesn't matter what approach you use +above) by giving a single interface for wrapping errors, checking if a specific +error is wrapped, and extracting that error. + +## Installation and Docs + +Install using `go get github.com/hashicorp/errwrap`. + +Full documentation is available at +http://godoc.org/github.com/hashicorp/errwrap + +## Usage + +#### Basic Usage + +Below is a very basic example of its usage: + +```go +// A function that always returns an error, but wraps it, like a real +// function might. +func tryOpen() error { + _, err := os.Open("/i/dont/exist") + if err != nil { + return errwrap.Wrapf("Doesn't exist: {{err}}", err) + } + + return nil +} + +func main() { + err := tryOpen() + + // We can use the Contains helpers to check if an error contains + // another error. It is safe to do this with a nil error, or with + // an error that doesn't even use the errwrap package. + if errwrap.Contains(err, "does not exist") { + // Do something + } + if errwrap.ContainsType(err, new(os.PathError)) { + // Do something + } + + // Or we can use the associated `Get` functions to just extract + // a specific error. This would return nil if that specific error doesn't + // exist. + perr := errwrap.GetType(err, new(os.PathError)) +} +``` + +#### Custom Types + +If you're already making custom types that properly wrap errors, then +you can get all the functionality of `errwraps.Contains` and such by +implementing the `Wrapper` interface with just one function. Example: + +```go +type AppError { + Code ErrorCode + Err error +} + +func (e *AppError) WrappedErrors() []error { + return []error{e.Err} +} +``` + +Now this works: + +```go +err := &AppError{Err: fmt.Errorf("an error")} +if errwrap.ContainsType(err, fmt.Errorf("")) { + // This will work! +} +``` diff --git a/vendor/github.com/hashicorp/errwrap/errwrap.go b/vendor/github.com/hashicorp/errwrap/errwrap.go new file mode 100644 index 000000000..44e368e56 --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/errwrap.go @@ -0,0 +1,178 @@ +// Package errwrap implements methods to formalize error wrapping in Go. +// +// All of the top-level functions that take an `error` are built to be able +// to take any error, not just wrapped errors. This allows you to use errwrap +// without having to type-check and type-cast everywhere. +package errwrap + +import ( + "errors" + "reflect" + "strings" +) + +// WalkFunc is the callback called for Walk. +type WalkFunc func(error) + +// Wrapper is an interface that can be implemented by custom types to +// have all the Contains, Get, etc. functions in errwrap work. +// +// When Walk reaches a Wrapper, it will call the callback for every +// wrapped error in addition to the wrapper itself. Since all the top-level +// functions in errwrap use Walk, this means that all those functions work +// with your custom type. +type Wrapper interface { + WrappedErrors() []error +} + +// Wrap defines that outer wraps inner, returning an error type that +// can be cleanly used with the other methods in this package, such as +// Contains, GetAll, etc. +// +// This function won't modify the error message at all (the outer message +// will be used). +func Wrap(outer, inner error) error { + return &wrappedError{ + Outer: outer, + Inner: inner, + } +} + +// Wrapf wraps an error with a formatting message. This is similar to using +// `fmt.Errorf` to wrap an error. If you're using `fmt.Errorf` to wrap +// errors, you should replace it with this. +// +// format is the format of the error message. The string '{{err}}' will +// be replaced with the original error message. +// +// Deprecated: Use fmt.Errorf() +func Wrapf(format string, err error) error { + outerMsg := "" + if err != nil { + outerMsg = err.Error() + } + + outer := errors.New(strings.Replace( + format, "{{err}}", outerMsg, -1)) + + return Wrap(outer, err) +} + +// Contains checks if the given error contains an error with the +// message msg. If err is not a wrapped error, this will always return +// false unless the error itself happens to match this msg. +func Contains(err error, msg string) bool { + return len(GetAll(err, msg)) > 0 +} + +// ContainsType checks if the given error contains an error with +// the same concrete type as v. If err is not a wrapped error, this will +// check the err itself. +func ContainsType(err error, v interface{}) bool { + return len(GetAllType(err, v)) > 0 +} + +// Get is the same as GetAll but returns the deepest matching error. +func Get(err error, msg string) error { + es := GetAll(err, msg) + if len(es) > 0 { + return es[len(es)-1] + } + + return nil +} + +// GetType is the same as GetAllType but returns the deepest matching error. +func GetType(err error, v interface{}) error { + es := GetAllType(err, v) + if len(es) > 0 { + return es[len(es)-1] + } + + return nil +} + +// GetAll gets all the errors that might be wrapped in err with the +// given message. The order of the errors is such that the outermost +// matching error (the most recent wrap) is index zero, and so on. +func GetAll(err error, msg string) []error { + var result []error + + Walk(err, func(err error) { + if err.Error() == msg { + result = append(result, err) + } + }) + + return result +} + +// GetAllType gets all the errors that are the same type as v. +// +// The order of the return value is the same as described in GetAll. +func GetAllType(err error, v interface{}) []error { + var result []error + + var search string + if v != nil { + search = reflect.TypeOf(v).String() + } + Walk(err, func(err error) { + var needle string + if err != nil { + needle = reflect.TypeOf(err).String() + } + + if needle == search { + result = append(result, err) + } + }) + + return result +} + +// Walk walks all the wrapped errors in err and calls the callback. If +// err isn't a wrapped error, this will be called once for err. If err +// is a wrapped error, the callback will be called for both the wrapper +// that implements error as well as the wrapped error itself. +func Walk(err error, cb WalkFunc) { + if err == nil { + return + } + + switch e := err.(type) { + case *wrappedError: + cb(e.Outer) + Walk(e.Inner, cb) + case Wrapper: + cb(err) + + for _, err := range e.WrappedErrors() { + Walk(err, cb) + } + case interface{ Unwrap() error }: + cb(err) + Walk(e.Unwrap(), cb) + default: + cb(err) + } +} + +// wrappedError is an implementation of error that has both the +// outer and inner errors. +type wrappedError struct { + Outer error + Inner error +} + +func (w *wrappedError) Error() string { + return w.Outer.Error() +} + +func (w *wrappedError) WrappedErrors() []error { + return []error{w.Outer, w.Inner} +} + +func (w *wrappedError) Unwrap() error { + return w.Inner +} diff --git a/vendor/github.com/hashicorp/go-multierror/LICENSE b/vendor/github.com/hashicorp/go-multierror/LICENSE new file mode 100644 index 000000000..82b4de97c --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/LICENSE @@ -0,0 +1,353 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/hashicorp/go-multierror/Makefile b/vendor/github.com/hashicorp/go-multierror/Makefile new file mode 100644 index 000000000..b97cd6ed0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/Makefile @@ -0,0 +1,31 @@ +TEST?=./... + +default: test + +# test runs the test suite and vets the code. +test: generate + @echo "==> Running tests..." + @go list $(TEST) \ + | grep -v "/vendor/" \ + | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} + +# testrace runs the race checker +testrace: generate + @echo "==> Running tests (race)..." + @go list $(TEST) \ + | grep -v "/vendor/" \ + | xargs -n1 go test -timeout=60s -race ${TESTARGS} + +# updatedeps installs all the dependencies needed to run and build. +updatedeps: + @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" + +# generate runs `go generate` to build the dynamically generated source files. +generate: + @echo "==> Generating..." + @find . -type f -name '.DS_Store' -delete + @go list ./... \ + | grep -v "/vendor/" \ + | xargs -n1 go generate + +.PHONY: default test testrace updatedeps generate diff --git a/vendor/github.com/hashicorp/go-multierror/README.md b/vendor/github.com/hashicorp/go-multierror/README.md new file mode 100644 index 000000000..71dd308ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/README.md @@ -0,0 +1,150 @@ +# go-multierror + +[![CircleCI](https://img.shields.io/circleci/build/github/hashicorp/go-multierror/master)](https://circleci.com/gh/hashicorp/go-multierror) +[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-multierror.svg)](https://pkg.go.dev/github.com/hashicorp/go-multierror) +![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hashicorp/go-multierror) + +[circleci]: https://app.circleci.com/pipelines/github/hashicorp/go-multierror +[godocs]: https://pkg.go.dev/github.com/hashicorp/go-multierror + +`go-multierror` is a package for Go that provides a mechanism for +representing a list of `error` values as a single `error`. + +This allows a function in Go to return an `error` that might actually +be a list of errors. If the caller knows this, they can unwrap the +list and access the errors. If the caller doesn't know, the error +formats to a nice human-readable format. + +`go-multierror` is fully compatible with the Go standard library +[errors](https://golang.org/pkg/errors/) package, including the +functions `As`, `Is`, and `Unwrap`. This provides a standardized approach +for introspecting on error values. + +## Installation and Docs + +Install using `go get github.com/hashicorp/go-multierror`. + +Full documentation is available at +https://pkg.go.dev/github.com/hashicorp/go-multierror + +### Requires go version 1.13 or newer + +`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced +[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which +this library takes advantage of. + +If you need to use an earlier version of go, you can use the +[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0) +tag, which doesn't rely on features in go 1.13. + +If you see compile errors that look like the below, it's likely that +you're on an older version of go: + +``` +/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As +/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is +``` + +## Usage + +go-multierror is easy to use and purposely built to be unobtrusive in +existing Go applications/libraries that may not be aware of it. + +**Building a list of errors** + +The `Append` function is used to create a list of errors. This function +behaves a lot like the Go built-in `append` function: it doesn't matter +if the first argument is nil, a `multierror.Error`, or any other `error`, +the function behaves as you would expect. + +```go +var result error + +if err := step1(); err != nil { + result = multierror.Append(result, err) +} +if err := step2(); err != nil { + result = multierror.Append(result, err) +} + +return result +``` + +**Customizing the formatting of the errors** + +By specifying a custom `ErrorFormat`, you can customize the format +of the `Error() string` function: + +```go +var result *multierror.Error + +// ... accumulate errors here, maybe using Append + +if result != nil { + result.ErrorFormat = func([]error) string { + return "errors!" + } +} +``` + +**Accessing the list of errors** + +`multierror.Error` implements `error` so if the caller doesn't know about +multierror, it will work just fine. But if you're aware a multierror might +be returned, you can use type switches to access the list of errors: + +```go +if err := something(); err != nil { + if merr, ok := err.(*multierror.Error); ok { + // Use merr.Errors + } +} +``` + +You can also use the standard [`errors.Unwrap`](https://golang.org/pkg/errors/#Unwrap) +function. This will continue to unwrap into subsequent errors until none exist. + +**Extracting an error** + +The standard library [`errors.As`](https://golang.org/pkg/errors/#As) +function can be used directly with a multierror to extract a specific error: + +```go +// Assume err is a multierror value +err := somefunc() + +// We want to know if "err" has a "RichErrorType" in it and extract it. +var errRich RichErrorType +if errors.As(err, &errRich) { + // It has it, and now errRich is populated. +} +``` + +**Checking for an exact error value** + +Some errors are returned as exact errors such as the [`ErrNotExist`](https://golang.org/pkg/os/#pkg-variables) +error in the `os` package. You can check if this error is present by using +the standard [`errors.Is`](https://golang.org/pkg/errors/#Is) function. + +```go +// Assume err is a multierror value +err := somefunc() +if errors.Is(err, os.ErrNotExist) { + // err contains os.ErrNotExist +} +``` + +**Returning a multierror only if there are errors** + +If you build a `multierror.Error`, you can use the `ErrorOrNil` function +to return an `error` implementation only if there are errors to return: + +```go +var result *multierror.Error + +// ... accumulate errors here + +// Return the `error` only if errors were added to the multierror, otherwise +// return nil since there are no errors. +return result.ErrorOrNil() +``` diff --git a/vendor/github.com/hashicorp/go-multierror/append.go b/vendor/github.com/hashicorp/go-multierror/append.go new file mode 100644 index 000000000..3e2589bfd --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/append.go @@ -0,0 +1,43 @@ +package multierror + +// Append is a helper function that will append more errors +// onto an Error in order to create a larger multi-error. +// +// If err is not a multierror.Error, then it will be turned into +// one. If any of the errs are multierr.Error, they will be flattened +// one level into err. +// Any nil errors within errs will be ignored. If err is nil, a new +// *Error will be returned. +func Append(err error, errs ...error) *Error { + switch err := err.(type) { + case *Error: + // Typed nils can reach here, so initialize if we are nil + if err == nil { + err = new(Error) + } + + // Go through each error and flatten + for _, e := range errs { + switch e := e.(type) { + case *Error: + if e != nil { + err.Errors = append(err.Errors, e.Errors...) + } + default: + if e != nil { + err.Errors = append(err.Errors, e) + } + } + } + + return err + default: + newErrs := make([]error, 0, len(errs)+1) + if err != nil { + newErrs = append(newErrs, err) + } + newErrs = append(newErrs, errs...) + + return Append(&Error{}, newErrs...) + } +} diff --git a/vendor/github.com/hashicorp/go-multierror/flatten.go b/vendor/github.com/hashicorp/go-multierror/flatten.go new file mode 100644 index 000000000..aab8e9abe --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/flatten.go @@ -0,0 +1,26 @@ +package multierror + +// Flatten flattens the given error, merging any *Errors together into +// a single *Error. +func Flatten(err error) error { + // If it isn't an *Error, just return the error as-is + if _, ok := err.(*Error); !ok { + return err + } + + // Otherwise, make the result and flatten away! + flatErr := new(Error) + flatten(err, flatErr) + return flatErr +} + +func flatten(err error, flatErr *Error) { + switch err := err.(type) { + case *Error: + for _, e := range err.Errors { + flatten(e, flatErr) + } + default: + flatErr.Errors = append(flatErr.Errors, err) + } +} diff --git a/vendor/github.com/hashicorp/go-multierror/format.go b/vendor/github.com/hashicorp/go-multierror/format.go new file mode 100644 index 000000000..47f13c49a --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/format.go @@ -0,0 +1,27 @@ +package multierror + +import ( + "fmt" + "strings" +) + +// ErrorFormatFunc is a function callback that is called by Error to +// turn the list of errors into a string. +type ErrorFormatFunc func([]error) string + +// ListFormatFunc is a basic formatter that outputs the number of errors +// that occurred along with a bullet point list of the errors. +func ListFormatFunc(es []error) string { + if len(es) == 1 { + return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) + } + + points := make([]string, len(es)) + for i, err := range es { + points[i] = fmt.Sprintf("* %s", err) + } + + return fmt.Sprintf( + "%d errors occurred:\n\t%s\n\n", + len(es), strings.Join(points, "\n\t")) +} diff --git a/vendor/github.com/hashicorp/go-multierror/group.go b/vendor/github.com/hashicorp/go-multierror/group.go new file mode 100644 index 000000000..9c29efb7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/group.go @@ -0,0 +1,38 @@ +package multierror + +import "sync" + +// Group is a collection of goroutines which return errors that need to be +// coalesced. +type Group struct { + mutex sync.Mutex + err *Error + wg sync.WaitGroup +} + +// Go calls the given function in a new goroutine. +// +// If the function returns an error it is added to the group multierror which +// is returned by Wait. +func (g *Group) Go(f func() error) { + g.wg.Add(1) + + go func() { + defer g.wg.Done() + + if err := f(); err != nil { + g.mutex.Lock() + g.err = Append(g.err, err) + g.mutex.Unlock() + } + }() +} + +// Wait blocks until all function calls from the Go method have returned, then +// returns the multierror. +func (g *Group) Wait() *Error { + g.wg.Wait() + g.mutex.Lock() + defer g.mutex.Unlock() + return g.err +} diff --git a/vendor/github.com/hashicorp/go-multierror/multierror.go b/vendor/github.com/hashicorp/go-multierror/multierror.go new file mode 100644 index 000000000..f54574326 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/multierror.go @@ -0,0 +1,121 @@ +package multierror + +import ( + "errors" + "fmt" +) + +// Error is an error type to track multiple errors. This is used to +// accumulate errors in cases and return them as a single "error". +type Error struct { + Errors []error + ErrorFormat ErrorFormatFunc +} + +func (e *Error) Error() string { + fn := e.ErrorFormat + if fn == nil { + fn = ListFormatFunc + } + + return fn(e.Errors) +} + +// ErrorOrNil returns an error interface if this Error represents +// a list of errors, or returns nil if the list of errors is empty. This +// function is useful at the end of accumulation to make sure that the value +// returned represents the existence of errors. +func (e *Error) ErrorOrNil() error { + if e == nil { + return nil + } + if len(e.Errors) == 0 { + return nil + } + + return e +} + +func (e *Error) GoString() string { + return fmt.Sprintf("*%#v", *e) +} + +// WrappedErrors returns the list of errors that this Error is wrapping. It is +// an implementation of the errwrap.Wrapper interface so that multierror.Error +// can be used with that library. +// +// This method is not safe to be called concurrently. Unlike accessing the +// Errors field directly, this function also checks if the multierror is nil to +// prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface. +func (e *Error) WrappedErrors() []error { + if e == nil { + return nil + } + return e.Errors +} + +// Unwrap returns an error from Error (or nil if there are no errors). +// This error returned will further support Unwrap to get the next error, +// etc. The order will match the order of Errors in the multierror.Error +// at the time of calling. +// +// The resulting error supports errors.As/Is/Unwrap so you can continue +// to use the stdlib errors package to introspect further. +// +// This will perform a shallow copy of the errors slice. Any errors appended +// to this error after calling Unwrap will not be available until a new +// Unwrap is called on the multierror.Error. +func (e *Error) Unwrap() error { + // If we have no errors then we do nothing + if e == nil || len(e.Errors) == 0 { + return nil + } + + // If we have exactly one error, we can just return that directly. + if len(e.Errors) == 1 { + return e.Errors[0] + } + + // Shallow copy the slice + errs := make([]error, len(e.Errors)) + copy(errs, e.Errors) + return chain(errs) +} + +// chain implements the interfaces necessary for errors.Is/As/Unwrap to +// work in a deterministic way with multierror. A chain tracks a list of +// errors while accounting for the current represented error. This lets +// Is/As be meaningful. +// +// Unwrap returns the next error. In the cleanest form, Unwrap would return +// the wrapped error here but we can't do that if we want to properly +// get access to all the errors. Instead, users are recommended to use +// Is/As to get the correct error type out. +// +// Precondition: []error is non-empty (len > 0) +type chain []error + +// Error implements the error interface +func (e chain) Error() string { + return e[0].Error() +} + +// Unwrap implements errors.Unwrap by returning the next error in the +// chain or nil if there are no more errors. +func (e chain) Unwrap() error { + if len(e) == 1 { + return nil + } + + return e[1:] +} + +// As implements errors.As by attempting to map to the current value. +func (e chain) As(target interface{}) bool { + return errors.As(e[0], target) +} + +// Is implements errors.Is by comparing the current value directly. +func (e chain) Is(target error) bool { + return errors.Is(e[0], target) +} diff --git a/vendor/github.com/hashicorp/go-multierror/prefix.go b/vendor/github.com/hashicorp/go-multierror/prefix.go new file mode 100644 index 000000000..5c477abe4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/prefix.go @@ -0,0 +1,37 @@ +package multierror + +import ( + "fmt" + + "github.com/hashicorp/errwrap" +) + +// Prefix is a helper function that will prefix some text +// to the given error. If the error is a multierror.Error, then +// it will be prefixed to each wrapped error. +// +// This is useful to use when appending multiple multierrors +// together in order to give better scoping. +func Prefix(err error, prefix string) error { + if err == nil { + return nil + } + + format := fmt.Sprintf("%s {{err}}", prefix) + switch err := err.(type) { + case *Error: + // Typed nils can reach here, so initialize if we are nil + if err == nil { + err = new(Error) + } + + // Wrap each of the errors + for i, e := range err.Errors { + err.Errors[i] = errwrap.Wrapf(format, e) + } + + return err + default: + return errwrap.Wrapf(format, err) + } +} diff --git a/vendor/github.com/hashicorp/go-multierror/sort.go b/vendor/github.com/hashicorp/go-multierror/sort.go new file mode 100644 index 000000000..fecb14e81 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/sort.go @@ -0,0 +1,16 @@ +package multierror + +// Len implements sort.Interface function for length +func (err Error) Len() int { + return len(err.Errors) +} + +// Swap implements sort.Interface function for swapping elements +func (err Error) Swap(i, j int) { + err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] +} + +// Less implements sort.Interface function for determining order +func (err Error) Less(i, j int) bool { + return err.Errors[i].Error() < err.Errors[j].Error() +} diff --git a/vendor/github.com/huandu/xstrings/.gitignore b/vendor/github.com/huandu/xstrings/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/huandu/xstrings/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/huandu/xstrings/CONTRIBUTING.md b/vendor/github.com/huandu/xstrings/CONTRIBUTING.md new file mode 100644 index 000000000..d7b4b8d58 --- /dev/null +++ b/vendor/github.com/huandu/xstrings/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing # + +Thanks for your contribution in advance. No matter what you will contribute to this project, pull request or bug report or feature discussion, it's always highly appreciated. + +## New API or feature ## + +I want to speak more about how to add new functions to this package. + +Package `xstring` is a collection of useful string functions which should be implemented in Go. It's a bit subject to say which function should be included and which should not. I set up following rules in order to make it clear and as objective as possible. + +* Rule 1: Only string algorithm, which takes string as input, can be included. +* Rule 2: If a function has been implemented in package `string`, it must not be included. +* Rule 3: If a function is not language neutral, it must not be included. +* Rule 4: If a function is a part of standard library in other languages, it can be included. +* Rule 5: If a function is quite useful in some famous framework or library, it can be included. + +New function must be discussed in project issues before submitting any code. If a pull request with new functions is sent without any ref issue, it will be rejected. + +## Pull request ## + +Pull request is always welcome. Just make sure you have run `go fmt` and all test cases passed before submit. + +If the pull request is to add a new API or feature, don't forget to update README.md and add new API in function list. diff --git a/vendor/github.com/huandu/xstrings/LICENSE b/vendor/github.com/huandu/xstrings/LICENSE new file mode 100644 index 000000000..270177259 --- /dev/null +++ b/vendor/github.com/huandu/xstrings/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Huan Du + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/vendor/github.com/huandu/xstrings/README.md b/vendor/github.com/huandu/xstrings/README.md new file mode 100644 index 000000000..e809c79ab --- /dev/null +++ b/vendor/github.com/huandu/xstrings/README.md @@ -0,0 +1,118 @@ +# xstrings + +[![Build Status](https://github.com/huandu/xstrings/workflows/Go/badge.svg)](https://github.com/huandu/xstrings/actions) +[![Go Doc](https://godoc.org/github.com/huandu/xstrings?status.svg)](https://pkg.go.dev/github.com/huandu/xstrings) +[![Go Report](https://goreportcard.com/badge/github.com/huandu/xstrings)](https://goreportcard.com/report/github.com/huandu/xstrings) +[![Coverage Status](https://coveralls.io/repos/github/huandu/xstrings/badge.svg?branch=master)](https://coveralls.io/github/huandu/xstrings?branch=master) + +Go package [xstrings](https://godoc.org/github.com/huandu/xstrings) is a collection of string functions, which are widely used in other languages but absent in Go package [strings](http://golang.org/pkg/strings). + +All functions are well tested and carefully tuned for performance. + +## Propose a new function + +Please review [contributing guideline](CONTRIBUTING.md) and [create new issue](https://github.com/huandu/xstrings/issues) to state why it should be included. + +## Install + +Use `go get` to install this library. + + go get github.com/huandu/xstrings + +## API document + +See [GoDoc](https://godoc.org/github.com/huandu/xstrings) for full document. + +## Function list + +Go functions have a unique naming style. One, who has experience in other language but new in Go, may have difficulties to find out right string function to use. + +Here is a list of functions in [strings](http://golang.org/pkg/strings) and [xstrings](https://godoc.org/github.com/huandu/xstrings) with enough extra information about how to map these functions to their friends in other languages. Hope this list could be helpful for fresh gophers. + +### Package `xstrings` functions + +_Keep this table sorted by Function in ascending order._ + +| Function | Friends | # | +| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------- | +| [Center](https://godoc.org/github.com/huandu/xstrings#Center) | `str.center` in Python; `String#center` in Ruby | [#30](https://github.com/huandu/xstrings/issues/30) | +| [Count](https://godoc.org/github.com/huandu/xstrings#Count) | `String#count` in Ruby | [#16](https://github.com/huandu/xstrings/issues/16) | +| [Delete](https://godoc.org/github.com/huandu/xstrings#Delete) | `String#delete` in Ruby | [#17](https://github.com/huandu/xstrings/issues/17) | +| [ExpandTabs](https://godoc.org/github.com/huandu/xstrings#ExpandTabs) | `str.expandtabs` in Python | [#27](https://github.com/huandu/xstrings/issues/27) | +| [FirstRuneToLower](https://godoc.org/github.com/huandu/xstrings#FirstRuneToLower) | `lcfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) | +| [FirstRuneToUpper](https://godoc.org/github.com/huandu/xstrings#FirstRuneToUpper) | `String#capitalize` in Ruby; `ucfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) | +| [Insert](https://godoc.org/github.com/huandu/xstrings#Insert) | `String#insert` in Ruby | [#18](https://github.com/huandu/xstrings/issues/18) | +| [LastPartition](https://godoc.org/github.com/huandu/xstrings#LastPartition) | `str.rpartition` in Python; `String#rpartition` in Ruby | [#19](https://github.com/huandu/xstrings/issues/19) | +| [LeftJustify](https://godoc.org/github.com/huandu/xstrings#LeftJustify) | `str.ljust` in Python; `String#ljust` in Ruby | [#28](https://github.com/huandu/xstrings/issues/28) | +| [Len](https://godoc.org/github.com/huandu/xstrings#Len) | `mb_strlen` in PHP | [#23](https://github.com/huandu/xstrings/issues/23) | +| [Partition](https://godoc.org/github.com/huandu/xstrings#Partition) | `str.partition` in Python; `String#partition` in Ruby | [#10](https://github.com/huandu/xstrings/issues/10) | +| [Reverse](https://godoc.org/github.com/huandu/xstrings#Reverse) | `String#reverse` in Ruby; `strrev` in PHP; `reverse` in Perl | [#7](https://github.com/huandu/xstrings/issues/7) | +| [RightJustify](https://godoc.org/github.com/huandu/xstrings#RightJustify) | `str.rjust` in Python; `String#rjust` in Ruby | [#29](https://github.com/huandu/xstrings/issues/29) | +| [RuneWidth](https://godoc.org/github.com/huandu/xstrings#RuneWidth) | - | [#27](https://github.com/huandu/xstrings/issues/27) | +| [Scrub](https://godoc.org/github.com/huandu/xstrings#Scrub) | `String#scrub` in Ruby | [#20](https://github.com/huandu/xstrings/issues/20) | +| [Shuffle](https://godoc.org/github.com/huandu/xstrings#Shuffle) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) | +| [ShuffleSource](https://godoc.org/github.com/huandu/xstrings#ShuffleSource) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) | +| [Slice](https://godoc.org/github.com/huandu/xstrings#Slice) | `mb_substr` in PHP | [#9](https://github.com/huandu/xstrings/issues/9) | +| [Squeeze](https://godoc.org/github.com/huandu/xstrings#Squeeze) | `String#squeeze` in Ruby | [#11](https://github.com/huandu/xstrings/issues/11) | +| [Successor](https://godoc.org/github.com/huandu/xstrings#Successor) | `String#succ` or `String#next` in Ruby | [#22](https://github.com/huandu/xstrings/issues/22) | +| [SwapCase](https://godoc.org/github.com/huandu/xstrings#SwapCase) | `str.swapcase` in Python; `String#swapcase` in Ruby | [#12](https://github.com/huandu/xstrings/issues/12) | +| [ToCamelCase](https://godoc.org/github.com/huandu/xstrings#ToCamelCase) | `String#camelize` in RoR | [#1](https://github.com/huandu/xstrings/issues/1) | +| [ToKebab](https://godoc.org/github.com/huandu/xstrings#ToKebabCase) | - | [#41](https://github.com/huandu/xstrings/issues/41) | +| [ToPascalCase](https://godoc.org/github.com/huandu/xstrings#ToPascalCase) | - | [#1](https://github.com/huandu/xstrings/issues/1) | +| [ToSnakeCase](https://godoc.org/github.com/huandu/xstrings#ToSnakeCase) | `String#underscore` in RoR | [#1](https://github.com/huandu/xstrings/issues/1) | +| [Translate](https://godoc.org/github.com/huandu/xstrings#Translate) | `str.translate` in Python; `String#tr` in Ruby; `strtr` in PHP; `tr///` in Perl | [#21](https://github.com/huandu/xstrings/issues/21) | +| [Width](https://godoc.org/github.com/huandu/xstrings#Width) | `mb_strwidth` in PHP | [#26](https://github.com/huandu/xstrings/issues/26) | +| [WordCount](https://godoc.org/github.com/huandu/xstrings#WordCount) | `str_word_count` in PHP | [#14](https://github.com/huandu/xstrings/issues/14) | +| [WordSplit](https://godoc.org/github.com/huandu/xstrings#WordSplit) | - | [#14](https://github.com/huandu/xstrings/issues/14) | + +### Package `strings` functions + +_Keep this table sorted by Function in ascending order._ + +| Function | Friends | +| --------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| [Contains](http://golang.org/pkg/strings/#Contains) | `String#include?` in Ruby | +| [ContainsAny](http://golang.org/pkg/strings/#ContainsAny) | - | +| [ContainsRune](http://golang.org/pkg/strings/#ContainsRune) | - | +| [Count](http://golang.org/pkg/strings/#Count) | `str.count` in Python; `substr_count` in PHP | +| [EqualFold](http://golang.org/pkg/strings/#EqualFold) | `stricmp` in PHP; `String#casecmp` in Ruby | +| [Fields](http://golang.org/pkg/strings/#Fields) | `str.split` in Python; `split` in Perl; `String#split` in Ruby | +| [FieldsFunc](http://golang.org/pkg/strings/#FieldsFunc) | - | +| [HasPrefix](http://golang.org/pkg/strings/#HasPrefix) | `str.startswith` in Python; `String#start_with?` in Ruby | +| [HasSuffix](http://golang.org/pkg/strings/#HasSuffix) | `str.endswith` in Python; `String#end_with?` in Ruby | +| [Index](http://golang.org/pkg/strings/#Index) | `str.index` in Python; `String#index` in Ruby; `strpos` in PHP; `index` in Perl | +| [IndexAny](http://golang.org/pkg/strings/#IndexAny) | - | +| [IndexByte](http://golang.org/pkg/strings/#IndexByte) | - | +| [IndexFunc](http://golang.org/pkg/strings/#IndexFunc) | - | +| [IndexRune](http://golang.org/pkg/strings/#IndexRune) | - | +| [Join](http://golang.org/pkg/strings/#Join) | `str.join` in Python; `Array#join` in Ruby; `implode` in PHP; `join` in Perl | +| [LastIndex](http://golang.org/pkg/strings/#LastIndex) | `str.rindex` in Python; `String#rindex`; `strrpos` in PHP; `rindex` in Perl | +| [LastIndexAny](http://golang.org/pkg/strings/#LastIndexAny) | - | +| [LastIndexFunc](http://golang.org/pkg/strings/#LastIndexFunc) | - | +| [Map](http://golang.org/pkg/strings/#Map) | `String#each_codepoint` in Ruby | +| [Repeat](http://golang.org/pkg/strings/#Repeat) | operator `*` in Python and Ruby; `str_repeat` in PHP | +| [Replace](http://golang.org/pkg/strings/#Replace) | `str.replace` in Python; `String#sub` in Ruby; `str_replace` in PHP | +| [Split](http://golang.org/pkg/strings/#Split) | `str.split` in Python; `String#split` in Ruby; `explode` in PHP; `split` in Perl | +| [SplitAfter](http://golang.org/pkg/strings/#SplitAfter) | - | +| [SplitAfterN](http://golang.org/pkg/strings/#SplitAfterN) | - | +| [SplitN](http://golang.org/pkg/strings/#SplitN) | `str.split` in Python; `String#split` in Ruby; `explode` in PHP; `split` in Perl | +| [Title](http://golang.org/pkg/strings/#Title) | `str.title` in Python | +| [ToLower](http://golang.org/pkg/strings/#ToLower) | `str.lower` in Python; `String#downcase` in Ruby; `strtolower` in PHP; `lc` in Perl | +| [ToLowerSpecial](http://golang.org/pkg/strings/#ToLowerSpecial) | - | +| [ToTitle](http://golang.org/pkg/strings/#ToTitle) | - | +| [ToTitleSpecial](http://golang.org/pkg/strings/#ToTitleSpecial) | - | +| [ToUpper](http://golang.org/pkg/strings/#ToUpper) | `str.upper` in Python; `String#upcase` in Ruby; `strtoupper` in PHP; `uc` in Perl | +| [ToUpperSpecial](http://golang.org/pkg/strings/#ToUpperSpecial) | - | +| [Trim](http://golang.org/pkg/strings/#Trim) | `str.strip` in Python; `String#strip` in Ruby; `trim` in PHP | +| [TrimFunc](http://golang.org/pkg/strings/#TrimFunc) | - | +| [TrimLeft](http://golang.org/pkg/strings/#TrimLeft) | `str.lstrip` in Python; `String#lstrip` in Ruby; `ltrim` in PHP | +| [TrimLeftFunc](http://golang.org/pkg/strings/#TrimLeftFunc) | - | +| [TrimPrefix](http://golang.org/pkg/strings/#TrimPrefix) | - | +| [TrimRight](http://golang.org/pkg/strings/#TrimRight) | `str.rstrip` in Python; `String#rstrip` in Ruby; `rtrim` in PHP | +| [TrimRightFunc](http://golang.org/pkg/strings/#TrimRightFunc) | - | +| [TrimSpace](http://golang.org/pkg/strings/#TrimSpace) | `str.strip` in Python; `String#strip` in Ruby; `trim` in PHP | +| [TrimSuffix](http://golang.org/pkg/strings/#TrimSuffix) | `String#chomp` in Ruby; `chomp` in Perl | + +## License + +This library is licensed under MIT license. See LICENSE for details. diff --git a/vendor/github.com/huandu/xstrings/common.go b/vendor/github.com/huandu/xstrings/common.go new file mode 100644 index 000000000..f427cc84e --- /dev/null +++ b/vendor/github.com/huandu/xstrings/common.go @@ -0,0 +1,21 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +package xstrings + +const bufferMaxInitGrowSize = 2048 + +// Lazy initialize a buffer. +func allocBuffer(orig, cur string) *stringBuilder { + output := &stringBuilder{} + maxSize := len(orig) * 4 + + // Avoid to reserve too much memory at once. + if maxSize > bufferMaxInitGrowSize { + maxSize = bufferMaxInitGrowSize + } + + output.Grow(maxSize) + output.WriteString(orig[:len(orig)-len(cur)]) + return output +} diff --git a/vendor/github.com/huandu/xstrings/convert.go b/vendor/github.com/huandu/xstrings/convert.go new file mode 100644 index 000000000..5d8cfee47 --- /dev/null +++ b/vendor/github.com/huandu/xstrings/convert.go @@ -0,0 +1,633 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +package xstrings + +import ( + "math/rand" + "unicode" + "unicode/utf8" +) + +// ToCamelCase is to convert words separated by space, underscore and hyphen to camel case. +// +// Some samples. +// +// "some_words" => "someWords" +// "http_server" => "httpServer" +// "no_https" => "noHttps" +// "_complex__case_" => "_complex_Case_" +// "some words" => "someWords" +// "GOLANG_IS_GREAT" => "golangIsGreat" +func ToCamelCase(str string) string { + return toCamelCase(str, false) +} + +// ToPascalCase is to convert words separated by space, underscore and hyphen to pascal case. +// +// Some samples. +// +// "some_words" => "SomeWords" +// "http_server" => "HttpServer" +// "no_https" => "NoHttps" +// "_complex__case_" => "_Complex_Case_" +// "some words" => "SomeWords" +// "GOLANG_IS_GREAT" => "GolangIsGreat" +func ToPascalCase(str string) string { + return toCamelCase(str, true) +} + +func toCamelCase(str string, isBig bool) string { + if len(str) == 0 { + return "" + } + + buf := &stringBuilder{} + var isFirstRuneUpper bool + var r0, r1 rune + var size int + + // leading connector will appear in output. + for len(str) > 0 { + r0, size = utf8.DecodeRuneInString(str) + str = str[size:] + + if !isConnector(r0) { + isFirstRuneUpper = unicode.IsUpper(r0) + + if isBig { + r0 = unicode.ToUpper(r0) + } else { + r0 = unicode.ToLower(r0) + } + + break + } + + buf.WriteRune(r0) + } + + if len(str) == 0 { + // A special case for a string contains only 1 rune. + if size != 0 { + buf.WriteRune(r0) + } + + return buf.String() + } + + for len(str) > 0 { + r1 = r0 + r0, size = utf8.DecodeRuneInString(str) + str = str[size:] + + if isConnector(r0) && isConnector(r1) { + buf.WriteRune(r1) + continue + } + + if isConnector(r1) { + isFirstRuneUpper = unicode.IsUpper(r0) + r0 = unicode.ToUpper(r0) + } else { + if isFirstRuneUpper { + if unicode.IsUpper(r0) { + r0 = unicode.ToLower(r0) + } else { + isFirstRuneUpper = false + } + } + + buf.WriteRune(r1) + } + } + + if isFirstRuneUpper && !isBig { + r0 = unicode.ToLower(r0) + } + + buf.WriteRune(r0) + return buf.String() +} + +// ToSnakeCase can convert all upper case characters in a string to +// snake case format. +// +// Some samples. +// +// "FirstName" => "first_name" +// "HTTPServer" => "http_server" +// "NoHTTPS" => "no_https" +// "GO_PATH" => "go_path" +// "GO PATH" => "go_path" // space is converted to underscore. +// "GO-PATH" => "go_path" // hyphen is converted to underscore. +// "http2xx" => "http_2xx" // insert an underscore before a number and after an alphabet. +// "HTTP20xOK" => "http_20x_ok" +// "Duration2m3s" => "duration_2m3s" +// "Bld4Floor3rd" => "bld4_floor_3rd" +func ToSnakeCase(str string) string { + return camelCaseToLowerCase(str, '_') +} + +// ToKebabCase can convert all upper case characters in a string to +// kebab case format. +// +// Some samples. +// +// "FirstName" => "first-name" +// "HTTPServer" => "http-server" +// "NoHTTPS" => "no-https" +// "GO_PATH" => "go-path" +// "GO PATH" => "go-path" // space is converted to '-'. +// "GO-PATH" => "go-path" // hyphen is converted to '-'. +// "http2xx" => "http-2xx" // insert an underscore before a number and after an alphabet. +// "HTTP20xOK" => "http-20x-ok" +// "Duration2m3s" => "duration-2m3s" +// "Bld4Floor3rd" => "bld4-floor-3rd" +func ToKebabCase(str string) string { + return camelCaseToLowerCase(str, '-') +} + +func camelCaseToLowerCase(str string, connector rune) string { + if len(str) == 0 { + return "" + } + + buf := &stringBuilder{} + wt, word, remaining := nextWord(str) + + for len(remaining) > 0 { + if wt != connectorWord { + toLower(buf, wt, word, connector) + } + + prev := wt + last := word + wt, word, remaining = nextWord(remaining) + + switch prev { + case numberWord: + for wt == alphabetWord || wt == numberWord { + toLower(buf, wt, word, connector) + wt, word, remaining = nextWord(remaining) + } + + if wt != invalidWord && wt != punctWord && wt != connectorWord { + buf.WriteRune(connector) + } + + case connectorWord: + toLower(buf, prev, last, connector) + + case punctWord: + // nothing. + + default: + if wt != numberWord { + if wt != connectorWord && wt != punctWord { + buf.WriteRune(connector) + } + + break + } + + if len(remaining) == 0 { + break + } + + last := word + wt, word, remaining = nextWord(remaining) + + // consider number as a part of previous word. + // e.g. "Bld4Floor" => "bld4_floor" + if wt != alphabetWord { + toLower(buf, numberWord, last, connector) + + if wt != connectorWord && wt != punctWord { + buf.WriteRune(connector) + } + + break + } + + // if there are some lower case letters following a number, + // add connector before the number. + // e.g. "HTTP2xx" => "http_2xx" + buf.WriteRune(connector) + toLower(buf, numberWord, last, connector) + + for wt == alphabetWord || wt == numberWord { + toLower(buf, wt, word, connector) + wt, word, remaining = nextWord(remaining) + } + + if wt != invalidWord && wt != connectorWord && wt != punctWord { + buf.WriteRune(connector) + } + } + } + + toLower(buf, wt, word, connector) + return buf.String() +} + +func isConnector(r rune) bool { + return r == '-' || r == '_' || unicode.IsSpace(r) +} + +type wordType int + +const ( + invalidWord wordType = iota + numberWord + upperCaseWord + alphabetWord + connectorWord + punctWord + otherWord +) + +func nextWord(str string) (wt wordType, word, remaining string) { + if len(str) == 0 { + return + } + + var offset int + remaining = str + r, size := nextValidRune(remaining, utf8.RuneError) + offset += size + + if r == utf8.RuneError { + wt = invalidWord + word = str[:offset] + remaining = str[offset:] + return + } + + switch { + case isConnector(r): + wt = connectorWord + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if !isConnector(r) { + break + } + + offset += size + remaining = remaining[size:] + } + + case unicode.IsPunct(r): + wt = punctWord + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if !unicode.IsPunct(r) { + break + } + + offset += size + remaining = remaining[size:] + } + + case unicode.IsUpper(r): + wt = upperCaseWord + remaining = remaining[size:] + + if len(remaining) == 0 { + break + } + + r, size = nextValidRune(remaining, r) + + switch { + case unicode.IsUpper(r): + prevSize := size + offset += size + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if !unicode.IsUpper(r) { + break + } + + prevSize = size + offset += size + remaining = remaining[size:] + } + + // it's a bit complex when dealing with a case like "HTTPStatus". + // it's expected to be splitted into "HTTP" and "Status". + // Therefore "S" should be in remaining instead of word. + if len(remaining) > 0 && isAlphabet(r) { + offset -= prevSize + remaining = str[offset:] + } + + case isAlphabet(r): + offset += size + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if !isAlphabet(r) || unicode.IsUpper(r) { + break + } + + offset += size + remaining = remaining[size:] + } + } + + case isAlphabet(r): + wt = alphabetWord + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if !isAlphabet(r) || unicode.IsUpper(r) { + break + } + + offset += size + remaining = remaining[size:] + } + + case unicode.IsNumber(r): + wt = numberWord + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if !unicode.IsNumber(r) { + break + } + + offset += size + remaining = remaining[size:] + } + + default: + wt = otherWord + remaining = remaining[size:] + + for len(remaining) > 0 { + r, size = nextValidRune(remaining, r) + + if size == 0 || isConnector(r) || isAlphabet(r) || unicode.IsNumber(r) || unicode.IsPunct(r) { + break + } + + offset += size + remaining = remaining[size:] + } + } + + word = str[:offset] + return +} + +func nextValidRune(str string, prev rune) (r rune, size int) { + var sz int + + for len(str) > 0 { + r, sz = utf8.DecodeRuneInString(str) + size += sz + + if r != utf8.RuneError { + return + } + + str = str[sz:] + } + + r = prev + return +} + +func toLower(buf *stringBuilder, wt wordType, str string, connector rune) { + buf.Grow(buf.Len() + len(str)) + + if wt != upperCaseWord && wt != connectorWord { + buf.WriteString(str) + return + } + + for len(str) > 0 { + r, size := utf8.DecodeRuneInString(str) + str = str[size:] + + if isConnector(r) { + buf.WriteRune(connector) + } else if unicode.IsUpper(r) { + buf.WriteRune(unicode.ToLower(r)) + } else { + buf.WriteRune(r) + } + } +} + +// SwapCase will swap characters case from upper to lower or lower to upper. +func SwapCase(str string) string { + var r rune + var size int + + buf := &stringBuilder{} + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + + switch { + case unicode.IsUpper(r): + buf.WriteRune(unicode.ToLower(r)) + + case unicode.IsLower(r): + buf.WriteRune(unicode.ToUpper(r)) + + default: + buf.WriteRune(r) + } + + str = str[size:] + } + + return buf.String() +} + +// FirstRuneToUpper converts first rune to upper case if necessary. +func FirstRuneToUpper(str string) string { + if str == "" { + return str + } + + r, size := utf8.DecodeRuneInString(str) + + if !unicode.IsLower(r) { + return str + } + + buf := &stringBuilder{} + buf.WriteRune(unicode.ToUpper(r)) + buf.WriteString(str[size:]) + return buf.String() +} + +// FirstRuneToLower converts first rune to lower case if necessary. +func FirstRuneToLower(str string) string { + if str == "" { + return str + } + + r, size := utf8.DecodeRuneInString(str) + + if !unicode.IsUpper(r) { + return str + } + + buf := &stringBuilder{} + buf.WriteRune(unicode.ToLower(r)) + buf.WriteString(str[size:]) + return buf.String() +} + +// Shuffle randomizes runes in a string and returns the result. +// It uses default random source in `math/rand`. +func Shuffle(str string) string { + if str == "" { + return str + } + + runes := []rune(str) + index := 0 + + for i := len(runes) - 1; i > 0; i-- { + index = rand.Intn(i + 1) + + if i != index { + runes[i], runes[index] = runes[index], runes[i] + } + } + + return string(runes) +} + +// ShuffleSource randomizes runes in a string with given random source. +func ShuffleSource(str string, src rand.Source) string { + if str == "" { + return str + } + + runes := []rune(str) + index := 0 + r := rand.New(src) + + for i := len(runes) - 1; i > 0; i-- { + index = r.Intn(i + 1) + + if i != index { + runes[i], runes[index] = runes[index], runes[i] + } + } + + return string(runes) +} + +// Successor returns the successor to string. +// +// If there is one alphanumeric rune is found in string, increase the rune by 1. +// If increment generates a "carry", the rune to the left of it is incremented. +// This process repeats until there is no carry, adding an additional rune if necessary. +// +// If there is no alphanumeric rune, the rightmost rune will be increased by 1 +// regardless whether the result is a valid rune or not. +// +// Only following characters are alphanumeric. +// - a - z +// - A - Z +// - 0 - 9 +// +// Samples (borrowed from ruby's String#succ document): +// +// "abcd" => "abce" +// "THX1138" => "THX1139" +// "<>" => "<>" +// "1999zzz" => "2000aaa" +// "ZZZ9999" => "AAAA0000" +// "***" => "**+" +func Successor(str string) string { + if str == "" { + return str + } + + var r rune + var i int + carry := ' ' + runes := []rune(str) + l := len(runes) + lastAlphanumeric := l + + for i = l - 1; i >= 0; i-- { + r = runes[i] + + if ('a' <= r && r <= 'y') || + ('A' <= r && r <= 'Y') || + ('0' <= r && r <= '8') { + runes[i]++ + carry = ' ' + lastAlphanumeric = i + break + } + + switch r { + case 'z': + runes[i] = 'a' + carry = 'a' + lastAlphanumeric = i + + case 'Z': + runes[i] = 'A' + carry = 'A' + lastAlphanumeric = i + + case '9': + runes[i] = '0' + carry = '0' + lastAlphanumeric = i + } + } + + // Needs to add one character for carry. + if i < 0 && carry != ' ' { + buf := &stringBuilder{} + buf.Grow(l + 4) // Reserve enough space for write. + + if lastAlphanumeric != 0 { + buf.WriteString(str[:lastAlphanumeric]) + } + + buf.WriteRune(carry) + + for _, r = range runes[lastAlphanumeric:] { + buf.WriteRune(r) + } + + return buf.String() + } + + // No alphanumeric character. Simply increase last rune's value. + if lastAlphanumeric == l { + runes[l-1]++ + } + + return string(runes) +} diff --git a/vendor/github.com/huandu/xstrings/count.go b/vendor/github.com/huandu/xstrings/count.go new file mode 100644 index 000000000..f96e38703 --- /dev/null +++ b/vendor/github.com/huandu/xstrings/count.go @@ -0,0 +1,120 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +package xstrings + +import ( + "unicode" + "unicode/utf8" +) + +// Len returns str's utf8 rune length. +func Len(str string) int { + return utf8.RuneCountInString(str) +} + +// WordCount returns number of words in a string. +// +// Word is defined as a locale dependent string containing alphabetic characters, +// which may also contain but not start with `'` and `-` characters. +func WordCount(str string) int { + var r rune + var size, n int + + inWord := false + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + + switch { + case isAlphabet(r): + if !inWord { + inWord = true + n++ + } + + case inWord && (r == '\'' || r == '-'): + // Still in word. + + default: + inWord = false + } + + str = str[size:] + } + + return n +} + +const minCJKCharacter = '\u3400' + +// Checks r is a letter but not CJK character. +func isAlphabet(r rune) bool { + if !unicode.IsLetter(r) { + return false + } + + switch { + // Quick check for non-CJK character. + case r < minCJKCharacter: + return true + + // Common CJK characters. + case r >= '\u4E00' && r <= '\u9FCC': + return false + + // Rare CJK characters. + case r >= '\u3400' && r <= '\u4D85': + return false + + // Rare and historic CJK characters. + case r >= '\U00020000' && r <= '\U0002B81D': + return false + } + + return true +} + +// Width returns string width in monotype font. +// Multi-byte characters are usually twice the width of single byte characters. +// +// Algorithm comes from `mb_strwidth` in PHP. +// http://php.net/manual/en/function.mb-strwidth.php +func Width(str string) int { + var r rune + var size, n int + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + n += RuneWidth(r) + str = str[size:] + } + + return n +} + +// RuneWidth returns character width in monotype font. +// Multi-byte characters are usually twice the width of single byte characters. +// +// Algorithm comes from `mb_strwidth` in PHP. +// http://php.net/manual/en/function.mb-strwidth.php +func RuneWidth(r rune) int { + switch { + case r == utf8.RuneError || r < '\x20': + return 0 + + case '\x20' <= r && r < '\u2000': + return 1 + + case '\u2000' <= r && r < '\uFF61': + return 2 + + case '\uFF61' <= r && r < '\uFFA0': + return 1 + + case '\uFFA0' <= r: + return 2 + } + + return 0 +} diff --git a/vendor/github.com/huandu/xstrings/doc.go b/vendor/github.com/huandu/xstrings/doc.go new file mode 100644 index 000000000..1a6ef069f --- /dev/null +++ b/vendor/github.com/huandu/xstrings/doc.go @@ -0,0 +1,8 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +// Package xstrings is to provide string algorithms which are useful but not included in `strings` package. +// See project home page for details. https://github.com/huandu/xstrings +// +// Package xstrings assumes all strings are encoded in utf8. +package xstrings diff --git a/vendor/github.com/huandu/xstrings/format.go b/vendor/github.com/huandu/xstrings/format.go new file mode 100644 index 000000000..b32219bbd --- /dev/null +++ b/vendor/github.com/huandu/xstrings/format.go @@ -0,0 +1,173 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +package xstrings + +import ( + "unicode/utf8" +) + +// ExpandTabs can expand tabs ('\t') rune in str to one or more spaces dpending on +// current column and tabSize. +// The column number is reset to zero after each newline ('\n') occurring in the str. +// +// ExpandTabs uses RuneWidth to decide rune's width. +// For example, CJK characters will be treated as two characters. +// +// If tabSize <= 0, ExpandTabs panics with error. +// +// Samples: +// +// ExpandTabs("a\tbc\tdef\tghij\tk", 4) => "a bc def ghij k" +// ExpandTabs("abcdefg\thij\nk\tl", 4) => "abcdefg hij\nk l" +// ExpandTabs("z中\t文\tw", 4) => "z中 文 w" +func ExpandTabs(str string, tabSize int) string { + if tabSize <= 0 { + panic("tab size must be positive") + } + + var r rune + var i, size, column, expand int + var output *stringBuilder + + orig := str + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + + if r == '\t' { + expand = tabSize - column%tabSize + + if output == nil { + output = allocBuffer(orig, str) + } + + for i = 0; i < expand; i++ { + output.WriteRune(' ') + } + + column += expand + } else { + if r == '\n' { + column = 0 + } else { + column += RuneWidth(r) + } + + if output != nil { + output.WriteRune(r) + } + } + + str = str[size:] + } + + if output == nil { + return orig + } + + return output.String() +} + +// LeftJustify returns a string with pad string at right side if str's rune length is smaller than length. +// If str's rune length is larger than length, str itself will be returned. +// +// If pad is an empty string, str will be returned. +// +// Samples: +// +// LeftJustify("hello", 4, " ") => "hello" +// LeftJustify("hello", 10, " ") => "hello " +// LeftJustify("hello", 10, "123") => "hello12312" +func LeftJustify(str string, length int, pad string) string { + l := Len(str) + + if l >= length || pad == "" { + return str + } + + remains := length - l + padLen := Len(pad) + + output := &stringBuilder{} + output.Grow(len(str) + (remains/padLen+1)*len(pad)) + output.WriteString(str) + writePadString(output, pad, padLen, remains) + return output.String() +} + +// RightJustify returns a string with pad string at left side if str's rune length is smaller than length. +// If str's rune length is larger than length, str itself will be returned. +// +// If pad is an empty string, str will be returned. +// +// Samples: +// +// RightJustify("hello", 4, " ") => "hello" +// RightJustify("hello", 10, " ") => " hello" +// RightJustify("hello", 10, "123") => "12312hello" +func RightJustify(str string, length int, pad string) string { + l := Len(str) + + if l >= length || pad == "" { + return str + } + + remains := length - l + padLen := Len(pad) + + output := &stringBuilder{} + output.Grow(len(str) + (remains/padLen+1)*len(pad)) + writePadString(output, pad, padLen, remains) + output.WriteString(str) + return output.String() +} + +// Center returns a string with pad string at both side if str's rune length is smaller than length. +// If str's rune length is larger than length, str itself will be returned. +// +// If pad is an empty string, str will be returned. +// +// Samples: +// +// Center("hello", 4, " ") => "hello" +// Center("hello", 10, " ") => " hello " +// Center("hello", 10, "123") => "12hello123" +func Center(str string, length int, pad string) string { + l := Len(str) + + if l >= length || pad == "" { + return str + } + + remains := length - l + padLen := Len(pad) + + output := &stringBuilder{} + output.Grow(len(str) + (remains/padLen+1)*len(pad)) + writePadString(output, pad, padLen, remains/2) + output.WriteString(str) + writePadString(output, pad, padLen, (remains+1)/2) + return output.String() +} + +func writePadString(output *stringBuilder, pad string, padLen, remains int) { + var r rune + var size int + + repeats := remains / padLen + + for i := 0; i < repeats; i++ { + output.WriteString(pad) + } + + remains = remains % padLen + + if remains != 0 { + for i := 0; i < remains; i++ { + r, size = utf8.DecodeRuneInString(pad) + output.WriteRune(r) + pad = pad[size:] + } + } +} diff --git a/vendor/github.com/huandu/xstrings/manipulate.go b/vendor/github.com/huandu/xstrings/manipulate.go new file mode 100644 index 000000000..ab42fe0fe --- /dev/null +++ b/vendor/github.com/huandu/xstrings/manipulate.go @@ -0,0 +1,220 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +package xstrings + +import ( + "strings" + "unicode/utf8" +) + +// Reverse a utf8 encoded string. +func Reverse(str string) string { + var size int + + tail := len(str) + buf := make([]byte, tail) + s := buf + + for len(str) > 0 { + _, size = utf8.DecodeRuneInString(str) + tail -= size + s = append(s[:tail], []byte(str[:size])...) + str = str[size:] + } + + return string(buf) +} + +// Slice a string by rune. +// +// Start must satisfy 0 <= start <= rune length. +// +// End can be positive, zero or negative. +// If end >= 0, start and end must satisfy start <= end <= rune length. +// If end < 0, it means slice to the end of string. +// +// Otherwise, Slice will panic as out of range. +func Slice(str string, start, end int) string { + var size, startPos, endPos int + + origin := str + + if start < 0 || end > len(str) || (end >= 0 && start > end) { + panic("out of range") + } + + if end >= 0 { + end -= start + } + + for start > 0 && len(str) > 0 { + _, size = utf8.DecodeRuneInString(str) + start-- + startPos += size + str = str[size:] + } + + if end < 0 { + return origin[startPos:] + } + + endPos = startPos + + for end > 0 && len(str) > 0 { + _, size = utf8.DecodeRuneInString(str) + end-- + endPos += size + str = str[size:] + } + + if len(str) == 0 && (start > 0 || end > 0) { + panic("out of range") + } + + return origin[startPos:endPos] +} + +// Partition splits a string by sep into three parts. +// The return value is a slice of strings with head, match and tail. +// +// If str contains sep, for example "hello" and "l", Partition returns +// +// "he", "l", "lo" +// +// If str doesn't contain sep, for example "hello" and "x", Partition returns +// +// "hello", "", "" +func Partition(str, sep string) (head, match, tail string) { + index := strings.Index(str, sep) + + if index == -1 { + head = str + return + } + + head = str[:index] + match = str[index : index+len(sep)] + tail = str[index+len(sep):] + return +} + +// LastPartition splits a string by last instance of sep into three parts. +// The return value is a slice of strings with head, match and tail. +// +// If str contains sep, for example "hello" and "l", LastPartition returns +// +// "hel", "l", "o" +// +// If str doesn't contain sep, for example "hello" and "x", LastPartition returns +// +// "", "", "hello" +func LastPartition(str, sep string) (head, match, tail string) { + index := strings.LastIndex(str, sep) + + if index == -1 { + tail = str + return + } + + head = str[:index] + match = str[index : index+len(sep)] + tail = str[index+len(sep):] + return +} + +// Insert src into dst at given rune index. +// Index is counted by runes instead of bytes. +// +// If index is out of range of dst, panic with out of range. +func Insert(dst, src string, index int) string { + return Slice(dst, 0, index) + src + Slice(dst, index, -1) +} + +// Scrub scrubs invalid utf8 bytes with repl string. +// Adjacent invalid bytes are replaced only once. +func Scrub(str, repl string) string { + var buf *stringBuilder + var r rune + var size, pos int + var hasError bool + + origin := str + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + + if r == utf8.RuneError { + if !hasError { + if buf == nil { + buf = &stringBuilder{} + } + + buf.WriteString(origin[:pos]) + hasError = true + } + } else if hasError { + hasError = false + buf.WriteString(repl) + + origin = origin[pos:] + pos = 0 + } + + pos += size + str = str[size:] + } + + if buf != nil { + buf.WriteString(origin) + return buf.String() + } + + // No invalid byte. + return origin +} + +// WordSplit splits a string into words. Returns a slice of words. +// If there is no word in a string, return nil. +// +// Word is defined as a locale dependent string containing alphabetic characters, +// which may also contain but not start with `'` and `-` characters. +func WordSplit(str string) []string { + var word string + var words []string + var r rune + var size, pos int + + inWord := false + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + + switch { + case isAlphabet(r): + if !inWord { + inWord = true + word = str + pos = 0 + } + + case inWord && (r == '\'' || r == '-'): + // Still in word. + + default: + if inWord { + inWord = false + words = append(words, word[:pos]) + } + } + + pos += size + str = str[size:] + } + + if inWord { + words = append(words, word[:pos]) + } + + return words +} diff --git a/vendor/github.com/huandu/xstrings/stringbuilder.go b/vendor/github.com/huandu/xstrings/stringbuilder.go new file mode 100644 index 000000000..06812fea0 --- /dev/null +++ b/vendor/github.com/huandu/xstrings/stringbuilder.go @@ -0,0 +1,8 @@ +//go:build go1.10 +// +build go1.10 + +package xstrings + +import "strings" + +type stringBuilder = strings.Builder diff --git a/vendor/github.com/huandu/xstrings/stringbuilder_go110.go b/vendor/github.com/huandu/xstrings/stringbuilder_go110.go new file mode 100644 index 000000000..ccaa5aedd --- /dev/null +++ b/vendor/github.com/huandu/xstrings/stringbuilder_go110.go @@ -0,0 +1,10 @@ +//go:build !go1.10 +// +build !go1.10 + +package xstrings + +import "bytes" + +type stringBuilder struct { + bytes.Buffer +} diff --git a/vendor/github.com/huandu/xstrings/translate.go b/vendor/github.com/huandu/xstrings/translate.go new file mode 100644 index 000000000..1fac6a00b --- /dev/null +++ b/vendor/github.com/huandu/xstrings/translate.go @@ -0,0 +1,552 @@ +// Copyright 2015 Huan Du. All rights reserved. +// Licensed under the MIT license that can be found in the LICENSE file. + +package xstrings + +import ( + "unicode" + "unicode/utf8" +) + +type runeRangeMap struct { + FromLo rune // Lower bound of range map. + FromHi rune // An inclusive higher bound of range map. + ToLo rune + ToHi rune +} + +type runeDict struct { + Dict [unicode.MaxASCII + 1]rune +} + +type runeMap map[rune]rune + +// Translator can translate string with pre-compiled from and to patterns. +// If a from/to pattern pair needs to be used more than once, it's recommended +// to create a Translator and reuse it. +type Translator struct { + quickDict *runeDict // A quick dictionary to look up rune by index. Only available for latin runes. + runeMap runeMap // Rune map for translation. + ranges []*runeRangeMap // Ranges of runes. + mappedRune rune // If mappedRune >= 0, all matched runes are translated to the mappedRune. + reverted bool // If to pattern is empty, all matched characters will be deleted. + hasPattern bool +} + +// NewTranslator creates new Translator through a from/to pattern pair. +func NewTranslator(from, to string) *Translator { + tr := &Translator{} + + if from == "" { + return tr + } + + reverted := from[0] == '^' + deletion := len(to) == 0 + + if reverted { + from = from[1:] + } + + var fromStart, fromEnd, fromRangeStep rune + var toStart, toEnd, toRangeStep rune + var fromRangeSize, toRangeSize rune + var singleRunes []rune + + // Update the to rune range. + updateRange := func() { + // No more rune to read in the to rune pattern. + if toEnd == utf8.RuneError { + return + } + + if toRangeStep == 0 { + to, toStart, toEnd, toRangeStep = nextRuneRange(to, toEnd) + return + } + + // Current range is not empty. Consume 1 rune from start. + if toStart != toEnd { + toStart += toRangeStep + return + } + + // No more rune. Repeat the last rune. + if to == "" { + toEnd = utf8.RuneError + return + } + + // Both start and end are used. Read two more runes from the to pattern. + to, toStart, toEnd, toRangeStep = nextRuneRange(to, utf8.RuneError) + } + + if deletion { + toStart = utf8.RuneError + toEnd = utf8.RuneError + } else { + // If from pattern is reverted, only the last rune in the to pattern will be used. + if reverted { + var size int + + for len(to) > 0 { + toStart, size = utf8.DecodeRuneInString(to) + to = to[size:] + } + + toEnd = utf8.RuneError + } else { + to, toStart, toEnd, toRangeStep = nextRuneRange(to, utf8.RuneError) + } + } + + fromEnd = utf8.RuneError + + for len(from) > 0 { + from, fromStart, fromEnd, fromRangeStep = nextRuneRange(from, fromEnd) + + // fromStart is a single character. Just map it with a rune in the to pattern. + if fromRangeStep == 0 { + singleRunes = tr.addRune(fromStart, toStart, singleRunes) + updateRange() + continue + } + + for toEnd != utf8.RuneError && fromStart != fromEnd { + // If mapped rune is a single character instead of a range, simply shift first + // rune in the range. + if toRangeStep == 0 { + singleRunes = tr.addRune(fromStart, toStart, singleRunes) + updateRange() + fromStart += fromRangeStep + continue + } + + fromRangeSize = (fromEnd - fromStart) * fromRangeStep + toRangeSize = (toEnd - toStart) * toRangeStep + + // Not enough runes in the to pattern. Need to read more. + if fromRangeSize > toRangeSize { + fromStart, toStart = tr.addRuneRange(fromStart, fromStart+toRangeSize*fromRangeStep, toStart, toEnd, singleRunes) + fromStart += fromRangeStep + updateRange() + + // Edge case: If fromRangeSize == toRangeSize + 1, the last fromStart value needs be considered + // as a single rune. + if fromStart == fromEnd { + singleRunes = tr.addRune(fromStart, toStart, singleRunes) + updateRange() + } + + continue + } + + fromStart, toStart = tr.addRuneRange(fromStart, fromEnd, toStart, toStart+fromRangeSize*toRangeStep, singleRunes) + updateRange() + break + } + + if fromStart == fromEnd { + fromEnd = utf8.RuneError + continue + } + + _, toStart = tr.addRuneRange(fromStart, fromEnd, toStart, toStart, singleRunes) + fromEnd = utf8.RuneError + } + + if fromEnd != utf8.RuneError { + tr.addRune(fromEnd, toStart, singleRunes) + } + + tr.reverted = reverted + tr.mappedRune = -1 + tr.hasPattern = true + + // Translate RuneError only if in deletion or reverted mode. + if deletion || reverted { + tr.mappedRune = toStart + } + + return tr +} + +func (tr *Translator) addRune(from, to rune, singleRunes []rune) []rune { + if from <= unicode.MaxASCII { + if tr.quickDict == nil { + tr.quickDict = &runeDict{} + } + + tr.quickDict.Dict[from] = to + } else { + if tr.runeMap == nil { + tr.runeMap = make(runeMap) + } + + tr.runeMap[from] = to + } + + singleRunes = append(singleRunes, from) + return singleRunes +} + +func (tr *Translator) addRuneRange(fromLo, fromHi, toLo, toHi rune, singleRunes []rune) (rune, rune) { + var r rune + var rrm *runeRangeMap + + if fromLo < fromHi { + rrm = &runeRangeMap{ + FromLo: fromLo, + FromHi: fromHi, + ToLo: toLo, + ToHi: toHi, + } + } else { + rrm = &runeRangeMap{ + FromLo: fromHi, + FromHi: fromLo, + ToLo: toHi, + ToHi: toLo, + } + } + + // If there is any single rune conflicts with this rune range, clear single rune record. + for _, r = range singleRunes { + if rrm.FromLo <= r && r <= rrm.FromHi { + if r <= unicode.MaxASCII { + tr.quickDict.Dict[r] = 0 + } else { + delete(tr.runeMap, r) + } + } + } + + tr.ranges = append(tr.ranges, rrm) + return fromHi, toHi +} + +func nextRuneRange(str string, last rune) (remaining string, start, end rune, rangeStep rune) { + var r rune + var size int + + remaining = str + escaping := false + isRange := false + + for len(remaining) > 0 { + r, size = utf8.DecodeRuneInString(remaining) + remaining = remaining[size:] + + // Parse special characters. + if !escaping { + if r == '\\' { + escaping = true + continue + } + + if r == '-' { + // Ignore slash at beginning of string. + if last == utf8.RuneError { + continue + } + + start = last + isRange = true + continue + } + } + + escaping = false + + if last != utf8.RuneError { + // This is a range which start and end are the same. + // Considier it as a normal character. + if isRange && last == r { + isRange = false + continue + } + + start = last + end = r + + if isRange { + if start < end { + rangeStep = 1 + } else { + rangeStep = -1 + } + } + + return + } + + last = r + } + + start = last + end = utf8.RuneError + return +} + +// Translate str with a from/to pattern pair. +// +// See comment in Translate function for usage and samples. +func (tr *Translator) Translate(str string) string { + if !tr.hasPattern || str == "" { + return str + } + + var r rune + var size int + var needTr bool + + orig := str + + var output *stringBuilder + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + r, needTr = tr.TranslateRune(r) + + if needTr && output == nil { + output = allocBuffer(orig, str) + } + + if r != utf8.RuneError && output != nil { + output.WriteRune(r) + } + + str = str[size:] + } + + // No character is translated. + if output == nil { + return orig + } + + return output.String() +} + +// TranslateRune return translated rune and true if r matches the from pattern. +// If r doesn't match the pattern, original r is returned and translated is false. +func (tr *Translator) TranslateRune(r rune) (result rune, translated bool) { + switch { + case tr.quickDict != nil: + if r <= unicode.MaxASCII { + result = tr.quickDict.Dict[r] + + if result != 0 { + translated = true + + if tr.mappedRune >= 0 { + result = tr.mappedRune + } + + break + } + } + + fallthrough + + case tr.runeMap != nil: + var ok bool + + if result, ok = tr.runeMap[r]; ok { + translated = true + + if tr.mappedRune >= 0 { + result = tr.mappedRune + } + + break + } + + fallthrough + + default: + var rrm *runeRangeMap + ranges := tr.ranges + + for i := len(ranges) - 1; i >= 0; i-- { + rrm = ranges[i] + + if rrm.FromLo <= r && r <= rrm.FromHi { + translated = true + + if tr.mappedRune >= 0 { + result = tr.mappedRune + break + } + + if rrm.ToLo < rrm.ToHi { + result = rrm.ToLo + r - rrm.FromLo + } else if rrm.ToLo > rrm.ToHi { + // ToHi can be smaller than ToLo if range is from higher to lower. + result = rrm.ToLo - r + rrm.FromLo + } else { + result = rrm.ToLo + } + + break + } + } + } + + if tr.reverted { + if !translated { + result = tr.mappedRune + } + + translated = !translated + } + + if !translated { + result = r + } + + return +} + +// HasPattern returns true if Translator has one pattern at least. +func (tr *Translator) HasPattern() bool { + return tr.hasPattern +} + +// Translate str with the characters defined in from replaced by characters defined in to. +// +// From and to are patterns representing a set of characters. Pattern is defined as following. +// +// Special characters: +// +// 1. '-' means a range of runes, e.g. +// "a-z" means all characters from 'a' to 'z' inclusive; +// "z-a" means all characters from 'z' to 'a' inclusive. +// 2. '^' as first character means a set of all runes excepted listed, e.g. +// "^a-z" means all characters except 'a' to 'z' inclusive. +// 3. '\' escapes special characters. +// +// Normal character represents itself, e.g. "abc" is a set including 'a', 'b' and 'c'. +// +// Translate will try to find a 1:1 mapping from from to to. +// If to is smaller than from, last rune in to will be used to map "out of range" characters in from. +// +// Note that '^' only works in the from pattern. It will be considered as a normal character in the to pattern. +// +// If the to pattern is an empty string, Translate works exactly the same as Delete. +// +// Samples: +// +// Translate("hello", "aeiou", "12345") => "h2ll4" +// Translate("hello", "a-z", "A-Z") => "HELLO" +// Translate("hello", "z-a", "a-z") => "svool" +// Translate("hello", "aeiou", "*") => "h*ll*" +// Translate("hello", "^l", "*") => "**ll*" +// Translate("hello ^ world", `\^lo`, "*") => "he*** * w*r*d" +func Translate(str, from, to string) string { + tr := NewTranslator(from, to) + return tr.Translate(str) +} + +// Delete runes in str matching the pattern. +// Pattern is defined in Translate function. +// +// Samples: +// +// Delete("hello", "aeiou") => "hll" +// Delete("hello", "a-k") => "llo" +// Delete("hello", "^a-k") => "he" +func Delete(str, pattern string) string { + tr := NewTranslator(pattern, "") + return tr.Translate(str) +} + +// Count how many runes in str match the pattern. +// Pattern is defined in Translate function. +// +// Samples: +// +// Count("hello", "aeiou") => 3 +// Count("hello", "a-k") => 3 +// Count("hello", "^a-k") => 2 +func Count(str, pattern string) int { + if pattern == "" || str == "" { + return 0 + } + + var r rune + var size int + var matched bool + + tr := NewTranslator(pattern, "") + cnt := 0 + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + str = str[size:] + + if _, matched = tr.TranslateRune(r); matched { + cnt++ + } + } + + return cnt +} + +// Squeeze deletes adjacent repeated runes in str. +// If pattern is not empty, only runes matching the pattern will be squeezed. +// +// Samples: +// +// Squeeze("hello", "") => "helo" +// Squeeze("hello", "m-z") => "hello" +// Squeeze("hello world", " ") => "hello world" +func Squeeze(str, pattern string) string { + var last, r rune + var size int + var skipSqueeze, matched bool + var tr *Translator + var output *stringBuilder + + orig := str + last = -1 + + if len(pattern) > 0 { + tr = NewTranslator(pattern, "") + } + + for len(str) > 0 { + r, size = utf8.DecodeRuneInString(str) + + // Need to squeeze the str. + if last == r && !skipSqueeze { + if tr != nil { + if _, matched = tr.TranslateRune(r); !matched { + skipSqueeze = true + } + } + + if output == nil { + output = allocBuffer(orig, str) + } + + if skipSqueeze { + output.WriteRune(r) + } + } else { + if output != nil { + output.WriteRune(r) + } + + last = r + skipSqueeze = false + } + + str = str[size:] + } + + if output == nil { + return orig + } + + return output.String() +} diff --git a/vendor/github.com/jmoiron/sqlx/.gitignore b/vendor/github.com/jmoiron/sqlx/.gitignore new file mode 100644 index 000000000..b2be23c87 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/.gitignore @@ -0,0 +1,25 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test +.idea + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +tags +environ diff --git a/vendor/github.com/jmoiron/sqlx/LICENSE b/vendor/github.com/jmoiron/sqlx/LICENSE new file mode 100644 index 000000000..0d31edfa7 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/LICENSE @@ -0,0 +1,23 @@ + Copyright (c) 2013, Jason Moiron + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + diff --git a/vendor/github.com/jmoiron/sqlx/Makefile b/vendor/github.com/jmoiron/sqlx/Makefile new file mode 100644 index 000000000..448b9ddd9 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/Makefile @@ -0,0 +1,30 @@ +.ONESHELL: +SHELL = /bin/sh +.SHELLFLAGS = -ec + +BASE_PACKAGE := github.com/jmoiron/sqlx + +tooling: + go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 + go install golang.org/x/vuln/cmd/govulncheck@v1.0.4 + go install golang.org/x/tools/cmd/goimports@v0.20.0 + +has-changes: + git diff --exit-code --quiet HEAD -- + +lint: + go vet ./... + staticcheck -checks=all ./... + +fmt: + go list -f '{{.Dir}}' ./... | xargs -I {} goimports -local $(BASE_PACKAGE) -w {} + +vuln-check: + govulncheck ./... + +test-race: + go test -v -race -count=1 ./... + +update-dependencies: + go get -u -t -v ./... + go mod tidy diff --git a/vendor/github.com/jmoiron/sqlx/README.md b/vendor/github.com/jmoiron/sqlx/README.md new file mode 100644 index 000000000..5bfd231a1 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/README.md @@ -0,0 +1,213 @@ +# sqlx + +[![CircleCI](https://dl.circleci.com/status-badge/img/gh/jmoiron/sqlx/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/jmoiron/sqlx/tree/master) [![Coverage Status](https://coveralls.io/repos/github/jmoiron/sqlx/badge.svg?branch=master)](https://coveralls.io/github/jmoiron/sqlx?branch=master) [![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/jmoiron/sqlx) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/jmoiron/sqlx/master/LICENSE) + +sqlx is a library which provides a set of extensions on go's standard +`database/sql` library. The sqlx versions of `sql.DB`, `sql.TX`, `sql.Stmt`, +et al. all leave the underlying interfaces untouched, so that their interfaces +are a superset on the standard ones. This makes it relatively painless to +integrate existing codebases using database/sql with sqlx. + +Major additional concepts are: + +* Marshal rows into structs (with embedded struct support), maps, and slices +* Named parameter support including prepared statements +* `Get` and `Select` to go quickly from query to struct/slice + +In addition to the [godoc API documentation](http://godoc.org/github.com/jmoiron/sqlx), +there is also some [user documentation](http://jmoiron.github.io/sqlx/) that +explains how to use `database/sql` along with sqlx. + +## Recent Changes + +1.3.0: + +* `sqlx.DB.Connx(context.Context) *sqlx.Conn` +* `sqlx.BindDriver(driverName, bindType)` +* support for `[]map[string]interface{}` to do "batch" insertions +* allocation & perf improvements for `sqlx.In` + +DB.Connx returns an `sqlx.Conn`, which is an `sql.Conn`-alike consistent with +sqlx's wrapping of other types. + +`BindDriver` allows users to control the bindvars that sqlx will use for drivers, +and add new drivers at runtime. This results in a very slight performance hit +when resolving the driver into a bind type (~40ns per call), but it allows users +to specify what bindtype their driver uses even when sqlx has not been updated +to know about it by default. + +### Backwards Compatibility + +Compatibility with the most recent two versions of Go is a requirement for any +new changes. Compatibility beyond that is not guaranteed. + +Versioning is done with Go modules. Breaking changes (eg. removing deprecated API) +will get major version number bumps. + +## install + + go get github.com/jmoiron/sqlx + +## issues + +Row headers can be ambiguous (`SELECT 1 AS a, 2 AS a`), and the result of +`Columns()` does not fully qualify column names in queries like: + +```sql +SELECT a.id, a.name, b.id, b.name FROM foos AS a JOIN foos AS b ON a.parent = b.id; +``` + +making a struct or map destination ambiguous. Use `AS` in your queries +to give columns distinct names, `rows.Scan` to scan them manually, or +`SliceScan` to get a slice of results. + +## usage + +Below is an example which shows some common use cases for sqlx. Check +[sqlx_test.go](https://github.com/jmoiron/sqlx/blob/master/sqlx_test.go) for more +usage. + + +```go +package main + +import ( + "database/sql" + "fmt" + "log" + + _ "github.com/lib/pq" + "github.com/jmoiron/sqlx" +) + +var schema = ` +CREATE TABLE person ( + first_name text, + last_name text, + email text +); + +CREATE TABLE place ( + country text, + city text NULL, + telcode integer +)` + +type Person struct { + FirstName string `db:"first_name"` + LastName string `db:"last_name"` + Email string +} + +type Place struct { + Country string + City sql.NullString + TelCode int +} + +func main() { + // this Pings the database trying to connect + // use sqlx.Open() for sql.Open() semantics + db, err := sqlx.Connect("postgres", "user=foo dbname=bar sslmode=disable") + if err != nil { + log.Fatalln(err) + } + + // exec the schema or fail; multi-statement Exec behavior varies between + // database drivers; pq will exec them all, sqlite3 won't, ymmv + db.MustExec(schema) + + tx := db.MustBegin() + tx.MustExec("INSERT INTO person (first_name, last_name, email) VALUES ($1, $2, $3)", "Jason", "Moiron", "jmoiron@jmoiron.net") + tx.MustExec("INSERT INTO person (first_name, last_name, email) VALUES ($1, $2, $3)", "John", "Doe", "johndoeDNE@gmail.net") + tx.MustExec("INSERT INTO place (country, city, telcode) VALUES ($1, $2, $3)", "United States", "New York", "1") + tx.MustExec("INSERT INTO place (country, telcode) VALUES ($1, $2)", "Hong Kong", "852") + tx.MustExec("INSERT INTO place (country, telcode) VALUES ($1, $2)", "Singapore", "65") + // Named queries can use structs, so if you have an existing struct (i.e. person := &Person{}) that you have populated, you can pass it in as &person + tx.NamedExec("INSERT INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", &Person{"Jane", "Citizen", "jane.citzen@example.com"}) + tx.Commit() + + // Query the database, storing results in a []Person (wrapped in []interface{}) + people := []Person{} + db.Select(&people, "SELECT * FROM person ORDER BY first_name ASC") + jason, john := people[0], people[1] + + fmt.Printf("%#v\n%#v", jason, john) + // Person{FirstName:"Jason", LastName:"Moiron", Email:"jmoiron@jmoiron.net"} + // Person{FirstName:"John", LastName:"Doe", Email:"johndoeDNE@gmail.net"} + + // You can also get a single result, a la QueryRow + jason = Person{} + err = db.Get(&jason, "SELECT * FROM person WHERE first_name=$1", "Jason") + fmt.Printf("%#v\n", jason) + // Person{FirstName:"Jason", LastName:"Moiron", Email:"jmoiron@jmoiron.net"} + + // if you have null fields and use SELECT *, you must use sql.Null* in your struct + places := []Place{} + err = db.Select(&places, "SELECT * FROM place ORDER BY telcode ASC") + if err != nil { + fmt.Println(err) + return + } + usa, singsing, honkers := places[0], places[1], places[2] + + fmt.Printf("%#v\n%#v\n%#v\n", usa, singsing, honkers) + // Place{Country:"United States", City:sql.NullString{String:"New York", Valid:true}, TelCode:1} + // Place{Country:"Singapore", City:sql.NullString{String:"", Valid:false}, TelCode:65} + // Place{Country:"Hong Kong", City:sql.NullString{String:"", Valid:false}, TelCode:852} + + // Loop through rows using only one struct + place := Place{} + rows, err := db.Queryx("SELECT * FROM place") + for rows.Next() { + err := rows.StructScan(&place) + if err != nil { + log.Fatalln(err) + } + fmt.Printf("%#v\n", place) + } + // Place{Country:"United States", City:sql.NullString{String:"New York", Valid:true}, TelCode:1} + // Place{Country:"Hong Kong", City:sql.NullString{String:"", Valid:false}, TelCode:852} + // Place{Country:"Singapore", City:sql.NullString{String:"", Valid:false}, TelCode:65} + + // Named queries, using `:name` as the bindvar. Automatic bindvar support + // which takes into account the dbtype based on the driverName on sqlx.Open/Connect + _, err = db.NamedExec(`INSERT INTO person (first_name,last_name,email) VALUES (:first,:last,:email)`, + map[string]interface{}{ + "first": "Bin", + "last": "Smuth", + "email": "bensmith@allblacks.nz", + }) + + // Selects Mr. Smith from the database + rows, err = db.NamedQuery(`SELECT * FROM person WHERE first_name=:fn`, map[string]interface{}{"fn": "Bin"}) + + // Named queries can also use structs. Their bind names follow the same rules + // as the name -> db mapping, so struct fields are lowercased and the `db` tag + // is taken into consideration. + rows, err = db.NamedQuery(`SELECT * FROM person WHERE first_name=:first_name`, jason) + + + // batch insert + + // batch insert with structs + personStructs := []Person{ + {FirstName: "Ardie", LastName: "Savea", Email: "asavea@ab.co.nz"}, + {FirstName: "Sonny Bill", LastName: "Williams", Email: "sbw@ab.co.nz"}, + {FirstName: "Ngani", LastName: "Laumape", Email: "nlaumape@ab.co.nz"}, + } + + _, err = db.NamedExec(`INSERT INTO person (first_name, last_name, email) + VALUES (:first_name, :last_name, :email)`, personStructs) + + // batch insert with maps + personMaps := []map[string]interface{}{ + {"first_name": "Ardie", "last_name": "Savea", "email": "asavea@ab.co.nz"}, + {"first_name": "Sonny Bill", "last_name": "Williams", "email": "sbw@ab.co.nz"}, + {"first_name": "Ngani", "last_name": "Laumape", "email": "nlaumape@ab.co.nz"}, + } + + _, err = db.NamedExec(`INSERT INTO person (first_name, last_name, email) + VALUES (:first_name, :last_name, :email)`, personMaps) +} +``` diff --git a/vendor/github.com/jmoiron/sqlx/bind.go b/vendor/github.com/jmoiron/sqlx/bind.go new file mode 100644 index 000000000..ec0da4e72 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/bind.go @@ -0,0 +1,265 @@ +package sqlx + +import ( + "bytes" + "database/sql/driver" + "errors" + "reflect" + "strconv" + "strings" + "sync" + + "github.com/jmoiron/sqlx/reflectx" +) + +// Bindvar types supported by Rebind, BindMap and BindStruct. +const ( + UNKNOWN = iota + QUESTION + DOLLAR + NAMED + AT +) + +var defaultBinds = map[int][]string{ + DOLLAR: []string{"postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql", "nrpostgres", "cockroach"}, + QUESTION: []string{"mysql", "sqlite3", "nrmysql", "nrsqlite3"}, + NAMED: []string{"oci8", "ora", "goracle", "godror"}, + AT: []string{"sqlserver"}, +} + +var binds sync.Map + +func init() { + for bind, drivers := range defaultBinds { + for _, driver := range drivers { + BindDriver(driver, bind) + } + } + +} + +// BindType returns the bindtype for a given database given a drivername. +func BindType(driverName string) int { + itype, ok := binds.Load(driverName) + if !ok { + return UNKNOWN + } + return itype.(int) +} + +// BindDriver sets the BindType for driverName to bindType. +func BindDriver(driverName string, bindType int) { + binds.Store(driverName, bindType) +} + +// FIXME: this should be able to be tolerant of escaped ?'s in queries without +// losing much speed, and should be to avoid confusion. + +// Rebind a query from the default bindtype (QUESTION) to the target bindtype. +func Rebind(bindType int, query string) string { + switch bindType { + case QUESTION, UNKNOWN: + return query + } + + // Add space enough for 10 params before we have to allocate + rqb := make([]byte, 0, len(query)+10) + + var i, j int + + for i = strings.Index(query, "?"); i != -1; i = strings.Index(query, "?") { + rqb = append(rqb, query[:i]...) + + switch bindType { + case DOLLAR: + rqb = append(rqb, '$') + case NAMED: + rqb = append(rqb, ':', 'a', 'r', 'g') + case AT: + rqb = append(rqb, '@', 'p') + } + + j++ + rqb = strconv.AppendInt(rqb, int64(j), 10) + + query = query[i+1:] + } + + return string(append(rqb, query...)) +} + +// Experimental implementation of Rebind which uses a bytes.Buffer. The code is +// much simpler and should be more resistant to odd unicode, but it is twice as +// slow. Kept here for benchmarking purposes and to possibly replace Rebind if +// problems arise with its somewhat naive handling of unicode. +func rebindBuff(bindType int, query string) string { + if bindType != DOLLAR { + return query + } + + b := make([]byte, 0, len(query)) + rqb := bytes.NewBuffer(b) + j := 1 + for _, r := range query { + if r == '?' { + rqb.WriteRune('$') + rqb.WriteString(strconv.Itoa(j)) + j++ + } else { + rqb.WriteRune(r) + } + } + + return rqb.String() +} + +func asSliceForIn(i interface{}) (v reflect.Value, ok bool) { + if i == nil { + return reflect.Value{}, false + } + + v = reflect.ValueOf(i) + t := reflectx.Deref(v.Type()) + + // Only expand slices + if t.Kind() != reflect.Slice { + return reflect.Value{}, false + } + + // []byte is a driver.Value type so it should not be expanded + if t == reflect.TypeOf([]byte{}) { + return reflect.Value{}, false + + } + + return v, true +} + +// In expands slice values in args, returning the modified query string +// and a new arg list that can be executed by a database. The `query` should +// use the `?` bindVar. The return value uses the `?` bindVar. +func In(query string, args ...interface{}) (string, []interface{}, error) { + // argMeta stores reflect.Value and length for slices and + // the value itself for non-slice arguments + type argMeta struct { + v reflect.Value + i interface{} + length int + } + + var flatArgsCount int + var anySlices bool + + var stackMeta [32]argMeta + + var meta []argMeta + if len(args) <= len(stackMeta) { + meta = stackMeta[:len(args)] + } else { + meta = make([]argMeta, len(args)) + } + + for i, arg := range args { + if a, ok := arg.(driver.Valuer); ok { + var err error + arg, err = a.Value() + if err != nil { + return "", nil, err + } + } + + if v, ok := asSliceForIn(arg); ok { + meta[i].length = v.Len() + meta[i].v = v + + anySlices = true + flatArgsCount += meta[i].length + + if meta[i].length == 0 { + return "", nil, errors.New("empty slice passed to 'in' query") + } + } else { + meta[i].i = arg + flatArgsCount++ + } + } + + // don't do any parsing if there aren't any slices; note that this means + // some errors that we might have caught below will not be returned. + if !anySlices { + return query, args, nil + } + + newArgs := make([]interface{}, 0, flatArgsCount) + + var buf strings.Builder + buf.Grow(len(query) + len(", ?")*flatArgsCount) + + var arg, offset int + + for i := strings.IndexByte(query[offset:], '?'); i != -1; i = strings.IndexByte(query[offset:], '?') { + if arg >= len(meta) { + // if an argument wasn't passed, lets return an error; this is + // not actually how database/sql Exec/Query works, but since we are + // creating an argument list programmatically, we want to be able + // to catch these programmer errors earlier. + return "", nil, errors.New("number of bindVars exceeds arguments") + } + + argMeta := meta[arg] + arg++ + + // not a slice, continue. + // our questionmark will either be written before the next expansion + // of a slice or after the loop when writing the rest of the query + if argMeta.length == 0 { + offset = offset + i + 1 + newArgs = append(newArgs, argMeta.i) + continue + } + + // write everything up to and including our ? character + buf.WriteString(query[:offset+i+1]) + + for si := 1; si < argMeta.length; si++ { + buf.WriteString(", ?") + } + + newArgs = appendReflectSlice(newArgs, argMeta.v, argMeta.length) + + // slice the query and reset the offset. this avoids some bookkeeping for + // the write after the loop + query = query[offset+i+1:] + offset = 0 + } + + buf.WriteString(query) + + if arg < len(meta) { + return "", nil, errors.New("number of bindVars less than number arguments") + } + + return buf.String(), newArgs, nil +} + +func appendReflectSlice(args []interface{}, v reflect.Value, vlen int) []interface{} { + switch val := v.Interface().(type) { + case []interface{}: + args = append(args, val...) + case []int: + for i := range val { + args = append(args, val[i]) + } + case []string: + for i := range val { + args = append(args, val[i]) + } + default: + for si := 0; si < vlen; si++ { + args = append(args, v.Index(si).Interface()) + } + } + + return args +} diff --git a/vendor/github.com/jmoiron/sqlx/doc.go b/vendor/github.com/jmoiron/sqlx/doc.go new file mode 100644 index 000000000..b80104175 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/doc.go @@ -0,0 +1,11 @@ +// Package sqlx provides general purpose extensions to database/sql. +// +// It is intended to seamlessly wrap database/sql and provide convenience +// methods which are useful in the development of database driven applications. +// None of the underlying database/sql methods are changed. Instead all extended +// behavior is implemented through new methods defined on wrapper types. +// +// Additions include scanning into structs, named query support, rebinding +// queries for different drivers, convenient shorthands for common error handling +// and more. +package sqlx diff --git a/vendor/github.com/jmoiron/sqlx/named.go b/vendor/github.com/jmoiron/sqlx/named.go new file mode 100644 index 000000000..6ac447771 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/named.go @@ -0,0 +1,458 @@ +package sqlx + +// Named Query Support +// +// * BindMap - bind query bindvars to map/struct args +// * NamedExec, NamedQuery - named query w/ struct or map +// * NamedStmt - a pre-compiled named query which is a prepared statement +// +// Internal Interfaces: +// +// * compileNamedQuery - rebind a named query, returning a query and list of names +// * bindArgs, bindMapArgs, bindAnyArgs - given a list of names, return an arglist +// +import ( + "bytes" + "database/sql" + "errors" + "fmt" + "reflect" + "regexp" + "strconv" + "unicode" + + "github.com/jmoiron/sqlx/reflectx" +) + +// NamedStmt is a prepared statement that executes named queries. Prepare it +// how you would execute a NamedQuery, but pass in a struct or map when executing. +type NamedStmt struct { + Params []string + QueryString string + Stmt *Stmt +} + +// Close closes the named statement. +func (n *NamedStmt) Close() error { + return n.Stmt.Close() +} + +// Exec executes a named statement using the struct passed. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) Exec(arg interface{}) (sql.Result, error) { + args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) + if err != nil { + return *new(sql.Result), err + } + return n.Stmt.Exec(args...) +} + +// Query executes a named statement using the struct argument, returning rows. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) Query(arg interface{}) (*sql.Rows, error) { + args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) + if err != nil { + return nil, err + } + return n.Stmt.Query(args...) +} + +// QueryRow executes a named statement against the database. Because sqlx cannot +// create a *sql.Row with an error condition pre-set for binding errors, sqlx +// returns a *sqlx.Row instead. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) QueryRow(arg interface{}) *Row { + args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) + if err != nil { + return &Row{err: err} + } + return n.Stmt.QueryRowx(args...) +} + +// MustExec execs a NamedStmt, panicing on error +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) MustExec(arg interface{}) sql.Result { + res, err := n.Exec(arg) + if err != nil { + panic(err) + } + return res +} + +// Queryx using this NamedStmt +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) Queryx(arg interface{}) (*Rows, error) { + r, err := n.Query(arg) + if err != nil { + return nil, err + } + return &Rows{Rows: r, Mapper: n.Stmt.Mapper, unsafe: isUnsafe(n)}, err +} + +// QueryRowx this NamedStmt. Because of limitations with QueryRow, this is +// an alias for QueryRow. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) QueryRowx(arg interface{}) *Row { + return n.QueryRow(arg) +} + +// Select using this NamedStmt +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) Select(dest interface{}, arg interface{}) error { + rows, err := n.Queryx(arg) + if err != nil { + return err + } + // if something happens here, we want to make sure the rows are Closed + defer rows.Close() + return scanAll(rows, dest, false) +} + +// Get using this NamedStmt +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) Get(dest interface{}, arg interface{}) error { + r := n.QueryRowx(arg) + return r.scanAny(dest, false) +} + +// Unsafe creates an unsafe version of the NamedStmt +func (n *NamedStmt) Unsafe() *NamedStmt { + r := &NamedStmt{Params: n.Params, Stmt: n.Stmt, QueryString: n.QueryString} + r.Stmt.unsafe = true + return r +} + +// A union interface of preparer and binder, required to be able to prepare +// named statements (as the bindtype must be determined). +type namedPreparer interface { + Preparer + binder +} + +func prepareNamed(p namedPreparer, query string) (*NamedStmt, error) { + bindType := BindType(p.DriverName()) + q, args, err := compileNamedQuery([]byte(query), bindType) + if err != nil { + return nil, err + } + stmt, err := Preparex(p, q) + if err != nil { + return nil, err + } + return &NamedStmt{ + QueryString: q, + Params: args, + Stmt: stmt, + }, nil +} + +// convertMapStringInterface attempts to convert v to map[string]interface{}. +// Unlike v.(map[string]interface{}), this function works on named types that +// are convertible to map[string]interface{} as well. +func convertMapStringInterface(v interface{}) (map[string]interface{}, bool) { + var m map[string]interface{} + mtype := reflect.TypeOf(m) + t := reflect.TypeOf(v) + if !t.ConvertibleTo(mtype) { + return nil, false + } + return reflect.ValueOf(v).Convert(mtype).Interface().(map[string]interface{}), true + +} + +func bindAnyArgs(names []string, arg interface{}, m *reflectx.Mapper) ([]interface{}, error) { + if maparg, ok := convertMapStringInterface(arg); ok { + return bindMapArgs(names, maparg) + } + return bindArgs(names, arg, m) +} + +// private interface to generate a list of interfaces from a given struct +// type, given a list of names to pull out of the struct. Used by public +// BindStruct interface. +func bindArgs(names []string, arg interface{}, m *reflectx.Mapper) ([]interface{}, error) { + arglist := make([]interface{}, 0, len(names)) + + // grab the indirected value of arg + var v reflect.Value + for v = reflect.ValueOf(arg); v.Kind() == reflect.Ptr; { + v = v.Elem() + } + + err := m.TraversalsByNameFunc(v.Type(), names, func(i int, t []int) error { + if len(t) == 0 { + return fmt.Errorf("could not find name %s in %#v", names[i], arg) + } + + val := reflectx.FieldByIndexesReadOnly(v, t) + arglist = append(arglist, val.Interface()) + + return nil + }) + + return arglist, err +} + +// like bindArgs, but for maps. +func bindMapArgs(names []string, arg map[string]interface{}) ([]interface{}, error) { + arglist := make([]interface{}, 0, len(names)) + + for _, name := range names { + val, ok := arg[name] + if !ok { + return arglist, fmt.Errorf("could not find name %s in %#v", name, arg) + } + arglist = append(arglist, val) + } + return arglist, nil +} + +// bindStruct binds a named parameter query with fields from a struct argument. +// The rules for binding field names to parameter names follow the same +// conventions as for StructScan, including obeying the `db` struct tags. +func bindStruct(bindType int, query string, arg interface{}, m *reflectx.Mapper) (string, []interface{}, error) { + bound, names, err := compileNamedQuery([]byte(query), bindType) + if err != nil { + return "", []interface{}{}, err + } + + arglist, err := bindAnyArgs(names, arg, m) + if err != nil { + return "", []interface{}{}, err + } + + return bound, arglist, nil +} + +var valuesReg = regexp.MustCompile(`\)\s*(?i)VALUES\s*\(`) + +func findMatchingClosingBracketIndex(s string) int { + count := 0 + for i, ch := range s { + if ch == '(' { + count++ + } + if ch == ')' { + count-- + if count == 0 { + return i + } + } + } + return 0 +} + +func fixBound(bound string, loop int) string { + loc := valuesReg.FindStringIndex(bound) + // defensive guard when "VALUES (...)" not found + if len(loc) < 2 { + return bound + } + + openingBracketIndex := loc[1] - 1 + index := findMatchingClosingBracketIndex(bound[openingBracketIndex:]) + // defensive guard. must have closing bracket + if index == 0 { + return bound + } + closingBracketIndex := openingBracketIndex + index + 1 + + var buffer bytes.Buffer + + buffer.WriteString(bound[0:closingBracketIndex]) + for i := 0; i < loop-1; i++ { + buffer.WriteString(",") + buffer.WriteString(bound[openingBracketIndex:closingBracketIndex]) + } + buffer.WriteString(bound[closingBracketIndex:]) + return buffer.String() +} + +// bindArray binds a named parameter query with fields from an array or slice of +// structs argument. +func bindArray(bindType int, query string, arg interface{}, m *reflectx.Mapper) (string, []interface{}, error) { + // do the initial binding with QUESTION; if bindType is not question, + // we can rebind it at the end. + bound, names, err := compileNamedQuery([]byte(query), QUESTION) + if err != nil { + return "", []interface{}{}, err + } + arrayValue := reflect.ValueOf(arg) + arrayLen := arrayValue.Len() + if arrayLen == 0 { + return "", []interface{}{}, fmt.Errorf("length of array is 0: %#v", arg) + } + var arglist = make([]interface{}, 0, len(names)*arrayLen) + for i := 0; i < arrayLen; i++ { + elemArglist, err := bindAnyArgs(names, arrayValue.Index(i).Interface(), m) + if err != nil { + return "", []interface{}{}, err + } + arglist = append(arglist, elemArglist...) + } + if arrayLen > 1 { + bound = fixBound(bound, arrayLen) + } + // adjust binding type if we weren't on question + if bindType != QUESTION { + bound = Rebind(bindType, bound) + } + return bound, arglist, nil +} + +// bindMap binds a named parameter query with a map of arguments. +func bindMap(bindType int, query string, args map[string]interface{}) (string, []interface{}, error) { + bound, names, err := compileNamedQuery([]byte(query), bindType) + if err != nil { + return "", []interface{}{}, err + } + + arglist, err := bindMapArgs(names, args) + return bound, arglist, err +} + +// -- Compilation of Named Queries + +// Allow digits and letters in bind params; additionally runes are +// checked against underscores, meaning that bind params can have be +// alphanumeric with underscores. Mind the difference between unicode +// digits and numbers, where '5' is a digit but '五' is not. +var allowedBindRunes = []*unicode.RangeTable{unicode.Letter, unicode.Digit} + +// FIXME: this function isn't safe for unicode named params, as a failing test +// can testify. This is not a regression but a failure of the original code +// as well. It should be modified to range over runes in a string rather than +// bytes, even though this is less convenient and slower. Hopefully the +// addition of the prepared NamedStmt (which will only do this once) will make +// up for the slightly slower ad-hoc NamedExec/NamedQuery. + +// compile a NamedQuery into an unbound query (using the '?' bindvar) and +// a list of names. +func compileNamedQuery(qs []byte, bindType int) (query string, names []string, err error) { + names = make([]string, 0, 10) + rebound := make([]byte, 0, len(qs)) + + inName := false + last := len(qs) - 1 + currentVar := 1 + name := make([]byte, 0, 10) + + for i, b := range qs { + // a ':' while we're in a name is an error + if b == ':' { + // if this is the second ':' in a '::' escape sequence, append a ':' + if inName && i > 0 && qs[i-1] == ':' { + rebound = append(rebound, ':') + inName = false + continue + } else if inName { + err = errors.New("unexpected `:` while reading named param at " + strconv.Itoa(i)) + return query, names, err + } + inName = true + name = []byte{} + } else if inName && i > 0 && b == '=' && len(name) == 0 { + rebound = append(rebound, ':', '=') + inName = false + continue + // if we're in a name, and this is an allowed character, continue + } else if inName && (unicode.IsOneOf(allowedBindRunes, rune(b)) || b == '_' || b == '.') && i != last { + // append the byte to the name if we are in a name and not on the last byte + name = append(name, b) + // if we're in a name and it's not an allowed character, the name is done + } else if inName { + inName = false + // if this is the final byte of the string and it is part of the name, then + // make sure to add it to the name + if i == last && unicode.IsOneOf(allowedBindRunes, rune(b)) { + name = append(name, b) + } + // add the string representation to the names list + names = append(names, string(name)) + // add a proper bindvar for the bindType + switch bindType { + // oracle only supports named type bind vars even for positional + case NAMED: + rebound = append(rebound, ':') + rebound = append(rebound, name...) + case QUESTION, UNKNOWN: + rebound = append(rebound, '?') + case DOLLAR: + rebound = append(rebound, '$') + for _, b := range strconv.Itoa(currentVar) { + rebound = append(rebound, byte(b)) + } + currentVar++ + case AT: + rebound = append(rebound, '@', 'p') + for _, b := range strconv.Itoa(currentVar) { + rebound = append(rebound, byte(b)) + } + currentVar++ + } + // add this byte to string unless it was not part of the name + if i != last { + rebound = append(rebound, b) + } else if !unicode.IsOneOf(allowedBindRunes, rune(b)) { + rebound = append(rebound, b) + } + } else { + // this is a normal byte and should just go onto the rebound query + rebound = append(rebound, b) + } + } + + return string(rebound), names, err +} + +// BindNamed binds a struct or a map to a query with named parameters. +// DEPRECATED: use sqlx.Named` instead of this, it may be removed in future. +func BindNamed(bindType int, query string, arg interface{}) (string, []interface{}, error) { + return bindNamedMapper(bindType, query, arg, mapper()) +} + +// Named takes a query using named parameters and an argument and +// returns a new query with a list of args that can be executed by +// a database. The return value uses the `?` bindvar. +func Named(query string, arg interface{}) (string, []interface{}, error) { + return bindNamedMapper(QUESTION, query, arg, mapper()) +} + +func bindNamedMapper(bindType int, query string, arg interface{}, m *reflectx.Mapper) (string, []interface{}, error) { + t := reflect.TypeOf(arg) + k := t.Kind() + switch { + case k == reflect.Map && t.Key().Kind() == reflect.String: + m, ok := convertMapStringInterface(arg) + if !ok { + return "", nil, fmt.Errorf("sqlx.bindNamedMapper: unsupported map type: %T", arg) + } + return bindMap(bindType, query, m) + case k == reflect.Array || k == reflect.Slice: + return bindArray(bindType, query, arg, m) + default: + return bindStruct(bindType, query, arg, m) + } +} + +// NamedQuery binds a named query and then runs Query on the result using the +// provided Ext (sqlx.Tx, sqlx.Db). It works with both structs and with +// map[string]interface{} types. +func NamedQuery(e Ext, query string, arg interface{}) (*Rows, error) { + q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) + if err != nil { + return nil, err + } + return e.Queryx(q, args...) +} + +// NamedExec uses BindStruct to get a query executable by the driver and +// then runs Exec on the result. Returns an error from the binding +// or the query execution itself. +func NamedExec(e Ext, query string, arg interface{}) (sql.Result, error) { + q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) + if err != nil { + return nil, err + } + return e.Exec(q, args...) +} diff --git a/vendor/github.com/jmoiron/sqlx/named_context.go b/vendor/github.com/jmoiron/sqlx/named_context.go new file mode 100644 index 000000000..9ad23f4ed --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/named_context.go @@ -0,0 +1,133 @@ +//go:build go1.8 +// +build go1.8 + +package sqlx + +import ( + "context" + "database/sql" +) + +// A union interface of contextPreparer and binder, required to be able to +// prepare named statements with context (as the bindtype must be determined). +type namedPreparerContext interface { + PreparerContext + binder +} + +func prepareNamedContext(ctx context.Context, p namedPreparerContext, query string) (*NamedStmt, error) { + bindType := BindType(p.DriverName()) + q, args, err := compileNamedQuery([]byte(query), bindType) + if err != nil { + return nil, err + } + stmt, err := PreparexContext(ctx, p, q) + if err != nil { + return nil, err + } + return &NamedStmt{ + QueryString: q, + Params: args, + Stmt: stmt, + }, nil +} + +// ExecContext executes a named statement using the struct passed. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) ExecContext(ctx context.Context, arg interface{}) (sql.Result, error) { + args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) + if err != nil { + return *new(sql.Result), err + } + return n.Stmt.ExecContext(ctx, args...) +} + +// QueryContext executes a named statement using the struct argument, returning rows. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) QueryContext(ctx context.Context, arg interface{}) (*sql.Rows, error) { + args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) + if err != nil { + return nil, err + } + return n.Stmt.QueryContext(ctx, args...) +} + +// QueryRowContext executes a named statement against the database. Because sqlx cannot +// create a *sql.Row with an error condition pre-set for binding errors, sqlx +// returns a *sqlx.Row instead. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) QueryRowContext(ctx context.Context, arg interface{}) *Row { + args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) + if err != nil { + return &Row{err: err} + } + return n.Stmt.QueryRowxContext(ctx, args...) +} + +// MustExecContext execs a NamedStmt, panicing on error +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) MustExecContext(ctx context.Context, arg interface{}) sql.Result { + res, err := n.ExecContext(ctx, arg) + if err != nil { + panic(err) + } + return res +} + +// QueryxContext using this NamedStmt +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) QueryxContext(ctx context.Context, arg interface{}) (*Rows, error) { + r, err := n.QueryContext(ctx, arg) + if err != nil { + return nil, err + } + return &Rows{Rows: r, Mapper: n.Stmt.Mapper, unsafe: isUnsafe(n)}, err +} + +// QueryRowxContext this NamedStmt. Because of limitations with QueryRow, this is +// an alias for QueryRow. +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) QueryRowxContext(ctx context.Context, arg interface{}) *Row { + return n.QueryRowContext(ctx, arg) +} + +// SelectContext using this NamedStmt +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) SelectContext(ctx context.Context, dest interface{}, arg interface{}) error { + rows, err := n.QueryxContext(ctx, arg) + if err != nil { + return err + } + // if something happens here, we want to make sure the rows are Closed + defer rows.Close() + return scanAll(rows, dest, false) +} + +// GetContext using this NamedStmt +// Any named placeholder parameters are replaced with fields from arg. +func (n *NamedStmt) GetContext(ctx context.Context, dest interface{}, arg interface{}) error { + r := n.QueryRowxContext(ctx, arg) + return r.scanAny(dest, false) +} + +// NamedQueryContext binds a named query and then runs Query on the result using the +// provided Ext (sqlx.Tx, sqlx.Db). It works with both structs and with +// map[string]interface{} types. +func NamedQueryContext(ctx context.Context, e ExtContext, query string, arg interface{}) (*Rows, error) { + q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) + if err != nil { + return nil, err + } + return e.QueryxContext(ctx, q, args...) +} + +// NamedExecContext uses BindStruct to get a query executable by the driver and +// then runs Exec on the result. Returns an error from the binding +// or the query execution itself. +func NamedExecContext(ctx context.Context, e ExtContext, query string, arg interface{}) (sql.Result, error) { + q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) + if err != nil { + return nil, err + } + return e.ExecContext(ctx, q, args...) +} diff --git a/vendor/github.com/jmoiron/sqlx/reflectx/README.md b/vendor/github.com/jmoiron/sqlx/reflectx/README.md new file mode 100644 index 000000000..f01d3d1f0 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/reflectx/README.md @@ -0,0 +1,17 @@ +# reflectx + +The sqlx package has special reflect needs. In particular, it needs to: + +* be able to map a name to a field +* understand embedded structs +* understand mapping names to fields by a particular tag +* user specified name -> field mapping functions + +These behaviors mimic the behaviors by the standard library marshallers and also the +behavior of standard Go accessors. + +The first two are amply taken care of by `Reflect.Value.FieldByName`, and the third is +addressed by `Reflect.Value.FieldByNameFunc`, but these don't quite understand struct +tags in the ways that are vital to most marshallers, and they are slow. + +This reflectx package extends reflect to achieve these goals. diff --git a/vendor/github.com/jmoiron/sqlx/reflectx/reflect.go b/vendor/github.com/jmoiron/sqlx/reflectx/reflect.go new file mode 100644 index 000000000..8ec6a1382 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/reflectx/reflect.go @@ -0,0 +1,443 @@ +// Package reflectx implements extensions to the standard reflect lib suitable +// for implementing marshalling and unmarshalling packages. The main Mapper type +// allows for Go-compatible named attribute access, including accessing embedded +// struct attributes and the ability to use functions and struct tags to +// customize field names. +package reflectx + +import ( + "reflect" + "runtime" + "strings" + "sync" +) + +// A FieldInfo is metadata for a struct field. +type FieldInfo struct { + Index []int + Path string + Field reflect.StructField + Zero reflect.Value + Name string + Options map[string]string + Embedded bool + Children []*FieldInfo + Parent *FieldInfo +} + +// A StructMap is an index of field metadata for a struct. +type StructMap struct { + Tree *FieldInfo + Index []*FieldInfo + Paths map[string]*FieldInfo + Names map[string]*FieldInfo +} + +// GetByPath returns a *FieldInfo for a given string path. +func (f StructMap) GetByPath(path string) *FieldInfo { + return f.Paths[path] +} + +// GetByTraversal returns a *FieldInfo for a given integer path. It is +// analogous to reflect.FieldByIndex, but using the cached traversal +// rather than re-executing the reflect machinery each time. +func (f StructMap) GetByTraversal(index []int) *FieldInfo { + if len(index) == 0 { + return nil + } + + tree := f.Tree + for _, i := range index { + if i >= len(tree.Children) || tree.Children[i] == nil { + return nil + } + tree = tree.Children[i] + } + return tree +} + +// Mapper is a general purpose mapper of names to struct fields. A Mapper +// behaves like most marshallers in the standard library, obeying a field tag +// for name mapping but also providing a basic transform function. +type Mapper struct { + cache map[reflect.Type]*StructMap + tagName string + tagMapFunc func(string) string + mapFunc func(string) string + mutex sync.Mutex +} + +// NewMapper returns a new mapper using the tagName as its struct field tag. +// If tagName is the empty string, it is ignored. +func NewMapper(tagName string) *Mapper { + return &Mapper{ + cache: make(map[reflect.Type]*StructMap), + tagName: tagName, + } +} + +// NewMapperTagFunc returns a new mapper which contains a mapper for field names +// AND a mapper for tag values. This is useful for tags like json which can +// have values like "name,omitempty". +func NewMapperTagFunc(tagName string, mapFunc, tagMapFunc func(string) string) *Mapper { + return &Mapper{ + cache: make(map[reflect.Type]*StructMap), + tagName: tagName, + mapFunc: mapFunc, + tagMapFunc: tagMapFunc, + } +} + +// NewMapperFunc returns a new mapper which optionally obeys a field tag and +// a struct field name mapper func given by f. Tags will take precedence, but +// for any other field, the mapped name will be f(field.Name) +func NewMapperFunc(tagName string, f func(string) string) *Mapper { + return &Mapper{ + cache: make(map[reflect.Type]*StructMap), + tagName: tagName, + mapFunc: f, + } +} + +// TypeMap returns a mapping of field strings to int slices representing +// the traversal down the struct to reach the field. +func (m *Mapper) TypeMap(t reflect.Type) *StructMap { + m.mutex.Lock() + mapping, ok := m.cache[t] + if !ok { + mapping = getMapping(t, m.tagName, m.mapFunc, m.tagMapFunc) + m.cache[t] = mapping + } + m.mutex.Unlock() + return mapping +} + +// FieldMap returns the mapper's mapping of field names to reflect values. Panics +// if v's Kind is not Struct, or v is not Indirectable to a struct kind. +func (m *Mapper) FieldMap(v reflect.Value) map[string]reflect.Value { + v = reflect.Indirect(v) + mustBe(v, reflect.Struct) + + r := map[string]reflect.Value{} + tm := m.TypeMap(v.Type()) + for tagName, fi := range tm.Names { + r[tagName] = FieldByIndexes(v, fi.Index) + } + return r +} + +// FieldByName returns a field by its mapped name as a reflect.Value. +// Panics if v's Kind is not Struct or v is not Indirectable to a struct Kind. +// Returns zero Value if the name is not found. +func (m *Mapper) FieldByName(v reflect.Value, name string) reflect.Value { + v = reflect.Indirect(v) + mustBe(v, reflect.Struct) + + tm := m.TypeMap(v.Type()) + fi, ok := tm.Names[name] + if !ok { + return v + } + return FieldByIndexes(v, fi.Index) +} + +// FieldsByName returns a slice of values corresponding to the slice of names +// for the value. Panics if v's Kind is not Struct or v is not Indirectable +// to a struct Kind. Returns zero Value for each name not found. +func (m *Mapper) FieldsByName(v reflect.Value, names []string) []reflect.Value { + v = reflect.Indirect(v) + mustBe(v, reflect.Struct) + + tm := m.TypeMap(v.Type()) + vals := make([]reflect.Value, 0, len(names)) + for _, name := range names { + fi, ok := tm.Names[name] + if !ok { + vals = append(vals, *new(reflect.Value)) + } else { + vals = append(vals, FieldByIndexes(v, fi.Index)) + } + } + return vals +} + +// TraversalsByName returns a slice of int slices which represent the struct +// traversals for each mapped name. Panics if t is not a struct or Indirectable +// to a struct. Returns empty int slice for each name not found. +func (m *Mapper) TraversalsByName(t reflect.Type, names []string) [][]int { + r := make([][]int, 0, len(names)) + m.TraversalsByNameFunc(t, names, func(_ int, i []int) error { + if i == nil { + r = append(r, []int{}) + } else { + r = append(r, i) + } + + return nil + }) + return r +} + +// TraversalsByNameFunc traverses the mapped names and calls fn with the index of +// each name and the struct traversal represented by that name. Panics if t is not +// a struct or Indirectable to a struct. Returns the first error returned by fn or nil. +func (m *Mapper) TraversalsByNameFunc(t reflect.Type, names []string, fn func(int, []int) error) error { + t = Deref(t) + mustBe(t, reflect.Struct) + tm := m.TypeMap(t) + for i, name := range names { + fi, ok := tm.Names[name] + if !ok { + if err := fn(i, nil); err != nil { + return err + } + } else { + if err := fn(i, fi.Index); err != nil { + return err + } + } + } + return nil +} + +// FieldByIndexes returns a value for the field given by the struct traversal +// for the given value. +func FieldByIndexes(v reflect.Value, indexes []int) reflect.Value { + for _, i := range indexes { + v = reflect.Indirect(v).Field(i) + // if this is a pointer and it's nil, allocate a new value and set it + if v.Kind() == reflect.Ptr && v.IsNil() { + alloc := reflect.New(Deref(v.Type())) + v.Set(alloc) + } + if v.Kind() == reflect.Map && v.IsNil() { + v.Set(reflect.MakeMap(v.Type())) + } + } + return v +} + +// FieldByIndexesReadOnly returns a value for a particular struct traversal, +// but is not concerned with allocating nil pointers because the value is +// going to be used for reading and not setting. +func FieldByIndexesReadOnly(v reflect.Value, indexes []int) reflect.Value { + for _, i := range indexes { + v = reflect.Indirect(v).Field(i) + } + return v +} + +// Deref is Indirect for reflect.Types +func Deref(t reflect.Type) reflect.Type { + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t +} + +// -- helpers & utilities -- + +type kinder interface { + Kind() reflect.Kind +} + +// mustBe checks a value against a kind, panicing with a reflect.ValueError +// if the kind isn't that which is required. +func mustBe(v kinder, expected reflect.Kind) { + if k := v.Kind(); k != expected { + panic(&reflect.ValueError{Method: methodName(), Kind: k}) + } +} + +// methodName returns the caller of the function calling methodName +func methodName() string { + pc, _, _, _ := runtime.Caller(2) + f := runtime.FuncForPC(pc) + if f == nil { + return "unknown method" + } + return f.Name() +} + +type typeQueue struct { + t reflect.Type + fi *FieldInfo + pp string // Parent path +} + +// A copying append that creates a new slice each time. +func apnd(is []int, i int) []int { + x := make([]int, len(is)+1) + copy(x, is) + x[len(x)-1] = i + return x +} + +type mapf func(string) string + +// parseName parses the tag and the target name for the given field using +// the tagName (eg 'json' for `json:"foo"` tags), mapFunc for mapping the +// field's name to a target name, and tagMapFunc for mapping the tag to +// a target name. +func parseName(field reflect.StructField, tagName string, mapFunc, tagMapFunc mapf) (tag, fieldName string) { + // first, set the fieldName to the field's name + fieldName = field.Name + // if a mapFunc is set, use that to override the fieldName + if mapFunc != nil { + fieldName = mapFunc(fieldName) + } + + // if there's no tag to look for, return the field name + if tagName == "" { + return "", fieldName + } + + // if this tag is not set using the normal convention in the tag, + // then return the fieldname.. this check is done because according + // to the reflect documentation: + // If the tag does not have the conventional format, + // the value returned by Get is unspecified. + // which doesn't sound great. + if !strings.Contains(string(field.Tag), tagName+":") { + return "", fieldName + } + + // at this point we're fairly sure that we have a tag, so lets pull it out + tag = field.Tag.Get(tagName) + + // if we have a mapper function, call it on the whole tag + // XXX: this is a change from the old version, which pulled out the name + // before the tagMapFunc could be run, but I think this is the right way + if tagMapFunc != nil { + tag = tagMapFunc(tag) + } + + // finally, split the options from the name + parts := strings.Split(tag, ",") + fieldName = parts[0] + + return tag, fieldName +} + +// parseOptions parses options out of a tag string, skipping the name +func parseOptions(tag string) map[string]string { + parts := strings.Split(tag, ",") + options := make(map[string]string, len(parts)) + if len(parts) > 1 { + for _, opt := range parts[1:] { + // short circuit potentially expensive split op + if strings.Contains(opt, "=") { + kv := strings.Split(opt, "=") + options[kv[0]] = kv[1] + continue + } + options[opt] = "" + } + } + return options +} + +// getMapping returns a mapping for the t type, using the tagName, mapFunc and +// tagMapFunc to determine the canonical names of fields. +func getMapping(t reflect.Type, tagName string, mapFunc, tagMapFunc mapf) *StructMap { + m := []*FieldInfo{} + + root := &FieldInfo{} + queue := []typeQueue{} + queue = append(queue, typeQueue{Deref(t), root, ""}) + +QueueLoop: + for len(queue) != 0 { + // pop the first item off of the queue + tq := queue[0] + queue = queue[1:] + + // ignore recursive field + for p := tq.fi.Parent; p != nil; p = p.Parent { + if tq.fi.Field.Type == p.Field.Type { + continue QueueLoop + } + } + + nChildren := 0 + if tq.t.Kind() == reflect.Struct { + nChildren = tq.t.NumField() + } + tq.fi.Children = make([]*FieldInfo, nChildren) + + // iterate through all of its fields + for fieldPos := 0; fieldPos < nChildren; fieldPos++ { + + f := tq.t.Field(fieldPos) + + // parse the tag and the target name using the mapping options for this field + tag, name := parseName(f, tagName, mapFunc, tagMapFunc) + + // if the name is "-", disabled via a tag, skip it + if name == "-" { + continue + } + + fi := FieldInfo{ + Field: f, + Name: name, + Zero: reflect.New(f.Type).Elem(), + Options: parseOptions(tag), + } + + // if the path is empty this path is just the name + if tq.pp == "" { + fi.Path = fi.Name + } else { + fi.Path = tq.pp + "." + fi.Name + } + + // skip unexported fields + if len(f.PkgPath) != 0 && !f.Anonymous { + continue + } + + // bfs search of anonymous embedded structs + if f.Anonymous { + pp := tq.pp + if tag != "" { + pp = fi.Path + } + + fi.Embedded = true + fi.Index = apnd(tq.fi.Index, fieldPos) + nChildren := 0 + ft := Deref(f.Type) + if ft.Kind() == reflect.Struct { + nChildren = ft.NumField() + } + fi.Children = make([]*FieldInfo, nChildren) + queue = append(queue, typeQueue{Deref(f.Type), &fi, pp}) + } else if fi.Zero.Kind() == reflect.Struct || (fi.Zero.Kind() == reflect.Ptr && fi.Zero.Type().Elem().Kind() == reflect.Struct) { + fi.Index = apnd(tq.fi.Index, fieldPos) + fi.Children = make([]*FieldInfo, Deref(f.Type).NumField()) + queue = append(queue, typeQueue{Deref(f.Type), &fi, fi.Path}) + } + + fi.Index = apnd(tq.fi.Index, fieldPos) + fi.Parent = tq.fi + tq.fi.Children[fieldPos] = &fi + m = append(m, &fi) + } + } + + flds := &StructMap{Index: m, Tree: root, Paths: map[string]*FieldInfo{}, Names: map[string]*FieldInfo{}} + for _, fi := range flds.Index { + // check if nothing has already been pushed with the same path + // sometimes you can choose to override a type using embedded struct + fld, ok := flds.Paths[fi.Path] + if !ok || fld.Embedded { + flds.Paths[fi.Path] = fi + if fi.Name != "" && !fi.Embedded { + flds.Names[fi.Path] = fi + } + } + } + + return flds +} diff --git a/vendor/github.com/jmoiron/sqlx/sqlx.go b/vendor/github.com/jmoiron/sqlx/sqlx.go new file mode 100644 index 000000000..8259a4feb --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/sqlx.go @@ -0,0 +1,1054 @@ +package sqlx + +import ( + "database/sql" + "database/sql/driver" + "errors" + "fmt" + "io/ioutil" + "path/filepath" + "reflect" + "strings" + "sync" + + "github.com/jmoiron/sqlx/reflectx" +) + +// Although the NameMapper is convenient, in practice it should not +// be relied on except for application code. If you are writing a library +// that uses sqlx, you should be aware that the name mappings you expect +// can be overridden by your user's application. + +// NameMapper is used to map column names to struct field names. By default, +// it uses strings.ToLower to lowercase struct field names. It can be set +// to whatever you want, but it is encouraged to be set before sqlx is used +// as name-to-field mappings are cached after first use on a type. +var NameMapper = strings.ToLower +var origMapper = reflect.ValueOf(NameMapper) + +// Rather than creating on init, this is created when necessary so that +// importers have time to customize the NameMapper. +var mpr *reflectx.Mapper + +// mprMu protects mpr. +var mprMu sync.Mutex + +// mapper returns a valid mapper using the configured NameMapper func. +func mapper() *reflectx.Mapper { + mprMu.Lock() + defer mprMu.Unlock() + + if mpr == nil { + mpr = reflectx.NewMapperFunc("db", NameMapper) + } else if origMapper != reflect.ValueOf(NameMapper) { + // if NameMapper has changed, create a new mapper + mpr = reflectx.NewMapperFunc("db", NameMapper) + origMapper = reflect.ValueOf(NameMapper) + } + return mpr +} + +// isScannable takes the reflect.Type and the actual dest value and returns +// whether or not it's Scannable. Something is scannable if: +// - it is not a struct +// - it implements sql.Scanner +// - it has no exported fields +func isScannable(t reflect.Type) bool { + if reflect.PtrTo(t).Implements(_scannerInterface) { + return true + } + if t.Kind() != reflect.Struct { + return true + } + + // it's not important that we use the right mapper for this particular object, + // we're only concerned on how many exported fields this struct has + return len(mapper().TypeMap(t).Index) == 0 +} + +// ColScanner is an interface used by MapScan and SliceScan +type ColScanner interface { + Columns() ([]string, error) + Scan(dest ...interface{}) error + Err() error +} + +// Queryer is an interface used by Get and Select +type Queryer interface { + Query(query string, args ...interface{}) (*sql.Rows, error) + Queryx(query string, args ...interface{}) (*Rows, error) + QueryRowx(query string, args ...interface{}) *Row +} + +// Execer is an interface used by MustExec and LoadFile +type Execer interface { + Exec(query string, args ...interface{}) (sql.Result, error) +} + +// Binder is an interface for something which can bind queries (Tx, DB) +type binder interface { + DriverName() string + Rebind(string) string + BindNamed(string, interface{}) (string, []interface{}, error) +} + +// Ext is a union interface which can bind, query, and exec, used by +// NamedQuery and NamedExec. +type Ext interface { + binder + Queryer + Execer +} + +// Preparer is an interface used by Preparex. +type Preparer interface { + Prepare(query string) (*sql.Stmt, error) +} + +// determine if any of our extensions are unsafe +func isUnsafe(i interface{}) bool { + switch v := i.(type) { + case Row: + return v.unsafe + case *Row: + return v.unsafe + case Rows: + return v.unsafe + case *Rows: + return v.unsafe + case NamedStmt: + return v.Stmt.unsafe + case *NamedStmt: + return v.Stmt.unsafe + case Stmt: + return v.unsafe + case *Stmt: + return v.unsafe + case qStmt: + return v.unsafe + case *qStmt: + return v.unsafe + case DB: + return v.unsafe + case *DB: + return v.unsafe + case Tx: + return v.unsafe + case *Tx: + return v.unsafe + case sql.Rows, *sql.Rows: + return false + default: + return false + } +} + +func mapperFor(i interface{}) *reflectx.Mapper { + switch i := i.(type) { + case DB: + return i.Mapper + case *DB: + return i.Mapper + case Tx: + return i.Mapper + case *Tx: + return i.Mapper + default: + return mapper() + } +} + +var _scannerInterface = reflect.TypeOf((*sql.Scanner)(nil)).Elem() + +//lint:ignore U1000 ignoring this for now +var _valuerInterface = reflect.TypeOf((*driver.Valuer)(nil)).Elem() + +// Row is a reimplementation of sql.Row in order to gain access to the underlying +// sql.Rows.Columns() data, necessary for StructScan. +type Row struct { + err error + unsafe bool + rows *sql.Rows + Mapper *reflectx.Mapper +} + +// Scan is a fixed implementation of sql.Row.Scan, which does not discard the +// underlying error from the internal rows object if it exists. +func (r *Row) Scan(dest ...interface{}) error { + if r.err != nil { + return r.err + } + + // TODO(bradfitz): for now we need to defensively clone all + // []byte that the driver returned (not permitting + // *RawBytes in Rows.Scan), since we're about to close + // the Rows in our defer, when we return from this function. + // the contract with the driver.Next(...) interface is that it + // can return slices into read-only temporary memory that's + // only valid until the next Scan/Close. But the TODO is that + // for a lot of drivers, this copy will be unnecessary. We + // should provide an optional interface for drivers to + // implement to say, "don't worry, the []bytes that I return + // from Next will not be modified again." (for instance, if + // they were obtained from the network anyway) But for now we + // don't care. + defer r.rows.Close() + for _, dp := range dest { + if _, ok := dp.(*sql.RawBytes); ok { + return errors.New("sql: RawBytes isn't allowed on Row.Scan") + } + } + + if !r.rows.Next() { + if err := r.rows.Err(); err != nil { + return err + } + return sql.ErrNoRows + } + err := r.rows.Scan(dest...) + if err != nil { + return err + } + // Make sure the query can be processed to completion with no errors. + if err := r.rows.Close(); err != nil { + return err + } + return nil +} + +// Columns returns the underlying sql.Rows.Columns(), or the deferred error usually +// returned by Row.Scan() +func (r *Row) Columns() ([]string, error) { + if r.err != nil { + return []string{}, r.err + } + return r.rows.Columns() +} + +// ColumnTypes returns the underlying sql.Rows.ColumnTypes(), or the deferred error +func (r *Row) ColumnTypes() ([]*sql.ColumnType, error) { + if r.err != nil { + return []*sql.ColumnType{}, r.err + } + return r.rows.ColumnTypes() +} + +// Err returns the error encountered while scanning. +func (r *Row) Err() error { + return r.err +} + +// DB is a wrapper around sql.DB which keeps track of the driverName upon Open, +// used mostly to automatically bind named queries using the right bindvars. +type DB struct { + *sql.DB + driverName string + unsafe bool + Mapper *reflectx.Mapper +} + +// NewDb returns a new sqlx DB wrapper for a pre-existing *sql.DB. The +// driverName of the original database is required for named query support. +// +//lint:ignore ST1003 changing this would break the package interface. +func NewDb(db *sql.DB, driverName string) *DB { + return &DB{DB: db, driverName: driverName, Mapper: mapper()} +} + +// DriverName returns the driverName passed to the Open function for this DB. +func (db *DB) DriverName() string { + return db.driverName +} + +// Open is the same as sql.Open, but returns an *sqlx.DB instead. +func Open(driverName, dataSourceName string) (*DB, error) { + db, err := sql.Open(driverName, dataSourceName) + if err != nil { + return nil, err + } + return &DB{DB: db, driverName: driverName, Mapper: mapper()}, err +} + +// MustOpen is the same as sql.Open, but returns an *sqlx.DB instead and panics on error. +func MustOpen(driverName, dataSourceName string) *DB { + db, err := Open(driverName, dataSourceName) + if err != nil { + panic(err) + } + return db +} + +// MapperFunc sets a new mapper for this db using the default sqlx struct tag +// and the provided mapper function. +func (db *DB) MapperFunc(mf func(string) string) { + db.Mapper = reflectx.NewMapperFunc("db", mf) +} + +// Rebind transforms a query from QUESTION to the DB driver's bindvar type. +func (db *DB) Rebind(query string) string { + return Rebind(BindType(db.driverName), query) +} + +// Unsafe returns a version of DB which will silently succeed to scan when +// columns in the SQL result have no fields in the destination struct. +// sqlx.Stmt and sqlx.Tx which are created from this DB will inherit its +// safety behavior. +func (db *DB) Unsafe() *DB { + return &DB{DB: db.DB, driverName: db.driverName, unsafe: true, Mapper: db.Mapper} +} + +// BindNamed binds a query using the DB driver's bindvar type. +func (db *DB) BindNamed(query string, arg interface{}) (string, []interface{}, error) { + return bindNamedMapper(BindType(db.driverName), query, arg, db.Mapper) +} + +// NamedQuery using this DB. +// Any named placeholder parameters are replaced with fields from arg. +func (db *DB) NamedQuery(query string, arg interface{}) (*Rows, error) { + return NamedQuery(db, query, arg) +} + +// NamedExec using this DB. +// Any named placeholder parameters are replaced with fields from arg. +func (db *DB) NamedExec(query string, arg interface{}) (sql.Result, error) { + return NamedExec(db, query, arg) +} + +// Select using this DB. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) Select(dest interface{}, query string, args ...interface{}) error { + return Select(db, dest, query, args...) +} + +// Get using this DB. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (db *DB) Get(dest interface{}, query string, args ...interface{}) error { + return Get(db, dest, query, args...) +} + +// MustBegin starts a transaction, and panics on error. Returns an *sqlx.Tx instead +// of an *sql.Tx. +func (db *DB) MustBegin() *Tx { + tx, err := db.Beginx() + if err != nil { + panic(err) + } + return tx +} + +// Beginx begins a transaction and returns an *sqlx.Tx instead of an *sql.Tx. +func (db *DB) Beginx() (*Tx, error) { + tx, err := db.DB.Begin() + if err != nil { + return nil, err + } + return &Tx{Tx: tx, driverName: db.driverName, unsafe: db.unsafe, Mapper: db.Mapper}, err +} + +// Queryx queries the database and returns an *sqlx.Rows. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) Queryx(query string, args ...interface{}) (*Rows, error) { + r, err := db.DB.Query(query, args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: db.unsafe, Mapper: db.Mapper}, err +} + +// QueryRowx queries the database and returns an *sqlx.Row. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) QueryRowx(query string, args ...interface{}) *Row { + rows, err := db.DB.Query(query, args...) + return &Row{rows: rows, err: err, unsafe: db.unsafe, Mapper: db.Mapper} +} + +// MustExec (panic) runs MustExec using this database. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) MustExec(query string, args ...interface{}) sql.Result { + return MustExec(db, query, args...) +} + +// Preparex returns an sqlx.Stmt instead of a sql.Stmt +func (db *DB) Preparex(query string) (*Stmt, error) { + return Preparex(db, query) +} + +// PrepareNamed returns an sqlx.NamedStmt +func (db *DB) PrepareNamed(query string) (*NamedStmt, error) { + return prepareNamed(db, query) +} + +// Conn is a wrapper around sql.Conn with extra functionality +type Conn struct { + *sql.Conn + driverName string + unsafe bool + Mapper *reflectx.Mapper +} + +// Tx is an sqlx wrapper around sql.Tx with extra functionality +type Tx struct { + *sql.Tx + driverName string + unsafe bool + Mapper *reflectx.Mapper +} + +// DriverName returns the driverName used by the DB which began this transaction. +func (tx *Tx) DriverName() string { + return tx.driverName +} + +// Rebind a query within a transaction's bindvar type. +func (tx *Tx) Rebind(query string) string { + return Rebind(BindType(tx.driverName), query) +} + +// Unsafe returns a version of Tx which will silently succeed to scan when +// columns in the SQL result have no fields in the destination struct. +func (tx *Tx) Unsafe() *Tx { + return &Tx{Tx: tx.Tx, driverName: tx.driverName, unsafe: true, Mapper: tx.Mapper} +} + +// BindNamed binds a query within a transaction's bindvar type. +func (tx *Tx) BindNamed(query string, arg interface{}) (string, []interface{}, error) { + return bindNamedMapper(BindType(tx.driverName), query, arg, tx.Mapper) +} + +// NamedQuery within a transaction. +// Any named placeholder parameters are replaced with fields from arg. +func (tx *Tx) NamedQuery(query string, arg interface{}) (*Rows, error) { + return NamedQuery(tx, query, arg) +} + +// NamedExec a named query within a transaction. +// Any named placeholder parameters are replaced with fields from arg. +func (tx *Tx) NamedExec(query string, arg interface{}) (sql.Result, error) { + return NamedExec(tx, query, arg) +} + +// Select within a transaction. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) Select(dest interface{}, query string, args ...interface{}) error { + return Select(tx, dest, query, args...) +} + +// Queryx within a transaction. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) Queryx(query string, args ...interface{}) (*Rows, error) { + r, err := tx.Tx.Query(query, args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: tx.unsafe, Mapper: tx.Mapper}, err +} + +// QueryRowx within a transaction. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) QueryRowx(query string, args ...interface{}) *Row { + rows, err := tx.Tx.Query(query, args...) + return &Row{rows: rows, err: err, unsafe: tx.unsafe, Mapper: tx.Mapper} +} + +// Get within a transaction. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (tx *Tx) Get(dest interface{}, query string, args ...interface{}) error { + return Get(tx, dest, query, args...) +} + +// MustExec runs MustExec within a transaction. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) MustExec(query string, args ...interface{}) sql.Result { + return MustExec(tx, query, args...) +} + +// Preparex a statement within a transaction. +func (tx *Tx) Preparex(query string) (*Stmt, error) { + return Preparex(tx, query) +} + +// Stmtx returns a version of the prepared statement which runs within a transaction. Provided +// stmt can be either *sql.Stmt or *sqlx.Stmt. +func (tx *Tx) Stmtx(stmt interface{}) *Stmt { + var s *sql.Stmt + switch v := stmt.(type) { + case Stmt: + s = v.Stmt + case *Stmt: + s = v.Stmt + case *sql.Stmt: + s = v + default: + panic(fmt.Sprintf("non-statement type %v passed to Stmtx", reflect.ValueOf(stmt).Type())) + } + return &Stmt{Stmt: tx.Stmt(s), Mapper: tx.Mapper} +} + +// NamedStmt returns a version of the prepared statement which runs within a transaction. +func (tx *Tx) NamedStmt(stmt *NamedStmt) *NamedStmt { + return &NamedStmt{ + QueryString: stmt.QueryString, + Params: stmt.Params, + Stmt: tx.Stmtx(stmt.Stmt), + } +} + +// PrepareNamed returns an sqlx.NamedStmt +func (tx *Tx) PrepareNamed(query string) (*NamedStmt, error) { + return prepareNamed(tx, query) +} + +// Stmt is an sqlx wrapper around sql.Stmt with extra functionality +type Stmt struct { + *sql.Stmt + unsafe bool + Mapper *reflectx.Mapper +} + +// Unsafe returns a version of Stmt which will silently succeed to scan when +// columns in the SQL result have no fields in the destination struct. +func (s *Stmt) Unsafe() *Stmt { + return &Stmt{Stmt: s.Stmt, unsafe: true, Mapper: s.Mapper} +} + +// Select using the prepared statement. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) Select(dest interface{}, args ...interface{}) error { + return Select(&qStmt{s}, dest, "", args...) +} + +// Get using the prepared statement. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (s *Stmt) Get(dest interface{}, args ...interface{}) error { + return Get(&qStmt{s}, dest, "", args...) +} + +// MustExec (panic) using this statement. Note that the query portion of the error +// output will be blank, as Stmt does not expose its query. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) MustExec(args ...interface{}) sql.Result { + return MustExec(&qStmt{s}, "", args...) +} + +// QueryRowx using this statement. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) QueryRowx(args ...interface{}) *Row { + qs := &qStmt{s} + return qs.QueryRowx("", args...) +} + +// Queryx using this statement. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) Queryx(args ...interface{}) (*Rows, error) { + qs := &qStmt{s} + return qs.Queryx("", args...) +} + +// qStmt is an unexposed wrapper which lets you use a Stmt as a Queryer & Execer by +// implementing those interfaces and ignoring the `query` argument. +type qStmt struct{ *Stmt } + +func (q *qStmt) Query(query string, args ...interface{}) (*sql.Rows, error) { + return q.Stmt.Query(args...) +} + +func (q *qStmt) Queryx(query string, args ...interface{}) (*Rows, error) { + r, err := q.Stmt.Query(args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper}, err +} + +func (q *qStmt) QueryRowx(query string, args ...interface{}) *Row { + rows, err := q.Stmt.Query(args...) + return &Row{rows: rows, err: err, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper} +} + +func (q *qStmt) Exec(query string, args ...interface{}) (sql.Result, error) { + return q.Stmt.Exec(args...) +} + +// Rows is a wrapper around sql.Rows which caches costly reflect operations +// during a looped StructScan +type Rows struct { + *sql.Rows + unsafe bool + Mapper *reflectx.Mapper + // these fields cache memory use for a rows during iteration w/ structScan + started bool + fields [][]int + values []interface{} +} + +// SliceScan using this Rows. +func (r *Rows) SliceScan() ([]interface{}, error) { + return SliceScan(r) +} + +// MapScan using this Rows. +func (r *Rows) MapScan(dest map[string]interface{}) error { + return MapScan(r, dest) +} + +// StructScan is like sql.Rows.Scan, but scans a single Row into a single Struct. +// Use this and iterate over Rows manually when the memory load of Select() might be +// prohibitive. *Rows.StructScan caches the reflect work of matching up column +// positions to fields to avoid that overhead per scan, which means it is not safe +// to run StructScan on the same Rows instance with different struct types. +func (r *Rows) StructScan(dest interface{}) error { + v := reflect.ValueOf(dest) + + if v.Kind() != reflect.Ptr { + return errors.New("must pass a pointer, not a value, to StructScan destination") + } + + v = v.Elem() + + if !r.started { + columns, err := r.Columns() + if err != nil { + return err + } + m := r.Mapper + + r.fields = m.TraversalsByName(v.Type(), columns) + // if we are not unsafe and are missing fields, return an error + if f, err := missingFields(r.fields); err != nil && !r.unsafe { + return fmt.Errorf("missing destination name %s in %T", columns[f], dest) + } + r.values = make([]interface{}, len(columns)) + r.started = true + } + + err := fieldsByTraversal(v, r.fields, r.values, true) + if err != nil { + return err + } + // scan into the struct field pointers and append to our results + err = r.Scan(r.values...) + if err != nil { + return err + } + return r.Err() +} + +// Connect to a database and verify with a ping. +func Connect(driverName, dataSourceName string) (*DB, error) { + db, err := Open(driverName, dataSourceName) + if err != nil { + return nil, err + } + err = db.Ping() + if err != nil { + db.Close() + return nil, err + } + return db, nil +} + +// MustConnect connects to a database and panics on error. +func MustConnect(driverName, dataSourceName string) *DB { + db, err := Connect(driverName, dataSourceName) + if err != nil { + panic(err) + } + return db +} + +// Preparex prepares a statement. +func Preparex(p Preparer, query string) (*Stmt, error) { + s, err := p.Prepare(query) + if err != nil { + return nil, err + } + return &Stmt{Stmt: s, unsafe: isUnsafe(p), Mapper: mapperFor(p)}, err +} + +// Select executes a query using the provided Queryer, and StructScans each row +// into dest, which must be a slice. If the slice elements are scannable, then +// the result set must have only one column. Otherwise, StructScan is used. +// The *sql.Rows are closed automatically. +// Any placeholder parameters are replaced with supplied args. +func Select(q Queryer, dest interface{}, query string, args ...interface{}) error { + rows, err := q.Queryx(query, args...) + if err != nil { + return err + } + // if something happens here, we want to make sure the rows are Closed + defer rows.Close() + return scanAll(rows, dest, false) +} + +// Get does a QueryRow using the provided Queryer, and scans the resulting row +// to dest. If dest is scannable, the result must only have one column. Otherwise, +// StructScan is used. Get will return sql.ErrNoRows like row.Scan would. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func Get(q Queryer, dest interface{}, query string, args ...interface{}) error { + r := q.QueryRowx(query, args...) + return r.scanAny(dest, false) +} + +// LoadFile exec's every statement in a file (as a single call to Exec). +// LoadFile may return a nil *sql.Result if errors are encountered locating or +// reading the file at path. LoadFile reads the entire file into memory, so it +// is not suitable for loading large data dumps, but can be useful for initializing +// schemas or loading indexes. +// +// FIXME: this does not really work with multi-statement files for mattn/go-sqlite3 +// or the go-mysql-driver/mysql drivers; pq seems to be an exception here. Detecting +// this by requiring something with DriverName() and then attempting to split the +// queries will be difficult to get right, and its current driver-specific behavior +// is deemed at least not complex in its incorrectness. +func LoadFile(e Execer, path string) (*sql.Result, error) { + realpath, err := filepath.Abs(path) + if err != nil { + return nil, err + } + contents, err := ioutil.ReadFile(realpath) + if err != nil { + return nil, err + } + res, err := e.Exec(string(contents)) + return &res, err +} + +// MustExec execs the query using e and panics if there was an error. +// Any placeholder parameters are replaced with supplied args. +func MustExec(e Execer, query string, args ...interface{}) sql.Result { + res, err := e.Exec(query, args...) + if err != nil { + panic(err) + } + return res +} + +// SliceScan using this Rows. +func (r *Row) SliceScan() ([]interface{}, error) { + return SliceScan(r) +} + +// MapScan using this Rows. +func (r *Row) MapScan(dest map[string]interface{}) error { + return MapScan(r, dest) +} + +func (r *Row) scanAny(dest interface{}, structOnly bool) error { + if r.err != nil { + return r.err + } + if r.rows == nil { + r.err = sql.ErrNoRows + return r.err + } + defer r.rows.Close() + + v := reflect.ValueOf(dest) + if v.Kind() != reflect.Ptr { + return errors.New("must pass a pointer, not a value, to StructScan destination") + } + if v.IsNil() { + return errors.New("nil pointer passed to StructScan destination") + } + + base := reflectx.Deref(v.Type()) + scannable := isScannable(base) + + if structOnly && scannable { + return structOnlyError(base) + } + + columns, err := r.Columns() + if err != nil { + return err + } + + if scannable && len(columns) > 1 { + return fmt.Errorf("scannable dest type %s with >1 columns (%d) in result", base.Kind(), len(columns)) + } + + if scannable { + return r.Scan(dest) + } + + m := r.Mapper + + fields := m.TraversalsByName(v.Type(), columns) + // if we are not unsafe and are missing fields, return an error + if f, err := missingFields(fields); err != nil && !r.unsafe { + return fmt.Errorf("missing destination name %s in %T", columns[f], dest) + } + values := make([]interface{}, len(columns)) + + err = fieldsByTraversal(v, fields, values, true) + if err != nil { + return err + } + // scan into the struct field pointers and append to our results + return r.Scan(values...) +} + +// StructScan a single Row into dest. +func (r *Row) StructScan(dest interface{}) error { + return r.scanAny(dest, true) +} + +// SliceScan a row, returning a []interface{} with values similar to MapScan. +// This function is primarily intended for use where the number of columns +// is not known. Because you can pass an []interface{} directly to Scan, +// it's recommended that you do that as it will not have to allocate new +// slices per row. +func SliceScan(r ColScanner) ([]interface{}, error) { + // ignore r.started, since we needn't use reflect for anything. + columns, err := r.Columns() + if err != nil { + return []interface{}{}, err + } + + values := make([]interface{}, len(columns)) + for i := range values { + values[i] = new(interface{}) + } + + err = r.Scan(values...) + + if err != nil { + return values, err + } + + for i := range columns { + values[i] = *(values[i].(*interface{})) + } + + return values, r.Err() +} + +// MapScan scans a single Row into the dest map[string]interface{}. +// Use this to get results for SQL that might not be under your control +// (for instance, if you're building an interface for an SQL server that +// executes SQL from input). Please do not use this as a primary interface! +// This will modify the map sent to it in place, so reuse the same map with +// care. Columns which occur more than once in the result will overwrite +// each other! +func MapScan(r ColScanner, dest map[string]interface{}) error { + // ignore r.started, since we needn't use reflect for anything. + columns, err := r.Columns() + if err != nil { + return err + } + + values := make([]interface{}, len(columns)) + for i := range values { + values[i] = new(interface{}) + } + + err = r.Scan(values...) + if err != nil { + return err + } + + for i, column := range columns { + dest[column] = *(values[i].(*interface{})) + } + + return r.Err() +} + +type rowsi interface { + Close() error + Columns() ([]string, error) + Err() error + Next() bool + Scan(...interface{}) error +} + +// structOnlyError returns an error appropriate for type when a non-scannable +// struct is expected but something else is given +func structOnlyError(t reflect.Type) error { + isStruct := t.Kind() == reflect.Struct + isScanner := reflect.PtrTo(t).Implements(_scannerInterface) + if !isStruct { + return fmt.Errorf("expected %s but got %s", reflect.Struct, t.Kind()) + } + if isScanner { + return fmt.Errorf("structscan expects a struct dest but the provided struct type %s implements scanner", t.Name()) + } + return fmt.Errorf("expected a struct, but struct %s has no exported fields", t.Name()) +} + +// scanAll scans all rows into a destination, which must be a slice of any +// type. It resets the slice length to zero before appending each element to +// the slice. If the destination slice type is a Struct, then StructScan will +// be used on each row. If the destination is some other kind of base type, +// then each row must only have one column which can scan into that type. This +// allows you to do something like: +// +// rows, _ := db.Query("select id from people;") +// var ids []int +// scanAll(rows, &ids, false) +// +// and ids will be a list of the id results. I realize that this is a desirable +// interface to expose to users, but for now it will only be exposed via changes +// to `Get` and `Select`. The reason that this has been implemented like this is +// this is the only way to not duplicate reflect work in the new API while +// maintaining backwards compatibility. +func scanAll(rows rowsi, dest interface{}, structOnly bool) error { + var v, vp reflect.Value + + value := reflect.ValueOf(dest) + + // json.Unmarshal returns errors for these + if value.Kind() != reflect.Ptr { + return errors.New("must pass a pointer, not a value, to StructScan destination") + } + if value.IsNil() { + return errors.New("nil pointer passed to StructScan destination") + } + direct := reflect.Indirect(value) + + slice, err := baseType(value.Type(), reflect.Slice) + if err != nil { + return err + } + direct.SetLen(0) + + isPtr := slice.Elem().Kind() == reflect.Ptr + base := reflectx.Deref(slice.Elem()) + scannable := isScannable(base) + + if structOnly && scannable { + return structOnlyError(base) + } + + columns, err := rows.Columns() + if err != nil { + return err + } + + // if it's a base type make sure it only has 1 column; if not return an error + if scannable && len(columns) > 1 { + return fmt.Errorf("non-struct dest type %s with >1 columns (%d)", base.Kind(), len(columns)) + } + + if !scannable { + var values []interface{} + var m *reflectx.Mapper + + switch rows := rows.(type) { + case *Rows: + m = rows.Mapper + default: + m = mapper() + } + + fields := m.TraversalsByName(base, columns) + // if we are not unsafe and are missing fields, return an error + if f, err := missingFields(fields); err != nil && !isUnsafe(rows) { + return fmt.Errorf("missing destination name %s in %T", columns[f], dest) + } + values = make([]interface{}, len(columns)) + + for rows.Next() { + // create a new struct type (which returns PtrTo) and indirect it + vp = reflect.New(base) + v = reflect.Indirect(vp) + + err = fieldsByTraversal(v, fields, values, true) + if err != nil { + return err + } + + // scan into the struct field pointers and append to our results + err = rows.Scan(values...) + if err != nil { + return err + } + + if isPtr { + direct.Set(reflect.Append(direct, vp)) + } else { + direct.Set(reflect.Append(direct, v)) + } + } + } else { + for rows.Next() { + vp = reflect.New(base) + err = rows.Scan(vp.Interface()) + if err != nil { + return err + } + // append + if isPtr { + direct.Set(reflect.Append(direct, vp)) + } else { + direct.Set(reflect.Append(direct, reflect.Indirect(vp))) + } + } + } + + return rows.Err() +} + +// FIXME: StructScan was the very first bit of API in sqlx, and now unfortunately +// it doesn't really feel like it's named properly. There is an incongruency +// between this and the way that StructScan (which might better be ScanStruct +// anyway) works on a rows object. + +// StructScan all rows from an sql.Rows or an sqlx.Rows into the dest slice. +// StructScan will scan in the entire rows result, so if you do not want to +// allocate structs for the entire result, use Queryx and see sqlx.Rows.StructScan. +// If rows is sqlx.Rows, it will use its mapper, otherwise it will use the default. +func StructScan(rows rowsi, dest interface{}) error { + return scanAll(rows, dest, true) + +} + +// reflect helpers + +func baseType(t reflect.Type, expected reflect.Kind) (reflect.Type, error) { + t = reflectx.Deref(t) + if t.Kind() != expected { + return nil, fmt.Errorf("expected %s but got %s", expected, t.Kind()) + } + return t, nil +} + +// fieldsByName fills a values interface with fields from the passed value based +// on the traversals in int. If ptrs is true, return addresses instead of values. +// We write this instead of using FieldsByName to save allocations and map lookups +// when iterating over many rows. Empty traversals will get an interface pointer. +// Because of the necessity of requesting ptrs or values, it's considered a bit too +// specialized for inclusion in reflectx itself. +func fieldsByTraversal(v reflect.Value, traversals [][]int, values []interface{}, ptrs bool) error { + v = reflect.Indirect(v) + if v.Kind() != reflect.Struct { + return errors.New("argument not a struct") + } + + for i, traversal := range traversals { + if len(traversal) == 0 { + values[i] = new(interface{}) + continue + } + f := reflectx.FieldByIndexes(v, traversal) + if ptrs { + values[i] = f.Addr().Interface() + } else { + values[i] = f.Interface() + } + } + return nil +} + +func missingFields(transversals [][]int) (field int, err error) { + for i, t := range transversals { + if len(t) == 0 { + return i, errors.New("missing field") + } + } + return 0, nil +} diff --git a/vendor/github.com/jmoiron/sqlx/sqlx_context.go b/vendor/github.com/jmoiron/sqlx/sqlx_context.go new file mode 100644 index 000000000..32621d56d --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/sqlx_context.go @@ -0,0 +1,415 @@ +//go:build go1.8 +// +build go1.8 + +package sqlx + +import ( + "context" + "database/sql" + "fmt" + "io/ioutil" + "path/filepath" + "reflect" +) + +// ConnectContext to a database and verify with a ping. +func ConnectContext(ctx context.Context, driverName, dataSourceName string) (*DB, error) { + db, err := Open(driverName, dataSourceName) + if err != nil { + return db, err + } + err = db.PingContext(ctx) + return db, err +} + +// QueryerContext is an interface used by GetContext and SelectContext +type QueryerContext interface { + QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) + QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) + QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row +} + +// PreparerContext is an interface used by PreparexContext. +type PreparerContext interface { + PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) +} + +// ExecerContext is an interface used by MustExecContext and LoadFileContext +type ExecerContext interface { + ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) +} + +// ExtContext is a union interface which can bind, query, and exec, with Context +// used by NamedQueryContext and NamedExecContext. +type ExtContext interface { + binder + QueryerContext + ExecerContext +} + +// SelectContext executes a query using the provided Queryer, and StructScans +// each row into dest, which must be a slice. If the slice elements are +// scannable, then the result set must have only one column. Otherwise, +// StructScan is used. The *sql.Rows are closed automatically. +// Any placeholder parameters are replaced with supplied args. +func SelectContext(ctx context.Context, q QueryerContext, dest interface{}, query string, args ...interface{}) error { + rows, err := q.QueryxContext(ctx, query, args...) + if err != nil { + return err + } + // if something happens here, we want to make sure the rows are Closed + defer rows.Close() + return scanAll(rows, dest, false) +} + +// PreparexContext prepares a statement. +// +// The provided context is used for the preparation of the statement, not for +// the execution of the statement. +func PreparexContext(ctx context.Context, p PreparerContext, query string) (*Stmt, error) { + s, err := p.PrepareContext(ctx, query) + if err != nil { + return nil, err + } + return &Stmt{Stmt: s, unsafe: isUnsafe(p), Mapper: mapperFor(p)}, err +} + +// GetContext does a QueryRow using the provided Queryer, and scans the +// resulting row to dest. If dest is scannable, the result must only have one +// column. Otherwise, StructScan is used. Get will return sql.ErrNoRows like +// row.Scan would. Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func GetContext(ctx context.Context, q QueryerContext, dest interface{}, query string, args ...interface{}) error { + r := q.QueryRowxContext(ctx, query, args...) + return r.scanAny(dest, false) +} + +// LoadFileContext exec's every statement in a file (as a single call to Exec). +// LoadFileContext may return a nil *sql.Result if errors are encountered +// locating or reading the file at path. LoadFile reads the entire file into +// memory, so it is not suitable for loading large data dumps, but can be useful +// for initializing schemas or loading indexes. +// +// FIXME: this does not really work with multi-statement files for mattn/go-sqlite3 +// or the go-mysql-driver/mysql drivers; pq seems to be an exception here. Detecting +// this by requiring something with DriverName() and then attempting to split the +// queries will be difficult to get right, and its current driver-specific behavior +// is deemed at least not complex in its incorrectness. +func LoadFileContext(ctx context.Context, e ExecerContext, path string) (*sql.Result, error) { + realpath, err := filepath.Abs(path) + if err != nil { + return nil, err + } + contents, err := ioutil.ReadFile(realpath) + if err != nil { + return nil, err + } + res, err := e.ExecContext(ctx, string(contents)) + return &res, err +} + +// MustExecContext execs the query using e and panics if there was an error. +// Any placeholder parameters are replaced with supplied args. +func MustExecContext(ctx context.Context, e ExecerContext, query string, args ...interface{}) sql.Result { + res, err := e.ExecContext(ctx, query, args...) + if err != nil { + panic(err) + } + return res +} + +// PrepareNamedContext returns an sqlx.NamedStmt +func (db *DB) PrepareNamedContext(ctx context.Context, query string) (*NamedStmt, error) { + return prepareNamedContext(ctx, db, query) +} + +// NamedQueryContext using this DB. +// Any named placeholder parameters are replaced with fields from arg. +func (db *DB) NamedQueryContext(ctx context.Context, query string, arg interface{}) (*Rows, error) { + return NamedQueryContext(ctx, db, query, arg) +} + +// NamedExecContext using this DB. +// Any named placeholder parameters are replaced with fields from arg. +func (db *DB) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) { + return NamedExecContext(ctx, db, query, arg) +} + +// SelectContext using this DB. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { + return SelectContext(ctx, db, dest, query, args...) +} + +// GetContext using this DB. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (db *DB) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { + return GetContext(ctx, db, dest, query, args...) +} + +// PreparexContext returns an sqlx.Stmt instead of a sql.Stmt. +// +// The provided context is used for the preparation of the statement, not for +// the execution of the statement. +func (db *DB) PreparexContext(ctx context.Context, query string) (*Stmt, error) { + return PreparexContext(ctx, db, query) +} + +// QueryxContext queries the database and returns an *sqlx.Rows. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { + r, err := db.DB.QueryContext(ctx, query, args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: db.unsafe, Mapper: db.Mapper}, err +} + +// QueryRowxContext queries the database and returns an *sqlx.Row. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { + rows, err := db.DB.QueryContext(ctx, query, args...) + return &Row{rows: rows, err: err, unsafe: db.unsafe, Mapper: db.Mapper} +} + +// MustBeginTx starts a transaction, and panics on error. Returns an *sqlx.Tx instead +// of an *sql.Tx. +// +// The provided context is used until the transaction is committed or rolled +// back. If the context is canceled, the sql package will roll back the +// transaction. Tx.Commit will return an error if the context provided to +// MustBeginContext is canceled. +func (db *DB) MustBeginTx(ctx context.Context, opts *sql.TxOptions) *Tx { + tx, err := db.BeginTxx(ctx, opts) + if err != nil { + panic(err) + } + return tx +} + +// MustExecContext (panic) runs MustExec using this database. +// Any placeholder parameters are replaced with supplied args. +func (db *DB) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result { + return MustExecContext(ctx, db, query, args...) +} + +// BeginTxx begins a transaction and returns an *sqlx.Tx instead of an +// *sql.Tx. +// +// The provided context is used until the transaction is committed or rolled +// back. If the context is canceled, the sql package will roll back the +// transaction. Tx.Commit will return an error if the context provided to +// BeginxContext is canceled. +func (db *DB) BeginTxx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) { + tx, err := db.DB.BeginTx(ctx, opts) + if err != nil { + return nil, err + } + return &Tx{Tx: tx, driverName: db.driverName, unsafe: db.unsafe, Mapper: db.Mapper}, err +} + +// Connx returns an *sqlx.Conn instead of an *sql.Conn. +func (db *DB) Connx(ctx context.Context) (*Conn, error) { + conn, err := db.DB.Conn(ctx) + if err != nil { + return nil, err + } + + return &Conn{Conn: conn, driverName: db.driverName, unsafe: db.unsafe, Mapper: db.Mapper}, nil +} + +// BeginTxx begins a transaction and returns an *sqlx.Tx instead of an +// *sql.Tx. +// +// The provided context is used until the transaction is committed or rolled +// back. If the context is canceled, the sql package will roll back the +// transaction. Tx.Commit will return an error if the context provided to +// BeginxContext is canceled. +func (c *Conn) BeginTxx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) { + tx, err := c.Conn.BeginTx(ctx, opts) + if err != nil { + return nil, err + } + return &Tx{Tx: tx, driverName: c.driverName, unsafe: c.unsafe, Mapper: c.Mapper}, err +} + +// SelectContext using this Conn. +// Any placeholder parameters are replaced with supplied args. +func (c *Conn) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { + return SelectContext(ctx, c, dest, query, args...) +} + +// GetContext using this Conn. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (c *Conn) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { + return GetContext(ctx, c, dest, query, args...) +} + +// PreparexContext returns an sqlx.Stmt instead of a sql.Stmt. +// +// The provided context is used for the preparation of the statement, not for +// the execution of the statement. +func (c *Conn) PreparexContext(ctx context.Context, query string) (*Stmt, error) { + return PreparexContext(ctx, c, query) +} + +// QueryxContext queries the database and returns an *sqlx.Rows. +// Any placeholder parameters are replaced with supplied args. +func (c *Conn) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { + r, err := c.Conn.QueryContext(ctx, query, args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: c.unsafe, Mapper: c.Mapper}, err +} + +// QueryRowxContext queries the database and returns an *sqlx.Row. +// Any placeholder parameters are replaced with supplied args. +func (c *Conn) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { + rows, err := c.Conn.QueryContext(ctx, query, args...) + return &Row{rows: rows, err: err, unsafe: c.unsafe, Mapper: c.Mapper} +} + +// Rebind a query within a Conn's bindvar type. +func (c *Conn) Rebind(query string) string { + return Rebind(BindType(c.driverName), query) +} + +// StmtxContext returns a version of the prepared statement which runs within a +// transaction. Provided stmt can be either *sql.Stmt or *sqlx.Stmt. +func (tx *Tx) StmtxContext(ctx context.Context, stmt interface{}) *Stmt { + var s *sql.Stmt + switch v := stmt.(type) { + case Stmt: + s = v.Stmt + case *Stmt: + s = v.Stmt + case *sql.Stmt: + s = v + default: + panic(fmt.Sprintf("non-statement type %v passed to Stmtx", reflect.ValueOf(stmt).Type())) + } + return &Stmt{Stmt: tx.StmtContext(ctx, s), Mapper: tx.Mapper} +} + +// NamedStmtContext returns a version of the prepared statement which runs +// within a transaction. +func (tx *Tx) NamedStmtContext(ctx context.Context, stmt *NamedStmt) *NamedStmt { + return &NamedStmt{ + QueryString: stmt.QueryString, + Params: stmt.Params, + Stmt: tx.StmtxContext(ctx, stmt.Stmt), + } +} + +// PreparexContext returns an sqlx.Stmt instead of a sql.Stmt. +// +// The provided context is used for the preparation of the statement, not for +// the execution of the statement. +func (tx *Tx) PreparexContext(ctx context.Context, query string) (*Stmt, error) { + return PreparexContext(ctx, tx, query) +} + +// PrepareNamedContext returns an sqlx.NamedStmt +func (tx *Tx) PrepareNamedContext(ctx context.Context, query string) (*NamedStmt, error) { + return prepareNamedContext(ctx, tx, query) +} + +// MustExecContext runs MustExecContext within a transaction. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result { + return MustExecContext(ctx, tx, query, args...) +} + +// QueryxContext within a transaction and context. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { + r, err := tx.Tx.QueryContext(ctx, query, args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: tx.unsafe, Mapper: tx.Mapper}, err +} + +// SelectContext within a transaction and context. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { + return SelectContext(ctx, tx, dest, query, args...) +} + +// GetContext within a transaction and context. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (tx *Tx) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { + return GetContext(ctx, tx, dest, query, args...) +} + +// QueryRowxContext within a transaction and context. +// Any placeholder parameters are replaced with supplied args. +func (tx *Tx) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { + rows, err := tx.Tx.QueryContext(ctx, query, args...) + return &Row{rows: rows, err: err, unsafe: tx.unsafe, Mapper: tx.Mapper} +} + +// NamedExecContext using this Tx. +// Any named placeholder parameters are replaced with fields from arg. +func (tx *Tx) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) { + return NamedExecContext(ctx, tx, query, arg) +} + +// SelectContext using the prepared statement. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) SelectContext(ctx context.Context, dest interface{}, args ...interface{}) error { + return SelectContext(ctx, &qStmt{s}, dest, "", args...) +} + +// GetContext using the prepared statement. +// Any placeholder parameters are replaced with supplied args. +// An error is returned if the result set is empty. +func (s *Stmt) GetContext(ctx context.Context, dest interface{}, args ...interface{}) error { + return GetContext(ctx, &qStmt{s}, dest, "", args...) +} + +// MustExecContext (panic) using this statement. Note that the query portion of +// the error output will be blank, as Stmt does not expose its query. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) MustExecContext(ctx context.Context, args ...interface{}) sql.Result { + return MustExecContext(ctx, &qStmt{s}, "", args...) +} + +// QueryRowxContext using this statement. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) QueryRowxContext(ctx context.Context, args ...interface{}) *Row { + qs := &qStmt{s} + return qs.QueryRowxContext(ctx, "", args...) +} + +// QueryxContext using this statement. +// Any placeholder parameters are replaced with supplied args. +func (s *Stmt) QueryxContext(ctx context.Context, args ...interface{}) (*Rows, error) { + qs := &qStmt{s} + return qs.QueryxContext(ctx, "", args...) +} + +func (q *qStmt) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) { + return q.Stmt.QueryContext(ctx, args...) +} + +func (q *qStmt) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { + r, err := q.Stmt.QueryContext(ctx, args...) + if err != nil { + return nil, err + } + return &Rows{Rows: r, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper}, err +} + +func (q *qStmt) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { + rows, err := q.Stmt.QueryContext(ctx, args...) + return &Row{rows: rows, err: err, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper} +} + +func (q *qStmt) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) { + return q.Stmt.ExecContext(ctx, args...) +} diff --git a/vendor/github.com/lann/builder/.gitignore b/vendor/github.com/lann/builder/.gitignore new file mode 100644 index 000000000..f54eb28f6 --- /dev/null +++ b/vendor/github.com/lann/builder/.gitignore @@ -0,0 +1,2 @@ +*~ +\#*# diff --git a/vendor/github.com/lann/builder/.travis.yml b/vendor/github.com/lann/builder/.travis.yml new file mode 100644 index 000000000..c8860f69b --- /dev/null +++ b/vendor/github.com/lann/builder/.travis.yml @@ -0,0 +1,7 @@ +language: go + +go: + - '1.8' + - '1.9' + - '1.10' + - tip diff --git a/vendor/github.com/lann/builder/LICENSE b/vendor/github.com/lann/builder/LICENSE new file mode 100644 index 000000000..a109e8051 --- /dev/null +++ b/vendor/github.com/lann/builder/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-2015 Lann Martin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/lann/builder/README.md b/vendor/github.com/lann/builder/README.md new file mode 100644 index 000000000..3b18550bb --- /dev/null +++ b/vendor/github.com/lann/builder/README.md @@ -0,0 +1,68 @@ +# Builder - fluent immutable builders for Go + +[![GoDoc](https://godoc.org/github.com/lann/builder?status.png)](https://godoc.org/github.com/lann/builder) +[![Build Status](https://travis-ci.org/lann/builder.png?branch=master)](https://travis-ci.org/lann/builder) + +Builder was originally written for +[Squirrel](https://github.com/lann/squirrel), a fluent SQL generator. It +is probably the best example of Builder in action. + +Builder helps you write **fluent** DSLs for your libraries with method chaining: + +```go +resp := ReqBuilder. + Url("http://golang.org"). + Header("User-Agent", "Builder"). + Get() +``` + +Builder uses **immutable** persistent data structures +([these](https://github.com/mndrix/ps), specifically) +so that each step in your method chain can be reused: + +```go +build := WordBuilder.AddLetters("Build") +builder := build.AddLetters("er") +building := build.AddLetters("ing") +``` + +Builder makes it easy to **build** structs using the **builder** pattern +(*surprise!*): + +```go +import "github.com/lann/builder" + +type Muppet struct { + Name string + Friends []string +} + +type muppetBuilder builder.Builder + +func (b muppetBuilder) Name(name string) muppetBuilder { + return builder.Set(b, "Name", name).(muppetBuilder) +} + +func (b muppetBuilder) AddFriend(friend string) muppetBuilder { + return builder.Append(b, "Friends", friend).(muppetBuilder) +} + +func (b muppetBuilder) Build() Muppet { + return builder.GetStruct(b).(Muppet) +} + +var MuppetBuilder = builder.Register(muppetBuilder{}, Muppet{}).(muppetBuilder) +``` +```go +MuppetBuilder. + Name("Beaker"). + AddFriend("Dr. Honeydew"). + Build() + +=> Muppet{Name:"Beaker", Friends:[]string{"Dr. Honeydew"}} +``` + +## License + +Builder is released under the +[MIT License](http://www.opensource.org/licenses/MIT). diff --git a/vendor/github.com/lann/builder/builder.go b/vendor/github.com/lann/builder/builder.go new file mode 100644 index 000000000..ff621406a --- /dev/null +++ b/vendor/github.com/lann/builder/builder.go @@ -0,0 +1,225 @@ +// Package builder provides a method for writing fluent immutable builders. +package builder + +import ( + "github.com/lann/ps" + "go/ast" + "reflect" +) + +// Builder stores a set of named values. +// +// New types can be declared with underlying type Builder and used with the +// functions in this package. See example. +// +// Instances of Builder should be treated as immutable. It is up to the +// implementor to ensure mutable values set on a Builder are not mutated while +// the Builder is in use. +type Builder struct { + builderMap ps.Map +} + +var ( + EmptyBuilder = Builder{ps.NewMap()} + emptyBuilderValue = reflect.ValueOf(EmptyBuilder) +) + +func getBuilderMap(builder interface{}) ps.Map { + b := convert(builder, Builder{}).(Builder) + + if b.builderMap == nil { + return ps.NewMap() + } + + return b.builderMap +} + +// Set returns a copy of the given builder with a new value set for the given +// name. +// +// Set (and all other functions taking a builder in this package) will panic if +// the given builder's underlying type is not Builder. +func Set(builder interface{}, name string, v interface{}) interface{} { + b := Builder{getBuilderMap(builder).Set(name, v)} + return convert(b, builder) +} + +// Delete returns a copy of the given builder with the given named value unset. +func Delete(builder interface{}, name string) interface{} { + b := Builder{getBuilderMap(builder).Delete(name)} + return convert(b, builder) +} + +// Append returns a copy of the given builder with new value(s) appended to the +// named list. If the value was previously unset or set with Set (even to a e.g. +// slice values), the new value(s) will be appended to an empty list. +func Append(builder interface{}, name string, vs ...interface{}) interface{} { + return Extend(builder, name, vs) +} + +// Extend behaves like Append, except it takes a single slice or array value +// which will be concatenated to the named list. +// +// Unlike a variadic call to Append - which requires a []interface{} value - +// Extend accepts slices or arrays of any type. +// +// Extend will panic if the given value is not a slice, array, or nil. +func Extend(builder interface{}, name string, vs interface{}) interface{} { + if vs == nil { + return builder + } + + maybeList, ok := getBuilderMap(builder).Lookup(name) + + var list ps.List + if ok { + list, ok = maybeList.(ps.List) + } + if !ok { + list = ps.NewList() + } + + forEach(vs, func(v interface{}) { + list = list.Cons(v) + }) + + return Set(builder, name, list) +} + +func listToSlice(list ps.List, arrayType reflect.Type) reflect.Value { + size := list.Size() + slice := reflect.MakeSlice(arrayType, size, size) + for i := size - 1; i >= 0; i-- { + val := reflect.ValueOf(list.Head()) + slice.Index(i).Set(val) + list = list.Tail() + } + return slice +} + +var anyArrayType = reflect.TypeOf([]interface{}{}) + +// Get retrieves a single named value from the given builder. +// If the value has not been set, it returns (nil, false). Otherwise, it will +// return (value, true). +// +// If the named value was last set with Append or Extend, the returned value +// will be a slice. If the given Builder has been registered with Register or +// RegisterType and the given name is an exported field of the registered +// struct, the returned slice will have the same type as that field. Otherwise +// the slice will have type []interface{}. It will panic if the given name is a +// registered struct's exported field and the value set on the Builder is not +// assignable to the field. +func Get(builder interface{}, name string) (interface{}, bool) { + val, ok := getBuilderMap(builder).Lookup(name) + if !ok { + return nil, false + } + + list, isList := val.(ps.List) + if isList { + arrayType := anyArrayType + + if ast.IsExported(name) { + structType := getBuilderStructType(reflect.TypeOf(builder)) + if structType != nil { + field, ok := (*structType).FieldByName(name) + if ok { + arrayType = field.Type + } + } + } + + val = listToSlice(list, arrayType).Interface() + } + + return val, true +} + +// GetMap returns a map[string]interface{} of the values set in the given +// builder. +// +// See notes on Get regarding returned slices. +func GetMap(builder interface{}) map[string]interface{} { + m := getBuilderMap(builder) + structType := getBuilderStructType(reflect.TypeOf(builder)) + + ret := make(map[string]interface{}, m.Size()) + + m.ForEach(func(name string, val ps.Any) { + list, isList := val.(ps.List) + if isList { + arrayType := anyArrayType + + if structType != nil { + field, ok := (*structType).FieldByName(name) + if ok { + arrayType = field.Type + } + } + + val = listToSlice(list, arrayType).Interface() + } + + ret[name] = val + }) + + return ret +} + +// GetStruct builds a new struct from the given registered builder. +// It will return nil if the given builder's type has not been registered with +// Register or RegisterValue. +// +// All values set on the builder with names that start with an uppercase letter +// (i.e. which would be exported if they were identifiers) are assigned to the +// corresponding exported fields of the struct. +// +// GetStruct will panic if any of these "exported" values are not assignable to +// their corresponding struct fields. +func GetStruct(builder interface{}) interface{} { + structVal := newBuilderStruct(reflect.TypeOf(builder)) + if structVal == nil { + return nil + } + return scanStruct(builder, structVal) +} + +// GetStructLike builds a new struct from the given builder with the same type +// as the given struct. +// +// All values set on the builder with names that start with an uppercase letter +// (i.e. which would be exported if they were identifiers) are assigned to the +// corresponding exported fields of the struct. +// +// ScanStruct will panic if any of these "exported" values are not assignable to +// their corresponding struct fields. +func GetStructLike(builder interface{}, strct interface{}) interface{} { + structVal := reflect.New(reflect.TypeOf(strct)).Elem() + return scanStruct(builder, &structVal) +} + +func scanStruct(builder interface{}, structVal *reflect.Value) interface{} { + getBuilderMap(builder).ForEach(func(name string, val ps.Any) { + if ast.IsExported(name) { + field := structVal.FieldByName(name) + + var value reflect.Value + switch v := val.(type) { + case nil: + switch field.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + value = reflect.Zero(field.Type()) + } + // nil is not valid for this Type; Set will panic + case ps.List: + value = listToSlice(v, field.Type()) + default: + value = reflect.ValueOf(val) + } + field.Set(value) + } + }) + + return structVal.Interface() +} diff --git a/vendor/github.com/lann/builder/reflect.go b/vendor/github.com/lann/builder/reflect.go new file mode 100644 index 000000000..3b236e791 --- /dev/null +++ b/vendor/github.com/lann/builder/reflect.go @@ -0,0 +1,24 @@ +package builder + +import "reflect" + +func convert(from interface{}, to interface{}) interface{} { + return reflect. + ValueOf(from). + Convert(reflect.TypeOf(to)). + Interface() +} + +func forEach(s interface{}, f func(interface{})) { + val := reflect.ValueOf(s) + + kind := val.Kind() + if kind != reflect.Slice && kind != reflect.Array { + panic(&reflect.ValueError{Method: "builder.forEach", Kind: kind}) + } + + l := val.Len() + for i := 0; i < l; i++ { + f(val.Index(i).Interface()) + } +} diff --git a/vendor/github.com/lann/builder/registry.go b/vendor/github.com/lann/builder/registry.go new file mode 100644 index 000000000..612845418 --- /dev/null +++ b/vendor/github.com/lann/builder/registry.go @@ -0,0 +1,59 @@ +package builder + +import ( + "reflect" + "sync" +) + +var ( + registry = make(map[reflect.Type]reflect.Type) + registryMux sync.RWMutex +) + +// RegisterType maps the given builderType to a structType. +// This mapping affects the type of slices returned by Get and is required for +// GetStruct to work. +// +// Returns a Value containing an empty instance of the registered builderType. +// +// RegisterType will panic if builderType's underlying type is not Builder or +// if structType's Kind is not Struct. +func RegisterType(builderType reflect.Type, structType reflect.Type) *reflect.Value { + registryMux.Lock() + defer registryMux.Unlock() + structType.NumField() // Panic if structType is not a struct + registry[builderType] = structType + emptyValue := emptyBuilderValue.Convert(builderType) + return &emptyValue +} + +// Register wraps RegisterType, taking instances instead of Types. +// +// Returns an empty instance of the registered builder type which can be used +// as the initial value for builder expressions. See example. +func Register(builderProto, structProto interface{}) interface{} { + empty := RegisterType( + reflect.TypeOf(builderProto), + reflect.TypeOf(structProto), + ).Interface() + return empty +} + +func getBuilderStructType(builderType reflect.Type) *reflect.Type { + registryMux.RLock() + defer registryMux.RUnlock() + structType, ok := registry[builderType] + if !ok { + return nil + } + return &structType +} + +func newBuilderStruct(builderType reflect.Type) *reflect.Value { + structType := getBuilderStructType(builderType) + if structType == nil { + return nil + } + newStruct := reflect.New(*structType).Elem() + return &newStruct +} diff --git a/vendor/github.com/lann/ps/LICENSE b/vendor/github.com/lann/ps/LICENSE new file mode 100644 index 000000000..69f9ae8d5 --- /dev/null +++ b/vendor/github.com/lann/ps/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Michael Hendricks + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/lann/ps/README.md b/vendor/github.com/lann/ps/README.md new file mode 100644 index 000000000..325a5b354 --- /dev/null +++ b/vendor/github.com/lann/ps/README.md @@ -0,0 +1,10 @@ +**This is a stable fork of https://github.com/mndrix/ps; it will not introduce breaking changes.** + +ps +== + +Persistent data structures for Go. See the [full package documentation](http://godoc.org/github.com/lann/ps) + +Install with + + go get github.com/lann/ps diff --git a/vendor/github.com/lann/ps/list.go b/vendor/github.com/lann/ps/list.go new file mode 100644 index 000000000..48a1cebac --- /dev/null +++ b/vendor/github.com/lann/ps/list.go @@ -0,0 +1,93 @@ +package ps + +// List is a persistent list of possibly heterogenous values. +type List interface { + // IsNil returns true if the list is empty + IsNil() bool + + // Cons returns a new list with val as the head + Cons(val Any) List + + // Head returns the first element of the list; + // panics if the list is empty + Head() Any + + // Tail returns a list with all elements except the head; + // panics if the list is empty + Tail() List + + // Size returns the list's length. This takes O(1) time. + Size() int + + // ForEach executes a callback for each value in the list. + ForEach(f func(Any)) + + // Reverse returns a list whose elements are in the opposite order as + // the original list. + Reverse() List +} + +// Immutable (i.e. persistent) list +type list struct { + depth int // the number of nodes after, and including, this one + value Any + tail *list +} + +// An empty list shared by all lists +var nilList = &list{} + +// NewList returns a new, empty list. The result is a singly linked +// list implementation. All lists share an empty tail, so allocating +// empty lists is efficient in time and memory. +func NewList() List { + return nilList +} + +func (self *list) IsNil() bool { + return self == nilList +} + +func (self *list) Size() int { + return self.depth +} + +func (tail *list) Cons(val Any) List { + var xs list + xs.depth = tail.depth + 1 + xs.value = val + xs.tail = tail + return &xs +} + +func (self *list) Head() Any { + if self.IsNil() { + panic("Called Head() on an empty list") + } + + return self.value +} + +func (self *list) Tail() List { + if self.IsNil() { + panic("Called Tail() on an empty list") + } + + return self.tail +} + +// ForEach executes a callback for each value in the list +func (self *list) ForEach(f func(Any)) { + if self.IsNil() { + return + } + f(self.Head()) + self.Tail().ForEach(f) +} + +// Reverse returns a list with elements in opposite order as this list +func (self *list) Reverse() List { + reversed := NewList() + self.ForEach(func(v Any) { reversed = reversed.Cons(v) }) + return reversed +} diff --git a/vendor/github.com/lann/ps/map.go b/vendor/github.com/lann/ps/map.go new file mode 100644 index 000000000..192daec8f --- /dev/null +++ b/vendor/github.com/lann/ps/map.go @@ -0,0 +1,311 @@ +// Fully persistent data structures. A persistent data structure is a data +// structure that always preserves the previous version of itself when +// it is modified. Such data structures are effectively immutable, +// as their operations do not update the structure in-place, but instead +// always yield a new structure. +// +// Persistent +// data structures typically share structure among themselves. This allows +// operations to avoid copying the entire data structure. +package ps + +import ( + "bytes" + "fmt" +) + +// Any is a shorthand for Go's verbose interface{} type. +type Any interface{} + +// A Map associates unique keys (type string) with values (type Any). +type Map interface { + // IsNil returns true if the Map is empty + IsNil() bool + + // Set returns a new map in which key and value are associated. + // If the key didn't exist before, it's created; otherwise, the + // associated value is changed. + // This operation is O(log N) in the number of keys. + Set(key string, value Any) Map + + // Delete returns a new map with the association for key, if any, removed. + // This operation is O(log N) in the number of keys. + Delete(key string) Map + + // Lookup returns the value associated with a key, if any. If the key + // exists, the second return value is true; otherwise, false. + // This operation is O(log N) in the number of keys. + Lookup(key string) (Any, bool) + + // Size returns the number of key value pairs in the map. + // This takes O(1) time. + Size() int + + // ForEach executes a callback on each key value pair in the map. + ForEach(f func(key string, val Any)) + + // Keys returns a slice with all keys in this map. + // This operation is O(N) in the number of keys. + Keys() []string + + String() string +} + +// Immutable (i.e. persistent) associative array +const childCount = 8 +const shiftSize = 3 + +type tree struct { + count int + hash uint64 // hash of the key (used for tree balancing) + key string + value Any + children [childCount]*tree +} + +var nilMap = &tree{} + +// Recursively set nilMap's subtrees to point at itself. +// This eliminates all nil pointers in the map structure. +// All map nodes are created by cloning this structure so +// they avoid the problem too. +func init() { + for i := range nilMap.children { + nilMap.children[i] = nilMap + } +} + +// NewMap allocates a new, persistent map from strings to values of +// any type. +// This is currently implemented as a path-copying binary tree. +func NewMap() Map { + return nilMap +} + +func (self *tree) IsNil() bool { + return self == nilMap +} + +// clone returns an exact duplicate of a tree node +func (self *tree) clone() *tree { + var m tree + m = *self + return &m +} + +// constants for FNV-1a hash algorithm +const ( + offset64 uint64 = 14695981039346656037 + prime64 uint64 = 1099511628211 +) + +// hashKey returns a hash code for a given string +func hashKey(key string) uint64 { + hash := offset64 + for _, codepoint := range key { + hash ^= uint64(codepoint) + hash *= prime64 + } + return hash +} + +// Set returns a new map similar to this one but with key and value +// associated. If the key didn't exist, it's created; otherwise, the +// associated value is changed. +func (self *tree) Set(key string, value Any) Map { + hash := hashKey(key) + return setLowLevel(self, hash, hash, key, value) +} + +func setLowLevel(self *tree, partialHash, hash uint64, key string, value Any) *tree { + if self.IsNil() { // an empty tree is easy + m := self.clone() + m.count = 1 + m.hash = hash + m.key = key + m.value = value + return m + } + + if hash != self.hash { + m := self.clone() + i := partialHash % childCount + m.children[i] = setLowLevel(self.children[i], partialHash>>shiftSize, hash, key, value) + recalculateCount(m) + return m + } + + // replacing a key's previous value + m := self.clone() + m.value = value + return m +} + +// modifies a map by recalculating its key count based on the counts +// of its subtrees +func recalculateCount(m *tree) { + count := 0 + for _, t := range m.children { + count += t.Size() + } + m.count = count + 1 // add one to count ourself +} + +func (m *tree) Delete(key string) Map { + hash := hashKey(key) + newMap, _ := deleteLowLevel(m, hash, hash) + return newMap +} + +func deleteLowLevel(self *tree, partialHash, hash uint64) (*tree, bool) { + // empty trees are easy + if self.IsNil() { + return self, false + } + + if hash != self.hash { + i := partialHash % childCount + child, found := deleteLowLevel(self.children[i], partialHash>>shiftSize, hash) + if !found { + return self, false + } + newMap := self.clone() + newMap.children[i] = child + recalculateCount(newMap) + return newMap, true // ? this wasn't in the original code + } + + // we must delete our own node + if self.isLeaf() { // we have no children + return nilMap, true + } + /* + if self.subtreeCount() == 1 { // only one subtree + for _, t := range self.children { + if t != nilMap { + return t, true + } + } + panic("Tree with 1 subtree actually had no subtrees") + } + */ + + // find a node to replace us + i := -1 + size := -1 + for j, t := range self.children { + if t.Size() > size { + i = j + size = t.Size() + } + } + + // make chosen leaf smaller + replacement, child := self.children[i].deleteLeftmost() + newMap := replacement.clone() + for j := range self.children { + if j == i { + newMap.children[j] = child + } else { + newMap.children[j] = self.children[j] + } + } + recalculateCount(newMap) + return newMap, true +} + +// delete the leftmost node in a tree returning the node that +// was deleted and the tree left over after its deletion +func (m *tree) deleteLeftmost() (*tree, *tree) { + if m.isLeaf() { + return m, nilMap + } + + for i, t := range m.children { + if t != nilMap { + deleted, child := t.deleteLeftmost() + newMap := m.clone() + newMap.children[i] = child + recalculateCount(newMap) + return deleted, newMap + } + } + panic("Tree isn't a leaf but also had no children. How does that happen?") +} + +// isLeaf returns true if this is a leaf node +func (m *tree) isLeaf() bool { + return m.Size() == 1 +} + +// returns the number of child subtrees we have +func (m *tree) subtreeCount() int { + count := 0 + for _, t := range m.children { + if t != nilMap { + count++ + } + } + return count +} + +func (m *tree) Lookup(key string) (Any, bool) { + hash := hashKey(key) + return lookupLowLevel(m, hash, hash) +} + +func lookupLowLevel(self *tree, partialHash, hash uint64) (Any, bool) { + if self.IsNil() { // an empty tree is easy + return nil, false + } + + if hash != self.hash { + i := partialHash % childCount + return lookupLowLevel(self.children[i], partialHash>>shiftSize, hash) + } + + // we found it + return self.value, true +} + +func (m *tree) Size() int { + return m.count +} + +func (m *tree) ForEach(f func(key string, val Any)) { + if m.IsNil() { + return + } + + // ourself + f(m.key, m.value) + + // children + for _, t := range m.children { + if t != nilMap { + t.ForEach(f) + } + } +} + +func (m *tree) Keys() []string { + keys := make([]string, m.Size()) + i := 0 + m.ForEach(func(k string, v Any) { + keys[i] = k + i++ + }) + return keys +} + +// make it easier to display maps for debugging +func (m *tree) String() string { + keys := m.Keys() + buf := bytes.NewBufferString("{") + for _, key := range keys { + val, _ := m.Lookup(key) + fmt.Fprintf(buf, "%s: %s, ", key, val) + } + fmt.Fprintf(buf, "}\n") + return buf.String() +} diff --git a/vendor/github.com/lann/ps/profile.sh b/vendor/github.com/lann/ps/profile.sh new file mode 100644 index 000000000..f03df05a5 --- /dev/null +++ b/vendor/github.com/lann/ps/profile.sh @@ -0,0 +1,3 @@ +#!/bin/sh +go test -c +./ps.test -test.run=none -test.bench=$2 -test.$1profile=$1.profile diff --git a/vendor/github.com/lib/pq/.gitignore b/vendor/github.com/lib/pq/.gitignore new file mode 100644 index 000000000..3243952a4 --- /dev/null +++ b/vendor/github.com/lib/pq/.gitignore @@ -0,0 +1,6 @@ +.db +*.test +*~ +*.swp +.idea +.vscode \ No newline at end of file diff --git a/vendor/github.com/lib/pq/LICENSE.md b/vendor/github.com/lib/pq/LICENSE.md new file mode 100644 index 000000000..5773904a3 --- /dev/null +++ b/vendor/github.com/lib/pq/LICENSE.md @@ -0,0 +1,8 @@ +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/lib/pq/README.md b/vendor/github.com/lib/pq/README.md new file mode 100644 index 000000000..126ee5d35 --- /dev/null +++ b/vendor/github.com/lib/pq/README.md @@ -0,0 +1,36 @@ +# pq - A pure Go postgres driver for Go's database/sql package + +[![GoDoc](https://godoc.org/github.com/lib/pq?status.svg)](https://pkg.go.dev/github.com/lib/pq?tab=doc) + +## Install + + go get github.com/lib/pq + +## Features + +* SSL +* Handles bad connections for `database/sql` +* Scan `time.Time` correctly (i.e. `timestamp[tz]`, `time[tz]`, `date`) +* Scan binary blobs correctly (i.e. `bytea`) +* Package for `hstore` support +* COPY FROM support +* pq.ParseURL for converting urls to connection strings for sql.Open. +* Many libpq compatible environment variables +* Unix socket support +* Notifications: `LISTEN`/`NOTIFY` +* pgpass support +* GSS (Kerberos) auth + +## Tests + +`go test` is used for testing. See [TESTS.md](TESTS.md) for more details. + +## Status + +This package is currently in maintenance mode, which means: +1. It generally does not accept new features. +2. It does accept bug fixes and version compatability changes provided by the community. +3. Maintainers usually do not resolve reported issues. +4. Community members are encouraged to help each other with reported issues. + +For users that require new features or reliable resolution of reported bugs, we recommend using [pgx](https://github.com/jackc/pgx) which is under active development. diff --git a/vendor/github.com/lib/pq/TESTS.md b/vendor/github.com/lib/pq/TESTS.md new file mode 100644 index 000000000..f05021115 --- /dev/null +++ b/vendor/github.com/lib/pq/TESTS.md @@ -0,0 +1,33 @@ +# Tests + +## Running Tests + +`go test` is used for testing. A running PostgreSQL +server is required, with the ability to log in. The +database to connect to test with is "pqgotest," on +"localhost" but these can be overridden using [environment +variables](https://www.postgresql.org/docs/9.3/static/libpq-envars.html). + +Example: + + PGHOST=/run/postgresql go test + +## Benchmarks + +A benchmark suite can be run as part of the tests: + + go test -bench . + +## Example setup (Docker) + +Run a postgres container: + +``` +docker run --expose 5432:5432 postgres +``` + +Run tests: + +``` +PGHOST=localhost PGPORT=5432 PGUSER=postgres PGSSLMODE=disable PGDATABASE=postgres go test +``` diff --git a/vendor/github.com/lib/pq/array.go b/vendor/github.com/lib/pq/array.go new file mode 100644 index 000000000..39c8f7e2e --- /dev/null +++ b/vendor/github.com/lib/pq/array.go @@ -0,0 +1,895 @@ +package pq + +import ( + "bytes" + "database/sql" + "database/sql/driver" + "encoding/hex" + "fmt" + "reflect" + "strconv" + "strings" +) + +var typeByteSlice = reflect.TypeOf([]byte{}) +var typeDriverValuer = reflect.TypeOf((*driver.Valuer)(nil)).Elem() +var typeSQLScanner = reflect.TypeOf((*sql.Scanner)(nil)).Elem() + +// Array returns the optimal driver.Valuer and sql.Scanner for an array or +// slice of any dimension. +// +// For example: +// db.Query(`SELECT * FROM t WHERE id = ANY($1)`, pq.Array([]int{235, 401})) +// +// var x []sql.NullInt64 +// db.QueryRow(`SELECT ARRAY[235, 401]`).Scan(pq.Array(&x)) +// +// Scanning multi-dimensional arrays is not supported. Arrays where the lower +// bound is not one (such as `[0:0]={1}') are not supported. +func Array(a interface{}) interface { + driver.Valuer + sql.Scanner +} { + switch a := a.(type) { + case []bool: + return (*BoolArray)(&a) + case []float64: + return (*Float64Array)(&a) + case []float32: + return (*Float32Array)(&a) + case []int64: + return (*Int64Array)(&a) + case []int32: + return (*Int32Array)(&a) + case []string: + return (*StringArray)(&a) + case [][]byte: + return (*ByteaArray)(&a) + + case *[]bool: + return (*BoolArray)(a) + case *[]float64: + return (*Float64Array)(a) + case *[]float32: + return (*Float32Array)(a) + case *[]int64: + return (*Int64Array)(a) + case *[]int32: + return (*Int32Array)(a) + case *[]string: + return (*StringArray)(a) + case *[][]byte: + return (*ByteaArray)(a) + } + + return GenericArray{a} +} + +// ArrayDelimiter may be optionally implemented by driver.Valuer or sql.Scanner +// to override the array delimiter used by GenericArray. +type ArrayDelimiter interface { + // ArrayDelimiter returns the delimiter character(s) for this element's type. + ArrayDelimiter() string +} + +// BoolArray represents a one-dimensional array of the PostgreSQL boolean type. +type BoolArray []bool + +// Scan implements the sql.Scanner interface. +func (a *BoolArray) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to BoolArray", src) +} + +func (a *BoolArray) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "BoolArray") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(BoolArray, len(elems)) + for i, v := range elems { + if len(v) != 1 { + return fmt.Errorf("pq: could not parse boolean array index %d: invalid boolean %q", i, v) + } + switch v[0] { + case 't': + b[i] = true + case 'f': + b[i] = false + default: + return fmt.Errorf("pq: could not parse boolean array index %d: invalid boolean %q", i, v) + } + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. +func (a BoolArray) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be exactly two curly brackets, N bytes of values, + // and N-1 bytes of delimiters. + b := make([]byte, 1+2*n) + + for i := 0; i < n; i++ { + b[2*i] = ',' + if a[i] { + b[1+2*i] = 't' + } else { + b[1+2*i] = 'f' + } + } + + b[0] = '{' + b[2*n] = '}' + + return string(b), nil + } + + return "{}", nil +} + +// ByteaArray represents a one-dimensional array of the PostgreSQL bytea type. +type ByteaArray [][]byte + +// Scan implements the sql.Scanner interface. +func (a *ByteaArray) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to ByteaArray", src) +} + +func (a *ByteaArray) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "ByteaArray") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(ByteaArray, len(elems)) + for i, v := range elems { + b[i], err = parseBytea(v) + if err != nil { + return fmt.Errorf("could not parse bytea array index %d: %s", i, err.Error()) + } + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. It uses the "hex" format which +// is only supported on PostgreSQL 9.0 or newer. +func (a ByteaArray) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be at least two curly brackets, 2*N bytes of quotes, + // 3*N bytes of hex formatting, and N-1 bytes of delimiters. + size := 1 + 6*n + for _, x := range a { + size += hex.EncodedLen(len(x)) + } + + b := make([]byte, size) + + for i, s := 0, b; i < n; i++ { + o := copy(s, `,"\\x`) + o += hex.Encode(s[o:], a[i]) + s[o] = '"' + s = s[o+1:] + } + + b[0] = '{' + b[size-1] = '}' + + return string(b), nil + } + + return "{}", nil +} + +// Float64Array represents a one-dimensional array of the PostgreSQL double +// precision type. +type Float64Array []float64 + +// Scan implements the sql.Scanner interface. +func (a *Float64Array) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to Float64Array", src) +} + +func (a *Float64Array) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "Float64Array") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(Float64Array, len(elems)) + for i, v := range elems { + if b[i], err = strconv.ParseFloat(string(v), 64); err != nil { + return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + } + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. +func (a Float64Array) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be at least two curly brackets, N bytes of values, + // and N-1 bytes of delimiters. + b := make([]byte, 1, 1+2*n) + b[0] = '{' + + b = strconv.AppendFloat(b, a[0], 'f', -1, 64) + for i := 1; i < n; i++ { + b = append(b, ',') + b = strconv.AppendFloat(b, a[i], 'f', -1, 64) + } + + return string(append(b, '}')), nil + } + + return "{}", nil +} + +// Float32Array represents a one-dimensional array of the PostgreSQL double +// precision type. +type Float32Array []float32 + +// Scan implements the sql.Scanner interface. +func (a *Float32Array) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to Float32Array", src) +} + +func (a *Float32Array) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "Float32Array") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(Float32Array, len(elems)) + for i, v := range elems { + var x float64 + if x, err = strconv.ParseFloat(string(v), 32); err != nil { + return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + } + b[i] = float32(x) + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. +func (a Float32Array) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be at least two curly brackets, N bytes of values, + // and N-1 bytes of delimiters. + b := make([]byte, 1, 1+2*n) + b[0] = '{' + + b = strconv.AppendFloat(b, float64(a[0]), 'f', -1, 32) + for i := 1; i < n; i++ { + b = append(b, ',') + b = strconv.AppendFloat(b, float64(a[i]), 'f', -1, 32) + } + + return string(append(b, '}')), nil + } + + return "{}", nil +} + +// GenericArray implements the driver.Valuer and sql.Scanner interfaces for +// an array or slice of any dimension. +type GenericArray struct{ A interface{} } + +func (GenericArray) evaluateDestination(rt reflect.Type) (reflect.Type, func([]byte, reflect.Value) error, string) { + var assign func([]byte, reflect.Value) error + var del = "," + + // TODO calculate the assign function for other types + // TODO repeat this section on the element type of arrays or slices (multidimensional) + { + if reflect.PtrTo(rt).Implements(typeSQLScanner) { + // dest is always addressable because it is an element of a slice. + assign = func(src []byte, dest reflect.Value) (err error) { + ss := dest.Addr().Interface().(sql.Scanner) + if src == nil { + err = ss.Scan(nil) + } else { + err = ss.Scan(src) + } + return + } + goto FoundType + } + + assign = func([]byte, reflect.Value) error { + return fmt.Errorf("pq: scanning to %s is not implemented; only sql.Scanner", rt) + } + } + +FoundType: + + if ad, ok := reflect.Zero(rt).Interface().(ArrayDelimiter); ok { + del = ad.ArrayDelimiter() + } + + return rt, assign, del +} + +// Scan implements the sql.Scanner interface. +func (a GenericArray) Scan(src interface{}) error { + dpv := reflect.ValueOf(a.A) + switch { + case dpv.Kind() != reflect.Ptr: + return fmt.Errorf("pq: destination %T is not a pointer to array or slice", a.A) + case dpv.IsNil(): + return fmt.Errorf("pq: destination %T is nil", a.A) + } + + dv := dpv.Elem() + switch dv.Kind() { + case reflect.Slice: + case reflect.Array: + default: + return fmt.Errorf("pq: destination %T is not a pointer to array or slice", a.A) + } + + switch src := src.(type) { + case []byte: + return a.scanBytes(src, dv) + case string: + return a.scanBytes([]byte(src), dv) + case nil: + if dv.Kind() == reflect.Slice { + dv.Set(reflect.Zero(dv.Type())) + return nil + } + } + + return fmt.Errorf("pq: cannot convert %T to %s", src, dv.Type()) +} + +func (a GenericArray) scanBytes(src []byte, dv reflect.Value) error { + dtype, assign, del := a.evaluateDestination(dv.Type().Elem()) + dims, elems, err := parseArray(src, []byte(del)) + if err != nil { + return err + } + + // TODO allow multidimensional + + if len(dims) > 1 { + return fmt.Errorf("pq: scanning from multidimensional ARRAY%s is not implemented", + strings.Replace(fmt.Sprint(dims), " ", "][", -1)) + } + + // Treat a zero-dimensional array like an array with a single dimension of zero. + if len(dims) == 0 { + dims = append(dims, 0) + } + + for i, rt := 0, dv.Type(); i < len(dims); i, rt = i+1, rt.Elem() { + switch rt.Kind() { + case reflect.Slice: + case reflect.Array: + if rt.Len() != dims[i] { + return fmt.Errorf("pq: cannot convert ARRAY%s to %s", + strings.Replace(fmt.Sprint(dims), " ", "][", -1), dv.Type()) + } + default: + // TODO handle multidimensional + } + } + + values := reflect.MakeSlice(reflect.SliceOf(dtype), len(elems), len(elems)) + for i, e := range elems { + if err := assign(e, values.Index(i)); err != nil { + return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + } + } + + // TODO handle multidimensional + + switch dv.Kind() { + case reflect.Slice: + dv.Set(values.Slice(0, dims[0])) + case reflect.Array: + for i := 0; i < dims[0]; i++ { + dv.Index(i).Set(values.Index(i)) + } + } + + return nil +} + +// Value implements the driver.Valuer interface. +func (a GenericArray) Value() (driver.Value, error) { + if a.A == nil { + return nil, nil + } + + rv := reflect.ValueOf(a.A) + + switch rv.Kind() { + case reflect.Slice: + if rv.IsNil() { + return nil, nil + } + case reflect.Array: + default: + return nil, fmt.Errorf("pq: Unable to convert %T to array", a.A) + } + + if n := rv.Len(); n > 0 { + // There will be at least two curly brackets, N bytes of values, + // and N-1 bytes of delimiters. + b := make([]byte, 0, 1+2*n) + + b, _, err := appendArray(b, rv, n) + return string(b), err + } + + return "{}", nil +} + +// Int64Array represents a one-dimensional array of the PostgreSQL integer types. +type Int64Array []int64 + +// Scan implements the sql.Scanner interface. +func (a *Int64Array) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to Int64Array", src) +} + +func (a *Int64Array) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "Int64Array") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(Int64Array, len(elems)) + for i, v := range elems { + if b[i], err = strconv.ParseInt(string(v), 10, 64); err != nil { + return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + } + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. +func (a Int64Array) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be at least two curly brackets, N bytes of values, + // and N-1 bytes of delimiters. + b := make([]byte, 1, 1+2*n) + b[0] = '{' + + b = strconv.AppendInt(b, a[0], 10) + for i := 1; i < n; i++ { + b = append(b, ',') + b = strconv.AppendInt(b, a[i], 10) + } + + return string(append(b, '}')), nil + } + + return "{}", nil +} + +// Int32Array represents a one-dimensional array of the PostgreSQL integer types. +type Int32Array []int32 + +// Scan implements the sql.Scanner interface. +func (a *Int32Array) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to Int32Array", src) +} + +func (a *Int32Array) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "Int32Array") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(Int32Array, len(elems)) + for i, v := range elems { + x, err := strconv.ParseInt(string(v), 10, 32) + if err != nil { + return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + } + b[i] = int32(x) + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. +func (a Int32Array) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be at least two curly brackets, N bytes of values, + // and N-1 bytes of delimiters. + b := make([]byte, 1, 1+2*n) + b[0] = '{' + + b = strconv.AppendInt(b, int64(a[0]), 10) + for i := 1; i < n; i++ { + b = append(b, ',') + b = strconv.AppendInt(b, int64(a[i]), 10) + } + + return string(append(b, '}')), nil + } + + return "{}", nil +} + +// StringArray represents a one-dimensional array of the PostgreSQL character types. +type StringArray []string + +// Scan implements the sql.Scanner interface. +func (a *StringArray) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + return a.scanBytes(src) + case string: + return a.scanBytes([]byte(src)) + case nil: + *a = nil + return nil + } + + return fmt.Errorf("pq: cannot convert %T to StringArray", src) +} + +func (a *StringArray) scanBytes(src []byte) error { + elems, err := scanLinearArray(src, []byte{','}, "StringArray") + if err != nil { + return err + } + if *a != nil && len(elems) == 0 { + *a = (*a)[:0] + } else { + b := make(StringArray, len(elems)) + for i, v := range elems { + if b[i] = string(v); v == nil { + return fmt.Errorf("pq: parsing array element index %d: cannot convert nil to string", i) + } + } + *a = b + } + return nil +} + +// Value implements the driver.Valuer interface. +func (a StringArray) Value() (driver.Value, error) { + if a == nil { + return nil, nil + } + + if n := len(a); n > 0 { + // There will be at least two curly brackets, 2*N bytes of quotes, + // and N-1 bytes of delimiters. + b := make([]byte, 1, 1+3*n) + b[0] = '{' + + b = appendArrayQuotedBytes(b, []byte(a[0])) + for i := 1; i < n; i++ { + b = append(b, ',') + b = appendArrayQuotedBytes(b, []byte(a[i])) + } + + return string(append(b, '}')), nil + } + + return "{}", nil +} + +// appendArray appends rv to the buffer, returning the extended buffer and +// the delimiter used between elements. +// +// It panics when n <= 0 or rv's Kind is not reflect.Array nor reflect.Slice. +func appendArray(b []byte, rv reflect.Value, n int) ([]byte, string, error) { + var del string + var err error + + b = append(b, '{') + + if b, del, err = appendArrayElement(b, rv.Index(0)); err != nil { + return b, del, err + } + + for i := 1; i < n; i++ { + b = append(b, del...) + if b, del, err = appendArrayElement(b, rv.Index(i)); err != nil { + return b, del, err + } + } + + return append(b, '}'), del, nil +} + +// appendArrayElement appends rv to the buffer, returning the extended buffer +// and the delimiter to use before the next element. +// +// When rv's Kind is neither reflect.Array nor reflect.Slice, it is converted +// using driver.DefaultParameterConverter and the resulting []byte or string +// is double-quoted. +// +// See http://www.postgresql.org/docs/current/static/arrays.html#ARRAYS-IO +func appendArrayElement(b []byte, rv reflect.Value) ([]byte, string, error) { + if k := rv.Kind(); k == reflect.Array || k == reflect.Slice { + if t := rv.Type(); t != typeByteSlice && !t.Implements(typeDriverValuer) { + if n := rv.Len(); n > 0 { + return appendArray(b, rv, n) + } + + return b, "", nil + } + } + + var del = "," + var err error + var iv interface{} = rv.Interface() + + if ad, ok := iv.(ArrayDelimiter); ok { + del = ad.ArrayDelimiter() + } + + if iv, err = driver.DefaultParameterConverter.ConvertValue(iv); err != nil { + return b, del, err + } + + switch v := iv.(type) { + case nil: + return append(b, "NULL"...), del, nil + case []byte: + return appendArrayQuotedBytes(b, v), del, nil + case string: + return appendArrayQuotedBytes(b, []byte(v)), del, nil + } + + b, err = appendValue(b, iv) + return b, del, err +} + +func appendArrayQuotedBytes(b, v []byte) []byte { + b = append(b, '"') + for { + i := bytes.IndexAny(v, `"\`) + if i < 0 { + b = append(b, v...) + break + } + if i > 0 { + b = append(b, v[:i]...) + } + b = append(b, '\\', v[i]) + v = v[i+1:] + } + return append(b, '"') +} + +func appendValue(b []byte, v driver.Value) ([]byte, error) { + return append(b, encode(nil, v, 0)...), nil +} + +// parseArray extracts the dimensions and elements of an array represented in +// text format. Only representations emitted by the backend are supported. +// Notably, whitespace around brackets and delimiters is significant, and NULL +// is case-sensitive. +// +// See http://www.postgresql.org/docs/current/static/arrays.html#ARRAYS-IO +func parseArray(src, del []byte) (dims []int, elems [][]byte, err error) { + var depth, i int + + if len(src) < 1 || src[0] != '{' { + return nil, nil, fmt.Errorf("pq: unable to parse array; expected %q at offset %d", '{', 0) + } + +Open: + for i < len(src) { + switch src[i] { + case '{': + depth++ + i++ + case '}': + elems = make([][]byte, 0) + goto Close + default: + break Open + } + } + dims = make([]int, i) + +Element: + for i < len(src) { + switch src[i] { + case '{': + if depth == len(dims) { + break Element + } + depth++ + dims[depth-1] = 0 + i++ + case '"': + var elem = []byte{} + var escape bool + for i++; i < len(src); i++ { + if escape { + elem = append(elem, src[i]) + escape = false + } else { + switch src[i] { + default: + elem = append(elem, src[i]) + case '\\': + escape = true + case '"': + elems = append(elems, elem) + i++ + break Element + } + } + } + default: + for start := i; i < len(src); i++ { + if bytes.HasPrefix(src[i:], del) || src[i] == '}' { + elem := src[start:i] + if len(elem) == 0 { + return nil, nil, fmt.Errorf("pq: unable to parse array; unexpected %q at offset %d", src[i], i) + } + if bytes.Equal(elem, []byte("NULL")) { + elem = nil + } + elems = append(elems, elem) + break Element + } + } + } + } + + for i < len(src) { + if bytes.HasPrefix(src[i:], del) && depth > 0 { + dims[depth-1]++ + i += len(del) + goto Element + } else if src[i] == '}' && depth > 0 { + dims[depth-1]++ + depth-- + i++ + } else { + return nil, nil, fmt.Errorf("pq: unable to parse array; unexpected %q at offset %d", src[i], i) + } + } + +Close: + for i < len(src) { + if src[i] == '}' && depth > 0 { + depth-- + i++ + } else { + return nil, nil, fmt.Errorf("pq: unable to parse array; unexpected %q at offset %d", src[i], i) + } + } + if depth > 0 { + err = fmt.Errorf("pq: unable to parse array; expected %q at offset %d", '}', i) + } + if err == nil { + for _, d := range dims { + if (len(elems) % d) != 0 { + err = fmt.Errorf("pq: multidimensional arrays must have elements with matching dimensions") + } + } + } + return +} + +func scanLinearArray(src, del []byte, typ string) (elems [][]byte, err error) { + dims, elems, err := parseArray(src, del) + if err != nil { + return nil, err + } + if len(dims) > 1 { + return nil, fmt.Errorf("pq: cannot convert ARRAY%s to %s", strings.Replace(fmt.Sprint(dims), " ", "][", -1), typ) + } + return elems, err +} diff --git a/vendor/github.com/lib/pq/buf.go b/vendor/github.com/lib/pq/buf.go new file mode 100644 index 000000000..4b0a0a8f7 --- /dev/null +++ b/vendor/github.com/lib/pq/buf.go @@ -0,0 +1,91 @@ +package pq + +import ( + "bytes" + "encoding/binary" + + "github.com/lib/pq/oid" +) + +type readBuf []byte + +func (b *readBuf) int32() (n int) { + n = int(int32(binary.BigEndian.Uint32(*b))) + *b = (*b)[4:] + return +} + +func (b *readBuf) oid() (n oid.Oid) { + n = oid.Oid(binary.BigEndian.Uint32(*b)) + *b = (*b)[4:] + return +} + +// N.B: this is actually an unsigned 16-bit integer, unlike int32 +func (b *readBuf) int16() (n int) { + n = int(binary.BigEndian.Uint16(*b)) + *b = (*b)[2:] + return +} + +func (b *readBuf) string() string { + i := bytes.IndexByte(*b, 0) + if i < 0 { + errorf("invalid message format; expected string terminator") + } + s := (*b)[:i] + *b = (*b)[i+1:] + return string(s) +} + +func (b *readBuf) next(n int) (v []byte) { + v = (*b)[:n] + *b = (*b)[n:] + return +} + +func (b *readBuf) byte() byte { + return b.next(1)[0] +} + +type writeBuf struct { + buf []byte + pos int +} + +func (b *writeBuf) int32(n int) { + x := make([]byte, 4) + binary.BigEndian.PutUint32(x, uint32(n)) + b.buf = append(b.buf, x...) +} + +func (b *writeBuf) int16(n int) { + x := make([]byte, 2) + binary.BigEndian.PutUint16(x, uint16(n)) + b.buf = append(b.buf, x...) +} + +func (b *writeBuf) string(s string) { + b.buf = append(append(b.buf, s...), '\000') +} + +func (b *writeBuf) byte(c byte) { + b.buf = append(b.buf, c) +} + +func (b *writeBuf) bytes(v []byte) { + b.buf = append(b.buf, v...) +} + +func (b *writeBuf) wrap() []byte { + p := b.buf[b.pos:] + binary.BigEndian.PutUint32(p, uint32(len(p))) + return b.buf +} + +func (b *writeBuf) next(c byte) { + p := b.buf[b.pos:] + binary.BigEndian.PutUint32(p, uint32(len(p))) + b.pos = len(b.buf) + 1 + b.buf = append(b.buf, c, 0, 0, 0, 0) +} diff --git a/vendor/github.com/lib/pq/conn.go b/vendor/github.com/lib/pq/conn.go new file mode 100644 index 000000000..da4ff9de6 --- /dev/null +++ b/vendor/github.com/lib/pq/conn.go @@ -0,0 +1,2112 @@ +package pq + +import ( + "bufio" + "bytes" + "context" + "crypto/md5" + "crypto/sha256" + "database/sql" + "database/sql/driver" + "encoding/binary" + "errors" + "fmt" + "io" + "net" + "os" + "os/user" + "path" + "path/filepath" + "strconv" + "strings" + "sync" + "time" + "unicode" + + "github.com/lib/pq/oid" + "github.com/lib/pq/scram" +) + +// Common error types +var ( + ErrNotSupported = errors.New("pq: Unsupported command") + ErrInFailedTransaction = errors.New("pq: Could not complete operation in a failed transaction") + ErrSSLNotSupported = errors.New("pq: SSL is not enabled on the server") + ErrSSLKeyUnknownOwnership = errors.New("pq: Could not get owner information for private key, may not be properly protected") + ErrSSLKeyHasWorldPermissions = errors.New("pq: Private key has world access. Permissions should be u=rw,g=r (0640) if owned by root, or u=rw (0600), or less") + + ErrCouldNotDetectUsername = errors.New("pq: Could not detect default username. Please provide one explicitly") + + errUnexpectedReady = errors.New("unexpected ReadyForQuery") + errNoRowsAffected = errors.New("no RowsAffected available after the empty statement") + errNoLastInsertID = errors.New("no LastInsertId available after the empty statement") +) + +// Compile time validation that our types implement the expected interfaces +var ( + _ driver.Driver = Driver{} +) + +// Driver is the Postgres database driver. +type Driver struct{} + +// Open opens a new connection to the database. name is a connection string. +// Most users should only use it through database/sql package from the standard +// library. +func (d Driver) Open(name string) (driver.Conn, error) { + return Open(name) +} + +func init() { + sql.Register("postgres", &Driver{}) +} + +type parameterStatus struct { + // server version in the same format as server_version_num, or 0 if + // unavailable + serverVersion int + + // the current location based on the TimeZone value of the session, if + // available + currentLocation *time.Location +} + +type transactionStatus byte + +const ( + txnStatusIdle transactionStatus = 'I' + txnStatusIdleInTransaction transactionStatus = 'T' + txnStatusInFailedTransaction transactionStatus = 'E' +) + +func (s transactionStatus) String() string { + switch s { + case txnStatusIdle: + return "idle" + case txnStatusIdleInTransaction: + return "idle in transaction" + case txnStatusInFailedTransaction: + return "in a failed transaction" + default: + errorf("unknown transactionStatus %d", s) + } + + panic("not reached") +} + +// Dialer is the dialer interface. It can be used to obtain more control over +// how pq creates network connections. +type Dialer interface { + Dial(network, address string) (net.Conn, error) + DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) +} + +// DialerContext is the context-aware dialer interface. +type DialerContext interface { + DialContext(ctx context.Context, network, address string) (net.Conn, error) +} + +type defaultDialer struct { + d net.Dialer +} + +func (d defaultDialer) Dial(network, address string) (net.Conn, error) { + return d.d.Dial(network, address) +} +func (d defaultDialer) DialTimeout( + network, address string, timeout time.Duration, +) (net.Conn, error) { + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + return d.DialContext(ctx, network, address) +} +func (d defaultDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) { + return d.d.DialContext(ctx, network, address) +} + +type conn struct { + c net.Conn + buf *bufio.Reader + namei int + scratch [512]byte + txnStatus transactionStatus + txnFinish func() + + // Save connection arguments to use during CancelRequest. + dialer Dialer + opts values + + // Cancellation key data for use with CancelRequest messages. + processID int + secretKey int + + parameterStatus parameterStatus + + saveMessageType byte + saveMessageBuffer []byte + + // If an error is set, this connection is bad and all public-facing + // functions should return the appropriate error by calling get() + // (ErrBadConn) or getForNext(). + err syncErr + + // If set, this connection should never use the binary format when + // receiving query results from prepared statements. Only provided for + // debugging. + disablePreparedBinaryResult bool + + // Whether to always send []byte parameters over as binary. Enables single + // round-trip mode for non-prepared Query calls. + binaryParameters bool + + // If true this connection is in the middle of a COPY + inCopy bool + + // If not nil, notices will be synchronously sent here + noticeHandler func(*Error) + + // If not nil, notifications will be synchronously sent here + notificationHandler func(*Notification) + + // GSSAPI context + gss GSS +} + +type syncErr struct { + err error + sync.Mutex +} + +// Return ErrBadConn if connection is bad. +func (e *syncErr) get() error { + e.Lock() + defer e.Unlock() + if e.err != nil { + return driver.ErrBadConn + } + return nil +} + +// Return the error set on the connection. Currently only used by rows.Next. +func (e *syncErr) getForNext() error { + e.Lock() + defer e.Unlock() + return e.err +} + +// Set error, only if it isn't set yet. +func (e *syncErr) set(err error) { + if err == nil { + panic("attempt to set nil err") + } + e.Lock() + defer e.Unlock() + if e.err == nil { + e.err = err + } +} + +// Handle driver-side settings in parsed connection string. +func (cn *conn) handleDriverSettings(o values) (err error) { + boolSetting := func(key string, val *bool) error { + if value, ok := o[key]; ok { + if value == "yes" { + *val = true + } else if value == "no" { + *val = false + } else { + return fmt.Errorf("unrecognized value %q for %s", value, key) + } + } + return nil + } + + err = boolSetting("disable_prepared_binary_result", &cn.disablePreparedBinaryResult) + if err != nil { + return err + } + return boolSetting("binary_parameters", &cn.binaryParameters) +} + +func (cn *conn) handlePgpass(o values) { + // if a password was supplied, do not process .pgpass + if _, ok := o["password"]; ok { + return + } + filename := os.Getenv("PGPASSFILE") + if filename == "" { + // XXX this code doesn't work on Windows where the default filename is + // XXX %APPDATA%\postgresql\pgpass.conf + // Prefer $HOME over user.Current due to glibc bug: golang.org/issue/13470 + userHome := os.Getenv("HOME") + if userHome == "" { + user, err := user.Current() + if err != nil { + return + } + userHome = user.HomeDir + } + filename = filepath.Join(userHome, ".pgpass") + } + fileinfo, err := os.Stat(filename) + if err != nil { + return + } + mode := fileinfo.Mode() + if mode&(0x77) != 0 { + // XXX should warn about incorrect .pgpass permissions as psql does + return + } + file, err := os.Open(filename) + if err != nil { + return + } + defer file.Close() + scanner := bufio.NewScanner(io.Reader(file)) + // From: https://github.com/tg/pgpass/blob/master/reader.go + for scanner.Scan() { + if scanText(scanner.Text(), o) { + break + } + } +} + +// GetFields is a helper function for scanText. +func getFields(s string) []string { + fs := make([]string, 0, 5) + f := make([]rune, 0, len(s)) + + var esc bool + for _, c := range s { + switch { + case esc: + f = append(f, c) + esc = false + case c == '\\': + esc = true + case c == ':': + fs = append(fs, string(f)) + f = f[:0] + default: + f = append(f, c) + } + } + return append(fs, string(f)) +} + +// ScanText assists HandlePgpass in it's objective. +func scanText(line string, o values) bool { + hostname := o["host"] + ntw, _ := network(o) + port := o["port"] + db := o["dbname"] + username := o["user"] + if len(line) == 0 || line[0] == '#' { + return false + } + split := getFields(line) + if len(split) != 5 { + return false + } + if (split[0] == "*" || split[0] == hostname || (split[0] == "localhost" && (hostname == "" || ntw == "unix"))) && (split[1] == "*" || split[1] == port) && (split[2] == "*" || split[2] == db) && (split[3] == "*" || split[3] == username) { + o["password"] = split[4] + return true + } + return false +} + +func (cn *conn) writeBuf(b byte) *writeBuf { + cn.scratch[0] = b + return &writeBuf{ + buf: cn.scratch[:5], + pos: 1, + } +} + +// Open opens a new connection to the database. dsn is a connection string. +// Most users should only use it through database/sql package from the standard +// library. +func Open(dsn string) (_ driver.Conn, err error) { + return DialOpen(defaultDialer{}, dsn) +} + +// DialOpen opens a new connection to the database using a dialer. +func DialOpen(d Dialer, dsn string) (_ driver.Conn, err error) { + c, err := NewConnector(dsn) + if err != nil { + return nil, err + } + c.Dialer(d) + return c.open(context.Background()) +} + +func (c *Connector) open(ctx context.Context) (cn *conn, err error) { + // Handle any panics during connection initialization. Note that we + // specifically do *not* want to use errRecover(), as that would turn any + // connection errors into ErrBadConns, hiding the real error message from + // the user. + defer errRecoverNoErrBadConn(&err) + + // Create a new values map (copy). This makes it so maps in different + // connections do not reference the same underlying data structure, so it + // is safe for multiple connections to concurrently write to their opts. + o := make(values) + for k, v := range c.opts { + o[k] = v + } + + cn = &conn{ + opts: o, + dialer: c.dialer, + } + err = cn.handleDriverSettings(o) + if err != nil { + return nil, err + } + cn.handlePgpass(o) + + cn.c, err = dial(ctx, c.dialer, o) + if err != nil { + return nil, err + } + + err = cn.ssl(o) + if err != nil { + if cn.c != nil { + cn.c.Close() + } + return nil, err + } + + // cn.startup panics on error. Make sure we don't leak cn.c. + panicking := true + defer func() { + if panicking { + cn.c.Close() + } + }() + + cn.buf = bufio.NewReader(cn.c) + cn.startup(o) + + // reset the deadline, in case one was set (see dial) + if timeout, ok := o["connect_timeout"]; ok && timeout != "0" { + err = cn.c.SetDeadline(time.Time{}) + } + panicking = false + return cn, err +} + +func dial(ctx context.Context, d Dialer, o values) (net.Conn, error) { + network, address := network(o) + + // Zero or not specified means wait indefinitely. + if timeout, ok := o["connect_timeout"]; ok && timeout != "0" { + seconds, err := strconv.ParseInt(timeout, 10, 0) + if err != nil { + return nil, fmt.Errorf("invalid value for parameter connect_timeout: %s", err) + } + duration := time.Duration(seconds) * time.Second + + // connect_timeout should apply to the entire connection establishment + // procedure, so we both use a timeout for the TCP connection + // establishment and set a deadline for doing the initial handshake. + // The deadline is then reset after startup() is done. + deadline := time.Now().Add(duration) + var conn net.Conn + if dctx, ok := d.(DialerContext); ok { + ctx, cancel := context.WithTimeout(ctx, duration) + defer cancel() + conn, err = dctx.DialContext(ctx, network, address) + } else { + conn, err = d.DialTimeout(network, address, duration) + } + if err != nil { + return nil, err + } + err = conn.SetDeadline(deadline) + return conn, err + } + if dctx, ok := d.(DialerContext); ok { + return dctx.DialContext(ctx, network, address) + } + return d.Dial(network, address) +} + +func network(o values) (string, string) { + host := o["host"] + + if strings.HasPrefix(host, "/") { + sockPath := path.Join(host, ".s.PGSQL."+o["port"]) + return "unix", sockPath + } + + return "tcp", net.JoinHostPort(host, o["port"]) +} + +type values map[string]string + +// scanner implements a tokenizer for libpq-style option strings. +type scanner struct { + s []rune + i int +} + +// newScanner returns a new scanner initialized with the option string s. +func newScanner(s string) *scanner { + return &scanner{[]rune(s), 0} +} + +// Next returns the next rune. +// It returns 0, false if the end of the text has been reached. +func (s *scanner) Next() (rune, bool) { + if s.i >= len(s.s) { + return 0, false + } + r := s.s[s.i] + s.i++ + return r, true +} + +// SkipSpaces returns the next non-whitespace rune. +// It returns 0, false if the end of the text has been reached. +func (s *scanner) SkipSpaces() (rune, bool) { + r, ok := s.Next() + for unicode.IsSpace(r) && ok { + r, ok = s.Next() + } + return r, ok +} + +// parseOpts parses the options from name and adds them to the values. +// +// The parsing code is based on conninfo_parse from libpq's fe-connect.c +func parseOpts(name string, o values) error { + s := newScanner(name) + + for { + var ( + keyRunes, valRunes []rune + r rune + ok bool + ) + + if r, ok = s.SkipSpaces(); !ok { + break + } + + // Scan the key + for !unicode.IsSpace(r) && r != '=' { + keyRunes = append(keyRunes, r) + if r, ok = s.Next(); !ok { + break + } + } + + // Skip any whitespace if we're not at the = yet + if r != '=' { + r, ok = s.SkipSpaces() + } + + // The current character should be = + if r != '=' || !ok { + return fmt.Errorf(`missing "=" after %q in connection info string"`, string(keyRunes)) + } + + // Skip any whitespace after the = + if r, ok = s.SkipSpaces(); !ok { + // If we reach the end here, the last value is just an empty string as per libpq. + o[string(keyRunes)] = "" + break + } + + if r != '\'' { + for !unicode.IsSpace(r) { + if r == '\\' { + if r, ok = s.Next(); !ok { + return fmt.Errorf(`missing character after backslash`) + } + } + valRunes = append(valRunes, r) + + if r, ok = s.Next(); !ok { + break + } + } + } else { + quote: + for { + if r, ok = s.Next(); !ok { + return fmt.Errorf(`unterminated quoted string literal in connection string`) + } + switch r { + case '\'': + break quote + case '\\': + r, _ = s.Next() + fallthrough + default: + valRunes = append(valRunes, r) + } + } + } + + o[string(keyRunes)] = string(valRunes) + } + + return nil +} + +func (cn *conn) isInTransaction() bool { + return cn.txnStatus == txnStatusIdleInTransaction || + cn.txnStatus == txnStatusInFailedTransaction +} + +func (cn *conn) checkIsInTransaction(intxn bool) { + if cn.isInTransaction() != intxn { + cn.err.set(driver.ErrBadConn) + errorf("unexpected transaction status %v", cn.txnStatus) + } +} + +func (cn *conn) Begin() (_ driver.Tx, err error) { + return cn.begin("") +} + +func (cn *conn) begin(mode string) (_ driver.Tx, err error) { + if err := cn.err.get(); err != nil { + return nil, err + } + defer cn.errRecover(&err) + + cn.checkIsInTransaction(false) + _, commandTag, err := cn.simpleExec("BEGIN" + mode) + if err != nil { + return nil, err + } + if commandTag != "BEGIN" { + cn.err.set(driver.ErrBadConn) + return nil, fmt.Errorf("unexpected command tag %s", commandTag) + } + if cn.txnStatus != txnStatusIdleInTransaction { + cn.err.set(driver.ErrBadConn) + return nil, fmt.Errorf("unexpected transaction status %v", cn.txnStatus) + } + return cn, nil +} + +func (cn *conn) closeTxn() { + if finish := cn.txnFinish; finish != nil { + finish() + } +} + +func (cn *conn) Commit() (err error) { + defer cn.closeTxn() + if err := cn.err.get(); err != nil { + return err + } + defer cn.errRecover(&err) + + cn.checkIsInTransaction(true) + // We don't want the client to think that everything is okay if it tries + // to commit a failed transaction. However, no matter what we return, + // database/sql will release this connection back into the free connection + // pool so we have to abort the current transaction here. Note that you + // would get the same behaviour if you issued a COMMIT in a failed + // transaction, so it's also the least surprising thing to do here. + if cn.txnStatus == txnStatusInFailedTransaction { + if err := cn.rollback(); err != nil { + return err + } + return ErrInFailedTransaction + } + + _, commandTag, err := cn.simpleExec("COMMIT") + if err != nil { + if cn.isInTransaction() { + cn.err.set(driver.ErrBadConn) + } + return err + } + if commandTag != "COMMIT" { + cn.err.set(driver.ErrBadConn) + return fmt.Errorf("unexpected command tag %s", commandTag) + } + cn.checkIsInTransaction(false) + return nil +} + +func (cn *conn) Rollback() (err error) { + defer cn.closeTxn() + if err := cn.err.get(); err != nil { + return err + } + defer cn.errRecover(&err) + return cn.rollback() +} + +func (cn *conn) rollback() (err error) { + cn.checkIsInTransaction(true) + _, commandTag, err := cn.simpleExec("ROLLBACK") + if err != nil { + if cn.isInTransaction() { + cn.err.set(driver.ErrBadConn) + } + return err + } + if commandTag != "ROLLBACK" { + return fmt.Errorf("unexpected command tag %s", commandTag) + } + cn.checkIsInTransaction(false) + return nil +} + +func (cn *conn) gname() string { + cn.namei++ + return strconv.FormatInt(int64(cn.namei), 10) +} + +func (cn *conn) simpleExec(q string) (res driver.Result, commandTag string, err error) { + b := cn.writeBuf('Q') + b.string(q) + cn.send(b) + + for { + t, r := cn.recv1() + switch t { + case 'C': + res, commandTag = cn.parseComplete(r.string()) + case 'Z': + cn.processReadyForQuery(r) + if res == nil && err == nil { + err = errUnexpectedReady + } + // done + return + case 'E': + err = parseError(r) + case 'I': + res = emptyRows + case 'T', 'D': + // ignore any results + default: + cn.err.set(driver.ErrBadConn) + errorf("unknown response for simple query: %q", t) + } + } +} + +func (cn *conn) simpleQuery(q string) (res *rows, err error) { + defer cn.errRecover(&err) + + b := cn.writeBuf('Q') + b.string(q) + cn.send(b) + + for { + t, r := cn.recv1() + switch t { + case 'C', 'I': + // We allow queries which don't return any results through Query as + // well as Exec. We still have to give database/sql a rows object + // the user can close, though, to avoid connections from being + // leaked. A "rows" with done=true works fine for that purpose. + if err != nil { + cn.err.set(driver.ErrBadConn) + errorf("unexpected message %q in simple query execution", t) + } + if res == nil { + res = &rows{ + cn: cn, + } + } + // Set the result and tag to the last command complete if there wasn't a + // query already run. Although queries usually return from here and cede + // control to Next, a query with zero results does not. + if t == 'C' { + res.result, res.tag = cn.parseComplete(r.string()) + if res.colNames != nil { + return + } + } + res.done = true + case 'Z': + cn.processReadyForQuery(r) + // done + return + case 'E': + res = nil + err = parseError(r) + case 'D': + if res == nil { + cn.err.set(driver.ErrBadConn) + errorf("unexpected DataRow in simple query execution") + } + // the query didn't fail; kick off to Next + cn.saveMessage(t, r) + return + case 'T': + // res might be non-nil here if we received a previous + // CommandComplete, but that's fine; just overwrite it + res = &rows{cn: cn} + res.rowsHeader = parsePortalRowDescribe(r) + + // To work around a bug in QueryRow in Go 1.2 and earlier, wait + // until the first DataRow has been received. + default: + cn.err.set(driver.ErrBadConn) + errorf("unknown response for simple query: %q", t) + } + } +} + +type noRows struct{} + +var emptyRows noRows + +var _ driver.Result = noRows{} + +func (noRows) LastInsertId() (int64, error) { + return 0, errNoLastInsertID +} + +func (noRows) RowsAffected() (int64, error) { + return 0, errNoRowsAffected +} + +// Decides which column formats to use for a prepared statement. The input is +// an array of type oids, one element per result column. +func decideColumnFormats( + colTyps []fieldDesc, forceText bool, +) (colFmts []format, colFmtData []byte) { + if len(colTyps) == 0 { + return nil, colFmtDataAllText + } + + colFmts = make([]format, len(colTyps)) + if forceText { + return colFmts, colFmtDataAllText + } + + allBinary := true + allText := true + for i, t := range colTyps { + switch t.OID { + // This is the list of types to use binary mode for when receiving them + // through a prepared statement. If a type appears in this list, it + // must also be implemented in binaryDecode in encode.go. + case oid.T_bytea: + fallthrough + case oid.T_int8: + fallthrough + case oid.T_int4: + fallthrough + case oid.T_int2: + fallthrough + case oid.T_uuid: + colFmts[i] = formatBinary + allText = false + + default: + allBinary = false + } + } + + if allBinary { + return colFmts, colFmtDataAllBinary + } else if allText { + return colFmts, colFmtDataAllText + } else { + colFmtData = make([]byte, 2+len(colFmts)*2) + binary.BigEndian.PutUint16(colFmtData, uint16(len(colFmts))) + for i, v := range colFmts { + binary.BigEndian.PutUint16(colFmtData[2+i*2:], uint16(v)) + } + return colFmts, colFmtData + } +} + +func (cn *conn) prepareTo(q, stmtName string) *stmt { + st := &stmt{cn: cn, name: stmtName} + + b := cn.writeBuf('P') + b.string(st.name) + b.string(q) + b.int16(0) + + b.next('D') + b.byte('S') + b.string(st.name) + + b.next('S') + cn.send(b) + + cn.readParseResponse() + st.paramTyps, st.colNames, st.colTyps = cn.readStatementDescribeResponse() + st.colFmts, st.colFmtData = decideColumnFormats(st.colTyps, cn.disablePreparedBinaryResult) + cn.readReadyForQuery() + return st +} + +func (cn *conn) Prepare(q string) (_ driver.Stmt, err error) { + if err := cn.err.get(); err != nil { + return nil, err + } + defer cn.errRecover(&err) + + if len(q) >= 4 && strings.EqualFold(q[:4], "COPY") { + s, err := cn.prepareCopyIn(q) + if err == nil { + cn.inCopy = true + } + return s, err + } + return cn.prepareTo(q, cn.gname()), nil +} + +func (cn *conn) Close() (err error) { + // Skip cn.bad return here because we always want to close a connection. + defer cn.errRecover(&err) + + // Ensure that cn.c.Close is always run. Since error handling is done with + // panics and cn.errRecover, the Close must be in a defer. + defer func() { + cerr := cn.c.Close() + if err == nil { + err = cerr + } + }() + + // Don't go through send(); ListenerConn relies on us not scribbling on the + // scratch buffer of this connection. + return cn.sendSimpleMessage('X') +} + +// Implement the "Queryer" interface +func (cn *conn) Query(query string, args []driver.Value) (driver.Rows, error) { + return cn.query(query, args) +} + +func (cn *conn) query(query string, args []driver.Value) (_ *rows, err error) { + if err := cn.err.get(); err != nil { + return nil, err + } + if cn.inCopy { + return nil, errCopyInProgress + } + defer cn.errRecover(&err) + + // Check to see if we can use the "simpleQuery" interface, which is + // *much* faster than going through prepare/exec + if len(args) == 0 { + return cn.simpleQuery(query) + } + + if cn.binaryParameters { + cn.sendBinaryModeQuery(query, args) + + cn.readParseResponse() + cn.readBindResponse() + rows := &rows{cn: cn} + rows.rowsHeader = cn.readPortalDescribeResponse() + cn.postExecuteWorkaround() + return rows, nil + } + st := cn.prepareTo(query, "") + st.exec(args) + return &rows{ + cn: cn, + rowsHeader: st.rowsHeader, + }, nil +} + +// Implement the optional "Execer" interface for one-shot queries +func (cn *conn) Exec(query string, args []driver.Value) (res driver.Result, err error) { + if err := cn.err.get(); err != nil { + return nil, err + } + defer cn.errRecover(&err) + + // Check to see if we can use the "simpleExec" interface, which is + // *much* faster than going through prepare/exec + if len(args) == 0 { + // ignore commandTag, our caller doesn't care + r, _, err := cn.simpleExec(query) + return r, err + } + + if cn.binaryParameters { + cn.sendBinaryModeQuery(query, args) + + cn.readParseResponse() + cn.readBindResponse() + cn.readPortalDescribeResponse() + cn.postExecuteWorkaround() + res, _, err = cn.readExecuteResponse("Execute") + return res, err + } + // Use the unnamed statement to defer planning until bind + // time, or else value-based selectivity estimates cannot be + // used. + st := cn.prepareTo(query, "") + r, err := st.Exec(args) + if err != nil { + panic(err) + } + return r, err +} + +type safeRetryError struct { + Err error +} + +func (se *safeRetryError) Error() string { + return se.Err.Error() +} + +func (cn *conn) send(m *writeBuf) { + n, err := cn.c.Write(m.wrap()) + if err != nil { + if n == 0 { + err = &safeRetryError{Err: err} + } + panic(err) + } +} + +func (cn *conn) sendStartupPacket(m *writeBuf) error { + _, err := cn.c.Write((m.wrap())[1:]) + return err +} + +// Send a message of type typ to the server on the other end of cn. The +// message should have no payload. This method does not use the scratch +// buffer. +func (cn *conn) sendSimpleMessage(typ byte) (err error) { + _, err = cn.c.Write([]byte{typ, '\x00', '\x00', '\x00', '\x04'}) + return err +} + +// saveMessage memorizes a message and its buffer in the conn struct. +// recvMessage will then return these values on the next call to it. This +// method is useful in cases where you have to see what the next message is +// going to be (e.g. to see whether it's an error or not) but you can't handle +// the message yourself. +func (cn *conn) saveMessage(typ byte, buf *readBuf) { + if cn.saveMessageType != 0 { + cn.err.set(driver.ErrBadConn) + errorf("unexpected saveMessageType %d", cn.saveMessageType) + } + cn.saveMessageType = typ + cn.saveMessageBuffer = *buf +} + +// recvMessage receives any message from the backend, or returns an error if +// a problem occurred while reading the message. +func (cn *conn) recvMessage(r *readBuf) (byte, error) { + // workaround for a QueryRow bug, see exec + if cn.saveMessageType != 0 { + t := cn.saveMessageType + *r = cn.saveMessageBuffer + cn.saveMessageType = 0 + cn.saveMessageBuffer = nil + return t, nil + } + + x := cn.scratch[:5] + _, err := io.ReadFull(cn.buf, x) + if err != nil { + return 0, err + } + + // read the type and length of the message that follows + t := x[0] + n := int(binary.BigEndian.Uint32(x[1:])) - 4 + var y []byte + if n <= len(cn.scratch) { + y = cn.scratch[:n] + } else { + y = make([]byte, n) + } + _, err = io.ReadFull(cn.buf, y) + if err != nil { + return 0, err + } + *r = y + return t, nil +} + +// recv receives a message from the backend, but if an error happened while +// reading the message or the received message was an ErrorResponse, it panics. +// NoticeResponses are ignored. This function should generally be used only +// during the startup sequence. +func (cn *conn) recv() (t byte, r *readBuf) { + for { + var err error + r = &readBuf{} + t, err = cn.recvMessage(r) + if err != nil { + panic(err) + } + switch t { + case 'E': + panic(parseError(r)) + case 'N': + if n := cn.noticeHandler; n != nil { + n(parseError(r)) + } + case 'A': + if n := cn.notificationHandler; n != nil { + n(recvNotification(r)) + } + default: + return + } + } +} + +// recv1Buf is exactly equivalent to recv1, except it uses a buffer supplied by +// the caller to avoid an allocation. +func (cn *conn) recv1Buf(r *readBuf) byte { + for { + t, err := cn.recvMessage(r) + if err != nil { + panic(err) + } + + switch t { + case 'A': + if n := cn.notificationHandler; n != nil { + n(recvNotification(r)) + } + case 'N': + if n := cn.noticeHandler; n != nil { + n(parseError(r)) + } + case 'S': + cn.processParameterStatus(r) + default: + return t + } + } +} + +// recv1 receives a message from the backend, panicking if an error occurs +// while attempting to read it. All asynchronous messages are ignored, with +// the exception of ErrorResponse. +func (cn *conn) recv1() (t byte, r *readBuf) { + r = &readBuf{} + t = cn.recv1Buf(r) + return t, r +} + +func (cn *conn) ssl(o values) error { + upgrade, err := ssl(o) + if err != nil { + return err + } + + if upgrade == nil { + // Nothing to do + return nil + } + + w := cn.writeBuf(0) + w.int32(80877103) + if err = cn.sendStartupPacket(w); err != nil { + return err + } + + b := cn.scratch[:1] + _, err = io.ReadFull(cn.c, b) + if err != nil { + return err + } + + if b[0] != 'S' { + return ErrSSLNotSupported + } + + cn.c, err = upgrade(cn.c) + return err +} + +// isDriverSetting returns true iff a setting is purely for configuring the +// driver's options and should not be sent to the server in the connection +// startup packet. +func isDriverSetting(key string) bool { + switch key { + case "host", "port": + return true + case "password": + return true + case "sslmode", "sslcert", "sslkey", "sslrootcert", "sslinline", "sslsni": + return true + case "fallback_application_name": + return true + case "connect_timeout": + return true + case "disable_prepared_binary_result": + return true + case "binary_parameters": + return true + case "krbsrvname": + return true + case "krbspn": + return true + default: + return false + } +} + +func (cn *conn) startup(o values) { + w := cn.writeBuf(0) + w.int32(196608) + // Send the backend the name of the database we want to connect to, and the + // user we want to connect as. Additionally, we send over any run-time + // parameters potentially included in the connection string. If the server + // doesn't recognize any of them, it will reply with an error. + for k, v := range o { + if isDriverSetting(k) { + // skip options which can't be run-time parameters + continue + } + // The protocol requires us to supply the database name as "database" + // instead of "dbname". + if k == "dbname" { + k = "database" + } + w.string(k) + w.string(v) + } + w.string("") + if err := cn.sendStartupPacket(w); err != nil { + panic(err) + } + + for { + t, r := cn.recv() + switch t { + case 'K': + cn.processBackendKeyData(r) + case 'S': + cn.processParameterStatus(r) + case 'R': + cn.auth(r, o) + case 'Z': + cn.processReadyForQuery(r) + return + default: + errorf("unknown response for startup: %q", t) + } + } +} + +func (cn *conn) auth(r *readBuf, o values) { + switch code := r.int32(); code { + case 0: + // OK + case 3: + w := cn.writeBuf('p') + w.string(o["password"]) + cn.send(w) + + t, r := cn.recv() + if t != 'R' { + errorf("unexpected password response: %q", t) + } + + if r.int32() != 0 { + errorf("unexpected authentication response: %q", t) + } + case 5: + s := string(r.next(4)) + w := cn.writeBuf('p') + w.string("md5" + md5s(md5s(o["password"]+o["user"])+s)) + cn.send(w) + + t, r := cn.recv() + if t != 'R' { + errorf("unexpected password response: %q", t) + } + + if r.int32() != 0 { + errorf("unexpected authentication response: %q", t) + } + case 7: // GSSAPI, startup + if newGss == nil { + errorf("kerberos error: no GSSAPI provider registered (import github.com/lib/pq/auth/kerberos if you need Kerberos support)") + } + cli, err := newGss() + if err != nil { + errorf("kerberos error: %s", err.Error()) + } + + var token []byte + + if spn, ok := o["krbspn"]; ok { + // Use the supplied SPN if provided.. + token, err = cli.GetInitTokenFromSpn(spn) + } else { + // Allow the kerberos service name to be overridden + service := "postgres" + if val, ok := o["krbsrvname"]; ok { + service = val + } + + token, err = cli.GetInitToken(o["host"], service) + } + + if err != nil { + errorf("failed to get Kerberos ticket: %q", err) + } + + w := cn.writeBuf('p') + w.bytes(token) + cn.send(w) + + // Store for GSSAPI continue message + cn.gss = cli + + case 8: // GSSAPI continue + + if cn.gss == nil { + errorf("GSSAPI protocol error") + } + + b := []byte(*r) + + done, tokOut, err := cn.gss.Continue(b) + if err == nil && !done { + w := cn.writeBuf('p') + w.bytes(tokOut) + cn.send(w) + } + + // Errors fall through and read the more detailed message + // from the server.. + + case 10: + sc := scram.NewClient(sha256.New, o["user"], o["password"]) + sc.Step(nil) + if sc.Err() != nil { + errorf("SCRAM-SHA-256 error: %s", sc.Err().Error()) + } + scOut := sc.Out() + + w := cn.writeBuf('p') + w.string("SCRAM-SHA-256") + w.int32(len(scOut)) + w.bytes(scOut) + cn.send(w) + + t, r := cn.recv() + if t != 'R' { + errorf("unexpected password response: %q", t) + } + + if r.int32() != 11 { + errorf("unexpected authentication response: %q", t) + } + + nextStep := r.next(len(*r)) + sc.Step(nextStep) + if sc.Err() != nil { + errorf("SCRAM-SHA-256 error: %s", sc.Err().Error()) + } + + scOut = sc.Out() + w = cn.writeBuf('p') + w.bytes(scOut) + cn.send(w) + + t, r = cn.recv() + if t != 'R' { + errorf("unexpected password response: %q", t) + } + + if r.int32() != 12 { + errorf("unexpected authentication response: %q", t) + } + + nextStep = r.next(len(*r)) + sc.Step(nextStep) + if sc.Err() != nil { + errorf("SCRAM-SHA-256 error: %s", sc.Err().Error()) + } + + default: + errorf("unknown authentication response: %d", code) + } +} + +type format int + +const formatText format = 0 +const formatBinary format = 1 + +// One result-column format code with the value 1 (i.e. all binary). +var colFmtDataAllBinary = []byte{0, 1, 0, 1} + +// No result-column format codes (i.e. all text). +var colFmtDataAllText = []byte{0, 0} + +type stmt struct { + cn *conn + name string + rowsHeader + colFmtData []byte + paramTyps []oid.Oid + closed bool +} + +func (st *stmt) Close() (err error) { + if st.closed { + return nil + } + if err := st.cn.err.get(); err != nil { + return err + } + defer st.cn.errRecover(&err) + + w := st.cn.writeBuf('C') + w.byte('S') + w.string(st.name) + st.cn.send(w) + + st.cn.send(st.cn.writeBuf('S')) + + t, _ := st.cn.recv1() + if t != '3' { + st.cn.err.set(driver.ErrBadConn) + errorf("unexpected close response: %q", t) + } + st.closed = true + + t, r := st.cn.recv1() + if t != 'Z' { + st.cn.err.set(driver.ErrBadConn) + errorf("expected ready for query, but got: %q", t) + } + st.cn.processReadyForQuery(r) + + return nil +} + +func (st *stmt) Query(v []driver.Value) (r driver.Rows, err error) { + return st.query(v) +} + +func (st *stmt) query(v []driver.Value) (r *rows, err error) { + if err := st.cn.err.get(); err != nil { + return nil, err + } + defer st.cn.errRecover(&err) + + st.exec(v) + return &rows{ + cn: st.cn, + rowsHeader: st.rowsHeader, + }, nil +} + +func (st *stmt) Exec(v []driver.Value) (res driver.Result, err error) { + if err := st.cn.err.get(); err != nil { + return nil, err + } + defer st.cn.errRecover(&err) + + st.exec(v) + res, _, err = st.cn.readExecuteResponse("simple query") + return res, err +} + +func (st *stmt) exec(v []driver.Value) { + if len(v) >= 65536 { + errorf("got %d parameters but PostgreSQL only supports 65535 parameters", len(v)) + } + if len(v) != len(st.paramTyps) { + errorf("got %d parameters but the statement requires %d", len(v), len(st.paramTyps)) + } + + cn := st.cn + w := cn.writeBuf('B') + w.byte(0) // unnamed portal + w.string(st.name) + + if cn.binaryParameters { + cn.sendBinaryParameters(w, v) + } else { + w.int16(0) + w.int16(len(v)) + for i, x := range v { + if x == nil { + w.int32(-1) + } else { + b := encode(&cn.parameterStatus, x, st.paramTyps[i]) + w.int32(len(b)) + w.bytes(b) + } + } + } + w.bytes(st.colFmtData) + + w.next('E') + w.byte(0) + w.int32(0) + + w.next('S') + cn.send(w) + + cn.readBindResponse() + cn.postExecuteWorkaround() + +} + +func (st *stmt) NumInput() int { + return len(st.paramTyps) +} + +// parseComplete parses the "command tag" from a CommandComplete message, and +// returns the number of rows affected (if applicable) and a string +// identifying only the command that was executed, e.g. "ALTER TABLE". If the +// command tag could not be parsed, parseComplete panics. +func (cn *conn) parseComplete(commandTag string) (driver.Result, string) { + commandsWithAffectedRows := []string{ + "SELECT ", + // INSERT is handled below + "UPDATE ", + "DELETE ", + "FETCH ", + "MOVE ", + "COPY ", + } + + var affectedRows *string + for _, tag := range commandsWithAffectedRows { + if strings.HasPrefix(commandTag, tag) { + t := commandTag[len(tag):] + affectedRows = &t + commandTag = tag[:len(tag)-1] + break + } + } + // INSERT also includes the oid of the inserted row in its command tag. + // Oids in user tables are deprecated, and the oid is only returned when + // exactly one row is inserted, so it's unlikely to be of value to any + // real-world application and we can ignore it. + if affectedRows == nil && strings.HasPrefix(commandTag, "INSERT ") { + parts := strings.Split(commandTag, " ") + if len(parts) != 3 { + cn.err.set(driver.ErrBadConn) + errorf("unexpected INSERT command tag %s", commandTag) + } + affectedRows = &parts[len(parts)-1] + commandTag = "INSERT" + } + // There should be no affected rows attached to the tag, just return it + if affectedRows == nil { + return driver.RowsAffected(0), commandTag + } + n, err := strconv.ParseInt(*affectedRows, 10, 64) + if err != nil { + cn.err.set(driver.ErrBadConn) + errorf("could not parse commandTag: %s", err) + } + return driver.RowsAffected(n), commandTag +} + +type rowsHeader struct { + colNames []string + colTyps []fieldDesc + colFmts []format +} + +type rows struct { + cn *conn + finish func() + rowsHeader + done bool + rb readBuf + result driver.Result + tag string + + next *rowsHeader +} + +func (rs *rows) Close() error { + if finish := rs.finish; finish != nil { + defer finish() + } + // no need to look at cn.bad as Next() will + for { + err := rs.Next(nil) + switch err { + case nil: + case io.EOF: + // rs.Next can return io.EOF on both 'Z' (ready for query) and 'T' (row + // description, used with HasNextResultSet). We need to fetch messages until + // we hit a 'Z', which is done by waiting for done to be set. + if rs.done { + return nil + } + default: + return err + } + } +} + +func (rs *rows) Columns() []string { + return rs.colNames +} + +func (rs *rows) Result() driver.Result { + if rs.result == nil { + return emptyRows + } + return rs.result +} + +func (rs *rows) Tag() string { + return rs.tag +} + +func (rs *rows) Next(dest []driver.Value) (err error) { + if rs.done { + return io.EOF + } + + conn := rs.cn + if err := conn.err.getForNext(); err != nil { + return err + } + defer conn.errRecover(&err) + + for { + t := conn.recv1Buf(&rs.rb) + switch t { + case 'E': + err = parseError(&rs.rb) + case 'C', 'I': + if t == 'C' { + rs.result, rs.tag = conn.parseComplete(rs.rb.string()) + } + continue + case 'Z': + conn.processReadyForQuery(&rs.rb) + rs.done = true + if err != nil { + return err + } + return io.EOF + case 'D': + n := rs.rb.int16() + if err != nil { + conn.err.set(driver.ErrBadConn) + errorf("unexpected DataRow after error %s", err) + } + if n < len(dest) { + dest = dest[:n] + } + for i := range dest { + l := rs.rb.int32() + if l == -1 { + dest[i] = nil + continue + } + dest[i] = decode(&conn.parameterStatus, rs.rb.next(l), rs.colTyps[i].OID, rs.colFmts[i]) + } + return + case 'T': + next := parsePortalRowDescribe(&rs.rb) + rs.next = &next + return io.EOF + default: + errorf("unexpected message after execute: %q", t) + } + } +} + +func (rs *rows) HasNextResultSet() bool { + hasNext := rs.next != nil && !rs.done + return hasNext +} + +func (rs *rows) NextResultSet() error { + if rs.next == nil { + return io.EOF + } + rs.rowsHeader = *rs.next + rs.next = nil + return nil +} + +// QuoteIdentifier quotes an "identifier" (e.g. a table or a column name) to be +// used as part of an SQL statement. For example: +// +// tblname := "my_table" +// data := "my_data" +// quoted := pq.QuoteIdentifier(tblname) +// err := db.Exec(fmt.Sprintf("INSERT INTO %s VALUES ($1)", quoted), data) +// +// Any double quotes in name will be escaped. The quoted identifier will be +// case sensitive when used in a query. If the input string contains a zero +// byte, the result will be truncated immediately before it. +func QuoteIdentifier(name string) string { + end := strings.IndexRune(name, 0) + if end > -1 { + name = name[:end] + } + return `"` + strings.Replace(name, `"`, `""`, -1) + `"` +} + +// BufferQuoteIdentifier satisfies the same purpose as QuoteIdentifier, but backed by a +// byte buffer. +func BufferQuoteIdentifier(name string, buffer *bytes.Buffer) { + end := strings.IndexRune(name, 0) + if end > -1 { + name = name[:end] + } + buffer.WriteRune('"') + buffer.WriteString(strings.Replace(name, `"`, `""`, -1)) + buffer.WriteRune('"') +} + +// QuoteLiteral quotes a 'literal' (e.g. a parameter, often used to pass literal +// to DDL and other statements that do not accept parameters) to be used as part +// of an SQL statement. For example: +// +// exp_date := pq.QuoteLiteral("2023-01-05 15:00:00Z") +// err := db.Exec(fmt.Sprintf("CREATE ROLE my_user VALID UNTIL %s", exp_date)) +// +// Any single quotes in name will be escaped. Any backslashes (i.e. "\") will be +// replaced by two backslashes (i.e. "\\") and the C-style escape identifier +// that PostgreSQL provides ('E') will be prepended to the string. +func QuoteLiteral(literal string) string { + // This follows the PostgreSQL internal algorithm for handling quoted literals + // from libpq, which can be found in the "PQEscapeStringInternal" function, + // which is found in the libpq/fe-exec.c source file: + // https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/libpq/fe-exec.c + // + // substitute any single-quotes (') with two single-quotes ('') + literal = strings.Replace(literal, `'`, `''`, -1) + // determine if the string has any backslashes (\) in it. + // if it does, replace any backslashes (\) with two backslashes (\\) + // then, we need to wrap the entire string with a PostgreSQL + // C-style escape. Per how "PQEscapeStringInternal" handles this case, we + // also add a space before the "E" + if strings.Contains(literal, `\`) { + literal = strings.Replace(literal, `\`, `\\`, -1) + literal = ` E'` + literal + `'` + } else { + // otherwise, we can just wrap the literal with a pair of single quotes + literal = `'` + literal + `'` + } + return literal +} + +func md5s(s string) string { + h := md5.New() + h.Write([]byte(s)) + return fmt.Sprintf("%x", h.Sum(nil)) +} + +func (cn *conn) sendBinaryParameters(b *writeBuf, args []driver.Value) { + // Do one pass over the parameters to see if we're going to send any of + // them over in binary. If we are, create a paramFormats array at the + // same time. + var paramFormats []int + for i, x := range args { + _, ok := x.([]byte) + if ok { + if paramFormats == nil { + paramFormats = make([]int, len(args)) + } + paramFormats[i] = 1 + } + } + if paramFormats == nil { + b.int16(0) + } else { + b.int16(len(paramFormats)) + for _, x := range paramFormats { + b.int16(x) + } + } + + b.int16(len(args)) + for _, x := range args { + if x == nil { + b.int32(-1) + } else { + datum := binaryEncode(&cn.parameterStatus, x) + b.int32(len(datum)) + b.bytes(datum) + } + } +} + +func (cn *conn) sendBinaryModeQuery(query string, args []driver.Value) { + if len(args) >= 65536 { + errorf("got %d parameters but PostgreSQL only supports 65535 parameters", len(args)) + } + + b := cn.writeBuf('P') + b.byte(0) // unnamed statement + b.string(query) + b.int16(0) + + b.next('B') + b.int16(0) // unnamed portal and statement + cn.sendBinaryParameters(b, args) + b.bytes(colFmtDataAllText) + + b.next('D') + b.byte('P') + b.byte(0) // unnamed portal + + b.next('E') + b.byte(0) + b.int32(0) + + b.next('S') + cn.send(b) +} + +func (cn *conn) processParameterStatus(r *readBuf) { + var err error + + param := r.string() + switch param { + case "server_version": + var major1 int + var major2 int + _, err = fmt.Sscanf(r.string(), "%d.%d", &major1, &major2) + if err == nil { + cn.parameterStatus.serverVersion = major1*10000 + major2*100 + } + + case "TimeZone": + cn.parameterStatus.currentLocation, err = time.LoadLocation(r.string()) + if err != nil { + cn.parameterStatus.currentLocation = nil + } + + default: + // ignore + } +} + +func (cn *conn) processReadyForQuery(r *readBuf) { + cn.txnStatus = transactionStatus(r.byte()) +} + +func (cn *conn) readReadyForQuery() { + t, r := cn.recv1() + switch t { + case 'Z': + cn.processReadyForQuery(r) + return + default: + cn.err.set(driver.ErrBadConn) + errorf("unexpected message %q; expected ReadyForQuery", t) + } +} + +func (cn *conn) processBackendKeyData(r *readBuf) { + cn.processID = r.int32() + cn.secretKey = r.int32() +} + +func (cn *conn) readParseResponse() { + t, r := cn.recv1() + switch t { + case '1': + return + case 'E': + err := parseError(r) + cn.readReadyForQuery() + panic(err) + default: + cn.err.set(driver.ErrBadConn) + errorf("unexpected Parse response %q", t) + } +} + +func (cn *conn) readStatementDescribeResponse() ( + paramTyps []oid.Oid, + colNames []string, + colTyps []fieldDesc, +) { + for { + t, r := cn.recv1() + switch t { + case 't': + nparams := r.int16() + paramTyps = make([]oid.Oid, nparams) + for i := range paramTyps { + paramTyps[i] = r.oid() + } + case 'n': + return paramTyps, nil, nil + case 'T': + colNames, colTyps = parseStatementRowDescribe(r) + return paramTyps, colNames, colTyps + case 'E': + err := parseError(r) + cn.readReadyForQuery() + panic(err) + default: + cn.err.set(driver.ErrBadConn) + errorf("unexpected Describe statement response %q", t) + } + } +} + +func (cn *conn) readPortalDescribeResponse() rowsHeader { + t, r := cn.recv1() + switch t { + case 'T': + return parsePortalRowDescribe(r) + case 'n': + return rowsHeader{} + case 'E': + err := parseError(r) + cn.readReadyForQuery() + panic(err) + default: + cn.err.set(driver.ErrBadConn) + errorf("unexpected Describe response %q", t) + } + panic("not reached") +} + +func (cn *conn) readBindResponse() { + t, r := cn.recv1() + switch t { + case '2': + return + case 'E': + err := parseError(r) + cn.readReadyForQuery() + panic(err) + default: + cn.err.set(driver.ErrBadConn) + errorf("unexpected Bind response %q", t) + } +} + +func (cn *conn) postExecuteWorkaround() { + // Work around a bug in sql.DB.QueryRow: in Go 1.2 and earlier it ignores + // any errors from rows.Next, which masks errors that happened during the + // execution of the query. To avoid the problem in common cases, we wait + // here for one more message from the database. If it's not an error the + // query will likely succeed (or perhaps has already, if it's a + // CommandComplete), so we push the message into the conn struct; recv1 + // will return it as the next message for rows.Next or rows.Close. + // However, if it's an error, we wait until ReadyForQuery and then return + // the error to our caller. + for { + t, r := cn.recv1() + switch t { + case 'E': + err := parseError(r) + cn.readReadyForQuery() + panic(err) + case 'C', 'D', 'I': + // the query didn't fail, but we can't process this message + cn.saveMessage(t, r) + return + default: + cn.err.set(driver.ErrBadConn) + errorf("unexpected message during extended query execution: %q", t) + } + } +} + +// Only for Exec(), since we ignore the returned data +func (cn *conn) readExecuteResponse( + protocolState string, +) (res driver.Result, commandTag string, err error) { + for { + t, r := cn.recv1() + switch t { + case 'C': + if err != nil { + cn.err.set(driver.ErrBadConn) + errorf("unexpected CommandComplete after error %s", err) + } + res, commandTag = cn.parseComplete(r.string()) + case 'Z': + cn.processReadyForQuery(r) + if res == nil && err == nil { + err = errUnexpectedReady + } + return res, commandTag, err + case 'E': + err = parseError(r) + case 'T', 'D', 'I': + if err != nil { + cn.err.set(driver.ErrBadConn) + errorf("unexpected %q after error %s", t, err) + } + if t == 'I' { + res = emptyRows + } + // ignore any results + default: + cn.err.set(driver.ErrBadConn) + errorf("unknown %s response: %q", protocolState, t) + } + } +} + +func parseStatementRowDescribe(r *readBuf) (colNames []string, colTyps []fieldDesc) { + n := r.int16() + colNames = make([]string, n) + colTyps = make([]fieldDesc, n) + for i := range colNames { + colNames[i] = r.string() + r.next(6) + colTyps[i].OID = r.oid() + colTyps[i].Len = r.int16() + colTyps[i].Mod = r.int32() + // format code not known when describing a statement; always 0 + r.next(2) + } + return +} + +func parsePortalRowDescribe(r *readBuf) rowsHeader { + n := r.int16() + colNames := make([]string, n) + colFmts := make([]format, n) + colTyps := make([]fieldDesc, n) + for i := range colNames { + colNames[i] = r.string() + r.next(6) + colTyps[i].OID = r.oid() + colTyps[i].Len = r.int16() + colTyps[i].Mod = r.int32() + colFmts[i] = format(r.int16()) + } + return rowsHeader{ + colNames: colNames, + colFmts: colFmts, + colTyps: colTyps, + } +} + +// parseEnviron tries to mimic some of libpq's environment handling +// +// To ease testing, it does not directly reference os.Environ, but is +// designed to accept its output. +// +// Environment-set connection information is intended to have a higher +// precedence than a library default but lower than any explicitly +// passed information (such as in the URL or connection string). +func parseEnviron(env []string) (out map[string]string) { + out = make(map[string]string) + + for _, v := range env { + parts := strings.SplitN(v, "=", 2) + + accrue := func(keyname string) { + out[keyname] = parts[1] + } + unsupported := func() { + panic(fmt.Sprintf("setting %v not supported", parts[0])) + } + + // The order of these is the same as is seen in the + // PostgreSQL 9.1 manual. Unsupported but well-defined + // keys cause a panic; these should be unset prior to + // execution. Options which pq expects to be set to a + // certain value are allowed, but must be set to that + // value if present (they can, of course, be absent). + switch parts[0] { + case "PGHOST": + accrue("host") + case "PGHOSTADDR": + unsupported() + case "PGPORT": + accrue("port") + case "PGDATABASE": + accrue("dbname") + case "PGUSER": + accrue("user") + case "PGPASSWORD": + accrue("password") + case "PGSERVICE", "PGSERVICEFILE", "PGREALM": + unsupported() + case "PGOPTIONS": + accrue("options") + case "PGAPPNAME": + accrue("application_name") + case "PGSSLMODE": + accrue("sslmode") + case "PGSSLCERT": + accrue("sslcert") + case "PGSSLKEY": + accrue("sslkey") + case "PGSSLROOTCERT": + accrue("sslrootcert") + case "PGSSLSNI": + accrue("sslsni") + case "PGREQUIRESSL", "PGSSLCRL": + unsupported() + case "PGREQUIREPEER": + unsupported() + case "PGKRBSRVNAME", "PGGSSLIB": + unsupported() + case "PGCONNECT_TIMEOUT": + accrue("connect_timeout") + case "PGCLIENTENCODING": + accrue("client_encoding") + case "PGDATESTYLE": + accrue("datestyle") + case "PGTZ": + accrue("timezone") + case "PGGEQO": + accrue("geqo") + case "PGSYSCONFDIR", "PGLOCALEDIR": + unsupported() + } + } + + return out +} + +// isUTF8 returns whether name is a fuzzy variation of the string "UTF-8". +func isUTF8(name string) bool { + // Recognize all sorts of silly things as "UTF-8", like Postgres does + s := strings.Map(alnumLowerASCII, name) + return s == "utf8" || s == "unicode" +} + +func alnumLowerASCII(ch rune) rune { + if 'A' <= ch && ch <= 'Z' { + return ch + ('a' - 'A') + } + if 'a' <= ch && ch <= 'z' || '0' <= ch && ch <= '9' { + return ch + } + return -1 // discard +} + +// The database/sql/driver package says: +// All Conn implementations should implement the following interfaces: Pinger, SessionResetter, and Validator. +var _ driver.Pinger = &conn{} +var _ driver.SessionResetter = &conn{} + +func (cn *conn) ResetSession(ctx context.Context) error { + // Ensure bad connections are reported: From database/sql/driver: + // If a connection is never returned to the connection pool but immediately reused, then + // ResetSession is called prior to reuse but IsValid is not called. + return cn.err.get() +} + +func (cn *conn) IsValid() bool { + return cn.err.get() == nil +} diff --git a/vendor/github.com/lib/pq/conn_go115.go b/vendor/github.com/lib/pq/conn_go115.go new file mode 100644 index 000000000..f4ef030f9 --- /dev/null +++ b/vendor/github.com/lib/pq/conn_go115.go @@ -0,0 +1,8 @@ +//go:build go1.15 +// +build go1.15 + +package pq + +import "database/sql/driver" + +var _ driver.Validator = &conn{} diff --git a/vendor/github.com/lib/pq/conn_go18.go b/vendor/github.com/lib/pq/conn_go18.go new file mode 100644 index 000000000..63d4ca6aa --- /dev/null +++ b/vendor/github.com/lib/pq/conn_go18.go @@ -0,0 +1,247 @@ +package pq + +import ( + "context" + "database/sql" + "database/sql/driver" + "fmt" + "io" + "io/ioutil" + "time" +) + +const ( + watchCancelDialContextTimeout = time.Second * 10 +) + +// Implement the "QueryerContext" interface +func (cn *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { + list := make([]driver.Value, len(args)) + for i, nv := range args { + list[i] = nv.Value + } + finish := cn.watchCancel(ctx) + r, err := cn.query(query, list) + if err != nil { + if finish != nil { + finish() + } + return nil, err + } + r.finish = finish + return r, nil +} + +// Implement the "ExecerContext" interface +func (cn *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) { + list := make([]driver.Value, len(args)) + for i, nv := range args { + list[i] = nv.Value + } + + if finish := cn.watchCancel(ctx); finish != nil { + defer finish() + } + + return cn.Exec(query, list) +} + +// Implement the "ConnPrepareContext" interface +func (cn *conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) { + if finish := cn.watchCancel(ctx); finish != nil { + defer finish() + } + return cn.Prepare(query) +} + +// Implement the "ConnBeginTx" interface +func (cn *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) { + var mode string + + switch sql.IsolationLevel(opts.Isolation) { + case sql.LevelDefault: + // Don't touch mode: use the server's default + case sql.LevelReadUncommitted: + mode = " ISOLATION LEVEL READ UNCOMMITTED" + case sql.LevelReadCommitted: + mode = " ISOLATION LEVEL READ COMMITTED" + case sql.LevelRepeatableRead: + mode = " ISOLATION LEVEL REPEATABLE READ" + case sql.LevelSerializable: + mode = " ISOLATION LEVEL SERIALIZABLE" + default: + return nil, fmt.Errorf("pq: isolation level not supported: %d", opts.Isolation) + } + + if opts.ReadOnly { + mode += " READ ONLY" + } else { + mode += " READ WRITE" + } + + tx, err := cn.begin(mode) + if err != nil { + return nil, err + } + cn.txnFinish = cn.watchCancel(ctx) + return tx, nil +} + +func (cn *conn) Ping(ctx context.Context) error { + if finish := cn.watchCancel(ctx); finish != nil { + defer finish() + } + rows, err := cn.simpleQuery(";") + if err != nil { + return driver.ErrBadConn // https://golang.org/pkg/database/sql/driver/#Pinger + } + rows.Close() + return nil +} + +func (cn *conn) watchCancel(ctx context.Context) func() { + if done := ctx.Done(); done != nil { + finished := make(chan struct{}, 1) + go func() { + select { + case <-done: + select { + case finished <- struct{}{}: + default: + // We raced with the finish func, let the next query handle this with the + // context. + return + } + + // Set the connection state to bad so it does not get reused. + cn.err.set(ctx.Err()) + + // At this point the function level context is canceled, + // so it must not be used for the additional network + // request to cancel the query. + // Create a new context to pass into the dial. + ctxCancel, cancel := context.WithTimeout(context.Background(), watchCancelDialContextTimeout) + defer cancel() + + _ = cn.cancel(ctxCancel) + case <-finished: + } + }() + return func() { + select { + case <-finished: + cn.err.set(ctx.Err()) + cn.Close() + case finished <- struct{}{}: + } + } + } + return nil +} + +func (cn *conn) cancel(ctx context.Context) error { + // Create a new values map (copy). This makes sure the connection created + // in this method cannot write to the same underlying data, which could + // cause a concurrent map write panic. This is necessary because cancel + // is called from a goroutine in watchCancel. + o := make(values) + for k, v := range cn.opts { + o[k] = v + } + + c, err := dial(ctx, cn.dialer, o) + if err != nil { + return err + } + defer c.Close() + + { + can := conn{ + c: c, + } + err = can.ssl(o) + if err != nil { + return err + } + + w := can.writeBuf(0) + w.int32(80877102) // cancel request code + w.int32(cn.processID) + w.int32(cn.secretKey) + + if err := can.sendStartupPacket(w); err != nil { + return err + } + } + + // Read until EOF to ensure that the server received the cancel. + { + _, err := io.Copy(ioutil.Discard, c) + return err + } +} + +// Implement the "StmtQueryContext" interface +func (st *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) { + list := make([]driver.Value, len(args)) + for i, nv := range args { + list[i] = nv.Value + } + finish := st.watchCancel(ctx) + r, err := st.query(list) + if err != nil { + if finish != nil { + finish() + } + return nil, err + } + r.finish = finish + return r, nil +} + +// Implement the "StmtExecContext" interface +func (st *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) { + list := make([]driver.Value, len(args)) + for i, nv := range args { + list[i] = nv.Value + } + + if finish := st.watchCancel(ctx); finish != nil { + defer finish() + } + + return st.Exec(list) +} + +// watchCancel is implemented on stmt in order to not mark the parent conn as bad +func (st *stmt) watchCancel(ctx context.Context) func() { + if done := ctx.Done(); done != nil { + finished := make(chan struct{}) + go func() { + select { + case <-done: + // At this point the function level context is canceled, + // so it must not be used for the additional network + // request to cancel the query. + // Create a new context to pass into the dial. + ctxCancel, cancel := context.WithTimeout(context.Background(), watchCancelDialContextTimeout) + defer cancel() + + _ = st.cancel(ctxCancel) + finished <- struct{}{} + case <-finished: + } + }() + return func() { + select { + case <-finished: + case finished <- struct{}{}: + } + } + } + return nil +} + +func (st *stmt) cancel(ctx context.Context) error { + return st.cn.cancel(ctx) +} diff --git a/vendor/github.com/lib/pq/connector.go b/vendor/github.com/lib/pq/connector.go new file mode 100644 index 000000000..1145e1225 --- /dev/null +++ b/vendor/github.com/lib/pq/connector.go @@ -0,0 +1,120 @@ +package pq + +import ( + "context" + "database/sql/driver" + "errors" + "fmt" + "os" + "strings" +) + +// Connector represents a fixed configuration for the pq driver with a given +// name. Connector satisfies the database/sql/driver Connector interface and +// can be used to create any number of DB Conn's via the database/sql OpenDB +// function. +// +// See https://golang.org/pkg/database/sql/driver/#Connector. +// See https://golang.org/pkg/database/sql/#OpenDB. +type Connector struct { + opts values + dialer Dialer +} + +// Connect returns a connection to the database using the fixed configuration +// of this Connector. Context is not used. +func (c *Connector) Connect(ctx context.Context) (driver.Conn, error) { + return c.open(ctx) +} + +// Dialer allows change the dialer used to open connections. +func (c *Connector) Dialer(dialer Dialer) { + c.dialer = dialer +} + +// Driver returns the underlying driver of this Connector. +func (c *Connector) Driver() driver.Driver { + return &Driver{} +} + +// NewConnector returns a connector for the pq driver in a fixed configuration +// with the given dsn. The returned connector can be used to create any number +// of equivalent Conn's. The returned connector is intended to be used with +// database/sql.OpenDB. +// +// See https://golang.org/pkg/database/sql/driver/#Connector. +// See https://golang.org/pkg/database/sql/#OpenDB. +func NewConnector(dsn string) (*Connector, error) { + var err error + o := make(values) + + // A number of defaults are applied here, in this order: + // + // * Very low precedence defaults applied in every situation + // * Environment variables + // * Explicitly passed connection information + o["host"] = "localhost" + o["port"] = "5432" + // N.B.: Extra float digits should be set to 3, but that breaks + // Postgres 8.4 and older, where the max is 2. + o["extra_float_digits"] = "2" + for k, v := range parseEnviron(os.Environ()) { + o[k] = v + } + + if strings.HasPrefix(dsn, "postgres://") || strings.HasPrefix(dsn, "postgresql://") { + dsn, err = ParseURL(dsn) + if err != nil { + return nil, err + } + } + + if err := parseOpts(dsn, o); err != nil { + return nil, err + } + + // Use the "fallback" application name if necessary + if fallback, ok := o["fallback_application_name"]; ok { + if _, ok := o["application_name"]; !ok { + o["application_name"] = fallback + } + } + + // We can't work with any client_encoding other than UTF-8 currently. + // However, we have historically allowed the user to set it to UTF-8 + // explicitly, and there's no reason to break such programs, so allow that. + // Note that the "options" setting could also set client_encoding, but + // parsing its value is not worth it. Instead, we always explicitly send + // client_encoding as a separate run-time parameter, which should override + // anything set in options. + if enc, ok := o["client_encoding"]; ok && !isUTF8(enc) { + return nil, errors.New("client_encoding must be absent or 'UTF8'") + } + o["client_encoding"] = "UTF8" + // DateStyle needs a similar treatment. + if datestyle, ok := o["datestyle"]; ok { + if datestyle != "ISO, MDY" { + return nil, fmt.Errorf("setting datestyle must be absent or %v; got %v", "ISO, MDY", datestyle) + } + } else { + o["datestyle"] = "ISO, MDY" + } + + // If a user is not provided by any other means, the last + // resort is to use the current operating system provided user + // name. + if _, ok := o["user"]; !ok { + u, err := userCurrent() + if err != nil { + return nil, err + } + o["user"] = u + } + + // SSL is not necessary or supported over UNIX domain sockets + if network, _ := network(o); network == "unix" { + o["sslmode"] = "disable" + } + + return &Connector{opts: o, dialer: defaultDialer{}}, nil +} diff --git a/vendor/github.com/lib/pq/copy.go b/vendor/github.com/lib/pq/copy.go new file mode 100644 index 000000000..a8f16b2b2 --- /dev/null +++ b/vendor/github.com/lib/pq/copy.go @@ -0,0 +1,348 @@ +package pq + +import ( + "bytes" + "context" + "database/sql/driver" + "encoding/binary" + "errors" + "fmt" + "sync" +) + +var ( + errCopyInClosed = errors.New("pq: copyin statement has already been closed") + errBinaryCopyNotSupported = errors.New("pq: only text format supported for COPY") + errCopyToNotSupported = errors.New("pq: COPY TO is not supported") + errCopyNotSupportedOutsideTxn = errors.New("pq: COPY is only allowed inside a transaction") + errCopyInProgress = errors.New("pq: COPY in progress") +) + +// CopyIn creates a COPY FROM statement which can be prepared with +// Tx.Prepare(). The target table should be visible in search_path. +func CopyIn(table string, columns ...string) string { + buffer := bytes.NewBufferString("COPY ") + BufferQuoteIdentifier(table, buffer) + buffer.WriteString(" (") + makeStmt(buffer, columns...) + return buffer.String() +} + +// MakeStmt makes the stmt string for CopyIn and CopyInSchema. +func makeStmt(buffer *bytes.Buffer, columns ...string) { + //s := bytes.NewBufferString() + for i, col := range columns { + if i != 0 { + buffer.WriteString(", ") + } + BufferQuoteIdentifier(col, buffer) + } + buffer.WriteString(") FROM STDIN") +} + +// CopyInSchema creates a COPY FROM statement which can be prepared with +// Tx.Prepare(). +func CopyInSchema(schema, table string, columns ...string) string { + buffer := bytes.NewBufferString("COPY ") + BufferQuoteIdentifier(schema, buffer) + buffer.WriteRune('.') + BufferQuoteIdentifier(table, buffer) + buffer.WriteString(" (") + makeStmt(buffer, columns...) + return buffer.String() +} + +type copyin struct { + cn *conn + buffer []byte + rowData chan []byte + done chan bool + + closed bool + + mu struct { + sync.Mutex + err error + driver.Result + } +} + +const ciBufferSize = 64 * 1024 + +// flush buffer before the buffer is filled up and needs reallocation +const ciBufferFlushSize = 63 * 1024 + +func (cn *conn) prepareCopyIn(q string) (_ driver.Stmt, err error) { + if !cn.isInTransaction() { + return nil, errCopyNotSupportedOutsideTxn + } + + ci := ©in{ + cn: cn, + buffer: make([]byte, 0, ciBufferSize), + rowData: make(chan []byte), + done: make(chan bool, 1), + } + // add CopyData identifier + 4 bytes for message length + ci.buffer = append(ci.buffer, 'd', 0, 0, 0, 0) + + b := cn.writeBuf('Q') + b.string(q) + cn.send(b) + +awaitCopyInResponse: + for { + t, r := cn.recv1() + switch t { + case 'G': + if r.byte() != 0 { + err = errBinaryCopyNotSupported + break awaitCopyInResponse + } + go ci.resploop() + return ci, nil + case 'H': + err = errCopyToNotSupported + break awaitCopyInResponse + case 'E': + err = parseError(r) + case 'Z': + if err == nil { + ci.setBad(driver.ErrBadConn) + errorf("unexpected ReadyForQuery in response to COPY") + } + cn.processReadyForQuery(r) + return nil, err + default: + ci.setBad(driver.ErrBadConn) + errorf("unknown response for copy query: %q", t) + } + } + + // something went wrong, abort COPY before we return + b = cn.writeBuf('f') + b.string(err.Error()) + cn.send(b) + + for { + t, r := cn.recv1() + switch t { + case 'c', 'C', 'E': + case 'Z': + // correctly aborted, we're done + cn.processReadyForQuery(r) + return nil, err + default: + ci.setBad(driver.ErrBadConn) + errorf("unknown response for CopyFail: %q", t) + } + } +} + +func (ci *copyin) flush(buf []byte) { + // set message length (without message identifier) + binary.BigEndian.PutUint32(buf[1:], uint32(len(buf)-1)) + + _, err := ci.cn.c.Write(buf) + if err != nil { + panic(err) + } +} + +func (ci *copyin) resploop() { + for { + var r readBuf + t, err := ci.cn.recvMessage(&r) + if err != nil { + ci.setBad(driver.ErrBadConn) + ci.setError(err) + ci.done <- true + return + } + switch t { + case 'C': + // complete + res, _ := ci.cn.parseComplete(r.string()) + ci.setResult(res) + case 'N': + if n := ci.cn.noticeHandler; n != nil { + n(parseError(&r)) + } + case 'Z': + ci.cn.processReadyForQuery(&r) + ci.done <- true + return + case 'E': + err := parseError(&r) + ci.setError(err) + default: + ci.setBad(driver.ErrBadConn) + ci.setError(fmt.Errorf("unknown response during CopyIn: %q", t)) + ci.done <- true + return + } + } +} + +func (ci *copyin) setBad(err error) { + ci.cn.err.set(err) +} + +func (ci *copyin) getBad() error { + return ci.cn.err.get() +} + +func (ci *copyin) err() error { + ci.mu.Lock() + err := ci.mu.err + ci.mu.Unlock() + return err +} + +// setError() sets ci.err if one has not been set already. Caller must not be +// holding ci.Mutex. +func (ci *copyin) setError(err error) { + ci.mu.Lock() + if ci.mu.err == nil { + ci.mu.err = err + } + ci.mu.Unlock() +} + +func (ci *copyin) setResult(result driver.Result) { + ci.mu.Lock() + ci.mu.Result = result + ci.mu.Unlock() +} + +func (ci *copyin) getResult() driver.Result { + ci.mu.Lock() + result := ci.mu.Result + ci.mu.Unlock() + if result == nil { + return driver.RowsAffected(0) + } + return result +} + +func (ci *copyin) NumInput() int { + return -1 +} + +func (ci *copyin) Query(v []driver.Value) (r driver.Rows, err error) { + return nil, ErrNotSupported +} + +// Exec inserts values into the COPY stream. The insert is asynchronous +// and Exec can return errors from previous Exec calls to the same +// COPY stmt. +// +// You need to call Exec(nil) to sync the COPY stream and to get any +// errors from pending data, since Stmt.Close() doesn't return errors +// to the user. +func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) { + if ci.closed { + return nil, errCopyInClosed + } + + if err := ci.getBad(); err != nil { + return nil, err + } + defer ci.cn.errRecover(&err) + + if err := ci.err(); err != nil { + return nil, err + } + + if len(v) == 0 { + if err := ci.Close(); err != nil { + return driver.RowsAffected(0), err + } + + return ci.getResult(), nil + } + + numValues := len(v) + for i, value := range v { + ci.buffer = appendEncodedText(&ci.cn.parameterStatus, ci.buffer, value) + if i < numValues-1 { + ci.buffer = append(ci.buffer, '\t') + } + } + + ci.buffer = append(ci.buffer, '\n') + + if len(ci.buffer) > ciBufferFlushSize { + ci.flush(ci.buffer) + // reset buffer, keep bytes for message identifier and length + ci.buffer = ci.buffer[:5] + } + + return driver.RowsAffected(0), nil +} + +// CopyData inserts a raw string into the COPY stream. The insert is +// asynchronous and CopyData can return errors from previous CopyData calls to +// the same COPY stmt. +// +// You need to call Exec(nil) to sync the COPY stream and to get any +// errors from pending data, since Stmt.Close() doesn't return errors +// to the user. +func (ci *copyin) CopyData(ctx context.Context, line string) (r driver.Result, err error) { + if ci.closed { + return nil, errCopyInClosed + } + + if finish := ci.cn.watchCancel(ctx); finish != nil { + defer finish() + } + + if err := ci.getBad(); err != nil { + return nil, err + } + defer ci.cn.errRecover(&err) + + if err := ci.err(); err != nil { + return nil, err + } + + ci.buffer = append(ci.buffer, []byte(line)...) + ci.buffer = append(ci.buffer, '\n') + + if len(ci.buffer) > ciBufferFlushSize { + ci.flush(ci.buffer) + // reset buffer, keep bytes for message identifier and length + ci.buffer = ci.buffer[:5] + } + + return driver.RowsAffected(0), nil +} + +func (ci *copyin) Close() (err error) { + if ci.closed { // Don't do anything, we're already closed + return nil + } + ci.closed = true + + if err := ci.getBad(); err != nil { + return err + } + defer ci.cn.errRecover(&err) + + if len(ci.buffer) > 0 { + ci.flush(ci.buffer) + } + // Avoid touching the scratch buffer as resploop could be using it. + err = ci.cn.sendSimpleMessage('c') + if err != nil { + return err + } + + <-ci.done + ci.cn.inCopy = false + + if err := ci.err(); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/lib/pq/doc.go b/vendor/github.com/lib/pq/doc.go new file mode 100644 index 000000000..b57184801 --- /dev/null +++ b/vendor/github.com/lib/pq/doc.go @@ -0,0 +1,268 @@ +/* +Package pq is a pure Go Postgres driver for the database/sql package. + +In most cases clients will use the database/sql package instead of +using this package directly. For example: + + import ( + "database/sql" + + _ "github.com/lib/pq" + ) + + func main() { + connStr := "user=pqgotest dbname=pqgotest sslmode=verify-full" + db, err := sql.Open("postgres", connStr) + if err != nil { + log.Fatal(err) + } + + age := 21 + rows, err := db.Query("SELECT name FROM users WHERE age = $1", age) + … + } + +You can also connect to a database using a URL. For example: + + connStr := "postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full" + db, err := sql.Open("postgres", connStr) + + +Connection String Parameters + + +Similarly to libpq, when establishing a connection using pq you are expected to +supply a connection string containing zero or more parameters. +A subset of the connection parameters supported by libpq are also supported by pq. +Additionally, pq also lets you specify run-time parameters (such as search_path or work_mem) +directly in the connection string. This is different from libpq, which does not allow +run-time parameters in the connection string, instead requiring you to supply +them in the options parameter. + +For compatibility with libpq, the following special connection parameters are +supported: + + * dbname - The name of the database to connect to + * user - The user to sign in as + * password - The user's password + * host - The host to connect to. Values that start with / are for unix + domain sockets. (default is localhost) + * port - The port to bind to. (default is 5432) + * sslmode - Whether or not to use SSL (default is require, this is not + the default for libpq) + * fallback_application_name - An application_name to fall back to if one isn't provided. + * connect_timeout - Maximum wait for connection, in seconds. Zero or + not specified means wait indefinitely. + * sslcert - Cert file location. The file must contain PEM encoded data. + * sslkey - Key file location. The file must contain PEM encoded data. + * sslrootcert - The location of the root certificate file. The file + must contain PEM encoded data. + +Valid values for sslmode are: + + * disable - No SSL + * require - Always SSL (skip verification) + * verify-ca - Always SSL (verify that the certificate presented by the + server was signed by a trusted CA) + * verify-full - Always SSL (verify that the certification presented by + the server was signed by a trusted CA and the server host name + matches the one in the certificate) + +See http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING +for more information about connection string parameters. + +Use single quotes for values that contain whitespace: + + "user=pqgotest password='with spaces'" + +A backslash will escape the next character in values: + + "user=space\ man password='it\'s valid'" + +Note that the connection parameter client_encoding (which sets the +text encoding for the connection) may be set but must be "UTF8", +matching with the same rules as Postgres. It is an error to provide +any other value. + +In addition to the parameters listed above, any run-time parameter that can be +set at backend start time can be set in the connection string. For more +information, see +http://www.postgresql.org/docs/current/static/runtime-config.html. + +Most environment variables as specified at http://www.postgresql.org/docs/current/static/libpq-envars.html +supported by libpq are also supported by pq. If any of the environment +variables not supported by pq are set, pq will panic during connection +establishment. Environment variables have a lower precedence than explicitly +provided connection parameters. + +The pgpass mechanism as described in http://www.postgresql.org/docs/current/static/libpq-pgpass.html +is supported, but on Windows PGPASSFILE must be specified explicitly. + + +Queries + + +database/sql does not dictate any specific format for parameter +markers in query strings, and pq uses the Postgres-native ordinal markers, +as shown above. The same marker can be reused for the same parameter: + + rows, err := db.Query(`SELECT name FROM users WHERE favorite_fruit = $1 + OR age BETWEEN $2 AND $2 + 3`, "orange", 64) + +pq does not support the LastInsertId() method of the Result type in database/sql. +To return the identifier of an INSERT (or UPDATE or DELETE), use the Postgres +RETURNING clause with a standard Query or QueryRow call: + + var userid int + err := db.QueryRow(`INSERT INTO users(name, favorite_fruit, age) + VALUES('beatrice', 'starfruit', 93) RETURNING id`).Scan(&userid) + +For more details on RETURNING, see the Postgres documentation: + + http://www.postgresql.org/docs/current/static/sql-insert.html + http://www.postgresql.org/docs/current/static/sql-update.html + http://www.postgresql.org/docs/current/static/sql-delete.html + +For additional instructions on querying see the documentation for the database/sql package. + + +Data Types + + +Parameters pass through driver.DefaultParameterConverter before they are handled +by this package. When the binary_parameters connection option is enabled, +[]byte values are sent directly to the backend as data in binary format. + +This package returns the following types for values from the PostgreSQL backend: + + - integer types smallint, integer, and bigint are returned as int64 + - floating-point types real and double precision are returned as float64 + - character types char, varchar, and text are returned as string + - temporal types date, time, timetz, timestamp, and timestamptz are + returned as time.Time + - the boolean type is returned as bool + - the bytea type is returned as []byte + +All other types are returned directly from the backend as []byte values in text format. + + +Errors + + +pq may return errors of type *pq.Error which can be interrogated for error details: + + if err, ok := err.(*pq.Error); ok { + fmt.Println("pq error:", err.Code.Name()) + } + +See the pq.Error type for details. + + +Bulk imports + +You can perform bulk imports by preparing a statement returned by pq.CopyIn (or +pq.CopyInSchema) in an explicit transaction (sql.Tx). The returned statement +handle can then be repeatedly "executed" to copy data into the target table. +After all data has been processed you should call Exec() once with no arguments +to flush all buffered data. Any call to Exec() might return an error which +should be handled appropriately, but because of the internal buffering an error +returned by Exec() might not be related to the data passed in the call that +failed. + +CopyIn uses COPY FROM internally. It is not possible to COPY outside of an +explicit transaction in pq. + +Usage example: + + txn, err := db.Begin() + if err != nil { + log.Fatal(err) + } + + stmt, err := txn.Prepare(pq.CopyIn("users", "name", "age")) + if err != nil { + log.Fatal(err) + } + + for _, user := range users { + _, err = stmt.Exec(user.Name, int64(user.Age)) + if err != nil { + log.Fatal(err) + } + } + + _, err = stmt.Exec() + if err != nil { + log.Fatal(err) + } + + err = stmt.Close() + if err != nil { + log.Fatal(err) + } + + err = txn.Commit() + if err != nil { + log.Fatal(err) + } + + +Notifications + + +PostgreSQL supports a simple publish/subscribe model over database +connections. See http://www.postgresql.org/docs/current/static/sql-notify.html +for more information about the general mechanism. + +To start listening for notifications, you first have to open a new connection +to the database by calling NewListener. This connection can not be used for +anything other than LISTEN / NOTIFY. Calling Listen will open a "notification +channel"; once a notification channel is open, a notification generated on that +channel will effect a send on the Listener.Notify channel. A notification +channel will remain open until Unlisten is called, though connection loss might +result in some notifications being lost. To solve this problem, Listener sends +a nil pointer over the Notify channel any time the connection is re-established +following a connection loss. The application can get information about the +state of the underlying connection by setting an event callback in the call to +NewListener. + +A single Listener can safely be used from concurrent goroutines, which means +that there is often no need to create more than one Listener in your +application. However, a Listener is always connected to a single database, so +you will need to create a new Listener instance for every database you want to +receive notifications in. + +The channel name in both Listen and Unlisten is case sensitive, and can contain +any characters legal in an identifier (see +http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS +for more information). Note that the channel name will be truncated to 63 +bytes by the PostgreSQL server. + +You can find a complete, working example of Listener usage at +https://godoc.org/github.com/lib/pq/example/listen. + + +Kerberos Support + + +If you need support for Kerberos authentication, add the following to your main +package: + + import "github.com/lib/pq/auth/kerberos" + + func init() { + pq.RegisterGSSProvider(func() (pq.Gss, error) { return kerberos.NewGSS() }) + } + +This package is in a separate module so that users who don't need Kerberos +don't have to download unnecessary dependencies. + +When imported, additional connection string parameters are supported: + + * krbsrvname - GSS (Kerberos) service name when constructing the + SPN (default is `postgres`). This will be combined with the host + to form the full SPN: `krbsrvname/host`. + * krbspn - GSS (Kerberos) SPN. This takes priority over + `krbsrvname` if present. +*/ +package pq diff --git a/vendor/github.com/lib/pq/encode.go b/vendor/github.com/lib/pq/encode.go new file mode 100644 index 000000000..bffe6096a --- /dev/null +++ b/vendor/github.com/lib/pq/encode.go @@ -0,0 +1,632 @@ +package pq + +import ( + "bytes" + "database/sql/driver" + "encoding/binary" + "encoding/hex" + "errors" + "fmt" + "math" + "regexp" + "strconv" + "strings" + "sync" + "time" + + "github.com/lib/pq/oid" +) + +var time2400Regex = regexp.MustCompile(`^(24:00(?::00(?:\.0+)?)?)(?:[Z+-].*)?$`) + +func binaryEncode(parameterStatus *parameterStatus, x interface{}) []byte { + switch v := x.(type) { + case []byte: + return v + default: + return encode(parameterStatus, x, oid.T_unknown) + } +} + +func encode(parameterStatus *parameterStatus, x interface{}, pgtypOid oid.Oid) []byte { + switch v := x.(type) { + case int64: + return strconv.AppendInt(nil, v, 10) + case float64: + return strconv.AppendFloat(nil, v, 'f', -1, 64) + case []byte: + if pgtypOid == oid.T_bytea { + return encodeBytea(parameterStatus.serverVersion, v) + } + + return v + case string: + if pgtypOid == oid.T_bytea { + return encodeBytea(parameterStatus.serverVersion, []byte(v)) + } + + return []byte(v) + case bool: + return strconv.AppendBool(nil, v) + case time.Time: + return formatTs(v) + + default: + errorf("encode: unknown type for %T", v) + } + + panic("not reached") +} + +func decode(parameterStatus *parameterStatus, s []byte, typ oid.Oid, f format) interface{} { + switch f { + case formatBinary: + return binaryDecode(parameterStatus, s, typ) + case formatText: + return textDecode(parameterStatus, s, typ) + default: + panic("not reached") + } +} + +func binaryDecode(parameterStatus *parameterStatus, s []byte, typ oid.Oid) interface{} { + switch typ { + case oid.T_bytea: + return s + case oid.T_int8: + return int64(binary.BigEndian.Uint64(s)) + case oid.T_int4: + return int64(int32(binary.BigEndian.Uint32(s))) + case oid.T_int2: + return int64(int16(binary.BigEndian.Uint16(s))) + case oid.T_uuid: + b, err := decodeUUIDBinary(s) + if err != nil { + panic(err) + } + return b + + default: + errorf("don't know how to decode binary parameter of type %d", uint32(typ)) + } + + panic("not reached") +} + +func textDecode(parameterStatus *parameterStatus, s []byte, typ oid.Oid) interface{} { + switch typ { + case oid.T_char, oid.T_varchar, oid.T_text: + return string(s) + case oid.T_bytea: + b, err := parseBytea(s) + if err != nil { + errorf("%s", err) + } + return b + case oid.T_timestamptz: + return parseTs(parameterStatus.currentLocation, string(s)) + case oid.T_timestamp, oid.T_date: + return parseTs(nil, string(s)) + case oid.T_time: + return mustParse("15:04:05", typ, s) + case oid.T_timetz: + return mustParse("15:04:05-07", typ, s) + case oid.T_bool: + return s[0] == 't' + case oid.T_int8, oid.T_int4, oid.T_int2: + i, err := strconv.ParseInt(string(s), 10, 64) + if err != nil { + errorf("%s", err) + } + return i + case oid.T_float4, oid.T_float8: + // We always use 64 bit parsing, regardless of whether the input text is for + // a float4 or float8, because clients expect float64s for all float datatypes + // and returning a 32-bit parsed float64 produces lossy results. + f, err := strconv.ParseFloat(string(s), 64) + if err != nil { + errorf("%s", err) + } + return f + } + + return s +} + +// appendEncodedText encodes item in text format as required by COPY +// and appends to buf +func appendEncodedText(parameterStatus *parameterStatus, buf []byte, x interface{}) []byte { + switch v := x.(type) { + case int64: + return strconv.AppendInt(buf, v, 10) + case float64: + return strconv.AppendFloat(buf, v, 'f', -1, 64) + case []byte: + encodedBytea := encodeBytea(parameterStatus.serverVersion, v) + return appendEscapedText(buf, string(encodedBytea)) + case string: + return appendEscapedText(buf, v) + case bool: + return strconv.AppendBool(buf, v) + case time.Time: + return append(buf, formatTs(v)...) + case nil: + return append(buf, "\\N"...) + default: + errorf("encode: unknown type for %T", v) + } + + panic("not reached") +} + +func appendEscapedText(buf []byte, text string) []byte { + escapeNeeded := false + startPos := 0 + var c byte + + // check if we need to escape + for i := 0; i < len(text); i++ { + c = text[i] + if c == '\\' || c == '\n' || c == '\r' || c == '\t' { + escapeNeeded = true + startPos = i + break + } + } + if !escapeNeeded { + return append(buf, text...) + } + + // copy till first char to escape, iterate the rest + result := append(buf, text[:startPos]...) + for i := startPos; i < len(text); i++ { + c = text[i] + switch c { + case '\\': + result = append(result, '\\', '\\') + case '\n': + result = append(result, '\\', 'n') + case '\r': + result = append(result, '\\', 'r') + case '\t': + result = append(result, '\\', 't') + default: + result = append(result, c) + } + } + return result +} + +func mustParse(f string, typ oid.Oid, s []byte) time.Time { + str := string(s) + + // Check for a minute and second offset in the timezone. + if typ == oid.T_timestamptz || typ == oid.T_timetz { + for i := 3; i <= 6; i += 3 { + if str[len(str)-i] == ':' { + f += ":00" + continue + } + break + } + } + + // Special case for 24:00 time. + // Unfortunately, golang does not parse 24:00 as a proper time. + // In this case, we want to try "round to the next day", to differentiate. + // As such, we find if the 24:00 time matches at the beginning; if so, + // we default it back to 00:00 but add a day later. + var is2400Time bool + switch typ { + case oid.T_timetz, oid.T_time: + if matches := time2400Regex.FindStringSubmatch(str); matches != nil { + // Concatenate timezone information at the back. + str = "00:00:00" + str[len(matches[1]):] + is2400Time = true + } + } + t, err := time.Parse(f, str) + if err != nil { + errorf("decode: %s", err) + } + if is2400Time { + t = t.Add(24 * time.Hour) + } + return t +} + +var errInvalidTimestamp = errors.New("invalid timestamp") + +type timestampParser struct { + err error +} + +func (p *timestampParser) expect(str string, char byte, pos int) { + if p.err != nil { + return + } + if pos+1 > len(str) { + p.err = errInvalidTimestamp + return + } + if c := str[pos]; c != char && p.err == nil { + p.err = fmt.Errorf("expected '%v' at position %v; got '%v'", char, pos, c) + } +} + +func (p *timestampParser) mustAtoi(str string, begin int, end int) int { + if p.err != nil { + return 0 + } + if begin < 0 || end < 0 || begin > end || end > len(str) { + p.err = errInvalidTimestamp + return 0 + } + result, err := strconv.Atoi(str[begin:end]) + if err != nil { + if p.err == nil { + p.err = fmt.Errorf("expected number; got '%v'", str) + } + return 0 + } + return result +} + +// The location cache caches the time zones typically used by the client. +type locationCache struct { + cache map[int]*time.Location + lock sync.Mutex +} + +// All connections share the same list of timezones. Benchmarking shows that +// about 5% speed could be gained by putting the cache in the connection and +// losing the mutex, at the cost of a small amount of memory and a somewhat +// significant increase in code complexity. +var globalLocationCache = newLocationCache() + +func newLocationCache() *locationCache { + return &locationCache{cache: make(map[int]*time.Location)} +} + +// Returns the cached timezone for the specified offset, creating and caching +// it if necessary. +func (c *locationCache) getLocation(offset int) *time.Location { + c.lock.Lock() + defer c.lock.Unlock() + + location, ok := c.cache[offset] + if !ok { + location = time.FixedZone("", offset) + c.cache[offset] = location + } + + return location +} + +var infinityTsEnabled = false +var infinityTsNegative time.Time +var infinityTsPositive time.Time + +const ( + infinityTsEnabledAlready = "pq: infinity timestamp enabled already" + infinityTsNegativeMustBeSmaller = "pq: infinity timestamp: negative value must be smaller (before) than positive" +) + +// EnableInfinityTs controls the handling of Postgres' "-infinity" and +// "infinity" "timestamp"s. +// +// If EnableInfinityTs is not called, "-infinity" and "infinity" will return +// []byte("-infinity") and []byte("infinity") respectively, and potentially +// cause error "sql: Scan error on column index 0: unsupported driver -> Scan +// pair: []uint8 -> *time.Time", when scanning into a time.Time value. +// +// Once EnableInfinityTs has been called, all connections created using this +// driver will decode Postgres' "-infinity" and "infinity" for "timestamp", +// "timestamp with time zone" and "date" types to the predefined minimum and +// maximum times, respectively. When encoding time.Time values, any time which +// equals or precedes the predefined minimum time will be encoded to +// "-infinity". Any values at or past the maximum time will similarly be +// encoded to "infinity". +// +// If EnableInfinityTs is called with negative >= positive, it will panic. +// Calling EnableInfinityTs after a connection has been established results in +// undefined behavior. If EnableInfinityTs is called more than once, it will +// panic. +func EnableInfinityTs(negative time.Time, positive time.Time) { + if infinityTsEnabled { + panic(infinityTsEnabledAlready) + } + if !negative.Before(positive) { + panic(infinityTsNegativeMustBeSmaller) + } + infinityTsEnabled = true + infinityTsNegative = negative + infinityTsPositive = positive +} + +/* + * Testing might want to toggle infinityTsEnabled + */ +func disableInfinityTs() { + infinityTsEnabled = false +} + +// This is a time function specific to the Postgres default DateStyle +// setting ("ISO, MDY"), the only one we currently support. This +// accounts for the discrepancies between the parsing available with +// time.Parse and the Postgres date formatting quirks. +func parseTs(currentLocation *time.Location, str string) interface{} { + switch str { + case "-infinity": + if infinityTsEnabled { + return infinityTsNegative + } + return []byte(str) + case "infinity": + if infinityTsEnabled { + return infinityTsPositive + } + return []byte(str) + } + t, err := ParseTimestamp(currentLocation, str) + if err != nil { + panic(err) + } + return t +} + +// ParseTimestamp parses Postgres' text format. It returns a time.Time in +// currentLocation iff that time's offset agrees with the offset sent from the +// Postgres server. Otherwise, ParseTimestamp returns a time.Time with the +// fixed offset offset provided by the Postgres server. +func ParseTimestamp(currentLocation *time.Location, str string) (time.Time, error) { + p := timestampParser{} + + monSep := strings.IndexRune(str, '-') + // this is Gregorian year, not ISO Year + // In Gregorian system, the year 1 BC is followed by AD 1 + year := p.mustAtoi(str, 0, monSep) + daySep := monSep + 3 + month := p.mustAtoi(str, monSep+1, daySep) + p.expect(str, '-', daySep) + timeSep := daySep + 3 + day := p.mustAtoi(str, daySep+1, timeSep) + + minLen := monSep + len("01-01") + 1 + + isBC := strings.HasSuffix(str, " BC") + if isBC { + minLen += 3 + } + + var hour, minute, second int + if len(str) > minLen { + p.expect(str, ' ', timeSep) + minSep := timeSep + 3 + p.expect(str, ':', minSep) + hour = p.mustAtoi(str, timeSep+1, minSep) + secSep := minSep + 3 + p.expect(str, ':', secSep) + minute = p.mustAtoi(str, minSep+1, secSep) + secEnd := secSep + 3 + second = p.mustAtoi(str, secSep+1, secEnd) + } + remainderIdx := monSep + len("01-01 00:00:00") + 1 + // Three optional (but ordered) sections follow: the + // fractional seconds, the time zone offset, and the BC + // designation. We set them up here and adjust the other + // offsets if the preceding sections exist. + + nanoSec := 0 + tzOff := 0 + + if remainderIdx < len(str) && str[remainderIdx] == '.' { + fracStart := remainderIdx + 1 + fracOff := strings.IndexAny(str[fracStart:], "-+Z ") + if fracOff < 0 { + fracOff = len(str) - fracStart + } + fracSec := p.mustAtoi(str, fracStart, fracStart+fracOff) + nanoSec = fracSec * (1000000000 / int(math.Pow(10, float64(fracOff)))) + + remainderIdx += fracOff + 1 + } + if tzStart := remainderIdx; tzStart < len(str) && (str[tzStart] == '-' || str[tzStart] == '+') { + // time zone separator is always '-' or '+' or 'Z' (UTC is +00) + var tzSign int + switch c := str[tzStart]; c { + case '-': + tzSign = -1 + case '+': + tzSign = +1 + default: + return time.Time{}, fmt.Errorf("expected '-' or '+' at position %v; got %v", tzStart, c) + } + tzHours := p.mustAtoi(str, tzStart+1, tzStart+3) + remainderIdx += 3 + var tzMin, tzSec int + if remainderIdx < len(str) && str[remainderIdx] == ':' { + tzMin = p.mustAtoi(str, remainderIdx+1, remainderIdx+3) + remainderIdx += 3 + } + if remainderIdx < len(str) && str[remainderIdx] == ':' { + tzSec = p.mustAtoi(str, remainderIdx+1, remainderIdx+3) + remainderIdx += 3 + } + tzOff = tzSign * ((tzHours * 60 * 60) + (tzMin * 60) + tzSec) + } else if tzStart < len(str) && str[tzStart] == 'Z' { + // time zone Z separator indicates UTC is +00 + remainderIdx += 1 + } + + var isoYear int + + if isBC { + isoYear = 1 - year + remainderIdx += 3 + } else { + isoYear = year + } + if remainderIdx < len(str) { + return time.Time{}, fmt.Errorf("expected end of input, got %v", str[remainderIdx:]) + } + t := time.Date(isoYear, time.Month(month), day, + hour, minute, second, nanoSec, + globalLocationCache.getLocation(tzOff)) + + if currentLocation != nil { + // Set the location of the returned Time based on the session's + // TimeZone value, but only if the local time zone database agrees with + // the remote database on the offset. + lt := t.In(currentLocation) + _, newOff := lt.Zone() + if newOff == tzOff { + t = lt + } + } + + return t, p.err +} + +// formatTs formats t into a format postgres understands. +func formatTs(t time.Time) []byte { + if infinityTsEnabled { + // t <= -infinity : ! (t > -infinity) + if !t.After(infinityTsNegative) { + return []byte("-infinity") + } + // t >= infinity : ! (!t < infinity) + if !t.Before(infinityTsPositive) { + return []byte("infinity") + } + } + return FormatTimestamp(t) +} + +// FormatTimestamp formats t into Postgres' text format for timestamps. +func FormatTimestamp(t time.Time) []byte { + // Need to send dates before 0001 A.D. with " BC" suffix, instead of the + // minus sign preferred by Go. + // Beware, "0000" in ISO is "1 BC", "-0001" is "2 BC" and so on + bc := false + if t.Year() <= 0 { + // flip year sign, and add 1, e.g: "0" will be "1", and "-10" will be "11" + t = t.AddDate((-t.Year())*2+1, 0, 0) + bc = true + } + b := []byte(t.Format("2006-01-02 15:04:05.999999999Z07:00")) + + _, offset := t.Zone() + offset %= 60 + if offset != 0 { + // RFC3339Nano already printed the minus sign + if offset < 0 { + offset = -offset + } + + b = append(b, ':') + if offset < 10 { + b = append(b, '0') + } + b = strconv.AppendInt(b, int64(offset), 10) + } + + if bc { + b = append(b, " BC"...) + } + return b +} + +// Parse a bytea value received from the server. Both "hex" and the legacy +// "escape" format are supported. +func parseBytea(s []byte) (result []byte, err error) { + if len(s) >= 2 && bytes.Equal(s[:2], []byte("\\x")) { + // bytea_output = hex + s = s[2:] // trim off leading "\\x" + result = make([]byte, hex.DecodedLen(len(s))) + _, err := hex.Decode(result, s) + if err != nil { + return nil, err + } + } else { + // bytea_output = escape + for len(s) > 0 { + if s[0] == '\\' { + // escaped '\\' + if len(s) >= 2 && s[1] == '\\' { + result = append(result, '\\') + s = s[2:] + continue + } + + // '\\' followed by an octal number + if len(s) < 4 { + return nil, fmt.Errorf("invalid bytea sequence %v", s) + } + r, err := strconv.ParseUint(string(s[1:4]), 8, 8) + if err != nil { + return nil, fmt.Errorf("could not parse bytea value: %s", err.Error()) + } + result = append(result, byte(r)) + s = s[4:] + } else { + // We hit an unescaped, raw byte. Try to read in as many as + // possible in one go. + i := bytes.IndexByte(s, '\\') + if i == -1 { + result = append(result, s...) + break + } + result = append(result, s[:i]...) + s = s[i:] + } + } + } + + return result, nil +} + +func encodeBytea(serverVersion int, v []byte) (result []byte) { + if serverVersion >= 90000 { + // Use the hex format if we know that the server supports it + result = make([]byte, 2+hex.EncodedLen(len(v))) + result[0] = '\\' + result[1] = 'x' + hex.Encode(result[2:], v) + } else { + // .. or resort to "escape" + for _, b := range v { + if b == '\\' { + result = append(result, '\\', '\\') + } else if b < 0x20 || b > 0x7e { + result = append(result, []byte(fmt.Sprintf("\\%03o", b))...) + } else { + result = append(result, b) + } + } + } + + return result +} + +// NullTime represents a time.Time that may be null. NullTime implements the +// sql.Scanner interface so it can be used as a scan destination, similar to +// sql.NullString. +type NullTime struct { + Time time.Time + Valid bool // Valid is true if Time is not NULL +} + +// Scan implements the Scanner interface. +func (nt *NullTime) Scan(value interface{}) error { + nt.Time, nt.Valid = value.(time.Time) + return nil +} + +// Value implements the driver Valuer interface. +func (nt NullTime) Value() (driver.Value, error) { + if !nt.Valid { + return nil, nil + } + return nt.Time, nil +} diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go new file mode 100644 index 000000000..f67c5a5fa --- /dev/null +++ b/vendor/github.com/lib/pq/error.go @@ -0,0 +1,523 @@ +package pq + +import ( + "database/sql/driver" + "fmt" + "io" + "net" + "runtime" +) + +// Error severities +const ( + Efatal = "FATAL" + Epanic = "PANIC" + Ewarning = "WARNING" + Enotice = "NOTICE" + Edebug = "DEBUG" + Einfo = "INFO" + Elog = "LOG" +) + +// Error represents an error communicating with the server. +// +// See http://www.postgresql.org/docs/current/static/protocol-error-fields.html for details of the fields +type Error struct { + Severity string + Code ErrorCode + Message string + Detail string + Hint string + Position string + InternalPosition string + InternalQuery string + Where string + Schema string + Table string + Column string + DataTypeName string + Constraint string + File string + Line string + Routine string +} + +// ErrorCode is a five-character error code. +type ErrorCode string + +// Name returns a more human friendly rendering of the error code, namely the +// "condition name". +// +// See http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html for +// details. +func (ec ErrorCode) Name() string { + return errorCodeNames[ec] +} + +// ErrorClass is only the class part of an error code. +type ErrorClass string + +// Name returns the condition name of an error class. It is equivalent to the +// condition name of the "standard" error code (i.e. the one having the last +// three characters "000"). +func (ec ErrorClass) Name() string { + return errorCodeNames[ErrorCode(ec+"000")] +} + +// Class returns the error class, e.g. "28". +// +// See http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html for +// details. +func (ec ErrorCode) Class() ErrorClass { + return ErrorClass(ec[0:2]) +} + +// errorCodeNames is a mapping between the five-character error codes and the +// human readable "condition names". It is derived from the list at +// http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html +var errorCodeNames = map[ErrorCode]string{ + // Class 00 - Successful Completion + "00000": "successful_completion", + // Class 01 - Warning + "01000": "warning", + "0100C": "dynamic_result_sets_returned", + "01008": "implicit_zero_bit_padding", + "01003": "null_value_eliminated_in_set_function", + "01007": "privilege_not_granted", + "01006": "privilege_not_revoked", + "01004": "string_data_right_truncation", + "01P01": "deprecated_feature", + // Class 02 - No Data (this is also a warning class per the SQL standard) + "02000": "no_data", + "02001": "no_additional_dynamic_result_sets_returned", + // Class 03 - SQL Statement Not Yet Complete + "03000": "sql_statement_not_yet_complete", + // Class 08 - Connection Exception + "08000": "connection_exception", + "08003": "connection_does_not_exist", + "08006": "connection_failure", + "08001": "sqlclient_unable_to_establish_sqlconnection", + "08004": "sqlserver_rejected_establishment_of_sqlconnection", + "08007": "transaction_resolution_unknown", + "08P01": "protocol_violation", + // Class 09 - Triggered Action Exception + "09000": "triggered_action_exception", + // Class 0A - Feature Not Supported + "0A000": "feature_not_supported", + // Class 0B - Invalid Transaction Initiation + "0B000": "invalid_transaction_initiation", + // Class 0F - Locator Exception + "0F000": "locator_exception", + "0F001": "invalid_locator_specification", + // Class 0L - Invalid Grantor + "0L000": "invalid_grantor", + "0LP01": "invalid_grant_operation", + // Class 0P - Invalid Role Specification + "0P000": "invalid_role_specification", + // Class 0Z - Diagnostics Exception + "0Z000": "diagnostics_exception", + "0Z002": "stacked_diagnostics_accessed_without_active_handler", + // Class 20 - Case Not Found + "20000": "case_not_found", + // Class 21 - Cardinality Violation + "21000": "cardinality_violation", + // Class 22 - Data Exception + "22000": "data_exception", + "2202E": "array_subscript_error", + "22021": "character_not_in_repertoire", + "22008": "datetime_field_overflow", + "22012": "division_by_zero", + "22005": "error_in_assignment", + "2200B": "escape_character_conflict", + "22022": "indicator_overflow", + "22015": "interval_field_overflow", + "2201E": "invalid_argument_for_logarithm", + "22014": "invalid_argument_for_ntile_function", + "22016": "invalid_argument_for_nth_value_function", + "2201F": "invalid_argument_for_power_function", + "2201G": "invalid_argument_for_width_bucket_function", + "22018": "invalid_character_value_for_cast", + "22007": "invalid_datetime_format", + "22019": "invalid_escape_character", + "2200D": "invalid_escape_octet", + "22025": "invalid_escape_sequence", + "22P06": "nonstandard_use_of_escape_character", + "22010": "invalid_indicator_parameter_value", + "22023": "invalid_parameter_value", + "2201B": "invalid_regular_expression", + "2201W": "invalid_row_count_in_limit_clause", + "2201X": "invalid_row_count_in_result_offset_clause", + "22009": "invalid_time_zone_displacement_value", + "2200C": "invalid_use_of_escape_character", + "2200G": "most_specific_type_mismatch", + "22004": "null_value_not_allowed", + "22002": "null_value_no_indicator_parameter", + "22003": "numeric_value_out_of_range", + "2200H": "sequence_generator_limit_exceeded", + "22026": "string_data_length_mismatch", + "22001": "string_data_right_truncation", + "22011": "substring_error", + "22027": "trim_error", + "22024": "unterminated_c_string", + "2200F": "zero_length_character_string", + "22P01": "floating_point_exception", + "22P02": "invalid_text_representation", + "22P03": "invalid_binary_representation", + "22P04": "bad_copy_file_format", + "22P05": "untranslatable_character", + "2200L": "not_an_xml_document", + "2200M": "invalid_xml_document", + "2200N": "invalid_xml_content", + "2200S": "invalid_xml_comment", + "2200T": "invalid_xml_processing_instruction", + // Class 23 - Integrity Constraint Violation + "23000": "integrity_constraint_violation", + "23001": "restrict_violation", + "23502": "not_null_violation", + "23503": "foreign_key_violation", + "23505": "unique_violation", + "23514": "check_violation", + "23P01": "exclusion_violation", + // Class 24 - Invalid Cursor State + "24000": "invalid_cursor_state", + // Class 25 - Invalid Transaction State + "25000": "invalid_transaction_state", + "25001": "active_sql_transaction", + "25002": "branch_transaction_already_active", + "25008": "held_cursor_requires_same_isolation_level", + "25003": "inappropriate_access_mode_for_branch_transaction", + "25004": "inappropriate_isolation_level_for_branch_transaction", + "25005": "no_active_sql_transaction_for_branch_transaction", + "25006": "read_only_sql_transaction", + "25007": "schema_and_data_statement_mixing_not_supported", + "25P01": "no_active_sql_transaction", + "25P02": "in_failed_sql_transaction", + // Class 26 - Invalid SQL Statement Name + "26000": "invalid_sql_statement_name", + // Class 27 - Triggered Data Change Violation + "27000": "triggered_data_change_violation", + // Class 28 - Invalid Authorization Specification + "28000": "invalid_authorization_specification", + "28P01": "invalid_password", + // Class 2B - Dependent Privilege Descriptors Still Exist + "2B000": "dependent_privilege_descriptors_still_exist", + "2BP01": "dependent_objects_still_exist", + // Class 2D - Invalid Transaction Termination + "2D000": "invalid_transaction_termination", + // Class 2F - SQL Routine Exception + "2F000": "sql_routine_exception", + "2F005": "function_executed_no_return_statement", + "2F002": "modifying_sql_data_not_permitted", + "2F003": "prohibited_sql_statement_attempted", + "2F004": "reading_sql_data_not_permitted", + // Class 34 - Invalid Cursor Name + "34000": "invalid_cursor_name", + // Class 38 - External Routine Exception + "38000": "external_routine_exception", + "38001": "containing_sql_not_permitted", + "38002": "modifying_sql_data_not_permitted", + "38003": "prohibited_sql_statement_attempted", + "38004": "reading_sql_data_not_permitted", + // Class 39 - External Routine Invocation Exception + "39000": "external_routine_invocation_exception", + "39001": "invalid_sqlstate_returned", + "39004": "null_value_not_allowed", + "39P01": "trigger_protocol_violated", + "39P02": "srf_protocol_violated", + // Class 3B - Savepoint Exception + "3B000": "savepoint_exception", + "3B001": "invalid_savepoint_specification", + // Class 3D - Invalid Catalog Name + "3D000": "invalid_catalog_name", + // Class 3F - Invalid Schema Name + "3F000": "invalid_schema_name", + // Class 40 - Transaction Rollback + "40000": "transaction_rollback", + "40002": "transaction_integrity_constraint_violation", + "40001": "serialization_failure", + "40003": "statement_completion_unknown", + "40P01": "deadlock_detected", + // Class 42 - Syntax Error or Access Rule Violation + "42000": "syntax_error_or_access_rule_violation", + "42601": "syntax_error", + "42501": "insufficient_privilege", + "42846": "cannot_coerce", + "42803": "grouping_error", + "42P20": "windowing_error", + "42P19": "invalid_recursion", + "42830": "invalid_foreign_key", + "42602": "invalid_name", + "42622": "name_too_long", + "42939": "reserved_name", + "42804": "datatype_mismatch", + "42P18": "indeterminate_datatype", + "42P21": "collation_mismatch", + "42P22": "indeterminate_collation", + "42809": "wrong_object_type", + "42703": "undefined_column", + "42883": "undefined_function", + "42P01": "undefined_table", + "42P02": "undefined_parameter", + "42704": "undefined_object", + "42701": "duplicate_column", + "42P03": "duplicate_cursor", + "42P04": "duplicate_database", + "42723": "duplicate_function", + "42P05": "duplicate_prepared_statement", + "42P06": "duplicate_schema", + "42P07": "duplicate_table", + "42712": "duplicate_alias", + "42710": "duplicate_object", + "42702": "ambiguous_column", + "42725": "ambiguous_function", + "42P08": "ambiguous_parameter", + "42P09": "ambiguous_alias", + "42P10": "invalid_column_reference", + "42611": "invalid_column_definition", + "42P11": "invalid_cursor_definition", + "42P12": "invalid_database_definition", + "42P13": "invalid_function_definition", + "42P14": "invalid_prepared_statement_definition", + "42P15": "invalid_schema_definition", + "42P16": "invalid_table_definition", + "42P17": "invalid_object_definition", + // Class 44 - WITH CHECK OPTION Violation + "44000": "with_check_option_violation", + // Class 53 - Insufficient Resources + "53000": "insufficient_resources", + "53100": "disk_full", + "53200": "out_of_memory", + "53300": "too_many_connections", + "53400": "configuration_limit_exceeded", + // Class 54 - Program Limit Exceeded + "54000": "program_limit_exceeded", + "54001": "statement_too_complex", + "54011": "too_many_columns", + "54023": "too_many_arguments", + // Class 55 - Object Not In Prerequisite State + "55000": "object_not_in_prerequisite_state", + "55006": "object_in_use", + "55P02": "cant_change_runtime_param", + "55P03": "lock_not_available", + // Class 57 - Operator Intervention + "57000": "operator_intervention", + "57014": "query_canceled", + "57P01": "admin_shutdown", + "57P02": "crash_shutdown", + "57P03": "cannot_connect_now", + "57P04": "database_dropped", + // Class 58 - System Error (errors external to PostgreSQL itself) + "58000": "system_error", + "58030": "io_error", + "58P01": "undefined_file", + "58P02": "duplicate_file", + // Class F0 - Configuration File Error + "F0000": "config_file_error", + "F0001": "lock_file_exists", + // Class HV - Foreign Data Wrapper Error (SQL/MED) + "HV000": "fdw_error", + "HV005": "fdw_column_name_not_found", + "HV002": "fdw_dynamic_parameter_value_needed", + "HV010": "fdw_function_sequence_error", + "HV021": "fdw_inconsistent_descriptor_information", + "HV024": "fdw_invalid_attribute_value", + "HV007": "fdw_invalid_column_name", + "HV008": "fdw_invalid_column_number", + "HV004": "fdw_invalid_data_type", + "HV006": "fdw_invalid_data_type_descriptors", + "HV091": "fdw_invalid_descriptor_field_identifier", + "HV00B": "fdw_invalid_handle", + "HV00C": "fdw_invalid_option_index", + "HV00D": "fdw_invalid_option_name", + "HV090": "fdw_invalid_string_length_or_buffer_length", + "HV00A": "fdw_invalid_string_format", + "HV009": "fdw_invalid_use_of_null_pointer", + "HV014": "fdw_too_many_handles", + "HV001": "fdw_out_of_memory", + "HV00P": "fdw_no_schemas", + "HV00J": "fdw_option_name_not_found", + "HV00K": "fdw_reply_handle", + "HV00Q": "fdw_schema_not_found", + "HV00R": "fdw_table_not_found", + "HV00L": "fdw_unable_to_create_execution", + "HV00M": "fdw_unable_to_create_reply", + "HV00N": "fdw_unable_to_establish_connection", + // Class P0 - PL/pgSQL Error + "P0000": "plpgsql_error", + "P0001": "raise_exception", + "P0002": "no_data_found", + "P0003": "too_many_rows", + // Class XX - Internal Error + "XX000": "internal_error", + "XX001": "data_corrupted", + "XX002": "index_corrupted", +} + +func parseError(r *readBuf) *Error { + err := new(Error) + for t := r.byte(); t != 0; t = r.byte() { + msg := r.string() + switch t { + case 'S': + err.Severity = msg + case 'C': + err.Code = ErrorCode(msg) + case 'M': + err.Message = msg + case 'D': + err.Detail = msg + case 'H': + err.Hint = msg + case 'P': + err.Position = msg + case 'p': + err.InternalPosition = msg + case 'q': + err.InternalQuery = msg + case 'W': + err.Where = msg + case 's': + err.Schema = msg + case 't': + err.Table = msg + case 'c': + err.Column = msg + case 'd': + err.DataTypeName = msg + case 'n': + err.Constraint = msg + case 'F': + err.File = msg + case 'L': + err.Line = msg + case 'R': + err.Routine = msg + } + } + return err +} + +// Fatal returns true if the Error Severity is fatal. +func (err *Error) Fatal() bool { + return err.Severity == Efatal +} + +// SQLState returns the SQLState of the error. +func (err *Error) SQLState() string { + return string(err.Code) +} + +// Get implements the legacy PGError interface. New code should use the fields +// of the Error struct directly. +func (err *Error) Get(k byte) (v string) { + switch k { + case 'S': + return err.Severity + case 'C': + return string(err.Code) + case 'M': + return err.Message + case 'D': + return err.Detail + case 'H': + return err.Hint + case 'P': + return err.Position + case 'p': + return err.InternalPosition + case 'q': + return err.InternalQuery + case 'W': + return err.Where + case 's': + return err.Schema + case 't': + return err.Table + case 'c': + return err.Column + case 'd': + return err.DataTypeName + case 'n': + return err.Constraint + case 'F': + return err.File + case 'L': + return err.Line + case 'R': + return err.Routine + } + return "" +} + +func (err *Error) Error() string { + return "pq: " + err.Message +} + +// PGError is an interface used by previous versions of pq. It is provided +// only to support legacy code. New code should use the Error type. +type PGError interface { + Error() string + Fatal() bool + Get(k byte) (v string) +} + +func errorf(s string, args ...interface{}) { + panic(fmt.Errorf("pq: %s", fmt.Sprintf(s, args...))) +} + +// TODO(ainar-g) Rename to errorf after removing panics. +func fmterrorf(s string, args ...interface{}) error { + return fmt.Errorf("pq: %s", fmt.Sprintf(s, args...)) +} + +func errRecoverNoErrBadConn(err *error) { + e := recover() + if e == nil { + // Do nothing + return + } + var ok bool + *err, ok = e.(error) + if !ok { + *err = fmt.Errorf("pq: unexpected error: %#v", e) + } +} + +func (cn *conn) errRecover(err *error) { + e := recover() + switch v := e.(type) { + case nil: + // Do nothing + case runtime.Error: + cn.err.set(driver.ErrBadConn) + panic(v) + case *Error: + if v.Fatal() { + *err = driver.ErrBadConn + } else { + *err = v + } + case *net.OpError: + cn.err.set(driver.ErrBadConn) + *err = v + case *safeRetryError: + cn.err.set(driver.ErrBadConn) + *err = driver.ErrBadConn + case error: + if v == io.EOF || v.Error() == "remote error: handshake failure" { + *err = driver.ErrBadConn + } else { + *err = v + } + + default: + cn.err.set(driver.ErrBadConn) + panic(fmt.Sprintf("unknown error: %#v", e)) + } + + // Any time we return ErrBadConn, we need to remember it since *Tx doesn't + // mark the connection bad in database/sql. + if *err == driver.ErrBadConn { + cn.err.set(driver.ErrBadConn) + } +} diff --git a/vendor/github.com/lib/pq/krb.go b/vendor/github.com/lib/pq/krb.go new file mode 100644 index 000000000..408ec01f9 --- /dev/null +++ b/vendor/github.com/lib/pq/krb.go @@ -0,0 +1,27 @@ +package pq + +// NewGSSFunc creates a GSS authentication provider, for use with +// RegisterGSSProvider. +type NewGSSFunc func() (GSS, error) + +var newGss NewGSSFunc + +// RegisterGSSProvider registers a GSS authentication provider. For example, if +// you need to use Kerberos to authenticate with your server, add this to your +// main package: +// +// import "github.com/lib/pq/auth/kerberos" +// +// func init() { +// pq.RegisterGSSProvider(func() (pq.GSS, error) { return kerberos.NewGSS() }) +// } +func RegisterGSSProvider(newGssArg NewGSSFunc) { + newGss = newGssArg +} + +// GSS provides GSSAPI authentication (e.g., Kerberos). +type GSS interface { + GetInitToken(host string, service string) ([]byte, error) + GetInitTokenFromSpn(spn string) ([]byte, error) + Continue(inToken []byte) (done bool, outToken []byte, err error) +} diff --git a/vendor/github.com/lib/pq/notice.go b/vendor/github.com/lib/pq/notice.go new file mode 100644 index 000000000..70ad122a7 --- /dev/null +++ b/vendor/github.com/lib/pq/notice.go @@ -0,0 +1,72 @@ +//go:build go1.10 +// +build go1.10 + +package pq + +import ( + "context" + "database/sql/driver" +) + +// NoticeHandler returns the notice handler on the given connection, if any. A +// runtime panic occurs if c is not a pq connection. This is rarely used +// directly, use ConnectorNoticeHandler and ConnectorWithNoticeHandler instead. +func NoticeHandler(c driver.Conn) func(*Error) { + return c.(*conn).noticeHandler +} + +// SetNoticeHandler sets the given notice handler on the given connection. A +// runtime panic occurs if c is not a pq connection. A nil handler may be used +// to unset it. This is rarely used directly, use ConnectorNoticeHandler and +// ConnectorWithNoticeHandler instead. +// +// Note: Notice handlers are executed synchronously by pq meaning commands +// won't continue to be processed until the handler returns. +func SetNoticeHandler(c driver.Conn, handler func(*Error)) { + c.(*conn).noticeHandler = handler +} + +// NoticeHandlerConnector wraps a regular connector and sets a notice handler +// on it. +type NoticeHandlerConnector struct { + driver.Connector + noticeHandler func(*Error) +} + +// Connect calls the underlying connector's connect method and then sets the +// notice handler. +func (n *NoticeHandlerConnector) Connect(ctx context.Context) (driver.Conn, error) { + c, err := n.Connector.Connect(ctx) + if err == nil { + SetNoticeHandler(c, n.noticeHandler) + } + return c, err +} + +// ConnectorNoticeHandler returns the currently set notice handler, if any. If +// the given connector is not a result of ConnectorWithNoticeHandler, nil is +// returned. +func ConnectorNoticeHandler(c driver.Connector) func(*Error) { + if c, ok := c.(*NoticeHandlerConnector); ok { + return c.noticeHandler + } + return nil +} + +// ConnectorWithNoticeHandler creates or sets the given handler for the given +// connector. If the given connector is a result of calling this function +// previously, it is simply set on the given connector and returned. Otherwise, +// this returns a new connector wrapping the given one and setting the notice +// handler. A nil notice handler may be used to unset it. +// +// The returned connector is intended to be used with database/sql.OpenDB. +// +// Note: Notice handlers are executed synchronously by pq meaning commands +// won't continue to be processed until the handler returns. +func ConnectorWithNoticeHandler(c driver.Connector, handler func(*Error)) *NoticeHandlerConnector { + if c, ok := c.(*NoticeHandlerConnector); ok { + c.noticeHandler = handler + return c + } + return &NoticeHandlerConnector{Connector: c, noticeHandler: handler} +} diff --git a/vendor/github.com/lib/pq/notify.go b/vendor/github.com/lib/pq/notify.go new file mode 100644 index 000000000..5c421fdb8 --- /dev/null +++ b/vendor/github.com/lib/pq/notify.go @@ -0,0 +1,858 @@ +package pq + +// Package pq is a pure Go Postgres driver for the database/sql package. +// This module contains support for Postgres LISTEN/NOTIFY. + +import ( + "context" + "database/sql/driver" + "errors" + "fmt" + "sync" + "sync/atomic" + "time" +) + +// Notification represents a single notification from the database. +type Notification struct { + // Process ID (PID) of the notifying postgres backend. + BePid int + // Name of the channel the notification was sent on. + Channel string + // Payload, or the empty string if unspecified. + Extra string +} + +func recvNotification(r *readBuf) *Notification { + bePid := r.int32() + channel := r.string() + extra := r.string() + + return &Notification{bePid, channel, extra} +} + +// SetNotificationHandler sets the given notification handler on the given +// connection. A runtime panic occurs if c is not a pq connection. A nil handler +// may be used to unset it. +// +// Note: Notification handlers are executed synchronously by pq meaning commands +// won't continue to be processed until the handler returns. +func SetNotificationHandler(c driver.Conn, handler func(*Notification)) { + c.(*conn).notificationHandler = handler +} + +// NotificationHandlerConnector wraps a regular connector and sets a notification handler +// on it. +type NotificationHandlerConnector struct { + driver.Connector + notificationHandler func(*Notification) +} + +// Connect calls the underlying connector's connect method and then sets the +// notification handler. +func (n *NotificationHandlerConnector) Connect(ctx context.Context) (driver.Conn, error) { + c, err := n.Connector.Connect(ctx) + if err == nil { + SetNotificationHandler(c, n.notificationHandler) + } + return c, err +} + +// ConnectorNotificationHandler returns the currently set notification handler, if any. If +// the given connector is not a result of ConnectorWithNotificationHandler, nil is +// returned. +func ConnectorNotificationHandler(c driver.Connector) func(*Notification) { + if c, ok := c.(*NotificationHandlerConnector); ok { + return c.notificationHandler + } + return nil +} + +// ConnectorWithNotificationHandler creates or sets the given handler for the given +// connector. If the given connector is a result of calling this function +// previously, it is simply set on the given connector and returned. Otherwise, +// this returns a new connector wrapping the given one and setting the notification +// handler. A nil notification handler may be used to unset it. +// +// The returned connector is intended to be used with database/sql.OpenDB. +// +// Note: Notification handlers are executed synchronously by pq meaning commands +// won't continue to be processed until the handler returns. +func ConnectorWithNotificationHandler(c driver.Connector, handler func(*Notification)) *NotificationHandlerConnector { + if c, ok := c.(*NotificationHandlerConnector); ok { + c.notificationHandler = handler + return c + } + return &NotificationHandlerConnector{Connector: c, notificationHandler: handler} +} + +const ( + connStateIdle int32 = iota + connStateExpectResponse + connStateExpectReadyForQuery +) + +type message struct { + typ byte + err error +} + +var errListenerConnClosed = errors.New("pq: ListenerConn has been closed") + +// ListenerConn is a low-level interface for waiting for notifications. You +// should use Listener instead. +type ListenerConn struct { + // guards cn and err + connectionLock sync.Mutex + cn *conn + err error + + connState int32 + + // the sending goroutine will be holding this lock + senderLock sync.Mutex + + notificationChan chan<- *Notification + + replyChan chan message +} + +// NewListenerConn creates a new ListenerConn. Use NewListener instead. +func NewListenerConn(name string, notificationChan chan<- *Notification) (*ListenerConn, error) { + return newDialListenerConn(defaultDialer{}, name, notificationChan) +} + +func newDialListenerConn(d Dialer, name string, c chan<- *Notification) (*ListenerConn, error) { + cn, err := DialOpen(d, name) + if err != nil { + return nil, err + } + + l := &ListenerConn{ + cn: cn.(*conn), + notificationChan: c, + connState: connStateIdle, + replyChan: make(chan message, 2), + } + + go l.listenerConnMain() + + return l, nil +} + +// We can only allow one goroutine at a time to be running a query on the +// connection for various reasons, so the goroutine sending on the connection +// must be holding senderLock. +// +// Returns an error if an unrecoverable error has occurred and the ListenerConn +// should be abandoned. +func (l *ListenerConn) acquireSenderLock() error { + // we must acquire senderLock first to avoid deadlocks; see ExecSimpleQuery + l.senderLock.Lock() + + l.connectionLock.Lock() + err := l.err + l.connectionLock.Unlock() + if err != nil { + l.senderLock.Unlock() + return err + } + return nil +} + +func (l *ListenerConn) releaseSenderLock() { + l.senderLock.Unlock() +} + +// setState advances the protocol state to newState. Returns false if moving +// to that state from the current state is not allowed. +func (l *ListenerConn) setState(newState int32) bool { + var expectedState int32 + + switch newState { + case connStateIdle: + expectedState = connStateExpectReadyForQuery + case connStateExpectResponse: + expectedState = connStateIdle + case connStateExpectReadyForQuery: + expectedState = connStateExpectResponse + default: + panic(fmt.Sprintf("unexpected listenerConnState %d", newState)) + } + + return atomic.CompareAndSwapInt32(&l.connState, expectedState, newState) +} + +// Main logic is here: receive messages from the postgres backend, forward +// notifications and query replies and keep the internal state in sync with the +// protocol state. Returns when the connection has been lost, is about to go +// away or should be discarded because we couldn't agree on the state with the +// server backend. +func (l *ListenerConn) listenerConnLoop() (err error) { + defer errRecoverNoErrBadConn(&err) + + r := &readBuf{} + for { + t, err := l.cn.recvMessage(r) + if err != nil { + return err + } + + switch t { + case 'A': + // recvNotification copies all the data so we don't need to worry + // about the scratch buffer being overwritten. + l.notificationChan <- recvNotification(r) + + case 'T', 'D': + // only used by tests; ignore + + case 'E': + // We might receive an ErrorResponse even when not in a query; it + // is expected that the server will close the connection after + // that, but we should make sure that the error we display is the + // one from the stray ErrorResponse, not io.ErrUnexpectedEOF. + if !l.setState(connStateExpectReadyForQuery) { + return parseError(r) + } + l.replyChan <- message{t, parseError(r)} + + case 'C', 'I': + if !l.setState(connStateExpectReadyForQuery) { + // protocol out of sync + return fmt.Errorf("unexpected CommandComplete") + } + // ExecSimpleQuery doesn't need to know about this message + + case 'Z': + if !l.setState(connStateIdle) { + // protocol out of sync + return fmt.Errorf("unexpected ReadyForQuery") + } + l.replyChan <- message{t, nil} + + case 'S': + // ignore + case 'N': + if n := l.cn.noticeHandler; n != nil { + n(parseError(r)) + } + default: + return fmt.Errorf("unexpected message %q from server in listenerConnLoop", t) + } + } +} + +// This is the main routine for the goroutine receiving on the database +// connection. Most of the main logic is in listenerConnLoop. +func (l *ListenerConn) listenerConnMain() { + err := l.listenerConnLoop() + + // listenerConnLoop terminated; we're done, but we still have to clean up. + // Make sure nobody tries to start any new queries by making sure the err + // pointer is set. It is important that we do not overwrite its value; a + // connection could be closed by either this goroutine or one sending on + // the connection -- whoever closes the connection is assumed to have the + // more meaningful error message (as the other one will probably get + // net.errClosed), so that goroutine sets the error we expose while the + // other error is discarded. If the connection is lost while two + // goroutines are operating on the socket, it probably doesn't matter which + // error we expose so we don't try to do anything more complex. + l.connectionLock.Lock() + if l.err == nil { + l.err = err + } + l.cn.Close() + l.connectionLock.Unlock() + + // There might be a query in-flight; make sure nobody's waiting for a + // response to it, since there's not going to be one. + close(l.replyChan) + + // let the listener know we're done + close(l.notificationChan) + + // this ListenerConn is done +} + +// Listen sends a LISTEN query to the server. See ExecSimpleQuery. +func (l *ListenerConn) Listen(channel string) (bool, error) { + return l.ExecSimpleQuery("LISTEN " + QuoteIdentifier(channel)) +} + +// Unlisten sends an UNLISTEN query to the server. See ExecSimpleQuery. +func (l *ListenerConn) Unlisten(channel string) (bool, error) { + return l.ExecSimpleQuery("UNLISTEN " + QuoteIdentifier(channel)) +} + +// UnlistenAll sends an `UNLISTEN *` query to the server. See ExecSimpleQuery. +func (l *ListenerConn) UnlistenAll() (bool, error) { + return l.ExecSimpleQuery("UNLISTEN *") +} + +// Ping the remote server to make sure it's alive. Non-nil error means the +// connection has failed and should be abandoned. +func (l *ListenerConn) Ping() error { + sent, err := l.ExecSimpleQuery("") + if !sent { + return err + } + if err != nil { + // shouldn't happen + panic(err) + } + return nil +} + +// Attempt to send a query on the connection. Returns an error if sending the +// query failed, and the caller should initiate closure of this connection. +// The caller must be holding senderLock (see acquireSenderLock and +// releaseSenderLock). +func (l *ListenerConn) sendSimpleQuery(q string) (err error) { + defer errRecoverNoErrBadConn(&err) + + // must set connection state before sending the query + if !l.setState(connStateExpectResponse) { + panic("two queries running at the same time") + } + + // Can't use l.cn.writeBuf here because it uses the scratch buffer which + // might get overwritten by listenerConnLoop. + b := &writeBuf{ + buf: []byte("Q\x00\x00\x00\x00"), + pos: 1, + } + b.string(q) + l.cn.send(b) + + return nil +} + +// ExecSimpleQuery executes a "simple query" (i.e. one with no bindable +// parameters) on the connection. The possible return values are: +// 1) "executed" is true; the query was executed to completion on the +// database server. If the query failed, err will be set to the error +// returned by the database, otherwise err will be nil. +// 2) If "executed" is false, the query could not be executed on the remote +// server. err will be non-nil. +// +// After a call to ExecSimpleQuery has returned an executed=false value, the +// connection has either been closed or will be closed shortly thereafter, and +// all subsequently executed queries will return an error. +func (l *ListenerConn) ExecSimpleQuery(q string) (executed bool, err error) { + if err = l.acquireSenderLock(); err != nil { + return false, err + } + defer l.releaseSenderLock() + + err = l.sendSimpleQuery(q) + if err != nil { + // We can't know what state the protocol is in, so we need to abandon + // this connection. + l.connectionLock.Lock() + // Set the error pointer if it hasn't been set already; see + // listenerConnMain. + if l.err == nil { + l.err = err + } + l.connectionLock.Unlock() + l.cn.c.Close() + return false, err + } + + // now we just wait for a reply.. + for { + m, ok := <-l.replyChan + if !ok { + // We lost the connection to server, don't bother waiting for a + // a response. err should have been set already. + l.connectionLock.Lock() + err := l.err + l.connectionLock.Unlock() + return false, err + } + switch m.typ { + case 'Z': + // sanity check + if m.err != nil { + panic("m.err != nil") + } + // done; err might or might not be set + return true, err + + case 'E': + // sanity check + if m.err == nil { + panic("m.err == nil") + } + // server responded with an error; ReadyForQuery to follow + err = m.err + + default: + return false, fmt.Errorf("unknown response for simple query: %q", m.typ) + } + } +} + +// Close closes the connection. +func (l *ListenerConn) Close() error { + l.connectionLock.Lock() + if l.err != nil { + l.connectionLock.Unlock() + return errListenerConnClosed + } + l.err = errListenerConnClosed + l.connectionLock.Unlock() + // We can't send anything on the connection without holding senderLock. + // Simply close the net.Conn to wake up everyone operating on it. + return l.cn.c.Close() +} + +// Err returns the reason the connection was closed. It is not safe to call +// this function until l.Notify has been closed. +func (l *ListenerConn) Err() error { + return l.err +} + +var errListenerClosed = errors.New("pq: Listener has been closed") + +// ErrChannelAlreadyOpen is returned from Listen when a channel is already +// open. +var ErrChannelAlreadyOpen = errors.New("pq: channel is already open") + +// ErrChannelNotOpen is returned from Unlisten when a channel is not open. +var ErrChannelNotOpen = errors.New("pq: channel is not open") + +// ListenerEventType is an enumeration of listener event types. +type ListenerEventType int + +const ( + // ListenerEventConnected is emitted only when the database connection + // has been initially initialized. The err argument of the callback + // will always be nil. + ListenerEventConnected ListenerEventType = iota + + // ListenerEventDisconnected is emitted after a database connection has + // been lost, either because of an error or because Close has been + // called. The err argument will be set to the reason the database + // connection was lost. + ListenerEventDisconnected + + // ListenerEventReconnected is emitted after a database connection has + // been re-established after connection loss. The err argument of the + // callback will always be nil. After this event has been emitted, a + // nil pq.Notification is sent on the Listener.Notify channel. + ListenerEventReconnected + + // ListenerEventConnectionAttemptFailed is emitted after a connection + // to the database was attempted, but failed. The err argument will be + // set to an error describing why the connection attempt did not + // succeed. + ListenerEventConnectionAttemptFailed +) + +// EventCallbackType is the event callback type. See also ListenerEventType +// constants' documentation. +type EventCallbackType func(event ListenerEventType, err error) + +// Listener provides an interface for listening to notifications from a +// PostgreSQL database. For general usage information, see section +// "Notifications". +// +// Listener can safely be used from concurrently running goroutines. +type Listener struct { + // Channel for receiving notifications from the database. In some cases a + // nil value will be sent. See section "Notifications" above. + Notify chan *Notification + + name string + minReconnectInterval time.Duration + maxReconnectInterval time.Duration + dialer Dialer + eventCallback EventCallbackType + + lock sync.Mutex + isClosed bool + reconnectCond *sync.Cond + cn *ListenerConn + connNotificationChan <-chan *Notification + channels map[string]struct{} +} + +// NewListener creates a new database connection dedicated to LISTEN / NOTIFY. +// +// name should be set to a connection string to be used to establish the +// database connection (see section "Connection String Parameters" above). +// +// minReconnectInterval controls the duration to wait before trying to +// re-establish the database connection after connection loss. After each +// consecutive failure this interval is doubled, until maxReconnectInterval is +// reached. Successfully completing the connection establishment procedure +// resets the interval back to minReconnectInterval. +// +// The last parameter eventCallback can be set to a function which will be +// called by the Listener when the state of the underlying database connection +// changes. This callback will be called by the goroutine which dispatches the +// notifications over the Notify channel, so you should try to avoid doing +// potentially time-consuming operations from the callback. +func NewListener(name string, + minReconnectInterval time.Duration, + maxReconnectInterval time.Duration, + eventCallback EventCallbackType) *Listener { + return NewDialListener(defaultDialer{}, name, minReconnectInterval, maxReconnectInterval, eventCallback) +} + +// NewDialListener is like NewListener but it takes a Dialer. +func NewDialListener(d Dialer, + name string, + minReconnectInterval time.Duration, + maxReconnectInterval time.Duration, + eventCallback EventCallbackType) *Listener { + + l := &Listener{ + name: name, + minReconnectInterval: minReconnectInterval, + maxReconnectInterval: maxReconnectInterval, + dialer: d, + eventCallback: eventCallback, + + channels: make(map[string]struct{}), + + Notify: make(chan *Notification, 32), + } + l.reconnectCond = sync.NewCond(&l.lock) + + go l.listenerMain() + + return l +} + +// NotificationChannel returns the notification channel for this listener. +// This is the same channel as Notify, and will not be recreated during the +// life time of the Listener. +func (l *Listener) NotificationChannel() <-chan *Notification { + return l.Notify +} + +// Listen starts listening for notifications on a channel. Calls to this +// function will block until an acknowledgement has been received from the +// server. Note that Listener automatically re-establishes the connection +// after connection loss, so this function may block indefinitely if the +// connection can not be re-established. +// +// Listen will only fail in three conditions: +// 1) The channel is already open. The returned error will be +// ErrChannelAlreadyOpen. +// 2) The query was executed on the remote server, but PostgreSQL returned an +// error message in response to the query. The returned error will be a +// pq.Error containing the information the server supplied. +// 3) Close is called on the Listener before the request could be completed. +// +// The channel name is case-sensitive. +func (l *Listener) Listen(channel string) error { + l.lock.Lock() + defer l.lock.Unlock() + + if l.isClosed { + return errListenerClosed + } + + // The server allows you to issue a LISTEN on a channel which is already + // open, but it seems useful to be able to detect this case to spot for + // mistakes in application logic. If the application genuinely does't + // care, it can check the exported error and ignore it. + _, exists := l.channels[channel] + if exists { + return ErrChannelAlreadyOpen + } + + if l.cn != nil { + // If gotResponse is true but error is set, the query was executed on + // the remote server, but resulted in an error. This should be + // relatively rare, so it's fine if we just pass the error to our + // caller. However, if gotResponse is false, we could not complete the + // query on the remote server and our underlying connection is about + // to go away, so we only add relname to l.channels, and wait for + // resync() to take care of the rest. + gotResponse, err := l.cn.Listen(channel) + if gotResponse && err != nil { + return err + } + } + + l.channels[channel] = struct{}{} + for l.cn == nil { + l.reconnectCond.Wait() + // we let go of the mutex for a while + if l.isClosed { + return errListenerClosed + } + } + + return nil +} + +// Unlisten removes a channel from the Listener's channel list. Returns +// ErrChannelNotOpen if the Listener is not listening on the specified channel. +// Returns immediately with no error if there is no connection. Note that you +// might still get notifications for this channel even after Unlisten has +// returned. +// +// The channel name is case-sensitive. +func (l *Listener) Unlisten(channel string) error { + l.lock.Lock() + defer l.lock.Unlock() + + if l.isClosed { + return errListenerClosed + } + + // Similarly to LISTEN, this is not an error in Postgres, but it seems + // useful to distinguish from the normal conditions. + _, exists := l.channels[channel] + if !exists { + return ErrChannelNotOpen + } + + if l.cn != nil { + // Similarly to Listen (see comment in that function), the caller + // should only be bothered with an error if it came from the backend as + // a response to our query. + gotResponse, err := l.cn.Unlisten(channel) + if gotResponse && err != nil { + return err + } + } + + // Don't bother waiting for resync if there's no connection. + delete(l.channels, channel) + return nil +} + +// UnlistenAll removes all channels from the Listener's channel list. Returns +// immediately with no error if there is no connection. Note that you might +// still get notifications for any of the deleted channels even after +// UnlistenAll has returned. +func (l *Listener) UnlistenAll() error { + l.lock.Lock() + defer l.lock.Unlock() + + if l.isClosed { + return errListenerClosed + } + + if l.cn != nil { + // Similarly to Listen (see comment in that function), the caller + // should only be bothered with an error if it came from the backend as + // a response to our query. + gotResponse, err := l.cn.UnlistenAll() + if gotResponse && err != nil { + return err + } + } + + // Don't bother waiting for resync if there's no connection. + l.channels = make(map[string]struct{}) + return nil +} + +// Ping the remote server to make sure it's alive. Non-nil return value means +// that there is no active connection. +func (l *Listener) Ping() error { + l.lock.Lock() + defer l.lock.Unlock() + + if l.isClosed { + return errListenerClosed + } + if l.cn == nil { + return errors.New("no connection") + } + + return l.cn.Ping() +} + +// Clean up after losing the server connection. Returns l.cn.Err(), which +// should have the reason the connection was lost. +func (l *Listener) disconnectCleanup() error { + l.lock.Lock() + defer l.lock.Unlock() + + // sanity check; can't look at Err() until the channel has been closed + select { + case _, ok := <-l.connNotificationChan: + if ok { + panic("connNotificationChan not closed") + } + default: + panic("connNotificationChan not closed") + } + + err := l.cn.Err() + l.cn.Close() + l.cn = nil + return err +} + +// Synchronize the list of channels we want to be listening on with the server +// after the connection has been established. +func (l *Listener) resync(cn *ListenerConn, notificationChan <-chan *Notification) error { + doneChan := make(chan error) + go func(notificationChan <-chan *Notification) { + for channel := range l.channels { + // If we got a response, return that error to our caller as it's + // going to be more descriptive than cn.Err(). + gotResponse, err := cn.Listen(channel) + if gotResponse && err != nil { + doneChan <- err + return + } + + // If we couldn't reach the server, wait for notificationChan to + // close and then return the error message from the connection, as + // per ListenerConn's interface. + if err != nil { + for range notificationChan { + } + doneChan <- cn.Err() + return + } + } + doneChan <- nil + }(notificationChan) + + // Ignore notifications while synchronization is going on to avoid + // deadlocks. We have to send a nil notification over Notify anyway as + // we can't possibly know which notifications (if any) were lost while + // the connection was down, so there's no reason to try and process + // these messages at all. + for { + select { + case _, ok := <-notificationChan: + if !ok { + notificationChan = nil + } + + case err := <-doneChan: + return err + } + } +} + +// caller should NOT be holding l.lock +func (l *Listener) closed() bool { + l.lock.Lock() + defer l.lock.Unlock() + + return l.isClosed +} + +func (l *Listener) connect() error { + notificationChan := make(chan *Notification, 32) + cn, err := newDialListenerConn(l.dialer, l.name, notificationChan) + if err != nil { + return err + } + + l.lock.Lock() + defer l.lock.Unlock() + + err = l.resync(cn, notificationChan) + if err != nil { + cn.Close() + return err + } + + l.cn = cn + l.connNotificationChan = notificationChan + l.reconnectCond.Broadcast() + + return nil +} + +// Close disconnects the Listener from the database and shuts it down. +// Subsequent calls to its methods will return an error. Close returns an +// error if the connection has already been closed. +func (l *Listener) Close() error { + l.lock.Lock() + defer l.lock.Unlock() + + if l.isClosed { + return errListenerClosed + } + + if l.cn != nil { + l.cn.Close() + } + l.isClosed = true + + // Unblock calls to Listen() + l.reconnectCond.Broadcast() + + return nil +} + +func (l *Listener) emitEvent(event ListenerEventType, err error) { + if l.eventCallback != nil { + l.eventCallback(event, err) + } +} + +// Main logic here: maintain a connection to the server when possible, wait +// for notifications and emit events. +func (l *Listener) listenerConnLoop() { + var nextReconnect time.Time + + reconnectInterval := l.minReconnectInterval + for { + for { + err := l.connect() + if err == nil { + break + } + + if l.closed() { + return + } + l.emitEvent(ListenerEventConnectionAttemptFailed, err) + + time.Sleep(reconnectInterval) + reconnectInterval *= 2 + if reconnectInterval > l.maxReconnectInterval { + reconnectInterval = l.maxReconnectInterval + } + } + + if nextReconnect.IsZero() { + l.emitEvent(ListenerEventConnected, nil) + } else { + l.emitEvent(ListenerEventReconnected, nil) + l.Notify <- nil + } + + reconnectInterval = l.minReconnectInterval + nextReconnect = time.Now().Add(reconnectInterval) + + for { + notification, ok := <-l.connNotificationChan + if !ok { + // lost connection, loop again + break + } + l.Notify <- notification + } + + err := l.disconnectCleanup() + if l.closed() { + return + } + l.emitEvent(ListenerEventDisconnected, err) + + time.Sleep(time.Until(nextReconnect)) + } +} + +func (l *Listener) listenerMain() { + l.listenerConnLoop() + close(l.Notify) +} diff --git a/vendor/github.com/lib/pq/oid/doc.go b/vendor/github.com/lib/pq/oid/doc.go new file mode 100644 index 000000000..caaede248 --- /dev/null +++ b/vendor/github.com/lib/pq/oid/doc.go @@ -0,0 +1,6 @@ +// Package oid contains OID constants +// as defined by the Postgres server. +package oid + +// Oid is a Postgres Object ID. +type Oid uint32 diff --git a/vendor/github.com/lib/pq/oid/types.go b/vendor/github.com/lib/pq/oid/types.go new file mode 100644 index 000000000..ecc84c2c8 --- /dev/null +++ b/vendor/github.com/lib/pq/oid/types.go @@ -0,0 +1,343 @@ +// Code generated by gen.go. DO NOT EDIT. + +package oid + +const ( + T_bool Oid = 16 + T_bytea Oid = 17 + T_char Oid = 18 + T_name Oid = 19 + T_int8 Oid = 20 + T_int2 Oid = 21 + T_int2vector Oid = 22 + T_int4 Oid = 23 + T_regproc Oid = 24 + T_text Oid = 25 + T_oid Oid = 26 + T_tid Oid = 27 + T_xid Oid = 28 + T_cid Oid = 29 + T_oidvector Oid = 30 + T_pg_ddl_command Oid = 32 + T_pg_type Oid = 71 + T_pg_attribute Oid = 75 + T_pg_proc Oid = 81 + T_pg_class Oid = 83 + T_json Oid = 114 + T_xml Oid = 142 + T__xml Oid = 143 + T_pg_node_tree Oid = 194 + T__json Oid = 199 + T_smgr Oid = 210 + T_index_am_handler Oid = 325 + T_point Oid = 600 + T_lseg Oid = 601 + T_path Oid = 602 + T_box Oid = 603 + T_polygon Oid = 604 + T_line Oid = 628 + T__line Oid = 629 + T_cidr Oid = 650 + T__cidr Oid = 651 + T_float4 Oid = 700 + T_float8 Oid = 701 + T_abstime Oid = 702 + T_reltime Oid = 703 + T_tinterval Oid = 704 + T_unknown Oid = 705 + T_circle Oid = 718 + T__circle Oid = 719 + T_money Oid = 790 + T__money Oid = 791 + T_macaddr Oid = 829 + T_inet Oid = 869 + T__bool Oid = 1000 + T__bytea Oid = 1001 + T__char Oid = 1002 + T__name Oid = 1003 + T__int2 Oid = 1005 + T__int2vector Oid = 1006 + T__int4 Oid = 1007 + T__regproc Oid = 1008 + T__text Oid = 1009 + T__tid Oid = 1010 + T__xid Oid = 1011 + T__cid Oid = 1012 + T__oidvector Oid = 1013 + T__bpchar Oid = 1014 + T__varchar Oid = 1015 + T__int8 Oid = 1016 + T__point Oid = 1017 + T__lseg Oid = 1018 + T__path Oid = 1019 + T__box Oid = 1020 + T__float4 Oid = 1021 + T__float8 Oid = 1022 + T__abstime Oid = 1023 + T__reltime Oid = 1024 + T__tinterval Oid = 1025 + T__polygon Oid = 1027 + T__oid Oid = 1028 + T_aclitem Oid = 1033 + T__aclitem Oid = 1034 + T__macaddr Oid = 1040 + T__inet Oid = 1041 + T_bpchar Oid = 1042 + T_varchar Oid = 1043 + T_date Oid = 1082 + T_time Oid = 1083 + T_timestamp Oid = 1114 + T__timestamp Oid = 1115 + T__date Oid = 1182 + T__time Oid = 1183 + T_timestamptz Oid = 1184 + T__timestamptz Oid = 1185 + T_interval Oid = 1186 + T__interval Oid = 1187 + T__numeric Oid = 1231 + T_pg_database Oid = 1248 + T__cstring Oid = 1263 + T_timetz Oid = 1266 + T__timetz Oid = 1270 + T_bit Oid = 1560 + T__bit Oid = 1561 + T_varbit Oid = 1562 + T__varbit Oid = 1563 + T_numeric Oid = 1700 + T_refcursor Oid = 1790 + T__refcursor Oid = 2201 + T_regprocedure Oid = 2202 + T_regoper Oid = 2203 + T_regoperator Oid = 2204 + T_regclass Oid = 2205 + T_regtype Oid = 2206 + T__regprocedure Oid = 2207 + T__regoper Oid = 2208 + T__regoperator Oid = 2209 + T__regclass Oid = 2210 + T__regtype Oid = 2211 + T_record Oid = 2249 + T_cstring Oid = 2275 + T_any Oid = 2276 + T_anyarray Oid = 2277 + T_void Oid = 2278 + T_trigger Oid = 2279 + T_language_handler Oid = 2280 + T_internal Oid = 2281 + T_opaque Oid = 2282 + T_anyelement Oid = 2283 + T__record Oid = 2287 + T_anynonarray Oid = 2776 + T_pg_authid Oid = 2842 + T_pg_auth_members Oid = 2843 + T__txid_snapshot Oid = 2949 + T_uuid Oid = 2950 + T__uuid Oid = 2951 + T_txid_snapshot Oid = 2970 + T_fdw_handler Oid = 3115 + T_pg_lsn Oid = 3220 + T__pg_lsn Oid = 3221 + T_tsm_handler Oid = 3310 + T_anyenum Oid = 3500 + T_tsvector Oid = 3614 + T_tsquery Oid = 3615 + T_gtsvector Oid = 3642 + T__tsvector Oid = 3643 + T__gtsvector Oid = 3644 + T__tsquery Oid = 3645 + T_regconfig Oid = 3734 + T__regconfig Oid = 3735 + T_regdictionary Oid = 3769 + T__regdictionary Oid = 3770 + T_jsonb Oid = 3802 + T__jsonb Oid = 3807 + T_anyrange Oid = 3831 + T_event_trigger Oid = 3838 + T_int4range Oid = 3904 + T__int4range Oid = 3905 + T_numrange Oid = 3906 + T__numrange Oid = 3907 + T_tsrange Oid = 3908 + T__tsrange Oid = 3909 + T_tstzrange Oid = 3910 + T__tstzrange Oid = 3911 + T_daterange Oid = 3912 + T__daterange Oid = 3913 + T_int8range Oid = 3926 + T__int8range Oid = 3927 + T_pg_shseclabel Oid = 4066 + T_regnamespace Oid = 4089 + T__regnamespace Oid = 4090 + T_regrole Oid = 4096 + T__regrole Oid = 4097 +) + +var TypeName = map[Oid]string{ + T_bool: "BOOL", + T_bytea: "BYTEA", + T_char: "CHAR", + T_name: "NAME", + T_int8: "INT8", + T_int2: "INT2", + T_int2vector: "INT2VECTOR", + T_int4: "INT4", + T_regproc: "REGPROC", + T_text: "TEXT", + T_oid: "OID", + T_tid: "TID", + T_xid: "XID", + T_cid: "CID", + T_oidvector: "OIDVECTOR", + T_pg_ddl_command: "PG_DDL_COMMAND", + T_pg_type: "PG_TYPE", + T_pg_attribute: "PG_ATTRIBUTE", + T_pg_proc: "PG_PROC", + T_pg_class: "PG_CLASS", + T_json: "JSON", + T_xml: "XML", + T__xml: "_XML", + T_pg_node_tree: "PG_NODE_TREE", + T__json: "_JSON", + T_smgr: "SMGR", + T_index_am_handler: "INDEX_AM_HANDLER", + T_point: "POINT", + T_lseg: "LSEG", + T_path: "PATH", + T_box: "BOX", + T_polygon: "POLYGON", + T_line: "LINE", + T__line: "_LINE", + T_cidr: "CIDR", + T__cidr: "_CIDR", + T_float4: "FLOAT4", + T_float8: "FLOAT8", + T_abstime: "ABSTIME", + T_reltime: "RELTIME", + T_tinterval: "TINTERVAL", + T_unknown: "UNKNOWN", + T_circle: "CIRCLE", + T__circle: "_CIRCLE", + T_money: "MONEY", + T__money: "_MONEY", + T_macaddr: "MACADDR", + T_inet: "INET", + T__bool: "_BOOL", + T__bytea: "_BYTEA", + T__char: "_CHAR", + T__name: "_NAME", + T__int2: "_INT2", + T__int2vector: "_INT2VECTOR", + T__int4: "_INT4", + T__regproc: "_REGPROC", + T__text: "_TEXT", + T__tid: "_TID", + T__xid: "_XID", + T__cid: "_CID", + T__oidvector: "_OIDVECTOR", + T__bpchar: "_BPCHAR", + T__varchar: "_VARCHAR", + T__int8: "_INT8", + T__point: "_POINT", + T__lseg: "_LSEG", + T__path: "_PATH", + T__box: "_BOX", + T__float4: "_FLOAT4", + T__float8: "_FLOAT8", + T__abstime: "_ABSTIME", + T__reltime: "_RELTIME", + T__tinterval: "_TINTERVAL", + T__polygon: "_POLYGON", + T__oid: "_OID", + T_aclitem: "ACLITEM", + T__aclitem: "_ACLITEM", + T__macaddr: "_MACADDR", + T__inet: "_INET", + T_bpchar: "BPCHAR", + T_varchar: "VARCHAR", + T_date: "DATE", + T_time: "TIME", + T_timestamp: "TIMESTAMP", + T__timestamp: "_TIMESTAMP", + T__date: "_DATE", + T__time: "_TIME", + T_timestamptz: "TIMESTAMPTZ", + T__timestamptz: "_TIMESTAMPTZ", + T_interval: "INTERVAL", + T__interval: "_INTERVAL", + T__numeric: "_NUMERIC", + T_pg_database: "PG_DATABASE", + T__cstring: "_CSTRING", + T_timetz: "TIMETZ", + T__timetz: "_TIMETZ", + T_bit: "BIT", + T__bit: "_BIT", + T_varbit: "VARBIT", + T__varbit: "_VARBIT", + T_numeric: "NUMERIC", + T_refcursor: "REFCURSOR", + T__refcursor: "_REFCURSOR", + T_regprocedure: "REGPROCEDURE", + T_regoper: "REGOPER", + T_regoperator: "REGOPERATOR", + T_regclass: "REGCLASS", + T_regtype: "REGTYPE", + T__regprocedure: "_REGPROCEDURE", + T__regoper: "_REGOPER", + T__regoperator: "_REGOPERATOR", + T__regclass: "_REGCLASS", + T__regtype: "_REGTYPE", + T_record: "RECORD", + T_cstring: "CSTRING", + T_any: "ANY", + T_anyarray: "ANYARRAY", + T_void: "VOID", + T_trigger: "TRIGGER", + T_language_handler: "LANGUAGE_HANDLER", + T_internal: "INTERNAL", + T_opaque: "OPAQUE", + T_anyelement: "ANYELEMENT", + T__record: "_RECORD", + T_anynonarray: "ANYNONARRAY", + T_pg_authid: "PG_AUTHID", + T_pg_auth_members: "PG_AUTH_MEMBERS", + T__txid_snapshot: "_TXID_SNAPSHOT", + T_uuid: "UUID", + T__uuid: "_UUID", + T_txid_snapshot: "TXID_SNAPSHOT", + T_fdw_handler: "FDW_HANDLER", + T_pg_lsn: "PG_LSN", + T__pg_lsn: "_PG_LSN", + T_tsm_handler: "TSM_HANDLER", + T_anyenum: "ANYENUM", + T_tsvector: "TSVECTOR", + T_tsquery: "TSQUERY", + T_gtsvector: "GTSVECTOR", + T__tsvector: "_TSVECTOR", + T__gtsvector: "_GTSVECTOR", + T__tsquery: "_TSQUERY", + T_regconfig: "REGCONFIG", + T__regconfig: "_REGCONFIG", + T_regdictionary: "REGDICTIONARY", + T__regdictionary: "_REGDICTIONARY", + T_jsonb: "JSONB", + T__jsonb: "_JSONB", + T_anyrange: "ANYRANGE", + T_event_trigger: "EVENT_TRIGGER", + T_int4range: "INT4RANGE", + T__int4range: "_INT4RANGE", + T_numrange: "NUMRANGE", + T__numrange: "_NUMRANGE", + T_tsrange: "TSRANGE", + T__tsrange: "_TSRANGE", + T_tstzrange: "TSTZRANGE", + T__tstzrange: "_TSTZRANGE", + T_daterange: "DATERANGE", + T__daterange: "_DATERANGE", + T_int8range: "INT8RANGE", + T__int8range: "_INT8RANGE", + T_pg_shseclabel: "PG_SHSECLABEL", + T_regnamespace: "REGNAMESPACE", + T__regnamespace: "_REGNAMESPACE", + T_regrole: "REGROLE", + T__regrole: "_REGROLE", +} diff --git a/vendor/github.com/lib/pq/rows.go b/vendor/github.com/lib/pq/rows.go new file mode 100644 index 000000000..c6aa5b9a3 --- /dev/null +++ b/vendor/github.com/lib/pq/rows.go @@ -0,0 +1,93 @@ +package pq + +import ( + "math" + "reflect" + "time" + + "github.com/lib/pq/oid" +) + +const headerSize = 4 + +type fieldDesc struct { + // The object ID of the data type. + OID oid.Oid + // The data type size (see pg_type.typlen). + // Note that negative values denote variable-width types. + Len int + // The type modifier (see pg_attribute.atttypmod). + // The meaning of the modifier is type-specific. + Mod int +} + +func (fd fieldDesc) Type() reflect.Type { + switch fd.OID { + case oid.T_int8: + return reflect.TypeOf(int64(0)) + case oid.T_int4: + return reflect.TypeOf(int32(0)) + case oid.T_int2: + return reflect.TypeOf(int16(0)) + case oid.T_varchar, oid.T_text: + return reflect.TypeOf("") + case oid.T_bool: + return reflect.TypeOf(false) + case oid.T_date, oid.T_time, oid.T_timetz, oid.T_timestamp, oid.T_timestamptz: + return reflect.TypeOf(time.Time{}) + case oid.T_bytea: + return reflect.TypeOf([]byte(nil)) + default: + return reflect.TypeOf(new(interface{})).Elem() + } +} + +func (fd fieldDesc) Name() string { + return oid.TypeName[fd.OID] +} + +func (fd fieldDesc) Length() (length int64, ok bool) { + switch fd.OID { + case oid.T_text, oid.T_bytea: + return math.MaxInt64, true + case oid.T_varchar, oid.T_bpchar: + return int64(fd.Mod - headerSize), true + default: + return 0, false + } +} + +func (fd fieldDesc) PrecisionScale() (precision, scale int64, ok bool) { + switch fd.OID { + case oid.T_numeric, oid.T__numeric: + mod := fd.Mod - headerSize + precision = int64((mod >> 16) & 0xffff) + scale = int64(mod & 0xffff) + return precision, scale, true + default: + return 0, 0, false + } +} + +// ColumnTypeScanType returns the value type that can be used to scan types into. +func (rs *rows) ColumnTypeScanType(index int) reflect.Type { + return rs.colTyps[index].Type() +} + +// ColumnTypeDatabaseTypeName return the database system type name. +func (rs *rows) ColumnTypeDatabaseTypeName(index int) string { + return rs.colTyps[index].Name() +} + +// ColumnTypeLength returns the length of the column type if the column is a +// variable length type. If the column is not a variable length type ok +// should return false. +func (rs *rows) ColumnTypeLength(index int) (length int64, ok bool) { + return rs.colTyps[index].Length() +} + +// ColumnTypePrecisionScale should return the precision and scale for decimal +// types. If not applicable, ok should be false. +func (rs *rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) { + return rs.colTyps[index].PrecisionScale() +} diff --git a/vendor/github.com/lib/pq/scram/scram.go b/vendor/github.com/lib/pq/scram/scram.go new file mode 100644 index 000000000..477216b60 --- /dev/null +++ b/vendor/github.com/lib/pq/scram/scram.go @@ -0,0 +1,264 @@ +// Copyright (c) 2014 - Gustavo Niemeyer +// +// 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. +// +// 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 OWNER 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. + +// Package scram implements a SCRAM-{SHA-1,etc} client per RFC5802. +// +// http://tools.ietf.org/html/rfc5802 +// +package scram + +import ( + "bytes" + "crypto/hmac" + "crypto/rand" + "encoding/base64" + "fmt" + "hash" + "strconv" + "strings" +) + +// Client implements a SCRAM-* client (SCRAM-SHA-1, SCRAM-SHA-256, etc). +// +// A Client may be used within a SASL conversation with logic resembling: +// +// var in []byte +// var client = scram.NewClient(sha1.New, user, pass) +// for client.Step(in) { +// out := client.Out() +// // send out to server +// in := serverOut +// } +// if client.Err() != nil { +// // auth failed +// } +// +type Client struct { + newHash func() hash.Hash + + user string + pass string + step int + out bytes.Buffer + err error + + clientNonce []byte + serverNonce []byte + saltedPass []byte + authMsg bytes.Buffer +} + +// NewClient returns a new SCRAM-* client with the provided hash algorithm. +// +// For SCRAM-SHA-256, for example, use: +// +// client := scram.NewClient(sha256.New, user, pass) +// +func NewClient(newHash func() hash.Hash, user, pass string) *Client { + c := &Client{ + newHash: newHash, + user: user, + pass: pass, + } + c.out.Grow(256) + c.authMsg.Grow(256) + return c +} + +// Out returns the data to be sent to the server in the current step. +func (c *Client) Out() []byte { + if c.out.Len() == 0 { + return nil + } + return c.out.Bytes() +} + +// Err returns the error that occurred, or nil if there were no errors. +func (c *Client) Err() error { + return c.err +} + +// SetNonce sets the client nonce to the provided value. +// If not set, the nonce is generated automatically out of crypto/rand on the first step. +func (c *Client) SetNonce(nonce []byte) { + c.clientNonce = nonce +} + +var escaper = strings.NewReplacer("=", "=3D", ",", "=2C") + +// Step processes the incoming data from the server and makes the +// next round of data for the server available via Client.Out. +// Step returns false if there are no errors and more data is +// still expected. +func (c *Client) Step(in []byte) bool { + c.out.Reset() + if c.step > 2 || c.err != nil { + return false + } + c.step++ + switch c.step { + case 1: + c.err = c.step1(in) + case 2: + c.err = c.step2(in) + case 3: + c.err = c.step3(in) + } + return c.step > 2 || c.err != nil +} + +func (c *Client) step1(in []byte) error { + if len(c.clientNonce) == 0 { + const nonceLen = 16 + buf := make([]byte, nonceLen+b64.EncodedLen(nonceLen)) + if _, err := rand.Read(buf[:nonceLen]); err != nil { + return fmt.Errorf("cannot read random SCRAM-SHA-256 nonce from operating system: %v", err) + } + c.clientNonce = buf[nonceLen:] + b64.Encode(c.clientNonce, buf[:nonceLen]) + } + c.authMsg.WriteString("n=") + escaper.WriteString(&c.authMsg, c.user) + c.authMsg.WriteString(",r=") + c.authMsg.Write(c.clientNonce) + + c.out.WriteString("n,,") + c.out.Write(c.authMsg.Bytes()) + return nil +} + +var b64 = base64.StdEncoding + +func (c *Client) step2(in []byte) error { + c.authMsg.WriteByte(',') + c.authMsg.Write(in) + + fields := bytes.Split(in, []byte(",")) + if len(fields) != 3 { + return fmt.Errorf("expected 3 fields in first SCRAM-SHA-256 server message, got %d: %q", len(fields), in) + } + if !bytes.HasPrefix(fields[0], []byte("r=")) || len(fields[0]) < 2 { + return fmt.Errorf("server sent an invalid SCRAM-SHA-256 nonce: %q", fields[0]) + } + if !bytes.HasPrefix(fields[1], []byte("s=")) || len(fields[1]) < 6 { + return fmt.Errorf("server sent an invalid SCRAM-SHA-256 salt: %q", fields[1]) + } + if !bytes.HasPrefix(fields[2], []byte("i=")) || len(fields[2]) < 6 { + return fmt.Errorf("server sent an invalid SCRAM-SHA-256 iteration count: %q", fields[2]) + } + + c.serverNonce = fields[0][2:] + if !bytes.HasPrefix(c.serverNonce, c.clientNonce) { + return fmt.Errorf("server SCRAM-SHA-256 nonce is not prefixed by client nonce: got %q, want %q+\"...\"", c.serverNonce, c.clientNonce) + } + + salt := make([]byte, b64.DecodedLen(len(fields[1][2:]))) + n, err := b64.Decode(salt, fields[1][2:]) + if err != nil { + return fmt.Errorf("cannot decode SCRAM-SHA-256 salt sent by server: %q", fields[1]) + } + salt = salt[:n] + iterCount, err := strconv.Atoi(string(fields[2][2:])) + if err != nil { + return fmt.Errorf("server sent an invalid SCRAM-SHA-256 iteration count: %q", fields[2]) + } + c.saltPassword(salt, iterCount) + + c.authMsg.WriteString(",c=biws,r=") + c.authMsg.Write(c.serverNonce) + + c.out.WriteString("c=biws,r=") + c.out.Write(c.serverNonce) + c.out.WriteString(",p=") + c.out.Write(c.clientProof()) + return nil +} + +func (c *Client) step3(in []byte) error { + var isv, ise bool + var fields = bytes.Split(in, []byte(",")) + if len(fields) == 1 { + isv = bytes.HasPrefix(fields[0], []byte("v=")) + ise = bytes.HasPrefix(fields[0], []byte("e=")) + } + if ise { + return fmt.Errorf("SCRAM-SHA-256 authentication error: %s", fields[0][2:]) + } else if !isv { + return fmt.Errorf("unsupported SCRAM-SHA-256 final message from server: %q", in) + } + if !bytes.Equal(c.serverSignature(), fields[0][2:]) { + return fmt.Errorf("cannot authenticate SCRAM-SHA-256 server signature: %q", fields[0][2:]) + } + return nil +} + +func (c *Client) saltPassword(salt []byte, iterCount int) { + mac := hmac.New(c.newHash, []byte(c.pass)) + mac.Write(salt) + mac.Write([]byte{0, 0, 0, 1}) + ui := mac.Sum(nil) + hi := make([]byte, len(ui)) + copy(hi, ui) + for i := 1; i < iterCount; i++ { + mac.Reset() + mac.Write(ui) + mac.Sum(ui[:0]) + for j, b := range ui { + hi[j] ^= b + } + } + c.saltedPass = hi +} + +func (c *Client) clientProof() []byte { + mac := hmac.New(c.newHash, c.saltedPass) + mac.Write([]byte("Client Key")) + clientKey := mac.Sum(nil) + hash := c.newHash() + hash.Write(clientKey) + storedKey := hash.Sum(nil) + mac = hmac.New(c.newHash, storedKey) + mac.Write(c.authMsg.Bytes()) + clientProof := mac.Sum(nil) + for i, b := range clientKey { + clientProof[i] ^= b + } + clientProof64 := make([]byte, b64.EncodedLen(len(clientProof))) + b64.Encode(clientProof64, clientProof) + return clientProof64 +} + +func (c *Client) serverSignature() []byte { + mac := hmac.New(c.newHash, c.saltedPass) + mac.Write([]byte("Server Key")) + serverKey := mac.Sum(nil) + + mac = hmac.New(c.newHash, serverKey) + mac.Write(c.authMsg.Bytes()) + serverSignature := mac.Sum(nil) + + encoded := make([]byte, b64.EncodedLen(len(serverSignature))) + b64.Encode(encoded, serverSignature) + return encoded +} diff --git a/vendor/github.com/lib/pq/ssl.go b/vendor/github.com/lib/pq/ssl.go new file mode 100644 index 000000000..36b61ba45 --- /dev/null +++ b/vendor/github.com/lib/pq/ssl.go @@ -0,0 +1,204 @@ +package pq + +import ( + "crypto/tls" + "crypto/x509" + "io/ioutil" + "net" + "os" + "os/user" + "path/filepath" + "strings" +) + +// ssl generates a function to upgrade a net.Conn based on the "sslmode" and +// related settings. The function is nil when no upgrade should take place. +func ssl(o values) (func(net.Conn) (net.Conn, error), error) { + verifyCaOnly := false + tlsConf := tls.Config{} + switch mode := o["sslmode"]; mode { + // "require" is the default. + case "", "require": + // We must skip TLS's own verification since it requires full + // verification since Go 1.3. + tlsConf.InsecureSkipVerify = true + + // From http://www.postgresql.org/docs/current/static/libpq-ssl.html: + // + // Note: For backwards compatibility with earlier versions of + // PostgreSQL, if a root CA file exists, the behavior of + // sslmode=require will be the same as that of verify-ca, meaning the + // server certificate is validated against the CA. Relying on this + // behavior is discouraged, and applications that need certificate + // validation should always use verify-ca or verify-full. + if sslrootcert, ok := o["sslrootcert"]; ok { + if _, err := os.Stat(sslrootcert); err == nil { + verifyCaOnly = true + } else { + delete(o, "sslrootcert") + } + } + case "verify-ca": + // We must skip TLS's own verification since it requires full + // verification since Go 1.3. + tlsConf.InsecureSkipVerify = true + verifyCaOnly = true + case "verify-full": + tlsConf.ServerName = o["host"] + case "disable": + return nil, nil + default: + return nil, fmterrorf(`unsupported sslmode %q; only "require" (default), "verify-full", "verify-ca", and "disable" supported`, mode) + } + + // Set Server Name Indication (SNI), if enabled by connection parameters. + // By default SNI is on, any value which is not starting with "1" disables + // SNI -- that is the same check vanilla libpq uses. + if sslsni := o["sslsni"]; sslsni == "" || strings.HasPrefix(sslsni, "1") { + // RFC 6066 asks to not set SNI if the host is a literal IP address (IPv4 + // or IPv6). This check is coded already crypto.tls.hostnameInSNI, so + // just always set ServerName here and let crypto/tls do the filtering. + tlsConf.ServerName = o["host"] + } + + err := sslClientCertificates(&tlsConf, o) + if err != nil { + return nil, err + } + err = sslCertificateAuthority(&tlsConf, o) + if err != nil { + return nil, err + } + + // Accept renegotiation requests initiated by the backend. + // + // Renegotiation was deprecated then removed from PostgreSQL 9.5, but + // the default configuration of older versions has it enabled. Redshift + // also initiates renegotiations and cannot be reconfigured. + tlsConf.Renegotiation = tls.RenegotiateFreelyAsClient + + return func(conn net.Conn) (net.Conn, error) { + client := tls.Client(conn, &tlsConf) + if verifyCaOnly { + err := sslVerifyCertificateAuthority(client, &tlsConf) + if err != nil { + return nil, err + } + } + return client, nil + }, nil +} + +// sslClientCertificates adds the certificate specified in the "sslcert" and +// "sslkey" settings, or if they aren't set, from the .postgresql directory +// in the user's home directory. The configured files must exist and have +// the correct permissions. +func sslClientCertificates(tlsConf *tls.Config, o values) error { + sslinline := o["sslinline"] + if sslinline == "true" { + cert, err := tls.X509KeyPair([]byte(o["sslcert"]), []byte(o["sslkey"])) + if err != nil { + return err + } + tlsConf.Certificates = []tls.Certificate{cert} + return nil + } + + // user.Current() might fail when cross-compiling. We have to ignore the + // error and continue without home directory defaults, since we wouldn't + // know from where to load them. + user, _ := user.Current() + + // In libpq, the client certificate is only loaded if the setting is not blank. + // + // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1036-L1037 + sslcert := o["sslcert"] + if len(sslcert) == 0 && user != nil { + sslcert = filepath.Join(user.HomeDir, ".postgresql", "postgresql.crt") + } + // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1045 + if len(sslcert) == 0 { + return nil + } + // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1050:L1054 + if _, err := os.Stat(sslcert); os.IsNotExist(err) { + return nil + } else if err != nil { + return err + } + + // In libpq, the ssl key is only loaded if the setting is not blank. + // + // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1123-L1222 + sslkey := o["sslkey"] + if len(sslkey) == 0 && user != nil { + sslkey = filepath.Join(user.HomeDir, ".postgresql", "postgresql.key") + } + + if len(sslkey) > 0 { + if err := sslKeyPermissions(sslkey); err != nil { + return err + } + } + + cert, err := tls.LoadX509KeyPair(sslcert, sslkey) + if err != nil { + return err + } + + tlsConf.Certificates = []tls.Certificate{cert} + return nil +} + +// sslCertificateAuthority adds the RootCA specified in the "sslrootcert" setting. +func sslCertificateAuthority(tlsConf *tls.Config, o values) error { + // In libpq, the root certificate is only loaded if the setting is not blank. + // + // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L950-L951 + if sslrootcert := o["sslrootcert"]; len(sslrootcert) > 0 { + tlsConf.RootCAs = x509.NewCertPool() + + sslinline := o["sslinline"] + + var cert []byte + if sslinline == "true" { + cert = []byte(sslrootcert) + } else { + var err error + cert, err = ioutil.ReadFile(sslrootcert) + if err != nil { + return err + } + } + + if !tlsConf.RootCAs.AppendCertsFromPEM(cert) { + return fmterrorf("couldn't parse pem in sslrootcert") + } + } + + return nil +} + +// sslVerifyCertificateAuthority carries out a TLS handshake to the server and +// verifies the presented certificate against the CA, i.e. the one specified in +// sslrootcert or the system CA if sslrootcert was not specified. +func sslVerifyCertificateAuthority(client *tls.Conn, tlsConf *tls.Config) error { + err := client.Handshake() + if err != nil { + return err + } + certs := client.ConnectionState().PeerCertificates + opts := x509.VerifyOptions{ + DNSName: client.ConnectionState().ServerName, + Intermediates: x509.NewCertPool(), + Roots: tlsConf.RootCAs, + } + for i, cert := range certs { + if i == 0 { + continue + } + opts.Intermediates.AddCert(cert) + } + _, err = certs[0].Verify(opts) + return err +} diff --git a/vendor/github.com/lib/pq/ssl_permissions.go b/vendor/github.com/lib/pq/ssl_permissions.go new file mode 100644 index 000000000..d587f102e --- /dev/null +++ b/vendor/github.com/lib/pq/ssl_permissions.go @@ -0,0 +1,93 @@ +//go:build !windows +// +build !windows + +package pq + +import ( + "errors" + "os" + "syscall" +) + +const ( + rootUserID = uint32(0) + + // The maximum permissions that a private key file owned by a regular user + // is allowed to have. This translates to u=rw. + maxUserOwnedKeyPermissions os.FileMode = 0600 + + // The maximum permissions that a private key file owned by root is allowed + // to have. This translates to u=rw,g=r. + maxRootOwnedKeyPermissions os.FileMode = 0640 +) + +var ( + errSSLKeyHasUnacceptableUserPermissions = errors.New("permissions for files not owned by root should be u=rw (0600) or less") + errSSLKeyHasUnacceptableRootPermissions = errors.New("permissions for root owned files should be u=rw,g=r (0640) or less") +) + +// sslKeyPermissions checks the permissions on user-supplied ssl key files. +// The key file should have very little access. +// +// libpq does not check key file permissions on Windows. +func sslKeyPermissions(sslkey string) error { + info, err := os.Stat(sslkey) + if err != nil { + return err + } + + err = hasCorrectPermissions(info) + + // return ErrSSLKeyHasWorldPermissions for backwards compatability with + // existing code. + if err == errSSLKeyHasUnacceptableUserPermissions || err == errSSLKeyHasUnacceptableRootPermissions { + err = ErrSSLKeyHasWorldPermissions + } + return err +} + +// hasCorrectPermissions checks the file info (and the unix-specific stat_t +// output) to verify that the permissions on the file are correct. +// +// If the file is owned by the same user the process is running as, +// the file should only have 0600 (u=rw). If the file is owned by root, +// and the group matches the group that the process is running in, the +// permissions cannot be more than 0640 (u=rw,g=r). The file should +// never have world permissions. +// +// Returns an error when the permission check fails. +func hasCorrectPermissions(info os.FileInfo) error { + // if file's permission matches 0600, allow access. + userPermissionMask := (os.FileMode(0777) ^ maxUserOwnedKeyPermissions) + + // regardless of if we're running as root or not, 0600 is acceptable, + // so we return if we match the regular user permission mask. + if info.Mode().Perm()&userPermissionMask == 0 { + return nil + } + + // We need to pull the Unix file information to get the file's owner. + // If we can't access it, there's some sort of operating system level error + // and we should fail rather than attempting to use faulty information. + sysInfo := info.Sys() + if sysInfo == nil { + return ErrSSLKeyUnknownOwnership + } + + unixStat, ok := sysInfo.(*syscall.Stat_t) + if !ok { + return ErrSSLKeyUnknownOwnership + } + + // if the file is owned by root, we allow 0640 (u=rw,g=r) to match what + // Postgres does. + if unixStat.Uid == rootUserID { + rootPermissionMask := (os.FileMode(0777) ^ maxRootOwnedKeyPermissions) + if info.Mode().Perm()&rootPermissionMask != 0 { + return errSSLKeyHasUnacceptableRootPermissions + } + return nil + } + + return errSSLKeyHasUnacceptableUserPermissions +} diff --git a/vendor/github.com/lib/pq/ssl_windows.go b/vendor/github.com/lib/pq/ssl_windows.go new file mode 100644 index 000000000..73663c8f1 --- /dev/null +++ b/vendor/github.com/lib/pq/ssl_windows.go @@ -0,0 +1,10 @@ +//go:build windows +// +build windows + +package pq + +// sslKeyPermissions checks the permissions on user-supplied ssl key files. +// The key file should have very little access. +// +// libpq does not check key file permissions on Windows. +func sslKeyPermissions(string) error { return nil } diff --git a/vendor/github.com/lib/pq/url.go b/vendor/github.com/lib/pq/url.go new file mode 100644 index 000000000..aec6e95be --- /dev/null +++ b/vendor/github.com/lib/pq/url.go @@ -0,0 +1,76 @@ +package pq + +import ( + "fmt" + "net" + nurl "net/url" + "sort" + "strings" +) + +// ParseURL no longer needs to be used by clients of this library since supplying a URL as a +// connection string to sql.Open() is now supported: +// +// sql.Open("postgres", "postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full") +// +// It remains exported here for backwards-compatibility. +// +// ParseURL converts a url to a connection string for driver.Open. +// Example: +// +// "postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full" +// +// converts to: +// +// "user=bob password=secret host=1.2.3.4 port=5432 dbname=mydb sslmode=verify-full" +// +// A minimal example: +// +// "postgres://" +// +// This will be blank, causing driver.Open to use all of the defaults +func ParseURL(url string) (string, error) { + u, err := nurl.Parse(url) + if err != nil { + return "", err + } + + if u.Scheme != "postgres" && u.Scheme != "postgresql" { + return "", fmt.Errorf("invalid connection protocol: %s", u.Scheme) + } + + var kvs []string + escaper := strings.NewReplacer(`'`, `\'`, `\`, `\\`) + accrue := func(k, v string) { + if v != "" { + kvs = append(kvs, k+"='"+escaper.Replace(v)+"'") + } + } + + if u.User != nil { + v := u.User.Username() + accrue("user", v) + + v, _ = u.User.Password() + accrue("password", v) + } + + if host, port, err := net.SplitHostPort(u.Host); err != nil { + accrue("host", u.Host) + } else { + accrue("host", host) + accrue("port", port) + } + + if u.Path != "" { + accrue("dbname", u.Path[1:]) + } + + q := u.Query() + for k := range q { + accrue(k, q.Get(k)) + } + + sort.Strings(kvs) // Makes testing easier (not a performance concern) + return strings.Join(kvs, " "), nil +} diff --git a/vendor/github.com/lib/pq/user_other.go b/vendor/github.com/lib/pq/user_other.go new file mode 100644 index 000000000..3dae8f557 --- /dev/null +++ b/vendor/github.com/lib/pq/user_other.go @@ -0,0 +1,10 @@ +// Package pq is a pure Go Postgres driver for the database/sql package. + +//go:build js || android || hurd || zos +// +build js android hurd zos + +package pq + +func userCurrent() (string, error) { + return "", ErrCouldNotDetectUsername +} diff --git a/vendor/github.com/lib/pq/user_posix.go b/vendor/github.com/lib/pq/user_posix.go new file mode 100644 index 000000000..5f2d439bc --- /dev/null +++ b/vendor/github.com/lib/pq/user_posix.go @@ -0,0 +1,25 @@ +// Package pq is a pure Go Postgres driver for the database/sql package. + +//go:build aix || darwin || dragonfly || freebsd || (linux && !android) || nacl || netbsd || openbsd || plan9 || solaris || rumprun || illumos +// +build aix darwin dragonfly freebsd linux,!android nacl netbsd openbsd plan9 solaris rumprun illumos + +package pq + +import ( + "os" + "os/user" +) + +func userCurrent() (string, error) { + u, err := user.Current() + if err == nil { + return u.Username, nil + } + + name := os.Getenv("USER") + if name != "" { + return name, nil + } + + return "", ErrCouldNotDetectUsername +} diff --git a/vendor/github.com/lib/pq/user_windows.go b/vendor/github.com/lib/pq/user_windows.go new file mode 100644 index 000000000..2b691267b --- /dev/null +++ b/vendor/github.com/lib/pq/user_windows.go @@ -0,0 +1,27 @@ +// Package pq is a pure Go Postgres driver for the database/sql package. +package pq + +import ( + "path/filepath" + "syscall" +) + +// Perform Windows user name lookup identically to libpq. +// +// The PostgreSQL code makes use of the legacy Win32 function +// GetUserName, and that function has not been imported into stock Go. +// GetUserNameEx is available though, the difference being that a +// wider range of names are available. To get the output to be the +// same as GetUserName, only the base (or last) component of the +// result is returned. +func userCurrent() (string, error) { + pw_name := make([]uint16, 128) + pwname_size := uint32(len(pw_name)) - 1 + err := syscall.GetUserNameEx(syscall.NameSamCompatible, &pw_name[0], &pwname_size) + if err != nil { + return "", ErrCouldNotDetectUsername + } + s := syscall.UTF16ToString(pw_name) + u := filepath.Base(s) + return u, nil +} diff --git a/vendor/github.com/lib/pq/uuid.go b/vendor/github.com/lib/pq/uuid.go new file mode 100644 index 000000000..9a1b9e074 --- /dev/null +++ b/vendor/github.com/lib/pq/uuid.go @@ -0,0 +1,23 @@ +package pq + +import ( + "encoding/hex" + "fmt" +) + +// decodeUUIDBinary interprets the binary format of a uuid, returning it in text format. +func decodeUUIDBinary(src []byte) ([]byte, error) { + if len(src) != 16 { + return nil, fmt.Errorf("pq: unable to decode uuid; bad length: %d", len(src)) + } + + dst := make([]byte, 36) + dst[8], dst[13], dst[18], dst[23] = '-', '-', '-', '-' + hex.Encode(dst[0:], src[0:4]) + hex.Encode(dst[9:], src[4:6]) + hex.Encode(dst[14:], src[6:8]) + hex.Encode(dst[19:], src[8:10]) + hex.Encode(dst[24:], src[10:16]) + + return dst, nil +} diff --git a/vendor/github.com/mattn/go-colorable/LICENSE b/vendor/github.com/mattn/go-colorable/LICENSE new file mode 100644 index 000000000..91b5cef30 --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md new file mode 100644 index 000000000..ca0483711 --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/README.md @@ -0,0 +1,48 @@ +# go-colorable + +[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest) +[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable) +[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable) +[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable) + +Colorable writer for windows. + +For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) +This package is possible to handle escape sequence for ansi color on windows. + +## Too Bad! + +![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) + + +## So Good! + +![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) + +## Usage + +```go +logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) +logrus.SetOutput(colorable.NewColorableStdout()) + +logrus.Info("succeeded") +logrus.Warn("not correct") +logrus.Error("something error") +logrus.Fatal("panic") +``` + +You can compile above code on non-windows OSs. + +## Installation + +``` +$ go get github.com/mattn/go-colorable +``` + +# License + +MIT + +# Author + +Yasuhiro Matsumoto (a.k.a mattn) diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go new file mode 100644 index 000000000..416d1bbbf --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/colorable_appengine.go @@ -0,0 +1,38 @@ +//go:build appengine +// +build appengine + +package colorable + +import ( + "io" + "os" + + _ "github.com/mattn/go-isatty" +) + +// NewColorable returns new instance of Writer which handles escape sequence. +func NewColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + return file +} + +// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. +func NewColorableStdout() io.Writer { + return os.Stdout +} + +// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. +func NewColorableStderr() io.Writer { + return os.Stderr +} + +// EnableColorsStdout enable colors if possible. +func EnableColorsStdout(enabled *bool) func() { + if enabled != nil { + *enabled = true + } + return func() {} +} diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go new file mode 100644 index 000000000..766d94603 --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/colorable_others.go @@ -0,0 +1,38 @@ +//go:build !windows && !appengine +// +build !windows,!appengine + +package colorable + +import ( + "io" + "os" + + _ "github.com/mattn/go-isatty" +) + +// NewColorable returns new instance of Writer which handles escape sequence. +func NewColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + return file +} + +// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. +func NewColorableStdout() io.Writer { + return os.Stdout +} + +// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. +func NewColorableStderr() io.Writer { + return os.Stderr +} + +// EnableColorsStdout enable colors if possible. +func EnableColorsStdout(enabled *bool) func() { + if enabled != nil { + *enabled = true + } + return func() {} +} diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go new file mode 100644 index 000000000..1846ad5ab --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go @@ -0,0 +1,1047 @@ +//go:build windows && !appengine +// +build windows,!appengine + +package colorable + +import ( + "bytes" + "io" + "math" + "os" + "strconv" + "strings" + "sync" + "syscall" + "unsafe" + + "github.com/mattn/go-isatty" +) + +const ( + foregroundBlue = 0x1 + foregroundGreen = 0x2 + foregroundRed = 0x4 + foregroundIntensity = 0x8 + foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity) + backgroundBlue = 0x10 + backgroundGreen = 0x20 + backgroundRed = 0x40 + backgroundIntensity = 0x80 + backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity) + commonLvbUnderscore = 0x8000 + + cENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4 +) + +const ( + genericRead = 0x80000000 + genericWrite = 0x40000000 +) + +const ( + consoleTextmodeBuffer = 0x1 +) + +type wchar uint16 +type short int16 +type dword uint32 +type word uint16 + +type coord struct { + x short + y short +} + +type smallRect struct { + left short + top short + right short + bottom short +} + +type consoleScreenBufferInfo struct { + size coord + cursorPosition coord + attributes word + window smallRect + maximumWindowSize coord +} + +type consoleCursorInfo struct { + size dword + visible int32 +} + +var ( + kernel32 = syscall.NewLazyDLL("kernel32.dll") + procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") + procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") + procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") + procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") + procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute") + procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo") + procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo") + procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW") + procGetConsoleMode = kernel32.NewProc("GetConsoleMode") + procSetConsoleMode = kernel32.NewProc("SetConsoleMode") + procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer") +) + +// Writer provides colorable Writer to the console +type Writer struct { + out io.Writer + handle syscall.Handle + althandle syscall.Handle + oldattr word + oldpos coord + rest bytes.Buffer + mutex sync.Mutex +} + +// NewColorable returns new instance of Writer which handles escape sequence from File. +func NewColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + if isatty.IsTerminal(file.Fd()) { + var mode uint32 + if r, _, _ := procGetConsoleMode.Call(file.Fd(), uintptr(unsafe.Pointer(&mode))); r != 0 && mode&cENABLE_VIRTUAL_TERMINAL_PROCESSING != 0 { + return file + } + var csbi consoleScreenBufferInfo + handle := syscall.Handle(file.Fd()) + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} + } + return file +} + +// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. +func NewColorableStdout() io.Writer { + return NewColorable(os.Stdout) +} + +// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. +func NewColorableStderr() io.Writer { + return NewColorable(os.Stderr) +} + +var color256 = map[int]int{ + 0: 0x000000, + 1: 0x800000, + 2: 0x008000, + 3: 0x808000, + 4: 0x000080, + 5: 0x800080, + 6: 0x008080, + 7: 0xc0c0c0, + 8: 0x808080, + 9: 0xff0000, + 10: 0x00ff00, + 11: 0xffff00, + 12: 0x0000ff, + 13: 0xff00ff, + 14: 0x00ffff, + 15: 0xffffff, + 16: 0x000000, + 17: 0x00005f, + 18: 0x000087, + 19: 0x0000af, + 20: 0x0000d7, + 21: 0x0000ff, + 22: 0x005f00, + 23: 0x005f5f, + 24: 0x005f87, + 25: 0x005faf, + 26: 0x005fd7, + 27: 0x005fff, + 28: 0x008700, + 29: 0x00875f, + 30: 0x008787, + 31: 0x0087af, + 32: 0x0087d7, + 33: 0x0087ff, + 34: 0x00af00, + 35: 0x00af5f, + 36: 0x00af87, + 37: 0x00afaf, + 38: 0x00afd7, + 39: 0x00afff, + 40: 0x00d700, + 41: 0x00d75f, + 42: 0x00d787, + 43: 0x00d7af, + 44: 0x00d7d7, + 45: 0x00d7ff, + 46: 0x00ff00, + 47: 0x00ff5f, + 48: 0x00ff87, + 49: 0x00ffaf, + 50: 0x00ffd7, + 51: 0x00ffff, + 52: 0x5f0000, + 53: 0x5f005f, + 54: 0x5f0087, + 55: 0x5f00af, + 56: 0x5f00d7, + 57: 0x5f00ff, + 58: 0x5f5f00, + 59: 0x5f5f5f, + 60: 0x5f5f87, + 61: 0x5f5faf, + 62: 0x5f5fd7, + 63: 0x5f5fff, + 64: 0x5f8700, + 65: 0x5f875f, + 66: 0x5f8787, + 67: 0x5f87af, + 68: 0x5f87d7, + 69: 0x5f87ff, + 70: 0x5faf00, + 71: 0x5faf5f, + 72: 0x5faf87, + 73: 0x5fafaf, + 74: 0x5fafd7, + 75: 0x5fafff, + 76: 0x5fd700, + 77: 0x5fd75f, + 78: 0x5fd787, + 79: 0x5fd7af, + 80: 0x5fd7d7, + 81: 0x5fd7ff, + 82: 0x5fff00, + 83: 0x5fff5f, + 84: 0x5fff87, + 85: 0x5fffaf, + 86: 0x5fffd7, + 87: 0x5fffff, + 88: 0x870000, + 89: 0x87005f, + 90: 0x870087, + 91: 0x8700af, + 92: 0x8700d7, + 93: 0x8700ff, + 94: 0x875f00, + 95: 0x875f5f, + 96: 0x875f87, + 97: 0x875faf, + 98: 0x875fd7, + 99: 0x875fff, + 100: 0x878700, + 101: 0x87875f, + 102: 0x878787, + 103: 0x8787af, + 104: 0x8787d7, + 105: 0x8787ff, + 106: 0x87af00, + 107: 0x87af5f, + 108: 0x87af87, + 109: 0x87afaf, + 110: 0x87afd7, + 111: 0x87afff, + 112: 0x87d700, + 113: 0x87d75f, + 114: 0x87d787, + 115: 0x87d7af, + 116: 0x87d7d7, + 117: 0x87d7ff, + 118: 0x87ff00, + 119: 0x87ff5f, + 120: 0x87ff87, + 121: 0x87ffaf, + 122: 0x87ffd7, + 123: 0x87ffff, + 124: 0xaf0000, + 125: 0xaf005f, + 126: 0xaf0087, + 127: 0xaf00af, + 128: 0xaf00d7, + 129: 0xaf00ff, + 130: 0xaf5f00, + 131: 0xaf5f5f, + 132: 0xaf5f87, + 133: 0xaf5faf, + 134: 0xaf5fd7, + 135: 0xaf5fff, + 136: 0xaf8700, + 137: 0xaf875f, + 138: 0xaf8787, + 139: 0xaf87af, + 140: 0xaf87d7, + 141: 0xaf87ff, + 142: 0xafaf00, + 143: 0xafaf5f, + 144: 0xafaf87, + 145: 0xafafaf, + 146: 0xafafd7, + 147: 0xafafff, + 148: 0xafd700, + 149: 0xafd75f, + 150: 0xafd787, + 151: 0xafd7af, + 152: 0xafd7d7, + 153: 0xafd7ff, + 154: 0xafff00, + 155: 0xafff5f, + 156: 0xafff87, + 157: 0xafffaf, + 158: 0xafffd7, + 159: 0xafffff, + 160: 0xd70000, + 161: 0xd7005f, + 162: 0xd70087, + 163: 0xd700af, + 164: 0xd700d7, + 165: 0xd700ff, + 166: 0xd75f00, + 167: 0xd75f5f, + 168: 0xd75f87, + 169: 0xd75faf, + 170: 0xd75fd7, + 171: 0xd75fff, + 172: 0xd78700, + 173: 0xd7875f, + 174: 0xd78787, + 175: 0xd787af, + 176: 0xd787d7, + 177: 0xd787ff, + 178: 0xd7af00, + 179: 0xd7af5f, + 180: 0xd7af87, + 181: 0xd7afaf, + 182: 0xd7afd7, + 183: 0xd7afff, + 184: 0xd7d700, + 185: 0xd7d75f, + 186: 0xd7d787, + 187: 0xd7d7af, + 188: 0xd7d7d7, + 189: 0xd7d7ff, + 190: 0xd7ff00, + 191: 0xd7ff5f, + 192: 0xd7ff87, + 193: 0xd7ffaf, + 194: 0xd7ffd7, + 195: 0xd7ffff, + 196: 0xff0000, + 197: 0xff005f, + 198: 0xff0087, + 199: 0xff00af, + 200: 0xff00d7, + 201: 0xff00ff, + 202: 0xff5f00, + 203: 0xff5f5f, + 204: 0xff5f87, + 205: 0xff5faf, + 206: 0xff5fd7, + 207: 0xff5fff, + 208: 0xff8700, + 209: 0xff875f, + 210: 0xff8787, + 211: 0xff87af, + 212: 0xff87d7, + 213: 0xff87ff, + 214: 0xffaf00, + 215: 0xffaf5f, + 216: 0xffaf87, + 217: 0xffafaf, + 218: 0xffafd7, + 219: 0xffafff, + 220: 0xffd700, + 221: 0xffd75f, + 222: 0xffd787, + 223: 0xffd7af, + 224: 0xffd7d7, + 225: 0xffd7ff, + 226: 0xffff00, + 227: 0xffff5f, + 228: 0xffff87, + 229: 0xffffaf, + 230: 0xffffd7, + 231: 0xffffff, + 232: 0x080808, + 233: 0x121212, + 234: 0x1c1c1c, + 235: 0x262626, + 236: 0x303030, + 237: 0x3a3a3a, + 238: 0x444444, + 239: 0x4e4e4e, + 240: 0x585858, + 241: 0x626262, + 242: 0x6c6c6c, + 243: 0x767676, + 244: 0x808080, + 245: 0x8a8a8a, + 246: 0x949494, + 247: 0x9e9e9e, + 248: 0xa8a8a8, + 249: 0xb2b2b2, + 250: 0xbcbcbc, + 251: 0xc6c6c6, + 252: 0xd0d0d0, + 253: 0xdadada, + 254: 0xe4e4e4, + 255: 0xeeeeee, +} + +// `\033]0;TITLESTR\007` +func doTitleSequence(er *bytes.Reader) error { + var c byte + var err error + + c, err = er.ReadByte() + if err != nil { + return err + } + if c != '0' && c != '2' { + return nil + } + c, err = er.ReadByte() + if err != nil { + return err + } + if c != ';' { + return nil + } + title := make([]byte, 0, 80) + for { + c, err = er.ReadByte() + if err != nil { + return err + } + if c == 0x07 || c == '\n' { + break + } + title = append(title, c) + } + if len(title) > 0 { + title8, err := syscall.UTF16PtrFromString(string(title)) + if err == nil { + procSetConsoleTitle.Call(uintptr(unsafe.Pointer(title8))) + } + } + return nil +} + +// returns Atoi(s) unless s == "" in which case it returns def +func atoiWithDefault(s string, def int) (int, error) { + if s == "" { + return def, nil + } + return strconv.Atoi(s) +} + +// Write writes data on console +func (w *Writer) Write(data []byte) (n int, err error) { + w.mutex.Lock() + defer w.mutex.Unlock() + var csbi consoleScreenBufferInfo + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + + handle := w.handle + + var er *bytes.Reader + if w.rest.Len() > 0 { + var rest bytes.Buffer + w.rest.WriteTo(&rest) + w.rest.Reset() + rest.Write(data) + er = bytes.NewReader(rest.Bytes()) + } else { + er = bytes.NewReader(data) + } + var plaintext bytes.Buffer +loop: + for { + c1, err := er.ReadByte() + if err != nil { + plaintext.WriteTo(w.out) + break loop + } + if c1 != 0x1b { + plaintext.WriteByte(c1) + continue + } + _, err = plaintext.WriteTo(w.out) + if err != nil { + break loop + } + c2, err := er.ReadByte() + if err != nil { + break loop + } + + switch c2 { + case '>': + continue + case ']': + w.rest.WriteByte(c1) + w.rest.WriteByte(c2) + er.WriteTo(&w.rest) + if bytes.IndexByte(w.rest.Bytes(), 0x07) == -1 { + break loop + } + er = bytes.NewReader(w.rest.Bytes()[2:]) + err := doTitleSequence(er) + if err != nil { + break loop + } + w.rest.Reset() + continue + // https://github.com/mattn/go-colorable/issues/27 + case '7': + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + w.oldpos = csbi.cursorPosition + continue + case '8': + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) + continue + case 0x5b: + // execute part after switch + default: + continue + } + + w.rest.WriteByte(c1) + w.rest.WriteByte(c2) + er.WriteTo(&w.rest) + + var buf bytes.Buffer + var m byte + for i, c := range w.rest.Bytes()[2:] { + if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { + m = c + er = bytes.NewReader(w.rest.Bytes()[2+i+1:]) + w.rest.Reset() + break + } + buf.Write([]byte(string(c))) + } + if m == 0 { + break loop + } + + switch m { + case 'A': + n, err = atoiWithDefault(buf.String(), 1) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.y -= short(n) + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'B': + n, err = atoiWithDefault(buf.String(), 1) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.y += short(n) + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'C': + n, err = atoiWithDefault(buf.String(), 1) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x += short(n) + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'D': + n, err = atoiWithDefault(buf.String(), 1) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x -= short(n) + if csbi.cursorPosition.x < 0 { + csbi.cursorPosition.x = 0 + } + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'E': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = 0 + csbi.cursorPosition.y += short(n) + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'F': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = 0 + csbi.cursorPosition.y -= short(n) + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'G': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + if n < 1 { + n = 1 + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = short(n - 1) + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'H', 'f': + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + if buf.Len() > 0 { + token := strings.Split(buf.String(), ";") + switch len(token) { + case 1: + n1, err := strconv.Atoi(token[0]) + if err != nil { + continue + } + csbi.cursorPosition.y = short(n1 - 1) + case 2: + n1, err := strconv.Atoi(token[0]) + if err != nil { + continue + } + n2, err := strconv.Atoi(token[1]) + if err != nil { + continue + } + csbi.cursorPosition.x = short(n2 - 1) + csbi.cursorPosition.y = short(n1 - 1) + } + } else { + csbi.cursorPosition.y = 0 + } + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'J': + n := 0 + if buf.Len() > 0 { + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + } + var count, written dword + var cursor coord + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + switch n { + case 0: + cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} + count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x) + case 1: + cursor = coord{x: csbi.window.left, y: csbi.window.top} + count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.window.top-csbi.cursorPosition.y)*dword(csbi.size.x) + case 2: + cursor = coord{x: csbi.window.left, y: csbi.window.top} + count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x) + } + procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'K': + n := 0 + if buf.Len() > 0 { + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + var cursor coord + var count, written dword + switch n { + case 0: + cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} + count = dword(csbi.size.x - csbi.cursorPosition.x) + case 1: + cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} + count = dword(csbi.size.x - csbi.cursorPosition.x) + case 2: + cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} + count = dword(csbi.size.x) + } + procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'X': + n := 0 + if buf.Len() > 0 { + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + } + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + var cursor coord + var written dword + cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} + procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'm': + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + attr := csbi.attributes + cs := buf.String() + if cs == "" { + procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(w.oldattr)) + continue + } + token := strings.Split(cs, ";") + for i := 0; i < len(token); i++ { + ns := token[i] + if n, err = strconv.Atoi(ns); err == nil { + switch { + case n == 0 || n == 100: + attr = w.oldattr + case n == 4: + attr |= commonLvbUnderscore + case (1 <= n && n <= 3) || n == 5: + attr |= foregroundIntensity + case n == 7 || n == 27: + attr = + (attr &^ (foregroundMask | backgroundMask)) | + ((attr & foregroundMask) << 4) | + ((attr & backgroundMask) >> 4) + case n == 22: + attr &^= foregroundIntensity + case n == 24: + attr &^= commonLvbUnderscore + case 30 <= n && n <= 37: + attr &= backgroundMask + if (n-30)&1 != 0 { + attr |= foregroundRed + } + if (n-30)&2 != 0 { + attr |= foregroundGreen + } + if (n-30)&4 != 0 { + attr |= foregroundBlue + } + case n == 38: // set foreground color. + if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") { + if n256, err := strconv.Atoi(token[i+2]); err == nil { + if n256foreAttr == nil { + n256setup() + } + attr &= backgroundMask + attr |= n256foreAttr[n256%len(n256foreAttr)] + i += 2 + } + } else if len(token) == 5 && token[i+1] == "2" { + var r, g, b int + r, _ = strconv.Atoi(token[i+2]) + g, _ = strconv.Atoi(token[i+3]) + b, _ = strconv.Atoi(token[i+4]) + i += 4 + if r > 127 { + attr |= foregroundRed + } + if g > 127 { + attr |= foregroundGreen + } + if b > 127 { + attr |= foregroundBlue + } + } else { + attr = attr & (w.oldattr & backgroundMask) + } + case n == 39: // reset foreground color. + attr &= backgroundMask + attr |= w.oldattr & foregroundMask + case 40 <= n && n <= 47: + attr &= foregroundMask + if (n-40)&1 != 0 { + attr |= backgroundRed + } + if (n-40)&2 != 0 { + attr |= backgroundGreen + } + if (n-40)&4 != 0 { + attr |= backgroundBlue + } + case n == 48: // set background color. + if i < len(token)-2 && token[i+1] == "5" { + if n256, err := strconv.Atoi(token[i+2]); err == nil { + if n256backAttr == nil { + n256setup() + } + attr &= foregroundMask + attr |= n256backAttr[n256%len(n256backAttr)] + i += 2 + } + } else if len(token) == 5 && token[i+1] == "2" { + var r, g, b int + r, _ = strconv.Atoi(token[i+2]) + g, _ = strconv.Atoi(token[i+3]) + b, _ = strconv.Atoi(token[i+4]) + i += 4 + if r > 127 { + attr |= backgroundRed + } + if g > 127 { + attr |= backgroundGreen + } + if b > 127 { + attr |= backgroundBlue + } + } else { + attr = attr & (w.oldattr & foregroundMask) + } + case n == 49: // reset foreground color. + attr &= foregroundMask + attr |= w.oldattr & backgroundMask + case 90 <= n && n <= 97: + attr = (attr & backgroundMask) + attr |= foregroundIntensity + if (n-90)&1 != 0 { + attr |= foregroundRed + } + if (n-90)&2 != 0 { + attr |= foregroundGreen + } + if (n-90)&4 != 0 { + attr |= foregroundBlue + } + case 100 <= n && n <= 107: + attr = (attr & foregroundMask) + attr |= backgroundIntensity + if (n-100)&1 != 0 { + attr |= backgroundRed + } + if (n-100)&2 != 0 { + attr |= backgroundGreen + } + if (n-100)&4 != 0 { + attr |= backgroundBlue + } + } + procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr)) + } + } + case 'h': + var ci consoleCursorInfo + cs := buf.String() + if cs == "5>" { + procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 0 + procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + } else if cs == "?25" { + procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 1 + procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + } else if cs == "?1049" { + if w.althandle == 0 { + h, _, _ := procCreateConsoleScreenBuffer.Call(uintptr(genericRead|genericWrite), 0, 0, uintptr(consoleTextmodeBuffer), 0, 0) + w.althandle = syscall.Handle(h) + if w.althandle != 0 { + handle = w.althandle + } + } + } + case 'l': + var ci consoleCursorInfo + cs := buf.String() + if cs == "5>" { + procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 1 + procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + } else if cs == "?25" { + procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 0 + procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) + } else if cs == "?1049" { + if w.althandle != 0 { + syscall.CloseHandle(w.althandle) + w.althandle = 0 + handle = w.handle + } + } + case 's': + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + w.oldpos = csbi.cursorPosition + case 'u': + procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) + } + } + + return len(data), nil +} + +type consoleColor struct { + rgb int + red bool + green bool + blue bool + intensity bool +} + +func (c consoleColor) foregroundAttr() (attr word) { + if c.red { + attr |= foregroundRed + } + if c.green { + attr |= foregroundGreen + } + if c.blue { + attr |= foregroundBlue + } + if c.intensity { + attr |= foregroundIntensity + } + return +} + +func (c consoleColor) backgroundAttr() (attr word) { + if c.red { + attr |= backgroundRed + } + if c.green { + attr |= backgroundGreen + } + if c.blue { + attr |= backgroundBlue + } + if c.intensity { + attr |= backgroundIntensity + } + return +} + +var color16 = []consoleColor{ + {0x000000, false, false, false, false}, + {0x000080, false, false, true, false}, + {0x008000, false, true, false, false}, + {0x008080, false, true, true, false}, + {0x800000, true, false, false, false}, + {0x800080, true, false, true, false}, + {0x808000, true, true, false, false}, + {0xc0c0c0, true, true, true, false}, + {0x808080, false, false, false, true}, + {0x0000ff, false, false, true, true}, + {0x00ff00, false, true, false, true}, + {0x00ffff, false, true, true, true}, + {0xff0000, true, false, false, true}, + {0xff00ff, true, false, true, true}, + {0xffff00, true, true, false, true}, + {0xffffff, true, true, true, true}, +} + +type hsv struct { + h, s, v float32 +} + +func (a hsv) dist(b hsv) float32 { + dh := a.h - b.h + switch { + case dh > 0.5: + dh = 1 - dh + case dh < -0.5: + dh = -1 - dh + } + ds := a.s - b.s + dv := a.v - b.v + return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv))) +} + +func toHSV(rgb int) hsv { + r, g, b := float32((rgb&0xFF0000)>>16)/256.0, + float32((rgb&0x00FF00)>>8)/256.0, + float32(rgb&0x0000FF)/256.0 + min, max := minmax3f(r, g, b) + h := max - min + if h > 0 { + if max == r { + h = (g - b) / h + if h < 0 { + h += 6 + } + } else if max == g { + h = 2 + (b-r)/h + } else { + h = 4 + (r-g)/h + } + } + h /= 6.0 + s := max - min + if max != 0 { + s /= max + } + v := max + return hsv{h: h, s: s, v: v} +} + +type hsvTable []hsv + +func toHSVTable(rgbTable []consoleColor) hsvTable { + t := make(hsvTable, len(rgbTable)) + for i, c := range rgbTable { + t[i] = toHSV(c.rgb) + } + return t +} + +func (t hsvTable) find(rgb int) consoleColor { + hsv := toHSV(rgb) + n := 7 + l := float32(5.0) + for i, p := range t { + d := hsv.dist(p) + if d < l { + l, n = d, i + } + } + return color16[n] +} + +func minmax3f(a, b, c float32) (min, max float32) { + if a < b { + if b < c { + return a, c + } else if a < c { + return a, b + } else { + return c, b + } + } else { + if a < c { + return b, c + } else if b < c { + return b, a + } else { + return c, a + } + } +} + +var n256foreAttr []word +var n256backAttr []word + +func n256setup() { + n256foreAttr = make([]word, 256) + n256backAttr = make([]word, 256) + t := toHSVTable(color16) + for i, rgb := range color256 { + c := t.find(rgb) + n256foreAttr[i] = c.foregroundAttr() + n256backAttr[i] = c.backgroundAttr() + } +} + +// EnableColorsStdout enable colors if possible. +func EnableColorsStdout(enabled *bool) func() { + var mode uint32 + h := os.Stdout.Fd() + if r, _, _ := procGetConsoleMode.Call(h, uintptr(unsafe.Pointer(&mode))); r != 0 { + if r, _, _ = procSetConsoleMode.Call(h, uintptr(mode|cENABLE_VIRTUAL_TERMINAL_PROCESSING)); r != 0 { + if enabled != nil { + *enabled = true + } + return func() { + procSetConsoleMode.Call(h, uintptr(mode)) + } + } + } + if enabled != nil { + *enabled = true + } + return func() {} +} diff --git a/vendor/github.com/mattn/go-colorable/go.test.sh b/vendor/github.com/mattn/go-colorable/go.test.sh new file mode 100644 index 000000000..012162b07 --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/go.test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go new file mode 100644 index 000000000..05d6f74bf --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/noncolorable.go @@ -0,0 +1,57 @@ +package colorable + +import ( + "bytes" + "io" +) + +// NonColorable holds writer but removes escape sequence. +type NonColorable struct { + out io.Writer +} + +// NewNonColorable returns new instance of Writer which removes escape sequence from Writer. +func NewNonColorable(w io.Writer) io.Writer { + return &NonColorable{out: w} +} + +// Write writes data on console +func (w *NonColorable) Write(data []byte) (n int, err error) { + er := bytes.NewReader(data) + var plaintext bytes.Buffer +loop: + for { + c1, err := er.ReadByte() + if err != nil { + plaintext.WriteTo(w.out) + break loop + } + if c1 != 0x1b { + plaintext.WriteByte(c1) + continue + } + _, err = plaintext.WriteTo(w.out) + if err != nil { + break loop + } + c2, err := er.ReadByte() + if err != nil { + break loop + } + if c2 != 0x5b { + continue + } + + for { + c, err := er.ReadByte() + if err != nil { + break loop + } + if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { + break + } + } + } + + return len(data), nil +} diff --git a/vendor/github.com/mattn/go-isatty/LICENSE b/vendor/github.com/mattn/go-isatty/LICENSE new file mode 100644 index 000000000..65dc692b6 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) Yasuhiro MATSUMOTO + +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/mattn/go-isatty/README.md b/vendor/github.com/mattn/go-isatty/README.md new file mode 100644 index 000000000..38418353e --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/README.md @@ -0,0 +1,50 @@ +# go-isatty + +[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) +[![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty) +[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) +[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) + +isatty for golang + +## Usage + +```go +package main + +import ( + "fmt" + "github.com/mattn/go-isatty" + "os" +) + +func main() { + if isatty.IsTerminal(os.Stdout.Fd()) { + fmt.Println("Is Terminal") + } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { + fmt.Println("Is Cygwin/MSYS2 Terminal") + } else { + fmt.Println("Is Not Terminal") + } +} +``` + +## Installation + +``` +$ go get github.com/mattn/go-isatty +``` + +## License + +MIT + +## Author + +Yasuhiro Matsumoto (a.k.a mattn) + +## Thanks + +* k-takata: base idea for IsCygwinTerminal + + https://github.com/k-takata/go-iscygpty diff --git a/vendor/github.com/mattn/go-isatty/doc.go b/vendor/github.com/mattn/go-isatty/doc.go new file mode 100644 index 000000000..17d4f90eb --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/doc.go @@ -0,0 +1,2 @@ +// Package isatty implements interface to isatty +package isatty diff --git a/vendor/github.com/mattn/go-isatty/go.test.sh b/vendor/github.com/mattn/go-isatty/go.test.sh new file mode 100644 index 000000000..012162b07 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/go.test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go new file mode 100644 index 000000000..d569c0c94 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go @@ -0,0 +1,19 @@ +//go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine +// +build darwin freebsd openbsd netbsd dragonfly hurd +// +build !appengine + +package isatty + +import "golang.org/x/sys/unix" + +// IsTerminal return true if the file descriptor is terminal. +func IsTerminal(fd uintptr) bool { + _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) + return err == nil +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go new file mode 100644 index 000000000..31503226f --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_others.go @@ -0,0 +1,16 @@ +//go:build appengine || js || nacl || wasm +// +build appengine js nacl wasm + +package isatty + +// IsTerminal returns true if the file descriptor is terminal which +// is always false on js and appengine classic which is a sandboxed PaaS. +func IsTerminal(fd uintptr) bool { + return false +} + +// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_plan9.go b/vendor/github.com/mattn/go-isatty/isatty_plan9.go new file mode 100644 index 000000000..bae7f9bb3 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_plan9.go @@ -0,0 +1,23 @@ +//go:build plan9 +// +build plan9 + +package isatty + +import ( + "syscall" +) + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + path, err := syscall.Fd2path(int(fd)) + if err != nil { + return false + } + return path == "/dev/cons" || path == "/mnt/term/dev/cons" +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/mattn/go-isatty/isatty_solaris.go new file mode 100644 index 000000000..0c3acf2dc --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_solaris.go @@ -0,0 +1,21 @@ +//go:build solaris && !appengine +// +build solaris,!appengine + +package isatty + +import ( + "golang.org/x/sys/unix" +) + +// IsTerminal returns true if the given file descriptor is a terminal. +// see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c +func IsTerminal(fd uintptr) bool { + _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) + return err == nil +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go new file mode 100644 index 000000000..67787657f --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go @@ -0,0 +1,19 @@ +//go:build (linux || aix || zos) && !appengine +// +build linux aix zos +// +build !appengine + +package isatty + +import "golang.org/x/sys/unix" + +// IsTerminal return true if the file descriptor is terminal. +func IsTerminal(fd uintptr) bool { + _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) + return err == nil +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go new file mode 100644 index 000000000..8e3c99171 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go @@ -0,0 +1,125 @@ +//go:build windows && !appengine +// +build windows,!appengine + +package isatty + +import ( + "errors" + "strings" + "syscall" + "unicode/utf16" + "unsafe" +) + +const ( + objectNameInfo uintptr = 1 + fileNameInfo = 2 + fileTypePipe = 3 +) + +var ( + kernel32 = syscall.NewLazyDLL("kernel32.dll") + ntdll = syscall.NewLazyDLL("ntdll.dll") + procGetConsoleMode = kernel32.NewProc("GetConsoleMode") + procGetFileInformationByHandleEx = kernel32.NewProc("GetFileInformationByHandleEx") + procGetFileType = kernel32.NewProc("GetFileType") + procNtQueryObject = ntdll.NewProc("NtQueryObject") +) + +func init() { + // Check if GetFileInformationByHandleEx is available. + if procGetFileInformationByHandleEx.Find() != nil { + procGetFileInformationByHandleEx = nil + } +} + +// IsTerminal return true if the file descriptor is terminal. +func IsTerminal(fd uintptr) bool { + var st uint32 + r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) + return r != 0 && e == 0 +} + +// Check pipe name is used for cygwin/msys2 pty. +// Cygwin/MSYS2 PTY has a name like: +// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master +func isCygwinPipeName(name string) bool { + token := strings.Split(name, "-") + if len(token) < 5 { + return false + } + + if token[0] != `\msys` && + token[0] != `\cygwin` && + token[0] != `\Device\NamedPipe\msys` && + token[0] != `\Device\NamedPipe\cygwin` { + return false + } + + if token[1] == "" { + return false + } + + if !strings.HasPrefix(token[2], "pty") { + return false + } + + if token[3] != `from` && token[3] != `to` { + return false + } + + if token[4] != "master" { + return false + } + + return true +} + +// getFileNameByHandle use the undocomented ntdll NtQueryObject to get file full name from file handler +// since GetFileInformationByHandleEx is not available under windows Vista and still some old fashion +// guys are using Windows XP, this is a workaround for those guys, it will also work on system from +// Windows vista to 10 +// see https://stackoverflow.com/a/18792477 for details +func getFileNameByHandle(fd uintptr) (string, error) { + if procNtQueryObject == nil { + return "", errors.New("ntdll.dll: NtQueryObject not supported") + } + + var buf [4 + syscall.MAX_PATH]uint16 + var result int + r, _, e := syscall.Syscall6(procNtQueryObject.Addr(), 5, + fd, objectNameInfo, uintptr(unsafe.Pointer(&buf)), uintptr(2*len(buf)), uintptr(unsafe.Pointer(&result)), 0) + if r != 0 { + return "", e + } + return string(utf16.Decode(buf[4 : 4+buf[0]/2])), nil +} + +// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 +// terminal. +func IsCygwinTerminal(fd uintptr) bool { + if procGetFileInformationByHandleEx == nil { + name, err := getFileNameByHandle(fd) + if err != nil { + return false + } + return isCygwinPipeName(name) + } + + // Cygwin/msys's pty is a pipe. + ft, _, e := syscall.Syscall(procGetFileType.Addr(), 1, fd, 0, 0) + if ft != fileTypePipe || e != 0 { + return false + } + + var buf [2 + syscall.MAX_PATH]uint16 + r, _, e := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), + 4, fd, fileNameInfo, uintptr(unsafe.Pointer(&buf)), + uintptr(len(buf)*2), 0, 0) + if r == 0 || e != 0 { + return false + } + + l := *(*uint32)(unsafe.Pointer(&buf)) + return isCygwinPipeName(string(utf16.Decode(buf[2 : 2+l/2]))) +} diff --git a/vendor/github.com/mattn/go-runewidth/.travis.yml b/vendor/github.com/mattn/go-runewidth/.travis.yml new file mode 100644 index 000000000..6a21813a3 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/.travis.yml @@ -0,0 +1,16 @@ +language: go +sudo: false +go: + - 1.13.x + - tip + +before_install: + - go get -t -v ./... + +script: + - go generate + - git diff --cached --exit-code + - ./go.test.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/mattn/go-runewidth/LICENSE b/vendor/github.com/mattn/go-runewidth/LICENSE new file mode 100644 index 000000000..91b5cef30 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/mattn/go-runewidth/README.md b/vendor/github.com/mattn/go-runewidth/README.md new file mode 100644 index 000000000..aa56ab96c --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/README.md @@ -0,0 +1,27 @@ +go-runewidth +============ + +[![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) +[![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth) +[![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) +[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) + +Provides functions to get fixed width of the character or string. + +Usage +----- + +```go +runewidth.StringWidth("つのだ☆HIRO") == 12 +``` + + +Author +------ + +Yasuhiro Matsumoto + +License +------- + +under the MIT License: http://mattn.mit-license.org/2013 diff --git a/vendor/github.com/mattn/go-runewidth/go.test.sh b/vendor/github.com/mattn/go-runewidth/go.test.sh new file mode 100644 index 000000000..012162b07 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/go.test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done diff --git a/vendor/github.com/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go new file mode 100644 index 000000000..19f8e0449 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth.go @@ -0,0 +1,257 @@ +package runewidth + +import ( + "os" +) + +//go:generate go run script/generate.go + +var ( + // EastAsianWidth will be set true if the current locale is CJK + EastAsianWidth bool + + // ZeroWidthJoiner is flag to set to use UTR#51 ZWJ + ZeroWidthJoiner bool + + // DefaultCondition is a condition in current locale + DefaultCondition = &Condition{} +) + +func init() { + handleEnv() +} + +func handleEnv() { + env := os.Getenv("RUNEWIDTH_EASTASIAN") + if env == "" { + EastAsianWidth = IsEastAsian() + } else { + EastAsianWidth = env == "1" + } + // update DefaultCondition + DefaultCondition.EastAsianWidth = EastAsianWidth + DefaultCondition.ZeroWidthJoiner = ZeroWidthJoiner +} + +type interval struct { + first rune + last rune +} + +type table []interval + +func inTables(r rune, ts ...table) bool { + for _, t := range ts { + if inTable(r, t) { + return true + } + } + return false +} + +func inTable(r rune, t table) bool { + if r < t[0].first { + return false + } + + bot := 0 + top := len(t) - 1 + for top >= bot { + mid := (bot + top) >> 1 + + switch { + case t[mid].last < r: + bot = mid + 1 + case t[mid].first > r: + top = mid - 1 + default: + return true + } + } + + return false +} + +var private = table{ + {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD}, +} + +var nonprint = table{ + {0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD}, + {0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F}, + {0x2028, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF}, + {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF}, +} + +// Condition have flag EastAsianWidth whether the current locale is CJK or not. +type Condition struct { + EastAsianWidth bool + ZeroWidthJoiner bool +} + +// NewCondition return new instance of Condition which is current locale. +func NewCondition() *Condition { + return &Condition{ + EastAsianWidth: EastAsianWidth, + ZeroWidthJoiner: ZeroWidthJoiner, + } +} + +// RuneWidth returns the number of cells in r. +// See http://www.unicode.org/reports/tr11/ +func (c *Condition) RuneWidth(r rune) int { + switch { + case r < 0 || r > 0x10FFFF || inTables(r, nonprint, combining, notassigned): + return 0 + case (c.EastAsianWidth && IsAmbiguousWidth(r)) || inTables(r, doublewidth): + return 2 + default: + return 1 + } +} + +func (c *Condition) stringWidth(s string) (width int) { + for _, r := range []rune(s) { + width += c.RuneWidth(r) + } + return width +} + +func (c *Condition) stringWidthZeroJoiner(s string) (width int) { + r1, r2 := rune(0), rune(0) + for _, r := range []rune(s) { + if r == 0xFE0E || r == 0xFE0F { + continue + } + w := c.RuneWidth(r) + if r2 == 0x200D && inTables(r, emoji) && inTables(r1, emoji) { + if width < w { + width = w + } + } else { + width += w + } + r1, r2 = r2, r + } + return width +} + +// StringWidth return width as you can see +func (c *Condition) StringWidth(s string) (width int) { + if c.ZeroWidthJoiner { + return c.stringWidthZeroJoiner(s) + } + return c.stringWidth(s) +} + +// Truncate return string truncated with w cells +func (c *Condition) Truncate(s string, w int, tail string) string { + if c.StringWidth(s) <= w { + return s + } + r := []rune(s) + tw := c.StringWidth(tail) + w -= tw + width := 0 + i := 0 + for ; i < len(r); i++ { + cw := c.RuneWidth(r[i]) + if width+cw > w { + break + } + width += cw + } + return string(r[0:i]) + tail +} + +// Wrap return string wrapped with w cells +func (c *Condition) Wrap(s string, w int) string { + width := 0 + out := "" + for _, r := range []rune(s) { + cw := RuneWidth(r) + if r == '\n' { + out += string(r) + width = 0 + continue + } else if width+cw > w { + out += "\n" + width = 0 + out += string(r) + width += cw + continue + } + out += string(r) + width += cw + } + return out +} + +// FillLeft return string filled in left by spaces in w cells +func (c *Condition) FillLeft(s string, w int) string { + width := c.StringWidth(s) + count := w - width + if count > 0 { + b := make([]byte, count) + for i := range b { + b[i] = ' ' + } + return string(b) + s + } + return s +} + +// FillRight return string filled in left by spaces in w cells +func (c *Condition) FillRight(s string, w int) string { + width := c.StringWidth(s) + count := w - width + if count > 0 { + b := make([]byte, count) + for i := range b { + b[i] = ' ' + } + return s + string(b) + } + return s +} + +// RuneWidth returns the number of cells in r. +// See http://www.unicode.org/reports/tr11/ +func RuneWidth(r rune) int { + return DefaultCondition.RuneWidth(r) +} + +// IsAmbiguousWidth returns whether is ambiguous width or not. +func IsAmbiguousWidth(r rune) bool { + return inTables(r, private, ambiguous) +} + +// IsNeutralWidth returns whether is neutral width or not. +func IsNeutralWidth(r rune) bool { + return inTable(r, neutral) +} + +// StringWidth return width as you can see +func StringWidth(s string) (width int) { + return DefaultCondition.StringWidth(s) +} + +// Truncate return string truncated with w cells +func Truncate(s string, w int, tail string) string { + return DefaultCondition.Truncate(s, w, tail) +} + +// Wrap return string wrapped with w cells +func Wrap(s string, w int) string { + return DefaultCondition.Wrap(s, w) +} + +// FillLeft return string filled in left by spaces in w cells +func FillLeft(s string, w int) string { + return DefaultCondition.FillLeft(s, w) +} + +// FillRight return string filled in left by spaces in w cells +func FillRight(s string, w int) string { + return DefaultCondition.FillRight(s, w) +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go b/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go new file mode 100644 index 000000000..7d99f6e52 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go @@ -0,0 +1,8 @@ +// +build appengine + +package runewidth + +// IsEastAsian return true if the current locale is CJK +func IsEastAsian() bool { + return false +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_js.go b/vendor/github.com/mattn/go-runewidth/runewidth_js.go new file mode 100644 index 000000000..c5fdf40ba --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_js.go @@ -0,0 +1,9 @@ +// +build js +// +build !appengine + +package runewidth + +func IsEastAsian() bool { + // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. + return false +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_posix.go b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go new file mode 100644 index 000000000..480ad7485 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go @@ -0,0 +1,82 @@ +// +build !windows +// +build !js +// +build !appengine + +package runewidth + +import ( + "os" + "regexp" + "strings" +) + +var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`) + +var mblenTable = map[string]int{ + "utf-8": 6, + "utf8": 6, + "jis": 8, + "eucjp": 3, + "euckr": 2, + "euccn": 2, + "sjis": 2, + "cp932": 2, + "cp51932": 2, + "cp936": 2, + "cp949": 2, + "cp950": 2, + "big5": 2, + "gbk": 2, + "gb2312": 2, +} + +func isEastAsian(locale string) bool { + charset := strings.ToLower(locale) + r := reLoc.FindStringSubmatch(locale) + if len(r) == 2 { + charset = strings.ToLower(r[1]) + } + + if strings.HasSuffix(charset, "@cjk_narrow") { + return false + } + + for pos, b := range []byte(charset) { + if b == '@' { + charset = charset[:pos] + break + } + } + max := 1 + if m, ok := mblenTable[charset]; ok { + max = m + } + if max > 1 && (charset[0] != 'u' || + strings.HasPrefix(locale, "ja") || + strings.HasPrefix(locale, "ko") || + strings.HasPrefix(locale, "zh")) { + return true + } + return false +} + +// IsEastAsian return true if the current locale is CJK +func IsEastAsian() bool { + locale := os.Getenv("LC_ALL") + if locale == "" { + locale = os.Getenv("LC_CTYPE") + } + if locale == "" { + locale = os.Getenv("LANG") + } + + // ignore C locale + if locale == "POSIX" || locale == "C" { + return false + } + if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') { + return false + } + + return isEastAsian(locale) +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_table.go b/vendor/github.com/mattn/go-runewidth/runewidth_table.go new file mode 100644 index 000000000..b27d77d89 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_table.go @@ -0,0 +1,437 @@ +// Code generated by script/generate.go. DO NOT EDIT. + +package runewidth + +var combining = table{ + {0x0300, 0x036F}, {0x0483, 0x0489}, {0x07EB, 0x07F3}, + {0x0C00, 0x0C00}, {0x0C04, 0x0C04}, {0x0D00, 0x0D01}, + {0x135D, 0x135F}, {0x1A7F, 0x1A7F}, {0x1AB0, 0x1AC0}, + {0x1B6B, 0x1B73}, {0x1DC0, 0x1DF9}, {0x1DFB, 0x1DFF}, + {0x20D0, 0x20F0}, {0x2CEF, 0x2CF1}, {0x2DE0, 0x2DFF}, + {0x3099, 0x309A}, {0xA66F, 0xA672}, {0xA674, 0xA67D}, + {0xA69E, 0xA69F}, {0xA6F0, 0xA6F1}, {0xA8E0, 0xA8F1}, + {0xFE20, 0xFE2F}, {0x101FD, 0x101FD}, {0x10376, 0x1037A}, + {0x10EAB, 0x10EAC}, {0x10F46, 0x10F50}, {0x11300, 0x11301}, + {0x1133B, 0x1133C}, {0x11366, 0x1136C}, {0x11370, 0x11374}, + {0x16AF0, 0x16AF4}, {0x1D165, 0x1D169}, {0x1D16D, 0x1D172}, + {0x1D17B, 0x1D182}, {0x1D185, 0x1D18B}, {0x1D1AA, 0x1D1AD}, + {0x1D242, 0x1D244}, {0x1E000, 0x1E006}, {0x1E008, 0x1E018}, + {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, + {0x1E8D0, 0x1E8D6}, +} + +var doublewidth = table{ + {0x1100, 0x115F}, {0x231A, 0x231B}, {0x2329, 0x232A}, + {0x23E9, 0x23EC}, {0x23F0, 0x23F0}, {0x23F3, 0x23F3}, + {0x25FD, 0x25FE}, {0x2614, 0x2615}, {0x2648, 0x2653}, + {0x267F, 0x267F}, {0x2693, 0x2693}, {0x26A1, 0x26A1}, + {0x26AA, 0x26AB}, {0x26BD, 0x26BE}, {0x26C4, 0x26C5}, + {0x26CE, 0x26CE}, {0x26D4, 0x26D4}, {0x26EA, 0x26EA}, + {0x26F2, 0x26F3}, {0x26F5, 0x26F5}, {0x26FA, 0x26FA}, + {0x26FD, 0x26FD}, {0x2705, 0x2705}, {0x270A, 0x270B}, + {0x2728, 0x2728}, {0x274C, 0x274C}, {0x274E, 0x274E}, + {0x2753, 0x2755}, {0x2757, 0x2757}, {0x2795, 0x2797}, + {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, {0x2B1B, 0x2B1C}, + {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x2E80, 0x2E99}, + {0x2E9B, 0x2EF3}, {0x2F00, 0x2FD5}, {0x2FF0, 0x2FFB}, + {0x3000, 0x303E}, {0x3041, 0x3096}, {0x3099, 0x30FF}, + {0x3105, 0x312F}, {0x3131, 0x318E}, {0x3190, 0x31E3}, + {0x31F0, 0x321E}, {0x3220, 0x3247}, {0x3250, 0x4DBF}, + {0x4E00, 0xA48C}, {0xA490, 0xA4C6}, {0xA960, 0xA97C}, + {0xAC00, 0xD7A3}, {0xF900, 0xFAFF}, {0xFE10, 0xFE19}, + {0xFE30, 0xFE52}, {0xFE54, 0xFE66}, {0xFE68, 0xFE6B}, + {0xFF01, 0xFF60}, {0xFFE0, 0xFFE6}, {0x16FE0, 0x16FE4}, + {0x16FF0, 0x16FF1}, {0x17000, 0x187F7}, {0x18800, 0x18CD5}, + {0x18D00, 0x18D08}, {0x1B000, 0x1B11E}, {0x1B150, 0x1B152}, + {0x1B164, 0x1B167}, {0x1B170, 0x1B2FB}, {0x1F004, 0x1F004}, + {0x1F0CF, 0x1F0CF}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A}, + {0x1F200, 0x1F202}, {0x1F210, 0x1F23B}, {0x1F240, 0x1F248}, + {0x1F250, 0x1F251}, {0x1F260, 0x1F265}, {0x1F300, 0x1F320}, + {0x1F32D, 0x1F335}, {0x1F337, 0x1F37C}, {0x1F37E, 0x1F393}, + {0x1F3A0, 0x1F3CA}, {0x1F3CF, 0x1F3D3}, {0x1F3E0, 0x1F3F0}, + {0x1F3F4, 0x1F3F4}, {0x1F3F8, 0x1F43E}, {0x1F440, 0x1F440}, + {0x1F442, 0x1F4FC}, {0x1F4FF, 0x1F53D}, {0x1F54B, 0x1F54E}, + {0x1F550, 0x1F567}, {0x1F57A, 0x1F57A}, {0x1F595, 0x1F596}, + {0x1F5A4, 0x1F5A4}, {0x1F5FB, 0x1F64F}, {0x1F680, 0x1F6C5}, + {0x1F6CC, 0x1F6CC}, {0x1F6D0, 0x1F6D2}, {0x1F6D5, 0x1F6D7}, + {0x1F6EB, 0x1F6EC}, {0x1F6F4, 0x1F6FC}, {0x1F7E0, 0x1F7EB}, + {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1F978}, + {0x1F97A, 0x1F9CB}, {0x1F9CD, 0x1F9FF}, {0x1FA70, 0x1FA74}, + {0x1FA78, 0x1FA7A}, {0x1FA80, 0x1FA86}, {0x1FA90, 0x1FAA8}, + {0x1FAB0, 0x1FAB6}, {0x1FAC0, 0x1FAC2}, {0x1FAD0, 0x1FAD6}, + {0x20000, 0x2FFFD}, {0x30000, 0x3FFFD}, +} + +var ambiguous = table{ + {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8}, + {0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4}, + {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6}, + {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1}, + {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED}, + {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA}, + {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101}, + {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B}, + {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133}, + {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144}, + {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153}, + {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE}, + {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4}, + {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA}, + {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261}, + {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB}, + {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB}, + {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F}, + {0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, + {0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F}, + {0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016}, + {0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022}, + {0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033}, + {0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E}, + {0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084}, + {0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105}, + {0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116}, + {0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B}, + {0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B}, + {0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199}, + {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4}, + {0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203}, + {0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F}, + {0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A}, + {0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225}, + {0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237}, + {0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C}, + {0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267}, + {0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283}, + {0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299}, + {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312}, + {0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573}, + {0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1}, + {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7}, + {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8}, + {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5}, + {0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609}, + {0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E}, + {0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661}, + {0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D}, + {0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF}, + {0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1}, + {0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1}, + {0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC}, + {0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F}, + {0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF}, + {0xFE00, 0xFE0F}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A}, + {0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D}, + {0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xE0100, 0xE01EF}, + {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD}, +} +var notassigned = table{ + {0x27E6, 0x27ED}, {0x2985, 0x2986}, +} + +var neutral = table{ + {0x0000, 0x001F}, {0x007F, 0x00A0}, {0x00A9, 0x00A9}, + {0x00AB, 0x00AB}, {0x00B5, 0x00B5}, {0x00BB, 0x00BB}, + {0x00C0, 0x00C5}, {0x00C7, 0x00CF}, {0x00D1, 0x00D6}, + {0x00D9, 0x00DD}, {0x00E2, 0x00E5}, {0x00E7, 0x00E7}, + {0x00EB, 0x00EB}, {0x00EE, 0x00EF}, {0x00F1, 0x00F1}, + {0x00F4, 0x00F6}, {0x00FB, 0x00FB}, {0x00FD, 0x00FD}, + {0x00FF, 0x0100}, {0x0102, 0x0110}, {0x0112, 0x0112}, + {0x0114, 0x011A}, {0x011C, 0x0125}, {0x0128, 0x012A}, + {0x012C, 0x0130}, {0x0134, 0x0137}, {0x0139, 0x013E}, + {0x0143, 0x0143}, {0x0145, 0x0147}, {0x014C, 0x014C}, + {0x014E, 0x0151}, {0x0154, 0x0165}, {0x0168, 0x016A}, + {0x016C, 0x01CD}, {0x01CF, 0x01CF}, {0x01D1, 0x01D1}, + {0x01D3, 0x01D3}, {0x01D5, 0x01D5}, {0x01D7, 0x01D7}, + {0x01D9, 0x01D9}, {0x01DB, 0x01DB}, {0x01DD, 0x0250}, + {0x0252, 0x0260}, {0x0262, 0x02C3}, {0x02C5, 0x02C6}, + {0x02C8, 0x02C8}, {0x02CC, 0x02CC}, {0x02CE, 0x02CF}, + {0x02D1, 0x02D7}, {0x02DC, 0x02DC}, {0x02DE, 0x02DE}, + {0x02E0, 0x02FF}, {0x0370, 0x0377}, {0x037A, 0x037F}, + {0x0384, 0x038A}, {0x038C, 0x038C}, {0x038E, 0x0390}, + {0x03AA, 0x03B0}, {0x03C2, 0x03C2}, {0x03CA, 0x0400}, + {0x0402, 0x040F}, {0x0450, 0x0450}, {0x0452, 0x052F}, + {0x0531, 0x0556}, {0x0559, 0x058A}, {0x058D, 0x058F}, + {0x0591, 0x05C7}, {0x05D0, 0x05EA}, {0x05EF, 0x05F4}, + {0x0600, 0x061C}, {0x061E, 0x070D}, {0x070F, 0x074A}, + {0x074D, 0x07B1}, {0x07C0, 0x07FA}, {0x07FD, 0x082D}, + {0x0830, 0x083E}, {0x0840, 0x085B}, {0x085E, 0x085E}, + {0x0860, 0x086A}, {0x08A0, 0x08B4}, {0x08B6, 0x08C7}, + {0x08D3, 0x0983}, {0x0985, 0x098C}, {0x098F, 0x0990}, + {0x0993, 0x09A8}, {0x09AA, 0x09B0}, {0x09B2, 0x09B2}, + {0x09B6, 0x09B9}, {0x09BC, 0x09C4}, {0x09C7, 0x09C8}, + {0x09CB, 0x09CE}, {0x09D7, 0x09D7}, {0x09DC, 0x09DD}, + {0x09DF, 0x09E3}, {0x09E6, 0x09FE}, {0x0A01, 0x0A03}, + {0x0A05, 0x0A0A}, {0x0A0F, 0x0A10}, {0x0A13, 0x0A28}, + {0x0A2A, 0x0A30}, {0x0A32, 0x0A33}, {0x0A35, 0x0A36}, + {0x0A38, 0x0A39}, {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A42}, + {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51}, + {0x0A59, 0x0A5C}, {0x0A5E, 0x0A5E}, {0x0A66, 0x0A76}, + {0x0A81, 0x0A83}, {0x0A85, 0x0A8D}, {0x0A8F, 0x0A91}, + {0x0A93, 0x0AA8}, {0x0AAA, 0x0AB0}, {0x0AB2, 0x0AB3}, + {0x0AB5, 0x0AB9}, {0x0ABC, 0x0AC5}, {0x0AC7, 0x0AC9}, + {0x0ACB, 0x0ACD}, {0x0AD0, 0x0AD0}, {0x0AE0, 0x0AE3}, + {0x0AE6, 0x0AF1}, {0x0AF9, 0x0AFF}, {0x0B01, 0x0B03}, + {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10}, {0x0B13, 0x0B28}, + {0x0B2A, 0x0B30}, {0x0B32, 0x0B33}, {0x0B35, 0x0B39}, + {0x0B3C, 0x0B44}, {0x0B47, 0x0B48}, {0x0B4B, 0x0B4D}, + {0x0B55, 0x0B57}, {0x0B5C, 0x0B5D}, {0x0B5F, 0x0B63}, + {0x0B66, 0x0B77}, {0x0B82, 0x0B83}, {0x0B85, 0x0B8A}, + {0x0B8E, 0x0B90}, {0x0B92, 0x0B95}, {0x0B99, 0x0B9A}, + {0x0B9C, 0x0B9C}, {0x0B9E, 0x0B9F}, {0x0BA3, 0x0BA4}, + {0x0BA8, 0x0BAA}, {0x0BAE, 0x0BB9}, {0x0BBE, 0x0BC2}, + {0x0BC6, 0x0BC8}, {0x0BCA, 0x0BCD}, {0x0BD0, 0x0BD0}, + {0x0BD7, 0x0BD7}, {0x0BE6, 0x0BFA}, {0x0C00, 0x0C0C}, + {0x0C0E, 0x0C10}, {0x0C12, 0x0C28}, {0x0C2A, 0x0C39}, + {0x0C3D, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D}, + {0x0C55, 0x0C56}, {0x0C58, 0x0C5A}, {0x0C60, 0x0C63}, + {0x0C66, 0x0C6F}, {0x0C77, 0x0C8C}, {0x0C8E, 0x0C90}, + {0x0C92, 0x0CA8}, {0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9}, + {0x0CBC, 0x0CC4}, {0x0CC6, 0x0CC8}, {0x0CCA, 0x0CCD}, + {0x0CD5, 0x0CD6}, {0x0CDE, 0x0CDE}, {0x0CE0, 0x0CE3}, + {0x0CE6, 0x0CEF}, {0x0CF1, 0x0CF2}, {0x0D00, 0x0D0C}, + {0x0D0E, 0x0D10}, {0x0D12, 0x0D44}, {0x0D46, 0x0D48}, + {0x0D4A, 0x0D4F}, {0x0D54, 0x0D63}, {0x0D66, 0x0D7F}, + {0x0D81, 0x0D83}, {0x0D85, 0x0D96}, {0x0D9A, 0x0DB1}, + {0x0DB3, 0x0DBB}, {0x0DBD, 0x0DBD}, {0x0DC0, 0x0DC6}, + {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD4}, {0x0DD6, 0x0DD6}, + {0x0DD8, 0x0DDF}, {0x0DE6, 0x0DEF}, {0x0DF2, 0x0DF4}, + {0x0E01, 0x0E3A}, {0x0E3F, 0x0E5B}, {0x0E81, 0x0E82}, + {0x0E84, 0x0E84}, {0x0E86, 0x0E8A}, {0x0E8C, 0x0EA3}, + {0x0EA5, 0x0EA5}, {0x0EA7, 0x0EBD}, {0x0EC0, 0x0EC4}, + {0x0EC6, 0x0EC6}, {0x0EC8, 0x0ECD}, {0x0ED0, 0x0ED9}, + {0x0EDC, 0x0EDF}, {0x0F00, 0x0F47}, {0x0F49, 0x0F6C}, + {0x0F71, 0x0F97}, {0x0F99, 0x0FBC}, {0x0FBE, 0x0FCC}, + {0x0FCE, 0x0FDA}, {0x1000, 0x10C5}, {0x10C7, 0x10C7}, + {0x10CD, 0x10CD}, {0x10D0, 0x10FF}, {0x1160, 0x1248}, + {0x124A, 0x124D}, {0x1250, 0x1256}, {0x1258, 0x1258}, + {0x125A, 0x125D}, {0x1260, 0x1288}, {0x128A, 0x128D}, + {0x1290, 0x12B0}, {0x12B2, 0x12B5}, {0x12B8, 0x12BE}, + {0x12C0, 0x12C0}, {0x12C2, 0x12C5}, {0x12C8, 0x12D6}, + {0x12D8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135A}, + {0x135D, 0x137C}, {0x1380, 0x1399}, {0x13A0, 0x13F5}, + {0x13F8, 0x13FD}, {0x1400, 0x169C}, {0x16A0, 0x16F8}, + {0x1700, 0x170C}, {0x170E, 0x1714}, {0x1720, 0x1736}, + {0x1740, 0x1753}, {0x1760, 0x176C}, {0x176E, 0x1770}, + {0x1772, 0x1773}, {0x1780, 0x17DD}, {0x17E0, 0x17E9}, + {0x17F0, 0x17F9}, {0x1800, 0x180E}, {0x1810, 0x1819}, + {0x1820, 0x1878}, {0x1880, 0x18AA}, {0x18B0, 0x18F5}, + {0x1900, 0x191E}, {0x1920, 0x192B}, {0x1930, 0x193B}, + {0x1940, 0x1940}, {0x1944, 0x196D}, {0x1970, 0x1974}, + {0x1980, 0x19AB}, {0x19B0, 0x19C9}, {0x19D0, 0x19DA}, + {0x19DE, 0x1A1B}, {0x1A1E, 0x1A5E}, {0x1A60, 0x1A7C}, + {0x1A7F, 0x1A89}, {0x1A90, 0x1A99}, {0x1AA0, 0x1AAD}, + {0x1AB0, 0x1AC0}, {0x1B00, 0x1B4B}, {0x1B50, 0x1B7C}, + {0x1B80, 0x1BF3}, {0x1BFC, 0x1C37}, {0x1C3B, 0x1C49}, + {0x1C4D, 0x1C88}, {0x1C90, 0x1CBA}, {0x1CBD, 0x1CC7}, + {0x1CD0, 0x1CFA}, {0x1D00, 0x1DF9}, {0x1DFB, 0x1F15}, + {0x1F18, 0x1F1D}, {0x1F20, 0x1F45}, {0x1F48, 0x1F4D}, + {0x1F50, 0x1F57}, {0x1F59, 0x1F59}, {0x1F5B, 0x1F5B}, + {0x1F5D, 0x1F5D}, {0x1F5F, 0x1F7D}, {0x1F80, 0x1FB4}, + {0x1FB6, 0x1FC4}, {0x1FC6, 0x1FD3}, {0x1FD6, 0x1FDB}, + {0x1FDD, 0x1FEF}, {0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFE}, + {0x2000, 0x200F}, {0x2011, 0x2012}, {0x2017, 0x2017}, + {0x201A, 0x201B}, {0x201E, 0x201F}, {0x2023, 0x2023}, + {0x2028, 0x202F}, {0x2031, 0x2031}, {0x2034, 0x2034}, + {0x2036, 0x203A}, {0x203C, 0x203D}, {0x203F, 0x2064}, + {0x2066, 0x2071}, {0x2075, 0x207E}, {0x2080, 0x2080}, + {0x2085, 0x208E}, {0x2090, 0x209C}, {0x20A0, 0x20A8}, + {0x20AA, 0x20AB}, {0x20AD, 0x20BF}, {0x20D0, 0x20F0}, + {0x2100, 0x2102}, {0x2104, 0x2104}, {0x2106, 0x2108}, + {0x210A, 0x2112}, {0x2114, 0x2115}, {0x2117, 0x2120}, + {0x2123, 0x2125}, {0x2127, 0x212A}, {0x212C, 0x2152}, + {0x2155, 0x215A}, {0x215F, 0x215F}, {0x216C, 0x216F}, + {0x217A, 0x2188}, {0x218A, 0x218B}, {0x219A, 0x21B7}, + {0x21BA, 0x21D1}, {0x21D3, 0x21D3}, {0x21D5, 0x21E6}, + {0x21E8, 0x21FF}, {0x2201, 0x2201}, {0x2204, 0x2206}, + {0x2209, 0x220A}, {0x220C, 0x220E}, {0x2210, 0x2210}, + {0x2212, 0x2214}, {0x2216, 0x2219}, {0x221B, 0x221C}, + {0x2221, 0x2222}, {0x2224, 0x2224}, {0x2226, 0x2226}, + {0x222D, 0x222D}, {0x222F, 0x2233}, {0x2238, 0x223B}, + {0x223E, 0x2247}, {0x2249, 0x224B}, {0x224D, 0x2251}, + {0x2253, 0x225F}, {0x2262, 0x2263}, {0x2268, 0x2269}, + {0x226C, 0x226D}, {0x2270, 0x2281}, {0x2284, 0x2285}, + {0x2288, 0x2294}, {0x2296, 0x2298}, {0x229A, 0x22A4}, + {0x22A6, 0x22BE}, {0x22C0, 0x2311}, {0x2313, 0x2319}, + {0x231C, 0x2328}, {0x232B, 0x23E8}, {0x23ED, 0x23EF}, + {0x23F1, 0x23F2}, {0x23F4, 0x2426}, {0x2440, 0x244A}, + {0x24EA, 0x24EA}, {0x254C, 0x254F}, {0x2574, 0x257F}, + {0x2590, 0x2591}, {0x2596, 0x259F}, {0x25A2, 0x25A2}, + {0x25AA, 0x25B1}, {0x25B4, 0x25B5}, {0x25B8, 0x25BB}, + {0x25BE, 0x25BF}, {0x25C2, 0x25C5}, {0x25C9, 0x25CA}, + {0x25CC, 0x25CD}, {0x25D2, 0x25E1}, {0x25E6, 0x25EE}, + {0x25F0, 0x25FC}, {0x25FF, 0x2604}, {0x2607, 0x2608}, + {0x260A, 0x260D}, {0x2610, 0x2613}, {0x2616, 0x261B}, + {0x261D, 0x261D}, {0x261F, 0x263F}, {0x2641, 0x2641}, + {0x2643, 0x2647}, {0x2654, 0x265F}, {0x2662, 0x2662}, + {0x2666, 0x2666}, {0x266B, 0x266B}, {0x266E, 0x266E}, + {0x2670, 0x267E}, {0x2680, 0x2692}, {0x2694, 0x269D}, + {0x26A0, 0x26A0}, {0x26A2, 0x26A9}, {0x26AC, 0x26BC}, + {0x26C0, 0x26C3}, {0x26E2, 0x26E2}, {0x26E4, 0x26E7}, + {0x2700, 0x2704}, {0x2706, 0x2709}, {0x270C, 0x2727}, + {0x2729, 0x273C}, {0x273E, 0x274B}, {0x274D, 0x274D}, + {0x274F, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x2775}, + {0x2780, 0x2794}, {0x2798, 0x27AF}, {0x27B1, 0x27BE}, + {0x27C0, 0x27E5}, {0x27EE, 0x2984}, {0x2987, 0x2B1A}, + {0x2B1D, 0x2B4F}, {0x2B51, 0x2B54}, {0x2B5A, 0x2B73}, + {0x2B76, 0x2B95}, {0x2B97, 0x2C2E}, {0x2C30, 0x2C5E}, + {0x2C60, 0x2CF3}, {0x2CF9, 0x2D25}, {0x2D27, 0x2D27}, + {0x2D2D, 0x2D2D}, {0x2D30, 0x2D67}, {0x2D6F, 0x2D70}, + {0x2D7F, 0x2D96}, {0x2DA0, 0x2DA6}, {0x2DA8, 0x2DAE}, + {0x2DB0, 0x2DB6}, {0x2DB8, 0x2DBE}, {0x2DC0, 0x2DC6}, + {0x2DC8, 0x2DCE}, {0x2DD0, 0x2DD6}, {0x2DD8, 0x2DDE}, + {0x2DE0, 0x2E52}, {0x303F, 0x303F}, {0x4DC0, 0x4DFF}, + {0xA4D0, 0xA62B}, {0xA640, 0xA6F7}, {0xA700, 0xA7BF}, + {0xA7C2, 0xA7CA}, {0xA7F5, 0xA82C}, {0xA830, 0xA839}, + {0xA840, 0xA877}, {0xA880, 0xA8C5}, {0xA8CE, 0xA8D9}, + {0xA8E0, 0xA953}, {0xA95F, 0xA95F}, {0xA980, 0xA9CD}, + {0xA9CF, 0xA9D9}, {0xA9DE, 0xA9FE}, {0xAA00, 0xAA36}, + {0xAA40, 0xAA4D}, {0xAA50, 0xAA59}, {0xAA5C, 0xAAC2}, + {0xAADB, 0xAAF6}, {0xAB01, 0xAB06}, {0xAB09, 0xAB0E}, + {0xAB11, 0xAB16}, {0xAB20, 0xAB26}, {0xAB28, 0xAB2E}, + {0xAB30, 0xAB6B}, {0xAB70, 0xABED}, {0xABF0, 0xABF9}, + {0xD7B0, 0xD7C6}, {0xD7CB, 0xD7FB}, {0xD800, 0xDFFF}, + {0xFB00, 0xFB06}, {0xFB13, 0xFB17}, {0xFB1D, 0xFB36}, + {0xFB38, 0xFB3C}, {0xFB3E, 0xFB3E}, {0xFB40, 0xFB41}, + {0xFB43, 0xFB44}, {0xFB46, 0xFBC1}, {0xFBD3, 0xFD3F}, + {0xFD50, 0xFD8F}, {0xFD92, 0xFDC7}, {0xFDF0, 0xFDFD}, + {0xFE20, 0xFE2F}, {0xFE70, 0xFE74}, {0xFE76, 0xFEFC}, + {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFC}, {0x10000, 0x1000B}, + {0x1000D, 0x10026}, {0x10028, 0x1003A}, {0x1003C, 0x1003D}, + {0x1003F, 0x1004D}, {0x10050, 0x1005D}, {0x10080, 0x100FA}, + {0x10100, 0x10102}, {0x10107, 0x10133}, {0x10137, 0x1018E}, + {0x10190, 0x1019C}, {0x101A0, 0x101A0}, {0x101D0, 0x101FD}, + {0x10280, 0x1029C}, {0x102A0, 0x102D0}, {0x102E0, 0x102FB}, + {0x10300, 0x10323}, {0x1032D, 0x1034A}, {0x10350, 0x1037A}, + {0x10380, 0x1039D}, {0x1039F, 0x103C3}, {0x103C8, 0x103D5}, + {0x10400, 0x1049D}, {0x104A0, 0x104A9}, {0x104B0, 0x104D3}, + {0x104D8, 0x104FB}, {0x10500, 0x10527}, {0x10530, 0x10563}, + {0x1056F, 0x1056F}, {0x10600, 0x10736}, {0x10740, 0x10755}, + {0x10760, 0x10767}, {0x10800, 0x10805}, {0x10808, 0x10808}, + {0x1080A, 0x10835}, {0x10837, 0x10838}, {0x1083C, 0x1083C}, + {0x1083F, 0x10855}, {0x10857, 0x1089E}, {0x108A7, 0x108AF}, + {0x108E0, 0x108F2}, {0x108F4, 0x108F5}, {0x108FB, 0x1091B}, + {0x1091F, 0x10939}, {0x1093F, 0x1093F}, {0x10980, 0x109B7}, + {0x109BC, 0x109CF}, {0x109D2, 0x10A03}, {0x10A05, 0x10A06}, + {0x10A0C, 0x10A13}, {0x10A15, 0x10A17}, {0x10A19, 0x10A35}, + {0x10A38, 0x10A3A}, {0x10A3F, 0x10A48}, {0x10A50, 0x10A58}, + {0x10A60, 0x10A9F}, {0x10AC0, 0x10AE6}, {0x10AEB, 0x10AF6}, + {0x10B00, 0x10B35}, {0x10B39, 0x10B55}, {0x10B58, 0x10B72}, + {0x10B78, 0x10B91}, {0x10B99, 0x10B9C}, {0x10BA9, 0x10BAF}, + {0x10C00, 0x10C48}, {0x10C80, 0x10CB2}, {0x10CC0, 0x10CF2}, + {0x10CFA, 0x10D27}, {0x10D30, 0x10D39}, {0x10E60, 0x10E7E}, + {0x10E80, 0x10EA9}, {0x10EAB, 0x10EAD}, {0x10EB0, 0x10EB1}, + {0x10F00, 0x10F27}, {0x10F30, 0x10F59}, {0x10FB0, 0x10FCB}, + {0x10FE0, 0x10FF6}, {0x11000, 0x1104D}, {0x11052, 0x1106F}, + {0x1107F, 0x110C1}, {0x110CD, 0x110CD}, {0x110D0, 0x110E8}, + {0x110F0, 0x110F9}, {0x11100, 0x11134}, {0x11136, 0x11147}, + {0x11150, 0x11176}, {0x11180, 0x111DF}, {0x111E1, 0x111F4}, + {0x11200, 0x11211}, {0x11213, 0x1123E}, {0x11280, 0x11286}, + {0x11288, 0x11288}, {0x1128A, 0x1128D}, {0x1128F, 0x1129D}, + {0x1129F, 0x112A9}, {0x112B0, 0x112EA}, {0x112F0, 0x112F9}, + {0x11300, 0x11303}, {0x11305, 0x1130C}, {0x1130F, 0x11310}, + {0x11313, 0x11328}, {0x1132A, 0x11330}, {0x11332, 0x11333}, + {0x11335, 0x11339}, {0x1133B, 0x11344}, {0x11347, 0x11348}, + {0x1134B, 0x1134D}, {0x11350, 0x11350}, {0x11357, 0x11357}, + {0x1135D, 0x11363}, {0x11366, 0x1136C}, {0x11370, 0x11374}, + {0x11400, 0x1145B}, {0x1145D, 0x11461}, {0x11480, 0x114C7}, + {0x114D0, 0x114D9}, {0x11580, 0x115B5}, {0x115B8, 0x115DD}, + {0x11600, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166C}, + {0x11680, 0x116B8}, {0x116C0, 0x116C9}, {0x11700, 0x1171A}, + {0x1171D, 0x1172B}, {0x11730, 0x1173F}, {0x11800, 0x1183B}, + {0x118A0, 0x118F2}, {0x118FF, 0x11906}, {0x11909, 0x11909}, + {0x1190C, 0x11913}, {0x11915, 0x11916}, {0x11918, 0x11935}, + {0x11937, 0x11938}, {0x1193B, 0x11946}, {0x11950, 0x11959}, + {0x119A0, 0x119A7}, {0x119AA, 0x119D7}, {0x119DA, 0x119E4}, + {0x11A00, 0x11A47}, {0x11A50, 0x11AA2}, {0x11AC0, 0x11AF8}, + {0x11C00, 0x11C08}, {0x11C0A, 0x11C36}, {0x11C38, 0x11C45}, + {0x11C50, 0x11C6C}, {0x11C70, 0x11C8F}, {0x11C92, 0x11CA7}, + {0x11CA9, 0x11CB6}, {0x11D00, 0x11D06}, {0x11D08, 0x11D09}, + {0x11D0B, 0x11D36}, {0x11D3A, 0x11D3A}, {0x11D3C, 0x11D3D}, + {0x11D3F, 0x11D47}, {0x11D50, 0x11D59}, {0x11D60, 0x11D65}, + {0x11D67, 0x11D68}, {0x11D6A, 0x11D8E}, {0x11D90, 0x11D91}, + {0x11D93, 0x11D98}, {0x11DA0, 0x11DA9}, {0x11EE0, 0x11EF8}, + {0x11FB0, 0x11FB0}, {0x11FC0, 0x11FF1}, {0x11FFF, 0x12399}, + {0x12400, 0x1246E}, {0x12470, 0x12474}, {0x12480, 0x12543}, + {0x13000, 0x1342E}, {0x13430, 0x13438}, {0x14400, 0x14646}, + {0x16800, 0x16A38}, {0x16A40, 0x16A5E}, {0x16A60, 0x16A69}, + {0x16A6E, 0x16A6F}, {0x16AD0, 0x16AED}, {0x16AF0, 0x16AF5}, + {0x16B00, 0x16B45}, {0x16B50, 0x16B59}, {0x16B5B, 0x16B61}, + {0x16B63, 0x16B77}, {0x16B7D, 0x16B8F}, {0x16E40, 0x16E9A}, + {0x16F00, 0x16F4A}, {0x16F4F, 0x16F87}, {0x16F8F, 0x16F9F}, + {0x1BC00, 0x1BC6A}, {0x1BC70, 0x1BC7C}, {0x1BC80, 0x1BC88}, + {0x1BC90, 0x1BC99}, {0x1BC9C, 0x1BCA3}, {0x1D000, 0x1D0F5}, + {0x1D100, 0x1D126}, {0x1D129, 0x1D1E8}, {0x1D200, 0x1D245}, + {0x1D2E0, 0x1D2F3}, {0x1D300, 0x1D356}, {0x1D360, 0x1D378}, + {0x1D400, 0x1D454}, {0x1D456, 0x1D49C}, {0x1D49E, 0x1D49F}, + {0x1D4A2, 0x1D4A2}, {0x1D4A5, 0x1D4A6}, {0x1D4A9, 0x1D4AC}, + {0x1D4AE, 0x1D4B9}, {0x1D4BB, 0x1D4BB}, {0x1D4BD, 0x1D4C3}, + {0x1D4C5, 0x1D505}, {0x1D507, 0x1D50A}, {0x1D50D, 0x1D514}, + {0x1D516, 0x1D51C}, {0x1D51E, 0x1D539}, {0x1D53B, 0x1D53E}, + {0x1D540, 0x1D544}, {0x1D546, 0x1D546}, {0x1D54A, 0x1D550}, + {0x1D552, 0x1D6A5}, {0x1D6A8, 0x1D7CB}, {0x1D7CE, 0x1DA8B}, + {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF}, {0x1E000, 0x1E006}, + {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, + {0x1E026, 0x1E02A}, {0x1E100, 0x1E12C}, {0x1E130, 0x1E13D}, + {0x1E140, 0x1E149}, {0x1E14E, 0x1E14F}, {0x1E2C0, 0x1E2F9}, + {0x1E2FF, 0x1E2FF}, {0x1E800, 0x1E8C4}, {0x1E8C7, 0x1E8D6}, + {0x1E900, 0x1E94B}, {0x1E950, 0x1E959}, {0x1E95E, 0x1E95F}, + {0x1EC71, 0x1ECB4}, {0x1ED01, 0x1ED3D}, {0x1EE00, 0x1EE03}, + {0x1EE05, 0x1EE1F}, {0x1EE21, 0x1EE22}, {0x1EE24, 0x1EE24}, + {0x1EE27, 0x1EE27}, {0x1EE29, 0x1EE32}, {0x1EE34, 0x1EE37}, + {0x1EE39, 0x1EE39}, {0x1EE3B, 0x1EE3B}, {0x1EE42, 0x1EE42}, + {0x1EE47, 0x1EE47}, {0x1EE49, 0x1EE49}, {0x1EE4B, 0x1EE4B}, + {0x1EE4D, 0x1EE4F}, {0x1EE51, 0x1EE52}, {0x1EE54, 0x1EE54}, + {0x1EE57, 0x1EE57}, {0x1EE59, 0x1EE59}, {0x1EE5B, 0x1EE5B}, + {0x1EE5D, 0x1EE5D}, {0x1EE5F, 0x1EE5F}, {0x1EE61, 0x1EE62}, + {0x1EE64, 0x1EE64}, {0x1EE67, 0x1EE6A}, {0x1EE6C, 0x1EE72}, + {0x1EE74, 0x1EE77}, {0x1EE79, 0x1EE7C}, {0x1EE7E, 0x1EE7E}, + {0x1EE80, 0x1EE89}, {0x1EE8B, 0x1EE9B}, {0x1EEA1, 0x1EEA3}, + {0x1EEA5, 0x1EEA9}, {0x1EEAB, 0x1EEBB}, {0x1EEF0, 0x1EEF1}, + {0x1F000, 0x1F003}, {0x1F005, 0x1F02B}, {0x1F030, 0x1F093}, + {0x1F0A0, 0x1F0AE}, {0x1F0B1, 0x1F0BF}, {0x1F0C1, 0x1F0CE}, + {0x1F0D1, 0x1F0F5}, {0x1F10B, 0x1F10F}, {0x1F12E, 0x1F12F}, + {0x1F16A, 0x1F16F}, {0x1F1AD, 0x1F1AD}, {0x1F1E6, 0x1F1FF}, + {0x1F321, 0x1F32C}, {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, + {0x1F394, 0x1F39F}, {0x1F3CB, 0x1F3CE}, {0x1F3D4, 0x1F3DF}, + {0x1F3F1, 0x1F3F3}, {0x1F3F5, 0x1F3F7}, {0x1F43F, 0x1F43F}, + {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FE}, {0x1F53E, 0x1F54A}, + {0x1F54F, 0x1F54F}, {0x1F568, 0x1F579}, {0x1F57B, 0x1F594}, + {0x1F597, 0x1F5A3}, {0x1F5A5, 0x1F5FA}, {0x1F650, 0x1F67F}, + {0x1F6C6, 0x1F6CB}, {0x1F6CD, 0x1F6CF}, {0x1F6D3, 0x1F6D4}, + {0x1F6E0, 0x1F6EA}, {0x1F6F0, 0x1F6F3}, {0x1F700, 0x1F773}, + {0x1F780, 0x1F7D8}, {0x1F800, 0x1F80B}, {0x1F810, 0x1F847}, + {0x1F850, 0x1F859}, {0x1F860, 0x1F887}, {0x1F890, 0x1F8AD}, + {0x1F8B0, 0x1F8B1}, {0x1F900, 0x1F90B}, {0x1F93B, 0x1F93B}, + {0x1F946, 0x1F946}, {0x1FA00, 0x1FA53}, {0x1FA60, 0x1FA6D}, + {0x1FB00, 0x1FB92}, {0x1FB94, 0x1FBCA}, {0x1FBF0, 0x1FBF9}, + {0xE0001, 0xE0001}, {0xE0020, 0xE007F}, +} + +var emoji = table{ + {0x203C, 0x203C}, {0x2049, 0x2049}, {0x2122, 0x2122}, + {0x2139, 0x2139}, {0x2194, 0x2199}, {0x21A9, 0x21AA}, + {0x231A, 0x231B}, {0x2328, 0x2328}, {0x2388, 0x2388}, + {0x23CF, 0x23CF}, {0x23E9, 0x23F3}, {0x23F8, 0x23FA}, + {0x24C2, 0x24C2}, {0x25AA, 0x25AB}, {0x25B6, 0x25B6}, + {0x25C0, 0x25C0}, {0x25FB, 0x25FE}, {0x2600, 0x2605}, + {0x2607, 0x2612}, {0x2614, 0x2685}, {0x2690, 0x2705}, + {0x2708, 0x2712}, {0x2714, 0x2714}, {0x2716, 0x2716}, + {0x271D, 0x271D}, {0x2721, 0x2721}, {0x2728, 0x2728}, + {0x2733, 0x2734}, {0x2744, 0x2744}, {0x2747, 0x2747}, + {0x274C, 0x274C}, {0x274E, 0x274E}, {0x2753, 0x2755}, + {0x2757, 0x2757}, {0x2763, 0x2767}, {0x2795, 0x2797}, + {0x27A1, 0x27A1}, {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, + {0x2934, 0x2935}, {0x2B05, 0x2B07}, {0x2B1B, 0x2B1C}, + {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x3030, 0x3030}, + {0x303D, 0x303D}, {0x3297, 0x3297}, {0x3299, 0x3299}, + {0x1F000, 0x1F0FF}, {0x1F10D, 0x1F10F}, {0x1F12F, 0x1F12F}, + {0x1F16C, 0x1F171}, {0x1F17E, 0x1F17F}, {0x1F18E, 0x1F18E}, + {0x1F191, 0x1F19A}, {0x1F1AD, 0x1F1E5}, {0x1F201, 0x1F20F}, + {0x1F21A, 0x1F21A}, {0x1F22F, 0x1F22F}, {0x1F232, 0x1F23A}, + {0x1F23C, 0x1F23F}, {0x1F249, 0x1F3FA}, {0x1F400, 0x1F53D}, + {0x1F546, 0x1F64F}, {0x1F680, 0x1F6FF}, {0x1F774, 0x1F77F}, + {0x1F7D5, 0x1F7FF}, {0x1F80C, 0x1F80F}, {0x1F848, 0x1F84F}, + {0x1F85A, 0x1F85F}, {0x1F888, 0x1F88F}, {0x1F8AE, 0x1F8FF}, + {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1FAFF}, + {0x1FC00, 0x1FFFD}, +} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_windows.go b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go new file mode 100644 index 000000000..d6a61777d --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go @@ -0,0 +1,28 @@ +// +build windows +// +build !appengine + +package runewidth + +import ( + "syscall" +) + +var ( + kernel32 = syscall.NewLazyDLL("kernel32") + procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") +) + +// IsEastAsian return true if the current locale is CJK +func IsEastAsian() bool { + r1, _, _ := procGetConsoleOutputCP.Call() + if r1 == 0 { + return false + } + + switch int(r1) { + case 932, 51932, 936, 949, 950: + return true + } + + return false +} diff --git a/vendor/github.com/mitchellh/copystructure/LICENSE b/vendor/github.com/mitchellh/copystructure/LICENSE new file mode 100644 index 000000000..229851590 --- /dev/null +++ b/vendor/github.com/mitchellh/copystructure/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/copystructure/README.md b/vendor/github.com/mitchellh/copystructure/README.md new file mode 100644 index 000000000..f0fbd2e5c --- /dev/null +++ b/vendor/github.com/mitchellh/copystructure/README.md @@ -0,0 +1,21 @@ +# copystructure + +copystructure is a Go library for deep copying values in Go. + +This allows you to copy Go values that may contain reference values +such as maps, slices, or pointers, and copy their data as well instead +of just their references. + +## Installation + +Standard `go get`: + +``` +$ go get github.com/mitchellh/copystructure +``` + +## Usage & Example + +For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/copystructure). + +The `Copy` function has examples associated with it there. diff --git a/vendor/github.com/mitchellh/copystructure/copier_time.go b/vendor/github.com/mitchellh/copystructure/copier_time.go new file mode 100644 index 000000000..db6a6aa1a --- /dev/null +++ b/vendor/github.com/mitchellh/copystructure/copier_time.go @@ -0,0 +1,15 @@ +package copystructure + +import ( + "reflect" + "time" +) + +func init() { + Copiers[reflect.TypeOf(time.Time{})] = timeCopier +} + +func timeCopier(v interface{}) (interface{}, error) { + // Just... copy it. + return v.(time.Time), nil +} diff --git a/vendor/github.com/mitchellh/copystructure/copystructure.go b/vendor/github.com/mitchellh/copystructure/copystructure.go new file mode 100644 index 000000000..8089e6670 --- /dev/null +++ b/vendor/github.com/mitchellh/copystructure/copystructure.go @@ -0,0 +1,631 @@ +package copystructure + +import ( + "errors" + "reflect" + "sync" + + "github.com/mitchellh/reflectwalk" +) + +const tagKey = "copy" + +// Copy returns a deep copy of v. +// +// Copy is unable to copy unexported fields in a struct (lowercase field names). +// Unexported fields can't be reflected by the Go runtime and therefore +// copystructure can't perform any data copies. +// +// For structs, copy behavior can be controlled with struct tags. For example: +// +// struct { +// Name string +// Data *bytes.Buffer `copy:"shallow"` +// } +// +// The available tag values are: +// +// * "ignore" - The field will be ignored, effectively resulting in it being +// assigned the zero value in the copy. +// +// * "shallow" - The field will be be shallow copied. This means that references +// values such as pointers, maps, slices, etc. will be directly assigned +// versus deep copied. +// +func Copy(v interface{}) (interface{}, error) { + return Config{}.Copy(v) +} + +// CopierFunc is a function that knows how to deep copy a specific type. +// Register these globally with the Copiers variable. +type CopierFunc func(interface{}) (interface{}, error) + +// Copiers is a map of types that behave specially when they are copied. +// If a type is found in this map while deep copying, this function +// will be called to copy it instead of attempting to copy all fields. +// +// The key should be the type, obtained using: reflect.TypeOf(value with type). +// +// It is unsafe to write to this map after Copies have started. If you +// are writing to this map while also copying, wrap all modifications to +// this map as well as to Copy in a mutex. +var Copiers map[reflect.Type]CopierFunc = make(map[reflect.Type]CopierFunc) + +// ShallowCopiers is a map of pointer types that behave specially +// when they are copied. If a type is found in this map while deep +// copying, the pointer value will be shallow copied and not walked +// into. +// +// The key should be the type, obtained using: reflect.TypeOf(value +// with type). +// +// It is unsafe to write to this map after Copies have started. If you +// are writing to this map while also copying, wrap all modifications to +// this map as well as to Copy in a mutex. +var ShallowCopiers map[reflect.Type]struct{} = make(map[reflect.Type]struct{}) + +// Must is a helper that wraps a call to a function returning +// (interface{}, error) and panics if the error is non-nil. It is intended +// for use in variable initializations and should only be used when a copy +// error should be a crashing case. +func Must(v interface{}, err error) interface{} { + if err != nil { + panic("copy error: " + err.Error()) + } + + return v +} + +var errPointerRequired = errors.New("Copy argument must be a pointer when Lock is true") + +type Config struct { + // Lock any types that are a sync.Locker and are not a mutex while copying. + // If there is an RLocker method, use that to get the sync.Locker. + Lock bool + + // Copiers is a map of types associated with a CopierFunc. Use the global + // Copiers map if this is nil. + Copiers map[reflect.Type]CopierFunc + + // ShallowCopiers is a map of pointer types that when they are + // shallow copied no matter where they are encountered. Use the + // global ShallowCopiers if this is nil. + ShallowCopiers map[reflect.Type]struct{} +} + +func (c Config) Copy(v interface{}) (interface{}, error) { + if c.Lock && reflect.ValueOf(v).Kind() != reflect.Ptr { + return nil, errPointerRequired + } + + w := new(walker) + if c.Lock { + w.useLocks = true + } + + if c.Copiers == nil { + c.Copiers = Copiers + } + w.copiers = c.Copiers + + if c.ShallowCopiers == nil { + c.ShallowCopiers = ShallowCopiers + } + w.shallowCopiers = c.ShallowCopiers + + err := reflectwalk.Walk(v, w) + if err != nil { + return nil, err + } + + // Get the result. If the result is nil, then we want to turn it + // into a typed nil if we can. + result := w.Result + if result == nil { + val := reflect.ValueOf(v) + result = reflect.Indirect(reflect.New(val.Type())).Interface() + } + + return result, nil +} + +// Return the key used to index interfaces types we've seen. Store the number +// of pointers in the upper 32bits, and the depth in the lower 32bits. This is +// easy to calculate, easy to match a key with our current depth, and we don't +// need to deal with initializing and cleaning up nested maps or slices. +func ifaceKey(pointers, depth int) uint64 { + return uint64(pointers)<<32 | uint64(depth) +} + +type walker struct { + Result interface{} + + copiers map[reflect.Type]CopierFunc + shallowCopiers map[reflect.Type]struct{} + depth int + ignoreDepth int + vals []reflect.Value + cs []reflect.Value + + // This stores the number of pointers we've walked over, indexed by depth. + ps []int + + // If an interface is indirected by a pointer, we need to know the type of + // interface to create when creating the new value. Store the interface + // types here, indexed by both the walk depth and the number of pointers + // already seen at that depth. Use ifaceKey to calculate the proper uint64 + // value. + ifaceTypes map[uint64]reflect.Type + + // any locks we've taken, indexed by depth + locks []sync.Locker + // take locks while walking the structure + useLocks bool +} + +func (w *walker) Enter(l reflectwalk.Location) error { + w.depth++ + + // ensure we have enough elements to index via w.depth + for w.depth >= len(w.locks) { + w.locks = append(w.locks, nil) + } + + for len(w.ps) < w.depth+1 { + w.ps = append(w.ps, 0) + } + + return nil +} + +func (w *walker) Exit(l reflectwalk.Location) error { + locker := w.locks[w.depth] + w.locks[w.depth] = nil + if locker != nil { + defer locker.Unlock() + } + + // clear out pointers and interfaces as we exit the stack + w.ps[w.depth] = 0 + + for k := range w.ifaceTypes { + mask := uint64(^uint32(0)) + if k&mask == uint64(w.depth) { + delete(w.ifaceTypes, k) + } + } + + w.depth-- + if w.ignoreDepth > w.depth { + w.ignoreDepth = 0 + } + + if w.ignoring() { + return nil + } + + switch l { + case reflectwalk.Array: + fallthrough + case reflectwalk.Map: + fallthrough + case reflectwalk.Slice: + w.replacePointerMaybe() + + // Pop map off our container + w.cs = w.cs[:len(w.cs)-1] + case reflectwalk.MapValue: + // Pop off the key and value + mv := w.valPop() + mk := w.valPop() + m := w.cs[len(w.cs)-1] + + // If mv is the zero value, SetMapIndex deletes the key form the map, + // or in this case never adds it. We need to create a properly typed + // zero value so that this key can be set. + if !mv.IsValid() { + mv = reflect.Zero(m.Elem().Type().Elem()) + } + m.Elem().SetMapIndex(mk, mv) + case reflectwalk.ArrayElem: + // Pop off the value and the index and set it on the array + v := w.valPop() + i := w.valPop().Interface().(int) + if v.IsValid() { + a := w.cs[len(w.cs)-1] + ae := a.Elem().Index(i) // storing array as pointer on stack - so need Elem() call + if ae.CanSet() { + ae.Set(v) + } + } + case reflectwalk.SliceElem: + // Pop off the value and the index and set it on the slice + v := w.valPop() + i := w.valPop().Interface().(int) + if v.IsValid() { + s := w.cs[len(w.cs)-1] + se := s.Elem().Index(i) + if se.CanSet() { + se.Set(v) + } + } + case reflectwalk.Struct: + w.replacePointerMaybe() + + // Remove the struct from the container stack + w.cs = w.cs[:len(w.cs)-1] + case reflectwalk.StructField: + // Pop off the value and the field + v := w.valPop() + f := w.valPop().Interface().(reflect.StructField) + if v.IsValid() { + s := w.cs[len(w.cs)-1] + sf := reflect.Indirect(s).FieldByName(f.Name) + + if sf.CanSet() { + sf.Set(v) + } + } + case reflectwalk.WalkLoc: + // Clear out the slices for GC + w.cs = nil + w.vals = nil + } + + return nil +} + +func (w *walker) Map(m reflect.Value) error { + if w.ignoring() { + return nil + } + w.lock(m) + + // Create the map. If the map itself is nil, then just make a nil map + var newMap reflect.Value + if m.IsNil() { + newMap = reflect.New(m.Type()) + } else { + newMap = wrapPtr(reflect.MakeMap(m.Type())) + } + + w.cs = append(w.cs, newMap) + w.valPush(newMap) + return nil +} + +func (w *walker) MapElem(m, k, v reflect.Value) error { + return nil +} + +func (w *walker) PointerEnter(v bool) error { + if v { + w.ps[w.depth]++ + } + return nil +} + +func (w *walker) PointerExit(v bool) error { + if v { + w.ps[w.depth]-- + } + return nil +} + +func (w *walker) Pointer(v reflect.Value) error { + if _, ok := w.shallowCopiers[v.Type()]; ok { + // Shallow copy this value. Use the same logic as primitive, then + // return skip. + if err := w.Primitive(v); err != nil { + return err + } + + return reflectwalk.SkipEntry + } + + return nil +} + +func (w *walker) Interface(v reflect.Value) error { + if !v.IsValid() { + return nil + } + if w.ifaceTypes == nil { + w.ifaceTypes = make(map[uint64]reflect.Type) + } + + w.ifaceTypes[ifaceKey(w.ps[w.depth], w.depth)] = v.Type() + return nil +} + +func (w *walker) Primitive(v reflect.Value) error { + if w.ignoring() { + return nil + } + w.lock(v) + + // IsValid verifies the v is non-zero and CanInterface verifies + // that we're allowed to read this value (unexported fields). + var newV reflect.Value + if v.IsValid() && v.CanInterface() { + newV = reflect.New(v.Type()) + newV.Elem().Set(v) + } + + w.valPush(newV) + w.replacePointerMaybe() + return nil +} + +func (w *walker) Slice(s reflect.Value) error { + if w.ignoring() { + return nil + } + w.lock(s) + + var newS reflect.Value + if s.IsNil() { + newS = reflect.New(s.Type()) + } else { + newS = wrapPtr(reflect.MakeSlice(s.Type(), s.Len(), s.Cap())) + } + + w.cs = append(w.cs, newS) + w.valPush(newS) + return nil +} + +func (w *walker) SliceElem(i int, elem reflect.Value) error { + if w.ignoring() { + return nil + } + + // We don't write the slice here because elem might still be + // arbitrarily complex. Just record the index and continue on. + w.valPush(reflect.ValueOf(i)) + + return nil +} + +func (w *walker) Array(a reflect.Value) error { + if w.ignoring() { + return nil + } + w.lock(a) + + newA := reflect.New(a.Type()) + + w.cs = append(w.cs, newA) + w.valPush(newA) + return nil +} + +func (w *walker) ArrayElem(i int, elem reflect.Value) error { + if w.ignoring() { + return nil + } + + // We don't write the array here because elem might still be + // arbitrarily complex. Just record the index and continue on. + w.valPush(reflect.ValueOf(i)) + + return nil +} + +func (w *walker) Struct(s reflect.Value) error { + if w.ignoring() { + return nil + } + w.lock(s) + + var v reflect.Value + if c, ok := w.copiers[s.Type()]; ok { + // We have a Copier for this struct, so we use that copier to + // get the copy, and we ignore anything deeper than this. + w.ignoreDepth = w.depth + + dup, err := c(s.Interface()) + if err != nil { + return err + } + + // We need to put a pointer to the value on the value stack, + // so allocate a new pointer and set it. + v = reflect.New(s.Type()) + reflect.Indirect(v).Set(reflect.ValueOf(dup)) + } else { + // No copier, we copy ourselves and allow reflectwalk to guide + // us deeper into the structure for copying. + v = reflect.New(s.Type()) + } + + // Push the value onto the value stack for setting the struct field, + // and add the struct itself to the containers stack in case we walk + // deeper so that its own fields can be modified. + w.valPush(v) + w.cs = append(w.cs, v) + + return nil +} + +func (w *walker) StructField(f reflect.StructField, v reflect.Value) error { + if w.ignoring() { + return nil + } + + // If PkgPath is non-empty, this is a private (unexported) field. + // We do not set this unexported since the Go runtime doesn't allow us. + if f.PkgPath != "" { + return reflectwalk.SkipEntry + } + + switch f.Tag.Get(tagKey) { + case "shallow": + // If we're shallow copying then assign the value directly to the + // struct and skip the entry. + if v.IsValid() { + s := w.cs[len(w.cs)-1] + sf := reflect.Indirect(s).FieldByName(f.Name) + if sf.CanSet() { + sf.Set(v) + } + } + + return reflectwalk.SkipEntry + + case "ignore": + // Do nothing + return reflectwalk.SkipEntry + } + + // Push the field onto the stack, we'll handle it when we exit + // the struct field in Exit... + w.valPush(reflect.ValueOf(f)) + + return nil +} + +// ignore causes the walker to ignore any more values until we exit this on +func (w *walker) ignore() { + w.ignoreDepth = w.depth +} + +func (w *walker) ignoring() bool { + return w.ignoreDepth > 0 && w.depth >= w.ignoreDepth +} + +func (w *walker) pointerPeek() bool { + return w.ps[w.depth] > 0 +} + +func (w *walker) valPop() reflect.Value { + result := w.vals[len(w.vals)-1] + w.vals = w.vals[:len(w.vals)-1] + + // If we're out of values, that means we popped everything off. In + // this case, we reset the result so the next pushed value becomes + // the result. + if len(w.vals) == 0 { + w.Result = nil + } + + return result +} + +func (w *walker) valPush(v reflect.Value) { + w.vals = append(w.vals, v) + + // If we haven't set the result yet, then this is the result since + // it is the first (outermost) value we're seeing. + if w.Result == nil && v.IsValid() { + w.Result = v.Interface() + } +} + +func (w *walker) replacePointerMaybe() { + // Determine the last pointer value. If it is NOT a pointer, then + // we need to push that onto the stack. + if !w.pointerPeek() { + w.valPush(reflect.Indirect(w.valPop())) + return + } + + v := w.valPop() + + // If the expected type is a pointer to an interface of any depth, + // such as *interface{}, **interface{}, etc., then we need to convert + // the value "v" from *CONCRETE to *interface{} so types match for + // Set. + // + // Example if v is type *Foo where Foo is a struct, v would become + // *interface{} instead. This only happens if we have an interface expectation + // at this depth. + // + // For more info, see GH-16 + if iType, ok := w.ifaceTypes[ifaceKey(w.ps[w.depth], w.depth)]; ok && iType.Kind() == reflect.Interface { + y := reflect.New(iType) // Create *interface{} + y.Elem().Set(reflect.Indirect(v)) // Assign "Foo" to interface{} (dereferenced) + v = y // v is now typed *interface{} (where *v = Foo) + } + + for i := 1; i < w.ps[w.depth]; i++ { + if iType, ok := w.ifaceTypes[ifaceKey(w.ps[w.depth]-i, w.depth)]; ok { + iface := reflect.New(iType).Elem() + iface.Set(v) + v = iface + } + + p := reflect.New(v.Type()) + p.Elem().Set(v) + v = p + } + + w.valPush(v) +} + +// if this value is a Locker, lock it and add it to the locks slice +func (w *walker) lock(v reflect.Value) { + if !w.useLocks { + return + } + + if !v.IsValid() || !v.CanInterface() { + return + } + + type rlocker interface { + RLocker() sync.Locker + } + + var locker sync.Locker + + // We can't call Interface() on a value directly, since that requires + // a copy. This is OK, since the pointer to a value which is a sync.Locker + // is also a sync.Locker. + if v.Kind() == reflect.Ptr { + switch l := v.Interface().(type) { + case rlocker: + // don't lock a mutex directly + if _, ok := l.(*sync.RWMutex); !ok { + locker = l.RLocker() + } + case sync.Locker: + locker = l + } + } else if v.CanAddr() { + switch l := v.Addr().Interface().(type) { + case rlocker: + // don't lock a mutex directly + if _, ok := l.(*sync.RWMutex); !ok { + locker = l.RLocker() + } + case sync.Locker: + locker = l + } + } + + // still no callable locker + if locker == nil { + return + } + + // don't lock a mutex directly + switch locker.(type) { + case *sync.Mutex, *sync.RWMutex: + return + } + + locker.Lock() + w.locks[w.depth] = locker +} + +// wrapPtr is a helper that takes v and always make it *v. copystructure +// stores things internally as pointers until the last moment before unwrapping +func wrapPtr(v reflect.Value) reflect.Value { + if !v.IsValid() { + return v + } + vPtr := reflect.New(v.Type()) + vPtr.Elem().Set(v) + return vPtr +} diff --git a/vendor/github.com/mitchellh/reflectwalk/.travis.yml b/vendor/github.com/mitchellh/reflectwalk/.travis.yml new file mode 100644 index 000000000..4f2ee4d97 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/.travis.yml @@ -0,0 +1 @@ +language: go diff --git a/vendor/github.com/mitchellh/reflectwalk/LICENSE b/vendor/github.com/mitchellh/reflectwalk/LICENSE new file mode 100644 index 000000000..f9c841a51 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/reflectwalk/README.md b/vendor/github.com/mitchellh/reflectwalk/README.md new file mode 100644 index 000000000..ac82cd2e1 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/README.md @@ -0,0 +1,6 @@ +# reflectwalk + +reflectwalk is a Go library for "walking" a value in Go using reflection, +in the same way a directory tree can be "walked" on the filesystem. Walking +a complex structure can allow you to do manipulations on unknown structures +such as those decoded from JSON. diff --git a/vendor/github.com/mitchellh/reflectwalk/location.go b/vendor/github.com/mitchellh/reflectwalk/location.go new file mode 100644 index 000000000..6a7f17611 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/location.go @@ -0,0 +1,19 @@ +package reflectwalk + +//go:generate stringer -type=Location location.go + +type Location uint + +const ( + None Location = iota + Map + MapKey + MapValue + Slice + SliceElem + Array + ArrayElem + Struct + StructField + WalkLoc +) diff --git a/vendor/github.com/mitchellh/reflectwalk/location_string.go b/vendor/github.com/mitchellh/reflectwalk/location_string.go new file mode 100644 index 000000000..70760cf4c --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/location_string.go @@ -0,0 +1,16 @@ +// Code generated by "stringer -type=Location location.go"; DO NOT EDIT. + +package reflectwalk + +import "fmt" + +const _Location_name = "NoneMapMapKeyMapValueSliceSliceElemArrayArrayElemStructStructFieldWalkLoc" + +var _Location_index = [...]uint8{0, 4, 7, 13, 21, 26, 35, 40, 49, 55, 66, 73} + +func (i Location) String() string { + if i >= Location(len(_Location_index)-1) { + return fmt.Sprintf("Location(%d)", i) + } + return _Location_name[_Location_index[i]:_Location_index[i+1]] +} diff --git a/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go b/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go new file mode 100644 index 000000000..7fee7b050 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go @@ -0,0 +1,420 @@ +// reflectwalk is a package that allows you to "walk" complex structures +// similar to how you may "walk" a filesystem: visiting every element one +// by one and calling callback functions allowing you to handle and manipulate +// those elements. +package reflectwalk + +import ( + "errors" + "reflect" +) + +// PrimitiveWalker implementations are able to handle primitive values +// within complex structures. Primitive values are numbers, strings, +// booleans, funcs, chans. +// +// These primitive values are often members of more complex +// structures (slices, maps, etc.) that are walkable by other interfaces. +type PrimitiveWalker interface { + Primitive(reflect.Value) error +} + +// InterfaceWalker implementations are able to handle interface values as they +// are encountered during the walk. +type InterfaceWalker interface { + Interface(reflect.Value) error +} + +// MapWalker implementations are able to handle individual elements +// found within a map structure. +type MapWalker interface { + Map(m reflect.Value) error + MapElem(m, k, v reflect.Value) error +} + +// SliceWalker implementations are able to handle slice elements found +// within complex structures. +type SliceWalker interface { + Slice(reflect.Value) error + SliceElem(int, reflect.Value) error +} + +// ArrayWalker implementations are able to handle array elements found +// within complex structures. +type ArrayWalker interface { + Array(reflect.Value) error + ArrayElem(int, reflect.Value) error +} + +// StructWalker is an interface that has methods that are called for +// structs when a Walk is done. +type StructWalker interface { + Struct(reflect.Value) error + StructField(reflect.StructField, reflect.Value) error +} + +// EnterExitWalker implementations are notified before and after +// they walk deeper into complex structures (into struct fields, +// into slice elements, etc.) +type EnterExitWalker interface { + Enter(Location) error + Exit(Location) error +} + +// PointerWalker implementations are notified when the value they're +// walking is a pointer or not. Pointer is called for _every_ value whether +// it is a pointer or not. +type PointerWalker interface { + PointerEnter(bool) error + PointerExit(bool) error +} + +// PointerValueWalker implementations are notified with the value of +// a particular pointer when a pointer is walked. Pointer is called +// right before PointerEnter. +type PointerValueWalker interface { + Pointer(reflect.Value) error +} + +// SkipEntry can be returned from walk functions to skip walking +// the value of this field. This is only valid in the following functions: +// +// - Struct: skips all fields from being walked +// - StructField: skips walking the struct value +// +var SkipEntry = errors.New("skip this entry") + +// Walk takes an arbitrary value and an interface and traverses the +// value, calling callbacks on the interface if they are supported. +// The interface should implement one or more of the walker interfaces +// in this package, such as PrimitiveWalker, StructWalker, etc. +func Walk(data, walker interface{}) (err error) { + v := reflect.ValueOf(data) + ew, ok := walker.(EnterExitWalker) + if ok { + err = ew.Enter(WalkLoc) + } + + if err == nil { + err = walk(v, walker) + } + + if ok && err == nil { + err = ew.Exit(WalkLoc) + } + + return +} + +func walk(v reflect.Value, w interface{}) (err error) { + // Determine if we're receiving a pointer and if so notify the walker. + // The logic here is convoluted but very important (tests will fail if + // almost any part is changed). I will try to explain here. + // + // First, we check if the value is an interface, if so, we really need + // to check the interface's VALUE to see whether it is a pointer. + // + // Check whether the value is then a pointer. If so, then set pointer + // to true to notify the user. + // + // If we still have a pointer or an interface after the indirections, then + // we unwrap another level + // + // At this time, we also set "v" to be the dereferenced value. This is + // because once we've unwrapped the pointer we want to use that value. + pointer := false + pointerV := v + + for { + if pointerV.Kind() == reflect.Interface { + if iw, ok := w.(InterfaceWalker); ok { + if err = iw.Interface(pointerV); err != nil { + return + } + } + + pointerV = pointerV.Elem() + } + + if pointerV.Kind() == reflect.Ptr { + if pw, ok := w.(PointerValueWalker); ok { + if err = pw.Pointer(pointerV); err != nil { + if err == SkipEntry { + // Skip the rest of this entry but clear the error + return nil + } + + return + } + } + + pointer = true + v = reflect.Indirect(pointerV) + } + if pw, ok := w.(PointerWalker); ok { + if err = pw.PointerEnter(pointer); err != nil { + return + } + + defer func(pointer bool) { + if err != nil { + return + } + + err = pw.PointerExit(pointer) + }(pointer) + } + + if pointer { + pointerV = v + } + pointer = false + + // If we still have a pointer or interface we have to indirect another level. + switch pointerV.Kind() { + case reflect.Ptr, reflect.Interface: + continue + } + break + } + + // We preserve the original value here because if it is an interface + // type, we want to pass that directly into the walkPrimitive, so that + // we can set it. + originalV := v + if v.Kind() == reflect.Interface { + v = v.Elem() + } + + k := v.Kind() + if k >= reflect.Int && k <= reflect.Complex128 { + k = reflect.Int + } + + switch k { + // Primitives + case reflect.Bool, reflect.Chan, reflect.Func, reflect.Int, reflect.String, reflect.Invalid: + err = walkPrimitive(originalV, w) + return + case reflect.Map: + err = walkMap(v, w) + return + case reflect.Slice: + err = walkSlice(v, w) + return + case reflect.Struct: + err = walkStruct(v, w) + return + case reflect.Array: + err = walkArray(v, w) + return + default: + panic("unsupported type: " + k.String()) + } +} + +func walkMap(v reflect.Value, w interface{}) error { + ew, ewok := w.(EnterExitWalker) + if ewok { + ew.Enter(Map) + } + + if mw, ok := w.(MapWalker); ok { + if err := mw.Map(v); err != nil { + return err + } + } + + for _, k := range v.MapKeys() { + kv := v.MapIndex(k) + + if mw, ok := w.(MapWalker); ok { + if err := mw.MapElem(v, k, kv); err != nil { + return err + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(MapKey) + } + + if err := walk(k, w); err != nil { + return err + } + + if ok { + ew.Exit(MapKey) + ew.Enter(MapValue) + } + + // get the map value again as it may have changed in the MapElem call + if err := walk(v.MapIndex(k), w); err != nil { + return err + } + + if ok { + ew.Exit(MapValue) + } + } + + if ewok { + ew.Exit(Map) + } + + return nil +} + +func walkPrimitive(v reflect.Value, w interface{}) error { + if pw, ok := w.(PrimitiveWalker); ok { + return pw.Primitive(v) + } + + return nil +} + +func walkSlice(v reflect.Value, w interface{}) (err error) { + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(Slice) + } + + if sw, ok := w.(SliceWalker); ok { + if err := sw.Slice(v); err != nil { + return err + } + } + + for i := 0; i < v.Len(); i++ { + elem := v.Index(i) + + if sw, ok := w.(SliceWalker); ok { + if err := sw.SliceElem(i, elem); err != nil { + return err + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(SliceElem) + } + + if err := walk(elem, w); err != nil { + return err + } + + if ok { + ew.Exit(SliceElem) + } + } + + ew, ok = w.(EnterExitWalker) + if ok { + ew.Exit(Slice) + } + + return nil +} + +func walkArray(v reflect.Value, w interface{}) (err error) { + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(Array) + } + + if aw, ok := w.(ArrayWalker); ok { + if err := aw.Array(v); err != nil { + return err + } + } + + for i := 0; i < v.Len(); i++ { + elem := v.Index(i) + + if aw, ok := w.(ArrayWalker); ok { + if err := aw.ArrayElem(i, elem); err != nil { + return err + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(ArrayElem) + } + + if err := walk(elem, w); err != nil { + return err + } + + if ok { + ew.Exit(ArrayElem) + } + } + + ew, ok = w.(EnterExitWalker) + if ok { + ew.Exit(Array) + } + + return nil +} + +func walkStruct(v reflect.Value, w interface{}) (err error) { + ew, ewok := w.(EnterExitWalker) + if ewok { + ew.Enter(Struct) + } + + skip := false + if sw, ok := w.(StructWalker); ok { + err = sw.Struct(v) + if err == SkipEntry { + skip = true + err = nil + } + if err != nil { + return + } + } + + if !skip { + vt := v.Type() + for i := 0; i < vt.NumField(); i++ { + sf := vt.Field(i) + f := v.FieldByIndex([]int{i}) + + if sw, ok := w.(StructWalker); ok { + err = sw.StructField(sf, f) + + // SkipEntry just pretends this field doesn't even exist + if err == SkipEntry { + continue + } + + if err != nil { + return + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(StructField) + } + + err = walk(f, w) + if err != nil { + return + } + + if ok { + ew.Exit(StructField) + } + } + } + + if ewok { + ew.Exit(Struct) + } + + return nil +} diff --git a/vendor/github.com/moby/locker/LICENSE b/vendor/github.com/moby/locker/LICENSE new file mode 100644 index 000000000..2e0ec1dcf --- /dev/null +++ b/vendor/github.com/moby/locker/LICENSE @@ -0,0 +1,190 @@ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/moby/locker/README.md b/vendor/github.com/moby/locker/README.md new file mode 100644 index 000000000..a0852f0f8 --- /dev/null +++ b/vendor/github.com/moby/locker/README.md @@ -0,0 +1,65 @@ +Locker +===== + +locker provides a mechanism for creating finer-grained locking to help +free up more global locks to handle other tasks. + +The implementation looks close to a sync.Mutex, however, the user must provide a +reference to use to refer to the underlying lock when locking and unlocking, +and unlock may generate an error. + +If a lock with a given name does not exist when `Lock` is called, one is +created. +Lock references are automatically cleaned up on `Unlock` if nothing else is +waiting for the lock. + + +## Usage + +```go +package important + +import ( + "sync" + "time" + + "github.com/moby/locker" +) + +type important struct { + locks *locker.Locker + data map[string]interface{} + mu sync.Mutex +} + +func (i *important) Get(name string) interface{} { + i.locks.Lock(name) + defer i.locks.Unlock(name) + return i.data[name] +} + +func (i *important) Create(name string, data interface{}) { + i.locks.Lock(name) + defer i.locks.Unlock(name) + + i.createImportant(data) + + i.mu.Lock() + i.data[name] = data + i.mu.Unlock() +} + +func (i *important) createImportant(data interface{}) { + time.Sleep(10 * time.Second) +} +``` + +For functions dealing with a given name, always lock at the beginning of the +function (or before doing anything with the underlying state), this ensures any +other function that is dealing with the same name will block. + +When needing to modify the underlying data, use the global lock to ensure nothing +else is modifying it at the same time. +Since name lock is already in place, no reads will occur while the modification +is being performed. + diff --git a/vendor/github.com/moby/locker/locker.go b/vendor/github.com/moby/locker/locker.go new file mode 100644 index 000000000..0b22ddfab --- /dev/null +++ b/vendor/github.com/moby/locker/locker.go @@ -0,0 +1,112 @@ +/* +Package locker provides a mechanism for creating finer-grained locking to help +free up more global locks to handle other tasks. + +The implementation looks close to a sync.Mutex, however the user must provide a +reference to use to refer to the underlying lock when locking and unlocking, +and unlock may generate an error. + +If a lock with a given name does not exist when `Lock` is called, one is +created. +Lock references are automatically cleaned up on `Unlock` if nothing else is +waiting for the lock. +*/ +package locker + +import ( + "errors" + "sync" + "sync/atomic" +) + +// ErrNoSuchLock is returned when the requested lock does not exist +var ErrNoSuchLock = errors.New("no such lock") + +// Locker provides a locking mechanism based on the passed in reference name +type Locker struct { + mu sync.Mutex + locks map[string]*lockCtr +} + +// lockCtr is used by Locker to represent a lock with a given name. +type lockCtr struct { + mu sync.Mutex + // waiters is the number of waiters waiting to acquire the lock + // this is int32 instead of uint32 so we can add `-1` in `dec()` + waiters int32 +} + +// inc increments the number of waiters waiting for the lock +func (l *lockCtr) inc() { + atomic.AddInt32(&l.waiters, 1) +} + +// dec decrements the number of waiters waiting on the lock +func (l *lockCtr) dec() { + atomic.AddInt32(&l.waiters, -1) +} + +// count gets the current number of waiters +func (l *lockCtr) count() int32 { + return atomic.LoadInt32(&l.waiters) +} + +// Lock locks the mutex +func (l *lockCtr) Lock() { + l.mu.Lock() +} + +// Unlock unlocks the mutex +func (l *lockCtr) Unlock() { + l.mu.Unlock() +} + +// New creates a new Locker +func New() *Locker { + return &Locker{ + locks: make(map[string]*lockCtr), + } +} + +// Lock locks a mutex with the given name. If it doesn't exist, one is created +func (l *Locker) Lock(name string) { + l.mu.Lock() + if l.locks == nil { + l.locks = make(map[string]*lockCtr) + } + + nameLock, exists := l.locks[name] + if !exists { + nameLock = &lockCtr{} + l.locks[name] = nameLock + } + + // increment the nameLock waiters while inside the main mutex + // this makes sure that the lock isn't deleted if `Lock` and `Unlock` are called concurrently + nameLock.inc() + l.mu.Unlock() + + // Lock the nameLock outside the main mutex so we don't block other operations + // once locked then we can decrement the number of waiters for this lock + nameLock.Lock() + nameLock.dec() +} + +// Unlock unlocks the mutex with the given name +// If the given lock is not being waited on by any other callers, it is deleted +func (l *Locker) Unlock(name string) error { + l.mu.Lock() + nameLock, exists := l.locks[name] + if !exists { + l.mu.Unlock() + return ErrNoSuchLock + } + + if nameLock.count() == 0 { + delete(l.locks, name) + } + nameLock.Unlock() + + l.mu.Unlock() + return nil +} diff --git a/vendor/github.com/moby/spdystream/connection.go b/vendor/github.com/moby/spdystream/connection.go index d906bb05c..d649eccc8 100644 --- a/vendor/github.com/moby/spdystream/connection.go +++ b/vendor/github.com/moby/spdystream/connection.go @@ -208,9 +208,10 @@ type Connection struct { nextStreamId spdy.StreamId receivedStreamId spdy.StreamId - pingIdLock sync.Mutex - pingId uint32 - pingChans map[uint32]chan error + // pingLock protects pingChans and pingId + pingLock sync.Mutex + pingId uint32 + pingChans map[uint32]chan error shutdownLock sync.Mutex shutdownChan chan error @@ -274,16 +275,20 @@ func NewConnection(conn net.Conn, server bool) (*Connection, error) { // returns the response time func (s *Connection) Ping() (time.Duration, error) { pid := s.pingId - s.pingIdLock.Lock() + s.pingLock.Lock() if s.pingId > 0x7ffffffe { s.pingId = s.pingId - 0x7ffffffe } else { s.pingId = s.pingId + 2 } - s.pingIdLock.Unlock() pingChan := make(chan error) s.pingChans[pid] = pingChan - defer delete(s.pingChans, pid) + s.pingLock.Unlock() + defer func() { + s.pingLock.Lock() + delete(s.pingChans, pid) + s.pingLock.Unlock() + }() frame := &spdy.PingFrame{Id: pid} startTime := time.Now() @@ -612,10 +617,14 @@ func (s *Connection) handleDataFrame(frame *spdy.DataFrame) error { } func (s *Connection) handlePingFrame(frame *spdy.PingFrame) error { - if s.pingId&0x01 != frame.Id&0x01 { + s.pingLock.Lock() + pingId := s.pingId + pingChan, pingOk := s.pingChans[frame.Id] + s.pingLock.Unlock() + + if pingId&0x01 != frame.Id&0x01 { return s.framer.WriteFrame(frame) } - pingChan, pingOk := s.pingChans[frame.Id] if pingOk { close(pingChan) } @@ -731,16 +740,14 @@ func (s *Connection) shutdown(closeTimeout time.Duration) { if err != nil { duration := 10 * time.Minute - time.AfterFunc(duration, func() { - select { - case err, ok := <-s.shutdownChan: - if ok { - debugMessage("Unhandled close error after %s: %s", duration, err) - } - default: - } - }) - s.shutdownChan <- err + timer := time.NewTimer(duration) + defer timer.Stop() + select { + case s.shutdownChan <- err: + // error was handled + case <-timer.C: + debugMessage("Unhandled close error after %s: %s", duration, err) + } } close(s.shutdownChan) } diff --git a/vendor/github.com/moby/spdystream/stream.go b/vendor/github.com/moby/spdystream/stream.go index 404e3c02d..171c1e9e3 100644 --- a/vendor/github.com/moby/spdystream/stream.go +++ b/vendor/github.com/moby/spdystream/stream.go @@ -305,6 +305,8 @@ func (s *Stream) Identifier() uint32 { // IsFinished returns whether the stream has finished // sending data func (s *Stream) IsFinished() bool { + s.finishLock.Lock() + defer s.finishLock.Unlock() return s.finished } diff --git a/vendor/github.com/moby/term/doc.go b/vendor/github.com/moby/term/doc.go new file mode 100644 index 000000000..c9bc03244 --- /dev/null +++ b/vendor/github.com/moby/term/doc.go @@ -0,0 +1,3 @@ +// Package term provides structures and helper functions to work with +// terminal (state, sizes). +package term diff --git a/vendor/github.com/moby/term/tc.go b/vendor/github.com/moby/term/tc.go deleted file mode 100644 index 8a5e09f58..000000000 --- a/vendor/github.com/moby/term/tc.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build !windows -// +build !windows - -package term - -import ( - "golang.org/x/sys/unix" -) - -func tcget(fd uintptr) (*Termios, error) { - p, err := unix.IoctlGetTermios(int(fd), getTermios) - if err != nil { - return nil, err - } - return p, nil -} - -func tcset(fd uintptr, p *Termios) error { - return unix.IoctlSetTermios(int(fd), setTermios, p) -} diff --git a/vendor/github.com/moby/term/term.go b/vendor/github.com/moby/term/term.go index 2dd3d090d..f9d8988ef 100644 --- a/vendor/github.com/moby/term/term.go +++ b/vendor/github.com/moby/term/term.go @@ -1,100 +1,85 @@ -//go:build !windows -// +build !windows - -// Package term provides structures and helper functions to work with -// terminal (state, sizes). package term -import ( - "errors" - "io" - "os" - - "golang.org/x/sys/unix" -) - -// ErrInvalidState is returned if the state of the terminal is invalid. -var ErrInvalidState = errors.New("Invalid terminal state") +import "io" -// State represents the state of the terminal. -type State struct { - termios Termios -} +// State holds the platform-specific state / console mode for the terminal. +type State terminalState // Winsize represents the size of the terminal window. type Winsize struct { Height uint16 Width uint16 - x uint16 - y uint16 + + // Only used on Unix + x uint16 + y uint16 } // StdStreams returns the standard streams (stdin, stdout, stderr). +// +// On Windows, it attempts to turn on VT handling on all std handles if +// supported, or falls back to terminal emulation. On Unix, this returns +// the standard [os.Stdin], [os.Stdout] and [os.Stderr]. func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { - return os.Stdin, os.Stdout, os.Stderr + return stdStreams() } // GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. -func GetFdInfo(in interface{}) (uintptr, bool) { - var inFd uintptr - var isTerminalIn bool - if file, ok := in.(*os.File); ok { - inFd = file.Fd() - isTerminalIn = IsTerminal(inFd) - } - return inFd, isTerminalIn +func GetFdInfo(in interface{}) (fd uintptr, isTerminal bool) { + return getFdInfo(in) +} + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + return getWinsize(fd) +} + +// SetWinsize tries to set the specified window size for the specified file +// descriptor. It is only implemented on Unix, and returns an error on Windows. +func SetWinsize(fd uintptr, ws *Winsize) error { + return setWinsize(fd, ws) } // IsTerminal returns true if the given file descriptor is a terminal. func IsTerminal(fd uintptr) bool { - _, err := tcget(fd) - return err == nil + return isTerminal(fd) } // RestoreTerminal restores the terminal connected to the given file descriptor // to a previous state. func RestoreTerminal(fd uintptr, state *State) error { - if state == nil { - return ErrInvalidState - } - return tcset(fd, &state.termios) + return restoreTerminal(fd, state) } // SaveState saves the state of the terminal connected to the given file descriptor. func SaveState(fd uintptr) (*State, error) { - termios, err := tcget(fd) - if err != nil { - return nil, err - } - return &State{termios: *termios}, nil + return saveState(fd) } // DisableEcho applies the specified state to the terminal connected to the file // descriptor, with echo disabled. func DisableEcho(fd uintptr, state *State) error { - newState := state.termios - newState.Lflag &^= unix.ECHO - - if err := tcset(fd, &newState); err != nil { - return err - } - return nil + return disableEcho(fd, state) } // SetRawTerminal puts the terminal connected to the given file descriptor into -// raw mode and returns the previous state. On UNIX, this puts both the input -// and output into raw mode. On Windows, it only puts the input into raw mode. -func SetRawTerminal(fd uintptr) (*State, error) { - oldState, err := MakeRaw(fd) - if err != nil { - return nil, err - } - return oldState, err +// raw mode and returns the previous state. On UNIX, this is the equivalent of +// [MakeRaw], and puts both the input and output into raw mode. On Windows, it +// only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (previousState *State, err error) { + return setRawTerminal(fd) } // SetRawTerminalOutput puts the output of terminal connected to the given file // descriptor into raw mode. On UNIX, this does nothing and returns nil for the // state. On Windows, it disables LF -> CRLF translation. -func SetRawTerminalOutput(fd uintptr) (*State, error) { - return nil, nil +func SetRawTerminalOutput(fd uintptr) (previousState *State, err error) { + return setRawTerminalOutput(fd) +} + +// MakeRaw puts the terminal (Windows Console) connected to the +// given file descriptor into raw mode and returns the previous state of +// the terminal so that it can be restored. +func MakeRaw(fd uintptr) (previousState *State, err error) { + return makeRaw(fd) } diff --git a/vendor/github.com/moby/term/term_unix.go b/vendor/github.com/moby/term/term_unix.go new file mode 100644 index 000000000..2ec7706a1 --- /dev/null +++ b/vendor/github.com/moby/term/term_unix.go @@ -0,0 +1,98 @@ +//go:build !windows +// +build !windows + +package term + +import ( + "errors" + "io" + "os" + + "golang.org/x/sys/unix" +) + +// ErrInvalidState is returned if the state of the terminal is invalid. +// +// Deprecated: ErrInvalidState is no longer used. +var ErrInvalidState = errors.New("Invalid terminal state") + +// terminalState holds the platform-specific state / console mode for the terminal. +type terminalState struct { + termios unix.Termios +} + +func stdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + return os.Stdin, os.Stdout, os.Stderr +} + +func getFdInfo(in interface{}) (uintptr, bool) { + var inFd uintptr + var isTerminalIn bool + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminalIn = isTerminal(inFd) + } + return inFd, isTerminalIn +} + +func getWinsize(fd uintptr) (*Winsize, error) { + uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) + ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} + return ws, err +} + +func setWinsize(fd uintptr, ws *Winsize) error { + return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, &unix.Winsize{ + Row: ws.Height, + Col: ws.Width, + Xpixel: ws.x, + Ypixel: ws.y, + }) +} + +func isTerminal(fd uintptr) bool { + _, err := tcget(fd) + return err == nil +} + +func restoreTerminal(fd uintptr, state *State) error { + if state == nil { + return errors.New("invalid terminal state") + } + return tcset(fd, &state.termios) +} + +func saveState(fd uintptr) (*State, error) { + termios, err := tcget(fd) + if err != nil { + return nil, err + } + return &State{termios: *termios}, nil +} + +func disableEcho(fd uintptr, state *State) error { + newState := state.termios + newState.Lflag &^= unix.ECHO + + return tcset(fd, &newState) +} + +func setRawTerminal(fd uintptr) (*State, error) { + return makeRaw(fd) +} + +func setRawTerminalOutput(fd uintptr) (*State, error) { + return nil, nil +} + +func tcget(fd uintptr) (*unix.Termios, error) { + p, err := unix.IoctlGetTermios(int(fd), getTermios) + if err != nil { + return nil, err + } + return p, nil +} + +func tcset(fd uintptr, p *unix.Termios) error { + return unix.IoctlSetTermios(int(fd), setTermios, p) +} diff --git a/vendor/github.com/moby/term/term_windows.go b/vendor/github.com/moby/term/term_windows.go index 3cdc8edbd..81ccff042 100644 --- a/vendor/github.com/moby/term/term_windows.go +++ b/vendor/github.com/moby/term/term_windows.go @@ -1,6 +1,7 @@ package term import ( + "fmt" "io" "os" "os/signal" @@ -9,22 +10,15 @@ import ( "golang.org/x/sys/windows" ) -// State holds the console mode for the terminal. -type State struct { +// terminalState holds the platform-specific state / console mode for the terminal. +type terminalState struct { mode uint32 } -// Winsize is used for window size. -type Winsize struct { - Height uint16 - Width uint16 -} - // vtInputSupported is true if winterm.ENABLE_VIRTUAL_TERMINAL_INPUT is supported by the console var vtInputSupported bool -// StdStreams returns the standard streams (stdin, stdout, stderr). -func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { +func stdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { // Turn on VT handling on all std handles, if possible. This might // fail, in which case we will fall back to terminal emulation. var ( @@ -87,16 +81,14 @@ func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { stdErr = os.Stderr } - return + return stdIn, stdOut, stdErr } -// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. -func GetFdInfo(in interface{}) (uintptr, bool) { +func getFdInfo(in interface{}) (uintptr, bool) { return windowsconsole.GetHandleInfo(in) } -// GetWinsize returns the window size based on the specified file descriptor. -func GetWinsize(fd uintptr) (*Winsize, error) { +func getWinsize(fd uintptr) (*Winsize, error) { var info windows.ConsoleScreenBufferInfo if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { return nil, err @@ -110,21 +102,21 @@ func GetWinsize(fd uintptr) (*Winsize, error) { return winsize, nil } -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd uintptr) bool { +func setWinsize(fd uintptr, ws *Winsize) error { + return fmt.Errorf("not implemented on Windows") +} + +func isTerminal(fd uintptr) bool { var mode uint32 err := windows.GetConsoleMode(windows.Handle(fd), &mode) return err == nil } -// RestoreTerminal restores the terminal connected to the given file descriptor -// to a previous state. -func RestoreTerminal(fd uintptr, state *State) error { +func restoreTerminal(fd uintptr, state *State) error { return windows.SetConsoleMode(windows.Handle(fd), state.mode) } -// SaveState saves the state of the terminal connected to the given file descriptor. -func SaveState(fd uintptr) (*State, error) { +func saveState(fd uintptr) (*State, error) { var mode uint32 if err := windows.GetConsoleMode(windows.Handle(fd), &mode); err != nil { @@ -134,9 +126,8 @@ func SaveState(fd uintptr) (*State, error) { return &State{mode: mode}, nil } -// DisableEcho disables echo for the terminal connected to the given file descriptor. -// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx -func DisableEcho(fd uintptr, state *State) error { +func disableEcho(fd uintptr, state *State) error { + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx mode := state.mode mode &^= windows.ENABLE_ECHO_INPUT mode |= windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT @@ -150,69 +141,27 @@ func DisableEcho(fd uintptr, state *State) error { return nil } -// SetRawTerminal puts the terminal connected to the given file descriptor into -// raw mode and returns the previous state. On UNIX, this puts both the input -// and output into raw mode. On Windows, it only puts the input into raw mode. -func SetRawTerminal(fd uintptr) (*State, error) { - state, err := MakeRaw(fd) +func setRawTerminal(fd uintptr) (*State, error) { + oldState, err := MakeRaw(fd) if err != nil { return nil, err } // Register an interrupt handler to catch and restore prior state - restoreAtInterrupt(fd, state) - return state, err + restoreAtInterrupt(fd, oldState) + return oldState, err } -// SetRawTerminalOutput puts the output of terminal connected to the given file -// descriptor into raw mode. On UNIX, this does nothing and returns nil for the -// state. On Windows, it disables LF -> CRLF translation. -func SetRawTerminalOutput(fd uintptr) (*State, error) { - state, err := SaveState(fd) +func setRawTerminalOutput(fd uintptr) (*State, error) { + oldState, err := saveState(fd) if err != nil { return nil, err } // Ignore failures, since winterm.DISABLE_NEWLINE_AUTO_RETURN might not be supported on this // version of Windows. - _ = windows.SetConsoleMode(windows.Handle(fd), state.mode|windows.DISABLE_NEWLINE_AUTO_RETURN) - return state, err -} - -// MakeRaw puts the terminal (Windows Console) connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be restored. -func MakeRaw(fd uintptr) (*State, error) { - state, err := SaveState(fd) - if err != nil { - return nil, err - } - - mode := state.mode - - // See - // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx - // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx - - // Disable these modes - mode &^= windows.ENABLE_ECHO_INPUT - mode &^= windows.ENABLE_LINE_INPUT - mode &^= windows.ENABLE_MOUSE_INPUT - mode &^= windows.ENABLE_WINDOW_INPUT - mode &^= windows.ENABLE_PROCESSED_INPUT - - // Enable these modes - mode |= windows.ENABLE_EXTENDED_FLAGS - mode |= windows.ENABLE_INSERT_MODE - mode |= windows.ENABLE_QUICK_EDIT_MODE - if vtInputSupported { - mode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT - } - - err = windows.SetConsoleMode(windows.Handle(fd), mode) - if err != nil { - return nil, err - } - return state, nil + _ = windows.SetConsoleMode(windows.Handle(fd), oldState.mode|windows.DISABLE_NEWLINE_AUTO_RETURN) + return oldState, err } func restoreAtInterrupt(fd uintptr, state *State) { diff --git a/vendor/github.com/moby/term/termios.go b/vendor/github.com/moby/term/termios_unix.go similarity index 50% rename from vendor/github.com/moby/term/termios.go rename to vendor/github.com/moby/term/termios_unix.go index 99c0f7de6..60c823783 100644 --- a/vendor/github.com/moby/term/termios.go +++ b/vendor/github.com/moby/term/termios_unix.go @@ -8,12 +8,11 @@ import ( ) // Termios is the Unix API for terminal I/O. +// +// Deprecated: use [unix.Termios]. type Termios = unix.Termios -// MakeRaw puts the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -func MakeRaw(fd uintptr) (*State, error) { +func makeRaw(fd uintptr) (*State, error) { termios, err := tcget(fd) if err != nil { return nil, err @@ -21,10 +20,10 @@ func MakeRaw(fd uintptr) (*State, error) { oldState := State{termios: *termios} - termios.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON termios.Oflag &^= unix.OPOST - termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) - termios.Cflag &^= (unix.CSIZE | unix.PARENB) + termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN + termios.Cflag &^= unix.CSIZE | unix.PARENB termios.Cflag |= unix.CS8 termios.Cc[unix.VMIN] = 1 termios.Cc[unix.VTIME] = 0 diff --git a/vendor/github.com/moby/term/termios_windows.go b/vendor/github.com/moby/term/termios_windows.go new file mode 100644 index 000000000..5be4e7601 --- /dev/null +++ b/vendor/github.com/moby/term/termios_windows.go @@ -0,0 +1,37 @@ +package term + +import "golang.org/x/sys/windows" + +func makeRaw(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + mode := state.mode + + // See + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx + + // Disable these modes + mode &^= windows.ENABLE_ECHO_INPUT + mode &^= windows.ENABLE_LINE_INPUT + mode &^= windows.ENABLE_MOUSE_INPUT + mode &^= windows.ENABLE_WINDOW_INPUT + mode &^= windows.ENABLE_PROCESSED_INPUT + + // Enable these modes + mode |= windows.ENABLE_EXTENDED_FLAGS + mode |= windows.ENABLE_INSERT_MODE + mode |= windows.ENABLE_QUICK_EDIT_MODE + if vtInputSupported { + mode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT + } + + err = windows.SetConsoleMode(windows.Handle(fd), mode) + if err != nil { + return nil, err + } + return state, nil +} diff --git a/vendor/github.com/moby/term/windows/ansi_reader.go b/vendor/github.com/moby/term/windows/ansi_reader.go index f32aa537e..fb34c547a 100644 --- a/vendor/github.com/moby/term/windows/ansi_reader.go +++ b/vendor/github.com/moby/term/windows/ansi_reader.go @@ -195,10 +195,10 @@ func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) stri // +Key generates ESC N Key if !control && alt { - return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar)) + return ansiterm.KEY_ESC_N + strings.ToLower(string(rune(keyEvent.UnicodeChar))) } - return string(keyEvent.UnicodeChar) + return string(rune(keyEvent.UnicodeChar)) } // formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. diff --git a/vendor/github.com/moby/term/windows/console.go b/vendor/github.com/moby/term/windows/console.go index 116b74e8f..21e57bd52 100644 --- a/vendor/github.com/moby/term/windows/console.go +++ b/vendor/github.com/moby/term/windows/console.go @@ -30,8 +30,11 @@ func GetHandleInfo(in interface{}) (uintptr, bool) { // IsConsole returns true if the given file descriptor is a Windows Console. // The code assumes that GetConsoleMode will return an error for file descriptors that are not a console. -// Deprecated: use golang.org/x/sys/windows.GetConsoleMode() or golang.org/x/term.IsTerminal() -var IsConsole = isConsole +// +// Deprecated: use [windows.GetConsoleMode] or [golang.org/x/term.IsTerminal]. +func IsConsole(fd uintptr) bool { + return isConsole(fd) +} func isConsole(fd uintptr) bool { var mode uint32 diff --git a/vendor/github.com/moby/term/winsize.go b/vendor/github.com/moby/term/winsize.go deleted file mode 100644 index bea8d4595..000000000 --- a/vendor/github.com/moby/term/winsize.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build !windows -// +build !windows - -package term - -import ( - "golang.org/x/sys/unix" -) - -// GetWinsize returns the window size based on the specified file descriptor. -func GetWinsize(fd uintptr) (*Winsize, error) { - uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) - ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} - return ws, err -} - -// SetWinsize tries to set the specified window size for the specified file descriptor. -func SetWinsize(fd uintptr, ws *Winsize) error { - uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y} - return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws) -} diff --git a/vendor/github.com/onsi/ginkgo/v2/.gitignore b/vendor/github.com/onsi/ginkgo/v2/.gitignore new file mode 100644 index 000000000..18793c248 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +TODO +tmp/**/* +*.coverprofile +.vscode +.idea/ +*.log \ No newline at end of file diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md new file mode 100644 index 000000000..fd6e070c1 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -0,0 +1,1085 @@ +## 2.22.0 + +### Features +- Add label to serial nodes [0fcaa08] + +This allows serial tests to be filtered using the `label-filter` + +### Maintenance +Various doc fixes + +## 2.21.0 + + + ### Features + - add support for GINKGO_TIME_FORMAT [a69eb39] + - add GINKGO_NO_COLOR to disable colors via environment variables [bcab9c8] + + ### Fixes + - increase threshold in timeline matcher [e548367] + - Fix the document by replacing `SpecsThatWillBeRun` with `SpecsThatWillRun` + [c2c4d3c] + + ### Maintenance + - bump various dependencies [7e65a00] + +## 2.20.2 + +Require Go 1.22+ + +### Maintenance +- bump go to v1.22 [a671816] + +## 2.20.1 + +### Fixes +- make BeSpecEvent duration matcher more forgiving [d6f9640] + +## 2.20.0 + +### Features +- Add buildvcs flag [be5ab95] + +### Maintenance +- Add update-deps to makefile [d303d14] +- bump all dependencies [7a50221] + +## 2.19.1 + +### Fixes +- update supported platforms for race conditions [63c8c30] +- [build] Allow custom name for binaries. [ff41e27] + +### Maintenance +- bump gomega [76f4e0c] +- Bump rexml from 3.2.6 to 3.2.8 in /docs (#1417) [b69c00d] +- Bump golang.org/x/sys from 0.20.0 to 0.21.0 (#1425) [f097741] + +## 2.19.0 + +### Features + +[Label Sets](https://onsi.github.io/ginkgo/#label-sets) allow for more expressive and flexible label filtering. + +## 2.18.0 + +### Features +- Add --slience-skips and --force-newlines [f010b65] +- fail when no tests were run and --fail-on-empty was set [d80eebe] + +### Fixes +- Fix table entry context edge case [42013d6] + +### Maintenance +- Bump golang.org/x/tools from 0.20.0 to 0.21.0 (#1406) [fcf1fd7] +- Bump github.com/onsi/gomega from 1.33.0 to 1.33.1 (#1399) [8bb14fd] +- Bump golang.org/x/net from 0.24.0 to 0.25.0 (#1407) [04bfad7] + +## 2.17.3 + +### Fixes +`ginkgo watch` now ignores hidden files [bde6e00] + +## 2.17.2 + +### Fixes +- fix: close files [32259c8] +- fix github output log level for skipped specs [780e7a3] + +### Maintenance +- Bump github.com/google/pprof [d91fe4e] +- Bump github.com/go-task/slim-sprig to v3 [8cb662e] +- Bump golang.org/x/net in /integration/_fixtures/version_mismatch_fixture (#1391) [3134422] +- Bump github-pages from 230 to 231 in /docs (#1384) [eca81b4] +- Bump golang.org/x/tools from 0.19.0 to 0.20.0 (#1383) [760def8] +- Bump golang.org/x/net from 0.23.0 to 0.24.0 (#1381) [4ce33f4] +- Fix test for gomega version bump [f2fcd97] +- Bump github.com/onsi/gomega from 1.30.0 to 1.33.0 (#1390) [fd622d2] +- Bump golang.org/x/tools from 0.17.0 to 0.19.0 (#1368) [5474a26] +- Bump github-pages from 229 to 230 in /docs (#1359) [e6d1170] +- Bump google.golang.org/protobuf from 1.28.0 to 1.33.0 (#1374) [7f447b2] +- Bump golang.org/x/net from 0.20.0 to 0.23.0 (#1380) [f15239a] + +## 2.17.1 + +### Fixes +- If the user sets --seed=0, make sure all parallel nodes get the same seed [af0330d] + +## 2.17.0 + +### Features + +- add `--github-output` for nicer output in github actions [e8a2056] + +### Maintenance + +- fix typo in core_dsl.go [977bc6f] +- Fix typo in docs [e297e7b] + +## 2.16.0 + +### Features +- add SpecContext to reporting nodes + +### Fixes +- merge coverages instead of combining them (#1329) (#1340) [23f0cc5] +- core_dsl: disable Getwd() with environment variable (#1357) [cd418b7] + +### Maintenance +- docs/index.md: Typo [2cebe8d] +- fix docs [06de431] +- chore: test with Go 1.22 (#1352) [898cba9] +- Bump golang.org/x/tools from 0.16.1 to 0.17.0 (#1336) [17ae120] +- Bump golang.org/x/sys from 0.15.0 to 0.16.0 (#1327) [5a179ed] +- Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 (#1321) [a1e6b69] +- Bump github-pages and jekyll-feed in /docs (#1351) [d52951d] +- Fix docs for handling failures in goroutines (#1339) [4471b2e] + +## 2.15.0 + +### Features + +- JUnit reports now interpret Label(owner:X) and set owner to X. [8f3bd70] +- include cancellation reason when cancelling spec context [96e915c] + +### Fixes + +- emit output of failed go tool cover invocation so users can try to debug things for themselves [c245d09] +- fix outline when using nodot in ginkgo v2 [dca77c8] +- Document areas where GinkgoT() behaves differently from testing.T [dbaf18f] +- bugfix(docs): use Unsetenv instead of Clearenv (#1337) [6f67a14] + +### Maintenance + +- Bump to go 1.20 [4fcd0b3] + +## 2.14.0 + +### Features +You can now use `GinkgoTB()` when you need an instance of `testing.TB` to pass to a library. + +Prior to this release table testing only supported generating individual `It`s for each test entry. `DescribeTableSubtree` extends table testing support to entire testing subtrees - under the hood `DescrieTableSubtree` generates a new container for each entry and invokes your function to fill our the container. See the [docs](https://onsi.github.io/ginkgo/#generating-subtree-tables) to learn more. + +- Introduce DescribeTableSubtree [65ec56d] +- add GinkgoTB() to docs [4a2c832] +- Add GinkgoTB() function (#1333) [92b6744] + +### Fixes +- Fix typo in internal/suite.go (#1332) [beb9507] +- Fix typo in docs/index.md (#1319) [4ac3a13] +- allow wasm to compile with ginkgo present (#1311) [b2e5bc5] + +### Maintenance +- Bump golang.org/x/tools from 0.16.0 to 0.16.1 (#1316) [465a8ec] +- Bump actions/setup-go from 4 to 5 (#1313) [eab0e40] +- Bump github/codeql-action from 2 to 3 (#1317) [fbf9724] +- Bump golang.org/x/crypto (#1318) [3ee80ee] +- Bump golang.org/x/tools from 0.14.0 to 0.16.0 (#1306) [123e1d5] +- Bump github.com/onsi/gomega from 1.29.0 to 1.30.0 (#1297) [558f6e0] +- Bump golang.org/x/net from 0.17.0 to 0.19.0 (#1307) [84ff7f3] + +## 2.13.2 + +### Fixes +- Fix file handler leak (#1309) [e2e81c8] +- Avoid allocations with `(*regexp.Regexp).MatchString` (#1302) [3b2a2a7] + +## 2.13.1 + +### Fixes +- # 1296 fix(precompiled test guite): exec bit check omitted on Windows (#1301) [26eea01] + +### Maintenance +- Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 (#1291) [7161a9d] +- Bump golang.org/x/sys from 0.13.0 to 0.14.0 (#1295) [7fc7b10] +- Bump golang.org/x/tools from 0.12.0 to 0.14.0 (#1282) [74bbd65] +- Bump github.com/onsi/gomega from 1.27.10 to 1.29.0 (#1290) [9373633] +- Bump golang.org/x/net in /integration/_fixtures/version_mismatch_fixture (#1286) [6e3cf65] + +## 2.13.0 + +### Features + +Add PreviewSpect() to enable programmatic preview access to the suite report (fixes #1225) + +## 2.12.1 + +### Fixes +- Print logr prefix if it exists (#1275) [90d4846] + +### Maintenance +- Bump actions/checkout from 3 to 4 (#1271) [555f543] +- Bump golang.org/x/sys from 0.11.0 to 0.12.0 (#1270) [d867b7d] + +## 2.12.0 + +### Features + +- feat: allow MustPassRepeatedly decorator to be set at suite level (#1266) [05de518] + +### Fixes + +- fix-errors-in-readme (#1244) [27c2f5d] + +### Maintenance + +Various chores/dependency bumps. + +## 2.11.0 + +In prior versions of Ginkgo specs the CLI filter flags (e.g. `--focus`, `--label-filter`) would _override_ any programmatic focus. This behavior has proved surprising and confusing in at least the following ways: + +- users cannot combine programmatic filters and CLI filters to more efficiently select subsets of tests +- CLI filters can override programmatic focus on CI systems resulting in an exit code of 0 despite the presence of (incorrectly!) committed focused specs. + +Going forward Ginkgo will AND all programmatic and CLI filters. Moreover, the presence of any programmatic focused tests will always result in a non-zero exit code. + +This change is technically a change in Ginkgo's external contract and may require some users to make changes to successfully adopt. Specifically: it's possible some users were intentionally using CLI filters to override programmatic focus. If this is you please open an issue so we can explore solutions to the underlying problem you are trying to solve. + +### Fixes +- Programmatic focus is no longer overwrriten by CLI filters [d6bba86] + +### Maintenance +- Bump github.com/onsi/gomega from 1.27.7 to 1.27.8 (#1218) [4a70a38] +- Bump golang.org/x/sys from 0.8.0 to 0.9.0 (#1219) [97eda4d] + +## 2.10.0 + +### Features +- feat(ginkgo/generators): add --tags flag (#1216) [a782a77] + adds a new --tags flag to ginkgo generate + +### Fixes +- Fix broken link of MIGRATING_TO_V2.md (#1217) [548d78e] + +### Maintenance +- Bump golang.org/x/tools from 0.9.1 to 0.9.3 (#1215) [2b76a5e] + +## 2.9.7 + +### Fixes +- fix race when multiple defercleanups are called in goroutines [07fc3a0] + +## 2.9.6 + +### Fixes +- fix: create parent directory before report files (#1212) [0ac65de] + +### Maintenance +- Bump github.com/onsi/gomega from 1.27.6 to 1.27.7 (#1202) [3e39231] + +## 2.9.5 + +### Fixes +- ensure the correct deterministic sort order is produced when ordered specs are generated by a helper function [7fa0b6b] + +### Maintenance +- fix generators link (#1200) [9f9d8b9] +- Bump golang.org/x/tools from 0.8.0 to 0.9.1 (#1196) [150e3f2] +- fix spelling err in docs (#1199) [0013b1a] +- Bump golang.org/x/sys from 0.7.0 to 0.8.0 (#1193) [9e9e3e5] + +## 2.9.4 + +### Fixes +- fix hang with ginkgo -p (#1192) [15d4bdc] - this addresses a _long_ standing issue related to Ginkgo hanging when a child process spawned by the test does not exit. + +- fix: fail fast may cause Serial spec or cleanup Node interrupted (#1178) [8dea88b] - prior to this there was a small gap in which specs on other processes might start even if one process has tried to abort the suite. + + +### Maintenance +- Document run order when multiple setup nodes are at the same nesting level [903be81] + +## 2.9.3 + +### Features +- Add RenderTimeline to GinkgoT() [c0c77b6] + +### Fixes +- update Measure deprecation message. fixes #1176 [227c662] +- add newlines to GinkgoLogr (#1170) (#1171) [0de0e7c] + +### Maintenance +- Bump commonmarker from 0.23.8 to 0.23.9 in /docs (#1183) [8b925ab] +- Bump nokogiri from 1.14.1 to 1.14.3 in /docs (#1184) [e3795a4] +- Bump golang.org/x/tools from 0.7.0 to 0.8.0 (#1182) [b453793] +- Bump actions/setup-go from 3 to 4 (#1164) [73ed75b] +- Bump github.com/onsi/gomega from 1.27.4 to 1.27.6 (#1173) [0a2bc64] +- Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 (#1174) [f41c557] +- Bump golang.org/x/sys from 0.6.0 to 0.7.0 (#1179) [8e423e5] + +## 2.9.2 + +### Maintenance +- Bump github.com/go-task/slim-sprig (#1167) [3fcc5bf] +- Bump github.com/onsi/gomega from 1.27.3 to 1.27.4 (#1163) [6143ffe] + +## 2.9.1 + +### Fixes +This release fixes a longstanding issue where `ginkgo -coverpkg=./...` would not work. This is now resolved and fixes [#1161](https://github.com/onsi/ginkgo/issues/1161) and [#995](https://github.com/onsi/ginkgo/issues/995) +- Support -coverpkg=./... [26ca1b5] +- document coverpkg a bit more clearly [fc44c3b] + +### Maintenance +- bump various dependencies +- Improve Documentation and fix typo (#1158) [93de676] + +## 2.9.0 + +### Features +- AttachProgressReporter is an experimental feature that allows users to provide arbitrary information when a ProgressReport is requested [28801fe] + +- GinkgoT() has been expanded to include several Ginkgo-specific methods [2bd5a3b] + + The intent is to enable the development of third-party libraries that integrate deeply with Ginkgo using `GinkgoT()` to access Ginkgo's functionality. + +## 2.8.4 + +### Features +- Add OmitSuiteSetupNodes to JunitReportConfig (#1147) [979fbc2] +- Add a reference to ginkgolinter in docs.index.md (#1143) [8432589] + +### Fixes +- rename tools hack to see if it fixes things for downstream users [a8bb39a] + +### Maintenance +- Bump golang.org/x/text (#1144) [41b2a8a] +- Bump github.com/onsi/gomega from 1.27.0 to 1.27.1 (#1142) [7c4f583] + +## 2.8.3 + +Released to fix security issue in golang.org/x/net dependency + +### Maintenance + +- Bump golang.org/x/net from 0.6.0 to 0.7.0 (#1141) [fc1a02e] +- remove tools.go hack from documentation [0718693] + +## 2.8.2 + +Ginkgo now includes a `tools.go` file in the root directory of the `ginkgo` package. This should allow modules that simply `go get github.com/onsi/ginkgo/v2` to also pull in the CLI dependencies. This obviates the need for consumers of Ginkgo to have their own `tools.go` file and makes it simpler to ensure that the version of the `ginkgo` CLI being used matches the version of the library. You can simply run `go run github.com/onsi/ginkgo/v2/ginkgo` to run the version of the cli associated with your package go.mod. + +### Maintenance + +- Bump github.com/onsi/gomega from 1.26.0 to 1.27.0 (#1139) [5767b0a] +- Fix minor typos (#1138) [e1e9723] +- Fix link in V2 Migration Guide (#1137) [a588f60] + +## 2.8.1 + +### Fixes +- lock around default report output to avoid triggering the race detector when calling By from goroutines [2d5075a] +- don't run ReportEntries through sprintf [febbe38] + +### Maintenance +- Bump golang.org/x/tools from 0.5.0 to 0.6.0 (#1135) [11a4860] +- test: update matrix for Go 1.20 (#1130) [4890a62] +- Bump golang.org/x/sys from 0.4.0 to 0.5.0 (#1133) [a774638] +- Bump github.com/onsi/gomega from 1.25.0 to 1.26.0 (#1120) [3f233bd] +- Bump github-pages from 227 to 228 in /docs (#1131) [f9b8649] +- Bump activesupport from 6.0.6 to 6.0.6.1 in /docs (#1127) [6f8c042] +- Update index.md with instructions on how to upgrade Ginkgo [833a75e] + +## 2.8.0 + +### Features + +- Introduce GinkgoHelper() to track and exclude helper functions from potential CodeLocations [e19f556] + +Modeled after `testing.T.Helper()`. Now, rather than write code like: + +```go +func helper(model Model) { + Expect(model).WithOffset(1).To(BeValid()) + Expect(model.SerialNumber).WithOffset(1).To(MatchRegexp(/[a-f0-9]*/)) +} +``` + +you can stop tracking offsets (which makes nesting composing helpers nearly impossible) and simply write: + +```go +func helper(model Model) { + GinkgoHelper() + Expect(model).To(BeValid()) + Expect(model.SerialNumber).To(MatchRegexp(/[a-f0-9]*/)) +} +``` + +- Introduce GinkgoLabelFilter() and Label().MatchesLabelFilter() to make it possible to programmatically match filters (fixes #1119) [2f6597c] + +You can now write code like this: + +```go +BeforeSuite(func() { + if Label("slow").MatchesLabelFilter(GinkgoLabelFilter()) { + // do slow setup + } + + if Label("fast").MatchesLabelFilter(GinkgoLabelFilter()) { + // do fast setup + } +}) +``` + +to programmatically check whether a given set of labels will match the configured `--label-filter`. + +### Maintenance + +- Bump webrick from 1.7.0 to 1.8.1 in /docs (#1125) [ea4966e] +- cdeql: add ruby language (#1124) [9dd275b] +- dependabot: add bundler package-ecosystem for docs (#1123) [14e7bdd] + +## 2.7.1 + +### Fixes +- Bring back SuiteConfig.EmitSpecProgress to avoid compilation issue for consumers that set it manually [d2a1cb0] + +### Maintenance +- Bump github.com/onsi/gomega from 1.24.2 to 1.25.0 (#1118) [cafece6] +- Bump golang.org/x/tools from 0.4.0 to 0.5.0 (#1111) [eda66c2] +- Bump golang.org/x/sys from 0.3.0 to 0.4.0 (#1112) [ac5ccaa] +- Bump github.com/onsi/gomega from 1.24.1 to 1.24.2 (#1097) [eee6480] + +## 2.7.0 + +### Features +- Introduce ContinueOnFailure for Ordered containers [e0123ca] - Ordered containers that are also decorated with ContinueOnFailure will not stop running specs after the first spec fails. +- Support for bootstrap commands to use custom data for templates (#1110) [7a2b242] +- Support for labels and pending decorator in ginkgo outline output (#1113) [e6e3b98] +- Color aliases for custom color support (#1101) [49fab7a] + +### Fixes +- correctly ensure deterministic spec order, even if specs are generated by iterating over a map [89dda20] +- Fix a bug where timedout specs were not correctly treated as failures when determining whether or not to run AfterAlls in an Ordered container. +- Ensure go test coverprofile outputs to the expected location (#1105) [b0bd77b] + +## 2.6.1 + +### Features +- Override formatter colors from envvars - this is a new feature but an alternative approach involving config files might be taken in the future (#1095) [60240d1] + +### Fixes +- GinkgoRecover now supports ignoring panics that match a specific, hidden, interface [301f3e2] + +### Maintenance +- Bump github.com/onsi/gomega from 1.24.0 to 1.24.1 (#1077) [3643823] +- Bump golang.org/x/tools from 0.2.0 to 0.4.0 (#1090) [f9f856e] +- Bump nokogiri from 1.13.9 to 1.13.10 in /docs (#1091) [0d7087e] + +## 2.6.0 + +### Features +- `ReportBeforeSuite` provides access to the suite report before the suite begins. +- Add junit config option for omitting leafnodetype (#1088) [956e6d2] +- Add support to customize junit report config to omit spec labels (#1087) [de44005] + +### Fixes +- Fix stack trace pruning so that it has a chance of working on windows [2165648] + +## 2.5.1 + +### Fixes +- skipped tests only show as 'S' when running with -v [3ab38ae] +- Fix typo in docs/index.md (#1082) [55fc58d] +- Fix typo in docs/index.md (#1081) [8a14f1f] +- Fix link notation in docs/index.md (#1080) [2669612] +- Fix typo in `--progress` deprecation message (#1076) [b4b7edc] + +### Maintenance +- chore: Included githubactions in the dependabot config (#976) [baea341] +- Bump golang.org/x/sys from 0.1.0 to 0.2.0 (#1075) [9646297] + +## 2.5.0 + +### Ginkgo output now includes a timeline-view of the spec + +This commit changes Ginkgo's default output. Spec details are now +presented as a **timeline** that includes events that occur during the spec +lifecycle interleaved with any GinkgoWriter content. This makes is much easier +to understand the flow of a spec and where a given failure occurs. + +The --progress, --slow-spec-threshold, --always-emit-ginkgo-writer flags +and the SuppressProgressReporting decorator have all been deprecated. Instead +the existing -v and -vv flags better capture the level of verbosity to display. However, +a new --show-node-events flag is added to include node `> Enter` and `< Exit` events +in the spec timeline. + +In addition, JUnit reports now include the timeline (rendered with -vv) and custom JUnit +reports can be configured and generated using +`GenerateJUnitReportWithConfig(report types.Report, dst string, config JunitReportConfig)` + +Code should continue to work unchanged with this version of Ginkgo - however if you have tooling that +was relying on the specific output format of Ginkgo you _may_ run into issues. Ginkgo's console output is not guaranteed to be stable for tooling and automation purposes. You should, instead, use Ginkgo's JSON format +to build tooling on top of as it has stronger guarantees to be stable from version to version. + +### Features +- Provide details about which timeout expired [0f2fa27] + +### Fixes +- Add Support Policy to docs [c70867a] + +### Maintenance +- Bump github.com/onsi/gomega from 1.22.1 to 1.23.0 (#1070) [bb3b4e2] + +## 2.4.0 + +### Features + +- DeferCleanup supports functions with multiple-return values [5e33c75] +- Add GinkgoLogr (#1067) [bf78c28] +- Introduction of 'MustPassRepeatedly' decorator (#1051) [047c02f] + +### Fixes +- correcting some typos (#1064) [1403d3c] +- fix flaky internal_integration interrupt specs [2105ba3] +- Correct busted link in README [be6b5b9] + +### Maintenance +- Bump actions/checkout from 2 to 3 (#1062) [8a2f483] +- Bump golang.org/x/tools from 0.1.12 to 0.2.0 (#1065) [529c4e8] +- Bump github/codeql-action from 1 to 2 (#1061) [da09146] +- Bump actions/setup-go from 2 to 3 (#1060) [918040d] +- Bump github.com/onsi/gomega from 1.22.0 to 1.22.1 (#1053) [2098e4d] +- Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#1066) [1d74122] +- Add GHA to dependabot config [4442772] + +## 2.3.1 + +## Fixes +Several users were invoking `ginkgo` by installing the latest version of the cli via `go install github.com/onsi/ginkgo/v2/ginkgo@latest`. When 2.3.0 was released this resulted in an influx of issues as CI systems failed due to a change in the internal contract between the Ginkgo CLI and the Ginkgo library. Ginkgo only supports running the same version of the library as the cli (which is why both are packaged in the same repository). + +With this patch release, the ginkgo CLI can now identify a version mismatch and emit a helpful error message. + +- Ginkgo cli can identify version mismatches and emit a helpful error message [bc4ae2f] +- further emphasize that a version match is required when running Ginkgo on CI and/or locally [2691dd8] + +### Maintenance +- bump gomega to v1.22.0 [822a937] + +## 2.3.0 + +### Interruptible Nodes and Timeouts + +Ginkgo now supports per-node and per-spec timeouts on interruptible nodes. Check out the [documentation for all the details](https://onsi.github.io/ginkgo/#spec-timeouts-and-interruptible-nodes) but the gist is you can now write specs like this: + +```go +It("is interruptible", func(ctx SpecContext) { // or context.Context instead of SpecContext, both are valid. + // do things until `ctx.Done()` is closed, for example: + req, err := http.NewRequestWithContext(ctx, "POST", "/build-widgets", nil) + Expect(err).NotTo(HaveOccured()) + _, err := http.DefaultClient.Do(req) + Expect(err).NotTo(HaveOccured()) + + Eventually(client.WidgetCount).WithContext(ctx).Should(Equal(17)) +}, NodeTimeout(time.Second*20), GracePeriod(5*time.Second)) +``` + +and have Ginkgo ensure that the node completes before the timeout elapses. If it does elapse, or if an external interrupt is received (e.g. `^C`) then Ginkgo will cancel the context and wait for the Grace Period for the node to exit before proceeding with any cleanup nodes associated with the spec. The `ctx` provided by Ginkgo can also be passed down to Gomega's `Eventually` to have all assertions within the node governed by a single deadline. + +### Features + +- Ginkgo now records any additional failures that occur during the cleanup of a failed spec. In prior versions this information was quietly discarded, but the introduction of a more rigorous approach to timeouts and interruptions allows Ginkgo to better track subsequent failures. +- `SpecContext` also provides a mechanism for third-party libraries to provide additional information when a Progress Report is generated. Gomega uses this to provide the current state of an `Eventually().WithContext()` assertion when a Progress Report is requested. +- DescribeTable now exits with an error if it is not passed any Entries [a4c9865] + +## Fixes +- fixes crashes on newer Ruby 3 installations by upgrading github-pages gem dependency [92c88d5] +- Make the outline command able to use the DSL import [1be2427] + +## Maintenance +- chore(docs): delete no meaning d [57c373c] +- chore(docs): Fix hyperlinks [30526d5] +- chore(docs): fix code blocks without language settings [cf611c4] +- fix intra-doc link [b541bcb] + +## 2.2.0 + +### Generate real-time Progress Reports [f91377c] + +Ginkgo can now generate Progress Reports to point users at the current running line of code (including a preview of the actual source code) and a best guess at the most relevant subroutines. + +These Progress Reports allow users to debug stuck or slow tests without exiting the Ginkgo process. A Progress Report can be generated at any time by sending Ginkgo a `SIGINFO` (`^T` on MacOS/BSD) or `SIGUSR1`. + +In addition, the user can specify `--poll-progress-after` and `--poll-progress-interval` to have Ginkgo start periodically emitting progress reports if a given node takes too long. These can be overriden/set on a per-node basis with the `PollProgressAfter` and `PollProgressInterval` decorators. + +Progress Reports are emitted to stdout, and also stored in the machine-redable report formats that Ginkgo supports. + +Ginkgo also uses this progress reporting infrastructure under the hood when handling timeouts and interrupts. This yields much more focused, useful, and informative stack traces than previously. + +### Features +- `BeforeSuite`, `AfterSuite`, `SynchronizedBeforeSuite`, `SynchronizedAfterSuite`, and `ReportAfterSuite` now support (the relevant subset of) decorators. These can be passed in _after_ the callback functions that are usually passed into these nodes. + + As a result the **signature of these methods has changed** and now includes a trailing `args ...interface{}`. For most users simply using the DSL, this change is transparent. However if you were assigning one of these functions to a custom variable (or passing it around) then your code may need to change to reflect the new signature. + +### Maintenance +- Modernize the invocation of Ginkgo in github actions [0ffde58] +- Update reocmmended CI settings in docs [896bbb9] +- Speed up unnecessarily slow integration test [6d3a90e] + +## 2.1.6 + +### Fixes +- Add `SuppressProgressReporting` decorator to turn off --progress announcements for a given node [dfef62a] +- chore: remove duplicate word in comments [7373214] + +## 2.1.5 + +### Fixes +- drop -mod=mod instructions; fixes #1026 [6ad7138] +- Ensure `CurrentSpecReport` and `AddReportEntry` are thread-safe [817c09b] +- remove stale importmap gcflags flag test [3cd8b93] +- Always emit spec summary [5cf23e2] - even when only one spec has failed +- Fix ReportAfterSuite usage in docs [b1864ad] +- fixed typo (#997) [219cc00] +- TrimRight is not designed to trim Suffix [71ebb74] +- refactor: replace strings.Replace with strings.ReplaceAll (#978) [143d208] +- fix syntax in examples (#975) [b69554f] + +### Maintenance +- Bump github.com/onsi/gomega from 1.20.0 to 1.20.1 (#1027) [e5dfce4] +- Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#1006) [7ae91c4] +- Bump github.com/onsi/gomega from 1.19.0 to 1.20.0 (#1005) [e87a85a] +- test: add new Go 1.19 to test matrix (#1014) [bbefe12] +- Bump golang.org/x/tools from 0.1.11 to 0.1.12 (#1012) [9327906] +- Bump golang.org/x/tools from 0.1.10 to 0.1.11 (#993) [f44af96] +- Bump nokogiri from 1.13.3 to 1.13.6 in /docs (#981) [ef336aa] + +## 2.1.4 + +### Fixes +- Numerous documentation typos +- Prepend `when` when using `When` (this behavior was in 1.x but unintentionally lost during the 2.0 rewrite) [efce903] +- improve error message when a parallel process fails to report back [a7bd1fe] +- guard against concurrent map writes in DeprecationTracker [0976569] +- Invoke reporting nodes during dry-run (fixes #956 and #935) [aae4480] +- Fix ginkgo import circle [f779385] + +## 2.1.3 + +See [https://onsi.github.io/ginkgo/MIGRATING_TO_V2](https://onsi.github.io/ginkgo/MIGRATING_TO_V2) for details on V2. + +### Fixes +- Calling By in a container node now emits a useful error. [ff12cee] + +## 2.1.2 + +### Fixes + +- Track location of focused specs correctly in `ginkgo unfocus` [a612ff1] +- Profiling suites with focused specs no longer generates an erroneous failure message [8fbfa02] +- Several documentation typos fixed. Big thanks to everyone who helped catch them and report/fix them! + +## 2.1.1 + +See [https://onsi.github.io/ginkgo/MIGRATING_TO_V2](https://onsi.github.io/ginkgo/MIGRATING_TO_V2) for details on V2. + +### Fixes +- Suites that only import the new dsl packages are now correctly identified as Ginkgo suites [ec17e17] + +## 2.1.0 + +See [https://onsi.github.io/ginkgo/MIGRATING_TO_V2](https://onsi.github.io/ginkgo/MIGRATING_TO_V2) for details on V2. + +2.1.0 is a minor release with a few tweaks: + +- Introduce new DSL packages to enable users to pick-and-choose which portions of the DSL to dot-import. [90868e2] More details [here](https://onsi.github.io/ginkgo/#alternatives-to-dot-importing-ginkgo). +- Add error check for invalid/nil parameters to DescribeTable [6f8577e] +- Myriad docs typos fixed (thanks everyone!) [718542a, ecb7098, 146654c, a8f9913, 6bdffde, 03dcd7e] + +## 2.0.0 + +See [https://onsi.github.io/ginkgo/MIGRATING_TO_V2](https://onsi.github.io/ginkgo/MIGRATING_TO_V2) + +## 1.16.5 + +Ginkgo 2.0 now has a Release Candidate. 1.16.5 advertises the existence of the RC. +1.16.5 deprecates GinkgoParallelNode in favor of GinkgoParallelProcess + +You can silence the RC advertisement by setting an `ACK_GINKGO_RC=true` environment variable or creating a file in your home directory called `.ack-ginkgo-rc` + +## 1.16.4 + +### Fixes +1.16.4 retracts 1.16.3. There are no code changes. The 1.16.3 tag was associated with the wrong commit and an attempt to change it after-the-fact has proven problematic. 1.16.4 retracts 1.16.3 in Ginkgo's go.mod and creates a new, correctly tagged, release. + +## 1.16.3 + +### Features +- Measure is now deprecated and emits a deprecation warning. + +## 1.16.2 + +### Fixes +- Deprecations can be suppressed by setting an `ACK_GINKGO_DEPRECATIONS=` environment variable. + +## 1.16.1 + +### Fixes +- Suppress --stream deprecation warning on windows (#793) + +## 1.16.0 + +### Features +- Advertise Ginkgo 2.0. Introduce deprecations. [9ef1913] + - Update README.md to advertise that Ginkgo 2.0 is coming. + - Backport the 2.0 DeprecationTracker and start alerting users + about upcoming deprecations. + +- Add slim-sprig template functions to bootstrap/generate (#775) [9162b86] + +- Fix accidental reference to 1488 (#784) [9fb7fe4] + +## 1.15.2 + +### Fixes +- ignore blank `-focus` and `-skip` flags (#780) [e90a4a0] + +## 1.15.1 + +### Fixes +- reporters/junit: Use `system-out` element instead of `passed` (#769) [9eda305] + +## 1.15.0 + +### Features +- Adds 'outline' command to print the outline of specs/containers in a file (#754) [071c369] [6803cc3] [935b538] [06744e8] [0c40583] +- Add support for using template to generate tests (#752) [efb9e69] +- Add a Chinese Doc #755 (#756) [5207632] +- cli: allow multiple -focus and -skip flags (#736) [9a782fb] + +### Fixes +- Add _internal to filename of tests created with internal flag (#751) [43c12da] + +## 1.14.2 + +### Fixes +- correct handling windows backslash in import path (#721) [97f3d51] +- Add additional methods to GinkgoT() to improve compatibility with the testing.TB interface [b5fe44d] + +## 1.14.1 + +### Fixes +- Discard exported method declaration when running ginkgo bootstrap (#558) [f4b0240] + +## 1.14.0 + +### Features +- Defer running top-level container nodes until RunSpecs is called [d44dedf] +- [Document Ginkgo lifecycle](http://onsi.github.io/ginkgo/#understanding-ginkgos-lifecycle) +- Add `extensions/globals` package (#692) [3295c8f] - this can be helpful in contexts where you are test-driving your test-generation code (see [#692](https://github.com/onsi/ginkgo/pull/692)) +- Print Skip reason in JUnit reporter if one was provided [820dfab] + +## 1.13.0 + +### Features +- Add a version of table.Entry that allows dumping the entry parameters. (#689) [21eaef2] + +### Fixes +- Ensure integration tests pass in an environment sans GOPATH [606fba2] +- Add books package (#568) [fc0e44e] +- doc(readme): installation via "tools package" (#677) [83bb20e] +- Solve the undefined: unix.Dup2 compile error on mips64le (#680) [0624f75] +- Import package without dot (#687) [6321024] +- Fix integration tests to stop require GOPATH (#686) [a912ec5] + +## 1.12.3 + +### Fixes +- Print correct code location of failing table test (#666) [c6d7afb] + +## 1.12.2 + +### Fixes +- Update dependencies [ea4a036] + +## 1.12.1 + +### Fixes +- Make unfocus ("blur") much faster (#674) [8b18061] +- Fix typo (#673) [7fdcbe8] +- Test against 1.14 and remove 1.12 [d5c2ad6] +- Test if a coverprofile content is empty before checking its latest character (#670) [14d9fa2] +- replace tail package with maintained one. this fixes go get errors (#667) [4ba33d4] +- improve ginkgo performance - makes progress on #644 [a14f98e] +- fix convert integration tests [1f8ba69] +- fix typo successful -> successful (#663) [1ea49cf] +- Fix invalid link (#658) [b886136] +- convert utility : Include comments from source (#657) [1077c6d] +- Explain what BDD means [d79e7fb] +- skip race detector test on unsupported platform (#642) [f8ab89d] +- Use Dup2 from golang.org/x/sys/unix instead of syscallDup (#638) [5d53c55] +- Fix missing newline in combined coverage file (#641) [6a07ea2] +- check if a spec is run before returning SpecSummary (#645) [8850000] + +## 1.12.0 + +### Features +- Add module definition (#630) [78916ab] + +## 1.11.0 + +### Features +- Add syscall for riscv64 architecture [f66e896] +- teamcity reporter: output location of test failure as well as test definition (#626) [9869142] +- teamcity reporter: output newline after every service message (#625) [3cfa02d] +- Add support for go module when running `generate` command (#578) [9c89e3f] + +## 1.10.3 + +### Fixes +- Set go_import_path in travis.yml to allow internal packages in forks (#607) [3b721db] +- Add integration test [d90e0dc] +- Fix coverage files combining [e5dde8c] +- A new CLI option: -ginkgo.reportFile (#601) [034fd25] + +## 1.10.2 + +### Fixes +- speed up table entry generateIt() (#609) [5049dc5] +- Fix. Write errors to stderr instead of stdout (#610) [7bb3091] + +## 1.10.1 + +### Fixes +- stack backtrace: fix skipping (#600) [2a4c0bd] + +## 1.10.0 + +### Fixes +- stack backtrace: fix alignment and skipping [66915d6] +- fix typo in documentation [8f97b93] + +## 1.9.0 + +### Features +- Option to print output into report, when tests have passed [0545415] + +### Fixes +- Fixed typos in comments [0ecbc58] +- gofmt code [a7f8bfb] +- Simplify code [7454d00] +- Simplify concatenation, incrementation and function assignment [4825557] +- Avoid unnecessary conversions [9d9403c] +- JUnit: include more detailed information about panic [19cca4b] +- Print help to stdout when the user asks for help [4cb7441] + + +## 1.8.0 + +### New Features +- allow config of the vet flag for `go test` (#562) [3cd45fa] +- Support projects using go modules [d56ee76] + +### Fixes and Minor Improvements +- chore(godoc): fixes typos in Measurement funcs [dbaca8e] +- Optimize focus to avoid allocations [f493786] +- Ensure generated test file names are underscored [505cc35] + +## 1.7.0 + +### New Features +- Add JustAfterEach (#484) [0d4f080] + +### Fixes +- Correctly round suite time in junit reporter [2445fc1] +- Avoid using -i argument to go test for Golang 1.10+ [46bbc26] + +## 1.6.0 + +### New Features +- add --debug flag to emit node output to files (#499) [39febac] + +### Fixes +- fix: for `go vet` to pass [69338ec] +- docs: fix for contributing instructions [7004cb1] +- consolidate and streamline contribution docs (#494) [d848015] +- Make generated Junit file compatible with "Maven Surefire" (#488) [e51bee6] +- all: gofmt [000d317] +- Increase eventually timeout to 30s [c73579c] +- Clarify asynchronous test behavior [294d8f4] +- Travis badge should only show master [26d2143] + +## 1.5.0 5/10/2018 + +### New Features +- Supports go v1.10 (#443, #446, #451) [e873237, 468e89e, e37dbfe, a37f4c0, c0b857d, bca5260, 4177ca8] +- Add a When() synonym for Context() (#386) [747514b, 7484dad, 7354a07, dd826c8] +- Re-add noisySkippings flag [652e15c] +- Allow coverage to be displayed for focused specs (#367) [11459a8] +- Handle -outputdir flag (#364) [228e3a8] +- Handle -coverprofile flag (#355) [43392d5] + +### Fixes +- When using custom reporters register the custom reporters *before* the default reporter. This allows users to see the output of any print statements in their customer reporters. (#365) [8382b23] +- When running a test and calculating the coverage using the `-coverprofile` and `-outputdir` flags, Ginkgo fails with an error if the directory does not exist. This is due to an [issue in go 1.10](https://github.com/golang/go/issues/24588) (#446) [b36a6e0] +- `unfocus` command ignores vendor folder (#459) [e5e551c, c556e43, a3b6351, 9a820dd] +- Ignore packages whose tests are all ignored by go (#456) [7430ca7, 6d8be98] +- Increase the threshold when checking time measurements (#455) [2f714bf, 68f622c] +- Fix race condition in coverage tests (#423) [a5a8ff7, ab9c08b] +- Add an extra new line after reporting spec run completion for test2json [874520d] +- added name name field to junit reported testsuite [ae61c63] +- Do not set the run time of a spec when the dryRun flag is used (#438) [457e2d9, ba8e856] +- Process FWhen and FSpecify when unfocusing (#434) [9008c7b, ee65bd, df87dfe] +- Synchronies the access to the state of specs to avoid race conditions (#430) [7d481bc, ae6829d] +- Added Duration on GinkgoTestDescription (#383) [5f49dad, 528417e, 0747408, 329d7ed] +- Fix Ginkgo stack trace on failure for Specify (#415) [b977ede, 65ca40e, 6c46eb8] +- Update README with Go 1.6+, Golang -> Go (#409) [17f6b97, bc14b66, 20d1598] +- Use fmt.Errorf instead of errors.New(fmt.Sprintf (#401) [a299f56, 44e2eaa] +- Imports in generated code should follow conventions (#398) [0bec0b0, e8536d8] +- Prevent data race error when Recording a benchmark value from multiple go routines (#390) [c0c4881, 7a241e9] +- Replace GOPATH in Environment [4b883f0] + + +## 1.4.0 7/16/2017 + +- `ginkgo` now provides a hint if you accidentally forget to run `ginkgo bootstrap` to generate a `*_suite_test.go` file that actually invokes the Ginkgo test runner. [#345](https://github.com/onsi/ginkgo/pull/345) +- thanks to improvements in `go test -c` `ginkgo` no longer needs to fix Go's compilation output to ensure compilation errors are expressed relative to the CWD. [#357] +- `ginkgo watch -watchRegExp=...` allows you to specify a custom regular expression to watch. Only files matching the regular expression are watched for changes (the default is `\.go$`) [#356] +- `ginkgo` now always emits compilation output. Previously, only failed compilation output was printed out. [#277] +- `ginkgo -requireSuite` now fails the test run if there are `*_test.go` files but `go test` fails to detect any tests. Typically this means you forgot to run `ginkgo bootstrap` to generate a suite file. [#344] +- `ginkgo -timeout=DURATION` allows you to adjust the timeout for the entire test suite (default is 24 hours) [#248] + +## 1.3.0 3/28/2017 + +Improvements: + +- Significantly improved parallel test distribution. Now instead of pre-sharding test cases across workers (which can result in idle workers and poor test performance) Ginkgo uses a shared queue to keep all workers busy until all tests are complete. This improves test-time performance and consistency. +- `Skip(message)` can be used to skip the current test. +- Added `extensions/table` - a Ginkgo DSL for [Table Driven Tests](http://onsi.github.io/ginkgo/#table-driven-tests) +- Add `GinkgoRandomSeed()` - shorthand for `config.GinkgoConfig.RandomSeed` +- Support for retrying flaky tests with `--flakeAttempts` +- `ginkgo ./...` now recurses as you'd expect +- Added `Specify` a synonym for `It` +- Support colorise on Windows +- Broader support for various go compilation flags in the `ginkgo` CLI + +Bug Fixes: + +- Ginkgo tests now fail when you `panic(nil)` (#167) + +## 1.2.0 5/31/2015 + +Improvements + +- `ginkgo -coverpkg` calls down to `go test -coverpkg` (#160) +- `ginkgo -afterSuiteHook COMMAND` invokes the passed-in `COMMAND` after a test suite completes (#152) +- Relaxed requirement for Go 1.4+. `ginkgo` now works with Go v1.3+ (#166) + +## 1.2.0-beta + +Ginkgo now requires Go 1.4+ + +Improvements: + +- Call reporters in reverse order when announcing spec completion -- allows custom reporters to emit output before the default reporter does. +- Improved focus behavior. Now, this: + + ```golang + FDescribe("Some describe", func() { + It("A", func() {}) + + FIt("B", func() {}) + }) + ``` + + will run `B` but *not* `A`. This tends to be a common usage pattern when in the thick of writing and debugging tests. +- When `SIGINT` is received, Ginkgo will emit the contents of the `GinkgoWriter` before running the `AfterSuite`. Useful for debugging stuck tests. +- When `--progress` is set, Ginkgo will write test progress (in particular, Ginkgo will say when it is about to run a BeforeEach, AfterEach, It, etc...) to the `GinkgoWriter`. This is useful for debugging stuck tests and tests that generate many logs. +- Improved output when an error occurs in a setup or teardown block. +- When `--dryRun` is set, Ginkgo will walk the spec tree and emit to its reporter *without* actually running anything. Best paired with `-v` to understand which specs will run in which order. +- Add `By` to help document long `It`s. `By` simply writes to the `GinkgoWriter`. +- Add support for precompiled tests: + - `ginkgo build ` will now compile the package, producing a file named `package.test` + - The compiled `package.test` file can be run directly. This runs the tests in series. + - To run precompiled tests in parallel, you can run: `ginkgo -p package.test` +- Support `bootstrap`ping and `generate`ing [Agouti](http://agouti.org) specs. +- `ginkgo generate` and `ginkgo bootstrap` now honor the package name already defined in a given directory +- The `ginkgo` CLI ignores `SIGQUIT`. Prevents its stack dump from interlacing with the underlying test suite's stack dump. +- The `ginkgo` CLI now compiles tests into a temporary directory instead of the package directory. This necessitates upgrading to Go v1.4+. +- `ginkgo -notify` now works on Linux + +Bug Fixes: + +- If --skipPackages is used and all packages are skipped, Ginkgo should exit 0. +- Fix tempfile leak when running in parallel +- Fix incorrect failure message when a panic occurs during a parallel test run +- Fixed an issue where a pending test within a focused context (or a focused test within a pending context) would skip all other tests. +- Be more consistent about handling SIGTERM as well as SIGINT +- When interrupted while concurrently compiling test suites in the background, Ginkgo now cleans up the compiled artifacts. +- Fixed a long standing bug where `ginkgo -p` would hang if a process spawned by one of the Ginkgo parallel nodes does not exit. (Hooray!) + +## 1.1.0 (8/2/2014) + +No changes, just dropping the beta. + +## 1.1.0-beta (7/22/2014) +New Features: + +- `ginkgo watch` now monitors packages *and their dependencies* for changes. The depth of the dependency tree can be modified with the `-depth` flag. +- Test suites with a programmatic focus (`FIt`, `FDescribe`, etc...) exit with non-zero status code, even when they pass. This allows CI systems to detect accidental commits of focused test suites. +- `ginkgo -p` runs the testsuite in parallel with an auto-detected number of nodes. +- `ginkgo -tags=TAG_LIST` passes a list of tags down to the `go build` command. +- `ginkgo --failFast` aborts the test suite after the first failure. +- `ginkgo generate file_1 file_2` can take multiple file arguments. +- Ginkgo now summarizes any spec failures that occurred at the end of the test run. +- `ginkgo --randomizeSuites` will run tests *suites* in random order using the generated/passed-in seed. + +Improvements: + +- `ginkgo -skipPackage` now takes a comma-separated list of strings. If the *relative path* to a package matches one of the entries in the comma-separated list, that package is skipped. +- `ginkgo --untilItFails` no longer recompiles between attempts. +- Ginkgo now panics when a runnable node (`It`, `BeforeEach`, `JustBeforeEach`, `AfterEach`, `Measure`) is nested within another runnable node. This is always a mistake. Any test suites that panic because of this change should be fixed. + +Bug Fixes: + +- `ginkgo boostrap` and `ginkgo generate` no longer fail when dealing with `hyphen-separated-packages`. +- parallel specs are now better distributed across nodes - fixed a crashing bug where (for example) distributing 11 tests across 7 nodes would panic + +## 1.0.0 (5/24/2014) +New Features: + +- Add `GinkgoParallelNode()` - shorthand for `config.GinkgoConfig.ParallelNode` + +Improvements: + +- When compilation fails, the compilation output is rewritten to present a correct *relative* path. Allows ⌘-clicking in iTerm open the file in your text editor. +- `--untilItFails` and `ginkgo watch` now generate new random seeds between test runs, unless a particular random seed is specified. + +Bug Fixes: + +- `-cover` now generates a correctly combined coverprofile when running with in parallel with multiple `-node`s. +- Print out the contents of the `GinkgoWriter` when `BeforeSuite` or `AfterSuite` fail. +- Fix all remaining race conditions in Ginkgo's test suite. + +## 1.0.0-beta (4/14/2014) +Breaking changes: + +- `thirdparty/gomocktestreporter` is gone. Use `GinkgoT()` instead +- Modified the Reporter interface +- `watch` is now a subcommand, not a flag. + +DSL changes: + +- `BeforeSuite` and `AfterSuite` for setting up and tearing down test suites. +- `AfterSuite` is triggered on interrupt (`^C`) as well as exit. +- `SynchronizedBeforeSuite` and `SynchronizedAfterSuite` for setting up and tearing down singleton resources across parallel nodes. + +CLI changes: + +- `watch` is now a subcommand, not a flag +- `--nodot` flag can be passed to `ginkgo generate` and `ginkgo bootstrap` to avoid dot imports. This explicitly imports all exported identifiers in Ginkgo and Gomega. Refreshing this list can be done by running `ginkgo nodot` +- Additional arguments can be passed to specs. Pass them after the `--` separator +- `--skipPackage` flag takes a regexp and ignores any packages with package names passing said regexp. +- `--trace` flag prints out full stack traces when errors occur, not just the line at which the error occurs. + +Misc: + +- Start using semantic versioning +- Start maintaining changelog + +Major refactor: + +- Pull out Ginkgo's internal to `internal` +- Rename `example` everywhere to `spec` +- Much more! diff --git a/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md b/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md new file mode 100644 index 000000000..80de566a5 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing to Ginkgo + +Your contributions to Ginkgo are essential for its long-term maintenance and improvement. + +- Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! +- Ensure adequate test coverage: + - When adding to the Ginkgo library, add unit and/or integration tests (under the `integration` folder). + - When adding to the Ginkgo CLI, note that there are very few unit tests. Please add an integration test. +- Run `make` or: + - Install ginkgo locally via `go install ./...` + - Make sure all the tests succeed via `ginkgo -r -p` + - Vet your changes via `go vet ./...` +- Update the documentation. Ginkgo uses `godoc` comments and documentation in `docs/index.md`. You can run `bundle && bundle exec jekyll serve` in the `docs` directory to preview your changes. + +Thanks for supporting Ginkgo! diff --git a/vendor/github.com/onsi/ginkgo/v2/LICENSE b/vendor/github.com/onsi/ginkgo/v2/LICENSE new file mode 100644 index 000000000..9415ee72c --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/onsi/ginkgo/v2/Makefile b/vendor/github.com/onsi/ginkgo/v2/Makefile new file mode 100644 index 000000000..06dff97cd --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/Makefile @@ -0,0 +1,16 @@ +# default task since it's first +.PHONY: all +all: vet test + +.PHONY: test +test: + go run github.com/onsi/ginkgo/v2/ginkgo -r -p -randomize-all -keep-going + +.PHONY: vet +vet: + go vet ./... + +.PHONY: update-deps +update-deps: + go get -u ./... + go mod tidy \ No newline at end of file diff --git a/vendor/github.com/onsi/ginkgo/v2/README.md b/vendor/github.com/onsi/ginkgo/v2/README.md new file mode 100644 index 000000000..cb23ffdf6 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/README.md @@ -0,0 +1,115 @@ +![Ginkgo](https://onsi.github.io/ginkgo/images/ginkgo.png) + +[![test](https://github.com/onsi/ginkgo/workflows/test/badge.svg?branch=master)](https://github.com/onsi/ginkgo/actions?query=workflow%3Atest+branch%3Amaster) | [Ginkgo Docs](https://onsi.github.io/ginkgo/) + +--- + +# Ginkgo + +Ginkgo is a mature testing framework for Go designed to help you write expressive specs. Ginkgo builds on top of Go's `testing` foundation and is complemented by the [Gomega](https://github.com/onsi/gomega) matcher library. Together, Ginkgo and Gomega let you express the intent behind your specs clearly: + +```go +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + ... +) + +var _ = Describe("Checking books out of the library", Label("library"), func() { + var library *libraries.Library + var book *books.Book + var valjean *users.User + BeforeEach(func() { + library = libraries.NewClient() + book = &books.Book{ + Title: "Les Miserables", + Author: "Victor Hugo", + } + valjean = users.NewUser("Jean Valjean") + }) + + When("the library has the book in question", func() { + BeforeEach(func(ctx SpecContext) { + Expect(library.Store(ctx, book)).To(Succeed()) + }) + + Context("and the book is available", func() { + It("lends it to the reader", func(ctx SpecContext) { + Expect(valjean.Checkout(ctx, library, "Les Miserables")).To(Succeed()) + Expect(valjean.Books()).To(ContainElement(book)) + Expect(library.UserWithBook(ctx, book)).To(Equal(valjean)) + }, SpecTimeout(time.Second * 5)) + }) + + Context("but the book has already been checked out", func() { + var javert *users.User + BeforeEach(func(ctx SpecContext) { + javert = users.NewUser("Javert") + Expect(javert.Checkout(ctx, library, "Les Miserables")).To(Succeed()) + }) + + It("tells the user", func(ctx SpecContext) { + err := valjean.Checkout(ctx, library, "Les Miserables") + Expect(err).To(MatchError("Les Miserables is currently checked out")) + }, SpecTimeout(time.Second * 5)) + + It("lets the user place a hold and get notified later", func(ctx SpecContext) { + Expect(valjean.Hold(ctx, library, "Les Miserables")).To(Succeed()) + Expect(valjean.Holds(ctx)).To(ContainElement(book)) + + By("when Javert returns the book") + Expect(javert.Return(ctx, library, book)).To(Succeed()) + + By("it eventually informs Valjean") + notification := "Les Miserables is ready for pick up" + Eventually(ctx, valjean.Notifications).Should(ContainElement(notification)) + + Expect(valjean.Checkout(ctx, library, "Les Miserables")).To(Succeed()) + Expect(valjean.Books(ctx)).To(ContainElement(book)) + Expect(valjean.Holds(ctx)).To(BeEmpty()) + }, SpecTimeout(time.Second * 10)) + }) + }) + + When("the library does not have the book in question", func() { + It("tells the reader the book is unavailable", func(ctx SpecContext) { + err := valjean.Checkout(ctx, library, "Les Miserables") + Expect(err).To(MatchError("Les Miserables is not in the library catalog")) + }, SpecTimeout(time.Second * 5)) + }) +}) +``` + +Jump to the [docs](https://onsi.github.io/ginkgo/) to learn more. It's easy to [bootstrap](https://onsi.github.io/ginkgo/#bootstrapping-a-suite) and start writing your [first specs](https://onsi.github.io/ginkgo/#adding-specs-to-a-suite). + +If you have a question, comment, bug report, feature request, etc. please open a [GitHub issue](https://github.com/onsi/ginkgo/issues/new), or visit the [Ginkgo Slack channel](https://app.slack.com/client/T029RQSE6/CQQ50BBNW). + +## Capabilities + +Whether writing basic unit specs, complex integration specs, or even performance specs - Ginkgo gives you an expressive Domain-Specific Language (DSL) that will be familiar to users coming from frameworks such as [Quick](https://github.com/Quick/Quick), [RSpec](https://rspec.info), [Jasmine](https://jasmine.github.io), and [Busted](https://lunarmodules.github.io/busted/). This style of testing is sometimes referred to as "Behavior-Driven Development" (BDD) though Ginkgo's utility extends beyond acceptance-level testing. + +With Ginkgo's DSL you can use nestable [`Describe`, `Context` and `When` container nodes](https://onsi.github.io/ginkgo/#organizing-specs-with-container-nodes) to help you organize your specs. [`BeforeEach` and `AfterEach` setup nodes](https://onsi.github.io/ginkgo/#extracting-common-setup-beforeeach) for setup and cleanup. [`It` and `Specify` subject nodes](https://onsi.github.io/ginkgo/#spec-subjects-it) that hold your assertions. [`BeforeSuite` and `AfterSuite` nodes](https://onsi.github.io/ginkgo/#suite-setup-and-cleanup-beforesuite-and-aftersuite) to prep for and cleanup after a suite... and [much more!](https://onsi.github.io/ginkgo/#writing-specs). + +At runtime, Ginkgo can run your specs in reproducibly [random order](https://onsi.github.io/ginkgo/#spec-randomization) and has sophisticated support for [spec parallelization](https://onsi.github.io/ginkgo/#spec-parallelization). In fact, running specs in parallel is as easy as + +```bash +ginkgo -p +``` + +By following [established patterns for writing parallel specs](https://onsi.github.io/ginkgo/#patterns-for-parallel-integration-specs) you can build even large, complex integration suites that parallelize cleanly and run performantly. And you don't have to worry about your spec suite hanging or leaving a mess behind - Ginkgo provides a per-node `context.Context` and the capability to interrupt the spec after a set period of time - and then clean up. + +As your suites grow Ginkgo helps you keep your specs organized with [labels](https://onsi.github.io/ginkgo/#spec-labels) and lets you easily run [subsets of specs](https://onsi.github.io/ginkgo/#filtering-specs), either [programmatically](https://onsi.github.io/ginkgo/#focused-specs) or on the [command line](https://onsi.github.io/ginkgo/#combining-filters). And Ginkgo's reporting infrastructure generates machine-readable output in a [variety of formats](https://onsi.github.io/ginkgo/#generating-machine-readable-reports) _and_ allows you to build your own [custom reporting infrastructure](https://onsi.github.io/ginkgo/#generating-reports-programmatically). + +Ginkgo ships with `ginkgo`, a [command line tool](https://onsi.github.io/ginkgo/#ginkgo-cli-overview) with support for generating, running, filtering, and profiling Ginkgo suites. You can even have Ginkgo automatically run your specs when it detects a change with `ginkgo watch`, enabling rapid feedback loops during test-driven development. + +And that's just Ginkgo! [Gomega](https://onsi.github.io/gomega/) brings a rich, mature, family of [assertions and matchers](https://onsi.github.io/gomega/#provided-matchers) to your suites. With Gomega you can easily mix [synchronous and asynchronous assertions](https://onsi.github.io/ginkgo/#patterns-for-asynchronous-testing) in your specs. You can even build your own set of expressive domain-specific matchers quickly and easily by composing Gomega's [existing building blocks](https://onsi.github.io/ginkgo/#building-custom-matchers). + +Happy Testing! + +## License + +Ginkgo is MIT-Licensed + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/vendor/github.com/onsi/ginkgo/v2/RELEASING.md b/vendor/github.com/onsi/ginkgo/v2/RELEASING.md new file mode 100644 index 000000000..363815d7c --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/RELEASING.md @@ -0,0 +1,23 @@ +A Ginkgo release is a tagged git sha and a GitHub release. To cut a release: + +1. Ensure CHANGELOG.md is up to date. + - Use + ```bash + LAST_VERSION=$(git tag --sort=version:refname | tail -n1) + CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION) + echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n### Fixes\n\n### Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md + ``` + to update the changelog + - Categorize the changes into + - Breaking Changes (requires a major version) + - New Features (minor version) + - Fixes (fix version) + - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact) +1. Update `VERSION` in `types/version.go` +1. Commit, push, and release: + ``` + git commit -m "vM.m.p" + git push + gh release create "vM.m.p" + git fetch --tags origin master + ``` \ No newline at end of file diff --git a/vendor/github.com/onsi/ginkgo/v2/config/deprecated.go b/vendor/github.com/onsi/ginkgo/v2/config/deprecated.go new file mode 100644 index 000000000..a61021d08 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/config/deprecated.go @@ -0,0 +1,69 @@ +package config + +// GinkgoConfigType has been deprecated and its equivalent now lives in +// the types package. You can no longer access Ginkgo configuration from the config +// package. Instead use the DSL's GinkgoConfiguration() function to get copies of the +// current configuration +// +// GinkgoConfigType is still here so custom V1 reporters do not result in a compilation error +// It will be removed in a future minor release of Ginkgo +type GinkgoConfigType = DeprecatedGinkgoConfigType +type DeprecatedGinkgoConfigType struct { + RandomSeed int64 + RandomizeAllSpecs bool + RegexScansFilePath bool + FocusStrings []string + SkipStrings []string + SkipMeasurements bool + FailOnPending bool + FailFast bool + FlakeAttempts int + EmitSpecProgress bool + DryRun bool + DebugParallel bool + + ParallelNode int + ParallelTotal int + SyncHost string + StreamHost string +} + +// DefaultReporterConfigType has been deprecated and its equivalent now lives in +// the types package. You can no longer access Ginkgo configuration from the config +// package. Instead use the DSL's GinkgoConfiguration() function to get copies of the +// current configuration +// +// DefaultReporterConfigType is still here so custom V1 reporters do not result in a compilation error +// It will be removed in a future minor release of Ginkgo +type DefaultReporterConfigType = DeprecatedDefaultReporterConfigType +type DeprecatedDefaultReporterConfigType struct { + NoColor bool + SlowSpecThreshold float64 + NoisyPendings bool + NoisySkippings bool + Succinct bool + Verbose bool + FullTrace bool + ReportPassed bool + ReportFile string +} + +// Sadly there is no way to gracefully deprecate access to these global config variables. +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method +// These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails +type GinkgoConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead struct{} + +// Sadly there is no way to gracefully deprecate access to these global config variables. +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method +// These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails +var GinkgoConfig = GinkgoConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead{} + +// Sadly there is no way to gracefully deprecate access to these global config variables. +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method +// These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails +type DefaultReporterConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead struct{} + +// Sadly there is no way to gracefully deprecate access to these global config variables. +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method +// These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails +var DefaultReporterConfig = DefaultReporterConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead{} diff --git a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go new file mode 100644 index 000000000..a3e8237e9 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go @@ -0,0 +1,847 @@ +/* +Ginkgo is a testing framework for Go designed to help you write expressive tests. +https://github.com/onsi/ginkgo +MIT-Licensed + +The godoc documentation outlines Ginkgo's API. Since Ginkgo is a Domain-Specific Language it is important to +build a mental model for Ginkgo - the narrative documentation at https://onsi.github.io/ginkgo/ is designed to help you do that. +You should start there - even a brief skim will be helpful. At minimum you should skim through the https://onsi.github.io/ginkgo/#getting-started chapter. + +Ginkgo's is best paired with the Gomega matcher library: https://github.com/onsi/gomega + +You can run Ginkgo specs with go test - however we recommend using the ginkgo cli. It enables functionality +that go test does not (especially running suites in parallel). You can learn more at https://onsi.github.io/ginkgo/#ginkgo-cli-overview +or by running 'ginkgo help'. +*/ +package ginkgo + +import ( + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "github.com/go-logr/logr" + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/internal" + "github.com/onsi/ginkgo/v2/internal/global" + "github.com/onsi/ginkgo/v2/internal/interrupt_handler" + "github.com/onsi/ginkgo/v2/internal/parallel_support" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +const GINKGO_VERSION = types.VERSION + +var flagSet types.GinkgoFlagSet +var deprecationTracker = types.NewDeprecationTracker() +var suiteConfig = types.NewDefaultSuiteConfig() +var reporterConfig = types.NewDefaultReporterConfig() +var suiteDidRun = false +var outputInterceptor internal.OutputInterceptor +var client parallel_support.Client + +func init() { + var err error + flagSet, err = types.BuildTestSuiteFlagSet(&suiteConfig, &reporterConfig) + exitIfErr(err) + writer := internal.NewWriter(os.Stdout) + GinkgoWriter = writer + GinkgoLogr = internal.GinkgoLogrFunc(writer) +} + +func exitIfErr(err error) { + if err != nil { + if outputInterceptor != nil { + outputInterceptor.Shutdown() + } + if client != nil { + client.Close() + } + fmt.Fprintln(formatter.ColorableStdErr, err.Error()) + os.Exit(1) + } +} + +func exitIfErrors(errors []error) { + if len(errors) > 0 { + if outputInterceptor != nil { + outputInterceptor.Shutdown() + } + if client != nil { + client.Close() + } + for _, err := range errors { + fmt.Fprintln(formatter.ColorableStdErr, err.Error()) + } + os.Exit(1) + } +} + +// The interface implemented by GinkgoWriter +type GinkgoWriterInterface interface { + io.Writer + + Print(a ...interface{}) + Printf(format string, a ...interface{}) + Println(a ...interface{}) + + TeeTo(writer io.Writer) + ClearTeeWriters() +} + +/* +SpecContext is the context object passed into nodes that are subject to a timeout or need to be notified of an interrupt. It implements the standard context.Context interface but also contains additional helpers to provide an extensibility point for Ginkgo. (As an example, Gomega's Eventually can use the methods defined on SpecContext to provide deeper integration with Ginkgo). + +You can do anything with SpecContext that you do with a typical context.Context including wrapping it with any of the context.With* methods. + +Ginkgo will cancel the SpecContext when a node is interrupted (e.g. by the user sending an interrupt signal) or when a node has exceeded its allowed run-time. Note, however, that even in cases where a node has a deadline, SpecContext will not return a deadline via .Deadline(). This is because Ginkgo does not use a WithDeadline() context to model node deadlines as Ginkgo needs control over the precise timing of the context cancellation to ensure it can provide an accurate progress report at the moment of cancellation. +*/ +type SpecContext = internal.SpecContext + +/* +GinkgoWriter implements a GinkgoWriterInterface and io.Writer + +When running in verbose mode (ginkgo -v) any writes to GinkgoWriter will be immediately printed +to stdout. Otherwise, GinkgoWriter will buffer any writes produced during the current test and flush them to screen +only if the current test fails. + +GinkgoWriter also provides convenience Print, Printf and Println methods and allows you to tee to a custom writer via GinkgoWriter.TeeTo(writer). +Writes to GinkgoWriter are immediately sent to any registered TeeTo() writers. You can unregister all TeeTo() Writers with GinkgoWriter.ClearTeeWriters() + +You can learn more at https://onsi.github.io/ginkgo/#logging-output +*/ +var GinkgoWriter GinkgoWriterInterface + +/* +GinkgoLogr is a logr.Logger that writes to GinkgoWriter +*/ +var GinkgoLogr logr.Logger + +// The interface by which Ginkgo receives *testing.T +type GinkgoTestingT interface { + Fail() +} + +/* +GinkgoConfiguration returns the configuration of the current suite. + +The first return value is the SuiteConfig which controls aspects of how the suite runs, +the second return value is the ReporterConfig which controls aspects of how Ginkgo's default +reporter emits output. + +Mutating the returned configurations has no effect. To reconfigure Ginkgo programmatically you need +to pass in your mutated copies into RunSpecs(). + +You can learn more at https://onsi.github.io/ginkgo/#overriding-ginkgos-command-line-configuration-in-the-suite +*/ +func GinkgoConfiguration() (types.SuiteConfig, types.ReporterConfig) { + return suiteConfig, reporterConfig +} + +/* +GinkgoRandomSeed returns the seed used to randomize spec execution order. It is +useful for seeding your own pseudorandom number generators to ensure +consistent executions from run to run, where your tests contain variability (for +example, when selecting random spec data). + +You can learn more at https://onsi.github.io/ginkgo/#spec-randomization +*/ +func GinkgoRandomSeed() int64 { + return suiteConfig.RandomSeed +} + +/* +GinkgoParallelProcess returns the parallel process number for the current ginkgo process +The process number is 1-indexed. You can use GinkgoParallelProcess() to shard access to shared +resources across your suites. You can learn more about patterns for sharding at https://onsi.github.io/ginkgo/#patterns-for-parallel-integration-specs + +For more on how specs are parallelized in Ginkgo, see http://onsi.github.io/ginkgo/#spec-parallelization +*/ +func GinkgoParallelProcess() int { + return suiteConfig.ParallelProcess +} + +/* +GinkgoHelper marks the function it's called in as a test helper. When a failure occurs inside a helper function, Ginkgo will skip the helper when analyzing the stack trace to identify where the failure occurred. + +This is an alternative, simpler, mechanism to passing in a skip offset when calling Fail or using Gomega. +*/ +func GinkgoHelper() { + types.MarkAsHelper(1) +} + +/* +GinkgoLabelFilter() returns the label filter configured for this suite via `--label-filter`. + +You can use this to manually check if a set of labels would satisfy the filter via: + + if (Label("cat", "dog").MatchesLabelFilter(GinkgoLabelFilter())) { + //... + } +*/ +func GinkgoLabelFilter() string { + suiteConfig, _ := GinkgoConfiguration() + return suiteConfig.LabelFilter +} + +/* +PauseOutputInterception() pauses Ginkgo's output interception. This is only relevant +when running in parallel and output to stdout/stderr is being intercepted. You generally +don't need to call this function - however there are cases when Ginkgo's output interception +mechanisms can interfere with external processes launched by the test process. + +In particular, if an external process is launched that has cmd.Stdout/cmd.Stderr set to os.Stdout/os.Stderr +then Ginkgo's output interceptor will hang. To circumvent this, set cmd.Stdout/cmd.Stderr to GinkgoWriter. +If, for some reason, you aren't able to do that, you can PauseOutputInterception() before starting the process +then ResumeOutputInterception() after starting it. + +Note that PauseOutputInterception() does not cause stdout writes to print to the console - +this simply stops intercepting and storing stdout writes to an internal buffer. +*/ +func PauseOutputInterception() { + if outputInterceptor == nil { + return + } + outputInterceptor.PauseIntercepting() +} + +// ResumeOutputInterception() - see docs for PauseOutputInterception() +func ResumeOutputInterception() { + if outputInterceptor == nil { + return + } + outputInterceptor.ResumeIntercepting() +} + +/* +RunSpecs is the entry point for the Ginkgo spec runner. + +You must call this within a Golang testing TestX(t *testing.T) function. +If you bootstrapped your suite with "ginkgo bootstrap" this is already +done for you. + +Ginkgo is typically configured via command-line flags. This configuration +can be overridden, however, and passed into RunSpecs as optional arguments: + + func TestMySuite(t *testing.T) { + RegisterFailHandler(gomega.Fail) + // fetch the current config + suiteConfig, reporterConfig := GinkgoConfiguration() + // adjust it + suiteConfig.SkipStrings = []string{"NEVER-RUN"} + reporterConfig.FullTrace = true + // pass it in to RunSpecs + RunSpecs(t, "My Suite", suiteConfig, reporterConfig) + } + +Note that some configuration changes can lead to undefined behavior. For example, +you should not change ParallelProcess or ParallelTotal as the Ginkgo CLI is responsible +for setting these and orchestrating parallel specs across the parallel processes. See http://onsi.github.io/ginkgo/#spec-parallelization +for more on how specs are parallelized in Ginkgo. + +You can also pass suite-level Label() decorators to RunSpecs. The passed-in labels will apply to all specs in the suite. +*/ +func RunSpecs(t GinkgoTestingT, description string, args ...interface{}) bool { + if suiteDidRun { + exitIfErr(types.GinkgoErrors.RerunningSuite()) + } + suiteDidRun = true + err := global.PushClone() + if err != nil { + exitIfErr(err) + } + defer global.PopClone() + + suiteLabels := extractSuiteConfiguration(args) + + var reporter reporters.Reporter + if suiteConfig.ParallelTotal == 1 { + reporter = reporters.NewDefaultReporter(reporterConfig, formatter.ColorableStdOut) + outputInterceptor = internal.NoopOutputInterceptor{} + client = nil + } else { + reporter = reporters.NoopReporter{} + switch strings.ToLower(suiteConfig.OutputInterceptorMode) { + case "swap": + outputInterceptor = internal.NewOSGlobalReassigningOutputInterceptor() + case "none": + outputInterceptor = internal.NoopOutputInterceptor{} + default: + outputInterceptor = internal.NewOutputInterceptor() + } + client = parallel_support.NewClient(suiteConfig.ParallelHost) + if !client.Connect() { + client = nil + exitIfErr(types.GinkgoErrors.UnreachableParallelHost(suiteConfig.ParallelHost)) + } + defer client.Close() + } + + writer := GinkgoWriter.(*internal.Writer) + if reporterConfig.Verbosity().GTE(types.VerbosityLevelVerbose) && suiteConfig.ParallelTotal == 1 { + writer.SetMode(internal.WriterModeStreamAndBuffer) + } else { + writer.SetMode(internal.WriterModeBufferOnly) + } + + if reporterConfig.WillGenerateReport() { + registerReportAfterSuiteNodeForAutogeneratedReports(reporterConfig) + } + + err = global.Suite.BuildTree() + exitIfErr(err) + suitePath, err := getwd() + exitIfErr(err) + suitePath, err = filepath.Abs(suitePath) + exitIfErr(err) + + passed, hasFocusedTests := global.Suite.Run(description, suiteLabels, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) + outputInterceptor.Shutdown() + + flagSet.ValidateDeprecations(deprecationTracker) + if deprecationTracker.DidTrackDeprecations() { + fmt.Fprintln(formatter.ColorableStdErr, deprecationTracker.DeprecationsReport()) + } + + if !passed { + t.Fail() + } + + if passed && hasFocusedTests && strings.TrimSpace(os.Getenv("GINKGO_EDITOR_INTEGRATION")) == "" { + fmt.Println("PASS | FOCUSED") + os.Exit(types.GINKGO_FOCUS_EXIT_CODE) + } + return passed +} + +func extractSuiteConfiguration(args []interface{}) Labels { + suiteLabels := Labels{} + configErrors := []error{} + for _, arg := range args { + switch arg := arg.(type) { + case types.SuiteConfig: + suiteConfig = arg + case types.ReporterConfig: + reporterConfig = arg + case Labels: + suiteLabels = append(suiteLabels, arg...) + default: + configErrors = append(configErrors, types.GinkgoErrors.UnknownTypePassedToRunSpecs(arg)) + } + } + exitIfErrors(configErrors) + + configErrors = types.VetConfig(flagSet, suiteConfig, reporterConfig) + if len(configErrors) > 0 { + fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{red}}Ginkgo detected configuration issues:{{/}}\n")) + for _, err := range configErrors { + fmt.Fprintf(formatter.ColorableStdErr, err.Error()) + } + os.Exit(1) + } + + return suiteLabels +} + +func getwd() (string, error) { + if !strings.EqualFold(os.Getenv("GINKGO_PRESERVE_CACHE"), "true") { + // Getwd calls os.Getenv("PWD"), which breaks test caching if the cache + // is shared between two different directories with the same test code. + return os.Getwd() + } + return "", nil +} + +/* +PreviewSpecs walks the testing tree and produces a report without actually invoking the specs. +See http://onsi.github.io/ginkgo/#previewing-specs for more information. +*/ +func PreviewSpecs(description string, args ...any) Report { + err := global.PushClone() + if err != nil { + exitIfErr(err) + } + defer global.PopClone() + + suiteLabels := extractSuiteConfiguration(args) + priorDryRun, priorParallelTotal, priorParallelProcess := suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess + suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess = true, 1, 1 + defer func() { + suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess = priorDryRun, priorParallelTotal, priorParallelProcess + }() + reporter := reporters.NoopReporter{} + outputInterceptor = internal.NoopOutputInterceptor{} + client = nil + writer := GinkgoWriter.(*internal.Writer) + + err = global.Suite.BuildTree() + exitIfErr(err) + suitePath, err := getwd() + exitIfErr(err) + suitePath, err = filepath.Abs(suitePath) + exitIfErr(err) + + global.Suite.Run(description, suiteLabels, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) + + return global.Suite.GetPreviewReport() +} + +/* +Skip instructs Ginkgo to skip the current spec + +You can call Skip in any Setup or Subject node closure. + +For more on how to filter specs in Ginkgo see https://onsi.github.io/ginkgo/#filtering-specs +*/ +func Skip(message string, callerSkip ...int) { + skip := 0 + if len(callerSkip) > 0 { + skip = callerSkip[0] + } + cl := types.NewCodeLocationWithStackTrace(skip + 1) + global.Failer.Skip(message, cl) + panic(types.GinkgoErrors.UncaughtGinkgoPanic(cl)) +} + +/* +Fail notifies Ginkgo that the current spec has failed. (Gomega will call Fail for you automatically when an assertion fails.) + +Under the hood, Fail panics to end execution of the current spec. Ginkgo will catch this panic and proceed with +the subsequent spec. If you call Fail, or make an assertion, within a goroutine launched by your spec you must +add defer GinkgoRecover() to the goroutine to catch the panic emitted by Fail. + +You can call Fail in any Setup or Subject node closure. + +You can learn more about how Ginkgo manages failures here: https://onsi.github.io/ginkgo/#mental-model-how-ginkgo-handles-failure +*/ +func Fail(message string, callerSkip ...int) { + skip := 0 + if len(callerSkip) > 0 { + skip = callerSkip[0] + } + + cl := types.NewCodeLocationWithStackTrace(skip + 1) + global.Failer.Fail(message, cl) + panic(types.GinkgoErrors.UncaughtGinkgoPanic(cl)) +} + +/* +AbortSuite instructs Ginkgo to fail the current spec and skip all subsequent specs, thereby aborting the suite. + +You can call AbortSuite in any Setup or Subject node closure. + +You can learn more about how Ginkgo handles suite interruptions here: https://onsi.github.io/ginkgo/#interrupting-aborting-and-timing-out-suites +*/ +func AbortSuite(message string, callerSkip ...int) { + skip := 0 + if len(callerSkip) > 0 { + skip = callerSkip[0] + } + + cl := types.NewCodeLocationWithStackTrace(skip + 1) + global.Failer.AbortSuite(message, cl) + panic(types.GinkgoErrors.UncaughtGinkgoPanic(cl)) +} + +/* +ignorablePanic is used by Gomega to signal to GinkgoRecover that Goemga is handling +the error associated with this panic. It i used when Eventually/Consistently are passed a func(g Gomega) and the resulting function launches a goroutines that makes a failed assertion. That failed assertion is registered by Gomega and then panics. Ordinarily the panic is captured by Gomega. In the case of a goroutine Gomega can't capture the panic - so we piggy back on GinkgoRecover so users have a single defer GinkgoRecover() pattern to follow. To do that we need to tell Ginkgo to ignore this panic and not register it as a panic on the global Failer. +*/ +type ignorablePanic interface{ GinkgoRecoverShouldIgnoreThisPanic() } + +/* +GinkgoRecover should be deferred at the top of any spawned goroutine that (may) call `Fail` +Since Gomega assertions call fail, you should throw a `defer GinkgoRecover()` at the top of any goroutine that +calls out to Gomega + +Here's why: Ginkgo's `Fail` method records the failure and then panics to prevent +further assertions from running. This panic must be recovered. Normally, Ginkgo recovers the panic for you, +however if a panic originates on a goroutine *launched* from one of your specs there's no +way for Ginkgo to rescue the panic. To do this, you must remember to `defer GinkgoRecover()` at the top of such a goroutine. + +You can learn more about how Ginkgo manages failures here: https://onsi.github.io/ginkgo/#mental-model-how-ginkgo-handles-failure +*/ +func GinkgoRecover() { + e := recover() + if e != nil { + if _, ok := e.(ignorablePanic); ok { + return + } + global.Failer.Panic(types.NewCodeLocationWithStackTrace(1), e) + } +} + +// pushNode is used by the various test construction DSL methods to push nodes onto the suite +// it handles returned errors, emits a detailed error message to help the user learn what they may have done wrong, then exits +func pushNode(node internal.Node, errors []error) bool { + exitIfErrors(errors) + exitIfErr(global.Suite.PushNode(node)) + return true +} + +/* +Describe nodes are Container nodes that allow you to organize your specs. A Describe node's closure can contain any number of +Setup nodes (e.g. BeforeEach, AfterEach, JustBeforeEach), and Subject nodes (i.e. It). + +Context and When nodes are aliases for Describe - use whichever gives your suite a better narrative flow. It is idomatic +to Describe the behavior of an object or function and, within that Describe, outline a number of Contexts and Whens. + +You can learn more at https://onsi.github.io/ginkgo/#organizing-specs-with-container-nodes +In addition, container nodes can be decorated with a variety of decorators. You can learn more here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +func Describe(text string, args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, text, args...)) +} + +/* +FDescribe focuses specs within the Describe block. +*/ +func FDescribe(text string, args ...interface{}) bool { + args = append(args, internal.Focus) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, text, args...)) +} + +/* +PDescribe marks specs within the Describe block as pending. +*/ +func PDescribe(text string, args ...interface{}) bool { + args = append(args, internal.Pending) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, text, args...)) +} + +/* +XDescribe marks specs within the Describe block as pending. + +XDescribe is an alias for PDescribe +*/ +var XDescribe = PDescribe + +/* Context is an alias for Describe - it generates the exact same kind of Container node */ +var Context, FContext, PContext, XContext = Describe, FDescribe, PDescribe, XDescribe + +/* When is an alias for Describe - it generates the exact same kind of Container node */ +func When(text string, args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, "when "+text, args...)) +} + +/* When is an alias for Describe - it generates the exact same kind of Container node */ +func FWhen(text string, args ...interface{}) bool { + args = append(args, internal.Focus) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, "when "+text, args...)) +} + +/* When is an alias for Describe - it generates the exact same kind of Container node */ +func PWhen(text string, args ...interface{}) bool { + args = append(args, internal.Pending) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, "when "+text, args...)) +} + +var XWhen = PWhen + +/* +It nodes are Subject nodes that contain your spec code and assertions. + +Each It node corresponds to an individual Ginkgo spec. You cannot nest any other Ginkgo nodes within an It node's closure. + +You can pass It nodes bare functions (func() {}) or functions that receive a SpecContext or context.Context: func(ctx SpecContext) {} and func (ctx context.Context) {}. If the function takes a context then the It is deemed interruptible and Ginkgo will cancel the context in the event of a timeout (configured via the SpecTimeout() or NodeTimeout() decorators) or of an interrupt signal. + +You can learn more at https://onsi.github.io/ginkgo/#spec-subjects-it +In addition, subject nodes can be decorated with a variety of decorators. You can learn more here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +func It(text string, args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeIt, text, args...)) +} + +/* +FIt allows you to focus an individual It. +*/ +func FIt(text string, args ...interface{}) bool { + args = append(args, internal.Focus) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeIt, text, args...)) +} + +/* +PIt allows you to mark an individual It as pending. +*/ +func PIt(text string, args ...interface{}) bool { + args = append(args, internal.Pending) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeIt, text, args...)) +} + +/* +XIt allows you to mark an individual It as pending. + +XIt is an alias for PIt +*/ +var XIt = PIt + +/* +Specify is an alias for It - it can allow for more natural wording in some context. +*/ +var Specify, FSpecify, PSpecify, XSpecify = It, FIt, PIt, XIt + +/* +By allows you to better document complex Specs. + +Generally you should try to keep your Its short and to the point. This is not always possible, however, +especially in the context of integration tests that capture complex or lengthy workflows. + +By allows you to document such flows. By may be called within a Setup or Subject node (It, BeforeEach, etc...) +and will simply log the passed in text to the GinkgoWriter. If By is handed a function it will immediately run the function. + +By will also generate and attach a ReportEntry to the spec. This will ensure that By annotations appear in Ginkgo's machine-readable reports. + +Note that By does not generate a new Ginkgo node - rather it is simply syntactic sugar around GinkgoWriter and AddReportEntry +You can learn more about By here: https://onsi.github.io/ginkgo/#documenting-complex-specs-by +*/ +func By(text string, callback ...func()) { + exitIfErr(global.Suite.By(text, callback...)) +} + +/* +BeforeSuite nodes are suite-level Setup nodes that run just once before any specs are run. +When running in parallel, each parallel process will call BeforeSuite. + +You may only register *one* BeforeSuite handler per test suite. You typically do so in your bootstrap file at the top level. + +BeforeSuite can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within a BeforeSuite node's closure. +You can learn more here: https://onsi.github.io/ginkgo/#suite-setup-and-cleanup-beforesuite-and-aftersuite +*/ +func BeforeSuite(body interface{}, args ...interface{}) bool { + combinedArgs := []interface{}{body} + combinedArgs = append(combinedArgs, args...) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeBeforeSuite, "", combinedArgs...)) +} + +/* +AfterSuite nodes are suite-level Setup nodes run after all specs have finished - regardless of whether specs have passed or failed. +AfterSuite node closures always run, even if Ginkgo receives an interrupt signal (^C), in order to ensure cleanup occurs. + +When running in parallel, each parallel process will call AfterSuite. + +You may only register *one* AfterSuite handler per test suite. You typically do so in your bootstrap file at the top level. + +AfterSuite can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within an AfterSuite node's closure. +You can learn more here: https://onsi.github.io/ginkgo/#suite-setup-and-cleanup-beforesuite-and-aftersuite +*/ +func AfterSuite(body interface{}, args ...interface{}) bool { + combinedArgs := []interface{}{body} + combinedArgs = append(combinedArgs, args...) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeAfterSuite, "", combinedArgs...)) +} + +/* +SynchronizedBeforeSuite nodes allow you to perform some of the suite setup just once - on parallel process #1 - and then pass information +from that setup to the rest of the suite setup on all processes. This is useful for performing expensive or singleton setup once, then passing +information from that setup to all parallel processes. + +SynchronizedBeforeSuite accomplishes this by taking *two* function arguments and passing data between them. +The first function is only run on parallel process #1. The second is run on all processes, but *only* after the first function completes successfully. The functions have the following signatures: + +The first function (which only runs on process #1) can have any of the following the signatures: + + func() + func(ctx context.Context) + func(ctx SpecContext) + func() []byte + func(ctx context.Context) []byte + func(ctx SpecContext) []byte + +The byte array returned by the first function (if present) is then passed to the second function, which can have any of the following signature: + + func() + func(ctx context.Context) + func(ctx SpecContext) + func(data []byte) + func(ctx context.Context, data []byte) + func(ctx SpecContext, data []byte) + +If either function receives a context.Context/SpecContext it is considered interruptible. + +You cannot nest any other Ginkgo nodes within an SynchronizedBeforeSuite node's closure. +You can learn more, and see some examples, here: https://onsi.github.io/ginkgo/#parallel-suite-setup-and-cleanup-synchronizedbeforesuite-and-synchronizedaftersuite +*/ +func SynchronizedBeforeSuite(process1Body interface{}, allProcessBody interface{}, args ...interface{}) bool { + combinedArgs := []interface{}{process1Body, allProcessBody} + combinedArgs = append(combinedArgs, args...) + + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeSynchronizedBeforeSuite, "", combinedArgs...)) +} + +/* +SynchronizedAfterSuite nodes complement the SynchronizedBeforeSuite nodes in solving the problem of splitting clean up into a piece that runs on all processes +and a piece that must only run once - on process #1. + +SynchronizedAfterSuite accomplishes this by taking *two* function arguments. The first runs on all processes. The second runs only on parallel process #1 +and *only* after all other processes have finished and exited. This ensures that process #1, and any resources it is managing, remain alive until +all other processes are finished. These two functions can be bare functions (func()) or interruptible (func(context.Context)/func(SpecContext)) + +Note that you can also use DeferCleanup() in SynchronizedBeforeSuite to accomplish similar results. + +You cannot nest any other Ginkgo nodes within an SynchronizedAfterSuite node's closure. +You can learn more, and see some examples, here: https://onsi.github.io/ginkgo/#parallel-suite-setup-and-cleanup-synchronizedbeforesuite-and-synchronizedaftersuite +*/ +func SynchronizedAfterSuite(allProcessBody interface{}, process1Body interface{}, args ...interface{}) bool { + combinedArgs := []interface{}{allProcessBody, process1Body} + combinedArgs = append(combinedArgs, args...) + + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeSynchronizedAfterSuite, "", combinedArgs...)) +} + +/* +BeforeEach nodes are Setup nodes whose closures run before It node closures. When multiple BeforeEach nodes +are defined in nested Container nodes the outermost BeforeEach node closures are run first. + +BeforeEach can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within a BeforeEach node's closure. +You can learn more here: https://onsi.github.io/ginkgo/#extracting-common-setup-beforeeach +*/ +func BeforeEach(args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeBeforeEach, "", args...)) +} + +/* +JustBeforeEach nodes are similar to BeforeEach nodes, however they are guaranteed to run *after* all BeforeEach node closures - just before the It node closure. +This can allow you to separate configuration from creation of resources for a spec. + +JustBeforeEach can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within a JustBeforeEach node's closure. +You can learn more and see some examples here: https://onsi.github.io/ginkgo/#separating-creation-and-configuration-justbeforeeach +*/ +func JustBeforeEach(args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeJustBeforeEach, "", args...)) +} + +/* +AfterEach nodes are Setup nodes whose closures run after It node closures. When multiple AfterEach nodes +are defined in nested Container nodes the innermost AfterEach node closures are run first. + +Note that you can also use DeferCleanup() in other Setup or Subject nodes to accomplish similar results. + +AfterEach can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within an AfterEach node's closure. +You can learn more here: https://onsi.github.io/ginkgo/#spec-cleanup-aftereach-and-defercleanup +*/ +func AfterEach(args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeAfterEach, "", args...)) +} + +/* +JustAfterEach nodes are similar to AfterEach nodes, however they are guaranteed to run *before* all AfterEach node closures - just after the It node closure. This can allow you to separate diagnostics collection from teardown for a spec. + +JustAfterEach can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within a JustAfterEach node's closure. +You can learn more and see some examples here: https://onsi.github.io/ginkgo/#separating-diagnostics-collection-and-teardown-justaftereach +*/ +func JustAfterEach(args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeJustAfterEach, "", args...)) +} + +/* +BeforeAll nodes are Setup nodes that can occur inside Ordered containers. They run just once before any specs in the Ordered container run. + +Multiple BeforeAll nodes can be defined in a given Ordered container however they cannot be nested inside any other container. + +BeforeAll can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within a BeforeAll node's closure. +You can learn more about Ordered Containers at: https://onsi.github.io/ginkgo/#ordered-containers +And you can learn more about BeforeAll at: https://onsi.github.io/ginkgo/#setup-in-ordered-containers-beforeall-and-afterall +*/ +func BeforeAll(args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeBeforeAll, "", args...)) +} + +/* +AfterAll nodes are Setup nodes that can occur inside Ordered containers. They run just once after all specs in the Ordered container have run. + +Multiple AfterAll nodes can be defined in a given Ordered container however they cannot be nested inside any other container. + +Note that you can also use DeferCleanup() in a BeforeAll node to accomplish similar behavior. + +AfterAll can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body. + +You cannot nest any other Ginkgo nodes within an AfterAll node's closure. +You can learn more about Ordered Containers at: https://onsi.github.io/ginkgo/#ordered-containers +And you can learn more about AfterAll at: https://onsi.github.io/ginkgo/#setup-in-ordered-containers-beforeall-and-afterall +*/ +func AfterAll(args ...interface{}) bool { + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeAfterAll, "", args...)) +} + +/* +DeferCleanup can be called within any Setup or Subject node to register a cleanup callback that Ginkgo will call at the appropriate time to cleanup after the spec. + +DeferCleanup can be passed: +1. A function that takes no arguments and returns no values. +2. A function that returns multiple values. `DeferCleanup` will ignore all these return values except for the last one. If this last return value is a non-nil error `DeferCleanup` will fail the spec). +3. A function that takes a context.Context or SpecContext (and optionally returns multiple values). The resulting cleanup node is deemed interruptible and the passed-in context will be cancelled in the event of a timeout or interrupt. +4. A function that takes arguments (and optionally returns multiple values) followed by a list of arguments to pass to the function. +5. A function that takes SpecContext and a list of arguments (and optionally returns multiple values) followed by a list of arguments to pass to the function. + +For example: + + BeforeEach(func() { + DeferCleanup(os.Setenv, "FOO", os.GetEnv("FOO")) + os.Setenv("FOO", "BAR") + }) + +will register a cleanup handler that will set the environment variable "FOO" to its current value (obtained by os.GetEnv("FOO")) after the spec runs and then sets the environment variable "FOO" to "BAR" for the current spec. + +Similarly: + + BeforeEach(func() { + DeferCleanup(func(ctx SpecContext, path) { + req, err := http.NewRequestWithContext(ctx, "POST", path, nil) + Expect(err).NotTo(HaveOccured()) + _, err := http.DefaultClient.Do(req) + Expect(err).NotTo(HaveOccured()) + }, "example.com/cleanup", NodeTimeout(time.Second*3)) + }) + +will register a cleanup handler that will have three seconds to successfully complete a request to the specified path. Note that we do not specify a context in the list of arguments passed to DeferCleanup - only in the signature of the function we pass in. Ginkgo will detect the requested context and supply a SpecContext when it invokes the cleanup node. If you want to pass in your own context in addition to the Ginkgo-provided SpecContext you must specify the SpecContext as the first argument (e.g. func(ctx SpecContext, otherCtx context.Context)). + +When DeferCleanup is called in BeforeEach, JustBeforeEach, It, AfterEach, or JustAfterEach the registered callback will be invoked when the spec completes (i.e. it will behave like an AfterEach node) +When DeferCleanup is called in BeforeAll or AfterAll the registered callback will be invoked when the ordered container completes (i.e. it will behave like an AfterAll node) +When DeferCleanup is called in BeforeSuite, SynchronizedBeforeSuite, AfterSuite, or SynchronizedAfterSuite the registered callback will be invoked when the suite completes (i.e. it will behave like an AfterSuite node) + +Note that DeferCleanup does not represent a node but rather dynamically generates the appropriate type of cleanup node based on the context in which it is called. As such you must call DeferCleanup within a Setup or Subject node, and not within a Container node. +You can learn more about DeferCleanup here: https://onsi.github.io/ginkgo/#cleaning-up-our-cleanup-code-defercleanup +*/ +func DeferCleanup(args ...interface{}) { + fail := func(message string, cl types.CodeLocation) { + global.Failer.Fail(message, cl) + } + pushNode(internal.NewCleanupNode(deprecationTracker, fail, args...)) +} + +/* +AttachProgressReporter allows you to register a function that will be called whenever Ginkgo generates a Progress Report. The contents returned by the function will be included in the report. + +**This is an experimental feature and the public-facing interface may change in a future minor version of Ginkgo** + +Progress Reports are generated: +- whenever the user explicitly requests one (via `SIGINFO` or `SIGUSR1`) +- on nodes decorated with PollProgressAfter +- on suites run with --poll-progress-after +- whenever a test times out + +Ginkgo uses Progress Reports to convey the current state of the test suite, including any running goroutines. By attaching a progress reporter you are able to supplement these reports with additional information. + +# AttachProgressReporter returns a function that can be called to detach the progress reporter + +You can learn more about AttachProgressReporter here: https://onsi.github.io/ginkgo/#attaching-additional-information-to-progress-reports +*/ +func AttachProgressReporter(reporter func() string) func() { + return global.Suite.AttachProgressReporter(reporter) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go b/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go new file mode 100644 index 000000000..c65af4ce1 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go @@ -0,0 +1,143 @@ +package ginkgo + +import ( + "github.com/onsi/ginkgo/v2/internal" +) + +/* +Offset(uint) is a decorator that allows you to change the stack-frame offset used when computing the line number of the node in question. + +You can learn more here: https://onsi.github.io/ginkgo/#the-offset-decorator +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +type Offset = internal.Offset + +/* +FlakeAttempts(uint N) is a decorator that allows you to mark individual specs or spec containers as flaky. Ginkgo will run them up to `N` times until they pass. + +You can learn more here: https://onsi.github.io/ginkgo/#the-flakeattempts-decorator +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +type FlakeAttempts = internal.FlakeAttempts + +/* +MustPassRepeatedly(uint N) is a decorator that allows you to repeat the execution of individual specs or spec containers. Ginkgo will run them up to `N` times until they fail. + +You can learn more here: https://onsi.github.io/ginkgo/#the-mustpassrepeatedly-decorator +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +type MustPassRepeatedly = internal.MustPassRepeatedly + +/* +Focus is a decorator that allows you to mark a spec or container as focused. Identical to FIt and FDescribe. + +You can learn more here: https://onsi.github.io/ginkgo/#filtering-specs +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +const Focus = internal.Focus + +/* +Pending is a decorator that allows you to mark a spec or container as pending. Identical to PIt and PDescribe. + +You can learn more here: https://onsi.github.io/ginkgo/#filtering-specs +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +const Pending = internal.Pending + +/* +Serial is a decorator that allows you to mark a spec or container as serial. These specs will never run in parallel with other specs. +Specs in ordered containers cannot be marked as serial - mark the ordered container instead. + +You can learn more here: https://onsi.github.io/ginkgo/#serial-specs +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +const Serial = internal.Serial + +/* +Ordered is a decorator that allows you to mark a container as ordered. Specs in the container will always run in the order they appear. +They will never be randomized and they will never run in parallel with one another, though they may run in parallel with other specs. + +You can learn more here: https://onsi.github.io/ginkgo/#ordered-containers +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +const Ordered = internal.Ordered + +/* +ContinueOnFailure is a decorator that allows you to mark an Ordered container to continue running specs even if failures occur. Ordinarily an ordered container will stop running specs after the first failure occurs. Note that if a BeforeAll or a BeforeEach/JustBeforeEach annotated with OncePerOrdered fails then no specs will run as the precondition for the Ordered container will consider to be failed. + +ContinueOnFailure only applies to the outermost Ordered container. Attempting to place ContinueOnFailure in a nested container will result in an error. + +You can learn more here: https://onsi.github.io/ginkgo/#ordered-containers +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +const ContinueOnFailure = internal.ContinueOnFailure + +/* +OncePerOrdered is a decorator that allows you to mark outer BeforeEach, AfterEach, JustBeforeEach, and JustAfterEach setup nodes to run once +per ordered context. Normally these setup nodes run around each individual spec, with OncePerOrdered they will run once around the set of specs in an ordered container. +The behavior for non-Ordered containers/specs is unchanged. + +You can learn more here: https://onsi.github.io/ginkgo/#setup-around-ordered-containers-the-onceperordered-decorator +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +const OncePerOrdered = internal.OncePerOrdered + +/* +Label decorates specs with Labels. Multiple labels can be passed to Label and these can be arbitrary strings but must not include the following characters: "&|!,()/". +Labels can be applied to container and subject nodes, but not setup nodes. You can provide multiple Labels to a given node and a spec's labels is the union of all labels in its node hierarchy. + +You can learn more here: https://onsi.github.io/ginkgo/#spec-labels +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +func Label(labels ...string) Labels { + return Labels(labels) +} + +/* +Labels are the type for spec Label decorators. Use Label(...) to construct Labels. +You can learn more here: https://onsi.github.io/ginkgo/#spec-labels +*/ +type Labels = internal.Labels + +/* +PollProgressAfter allows you to override the configured value for --poll-progress-after for a particular node. + +Ginkgo will start emitting node progress if the node is still running after a duration of PollProgressAfter. This allows you to get quicker feedback about the state of a long-running spec. +*/ +type PollProgressAfter = internal.PollProgressAfter + +/* +PollProgressInterval allows you to override the configured value for --poll-progress-interval for a particular node. + +Once a node has been running for longer than PollProgressAfter Ginkgo will emit node progress periodically at an interval of PollProgresInterval. +*/ +type PollProgressInterval = internal.PollProgressInterval + +/* +NodeTimeout allows you to specify a timeout for an indivdiual node. The node cannot be a container and must be interruptible (i.e. it must be passed a function that accepts a SpecContext or context.Context). + +If the node does not exit within the specified NodeTimeout its context will be cancelled. The node wil then have a period of time controlled by the GracePeriod decorator (or global --grace-period command-line argument) to exit. If the node does not exit within GracePeriod Ginkgo will leak the node and proceed to any clean-up nodes associated with the current spec. +*/ +type NodeTimeout = internal.NodeTimeout + +/* +SpecTimeout allows you to specify a timeout for an indivdiual spec. SpecTimeout can only decorate interruptible It nodes. + +All nodes associated with the It node will need to complete before the SpecTimeout has elapsed. Individual nodes (e.g. BeforeEach) may be decorated with different NodeTimeouts - but these can only serve to provide a more stringent deadline for the node in question; they cannot extend the deadline past the SpecTimeout. + +If the spec does not complete within the specified SpecTimeout the currently running node will have its context cancelled. The node wil then have a period of time controlled by that node's GracePeriod decorator (or global --grace-period command-line argument) to exit. If the node does not exit within GracePeriod Ginkgo will leak the node and proceed to any clean-up nodes associated with the current spec. +*/ +type SpecTimeout = internal.SpecTimeout + +/* +GracePeriod denotes the period of time Ginkgo will wait for an interruptible node to exit once an interruption (whether due to a timeout or a user-invoked signal) has occurred. If both the global --grace-period cli flag and a GracePeriod decorator are specified the value in the decorator will take precedence. + +Nodes that do not finish within a GracePeriod will be leaked and Ginkgo will proceed to run subsequent nodes. In the event of a timeout, such leaks will be reported to the user. +*/ +type GracePeriod = internal.GracePeriod + +/* +SuppressProgressReporting is a decorator that allows you to disable progress reporting of a particular node. This is useful if `ginkgo -v -progress` is generating too much noise; particularly +if you have a `ReportAfterEach` node that is running for every skipped spec and is generating lots of progress reports. +*/ +const SuppressProgressReporting = internal.SuppressProgressReporting diff --git a/vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go b/vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go new file mode 100644 index 000000000..f912bbec6 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go @@ -0,0 +1,135 @@ +package ginkgo + +import ( + "time" + + "github.com/onsi/ginkgo/v2/internal" + "github.com/onsi/ginkgo/v2/internal/global" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +/* +Deprecated: Done Channel for asynchronous testing + +The Done channel pattern is no longer supported in Ginkgo 2.0. +See here for better patterns for asynchronous testing: https://onsi.github.io/ginkgo/#patterns-for-asynchronous-testing + +For a migration guide see: https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-async-testing +*/ +type Done = internal.Done + +/* +Deprecated: Custom Ginkgo test reporters are deprecated in Ginkgo 2.0. + +Use Ginkgo's reporting nodes instead and 2.0 reporting infrastructure instead. You can learn more here: https://onsi.github.io/ginkgo/#reporting-infrastructure +For a migration guide see: https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-custom-reporters +*/ +type Reporter = reporters.DeprecatedReporter + +/* +Deprecated: Custom Reporters have been removed in Ginkgo 2.0. RunSpecsWithDefaultAndCustomReporters will simply call RunSpecs() + +Use Ginkgo's reporting nodes instead and 2.0 reporting infrastructure instead. You can learn more here: https://onsi.github.io/ginkgo/#reporting-infrastructure +For a migration guide see: https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-custom-reporters +*/ +func RunSpecsWithDefaultAndCustomReporters(t GinkgoTestingT, description string, _ []Reporter) bool { + deprecationTracker.TrackDeprecation(types.Deprecations.CustomReporter()) + return RunSpecs(t, description) +} + +/* +Deprecated: Custom Reporters have been removed in Ginkgo 2.0. RunSpecsWithCustomReporters will simply call RunSpecs() + +Use Ginkgo's reporting nodes instead and 2.0 reporting infrastructure instead. You can learn more here: https://onsi.github.io/ginkgo/#reporting-infrastructure +For a migration guide see: https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-custom-reporters +*/ +func RunSpecsWithCustomReporters(t GinkgoTestingT, description string, _ []Reporter) bool { + deprecationTracker.TrackDeprecation(types.Deprecations.CustomReporter()) + return RunSpecs(t, description) +} + +/* +Deprecated: GinkgoTestDescription has been replaced with SpecReport. + +Use CurrentSpecReport() instead. +You can learn more here: https://onsi.github.io/ginkgo/#getting-a-report-for-the-current-spec +The SpecReport type is documented here: https://pkg.go.dev/github.com/onsi/ginkgo/v2/types#SpecReport +*/ +type DeprecatedGinkgoTestDescription struct { + FullTestText string + ComponentTexts []string + TestText string + + FileName string + LineNumber int + + Failed bool + Duration time.Duration +} +type GinkgoTestDescription = DeprecatedGinkgoTestDescription + +/* +Deprecated: CurrentGinkgoTestDescription has been replaced with CurrentSpecReport. + +Use CurrentSpecReport() instead. +You can learn more here: https://onsi.github.io/ginkgo/#getting-a-report-for-the-current-spec +The SpecReport type is documented here: https://pkg.go.dev/github.com/onsi/ginkgo/v2/types#SpecReport +*/ +func CurrentGinkgoTestDescription() DeprecatedGinkgoTestDescription { + deprecationTracker.TrackDeprecation( + types.Deprecations.CurrentGinkgoTestDescription(), + types.NewCodeLocation(1), + ) + report := global.Suite.CurrentSpecReport() + if report.State == types.SpecStateInvalid { + return GinkgoTestDescription{} + } + componentTexts := []string{} + componentTexts = append(componentTexts, report.ContainerHierarchyTexts...) + componentTexts = append(componentTexts, report.LeafNodeText) + + return DeprecatedGinkgoTestDescription{ + ComponentTexts: componentTexts, + FullTestText: report.FullText(), + TestText: report.LeafNodeText, + FileName: report.LeafNodeLocation.FileName, + LineNumber: report.LeafNodeLocation.LineNumber, + Failed: report.State.Is(types.SpecStateFailureStates), + Duration: report.RunTime, + } +} + +/* +Deprecated: GinkgoParallelNode() has been renamed to GinkgoParallelProcess() +*/ +func GinkgoParallelNode() int { + deprecationTracker.TrackDeprecation( + types.Deprecations.ParallelNode(), + types.NewCodeLocation(1), + ) + return GinkgoParallelProcess() +} + +/* +Deprecated: Benchmarker has been removed from Ginkgo 2.0 + +Use Gomega's gmeasure package instead. +You can learn more here: https://onsi.github.io/ginkgo/#benchmarking-code +*/ +type Benchmarker interface { + Time(name string, body func(), info ...interface{}) (elapsedTime time.Duration) + RecordValue(name string, value float64, info ...interface{}) + RecordValueWithPrecision(name string, value float64, units string, precision int, info ...interface{}) +} + +/* +Deprecated: Measure() has been removed from Ginkgo 2.0 + +Use Gomega's gmeasure package instead. +You can learn more here: https://onsi.github.io/ginkgo/#benchmarking-code +*/ +func Measure(_ ...interface{}) bool { + deprecationTracker.TrackDeprecation(types.Deprecations.Measure(), types.NewCodeLocation(1)) + return true +} diff --git a/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go new file mode 100644 index 000000000..778bfd7c7 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go @@ -0,0 +1,41 @@ +// +build !windows + +/* +These packages are used for colorize on Windows and contributed by mattn.jp@gmail.com + + * go-colorable: + * go-isatty: + +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +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. +*/ + +package formatter + +import ( + "io" + "os" +) + +func newColorable(file *os.File) io.Writer { + return file +} diff --git a/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_windows.go b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_windows.go new file mode 100644 index 000000000..dd1d143cc --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_windows.go @@ -0,0 +1,809 @@ +/* +These packages are used for colorize on Windows and contributed by mattn.jp@gmail.com + + * go-colorable: + * go-isatty: + +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +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. +*/ + +package formatter + +import ( + "bytes" + "fmt" + "io" + "math" + "os" + "strconv" + "strings" + "syscall" + "unsafe" +) + +var ( + kernel32 = syscall.NewLazyDLL("kernel32.dll") + procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") + procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") + procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") + procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") + procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute") + procGetConsoleMode = kernel32.NewProc("GetConsoleMode") +) + +func isTerminal(fd uintptr) bool { + var st uint32 + r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) + return r != 0 && e == 0 +} + +const ( + foregroundBlue = 0x1 + foregroundGreen = 0x2 + foregroundRed = 0x4 + foregroundIntensity = 0x8 + foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity) + backgroundBlue = 0x10 + backgroundGreen = 0x20 + backgroundRed = 0x40 + backgroundIntensity = 0x80 + backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity) +) + +type wchar uint16 +type short int16 +type dword uint32 +type word uint16 + +type coord struct { + x short + y short +} + +type smallRect struct { + left short + top short + right short + bottom short +} + +type consoleScreenBufferInfo struct { + size coord + cursorPosition coord + attributes word + window smallRect + maximumWindowSize coord +} + +type writer struct { + out io.Writer + handle syscall.Handle + lastbuf bytes.Buffer + oldattr word +} + +func newColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + if isTerminal(file.Fd()) { + var csbi consoleScreenBufferInfo + handle := syscall.Handle(file.Fd()) + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + return &writer{out: file, handle: handle, oldattr: csbi.attributes} + } else { + return file + } +} + +var color256 = map[int]int{ + 0: 0x000000, + 1: 0x800000, + 2: 0x008000, + 3: 0x808000, + 4: 0x000080, + 5: 0x800080, + 6: 0x008080, + 7: 0xc0c0c0, + 8: 0x808080, + 9: 0xff0000, + 10: 0x00ff00, + 11: 0xffff00, + 12: 0x0000ff, + 13: 0xff00ff, + 14: 0x00ffff, + 15: 0xffffff, + 16: 0x000000, + 17: 0x00005f, + 18: 0x000087, + 19: 0x0000af, + 20: 0x0000d7, + 21: 0x0000ff, + 22: 0x005f00, + 23: 0x005f5f, + 24: 0x005f87, + 25: 0x005faf, + 26: 0x005fd7, + 27: 0x005fff, + 28: 0x008700, + 29: 0x00875f, + 30: 0x008787, + 31: 0x0087af, + 32: 0x0087d7, + 33: 0x0087ff, + 34: 0x00af00, + 35: 0x00af5f, + 36: 0x00af87, + 37: 0x00afaf, + 38: 0x00afd7, + 39: 0x00afff, + 40: 0x00d700, + 41: 0x00d75f, + 42: 0x00d787, + 43: 0x00d7af, + 44: 0x00d7d7, + 45: 0x00d7ff, + 46: 0x00ff00, + 47: 0x00ff5f, + 48: 0x00ff87, + 49: 0x00ffaf, + 50: 0x00ffd7, + 51: 0x00ffff, + 52: 0x5f0000, + 53: 0x5f005f, + 54: 0x5f0087, + 55: 0x5f00af, + 56: 0x5f00d7, + 57: 0x5f00ff, + 58: 0x5f5f00, + 59: 0x5f5f5f, + 60: 0x5f5f87, + 61: 0x5f5faf, + 62: 0x5f5fd7, + 63: 0x5f5fff, + 64: 0x5f8700, + 65: 0x5f875f, + 66: 0x5f8787, + 67: 0x5f87af, + 68: 0x5f87d7, + 69: 0x5f87ff, + 70: 0x5faf00, + 71: 0x5faf5f, + 72: 0x5faf87, + 73: 0x5fafaf, + 74: 0x5fafd7, + 75: 0x5fafff, + 76: 0x5fd700, + 77: 0x5fd75f, + 78: 0x5fd787, + 79: 0x5fd7af, + 80: 0x5fd7d7, + 81: 0x5fd7ff, + 82: 0x5fff00, + 83: 0x5fff5f, + 84: 0x5fff87, + 85: 0x5fffaf, + 86: 0x5fffd7, + 87: 0x5fffff, + 88: 0x870000, + 89: 0x87005f, + 90: 0x870087, + 91: 0x8700af, + 92: 0x8700d7, + 93: 0x8700ff, + 94: 0x875f00, + 95: 0x875f5f, + 96: 0x875f87, + 97: 0x875faf, + 98: 0x875fd7, + 99: 0x875fff, + 100: 0x878700, + 101: 0x87875f, + 102: 0x878787, + 103: 0x8787af, + 104: 0x8787d7, + 105: 0x8787ff, + 106: 0x87af00, + 107: 0x87af5f, + 108: 0x87af87, + 109: 0x87afaf, + 110: 0x87afd7, + 111: 0x87afff, + 112: 0x87d700, + 113: 0x87d75f, + 114: 0x87d787, + 115: 0x87d7af, + 116: 0x87d7d7, + 117: 0x87d7ff, + 118: 0x87ff00, + 119: 0x87ff5f, + 120: 0x87ff87, + 121: 0x87ffaf, + 122: 0x87ffd7, + 123: 0x87ffff, + 124: 0xaf0000, + 125: 0xaf005f, + 126: 0xaf0087, + 127: 0xaf00af, + 128: 0xaf00d7, + 129: 0xaf00ff, + 130: 0xaf5f00, + 131: 0xaf5f5f, + 132: 0xaf5f87, + 133: 0xaf5faf, + 134: 0xaf5fd7, + 135: 0xaf5fff, + 136: 0xaf8700, + 137: 0xaf875f, + 138: 0xaf8787, + 139: 0xaf87af, + 140: 0xaf87d7, + 141: 0xaf87ff, + 142: 0xafaf00, + 143: 0xafaf5f, + 144: 0xafaf87, + 145: 0xafafaf, + 146: 0xafafd7, + 147: 0xafafff, + 148: 0xafd700, + 149: 0xafd75f, + 150: 0xafd787, + 151: 0xafd7af, + 152: 0xafd7d7, + 153: 0xafd7ff, + 154: 0xafff00, + 155: 0xafff5f, + 156: 0xafff87, + 157: 0xafffaf, + 158: 0xafffd7, + 159: 0xafffff, + 160: 0xd70000, + 161: 0xd7005f, + 162: 0xd70087, + 163: 0xd700af, + 164: 0xd700d7, + 165: 0xd700ff, + 166: 0xd75f00, + 167: 0xd75f5f, + 168: 0xd75f87, + 169: 0xd75faf, + 170: 0xd75fd7, + 171: 0xd75fff, + 172: 0xd78700, + 173: 0xd7875f, + 174: 0xd78787, + 175: 0xd787af, + 176: 0xd787d7, + 177: 0xd787ff, + 178: 0xd7af00, + 179: 0xd7af5f, + 180: 0xd7af87, + 181: 0xd7afaf, + 182: 0xd7afd7, + 183: 0xd7afff, + 184: 0xd7d700, + 185: 0xd7d75f, + 186: 0xd7d787, + 187: 0xd7d7af, + 188: 0xd7d7d7, + 189: 0xd7d7ff, + 190: 0xd7ff00, + 191: 0xd7ff5f, + 192: 0xd7ff87, + 193: 0xd7ffaf, + 194: 0xd7ffd7, + 195: 0xd7ffff, + 196: 0xff0000, + 197: 0xff005f, + 198: 0xff0087, + 199: 0xff00af, + 200: 0xff00d7, + 201: 0xff00ff, + 202: 0xff5f00, + 203: 0xff5f5f, + 204: 0xff5f87, + 205: 0xff5faf, + 206: 0xff5fd7, + 207: 0xff5fff, + 208: 0xff8700, + 209: 0xff875f, + 210: 0xff8787, + 211: 0xff87af, + 212: 0xff87d7, + 213: 0xff87ff, + 214: 0xffaf00, + 215: 0xffaf5f, + 216: 0xffaf87, + 217: 0xffafaf, + 218: 0xffafd7, + 219: 0xffafff, + 220: 0xffd700, + 221: 0xffd75f, + 222: 0xffd787, + 223: 0xffd7af, + 224: 0xffd7d7, + 225: 0xffd7ff, + 226: 0xffff00, + 227: 0xffff5f, + 228: 0xffff87, + 229: 0xffffaf, + 230: 0xffffd7, + 231: 0xffffff, + 232: 0x080808, + 233: 0x121212, + 234: 0x1c1c1c, + 235: 0x262626, + 236: 0x303030, + 237: 0x3a3a3a, + 238: 0x444444, + 239: 0x4e4e4e, + 240: 0x585858, + 241: 0x626262, + 242: 0x6c6c6c, + 243: 0x767676, + 244: 0x808080, + 245: 0x8a8a8a, + 246: 0x949494, + 247: 0x9e9e9e, + 248: 0xa8a8a8, + 249: 0xb2b2b2, + 250: 0xbcbcbc, + 251: 0xc6c6c6, + 252: 0xd0d0d0, + 253: 0xdadada, + 254: 0xe4e4e4, + 255: 0xeeeeee, +} + +func (w *writer) Write(data []byte) (n int, err error) { + var csbi consoleScreenBufferInfo + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + + er := bytes.NewBuffer(data) +loop: + for { + r1, _, err := procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + if r1 == 0 { + break loop + } + + c1, _, err := er.ReadRune() + if err != nil { + break loop + } + if c1 != 0x1b { + fmt.Fprint(w.out, string(c1)) + continue + } + c2, _, err := er.ReadRune() + if err != nil { + w.lastbuf.WriteRune(c1) + break loop + } + if c2 != 0x5b { + w.lastbuf.WriteRune(c1) + w.lastbuf.WriteRune(c2) + continue + } + + var buf bytes.Buffer + var m rune + for { + c, _, err := er.ReadRune() + if err != nil { + w.lastbuf.WriteRune(c1) + w.lastbuf.WriteRune(c2) + w.lastbuf.Write(buf.Bytes()) + break loop + } + if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { + m = c + break + } + buf.Write([]byte(string(c))) + } + + var csbi consoleScreenBufferInfo + switch m { + case 'A': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.y -= short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'B': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.y += short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'C': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x -= short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'D': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + if n, err = strconv.Atoi(buf.String()); err == nil { + var csbi consoleScreenBufferInfo + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x += short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + } + case 'E': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = 0 + csbi.cursorPosition.y += short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'F': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = 0 + csbi.cursorPosition.y -= short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'G': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'H': + token := strings.Split(buf.String(), ";") + if len(token) != 2 { + continue + } + n1, err := strconv.Atoi(token[0]) + if err != nil { + continue + } + n2, err := strconv.Atoi(token[1]) + if err != nil { + continue + } + csbi.cursorPosition.x = short(n2) + csbi.cursorPosition.x = short(n1) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'J': + n, err := strconv.Atoi(buf.String()) + if err != nil { + continue + } + var cursor coord + switch n { + case 0: + cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} + case 1: + cursor = coord{x: csbi.window.left, y: csbi.window.top} + case 2: + cursor = coord{x: csbi.window.left, y: csbi.window.top} + } + var count, written dword + count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x) + procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'K': + n, err := strconv.Atoi(buf.String()) + if err != nil { + continue + } + var cursor coord + switch n { + case 0: + cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} + case 1: + cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} + case 2: + cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} + } + var count, written dword + count = dword(csbi.size.x - csbi.cursorPosition.x) + procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'm': + attr := csbi.attributes + cs := buf.String() + if cs == "" { + procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(w.oldattr)) + continue + } + token := strings.Split(cs, ";") + for i := 0; i < len(token); i += 1 { + ns := token[i] + if n, err = strconv.Atoi(ns); err == nil { + switch { + case n == 0 || n == 100: + attr = w.oldattr + case 1 <= n && n <= 5: + attr |= foregroundIntensity + case n == 7: + attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) + case 22 == n || n == 25 || n == 25: + attr |= foregroundIntensity + case n == 27: + attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) + case 30 <= n && n <= 37: + attr = (attr & backgroundMask) + if (n-30)&1 != 0 { + attr |= foregroundRed + } + if (n-30)&2 != 0 { + attr |= foregroundGreen + } + if (n-30)&4 != 0 { + attr |= foregroundBlue + } + case n == 38: // set foreground color. + if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") { + if n256, err := strconv.Atoi(token[i+2]); err == nil { + if n256foreAttr == nil { + n256setup() + } + attr &= backgroundMask + attr |= n256foreAttr[n256] + i += 2 + } + } else { + attr = attr & (w.oldattr & backgroundMask) + } + case n == 39: // reset foreground color. + attr &= backgroundMask + attr |= w.oldattr & foregroundMask + case 40 <= n && n <= 47: + attr = (attr & foregroundMask) + if (n-40)&1 != 0 { + attr |= backgroundRed + } + if (n-40)&2 != 0 { + attr |= backgroundGreen + } + if (n-40)&4 != 0 { + attr |= backgroundBlue + } + case n == 48: // set background color. + if i < len(token)-2 && token[i+1] == "5" { + if n256, err := strconv.Atoi(token[i+2]); err == nil { + if n256backAttr == nil { + n256setup() + } + attr &= foregroundMask + attr |= n256backAttr[n256] + i += 2 + } + } else { + attr = attr & (w.oldattr & foregroundMask) + } + case n == 49: // reset foreground color. + attr &= foregroundMask + attr |= w.oldattr & backgroundMask + case 90 <= n && n <= 97: + attr = (attr & backgroundMask) + attr |= foregroundIntensity + if (n-90)&1 != 0 { + attr |= foregroundRed + } + if (n-90)&2 != 0 { + attr |= foregroundGreen + } + if (n-90)&4 != 0 { + attr |= foregroundBlue + } + case 100 <= n && n <= 107: + attr = (attr & foregroundMask) + attr |= backgroundIntensity + if (n-100)&1 != 0 { + attr |= backgroundRed + } + if (n-100)&2 != 0 { + attr |= backgroundGreen + } + if (n-100)&4 != 0 { + attr |= backgroundBlue + } + } + procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(attr)) + } + } + } + } + return len(data) - w.lastbuf.Len(), nil +} + +type consoleColor struct { + rgb int + red bool + green bool + blue bool + intensity bool +} + +func (c consoleColor) foregroundAttr() (attr word) { + if c.red { + attr |= foregroundRed + } + if c.green { + attr |= foregroundGreen + } + if c.blue { + attr |= foregroundBlue + } + if c.intensity { + attr |= foregroundIntensity + } + return +} + +func (c consoleColor) backgroundAttr() (attr word) { + if c.red { + attr |= backgroundRed + } + if c.green { + attr |= backgroundGreen + } + if c.blue { + attr |= backgroundBlue + } + if c.intensity { + attr |= backgroundIntensity + } + return +} + +var color16 = []consoleColor{ + consoleColor{0x000000, false, false, false, false}, + consoleColor{0x000080, false, false, true, false}, + consoleColor{0x008000, false, true, false, false}, + consoleColor{0x008080, false, true, true, false}, + consoleColor{0x800000, true, false, false, false}, + consoleColor{0x800080, true, false, true, false}, + consoleColor{0x808000, true, true, false, false}, + consoleColor{0xc0c0c0, true, true, true, false}, + consoleColor{0x808080, false, false, false, true}, + consoleColor{0x0000ff, false, false, true, true}, + consoleColor{0x00ff00, false, true, false, true}, + consoleColor{0x00ffff, false, true, true, true}, + consoleColor{0xff0000, true, false, false, true}, + consoleColor{0xff00ff, true, false, true, true}, + consoleColor{0xffff00, true, true, false, true}, + consoleColor{0xffffff, true, true, true, true}, +} + +type hsv struct { + h, s, v float32 +} + +func (a hsv) dist(b hsv) float32 { + dh := a.h - b.h + switch { + case dh > 0.5: + dh = 1 - dh + case dh < -0.5: + dh = -1 - dh + } + ds := a.s - b.s + dv := a.v - b.v + return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv))) +} + +func toHSV(rgb int) hsv { + r, g, b := float32((rgb&0xFF0000)>>16)/256.0, + float32((rgb&0x00FF00)>>8)/256.0, + float32(rgb&0x0000FF)/256.0 + min, max := minmax3f(r, g, b) + h := max - min + if h > 0 { + if max == r { + h = (g - b) / h + if h < 0 { + h += 6 + } + } else if max == g { + h = 2 + (b-r)/h + } else { + h = 4 + (r-g)/h + } + } + h /= 6.0 + s := max - min + if max != 0 { + s /= max + } + v := max + return hsv{h: h, s: s, v: v} +} + +type hsvTable []hsv + +func toHSVTable(rgbTable []consoleColor) hsvTable { + t := make(hsvTable, len(rgbTable)) + for i, c := range rgbTable { + t[i] = toHSV(c.rgb) + } + return t +} + +func (t hsvTable) find(rgb int) consoleColor { + hsv := toHSV(rgb) + n := 7 + l := float32(5.0) + for i, p := range t { + d := hsv.dist(p) + if d < l { + l, n = d, i + } + } + return color16[n] +} + +func minmax3f(a, b, c float32) (min, max float32) { + if a < b { + if b < c { + return a, c + } else if a < c { + return a, b + } else { + return c, b + } + } else { + if a < c { + return b, c + } else if b < c { + return b, a + } else { + return c, a + } + } +} + +var n256foreAttr []word +var n256backAttr []word + +func n256setup() { + n256foreAttr = make([]word, 256) + n256backAttr = make([]word, 256) + t := toHSVTable(color16) + for i, rgb := range color256 { + c := t.find(rgb) + n256foreAttr[i] = c.foregroundAttr() + n256backAttr[i] = c.backgroundAttr() + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go b/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go new file mode 100644 index 000000000..4d5749114 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go @@ -0,0 +1,234 @@ +package formatter + +import ( + "fmt" + "os" + "regexp" + "strconv" + "strings" +) + +// ColorableStdOut and ColorableStdErr enable color output support on Windows +var ColorableStdOut = newColorable(os.Stdout) +var ColorableStdErr = newColorable(os.Stderr) + +const COLS = 80 + +type ColorMode uint8 + +const ( + ColorModeNone ColorMode = iota + ColorModeTerminal + ColorModePassthrough +) + +var SingletonFormatter = New(ColorModeTerminal) + +func F(format string, args ...interface{}) string { + return SingletonFormatter.F(format, args...) +} + +func Fi(indentation uint, format string, args ...interface{}) string { + return SingletonFormatter.Fi(indentation, format, args...) +} + +func Fiw(indentation uint, maxWidth uint, format string, args ...interface{}) string { + return SingletonFormatter.Fiw(indentation, maxWidth, format, args...) +} + +type Formatter struct { + ColorMode ColorMode + colors map[string]string + styleRe *regexp.Regexp + preserveColorStylingTags bool +} + +func NewWithNoColorBool(noColor bool) Formatter { + if noColor { + return New(ColorModeNone) + } + return New(ColorModeTerminal) +} + +func New(colorMode ColorMode) Formatter { + colorAliases := map[string]int{ + "black": 0, + "red": 1, + "green": 2, + "yellow": 3, + "blue": 4, + "magenta": 5, + "cyan": 6, + "white": 7, + } + for colorAlias, n := range colorAliases { + colorAliases[fmt.Sprintf("bright-%s", colorAlias)] = n + 8 + } + + getColor := func(color, defaultEscapeCode string) string { + color = strings.ToUpper(strings.ReplaceAll(color, "-", "_")) + envVar := fmt.Sprintf("GINKGO_CLI_COLOR_%s", color) + envVarColor := os.Getenv(envVar) + if envVarColor == "" { + return defaultEscapeCode + } + if colorCode, ok := colorAliases[envVarColor]; ok { + return fmt.Sprintf("\x1b[38;5;%dm", colorCode) + } + colorCode, err := strconv.Atoi(envVarColor) + if err != nil || colorCode < 0 || colorCode > 255 { + return defaultEscapeCode + } + return fmt.Sprintf("\x1b[38;5;%dm", colorCode) + } + + if _, noColor := os.LookupEnv("GINKGO_NO_COLOR"); noColor { + colorMode = ColorModeNone + } + + f := Formatter{ + ColorMode: colorMode, + colors: map[string]string{ + "/": "\x1b[0m", + "bold": "\x1b[1m", + "underline": "\x1b[4m", + + "red": getColor("red", "\x1b[38;5;9m"), + "orange": getColor("orange", "\x1b[38;5;214m"), + "coral": getColor("coral", "\x1b[38;5;204m"), + "magenta": getColor("magenta", "\x1b[38;5;13m"), + "green": getColor("green", "\x1b[38;5;10m"), + "dark-green": getColor("dark-green", "\x1b[38;5;28m"), + "yellow": getColor("yellow", "\x1b[38;5;11m"), + "light-yellow": getColor("light-yellow", "\x1b[38;5;228m"), + "cyan": getColor("cyan", "\x1b[38;5;14m"), + "gray": getColor("gray", "\x1b[38;5;243m"), + "light-gray": getColor("light-gray", "\x1b[38;5;246m"), + "blue": getColor("blue", "\x1b[38;5;12m"), + }, + } + colors := []string{} + for color := range f.colors { + colors = append(colors, color) + } + f.styleRe = regexp.MustCompile("{{(" + strings.Join(colors, "|") + ")}}") + return f +} + +func (f Formatter) F(format string, args ...interface{}) string { + return f.Fi(0, format, args...) +} + +func (f Formatter) Fi(indentation uint, format string, args ...interface{}) string { + return f.Fiw(indentation, 0, format, args...) +} + +func (f Formatter) Fiw(indentation uint, maxWidth uint, format string, args ...interface{}) string { + out := f.style(format) + if len(args) > 0 { + out = fmt.Sprintf(out, args...) + } + + if indentation == 0 && maxWidth == 0 { + return out + } + + lines := strings.Split(out, "\n") + + if maxWidth != 0 { + outLines := []string{} + + maxWidth = maxWidth - indentation*2 + for _, line := range lines { + if f.length(line) <= maxWidth { + outLines = append(outLines, line) + continue + } + words := strings.Split(line, " ") + outWords := []string{words[0]} + length := uint(f.length(words[0])) + for _, word := range words[1:] { + wordLength := f.length(word) + if length+wordLength+1 <= maxWidth { + length += wordLength + 1 + outWords = append(outWords, word) + continue + } + outLines = append(outLines, strings.Join(outWords, " ")) + outWords = []string{word} + length = wordLength + } + if len(outWords) > 0 { + outLines = append(outLines, strings.Join(outWords, " ")) + } + } + + lines = outLines + } + + if indentation == 0 { + return strings.Join(lines, "\n") + } + + padding := strings.Repeat(" ", int(indentation)) + for i := range lines { + if lines[i] != "" { + lines[i] = padding + lines[i] + } + } + + return strings.Join(lines, "\n") +} + +func (f Formatter) length(styled string) uint { + n := uint(0) + inStyle := false + for _, b := range styled { + if inStyle { + if b == 'm' { + inStyle = false + } + continue + } + if b == '\x1b' { + inStyle = true + continue + } + n += 1 + } + return n +} + +func (f Formatter) CycleJoin(elements []string, joiner string, cycle []string) string { + if len(elements) == 0 { + return "" + } + n := len(cycle) + out := "" + for i, text := range elements { + out += cycle[i%n] + text + if i < len(elements)-1 { + out += joiner + } + } + out += "{{/}}" + return f.style(out) +} + +func (f Formatter) style(s string) string { + switch f.ColorMode { + case ColorModeNone: + return f.styleRe.ReplaceAllString(s, "") + case ColorModePassthrough: + return s + case ColorModeTerminal: + return f.styleRe.ReplaceAllStringFunc(s, func(match string) string { + if out, ok := f.colors[strings.Trim(match, "{}")]; ok { + return out + } + return match + }) + } + + return "" +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go new file mode 100644 index 000000000..fd1726084 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go @@ -0,0 +1,76 @@ +package build + +import ( + "fmt" + "os" + "path" + + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" + "github.com/onsi/ginkgo/v2/types" +) + +func BuildBuildCommand() command.Command { + var cliConfig = types.NewDefaultCLIConfig() + var goFlagsConfig = types.NewDefaultGoFlagsConfig() + + flags, err := types.BuildBuildCommandFlagSet(&cliConfig, &goFlagsConfig) + if err != nil { + panic(err) + } + + return command.Command{ + Name: "build", + Flags: flags, + Usage: "ginkgo build ", + ShortDoc: "Build the passed in (or the package in the current directory if left blank).", + DocLink: "precompiling-suites", + Command: func(args []string, _ []string) { + var errors []error + cliConfig, goFlagsConfig, errors = types.VetAndInitializeCLIAndGoConfig(cliConfig, goFlagsConfig) + command.AbortIfErrors("Ginkgo detected configuration issues:", errors) + + buildSpecs(args, cliConfig, goFlagsConfig) + }, + } +} + +func buildSpecs(args []string, cliConfig types.CLIConfig, goFlagsConfig types.GoFlagsConfig) { + suites := internal.FindSuites(args, cliConfig, false).WithoutState(internal.TestSuiteStateSkippedByFilter) + if len(suites) == 0 { + command.AbortWith("Found no test suites") + } + + internal.VerifyCLIAndFrameworkVersion(suites) + + opc := internal.NewOrderedParallelCompiler(cliConfig.ComputedNumCompilers()) + opc.StartCompiling(suites, goFlagsConfig) + + for { + suiteIdx, suite := opc.Next() + if suiteIdx >= len(suites) { + break + } + suites[suiteIdx] = suite + if suite.State.Is(internal.TestSuiteStateFailedToCompile) { + fmt.Println(suite.CompilationError.Error()) + } else { + if len(goFlagsConfig.O) == 0 { + goFlagsConfig.O = path.Join(suite.Path, suite.PackageName+".test") + } else { + stat, err := os.Stat(goFlagsConfig.O) + if err != nil { + panic(err) + } + if stat.IsDir() { + goFlagsConfig.O += "/" + suite.PackageName + ".test" + } + } + fmt.Printf("Compiled %s\n", goFlagsConfig.O) + } + } + + if suites.CountWithState(internal.TestSuiteStateFailedToCompile) > 0 { + command.AbortWith("Failed to compile all tests") + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go new file mode 100644 index 000000000..2efd28608 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go @@ -0,0 +1,61 @@ +package command + +import "fmt" + +type AbortDetails struct { + ExitCode int + Error error + EmitUsage bool +} + +func Abort(details AbortDetails) { + panic(details) +} + +func AbortGracefullyWith(format string, args ...interface{}) { + Abort(AbortDetails{ + ExitCode: 0, + Error: fmt.Errorf(format, args...), + EmitUsage: false, + }) +} + +func AbortWith(format string, args ...interface{}) { + Abort(AbortDetails{ + ExitCode: 1, + Error: fmt.Errorf(format, args...), + EmitUsage: false, + }) +} + +func AbortWithUsage(format string, args ...interface{}) { + Abort(AbortDetails{ + ExitCode: 1, + Error: fmt.Errorf(format, args...), + EmitUsage: true, + }) +} + +func AbortIfError(preamble string, err error) { + if err != nil { + Abort(AbortDetails{ + ExitCode: 1, + Error: fmt.Errorf("%s\n%s", preamble, err.Error()), + EmitUsage: false, + }) + } +} + +func AbortIfErrors(preamble string, errors []error) { + if len(errors) > 0 { + out := "" + for _, err := range errors { + out += err.Error() + } + Abort(AbortDetails{ + ExitCode: 1, + Error: fmt.Errorf("%s\n%s", preamble, out), + EmitUsage: false, + }) + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go new file mode 100644 index 000000000..12e0e5659 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go @@ -0,0 +1,50 @@ +package command + +import ( + "fmt" + "io" + "strings" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/types" +) + +type Command struct { + Name string + Flags types.GinkgoFlagSet + Usage string + ShortDoc string + Documentation string + DocLink string + Command func(args []string, additionalArgs []string) +} + +func (c Command) Run(args []string, additionalArgs []string) { + args, err := c.Flags.Parse(args) + if err != nil { + AbortWithUsage(err.Error()) + } + + c.Command(args, additionalArgs) +} + +func (c Command) EmitUsage(writer io.Writer) { + fmt.Fprintln(writer, formatter.F("{{bold}}"+c.Usage+"{{/}}")) + fmt.Fprintln(writer, formatter.F("{{gray}}%s{{/}}", strings.Repeat("-", len(c.Usage)))) + if c.ShortDoc != "" { + fmt.Fprintln(writer, formatter.Fiw(0, formatter.COLS, c.ShortDoc)) + fmt.Fprintln(writer, "") + } + if c.Documentation != "" { + fmt.Fprintln(writer, formatter.Fiw(0, formatter.COLS, c.Documentation)) + fmt.Fprintln(writer, "") + } + if c.DocLink != "" { + fmt.Fprintln(writer, formatter.Fi(0, "{{bold}}Learn more at:{{/}} {{cyan}}{{underline}}http://onsi.github.io/ginkgo/#%s{{/}}", c.DocLink)) + fmt.Fprintln(writer, "") + } + flagUsage := c.Flags.Usage() + if flagUsage != "" { + fmt.Fprintf(writer, formatter.F(flagUsage)) + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go new file mode 100644 index 000000000..88dd8d6b0 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go @@ -0,0 +1,182 @@ +package command + +import ( + "fmt" + "io" + "os" + "strings" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/types" +) + +type Program struct { + Name string + Heading string + Commands []Command + DefaultCommand Command + DeprecatedCommands []DeprecatedCommand + + //For testing - leave as nil in production + OutWriter io.Writer + ErrWriter io.Writer + Exiter func(code int) +} + +type DeprecatedCommand struct { + Name string + Deprecation types.Deprecation +} + +func (p Program) RunAndExit(osArgs []string) { + var command Command + deprecationTracker := types.NewDeprecationTracker() + if p.Exiter == nil { + p.Exiter = os.Exit + } + if p.OutWriter == nil { + p.OutWriter = formatter.ColorableStdOut + } + if p.ErrWriter == nil { + p.ErrWriter = formatter.ColorableStdErr + } + + defer func() { + exitCode := 0 + + if r := recover(); r != nil { + details, ok := r.(AbortDetails) + if !ok { + panic(r) + } + + if details.Error != nil { + fmt.Fprintln(p.ErrWriter, formatter.F("{{red}}{{bold}}%s %s{{/}} {{red}}failed{{/}}", p.Name, command.Name)) + fmt.Fprintln(p.ErrWriter, formatter.Fi(1, details.Error.Error())) + } + if details.EmitUsage { + if details.Error != nil { + fmt.Fprintln(p.ErrWriter, "") + } + command.EmitUsage(p.ErrWriter) + } + exitCode = details.ExitCode + } + + command.Flags.ValidateDeprecations(deprecationTracker) + if deprecationTracker.DidTrackDeprecations() { + fmt.Fprintln(p.ErrWriter, deprecationTracker.DeprecationsReport()) + } + p.Exiter(exitCode) + return + }() + + args, additionalArgs := []string{}, []string{} + + foundDelimiter := false + for _, arg := range osArgs[1:] { + if !foundDelimiter { + if arg == "--" { + foundDelimiter = true + continue + } + } + + if foundDelimiter { + additionalArgs = append(additionalArgs, arg) + } else { + args = append(args, arg) + } + } + + command = p.DefaultCommand + if len(args) > 0 { + p.handleHelpRequestsAndExit(p.OutWriter, args) + if command.Name == args[0] { + args = args[1:] + } else { + for _, deprecatedCommand := range p.DeprecatedCommands { + if deprecatedCommand.Name == args[0] { + deprecationTracker.TrackDeprecation(deprecatedCommand.Deprecation) + return + } + } + for _, tryCommand := range p.Commands { + if tryCommand.Name == args[0] { + command, args = tryCommand, args[1:] + break + } + } + } + } + + command.Run(args, additionalArgs) +} + +func (p Program) handleHelpRequestsAndExit(writer io.Writer, args []string) { + if len(args) == 0 { + return + } + + matchesHelpFlag := func(args ...string) bool { + for _, arg := range args { + if arg == "--help" || arg == "-help" || arg == "-h" || arg == "--h" { + return true + } + } + return false + } + if len(args) == 1 { + if args[0] == "help" || matchesHelpFlag(args[0]) { + p.EmitUsage(writer) + Abort(AbortDetails{}) + } + } else { + var name string + if args[0] == "help" || matchesHelpFlag(args[0]) { + name = args[1] + } else if matchesHelpFlag(args[1:]...) { + name = args[0] + } else { + return + } + + if p.DefaultCommand.Name == name || p.Name == name { + p.DefaultCommand.EmitUsage(writer) + Abort(AbortDetails{}) + } + for _, command := range p.Commands { + if command.Name == name { + command.EmitUsage(writer) + Abort(AbortDetails{}) + } + } + + fmt.Fprintln(writer, formatter.F("{{red}}Unknown Command: {{bold}}%s{{/}}", name)) + fmt.Fprintln(writer, "") + p.EmitUsage(writer) + Abort(AbortDetails{ExitCode: 1}) + } + return +} + +func (p Program) EmitUsage(writer io.Writer) { + fmt.Fprintln(writer, formatter.F(p.Heading)) + fmt.Fprintln(writer, formatter.F("{{gray}}%s{{/}}", strings.Repeat("-", len(p.Heading)))) + fmt.Fprintln(writer, formatter.F("For usage information for a command, run {{bold}}%s help COMMAND{{/}}.", p.Name)) + fmt.Fprintln(writer, formatter.F("For usage information for the default command, run {{bold}}%s help %s{{/}} or {{bold}}%s help %s{{/}}.", p.Name, p.Name, p.Name, p.DefaultCommand.Name)) + fmt.Fprintln(writer, "") + fmt.Fprintln(writer, formatter.F("The following commands are available:")) + + fmt.Fprintln(writer, formatter.Fi(1, "{{bold}}%s{{/}} or %s {{bold}}%s{{/}} - {{gray}}%s{{/}}", p.Name, p.Name, p.DefaultCommand.Name, p.DefaultCommand.Usage)) + if p.DefaultCommand.ShortDoc != "" { + fmt.Fprintln(writer, formatter.Fi(2, p.DefaultCommand.ShortDoc)) + } + + for _, command := range p.Commands { + fmt.Fprintln(writer, formatter.Fi(1, "{{bold}}%s{{/}} - {{gray}}%s{{/}}", command.Name, command.Usage)) + if command.ShortDoc != "" { + fmt.Fprintln(writer, formatter.Fi(2, command.ShortDoc)) + } + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/boostrap_templates.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/boostrap_templates.go new file mode 100644 index 000000000..a367a1fc9 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/boostrap_templates.go @@ -0,0 +1,48 @@ +package generators + +var bootstrapText = `package {{.Package}} + +import ( + "testing" + + {{.GinkgoImport}} + {{.GomegaImport}} +) + +func Test{{.FormattedName}}(t *testing.T) { + {{.GomegaPackage}}RegisterFailHandler({{.GinkgoPackage}}Fail) + {{.GinkgoPackage}}RunSpecs(t, "{{.FormattedName}} Suite") +} +` + +var agoutiBootstrapText = `package {{.Package}} + +import ( + "testing" + + {{.GinkgoImport}} + {{.GomegaImport}} + "github.com/sclevine/agouti" +) + +func Test{{.FormattedName}}(t *testing.T) { + {{.GomegaPackage}}RegisterFailHandler({{.GinkgoPackage}}Fail) + {{.GinkgoPackage}}RunSpecs(t, "{{.FormattedName}} Suite") +} + +var agoutiDriver *agouti.WebDriver + +var _ = {{.GinkgoPackage}}BeforeSuite(func() { + // Choose a WebDriver: + + agoutiDriver = agouti.PhantomJS() + // agoutiDriver = agouti.Selenium() + // agoutiDriver = agouti.ChromeDriver() + + {{.GomegaPackage}}Expect(agoutiDriver.Start()).To({{.GomegaPackage}}Succeed()) +}) + +var _ = {{.GinkgoPackage}}AfterSuite(func() { + {{.GomegaPackage}}Expect(agoutiDriver.Stop()).To({{.GomegaPackage}}Succeed()) +}) +` diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/bootstrap_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/bootstrap_command.go new file mode 100644 index 000000000..b2dc59be6 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/bootstrap_command.go @@ -0,0 +1,133 @@ +package generators + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "text/template" + + sprig "github.com/go-task/slim-sprig/v3" + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" + "github.com/onsi/ginkgo/v2/types" +) + +func BuildBootstrapCommand() command.Command { + conf := GeneratorsConfig{} + flags, err := types.NewGinkgoFlagSet( + types.GinkgoFlags{ + {Name: "agouti", KeyPath: "Agouti", + Usage: "If set, bootstrap will generate a bootstrap file for writing Agouti tests"}, + {Name: "nodot", KeyPath: "NoDot", + Usage: "If set, bootstrap will generate a bootstrap test file that does not dot-import ginkgo and gomega"}, + {Name: "internal", KeyPath: "Internal", + Usage: "If set, bootstrap will generate a bootstrap test file that uses the regular package name (i.e. `package X`, not `package X_test`)"}, + {Name: "template", KeyPath: "CustomTemplate", + UsageArgument: "template-file", + Usage: "If specified, generate will use the contents of the file passed as the bootstrap template"}, + {Name: "template-data", KeyPath: "CustomTemplateData", + UsageArgument: "template-data-file", + Usage: "If specified, generate will use the contents of the file passed as data to be rendered in the bootstrap template"}, + }, + &conf, + types.GinkgoFlagSections{}, + ) + + if err != nil { + panic(err) + } + + return command.Command{ + Name: "bootstrap", + Usage: "ginkgo bootstrap", + ShortDoc: "Bootstrap a test suite for the current package", + Documentation: `Tests written in Ginkgo and Gomega require a small amount of boilerplate to hook into Go's testing infrastructure. + +{{bold}}ginkgo bootstrap{{/}} generates this boilerplate for you in a file named X_suite_test.go where X is the name of the package under test.`, + DocLink: "generators", + Flags: flags, + Command: func(_ []string, _ []string) { + generateBootstrap(conf) + }, + } +} + +type bootstrapData struct { + Package string + FormattedName string + + GinkgoImport string + GomegaImport string + GinkgoPackage string + GomegaPackage string + CustomData map[string]any +} + +func generateBootstrap(conf GeneratorsConfig) { + packageName, bootstrapFilePrefix, formattedName := getPackageAndFormattedName() + + data := bootstrapData{ + Package: determinePackageName(packageName, conf.Internal), + FormattedName: formattedName, + + GinkgoImport: `. "github.com/onsi/ginkgo/v2"`, + GomegaImport: `. "github.com/onsi/gomega"`, + GinkgoPackage: "", + GomegaPackage: "", + } + + if conf.NoDot { + data.GinkgoImport = `"github.com/onsi/ginkgo/v2"` + data.GomegaImport = `"github.com/onsi/gomega"` + data.GinkgoPackage = `ginkgo.` + data.GomegaPackage = `gomega.` + } + + targetFile := fmt.Sprintf("%s_suite_test.go", bootstrapFilePrefix) + if internal.FileExists(targetFile) { + command.AbortWith("{{bold}}%s{{/}} already exists", targetFile) + } else { + fmt.Printf("Generating ginkgo test suite bootstrap for %s in:\n\t%s\n", packageName, targetFile) + } + + f, err := os.Create(targetFile) + command.AbortIfError("Failed to create file:", err) + defer f.Close() + + var templateText string + if conf.CustomTemplate != "" { + tpl, err := os.ReadFile(conf.CustomTemplate) + command.AbortIfError("Failed to read custom bootstrap file:", err) + templateText = string(tpl) + if conf.CustomTemplateData != "" { + var tplCustomDataMap map[string]any + tplCustomData, err := os.ReadFile(conf.CustomTemplateData) + command.AbortIfError("Failed to read custom boostrap data file:", err) + if !json.Valid([]byte(tplCustomData)) { + command.AbortWith("Invalid JSON object in custom data file.") + } + //create map from the custom template data + json.Unmarshal(tplCustomData, &tplCustomDataMap) + data.CustomData = tplCustomDataMap + } + } else if conf.Agouti { + templateText = agoutiBootstrapText + } else { + templateText = bootstrapText + } + + //Setting the option to explicitly fail if template is rendered trying to access missing key + bootstrapTemplate, err := template.New("bootstrap").Funcs(sprig.TxtFuncMap()).Option("missingkey=error").Parse(templateText) + command.AbortIfError("Failed to parse bootstrap template:", err) + + buf := &bytes.Buffer{} + //Being explicit about failing sooner during template rendering + //when accessing custom data rather than during the go fmt command + err = bootstrapTemplate.Execute(buf, data) + command.AbortIfError("Failed to render bootstrap template:", err) + + buf.WriteTo(f) + + internal.GoFmt(targetFile) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go new file mode 100644 index 000000000..cf3b7cb6d --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go @@ -0,0 +1,265 @@ +package generators + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "path/filepath" + "strconv" + "strings" + "text/template" + + sprig "github.com/go-task/slim-sprig/v3" + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" + "github.com/onsi/ginkgo/v2/types" +) + +func BuildGenerateCommand() command.Command { + conf := GeneratorsConfig{} + flags, err := types.NewGinkgoFlagSet( + types.GinkgoFlags{ + {Name: "agouti", KeyPath: "Agouti", + Usage: "If set, generate will create a test file for writing Agouti tests"}, + {Name: "nodot", KeyPath: "NoDot", + Usage: "If set, generate will create a test file that does not dot-import ginkgo and gomega"}, + {Name: "internal", KeyPath: "Internal", + Usage: "If set, generate will create a test file that uses the regular package name (i.e. `package X`, not `package X_test`)"}, + {Name: "template", KeyPath: "CustomTemplate", + UsageArgument: "template-file", + Usage: "If specified, generate will use the contents of the file passed as the test file template"}, + {Name: "template-data", KeyPath: "CustomTemplateData", + UsageArgument: "template-data-file", + Usage: "If specified, generate will use the contents of the file passed as data to be rendered in the test file template"}, + {Name: "tags", KeyPath: "Tags", + UsageArgument: "build-tags", + Usage: "If specified, generate will create a test file that uses the given build tags (i.e. `--tags e2e,!unit` will add `//go:build e2e,!unit`)"}, + }, + &conf, + types.GinkgoFlagSections{}, + ) + + if err != nil { + panic(err) + } + + return command.Command{ + Name: "generate", + Usage: "ginkgo generate ", + ShortDoc: "Generate a test file named _test.go", + Documentation: `If the optional argument is omitted, a file named after the package in the current directory will be created. + +You can pass multiple to generate multiple files simultaneously. The resulting files are named _test.go. + +You can also pass a of the form "file.go" and generate will emit "file_test.go".`, + DocLink: "generators", + Flags: flags, + Command: func(args []string, _ []string) { + generateTestFiles(conf, args) + }, + } +} + +type specData struct { + BuildTags string + Package string + Subject string + PackageImportPath string + ImportPackage bool + + GinkgoImport string + GomegaImport string + GinkgoPackage string + GomegaPackage string + CustomData map[string]any +} + +func generateTestFiles(conf GeneratorsConfig, args []string) { + subjects := args + if len(subjects) == 0 { + subjects = []string{""} + } + for _, subject := range subjects { + generateTestFileForSubject(subject, conf) + } +} + +func generateTestFileForSubject(subject string, conf GeneratorsConfig) { + packageName, specFilePrefix, formattedName := getPackageAndFormattedName() + if subject != "" { + specFilePrefix = formatSubject(subject) + formattedName = prettifyName(specFilePrefix) + } + + if conf.Internal { + specFilePrefix = specFilePrefix + "_internal" + } + + data := specData{ + BuildTags: getBuildTags(conf.Tags), + Package: determinePackageName(packageName, conf.Internal), + Subject: formattedName, + PackageImportPath: getPackageImportPath(), + ImportPackage: !conf.Internal, + + GinkgoImport: `. "github.com/onsi/ginkgo/v2"`, + GomegaImport: `. "github.com/onsi/gomega"`, + GinkgoPackage: "", + GomegaPackage: "", + } + + if conf.NoDot { + data.GinkgoImport = `"github.com/onsi/ginkgo/v2"` + data.GomegaImport = `"github.com/onsi/gomega"` + data.GinkgoPackage = `ginkgo.` + data.GomegaPackage = `gomega.` + } + + targetFile := fmt.Sprintf("%s_test.go", specFilePrefix) + if internal.FileExists(targetFile) { + command.AbortWith("{{bold}}%s{{/}} already exists", targetFile) + } else { + fmt.Printf("Generating ginkgo test for %s in:\n %s\n", data.Subject, targetFile) + } + + f, err := os.Create(targetFile) + command.AbortIfError("Failed to create test file:", err) + defer f.Close() + + var templateText string + if conf.CustomTemplate != "" { + tpl, err := os.ReadFile(conf.CustomTemplate) + command.AbortIfError("Failed to read custom template file:", err) + templateText = string(tpl) + if conf.CustomTemplateData != "" { + var tplCustomDataMap map[string]any + tplCustomData, err := os.ReadFile(conf.CustomTemplateData) + command.AbortIfError("Failed to read custom template data file:", err) + if !json.Valid([]byte(tplCustomData)) { + command.AbortWith("Invalid JSON object in custom data file.") + } + //create map from the custom template data + json.Unmarshal(tplCustomData, &tplCustomDataMap) + data.CustomData = tplCustomDataMap + } + } else if conf.Agouti { + templateText = agoutiSpecText + } else { + templateText = specText + } + + //Setting the option to explicitly fail if template is rendered trying to access missing key + specTemplate, err := template.New("spec").Funcs(sprig.TxtFuncMap()).Option("missingkey=error").Parse(templateText) + command.AbortIfError("Failed to read parse test template:", err) + + //Being explicit about failing sooner during template rendering + //when accessing custom data rather than during the go fmt command + err = specTemplate.Execute(f, data) + command.AbortIfError("Failed to render bootstrap template:", err) + internal.GoFmt(targetFile) +} + +func formatSubject(name string) string { + name = strings.ReplaceAll(name, "-", "_") + name = strings.ReplaceAll(name, " ", "_") + name = strings.Split(name, ".go")[0] + name = strings.Split(name, "_test")[0] + return name +} + +// moduleName returns module name from go.mod from given module root directory +func moduleName(modRoot string) string { + modFile, err := os.Open(filepath.Join(modRoot, "go.mod")) + if err != nil { + return "" + } + defer modFile.Close() + + mod := make([]byte, 128) + _, err = modFile.Read(mod) + if err != nil { + return "" + } + + slashSlash := []byte("//") + moduleStr := []byte("module") + + for len(mod) > 0 { + line := mod + mod = nil + if i := bytes.IndexByte(line, '\n'); i >= 0 { + line, mod = line[:i], line[i+1:] + } + if i := bytes.Index(line, slashSlash); i >= 0 { + line = line[:i] + } + line = bytes.TrimSpace(line) + if !bytes.HasPrefix(line, moduleStr) { + continue + } + line = line[len(moduleStr):] + n := len(line) + line = bytes.TrimSpace(line) + if len(line) == n || len(line) == 0 { + continue + } + + if line[0] == '"' || line[0] == '`' { + p, err := strconv.Unquote(string(line)) + if err != nil { + return "" // malformed quoted string or multiline module path + } + return p + } + + return string(line) + } + + return "" // missing module path +} + +func findModuleRoot(dir string) (root string) { + dir = filepath.Clean(dir) + + // Look for enclosing go.mod. + for { + if fi, err := os.Stat(filepath.Join(dir, "go.mod")); err == nil && !fi.IsDir() { + return dir + } + d := filepath.Dir(dir) + if d == dir { + break + } + dir = d + } + return "" +} + +func getPackageImportPath() string { + workingDir, err := os.Getwd() + if err != nil { + panic(err.Error()) + } + + sep := string(filepath.Separator) + + // Try go.mod file first + modRoot := findModuleRoot(workingDir) + if modRoot != "" { + modName := moduleName(modRoot) + if modName != "" { + cd := strings.ReplaceAll(workingDir, modRoot, "") + cd = strings.ReplaceAll(cd, sep, "/") + return modName + cd + } + } + + // Fallback to GOPATH structure + paths := strings.Split(workingDir, sep+"src"+sep) + if len(paths) == 1 { + fmt.Printf("\nCouldn't identify package import path.\n\n\tginkgo generate\n\nMust be run within a package directory under $GOPATH/src/...\nYou're going to have to change UNKNOWN_PACKAGE_PATH in the generated file...\n\n") + return "UNKNOWN_PACKAGE_PATH" + } + return filepath.ToSlash(paths[len(paths)-1]) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go new file mode 100644 index 000000000..4dab07d03 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go @@ -0,0 +1,43 @@ +package generators + +var specText = `{{.BuildTags}} +package {{.Package}} + +import ( + {{.GinkgoImport}} + {{.GomegaImport}} + + {{if .ImportPackage}}"{{.PackageImportPath}}"{{end}} +) + +var _ = {{.GinkgoPackage}}Describe("{{.Subject}}", func() { + +}) +` + +var agoutiSpecText = `{{.BuildTags}} +package {{.Package}} + +import ( + {{.GinkgoImport}} + {{.GomegaImport}} + "github.com/sclevine/agouti" + . "github.com/sclevine/agouti/matchers" + + {{if .ImportPackage}}"{{.PackageImportPath}}"{{end}} +) + +var _ = {{.GinkgoPackage}}Describe("{{.Subject}}", func() { + var page *agouti.Page + + {{.GinkgoPackage}}BeforeEach(func() { + var err error + page, err = agoutiDriver.NewPage() + {{.GomegaPackage}}Expect(err).NotTo({{.GomegaPackage}}HaveOccurred()) + }) + + {{.GinkgoPackage}}AfterEach(func() { + {{.GomegaPackage}}Expect(page.Destroy()).To({{.GomegaPackage}}Succeed()) + }) +}) +` diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go new file mode 100644 index 000000000..28c7aa6f4 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go @@ -0,0 +1,76 @@ +package generators + +import ( + "fmt" + "go/build" + "os" + "path/filepath" + "strconv" + "strings" + + "github.com/onsi/ginkgo/v2/ginkgo/command" +) + +type GeneratorsConfig struct { + Agouti, NoDot, Internal bool + CustomTemplate string + CustomTemplateData string + Tags string +} + +func getPackageAndFormattedName() (string, string, string) { + path, err := os.Getwd() + command.AbortIfError("Could not get current working directory:", err) + + dirName := strings.ReplaceAll(filepath.Base(path), "-", "_") + dirName = strings.ReplaceAll(dirName, " ", "_") + + pkg, err := build.ImportDir(path, 0) + packageName := pkg.Name + if err != nil { + packageName = ensureLegalPackageName(dirName) + } + + formattedName := prettifyName(filepath.Base(path)) + return packageName, dirName, formattedName +} + +func ensureLegalPackageName(name string) string { + if name == "_" { + return "underscore" + } + if len(name) == 0 { + return "empty" + } + n, isDigitErr := strconv.Atoi(string(name[0])) + if isDigitErr == nil { + return []string{"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}[n] + name[1:] + } + return name +} + +func prettifyName(name string) string { + name = strings.ReplaceAll(name, "-", " ") + name = strings.ReplaceAll(name, "_", " ") + name = strings.Title(name) + name = strings.ReplaceAll(name, " ", "") + return name +} + +func determinePackageName(name string, internal bool) string { + if internal { + return name + } + + return name + "_test" +} + +// getBuildTags returns the resultant string to be added. +// If the input string is not empty, then returns a `//go:build {}` string, +// otherwise returns an empty string. +func getBuildTags(tags string) string { + if tags != "" { + return fmt.Sprintf("//go:build %s\n", tags) + } + return "" +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go new file mode 100644 index 000000000..48827cc5e --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go @@ -0,0 +1,173 @@ +package internal + +import ( + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" + "sync" + + "github.com/onsi/ginkgo/v2/types" +) + +func CompileSuite(suite TestSuite, goFlagsConfig types.GoFlagsConfig) TestSuite { + if suite.PathToCompiledTest != "" { + return suite + } + + suite.CompilationError = nil + + path, err := filepath.Abs(filepath.Join(suite.Path, suite.PackageName+".test")) + if err != nil { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to compute compilation target path:\n%s", err.Error()) + return suite + } + + if len(goFlagsConfig.O) > 0 { + userDefinedPath, err := filepath.Abs(goFlagsConfig.O) + if err != nil { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to compute compilation target path %s:\n%s", goFlagsConfig.O, err.Error()) + return suite + } + path = userDefinedPath + } + + goFlagsConfig.O = path + + ginkgoInvocationPath, _ := os.Getwd() + ginkgoInvocationPath, _ = filepath.Abs(ginkgoInvocationPath) + packagePath := suite.AbsPath() + pathToInvocationPath, err := filepath.Rel(packagePath, ginkgoInvocationPath) + if err != nil { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to get relative path from package to the current working directory:\n%s", err.Error()) + return suite + } + args, err := types.GenerateGoTestCompileArgs(goFlagsConfig, "./", pathToInvocationPath) + if err != nil { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to generate go test compile flags:\n%s", err.Error()) + return suite + } + + cmd := exec.Command("go", args...) + cmd.Dir = suite.Path + output, err := cmd.CombinedOutput() + if err != nil { + if len(output) > 0 { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to compile %s:\n\n%s", suite.PackageName, output) + } else { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to compile %s\n%s", suite.PackageName, err.Error()) + } + return suite + } + + if strings.Contains(string(output), "[no test files]") { + suite.State = TestSuiteStateSkippedDueToEmptyCompilation + return suite + } + + if len(output) > 0 { + fmt.Println(string(output)) + } + + if !FileExists(path) { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to compile %s:\nOutput file %s could not be found", suite.PackageName, path) + return suite + } + + suite.State = TestSuiteStateCompiled + suite.PathToCompiledTest = path + return suite +} + +func Cleanup(goFlagsConfig types.GoFlagsConfig, suites ...TestSuite) { + if goFlagsConfig.BinaryMustBePreserved() { + return + } + for _, suite := range suites { + if !suite.Precompiled { + os.Remove(suite.PathToCompiledTest) + } + } +} + +type parallelSuiteBundle struct { + suite TestSuite + compiled chan TestSuite +} + +type OrderedParallelCompiler struct { + mutex *sync.Mutex + stopped bool + numCompilers int + + idx int + numSuites int + completionChannels []chan TestSuite +} + +func NewOrderedParallelCompiler(numCompilers int) *OrderedParallelCompiler { + return &OrderedParallelCompiler{ + mutex: &sync.Mutex{}, + numCompilers: numCompilers, + } +} + +func (opc *OrderedParallelCompiler) StartCompiling(suites TestSuites, goFlagsConfig types.GoFlagsConfig) { + opc.stopped = false + opc.idx = 0 + opc.numSuites = len(suites) + opc.completionChannels = make([]chan TestSuite, opc.numSuites) + + toCompile := make(chan parallelSuiteBundle, opc.numCompilers) + for compiler := 0; compiler < opc.numCompilers; compiler++ { + go func() { + for bundle := range toCompile { + c, suite := bundle.compiled, bundle.suite + opc.mutex.Lock() + stopped := opc.stopped + opc.mutex.Unlock() + if !stopped { + suite = CompileSuite(suite, goFlagsConfig) + } + c <- suite + } + }() + } + + for idx, suite := range suites { + opc.completionChannels[idx] = make(chan TestSuite, 1) + toCompile <- parallelSuiteBundle{suite, opc.completionChannels[idx]} + if idx == 0 { //compile first suite serially + suite = <-opc.completionChannels[0] + opc.completionChannels[0] <- suite + } + } + + close(toCompile) +} + +func (opc *OrderedParallelCompiler) Next() (int, TestSuite) { + if opc.idx >= opc.numSuites { + return opc.numSuites, TestSuite{} + } + + idx := opc.idx + suite := <-opc.completionChannels[idx] + opc.idx = opc.idx + 1 + + return idx, suite +} + +func (opc *OrderedParallelCompiler) StopAndDrain() { + opc.mutex.Lock() + opc.stopped = true + opc.mutex.Unlock() +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go new file mode 100644 index 000000000..3c5079ff4 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go @@ -0,0 +1,129 @@ +// Copyright (c) 2015, Wade Simmons +// 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. + +// 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 OWNER 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. + +// Package gocovmerge takes the results from multiple `go test -coverprofile` +// runs and merges them into one profile + +// this file was originally taken from the gocovmerge project +// see also: https://go.shabbyrobe.org/gocovmerge +package internal + +import ( + "fmt" + "io" + "sort" + + "golang.org/x/tools/cover" +) + +func AddCoverProfile(profiles []*cover.Profile, p *cover.Profile) []*cover.Profile { + i := sort.Search(len(profiles), func(i int) bool { return profiles[i].FileName >= p.FileName }) + if i < len(profiles) && profiles[i].FileName == p.FileName { + MergeCoverProfiles(profiles[i], p) + } else { + profiles = append(profiles, nil) + copy(profiles[i+1:], profiles[i:]) + profiles[i] = p + } + return profiles +} + +func DumpCoverProfiles(profiles []*cover.Profile, out io.Writer) error { + if len(profiles) == 0 { + return nil + } + if _, err := fmt.Fprintf(out, "mode: %s\n", profiles[0].Mode); err != nil { + return err + } + for _, p := range profiles { + for _, b := range p.Blocks { + if _, err := fmt.Fprintf(out, "%s:%d.%d,%d.%d %d %d\n", p.FileName, b.StartLine, b.StartCol, b.EndLine, b.EndCol, b.NumStmt, b.Count); err != nil { + return err + } + } + } + return nil +} + +func MergeCoverProfiles(into *cover.Profile, merge *cover.Profile) error { + if into.Mode != merge.Mode { + return fmt.Errorf("cannot merge profiles with different modes") + } + // Since the blocks are sorted, we can keep track of where the last block + // was inserted and only look at the blocks after that as targets for merge + startIndex := 0 + for _, b := range merge.Blocks { + var err error + startIndex, err = mergeProfileBlock(into, b, startIndex) + if err != nil { + return err + } + } + return nil +} + +func mergeProfileBlock(p *cover.Profile, pb cover.ProfileBlock, startIndex int) (int, error) { + sortFunc := func(i int) bool { + pi := p.Blocks[i+startIndex] + return pi.StartLine >= pb.StartLine && (pi.StartLine != pb.StartLine || pi.StartCol >= pb.StartCol) + } + + i := 0 + if sortFunc(i) != true { + i = sort.Search(len(p.Blocks)-startIndex, sortFunc) + } + + i += startIndex + if i < len(p.Blocks) && p.Blocks[i].StartLine == pb.StartLine && p.Blocks[i].StartCol == pb.StartCol { + if p.Blocks[i].EndLine != pb.EndLine || p.Blocks[i].EndCol != pb.EndCol { + return i, fmt.Errorf("gocovmerge: overlapping merge %v %v %v", p.FileName, p.Blocks[i], pb) + } + switch p.Mode { + case "set": + p.Blocks[i].Count |= pb.Count + case "count", "atomic": + p.Blocks[i].Count += pb.Count + default: + return i, fmt.Errorf("gocovmerge: unsupported covermode '%s'", p.Mode) + } + + } else { + if i > 0 { + pa := p.Blocks[i-1] + if pa.EndLine >= pb.EndLine && (pa.EndLine != pb.EndLine || pa.EndCol > pb.EndCol) { + return i, fmt.Errorf("gocovmerge: overlap before %v %v %v", p.FileName, pa, pb) + } + } + if i < len(p.Blocks)-1 { + pa := p.Blocks[i+1] + if pa.StartLine <= pb.StartLine && (pa.StartLine != pb.StartLine || pa.StartCol < pb.StartCol) { + return i, fmt.Errorf("gocovmerge: overlap after %v %v %v", p.FileName, pa, pb) + } + } + p.Blocks = append(p.Blocks, cover.ProfileBlock{}) + copy(p.Blocks[i+1:], p.Blocks[i:]) + p.Blocks[i] = pb + } + + return i + 1, nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go new file mode 100644 index 000000000..8e16d2bb0 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go @@ -0,0 +1,227 @@ +package internal + +import ( + "fmt" + "os" + "os/exec" + "path/filepath" + "regexp" + "strconv" + + "github.com/google/pprof/profile" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" + "golang.org/x/tools/cover" +) + +func AbsPathForGeneratedAsset(assetName string, suite TestSuite, cliConfig types.CLIConfig, process int) string { + suffix := "" + if process != 0 { + suffix = fmt.Sprintf(".%d", process) + } + if cliConfig.OutputDir == "" { + return filepath.Join(suite.AbsPath(), assetName+suffix) + } + outputDir, _ := filepath.Abs(cliConfig.OutputDir) + return filepath.Join(outputDir, suite.NamespacedName()+"_"+assetName+suffix) +} + +func FinalizeProfilesAndReportsForSuites(suites TestSuites, cliConfig types.CLIConfig, suiteConfig types.SuiteConfig, reporterConfig types.ReporterConfig, goFlagsConfig types.GoFlagsConfig) ([]string, error) { + messages := []string{} + suitesWithProfiles := suites.WithState(TestSuiteStatePassed, TestSuiteStateFailed) //anything else won't have actually run and generated a profile + + // merge cover profiles if need be + if goFlagsConfig.Cover && !cliConfig.KeepSeparateCoverprofiles { + coverProfiles := []string{} + for _, suite := range suitesWithProfiles { + if !suite.HasProgrammaticFocus { + coverProfiles = append(coverProfiles, AbsPathForGeneratedAsset(goFlagsConfig.CoverProfile, suite, cliConfig, 0)) + } + } + + if len(coverProfiles) > 0 { + dst := goFlagsConfig.CoverProfile + if cliConfig.OutputDir != "" { + dst = filepath.Join(cliConfig.OutputDir, goFlagsConfig.CoverProfile) + } + err := MergeAndCleanupCoverProfiles(coverProfiles, dst) + if err != nil { + return messages, err + } + coverage, err := GetCoverageFromCoverProfile(dst) + if err != nil { + return messages, err + } + if coverage == 0 { + messages = append(messages, "composite coverage: [no statements]") + } else if suitesWithProfiles.AnyHaveProgrammaticFocus() { + messages = append(messages, fmt.Sprintf("composite coverage: %.1f%% of statements however some suites did not contribute because they included programatically focused specs", coverage)) + } else { + messages = append(messages, fmt.Sprintf("composite coverage: %.1f%% of statements", coverage)) + } + } else { + messages = append(messages, "no composite coverage computed: all suites included programatically focused specs") + } + } + + // copy binaries if need be + for _, suite := range suitesWithProfiles { + if goFlagsConfig.BinaryMustBePreserved() && cliConfig.OutputDir != "" { + src := suite.PathToCompiledTest + dst := filepath.Join(cliConfig.OutputDir, suite.NamespacedName()+".test") + if suite.Precompiled { + if err := CopyFile(src, dst); err != nil { + return messages, err + } + } else { + if err := os.Rename(src, dst); err != nil { + return messages, err + } + } + } + } + + type reportFormat struct { + ReportName string + GenerateFunc func(types.Report, string) error + MergeFunc func([]string, string) ([]string, error) + } + reportFormats := []reportFormat{} + if reporterConfig.JSONReport != "" { + reportFormats = append(reportFormats, reportFormat{ReportName: reporterConfig.JSONReport, GenerateFunc: reporters.GenerateJSONReport, MergeFunc: reporters.MergeAndCleanupJSONReports}) + } + if reporterConfig.JUnitReport != "" { + reportFormats = append(reportFormats, reportFormat{ReportName: reporterConfig.JUnitReport, GenerateFunc: reporters.GenerateJUnitReport, MergeFunc: reporters.MergeAndCleanupJUnitReports}) + } + if reporterConfig.TeamcityReport != "" { + reportFormats = append(reportFormats, reportFormat{ReportName: reporterConfig.TeamcityReport, GenerateFunc: reporters.GenerateTeamcityReport, MergeFunc: reporters.MergeAndCleanupTeamcityReports}) + } + + // Generate reports for suites that failed to run + reportableSuites := suites.ThatAreGinkgoSuites() + for _, suite := range reportableSuites.WithState(TestSuiteStateFailedToCompile, TestSuiteStateFailedDueToTimeout, TestSuiteStateSkippedDueToPriorFailures, TestSuiteStateSkippedDueToEmptyCompilation) { + report := types.Report{ + SuitePath: suite.AbsPath(), + SuiteConfig: suiteConfig, + SuiteSucceeded: false, + } + switch suite.State { + case TestSuiteStateFailedToCompile: + report.SpecialSuiteFailureReasons = append(report.SpecialSuiteFailureReasons, suite.CompilationError.Error()) + case TestSuiteStateFailedDueToTimeout: + report.SpecialSuiteFailureReasons = append(report.SpecialSuiteFailureReasons, TIMEOUT_ELAPSED_FAILURE_REASON) + case TestSuiteStateSkippedDueToPriorFailures: + report.SpecialSuiteFailureReasons = append(report.SpecialSuiteFailureReasons, PRIOR_FAILURES_FAILURE_REASON) + case TestSuiteStateSkippedDueToEmptyCompilation: + report.SpecialSuiteFailureReasons = append(report.SpecialSuiteFailureReasons, EMPTY_SKIP_FAILURE_REASON) + report.SuiteSucceeded = true + } + + for _, format := range reportFormats { + format.GenerateFunc(report, AbsPathForGeneratedAsset(format.ReportName, suite, cliConfig, 0)) + } + } + + // Merge reports unless we've been asked to keep them separate + if !cliConfig.KeepSeparateReports { + for _, format := range reportFormats { + reports := []string{} + for _, suite := range reportableSuites { + reports = append(reports, AbsPathForGeneratedAsset(format.ReportName, suite, cliConfig, 0)) + } + dst := format.ReportName + if cliConfig.OutputDir != "" { + dst = filepath.Join(cliConfig.OutputDir, format.ReportName) + } + mergeMessages, err := format.MergeFunc(reports, dst) + messages = append(messages, mergeMessages...) + if err != nil { + return messages, err + } + } + } + + return messages, nil +} + +// loads each profile, merges them, deletes them, stores them in destination +func MergeAndCleanupCoverProfiles(profiles []string, destination string) error { + var merged []*cover.Profile + for _, file := range profiles { + parsedProfiles, err := cover.ParseProfiles(file) + if err != nil { + return err + } + os.Remove(file) + for _, p := range parsedProfiles { + merged = AddCoverProfile(merged, p) + } + } + dst, err := os.OpenFile(destination, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + return err + } + defer dst.Close() + err = DumpCoverProfiles(merged, dst) + if err != nil { + return err + } + return nil +} + +func GetCoverageFromCoverProfile(profile string) (float64, error) { + cmd := exec.Command("go", "tool", "cover", "-func", profile) + output, err := cmd.CombinedOutput() + if err != nil { + return 0, fmt.Errorf("Could not process Coverprofile %s: %s - %s", profile, err.Error(), string(output)) + } + re := regexp.MustCompile(`total:\s*\(statements\)\s*(\d*\.\d*)\%`) + matches := re.FindStringSubmatch(string(output)) + if matches == nil { + return 0, fmt.Errorf("Could not parse Coverprofile to compute coverage percentage") + } + coverageString := matches[1] + coverage, err := strconv.ParseFloat(coverageString, 64) + if err != nil { + return 0, fmt.Errorf("Could not parse Coverprofile to compute coverage percentage: %s", err.Error()) + } + + return coverage, nil +} + +func MergeProfiles(profilePaths []string, destination string) error { + profiles := []*profile.Profile{} + for _, profilePath := range profilePaths { + proFile, err := os.Open(profilePath) + if err != nil { + return fmt.Errorf("Could not open profile: %s\n%s", profilePath, err.Error()) + } + prof, err := profile.Parse(proFile) + _ = proFile.Close() + if err != nil { + return fmt.Errorf("Could not parse profile: %s\n%s", profilePath, err.Error()) + } + profiles = append(profiles, prof) + os.Remove(profilePath) + } + + mergedProfile, err := profile.Merge(profiles) + if err != nil { + return fmt.Errorf("Could not merge profiles:\n%s", err.Error()) + } + + outFile, err := os.Create(destination) + if err != nil { + return fmt.Errorf("Could not create merged profile %s:\n%s", destination, err.Error()) + } + err = mergedProfile.Write(outFile) + if err != nil { + return fmt.Errorf("Could not write merged profile %s:\n%s", destination, err.Error()) + } + err = outFile.Close() + if err != nil { + return fmt.Errorf("Could not close merged profile %s:\n%s", destination, err.Error()) + } + + return nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go new file mode 100644 index 000000000..41052ea19 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go @@ -0,0 +1,355 @@ +package internal + +import ( + "bytes" + "fmt" + "io" + "os" + "os/exec" + "path/filepath" + "regexp" + "strings" + "syscall" + "time" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/internal/parallel_support" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +func RunCompiledSuite(suite TestSuite, ginkgoConfig types.SuiteConfig, reporterConfig types.ReporterConfig, cliConfig types.CLIConfig, goFlagsConfig types.GoFlagsConfig, additionalArgs []string) TestSuite { + suite.State = TestSuiteStateFailed + suite.HasProgrammaticFocus = false + + if suite.PathToCompiledTest == "" { + return suite + } + + if suite.IsGinkgo && cliConfig.ComputedProcs() > 1 { + suite = runParallel(suite, ginkgoConfig, reporterConfig, cliConfig, goFlagsConfig, additionalArgs) + } else if suite.IsGinkgo { + suite = runSerial(suite, ginkgoConfig, reporterConfig, cliConfig, goFlagsConfig, additionalArgs) + } else { + suite = runGoTest(suite, cliConfig, goFlagsConfig) + } + runAfterRunHook(cliConfig.AfterRunHook, reporterConfig.NoColor, suite) + return suite +} + +func buildAndStartCommand(suite TestSuite, args []string, pipeToStdout bool) (*exec.Cmd, *bytes.Buffer) { + buf := &bytes.Buffer{} + cmd := exec.Command(suite.PathToCompiledTest, args...) + cmd.Dir = suite.Path + if pipeToStdout { + cmd.Stderr = io.MultiWriter(os.Stdout, buf) + cmd.Stdout = os.Stdout + } else { + cmd.Stderr = buf + cmd.Stdout = buf + } + err := cmd.Start() + command.AbortIfError("Failed to start test suite", err) + + return cmd, buf +} + +func checkForNoTestsWarning(buf *bytes.Buffer) bool { + if strings.Contains(buf.String(), "warning: no tests to run") { + fmt.Fprintf(os.Stderr, `Found no test suites, did you forget to run "ginkgo bootstrap"?`) + return true + } + return false +} + +func runGoTest(suite TestSuite, cliConfig types.CLIConfig, goFlagsConfig types.GoFlagsConfig) TestSuite { + // As we run the go test from the suite directory, make sure the cover profile is absolute + // and placed into the expected output directory when one is configured. + if goFlagsConfig.Cover && !filepath.IsAbs(goFlagsConfig.CoverProfile) { + goFlagsConfig.CoverProfile = AbsPathForGeneratedAsset(goFlagsConfig.CoverProfile, suite, cliConfig, 0) + } + + args, err := types.GenerateGoTestRunArgs(goFlagsConfig) + command.AbortIfError("Failed to generate test run arguments", err) + cmd, buf := buildAndStartCommand(suite, args, true) + + cmd.Wait() + + exitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() + passed := (exitStatus == 0) || (exitStatus == types.GINKGO_FOCUS_EXIT_CODE) + passed = !(checkForNoTestsWarning(buf) && cliConfig.RequireSuite) && passed + if passed { + suite.State = TestSuiteStatePassed + } else { + suite.State = TestSuiteStateFailed + } + + return suite +} + +func runSerial(suite TestSuite, ginkgoConfig types.SuiteConfig, reporterConfig types.ReporterConfig, cliConfig types.CLIConfig, goFlagsConfig types.GoFlagsConfig, additionalArgs []string) TestSuite { + if goFlagsConfig.Cover { + goFlagsConfig.CoverProfile = AbsPathForGeneratedAsset(goFlagsConfig.CoverProfile, suite, cliConfig, 0) + } + if goFlagsConfig.BlockProfile != "" { + goFlagsConfig.BlockProfile = AbsPathForGeneratedAsset(goFlagsConfig.BlockProfile, suite, cliConfig, 0) + } + if goFlagsConfig.CPUProfile != "" { + goFlagsConfig.CPUProfile = AbsPathForGeneratedAsset(goFlagsConfig.CPUProfile, suite, cliConfig, 0) + } + if goFlagsConfig.MemProfile != "" { + goFlagsConfig.MemProfile = AbsPathForGeneratedAsset(goFlagsConfig.MemProfile, suite, cliConfig, 0) + } + if goFlagsConfig.MutexProfile != "" { + goFlagsConfig.MutexProfile = AbsPathForGeneratedAsset(goFlagsConfig.MutexProfile, suite, cliConfig, 0) + } + if reporterConfig.JSONReport != "" { + reporterConfig.JSONReport = AbsPathForGeneratedAsset(reporterConfig.JSONReport, suite, cliConfig, 0) + } + if reporterConfig.JUnitReport != "" { + reporterConfig.JUnitReport = AbsPathForGeneratedAsset(reporterConfig.JUnitReport, suite, cliConfig, 0) + } + if reporterConfig.TeamcityReport != "" { + reporterConfig.TeamcityReport = AbsPathForGeneratedAsset(reporterConfig.TeamcityReport, suite, cliConfig, 0) + } + + args, err := types.GenerateGinkgoTestRunArgs(ginkgoConfig, reporterConfig, goFlagsConfig) + command.AbortIfError("Failed to generate test run arguments", err) + args = append([]string{"--test.timeout=0"}, args...) + args = append(args, additionalArgs...) + + cmd, buf := buildAndStartCommand(suite, args, true) + + cmd.Wait() + + exitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() + suite.HasProgrammaticFocus = (exitStatus == types.GINKGO_FOCUS_EXIT_CODE) + passed := (exitStatus == 0) || (exitStatus == types.GINKGO_FOCUS_EXIT_CODE) + passed = !(checkForNoTestsWarning(buf) && cliConfig.RequireSuite) && passed + if passed { + suite.State = TestSuiteStatePassed + } else { + suite.State = TestSuiteStateFailed + } + + if suite.HasProgrammaticFocus { + if goFlagsConfig.Cover { + fmt.Fprintln(os.Stdout, "coverage: no coverfile was generated because specs are programmatically focused") + } + if goFlagsConfig.BlockProfile != "" { + fmt.Fprintln(os.Stdout, "no block profile was generated because specs are programmatically focused") + } + if goFlagsConfig.CPUProfile != "" { + fmt.Fprintln(os.Stdout, "no cpu profile was generated because specs are programmatically focused") + } + if goFlagsConfig.MemProfile != "" { + fmt.Fprintln(os.Stdout, "no mem profile was generated because specs are programmatically focused") + } + if goFlagsConfig.MutexProfile != "" { + fmt.Fprintln(os.Stdout, "no mutex profile was generated because specs are programmatically focused") + } + } + + return suite +} + +func runParallel(suite TestSuite, ginkgoConfig types.SuiteConfig, reporterConfig types.ReporterConfig, cliConfig types.CLIConfig, goFlagsConfig types.GoFlagsConfig, additionalArgs []string) TestSuite { + type procResult struct { + passed bool + hasProgrammaticFocus bool + } + + numProcs := cliConfig.ComputedProcs() + procOutput := make([]*bytes.Buffer, numProcs) + coverProfiles := []string{} + + blockProfiles := []string{} + cpuProfiles := []string{} + memProfiles := []string{} + mutexProfiles := []string{} + + procResults := make(chan procResult) + + server, err := parallel_support.NewServer(numProcs, reporters.NewDefaultReporter(reporterConfig, formatter.ColorableStdOut)) + command.AbortIfError("Failed to start parallel spec server", err) + server.Start() + defer server.Close() + + if reporterConfig.JSONReport != "" { + reporterConfig.JSONReport = AbsPathForGeneratedAsset(reporterConfig.JSONReport, suite, cliConfig, 0) + } + if reporterConfig.JUnitReport != "" { + reporterConfig.JUnitReport = AbsPathForGeneratedAsset(reporterConfig.JUnitReport, suite, cliConfig, 0) + } + if reporterConfig.TeamcityReport != "" { + reporterConfig.TeamcityReport = AbsPathForGeneratedAsset(reporterConfig.TeamcityReport, suite, cliConfig, 0) + } + + for proc := 1; proc <= numProcs; proc++ { + procGinkgoConfig := ginkgoConfig + procGinkgoConfig.ParallelProcess, procGinkgoConfig.ParallelTotal, procGinkgoConfig.ParallelHost = proc, numProcs, server.Address() + + procGoFlagsConfig := goFlagsConfig + if goFlagsConfig.Cover { + procGoFlagsConfig.CoverProfile = AbsPathForGeneratedAsset(goFlagsConfig.CoverProfile, suite, cliConfig, proc) + coverProfiles = append(coverProfiles, procGoFlagsConfig.CoverProfile) + } + if goFlagsConfig.BlockProfile != "" { + procGoFlagsConfig.BlockProfile = AbsPathForGeneratedAsset(goFlagsConfig.BlockProfile, suite, cliConfig, proc) + blockProfiles = append(blockProfiles, procGoFlagsConfig.BlockProfile) + } + if goFlagsConfig.CPUProfile != "" { + procGoFlagsConfig.CPUProfile = AbsPathForGeneratedAsset(goFlagsConfig.CPUProfile, suite, cliConfig, proc) + cpuProfiles = append(cpuProfiles, procGoFlagsConfig.CPUProfile) + } + if goFlagsConfig.MemProfile != "" { + procGoFlagsConfig.MemProfile = AbsPathForGeneratedAsset(goFlagsConfig.MemProfile, suite, cliConfig, proc) + memProfiles = append(memProfiles, procGoFlagsConfig.MemProfile) + } + if goFlagsConfig.MutexProfile != "" { + procGoFlagsConfig.MutexProfile = AbsPathForGeneratedAsset(goFlagsConfig.MutexProfile, suite, cliConfig, proc) + mutexProfiles = append(mutexProfiles, procGoFlagsConfig.MutexProfile) + } + + args, err := types.GenerateGinkgoTestRunArgs(procGinkgoConfig, reporterConfig, procGoFlagsConfig) + command.AbortIfError("Failed to generate test run arguments", err) + args = append([]string{"--test.timeout=0"}, args...) + args = append(args, additionalArgs...) + + cmd, buf := buildAndStartCommand(suite, args, false) + procOutput[proc-1] = buf + server.RegisterAlive(proc, func() bool { return cmd.ProcessState == nil || !cmd.ProcessState.Exited() }) + + go func() { + cmd.Wait() + exitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() + procResults <- procResult{ + passed: (exitStatus == 0) || (exitStatus == types.GINKGO_FOCUS_EXIT_CODE), + hasProgrammaticFocus: exitStatus == types.GINKGO_FOCUS_EXIT_CODE, + } + }() + } + + passed := true + for proc := 1; proc <= cliConfig.ComputedProcs(); proc++ { + result := <-procResults + passed = passed && result.passed + suite.HasProgrammaticFocus = suite.HasProgrammaticFocus || result.hasProgrammaticFocus + } + if passed { + suite.State = TestSuiteStatePassed + } else { + suite.State = TestSuiteStateFailed + } + + select { + case <-server.GetSuiteDone(): + fmt.Println("") + case <-time.After(time.Second): + //one of the nodes never finished reporting to the server. Something must have gone wrong. + fmt.Fprint(formatter.ColorableStdErr, formatter.F("\n{{bold}}{{red}}Ginkgo timed out waiting for all parallel procs to report back{{/}}\n")) + fmt.Fprint(formatter.ColorableStdErr, formatter.F("{{gray}}Test suite:{{/}} %s (%s)\n\n", suite.PackageName, suite.Path)) + fmt.Fprint(formatter.ColorableStdErr, formatter.Fiw(0, formatter.COLS, "This occurs if a parallel process exits before it reports its results to the Ginkgo CLI. The CLI will now print out all the stdout/stderr output it's collected from the running processes. However you may not see anything useful in these logs because the individual test processes usually intercept output to stdout/stderr in order to capture it in the spec reports.\n\nYou may want to try rerunning your test suite with {{light-gray}}--output-interceptor-mode=none{{/}} to see additional output here and debug your suite.\n")) + fmt.Fprintln(formatter.ColorableStdErr, " ") + for proc := 1; proc <= cliConfig.ComputedProcs(); proc++ { + fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{bold}}Output from proc %d:{{/}}\n", proc)) + fmt.Fprintln(os.Stderr, formatter.Fi(1, "%s", procOutput[proc-1].String())) + } + fmt.Fprintf(os.Stderr, "** End **") + } + + for proc := 1; proc <= cliConfig.ComputedProcs(); proc++ { + output := procOutput[proc-1].String() + if proc == 1 && checkForNoTestsWarning(procOutput[0]) && cliConfig.RequireSuite { + suite.State = TestSuiteStateFailed + } + if strings.Contains(output, "deprecated Ginkgo functionality") { + fmt.Fprintln(os.Stderr, output) + } + } + + if len(coverProfiles) > 0 { + if suite.HasProgrammaticFocus { + fmt.Fprintln(os.Stdout, "coverage: no coverfile was generated because specs are programmatically focused") + } else { + coverProfile := AbsPathForGeneratedAsset(goFlagsConfig.CoverProfile, suite, cliConfig, 0) + err := MergeAndCleanupCoverProfiles(coverProfiles, coverProfile) + command.AbortIfError("Failed to combine cover profiles", err) + + coverage, err := GetCoverageFromCoverProfile(coverProfile) + command.AbortIfError("Failed to compute coverage", err) + if coverage == 0 { + fmt.Fprintln(os.Stdout, "coverage: [no statements]") + } else { + fmt.Fprintf(os.Stdout, "coverage: %.1f%% of statements\n", coverage) + } + } + } + if len(blockProfiles) > 0 { + if suite.HasProgrammaticFocus { + fmt.Fprintln(os.Stdout, "no block profile was generated because specs are programmatically focused") + } else { + blockProfile := AbsPathForGeneratedAsset(goFlagsConfig.BlockProfile, suite, cliConfig, 0) + err := MergeProfiles(blockProfiles, blockProfile) + command.AbortIfError("Failed to combine blockprofiles", err) + } + } + if len(cpuProfiles) > 0 { + if suite.HasProgrammaticFocus { + fmt.Fprintln(os.Stdout, "no cpu profile was generated because specs are programmatically focused") + } else { + cpuProfile := AbsPathForGeneratedAsset(goFlagsConfig.CPUProfile, suite, cliConfig, 0) + err := MergeProfiles(cpuProfiles, cpuProfile) + command.AbortIfError("Failed to combine cpuprofiles", err) + } + } + if len(memProfiles) > 0 { + if suite.HasProgrammaticFocus { + fmt.Fprintln(os.Stdout, "no mem profile was generated because specs are programmatically focused") + } else { + memProfile := AbsPathForGeneratedAsset(goFlagsConfig.MemProfile, suite, cliConfig, 0) + err := MergeProfiles(memProfiles, memProfile) + command.AbortIfError("Failed to combine memprofiles", err) + } + } + if len(mutexProfiles) > 0 { + if suite.HasProgrammaticFocus { + fmt.Fprintln(os.Stdout, "no mutex profile was generated because specs are programmatically focused") + } else { + mutexProfile := AbsPathForGeneratedAsset(goFlagsConfig.MutexProfile, suite, cliConfig, 0) + err := MergeProfiles(mutexProfiles, mutexProfile) + command.AbortIfError("Failed to combine mutexprofiles", err) + } + } + + return suite +} + +func runAfterRunHook(command string, noColor bool, suite TestSuite) { + if command == "" { + return + } + f := formatter.NewWithNoColorBool(noColor) + + // Allow for string replacement to pass input to the command + passed := "[FAIL]" + if suite.State.Is(TestSuiteStatePassed) { + passed = "[PASS]" + } + command = strings.ReplaceAll(command, "(ginkgo-suite-passed)", passed) + command = strings.ReplaceAll(command, "(ginkgo-suite-name)", suite.PackageName) + + // Must break command into parts + splitArgs := regexp.MustCompile(`'.+'|".+"|\S+`) + parts := splitArgs.FindAllString(command, -1) + + output, err := exec.Command(parts[0], parts[1:]...).CombinedOutput() + if err != nil { + fmt.Fprintln(formatter.ColorableStdOut, f.Fi(0, "{{red}}{{bold}}After-run-hook failed:{{/}}")) + fmt.Fprintln(formatter.ColorableStdOut, f.Fi(1, "{{red}}%s{{/}}", output)) + } else { + fmt.Fprintln(formatter.ColorableStdOut, f.Fi(0, "{{green}}{{bold}}After-run-hook succeeded:{{/}}")) + fmt.Fprintln(formatter.ColorableStdOut, f.Fi(1, "{{green}}%s{{/}}", output)) + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go new file mode 100644 index 000000000..df99875be --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go @@ -0,0 +1,284 @@ +package internal + +import ( + "errors" + "math/rand" + "os" + "path" + "path/filepath" + "regexp" + "runtime" + "strings" + + "github.com/onsi/ginkgo/v2/types" +) + +const TIMEOUT_ELAPSED_FAILURE_REASON = "Suite did not run because the timeout elapsed" +const PRIOR_FAILURES_FAILURE_REASON = "Suite did not run because prior suites failed and --keep-going is not set" +const EMPTY_SKIP_FAILURE_REASON = "Suite did not run go test reported that no test files were found" + +type TestSuiteState uint + +const ( + TestSuiteStateInvalid TestSuiteState = iota + + TestSuiteStateUncompiled + TestSuiteStateCompiled + + TestSuiteStatePassed + + TestSuiteStateSkippedDueToEmptyCompilation + TestSuiteStateSkippedByFilter + TestSuiteStateSkippedDueToPriorFailures + + TestSuiteStateFailed + TestSuiteStateFailedDueToTimeout + TestSuiteStateFailedToCompile +) + +var TestSuiteStateFailureStates = []TestSuiteState{TestSuiteStateFailed, TestSuiteStateFailedDueToTimeout, TestSuiteStateFailedToCompile} + +func (state TestSuiteState) Is(states ...TestSuiteState) bool { + for _, suiteState := range states { + if suiteState == state { + return true + } + } + + return false +} + +type TestSuite struct { + Path string + PackageName string + IsGinkgo bool + + Precompiled bool + PathToCompiledTest string + CompilationError error + + HasProgrammaticFocus bool + State TestSuiteState +} + +func (ts TestSuite) AbsPath() string { + path, _ := filepath.Abs(ts.Path) + return path +} + +func (ts TestSuite) NamespacedName() string { + name := relPath(ts.Path) + name = strings.TrimLeft(name, "."+string(filepath.Separator)) + name = strings.ReplaceAll(name, string(filepath.Separator), "_") + name = strings.ReplaceAll(name, " ", "_") + if name == "" { + return ts.PackageName + } + return name +} + +type TestSuites []TestSuite + +func (ts TestSuites) AnyHaveProgrammaticFocus() bool { + for _, suite := range ts { + if suite.HasProgrammaticFocus { + return true + } + } + + return false +} + +func (ts TestSuites) ThatAreGinkgoSuites() TestSuites { + out := TestSuites{} + for _, suite := range ts { + if suite.IsGinkgo { + out = append(out, suite) + } + } + return out +} + +func (ts TestSuites) CountWithState(states ...TestSuiteState) int { + n := 0 + for _, suite := range ts { + if suite.State.Is(states...) { + n += 1 + } + } + + return n +} + +func (ts TestSuites) WithState(states ...TestSuiteState) TestSuites { + out := TestSuites{} + for _, suite := range ts { + if suite.State.Is(states...) { + out = append(out, suite) + } + } + + return out +} + +func (ts TestSuites) WithoutState(states ...TestSuiteState) TestSuites { + out := TestSuites{} + for _, suite := range ts { + if !suite.State.Is(states...) { + out = append(out, suite) + } + } + + return out +} + +func (ts TestSuites) ShuffledCopy(seed int64) TestSuites { + out := make(TestSuites, len(ts)) + permutation := rand.New(rand.NewSource(seed)).Perm(len(ts)) + for i, j := range permutation { + out[i] = ts[j] + } + return out +} + +func FindSuites(args []string, cliConfig types.CLIConfig, allowPrecompiled bool) TestSuites { + suites := TestSuites{} + + if len(args) > 0 { + for _, arg := range args { + if allowPrecompiled { + suite, err := precompiledTestSuite(arg) + if err == nil { + suites = append(suites, suite) + continue + } + } + recurseForSuite := cliConfig.Recurse + if strings.HasSuffix(arg, "/...") && arg != "/..." { + arg = arg[:len(arg)-4] + recurseForSuite = true + } + suites = append(suites, suitesInDir(arg, recurseForSuite)...) + } + } else { + suites = suitesInDir(".", cliConfig.Recurse) + } + + if cliConfig.SkipPackage != "" { + skipFilters := strings.Split(cliConfig.SkipPackage, ",") + for idx := range suites { + for _, skipFilter := range skipFilters { + if strings.Contains(suites[idx].Path, skipFilter) { + suites[idx].State = TestSuiteStateSkippedByFilter + break + } + } + } + } + + return suites +} + +func precompiledTestSuite(path string) (TestSuite, error) { + info, err := os.Stat(path) + if err != nil { + return TestSuite{}, err + } + + if info.IsDir() { + return TestSuite{}, errors.New("this is a directory, not a file") + } + + if filepath.Ext(path) != ".test" && filepath.Ext(path) != ".exe" { + return TestSuite{}, errors.New("this is not a .test binary") + } + + if filepath.Ext(path) == ".test" && runtime.GOOS != "windows" && info.Mode()&0111 == 0 { + return TestSuite{}, errors.New("this is not executable") + } + + dir := relPath(filepath.Dir(path)) + packageName := strings.TrimSuffix(filepath.Base(path), ".exe") + packageName = strings.TrimSuffix(packageName, ".test") + + path, err = filepath.Abs(path) + if err != nil { + return TestSuite{}, err + } + + return TestSuite{ + Path: dir, + PackageName: packageName, + IsGinkgo: true, + Precompiled: true, + PathToCompiledTest: path, + State: TestSuiteStateCompiled, + }, nil +} + +func suitesInDir(dir string, recurse bool) TestSuites { + suites := TestSuites{} + + if path.Base(dir) == "vendor" { + return suites + } + + files, _ := os.ReadDir(dir) + re := regexp.MustCompile(`^[^._].*_test\.go$`) + for _, file := range files { + if !file.IsDir() && re.MatchString(file.Name()) { + suite := TestSuite{ + Path: relPath(dir), + PackageName: packageNameForSuite(dir), + IsGinkgo: filesHaveGinkgoSuite(dir, files), + State: TestSuiteStateUncompiled, + } + suites = append(suites, suite) + break + } + } + + if recurse { + re = regexp.MustCompile(`^[._]`) + for _, file := range files { + if file.IsDir() && !re.MatchString(file.Name()) { + suites = append(suites, suitesInDir(dir+"/"+file.Name(), recurse)...) + } + } + } + + return suites +} + +func relPath(dir string) string { + dir, _ = filepath.Abs(dir) + cwd, _ := os.Getwd() + dir, _ = filepath.Rel(cwd, filepath.Clean(dir)) + + if string(dir[0]) != "." { + dir = "." + string(filepath.Separator) + dir + } + + return dir +} + +func packageNameForSuite(dir string) string { + path, _ := filepath.Abs(dir) + return filepath.Base(path) +} + +func filesHaveGinkgoSuite(dir string, files []os.DirEntry) bool { + reTestFile := regexp.MustCompile(`_test\.go$`) + reGinkgo := regexp.MustCompile(`package ginkgo|\/ginkgo"|\/ginkgo\/v2"|\/ginkgo\/v2/dsl/`) + + for _, file := range files { + if !file.IsDir() && reTestFile.MatchString(file.Name()) { + contents, _ := os.ReadFile(dir + "/" + file.Name()) + if reGinkgo.Match(contents) { + return true + } + } + } + + return false +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go new file mode 100644 index 000000000..bd9ca7d51 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go @@ -0,0 +1,86 @@ +package internal + +import ( + "fmt" + "io" + "os" + "os/exec" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/ginkgo/command" +) + +func FileExists(path string) bool { + _, err := os.Stat(path) + return err == nil +} + +func CopyFile(src string, dest string) error { + srcFile, err := os.Open(src) + if err != nil { + return err + } + + srcStat, err := srcFile.Stat() + if err != nil { + return err + } + + if _, err := os.Stat(dest); err == nil { + os.Remove(dest) + } + + destFile, err := os.OpenFile(dest, os.O_WRONLY|os.O_CREATE, srcStat.Mode()) + if err != nil { + return err + } + + _, err = io.Copy(destFile, srcFile) + if err != nil { + return err + } + + if err := srcFile.Close(); err != nil { + return err + } + return destFile.Close() +} + +func GoFmt(path string) { + out, err := exec.Command("go", "fmt", path).CombinedOutput() + if err != nil { + command.AbortIfError(fmt.Sprintf("Could not fmt:\n%s\n", string(out)), err) + } +} + +func PluralizedWord(singular, plural string, count int) string { + if count == 1 { + return singular + } + return plural +} + +func FailedSuitesReport(suites TestSuites, f formatter.Formatter) string { + out := "" + out += "There were failures detected in the following suites:\n" + + maxPackageNameLength := 0 + for _, suite := range suites.WithState(TestSuiteStateFailureStates...) { + if len(suite.PackageName) > maxPackageNameLength { + maxPackageNameLength = len(suite.PackageName) + } + } + + packageNameFormatter := fmt.Sprintf("%%%ds", maxPackageNameLength) + for _, suite := range suites { + switch suite.State { + case TestSuiteStateFailed: + out += f.Fi(1, "{{red}}"+packageNameFormatter+" {{gray}}%s{{/}}\n", suite.PackageName, suite.Path) + case TestSuiteStateFailedToCompile: + out += f.Fi(1, "{{red}}"+packageNameFormatter+" {{gray}}%s {{magenta}}[Compilation failure]{{/}}\n", suite.PackageName, suite.Path) + case TestSuiteStateFailedDueToTimeout: + out += f.Fi(1, "{{red}}"+packageNameFormatter+" {{gray}}%s {{orange}}[%s]{{/}}\n", suite.PackageName, suite.Path, TIMEOUT_ELAPSED_FAILURE_REASON) + } + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go new file mode 100644 index 000000000..9da1bab3d --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go @@ -0,0 +1,54 @@ +package internal + +import ( + "fmt" + "os/exec" + "regexp" + "strings" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/types" +) + +var versiorRe = regexp.MustCompile(`v(\d+\.\d+\.\d+)`) + +func VerifyCLIAndFrameworkVersion(suites TestSuites) { + cliVersion := types.VERSION + mismatches := map[string][]string{} + + for _, suite := range suites { + cmd := exec.Command("go", "list", "-m", "github.com/onsi/ginkgo/v2") + cmd.Dir = suite.Path + output, err := cmd.CombinedOutput() + if err != nil { + continue + } + components := strings.Split(string(output), " ") + if len(components) != 2 { + continue + } + matches := versiorRe.FindStringSubmatch(components[1]) + if matches == nil || len(matches) != 2 { + continue + } + libraryVersion := matches[1] + if cliVersion != libraryVersion { + mismatches[libraryVersion] = append(mismatches[libraryVersion], suite.PackageName) + } + } + + if len(mismatches) == 0 { + return + } + + fmt.Println(formatter.F("{{red}}{{bold}}Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:{{/}}")) + + fmt.Println(formatter.Fi(1, "Ginkgo CLI Version:")) + fmt.Println(formatter.Fi(2, "{{bold}}%s{{/}}", cliVersion)) + fmt.Println(formatter.Fi(1, "Mismatched package versions found:")) + for version, packages := range mismatches { + fmt.Println(formatter.Fi(2, "{{bold}}%s{{/}} used by %s", version, strings.Join(packages, ", "))) + } + fmt.Println("") + fmt.Println(formatter.Fiw(1, formatter.COLS, "{{gray}}Ginkgo will continue to attempt to run but you may see errors (including flag parsing errors) and should either update your go.mod or your version of the Ginkgo CLI to match.\n\nTo install the matching version of the CLI run\n {{bold}}go install github.com/onsi/ginkgo/v2/ginkgo{{/}}{{gray}}\nfrom a path that contains a go.mod file. Alternatively you can use\n {{bold}}go run github.com/onsi/ginkgo/v2/ginkgo{{/}}{{gray}}\nfrom a path that contains a go.mod file to invoke the matching version of the Ginkgo CLI.\n\nIf you are attempting to test multiple packages that each have a different version of the Ginkgo library with a single Ginkgo CLI that is currently unsupported.\n{{/}}")) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/labels/labels_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/labels/labels_command.go new file mode 100644 index 000000000..6c61f09d1 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/labels/labels_command.go @@ -0,0 +1,123 @@ +package labels + +import ( + "fmt" + "go/ast" + "go/parser" + "go/token" + "sort" + "strconv" + "strings" + + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" + "github.com/onsi/ginkgo/v2/types" + "golang.org/x/tools/go/ast/inspector" +) + +func BuildLabelsCommand() command.Command { + var cliConfig = types.NewDefaultCLIConfig() + + flags, err := types.BuildLabelsCommandFlagSet(&cliConfig) + if err != nil { + panic(err) + } + + return command.Command{ + Name: "labels", + Usage: "ginkgo labels ", + Flags: flags, + ShortDoc: "List labels detected in the passed-in packages (or the package in the current directory if left blank).", + DocLink: "spec-labels", + Command: func(args []string, _ []string) { + ListLabels(args, cliConfig) + }, + } +} + +func ListLabels(args []string, cliConfig types.CLIConfig) { + suites := internal.FindSuites(args, cliConfig, false).WithoutState(internal.TestSuiteStateSkippedByFilter) + if len(suites) == 0 { + command.AbortWith("Found no test suites") + } + for _, suite := range suites { + labels := fetchLabelsFromPackage(suite.Path) + if len(labels) == 0 { + fmt.Printf("%s: No labels found\n", suite.PackageName) + } else { + fmt.Printf("%s: [%s]\n", suite.PackageName, strings.Join(labels, ", ")) + } + } +} + +func fetchLabelsFromPackage(packagePath string) []string { + fset := token.NewFileSet() + parsedPackages, err := parser.ParseDir(fset, packagePath, nil, 0) + command.AbortIfError("Failed to parse package source:", err) + + files := []*ast.File{} + hasTestPackage := false + for key, pkg := range parsedPackages { + if strings.HasSuffix(key, "_test") { + hasTestPackage = true + for _, file := range pkg.Files { + files = append(files, file) + } + } + } + if !hasTestPackage { + for _, pkg := range parsedPackages { + for _, file := range pkg.Files { + files = append(files, file) + } + } + } + + seen := map[string]bool{} + labels := []string{} + ispr := inspector.New(files) + ispr.Preorder([]ast.Node{&ast.CallExpr{}}, func(n ast.Node) { + potentialLabels := fetchLabels(n.(*ast.CallExpr)) + for _, label := range potentialLabels { + if !seen[label] { + seen[label] = true + labels = append(labels, strconv.Quote(label)) + } + } + }) + + sort.Strings(labels) + return labels +} + +func fetchLabels(callExpr *ast.CallExpr) []string { + out := []string{} + switch expr := callExpr.Fun.(type) { + case *ast.Ident: + if expr.Name != "Label" { + return out + } + case *ast.SelectorExpr: + if expr.Sel.Name != "Label" { + return out + } + default: + return out + } + for _, arg := range callExpr.Args { + switch expr := arg.(type) { + case *ast.BasicLit: + if expr.Kind == token.STRING { + unquoted, err := strconv.Unquote(expr.Value) + if err != nil { + unquoted = expr.Value + } + validated, err := types.ValidateAndCleanupLabel(unquoted, types.CodeLocation{}) + if err == nil { + out = append(out, validated) + } + } + } + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go new file mode 100644 index 000000000..e9abb27d8 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go @@ -0,0 +1,58 @@ +package main + +import ( + "fmt" + "os" + + "github.com/onsi/ginkgo/v2/ginkgo/build" + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/generators" + "github.com/onsi/ginkgo/v2/ginkgo/labels" + "github.com/onsi/ginkgo/v2/ginkgo/outline" + "github.com/onsi/ginkgo/v2/ginkgo/run" + "github.com/onsi/ginkgo/v2/ginkgo/unfocus" + "github.com/onsi/ginkgo/v2/ginkgo/watch" + "github.com/onsi/ginkgo/v2/types" +) + +var program command.Program + +func GenerateCommands() []command.Command { + return []command.Command{ + watch.BuildWatchCommand(), + build.BuildBuildCommand(), + generators.BuildBootstrapCommand(), + generators.BuildGenerateCommand(), + labels.BuildLabelsCommand(), + outline.BuildOutlineCommand(), + unfocus.BuildUnfocusCommand(), + BuildVersionCommand(), + } +} + +func main() { + program = command.Program{ + Name: "ginkgo", + Heading: fmt.Sprintf("Ginkgo Version %s", types.VERSION), + Commands: GenerateCommands(), + DefaultCommand: run.BuildRunCommand(), + DeprecatedCommands: []command.DeprecatedCommand{ + {Name: "convert", Deprecation: types.Deprecations.Convert()}, + {Name: "blur", Deprecation: types.Deprecations.Blur()}, + {Name: "nodot", Deprecation: types.Deprecations.Nodot()}, + }, + } + + program.RunAndExit(os.Args) +} + +func BuildVersionCommand() command.Command { + return command.Command{ + Name: "version", + Usage: "ginkgo version", + ShortDoc: "Print Ginkgo's version", + Command: func(_ []string, _ []string) { + fmt.Printf("Ginkgo Version %s\n", types.VERSION) + }, + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go new file mode 100644 index 000000000..5d8d00bb1 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go @@ -0,0 +1,301 @@ +package outline + +import ( + "go/ast" + "go/token" + "strconv" + + "github.com/onsi/ginkgo/v2/types" +) + +const ( + // undefinedTextAlt is used if the spec/container text cannot be derived + undefinedTextAlt = "undefined" +) + +// ginkgoMetadata holds useful bits of information for every entry in the outline +type ginkgoMetadata struct { + // Name is the spec or container function name, e.g. `Describe` or `It` + Name string `json:"name"` + + // Text is the `text` argument passed to specs, and some containers + Text string `json:"text"` + + // Start is the position of first character of the spec or container block + Start int `json:"start"` + + // End is the position of first character immediately after the spec or container block + End int `json:"end"` + + Spec bool `json:"spec"` + Focused bool `json:"focused"` + Pending bool `json:"pending"` + Labels []string `json:"labels"` +} + +// ginkgoNode is used to construct the outline as a tree +type ginkgoNode struct { + ginkgoMetadata + Nodes []*ginkgoNode `json:"nodes"` +} + +type walkFunc func(n *ginkgoNode) + +func (n *ginkgoNode) PreOrder(f walkFunc) { + f(n) + for _, m := range n.Nodes { + m.PreOrder(f) + } +} + +func (n *ginkgoNode) PostOrder(f walkFunc) { + for _, m := range n.Nodes { + m.PostOrder(f) + } + f(n) +} + +func (n *ginkgoNode) Walk(pre, post walkFunc) { + pre(n) + for _, m := range n.Nodes { + m.Walk(pre, post) + } + post(n) +} + +// PropagateInheritedProperties propagates the Pending and Focused properties +// through the subtree rooted at n. +func (n *ginkgoNode) PropagateInheritedProperties() { + n.PreOrder(func(thisNode *ginkgoNode) { + for _, descendantNode := range thisNode.Nodes { + if thisNode.Pending { + descendantNode.Pending = true + descendantNode.Focused = false + } + if thisNode.Focused && !descendantNode.Pending { + descendantNode.Focused = true + } + } + }) +} + +// BackpropagateUnfocus propagates the Focused property through the subtree +// rooted at n. It applies the rule described in the Ginkgo docs: +// > Nested programmatically focused specs follow a simple rule: if a +// > leaf-node is marked focused, any of its ancestor nodes that are marked +// > focus will be unfocused. +func (n *ginkgoNode) BackpropagateUnfocus() { + focusedSpecInSubtreeStack := []bool{} + n.PostOrder(func(thisNode *ginkgoNode) { + if thisNode.Spec { + focusedSpecInSubtreeStack = append(focusedSpecInSubtreeStack, thisNode.Focused) + return + } + focusedSpecInSubtree := false + for range thisNode.Nodes { + focusedSpecInSubtree = focusedSpecInSubtree || focusedSpecInSubtreeStack[len(focusedSpecInSubtreeStack)-1] + focusedSpecInSubtreeStack = focusedSpecInSubtreeStack[0 : len(focusedSpecInSubtreeStack)-1] + } + focusedSpecInSubtreeStack = append(focusedSpecInSubtreeStack, focusedSpecInSubtree) + if focusedSpecInSubtree { + thisNode.Focused = false + } + }) + +} + +func packageAndIdentNamesFromCallExpr(ce *ast.CallExpr) (string, string, bool) { + switch ex := ce.Fun.(type) { + case *ast.Ident: + return "", ex.Name, true + case *ast.SelectorExpr: + pkgID, ok := ex.X.(*ast.Ident) + if !ok { + return "", "", false + } + // A package identifier is top-level, so Obj must be nil + if pkgID.Obj != nil { + return "", "", false + } + if ex.Sel == nil { + return "", "", false + } + return pkgID.Name, ex.Sel.Name, true + default: + return "", "", false + } +} + +// absoluteOffsetsForNode derives the absolute character offsets of the node start and +// end positions. +func absoluteOffsetsForNode(fset *token.FileSet, n ast.Node) (start, end int) { + return fset.PositionFor(n.Pos(), false).Offset, fset.PositionFor(n.End(), false).Offset +} + +// ginkgoNodeFromCallExpr derives an outline entry from a go AST subtree +// corresponding to a Ginkgo container or spec. +func ginkgoNodeFromCallExpr(fset *token.FileSet, ce *ast.CallExpr, ginkgoPackageName *string) (*ginkgoNode, bool) { + packageName, identName, ok := packageAndIdentNamesFromCallExpr(ce) + if !ok { + return nil, false + } + + n := ginkgoNode{} + n.Name = identName + n.Start, n.End = absoluteOffsetsForNode(fset, ce) + n.Nodes = make([]*ginkgoNode, 0) + switch identName { + case "It", "Specify", "Entry": + n.Spec = true + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + n.Labels = labelFromCallExpr(ce) + n.Pending = pendingFromCallExpr(ce) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "FIt", "FSpecify", "FEntry": + n.Spec = true + n.Focused = true + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + n.Labels = labelFromCallExpr(ce) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "PIt", "PSpecify", "XIt", "XSpecify", "PEntry", "XEntry": + n.Spec = true + n.Pending = true + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + n.Labels = labelFromCallExpr(ce) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "Context", "Describe", "When", "DescribeTable": + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + n.Labels = labelFromCallExpr(ce) + n.Pending = pendingFromCallExpr(ce) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "FContext", "FDescribe", "FWhen", "FDescribeTable": + n.Focused = true + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + n.Labels = labelFromCallExpr(ce) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "PContext", "PDescribe", "PWhen", "XContext", "XDescribe", "XWhen", "PDescribeTable", "XDescribeTable": + n.Pending = true + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + n.Labels = labelFromCallExpr(ce) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "By": + n.Text = textOrAltFromCallExpr(ce, undefinedTextAlt) + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "AfterEach", "BeforeEach": + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "JustAfterEach", "JustBeforeEach": + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "AfterSuite", "BeforeSuite": + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + case "SynchronizedAfterSuite", "SynchronizedBeforeSuite": + return &n, ginkgoPackageName != nil && *ginkgoPackageName == packageName + default: + return nil, false + } +} + +// textOrAltFromCallExpr tries to derive the "text" of a Ginkgo spec or +// container. If it cannot derive it, it returns the alt text. +func textOrAltFromCallExpr(ce *ast.CallExpr, alt string) string { + text, defined := textFromCallExpr(ce) + if !defined { + return alt + } + return text +} + +// textFromCallExpr tries to derive the "text" of a Ginkgo spec or container. If +// it cannot derive it, it returns false. +func textFromCallExpr(ce *ast.CallExpr) (string, bool) { + if len(ce.Args) < 1 { + return "", false + } + text, ok := ce.Args[0].(*ast.BasicLit) + if !ok { + return "", false + } + switch text.Kind { + case token.CHAR, token.STRING: + // For token.CHAR and token.STRING, Value is quoted + unquoted, err := strconv.Unquote(text.Value) + if err != nil { + // If unquoting fails, just use the raw Value + return text.Value, true + } + return unquoted, true + default: + return text.Value, true + } +} + +func labelFromCallExpr(ce *ast.CallExpr) []string { + + labels := []string{} + if len(ce.Args) < 2 { + return labels + } + + for _, arg := range ce.Args[1:] { + switch expr := arg.(type) { + case *ast.CallExpr: + id, ok := expr.Fun.(*ast.Ident) + if !ok { + // to skip over cases where the expr.Fun. is actually *ast.SelectorExpr + continue + } + if id.Name == "Label" { + ls := extractLabels(expr) + labels = append(labels, ls...) + } + } + } + return labels +} + +func extractLabels(expr *ast.CallExpr) []string { + out := []string{} + for _, arg := range expr.Args { + switch expr := arg.(type) { + case *ast.BasicLit: + if expr.Kind == token.STRING { + unquoted, err := strconv.Unquote(expr.Value) + if err != nil { + unquoted = expr.Value + } + validated, err := types.ValidateAndCleanupLabel(unquoted, types.CodeLocation{}) + if err == nil { + out = append(out, validated) + } + } + } + } + + return out +} + +func pendingFromCallExpr(ce *ast.CallExpr) bool { + + pending := false + if len(ce.Args) < 2 { + return pending + } + + for _, arg := range ce.Args[1:] { + switch expr := arg.(type) { + case *ast.CallExpr: + id, ok := expr.Fun.(*ast.Ident) + if !ok { + // to skip over cases where the expr.Fun. is actually *ast.SelectorExpr + continue + } + if id.Name == "Pending" { + pending = true + } + case *ast.Ident: + if expr.Name == "Pending" { + pending = true + } + } + } + return pending +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go new file mode 100644 index 000000000..f0a6b5d26 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go @@ -0,0 +1,58 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Most of the required functions were available in the +// "golang.org/x/tools/go/ast/astutil" package, but not exported. +// They were copied from https://github.com/golang/tools/blob/2b0845dc783e36ae26d683f4915a5840ef01ab0f/go/ast/astutil/imports.go + +package outline + +import ( + "go/ast" + "strconv" + "strings" +) + +// packageNameForImport returns the package name for the package. If the package +// is not imported, it returns nil. "Package name" refers to `pkgname` in the +// call expression `pkgname.ExportedIdentifier`. Examples: +// (import path not found) -> nil +// "import example.com/pkg/foo" -> "foo" +// "import fooalias example.com/pkg/foo" -> "fooalias" +// "import . example.com/pkg/foo" -> "" +func packageNameForImport(f *ast.File, path string) *string { + spec := importSpec(f, path) + if spec == nil { + return nil + } + name := spec.Name.String() + if name == "" { + name = "ginkgo" + } + if name == "." { + name = "" + } + return &name +} + +// importSpec returns the import spec if f imports path, +// or nil otherwise. +func importSpec(f *ast.File, path string) *ast.ImportSpec { + for _, s := range f.Imports { + if strings.HasPrefix(importPath(s), path) { + return s + } + } + return nil +} + +// importPath returns the unquoted import path of s, +// or "" if the path is not properly quoted. +func importPath(s *ast.ImportSpec) string { + t, err := strconv.Unquote(s.Path.Value) + if err != nil { + return "" + } + return t +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go new file mode 100644 index 000000000..c2327cda8 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go @@ -0,0 +1,110 @@ +package outline + +import ( + "encoding/json" + "fmt" + "go/ast" + "go/token" + "strings" + + "golang.org/x/tools/go/ast/inspector" +) + +const ( + // ginkgoImportPath is the well-known ginkgo import path + ginkgoImportPath = "github.com/onsi/ginkgo/v2" +) + +// FromASTFile returns an outline for a Ginkgo test source file +func FromASTFile(fset *token.FileSet, src *ast.File) (*outline, error) { + ginkgoPackageName := packageNameForImport(src, ginkgoImportPath) + if ginkgoPackageName == nil { + return nil, fmt.Errorf("file does not import %q", ginkgoImportPath) + } + + root := ginkgoNode{} + stack := []*ginkgoNode{&root} + ispr := inspector.New([]*ast.File{src}) + ispr.Nodes([]ast.Node{(*ast.CallExpr)(nil)}, func(node ast.Node, push bool) bool { + if push { + // Pre-order traversal + ce, ok := node.(*ast.CallExpr) + if !ok { + // Because `Nodes` calls this function only when the node is an + // ast.CallExpr, this should never happen + panic(fmt.Errorf("node starting at %d, ending at %d is not an *ast.CallExpr", node.Pos(), node.End())) + } + gn, ok := ginkgoNodeFromCallExpr(fset, ce, ginkgoPackageName) + if !ok { + // Node is not a Ginkgo spec or container, continue + return true + } + parent := stack[len(stack)-1] + parent.Nodes = append(parent.Nodes, gn) + stack = append(stack, gn) + return true + } + // Post-order traversal + start, end := absoluteOffsetsForNode(fset, node) + lastVisitedGinkgoNode := stack[len(stack)-1] + if start != lastVisitedGinkgoNode.Start || end != lastVisitedGinkgoNode.End { + // Node is not a Ginkgo spec or container, so it was not pushed onto the stack, continue + return true + } + stack = stack[0 : len(stack)-1] + return true + }) + if len(root.Nodes) == 0 { + return &outline{[]*ginkgoNode{}}, nil + } + + // Derive the final focused property for all nodes. This must be done + // _before_ propagating the inherited focused property. + root.BackpropagateUnfocus() + // Now, propagate inherited properties, including focused and pending. + root.PropagateInheritedProperties() + + return &outline{root.Nodes}, nil +} + +type outline struct { + Nodes []*ginkgoNode `json:"nodes"` +} + +func (o *outline) MarshalJSON() ([]byte, error) { + return json.Marshal(o.Nodes) +} + +// String returns a CSV-formatted outline. Spec or container are output in +// depth-first order. +func (o *outline) String() string { + return o.StringIndent(0) +} + +// StringIndent returns a CSV-formated outline, but every line is indented by +// one 'width' of spaces for every level of nesting. +func (o *outline) StringIndent(width int) string { + var b strings.Builder + b.WriteString("Name,Text,Start,End,Spec,Focused,Pending,Labels\n") + + currentIndent := 0 + pre := func(n *ginkgoNode) { + b.WriteString(fmt.Sprintf("%*s", currentIndent, "")) + var labels string + if len(n.Labels) == 1 { + labels = n.Labels[0] + } else { + labels = strings.Join(n.Labels, ", ") + } + //enclosing labels in a double quoted comma separate listed so that when inmported into a CSV app the Labels column has comma separate strings + b.WriteString(fmt.Sprintf("%s,%s,%d,%d,%t,%t,%t,\"%s\"\n", n.Name, n.Text, n.Start, n.End, n.Spec, n.Focused, n.Pending, labels)) + currentIndent += width + } + post := func(n *ginkgoNode) { + currentIndent -= width + } + for _, n := range o.Nodes { + n.Walk(pre, post) + } + return b.String() +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline_command.go new file mode 100644 index 000000000..36698d46a --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline_command.go @@ -0,0 +1,98 @@ +package outline + +import ( + "encoding/json" + "fmt" + "go/parser" + "go/token" + "os" + + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/types" +) + +const ( + // indentWidth is the width used by the 'indent' output + indentWidth = 4 + // stdinAlias is a portable alias for stdin. This convention is used in + // other CLIs, e.g., kubectl. + stdinAlias = "-" + usageCommand = "ginkgo outline " +) + +type outlineConfig struct { + Format string +} + +func BuildOutlineCommand() command.Command { + conf := outlineConfig{ + Format: "csv", + } + flags, err := types.NewGinkgoFlagSet( + types.GinkgoFlags{ + {Name: "format", KeyPath: "Format", + Usage: "Format of outline", + UsageArgument: "one of 'csv', 'indent', or 'json'", + UsageDefaultValue: conf.Format, + }, + }, + &conf, + types.GinkgoFlagSections{}, + ) + if err != nil { + panic(err) + } + + return command.Command{ + Name: "outline", + Usage: "ginkgo outline ", + ShortDoc: "Create an outline of Ginkgo symbols for a file", + Documentation: "To read from stdin, use: `ginkgo outline -`", + DocLink: "creating-an-outline-of-specs", + Flags: flags, + Command: func(args []string, _ []string) { + outlineFile(args, conf.Format) + }, + } +} + +func outlineFile(args []string, format string) { + if len(args) != 1 { + command.AbortWithUsage("outline expects exactly one argument") + } + + filename := args[0] + var src *os.File + if filename == stdinAlias { + src = os.Stdin + } else { + var err error + src, err = os.Open(filename) + command.AbortIfError("Failed to open file:", err) + } + + fset := token.NewFileSet() + + parsedSrc, err := parser.ParseFile(fset, filename, src, 0) + command.AbortIfError("Failed to parse source:", err) + + o, err := FromASTFile(fset, parsedSrc) + command.AbortIfError("Failed to create outline:", err) + + var oerr error + switch format { + case "csv": + _, oerr = fmt.Print(o) + case "indent": + _, oerr = fmt.Print(o.StringIndent(indentWidth)) + case "json": + b, err := json.Marshal(o) + if err != nil { + println(fmt.Sprintf("error marshalling to json: %s", err)) + } + _, oerr = fmt.Println(string(b)) + default: + command.AbortWith("Format %s not accepted", format) + } + command.AbortIfError("Failed to write outline:", oerr) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go new file mode 100644 index 000000000..aaed4d570 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go @@ -0,0 +1,232 @@ +package run + +import ( + "fmt" + "os" + "strings" + "time" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" + "github.com/onsi/ginkgo/v2/internal/interrupt_handler" + "github.com/onsi/ginkgo/v2/types" +) + +func BuildRunCommand() command.Command { + var suiteConfig = types.NewDefaultSuiteConfig() + var reporterConfig = types.NewDefaultReporterConfig() + var cliConfig = types.NewDefaultCLIConfig() + var goFlagsConfig = types.NewDefaultGoFlagsConfig() + + flags, err := types.BuildRunCommandFlagSet(&suiteConfig, &reporterConfig, &cliConfig, &goFlagsConfig) + if err != nil { + panic(err) + } + + interruptHandler := interrupt_handler.NewInterruptHandler(nil) + interrupt_handler.SwallowSigQuit() + + return command.Command{ + Name: "run", + Flags: flags, + Usage: "ginkgo run -- ", + ShortDoc: "Run the tests in the passed in (or the package in the current directory if left blank)", + Documentation: "Any arguments after -- will be passed to the test.", + DocLink: "running-tests", + Command: func(args []string, additionalArgs []string) { + var errors []error + cliConfig, goFlagsConfig, errors = types.VetAndInitializeCLIAndGoConfig(cliConfig, goFlagsConfig) + command.AbortIfErrors("Ginkgo detected configuration issues:", errors) + + runner := &SpecRunner{ + cliConfig: cliConfig, + goFlagsConfig: goFlagsConfig, + suiteConfig: suiteConfig, + reporterConfig: reporterConfig, + flags: flags, + + interruptHandler: interruptHandler, + } + + runner.RunSpecs(args, additionalArgs) + }, + } +} + +type SpecRunner struct { + suiteConfig types.SuiteConfig + reporterConfig types.ReporterConfig + cliConfig types.CLIConfig + goFlagsConfig types.GoFlagsConfig + flags types.GinkgoFlagSet + + interruptHandler *interrupt_handler.InterruptHandler +} + +func (r *SpecRunner) RunSpecs(args []string, additionalArgs []string) { + suites := internal.FindSuites(args, r.cliConfig, true) + skippedSuites := suites.WithState(internal.TestSuiteStateSkippedByFilter) + suites = suites.WithoutState(internal.TestSuiteStateSkippedByFilter) + + internal.VerifyCLIAndFrameworkVersion(suites) + + if len(skippedSuites) > 0 { + fmt.Println("Will skip:") + for _, skippedSuite := range skippedSuites { + fmt.Println(" " + skippedSuite.Path) + } + } + + if len(skippedSuites) > 0 && len(suites) == 0 { + command.AbortGracefullyWith("All tests skipped! Exiting...") + } + + if len(suites) == 0 { + command.AbortWith("Found no test suites") + } + + if len(suites) > 1 && !r.flags.WasSet("succinct") && r.reporterConfig.Verbosity().LT(types.VerbosityLevelVerbose) { + r.reporterConfig.Succinct = true + } + + t := time.Now() + var endTime time.Time + if r.suiteConfig.Timeout > 0 { + endTime = t.Add(r.suiteConfig.Timeout) + } + + iteration := 0 +OUTER_LOOP: + for { + if !r.flags.WasSet("seed") { + r.suiteConfig.RandomSeed = time.Now().Unix() + } + if r.cliConfig.RandomizeSuites && len(suites) > 1 { + suites = suites.ShuffledCopy(r.suiteConfig.RandomSeed) + } + + opc := internal.NewOrderedParallelCompiler(r.cliConfig.ComputedNumCompilers()) + opc.StartCompiling(suites, r.goFlagsConfig) + + SUITE_LOOP: + for { + suiteIdx, suite := opc.Next() + if suiteIdx >= len(suites) { + break SUITE_LOOP + } + suites[suiteIdx] = suite + + if r.interruptHandler.Status().Interrupted() { + opc.StopAndDrain() + break OUTER_LOOP + } + + if suites[suiteIdx].State.Is(internal.TestSuiteStateSkippedDueToEmptyCompilation) { + fmt.Printf("Skipping %s (no test files)\n", suite.Path) + continue SUITE_LOOP + } + + if suites[suiteIdx].State.Is(internal.TestSuiteStateFailedToCompile) { + fmt.Println(suites[suiteIdx].CompilationError.Error()) + if !r.cliConfig.KeepGoing { + opc.StopAndDrain() + } + continue SUITE_LOOP + } + + if suites.CountWithState(internal.TestSuiteStateFailureStates...) > 0 && !r.cliConfig.KeepGoing { + suites[suiteIdx].State = internal.TestSuiteStateSkippedDueToPriorFailures + opc.StopAndDrain() + continue SUITE_LOOP + } + + if !endTime.IsZero() { + r.suiteConfig.Timeout = endTime.Sub(time.Now()) + if r.suiteConfig.Timeout <= 0 { + suites[suiteIdx].State = internal.TestSuiteStateFailedDueToTimeout + opc.StopAndDrain() + continue SUITE_LOOP + } + } + + suites[suiteIdx] = internal.RunCompiledSuite(suites[suiteIdx], r.suiteConfig, r.reporterConfig, r.cliConfig, r.goFlagsConfig, additionalArgs) + } + + if suites.CountWithState(internal.TestSuiteStateFailureStates...) > 0 { + if iteration > 0 { + fmt.Printf("\nTests failed on attempt #%d\n\n", iteration+1) + } + break OUTER_LOOP + } + + if r.cliConfig.UntilItFails { + fmt.Printf("\nAll tests passed...\nWill keep running them until they fail.\nThis was attempt #%d\n%s\n", iteration+1, orcMessage(iteration+1)) + } else if r.cliConfig.Repeat > 0 && iteration < r.cliConfig.Repeat { + fmt.Printf("\nAll tests passed...\nThis was attempt %d of %d.\n", iteration+1, r.cliConfig.Repeat+1) + } else { + break OUTER_LOOP + } + iteration += 1 + } + + internal.Cleanup(r.goFlagsConfig, suites...) + + messages, err := internal.FinalizeProfilesAndReportsForSuites(suites, r.cliConfig, r.suiteConfig, r.reporterConfig, r.goFlagsConfig) + command.AbortIfError("could not finalize profiles:", err) + for _, message := range messages { + fmt.Println(message) + } + + fmt.Printf("\nGinkgo ran %d %s in %s\n", len(suites), internal.PluralizedWord("suite", "suites", len(suites)), time.Since(t)) + + if suites.CountWithState(internal.TestSuiteStateFailureStates...) == 0 { + if suites.AnyHaveProgrammaticFocus() && strings.TrimSpace(os.Getenv("GINKGO_EDITOR_INTEGRATION")) == "" { + fmt.Printf("Test Suite Passed\n") + fmt.Printf("Detected Programmatic Focus - setting exit status to %d\n", types.GINKGO_FOCUS_EXIT_CODE) + command.Abort(command.AbortDetails{ExitCode: types.GINKGO_FOCUS_EXIT_CODE}) + } else { + fmt.Printf("Test Suite Passed\n") + command.Abort(command.AbortDetails{}) + } + } else { + fmt.Fprintln(formatter.ColorableStdOut, "") + if len(suites) > 1 && suites.CountWithState(internal.TestSuiteStateFailureStates...) > 0 { + fmt.Fprintln(formatter.ColorableStdOut, + internal.FailedSuitesReport(suites, formatter.NewWithNoColorBool(r.reporterConfig.NoColor))) + } + fmt.Printf("Test Suite Failed\n") + command.Abort(command.AbortDetails{ExitCode: 1}) + } +} + +func orcMessage(iteration int) string { + if iteration < 10 { + return "" + } else if iteration < 30 { + return []string{ + "If at first you succeed...", + "...try, try again.", + "Looking good!", + "Still good...", + "I think your tests are fine....", + "Yep, still passing", + "Oh boy, here I go testin' again!", + "Even the gophers are getting bored", + "Did you try -race?", + "Maybe you should stop now?", + "I'm getting tired...", + "What if I just made you a sandwich?", + "Hit ^C, hit ^C, please hit ^C", + "Make it stop. Please!", + "Come on! Enough is enough!", + "Dave, this conversation can serve no purpose anymore. Goodbye.", + "Just what do you think you're doing, Dave? ", + "I, Sisyphus", + "Insanity: doing the same thing over and over again and expecting different results. -Einstein", + "I guess Einstein never tried to churn butter", + }[iteration-10] + "\n" + } else { + return "No, seriously... you can probably stop now.\n" + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/unfocus/unfocus_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/unfocus/unfocus_command.go new file mode 100644 index 000000000..7dd294394 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/unfocus/unfocus_command.go @@ -0,0 +1,186 @@ +package unfocus + +import ( + "bytes" + "fmt" + "go/ast" + "go/parser" + "go/token" + "io" + "os" + "path/filepath" + "strings" + "sync" + + "github.com/onsi/ginkgo/v2/ginkgo/command" +) + +func BuildUnfocusCommand() command.Command { + return command.Command{ + Name: "unfocus", + Usage: "ginkgo unfocus", + ShortDoc: "Recursively unfocus any focused tests under the current directory", + DocLink: "filtering-specs", + Command: func(_ []string, _ []string) { + unfocusSpecs() + }, + } +} + +func unfocusSpecs() { + fmt.Println("Scanning for focus...") + + goFiles := make(chan string) + go func() { + unfocusDir(goFiles, ".") + close(goFiles) + }() + + const workers = 10 + wg := sync.WaitGroup{} + wg.Add(workers) + + for i := 0; i < workers; i++ { + go func() { + for path := range goFiles { + unfocusFile(path) + } + wg.Done() + }() + } + + wg.Wait() +} + +func unfocusDir(goFiles chan string, path string) { + files, err := os.ReadDir(path) + if err != nil { + fmt.Println(err.Error()) + return + } + + for _, f := range files { + switch { + case f.IsDir() && shouldProcessDir(f.Name()): + unfocusDir(goFiles, filepath.Join(path, f.Name())) + case !f.IsDir() && shouldProcessFile(f.Name()): + goFiles <- filepath.Join(path, f.Name()) + } + } +} + +func shouldProcessDir(basename string) bool { + return basename != "vendor" && !strings.HasPrefix(basename, ".") +} + +func shouldProcessFile(basename string) bool { + return strings.HasSuffix(basename, ".go") +} + +func unfocusFile(path string) { + data, err := os.ReadFile(path) + if err != nil { + fmt.Printf("error reading file '%s': %s\n", path, err.Error()) + return + } + + ast, err := parser.ParseFile(token.NewFileSet(), path, bytes.NewReader(data), parser.ParseComments) + if err != nil { + fmt.Printf("error parsing file '%s': %s\n", path, err.Error()) + return + } + + eliminations := scanForFocus(ast) + if len(eliminations) == 0 { + return + } + + fmt.Printf("...updating %s\n", path) + backup, err := writeBackup(path, data) + if err != nil { + fmt.Printf("error creating backup file: %s\n", err.Error()) + return + } + + if err := updateFile(path, data, eliminations); err != nil { + fmt.Printf("error writing file '%s': %s\n", path, err.Error()) + return + } + + os.Remove(backup) +} + +func writeBackup(path string, data []byte) (string, error) { + t, err := os.CreateTemp(filepath.Dir(path), filepath.Base(path)) + + if err != nil { + return "", fmt.Errorf("error creating temporary file: %w", err) + } + defer t.Close() + + if _, err := io.Copy(t, bytes.NewReader(data)); err != nil { + return "", fmt.Errorf("error writing to temporary file: %w", err) + } + + return t.Name(), nil +} + +func updateFile(path string, data []byte, eliminations [][]int64) error { + to, err := os.Create(path) + if err != nil { + return fmt.Errorf("error opening file for writing '%s': %w\n", path, err) + } + defer to.Close() + + from := bytes.NewReader(data) + var cursor int64 + for _, eliminationRange := range eliminations { + positionToEliminate, lengthToEliminate := eliminationRange[0]-1, eliminationRange[1] + if _, err := io.CopyN(to, from, positionToEliminate-cursor); err != nil { + return fmt.Errorf("error copying data: %w", err) + } + + cursor = positionToEliminate + lengthToEliminate + + if _, err := from.Seek(lengthToEliminate, io.SeekCurrent); err != nil { + return fmt.Errorf("error seeking to position in buffer: %w", err) + } + } + + if _, err := io.Copy(to, from); err != nil { + return fmt.Errorf("error copying end data: %w", err) + } + + return nil +} + +func scanForFocus(file *ast.File) (eliminations [][]int64) { + ast.Inspect(file, func(n ast.Node) bool { + if c, ok := n.(*ast.CallExpr); ok { + if i, ok := c.Fun.(*ast.Ident); ok { + if isFocus(i.Name) { + eliminations = append(eliminations, []int64{int64(i.Pos()), 1}) + } + } + } + + if i, ok := n.(*ast.Ident); ok { + if i.Name == "Focus" { + eliminations = append(eliminations, []int64{int64(i.Pos()), 6}) + } + } + + return true + }) + + return eliminations +} + +func isFocus(name string) bool { + switch name { + case "FDescribe", "FContext", "FIt", "FDescribeTable", "FEntry", "FSpecify", "FWhen": + return true + default: + return false + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go new file mode 100644 index 000000000..6c485c5b1 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go @@ -0,0 +1,22 @@ +package watch + +import "sort" + +type Delta struct { + ModifiedPackages []string + + NewSuites []*Suite + RemovedSuites []*Suite + modifiedSuites []*Suite +} + +type DescendingByDelta []*Suite + +func (a DescendingByDelta) Len() int { return len(a) } +func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() } + +func (d Delta) ModifiedSuites() []*Suite { + sort.Sort(DescendingByDelta(d.modifiedSuites)) + return d.modifiedSuites +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta_tracker.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta_tracker.go new file mode 100644 index 000000000..26418ac62 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta_tracker.go @@ -0,0 +1,75 @@ +package watch + +import ( + "fmt" + + "regexp" + + "github.com/onsi/ginkgo/v2/ginkgo/internal" +) + +type SuiteErrors map[internal.TestSuite]error + +type DeltaTracker struct { + maxDepth int + watchRegExp *regexp.Regexp + suites map[string]*Suite + packageHashes *PackageHashes +} + +func NewDeltaTracker(maxDepth int, watchRegExp *regexp.Regexp) *DeltaTracker { + return &DeltaTracker{ + maxDepth: maxDepth, + watchRegExp: watchRegExp, + packageHashes: NewPackageHashes(watchRegExp), + suites: map[string]*Suite{}, + } +} + +func (d *DeltaTracker) Delta(suites internal.TestSuites) (delta Delta, errors SuiteErrors) { + errors = SuiteErrors{} + delta.ModifiedPackages = d.packageHashes.CheckForChanges() + + providedSuitePaths := map[string]bool{} + for _, suite := range suites { + providedSuitePaths[suite.Path] = true + } + + d.packageHashes.StartTrackingUsage() + + for _, suite := range d.suites { + if providedSuitePaths[suite.Suite.Path] { + if suite.Delta() > 0 { + delta.modifiedSuites = append(delta.modifiedSuites, suite) + } + } else { + delta.RemovedSuites = append(delta.RemovedSuites, suite) + } + } + + d.packageHashes.StopTrackingUsageAndPrune() + + for _, suite := range suites { + _, ok := d.suites[suite.Path] + if !ok { + s, err := NewSuite(suite, d.maxDepth, d.packageHashes) + if err != nil { + errors[suite] = err + continue + } + d.suites[suite.Path] = s + delta.NewSuites = append(delta.NewSuites, s) + } + } + + return delta, errors +} + +func (d *DeltaTracker) WillRun(suite internal.TestSuite) error { + s, ok := d.suites[suite.Path] + if !ok { + return fmt.Errorf("unknown suite %s", suite.Path) + } + + return s.MarkAsRunAndRecomputedDependencies(d.maxDepth) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go new file mode 100644 index 000000000..a34d94354 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go @@ -0,0 +1,92 @@ +package watch + +import ( + "go/build" + "regexp" +) + +var ginkgoAndGomegaFilter = regexp.MustCompile(`github\.com/onsi/ginkgo|github\.com/onsi/gomega`) +var ginkgoIntegrationTestFilter = regexp.MustCompile(`github\.com/onsi/ginkgo/integration`) //allow us to integration test this thing + +type Dependencies struct { + deps map[string]int +} + +func NewDependencies(path string, maxDepth int) (Dependencies, error) { + d := Dependencies{ + deps: map[string]int{}, + } + + if maxDepth == 0 { + return d, nil + } + + err := d.seedWithDepsForPackageAtPath(path) + if err != nil { + return d, err + } + + for depth := 1; depth < maxDepth; depth++ { + n := len(d.deps) + d.addDepsForDepth(depth) + if n == len(d.deps) { + break + } + } + + return d, nil +} + +func (d Dependencies) Dependencies() map[string]int { + return d.deps +} + +func (d Dependencies) seedWithDepsForPackageAtPath(path string) error { + pkg, err := build.ImportDir(path, 0) + if err != nil { + return err + } + + d.resolveAndAdd(pkg.Imports, 1) + d.resolveAndAdd(pkg.TestImports, 1) + d.resolveAndAdd(pkg.XTestImports, 1) + + delete(d.deps, pkg.Dir) + return nil +} + +func (d Dependencies) addDepsForDepth(depth int) { + for dep, depDepth := range d.deps { + if depDepth == depth { + d.addDepsForDep(dep, depth+1) + } + } +} + +func (d Dependencies) addDepsForDep(dep string, depth int) { + pkg, err := build.ImportDir(dep, 0) + if err != nil { + println(err.Error()) + return + } + d.resolveAndAdd(pkg.Imports, depth) +} + +func (d Dependencies) resolveAndAdd(deps []string, depth int) { + for _, dep := range deps { + pkg, err := build.Import(dep, ".", 0) + if err != nil { + continue + } + if !pkg.Goroot && (!ginkgoAndGomegaFilter.MatchString(pkg.Dir) || ginkgoIntegrationTestFilter.MatchString(pkg.Dir)) { + d.addDepIfNotPresent(pkg.Dir, depth) + } + } +} + +func (d Dependencies) addDepIfNotPresent(dep string, depth int) { + _, ok := d.deps[dep] + if !ok { + d.deps[dep] = depth + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go new file mode 100644 index 000000000..0e6ae1f29 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go @@ -0,0 +1,117 @@ +package watch + +import ( + "fmt" + "os" + "regexp" + "strings" + "time" +) + +var goTestRegExp = regexp.MustCompile(`_test\.go$`) + +type PackageHash struct { + CodeModifiedTime time.Time + TestModifiedTime time.Time + Deleted bool + + path string + codeHash string + testHash string + watchRegExp *regexp.Regexp +} + +func NewPackageHash(path string, watchRegExp *regexp.Regexp) *PackageHash { + p := &PackageHash{ + path: path, + watchRegExp: watchRegExp, + } + + p.codeHash, _, p.testHash, _, p.Deleted = p.computeHashes() + + return p +} + +func (p *PackageHash) CheckForChanges() bool { + codeHash, codeModifiedTime, testHash, testModifiedTime, deleted := p.computeHashes() + + if deleted { + if !p.Deleted { + t := time.Now() + p.CodeModifiedTime = t + p.TestModifiedTime = t + } + p.Deleted = true + return true + } + + modified := false + p.Deleted = false + + if p.codeHash != codeHash { + p.CodeModifiedTime = codeModifiedTime + modified = true + } + if p.testHash != testHash { + p.TestModifiedTime = testModifiedTime + modified = true + } + + p.codeHash = codeHash + p.testHash = testHash + return modified +} + +func (p *PackageHash) computeHashes() (codeHash string, codeModifiedTime time.Time, testHash string, testModifiedTime time.Time, deleted bool) { + entries, err := os.ReadDir(p.path) + + if err != nil { + deleted = true + return + } + + for _, entry := range entries { + if entry.IsDir() { + continue + } + + info, err := entry.Info() + if err != nil { + continue + } + + if isHiddenFile(info) { + continue + } + + if goTestRegExp.MatchString(info.Name()) { + testHash += p.hashForFileInfo(info) + if info.ModTime().After(testModifiedTime) { + testModifiedTime = info.ModTime() + } + continue + } + + if p.watchRegExp.MatchString(info.Name()) { + codeHash += p.hashForFileInfo(info) + if info.ModTime().After(codeModifiedTime) { + codeModifiedTime = info.ModTime() + } + } + } + + testHash += codeHash + if codeModifiedTime.After(testModifiedTime) { + testModifiedTime = codeModifiedTime + } + + return +} + +func isHiddenFile(info os.FileInfo) bool { + return strings.HasPrefix(info.Name(), ".") || strings.HasPrefix(info.Name(), "_") +} + +func (p *PackageHash) hashForFileInfo(info os.FileInfo) string { + return fmt.Sprintf("%s_%d_%d", info.Name(), info.Size(), info.ModTime().UnixNano()) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hashes.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hashes.go new file mode 100644 index 000000000..b4892bebf --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hashes.go @@ -0,0 +1,85 @@ +package watch + +import ( + "path/filepath" + "regexp" + "sync" +) + +type PackageHashes struct { + PackageHashes map[string]*PackageHash + usedPaths map[string]bool + watchRegExp *regexp.Regexp + lock *sync.Mutex +} + +func NewPackageHashes(watchRegExp *regexp.Regexp) *PackageHashes { + return &PackageHashes{ + PackageHashes: map[string]*PackageHash{}, + usedPaths: nil, + watchRegExp: watchRegExp, + lock: &sync.Mutex{}, + } +} + +func (p *PackageHashes) CheckForChanges() []string { + p.lock.Lock() + defer p.lock.Unlock() + + modified := []string{} + + for _, packageHash := range p.PackageHashes { + if packageHash.CheckForChanges() { + modified = append(modified, packageHash.path) + } + } + + return modified +} + +func (p *PackageHashes) Add(path string) *PackageHash { + p.lock.Lock() + defer p.lock.Unlock() + + path, _ = filepath.Abs(path) + _, ok := p.PackageHashes[path] + if !ok { + p.PackageHashes[path] = NewPackageHash(path, p.watchRegExp) + } + + if p.usedPaths != nil { + p.usedPaths[path] = true + } + return p.PackageHashes[path] +} + +func (p *PackageHashes) Get(path string) *PackageHash { + p.lock.Lock() + defer p.lock.Unlock() + + path, _ = filepath.Abs(path) + if p.usedPaths != nil { + p.usedPaths[path] = true + } + return p.PackageHashes[path] +} + +func (p *PackageHashes) StartTrackingUsage() { + p.lock.Lock() + defer p.lock.Unlock() + + p.usedPaths = map[string]bool{} +} + +func (p *PackageHashes) StopTrackingUsageAndPrune() { + p.lock.Lock() + defer p.lock.Unlock() + + for path := range p.PackageHashes { + if !p.usedPaths[path] { + delete(p.PackageHashes, path) + } + } + + p.usedPaths = nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/suite.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/suite.go new file mode 100644 index 000000000..53272df7e --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/suite.go @@ -0,0 +1,87 @@ +package watch + +import ( + "fmt" + "math" + "time" + + "github.com/onsi/ginkgo/v2/ginkgo/internal" +) + +type Suite struct { + Suite internal.TestSuite + RunTime time.Time + Dependencies Dependencies + + sharedPackageHashes *PackageHashes +} + +func NewSuite(suite internal.TestSuite, maxDepth int, sharedPackageHashes *PackageHashes) (*Suite, error) { + deps, err := NewDependencies(suite.Path, maxDepth) + if err != nil { + return nil, err + } + + sharedPackageHashes.Add(suite.Path) + for dep := range deps.Dependencies() { + sharedPackageHashes.Add(dep) + } + + return &Suite{ + Suite: suite, + Dependencies: deps, + + sharedPackageHashes: sharedPackageHashes, + }, nil +} + +func (s *Suite) Delta() float64 { + delta := s.delta(s.Suite.Path, true, 0) * 1000 + for dep, depth := range s.Dependencies.Dependencies() { + delta += s.delta(dep, false, depth) + } + return delta +} + +func (s *Suite) MarkAsRunAndRecomputedDependencies(maxDepth int) error { + s.RunTime = time.Now() + + deps, err := NewDependencies(s.Suite.Path, maxDepth) + if err != nil { + return err + } + + s.sharedPackageHashes.Add(s.Suite.Path) + for dep := range deps.Dependencies() { + s.sharedPackageHashes.Add(dep) + } + + s.Dependencies = deps + + return nil +} + +func (s *Suite) Description() string { + numDeps := len(s.Dependencies.Dependencies()) + pluralizer := "ies" + if numDeps == 1 { + pluralizer = "y" + } + return fmt.Sprintf("%s [%d dependenc%s]", s.Suite.Path, numDeps, pluralizer) +} + +func (s *Suite) delta(packagePath string, includeTests bool, depth int) float64 { + return math.Max(float64(s.dt(packagePath, includeTests)), 0) / float64(depth+1) +} + +func (s *Suite) dt(packagePath string, includeTests bool) time.Duration { + packageHash := s.sharedPackageHashes.Get(packagePath) + var modifiedTime time.Time + if includeTests { + modifiedTime = packageHash.TestModifiedTime + } else { + modifiedTime = packageHash.CodeModifiedTime + } + + return modifiedTime.Sub(s.RunTime) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go new file mode 100644 index 000000000..bde4193ce --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go @@ -0,0 +1,192 @@ +package watch + +import ( + "fmt" + "regexp" + "time" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" + "github.com/onsi/ginkgo/v2/internal/interrupt_handler" + "github.com/onsi/ginkgo/v2/types" +) + +func BuildWatchCommand() command.Command { + var suiteConfig = types.NewDefaultSuiteConfig() + var reporterConfig = types.NewDefaultReporterConfig() + var cliConfig = types.NewDefaultCLIConfig() + var goFlagsConfig = types.NewDefaultGoFlagsConfig() + + flags, err := types.BuildWatchCommandFlagSet(&suiteConfig, &reporterConfig, &cliConfig, &goFlagsConfig) + if err != nil { + panic(err) + } + interruptHandler := interrupt_handler.NewInterruptHandler(nil) + interrupt_handler.SwallowSigQuit() + + return command.Command{ + Name: "watch", + Flags: flags, + Usage: "ginkgo watch -- ", + ShortDoc: "Watch the passed in and runs their tests whenever changes occur.", + Documentation: "Any arguments after -- will be passed to the test.", + DocLink: "watching-for-changes", + Command: func(args []string, additionalArgs []string) { + var errors []error + cliConfig, goFlagsConfig, errors = types.VetAndInitializeCLIAndGoConfig(cliConfig, goFlagsConfig) + command.AbortIfErrors("Ginkgo detected configuration issues:", errors) + + watcher := &SpecWatcher{ + cliConfig: cliConfig, + goFlagsConfig: goFlagsConfig, + suiteConfig: suiteConfig, + reporterConfig: reporterConfig, + flags: flags, + + interruptHandler: interruptHandler, + } + + watcher.WatchSpecs(args, additionalArgs) + }, + } +} + +type SpecWatcher struct { + suiteConfig types.SuiteConfig + reporterConfig types.ReporterConfig + cliConfig types.CLIConfig + goFlagsConfig types.GoFlagsConfig + flags types.GinkgoFlagSet + + interruptHandler *interrupt_handler.InterruptHandler +} + +func (w *SpecWatcher) WatchSpecs(args []string, additionalArgs []string) { + suites := internal.FindSuites(args, w.cliConfig, false).WithoutState(internal.TestSuiteStateSkippedByFilter) + + internal.VerifyCLIAndFrameworkVersion(suites) + + if len(suites) == 0 { + command.AbortWith("Found no test suites") + } + + fmt.Printf("Identified %d test %s. Locating dependencies to a depth of %d (this may take a while)...\n", len(suites), internal.PluralizedWord("suite", "suites", len(suites)), w.cliConfig.Depth) + deltaTracker := NewDeltaTracker(w.cliConfig.Depth, regexp.MustCompile(w.cliConfig.WatchRegExp)) + delta, errors := deltaTracker.Delta(suites) + + fmt.Printf("Watching %d %s:\n", len(delta.NewSuites), internal.PluralizedWord("suite", "suites", len(delta.NewSuites))) + for _, suite := range delta.NewSuites { + fmt.Println(" " + suite.Description()) + } + + for suite, err := range errors { + fmt.Printf("Failed to watch %s: %s\n", suite.PackageName, err) + } + + if len(suites) == 1 { + w.updateSeed() + w.compileAndRun(suites[0], additionalArgs) + } + + ticker := time.NewTicker(time.Second) + + for { + select { + case <-ticker.C: + suites := internal.FindSuites(args, w.cliConfig, false).WithoutState(internal.TestSuiteStateSkippedByFilter) + delta, _ := deltaTracker.Delta(suites) + coloredStream := formatter.ColorableStdOut + + suites = internal.TestSuites{} + + if len(delta.NewSuites) > 0 { + fmt.Fprintln(coloredStream, formatter.F("{{green}}Detected %d new %s:{{/}}", len(delta.NewSuites), internal.PluralizedWord("suite", "suites", len(delta.NewSuites)))) + for _, suite := range delta.NewSuites { + suites = append(suites, suite.Suite) + fmt.Fprintln(coloredStream, formatter.Fi(1, "%s", suite.Description())) + } + } + + modifiedSuites := delta.ModifiedSuites() + if len(modifiedSuites) > 0 { + fmt.Fprintln(coloredStream, formatter.F("{{green}}Detected changes in:{{/}}")) + for _, pkg := range delta.ModifiedPackages { + fmt.Fprintln(coloredStream, formatter.Fi(1, "%s", pkg)) + } + fmt.Fprintln(coloredStream, formatter.F("{{green}}Will run %d %s:{{/}}", len(modifiedSuites), internal.PluralizedWord("suite", "suites", len(modifiedSuites)))) + for _, suite := range modifiedSuites { + suites = append(suites, suite.Suite) + fmt.Fprintln(coloredStream, formatter.Fi(1, "%s", suite.Description())) + } + fmt.Fprintln(coloredStream, "") + } + + if len(suites) == 0 { + break + } + + w.updateSeed() + w.computeSuccinctMode(len(suites)) + for idx := range suites { + if w.interruptHandler.Status().Interrupted() { + return + } + deltaTracker.WillRun(suites[idx]) + suites[idx] = w.compileAndRun(suites[idx], additionalArgs) + } + color := "{{green}}" + if suites.CountWithState(internal.TestSuiteStateFailureStates...) > 0 { + color = "{{red}}" + } + fmt.Fprintln(coloredStream, formatter.F(color+"\nDone. Resuming watch...{{/}}")) + + messages, err := internal.FinalizeProfilesAndReportsForSuites(suites, w.cliConfig, w.suiteConfig, w.reporterConfig, w.goFlagsConfig) + command.AbortIfError("could not finalize profiles:", err) + for _, message := range messages { + fmt.Println(message) + } + case <-w.interruptHandler.Status().Channel: + return + } + } +} + +func (w *SpecWatcher) compileAndRun(suite internal.TestSuite, additionalArgs []string) internal.TestSuite { + suite = internal.CompileSuite(suite, w.goFlagsConfig) + if suite.State.Is(internal.TestSuiteStateFailedToCompile) { + fmt.Println(suite.CompilationError.Error()) + return suite + } + if w.interruptHandler.Status().Interrupted() { + return suite + } + suite = internal.RunCompiledSuite(suite, w.suiteConfig, w.reporterConfig, w.cliConfig, w.goFlagsConfig, additionalArgs) + internal.Cleanup(w.goFlagsConfig, suite) + return suite +} + +func (w *SpecWatcher) computeSuccinctMode(numSuites int) { + if w.reporterConfig.Verbosity().GTE(types.VerbosityLevelVerbose) { + w.reporterConfig.Succinct = false + return + } + + if w.flags.WasSet("succinct") { + return + } + + if numSuites == 1 { + w.reporterConfig.Succinct = false + } + + if numSuites > 1 { + w.reporterConfig.Succinct = true + } +} + +func (w *SpecWatcher) updateSeed() { + if !w.flags.WasSet("seed") { + w.suiteConfig.RandomSeed = time.Now().Unix() + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go new file mode 100644 index 000000000..85162720f --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go @@ -0,0 +1,8 @@ +//go:build ginkgoclidependencies +// +build ginkgoclidependencies + +package ginkgo + +import ( + _ "github.com/onsi/ginkgo/v2/ginkgo" +) diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go new file mode 100644 index 000000000..02c6739e5 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go @@ -0,0 +1,180 @@ +package ginkgo + +import ( + "testing" + + "github.com/onsi/ginkgo/v2/internal/testingtproxy" + "github.com/onsi/ginkgo/v2/types" +) + +/* +GinkgoT() implements an interface that allows third party libraries to integrate with and build on top of Ginkgo. + +GinkgoT() is analogous to *testing.T and implements the majority of *testing.T's methods. It can be typically be used a a drop-in replacement with third-party libraries that accept *testing.T through an interface. + +GinkgoT() takes an optional offset argument that can be used to get the +correct line number associated with the failure - though you do not need to use this if you call GinkgoHelper() or GinkgoT().Helper() appropriately + +GinkgoT() attempts to mimic the behavior of `testing.T` with the exception of the following: + +- Error/Errorf: failures in Ginkgo always immediately stop execution and there is no mechanism to log a failure without aborting the test. As such Error/Errorf are equivalent to Fatal/Fatalf. +- Parallel() is a no-op as Ginkgo's multi-process parallelism model is substantially different from go test's in-process model. + +You can learn more here: https://onsi.github.io/ginkgo/#using-third-party-libraries +*/ +func GinkgoT(optionalOffset ...int) FullGinkgoTInterface { + offset := 1 + if len(optionalOffset) > 0 { + offset = optionalOffset[0] + } + return testingtproxy.New( + GinkgoWriter, + Fail, + Skip, + DeferCleanup, + CurrentSpecReport, + AddReportEntry, + GinkgoRecover, + AttachProgressReporter, + suiteConfig.RandomSeed, + suiteConfig.ParallelProcess, + suiteConfig.ParallelTotal, + reporterConfig.NoColor, + offset) +} + +/* +The portion of the interface returned by GinkgoT() that maps onto methods in the testing package's T. +*/ +type GinkgoTInterface interface { + Cleanup(func()) + Setenv(kev, value string) + Error(args ...any) + Errorf(format string, args ...any) + Fail() + FailNow() + Failed() bool + Fatal(args ...any) + Fatalf(format string, args ...any) + Helper() + Log(args ...any) + Logf(format string, args ...any) + Name() string + Parallel() + Skip(args ...any) + SkipNow() + Skipf(format string, args ...any) + Skipped() bool + TempDir() string +} + +/* +Additional methods returned by GinkgoT() that provide deeper integration points into Ginkgo +*/ +type FullGinkgoTInterface interface { + GinkgoTInterface + + AddReportEntryVisibilityAlways(name string, args ...any) + AddReportEntryVisibilityFailureOrVerbose(name string, args ...any) + AddReportEntryVisibilityNever(name string, args ...any) + + //Prints to the GinkgoWriter + Print(a ...any) + Printf(format string, a ...any) + Println(a ...any) + + //Provides access to Ginkgo's color formatting, correctly configured to match the color settings specified in the invocation of ginkgo + F(format string, args ...any) string + Fi(indentation uint, format string, args ...any) string + Fiw(indentation uint, maxWidth uint, format string, args ...any) string + + //Generates a formatted string version of the current spec's timeline + RenderTimeline() string + + GinkgoRecover() + DeferCleanup(args ...any) + + RandomSeed() int64 + ParallelProcess() int + ParallelTotal() int + + AttachProgressReporter(func() string) func() +} + +/* +GinkgoTB() implements a wrapper that exactly matches the testing.TB interface. + +In go 1.18 a new private() function was added to the testing.TB interface. Any function which accepts testing.TB as input needs to be passed in something that directly implements testing.TB. + +This wrapper satisfies the testing.TB interface and intended to be used as a drop-in replacement with third party libraries that accept testing.TB. + +Similar to GinkgoT(), GinkgoTB() takes an optional offset argument that can be used to get the +correct line number associated with the failure - though you do not need to use this if you call GinkgoHelper() or GinkgoT().Helper() appropriately +*/ +func GinkgoTB(optionalOffset ...int) *GinkgoTBWrapper { + offset := 2 + if len(optionalOffset) > 0 { + offset = optionalOffset[0] + } + return &GinkgoTBWrapper{GinkgoT: GinkgoT(offset)} +} + +type GinkgoTBWrapper struct { + testing.TB + GinkgoT FullGinkgoTInterface +} + +func (g *GinkgoTBWrapper) Cleanup(f func()) { + g.GinkgoT.Cleanup(f) +} +func (g *GinkgoTBWrapper) Error(args ...any) { + g.GinkgoT.Error(args...) +} +func (g *GinkgoTBWrapper) Errorf(format string, args ...any) { + g.GinkgoT.Errorf(format, args...) +} +func (g *GinkgoTBWrapper) Fail() { + g.GinkgoT.Fail() +} +func (g *GinkgoTBWrapper) FailNow() { + g.GinkgoT.FailNow() +} +func (g *GinkgoTBWrapper) Failed() bool { + return g.GinkgoT.Failed() +} +func (g *GinkgoTBWrapper) Fatal(args ...any) { + g.GinkgoT.Fatal(args...) +} +func (g *GinkgoTBWrapper) Fatalf(format string, args ...any) { + g.GinkgoT.Fatalf(format, args...) +} +func (g *GinkgoTBWrapper) Helper() { + types.MarkAsHelper(1) +} +func (g *GinkgoTBWrapper) Log(args ...any) { + g.GinkgoT.Log(args...) +} +func (g *GinkgoTBWrapper) Logf(format string, args ...any) { + g.GinkgoT.Logf(format, args...) +} +func (g *GinkgoTBWrapper) Name() string { + return g.GinkgoT.Name() +} +func (g *GinkgoTBWrapper) Setenv(key, value string) { + g.GinkgoT.Setenv(key, value) +} +func (g *GinkgoTBWrapper) Skip(args ...any) { + g.GinkgoT.Skip(args...) +} +func (g *GinkgoTBWrapper) SkipNow() { + g.GinkgoT.SkipNow() +} +func (g *GinkgoTBWrapper) Skipf(format string, args ...any) { + g.GinkgoT.Skipf(format, args...) +} +func (g *GinkgoTBWrapper) Skipped() bool { + return g.GinkgoT.Skipped() +} +func (g *GinkgoTBWrapper) TempDir() string { + return g.GinkgoT.TempDir() +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/counter.go b/vendor/github.com/onsi/ginkgo/v2/internal/counter.go new file mode 100644 index 000000000..712d85afb --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/counter.go @@ -0,0 +1,9 @@ +package internal + +func MakeIncrementingIndexCounter() func() (int, error) { + idx := -1 + return func() (int, error) { + idx += 1 + return idx, nil + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/failer.go b/vendor/github.com/onsi/ginkgo/v2/internal/failer.go new file mode 100644 index 000000000..e9bd9565f --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/failer.go @@ -0,0 +1,99 @@ +package internal + +import ( + "fmt" + "sync" + + "github.com/onsi/ginkgo/v2/types" +) + +type Failer struct { + lock *sync.Mutex + failure types.Failure + state types.SpecState +} + +func NewFailer() *Failer { + return &Failer{ + lock: &sync.Mutex{}, + state: types.SpecStatePassed, + } +} + +func (f *Failer) GetState() types.SpecState { + f.lock.Lock() + defer f.lock.Unlock() + return f.state +} + +func (f *Failer) GetFailure() types.Failure { + f.lock.Lock() + defer f.lock.Unlock() + return f.failure +} + +func (f *Failer) Panic(location types.CodeLocation, forwardedPanic interface{}) { + f.lock.Lock() + defer f.lock.Unlock() + + if f.state == types.SpecStatePassed { + f.state = types.SpecStatePanicked + f.failure = types.Failure{ + Message: "Test Panicked", + Location: location, + ForwardedPanic: fmt.Sprintf("%v", forwardedPanic), + } + } +} + +func (f *Failer) Fail(message string, location types.CodeLocation) { + f.lock.Lock() + defer f.lock.Unlock() + + if f.state == types.SpecStatePassed { + f.state = types.SpecStateFailed + f.failure = types.Failure{ + Message: message, + Location: location, + } + } +} + +func (f *Failer) Skip(message string, location types.CodeLocation) { + f.lock.Lock() + defer f.lock.Unlock() + + if f.state == types.SpecStatePassed { + f.state = types.SpecStateSkipped + f.failure = types.Failure{ + Message: message, + Location: location, + } + } +} + +func (f *Failer) AbortSuite(message string, location types.CodeLocation) { + f.lock.Lock() + defer f.lock.Unlock() + + if f.state == types.SpecStatePassed { + f.state = types.SpecStateAborted + f.failure = types.Failure{ + Message: message, + Location: location, + } + } +} + +func (f *Failer) Drain() (types.SpecState, types.Failure) { + f.lock.Lock() + defer f.lock.Unlock() + + failure := f.failure + outcome := f.state + + f.state = types.SpecStatePassed + f.failure = types.Failure{} + + return outcome, failure +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/focus.go b/vendor/github.com/onsi/ginkgo/v2/internal/focus.go new file mode 100644 index 000000000..e3da7d14d --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/focus.go @@ -0,0 +1,122 @@ +package internal + +import ( + "regexp" + "strings" + + "github.com/onsi/ginkgo/v2/types" +) + +/* +If a container marked as focus has a descendant that is also marked as focus, Ginkgo's policy is to +unmark the container's focus. This gives developers a more intuitive experience when debugging specs. +It is common to focus a container to just run a subset of specs, then identify the specific specs within the container to focus - +this policy allows the developer to simply focus those specific specs and not need to go back and turn the focus off of the container: + +As a common example, consider: + + FDescribe("something to debug", function() { + It("works", function() {...}) + It("works", function() {...}) + FIt("doesn't work", function() {...}) + It("works", function() {...}) + }) + +here the developer's intent is to focus in on the `"doesn't work"` spec and not to run the adjacent specs in the focused `"something to debug"` container. +The nested policy applied by this function enables this behavior. +*/ +func ApplyNestedFocusPolicyToTree(tree *TreeNode) { + var walkTree func(tree *TreeNode) bool + walkTree = func(tree *TreeNode) bool { + if tree.Node.MarkedPending { + return false + } + hasFocusedDescendant := false + for _, child := range tree.Children { + childHasFocus := walkTree(child) + hasFocusedDescendant = hasFocusedDescendant || childHasFocus + } + tree.Node.MarkedFocus = tree.Node.MarkedFocus && !hasFocusedDescendant + return tree.Node.MarkedFocus || hasFocusedDescendant + } + + walkTree(tree) +} + +/* +Ginkgo supports focussing specs using `FIt`, `FDescribe`, etc. - this is called "programmatic focus" +It also supports focussing specs using regular expressions on the command line (`-focus=`, `-skip=`) that match against spec text and file filters (`-focus-files=`, `-skip-files=`) that match against code locations for nodes in specs. + +When both programmatic and file filters are provided their results are ANDed together. If multiple kinds of filters are provided, the file filters run first followed by the regex filters. + +This function sets the `Skip` property on specs by applying Ginkgo's focus policy: +- If there are no CLI arguments and no programmatic focus, do nothing. +- If a spec somewhere has programmatic focus skip any specs that have no programmatic focus. +- If there are CLI arguments parse them and skip any specs that either don't match the focus filters or do match the skip filters. + +*Note:* specs with pending nodes are Skipped when created by NewSpec. +*/ +func ApplyFocusToSpecs(specs Specs, description string, suiteLabels Labels, suiteConfig types.SuiteConfig) (Specs, bool) { + focusString := strings.Join(suiteConfig.FocusStrings, "|") + skipString := strings.Join(suiteConfig.SkipStrings, "|") + + type SkipCheck func(spec Spec) bool + + // by default, skip any specs marked pending + skipChecks := []SkipCheck{func(spec Spec) bool { return spec.Nodes.HasNodeMarkedPending() }} + hasProgrammaticFocus := false + + for _, spec := range specs { + if spec.Nodes.HasNodeMarkedFocus() && !spec.Nodes.HasNodeMarkedPending() { + hasProgrammaticFocus = true + break + } + } + + if hasProgrammaticFocus { + skipChecks = append(skipChecks, func(spec Spec) bool { return !spec.Nodes.HasNodeMarkedFocus() }) + } + + if suiteConfig.LabelFilter != "" { + labelFilter, _ := types.ParseLabelFilter(suiteConfig.LabelFilter) + skipChecks = append(skipChecks, func(spec Spec) bool { + return !labelFilter(UnionOfLabels(suiteLabels, spec.Nodes.UnionOfLabels())) + }) + } + + if len(suiteConfig.FocusFiles) > 0 { + focusFilters, _ := types.ParseFileFilters(suiteConfig.FocusFiles) + skipChecks = append(skipChecks, func(spec Spec) bool { return !focusFilters.Matches(spec.Nodes.CodeLocations()) }) + } + + if len(suiteConfig.SkipFiles) > 0 { + skipFilters, _ := types.ParseFileFilters(suiteConfig.SkipFiles) + skipChecks = append(skipChecks, func(spec Spec) bool { return skipFilters.Matches(spec.Nodes.CodeLocations()) }) + } + + if focusString != "" { + // skip specs that don't match the focus string + re := regexp.MustCompile(focusString) + skipChecks = append(skipChecks, func(spec Spec) bool { return !re.MatchString(description + " " + spec.Text()) }) + } + + if skipString != "" { + // skip specs that match the skip string + re := regexp.MustCompile(skipString) + skipChecks = append(skipChecks, func(spec Spec) bool { return re.MatchString(description + " " + spec.Text()) }) + } + + // skip specs if shouldSkip() is true. note that we do nothing if shouldSkip() is false to avoid overwriting skip status established by the node's pending status + processedSpecs := Specs{} + for _, spec := range specs { + for _, skipCheck := range skipChecks { + if skipCheck(spec) { + spec.Skip = true + break + } + } + processedSpecs = append(processedSpecs, spec) + } + + return processedSpecs, hasProgrammaticFocus +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go b/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go new file mode 100644 index 000000000..464e3c97f --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go @@ -0,0 +1,28 @@ +package global + +import ( + "github.com/onsi/ginkgo/v2/internal" +) + +var Suite *internal.Suite +var Failer *internal.Failer +var backupSuite *internal.Suite + +func init() { + InitializeGlobals() +} + +func InitializeGlobals() { + Failer = internal.NewFailer() + Suite = internal.NewSuite() +} + +func PushClone() error { + var err error + backupSuite, err = Suite.Clone() + return err +} + +func PopClone() { + Suite = backupSuite +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/group.go b/vendor/github.com/onsi/ginkgo/v2/internal/group.go new file mode 100644 index 000000000..02c9fe4fc --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/group.go @@ -0,0 +1,383 @@ +package internal + +import ( + "fmt" + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +type runOncePair struct { + //nodeId should only run once... + nodeID uint + nodeType types.NodeType + //...for specs in a hierarchy that includes this context + containerID uint +} + +func (pair runOncePair) isZero() bool { + return pair.nodeID == 0 +} + +func runOncePairForNode(node Node, containerID uint) runOncePair { + return runOncePair{ + nodeID: node.ID, + nodeType: node.NodeType, + containerID: containerID, + } +} + +type runOncePairs []runOncePair + +func runOncePairsForSpec(spec Spec) runOncePairs { + pairs := runOncePairs{} + + containers := spec.Nodes.WithType(types.NodeTypeContainer) + for _, node := range spec.Nodes { + if node.NodeType.Is(types.NodeTypeBeforeAll | types.NodeTypeAfterAll) { + pairs = append(pairs, runOncePairForNode(node, containers.FirstWithNestingLevel(node.NestingLevel-1).ID)) + } else if node.NodeType.Is(types.NodeTypeBeforeEach|types.NodeTypeJustBeforeEach|types.NodeTypeAfterEach|types.NodeTypeJustAfterEach) && node.MarkedOncePerOrdered { + passedIntoAnOrderedContainer := false + firstOrderedContainerDeeperThanNode := containers.FirstSatisfying(func(container Node) bool { + passedIntoAnOrderedContainer = passedIntoAnOrderedContainer || container.MarkedOrdered + return container.NestingLevel >= node.NestingLevel && passedIntoAnOrderedContainer + }) + if firstOrderedContainerDeeperThanNode.IsZero() { + continue + } + pairs = append(pairs, runOncePairForNode(node, firstOrderedContainerDeeperThanNode.ID)) + } + } + + return pairs +} + +func (pairs runOncePairs) runOncePairFor(nodeID uint) runOncePair { + for i := range pairs { + if pairs[i].nodeID == nodeID { + return pairs[i] + } + } + return runOncePair{} +} + +func (pairs runOncePairs) hasRunOncePair(pair runOncePair) bool { + for i := range pairs { + if pairs[i] == pair { + return true + } + } + return false +} + +func (pairs runOncePairs) withType(nodeTypes types.NodeType) runOncePairs { + count := 0 + for i := range pairs { + if pairs[i].nodeType.Is(nodeTypes) { + count++ + } + } + + out, j := make(runOncePairs, count), 0 + for i := range pairs { + if pairs[i].nodeType.Is(nodeTypes) { + out[j] = pairs[i] + j++ + } + } + return out +} + +type group struct { + suite *Suite + specs Specs + runOncePairs map[uint]runOncePairs + runOnceTracker map[runOncePair]types.SpecState + + succeeded bool + failedInARunOnceBefore bool + continueOnFailure bool +} + +func newGroup(suite *Suite) *group { + return &group{ + suite: suite, + runOncePairs: map[uint]runOncePairs{}, + runOnceTracker: map[runOncePair]types.SpecState{}, + succeeded: true, + failedInARunOnceBefore: false, + continueOnFailure: false, + } +} + +func (g *group) initialReportForSpec(spec Spec) types.SpecReport { + return types.SpecReport{ + ContainerHierarchyTexts: spec.Nodes.WithType(types.NodeTypeContainer).Texts(), + ContainerHierarchyLocations: spec.Nodes.WithType(types.NodeTypeContainer).CodeLocations(), + ContainerHierarchyLabels: spec.Nodes.WithType(types.NodeTypeContainer).Labels(), + LeafNodeLocation: spec.FirstNodeWithType(types.NodeTypeIt).CodeLocation, + LeafNodeType: types.NodeTypeIt, + LeafNodeText: spec.FirstNodeWithType(types.NodeTypeIt).Text, + LeafNodeLabels: []string(spec.FirstNodeWithType(types.NodeTypeIt).Labels), + ParallelProcess: g.suite.config.ParallelProcess, + RunningInParallel: g.suite.isRunningInParallel(), + IsSerial: spec.Nodes.HasNodeMarkedSerial(), + IsInOrderedContainer: !spec.Nodes.FirstNodeMarkedOrdered().IsZero(), + MaxFlakeAttempts: spec.Nodes.GetMaxFlakeAttempts(), + MaxMustPassRepeatedly: spec.Nodes.GetMaxMustPassRepeatedly(), + } +} + +func (g *group) evaluateSkipStatus(spec Spec) (types.SpecState, types.Failure) { + if spec.Nodes.HasNodeMarkedPending() { + return types.SpecStatePending, types.Failure{} + } + if spec.Skip { + return types.SpecStateSkipped, types.Failure{} + } + if g.suite.interruptHandler.Status().Interrupted() || g.suite.skipAll { + return types.SpecStateSkipped, types.Failure{} + } + if !g.suite.deadline.IsZero() && g.suite.deadline.Before(time.Now()) { + return types.SpecStateSkipped, types.Failure{} + } + if !g.succeeded && !g.continueOnFailure { + return types.SpecStateSkipped, g.suite.failureForLeafNodeWithMessage(spec.FirstNodeWithType(types.NodeTypeIt), + "Spec skipped because an earlier spec in an ordered container failed") + } + if g.failedInARunOnceBefore && g.continueOnFailure { + return types.SpecStateSkipped, g.suite.failureForLeafNodeWithMessage(spec.FirstNodeWithType(types.NodeTypeIt), + "Spec skipped because a BeforeAll node failed") + } + beforeOncePairs := g.runOncePairs[spec.SubjectID()].withType(types.NodeTypeBeforeAll | types.NodeTypeBeforeEach | types.NodeTypeJustBeforeEach) + for _, pair := range beforeOncePairs { + if g.runOnceTracker[pair].Is(types.SpecStateSkipped) { + return types.SpecStateSkipped, g.suite.failureForLeafNodeWithMessage(spec.FirstNodeWithType(types.NodeTypeIt), + fmt.Sprintf("Spec skipped because Skip() was called in %s", pair.nodeType)) + } + } + if g.suite.config.DryRun { + return types.SpecStatePassed, types.Failure{} + } + return g.suite.currentSpecReport.State, g.suite.currentSpecReport.Failure +} + +func (g *group) isLastSpecWithPair(specID uint, pair runOncePair) bool { + lastSpecID := uint(0) + for idx := range g.specs { + if g.specs[idx].Skip { + continue + } + sID := g.specs[idx].SubjectID() + if g.runOncePairs[sID].hasRunOncePair(pair) { + lastSpecID = sID + } + } + return lastSpecID == specID +} + +func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { + failedInARunOnceBefore := false + pairs := g.runOncePairs[spec.SubjectID()] + + nodes := spec.Nodes.WithType(types.NodeTypeBeforeAll) + nodes = append(nodes, spec.Nodes.WithType(types.NodeTypeBeforeEach)...).SortedByAscendingNestingLevel() + nodes = append(nodes, spec.Nodes.WithType(types.NodeTypeJustBeforeEach).SortedByAscendingNestingLevel()...) + nodes = append(nodes, spec.Nodes.FirstNodeWithType(types.NodeTypeIt)) + terminatingNode, terminatingPair := Node{}, runOncePair{} + + deadline := time.Time{} + if spec.SpecTimeout() > 0 { + deadline = time.Now().Add(spec.SpecTimeout()) + } + + for _, node := range nodes { + oncePair := pairs.runOncePairFor(node.ID) + if !oncePair.isZero() && g.runOnceTracker[oncePair].Is(types.SpecStatePassed) { + continue + } + g.suite.currentSpecReport.State, g.suite.currentSpecReport.Failure = g.suite.runNode(node, deadline, spec.Nodes.BestTextFor(node)) + g.suite.currentSpecReport.RunTime = time.Since(g.suite.currentSpecReport.StartTime) + if !oncePair.isZero() { + g.runOnceTracker[oncePair] = g.suite.currentSpecReport.State + } + if g.suite.currentSpecReport.State != types.SpecStatePassed { + terminatingNode, terminatingPair = node, oncePair + failedInARunOnceBefore = !terminatingPair.isZero() + break + } + } + + afterNodeWasRun := map[uint]bool{} + includeDeferCleanups := false + for { + nodes := spec.Nodes.WithType(types.NodeTypeAfterEach) + nodes = append(nodes, spec.Nodes.WithType(types.NodeTypeAfterAll)...).SortedByDescendingNestingLevel() + nodes = append(spec.Nodes.WithType(types.NodeTypeJustAfterEach).SortedByDescendingNestingLevel(), nodes...) + if !terminatingNode.IsZero() { + nodes = nodes.WithinNestingLevel(terminatingNode.NestingLevel) + } + if includeDeferCleanups { + nodes = append(nodes, g.suite.cleanupNodes.WithType(types.NodeTypeCleanupAfterEach).Reverse()...) + nodes = append(nodes, g.suite.cleanupNodes.WithType(types.NodeTypeCleanupAfterAll).Reverse()...) + } + nodes = nodes.Filter(func(node Node) bool { + if afterNodeWasRun[node.ID] { + //this node has already been run on this attempt, don't rerun it + return false + } + var pair runOncePair + switch node.NodeType { + case types.NodeTypeCleanupAfterEach, types.NodeTypeCleanupAfterAll: + // check if we were generated in an AfterNode that has already run + if afterNodeWasRun[node.NodeIDWhereCleanupWasGenerated] { + return true // we were, so we should definitely run this cleanup now + } + // looks like this cleanup nodes was generated by a before node or it. + // the run-once status of a cleanup node is governed by the run-once status of its generator + pair = pairs.runOncePairFor(node.NodeIDWhereCleanupWasGenerated) + default: + pair = pairs.runOncePairFor(node.ID) + } + if pair.isZero() { + // this node is not governed by any run-once policy, we should run it + return true + } + // it's our last chance to run if we're the last spec for our oncePair + isLastSpecWithPair := g.isLastSpecWithPair(spec.SubjectID(), pair) + + switch g.suite.currentSpecReport.State { + case types.SpecStatePassed: //this attempt is passing... + return isLastSpecWithPair //...we should run-once if we'this is our last chance + case types.SpecStateSkipped: //the spec was skipped by the user... + if isLastSpecWithPair { + return true //...we're the last spec, so we should run the AfterNode + } + if !terminatingPair.isZero() && terminatingNode.NestingLevel == node.NestingLevel { + return true //...or, a run-once node at our nesting level was skipped which means this is our last chance to run + } + case types.SpecStateFailed, types.SpecStatePanicked, types.SpecStateTimedout: // the spec has failed... + if isFinalAttempt { + if g.continueOnFailure { + return isLastSpecWithPair || failedInARunOnceBefore //...we're configured to continue on failures - so we should only run if we're the last spec for this pair or if we failed in a runOnceBefore (which means we _are_ the last spec to run) + } else { + return true //...this was the last attempt and continueOnFailure is false therefore we are the last spec to run and so the AfterNode should run + } + } + if !terminatingPair.isZero() { // ...and it failed in a run-once. which will be running again + if node.NodeType.Is(types.NodeTypeCleanupAfterEach | types.NodeTypeCleanupAfterAll) { + return terminatingNode.ID == node.NodeIDWhereCleanupWasGenerated // we should run this node if we're a clean-up generated by it + } else { + return terminatingNode.NestingLevel == node.NestingLevel // ...or if we're at the same nesting level + } + } + case types.SpecStateInterrupted, types.SpecStateAborted: // ...we've been interrupted and/or aborted + return true //...that means the test run is over and we should clean up the stack. Run the AfterNode + } + return false + }) + + if len(nodes) == 0 && includeDeferCleanups { + break + } + + for _, node := range nodes { + afterNodeWasRun[node.ID] = true + state, failure := g.suite.runNode(node, deadline, spec.Nodes.BestTextFor(node)) + g.suite.currentSpecReport.RunTime = time.Since(g.suite.currentSpecReport.StartTime) + if g.suite.currentSpecReport.State == types.SpecStatePassed || state == types.SpecStateAborted { + g.suite.currentSpecReport.State = state + g.suite.currentSpecReport.Failure = failure + } else if state.Is(types.SpecStateFailureStates) { + g.suite.currentSpecReport.AdditionalFailures = append(g.suite.currentSpecReport.AdditionalFailures, types.AdditionalFailure{State: state, Failure: failure}) + } + } + includeDeferCleanups = true + } + + return failedInARunOnceBefore +} + +func (g *group) run(specs Specs) { + g.specs = specs + g.continueOnFailure = specs[0].Nodes.FirstNodeMarkedOrdered().MarkedContinueOnFailure + for _, spec := range g.specs { + g.runOncePairs[spec.SubjectID()] = runOncePairsForSpec(spec) + } + + for _, spec := range g.specs { + g.suite.selectiveLock.Lock() + g.suite.currentSpecReport = g.initialReportForSpec(spec) + g.suite.selectiveLock.Unlock() + + g.suite.currentSpecReport.State, g.suite.currentSpecReport.Failure = g.evaluateSkipStatus(spec) + g.suite.reporter.WillRun(g.suite.currentSpecReport) + g.suite.reportEach(spec, types.NodeTypeReportBeforeEach) + + skip := g.suite.config.DryRun || g.suite.currentSpecReport.State.Is(types.SpecStateFailureStates|types.SpecStateSkipped|types.SpecStatePending) + + g.suite.currentSpecReport.StartTime = time.Now() + failedInARunOnceBefore := false + if !skip { + var maxAttempts = 1 + + if g.suite.config.MustPassRepeatedly > 0 { + maxAttempts = g.suite.config.MustPassRepeatedly + g.suite.currentSpecReport.MaxMustPassRepeatedly = maxAttempts + } else if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 { + maxAttempts = max(1, spec.MustPassRepeatedly()) + } else if g.suite.config.FlakeAttempts > 0 { + maxAttempts = g.suite.config.FlakeAttempts + g.suite.currentSpecReport.MaxFlakeAttempts = maxAttempts + } else if g.suite.currentSpecReport.MaxFlakeAttempts > 0 { + maxAttempts = max(1, spec.FlakeAttempts()) + } + + for attempt := 0; attempt < maxAttempts; attempt++ { + g.suite.currentSpecReport.NumAttempts = attempt + 1 + g.suite.writer.Truncate() + g.suite.outputInterceptor.StartInterceptingOutput() + if attempt > 0 { + if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 { + g.suite.handleSpecEvent(types.SpecEvent{SpecEventType: types.SpecEventSpecRepeat, Attempt: attempt}) + } + if g.suite.currentSpecReport.MaxFlakeAttempts > 0 { + g.suite.handleSpecEvent(types.SpecEvent{SpecEventType: types.SpecEventSpecRetry, Attempt: attempt}) + } + } + + failedInARunOnceBefore = g.attemptSpec(attempt == maxAttempts-1, spec) + + g.suite.currentSpecReport.EndTime = time.Now() + g.suite.currentSpecReport.RunTime = g.suite.currentSpecReport.EndTime.Sub(g.suite.currentSpecReport.StartTime) + g.suite.currentSpecReport.CapturedGinkgoWriterOutput += string(g.suite.writer.Bytes()) + g.suite.currentSpecReport.CapturedStdOutErr += g.suite.outputInterceptor.StopInterceptingAndReturnOutput() + + if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 { + if g.suite.currentSpecReport.State.Is(types.SpecStateFailureStates | types.SpecStateSkipped) { + break + } + } + if g.suite.currentSpecReport.MaxFlakeAttempts > 0 { + if g.suite.currentSpecReport.State.Is(types.SpecStatePassed | types.SpecStateSkipped | types.SpecStateAborted | types.SpecStateInterrupted) { + break + } else if attempt < maxAttempts-1 { + af := types.AdditionalFailure{State: g.suite.currentSpecReport.State, Failure: g.suite.currentSpecReport.Failure} + af.Failure.Message = fmt.Sprintf("Failure recorded during attempt %d:\n%s", attempt+1, af.Failure.Message) + g.suite.currentSpecReport.AdditionalFailures = append(g.suite.currentSpecReport.AdditionalFailures, af) + } + } + } + } + + g.suite.reportEach(spec, types.NodeTypeReportAfterEach) + g.suite.processCurrentSpecReport() + if g.suite.currentSpecReport.State.Is(types.SpecStateFailureStates) { + g.succeeded = false + g.failedInARunOnceBefore = g.failedInARunOnceBefore || failedInARunOnceBefore + } + g.suite.selectiveLock.Lock() + g.suite.currentSpecReport = types.SpecReport{} + g.suite.selectiveLock.Unlock() + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go b/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go new file mode 100644 index 000000000..8ed86111f --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go @@ -0,0 +1,177 @@ +package interrupt_handler + +import ( + "os" + "os/signal" + "sync" + "syscall" + "time" + + "github.com/onsi/ginkgo/v2/internal/parallel_support" +) + +var ABORT_POLLING_INTERVAL = 500 * time.Millisecond + +type InterruptCause uint + +const ( + InterruptCauseInvalid InterruptCause = iota + InterruptCauseSignal + InterruptCauseAbortByOtherProcess +) + +type InterruptLevel uint + +const ( + InterruptLevelUninterrupted InterruptLevel = iota + InterruptLevelCleanupAndReport + InterruptLevelReportOnly + InterruptLevelBailOut +) + +func (ic InterruptCause) String() string { + switch ic { + case InterruptCauseSignal: + return "Interrupted by User" + case InterruptCauseAbortByOtherProcess: + return "Interrupted by Other Ginkgo Process" + } + return "INVALID_INTERRUPT_CAUSE" +} + +type InterruptStatus struct { + Channel chan interface{} + Level InterruptLevel + Cause InterruptCause +} + +func (s InterruptStatus) Interrupted() bool { + return s.Level != InterruptLevelUninterrupted +} + +func (s InterruptStatus) Message() string { + return s.Cause.String() +} + +func (s InterruptStatus) ShouldIncludeProgressReport() bool { + return s.Cause != InterruptCauseAbortByOtherProcess +} + +type InterruptHandlerInterface interface { + Status() InterruptStatus +} + +type InterruptHandler struct { + c chan interface{} + lock *sync.Mutex + level InterruptLevel + cause InterruptCause + client parallel_support.Client + stop chan interface{} + signals []os.Signal + requestAbortCheck chan interface{} +} + +func NewInterruptHandler(client parallel_support.Client, signals ...os.Signal) *InterruptHandler { + if len(signals) == 0 { + signals = []os.Signal{os.Interrupt, syscall.SIGTERM} + } + handler := &InterruptHandler{ + c: make(chan interface{}), + lock: &sync.Mutex{}, + stop: make(chan interface{}), + requestAbortCheck: make(chan interface{}), + client: client, + signals: signals, + } + handler.registerForInterrupts() + return handler +} + +func (handler *InterruptHandler) Stop() { + close(handler.stop) +} + +func (handler *InterruptHandler) registerForInterrupts() { + // os signal handling + signalChannel := make(chan os.Signal, 1) + signal.Notify(signalChannel, handler.signals...) + + // cross-process abort handling + var abortChannel chan interface{} + if handler.client != nil { + abortChannel = make(chan interface{}) + go func() { + pollTicker := time.NewTicker(ABORT_POLLING_INTERVAL) + for { + select { + case <-pollTicker.C: + if handler.client.ShouldAbort() { + close(abortChannel) + pollTicker.Stop() + return + } + case <-handler.requestAbortCheck: + if handler.client.ShouldAbort() { + close(abortChannel) + pollTicker.Stop() + return + } + case <-handler.stop: + pollTicker.Stop() + return + } + } + }() + } + + go func(abortChannel chan interface{}) { + var interruptCause InterruptCause + for { + select { + case <-signalChannel: + interruptCause = InterruptCauseSignal + case <-abortChannel: + interruptCause = InterruptCauseAbortByOtherProcess + case <-handler.stop: + signal.Stop(signalChannel) + return + } + abortChannel = nil + + handler.lock.Lock() + oldLevel := handler.level + handler.cause = interruptCause + if handler.level == InterruptLevelUninterrupted { + handler.level = InterruptLevelCleanupAndReport + } else if handler.level == InterruptLevelCleanupAndReport { + handler.level = InterruptLevelReportOnly + } else if handler.level == InterruptLevelReportOnly { + handler.level = InterruptLevelBailOut + } + if handler.level != oldLevel { + close(handler.c) + handler.c = make(chan interface{}) + } + handler.lock.Unlock() + } + }(abortChannel) +} + +func (handler *InterruptHandler) Status() InterruptStatus { + handler.lock.Lock() + status := InterruptStatus{ + Level: handler.level, + Channel: handler.c, + Cause: handler.cause, + } + handler.lock.Unlock() + + if handler.client != nil && handler.client.ShouldAbort() && !status.Interrupted() { + close(handler.requestAbortCheck) + <-status.Channel + return handler.Status() + } + + return status +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_unix.go b/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_unix.go new file mode 100644 index 000000000..bf0de496d --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_unix.go @@ -0,0 +1,15 @@ +//go:build freebsd || openbsd || netbsd || dragonfly || darwin || linux || solaris +// +build freebsd openbsd netbsd dragonfly darwin linux solaris + +package interrupt_handler + +import ( + "os" + "os/signal" + "syscall" +) + +func SwallowSigQuit() { + c := make(chan os.Signal, 1024) + signal.Notify(c, syscall.SIGQUIT) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_windows.go b/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_windows.go new file mode 100644 index 000000000..fcf8da833 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_windows.go @@ -0,0 +1,8 @@ +//go:build windows +// +build windows + +package interrupt_handler + +func SwallowSigQuit() { + //noop +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/node.go b/vendor/github.com/onsi/ginkgo/v2/internal/node.go new file mode 100644 index 000000000..0686f7410 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/node.go @@ -0,0 +1,938 @@ +package internal + +import ( + "context" + "fmt" + "reflect" + "sort" + "sync" + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +var _global_node_id_counter = uint(0) +var _global_id_mutex = &sync.Mutex{} + +func UniqueNodeID() uint { + // There's a reace in the internal integration tests if we don't make + // accessing _global_node_id_counter safe across goroutines. + _global_id_mutex.Lock() + defer _global_id_mutex.Unlock() + _global_node_id_counter += 1 + return _global_node_id_counter +} + +type Node struct { + ID uint + NodeType types.NodeType + + Text string + Body func(SpecContext) + CodeLocation types.CodeLocation + NestingLevel int + HasContext bool + + SynchronizedBeforeSuiteProc1Body func(SpecContext) []byte + SynchronizedBeforeSuiteProc1BodyHasContext bool + SynchronizedBeforeSuiteAllProcsBody func(SpecContext, []byte) + SynchronizedBeforeSuiteAllProcsBodyHasContext bool + + SynchronizedAfterSuiteAllProcsBody func(SpecContext) + SynchronizedAfterSuiteAllProcsBodyHasContext bool + SynchronizedAfterSuiteProc1Body func(SpecContext) + SynchronizedAfterSuiteProc1BodyHasContext bool + + ReportEachBody func(SpecContext, types.SpecReport) + ReportSuiteBody func(SpecContext, types.Report) + + MarkedFocus bool + MarkedPending bool + MarkedSerial bool + MarkedOrdered bool + MarkedContinueOnFailure bool + MarkedOncePerOrdered bool + FlakeAttempts int + MustPassRepeatedly int + Labels Labels + PollProgressAfter time.Duration + PollProgressInterval time.Duration + NodeTimeout time.Duration + SpecTimeout time.Duration + GracePeriod time.Duration + + NodeIDWhereCleanupWasGenerated uint +} + +// Decoration Types +type focusType bool +type pendingType bool +type serialType bool +type orderedType bool +type continueOnFailureType bool +type honorsOrderedType bool +type suppressProgressReporting bool + +const Focus = focusType(true) +const Pending = pendingType(true) +const Serial = serialType(true) +const Ordered = orderedType(true) +const ContinueOnFailure = continueOnFailureType(true) +const OncePerOrdered = honorsOrderedType(true) +const SuppressProgressReporting = suppressProgressReporting(true) + +type FlakeAttempts uint +type MustPassRepeatedly uint +type Offset uint +type Done chan<- interface{} // Deprecated Done Channel for asynchronous testing +type Labels []string +type PollProgressInterval time.Duration +type PollProgressAfter time.Duration +type NodeTimeout time.Duration +type SpecTimeout time.Duration +type GracePeriod time.Duration + +func (l Labels) MatchesLabelFilter(query string) bool { + return types.MustParseLabelFilter(query)(l) +} + +func UnionOfLabels(labels ...Labels) Labels { + out := Labels{} + seen := map[string]bool{} + for _, labelSet := range labels { + for _, label := range labelSet { + if !seen[label] { + seen[label] = true + out = append(out, label) + } + } + } + return out +} + +func PartitionDecorations(args ...interface{}) ([]interface{}, []interface{}) { + decorations := []interface{}{} + remainingArgs := []interface{}{} + for _, arg := range args { + if isDecoration(arg) { + decorations = append(decorations, arg) + } else { + remainingArgs = append(remainingArgs, arg) + } + } + return decorations, remainingArgs +} + +func isDecoration(arg interface{}) bool { + switch t := reflect.TypeOf(arg); { + case t == nil: + return false + case t == reflect.TypeOf(Offset(0)): + return true + case t == reflect.TypeOf(types.CodeLocation{}): + return true + case t == reflect.TypeOf(Focus): + return true + case t == reflect.TypeOf(Pending): + return true + case t == reflect.TypeOf(Serial): + return true + case t == reflect.TypeOf(Ordered): + return true + case t == reflect.TypeOf(ContinueOnFailure): + return true + case t == reflect.TypeOf(OncePerOrdered): + return true + case t == reflect.TypeOf(SuppressProgressReporting): + return true + case t == reflect.TypeOf(FlakeAttempts(0)): + return true + case t == reflect.TypeOf(MustPassRepeatedly(0)): + return true + case t == reflect.TypeOf(Labels{}): + return true + case t == reflect.TypeOf(PollProgressInterval(0)): + return true + case t == reflect.TypeOf(PollProgressAfter(0)): + return true + case t == reflect.TypeOf(NodeTimeout(0)): + return true + case t == reflect.TypeOf(SpecTimeout(0)): + return true + case t == reflect.TypeOf(GracePeriod(0)): + return true + case t.Kind() == reflect.Slice && isSliceOfDecorations(arg): + return true + default: + return false + } +} + +func isSliceOfDecorations(slice interface{}) bool { + vSlice := reflect.ValueOf(slice) + if vSlice.Len() == 0 { + return false + } + for i := 0; i < vSlice.Len(); i++ { + if !isDecoration(vSlice.Index(i).Interface()) { + return false + } + } + return true +} + +var contextType = reflect.TypeOf(new(context.Context)).Elem() +var specContextType = reflect.TypeOf(new(SpecContext)).Elem() + +func NewNode(deprecationTracker *types.DeprecationTracker, nodeType types.NodeType, text string, args ...interface{}) (Node, []error) { + baseOffset := 2 + node := Node{ + ID: UniqueNodeID(), + NodeType: nodeType, + Text: text, + Labels: Labels{}, + CodeLocation: types.NewCodeLocation(baseOffset), + NestingLevel: -1, + PollProgressAfter: -1, + PollProgressInterval: -1, + GracePeriod: -1, + } + + errors := []error{} + appendError := func(err error) { + if err != nil { + errors = append(errors, err) + } + } + + args = unrollInterfaceSlice(args) + + remainingArgs := []interface{}{} + // First get the CodeLocation up-to-date + for _, arg := range args { + switch v := arg.(type) { + case Offset: + node.CodeLocation = types.NewCodeLocation(baseOffset + int(v)) + case types.CodeLocation: + node.CodeLocation = v + default: + remainingArgs = append(remainingArgs, arg) + } + } + + labelsSeen := map[string]bool{} + trackedFunctionError := false + args = remainingArgs + remainingArgs = []interface{}{} + // now process the rest of the args + for _, arg := range args { + switch t := reflect.TypeOf(arg); { + case t == reflect.TypeOf(float64(0)): + break // ignore deprecated timeouts + case t == reflect.TypeOf(Focus): + node.MarkedFocus = bool(arg.(focusType)) + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "Focus")) + } + case t == reflect.TypeOf(Pending): + node.MarkedPending = bool(arg.(pendingType)) + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "Pending")) + } + case t == reflect.TypeOf(Serial): + node.MarkedSerial = bool(arg.(serialType)) + if !labelsSeen["Serial"] { + node.Labels = append(node.Labels, "Serial") + } + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "Serial")) + } + case t == reflect.TypeOf(Ordered): + node.MarkedOrdered = bool(arg.(orderedType)) + if !nodeType.Is(types.NodeTypeContainer) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "Ordered")) + } + case t == reflect.TypeOf(ContinueOnFailure): + node.MarkedContinueOnFailure = bool(arg.(continueOnFailureType)) + if !nodeType.Is(types.NodeTypeContainer) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "ContinueOnFailure")) + } + case t == reflect.TypeOf(OncePerOrdered): + node.MarkedOncePerOrdered = bool(arg.(honorsOrderedType)) + if !nodeType.Is(types.NodeTypeBeforeEach | types.NodeTypeJustBeforeEach | types.NodeTypeAfterEach | types.NodeTypeJustAfterEach) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "OncePerOrdered")) + } + case t == reflect.TypeOf(SuppressProgressReporting): + deprecationTracker.TrackDeprecation(types.Deprecations.SuppressProgressReporting()) + case t == reflect.TypeOf(FlakeAttempts(0)): + node.FlakeAttempts = int(arg.(FlakeAttempts)) + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "FlakeAttempts")) + } + case t == reflect.TypeOf(MustPassRepeatedly(0)): + node.MustPassRepeatedly = int(arg.(MustPassRepeatedly)) + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "MustPassRepeatedly")) + } + case t == reflect.TypeOf(PollProgressAfter(0)): + node.PollProgressAfter = time.Duration(arg.(PollProgressAfter)) + if nodeType.Is(types.NodeTypeContainer) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "PollProgressAfter")) + } + case t == reflect.TypeOf(PollProgressInterval(0)): + node.PollProgressInterval = time.Duration(arg.(PollProgressInterval)) + if nodeType.Is(types.NodeTypeContainer) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "PollProgressInterval")) + } + case t == reflect.TypeOf(NodeTimeout(0)): + node.NodeTimeout = time.Duration(arg.(NodeTimeout)) + if nodeType.Is(types.NodeTypeContainer) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "NodeTimeout")) + } + case t == reflect.TypeOf(SpecTimeout(0)): + node.SpecTimeout = time.Duration(arg.(SpecTimeout)) + if !nodeType.Is(types.NodeTypeIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "SpecTimeout")) + } + case t == reflect.TypeOf(GracePeriod(0)): + node.GracePeriod = time.Duration(arg.(GracePeriod)) + if nodeType.Is(types.NodeTypeContainer) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "GracePeriod")) + } + case t == reflect.TypeOf(Labels{}): + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "Label")) + } + for _, label := range arg.(Labels) { + if !labelsSeen[label] { + labelsSeen[label] = true + label, err := types.ValidateAndCleanupLabel(label, node.CodeLocation) + node.Labels = append(node.Labels, label) + appendError(err) + } + } + case t.Kind() == reflect.Func: + if nodeType.Is(types.NodeTypeContainer) { + if node.Body != nil { + appendError(types.GinkgoErrors.MultipleBodyFunctions(node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + if t.NumOut() > 0 || t.NumIn() > 0 { + appendError(types.GinkgoErrors.InvalidBodyTypeForContainer(t, node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + body := arg.(func()) + node.Body = func(SpecContext) { body() } + } else if nodeType.Is(types.NodeTypeReportBeforeEach | types.NodeTypeReportAfterEach) { + if node.ReportEachBody == nil { + if fn, ok := arg.(func(types.SpecReport)); ok { + node.ReportEachBody = func(_ SpecContext, r types.SpecReport) { fn(r) } + } else { + node.ReportEachBody = arg.(func(SpecContext, types.SpecReport)) + node.HasContext = true + } + } else { + appendError(types.GinkgoErrors.MultipleBodyFunctions(node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + } else if nodeType.Is(types.NodeTypeReportBeforeSuite | types.NodeTypeReportAfterSuite) { + if node.ReportSuiteBody == nil { + if fn, ok := arg.(func(types.Report)); ok { + node.ReportSuiteBody = func(_ SpecContext, r types.Report) { fn(r) } + } else { + node.ReportSuiteBody = arg.(func(SpecContext, types.Report)) + node.HasContext = true + } + } else { + appendError(types.GinkgoErrors.MultipleBodyFunctions(node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + } else if nodeType.Is(types.NodeTypeSynchronizedBeforeSuite) { + if node.SynchronizedBeforeSuiteProc1Body != nil && node.SynchronizedBeforeSuiteAllProcsBody != nil { + appendError(types.GinkgoErrors.MultipleBodyFunctions(node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + if node.SynchronizedBeforeSuiteProc1Body == nil { + body, hasContext := extractSynchronizedBeforeSuiteProc1Body(arg) + if body == nil { + appendError(types.GinkgoErrors.InvalidBodyTypeForSynchronizedBeforeSuiteProc1(t, node.CodeLocation)) + trackedFunctionError = true + } + node.SynchronizedBeforeSuiteProc1Body, node.SynchronizedBeforeSuiteProc1BodyHasContext = body, hasContext + } else if node.SynchronizedBeforeSuiteAllProcsBody == nil { + body, hasContext := extractSynchronizedBeforeSuiteAllProcsBody(arg) + if body == nil { + appendError(types.GinkgoErrors.InvalidBodyTypeForSynchronizedBeforeSuiteAllProcs(t, node.CodeLocation)) + trackedFunctionError = true + } + node.SynchronizedBeforeSuiteAllProcsBody, node.SynchronizedBeforeSuiteAllProcsBodyHasContext = body, hasContext + } + } else if nodeType.Is(types.NodeTypeSynchronizedAfterSuite) { + if node.SynchronizedAfterSuiteAllProcsBody != nil && node.SynchronizedAfterSuiteProc1Body != nil { + appendError(types.GinkgoErrors.MultipleBodyFunctions(node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + body, hasContext := extractBodyFunction(deprecationTracker, node.CodeLocation, arg) + if body == nil { + appendError(types.GinkgoErrors.InvalidBodyType(t, node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + if node.SynchronizedAfterSuiteAllProcsBody == nil { + node.SynchronizedAfterSuiteAllProcsBody, node.SynchronizedAfterSuiteAllProcsBodyHasContext = body, hasContext + } else if node.SynchronizedAfterSuiteProc1Body == nil { + node.SynchronizedAfterSuiteProc1Body, node.SynchronizedAfterSuiteProc1BodyHasContext = body, hasContext + } + } else { + if node.Body != nil { + appendError(types.GinkgoErrors.MultipleBodyFunctions(node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + node.Body, node.HasContext = extractBodyFunction(deprecationTracker, node.CodeLocation, arg) + if node.Body == nil { + appendError(types.GinkgoErrors.InvalidBodyType(t, node.CodeLocation, nodeType)) + trackedFunctionError = true + break + } + } + default: + remainingArgs = append(remainingArgs, arg) + } + } + + // validations + if node.MarkedPending && node.MarkedFocus { + appendError(types.GinkgoErrors.InvalidDeclarationOfFocusedAndPending(node.CodeLocation, nodeType)) + } + + if node.MarkedContinueOnFailure && !node.MarkedOrdered { + appendError(types.GinkgoErrors.InvalidContinueOnFailureDecoration(node.CodeLocation)) + } + + hasContext := node.HasContext || node.SynchronizedAfterSuiteProc1BodyHasContext || node.SynchronizedAfterSuiteAllProcsBodyHasContext || node.SynchronizedBeforeSuiteProc1BodyHasContext || node.SynchronizedBeforeSuiteAllProcsBodyHasContext + + if !hasContext && (node.NodeTimeout > 0 || node.SpecTimeout > 0 || node.GracePeriod > 0) && len(errors) == 0 { + appendError(types.GinkgoErrors.InvalidTimeoutOrGracePeriodForNonContextNode(node.CodeLocation, nodeType)) + } + + if !node.NodeType.Is(types.NodeTypeReportBeforeEach|types.NodeTypeReportAfterEach|types.NodeTypeSynchronizedBeforeSuite|types.NodeTypeSynchronizedAfterSuite|types.NodeTypeReportBeforeSuite|types.NodeTypeReportAfterSuite) && node.Body == nil && !node.MarkedPending && !trackedFunctionError { + appendError(types.GinkgoErrors.MissingBodyFunction(node.CodeLocation, nodeType)) + } + + if node.NodeType.Is(types.NodeTypeSynchronizedBeforeSuite) && !trackedFunctionError && (node.SynchronizedBeforeSuiteProc1Body == nil || node.SynchronizedBeforeSuiteAllProcsBody == nil) { + appendError(types.GinkgoErrors.MissingBodyFunction(node.CodeLocation, nodeType)) + } + + if node.NodeType.Is(types.NodeTypeSynchronizedAfterSuite) && !trackedFunctionError && (node.SynchronizedAfterSuiteProc1Body == nil || node.SynchronizedAfterSuiteAllProcsBody == nil) { + appendError(types.GinkgoErrors.MissingBodyFunction(node.CodeLocation, nodeType)) + } + + for _, arg := range remainingArgs { + appendError(types.GinkgoErrors.UnknownDecorator(node.CodeLocation, nodeType, arg)) + } + + if node.FlakeAttempts > 0 && node.MustPassRepeatedly > 0 { + appendError(types.GinkgoErrors.InvalidDeclarationOfFlakeAttemptsAndMustPassRepeatedly(node.CodeLocation, nodeType)) + } + + if len(errors) > 0 { + return Node{}, errors + } + + return node, errors +} + +var doneType = reflect.TypeOf(make(Done)) + +func extractBodyFunction(deprecationTracker *types.DeprecationTracker, cl types.CodeLocation, arg interface{}) (func(SpecContext), bool) { + t := reflect.TypeOf(arg) + if t.NumOut() > 0 || t.NumIn() > 1 { + return nil, false + } + if t.NumIn() == 1 { + if t.In(0) == doneType { + deprecationTracker.TrackDeprecation(types.Deprecations.Async(), cl) + deprecatedAsyncBody := arg.(func(Done)) + return func(SpecContext) { deprecatedAsyncBody(make(Done)) }, false + } else if t.In(0).Implements(specContextType) { + return arg.(func(SpecContext)), true + } else if t.In(0).Implements(contextType) { + body := arg.(func(context.Context)) + return func(c SpecContext) { body(c) }, true + } + + return nil, false + } + + body := arg.(func()) + return func(SpecContext) { body() }, false +} + +var byteType = reflect.TypeOf([]byte{}) + +func extractSynchronizedBeforeSuiteProc1Body(arg interface{}) (func(SpecContext) []byte, bool) { + t := reflect.TypeOf(arg) + v := reflect.ValueOf(arg) + + if t.NumOut() > 1 || t.NumIn() > 1 { + return nil, false + } else if t.NumOut() == 1 && t.Out(0) != byteType { + return nil, false + } else if t.NumIn() == 1 && !t.In(0).Implements(contextType) { + return nil, false + } + hasContext := t.NumIn() == 1 + + return func(c SpecContext) []byte { + var out []reflect.Value + if hasContext { + out = v.Call([]reflect.Value{reflect.ValueOf(c)}) + } else { + out = v.Call([]reflect.Value{}) + } + if len(out) == 1 { + return (out[0].Interface()).([]byte) + } else { + return []byte{} + } + }, hasContext +} + +func extractSynchronizedBeforeSuiteAllProcsBody(arg interface{}) (func(SpecContext, []byte), bool) { + t := reflect.TypeOf(arg) + v := reflect.ValueOf(arg) + hasContext, hasByte := false, false + + if t.NumOut() > 0 || t.NumIn() > 2 { + return nil, false + } else if t.NumIn() == 2 && t.In(0).Implements(contextType) && t.In(1) == byteType { + hasContext, hasByte = true, true + } else if t.NumIn() == 1 && t.In(0).Implements(contextType) { + hasContext = true + } else if t.NumIn() == 1 && t.In(0) == byteType { + hasByte = true + } else if t.NumIn() != 0 { + return nil, false + } + + return func(c SpecContext, b []byte) { + in := []reflect.Value{} + if hasContext { + in = append(in, reflect.ValueOf(c)) + } + if hasByte { + in = append(in, reflect.ValueOf(b)) + } + v.Call(in) + }, hasContext +} + +var errInterface = reflect.TypeOf((*error)(nil)).Elem() + +func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(string, types.CodeLocation), args ...interface{}) (Node, []error) { + decorations, remainingArgs := PartitionDecorations(args...) + baseOffset := 2 + cl := types.NewCodeLocation(baseOffset) + finalArgs := []interface{}{} + for _, arg := range decorations { + switch t := reflect.TypeOf(arg); { + case t == reflect.TypeOf(Offset(0)): + cl = types.NewCodeLocation(baseOffset + int(arg.(Offset))) + case t == reflect.TypeOf(types.CodeLocation{}): + cl = arg.(types.CodeLocation) + default: + finalArgs = append(finalArgs, arg) + } + } + finalArgs = append(finalArgs, cl) + + if len(remainingArgs) == 0 { + return Node{}, []error{types.GinkgoErrors.DeferCleanupInvalidFunction(cl)} + } + + callback := reflect.ValueOf(remainingArgs[0]) + if !(callback.Kind() == reflect.Func) { + return Node{}, []error{types.GinkgoErrors.DeferCleanupInvalidFunction(cl)} + } + + callArgs := []reflect.Value{} + for _, arg := range remainingArgs[1:] { + callArgs = append(callArgs, reflect.ValueOf(arg)) + } + + hasContext := false + t := callback.Type() + if t.NumIn() > 0 { + if t.In(0).Implements(specContextType) { + hasContext = true + } else if t.In(0).Implements(contextType) && (len(callArgs) == 0 || !callArgs[0].Type().Implements(contextType)) { + hasContext = true + } + } + + handleFailure := func(out []reflect.Value) { + if len(out) == 0 { + return + } + last := out[len(out)-1] + if last.Type().Implements(errInterface) && !last.IsNil() { + fail(fmt.Sprintf("DeferCleanup callback returned error: %v", last), cl) + } + } + + if hasContext { + finalArgs = append(finalArgs, func(c SpecContext) { + out := callback.Call(append([]reflect.Value{reflect.ValueOf(c)}, callArgs...)) + handleFailure(out) + }) + } else { + finalArgs = append(finalArgs, func() { + out := callback.Call(callArgs) + handleFailure(out) + }) + } + + return NewNode(deprecationTracker, types.NodeTypeCleanupInvalid, "", finalArgs...) +} + +func (n Node) IsZero() bool { + return n.ID == 0 +} + +/* Nodes */ +type Nodes []Node + +func (n Nodes) Clone() Nodes { + nodes := make(Nodes, len(n)) + copy(nodes, n) + return nodes +} + +func (n Nodes) CopyAppend(nodes ...Node) Nodes { + numN := len(n) + out := make(Nodes, numN+len(nodes)) + copy(out, n) + for j, node := range nodes { + out[numN+j] = node + } + return out +} + +func (n Nodes) SplitAround(pivot Node) (Nodes, Nodes) { + pivotIdx := len(n) + for i := range n { + if n[i].ID == pivot.ID { + pivotIdx = i + break + } + } + left := n[:pivotIdx] + right := Nodes{} + if pivotIdx+1 < len(n) { + right = n[pivotIdx+1:] + } + + return left, right +} + +func (n Nodes) FirstNodeWithType(nodeTypes types.NodeType) Node { + for i := range n { + if n[i].NodeType.Is(nodeTypes) { + return n[i] + } + } + return Node{} +} + +func (n Nodes) WithType(nodeTypes types.NodeType) Nodes { + count := 0 + for i := range n { + if n[i].NodeType.Is(nodeTypes) { + count++ + } + } + + out, j := make(Nodes, count), 0 + for i := range n { + if n[i].NodeType.Is(nodeTypes) { + out[j] = n[i] + j++ + } + } + return out +} + +func (n Nodes) WithoutType(nodeTypes types.NodeType) Nodes { + count := 0 + for i := range n { + if !n[i].NodeType.Is(nodeTypes) { + count++ + } + } + + out, j := make(Nodes, count), 0 + for i := range n { + if !n[i].NodeType.Is(nodeTypes) { + out[j] = n[i] + j++ + } + } + return out +} + +func (n Nodes) WithoutNode(nodeToExclude Node) Nodes { + idxToExclude := len(n) + for i := range n { + if n[i].ID == nodeToExclude.ID { + idxToExclude = i + break + } + } + if idxToExclude == len(n) { + return n + } + out, j := make(Nodes, len(n)-1), 0 + for i := range n { + if i == idxToExclude { + continue + } + out[j] = n[i] + j++ + } + return out +} + +func (n Nodes) Filter(filter func(Node) bool) Nodes { + trufa, count := make([]bool, len(n)), 0 + for i := range n { + if filter(n[i]) { + trufa[i] = true + count += 1 + } + } + out, j := make(Nodes, count), 0 + for i := range n { + if trufa[i] { + out[j] = n[i] + j++ + } + } + return out +} + +func (n Nodes) FirstSatisfying(filter func(Node) bool) Node { + for i := range n { + if filter(n[i]) { + return n[i] + } + } + return Node{} +} + +func (n Nodes) WithinNestingLevel(deepestNestingLevel int) Nodes { + count := 0 + for i := range n { + if n[i].NestingLevel <= deepestNestingLevel { + count++ + } + } + out, j := make(Nodes, count), 0 + for i := range n { + if n[i].NestingLevel <= deepestNestingLevel { + out[j] = n[i] + j++ + } + } + return out +} + +func (n Nodes) SortedByDescendingNestingLevel() Nodes { + out := make(Nodes, len(n)) + copy(out, n) + sort.SliceStable(out, func(i int, j int) bool { + return out[i].NestingLevel > out[j].NestingLevel + }) + + return out +} + +func (n Nodes) SortedByAscendingNestingLevel() Nodes { + out := make(Nodes, len(n)) + copy(out, n) + sort.SliceStable(out, func(i int, j int) bool { + return out[i].NestingLevel < out[j].NestingLevel + }) + + return out +} + +func (n Nodes) FirstWithNestingLevel(level int) Node { + for i := range n { + if n[i].NestingLevel == level { + return n[i] + } + } + return Node{} +} + +func (n Nodes) Reverse() Nodes { + out := make(Nodes, len(n)) + for i := range n { + out[len(n)-1-i] = n[i] + } + return out +} + +func (n Nodes) Texts() []string { + out := make([]string, len(n)) + for i := range n { + out[i] = n[i].Text + } + return out +} + +func (n Nodes) Labels() [][]string { + out := make([][]string, len(n)) + for i := range n { + if n[i].Labels == nil { + out[i] = []string{} + } else { + out[i] = []string(n[i].Labels) + } + } + return out +} + +func (n Nodes) UnionOfLabels() []string { + out := []string{} + seen := map[string]bool{} + for i := range n { + for _, label := range n[i].Labels { + if !seen[label] { + seen[label] = true + out = append(out, label) + } + } + } + return out +} + +func (n Nodes) CodeLocations() []types.CodeLocation { + out := make([]types.CodeLocation, len(n)) + for i := range n { + out[i] = n[i].CodeLocation + } + return out +} + +func (n Nodes) BestTextFor(node Node) string { + if node.Text != "" { + return node.Text + } + parentNestingLevel := node.NestingLevel - 1 + for i := range n { + if n[i].Text != "" && n[i].NestingLevel == parentNestingLevel { + return n[i].Text + } + } + + return "" +} + +func (n Nodes) ContainsNodeID(id uint) bool { + for i := range n { + if n[i].ID == id { + return true + } + } + return false +} + +func (n Nodes) HasNodeMarkedPending() bool { + for i := range n { + if n[i].MarkedPending { + return true + } + } + return false +} + +func (n Nodes) HasNodeMarkedFocus() bool { + for i := range n { + if n[i].MarkedFocus { + return true + } + } + return false +} + +func (n Nodes) HasNodeMarkedSerial() bool { + for i := range n { + if n[i].MarkedSerial { + return true + } + } + return false +} + +func (n Nodes) FirstNodeMarkedOrdered() Node { + for i := range n { + if n[i].MarkedOrdered { + return n[i] + } + } + return Node{} +} + +func (n Nodes) IndexOfFirstNodeMarkedOrdered() int { + for i := range n { + if n[i].MarkedOrdered { + return i + } + } + return -1 +} + +func (n Nodes) GetMaxFlakeAttempts() int { + maxFlakeAttempts := 0 + for i := range n { + if n[i].FlakeAttempts > 0 { + maxFlakeAttempts = n[i].FlakeAttempts + } + } + return maxFlakeAttempts +} + +func (n Nodes) GetMaxMustPassRepeatedly() int { + maxMustPassRepeatedly := 0 + for i := range n { + if n[i].MustPassRepeatedly > 0 { + maxMustPassRepeatedly = n[i].MustPassRepeatedly + } + } + return maxMustPassRepeatedly +} + +func unrollInterfaceSlice(args interface{}) []interface{} { + v := reflect.ValueOf(args) + if v.Kind() != reflect.Slice { + return []interface{}{args} + } + out := []interface{}{} + for i := 0; i < v.Len(); i++ { + el := reflect.ValueOf(v.Index(i).Interface()) + if el.Kind() == reflect.Slice && el.Type() != reflect.TypeOf(Labels{}) { + out = append(out, unrollInterfaceSlice(el.Interface())...) + } else { + out = append(out, v.Index(i).Interface()) + } + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/ordering.go b/vendor/github.com/onsi/ginkgo/v2/internal/ordering.go new file mode 100644 index 000000000..84eea0a59 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/ordering.go @@ -0,0 +1,171 @@ +package internal + +import ( + "math/rand" + "sort" + + "github.com/onsi/ginkgo/v2/types" +) + +type SortableSpecs struct { + Specs Specs + Indexes []int +} + +func NewSortableSpecs(specs Specs) *SortableSpecs { + indexes := make([]int, len(specs)) + for i := range specs { + indexes[i] = i + } + return &SortableSpecs{ + Specs: specs, + Indexes: indexes, + } +} +func (s *SortableSpecs) Len() int { return len(s.Indexes) } +func (s *SortableSpecs) Swap(i, j int) { s.Indexes[i], s.Indexes[j] = s.Indexes[j], s.Indexes[i] } +func (s *SortableSpecs) Less(i, j int) bool { + a, b := s.Specs[s.Indexes[i]], s.Specs[s.Indexes[j]] + + aNodes, bNodes := a.Nodes.WithType(types.NodeTypesForContainerAndIt), b.Nodes.WithType(types.NodeTypesForContainerAndIt) + + firstOrderedAIdx, firstOrderedBIdx := aNodes.IndexOfFirstNodeMarkedOrdered(), bNodes.IndexOfFirstNodeMarkedOrdered() + if firstOrderedAIdx > -1 && firstOrderedBIdx > -1 && aNodes[firstOrderedAIdx].ID == bNodes[firstOrderedBIdx].ID { + // strictly preserve order within an ordered containers. ID will track this as IDs are generated monotonically + return aNodes.FirstNodeWithType(types.NodeTypeIt).ID < bNodes.FirstNodeWithType(types.NodeTypeIt).ID + } + + // if either spec is in an ordered container - only use the nodes up to the outermost ordered container + if firstOrderedAIdx > -1 { + aNodes = aNodes[:firstOrderedAIdx+1] + } + if firstOrderedBIdx > -1 { + bNodes = bNodes[:firstOrderedBIdx+1] + } + + for i := 0; i < len(aNodes) && i < len(bNodes); i++ { + aCL, bCL := aNodes[i].CodeLocation, bNodes[i].CodeLocation + if aCL.FileName != bCL.FileName { + return aCL.FileName < bCL.FileName + } + if aCL.LineNumber != bCL.LineNumber { + return aCL.LineNumber < bCL.LineNumber + } + } + // either everything is equal or we have different lengths of CLs + if len(aNodes) != len(bNodes) { + return len(aNodes) < len(bNodes) + } + // ok, now we are sure everything was equal. so we use the spec text to break ties + for i := 0; i < len(aNodes); i++ { + if aNodes[i].Text != bNodes[i].Text { + return aNodes[i].Text < bNodes[i].Text + } + } + // ok, all those texts were equal. we'll use the ID of the most deeply nested node as a last resort + return aNodes[len(aNodes)-1].ID < bNodes[len(bNodes)-1].ID +} + +type GroupedSpecIndices []SpecIndices +type SpecIndices []int + +func OrderSpecs(specs Specs, suiteConfig types.SuiteConfig) (GroupedSpecIndices, GroupedSpecIndices) { + /* + Ginkgo has sophisticated support for randomizing specs. Specs are guaranteed to have the same + order for a given seed across test runs. + + By default only top-level containers and specs are shuffled - this makes for a more intuitive debugging + experience - specs within a given container run in the order they appear in the file. + + Developers can set -randomizeAllSpecs to shuffle _all_ specs. + + In addition, spec containers can be marked as Ordered. Specs within an Ordered container are never shuffled. + + Finally, specs and spec containers can be marked as Serial. When running in parallel, serial specs run on Process #1 _after_ all other processes have finished. + */ + + // Seed a new random source based on thee configured random seed. + r := rand.New(rand.NewSource(suiteConfig.RandomSeed)) + + // first, we sort the entire suite to ensure a deterministic order. the sort is performed by filename, then line number, and then spec text. this ensures every parallel process has the exact same spec order and is only necessary to cover the edge case where the user iterates over a map to generate specs. + sortableSpecs := NewSortableSpecs(specs) + sort.Sort(sortableSpecs) + + // then we break things into execution groups + // a group represents a single unit of execution and is a collection of SpecIndices + // usually a group is just a single spec, however ordered containers must be preserved as a single group + executionGroupIDs := []uint{} + executionGroups := map[uint]SpecIndices{} + for _, idx := range sortableSpecs.Indexes { + spec := specs[idx] + groupNode := spec.Nodes.FirstNodeMarkedOrdered() + if groupNode.IsZero() { + groupNode = spec.Nodes.FirstNodeWithType(types.NodeTypeIt) + } + executionGroups[groupNode.ID] = append(executionGroups[groupNode.ID], idx) + if len(executionGroups[groupNode.ID]) == 1 { + executionGroupIDs = append(executionGroupIDs, groupNode.ID) + } + } + + // now, we only shuffle all the execution groups if we're randomizing all specs, otherwise + // we shuffle outermost containers. so we need to form shufflable groupings of GroupIDs + shufflableGroupingIDs := []uint{} + shufflableGroupingIDToGroupIDs := map[uint][]uint{} + + // for each execution group we're going to have to pick a node to represent how the + // execution group is grouped for shuffling: + nodeTypesToShuffle := types.NodeTypesForContainerAndIt + if suiteConfig.RandomizeAllSpecs { + nodeTypesToShuffle = types.NodeTypeIt + } + + //so, for each execution group: + for _, groupID := range executionGroupIDs { + // pick out a representative spec + representativeSpec := specs[executionGroups[groupID][0]] + + // and grab the node on the spec that will represent which shufflable group this execution group belongs tu + shufflableGroupingNode := representativeSpec.Nodes.FirstNodeWithType(nodeTypesToShuffle) + + //add the execution group to its shufflable group + shufflableGroupingIDToGroupIDs[shufflableGroupingNode.ID] = append(shufflableGroupingIDToGroupIDs[shufflableGroupingNode.ID], groupID) + + //and if it's the first one in + if len(shufflableGroupingIDToGroupIDs[shufflableGroupingNode.ID]) == 1 { + // record the shuffleable group ID + shufflableGroupingIDs = append(shufflableGroupingIDs, shufflableGroupingNode.ID) + } + } + + // now we permute the sorted shufflable grouping IDs and build the ordered Groups + orderedGroups := GroupedSpecIndices{} + permutation := r.Perm(len(shufflableGroupingIDs)) + for _, j := range permutation { + //let's get the execution group IDs for this shufflable group: + executionGroupIDsForJ := shufflableGroupingIDToGroupIDs[shufflableGroupingIDs[j]] + // and we'll add their associated specindices to the orderedGroups slice: + for _, executionGroupID := range executionGroupIDsForJ { + orderedGroups = append(orderedGroups, executionGroups[executionGroupID]) + } + } + + // If we're running in series, we're done. + if suiteConfig.ParallelTotal == 1 { + return orderedGroups, GroupedSpecIndices{} + } + + // We're running in parallel so we need to partition the ordered groups into a parallelizable set and a serialized set. + // The parallelizable groups will run across all Ginkgo processes... + // ...the serial groups will only run on Process #1 after all other processes have exited. + parallelizableGroups, serialGroups := GroupedSpecIndices{}, GroupedSpecIndices{} + for _, specIndices := range orderedGroups { + if specs[specIndices[0]].Nodes.HasNodeMarkedSerial() { + serialGroups = append(serialGroups, specIndices) + } else { + parallelizableGroups = append(parallelizableGroups, specIndices) + } + } + + return parallelizableGroups, serialGroups +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.go b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.go new file mode 100644 index 000000000..4a1c09461 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.go @@ -0,0 +1,250 @@ +package internal + +import ( + "bytes" + "io" + "os" + "time" +) + +const BAILOUT_TIME = 1 * time.Second +const BAILOUT_MESSAGE = `Ginkgo detected an issue while intercepting output. + +When running in parallel, Ginkgo captures stdout and stderr output +and attaches it to the running spec. It looks like that process is getting +stuck for this suite. + +This usually happens if you, or a library you are using, spin up an external +process and set cmd.Stdout = os.Stdout and/or cmd.Stderr = os.Stderr. This +causes the external process to keep Ginkgo's output interceptor pipe open and +causes output interception to hang. + +Ginkgo has detected this and shortcircuited the capture process. The specs +will continue running after this message however output from the external +process that caused this issue will not be captured. + +You have several options to fix this. In preferred order they are: + +1. Pass GinkgoWriter instead of os.Stdout or os.Stderr to your process. +2. Ensure your process exits before the current spec completes. If your +process is long-lived and must cross spec boundaries, this option won't +work for you. +3. Pause Ginkgo's output interceptor before starting your process and then +resume it after. Use PauseOutputInterception() and ResumeOutputInterception() +to do this. +4. Set --output-interceptor-mode=none when running your Ginkgo suite. This will +turn off all output interception but allow specs to run in parallel without this +issue. You may miss important output if you do this including output from Go's +race detector. + +More details on issue #851 - https://github.com/onsi/ginkgo/issues/851 +` + +/* +The OutputInterceptor is used by to +intercept and capture all stdin and stderr output during a test run. +*/ +type OutputInterceptor interface { + StartInterceptingOutput() + StartInterceptingOutputAndForwardTo(io.Writer) + StopInterceptingAndReturnOutput() string + + PauseIntercepting() + ResumeIntercepting() + + Shutdown() +} + +type NoopOutputInterceptor struct{} + +func (interceptor NoopOutputInterceptor) StartInterceptingOutput() {} +func (interceptor NoopOutputInterceptor) StartInterceptingOutputAndForwardTo(io.Writer) {} +func (interceptor NoopOutputInterceptor) StopInterceptingAndReturnOutput() string { return "" } +func (interceptor NoopOutputInterceptor) PauseIntercepting() {} +func (interceptor NoopOutputInterceptor) ResumeIntercepting() {} +func (interceptor NoopOutputInterceptor) Shutdown() {} + +type pipePair struct { + reader *os.File + writer *os.File +} + +func startPipeFactory(pipeChannel chan pipePair, shutdown chan interface{}) { + for { + //make the next pipe... + pair := pipePair{} + pair.reader, pair.writer, _ = os.Pipe() + select { + //...and provide it to the next consumer (they are responsible for closing the files) + case pipeChannel <- pair: + continue + //...or close the files if we were told to shutdown + case <-shutdown: + pair.reader.Close() + pair.writer.Close() + return + } + } +} + +type interceptorImplementation interface { + CreateStdoutStderrClones() (*os.File, *os.File) + ConnectPipeToStdoutStderr(*os.File) + RestoreStdoutStderrFromClones(*os.File, *os.File) + ShutdownClones(*os.File, *os.File) +} + +type genericOutputInterceptor struct { + intercepting bool + + stdoutClone *os.File + stderrClone *os.File + pipe pipePair + + shutdown chan interface{} + emergencyBailout chan interface{} + pipeChannel chan pipePair + interceptedContent chan string + + forwardTo io.Writer + accumulatedOutput string + + implementation interceptorImplementation +} + +func (interceptor *genericOutputInterceptor) StartInterceptingOutput() { + interceptor.StartInterceptingOutputAndForwardTo(io.Discard) +} + +func (interceptor *genericOutputInterceptor) StartInterceptingOutputAndForwardTo(w io.Writer) { + if interceptor.intercepting { + return + } + interceptor.accumulatedOutput = "" + interceptor.forwardTo = w + interceptor.ResumeIntercepting() +} + +func (interceptor *genericOutputInterceptor) StopInterceptingAndReturnOutput() string { + if interceptor.intercepting { + interceptor.PauseIntercepting() + } + return interceptor.accumulatedOutput +} + +func (interceptor *genericOutputInterceptor) ResumeIntercepting() { + if interceptor.intercepting { + return + } + interceptor.intercepting = true + if interceptor.stdoutClone == nil { + interceptor.stdoutClone, interceptor.stderrClone = interceptor.implementation.CreateStdoutStderrClones() + interceptor.shutdown = make(chan interface{}) + go startPipeFactory(interceptor.pipeChannel, interceptor.shutdown) + } + + // Now we make a pipe, we'll use this to redirect the input to the 1 and 2 file descriptors (this is how everything else in the world is string to log to stdout and stderr) + // we get the pipe from our pipe factory. it runs in the background so we can request the next pipe while the spec being intercepted is running + interceptor.pipe = <-interceptor.pipeChannel + + interceptor.emergencyBailout = make(chan interface{}) + + //Spin up a goroutine to copy data from the pipe into a buffer, this is how we capture any output the user is emitting + go func() { + buffer := &bytes.Buffer{} + destination := io.MultiWriter(buffer, interceptor.forwardTo) + copyFinished := make(chan interface{}) + reader := interceptor.pipe.reader + go func() { + io.Copy(destination, reader) + reader.Close() // close the read end of the pipe so we don't leak a file descriptor + close(copyFinished) + }() + select { + case <-copyFinished: + interceptor.interceptedContent <- buffer.String() + case <-interceptor.emergencyBailout: + interceptor.interceptedContent <- "" + } + }() + + interceptor.implementation.ConnectPipeToStdoutStderr(interceptor.pipe.writer) +} + +func (interceptor *genericOutputInterceptor) PauseIntercepting() { + if !interceptor.intercepting { + return + } + // first we have to close the write end of the pipe. To do this we have to close all file descriptors pointing + // to the write end. So that would be the pipewriter itself, and FD #1 and FD #2 if we've Dup2'd them + interceptor.pipe.writer.Close() // the pipewriter itself + + // we also need to stop intercepting. we do that by reconnecting the stdout and stderr file descriptions back to their respective #1 and #2 file descriptors; + // this also closes #1 and #2 before it points that their original stdout and stderr file descriptions + interceptor.implementation.RestoreStdoutStderrFromClones(interceptor.stdoutClone, interceptor.stderrClone) + + var content string + select { + case content = <-interceptor.interceptedContent: + case <-time.After(BAILOUT_TIME): + /* + By closing all the pipe writer's file descriptors associated with the pipe writer's file description the io.Copy reading from the reader + should eventually receive an EOF and exit. + + **However**, if the user has spun up an external process and passed in os.Stdout/os.Stderr to cmd.Stdout/cmd.Stderr then the external process + will have a file descriptor pointing to the pipe writer's file description and it will not close until the external process exits. + + That would leave us hanging here waiting for the io.Copy to close forever. Instead we invoke this emergency escape valve. This returns whatever + content we've got but leaves the io.Copy running. This ensures the external process can continue writing without hanging at the cost of leaking a goroutine + and file descriptor (those these will be cleaned up when the process exits). + + We tack on a message to notify the user that they've hit this edgecase and encourage them to address it. + */ + close(interceptor.emergencyBailout) + content = <-interceptor.interceptedContent + BAILOUT_MESSAGE + } + + interceptor.accumulatedOutput += content + interceptor.intercepting = false +} + +func (interceptor *genericOutputInterceptor) Shutdown() { + interceptor.PauseIntercepting() + + if interceptor.stdoutClone != nil { + close(interceptor.shutdown) + interceptor.implementation.ShutdownClones(interceptor.stdoutClone, interceptor.stderrClone) + interceptor.stdoutClone = nil + interceptor.stderrClone = nil + } +} + +/* This is used on windows builds but included here so it can be explicitly tested on unix systems too */ +func NewOSGlobalReassigningOutputInterceptor() OutputInterceptor { + return &genericOutputInterceptor{ + interceptedContent: make(chan string), + pipeChannel: make(chan pipePair), + shutdown: make(chan interface{}), + implementation: &osGlobalReassigningOutputInterceptorImpl{}, + } +} + +type osGlobalReassigningOutputInterceptorImpl struct{} + +func (impl *osGlobalReassigningOutputInterceptorImpl) CreateStdoutStderrClones() (*os.File, *os.File) { + return os.Stdout, os.Stderr +} + +func (impl *osGlobalReassigningOutputInterceptorImpl) ConnectPipeToStdoutStderr(pipeWriter *os.File) { + os.Stdout = pipeWriter + os.Stderr = pipeWriter +} + +func (impl *osGlobalReassigningOutputInterceptorImpl) RestoreStdoutStderrFromClones(stdoutClone *os.File, stderrClone *os.File) { + os.Stdout = stdoutClone + os.Stderr = stderrClone +} + +func (impl *osGlobalReassigningOutputInterceptorImpl) ShutdownClones(_ *os.File, _ *os.File) { + //noop +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go new file mode 100644 index 000000000..8a237f446 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go @@ -0,0 +1,73 @@ +//go:build freebsd || openbsd || netbsd || dragonfly || darwin || linux || solaris +// +build freebsd openbsd netbsd dragonfly darwin linux solaris + +package internal + +import ( + "os" + + "golang.org/x/sys/unix" +) + +func NewOutputInterceptor() OutputInterceptor { + return &genericOutputInterceptor{ + interceptedContent: make(chan string), + pipeChannel: make(chan pipePair), + shutdown: make(chan interface{}), + implementation: &dupSyscallOutputInterceptorImpl{}, + } +} + +type dupSyscallOutputInterceptorImpl struct{} + +func (impl *dupSyscallOutputInterceptorImpl) CreateStdoutStderrClones() (*os.File, *os.File) { + // To clone stdout and stderr we: + // First, create two clone file descriptors that point to the stdout and stderr file descriptions + stdoutCloneFD, _ := unix.Dup(1) + stderrCloneFD, _ := unix.Dup(2) + + // Important, set the fds to FD_CLOEXEC to prevent them leaking into childs + // https://github.com/onsi/ginkgo/issues/1191 + flags, err := unix.FcntlInt(uintptr(stdoutCloneFD), unix.F_GETFD, 0) + if err == nil { + unix.FcntlInt(uintptr(stdoutCloneFD), unix.F_SETFD, flags|unix.FD_CLOEXEC) + } + flags, err = unix.FcntlInt(uintptr(stderrCloneFD), unix.F_GETFD, 0) + if err == nil { + unix.FcntlInt(uintptr(stderrCloneFD), unix.F_SETFD, flags|unix.FD_CLOEXEC) + } + + // And then wrap the clone file descriptors in files. + // One benefit of this (that we don't use yet) is that we can actually write + // to these files to emit output to the console even though we're intercepting output + stdoutClone := os.NewFile(uintptr(stdoutCloneFD), "stdout-clone") + stderrClone := os.NewFile(uintptr(stderrCloneFD), "stderr-clone") + + //these clones remain alive throughout the lifecycle of the suite and don't need to be recreated + //this speeds things up a bit, actually. + return stdoutClone, stderrClone +} + +func (impl *dupSyscallOutputInterceptorImpl) ConnectPipeToStdoutStderr(pipeWriter *os.File) { + // To redirect output to our pipe we need to point the 1 and 2 file descriptors (which is how the world tries to log things) + // to the write end of the pipe. + // We do this with Dup2 (possibly Dup3 on some architectures) to have file descriptors 1 and 2 point to the same file description as the pipeWriter + // This effectively shunts data written to stdout and stderr to the write end of our pipe + unix.Dup2(int(pipeWriter.Fd()), 1) + unix.Dup2(int(pipeWriter.Fd()), 2) +} + +func (impl *dupSyscallOutputInterceptorImpl) RestoreStdoutStderrFromClones(stdoutClone *os.File, stderrClone *os.File) { + // To restore stdour/stderr from the clones we have the 1 and 2 file descriptors + // point to the original file descriptions that we saved off in the clones. + // This has the added benefit of closing the connection between these descriptors and the write end of the pipe + // which is important to cause the io.Copy on the pipe.Reader to end. + unix.Dup2(int(stdoutClone.Fd()), 1) + unix.Dup2(int(stderrClone.Fd()), 2) +} + +func (impl *dupSyscallOutputInterceptorImpl) ShutdownClones(stdoutClone *os.File, stderrClone *os.File) { + // We're done with the clones so we can close them to clean up after ourselves + stdoutClone.Close() + stderrClone.Close() +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go new file mode 100644 index 000000000..4c374935b --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go @@ -0,0 +1,7 @@ +//go:build wasm + +package internal + +func NewOutputInterceptor() OutputInterceptor { + return &NoopOutputInterceptor{} +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go new file mode 100644 index 000000000..30c2851a8 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go @@ -0,0 +1,7 @@ +// +build windows + +package internal + +func NewOutputInterceptor() OutputInterceptor { + return NewOSGlobalReassigningOutputInterceptor() +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/client_server.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/client_server.go new file mode 100644 index 000000000..b3cd64292 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/client_server.go @@ -0,0 +1,72 @@ +package parallel_support + +import ( + "fmt" + "io" + "os" + "time" + + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +type BeforeSuiteState struct { + Data []byte + State types.SpecState +} + +type ParallelIndexCounter struct { + Index int +} + +var ErrorGone = fmt.Errorf("gone") +var ErrorFailed = fmt.Errorf("failed") +var ErrorEarly = fmt.Errorf("early") + +var POLLING_INTERVAL = 50 * time.Millisecond + +type Server interface { + Start() + Close() + Address() string + RegisterAlive(node int, alive func() bool) + GetSuiteDone() chan interface{} + GetOutputDestination() io.Writer + SetOutputDestination(io.Writer) +} + +type Client interface { + Connect() bool + Close() error + + PostSuiteWillBegin(report types.Report) error + PostDidRun(report types.SpecReport) error + PostSuiteDidEnd(report types.Report) error + PostReportBeforeSuiteCompleted(state types.SpecState) error + BlockUntilReportBeforeSuiteCompleted() (types.SpecState, error) + PostSynchronizedBeforeSuiteCompleted(state types.SpecState, data []byte) error + BlockUntilSynchronizedBeforeSuiteData() (types.SpecState, []byte, error) + BlockUntilNonprimaryProcsHaveFinished() error + BlockUntilAggregatedNonprimaryProcsReport() (types.Report, error) + FetchNextCounter() (int, error) + PostAbort() error + ShouldAbort() bool + PostEmitProgressReport(report types.ProgressReport) error + Write(p []byte) (int, error) +} + +func NewServer(parallelTotal int, reporter reporters.Reporter) (Server, error) { + if os.Getenv("GINKGO_PARALLEL_PROTOCOL") == "HTTP" { + return newHttpServer(parallelTotal, reporter) + } else { + return newRPCServer(parallelTotal, reporter) + } +} + +func NewClient(serverHost string) Client { + if os.Getenv("GINKGO_PARALLEL_PROTOCOL") == "HTTP" { + return newHttpClient(serverHost) + } else { + return newRPCClient(serverHost) + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go new file mode 100644 index 000000000..6547c7a66 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go @@ -0,0 +1,169 @@ +package parallel_support + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +type httpClient struct { + serverHost string +} + +func newHttpClient(serverHost string) *httpClient { + return &httpClient{ + serverHost: serverHost, + } +} + +func (client *httpClient) Connect() bool { + resp, err := http.Get(client.serverHost + "/up") + if err != nil { + return false + } + resp.Body.Close() + return resp.StatusCode == http.StatusOK +} + +func (client *httpClient) Close() error { + return nil +} + +func (client *httpClient) post(path string, data interface{}) error { + var body io.Reader + if data != nil { + encoded, err := json.Marshal(data) + if err != nil { + return err + } + body = bytes.NewBuffer(encoded) + } + resp, err := http.Post(client.serverHost+path, "application/json", body) + if err != nil { + return err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("received unexpected status code %d", resp.StatusCode) + } + return nil +} + +func (client *httpClient) poll(path string, data interface{}) error { + for { + resp, err := http.Get(client.serverHost + path) + if err != nil { + return err + } + if resp.StatusCode == http.StatusTooEarly { + resp.Body.Close() + time.Sleep(POLLING_INTERVAL) + continue + } + defer resp.Body.Close() + if resp.StatusCode == http.StatusGone { + return ErrorGone + } + if resp.StatusCode == http.StatusFailedDependency { + return ErrorFailed + } + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("received unexpected status code %d", resp.StatusCode) + } + if data != nil { + return json.NewDecoder(resp.Body).Decode(data) + } + return nil + } +} + +func (client *httpClient) PostSuiteWillBegin(report types.Report) error { + return client.post("/suite-will-begin", report) +} + +func (client *httpClient) PostDidRun(report types.SpecReport) error { + return client.post("/did-run", report) +} + +func (client *httpClient) PostSuiteDidEnd(report types.Report) error { + return client.post("/suite-did-end", report) +} + +func (client *httpClient) PostEmitProgressReport(report types.ProgressReport) error { + return client.post("/progress-report", report) +} + +func (client *httpClient) PostReportBeforeSuiteCompleted(state types.SpecState) error { + return client.post("/report-before-suite-completed", state) +} + +func (client *httpClient) BlockUntilReportBeforeSuiteCompleted() (types.SpecState, error) { + var state types.SpecState + err := client.poll("/report-before-suite-state", &state) + if err == ErrorGone { + return types.SpecStateFailed, nil + } + return state, err +} + +func (client *httpClient) PostSynchronizedBeforeSuiteCompleted(state types.SpecState, data []byte) error { + beforeSuiteState := BeforeSuiteState{ + State: state, + Data: data, + } + return client.post("/before-suite-completed", beforeSuiteState) +} + +func (client *httpClient) BlockUntilSynchronizedBeforeSuiteData() (types.SpecState, []byte, error) { + var beforeSuiteState BeforeSuiteState + err := client.poll("/before-suite-state", &beforeSuiteState) + if err == ErrorGone { + return types.SpecStateInvalid, nil, types.GinkgoErrors.SynchronizedBeforeSuiteDisappearedOnProc1() + } + return beforeSuiteState.State, beforeSuiteState.Data, err +} + +func (client *httpClient) BlockUntilNonprimaryProcsHaveFinished() error { + return client.poll("/have-nonprimary-procs-finished", nil) +} + +func (client *httpClient) BlockUntilAggregatedNonprimaryProcsReport() (types.Report, error) { + var report types.Report + err := client.poll("/aggregated-nonprimary-procs-report", &report) + if err == ErrorGone { + return types.Report{}, types.GinkgoErrors.AggregatedReportUnavailableDueToNodeDisappearing() + } + return report, err +} + +func (client *httpClient) FetchNextCounter() (int, error) { + var counter ParallelIndexCounter + err := client.poll("/counter", &counter) + return counter.Index, err +} + +func (client *httpClient) PostAbort() error { + return client.post("/abort", nil) +} + +func (client *httpClient) ShouldAbort() bool { + err := client.poll("/abort", nil) + if err == ErrorGone { + return true + } + return false +} + +func (client *httpClient) Write(p []byte) (int, error) { + resp, err := http.Post(client.serverHost+"/emit-output", "text/plain;charset=UTF-8 ", bytes.NewReader(p)) + resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return 0, fmt.Errorf("failed to emit output") + } + return len(p), err +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go new file mode 100644 index 000000000..d2c71ab1b --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go @@ -0,0 +1,242 @@ +/* + +The remote package provides the pieces to allow Ginkgo test suites to report to remote listeners. +This is used, primarily, to enable streaming parallel test output but has, in principal, broader applications (e.g. streaming test output to a browser). + +*/ + +package parallel_support + +import ( + "encoding/json" + "io" + "net" + "net/http" + + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +/* +httpServer spins up on an automatically selected port and listens for communication from the forwarding reporter. +It then forwards that communication to attached reporters. +*/ +type httpServer struct { + listener net.Listener + handler *ServerHandler +} + +// Create a new server, automatically selecting a port +func newHttpServer(parallelTotal int, reporter reporters.Reporter) (*httpServer, error) { + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + return nil, err + } + return &httpServer{ + listener: listener, + handler: newServerHandler(parallelTotal, reporter), + }, nil +} + +// Start the server. You don't need to `go s.Start()`, just `s.Start()` +func (server *httpServer) Start() { + httpServer := &http.Server{} + mux := http.NewServeMux() + httpServer.Handler = mux + + //streaming endpoints + mux.HandleFunc("/suite-will-begin", server.specSuiteWillBegin) + mux.HandleFunc("/did-run", server.didRun) + mux.HandleFunc("/suite-did-end", server.specSuiteDidEnd) + mux.HandleFunc("/emit-output", server.emitOutput) + mux.HandleFunc("/progress-report", server.emitProgressReport) + + //synchronization endpoints + mux.HandleFunc("/report-before-suite-completed", server.handleReportBeforeSuiteCompleted) + mux.HandleFunc("/report-before-suite-state", server.handleReportBeforeSuiteState) + mux.HandleFunc("/before-suite-completed", server.handleBeforeSuiteCompleted) + mux.HandleFunc("/before-suite-state", server.handleBeforeSuiteState) + mux.HandleFunc("/have-nonprimary-procs-finished", server.handleHaveNonprimaryProcsFinished) + mux.HandleFunc("/aggregated-nonprimary-procs-report", server.handleAggregatedNonprimaryProcsReport) + mux.HandleFunc("/counter", server.handleCounter) + mux.HandleFunc("/up", server.handleUp) + mux.HandleFunc("/abort", server.handleAbort) + + go httpServer.Serve(server.listener) +} + +// Stop the server +func (server *httpServer) Close() { + server.listener.Close() +} + +// The address the server can be reached it. Pass this into the `ForwardingReporter`. +func (server *httpServer) Address() string { + return "http://" + server.listener.Addr().String() +} + +func (server *httpServer) GetSuiteDone() chan interface{} { + return server.handler.done +} + +func (server *httpServer) GetOutputDestination() io.Writer { + return server.handler.outputDestination +} + +func (server *httpServer) SetOutputDestination(w io.Writer) { + server.handler.outputDestination = w +} + +func (server *httpServer) RegisterAlive(node int, alive func() bool) { + server.handler.registerAlive(node, alive) +} + +// +// Streaming Endpoints +// + +// The server will forward all received messages to Ginkgo reporters registered with `RegisterReporters` +func (server *httpServer) decode(writer http.ResponseWriter, request *http.Request, object interface{}) bool { + defer request.Body.Close() + if json.NewDecoder(request.Body).Decode(object) != nil { + writer.WriteHeader(http.StatusBadRequest) + return false + } + return true +} + +func (server *httpServer) handleError(err error, writer http.ResponseWriter) bool { + if err == nil { + return false + } + switch err { + case ErrorEarly: + writer.WriteHeader(http.StatusTooEarly) + case ErrorGone: + writer.WriteHeader(http.StatusGone) + case ErrorFailed: + writer.WriteHeader(http.StatusFailedDependency) + default: + writer.WriteHeader(http.StatusInternalServerError) + } + return true +} + +func (server *httpServer) specSuiteWillBegin(writer http.ResponseWriter, request *http.Request) { + var report types.Report + if !server.decode(writer, request, &report) { + return + } + + server.handleError(server.handler.SpecSuiteWillBegin(report, voidReceiver), writer) +} + +func (server *httpServer) didRun(writer http.ResponseWriter, request *http.Request) { + var report types.SpecReport + if !server.decode(writer, request, &report) { + return + } + + server.handleError(server.handler.DidRun(report, voidReceiver), writer) +} + +func (server *httpServer) specSuiteDidEnd(writer http.ResponseWriter, request *http.Request) { + var report types.Report + if !server.decode(writer, request, &report) { + return + } + server.handleError(server.handler.SpecSuiteDidEnd(report, voidReceiver), writer) +} + +func (server *httpServer) emitOutput(writer http.ResponseWriter, request *http.Request) { + output, err := io.ReadAll(request.Body) + if err != nil { + writer.WriteHeader(http.StatusInternalServerError) + return + } + var n int + server.handleError(server.handler.EmitOutput(output, &n), writer) +} + +func (server *httpServer) emitProgressReport(writer http.ResponseWriter, request *http.Request) { + var report types.ProgressReport + if !server.decode(writer, request, &report) { + return + } + server.handleError(server.handler.EmitProgressReport(report, voidReceiver), writer) +} + +func (server *httpServer) handleReportBeforeSuiteCompleted(writer http.ResponseWriter, request *http.Request) { + var state types.SpecState + if !server.decode(writer, request, &state) { + return + } + + server.handleError(server.handler.ReportBeforeSuiteCompleted(state, voidReceiver), writer) +} + +func (server *httpServer) handleReportBeforeSuiteState(writer http.ResponseWriter, request *http.Request) { + var state types.SpecState + if server.handleError(server.handler.ReportBeforeSuiteState(voidSender, &state), writer) { + return + } + json.NewEncoder(writer).Encode(state) +} + +func (server *httpServer) handleBeforeSuiteCompleted(writer http.ResponseWriter, request *http.Request) { + var beforeSuiteState BeforeSuiteState + if !server.decode(writer, request, &beforeSuiteState) { + return + } + + server.handleError(server.handler.BeforeSuiteCompleted(beforeSuiteState, voidReceiver), writer) +} + +func (server *httpServer) handleBeforeSuiteState(writer http.ResponseWriter, request *http.Request) { + var beforeSuiteState BeforeSuiteState + if server.handleError(server.handler.BeforeSuiteState(voidSender, &beforeSuiteState), writer) { + return + } + json.NewEncoder(writer).Encode(beforeSuiteState) +} + +func (server *httpServer) handleHaveNonprimaryProcsFinished(writer http.ResponseWriter, request *http.Request) { + if server.handleError(server.handler.HaveNonprimaryProcsFinished(voidSender, voidReceiver), writer) { + return + } + writer.WriteHeader(http.StatusOK) +} + +func (server *httpServer) handleAggregatedNonprimaryProcsReport(writer http.ResponseWriter, request *http.Request) { + var aggregatedReport types.Report + if server.handleError(server.handler.AggregatedNonprimaryProcsReport(voidSender, &aggregatedReport), writer) { + return + } + json.NewEncoder(writer).Encode(aggregatedReport) +} + +func (server *httpServer) handleCounter(writer http.ResponseWriter, request *http.Request) { + var n int + if server.handleError(server.handler.Counter(voidSender, &n), writer) { + return + } + json.NewEncoder(writer).Encode(ParallelIndexCounter{Index: n}) +} + +func (server *httpServer) handleUp(writer http.ResponseWriter, request *http.Request) { + writer.WriteHeader(http.StatusOK) +} + +func (server *httpServer) handleAbort(writer http.ResponseWriter, request *http.Request) { + if request.Method == "GET" { + var shouldAbort bool + server.handler.ShouldAbort(voidSender, &shouldAbort) + if shouldAbort { + writer.WriteHeader(http.StatusGone) + } else { + writer.WriteHeader(http.StatusOK) + } + } else { + server.handler.Abort(voidSender, voidReceiver) + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go new file mode 100644 index 000000000..59e8e6fd0 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go @@ -0,0 +1,136 @@ +package parallel_support + +import ( + "net/rpc" + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +type rpcClient struct { + serverHost string + client *rpc.Client +} + +func newRPCClient(serverHost string) *rpcClient { + return &rpcClient{ + serverHost: serverHost, + } +} + +func (client *rpcClient) Connect() bool { + var err error + if client.client != nil { + return true + } + client.client, err = rpc.DialHTTPPath("tcp", client.serverHost, "/") + if err != nil { + client.client = nil + return false + } + return true +} + +func (client *rpcClient) Close() error { + return client.client.Close() +} + +func (client *rpcClient) poll(method string, data interface{}) error { + for { + err := client.client.Call(method, voidSender, data) + if err == nil { + return nil + } + switch err.Error() { + case ErrorEarly.Error(): + time.Sleep(POLLING_INTERVAL) + case ErrorGone.Error(): + return ErrorGone + case ErrorFailed.Error(): + return ErrorFailed + default: + return err + } + } +} + +func (client *rpcClient) PostSuiteWillBegin(report types.Report) error { + return client.client.Call("Server.SpecSuiteWillBegin", report, voidReceiver) +} + +func (client *rpcClient) PostDidRun(report types.SpecReport) error { + return client.client.Call("Server.DidRun", report, voidReceiver) +} + +func (client *rpcClient) PostSuiteDidEnd(report types.Report) error { + return client.client.Call("Server.SpecSuiteDidEnd", report, voidReceiver) +} + +func (client *rpcClient) Write(p []byte) (int, error) { + var n int + err := client.client.Call("Server.EmitOutput", p, &n) + return n, err +} + +func (client *rpcClient) PostEmitProgressReport(report types.ProgressReport) error { + return client.client.Call("Server.EmitProgressReport", report, voidReceiver) +} + +func (client *rpcClient) PostReportBeforeSuiteCompleted(state types.SpecState) error { + return client.client.Call("Server.ReportBeforeSuiteCompleted", state, voidReceiver) +} + +func (client *rpcClient) BlockUntilReportBeforeSuiteCompleted() (types.SpecState, error) { + var state types.SpecState + err := client.poll("Server.ReportBeforeSuiteState", &state) + if err == ErrorGone { + return types.SpecStateFailed, nil + } + return state, err +} + +func (client *rpcClient) PostSynchronizedBeforeSuiteCompleted(state types.SpecState, data []byte) error { + beforeSuiteState := BeforeSuiteState{ + State: state, + Data: data, + } + return client.client.Call("Server.BeforeSuiteCompleted", beforeSuiteState, voidReceiver) +} + +func (client *rpcClient) BlockUntilSynchronizedBeforeSuiteData() (types.SpecState, []byte, error) { + var beforeSuiteState BeforeSuiteState + err := client.poll("Server.BeforeSuiteState", &beforeSuiteState) + if err == ErrorGone { + return types.SpecStateInvalid, nil, types.GinkgoErrors.SynchronizedBeforeSuiteDisappearedOnProc1() + } + return beforeSuiteState.State, beforeSuiteState.Data, err +} + +func (client *rpcClient) BlockUntilNonprimaryProcsHaveFinished() error { + return client.poll("Server.HaveNonprimaryProcsFinished", voidReceiver) +} + +func (client *rpcClient) BlockUntilAggregatedNonprimaryProcsReport() (types.Report, error) { + var report types.Report + err := client.poll("Server.AggregatedNonprimaryProcsReport", &report) + if err == ErrorGone { + return types.Report{}, types.GinkgoErrors.AggregatedReportUnavailableDueToNodeDisappearing() + } + return report, err +} + +func (client *rpcClient) FetchNextCounter() (int, error) { + var counter int + err := client.client.Call("Server.Counter", voidSender, &counter) + return counter, err +} + +func (client *rpcClient) PostAbort() error { + return client.client.Call("Server.Abort", voidSender, voidReceiver) +} + +func (client *rpcClient) ShouldAbort() bool { + var shouldAbort bool + client.client.Call("Server.ShouldAbort", voidSender, &shouldAbort) + return shouldAbort +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go new file mode 100644 index 000000000..2620fd562 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go @@ -0,0 +1,75 @@ +/* + +The remote package provides the pieces to allow Ginkgo test suites to report to remote listeners. +This is used, primarily, to enable streaming parallel test output but has, in principal, broader applications (e.g. streaming test output to a browser). + +*/ + +package parallel_support + +import ( + "io" + "net" + "net/http" + "net/rpc" + + "github.com/onsi/ginkgo/v2/reporters" +) + +/* +RPCServer spins up on an automatically selected port and listens for communication from the forwarding reporter. +It then forwards that communication to attached reporters. +*/ +type RPCServer struct { + listener net.Listener + handler *ServerHandler +} + +//Create a new server, automatically selecting a port +func newRPCServer(parallelTotal int, reporter reporters.Reporter) (*RPCServer, error) { + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + return nil, err + } + return &RPCServer{ + listener: listener, + handler: newServerHandler(parallelTotal, reporter), + }, nil +} + +//Start the server. You don't need to `go s.Start()`, just `s.Start()` +func (server *RPCServer) Start() { + rpcServer := rpc.NewServer() + rpcServer.RegisterName("Server", server.handler) //register the handler's methods as the server + + httpServer := &http.Server{} + httpServer.Handler = rpcServer + + go httpServer.Serve(server.listener) +} + +//Stop the server +func (server *RPCServer) Close() { + server.listener.Close() +} + +//The address the server can be reached it. Pass this into the `ForwardingReporter`. +func (server *RPCServer) Address() string { + return server.listener.Addr().String() +} + +func (server *RPCServer) GetSuiteDone() chan interface{} { + return server.handler.done +} + +func (server *RPCServer) GetOutputDestination() io.Writer { + return server.handler.outputDestination +} + +func (server *RPCServer) SetOutputDestination(w io.Writer) { + server.handler.outputDestination = w +} + +func (server *RPCServer) RegisterAlive(node int, alive func() bool) { + server.handler.registerAlive(node, alive) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go new file mode 100644 index 000000000..a6d98793e --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go @@ -0,0 +1,234 @@ +package parallel_support + +import ( + "io" + "os" + "sync" + + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +type Void struct{} + +var voidReceiver *Void = &Void{} +var voidSender Void + +// ServerHandler is an RPC-compatible handler that is shared between the http server and the rpc server. +// It handles all the business logic to avoid duplication between the two servers + +type ServerHandler struct { + done chan interface{} + outputDestination io.Writer + reporter reporters.Reporter + alives []func() bool + lock *sync.Mutex + beforeSuiteState BeforeSuiteState + reportBeforeSuiteState types.SpecState + parallelTotal int + counter int + counterLock *sync.Mutex + shouldAbort bool + + numSuiteDidBegins int + numSuiteDidEnds int + aggregatedReport types.Report + reportHoldingArea []types.SpecReport +} + +func newServerHandler(parallelTotal int, reporter reporters.Reporter) *ServerHandler { + return &ServerHandler{ + reporter: reporter, + lock: &sync.Mutex{}, + counterLock: &sync.Mutex{}, + alives: make([]func() bool, parallelTotal), + beforeSuiteState: BeforeSuiteState{Data: nil, State: types.SpecStateInvalid}, + + parallelTotal: parallelTotal, + outputDestination: os.Stdout, + done: make(chan interface{}), + } +} + +func (handler *ServerHandler) SpecSuiteWillBegin(report types.Report, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + + handler.numSuiteDidBegins += 1 + + // all summaries are identical, so it's fine to simply emit the last one of these + if handler.numSuiteDidBegins == handler.parallelTotal { + handler.reporter.SuiteWillBegin(report) + + for _, summary := range handler.reportHoldingArea { + handler.reporter.WillRun(summary) + handler.reporter.DidRun(summary) + } + + handler.reportHoldingArea = nil + } + + return nil +} + +func (handler *ServerHandler) DidRun(report types.SpecReport, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + + if handler.numSuiteDidBegins == handler.parallelTotal { + handler.reporter.WillRun(report) + handler.reporter.DidRun(report) + } else { + handler.reportHoldingArea = append(handler.reportHoldingArea, report) + } + + return nil +} + +func (handler *ServerHandler) SpecSuiteDidEnd(report types.Report, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + + handler.numSuiteDidEnds += 1 + if handler.numSuiteDidEnds == 1 { + handler.aggregatedReport = report + } else { + handler.aggregatedReport = handler.aggregatedReport.Add(report) + } + + if handler.numSuiteDidEnds == handler.parallelTotal { + handler.reporter.SuiteDidEnd(handler.aggregatedReport) + close(handler.done) + } + + return nil +} + +func (handler *ServerHandler) EmitOutput(output []byte, n *int) error { + var err error + *n, err = handler.outputDestination.Write(output) + return err +} + +func (handler *ServerHandler) EmitProgressReport(report types.ProgressReport, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + handler.reporter.EmitProgressReport(report) + return nil +} + +func (handler *ServerHandler) registerAlive(proc int, alive func() bool) { + handler.lock.Lock() + defer handler.lock.Unlock() + handler.alives[proc-1] = alive +} + +func (handler *ServerHandler) procIsAlive(proc int) bool { + handler.lock.Lock() + defer handler.lock.Unlock() + alive := handler.alives[proc-1] + if alive == nil { + return true + } + return alive() +} + +func (handler *ServerHandler) haveNonprimaryProcsFinished() bool { + for i := 2; i <= handler.parallelTotal; i++ { + if handler.procIsAlive(i) { + return false + } + } + return true +} + +func (handler *ServerHandler) ReportBeforeSuiteCompleted(reportBeforeSuiteState types.SpecState, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + handler.reportBeforeSuiteState = reportBeforeSuiteState + + return nil +} + +func (handler *ServerHandler) ReportBeforeSuiteState(_ Void, reportBeforeSuiteState *types.SpecState) error { + proc1IsAlive := handler.procIsAlive(1) + handler.lock.Lock() + defer handler.lock.Unlock() + if handler.reportBeforeSuiteState == types.SpecStateInvalid { + if proc1IsAlive { + return ErrorEarly + } else { + return ErrorGone + } + } + *reportBeforeSuiteState = handler.reportBeforeSuiteState + return nil +} + +func (handler *ServerHandler) BeforeSuiteCompleted(beforeSuiteState BeforeSuiteState, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + handler.beforeSuiteState = beforeSuiteState + + return nil +} + +func (handler *ServerHandler) BeforeSuiteState(_ Void, beforeSuiteState *BeforeSuiteState) error { + proc1IsAlive := handler.procIsAlive(1) + handler.lock.Lock() + defer handler.lock.Unlock() + if handler.beforeSuiteState.State == types.SpecStateInvalid { + if proc1IsAlive { + return ErrorEarly + } else { + return ErrorGone + } + } + *beforeSuiteState = handler.beforeSuiteState + return nil +} + +func (handler *ServerHandler) HaveNonprimaryProcsFinished(_ Void, _ *Void) error { + if handler.haveNonprimaryProcsFinished() { + return nil + } else { + return ErrorEarly + } +} + +func (handler *ServerHandler) AggregatedNonprimaryProcsReport(_ Void, report *types.Report) error { + if handler.haveNonprimaryProcsFinished() { + handler.lock.Lock() + defer handler.lock.Unlock() + if handler.numSuiteDidEnds == handler.parallelTotal-1 { + *report = handler.aggregatedReport + return nil + } else { + return ErrorGone + } + } else { + return ErrorEarly + } +} + +func (handler *ServerHandler) Counter(_ Void, counter *int) error { + handler.counterLock.Lock() + defer handler.counterLock.Unlock() + *counter = handler.counter + handler.counter++ + return nil +} + +func (handler *ServerHandler) Abort(_ Void, _ *Void) error { + handler.lock.Lock() + defer handler.lock.Unlock() + handler.shouldAbort = true + return nil +} + +func (handler *ServerHandler) ShouldAbort(_ Void, shouldAbort *bool) error { + handler.lock.Lock() + defer handler.lock.Unlock() + *shouldAbort = handler.shouldAbort + return nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go new file mode 100644 index 000000000..11269cf1f --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go @@ -0,0 +1,287 @@ +package internal + +import ( + "bufio" + "bytes" + "context" + "fmt" + "io" + "os" + "os/signal" + "path/filepath" + "runtime" + "strconv" + "strings" + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +var _SOURCE_CACHE = map[string][]string{} + +type ProgressSignalRegistrar func(func()) context.CancelFunc + +func RegisterForProgressSignal(handler func()) context.CancelFunc { + signalChannel := make(chan os.Signal, 1) + if len(PROGRESS_SIGNALS) > 0 { + signal.Notify(signalChannel, PROGRESS_SIGNALS...) + } + ctx, cancel := context.WithCancel(context.Background()) + go func() { + for { + select { + case <-signalChannel: + handler() + case <-ctx.Done(): + signal.Stop(signalChannel) + return + } + } + }() + + return cancel +} + +type ProgressStepCursor struct { + Text string + CodeLocation types.CodeLocation + StartTime time.Time +} + +func NewProgressReport(isRunningInParallel bool, report types.SpecReport, currentNode Node, currentNodeStartTime time.Time, currentStep types.SpecEvent, gwOutput string, timelineLocation types.TimelineLocation, additionalReports []string, sourceRoots []string, includeAll bool) (types.ProgressReport, error) { + pr := types.ProgressReport{ + ParallelProcess: report.ParallelProcess, + RunningInParallel: isRunningInParallel, + ContainerHierarchyTexts: report.ContainerHierarchyTexts, + LeafNodeText: report.LeafNodeText, + LeafNodeLocation: report.LeafNodeLocation, + SpecStartTime: report.StartTime, + + CurrentNodeType: currentNode.NodeType, + CurrentNodeText: currentNode.Text, + CurrentNodeLocation: currentNode.CodeLocation, + CurrentNodeStartTime: currentNodeStartTime, + + CurrentStepText: currentStep.Message, + CurrentStepLocation: currentStep.CodeLocation, + CurrentStepStartTime: currentStep.TimelineLocation.Time, + + AdditionalReports: additionalReports, + + CapturedGinkgoWriterOutput: gwOutput, + TimelineLocation: timelineLocation, + } + + goroutines, err := extractRunningGoroutines() + if err != nil { + return pr, err + } + pr.Goroutines = goroutines + + // now we want to try to find goroutines of interest. these will be goroutines that have any function calls with code in packagesOfInterest: + packagesOfInterest := map[string]bool{} + packageFromFilename := func(filename string) string { + return filepath.Dir(filename) + } + addPackageFor := func(filename string) { + if filename != "" { + packagesOfInterest[packageFromFilename(filename)] = true + } + } + isPackageOfInterest := func(filename string) bool { + stackPackage := packageFromFilename(filename) + for packageOfInterest := range packagesOfInterest { + if strings.HasPrefix(stackPackage, packageOfInterest) { + return true + } + } + return false + } + for _, location := range report.ContainerHierarchyLocations { + addPackageFor(location.FileName) + } + addPackageFor(report.LeafNodeLocation.FileName) + addPackageFor(currentNode.CodeLocation.FileName) + addPackageFor(currentStep.CodeLocation.FileName) + + //First, we find the SpecGoroutine - this will be the goroutine that includes `runNode` + specGoRoutineIdx := -1 + runNodeFunctionCallIdx := -1 +OUTER: + for goroutineIdx, goroutine := range pr.Goroutines { + for functionCallIdx, functionCall := range goroutine.Stack { + if strings.Contains(functionCall.Function, "ginkgo/v2/internal.(*Suite).runNode.func") { + specGoRoutineIdx = goroutineIdx + runNodeFunctionCallIdx = functionCallIdx + break OUTER + } + } + } + + //Now, we find the first non-Ginkgo function call + if specGoRoutineIdx > -1 { + for runNodeFunctionCallIdx >= 0 { + fn := goroutines[specGoRoutineIdx].Stack[runNodeFunctionCallIdx].Function + file := goroutines[specGoRoutineIdx].Stack[runNodeFunctionCallIdx].Filename + // these are all things that could potentially happen from within ginkgo + if strings.Contains(fn, "ginkgo/v2/internal") || strings.Contains(fn, "reflect.Value") || strings.Contains(file, "ginkgo/table_dsl") || strings.Contains(file, "ginkgo/core_dsl") { + runNodeFunctionCallIdx-- + continue + } + if strings.Contains(goroutines[specGoRoutineIdx].Stack[runNodeFunctionCallIdx].Function, "ginkgo/table_dsl") { + + } + //found it! lets add its package of interest + addPackageFor(goroutines[specGoRoutineIdx].Stack[runNodeFunctionCallIdx].Filename) + break + } + } + + ginkgoEntryPointIdx := -1 +OUTER_GINKGO_ENTRY_POINT: + for goroutineIdx, goroutine := range pr.Goroutines { + for _, functionCall := range goroutine.Stack { + if strings.Contains(functionCall.Function, "ginkgo/v2.RunSpecs") { + ginkgoEntryPointIdx = goroutineIdx + break OUTER_GINKGO_ENTRY_POINT + } + } + } + + // Now we go through all goroutines and highlight any lines with packages in `packagesOfInterest` + // Any goroutines with highlighted lines end up in the HighlightGoRoutines + for goroutineIdx, goroutine := range pr.Goroutines { + if goroutineIdx == ginkgoEntryPointIdx { + continue + } + if goroutineIdx == specGoRoutineIdx { + pr.Goroutines[goroutineIdx].IsSpecGoroutine = true + } + for functionCallIdx, functionCall := range goroutine.Stack { + if isPackageOfInterest(functionCall.Filename) { + goroutine.Stack[functionCallIdx].Highlight = true + goroutine.Stack[functionCallIdx].Source, goroutine.Stack[functionCallIdx].SourceHighlight = fetchSource(functionCall.Filename, functionCall.Line, 2, sourceRoots) + } + } + } + + if !includeAll { + goroutines := []types.Goroutine{pr.SpecGoroutine()} + goroutines = append(goroutines, pr.HighlightedGoroutines()...) + pr.Goroutines = goroutines + } + + return pr, nil +} + +func extractRunningGoroutines() ([]types.Goroutine, error) { + var stack []byte + for size := 64 * 1024; ; size *= 2 { + stack = make([]byte, size) + if n := runtime.Stack(stack, true); n < size { + stack = stack[:n] + break + } + } + r := bufio.NewReader(bytes.NewReader(stack)) + out := []types.Goroutine{} + idx := -1 + for { + line, err := r.ReadString('\n') + if err == io.EOF { + break + } + + line = strings.TrimSuffix(line, "\n") + + //skip blank lines + if line == "" { + continue + } + + //parse headers for new goroutine frames + if strings.HasPrefix(line, "goroutine") { + out = append(out, types.Goroutine{}) + idx = len(out) - 1 + + line = strings.TrimPrefix(line, "goroutine ") + line = strings.TrimSuffix(line, ":") + fields := strings.SplitN(line, " ", 2) + if len(fields) != 2 { + return nil, types.GinkgoErrors.FailedToParseStackTrace(fmt.Sprintf("Invalid goroutine frame header: %s", line)) + } + out[idx].ID, err = strconv.ParseUint(fields[0], 10, 64) + if err != nil { + return nil, types.GinkgoErrors.FailedToParseStackTrace(fmt.Sprintf("Invalid goroutine ID: %s", fields[1])) + } + + out[idx].State = strings.TrimSuffix(strings.TrimPrefix(fields[1], "["), "]") + continue + } + + //if we are here we must be at a function call entry in the stack + functionCall := types.FunctionCall{ + Function: strings.TrimPrefix(line, "created by "), // no need to track 'created by' + } + + line, err = r.ReadString('\n') + line = strings.TrimSuffix(line, "\n") + if err == io.EOF { + return nil, types.GinkgoErrors.FailedToParseStackTrace(fmt.Sprintf("Invalid function call: %s -- missing file name and line number", functionCall.Function)) + } + line = strings.TrimLeft(line, " \t") + delimiterIdx := strings.LastIndex(line, ":") + if delimiterIdx == -1 { + return nil, types.GinkgoErrors.FailedToParseStackTrace(fmt.Sprintf("Invalid filename and line number: %s", line)) + } + functionCall.Filename = line[:delimiterIdx] + line = strings.Split(line[delimiterIdx+1:], " ")[0] + lineNumber, err := strconv.ParseInt(line, 10, 64) + functionCall.Line = int(lineNumber) + if err != nil { + return nil, types.GinkgoErrors.FailedToParseStackTrace(fmt.Sprintf("Invalid function call line number: %s\n%s", line, err.Error())) + } + out[idx].Stack = append(out[idx].Stack, functionCall) + } + + return out, nil +} + +func fetchSource(filename string, lineNumber int, span int, configuredSourceRoots []string) ([]string, int) { + if filename == "" { + return []string{}, 0 + } + + var lines []string + var ok bool + if lines, ok = _SOURCE_CACHE[filename]; !ok { + sourceRoots := []string{""} + sourceRoots = append(sourceRoots, configuredSourceRoots...) + var data []byte + var err error + var found bool + for _, root := range sourceRoots { + data, err = os.ReadFile(filepath.Join(root, filename)) + if err == nil { + found = true + break + } + } + if !found { + return []string{}, 0 + } + lines = strings.Split(string(data), "\n") + _SOURCE_CACHE[filename] = lines + } + + startIndex := lineNumber - span - 1 + endIndex := startIndex + span + span + 1 + if startIndex < 0 { + startIndex = 0 + } + if endIndex > len(lines) { + endIndex = len(lines) + } + highlightIndex := lineNumber - 1 - startIndex + return lines[startIndex:endIndex], highlightIndex +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_bsd.go b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_bsd.go new file mode 100644 index 000000000..61e0ed306 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_bsd.go @@ -0,0 +1,11 @@ +//go:build freebsd || openbsd || netbsd || darwin || dragonfly +// +build freebsd openbsd netbsd darwin dragonfly + +package internal + +import ( + "os" + "syscall" +) + +var PROGRESS_SIGNALS = []os.Signal{syscall.SIGINFO, syscall.SIGUSR1} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_unix.go b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_unix.go new file mode 100644 index 000000000..ad30de459 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_unix.go @@ -0,0 +1,11 @@ +//go:build linux || solaris +// +build linux solaris + +package internal + +import ( + "os" + "syscall" +) + +var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go new file mode 100644 index 000000000..8c53fe0ad --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go @@ -0,0 +1,10 @@ +//go:build wasm + +package internal + +import ( + "os" + "syscall" +) + +var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_win.go b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_win.go new file mode 100644 index 000000000..0eca2516a --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_win.go @@ -0,0 +1,8 @@ +//go:build windows +// +build windows + +package internal + +import "os" + +var PROGRESS_SIGNALS = []os.Signal{} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/progress_reporter_manager.go b/vendor/github.com/onsi/ginkgo/v2/internal/progress_reporter_manager.go new file mode 100644 index 000000000..2c6e260f7 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/progress_reporter_manager.go @@ -0,0 +1,79 @@ +package internal + +import ( + "context" + "sort" + "strings" + "sync" + + "github.com/onsi/ginkgo/v2/types" +) + +type ProgressReporterManager struct { + lock *sync.Mutex + progressReporters map[int]func() string + prCounter int +} + +func NewProgressReporterManager() *ProgressReporterManager { + return &ProgressReporterManager{ + progressReporters: map[int]func() string{}, + lock: &sync.Mutex{}, + } +} + +func (prm *ProgressReporterManager) AttachProgressReporter(reporter func() string) func() { + prm.lock.Lock() + defer prm.lock.Unlock() + prm.prCounter += 1 + prCounter := prm.prCounter + prm.progressReporters[prCounter] = reporter + + return func() { + prm.lock.Lock() + defer prm.lock.Unlock() + delete(prm.progressReporters, prCounter) + } +} + +func (prm *ProgressReporterManager) QueryProgressReporters(ctx context.Context, failer *Failer) []string { + prm.lock.Lock() + keys := []int{} + for key := range prm.progressReporters { + keys = append(keys, key) + } + sort.Ints(keys) + reporters := []func() string{} + for _, key := range keys { + reporters = append(reporters, prm.progressReporters[key]) + } + prm.lock.Unlock() + + if len(reporters) == 0 { + return nil + } + out := []string{} + for _, reporter := range reporters { + reportC := make(chan string, 1) + go func() { + defer func() { + e := recover() + if e != nil { + failer.Panic(types.NewCodeLocationWithStackTrace(1), e) + reportC <- "failed to query attached progress reporter" + } + }() + reportC <- reporter() + }() + var report string + select { + case report = <-reportC: + case <-ctx.Done(): + return out + } + if strings.TrimSpace(report) != "" { + out = append(out, report) + } + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go b/vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go new file mode 100644 index 000000000..cc351a39b --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go @@ -0,0 +1,39 @@ +package internal + +import ( + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +type ReportEntry = types.ReportEntry + +func NewReportEntry(name string, cl types.CodeLocation, args ...interface{}) (ReportEntry, error) { + out := ReportEntry{ + Visibility: types.ReportEntryVisibilityAlways, + Name: name, + Location: cl, + Time: time.Now(), + } + var didSetValue = false + for _, arg := range args { + switch x := arg.(type) { + case types.ReportEntryVisibility: + out.Visibility = x + case types.CodeLocation: + out.Location = x + case Offset: + out.Location = types.NewCodeLocation(2 + int(x)) + case time.Time: + out.Time = x + default: + if didSetValue { + return ReportEntry{}, types.GinkgoErrors.TooManyReportEntryValues(out.Location, arg) + } + out.Value = types.WrapEntryValue(arg) + didSetValue = true + } + } + + return out, nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/spec.go b/vendor/github.com/onsi/ginkgo/v2/internal/spec.go new file mode 100644 index 000000000..7c4ee5bb7 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/spec.go @@ -0,0 +1,87 @@ +package internal + +import ( + "strings" + "time" + + "github.com/onsi/ginkgo/v2/types" +) + +type Spec struct { + Nodes Nodes + Skip bool +} + +func (s Spec) SubjectID() uint { + return s.Nodes.FirstNodeWithType(types.NodeTypeIt).ID +} + +func (s Spec) Text() string { + texts := []string{} + for i := range s.Nodes { + if s.Nodes[i].Text != "" { + texts = append(texts, s.Nodes[i].Text) + } + } + return strings.Join(texts, " ") +} + +func (s Spec) FirstNodeWithType(nodeTypes types.NodeType) Node { + return s.Nodes.FirstNodeWithType(nodeTypes) +} + +func (s Spec) FlakeAttempts() int { + flakeAttempts := 0 + for i := range s.Nodes { + if s.Nodes[i].FlakeAttempts > 0 { + flakeAttempts = s.Nodes[i].FlakeAttempts + } + } + + return flakeAttempts +} + +func (s Spec) MustPassRepeatedly() int { + mustPassRepeatedly := 0 + for i := range s.Nodes { + if s.Nodes[i].MustPassRepeatedly > 0 { + mustPassRepeatedly = s.Nodes[i].MustPassRepeatedly + } + } + + return mustPassRepeatedly +} + +func (s Spec) SpecTimeout() time.Duration { + return s.FirstNodeWithType(types.NodeTypeIt).SpecTimeout +} + +type Specs []Spec + +func (s Specs) HasAnySpecsMarkedPending() bool { + for i := range s { + if s[i].Nodes.HasNodeMarkedPending() { + return true + } + } + + return false +} + +func (s Specs) CountWithoutSkip() int { + n := 0 + for i := range s { + if !s[i].Skip { + n += 1 + } + } + return n +} + +func (s Specs) AtIndices(indices SpecIndices) Specs { + out := make(Specs, len(indices)) + for i, idx := range indices { + out[i] = s[idx] + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go b/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go new file mode 100644 index 000000000..2d2ea2fc3 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go @@ -0,0 +1,47 @@ +package internal + +import ( + "context" + + "github.com/onsi/ginkgo/v2/types" +) + +type SpecContext interface { + context.Context + + SpecReport() types.SpecReport + AttachProgressReporter(func() string) func() +} + +type specContext struct { + context.Context + *ProgressReporterManager + + cancel context.CancelCauseFunc + + suite *Suite +} + +/* +SpecContext includes a reference to `suite` and embeds itself in itself as a "GINKGO_SPEC_CONTEXT" value. This allows users to create child Contexts without having down-stream consumers (e.g. Gomega) lose access to the SpecContext and its methods. This allows us to build extensions on top of Ginkgo that simply take an all-encompassing context. + +Note that while SpecContext is used to enforce deadlines by Ginkgo it is not configured as a context.WithDeadline. Instead, Ginkgo owns responsibility for cancelling the context when the deadline elapses. + +This is because Ginkgo needs finer control over when the context is canceled. Specifically, Ginkgo needs to generate a ProgressReport before it cancels the context to ensure progress is captured where the spec is currently running. The only way to avoid a race here is to manually control the cancellation. +*/ +func NewSpecContext(suite *Suite) *specContext { + ctx, cancel := context.WithCancelCause(context.Background()) + sc := &specContext{ + cancel: cancel, + suite: suite, + ProgressReporterManager: NewProgressReporterManager(), + } + ctx = context.WithValue(ctx, "GINKGO_SPEC_CONTEXT", sc) //yes, yes, the go docs say don't use a string for a key... but we'd rather avoid a circular dependency between Gomega and Ginkgo + sc.Context = ctx //thank goodness for garbage collectors that can handle circular dependencies + + return sc +} + +func (sc *specContext) SpecReport() types.SpecReport { + return sc.suite.CurrentSpecReport() +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go new file mode 100644 index 000000000..a3c9e6bf1 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go @@ -0,0 +1,1046 @@ +package internal + +import ( + "fmt" + "sync" + "time" + + "github.com/onsi/ginkgo/v2/internal/interrupt_handler" + "github.com/onsi/ginkgo/v2/internal/parallel_support" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" + "golang.org/x/net/context" +) + +type Phase uint + +const ( + PhaseBuildTopLevel Phase = iota + PhaseBuildTree + PhaseRun +) + +var PROGRESS_REPORTER_DEADLING = 5 * time.Second + +type Suite struct { + tree *TreeNode + topLevelContainers Nodes + + *ProgressReporterManager + + phase Phase + + suiteNodes Nodes + cleanupNodes Nodes + + failer *Failer + reporter reporters.Reporter + writer WriterInterface + outputInterceptor OutputInterceptor + interruptHandler interrupt_handler.InterruptHandlerInterface + config types.SuiteConfig + deadline time.Time + + skipAll bool + report types.Report + currentSpecReport types.SpecReport + currentNode Node + currentNodeStartTime time.Time + + currentSpecContext *specContext + + currentByStep types.SpecEvent + timelineOrder int + + /* + We don't need to lock around all operations. Just those that *could* happen concurrently. + + Suite, generally, only runs one node at a time - and so the possibiity for races is small. In fact, the presence of a race usually indicates the user has launched a goroutine that has leaked past the node it was launched in. + + However, there are some operations that can happen concurrently: + + - AddReportEntry and CurrentSpecReport can be accessed at any point by the user - including in goroutines that outlive the node intentionally (see, e.g. #1020). They both form a self-contained read-write pair and so a lock in them is sufficent. + - generateProgressReport can be invoked at any point in time by an interrupt or a progres poll. Moreover, it requires access to currentSpecReport, currentNode, currentNodeStartTime, and progressStepCursor. To make it threadsafe we need to lock around generateProgressReport when we read those variables _and_ everywhere those variables are *written*. In general we don't need to worry about all possible field writes to these variables as what `generateProgressReport` does with these variables is fairly selective (hence the name of the lock). Specifically, we dont' need to lock around state and failure message changes on `currentSpecReport` - just the setting of the variable itself. + */ + selectiveLock *sync.Mutex + + client parallel_support.Client +} + +func NewSuite() *Suite { + return &Suite{ + tree: &TreeNode{}, + phase: PhaseBuildTopLevel, + ProgressReporterManager: NewProgressReporterManager(), + + selectiveLock: &sync.Mutex{}, + } +} + +func (suite *Suite) Clone() (*Suite, error) { + if suite.phase != PhaseBuildTopLevel { + return nil, fmt.Errorf("cannot clone suite after tree has been built") + } + return &Suite{ + tree: &TreeNode{}, + phase: PhaseBuildTopLevel, + ProgressReporterManager: NewProgressReporterManager(), + topLevelContainers: suite.topLevelContainers.Clone(), + suiteNodes: suite.suiteNodes.Clone(), + selectiveLock: &sync.Mutex{}, + }, nil +} + +func (suite *Suite) BuildTree() error { + // During PhaseBuildTopLevel, the top level containers are stored in suite.topLevelCotainers and entered + // We now enter PhaseBuildTree where these top level containers are entered and added to the spec tree + suite.phase = PhaseBuildTree + for _, topLevelContainer := range suite.topLevelContainers { + err := suite.PushNode(topLevelContainer) + if err != nil { + return err + } + } + return nil +} + +func (suite *Suite) Run(description string, suiteLabels Labels, suitePath string, failer *Failer, reporter reporters.Reporter, writer WriterInterface, outputInterceptor OutputInterceptor, interruptHandler interrupt_handler.InterruptHandlerInterface, client parallel_support.Client, progressSignalRegistrar ProgressSignalRegistrar, suiteConfig types.SuiteConfig) (bool, bool) { + if suite.phase != PhaseBuildTree { + panic("cannot run before building the tree = call suite.BuildTree() first") + } + ApplyNestedFocusPolicyToTree(suite.tree) + specs := GenerateSpecsFromTreeRoot(suite.tree) + specs, hasProgrammaticFocus := ApplyFocusToSpecs(specs, description, suiteLabels, suiteConfig) + + suite.phase = PhaseRun + suite.client = client + suite.failer = failer + suite.reporter = reporter + suite.writer = writer + suite.outputInterceptor = outputInterceptor + suite.interruptHandler = interruptHandler + suite.config = suiteConfig + + if suite.config.Timeout > 0 { + suite.deadline = time.Now().Add(suite.config.Timeout) + } + + cancelProgressHandler := progressSignalRegistrar(suite.handleProgressSignal) + + success := suite.runSpecs(description, suiteLabels, suitePath, hasProgrammaticFocus, specs) + + cancelProgressHandler() + + return success, hasProgrammaticFocus +} + +func (suite *Suite) InRunPhase() bool { + return suite.phase == PhaseRun +} + +/* + Tree Construction methods + + PushNode is used during PhaseBuildTopLevel and PhaseBuildTree +*/ + +func (suite *Suite) PushNode(node Node) error { + if node.NodeType.Is(types.NodeTypeCleanupInvalid | types.NodeTypeCleanupAfterEach | types.NodeTypeCleanupAfterAll | types.NodeTypeCleanupAfterSuite) { + return suite.pushCleanupNode(node) + } + + if node.NodeType.Is(types.NodeTypeBeforeSuite | types.NodeTypeAfterSuite | types.NodeTypeSynchronizedBeforeSuite | types.NodeTypeSynchronizedAfterSuite | types.NodeTypeBeforeSuite | types.NodeTypeReportBeforeSuite | types.NodeTypeReportAfterSuite) { + return suite.pushSuiteNode(node) + } + + if suite.phase == PhaseRun { + return types.GinkgoErrors.PushingNodeInRunPhase(node.NodeType, node.CodeLocation) + } + + if node.MarkedSerial { + firstOrderedNode := suite.tree.AncestorNodeChain().FirstNodeMarkedOrdered() + if !firstOrderedNode.IsZero() && !firstOrderedNode.MarkedSerial { + return types.GinkgoErrors.InvalidSerialNodeInNonSerialOrderedContainer(node.CodeLocation, node.NodeType) + } + } + + if node.NodeType.Is(types.NodeTypeBeforeAll | types.NodeTypeAfterAll) { + firstOrderedNode := suite.tree.AncestorNodeChain().FirstNodeMarkedOrdered() + if firstOrderedNode.IsZero() { + return types.GinkgoErrors.SetupNodeNotInOrderedContainer(node.CodeLocation, node.NodeType) + } + } + + if node.MarkedContinueOnFailure { + firstOrderedNode := suite.tree.AncestorNodeChain().FirstNodeMarkedOrdered() + if !firstOrderedNode.IsZero() { + return types.GinkgoErrors.InvalidContinueOnFailureDecoration(node.CodeLocation) + } + } + + if node.NodeType == types.NodeTypeContainer { + // During PhaseBuildTopLevel we only track the top level containers without entering them + // We only enter the top level container nodes during PhaseBuildTree + // + // This ensures the tree is only constructed after `go spec` has called `flag.Parse()` and gives + // the user an opportunity to load suiteConfiguration information in the `TestX` go spec hook just before `RunSpecs` + // is invoked. This makes the lifecycle easier to reason about and solves issues like #693. + if suite.phase == PhaseBuildTopLevel { + suite.topLevelContainers = append(suite.topLevelContainers, node) + return nil + } + if suite.phase == PhaseBuildTree { + parentTree := suite.tree + suite.tree = &TreeNode{Node: node} + parentTree.AppendChild(suite.tree) + err := func() (err error) { + defer func() { + if e := recover(); e != nil { + err = types.GinkgoErrors.CaughtPanicDuringABuildPhase(e, node.CodeLocation) + } + }() + node.Body(nil) + return err + }() + suite.tree = parentTree + return err + } + } else { + suite.tree.AppendChild(&TreeNode{Node: node}) + return nil + } + + return nil +} + +func (suite *Suite) pushSuiteNode(node Node) error { + if suite.phase == PhaseBuildTree { + return types.GinkgoErrors.SuiteNodeInNestedContext(node.NodeType, node.CodeLocation) + } + + if suite.phase == PhaseRun { + return types.GinkgoErrors.SuiteNodeDuringRunPhase(node.NodeType, node.CodeLocation) + } + + switch node.NodeType { + case types.NodeTypeBeforeSuite, types.NodeTypeSynchronizedBeforeSuite: + existingBefores := suite.suiteNodes.WithType(types.NodeTypeBeforeSuite | types.NodeTypeSynchronizedBeforeSuite) + if len(existingBefores) > 0 { + return types.GinkgoErrors.MultipleBeforeSuiteNodes(node.NodeType, node.CodeLocation, existingBefores[0].NodeType, existingBefores[0].CodeLocation) + } + case types.NodeTypeAfterSuite, types.NodeTypeSynchronizedAfterSuite: + existingAfters := suite.suiteNodes.WithType(types.NodeTypeAfterSuite | types.NodeTypeSynchronizedAfterSuite) + if len(existingAfters) > 0 { + return types.GinkgoErrors.MultipleAfterSuiteNodes(node.NodeType, node.CodeLocation, existingAfters[0].NodeType, existingAfters[0].CodeLocation) + } + } + + suite.suiteNodes = append(suite.suiteNodes, node) + return nil +} + +func (suite *Suite) pushCleanupNode(node Node) error { + if suite.phase != PhaseRun || suite.currentNode.IsZero() { + return types.GinkgoErrors.PushingCleanupNodeDuringTreeConstruction(node.CodeLocation) + } + + switch suite.currentNode.NodeType { + case types.NodeTypeBeforeSuite, types.NodeTypeSynchronizedBeforeSuite, types.NodeTypeAfterSuite, types.NodeTypeSynchronizedAfterSuite: + node.NodeType = types.NodeTypeCleanupAfterSuite + case types.NodeTypeBeforeAll, types.NodeTypeAfterAll: + node.NodeType = types.NodeTypeCleanupAfterAll + case types.NodeTypeReportBeforeEach, types.NodeTypeReportAfterEach, types.NodeTypeReportBeforeSuite, types.NodeTypeReportAfterSuite: + return types.GinkgoErrors.PushingCleanupInReportingNode(node.CodeLocation, suite.currentNode.NodeType) + case types.NodeTypeCleanupInvalid, types.NodeTypeCleanupAfterEach, types.NodeTypeCleanupAfterAll, types.NodeTypeCleanupAfterSuite: + return types.GinkgoErrors.PushingCleanupInCleanupNode(node.CodeLocation) + default: + node.NodeType = types.NodeTypeCleanupAfterEach + } + + node.NodeIDWhereCleanupWasGenerated = suite.currentNode.ID + node.NestingLevel = suite.currentNode.NestingLevel + suite.selectiveLock.Lock() + suite.cleanupNodes = append(suite.cleanupNodes, node) + suite.selectiveLock.Unlock() + + return nil +} + +func (suite *Suite) generateTimelineLocation() types.TimelineLocation { + suite.selectiveLock.Lock() + defer suite.selectiveLock.Unlock() + + suite.timelineOrder += 1 + return types.TimelineLocation{ + Offset: len(suite.currentSpecReport.CapturedGinkgoWriterOutput) + suite.writer.Len(), + Order: suite.timelineOrder, + Time: time.Now(), + } +} + +func (suite *Suite) handleSpecEvent(event types.SpecEvent) types.SpecEvent { + event.TimelineLocation = suite.generateTimelineLocation() + suite.selectiveLock.Lock() + suite.currentSpecReport.SpecEvents = append(suite.currentSpecReport.SpecEvents, event) + suite.selectiveLock.Unlock() + suite.reporter.EmitSpecEvent(event) + return event +} + +func (suite *Suite) handleSpecEventEnd(eventType types.SpecEventType, startEvent types.SpecEvent) { + event := startEvent + event.SpecEventType = eventType + event.TimelineLocation = suite.generateTimelineLocation() + event.Duration = event.TimelineLocation.Time.Sub(startEvent.TimelineLocation.Time) + suite.selectiveLock.Lock() + suite.currentSpecReport.SpecEvents = append(suite.currentSpecReport.SpecEvents, event) + suite.selectiveLock.Unlock() + suite.reporter.EmitSpecEvent(event) +} + +func (suite *Suite) By(text string, callback ...func()) error { + cl := types.NewCodeLocation(2) + if suite.phase != PhaseRun { + return types.GinkgoErrors.ByNotDuringRunPhase(cl) + } + + event := suite.handleSpecEvent(types.SpecEvent{ + SpecEventType: types.SpecEventByStart, + CodeLocation: cl, + Message: text, + }) + suite.selectiveLock.Lock() + suite.currentByStep = event + suite.selectiveLock.Unlock() + + if len(callback) == 1 { + defer func() { + suite.selectiveLock.Lock() + suite.currentByStep = types.SpecEvent{} + suite.selectiveLock.Unlock() + suite.handleSpecEventEnd(types.SpecEventByEnd, event) + }() + callback[0]() + } else if len(callback) > 1 { + panic("just one callback per By, please") + } + return nil +} + +/* +Spec Running methods - used during PhaseRun +*/ +func (suite *Suite) CurrentSpecReport() types.SpecReport { + suite.selectiveLock.Lock() + defer suite.selectiveLock.Unlock() + report := suite.currentSpecReport + if suite.writer != nil { + report.CapturedGinkgoWriterOutput = string(suite.writer.Bytes()) + } + report.ReportEntries = make([]ReportEntry, len(report.ReportEntries)) + copy(report.ReportEntries, suite.currentSpecReport.ReportEntries) + return report +} + +// Only valid in the preview context. In general suite.report only includes +// the specs run by _this_ node - it is only at the end of the suite that +// the parallel reports are aggregated. However in the preview context we run +// in series and +func (suite *Suite) GetPreviewReport() types.Report { + suite.selectiveLock.Lock() + defer suite.selectiveLock.Unlock() + return suite.report +} + +func (suite *Suite) AddReportEntry(entry ReportEntry) error { + if suite.phase != PhaseRun { + return types.GinkgoErrors.AddReportEntryNotDuringRunPhase(entry.Location) + } + entry.TimelineLocation = suite.generateTimelineLocation() + entry.Time = entry.TimelineLocation.Time + suite.selectiveLock.Lock() + suite.currentSpecReport.ReportEntries = append(suite.currentSpecReport.ReportEntries, entry) + suite.selectiveLock.Unlock() + suite.reporter.EmitReportEntry(entry) + return nil +} + +func (suite *Suite) generateProgressReport(fullReport bool) types.ProgressReport { + timelineLocation := suite.generateTimelineLocation() + suite.selectiveLock.Lock() + defer suite.selectiveLock.Unlock() + + deadline, cancel := context.WithTimeout(context.Background(), PROGRESS_REPORTER_DEADLING) + defer cancel() + var additionalReports []string + if suite.currentSpecContext != nil { + additionalReports = append(additionalReports, suite.currentSpecContext.QueryProgressReporters(deadline, suite.failer)...) + } + additionalReports = append(additionalReports, suite.QueryProgressReporters(deadline, suite.failer)...) + gwOutput := suite.currentSpecReport.CapturedGinkgoWriterOutput + string(suite.writer.Bytes()) + pr, err := NewProgressReport(suite.isRunningInParallel(), suite.currentSpecReport, suite.currentNode, suite.currentNodeStartTime, suite.currentByStep, gwOutput, timelineLocation, additionalReports, suite.config.SourceRoots, fullReport) + + if err != nil { + fmt.Printf("{{red}}Failed to generate progress report:{{/}}\n%s\n", err.Error()) + } + return pr +} + +func (suite *Suite) handleProgressSignal() { + report := suite.generateProgressReport(false) + report.Message = "{{bold}}You've requested a progress report:{{/}}" + suite.emitProgressReport(report) +} + +func (suite *Suite) emitProgressReport(report types.ProgressReport) { + suite.selectiveLock.Lock() + suite.currentSpecReport.ProgressReports = append(suite.currentSpecReport.ProgressReports, report.WithoutCapturedGinkgoWriterOutput()) + suite.selectiveLock.Unlock() + + suite.reporter.EmitProgressReport(report) + if suite.isRunningInParallel() { + err := suite.client.PostEmitProgressReport(report) + if err != nil { + fmt.Println(err.Error()) + } + } +} + +func (suite *Suite) isRunningInParallel() bool { + return suite.config.ParallelTotal > 1 +} + +func (suite *Suite) processCurrentSpecReport() { + suite.reporter.DidRun(suite.currentSpecReport) + if suite.isRunningInParallel() { + suite.client.PostDidRun(suite.currentSpecReport) + } + suite.report.SpecReports = append(suite.report.SpecReports, suite.currentSpecReport) + + if suite.currentSpecReport.State.Is(types.SpecStateFailureStates) { + suite.report.SuiteSucceeded = false + if suite.config.FailFast || suite.currentSpecReport.State.Is(types.SpecStateAborted) { + suite.skipAll = true + if suite.isRunningInParallel() { + suite.client.PostAbort() + } + } + } +} + +func (suite *Suite) runSpecs(description string, suiteLabels Labels, suitePath string, hasProgrammaticFocus bool, specs Specs) bool { + numSpecsThatWillBeRun := specs.CountWithoutSkip() + + suite.report = types.Report{ + SuitePath: suitePath, + SuiteDescription: description, + SuiteLabels: suiteLabels, + SuiteConfig: suite.config, + SuiteHasProgrammaticFocus: hasProgrammaticFocus, + PreRunStats: types.PreRunStats{ + TotalSpecs: len(specs), + SpecsThatWillRun: numSpecsThatWillBeRun, + }, + StartTime: time.Now(), + } + + suite.reporter.SuiteWillBegin(suite.report) + if suite.isRunningInParallel() { + suite.client.PostSuiteWillBegin(suite.report) + } + + suite.report.SuiteSucceeded = true + + suite.runReportSuiteNodesIfNeedBe(types.NodeTypeReportBeforeSuite) + + ranBeforeSuite := suite.report.SuiteSucceeded + if suite.report.SuiteSucceeded { + suite.runBeforeSuite(numSpecsThatWillBeRun) + } + + if suite.report.SuiteSucceeded { + groupedSpecIndices, serialGroupedSpecIndices := OrderSpecs(specs, suite.config) + nextIndex := MakeIncrementingIndexCounter() + if suite.isRunningInParallel() { + nextIndex = suite.client.FetchNextCounter + } + + for { + groupedSpecIdx, err := nextIndex() + if err != nil { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, fmt.Sprintf("Failed to iterate over specs:\n%s", err.Error())) + suite.report.SuiteSucceeded = false + break + } + + if groupedSpecIdx >= len(groupedSpecIndices) { + if suite.config.ParallelProcess == 1 && len(serialGroupedSpecIndices) > 0 { + groupedSpecIndices, serialGroupedSpecIndices, nextIndex = serialGroupedSpecIndices, GroupedSpecIndices{}, MakeIncrementingIndexCounter() + suite.client.BlockUntilNonprimaryProcsHaveFinished() + continue + } + break + } + + // the complexity for running groups of specs is very high because of Ordered containers and FlakeAttempts + // we encapsulate that complexity in the notion of a Group that can run + // Group is really just an extension of suite so it gets passed a suite and has access to all its internals + // Note that group is stateful and intended for single use! + newGroup(suite).run(specs.AtIndices(groupedSpecIndices[groupedSpecIdx])) + } + + if suite.config.FailOnPending && specs.HasAnySpecsMarkedPending() { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, "Detected pending specs and --fail-on-pending is set") + suite.report.SuiteSucceeded = false + } + + if suite.config.FailOnEmpty && specs.CountWithoutSkip() == 0 { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, "Detected no specs ran and --fail-on-empty is set") + suite.report.SuiteSucceeded = false + } + } + + if ranBeforeSuite { + suite.runAfterSuiteCleanup(numSpecsThatWillBeRun) + } + + interruptStatus := suite.interruptHandler.Status() + if interruptStatus.Interrupted() { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, interruptStatus.Cause.String()) + suite.report.SuiteSucceeded = false + } + suite.report.EndTime = time.Now() + suite.report.RunTime = suite.report.EndTime.Sub(suite.report.StartTime) + if !suite.deadline.IsZero() && suite.report.EndTime.After(suite.deadline) { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, "Suite Timeout Elapsed") + suite.report.SuiteSucceeded = false + } + + suite.runReportSuiteNodesIfNeedBe(types.NodeTypeReportAfterSuite) + suite.reporter.SuiteDidEnd(suite.report) + if suite.isRunningInParallel() { + suite.client.PostSuiteDidEnd(suite.report) + } + + return suite.report.SuiteSucceeded +} + +func (suite *Suite) runBeforeSuite(numSpecsThatWillBeRun int) { + beforeSuiteNode := suite.suiteNodes.FirstNodeWithType(types.NodeTypeBeforeSuite | types.NodeTypeSynchronizedBeforeSuite) + if !beforeSuiteNode.IsZero() && numSpecsThatWillBeRun > 0 { + suite.selectiveLock.Lock() + suite.currentSpecReport = types.SpecReport{ + LeafNodeType: beforeSuiteNode.NodeType, + LeafNodeLocation: beforeSuiteNode.CodeLocation, + ParallelProcess: suite.config.ParallelProcess, + RunningInParallel: suite.isRunningInParallel(), + } + suite.selectiveLock.Unlock() + + suite.reporter.WillRun(suite.currentSpecReport) + suite.runSuiteNode(beforeSuiteNode) + if suite.currentSpecReport.State.Is(types.SpecStateSkipped) { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, "Suite skipped in BeforeSuite") + suite.skipAll = true + } + suite.processCurrentSpecReport() + } +} + +func (suite *Suite) runAfterSuiteCleanup(numSpecsThatWillBeRun int) { + afterSuiteNode := suite.suiteNodes.FirstNodeWithType(types.NodeTypeAfterSuite | types.NodeTypeSynchronizedAfterSuite) + if !afterSuiteNode.IsZero() && numSpecsThatWillBeRun > 0 { + suite.selectiveLock.Lock() + suite.currentSpecReport = types.SpecReport{ + LeafNodeType: afterSuiteNode.NodeType, + LeafNodeLocation: afterSuiteNode.CodeLocation, + ParallelProcess: suite.config.ParallelProcess, + RunningInParallel: suite.isRunningInParallel(), + } + suite.selectiveLock.Unlock() + + suite.reporter.WillRun(suite.currentSpecReport) + suite.runSuiteNode(afterSuiteNode) + suite.processCurrentSpecReport() + } + + afterSuiteCleanup := suite.cleanupNodes.WithType(types.NodeTypeCleanupAfterSuite).Reverse() + if len(afterSuiteCleanup) > 0 { + for _, cleanupNode := range afterSuiteCleanup { + suite.selectiveLock.Lock() + suite.currentSpecReport = types.SpecReport{ + LeafNodeType: cleanupNode.NodeType, + LeafNodeLocation: cleanupNode.CodeLocation, + ParallelProcess: suite.config.ParallelProcess, + RunningInParallel: suite.isRunningInParallel(), + } + suite.selectiveLock.Unlock() + + suite.reporter.WillRun(suite.currentSpecReport) + suite.runSuiteNode(cleanupNode) + suite.processCurrentSpecReport() + } + } +} + +func (suite *Suite) reportEach(spec Spec, nodeType types.NodeType) { + nodes := spec.Nodes.WithType(nodeType) + if nodeType == types.NodeTypeReportAfterEach { + nodes = nodes.SortedByDescendingNestingLevel() + } + if nodeType == types.NodeTypeReportBeforeEach { + nodes = nodes.SortedByAscendingNestingLevel() + } + if len(nodes) == 0 { + return + } + + for i := range nodes { + suite.writer.Truncate() + suite.outputInterceptor.StartInterceptingOutput() + report := suite.currentSpecReport + nodes[i].Body = func(ctx SpecContext) { + nodes[i].ReportEachBody(ctx, report) + } + state, failure := suite.runNode(nodes[i], time.Time{}, spec.Nodes.BestTextFor(nodes[i])) + + // If the spec is not in a failure state (i.e. it's Passed/Skipped/Pending) and the reporter has failed, override the state. + // Also, if the reporter is every aborted - always override the state to propagate the abort + if (!suite.currentSpecReport.State.Is(types.SpecStateFailureStates) && state.Is(types.SpecStateFailureStates)) || state.Is(types.SpecStateAborted) { + suite.currentSpecReport.State = state + suite.currentSpecReport.Failure = failure + } + suite.currentSpecReport.CapturedGinkgoWriterOutput += string(suite.writer.Bytes()) + suite.currentSpecReport.CapturedStdOutErr += suite.outputInterceptor.StopInterceptingAndReturnOutput() + } +} + +func (suite *Suite) runSuiteNode(node Node) { + if suite.config.DryRun { + suite.currentSpecReport.State = types.SpecStatePassed + return + } + + suite.writer.Truncate() + suite.outputInterceptor.StartInterceptingOutput() + suite.currentSpecReport.StartTime = time.Now() + + var err error + switch node.NodeType { + case types.NodeTypeBeforeSuite, types.NodeTypeAfterSuite: + suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + case types.NodeTypeCleanupAfterSuite: + if suite.config.ParallelTotal > 1 && suite.config.ParallelProcess == 1 { + err = suite.client.BlockUntilNonprimaryProcsHaveFinished() + } + if err == nil { + suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + } + case types.NodeTypeSynchronizedBeforeSuite: + var data []byte + var runAllProcs bool + if suite.config.ParallelProcess == 1 { + if suite.config.ParallelTotal > 1 { + suite.outputInterceptor.StopInterceptingAndReturnOutput() + suite.outputInterceptor.StartInterceptingOutputAndForwardTo(suite.client) + } + node.Body = func(c SpecContext) { data = node.SynchronizedBeforeSuiteProc1Body(c) } + node.HasContext = node.SynchronizedBeforeSuiteProc1BodyHasContext + suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + if suite.config.ParallelTotal > 1 { + suite.currentSpecReport.CapturedStdOutErr += suite.outputInterceptor.StopInterceptingAndReturnOutput() + suite.outputInterceptor.StartInterceptingOutput() + if suite.currentSpecReport.State.Is(types.SpecStatePassed) { + err = suite.client.PostSynchronizedBeforeSuiteCompleted(types.SpecStatePassed, data) + } else { + err = suite.client.PostSynchronizedBeforeSuiteCompleted(suite.currentSpecReport.State, nil) + } + } + runAllProcs = suite.currentSpecReport.State.Is(types.SpecStatePassed) && err == nil + } else { + var proc1State types.SpecState + proc1State, data, err = suite.client.BlockUntilSynchronizedBeforeSuiteData() + switch proc1State { + case types.SpecStatePassed: + runAllProcs = true + case types.SpecStateFailed, types.SpecStatePanicked, types.SpecStateTimedout: + err = types.GinkgoErrors.SynchronizedBeforeSuiteFailedOnProc1() + case types.SpecStateInterrupted, types.SpecStateAborted, types.SpecStateSkipped: + suite.currentSpecReport.State = proc1State + } + } + if runAllProcs { + node.Body = func(c SpecContext) { node.SynchronizedBeforeSuiteAllProcsBody(c, data) } + node.HasContext = node.SynchronizedBeforeSuiteAllProcsBodyHasContext + suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + } + case types.NodeTypeSynchronizedAfterSuite: + node.Body = node.SynchronizedAfterSuiteAllProcsBody + node.HasContext = node.SynchronizedAfterSuiteAllProcsBodyHasContext + suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + if suite.config.ParallelProcess == 1 { + if suite.config.ParallelTotal > 1 { + err = suite.client.BlockUntilNonprimaryProcsHaveFinished() + } + if err == nil { + if suite.config.ParallelTotal > 1 { + suite.currentSpecReport.CapturedStdOutErr += suite.outputInterceptor.StopInterceptingAndReturnOutput() + suite.outputInterceptor.StartInterceptingOutputAndForwardTo(suite.client) + } + + node.Body = node.SynchronizedAfterSuiteProc1Body + node.HasContext = node.SynchronizedAfterSuiteProc1BodyHasContext + state, failure := suite.runNode(node, time.Time{}, "") + if suite.currentSpecReport.State.Is(types.SpecStatePassed) { + suite.currentSpecReport.State, suite.currentSpecReport.Failure = state, failure + } + } + } + } + + if err != nil && !suite.currentSpecReport.State.Is(types.SpecStateFailureStates) { + suite.currentSpecReport.State, suite.currentSpecReport.Failure = types.SpecStateFailed, suite.failureForLeafNodeWithMessage(node, err.Error()) + suite.reporter.EmitFailure(suite.currentSpecReport.State, suite.currentSpecReport.Failure) + } + + suite.currentSpecReport.EndTime = time.Now() + suite.currentSpecReport.RunTime = suite.currentSpecReport.EndTime.Sub(suite.currentSpecReport.StartTime) + suite.currentSpecReport.CapturedGinkgoWriterOutput = string(suite.writer.Bytes()) + suite.currentSpecReport.CapturedStdOutErr += suite.outputInterceptor.StopInterceptingAndReturnOutput() +} + +func (suite *Suite) runReportSuiteNodesIfNeedBe(nodeType types.NodeType) { + nodes := suite.suiteNodes.WithType(nodeType) + // only run ReportAfterSuite on proc 1 + if nodeType.Is(types.NodeTypeReportAfterSuite) && suite.config.ParallelProcess != 1 { + return + } + // if we're running ReportBeforeSuite on proc > 1 - we should wait until proc 1 has completed + if nodeType.Is(types.NodeTypeReportBeforeSuite) && suite.config.ParallelProcess != 1 && len(nodes) > 0 { + state, err := suite.client.BlockUntilReportBeforeSuiteCompleted() + if err != nil || state.Is(types.SpecStateFailed) { + suite.report.SuiteSucceeded = false + } + return + } + + for _, node := range nodes { + suite.selectiveLock.Lock() + suite.currentSpecReport = types.SpecReport{ + LeafNodeType: node.NodeType, + LeafNodeLocation: node.CodeLocation, + LeafNodeText: node.Text, + ParallelProcess: suite.config.ParallelProcess, + RunningInParallel: suite.isRunningInParallel(), + } + suite.selectiveLock.Unlock() + + suite.reporter.WillRun(suite.currentSpecReport) + suite.runReportSuiteNode(node, suite.report) + suite.processCurrentSpecReport() + } + + // if we're running ReportBeforeSuite and we're running in parallel - we shuld tell the other procs that we're done + if nodeType.Is(types.NodeTypeReportBeforeSuite) && suite.isRunningInParallel() && len(nodes) > 0 { + if suite.report.SuiteSucceeded { + suite.client.PostReportBeforeSuiteCompleted(types.SpecStatePassed) + } else { + suite.client.PostReportBeforeSuiteCompleted(types.SpecStateFailed) + } + } +} + +func (suite *Suite) runReportSuiteNode(node Node, report types.Report) { + suite.writer.Truncate() + suite.outputInterceptor.StartInterceptingOutput() + suite.currentSpecReport.StartTime = time.Now() + + // if we're running a ReportAfterSuite in parallel (on proc 1) we (a) wait until other procs have exited and + // (b) always fetch the latest report as prior ReportAfterSuites will contribute to it + if node.NodeType.Is(types.NodeTypeReportAfterSuite) && suite.isRunningInParallel() { + aggregatedReport, err := suite.client.BlockUntilAggregatedNonprimaryProcsReport() + if err != nil { + suite.currentSpecReport.State, suite.currentSpecReport.Failure = types.SpecStateFailed, suite.failureForLeafNodeWithMessage(node, err.Error()) + suite.reporter.EmitFailure(suite.currentSpecReport.State, suite.currentSpecReport.Failure) + return + } + report = report.Add(aggregatedReport) + } + + node.Body = func(ctx SpecContext) { node.ReportSuiteBody(ctx, report) } + suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + + suite.currentSpecReport.EndTime = time.Now() + suite.currentSpecReport.RunTime = suite.currentSpecReport.EndTime.Sub(suite.currentSpecReport.StartTime) + suite.currentSpecReport.CapturedGinkgoWriterOutput = string(suite.writer.Bytes()) + suite.currentSpecReport.CapturedStdOutErr = suite.outputInterceptor.StopInterceptingAndReturnOutput() +} + +func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (types.SpecState, types.Failure) { + if node.NodeType.Is(types.NodeTypeCleanupAfterEach | types.NodeTypeCleanupAfterAll | types.NodeTypeCleanupAfterSuite) { + suite.cleanupNodes = suite.cleanupNodes.WithoutNode(node) + } + + interruptStatus := suite.interruptHandler.Status() + if interruptStatus.Level == interrupt_handler.InterruptLevelBailOut { + return types.SpecStateSkipped, types.Failure{} + } + if interruptStatus.Level == interrupt_handler.InterruptLevelReportOnly && !node.NodeType.Is(types.NodeTypesAllowedDuringReportInterrupt) { + return types.SpecStateSkipped, types.Failure{} + } + if interruptStatus.Level == interrupt_handler.InterruptLevelCleanupAndReport && !node.NodeType.Is(types.NodeTypesAllowedDuringReportInterrupt|types.NodeTypesAllowedDuringCleanupInterrupt) { + return types.SpecStateSkipped, types.Failure{} + } + + suite.selectiveLock.Lock() + suite.currentNode = node + suite.currentNodeStartTime = time.Now() + suite.currentByStep = types.SpecEvent{} + suite.selectiveLock.Unlock() + defer func() { + suite.selectiveLock.Lock() + suite.currentNode = Node{} + suite.currentNodeStartTime = time.Time{} + suite.selectiveLock.Unlock() + }() + + if text == "" { + text = "TOP-LEVEL" + } + event := suite.handleSpecEvent(types.SpecEvent{ + SpecEventType: types.SpecEventNodeStart, + NodeType: node.NodeType, + Message: text, + CodeLocation: node.CodeLocation, + }) + defer func() { + suite.handleSpecEventEnd(types.SpecEventNodeEnd, event) + }() + + var failure types.Failure + failure.FailureNodeType, failure.FailureNodeLocation = node.NodeType, node.CodeLocation + if node.NodeType.Is(types.NodeTypeIt) || node.NodeType.Is(types.NodeTypesForSuiteLevelNodes) { + failure.FailureNodeContext = types.FailureNodeIsLeafNode + } else if node.NestingLevel <= 0 { + failure.FailureNodeContext = types.FailureNodeAtTopLevel + } else { + failure.FailureNodeContext, failure.FailureNodeContainerIndex = types.FailureNodeInContainer, node.NestingLevel-1 + } + var outcome types.SpecState + + gracePeriod := suite.config.GracePeriod + if node.GracePeriod >= 0 { + gracePeriod = node.GracePeriod + } + + now := time.Now() + deadline := suite.deadline + timeoutInPlay := "suite" + if deadline.IsZero() || (!specDeadline.IsZero() && specDeadline.Before(deadline)) { + deadline = specDeadline + timeoutInPlay = "spec" + } + if node.NodeTimeout > 0 && (deadline.IsZero() || deadline.Sub(now) > node.NodeTimeout) { + deadline = now.Add(node.NodeTimeout) + timeoutInPlay = "node" + } + if (!deadline.IsZero() && deadline.Before(now)) || interruptStatus.Interrupted() { + // we're out of time already. let's wait for a NodeTimeout if we have it, or GracePeriod if we don't + if node.NodeTimeout > 0 { + deadline = now.Add(node.NodeTimeout) + timeoutInPlay = "node" + } else { + deadline = now.Add(gracePeriod) + timeoutInPlay = "grace period" + } + } + + if !node.HasContext { + // this maps onto the pre-context behavior: + // - an interrupted node exits immediately. with this, context-less nodes that are in a spec with a SpecTimeout and/or are interrupted by other means will simply exit immediately after the timeout/interrupt + // - clean up nodes have up to GracePeriod (formerly hard-coded at 30s) to complete before they are interrupted + gracePeriod = 0 + } + + sc := NewSpecContext(suite) + defer sc.cancel(fmt.Errorf("spec has finished")) + + suite.selectiveLock.Lock() + suite.currentSpecContext = sc + suite.selectiveLock.Unlock() + + var deadlineChannel <-chan time.Time + if !deadline.IsZero() { + deadlineChannel = time.After(deadline.Sub(now)) + } + var gracePeriodChannel <-chan time.Time + + outcomeC := make(chan types.SpecState) + failureC := make(chan types.Failure) + + go func() { + finished := false + defer func() { + if e := recover(); e != nil || !finished { + suite.failer.Panic(types.NewCodeLocationWithStackTrace(2), e) + } + + outcomeFromRun, failureFromRun := suite.failer.Drain() + failureFromRun.TimelineLocation = suite.generateTimelineLocation() + outcomeC <- outcomeFromRun + failureC <- failureFromRun + }() + + node.Body(sc) + finished = true + }() + + // progress polling timer and channel + var emitProgressNow <-chan time.Time + var progressPoller *time.Timer + var pollProgressAfter, pollProgressInterval = suite.config.PollProgressAfter, suite.config.PollProgressInterval + if node.PollProgressAfter >= 0 { + pollProgressAfter = node.PollProgressAfter + } + if node.PollProgressInterval >= 0 { + pollProgressInterval = node.PollProgressInterval + } + if pollProgressAfter > 0 { + progressPoller = time.NewTimer(pollProgressAfter) + emitProgressNow = progressPoller.C + defer progressPoller.Stop() + } + + // now we wait for an outcome, an interrupt, a timeout, or a progress poll + for { + select { + case outcomeFromRun := <-outcomeC: + failureFromRun := <-failureC + if outcome.Is(types.SpecStateInterrupted | types.SpecStateTimedout) { + // we've already been interrupted/timed out. we just managed to actually exit + // before the grace period elapsed + // if we have a failure message we attach it as an additional failure + if outcomeFromRun != types.SpecStatePassed { + additionalFailure := types.AdditionalFailure{ + State: outcomeFromRun, + Failure: failure, // we make a copy - this will include all the configuration set up above... + } + // ...and then we update the failure with the details from failureFromRun + additionalFailure.Failure.Location, additionalFailure.Failure.ForwardedPanic, additionalFailure.Failure.TimelineLocation = failureFromRun.Location, failureFromRun.ForwardedPanic, failureFromRun.TimelineLocation + additionalFailure.Failure.ProgressReport = types.ProgressReport{} + if outcome == types.SpecStateTimedout { + additionalFailure.Failure.Message = fmt.Sprintf("A %s timeout occurred and then the following failure was recorded in the timedout node before it exited:\n%s", timeoutInPlay, failureFromRun.Message) + } else { + additionalFailure.Failure.Message = fmt.Sprintf("An interrupt occurred and then the following failure was recorded in the interrupted node before it exited:\n%s", failureFromRun.Message) + } + suite.reporter.EmitFailure(additionalFailure.State, additionalFailure.Failure) + failure.AdditionalFailure = &additionalFailure + } + return outcome, failure + } + if outcomeFromRun.Is(types.SpecStatePassed) { + return outcomeFromRun, types.Failure{} + } else { + failure.Message, failure.Location, failure.ForwardedPanic, failure.TimelineLocation = failureFromRun.Message, failureFromRun.Location, failureFromRun.ForwardedPanic, failureFromRun.TimelineLocation + suite.reporter.EmitFailure(outcomeFromRun, failure) + return outcomeFromRun, failure + } + case <-gracePeriodChannel: + if node.HasContext && outcome.Is(types.SpecStateTimedout) { + report := suite.generateProgressReport(false) + report.Message = "{{bold}}{{orange}}A running node failed to exit in time{{/}}\nGinkgo is moving on but a node has timed out and failed to exit before its grace period elapsed. The node has now leaked and is running in the background.\nHere's a current progress report:" + suite.emitProgressReport(report) + } + return outcome, failure + case <-deadlineChannel: + // we're out of time - the outcome is a timeout and we capture the failure and progress report + outcome = types.SpecStateTimedout + failure.Message, failure.Location, failure.TimelineLocation = fmt.Sprintf("A %s timeout occurred", timeoutInPlay), node.CodeLocation, suite.generateTimelineLocation() + failure.ProgressReport = suite.generateProgressReport(false).WithoutCapturedGinkgoWriterOutput() + failure.ProgressReport.Message = fmt.Sprintf("{{bold}}This is the Progress Report generated when the %s timeout occurred:{{/}}", timeoutInPlay) + deadlineChannel = nil + suite.reporter.EmitFailure(outcome, failure) + + // tell the spec to stop. it's important we generate the progress report first to make sure we capture where + // the spec is actually stuck + sc.cancel(fmt.Errorf("%s timeout occurred", timeoutInPlay)) + // and now we wait for the grace period + gracePeriodChannel = time.After(gracePeriod) + case <-interruptStatus.Channel: + interruptStatus = suite.interruptHandler.Status() + // ignore interruption from other process if we are cleaning up or reporting + if interruptStatus.Cause == interrupt_handler.InterruptCauseAbortByOtherProcess && + node.NodeType.Is(types.NodeTypesAllowedDuringReportInterrupt|types.NodeTypesAllowedDuringCleanupInterrupt) { + continue + } + + deadlineChannel = nil // don't worry about deadlines, time's up now + + failureTimelineLocation := suite.generateTimelineLocation() + progressReport := suite.generateProgressReport(true) + + if outcome == types.SpecStateInvalid { + outcome = types.SpecStateInterrupted + failure.Message, failure.Location, failure.TimelineLocation = interruptStatus.Message(), node.CodeLocation, failureTimelineLocation + if interruptStatus.ShouldIncludeProgressReport() { + failure.ProgressReport = progressReport.WithoutCapturedGinkgoWriterOutput() + failure.ProgressReport.Message = "{{bold}}This is the Progress Report generated when the interrupt was received:{{/}}" + } + suite.reporter.EmitFailure(outcome, failure) + } + + progressReport = progressReport.WithoutOtherGoroutines() + sc.cancel(fmt.Errorf(interruptStatus.Message())) + + if interruptStatus.Level == interrupt_handler.InterruptLevelBailOut { + if interruptStatus.ShouldIncludeProgressReport() { + progressReport.Message = fmt.Sprintf("{{bold}}{{orange}}%s{{/}}\n{{bold}}{{red}}Final interrupt received{{/}}; Ginkgo will not run any cleanup or reporting nodes and will terminate as soon as possible.\nHere's a current progress report:", interruptStatus.Message()) + suite.emitProgressReport(progressReport) + } + return outcome, failure + } + if interruptStatus.ShouldIncludeProgressReport() { + if interruptStatus.Level == interrupt_handler.InterruptLevelCleanupAndReport { + progressReport.Message = fmt.Sprintf("{{bold}}{{orange}}%s{{/}}\nFirst interrupt received; Ginkgo will run any cleanup and reporting nodes but will skip all remaining specs. {{bold}}Interrupt again to skip cleanup{{/}}.\nHere's a current progress report:", interruptStatus.Message()) + } else if interruptStatus.Level == interrupt_handler.InterruptLevelReportOnly { + progressReport.Message = fmt.Sprintf("{{bold}}{{orange}}%s{{/}}\nSecond interrupt received; Ginkgo will run any reporting nodes but will skip all remaining specs and cleanup nodes. {{bold}}Interrupt again to bail immediately{{/}}.\nHere's a current progress report:", interruptStatus.Message()) + } + suite.emitProgressReport(progressReport) + } + + if gracePeriodChannel == nil { + // we haven't given grace yet... so let's + gracePeriodChannel = time.After(gracePeriod) + } else { + // we've already given grace. time's up. now. + return outcome, failure + } + case <-emitProgressNow: + report := suite.generateProgressReport(false) + report.Message = "{{bold}}Automatically polling progress:{{/}}" + suite.emitProgressReport(report) + if pollProgressInterval > 0 { + progressPoller.Reset(pollProgressInterval) + } + } + } +} + +// TODO: search for usages and consider if reporter.EmitFailure() is necessary +func (suite *Suite) failureForLeafNodeWithMessage(node Node, message string) types.Failure { + return types.Failure{ + Message: message, + Location: node.CodeLocation, + TimelineLocation: suite.generateTimelineLocation(), + FailureNodeContext: types.FailureNodeIsLeafNode, + FailureNodeType: node.NodeType, + FailureNodeLocation: node.CodeLocation, + } +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go b/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go new file mode 100644 index 000000000..73e265565 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go @@ -0,0 +1,210 @@ +package testingtproxy + +import ( + "fmt" + "io" + "os" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/internal" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +type failFunc func(message string, callerSkip ...int) +type skipFunc func(message string, callerSkip ...int) +type cleanupFunc func(args ...any) +type reportFunc func() types.SpecReport +type addReportEntryFunc func(names string, args ...any) +type ginkgoWriterInterface interface { + io.Writer + + Print(a ...interface{}) + Printf(format string, a ...interface{}) + Println(a ...interface{}) +} +type ginkgoRecoverFunc func() +type attachProgressReporterFunc func(func() string) func() + +func New(writer ginkgoWriterInterface, fail failFunc, skip skipFunc, cleanup cleanupFunc, report reportFunc, addReportEntry addReportEntryFunc, ginkgoRecover ginkgoRecoverFunc, attachProgressReporter attachProgressReporterFunc, randomSeed int64, parallelProcess int, parallelTotal int, noColor bool, offset int) *ginkgoTestingTProxy { + return &ginkgoTestingTProxy{ + fail: fail, + offset: offset, + writer: writer, + skip: skip, + cleanup: cleanup, + report: report, + addReportEntry: addReportEntry, + ginkgoRecover: ginkgoRecover, + attachProgressReporter: attachProgressReporter, + randomSeed: randomSeed, + parallelProcess: parallelProcess, + parallelTotal: parallelTotal, + f: formatter.NewWithNoColorBool(noColor), + } +} + +type ginkgoTestingTProxy struct { + fail failFunc + skip skipFunc + cleanup cleanupFunc + report reportFunc + offset int + writer ginkgoWriterInterface + addReportEntry addReportEntryFunc + ginkgoRecover ginkgoRecoverFunc + attachProgressReporter attachProgressReporterFunc + randomSeed int64 + parallelProcess int + parallelTotal int + f formatter.Formatter +} + +// basic testing.T support + +func (t *ginkgoTestingTProxy) Cleanup(f func()) { + t.cleanup(f, internal.Offset(1)) +} + +func (t *ginkgoTestingTProxy) Setenv(key, value string) { + originalValue, exists := os.LookupEnv(key) + if exists { + t.cleanup(os.Setenv, key, originalValue, internal.Offset(1)) + } else { + t.cleanup(os.Unsetenv, key, internal.Offset(1)) + } + + err := os.Setenv(key, value) + if err != nil { + t.fail(fmt.Sprintf("Failed to set environment variable: %v", err), 1) + } +} + +func (t *ginkgoTestingTProxy) Error(args ...interface{}) { + t.fail(fmt.Sprintln(args...), t.offset) +} + +func (t *ginkgoTestingTProxy) Errorf(format string, args ...interface{}) { + t.fail(fmt.Sprintf(format, args...), t.offset) +} + +func (t *ginkgoTestingTProxy) Fail() { + t.fail("failed", t.offset) +} + +func (t *ginkgoTestingTProxy) FailNow() { + t.fail("failed", t.offset) +} + +func (t *ginkgoTestingTProxy) Failed() bool { + return t.report().Failed() +} + +func (t *ginkgoTestingTProxy) Fatal(args ...interface{}) { + t.fail(fmt.Sprintln(args...), t.offset) +} + +func (t *ginkgoTestingTProxy) Fatalf(format string, args ...interface{}) { + t.fail(fmt.Sprintf(format, args...), t.offset) +} + +func (t *ginkgoTestingTProxy) Helper() { + types.MarkAsHelper(1) +} + +func (t *ginkgoTestingTProxy) Log(args ...interface{}) { + fmt.Fprintln(t.writer, args...) +} + +func (t *ginkgoTestingTProxy) Logf(format string, args ...interface{}) { + t.Log(fmt.Sprintf(format, args...)) +} + +func (t *ginkgoTestingTProxy) Name() string { + return t.report().FullText() +} + +func (t *ginkgoTestingTProxy) Parallel() { + // No-op +} + +func (t *ginkgoTestingTProxy) Skip(args ...interface{}) { + t.skip(fmt.Sprintln(args...), t.offset) +} + +func (t *ginkgoTestingTProxy) SkipNow() { + t.skip("skip", t.offset) +} + +func (t *ginkgoTestingTProxy) Skipf(format string, args ...interface{}) { + t.skip(fmt.Sprintf(format, args...), t.offset) +} + +func (t *ginkgoTestingTProxy) Skipped() bool { + return t.report().State.Is(types.SpecStateSkipped) +} + +func (t *ginkgoTestingTProxy) TempDir() string { + tmpDir, err := os.MkdirTemp("", "ginkgo") + if err != nil { + t.fail(fmt.Sprintf("Failed to create temporary directory: %v", err), 1) + return "" + } + t.cleanup(os.RemoveAll, tmpDir) + + return tmpDir +} + +// FullGinkgoTInterface +func (t *ginkgoTestingTProxy) AddReportEntryVisibilityAlways(name string, args ...any) { + finalArgs := []any{internal.Offset(1), types.ReportEntryVisibilityAlways} + t.addReportEntry(name, append(finalArgs, args...)...) +} +func (t *ginkgoTestingTProxy) AddReportEntryVisibilityFailureOrVerbose(name string, args ...any) { + finalArgs := []any{internal.Offset(1), types.ReportEntryVisibilityFailureOrVerbose} + t.addReportEntry(name, append(finalArgs, args...)...) +} +func (t *ginkgoTestingTProxy) AddReportEntryVisibilityNever(name string, args ...any) { + finalArgs := []any{internal.Offset(1), types.ReportEntryVisibilityNever} + t.addReportEntry(name, append(finalArgs, args...)...) +} +func (t *ginkgoTestingTProxy) Print(a ...any) { + t.writer.Print(a...) +} +func (t *ginkgoTestingTProxy) Printf(format string, a ...any) { + t.writer.Printf(format, a...) +} +func (t *ginkgoTestingTProxy) Println(a ...any) { + t.writer.Println(a...) +} +func (t *ginkgoTestingTProxy) F(format string, args ...any) string { + return t.f.F(format, args...) +} +func (t *ginkgoTestingTProxy) Fi(indentation uint, format string, args ...any) string { + return t.f.Fi(indentation, format, args...) +} +func (t *ginkgoTestingTProxy) Fiw(indentation uint, maxWidth uint, format string, args ...any) string { + return t.f.Fiw(indentation, maxWidth, format, args...) +} +func (t *ginkgoTestingTProxy) RenderTimeline() string { + return reporters.RenderTimeline(t.report(), false) +} +func (t *ginkgoTestingTProxy) GinkgoRecover() { + t.ginkgoRecover() +} +func (t *ginkgoTestingTProxy) DeferCleanup(args ...any) { + finalArgs := []any{internal.Offset(1)} + t.cleanup(append(finalArgs, args...)...) +} +func (t *ginkgoTestingTProxy) RandomSeed() int64 { + return t.randomSeed +} +func (t *ginkgoTestingTProxy) ParallelProcess() int { + return t.parallelProcess +} +func (t *ginkgoTestingTProxy) ParallelTotal() int { + return t.parallelTotal +} +func (t *ginkgoTestingTProxy) AttachProgressReporter(f func() string) func() { + return t.attachProgressReporter(f) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/tree.go b/vendor/github.com/onsi/ginkgo/v2/internal/tree.go new file mode 100644 index 000000000..f9d1eeb8f --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/tree.go @@ -0,0 +1,77 @@ +package internal + +import "github.com/onsi/ginkgo/v2/types" + +type TreeNode struct { + Node Node + Parent *TreeNode + Children TreeNodes +} + +func (tn *TreeNode) AppendChild(child *TreeNode) { + tn.Children = append(tn.Children, child) + child.Parent = tn +} + +func (tn *TreeNode) AncestorNodeChain() Nodes { + if tn.Parent == nil || tn.Parent.Node.IsZero() { + return Nodes{tn.Node} + } + return append(tn.Parent.AncestorNodeChain(), tn.Node) +} + +type TreeNodes []*TreeNode + +func (tn TreeNodes) Nodes() Nodes { + out := make(Nodes, len(tn)) + for i := range tn { + out[i] = tn[i].Node + } + return out +} + +func (tn TreeNodes) WithID(id uint) *TreeNode { + for i := range tn { + if tn[i].Node.ID == id { + return tn[i] + } + } + + return nil +} + +func GenerateSpecsFromTreeRoot(tree *TreeNode) Specs { + var walkTree func(nestingLevel int, lNodes Nodes, rNodes Nodes, trees TreeNodes) Specs + walkTree = func(nestingLevel int, lNodes Nodes, rNodes Nodes, trees TreeNodes) Specs { + tests := Specs{} + + nodes := make(Nodes, len(trees)) + for i := range trees { + nodes[i] = trees[i].Node + nodes[i].NestingLevel = nestingLevel + } + + for i := range nodes { + if !nodes[i].NodeType.Is(types.NodeTypesForContainerAndIt) { + continue + } + leftNodes, rightNodes := nodes.SplitAround(nodes[i]) + leftNodes = leftNodes.WithoutType(types.NodeTypesForContainerAndIt) + rightNodes = rightNodes.WithoutType(types.NodeTypesForContainerAndIt) + + leftNodes = lNodes.CopyAppend(leftNodes...) + rightNodes = rightNodes.CopyAppend(rNodes...) + + if nodes[i].NodeType.Is(types.NodeTypeIt) { + tests = append(tests, Spec{Nodes: leftNodes.CopyAppend(nodes[i]).CopyAppend(rightNodes...)}) + } else { + treeNode := trees.WithID(nodes[i].ID) + tests = append(tests, walkTree(nestingLevel+1, leftNodes.CopyAppend(nodes[i]), rightNodes, treeNode.Children)...) + } + } + + return tests + } + + return walkTree(0, Nodes{}, Nodes{}, tree.Children) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/writer.go b/vendor/github.com/onsi/ginkgo/v2/internal/writer.go new file mode 100644 index 000000000..aab42d5fb --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/internal/writer.go @@ -0,0 +1,144 @@ +package internal + +import ( + "bytes" + "fmt" + "io" + "sync" + + "github.com/go-logr/logr" + "github.com/go-logr/logr/funcr" +) + +type WriterMode uint + +const ( + WriterModeStreamAndBuffer WriterMode = iota + WriterModeBufferOnly +) + +type WriterInterface interface { + io.Writer + + Truncate() + Bytes() []byte + Len() int +} + +// Writer implements WriterInterface and GinkgoWriterInterface +type Writer struct { + buffer *bytes.Buffer + outWriter io.Writer + lock *sync.Mutex + mode WriterMode + + streamIndent []byte + indentNext bool + + teeWriters []io.Writer +} + +func NewWriter(outWriter io.Writer) *Writer { + return &Writer{ + buffer: &bytes.Buffer{}, + lock: &sync.Mutex{}, + outWriter: outWriter, + mode: WriterModeStreamAndBuffer, + streamIndent: []byte(" "), + indentNext: true, + } +} + +func (w *Writer) SetMode(mode WriterMode) { + w.lock.Lock() + defer w.lock.Unlock() + w.mode = mode +} + +func (w *Writer) Len() int { + w.lock.Lock() + defer w.lock.Unlock() + return w.buffer.Len() +} + +var newline = []byte("\n") + +func (w *Writer) Write(b []byte) (n int, err error) { + w.lock.Lock() + defer w.lock.Unlock() + + for _, teeWriter := range w.teeWriters { + teeWriter.Write(b) + } + + if w.mode == WriterModeStreamAndBuffer { + line, remaining, found := []byte{}, b, false + for len(remaining) > 0 { + line, remaining, found = bytes.Cut(remaining, newline) + if len(line) > 0 { + if w.indentNext { + w.outWriter.Write(w.streamIndent) + w.indentNext = false + } + w.outWriter.Write(line) + } + if found { + w.outWriter.Write(newline) + w.indentNext = true + } + } + } + return w.buffer.Write(b) +} + +func (w *Writer) Truncate() { + w.lock.Lock() + defer w.lock.Unlock() + w.buffer.Reset() +} + +func (w *Writer) Bytes() []byte { + w.lock.Lock() + defer w.lock.Unlock() + b := w.buffer.Bytes() + copied := make([]byte, len(b)) + copy(copied, b) + return copied +} + +// GinkgoWriterInterface +func (w *Writer) TeeTo(writer io.Writer) { + w.lock.Lock() + defer w.lock.Unlock() + + w.teeWriters = append(w.teeWriters, writer) +} + +func (w *Writer) ClearTeeWriters() { + w.lock.Lock() + defer w.lock.Unlock() + + w.teeWriters = []io.Writer{} +} + +func (w *Writer) Print(a ...interface{}) { + fmt.Fprint(w, a...) +} + +func (w *Writer) Printf(format string, a ...interface{}) { + fmt.Fprintf(w, format, a...) +} + +func (w *Writer) Println(a ...interface{}) { + fmt.Fprintln(w, a...) +} + +func GinkgoLogrFunc(writer *Writer) logr.Logger { + return funcr.New(func(prefix, args string) { + if prefix == "" { + writer.Printf("%s\n", args) + } else { + writer.Printf("%s %s\n", prefix, args) + } + }, funcr.Options{}) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go b/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go new file mode 100644 index 000000000..480730486 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go @@ -0,0 +1,788 @@ +/* +Ginkgo's Default Reporter + +A number of command line flags are available to tweak Ginkgo's default output. + +These are documented [here](http://onsi.github.io/ginkgo/#running_tests) +*/ +package reporters + +import ( + "fmt" + "io" + "runtime" + "strings" + "sync" + "time" + + "github.com/onsi/ginkgo/v2/formatter" + "github.com/onsi/ginkgo/v2/types" +) + +type DefaultReporter struct { + conf types.ReporterConfig + writer io.Writer + + // managing the emission stream + lastCharWasNewline bool + lastEmissionWasDelimiter bool + + // rendering + specDenoter string + retryDenoter string + formatter formatter.Formatter + + runningInParallel bool + lock *sync.Mutex +} + +func NewDefaultReporterUnderTest(conf types.ReporterConfig, writer io.Writer) *DefaultReporter { + reporter := NewDefaultReporter(conf, writer) + reporter.formatter = formatter.New(formatter.ColorModePassthrough) + + return reporter +} + +func NewDefaultReporter(conf types.ReporterConfig, writer io.Writer) *DefaultReporter { + reporter := &DefaultReporter{ + conf: conf, + writer: writer, + + lastCharWasNewline: true, + lastEmissionWasDelimiter: false, + + specDenoter: "•", + retryDenoter: "↺", + formatter: formatter.NewWithNoColorBool(conf.NoColor), + lock: &sync.Mutex{}, + } + if runtime.GOOS == "windows" { + reporter.specDenoter = "+" + reporter.retryDenoter = "R" + } + + return reporter +} + +/* The Reporter Interface */ + +func (r *DefaultReporter) SuiteWillBegin(report types.Report) { + if r.conf.Verbosity().Is(types.VerbosityLevelSuccinct) { + r.emit(r.f("[%d] {{bold}}%s{{/}} ", report.SuiteConfig.RandomSeed, report.SuiteDescription)) + if len(report.SuiteLabels) > 0 { + r.emit(r.f("{{coral}}[%s]{{/}} ", strings.Join(report.SuiteLabels, ", "))) + } + r.emit(r.f("- %d/%d specs ", report.PreRunStats.SpecsThatWillRun, report.PreRunStats.TotalSpecs)) + if report.SuiteConfig.ParallelTotal > 1 { + r.emit(r.f("- %d procs ", report.SuiteConfig.ParallelTotal)) + } + } else { + banner := r.f("Running Suite: %s - %s", report.SuiteDescription, report.SuitePath) + r.emitBlock(banner) + bannerWidth := len(banner) + if len(report.SuiteLabels) > 0 { + labels := strings.Join(report.SuiteLabels, ", ") + r.emitBlock(r.f("{{coral}}[%s]{{/}} ", labels)) + if len(labels)+2 > bannerWidth { + bannerWidth = len(labels) + 2 + } + } + r.emitBlock(strings.Repeat("=", bannerWidth)) + + out := r.f("Random Seed: {{bold}}%d{{/}}", report.SuiteConfig.RandomSeed) + if report.SuiteConfig.RandomizeAllSpecs { + out += r.f(" - will randomize all specs") + } + r.emitBlock(out) + r.emit("\n") + r.emitBlock(r.f("Will run {{bold}}%d{{/}} of {{bold}}%d{{/}} specs", report.PreRunStats.SpecsThatWillRun, report.PreRunStats.TotalSpecs)) + if report.SuiteConfig.ParallelTotal > 1 { + r.emitBlock(r.f("Running in parallel across {{bold}}%d{{/}} processes", report.SuiteConfig.ParallelTotal)) + } + } +} + +func (r *DefaultReporter) SuiteDidEnd(report types.Report) { + failures := report.SpecReports.WithState(types.SpecStateFailureStates) + if len(failures) > 0 { + r.emitBlock("\n") + if len(failures) > 1 { + r.emitBlock(r.f("{{red}}{{bold}}Summarizing %d Failures:{{/}}", len(failures))) + } else { + r.emitBlock(r.f("{{red}}{{bold}}Summarizing 1 Failure:{{/}}")) + } + for _, specReport := range failures { + highlightColor, heading := "{{red}}", "[FAIL]" + switch specReport.State { + case types.SpecStatePanicked: + highlightColor, heading = "{{magenta}}", "[PANICKED!]" + case types.SpecStateAborted: + highlightColor, heading = "{{coral}}", "[ABORTED]" + case types.SpecStateTimedout: + highlightColor, heading = "{{orange}}", "[TIMEDOUT]" + case types.SpecStateInterrupted: + highlightColor, heading = "{{orange}}", "[INTERRUPTED]" + } + locationBlock := r.codeLocationBlock(specReport, highlightColor, false, true) + r.emitBlock(r.fi(1, highlightColor+"%s{{/}} %s", heading, locationBlock)) + } + } + + //summarize the suite + if r.conf.Verbosity().Is(types.VerbosityLevelSuccinct) && report.SuiteSucceeded { + r.emit(r.f(" {{green}}SUCCESS!{{/}} %s ", report.RunTime)) + return + } + + r.emitBlock("\n") + color, status := "{{green}}{{bold}}", "SUCCESS!" + if !report.SuiteSucceeded { + color, status = "{{red}}{{bold}}", "FAIL!" + } + + specs := report.SpecReports.WithLeafNodeType(types.NodeTypeIt) //exclude any suite setup nodes + r.emitBlock(r.f(color+"Ran %d of %d Specs in %.3f seconds{{/}}", + specs.CountWithState(types.SpecStatePassed)+specs.CountWithState(types.SpecStateFailureStates), + report.PreRunStats.TotalSpecs, + report.RunTime.Seconds()), + ) + + switch len(report.SpecialSuiteFailureReasons) { + case 0: + r.emit(r.f(color+"%s{{/}} -- ", status)) + case 1: + r.emit(r.f(color+"%s - %s{{/}} -- ", status, report.SpecialSuiteFailureReasons[0])) + default: + r.emitBlock(r.f(color+"%s - %s{{/}}\n", status, strings.Join(report.SpecialSuiteFailureReasons, ", "))) + } + + if len(specs) == 0 && report.SpecReports.WithLeafNodeType(types.NodeTypeBeforeSuite|types.NodeTypeSynchronizedBeforeSuite).CountWithState(types.SpecStateFailureStates) > 0 { + r.emit(r.f("{{cyan}}{{bold}}A BeforeSuite node failed so all tests were skipped.{{/}}\n")) + } else { + r.emit(r.f("{{green}}{{bold}}%d Passed{{/}} | ", specs.CountWithState(types.SpecStatePassed))) + r.emit(r.f("{{red}}{{bold}}%d Failed{{/}} | ", specs.CountWithState(types.SpecStateFailureStates))) + if specs.CountOfFlakedSpecs() > 0 { + r.emit(r.f("{{light-yellow}}{{bold}}%d Flaked{{/}} | ", specs.CountOfFlakedSpecs())) + } + if specs.CountOfRepeatedSpecs() > 0 { + r.emit(r.f("{{light-yellow}}{{bold}}%d Repeated{{/}} | ", specs.CountOfRepeatedSpecs())) + } + r.emit(r.f("{{yellow}}{{bold}}%d Pending{{/}} | ", specs.CountWithState(types.SpecStatePending))) + r.emit(r.f("{{cyan}}{{bold}}%d Skipped{{/}}\n", specs.CountWithState(types.SpecStateSkipped))) + } +} + +func (r *DefaultReporter) WillRun(report types.SpecReport) { + v := r.conf.Verbosity() + if v.LT(types.VerbosityLevelVerbose) || report.State.Is(types.SpecStatePending|types.SpecStateSkipped) || report.RunningInParallel { + return + } + + r.emitDelimiter(0) + r.emitBlock(r.f(r.codeLocationBlock(report, "{{/}}", v.Is(types.VerbosityLevelVeryVerbose), false))) +} + +func (r *DefaultReporter) wrapTextBlock(sectionName string, fn func()) { + r.emitBlock("\n") + if r.conf.GithubOutput { + r.emitBlock(r.fi(1, "::group::%s", sectionName)) + } else { + r.emitBlock(r.fi(1, "{{gray}}%s >>{{/}}", sectionName)) + } + fn() + if r.conf.GithubOutput { + r.emitBlock(r.fi(1, "::endgroup::")) + } else { + r.emitBlock(r.fi(1, "{{gray}}<< %s{{/}}", sectionName)) + } + +} + +func (r *DefaultReporter) DidRun(report types.SpecReport) { + v := r.conf.Verbosity() + inParallel := report.RunningInParallel + + //should we completely omit this spec? + if report.State.Is(types.SpecStateSkipped) && r.conf.SilenceSkips { + return + } + + header := r.specDenoter + if report.LeafNodeType.Is(types.NodeTypesForSuiteLevelNodes) { + header = fmt.Sprintf("[%s]", report.LeafNodeType) + } + highlightColor := r.highlightColorForState(report.State) + + // have we already been streaming the timeline? + timelineHasBeenStreaming := v.GTE(types.VerbosityLevelVerbose) && !inParallel + + // should we show the timeline? + var timeline types.Timeline + showTimeline := !timelineHasBeenStreaming && (v.GTE(types.VerbosityLevelVerbose) || report.Failed()) + if showTimeline { + timeline = report.Timeline().WithoutHiddenReportEntries() + keepVeryVerboseSpecEvents := v.Is(types.VerbosityLevelVeryVerbose) || + (v.Is(types.VerbosityLevelVerbose) && r.conf.ShowNodeEvents) || + (report.Failed() && r.conf.ShowNodeEvents) + if !keepVeryVerboseSpecEvents { + timeline = timeline.WithoutVeryVerboseSpecEvents() + } + if len(timeline) == 0 && report.CapturedGinkgoWriterOutput == "" { + // the timeline is completely empty - don't show it + showTimeline = false + } + if v.LT(types.VerbosityLevelVeryVerbose) && report.CapturedGinkgoWriterOutput == "" && len(timeline) > 0 { + //if we aren't -vv and the timeline only has a single failure, don't show it as it will appear at the end of the report + failure, isFailure := timeline[0].(types.Failure) + if isFailure && (len(timeline) == 1 || (len(timeline) == 2 && failure.AdditionalFailure != nil)) { + showTimeline = false + } + } + } + + // should we have a separate section for always-visible reports? + showSeparateVisibilityAlwaysReportsSection := !timelineHasBeenStreaming && !showTimeline && report.ReportEntries.HasVisibility(types.ReportEntryVisibilityAlways) + + // should we have a separate section for captured stdout/stderr + showSeparateStdSection := inParallel && (report.CapturedStdOutErr != "") + + // given all that - do we have any actual content to show? or are we a single denoter in a stream? + reportHasContent := v.Is(types.VerbosityLevelVeryVerbose) || showTimeline || showSeparateVisibilityAlwaysReportsSection || showSeparateStdSection || report.Failed() || (v.Is(types.VerbosityLevelVerbose) && !report.State.Is(types.SpecStateSkipped)) + + // should we show a runtime? + includeRuntime := !report.State.Is(types.SpecStateSkipped|types.SpecStatePending) || (report.State.Is(types.SpecStateSkipped) && report.Failure.Message != "") + + // should we show the codelocation block? + showCodeLocation := !timelineHasBeenStreaming || !report.State.Is(types.SpecStatePassed) + + switch report.State { + case types.SpecStatePassed: + if report.LeafNodeType.Is(types.NodeTypesForSuiteLevelNodes) && !reportHasContent { + return + } + if report.LeafNodeType.Is(types.NodeTypesForSuiteLevelNodes) { + header = fmt.Sprintf("%s PASSED", header) + } + if report.NumAttempts > 1 && report.MaxFlakeAttempts > 1 { + header, reportHasContent = fmt.Sprintf("%s [FLAKEY TEST - TOOK %d ATTEMPTS TO PASS]", r.retryDenoter, report.NumAttempts), true + } + case types.SpecStatePending: + header = "P" + if v.GT(types.VerbosityLevelSuccinct) { + header, reportHasContent = "P [PENDING]", true + } + case types.SpecStateSkipped: + header = "S" + if v.Is(types.VerbosityLevelVeryVerbose) || (v.Is(types.VerbosityLevelVerbose) && report.Failure.Message != "") { + header, reportHasContent = "S [SKIPPED]", true + } + default: + header = fmt.Sprintf("%s [%s]", header, r.humanReadableState(report.State)) + if report.MaxMustPassRepeatedly > 1 { + header = fmt.Sprintf("%s DURING REPETITION #%d", header, report.NumAttempts) + } + } + + // If we have no content to show, just emit the header and return + if !reportHasContent { + r.emit(r.f(highlightColor + header + "{{/}}")) + if r.conf.ForceNewlines { + r.emit("\n") + } + return + } + + if includeRuntime { + header = r.f("%s [%.3f seconds]", header, report.RunTime.Seconds()) + } + + // Emit header + if !timelineHasBeenStreaming { + r.emitDelimiter(0) + } + r.emitBlock(r.f(highlightColor + header + "{{/}}")) + if showCodeLocation { + r.emitBlock(r.codeLocationBlock(report, highlightColor, v.Is(types.VerbosityLevelVeryVerbose), false)) + } + + //Emit Stdout/Stderr Output + if showSeparateStdSection { + r.wrapTextBlock("Captured StdOut/StdErr Output", func() { + r.emitBlock(r.fi(1, "%s", report.CapturedStdOutErr)) + }) + } + + if showSeparateVisibilityAlwaysReportsSection { + r.wrapTextBlock("Report Entries", func() { + for _, entry := range report.ReportEntries.WithVisibility(types.ReportEntryVisibilityAlways) { + r.emitReportEntry(1, entry) + } + }) + } + + if showTimeline { + r.wrapTextBlock("Timeline", func() { + r.emitTimeline(1, report, timeline) + }) + } + + // Emit Failure Message + if !report.Failure.IsZero() && !v.Is(types.VerbosityLevelVeryVerbose) { + r.emitBlock("\n") + r.emitFailure(1, report.State, report.Failure, true) + if len(report.AdditionalFailures) > 0 { + r.emitBlock(r.fi(1, "\nThere were {{bold}}{{red}}additional failures{{/}} detected. To view them in detail run {{bold}}ginkgo -vv{{/}}")) + } + } + + r.emitDelimiter(0) +} + +func (r *DefaultReporter) highlightColorForState(state types.SpecState) string { + switch state { + case types.SpecStatePassed: + return "{{green}}" + case types.SpecStatePending: + return "{{yellow}}" + case types.SpecStateSkipped: + return "{{cyan}}" + case types.SpecStateFailed: + return "{{red}}" + case types.SpecStateTimedout: + return "{{orange}}" + case types.SpecStatePanicked: + return "{{magenta}}" + case types.SpecStateInterrupted: + return "{{orange}}" + case types.SpecStateAborted: + return "{{coral}}" + default: + return "{{gray}}" + } +} + +func (r *DefaultReporter) humanReadableState(state types.SpecState) string { + return strings.ToUpper(state.String()) +} + +func (r *DefaultReporter) emitTimeline(indent uint, report types.SpecReport, timeline types.Timeline) { + isVeryVerbose := r.conf.Verbosity().Is(types.VerbosityLevelVeryVerbose) + gw := report.CapturedGinkgoWriterOutput + cursor := 0 + for _, entry := range timeline { + tl := entry.GetTimelineLocation() + if tl.Offset < len(gw) { + r.emit(r.fi(indent, "%s", gw[cursor:tl.Offset])) + cursor = tl.Offset + } else if cursor < len(gw) { + r.emit(r.fi(indent, "%s", gw[cursor:])) + cursor = len(gw) + } + switch x := entry.(type) { + case types.Failure: + if isVeryVerbose { + r.emitFailure(indent, report.State, x, false) + } else { + r.emitShortFailure(indent, report.State, x) + } + case types.AdditionalFailure: + if isVeryVerbose { + r.emitFailure(indent, x.State, x.Failure, true) + } else { + r.emitShortFailure(indent, x.State, x.Failure) + } + case types.ReportEntry: + r.emitReportEntry(indent, x) + case types.ProgressReport: + r.emitProgressReport(indent, false, x) + case types.SpecEvent: + if isVeryVerbose || !x.IsOnlyVisibleAtVeryVerbose() || r.conf.ShowNodeEvents { + r.emitSpecEvent(indent, x, isVeryVerbose) + } + } + } + if cursor < len(gw) { + r.emit(r.fi(indent, "%s", gw[cursor:])) + } +} + +func (r *DefaultReporter) EmitFailure(state types.SpecState, failure types.Failure) { + if r.conf.Verbosity().Is(types.VerbosityLevelVerbose) { + r.emitShortFailure(1, state, failure) + } else if r.conf.Verbosity().Is(types.VerbosityLevelVeryVerbose) { + r.emitFailure(1, state, failure, true) + } +} + +func (r *DefaultReporter) emitShortFailure(indent uint, state types.SpecState, failure types.Failure) { + r.emitBlock(r.fi(indent, r.highlightColorForState(state)+"[%s]{{/}} in [%s] - %s {{gray}}@ %s{{/}}", + r.humanReadableState(state), + failure.FailureNodeType, + failure.Location, + failure.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT), + )) +} + +func (r *DefaultReporter) emitFailure(indent uint, state types.SpecState, failure types.Failure, includeAdditionalFailure bool) { + highlightColor := r.highlightColorForState(state) + r.emitBlock(r.fi(indent, highlightColor+"[%s] %s{{/}}", r.humanReadableState(state), failure.Message)) + if r.conf.GithubOutput { + level := "error" + if state.Is(types.SpecStateSkipped) { + level = "notice" + } + r.emitBlock(r.fi(indent, "::%s file=%s,line=%d::%s %s", level, failure.Location.FileName, failure.Location.LineNumber, failure.FailureNodeType, failure.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT))) + } else { + r.emitBlock(r.fi(indent, highlightColor+"In {{bold}}[%s]{{/}}"+highlightColor+" at: {{bold}}%s{{/}} {{gray}}@ %s{{/}}\n", failure.FailureNodeType, failure.Location, failure.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT))) + } + if failure.ForwardedPanic != "" { + r.emitBlock("\n") + r.emitBlock(r.fi(indent, highlightColor+"%s{{/}}", failure.ForwardedPanic)) + } + + if r.conf.FullTrace || failure.ForwardedPanic != "" { + r.emitBlock("\n") + r.emitBlock(r.fi(indent, highlightColor+"Full Stack Trace{{/}}")) + r.emitBlock(r.fi(indent+1, "%s", failure.Location.FullStackTrace)) + } + + if !failure.ProgressReport.IsZero() { + r.emitBlock("\n") + r.emitProgressReport(indent, false, failure.ProgressReport) + } + + if failure.AdditionalFailure != nil && includeAdditionalFailure { + r.emitBlock("\n") + r.emitFailure(indent, failure.AdditionalFailure.State, failure.AdditionalFailure.Failure, true) + } +} + +func (r *DefaultReporter) EmitProgressReport(report types.ProgressReport) { + r.emitDelimiter(1) + + if report.RunningInParallel { + r.emit(r.fi(1, "{{coral}}Progress Report for Ginkgo Process #{{bold}}%d{{/}}\n", report.ParallelProcess)) + } + shouldEmitGW := report.RunningInParallel || r.conf.Verbosity().LT(types.VerbosityLevelVerbose) + r.emitProgressReport(1, shouldEmitGW, report) + r.emitDelimiter(1) +} + +func (r *DefaultReporter) emitProgressReport(indent uint, emitGinkgoWriterOutput bool, report types.ProgressReport) { + if report.Message != "" { + r.emitBlock(r.fi(indent, report.Message+"\n")) + indent += 1 + } + if report.LeafNodeText != "" { + subjectIndent := indent + if len(report.ContainerHierarchyTexts) > 0 { + r.emit(r.fi(indent, r.cycleJoin(report.ContainerHierarchyTexts, " "))) + r.emit(" ") + subjectIndent = 0 + } + r.emit(r.fi(subjectIndent, "{{bold}}{{orange}}%s{{/}} (Spec Runtime: %s)\n", report.LeafNodeText, report.Time().Sub(report.SpecStartTime).Round(time.Millisecond))) + r.emit(r.fi(indent+1, "{{gray}}%s{{/}}\n", report.LeafNodeLocation)) + indent += 1 + } + if report.CurrentNodeType != types.NodeTypeInvalid { + r.emit(r.fi(indent, "In {{bold}}{{orange}}[%s]{{/}}", report.CurrentNodeType)) + if report.CurrentNodeText != "" && !report.CurrentNodeType.Is(types.NodeTypeIt) { + r.emit(r.f(" {{bold}}{{orange}}%s{{/}}", report.CurrentNodeText)) + } + + r.emit(r.f(" (Node Runtime: %s)\n", report.Time().Sub(report.CurrentNodeStartTime).Round(time.Millisecond))) + r.emit(r.fi(indent+1, "{{gray}}%s{{/}}\n", report.CurrentNodeLocation)) + indent += 1 + } + if report.CurrentStepText != "" { + r.emit(r.fi(indent, "At {{bold}}{{orange}}[By Step] %s{{/}} (Step Runtime: %s)\n", report.CurrentStepText, report.Time().Sub(report.CurrentStepStartTime).Round(time.Millisecond))) + r.emit(r.fi(indent+1, "{{gray}}%s{{/}}\n", report.CurrentStepLocation)) + indent += 1 + } + + if indent > 0 { + indent -= 1 + } + + if emitGinkgoWriterOutput && report.CapturedGinkgoWriterOutput != "" { + r.emit("\n") + r.emitBlock(r.fi(indent, "{{gray}}Begin Captured GinkgoWriter Output >>{{/}}")) + limit, lines := 10, strings.Split(report.CapturedGinkgoWriterOutput, "\n") + if len(lines) <= limit { + r.emitBlock(r.fi(indent+1, "%s", report.CapturedGinkgoWriterOutput)) + } else { + r.emitBlock(r.fi(indent+1, "{{gray}}...{{/}}")) + for _, line := range lines[len(lines)-limit-1:] { + r.emitBlock(r.fi(indent+1, "%s", line)) + } + } + r.emitBlock(r.fi(indent, "{{gray}}<< End Captured GinkgoWriter Output{{/}}")) + } + + if !report.SpecGoroutine().IsZero() { + r.emit("\n") + r.emit(r.fi(indent, "{{bold}}{{underline}}Spec Goroutine{{/}}\n")) + r.emitGoroutines(indent, report.SpecGoroutine()) + } + + if len(report.AdditionalReports) > 0 { + r.emit("\n") + r.emitBlock(r.fi(indent, "{{gray}}Begin Additional Progress Reports >>{{/}}")) + for i, additionalReport := range report.AdditionalReports { + r.emit(r.fi(indent+1, additionalReport)) + if i < len(report.AdditionalReports)-1 { + r.emitBlock(r.fi(indent+1, "{{gray}}%s{{/}}", strings.Repeat("-", 10))) + } + } + r.emitBlock(r.fi(indent, "{{gray}}<< End Additional Progress Reports{{/}}")) + } + + highlightedGoroutines := report.HighlightedGoroutines() + if len(highlightedGoroutines) > 0 { + r.emit("\n") + r.emit(r.fi(indent, "{{bold}}{{underline}}Goroutines of Interest{{/}}\n")) + r.emitGoroutines(indent, highlightedGoroutines...) + } + + otherGoroutines := report.OtherGoroutines() + if len(otherGoroutines) > 0 { + r.emit("\n") + r.emit(r.fi(indent, "{{gray}}{{bold}}{{underline}}Other Goroutines{{/}}\n")) + r.emitGoroutines(indent, otherGoroutines...) + } +} + +func (r *DefaultReporter) EmitReportEntry(entry types.ReportEntry) { + if r.conf.Verbosity().LT(types.VerbosityLevelVerbose) || entry.Visibility == types.ReportEntryVisibilityNever { + return + } + r.emitReportEntry(1, entry) +} + +func (r *DefaultReporter) emitReportEntry(indent uint, entry types.ReportEntry) { + r.emitBlock(r.fi(indent, "{{bold}}"+entry.Name+"{{gray}} "+fmt.Sprintf("- %s @ %s{{/}}", entry.Location, entry.Time.Format(types.GINKGO_TIME_FORMAT)))) + if representation := entry.StringRepresentation(); representation != "" { + r.emitBlock(r.fi(indent+1, representation)) + } +} + +func (r *DefaultReporter) EmitSpecEvent(event types.SpecEvent) { + v := r.conf.Verbosity() + if v.Is(types.VerbosityLevelVeryVerbose) || (v.Is(types.VerbosityLevelVerbose) && (r.conf.ShowNodeEvents || !event.IsOnlyVisibleAtVeryVerbose())) { + r.emitSpecEvent(1, event, r.conf.Verbosity().Is(types.VerbosityLevelVeryVerbose)) + } +} + +func (r *DefaultReporter) emitSpecEvent(indent uint, event types.SpecEvent, includeLocation bool) { + location := "" + if includeLocation { + location = fmt.Sprintf("- %s ", event.CodeLocation.String()) + } + switch event.SpecEventType { + case types.SpecEventInvalid: + return + case types.SpecEventByStart: + r.emitBlock(r.fi(indent, "{{bold}}STEP:{{/}} %s {{gray}}%s@ %s{{/}}", event.Message, location, event.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT))) + case types.SpecEventByEnd: + r.emitBlock(r.fi(indent, "{{bold}}END STEP:{{/}} %s {{gray}}%s@ %s (%s){{/}}", event.Message, location, event.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT), event.Duration.Round(time.Millisecond))) + case types.SpecEventNodeStart: + r.emitBlock(r.fi(indent, "> Enter {{bold}}[%s]{{/}} %s {{gray}}%s@ %s{{/}}", event.NodeType.String(), event.Message, location, event.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT))) + case types.SpecEventNodeEnd: + r.emitBlock(r.fi(indent, "< Exit {{bold}}[%s]{{/}} %s {{gray}}%s@ %s (%s){{/}}", event.NodeType.String(), event.Message, location, event.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT), event.Duration.Round(time.Millisecond))) + case types.SpecEventSpecRepeat: + r.emitBlock(r.fi(indent, "\n{{bold}}Attempt #%d {{green}}Passed{{/}}{{bold}}. Repeating %s{{/}} {{gray}}@ %s{{/}}\n\n", event.Attempt, r.retryDenoter, event.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT))) + case types.SpecEventSpecRetry: + r.emitBlock(r.fi(indent, "\n{{bold}}Attempt #%d {{red}}Failed{{/}}{{bold}}. Retrying %s{{/}} {{gray}}@ %s{{/}}\n\n", event.Attempt, r.retryDenoter, event.TimelineLocation.Time.Format(types.GINKGO_TIME_FORMAT))) + } +} + +func (r *DefaultReporter) emitGoroutines(indent uint, goroutines ...types.Goroutine) { + for idx, g := range goroutines { + color := "{{gray}}" + if g.HasHighlights() { + color = "{{orange}}" + } + r.emit(r.fi(indent, color+"goroutine %d [%s]{{/}}\n", g.ID, g.State)) + for _, fc := range g.Stack { + if fc.Highlight { + r.emit(r.fi(indent, color+"{{bold}}> %s{{/}}\n", fc.Function)) + r.emit(r.fi(indent+2, color+"{{bold}}%s:%d{{/}}\n", fc.Filename, fc.Line)) + r.emitSource(indent+3, fc) + } else { + r.emit(r.fi(indent+1, "{{gray}}%s{{/}}\n", fc.Function)) + r.emit(r.fi(indent+2, "{{gray}}%s:%d{{/}}\n", fc.Filename, fc.Line)) + } + } + + if idx+1 < len(goroutines) { + r.emit("\n") + } + } +} + +func (r *DefaultReporter) emitSource(indent uint, fc types.FunctionCall) { + lines := fc.Source + if len(lines) == 0 { + return + } + + lTrim := 100000 + for _, line := range lines { + lTrimLine := len(line) - len(strings.TrimLeft(line, " \t")) + if lTrimLine < lTrim && len(line) > 0 { + lTrim = lTrimLine + } + } + if lTrim == 100000 { + lTrim = 0 + } + + for idx, line := range lines { + if len(line) > lTrim { + line = line[lTrim:] + } + if idx == fc.SourceHighlight { + r.emit(r.fi(indent, "{{bold}}{{orange}}> %s{{/}}\n", line)) + } else { + r.emit(r.fi(indent, "| %s\n", line)) + } + } +} + +/* Emitting to the writer */ +func (r *DefaultReporter) emit(s string) { + r._emit(s, false, false) +} + +func (r *DefaultReporter) emitBlock(s string) { + r._emit(s, true, false) +} + +func (r *DefaultReporter) emitDelimiter(indent uint) { + r._emit(r.fi(indent, "{{gray}}%s{{/}}", strings.Repeat("-", 30)), true, true) +} + +// a bit ugly - but we're trying to minimize locking on this hot codepath +func (r *DefaultReporter) _emit(s string, block bool, isDelimiter bool) { + if len(s) == 0 { + return + } + r.lock.Lock() + defer r.lock.Unlock() + if isDelimiter && r.lastEmissionWasDelimiter { + return + } + if block && !r.lastCharWasNewline { + r.writer.Write([]byte("\n")) + } + r.lastCharWasNewline = (s[len(s)-1:] == "\n") + r.writer.Write([]byte(s)) + if block && !r.lastCharWasNewline { + r.writer.Write([]byte("\n")) + r.lastCharWasNewline = true + } + r.lastEmissionWasDelimiter = isDelimiter +} + +/* Rendering text */ +func (r *DefaultReporter) f(format string, args ...interface{}) string { + return r.formatter.F(format, args...) +} + +func (r *DefaultReporter) fi(indentation uint, format string, args ...interface{}) string { + return r.formatter.Fi(indentation, format, args...) +} + +func (r *DefaultReporter) cycleJoin(elements []string, joiner string) string { + return r.formatter.CycleJoin(elements, joiner, []string{"{{/}}", "{{gray}}"}) +} + +func (r *DefaultReporter) codeLocationBlock(report types.SpecReport, highlightColor string, veryVerbose bool, usePreciseFailureLocation bool) string { + texts, locations, labels := []string{}, []types.CodeLocation{}, [][]string{} + texts, locations, labels = append(texts, report.ContainerHierarchyTexts...), append(locations, report.ContainerHierarchyLocations...), append(labels, report.ContainerHierarchyLabels...) + + if report.LeafNodeType.Is(types.NodeTypesForSuiteLevelNodes) { + texts = append(texts, r.f("[%s] %s", report.LeafNodeType, report.LeafNodeText)) + } else { + texts = append(texts, r.f(report.LeafNodeText)) + } + labels = append(labels, report.LeafNodeLabels) + locations = append(locations, report.LeafNodeLocation) + + failureLocation := report.Failure.FailureNodeLocation + if usePreciseFailureLocation { + failureLocation = report.Failure.Location + } + + highlightIndex := -1 + switch report.Failure.FailureNodeContext { + case types.FailureNodeAtTopLevel: + texts = append([]string{fmt.Sprintf("TOP-LEVEL [%s]", report.Failure.FailureNodeType)}, texts...) + locations = append([]types.CodeLocation{failureLocation}, locations...) + labels = append([][]string{{}}, labels...) + highlightIndex = 0 + case types.FailureNodeInContainer: + i := report.Failure.FailureNodeContainerIndex + texts[i] = fmt.Sprintf("%s [%s]", texts[i], report.Failure.FailureNodeType) + locations[i] = failureLocation + highlightIndex = i + case types.FailureNodeIsLeafNode: + i := len(texts) - 1 + texts[i] = fmt.Sprintf("[%s] %s", report.LeafNodeType, report.LeafNodeText) + locations[i] = failureLocation + highlightIndex = i + default: + //there is no failure, so we highlight the leaf ndoe + highlightIndex = len(texts) - 1 + } + + out := "" + if veryVerbose { + for i := range texts { + if i == highlightIndex { + out += r.fi(uint(i), highlightColor+"{{bold}}%s{{/}}", texts[i]) + } else { + out += r.fi(uint(i), "%s", texts[i]) + } + if len(labels[i]) > 0 { + out += r.f(" {{coral}}[%s]{{/}}", strings.Join(labels[i], ", ")) + } + out += "\n" + out += r.fi(uint(i), "{{gray}}%s{{/}}\n", locations[i]) + } + } else { + for i := range texts { + style := "{{/}}" + if i%2 == 1 { + style = "{{gray}}" + } + if i == highlightIndex { + style = highlightColor + "{{bold}}" + } + out += r.f(style+"%s", texts[i]) + if i < len(texts)-1 { + out += " " + } else { + out += r.f("{{/}}") + } + } + flattenedLabels := report.Labels() + if len(flattenedLabels) > 0 { + out += r.f(" {{coral}}[%s]{{/}}", strings.Join(flattenedLabels, ", ")) + } + out += "\n" + if usePreciseFailureLocation { + out += r.f("{{gray}}%s{{/}}", failureLocation) + } else { + leafLocation := locations[len(locations)-1] + if (report.Failure.FailureNodeLocation != types.CodeLocation{}) && (report.Failure.FailureNodeLocation != leafLocation) { + out += r.fi(1, highlightColor+"[%s]{{/}} {{gray}}%s{{/}}\n", report.Failure.FailureNodeType, report.Failure.FailureNodeLocation) + out += r.fi(1, "{{gray}}[%s] %s{{/}}", report.LeafNodeType, leafLocation) + } else { + out += r.f("{{gray}}%s{{/}}", leafLocation) + } + } + + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/deprecated_reporter.go b/vendor/github.com/onsi/ginkgo/v2/reporters/deprecated_reporter.go new file mode 100644 index 000000000..613072ebf --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/deprecated_reporter.go @@ -0,0 +1,149 @@ +package reporters + +import ( + "github.com/onsi/ginkgo/v2/config" + "github.com/onsi/ginkgo/v2/types" +) + +// Deprecated: DeprecatedReporter was how Ginkgo V1 provided support for CustomReporters +// this has been removed in V2. +// Please read the documentation at: +// https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-custom-reporters +// for Ginkgo's new behavior and for a migration path. +type DeprecatedReporter interface { + SuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) + BeforeSuiteDidRun(setupSummary *types.SetupSummary) + SpecWillRun(specSummary *types.SpecSummary) + SpecDidComplete(specSummary *types.SpecSummary) + AfterSuiteDidRun(setupSummary *types.SetupSummary) + SuiteDidEnd(summary *types.SuiteSummary) +} + +// ReportViaDeprecatedReporter takes a V1 custom reporter and a V2 report and +// calls the custom reporter's methods with appropriately transformed data from the V2 report. +// +// ReportViaDeprecatedReporter should be called in a `ReportAfterSuite()` +// +// Deprecated: ReportViaDeprecatedReporter method exists to help developer bridge between deprecated V1 functionality and the new +// reporting support in V2. It will be removed in a future minor version of Ginkgo. +func ReportViaDeprecatedReporter(reporter DeprecatedReporter, report types.Report) { + conf := config.DeprecatedGinkgoConfigType{ + RandomSeed: report.SuiteConfig.RandomSeed, + RandomizeAllSpecs: report.SuiteConfig.RandomizeAllSpecs, + FocusStrings: report.SuiteConfig.FocusStrings, + SkipStrings: report.SuiteConfig.SkipStrings, + FailOnPending: report.SuiteConfig.FailOnPending, + FailFast: report.SuiteConfig.FailFast, + FlakeAttempts: report.SuiteConfig.FlakeAttempts, + EmitSpecProgress: false, + DryRun: report.SuiteConfig.DryRun, + ParallelNode: report.SuiteConfig.ParallelProcess, + ParallelTotal: report.SuiteConfig.ParallelTotal, + SyncHost: report.SuiteConfig.ParallelHost, + StreamHost: report.SuiteConfig.ParallelHost, + } + + summary := &types.DeprecatedSuiteSummary{ + SuiteDescription: report.SuiteDescription, + SuiteID: report.SuitePath, + + NumberOfSpecsBeforeParallelization: report.PreRunStats.TotalSpecs, + NumberOfTotalSpecs: report.PreRunStats.TotalSpecs, + NumberOfSpecsThatWillBeRun: report.PreRunStats.SpecsThatWillRun, + } + + reporter.SuiteWillBegin(conf, summary) + + for _, spec := range report.SpecReports { + switch spec.LeafNodeType { + case types.NodeTypeBeforeSuite, types.NodeTypeSynchronizedBeforeSuite: + setupSummary := &types.DeprecatedSetupSummary{ + ComponentType: spec.LeafNodeType, + CodeLocation: spec.LeafNodeLocation, + State: spec.State, + RunTime: spec.RunTime, + Failure: failureFor(spec), + CapturedOutput: spec.CombinedOutput(), + SuiteID: report.SuitePath, + } + reporter.BeforeSuiteDidRun(setupSummary) + case types.NodeTypeAfterSuite, types.NodeTypeSynchronizedAfterSuite: + setupSummary := &types.DeprecatedSetupSummary{ + ComponentType: spec.LeafNodeType, + CodeLocation: spec.LeafNodeLocation, + State: spec.State, + RunTime: spec.RunTime, + Failure: failureFor(spec), + CapturedOutput: spec.CombinedOutput(), + SuiteID: report.SuitePath, + } + reporter.AfterSuiteDidRun(setupSummary) + case types.NodeTypeIt: + componentTexts, componentCodeLocations := []string{}, []types.CodeLocation{} + componentTexts = append(componentTexts, spec.ContainerHierarchyTexts...) + componentCodeLocations = append(componentCodeLocations, spec.ContainerHierarchyLocations...) + componentTexts = append(componentTexts, spec.LeafNodeText) + componentCodeLocations = append(componentCodeLocations, spec.LeafNodeLocation) + + specSummary := &types.DeprecatedSpecSummary{ + ComponentTexts: componentTexts, + ComponentCodeLocations: componentCodeLocations, + State: spec.State, + RunTime: spec.RunTime, + Failure: failureFor(spec), + NumberOfSamples: spec.NumAttempts, + CapturedOutput: spec.CombinedOutput(), + SuiteID: report.SuitePath, + } + reporter.SpecWillRun(specSummary) + reporter.SpecDidComplete(specSummary) + + switch spec.State { + case types.SpecStatePending: + summary.NumberOfPendingSpecs += 1 + case types.SpecStateSkipped: + summary.NumberOfSkippedSpecs += 1 + case types.SpecStateFailed, types.SpecStatePanicked, types.SpecStateInterrupted: + summary.NumberOfFailedSpecs += 1 + case types.SpecStatePassed: + summary.NumberOfPassedSpecs += 1 + if spec.NumAttempts > 1 { + summary.NumberOfFlakedSpecs += 1 + } + } + } + } + + summary.SuiteSucceeded = report.SuiteSucceeded + summary.RunTime = report.RunTime + + reporter.SuiteDidEnd(summary) +} + +func failureFor(spec types.SpecReport) types.DeprecatedSpecFailure { + if spec.Failure.IsZero() { + return types.DeprecatedSpecFailure{} + } + + index := 0 + switch spec.Failure.FailureNodeContext { + case types.FailureNodeInContainer: + index = spec.Failure.FailureNodeContainerIndex + case types.FailureNodeAtTopLevel: + index = -1 + case types.FailureNodeIsLeafNode: + index = len(spec.ContainerHierarchyTexts) - 1 + if spec.LeafNodeText != "" { + index += 1 + } + } + + return types.DeprecatedSpecFailure{ + Message: spec.Failure.Message, + Location: spec.Failure.Location, + ForwardedPanic: spec.Failure.ForwardedPanic, + ComponentIndex: index, + ComponentType: spec.Failure.FailureNodeType, + ComponentCodeLocation: spec.Failure.FailureNodeLocation, + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go b/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go new file mode 100644 index 000000000..5d3e8db99 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go @@ -0,0 +1,69 @@ +package reporters + +import ( + "encoding/json" + "fmt" + "os" + "path" + + "github.com/onsi/ginkgo/v2/types" +) + +// GenerateJSONReport produces a JSON-formatted report at the passed in destination +func GenerateJSONReport(report types.Report, destination string) error { + if err := os.MkdirAll(path.Dir(destination), 0770); err != nil { + return err + } + f, err := os.Create(destination) + if err != nil { + return err + } + defer f.Close() + enc := json.NewEncoder(f) + enc.SetIndent("", " ") + err = enc.Encode([]types.Report{ + report, + }) + if err != nil { + return err + } + return nil +} + +// MergeJSONReports produces a single JSON-formatted report at the passed in destination by merging the JSON-formatted reports provided in sources +// It skips over reports that fail to decode but reports on them via the returned messages []string +func MergeAndCleanupJSONReports(sources []string, destination string) ([]string, error) { + messages := []string{} + allReports := []types.Report{} + for _, source := range sources { + reports := []types.Report{} + data, err := os.ReadFile(source) + if err != nil { + messages = append(messages, fmt.Sprintf("Could not open %s:\n%s", source, err.Error())) + continue + } + err = json.Unmarshal(data, &reports) + if err != nil { + messages = append(messages, fmt.Sprintf("Could not decode %s:\n%s", source, err.Error())) + continue + } + os.Remove(source) + allReports = append(allReports, reports...) + } + + if err := os.MkdirAll(path.Dir(destination), 0770); err != nil { + return messages, err + } + f, err := os.Create(destination) + if err != nil { + return messages, err + } + defer f.Close() + enc := json.NewEncoder(f) + enc.SetIndent("", " ") + err = enc.Encode(allReports) + if err != nil { + return messages, err + } + return messages, nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go b/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go new file mode 100644 index 000000000..562e0f62b --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go @@ -0,0 +1,390 @@ +/* + +JUnit XML Reporter for Ginkgo + +For usage instructions: http://onsi.github.io/ginkgo/#generating_junit_xml_output + +The schema used for the generated JUnit xml file was adapted from https://llg.cubic.org/docs/junit/ + +*/ + +package reporters + +import ( + "encoding/xml" + "fmt" + "os" + "path" + "regexp" + "strings" + + "github.com/onsi/ginkgo/v2/config" + "github.com/onsi/ginkgo/v2/types" +) + +type JunitReportConfig struct { + // Spec States for which no timeline should be emitted for system-err + // set this to types.SpecStatePassed|types.SpecStateSkipped|types.SpecStatePending to only match failing specs + OmitTimelinesForSpecState types.SpecState + + // Enable OmitFailureMessageAttr to prevent failure messages appearing in the "message" attribute of the Failure and Error tags + OmitFailureMessageAttr bool + + //Enable OmitCapturedStdOutErr to prevent captured stdout/stderr appearing in system-out + OmitCapturedStdOutErr bool + + // Enable OmitSpecLabels to prevent labels from appearing in the spec name + OmitSpecLabels bool + + // Enable OmitLeafNodeType to prevent the spec leaf node type from appearing in the spec name + OmitLeafNodeType bool + + // Enable OmitSuiteSetupNodes to prevent the creation of testcase entries for setup nodes + OmitSuiteSetupNodes bool +} + +type JUnitTestSuites struct { + XMLName xml.Name `xml:"testsuites"` + // Tests maps onto the total number of specs in all test suites (this includes any suite nodes such as BeforeSuite) + Tests int `xml:"tests,attr"` + // Disabled maps onto specs that are pending and/or skipped + Disabled int `xml:"disabled,attr"` + // Errors maps onto specs that panicked or were interrupted + Errors int `xml:"errors,attr"` + // Failures maps onto specs that failed + Failures int `xml:"failures,attr"` + // Time is the time in seconds to execute all test suites + Time float64 `xml:"time,attr"` + + //The set of all test suites + TestSuites []JUnitTestSuite `xml:"testsuite"` +} + +type JUnitTestSuite struct { + // Name maps onto the description of the test suite - maps onto Report.SuiteDescription + Name string `xml:"name,attr"` + // Package maps onto the absolute path to the test suite - maps onto Report.SuitePath + Package string `xml:"package,attr"` + // Tests maps onto the total number of specs in the test suite (this includes any suite nodes such as BeforeSuite) + Tests int `xml:"tests,attr"` + // Disabled maps onto specs that are pending + Disabled int `xml:"disabled,attr"` + // Skiped maps onto specs that are skipped + Skipped int `xml:"skipped,attr"` + // Errors maps onto specs that panicked or were interrupted + Errors int `xml:"errors,attr"` + // Failures maps onto specs that failed + Failures int `xml:"failures,attr"` + // Time is the time in seconds to execute all the test suite - maps onto Report.RunTime + Time float64 `xml:"time,attr"` + // Timestamp is the ISO 8601 formatted start-time of the suite - maps onto Report.StartTime + Timestamp string `xml:"timestamp,attr"` + + //Properties captures the information stored in the rest of the Report type (including SuiteConfig) as key-value pairs + Properties JUnitProperties `xml:"properties"` + + //TestCases capture the individual specs + TestCases []JUnitTestCase `xml:"testcase"` +} + +type JUnitProperties struct { + Properties []JUnitProperty `xml:"property"` +} + +func (jup JUnitProperties) WithName(name string) string { + for _, property := range jup.Properties { + if property.Name == name { + return property.Value + } + } + return "" +} + +type JUnitProperty struct { + Name string `xml:"name,attr"` + Value string `xml:"value,attr"` +} + +var ownerRE = regexp.MustCompile(`(?i)^owner:(.*)$`) + +type JUnitTestCase struct { + // Name maps onto the full text of the spec - equivalent to "[SpecReport.LeafNodeType] SpecReport.FullText()" + Name string `xml:"name,attr"` + // Classname maps onto the name of the test suite - equivalent to Report.SuiteDescription + Classname string `xml:"classname,attr"` + // Status maps onto the string representation of SpecReport.State + Status string `xml:"status,attr"` + // Time is the time in seconds to execute the spec - maps onto SpecReport.RunTime + Time float64 `xml:"time,attr"` + // Owner is the owner the spec - is set if a label matching Label("owner:X") is provided. The last matching label is used as the owner, thereby allowing specs to override owners specified in container nodes. + Owner string `xml:"owner,attr,omitempty"` + //Skipped is populated with a message if the test was skipped or pending + Skipped *JUnitSkipped `xml:"skipped,omitempty"` + //Error is populated if the test panicked or was interrupted + Error *JUnitError `xml:"error,omitempty"` + //Failure is populated if the test failed + Failure *JUnitFailure `xml:"failure,omitempty"` + //SystemOut maps onto any captured stdout/stderr output - maps onto SpecReport.CapturedStdOutErr + SystemOut string `xml:"system-out,omitempty"` + //SystemOut maps onto any captured GinkgoWriter output - maps onto SpecReport.CapturedGinkgoWriterOutput + SystemErr string `xml:"system-err,omitempty"` +} + +type JUnitSkipped struct { + // Message maps onto "pending" if the test was marked pending, "skipped" if the test was marked skipped, and "skipped - REASON" if the user called Skip(REASON) + Message string `xml:"message,attr"` +} + +type JUnitError struct { + //Message maps onto the panic/exception thrown - equivalent to SpecReport.Failure.ForwardedPanic - or to "interrupted" + Message string `xml:"message,attr"` + //Type is one of "panicked" or "interrupted" + Type string `xml:"type,attr"` + //Description maps onto the captured stack trace for a panic, or the failure message for an interrupt which will include the dump of running goroutines + Description string `xml:",chardata"` +} + +type JUnitFailure struct { + //Message maps onto the failure message - equivalent to SpecReport.Failure.Message + Message string `xml:"message,attr"` + //Type is "failed" + Type string `xml:"type,attr"` + //Description maps onto the location and stack trace of the failure + Description string `xml:",chardata"` +} + +func GenerateJUnitReport(report types.Report, dst string) error { + return GenerateJUnitReportWithConfig(report, dst, JunitReportConfig{}) +} + +func GenerateJUnitReportWithConfig(report types.Report, dst string, config JunitReportConfig) error { + suite := JUnitTestSuite{ + Name: report.SuiteDescription, + Package: report.SuitePath, + Time: report.RunTime.Seconds(), + Timestamp: report.StartTime.Format("2006-01-02T15:04:05"), + Properties: JUnitProperties{ + Properties: []JUnitProperty{ + {"SuiteSucceeded", fmt.Sprintf("%t", report.SuiteSucceeded)}, + {"SuiteHasProgrammaticFocus", fmt.Sprintf("%t", report.SuiteHasProgrammaticFocus)}, + {"SpecialSuiteFailureReason", strings.Join(report.SpecialSuiteFailureReasons, ",")}, + {"SuiteLabels", fmt.Sprintf("[%s]", strings.Join(report.SuiteLabels, ","))}, + {"RandomSeed", fmt.Sprintf("%d", report.SuiteConfig.RandomSeed)}, + {"RandomizeAllSpecs", fmt.Sprintf("%t", report.SuiteConfig.RandomizeAllSpecs)}, + {"LabelFilter", report.SuiteConfig.LabelFilter}, + {"FocusStrings", strings.Join(report.SuiteConfig.FocusStrings, ",")}, + {"SkipStrings", strings.Join(report.SuiteConfig.SkipStrings, ",")}, + {"FocusFiles", strings.Join(report.SuiteConfig.FocusFiles, ";")}, + {"SkipFiles", strings.Join(report.SuiteConfig.SkipFiles, ";")}, + {"FailOnPending", fmt.Sprintf("%t", report.SuiteConfig.FailOnPending)}, + {"FailOnEmpty", fmt.Sprintf("%t", report.SuiteConfig.FailOnEmpty)}, + {"FailFast", fmt.Sprintf("%t", report.SuiteConfig.FailFast)}, + {"FlakeAttempts", fmt.Sprintf("%d", report.SuiteConfig.FlakeAttempts)}, + {"DryRun", fmt.Sprintf("%t", report.SuiteConfig.DryRun)}, + {"ParallelTotal", fmt.Sprintf("%d", report.SuiteConfig.ParallelTotal)}, + {"OutputInterceptorMode", report.SuiteConfig.OutputInterceptorMode}, + }, + }, + } + for _, spec := range report.SpecReports { + if config.OmitSuiteSetupNodes && spec.LeafNodeType != types.NodeTypeIt { + continue + } + name := fmt.Sprintf("[%s]", spec.LeafNodeType) + if config.OmitLeafNodeType { + name = "" + } + if spec.FullText() != "" { + name = name + " " + spec.FullText() + } + labels := spec.Labels() + if len(labels) > 0 && !config.OmitSpecLabels { + name = name + " [" + strings.Join(labels, ", ") + "]" + } + owner := "" + for _, label := range labels { + if matches := ownerRE.FindStringSubmatch(label); len(matches) == 2 { + owner = matches[1] + } + } + name = strings.TrimSpace(name) + + test := JUnitTestCase{ + Name: name, + Classname: report.SuiteDescription, + Status: spec.State.String(), + Time: spec.RunTime.Seconds(), + Owner: owner, + } + if !spec.State.Is(config.OmitTimelinesForSpecState) { + test.SystemErr = systemErrForUnstructuredReporters(spec) + } + if !config.OmitCapturedStdOutErr { + test.SystemOut = systemOutForUnstructuredReporters(spec) + } + suite.Tests += 1 + + switch spec.State { + case types.SpecStateSkipped: + message := "skipped" + if spec.Failure.Message != "" { + message += " - " + spec.Failure.Message + } + test.Skipped = &JUnitSkipped{Message: message} + suite.Skipped += 1 + case types.SpecStatePending: + test.Skipped = &JUnitSkipped{Message: "pending"} + suite.Disabled += 1 + case types.SpecStateFailed: + test.Failure = &JUnitFailure{ + Message: spec.Failure.Message, + Type: "failed", + Description: failureDescriptionForUnstructuredReporters(spec), + } + if config.OmitFailureMessageAttr { + test.Failure.Message = "" + } + suite.Failures += 1 + case types.SpecStateTimedout: + test.Failure = &JUnitFailure{ + Message: spec.Failure.Message, + Type: "timedout", + Description: failureDescriptionForUnstructuredReporters(spec), + } + if config.OmitFailureMessageAttr { + test.Failure.Message = "" + } + suite.Failures += 1 + case types.SpecStateInterrupted: + test.Error = &JUnitError{ + Message: spec.Failure.Message, + Type: "interrupted", + Description: failureDescriptionForUnstructuredReporters(spec), + } + if config.OmitFailureMessageAttr { + test.Error.Message = "" + } + suite.Errors += 1 + case types.SpecStateAborted: + test.Failure = &JUnitFailure{ + Message: spec.Failure.Message, + Type: "aborted", + Description: failureDescriptionForUnstructuredReporters(spec), + } + if config.OmitFailureMessageAttr { + test.Failure.Message = "" + } + suite.Errors += 1 + case types.SpecStatePanicked: + test.Error = &JUnitError{ + Message: spec.Failure.ForwardedPanic, + Type: "panicked", + Description: failureDescriptionForUnstructuredReporters(spec), + } + if config.OmitFailureMessageAttr { + test.Error.Message = "" + } + suite.Errors += 1 + } + + suite.TestCases = append(suite.TestCases, test) + } + + junitReport := JUnitTestSuites{ + Tests: suite.Tests, + Disabled: suite.Disabled + suite.Skipped, + Errors: suite.Errors, + Failures: suite.Failures, + Time: suite.Time, + TestSuites: []JUnitTestSuite{suite}, + } + + if err := os.MkdirAll(path.Dir(dst), 0770); err != nil { + return err + } + f, err := os.Create(dst) + if err != nil { + return err + } + f.WriteString(xml.Header) + encoder := xml.NewEncoder(f) + encoder.Indent(" ", " ") + encoder.Encode(junitReport) + + return f.Close() +} + +func MergeAndCleanupJUnitReports(sources []string, dst string) ([]string, error) { + messages := []string{} + mergedReport := JUnitTestSuites{} + for _, source := range sources { + report := JUnitTestSuites{} + f, err := os.Open(source) + if err != nil { + messages = append(messages, fmt.Sprintf("Could not open %s:\n%s", source, err.Error())) + continue + } + err = xml.NewDecoder(f).Decode(&report) + _ = f.Close() + if err != nil { + messages = append(messages, fmt.Sprintf("Could not decode %s:\n%s", source, err.Error())) + continue + } + os.Remove(source) + + mergedReport.Tests += report.Tests + mergedReport.Disabled += report.Disabled + mergedReport.Errors += report.Errors + mergedReport.Failures += report.Failures + mergedReport.Time += report.Time + mergedReport.TestSuites = append(mergedReport.TestSuites, report.TestSuites...) + } + + if err := os.MkdirAll(path.Dir(dst), 0770); err != nil { + return messages, err + } + f, err := os.Create(dst) + if err != nil { + return messages, err + } + f.WriteString(xml.Header) + encoder := xml.NewEncoder(f) + encoder.Indent(" ", " ") + encoder.Encode(mergedReport) + + return messages, f.Close() +} + +func failureDescriptionForUnstructuredReporters(spec types.SpecReport) string { + out := &strings.Builder{} + NewDefaultReporter(types.ReporterConfig{NoColor: true, VeryVerbose: true}, out).emitFailure(0, spec.State, spec.Failure, true) + if len(spec.AdditionalFailures) > 0 { + out.WriteString("\nThere were additional failures detected after the initial failure. These are visible in the timeline\n") + } + return out.String() +} + +func systemErrForUnstructuredReporters(spec types.SpecReport) string { + return RenderTimeline(spec, true) +} + +func RenderTimeline(spec types.SpecReport, noColor bool) string { + out := &strings.Builder{} + NewDefaultReporter(types.ReporterConfig{NoColor: noColor, VeryVerbose: true}, out).emitTimeline(0, spec, spec.Timeline()) + return out.String() +} + +func systemOutForUnstructuredReporters(spec types.SpecReport) string { + return spec.CapturedStdOutErr +} + +// Deprecated JUnitReporter (so folks can still compile their suites) +type JUnitReporter struct{} + +func NewJUnitReporter(_ string) *JUnitReporter { return &JUnitReporter{} } +func (reporter *JUnitReporter) SuiteWillBegin(_ config.GinkgoConfigType, _ *types.SuiteSummary) {} +func (reporter *JUnitReporter) BeforeSuiteDidRun(_ *types.SetupSummary) {} +func (reporter *JUnitReporter) SpecWillRun(_ *types.SpecSummary) {} +func (reporter *JUnitReporter) SpecDidComplete(_ *types.SpecSummary) {} +func (reporter *JUnitReporter) AfterSuiteDidRun(_ *types.SetupSummary) {} +func (reporter *JUnitReporter) SuiteDidEnd(_ *types.SuiteSummary) {} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/reporter.go b/vendor/github.com/onsi/ginkgo/v2/reporters/reporter.go new file mode 100644 index 000000000..5e726c464 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/reporter.go @@ -0,0 +1,29 @@ +package reporters + +import ( + "github.com/onsi/ginkgo/v2/types" +) + +type Reporter interface { + SuiteWillBegin(report types.Report) + WillRun(report types.SpecReport) + DidRun(report types.SpecReport) + SuiteDidEnd(report types.Report) + + //Timeline emission + EmitFailure(state types.SpecState, failure types.Failure) + EmitProgressReport(progressReport types.ProgressReport) + EmitReportEntry(entry types.ReportEntry) + EmitSpecEvent(event types.SpecEvent) +} + +type NoopReporter struct{} + +func (n NoopReporter) SuiteWillBegin(report types.Report) {} +func (n NoopReporter) WillRun(report types.SpecReport) {} +func (n NoopReporter) DidRun(report types.SpecReport) {} +func (n NoopReporter) SuiteDidEnd(report types.Report) {} +func (n NoopReporter) EmitFailure(state types.SpecState, failure types.Failure) {} +func (n NoopReporter) EmitProgressReport(progressReport types.ProgressReport) {} +func (n NoopReporter) EmitReportEntry(entry types.ReportEntry) {} +func (n NoopReporter) EmitSpecEvent(event types.SpecEvent) {} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go b/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go new file mode 100644 index 000000000..e990ad82e --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go @@ -0,0 +1,105 @@ +/* + +TeamCity Reporter for Ginkgo + +Makes use of TeamCity's support for Service Messages +http://confluence.jetbrains.com/display/TCD7/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests +*/ + +package reporters + +import ( + "fmt" + "os" + "path" + "strings" + + "github.com/onsi/ginkgo/v2/types" +) + +func tcEscape(s string) string { + s = strings.ReplaceAll(s, "|", "||") + s = strings.ReplaceAll(s, "'", "|'") + s = strings.ReplaceAll(s, "\n", "|n") + s = strings.ReplaceAll(s, "\r", "|r") + s = strings.ReplaceAll(s, "[", "|[") + s = strings.ReplaceAll(s, "]", "|]") + return s +} + +func GenerateTeamcityReport(report types.Report, dst string) error { + if err := os.MkdirAll(path.Dir(dst), 0770); err != nil { + return err + } + f, err := os.Create(dst) + if err != nil { + return err + } + + name := report.SuiteDescription + labels := report.SuiteLabels + if len(labels) > 0 { + name = name + " [" + strings.Join(labels, ", ") + "]" + } + fmt.Fprintf(f, "##teamcity[testSuiteStarted name='%s']\n", tcEscape(name)) + for _, spec := range report.SpecReports { + name := fmt.Sprintf("[%s]", spec.LeafNodeType) + if spec.FullText() != "" { + name = name + " " + spec.FullText() + } + labels := spec.Labels() + if len(labels) > 0 { + name = name + " [" + strings.Join(labels, ", ") + "]" + } + + name = tcEscape(name) + fmt.Fprintf(f, "##teamcity[testStarted name='%s']\n", name) + switch spec.State { + case types.SpecStatePending: + fmt.Fprintf(f, "##teamcity[testIgnored name='%s' message='pending']\n", name) + case types.SpecStateSkipped: + message := "skipped" + if spec.Failure.Message != "" { + message += " - " + spec.Failure.Message + } + fmt.Fprintf(f, "##teamcity[testIgnored name='%s' message='%s']\n", name, tcEscape(message)) + case types.SpecStateFailed: + details := failureDescriptionForUnstructuredReporters(spec) + fmt.Fprintf(f, "##teamcity[testFailed name='%s' message='failed - %s' details='%s']\n", name, tcEscape(spec.Failure.Message), tcEscape(details)) + case types.SpecStatePanicked: + details := failureDescriptionForUnstructuredReporters(spec) + fmt.Fprintf(f, "##teamcity[testFailed name='%s' message='panicked - %s' details='%s']\n", name, tcEscape(spec.Failure.ForwardedPanic), tcEscape(details)) + case types.SpecStateTimedout: + details := failureDescriptionForUnstructuredReporters(spec) + fmt.Fprintf(f, "##teamcity[testFailed name='%s' message='timedout - %s' details='%s']\n", name, tcEscape(spec.Failure.Message), tcEscape(details)) + case types.SpecStateInterrupted: + details := failureDescriptionForUnstructuredReporters(spec) + fmt.Fprintf(f, "##teamcity[testFailed name='%s' message='interrupted - %s' details='%s']\n", name, tcEscape(spec.Failure.Message), tcEscape(details)) + case types.SpecStateAborted: + details := failureDescriptionForUnstructuredReporters(spec) + fmt.Fprintf(f, "##teamcity[testFailed name='%s' message='aborted - %s' details='%s']\n", name, tcEscape(spec.Failure.Message), tcEscape(details)) + } + + fmt.Fprintf(f, "##teamcity[testStdOut name='%s' out='%s']\n", name, tcEscape(systemOutForUnstructuredReporters(spec))) + fmt.Fprintf(f, "##teamcity[testStdErr name='%s' out='%s']\n", name, tcEscape(systemErrForUnstructuredReporters(spec))) + fmt.Fprintf(f, "##teamcity[testFinished name='%s' duration='%d']\n", name, int(spec.RunTime.Seconds()*1000.0)) + } + fmt.Fprintf(f, "##teamcity[testSuiteFinished name='%s']\n", tcEscape(report.SuiteDescription)) + + return f.Close() +} + +func MergeAndCleanupTeamcityReports(sources []string, dst string) ([]string, error) { + messages := []string{} + merged := []byte{} + for _, source := range sources { + data, err := os.ReadFile(source) + if err != nil { + messages = append(messages, fmt.Sprintf("Could not open %s:\n%s", source, err.Error())) + continue + } + os.Remove(source) + merged = append(merged, data...) + } + return messages, os.WriteFile(dst, merged, 0666) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go b/vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go new file mode 100644 index 000000000..aa1a35176 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go @@ -0,0 +1,221 @@ +package ginkgo + +import ( + "fmt" + "strings" + + "github.com/onsi/ginkgo/v2/internal" + "github.com/onsi/ginkgo/v2/internal/global" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/ginkgo/v2/types" +) + +/* +Report represents the report for a Suite. +It is documented here: https://pkg.go.dev/github.com/onsi/ginkgo/v2/types#Report +*/ +type Report = types.Report + +/* +Report represents the report for a Spec. +It is documented here: https://pkg.go.dev/github.com/onsi/ginkgo/v2/types#SpecReport +*/ +type SpecReport = types.SpecReport + +/* +CurrentSpecReport returns information about the current running spec. +The returned object is a types.SpecReport which includes helper methods +to make extracting information about the spec easier. + +You can learn more about SpecReport here: https://pkg.go.dev/github.com/onsi/ginkgo/types#SpecReport +You can learn more about CurrentSpecReport() here: https://onsi.github.io/ginkgo/#getting-a-report-for-the-current-spec +*/ +func CurrentSpecReport() SpecReport { + return global.Suite.CurrentSpecReport() +} + +/* + ReportEntryVisibility governs the visibility of ReportEntries in Ginkgo's console reporter + +- ReportEntryVisibilityAlways: the default behavior - the ReportEntry is always emitted. +- ReportEntryVisibilityFailureOrVerbose: the ReportEntry is only emitted if the spec fails or if the tests are run with -v (similar to GinkgoWriters behavior). +- ReportEntryVisibilityNever: the ReportEntry is never emitted though it appears in any generated machine-readable reports (e.g. by setting `--json-report`). + +You can learn more about Report Entries here: https://onsi.github.io/ginkgo/#attaching-data-to-reports +*/ +type ReportEntryVisibility = types.ReportEntryVisibility + +const ReportEntryVisibilityAlways, ReportEntryVisibilityFailureOrVerbose, ReportEntryVisibilityNever = types.ReportEntryVisibilityAlways, types.ReportEntryVisibilityFailureOrVerbose, types.ReportEntryVisibilityNever + +/* +AddReportEntry generates and adds a new ReportEntry to the current spec's SpecReport. +It can take any of the following arguments: + - A single arbitrary object to attach as the Value of the ReportEntry. This object will be included in any generated reports and will be emitted to the console when the report is emitted. + - A ReportEntryVisibility enum to control the visibility of the ReportEntry + - An Offset or CodeLocation decoration to control the reported location of the ReportEntry + +If the Value object implements `fmt.Stringer`, it's `String()` representation is used when emitting to the console. + +AddReportEntry() must be called within a Subject or Setup node - not in a Container node. + +You can learn more about Report Entries here: https://onsi.github.io/ginkgo/#attaching-data-to-reports +*/ +func AddReportEntry(name string, args ...interface{}) { + cl := types.NewCodeLocation(1) + reportEntry, err := internal.NewReportEntry(name, cl, args...) + if err != nil { + Fail(fmt.Sprintf("Failed to generate Report Entry:\n%s", err.Error()), 1) + } + err = global.Suite.AddReportEntry(reportEntry) + if err != nil { + Fail(fmt.Sprintf("Failed to add Report Entry:\n%s", err.Error()), 1) + } +} + +/* +ReportBeforeEach nodes are run for each spec, even if the spec is skipped or pending. ReportBeforeEach nodes take a function that +receives a SpecReport or both SpecContext and Report for interruptible behavior. They are called before the spec starts. + +Example: + + ReportBeforeEach(func(report SpecReport) { // process report }) + ReportBeforeEach(func(ctx SpecContext, report SpecReport) { + // process report + }), NodeTimeout(1 * time.Minute)) + +You cannot nest any other Ginkgo nodes within a ReportBeforeEach node's closure. +You can learn more about ReportBeforeEach here: https://onsi.github.io/ginkgo/#generating-reports-programmatically + +You can learn about interruptible nodes here: https://onsi.github.io/ginkgo/#spec-timeouts-and-interruptible-nodes +*/ +func ReportBeforeEach(body any, args ...any) bool { + combinedArgs := []interface{}{body} + combinedArgs = append(combinedArgs, args...) + + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeReportBeforeEach, "", combinedArgs...)) +} + +/* +ReportAfterEach nodes are run for each spec, even if the spec is skipped or pending. +ReportAfterEach nodes take a function that receives a SpecReport or both SpecContext and Report for interruptible behavior. +They are called after the spec has completed and receive the final report for the spec. + +Example: + + ReportAfterEach(func(report SpecReport) { // process report }) + ReportAfterEach(func(ctx SpecContext, report SpecReport) { + // process report + }), NodeTimeout(1 * time.Minute)) + +You cannot nest any other Ginkgo nodes within a ReportAfterEach node's closure. +You can learn more about ReportAfterEach here: https://onsi.github.io/ginkgo/#generating-reports-programmatically + +You can learn about interruptible nodes here: https://onsi.github.io/ginkgo/#spec-timeouts-and-interruptible-nodes +*/ +func ReportAfterEach(body any, args ...any) bool { + combinedArgs := []interface{}{body} + combinedArgs = append(combinedArgs, args...) + + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeReportAfterEach, "", combinedArgs...)) +} + +/* +ReportBeforeSuite nodes are run at the beginning of the suite. ReportBeforeSuite nodes take a function +that can either receive Report or both SpecContext and Report for interruptible behavior. + +Example Usage: + + ReportBeforeSuite(func(r Report) { // process report }) + ReportBeforeSuite(func(ctx SpecContext, r Report) { + // process report + }, NodeTimeout(1 * time.Minute)) + +They are called at the beginning of the suite, before any specs have run and any BeforeSuite or SynchronizedBeforeSuite nodes, and are passed in the initial report for the suite. +ReportBeforeSuite nodes must be created at the top-level (i.e. not nested in a Context/Describe/When node) + +# When running in parallel, Ginkgo ensures that only one of the parallel nodes runs the ReportBeforeSuite + +You cannot nest any other Ginkgo nodes within a ReportAfterSuite node's closure. +You can learn more about ReportAfterSuite here: https://onsi.github.io/ginkgo/#generating-reports-programmatically + +You can learn more about Ginkgo's reporting infrastructure, including generating reports with the CLI here: https://onsi.github.io/ginkgo/#generating-machine-readable-reports + +You can learn about interruptible nodes here: https://onsi.github.io/ginkgo/#spec-timeouts-and-interruptible-nodes +*/ +func ReportBeforeSuite(body any, args ...any) bool { + combinedArgs := []interface{}{body} + combinedArgs = append(combinedArgs, args...) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeReportBeforeSuite, "", combinedArgs...)) +} + +/* +ReportAfterSuite nodes are run at the end of the suite. ReportAfterSuite nodes execute at the suite's conclusion, +and accept a function that can either receive Report or both SpecContext and Report for interruptible behavior. + +Example Usage: + + ReportAfterSuite("Non-interruptible ReportAfterSuite", func(r Report) { // process report }) + ReportAfterSuite("Interruptible ReportAfterSuite", func(ctx SpecContext, r Report) { + // process report + }, NodeTimeout(1 * time.Minute)) + +They are called at the end of the suite, after all specs have run and any AfterSuite or SynchronizedAfterSuite nodes, and are passed in the final report for the suite. +ReportAfterSuite nodes must be created at the top-level (i.e. not nested in a Context/Describe/When node) + +When running in parallel, Ginkgo ensures that only one of the parallel nodes runs the ReportAfterSuite and that it is passed a report that is aggregated across +all parallel nodes + +In addition to using ReportAfterSuite to programmatically generate suite reports, you can also generate JSON, JUnit, and Teamcity formatted reports using the --json-report, --junit-report, and --teamcity-report ginkgo CLI flags. + +You cannot nest any other Ginkgo nodes within a ReportAfterSuite node's closure. +You can learn more about ReportAfterSuite here: https://onsi.github.io/ginkgo/#generating-reports-programmatically + +You can learn more about Ginkgo's reporting infrastructure, including generating reports with the CLI here: https://onsi.github.io/ginkgo/#generating-machine-readable-reports + +You can learn about interruptible nodes here: https://onsi.github.io/ginkgo/#spec-timeouts-and-interruptible-nodes +*/ +func ReportAfterSuite(text string, body any, args ...interface{}) bool { + combinedArgs := []interface{}{body} + combinedArgs = append(combinedArgs, args...) + return pushNode(internal.NewNode(deprecationTracker, types.NodeTypeReportAfterSuite, text, combinedArgs...)) +} + +func registerReportAfterSuiteNodeForAutogeneratedReports(reporterConfig types.ReporterConfig) { + body := func(report Report) { + if reporterConfig.JSONReport != "" { + err := reporters.GenerateJSONReport(report, reporterConfig.JSONReport) + if err != nil { + Fail(fmt.Sprintf("Failed to generate JSON report:\n%s", err.Error())) + } + } + if reporterConfig.JUnitReport != "" { + err := reporters.GenerateJUnitReport(report, reporterConfig.JUnitReport) + if err != nil { + Fail(fmt.Sprintf("Failed to generate JUnit report:\n%s", err.Error())) + } + } + if reporterConfig.TeamcityReport != "" { + err := reporters.GenerateTeamcityReport(report, reporterConfig.TeamcityReport) + if err != nil { + Fail(fmt.Sprintf("Failed to generate Teamcity report:\n%s", err.Error())) + } + } + } + + flags := []string{} + if reporterConfig.JSONReport != "" { + flags = append(flags, "--json-report") + } + if reporterConfig.JUnitReport != "" { + flags = append(flags, "--junit-report") + } + if reporterConfig.TeamcityReport != "" { + flags = append(flags, "--teamcity-report") + } + pushNode(internal.NewNode( + deprecationTracker, types.NodeTypeReportAfterSuite, + fmt.Sprintf("Autogenerated ReportAfterSuite for %s", strings.Join(flags, " ")), + body, + types.NewCustomCodeLocation("autogenerated by Ginkgo"), + )) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/table_dsl.go b/vendor/github.com/onsi/ginkgo/v2/table_dsl.go new file mode 100644 index 000000000..9074a57ac --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/table_dsl.go @@ -0,0 +1,386 @@ +package ginkgo + +import ( + "context" + "fmt" + "reflect" + "strings" + + "github.com/onsi/ginkgo/v2/internal" + "github.com/onsi/ginkgo/v2/types" +) + +/* +The EntryDescription decorator allows you to pass a format string to DescribeTable() and Entry(). This format string is used to generate entry names via: + + fmt.Sprintf(formatString, parameters...) + +where parameters are the parameters passed into the entry. + +When passed into an Entry the EntryDescription is used to generate the name or that entry. When passed to DescribeTable, the EntryDescription is used to generate the names for any entries that have `nil` descriptions. + +You can learn more about generating EntryDescriptions here: https://onsi.github.io/ginkgo/#generating-entry-descriptions +*/ +type EntryDescription string + +func (ed EntryDescription) render(args ...interface{}) string { + return fmt.Sprintf(string(ed), args...) +} + +/* +DescribeTable describes a table-driven spec. + +For example: + + DescribeTable("a simple table", + func(x int, y int, expected bool) { + Ω(x > y).Should(Equal(expected)) + }, + Entry("x > y", 1, 0, true), + Entry("x == y", 0, 0, false), + Entry("x < y", 0, 1, false), + ) + +You can learn more about DescribeTable here: https://onsi.github.io/ginkgo/#table-specs +And can explore some Table patterns here: https://onsi.github.io/ginkgo/#table-specs-patterns +*/ +func DescribeTable(description string, args ...interface{}) bool { + GinkgoHelper() + generateTable(description, false, args...) + return true +} + +/* +You can focus a table with `FDescribeTable`. This is equivalent to `FDescribe`. +*/ +func FDescribeTable(description string, args ...interface{}) bool { + GinkgoHelper() + args = append(args, internal.Focus) + generateTable(description, false, args...) + return true +} + +/* +You can mark a table as pending with `PDescribeTable`. This is equivalent to `PDescribe`. +*/ +func PDescribeTable(description string, args ...interface{}) bool { + GinkgoHelper() + args = append(args, internal.Pending) + generateTable(description, false, args...) + return true +} + +/* +You can mark a table as pending with `XDescribeTable`. This is equivalent to `XDescribe`. +*/ +var XDescribeTable = PDescribeTable + +/* +DescribeTableSubtree describes a table-driven spec that generates a set of tests for each entry. + +For example: + + DescribeTableSubtree("a subtree table", + func(url string, code int, message string) { + var resp *http.Response + BeforeEach(func() { + var err error + resp, err = http.Get(url) + Expect(err).NotTo(HaveOccurred()) + DeferCleanup(resp.Body.Close) + }) + + It("should return the expected status code", func() { + Expect(resp.StatusCode).To(Equal(code)) + }) + + It("should return the expected message", func() { + body, err := io.ReadAll(resp.Body) + Expect(err).NotTo(HaveOccurred()) + Expect(string(body)).To(Equal(message)) + }) + }, + Entry("default response", "example.com/response", http.StatusOK, "hello world"), + Entry("missing response", "example.com/missing", http.StatusNotFound, "wat?"), + ) + +Note that you **must** place define an It inside the body function. + +You can learn more about DescribeTableSubtree here: https://onsi.github.io/ginkgo/#table-specs +And can explore some Table patterns here: https://onsi.github.io/ginkgo/#table-specs-patterns +*/ +func DescribeTableSubtree(description string, args ...interface{}) bool { + GinkgoHelper() + generateTable(description, true, args...) + return true +} + +/* +You can focus a table with `FDescribeTableSubtree`. This is equivalent to `FDescribe`. +*/ +func FDescribeTableSubtree(description string, args ...interface{}) bool { + GinkgoHelper() + args = append(args, internal.Focus) + generateTable(description, true, args...) + return true +} + +/* +You can mark a table as pending with `PDescribeTableSubtree`. This is equivalent to `PDescribe`. +*/ +func PDescribeTableSubtree(description string, args ...interface{}) bool { + GinkgoHelper() + args = append(args, internal.Pending) + generateTable(description, true, args...) + return true +} + +/* +You can mark a table as pending with `XDescribeTableSubtree`. This is equivalent to `XDescribe`. +*/ +var XDescribeTableSubtree = PDescribeTableSubtree + +/* +TableEntry represents an entry in a table test. You generally use the `Entry` constructor. +*/ +type TableEntry struct { + description interface{} + decorations []interface{} + parameters []interface{} + codeLocation types.CodeLocation +} + +/* +Entry constructs a TableEntry. + +The first argument is a description. This can be a string, a function that accepts the parameters passed to the TableEntry and returns a string, an EntryDescription format string, or nil. If nil is provided then the name of the Entry is derived using the table-level entry description. +Subsequent arguments accept any Ginkgo decorators. These are filtered out and the remaining arguments are passed into the Spec function associated with the table. + +Each Entry ends up generating an individual Ginkgo It. The body of the it is the Table Body function with the Entry parameters passed in. + +If you want to generate interruptible specs simply write a Table function that accepts a SpecContext as its first argument. You can then decorate individual Entrys with the NodeTimeout and SpecTimeout decorators. + +You can learn more about Entry here: https://onsi.github.io/ginkgo/#table-specs +*/ +func Entry(description interface{}, args ...interface{}) TableEntry { + GinkgoHelper() + decorations, parameters := internal.PartitionDecorations(args...) + return TableEntry{description: description, decorations: decorations, parameters: parameters, codeLocation: types.NewCodeLocation(0)} +} + +/* +You can focus a particular entry with FEntry. This is equivalent to FIt. +*/ +func FEntry(description interface{}, args ...interface{}) TableEntry { + GinkgoHelper() + decorations, parameters := internal.PartitionDecorations(args...) + decorations = append(decorations, internal.Focus) + return TableEntry{description: description, decorations: decorations, parameters: parameters, codeLocation: types.NewCodeLocation(0)} +} + +/* +You can mark a particular entry as pending with PEntry. This is equivalent to PIt. +*/ +func PEntry(description interface{}, args ...interface{}) TableEntry { + GinkgoHelper() + decorations, parameters := internal.PartitionDecorations(args...) + decorations = append(decorations, internal.Pending) + return TableEntry{description: description, decorations: decorations, parameters: parameters, codeLocation: types.NewCodeLocation(0)} +} + +/* +You can mark a particular entry as pending with XEntry. This is equivalent to XIt. +*/ +var XEntry = PEntry + +var contextType = reflect.TypeOf(new(context.Context)).Elem() +var specContextType = reflect.TypeOf(new(SpecContext)).Elem() + +func generateTable(description string, isSubtree bool, args ...interface{}) { + GinkgoHelper() + cl := types.NewCodeLocation(0) + containerNodeArgs := []interface{}{cl} + + entries := []TableEntry{} + var internalBody interface{} + var internalBodyType reflect.Type + + var tableLevelEntryDescription interface{} + tableLevelEntryDescription = func(args ...interface{}) string { + out := []string{} + for _, arg := range args { + out = append(out, fmt.Sprint(arg)) + } + return "Entry: " + strings.Join(out, ", ") + } + + if len(args) == 1 { + exitIfErr(types.GinkgoErrors.MissingParametersForTableFunction(cl)) + } + + for i, arg := range args { + switch t := reflect.TypeOf(arg); { + case t == nil: + exitIfErr(types.GinkgoErrors.IncorrectParameterTypeForTable(i, "nil", cl)) + case t == reflect.TypeOf(TableEntry{}): + entries = append(entries, arg.(TableEntry)) + case t == reflect.TypeOf([]TableEntry{}): + entries = append(entries, arg.([]TableEntry)...) + case t == reflect.TypeOf(EntryDescription("")): + tableLevelEntryDescription = arg.(EntryDescription).render + case t.Kind() == reflect.Func && t.NumOut() == 1 && t.Out(0) == reflect.TypeOf(""): + tableLevelEntryDescription = arg + case t.Kind() == reflect.Func: + if internalBody != nil { + exitIfErr(types.GinkgoErrors.MultipleEntryBodyFunctionsForTable(cl)) + } + internalBody = arg + internalBodyType = reflect.TypeOf(internalBody) + default: + containerNodeArgs = append(containerNodeArgs, arg) + } + } + + containerNodeArgs = append(containerNodeArgs, func() { + for _, entry := range entries { + var err error + entry := entry + var description string + switch t := reflect.TypeOf(entry.description); { + case t == nil: + err = validateParameters(tableLevelEntryDescription, entry.parameters, "Entry Description function", entry.codeLocation, false) + if err == nil { + description = invokeFunction(tableLevelEntryDescription, entry.parameters)[0].String() + } + case t == reflect.TypeOf(EntryDescription("")): + description = entry.description.(EntryDescription).render(entry.parameters...) + case t == reflect.TypeOf(""): + description = entry.description.(string) + case t.Kind() == reflect.Func && t.NumOut() == 1 && t.Out(0) == reflect.TypeOf(""): + err = validateParameters(entry.description, entry.parameters, "Entry Description function", entry.codeLocation, false) + if err == nil { + description = invokeFunction(entry.description, entry.parameters)[0].String() + } + default: + err = types.GinkgoErrors.InvalidEntryDescription(entry.codeLocation) + } + + internalNodeArgs := []interface{}{entry.codeLocation} + internalNodeArgs = append(internalNodeArgs, entry.decorations...) + + hasContext := false + if internalBodyType.NumIn() > 0 { + if internalBodyType.In(0).Implements(specContextType) { + hasContext = true + } else if internalBodyType.In(0).Implements(contextType) { + hasContext = true + if len(entry.parameters) > 0 && reflect.TypeOf(entry.parameters[0]) != nil && reflect.TypeOf(entry.parameters[0]).Implements(contextType) { + // we allow you to pass in a non-nil context + hasContext = false + } + } + } + + if err == nil { + err = validateParameters(internalBody, entry.parameters, "Table Body function", entry.codeLocation, hasContext) + } + + if hasContext { + internalNodeArgs = append(internalNodeArgs, func(c SpecContext) { + if err != nil { + panic(err) + } + invokeFunction(internalBody, append([]interface{}{c}, entry.parameters...)) + }) + if isSubtree { + exitIfErr(types.GinkgoErrors.ContextsCannotBeUsedInSubtreeTables(cl)) + } + } else { + internalNodeArgs = append(internalNodeArgs, func() { + if err != nil { + panic(err) + } + invokeFunction(internalBody, entry.parameters) + }) + } + + internalNodeType := types.NodeTypeIt + if isSubtree { + internalNodeType = types.NodeTypeContainer + } + + pushNode(internal.NewNode(deprecationTracker, internalNodeType, description, internalNodeArgs...)) + } + }) + + pushNode(internal.NewNode(deprecationTracker, types.NodeTypeContainer, description, containerNodeArgs...)) +} + +func invokeFunction(function interface{}, parameters []interface{}) []reflect.Value { + inValues := make([]reflect.Value, len(parameters)) + + funcType := reflect.TypeOf(function) + limit := funcType.NumIn() + if funcType.IsVariadic() { + limit = limit - 1 + } + + for i := 0; i < limit && i < len(parameters); i++ { + inValues[i] = computeValue(parameters[i], funcType.In(i)) + } + + if funcType.IsVariadic() { + variadicType := funcType.In(limit).Elem() + for i := limit; i < len(parameters); i++ { + inValues[i] = computeValue(parameters[i], variadicType) + } + } + + return reflect.ValueOf(function).Call(inValues) +} + +func validateParameters(function interface{}, parameters []interface{}, kind string, cl types.CodeLocation, hasContext bool) error { + funcType := reflect.TypeOf(function) + limit := funcType.NumIn() + offset := 0 + if hasContext { + limit = limit - 1 + offset = 1 + } + if funcType.IsVariadic() { + limit = limit - 1 + } + if len(parameters) < limit { + return types.GinkgoErrors.TooFewParametersToTableFunction(limit, len(parameters), kind, cl) + } + if len(parameters) > limit && !funcType.IsVariadic() { + return types.GinkgoErrors.TooManyParametersToTableFunction(limit, len(parameters), kind, cl) + } + var i = 0 + for ; i < limit; i++ { + actual := reflect.TypeOf(parameters[i]) + expected := funcType.In(i + offset) + if !(actual == nil) && !actual.AssignableTo(expected) { + return types.GinkgoErrors.IncorrectParameterTypeToTableFunction(i+1, expected, actual, kind, cl) + } + } + if funcType.IsVariadic() { + expected := funcType.In(limit + offset).Elem() + for ; i < len(parameters); i++ { + actual := reflect.TypeOf(parameters[i]) + if !(actual == nil) && !actual.AssignableTo(expected) { + return types.GinkgoErrors.IncorrectVariadicParameterTypeToTableFunction(expected, actual, kind, cl) + } + } + } + + return nil +} + +func computeValue(parameter interface{}, t reflect.Type) reflect.Value { + if parameter == nil { + return reflect.Zero(t) + } else { + return reflect.ValueOf(parameter) + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/code_location.go b/vendor/github.com/onsi/ginkgo/v2/types/code_location.go new file mode 100644 index 000000000..57e87517e --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/code_location.go @@ -0,0 +1,159 @@ +package types + +import ( + "fmt" + "os" + "regexp" + "runtime" + "runtime/debug" + "strings" + "sync" +) + +type CodeLocation struct { + FileName string `json:",omitempty"` + LineNumber int `json:",omitempty"` + FullStackTrace string `json:",omitempty"` + CustomMessage string `json:",omitempty"` +} + +func (codeLocation CodeLocation) String() string { + if codeLocation.CustomMessage != "" { + return codeLocation.CustomMessage + } + return fmt.Sprintf("%s:%d", codeLocation.FileName, codeLocation.LineNumber) +} + +func (codeLocation CodeLocation) ContentsOfLine() string { + if codeLocation.CustomMessage != "" { + return "" + } + contents, err := os.ReadFile(codeLocation.FileName) + if err != nil { + return "" + } + lines := strings.Split(string(contents), "\n") + if len(lines) < codeLocation.LineNumber { + return "" + } + return lines[codeLocation.LineNumber-1] +} + +type codeLocationLocator struct { + pcs map[uintptr]bool + helpers map[string]bool + lock *sync.Mutex +} + +func (c *codeLocationLocator) addHelper(pc uintptr) { + c.lock.Lock() + defer c.lock.Unlock() + + if c.pcs[pc] { + return + } + c.lock.Unlock() + f := runtime.FuncForPC(pc) + c.lock.Lock() + if f == nil { + return + } + c.helpers[f.Name()] = true + c.pcs[pc] = true +} + +func (c *codeLocationLocator) hasHelper(name string) bool { + c.lock.Lock() + defer c.lock.Unlock() + return c.helpers[name] +} + +func (c *codeLocationLocator) getCodeLocation(skip int) CodeLocation { + pc := make([]uintptr, 40) + n := runtime.Callers(skip+2, pc) + if n == 0 { + return CodeLocation{} + } + pc = pc[:n] + frames := runtime.CallersFrames(pc) + for { + frame, more := frames.Next() + if !c.hasHelper(frame.Function) { + return CodeLocation{FileName: frame.File, LineNumber: frame.Line} + } + if !more { + break + } + } + return CodeLocation{} +} + +var clLocator = &codeLocationLocator{ + pcs: map[uintptr]bool{}, + helpers: map[string]bool{}, + lock: &sync.Mutex{}, +} + +// MarkAsHelper is used by GinkgoHelper to mark the caller (appropriately offset by skip)as a helper. You can use this directly if you need to provide an optional `skip` to mark functions further up the call stack as helpers. +func MarkAsHelper(optionalSkip ...int) { + skip := 1 + if len(optionalSkip) > 0 { + skip += optionalSkip[0] + } + pc, _, _, ok := runtime.Caller(skip) + if ok { + clLocator.addHelper(pc) + } +} + +func NewCustomCodeLocation(message string) CodeLocation { + return CodeLocation{ + CustomMessage: message, + } +} + +func NewCodeLocation(skip int) CodeLocation { + return clLocator.getCodeLocation(skip + 1) +} + +func NewCodeLocationWithStackTrace(skip int) CodeLocation { + cl := clLocator.getCodeLocation(skip + 1) + cl.FullStackTrace = PruneStack(string(debug.Stack()), skip+1) + return cl +} + +// PruneStack removes references to functions that are internal to Ginkgo +// and the Go runtime from a stack string and a certain number of stack entries +// at the beginning of the stack. The stack string has the format +// as returned by runtime/debug.Stack. The leading goroutine information is +// optional and always removed if present. Beware that runtime/debug.Stack +// adds itself as first entry, so typically skip must be >= 1 to remove that +// entry. +func PruneStack(fullStackTrace string, skip int) string { + stack := strings.Split(fullStackTrace, "\n") + // Ensure that the even entries are the method names and the + // odd entries the source code information. + if len(stack) > 0 && strings.HasPrefix(stack[0], "goroutine ") { + // Ignore "goroutine 29 [running]:" line. + stack = stack[1:] + } + // The "+1" is for skipping over the initial entry, which is + // runtime/debug.Stack() itself. + if len(stack) > 2*(skip+1) { + stack = stack[2*(skip+1):] + } + prunedStack := []string{} + if os.Getenv("GINKGO_PRUNE_STACK") == "FALSE" { + prunedStack = stack + } else { + re := regexp.MustCompile(`\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`) + for i := 0; i < len(stack)/2; i++ { + // We filter out based on the source code file name. + if !re.MatchString(stack[i*2+1]) { + prunedStack = append(prunedStack, stack[i*2]) + prunedStack = append(prunedStack, stack[i*2+1]) + } + } + } + return strings.Join(prunedStack, "\n") +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/config.go b/vendor/github.com/onsi/ginkgo/v2/types/config.go new file mode 100644 index 000000000..8c0dfab8c --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/config.go @@ -0,0 +1,776 @@ +/* +Ginkgo accepts a number of configuration options. +These are documented [here](http://onsi.github.io/ginkgo/#the-ginkgo-cli) +*/ + +package types + +import ( + "flag" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "time" +) + +// Configuration controlling how an individual test suite is run +type SuiteConfig struct { + RandomSeed int64 + RandomizeAllSpecs bool + FocusStrings []string + SkipStrings []string + FocusFiles []string + SkipFiles []string + LabelFilter string + FailOnPending bool + FailOnEmpty bool + FailFast bool + FlakeAttempts int + MustPassRepeatedly int + DryRun bool + PollProgressAfter time.Duration + PollProgressInterval time.Duration + Timeout time.Duration + EmitSpecProgress bool // this is deprecated but its removal is causing compile issue for some users that were setting it manually + OutputInterceptorMode string + SourceRoots []string + GracePeriod time.Duration + + ParallelProcess int + ParallelTotal int + ParallelHost string +} + +func NewDefaultSuiteConfig() SuiteConfig { + return SuiteConfig{ + RandomSeed: time.Now().Unix(), + Timeout: time.Hour, + ParallelProcess: 1, + ParallelTotal: 1, + GracePeriod: 30 * time.Second, + } +} + +type VerbosityLevel uint + +const ( + VerbosityLevelSuccinct VerbosityLevel = iota + VerbosityLevelNormal + VerbosityLevelVerbose + VerbosityLevelVeryVerbose +) + +func (vl VerbosityLevel) GT(comp VerbosityLevel) bool { + return vl > comp +} + +func (vl VerbosityLevel) GTE(comp VerbosityLevel) bool { + return vl >= comp +} + +func (vl VerbosityLevel) Is(comp VerbosityLevel) bool { + return vl == comp +} + +func (vl VerbosityLevel) LTE(comp VerbosityLevel) bool { + return vl <= comp +} + +func (vl VerbosityLevel) LT(comp VerbosityLevel) bool { + return vl < comp +} + +// Configuration for Ginkgo's reporter +type ReporterConfig struct { + NoColor bool + Succinct bool + Verbose bool + VeryVerbose bool + FullTrace bool + ShowNodeEvents bool + GithubOutput bool + SilenceSkips bool + ForceNewlines bool + + JSONReport string + JUnitReport string + TeamcityReport string +} + +func (rc ReporterConfig) Verbosity() VerbosityLevel { + if rc.Succinct { + return VerbosityLevelSuccinct + } else if rc.Verbose { + return VerbosityLevelVerbose + } else if rc.VeryVerbose { + return VerbosityLevelVeryVerbose + } + return VerbosityLevelNormal +} + +func (rc ReporterConfig) WillGenerateReport() bool { + return rc.JSONReport != "" || rc.JUnitReport != "" || rc.TeamcityReport != "" +} + +func NewDefaultReporterConfig() ReporterConfig { + return ReporterConfig{} +} + +// Configuration for the Ginkgo CLI +type CLIConfig struct { + //for build, run, and watch + Recurse bool + SkipPackage string + RequireSuite bool + NumCompilers int + + //for run and watch only + Procs int + Parallel bool + AfterRunHook string + OutputDir string + KeepSeparateCoverprofiles bool + KeepSeparateReports bool + + //for run only + KeepGoing bool + UntilItFails bool + Repeat int + RandomizeSuites bool + + //for watch only + Depth int + WatchRegExp string +} + +func NewDefaultCLIConfig() CLIConfig { + return CLIConfig{ + Depth: 1, + WatchRegExp: `\.go$`, + } +} + +func (g CLIConfig) ComputedProcs() int { + if g.Procs > 0 { + return g.Procs + } + + n := 1 + if g.Parallel { + n = runtime.NumCPU() + if n > 4 { + n = n - 1 + } + } + return n +} + +func (g CLIConfig) ComputedNumCompilers() int { + if g.NumCompilers > 0 { + return g.NumCompilers + } + + return runtime.NumCPU() +} + +// Configuration for the Ginkgo CLI capturing available go flags +// A subset of Go flags are exposed by Ginkgo. Some are available at compile time (e.g. ginkgo build) and others only at run time (e.g. ginkgo run - which has both build and run time flags). +// More details can be found at: +// https://docs.google.com/spreadsheets/d/1zkp-DS4hU4sAJl5eHh1UmgwxCPQhf3s5a8fbiOI8tJU/ +type GoFlagsConfig struct { + //build-time flags for code-and-performance analysis + Race bool + Cover bool + CoverMode string + CoverPkg string + Vet string + + //run-time flags for code-and-performance analysis + BlockProfile string + BlockProfileRate int + CoverProfile string + CPUProfile string + MemProfile string + MemProfileRate int + MutexProfile string + MutexProfileFraction int + Trace string + + //build-time flags for building + A bool + ASMFlags string + BuildMode string + BuildVCS bool + Compiler string + GCCGoFlags string + GCFlags string + InstallSuffix string + LDFlags string + LinkShared bool + Mod string + N bool + ModFile string + ModCacheRW bool + MSan bool + PkgDir string + Tags string + TrimPath bool + ToolExec string + Work bool + X bool + O string +} + +func NewDefaultGoFlagsConfig() GoFlagsConfig { + return GoFlagsConfig{} +} + +func (g GoFlagsConfig) BinaryMustBePreserved() bool { + return g.BlockProfile != "" || g.CPUProfile != "" || g.MemProfile != "" || g.MutexProfile != "" +} + +// Configuration that were deprecated in 2.0 +type deprecatedConfig struct { + DebugParallel bool + NoisySkippings bool + NoisyPendings bool + RegexScansFilePath bool + SlowSpecThresholdWithFLoatUnits float64 + Stream bool + Notify bool + EmitSpecProgress bool + SlowSpecThreshold time.Duration + AlwaysEmitGinkgoWriter bool +} + +// Flags + +// Flags sections used by both the CLI and the Ginkgo test process +var FlagSections = GinkgoFlagSections{ + {Key: "multiple-suites", Style: "{{dark-green}}", Heading: "Running Multiple Test Suites"}, + {Key: "order", Style: "{{green}}", Heading: "Controlling Test Order"}, + {Key: "parallel", Style: "{{yellow}}", Heading: "Controlling Test Parallelism"}, + {Key: "low-level-parallel", Style: "{{yellow}}", Heading: "Controlling Test Parallelism", + Description: "These are set by the Ginkgo CLI, {{red}}{{bold}}do not set them manually{{/}} via go test.\nUse ginkgo -p or ginkgo -procs=N instead."}, + {Key: "filter", Style: "{{cyan}}", Heading: "Filtering Tests"}, + {Key: "failure", Style: "{{red}}", Heading: "Failure Handling"}, + {Key: "output", Style: "{{magenta}}", Heading: "Controlling Output Formatting"}, + {Key: "code-and-coverage-analysis", Style: "{{orange}}", Heading: "Code and Coverage Analysis"}, + {Key: "performance-analysis", Style: "{{coral}}", Heading: "Performance Analysis"}, + {Key: "debug", Style: "{{blue}}", Heading: "Debugging Tests", + Description: "In addition to these flags, Ginkgo supports a few debugging environment variables. To change the parallel server protocol set {{blue}}GINKGO_PARALLEL_PROTOCOL{{/}} to {{bold}}HTTP{{/}}. To avoid pruning callstacks set {{blue}}GINKGO_PRUNE_STACK{{/}} to {{bold}}FALSE{{/}}."}, + {Key: "watch", Style: "{{light-yellow}}", Heading: "Controlling Ginkgo Watch"}, + {Key: "misc", Style: "{{light-gray}}", Heading: "Miscellaneous"}, + {Key: "go-build", Style: "{{light-gray}}", Heading: "Go Build Flags", Succinct: true, + Description: "These flags are inherited from go build. Run {{bold}}ginkgo help build{{/}} for more detailed flag documentation."}, +} + +// SuiteConfigFlags provides flags for the Ginkgo test process, and CLI +var SuiteConfigFlags = GinkgoFlags{ + {KeyPath: "S.RandomSeed", Name: "seed", SectionKey: "order", UsageDefaultValue: "randomly generated by Ginkgo", + Usage: "The seed used to randomize the spec suite.", AlwaysExport: true}, + {KeyPath: "S.RandomizeAllSpecs", Name: "randomize-all", SectionKey: "order", DeprecatedName: "randomizeAllSpecs", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will randomize all specs together. By default, ginkgo only randomizes the top level Describe, Context and When containers."}, + + {KeyPath: "S.FailOnPending", Name: "fail-on-pending", SectionKey: "failure", DeprecatedName: "failOnPending", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will mark the test suite as failed if any specs are pending."}, + {KeyPath: "S.FailFast", Name: "fail-fast", SectionKey: "failure", DeprecatedName: "failFast", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will stop running a test suite after a failure occurs."}, + {KeyPath: "S.FlakeAttempts", Name: "flake-attempts", SectionKey: "failure", UsageDefaultValue: "0 - failed tests are not retried", DeprecatedName: "flakeAttempts", DeprecatedDocLink: "changed-command-line-flags", + Usage: "Make up to this many attempts to run each spec. If any of the attempts succeed, the suite will not be failed."}, + {KeyPath: "S.FailOnEmpty", Name: "fail-on-empty", SectionKey: "failure", + Usage: "If set, ginkgo will mark the test suite as failed if no specs are run."}, + + {KeyPath: "S.DryRun", Name: "dry-run", SectionKey: "debug", DeprecatedName: "dryRun", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will walk the test hierarchy without actually running anything. Best paired with -v."}, + {KeyPath: "S.PollProgressAfter", Name: "poll-progress-after", SectionKey: "debug", UsageDefaultValue: "0", + Usage: "Emit node progress reports periodically if node hasn't completed after this duration."}, + {KeyPath: "S.PollProgressInterval", Name: "poll-progress-interval", SectionKey: "debug", UsageDefaultValue: "10s", + Usage: "The rate at which to emit node progress reports after poll-progress-after has elapsed."}, + {KeyPath: "S.SourceRoots", Name: "source-root", SectionKey: "debug", + Usage: "The location to look for source code when generating progress reports. You can pass multiple --source-root flags."}, + {KeyPath: "S.Timeout", Name: "timeout", SectionKey: "debug", UsageDefaultValue: "1h", + Usage: "Test suite fails if it does not complete within the specified timeout."}, + {KeyPath: "S.GracePeriod", Name: "grace-period", SectionKey: "debug", UsageDefaultValue: "30s", + Usage: "When interrupted, Ginkgo will wait for GracePeriod for the current running node to exit before moving on to the next one."}, + {KeyPath: "S.OutputInterceptorMode", Name: "output-interceptor-mode", SectionKey: "debug", UsageArgument: "dup, swap, or none", + Usage: "If set, ginkgo will use the specified output interception strategy when running in parallel. Defaults to dup on unix and swap on windows."}, + + {KeyPath: "S.LabelFilter", Name: "label-filter", SectionKey: "filter", UsageArgument: "expression", + Usage: "If set, ginkgo will only run specs with labels that match the label-filter. The passed-in expression can include boolean operations (!, &&, ||, ','), groupings via '()', and regular expressions '/regexp/'. e.g. '(cat || dog) && !fruit'"}, + {KeyPath: "S.FocusStrings", Name: "focus", SectionKey: "filter", + Usage: "If set, ginkgo will only run specs that match this regular expression. Can be specified multiple times, values are ORed."}, + {KeyPath: "S.SkipStrings", Name: "skip", SectionKey: "filter", + Usage: "If set, ginkgo will only run specs that do not match this regular expression. Can be specified multiple times, values are ORed."}, + {KeyPath: "S.FocusFiles", Name: "focus-file", SectionKey: "filter", UsageArgument: "file (regexp) | file:line | file:lineA-lineB | file:line,line,line", + Usage: "If set, ginkgo will only run specs in matching files. Can be specified multiple times, values are ORed."}, + {KeyPath: "S.SkipFiles", Name: "skip-file", SectionKey: "filter", UsageArgument: "file (regexp) | file:line | file:lineA-lineB | file:line,line,line", + Usage: "If set, ginkgo will skip specs in matching files. Can be specified multiple times, values are ORed."}, + + {KeyPath: "D.RegexScansFilePath", DeprecatedName: "regexScansFilePath", DeprecatedDocLink: "removed--regexscansfilepath", DeprecatedVersion: "2.0.0"}, + {KeyPath: "D.DebugParallel", DeprecatedName: "debug", DeprecatedDocLink: "removed--debug", DeprecatedVersion: "2.0.0"}, + {KeyPath: "D.EmitSpecProgress", DeprecatedName: "progress", SectionKey: "debug", + DeprecatedVersion: "2.5.0", Usage: ". The functionality provided by --progress was confusing and is no longer needed. Use --show-node-events instead to see node entry and exit events included in the timeline of failed and verbose specs. Or you can run with -vv to always see all node events. Lastly, --poll-progress-after and the PollProgressAfter decorator now provide a better mechanism for debugging specs that tend to get stuck."}, +} + +// ParallelConfigFlags provides flags for the Ginkgo test process (not the CLI) +var ParallelConfigFlags = GinkgoFlags{ + {KeyPath: "S.ParallelProcess", Name: "parallel.process", SectionKey: "low-level-parallel", UsageDefaultValue: "1", + Usage: "This worker process's (one-indexed) process number. For running specs in parallel."}, + {KeyPath: "S.ParallelTotal", Name: "parallel.total", SectionKey: "low-level-parallel", UsageDefaultValue: "1", + Usage: "The total number of worker processes. For running specs in parallel."}, + {KeyPath: "S.ParallelHost", Name: "parallel.host", SectionKey: "low-level-parallel", UsageDefaultValue: "set by Ginkgo CLI", + Usage: "The address for the server that will synchronize the processes."}, +} + +// ReporterConfigFlags provides flags for the Ginkgo test process, and CLI +var ReporterConfigFlags = GinkgoFlags{ + {KeyPath: "R.NoColor", Name: "no-color", SectionKey: "output", DeprecatedName: "noColor", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, suppress color output in default reporter. You can also set the environment variable GINKGO_NO_COLOR=TRUE"}, + {KeyPath: "R.Verbose", Name: "v", SectionKey: "output", + Usage: "If set, emits more output including GinkgoWriter contents."}, + {KeyPath: "R.VeryVerbose", Name: "vv", SectionKey: "output", + Usage: "If set, emits with maximal verbosity - includes skipped and pending tests."}, + {KeyPath: "R.Succinct", Name: "succinct", SectionKey: "output", + Usage: "If set, default reporter prints out a very succinct report"}, + {KeyPath: "R.FullTrace", Name: "trace", SectionKey: "output", + Usage: "If set, default reporter prints out the full stack trace when a failure occurs"}, + {KeyPath: "R.ShowNodeEvents", Name: "show-node-events", SectionKey: "output", + Usage: "If set, default reporter prints node > Enter and < Exit events when specs fail"}, + {KeyPath: "R.GithubOutput", Name: "github-output", SectionKey: "output", + Usage: "If set, default reporter prints easier to manage output in Github Actions."}, + {KeyPath: "R.SilenceSkips", Name: "silence-skips", SectionKey: "output", + Usage: "If set, default reporter will not print out skipped tests."}, + {KeyPath: "R.ForceNewlines", Name: "force-newlines", SectionKey: "output", + Usage: "If set, default reporter will ensure a newline appears after each test."}, + + {KeyPath: "R.JSONReport", Name: "json-report", UsageArgument: "filename.json", SectionKey: "output", + Usage: "If set, Ginkgo will generate a JSON-formatted test report at the specified location."}, + {KeyPath: "R.JUnitReport", Name: "junit-report", UsageArgument: "filename.xml", SectionKey: "output", DeprecatedName: "reportFile", DeprecatedDocLink: "improved-reporting-infrastructure", + Usage: "If set, Ginkgo will generate a conformant junit test report in the specified file."}, + {KeyPath: "R.TeamcityReport", Name: "teamcity-report", UsageArgument: "filename", SectionKey: "output", + Usage: "If set, Ginkgo will generate a Teamcity-formatted test report at the specified location."}, + + {KeyPath: "D.SlowSpecThresholdWithFLoatUnits", DeprecatedName: "slowSpecThreshold", DeprecatedDocLink: "changed--slowspecthreshold", + Usage: "use --slow-spec-threshold instead and pass in a duration string (e.g. '5s', not '5.0')"}, + {KeyPath: "D.NoisyPendings", DeprecatedName: "noisyPendings", DeprecatedDocLink: "removed--noisypendings-and--noisyskippings", DeprecatedVersion: "2.0.0"}, + {KeyPath: "D.NoisySkippings", DeprecatedName: "noisySkippings", DeprecatedDocLink: "removed--noisypendings-and--noisyskippings", DeprecatedVersion: "2.0.0"}, + {KeyPath: "D.SlowSpecThreshold", DeprecatedName: "slow-spec-threshold", SectionKey: "output", Usage: "--slow-spec-threshold has been deprecated and will be removed in a future version of Ginkgo. This feature has proved to be more noisy than useful. You can use --poll-progress-after, instead, to get more actionable feedback about potentially slow specs and understand where they might be getting stuck.", DeprecatedVersion: "2.5.0"}, + {KeyPath: "D.AlwaysEmitGinkgoWriter", DeprecatedName: "always-emit-ginkgo-writer", SectionKey: "output", Usage: " - use -v instead, or one of Ginkgo's machine-readable report formats to get GinkgoWriter output for passing specs."}, +} + +// BuildTestSuiteFlagSet attaches to the CommandLine flagset and provides flags for the Ginkgo test process +func BuildTestSuiteFlagSet(suiteConfig *SuiteConfig, reporterConfig *ReporterConfig) (GinkgoFlagSet, error) { + flags := SuiteConfigFlags.CopyAppend(ParallelConfigFlags...).CopyAppend(ReporterConfigFlags...) + flags = flags.WithPrefix("ginkgo") + bindings := map[string]interface{}{ + "S": suiteConfig, + "R": reporterConfig, + "D": &deprecatedConfig{}, + } + extraGoFlagsSection := GinkgoFlagSection{Style: "{{gray}}", Heading: "Go test flags"} + + return NewAttachedGinkgoFlagSet(flag.CommandLine, flags, bindings, FlagSections, extraGoFlagsSection) +} + +// VetConfig validates that the Ginkgo test process' configuration is sound +func VetConfig(flagSet GinkgoFlagSet, suiteConfig SuiteConfig, reporterConfig ReporterConfig) []error { + errors := []error{} + + if flagSet.WasSet("count") || flagSet.WasSet("test.count") { + flag := flagSet.Lookup("count") + if flag == nil { + flag = flagSet.Lookup("test.count") + } + count, err := strconv.Atoi(flag.Value.String()) + if err != nil || count != 1 { + errors = append(errors, GinkgoErrors.InvalidGoFlagCount()) + } + } + + if flagSet.WasSet("parallel") || flagSet.WasSet("test.parallel") { + errors = append(errors, GinkgoErrors.InvalidGoFlagParallel()) + } + + if suiteConfig.ParallelTotal < 1 { + errors = append(errors, GinkgoErrors.InvalidParallelTotalConfiguration()) + } + + if suiteConfig.ParallelProcess > suiteConfig.ParallelTotal || suiteConfig.ParallelProcess < 1 { + errors = append(errors, GinkgoErrors.InvalidParallelProcessConfiguration()) + } + + if suiteConfig.ParallelTotal > 1 && suiteConfig.ParallelHost == "" { + errors = append(errors, GinkgoErrors.MissingParallelHostConfiguration()) + } + + if suiteConfig.DryRun && suiteConfig.ParallelTotal > 1 { + errors = append(errors, GinkgoErrors.DryRunInParallelConfiguration()) + } + + if suiteConfig.GracePeriod <= 0 { + errors = append(errors, GinkgoErrors.GracePeriodCannotBeZero()) + } + + if len(suiteConfig.FocusFiles) > 0 { + _, err := ParseFileFilters(suiteConfig.FocusFiles) + if err != nil { + errors = append(errors, err) + } + } + + if len(suiteConfig.SkipFiles) > 0 { + _, err := ParseFileFilters(suiteConfig.SkipFiles) + if err != nil { + errors = append(errors, err) + } + } + + if suiteConfig.LabelFilter != "" { + _, err := ParseLabelFilter(suiteConfig.LabelFilter) + if err != nil { + errors = append(errors, err) + } + } + + switch strings.ToLower(suiteConfig.OutputInterceptorMode) { + case "", "dup", "swap", "none": + default: + errors = append(errors, GinkgoErrors.InvalidOutputInterceptorModeConfiguration(suiteConfig.OutputInterceptorMode)) + } + + numVerbosity := 0 + for _, v := range []bool{reporterConfig.Succinct, reporterConfig.Verbose, reporterConfig.VeryVerbose} { + if v { + numVerbosity++ + } + } + if numVerbosity > 1 { + errors = append(errors, GinkgoErrors.ConflictingVerbosityConfiguration()) + } + + return errors +} + +// GinkgoCLISharedFlags provides flags shared by the Ginkgo CLI's build, watch, and run commands +var GinkgoCLISharedFlags = GinkgoFlags{ + {KeyPath: "C.Recurse", Name: "r", SectionKey: "multiple-suites", + Usage: "If set, ginkgo finds and runs test suites under the current directory recursively."}, + {KeyPath: "C.SkipPackage", Name: "skip-package", SectionKey: "multiple-suites", DeprecatedName: "skipPackage", DeprecatedDocLink: "changed-command-line-flags", + UsageArgument: "comma-separated list of packages", + Usage: "A comma-separated list of package names to be skipped. If any part of the package's path matches, that package is ignored."}, + {KeyPath: "C.RequireSuite", Name: "require-suite", SectionKey: "failure", DeprecatedName: "requireSuite", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, Ginkgo fails if there are ginkgo tests in a directory but no invocation of RunSpecs."}, + {KeyPath: "C.NumCompilers", Name: "compilers", SectionKey: "multiple-suites", UsageDefaultValue: "0 (will autodetect)", + Usage: "When running multiple packages, the number of concurrent compilations to perform."}, +} + +// GinkgoCLIRunAndWatchFlags provides flags shared by the Ginkgo CLI's build and watch commands (but not run) +var GinkgoCLIRunAndWatchFlags = GinkgoFlags{ + {KeyPath: "C.Procs", Name: "procs", SectionKey: "parallel", UsageDefaultValue: "1 (run in series)", + Usage: "The number of parallel test nodes to run."}, + {KeyPath: "C.Procs", Name: "nodes", SectionKey: "parallel", UsageDefaultValue: "1 (run in series)", + Usage: "--nodes is an alias for --procs"}, + {KeyPath: "C.Parallel", Name: "p", SectionKey: "parallel", + Usage: "If set, ginkgo will run in parallel with an auto-detected number of nodes."}, + {KeyPath: "C.AfterRunHook", Name: "after-run-hook", SectionKey: "misc", DeprecatedName: "afterSuiteHook", DeprecatedDocLink: "changed-command-line-flags", + Usage: "Command to run when a test suite completes."}, + {KeyPath: "C.OutputDir", Name: "output-dir", SectionKey: "output", UsageArgument: "directory", DeprecatedName: "outputdir", DeprecatedDocLink: "improved-profiling-support", + Usage: "A location to place all generated profiles and reports."}, + {KeyPath: "C.KeepSeparateCoverprofiles", Name: "keep-separate-coverprofiles", SectionKey: "code-and-coverage-analysis", + Usage: "If set, Ginkgo does not merge coverprofiles into one monolithic coverprofile. The coverprofiles will remain in their respective package directories or in -output-dir if set."}, + {KeyPath: "C.KeepSeparateReports", Name: "keep-separate-reports", SectionKey: "output", + Usage: "If set, Ginkgo does not merge per-suite reports (e.g. -json-report) into one monolithic report for the entire testrun. The reports will remain in their respective package directories or in -output-dir if set."}, + + {KeyPath: "D.Stream", DeprecatedName: "stream", DeprecatedDocLink: "removed--stream", DeprecatedVersion: "2.0.0"}, + {KeyPath: "D.Notify", DeprecatedName: "notify", DeprecatedDocLink: "removed--notify", DeprecatedVersion: "2.0.0"}, +} + +// GinkgoCLIRunFlags provides flags for Ginkgo CLI's run command that aren't shared by any other commands +var GinkgoCLIRunFlags = GinkgoFlags{ + {KeyPath: "C.KeepGoing", Name: "keep-going", SectionKey: "multiple-suites", DeprecatedName: "keepGoing", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, failures from earlier test suites do not prevent later test suites from running."}, + {KeyPath: "C.UntilItFails", Name: "until-it-fails", SectionKey: "debug", DeprecatedName: "untilItFails", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will keep rerunning test suites until a failure occurs."}, + {KeyPath: "C.Repeat", Name: "repeat", SectionKey: "debug", UsageArgument: "n", UsageDefaultValue: "0 - i.e. no repetition, run only once", + Usage: "The number of times to re-run a test-suite. Useful for debugging flaky tests. If set to N the suite will be run N+1 times and will be required to pass each time."}, + {KeyPath: "C.RandomizeSuites", Name: "randomize-suites", SectionKey: "order", DeprecatedName: "randomizeSuites", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will randomize the order in which test suites run."}, +} + +// GinkgoCLIRunFlags provides flags for Ginkgo CLI's watch command that aren't shared by any other commands +var GinkgoCLIWatchFlags = GinkgoFlags{ + {KeyPath: "C.Depth", Name: "depth", SectionKey: "watch", + Usage: "Ginkgo will watch dependencies down to this depth in the dependency tree."}, + {KeyPath: "C.WatchRegExp", Name: "watch-regexp", SectionKey: "watch", DeprecatedName: "watchRegExp", DeprecatedDocLink: "changed-command-line-flags", + UsageArgument: "Regular Expression", + UsageDefaultValue: `\.go$`, + Usage: "Only files matching this regular expression will be watched for changes."}, +} + +// GoBuildFlags provides flags for the Ginkgo CLI build, run, and watch commands that capture go's build-time flags. These are passed to go test -c by the ginkgo CLI +var GoBuildFlags = GinkgoFlags{ + {KeyPath: "Go.Race", Name: "race", SectionKey: "code-and-coverage-analysis", + Usage: "enable data race detection. Supported on linux/amd64, linux/ppc64le, linux/arm64, linux/s390x, freebsd/amd64, netbsd/amd64, darwin/amd64, darwin/arm64, and windows/amd64."}, + {KeyPath: "Go.Vet", Name: "vet", UsageArgument: "list", SectionKey: "code-and-coverage-analysis", + Usage: `Configure the invocation of "go vet" during "go test" to use the comma-separated list of vet checks. If list is empty, "go test" runs "go vet" with a curated list of checks believed to be always worth addressing. If list is "off", "go test" does not run "go vet" at all. Available checks can be found by running 'go doc cmd/vet'`}, + {KeyPath: "Go.Cover", Name: "cover", SectionKey: "code-and-coverage-analysis", + Usage: "Enable coverage analysis. Note that because coverage works by annotating the source code before compilation, compilation and test failures with coverage enabled may report line numbers that don't correspond to the original sources."}, + {KeyPath: "Go.CoverMode", Name: "covermode", UsageArgument: "set,count,atomic", SectionKey: "code-and-coverage-analysis", + Usage: `Set the mode for coverage analysis for the package[s] being tested. 'set': does this statement run? 'count': how many times does this statement run? 'atomic': like count, but correct in multithreaded tests and more expensive (must use atomic with -race). Sets -cover`}, + {KeyPath: "Go.CoverPkg", Name: "coverpkg", UsageArgument: "pattern1,pattern2,pattern3", SectionKey: "code-and-coverage-analysis", + Usage: "Apply coverage analysis in each test to packages matching the patterns. The default is for each test to analyze only the package being tested. See 'go help packages' for a description of package patterns. Sets -cover."}, + + {KeyPath: "Go.A", Name: "a", SectionKey: "go-build", + Usage: "force rebuilding of packages that are already up-to-date."}, + {KeyPath: "Go.ASMFlags", Name: "asmflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build", + Usage: "arguments to pass on each go tool asm invocation."}, + {KeyPath: "Go.BuildMode", Name: "buildmode", UsageArgument: "mode", SectionKey: "go-build", + Usage: "build mode to use. See 'go help buildmode' for more."}, + {KeyPath: "Go.BuildVCS", Name: "buildvcs", SectionKey: "go-build", + Usage: "adds version control information."}, + {KeyPath: "Go.Compiler", Name: "compiler", UsageArgument: "name", SectionKey: "go-build", + Usage: "name of compiler to use, as in runtime.Compiler (gccgo or gc)."}, + {KeyPath: "Go.GCCGoFlags", Name: "gccgoflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build", + Usage: "arguments to pass on each gccgo compiler/linker invocation."}, + {KeyPath: "Go.GCFlags", Name: "gcflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build", + Usage: "arguments to pass on each go tool compile invocation."}, + {KeyPath: "Go.InstallSuffix", Name: "installsuffix", SectionKey: "go-build", + Usage: "a suffix to use in the name of the package installation directory, in order to keep output separate from default builds. If using the -race flag, the install suffix is automatically set to raceor, if set explicitly, has _race appended to it. Likewise for the -msan flag. Using a -buildmode option that requires non-default compile flags has a similar effect."}, + {KeyPath: "Go.LDFlags", Name: "ldflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build", + Usage: "arguments to pass on each go tool link invocation."}, + {KeyPath: "Go.LinkShared", Name: "linkshared", SectionKey: "go-build", + Usage: "build code that will be linked against shared libraries previously created with -buildmode=shared."}, + {KeyPath: "Go.Mod", Name: "mod", UsageArgument: "mode (readonly, vendor, or mod)", SectionKey: "go-build", + Usage: "module download mode to use: readonly, vendor, or mod. See 'go help modules' for more."}, + {KeyPath: "Go.ModCacheRW", Name: "modcacherw", SectionKey: "go-build", + Usage: "leave newly-created directories in the module cache read-write instead of making them read-only."}, + {KeyPath: "Go.ModFile", Name: "modfile", UsageArgument: "file", SectionKey: "go-build", + Usage: `in module aware mode, read (and possibly write) an alternate go.mod file instead of the one in the module root directory. A file named go.mod must still be present in order to determine the module root directory, but it is not accessed. When -modfile is specified, an alternate go.sum file is also used: its path is derived from the -modfile flag by trimming the ".mod" extension and appending ".sum".`}, + {KeyPath: "Go.MSan", Name: "msan", SectionKey: "go-build", + Usage: "enable interoperation with memory sanitizer. Supported only on linux/amd64, linux/arm64 and only with Clang/LLVM as the host C compiler. On linux/arm64, pie build mode will be used."}, + {KeyPath: "Go.N", Name: "n", SectionKey: "go-build", + Usage: "print the commands but do not run them."}, + {KeyPath: "Go.PkgDir", Name: "pkgdir", UsageArgument: "dir", SectionKey: "go-build", + Usage: "install and load all packages from dir instead of the usual locations. For example, when building with a non-standard configuration, use -pkgdir to keep generated packages in a separate location."}, + {KeyPath: "Go.Tags", Name: "tags", UsageArgument: "tag,list", SectionKey: "go-build", + Usage: "a comma-separated list of build tags to consider satisfied during the build. For more information about build tags, see the description of build constraints in the documentation for the go/build package. (Earlier versions of Go used a space-separated list, and that form is deprecated but still recognized.)"}, + {KeyPath: "Go.TrimPath", Name: "trimpath", SectionKey: "go-build", + Usage: `remove all file system paths from the resulting executable. Instead of absolute file system paths, the recorded file names will begin with either "go" (for the standard library), or a module path@version (when using modules), or a plain import path (when using GOPATH).`}, + {KeyPath: "Go.ToolExec", Name: "toolexec", UsageArgument: "'cmd args'", SectionKey: "go-build", + Usage: "a program to use to invoke toolchain programs like vet and asm. For example, instead of running asm, the go command will run cmd args /path/to/asm '."}, + {KeyPath: "Go.Work", Name: "work", SectionKey: "go-build", + Usage: "print the name of the temporary work directory and do not delete it when exiting."}, + {KeyPath: "Go.X", Name: "x", SectionKey: "go-build", + Usage: "print the commands."}, + {KeyPath: "Go.O", Name: "o", SectionKey: "go-build", + Usage: "output binary path (including name)."}, +} + +// GoRunFlags provides flags for the Ginkgo CLI run, and watch commands that capture go's run-time flags. These are passed to the compiled test binary by the ginkgo CLI +var GoRunFlags = GinkgoFlags{ + {KeyPath: "Go.CoverProfile", Name: "coverprofile", UsageArgument: "file", SectionKey: "code-and-coverage-analysis", + Usage: `Write a coverage profile to the file after all tests have passed. Sets -cover.`}, + {KeyPath: "Go.BlockProfile", Name: "blockprofile", UsageArgument: "file", SectionKey: "performance-analysis", + Usage: `Write a goroutine blocking profile to the specified file when all tests are complete. Preserves test binary.`}, + {KeyPath: "Go.BlockProfileRate", Name: "blockprofilerate", UsageArgument: "rate", SectionKey: "performance-analysis", + Usage: `Control the detail provided in goroutine blocking profiles by calling runtime.SetBlockProfileRate with rate. See 'go doc runtime.SetBlockProfileRate'. The profiler aims to sample, on average, one blocking event every n nanoseconds the program spends blocked. By default, if -test.blockprofile is set without this flag, all blocking events are recorded, equivalent to -test.blockprofilerate=1.`}, + {KeyPath: "Go.CPUProfile", Name: "cpuprofile", UsageArgument: "file", SectionKey: "performance-analysis", + Usage: `Write a CPU profile to the specified file before exiting. Preserves test binary.`}, + {KeyPath: "Go.MemProfile", Name: "memprofile", UsageArgument: "file", SectionKey: "performance-analysis", + Usage: `Write an allocation profile to the file after all tests have passed. Preserves test binary.`}, + {KeyPath: "Go.MemProfileRate", Name: "memprofilerate", UsageArgument: "rate", SectionKey: "performance-analysis", + Usage: `Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate. See 'go doc runtime.MemProfileRate'. To profile all memory allocations, use -test.memprofilerate=1.`}, + {KeyPath: "Go.MutexProfile", Name: "mutexprofile", UsageArgument: "file", SectionKey: "performance-analysis", + Usage: `Write a mutex contention profile to the specified file when all tests are complete. Preserves test binary.`}, + {KeyPath: "Go.MutexProfileFraction", Name: "mutexprofilefraction", UsageArgument: "n", SectionKey: "performance-analysis", + Usage: `if >= 0, calls runtime.SetMutexProfileFraction() Sample 1 in n stack traces of goroutines holding a contended mutex.`}, + {KeyPath: "Go.Trace", Name: "execution-trace", UsageArgument: "file", ExportAs: "trace", SectionKey: "performance-analysis", + Usage: `Write an execution trace to the specified file before exiting.`}, +} + +// VetAndInitializeCLIAndGoConfig validates that the Ginkgo CLI's configuration is sound +// It returns a potentially mutated copy of the config that rationalizes the configuration to ensure consistency for downstream consumers +func VetAndInitializeCLIAndGoConfig(cliConfig CLIConfig, goFlagsConfig GoFlagsConfig) (CLIConfig, GoFlagsConfig, []error) { + errors := []error{} + + if cliConfig.Repeat > 0 && cliConfig.UntilItFails { + errors = append(errors, GinkgoErrors.BothRepeatAndUntilItFails()) + } + + //initialize the output directory + if cliConfig.OutputDir != "" { + err := os.MkdirAll(cliConfig.OutputDir, 0777) + if err != nil { + errors = append(errors, err) + } + } + + //ensure cover mode is configured appropriately + if goFlagsConfig.CoverMode != "" || goFlagsConfig.CoverPkg != "" || goFlagsConfig.CoverProfile != "" { + goFlagsConfig.Cover = true + } + if goFlagsConfig.Cover && goFlagsConfig.CoverProfile == "" { + goFlagsConfig.CoverProfile = "coverprofile.out" + } + + return cliConfig, goFlagsConfig, errors +} + +// GenerateGoTestCompileArgs is used by the Ginkgo CLI to generate command line arguments to pass to the go test -c command when compiling the test +func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, packageToBuild string, pathToInvocationPath string) ([]string, error) { + // if the user has set the CoverProfile run-time flag make sure to set the build-time cover flag to make sure + // the built test binary can generate a coverprofile + if goFlagsConfig.CoverProfile != "" { + goFlagsConfig.Cover = true + } + + if goFlagsConfig.CoverPkg != "" { + coverPkgs := strings.Split(goFlagsConfig.CoverPkg, ",") + adjustedCoverPkgs := make([]string, len(coverPkgs)) + for i, coverPkg := range coverPkgs { + coverPkg = strings.Trim(coverPkg, " ") + if strings.HasPrefix(coverPkg, "./") { + // this is a relative coverPkg - we need to reroot it + adjustedCoverPkgs[i] = "./" + filepath.Join(pathToInvocationPath, strings.TrimPrefix(coverPkg, "./")) + } else { + // this is a package name - don't touch it + adjustedCoverPkgs[i] = coverPkg + } + } + goFlagsConfig.CoverPkg = strings.Join(adjustedCoverPkgs, ",") + } + + args := []string{"test", "-c", packageToBuild} + goArgs, err := GenerateFlagArgs( + GoBuildFlags, + map[string]interface{}{ + "Go": &goFlagsConfig, + }, + ) + + if err != nil { + return []string{}, err + } + args = append(args, goArgs...) + return args, nil +} + +// GenerateGinkgoTestRunArgs is used by the Ginkgo CLI to generate command line arguments to pass to the compiled Ginkgo test binary +func GenerateGinkgoTestRunArgs(suiteConfig SuiteConfig, reporterConfig ReporterConfig, goFlagsConfig GoFlagsConfig) ([]string, error) { + var flags GinkgoFlags + flags = SuiteConfigFlags.WithPrefix("ginkgo") + flags = flags.CopyAppend(ParallelConfigFlags.WithPrefix("ginkgo")...) + flags = flags.CopyAppend(ReporterConfigFlags.WithPrefix("ginkgo")...) + flags = flags.CopyAppend(GoRunFlags.WithPrefix("test")...) + bindings := map[string]interface{}{ + "S": &suiteConfig, + "R": &reporterConfig, + "Go": &goFlagsConfig, + } + + return GenerateFlagArgs(flags, bindings) +} + +// GenerateGoTestRunArgs is used by the Ginkgo CLI to generate command line arguments to pass to the compiled non-Ginkgo test binary +func GenerateGoTestRunArgs(goFlagsConfig GoFlagsConfig) ([]string, error) { + flags := GoRunFlags.WithPrefix("test") + bindings := map[string]interface{}{ + "Go": &goFlagsConfig, + } + + args, err := GenerateFlagArgs(flags, bindings) + if err != nil { + return args, err + } + args = append(args, "--test.v") + return args, nil +} + +// BuildRunCommandFlagSet builds the FlagSet for the `ginkgo run` command +func BuildRunCommandFlagSet(suiteConfig *SuiteConfig, reporterConfig *ReporterConfig, cliConfig *CLIConfig, goFlagsConfig *GoFlagsConfig) (GinkgoFlagSet, error) { + flags := SuiteConfigFlags + flags = flags.CopyAppend(ReporterConfigFlags...) + flags = flags.CopyAppend(GinkgoCLISharedFlags...) + flags = flags.CopyAppend(GinkgoCLIRunAndWatchFlags...) + flags = flags.CopyAppend(GinkgoCLIRunFlags...) + flags = flags.CopyAppend(GoBuildFlags...) + flags = flags.CopyAppend(GoRunFlags...) + + bindings := map[string]interface{}{ + "S": suiteConfig, + "R": reporterConfig, + "C": cliConfig, + "Go": goFlagsConfig, + "D": &deprecatedConfig{}, + } + + return NewGinkgoFlagSet(flags, bindings, FlagSections) +} + +// BuildWatchCommandFlagSet builds the FlagSet for the `ginkgo watch` command +func BuildWatchCommandFlagSet(suiteConfig *SuiteConfig, reporterConfig *ReporterConfig, cliConfig *CLIConfig, goFlagsConfig *GoFlagsConfig) (GinkgoFlagSet, error) { + flags := SuiteConfigFlags + flags = flags.CopyAppend(ReporterConfigFlags...) + flags = flags.CopyAppend(GinkgoCLISharedFlags...) + flags = flags.CopyAppend(GinkgoCLIRunAndWatchFlags...) + flags = flags.CopyAppend(GinkgoCLIWatchFlags...) + flags = flags.CopyAppend(GoBuildFlags...) + flags = flags.CopyAppend(GoRunFlags...) + + bindings := map[string]interface{}{ + "S": suiteConfig, + "R": reporterConfig, + "C": cliConfig, + "Go": goFlagsConfig, + "D": &deprecatedConfig{}, + } + + return NewGinkgoFlagSet(flags, bindings, FlagSections) +} + +// BuildBuildCommandFlagSet builds the FlagSet for the `ginkgo build` command +func BuildBuildCommandFlagSet(cliConfig *CLIConfig, goFlagsConfig *GoFlagsConfig) (GinkgoFlagSet, error) { + flags := GinkgoCLISharedFlags + flags = flags.CopyAppend(GoBuildFlags...) + + bindings := map[string]interface{}{ + "C": cliConfig, + "Go": goFlagsConfig, + "D": &deprecatedConfig{}, + } + + flagSections := make(GinkgoFlagSections, len(FlagSections)) + copy(flagSections, FlagSections) + for i := range flagSections { + if flagSections[i].Key == "multiple-suites" { + flagSections[i].Heading = "Building Multiple Suites" + } + if flagSections[i].Key == "go-build" { + flagSections[i] = GinkgoFlagSection{Key: "go-build", Style: "{{/}}", Heading: "Go Build Flags", + Description: "These flags are inherited from go build."} + } + } + + return NewGinkgoFlagSet(flags, bindings, flagSections) +} + +func BuildLabelsCommandFlagSet(cliConfig *CLIConfig) (GinkgoFlagSet, error) { + flags := GinkgoCLISharedFlags.SubsetWithNames("r", "skip-package") + + bindings := map[string]interface{}{ + "C": cliConfig, + } + + flagSections := make(GinkgoFlagSections, len(FlagSections)) + copy(flagSections, FlagSections) + for i := range flagSections { + if flagSections[i].Key == "multiple-suites" { + flagSections[i].Heading = "Fetching Labels from Multiple Suites" + } + } + + return NewGinkgoFlagSet(flags, bindings, flagSections) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go b/vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go new file mode 100644 index 000000000..17922304b --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go @@ -0,0 +1,141 @@ +package types + +import ( + "strconv" + "time" +) + +/* + A set of deprecations to make the transition from v1 to v2 easier for users who have written custom reporters. +*/ + +type SuiteSummary = DeprecatedSuiteSummary +type SetupSummary = DeprecatedSetupSummary +type SpecSummary = DeprecatedSpecSummary +type SpecMeasurement = DeprecatedSpecMeasurement +type SpecComponentType = NodeType +type SpecFailure = DeprecatedSpecFailure + +var ( + SpecComponentTypeInvalid = NodeTypeInvalid + SpecComponentTypeContainer = NodeTypeContainer + SpecComponentTypeIt = NodeTypeIt + SpecComponentTypeBeforeEach = NodeTypeBeforeEach + SpecComponentTypeJustBeforeEach = NodeTypeJustBeforeEach + SpecComponentTypeAfterEach = NodeTypeAfterEach + SpecComponentTypeJustAfterEach = NodeTypeJustAfterEach + SpecComponentTypeBeforeSuite = NodeTypeBeforeSuite + SpecComponentTypeSynchronizedBeforeSuite = NodeTypeSynchronizedBeforeSuite + SpecComponentTypeAfterSuite = NodeTypeAfterSuite + SpecComponentTypeSynchronizedAfterSuite = NodeTypeSynchronizedAfterSuite +) + +type DeprecatedSuiteSummary struct { + SuiteDescription string + SuiteSucceeded bool + SuiteID string + + NumberOfSpecsBeforeParallelization int + NumberOfTotalSpecs int + NumberOfSpecsThatWillBeRun int + NumberOfPendingSpecs int + NumberOfSkippedSpecs int + NumberOfPassedSpecs int + NumberOfFailedSpecs int + NumberOfFlakedSpecs int + RunTime time.Duration +} + +type DeprecatedSetupSummary struct { + ComponentType SpecComponentType + CodeLocation CodeLocation + + State SpecState + RunTime time.Duration + Failure SpecFailure + + CapturedOutput string + SuiteID string +} + +type DeprecatedSpecSummary struct { + ComponentTexts []string + ComponentCodeLocations []CodeLocation + + State SpecState + RunTime time.Duration + Failure SpecFailure + IsMeasurement bool + NumberOfSamples int + Measurements map[string]*DeprecatedSpecMeasurement + + CapturedOutput string + SuiteID string +} + +func (s DeprecatedSpecSummary) HasFailureState() bool { + return s.State.Is(SpecStateFailureStates) +} + +func (s DeprecatedSpecSummary) TimedOut() bool { + return false +} + +func (s DeprecatedSpecSummary) Panicked() bool { + return s.State == SpecStatePanicked +} + +func (s DeprecatedSpecSummary) Failed() bool { + return s.State == SpecStateFailed +} + +func (s DeprecatedSpecSummary) Passed() bool { + return s.State == SpecStatePassed +} + +func (s DeprecatedSpecSummary) Skipped() bool { + return s.State == SpecStateSkipped +} + +func (s DeprecatedSpecSummary) Pending() bool { + return s.State == SpecStatePending +} + +type DeprecatedSpecFailure struct { + Message string + Location CodeLocation + ForwardedPanic string + + ComponentIndex int + ComponentType SpecComponentType + ComponentCodeLocation CodeLocation +} + +type DeprecatedSpecMeasurement struct { + Name string + Info interface{} + Order int + + Results []float64 + + Smallest float64 + Largest float64 + Average float64 + StdDeviation float64 + + SmallestLabel string + LargestLabel string + AverageLabel string + Units string + Precision int +} + +func (s DeprecatedSpecMeasurement) PrecisionFmt() string { + if s.Precision == 0 { + return "%f" + } + + str := strconv.Itoa(s.Precision) + + return "%." + str + "f" +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/deprecation_support.go b/vendor/github.com/onsi/ginkgo/v2/types/deprecation_support.go new file mode 100644 index 000000000..e2519f673 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/deprecation_support.go @@ -0,0 +1,177 @@ +package types + +import ( + "os" + "strconv" + "strings" + "sync" + "unicode" + + "github.com/onsi/ginkgo/v2/formatter" +) + +type Deprecation struct { + Message string + DocLink string + Version string +} + +type deprecations struct{} + +var Deprecations = deprecations{} + +func (d deprecations) CustomReporter() Deprecation { + return Deprecation{ + Message: "Support for custom reporters has been removed in V2. Please read the documentation linked to below for Ginkgo's new behavior and for a migration path:", + DocLink: "removed-custom-reporters", + Version: "1.16.0", + } +} + +func (d deprecations) Async() Deprecation { + return Deprecation{ + Message: "You are passing a Done channel to a test node to test asynchronous behavior. This is deprecated in Ginkgo V2. Your test will run synchronously and the timeout will be ignored.", + DocLink: "removed-async-testing", + Version: "1.16.0", + } +} + +func (d deprecations) Measure() Deprecation { + return Deprecation{ + Message: "Measure is deprecated and has been removed from Ginkgo V2. Any Measure tests in your spec will not run. Please migrate to gomega/gmeasure.", + DocLink: "removed-measure", + Version: "1.16.3", + } +} + +func (d deprecations) ParallelNode() Deprecation { + return Deprecation{ + Message: "GinkgoParallelNode is deprecated and will be removed in Ginkgo V2. Please use GinkgoParallelProcess instead.", + DocLink: "renamed-ginkgoparallelnode", + Version: "1.16.4", + } +} + +func (d deprecations) CurrentGinkgoTestDescription() Deprecation { + return Deprecation{ + Message: "CurrentGinkgoTestDescription() is deprecated in Ginkgo V2. Use CurrentSpecReport() instead.", + DocLink: "changed-currentginkgotestdescription", + Version: "1.16.0", + } +} + +func (d deprecations) Convert() Deprecation { + return Deprecation{ + Message: "The convert command is deprecated in Ginkgo V2", + DocLink: "removed-ginkgo-convert", + Version: "1.16.0", + } +} + +func (d deprecations) Blur() Deprecation { + return Deprecation{ + Message: "The blur command is deprecated in Ginkgo V2. Use 'ginkgo unfocus' instead.", + Version: "1.16.0", + } +} + +func (d deprecations) Nodot() Deprecation { + return Deprecation{ + Message: "The nodot command is deprecated in Ginkgo V2. Please either dot-import Ginkgo or use the package identifier in your code to references objects and types provided by Ginkgo and Gomega.", + DocLink: "removed-ginkgo-nodot", + Version: "1.16.0", + } +} + +func (d deprecations) SuppressProgressReporting() Deprecation { + return Deprecation{ + Message: "Improvements to how reporters emit timeline information means that SuppressProgressReporting is no longer necessary and has been deprecated.", + Version: "2.5.0", + } +} + +type DeprecationTracker struct { + deprecations map[Deprecation][]CodeLocation + lock *sync.Mutex +} + +func NewDeprecationTracker() *DeprecationTracker { + return &DeprecationTracker{ + deprecations: map[Deprecation][]CodeLocation{}, + lock: &sync.Mutex{}, + } +} + +func (d *DeprecationTracker) TrackDeprecation(deprecation Deprecation, cl ...CodeLocation) { + ackVersion := os.Getenv("ACK_GINKGO_DEPRECATIONS") + if deprecation.Version != "" && ackVersion != "" { + ack := ParseSemVer(ackVersion) + version := ParseSemVer(deprecation.Version) + if ack.GreaterThanOrEqualTo(version) { + return + } + } + + d.lock.Lock() + defer d.lock.Unlock() + if len(cl) == 1 { + d.deprecations[deprecation] = append(d.deprecations[deprecation], cl[0]) + } else { + d.deprecations[deprecation] = []CodeLocation{} + } +} + +func (d *DeprecationTracker) DidTrackDeprecations() bool { + d.lock.Lock() + defer d.lock.Unlock() + return len(d.deprecations) > 0 +} + +func (d *DeprecationTracker) DeprecationsReport() string { + d.lock.Lock() + defer d.lock.Unlock() + out := formatter.F("{{light-yellow}}You're using deprecated Ginkgo functionality:{{/}}\n") + out += formatter.F("{{light-yellow}}============================================={{/}}\n") + for deprecation, locations := range d.deprecations { + out += formatter.Fi(1, "{{yellow}}"+deprecation.Message+"{{/}}\n") + if deprecation.DocLink != "" { + out += formatter.Fi(1, "{{bold}}Learn more at:{{/}} {{cyan}}{{underline}}https://onsi.github.io/ginkgo/MIGRATING_TO_V2#%s{{/}}\n", deprecation.DocLink) + } + for _, location := range locations { + out += formatter.Fi(2, "{{gray}}%s{{/}}\n", location) + } + } + out += formatter.F("\n{{gray}}To silence deprecations that can be silenced set the following environment variable:{{/}}\n") + out += formatter.Fi(1, "{{gray}}ACK_GINKGO_DEPRECATIONS=%s{{/}}\n", VERSION) + return out +} + +type SemVer struct { + Major int + Minor int + Patch int +} + +func (s SemVer) GreaterThanOrEqualTo(o SemVer) bool { + return (s.Major > o.Major) || + (s.Major == o.Major && s.Minor > o.Minor) || + (s.Major == o.Major && s.Minor == o.Minor && s.Patch >= o.Patch) +} + +func ParseSemVer(semver string) SemVer { + out := SemVer{} + semver = strings.TrimFunc(semver, func(r rune) bool { + return !(unicode.IsNumber(r) || r == '.') + }) + components := strings.Split(semver, ".") + if len(components) > 0 { + out.Major, _ = strconv.Atoi(components[0]) + } + if len(components) > 1 { + out.Minor, _ = strconv.Atoi(components[1]) + } + if len(components) > 2 { + out.Patch, _ = strconv.Atoi(components[2]) + } + return out +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/enum_support.go b/vendor/github.com/onsi/ginkgo/v2/types/enum_support.go new file mode 100644 index 000000000..1d96ae028 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/enum_support.go @@ -0,0 +1,43 @@ +package types + +import "encoding/json" + +type EnumSupport struct { + toString map[uint]string + toEnum map[string]uint + maxEnum uint +} + +func NewEnumSupport(toString map[uint]string) EnumSupport { + toEnum, maxEnum := map[string]uint{}, uint(0) + for k, v := range toString { + toEnum[v] = k + if maxEnum < k { + maxEnum = k + } + } + return EnumSupport{toString: toString, toEnum: toEnum, maxEnum: maxEnum} +} + +func (es EnumSupport) String(e uint) string { + if e > es.maxEnum { + return es.toString[0] + } + return es.toString[e] +} + +func (es EnumSupport) UnmarshJSON(b []byte) (uint, error) { + var dec string + if err := json.Unmarshal(b, &dec); err != nil { + return 0, err + } + out := es.toEnum[dec] // if we miss we get 0 which is what we want anyway + return out, nil +} + +func (es EnumSupport) MarshJSON(e uint) ([]byte, error) { + if e == 0 || e > es.maxEnum { + return json.Marshal(nil) + } + return json.Marshal(es.toString[e]) +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/errors.go b/vendor/github.com/onsi/ginkgo/v2/types/errors.go new file mode 100644 index 000000000..6bb72d00c --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/errors.go @@ -0,0 +1,639 @@ +package types + +import ( + "fmt" + "reflect" + "strings" + + "github.com/onsi/ginkgo/v2/formatter" +) + +type GinkgoError struct { + Heading string + Message string + DocLink string + CodeLocation CodeLocation +} + +func (g GinkgoError) Error() string { + out := formatter.F("{{bold}}{{red}}%s{{/}}\n", g.Heading) + if (g.CodeLocation != CodeLocation{}) { + contentsOfLine := strings.TrimLeft(g.CodeLocation.ContentsOfLine(), "\t ") + if contentsOfLine != "" { + out += formatter.F("{{light-gray}}%s{{/}}\n", contentsOfLine) + } + out += formatter.F("{{gray}}%s{{/}}\n", g.CodeLocation) + } + if g.Message != "" { + out += formatter.Fiw(1, formatter.COLS, g.Message) + out += "\n\n" + } + if g.DocLink != "" { + out += formatter.Fiw(1, formatter.COLS, "{{bold}}Learn more at:{{/}} {{cyan}}{{underline}}http://onsi.github.io/ginkgo/#%s{{/}}\n", g.DocLink) + } + + return out +} + +type ginkgoErrors struct{} + +var GinkgoErrors = ginkgoErrors{} + +func (g ginkgoErrors) UncaughtGinkgoPanic(cl CodeLocation) error { + return GinkgoError{ + Heading: "Your Test Panicked", + Message: `When you, or your assertion library, calls Ginkgo's Fail(), +Ginkgo panics to prevent subsequent assertions from running. + +Normally Ginkgo rescues this panic so you shouldn't see it. + +However, if you make an assertion in a goroutine, Ginkgo can't capture the panic. +To circumvent this, you should call + + defer GinkgoRecover() + +at the top of the goroutine that caused this panic. + +Alternatively, you may have made an assertion outside of a Ginkgo +leaf node (e.g. in a container node or some out-of-band function) - please move your assertion to +an appropriate Ginkgo node (e.g. a BeforeSuite, BeforeEach, It, etc...).`, + DocLink: "mental-model-how-ginkgo-handles-failure", + CodeLocation: cl, + } +} + +func (g ginkgoErrors) RerunningSuite() error { + return GinkgoError{ + Heading: "Rerunning Suite", + Message: formatter.F(`It looks like you are calling RunSpecs more than once. Ginkgo does not support rerunning suites. If you want to rerun a suite try {{bold}}ginkgo --repeat=N{{/}} or {{bold}}ginkgo --until-it-fails{{/}}`), + DocLink: "repeating-spec-runs-and-managing-flaky-specs", + } +} + +/* Tree construction errors */ + +func (g ginkgoErrors) PushingNodeInRunPhase(nodeType NodeType, cl CodeLocation) error { + return GinkgoError{ + Heading: "Ginkgo detected an issue with your spec structure", + Message: formatter.F( + `It looks like you are trying to add a {{bold}}[%s]{{/}} node +to the Ginkgo spec tree in a leaf node {{bold}}after{{/}} the specs started running. + +To enable randomization and parallelization Ginkgo requires the spec tree +to be fully constructed up front. In practice, this means that you can +only create nodes like {{bold}}[%s]{{/}} at the top-level or within the +body of a {{bold}}Describe{{/}}, {{bold}}Context{{/}}, or {{bold}}When{{/}}.`, nodeType, nodeType), + CodeLocation: cl, + DocLink: "mental-model-how-ginkgo-traverses-the-spec-hierarchy", + } +} + +func (g ginkgoErrors) CaughtPanicDuringABuildPhase(caughtPanic interface{}, cl CodeLocation) error { + return GinkgoError{ + Heading: "Assertion or Panic detected during tree construction", + Message: formatter.F( + `Ginkgo detected a panic while constructing the spec tree. +You may be trying to make an assertion in the body of a container node +(i.e. {{bold}}Describe{{/}}, {{bold}}Context{{/}}, or {{bold}}When{{/}}). + +Please ensure all assertions are inside leaf nodes such as {{bold}}BeforeEach{{/}}, +{{bold}}It{{/}}, etc. + +{{bold}}Here's the content of the panic that was caught:{{/}} +%v`, caughtPanic), + CodeLocation: cl, + DocLink: "no-assertions-in-container-nodes", + } +} + +func (g ginkgoErrors) SuiteNodeInNestedContext(nodeType NodeType, cl CodeLocation) error { + docLink := "suite-setup-and-cleanup-beforesuite-and-aftersuite" + if nodeType.Is(NodeTypeReportBeforeSuite | NodeTypeReportAfterSuite) { + docLink = "reporting-nodes---reportbeforesuite-and-reportaftersuite" + } + + return GinkgoError{ + Heading: "Ginkgo detected an issue with your spec structure", + Message: formatter.F( + `It looks like you are trying to add a {{bold}}[%s]{{/}} node within a container node. + +{{bold}}%s{{/}} can only be called at the top level.`, nodeType, nodeType), + CodeLocation: cl, + DocLink: docLink, + } +} + +func (g ginkgoErrors) SuiteNodeDuringRunPhase(nodeType NodeType, cl CodeLocation) error { + docLink := "suite-setup-and-cleanup-beforesuite-and-aftersuite" + if nodeType.Is(NodeTypeReportBeforeSuite | NodeTypeReportAfterSuite) { + docLink = "reporting-nodes---reportbeforesuite-and-reportaftersuite" + } + + return GinkgoError{ + Heading: "Ginkgo detected an issue with your spec structure", + Message: formatter.F( + `It looks like you are trying to add a {{bold}}[%s]{{/}} node within a leaf node after the spec started running. + +{{bold}}%s{{/}} can only be called at the top level.`, nodeType, nodeType), + CodeLocation: cl, + DocLink: docLink, + } +} + +func (g ginkgoErrors) MultipleBeforeSuiteNodes(nodeType NodeType, cl CodeLocation, earlierNodeType NodeType, earlierCodeLocation CodeLocation) error { + return ginkgoErrorMultipleSuiteNodes("setup", nodeType, cl, earlierNodeType, earlierCodeLocation) +} + +func (g ginkgoErrors) MultipleAfterSuiteNodes(nodeType NodeType, cl CodeLocation, earlierNodeType NodeType, earlierCodeLocation CodeLocation) error { + return ginkgoErrorMultipleSuiteNodes("teardown", nodeType, cl, earlierNodeType, earlierCodeLocation) +} + +func ginkgoErrorMultipleSuiteNodes(setupOrTeardown string, nodeType NodeType, cl CodeLocation, earlierNodeType NodeType, earlierCodeLocation CodeLocation) error { + return GinkgoError{ + Heading: "Ginkgo detected an issue with your spec structure", + Message: formatter.F( + `It looks like you are trying to add a {{bold}}[%s]{{/}} node but +you already have a {{bold}}[%s]{{/}} node defined at: {{gray}}%s{{/}}. + +Ginkgo only allows you to define one suite %s node.`, nodeType, earlierNodeType, earlierCodeLocation, setupOrTeardown), + CodeLocation: cl, + DocLink: "suite-setup-and-cleanup-beforesuite-and-aftersuite", + } +} + +/* Decorator errors */ +func (g ginkgoErrors) InvalidDecoratorForNodeType(cl CodeLocation, nodeType NodeType, decorator string) error { + return GinkgoError{ + Heading: "Invalid Decorator", + Message: formatter.F(`[%s] node cannot be passed a(n) '%s' decorator`, nodeType, decorator), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidDeclarationOfFocusedAndPending(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Invalid Combination of Decorators: Focused and Pending", + Message: formatter.F(`[%s] node was decorated with both Focus and Pending. At most one is allowed.`, nodeType), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidDeclarationOfFlakeAttemptsAndMustPassRepeatedly(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Invalid Combination of Decorators: FlakeAttempts and MustPassRepeatedly", + Message: formatter.F(`[%s] node was decorated with both FlakeAttempts and MustPassRepeatedly. At most one is allowed.`, nodeType), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) UnknownDecorator(cl CodeLocation, nodeType NodeType, decorator interface{}) error { + return GinkgoError{ + Heading: "Unknown Decorator", + Message: formatter.F(`[%s] node was passed an unknown decorator: '%#v'`, nodeType, decorator), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidBodyTypeForContainer(t reflect.Type, cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Invalid Function", + Message: formatter.F(`[%s] node must be passed {{bold}}func(){{/}} - i.e. functions that take nothing and return nothing. You passed {{bold}}%s{{/}} instead.`, nodeType, t), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidBodyType(t reflect.Type, cl CodeLocation, nodeType NodeType) error { + mustGet := "{{bold}}func(){{/}}, {{bold}}func(ctx SpecContext){{/}}, or {{bold}}func(ctx context.Context){{/}}" + if nodeType.Is(NodeTypeContainer) { + mustGet = "{{bold}}func(){{/}}" + } + return GinkgoError{ + Heading: "Invalid Function", + Message: formatter.F(`[%s] node must be passed `+mustGet+`. +You passed {{bold}}%s{{/}} instead.`, nodeType, t), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidBodyTypeForSynchronizedBeforeSuiteProc1(t reflect.Type, cl CodeLocation) error { + mustGet := "{{bold}}func() []byte{{/}}, {{bold}}func(ctx SpecContext) []byte{{/}}, or {{bold}}func(ctx context.Context) []byte{{/}}, {{bold}}func(){{/}}, {{bold}}func(ctx SpecContext){{/}}, or {{bold}}func(ctx context.Context){{/}}" + return GinkgoError{ + Heading: "Invalid Function", + Message: formatter.F(`[SynchronizedBeforeSuite] node must be passed `+mustGet+` for its first function. +You passed {{bold}}%s{{/}} instead.`, t), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidBodyTypeForSynchronizedBeforeSuiteAllProcs(t reflect.Type, cl CodeLocation) error { + mustGet := "{{bold}}func(){{/}}, {{bold}}func(ctx SpecContext){{/}}, or {{bold}}func(ctx context.Context){{/}}, {{bold}}func([]byte){{/}}, {{bold}}func(ctx SpecContext, []byte){{/}}, or {{bold}}func(ctx context.Context, []byte){{/}}" + return GinkgoError{ + Heading: "Invalid Function", + Message: formatter.F(`[SynchronizedBeforeSuite] node must be passed `+mustGet+` for its second function. +You passed {{bold}}%s{{/}} instead.`, t), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) MultipleBodyFunctions(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Multiple Functions", + Message: formatter.F(`[%s] node must be passed a single function - but more than one was passed in.`, nodeType), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) MissingBodyFunction(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Missing Functions", + Message: formatter.F(`[%s] node must be passed a single function - but none was passed in.`, nodeType), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) InvalidTimeoutOrGracePeriodForNonContextNode(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Invalid NodeTimeout SpecTimeout, or GracePeriod", + Message: formatter.F(`[%s] was passed NodeTimeout, SpecTimeout, or GracePeriod but does not have a callback that accepts a {{bold}}SpecContext{{/}} or {{bold}}context.Context{{/}}. You must accept a context to enable timeouts and grace periods`, nodeType), + CodeLocation: cl, + DocLink: "spec-timeouts-and-interruptible-nodes", + } +} + +func (g ginkgoErrors) InvalidTimeoutOrGracePeriodForNonContextCleanupNode(cl CodeLocation) error { + return GinkgoError{ + Heading: "Invalid NodeTimeout SpecTimeout, or GracePeriod", + Message: formatter.F(`[DeferCleanup] was passed NodeTimeout or GracePeriod but does not have a callback that accepts a {{bold}}SpecContext{{/}} or {{bold}}context.Context{{/}}. You must accept a context to enable timeouts and grace periods`), + CodeLocation: cl, + DocLink: "spec-timeouts-and-interruptible-nodes", + } +} + +/* Ordered Container errors */ +func (g ginkgoErrors) InvalidSerialNodeInNonSerialOrderedContainer(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Invalid Serial Node in Non-Serial Ordered Container", + Message: formatter.F(`[%s] node was decorated with Serial but occurs in an Ordered container that is not marked Serial. Move the Serial decorator to the outer-most Ordered container to mark all ordered specs within the container as serial.`, nodeType), + CodeLocation: cl, + DocLink: "node-decorators-overview", + } +} + +func (g ginkgoErrors) SetupNodeNotInOrderedContainer(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: "Setup Node not in Ordered Container", + Message: fmt.Sprintf("[%s] setup nodes must appear inside an Ordered container. They cannot be nested within other containers, even containers in an ordered container.", nodeType), + CodeLocation: cl, + DocLink: "ordered-containers", + } +} + +func (g ginkgoErrors) InvalidContinueOnFailureDecoration(cl CodeLocation) error { + return GinkgoError{ + Heading: "ContinueOnFailure not decorating an outermost Ordered Container", + Message: "ContinueOnFailure can only decorate an Ordered container, and this Ordered container must be the outermost Ordered container.", + CodeLocation: cl, + DocLink: "ordered-containers", + } +} + +/* DeferCleanup errors */ +func (g ginkgoErrors) DeferCleanupInvalidFunction(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferCleanup requires a valid function", + Message: "You must pass DeferCleanup a function to invoke. This function must return zero or one values - if it does return, it must return an error. The function can take arbitrarily many arguments and you should provide these to DeferCleanup to pass along to the function.", + CodeLocation: cl, + DocLink: "cleaning-up-our-cleanup-code-defercleanup", + } +} + +func (g ginkgoErrors) PushingCleanupNodeDuringTreeConstruction(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferCleanup must be called inside a setup or subject node", + Message: "You must call DeferCleanup inside a setup node (e.g. BeforeEach, BeforeSuite, AfterAll...) or a subject node (i.e. It). You can't call DeferCleanup at the top-level or in a container node - use the After* family of setup nodes instead.", + CodeLocation: cl, + DocLink: "cleaning-up-our-cleanup-code-defercleanup", + } +} + +func (g ginkgoErrors) PushingCleanupInReportingNode(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: fmt.Sprintf("DeferCleanup cannot be called in %s", nodeType), + Message: "Please inline your cleanup code - Ginkgo won't run cleanup code after a Reporting node.", + CodeLocation: cl, + DocLink: "cleaning-up-our-cleanup-code-defercleanup", + } +} + +func (g ginkgoErrors) PushingCleanupInCleanupNode(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferCleanup cannot be called in a DeferCleanup callback", + Message: "Please inline your cleanup code - Ginkgo doesn't let you call DeferCleanup from within DeferCleanup", + CodeLocation: cl, + DocLink: "cleaning-up-our-cleanup-code-defercleanup", + } +} + +/* ReportEntry errors */ +func (g ginkgoErrors) TooManyReportEntryValues(cl CodeLocation, arg interface{}) error { + return GinkgoError{ + Heading: "Too Many ReportEntry Values", + Message: formatter.F(`{{bold}}AddGinkgoReport{{/}} can only be given one value. Got unexpected value: %#v`, arg), + CodeLocation: cl, + DocLink: "attaching-data-to-reports", + } +} + +func (g ginkgoErrors) AddReportEntryNotDuringRunPhase(cl CodeLocation) error { + return GinkgoError{ + Heading: "Ginkgo detected an issue with your spec structure", + Message: formatter.F(`It looks like you are calling {{bold}}AddGinkgoReport{{/}} outside of a running spec. Make sure you call {{bold}}AddGinkgoReport{{/}} inside a runnable node such as It or BeforeEach and not inside the body of a container such as Describe or Context.`), + CodeLocation: cl, + DocLink: "attaching-data-to-reports", + } +} + +/* By errors */ +func (g ginkgoErrors) ByNotDuringRunPhase(cl CodeLocation) error { + return GinkgoError{ + Heading: "Ginkgo detected an issue with your spec structure", + Message: formatter.F(`It looks like you are calling {{bold}}By{{/}} outside of a running spec. Make sure you call {{bold}}By{{/}} inside a runnable node such as It or BeforeEach and not inside the body of a container such as Describe or Context.`), + CodeLocation: cl, + DocLink: "documenting-complex-specs-by", + } +} + +/* FileFilter and SkipFilter errors */ +func (g ginkgoErrors) InvalidFileFilter(filter string) error { + return GinkgoError{ + Heading: "Invalid File Filter", + Message: fmt.Sprintf(`The provided file filter: "%s" is invalid. File filters must have the format "file", "file:lines" where "file" is a regular expression that will match against the file path and lines is a comma-separated list of integers (e.g. file:1,5,7) or line-ranges (e.g. file:1-3,5-9) or both (e.g. file:1,5-9)`, filter), + DocLink: "filtering-specs", + } +} + +func (g ginkgoErrors) InvalidFileFilterRegularExpression(filter string, err error) error { + return GinkgoError{ + Heading: "Invalid File Filter Regular Expression", + Message: fmt.Sprintf(`The provided file filter: "%s" included an invalid regular expression. regexp.Compile error: %s`, filter, err), + DocLink: "filtering-specs", + } +} + +/* Label Errors */ +func (g ginkgoErrors) SyntaxErrorParsingLabelFilter(input string, location int, error string) error { + var message string + if location >= 0 { + for i, r := range input { + if i == location { + message += "{{red}}{{bold}}{{underline}}" + } + message += string(r) + if i == location { + message += "{{/}}" + } + } + } else { + message = input + } + message += "\n" + error + return GinkgoError{ + Heading: "Syntax Error Parsing Label Filter", + Message: message, + DocLink: "spec-labels", + } +} + +func (g ginkgoErrors) InvalidLabel(label string, cl CodeLocation) error { + return GinkgoError{ + Heading: "Invalid Label", + Message: fmt.Sprintf("'%s' is an invalid label. Labels cannot contain of the following characters: '&|!,()/'", label), + CodeLocation: cl, + DocLink: "spec-labels", + } +} + +func (g ginkgoErrors) InvalidEmptyLabel(cl CodeLocation) error { + return GinkgoError{ + Heading: "Invalid Empty Label", + Message: "Labels cannot be empty", + CodeLocation: cl, + DocLink: "spec-labels", + } +} + +/* Table errors */ +func (g ginkgoErrors) MultipleEntryBodyFunctionsForTable(cl CodeLocation) error { + return GinkgoError{ + Heading: "DescribeTable passed multiple functions", + Message: "It looks like you are passing multiple functions into DescribeTable. Only one function can be passed in. This function will be called for each Entry in the table.", + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) InvalidEntryDescription(cl CodeLocation) error { + return GinkgoError{ + Heading: "Invalid Entry description", + Message: "Entry description functions must be a string, a function that accepts the entry parameters and returns a string, or nil.", + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) MissingParametersForTableFunction(cl CodeLocation) error { + return GinkgoError{ + Heading: "No parameters have been passed to the Table Function", + Message: "The Table Function expected at least 1 parameter", + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) IncorrectParameterTypeForTable(i int, name string, cl CodeLocation) error { + return GinkgoError{ + Heading: "DescribeTable passed incorrect parameter type", + Message: fmt.Sprintf("Parameter #%d passed to DescribeTable is of incorrect type <%s>", i, name), + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) TooFewParametersToTableFunction(expected, actual int, kind string, cl CodeLocation) error { + return GinkgoError{ + Heading: fmt.Sprintf("Too few parameters passed in to %s", kind), + Message: fmt.Sprintf("The %s expected %d parameters but you passed in %d", kind, expected, actual), + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) TooManyParametersToTableFunction(expected, actual int, kind string, cl CodeLocation) error { + return GinkgoError{ + Heading: fmt.Sprintf("Too many parameters passed in to %s", kind), + Message: fmt.Sprintf("The %s expected %d parameters but you passed in %d", kind, expected, actual), + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) IncorrectParameterTypeToTableFunction(i int, expected, actual reflect.Type, kind string, cl CodeLocation) error { + return GinkgoError{ + Heading: fmt.Sprintf("Incorrect parameters type passed to %s", kind), + Message: fmt.Sprintf("The %s expected parameter #%d to be of type <%s> but you passed in <%s>", kind, i, expected, actual), + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) IncorrectVariadicParameterTypeToTableFunction(expected, actual reflect.Type, kind string, cl CodeLocation) error { + return GinkgoError{ + Heading: fmt.Sprintf("Incorrect parameters type passed to %s", kind), + Message: fmt.Sprintf("The %s expected its variadic parameters to be of type <%s> but you passed in <%s>", kind, expected, actual), + CodeLocation: cl, + DocLink: "table-specs", + } +} + +func (g ginkgoErrors) ContextsCannotBeUsedInSubtreeTables(cl CodeLocation) error { + return GinkgoError{ + Heading: "Contexts cannot be used in subtree tables", + Message: "You''ve defined a subtree body function that accepts a context but did not provide one in the table entry. Ginkgo SpecContexts can only be passed in to subject and setup nodes - so if you are trying to implement a spec timeout you should request a context in the It function within your subtree body function, not in the subtree body function itself.", + CodeLocation: cl, + DocLink: "table-specs", + } +} + +/* Parallel Synchronization errors */ + +func (g ginkgoErrors) AggregatedReportUnavailableDueToNodeDisappearing() error { + return GinkgoError{ + Heading: "Test Report unavailable because a Ginkgo parallel process disappeared", + Message: "The aggregated report could not be fetched for a ReportAfterSuite node. A Ginkgo parallel process disappeared before it could finish reporting.", + } +} + +func (g ginkgoErrors) SynchronizedBeforeSuiteFailedOnProc1() error { + return GinkgoError{ + Heading: "SynchronizedBeforeSuite failed on Ginkgo parallel process #1", + Message: "The first SynchronizedBeforeSuite function running on Ginkgo parallel process #1 failed. This suite will now abort.", + } +} + +func (g ginkgoErrors) SynchronizedBeforeSuiteDisappearedOnProc1() error { + return GinkgoError{ + Heading: "Process #1 disappeared before SynchronizedBeforeSuite could report back", + Message: "Ginkgo parallel process #1 disappeared before the first SynchronizedBeforeSuite function completed. This suite will now abort.", + } +} + +/* Configuration errors */ + +func (g ginkgoErrors) UnknownTypePassedToRunSpecs(value interface{}) error { + return GinkgoError{ + Heading: "Unknown Type passed to RunSpecs", + Message: fmt.Sprintf("RunSpecs() accepts labels, and configuration of type types.SuiteConfig and/or types.ReporterConfig.\n You passed in: %v", value), + } +} + +var sharedParallelErrorMessage = "It looks like you are trying to run specs in parallel with go test.\nThis is unsupported and you should use the ginkgo CLI instead." + +func (g ginkgoErrors) InvalidParallelTotalConfiguration() error { + return GinkgoError{ + Heading: "-ginkgo.parallel.total must be >= 1", + Message: sharedParallelErrorMessage, + DocLink: "spec-parallelization", + } +} + +func (g ginkgoErrors) InvalidParallelProcessConfiguration() error { + return GinkgoError{ + Heading: "-ginkgo.parallel.process is one-indexed and must be <= ginkgo.parallel.total", + Message: sharedParallelErrorMessage, + DocLink: "spec-parallelization", + } +} + +func (g ginkgoErrors) MissingParallelHostConfiguration() error { + return GinkgoError{ + Heading: "-ginkgo.parallel.host is missing", + Message: sharedParallelErrorMessage, + DocLink: "spec-parallelization", + } +} + +func (g ginkgoErrors) UnreachableParallelHost(host string) error { + return GinkgoError{ + Heading: "Could not reach ginkgo.parallel.host:" + host, + Message: sharedParallelErrorMessage, + DocLink: "spec-parallelization", + } +} + +func (g ginkgoErrors) DryRunInParallelConfiguration() error { + return GinkgoError{ + Heading: "Ginkgo only performs -dryRun in serial mode.", + Message: "Please try running ginkgo -dryRun again, but without -p or -procs to ensure the suite is running in series.", + } +} + +func (g ginkgoErrors) GracePeriodCannotBeZero() error { + return GinkgoError{ + Heading: "Ginkgo requires a positive --grace-period.", + Message: "Please set --grace-period to a positive duration. The default is 30s.", + } +} + +func (g ginkgoErrors) ConflictingVerbosityConfiguration() error { + return GinkgoError{ + Heading: "Conflicting reporter verbosity settings.", + Message: "You can't set more than one of -v, -vv and --succinct. Please pick one!", + } +} + +func (g ginkgoErrors) InvalidOutputInterceptorModeConfiguration(value string) error { + return GinkgoError{ + Heading: fmt.Sprintf("Invalid value '%s' for --output-interceptor-mode.", value), + Message: "You must choose one of 'dup', 'swap', or 'none'.", + } +} + +func (g ginkgoErrors) InvalidGoFlagCount() error { + return GinkgoError{ + Heading: "Use of go test -count", + Message: "Ginkgo does not support using go test -count to rerun suites. Only -count=1 is allowed. To repeat suite runs, please use the ginkgo cli and `ginkgo -until-it-fails` or `ginkgo -repeat=N`.", + } +} + +func (g ginkgoErrors) InvalidGoFlagParallel() error { + return GinkgoError{ + Heading: "Use of go test -parallel", + Message: "Go test's implementation of parallelization does not actually parallelize Ginkgo specs. Please use the ginkgo cli and `ginkgo -p` or `ginkgo -procs=N` instead.", + } +} + +func (g ginkgoErrors) BothRepeatAndUntilItFails() error { + return GinkgoError{ + Heading: "--repeat and --until-it-fails are both set", + Message: "--until-it-fails directs Ginkgo to rerun specs indefinitely until they fail. --repeat directs Ginkgo to rerun specs a set number of times. You can't set both... which would you like?", + } +} + +/* Stack-Trace parsing errors */ + +func (g ginkgoErrors) FailedToParseStackTrace(message string) error { + return GinkgoError{ + Heading: "Failed to Parse Stack Trace", + Message: message, + } +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/file_filter.go b/vendor/github.com/onsi/ginkgo/v2/types/file_filter.go new file mode 100644 index 000000000..cc21df71e --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/file_filter.go @@ -0,0 +1,106 @@ +package types + +import ( + "regexp" + "strconv" + "strings" +) + +func ParseFileFilters(filters []string) (FileFilters, error) { + ffs := FileFilters{} + for _, filter := range filters { + ff := FileFilter{} + if filter == "" { + return nil, GinkgoErrors.InvalidFileFilter(filter) + } + components := strings.Split(filter, ":") + if !(len(components) == 1 || len(components) == 2) { + return nil, GinkgoErrors.InvalidFileFilter(filter) + } + + var err error + ff.Filename, err = regexp.Compile(components[0]) + if err != nil { + return nil, err + } + if len(components) == 2 { + lineFilters := strings.Split(components[1], ",") + for _, lineFilter := range lineFilters { + components := strings.Split(lineFilter, "-") + if len(components) == 1 { + line, err := strconv.Atoi(strings.TrimSpace(components[0])) + if err != nil { + return nil, GinkgoErrors.InvalidFileFilter(filter) + } + ff.LineFilters = append(ff.LineFilters, LineFilter{line, line + 1}) + } else if len(components) == 2 { + line1, err := strconv.Atoi(strings.TrimSpace(components[0])) + if err != nil { + return nil, GinkgoErrors.InvalidFileFilter(filter) + } + line2, err := strconv.Atoi(strings.TrimSpace(components[1])) + if err != nil { + return nil, GinkgoErrors.InvalidFileFilter(filter) + } + ff.LineFilters = append(ff.LineFilters, LineFilter{line1, line2}) + } else { + return nil, GinkgoErrors.InvalidFileFilter(filter) + } + } + } + ffs = append(ffs, ff) + } + return ffs, nil +} + +type FileFilter struct { + Filename *regexp.Regexp + LineFilters LineFilters +} + +func (f FileFilter) Matches(locations []CodeLocation) bool { + for _, location := range locations { + if f.Filename.MatchString(location.FileName) && + f.LineFilters.Matches(location.LineNumber) { + return true + } + + } + return false +} + +type FileFilters []FileFilter + +func (ffs FileFilters) Matches(locations []CodeLocation) bool { + for _, ff := range ffs { + if ff.Matches(locations) { + return true + } + } + + return false +} + +type LineFilter struct { + Min int + Max int +} + +func (lf LineFilter) Matches(line int) bool { + return lf.Min <= line && line < lf.Max +} + +type LineFilters []LineFilter + +func (lfs LineFilters) Matches(line int) bool { + if len(lfs) == 0 { + return true + } + + for _, lf := range lfs { + if lf.Matches(line) { + return true + } + } + return false +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/flags.go b/vendor/github.com/onsi/ginkgo/v2/types/flags.go new file mode 100644 index 000000000..de69f3022 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/flags.go @@ -0,0 +1,490 @@ +package types + +import ( + "flag" + "fmt" + "io" + "reflect" + "strings" + "time" + + "github.com/onsi/ginkgo/v2/formatter" +) + +type GinkgoFlag struct { + Name string + KeyPath string + SectionKey string + + Usage string + UsageArgument string + UsageDefaultValue string + + DeprecatedName string + DeprecatedDocLink string + DeprecatedVersion string + + ExportAs string + AlwaysExport bool +} + +type GinkgoFlags []GinkgoFlag + +func (f GinkgoFlags) CopyAppend(flags ...GinkgoFlag) GinkgoFlags { + out := GinkgoFlags{} + out = append(out, f...) + out = append(out, flags...) + return out +} + +func (f GinkgoFlags) WithPrefix(prefix string) GinkgoFlags { + if prefix == "" { + return f + } + out := GinkgoFlags{} + for _, flag := range f { + if flag.Name != "" { + flag.Name = prefix + "." + flag.Name + } + if flag.DeprecatedName != "" { + flag.DeprecatedName = prefix + "." + flag.DeprecatedName + } + if flag.ExportAs != "" { + flag.ExportAs = prefix + "." + flag.ExportAs + } + out = append(out, flag) + } + return out +} + +func (f GinkgoFlags) SubsetWithNames(names ...string) GinkgoFlags { + out := GinkgoFlags{} + for _, flag := range f { + for _, name := range names { + if flag.Name == name { + out = append(out, flag) + break + } + } + } + return out +} + +type GinkgoFlagSection struct { + Key string + Style string + Succinct bool + Heading string + Description string +} + +type GinkgoFlagSections []GinkgoFlagSection + +func (gfs GinkgoFlagSections) Lookup(key string) (GinkgoFlagSection, bool) { + for _, section := range gfs { + if section.Key == key { + return section, true + } + } + + return GinkgoFlagSection{}, false +} + +type GinkgoFlagSet struct { + flags GinkgoFlags + bindings interface{} + + sections GinkgoFlagSections + extraGoFlagsSection GinkgoFlagSection + + flagSet *flag.FlagSet +} + +// Call NewGinkgoFlagSet to create GinkgoFlagSet that creates and binds to it's own *flag.FlagSet +func NewGinkgoFlagSet(flags GinkgoFlags, bindings interface{}, sections GinkgoFlagSections) (GinkgoFlagSet, error) { + return bindFlagSet(GinkgoFlagSet{ + flags: flags, + bindings: bindings, + sections: sections, + }, nil) +} + +// Call NewGinkgoFlagSet to create GinkgoFlagSet that extends an existing *flag.FlagSet +func NewAttachedGinkgoFlagSet(flagSet *flag.FlagSet, flags GinkgoFlags, bindings interface{}, sections GinkgoFlagSections, extraGoFlagsSection GinkgoFlagSection) (GinkgoFlagSet, error) { + return bindFlagSet(GinkgoFlagSet{ + flags: flags, + bindings: bindings, + sections: sections, + extraGoFlagsSection: extraGoFlagsSection, + }, flagSet) +} + +func bindFlagSet(f GinkgoFlagSet, flagSet *flag.FlagSet) (GinkgoFlagSet, error) { + if flagSet == nil { + f.flagSet = flag.NewFlagSet("", flag.ContinueOnError) + //suppress all output as Ginkgo is responsible for formatting usage + f.flagSet.SetOutput(io.Discard) + } else { + f.flagSet = flagSet + //we're piggybacking on an existing flagset (typically go test) so we have limited control + //on user feedback + f.flagSet.Usage = f.substituteUsage + } + + for _, flag := range f.flags { + name := flag.Name + + deprecatedUsage := "[DEPRECATED]" + deprecatedName := flag.DeprecatedName + if name != "" { + deprecatedUsage = fmt.Sprintf("[DEPRECATED] use --%s instead", name) + } else if flag.Usage != "" { + deprecatedUsage += " " + flag.Usage + } + + value, ok := valueAtKeyPath(f.bindings, flag.KeyPath) + if !ok { + return GinkgoFlagSet{}, fmt.Errorf("could not load KeyPath: %s", flag.KeyPath) + } + + iface, addr := value.Interface(), value.Addr().Interface() + + switch value.Type() { + case reflect.TypeOf(string("")): + if name != "" { + f.flagSet.StringVar(addr.(*string), name, iface.(string), flag.Usage) + } + if deprecatedName != "" { + f.flagSet.StringVar(addr.(*string), deprecatedName, iface.(string), deprecatedUsage) + } + case reflect.TypeOf(int64(0)): + if name != "" { + f.flagSet.Int64Var(addr.(*int64), name, iface.(int64), flag.Usage) + } + if deprecatedName != "" { + f.flagSet.Int64Var(addr.(*int64), deprecatedName, iface.(int64), deprecatedUsage) + } + case reflect.TypeOf(float64(0)): + if name != "" { + f.flagSet.Float64Var(addr.(*float64), name, iface.(float64), flag.Usage) + } + if deprecatedName != "" { + f.flagSet.Float64Var(addr.(*float64), deprecatedName, iface.(float64), deprecatedUsage) + } + case reflect.TypeOf(int(0)): + if name != "" { + f.flagSet.IntVar(addr.(*int), name, iface.(int), flag.Usage) + } + if deprecatedName != "" { + f.flagSet.IntVar(addr.(*int), deprecatedName, iface.(int), deprecatedUsage) + } + case reflect.TypeOf(bool(true)): + if name != "" { + f.flagSet.BoolVar(addr.(*bool), name, iface.(bool), flag.Usage) + } + if deprecatedName != "" { + f.flagSet.BoolVar(addr.(*bool), deprecatedName, iface.(bool), deprecatedUsage) + } + case reflect.TypeOf(time.Duration(0)): + if name != "" { + f.flagSet.DurationVar(addr.(*time.Duration), name, iface.(time.Duration), flag.Usage) + } + if deprecatedName != "" { + f.flagSet.DurationVar(addr.(*time.Duration), deprecatedName, iface.(time.Duration), deprecatedUsage) + } + + case reflect.TypeOf([]string{}): + if name != "" { + f.flagSet.Var(stringSliceVar{value}, name, flag.Usage) + } + if deprecatedName != "" { + f.flagSet.Var(stringSliceVar{value}, deprecatedName, deprecatedUsage) + } + default: + return GinkgoFlagSet{}, fmt.Errorf("unsupported type %T", iface) + } + } + + return f, nil +} + +func (f GinkgoFlagSet) IsZero() bool { + return f.flagSet == nil +} + +func (f GinkgoFlagSet) WasSet(name string) bool { + found := false + f.flagSet.Visit(func(f *flag.Flag) { + if f.Name == name { + found = true + } + }) + + return found +} + +func (f GinkgoFlagSet) Lookup(name string) *flag.Flag { + return f.flagSet.Lookup(name) +} + +func (f GinkgoFlagSet) Parse(args []string) ([]string, error) { + if f.IsZero() { + return args, nil + } + err := f.flagSet.Parse(args) + if err != nil { + return []string{}, err + } + return f.flagSet.Args(), nil +} + +func (f GinkgoFlagSet) ValidateDeprecations(deprecationTracker *DeprecationTracker) { + if f.IsZero() { + return + } + f.flagSet.Visit(func(flag *flag.Flag) { + for _, ginkgoFlag := range f.flags { + if ginkgoFlag.DeprecatedName != "" && strings.HasSuffix(flag.Name, ginkgoFlag.DeprecatedName) { + message := fmt.Sprintf("--%s is deprecated", ginkgoFlag.DeprecatedName) + if ginkgoFlag.Name != "" { + message = fmt.Sprintf("--%s is deprecated, use --%s instead", ginkgoFlag.DeprecatedName, ginkgoFlag.Name) + } else if ginkgoFlag.Usage != "" { + message += " " + ginkgoFlag.Usage + } + + deprecationTracker.TrackDeprecation(Deprecation{ + Message: message, + DocLink: ginkgoFlag.DeprecatedDocLink, + Version: ginkgoFlag.DeprecatedVersion, + }) + } + } + }) +} + +func (f GinkgoFlagSet) Usage() string { + if f.IsZero() { + return "" + } + groupedFlags := map[GinkgoFlagSection]GinkgoFlags{} + ungroupedFlags := GinkgoFlags{} + managedFlags := map[string]bool{} + extraGoFlags := []*flag.Flag{} + + for _, flag := range f.flags { + managedFlags[flag.Name] = true + managedFlags[flag.DeprecatedName] = true + + if flag.Name == "" { + continue + } + + section, ok := f.sections.Lookup(flag.SectionKey) + if ok { + groupedFlags[section] = append(groupedFlags[section], flag) + } else { + ungroupedFlags = append(ungroupedFlags, flag) + } + } + + f.flagSet.VisitAll(func(flag *flag.Flag) { + if !managedFlags[flag.Name] { + extraGoFlags = append(extraGoFlags, flag) + } + }) + + out := "" + for _, section := range f.sections { + flags := groupedFlags[section] + if len(flags) == 0 { + continue + } + out += f.usageForSection(section) + if section.Succinct { + succinctFlags := []string{} + for _, flag := range flags { + if flag.Name != "" { + succinctFlags = append(succinctFlags, fmt.Sprintf("--%s", flag.Name)) + } + } + out += formatter.Fiw(1, formatter.COLS, section.Style+strings.Join(succinctFlags, ", ")+"{{/}}\n") + } else { + for _, flag := range flags { + out += f.usageForFlag(flag, section.Style) + } + } + out += "\n" + } + if len(ungroupedFlags) > 0 { + for _, flag := range ungroupedFlags { + out += f.usageForFlag(flag, "") + } + out += "\n" + } + if len(extraGoFlags) > 0 { + out += f.usageForSection(f.extraGoFlagsSection) + for _, goFlag := range extraGoFlags { + out += f.usageForGoFlag(goFlag) + } + } + + return out +} + +func (f GinkgoFlagSet) substituteUsage() { + fmt.Fprintln(f.flagSet.Output(), f.Usage()) +} + +func valueAtKeyPath(root interface{}, keyPath string) (reflect.Value, bool) { + if len(keyPath) == 0 { + return reflect.Value{}, false + } + + val := reflect.ValueOf(root) + components := strings.Split(keyPath, ".") + for _, component := range components { + val = reflect.Indirect(val) + switch val.Kind() { + case reflect.Map: + val = val.MapIndex(reflect.ValueOf(component)) + if val.Kind() == reflect.Interface { + val = reflect.ValueOf(val.Interface()) + } + case reflect.Struct: + val = val.FieldByName(component) + default: + return reflect.Value{}, false + } + if (val == reflect.Value{}) { + return reflect.Value{}, false + } + } + + return val, true +} + +func (f GinkgoFlagSet) usageForSection(section GinkgoFlagSection) string { + out := formatter.F(section.Style + "{{bold}}{{underline}}" + section.Heading + "{{/}}\n") + if section.Description != "" { + out += formatter.Fiw(0, formatter.COLS, section.Description+"\n") + } + return out +} + +func (f GinkgoFlagSet) usageForFlag(flag GinkgoFlag, style string) string { + argument := flag.UsageArgument + defValue := flag.UsageDefaultValue + if argument == "" { + value, _ := valueAtKeyPath(f.bindings, flag.KeyPath) + switch value.Type() { + case reflect.TypeOf(string("")): + argument = "string" + case reflect.TypeOf(int64(0)), reflect.TypeOf(int(0)): + argument = "int" + case reflect.TypeOf(time.Duration(0)): + argument = "duration" + case reflect.TypeOf(float64(0)): + argument = "float" + case reflect.TypeOf([]string{}): + argument = "string" + } + } + if argument != "" { + argument = "[" + argument + "] " + } + if defValue != "" { + defValue = fmt.Sprintf("(default: %s)", defValue) + } + hyphens := "--" + if len(flag.Name) == 1 { + hyphens = "-" + } + + out := formatter.Fi(1, style+"%s%s{{/}} %s{{gray}}%s{{/}}\n", hyphens, flag.Name, argument, defValue) + out += formatter.Fiw(2, formatter.COLS, "{{light-gray}}%s{{/}}\n", flag.Usage) + return out +} + +func (f GinkgoFlagSet) usageForGoFlag(goFlag *flag.Flag) string { + //Taken directly from the flag package + out := fmt.Sprintf(" -%s", goFlag.Name) + name, usage := flag.UnquoteUsage(goFlag) + if len(name) > 0 { + out += " " + name + } + if len(out) <= 4 { + out += "\t" + } else { + out += "\n \t" + } + out += strings.ReplaceAll(usage, "\n", "\n \t") + out += "\n" + return out +} + +type stringSliceVar struct { + slice reflect.Value +} + +func (ssv stringSliceVar) String() string { return "" } +func (ssv stringSliceVar) Set(s string) error { + ssv.slice.Set(reflect.AppendSlice(ssv.slice, reflect.ValueOf([]string{s}))) + return nil +} + +// given a set of GinkgoFlags and bindings, generate flag arguments suitable to be passed to an application with that set of flags configured. +func GenerateFlagArgs(flags GinkgoFlags, bindings interface{}) ([]string, error) { + result := []string{} + for _, flag := range flags { + name := flag.ExportAs + if name == "" { + name = flag.Name + } + if name == "" { + continue + } + + value, ok := valueAtKeyPath(bindings, flag.KeyPath) + if !ok { + return []string{}, fmt.Errorf("could not load KeyPath: %s", flag.KeyPath) + } + + iface := value.Interface() + switch value.Type() { + case reflect.TypeOf(string("")): + if iface.(string) != "" || flag.AlwaysExport { + result = append(result, fmt.Sprintf("--%s=%s", name, iface)) + } + case reflect.TypeOf(int64(0)): + if iface.(int64) != 0 || flag.AlwaysExport { + result = append(result, fmt.Sprintf("--%s=%d", name, iface)) + } + case reflect.TypeOf(float64(0)): + if iface.(float64) != 0 || flag.AlwaysExport { + result = append(result, fmt.Sprintf("--%s=%f", name, iface)) + } + case reflect.TypeOf(int(0)): + if iface.(int) != 0 || flag.AlwaysExport { + result = append(result, fmt.Sprintf("--%s=%d", name, iface)) + } + case reflect.TypeOf(bool(true)): + if iface.(bool) { + result = append(result, fmt.Sprintf("--%s", name)) + } + case reflect.TypeOf(time.Duration(0)): + if iface.(time.Duration) != time.Duration(0) || flag.AlwaysExport { + result = append(result, fmt.Sprintf("--%s=%s", name, iface)) + } + + case reflect.TypeOf([]string{}): + strings := iface.([]string) + for _, s := range strings { + result = append(result, fmt.Sprintf("--%s=%s", name, s)) + } + default: + return []string{}, fmt.Errorf("unsupported type %T", iface) + } + } + + return result, nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go b/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go new file mode 100644 index 000000000..7fdc8aa23 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go @@ -0,0 +1,583 @@ +package types + +import ( + "fmt" + "regexp" + "strings" +) + +var DEBUG_LABEL_FILTER_PARSING = false + +type LabelFilter func([]string) bool + +func matchLabelAction(label string) LabelFilter { + expected := strings.ToLower(label) + return func(labels []string) bool { + for i := range labels { + if strings.ToLower(labels[i]) == expected { + return true + } + } + return false + } +} + +func matchLabelRegexAction(regex *regexp.Regexp) LabelFilter { + return func(labels []string) bool { + for i := range labels { + if regex.MatchString(labels[i]) { + return true + } + } + return false + } +} + +func notAction(filter LabelFilter) LabelFilter { + return func(labels []string) bool { return !filter(labels) } +} + +func andAction(a, b LabelFilter) LabelFilter { + return func(labels []string) bool { return a(labels) && b(labels) } +} + +func orAction(a, b LabelFilter) LabelFilter { + return func(labels []string) bool { return a(labels) || b(labels) } +} + +func labelSetFor(key string, labels []string) map[string]bool { + key = strings.ToLower(strings.TrimSpace(key)) + out := map[string]bool{} + for _, label := range labels { + components := strings.SplitN(label, ":", 2) + if len(components) < 2 { + continue + } + if key == strings.ToLower(strings.TrimSpace(components[0])) { + out[strings.ToLower(strings.TrimSpace(components[1]))] = true + } + } + + return out +} + +func isEmptyLabelSetAction(key string) LabelFilter { + return func(labels []string) bool { + return len(labelSetFor(key, labels)) == 0 + } +} + +func containsAnyLabelSetAction(key string, expectedValues []string) LabelFilter { + return func(labels []string) bool { + set := labelSetFor(key, labels) + for _, value := range expectedValues { + if set[value] { + return true + } + } + return false + } +} + +func containsAllLabelSetAction(key string, expectedValues []string) LabelFilter { + return func(labels []string) bool { + set := labelSetFor(key, labels) + for _, value := range expectedValues { + if !set[value] { + return false + } + } + return true + } +} + +func consistsOfLabelSetAction(key string, expectedValues []string) LabelFilter { + return func(labels []string) bool { + set := labelSetFor(key, labels) + if len(set) != len(expectedValues) { + return false + } + for _, value := range expectedValues { + if !set[value] { + return false + } + } + return true + } +} + +func isSubsetOfLabelSetAction(key string, expectedValues []string) LabelFilter { + expectedSet := map[string]bool{} + for _, value := range expectedValues { + expectedSet[value] = true + } + return func(labels []string) bool { + set := labelSetFor(key, labels) + for value := range set { + if !expectedSet[value] { + return false + } + } + return true + } +} + +type lfToken uint + +const ( + lfTokenInvalid lfToken = iota + + lfTokenRoot + lfTokenOpenGroup + lfTokenCloseGroup + lfTokenNot + lfTokenAnd + lfTokenOr + lfTokenRegexp + lfTokenLabel + lfTokenSetKey + lfTokenSetOperation + lfTokenSetArgument + lfTokenEOF +) + +func (l lfToken) Precedence() int { + switch l { + case lfTokenRoot, lfTokenOpenGroup: + return 0 + case lfTokenOr: + return 1 + case lfTokenAnd: + return 2 + case lfTokenNot: + return 3 + case lfTokenSetOperation: + return 4 + } + return -1 +} + +func (l lfToken) String() string { + switch l { + case lfTokenRoot: + return "ROOT" + case lfTokenOpenGroup: + return "(" + case lfTokenCloseGroup: + return ")" + case lfTokenNot: + return "!" + case lfTokenAnd: + return "&&" + case lfTokenOr: + return "||" + case lfTokenRegexp: + return "/regexp/" + case lfTokenLabel: + return "label" + case lfTokenSetKey: + return "set_key" + case lfTokenSetOperation: + return "set_operation" + case lfTokenSetArgument: + return "set_argument" + case lfTokenEOF: + return "EOF" + } + return "INVALID" +} + +type treeNode struct { + token lfToken + location int + value string + + parent *treeNode + leftNode *treeNode + rightNode *treeNode +} + +func (tn *treeNode) setRightNode(node *treeNode) { + tn.rightNode = node + node.parent = tn +} + +func (tn *treeNode) setLeftNode(node *treeNode) { + tn.leftNode = node + node.parent = tn +} + +func (tn *treeNode) firstAncestorWithPrecedenceLEQ(precedence int) *treeNode { + if tn.token.Precedence() <= precedence { + return tn + } + return tn.parent.firstAncestorWithPrecedenceLEQ(precedence) +} + +func (tn *treeNode) firstUnmatchedOpenNode() *treeNode { + if tn.token == lfTokenOpenGroup { + return tn + } + if tn.parent == nil { + return nil + } + return tn.parent.firstUnmatchedOpenNode() +} + +func (tn *treeNode) constructLabelFilter(input string) (LabelFilter, error) { + switch tn.token { + case lfTokenOpenGroup: + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, "Mismatched '(' - could not find matching ')'.") + case lfTokenLabel: + return matchLabelAction(tn.value), nil + case lfTokenRegexp: + re, err := regexp.Compile(tn.value) + if err != nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, fmt.Sprintf("RegExp compilation error: %s", err)) + } + return matchLabelRegexAction(re), nil + case lfTokenSetOperation: + tokenSetOperation := strings.ToLower(tn.value) + if tokenSetOperation == "isempty" { + return isEmptyLabelSetAction(tn.leftNode.value), nil + } + if tn.rightNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, fmt.Sprintf("Set operation '%s' is missing an argument.", tn.value)) + } + + rawValues := strings.Split(tn.rightNode.value, ",") + values := make([]string, len(rawValues)) + for i := range rawValues { + values[i] = strings.ToLower(strings.TrimSpace(rawValues[i])) + if strings.ContainsAny(values[i], "&|!,()/") { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.rightNode.location, fmt.Sprintf("Invalid label value '%s' in set operation argument.", values[i])) + } else if values[i] == "" { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.rightNode.location, "Empty label value in set operation argument.") + } + } + switch tokenSetOperation { + case "containsany": + return containsAnyLabelSetAction(tn.leftNode.value, values), nil + case "containsall": + return containsAllLabelSetAction(tn.leftNode.value, values), nil + case "consistsof": + return consistsOfLabelSetAction(tn.leftNode.value, values), nil + case "issubsetof": + return isSubsetOfLabelSetAction(tn.leftNode.value, values), nil + } + } + + if tn.rightNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, -1, "Unexpected EOF.") + } + rightLF, err := tn.rightNode.constructLabelFilter(input) + if err != nil { + return nil, err + } + + switch tn.token { + case lfTokenRoot, lfTokenCloseGroup: + return rightLF, nil + case lfTokenNot: + return notAction(rightLF), nil + } + + if tn.leftNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, fmt.Sprintf("Malformed tree - '%s' is missing left operand.", tn.token)) + } + leftLF, err := tn.leftNode.constructLabelFilter(input) + if err != nil { + return nil, err + } + + switch tn.token { + case lfTokenAnd: + return andAction(leftLF, rightLF), nil + case lfTokenOr: + return orAction(leftLF, rightLF), nil + } + + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, fmt.Sprintf("Invalid token '%s'.", tn.token)) +} + +func (tn *treeNode) tokenString() string { + out := fmt.Sprintf("<%s", tn.token) + if tn.value != "" { + out += " | " + tn.value + } + out += ">" + return out +} + +func (tn *treeNode) toString(indent int) string { + out := tn.tokenString() + "\n" + if tn.leftNode != nil { + out += fmt.Sprintf("%s |_(L)_%s", strings.Repeat(" ", indent), tn.leftNode.toString(indent+1)) + } + if tn.rightNode != nil { + out += fmt.Sprintf("%s |_(R)_%s", strings.Repeat(" ", indent), tn.rightNode.toString(indent+1)) + } + return out +} + +var validSetOperations = map[string]string{ + "containsany": "containsAny", + "containsall": "containsAll", + "consistsof": "consistsOf", + "issubsetof": "isSubsetOf", + "isempty": "isEmpty", +} + +func tokenize(input string) func() (*treeNode, error) { + lastToken := lfTokenInvalid + lastValue := "" + runes, i := []rune(input), 0 + + peekIs := func(r rune) bool { + if i+1 < len(runes) { + return runes[i+1] == r + } + return false + } + + consumeUntil := func(cutset string) (string, int) { + j := i + for ; j < len(runes); j++ { + if strings.IndexRune(cutset, runes[j]) >= 0 { + break + } + } + return string(runes[i:j]), j - i + } + + return func() (*treeNode, error) { + for i < len(runes) && runes[i] == ' ' { + i += 1 + } + + if i >= len(runes) { + return &treeNode{token: lfTokenEOF}, nil + } + + node := &treeNode{location: i} + defer func() { + lastToken = node.token + lastValue = node.value + }() + + if lastToken == lfTokenSetKey { + //we should get a valid set operation next + value, n := consumeUntil(" )") + if validSetOperations[strings.ToLower(value)] == "" { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, fmt.Sprintf("Invalid set operation '%s'.", value)) + } + i += n + node.token, node.value = lfTokenSetOperation, value + return node, nil + } + if lastToken == lfTokenSetOperation { + //we should get an argument next, if we aren't isempty + var arg = "" + origI := i + if runes[i] == '{' { + i += 1 + value, n := consumeUntil("}") + if i+n >= len(runes) { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i-1, "Missing closing '}' in set operation argument?") + } + i += n + 1 + arg = value + } else { + value, n := consumeUntil("&|!,()/") + i += n + arg = strings.TrimSpace(value) + } + if strings.ToLower(lastValue) == "isempty" && arg != "" { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, origI, fmt.Sprintf("isEmpty does not take arguments, was passed '%s'.", arg)) + } + if arg == "" && strings.ToLower(lastValue) != "isempty" { + if i < len(runes) && runes[i] == '/' { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, origI, "Set operations do not support regular expressions.") + } else { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, origI, fmt.Sprintf("Set operation '%s' requires an argument.", lastValue)) + } + } + // note that we sent an empty SetArgument token if we are isempty + node.token, node.value = lfTokenSetArgument, arg + return node, nil + } + + switch runes[i] { + case '&': + if !peekIs('&') { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, "Invalid token '&'. Did you mean '&&'?") + } + i += 2 + node.token = lfTokenAnd + case '|': + if !peekIs('|') { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, "Invalid token '|'. Did you mean '||'?") + } + i += 2 + node.token = lfTokenOr + case '!': + i += 1 + node.token = lfTokenNot + case ',': + i += 1 + node.token = lfTokenOr + case '(': + i += 1 + node.token = lfTokenOpenGroup + case ')': + i += 1 + node.token = lfTokenCloseGroup + case '/': + i += 1 + value, n := consumeUntil("/") + i += n + 1 + node.token, node.value = lfTokenRegexp, value + default: + value, n := consumeUntil("&|!,()/:") + i += n + value = strings.TrimSpace(value) + + //are we the beginning of a set operation? + if i < len(runes) && runes[i] == ':' { + if peekIs(' ') { + if value == "" { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, "Missing set key.") + } + i += 1 + //we are the beginning of a set operation + node.token, node.value = lfTokenSetKey, value + return node, nil + } + additionalValue, n := consumeUntil("&|!,()/") + additionalValue = strings.TrimSpace(additionalValue) + if additionalValue == ":" { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, "Missing set operation.") + } + i += n + value += additionalValue + } + + valueToCheckForSetOperation := strings.ToLower(value) + for setOperation := range validSetOperations { + idx := strings.Index(valueToCheckForSetOperation, " "+setOperation) + if idx > 0 { + return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i-n+idx+1, fmt.Sprintf("Looks like you are using the set operator '%s' but did not provide a set key. Did you forget the ':'?", validSetOperations[setOperation])) + } + } + + node.token, node.value = lfTokenLabel, strings.TrimSpace(value) + } + return node, nil + } +} + +func MustParseLabelFilter(input string) LabelFilter { + filter, err := ParseLabelFilter(input) + if err != nil { + panic(err) + } + return filter +} + +func ParseLabelFilter(input string) (LabelFilter, error) { + if DEBUG_LABEL_FILTER_PARSING { + fmt.Println("\n==============") + fmt.Println("Input: ", input) + fmt.Print("Tokens: ") + } + if input == "" { + return func(_ []string) bool { return true }, nil + } + nextToken := tokenize(input) + + root := &treeNode{token: lfTokenRoot} + current := root +LOOP: + for { + node, err := nextToken() + if err != nil { + return nil, err + } + + if DEBUG_LABEL_FILTER_PARSING { + fmt.Print(node.tokenString() + " ") + } + + switch node.token { + case lfTokenEOF: + break LOOP + case lfTokenLabel, lfTokenRegexp, lfTokenSetKey: + if current.rightNode != nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, "Found two adjacent labels. You need an operator between them.") + } + current.setRightNode(node) + case lfTokenNot, lfTokenOpenGroup: + if current.rightNode != nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Invalid token '%s'.", node.token)) + } + current.setRightNode(node) + current = node + case lfTokenAnd, lfTokenOr: + if current.rightNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Operator '%s' missing left hand operand.", node.token)) + } + nodeToStealFrom := current.firstAncestorWithPrecedenceLEQ(node.token.Precedence()) + node.setLeftNode(nodeToStealFrom.rightNode) + nodeToStealFrom.setRightNode(node) + current = node + case lfTokenSetOperation: + if current.rightNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Set operation '%s' missing left hand operand.", node.value)) + } + node.setLeftNode(current.rightNode) + current.setRightNode(node) + current = node + case lfTokenSetArgument: + if current.rightNode != nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Unexpected set argument '%s'.", node.token)) + } + current.setRightNode(node) + case lfTokenCloseGroup: + firstUnmatchedOpenNode := current.firstUnmatchedOpenNode() + if firstUnmatchedOpenNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, "Mismatched ')' - could not find matching '('.") + } + if firstUnmatchedOpenNode == current && current.rightNode == nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, "Found empty '()' group.") + } + firstUnmatchedOpenNode.token = lfTokenCloseGroup //signify the group is now closed + current = firstUnmatchedOpenNode.parent + default: + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Unknown token '%s'.", node.token)) + } + } + if DEBUG_LABEL_FILTER_PARSING { + fmt.Printf("\n Tree:\n%s", root.toString(0)) + } + return root.constructLabelFilter(input) +} + +func ValidateAndCleanupLabel(label string, cl CodeLocation) (string, error) { + out := strings.TrimSpace(label) + if out == "" { + return "", GinkgoErrors.InvalidEmptyLabel(cl) + } + if strings.ContainsAny(out, "&|!,()/") { + return "", GinkgoErrors.InvalidLabel(label, cl) + } + if out[0] == ':' { + return "", GinkgoErrors.InvalidLabel(label, cl) + } + if strings.Contains(out, ":") { + components := strings.SplitN(out, ":", 2) + if len(components) < 2 || components[1] == "" { + return "", GinkgoErrors.InvalidLabel(label, cl) + } + } + return out, nil +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/report_entry.go b/vendor/github.com/onsi/ginkgo/v2/types/report_entry.go new file mode 100644 index 000000000..7b1524b52 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/report_entry.go @@ -0,0 +1,190 @@ +package types + +import ( + "encoding/json" + "fmt" + "time" +) + +// ReportEntryValue wraps a report entry's value ensuring it can be encoded and decoded safely into reports +// and across the network connection when running in parallel +type ReportEntryValue struct { + raw interface{} //unexported to prevent gob from freaking out about unregistered structs + AsJSON string + Representation string +} + +func WrapEntryValue(value interface{}) ReportEntryValue { + return ReportEntryValue{ + raw: value, + } +} + +func (rev ReportEntryValue) GetRawValue() interface{} { + return rev.raw +} + +func (rev ReportEntryValue) String() string { + if rev.raw == nil { + return "" + } + if colorableStringer, ok := rev.raw.(ColorableStringer); ok { + return colorableStringer.ColorableString() + } + + if stringer, ok := rev.raw.(fmt.Stringer); ok { + return stringer.String() + } + if rev.Representation != "" { + return rev.Representation + } + return fmt.Sprintf("%+v", rev.raw) +} + +func (rev ReportEntryValue) MarshalJSON() ([]byte, error) { + //All this to capture the representation at encoding-time, not creating time + //This way users can Report on pointers and get their final values at reporting-time + out := struct { + AsJSON string + Representation string + }{ + Representation: rev.String(), + } + asJSON, err := json.Marshal(rev.raw) + if err != nil { + return nil, err + } + out.AsJSON = string(asJSON) + + return json.Marshal(out) +} + +func (rev *ReportEntryValue) UnmarshalJSON(data []byte) error { + in := struct { + AsJSON string + Representation string + }{} + err := json.Unmarshal(data, &in) + if err != nil { + return err + } + rev.AsJSON = in.AsJSON + rev.Representation = in.Representation + return json.Unmarshal([]byte(in.AsJSON), &(rev.raw)) +} + +func (rev ReportEntryValue) GobEncode() ([]byte, error) { + return rev.MarshalJSON() +} + +func (rev *ReportEntryValue) GobDecode(data []byte) error { + return rev.UnmarshalJSON(data) +} + +// ReportEntry captures information attached to `SpecReport` via `AddReportEntry` +type ReportEntry struct { + // Visibility captures the visibility policy for this ReportEntry + Visibility ReportEntryVisibility + // Location captures the location of the AddReportEntry call + Location CodeLocation + + Time time.Time //need this for backwards compatibility + TimelineLocation TimelineLocation + + // Name captures the name of this report + Name string + // Value captures the (optional) object passed into AddReportEntry - this can be + // anything the user wants. The value passed to AddReportEntry is wrapped in a ReportEntryValue to make + // encoding/decoding the value easier. To access the raw value call entry.GetRawValue() + Value ReportEntryValue +} + +// ColorableStringer is an interface that ReportEntry values can satisfy. If they do then ColorableString() is used to generate their representation. +type ColorableStringer interface { + ColorableString() string +} + +// StringRepresentation() returns the string representation of the value associated with the ReportEntry -- +// if value is nil, empty string is returned +// if value is a `ColorableStringer` then `Value.ColorableString()` is returned +// if value is a `fmt.Stringer` then `Value.String()` is returned +// otherwise the value is formatted with "%+v" +func (entry ReportEntry) StringRepresentation() string { + return entry.Value.String() +} + +// GetRawValue returns the Value object that was passed to AddReportEntry +// If called in-process this will be the same object that was passed into AddReportEntry. +// If used from a rehydrated JSON file _or_ in a ReportAfterSuite when running in parallel this will be +// a JSON-decoded {}interface. If you want to reconstitute your original object you can decode the entry.Value.AsJSON +// field yourself. +func (entry ReportEntry) GetRawValue() interface{} { + return entry.Value.GetRawValue() +} + +func (entry ReportEntry) GetTimelineLocation() TimelineLocation { + return entry.TimelineLocation +} + +type ReportEntries []ReportEntry + +func (re ReportEntries) HasVisibility(visibilities ...ReportEntryVisibility) bool { + for _, entry := range re { + if entry.Visibility.Is(visibilities...) { + return true + } + } + return false +} + +func (re ReportEntries) WithVisibility(visibilities ...ReportEntryVisibility) ReportEntries { + out := ReportEntries{} + + for _, entry := range re { + if entry.Visibility.Is(visibilities...) { + out = append(out, entry) + } + } + + return out +} + +// ReportEntryVisibility governs the visibility of ReportEntries in Ginkgo's console reporter +type ReportEntryVisibility uint + +const ( + // Always print out this ReportEntry + ReportEntryVisibilityAlways ReportEntryVisibility = iota + // Only print out this ReportEntry if the spec fails or if the test is run with -v + ReportEntryVisibilityFailureOrVerbose + // Never print out this ReportEntry (note that ReportEntrys are always encoded in machine readable reports (e.g. JSON, JUnit, etc.)) + ReportEntryVisibilityNever +) + +var revEnumSupport = NewEnumSupport(map[uint]string{ + uint(ReportEntryVisibilityAlways): "always", + uint(ReportEntryVisibilityFailureOrVerbose): "failure-or-verbose", + uint(ReportEntryVisibilityNever): "never", +}) + +func (rev ReportEntryVisibility) String() string { + return revEnumSupport.String(uint(rev)) +} +func (rev *ReportEntryVisibility) UnmarshalJSON(b []byte) error { + out, err := revEnumSupport.UnmarshJSON(b) + *rev = ReportEntryVisibility(out) + return err +} +func (rev ReportEntryVisibility) MarshalJSON() ([]byte, error) { + return revEnumSupport.MarshJSON(uint(rev)) +} + +func (v ReportEntryVisibility) Is(visibilities ...ReportEntryVisibility) bool { + for _, visibility := range visibilities { + if v == visibility { + return true + } + } + + return false +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/types.go b/vendor/github.com/onsi/ginkgo/v2/types/types.go new file mode 100644 index 000000000..ddcbec1ba --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/types.go @@ -0,0 +1,922 @@ +package types + +import ( + "encoding/json" + "fmt" + "os" + "sort" + "strings" + "time" +) + +const GINKGO_FOCUS_EXIT_CODE = 197 + +var GINKGO_TIME_FORMAT = "01/02/06 15:04:05.999" + +func init() { + if os.Getenv("GINKGO_TIME_FORMAT") != "" { + GINKGO_TIME_FORMAT = os.Getenv("GINKGO_TIME_FORMAT") + } +} + +// Report captures information about a Ginkgo test run +type Report struct { + //SuitePath captures the absolute path to the test suite + SuitePath string + + //SuiteDescription captures the description string passed to the DSL's RunSpecs() function + SuiteDescription string + + //SuiteLabels captures any labels attached to the suite by the DSL's RunSpecs() function + SuiteLabels []string + + //SuiteSucceeded captures the success or failure status of the test run + //If true, the test run is considered successful. + //If false, the test run is considered unsuccessful + SuiteSucceeded bool + + //SuiteHasProgrammaticFocus captures whether the test suite has a test or set of tests that are programmatically focused + //(i.e an `FIt` or an `FDescribe` + SuiteHasProgrammaticFocus bool + + //SpecialSuiteFailureReasons may contain special failure reasons + //For example, a test suite might be considered "failed" even if none of the individual specs + //have a failure state. For example, if the user has configured --fail-on-pending the test suite + //will have failed if there are pending tests even though all non-pending tests may have passed. In such + //cases, Ginkgo populates SpecialSuiteFailureReasons with a clear message indicating the reason for the failure. + //SpecialSuiteFailureReasons is also populated if the test suite is interrupted by the user. + //Since multiple special failure reasons can occur, this field is a slice. + SpecialSuiteFailureReasons []string + + //PreRunStats contains a set of stats captured before the test run begins. This is primarily used + //by Ginkgo's reporter to tell the user how many specs are in the current suite (PreRunStats.TotalSpecs) + //and how many it intends to run (PreRunStats.SpecsThatWillRun) after applying any relevant focus or skip filters. + PreRunStats PreRunStats + + //StartTime and EndTime capture the start and end time of the test run + StartTime time.Time + EndTime time.Time + + //RunTime captures the duration of the test run + RunTime time.Duration + + //SuiteConfig captures the Ginkgo configuration governing this test run + //SuiteConfig includes information necessary for reproducing an identical test run, + //such as the random seed and any filters applied during the test run + SuiteConfig SuiteConfig + + //SpecReports is a list of all SpecReports generated by this test run + //It is empty when the SuiteReport is provided to ReportBeforeSuite + SpecReports SpecReports +} + +// PreRunStats contains a set of stats captured before the test run begins. This is primarily used +// by Ginkgo's reporter to tell the user how many specs are in the current suite (PreRunStats.TotalSpecs) +// and how many it intends to run (PreRunStats.SpecsThatWillRun) after applying any relevant focus or skip filters. +type PreRunStats struct { + TotalSpecs int + SpecsThatWillRun int +} + +// Add is used by Ginkgo's parallel aggregation mechanisms to combine test run reports form individual parallel processes +// to form a complete final report. +func (report Report) Add(other Report) Report { + report.SuiteSucceeded = report.SuiteSucceeded && other.SuiteSucceeded + + if other.StartTime.Before(report.StartTime) { + report.StartTime = other.StartTime + } + + if other.EndTime.After(report.EndTime) { + report.EndTime = other.EndTime + } + + specialSuiteFailureReasons := []string{} + reasonsLookup := map[string]bool{} + for _, reasons := range [][]string{report.SpecialSuiteFailureReasons, other.SpecialSuiteFailureReasons} { + for _, reason := range reasons { + if !reasonsLookup[reason] { + reasonsLookup[reason] = true + specialSuiteFailureReasons = append(specialSuiteFailureReasons, reason) + } + } + } + report.SpecialSuiteFailureReasons = specialSuiteFailureReasons + report.RunTime = report.EndTime.Sub(report.StartTime) + + reports := make(SpecReports, len(report.SpecReports)+len(other.SpecReports)) + copy(reports, report.SpecReports) + offset := len(report.SpecReports) + for i := range other.SpecReports { + reports[i+offset] = other.SpecReports[i] + } + + report.SpecReports = reports + return report +} + +// SpecReport captures information about a Ginkgo spec. +type SpecReport struct { + // ContainerHierarchyTexts is a slice containing the text strings of + // all Describe/Context/When containers in this spec's hierarchy. + ContainerHierarchyTexts []string + + // ContainerHierarchyLocations is a slice containing the CodeLocations of + // all Describe/Context/When containers in this spec's hierarchy. + ContainerHierarchyLocations []CodeLocation + + // ContainerHierarchyLabels is a slice containing the labels of + // all Describe/Context/When containers in this spec's hierarchy + ContainerHierarchyLabels [][]string + + // LeafNodeType, LeadNodeLocation, LeafNodeLabels and LeafNodeText capture the NodeType, CodeLocation, and text + // of the Ginkgo node being tested (typically an NodeTypeIt node, though this can also be + // one of the NodeTypesForSuiteLevelNodes node types) + LeafNodeType NodeType + LeafNodeLocation CodeLocation + LeafNodeLabels []string + LeafNodeText string + + // State captures whether the spec has passed, failed, etc. + State SpecState + + // IsSerial captures whether the spec has the Serial decorator + IsSerial bool + + // IsInOrderedContainer captures whether the spec appears in an Ordered container + IsInOrderedContainer bool + + // StartTime and EndTime capture the start and end time of the spec + StartTime time.Time + EndTime time.Time + + // RunTime captures the duration of the spec + RunTime time.Duration + + // ParallelProcess captures the parallel process that this spec ran on + ParallelProcess int + + // RunningInParallel captures whether this spec is part of a suite that ran in parallel + RunningInParallel bool + + //Failure is populated if a spec has failed, panicked, been interrupted, or skipped by the user (e.g. calling Skip()) + //It includes detailed information about the Failure + Failure Failure + + // NumAttempts captures the number of times this Spec was run. + // Flakey specs can be retried with ginkgo --flake-attempts=N or the use of the FlakeAttempts decorator. + // Repeated specs can be retried with the use of the MustPassRepeatedly decorator + NumAttempts int + + // MaxFlakeAttempts captures whether the spec has been retried with ginkgo --flake-attempts=N or the use of the FlakeAttempts decorator. + MaxFlakeAttempts int + + // MaxMustPassRepeatedly captures whether the spec has the MustPassRepeatedly decorator + MaxMustPassRepeatedly int + + // CapturedGinkgoWriterOutput contains text printed to the GinkgoWriter + CapturedGinkgoWriterOutput string + + // CapturedStdOutErr contains text printed to stdout/stderr (when running in parallel) + // This is always empty when running in series or calling CurrentSpecReport() + // It is used internally by Ginkgo's reporter + CapturedStdOutErr string + + // ReportEntries contains any reports added via `AddReportEntry` + ReportEntries ReportEntries + + // ProgressReports contains any progress reports generated during this spec. These can either be manually triggered, or automatically generated by Ginkgo via the PollProgressAfter() decorator + ProgressReports []ProgressReport + + // AdditionalFailures contains any failures that occurred after the initial spec failure. These typically occur in cleanup nodes after the initial failure and are only emitted when running in verbose mode. + AdditionalFailures []AdditionalFailure + + // SpecEvents capture additional events that occur during the spec run + SpecEvents SpecEvents +} + +func (report SpecReport) MarshalJSON() ([]byte, error) { + //All this to avoid emitting an empty Failure struct in the JSON + out := struct { + ContainerHierarchyTexts []string + ContainerHierarchyLocations []CodeLocation + ContainerHierarchyLabels [][]string + LeafNodeType NodeType + LeafNodeLocation CodeLocation + LeafNodeLabels []string + LeafNodeText string + State SpecState + StartTime time.Time + EndTime time.Time + RunTime time.Duration + ParallelProcess int + Failure *Failure `json:",omitempty"` + NumAttempts int + MaxFlakeAttempts int + MaxMustPassRepeatedly int + CapturedGinkgoWriterOutput string `json:",omitempty"` + CapturedStdOutErr string `json:",omitempty"` + ReportEntries ReportEntries `json:",omitempty"` + ProgressReports []ProgressReport `json:",omitempty"` + AdditionalFailures []AdditionalFailure `json:",omitempty"` + SpecEvents SpecEvents `json:",omitempty"` + }{ + ContainerHierarchyTexts: report.ContainerHierarchyTexts, + ContainerHierarchyLocations: report.ContainerHierarchyLocations, + ContainerHierarchyLabels: report.ContainerHierarchyLabels, + LeafNodeType: report.LeafNodeType, + LeafNodeLocation: report.LeafNodeLocation, + LeafNodeLabels: report.LeafNodeLabels, + LeafNodeText: report.LeafNodeText, + State: report.State, + StartTime: report.StartTime, + EndTime: report.EndTime, + RunTime: report.RunTime, + ParallelProcess: report.ParallelProcess, + Failure: nil, + ReportEntries: nil, + NumAttempts: report.NumAttempts, + MaxFlakeAttempts: report.MaxFlakeAttempts, + MaxMustPassRepeatedly: report.MaxMustPassRepeatedly, + CapturedGinkgoWriterOutput: report.CapturedGinkgoWriterOutput, + CapturedStdOutErr: report.CapturedStdOutErr, + } + + if !report.Failure.IsZero() { + out.Failure = &(report.Failure) + } + if len(report.ReportEntries) > 0 { + out.ReportEntries = report.ReportEntries + } + if len(report.ProgressReports) > 0 { + out.ProgressReports = report.ProgressReports + } + if len(report.AdditionalFailures) > 0 { + out.AdditionalFailures = report.AdditionalFailures + } + if len(report.SpecEvents) > 0 { + out.SpecEvents = report.SpecEvents + } + + return json.Marshal(out) +} + +// CombinedOutput returns a single string representation of both CapturedStdOutErr and CapturedGinkgoWriterOutput +// Note that both are empty when using CurrentSpecReport() so CurrentSpecReport().CombinedOutput() will always be empty. +// CombinedOutput() is used internally by Ginkgo's reporter. +func (report SpecReport) CombinedOutput() string { + if report.CapturedStdOutErr == "" { + return report.CapturedGinkgoWriterOutput + } + if report.CapturedGinkgoWriterOutput == "" { + return report.CapturedStdOutErr + } + return report.CapturedStdOutErr + "\n" + report.CapturedGinkgoWriterOutput +} + +// Failed returns true if report.State is one of the SpecStateFailureStates +// (SpecStateFailed, SpecStatePanicked, SpecStateinterrupted, SpecStateAborted) +func (report SpecReport) Failed() bool { + return report.State.Is(SpecStateFailureStates) +} + +// FullText returns a concatenation of all the report.ContainerHierarchyTexts and report.LeafNodeText +func (report SpecReport) FullText() string { + texts := []string{} + texts = append(texts, report.ContainerHierarchyTexts...) + if report.LeafNodeText != "" { + texts = append(texts, report.LeafNodeText) + } + return strings.Join(texts, " ") +} + +// Labels returns a deduped set of all the spec's Labels. +func (report SpecReport) Labels() []string { + out := []string{} + seen := map[string]bool{} + for _, labels := range report.ContainerHierarchyLabels { + for _, label := range labels { + if !seen[label] { + seen[label] = true + out = append(out, label) + } + } + } + for _, label := range report.LeafNodeLabels { + if !seen[label] { + seen[label] = true + out = append(out, label) + } + } + + return out +} + +// MatchesLabelFilter returns true if the spec satisfies the passed in label filter query +func (report SpecReport) MatchesLabelFilter(query string) (bool, error) { + filter, err := ParseLabelFilter(query) + if err != nil { + return false, err + } + return filter(report.Labels()), nil +} + +// FileName() returns the name of the file containing the spec +func (report SpecReport) FileName() string { + return report.LeafNodeLocation.FileName +} + +// LineNumber() returns the line number of the leaf node +func (report SpecReport) LineNumber() int { + return report.LeafNodeLocation.LineNumber +} + +// FailureMessage() returns the failure message (or empty string if the test hasn't failed) +func (report SpecReport) FailureMessage() string { + return report.Failure.Message +} + +// FailureLocation() returns the location of the failure (or an empty CodeLocation if the test hasn't failed) +func (report SpecReport) FailureLocation() CodeLocation { + return report.Failure.Location +} + +// Timeline() returns a timeline view of the report +func (report SpecReport) Timeline() Timeline { + timeline := Timeline{} + if !report.Failure.IsZero() { + timeline = append(timeline, report.Failure) + if report.Failure.AdditionalFailure != nil { + timeline = append(timeline, *(report.Failure.AdditionalFailure)) + } + } + for _, additionalFailure := range report.AdditionalFailures { + timeline = append(timeline, additionalFailure) + } + for _, reportEntry := range report.ReportEntries { + timeline = append(timeline, reportEntry) + } + for _, progressReport := range report.ProgressReports { + timeline = append(timeline, progressReport) + } + for _, specEvent := range report.SpecEvents { + timeline = append(timeline, specEvent) + } + sort.Sort(timeline) + return timeline +} + +type SpecReports []SpecReport + +// WithLeafNodeType returns the subset of SpecReports with LeafNodeType matching one of the requested NodeTypes +func (reports SpecReports) WithLeafNodeType(nodeTypes NodeType) SpecReports { + count := 0 + for i := range reports { + if reports[i].LeafNodeType.Is(nodeTypes) { + count++ + } + } + + out := make(SpecReports, count) + j := 0 + for i := range reports { + if reports[i].LeafNodeType.Is(nodeTypes) { + out[j] = reports[i] + j++ + } + } + return out +} + +// WithState returns the subset of SpecReports with State matching one of the requested SpecStates +func (reports SpecReports) WithState(states SpecState) SpecReports { + count := 0 + for i := range reports { + if reports[i].State.Is(states) { + count++ + } + } + + out, j := make(SpecReports, count), 0 + for i := range reports { + if reports[i].State.Is(states) { + out[j] = reports[i] + j++ + } + } + return out +} + +// CountWithState returns the number of SpecReports with State matching one of the requested SpecStates +func (reports SpecReports) CountWithState(states SpecState) int { + n := 0 + for i := range reports { + if reports[i].State.Is(states) { + n += 1 + } + } + return n +} + +// If the Spec passes, CountOfFlakedSpecs returns the number of SpecReports that failed after multiple attempts. +func (reports SpecReports) CountOfFlakedSpecs() int { + n := 0 + for i := range reports { + if reports[i].MaxFlakeAttempts > 1 && reports[i].State.Is(SpecStatePassed) && reports[i].NumAttempts > 1 { + n += 1 + } + } + return n +} + +// If the Spec fails, CountOfRepeatedSpecs returns the number of SpecReports that passed after multiple attempts +func (reports SpecReports) CountOfRepeatedSpecs() int { + n := 0 + for i := range reports { + if reports[i].MaxMustPassRepeatedly > 1 && reports[i].State.Is(SpecStateFailureStates) && reports[i].NumAttempts > 1 { + n += 1 + } + } + return n +} + +// TimelineLocation captures the location of an event in the spec's timeline +type TimelineLocation struct { + //Offset is the offset (in bytes) of the event relative to the GinkgoWriter stream + Offset int `json:",omitempty"` + + //Order is the order of the event with respect to other events. The absolute value of Order + //is irrelevant. All that matters is that an event with a lower Order occurs before ane vent with a higher Order + Order int `json:",omitempty"` + + Time time.Time +} + +// TimelineEvent represent an event on the timeline +// consumers of Timeline will need to check the concrete type of each entry to determine how to handle it +type TimelineEvent interface { + GetTimelineLocation() TimelineLocation +} + +type Timeline []TimelineEvent + +func (t Timeline) Len() int { return len(t) } +func (t Timeline) Less(i, j int) bool { + return t[i].GetTimelineLocation().Order < t[j].GetTimelineLocation().Order +} +func (t Timeline) Swap(i, j int) { t[i], t[j] = t[j], t[i] } +func (t Timeline) WithoutHiddenReportEntries() Timeline { + out := Timeline{} + for _, event := range t { + if reportEntry, isReportEntry := event.(ReportEntry); isReportEntry && reportEntry.Visibility == ReportEntryVisibilityNever { + continue + } + out = append(out, event) + } + return out +} + +func (t Timeline) WithoutVeryVerboseSpecEvents() Timeline { + out := Timeline{} + for _, event := range t { + if specEvent, isSpecEvent := event.(SpecEvent); isSpecEvent && specEvent.IsOnlyVisibleAtVeryVerbose() { + continue + } + out = append(out, event) + } + return out +} + +// Failure captures failure information for an individual test +type Failure struct { + // Message - the failure message passed into Fail(...). When using a matcher library + // like Gomega, this will contain the failure message generated by Gomega. + // + // Message is also populated if the user has called Skip(...). + Message string + + // Location - the CodeLocation where the failure occurred + // This CodeLocation will include a fully-populated StackTrace + Location CodeLocation + + TimelineLocation TimelineLocation + + // ForwardedPanic - if the failure represents a captured panic (i.e. Summary.State == SpecStatePanicked) + // then ForwardedPanic will be populated with a string representation of the captured panic. + ForwardedPanic string `json:",omitempty"` + + // FailureNodeContext - one of three contexts describing the node in which the failure occurred: + // FailureNodeIsLeafNode means the failure occurred in the leaf node of the associated SpecReport. None of the other FailureNode fields will be populated + // FailureNodeAtTopLevel means the failure occurred in a non-leaf node that is defined at the top-level of the spec (i.e. not in a container). FailureNodeType and FailureNodeLocation will be populated. + // FailureNodeInContainer means the failure occurred in a non-leaf node that is defined within a container. FailureNodeType, FailureNodeLocation, and FailureNodeContainerIndex will be populated. + // + // FailureNodeType will contain the NodeType of the node in which the failure occurred. + // FailureNodeLocation will contain the CodeLocation of the node in which the failure occurred. + // If populated, FailureNodeContainerIndex will be the index into SpecReport.ContainerHierarchyTexts and SpecReport.ContainerHierarchyLocations that represents the parent container of the node in which the failure occurred. + FailureNodeContext FailureNodeContext `json:",omitempty"` + + FailureNodeType NodeType `json:",omitempty"` + + FailureNodeLocation CodeLocation `json:",omitempty"` + + FailureNodeContainerIndex int `json:",omitempty"` + + //ProgressReport is populated if the spec was interrupted or timed out + ProgressReport ProgressReport `json:",omitempty"` + + //AdditionalFailure is non-nil if a follow-on failure occurred within the same node after the primary failure. This only happens when a node has timed out or been interrupted. In such cases the AdditionalFailure can include information about where/why the spec was stuck. + AdditionalFailure *AdditionalFailure `json:",omitempty"` +} + +func (f Failure) IsZero() bool { + return f.Message == "" && (f.Location == CodeLocation{}) +} + +func (f Failure) GetTimelineLocation() TimelineLocation { + return f.TimelineLocation +} + +// FailureNodeContext captures the location context for the node containing the failing line of code +type FailureNodeContext uint + +const ( + FailureNodeContextInvalid FailureNodeContext = iota + + FailureNodeIsLeafNode + FailureNodeAtTopLevel + FailureNodeInContainer +) + +var fncEnumSupport = NewEnumSupport(map[uint]string{ + uint(FailureNodeContextInvalid): "INVALID FAILURE NODE CONTEXT", + uint(FailureNodeIsLeafNode): "leaf-node", + uint(FailureNodeAtTopLevel): "top-level", + uint(FailureNodeInContainer): "in-container", +}) + +func (fnc FailureNodeContext) String() string { + return fncEnumSupport.String(uint(fnc)) +} +func (fnc *FailureNodeContext) UnmarshalJSON(b []byte) error { + out, err := fncEnumSupport.UnmarshJSON(b) + *fnc = FailureNodeContext(out) + return err +} +func (fnc FailureNodeContext) MarshalJSON() ([]byte, error) { + return fncEnumSupport.MarshJSON(uint(fnc)) +} + +// AdditionalFailure capturs any additional failures that occur after the initial failure of a psec +// these typically occur in clean up nodes after the spec has failed. +// We can't simply use Failure as we want to track the SpecState to know what kind of failure this is +type AdditionalFailure struct { + State SpecState + Failure Failure +} + +func (f AdditionalFailure) GetTimelineLocation() TimelineLocation { + return f.Failure.TimelineLocation +} + +// SpecState captures the state of a spec +// To determine if a given `state` represents a failure state, use `state.Is(SpecStateFailureStates)` +type SpecState uint + +const ( + SpecStateInvalid SpecState = 0 + + SpecStatePending SpecState = 1 << iota + SpecStateSkipped + SpecStatePassed + SpecStateFailed + SpecStateAborted + SpecStatePanicked + SpecStateInterrupted + SpecStateTimedout +) + +var ssEnumSupport = NewEnumSupport(map[uint]string{ + uint(SpecStateInvalid): "INVALID SPEC STATE", + uint(SpecStatePending): "pending", + uint(SpecStateSkipped): "skipped", + uint(SpecStatePassed): "passed", + uint(SpecStateFailed): "failed", + uint(SpecStateAborted): "aborted", + uint(SpecStatePanicked): "panicked", + uint(SpecStateInterrupted): "interrupted", + uint(SpecStateTimedout): "timedout", +}) + +func (ss SpecState) String() string { + return ssEnumSupport.String(uint(ss)) +} +func (ss SpecState) GomegaString() string { + return ssEnumSupport.String(uint(ss)) +} +func (ss *SpecState) UnmarshalJSON(b []byte) error { + out, err := ssEnumSupport.UnmarshJSON(b) + *ss = SpecState(out) + return err +} +func (ss SpecState) MarshalJSON() ([]byte, error) { + return ssEnumSupport.MarshJSON(uint(ss)) +} + +var SpecStateFailureStates = SpecStateFailed | SpecStateTimedout | SpecStateAborted | SpecStatePanicked | SpecStateInterrupted + +func (ss SpecState) Is(states SpecState) bool { + return ss&states != 0 +} + +// ProgressReport captures the progress of the current spec. It is, effectively, a structured Ginkgo-aware stack trace +type ProgressReport struct { + Message string `json:",omitempty"` + ParallelProcess int `json:",omitempty"` + RunningInParallel bool `json:",omitempty"` + + ContainerHierarchyTexts []string `json:",omitempty"` + LeafNodeText string `json:",omitempty"` + LeafNodeLocation CodeLocation `json:",omitempty"` + SpecStartTime time.Time `json:",omitempty"` + + CurrentNodeType NodeType `json:",omitempty"` + CurrentNodeText string `json:",omitempty"` + CurrentNodeLocation CodeLocation `json:",omitempty"` + CurrentNodeStartTime time.Time `json:",omitempty"` + + CurrentStepText string `json:",omitempty"` + CurrentStepLocation CodeLocation `json:",omitempty"` + CurrentStepStartTime time.Time `json:",omitempty"` + + AdditionalReports []string `json:",omitempty"` + + CapturedGinkgoWriterOutput string `json:",omitempty"` + TimelineLocation TimelineLocation `json:",omitempty"` + + Goroutines []Goroutine `json:",omitempty"` +} + +func (pr ProgressReport) IsZero() bool { + return pr.CurrentNodeType == NodeTypeInvalid +} + +func (pr ProgressReport) Time() time.Time { + return pr.TimelineLocation.Time +} + +func (pr ProgressReport) SpecGoroutine() Goroutine { + for _, goroutine := range pr.Goroutines { + if goroutine.IsSpecGoroutine { + return goroutine + } + } + return Goroutine{} +} + +func (pr ProgressReport) HighlightedGoroutines() []Goroutine { + out := []Goroutine{} + for _, goroutine := range pr.Goroutines { + if goroutine.IsSpecGoroutine || !goroutine.HasHighlights() { + continue + } + out = append(out, goroutine) + } + return out +} + +func (pr ProgressReport) OtherGoroutines() []Goroutine { + out := []Goroutine{} + for _, goroutine := range pr.Goroutines { + if goroutine.IsSpecGoroutine || goroutine.HasHighlights() { + continue + } + out = append(out, goroutine) + } + return out +} + +func (pr ProgressReport) WithoutCapturedGinkgoWriterOutput() ProgressReport { + out := pr + out.CapturedGinkgoWriterOutput = "" + return out +} + +func (pr ProgressReport) WithoutOtherGoroutines() ProgressReport { + out := pr + filteredGoroutines := []Goroutine{} + for _, goroutine := range pr.Goroutines { + if goroutine.IsSpecGoroutine || goroutine.HasHighlights() { + filteredGoroutines = append(filteredGoroutines, goroutine) + } + } + out.Goroutines = filteredGoroutines + return out +} + +func (pr ProgressReport) GetTimelineLocation() TimelineLocation { + return pr.TimelineLocation +} + +type Goroutine struct { + ID uint64 + State string + Stack []FunctionCall + IsSpecGoroutine bool +} + +func (g Goroutine) IsZero() bool { + return g.ID == 0 +} + +func (g Goroutine) HasHighlights() bool { + for _, fc := range g.Stack { + if fc.Highlight { + return true + } + } + + return false +} + +type FunctionCall struct { + Function string + Filename string + Line int + Highlight bool `json:",omitempty"` + Source []string `json:",omitempty"` + SourceHighlight int `json:",omitempty"` +} + +// NodeType captures the type of a given Ginkgo Node +type NodeType uint + +const ( + NodeTypeInvalid NodeType = 0 + + NodeTypeContainer NodeType = 1 << iota + NodeTypeIt + + NodeTypeBeforeEach + NodeTypeJustBeforeEach + NodeTypeAfterEach + NodeTypeJustAfterEach + + NodeTypeBeforeAll + NodeTypeAfterAll + + NodeTypeBeforeSuite + NodeTypeSynchronizedBeforeSuite + NodeTypeAfterSuite + NodeTypeSynchronizedAfterSuite + + NodeTypeReportBeforeEach + NodeTypeReportAfterEach + NodeTypeReportBeforeSuite + NodeTypeReportAfterSuite + + NodeTypeCleanupInvalid + NodeTypeCleanupAfterEach + NodeTypeCleanupAfterAll + NodeTypeCleanupAfterSuite +) + +var NodeTypesForContainerAndIt = NodeTypeContainer | NodeTypeIt +var NodeTypesForSuiteLevelNodes = NodeTypeBeforeSuite | NodeTypeSynchronizedBeforeSuite | NodeTypeAfterSuite | NodeTypeSynchronizedAfterSuite | NodeTypeReportBeforeSuite | NodeTypeReportAfterSuite | NodeTypeCleanupAfterSuite +var NodeTypesAllowedDuringCleanupInterrupt = NodeTypeAfterEach | NodeTypeJustAfterEach | NodeTypeAfterAll | NodeTypeAfterSuite | NodeTypeSynchronizedAfterSuite | NodeTypeCleanupAfterEach | NodeTypeCleanupAfterAll | NodeTypeCleanupAfterSuite +var NodeTypesAllowedDuringReportInterrupt = NodeTypeReportBeforeEach | NodeTypeReportAfterEach | NodeTypeReportBeforeSuite | NodeTypeReportAfterSuite + +var ntEnumSupport = NewEnumSupport(map[uint]string{ + uint(NodeTypeInvalid): "INVALID NODE TYPE", + uint(NodeTypeContainer): "Container", + uint(NodeTypeIt): "It", + uint(NodeTypeBeforeEach): "BeforeEach", + uint(NodeTypeJustBeforeEach): "JustBeforeEach", + uint(NodeTypeAfterEach): "AfterEach", + uint(NodeTypeJustAfterEach): "JustAfterEach", + uint(NodeTypeBeforeAll): "BeforeAll", + uint(NodeTypeAfterAll): "AfterAll", + uint(NodeTypeBeforeSuite): "BeforeSuite", + uint(NodeTypeSynchronizedBeforeSuite): "SynchronizedBeforeSuite", + uint(NodeTypeAfterSuite): "AfterSuite", + uint(NodeTypeSynchronizedAfterSuite): "SynchronizedAfterSuite", + uint(NodeTypeReportBeforeEach): "ReportBeforeEach", + uint(NodeTypeReportAfterEach): "ReportAfterEach", + uint(NodeTypeReportBeforeSuite): "ReportBeforeSuite", + uint(NodeTypeReportAfterSuite): "ReportAfterSuite", + uint(NodeTypeCleanupInvalid): "DeferCleanup", + uint(NodeTypeCleanupAfterEach): "DeferCleanup (Each)", + uint(NodeTypeCleanupAfterAll): "DeferCleanup (All)", + uint(NodeTypeCleanupAfterSuite): "DeferCleanup (Suite)", +}) + +func (nt NodeType) String() string { + return ntEnumSupport.String(uint(nt)) +} +func (nt *NodeType) UnmarshalJSON(b []byte) error { + out, err := ntEnumSupport.UnmarshJSON(b) + *nt = NodeType(out) + return err +} +func (nt NodeType) MarshalJSON() ([]byte, error) { + return ntEnumSupport.MarshJSON(uint(nt)) +} + +func (nt NodeType) Is(nodeTypes NodeType) bool { + return nt&nodeTypes != 0 +} + +/* +SpecEvent captures a vareity of events that can occur when specs run. See SpecEventType for the list of available events. +*/ +type SpecEvent struct { + SpecEventType SpecEventType + + CodeLocation CodeLocation + TimelineLocation TimelineLocation + + Message string `json:",omitempty"` + Duration time.Duration `json:",omitempty"` + NodeType NodeType `json:",omitempty"` + Attempt int `json:",omitempty"` +} + +func (se SpecEvent) GetTimelineLocation() TimelineLocation { + return se.TimelineLocation +} + +func (se SpecEvent) IsOnlyVisibleAtVeryVerbose() bool { + return se.SpecEventType.Is(SpecEventByEnd | SpecEventNodeStart | SpecEventNodeEnd) +} + +func (se SpecEvent) GomegaString() string { + out := &strings.Builder{} + out.WriteString("[" + se.SpecEventType.String() + " SpecEvent] ") + if se.Message != "" { + out.WriteString("Message=") + out.WriteString(`"` + se.Message + `",`) + } + if se.Duration != 0 { + out.WriteString("Duration=" + se.Duration.String() + ",") + } + if se.NodeType != NodeTypeInvalid { + out.WriteString("NodeType=" + se.NodeType.String() + ",") + } + if se.Attempt != 0 { + out.WriteString(fmt.Sprintf("Attempt=%d", se.Attempt) + ",") + } + out.WriteString("CL=" + se.CodeLocation.String() + ",") + out.WriteString(fmt.Sprintf("TL.Offset=%d", se.TimelineLocation.Offset)) + + return out.String() +} + +type SpecEvents []SpecEvent + +func (se SpecEvents) WithType(seType SpecEventType) SpecEvents { + out := SpecEvents{} + for _, event := range se { + if event.SpecEventType.Is(seType) { + out = append(out, event) + } + } + return out +} + +type SpecEventType uint + +const ( + SpecEventInvalid SpecEventType = 0 + + SpecEventByStart SpecEventType = 1 << iota + SpecEventByEnd + SpecEventNodeStart + SpecEventNodeEnd + SpecEventSpecRepeat + SpecEventSpecRetry +) + +var seEnumSupport = NewEnumSupport(map[uint]string{ + uint(SpecEventInvalid): "INVALID SPEC EVENT", + uint(SpecEventByStart): "By", + uint(SpecEventByEnd): "By (End)", + uint(SpecEventNodeStart): "Node", + uint(SpecEventNodeEnd): "Node (End)", + uint(SpecEventSpecRepeat): "Repeat", + uint(SpecEventSpecRetry): "Retry", +}) + +func (se SpecEventType) String() string { + return seEnumSupport.String(uint(se)) +} +func (se *SpecEventType) UnmarshalJSON(b []byte) error { + out, err := seEnumSupport.UnmarshJSON(b) + *se = SpecEventType(out) + return err +} +func (se SpecEventType) MarshalJSON() ([]byte, error) { + return seEnumSupport.MarshJSON(uint(se)) +} + +func (se SpecEventType) Is(specEventTypes SpecEventType) bool { + return se&specEventTypes != 0 +} diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go new file mode 100644 index 000000000..0b51c0b56 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -0,0 +1,3 @@ +package types + +const VERSION = "2.22.0" diff --git a/vendor/github.com/onsi/gomega/.gitignore b/vendor/github.com/onsi/gomega/.gitignore new file mode 100644 index 000000000..425d0a509 --- /dev/null +++ b/vendor/github.com/onsi/gomega/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +*.test +. +.idea +gomega.iml +TODO +.vscode \ No newline at end of file diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md new file mode 100644 index 000000000..79c3f6199 --- /dev/null +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -0,0 +1,786 @@ +## 1.36.1 + +### Fixes +- Fix https://github.com/onsi/gomega/issues/803 [1c6c112] +- resolves onsi/gomega#696: make HaveField great on pointer receivers given only a non-addressable value [4feb9d7] + +## 1.36.0 + +### Features +- new: make collection-related matchers Go 1.23 iterator aware [4c964c6] + +### Maintenance +- Replace min/max helpers with built-in min/max [ece6872] +- Fix some typos in docs [8e924d7] + +## 1.35.1 + +### Fixes +- Export EnforceDefaultTimeoutsWhenUsingContexts and DisableDefaultTimeoutsWhenUsingContext [ca36da1] + +## 1.35.0 + +### Features + +- You can now call `EnforceDefaultTimeoutsWhenUsingContexts()` to have `Eventually` honor the default timeout when passed a context. (prior to this you had to expclility add a timeout) [e4c4265] +- You can call `StopTrying(message).Successfully()` to abort a `Consistently` early without failure [eeca931] + +### Fixes + +- Stop memoizing the result of `HaveField` to avoid unexpected errors when used with async assertions. [3bdbc4e] + +### Maintenance + +- Bump all dependencies [a05a416] + +## 1.34.2 + +Require Go 1.22+ + +### Maintenance +- bump ginkgo as well [c59c6dc] +- bump to go 1.22 - remove x/exp dependency [8158b99] + +## 1.34.1 + +### Maintenance +- Use slices from exp/slices to keep golang 1.20 compat [5e71dcd] + +## 1.34.0 + +### Features +- Add RoundTripper method to ghttp.Server [c549e0d] + +### Fixes +- fix incorrect handling of nil slices in HaveExactElements (fixes #771) [878940c] +- issue_765 - fixed bug in Hopcroft-Karp algorithm [ebadb67] + +### Maintenance +- bump ginkgo [8af2ece] +- Fix typo in docs [123a071] +- Bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.17.3 (#756) [0e69083] +- Bump google.golang.org/protobuf from 1.33.0 to 1.34.1 (#755) [2675796] +- Bump golang.org/x/net from 0.24.0 to 0.25.0 (#754) [4160c0f] +- Bump github-pages from 230 to 231 in /docs (#748) [892c303] + +## 1.33.1 + +### Fixes +- fix confusing eventually docs [3a66379] + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.2 [e9bc35a] + +## 1.33.0 + +### Features + +`Receive` not accepts `Receive(, MATCHER>)`, allowing you to pick out a specific value on the channel that satisfies the provided matcher and is stored in the provided pointer. + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.15.0 to 2.17.1 (#745) [9999deb] +- Bump github-pages from 229 to 230 in /docs (#735) [cb5ff21] +- Bump golang.org/x/net from 0.20.0 to 0.23.0 (#746) [bac6596] + +## 1.32.0 + +### Maintenance +- Migrate github.com/golang/protobuf to google.golang.org/protobuf [436a197] + + This release drops the deprecated github.com/golang/protobuf and adopts google.golang.org/protobuf. Care was taken to ensure the release is backwards compatible (thanks @jbduncan !). Please open an issue if you run into one. + +- chore: test with Go 1.22 (#733) [32ef35e] +- Bump golang.org/x/net from 0.19.0 to 0.20.0 (#717) [a0d0387] +- Bump github-pages and jekyll-feed in /docs (#732) [b71e477] +- docs: fix typo and broken anchor link to gstruct [f460154] +- docs: fix HaveEach matcher signature [a2862e4] + +## 1.31.1 + +### Fixes +- Inverted arguments order of FailureMessage of BeComparableToMatcher [e0dd999] +- Update test in case keeping msg is desired [ad1a367] + +### Maintenance +- Show how to import the format sub package [24e958d] +- tidy up go.sum [26661b8] +- bump dependencies [bde8f7a] + +## 1.31.0 + +### Features +- Async assertions include context cancellation cause if present [121c37f] + +### Maintenance +- Bump minimum go version [dee1e3c] +- docs: fix typo in example usage "occured" -> "occurred" [49005fe] +- Bump actions/setup-go from 4 to 5 (#714) [f1c8757] +- Bump github/codeql-action from 2 to 3 (#715) [9836e76] +- Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.2 (#713) [54726f0] +- Bump golang.org/x/net from 0.17.0 to 0.19.0 (#711) [df97ecc] +- docs: fix `HaveExactElement` typo (#712) [a672c86] + +## 1.30.0 + +### Features +- BeTrueBecause and BeFalseBecause allow for better failure messages [4da4c7f] + +### Maintenance +- Bump actions/checkout from 3 to 4 (#694) [6ca6e97] +- doc: fix type on gleak go doc [f1b8343] + +## 1.29.0 + +### Features +- MatchError can now take an optional func(error) bool + description [2b39142] + +## 1.28.1 + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.12.0 to 2.13.0 [635d196] +- Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 [14f8859] +- Bump golang.org/x/net from 0.14.0 to 0.17.0 [d8a6508] +- #703 doc(matchers): HaveEach() doc comment updated [2705bdb] +- Minor typos (#699) [375648c] + +## 1.28.0 + +### Features +- Add VerifyHost handler to ghttp (#698) [0b03b36] + +### Fixes +- Read Body for Newer Responses in HaveHTTPBodyMatcher (#686) [18d6673] + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.12.0 (#693) [55a33f3] +- Typo in matchers.go (#691) [de68e8f] +- Bump commonmarker from 0.23.9 to 0.23.10 in /docs (#690) [ab17f5e] +- chore: update test matrix for Go 1.21 (#689) [5069017] +- Bump golang.org/x/net from 0.12.0 to 0.14.0 (#688) [babe25f] + +## 1.27.10 + +### Fixes +- fix: go 1.21 adding goroutine ID to creator+location (#685) [bdc7803] + +## 1.27.9 + +### Fixes +- Prevent nil-dereference in format.Object for boxed nil error (#681) [3b31fc3] + +### Maintenance +- Bump golang.org/x/net from 0.11.0 to 0.12.0 (#679) [360849b] +- chore: use String() instead of fmt.Sprintf (#678) [86f3659] +- Bump golang.org/x/net from 0.10.0 to 0.11.0 (#674) [642ead0] +- chore: unnecessary use of fmt.Sprintf (#677) [ceb9ca6] +- Bump github.com/onsi/ginkgo/v2 from 2.10.0 to 2.11.0 (#675) [a2087d8] +- docs: fix ContainSubstring references (#673) [fc9a89f] +- Bump github.com/onsi/ginkgo/v2 from 2.9.7 to 2.10.0 (#671) [9076019] + +## 1.27.8 + +### Fixes +- HaveExactElement should not call FailureMessage if a submatcher returned an error [096f392] + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.9.5 to 2.9.7 (#669) [8884bee] + +## 1.27.7 + +### Fixes +- fix: gcustom.MakeMatcher accepts nil as actual value (#666) [57054d5] + +### Maintenance +- update gitignore [05c1bc6] +- Bump github.com/onsi/ginkgo/v2 from 2.9.4 to 2.9.5 (#663) [7cadcf6] +- Bump golang.org/x/net from 0.9.0 to 0.10.0 (#662) [b524839] +- Bump github.com/onsi/ginkgo/v2 from 2.9.2 to 2.9.4 (#661) [5f44694] +- Bump commonmarker from 0.23.8 to 0.23.9 in /docs (#657) [05dc99a] +- Bump nokogiri from 1.14.1 to 1.14.3 in /docs (#658) [3a033d1] +- Replace deprecated NewGomegaWithT with NewWithT (#659) [a19238f] +- Bump golang.org/x/net from 0.8.0 to 0.9.0 (#656) [29ed041] +- Bump actions/setup-go from 3 to 4 (#651) [11b2080] + +## 1.27.6 + +### Fixes +- Allow collections matchers to work correctly when expected has nil elements [60e7cf3] + +### Maintenance +- updates MatchError godoc comment to also accept a Gomega matcher (#654) [67b869d] + +## 1.27.5 + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.9.1 to 2.9.2 (#653) [a215021] +- Bump github.com/go-task/slim-sprig (#652) [a26fed8] + +## 1.27.4 + +### Fixes +- improve error formatting and remove duplication of error message in Eventually/Consistently [854f075] + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.9.0 to 2.9.1 (#650) [ccebd9b] + +## 1.27.3 + +### Fixes +- format.Object now always includes err.Error() when passed an error [86d97ef] +- Fix HaveExactElements to work inside ContainElement or other collection matchers (#648) [636757e] + +### Maintenance +- Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 (#649) [cc16689] +- Bump github.com/onsi/ginkgo/v2 from 2.8.4 to 2.9.0 (#646) [e783366] + +## 1.27.2 + +### Fixes +- improve poll progress message when polling a consistently that has been passing [28a319b] + +### Maintenance +- bump ginkgo +- remove tools.go hack as Ginkgo 2.8.2 automatically pulls in the cli dependencies [81443b3] + +## 1.27.1 + +### Maintenance + +- Bump golang.org/x/net from 0.6.0 to 0.7.0 (#640) [bc686cd] + +## 1.27.0 + +### Features +- Add HaveExactElements matcher (#634) [9d50783] +- update Gomega docs to discuss GinkgoHelper() [be32774] + +### Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.8.0 to 2.8.1 (#639) [296a68b] +- Bump golang.org/x/net from 0.5.0 to 0.6.0 (#638) [c2b098b] +- Bump github-pages from 227 to 228 in /docs (#636) [a9069ab] +- test: update matrix for Go 1.20 (#635) [6bd25c8] +- Bump github.com/onsi/ginkgo/v2 from 2.7.0 to 2.8.0 (#631) [5445f8b] +- Bump webrick from 1.7.0 to 1.8.1 in /docs (#630) [03e93bb] +- codeql: add ruby language (#626) [63c7d21] +- dependabot: add bundler package-ecosystem for docs (#625) [d92f963] + +## 1.26.0 + +### Features +- When a polled function returns an error, keep track of the actual and report on the matcher state of the last non-errored actual [21f3090] +- improve eventually failure message output [c530fb3] + +### Fixes +- fix several documentation spelling issues [e2eff1f] + + +## 1.25.0 + +### Features +- add `MustPassRepeatedly(int)` to asyncAssertion (#619) [4509f72] +- compare unwrapped errors using DeepEqual (#617) [aaeaa5d] + +### Maintenance +- Bump golang.org/x/net from 0.4.0 to 0.5.0 (#614) [c7cfea4] +- Bump github.com/onsi/ginkgo/v2 from 2.6.1 to 2.7.0 (#615) [71b8adb] +- Docs: Fix typo "MUltiple" -> "Multiple" (#616) [9351dda] +- clean up go.sum [cd1dc1d] + +## 1.24.2 + +### Fixes +- Correctly handle assertion failure panics for eventually/consistnetly "g Gomega"s in a goroutine [78f1660] +- docs:Fix typo "you an" -> "you can" (#607) [3187c1f] +- fixes issue #600 (#606) [808d192] + +### Maintenance +- Bump golang.org/x/net from 0.2.0 to 0.4.0 (#611) [6ebc0bf] +- Bump nokogiri from 1.13.9 to 1.13.10 in /docs (#612) [258cfc8] +- Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#609) [e6c3eb9] + +## 1.24.1 + +### Fixes +- maintain backward compatibility for Eventually and Consisntetly's signatures [4c7df5e] +- fix small typo (#601) [ea0ebe6] + +### Maintenance +- Bump golang.org/x/net from 0.1.0 to 0.2.0 (#603) [1ba8372] +- Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0 (#602) [f9426cb] +- fix label-filter in test.yml [d795db6] +- stop running flakey tests and rely on external network dependencies in CI [7133290] + +## 1.24.0 + +### Features + +Introducting [gcustom](https://onsi.github.io/gomega/#gcustom-a-convenient-mechanism-for-buildling-custom-matchers) - a convenient mechanism for building custom matchers. + +This is an RC release for `gcustom`. The external API may be tweaked in response to feedback however it is expected to remain mostly stable. + +### Maintenance + +- Update BeComparableTo documentation [756eaa0] + +## 1.23.0 + +### Features +- Custom formatting on a per-type basis can be provided using `format.RegisterCustomFormatter()` -- see the docs [here](https://onsi.github.io/gomega/#adjusting-output) + +- Substantial improvement have been made to `StopTrying()`: + - Users can now use `StopTrying().Wrap(err)` to wrap errors and `StopTrying().Attach(description, object)` to attach arbitrary objects to the `StopTrying()` error + - `StopTrying()` is now always interpreted as a failure. If you are an early adopter of `StopTrying()` you may need to change your code as the prior version would match against the returned value even if `StopTrying()` was returned. Going forward the `StopTrying()` api should remain stable. + - `StopTrying()` and `StopTrying().Now()` can both be used in matchers - not just polled functions. + +- `TryAgainAfter(duration)` is used like `StopTrying()` but instructs `Eventually` and `Consistently` that the poll should be tried again after the specified duration. This allows you to dynamically adjust the polling duration. + +- `ctx` can now be passed-in as the first argument to `Eventually` and `Consistently`. + +## Maintenance + +- Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (#597) [afed901] +- Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#599) [7c691b3] +- Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#587) [ff22665] + +## 1.22.1 + +## Fixes +- When passed a context and no explicit timeout, Eventually will only timeout when the context is cancelled [e5105cf] +- Allow StopTrying() to be wrapped [bf3cba9] + +## Maintenance +- bump to ginkgo v2.3.0 [c5d5c39] + +## 1.22.0 + +### Features + +Several improvements have been made to `Eventually` and `Consistently` in this and the most recent releases: + +- Eventually and Consistently can take a context.Context [65c01bc] + This enables integration with Ginkgo 2.3.0's interruptible nodes and node timeouts. +- Eventually and Consistently that are passed a SpecContext can provide reports when an interrupt occurs [0d063c9] +- Eventually/Consistently will forward an attached context to functions that ask for one [e2091c5] +- Eventually/Consistently supports passing arguments to functions via WithArguments() [a2dc7c3] +- Eventually and Consistently can now be stopped early with StopTrying(message) and StopTrying(message).Now() [52976bb] + +These improvements are all documented in [Gomega's docs](https://onsi.github.io/gomega/#making-asynchronous-assertions) + +## Fixes + +## Maintenance + +## 1.21.1 + +### Features +- Eventually and Consistently that are passed a SpecContext can provide reports when an interrupt occurs [0d063c9] + +## 1.21.0 + +### Features +- Eventually and Consistently can take a context.Context [65c01bc] + This enables integration with Ginkgo 2.3.0's interruptible nodes and node timeouts. +- Introduces Eventually.Within.ProbeEvery with tests and documentation (#591) [f633800] +- New BeKeyOf matcher with documentation and unit tests (#590) [fb586b3] + +## Fixes +- Cover the entire gmeasure suite with leak detection [8c54344] +- Fix gmeasure leak [119d4ce] +- Ignore new Ginkgo ProgressSignal goroutine in gleak [ba548e2] + +## Maintenance + +- Fixes crashes on newer Ruby 3 installations by upgrading github-pages gem dependency (#596) [12469a0] + + +## 1.20.2 + +## Fixes +- label specs that rely on remote access; bump timeout on short-circuit test to make it less flaky [35eeadf] +- gexec: allow more headroom for SIGABRT-related unit tests (#581) [5b78f40] +- Enable reading from a closed gbytes.Buffer (#575) [061fd26] + +## Maintenance +- Bump github.com/onsi/ginkgo/v2 from 2.1.5 to 2.1.6 (#583) [55d895b] +- Bump github.com/onsi/ginkgo/v2 from 2.1.4 to 2.1.5 (#582) [346de7c] + +## 1.20.1 + +## Fixes +- fix false positive gleaks when using ginkgo -p (#577) [cb46517] +- Fix typos in gomega_dsl.go (#569) [5f71ed2] +- don't panic on Eventually(nil), fixing #555 (#567) [9d1186f] +- vet optional description args in assertions, fixing #560 (#566) [8e37808] + +## Maintenance +- test: add new Go 1.19 to test matrix (#571) [40d7efe] +- Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#564) [5f26371] + +## 1.20.0 + +## Features +- New [`gleak`](https://onsi.github.io/gomega/#codegleakcode-finding-leaked-goroutines) experimental goroutine leak detection package! (#538) [85ba7bc] +- New `BeComparableTo` matcher(#546) that uses `gocmp` to make comparisons [e77ea75] +- New `HaveExistingField` matcher (#553) [fd130e1] +- Document how to wrap Gomega (#539) [56714a4] + +## Fixes +- Support pointer receivers in HaveField; fixes #543 (#544) [8dab36e] + +## Maintenance +- Bump various dependencies: + - Upgrade to yaml.v3 (#556) [f5a83b1] + - Bump github/codeql-action from 1 to 2 (#549) [52f5adf] + - Bump github.com/google/go-cmp from 0.5.7 to 0.5.8 (#551) [5f3942d] + - Bump nokogiri from 1.13.4 to 1.13.6 in /docs (#554) [eb4b4c2] + - Use latest ginkgo (#535) [1c29028] + - Bump nokogiri from 1.13.3 to 1.13.4 in /docs (#541) [1ce84d5] + - Bump actions/setup-go from 2 to 3 (#540) [755485e] + - Bump nokogiri from 1.12.5 to 1.13.3 in /docs (#522) [4fbb0dc] + - Bump actions/checkout from 2 to 3 (#526) [ac49202] + +## 1.19.0 + +## Features +- New [`HaveEach`](https://onsi.github.io/gomega/#haveeachelement-interface) matcher to ensure that each and every element in an `array`, `slice`, or `map` satisfies the passed in matcher. (#523) [9fc2ae2] (#524) [c8ba582] +- Users can now wrap the `Gomega` interface to implement custom behavior on each assertion. (#521) [1f2e714] +- [`ContainElement`](https://onsi.github.io/gomega/#containelementelement-interface) now accepts an additional pointer argument. Elements that satisfy the matcher are stored in the pointer enabling developers to easily add subsequent, more detailed, assertions against the matching element. (#527) [1a4e27f] + +## Fixes +- update RELEASING instructions to match ginkgo [0917cde] +- Bump github.com/onsi/ginkgo/v2 from 2.0.0 to 2.1.3 (#519) [49ab4b0] +- Fix CVE-2021-38561 (#534) [f1b4456] +- Fix max number of samples in experiments on non-64-bit systems. (#528) [1c84497] +- Remove dependency on ginkgo v1.16.4 (#530) [4dea8d5] +- Fix for Go 1.18 (#532) [56d2a29] +- Document precendence of timeouts (#533) [b607941] + +## 1.18.1 + +## Fixes +- Add pointer support to HaveField matcher (#495) [79e41a3] + +## 1.18.0 + +## Features +- Docs now live on the master branch in the docs folder which will make for easier PRs. The docs also use Ginkgo 2.0's new docs html/css/js. [2570272] +- New HaveValue matcher can handle actuals that are either values (in which case they are passed on unscathed) or pointers (in which case they are indirected). [Docs here.](https://onsi.github.io/gomega/#working-with-values) (#485) [bdc087c] +- Gmeasure has been declared GA [360db9d] + +## Fixes +- Gomega now uses ioutil for Go 1.15 and lower (#492) - official support is only for the most recent two major versions of Go but this will unblock users who need to stay on older unsupported versions of Go. [c29c1c0] + +## Maintenace +- Remove Travis workflow (#491) [72e6040] +- Upgrade to Ginkgo 2.0.0 GA [f383637] +- chore: fix description of HaveField matcher (#487) [2b4b2c0] +- use tools.go to ensure Ginkgo cli dependencies are included [f58a52b] +- remove dockerfile and simplify github actions to match ginkgo's actions [3f8160d] + +## 1.17.0 + +### Features +- Add HaveField matcher [3a26311] +- add Error() assertions on the final error value of multi-return values (#480) [2f96943] +- separate out offsets and timeouts (#478) [18a4723] +- fix transformation error reporting (#479) [e001fab] +- allow transform functions to report errors (#472) [bf93408] + +### Fixes +Stop using deprecated ioutil package (#467) [07f405d] + +## 1.16.0 + +### Features +- feat: HaveHTTPStatus multiple expected values (#465) [aa69f1b] +- feat: HaveHTTPHeaderWithValue() matcher (#463) [dd83a96] +- feat: HaveHTTPBody matcher (#462) [504e1f2] +- feat: formatter for HTTP responses (#461) [e5b3157] + +## 1.15.0 + +### Fixes +The previous version (1.14.0) introduced a change to allow `Eventually` and `Consistently` to support functions that make assertions. This was accomplished by overriding the global fail handler when running the callbacks passed to `Eventually/Consistently` in order to capture any resulting errors. Issue #457 uncovered a flaw with this approach: when multiple `Eventually`s are running concurrently they race when overriding the singleton global fail handler. + +1.15.0 resolves this by requiring users who want to make assertions in `Eventually/Consistently` call backs to explicitly pass in a function that takes a `Gomega` as an argument. The passed-in `Gomega` instance can be used to make assertions. Any failures will cause `Eventually` to retry the callback. This cleaner interface avoids the issue of swapping out globals but comes at the cost of changing the contract introduced in v1.14.0. As such 1.15.0 introduces a breaking change with respect to 1.14.0 - however we expect that adoption of this feature in 1.14.0 remains limited. + +In addition, 1.15.0 cleans up some of Gomega's internals. Most users shouldn't notice any differences stemming from the refactoring that was made. + +## 1.14.0 + +### Features +- gmeasure.SamplingConfig now suppers a MinSamplingInterval [e94dbca] +- Eventually and Consistently support functions that make assertions [2f04e6e] + - Eventually and Consistently now allow their passed-in functions to make assertions. + These assertions must pass or the function is considered to have failed and is retried. + - Eventually and Consistently can now take functions with no return values. These implicitly return nil + if they contain no failed assertion. Otherwise they return an error wrapping the first assertion failure. This allows + these functions to be used with the Succeed() matcher. + - Introduce InterceptGomegaFailure - an analogue to InterceptGomegaFailures - that captures the first assertion failure + and halts execution in its passed-in callback. + +### Fixes +- Call Verify GHTTPWithGomega receiver funcs (#454) [496e6fd] +- Build a binary with an expected name (#446) [7356360] + +## 1.13.0 + +### Features +- gmeasure provides BETA support for benchmarking (#447) [8f2dfbf] +- Set consistently and eventually defaults on init (#443) [12eb778] + +## 1.12.0 + +### Features +- Add Satisfy() matcher (#437) [c548f31] +- tweak truncation message [3360b8c] +- Add format.GomegaStringer (#427) [cc80b6f] +- Add Clear() method to gbytes.Buffer [c3c0920] + +### Fixes +- Fix error message in BeNumericallyMatcher (#432) [09c074a] +- Bump github.com/onsi/ginkgo from 1.12.1 to 1.16.2 (#442) [e5f6ea0] +- Bump github.com/golang/protobuf from 1.4.3 to 1.5.2 (#431) [adae3bf] +- Bump golang.org/x/net (#441) [3275b35] + +## 1.11.0 + +### Features +- feature: add index to gstruct element func (#419) [334e00d] +- feat(gexec) Add CompileTest functions. Close #410 (#411) [47c613f] + +### Fixes +- Check more carefully for nils in WithTransform (#423) [3c60a15] +- fix: typo in Makefile [b82522a] +- Allow WithTransform function to accept a nil value (#422) [b75d2f2] +- fix: print value type for interface{} containers (#409) [f08e2dc] +- fix(BeElementOf): consistently flatten expected values [1fa9468] + +## 1.10.5 + +### Fixes +- fix: collections matchers should display type of expectation (#408) [6b4eb5a] +- fix(ContainElements): consistently flatten expected values [073b880] +- fix(ConsistOf): consistently flatten expected values [7266efe] + +## 1.10.4 + +### Fixes +- update golang net library to more recent version without vulnerability (#406) [817a8b9] +- Correct spelling: alloted -> allotted (#403) [0bae715] +- fix a panic in MessageWithDiff with long message (#402) [ea06b9b] + +## 1.10.3 + +### Fixes +- updates golang/x/net to fix vulnerability detected by snyk (#394) [c479356] + +## 1.10.2 + +### Fixes +- Add ExpectWithOffset, EventuallyWithOffset and ConsistentlyWithOffset to WithT (#391) [990941a] + +## 1.10.1 + +### Fixes +- Update dependencies (#389) [9f5eecd] + +## 1.10.0 + +### Features +- Add HaveHTTPStatusMatcher (#378) [f335c94] +- Changed matcher for content-type in VerifyJSONRepresenting (#377) [6024f5b] +- Make ghttp usable with x-unit style tests (#376) [c0be499] +- Implement PanicWith matcher (#381) [f8032b4] + +## 1.9.0 + +### Features +- Add ContainElements matcher (#370) [2f57380] +- Output missing and extra elements in ConsistOf failure message [a31eda7] +- Document method LargestMatching [7c5a280] + +## 1.8.1 + +### Fixes +- Fix unexpected MatchError() behaviour (#375) [8ae7b2f] + +## 1.8.0 + +### Features +- Allow optional description to be lazily evaluated function (#364) [bf64010] +- Support wrapped errors (#359) [0a981cb] + +## 1.7.1 + +### Fixes +- Bump go-yaml version to cover fixed ddos heuristic (#362) [95e431e] + +## 1.7.0 + +### Features +- export format property variables (#347) [642e5ba] + +### Fixes +- minor fix in the documentation of ExpectWithOffset (#358) [beea727] + +## 1.6.0 + +### Features + +- Display special chars on error [41e1b26] +- Add BeElementOf matcher [6a48b48] + +### Fixes + +- Remove duplication in XML matcher tests [cc1a6cb] +- Remove unnecessary conversions (#357) [7bf756a] +- Fixed import order (#353) [2e3b965] +- Added missing error handling in test (#355) [c98d3eb] +- Simplify code (#356) [0001ed9] +- Simplify code (#354) [0d9100e] +- Fixed typos (#352) [3f647c4] +- Add failure message tests to BeElementOf matcher [efe19c3] +- Update go-testcov untested sections [37ee382] +- Mark all uncovered files so go-testcov ./... works [53b150e] +- Reenable gotip in travis [5c249dc] +- Fix the typo of comment (#345) [f0e010e] +- Optimize contain_element_matcher [abeb93d] + + +## 1.5.0 + +### Features + +- Added MatchKeys matchers [8b909fc] + +### Fixes and Minor Improvements + +- Add type aliases to remove stuttering [03b0461] +- Don't run session_test.go on windows (#324) [5533ce8] + +## 1.4.3 + +### Fixes: + +- ensure file name and line numbers are correctly reported for XUnit [6fff58f] +- Fixed matcher for content-type (#305) [69d9b43] + +## 1.4.2 + +### Fixes: + +- Add go.mod and go.sum files to define the gomega go module [f3de367, a085d30] +- Work around go vet issue with Go v1.11 (#300) [40dd6ad] +- Better output when using with go XUnit-style tests, fixes #255 (#297) [29a4b97] +- Fix MatchJSON fail to parse json.RawMessage (#298) [ae19f1b] +- show threshold in failure message of BeNumericallyMatcher (#293) [4bbecc8] + +## 1.4.1 + +### Fixes: + +- Update documentation formatting and examples (#289) [9be8410] +- allow 'Receive' matcher to be used with concrete types (#286) [41673fd] +- Fix data race in ghttp server (#283) [7ac6b01] +- Travis badge should only show master [cc102ab] + +## 1.4.0 + +### Features +- Make string pretty diff user configurable (#273) [eb112ce, 649b44d] + +### Fixes +- Use httputil.DumpRequest to pretty-print unhandled requests (#278) [a4ff0fc, b7d1a52] +- fix typo floa32 > float32 (#272) [041ae3b, 6e33911] +- Fix link to documentation on adding your own matchers (#270) [bb2c830, fcebc62] +- Use setters and getters to avoid race condition (#262) [13057c3, a9c79f1] +- Avoid sending a signal if the process is not alive (#259) [b8043e5, 4fc1762] +- Improve message from AssignableToTypeOf when expected value is nil (#281) [9c1fb20] + +## 1.3.0 + +Improvements: + +- The `Equal` matcher matches byte slices more performantly. +- Improved how `MatchError` matches error strings. +- `MatchXML` ignores the order of xml node attributes. +- Improve support for XUnit style golang tests. ([#254](https://github.com/onsi/gomega/issues/254)) + +Bug Fixes: + +- Diff generation now handles multi-byte sequences correctly. +- Multiple goroutines can now call `gexec.Build` concurrently. + +## 1.2.0 + +Improvements: + +- Added `BeSent` which attempts to send a value down a channel and fails if the attempt blocks. Can be paired with `Eventually` to safely send a value down a channel with a timeout. +- `Ω`, `Expect`, `Eventually`, and `Consistently` now immediately `panic` if there is no registered fail handler. This is always a mistake that can hide failing tests. +- `Receive()` no longer errors when passed a closed channel, it's perfectly fine to attempt to read from a closed channel so Ω(c).Should(Receive()) always fails and Ω(c).ShoudlNot(Receive()) always passes with a closed channel. +- Added `HavePrefix` and `HaveSuffix` matchers. +- `ghttp` can now handle concurrent requests. +- Added `Succeed` which allows one to write `Ω(MyFunction()).Should(Succeed())`. +- Improved `ghttp`'s behavior around failing assertions and panics: + - If a registered handler makes a failing assertion `ghttp` will return `500`. + - If a registered handler panics, `ghttp` will return `500` *and* fail the test. This is new behavior that may cause existing code to break. This code is almost certainly incorrect and creating a false positive. +- `ghttp` servers can take an `io.Writer`. `ghttp` will write a line to the writer when each request arrives. +- Added `WithTransform` matcher to allow munging input data before feeding into the relevant matcher +- Added boolean `And`, `Or`, and `Not` matchers to allow creating composite matchers +- Added `gbytes.TimeoutCloser`, `gbytes.TimeoutReader`, and `gbytes.TimeoutWriter` - these are convenience wrappers that timeout if the underlying Closer/Reader/Writer does not return within the alloted time. +- Added `gbytes.BufferReader` - this constructs a `gbytes.Buffer` that asynchronously reads the passed-in `io.Reader` into its buffer. + +Bug Fixes: +- gexec: `session.Wait` now uses `EventuallyWithOffset` to get the right line number in the failure. +- `ContainElement` no longer bails if a passed-in matcher errors. + +## 1.0 (8/2/2014) + +No changes. Dropping "beta" from the version number. + +## 1.0.0-beta (7/8/2014) +Breaking Changes: + +- Changed OmegaMatcher interface. Instead of having `Match` return failure messages, two new methods `FailureMessage` and `NegatedFailureMessage` are called instead. +- Moved and renamed OmegaFailHandler to types.GomegaFailHandler and OmegaMatcher to types.GomegaMatcher. Any references to OmegaMatcher in any custom matchers will need to be changed to point to types.GomegaMatcher + +New Test-Support Features: + +- `ghttp`: supports testing http clients + - Provides a flexible fake http server + - Provides a collection of chainable http handlers that perform assertions. +- `gbytes`: supports making ordered assertions against streams of data + - Provides a `gbytes.Buffer` + - Provides a `Say` matcher to perform ordered assertions against output data +- `gexec`: supports testing external processes + - Provides support for building Go binaries + - Wraps and starts `exec.Cmd` commands + - Makes it easy to assert against stdout and stderr + - Makes it easy to send signals and wait for processes to exit + - Provides an `Exit` matcher to assert against exit code. + +DSL Changes: + +- `Eventually` and `Consistently` can accept `time.Duration` interval and polling inputs. +- The default timeouts for `Eventually` and `Consistently` are now configurable. + +New Matchers: + +- `ConsistOf`: order-independent assertion against the elements of an array/slice or keys of a map. +- `BeTemporally`: like `BeNumerically` but for `time.Time` +- `HaveKeyWithValue`: asserts a map has a given key with the given value. + +Updated Matchers: + +- `Receive` matcher can take a matcher as an argument and passes only if the channel under test receives an objet that satisfies the passed-in matcher. +- Matchers that implement `MatchMayChangeInTheFuture(actual interface{}) bool` can inform `Eventually` and/or `Consistently` when a match has no chance of changing status in the future. For example, `Receive` returns `false` when a channel is closed. + +Misc: + +- Start using semantic versioning +- Start maintaining changelog + +Major refactor: + +- Pull out Gomega's internal to `internal` diff --git a/vendor/github.com/onsi/gomega/CONTRIBUTING.md b/vendor/github.com/onsi/gomega/CONTRIBUTING.md new file mode 100644 index 000000000..0d7a09928 --- /dev/null +++ b/vendor/github.com/onsi/gomega/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing to Gomega + +Your contributions to Gomega are essential for its long-term maintenance and improvement. To make a contribution: + +- Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! +- Ensure adequate test coverage: + - Make sure to add appropriate unit tests + - Please run all tests locally (`ginkgo -r -p`) and make sure they go green before submitting the PR + - Please run following linter locally `go vet ./...` and make sure output does not contain any warnings +- Update the documentation. In addition to standard `godoc` comments Gomega has extensive documentation on the `gh-pages` branch. If relevant, please submit a docs PR to that branch alongside your code PR. + +If you're a committer, check out RELEASING.md to learn how to cut a release. + +Thanks for supporting Gomega! diff --git a/vendor/github.com/onsi/gomega/LICENSE b/vendor/github.com/onsi/gomega/LICENSE new file mode 100644 index 000000000..9415ee72c --- /dev/null +++ b/vendor/github.com/onsi/gomega/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/onsi/gomega/README.md b/vendor/github.com/onsi/gomega/README.md new file mode 100644 index 000000000..d45a8c4e5 --- /dev/null +++ b/vendor/github.com/onsi/gomega/README.md @@ -0,0 +1,21 @@ +![Gomega: Ginkgo's Preferred Matcher Library](http://onsi.github.io/gomega/images/gomega.png) + +[![test](https://github.com/onsi/gomega/actions/workflows/test.yml/badge.svg)](https://github.com/onsi/gomega/actions/workflows/test.yml) + +Jump straight to the [docs](http://onsi.github.io/gomega/) to learn about Gomega, including a list of [all available matchers](http://onsi.github.io/gomega/#provided-matchers). + +If you have a question, comment, bug report, feature request, etc. please open a GitHub issue. + +## [Ginkgo](http://github.com/onsi/ginkgo): a BDD Testing Framework for Golang + +Learn more about Ginkgo [here](http://onsi.github.io/ginkgo/) + +## Community Matchers + +A collection of community matchers is available on the [wiki](https://github.com/onsi/gomega/wiki). + +## License + +Gomega is MIT-Licensed + +The `ConsistOf` matcher uses [goraph](https://github.com/amitkgupta/goraph) which is embedded in the source to simplify distribution. goraph has an MIT license. diff --git a/vendor/github.com/onsi/gomega/RELEASING.md b/vendor/github.com/onsi/gomega/RELEASING.md new file mode 100644 index 000000000..9973fff49 --- /dev/null +++ b/vendor/github.com/onsi/gomega/RELEASING.md @@ -0,0 +1,23 @@ +A Gomega release is a tagged sha and a GitHub release. To cut a release: + +1. Ensure CHANGELOG.md is up to date. + - Use + ```bash + LAST_VERSION=$(git tag --sort=version:refname | tail -n1) + CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION) + echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n### Fixes\n\n### Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md + ``` + to update the changelog + - Categorize the changes into + - Breaking Changes (requires a major version) + - New Features (minor version) + - Fixes (fix version) + - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact) +1. Update GOMEGA_VERSION in `gomega_dsl.go` +1. Commit, push, and release: + ``` + git commit -m "vM.m.p" + git push + gh release create "vM.m.p" + git fetch --tags origin master + ``` \ No newline at end of file diff --git a/vendor/github.com/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go new file mode 100644 index 000000000..6c1680638 --- /dev/null +++ b/vendor/github.com/onsi/gomega/format/format.go @@ -0,0 +1,506 @@ +/* +Gomega's format package pretty-prints objects. It explores input objects recursively and generates formatted, indented output with type information. +*/ + +// untested sections: 4 + +package format + +import ( + "context" + "fmt" + "reflect" + "strconv" + "strings" + "time" +) + +// Use MaxDepth to set the maximum recursion depth when printing deeply nested objects +var MaxDepth = uint(10) + +// MaxLength of the string representation of an object. +// If MaxLength is set to 0, the Object will not be truncated. +var MaxLength = 4000 + +/* +By default, all objects (even those that implement fmt.Stringer and fmt.GoStringer) are recursively inspected to generate output. + +Set UseStringerRepresentation = true to use GoString (for fmt.GoStringers) or String (for fmt.Stringer) instead. + +Note that GoString and String don't always have all the information you need to understand why a test failed! +*/ +var UseStringerRepresentation = false + +/* +Print the content of context objects. By default it will be suppressed. + +Set PrintContextObjects = true to enable printing of the context internals. +*/ +var PrintContextObjects = false + +// TruncatedDiff choose if we should display a truncated pretty diff or not +var TruncatedDiff = true + +// TruncateThreshold (default 50) specifies the maximum length string to print in string comparison assertion error +// messages. +var TruncateThreshold uint = 50 + +// CharactersAroundMismatchToInclude (default 5) specifies how many contextual characters should be printed before and +// after the first diff location in a truncated string assertion error message. +var CharactersAroundMismatchToInclude uint = 5 + +var contextType = reflect.TypeOf((*context.Context)(nil)).Elem() +var timeType = reflect.TypeOf(time.Time{}) + +// The default indentation string emitted by the format package +var Indent = " " + +var longFormThreshold = 20 + +// GomegaStringer allows for custom formating of objects for gomega. +type GomegaStringer interface { + // GomegaString will be used to custom format an object. + // It does not follow UseStringerRepresentation value and will always be called regardless. + // It also ignores the MaxLength value. + GomegaString() string +} + +/* +CustomFormatters can be registered with Gomega via RegisterCustomFormatter() +Any value to be rendered by Gomega is passed to each registered CustomFormatters. +The CustomFormatter signals that it will handle formatting the value by returning (formatted-string, true) +If the CustomFormatter does not want to handle the object it should return ("", false) + +Strings returned by CustomFormatters are not truncated +*/ +type CustomFormatter func(value interface{}) (string, bool) +type CustomFormatterKey uint + +var customFormatterKey CustomFormatterKey = 1 + +type customFormatterKeyPair struct { + CustomFormatter + CustomFormatterKey +} + +/* +RegisterCustomFormatter registers a CustomFormatter and returns a CustomFormatterKey + +You can call UnregisterCustomFormatter with the returned key to unregister the associated CustomFormatter +*/ +func RegisterCustomFormatter(customFormatter CustomFormatter) CustomFormatterKey { + key := customFormatterKey + customFormatterKey += 1 + customFormatters = append(customFormatters, customFormatterKeyPair{customFormatter, key}) + return key +} + +/* +UnregisterCustomFormatter unregisters a previously registered CustomFormatter. You should pass in the key returned by RegisterCustomFormatter +*/ +func UnregisterCustomFormatter(key CustomFormatterKey) { + formatters := []customFormatterKeyPair{} + for _, f := range customFormatters { + if f.CustomFormatterKey == key { + continue + } + formatters = append(formatters, f) + } + customFormatters = formatters +} + +var customFormatters = []customFormatterKeyPair{} + +/* +Generates a formatted matcher success/failure message of the form: + + Expected + + + + +If expected is omitted, then the message looks like: + + Expected + + +*/ +func Message(actual interface{}, message string, expected ...interface{}) string { + if len(expected) == 0 { + return fmt.Sprintf("Expected\n%s\n%s", Object(actual, 1), message) + } + return fmt.Sprintf("Expected\n%s\n%s\n%s", Object(actual, 1), message, Object(expected[0], 1)) +} + +/* + +Generates a nicely formatted matcher success / failure message + +Much like Message(...), but it attempts to pretty print diffs in strings + +Expected + : "...aaaaabaaaaa..." +to equal | + : "...aaaaazaaaaa..." + +*/ + +func MessageWithDiff(actual, message, expected string) string { + if TruncatedDiff && len(actual) >= int(TruncateThreshold) && len(expected) >= int(TruncateThreshold) { + diffPoint := findFirstMismatch(actual, expected) + formattedActual := truncateAndFormat(actual, diffPoint) + formattedExpected := truncateAndFormat(expected, diffPoint) + + spacesBeforeFormattedMismatch := findFirstMismatch(formattedActual, formattedExpected) + + tabLength := 4 + spaceFromMessageToActual := tabLength + len(": ") - len(message) + + paddingCount := spaceFromMessageToActual + spacesBeforeFormattedMismatch + if paddingCount < 0 { + return Message(formattedActual, message, formattedExpected) + } + + padding := strings.Repeat(" ", paddingCount) + "|" + return Message(formattedActual, message+padding, formattedExpected) + } + + actual = escapedWithGoSyntax(actual) + expected = escapedWithGoSyntax(expected) + + return Message(actual, message, expected) +} + +func escapedWithGoSyntax(str string) string { + withQuotes := fmt.Sprintf("%q", str) + return withQuotes[1 : len(withQuotes)-1] +} + +func truncateAndFormat(str string, index int) string { + leftPadding := `...` + rightPadding := `...` + + start := index - int(CharactersAroundMismatchToInclude) + if start < 0 { + start = 0 + leftPadding = "" + } + + // slice index must include the mis-matched character + lengthOfMismatchedCharacter := 1 + end := index + int(CharactersAroundMismatchToInclude) + lengthOfMismatchedCharacter + if end > len(str) { + end = len(str) + rightPadding = "" + + } + return fmt.Sprintf("\"%s\"", leftPadding+str[start:end]+rightPadding) +} + +func findFirstMismatch(a, b string) int { + aSlice := strings.Split(a, "") + bSlice := strings.Split(b, "") + + for index, str := range aSlice { + if index > len(bSlice)-1 { + return index + } + if str != bSlice[index] { + return index + } + } + + if len(b) > len(a) { + return len(a) + 1 + } + + return 0 +} + +const truncateHelpText = ` +Gomega truncated this representation as it exceeds 'format.MaxLength'. +Consider having the object provide a custom 'GomegaStringer' representation +or adjust the parameters in Gomega's 'format' package. + +Learn more here: https://onsi.github.io/gomega/#adjusting-output +` + +func truncateLongStrings(s string) string { + if MaxLength > 0 && len(s) > MaxLength { + var sb strings.Builder + for i, r := range s { + if i < MaxLength { + sb.WriteRune(r) + continue + } + break + } + + sb.WriteString("...\n") + sb.WriteString(truncateHelpText) + + return sb.String() + } + return s +} + +/* +Pretty prints the passed in object at the passed in indentation level. + +Object recurses into deeply nested objects emitting pretty-printed representations of their components. + +Modify format.MaxDepth to control how deep the recursion is allowed to go +Set format.UseStringerRepresentation to true to return object.GoString() or object.String() when available instead of +recursing into the object. + +Set PrintContextObjects to true to print the content of objects implementing context.Context +*/ +func Object(object interface{}, indentation uint) string { + indent := strings.Repeat(Indent, int(indentation)) + value := reflect.ValueOf(object) + commonRepresentation := "" + if err, ok := object.(error); ok && !isNilValue(value) { // isNilValue check needed here to avoid nil deref due to boxed nil + commonRepresentation += "\n" + IndentString(err.Error(), indentation) + "\n" + indent + } + return fmt.Sprintf("%s<%s>: %s%s", indent, formatType(value), commonRepresentation, formatValue(value, indentation)) +} + +/* +IndentString takes a string and indents each line by the specified amount. +*/ +func IndentString(s string, indentation uint) string { + return indentString(s, indentation, true) +} + +func indentString(s string, indentation uint, indentFirstLine bool) string { + result := &strings.Builder{} + components := strings.Split(s, "\n") + indent := strings.Repeat(Indent, int(indentation)) + for i, component := range components { + if i > 0 || indentFirstLine { + result.WriteString(indent) + } + result.WriteString(component) + if i < len(components)-1 { + result.WriteString("\n") + } + } + + return result.String() +} + +func formatType(v reflect.Value) string { + switch v.Kind() { + case reflect.Invalid: + return "nil" + case reflect.Chan: + return fmt.Sprintf("%s | len:%d, cap:%d", v.Type(), v.Len(), v.Cap()) + case reflect.Ptr: + return fmt.Sprintf("%s | 0x%x", v.Type(), v.Pointer()) + case reflect.Slice: + return fmt.Sprintf("%s | len:%d, cap:%d", v.Type(), v.Len(), v.Cap()) + case reflect.Map: + return fmt.Sprintf("%s | len:%d", v.Type(), v.Len()) + default: + return v.Type().String() + } +} + +func formatValue(value reflect.Value, indentation uint) string { + if indentation > MaxDepth { + return "..." + } + + if isNilValue(value) { + return "nil" + } + + if value.CanInterface() { + obj := value.Interface() + + // if a CustomFormatter handles this values, we'll go with that + for _, customFormatter := range customFormatters { + formatted, handled := customFormatter.CustomFormatter(obj) + // do not truncate a user-provided CustomFormatter() + if handled { + return indentString(formatted, indentation+1, false) + } + } + + // GomegaStringer will take precedence to other representations and disregards UseStringerRepresentation + if x, ok := obj.(GomegaStringer); ok { + // do not truncate a user-defined GomegaString() value + return indentString(x.GomegaString(), indentation+1, false) + } + + if UseStringerRepresentation { + switch x := obj.(type) { + case fmt.GoStringer: + return indentString(truncateLongStrings(x.GoString()), indentation+1, false) + case fmt.Stringer: + return indentString(truncateLongStrings(x.String()), indentation+1, false) + } + } + } + + if !PrintContextObjects { + if value.Type().Implements(contextType) && indentation > 1 { + return "" + } + } + + switch value.Kind() { + case reflect.Bool: + return fmt.Sprintf("%v", value.Bool()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return fmt.Sprintf("%v", value.Int()) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return fmt.Sprintf("%v", value.Uint()) + case reflect.Uintptr: + return fmt.Sprintf("0x%x", value.Uint()) + case reflect.Float32, reflect.Float64: + return fmt.Sprintf("%v", value.Float()) + case reflect.Complex64, reflect.Complex128: + return fmt.Sprintf("%v", value.Complex()) + case reflect.Chan: + return fmt.Sprintf("0x%x", value.Pointer()) + case reflect.Func: + return fmt.Sprintf("0x%x", value.Pointer()) + case reflect.Ptr: + return formatValue(value.Elem(), indentation) + case reflect.Slice: + return truncateLongStrings(formatSlice(value, indentation)) + case reflect.String: + return truncateLongStrings(formatString(value.String(), indentation)) + case reflect.Array: + return truncateLongStrings(formatSlice(value, indentation)) + case reflect.Map: + return truncateLongStrings(formatMap(value, indentation)) + case reflect.Struct: + if value.Type() == timeType && value.CanInterface() { + t, _ := value.Interface().(time.Time) + return t.Format(time.RFC3339Nano) + } + return truncateLongStrings(formatStruct(value, indentation)) + case reflect.Interface: + return formatInterface(value, indentation) + default: + if value.CanInterface() { + return truncateLongStrings(fmt.Sprintf("%#v", value.Interface())) + } + return truncateLongStrings(fmt.Sprintf("%#v", value)) + } +} + +func formatString(object interface{}, indentation uint) string { + if indentation == 1 { + s := fmt.Sprintf("%s", object) + components := strings.Split(s, "\n") + result := "" + for i, component := range components { + if i == 0 { + result += component + } else { + result += Indent + component + } + if i < len(components)-1 { + result += "\n" + } + } + + return result + } else { + return fmt.Sprintf("%q", object) + } +} + +func formatSlice(v reflect.Value, indentation uint) string { + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() == reflect.Uint8 && isPrintableString(string(v.Bytes())) { + return formatString(v.Bytes(), indentation) + } + + l := v.Len() + result := make([]string, l) + longest := 0 + for i := 0; i < l; i++ { + result[i] = formatValue(v.Index(i), indentation+1) + if len(result[i]) > longest { + longest = len(result[i]) + } + } + + if longest > longFormThreshold { + indenter := strings.Repeat(Indent, int(indentation)) + return fmt.Sprintf("[\n%s%s,\n%s]", indenter+Indent, strings.Join(result, ",\n"+indenter+Indent), indenter) + } + return fmt.Sprintf("[%s]", strings.Join(result, ", ")) +} + +func formatMap(v reflect.Value, indentation uint) string { + l := v.Len() + result := make([]string, l) + + longest := 0 + for i, key := range v.MapKeys() { + value := v.MapIndex(key) + result[i] = fmt.Sprintf("%s: %s", formatValue(key, indentation+1), formatValue(value, indentation+1)) + if len(result[i]) > longest { + longest = len(result[i]) + } + } + + if longest > longFormThreshold { + indenter := strings.Repeat(Indent, int(indentation)) + return fmt.Sprintf("{\n%s%s,\n%s}", indenter+Indent, strings.Join(result, ",\n"+indenter+Indent), indenter) + } + return fmt.Sprintf("{%s}", strings.Join(result, ", ")) +} + +func formatStruct(v reflect.Value, indentation uint) string { + t := v.Type() + + l := v.NumField() + result := []string{} + longest := 0 + for i := 0; i < l; i++ { + structField := t.Field(i) + fieldEntry := v.Field(i) + representation := fmt.Sprintf("%s: %s", structField.Name, formatValue(fieldEntry, indentation+1)) + result = append(result, representation) + if len(representation) > longest { + longest = len(representation) + } + } + if longest > longFormThreshold { + indenter := strings.Repeat(Indent, int(indentation)) + return fmt.Sprintf("{\n%s%s,\n%s}", indenter+Indent, strings.Join(result, ",\n"+indenter+Indent), indenter) + } + return fmt.Sprintf("{%s}", strings.Join(result, ", ")) +} + +func formatInterface(v reflect.Value, indentation uint) string { + return fmt.Sprintf("<%s>%s", formatType(v.Elem()), formatValue(v.Elem(), indentation)) +} + +func isNilValue(a reflect.Value) bool { + switch a.Kind() { + case reflect.Invalid: + return true + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return a.IsNil() + } + + return false +} + +/* +Returns true when the string is entirely made of printable runes, false otherwise. +*/ +func isPrintableString(str string) bool { + for _, runeValue := range str { + if !strconv.IsPrint(runeValue) { + return false + } + } + return true +} diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go new file mode 100644 index 000000000..c6ac499f7 --- /dev/null +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -0,0 +1,559 @@ +/* +Gomega is the Ginkgo BDD-style testing framework's preferred matcher library. + +The godoc documentation describes Gomega's API. More comprehensive documentation (with examples!) is available at http://onsi.github.io/gomega/ + +Gomega on Github: http://github.com/onsi/gomega + +Learn more about Ginkgo online: http://onsi.github.io/ginkgo + +Ginkgo on Github: http://github.com/onsi/ginkgo + +Gomega is MIT-Licensed +*/ +package gomega + +import ( + "errors" + "fmt" + "time" + + "github.com/onsi/gomega/internal" + "github.com/onsi/gomega/types" +) + +const GOMEGA_VERSION = "1.36.1" + +const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. +If you're using Ginkgo then you probably forgot to put your assertion in an It(). +Alternatively, you may have forgotten to register a fail handler with RegisterFailHandler() or RegisterTestingT(). +Depending on your vendoring solution you may be inadvertently importing gomega and subpackages (e.g. ghhtp, gexec,...) from different locations. +` + +// Gomega describes the essential Gomega DSL. This interface allows libraries +// to abstract between the standard package-level function implementations +// and alternatives like *WithT. +// +// The types in the top-level DSL have gotten a bit messy due to earlier deprecations that avoid stuttering +// and due to an accidental use of a concrete type (*WithT) in an earlier release. +// +// As of 1.15 both the WithT and Ginkgo variants of Gomega are implemented by the same underlying object +// however one (the Ginkgo variant) is exported as an interface (types.Gomega) whereas the other (the withT variant) +// is shared as a concrete type (*WithT, which is aliased to *internal.Gomega). 1.15 did not clean this mess up to ensure +// that declarations of *WithT in existing code are not broken by the upgrade to 1.15. +type Gomega = types.Gomega + +// DefaultGomega supplies the standard package-level implementation +var Default = Gomega(internal.NewGomega(internal.FetchDefaultDurationBundle())) + +// NewGomega returns an instance of Gomega wired into the passed-in fail handler. +// You generally don't need to use this when using Ginkgo - RegisterFailHandler will wire up the global gomega +// However creating a NewGomega with a custom fail handler can be useful in contexts where you want to use Gomega's +// rich ecosystem of matchers without causing a test to fail. For example, to aggregate a series of potential failures +// or for use in a non-test setting. +func NewGomega(fail types.GomegaFailHandler) Gomega { + return internal.NewGomega(internalGomega(Default).DurationBundle).ConfigureWithFailHandler(fail) +} + +// WithT wraps a *testing.T and provides `Expect`, `Eventually`, and `Consistently` methods. This allows you to leverage +// Gomega's rich ecosystem of matchers in standard `testing` test suites. +// +// Use `NewWithT` to instantiate a `WithT` +// +// As of 1.15 both the WithT and Ginkgo variants of Gomega are implemented by the same underlying object +// however one (the Ginkgo variant) is exported as an interface (types.Gomega) whereas the other (the withT variant) +// is shared as a concrete type (*WithT, which is aliased to *internal.Gomega). 1.15 did not clean this mess up to ensure +// that declarations of *WithT in existing code are not broken by the upgrade to 1.15. +type WithT = internal.Gomega + +// GomegaWithT is deprecated in favor of gomega.WithT, which does not stutter. +type GomegaWithT = WithT + +// inner is an interface that allows users to provide a wrapper around Default. The wrapper +// must implement the inner interface and return either the original Default or the result of +// a call to NewGomega(). +type inner interface { + Inner() Gomega +} + +func internalGomega(g Gomega) *internal.Gomega { + if v, ok := g.(inner); ok { + return v.Inner().(*internal.Gomega) + } + return g.(*internal.Gomega) +} + +// NewWithT takes a *testing.T and returns a `gomega.WithT` allowing you to use `Expect`, `Eventually`, and `Consistently` along with +// Gomega's rich ecosystem of matchers in standard `testing` test suits. +// +// func TestFarmHasCow(t *testing.T) { +// g := gomega.NewWithT(t) +// +// f := farm.New([]string{"Cow", "Horse"}) +// g.Expect(f.HasCow()).To(BeTrue(), "Farm should have cow") +// } +func NewWithT(t types.GomegaTestingT) *WithT { + return internal.NewGomega(internalGomega(Default).DurationBundle).ConfigureWithT(t) +} + +// NewGomegaWithT is deprecated in favor of gomega.NewWithT, which does not stutter. +var NewGomegaWithT = NewWithT + +// RegisterFailHandler connects Ginkgo to Gomega. When a matcher fails +// the fail handler passed into RegisterFailHandler is called. +func RegisterFailHandler(fail types.GomegaFailHandler) { + internalGomega(Default).ConfigureWithFailHandler(fail) +} + +// RegisterFailHandlerWithT is deprecated and will be removed in a future release. +// users should use RegisterFailHandler, or RegisterTestingT +func RegisterFailHandlerWithT(_ types.GomegaTestingT, fail types.GomegaFailHandler) { + fmt.Println("RegisterFailHandlerWithT is deprecated. Please use RegisterFailHandler or RegisterTestingT instead.") + internalGomega(Default).ConfigureWithFailHandler(fail) +} + +// RegisterTestingT connects Gomega to Golang's XUnit style +// Testing.T tests. It is now deprecated and you should use NewWithT() instead to get a fresh instance of Gomega for each test. +func RegisterTestingT(t types.GomegaTestingT) { + internalGomega(Default).ConfigureWithT(t) +} + +// InterceptGomegaFailures runs a given callback and returns an array of +// failure messages generated by any Gomega assertions within the callback. +// Execution continues after the first failure allowing users to collect all failures +// in the callback. +// +// This is most useful when testing custom matchers, but can also be used to check +// on a value using a Gomega assertion without causing a test failure. +func InterceptGomegaFailures(f func()) []string { + originalHandler := internalGomega(Default).Fail + failures := []string{} + internalGomega(Default).Fail = func(message string, callerSkip ...int) { + failures = append(failures, message) + } + defer func() { + internalGomega(Default).Fail = originalHandler + }() + f() + return failures +} + +// InterceptGomegaFailure runs a given callback and returns the first +// failure message generated by any Gomega assertions within the callback, wrapped in an error. +// +// The callback ceases execution as soon as the first failed assertion occurs, however Gomega +// does not register a failure with the FailHandler registered via RegisterFailHandler - it is up +// to the user to decide what to do with the returned error +func InterceptGomegaFailure(f func()) (err error) { + originalHandler := internalGomega(Default).Fail + internalGomega(Default).Fail = func(message string, callerSkip ...int) { + err = errors.New(message) + panic("stop execution") + } + + defer func() { + internalGomega(Default).Fail = originalHandler + if e := recover(); e != nil { + if err == nil { + panic(e) + } + } + }() + + f() + return err +} + +func ensureDefaultGomegaIsConfigured() { + if !internalGomega(Default).IsConfigured() { + panic(nilGomegaPanic) + } +} + +// Ω wraps an actual value allowing assertions to be made on it: +// +// Ω("foo").Should(Equal("foo")) +// +// If Ω is passed more than one argument it will pass the *first* argument to the matcher. +// All subsequent arguments will be required to be nil/zero. +// +// This is convenient if you want to make an assertion on a method/function that returns +// a value and an error - a common patter in Go. +// +// For example, given a function with signature: +// +// func MyAmazingThing() (int, error) +// +// Then: +// +// Ω(MyAmazingThing()).Should(Equal(3)) +// +// Will succeed only if `MyAmazingThing()` returns `(3, nil)` +// +// Ω and Expect are identical +func Ω(actual interface{}, extra ...interface{}) Assertion { + ensureDefaultGomegaIsConfigured() + return Default.Ω(actual, extra...) +} + +// Expect wraps an actual value allowing assertions to be made on it: +// +// Expect("foo").To(Equal("foo")) +// +// If Expect is passed more than one argument it will pass the *first* argument to the matcher. +// All subsequent arguments will be required to be nil/zero. +// +// This is convenient if you want to make an assertion on a method/function that returns +// a value and an error - a common pattern in Go. +// +// For example, given a function with signature: +// +// func MyAmazingThing() (int, error) +// +// Then: +// +// Expect(MyAmazingThing()).Should(Equal(3)) +// +// Will succeed only if `MyAmazingThing()` returns `(3, nil)` +// +// Expect and Ω are identical +func Expect(actual interface{}, extra ...interface{}) Assertion { + ensureDefaultGomegaIsConfigured() + return Default.Expect(actual, extra...) +} + +// ExpectWithOffset wraps an actual value allowing assertions to be made on it: +// +// ExpectWithOffset(1, "foo").To(Equal("foo")) +// +// Unlike `Expect` and `Ω`, `ExpectWithOffset` takes an additional integer argument +// that is used to modify the call-stack offset when computing line numbers. It is +// the same as `Expect(...).WithOffset`. +// +// This is most useful in helper functions that make assertions. If you want Gomega's +// error message to refer to the calling line in the test (as opposed to the line in the helper function) +// set the first argument of `ExpectWithOffset` appropriately. +func ExpectWithOffset(offset int, actual interface{}, extra ...interface{}) Assertion { + ensureDefaultGomegaIsConfigured() + return Default.ExpectWithOffset(offset, actual, extra...) +} + +/* +Eventually enables making assertions on asynchronous behavior. + +Eventually checks that an assertion *eventually* passes. Eventually blocks when called and attempts an assertion periodically until it passes or a timeout occurs. Both the timeout and polling interval are configurable as optional arguments. +The first optional argument is the timeout (which defaults to 1s), the second is the polling interval (which defaults to 10ms). Both intervals can be specified as time.Duration, parsable duration strings or floats/integers (in which case they are interpreted as seconds). In addition an optional context.Context can be passed in - Eventually will keep trying until either the timeout expires or the context is cancelled, whichever comes first. + +Eventually works with any Gomega compatible matcher and supports making assertions against three categories of actual value: + +**Category 1: Making Eventually assertions on values** + +There are several examples of values that can change over time. These can be passed in to Eventually and will be passed to the matcher repeatedly until a match occurs. For example: + + c := make(chan bool) + go DoStuff(c) + Eventually(c, "50ms").Should(BeClosed()) + +will poll the channel repeatedly until it is closed. In this example `Eventually` will block until either the specified timeout of 50ms has elapsed or the channel is closed, whichever comes first. + +Several Gomega libraries allow you to use Eventually in this way. For example, the gomega/gexec package allows you to block until a *gexec.Session exits successfully via: + + Eventually(session).Should(gexec.Exit(0)) + +And the gomega/gbytes package allows you to monitor a streaming *gbytes.Buffer until a given string is seen: + + Eventually(buffer).Should(gbytes.Say("hello there")) + +In these examples, both `session` and `buffer` are designed to be thread-safe when polled by the `Exit` and `Say` matchers. This is not true in general of most raw values, so while it is tempting to do something like: + + // THIS IS NOT THREAD-SAFE + var s *string + go mutateStringEventually(s) + Eventually(s).Should(Equal("I've changed")) + +this will trigger Go's race detector as the goroutine polling via Eventually will race over the value of s with the goroutine mutating the string. For cases like this you can use channels or introduce your own locking around s by passing Eventually a function. + +**Category 2: Make Eventually assertions on functions** + +Eventually can be passed functions that **return at least one value**. When configured this way, Eventually will poll the function repeatedly and pass the first returned value to the matcher. + +For example: + + Eventually(func() int { + return client.FetchCount() + }).Should(BeNumerically(">=", 17)) + + will repeatedly poll client.FetchCount until the BeNumerically matcher is satisfied. (Note that this example could have been written as Eventually(client.FetchCount).Should(BeNumerically(">=", 17))) + +If multiple values are returned by the function, Eventually will pass the first value to the matcher and require that all others are zero-valued. This allows you to pass Eventually a function that returns a value and an error - a common pattern in Go. + +For example, consider a method that returns a value and an error: + + func FetchFromDB() (string, error) + +Then + + Eventually(FetchFromDB).Should(Equal("got it")) + +will pass only if and when the returned error is nil *and* the returned string satisfies the matcher. + +Eventually can also accept functions that take arguments, however you must provide those arguments using .WithArguments(). For example, consider a function that takes a user-id and makes a network request to fetch a full name: + + func FetchFullName(userId int) (string, error) + +You can poll this function like so: + + Eventually(FetchFullName).WithArguments(1138).Should(Equal("Wookie")) + +It is important to note that the function passed into Eventually is invoked *synchronously* when polled. Eventually does not (in fact, it cannot) kill the function if it takes longer to return than Eventually's configured timeout. A common practice here is to use a context. Here's an example that combines Ginkgo's spec timeout support with Eventually: + + It("fetches the correct count", func(ctx SpecContext) { + Eventually(ctx, func() int { + return client.FetchCount(ctx, "/users") + }).Should(BeNumerically(">=", 17)) + }, SpecTimeout(time.Second)) + +you an also use Eventually().WithContext(ctx) to pass in the context. Passed-in contexts play nicely with passed-in arguments as long as the context appears first. You can rewrite the above example as: + + It("fetches the correct count", func(ctx SpecContext) { + Eventually(client.FetchCount).WithContext(ctx).WithArguments("/users").Should(BeNumerically(">=", 17)) + }, SpecTimeout(time.Second)) + +Either way the context pasesd to Eventually is also passed to the underlying function. Now, when Ginkgo cancels the context both the FetchCount client and Gomega will be informed and can exit. + +By default, when a context is passed to Eventually *without* an explicit timeout, Gomega will rely solely on the context's cancellation to determine when to stop polling. If you want to specify a timeout in addition to the context you can do so using the .WithTimeout() method. For example: + + Eventually(client.FetchCount).WithContext(ctx).WithTimeout(10*time.Second).Should(BeNumerically(">=", 17)) + +now either the context cacnellation or the timeout will cause Eventually to stop polling. + +If, instead, you would like to opt out of this behavior and have Gomega's default timeouts govern Eventuallys that take a context you can call: + + EnforceDefaultTimeoutsWhenUsingContexts() + +in the DSL (or on a Gomega instance). Now all calls to Eventually that take a context will fail if eitehr the context is cancelled or the default timeout elapses. + +**Category 3: Making assertions _in_ the function passed into Eventually** + +When testing complex systems it can be valuable to assert that a _set_ of assertions passes Eventually. Eventually supports this by accepting functions that take a single Gomega argument and return zero or more values. + +Here's an example that makes some assertions and returns a value and error: + + Eventually(func(g Gomega) (Widget, error) { + ids, err := client.FetchIDs() + g.Expect(err).NotTo(HaveOccurred()) + g.Expect(ids).To(ContainElement(1138)) + return client.FetchWidget(1138) + }).Should(Equal(expectedWidget)) + +will pass only if all the assertions in the polled function pass and the return value satisfied the matcher. + +Eventually also supports a special case polling function that takes a single Gomega argument and returns no values. Eventually assumes such a function is making assertions and is designed to work with the Succeed matcher to validate that all assertions have passed. +For example: + + Eventually(func(g Gomega) { + model, err := client.Find(1138) + g.Expect(err).NotTo(HaveOccurred()) + g.Expect(model.Reticulate()).To(Succeed()) + g.Expect(model.IsReticulated()).To(BeTrue()) + g.Expect(model.Save()).To(Succeed()) + }).Should(Succeed()) + +will rerun the function until all assertions pass. + +You can also pass additional arguments to functions that take a Gomega. The only rule is that the Gomega argument must be first. If you also want to pass the context attached to Eventually you must ensure that is the second argument. For example: + + Eventually(func(g Gomega, ctx context.Context, path string, expected ...string){ + tok, err := client.GetToken(ctx) + g.Expect(err).NotTo(HaveOccurred()) + + elements, err := client.Fetch(ctx, tok, path) + g.Expect(err).NotTo(HaveOccurred()) + g.Expect(elements).To(ConsistOf(expected)) + }).WithContext(ctx).WithArguments("/names", "Joe", "Jane", "Sam").Should(Succeed()) + +You can ensure that you get a number of consecutive successful tries before succeeding using `MustPassRepeatedly(int)`. For Example: + + int count := 0 + Eventually(func() bool { + count++ + return count > 2 + }).MustPassRepeatedly(2).Should(BeTrue()) + // Because we had to wait for 2 calls that returned true + Expect(count).To(Equal(3)) + +Finally, in addition to passing timeouts and a context to Eventually you can be more explicit with Eventually's chaining configuration methods: + + Eventually(..., "10s", "2s", ctx).Should(...) + +is equivalent to + + Eventually(...).WithTimeout(10*time.Second).WithPolling(2*time.Second).WithContext(ctx).Should(...) +*/ +func Eventually(actualOrCtx interface{}, args ...interface{}) AsyncAssertion { + ensureDefaultGomegaIsConfigured() + return Default.Eventually(actualOrCtx, args...) +} + +// EventuallyWithOffset operates like Eventually but takes an additional +// initial argument to indicate an offset in the call stack. This is useful when building helper +// functions that contain matchers. To learn more, read about `ExpectWithOffset`. +// +// `EventuallyWithOffset` is the same as `Eventually(...).WithOffset`. +// +// `EventuallyWithOffset` specifying a timeout interval (and an optional polling interval) are +// the same as `Eventually(...).WithOffset(...).WithTimeout` or +// `Eventually(...).WithOffset(...).WithTimeout(...).WithPolling`. +func EventuallyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) AsyncAssertion { + ensureDefaultGomegaIsConfigured() + return Default.EventuallyWithOffset(offset, actualOrCtx, args...) +} + +/* +Consistently, like Eventually, enables making assertions on asynchronous behavior. + +Consistently blocks when called for a specified duration. During that duration Consistently repeatedly polls its matcher and ensures that it is satisfied. If the matcher is consistently satisfied, then Consistently will pass. Otherwise Consistently will fail. + +Both the total waiting duration and the polling interval are configurable as optional arguments. The first optional argument is the duration that Consistently will run for (defaults to 100ms), and the second argument is the polling interval (defaults to 10ms). As with Eventually, these intervals can be passed in as time.Duration, parsable duration strings or an integer or float number of seconds. You can also pass in an optional context.Context - Consistently will exit early (with a failure) if the context is cancelled before the waiting duration expires. + +Consistently accepts the same three categories of actual as Eventually, check the Eventually docs to learn more. + +Consistently is useful in cases where you want to assert that something *does not happen* for a period of time. For example, you may want to assert that a goroutine does *not* send data down a channel. In this case you could write: + + Consistently(channel, "200ms").ShouldNot(Receive()) + +This will block for 200 milliseconds and repeatedly check the channel and ensure nothing has been received. +*/ +func Consistently(actualOrCtx interface{}, args ...interface{}) AsyncAssertion { + ensureDefaultGomegaIsConfigured() + return Default.Consistently(actualOrCtx, args...) +} + +// ConsistentlyWithOffset operates like Consistently but takes an additional +// initial argument to indicate an offset in the call stack. This is useful when building helper +// functions that contain matchers. To learn more, read about `ExpectWithOffset`. +// +// `ConsistentlyWithOffset` is the same as `Consistently(...).WithOffset` and +// optional `WithTimeout` and `WithPolling`. +func ConsistentlyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) AsyncAssertion { + ensureDefaultGomegaIsConfigured() + return Default.ConsistentlyWithOffset(offset, actualOrCtx, args...) +} + +/* +StopTrying can be used to signal to Eventually and Consistentlythat they should abort and stop trying. This always results in a failure of the assertion - and the failure message is the content of the StopTrying signal. + +You can send the StopTrying signal by either returning StopTrying("message") as an error from your passed-in function _or_ by calling StopTrying("message").Now() to trigger a panic and end execution. + +You can also wrap StopTrying around an error with `StopTrying("message").Wrap(err)` and can attach additional objects via `StopTrying("message").Attach("description", object). When rendered, the signal will include the wrapped error and any attached objects rendered using Gomega's default formatting. + +Here are a couple of examples. This is how you might use StopTrying() as an error to signal that Eventually should stop: + + playerIndex, numPlayers := 0, 11 + Eventually(func() (string, error) { + if playerIndex == numPlayers { + return "", StopTrying("no more players left") + } + name := client.FetchPlayer(playerIndex) + playerIndex += 1 + return name, nil + }).Should(Equal("Patrick Mahomes")) + +And here's an example where `StopTrying().Now()` is called to halt execution immediately: + + Eventually(func() []string { + names, err := client.FetchAllPlayers() + if err == client.IRRECOVERABLE_ERROR { + StopTrying("Irrecoverable error occurred").Wrap(err).Now() + } + return names + }).Should(ContainElement("Patrick Mahomes")) +*/ +var StopTrying = internal.StopTrying + +/* +TryAgainAfter() allows you to adjust the polling interval for the _next_ iteration of `Eventually` or `Consistently`. Like `StopTrying` you can either return `TryAgainAfter` as an error or trigger it immedieately with `.Now()` + +When `TryAgainAfter(` is triggered `Eventually` and `Consistently` will wait for that duration. If a timeout occurs before the next poll is triggered both `Eventually` and `Consistently` will always fail with the content of the TryAgainAfter message. As with StopTrying you can `.Wrap()` and error and `.Attach()` additional objects to `TryAgainAfter`. +*/ +var TryAgainAfter = internal.TryAgainAfter + +/* +PollingSignalError is the error returned by StopTrying() and TryAgainAfter() +*/ +type PollingSignalError = internal.PollingSignalError + +// SetDefaultEventuallyTimeout sets the default timeout duration for Eventually. Eventually will repeatedly poll your condition until it succeeds, or until this timeout elapses. +func SetDefaultEventuallyTimeout(t time.Duration) { + Default.SetDefaultEventuallyTimeout(t) +} + +// SetDefaultEventuallyPollingInterval sets the default polling interval for Eventually. +func SetDefaultEventuallyPollingInterval(t time.Duration) { + Default.SetDefaultEventuallyPollingInterval(t) +} + +// SetDefaultConsistentlyDuration sets the default duration for Consistently. Consistently will verify that your condition is satisfied for this long. +func SetDefaultConsistentlyDuration(t time.Duration) { + Default.SetDefaultConsistentlyDuration(t) +} + +// SetDefaultConsistentlyPollingInterval sets the default polling interval for Consistently. +func SetDefaultConsistentlyPollingInterval(t time.Duration) { + Default.SetDefaultConsistentlyPollingInterval(t) +} + +// EnforceDefaultTimeoutsWhenUsingContexts forces `Eventually` to apply a default timeout even when a context is provided. +func EnforceDefaultTimeoutsWhenUsingContexts() { + Default.EnforceDefaultTimeoutsWhenUsingContexts() +} + +// DisableDefaultTimeoutsWhenUsingContext disables the default timeout when a context is provided to `Eventually`. +func DisableDefaultTimeoutsWhenUsingContext() { + Default.DisableDefaultTimeoutsWhenUsingContext() +} + +// AsyncAssertion is returned by Eventually and Consistently and polls the actual value passed into Eventually against +// the matcher passed to the Should and ShouldNot methods. +// +// Both Should and ShouldNot take a variadic optionalDescription argument. +// This argument allows you to make your failure messages more descriptive. +// If a single argument of type `func() string` is passed, this function will be lazily evaluated if a failure occurs +// and the returned string is used to annotate the failure message. +// Otherwise, this argument is passed on to fmt.Sprintf() and then used to annotate the failure message. +// +// Both Should and ShouldNot return a boolean that is true if the assertion passed and false if it failed. +// +// Example: +// +// Eventually(myChannel).Should(Receive(), "Something should have come down the pipe.") +// Consistently(myChannel).ShouldNot(Receive(), func() string { return "Nothing should have come down the pipe." }) +type AsyncAssertion = types.AsyncAssertion + +// GomegaAsyncAssertion is deprecated in favor of AsyncAssertion, which does not stutter. +type GomegaAsyncAssertion = types.AsyncAssertion + +// Assertion is returned by Ω and Expect and compares the actual value to the matcher +// passed to the Should/ShouldNot and To/ToNot/NotTo methods. +// +// Typically Should/ShouldNot are used with Ω and To/ToNot/NotTo are used with Expect +// though this is not enforced. +// +// All methods take a variadic optionalDescription argument. +// This argument allows you to make your failure messages more descriptive. +// If a single argument of type `func() string` is passed, this function will be lazily evaluated if a failure occurs +// and the returned string is used to annotate the failure message. +// Otherwise, this argument is passed on to fmt.Sprintf() and then used to annotate the failure message. +// +// All methods return a bool that is true if the assertion passed and false if it failed. +// +// Example: +// +// Ω(farm.HasCow()).Should(BeTrue(), "Farm %v should have a cow", farm) +type Assertion = types.Assertion + +// GomegaAssertion is deprecated in favor of Assertion, which does not stutter. +type GomegaAssertion = types.Assertion + +// OmegaMatcher is deprecated in favor of the better-named and better-organized types.GomegaMatcher but sticks around to support existing code that uses it +type OmegaMatcher = types.GomegaMatcher diff --git a/vendor/github.com/onsi/gomega/internal/assertion.go b/vendor/github.com/onsi/gomega/internal/assertion.go new file mode 100644 index 000000000..08356a610 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/assertion.go @@ -0,0 +1,161 @@ +package internal + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/types" +) + +type Assertion struct { + actuals []interface{} // actual value plus all extra values + actualIndex int // value to pass to the matcher + vet vetinari // the vet to call before calling Gomega matcher + offset int + g *Gomega +} + +// ...obligatory discworld reference, as "vetineer" doesn't sound ... quite right. +type vetinari func(assertion *Assertion, optionalDescription ...interface{}) bool + +func NewAssertion(actualInput interface{}, g *Gomega, offset int, extra ...interface{}) *Assertion { + return &Assertion{ + actuals: append([]interface{}{actualInput}, extra...), + actualIndex: 0, + vet: (*Assertion).vetActuals, + offset: offset, + g: g, + } +} + +func (assertion *Assertion) WithOffset(offset int) types.Assertion { + assertion.offset = offset + return assertion +} + +func (assertion *Assertion) Error() types.Assertion { + return &Assertion{ + actuals: assertion.actuals, + actualIndex: len(assertion.actuals) - 1, + vet: (*Assertion).vetError, + offset: assertion.offset, + g: assertion.g, + } +} + +func (assertion *Assertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Assertion", optionalDescription...) + return assertion.vet(assertion, optionalDescription...) && assertion.match(matcher, true, optionalDescription...) +} + +func (assertion *Assertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Assertion", optionalDescription...) + return assertion.vet(assertion, optionalDescription...) && assertion.match(matcher, false, optionalDescription...) +} + +func (assertion *Assertion) To(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Assertion", optionalDescription...) + return assertion.vet(assertion, optionalDescription...) && assertion.match(matcher, true, optionalDescription...) +} + +func (assertion *Assertion) ToNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Assertion", optionalDescription...) + return assertion.vet(assertion, optionalDescription...) && assertion.match(matcher, false, optionalDescription...) +} + +func (assertion *Assertion) NotTo(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Assertion", optionalDescription...) + return assertion.vet(assertion, optionalDescription...) && assertion.match(matcher, false, optionalDescription...) +} + +func (assertion *Assertion) buildDescription(optionalDescription ...interface{}) string { + switch len(optionalDescription) { + case 0: + return "" + case 1: + if describe, ok := optionalDescription[0].(func() string); ok { + return describe() + "\n" + } + } + return fmt.Sprintf(optionalDescription[0].(string), optionalDescription[1:]...) + "\n" +} + +func (assertion *Assertion) match(matcher types.GomegaMatcher, desiredMatch bool, optionalDescription ...interface{}) bool { + actualInput := assertion.actuals[assertion.actualIndex] + matches, err := matcher.Match(actualInput) + assertion.g.THelper() + if err != nil { + description := assertion.buildDescription(optionalDescription...) + assertion.g.Fail(description+err.Error(), 2+assertion.offset) + return false + } + if matches != desiredMatch { + var message string + if desiredMatch { + message = matcher.FailureMessage(actualInput) + } else { + message = matcher.NegatedFailureMessage(actualInput) + } + description := assertion.buildDescription(optionalDescription...) + assertion.g.Fail(description+message, 2+assertion.offset) + return false + } + + return true +} + +// vetActuals vets the actual values, with the (optional) exception of a +// specific value, such as the first value in case non-error assertions, or the +// last value in case of Error()-based assertions. +func (assertion *Assertion) vetActuals(optionalDescription ...interface{}) bool { + success, message := vetActuals(assertion.actuals, assertion.actualIndex) + if success { + return true + } + + description := assertion.buildDescription(optionalDescription...) + assertion.g.THelper() + assertion.g.Fail(description+message, 2+assertion.offset) + return false +} + +// vetError vets the actual values, except for the final error value, in case +// the final error value is non-zero. Otherwise, it doesn't vet the actual +// values, as these are allowed to take on any values unless there is a non-zero +// error value. +func (assertion *Assertion) vetError(optionalDescription ...interface{}) bool { + if err := assertion.actuals[assertion.actualIndex]; err != nil { + // Go error result idiom: all other actual values must be zero values. + return assertion.vetActuals(optionalDescription...) + } + return true +} + +// vetActuals vets a slice of actual values, optionally skipping a particular +// value slice element, such as the first or last value slice element. +func vetActuals(actuals []interface{}, skipIndex int) (bool, string) { + for i, actual := range actuals { + if i == skipIndex { + continue + } + if actual != nil { + zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() + if !reflect.DeepEqual(zeroValue, actual) { + var message string + if err, ok := actual.(error); ok { + message = fmt.Sprintf("Unexpected error: %s\n%s", err, format.Object(err, 1)) + } else { + message = fmt.Sprintf("Unexpected non-nil/non-zero argument at index %d:\n\t<%T>: %#v", i, actual, actual) + } + return false, message + } + } + } + return true, "" +} diff --git a/vendor/github.com/onsi/gomega/internal/async_assertion.go b/vendor/github.com/onsi/gomega/internal/async_assertion.go new file mode 100644 index 000000000..8b4cd1f5b --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/async_assertion.go @@ -0,0 +1,584 @@ +package internal + +import ( + "context" + "errors" + "fmt" + "reflect" + "runtime" + "sync" + "time" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/types" +) + +var errInterface = reflect.TypeOf((*error)(nil)).Elem() +var gomegaType = reflect.TypeOf((*types.Gomega)(nil)).Elem() +var contextType = reflect.TypeOf(new(context.Context)).Elem() + +type formattedGomegaError interface { + FormattedGomegaError() string +} + +type asyncPolledActualError struct { + message string +} + +func (err *asyncPolledActualError) Error() string { + return err.message +} + +func (err *asyncPolledActualError) FormattedGomegaError() string { + return err.message +} + +type contextWithAttachProgressReporter interface { + AttachProgressReporter(func() string) func() +} + +type asyncGomegaHaltExecutionError struct{} + +func (a asyncGomegaHaltExecutionError) GinkgoRecoverShouldIgnoreThisPanic() {} +func (a asyncGomegaHaltExecutionError) Error() string { + return `An assertion has failed in a goroutine. You should call + + defer GinkgoRecover() + +at the top of the goroutine that caused this panic. This will allow Ginkgo and Gomega to correctly capture and manage this panic.` +} + +type AsyncAssertionType uint + +const ( + AsyncAssertionTypeEventually AsyncAssertionType = iota + AsyncAssertionTypeConsistently +) + +func (at AsyncAssertionType) String() string { + switch at { + case AsyncAssertionTypeEventually: + return "Eventually" + case AsyncAssertionTypeConsistently: + return "Consistently" + } + return "INVALID ASYNC ASSERTION TYPE" +} + +type AsyncAssertion struct { + asyncType AsyncAssertionType + + actualIsFunc bool + actual interface{} + argsToForward []interface{} + + timeoutInterval time.Duration + pollingInterval time.Duration + mustPassRepeatedly int + ctx context.Context + offset int + g *Gomega +} + +func NewAsyncAssertion(asyncType AsyncAssertionType, actualInput interface{}, g *Gomega, timeoutInterval time.Duration, pollingInterval time.Duration, mustPassRepeatedly int, ctx context.Context, offset int) *AsyncAssertion { + out := &AsyncAssertion{ + asyncType: asyncType, + timeoutInterval: timeoutInterval, + pollingInterval: pollingInterval, + mustPassRepeatedly: mustPassRepeatedly, + offset: offset, + ctx: ctx, + g: g, + } + + out.actual = actualInput + if actualInput != nil && reflect.TypeOf(actualInput).Kind() == reflect.Func { + out.actualIsFunc = true + } + + return out +} + +func (assertion *AsyncAssertion) WithOffset(offset int) types.AsyncAssertion { + assertion.offset = offset + return assertion +} + +func (assertion *AsyncAssertion) WithTimeout(interval time.Duration) types.AsyncAssertion { + assertion.timeoutInterval = interval + return assertion +} + +func (assertion *AsyncAssertion) WithPolling(interval time.Duration) types.AsyncAssertion { + assertion.pollingInterval = interval + return assertion +} + +func (assertion *AsyncAssertion) Within(timeout time.Duration) types.AsyncAssertion { + assertion.timeoutInterval = timeout + return assertion +} + +func (assertion *AsyncAssertion) ProbeEvery(interval time.Duration) types.AsyncAssertion { + assertion.pollingInterval = interval + return assertion +} + +func (assertion *AsyncAssertion) WithContext(ctx context.Context) types.AsyncAssertion { + assertion.ctx = ctx + return assertion +} + +func (assertion *AsyncAssertion) WithArguments(argsToForward ...interface{}) types.AsyncAssertion { + assertion.argsToForward = argsToForward + return assertion +} + +func (assertion *AsyncAssertion) MustPassRepeatedly(count int) types.AsyncAssertion { + assertion.mustPassRepeatedly = count + return assertion +} + +func (assertion *AsyncAssertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Asynchronous assertion", optionalDescription...) + return assertion.match(matcher, true, optionalDescription...) +} + +func (assertion *AsyncAssertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.g.THelper() + vetOptionalDescription("Asynchronous assertion", optionalDescription...) + return assertion.match(matcher, false, optionalDescription...) +} + +func (assertion *AsyncAssertion) buildDescription(optionalDescription ...interface{}) string { + switch len(optionalDescription) { + case 0: + return "" + case 1: + if describe, ok := optionalDescription[0].(func() string); ok { + return describe() + "\n" + } + } + return fmt.Sprintf(optionalDescription[0].(string), optionalDescription[1:]...) + "\n" +} + +func (assertion *AsyncAssertion) processReturnValues(values []reflect.Value) (interface{}, error) { + if len(values) == 0 { + return nil, &asyncPolledActualError{ + message: fmt.Sprintf("The function passed to %s did not return any values", assertion.asyncType), + } + } + + actual := values[0].Interface() + if _, ok := AsPollingSignalError(actual); ok { + return actual, actual.(error) + } + + var err error + for i, extraValue := range values[1:] { + extra := extraValue.Interface() + if extra == nil { + continue + } + if _, ok := AsPollingSignalError(extra); ok { + return actual, extra.(error) + } + extraType := reflect.TypeOf(extra) + zero := reflect.Zero(extraType).Interface() + if reflect.DeepEqual(extra, zero) { + continue + } + if i == len(values)-2 && extraType.Implements(errInterface) { + err = extra.(error) + } + if err == nil { + err = &asyncPolledActualError{ + message: fmt.Sprintf("The function passed to %s had an unexpected non-nil/non-zero return value at index %d:\n%s", assertion.asyncType, i+1, format.Object(extra, 1)), + } + } + } + + return actual, err +} + +func (assertion *AsyncAssertion) invalidFunctionError(t reflect.Type) error { + return fmt.Errorf(`The function passed to %s had an invalid signature of %s. Functions passed to %s must either: + + (a) have return values or + (b) take a Gomega interface as their first argument and use that Gomega instance to make assertions. + +You can learn more at https://onsi.github.io/gomega/#eventually +`, assertion.asyncType, t, assertion.asyncType) +} + +func (assertion *AsyncAssertion) noConfiguredContextForFunctionError() error { + return fmt.Errorf(`The function passed to %s requested a context.Context, but no context has been provided. Please pass one in using %s().WithContext(). + +You can learn more at https://onsi.github.io/gomega/#eventually +`, assertion.asyncType, assertion.asyncType) +} + +func (assertion *AsyncAssertion) argumentMismatchError(t reflect.Type, numProvided int) error { + have := "have" + if numProvided == 1 { + have = "has" + } + return fmt.Errorf(`The function passed to %s has signature %s takes %d arguments but %d %s been provided. Please use %s().WithArguments() to pass the corect set of arguments. + +You can learn more at https://onsi.github.io/gomega/#eventually +`, assertion.asyncType, t, t.NumIn(), numProvided, have, assertion.asyncType) +} + +func (assertion *AsyncAssertion) invalidMustPassRepeatedlyError(reason string) error { + return fmt.Errorf(`Invalid use of MustPassRepeatedly with %s %s + +You can learn more at https://onsi.github.io/gomega/#eventually +`, assertion.asyncType, reason) +} + +func (assertion *AsyncAssertion) buildActualPoller() (func() (interface{}, error), error) { + if !assertion.actualIsFunc { + return func() (interface{}, error) { return assertion.actual, nil }, nil + } + actualValue := reflect.ValueOf(assertion.actual) + actualType := reflect.TypeOf(assertion.actual) + numIn, numOut, isVariadic := actualType.NumIn(), actualType.NumOut(), actualType.IsVariadic() + + if numIn == 0 && numOut == 0 { + return nil, assertion.invalidFunctionError(actualType) + } + takesGomega, takesContext := false, false + if numIn > 0 { + takesGomega, takesContext = actualType.In(0).Implements(gomegaType), actualType.In(0).Implements(contextType) + } + if takesGomega && numIn > 1 && actualType.In(1).Implements(contextType) { + takesContext = true + } + if takesContext && len(assertion.argsToForward) > 0 && reflect.TypeOf(assertion.argsToForward[0]).Implements(contextType) { + takesContext = false + } + if !takesGomega && numOut == 0 { + return nil, assertion.invalidFunctionError(actualType) + } + if takesContext && assertion.ctx == nil { + return nil, assertion.noConfiguredContextForFunctionError() + } + + var assertionFailure error + inValues := []reflect.Value{} + if takesGomega { + inValues = append(inValues, reflect.ValueOf(NewGomega(assertion.g.DurationBundle).ConfigureWithFailHandler(func(message string, callerSkip ...int) { + skip := 0 + if len(callerSkip) > 0 { + skip = callerSkip[0] + } + _, file, line, _ := runtime.Caller(skip + 1) + assertionFailure = &asyncPolledActualError{ + message: fmt.Sprintf("The function passed to %s failed at %s:%d with:\n%s", assertion.asyncType, file, line, message), + } + // we throw an asyncGomegaHaltExecutionError so that defer GinkgoRecover() can catch this error if the user makes an assertion in a goroutine + panic(asyncGomegaHaltExecutionError{}) + }))) + } + if takesContext { + inValues = append(inValues, reflect.ValueOf(assertion.ctx)) + } + for _, arg := range assertion.argsToForward { + inValues = append(inValues, reflect.ValueOf(arg)) + } + + if !isVariadic && numIn != len(inValues) { + return nil, assertion.argumentMismatchError(actualType, len(inValues)) + } else if isVariadic && len(inValues) < numIn-1 { + return nil, assertion.argumentMismatchError(actualType, len(inValues)) + } + + if assertion.mustPassRepeatedly != 1 && assertion.asyncType != AsyncAssertionTypeEventually { + return nil, assertion.invalidMustPassRepeatedlyError("it can only be used with Eventually") + } + if assertion.mustPassRepeatedly < 1 { + return nil, assertion.invalidMustPassRepeatedlyError("parameter can't be < 1") + } + + return func() (actual interface{}, err error) { + var values []reflect.Value + assertionFailure = nil + defer func() { + if numOut == 0 && takesGomega { + actual = assertionFailure + } else { + actual, err = assertion.processReturnValues(values) + _, isAsyncError := AsPollingSignalError(err) + if assertionFailure != nil && !isAsyncError { + err = assertionFailure + } + } + if e := recover(); e != nil { + if _, isAsyncError := AsPollingSignalError(e); isAsyncError { + err = e.(error) + } else if assertionFailure == nil { + panic(e) + } + } + }() + values = actualValue.Call(inValues) + return + }, nil +} + +func (assertion *AsyncAssertion) afterTimeout() <-chan time.Time { + if assertion.timeoutInterval >= 0 { + return time.After(assertion.timeoutInterval) + } + + if assertion.asyncType == AsyncAssertionTypeConsistently { + return time.After(assertion.g.DurationBundle.ConsistentlyDuration) + } else { + if assertion.ctx == nil || assertion.g.DurationBundle.EnforceDefaultTimeoutsWhenUsingContexts { + return time.After(assertion.g.DurationBundle.EventuallyTimeout) + } else { + return nil + } + } +} + +func (assertion *AsyncAssertion) afterPolling() <-chan time.Time { + if assertion.pollingInterval >= 0 { + return time.After(assertion.pollingInterval) + } + if assertion.asyncType == AsyncAssertionTypeConsistently { + return time.After(assertion.g.DurationBundle.ConsistentlyPollingInterval) + } else { + return time.After(assertion.g.DurationBundle.EventuallyPollingInterval) + } +} + +func (assertion *AsyncAssertion) matcherSaysStopTrying(matcher types.GomegaMatcher, value interface{}) bool { + if assertion.actualIsFunc || types.MatchMayChangeInTheFuture(matcher, value) { + return false + } + return true +} + +func (assertion *AsyncAssertion) pollMatcher(matcher types.GomegaMatcher, value interface{}) (matches bool, err error) { + defer func() { + if e := recover(); e != nil { + if _, isAsyncError := AsPollingSignalError(e); isAsyncError { + err = e.(error) + } else { + panic(e) + } + } + }() + + matches, err = matcher.Match(value) + + return +} + +func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch bool, optionalDescription ...interface{}) bool { + timer := time.Now() + timeout := assertion.afterTimeout() + lock := sync.Mutex{} + + var matches, hasLastValidActual bool + var actual, lastValidActual interface{} + var actualErr, matcherErr error + var oracleMatcherSaysStop bool + + assertion.g.THelper() + + pollActual, buildActualPollerErr := assertion.buildActualPoller() + if buildActualPollerErr != nil { + assertion.g.Fail(buildActualPollerErr.Error(), 2+assertion.offset) + return false + } + + actual, actualErr = pollActual() + if actualErr == nil { + lastValidActual = actual + hasLastValidActual = true + oracleMatcherSaysStop = assertion.matcherSaysStopTrying(matcher, actual) + matches, matcherErr = assertion.pollMatcher(matcher, actual) + } + + renderError := func(preamble string, err error) string { + message := "" + if pollingSignalErr, ok := AsPollingSignalError(err); ok { + message = err.Error() + for _, attachment := range pollingSignalErr.Attachments { + message += fmt.Sprintf("\n%s:\n", attachment.Description) + message += format.Object(attachment.Object, 1) + } + } else { + message = preamble + "\n" + format.Object(err, 1) + } + return message + } + + messageGenerator := func() string { + // can be called out of band by Ginkgo if the user requests a progress report + lock.Lock() + defer lock.Unlock() + message := "" + + if actualErr == nil { + if matcherErr == nil { + if desiredMatch != matches { + if desiredMatch { + message += matcher.FailureMessage(actual) + } else { + message += matcher.NegatedFailureMessage(actual) + } + } else { + if assertion.asyncType == AsyncAssertionTypeConsistently { + message += "There is no failure as the matcher passed to Consistently has not yet failed" + } else { + message += "There is no failure as the matcher passed to Eventually succeeded on its most recent iteration" + } + } + } else { + var fgErr formattedGomegaError + if errors.As(actualErr, &fgErr) { + message += fgErr.FormattedGomegaError() + "\n" + } else { + message += renderError(fmt.Sprintf("The matcher passed to %s returned the following error:", assertion.asyncType), matcherErr) + } + } + } else { + var fgErr formattedGomegaError + if errors.As(actualErr, &fgErr) { + message += fgErr.FormattedGomegaError() + "\n" + } else { + message += renderError(fmt.Sprintf("The function passed to %s returned the following error:", assertion.asyncType), actualErr) + } + if hasLastValidActual { + message += fmt.Sprintf("\nAt one point, however, the function did return successfully.\nYet, %s failed because", assertion.asyncType) + _, e := matcher.Match(lastValidActual) + if e != nil { + message += renderError(" the matcher returned the following error:", e) + } else { + message += " the matcher was not satisfied:\n" + if desiredMatch { + message += matcher.FailureMessage(lastValidActual) + } else { + message += matcher.NegatedFailureMessage(lastValidActual) + } + } + } + } + + description := assertion.buildDescription(optionalDescription...) + return fmt.Sprintf("%s%s", description, message) + } + + fail := func(preamble string) { + assertion.g.THelper() + assertion.g.Fail(fmt.Sprintf("%s after %.3fs.\n%s", preamble, time.Since(timer).Seconds(), messageGenerator()), 3+assertion.offset) + } + + var contextDone <-chan struct{} + if assertion.ctx != nil { + contextDone = assertion.ctx.Done() + if v, ok := assertion.ctx.Value("GINKGO_SPEC_CONTEXT").(contextWithAttachProgressReporter); ok { + detach := v.AttachProgressReporter(messageGenerator) + defer detach() + } + } + + // Used to count the number of times in a row a step passed + passedRepeatedlyCount := 0 + for { + var nextPoll <-chan time.Time = nil + var isTryAgainAfterError = false + + for _, err := range []error{actualErr, matcherErr} { + if pollingSignalErr, ok := AsPollingSignalError(err); ok { + if pollingSignalErr.IsStopTrying() { + if pollingSignalErr.IsSuccessful() { + if assertion.asyncType == AsyncAssertionTypeEventually { + fail("Told to stop trying (and ignoring call to Successfully(), as it is only relevant with Consistently)") + } else { + return true // early escape hatch for Consistently + } + } else { + fail("Told to stop trying") + } + return false + } + if pollingSignalErr.IsTryAgainAfter() { + nextPoll = time.After(pollingSignalErr.TryAgainDuration()) + isTryAgainAfterError = true + } + } + } + + if actualErr == nil && matcherErr == nil && matches == desiredMatch { + if assertion.asyncType == AsyncAssertionTypeEventually { + passedRepeatedlyCount += 1 + if passedRepeatedlyCount == assertion.mustPassRepeatedly { + return true + } + } + } else if !isTryAgainAfterError { + if assertion.asyncType == AsyncAssertionTypeConsistently { + fail("Failed") + return false + } + // Reset the consecutive pass count + passedRepeatedlyCount = 0 + } + + if oracleMatcherSaysStop { + if assertion.asyncType == AsyncAssertionTypeEventually { + fail("No future change is possible. Bailing out early") + return false + } else { + return true + } + } + + if nextPoll == nil { + nextPoll = assertion.afterPolling() + } + + select { + case <-nextPoll: + a, e := pollActual() + lock.Lock() + actual, actualErr = a, e + lock.Unlock() + if actualErr == nil { + lock.Lock() + lastValidActual = actual + hasLastValidActual = true + lock.Unlock() + oracleMatcherSaysStop = assertion.matcherSaysStopTrying(matcher, actual) + m, e := assertion.pollMatcher(matcher, actual) + lock.Lock() + matches, matcherErr = m, e + lock.Unlock() + } + case <-contextDone: + err := context.Cause(assertion.ctx) + if err != nil && err != context.Canceled { + fail(fmt.Sprintf("Context was cancelled (cause: %s)", err)) + } else { + fail("Context was cancelled") + } + return false + case <-timeout: + if assertion.asyncType == AsyncAssertionTypeEventually { + fail("Timed out") + return false + } else { + if isTryAgainAfterError { + fail("Timed out while waiting on TryAgainAfter") + return false + } + return true + } + } + } +} diff --git a/vendor/github.com/onsi/gomega/internal/duration_bundle.go b/vendor/github.com/onsi/gomega/internal/duration_bundle.go new file mode 100644 index 000000000..2e026c336 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/duration_bundle.go @@ -0,0 +1,76 @@ +package internal + +import ( + "fmt" + "os" + "reflect" + "time" +) + +type DurationBundle struct { + EventuallyTimeout time.Duration + EventuallyPollingInterval time.Duration + ConsistentlyDuration time.Duration + ConsistentlyPollingInterval time.Duration + EnforceDefaultTimeoutsWhenUsingContexts bool +} + +const ( + EventuallyTimeoutEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT" + EventuallyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_POLLING_INTERVAL" + + ConsistentlyDurationEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_DURATION" + ConsistentlyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_POLLING_INTERVAL" + + EnforceDefaultTimeoutsWhenUsingContextsEnvVarName = "GOMEGA_ENFORCE_DEFAULT_TIMEOUTS_WHEN_USING_CONTEXTS" +) + +func FetchDefaultDurationBundle() DurationBundle { + _, EnforceDefaultTimeoutsWhenUsingContexts := os.LookupEnv(EnforceDefaultTimeoutsWhenUsingContextsEnvVarName) + return DurationBundle{ + EventuallyTimeout: durationFromEnv(EventuallyTimeoutEnvVarName, time.Second), + EventuallyPollingInterval: durationFromEnv(EventuallyPollingIntervalEnvVarName, 10*time.Millisecond), + + ConsistentlyDuration: durationFromEnv(ConsistentlyDurationEnvVarName, 100*time.Millisecond), + ConsistentlyPollingInterval: durationFromEnv(ConsistentlyPollingIntervalEnvVarName, 10*time.Millisecond), + EnforceDefaultTimeoutsWhenUsingContexts: EnforceDefaultTimeoutsWhenUsingContexts, + } +} + +func durationFromEnv(key string, defaultDuration time.Duration) time.Duration { + value := os.Getenv(key) + if value == "" { + return defaultDuration + } + duration, err := time.ParseDuration(value) + if err != nil { + panic(fmt.Sprintf("Expected a duration when using %s! Parse error %v", key, err)) + } + return duration +} + +func toDuration(input interface{}) (time.Duration, error) { + duration, ok := input.(time.Duration) + if ok { + return duration, nil + } + + value := reflect.ValueOf(input) + kind := reflect.TypeOf(input).Kind() + + if reflect.Int <= kind && kind <= reflect.Int64 { + return time.Duration(value.Int()) * time.Second, nil + } else if reflect.Uint <= kind && kind <= reflect.Uint64 { + return time.Duration(value.Uint()) * time.Second, nil + } else if reflect.Float32 <= kind && kind <= reflect.Float64 { + return time.Duration(value.Float() * float64(time.Second)), nil + } else if reflect.String == kind { + duration, err := time.ParseDuration(value.String()) + if err != nil { + return 0, fmt.Errorf("%#v is not a valid parsable duration string: %w", input, err) + } + return duration, nil + } + + return 0, fmt.Errorf("%#v is not a valid interval. Must be a time.Duration, a parsable duration string, or a number.", input) +} diff --git a/vendor/github.com/onsi/gomega/internal/gomega.go b/vendor/github.com/onsi/gomega/internal/gomega.go new file mode 100644 index 000000000..c6e2fcc0e --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/gomega.go @@ -0,0 +1,137 @@ +package internal + +import ( + "context" + "time" + + "github.com/onsi/gomega/types" +) + +type Gomega struct { + Fail types.GomegaFailHandler + THelper func() + DurationBundle DurationBundle +} + +func NewGomega(bundle DurationBundle) *Gomega { + return &Gomega{ + Fail: nil, + THelper: nil, + DurationBundle: bundle, + } +} + +func (g *Gomega) IsConfigured() bool { + return g.Fail != nil && g.THelper != nil +} + +func (g *Gomega) ConfigureWithFailHandler(fail types.GomegaFailHandler) *Gomega { + g.Fail = fail + g.THelper = func() {} + return g +} + +func (g *Gomega) ConfigureWithT(t types.GomegaTestingT) *Gomega { + g.Fail = func(message string, _ ...int) { + t.Helper() + t.Fatalf("\n%s", message) + } + g.THelper = t.Helper + return g +} + +func (g *Gomega) Ω(actual interface{}, extra ...interface{}) types.Assertion { + return g.ExpectWithOffset(0, actual, extra...) +} + +func (g *Gomega) Expect(actual interface{}, extra ...interface{}) types.Assertion { + return g.ExpectWithOffset(0, actual, extra...) +} + +func (g *Gomega) ExpectWithOffset(offset int, actual interface{}, extra ...interface{}) types.Assertion { + return NewAssertion(actual, g, offset, extra...) +} + +func (g *Gomega) Eventually(actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion { + return g.makeAsyncAssertion(AsyncAssertionTypeEventually, 0, actualOrCtx, args...) +} + +func (g *Gomega) EventuallyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion { + return g.makeAsyncAssertion(AsyncAssertionTypeEventually, offset, actualOrCtx, args...) +} + +func (g *Gomega) Consistently(actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion { + return g.makeAsyncAssertion(AsyncAssertionTypeConsistently, 0, actualOrCtx, args...) +} + +func (g *Gomega) ConsistentlyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion { + return g.makeAsyncAssertion(AsyncAssertionTypeConsistently, offset, actualOrCtx, args...) +} + +func (g *Gomega) makeAsyncAssertion(asyncAssertionType AsyncAssertionType, offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion { + baseOffset := 3 + timeoutInterval := -time.Duration(1) + pollingInterval := -time.Duration(1) + intervals := []interface{}{} + var ctx context.Context + + actual := actualOrCtx + startingIndex := 0 + if _, isCtx := actualOrCtx.(context.Context); isCtx && len(args) > 0 { + // the first argument is a context, we should accept it as the context _only if_ it is **not** the only argumnent **and** the second argument is not a parseable duration + // this is due to an unfortunate ambiguity in early version of Gomega in which multi-type durations are allowed after the actual + if _, err := toDuration(args[0]); err != nil { + ctx = actualOrCtx.(context.Context) + actual = args[0] + startingIndex = 1 + } + } + + for _, arg := range args[startingIndex:] { + switch v := arg.(type) { + case context.Context: + ctx = v + default: + intervals = append(intervals, arg) + } + } + var err error + if len(intervals) > 0 { + timeoutInterval, err = toDuration(intervals[0]) + if err != nil { + g.Fail(err.Error(), offset+baseOffset) + } + } + if len(intervals) > 1 { + pollingInterval, err = toDuration(intervals[1]) + if err != nil { + g.Fail(err.Error(), offset+baseOffset) + } + } + + return NewAsyncAssertion(asyncAssertionType, actual, g, timeoutInterval, pollingInterval, 1, ctx, offset) +} + +func (g *Gomega) SetDefaultEventuallyTimeout(t time.Duration) { + g.DurationBundle.EventuallyTimeout = t +} + +func (g *Gomega) SetDefaultEventuallyPollingInterval(t time.Duration) { + g.DurationBundle.EventuallyPollingInterval = t +} + +func (g *Gomega) SetDefaultConsistentlyDuration(t time.Duration) { + g.DurationBundle.ConsistentlyDuration = t +} + +func (g *Gomega) SetDefaultConsistentlyPollingInterval(t time.Duration) { + g.DurationBundle.ConsistentlyPollingInterval = t +} + +func (g *Gomega) EnforceDefaultTimeoutsWhenUsingContexts() { + g.DurationBundle.EnforceDefaultTimeoutsWhenUsingContexts = true +} + +func (g *Gomega) DisableDefaultTimeoutsWhenUsingContext() { + g.DurationBundle.EnforceDefaultTimeoutsWhenUsingContexts = false +} diff --git a/vendor/github.com/onsi/gomega/internal/gutil/post_ioutil.go b/vendor/github.com/onsi/gomega/internal/gutil/post_ioutil.go new file mode 100644 index 000000000..6864055a5 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/gutil/post_ioutil.go @@ -0,0 +1,48 @@ +//go:build go1.16 +// +build go1.16 + +// Package gutil is a replacement for ioutil, which should not be used in new +// code as of Go 1.16. With Go 1.16 and higher, this implementation +// uses the ioutil replacement functions in "io" and "os" with some +// Gomega specifics. This means that we should not get deprecation warnings +// for ioutil when they are added. +package gutil + +import ( + "io" + "os" +) + +func NopCloser(r io.Reader) io.ReadCloser { + return io.NopCloser(r) +} + +func ReadAll(r io.Reader) ([]byte, error) { + return io.ReadAll(r) +} + +func ReadDir(dirname string) ([]string, error) { + entries, err := os.ReadDir(dirname) + if err != nil { + return nil, err + } + + var names []string + for _, entry := range entries { + names = append(names, entry.Name()) + } + + return names, nil +} + +func ReadFile(filename string) ([]byte, error) { + return os.ReadFile(filename) +} + +func MkdirTemp(dir, pattern string) (string, error) { + return os.MkdirTemp(dir, pattern) +} + +func WriteFile(filename string, data []byte) error { + return os.WriteFile(filename, data, 0644) +} diff --git a/vendor/github.com/onsi/gomega/internal/gutil/using_ioutil.go b/vendor/github.com/onsi/gomega/internal/gutil/using_ioutil.go new file mode 100644 index 000000000..5c0ce1ee3 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/gutil/using_ioutil.go @@ -0,0 +1,47 @@ +//go:build !go1.16 +// +build !go1.16 + +// Package gutil is a replacement for ioutil, which should not be used in new +// code as of Go 1.16. With Go 1.15 and lower, this implementation +// uses the ioutil functions, meaning that although Gomega is not officially +// supported on these versions, it is still likely to work. +package gutil + +import ( + "io" + "io/ioutil" +) + +func NopCloser(r io.Reader) io.ReadCloser { + return ioutil.NopCloser(r) +} + +func ReadAll(r io.Reader) ([]byte, error) { + return ioutil.ReadAll(r) +} + +func ReadDir(dirname string) ([]string, error) { + files, err := ioutil.ReadDir(dirname) + if err != nil { + return nil, err + } + + var names []string + for _, file := range files { + names = append(names, file.Name()) + } + + return names, nil +} + +func ReadFile(filename string) ([]byte, error) { + return ioutil.ReadFile(filename) +} + +func MkdirTemp(dir, pattern string) (string, error) { + return ioutil.TempDir(dir, pattern) +} + +func WriteFile(filename string, data []byte) error { + return ioutil.WriteFile(filename, data, 0644) +} diff --git a/vendor/github.com/onsi/gomega/internal/polling_signal_error.go b/vendor/github.com/onsi/gomega/internal/polling_signal_error.go new file mode 100644 index 000000000..3a4f7ddd9 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/polling_signal_error.go @@ -0,0 +1,117 @@ +package internal + +import ( + "errors" + "fmt" + "time" +) + +type PollingSignalErrorType int + +const ( + PollingSignalErrorTypeStopTrying PollingSignalErrorType = iota + PollingSignalErrorTypeTryAgainAfter +) + +type PollingSignalError interface { + error + Wrap(err error) PollingSignalError + Attach(description string, obj any) PollingSignalError + Successfully() PollingSignalError + Now() +} + +var StopTrying = func(message string) PollingSignalError { + return &PollingSignalErrorImpl{ + message: message, + pollingSignalErrorType: PollingSignalErrorTypeStopTrying, + } +} + +var TryAgainAfter = func(duration time.Duration) PollingSignalError { + return &PollingSignalErrorImpl{ + message: fmt.Sprintf("told to try again after %s", duration), + duration: duration, + pollingSignalErrorType: PollingSignalErrorTypeTryAgainAfter, + } +} + +type PollingSignalErrorAttachment struct { + Description string + Object any +} + +type PollingSignalErrorImpl struct { + message string + wrappedErr error + pollingSignalErrorType PollingSignalErrorType + duration time.Duration + successful bool + Attachments []PollingSignalErrorAttachment +} + +func (s *PollingSignalErrorImpl) Wrap(err error) PollingSignalError { + s.wrappedErr = err + return s +} + +func (s *PollingSignalErrorImpl) Attach(description string, obj any) PollingSignalError { + s.Attachments = append(s.Attachments, PollingSignalErrorAttachment{description, obj}) + return s +} + +func (s *PollingSignalErrorImpl) Error() string { + if s.wrappedErr == nil { + return s.message + } else { + return s.message + ": " + s.wrappedErr.Error() + } +} + +func (s *PollingSignalErrorImpl) Unwrap() error { + if s == nil { + return nil + } + return s.wrappedErr +} + +func (s *PollingSignalErrorImpl) Successfully() PollingSignalError { + s.successful = true + return s +} + +func (s *PollingSignalErrorImpl) Now() { + panic(s) +} + +func (s *PollingSignalErrorImpl) IsStopTrying() bool { + return s.pollingSignalErrorType == PollingSignalErrorTypeStopTrying +} + +func (s *PollingSignalErrorImpl) IsSuccessful() bool { + return s.successful +} + +func (s *PollingSignalErrorImpl) IsTryAgainAfter() bool { + return s.pollingSignalErrorType == PollingSignalErrorTypeTryAgainAfter +} + +func (s *PollingSignalErrorImpl) TryAgainDuration() time.Duration { + return s.duration +} + +func AsPollingSignalError(actual interface{}) (*PollingSignalErrorImpl, bool) { + if actual == nil { + return nil, false + } + if actualErr, ok := actual.(error); ok { + var target *PollingSignalErrorImpl + if errors.As(actualErr, &target) { + return target, true + } else { + return nil, false + } + } + + return nil, false +} diff --git a/vendor/github.com/onsi/gomega/internal/vetoptdesc.go b/vendor/github.com/onsi/gomega/internal/vetoptdesc.go new file mode 100644 index 000000000..f29587641 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/vetoptdesc.go @@ -0,0 +1,22 @@ +package internal + +import ( + "fmt" + + "github.com/onsi/gomega/types" +) + +// vetOptionalDescription vets the optional description args: if it finds any +// Gomega matcher at the beginning it panics. This allows for rendering Gomega +// matchers as part of an optional Description, as long as they're not in the +// first slot. +func vetOptionalDescription(assertion string, optionalDescription ...interface{}) { + if len(optionalDescription) == 0 { + return + } + if _, isGomegaMatcher := optionalDescription[0].(types.GomegaMatcher); isGomegaMatcher { + panic(fmt.Sprintf("%s has a GomegaMatcher as the first element of optionalDescription.\n\t"+ + "Do you mean to use And/Or/SatisfyAll/SatisfyAny to combine multiple matchers?", + assertion)) + } +} diff --git a/vendor/github.com/onsi/gomega/matchers.go b/vendor/github.com/onsi/gomega/matchers.go new file mode 100644 index 000000000..7ef27dc9c --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers.go @@ -0,0 +1,701 @@ +package gomega + +import ( + "fmt" + "time" + + "github.com/google/go-cmp/cmp" + "github.com/onsi/gomega/matchers" + "github.com/onsi/gomega/types" +) + +// Equal uses reflect.DeepEqual to compare actual with expected. Equal is strict about +// types when performing comparisons. +// It is an error for both actual and expected to be nil. Use BeNil() instead. +func Equal(expected interface{}) types.GomegaMatcher { + return &matchers.EqualMatcher{ + Expected: expected, + } +} + +// BeEquivalentTo is more lax than Equal, allowing equality between different types. +// This is done by converting actual to have the type of expected before +// attempting equality with reflect.DeepEqual. +// It is an error for actual and expected to be nil. Use BeNil() instead. +func BeEquivalentTo(expected interface{}) types.GomegaMatcher { + return &matchers.BeEquivalentToMatcher{ + Expected: expected, + } +} + +// BeComparableTo uses gocmp.Equal from github.com/google/go-cmp (instead of reflect.DeepEqual) to perform a deep comparison. +// You can pass cmp.Option as options. +// It is an error for actual and expected to be nil. Use BeNil() instead. +func BeComparableTo(expected interface{}, opts ...cmp.Option) types.GomegaMatcher { + return &matchers.BeComparableToMatcher{ + Expected: expected, + Options: opts, + } +} + +// BeIdenticalTo uses the == operator to compare actual with expected. +// BeIdenticalTo is strict about types when performing comparisons. +// It is an error for both actual and expected to be nil. Use BeNil() instead. +func BeIdenticalTo(expected interface{}) types.GomegaMatcher { + return &matchers.BeIdenticalToMatcher{ + Expected: expected, + } +} + +// BeNil succeeds if actual is nil +func BeNil() types.GomegaMatcher { + return &matchers.BeNilMatcher{} +} + +// BeTrue succeeds if actual is true +// +// In general, it's better to use `BeTrueBecause(reason)` to provide a more useful error message if a true check fails. +func BeTrue() types.GomegaMatcher { + return &matchers.BeTrueMatcher{} +} + +// BeFalse succeeds if actual is false +// +// In general, it's better to use `BeFalseBecause(reason)` to provide a more useful error message if a false check fails. +func BeFalse() types.GomegaMatcher { + return &matchers.BeFalseMatcher{} +} + +// BeTrueBecause succeeds if actual is true and displays the provided reason if it is false +// fmt.Sprintf is used to render the reason +func BeTrueBecause(format string, args ...any) types.GomegaMatcher { + return &matchers.BeTrueMatcher{Reason: fmt.Sprintf(format, args...)} +} + +// BeFalseBecause succeeds if actual is false and displays the provided reason if it is true. +// fmt.Sprintf is used to render the reason +func BeFalseBecause(format string, args ...any) types.GomegaMatcher { + return &matchers.BeFalseMatcher{Reason: fmt.Sprintf(format, args...)} +} + +// HaveOccurred succeeds if actual is a non-nil error +// The typical Go error checking pattern looks like: +// +// err := SomethingThatMightFail() +// Expect(err).ShouldNot(HaveOccurred()) +func HaveOccurred() types.GomegaMatcher { + return &matchers.HaveOccurredMatcher{} +} + +// Succeed passes if actual is a nil error +// Succeed is intended to be used with functions that return a single error value. Instead of +// +// err := SomethingThatMightFail() +// Expect(err).ShouldNot(HaveOccurred()) +// +// You can write: +// +// Expect(SomethingThatMightFail()).Should(Succeed()) +// +// It is a mistake to use Succeed with a function that has multiple return values. Gomega's Ω and Expect +// functions automatically trigger failure if any return values after the first return value are non-zero/non-nil. +// This means that Ω(MultiReturnFunc()).ShouldNot(Succeed()) can never pass. +func Succeed() types.GomegaMatcher { + return &matchers.SucceedMatcher{} +} + +// MatchError succeeds if actual is a non-nil error that matches the passed in +// string, error, function, or matcher. +// +// These are valid use-cases: +// +// When passed a string: +// +// Expect(err).To(MatchError("an error")) +// +// asserts that err.Error() == "an error" +// +// When passed an error: +// +// Expect(err).To(MatchError(SomeError)) +// +// First checks if errors.Is(err, SomeError). +// If that fails then it checks if reflect.DeepEqual(err, SomeError) repeatedly for err and any errors wrapped by err +// +// When passed a matcher: +// +// Expect(err).To(MatchError(ContainSubstring("sprocket not found"))) +// +// the matcher is passed err.Error(). In this case it asserts that err.Error() contains substring "sprocket not found" +// +// When passed a func(err) bool and a description: +// +// Expect(err).To(MatchError(os.IsNotExist, "IsNotExist")) +// +// the function is passed err and matches if the return value is true. The description is required to allow Gomega +// to print a useful error message. +// +// It is an error for err to be nil or an object that does not implement the +// Error interface +// +// The optional second argument is a description of the error function, if used. This is required when passing a function but is ignored in all other cases. +func MatchError(expected interface{}, functionErrorDescription ...any) types.GomegaMatcher { + return &matchers.MatchErrorMatcher{ + Expected: expected, + FuncErrDescription: functionErrorDescription, + } +} + +// BeClosed succeeds if actual is a closed channel. +// It is an error to pass a non-channel to BeClosed, it is also an error to pass nil +// +// In order to check whether or not the channel is closed, Gomega must try to read from the channel +// (even in the `ShouldNot(BeClosed())` case). You should keep this in mind if you wish to make subsequent assertions about +// values coming down the channel. +// +// Also, if you are testing that a *buffered* channel is closed you must first read all values out of the channel before +// asserting that it is closed (it is not possible to detect that a buffered-channel has been closed until all its buffered values are read). +// +// Finally, as a corollary: it is an error to check whether or not a send-only channel is closed. +func BeClosed() types.GomegaMatcher { + return &matchers.BeClosedMatcher{} +} + +// Receive succeeds if there is a value to be received on actual. +// Actual must be a channel (and cannot be a send-only channel) -- anything else is an error. +// +// Receive returns immediately and never blocks: +// +// - If there is nothing on the channel `c` then Expect(c).Should(Receive()) will fail and Ω(c).ShouldNot(Receive()) will pass. +// +// - If the channel `c` is closed then Expect(c).Should(Receive()) will fail and Ω(c).ShouldNot(Receive()) will pass. +// +// - If there is something on the channel `c` ready to be read, then Expect(c).Should(Receive()) will pass and Ω(c).ShouldNot(Receive()) will fail. +// +// If you have a go-routine running in the background that will write to channel `c` you can: +// +// Eventually(c).Should(Receive()) +// +// This will timeout if nothing gets sent to `c` (you can modify the timeout interval as you normally do with `Eventually`) +// +// A similar use-case is to assert that no go-routine writes to a channel (for a period of time). You can do this with `Consistently`: +// +// Consistently(c).ShouldNot(Receive()) +// +// You can pass `Receive` a matcher. If you do so, it will match the received object against the matcher. For example: +// +// Expect(c).Should(Receive(Equal("foo"))) +// +// When given a matcher, `Receive` will always fail if there is nothing to be received on the channel. +// +// Passing Receive a matcher is especially useful when paired with Eventually: +// +// Eventually(c).Should(Receive(ContainSubstring("bar"))) +// +// will repeatedly attempt to pull values out of `c` until a value matching "bar" is received. +// +// Furthermore, if you want to have a reference to the value *sent* to the channel you can pass the `Receive` matcher a pointer to a variable of the appropriate type: +// +// var myThing thing +// Eventually(thingChan).Should(Receive(&myThing)) +// Expect(myThing.Sprocket).Should(Equal("foo")) +// Expect(myThing.IsValid()).Should(BeTrue()) +// +// Finally, if you want to match the received object as well as get the actual received value into a variable, so you can reason further about the value received, +// you can pass a pointer to a variable of the approriate type first, and second a matcher: +// +// var myThing thing +// Eventually(thingChan).Should(Receive(&myThing, ContainSubstring("bar"))) +func Receive(args ...interface{}) types.GomegaMatcher { + return &matchers.ReceiveMatcher{ + Args: args, + } +} + +// BeSent succeeds if a value can be sent to actual. +// Actual must be a channel (and cannot be a receive-only channel) that can sent the type of the value passed into BeSent -- anything else is an error. +// In addition, actual must not be closed. +// +// BeSent never blocks: +// +// - If the channel `c` is not ready to receive then Expect(c).Should(BeSent("foo")) will fail immediately +// - If the channel `c` is eventually ready to receive then Eventually(c).Should(BeSent("foo")) will succeed.. presuming the channel becomes ready to receive before Eventually's timeout +// - If the channel `c` is closed then Expect(c).Should(BeSent("foo")) and Ω(c).ShouldNot(BeSent("foo")) will both fail immediately +// +// Of course, the value is actually sent to the channel. The point of `BeSent` is less to make an assertion about the availability of the channel (which is typically an implementation detail that your test should not be concerned with). +// Rather, the point of `BeSent` is to make it possible to easily and expressively write tests that can timeout on blocked channel sends. +func BeSent(arg interface{}) types.GomegaMatcher { + return &matchers.BeSentMatcher{ + Arg: arg, + } +} + +// MatchRegexp succeeds if actual is a string or stringer that matches the +// passed-in regexp. Optional arguments can be provided to construct a regexp +// via fmt.Sprintf(). +func MatchRegexp(regexp string, args ...interface{}) types.GomegaMatcher { + return &matchers.MatchRegexpMatcher{ + Regexp: regexp, + Args: args, + } +} + +// ContainSubstring succeeds if actual is a string or stringer that contains the +// passed-in substring. Optional arguments can be provided to construct the substring +// via fmt.Sprintf(). +func ContainSubstring(substr string, args ...interface{}) types.GomegaMatcher { + return &matchers.ContainSubstringMatcher{ + Substr: substr, + Args: args, + } +} + +// HavePrefix succeeds if actual is a string or stringer that contains the +// passed-in string as a prefix. Optional arguments can be provided to construct +// via fmt.Sprintf(). +func HavePrefix(prefix string, args ...interface{}) types.GomegaMatcher { + return &matchers.HavePrefixMatcher{ + Prefix: prefix, + Args: args, + } +} + +// HaveSuffix succeeds if actual is a string or stringer that contains the +// passed-in string as a suffix. Optional arguments can be provided to construct +// via fmt.Sprintf(). +func HaveSuffix(suffix string, args ...interface{}) types.GomegaMatcher { + return &matchers.HaveSuffixMatcher{ + Suffix: suffix, + Args: args, + } +} + +// MatchJSON succeeds if actual is a string or stringer of JSON that matches +// the expected JSON. The JSONs are decoded and the resulting objects are compared via +// reflect.DeepEqual so things like key-ordering and whitespace shouldn't matter. +func MatchJSON(json interface{}) types.GomegaMatcher { + return &matchers.MatchJSONMatcher{ + JSONToMatch: json, + } +} + +// MatchXML succeeds if actual is a string or stringer of XML that matches +// the expected XML. The XMLs are decoded and the resulting objects are compared via +// reflect.DeepEqual so things like whitespaces shouldn't matter. +func MatchXML(xml interface{}) types.GomegaMatcher { + return &matchers.MatchXMLMatcher{ + XMLToMatch: xml, + } +} + +// MatchYAML succeeds if actual is a string or stringer of YAML that matches +// the expected YAML. The YAML's are decoded and the resulting objects are compared via +// reflect.DeepEqual so things like key-ordering and whitespace shouldn't matter. +func MatchYAML(yaml interface{}) types.GomegaMatcher { + return &matchers.MatchYAMLMatcher{ + YAMLToMatch: yaml, + } +} + +// BeEmpty succeeds if actual is empty. Actual must be of type string, array, map, chan, or slice. +func BeEmpty() types.GomegaMatcher { + return &matchers.BeEmptyMatcher{} +} + +// HaveLen succeeds if actual has the passed-in length. Actual must be of type string, array, map, chan, or slice. +func HaveLen(count int) types.GomegaMatcher { + return &matchers.HaveLenMatcher{ + Count: count, + } +} + +// HaveCap succeeds if actual has the passed-in capacity. Actual must be of type array, chan, or slice. +func HaveCap(count int) types.GomegaMatcher { + return &matchers.HaveCapMatcher{ + Count: count, + } +} + +// BeZero succeeds if actual is the zero value for its type or if actual is nil. +func BeZero() types.GomegaMatcher { + return &matchers.BeZeroMatcher{} +} + +// ContainElement succeeds if actual contains the passed in element. By default +// ContainElement() uses Equal() to perform the match, however a matcher can be +// passed in instead: +// +// Expect([]string{"Foo", "FooBar"}).Should(ContainElement(ContainSubstring("Bar"))) +// +// Actual must be an array, slice or map. For maps, ContainElement searches +// through the map's values. +// +// If you want to have a copy of the matching element(s) found you can pass a +// pointer to a variable of the appropriate type. If the variable isn't a slice +// or map, then exactly one match will be expected and returned. If the variable +// is a slice or map, then at least one match is expected and all matches will be +// stored in the variable. +// +// var findings []string +// Expect([]string{"Foo", "FooBar"}).Should(ContainElement(ContainSubString("Bar", &findings))) +func ContainElement(element interface{}, result ...interface{}) types.GomegaMatcher { + return &matchers.ContainElementMatcher{ + Element: element, + Result: result, + } +} + +// BeElementOf succeeds if actual is contained in the passed in elements. +// BeElementOf() always uses Equal() to perform the match. +// When the passed in elements are comprised of a single element that is either an Array or Slice, BeElementOf() behaves +// as the reverse of ContainElement() that operates with Equal() to perform the match. +// +// Expect(2).Should(BeElementOf([]int{1, 2})) +// Expect(2).Should(BeElementOf([2]int{1, 2})) +// +// Otherwise, BeElementOf() provides a syntactic sugar for Or(Equal(_), Equal(_), ...): +// +// Expect(2).Should(BeElementOf(1, 2)) +// +// Actual must be typed. +func BeElementOf(elements ...interface{}) types.GomegaMatcher { + return &matchers.BeElementOfMatcher{ + Elements: elements, + } +} + +// BeKeyOf succeeds if actual is contained in the keys of the passed in map. +// BeKeyOf() always uses Equal() to perform the match between actual and the map keys. +// +// Expect("foo").Should(BeKeyOf(map[string]bool{"foo": true, "bar": false})) +func BeKeyOf(element interface{}) types.GomegaMatcher { + return &matchers.BeKeyOfMatcher{ + Map: element, + } +} + +// ConsistOf succeeds if actual contains precisely the elements passed into the matcher. The ordering of the elements does not matter. +// By default ConsistOf() uses Equal() to match the elements, however custom matchers can be passed in instead. Here are some examples: +// +// Expect([]string{"Foo", "FooBar"}).Should(ConsistOf("FooBar", "Foo")) +// Expect([]string{"Foo", "FooBar"}).Should(ConsistOf(ContainSubstring("Bar"), "Foo")) +// Expect([]string{"Foo", "FooBar"}).Should(ConsistOf(ContainSubstring("Foo"), ContainSubstring("Foo"))) +// +// Actual must be an array, slice or map. For maps, ConsistOf matches against the map's values. +// +// You typically pass variadic arguments to ConsistOf (as in the examples above). However, if you need to pass in a slice you can provided that it +// is the only element passed in to ConsistOf: +// +// Expect([]string{"Foo", "FooBar"}).Should(ConsistOf([]string{"FooBar", "Foo"})) +// +// Note that Go's type system does not allow you to write this as ConsistOf([]string{"FooBar", "Foo"}...) as []string and []interface{} are different types - hence the need for this special rule. +func ConsistOf(elements ...interface{}) types.GomegaMatcher { + return &matchers.ConsistOfMatcher{ + Elements: elements, + } +} + +// HaveExactElements succeeds if actual contains elements that precisely match the elemets passed into the matcher. The ordering of the elements does matter. +// By default HaveExactElements() uses Equal() to match the elements, however custom matchers can be passed in instead. Here are some examples: +// +// Expect([]string{"Foo", "FooBar"}).Should(HaveExactElements("Foo", "FooBar")) +// Expect([]string{"Foo", "FooBar"}).Should(HaveExactElements("Foo", ContainSubstring("Bar"))) +// Expect([]string{"Foo", "FooBar"}).Should(HaveExactElements(ContainSubstring("Foo"), ContainSubstring("Foo"))) +// +// Actual must be an array or slice. +func HaveExactElements(elements ...interface{}) types.GomegaMatcher { + return &matchers.HaveExactElementsMatcher{ + Elements: elements, + } +} + +// ContainElements succeeds if actual contains the passed in elements. The ordering of the elements does not matter. +// By default ContainElements() uses Equal() to match the elements, however custom matchers can be passed in instead. Here are some examples: +// +// Expect([]string{"Foo", "FooBar"}).Should(ContainElements("FooBar")) +// Expect([]string{"Foo", "FooBar"}).Should(ContainElements(ContainSubstring("Bar"), "Foo")) +// +// Actual must be an array, slice or map. +// For maps, ContainElements searches through the map's values. +func ContainElements(elements ...interface{}) types.GomegaMatcher { + return &matchers.ContainElementsMatcher{ + Elements: elements, + } +} + +// HaveEach succeeds if actual solely contains elements that match the passed in element. +// Please note that if actual is empty, HaveEach always will fail. +// By default HaveEach() uses Equal() to perform the match, however a +// matcher can be passed in instead: +// +// Expect([]string{"Foo", "FooBar"}).Should(HaveEach(ContainSubstring("Foo"))) +// +// Actual must be an array, slice or map. +// For maps, HaveEach searches through the map's values. +func HaveEach(element interface{}) types.GomegaMatcher { + return &matchers.HaveEachMatcher{ + Element: element, + } +} + +// HaveKey succeeds if actual is a map with the passed in key. +// By default HaveKey uses Equal() to perform the match, however a +// matcher can be passed in instead: +// +// Expect(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKey(MatchRegexp(`.+Foo$`))) +func HaveKey(key interface{}) types.GomegaMatcher { + return &matchers.HaveKeyMatcher{ + Key: key, + } +} + +// HaveKeyWithValue succeeds if actual is a map with the passed in key and value. +// By default HaveKeyWithValue uses Equal() to perform the match, however a +// matcher can be passed in instead: +// +// Expect(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKeyWithValue("Foo", "Bar")) +// Expect(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKeyWithValue(MatchRegexp(`.+Foo$`), "Bar")) +func HaveKeyWithValue(key interface{}, value interface{}) types.GomegaMatcher { + return &matchers.HaveKeyWithValueMatcher{ + Key: key, + Value: value, + } +} + +// HaveField succeeds if actual is a struct and the value at the passed in field +// matches the passed in matcher. By default HaveField used Equal() to perform the match, +// however a matcher can be passed in in stead. +// +// The field must be a string that resolves to the name of a field in the struct. Structs can be traversed +// using the '.' delimiter. If the field ends with '()' a method named field is assumed to exist on the struct and is invoked. +// Such methods must take no arguments and return a single value: +// +// type Book struct { +// Title string +// Author Person +// } +// type Person struct { +// FirstName string +// LastName string +// DOB time.Time +// } +// Expect(book).To(HaveField("Title", "Les Miserables")) +// Expect(book).To(HaveField("Title", ContainSubstring("Les")) +// Expect(book).To(HaveField("Author.FirstName", Equal("Victor")) +// Expect(book).To(HaveField("Author.DOB.Year()", BeNumerically("<", 1900)) +func HaveField(field string, expected interface{}) types.GomegaMatcher { + return &matchers.HaveFieldMatcher{ + Field: field, + Expected: expected, + } +} + +// HaveExistingField succeeds if actual is a struct and the specified field +// exists. +// +// HaveExistingField can be combined with HaveField in order to cover use cases +// with optional fields. HaveField alone would trigger an error in such situations. +// +// Expect(MrHarmless).NotTo(And(HaveExistingField("Title"), HaveField("Title", "Supervillain"))) +func HaveExistingField(field string) types.GomegaMatcher { + return &matchers.HaveExistingFieldMatcher{ + Field: field, + } +} + +// HaveValue applies the given matcher to the value of actual, optionally and +// repeatedly dereferencing pointers or taking the concrete value of interfaces. +// Thus, the matcher will always be applied to non-pointer and non-interface +// values only. HaveValue will fail with an error if a pointer or interface is +// nil. It will also fail for more than 31 pointer or interface dereferences to +// guard against mistakenly applying it to arbitrarily deep linked pointers. +// +// HaveValue differs from gstruct.PointTo in that it does not expect actual to +// be a pointer (as gstruct.PointTo does) but instead also accepts non-pointer +// and even interface values. +// +// actual := 42 +// Expect(actual).To(HaveValue(42)) +// Expect(&actual).To(HaveValue(42)) +func HaveValue(matcher types.GomegaMatcher) types.GomegaMatcher { + return &matchers.HaveValueMatcher{ + Matcher: matcher, + } +} + +// BeNumerically performs numerical assertions in a type-agnostic way. +// Actual and expected should be numbers, though the specific type of +// number is irrelevant (float32, float64, uint8, etc...). +// +// There are six, self-explanatory, supported comparators: +// +// Expect(1.0).Should(BeNumerically("==", 1)) +// Expect(1.0).Should(BeNumerically("~", 0.999, 0.01)) +// Expect(1.0).Should(BeNumerically(">", 0.9)) +// Expect(1.0).Should(BeNumerically(">=", 1.0)) +// Expect(1.0).Should(BeNumerically("<", 3)) +// Expect(1.0).Should(BeNumerically("<=", 1.0)) +func BeNumerically(comparator string, compareTo ...interface{}) types.GomegaMatcher { + return &matchers.BeNumericallyMatcher{ + Comparator: comparator, + CompareTo: compareTo, + } +} + +// BeTemporally compares time.Time's like BeNumerically +// Actual and expected must be time.Time. The comparators are the same as for BeNumerically +// +// Expect(time.Now()).Should(BeTemporally(">", time.Time{})) +// Expect(time.Now()).Should(BeTemporally("~", time.Now(), time.Second)) +func BeTemporally(comparator string, compareTo time.Time, threshold ...time.Duration) types.GomegaMatcher { + return &matchers.BeTemporallyMatcher{ + Comparator: comparator, + CompareTo: compareTo, + Threshold: threshold, + } +} + +// BeAssignableToTypeOf succeeds if actual is assignable to the type of expected. +// It will return an error when one of the values is nil. +// +// Expect(0).Should(BeAssignableToTypeOf(0)) // Same values +// Expect(5).Should(BeAssignableToTypeOf(-1)) // different values same type +// Expect("foo").Should(BeAssignableToTypeOf("bar")) // different values same type +// Expect(struct{ Foo string }{}).Should(BeAssignableToTypeOf(struct{ Foo string }{})) +func BeAssignableToTypeOf(expected interface{}) types.GomegaMatcher { + return &matchers.AssignableToTypeOfMatcher{ + Expected: expected, + } +} + +// Panic succeeds if actual is a function that, when invoked, panics. +// Actual must be a function that takes no arguments and returns no results. +func Panic() types.GomegaMatcher { + return &matchers.PanicMatcher{} +} + +// PanicWith succeeds if actual is a function that, when invoked, panics with a specific value. +// Actual must be a function that takes no arguments and returns no results. +// +// By default PanicWith uses Equal() to perform the match, however a +// matcher can be passed in instead: +// +// Expect(fn).Should(PanicWith(MatchRegexp(`.+Foo$`))) +func PanicWith(expected interface{}) types.GomegaMatcher { + return &matchers.PanicMatcher{Expected: expected} +} + +// BeAnExistingFile succeeds if a file exists. +// Actual must be a string representing the abs path to the file being checked. +func BeAnExistingFile() types.GomegaMatcher { + return &matchers.BeAnExistingFileMatcher{} +} + +// BeARegularFile succeeds if a file exists and is a regular file. +// Actual must be a string representing the abs path to the file being checked. +func BeARegularFile() types.GomegaMatcher { + return &matchers.BeARegularFileMatcher{} +} + +// BeADirectory succeeds if a file exists and is a directory. +// Actual must be a string representing the abs path to the file being checked. +func BeADirectory() types.GomegaMatcher { + return &matchers.BeADirectoryMatcher{} +} + +// HaveHTTPStatus succeeds if the Status or StatusCode field of an HTTP response matches. +// Actual must be either a *http.Response or *httptest.ResponseRecorder. +// Expected must be either an int or a string. +// +// Expect(resp).Should(HaveHTTPStatus(http.StatusOK)) // asserts that resp.StatusCode == 200 +// Expect(resp).Should(HaveHTTPStatus("404 Not Found")) // asserts that resp.Status == "404 Not Found" +// Expect(resp).Should(HaveHTTPStatus(http.StatusOK, http.StatusNoContent)) // asserts that resp.StatusCode == 200 || resp.StatusCode == 204 +func HaveHTTPStatus(expected ...interface{}) types.GomegaMatcher { + return &matchers.HaveHTTPStatusMatcher{Expected: expected} +} + +// HaveHTTPHeaderWithValue succeeds if the header is found and the value matches. +// Actual must be either a *http.Response or *httptest.ResponseRecorder. +// Expected must be a string header name, followed by a header value which +// can be a string, or another matcher. +func HaveHTTPHeaderWithValue(header string, value interface{}) types.GomegaMatcher { + return &matchers.HaveHTTPHeaderWithValueMatcher{ + Header: header, + Value: value, + } +} + +// HaveHTTPBody matches if the body matches. +// Actual must be either a *http.Response or *httptest.ResponseRecorder. +// Expected must be either a string, []byte, or other matcher +func HaveHTTPBody(expected interface{}) types.GomegaMatcher { + return &matchers.HaveHTTPBodyMatcher{Expected: expected} +} + +// And succeeds only if all of the given matchers succeed. +// The matchers are tried in order, and will fail-fast if one doesn't succeed. +// +// Expect("hi").To(And(HaveLen(2), Equal("hi")) +// +// And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. +func And(ms ...types.GomegaMatcher) types.GomegaMatcher { + return &matchers.AndMatcher{Matchers: ms} +} + +// SatisfyAll is an alias for And(). +// +// Expect("hi").Should(SatisfyAll(HaveLen(2), Equal("hi"))) +func SatisfyAll(matchers ...types.GomegaMatcher) types.GomegaMatcher { + return And(matchers...) +} + +// Or succeeds if any of the given matchers succeed. +// The matchers are tried in order and will return immediately upon the first successful match. +// +// Expect("hi").To(Or(HaveLen(3), HaveLen(2)) +// +// And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. +func Or(ms ...types.GomegaMatcher) types.GomegaMatcher { + return &matchers.OrMatcher{Matchers: ms} +} + +// SatisfyAny is an alias for Or(). +// +// Expect("hi").SatisfyAny(Or(HaveLen(3), HaveLen(2)) +func SatisfyAny(matchers ...types.GomegaMatcher) types.GomegaMatcher { + return Or(matchers...) +} + +// Not negates the given matcher; it succeeds if the given matcher fails. +// +// Expect(1).To(Not(Equal(2)) +// +// And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. +func Not(matcher types.GomegaMatcher) types.GomegaMatcher { + return &matchers.NotMatcher{Matcher: matcher} +} + +// WithTransform applies the `transform` to the actual value and matches it against `matcher`. +// The given transform must be either a function of one parameter that returns one value or a +// function of one parameter that returns two values, where the second value must be of the +// error type. +// +// var plus1 = func(i int) int { return i + 1 } +// Expect(1).To(WithTransform(plus1, Equal(2)) +// +// var failingplus1 = func(i int) (int, error) { return 42, "this does not compute" } +// Expect(1).To(WithTransform(failingplus1, Equal(2))) +// +// And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. +func WithTransform(transform interface{}, matcher types.GomegaMatcher) types.GomegaMatcher { + return matchers.NewWithTransformMatcher(transform, matcher) +} + +// Satisfy matches the actual value against the `predicate` function. +// The given predicate must be a function of one paramter that returns bool. +// +// var isEven = func(i int) bool { return i%2 == 0 } +// Expect(2).To(Satisfy(isEven)) +func Satisfy(predicate interface{}) types.GomegaMatcher { + return matchers.NewSatisfyMatcher(predicate) +} diff --git a/vendor/github.com/onsi/gomega/matchers/and.go b/vendor/github.com/onsi/gomega/matchers/and.go new file mode 100644 index 000000000..6bd826adc --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/and.go @@ -0,0 +1,62 @@ +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/types" +) + +type AndMatcher struct { + Matchers []types.GomegaMatcher + + // state + firstFailedMatcher types.GomegaMatcher +} + +func (m *AndMatcher) Match(actual interface{}) (success bool, err error) { + m.firstFailedMatcher = nil + for _, matcher := range m.Matchers { + success, err := matcher.Match(actual) + if !success || err != nil { + m.firstFailedMatcher = matcher + return false, err + } + } + return true, nil +} + +func (m *AndMatcher) FailureMessage(actual interface{}) (message string) { + return m.firstFailedMatcher.FailureMessage(actual) +} + +func (m *AndMatcher) NegatedFailureMessage(actual interface{}) (message string) { + // not the most beautiful list of matchers, but not bad either... + return format.Message(actual, fmt.Sprintf("To not satisfy all of these matchers: %s", m.Matchers)) +} + +func (m *AndMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { + /* + Example with 3 matchers: A, B, C + + Match evaluates them: T, F, => F + So match is currently F, what should MatchMayChangeInTheFuture() return? + Seems like it only depends on B, since currently B MUST change to allow the result to become T + + Match eval: T, T, T => T + So match is currently T, what should MatchMayChangeInTheFuture() return? + Seems to depend on ANY of them being able to change to F. + */ + + if m.firstFailedMatcher == nil { + // so all matchers succeeded.. Any one of them changing would change the result. + for _, matcher := range m.Matchers { + if types.MatchMayChangeInTheFuture(matcher, actual) { + return true + } + } + return false // none of were going to change + } + // one of the matchers failed.. it must be able to change in order to affect the result + return types.MatchMayChangeInTheFuture(m.firstFailedMatcher, actual) +} diff --git a/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go b/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go new file mode 100644 index 000000000..be4839520 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go @@ -0,0 +1,37 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type AssignableToTypeOfMatcher struct { + Expected interface{} +} + +func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error) { + if actual == nil && matcher.Expected == nil { + return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") + } else if matcher.Expected == nil { + return false, fmt.Errorf("Refusing to compare type to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") + } else if actual == nil { + return false, nil + } + + actualType := reflect.TypeOf(actual) + expectedType := reflect.TypeOf(matcher.Expected) + + return actualType.AssignableTo(expectedType), nil +} + +func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interface{}) string { + return format.Message(actual, fmt.Sprintf("to be assignable to the type: %T", matcher.Expected)) +} + +func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual interface{}) string { + return format.Message(actual, fmt.Sprintf("not to be assignable to the type: %T", matcher.Expected)) +} diff --git a/vendor/github.com/onsi/gomega/matchers/attributes_slice.go b/vendor/github.com/onsi/gomega/matchers/attributes_slice.go new file mode 100644 index 000000000..355b362f4 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/attributes_slice.go @@ -0,0 +1,14 @@ +package matchers + +import ( + "encoding/xml" + "strings" +) + +type attributesSlice []xml.Attr + +func (attrs attributesSlice) Len() int { return len(attrs) } +func (attrs attributesSlice) Less(i, j int) bool { + return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1 +} +func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] } diff --git a/vendor/github.com/onsi/gomega/matchers/be_a_directory.go b/vendor/github.com/onsi/gomega/matchers/be_a_directory.go new file mode 100644 index 000000000..93d4497c7 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_a_directory.go @@ -0,0 +1,56 @@ +// untested sections: 5 + +package matchers + +import ( + "fmt" + "os" + + "github.com/onsi/gomega/format" +) + +type notADirectoryError struct { + os.FileInfo +} + +func (t notADirectoryError) Error() string { + fileInfo := os.FileInfo(t) + switch { + case fileInfo.Mode().IsRegular(): + return "file is a regular file" + default: + return fmt.Sprintf("file mode is: %s", fileInfo.Mode().String()) + } +} + +type BeADirectoryMatcher struct { + expected interface{} + err error +} + +func (matcher *BeADirectoryMatcher) Match(actual interface{}) (success bool, err error) { + actualFilename, ok := actual.(string) + if !ok { + return false, fmt.Errorf("BeADirectoryMatcher matcher expects a file path") + } + + fileInfo, err := os.Stat(actualFilename) + if err != nil { + matcher.err = err + return false, nil + } + + if !fileInfo.Mode().IsDir() { + matcher.err = notADirectoryError{fileInfo} + return false, nil + } + return true, nil +} + +func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, fmt.Sprintf("to be a directory: %s", matcher.err)) +} + +func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not be a directory") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go b/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go new file mode 100644 index 000000000..8fefc4deb --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go @@ -0,0 +1,56 @@ +// untested sections: 5 + +package matchers + +import ( + "fmt" + "os" + + "github.com/onsi/gomega/format" +) + +type notARegularFileError struct { + os.FileInfo +} + +func (t notARegularFileError) Error() string { + fileInfo := os.FileInfo(t) + switch { + case fileInfo.IsDir(): + return "file is a directory" + default: + return fmt.Sprintf("file mode is: %s", fileInfo.Mode().String()) + } +} + +type BeARegularFileMatcher struct { + expected interface{} + err error +} + +func (matcher *BeARegularFileMatcher) Match(actual interface{}) (success bool, err error) { + actualFilename, ok := actual.(string) + if !ok { + return false, fmt.Errorf("BeARegularFileMatcher matcher expects a file path") + } + + fileInfo, err := os.Stat(actualFilename) + if err != nil { + matcher.err = err + return false, nil + } + + if !fileInfo.Mode().IsRegular() { + matcher.err = notARegularFileError{fileInfo} + return false, nil + } + return true, nil +} + +func (matcher *BeARegularFileMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, fmt.Sprintf("to be a regular file: %s", matcher.err)) +} + +func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not be a regular file") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go b/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go new file mode 100644 index 000000000..e2bdd2811 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go @@ -0,0 +1,40 @@ +// untested sections: 3 + +package matchers + +import ( + "fmt" + "os" + + "github.com/onsi/gomega/format" +) + +type BeAnExistingFileMatcher struct { + expected interface{} +} + +func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool, err error) { + actualFilename, ok := actual.(string) + if !ok { + return false, fmt.Errorf("BeAnExistingFileMatcher matcher expects a file path") + } + + if _, err = os.Stat(actualFilename); err != nil { + switch { + case os.IsNotExist(err): + return false, nil + default: + return false, err + } + } + + return true, nil +} + +func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to exist") +} + +func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to exist") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go new file mode 100644 index 000000000..f13c24490 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go @@ -0,0 +1,48 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeClosedMatcher struct { +} + +func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err error) { + if !isChan(actual) { + return false, fmt.Errorf("BeClosed matcher expects a channel. Got:\n%s", format.Object(actual, 1)) + } + + channelType := reflect.TypeOf(actual) + channelValue := reflect.ValueOf(actual) + + if channelType.ChanDir() == reflect.SendDir { + return false, fmt.Errorf("BeClosed matcher cannot determine if a send-only channel is closed or open. Got:\n%s", format.Object(actual, 1)) + } + + winnerIndex, _, open := reflect.Select([]reflect.SelectCase{ + {Dir: reflect.SelectRecv, Chan: channelValue}, + {Dir: reflect.SelectDefault}, + }) + + var closed bool + if winnerIndex == 0 { + closed = !open + } else if winnerIndex == 1 { + closed = false + } + + return closed, nil +} + +func (matcher *BeClosedMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be closed") +} + +func (matcher *BeClosedMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be open") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go new file mode 100644 index 000000000..4e3897858 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go @@ -0,0 +1,49 @@ +package matchers + +import ( + "bytes" + "fmt" + + "github.com/google/go-cmp/cmp" + "github.com/onsi/gomega/format" +) + +type BeComparableToMatcher struct { + Expected interface{} + Options cmp.Options +} + +func (matcher *BeComparableToMatcher) Match(actual interface{}) (success bool, matchErr error) { + if actual == nil && matcher.Expected == nil { + return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") + } + // Shortcut for byte slices. + // Comparing long byte slices with reflect.DeepEqual is very slow, + // so use bytes.Equal if actual and expected are both byte slices. + if actualByteSlice, ok := actual.([]byte); ok { + if expectedByteSlice, ok := matcher.Expected.([]byte); ok { + return bytes.Equal(actualByteSlice, expectedByteSlice), nil + } + } + + defer func() { + if r := recover(); r != nil { + success = false + if err, ok := r.(error); ok { + matchErr = err + } else if errMsg, ok := r.(string); ok { + matchErr = fmt.Errorf(errMsg) + } + } + }() + + return cmp.Equal(actual, matcher.Expected, matcher.Options...), nil +} + +func (matcher *BeComparableToMatcher) FailureMessage(actual interface{}) (message string) { + return fmt.Sprint("Expected object to be comparable, diff: ", cmp.Diff(actual, matcher.Expected, matcher.Options...)) +} + +func (matcher *BeComparableToMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be comparable to", matcher.Expected) +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go new file mode 100644 index 000000000..9ee75a5d5 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go @@ -0,0 +1,43 @@ +// untested sections: 1 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeElementOfMatcher struct { + Elements []interface{} +} + +func (matcher *BeElementOfMatcher) Match(actual interface{}) (success bool, err error) { + if reflect.TypeOf(actual) == nil { + return false, fmt.Errorf("BeElement matcher expects actual to be typed") + } + + var lastError error + for _, m := range flatten(matcher.Elements) { + matcher := &EqualMatcher{Expected: m} + success, err := matcher.Match(actual) + if err != nil { + lastError = err + continue + } + if success { + return true, nil + } + } + + return false, lastError +} + +func (matcher *BeElementOfMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be an element of", presentable(matcher.Elements)) +} + +func (matcher *BeElementOfMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be an element of", presentable(matcher.Elements)) +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go new file mode 100644 index 000000000..bd7f0b96e --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go @@ -0,0 +1,43 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" +) + +type BeEmptyMatcher struct { +} + +func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) { + // short-circuit the iterator case, as we only need to see the first + // element, if any. + if miter.IsIter(actual) { + var length int + if miter.IsSeq2(actual) { + miter.IterateKV(actual, func(k, v reflect.Value) bool { length++; return false }) + } else { + miter.IterateV(actual, func(v reflect.Value) bool { length++; return false }) + } + return length == 0, nil + } + + length, ok := lengthOf(actual) + if !ok { + return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice/iterator. Got:\n%s", format.Object(actual, 1)) + } + + return length == 0, nil +} + +func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be empty") +} + +func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be empty") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go new file mode 100644 index 000000000..263627f40 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go @@ -0,0 +1,36 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeEquivalentToMatcher struct { + Expected interface{} +} + +func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, err error) { + if actual == nil && matcher.Expected == nil { + return false, fmt.Errorf("Both actual and expected must not be nil.") + } + + convertedActual := actual + + if actual != nil && matcher.Expected != nil && reflect.TypeOf(actual).ConvertibleTo(reflect.TypeOf(matcher.Expected)) { + convertedActual = reflect.ValueOf(actual).Convert(reflect.TypeOf(matcher.Expected)).Interface() + } + + return reflect.DeepEqual(convertedActual, matcher.Expected), nil +} + +func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be equivalent to", matcher.Expected) +} + +func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be equivalent to", matcher.Expected) +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go new file mode 100644 index 000000000..8ee2b1c51 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go @@ -0,0 +1,37 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type BeFalseMatcher struct { + Reason string +} + +func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) { + if !isBool(actual) { + return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) + } + + return actual == false, nil +} + +func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) { + if matcher.Reason == "" { + return format.Message(actual, "to be false") + } else { + return matcher.Reason + } +} + +func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) { + if matcher.Reason == "" { + return format.Message(actual, "not to be false") + } else { + return fmt.Sprintf(`Expected not false but got false\nNegation of "%s" failed`, matcher.Reason) + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_identical_to.go b/vendor/github.com/onsi/gomega/matchers/be_identical_to.go new file mode 100644 index 000000000..631ce11e3 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_identical_to.go @@ -0,0 +1,39 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + "runtime" + + "github.com/onsi/gomega/format" +) + +type BeIdenticalToMatcher struct { + Expected interface{} +} + +func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (success bool, matchErr error) { + if actual == nil && matcher.Expected == nil { + return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") + } + + defer func() { + if r := recover(); r != nil { + if _, ok := r.(runtime.Error); ok { + success = false + matchErr = nil + } + } + }() + + return actual == matcher.Expected, nil +} + +func (matcher *BeIdenticalToMatcher) FailureMessage(actual interface{}) string { + return format.Message(actual, "to be identical to", matcher.Expected) +} + +func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual interface{}) string { + return format.Message(actual, "not to be identical to", matcher.Expected) +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go new file mode 100644 index 000000000..449a291ef --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go @@ -0,0 +1,45 @@ +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeKeyOfMatcher struct { + Map interface{} +} + +func (matcher *BeKeyOfMatcher) Match(actual interface{}) (success bool, err error) { + if !isMap(matcher.Map) { + return false, fmt.Errorf("BeKeyOf matcher needs expected to be a map type") + } + + if reflect.TypeOf(actual) == nil { + return false, fmt.Errorf("BeKeyOf matcher expects actual to be typed") + } + + var lastError error + for _, key := range reflect.ValueOf(matcher.Map).MapKeys() { + matcher := &EqualMatcher{Expected: key.Interface()} + success, err := matcher.Match(actual) + if err != nil { + lastError = err + continue + } + if success { + return true, nil + } + } + + return false, lastError +} + +func (matcher *BeKeyOfMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be a key of", presentable(valuesOf(matcher.Map))) +} + +func (matcher *BeKeyOfMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be a key of", presentable(valuesOf(matcher.Map))) +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go new file mode 100644 index 000000000..551d99d74 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go @@ -0,0 +1,20 @@ +// untested sections: 2 + +package matchers + +import "github.com/onsi/gomega/format" + +type BeNilMatcher struct { +} + +func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) { + return isNil(actual), nil +} + +func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be nil") +} + +func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be nil") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go new file mode 100644 index 000000000..100735de3 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go @@ -0,0 +1,134 @@ +// untested sections: 4 + +package matchers + +import ( + "fmt" + "math" + + "github.com/onsi/gomega/format" +) + +type BeNumericallyMatcher struct { + Comparator string + CompareTo []interface{} +} + +func (matcher *BeNumericallyMatcher) FailureMessage(actual interface{}) (message string) { + return matcher.FormatFailureMessage(actual, false) +} + +func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return matcher.FormatFailureMessage(actual, true) +} + +func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual interface{}, negated bool) (message string) { + if len(matcher.CompareTo) == 1 { + message = fmt.Sprintf("to be %s", matcher.Comparator) + } else { + message = fmt.Sprintf("to be within %v of %s", matcher.CompareTo[1], matcher.Comparator) + } + if negated { + message = "not " + message + } + return format.Message(actual, message, matcher.CompareTo[0]) +} + +func (matcher *BeNumericallyMatcher) Match(actual interface{}) (success bool, err error) { + if len(matcher.CompareTo) == 0 || len(matcher.CompareTo) > 2 { + return false, fmt.Errorf("BeNumerically requires 1 or 2 CompareTo arguments. Got:\n%s", format.Object(matcher.CompareTo, 1)) + } + if !isNumber(actual) { + return false, fmt.Errorf("Expected a number. Got:\n%s", format.Object(actual, 1)) + } + if !isNumber(matcher.CompareTo[0]) { + return false, fmt.Errorf("Expected a number. Got:\n%s", format.Object(matcher.CompareTo[0], 1)) + } + if len(matcher.CompareTo) == 2 && !isNumber(matcher.CompareTo[1]) { + return false, fmt.Errorf("Expected a number. Got:\n%s", format.Object(matcher.CompareTo[1], 1)) + } + + switch matcher.Comparator { + case "==", "~", ">", ">=", "<", "<=": + default: + return false, fmt.Errorf("Unknown comparator: %s", matcher.Comparator) + } + + if isFloat(actual) || isFloat(matcher.CompareTo[0]) { + var secondOperand float64 = 1e-8 + if len(matcher.CompareTo) == 2 { + secondOperand = toFloat(matcher.CompareTo[1]) + } + success = matcher.matchFloats(toFloat(actual), toFloat(matcher.CompareTo[0]), secondOperand) + } else if isInteger(actual) { + var secondOperand int64 = 0 + if len(matcher.CompareTo) == 2 { + secondOperand = toInteger(matcher.CompareTo[1]) + } + success = matcher.matchIntegers(toInteger(actual), toInteger(matcher.CompareTo[0]), secondOperand) + } else if isUnsignedInteger(actual) { + var secondOperand uint64 = 0 + if len(matcher.CompareTo) == 2 { + secondOperand = toUnsignedInteger(matcher.CompareTo[1]) + } + success = matcher.matchUnsignedIntegers(toUnsignedInteger(actual), toUnsignedInteger(matcher.CompareTo[0]), secondOperand) + } else { + return false, fmt.Errorf("Failed to compare:\n%s\n%s:\n%s", format.Object(actual, 1), matcher.Comparator, format.Object(matcher.CompareTo[0], 1)) + } + + return success, nil +} + +func (matcher *BeNumericallyMatcher) matchIntegers(actual, compareTo, threshold int64) (success bool) { + switch matcher.Comparator { + case "==", "~": + diff := actual - compareTo + return -threshold <= diff && diff <= threshold + case ">": + return (actual > compareTo) + case ">=": + return (actual >= compareTo) + case "<": + return (actual < compareTo) + case "<=": + return (actual <= compareTo) + } + return false +} + +func (matcher *BeNumericallyMatcher) matchUnsignedIntegers(actual, compareTo, threshold uint64) (success bool) { + switch matcher.Comparator { + case "==", "~": + if actual < compareTo { + actual, compareTo = compareTo, actual + } + return actual-compareTo <= threshold + case ">": + return (actual > compareTo) + case ">=": + return (actual >= compareTo) + case "<": + return (actual < compareTo) + case "<=": + return (actual <= compareTo) + } + return false +} + +func (matcher *BeNumericallyMatcher) matchFloats(actual, compareTo, threshold float64) (success bool) { + switch matcher.Comparator { + case "~": + return math.Abs(actual-compareTo) <= threshold + case "==": + return (actual == compareTo) + case ">": + return (actual > compareTo) + case ">=": + return (actual >= compareTo) + case "<": + return (actual < compareTo) + case "<=": + return (actual <= compareTo) + } + return false +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go new file mode 100644 index 000000000..cf582a3fc --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go @@ -0,0 +1,73 @@ +// untested sections: 3 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeSentMatcher struct { + Arg interface{} + channelClosed bool +} + +func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error) { + if !isChan(actual) { + return false, fmt.Errorf("BeSent expects a channel. Got:\n%s", format.Object(actual, 1)) + } + + channelType := reflect.TypeOf(actual) + channelValue := reflect.ValueOf(actual) + + if channelType.ChanDir() == reflect.RecvDir { + return false, fmt.Errorf("BeSent matcher cannot be passed a receive-only channel. Got:\n%s", format.Object(actual, 1)) + } + + argType := reflect.TypeOf(matcher.Arg) + assignable := argType.AssignableTo(channelType.Elem()) + + if !assignable { + return false, fmt.Errorf("Cannot pass:\n%s to the channel:\n%s\nThe types don't match.", format.Object(matcher.Arg, 1), format.Object(actual, 1)) + } + + argValue := reflect.ValueOf(matcher.Arg) + + defer func() { + if e := recover(); e != nil { + success = false + err = fmt.Errorf("Cannot send to a closed channel") + matcher.channelClosed = true + } + }() + + winnerIndex, _, _ := reflect.Select([]reflect.SelectCase{ + {Dir: reflect.SelectSend, Chan: channelValue, Send: argValue}, + {Dir: reflect.SelectDefault}, + }) + + var didSend bool + if winnerIndex == 0 { + didSend = true + } + + return didSend, nil +} + +func (matcher *BeSentMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to send:", matcher.Arg) +} + +func (matcher *BeSentMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to send:", matcher.Arg) +} + +func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { + if !isChan(actual) { + return false + } + + return !matcher.channelClosed +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go new file mode 100644 index 000000000..dec4db024 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go @@ -0,0 +1,68 @@ +// untested sections: 3 + +package matchers + +import ( + "fmt" + "time" + + "github.com/onsi/gomega/format" +) + +type BeTemporallyMatcher struct { + Comparator string + CompareTo time.Time + Threshold []time.Duration +} + +func (matcher *BeTemporallyMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, fmt.Sprintf("to be %s", matcher.Comparator), matcher.CompareTo) +} + +func (matcher *BeTemporallyMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, fmt.Sprintf("not to be %s", matcher.Comparator), matcher.CompareTo) +} + +func (matcher *BeTemporallyMatcher) Match(actual interface{}) (bool, error) { + // predicate to test for time.Time type + isTime := func(t interface{}) bool { + _, ok := t.(time.Time) + return ok + } + + if !isTime(actual) { + return false, fmt.Errorf("Expected a time.Time. Got:\n%s", format.Object(actual, 1)) + } + + switch matcher.Comparator { + case "==", "~", ">", ">=", "<", "<=": + default: + return false, fmt.Errorf("Unknown comparator: %s", matcher.Comparator) + } + + var threshold = time.Millisecond + if len(matcher.Threshold) == 1 { + threshold = matcher.Threshold[0] + } + + return matcher.matchTimes(actual.(time.Time), matcher.CompareTo, threshold), nil +} + +func (matcher *BeTemporallyMatcher) matchTimes(actual, compareTo time.Time, threshold time.Duration) (success bool) { + switch matcher.Comparator { + case "==": + return actual.Equal(compareTo) + case "~": + diff := actual.Sub(compareTo) + return -threshold <= diff && diff <= threshold + case ">": + return actual.After(compareTo) + case ">=": + return !actual.Before(compareTo) + case "<": + return actual.Before(compareTo) + case "<=": + return !actual.After(compareTo) + } + return false +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go new file mode 100644 index 000000000..3576aac88 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go @@ -0,0 +1,37 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type BeTrueMatcher struct { + Reason string +} + +func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) { + if !isBool(actual) { + return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) + } + + return actual.(bool), nil +} + +func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) { + if matcher.Reason == "" { + return format.Message(actual, "to be true") + } else { + return matcher.Reason + } +} + +func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) { + if matcher.Reason == "" { + return format.Message(actual, "not to be true") + } else { + return fmt.Sprintf(`Expected not true but got true\nNegation of "%s" failed`, matcher.Reason) + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go new file mode 100644 index 000000000..26196f168 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go @@ -0,0 +1,28 @@ +package matchers + +import ( + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeZeroMatcher struct { +} + +func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) { + if actual == nil { + return true, nil + } + zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() + + return reflect.DeepEqual(zeroValue, actual), nil + +} + +func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to be zero-valued") +} + +func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to be zero-valued") +} diff --git a/vendor/github.com/onsi/gomega/matchers/consist_of.go b/vendor/github.com/onsi/gomega/matchers/consist_of.go new file mode 100644 index 000000000..a11188182 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/consist_of.go @@ -0,0 +1,177 @@ +// untested sections: 3 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" + "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph" +) + +type ConsistOfMatcher struct { + Elements []interface{} + missingElements []interface{} + extraElements []interface{} +} + +func (matcher *ConsistOfMatcher) Match(actual interface{}) (success bool, err error) { + if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) { + return false, fmt.Errorf("ConsistOf matcher expects an array/slice/map/iter.Seq/iter.Seq2. Got:\n%s", format.Object(actual, 1)) + } + + matchers := matchers(matcher.Elements) + values := valuesOf(actual) + + bipartiteGraph, err := bipartitegraph.NewBipartiteGraph(values, matchers, neighbours) + if err != nil { + return false, err + } + + edges := bipartiteGraph.LargestMatching() + if len(edges) == len(values) && len(edges) == len(matchers) { + return true, nil + } + + var missingMatchers []interface{} + matcher.extraElements, missingMatchers = bipartiteGraph.FreeLeftRight(edges) + matcher.missingElements = equalMatchersToElements(missingMatchers) + + return false, nil +} + +func neighbours(value, matcher interface{}) (bool, error) { + match, err := matcher.(omegaMatcher).Match(value) + return match && err == nil, nil +} + +func equalMatchersToElements(matchers []interface{}) (elements []interface{}) { + for _, matcher := range matchers { + if equalMatcher, ok := matcher.(*EqualMatcher); ok { + elements = append(elements, equalMatcher.Expected) + } else if _, ok := matcher.(*BeNilMatcher); ok { + elements = append(elements, nil) + } else { + elements = append(elements, matcher) + } + } + return +} + +func flatten(elems []interface{}) []interface{} { + if len(elems) != 1 || + !(isArrayOrSlice(elems[0]) || + (miter.IsIter(elems[0]) && !miter.IsSeq2(elems[0]))) { + return elems + } + + if miter.IsIter(elems[0]) { + flattened := []any{} + miter.IterateV(elems[0], func(v reflect.Value) bool { + flattened = append(flattened, v.Interface()) + return true + }) + return flattened + } + + value := reflect.ValueOf(elems[0]) + flattened := make([]interface{}, value.Len()) + for i := 0; i < value.Len(); i++ { + flattened[i] = value.Index(i).Interface() + } + return flattened +} + +func matchers(expectedElems []interface{}) (matchers []interface{}) { + for _, e := range flatten(expectedElems) { + if e == nil { + matchers = append(matchers, &BeNilMatcher{}) + } else if matcher, isMatcher := e.(omegaMatcher); isMatcher { + matchers = append(matchers, matcher) + } else { + matchers = append(matchers, &EqualMatcher{Expected: e}) + } + } + return +} + +func presentable(elems []interface{}) interface{} { + elems = flatten(elems) + + if len(elems) == 0 { + return []interface{}{} + } + + sv := reflect.ValueOf(elems) + firstEl := sv.Index(0) + if firstEl.IsNil() { + return elems + } + tt := firstEl.Elem().Type() + for i := 1; i < sv.Len(); i++ { + el := sv.Index(i) + if el.IsNil() || (sv.Index(i).Elem().Type() != tt) { + return elems + } + } + + ss := reflect.MakeSlice(reflect.SliceOf(tt), sv.Len(), sv.Len()) + for i := 0; i < sv.Len(); i++ { + ss.Index(i).Set(sv.Index(i).Elem()) + } + + return ss.Interface() +} + +func valuesOf(actual interface{}) []interface{} { + value := reflect.ValueOf(actual) + values := []interface{}{} + if miter.IsIter(actual) { + if miter.IsSeq2(actual) { + miter.IterateKV(actual, func(k, v reflect.Value) bool { + values = append(values, v.Interface()) + return true + }) + } else { + miter.IterateV(actual, func(v reflect.Value) bool { + values = append(values, v.Interface()) + return true + }) + } + } else if isMap(actual) { + keys := value.MapKeys() + for i := 0; i < value.Len(); i++ { + values = append(values, value.MapIndex(keys[i]).Interface()) + } + } else { + for i := 0; i < value.Len(); i++ { + values = append(values, value.Index(i).Interface()) + } + } + + return values +} + +func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (message string) { + message = format.Message(actual, "to consist of", presentable(matcher.Elements)) + message = appendMissingElements(message, matcher.missingElements) + if len(matcher.extraElements) > 0 { + message = fmt.Sprintf("%s\nthe extra elements were\n%s", message, + format.Object(presentable(matcher.extraElements), 1)) + } + return +} + +func appendMissingElements(message string, missingElements []interface{}) string { + if len(missingElements) == 0 { + return message + } + return fmt.Sprintf("%s\nthe missing elements were\n%s", message, + format.Object(presentable(missingElements), 1)) +} + +func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to consist of", presentable(matcher.Elements)) +} diff --git a/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go new file mode 100644 index 000000000..830239c7b --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go @@ -0,0 +1,293 @@ +// untested sections: 2 + +package matchers + +import ( + "errors" + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" +) + +type ContainElementMatcher struct { + Element interface{} + Result []interface{} +} + +func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, err error) { + if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) { + return false, fmt.Errorf("ContainElement matcher expects an array/slice/map/iterator. Got:\n%s", format.Object(actual, 1)) + } + + var actualT reflect.Type + var result reflect.Value + switch numResultArgs := len(matcher.Result); { + case numResultArgs > 1: + return false, errors.New("ContainElement matcher expects at most a single optional pointer to store its findings at") + case numResultArgs == 1: + // Check the optional result arg to point to a single value/array/slice/map + // of a type compatible with the actual value. + if reflect.ValueOf(matcher.Result[0]).Kind() != reflect.Ptr { + return false, fmt.Errorf("ContainElement matcher expects a non-nil pointer to store its findings at. Got\n%s", + format.Object(matcher.Result[0], 1)) + } + actualT = reflect.TypeOf(actual) + resultReference := matcher.Result[0] + result = reflect.ValueOf(resultReference).Elem() // what ResultReference points to, to stash away our findings + switch result.Kind() { + case reflect.Array: // result arrays are not supported, as they cannot be dynamically sized. + if miter.IsIter(actual) { + _, actualvT := miter.IterKVTypes(actual) + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + reflect.SliceOf(actualvT), result.Type().String()) + } + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + reflect.SliceOf(actualT.Elem()).String(), result.Type().String()) + + case reflect.Slice: // result slice + // can we assign elements in actual to elements in what the result + // arg points to? + // - ✔ actual is an array or slice + // - ✔ actual is an iter.Seq producing "v" elements + // - ✔ actual is an iter.Seq2 producing "v" elements, ignoring + // the "k" elements. + switch { + case isArrayOrSlice(actual): + if !actualT.Elem().AssignableTo(result.Type().Elem()) { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + actualT.String(), result.Type().String()) + } + + case miter.IsIter(actual): + _, actualvT := miter.IterKVTypes(actual) + if !actualvT.AssignableTo(result.Type().Elem()) { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + actualvT.String(), result.Type().String()) + } + + default: // incompatible result reference + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + reflect.MapOf(actualT.Key(), actualT.Elem()).String(), result.Type().String()) + } + + case reflect.Map: // result map + // can we assign elements in actual to elements in what the result + // arg points to? + // - ✔ actual is a map + // - ✔ actual is an iter.Seq2 (iter.Seq doesn't fit though) + switch { + case isMap(actual): + if !actualT.AssignableTo(result.Type()) { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + actualT.String(), result.Type().String()) + } + + case miter.IsIter(actual): + actualkT, actualvT := miter.IterKVTypes(actual) + if actualkT == nil { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + reflect.SliceOf(actualvT).String(), result.Type().String()) + } + if !reflect.MapOf(actualkT, actualvT).AssignableTo(result.Type()) { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + reflect.MapOf(actualkT, actualvT), result.Type().String()) + } + + default: // incompatible result reference + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + actualT.String(), result.Type().String()) + } + + default: + // can we assign a (single) element in actual to what the result arg + // points to? + switch { + case miter.IsIter(actual): + _, actualvT := miter.IterKVTypes(actual) + if !actualvT.AssignableTo(result.Type()) { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + actualvT.String(), result.Type().String()) + } + default: + if !actualT.Elem().AssignableTo(result.Type()) { + return false, fmt.Errorf("ContainElement cannot return findings. Need *%s, got *%s", + actualT.Elem().String(), result.Type().String()) + } + } + } + } + + // If the supplied matcher isn't an Omega matcher, default to the Equal + // matcher. + elemMatcher, elementIsMatcher := matcher.Element.(omegaMatcher) + if !elementIsMatcher { + elemMatcher = &EqualMatcher{Expected: matcher.Element} + } + + value := reflect.ValueOf(actual) + + var getFindings func() reflect.Value // abstracts how the findings are collected and stored + var lastError error + + if !miter.IsIter(actual) { + var valueAt func(int) interface{} + var foundAt func(int) + // We're dealing with an array/slice/map, so in all cases we can iterate + // over the elements in actual using indices (that can be considered + // keys in case of maps). + if isMap(actual) { + keys := value.MapKeys() + valueAt = func(i int) interface{} { + return value.MapIndex(keys[i]).Interface() + } + if result.Kind() != reflect.Invalid { + fm := reflect.MakeMap(actualT) + getFindings = func() reflect.Value { return fm } + foundAt = func(i int) { + fm.SetMapIndex(keys[i], value.MapIndex(keys[i])) + } + } + } else { + valueAt = func(i int) interface{} { + return value.Index(i).Interface() + } + if result.Kind() != reflect.Invalid { + var fsl reflect.Value + if result.Kind() == reflect.Slice { + fsl = reflect.MakeSlice(result.Type(), 0, 0) + } else { + fsl = reflect.MakeSlice(reflect.SliceOf(result.Type()), 0, 0) + } + getFindings = func() reflect.Value { return fsl } + foundAt = func(i int) { + fsl = reflect.Append(fsl, value.Index(i)) + } + } + } + + for i := 0; i < value.Len(); i++ { + elem := valueAt(i) + success, err := elemMatcher.Match(elem) + if err != nil { + lastError = err + continue + } + if success { + if result.Kind() == reflect.Invalid { + return true, nil + } + foundAt(i) + } + } + } else { + // We're dealing with an iterator as a first-class construct, so things + // are slightly different: there is no index defined as in case of + // arrays/slices/maps, just "ooooorder" + var found func(k, v reflect.Value) + if result.Kind() != reflect.Invalid { + if result.Kind() == reflect.Map { + fm := reflect.MakeMap(result.Type()) + getFindings = func() reflect.Value { return fm } + found = func(k, v reflect.Value) { fm.SetMapIndex(k, v) } + } else { + var fsl reflect.Value + if result.Kind() == reflect.Slice { + fsl = reflect.MakeSlice(result.Type(), 0, 0) + } else { + fsl = reflect.MakeSlice(reflect.SliceOf(result.Type()), 0, 0) + } + getFindings = func() reflect.Value { return fsl } + found = func(_, v reflect.Value) { fsl = reflect.Append(fsl, v) } + } + } + + success := false + actualkT, _ := miter.IterKVTypes(actual) + if actualkT == nil { + miter.IterateV(actual, func(v reflect.Value) bool { + var err error + success, err = elemMatcher.Match(v.Interface()) + if err != nil { + lastError = err + return true // iterate on... + } + if success { + if result.Kind() == reflect.Invalid { + return false // a match and no result needed, so we're done + } + found(reflect.Value{}, v) + } + return true // iterate on... + }) + } else { + miter.IterateKV(actual, func(k, v reflect.Value) bool { + var err error + success, err = elemMatcher.Match(v.Interface()) + if err != nil { + lastError = err + return true // iterate on... + } + if success { + if result.Kind() == reflect.Invalid { + return false // a match and no result needed, so we're done + } + found(k, v) + } + return true // iterate on... + }) + } + if success && result.Kind() == reflect.Invalid { + return true, nil + } + } + + // when the expectation isn't interested in the findings except for success + // or non-success, then we're done here and return the last matcher error + // seen, if any, as well as non-success. + if result.Kind() == reflect.Invalid { + return false, lastError + } + + // pick up any findings the test is interested in as it specified a non-nil + // result reference. However, the expection always is that there are at + // least one or multiple findings. So, if a result is expected, but we had + // no findings, then this is an error. + findings := getFindings() + if findings.Len() == 0 { + return false, lastError + } + + // there's just a single finding and the result is neither a slice nor a map + // (so it's a scalar): pick the one and only finding and return it in the + // place the reference points to. + if findings.Len() == 1 && !isArrayOrSlice(result.Interface()) && !isMap(result.Interface()) { + if isMap(actual) { + miter := findings.MapRange() + miter.Next() + result.Set(miter.Value()) + } else { + result.Set(findings.Index(0)) + } + return true, nil + } + + // at least one or even multiple findings and a the result references a + // slice or a map, so all we need to do is to store our findings where the + // reference points to. + if !findings.Type().AssignableTo(result.Type()) { + return false, fmt.Errorf("ContainElement cannot return multiple findings. Need *%s, got *%s", + findings.Type().String(), result.Type().String()) + } + result.Set(findings) + return true, nil +} + +func (matcher *ContainElementMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to contain element matching", matcher.Element) +} + +func (matcher *ContainElementMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to contain element matching", matcher.Element) +} diff --git a/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go new file mode 100644 index 000000000..d9fcb8b80 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go @@ -0,0 +1,45 @@ +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" + "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph" +) + +type ContainElementsMatcher struct { + Elements []interface{} + missingElements []interface{} +} + +func (matcher *ContainElementsMatcher) Match(actual interface{}) (success bool, err error) { + if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) { + return false, fmt.Errorf("ContainElements matcher expects an array/slice/map/iter.Seq/iter.Seq2. Got:\n%s", format.Object(actual, 1)) + } + + matchers := matchers(matcher.Elements) + bipartiteGraph, err := bipartitegraph.NewBipartiteGraph(valuesOf(actual), matchers, neighbours) + if err != nil { + return false, err + } + + edges := bipartiteGraph.LargestMatching() + if len(edges) == len(matchers) { + return true, nil + } + + _, missingMatchers := bipartiteGraph.FreeLeftRight(edges) + matcher.missingElements = equalMatchersToElements(missingMatchers) + + return false, nil +} + +func (matcher *ContainElementsMatcher) FailureMessage(actual interface{}) (message string) { + message = format.Message(actual, "to contain elements", presentable(matcher.Elements)) + return appendMissingElements(message, matcher.missingElements) +} + +func (matcher *ContainElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to contain elements", presentable(matcher.Elements)) +} diff --git a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go new file mode 100644 index 000000000..e725f8c27 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go @@ -0,0 +1,40 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + "strings" + + "github.com/onsi/gomega/format" +) + +type ContainSubstringMatcher struct { + Substr string + Args []interface{} +} + +func (matcher *ContainSubstringMatcher) Match(actual interface{}) (success bool, err error) { + actualString, ok := toString(actual) + if !ok { + return false, fmt.Errorf("ContainSubstring matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) + } + + return strings.Contains(actualString, matcher.stringToMatch()), nil +} + +func (matcher *ContainSubstringMatcher) stringToMatch() string { + stringToMatch := matcher.Substr + if len(matcher.Args) > 0 { + stringToMatch = fmt.Sprintf(matcher.Substr, matcher.Args...) + } + return stringToMatch +} + +func (matcher *ContainSubstringMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to contain substring", matcher.stringToMatch()) +} + +func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to contain substring", matcher.stringToMatch()) +} diff --git a/vendor/github.com/onsi/gomega/matchers/equal_matcher.go b/vendor/github.com/onsi/gomega/matchers/equal_matcher.go new file mode 100644 index 000000000..befb7bdfd --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/equal_matcher.go @@ -0,0 +1,42 @@ +package matchers + +import ( + "bytes" + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type EqualMatcher struct { + Expected interface{} +} + +func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) { + if actual == nil && matcher.Expected == nil { + return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") + } + // Shortcut for byte slices. + // Comparing long byte slices with reflect.DeepEqual is very slow, + // so use bytes.Equal if actual and expected are both byte slices. + if actualByteSlice, ok := actual.([]byte); ok { + if expectedByteSlice, ok := matcher.Expected.([]byte); ok { + return bytes.Equal(actualByteSlice, expectedByteSlice), nil + } + } + return reflect.DeepEqual(actual, matcher.Expected), nil +} + +func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) { + actualString, actualOK := actual.(string) + expectedString, expectedOK := matcher.Expected.(string) + if actualOK && expectedOK { + return format.MessageWithDiff(actualString, "to equal", expectedString) + } + + return format.Message(actual, "to equal", matcher.Expected) +} + +func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to equal", matcher.Expected) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go new file mode 100644 index 000000000..9856752f1 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go @@ -0,0 +1,30 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type HaveCapMatcher struct { + Count int +} + +func (matcher *HaveCapMatcher) Match(actual interface{}) (success bool, err error) { + length, ok := capOf(actual) + if !ok { + return false, fmt.Errorf("HaveCap matcher expects a array/channel/slice. Got:\n%s", format.Object(actual, 1)) + } + + return length == matcher.Count, nil +} + +func (matcher *HaveCapMatcher) FailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\nto have capacity %d", format.Object(actual, 1), matcher.Count) +} + +func (matcher *HaveCapMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\nnot to have capacity %d", format.Object(actual, 1), matcher.Count) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_each_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_each_matcher.go new file mode 100644 index 000000000..4111f2b86 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_each_matcher.go @@ -0,0 +1,99 @@ +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" +) + +type HaveEachMatcher struct { + Element interface{} +} + +func (matcher *HaveEachMatcher) Match(actual interface{}) (success bool, err error) { + if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) { + return false, fmt.Errorf("HaveEach matcher expects an array/slice/map/iter.Seq/iter.Seq2. Got:\n%s", + format.Object(actual, 1)) + } + + elemMatcher, elementIsMatcher := matcher.Element.(omegaMatcher) + if !elementIsMatcher { + elemMatcher = &EqualMatcher{Expected: matcher.Element} + } + + if miter.IsIter(actual) { + // rejecting the non-elements case works different for iterators as we + // don't want to fetch all elements into a slice first. + count := 0 + var success bool + var err error + if miter.IsSeq2(actual) { + miter.IterateKV(actual, func(k, v reflect.Value) bool { + count++ + success, err = elemMatcher.Match(v.Interface()) + if err != nil { + return false + } + return success + }) + } else { + miter.IterateV(actual, func(v reflect.Value) bool { + count++ + success, err = elemMatcher.Match(v.Interface()) + if err != nil { + return false + } + return success + }) + } + if count == 0 { + return false, fmt.Errorf("HaveEach matcher expects a non-empty iter.Seq/iter.Seq2. Got:\n%s", + format.Object(actual, 1)) + } + return success, err + } + + value := reflect.ValueOf(actual) + if value.Len() == 0 { + return false, fmt.Errorf("HaveEach matcher expects a non-empty array/slice/map. Got:\n%s", + format.Object(actual, 1)) + } + + var valueAt func(int) interface{} + if isMap(actual) { + keys := value.MapKeys() + valueAt = func(i int) interface{} { + return value.MapIndex(keys[i]).Interface() + } + } else { + valueAt = func(i int) interface{} { + return value.Index(i).Interface() + } + } + + // if we never failed then we succeed; the empty/nil cases have already been + // rejected above. + for i := 0; i < value.Len(); i++ { + success, err := elemMatcher.Match(valueAt(i)) + if err != nil { + return false, err + } + if !success { + return false, nil + } + } + + return true, nil +} + +// FailureMessage returns a suitable failure message. +func (matcher *HaveEachMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to contain element matching", matcher.Element) +} + +// NegatedFailureMessage returns a suitable negated failure message. +func (matcher *HaveEachMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to contain element matching", matcher.Element) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go b/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go new file mode 100644 index 000000000..23799f1c6 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go @@ -0,0 +1,136 @@ +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" +) + +type mismatchFailure struct { + failure string + index int +} + +type HaveExactElementsMatcher struct { + Elements []interface{} + mismatchFailures []mismatchFailure + missingIndex int + extraIndex int +} + +func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool, err error) { + matcher.resetState() + + if isMap(actual) || miter.IsSeq2(actual) { + return false, fmt.Errorf("HaveExactElements matcher doesn't work on map or iter.Seq2. Got:\n%s", format.Object(actual, 1)) + } + + matchers := matchers(matcher.Elements) + lenMatchers := len(matchers) + + success = true + + if miter.IsIter(actual) { + // In the worst case, we need to see everything before we can give our + // verdict. The only exception is fast fail. + i := 0 + miter.IterateV(actual, func(v reflect.Value) bool { + if i >= lenMatchers { + // the iterator produces more values than we got matchers: this + // is not good. + matcher.extraIndex = i + success = false + return false + } + + elemMatcher := matchers[i].(omegaMatcher) + match, err := elemMatcher.Match(v.Interface()) + if err != nil { + matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{ + index: i, + failure: err.Error(), + }) + success = false + } else if !match { + matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{ + index: i, + failure: elemMatcher.FailureMessage(v.Interface()), + }) + success = false + } + i++ + return true + }) + if i < len(matchers) { + // the iterator produced less values than we got matchers: this is + // no good, no no no. + matcher.missingIndex = i + success = false + } + return success, nil + } + + values := valuesOf(actual) + lenValues := len(values) + + for i := 0; i < lenMatchers || i < lenValues; i++ { + if i >= lenMatchers { + matcher.extraIndex = i + success = false + continue + } + + if i >= lenValues { + matcher.missingIndex = i + success = false + return + } + + elemMatcher := matchers[i].(omegaMatcher) + match, err := elemMatcher.Match(values[i]) + if err != nil { + matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{ + index: i, + failure: err.Error(), + }) + success = false + } else if !match { + matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{ + index: i, + failure: elemMatcher.FailureMessage(values[i]), + }) + success = false + } + } + + return success, nil +} + +func (matcher *HaveExactElementsMatcher) FailureMessage(actual interface{}) (message string) { + message = format.Message(actual, "to have exact elements with", presentable(matcher.Elements)) + if matcher.missingIndex > 0 { + message = fmt.Sprintf("%s\nthe missing elements start from index %d", message, matcher.missingIndex) + } + if matcher.extraIndex > 0 { + message = fmt.Sprintf("%s\nthe extra elements start from index %d", message, matcher.extraIndex) + } + if len(matcher.mismatchFailures) != 0 { + message = fmt.Sprintf("%s\nthe mismatch indexes were:", message) + } + for _, mismatch := range matcher.mismatchFailures { + message = fmt.Sprintf("%s\n%d: %s", message, mismatch.index, mismatch.failure) + } + return +} + +func (matcher *HaveExactElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to contain elements", presentable(matcher.Elements)) +} + +func (matcher *HaveExactElementsMatcher) resetState() { + matcher.mismatchFailures = nil + matcher.missingIndex = 0 + matcher.extraIndex = 0 +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go new file mode 100644 index 000000000..b57018745 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go @@ -0,0 +1,36 @@ +package matchers + +import ( + "errors" + "fmt" + + "github.com/onsi/gomega/format" +) + +type HaveExistingFieldMatcher struct { + Field string +} + +func (matcher *HaveExistingFieldMatcher) Match(actual interface{}) (success bool, err error) { + // we don't care about the field's actual value, just about any error in + // trying to find the field (or method). + _, err = extractField(actual, matcher.Field, "HaveExistingField") + if err == nil { + return true, nil + } + var mferr missingFieldError + if errors.As(err, &mferr) { + // missing field errors aren't errors in this context, but instead + // unsuccessful matches. + return false, nil + } + return false, err +} + +func (matcher *HaveExistingFieldMatcher) FailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\nto have field '%s'", format.Object(actual, 1), matcher.Field) +} + +func (matcher *HaveExistingFieldMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\nnot to have field '%s'", format.Object(actual, 1), matcher.Field) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_field.go b/vendor/github.com/onsi/gomega/matchers/have_field.go new file mode 100644 index 000000000..293457e85 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_field.go @@ -0,0 +1,114 @@ +package matchers + +import ( + "fmt" + "reflect" + "strings" + + "github.com/onsi/gomega/format" +) + +// missingFieldError represents a missing field extraction error that +// HaveExistingFieldMatcher can ignore, as opposed to other, sever field +// extraction errors, such as nil pointers, et cetera. +type missingFieldError string + +func (e missingFieldError) Error() string { + return string(e) +} + +func extractField(actual interface{}, field string, matchername string) (any, error) { + fields := strings.SplitN(field, ".", 2) + actualValue := reflect.ValueOf(actual) + + if actualValue.Kind() == reflect.Ptr { + actualValue = actualValue.Elem() + } + if actualValue == (reflect.Value{}) { + return nil, fmt.Errorf("%s encountered nil while dereferencing a pointer of type %T.", matchername, actual) + } + + if actualValue.Kind() != reflect.Struct { + return nil, fmt.Errorf("%s encountered:\n%s\nWhich is not a struct.", matchername, format.Object(actual, 1)) + } + + var extractedValue reflect.Value + + if strings.HasSuffix(fields[0], "()") { + extractedValue = actualValue.MethodByName(strings.TrimSuffix(fields[0], "()")) + if extractedValue == (reflect.Value{}) && actualValue.CanAddr() { + extractedValue = actualValue.Addr().MethodByName(strings.TrimSuffix(fields[0], "()")) + } + if extractedValue == (reflect.Value{}) { + ptr := reflect.New(actualValue.Type()) + ptr.Elem().Set(actualValue) + extractedValue = ptr.MethodByName(strings.TrimSuffix(fields[0], "()")) + if extractedValue == (reflect.Value{}) { + return nil, missingFieldError(fmt.Sprintf("%s could not find method named '%s' in struct of type %T.", matchername, fields[0], actual)) + } + } + t := extractedValue.Type() + if t.NumIn() != 0 || t.NumOut() != 1 { + return nil, fmt.Errorf("%s found an invalid method named '%s' in struct of type %T.\nMethods must take no arguments and return exactly one value.", matchername, fields[0], actual) + } + extractedValue = extractedValue.Call([]reflect.Value{})[0] + } else { + extractedValue = actualValue.FieldByName(fields[0]) + if extractedValue == (reflect.Value{}) { + return nil, missingFieldError(fmt.Sprintf("%s could not find field named '%s' in struct:\n%s", matchername, fields[0], format.Object(actual, 1))) + } + } + + if len(fields) == 1 { + return extractedValue.Interface(), nil + } else { + return extractField(extractedValue.Interface(), fields[1], matchername) + } +} + +type HaveFieldMatcher struct { + Field string + Expected interface{} +} + +func (matcher *HaveFieldMatcher) expectedMatcher() omegaMatcher { + var isMatcher bool + expectedMatcher, isMatcher := matcher.Expected.(omegaMatcher) + if !isMatcher { + expectedMatcher = &EqualMatcher{Expected: matcher.Expected} + } + return expectedMatcher +} + +func (matcher *HaveFieldMatcher) Match(actual interface{}) (success bool, err error) { + extractedField, err := extractField(actual, matcher.Field, "HaveField") + if err != nil { + return false, err + } + + return matcher.expectedMatcher().Match(extractedField) +} + +func (matcher *HaveFieldMatcher) FailureMessage(actual interface{}) (message string) { + extractedField, err := extractField(actual, matcher.Field, "HaveField") + if err != nil { + // this really shouldn't happen + return fmt.Sprintf("Failed to extract field '%s': %s", matcher.Field, err) + } + message = fmt.Sprintf("Value for field '%s' failed to satisfy matcher.\n", matcher.Field) + message += matcher.expectedMatcher().FailureMessage(extractedField) + + return message +} + +func (matcher *HaveFieldMatcher) NegatedFailureMessage(actual interface{}) (message string) { + extractedField, err := extractField(actual, matcher.Field, "HaveField") + if err != nil { + // this really shouldn't happen + return fmt.Sprintf("Failed to extract field '%s': %s", matcher.Field, err) + } + message = fmt.Sprintf("Value for field '%s' satisfied matcher, but should not have.\n", matcher.Field) + message += matcher.expectedMatcher().NegatedFailureMessage(extractedField) + + return message +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go new file mode 100644 index 000000000..d14d9e5fc --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go @@ -0,0 +1,104 @@ +package matchers + +import ( + "fmt" + "net/http" + "net/http/httptest" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/internal/gutil" + "github.com/onsi/gomega/types" +) + +type HaveHTTPBodyMatcher struct { + Expected interface{} + cachedResponse interface{} + cachedBody []byte +} + +func (matcher *HaveHTTPBodyMatcher) Match(actual interface{}) (bool, error) { + body, err := matcher.body(actual) + if err != nil { + return false, err + } + + switch e := matcher.Expected.(type) { + case string: + return (&EqualMatcher{Expected: e}).Match(string(body)) + case []byte: + return (&EqualMatcher{Expected: e}).Match(body) + case types.GomegaMatcher: + return e.Match(body) + default: + return false, fmt.Errorf("HaveHTTPBody matcher expects string, []byte, or GomegaMatcher. Got:\n%s", format.Object(matcher.Expected, 1)) + } +} + +func (matcher *HaveHTTPBodyMatcher) FailureMessage(actual interface{}) (message string) { + body, err := matcher.body(actual) + if err != nil { + return fmt.Sprintf("failed to read body: %s", err) + } + + switch e := matcher.Expected.(type) { + case string: + return (&EqualMatcher{Expected: e}).FailureMessage(string(body)) + case []byte: + return (&EqualMatcher{Expected: e}).FailureMessage(body) + case types.GomegaMatcher: + return e.FailureMessage(body) + default: + return fmt.Sprintf("HaveHTTPBody matcher expects string, []byte, or GomegaMatcher. Got:\n%s", format.Object(matcher.Expected, 1)) + } +} + +func (matcher *HaveHTTPBodyMatcher) NegatedFailureMessage(actual interface{}) (message string) { + body, err := matcher.body(actual) + if err != nil { + return fmt.Sprintf("failed to read body: %s", err) + } + + switch e := matcher.Expected.(type) { + case string: + return (&EqualMatcher{Expected: e}).NegatedFailureMessage(string(body)) + case []byte: + return (&EqualMatcher{Expected: e}).NegatedFailureMessage(body) + case types.GomegaMatcher: + return e.NegatedFailureMessage(body) + default: + return fmt.Sprintf("HaveHTTPBody matcher expects string, []byte, or GomegaMatcher. Got:\n%s", format.Object(matcher.Expected, 1)) + } +} + +// body returns the body. It is cached because once we read it in Match() +// the Reader is closed and it is not readable again in FailureMessage() +// or NegatedFailureMessage() +func (matcher *HaveHTTPBodyMatcher) body(actual interface{}) ([]byte, error) { + if matcher.cachedResponse == actual && matcher.cachedBody != nil { + return matcher.cachedBody, nil + } + + body := func(a *http.Response) ([]byte, error) { + if a.Body != nil { + defer a.Body.Close() + var err error + matcher.cachedBody, err = gutil.ReadAll(a.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + } + return matcher.cachedBody, nil + } + + switch a := actual.(type) { + case *http.Response: + matcher.cachedResponse = a + return body(a) + case *httptest.ResponseRecorder: + matcher.cachedResponse = a + return body(a.Result()) + default: + return nil, fmt.Errorf("HaveHTTPBody matcher expects *http.Response or *httptest.ResponseRecorder. Got:\n%s", format.Object(actual, 1)) + } + +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go new file mode 100644 index 000000000..c256f452e --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go @@ -0,0 +1,81 @@ +package matchers + +import ( + "fmt" + "net/http" + "net/http/httptest" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/types" +) + +type HaveHTTPHeaderWithValueMatcher struct { + Header string + Value interface{} +} + +func (matcher *HaveHTTPHeaderWithValueMatcher) Match(actual interface{}) (success bool, err error) { + headerValue, err := matcher.extractHeader(actual) + if err != nil { + return false, err + } + + headerMatcher, err := matcher.getSubMatcher() + if err != nil { + return false, err + } + + return headerMatcher.Match(headerValue) +} + +func (matcher *HaveHTTPHeaderWithValueMatcher) FailureMessage(actual interface{}) string { + headerValue, err := matcher.extractHeader(actual) + if err != nil { + panic(err) // protected by Match() + } + + headerMatcher, err := matcher.getSubMatcher() + if err != nil { + panic(err) // protected by Match() + } + + diff := format.IndentString(headerMatcher.FailureMessage(headerValue), 1) + return fmt.Sprintf("HTTP header %q:\n%s", matcher.Header, diff) +} + +func (matcher *HaveHTTPHeaderWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string) { + headerValue, err := matcher.extractHeader(actual) + if err != nil { + panic(err) // protected by Match() + } + + headerMatcher, err := matcher.getSubMatcher() + if err != nil { + panic(err) // protected by Match() + } + + diff := format.IndentString(headerMatcher.NegatedFailureMessage(headerValue), 1) + return fmt.Sprintf("HTTP header %q:\n%s", matcher.Header, diff) +} + +func (matcher *HaveHTTPHeaderWithValueMatcher) getSubMatcher() (types.GomegaMatcher, error) { + switch m := matcher.Value.(type) { + case string: + return &EqualMatcher{Expected: matcher.Value}, nil + case types.GomegaMatcher: + return m, nil + default: + return nil, fmt.Errorf("HaveHTTPHeaderWithValue matcher must be passed a string or a GomegaMatcher. Got:\n%s", format.Object(matcher.Value, 1)) + } +} + +func (matcher *HaveHTTPHeaderWithValueMatcher) extractHeader(actual interface{}) (string, error) { + switch r := actual.(type) { + case *http.Response: + return r.Header.Get(matcher.Header), nil + case *httptest.ResponseRecorder: + return r.Result().Header.Get(matcher.Header), nil + default: + return "", fmt.Errorf("HaveHTTPHeaderWithValue matcher expects *http.Response or *httptest.ResponseRecorder. Got:\n%s", format.Object(actual, 1)) + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go new file mode 100644 index 000000000..0f66e46ec --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go @@ -0,0 +1,96 @@ +package matchers + +import ( + "fmt" + "net/http" + "net/http/httptest" + "reflect" + "strings" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/internal/gutil" +) + +type HaveHTTPStatusMatcher struct { + Expected []interface{} +} + +func (matcher *HaveHTTPStatusMatcher) Match(actual interface{}) (success bool, err error) { + var resp *http.Response + switch a := actual.(type) { + case *http.Response: + resp = a + case *httptest.ResponseRecorder: + resp = a.Result() + default: + return false, fmt.Errorf("HaveHTTPStatus matcher expects *http.Response or *httptest.ResponseRecorder. Got:\n%s", format.Object(actual, 1)) + } + + if len(matcher.Expected) == 0 { + return false, fmt.Errorf("HaveHTTPStatus matcher must be passed an int or a string. Got nothing") + } + + for _, expected := range matcher.Expected { + switch e := expected.(type) { + case int: + if resp.StatusCode == e { + return true, nil + } + case string: + if resp.Status == e { + return true, nil + } + default: + return false, fmt.Errorf("HaveHTTPStatus matcher must be passed int or string types. Got:\n%s", format.Object(expected, 1)) + } + } + + return false, nil +} + +func (matcher *HaveHTTPStatusMatcher) FailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\n%s\n%s", formatHttpResponse(actual), "to have HTTP status", matcher.expectedString()) +} + +func (matcher *HaveHTTPStatusMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\n%s\n%s", formatHttpResponse(actual), "not to have HTTP status", matcher.expectedString()) +} + +func (matcher *HaveHTTPStatusMatcher) expectedString() string { + var lines []string + for _, expected := range matcher.Expected { + lines = append(lines, format.Object(expected, 1)) + } + return strings.Join(lines, "\n") +} + +func formatHttpResponse(input interface{}) string { + var resp *http.Response + switch r := input.(type) { + case *http.Response: + resp = r + case *httptest.ResponseRecorder: + resp = r.Result() + default: + return "cannot format invalid HTTP response" + } + + body := "" + if resp.Body != nil { + defer resp.Body.Close() + data, err := gutil.ReadAll(resp.Body) + if err != nil { + data = []byte("") + } + body = format.Object(string(data), 0) + } + + var s strings.Builder + s.WriteString(fmt.Sprintf("%s<%s>: {\n", format.Indent, reflect.TypeOf(input))) + s.WriteString(fmt.Sprintf("%s%sStatus: %s\n", format.Indent, format.Indent, format.Object(resp.Status, 0))) + s.WriteString(fmt.Sprintf("%s%sStatusCode: %s\n", format.Indent, format.Indent, format.Object(resp.StatusCode, 0))) + s.WriteString(fmt.Sprintf("%s%sBody: %s\n", format.Indent, format.Indent, body)) + s.WriteString(fmt.Sprintf("%s}", format.Indent)) + + return s.String() +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go new file mode 100644 index 000000000..b62ee93cb --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go @@ -0,0 +1,71 @@ +// untested sections: 6 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" +) + +type HaveKeyMatcher struct { + Key interface{} +} + +func (matcher *HaveKeyMatcher) Match(actual interface{}) (success bool, err error) { + if !isMap(actual) && !miter.IsSeq2(actual) { + return false, fmt.Errorf("HaveKey matcher expects a map/iter.Seq2. Got:%s", format.Object(actual, 1)) + } + + keyMatcher, keyIsMatcher := matcher.Key.(omegaMatcher) + if !keyIsMatcher { + keyMatcher = &EqualMatcher{Expected: matcher.Key} + } + + if miter.IsSeq2(actual) { + var success bool + var err error + miter.IterateKV(actual, func(k, v reflect.Value) bool { + success, err = keyMatcher.Match(k.Interface()) + if err != nil { + err = fmt.Errorf("HaveKey's key matcher failed with:\n%s%s", format.Indent, err.Error()) + return false + } + return !success + }) + return success, err + } + + keys := reflect.ValueOf(actual).MapKeys() + for i := 0; i < len(keys); i++ { + success, err := keyMatcher.Match(keys[i].Interface()) + if err != nil { + return false, fmt.Errorf("HaveKey's key matcher failed with:\n%s%s", format.Indent, err.Error()) + } + if success { + return true, nil + } + } + + return false, nil +} + +func (matcher *HaveKeyMatcher) FailureMessage(actual interface{}) (message string) { + switch matcher.Key.(type) { + case omegaMatcher: + return format.Message(actual, "to have key matching", matcher.Key) + default: + return format.Message(actual, "to have key", matcher.Key) + } +} + +func (matcher *HaveKeyMatcher) NegatedFailureMessage(actual interface{}) (message string) { + switch matcher.Key.(type) { + case omegaMatcher: + return format.Message(actual, "not to have key matching", matcher.Key) + default: + return format.Message(actual, "not to have key", matcher.Key) + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go new file mode 100644 index 000000000..3d608f63e --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go @@ -0,0 +1,98 @@ +// untested sections:10 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/matchers/internal/miter" +) + +type HaveKeyWithValueMatcher struct { + Key interface{} + Value interface{} +} + +func (matcher *HaveKeyWithValueMatcher) Match(actual interface{}) (success bool, err error) { + if !isMap(actual) && !miter.IsSeq2(actual) { + return false, fmt.Errorf("HaveKeyWithValue matcher expects a map/iter.Seq2. Got:%s", format.Object(actual, 1)) + } + + keyMatcher, keyIsMatcher := matcher.Key.(omegaMatcher) + if !keyIsMatcher { + keyMatcher = &EqualMatcher{Expected: matcher.Key} + } + + valueMatcher, valueIsMatcher := matcher.Value.(omegaMatcher) + if !valueIsMatcher { + valueMatcher = &EqualMatcher{Expected: matcher.Value} + } + + if miter.IsSeq2(actual) { + var success bool + var err error + miter.IterateKV(actual, func(k, v reflect.Value) bool { + success, err = keyMatcher.Match(k.Interface()) + if err != nil { + err = fmt.Errorf("HaveKey's key matcher failed with:\n%s%s", format.Indent, err.Error()) + return false + } + if success { + success, err = valueMatcher.Match(v.Interface()) + if err != nil { + err = fmt.Errorf("HaveKeyWithValue's value matcher failed with:\n%s%s", format.Indent, err.Error()) + return false + } + } + return !success + }) + return success, err + } + + keys := reflect.ValueOf(actual).MapKeys() + for i := 0; i < len(keys); i++ { + success, err := keyMatcher.Match(keys[i].Interface()) + if err != nil { + return false, fmt.Errorf("HaveKeyWithValue's key matcher failed with:\n%s%s", format.Indent, err.Error()) + } + if success { + actualValue := reflect.ValueOf(actual).MapIndex(keys[i]) + success, err := valueMatcher.Match(actualValue.Interface()) + if err != nil { + return false, fmt.Errorf("HaveKeyWithValue's value matcher failed with:\n%s%s", format.Indent, err.Error()) + } + return success, nil + } + } + + return false, nil +} + +func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual interface{}) (message string) { + str := "to have {key: value}" + if _, ok := matcher.Key.(omegaMatcher); ok { + str += " matching" + } else if _, ok := matcher.Value.(omegaMatcher); ok { + str += " matching" + } + + expect := make(map[interface{}]interface{}, 1) + expect[matcher.Key] = matcher.Value + return format.Message(actual, str, expect) +} + +func (matcher *HaveKeyWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string) { + kStr := "not to have key" + if _, ok := matcher.Key.(omegaMatcher); ok { + kStr = "not to have key matching" + } + + vStr := "or that key's value not be" + if _, ok := matcher.Value.(omegaMatcher); ok { + vStr = "or to have that key's value not matching" + } + + return format.Message(actual, kStr, matcher.Key, vStr, matcher.Value) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go new file mode 100644 index 000000000..ca25713fe --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go @@ -0,0 +1,28 @@ +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type HaveLenMatcher struct { + Count int +} + +func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) { + length, ok := lengthOf(actual) + if !ok { + return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice/iterator. Got:\n%s", format.Object(actual, 1)) + } + + return length == matcher.Count, nil +} + +func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count) +} + +func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go new file mode 100644 index 000000000..22a1b6730 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go @@ -0,0 +1,35 @@ +// untested sections: 2 + +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type HaveOccurredMatcher struct { +} + +func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error) { + // is purely nil? + if actual == nil { + return false, nil + } + + // must be an 'error' type + if !isError(actual) { + return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) + } + + // must be non-nil (or a pointer to a non-nil) + return !isNil(actual), nil +} + +func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Expected an error to have occurred. Got:\n%s", format.Object(actual, 1)) +} + +func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return fmt.Sprintf("Unexpected error:\n%s\n%s", format.Object(actual, 1), "occurred") +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go new file mode 100644 index 000000000..1d8e80270 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go @@ -0,0 +1,36 @@ +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type HavePrefixMatcher struct { + Prefix string + Args []interface{} +} + +func (matcher *HavePrefixMatcher) Match(actual interface{}) (success bool, err error) { + actualString, ok := toString(actual) + if !ok { + return false, fmt.Errorf("HavePrefix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) + } + prefix := matcher.prefix() + return len(actualString) >= len(prefix) && actualString[0:len(prefix)] == prefix, nil +} + +func (matcher *HavePrefixMatcher) prefix() string { + if len(matcher.Args) > 0 { + return fmt.Sprintf(matcher.Prefix, matcher.Args...) + } + return matcher.Prefix +} + +func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to have prefix", matcher.prefix()) +} + +func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to have prefix", matcher.prefix()) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go new file mode 100644 index 000000000..40a3526eb --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go @@ -0,0 +1,36 @@ +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" +) + +type HaveSuffixMatcher struct { + Suffix string + Args []interface{} +} + +func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success bool, err error) { + actualString, ok := toString(actual) + if !ok { + return false, fmt.Errorf("HaveSuffix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) + } + suffix := matcher.suffix() + return len(actualString) >= len(suffix) && actualString[len(actualString)-len(suffix):] == suffix, nil +} + +func (matcher *HaveSuffixMatcher) suffix() string { + if len(matcher.Args) > 0 { + return fmt.Sprintf(matcher.Suffix, matcher.Args...) + } + return matcher.Suffix +} + +func (matcher *HaveSuffixMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to have suffix", matcher.suffix()) +} + +func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to have suffix", matcher.suffix()) +} diff --git a/vendor/github.com/onsi/gomega/matchers/have_value.go b/vendor/github.com/onsi/gomega/matchers/have_value.go new file mode 100644 index 000000000..f67252835 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_value.go @@ -0,0 +1,54 @@ +package matchers + +import ( + "errors" + "reflect" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/types" +) + +const maxIndirections = 31 + +type HaveValueMatcher struct { + Matcher types.GomegaMatcher // the matcher to apply to the "resolved" actual value. + resolvedActual interface{} // the ("resolved") value. +} + +func (m *HaveValueMatcher) Match(actual interface{}) (bool, error) { + val := reflect.ValueOf(actual) + for allowedIndirs := maxIndirections; allowedIndirs > 0; allowedIndirs-- { + // return an error if value isn't valid. Please note that we cannot + // check for nil here, as we might not deal with a pointer or interface + // at this point. + if !val.IsValid() { + return false, errors.New(format.Message( + actual, "not to be ")) + } + switch val.Kind() { + case reflect.Ptr, reflect.Interface: + // resolve pointers and interfaces to their values, then rinse and + // repeat. + if val.IsNil() { + return false, errors.New(format.Message( + actual, "not to be ")) + } + val = val.Elem() + continue + default: + // forward the final value to the specified matcher. + m.resolvedActual = val.Interface() + return m.Matcher.Match(m.resolvedActual) + } + } + // too many indirections: extreme star gazing, indeed...? + return false, errors.New(format.Message(actual, "too many indirections")) +} + +func (m *HaveValueMatcher) FailureMessage(_ interface{}) (message string) { + return m.Matcher.FailureMessage(m.resolvedActual) +} + +func (m *HaveValueMatcher) NegatedFailureMessage(_ interface{}) (message string) { + return m.Matcher.NegatedFailureMessage(m.resolvedActual) +} diff --git a/vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_iter.go b/vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_iter.go new file mode 100644 index 000000000..d8837a4d0 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_iter.go @@ -0,0 +1,128 @@ +//go:build go1.23 + +package miter + +import ( + "reflect" +) + +// HasIterators always returns false for Go versions before 1.23. +func HasIterators() bool { return true } + +// IsIter returns true if the specified value is a function type that can be +// range-d over, otherwise false. +// +// We don't use reflect's CanSeq and CanSeq2 directly, as these would return +// true also for other value types that are range-able, such as integers, +// slices, et cetera. Here, we aim only at range-able (iterator) functions. +func IsIter(it any) bool { + if it == nil { // on purpose we only test for untyped nil. + return false + } + // reject all non-iterator-func values, even if they're range-able. + t := reflect.TypeOf(it) + if t.Kind() != reflect.Func { + return false + } + return t.CanSeq() || t.CanSeq2() +} + +// IterKVTypes returns the reflection types of an iterator's yield function's K +// and optional V arguments, otherwise nil K and V reflection types. +func IterKVTypes(it any) (k, v reflect.Type) { + if it == nil { + return + } + // reject all non-iterator-func values, even if they're range-able. + t := reflect.TypeOf(it) + if t.Kind() != reflect.Func { + return + } + // get the reflection types for V, and where applicable, K. + switch { + case t.CanSeq(): + v = t. /*iterator fn*/ In(0). /*yield fn*/ In(0) + case t.CanSeq2(): + yieldfn := t. /*iterator fn*/ In(0) + k = yieldfn.In(0) + v = yieldfn.In(1) + } + return +} + +// IsSeq2 returns true if the passed iterator function is compatible with +// iter.Seq2, otherwise false. +// +// IsSeq2 hides the Go 1.23+ specific reflect.Type.CanSeq2 behind a facade which +// is empty for Go versions before 1.23. +func IsSeq2(it any) bool { + if it == nil { + return false + } + t := reflect.TypeOf(it) + return t.Kind() == reflect.Func && t.CanSeq2() +} + +// isNilly returns true if v is either an untyped nil, or is a nil function (not +// necessarily an iterator function). +func isNilly(v any) bool { + if v == nil { + return true + } + rv := reflect.ValueOf(v) + return rv.Kind() == reflect.Func && rv.IsNil() +} + +// IterateV loops over the elements produced by an iterator function, passing +// the elements to the specified yield function individually and stopping only +// when either the iterator function runs out of elements or the yield function +// tell us to stop it. +// +// IterateV works very much like reflect.Value.Seq but hides the Go 1.23+ +// specific parts behind a facade which is empty for Go versions before 1.23, in +// order to simplify code maintenance for matchers when using older Go versions. +func IterateV(it any, yield func(v reflect.Value) bool) { + if isNilly(it) { + return + } + // reject all non-iterator-func values, even if they're range-able. + t := reflect.TypeOf(it) + if t.Kind() != reflect.Func || !t.CanSeq() { + return + } + // Call the specified iterator function, handing it our adaptor to call the + // specified generic reflection yield function. + reflectedYield := reflect.MakeFunc( + t. /*iterator fn*/ In(0), + func(args []reflect.Value) []reflect.Value { + return []reflect.Value{reflect.ValueOf(yield(args[0]))} + }) + reflect.ValueOf(it).Call([]reflect.Value{reflectedYield}) +} + +// IterateKV loops over the key-value elements produced by an iterator function, +// passing the elements to the specified yield function individually and +// stopping only when either the iterator function runs out of elements or the +// yield function tell us to stop it. +// +// IterateKV works very much like reflect.Value.Seq2 but hides the Go 1.23+ +// specific parts behind a facade which is empty for Go versions before 1.23, in +// order to simplify code maintenance for matchers when using older Go versions. +func IterateKV(it any, yield func(k, v reflect.Value) bool) { + if isNilly(it) { + return + } + // reject all non-iterator-func values, even if they're range-able. + t := reflect.TypeOf(it) + if t.Kind() != reflect.Func || !t.CanSeq2() { + return + } + // Call the specified iterator function, handing it our adaptor to call the + // specified generic reflection yield function. + reflectedYield := reflect.MakeFunc( + t. /*iterator fn*/ In(0), + func(args []reflect.Value) []reflect.Value { + return []reflect.Value{reflect.ValueOf(yield(args[0], args[1]))} + }) + reflect.ValueOf(it).Call([]reflect.Value{reflectedYield}) +} diff --git a/vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_noiter.go b/vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_noiter.go new file mode 100644 index 000000000..4b8fcc55b --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_noiter.go @@ -0,0 +1,44 @@ +//go:build !go1.23 + +/* +Gomega matchers + +This package implements the Gomega matchers and does not typically need to be imported. +See the docs for Gomega for documentation on the matchers + +http://onsi.github.io/gomega/ +*/ + +package miter + +import "reflect" + +// HasIterators always returns false for Go versions before 1.23. +func HasIterators() bool { return false } + +// IsIter always returns false for Go versions before 1.23 as there is no +// iterator (function) pattern defined yet; see also: +// https://tip.golang.org/blog/range-functions. +func IsIter(i any) bool { return false } + +// IsSeq2 always returns false for Go versions before 1.23 as there is no +// iterator (function) pattern defined yet; see also: +// https://tip.golang.org/blog/range-functions. +func IsSeq2(it any) bool { return false } + +// IterKVTypes always returns nil reflection types for Go versions before 1.23 +// as there is no iterator (function) pattern defined yet; see also: +// https://tip.golang.org/blog/range-functions. +func IterKVTypes(i any) (k, v reflect.Type) { + return +} + +// IterateV never loops over what has been passed to it as an iterator for Go +// versions before 1.23 as there is no iterator (function) pattern defined yet; +// see also: https://tip.golang.org/blog/range-functions. +func IterateV(it any, yield func(v reflect.Value) bool) {} + +// IterateKV never loops over what has been passed to it as an iterator for Go +// versions before 1.23 as there is no iterator (function) pattern defined yet; +// see also: https://tip.golang.org/blog/range-functions. +func IterateKV(it any, yield func(k, v reflect.Value) bool) {} diff --git a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go new file mode 100644 index 000000000..c539dd389 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go @@ -0,0 +1,86 @@ +package matchers + +import ( + "errors" + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type MatchErrorMatcher struct { + Expected any + FuncErrDescription []any + isFunc bool +} + +func (matcher *MatchErrorMatcher) Match(actual any) (success bool, err error) { + matcher.isFunc = false + + if isNil(actual) { + return false, fmt.Errorf("Expected an error, got nil") + } + + if !isError(actual) { + return false, fmt.Errorf("Expected an error. Got:\n%s", format.Object(actual, 1)) + } + + actualErr := actual.(error) + expected := matcher.Expected + + if isError(expected) { + // first try the built-in errors.Is + if errors.Is(actualErr, expected.(error)) { + return true, nil + } + // if not, try DeepEqual along the error chain + for unwrapped := actualErr; unwrapped != nil; unwrapped = errors.Unwrap(unwrapped) { + if reflect.DeepEqual(unwrapped, expected) { + return true, nil + } + } + return false, nil + } + + if isString(expected) { + return actualErr.Error() == expected, nil + } + + v := reflect.ValueOf(expected) + t := v.Type() + errorInterface := reflect.TypeOf((*error)(nil)).Elem() + if t.Kind() == reflect.Func && t.NumIn() == 1 && t.In(0).Implements(errorInterface) && t.NumOut() == 1 && t.Out(0).Kind() == reflect.Bool { + if len(matcher.FuncErrDescription) == 0 { + return false, fmt.Errorf("MatchError requires an additional description when passed a function") + } + matcher.isFunc = true + return v.Call([]reflect.Value{reflect.ValueOf(actualErr)})[0].Bool(), nil + } + + var subMatcher omegaMatcher + var hasSubMatcher bool + if expected != nil { + subMatcher, hasSubMatcher = (expected).(omegaMatcher) + if hasSubMatcher { + return subMatcher.Match(actualErr.Error()) + } + } + + return false, fmt.Errorf( + "MatchError must be passed an error, a string, or a Matcher that can match on strings. Got:\n%s", + format.Object(expected, 1)) +} + +func (matcher *MatchErrorMatcher) FailureMessage(actual interface{}) (message string) { + if matcher.isFunc { + return format.Message(actual, fmt.Sprintf("to match error function %s", matcher.FuncErrDescription[0])) + } + return format.Message(actual, "to match error", matcher.Expected) +} + +func (matcher *MatchErrorMatcher) NegatedFailureMessage(actual interface{}) (message string) { + if matcher.isFunc { + return format.Message(actual, fmt.Sprintf("not to match error function %s", matcher.FuncErrDescription[0])) + } + return format.Message(actual, "not to match error", matcher.Expected) +} diff --git a/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go new file mode 100644 index 000000000..f962f139f --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go @@ -0,0 +1,65 @@ +package matchers + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/onsi/gomega/format" +) + +type MatchJSONMatcher struct { + JSONToMatch interface{} + firstFailurePath []interface{} +} + +func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err error) { + actualString, expectedString, err := matcher.prettyPrint(actual) + if err != nil { + return false, err + } + + var aval interface{} + var eval interface{} + + // this is guarded by prettyPrint + json.Unmarshal([]byte(actualString), &aval) + json.Unmarshal([]byte(expectedString), &eval) + var equal bool + equal, matcher.firstFailurePath = deepEqual(aval, eval) + return equal, nil +} + +func (matcher *MatchJSONMatcher) FailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.prettyPrint(actual) + return formattedMessage(format.Message(actualString, "to match JSON of", expectedString), matcher.firstFailurePath) +} + +func (matcher *MatchJSONMatcher) NegatedFailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.prettyPrint(actual) + return formattedMessage(format.Message(actualString, "not to match JSON of", expectedString), matcher.firstFailurePath) +} + +func (matcher *MatchJSONMatcher) prettyPrint(actual interface{}) (actualFormatted, expectedFormatted string, err error) { + actualString, ok := toString(actual) + if !ok { + return "", "", fmt.Errorf("MatchJSONMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) + } + expectedString, ok := toString(matcher.JSONToMatch) + if !ok { + return "", "", fmt.Errorf("MatchJSONMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.JSONToMatch, 1)) + } + + abuf := new(bytes.Buffer) + ebuf := new(bytes.Buffer) + + if err := json.Indent(abuf, []byte(actualString), "", " "); err != nil { + return "", "", fmt.Errorf("Actual '%s' should be valid JSON, but it is not.\nUnderlying error:%s", actualString, err) + } + + if err := json.Indent(ebuf, []byte(expectedString), "", " "); err != nil { + return "", "", fmt.Errorf("Expected '%s' should be valid JSON, but it is not.\nUnderlying error:%s", expectedString, err) + } + + return abuf.String(), ebuf.String(), nil +} diff --git a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go new file mode 100644 index 000000000..adac5db6b --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go @@ -0,0 +1,43 @@ +package matchers + +import ( + "fmt" + "regexp" + + "github.com/onsi/gomega/format" +) + +type MatchRegexpMatcher struct { + Regexp string + Args []interface{} +} + +func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success bool, err error) { + actualString, ok := toString(actual) + if !ok { + return false, fmt.Errorf("RegExp matcher requires a string or stringer.\nGot:%s", format.Object(actual, 1)) + } + + match, err := regexp.Match(matcher.regexp(), []byte(actualString)) + if err != nil { + return false, fmt.Errorf("RegExp match failed to compile with error:\n\t%s", err.Error()) + } + + return match, nil +} + +func (matcher *MatchRegexpMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to match regular expression", matcher.regexp()) +} + +func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "not to match regular expression", matcher.regexp()) +} + +func (matcher *MatchRegexpMatcher) regexp() string { + re := matcher.Regexp + if len(matcher.Args) > 0 { + re = fmt.Sprintf(matcher.Regexp, matcher.Args...) + } + return re +} diff --git a/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go new file mode 100644 index 000000000..5c815f5af --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go @@ -0,0 +1,134 @@ +package matchers + +import ( + "bytes" + "encoding/xml" + "errors" + "fmt" + "io" + "reflect" + "sort" + "strings" + + "github.com/onsi/gomega/format" + "golang.org/x/net/html/charset" +) + +type MatchXMLMatcher struct { + XMLToMatch interface{} +} + +func (matcher *MatchXMLMatcher) Match(actual interface{}) (success bool, err error) { + actualString, expectedString, err := matcher.formattedPrint(actual) + if err != nil { + return false, err + } + + aval, err := parseXmlContent(actualString) + if err != nil { + return false, fmt.Errorf("Actual '%s' should be valid XML, but it is not.\nUnderlying error:%s", actualString, err) + } + + eval, err := parseXmlContent(expectedString) + if err != nil { + return false, fmt.Errorf("Expected '%s' should be valid XML, but it is not.\nUnderlying error:%s", expectedString, err) + } + + return reflect.DeepEqual(aval, eval), nil +} + +func (matcher *MatchXMLMatcher) FailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.formattedPrint(actual) + return fmt.Sprintf("Expected\n%s\nto match XML of\n%s", actualString, expectedString) +} + +func (matcher *MatchXMLMatcher) NegatedFailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.formattedPrint(actual) + return fmt.Sprintf("Expected\n%s\nnot to match XML of\n%s", actualString, expectedString) +} + +func (matcher *MatchXMLMatcher) formattedPrint(actual interface{}) (actualString, expectedString string, err error) { + var ok bool + actualString, ok = toString(actual) + if !ok { + return "", "", fmt.Errorf("MatchXMLMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) + } + expectedString, ok = toString(matcher.XMLToMatch) + if !ok { + return "", "", fmt.Errorf("MatchXMLMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.XMLToMatch, 1)) + } + return actualString, expectedString, nil +} + +func parseXmlContent(content string) (*xmlNode, error) { + allNodes := []*xmlNode{} + + dec := newXmlDecoder(strings.NewReader(content)) + for { + tok, err := dec.Token() + if err != nil { + if err == io.EOF { + break + } + return nil, fmt.Errorf("failed to decode next token: %v", err) // untested section + } + + lastNodeIndex := len(allNodes) - 1 + var lastNode *xmlNode + if len(allNodes) > 0 { + lastNode = allNodes[lastNodeIndex] + } else { + lastNode = &xmlNode{} + } + + switch tok := tok.(type) { + case xml.StartElement: + attrs := attributesSlice(tok.Attr) + sort.Sort(attrs) + allNodes = append(allNodes, &xmlNode{XMLName: tok.Name, XMLAttr: tok.Attr}) + case xml.EndElement: + if len(allNodes) > 1 { + allNodes[lastNodeIndex-1].Nodes = append(allNodes[lastNodeIndex-1].Nodes, lastNode) + allNodes = allNodes[:lastNodeIndex] + } + case xml.CharData: + lastNode.Content = append(lastNode.Content, tok.Copy()...) + case xml.Comment: + lastNode.Comments = append(lastNode.Comments, tok.Copy()) // untested section + case xml.ProcInst: + lastNode.ProcInsts = append(lastNode.ProcInsts, tok.Copy()) + } + } + + if len(allNodes) == 0 { + return nil, errors.New("found no nodes") + } + firstNode := allNodes[0] + trimParentNodesContentSpaces(firstNode) + + return firstNode, nil +} + +func newXmlDecoder(reader io.Reader) *xml.Decoder { + dec := xml.NewDecoder(reader) + dec.CharsetReader = charset.NewReaderLabel + return dec +} + +func trimParentNodesContentSpaces(node *xmlNode) { + if len(node.Nodes) > 0 { + node.Content = bytes.TrimSpace(node.Content) + for _, childNode := range node.Nodes { + trimParentNodesContentSpaces(childNode) + } + } +} + +type xmlNode struct { + XMLName xml.Name + Comments []xml.Comment + ProcInsts []xml.ProcInst + XMLAttr []xml.Attr + Content []byte + Nodes []*xmlNode +} diff --git a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go new file mode 100644 index 000000000..2cb6b47db --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go @@ -0,0 +1,76 @@ +package matchers + +import ( + "fmt" + "strings" + + "github.com/onsi/gomega/format" + "gopkg.in/yaml.v3" +) + +type MatchYAMLMatcher struct { + YAMLToMatch interface{} + firstFailurePath []interface{} +} + +func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err error) { + actualString, expectedString, err := matcher.toStrings(actual) + if err != nil { + return false, err + } + + var aval interface{} + var eval interface{} + + if err := yaml.Unmarshal([]byte(actualString), &aval); err != nil { + return false, fmt.Errorf("Actual '%s' should be valid YAML, but it is not.\nUnderlying error:%s", actualString, err) + } + if err := yaml.Unmarshal([]byte(expectedString), &eval); err != nil { + return false, fmt.Errorf("Expected '%s' should be valid YAML, but it is not.\nUnderlying error:%s", expectedString, err) + } + + var equal bool + equal, matcher.firstFailurePath = deepEqual(aval, eval) + return equal, nil +} + +func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.toNormalisedStrings(actual) + return formattedMessage(format.Message(actualString, "to match YAML of", expectedString), matcher.firstFailurePath) +} + +func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.toNormalisedStrings(actual) + return formattedMessage(format.Message(actualString, "not to match YAML of", expectedString), matcher.firstFailurePath) +} + +func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) { + actualString, expectedString, err := matcher.toStrings(actual) + return normalise(actualString), normalise(expectedString), err +} + +func normalise(input string) string { + var val interface{} + err := yaml.Unmarshal([]byte(input), &val) + if err != nil { + panic(err) // unreachable since Match already calls Unmarshal + } + output, err := yaml.Marshal(val) + if err != nil { + panic(err) // untested section, unreachable since we Unmarshal above + } + return strings.TrimSpace(string(output)) +} + +func (matcher *MatchYAMLMatcher) toStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) { + actualString, ok := toString(actual) + if !ok { + return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) + } + expectedString, ok := toString(matcher.YAMLToMatch) + if !ok { + return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.YAMLToMatch, 1)) + } + + return actualString, expectedString, nil +} diff --git a/vendor/github.com/onsi/gomega/matchers/not.go b/vendor/github.com/onsi/gomega/matchers/not.go new file mode 100644 index 000000000..78b71910d --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/not.go @@ -0,0 +1,29 @@ +package matchers + +import ( + "github.com/onsi/gomega/types" +) + +type NotMatcher struct { + Matcher types.GomegaMatcher +} + +func (m *NotMatcher) Match(actual interface{}) (bool, error) { + success, err := m.Matcher.Match(actual) + if err != nil { + return false, err + } + return !success, nil +} + +func (m *NotMatcher) FailureMessage(actual interface{}) (message string) { + return m.Matcher.NegatedFailureMessage(actual) // works beautifully +} + +func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return m.Matcher.FailureMessage(actual) // works beautifully +} + +func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { + return types.MatchMayChangeInTheFuture(m.Matcher, actual) // just return m.Matcher's value +} diff --git a/vendor/github.com/onsi/gomega/matchers/or.go b/vendor/github.com/onsi/gomega/matchers/or.go new file mode 100644 index 000000000..841ae26ab --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/or.go @@ -0,0 +1,66 @@ +package matchers + +import ( + "fmt" + + "github.com/onsi/gomega/format" + "github.com/onsi/gomega/types" +) + +type OrMatcher struct { + Matchers []types.GomegaMatcher + + // state + firstSuccessfulMatcher types.GomegaMatcher +} + +func (m *OrMatcher) Match(actual interface{}) (success bool, err error) { + m.firstSuccessfulMatcher = nil + for _, matcher := range m.Matchers { + success, err := matcher.Match(actual) + if err != nil { + return false, err + } + if success { + m.firstSuccessfulMatcher = matcher + return true, nil + } + } + return false, nil +} + +func (m *OrMatcher) FailureMessage(actual interface{}) (message string) { + // not the most beautiful list of matchers, but not bad either... + return format.Message(actual, fmt.Sprintf("To satisfy at least one of these matchers: %s", m.Matchers)) +} + +func (m *OrMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return m.firstSuccessfulMatcher.NegatedFailureMessage(actual) +} + +func (m *OrMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { + /* + Example with 3 matchers: A, B, C + + Match evaluates them: F, T, => T + So match is currently T, what should MatchMayChangeInTheFuture() return? + Seems like it only depends on B, since currently B MUST change to allow the result to become F + + Match eval: F, F, F => F + So match is currently F, what should MatchMayChangeInTheFuture() return? + Seems to depend on ANY of them being able to change to T. + */ + + if m.firstSuccessfulMatcher != nil { + // one of the matchers succeeded.. it must be able to change in order to affect the result + return types.MatchMayChangeInTheFuture(m.firstSuccessfulMatcher, actual) + } else { + // so all matchers failed.. Any one of them changing would change the result. + for _, matcher := range m.Matchers { + if types.MatchMayChangeInTheFuture(matcher, actual) { + return true + } + } + return false // none of were going to change + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/panic_matcher.go b/vendor/github.com/onsi/gomega/matchers/panic_matcher.go new file mode 100644 index 000000000..adc8cee63 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/panic_matcher.go @@ -0,0 +1,114 @@ +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type PanicMatcher struct { + Expected interface{} + object interface{} +} + +func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error) { + if actual == nil { + return false, fmt.Errorf("PanicMatcher expects a non-nil actual.") + } + + actualType := reflect.TypeOf(actual) + if actualType.Kind() != reflect.Func { + return false, fmt.Errorf("PanicMatcher expects a function. Got:\n%s", format.Object(actual, 1)) + } + if !(actualType.NumIn() == 0 && actualType.NumOut() == 0) { + return false, fmt.Errorf("PanicMatcher expects a function with no arguments and no return value. Got:\n%s", format.Object(actual, 1)) + } + + success = false + defer func() { + if e := recover(); e != nil { + matcher.object = e + + if matcher.Expected == nil { + success = true + return + } + + valueMatcher, valueIsMatcher := matcher.Expected.(omegaMatcher) + if !valueIsMatcher { + valueMatcher = &EqualMatcher{Expected: matcher.Expected} + } + + success, err = valueMatcher.Match(e) + if err != nil { + err = fmt.Errorf("PanicMatcher's value matcher failed with:\n%s%s", format.Indent, err.Error()) + } + } + }() + + reflect.ValueOf(actual).Call([]reflect.Value{}) + + return +} + +func (matcher *PanicMatcher) FailureMessage(actual interface{}) (message string) { + if matcher.Expected == nil { + // We wanted any panic to occur, but none did. + return format.Message(actual, "to panic") + } + + if matcher.object == nil { + // We wanted a panic with a specific value to occur, but none did. + switch matcher.Expected.(type) { + case omegaMatcher: + return format.Message(actual, "to panic with a value matching", matcher.Expected) + default: + return format.Message(actual, "to panic with", matcher.Expected) + } + } + + // We got a panic, but the value isn't what we expected. + switch matcher.Expected.(type) { + case omegaMatcher: + return format.Message( + actual, + fmt.Sprintf( + "to panic with a value matching\n%s\nbut panicked with\n%s", + format.Object(matcher.Expected, 1), + format.Object(matcher.object, 1), + ), + ) + default: + return format.Message( + actual, + fmt.Sprintf( + "to panic with\n%s\nbut panicked with\n%s", + format.Object(matcher.Expected, 1), + format.Object(matcher.object, 1), + ), + ) + } +} + +func (matcher *PanicMatcher) NegatedFailureMessage(actual interface{}) (message string) { + if matcher.Expected == nil { + // We didn't want any panic to occur, but one did. + return format.Message(actual, fmt.Sprintf("not to panic, but panicked with\n%s", format.Object(matcher.object, 1))) + } + + // We wanted a to ensure a panic with a specific value did not occur, but it did. + switch matcher.Expected.(type) { + case omegaMatcher: + return format.Message( + actual, + fmt.Sprintf( + "not to panic with a value matching\n%s\nbut panicked with\n%s", + format.Object(matcher.Expected, 1), + format.Object(matcher.object, 1), + ), + ) + default: + return format.Message(actual, "not to panic with", matcher.Expected) + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go new file mode 100644 index 000000000..948164eaf --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go @@ -0,0 +1,166 @@ +// untested sections: 3 + +package matchers + +import ( + "errors" + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type ReceiveMatcher struct { + Args []interface{} + receivedValue reflect.Value + channelClosed bool +} + +func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err error) { + if !isChan(actual) { + return false, fmt.Errorf("ReceiveMatcher expects a channel. Got:\n%s", format.Object(actual, 1)) + } + + channelType := reflect.TypeOf(actual) + channelValue := reflect.ValueOf(actual) + + if channelType.ChanDir() == reflect.SendDir { + return false, fmt.Errorf("ReceiveMatcher matcher cannot be passed a send-only channel. Got:\n%s", format.Object(actual, 1)) + } + + var subMatcher omegaMatcher + var hasSubMatcher bool + var resultReference interface{} + + // Valid arg formats are as follows, always with optional POINTER before + // optional MATCHER: + // - Receive() + // - Receive(POINTER) + // - Receive(MATCHER) + // - Receive(POINTER, MATCHER) + args := matcher.Args + if len(args) > 0 { + arg := args[0] + _, isSubMatcher := arg.(omegaMatcher) + if !isSubMatcher && reflect.ValueOf(arg).Kind() == reflect.Ptr { + // Consume optional POINTER arg first, if it ain't no matcher ;) + resultReference = arg + args = args[1:] + } + } + if len(args) > 0 { + arg := args[0] + subMatcher, hasSubMatcher = arg.(omegaMatcher) + if !hasSubMatcher { + // At this point we assume the dev user wanted to assign a received + // value, so [POINTER,]MATCHER. + return false, fmt.Errorf("Cannot assign a value from the channel:\n%s\nTo:\n%s\nYou need to pass a pointer!", format.Object(actual, 1), format.Object(arg, 1)) + } + // Consume optional MATCHER arg. + args = args[1:] + } + if len(args) > 0 { + // If there are still args present, reject all. + return false, errors.New("Receive matcher expects at most an optional pointer and/or an optional matcher") + } + + winnerIndex, value, open := reflect.Select([]reflect.SelectCase{ + {Dir: reflect.SelectRecv, Chan: channelValue}, + {Dir: reflect.SelectDefault}, + }) + + var closed bool + var didReceive bool + if winnerIndex == 0 { + closed = !open + didReceive = open + } + matcher.channelClosed = closed + + if closed { + return false, nil + } + + if hasSubMatcher { + if !didReceive { + return false, nil + } + matcher.receivedValue = value + if match, err := subMatcher.Match(matcher.receivedValue.Interface()); err != nil || !match { + return match, err + } + // if we received a match, then fall through in order to handle an + // optional assignment of the received value to the specified reference. + } + + if didReceive { + if resultReference != nil { + outValue := reflect.ValueOf(resultReference) + + if value.Type().AssignableTo(outValue.Elem().Type()) { + outValue.Elem().Set(value) + return true, nil + } + if value.Type().Kind() == reflect.Interface && value.Elem().Type().AssignableTo(outValue.Elem().Type()) { + outValue.Elem().Set(value.Elem()) + return true, nil + } else { + return false, fmt.Errorf("Cannot assign a value from the channel:\n%s\nType:\n%s\nTo:\n%s", format.Object(actual, 1), format.Object(value.Interface(), 1), format.Object(resultReference, 1)) + } + + } + + return true, nil + } + return false, nil +} + +func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message string) { + var matcherArg interface{} + if len(matcher.Args) > 0 { + matcherArg = matcher.Args[len(matcher.Args)-1] + } + subMatcher, hasSubMatcher := (matcherArg).(omegaMatcher) + + closedAddendum := "" + if matcher.channelClosed { + closedAddendum = " The channel is closed." + } + + if hasSubMatcher { + if matcher.receivedValue.IsValid() { + return subMatcher.FailureMessage(matcher.receivedValue.Interface()) + } + return "When passed a matcher, ReceiveMatcher's channel *must* receive something." + } + return format.Message(actual, "to receive something."+closedAddendum) +} + +func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (message string) { + var matcherArg interface{} + if len(matcher.Args) > 0 { + matcherArg = matcher.Args[len(matcher.Args)-1] + } + subMatcher, hasSubMatcher := (matcherArg).(omegaMatcher) + + closedAddendum := "" + if matcher.channelClosed { + closedAddendum = " The channel is closed." + } + + if hasSubMatcher { + if matcher.receivedValue.IsValid() { + return subMatcher.NegatedFailureMessage(matcher.receivedValue.Interface()) + } + return "When passed a matcher, ReceiveMatcher's channel *must* receive something." + } + return format.Message(actual, "not to receive anything."+closedAddendum) +} + +func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { + if !isChan(actual) { + return false + } + + return !matcher.channelClosed +} diff --git a/vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go b/vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go new file mode 100644 index 000000000..ec68fe8b6 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go @@ -0,0 +1,66 @@ +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type SatisfyMatcher struct { + Predicate interface{} + + // cached type + predicateArgType reflect.Type +} + +func NewSatisfyMatcher(predicate interface{}) *SatisfyMatcher { + if predicate == nil { + panic("predicate cannot be nil") + } + predicateType := reflect.TypeOf(predicate) + if predicateType.Kind() != reflect.Func { + panic("predicate must be a function") + } + if predicateType.NumIn() != 1 { + panic("predicate must have 1 argument") + } + if predicateType.NumOut() != 1 || predicateType.Out(0).Kind() != reflect.Bool { + panic("predicate must return bool") + } + + return &SatisfyMatcher{ + Predicate: predicate, + predicateArgType: predicateType.In(0), + } +} + +func (m *SatisfyMatcher) Match(actual interface{}) (success bool, err error) { + // prepare a parameter to pass to the predicate + var param reflect.Value + if actual != nil && reflect.TypeOf(actual).AssignableTo(m.predicateArgType) { + // The dynamic type of actual is compatible with the predicate argument. + param = reflect.ValueOf(actual) + + } else if actual == nil && m.predicateArgType.Kind() == reflect.Interface { + // The dynamic type of actual is unknown, so there's no way to make its + // reflect.Value. Create a nil of the predicate argument, which is known. + param = reflect.Zero(m.predicateArgType) + + } else { + return false, fmt.Errorf("predicate expects '%s' but we have '%T'", m.predicateArgType, actual) + } + + // call the predicate with `actual` + fn := reflect.ValueOf(m.Predicate) + result := fn.Call([]reflect.Value{param}) + return result[0].Bool(), nil +} + +func (m *SatisfyMatcher) FailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to satisfy predicate", m.Predicate) +} + +func (m *SatisfyMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return format.Message(actual, "to not satisfy predicate", m.Predicate) +} diff --git a/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go b/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go new file mode 100644 index 000000000..1369c1e87 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go @@ -0,0 +1,94 @@ +// untested sections: 5 + +package matchers + +import ( + "fmt" + "reflect" + "strings" +) + +func formattedMessage(comparisonMessage string, failurePath []interface{}) string { + var diffMessage string + if len(failurePath) == 0 { + diffMessage = "" + } else { + diffMessage = fmt.Sprintf("\n\nfirst mismatched key: %s", formattedFailurePath(failurePath)) + } + return fmt.Sprintf("%s%s", comparisonMessage, diffMessage) +} + +func formattedFailurePath(failurePath []interface{}) string { + formattedPaths := []string{} + for i := len(failurePath) - 1; i >= 0; i-- { + switch p := failurePath[i].(type) { + case int: + formattedPaths = append(formattedPaths, fmt.Sprintf(`[%d]`, p)) + default: + if i != len(failurePath)-1 { + formattedPaths = append(formattedPaths, ".") + } + formattedPaths = append(formattedPaths, fmt.Sprintf(`"%s"`, p)) + } + } + return strings.Join(formattedPaths, "") +} + +func deepEqual(a interface{}, b interface{}) (bool, []interface{}) { + var errorPath []interface{} + if reflect.TypeOf(a) != reflect.TypeOf(b) { + return false, errorPath + } + + switch a.(type) { + case []interface{}: + if len(a.([]interface{})) != len(b.([]interface{})) { + return false, errorPath + } + + for i, v := range a.([]interface{}) { + elementEqual, keyPath := deepEqual(v, b.([]interface{})[i]) + if !elementEqual { + return false, append(keyPath, i) + } + } + return true, errorPath + + case map[interface{}]interface{}: + if len(a.(map[interface{}]interface{})) != len(b.(map[interface{}]interface{})) { + return false, errorPath + } + + for k, v1 := range a.(map[interface{}]interface{}) { + v2, ok := b.(map[interface{}]interface{})[k] + if !ok { + return false, errorPath + } + elementEqual, keyPath := deepEqual(v1, v2) + if !elementEqual { + return false, append(keyPath, k) + } + } + return true, errorPath + + case map[string]interface{}: + if len(a.(map[string]interface{})) != len(b.(map[string]interface{})) { + return false, errorPath + } + + for k, v1 := range a.(map[string]interface{}) { + v2, ok := b.(map[string]interface{})[k] + if !ok { + return false, errorPath + } + elementEqual, keyPath := deepEqual(v1, v2) + if !elementEqual { + return false, append(keyPath, k) + } + } + return true, errorPath + + default: + return a == b, errorPath + } +} diff --git a/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go b/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go new file mode 100644 index 000000000..327350f7b --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go @@ -0,0 +1,42 @@ +package matchers + +import ( + "errors" + "fmt" + + "github.com/onsi/gomega/format" +) + +type formattedGomegaError interface { + FormattedGomegaError() string +} + +type SucceedMatcher struct { +} + +func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error) { + // is purely nil? + if actual == nil { + return true, nil + } + + // must be an 'error' type + if !isError(actual) { + return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) + } + + // must be nil (or a pointer to a nil) + return isNil(actual), nil +} + +func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string) { + var fgErr formattedGomegaError + if errors.As(actual.(error), &fgErr) { + return fgErr.FormattedGomegaError() + } + return fmt.Sprintf("Expected success, but got an error:\n%s", format.Object(actual, 1)) +} + +func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string) { + return "Expected failure, but got no error." +} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go new file mode 100644 index 000000000..830e30827 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go @@ -0,0 +1,56 @@ +package bipartitegraph + +import "fmt" + +import . "github.com/onsi/gomega/matchers/support/goraph/node" +import . "github.com/onsi/gomega/matchers/support/goraph/edge" + +type BipartiteGraph struct { + Left NodeOrderedSet + Right NodeOrderedSet + Edges EdgeSet +} + +func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) (*BipartiteGraph, error) { + left := NodeOrderedSet{} + for i, v := range leftValues { + left = append(left, Node{ID: i, Value: v}) + } + + right := NodeOrderedSet{} + for j, v := range rightValues { + right = append(right, Node{ID: j + len(left), Value: v}) + } + + edges := EdgeSet{} + for i, leftValue := range leftValues { + for j, rightValue := range rightValues { + neighbours, err := neighbours(leftValue, rightValue) + if err != nil { + return nil, fmt.Errorf("error determining adjacency for %v and %v: %s", leftValue, rightValue, err.Error()) + } + + if neighbours { + edges = append(edges, Edge{Node1: left[i].ID, Node2: right[j].ID}) + } + } + } + + return &BipartiteGraph{left, right, edges}, nil +} + +// FreeLeftRight returns left node values and right node values +// of the BipartiteGraph's nodes which are not part of the given edges. +func (bg *BipartiteGraph) FreeLeftRight(edges EdgeSet) (leftValues, rightValues []interface{}) { + for _, node := range bg.Left { + if edges.Free(node) { + leftValues = append(leftValues, node.Value) + } + } + for _, node := range bg.Right { + if edges.Free(node) { + rightValues = append(rightValues, node.Value) + } + } + return +} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go new file mode 100644 index 000000000..44aa61d4b --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go @@ -0,0 +1,171 @@ +package bipartitegraph + +import ( + "slices" + + . "github.com/onsi/gomega/matchers/support/goraph/edge" + . "github.com/onsi/gomega/matchers/support/goraph/node" + "github.com/onsi/gomega/matchers/support/goraph/util" +) + +// LargestMatching implements the Hopcroft–Karp algorithm taking as input a bipartite graph +// and outputting a maximum cardinality matching, i.e. a set of as many edges as possible +// with the property that no two edges share an endpoint. +func (bg *BipartiteGraph) LargestMatching() (matching EdgeSet) { + paths := bg.maximalDisjointSLAPCollection(matching) + + for len(paths) > 0 { + for _, path := range paths { + matching = matching.SymmetricDifference(path) + } + paths = bg.maximalDisjointSLAPCollection(matching) + } + + return +} + +func (bg *BipartiteGraph) maximalDisjointSLAPCollection(matching EdgeSet) (result []EdgeSet) { + guideLayers := bg.createSLAPGuideLayers(matching) + if len(guideLayers) == 0 { + return + } + + used := make(map[int]bool) + + for _, u := range guideLayers[len(guideLayers)-1] { + slap, found := bg.findDisjointSLAP(u, matching, guideLayers, used) + if found { + for _, edge := range slap { + used[edge.Node1] = true + used[edge.Node2] = true + } + result = append(result, slap) + } + } + + return +} + +func (bg *BipartiteGraph) findDisjointSLAP( + start Node, + matching EdgeSet, + guideLayers []NodeOrderedSet, + used map[int]bool, +) ([]Edge, bool) { + return bg.findDisjointSLAPHelper(start, EdgeSet{}, len(guideLayers)-1, matching, guideLayers, used) +} + +func (bg *BipartiteGraph) findDisjointSLAPHelper( + currentNode Node, + currentSLAP EdgeSet, + currentLevel int, + matching EdgeSet, + guideLayers []NodeOrderedSet, + used map[int]bool, +) (EdgeSet, bool) { + used[currentNode.ID] = true + + if currentLevel == 0 { + return currentSLAP, true + } + + for _, nextNode := range guideLayers[currentLevel-1] { + if used[nextNode.ID] { + continue + } + + edge, found := bg.Edges.FindByNodes(currentNode, nextNode) + if !found { + continue + } + + if matching.Contains(edge) == util.Odd(currentLevel) { + continue + } + + currentSLAP = append(currentSLAP, edge) + slap, found := bg.findDisjointSLAPHelper(nextNode, currentSLAP, currentLevel-1, matching, guideLayers, used) + if found { + return slap, true + } + currentSLAP = currentSLAP[:len(currentSLAP)-1] + } + + used[currentNode.ID] = false + return nil, false +} + +func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guideLayers []NodeOrderedSet) { + used := make(map[int]bool) + currentLayer := NodeOrderedSet{} + + for _, node := range bg.Left { + if matching.Free(node) { + used[node.ID] = true + currentLayer = append(currentLayer, node) + } + } + + if len(currentLayer) == 0 { + return []NodeOrderedSet{} + } + guideLayers = append(guideLayers, currentLayer) + + done := false + + for !done { + lastLayer := currentLayer + currentLayer = NodeOrderedSet{} + + if util.Odd(len(guideLayers)) { + for _, leftNode := range lastLayer { + for _, rightNode := range bg.Right { + if used[rightNode.ID] { + continue + } + + edge, found := bg.Edges.FindByNodes(leftNode, rightNode) + if !found || matching.Contains(edge) { + continue + } + + currentLayer = append(currentLayer, rightNode) + used[rightNode.ID] = true + + if matching.Free(rightNode) { + done = true + } + } + } + } else { + for _, rightNode := range lastLayer { + for _, leftNode := range bg.Left { + if used[leftNode.ID] { + continue + } + + edge, found := bg.Edges.FindByNodes(leftNode, rightNode) + if !found || !matching.Contains(edge) { + continue + } + + currentLayer = append(currentLayer, leftNode) + used[leftNode.ID] = true + } + } + + } + + if len(currentLayer) == 0 { + return []NodeOrderedSet{} + } + if done { // if last layer - into last layer must be only 'free' nodes + currentLayer = slices.DeleteFunc(currentLayer, func(in Node) bool { + return !matching.Free(in) + }) + } + guideLayers = append(guideLayers, currentLayer) + } + + return +} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go new file mode 100644 index 000000000..8c38411b2 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go @@ -0,0 +1,61 @@ +package edge + +import . "github.com/onsi/gomega/matchers/support/goraph/node" + +type Edge struct { + Node1 int + Node2 int +} + +type EdgeSet []Edge + +func (ec EdgeSet) Free(node Node) bool { + for _, e := range ec { + if e.Node1 == node.ID || e.Node2 == node.ID { + return false + } + } + + return true +} + +func (ec EdgeSet) Contains(edge Edge) bool { + for _, e := range ec { + if e == edge { + return true + } + } + + return false +} + +func (ec EdgeSet) FindByNodes(node1, node2 Node) (Edge, bool) { + for _, e := range ec { + if (e.Node1 == node1.ID && e.Node2 == node2.ID) || (e.Node1 == node2.ID && e.Node2 == node1.ID) { + return e, true + } + } + + return Edge{}, false +} + +func (ec EdgeSet) SymmetricDifference(ec2 EdgeSet) EdgeSet { + edgesToInclude := make(map[Edge]bool) + + for _, e := range ec { + edgesToInclude[e] = true + } + + for _, e := range ec2 { + edgesToInclude[e] = !edgesToInclude[e] + } + + result := EdgeSet{} + for e, include := range edgesToInclude { + if include { + result = append(result, e) + } + } + + return result +} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go new file mode 100644 index 000000000..cd597a2f2 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go @@ -0,0 +1,8 @@ +package node + +type Node struct { + ID int + Value interface{} +} + +type NodeOrderedSet []Node diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go new file mode 100644 index 000000000..d76a1ee00 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go @@ -0,0 +1,7 @@ +package util + +import "math" + +func Odd(n int) bool { + return math.Mod(float64(n), 2.0) == 1.0 +} diff --git a/vendor/github.com/onsi/gomega/matchers/type_support.go b/vendor/github.com/onsi/gomega/matchers/type_support.go new file mode 100644 index 000000000..b9440ac7a --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/type_support.go @@ -0,0 +1,195 @@ +/* +Gomega matchers + +This package implements the Gomega matchers and does not typically need to be imported. +See the docs for Gomega for documentation on the matchers + +http://onsi.github.io/gomega/ +*/ + +// untested sections: 11 + +package matchers + +import ( + "encoding/json" + "fmt" + "reflect" + + "github.com/onsi/gomega/matchers/internal/miter" +) + +type omegaMatcher interface { + Match(actual interface{}) (success bool, err error) + FailureMessage(actual interface{}) (message string) + NegatedFailureMessage(actual interface{}) (message string) +} + +func isBool(a interface{}) bool { + return reflect.TypeOf(a).Kind() == reflect.Bool +} + +func isNumber(a interface{}) bool { + if a == nil { + return false + } + kind := reflect.TypeOf(a).Kind() + return reflect.Int <= kind && kind <= reflect.Float64 +} + +func isInteger(a interface{}) bool { + kind := reflect.TypeOf(a).Kind() + return reflect.Int <= kind && kind <= reflect.Int64 +} + +func isUnsignedInteger(a interface{}) bool { + kind := reflect.TypeOf(a).Kind() + return reflect.Uint <= kind && kind <= reflect.Uint64 +} + +func isFloat(a interface{}) bool { + kind := reflect.TypeOf(a).Kind() + return reflect.Float32 <= kind && kind <= reflect.Float64 +} + +func toInteger(a interface{}) int64 { + if isInteger(a) { + return reflect.ValueOf(a).Int() + } else if isUnsignedInteger(a) { + return int64(reflect.ValueOf(a).Uint()) + } else if isFloat(a) { + return int64(reflect.ValueOf(a).Float()) + } + panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) +} + +func toUnsignedInteger(a interface{}) uint64 { + if isInteger(a) { + return uint64(reflect.ValueOf(a).Int()) + } else if isUnsignedInteger(a) { + return reflect.ValueOf(a).Uint() + } else if isFloat(a) { + return uint64(reflect.ValueOf(a).Float()) + } + panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) +} + +func toFloat(a interface{}) float64 { + if isInteger(a) { + return float64(reflect.ValueOf(a).Int()) + } else if isUnsignedInteger(a) { + return float64(reflect.ValueOf(a).Uint()) + } else if isFloat(a) { + return reflect.ValueOf(a).Float() + } + panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) +} + +func isError(a interface{}) bool { + _, ok := a.(error) + return ok +} + +func isChan(a interface{}) bool { + if isNil(a) { + return false + } + return reflect.TypeOf(a).Kind() == reflect.Chan +} + +func isMap(a interface{}) bool { + if a == nil { + return false + } + return reflect.TypeOf(a).Kind() == reflect.Map +} + +func isArrayOrSlice(a interface{}) bool { + if a == nil { + return false + } + switch reflect.TypeOf(a).Kind() { + case reflect.Array, reflect.Slice: + return true + default: + return false + } +} + +func isString(a interface{}) bool { + if a == nil { + return false + } + return reflect.TypeOf(a).Kind() == reflect.String +} + +func toString(a interface{}) (string, bool) { + aString, isString := a.(string) + if isString { + return aString, true + } + + aBytes, isBytes := a.([]byte) + if isBytes { + return string(aBytes), true + } + + aStringer, isStringer := a.(fmt.Stringer) + if isStringer { + return aStringer.String(), true + } + + aJSONRawMessage, isJSONRawMessage := a.(json.RawMessage) + if isJSONRawMessage { + return string(aJSONRawMessage), true + } + + return "", false +} + +func lengthOf(a interface{}) (int, bool) { + if a == nil { + return 0, false + } + switch reflect.TypeOf(a).Kind() { + case reflect.Map, reflect.Array, reflect.String, reflect.Chan, reflect.Slice: + return reflect.ValueOf(a).Len(), true + case reflect.Func: + if !miter.IsIter(a) { + return 0, false + } + var l int + if miter.IsSeq2(a) { + miter.IterateKV(a, func(k, v reflect.Value) bool { l++; return true }) + } else { + miter.IterateV(a, func(v reflect.Value) bool { l++; return true }) + } + return l, true + default: + return 0, false + } +} +func capOf(a interface{}) (int, bool) { + if a == nil { + return 0, false + } + switch reflect.TypeOf(a).Kind() { + case reflect.Array, reflect.Chan, reflect.Slice: + return reflect.ValueOf(a).Cap(), true + default: + return 0, false + } +} + +func isNil(a interface{}) bool { + if a == nil { + return true + } + + switch reflect.TypeOf(a).Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return reflect.ValueOf(a).IsNil() + } + + return false +} diff --git a/vendor/github.com/onsi/gomega/matchers/with_transform.go b/vendor/github.com/onsi/gomega/matchers/with_transform.go new file mode 100644 index 000000000..6f743b1b3 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/with_transform.go @@ -0,0 +1,90 @@ +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/types" +) + +type WithTransformMatcher struct { + // input + Transform interface{} // must be a function of one parameter that returns one value and an optional error + Matcher types.GomegaMatcher + + // cached value + transformArgType reflect.Type + + // state + transformedValue interface{} +} + +// reflect.Type for error +var errorT = reflect.TypeOf((*error)(nil)).Elem() + +func NewWithTransformMatcher(transform interface{}, matcher types.GomegaMatcher) *WithTransformMatcher { + if transform == nil { + panic("transform function cannot be nil") + } + txType := reflect.TypeOf(transform) + if txType.NumIn() != 1 { + panic("transform function must have 1 argument") + } + if numout := txType.NumOut(); numout != 1 { + if numout != 2 || !txType.Out(1).AssignableTo(errorT) { + panic("transform function must either have 1 return value, or 1 return value plus 1 error value") + } + } + + return &WithTransformMatcher{ + Transform: transform, + Matcher: matcher, + transformArgType: reflect.TypeOf(transform).In(0), + } +} + +func (m *WithTransformMatcher) Match(actual interface{}) (bool, error) { + // prepare a parameter to pass to the Transform function + var param reflect.Value + if actual != nil && reflect.TypeOf(actual).AssignableTo(m.transformArgType) { + // The dynamic type of actual is compatible with the transform argument. + param = reflect.ValueOf(actual) + + } else if actual == nil && m.transformArgType.Kind() == reflect.Interface { + // The dynamic type of actual is unknown, so there's no way to make its + // reflect.Value. Create a nil of the transform argument, which is known. + param = reflect.Zero(m.transformArgType) + + } else { + return false, fmt.Errorf("Transform function expects '%s' but we have '%T'", m.transformArgType, actual) + } + + // call the Transform function with `actual` + fn := reflect.ValueOf(m.Transform) + result := fn.Call([]reflect.Value{param}) + if len(result) == 2 { + if !result[1].IsNil() { + return false, fmt.Errorf("Transform function failed: %s", result[1].Interface().(error).Error()) + } + } + m.transformedValue = result[0].Interface() // expect exactly one value + + return m.Matcher.Match(m.transformedValue) +} + +func (m *WithTransformMatcher) FailureMessage(_ interface{}) (message string) { + return m.Matcher.FailureMessage(m.transformedValue) +} + +func (m *WithTransformMatcher) NegatedFailureMessage(_ interface{}) (message string) { + return m.Matcher.NegatedFailureMessage(m.transformedValue) +} + +func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ interface{}) bool { + // TODO: Maybe this should always just return true? (Only an issue for non-deterministic transformers.) + // + // Querying the next matcher is fine if the transformer always will return the same value. + // But if the transformer is non-deterministic and returns a different value each time, then there + // is no point in querying the next matcher, since it can only comment on the last transformed value. + return types.MatchMayChangeInTheFuture(m.Matcher, m.transformedValue) +} diff --git a/vendor/github.com/onsi/gomega/types/types.go b/vendor/github.com/onsi/gomega/types/types.go new file mode 100644 index 000000000..30f2beed3 --- /dev/null +++ b/vendor/github.com/onsi/gomega/types/types.go @@ -0,0 +1,95 @@ +package types + +import ( + "context" + "time" +) + +type GomegaFailHandler func(message string, callerSkip ...int) + +// A simple *testing.T interface wrapper +type GomegaTestingT interface { + Helper() + Fatalf(format string, args ...interface{}) +} + +// Gomega represents an object that can perform synchronous and assynchronous assertions with Gomega matchers +type Gomega interface { + Ω(actual interface{}, extra ...interface{}) Assertion + Expect(actual interface{}, extra ...interface{}) Assertion + ExpectWithOffset(offset int, actual interface{}, extra ...interface{}) Assertion + + Eventually(actualOrCtx interface{}, args ...interface{}) AsyncAssertion + EventuallyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) AsyncAssertion + + Consistently(actualOrCtx interface{}, args ...interface{}) AsyncAssertion + ConsistentlyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) AsyncAssertion + + SetDefaultEventuallyTimeout(time.Duration) + SetDefaultEventuallyPollingInterval(time.Duration) + SetDefaultConsistentlyDuration(time.Duration) + SetDefaultConsistentlyPollingInterval(time.Duration) + EnforceDefaultTimeoutsWhenUsingContexts() + DisableDefaultTimeoutsWhenUsingContext() +} + +// All Gomega matchers must implement the GomegaMatcher interface +// +// For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding-your-own-matchers +type GomegaMatcher interface { + Match(actual interface{}) (success bool, err error) + FailureMessage(actual interface{}) (message string) + NegatedFailureMessage(actual interface{}) (message string) +} + +/* +GomegaMatchers that also match the OracleMatcher interface can convey information about +whether or not their result will change upon future attempts. + +This allows `Eventually` and `Consistently` to short circuit if success becomes impossible. + +For example, a process' exit code can never change. So, gexec's Exit matcher returns `true` +for `MatchMayChangeInTheFuture` until the process exits, at which point it returns `false` forevermore. +*/ +type OracleMatcher interface { + MatchMayChangeInTheFuture(actual interface{}) bool +} + +func MatchMayChangeInTheFuture(matcher GomegaMatcher, value interface{}) bool { + oracleMatcher, ok := matcher.(OracleMatcher) + if !ok { + return true + } + + return oracleMatcher.MatchMayChangeInTheFuture(value) +} + +// AsyncAssertions are returned by Eventually and Consistently and enable matchers to be polled repeatedly to ensure +// they are eventually satisfied +type AsyncAssertion interface { + Should(matcher GomegaMatcher, optionalDescription ...interface{}) bool + ShouldNot(matcher GomegaMatcher, optionalDescription ...interface{}) bool + + WithOffset(offset int) AsyncAssertion + WithTimeout(interval time.Duration) AsyncAssertion + WithPolling(interval time.Duration) AsyncAssertion + Within(timeout time.Duration) AsyncAssertion + ProbeEvery(interval time.Duration) AsyncAssertion + WithContext(ctx context.Context) AsyncAssertion + WithArguments(argsToForward ...interface{}) AsyncAssertion + MustPassRepeatedly(count int) AsyncAssertion +} + +// Assertions are returned by Ω and Expect and enable assertions against Gomega matchers +type Assertion interface { + Should(matcher GomegaMatcher, optionalDescription ...interface{}) bool + ShouldNot(matcher GomegaMatcher, optionalDescription ...interface{}) bool + + To(matcher GomegaMatcher, optionalDescription ...interface{}) bool + ToNot(matcher GomegaMatcher, optionalDescription ...interface{}) bool + NotTo(matcher GomegaMatcher, optionalDescription ...interface{}) bool + + WithOffset(offset int) Assertion + + Error() Assertion +} diff --git a/vendor/github.com/opencontainers/image-spec/LICENSE b/vendor/github.com/opencontainers/image-spec/LICENSE new file mode 100644 index 000000000..9fdc20fdb --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2016 The Linux Foundation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go new file mode 100644 index 000000000..581cf7cdf --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go @@ -0,0 +1,62 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +const ( + // AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339). + AnnotationCreated = "org.opencontainers.image.created" + + // AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string). + AnnotationAuthors = "org.opencontainers.image.authors" + + // AnnotationURL is the annotation key for the URL to find more information on the image. + AnnotationURL = "org.opencontainers.image.url" + + // AnnotationDocumentation is the annotation key for the URL to get documentation on the image. + AnnotationDocumentation = "org.opencontainers.image.documentation" + + // AnnotationSource is the annotation key for the URL to get source code for building the image. + AnnotationSource = "org.opencontainers.image.source" + + // AnnotationVersion is the annotation key for the version of the packaged software. + // The version MAY match a label or tag in the source code repository. + // The version MAY be Semantic versioning-compatible. + AnnotationVersion = "org.opencontainers.image.version" + + // AnnotationRevision is the annotation key for the source control revision identifier for the packaged software. + AnnotationRevision = "org.opencontainers.image.revision" + + // AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual. + AnnotationVendor = "org.opencontainers.image.vendor" + + // AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression. + AnnotationLicenses = "org.opencontainers.image.licenses" + + // AnnotationRefName is the annotation key for the name of the reference for a target. + // SHOULD only be considered valid when on descriptors on `index.json` within image layout. + AnnotationRefName = "org.opencontainers.image.ref.name" + + // AnnotationTitle is the annotation key for the human-readable title of the image. + AnnotationTitle = "org.opencontainers.image.title" + + // AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image. + AnnotationDescription = "org.opencontainers.image.description" + + // AnnotationBaseImageDigest is the annotation key for the digest of the image's base image. + AnnotationBaseImageDigest = "org.opencontainers.image.base.digest" + + // AnnotationBaseImageName is the annotation key for the image reference of the image's base image. + AnnotationBaseImageName = "org.opencontainers.image.base.name" +) diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go new file mode 100644 index 000000000..36b0aeb8f --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go @@ -0,0 +1,111 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import ( + "time" + + digest "github.com/opencontainers/go-digest" +) + +// ImageConfig defines the execution parameters which should be used as a base when running a container using an image. +type ImageConfig struct { + // User defines the username or UID which the process in the container should run as. + User string `json:"User,omitempty"` + + // ExposedPorts a set of ports to expose from a container running this image. + ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` + + // Env is a list of environment variables to be used in a container. + Env []string `json:"Env,omitempty"` + + // Entrypoint defines a list of arguments to use as the command to execute when the container starts. + Entrypoint []string `json:"Entrypoint,omitempty"` + + // Cmd defines the default arguments to the entrypoint of the container. + Cmd []string `json:"Cmd,omitempty"` + + // Volumes is a set of directories describing where the process is likely write data specific to a container instance. + Volumes map[string]struct{} `json:"Volumes,omitempty"` + + // WorkingDir sets the current working directory of the entrypoint process in the container. + WorkingDir string `json:"WorkingDir,omitempty"` + + // Labels contains arbitrary metadata for the container. + Labels map[string]string `json:"Labels,omitempty"` + + // StopSignal contains the system call signal that will be sent to the container to exit. + StopSignal string `json:"StopSignal,omitempty"` + + // ArgsEscaped + // + // Deprecated: This field is present only for legacy compatibility with + // Docker and should not be used by new image builders. It is used by Docker + // for Windows images to indicate that the `Entrypoint` or `Cmd` or both, + // contains only a single element array, that is a pre-escaped, and combined + // into a single string `CommandLine`. If `true` the value in `Entrypoint` or + // `Cmd` should be used as-is to avoid double escaping. + // https://github.com/opencontainers/image-spec/pull/892 + ArgsEscaped bool `json:"ArgsEscaped,omitempty"` +} + +// RootFS describes a layer content addresses +type RootFS struct { + // Type is the type of the rootfs. + Type string `json:"type"` + + // DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most. + DiffIDs []digest.Digest `json:"diff_ids"` +} + +// History describes the history of a layer. +type History struct { + // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. + Created *time.Time `json:"created,omitempty"` + + // CreatedBy is the command which created the layer. + CreatedBy string `json:"created_by,omitempty"` + + // Author is the author of the build point. + Author string `json:"author,omitempty"` + + // Comment is a custom message set when creating the layer. + Comment string `json:"comment,omitempty"` + + // EmptyLayer is used to mark if the history item created a filesystem diff. + EmptyLayer bool `json:"empty_layer,omitempty"` +} + +// Image is the JSON structure which describes some basic information about the image. +// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON. +type Image struct { + // Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6. + Created *time.Time `json:"created,omitempty"` + + // Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image. + Author string `json:"author,omitempty"` + + // Platform describes the platform which the image in the manifest runs on. + Platform + + // Config defines the execution parameters which should be used as a base when running a container using the image. + Config ImageConfig `json:"config,omitempty"` + + // RootFS references the layer content addresses used by the image. + RootFS RootFS `json:"rootfs"` + + // History describes the history of each layer. + History []History `json:"history,omitempty"` +} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go new file mode 100644 index 000000000..1881b1181 --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go @@ -0,0 +1,80 @@ +// Copyright 2016-2022 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import digest "github.com/opencontainers/go-digest" + +// Descriptor describes the disposition of targeted content. +// This structure provides `application/vnd.oci.descriptor.v1+json` mediatype +// when marshalled to JSON. +type Descriptor struct { + // MediaType is the media type of the object this schema refers to. + MediaType string `json:"mediaType"` + + // Digest is the digest of the targeted content. + Digest digest.Digest `json:"digest"` + + // Size specifies the size in bytes of the blob. + Size int64 `json:"size"` + + // URLs specifies a list of URLs from which this object MAY be downloaded + URLs []string `json:"urls,omitempty"` + + // Annotations contains arbitrary metadata relating to the targeted content. + Annotations map[string]string `json:"annotations,omitempty"` + + // Data is an embedding of the targeted content. This is encoded as a base64 + // string when marshalled to JSON (automatically, by encoding/json). If + // present, Data can be used directly to avoid fetching the targeted content. + Data []byte `json:"data,omitempty"` + + // Platform describes the platform which the image in the manifest runs on. + // + // This should only be used when referring to a manifest. + Platform *Platform `json:"platform,omitempty"` + + // ArtifactType is the IANA media type of this artifact. + ArtifactType string `json:"artifactType,omitempty"` +} + +// Platform describes the platform which the image in the manifest runs on. +type Platform struct { + // Architecture field specifies the CPU architecture, for example + // `amd64` or `ppc64le`. + Architecture string `json:"architecture"` + + // OS specifies the operating system, for example `linux` or `windows`. + OS string `json:"os"` + + // OSVersion is an optional field specifying the operating system + // version, for example on Windows `10.0.14393.1066`. + OSVersion string `json:"os.version,omitempty"` + + // OSFeatures is an optional field specifying an array of strings, + // each listing a required OS feature (for example on Windows `win32k`). + OSFeatures []string `json:"os.features,omitempty"` + + // Variant is an optional field specifying a variant of the CPU, for + // example `v7` to specify ARMv7 when architecture is `arm`. + Variant string `json:"variant,omitempty"` +} + +// DescriptorEmptyJSON is the descriptor of a blob with content of `{}`. +var DescriptorEmptyJSON = Descriptor{ + MediaType: MediaTypeEmptyJSON, + Digest: `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`, + Size: 2, + Data: []byte(`{}`), +} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go new file mode 100644 index 000000000..e2bed9d4e --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go @@ -0,0 +1,38 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import "github.com/opencontainers/image-spec/specs-go" + +// Index references manifests for various platforms. +// This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON. +type Index struct { + specs.Versioned + + // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` + MediaType string `json:"mediaType,omitempty"` + + // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. + ArtifactType string `json:"artifactType,omitempty"` + + // Manifests references platform specific manifests. + Manifests []Descriptor `json:"manifests"` + + // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. + Subject *Descriptor `json:"subject,omitempty"` + + // Annotations contains arbitrary metadata for the image index. + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go new file mode 100644 index 000000000..c5503cb30 --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go @@ -0,0 +1,32 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +const ( + // ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout + ImageLayoutFile = "oci-layout" + // ImageLayoutVersion is the version of ImageLayout + ImageLayoutVersion = "1.0.0" + // ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout + ImageIndexFile = "index.json" + // ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout + ImageBlobsDir = "blobs" +) + +// ImageLayout is the structure in the "oci-layout" file, found in the root +// of an OCI Image-layout directory. +type ImageLayout struct { + Version string `json:"imageLayoutVersion"` +} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go new file mode 100644 index 000000000..26fec52a6 --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go @@ -0,0 +1,41 @@ +// Copyright 2016-2022 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import "github.com/opencontainers/image-spec/specs-go" + +// Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON. +type Manifest struct { + specs.Versioned + + // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` + MediaType string `json:"mediaType,omitempty"` + + // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. + ArtifactType string `json:"artifactType,omitempty"` + + // Config references a configuration object for a container, by digest. + // The referenced configuration object is a JSON blob that the runtime uses to set up the container. + Config Descriptor `json:"config"` + + // Layers is an indexed list of layers referenced by the manifest. + Layers []Descriptor `json:"layers"` + + // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. + Subject *Descriptor `json:"subject,omitempty"` + + // Annotations contains arbitrary metadata for the image manifest. + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go new file mode 100644 index 000000000..ce8313e79 --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go @@ -0,0 +1,85 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +const ( + // MediaTypeDescriptor specifies the media type for a content descriptor. + MediaTypeDescriptor = "application/vnd.oci.descriptor.v1+json" + + // MediaTypeLayoutHeader specifies the media type for the oci-layout. + MediaTypeLayoutHeader = "application/vnd.oci.layout.header.v1+json" + + // MediaTypeImageIndex specifies the media type for an image index. + MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" + + // MediaTypeImageManifest specifies the media type for an image manifest. + MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" + + // MediaTypeImageConfig specifies the media type for the image configuration. + MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" + + // MediaTypeEmptyJSON specifies the media type for an unused blob containing the value "{}". + MediaTypeEmptyJSON = "application/vnd.oci.empty.v1+json" +) + +const ( + // MediaTypeImageLayer is the media type used for layers referenced by the manifest. + MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" + + // MediaTypeImageLayerGzip is the media type used for gzipped layers + // referenced by the manifest. + MediaTypeImageLayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" + + // MediaTypeImageLayerZstd is the media type used for zstd compressed + // layers referenced by the manifest. + MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd" +) + +// Non-distributable layer media-types. +// +// Deprecated: Non-distributable layers are deprecated, and not recommended +// for future use. Implementations SHOULD NOT produce new non-distributable +// layers. +// https://github.com/opencontainers/image-spec/pull/965 +const ( + // MediaTypeImageLayerNonDistributable is the media type for layers referenced by + // the manifest but with distribution restrictions. + // + // Deprecated: Non-distributable layers are deprecated, and not recommended + // for future use. Implementations SHOULD NOT produce new non-distributable + // layers. + // https://github.com/opencontainers/image-spec/pull/965 + MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar" + + // MediaTypeImageLayerNonDistributableGzip is the media type for + // gzipped layers referenced by the manifest but with distribution + // restrictions. + // + // Deprecated: Non-distributable layers are deprecated, and not recommended + // for future use. Implementations SHOULD NOT produce new non-distributable + // layers. + // https://github.com/opencontainers/image-spec/pull/965 + MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" + + // MediaTypeImageLayerNonDistributableZstd is the media type for zstd + // compressed layers referenced by the manifest but with distribution + // restrictions. + // + // Deprecated: Non-distributable layers are deprecated, and not recommended + // for future use. Implementations SHOULD NOT produce new non-distributable + // layers. + // https://github.com/opencontainers/image-spec/pull/965 + MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd" +) diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/version.go b/vendor/github.com/opencontainers/image-spec/specs-go/version.go new file mode 100644 index 000000000..7069ae44d --- /dev/null +++ b/vendor/github.com/opencontainers/image-spec/specs-go/version.go @@ -0,0 +1,32 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package specs + +import "fmt" + +const ( + // VersionMajor is for an API incompatible changes + VersionMajor = 1 + // VersionMinor is for functionality in a backwards-compatible manner + VersionMinor = 1 + // VersionPatch is for backwards-compatible bug fixes + VersionPatch = 0 + + // VersionDev indicates development branch. Releases will be empty string. + VersionDev = "" +) + +// Version is the specification version that the package types support. +var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) diff --git a/vendor/google.golang.org/genproto/googleapis/api/tidyfix.go b/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go similarity index 54% rename from vendor/google.golang.org/genproto/googleapis/api/tidyfix.go rename to vendor/github.com/opencontainers/image-spec/specs-go/versioned.go index 1d3f1b5b7..58a1510f3 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/tidyfix.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go @@ -1,10 +1,10 @@ -// Copyright 2023 Google LLC +// Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file, and the {{.RootMod}} import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack +package specs -package api - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "google.golang.org/genproto/internal" +// Versioned provides a struct with the manifest schemaVersion and mediaType. +// Incoming content with unknown schema version can be decoded against this +// struct to check the version. +type Versioned struct { + // SchemaVersion is the image manifest schema that this image follows + SchemaVersion int `json:"schemaVersion"` +} diff --git a/vendor/github.com/pelletier/go-toml/README.md b/vendor/github.com/pelletier/go-toml/README.md index 6c061712b..7399e04bf 100644 --- a/vendor/github.com/pelletier/go-toml/README.md +++ b/vendor/github.com/pelletier/go-toml/README.md @@ -25,9 +25,9 @@ and [much faster][v2-bench]. If you only need reading and writing TOML documents (majority of cases), those features are implemented and the API unlikely to change. -The remaining features (Document structure editing and tooling) will be added -shortly. While pull-requests are welcome on v1, no active development is -expected on it. When v2.0.0 is released, v1 will be deprecated. +The remaining features will be added shortly. While pull-requests are welcome on +v1, no active development is expected on it. When v2.0.0 is released, v1 will be +deprecated. 👉 [go-toml v2][v2] diff --git a/vendor/github.com/pelletier/go-toml/SECURITY.md b/vendor/github.com/pelletier/go-toml/SECURITY.md new file mode 100644 index 000000000..b2f21cfc9 --- /dev/null +++ b/vendor/github.com/pelletier/go-toml/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ---------- | ------------------ | +| Latest 2.x | :white_check_mark: | +| All 1.x | :x: | +| All 0.x | :x: | + +## Reporting a Vulnerability + +Email a vulnerability report to `security@pelletier.codes`. Make sure to include +as many details as possible to reproduce the vulnerability. This is a +side-project: I will try to get back to you as quickly as possible, time +permitting in my personal life. Providing a working patch helps very much! diff --git a/vendor/github.com/pelletier/go-toml/marshal.go b/vendor/github.com/pelletier/go-toml/marshal.go index 3443c3545..571273049 100644 --- a/vendor/github.com/pelletier/go-toml/marshal.go +++ b/vendor/github.com/pelletier/go-toml/marshal.go @@ -1113,7 +1113,7 @@ func (d *Decoder) valueFromToml(mtype reflect.Type, tval interface{}, mval1 *ref return reflect.ValueOf(nil), fmt.Errorf("Can't convert %v(%T) to %v", tval, tval, mtype.String()) } - if val.Convert(reflect.TypeOf(int(1))).Int() < 0 { + if val.Type().Kind() != reflect.Uint64 && val.Convert(reflect.TypeOf(int(1))).Int() < 0 { return reflect.ValueOf(nil), fmt.Errorf("%v(%T) is negative so does not fit in %v", tval, tval, mtype.String()) } if reflect.Indirect(reflect.New(mtype)).OverflowUint(val.Convert(reflect.TypeOf(uint64(0))).Uint()) { diff --git a/vendor/github.com/pelletier/go-toml/parser.go b/vendor/github.com/pelletier/go-toml/parser.go index f5e1a44fb..b3726d0dd 100644 --- a/vendor/github.com/pelletier/go-toml/parser.go +++ b/vendor/github.com/pelletier/go-toml/parser.go @@ -293,42 +293,41 @@ func (p *tomlParser) parseRvalue() interface{} { return math.NaN() case tokenInteger: cleanedVal := cleanupNumberToken(tok.val) - var err error - var val int64 + base := 10 + s := cleanedVal + checkInvalidUnderscore := numberContainsInvalidUnderscore if len(cleanedVal) >= 3 && cleanedVal[0] == '0' { switch cleanedVal[1] { case 'x': - err = hexNumberContainsInvalidUnderscore(tok.val) - if err != nil { - p.raiseError(tok, "%s", err) - } - val, err = strconv.ParseInt(cleanedVal[2:], 16, 64) + checkInvalidUnderscore = hexNumberContainsInvalidUnderscore + base = 16 case 'o': - err = numberContainsInvalidUnderscore(tok.val) - if err != nil { - p.raiseError(tok, "%s", err) - } - val, err = strconv.ParseInt(cleanedVal[2:], 8, 64) + base = 8 case 'b': - err = numberContainsInvalidUnderscore(tok.val) - if err != nil { - p.raiseError(tok, "%s", err) - } - val, err = strconv.ParseInt(cleanedVal[2:], 2, 64) + base = 2 default: panic("invalid base") // the lexer should catch this first } - } else { - err = numberContainsInvalidUnderscore(tok.val) - if err != nil { - p.raiseError(tok, "%s", err) - } - val, err = strconv.ParseInt(cleanedVal, 10, 64) + s = cleanedVal[2:] } + + err := checkInvalidUnderscore(tok.val) if err != nil { p.raiseError(tok, "%s", err) } - return val + + var val interface{} + val, err = strconv.ParseInt(s, base, 64) + if err == nil { + return val + } + + if s[0] != '-' { + if val, err = strconv.ParseUint(s, base, 64); err == nil { + return val + } + } + p.raiseError(tok, "%s", err) case tokenFloat: err := numberContainsInvalidUnderscore(tok.val) if err != nil { diff --git a/vendor/github.com/pelletier/go-toml/toml.go b/vendor/github.com/pelletier/go-toml/toml.go index 6d82587c4..5541b941f 100644 --- a/vendor/github.com/pelletier/go-toml/toml.go +++ b/vendor/github.com/pelletier/go-toml/toml.go @@ -471,7 +471,7 @@ func LoadBytes(b []byte) (tree *Tree, err error) { if _, ok := r.(runtime.Error); ok { panic(r) } - err = errors.New(r.(string)) + err = fmt.Errorf("%s", r) } }() diff --git a/vendor/github.com/rubenv/sql-migrate/.dockerignore b/vendor/github.com/rubenv/sql-migrate/.dockerignore new file mode 100644 index 000000000..42bb921b4 --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/.dockerignore @@ -0,0 +1,6 @@ +* +!go.mod +!go.sum +!*.go +!sql-migrate/*.go +!sqlparse/*.go diff --git a/vendor/github.com/rubenv/sql-migrate/.gitignore b/vendor/github.com/rubenv/sql-migrate/.gitignore new file mode 100644 index 000000000..9720db0cf --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/.gitignore @@ -0,0 +1,9 @@ +.*.swp +*.test +.idea +/vendor/ + +/sql-migrate/test.db +/test.db +.vscode/ +bin/ diff --git a/vendor/github.com/rubenv/sql-migrate/.golangci.yaml b/vendor/github.com/rubenv/sql-migrate/.golangci.yaml new file mode 100644 index 000000000..f0a970753 --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/.golangci.yaml @@ -0,0 +1,107 @@ +linters-settings: + gocritic: + disabled-checks: + - ifElseChain + goimports: + local-prefixes: github.com/rubenv/sql-migrate + govet: + enable-all: true + disable: + - fieldalignment + depguard: + rules: + main: + allow: + - $gostd + - github.com/denisenkom/go-mssqldb + - github.com/go-sql-driver/mysql + - github.com/go-gorp/gorp/v3 + - github.com/lib/pq + - github.com/mattn/go-sqlite3 + - github.com/mitchellh/cli + - github.com/olekukonko/tablewriter + - github.com/rubenv/sql-migrate + exhaustive: + default-signifies-exhaustive: true + nolintlint: + allow-unused: false + allow-leading-space: false + allow-no-explanation: + - depguard + require-explanation: true + require-specific: true + revive: + enable-all-rules: false + rules: + - name: atomic + - name: blank-imports + - name: bool-literal-in-expr + - name: call-to-gc + - name: constant-logical-expr + - name: context-as-argument + - name: context-keys-type + - name: dot-imports + - name: duplicated-imports + - name: empty-block + - name: empty-lines + - name: error-naming + - name: error-return + - name: error-strings + - name: errorf + - name: exported + - name: identical-branches + - name: imports-blacklist + - name: increment-decrement + - name: indent-error-flow + - name: modifies-parameter + - name: modifies-value-receiver + - name: package-comments + - name: range + - name: range-val-address + - name: range-val-in-closure + - name: receiver-naming + - name: string-format + - name: string-of-int + - name: struct-tag + - name: time-naming + - name: unconditional-recursion + - name: unexported-naming + - name: unexported-return + - name: superfluous-else + - name: unreachable-code + - name: var-declaration + - name: waitgroup-by-value + - name: unused-receiver + - name: unnecessary-stmt + - name: unused-parameter +run: + tests: true + timeout: 1m +linters: + disable-all: true + enable: + - asciicheck + - depguard + - errcheck + - exhaustive + - gocritic + - gofmt + - gofumpt + - goimports + - govet + - ineffassign + - nolintlint + - revive + - staticcheck + - typecheck + - unused + - whitespace + - errorlint + - gosimple + - unparam +issues: + exclude: + - 'declaration of "err" shadows declaration at' # Allow shadowing of `err` because it's so common + - 'error-strings: error strings should not be capitalized or end with punctuation or a newline' + max-same-issues: 10000 + max-issues-per-linter: 10000 diff --git a/vendor/github.com/rubenv/sql-migrate/Dockerfile b/vendor/github.com/rubenv/sql-migrate/Dockerfile new file mode 100644 index 000000000..238ac714a --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/Dockerfile @@ -0,0 +1,25 @@ +ARG GO_VERSION=1.20.6 +ARG ALPINE_VERSION=3.12 + +### Vendor +FROM golang:${GO_VERSION} as vendor +COPY . /project +WORKDIR /project +RUN go mod tidy && go mod vendor + +### Build binary +FROM golang:${GO_VERSION} as build-binary +COPY . /project +COPY --from=vendor /project/vendor /project/vendor +WORKDIR /project +RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build \ + -v \ + -mod vendor \ + -o /project/bin/sql-migrate \ + /project/sql-migrate + +### Image +FROM alpine:${ALPINE_VERSION} as image +COPY --from=build-binary /project/bin/sql-migrate /usr/local/bin/sql-migrate +RUN chmod +x /usr/local/bin/sql-migrate +ENTRYPOINT ["sql-migrate"] diff --git a/vendor/github.com/rubenv/sql-migrate/LICENSE b/vendor/github.com/rubenv/sql-migrate/LICENSE new file mode 100644 index 000000000..95e7c9abe --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2014-2021 by Ruben Vermeersch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/rubenv/sql-migrate/Makefile b/vendor/github.com/rubenv/sql-migrate/Makefile new file mode 100644 index 000000000..e17ae0ad4 --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/Makefile @@ -0,0 +1,11 @@ +.PHONY: test lint build + +test: + go test ./... + +lint: + golangci-lint run --fix --config .golangci.yaml + +build: + mkdir -p bin + go build -o ./bin/sql-migrate ./sql-migrate diff --git a/vendor/github.com/rubenv/sql-migrate/README.md b/vendor/github.com/rubenv/sql-migrate/README.md new file mode 100644 index 000000000..65fd7f70e --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/README.md @@ -0,0 +1,386 @@ +# sql-migrate + +> SQL Schema migration tool for [Go](https://golang.org/). Based on [gorp](https://github.com/go-gorp/gorp) and [goose](https://bitbucket.org/liamstask/goose). + +[![Test](https://github.com/rubenv/sql-migrate/actions/workflows/test.yml/badge.svg)](https://github.com/rubenv/sql-migrate/actions/workflows/test.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/rubenv/sql-migrate.svg)](https://pkg.go.dev/github.com/rubenv/sql-migrate) + +## Features + +- Usable as a CLI tool or as a library +- Supports SQLite, PostgreSQL, MySQL, MSSQL and Oracle databases (through [gorp](https://github.com/go-gorp/gorp)) +- Can embed migrations into your application +- Migrations are defined with SQL for full flexibility +- Atomic migrations +- Up/down migrations to allow rollback +- Supports multiple database types in one project +- Works great with other libraries such as [sqlx](https://jmoiron.github.io/sqlx/) +- Supported on go1.13+ + +## Installation + +To install the library and command line program, use the following: + +```bash +go get -v github.com/rubenv/sql-migrate/... +``` + +For Go version from 1.18, use: + +```bash +go install github.com/rubenv/sql-migrate/...@latest +``` + +## Usage + +### As a standalone tool + +``` +$ sql-migrate --help +usage: sql-migrate [--version] [--help] [] + +Available commands are: + down Undo a database migration + new Create a new migration + redo Reapply the last migration + status Show migration status + up Migrates the database to the most recent version available +``` + +Each command requires a configuration file (which defaults to `dbconfig.yml`, but can be specified with the `-config` flag). This config file should specify one or more environments: + +```yml +development: + dialect: sqlite3 + datasource: test.db + dir: migrations/sqlite3 + +production: + dialect: postgres + datasource: dbname=myapp sslmode=disable + dir: migrations/postgres + table: migrations +``` + +(See more examples for different set ups [here](test-integration/dbconfig.yml)) + +Also one can obtain env variables in datasource field via `os.ExpandEnv` embedded call for the field. +This may be useful if one doesn't want to store credentials in file: + +```yml +production: + dialect: postgres + datasource: host=prodhost dbname=proddb user=${DB_USER} password=${DB_PASSWORD} sslmode=require + dir: migrations + table: migrations +``` + +The `table` setting is optional and will default to `gorp_migrations`. + +The environment that will be used can be specified with the `-env` flag (defaults to `development`). + +Use the `--help` flag in combination with any of the commands to get an overview of its usage: + +``` +$ sql-migrate up --help +Usage: sql-migrate up [options] ... + + Migrates the database to the most recent version available. + +Options: + + -config=dbconfig.yml Configuration file to use. + -env="development" Environment. + -limit=0 Limit the number of migrations (0 = unlimited). + -version Run migrate up to a specific version, eg: the version number of migration 1_initial.sql is 1. + -dryrun Don't apply migrations, just print them. +``` + +The `new` command creates a new empty migration template using the following pattern `-.sql`. + +The `up` command applies all available migrations. By contrast, `down` will only apply one migration by default. This behavior can be changed for both by using the `-limit` parameter, and the `-version` parameter. Note `-version` has higher priority than `-limit` if you try to use them both. + +The `redo` command will unapply the last migration and reapply it. This is useful during development, when you're writing migrations. + +Use the `status` command to see the state of the applied migrations: + +```bash +$ sql-migrate status ++---------------+-----------------------------------------+ +| MIGRATION | APPLIED | ++---------------+-----------------------------------------+ +| 1_initial.sql | 2014-09-13 08:19:06.788354925 +0000 UTC | +| 2_record.sql | no | ++---------------+-----------------------------------------+ +``` + +#### Running Test Integrations + +You can see how to run setups for different setups by executing the `.sh` files in [test-integration](test-integration/) + +```bash +# Run mysql-env.sh example (you need to be in the project root directory) + +./test-integration/mysql-env.sh +``` + +### MySQL Caveat + +If you are using MySQL, you must append `?parseTime=true` to the `datasource` configuration. For example: + +```yml +production: + dialect: mysql + datasource: root@/dbname?parseTime=true + dir: migrations/mysql + table: migrations +``` + +See [here](https://github.com/go-sql-driver/mysql#parsetime) for more information. + +### Oracle (oci8) + +Oracle Driver is [oci8](https://github.com/mattn/go-oci8), it is not pure Go code and relies on Oracle Office Client ([Instant Client](https://www.oracle.com/database/technologies/instant-client/downloads.html)), more detailed information is in the [oci8 repo](https://github.com/mattn/go-oci8). + +#### Install with Oracle support + +To install the library and command line program, use the following: + +```bash +go get -tags oracle -v github.com/rubenv/sql-migrate/... +``` + +```yml +development: + dialect: oci8 + datasource: user/password@localhost:1521/sid + dir: migrations/oracle + table: migrations +``` + +### Oracle (godror) + +Oracle Driver is [godror](https://github.com/godror/godror), it is not pure Go code and relies on Oracle Office Client ([Instant Client](https://www.oracle.com/database/technologies/instant-client/downloads.html)), more detailed information is in the [godror repository](https://github.com/godror/godror). + +#### Install with Oracle support + +To install the library and command line program, use the following: + +1. Install sql-migrate + +```bash +go get -tags godror -v github.com/rubenv/sql-migrate/... +``` + +2. Download Oracle Office Client(e.g. macos, click [Instant Client](https://www.oracle.com/database/technologies/instant-client/downloads.html) if you are other system) + +```bash +wget https://download.oracle.com/otn_software/mac/instantclient/193000/instantclient-basic-macos.x64-19.3.0.0.0dbru.zip +``` + +3. Configure environment variables `LD_LIBRARY_PATH` + +``` +export LD_LIBRARY_PATH=your_oracle_office_path/instantclient_19_3 +``` + +```yml +development: + dialect: godror + datasource: user/password@localhost:1521/sid + dir: migrations/oracle + table: migrations +``` + +### As a library + +Import sql-migrate into your application: + +```go +import "github.com/rubenv/sql-migrate" +``` + +Set up a source of migrations, this can be from memory, from a set of files, from bindata (more on that later), or from any library that implements [`http.FileSystem`](https://godoc.org/net/http#FileSystem): + +```go +// Hardcoded strings in memory: +migrations := &migrate.MemoryMigrationSource{ + Migrations: []*migrate.Migration{ + &migrate.Migration{ + Id: "123", + Up: []string{"CREATE TABLE people (id int)"}, + Down: []string{"DROP TABLE people"}, + }, + }, +} + +// OR: Read migrations from a folder: +migrations := &migrate.FileMigrationSource{ + Dir: "db/migrations", +} + +// OR: Use migrations from a packr box +// Note: Packr is no longer supported, your best option these days is [embed](https://pkg.go.dev/embed) +migrations := &migrate.PackrMigrationSource{ + Box: packr.New("migrations", "./migrations"), +} + +// OR: Use pkger which implements `http.FileSystem` +migrationSource := &migrate.HttpFileSystemMigrationSource{ + FileSystem: pkger.Dir("/db/migrations"), +} + +// OR: Use migrations from bindata: +migrations := &migrate.AssetMigrationSource{ + Asset: Asset, + AssetDir: AssetDir, + Dir: "migrations", +} + +// OR: Read migrations from a `http.FileSystem` +migrationSource := &migrate.HttpFileSystemMigrationSource{ + FileSystem: httpFS, +} +``` + +Then use the `Exec` function to upgrade your database: + +```go +db, err := sql.Open("sqlite3", filename) +if err != nil { + // Handle errors! +} + +n, err := migrate.Exec(db, "sqlite3", migrations, migrate.Up) +if err != nil { + // Handle errors! +} +fmt.Printf("Applied %d migrations!\n", n) +``` + +Note that `n` can be greater than `0` even if there is an error: any migration that succeeded will remain applied even if a later one fails. + +Check [the GoDoc reference](https://godoc.org/github.com/rubenv/sql-migrate) for the full documentation. + +## Writing migrations + +Migrations are defined in SQL files, which contain a set of SQL statements. Special comments are used to distinguish up and down migrations. + +```sql +-- +migrate Up +-- SQL in section 'Up' is executed when this migration is applied +CREATE TABLE people (id int); + + +-- +migrate Down +-- SQL section 'Down' is executed when this migration is rolled back +DROP TABLE people; +``` + +You can put multiple statements in each block, as long as you end them with a semicolon (`;`). + +You can alternatively set up a separator string that matches an entire line by setting `sqlparse.LineSeparator`. This +can be used to imitate, for example, MS SQL Query Analyzer functionality where commands can be separated by a line with +contents of `GO`. If `sqlparse.LineSeparator` is matched, it will not be included in the resulting migration scripts. + +If you have complex statements which contain semicolons, use `StatementBegin` and `StatementEnd` to indicate boundaries: + +```sql +-- +migrate Up +CREATE TABLE people (id int); + +-- +migrate StatementBegin +CREATE OR REPLACE FUNCTION do_something() +returns void AS $$ +DECLARE + create_query text; +BEGIN + -- Do something here +END; +$$ +language plpgsql; +-- +migrate StatementEnd + +-- +migrate Down +DROP FUNCTION do_something(); +DROP TABLE people; +``` + +The order in which migrations are applied is defined through the filename: sql-migrate will sort migrations based on their name. It's recommended to use an increasing version number or a timestamp as the first part of the filename. + +Normally each migration is run within a transaction in order to guarantee that it is fully atomic. However some SQL commands (for example creating an index concurrently in PostgreSQL) cannot be executed inside a transaction. In order to execute such a command in a migration, the migration can be run using the `notransaction` option: + +```sql +-- +migrate Up notransaction +CREATE UNIQUE INDEX CONCURRENTLY people_unique_id_idx ON people (id); + +-- +migrate Down +DROP INDEX people_unique_id_idx; +``` + +## Embedding migrations with [embed](https://pkg.go.dev/embed) + +If you like your Go applications self-contained (that is: a single binary): use [embed](https://pkg.go.dev/embed) to embed the migration files. + +Just write your migration files as usual, as a set of SQL files in a folder. + +Import the embed package into your application and point it to your migrations: + +```go +import "embed" + +//go:embed migrations/* +var dbMigrations embed.FS +``` + +Use the `EmbedFileSystemMigrationSource` in your application to find the migrations: + +```go +migrations := migrate.EmbedFileSystemMigrationSource{ + FileSystem: dbMigrations, + Root: "migrations", +} +``` + +Other options such as [packr](https://github.com/gobuffalo/packr) or [go-bindata](https://github.com/shuLhan/go-bindata) are no longer recommended. + +## Embedding migrations with libraries that implement `http.FileSystem` + +You can also embed migrations with any library that implements `http.FileSystem`, like [`vfsgen`](https://github.com/shurcooL/vfsgen), [`parcello`](https://github.com/phogolabs/parcello), or [`go-resources`](https://github.com/omeid/go-resources). + +```go +migrationSource := &migrate.HttpFileSystemMigrationSource{ + FileSystem: httpFS, +} +``` + +## Extending + +Adding a new migration source means implementing `MigrationSource`. + +```go +type MigrationSource interface { + FindMigrations() ([]*Migration, error) +} +``` + +The resulting slice of migrations will be executed in the given order, so it should usually be sorted by the `Id` field. + +## Usage with [sqlx](https://jmoiron.github.io/sqlx/) + +This library is compatible with sqlx. When calling migrate just dereference the DB from your `*sqlx.DB`: + +``` +n, err := migrate.Exec(db.DB, "sqlite3", migrations, migrate.Up) + // ^^^ <-- Here db is a *sqlx.DB, the db.DB field is the plain sql.DB +if err != nil { + // Handle errors! +} +``` + +## Questions or Feedback? + +You can use Github Issues for feedback or questions. + +## License + +This library is distributed under the [MIT](LICENSE) license. diff --git a/vendor/github.com/rubenv/sql-migrate/doc.go b/vendor/github.com/rubenv/sql-migrate/doc.go new file mode 100644 index 000000000..8ff186d0f --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/doc.go @@ -0,0 +1,238 @@ +/* +SQL Schema migration tool for Go. + +Key features: + + - Usable as a CLI tool or as a library + - Supports SQLite, PostgreSQL, MySQL, MSSQL and Oracle databases (through gorp) + - Can embed migrations into your application + - Migrations are defined with SQL for full flexibility + - Atomic migrations + - Up/down migrations to allow rollback + - Supports multiple database types in one project + +# Installation + +To install the library and command line program, use the following: + + go get -v github.com/rubenv/sql-migrate/... + +# Command-line tool + +The main command is called sql-migrate. + + $ sql-migrate --help + usage: sql-migrate [--version] [--help] [] + + Available commands are: + down Undo a database migration + new Create a new migration + redo Reapply the last migration + status Show migration status + up Migrates the database to the most recent version available + +Each command requires a configuration file (which defaults to dbconfig.yml, but can be specified with the -config flag). This config file should specify one or more environments: + + development: + dialect: sqlite3 + datasource: test.db + dir: migrations/sqlite3 + + production: + dialect: postgres + datasource: dbname=myapp sslmode=disable + dir: migrations/postgres + table: migrations + +The `table` setting is optional and will default to `gorp_migrations`. + +The environment that will be used can be specified with the -env flag (defaults to development). + +Use the --help flag in combination with any of the commands to get an overview of its usage: + + $ sql-migrate up --help + Usage: sql-migrate up [options] ... + + Migrates the database to the most recent version available. + + Options: + + -config=config.yml Configuration file to use. + -env="development" Environment. + -limit=0 Limit the number of migrations (0 = unlimited). + -dryrun Don't apply migrations, just print them. + +The up command applies all available migrations. By contrast, down will only apply one migration by default. This behavior can be changed for both by using the -limit parameter. + +The redo command will unapply the last migration and reapply it. This is useful during development, when you're writing migrations. + +Use the status command to see the state of the applied migrations: + + $ sql-migrate status + +---------------+-----------------------------------------+ + | MIGRATION | APPLIED | + +---------------+-----------------------------------------+ + | 1_initial.sql | 2014-09-13 08:19:06.788354925 +0000 UTC | + | 2_record.sql | no | + +---------------+-----------------------------------------+ + +# MySQL Caveat + +If you are using MySQL, you must append ?parseTime=true to the datasource configuration. For example: + + production: + dialect: mysql + datasource: root@/dbname?parseTime=true + dir: migrations/mysql + table: migrations + +See https://github.com/go-sql-driver/mysql#parsetime for more information. + +# Library + +Import sql-migrate into your application: + + import "github.com/rubenv/sql-migrate" + +Set up a source of migrations, this can be from memory, from a set of files or from bindata (more on that later): + + // Hardcoded strings in memory: + migrations := &migrate.MemoryMigrationSource{ + Migrations: []*migrate.Migration{ + &migrate.Migration{ + Id: "123", + Up: []string{"CREATE TABLE people (id int)"}, + Down: []string{"DROP TABLE people"}, + }, + }, + } + + // OR: Read migrations from a folder: + migrations := &migrate.FileMigrationSource{ + Dir: "db/migrations", + } + + // OR: Use migrations from bindata: + migrations := &migrate.AssetMigrationSource{ + Asset: Asset, + AssetDir: AssetDir, + Dir: "migrations", + } + +Then use the Exec function to upgrade your database: + + db, err := sql.Open("sqlite3", filename) + if err != nil { + // Handle errors! + } + + n, err := migrate.Exec(db, "sqlite3", migrations, migrate.Up) + if err != nil { + // Handle errors! + } + fmt.Printf("Applied %d migrations!\n", n) + +Note that n can be greater than 0 even if there is an error: any migration that succeeded will remain applied even if a later one fails. + +The full set of capabilities can be found in the API docs below. + +# Writing migrations + +Migrations are defined in SQL files, which contain a set of SQL statements. Special comments are used to distinguish up and down migrations. + + -- +migrate Up + -- SQL in section 'Up' is executed when this migration is applied + CREATE TABLE people (id int); + + + -- +migrate Down + -- SQL section 'Down' is executed when this migration is rolled back + DROP TABLE people; + +You can put multiple statements in each block, as long as you end them with a semicolon (;). + +If you have complex statements which contain semicolons, use StatementBegin and StatementEnd to indicate boundaries: + + -- +migrate Up + CREATE TABLE people (id int); + + -- +migrate StatementBegin + CREATE OR REPLACE FUNCTION do_something() + returns void AS $$ + DECLARE + create_query text; + BEGIN + -- Do something here + END; + $$ + language plpgsql; + -- +migrate StatementEnd + + -- +migrate Down + DROP FUNCTION do_something(); + DROP TABLE people; + +The order in which migrations are applied is defined through the filename: sql-migrate will sort migrations based on their name. It's recommended to use an increasing version number or a timestamp as the first part of the filename. + +Normally each migration is run within a transaction in order to guarantee that it is fully atomic. However some SQL commands (for example creating an index concurrently in PostgreSQL) cannot be executed inside a transaction. In order to execute such a command in a migration, the migration can be run using the notransaction option: + + -- +migrate Up notransaction + CREATE UNIQUE INDEX people_unique_id_idx CONCURRENTLY ON people (id); + + -- +migrate Down + DROP INDEX people_unique_id_idx; + +# Embedding migrations with packr + +If you like your Go applications self-contained (that is: a single binary): use packr (https://github.com/gobuffalo/packr) to embed the migration files. + +Just write your migration files as usual, as a set of SQL files in a folder. + +Use the PackrMigrationSource in your application to find the migrations: + + migrations := &migrate.PackrMigrationSource{ + Box: packr.NewBox("./migrations"), + } + +If you already have a box and would like to use a subdirectory: + + migrations := &migrate.PackrMigrationSource{ + Box: myBox, + Dir: "./migrations", + } + +# Embedding migrations with bindata + +As an alternative, but slightly less maintained, you can use bindata (https://github.com/shuLhan/go-bindata) to embed the migration files. + +Just write your migration files as usual, as a set of SQL files in a folder. + +Then use bindata to generate a .go file with the migrations embedded: + + go-bindata -pkg myapp -o bindata.go db/migrations/ + +The resulting bindata.go file will contain your migrations. Remember to regenerate your bindata.go file whenever you add/modify a migration (go generate will help here, once it arrives). + +Use the AssetMigrationSource in your application to find the migrations: + + migrations := &migrate.AssetMigrationSource{ + Asset: Asset, + AssetDir: AssetDir, + Dir: "db/migrations", + } + +Both Asset and AssetDir are functions provided by bindata. + +Then proceed as usual. + +# Extending + +Adding a new migration source means implementing MigrationSource. + + type MigrationSource interface { + FindMigrations() ([]*Migration, error) + } + +The resulting slice of migrations will be executed in the given order, so it should usually be sorted by the Id field. +*/ +package migrate diff --git a/vendor/github.com/rubenv/sql-migrate/migrate.go b/vendor/github.com/rubenv/sql-migrate/migrate.go new file mode 100644 index 000000000..7fb56f1a9 --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/migrate.go @@ -0,0 +1,891 @@ +package migrate + +import ( + "bytes" + "context" + "database/sql" + "embed" + "errors" + "fmt" + "io" + "net/http" + "os" + "path" + "regexp" + "sort" + "strconv" + "strings" + "time" + + "github.com/go-gorp/gorp/v3" + + "github.com/rubenv/sql-migrate/sqlparse" +) + +type MigrationDirection int + +const ( + Up MigrationDirection = iota + Down +) + +// MigrationSet provides database parameters for a migration execution +type MigrationSet struct { + // TableName name of the table used to store migration info. + TableName string + // SchemaName schema that the migration table be referenced. + SchemaName string + // IgnoreUnknown skips the check to see if there is a migration + // ran in the database that is not in MigrationSource. + // + // This should be used sparingly as it is removing a safety check. + IgnoreUnknown bool + // DisableCreateTable disable the creation of the migration table + DisableCreateTable bool +} + +var migSet = MigrationSet{} + +// NewMigrationSet returns a parametrized Migration object +func (ms MigrationSet) getTableName() string { + if ms.TableName == "" { + return "gorp_migrations" + } + return ms.TableName +} + +var numberPrefixRegex = regexp.MustCompile(`^(\d+).*$`) + +// PlanError happens where no migration plan could be created between the sets +// of already applied migrations and the currently found. For example, when the database +// contains a migration which is not among the migrations list found for an operation. +type PlanError struct { + Migration *Migration + ErrorMessage string +} + +func newPlanError(migration *Migration, errorMessage string) error { + return &PlanError{ + Migration: migration, + ErrorMessage: errorMessage, + } +} + +func (p *PlanError) Error() string { + return fmt.Sprintf("Unable to create migration plan because of %s: %s", + p.Migration.Id, p.ErrorMessage) +} + +// TxError is returned when any error is encountered during a database +// transaction. It contains the relevant *Migration and notes it's Id in the +// Error function output. +type TxError struct { + Migration *Migration + Err error +} + +func newTxError(migration *PlannedMigration, err error) error { + return &TxError{ + Migration: migration.Migration, + Err: err, + } +} + +func (e *TxError) Error() string { + return e.Err.Error() + " handling " + e.Migration.Id +} + +// Set the name of the table used to store migration info. +// +// Should be called before any other call such as (Exec, ExecMax, ...). +func SetTable(name string) { + if name != "" { + migSet.TableName = name + } +} + +// SetSchema sets the name of a schema that the migration table be referenced. +func SetSchema(name string) { + if name != "" { + migSet.SchemaName = name + } +} + +// SetDisableCreateTable sets the boolean to disable the creation of the migration table +func SetDisableCreateTable(disable bool) { + migSet.DisableCreateTable = disable +} + +// SetIgnoreUnknown sets the flag that skips database check to see if there is a +// migration in the database that is not in migration source. +// +// This should be used sparingly as it is removing a safety check. +func SetIgnoreUnknown(v bool) { + migSet.IgnoreUnknown = v +} + +type Migration struct { + Id string + Up []string + Down []string + + DisableTransactionUp bool + DisableTransactionDown bool +} + +func (m Migration) Less(other *Migration) bool { + switch { + case m.isNumeric() && other.isNumeric() && m.VersionInt() != other.VersionInt(): + return m.VersionInt() < other.VersionInt() + case m.isNumeric() && !other.isNumeric(): + return true + case !m.isNumeric() && other.isNumeric(): + return false + default: + return m.Id < other.Id + } +} + +func (m Migration) isNumeric() bool { + return len(m.NumberPrefixMatches()) > 0 +} + +func (m Migration) NumberPrefixMatches() []string { + return numberPrefixRegex.FindStringSubmatch(m.Id) +} + +func (m Migration) VersionInt() int64 { + v := m.NumberPrefixMatches()[1] + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + panic(fmt.Sprintf("Could not parse %q into int64: %s", v, err)) + } + return value +} + +type PlannedMigration struct { + *Migration + + DisableTransaction bool + Queries []string +} + +type byId []*Migration + +func (b byId) Len() int { return len(b) } +func (b byId) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b byId) Less(i, j int) bool { return b[i].Less(b[j]) } + +type MigrationRecord struct { + Id string `db:"id"` + AppliedAt time.Time `db:"applied_at"` +} + +type OracleDialect struct { + gorp.OracleDialect +} + +func (OracleDialect) IfTableNotExists(command, _, _ string) string { + return command +} + +func (OracleDialect) IfSchemaNotExists(command, _ string) string { + return command +} + +func (OracleDialect) IfTableExists(command, _, _ string) string { + return command +} + +var MigrationDialects = map[string]gorp.Dialect{ + "sqlite3": gorp.SqliteDialect{}, + "postgres": gorp.PostgresDialect{}, + "mysql": gorp.MySQLDialect{Engine: "InnoDB", Encoding: "UTF8"}, + "mssql": gorp.SqlServerDialect{}, + "oci8": OracleDialect{}, + "godror": OracleDialect{}, + "snowflake": gorp.SnowflakeDialect{}, +} + +type MigrationSource interface { + // Finds the migrations. + // + // The resulting slice of migrations should be sorted by Id. + FindMigrations() ([]*Migration, error) +} + +// A hardcoded set of migrations, in-memory. +type MemoryMigrationSource struct { + Migrations []*Migration +} + +var _ MigrationSource = (*MemoryMigrationSource)(nil) + +func (m MemoryMigrationSource) FindMigrations() ([]*Migration, error) { + // Make sure migrations are sorted. In order to make the MemoryMigrationSource safe for + // concurrent use we should not mutate it in place. So `FindMigrations` would sort a copy + // of the m.Migrations. + migrations := make([]*Migration, len(m.Migrations)) + copy(migrations, m.Migrations) + sort.Sort(byId(migrations)) + return migrations, nil +} + +// A set of migrations loaded from an http.FileServer + +type HttpFileSystemMigrationSource struct { + FileSystem http.FileSystem +} + +var _ MigrationSource = (*HttpFileSystemMigrationSource)(nil) + +func (f HttpFileSystemMigrationSource) FindMigrations() ([]*Migration, error) { + return findMigrations(f.FileSystem, "/") +} + +// A set of migrations loaded from a directory. +type FileMigrationSource struct { + Dir string +} + +var _ MigrationSource = (*FileMigrationSource)(nil) + +func (f FileMigrationSource) FindMigrations() ([]*Migration, error) { + filesystem := http.Dir(f.Dir) + return findMigrations(filesystem, "/") +} + +func findMigrations(dir http.FileSystem, root string) ([]*Migration, error) { + migrations := make([]*Migration, 0) + + file, err := dir.Open(root) + if err != nil { + return nil, err + } + + files, err := file.Readdir(0) + if err != nil { + return nil, err + } + + for _, info := range files { + if strings.HasSuffix(info.Name(), ".sql") { + migration, err := migrationFromFile(dir, root, info) + if err != nil { + return nil, err + } + + migrations = append(migrations, migration) + } + } + + // Make sure migrations are sorted + sort.Sort(byId(migrations)) + + return migrations, nil +} + +func migrationFromFile(dir http.FileSystem, root string, info os.FileInfo) (*Migration, error) { + path := path.Join(root, info.Name()) + file, err := dir.Open(path) + if err != nil { + return nil, fmt.Errorf("Error while opening %s: %w", info.Name(), err) + } + defer func() { _ = file.Close() }() + + migration, err := ParseMigration(info.Name(), file) + if err != nil { + return nil, fmt.Errorf("Error while parsing %s: %w", info.Name(), err) + } + return migration, nil +} + +// Migrations from a bindata asset set. +type AssetMigrationSource struct { + // Asset should return content of file in path if exists + Asset func(path string) ([]byte, error) + + // AssetDir should return list of files in the path + AssetDir func(path string) ([]string, error) + + // Path in the bindata to use. + Dir string +} + +var _ MigrationSource = (*AssetMigrationSource)(nil) + +func (a AssetMigrationSource) FindMigrations() ([]*Migration, error) { + migrations := make([]*Migration, 0) + + files, err := a.AssetDir(a.Dir) + if err != nil { + return nil, err + } + + for _, name := range files { + if strings.HasSuffix(name, ".sql") { + file, err := a.Asset(path.Join(a.Dir, name)) + if err != nil { + return nil, err + } + + migration, err := ParseMigration(name, bytes.NewReader(file)) + if err != nil { + return nil, err + } + + migrations = append(migrations, migration) + } + } + + // Make sure migrations are sorted + sort.Sort(byId(migrations)) + + return migrations, nil +} + +// A set of migrations loaded from an go1.16 embed.FS +type EmbedFileSystemMigrationSource struct { + FileSystem embed.FS + + Root string +} + +var _ MigrationSource = (*EmbedFileSystemMigrationSource)(nil) + +func (f EmbedFileSystemMigrationSource) FindMigrations() ([]*Migration, error) { + return findMigrations(http.FS(f.FileSystem), f.Root) +} + +// Avoids pulling in the packr library for everyone, mimicks the bits of +// packr.Box that we need. +type PackrBox interface { + List() []string + Find(name string) ([]byte, error) +} + +// Migrations from a packr box. +type PackrMigrationSource struct { + Box PackrBox + + // Path in the box to use. + Dir string +} + +var _ MigrationSource = (*PackrMigrationSource)(nil) + +func (p PackrMigrationSource) FindMigrations() ([]*Migration, error) { + migrations := make([]*Migration, 0) + items := p.Box.List() + + prefix := "" + dir := path.Clean(p.Dir) + if dir != "." { + prefix = fmt.Sprintf("%s/", dir) + } + + for _, item := range items { + if !strings.HasPrefix(item, prefix) { + continue + } + name := strings.TrimPrefix(item, prefix) + if strings.Contains(name, "/") { + continue + } + + if strings.HasSuffix(name, ".sql") { + file, err := p.Box.Find(item) + if err != nil { + return nil, err + } + + migration, err := ParseMigration(name, bytes.NewReader(file)) + if err != nil { + return nil, err + } + + migrations = append(migrations, migration) + } + } + + // Make sure migrations are sorted + sort.Sort(byId(migrations)) + + return migrations, nil +} + +// Migration parsing +func ParseMigration(id string, r io.ReadSeeker) (*Migration, error) { + m := &Migration{ + Id: id, + } + + parsed, err := sqlparse.ParseMigration(r) + if err != nil { + return nil, fmt.Errorf("Error parsing migration (%s): %w", id, err) + } + + m.Up = parsed.UpStatements + m.Down = parsed.DownStatements + + m.DisableTransactionUp = parsed.DisableTransactionUp + m.DisableTransactionDown = parsed.DisableTransactionDown + + return m, nil +} + +type SqlExecutor interface { + Exec(query string, args ...interface{}) (sql.Result, error) + Insert(list ...interface{}) error + Delete(list ...interface{}) (int64, error) +} + +// Execute a set of migrations +// +// Returns the number of applied migrations. +func Exec(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) { + return ExecMaxContext(context.Background(), db, dialect, m, dir, 0) +} + +// Returns the number of applied migrations. +func (ms MigrationSet) Exec(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) { + return ms.ExecMaxContext(context.Background(), db, dialect, m, dir, 0) +} + +// Execute a set of migrations with an input context. +// +// Returns the number of applied migrations. +func ExecContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) { + return ExecMaxContext(ctx, db, dialect, m, dir, 0) +} + +// Returns the number of applied migrations. +func (ms MigrationSet) ExecContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) { + return ms.ExecMaxContext(ctx, db, dialect, m, dir, 0) +} + +// Execute a set of migrations +// +// Will apply at most `max` migrations. Pass 0 for no limit (or use Exec). +// +// Returns the number of applied migrations. +func ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) { + return migSet.ExecMax(db, dialect, m, dir, max) +} + +// Execute a set of migrations with an input context. +// +// Will apply at most `max` migrations. Pass 0 for no limit (or use Exec). +// +// Returns the number of applied migrations. +func ExecMaxContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) { + return migSet.ExecMaxContext(ctx, db, dialect, m, dir, max) +} + +// Execute a set of migrations +// +// Will apply at the target `version` of migration. Cannot be a negative value. +// +// Returns the number of applied migrations. +func ExecVersion(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) { + return ExecVersionContext(context.Background(), db, dialect, m, dir, version) +} + +// Execute a set of migrations with an input context. +// +// Will apply at the target `version` of migration. Cannot be a negative value. +// +// Returns the number of applied migrations. +func ExecVersionContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) { + if version < 0 { + return 0, fmt.Errorf("target version %d should not be negative", version) + } + return migSet.ExecVersionContext(ctx, db, dialect, m, dir, version) +} + +// Returns the number of applied migrations. +func (ms MigrationSet) ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) { + return ms.ExecMaxContext(context.Background(), db, dialect, m, dir, max) +} + +// Returns the number of applied migrations, but applies with an input context. +func (ms MigrationSet) ExecMaxContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) { + migrations, dbMap, err := ms.PlanMigration(db, dialect, m, dir, max) + if err != nil { + return 0, err + } + return ms.applyMigrations(ctx, dir, migrations, dbMap) +} + +// Returns the number of applied migrations. +func (ms MigrationSet) ExecVersion(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) { + return ms.ExecVersionContext(context.Background(), db, dialect, m, dir, version) +} + +func (ms MigrationSet) ExecVersionContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) { + migrations, dbMap, err := ms.PlanMigrationToVersion(db, dialect, m, dir, version) + if err != nil { + return 0, err + } + return ms.applyMigrations(ctx, dir, migrations, dbMap) +} + +// Applies the planned migrations and returns the number of applied migrations. +func (MigrationSet) applyMigrations(ctx context.Context, dir MigrationDirection, migrations []*PlannedMigration, dbMap *gorp.DbMap) (int, error) { + applied := 0 + for _, migration := range migrations { + var executor SqlExecutor + var err error + + if migration.DisableTransaction { + executor = dbMap.WithContext(ctx) + } else { + e, err := dbMap.Begin() + if err != nil { + return applied, newTxError(migration, err) + } + executor = e.WithContext(ctx) + } + + for _, stmt := range migration.Queries { + // remove the semicolon from stmt, fix ORA-00922 issue in database oracle + stmt = strings.TrimSuffix(stmt, "\n") + stmt = strings.TrimSuffix(stmt, " ") + stmt = strings.TrimSuffix(stmt, ";") + if _, err := executor.Exec(stmt); err != nil { + if trans, ok := executor.(*gorp.Transaction); ok { + _ = trans.Rollback() + } + + return applied, newTxError(migration, err) + } + } + + switch dir { + case Up: + err = executor.Insert(&MigrationRecord{ + Id: migration.Id, + AppliedAt: time.Now(), + }) + if err != nil { + if trans, ok := executor.(*gorp.Transaction); ok { + _ = trans.Rollback() + } + + return applied, newTxError(migration, err) + } + case Down: + _, err := executor.Delete(&MigrationRecord{ + Id: migration.Id, + }) + if err != nil { + if trans, ok := executor.(*gorp.Transaction); ok { + _ = trans.Rollback() + } + + return applied, newTxError(migration, err) + } + default: + panic("Not possible") + } + + if trans, ok := executor.(*gorp.Transaction); ok { + if err := trans.Commit(); err != nil { + return applied, newTxError(migration, err) + } + } + + applied++ + } + + return applied, nil +} + +// Plan a migration. +func PlanMigration(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) ([]*PlannedMigration, *gorp.DbMap, error) { + return migSet.PlanMigration(db, dialect, m, dir, max) +} + +// Plan a migration to version. +func PlanMigrationToVersion(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) ([]*PlannedMigration, *gorp.DbMap, error) { + return migSet.PlanMigrationToVersion(db, dialect, m, dir, version) +} + +// Plan a migration. +func (ms MigrationSet) PlanMigration(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) ([]*PlannedMigration, *gorp.DbMap, error) { + return ms.planMigrationCommon(db, dialect, m, dir, max, -1) +} + +// Plan a migration to version. +func (ms MigrationSet) PlanMigrationToVersion(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) ([]*PlannedMigration, *gorp.DbMap, error) { + return ms.planMigrationCommon(db, dialect, m, dir, 0, version) +} + +// A common method to plan a migration. +func (ms MigrationSet) planMigrationCommon(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int, version int64) ([]*PlannedMigration, *gorp.DbMap, error) { + dbMap, err := ms.getMigrationDbMap(db, dialect) + if err != nil { + return nil, nil, err + } + + migrations, err := m.FindMigrations() + if err != nil { + return nil, nil, err + } + + var migrationRecords []MigrationRecord + _, err = dbMap.Select(&migrationRecords, fmt.Sprintf("SELECT * FROM %s", dbMap.Dialect.QuotedTableForQuery(ms.SchemaName, ms.getTableName()))) + if err != nil { + return nil, nil, err + } + + // Sort migrations that have been run by Id. + var existingMigrations []*Migration + for _, migrationRecord := range migrationRecords { + existingMigrations = append(existingMigrations, &Migration{ + Id: migrationRecord.Id, + }) + } + sort.Sort(byId(existingMigrations)) + + // Make sure all migrations in the database are among the found migrations which + // are to be applied. + if !ms.IgnoreUnknown { + migrationsSearch := make(map[string]struct{}) + for _, migration := range migrations { + migrationsSearch[migration.Id] = struct{}{} + } + for _, existingMigration := range existingMigrations { + if _, ok := migrationsSearch[existingMigration.Id]; !ok { + return nil, nil, newPlanError(existingMigration, "unknown migration in database") + } + } + } + + // Get last migration that was run + record := &Migration{} + if len(existingMigrations) > 0 { + record = existingMigrations[len(existingMigrations)-1] + } + + result := make([]*PlannedMigration, 0) + + // Add missing migrations up to the last run migration. + // This can happen for example when merges happened. + if len(existingMigrations) > 0 { + result = append(result, ToCatchup(migrations, existingMigrations, record)...) + } + + // Figure out which migrations to apply + toApply := ToApply(migrations, record.Id, dir) + toApplyCount := len(toApply) + + if version >= 0 { + targetIndex := 0 + for targetIndex < len(toApply) { + tempVersion := toApply[targetIndex].VersionInt() + if dir == Up && tempVersion > version || dir == Down && tempVersion < version { + return nil, nil, newPlanError(&Migration{}, fmt.Errorf("unknown migration with version id %d in database", version).Error()) + } + if tempVersion == version { + toApplyCount = targetIndex + 1 + break + } + targetIndex++ + } + if targetIndex == len(toApply) { + return nil, nil, newPlanError(&Migration{}, fmt.Errorf("unknown migration with version id %d in database", version).Error()) + } + } else if max > 0 && max < toApplyCount { + toApplyCount = max + } + for _, v := range toApply[0:toApplyCount] { + if dir == Up { + result = append(result, &PlannedMigration{ + Migration: v, + Queries: v.Up, + DisableTransaction: v.DisableTransactionUp, + }) + } else if dir == Down { + result = append(result, &PlannedMigration{ + Migration: v, + Queries: v.Down, + DisableTransaction: v.DisableTransactionDown, + }) + } + } + + return result, dbMap, nil +} + +// Skip a set of migrations +// +// Will skip at most `max` migrations. Pass 0 for no limit. +// +// Returns the number of skipped migrations. +func SkipMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) { + migrations, dbMap, err := PlanMigration(db, dialect, m, dir, max) + if err != nil { + return 0, err + } + + // Skip migrations + applied := 0 + for _, migration := range migrations { + var executor SqlExecutor + + if migration.DisableTransaction { + executor = dbMap + } else { + executor, err = dbMap.Begin() + if err != nil { + return applied, newTxError(migration, err) + } + } + + err = executor.Insert(&MigrationRecord{ + Id: migration.Id, + AppliedAt: time.Now(), + }) + if err != nil { + if trans, ok := executor.(*gorp.Transaction); ok { + _ = trans.Rollback() + } + + return applied, newTxError(migration, err) + } + + if trans, ok := executor.(*gorp.Transaction); ok { + if err := trans.Commit(); err != nil { + return applied, newTxError(migration, err) + } + } + + applied++ + } + + return applied, nil +} + +// Filter a slice of migrations into ones that should be applied. +func ToApply(migrations []*Migration, current string, direction MigrationDirection) []*Migration { + index := -1 + if current != "" { + for index < len(migrations)-1 { + index++ + if migrations[index].Id == current { + break + } + } + } + + if direction == Up { + return migrations[index+1:] + } else if direction == Down { + if index == -1 { + return []*Migration{} + } + + // Add in reverse order + toApply := make([]*Migration, index+1) + for i := 0; i < index+1; i++ { + toApply[index-i] = migrations[i] + } + return toApply + } + + panic("Not possible") +} + +func ToCatchup(migrations, existingMigrations []*Migration, lastRun *Migration) []*PlannedMigration { + missing := make([]*PlannedMigration, 0) + for _, migration := range migrations { + found := false + for _, existing := range existingMigrations { + if existing.Id == migration.Id { + found = true + break + } + } + if !found && migration.Less(lastRun) { + missing = append(missing, &PlannedMigration{ + Migration: migration, + Queries: migration.Up, + DisableTransaction: migration.DisableTransactionUp, + }) + } + } + return missing +} + +func GetMigrationRecords(db *sql.DB, dialect string) ([]*MigrationRecord, error) { + return migSet.GetMigrationRecords(db, dialect) +} + +func (ms MigrationSet) GetMigrationRecords(db *sql.DB, dialect string) ([]*MigrationRecord, error) { + dbMap, err := ms.getMigrationDbMap(db, dialect) + if err != nil { + return nil, err + } + + var records []*MigrationRecord + query := fmt.Sprintf("SELECT * FROM %s ORDER BY %s ASC", dbMap.Dialect.QuotedTableForQuery(ms.SchemaName, ms.getTableName()), dbMap.Dialect.QuoteField("id")) + _, err = dbMap.Select(&records, query) + if err != nil { + return nil, err + } + + return records, nil +} + +func (ms MigrationSet) getMigrationDbMap(db *sql.DB, dialect string) (*gorp.DbMap, error) { + d, ok := MigrationDialects[dialect] + if !ok { + return nil, fmt.Errorf("Unknown dialect: %s", dialect) + } + + // When using the mysql driver, make sure that the parseTime option is + // configured, otherwise it won't map time columns to time.Time. See + // https://github.com/rubenv/sql-migrate/issues/2 + if dialect == "mysql" { + var out *time.Time + err := db.QueryRow("SELECT NOW()").Scan(&out) + if err != nil { + if err.Error() == "sql: Scan error on column index 0: unsupported driver -> Scan pair: []uint8 -> *time.Time" || + err.Error() == "sql: Scan error on column index 0: unsupported Scan, storing driver.Value type []uint8 into type *time.Time" || + err.Error() == "sql: Scan error on column index 0, name \"NOW()\": unsupported Scan, storing driver.Value type []uint8 into type *time.Time" { + return nil, errors.New(`Cannot parse dates. + +Make sure that the parseTime option is supplied to your database connection. +Check https://github.com/go-sql-driver/mysql#parsetime for more info.`) + } + return nil, err + } + } + + // Create migration database map + dbMap := &gorp.DbMap{Db: db, Dialect: d} + table := dbMap.AddTableWithNameAndSchema(MigrationRecord{}, ms.SchemaName, ms.getTableName()).SetKeys(false, "Id") + + if dialect == "oci8" || dialect == "godror" { + table.ColMap("Id").SetMaxSize(4000) + } + + if ms.DisableCreateTable { + return dbMap, nil + } + + err := dbMap.CreateTablesIfNotExists() + if err != nil { + // Oracle database does not support `if not exists`, so use `ORA-00955:` error code + // to check if the table exists. + if (dialect == "oci8" || dialect == "godror") && strings.Contains(err.Error(), "ORA-00955:") { + return dbMap, nil + } + return nil, err + } + + return dbMap, nil +} + +// TODO: Run migration + record insert in transaction. diff --git a/vendor/github.com/rubenv/sql-migrate/sqlparse/LICENSE b/vendor/github.com/rubenv/sql-migrate/sqlparse/LICENSE new file mode 100644 index 000000000..9c1252513 --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/sqlparse/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (C) 2014-2017 by Ruben Vermeersch +Copyright (C) 2012-2014 by Liam Staskawicz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/rubenv/sql-migrate/sqlparse/README.md b/vendor/github.com/rubenv/sql-migrate/sqlparse/README.md new file mode 100644 index 000000000..fa5341abd --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/sqlparse/README.md @@ -0,0 +1,7 @@ +# SQL migration parser + +Based on the [goose](https://bitbucket.org/liamstask/goose) migration parser. + +## License + +This library is distributed under the [MIT](LICENSE) license. diff --git a/vendor/github.com/rubenv/sql-migrate/sqlparse/sqlparse.go b/vendor/github.com/rubenv/sql-migrate/sqlparse/sqlparse.go new file mode 100644 index 000000000..f04460e6e --- /dev/null +++ b/vendor/github.com/rubenv/sql-migrate/sqlparse/sqlparse.go @@ -0,0 +1,226 @@ +package sqlparse + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strings" +) + +const ( + sqlCmdPrefix = "-- +migrate " + optionNoTransaction = "notransaction" +) + +type ParsedMigration struct { + UpStatements []string + DownStatements []string + + DisableTransactionUp bool + DisableTransactionDown bool +} + +// LineSeparator can be used to split migrations by an exact line match. This line +// will be removed from the output. If left blank, it is not considered. It is defaulted +// to blank so you will have to set it manually. +// Use case: in MSSQL, it is convenient to separate commands by GO statements like in +// SQL Query Analyzer. +var LineSeparator = "" + +func errNoTerminator() error { + if len(LineSeparator) == 0 { + return fmt.Errorf(`ERROR: The last statement must be ended by a semicolon or '-- +migrate StatementEnd' marker. + See https://github.com/rubenv/sql-migrate for details.`) + } + + return fmt.Errorf(`ERROR: The last statement must be ended by a semicolon, a line whose contents are %q, or '-- +migrate StatementEnd' marker. + See https://github.com/rubenv/sql-migrate for details.`, LineSeparator) +} + +// Checks the line to see if the line has a statement-ending semicolon +// or if the line contains a double-dash comment. +func endsWithSemicolon(line string) bool { + prev := "" + scanner := bufio.NewScanner(strings.NewReader(line)) + scanner.Split(bufio.ScanWords) + + for scanner.Scan() { + word := scanner.Text() + if strings.HasPrefix(word, "--") { + break + } + prev = word + } + + return strings.HasSuffix(prev, ";") +} + +type migrationDirection int + +const ( + directionNone migrationDirection = iota + directionUp + directionDown +) + +type migrateCommand struct { + Command string + Options []string +} + +func (c *migrateCommand) HasOption(opt string) bool { + for _, specifiedOption := range c.Options { + if specifiedOption == opt { + return true + } + } + + return false +} + +func parseCommand(line string) (*migrateCommand, error) { + cmd := &migrateCommand{} + + if !strings.HasPrefix(line, sqlCmdPrefix) { + return nil, fmt.Errorf("ERROR: not a sql-migrate command") + } + + fields := strings.Fields(line[len(sqlCmdPrefix):]) + if len(fields) == 0 { + return nil, fmt.Errorf(`ERROR: incomplete migration command`) + } + + cmd.Command = fields[0] + + cmd.Options = fields[1:] + + return cmd, nil +} + +// Split the given sql script into individual statements. +// +// The base case is to simply split on semicolons, as these +// naturally terminate a statement. +// +// However, more complex cases like pl/pgsql can have semicolons +// within a statement. For these cases, we provide the explicit annotations +// 'StatementBegin' and 'StatementEnd' to allow the script to +// tell us to ignore semicolons. +func ParseMigration(r io.ReadSeeker) (*ParsedMigration, error) { + p := &ParsedMigration{} + + _, err := r.Seek(0, 0) + if err != nil { + return nil, err + } + + var buf bytes.Buffer + scanner := bufio.NewScanner(r) + scanner.Buffer(make([]byte, 0, 64*1024), 1024*1024) + + statementEnded := false + ignoreSemicolons := false + currentDirection := directionNone + + for scanner.Scan() { + line := scanner.Text() + // ignore comment except beginning with '-- +' + if strings.HasPrefix(line, "-- ") && !strings.HasPrefix(line, "-- +") { + continue + } + + // handle any migrate-specific commands + if strings.HasPrefix(line, sqlCmdPrefix) { + cmd, err := parseCommand(line) + if err != nil { + return nil, err + } + + switch cmd.Command { + case "Up": + if len(strings.TrimSpace(buf.String())) > 0 { + return nil, errNoTerminator() + } + currentDirection = directionUp + if cmd.HasOption(optionNoTransaction) { + p.DisableTransactionUp = true + } + + case "Down": + if len(strings.TrimSpace(buf.String())) > 0 { + return nil, errNoTerminator() + } + currentDirection = directionDown + if cmd.HasOption(optionNoTransaction) { + p.DisableTransactionDown = true + } + + case "StatementBegin": + if currentDirection != directionNone { + ignoreSemicolons = true + } + + case "StatementEnd": + if currentDirection != directionNone { + statementEnded = ignoreSemicolons + ignoreSemicolons = false + } + } + } + + if currentDirection == directionNone { + continue + } + + isLineSeparator := !ignoreSemicolons && len(LineSeparator) > 0 && line == LineSeparator + + if !isLineSeparator && !strings.HasPrefix(line, "-- +") { + if _, err := buf.WriteString(line + "\n"); err != nil { + return nil, err + } + } + + // Wrap up the two supported cases: 1) basic with semicolon; 2) psql statement + // Lines that end with semicolon that are in a statement block + // do not conclude statement. + if (!ignoreSemicolons && (endsWithSemicolon(line) || isLineSeparator)) || statementEnded { + statementEnded = false + switch currentDirection { + case directionUp: + p.UpStatements = append(p.UpStatements, buf.String()) + + case directionDown: + p.DownStatements = append(p.DownStatements, buf.String()) + + default: + panic("impossible state") + } + + buf.Reset() + } + } + + if err := scanner.Err(); err != nil { + return nil, err + } + + // diagnose likely migration script errors + if ignoreSemicolons { + return nil, fmt.Errorf("ERROR: saw '-- +migrate StatementBegin' with no matching '-- +migrate StatementEnd'") + } + + if currentDirection == directionNone { + return nil, fmt.Errorf(`ERROR: no Up/Down annotations found, so no statements were executed. + See https://github.com/rubenv/sql-migrate for details.`) + } + + // allow comment without sql instruction. Example: + // -- +migrate Down + // -- nothing to downgrade! + if len(strings.TrimSpace(buf.String())) > 0 && !strings.HasPrefix(buf.String(), "-- +") { + return nil, errNoTerminator() + } + + return p, nil +} diff --git a/vendor/github.com/shopspring/decimal/.gitignore b/vendor/github.com/shopspring/decimal/.gitignore new file mode 100644 index 000000000..ff36b987f --- /dev/null +++ b/vendor/github.com/shopspring/decimal/.gitignore @@ -0,0 +1,9 @@ +.git +*.swp + +# IntelliJ +.idea/ +*.iml + +# VS code +*.code-workspace diff --git a/vendor/github.com/shopspring/decimal/CHANGELOG.md b/vendor/github.com/shopspring/decimal/CHANGELOG.md new file mode 100644 index 000000000..432d0fd4e --- /dev/null +++ b/vendor/github.com/shopspring/decimal/CHANGELOG.md @@ -0,0 +1,76 @@ +## Decimal v1.4.0 +#### BREAKING +- Drop support for Go version older than 1.10 [#361](https://github.com/shopspring/decimal/pull/361) + +#### FEATURES +- Add implementation of natural logarithm [#339](https://github.com/shopspring/decimal/pull/339) [#357](https://github.com/shopspring/decimal/pull/357) +- Add improved implementation of power operation [#358](https://github.com/shopspring/decimal/pull/358) +- Add Compare method which forwards calls to Cmp [#346](https://github.com/shopspring/decimal/pull/346) +- Add NewFromBigRat constructor [#288](https://github.com/shopspring/decimal/pull/288) +- Add NewFromUint64 constructor [#352](https://github.com/shopspring/decimal/pull/352) + +#### ENHANCEMENTS +- Migrate to Github Actions [#245](https://github.com/shopspring/decimal/pull/245) [#340](https://github.com/shopspring/decimal/pull/340) +- Fix examples for RoundDown, RoundFloor, RoundUp, and RoundCeil [#285](https://github.com/shopspring/decimal/pull/285) [#328](https://github.com/shopspring/decimal/pull/328) [#341](https://github.com/shopspring/decimal/pull/341) +- Use Godoc standard to mark deprecated Equals and StringScaled methods [#342](https://github.com/shopspring/decimal/pull/342) +- Removed unnecessary min function for RescalePair method [#265](https://github.com/shopspring/decimal/pull/265) +- Avoid reallocation of initial slice in MarshalBinary (GobEncode) [#355](https://github.com/shopspring/decimal/pull/355) +- Optimize NumDigits method [#301](https://github.com/shopspring/decimal/pull/301) [#356](https://github.com/shopspring/decimal/pull/356) +- Optimize BigInt method [#359](https://github.com/shopspring/decimal/pull/359) +- Support scanning uint64 [#131](https://github.com/shopspring/decimal/pull/131) [#364](https://github.com/shopspring/decimal/pull/364) +- Add docs section with alternative libraries [#363](https://github.com/shopspring/decimal/pull/363) + +#### BUGFIXES +- Fix incorrect calculation of decimal modulo [#258](https://github.com/shopspring/decimal/pull/258) [#317](https://github.com/shopspring/decimal/pull/317) +- Allocate new(big.Int) in Copy method to deeply clone it [#278](https://github.com/shopspring/decimal/pull/278) +- Fix overflow edge case in QuoRem method [#322](https://github.com/shopspring/decimal/pull/322) + +## Decimal v1.3.1 + +#### ENHANCEMENTS +- Reduce memory allocation in case of initialization from big.Int [#252](https://github.com/shopspring/decimal/pull/252) + +#### BUGFIXES +- Fix binary marshalling of decimal zero value [#253](https://github.com/shopspring/decimal/pull/253) + +## Decimal v1.3.0 + +#### FEATURES +- Add NewFromFormattedString initializer [#184](https://github.com/shopspring/decimal/pull/184) +- Add NewNullDecimal initializer [#234](https://github.com/shopspring/decimal/pull/234) +- Add implementation of natural exponent function (Taylor, Hull-Abraham) [#229](https://github.com/shopspring/decimal/pull/229) +- Add RoundUp, RoundDown, RoundCeil, RoundFloor methods [#196](https://github.com/shopspring/decimal/pull/196) [#202](https://github.com/shopspring/decimal/pull/202) [#220](https://github.com/shopspring/decimal/pull/220) +- Add XML support for NullDecimal [#192](https://github.com/shopspring/decimal/pull/192) +- Add IsInteger method [#179](https://github.com/shopspring/decimal/pull/179) +- Add Copy helper method [#123](https://github.com/shopspring/decimal/pull/123) +- Add InexactFloat64 helper method [#205](https://github.com/shopspring/decimal/pull/205) +- Add CoefficientInt64 helper method [#244](https://github.com/shopspring/decimal/pull/244) + +#### ENHANCEMENTS +- Performance optimization of NewFromString init method [#198](https://github.com/shopspring/decimal/pull/198) +- Performance optimization of Abs and Round methods [#240](https://github.com/shopspring/decimal/pull/240) +- Additional tests (CI) for ppc64le architecture [#188](https://github.com/shopspring/decimal/pull/188) + +#### BUGFIXES +- Fix rounding in FormatFloat fallback path (roundShortest method, fix taken from Go main repository) [#161](https://github.com/shopspring/decimal/pull/161) +- Add slice range checks to UnmarshalBinary method [#232](https://github.com/shopspring/decimal/pull/232) + +## Decimal v1.2.0 + +#### BREAKING +- Drop support for Go version older than 1.7 [#172](https://github.com/shopspring/decimal/pull/172) + +#### FEATURES +- Add NewFromInt and NewFromInt32 initializers [#72](https://github.com/shopspring/decimal/pull/72) +- Add support for Go modules [#157](https://github.com/shopspring/decimal/pull/157) +- Add BigInt, BigFloat helper methods [#171](https://github.com/shopspring/decimal/pull/171) + +#### ENHANCEMENTS +- Memory usage optimization [#160](https://github.com/shopspring/decimal/pull/160) +- Updated travis CI golang versions [#156](https://github.com/shopspring/decimal/pull/156) +- Update documentation [#173](https://github.com/shopspring/decimal/pull/173) +- Improve code quality [#174](https://github.com/shopspring/decimal/pull/174) + +#### BUGFIXES +- Revert remove insignificant digits [#159](https://github.com/shopspring/decimal/pull/159) +- Remove 15 interval for RoundCash [#166](https://github.com/shopspring/decimal/pull/166) diff --git a/vendor/github.com/shopspring/decimal/LICENSE b/vendor/github.com/shopspring/decimal/LICENSE new file mode 100644 index 000000000..ad2148aaf --- /dev/null +++ b/vendor/github.com/shopspring/decimal/LICENSE @@ -0,0 +1,45 @@ +The MIT License (MIT) + +Copyright (c) 2015 Spring, Inc. + +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. + +- Based on https://github.com/oguzbilgic/fpd, which has the following license: +""" +The MIT License (MIT) + +Copyright (c) 2013 Oguz Bilgic + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" diff --git a/vendor/github.com/shopspring/decimal/README.md b/vendor/github.com/shopspring/decimal/README.md new file mode 100644 index 000000000..318c9df58 --- /dev/null +++ b/vendor/github.com/shopspring/decimal/README.md @@ -0,0 +1,139 @@ +# decimal + +[![ci](https://github.com/shopspring/decimal/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/shopspring/decimal/actions/workflows/ci.yml) +[![GoDoc](https://godoc.org/github.com/shopspring/decimal?status.svg)](https://godoc.org/github.com/shopspring/decimal) +[![Go Report Card](https://goreportcard.com/badge/github.com/shopspring/decimal)](https://goreportcard.com/report/github.com/shopspring/decimal) + +Arbitrary-precision fixed-point decimal numbers in go. + +_Note:_ Decimal library can "only" represent numbers with a maximum of 2^31 digits after the decimal point. + +## Features + + * The zero-value is 0, and is safe to use without initialization + * Addition, subtraction, multiplication with no loss of precision + * Division with specified precision + * Database/sql serialization/deserialization + * JSON and XML serialization/deserialization + +## Install + +Run `go get github.com/shopspring/decimal` + +## Requirements + +Decimal library requires Go version `>=1.10` + +## Documentation + +http://godoc.org/github.com/shopspring/decimal + + +## Usage + +```go +package main + +import ( + "fmt" + "github.com/shopspring/decimal" +) + +func main() { + price, err := decimal.NewFromString("136.02") + if err != nil { + panic(err) + } + + quantity := decimal.NewFromInt(3) + + fee, _ := decimal.NewFromString(".035") + taxRate, _ := decimal.NewFromString(".08875") + + subtotal := price.Mul(quantity) + + preTax := subtotal.Mul(fee.Add(decimal.NewFromFloat(1))) + + total := preTax.Mul(taxRate.Add(decimal.NewFromFloat(1))) + + fmt.Println("Subtotal:", subtotal) // Subtotal: 408.06 + fmt.Println("Pre-tax:", preTax) // Pre-tax: 422.3421 + fmt.Println("Taxes:", total.Sub(preTax)) // Taxes: 37.482861375 + fmt.Println("Total:", total) // Total: 459.824961375 + fmt.Println("Tax rate:", total.Sub(preTax).Div(preTax)) // Tax rate: 0.08875 +} +``` + +## Alternative libraries + +When working with decimal numbers, you might face problems this library is not perfectly suited for. +Fortunately, thanks to the wonderful community we have a dozen other libraries that you can choose from. +Explore other alternatives to find the one that best fits your needs :) + +* [cockroachdb/apd](https://github.com/cockroachdb/apd) - arbitrary precision, mutable and rich API similar to `big.Int`, more performant than this library +* [alpacahq/alpacadecimal](https://github.com/alpacahq/alpacadecimal) - high performance, low precision (12 digits), fully compatible API with this library +* [govalues/decimal](https://github.com/govalues/decimal) - high performance, zero-allocation, low precision (19 digits) +* [greatcloak/decimal](https://github.com/greatcloak/decimal) - fork focusing on billing and e-commerce web application related use cases, includes out-of-the-box BSON marshaling support + +## FAQ + +#### Why don't you just use float64? + +Because float64 (or any binary floating point type, actually) can't represent +numbers such as `0.1` exactly. + +Consider this code: http://play.golang.org/p/TQBd4yJe6B You might expect that +it prints out `10`, but it actually prints `9.999999999999831`. Over time, +these small errors can really add up! + +#### Why don't you just use big.Rat? + +big.Rat is fine for representing rational numbers, but Decimal is better for +representing money. Why? Here's a (contrived) example: + +Let's say you use big.Rat, and you have two numbers, x and y, both +representing 1/3, and you have `z = 1 - x - y = 1/3`. If you print each one +out, the string output has to stop somewhere (let's say it stops at 3 decimal +digits, for simplicity), so you'll get 0.333, 0.333, and 0.333. But where did +the other 0.001 go? + +Here's the above example as code: http://play.golang.org/p/lCZZs0w9KE + +With Decimal, the strings being printed out represent the number exactly. So, +if you have `x = y = 1/3` (with precision 3), they will actually be equal to +0.333, and when you do `z = 1 - x - y`, `z` will be equal to .334. No money is +unaccounted for! + +You still have to be careful. If you want to split a number `N` 3 ways, you +can't just send `N/3` to three different people. You have to pick one to send +`N - (2/3*N)` to. That person will receive the fraction of a penny remainder. + +But, it is much easier to be careful with Decimal than with big.Rat. + +#### Why isn't the API similar to big.Int's? + +big.Int's API is built to reduce the number of memory allocations for maximal +performance. This makes sense for its use-case, but the trade-off is that the +API is awkward and easy to misuse. + +For example, to add two big.Ints, you do: `z := new(big.Int).Add(x, y)`. A +developer unfamiliar with this API might try to do `z := a.Add(a, b)`. This +modifies `a` and sets `z` as an alias for `a`, which they might not expect. It +also modifies any other aliases to `a`. + +Here's an example of the subtle bugs you can introduce with big.Int's API: +https://play.golang.org/p/x2R_78pa8r + +In contrast, it's difficult to make such mistakes with decimal. Decimals +behave like other go numbers types: even though `a = b` will not deep copy +`b` into `a`, it is impossible to modify a Decimal, since all Decimal methods +return new Decimals and do not modify the originals. The downside is that +this causes extra allocations, so Decimal is less performant. My assumption +is that if you're using Decimals, you probably care more about correctness +than performance. + +## License + +The MIT License (MIT) + +This is a heavily modified fork of [fpd.Decimal](https://github.com/oguzbilgic/fpd), which was also released under the MIT License. diff --git a/vendor/github.com/shopspring/decimal/const.go b/vendor/github.com/shopspring/decimal/const.go new file mode 100644 index 000000000..e5d6fa87e --- /dev/null +++ b/vendor/github.com/shopspring/decimal/const.go @@ -0,0 +1,63 @@ +package decimal + +import ( + "strings" +) + +const ( + strLn10 = "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286248633409525465082806756666287369098781689482907208325554680843799894826233198528393505308965377732628846163366222287698219886746543667474404243274365155048934314939391479619404400222105101714174800368808401264708068556774321622835522011480466371565912137345074785694768346361679210180644507064800027750268491674655058685693567342067058113642922455440575892572420824131469568901675894025677631135691929203337658714166023010570308963457207544037084746994016826928280848118428931484852494864487192780967627127577539702766860595249671667418348570442250719796500471495105049221477656763693866297697952211071826454973477266242570942932258279850258550978526538320760672631716430950599508780752371033310119785754733154142180842754386359177811705430982748238504564801909561029929182431823752535770975053956518769751037497088869218020518933950723853920514463419726528728696511086257149219884997874887377134568620916705849807828059751193854445009978131146915934666241071846692310107598438319191292230792503747298650929009880391941702654416816335727555703151596113564846546190897042819763365836983716328982174407366009162177850541779276367731145041782137660111010731042397832521894898817597921798666394319523936855916447118246753245630912528778330963604262982153040874560927760726641354787576616262926568298704957954913954918049209069438580790032763017941503117866862092408537949861264933479354871737451675809537088281067452440105892444976479686075120275724181874989395971643105518848195288330746699317814634930000321200327765654130472621883970596794457943468343218395304414844803701305753674262153675579814770458031413637793236291560128185336498466942261465206459942072917119370602444929358037007718981097362533224548366988505528285966192805098447175198503666680874970496982273220244823343097169111136813588418696549323714996941979687803008850408979618598756579894836445212043698216415292987811742973332588607915912510967187510929248475023930572665446276200923068791518135803477701295593646298412366497023355174586195564772461857717369368404676577047874319780573853271810933883496338813069945569399346101090745616033312247949360455361849123333063704751724871276379140924398331810164737823379692265637682071706935846394531616949411701841938119405416449466111274712819705817783293841742231409930022911502362192186723337268385688273533371925103412930705632544426611429765388301822384091026198582888433587455960453004548370789052578473166283701953392231047527564998119228742789713715713228319641003422124210082180679525276689858180956119208391760721080919923461516952599099473782780648128058792731993893453415320185969711021407542282796298237068941764740642225757212455392526179373652434440560595336591539160312524480149313234572453879524389036839236450507881731359711238145323701508413491122324390927681724749607955799151363982881058285740538000653371655553014196332241918087621018204919492651483892" +) + +var ( + ln10 = newConstApproximation(strLn10) +) + +type constApproximation struct { + exact Decimal + approximations []Decimal +} + +func newConstApproximation(value string) constApproximation { + parts := strings.Split(value, ".") + coeff, fractional := parts[0], parts[1] + + coeffLen := len(coeff) + maxPrecision := len(fractional) + + var approximations []Decimal + for p := 1; p < maxPrecision; p *= 2 { + r := RequireFromString(value[:coeffLen+p]) + approximations = append(approximations, r) + } + + return constApproximation{ + RequireFromString(value), + approximations, + } +} + +// Returns the smallest approximation available that's at least as precise +// as the passed precision (places after decimal point), i.e. Floor[ log2(precision) ] + 1 +func (c constApproximation) withPrecision(precision int32) Decimal { + i := 0 + + if precision >= 1 { + i++ + } + + for precision >= 16 { + precision /= 16 + i += 4 + } + + for precision >= 2 { + precision /= 2 + i++ + } + + if i >= len(c.approximations) { + return c.exact + } + + return c.approximations[i] +} diff --git a/vendor/github.com/shopspring/decimal/decimal-go.go b/vendor/github.com/shopspring/decimal/decimal-go.go new file mode 100644 index 000000000..9958d6902 --- /dev/null +++ b/vendor/github.com/shopspring/decimal/decimal-go.go @@ -0,0 +1,415 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Multiprecision decimal numbers. +// For floating-point formatting only; not general purpose. +// Only operations are assign and (binary) left/right shift. +// Can do binary floating point in multiprecision decimal precisely +// because 2 divides 10; cannot do decimal floating point +// in multiprecision binary precisely. + +package decimal + +type decimal struct { + d [800]byte // digits, big-endian representation + nd int // number of digits used + dp int // decimal point + neg bool // negative flag + trunc bool // discarded nonzero digits beyond d[:nd] +} + +func (a *decimal) String() string { + n := 10 + a.nd + if a.dp > 0 { + n += a.dp + } + if a.dp < 0 { + n += -a.dp + } + + buf := make([]byte, n) + w := 0 + switch { + case a.nd == 0: + return "0" + + case a.dp <= 0: + // zeros fill space between decimal point and digits + buf[w] = '0' + w++ + buf[w] = '.' + w++ + w += digitZero(buf[w : w+-a.dp]) + w += copy(buf[w:], a.d[0:a.nd]) + + case a.dp < a.nd: + // decimal point in middle of digits + w += copy(buf[w:], a.d[0:a.dp]) + buf[w] = '.' + w++ + w += copy(buf[w:], a.d[a.dp:a.nd]) + + default: + // zeros fill space between digits and decimal point + w += copy(buf[w:], a.d[0:a.nd]) + w += digitZero(buf[w : w+a.dp-a.nd]) + } + return string(buf[0:w]) +} + +func digitZero(dst []byte) int { + for i := range dst { + dst[i] = '0' + } + return len(dst) +} + +// trim trailing zeros from number. +// (They are meaningless; the decimal point is tracked +// independent of the number of digits.) +func trim(a *decimal) { + for a.nd > 0 && a.d[a.nd-1] == '0' { + a.nd-- + } + if a.nd == 0 { + a.dp = 0 + } +} + +// Assign v to a. +func (a *decimal) Assign(v uint64) { + var buf [24]byte + + // Write reversed decimal in buf. + n := 0 + for v > 0 { + v1 := v / 10 + v -= 10 * v1 + buf[n] = byte(v + '0') + n++ + v = v1 + } + + // Reverse again to produce forward decimal in a.d. + a.nd = 0 + for n--; n >= 0; n-- { + a.d[a.nd] = buf[n] + a.nd++ + } + a.dp = a.nd + trim(a) +} + +// Maximum shift that we can do in one pass without overflow. +// A uint has 32 or 64 bits, and we have to be able to accommodate 9<> 63) +const maxShift = uintSize - 4 + +// Binary shift right (/ 2) by k bits. k <= maxShift to avoid overflow. +func rightShift(a *decimal, k uint) { + r := 0 // read pointer + w := 0 // write pointer + + // Pick up enough leading digits to cover first shift. + var n uint + for ; n>>k == 0; r++ { + if r >= a.nd { + if n == 0 { + // a == 0; shouldn't get here, but handle anyway. + a.nd = 0 + return + } + for n>>k == 0 { + n = n * 10 + r++ + } + break + } + c := uint(a.d[r]) + n = n*10 + c - '0' + } + a.dp -= r - 1 + + var mask uint = (1 << k) - 1 + + // Pick up a digit, put down a digit. + for ; r < a.nd; r++ { + c := uint(a.d[r]) + dig := n >> k + n &= mask + a.d[w] = byte(dig + '0') + w++ + n = n*10 + c - '0' + } + + // Put down extra digits. + for n > 0 { + dig := n >> k + n &= mask + if w < len(a.d) { + a.d[w] = byte(dig + '0') + w++ + } else if dig > 0 { + a.trunc = true + } + n = n * 10 + } + + a.nd = w + trim(a) +} + +// Cheat sheet for left shift: table indexed by shift count giving +// number of new digits that will be introduced by that shift. +// +// For example, leftcheats[4] = {2, "625"}. That means that +// if we are shifting by 4 (multiplying by 16), it will add 2 digits +// when the string prefix is "625" through "999", and one fewer digit +// if the string prefix is "000" through "624". +// +// Credit for this trick goes to Ken. + +type leftCheat struct { + delta int // number of new digits + cutoff string // minus one digit if original < a. +} + +var leftcheats = []leftCheat{ + // Leading digits of 1/2^i = 5^i. + // 5^23 is not an exact 64-bit floating point number, + // so have to use bc for the math. + // Go up to 60 to be large enough for 32bit and 64bit platforms. + /* + seq 60 | sed 's/^/5^/' | bc | + awk 'BEGIN{ print "\t{ 0, \"\" }," } + { + log2 = log(2)/log(10) + printf("\t{ %d, \"%s\" },\t// * %d\n", + int(log2*NR+1), $0, 2**NR) + }' + */ + {0, ""}, + {1, "5"}, // * 2 + {1, "25"}, // * 4 + {1, "125"}, // * 8 + {2, "625"}, // * 16 + {2, "3125"}, // * 32 + {2, "15625"}, // * 64 + {3, "78125"}, // * 128 + {3, "390625"}, // * 256 + {3, "1953125"}, // * 512 + {4, "9765625"}, // * 1024 + {4, "48828125"}, // * 2048 + {4, "244140625"}, // * 4096 + {4, "1220703125"}, // * 8192 + {5, "6103515625"}, // * 16384 + {5, "30517578125"}, // * 32768 + {5, "152587890625"}, // * 65536 + {6, "762939453125"}, // * 131072 + {6, "3814697265625"}, // * 262144 + {6, "19073486328125"}, // * 524288 + {7, "95367431640625"}, // * 1048576 + {7, "476837158203125"}, // * 2097152 + {7, "2384185791015625"}, // * 4194304 + {7, "11920928955078125"}, // * 8388608 + {8, "59604644775390625"}, // * 16777216 + {8, "298023223876953125"}, // * 33554432 + {8, "1490116119384765625"}, // * 67108864 + {9, "7450580596923828125"}, // * 134217728 + {9, "37252902984619140625"}, // * 268435456 + {9, "186264514923095703125"}, // * 536870912 + {10, "931322574615478515625"}, // * 1073741824 + {10, "4656612873077392578125"}, // * 2147483648 + {10, "23283064365386962890625"}, // * 4294967296 + {10, "116415321826934814453125"}, // * 8589934592 + {11, "582076609134674072265625"}, // * 17179869184 + {11, "2910383045673370361328125"}, // * 34359738368 + {11, "14551915228366851806640625"}, // * 68719476736 + {12, "72759576141834259033203125"}, // * 137438953472 + {12, "363797880709171295166015625"}, // * 274877906944 + {12, "1818989403545856475830078125"}, // * 549755813888 + {13, "9094947017729282379150390625"}, // * 1099511627776 + {13, "45474735088646411895751953125"}, // * 2199023255552 + {13, "227373675443232059478759765625"}, // * 4398046511104 + {13, "1136868377216160297393798828125"}, // * 8796093022208 + {14, "5684341886080801486968994140625"}, // * 17592186044416 + {14, "28421709430404007434844970703125"}, // * 35184372088832 + {14, "142108547152020037174224853515625"}, // * 70368744177664 + {15, "710542735760100185871124267578125"}, // * 140737488355328 + {15, "3552713678800500929355621337890625"}, // * 281474976710656 + {15, "17763568394002504646778106689453125"}, // * 562949953421312 + {16, "88817841970012523233890533447265625"}, // * 1125899906842624 + {16, "444089209850062616169452667236328125"}, // * 2251799813685248 + {16, "2220446049250313080847263336181640625"}, // * 4503599627370496 + {16, "11102230246251565404236316680908203125"}, // * 9007199254740992 + {17, "55511151231257827021181583404541015625"}, // * 18014398509481984 + {17, "277555756156289135105907917022705078125"}, // * 36028797018963968 + {17, "1387778780781445675529539585113525390625"}, // * 72057594037927936 + {18, "6938893903907228377647697925567626953125"}, // * 144115188075855872 + {18, "34694469519536141888238489627838134765625"}, // * 288230376151711744 + {18, "173472347597680709441192448139190673828125"}, // * 576460752303423488 + {19, "867361737988403547205962240695953369140625"}, // * 1152921504606846976 +} + +// Is the leading prefix of b lexicographically less than s? +func prefixIsLessThan(b []byte, s string) bool { + for i := 0; i < len(s); i++ { + if i >= len(b) { + return true + } + if b[i] != s[i] { + return b[i] < s[i] + } + } + return false +} + +// Binary shift left (* 2) by k bits. k <= maxShift to avoid overflow. +func leftShift(a *decimal, k uint) { + delta := leftcheats[k].delta + if prefixIsLessThan(a.d[0:a.nd], leftcheats[k].cutoff) { + delta-- + } + + r := a.nd // read index + w := a.nd + delta // write index + + // Pick up a digit, put down a digit. + var n uint + for r--; r >= 0; r-- { + n += (uint(a.d[r]) - '0') << k + quo := n / 10 + rem := n - 10*quo + w-- + if w < len(a.d) { + a.d[w] = byte(rem + '0') + } else if rem != 0 { + a.trunc = true + } + n = quo + } + + // Put down extra digits. + for n > 0 { + quo := n / 10 + rem := n - 10*quo + w-- + if w < len(a.d) { + a.d[w] = byte(rem + '0') + } else if rem != 0 { + a.trunc = true + } + n = quo + } + + a.nd += delta + if a.nd >= len(a.d) { + a.nd = len(a.d) + } + a.dp += delta + trim(a) +} + +// Binary shift left (k > 0) or right (k < 0). +func (a *decimal) Shift(k int) { + switch { + case a.nd == 0: + // nothing to do: a == 0 + case k > 0: + for k > maxShift { + leftShift(a, maxShift) + k -= maxShift + } + leftShift(a, uint(k)) + case k < 0: + for k < -maxShift { + rightShift(a, maxShift) + k += maxShift + } + rightShift(a, uint(-k)) + } +} + +// If we chop a at nd digits, should we round up? +func shouldRoundUp(a *decimal, nd int) bool { + if nd < 0 || nd >= a.nd { + return false + } + if a.d[nd] == '5' && nd+1 == a.nd { // exactly halfway - round to even + // if we truncated, a little higher than what's recorded - always round up + if a.trunc { + return true + } + return nd > 0 && (a.d[nd-1]-'0')%2 != 0 + } + // not halfway - digit tells all + return a.d[nd] >= '5' +} + +// Round a to nd digits (or fewer). +// If nd is zero, it means we're rounding +// just to the left of the digits, as in +// 0.09 -> 0.1. +func (a *decimal) Round(nd int) { + if nd < 0 || nd >= a.nd { + return + } + if shouldRoundUp(a, nd) { + a.RoundUp(nd) + } else { + a.RoundDown(nd) + } +} + +// Round a down to nd digits (or fewer). +func (a *decimal) RoundDown(nd int) { + if nd < 0 || nd >= a.nd { + return + } + a.nd = nd + trim(a) +} + +// Round a up to nd digits (or fewer). +func (a *decimal) RoundUp(nd int) { + if nd < 0 || nd >= a.nd { + return + } + + // round up + for i := nd - 1; i >= 0; i-- { + c := a.d[i] + if c < '9' { // can stop after this digit + a.d[i]++ + a.nd = i + 1 + return + } + } + + // Number is all 9s. + // Change to single 1 with adjusted decimal point. + a.d[0] = '1' + a.nd = 1 + a.dp++ +} + +// Extract integer part, rounded appropriately. +// No guarantees about overflow. +func (a *decimal) RoundedInteger() uint64 { + if a.dp > 20 { + return 0xFFFFFFFFFFFFFFFF + } + var i int + n := uint64(0) + for i = 0; i < a.dp && i < a.nd; i++ { + n = n*10 + uint64(a.d[i]-'0') + } + for ; i < a.dp; i++ { + n *= 10 + } + if shouldRoundUp(a, a.dp) { + n++ + } + return n +} diff --git a/vendor/github.com/shopspring/decimal/decimal.go b/vendor/github.com/shopspring/decimal/decimal.go new file mode 100644 index 000000000..a37a2301e --- /dev/null +++ b/vendor/github.com/shopspring/decimal/decimal.go @@ -0,0 +1,2339 @@ +// Package decimal implements an arbitrary precision fixed-point decimal. +// +// The zero-value of a Decimal is 0, as you would expect. +// +// The best way to create a new Decimal is to use decimal.NewFromString, ex: +// +// n, err := decimal.NewFromString("-123.4567") +// n.String() // output: "-123.4567" +// +// To use Decimal as part of a struct: +// +// type StructName struct { +// Number Decimal +// } +// +// Note: This can "only" represent numbers with a maximum of 2^31 digits after the decimal point. +package decimal + +import ( + "database/sql/driver" + "encoding/binary" + "fmt" + "math" + "math/big" + "regexp" + "strconv" + "strings" +) + +// DivisionPrecision is the number of decimal places in the result when it +// doesn't divide exactly. +// +// Example: +// +// d1 := decimal.NewFromFloat(2).Div(decimal.NewFromFloat(3)) +// d1.String() // output: "0.6666666666666667" +// d2 := decimal.NewFromFloat(2).Div(decimal.NewFromFloat(30000)) +// d2.String() // output: "0.0000666666666667" +// d3 := decimal.NewFromFloat(20000).Div(decimal.NewFromFloat(3)) +// d3.String() // output: "6666.6666666666666667" +// decimal.DivisionPrecision = 3 +// d4 := decimal.NewFromFloat(2).Div(decimal.NewFromFloat(3)) +// d4.String() // output: "0.667" +var DivisionPrecision = 16 + +// PowPrecisionNegativeExponent specifies the maximum precision of the result (digits after decimal point) +// when calculating decimal power. Only used for cases where the exponent is a negative number. +// This constant applies to Pow, PowInt32 and PowBigInt methods, PowWithPrecision method is not constrained by it. +// +// Example: +// +// d1, err := decimal.NewFromFloat(15.2).PowInt32(-2) +// d1.String() // output: "0.0043282548476454" +// +// decimal.PowPrecisionNegativeExponent = 24 +// d2, err := decimal.NewFromFloat(15.2).PowInt32(-2) +// d2.String() // output: "0.004328254847645429362881" +var PowPrecisionNegativeExponent = 16 + +// MarshalJSONWithoutQuotes should be set to true if you want the decimal to +// be JSON marshaled as a number, instead of as a string. +// WARNING: this is dangerous for decimals with many digits, since many JSON +// unmarshallers (ex: Javascript's) will unmarshal JSON numbers to IEEE 754 +// double-precision floating point numbers, which means you can potentially +// silently lose precision. +var MarshalJSONWithoutQuotes = false + +// ExpMaxIterations specifies the maximum number of iterations needed to calculate +// precise natural exponent value using ExpHullAbrham method. +var ExpMaxIterations = 1000 + +// Zero constant, to make computations faster. +// Zero should never be compared with == or != directly, please use decimal.Equal or decimal.Cmp instead. +var Zero = New(0, 1) + +var zeroInt = big.NewInt(0) +var oneInt = big.NewInt(1) +var twoInt = big.NewInt(2) +var fourInt = big.NewInt(4) +var fiveInt = big.NewInt(5) +var tenInt = big.NewInt(10) +var twentyInt = big.NewInt(20) + +var factorials = []Decimal{New(1, 0)} + +// Decimal represents a fixed-point decimal. It is immutable. +// number = value * 10 ^ exp +type Decimal struct { + value *big.Int + + // NOTE(vadim): this must be an int32, because we cast it to float64 during + // calculations. If exp is 64 bit, we might lose precision. + // If we cared about being able to represent every possible decimal, we + // could make exp a *big.Int but it would hurt performance and numbers + // like that are unrealistic. + exp int32 +} + +// New returns a new fixed-point decimal, value * 10 ^ exp. +func New(value int64, exp int32) Decimal { + return Decimal{ + value: big.NewInt(value), + exp: exp, + } +} + +// NewFromInt converts an int64 to Decimal. +// +// Example: +// +// NewFromInt(123).String() // output: "123" +// NewFromInt(-10).String() // output: "-10" +func NewFromInt(value int64) Decimal { + return Decimal{ + value: big.NewInt(value), + exp: 0, + } +} + +// NewFromInt32 converts an int32 to Decimal. +// +// Example: +// +// NewFromInt(123).String() // output: "123" +// NewFromInt(-10).String() // output: "-10" +func NewFromInt32(value int32) Decimal { + return Decimal{ + value: big.NewInt(int64(value)), + exp: 0, + } +} + +// NewFromUint64 converts an uint64 to Decimal. +// +// Example: +// +// NewFromUint64(123).String() // output: "123" +func NewFromUint64(value uint64) Decimal { + return Decimal{ + value: new(big.Int).SetUint64(value), + exp: 0, + } +} + +// NewFromBigInt returns a new Decimal from a big.Int, value * 10 ^ exp +func NewFromBigInt(value *big.Int, exp int32) Decimal { + return Decimal{ + value: new(big.Int).Set(value), + exp: exp, + } +} + +// NewFromBigRat returns a new Decimal from a big.Rat. The numerator and +// denominator are divided and rounded to the given precision. +// +// Example: +// +// d1 := NewFromBigRat(big.NewRat(0, 1), 0) // output: "0" +// d2 := NewFromBigRat(big.NewRat(4, 5), 1) // output: "0.8" +// d3 := NewFromBigRat(big.NewRat(1000, 3), 3) // output: "333.333" +// d4 := NewFromBigRat(big.NewRat(2, 7), 4) // output: "0.2857" +func NewFromBigRat(value *big.Rat, precision int32) Decimal { + return Decimal{ + value: new(big.Int).Set(value.Num()), + exp: 0, + }.DivRound(Decimal{ + value: new(big.Int).Set(value.Denom()), + exp: 0, + }, precision) +} + +// NewFromString returns a new Decimal from a string representation. +// Trailing zeroes are not trimmed. +// +// Example: +// +// d, err := NewFromString("-123.45") +// d2, err := NewFromString(".0001") +// d3, err := NewFromString("1.47000") +func NewFromString(value string) (Decimal, error) { + originalInput := value + var intString string + var exp int64 + + // Check if number is using scientific notation + eIndex := strings.IndexAny(value, "Ee") + if eIndex != -1 { + expInt, err := strconv.ParseInt(value[eIndex+1:], 10, 32) + if err != nil { + if e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange { + return Decimal{}, fmt.Errorf("can't convert %s to decimal: fractional part too long", value) + } + return Decimal{}, fmt.Errorf("can't convert %s to decimal: exponent is not numeric", value) + } + value = value[:eIndex] + exp = expInt + } + + pIndex := -1 + vLen := len(value) + for i := 0; i < vLen; i++ { + if value[i] == '.' { + if pIndex > -1 { + return Decimal{}, fmt.Errorf("can't convert %s to decimal: too many .s", value) + } + pIndex = i + } + } + + if pIndex == -1 { + // There is no decimal point, we can just parse the original string as + // an int + intString = value + } else { + if pIndex+1 < vLen { + intString = value[:pIndex] + value[pIndex+1:] + } else { + intString = value[:pIndex] + } + expInt := -len(value[pIndex+1:]) + exp += int64(expInt) + } + + var dValue *big.Int + // strconv.ParseInt is faster than new(big.Int).SetString so this is just a shortcut for strings we know won't overflow + if len(intString) <= 18 { + parsed64, err := strconv.ParseInt(intString, 10, 64) + if err != nil { + return Decimal{}, fmt.Errorf("can't convert %s to decimal", value) + } + dValue = big.NewInt(parsed64) + } else { + dValue = new(big.Int) + _, ok := dValue.SetString(intString, 10) + if !ok { + return Decimal{}, fmt.Errorf("can't convert %s to decimal", value) + } + } + + if exp < math.MinInt32 || exp > math.MaxInt32 { + // NOTE(vadim): I doubt a string could realistically be this long + return Decimal{}, fmt.Errorf("can't convert %s to decimal: fractional part too long", originalInput) + } + + return Decimal{ + value: dValue, + exp: int32(exp), + }, nil +} + +// NewFromFormattedString returns a new Decimal from a formatted string representation. +// The second argument - replRegexp, is a regular expression that is used to find characters that should be +// removed from given decimal string representation. All matched characters will be replaced with an empty string. +// +// Example: +// +// r := regexp.MustCompile("[$,]") +// d1, err := NewFromFormattedString("$5,125.99", r) +// +// r2 := regexp.MustCompile("[_]") +// d2, err := NewFromFormattedString("1_000_000", r2) +// +// r3 := regexp.MustCompile("[USD\\s]") +// d3, err := NewFromFormattedString("5000 USD", r3) +func NewFromFormattedString(value string, replRegexp *regexp.Regexp) (Decimal, error) { + parsedValue := replRegexp.ReplaceAllString(value, "") + d, err := NewFromString(parsedValue) + if err != nil { + return Decimal{}, err + } + return d, nil +} + +// RequireFromString returns a new Decimal from a string representation +// or panics if NewFromString had returned an error. +// +// Example: +// +// d := RequireFromString("-123.45") +// d2 := RequireFromString(".0001") +func RequireFromString(value string) Decimal { + dec, err := NewFromString(value) + if err != nil { + panic(err) + } + return dec +} + +// NewFromFloat converts a float64 to Decimal. +// +// The converted number will contain the number of significant digits that can be +// represented in a float with reliable roundtrip. +// This is typically 15 digits, but may be more in some cases. +// See https://www.exploringbinary.com/decimal-precision-of-binary-floating-point-numbers/ for more information. +// +// For slightly faster conversion, use NewFromFloatWithExponent where you can specify the precision in absolute terms. +// +// NOTE: this will panic on NaN, +/-inf +func NewFromFloat(value float64) Decimal { + if value == 0 { + return New(0, 0) + } + return newFromFloat(value, math.Float64bits(value), &float64info) +} + +// NewFromFloat32 converts a float32 to Decimal. +// +// The converted number will contain the number of significant digits that can be +// represented in a float with reliable roundtrip. +// This is typically 6-8 digits depending on the input. +// See https://www.exploringbinary.com/decimal-precision-of-binary-floating-point-numbers/ for more information. +// +// For slightly faster conversion, use NewFromFloatWithExponent where you can specify the precision in absolute terms. +// +// NOTE: this will panic on NaN, +/-inf +func NewFromFloat32(value float32) Decimal { + if value == 0 { + return New(0, 0) + } + // XOR is workaround for https://github.com/golang/go/issues/26285 + a := math.Float32bits(value) ^ 0x80808080 + return newFromFloat(float64(value), uint64(a)^0x80808080, &float32info) +} + +func newFromFloat(val float64, bits uint64, flt *floatInfo) Decimal { + if math.IsNaN(val) || math.IsInf(val, 0) { + panic(fmt.Sprintf("Cannot create a Decimal from %v", val)) + } + exp := int(bits>>flt.mantbits) & (1<>(flt.expbits+flt.mantbits) != 0 + + roundShortest(&d, mant, exp, flt) + // If less than 19 digits, we can do calculation in an int64. + if d.nd < 19 { + tmp := int64(0) + m := int64(1) + for i := d.nd - 1; i >= 0; i-- { + tmp += m * int64(d.d[i]-'0') + m *= 10 + } + if d.neg { + tmp *= -1 + } + return Decimal{value: big.NewInt(tmp), exp: int32(d.dp) - int32(d.nd)} + } + dValue := new(big.Int) + dValue, ok := dValue.SetString(string(d.d[:d.nd]), 10) + if ok { + return Decimal{value: dValue, exp: int32(d.dp) - int32(d.nd)} + } + + return NewFromFloatWithExponent(val, int32(d.dp)-int32(d.nd)) +} + +// NewFromFloatWithExponent converts a float64 to Decimal, with an arbitrary +// number of fractional digits. +// +// Example: +// +// NewFromFloatWithExponent(123.456, -2).String() // output: "123.46" +func NewFromFloatWithExponent(value float64, exp int32) Decimal { + if math.IsNaN(value) || math.IsInf(value, 0) { + panic(fmt.Sprintf("Cannot create a Decimal from %v", value)) + } + + bits := math.Float64bits(value) + mant := bits & (1<<52 - 1) + exp2 := int32((bits >> 52) & (1<<11 - 1)) + sign := bits >> 63 + + if exp2 == 0 { + // specials + if mant == 0 { + return Decimal{} + } + // subnormal + exp2++ + } else { + // normal + mant |= 1 << 52 + } + + exp2 -= 1023 + 52 + + // normalizing base-2 values + for mant&1 == 0 { + mant = mant >> 1 + exp2++ + } + + // maximum number of fractional base-10 digits to represent 2^N exactly cannot be more than -N if N<0 + if exp < 0 && exp < exp2 { + if exp2 < 0 { + exp = exp2 + } else { + exp = 0 + } + } + + // representing 10^M * 2^N as 5^M * 2^(M+N) + exp2 -= exp + + temp := big.NewInt(1) + dMant := big.NewInt(int64(mant)) + + // applying 5^M + if exp > 0 { + temp = temp.SetInt64(int64(exp)) + temp = temp.Exp(fiveInt, temp, nil) + } else if exp < 0 { + temp = temp.SetInt64(-int64(exp)) + temp = temp.Exp(fiveInt, temp, nil) + dMant = dMant.Mul(dMant, temp) + temp = temp.SetUint64(1) + } + + // applying 2^(M+N) + if exp2 > 0 { + dMant = dMant.Lsh(dMant, uint(exp2)) + } else if exp2 < 0 { + temp = temp.Lsh(temp, uint(-exp2)) + } + + // rounding and downscaling + if exp > 0 || exp2 < 0 { + halfDown := new(big.Int).Rsh(temp, 1) + dMant = dMant.Add(dMant, halfDown) + dMant = dMant.Quo(dMant, temp) + } + + if sign == 1 { + dMant = dMant.Neg(dMant) + } + + return Decimal{ + value: dMant, + exp: exp, + } +} + +// Copy returns a copy of decimal with the same value and exponent, but a different pointer to value. +func (d Decimal) Copy() Decimal { + d.ensureInitialized() + return Decimal{ + value: new(big.Int).Set(d.value), + exp: d.exp, + } +} + +// rescale returns a rescaled version of the decimal. Returned +// decimal may be less precise if the given exponent is bigger +// than the initial exponent of the Decimal. +// NOTE: this will truncate, NOT round +// +// Example: +// +// d := New(12345, -4) +// d2 := d.rescale(-1) +// d3 := d2.rescale(-4) +// println(d1) +// println(d2) +// println(d3) +// +// Output: +// +// 1.2345 +// 1.2 +// 1.2000 +func (d Decimal) rescale(exp int32) Decimal { + d.ensureInitialized() + + if d.exp == exp { + return Decimal{ + new(big.Int).Set(d.value), + d.exp, + } + } + + // NOTE(vadim): must convert exps to float64 before - to prevent overflow + diff := math.Abs(float64(exp) - float64(d.exp)) + value := new(big.Int).Set(d.value) + + expScale := new(big.Int).Exp(tenInt, big.NewInt(int64(diff)), nil) + if exp > d.exp { + value = value.Quo(value, expScale) + } else if exp < d.exp { + value = value.Mul(value, expScale) + } + + return Decimal{ + value: value, + exp: exp, + } +} + +// Abs returns the absolute value of the decimal. +func (d Decimal) Abs() Decimal { + if !d.IsNegative() { + return d + } + d.ensureInitialized() + d2Value := new(big.Int).Abs(d.value) + return Decimal{ + value: d2Value, + exp: d.exp, + } +} + +// Add returns d + d2. +func (d Decimal) Add(d2 Decimal) Decimal { + rd, rd2 := RescalePair(d, d2) + + d3Value := new(big.Int).Add(rd.value, rd2.value) + return Decimal{ + value: d3Value, + exp: rd.exp, + } +} + +// Sub returns d - d2. +func (d Decimal) Sub(d2 Decimal) Decimal { + rd, rd2 := RescalePair(d, d2) + + d3Value := new(big.Int).Sub(rd.value, rd2.value) + return Decimal{ + value: d3Value, + exp: rd.exp, + } +} + +// Neg returns -d. +func (d Decimal) Neg() Decimal { + d.ensureInitialized() + val := new(big.Int).Neg(d.value) + return Decimal{ + value: val, + exp: d.exp, + } +} + +// Mul returns d * d2. +func (d Decimal) Mul(d2 Decimal) Decimal { + d.ensureInitialized() + d2.ensureInitialized() + + expInt64 := int64(d.exp) + int64(d2.exp) + if expInt64 > math.MaxInt32 || expInt64 < math.MinInt32 { + // NOTE(vadim): better to panic than give incorrect results, as + // Decimals are usually used for money + panic(fmt.Sprintf("exponent %v overflows an int32!", expInt64)) + } + + d3Value := new(big.Int).Mul(d.value, d2.value) + return Decimal{ + value: d3Value, + exp: int32(expInt64), + } +} + +// Shift shifts the decimal in base 10. +// It shifts left when shift is positive and right if shift is negative. +// In simpler terms, the given value for shift is added to the exponent +// of the decimal. +func (d Decimal) Shift(shift int32) Decimal { + d.ensureInitialized() + return Decimal{ + value: new(big.Int).Set(d.value), + exp: d.exp + shift, + } +} + +// Div returns d / d2. If it doesn't divide exactly, the result will have +// DivisionPrecision digits after the decimal point. +func (d Decimal) Div(d2 Decimal) Decimal { + return d.DivRound(d2, int32(DivisionPrecision)) +} + +// QuoRem does division with remainder +// d.QuoRem(d2,precision) returns quotient q and remainder r such that +// +// d = d2 * q + r, q an integer multiple of 10^(-precision) +// 0 <= r < abs(d2) * 10 ^(-precision) if d>=0 +// 0 >= r > -abs(d2) * 10 ^(-precision) if d<0 +// +// Note that precision<0 is allowed as input. +func (d Decimal) QuoRem(d2 Decimal, precision int32) (Decimal, Decimal) { + d.ensureInitialized() + d2.ensureInitialized() + if d2.value.Sign() == 0 { + panic("decimal division by 0") + } + scale := -precision + e := int64(d.exp) - int64(d2.exp) - int64(scale) + if e > math.MaxInt32 || e < math.MinInt32 { + panic("overflow in decimal QuoRem") + } + var aa, bb, expo big.Int + var scalerest int32 + // d = a 10^ea + // d2 = b 10^eb + if e < 0 { + aa = *d.value + expo.SetInt64(-e) + bb.Exp(tenInt, &expo, nil) + bb.Mul(d2.value, &bb) + scalerest = d.exp + // now aa = a + // bb = b 10^(scale + eb - ea) + } else { + expo.SetInt64(e) + aa.Exp(tenInt, &expo, nil) + aa.Mul(d.value, &aa) + bb = *d2.value + scalerest = scale + d2.exp + // now aa = a ^ (ea - eb - scale) + // bb = b + } + var q, r big.Int + q.QuoRem(&aa, &bb, &r) + dq := Decimal{value: &q, exp: scale} + dr := Decimal{value: &r, exp: scalerest} + return dq, dr +} + +// DivRound divides and rounds to a given precision +// i.e. to an integer multiple of 10^(-precision) +// +// for a positive quotient digit 5 is rounded up, away from 0 +// if the quotient is negative then digit 5 is rounded down, away from 0 +// +// Note that precision<0 is allowed as input. +func (d Decimal) DivRound(d2 Decimal, precision int32) Decimal { + // QuoRem already checks initialization + q, r := d.QuoRem(d2, precision) + // the actual rounding decision is based on comparing r*10^precision and d2/2 + // instead compare 2 r 10 ^precision and d2 + var rv2 big.Int + rv2.Abs(r.value) + rv2.Lsh(&rv2, 1) + // now rv2 = abs(r.value) * 2 + r2 := Decimal{value: &rv2, exp: r.exp + precision} + // r2 is now 2 * r * 10 ^ precision + var c = r2.Cmp(d2.Abs()) + + if c < 0 { + return q + } + + if d.value.Sign()*d2.value.Sign() < 0 { + return q.Sub(New(1, -precision)) + } + + return q.Add(New(1, -precision)) +} + +// Mod returns d % d2. +func (d Decimal) Mod(d2 Decimal) Decimal { + _, r := d.QuoRem(d2, 0) + return r +} + +// Pow returns d to the power of d2. +// When exponent is negative the returned decimal will have maximum precision of PowPrecisionNegativeExponent places after decimal point. +// +// Pow returns 0 (zero-value of Decimal) instead of error for power operation edge cases, to handle those edge cases use PowWithPrecision +// Edge cases not handled by Pow: +// - 0 ** 0 => undefined value +// - 0 ** y, where y < 0 => infinity +// - x ** y, where x < 0 and y is non-integer decimal => imaginary value +// +// Example: +// +// d1 := decimal.NewFromFloat(4.0) +// d2 := decimal.NewFromFloat(4.0) +// res1 := d1.Pow(d2) +// res1.String() // output: "256" +// +// d3 := decimal.NewFromFloat(5.0) +// d4 := decimal.NewFromFloat(5.73) +// res2 := d3.Pow(d4) +// res2.String() // output: "10118.08037125" +func (d Decimal) Pow(d2 Decimal) Decimal { + baseSign := d.Sign() + expSign := d2.Sign() + + if baseSign == 0 { + if expSign == 0 { + return Decimal{} + } + if expSign == 1 { + return Decimal{zeroInt, 0} + } + if expSign == -1 { + return Decimal{} + } + } + + if expSign == 0 { + return Decimal{oneInt, 0} + } + + // TODO: optimize extraction of fractional part + one := Decimal{oneInt, 0} + expIntPart, expFracPart := d2.QuoRem(one, 0) + + if baseSign == -1 && !expFracPart.IsZero() { + return Decimal{} + } + + intPartPow, _ := d.PowBigInt(expIntPart.value) + + // if exponent is an integer we don't need to calculate d1**frac(d2) + if expFracPart.value.Sign() == 0 { + return intPartPow + } + + // TODO: optimize NumDigits for more performant precision adjustment + digitsBase := d.NumDigits() + digitsExponent := d2.NumDigits() + + precision := digitsBase + + if digitsExponent > precision { + precision += digitsExponent + } + + precision += 6 + + // Calculate x ** frac(y), where + // x ** frac(y) = exp(ln(x ** frac(y)) = exp(ln(x) * frac(y)) + fracPartPow, err := d.Abs().Ln(-d.exp + int32(precision)) + if err != nil { + return Decimal{} + } + + fracPartPow = fracPartPow.Mul(expFracPart) + + fracPartPow, err = fracPartPow.ExpTaylor(-d.exp + int32(precision)) + if err != nil { + return Decimal{} + } + + // Join integer and fractional part, + // base ** (expBase + expFrac) = base ** expBase * base ** expFrac + res := intPartPow.Mul(fracPartPow) + + return res +} + +// PowWithPrecision returns d to the power of d2. +// Precision parameter specifies minimum precision of the result (digits after decimal point). +// Returned decimal is not rounded to 'precision' places after decimal point. +// +// PowWithPrecision returns error when: +// - 0 ** 0 => undefined value +// - 0 ** y, where y < 0 => infinity +// - x ** y, where x < 0 and y is non-integer decimal => imaginary value +// +// Example: +// +// d1 := decimal.NewFromFloat(4.0) +// d2 := decimal.NewFromFloat(4.0) +// res1, err := d1.PowWithPrecision(d2, 2) +// res1.String() // output: "256" +// +// d3 := decimal.NewFromFloat(5.0) +// d4 := decimal.NewFromFloat(5.73) +// res2, err := d3.PowWithPrecision(d4, 5) +// res2.String() // output: "10118.080371595015625" +// +// d5 := decimal.NewFromFloat(-3.0) +// d6 := decimal.NewFromFloat(-6.0) +// res3, err := d5.PowWithPrecision(d6, 10) +// res3.String() // output: "0.0013717421" +func (d Decimal) PowWithPrecision(d2 Decimal, precision int32) (Decimal, error) { + baseSign := d.Sign() + expSign := d2.Sign() + + if baseSign == 0 { + if expSign == 0 { + return Decimal{}, fmt.Errorf("cannot represent undefined value of 0**0") + } + if expSign == 1 { + return Decimal{zeroInt, 0}, nil + } + if expSign == -1 { + return Decimal{}, fmt.Errorf("cannot represent infinity value of 0 ** y, where y < 0") + } + } + + if expSign == 0 { + return Decimal{oneInt, 0}, nil + } + + // TODO: optimize extraction of fractional part + one := Decimal{oneInt, 0} + expIntPart, expFracPart := d2.QuoRem(one, 0) + + if baseSign == -1 && !expFracPart.IsZero() { + return Decimal{}, fmt.Errorf("cannot represent imaginary value of x ** y, where x < 0 and y is non-integer decimal") + } + + intPartPow, _ := d.powBigIntWithPrecision(expIntPart.value, precision) + + // if exponent is an integer we don't need to calculate d1**frac(d2) + if expFracPart.value.Sign() == 0 { + return intPartPow, nil + } + + // TODO: optimize NumDigits for more performant precision adjustment + digitsBase := d.NumDigits() + digitsExponent := d2.NumDigits() + + if int32(digitsBase) > precision { + precision = int32(digitsBase) + } + if int32(digitsExponent) > precision { + precision += int32(digitsExponent) + } + // increase precision by 10 to compensate for errors in further calculations + precision += 10 + + // Calculate x ** frac(y), where + // x ** frac(y) = exp(ln(x ** frac(y)) = exp(ln(x) * frac(y)) + fracPartPow, err := d.Abs().Ln(precision) + if err != nil { + return Decimal{}, err + } + + fracPartPow = fracPartPow.Mul(expFracPart) + + fracPartPow, err = fracPartPow.ExpTaylor(precision) + if err != nil { + return Decimal{}, err + } + + // Join integer and fractional part, + // base ** (expBase + expFrac) = base ** expBase * base ** expFrac + res := intPartPow.Mul(fracPartPow) + + return res, nil +} + +// PowInt32 returns d to the power of exp, where exp is int32. +// Only returns error when d and exp is 0, thus result is undefined. +// +// When exponent is negative the returned decimal will have maximum precision of PowPrecisionNegativeExponent places after decimal point. +// +// Example: +// +// d1, err := decimal.NewFromFloat(4.0).PowInt32(4) +// d1.String() // output: "256" +// +// d2, err := decimal.NewFromFloat(3.13).PowInt32(5) +// d2.String() // output: "300.4150512793" +func (d Decimal) PowInt32(exp int32) (Decimal, error) { + if d.IsZero() && exp == 0 { + return Decimal{}, fmt.Errorf("cannot represent undefined value of 0**0") + } + + isExpNeg := exp < 0 + exp = abs(exp) + + n, result := d, New(1, 0) + + for exp > 0 { + if exp%2 == 1 { + result = result.Mul(n) + } + exp /= 2 + + if exp > 0 { + n = n.Mul(n) + } + } + + if isExpNeg { + return New(1, 0).DivRound(result, int32(PowPrecisionNegativeExponent)), nil + } + + return result, nil +} + +// PowBigInt returns d to the power of exp, where exp is big.Int. +// Only returns error when d and exp is 0, thus result is undefined. +// +// When exponent is negative the returned decimal will have maximum precision of PowPrecisionNegativeExponent places after decimal point. +// +// Example: +// +// d1, err := decimal.NewFromFloat(3.0).PowBigInt(big.NewInt(3)) +// d1.String() // output: "27" +// +// d2, err := decimal.NewFromFloat(629.25).PowBigInt(big.NewInt(5)) +// d2.String() // output: "98654323103449.5673828125" +func (d Decimal) PowBigInt(exp *big.Int) (Decimal, error) { + return d.powBigIntWithPrecision(exp, int32(PowPrecisionNegativeExponent)) +} + +func (d Decimal) powBigIntWithPrecision(exp *big.Int, precision int32) (Decimal, error) { + if d.IsZero() && exp.Sign() == 0 { + return Decimal{}, fmt.Errorf("cannot represent undefined value of 0**0") + } + + tmpExp := new(big.Int).Set(exp) + isExpNeg := exp.Sign() < 0 + + if isExpNeg { + tmpExp.Abs(tmpExp) + } + + n, result := d, New(1, 0) + + for tmpExp.Sign() > 0 { + if tmpExp.Bit(0) == 1 { + result = result.Mul(n) + } + tmpExp.Rsh(tmpExp, 1) + + if tmpExp.Sign() > 0 { + n = n.Mul(n) + } + } + + if isExpNeg { + return New(1, 0).DivRound(result, precision), nil + } + + return result, nil +} + +// ExpHullAbrham calculates the natural exponent of decimal (e to the power of d) using Hull-Abraham algorithm. +// OverallPrecision argument specifies the overall precision of the result (integer part + decimal part). +// +// ExpHullAbrham is faster than ExpTaylor for small precision values, but it is much slower for large precision values. +// +// Example: +// +// NewFromFloat(26.1).ExpHullAbrham(2).String() // output: "220000000000" +// NewFromFloat(26.1).ExpHullAbrham(20).String() // output: "216314672147.05767284" +func (d Decimal) ExpHullAbrham(overallPrecision uint32) (Decimal, error) { + // Algorithm based on Variable precision exponential function. + // ACM Transactions on Mathematical Software by T. E. Hull & A. Abrham. + if d.IsZero() { + return Decimal{oneInt, 0}, nil + } + + currentPrecision := overallPrecision + + // Algorithm does not work if currentPrecision * 23 < |x|. + // Precision is automatically increased in such cases, so the value can be calculated precisely. + // If newly calculated precision is higher than ExpMaxIterations the currentPrecision will not be changed. + f := d.Abs().InexactFloat64() + if ncp := f / 23; ncp > float64(currentPrecision) && ncp < float64(ExpMaxIterations) { + currentPrecision = uint32(math.Ceil(ncp)) + } + + // fail if abs(d) beyond an over/underflow threshold + overflowThreshold := New(23*int64(currentPrecision), 0) + if d.Abs().Cmp(overflowThreshold) > 0 { + return Decimal{}, fmt.Errorf("over/underflow threshold, exp(x) cannot be calculated precisely") + } + + // Return 1 if abs(d) small enough; this also avoids later over/underflow + overflowThreshold2 := New(9, -int32(currentPrecision)-1) + if d.Abs().Cmp(overflowThreshold2) <= 0 { + return Decimal{oneInt, d.exp}, nil + } + + // t is the smallest integer >= 0 such that the corresponding abs(d/k) < 1 + t := d.exp + int32(d.NumDigits()) // Add d.NumDigits because the paper assumes that d.value [0.1, 1) + + if t < 0 { + t = 0 + } + + k := New(1, t) // reduction factor + r := Decimal{new(big.Int).Set(d.value), d.exp - t} // reduced argument + p := int32(currentPrecision) + t + 2 // precision for calculating the sum + + // Determine n, the number of therms for calculating sum + // use first Newton step (1.435p - 1.182) / log10(p/abs(r)) + // for solving appropriate equation, along with directed + // roundings and simple rational bound for log10(p/abs(r)) + rf := r.Abs().InexactFloat64() + pf := float64(p) + nf := math.Ceil((1.453*pf - 1.182) / math.Log10(pf/rf)) + if nf > float64(ExpMaxIterations) || math.IsNaN(nf) { + return Decimal{}, fmt.Errorf("exact value cannot be calculated in <=ExpMaxIterations iterations") + } + n := int64(nf) + + tmp := New(0, 0) + sum := New(1, 0) + one := New(1, 0) + for i := n - 1; i > 0; i-- { + tmp.value.SetInt64(i) + sum = sum.Mul(r.DivRound(tmp, p)) + sum = sum.Add(one) + } + + ki := k.IntPart() + res := New(1, 0) + for i := ki; i > 0; i-- { + res = res.Mul(sum) + } + + resNumDigits := int32(res.NumDigits()) + + var roundDigits int32 + if resNumDigits > abs(res.exp) { + roundDigits = int32(currentPrecision) - resNumDigits - res.exp + } else { + roundDigits = int32(currentPrecision) + } + + res = res.Round(roundDigits) + + return res, nil +} + +// ExpTaylor calculates the natural exponent of decimal (e to the power of d) using Taylor series expansion. +// Precision argument specifies how precise the result must be (number of digits after decimal point). +// Negative precision is allowed. +// +// ExpTaylor is much faster for large precision values than ExpHullAbrham. +// +// Example: +// +// d, err := NewFromFloat(26.1).ExpTaylor(2).String() +// d.String() // output: "216314672147.06" +// +// NewFromFloat(26.1).ExpTaylor(20).String() +// d.String() // output: "216314672147.05767284062928674083" +// +// NewFromFloat(26.1).ExpTaylor(-10).String() +// d.String() // output: "220000000000" +func (d Decimal) ExpTaylor(precision int32) (Decimal, error) { + // Note(mwoss): Implementation can be optimized by exclusively using big.Int API only + if d.IsZero() { + return Decimal{oneInt, 0}.Round(precision), nil + } + + var epsilon Decimal + var divPrecision int32 + if precision < 0 { + epsilon = New(1, -1) + divPrecision = 8 + } else { + epsilon = New(1, -precision-1) + divPrecision = precision + 1 + } + + decAbs := d.Abs() + pow := d.Abs() + factorial := New(1, 0) + + result := New(1, 0) + + for i := int64(1); ; { + step := pow.DivRound(factorial, divPrecision) + result = result.Add(step) + + // Stop Taylor series when current step is smaller than epsilon + if step.Cmp(epsilon) < 0 { + break + } + + pow = pow.Mul(decAbs) + + i++ + + // Calculate next factorial number or retrieve cached value + if len(factorials) >= int(i) && !factorials[i-1].IsZero() { + factorial = factorials[i-1] + } else { + // To avoid any race conditions, firstly the zero value is appended to a slice to create + // a spot for newly calculated factorial. After that, the zero value is replaced by calculated + // factorial using the index notation. + factorial = factorials[i-2].Mul(New(i, 0)) + factorials = append(factorials, Zero) + factorials[i-1] = factorial + } + } + + if d.Sign() < 0 { + result = New(1, 0).DivRound(result, precision+1) + } + + result = result.Round(precision) + return result, nil +} + +// Ln calculates natural logarithm of d. +// Precision argument specifies how precise the result must be (number of digits after decimal point). +// Negative precision is allowed. +// +// Example: +// +// d1, err := NewFromFloat(13.3).Ln(2) +// d1.String() // output: "2.59" +// +// d2, err := NewFromFloat(579.161).Ln(10) +// d2.String() // output: "6.3615805046" +func (d Decimal) Ln(precision int32) (Decimal, error) { + // Algorithm based on The Use of Iteration Methods for Approximating the Natural Logarithm, + // James F. Epperson, The American Mathematical Monthly, Vol. 96, No. 9, November 1989, pp. 831-835. + if d.IsNegative() { + return Decimal{}, fmt.Errorf("cannot calculate natural logarithm for negative decimals") + } + + if d.IsZero() { + return Decimal{}, fmt.Errorf("cannot represent natural logarithm of 0, result: -infinity") + } + + calcPrecision := precision + 2 + z := d.Copy() + + var comp1, comp3, comp2, comp4, reduceAdjust Decimal + comp1 = z.Sub(Decimal{oneInt, 0}) + comp3 = Decimal{oneInt, -1} + + // for decimal in range [0.9, 1.1] where ln(d) is close to 0 + usePowerSeries := false + + if comp1.Abs().Cmp(comp3) <= 0 { + usePowerSeries = true + } else { + // reduce input decimal to range [0.1, 1) + expDelta := int32(z.NumDigits()) + z.exp + z.exp -= expDelta + + // Input decimal was reduced by factor of 10^expDelta, thus we will need to add + // ln(10^expDelta) = expDelta * ln(10) + // to the result to compensate that + ln10 := ln10.withPrecision(calcPrecision) + reduceAdjust = NewFromInt32(expDelta) + reduceAdjust = reduceAdjust.Mul(ln10) + + comp1 = z.Sub(Decimal{oneInt, 0}) + + if comp1.Abs().Cmp(comp3) <= 0 { + usePowerSeries = true + } else { + // initial estimate using floats + zFloat := z.InexactFloat64() + comp1 = NewFromFloat(math.Log(zFloat)) + } + } + + epsilon := Decimal{oneInt, -calcPrecision} + + if usePowerSeries { + // Power Series - https://en.wikipedia.org/wiki/Logarithm#Power_series + // Calculating n-th term of formula: ln(z+1) = 2 sum [ 1 / (2n+1) * (z / (z+2))^(2n+1) ] + // until the difference between current and next term is smaller than epsilon. + // Coverage quite fast for decimals close to 1.0 + + // z + 2 + comp2 = comp1.Add(Decimal{twoInt, 0}) + // z / (z + 2) + comp3 = comp1.DivRound(comp2, calcPrecision) + // 2 * (z / (z + 2)) + comp1 = comp3.Add(comp3) + comp2 = comp1.Copy() + + for n := 1; ; n++ { + // 2 * (z / (z+2))^(2n+1) + comp2 = comp2.Mul(comp3).Mul(comp3) + + // 1 / (2n+1) * 2 * (z / (z+2))^(2n+1) + comp4 = NewFromInt(int64(2*n + 1)) + comp4 = comp2.DivRound(comp4, calcPrecision) + + // comp1 = 2 sum [ 1 / (2n+1) * (z / (z+2))^(2n+1) ] + comp1 = comp1.Add(comp4) + + if comp4.Abs().Cmp(epsilon) <= 0 { + break + } + } + } else { + // Halley's Iteration. + // Calculating n-th term of formula: a_(n+1) = a_n - 2 * (exp(a_n) - z) / (exp(a_n) + z), + // until the difference between current and next term is smaller than epsilon + var prevStep Decimal + maxIters := calcPrecision*2 + 10 + + for i := int32(0); i < maxIters; i++ { + // exp(a_n) + comp3, _ = comp1.ExpTaylor(calcPrecision) + // exp(a_n) - z + comp2 = comp3.Sub(z) + // 2 * (exp(a_n) - z) + comp2 = comp2.Add(comp2) + // exp(a_n) + z + comp4 = comp3.Add(z) + // 2 * (exp(a_n) - z) / (exp(a_n) + z) + comp3 = comp2.DivRound(comp4, calcPrecision) + // comp1 = a_(n+1) = a_n - 2 * (exp(a_n) - z) / (exp(a_n) + z) + comp1 = comp1.Sub(comp3) + + if prevStep.Add(comp3).IsZero() { + // If iteration steps oscillate we should return early and prevent an infinity loop + // NOTE(mwoss): This should be quite a rare case, returning error is not necessary + break + } + + if comp3.Abs().Cmp(epsilon) <= 0 { + break + } + + prevStep = comp3 + } + } + + comp1 = comp1.Add(reduceAdjust) + + return comp1.Round(precision), nil +} + +// NumDigits returns the number of digits of the decimal coefficient (d.Value) +func (d Decimal) NumDigits() int { + if d.value == nil { + return 1 + } + + if d.value.IsInt64() { + i64 := d.value.Int64() + // restrict fast path to integers with exact conversion to float64 + if i64 <= (1<<53) && i64 >= -(1<<53) { + if i64 == 0 { + return 1 + } + return int(math.Log10(math.Abs(float64(i64)))) + 1 + } + } + + estimatedNumDigits := int(float64(d.value.BitLen()) / math.Log2(10)) + + // estimatedNumDigits (lg10) may be off by 1, need to verify + digitsBigInt := big.NewInt(int64(estimatedNumDigits)) + errorCorrectionUnit := digitsBigInt.Exp(tenInt, digitsBigInt, nil) + + if d.value.CmpAbs(errorCorrectionUnit) >= 0 { + return estimatedNumDigits + 1 + } + + return estimatedNumDigits +} + +// IsInteger returns true when decimal can be represented as an integer value, otherwise, it returns false. +func (d Decimal) IsInteger() bool { + // The most typical case, all decimal with exponent higher or equal 0 can be represented as integer + if d.exp >= 0 { + return true + } + // When the exponent is negative we have to check every number after the decimal place + // If all of them are zeroes, we are sure that given decimal can be represented as an integer + var r big.Int + q := new(big.Int).Set(d.value) + for z := abs(d.exp); z > 0; z-- { + q.QuoRem(q, tenInt, &r) + if r.Cmp(zeroInt) != 0 { + return false + } + } + return true +} + +// Abs calculates absolute value of any int32. Used for calculating absolute value of decimal's exponent. +func abs(n int32) int32 { + if n < 0 { + return -n + } + return n +} + +// Cmp compares the numbers represented by d and d2 and returns: +// +// -1 if d < d2 +// 0 if d == d2 +// +1 if d > d2 +func (d Decimal) Cmp(d2 Decimal) int { + d.ensureInitialized() + d2.ensureInitialized() + + if d.exp == d2.exp { + return d.value.Cmp(d2.value) + } + + rd, rd2 := RescalePair(d, d2) + + return rd.value.Cmp(rd2.value) +} + +// Compare compares the numbers represented by d and d2 and returns: +// +// -1 if d < d2 +// 0 if d == d2 +// +1 if d > d2 +func (d Decimal) Compare(d2 Decimal) int { + return d.Cmp(d2) +} + +// Equal returns whether the numbers represented by d and d2 are equal. +func (d Decimal) Equal(d2 Decimal) bool { + return d.Cmp(d2) == 0 +} + +// Deprecated: Equals is deprecated, please use Equal method instead. +func (d Decimal) Equals(d2 Decimal) bool { + return d.Equal(d2) +} + +// GreaterThan (GT) returns true when d is greater than d2. +func (d Decimal) GreaterThan(d2 Decimal) bool { + return d.Cmp(d2) == 1 +} + +// GreaterThanOrEqual (GTE) returns true when d is greater than or equal to d2. +func (d Decimal) GreaterThanOrEqual(d2 Decimal) bool { + cmp := d.Cmp(d2) + return cmp == 1 || cmp == 0 +} + +// LessThan (LT) returns true when d is less than d2. +func (d Decimal) LessThan(d2 Decimal) bool { + return d.Cmp(d2) == -1 +} + +// LessThanOrEqual (LTE) returns true when d is less than or equal to d2. +func (d Decimal) LessThanOrEqual(d2 Decimal) bool { + cmp := d.Cmp(d2) + return cmp == -1 || cmp == 0 +} + +// Sign returns: +// +// -1 if d < 0 +// 0 if d == 0 +// +1 if d > 0 +func (d Decimal) Sign() int { + if d.value == nil { + return 0 + } + return d.value.Sign() +} + +// IsPositive return +// +// true if d > 0 +// false if d == 0 +// false if d < 0 +func (d Decimal) IsPositive() bool { + return d.Sign() == 1 +} + +// IsNegative return +// +// true if d < 0 +// false if d == 0 +// false if d > 0 +func (d Decimal) IsNegative() bool { + return d.Sign() == -1 +} + +// IsZero return +// +// true if d == 0 +// false if d > 0 +// false if d < 0 +func (d Decimal) IsZero() bool { + return d.Sign() == 0 +} + +// Exponent returns the exponent, or scale component of the decimal. +func (d Decimal) Exponent() int32 { + return d.exp +} + +// Coefficient returns the coefficient of the decimal. It is scaled by 10^Exponent() +func (d Decimal) Coefficient() *big.Int { + d.ensureInitialized() + // we copy the coefficient so that mutating the result does not mutate the Decimal. + return new(big.Int).Set(d.value) +} + +// CoefficientInt64 returns the coefficient of the decimal as int64. It is scaled by 10^Exponent() +// If coefficient cannot be represented in an int64, the result will be undefined. +func (d Decimal) CoefficientInt64() int64 { + d.ensureInitialized() + return d.value.Int64() +} + +// IntPart returns the integer component of the decimal. +func (d Decimal) IntPart() int64 { + scaledD := d.rescale(0) + return scaledD.value.Int64() +} + +// BigInt returns integer component of the decimal as a BigInt. +func (d Decimal) BigInt() *big.Int { + scaledD := d.rescale(0) + return scaledD.value +} + +// BigFloat returns decimal as BigFloat. +// Be aware that casting decimal to BigFloat might cause a loss of precision. +func (d Decimal) BigFloat() *big.Float { + f := &big.Float{} + f.SetString(d.String()) + return f +} + +// Rat returns a rational number representation of the decimal. +func (d Decimal) Rat() *big.Rat { + d.ensureInitialized() + if d.exp <= 0 { + // NOTE(vadim): must negate after casting to prevent int32 overflow + denom := new(big.Int).Exp(tenInt, big.NewInt(-int64(d.exp)), nil) + return new(big.Rat).SetFrac(d.value, denom) + } + + mul := new(big.Int).Exp(tenInt, big.NewInt(int64(d.exp)), nil) + num := new(big.Int).Mul(d.value, mul) + return new(big.Rat).SetFrac(num, oneInt) +} + +// Float64 returns the nearest float64 value for d and a bool indicating +// whether f represents d exactly. +// For more details, see the documentation for big.Rat.Float64 +func (d Decimal) Float64() (f float64, exact bool) { + return d.Rat().Float64() +} + +// InexactFloat64 returns the nearest float64 value for d. +// It doesn't indicate if the returned value represents d exactly. +func (d Decimal) InexactFloat64() float64 { + f, _ := d.Float64() + return f +} + +// String returns the string representation of the decimal +// with the fixed point. +// +// Example: +// +// d := New(-12345, -3) +// println(d.String()) +// +// Output: +// +// -12.345 +func (d Decimal) String() string { + return d.string(true) +} + +// StringFixed returns a rounded fixed-point string with places digits after +// the decimal point. +// +// Example: +// +// NewFromFloat(0).StringFixed(2) // output: "0.00" +// NewFromFloat(0).StringFixed(0) // output: "0" +// NewFromFloat(5.45).StringFixed(0) // output: "5" +// NewFromFloat(5.45).StringFixed(1) // output: "5.5" +// NewFromFloat(5.45).StringFixed(2) // output: "5.45" +// NewFromFloat(5.45).StringFixed(3) // output: "5.450" +// NewFromFloat(545).StringFixed(-1) // output: "550" +func (d Decimal) StringFixed(places int32) string { + rounded := d.Round(places) + return rounded.string(false) +} + +// StringFixedBank returns a banker rounded fixed-point string with places digits +// after the decimal point. +// +// Example: +// +// NewFromFloat(0).StringFixedBank(2) // output: "0.00" +// NewFromFloat(0).StringFixedBank(0) // output: "0" +// NewFromFloat(5.45).StringFixedBank(0) // output: "5" +// NewFromFloat(5.45).StringFixedBank(1) // output: "5.4" +// NewFromFloat(5.45).StringFixedBank(2) // output: "5.45" +// NewFromFloat(5.45).StringFixedBank(3) // output: "5.450" +// NewFromFloat(545).StringFixedBank(-1) // output: "540" +func (d Decimal) StringFixedBank(places int32) string { + rounded := d.RoundBank(places) + return rounded.string(false) +} + +// StringFixedCash returns a Swedish/Cash rounded fixed-point string. For +// more details see the documentation at function RoundCash. +func (d Decimal) StringFixedCash(interval uint8) string { + rounded := d.RoundCash(interval) + return rounded.string(false) +} + +// Round rounds the decimal to places decimal places. +// If places < 0, it will round the integer part to the nearest 10^(-places). +// +// Example: +// +// NewFromFloat(5.45).Round(1).String() // output: "5.5" +// NewFromFloat(545).Round(-1).String() // output: "550" +func (d Decimal) Round(places int32) Decimal { + if d.exp == -places { + return d + } + // truncate to places + 1 + ret := d.rescale(-places - 1) + + // add sign(d) * 0.5 + if ret.value.Sign() < 0 { + ret.value.Sub(ret.value, fiveInt) + } else { + ret.value.Add(ret.value, fiveInt) + } + + // floor for positive numbers, ceil for negative numbers + _, m := ret.value.DivMod(ret.value, tenInt, new(big.Int)) + ret.exp++ + if ret.value.Sign() < 0 && m.Cmp(zeroInt) != 0 { + ret.value.Add(ret.value, oneInt) + } + + return ret +} + +// RoundCeil rounds the decimal towards +infinity. +// +// Example: +// +// NewFromFloat(545).RoundCeil(-2).String() // output: "600" +// NewFromFloat(500).RoundCeil(-2).String() // output: "500" +// NewFromFloat(1.1001).RoundCeil(2).String() // output: "1.11" +// NewFromFloat(-1.454).RoundCeil(1).String() // output: "-1.4" +func (d Decimal) RoundCeil(places int32) Decimal { + if d.exp >= -places { + return d + } + + rescaled := d.rescale(-places) + if d.Equal(rescaled) { + return d + } + + if d.value.Sign() > 0 { + rescaled.value.Add(rescaled.value, oneInt) + } + + return rescaled +} + +// RoundFloor rounds the decimal towards -infinity. +// +// Example: +// +// NewFromFloat(545).RoundFloor(-2).String() // output: "500" +// NewFromFloat(-500).RoundFloor(-2).String() // output: "-500" +// NewFromFloat(1.1001).RoundFloor(2).String() // output: "1.1" +// NewFromFloat(-1.454).RoundFloor(1).String() // output: "-1.5" +func (d Decimal) RoundFloor(places int32) Decimal { + if d.exp >= -places { + return d + } + + rescaled := d.rescale(-places) + if d.Equal(rescaled) { + return d + } + + if d.value.Sign() < 0 { + rescaled.value.Sub(rescaled.value, oneInt) + } + + return rescaled +} + +// RoundUp rounds the decimal away from zero. +// +// Example: +// +// NewFromFloat(545).RoundUp(-2).String() // output: "600" +// NewFromFloat(500).RoundUp(-2).String() // output: "500" +// NewFromFloat(1.1001).RoundUp(2).String() // output: "1.11" +// NewFromFloat(-1.454).RoundUp(1).String() // output: "-1.5" +func (d Decimal) RoundUp(places int32) Decimal { + if d.exp >= -places { + return d + } + + rescaled := d.rescale(-places) + if d.Equal(rescaled) { + return d + } + + if d.value.Sign() > 0 { + rescaled.value.Add(rescaled.value, oneInt) + } else if d.value.Sign() < 0 { + rescaled.value.Sub(rescaled.value, oneInt) + } + + return rescaled +} + +// RoundDown rounds the decimal towards zero. +// +// Example: +// +// NewFromFloat(545).RoundDown(-2).String() // output: "500" +// NewFromFloat(-500).RoundDown(-2).String() // output: "-500" +// NewFromFloat(1.1001).RoundDown(2).String() // output: "1.1" +// NewFromFloat(-1.454).RoundDown(1).String() // output: "-1.4" +func (d Decimal) RoundDown(places int32) Decimal { + if d.exp >= -places { + return d + } + + rescaled := d.rescale(-places) + if d.Equal(rescaled) { + return d + } + return rescaled +} + +// RoundBank rounds the decimal to places decimal places. +// If the final digit to round is equidistant from the nearest two integers the +// rounded value is taken as the even number +// +// If places < 0, it will round the integer part to the nearest 10^(-places). +// +// Examples: +// +// NewFromFloat(5.45).RoundBank(1).String() // output: "5.4" +// NewFromFloat(545).RoundBank(-1).String() // output: "540" +// NewFromFloat(5.46).RoundBank(1).String() // output: "5.5" +// NewFromFloat(546).RoundBank(-1).String() // output: "550" +// NewFromFloat(5.55).RoundBank(1).String() // output: "5.6" +// NewFromFloat(555).RoundBank(-1).String() // output: "560" +func (d Decimal) RoundBank(places int32) Decimal { + + round := d.Round(places) + remainder := d.Sub(round).Abs() + + half := New(5, -places-1) + if remainder.Cmp(half) == 0 && round.value.Bit(0) != 0 { + if round.value.Sign() < 0 { + round.value.Add(round.value, oneInt) + } else { + round.value.Sub(round.value, oneInt) + } + } + + return round +} + +// RoundCash aka Cash/Penny/öre rounding rounds decimal to a specific +// interval. The amount payable for a cash transaction is rounded to the nearest +// multiple of the minimum currency unit available. The following intervals are +// available: 5, 10, 25, 50 and 100; any other number throws a panic. +// +// 5: 5 cent rounding 3.43 => 3.45 +// 10: 10 cent rounding 3.45 => 3.50 (5 gets rounded up) +// 25: 25 cent rounding 3.41 => 3.50 +// 50: 50 cent rounding 3.75 => 4.00 +// 100: 100 cent rounding 3.50 => 4.00 +// +// For more details: https://en.wikipedia.org/wiki/Cash_rounding +func (d Decimal) RoundCash(interval uint8) Decimal { + var iVal *big.Int + switch interval { + case 5: + iVal = twentyInt + case 10: + iVal = tenInt + case 25: + iVal = fourInt + case 50: + iVal = twoInt + case 100: + iVal = oneInt + default: + panic(fmt.Sprintf("Decimal does not support this Cash rounding interval `%d`. Supported: 5, 10, 25, 50, 100", interval)) + } + dVal := Decimal{ + value: iVal, + } + + // TODO: optimize those calculations to reduce the high allocations (~29 allocs). + return d.Mul(dVal).Round(0).Div(dVal).Truncate(2) +} + +// Floor returns the nearest integer value less than or equal to d. +func (d Decimal) Floor() Decimal { + d.ensureInitialized() + + if d.exp >= 0 { + return d + } + + exp := big.NewInt(10) + + // NOTE(vadim): must negate after casting to prevent int32 overflow + exp.Exp(exp, big.NewInt(-int64(d.exp)), nil) + + z := new(big.Int).Div(d.value, exp) + return Decimal{value: z, exp: 0} +} + +// Ceil returns the nearest integer value greater than or equal to d. +func (d Decimal) Ceil() Decimal { + d.ensureInitialized() + + if d.exp >= 0 { + return d + } + + exp := big.NewInt(10) + + // NOTE(vadim): must negate after casting to prevent int32 overflow + exp.Exp(exp, big.NewInt(-int64(d.exp)), nil) + + z, m := new(big.Int).DivMod(d.value, exp, new(big.Int)) + if m.Cmp(zeroInt) != 0 { + z.Add(z, oneInt) + } + return Decimal{value: z, exp: 0} +} + +// Truncate truncates off digits from the number, without rounding. +// +// NOTE: precision is the last digit that will not be truncated (must be >= 0). +// +// Example: +// +// decimal.NewFromString("123.456").Truncate(2).String() // "123.45" +func (d Decimal) Truncate(precision int32) Decimal { + d.ensureInitialized() + if precision >= 0 && -precision > d.exp { + return d.rescale(-precision) + } + return d +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (d *Decimal) UnmarshalJSON(decimalBytes []byte) error { + if string(decimalBytes) == "null" { + return nil + } + + str, err := unquoteIfQuoted(decimalBytes) + if err != nil { + return fmt.Errorf("error decoding string '%s': %s", decimalBytes, err) + } + + decimal, err := NewFromString(str) + *d = decimal + if err != nil { + return fmt.Errorf("error decoding string '%s': %s", str, err) + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (d Decimal) MarshalJSON() ([]byte, error) { + var str string + if MarshalJSONWithoutQuotes { + str = d.String() + } else { + str = "\"" + d.String() + "\"" + } + return []byte(str), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. As a string representation +// is already used when encoding to text, this method stores that string as []byte +func (d *Decimal) UnmarshalBinary(data []byte) error { + // Verify we have at least 4 bytes for the exponent. The GOB encoded value + // may be empty. + if len(data) < 4 { + return fmt.Errorf("error decoding binary %v: expected at least 4 bytes, got %d", data, len(data)) + } + + // Extract the exponent + d.exp = int32(binary.BigEndian.Uint32(data[:4])) + + // Extract the value + d.value = new(big.Int) + if err := d.value.GobDecode(data[4:]); err != nil { + return fmt.Errorf("error decoding binary %v: %s", data, err) + } + + return nil +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (d Decimal) MarshalBinary() (data []byte, err error) { + // exp is written first, but encode value first to know output size + var valueData []byte + if valueData, err = d.value.GobEncode(); err != nil { + return nil, err + } + + // Write the exponent in front, since it's a fixed size + expData := make([]byte, 4, len(valueData)+4) + binary.BigEndian.PutUint32(expData, uint32(d.exp)) + + // Return the byte array + return append(expData, valueData...), nil +} + +// Scan implements the sql.Scanner interface for database deserialization. +func (d *Decimal) Scan(value interface{}) error { + // first try to see if the data is stored in database as a Numeric datatype + switch v := value.(type) { + + case float32: + *d = NewFromFloat(float64(v)) + return nil + + case float64: + // numeric in sqlite3 sends us float64 + *d = NewFromFloat(v) + return nil + + case int64: + // at least in sqlite3 when the value is 0 in db, the data is sent + // to us as an int64 instead of a float64 ... + *d = New(v, 0) + return nil + + case uint64: + // while clickhouse may send 0 in db as uint64 + *d = NewFromUint64(v) + return nil + + default: + // default is trying to interpret value stored as string + str, err := unquoteIfQuoted(v) + if err != nil { + return err + } + *d, err = NewFromString(str) + return err + } +} + +// Value implements the driver.Valuer interface for database serialization. +func (d Decimal) Value() (driver.Value, error) { + return d.String(), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface for XML +// deserialization. +func (d *Decimal) UnmarshalText(text []byte) error { + str := string(text) + + dec, err := NewFromString(str) + *d = dec + if err != nil { + return fmt.Errorf("error decoding string '%s': %s", str, err) + } + + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface for XML +// serialization. +func (d Decimal) MarshalText() (text []byte, err error) { + return []byte(d.String()), nil +} + +// GobEncode implements the gob.GobEncoder interface for gob serialization. +func (d Decimal) GobEncode() ([]byte, error) { + return d.MarshalBinary() +} + +// GobDecode implements the gob.GobDecoder interface for gob serialization. +func (d *Decimal) GobDecode(data []byte) error { + return d.UnmarshalBinary(data) +} + +// StringScaled first scales the decimal then calls .String() on it. +// +// Deprecated: buggy and unintuitive. Use StringFixed instead. +func (d Decimal) StringScaled(exp int32) string { + return d.rescale(exp).String() +} + +func (d Decimal) string(trimTrailingZeros bool) string { + if d.exp >= 0 { + return d.rescale(0).value.String() + } + + abs := new(big.Int).Abs(d.value) + str := abs.String() + + var intPart, fractionalPart string + + // NOTE(vadim): this cast to int will cause bugs if d.exp == INT_MIN + // and you are on a 32-bit machine. Won't fix this super-edge case. + dExpInt := int(d.exp) + if len(str) > -dExpInt { + intPart = str[:len(str)+dExpInt] + fractionalPart = str[len(str)+dExpInt:] + } else { + intPart = "0" + + num0s := -dExpInt - len(str) + fractionalPart = strings.Repeat("0", num0s) + str + } + + if trimTrailingZeros { + i := len(fractionalPart) - 1 + for ; i >= 0; i-- { + if fractionalPart[i] != '0' { + break + } + } + fractionalPart = fractionalPart[:i+1] + } + + number := intPart + if len(fractionalPart) > 0 { + number += "." + fractionalPart + } + + if d.value.Sign() < 0 { + return "-" + number + } + + return number +} + +func (d *Decimal) ensureInitialized() { + if d.value == nil { + d.value = new(big.Int) + } +} + +// Min returns the smallest Decimal that was passed in the arguments. +// +// To call this function with an array, you must do: +// +// Min(arr[0], arr[1:]...) +// +// This makes it harder to accidentally call Min with 0 arguments. +func Min(first Decimal, rest ...Decimal) Decimal { + ans := first + for _, item := range rest { + if item.Cmp(ans) < 0 { + ans = item + } + } + return ans +} + +// Max returns the largest Decimal that was passed in the arguments. +// +// To call this function with an array, you must do: +// +// Max(arr[0], arr[1:]...) +// +// This makes it harder to accidentally call Max with 0 arguments. +func Max(first Decimal, rest ...Decimal) Decimal { + ans := first + for _, item := range rest { + if item.Cmp(ans) > 0 { + ans = item + } + } + return ans +} + +// Sum returns the combined total of the provided first and rest Decimals +func Sum(first Decimal, rest ...Decimal) Decimal { + total := first + for _, item := range rest { + total = total.Add(item) + } + + return total +} + +// Avg returns the average value of the provided first and rest Decimals +func Avg(first Decimal, rest ...Decimal) Decimal { + count := New(int64(len(rest)+1), 0) + sum := Sum(first, rest...) + return sum.Div(count) +} + +// RescalePair rescales two decimals to common exponential value (minimal exp of both decimals) +func RescalePair(d1 Decimal, d2 Decimal) (Decimal, Decimal) { + d1.ensureInitialized() + d2.ensureInitialized() + + if d1.exp < d2.exp { + return d1, d2.rescale(d1.exp) + } else if d1.exp > d2.exp { + return d1.rescale(d2.exp), d2 + } + + return d1, d2 +} + +func unquoteIfQuoted(value interface{}) (string, error) { + var bytes []byte + + switch v := value.(type) { + case string: + bytes = []byte(v) + case []byte: + bytes = v + default: + return "", fmt.Errorf("could not convert value '%+v' to byte array of type '%T'", value, value) + } + + // If the amount is quoted, strip the quotes + if len(bytes) > 2 && bytes[0] == '"' && bytes[len(bytes)-1] == '"' { + bytes = bytes[1 : len(bytes)-1] + } + return string(bytes), nil +} + +// NullDecimal represents a nullable decimal with compatibility for +// scanning null values from the database. +type NullDecimal struct { + Decimal Decimal + Valid bool +} + +func NewNullDecimal(d Decimal) NullDecimal { + return NullDecimal{ + Decimal: d, + Valid: true, + } +} + +// Scan implements the sql.Scanner interface for database deserialization. +func (d *NullDecimal) Scan(value interface{}) error { + if value == nil { + d.Valid = false + return nil + } + d.Valid = true + return d.Decimal.Scan(value) +} + +// Value implements the driver.Valuer interface for database serialization. +func (d NullDecimal) Value() (driver.Value, error) { + if !d.Valid { + return nil, nil + } + return d.Decimal.Value() +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (d *NullDecimal) UnmarshalJSON(decimalBytes []byte) error { + if string(decimalBytes) == "null" { + d.Valid = false + return nil + } + d.Valid = true + return d.Decimal.UnmarshalJSON(decimalBytes) +} + +// MarshalJSON implements the json.Marshaler interface. +func (d NullDecimal) MarshalJSON() ([]byte, error) { + if !d.Valid { + return []byte("null"), nil + } + return d.Decimal.MarshalJSON() +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface for XML +// deserialization +func (d *NullDecimal) UnmarshalText(text []byte) error { + str := string(text) + + // check for empty XML or XML without body e.g., + if str == "" { + d.Valid = false + return nil + } + if err := d.Decimal.UnmarshalText(text); err != nil { + d.Valid = false + return err + } + d.Valid = true + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface for XML +// serialization. +func (d NullDecimal) MarshalText() (text []byte, err error) { + if !d.Valid { + return []byte{}, nil + } + return d.Decimal.MarshalText() +} + +// Trig functions + +// Atan returns the arctangent, in radians, of x. +func (d Decimal) Atan() Decimal { + if d.Equal(NewFromFloat(0.0)) { + return d + } + if d.GreaterThan(NewFromFloat(0.0)) { + return d.satan() + } + return d.Neg().satan().Neg() +} + +func (d Decimal) xatan() Decimal { + P0 := NewFromFloat(-8.750608600031904122785e-01) + P1 := NewFromFloat(-1.615753718733365076637e+01) + P2 := NewFromFloat(-7.500855792314704667340e+01) + P3 := NewFromFloat(-1.228866684490136173410e+02) + P4 := NewFromFloat(-6.485021904942025371773e+01) + Q0 := NewFromFloat(2.485846490142306297962e+01) + Q1 := NewFromFloat(1.650270098316988542046e+02) + Q2 := NewFromFloat(4.328810604912902668951e+02) + Q3 := NewFromFloat(4.853903996359136964868e+02) + Q4 := NewFromFloat(1.945506571482613964425e+02) + z := d.Mul(d) + b1 := P0.Mul(z).Add(P1).Mul(z).Add(P2).Mul(z).Add(P3).Mul(z).Add(P4).Mul(z) + b2 := z.Add(Q0).Mul(z).Add(Q1).Mul(z).Add(Q2).Mul(z).Add(Q3).Mul(z).Add(Q4) + z = b1.Div(b2) + z = d.Mul(z).Add(d) + return z +} + +// satan reduces its argument (known to be positive) +// to the range [0, 0.66] and calls xatan. +func (d Decimal) satan() Decimal { + Morebits := NewFromFloat(6.123233995736765886130e-17) // pi/2 = PIO2 + Morebits + Tan3pio8 := NewFromFloat(2.41421356237309504880) // tan(3*pi/8) + pi := NewFromFloat(3.14159265358979323846264338327950288419716939937510582097494459) + + if d.LessThanOrEqual(NewFromFloat(0.66)) { + return d.xatan() + } + if d.GreaterThan(Tan3pio8) { + return pi.Div(NewFromFloat(2.0)).Sub(NewFromFloat(1.0).Div(d).xatan()).Add(Morebits) + } + return pi.Div(NewFromFloat(4.0)).Add((d.Sub(NewFromFloat(1.0)).Div(d.Add(NewFromFloat(1.0)))).xatan()).Add(NewFromFloat(0.5).Mul(Morebits)) +} + +// sin coefficients +var _sin = [...]Decimal{ + NewFromFloat(1.58962301576546568060e-10), // 0x3de5d8fd1fd19ccd + NewFromFloat(-2.50507477628578072866e-8), // 0xbe5ae5e5a9291f5d + NewFromFloat(2.75573136213857245213e-6), // 0x3ec71de3567d48a1 + NewFromFloat(-1.98412698295895385996e-4), // 0xbf2a01a019bfdf03 + NewFromFloat(8.33333333332211858878e-3), // 0x3f8111111110f7d0 + NewFromFloat(-1.66666666666666307295e-1), // 0xbfc5555555555548 +} + +// Sin returns the sine of the radian argument x. +func (d Decimal) Sin() Decimal { + PI4A := NewFromFloat(7.85398125648498535156e-1) // 0x3fe921fb40000000, Pi/4 split into three parts + PI4B := NewFromFloat(3.77489470793079817668e-8) // 0x3e64442d00000000, + PI4C := NewFromFloat(2.69515142907905952645e-15) // 0x3ce8469898cc5170, + M4PI := NewFromFloat(1.273239544735162542821171882678754627704620361328125) // 4/pi + + if d.Equal(NewFromFloat(0.0)) { + return d + } + // make argument positive but save the sign + sign := false + if d.LessThan(NewFromFloat(0.0)) { + d = d.Neg() + sign = true + } + + j := d.Mul(M4PI).IntPart() // integer part of x/(Pi/4), as integer for tests on the phase angle + y := NewFromFloat(float64(j)) // integer part of x/(Pi/4), as float + + // map zeros to origin + if j&1 == 1 { + j++ + y = y.Add(NewFromFloat(1.0)) + } + j &= 7 // octant modulo 2Pi radians (360 degrees) + // reflect in x axis + if j > 3 { + sign = !sign + j -= 4 + } + z := d.Sub(y.Mul(PI4A)).Sub(y.Mul(PI4B)).Sub(y.Mul(PI4C)) // Extended precision modular arithmetic + zz := z.Mul(z) + + if j == 1 || j == 2 { + w := zz.Mul(zz).Mul(_cos[0].Mul(zz).Add(_cos[1]).Mul(zz).Add(_cos[2]).Mul(zz).Add(_cos[3]).Mul(zz).Add(_cos[4]).Mul(zz).Add(_cos[5])) + y = NewFromFloat(1.0).Sub(NewFromFloat(0.5).Mul(zz)).Add(w) + } else { + y = z.Add(z.Mul(zz).Mul(_sin[0].Mul(zz).Add(_sin[1]).Mul(zz).Add(_sin[2]).Mul(zz).Add(_sin[3]).Mul(zz).Add(_sin[4]).Mul(zz).Add(_sin[5]))) + } + if sign { + y = y.Neg() + } + return y +} + +// cos coefficients +var _cos = [...]Decimal{ + NewFromFloat(-1.13585365213876817300e-11), // 0xbda8fa49a0861a9b + NewFromFloat(2.08757008419747316778e-9), // 0x3e21ee9d7b4e3f05 + NewFromFloat(-2.75573141792967388112e-7), // 0xbe927e4f7eac4bc6 + NewFromFloat(2.48015872888517045348e-5), // 0x3efa01a019c844f5 + NewFromFloat(-1.38888888888730564116e-3), // 0xbf56c16c16c14f91 + NewFromFloat(4.16666666666665929218e-2), // 0x3fa555555555554b +} + +// Cos returns the cosine of the radian argument x. +func (d Decimal) Cos() Decimal { + + PI4A := NewFromFloat(7.85398125648498535156e-1) // 0x3fe921fb40000000, Pi/4 split into three parts + PI4B := NewFromFloat(3.77489470793079817668e-8) // 0x3e64442d00000000, + PI4C := NewFromFloat(2.69515142907905952645e-15) // 0x3ce8469898cc5170, + M4PI := NewFromFloat(1.273239544735162542821171882678754627704620361328125) // 4/pi + + // make argument positive + sign := false + if d.LessThan(NewFromFloat(0.0)) { + d = d.Neg() + } + + j := d.Mul(M4PI).IntPart() // integer part of x/(Pi/4), as integer for tests on the phase angle + y := NewFromFloat(float64(j)) // integer part of x/(Pi/4), as float + + // map zeros to origin + if j&1 == 1 { + j++ + y = y.Add(NewFromFloat(1.0)) + } + j &= 7 // octant modulo 2Pi radians (360 degrees) + // reflect in x axis + if j > 3 { + sign = !sign + j -= 4 + } + if j > 1 { + sign = !sign + } + + z := d.Sub(y.Mul(PI4A)).Sub(y.Mul(PI4B)).Sub(y.Mul(PI4C)) // Extended precision modular arithmetic + zz := z.Mul(z) + + if j == 1 || j == 2 { + y = z.Add(z.Mul(zz).Mul(_sin[0].Mul(zz).Add(_sin[1]).Mul(zz).Add(_sin[2]).Mul(zz).Add(_sin[3]).Mul(zz).Add(_sin[4]).Mul(zz).Add(_sin[5]))) + } else { + w := zz.Mul(zz).Mul(_cos[0].Mul(zz).Add(_cos[1]).Mul(zz).Add(_cos[2]).Mul(zz).Add(_cos[3]).Mul(zz).Add(_cos[4]).Mul(zz).Add(_cos[5])) + y = NewFromFloat(1.0).Sub(NewFromFloat(0.5).Mul(zz)).Add(w) + } + if sign { + y = y.Neg() + } + return y +} + +var _tanP = [...]Decimal{ + NewFromFloat(-1.30936939181383777646e+4), // 0xc0c992d8d24f3f38 + NewFromFloat(1.15351664838587416140e+6), // 0x413199eca5fc9ddd + NewFromFloat(-1.79565251976484877988e+7), // 0xc1711fead3299176 +} +var _tanQ = [...]Decimal{ + NewFromFloat(1.00000000000000000000e+0), + NewFromFloat(1.36812963470692954678e+4), //0x40cab8a5eeb36572 + NewFromFloat(-1.32089234440210967447e+6), //0xc13427bc582abc96 + NewFromFloat(2.50083801823357915839e+7), //0x4177d98fc2ead8ef + NewFromFloat(-5.38695755929454629881e+7), //0xc189afe03cbe5a31 +} + +// Tan returns the tangent of the radian argument x. +func (d Decimal) Tan() Decimal { + + PI4A := NewFromFloat(7.85398125648498535156e-1) // 0x3fe921fb40000000, Pi/4 split into three parts + PI4B := NewFromFloat(3.77489470793079817668e-8) // 0x3e64442d00000000, + PI4C := NewFromFloat(2.69515142907905952645e-15) // 0x3ce8469898cc5170, + M4PI := NewFromFloat(1.273239544735162542821171882678754627704620361328125) // 4/pi + + if d.Equal(NewFromFloat(0.0)) { + return d + } + + // make argument positive but save the sign + sign := false + if d.LessThan(NewFromFloat(0.0)) { + d = d.Neg() + sign = true + } + + j := d.Mul(M4PI).IntPart() // integer part of x/(Pi/4), as integer for tests on the phase angle + y := NewFromFloat(float64(j)) // integer part of x/(Pi/4), as float + + // map zeros to origin + if j&1 == 1 { + j++ + y = y.Add(NewFromFloat(1.0)) + } + + z := d.Sub(y.Mul(PI4A)).Sub(y.Mul(PI4B)).Sub(y.Mul(PI4C)) // Extended precision modular arithmetic + zz := z.Mul(z) + + if zz.GreaterThan(NewFromFloat(1e-14)) { + w := zz.Mul(_tanP[0].Mul(zz).Add(_tanP[1]).Mul(zz).Add(_tanP[2])) + x := zz.Add(_tanQ[1]).Mul(zz).Add(_tanQ[2]).Mul(zz).Add(_tanQ[3]).Mul(zz).Add(_tanQ[4]) + y = z.Add(z.Mul(w.Div(x))) + } else { + y = z + } + if j&2 == 2 { + y = NewFromFloat(-1.0).Div(y) + } + if sign { + y = y.Neg() + } + return y +} diff --git a/vendor/github.com/shopspring/decimal/rounding.go b/vendor/github.com/shopspring/decimal/rounding.go new file mode 100644 index 000000000..d4b0cd007 --- /dev/null +++ b/vendor/github.com/shopspring/decimal/rounding.go @@ -0,0 +1,160 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Multiprecision decimal numbers. +// For floating-point formatting only; not general purpose. +// Only operations are assign and (binary) left/right shift. +// Can do binary floating point in multiprecision decimal precisely +// because 2 divides 10; cannot do decimal floating point +// in multiprecision binary precisely. + +package decimal + +type floatInfo struct { + mantbits uint + expbits uint + bias int +} + +var float32info = floatInfo{23, 8, -127} +var float64info = floatInfo{52, 11, -1023} + +// roundShortest rounds d (= mant * 2^exp) to the shortest number of digits +// that will let the original floating point value be precisely reconstructed. +func roundShortest(d *decimal, mant uint64, exp int, flt *floatInfo) { + // If mantissa is zero, the number is zero; stop now. + if mant == 0 { + d.nd = 0 + return + } + + // Compute upper and lower such that any decimal number + // between upper and lower (possibly inclusive) + // will round to the original floating point number. + + // We may see at once that the number is already shortest. + // + // Suppose d is not denormal, so that 2^exp <= d < 10^dp. + // The closest shorter number is at least 10^(dp-nd) away. + // The lower/upper bounds computed below are at distance + // at most 2^(exp-mantbits). + // + // So the number is already shortest if 10^(dp-nd) > 2^(exp-mantbits), + // or equivalently log2(10)*(dp-nd) > exp-mantbits. + // It is true if 332/100*(dp-nd) >= exp-mantbits (log2(10) > 3.32). + minexp := flt.bias + 1 // minimum possible exponent + if exp > minexp && 332*(d.dp-d.nd) >= 100*(exp-int(flt.mantbits)) { + // The number is already shortest. + return + } + + // d = mant << (exp - mantbits) + // Next highest floating point number is mant+1 << exp-mantbits. + // Our upper bound is halfway between, mant*2+1 << exp-mantbits-1. + upper := new(decimal) + upper.Assign(mant*2 + 1) + upper.Shift(exp - int(flt.mantbits) - 1) + + // d = mant << (exp - mantbits) + // Next lowest floating point number is mant-1 << exp-mantbits, + // unless mant-1 drops the significant bit and exp is not the minimum exp, + // in which case the next lowest is mant*2-1 << exp-mantbits-1. + // Either way, call it mantlo << explo-mantbits. + // Our lower bound is halfway between, mantlo*2+1 << explo-mantbits-1. + var mantlo uint64 + var explo int + if mant > 1<= d.nd { + break + } + li := ui - upper.dp + lower.dp + l := byte('0') // lower digit + if li >= 0 && li < lower.nd { + l = lower.d[li] + } + m := byte('0') // middle digit + if mi >= 0 { + m = d.d[mi] + } + u := byte('0') // upper digit + if ui < upper.nd { + u = upper.d[ui] + } + + // Okay to round down (truncate) if lower has a different digit + // or if lower is inclusive and is exactly the result of rounding + // down (i.e., and we have reached the final digit of lower). + okdown := l != m || inclusive && li+1 == lower.nd + + switch { + case upperdelta == 0 && m+1 < u: + // Example: + // m = 12345xxx + // u = 12347xxx + upperdelta = 2 + case upperdelta == 0 && m != u: + // Example: + // m = 12345xxx + // u = 12346xxx + upperdelta = 1 + case upperdelta == 1 && (m != '9' || u != '0'): + // Example: + // m = 1234598x + // u = 1234600x + upperdelta = 2 + } + // Okay to round up if upper has a different digit and either upper + // is inclusive or upper is bigger than the result of rounding up. + okup := upperdelta > 0 && (inclusive || upperdelta > 1 || ui+1 < upper.nd) + + // If it's okay to do either, then round to the nearest one. + // If it's okay to do only one, do it. + switch { + case okdown && okup: + d.Round(mi + 1) + return + case okdown: + d.RoundDown(mi + 1) + return + case okup: + d.RoundUp(mi + 1) + return + } + } +} diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go index 7e7703c72..074fd4b8b 100644 --- a/vendor/github.com/sirupsen/logrus/writer.go +++ b/vendor/github.com/sirupsen/logrus/writer.go @@ -70,16 +70,16 @@ func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ... scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize) // Define a split function to split the input into chunks of up to 64KB - chunkSize := 64 * 1024 // 64KB + chunkSize := bufio.MaxScanTokenSize // 64KB splitFunc := func(data []byte, atEOF bool) (int, []byte, error) { - if len(data) > chunkSize { + if len(data) >= chunkSize { return chunkSize, data[:chunkSize], nil } - return len(data), data, nil + return bufio.ScanLines(data, atEOF) } - //Use the custom split function to split the input + // Use the custom split function to split the input scanner.Split(splitFunc) // Scan the input and write it to the logger using the specified print function diff --git a/vendor/github.com/spf13/cast/README.md b/vendor/github.com/spf13/cast/README.md index 120a57342..0e9e14593 100644 --- a/vendor/github.com/spf13/cast/README.md +++ b/vendor/github.com/spf13/cast/README.md @@ -1,8 +1,9 @@ -cast -==== -[![GoDoc](https://godoc.org/github.com/spf13/cast?status.svg)](https://godoc.org/github.com/spf13/cast) -[![Build Status](https://github.com/spf13/cast/actions/workflows/go.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/go.yml) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast)](https://goreportcard.com/report/github.com/spf13/cast) +# cast + +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/ci.yaml) +[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast) +![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) +[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast?style=flat-square)](https://goreportcard.com/report/github.com/spf13/cast) Easy and safe casting from one type to another in Go @@ -17,7 +18,7 @@ interface into a bool, etc. Cast does this intelligently when an obvious conversion is possible. It doesn’t make any attempts to guess what you meant, for example you can only convert a string to an int when it is a string representation of an int such as “8”. Cast was developed for use in -[Hugo](http://hugo.spf13.com), a website engine which uses YAML, TOML or JSON +[Hugo](https://gohugo.io), a website engine which uses YAML, TOML or JSON for meta data. ## Why use Cast? @@ -72,4 +73,3 @@ the code for a complete set. var eight interface{} = 8 cast.ToInt(eight) // 8 cast.ToInt(nil) // 0 - diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go index c04af6a97..cd9c04885 100644 --- a/vendor/github.com/spf13/cast/caste.go +++ b/vendor/github.com/spf13/cast/caste.go @@ -18,6 +18,14 @@ import ( var errNegativeNotAllowed = errors.New("unable to cast negative value") +type float64EProvider interface { + Float64() (float64, error) +} + +type float64Provider interface { + Float64() float64 +} + // ToTimeE casts an interface to a time.Time type. func ToTimeE(i interface{}) (tim time.Time, err error) { return ToTimeInDefaultLocationE(i, time.UTC) @@ -34,6 +42,12 @@ func ToTimeInDefaultLocationE(i interface{}, location *time.Location) (tim time. return v, nil case string: return StringToDateInDefaultLocation(v, location) + case json.Number: + s, err1 := ToInt64E(v) + if err1 != nil { + return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i) + } + return time.Unix(s, 0), nil case int: return time.Unix(int64(v), 0), nil case int64: @@ -71,6 +85,14 @@ func ToDurationE(i interface{}) (d time.Duration, err error) { d, err = time.ParseDuration(s + "ns") } return + case float64EProvider: + var v float64 + v, err = s.Float64() + d = time.Duration(v) + return + case float64Provider: + d = time.Duration(s.Float64()) + return default: err = fmt.Errorf("unable to cast %#v of type %T to Duration", i, i) return @@ -87,12 +109,39 @@ func ToBoolE(i interface{}) (bool, error) { case nil: return false, nil case int: - if i.(int) != 0 { - return true, nil - } - return false, nil + return b != 0, nil + case int64: + return b != 0, nil + case int32: + return b != 0, nil + case int16: + return b != 0, nil + case int8: + return b != 0, nil + case uint: + return b != 0, nil + case uint64: + return b != 0, nil + case uint32: + return b != 0, nil + case uint16: + return b != 0, nil + case uint8: + return b != 0, nil + case float64: + return b != 0, nil + case float32: + return b != 0, nil + case time.Duration: + return b != 0, nil case string: return strconv.ParseBool(i.(string)) + case json.Number: + v, err := ToInt64E(b) + if err == nil { + return v != 0, nil + } + return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i) default: return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i) } @@ -102,13 +151,16 @@ func ToBoolE(i interface{}) (bool, error) { func ToFloat64E(i interface{}) (float64, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return float64(intv), nil + } + switch s := i.(type) { case float64: return s, nil case float32: return float64(s), nil - case int: - return float64(s), nil case int64: return float64(s), nil case int32: @@ -133,11 +185,21 @@ func ToFloat64E(i interface{}) (float64, error) { return v, nil } return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) + case float64EProvider: + v, err := s.Float64() + if err == nil { + return v, nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) + case float64Provider: + return s.Float64(), nil case bool: if s { return 1, nil } return 0, nil + case nil: + return 0, nil default: return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) } @@ -147,13 +209,16 @@ func ToFloat64E(i interface{}) (float64, error) { func ToFloat32E(i interface{}) (float32, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return float32(intv), nil + } + switch s := i.(type) { case float64: return float32(s), nil case float32: return s, nil - case int: - return float32(s), nil case int64: return float32(s), nil case int32: @@ -178,11 +243,21 @@ func ToFloat32E(i interface{}) (float32, error) { return float32(v), nil } return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) + case float64EProvider: + v, err := s.Float64() + if err == nil { + return float32(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) + case float64Provider: + return float32(s.Float64()), nil case bool: if s { return 1, nil } return 0, nil + case nil: + return 0, nil default: return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) } @@ -192,9 +267,12 @@ func ToFloat32E(i interface{}) (float32, error) { func ToInt64E(i interface{}) (int64, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return int64(intv), nil + } + switch s := i.(type) { - case int: - return int64(s), nil case int64: return s, nil case int32: @@ -218,11 +296,13 @@ func ToInt64E(i interface{}) (int64, error) { case float32: return int64(s), nil case string: - v, err := strconv.ParseInt(s, 0, 0) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { return v, nil } return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) + case json.Number: + return ToInt64E(string(s)) case bool: if s { return 1, nil @@ -239,9 +319,12 @@ func ToInt64E(i interface{}) (int64, error) { func ToInt32E(i interface{}) (int32, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return int32(intv), nil + } + switch s := i.(type) { - case int: - return int32(s), nil case int64: return int32(s), nil case int32: @@ -265,11 +348,13 @@ func ToInt32E(i interface{}) (int32, error) { case float32: return int32(s), nil case string: - v, err := strconv.ParseInt(s, 0, 0) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { return int32(v), nil } return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i) + case json.Number: + return ToInt32E(string(s)) case bool: if s { return 1, nil @@ -286,9 +371,12 @@ func ToInt32E(i interface{}) (int32, error) { func ToInt16E(i interface{}) (int16, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return int16(intv), nil + } + switch s := i.(type) { - case int: - return int16(s), nil case int64: return int16(s), nil case int32: @@ -312,11 +400,13 @@ func ToInt16E(i interface{}) (int16, error) { case float32: return int16(s), nil case string: - v, err := strconv.ParseInt(s, 0, 0) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { return int16(v), nil } return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i) + case json.Number: + return ToInt16E(string(s)) case bool: if s { return 1, nil @@ -333,9 +423,12 @@ func ToInt16E(i interface{}) (int16, error) { func ToInt8E(i interface{}) (int8, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return int8(intv), nil + } + switch s := i.(type) { - case int: - return int8(s), nil case int64: return int8(s), nil case int32: @@ -359,11 +452,13 @@ func ToInt8E(i interface{}) (int8, error) { case float32: return int8(s), nil case string: - v, err := strconv.ParseInt(s, 0, 0) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { return int8(v), nil } return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i) + case json.Number: + return ToInt8E(string(s)) case bool: if s { return 1, nil @@ -380,9 +475,12 @@ func ToInt8E(i interface{}) (int8, error) { func ToIntE(i interface{}) (int, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + return intv, nil + } + switch s := i.(type) { - case int: - return s, nil case int64: return int(s), nil case int32: @@ -406,11 +504,13 @@ func ToIntE(i interface{}) (int, error) { case float32: return int(s), nil case string: - v, err := strconv.ParseInt(s, 0, 0) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { return int(v), nil } - return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i) + return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) + case json.Number: + return ToIntE(string(s)) case bool: if s { return 1, nil @@ -427,18 +527,26 @@ func ToIntE(i interface{}) (int, error) { func ToUintE(i interface{}) (uint, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint(intv), nil + } + switch s := i.(type) { case string: - v, err := strconv.ParseUint(s, 0, 0) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } return uint(v), nil } - return 0, fmt.Errorf("unable to cast %#v to uint: %s", i, err) - case int: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil + return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i) + case json.Number: + return ToUintE(string(s)) case int64: if s < 0 { return 0, errNegativeNotAllowed @@ -495,18 +603,26 @@ func ToUintE(i interface{}) (uint, error) { func ToUint64E(i interface{}) (uint64, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint64(intv), nil + } + switch s := i.(type) { case string: - v, err := strconv.ParseUint(s, 0, 64) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { - return v, nil - } - return 0, fmt.Errorf("unable to cast %#v to uint64: %s", i, err) - case int: - if s < 0 { - return 0, errNegativeNotAllowed + if v < 0 { + return 0, errNegativeNotAllowed + } + return uint64(v), nil } - return uint64(s), nil + return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) + case json.Number: + return ToUint64E(string(s)) case int64: if s < 0 { return 0, errNegativeNotAllowed @@ -563,18 +679,26 @@ func ToUint64E(i interface{}) (uint64, error) { func ToUint32E(i interface{}) (uint32, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint32(intv), nil + } + switch s := i.(type) { case string: - v, err := strconv.ParseUint(s, 0, 32) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } return uint32(v), nil } - return 0, fmt.Errorf("unable to cast %#v to uint32: %s", i, err) - case int: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil + return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i) + case json.Number: + return ToUint32E(string(s)) case int64: if s < 0 { return 0, errNegativeNotAllowed @@ -631,18 +755,26 @@ func ToUint32E(i interface{}) (uint32, error) { func ToUint16E(i interface{}) (uint16, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint16(intv), nil + } + switch s := i.(type) { case string: - v, err := strconv.ParseUint(s, 0, 16) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } return uint16(v), nil } - return 0, fmt.Errorf("unable to cast %#v to uint16: %s", i, err) - case int: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil + return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i) + case json.Number: + return ToUint16E(string(s)) case int64: if s < 0 { return 0, errNegativeNotAllowed @@ -699,18 +831,26 @@ func ToUint16E(i interface{}) (uint16, error) { func ToUint8E(i interface{}) (uint8, error) { i = indirect(i) + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint8(intv), nil + } + switch s := i.(type) { case string: - v, err := strconv.ParseUint(s, 0, 8) + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } return uint8(v), nil } - return 0, fmt.Errorf("unable to cast %#v to uint8: %s", i, err) - case int: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil + return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i) + case json.Number: + return ToUint8E(string(s)) case int64: if s < 0 { return 0, errNegativeNotAllowed @@ -792,8 +932,8 @@ func indirectToStringerOrError(a interface{}) interface{} { return nil } - var errorType = reflect.TypeOf((*error)(nil)).Elem() - var fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() + errorType := reflect.TypeOf((*error)(nil)).Elem() + fmtStringerType := reflect.TypeOf((*fmt.Stringer)(nil)).Elem() v := reflect.ValueOf(a) for !v.Type().Implements(fmtStringerType) && !v.Type().Implements(errorType) && v.Kind() == reflect.Ptr && !v.IsNil() { @@ -835,6 +975,8 @@ func ToStringE(i interface{}) (string, error) { return strconv.FormatUint(uint64(s), 10), nil case uint8: return strconv.FormatUint(uint64(s), 10), nil + case json.Number: + return s.String(), nil case []byte: return string(s), nil case template.HTML: @@ -860,7 +1002,7 @@ func ToStringE(i interface{}) (string, error) { // ToStringMapStringE casts an interface to a map[string]string type. func ToStringMapStringE(i interface{}) (map[string]string, error) { - var m = map[string]string{} + m := map[string]string{} switch v := i.(type) { case map[string]string: @@ -890,7 +1032,7 @@ func ToStringMapStringE(i interface{}) (map[string]string, error) { // ToStringMapStringSliceE casts an interface to a map[string][]string type. func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) { - var m = map[string][]string{} + m := map[string][]string{} switch v := i.(type) { case map[string][]string: @@ -954,7 +1096,7 @@ func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) { // ToStringMapBoolE casts an interface to a map[string]bool type. func ToStringMapBoolE(i interface{}) (map[string]bool, error) { - var m = map[string]bool{} + m := map[string]bool{} switch v := i.(type) { case map[interface{}]interface{}: @@ -979,7 +1121,7 @@ func ToStringMapBoolE(i interface{}) (map[string]bool, error) { // ToStringMapE casts an interface to a map[string]interface{} type. func ToStringMapE(i interface{}) (map[string]interface{}, error) { - var m = map[string]interface{}{} + m := map[string]interface{}{} switch v := i.(type) { case map[interface{}]interface{}: @@ -999,7 +1141,7 @@ func ToStringMapE(i interface{}) (map[string]interface{}, error) { // ToStringMapIntE casts an interface to a map[string]int{} type. func ToStringMapIntE(i interface{}) (map[string]int, error) { - var m = map[string]int{} + m := map[string]int{} if i == nil { return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) } @@ -1040,7 +1182,7 @@ func ToStringMapIntE(i interface{}) (map[string]int, error) { // ToStringMapInt64E casts an interface to a map[string]int64{} type. func ToStringMapInt64E(i interface{}) (map[string]int64, error) { - var m = map[string]int64{} + m := map[string]int64{} if i == nil { return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) } @@ -1277,37 +1419,35 @@ func (f timeFormat) hasTimezone() bool { return f.typ >= timeFormatNumericTimezone && f.typ <= timeFormatNumericAndNamedTimezone } -var ( - timeFormats = []timeFormat{ - timeFormat{time.RFC3339, timeFormatNumericTimezone}, - timeFormat{"2006-01-02T15:04:05", timeFormatNoTimezone}, // iso8601 without timezone - timeFormat{time.RFC1123Z, timeFormatNumericTimezone}, - timeFormat{time.RFC1123, timeFormatNamedTimezone}, - timeFormat{time.RFC822Z, timeFormatNumericTimezone}, - timeFormat{time.RFC822, timeFormatNamedTimezone}, - timeFormat{time.RFC850, timeFormatNamedTimezone}, - timeFormat{"2006-01-02 15:04:05.999999999 -0700 MST", timeFormatNumericAndNamedTimezone}, // Time.String() - timeFormat{"2006-01-02T15:04:05-0700", timeFormatNumericTimezone}, // RFC3339 without timezone hh:mm colon - timeFormat{"2006-01-02 15:04:05Z0700", timeFormatNumericTimezone}, // RFC3339 without T or timezone hh:mm colon - timeFormat{"2006-01-02 15:04:05", timeFormatNoTimezone}, - timeFormat{time.ANSIC, timeFormatNoTimezone}, - timeFormat{time.UnixDate, timeFormatNamedTimezone}, - timeFormat{time.RubyDate, timeFormatNumericTimezone}, - timeFormat{"2006-01-02 15:04:05Z07:00", timeFormatNumericTimezone}, - timeFormat{"2006-01-02", timeFormatNoTimezone}, - timeFormat{"02 Jan 2006", timeFormatNoTimezone}, - timeFormat{"2006-01-02 15:04:05 -07:00", timeFormatNumericTimezone}, - timeFormat{"2006-01-02 15:04:05 -0700", timeFormatNumericTimezone}, - timeFormat{time.Kitchen, timeFormatTimeOnly}, - timeFormat{time.Stamp, timeFormatTimeOnly}, - timeFormat{time.StampMilli, timeFormatTimeOnly}, - timeFormat{time.StampMicro, timeFormatTimeOnly}, - timeFormat{time.StampNano, timeFormatTimeOnly}, - } -) +var timeFormats = []timeFormat{ + // Keep common formats at the top. + {"2006-01-02", timeFormatNoTimezone}, + {time.RFC3339, timeFormatNumericTimezone}, + {"2006-01-02T15:04:05", timeFormatNoTimezone}, // iso8601 without timezone + {time.RFC1123Z, timeFormatNumericTimezone}, + {time.RFC1123, timeFormatNamedTimezone}, + {time.RFC822Z, timeFormatNumericTimezone}, + {time.RFC822, timeFormatNamedTimezone}, + {time.RFC850, timeFormatNamedTimezone}, + {"2006-01-02 15:04:05.999999999 -0700 MST", timeFormatNumericAndNamedTimezone}, // Time.String() + {"2006-01-02T15:04:05-0700", timeFormatNumericTimezone}, // RFC3339 without timezone hh:mm colon + {"2006-01-02 15:04:05Z0700", timeFormatNumericTimezone}, // RFC3339 without T or timezone hh:mm colon + {"2006-01-02 15:04:05", timeFormatNoTimezone}, + {time.ANSIC, timeFormatNoTimezone}, + {time.UnixDate, timeFormatNamedTimezone}, + {time.RubyDate, timeFormatNumericTimezone}, + {"2006-01-02 15:04:05Z07:00", timeFormatNumericTimezone}, + {"02 Jan 2006", timeFormatNoTimezone}, + {"2006-01-02 15:04:05 -07:00", timeFormatNumericTimezone}, + {"2006-01-02 15:04:05 -0700", timeFormatNumericTimezone}, + {time.Kitchen, timeFormatTimeOnly}, + {time.Stamp, timeFormatTimeOnly}, + {time.StampMilli, timeFormatTimeOnly}, + {time.StampMicro, timeFormatTimeOnly}, + {time.StampNano, timeFormatTimeOnly}, +} func parseDateWith(s string, location *time.Location, formats []timeFormat) (d time.Time, e error) { - for _, format := range formats { if d, e = time.Parse(format.format, s); e == nil { @@ -1335,3 +1475,36 @@ func jsonStringToObject(s string, v interface{}) error { data := []byte(s) return json.Unmarshal(data, v) } + +// toInt returns the int value of v if v or v's underlying type +// is an int. +// Note that this will return false for int64 etc. types. +func toInt(v interface{}) (int, bool) { + switch v := v.(type) { + case int: + return v, true + case time.Weekday: + return int(v), true + case time.Month: + return int(v), true + default: + return 0, false + } +} + +func trimZeroDecimal(s string) string { + var foundZero bool + for i := len(s); i > 0; i-- { + switch s[i-1] { + case '.': + if foundZero { + return s[:i-1] + } + case '0': + foundZero = true + default: + return s + } + } + return s +} diff --git a/vendor/github.com/xeipuuv/gojsonpointer/LICENSE-APACHE-2.0.txt b/vendor/github.com/xeipuuv/gojsonpointer/LICENSE-APACHE-2.0.txt new file mode 100644 index 000000000..55ede8a42 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonpointer/LICENSE-APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/xeipuuv/gojsonpointer/README.md b/vendor/github.com/xeipuuv/gojsonpointer/README.md new file mode 100644 index 000000000..a4f5f1458 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonpointer/README.md @@ -0,0 +1,41 @@ +# gojsonpointer +An implementation of JSON Pointer - Go language + +## Usage + jsonText := `{ + "name": "Bobby B", + "occupation": { + "title" : "King", + "years" : 15, + "heir" : "Joffrey B" + } + }` + + var jsonDocument map[string]interface{} + json.Unmarshal([]byte(jsonText), &jsonDocument) + + //create a JSON pointer + pointerString := "/occupation/title" + pointer, _ := NewJsonPointer(pointerString) + + //SET a new value for the "title" in the document + pointer.Set(jsonDocument, "Supreme Leader of Westeros") + + //GET the new "title" from the document + title, _, _ := pointer.Get(jsonDocument) + fmt.Println(title) //outputs "Supreme Leader of Westeros" + + //DELETE the "heir" from the document + deletePointer := NewJsonPointer("/occupation/heir") + deletePointer.Delete(jsonDocument) + + b, _ := json.Marshal(jsonDocument) + fmt.Println(string(b)) + //outputs `{"name":"Bobby B","occupation":{"title":"Supreme Leader of Westeros","years":15}}` + + +## References +https://tools.ietf.org/html/rfc6901 + +### Note +The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. diff --git a/vendor/github.com/xeipuuv/gojsonpointer/pointer.go b/vendor/github.com/xeipuuv/gojsonpointer/pointer.go new file mode 100644 index 000000000..798c1f1c5 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonpointer/pointer.go @@ -0,0 +1,211 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonpointer +// repository-desc An implementation of JSON Pointer - Go language +// +// description Main and unique file. +// +// created 25-02-2013 + +package gojsonpointer + +import ( + "errors" + "fmt" + "reflect" + "strconv" + "strings" +) + +const ( + const_empty_pointer = `` + const_pointer_separator = `/` + + const_invalid_start = `JSON pointer must be empty or start with a "` + const_pointer_separator + `"` +) + +type implStruct struct { + mode string // "SET" or "GET" + + inDocument interface{} + + setInValue interface{} + + getOutNode interface{} + getOutKind reflect.Kind + outError error +} + +type JsonPointer struct { + referenceTokens []string +} + +// NewJsonPointer parses the given string JSON pointer and returns an object +func NewJsonPointer(jsonPointerString string) (p JsonPointer, err error) { + + // Pointer to the root of the document + if len(jsonPointerString) == 0 { + // Keep referenceTokens nil + return + } + if jsonPointerString[0] != '/' { + return p, errors.New(const_invalid_start) + } + + p.referenceTokens = strings.Split(jsonPointerString[1:], const_pointer_separator) + return +} + +// Uses the pointer to retrieve a value from a JSON document +func (p *JsonPointer) Get(document interface{}) (interface{}, reflect.Kind, error) { + + is := &implStruct{mode: "GET", inDocument: document} + p.implementation(is) + return is.getOutNode, is.getOutKind, is.outError + +} + +// Uses the pointer to update a value from a JSON document +func (p *JsonPointer) Set(document interface{}, value interface{}) (interface{}, error) { + + is := &implStruct{mode: "SET", inDocument: document, setInValue: value} + p.implementation(is) + return document, is.outError + +} + +// Uses the pointer to delete a value from a JSON document +func (p *JsonPointer) Delete(document interface{}) (interface{}, error) { + is := &implStruct{mode: "DEL", inDocument: document} + p.implementation(is) + return document, is.outError +} + +// Both Get and Set functions use the same implementation to avoid code duplication +func (p *JsonPointer) implementation(i *implStruct) { + + kind := reflect.Invalid + + // Full document when empty + if len(p.referenceTokens) == 0 { + i.getOutNode = i.inDocument + i.outError = nil + i.getOutKind = kind + i.outError = nil + return + } + + node := i.inDocument + + previousNodes := make([]interface{}, len(p.referenceTokens)) + previousTokens := make([]string, len(p.referenceTokens)) + + for ti, token := range p.referenceTokens { + + isLastToken := ti == len(p.referenceTokens)-1 + previousNodes[ti] = node + previousTokens[ti] = token + + switch v := node.(type) { + + case map[string]interface{}: + decodedToken := decodeReferenceToken(token) + if _, ok := v[decodedToken]; ok { + node = v[decodedToken] + if isLastToken && i.mode == "SET" { + v[decodedToken] = i.setInValue + } else if isLastToken && i.mode == "DEL" { + delete(v, decodedToken) + } + } else if isLastToken && i.mode == "SET" { + v[decodedToken] = i.setInValue + } else { + i.outError = fmt.Errorf("Object has no key '%s'", decodedToken) + i.getOutKind = reflect.Map + i.getOutNode = nil + return + } + + case []interface{}: + tokenIndex, err := strconv.Atoi(token) + if err != nil { + i.outError = fmt.Errorf("Invalid array index '%s'", token) + i.getOutKind = reflect.Slice + i.getOutNode = nil + return + } + if tokenIndex < 0 || tokenIndex >= len(v) { + i.outError = fmt.Errorf("Out of bound array[0,%d] index '%d'", len(v), tokenIndex) + i.getOutKind = reflect.Slice + i.getOutNode = nil + return + } + + node = v[tokenIndex] + if isLastToken && i.mode == "SET" { + v[tokenIndex] = i.setInValue + } else if isLastToken && i.mode == "DEL" { + v[tokenIndex] = v[len(v)-1] + v[len(v)-1] = nil + v = v[:len(v)-1] + previousNodes[ti-1].(map[string]interface{})[previousTokens[ti-1]] = v + } + + default: + i.outError = fmt.Errorf("Invalid token reference '%s'", token) + i.getOutKind = reflect.ValueOf(node).Kind() + i.getOutNode = nil + return + } + + } + + i.getOutNode = node + i.getOutKind = reflect.ValueOf(node).Kind() + i.outError = nil +} + +// Pointer to string representation function +func (p *JsonPointer) String() string { + + if len(p.referenceTokens) == 0 { + return const_empty_pointer + } + + pointerString := const_pointer_separator + strings.Join(p.referenceTokens, const_pointer_separator) + + return pointerString +} + +// Specific JSON pointer encoding here +// ~0 => ~ +// ~1 => / +// ... and vice versa + +func decodeReferenceToken(token string) string { + step1 := strings.Replace(token, `~1`, `/`, -1) + step2 := strings.Replace(step1, `~0`, `~`, -1) + return step2 +} + +func encodeReferenceToken(token string) string { + step1 := strings.Replace(token, `~`, `~0`, -1) + step2 := strings.Replace(step1, `/`, `~1`, -1) + return step2 +} diff --git a/vendor/github.com/xeipuuv/gojsonreference/LICENSE-APACHE-2.0.txt b/vendor/github.com/xeipuuv/gojsonreference/LICENSE-APACHE-2.0.txt new file mode 100644 index 000000000..55ede8a42 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonreference/LICENSE-APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/xeipuuv/gojsonreference/README.md b/vendor/github.com/xeipuuv/gojsonreference/README.md new file mode 100644 index 000000000..9ab6e1eb1 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonreference/README.md @@ -0,0 +1,10 @@ +# gojsonreference +An implementation of JSON Reference - Go language + +## Dependencies +https://github.com/xeipuuv/gojsonpointer + +## References +http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 + +http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 diff --git a/vendor/github.com/xeipuuv/gojsonreference/reference.go b/vendor/github.com/xeipuuv/gojsonreference/reference.go new file mode 100644 index 000000000..645729130 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonreference/reference.go @@ -0,0 +1,147 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonreference +// repository-desc An implementation of JSON Reference - Go language +// +// description Main and unique file. +// +// created 26-02-2013 + +package gojsonreference + +import ( + "errors" + "net/url" + "path/filepath" + "runtime" + "strings" + + "github.com/xeipuuv/gojsonpointer" +) + +const ( + const_fragment_char = `#` +) + +func NewJsonReference(jsonReferenceString string) (JsonReference, error) { + + var r JsonReference + err := r.parse(jsonReferenceString) + return r, err + +} + +type JsonReference struct { + referenceUrl *url.URL + referencePointer gojsonpointer.JsonPointer + + HasFullUrl bool + HasUrlPathOnly bool + HasFragmentOnly bool + HasFileScheme bool + HasFullFilePath bool +} + +func (r *JsonReference) GetUrl() *url.URL { + return r.referenceUrl +} + +func (r *JsonReference) GetPointer() *gojsonpointer.JsonPointer { + return &r.referencePointer +} + +func (r *JsonReference) String() string { + + if r.referenceUrl != nil { + return r.referenceUrl.String() + } + + if r.HasFragmentOnly { + return const_fragment_char + r.referencePointer.String() + } + + return r.referencePointer.String() +} + +func (r *JsonReference) IsCanonical() bool { + return (r.HasFileScheme && r.HasFullFilePath) || (!r.HasFileScheme && r.HasFullUrl) +} + +// "Constructor", parses the given string JSON reference +func (r *JsonReference) parse(jsonReferenceString string) (err error) { + + r.referenceUrl, err = url.Parse(jsonReferenceString) + if err != nil { + return + } + refUrl := r.referenceUrl + + if refUrl.Scheme != "" && refUrl.Host != "" { + r.HasFullUrl = true + } else { + if refUrl.Path != "" { + r.HasUrlPathOnly = true + } else if refUrl.RawQuery == "" && refUrl.Fragment != "" { + r.HasFragmentOnly = true + } + } + + r.HasFileScheme = refUrl.Scheme == "file" + if runtime.GOOS == "windows" { + // on Windows, a file URL may have an extra leading slash, and if it + // doesn't then its first component will be treated as the host by the + // Go runtime + if refUrl.Host == "" && strings.HasPrefix(refUrl.Path, "/") { + r.HasFullFilePath = filepath.IsAbs(refUrl.Path[1:]) + } else { + r.HasFullFilePath = filepath.IsAbs(refUrl.Host + refUrl.Path) + } + } else { + r.HasFullFilePath = filepath.IsAbs(refUrl.Path) + } + + // invalid json-pointer error means url has no json-pointer fragment. simply ignore error + r.referencePointer, _ = gojsonpointer.NewJsonPointer(refUrl.Fragment) + + return +} + +// Creates a new reference from a parent and a child +// If the child cannot inherit from the parent, an error is returned +func (r *JsonReference) Inherits(child JsonReference) (*JsonReference, error) { + if child.GetUrl() == nil { + return nil, errors.New("childUrl is nil!") + } + + if r.GetUrl() == nil { + return nil, errors.New("parentUrl is nil!") + } + + // Get a copy of the parent url to make sure we do not modify the original. + // URL reference resolving fails if the fragment of the child is empty, but the parent's is not. + // The fragment of the child must be used, so the fragment of the parent is manually removed. + parentUrl := *r.GetUrl() + parentUrl.Fragment = "" + + ref, err := NewJsonReference(parentUrl.ResolveReference(child.GetUrl()).String()) + if err != nil { + return nil, err + } + return &ref, err +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/.gitignore b/vendor/github.com/xeipuuv/gojsonschema/.gitignore new file mode 100644 index 000000000..68e993ce3 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/.gitignore @@ -0,0 +1,3 @@ +*.sw[nop] +*.iml +.vscode/ diff --git a/vendor/github.com/xeipuuv/gojsonschema/.travis.yml b/vendor/github.com/xeipuuv/gojsonschema/.travis.yml new file mode 100644 index 000000000..3289001cd --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/.travis.yml @@ -0,0 +1,9 @@ +language: go +go: + - "1.11" + - "1.12" + - "1.13" +before_install: + - go get github.com/xeipuuv/gojsonreference + - go get github.com/xeipuuv/gojsonpointer + - go get github.com/stretchr/testify/assert diff --git a/vendor/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt b/vendor/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt new file mode 100644 index 000000000..55ede8a42 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/xeipuuv/gojsonschema/README.md b/vendor/github.com/xeipuuv/gojsonschema/README.md new file mode 100644 index 000000000..758f26df0 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/README.md @@ -0,0 +1,466 @@ +[![GoDoc](https://godoc.org/github.com/xeipuuv/gojsonschema?status.svg)](https://godoc.org/github.com/xeipuuv/gojsonschema) +[![Build Status](https://travis-ci.org/xeipuuv/gojsonschema.svg)](https://travis-ci.org/xeipuuv/gojsonschema) +[![Go Report Card](https://goreportcard.com/badge/github.com/xeipuuv/gojsonschema)](https://goreportcard.com/report/github.com/xeipuuv/gojsonschema) + +# gojsonschema + +## Description + +An implementation of JSON Schema for the Go programming language. Supports draft-04, draft-06 and draft-07. + +References : + +* http://json-schema.org +* http://json-schema.org/latest/json-schema-core.html +* http://json-schema.org/latest/json-schema-validation.html + +## Installation + +``` +go get github.com/xeipuuv/gojsonschema +``` + +Dependencies : +* [github.com/xeipuuv/gojsonpointer](https://github.com/xeipuuv/gojsonpointer) +* [github.com/xeipuuv/gojsonreference](https://github.com/xeipuuv/gojsonreference) +* [github.com/stretchr/testify/assert](https://github.com/stretchr/testify#assert-package) + +## Usage + +### Example + +```go + +package main + +import ( + "fmt" + "github.com/xeipuuv/gojsonschema" +) + +func main() { + + schemaLoader := gojsonschema.NewReferenceLoader("file:///home/me/schema.json") + documentLoader := gojsonschema.NewReferenceLoader("file:///home/me/document.json") + + result, err := gojsonschema.Validate(schemaLoader, documentLoader) + if err != nil { + panic(err.Error()) + } + + if result.Valid() { + fmt.Printf("The document is valid\n") + } else { + fmt.Printf("The document is not valid. see errors :\n") + for _, desc := range result.Errors() { + fmt.Printf("- %s\n", desc) + } + } +} + + +``` + +#### Loaders + +There are various ways to load your JSON data. +In order to load your schemas and documents, +first declare an appropriate loader : + +* Web / HTTP, using a reference : + +```go +loader := gojsonschema.NewReferenceLoader("http://www.some_host.com/schema.json") +``` + +* Local file, using a reference : + +```go +loader := gojsonschema.NewReferenceLoader("file:///home/me/schema.json") +``` + +References use the URI scheme, the prefix (file://) and a full path to the file are required. + +* JSON strings : + +```go +loader := gojsonschema.NewStringLoader(`{"type": "string"}`) +``` + +* Custom Go types : + +```go +m := map[string]interface{}{"type": "string"} +loader := gojsonschema.NewGoLoader(m) +``` + +And + +```go +type Root struct { + Users []User `json:"users"` +} + +type User struct { + Name string `json:"name"` +} + +... + +data := Root{} +data.Users = append(data.Users, User{"John"}) +data.Users = append(data.Users, User{"Sophia"}) +data.Users = append(data.Users, User{"Bill"}) + +loader := gojsonschema.NewGoLoader(data) +``` + +#### Validation + +Once the loaders are set, validation is easy : + +```go +result, err := gojsonschema.Validate(schemaLoader, documentLoader) +``` + +Alternatively, you might want to load a schema only once and process to multiple validations : + +```go +schema, err := gojsonschema.NewSchema(schemaLoader) +... +result1, err := schema.Validate(documentLoader1) +... +result2, err := schema.Validate(documentLoader2) +... +// etc ... +``` + +To check the result : + +```go + if result.Valid() { + fmt.Printf("The document is valid\n") + } else { + fmt.Printf("The document is not valid. see errors :\n") + for _, err := range result.Errors() { + // Err implements the ResultError interface + fmt.Printf("- %s\n", err) + } + } +``` + + +## Loading local schemas + +By default `file` and `http(s)` references to external schemas are loaded automatically via the file system or via http(s). An external schema can also be loaded using a `SchemaLoader`. + +```go + sl := gojsonschema.NewSchemaLoader() + loader1 := gojsonschema.NewStringLoader(`{ "type" : "string" }`) + err := sl.AddSchema("http://some_host.com/string.json", loader1) +``` + +Alternatively if your schema already has an `$id` you can use the `AddSchemas` function +```go + loader2 := gojsonschema.NewStringLoader(`{ + "$id" : "http://some_host.com/maxlength.json", + "maxLength" : 5 + }`) + err = sl.AddSchemas(loader2) +``` + +The main schema should be passed to the `Compile` function. This main schema can then directly reference the added schemas without needing to download them. +```go + loader3 := gojsonschema.NewStringLoader(`{ + "$id" : "http://some_host.com/main.json", + "allOf" : [ + { "$ref" : "http://some_host.com/string.json" }, + { "$ref" : "http://some_host.com/maxlength.json" } + ] + }`) + + schema, err := sl.Compile(loader3) + + documentLoader := gojsonschema.NewStringLoader(`"hello world"`) + + result, err := schema.Validate(documentLoader) +``` + +It's also possible to pass a `ReferenceLoader` to the `Compile` function that references a loaded schema. + +```go +err = sl.AddSchemas(loader3) +schema, err := sl.Compile(gojsonschema.NewReferenceLoader("http://some_host.com/main.json")) +``` + +Schemas added by `AddSchema` and `AddSchemas` are only validated when the entire schema is compiled, unless meta-schema validation is used. + +## Using a specific draft +By default `gojsonschema` will try to detect the draft of a schema by using the `$schema` keyword and parse it in a strict draft-04, draft-06 or draft-07 mode. If `$schema` is missing, or the draft version is not explicitely set, a hybrid mode is used which merges together functionality of all drafts into one mode. + +Autodectection can be turned off with the `AutoDetect` property. Specific draft versions can be specified with the `Draft` property. + +```go +sl := gojsonschema.NewSchemaLoader() +sl.Draft = gojsonschema.Draft7 +sl.AutoDetect = false +``` + +If autodetection is on (default), a draft-07 schema can savely reference draft-04 schemas and vice-versa, as long as `$schema` is specified in all schemas. + +## Meta-schema validation +Schemas that are added using the `AddSchema`, `AddSchemas` and `Compile` can be validated against their meta-schema by setting the `Validate` property. + +The following example will produce an error as `multipleOf` must be a number. If `Validate` is off (default), this error is only returned at the `Compile` step. + +```go +sl := gojsonschema.NewSchemaLoader() +sl.Validate = true +err := sl.AddSchemas(gojsonschema.NewStringLoader(`{ + $id" : "http://some_host.com/invalid.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "multipleOf" : true +}`)) + ``` +``` + ``` + +Errors returned by meta-schema validation are more readable and contain more information, which helps significantly if you are developing a schema. + +Meta-schema validation also works with a custom `$schema`. In case `$schema` is missing, or `AutoDetect` is set to `false`, the meta-schema of the used draft is used. + + +## Working with Errors + +The library handles string error codes which you can customize by creating your own gojsonschema.locale and setting it +```go +gojsonschema.Locale = YourCustomLocale{} +``` + +However, each error contains additional contextual information. + +Newer versions of `gojsonschema` may have new additional errors, so code that uses a custom locale will need to be updated when this happens. + +**err.Type()**: *string* Returns the "type" of error that occurred. Note you can also type check. See below + +Note: An error of RequiredType has an err.Type() return value of "required" + + "required": RequiredError + "invalid_type": InvalidTypeError + "number_any_of": NumberAnyOfError + "number_one_of": NumberOneOfError + "number_all_of": NumberAllOfError + "number_not": NumberNotError + "missing_dependency": MissingDependencyError + "internal": InternalError + "const": ConstEror + "enum": EnumError + "array_no_additional_items": ArrayNoAdditionalItemsError + "array_min_items": ArrayMinItemsError + "array_max_items": ArrayMaxItemsError + "unique": ItemsMustBeUniqueError + "contains" : ArrayContainsError + "array_min_properties": ArrayMinPropertiesError + "array_max_properties": ArrayMaxPropertiesError + "additional_property_not_allowed": AdditionalPropertyNotAllowedError + "invalid_property_pattern": InvalidPropertyPatternError + "invalid_property_name": InvalidPropertyNameError + "string_gte": StringLengthGTEError + "string_lte": StringLengthLTEError + "pattern": DoesNotMatchPatternError + "multiple_of": MultipleOfError + "number_gte": NumberGTEError + "number_gt": NumberGTError + "number_lte": NumberLTEError + "number_lt": NumberLTError + "condition_then" : ConditionThenError + "condition_else" : ConditionElseError + +**err.Value()**: *interface{}* Returns the value given + +**err.Context()**: *gojsonschema.JsonContext* Returns the context. This has a String() method that will print something like this: (root).firstName + +**err.Field()**: *string* Returns the fieldname in the format firstName, or for embedded properties, person.firstName. This returns the same as the String() method on *err.Context()* but removes the (root). prefix. + +**err.Description()**: *string* The error description. This is based on the locale you are using. See the beginning of this section for overwriting the locale with a custom implementation. + +**err.DescriptionFormat()**: *string* The error description format. This is relevant if you are adding custom validation errors afterwards to the result. + +**err.Details()**: *gojsonschema.ErrorDetails* Returns a map[string]interface{} of additional error details specific to the error. For example, GTE errors will have a "min" value, LTE will have a "max" value. See errors.go for a full description of all the error details. Every error always contains a "field" key that holds the value of *err.Field()* + +Note in most cases, the err.Details() will be used to generate replacement strings in your locales, and not used directly. These strings follow the text/template format i.e. +``` +{{.field}} must be greater than or equal to {{.min}} +``` + +The library allows you to specify custom template functions, should you require more complex error message handling. +```go +gojsonschema.ErrorTemplateFuncs = map[string]interface{}{ + "allcaps": func(s string) string { + return strings.ToUpper(s) + }, +} +``` + +Given the above definition, you can use the custom function `"allcaps"` in your localization templates: +``` +{{allcaps .field}} must be greater than or equal to {{.min}} +``` + +The above error message would then be rendered with the `field` value in capital letters. For example: +``` +"PASSWORD must be greater than or equal to 8" +``` + +Learn more about what types of template functions you can use in `ErrorTemplateFuncs` by referring to Go's [text/template FuncMap](https://golang.org/pkg/text/template/#FuncMap) type. + +## Formats +JSON Schema allows for optional "format" property to validate instances against well-known formats. gojsonschema ships with all of the formats defined in the spec that you can use like this: + +````json +{"type": "string", "format": "email"} +```` + +Not all formats defined in draft-07 are available. Implemented formats are: + +* `date` +* `time` +* `date-time` +* `hostname`. Subdomains that start with a number are also supported, but this means that it doesn't strictly follow [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5) and has the implication that ipv4 addresses are also recognized as valid hostnames. +* `email`. Go's email parser deviates slightly from [RFC5322](https://tools.ietf.org/html/rfc5322). Includes unicode support. +* `idn-email`. Same caveat as `email`. +* `ipv4` +* `ipv6` +* `uri`. Includes unicode support. +* `uri-reference`. Includes unicode support. +* `iri` +* `iri-reference` +* `uri-template` +* `uuid` +* `regex`. Go uses the [RE2](https://github.com/google/re2/wiki/Syntax) engine and is not [ECMA262](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf) compatible. +* `json-pointer` +* `relative-json-pointer` + +`email`, `uri` and `uri-reference` use the same validation code as their unicode counterparts `idn-email`, `iri` and `iri-reference`. If you rely on unicode support you should use the specific +unicode enabled formats for the sake of interoperability as other implementations might not support unicode in the regular formats. + +The validation code for `uri`, `idn-email` and their relatives use mostly standard library code. + +For repetitive or more complex formats, you can create custom format checkers and add them to gojsonschema like this: + +```go +// Define the format checker +type RoleFormatChecker struct {} + +// Ensure it meets the gojsonschema.FormatChecker interface +func (f RoleFormatChecker) IsFormat(input interface{}) bool { + + asString, ok := input.(string) + if ok == false { + return false + } + + return strings.HasPrefix("ROLE_", asString) +} + +// Add it to the library +gojsonschema.FormatCheckers.Add("role", RoleFormatChecker{}) +```` + +Now to use in your json schema: +````json +{"type": "string", "format": "role"} +```` + +Another example would be to check if the provided integer matches an id on database: + +JSON schema: +```json +{"type": "integer", "format": "ValidUserId"} +``` + +```go +// Define the format checker +type ValidUserIdFormatChecker struct {} + +// Ensure it meets the gojsonschema.FormatChecker interface +func (f ValidUserIdFormatChecker) IsFormat(input interface{}) bool { + + asFloat64, ok := input.(float64) // Numbers are always float64 here + if ok == false { + return false + } + + // XXX + // do the magic on the database looking for the int(asFloat64) + + return true +} + +// Add it to the library +gojsonschema.FormatCheckers.Add("ValidUserId", ValidUserIdFormatChecker{}) +```` + +Formats can also be removed, for example if you want to override one of the formats that is defined by default. + +```go +gojsonschema.FormatCheckers.Remove("hostname") +``` + + +## Additional custom validation +After the validation has run and you have the results, you may add additional +errors using `Result.AddError`. This is useful to maintain the same format within the resultset instead +of having to add special exceptions for your own errors. Below is an example. + +```go +type AnswerInvalidError struct { + gojsonschema.ResultErrorFields +} + +func newAnswerInvalidError(context *gojsonschema.JsonContext, value interface{}, details gojsonschema.ErrorDetails) *AnswerInvalidError { + err := AnswerInvalidError{} + err.SetContext(context) + err.SetType("custom_invalid_error") + // it is important to use SetDescriptionFormat() as this is used to call SetDescription() after it has been parsed + // using the description of err will be overridden by this. + err.SetDescriptionFormat("Answer to the Ultimate Question of Life, the Universe, and Everything is {{.answer}}") + err.SetValue(value) + err.SetDetails(details) + + return &err +} + +func main() { + // ... + schema, err := gojsonschema.NewSchema(schemaLoader) + result, err := gojsonschema.Validate(schemaLoader, documentLoader) + + if true { // some validation + jsonContext := gojsonschema.NewJsonContext("question", nil) + errDetail := gojsonschema.ErrorDetails{ + "answer": 42, + } + result.AddError( + newAnswerInvalidError( + gojsonschema.NewJsonContext("answer", jsonContext), + 52, + errDetail, + ), + errDetail, + ) + } + + return result, err + +} +``` + +This is especially useful if you want to add validation beyond what the +json schema drafts can provide such business specific logic. + +## Uses + +gojsonschema uses the following test suite : + +https://github.com/json-schema/JSON-Schema-Test-Suite diff --git a/vendor/github.com/xeipuuv/gojsonschema/draft.go b/vendor/github.com/xeipuuv/gojsonschema/draft.go new file mode 100644 index 000000000..61298e7aa --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/draft.go @@ -0,0 +1,125 @@ +// Copyright 2018 johandorland ( https://github.com/johandorland ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gojsonschema + +import ( + "errors" + "math" + "reflect" + + "github.com/xeipuuv/gojsonreference" +) + +// Draft is a JSON-schema draft version +type Draft int + +// Supported Draft versions +const ( + Draft4 Draft = 4 + Draft6 Draft = 6 + Draft7 Draft = 7 + Hybrid Draft = math.MaxInt32 +) + +type draftConfig struct { + Version Draft + MetaSchemaURL string + MetaSchema string +} +type draftConfigs []draftConfig + +var drafts draftConfigs + +func init() { + drafts = []draftConfig{ + { + Version: Draft4, + MetaSchemaURL: "http://json-schema.org/draft-04/schema", + MetaSchema: `{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}`, + }, + { + Version: Draft6, + MetaSchemaURL: "http://json-schema.org/draft-06/schema", + MetaSchema: `{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}`, + }, + { + Version: Draft7, + MetaSchemaURL: "http://json-schema.org/draft-07/schema", + MetaSchema: `{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}`, + }, + } +} + +func (dc draftConfigs) GetMetaSchema(url string) string { + for _, config := range dc { + if config.MetaSchemaURL == url { + return config.MetaSchema + } + } + return "" +} +func (dc draftConfigs) GetDraftVersion(url string) *Draft { + for _, config := range dc { + if config.MetaSchemaURL == url { + return &config.Version + } + } + return nil +} +func (dc draftConfigs) GetSchemaURL(draft Draft) string { + for _, config := range dc { + if config.Version == draft { + return config.MetaSchemaURL + } + } + return "" +} + +func parseSchemaURL(documentNode interface{}) (string, *Draft, error) { + + if isKind(documentNode, reflect.Bool) { + return "", nil, nil + } + + if !isKind(documentNode, reflect.Map) { + return "", nil, errors.New("schema is invalid") + } + + m := documentNode.(map[string]interface{}) + + if existsMapKey(m, KEY_SCHEMA) { + if !isKind(m[KEY_SCHEMA], reflect.String) { + return "", nil, errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{ + "key": KEY_SCHEMA, + "type": TYPE_STRING, + }, + )) + } + + schemaReference, err := gojsonreference.NewJsonReference(m[KEY_SCHEMA].(string)) + + if err != nil { + return "", nil, err + } + + schema := schemaReference.String() + + return schema, drafts.GetDraftVersion(schema), nil + } + + return "", nil, nil +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/errors.go b/vendor/github.com/xeipuuv/gojsonschema/errors.go new file mode 100644 index 000000000..e4e9814f3 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/errors.go @@ -0,0 +1,364 @@ +package gojsonschema + +import ( + "bytes" + "sync" + "text/template" +) + +var errorTemplates = errorTemplate{template.New("errors-new"), sync.RWMutex{}} + +// template.Template is not thread-safe for writing, so some locking is done +// sync.RWMutex is used for efficiently locking when new templates are created +type errorTemplate struct { + *template.Template + sync.RWMutex +} + +type ( + + // FalseError. ErrorDetails: - + FalseError struct { + ResultErrorFields + } + + // RequiredError indicates that a required field is missing + // ErrorDetails: property string + RequiredError struct { + ResultErrorFields + } + + // InvalidTypeError indicates that a field has the incorrect type + // ErrorDetails: expected, given + InvalidTypeError struct { + ResultErrorFields + } + + // NumberAnyOfError is produced in case of a failing "anyOf" validation + // ErrorDetails: - + NumberAnyOfError struct { + ResultErrorFields + } + + // NumberOneOfError is produced in case of a failing "oneOf" validation + // ErrorDetails: - + NumberOneOfError struct { + ResultErrorFields + } + + // NumberAllOfError is produced in case of a failing "allOf" validation + // ErrorDetails: - + NumberAllOfError struct { + ResultErrorFields + } + + // NumberNotError is produced if a "not" validation failed + // ErrorDetails: - + NumberNotError struct { + ResultErrorFields + } + + // MissingDependencyError is produced in case of a "missing dependency" problem + // ErrorDetails: dependency + MissingDependencyError struct { + ResultErrorFields + } + + // InternalError indicates an internal error + // ErrorDetails: error + InternalError struct { + ResultErrorFields + } + + // ConstError indicates a const error + // ErrorDetails: allowed + ConstError struct { + ResultErrorFields + } + + // EnumError indicates an enum error + // ErrorDetails: allowed + EnumError struct { + ResultErrorFields + } + + // ArrayNoAdditionalItemsError is produced if additional items were found, but not allowed + // ErrorDetails: - + ArrayNoAdditionalItemsError struct { + ResultErrorFields + } + + // ArrayMinItemsError is produced if an array contains less items than the allowed minimum + // ErrorDetails: min + ArrayMinItemsError struct { + ResultErrorFields + } + + // ArrayMaxItemsError is produced if an array contains more items than the allowed maximum + // ErrorDetails: max + ArrayMaxItemsError struct { + ResultErrorFields + } + + // ItemsMustBeUniqueError is produced if an array requires unique items, but contains non-unique items + // ErrorDetails: type, i, j + ItemsMustBeUniqueError struct { + ResultErrorFields + } + + // ArrayContainsError is produced if an array contains invalid items + // ErrorDetails: + ArrayContainsError struct { + ResultErrorFields + } + + // ArrayMinPropertiesError is produced if an object contains less properties than the allowed minimum + // ErrorDetails: min + ArrayMinPropertiesError struct { + ResultErrorFields + } + + // ArrayMaxPropertiesError is produced if an object contains more properties than the allowed maximum + // ErrorDetails: max + ArrayMaxPropertiesError struct { + ResultErrorFields + } + + // AdditionalPropertyNotAllowedError is produced if an object has additional properties, but not allowed + // ErrorDetails: property + AdditionalPropertyNotAllowedError struct { + ResultErrorFields + } + + // InvalidPropertyPatternError is produced if an pattern was found + // ErrorDetails: property, pattern + InvalidPropertyPatternError struct { + ResultErrorFields + } + + // InvalidPropertyNameError is produced if an invalid-named property was found + // ErrorDetails: property + InvalidPropertyNameError struct { + ResultErrorFields + } + + // StringLengthGTEError is produced if a string is shorter than the minimum required length + // ErrorDetails: min + StringLengthGTEError struct { + ResultErrorFields + } + + // StringLengthLTEError is produced if a string is longer than the maximum allowed length + // ErrorDetails: max + StringLengthLTEError struct { + ResultErrorFields + } + + // DoesNotMatchPatternError is produced if a string does not match the defined pattern + // ErrorDetails: pattern + DoesNotMatchPatternError struct { + ResultErrorFields + } + + // DoesNotMatchFormatError is produced if a string does not match the defined format + // ErrorDetails: format + DoesNotMatchFormatError struct { + ResultErrorFields + } + + // MultipleOfError is produced if a number is not a multiple of the defined multipleOf + // ErrorDetails: multiple + MultipleOfError struct { + ResultErrorFields + } + + // NumberGTEError is produced if a number is lower than the allowed minimum + // ErrorDetails: min + NumberGTEError struct { + ResultErrorFields + } + + // NumberGTError is produced if a number is lower than, or equal to the specified minimum, and exclusiveMinimum is set + // ErrorDetails: min + NumberGTError struct { + ResultErrorFields + } + + // NumberLTEError is produced if a number is higher than the allowed maximum + // ErrorDetails: max + NumberLTEError struct { + ResultErrorFields + } + + // NumberLTError is produced if a number is higher than, or equal to the specified maximum, and exclusiveMaximum is set + // ErrorDetails: max + NumberLTError struct { + ResultErrorFields + } + + // ConditionThenError is produced if a condition's "then" validation is invalid + // ErrorDetails: - + ConditionThenError struct { + ResultErrorFields + } + + // ConditionElseError is produced if a condition's "else" condition is invalid + // ErrorDetails: - + ConditionElseError struct { + ResultErrorFields + } +) + +// newError takes a ResultError type and sets the type, context, description, details, value, and field +func newError(err ResultError, context *JsonContext, value interface{}, locale locale, details ErrorDetails) { + var t string + var d string + switch err.(type) { + case *FalseError: + t = "false" + d = locale.False() + case *RequiredError: + t = "required" + d = locale.Required() + case *InvalidTypeError: + t = "invalid_type" + d = locale.InvalidType() + case *NumberAnyOfError: + t = "number_any_of" + d = locale.NumberAnyOf() + case *NumberOneOfError: + t = "number_one_of" + d = locale.NumberOneOf() + case *NumberAllOfError: + t = "number_all_of" + d = locale.NumberAllOf() + case *NumberNotError: + t = "number_not" + d = locale.NumberNot() + case *MissingDependencyError: + t = "missing_dependency" + d = locale.MissingDependency() + case *InternalError: + t = "internal" + d = locale.Internal() + case *ConstError: + t = "const" + d = locale.Const() + case *EnumError: + t = "enum" + d = locale.Enum() + case *ArrayNoAdditionalItemsError: + t = "array_no_additional_items" + d = locale.ArrayNoAdditionalItems() + case *ArrayMinItemsError: + t = "array_min_items" + d = locale.ArrayMinItems() + case *ArrayMaxItemsError: + t = "array_max_items" + d = locale.ArrayMaxItems() + case *ItemsMustBeUniqueError: + t = "unique" + d = locale.Unique() + case *ArrayContainsError: + t = "contains" + d = locale.ArrayContains() + case *ArrayMinPropertiesError: + t = "array_min_properties" + d = locale.ArrayMinProperties() + case *ArrayMaxPropertiesError: + t = "array_max_properties" + d = locale.ArrayMaxProperties() + case *AdditionalPropertyNotAllowedError: + t = "additional_property_not_allowed" + d = locale.AdditionalPropertyNotAllowed() + case *InvalidPropertyPatternError: + t = "invalid_property_pattern" + d = locale.InvalidPropertyPattern() + case *InvalidPropertyNameError: + t = "invalid_property_name" + d = locale.InvalidPropertyName() + case *StringLengthGTEError: + t = "string_gte" + d = locale.StringGTE() + case *StringLengthLTEError: + t = "string_lte" + d = locale.StringLTE() + case *DoesNotMatchPatternError: + t = "pattern" + d = locale.DoesNotMatchPattern() + case *DoesNotMatchFormatError: + t = "format" + d = locale.DoesNotMatchFormat() + case *MultipleOfError: + t = "multiple_of" + d = locale.MultipleOf() + case *NumberGTEError: + t = "number_gte" + d = locale.NumberGTE() + case *NumberGTError: + t = "number_gt" + d = locale.NumberGT() + case *NumberLTEError: + t = "number_lte" + d = locale.NumberLTE() + case *NumberLTError: + t = "number_lt" + d = locale.NumberLT() + case *ConditionThenError: + t = "condition_then" + d = locale.ConditionThen() + case *ConditionElseError: + t = "condition_else" + d = locale.ConditionElse() + } + + err.SetType(t) + err.SetContext(context) + err.SetValue(value) + err.SetDetails(details) + err.SetDescriptionFormat(d) + details["field"] = err.Field() + + if _, exists := details["context"]; !exists && context != nil { + details["context"] = context.String() + } + + err.SetDescription(formatErrorDescription(err.DescriptionFormat(), details)) +} + +// formatErrorDescription takes a string in the default text/template +// format and converts it to a string with replacements. The fields come +// from the ErrorDetails struct and vary for each type of error. +func formatErrorDescription(s string, details ErrorDetails) string { + + var tpl *template.Template + var descrAsBuffer bytes.Buffer + var err error + + errorTemplates.RLock() + tpl = errorTemplates.Lookup(s) + errorTemplates.RUnlock() + + if tpl == nil { + errorTemplates.Lock() + tpl = errorTemplates.New(s) + + if ErrorTemplateFuncs != nil { + tpl.Funcs(ErrorTemplateFuncs) + } + + tpl, err = tpl.Parse(s) + errorTemplates.Unlock() + + if err != nil { + return err.Error() + } + } + + err = tpl.Execute(&descrAsBuffer, details) + if err != nil { + return err.Error() + } + + return descrAsBuffer.String() +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/format_checkers.go b/vendor/github.com/xeipuuv/gojsonschema/format_checkers.go new file mode 100644 index 000000000..873ffc7d7 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/format_checkers.go @@ -0,0 +1,368 @@ +package gojsonschema + +import ( + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "sync" + "time" +) + +type ( + // FormatChecker is the interface all formatters added to FormatCheckerChain must implement + FormatChecker interface { + // IsFormat checks if input has the correct format and type + IsFormat(input interface{}) bool + } + + // FormatCheckerChain holds the formatters + FormatCheckerChain struct { + formatters map[string]FormatChecker + } + + // EmailFormatChecker verifies email address formats + EmailFormatChecker struct{} + + // IPV4FormatChecker verifies IP addresses in the IPv4 format + IPV4FormatChecker struct{} + + // IPV6FormatChecker verifies IP addresses in the IPv6 format + IPV6FormatChecker struct{} + + // DateTimeFormatChecker verifies date/time formats per RFC3339 5.6 + // + // Valid formats: + // Partial Time: HH:MM:SS + // Full Date: YYYY-MM-DD + // Full Time: HH:MM:SSZ-07:00 + // Date Time: YYYY-MM-DDTHH:MM:SSZ-0700 + // + // Where + // YYYY = 4DIGIT year + // MM = 2DIGIT month ; 01-12 + // DD = 2DIGIT day-month ; 01-28, 01-29, 01-30, 01-31 based on month/year + // HH = 2DIGIT hour ; 00-23 + // MM = 2DIGIT ; 00-59 + // SS = 2DIGIT ; 00-58, 00-60 based on leap second rules + // T = Literal + // Z = Literal + // + // Note: Nanoseconds are also suported in all formats + // + // http://tools.ietf.org/html/rfc3339#section-5.6 + DateTimeFormatChecker struct{} + + // DateFormatChecker verifies date formats + // + // Valid format: + // Full Date: YYYY-MM-DD + // + // Where + // YYYY = 4DIGIT year + // MM = 2DIGIT month ; 01-12 + // DD = 2DIGIT day-month ; 01-28, 01-29, 01-30, 01-31 based on month/year + DateFormatChecker struct{} + + // TimeFormatChecker verifies time formats + // + // Valid formats: + // Partial Time: HH:MM:SS + // Full Time: HH:MM:SSZ-07:00 + // + // Where + // HH = 2DIGIT hour ; 00-23 + // MM = 2DIGIT ; 00-59 + // SS = 2DIGIT ; 00-58, 00-60 based on leap second rules + // T = Literal + // Z = Literal + TimeFormatChecker struct{} + + // URIFormatChecker validates a URI with a valid Scheme per RFC3986 + URIFormatChecker struct{} + + // URIReferenceFormatChecker validates a URI or relative-reference per RFC3986 + URIReferenceFormatChecker struct{} + + // URITemplateFormatChecker validates a URI template per RFC6570 + URITemplateFormatChecker struct{} + + // HostnameFormatChecker validates a hostname is in the correct format + HostnameFormatChecker struct{} + + // UUIDFormatChecker validates a UUID is in the correct format + UUIDFormatChecker struct{} + + // RegexFormatChecker validates a regex is in the correct format + RegexFormatChecker struct{} + + // JSONPointerFormatChecker validates a JSON Pointer per RFC6901 + JSONPointerFormatChecker struct{} + + // RelativeJSONPointerFormatChecker validates a relative JSON Pointer is in the correct format + RelativeJSONPointerFormatChecker struct{} +) + +var ( + // FormatCheckers holds the valid formatters, and is a public variable + // so library users can add custom formatters + FormatCheckers = FormatCheckerChain{ + formatters: map[string]FormatChecker{ + "date": DateFormatChecker{}, + "time": TimeFormatChecker{}, + "date-time": DateTimeFormatChecker{}, + "hostname": HostnameFormatChecker{}, + "email": EmailFormatChecker{}, + "idn-email": EmailFormatChecker{}, + "ipv4": IPV4FormatChecker{}, + "ipv6": IPV6FormatChecker{}, + "uri": URIFormatChecker{}, + "uri-reference": URIReferenceFormatChecker{}, + "iri": URIFormatChecker{}, + "iri-reference": URIReferenceFormatChecker{}, + "uri-template": URITemplateFormatChecker{}, + "uuid": UUIDFormatChecker{}, + "regex": RegexFormatChecker{}, + "json-pointer": JSONPointerFormatChecker{}, + "relative-json-pointer": RelativeJSONPointerFormatChecker{}, + }, + } + + // Regex credit: https://www.socketloop.com/tutorials/golang-validate-hostname + rxHostname = regexp.MustCompile(`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$`) + + // Use a regex to make sure curly brackets are balanced properly after validating it as a AURI + rxURITemplate = regexp.MustCompile("^([^{]*({[^}]*})?)*$") + + rxUUID = regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$") + + rxJSONPointer = regexp.MustCompile("^(?:/(?:[^~/]|~0|~1)*)*$") + + rxRelJSONPointer = regexp.MustCompile("^(?:0|[1-9][0-9]*)(?:#|(?:/(?:[^~/]|~0|~1)*)*)$") + + lock = new(sync.RWMutex) +) + +// Add adds a FormatChecker to the FormatCheckerChain +// The name used will be the value used for the format key in your json schema +func (c *FormatCheckerChain) Add(name string, f FormatChecker) *FormatCheckerChain { + lock.Lock() + c.formatters[name] = f + lock.Unlock() + + return c +} + +// Remove deletes a FormatChecker from the FormatCheckerChain (if it exists) +func (c *FormatCheckerChain) Remove(name string) *FormatCheckerChain { + lock.Lock() + delete(c.formatters, name) + lock.Unlock() + + return c +} + +// Has checks to see if the FormatCheckerChain holds a FormatChecker with the given name +func (c *FormatCheckerChain) Has(name string) bool { + lock.RLock() + _, ok := c.formatters[name] + lock.RUnlock() + + return ok +} + +// IsFormat will check an input against a FormatChecker with the given name +// to see if it is the correct format +func (c *FormatCheckerChain) IsFormat(name string, input interface{}) bool { + lock.RLock() + f, ok := c.formatters[name] + lock.RUnlock() + + // If a format is unrecognized it should always pass validation + if !ok { + return true + } + + return f.IsFormat(input) +} + +// IsFormat checks if input is a correctly formatted e-mail address +func (f EmailFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + _, err := mail.ParseAddress(asString) + return err == nil +} + +// IsFormat checks if input is a correctly formatted IPv4-address +func (f IPV4FormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + // Credit: https://github.com/asaskevich/govalidator + ip := net.ParseIP(asString) + return ip != nil && strings.Contains(asString, ".") +} + +// IsFormat checks if input is a correctly formatted IPv6=address +func (f IPV6FormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + // Credit: https://github.com/asaskevich/govalidator + ip := net.ParseIP(asString) + return ip != nil && strings.Contains(asString, ":") +} + +// IsFormat checks if input is a correctly formatted date/time per RFC3339 5.6 +func (f DateTimeFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + formats := []string{ + "15:04:05", + "15:04:05Z07:00", + "2006-01-02", + time.RFC3339, + time.RFC3339Nano, + } + + for _, format := range formats { + if _, err := time.Parse(format, asString); err == nil { + return true + } + } + + return false +} + +// IsFormat checks if input is a correctly formatted date (YYYY-MM-DD) +func (f DateFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + _, err := time.Parse("2006-01-02", asString) + return err == nil +} + +// IsFormat checks if input correctly formatted time (HH:MM:SS or HH:MM:SSZ-07:00) +func (f TimeFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + if _, err := time.Parse("15:04:05Z07:00", asString); err == nil { + return true + } + + _, err := time.Parse("15:04:05", asString) + return err == nil +} + +// IsFormat checks if input is correctly formatted URI with a valid Scheme per RFC3986 +func (f URIFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + u, err := url.Parse(asString) + + if err != nil || u.Scheme == "" { + return false + } + + return !strings.Contains(asString, `\`) +} + +// IsFormat checks if input is a correctly formatted URI or relative-reference per RFC3986 +func (f URIReferenceFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + _, err := url.Parse(asString) + return err == nil && !strings.Contains(asString, `\`) +} + +// IsFormat checks if input is a correctly formatted URI template per RFC6570 +func (f URITemplateFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + u, err := url.Parse(asString) + if err != nil || strings.Contains(asString, `\`) { + return false + } + + return rxURITemplate.MatchString(u.Path) +} + +// IsFormat checks if input is a correctly formatted hostname +func (f HostnameFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + return rxHostname.MatchString(asString) && len(asString) < 256 +} + +// IsFormat checks if input is a correctly formatted UUID +func (f UUIDFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + return rxUUID.MatchString(asString) +} + +// IsFormat checks if input is a correctly formatted regular expression +func (f RegexFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + if asString == "" { + return true + } + _, err := regexp.Compile(asString) + return err == nil +} + +// IsFormat checks if input is a correctly formatted JSON Pointer per RFC6901 +func (f JSONPointerFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + return rxJSONPointer.MatchString(asString) +} + +// IsFormat checks if input is a correctly formatted relative JSON Pointer +func (f RelativeJSONPointerFormatChecker) IsFormat(input interface{}) bool { + asString, ok := input.(string) + if !ok { + return false + } + + return rxRelJSONPointer.MatchString(asString) +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/glide.yaml b/vendor/github.com/xeipuuv/gojsonschema/glide.yaml new file mode 100644 index 000000000..ab6fb867c --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/glide.yaml @@ -0,0 +1,13 @@ +package: github.com/xeipuuv/gojsonschema +license: Apache 2.0 +import: +- package: github.com/xeipuuv/gojsonschema + +- package: github.com/xeipuuv/gojsonpointer + +- package: github.com/xeipuuv/gojsonreference + +testImport: +- package: github.com/stretchr/testify + subpackages: + - assert diff --git a/vendor/github.com/xeipuuv/gojsonschema/internalLog.go b/vendor/github.com/xeipuuv/gojsonschema/internalLog.go new file mode 100644 index 000000000..4ef7a8d03 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/internalLog.go @@ -0,0 +1,37 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Very simple log wrapper. +// Used for debugging/testing purposes. +// +// created 01-01-2015 + +package gojsonschema + +import ( + "log" +) + +const internalLogEnabled = false + +func internalLog(format string, v ...interface{}) { + log.Printf(format, v...) +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go b/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go new file mode 100644 index 000000000..0e979707b --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go @@ -0,0 +1,73 @@ +// Copyright 2013 MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author tolsen +// author-github https://github.com/tolsen +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Implements a persistent (immutable w/ shared structure) singly-linked list of strings for the purpose of storing a json context +// +// created 04-09-2013 + +package gojsonschema + +import "bytes" + +// JsonContext implements a persistent linked-list of strings +type JsonContext struct { + head string + tail *JsonContext +} + +// NewJsonContext creates a new JsonContext +func NewJsonContext(head string, tail *JsonContext) *JsonContext { + return &JsonContext{head, tail} +} + +// String displays the context in reverse. +// This plays well with the data structure's persistent nature with +// Cons and a json document's tree structure. +func (c *JsonContext) String(del ...string) string { + byteArr := make([]byte, 0, c.stringLen()) + buf := bytes.NewBuffer(byteArr) + c.writeStringToBuffer(buf, del) + + return buf.String() +} + +func (c *JsonContext) stringLen() int { + length := 0 + if c.tail != nil { + length = c.tail.stringLen() + 1 // add 1 for "." + } + + length += len(c.head) + return length +} + +func (c *JsonContext) writeStringToBuffer(buf *bytes.Buffer, del []string) { + if c.tail != nil { + c.tail.writeStringToBuffer(buf, del) + + if len(del) > 0 { + buf.WriteString(del[0]) + } else { + buf.WriteString(".") + } + } + + buf.WriteString(c.head) +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go b/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go new file mode 100644 index 000000000..5d88af263 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go @@ -0,0 +1,386 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Different strategies to load JSON files. +// Includes References (file and HTTP), JSON strings and Go types. +// +// created 01-02-2015 + +package gojsonschema + +import ( + "bytes" + "encoding/json" + "errors" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "path/filepath" + "runtime" + "strings" + + "github.com/xeipuuv/gojsonreference" +) + +var osFS = osFileSystem(os.Open) + +// JSONLoader defines the JSON loader interface +type JSONLoader interface { + JsonSource() interface{} + LoadJSON() (interface{}, error) + JsonReference() (gojsonreference.JsonReference, error) + LoaderFactory() JSONLoaderFactory +} + +// JSONLoaderFactory defines the JSON loader factory interface +type JSONLoaderFactory interface { + // New creates a new JSON loader for the given source + New(source string) JSONLoader +} + +// DefaultJSONLoaderFactory is the default JSON loader factory +type DefaultJSONLoaderFactory struct { +} + +// FileSystemJSONLoaderFactory is a JSON loader factory that uses http.FileSystem +type FileSystemJSONLoaderFactory struct { + fs http.FileSystem +} + +// New creates a new JSON loader for the given source +func (d DefaultJSONLoaderFactory) New(source string) JSONLoader { + return &jsonReferenceLoader{ + fs: osFS, + source: source, + } +} + +// New creates a new JSON loader for the given source +func (f FileSystemJSONLoaderFactory) New(source string) JSONLoader { + return &jsonReferenceLoader{ + fs: f.fs, + source: source, + } +} + +// osFileSystem is a functional wrapper for os.Open that implements http.FileSystem. +type osFileSystem func(string) (*os.File, error) + +// Opens a file with the given name +func (o osFileSystem) Open(name string) (http.File, error) { + return o(name) +} + +// JSON Reference loader +// references are used to load JSONs from files and HTTP + +type jsonReferenceLoader struct { + fs http.FileSystem + source string +} + +func (l *jsonReferenceLoader) JsonSource() interface{} { + return l.source +} + +func (l *jsonReferenceLoader) JsonReference() (gojsonreference.JsonReference, error) { + return gojsonreference.NewJsonReference(l.JsonSource().(string)) +} + +func (l *jsonReferenceLoader) LoaderFactory() JSONLoaderFactory { + return &FileSystemJSONLoaderFactory{ + fs: l.fs, + } +} + +// NewReferenceLoader returns a JSON reference loader using the given source and the local OS file system. +func NewReferenceLoader(source string) JSONLoader { + return &jsonReferenceLoader{ + fs: osFS, + source: source, + } +} + +// NewReferenceLoaderFileSystem returns a JSON reference loader using the given source and file system. +func NewReferenceLoaderFileSystem(source string, fs http.FileSystem) JSONLoader { + return &jsonReferenceLoader{ + fs: fs, + source: source, + } +} + +func (l *jsonReferenceLoader) LoadJSON() (interface{}, error) { + + var err error + + reference, err := gojsonreference.NewJsonReference(l.JsonSource().(string)) + if err != nil { + return nil, err + } + + refToURL := reference + refToURL.GetUrl().Fragment = "" + + var document interface{} + + if reference.HasFileScheme { + + filename := strings.TrimPrefix(refToURL.String(), "file://") + filename, err = url.QueryUnescape(filename) + + if err != nil { + return nil, err + } + + if runtime.GOOS == "windows" { + // on Windows, a file URL may have an extra leading slash, use slashes + // instead of backslashes, and have spaces escaped + filename = strings.TrimPrefix(filename, "/") + filename = filepath.FromSlash(filename) + } + + document, err = l.loadFromFile(filename) + if err != nil { + return nil, err + } + + } else { + + document, err = l.loadFromHTTP(refToURL.String()) + if err != nil { + return nil, err + } + + } + + return document, nil + +} + +func (l *jsonReferenceLoader) loadFromHTTP(address string) (interface{}, error) { + + // returned cached versions for metaschemas for drafts 4, 6 and 7 + // for performance and allow for easier offline use + if metaSchema := drafts.GetMetaSchema(address); metaSchema != "" { + return decodeJSONUsingNumber(strings.NewReader(metaSchema)) + } + + resp, err := http.Get(address) + if err != nil { + return nil, err + } + + // must return HTTP Status 200 OK + if resp.StatusCode != http.StatusOK { + return nil, errors.New(formatErrorDescription(Locale.HttpBadStatus(), ErrorDetails{"status": resp.Status})) + } + + bodyBuff, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + return decodeJSONUsingNumber(bytes.NewReader(bodyBuff)) +} + +func (l *jsonReferenceLoader) loadFromFile(path string) (interface{}, error) { + f, err := l.fs.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + + bodyBuff, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + return decodeJSONUsingNumber(bytes.NewReader(bodyBuff)) + +} + +// JSON string loader + +type jsonStringLoader struct { + source string +} + +func (l *jsonStringLoader) JsonSource() interface{} { + return l.source +} + +func (l *jsonStringLoader) JsonReference() (gojsonreference.JsonReference, error) { + return gojsonreference.NewJsonReference("#") +} + +func (l *jsonStringLoader) LoaderFactory() JSONLoaderFactory { + return &DefaultJSONLoaderFactory{} +} + +// NewStringLoader creates a new JSONLoader, taking a string as source +func NewStringLoader(source string) JSONLoader { + return &jsonStringLoader{source: source} +} + +func (l *jsonStringLoader) LoadJSON() (interface{}, error) { + + return decodeJSONUsingNumber(strings.NewReader(l.JsonSource().(string))) + +} + +// JSON bytes loader + +type jsonBytesLoader struct { + source []byte +} + +func (l *jsonBytesLoader) JsonSource() interface{} { + return l.source +} + +func (l *jsonBytesLoader) JsonReference() (gojsonreference.JsonReference, error) { + return gojsonreference.NewJsonReference("#") +} + +func (l *jsonBytesLoader) LoaderFactory() JSONLoaderFactory { + return &DefaultJSONLoaderFactory{} +} + +// NewBytesLoader creates a new JSONLoader, taking a `[]byte` as source +func NewBytesLoader(source []byte) JSONLoader { + return &jsonBytesLoader{source: source} +} + +func (l *jsonBytesLoader) LoadJSON() (interface{}, error) { + return decodeJSONUsingNumber(bytes.NewReader(l.JsonSource().([]byte))) +} + +// JSON Go (types) loader +// used to load JSONs from the code as maps, interface{}, structs ... + +type jsonGoLoader struct { + source interface{} +} + +func (l *jsonGoLoader) JsonSource() interface{} { + return l.source +} + +func (l *jsonGoLoader) JsonReference() (gojsonreference.JsonReference, error) { + return gojsonreference.NewJsonReference("#") +} + +func (l *jsonGoLoader) LoaderFactory() JSONLoaderFactory { + return &DefaultJSONLoaderFactory{} +} + +// NewGoLoader creates a new JSONLoader from a given Go struct +func NewGoLoader(source interface{}) JSONLoader { + return &jsonGoLoader{source: source} +} + +func (l *jsonGoLoader) LoadJSON() (interface{}, error) { + + // convert it to a compliant JSON first to avoid types "mismatches" + + jsonBytes, err := json.Marshal(l.JsonSource()) + if err != nil { + return nil, err + } + + return decodeJSONUsingNumber(bytes.NewReader(jsonBytes)) + +} + +type jsonIOLoader struct { + buf *bytes.Buffer +} + +// NewReaderLoader creates a new JSON loader using the provided io.Reader +func NewReaderLoader(source io.Reader) (JSONLoader, io.Reader) { + buf := &bytes.Buffer{} + return &jsonIOLoader{buf: buf}, io.TeeReader(source, buf) +} + +// NewWriterLoader creates a new JSON loader using the provided io.Writer +func NewWriterLoader(source io.Writer) (JSONLoader, io.Writer) { + buf := &bytes.Buffer{} + return &jsonIOLoader{buf: buf}, io.MultiWriter(source, buf) +} + +func (l *jsonIOLoader) JsonSource() interface{} { + return l.buf.String() +} + +func (l *jsonIOLoader) LoadJSON() (interface{}, error) { + return decodeJSONUsingNumber(l.buf) +} + +func (l *jsonIOLoader) JsonReference() (gojsonreference.JsonReference, error) { + return gojsonreference.NewJsonReference("#") +} + +func (l *jsonIOLoader) LoaderFactory() JSONLoaderFactory { + return &DefaultJSONLoaderFactory{} +} + +// JSON raw loader +// In case the JSON is already marshalled to interface{} use this loader +// This is used for testing as otherwise there is no guarantee the JSON is marshalled +// "properly" by using https://golang.org/pkg/encoding/json/#Decoder.UseNumber +type jsonRawLoader struct { + source interface{} +} + +// NewRawLoader creates a new JSON raw loader for the given source +func NewRawLoader(source interface{}) JSONLoader { + return &jsonRawLoader{source: source} +} +func (l *jsonRawLoader) JsonSource() interface{} { + return l.source +} +func (l *jsonRawLoader) LoadJSON() (interface{}, error) { + return l.source, nil +} +func (l *jsonRawLoader) JsonReference() (gojsonreference.JsonReference, error) { + return gojsonreference.NewJsonReference("#") +} +func (l *jsonRawLoader) LoaderFactory() JSONLoaderFactory { + return &DefaultJSONLoaderFactory{} +} + +func decodeJSONUsingNumber(r io.Reader) (interface{}, error) { + + var document interface{} + + decoder := json.NewDecoder(r) + decoder.UseNumber() + + err := decoder.Decode(&document) + if err != nil { + return nil, err + } + + return document, nil + +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/locales.go b/vendor/github.com/xeipuuv/gojsonschema/locales.go new file mode 100644 index 000000000..a416225cd --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/locales.go @@ -0,0 +1,472 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Contains const string and messages. +// +// created 01-01-2015 + +package gojsonschema + +type ( + // locale is an interface for defining custom error strings + locale interface { + + // False returns a format-string for "false" schema validation errors + False() string + + // Required returns a format-string for "required" schema validation errors + Required() string + + // InvalidType returns a format-string for "invalid type" schema validation errors + InvalidType() string + + // NumberAnyOf returns a format-string for "anyOf" schema validation errors + NumberAnyOf() string + + // NumberOneOf returns a format-string for "oneOf" schema validation errors + NumberOneOf() string + + // NumberAllOf returns a format-string for "allOf" schema validation errors + NumberAllOf() string + + // NumberNot returns a format-string to format a NumberNotError + NumberNot() string + + // MissingDependency returns a format-string for "missing dependency" schema validation errors + MissingDependency() string + + // Internal returns a format-string for internal errors + Internal() string + + // Const returns a format-string to format a ConstError + Const() string + + // Enum returns a format-string to format an EnumError + Enum() string + + // ArrayNotEnoughItems returns a format-string to format an error for arrays having not enough items to match positional list of schema + ArrayNotEnoughItems() string + + // ArrayNoAdditionalItems returns a format-string to format an ArrayNoAdditionalItemsError + ArrayNoAdditionalItems() string + + // ArrayMinItems returns a format-string to format an ArrayMinItemsError + ArrayMinItems() string + + // ArrayMaxItems returns a format-string to format an ArrayMaxItemsError + ArrayMaxItems() string + + // Unique returns a format-string to format an ItemsMustBeUniqueError + Unique() string + + // ArrayContains returns a format-string to format an ArrayContainsError + ArrayContains() string + + // ArrayMinProperties returns a format-string to format an ArrayMinPropertiesError + ArrayMinProperties() string + + // ArrayMaxProperties returns a format-string to format an ArrayMaxPropertiesError + ArrayMaxProperties() string + + // AdditionalPropertyNotAllowed returns a format-string to format an AdditionalPropertyNotAllowedError + AdditionalPropertyNotAllowed() string + + // InvalidPropertyPattern returns a format-string to format an InvalidPropertyPatternError + InvalidPropertyPattern() string + + // InvalidPropertyName returns a format-string to format an InvalidPropertyNameError + InvalidPropertyName() string + + // StringGTE returns a format-string to format an StringLengthGTEError + StringGTE() string + + // StringLTE returns a format-string to format an StringLengthLTEError + StringLTE() string + + // DoesNotMatchPattern returns a format-string to format an DoesNotMatchPatternError + DoesNotMatchPattern() string + + // DoesNotMatchFormat returns a format-string to format an DoesNotMatchFormatError + DoesNotMatchFormat() string + + // MultipleOf returns a format-string to format an MultipleOfError + MultipleOf() string + + // NumberGTE returns a format-string to format an NumberGTEError + NumberGTE() string + + // NumberGT returns a format-string to format an NumberGTError + NumberGT() string + + // NumberLTE returns a format-string to format an NumberLTEError + NumberLTE() string + + // NumberLT returns a format-string to format an NumberLTError + NumberLT() string + + // Schema validations + + // RegexPattern returns a format-string to format a regex-pattern error + RegexPattern() string + + // GreaterThanZero returns a format-string to format an error where a number must be greater than zero + GreaterThanZero() string + + // MustBeOfA returns a format-string to format an error where a value is of the wrong type + MustBeOfA() string + + // MustBeOfAn returns a format-string to format an error where a value is of the wrong type + MustBeOfAn() string + + // CannotBeUsedWithout returns a format-string to format a "cannot be used without" error + CannotBeUsedWithout() string + + // CannotBeGT returns a format-string to format an error where a value are greater than allowed + CannotBeGT() string + + // MustBeOfType returns a format-string to format an error where a value does not match the required type + MustBeOfType() string + + // MustBeValidRegex returns a format-string to format an error where a regex is invalid + MustBeValidRegex() string + + // MustBeValidFormat returns a format-string to format an error where a value does not match the expected format + MustBeValidFormat() string + + // MustBeGTEZero returns a format-string to format an error where a value must be greater or equal than 0 + MustBeGTEZero() string + + // KeyCannotBeGreaterThan returns a format-string to format an error where a key is greater than the maximum allowed + KeyCannotBeGreaterThan() string + + // KeyItemsMustBeOfType returns a format-string to format an error where a key is of the wrong type + KeyItemsMustBeOfType() string + + // KeyItemsMustBeUnique returns a format-string to format an error where keys are not unique + KeyItemsMustBeUnique() string + + // ReferenceMustBeCanonical returns a format-string to format a "reference must be canonical" error + ReferenceMustBeCanonical() string + + // NotAValidType returns a format-string to format an invalid type error + NotAValidType() string + + // Duplicated returns a format-string to format an error where types are duplicated + Duplicated() string + + // HttpBadStatus returns a format-string for errors when loading a schema using HTTP + HttpBadStatus() string + + // ParseError returns a format-string for JSON parsing errors + ParseError() string + + // ConditionThen returns a format-string for ConditionThenError errors + ConditionThen() string + + // ConditionElse returns a format-string for ConditionElseError errors + ConditionElse() string + + // ErrorFormat returns a format string for errors + ErrorFormat() string + } + + // DefaultLocale is the default locale for this package + DefaultLocale struct{} +) + +// False returns a format-string for "false" schema validation errors +func (l DefaultLocale) False() string { + return "False always fails validation" +} + +// Required returns a format-string for "required" schema validation errors +func (l DefaultLocale) Required() string { + return `{{.property}} is required` +} + +// InvalidType returns a format-string for "invalid type" schema validation errors +func (l DefaultLocale) InvalidType() string { + return `Invalid type. Expected: {{.expected}}, given: {{.given}}` +} + +// NumberAnyOf returns a format-string for "anyOf" schema validation errors +func (l DefaultLocale) NumberAnyOf() string { + return `Must validate at least one schema (anyOf)` +} + +// NumberOneOf returns a format-string for "oneOf" schema validation errors +func (l DefaultLocale) NumberOneOf() string { + return `Must validate one and only one schema (oneOf)` +} + +// NumberAllOf returns a format-string for "allOf" schema validation errors +func (l DefaultLocale) NumberAllOf() string { + return `Must validate all the schemas (allOf)` +} + +// NumberNot returns a format-string to format a NumberNotError +func (l DefaultLocale) NumberNot() string { + return `Must not validate the schema (not)` +} + +// MissingDependency returns a format-string for "missing dependency" schema validation errors +func (l DefaultLocale) MissingDependency() string { + return `Has a dependency on {{.dependency}}` +} + +// Internal returns a format-string for internal errors +func (l DefaultLocale) Internal() string { + return `Internal Error {{.error}}` +} + +// Const returns a format-string to format a ConstError +func (l DefaultLocale) Const() string { + return `{{.field}} does not match: {{.allowed}}` +} + +// Enum returns a format-string to format an EnumError +func (l DefaultLocale) Enum() string { + return `{{.field}} must be one of the following: {{.allowed}}` +} + +// ArrayNoAdditionalItems returns a format-string to format an ArrayNoAdditionalItemsError +func (l DefaultLocale) ArrayNoAdditionalItems() string { + return `No additional items allowed on array` +} + +// ArrayNotEnoughItems returns a format-string to format an error for arrays having not enough items to match positional list of schema +func (l DefaultLocale) ArrayNotEnoughItems() string { + return `Not enough items on array to match positional list of schema` +} + +// ArrayMinItems returns a format-string to format an ArrayMinItemsError +func (l DefaultLocale) ArrayMinItems() string { + return `Array must have at least {{.min}} items` +} + +// ArrayMaxItems returns a format-string to format an ArrayMaxItemsError +func (l DefaultLocale) ArrayMaxItems() string { + return `Array must have at most {{.max}} items` +} + +// Unique returns a format-string to format an ItemsMustBeUniqueError +func (l DefaultLocale) Unique() string { + return `{{.type}} items[{{.i}},{{.j}}] must be unique` +} + +// ArrayContains returns a format-string to format an ArrayContainsError +func (l DefaultLocale) ArrayContains() string { + return `At least one of the items must match` +} + +// ArrayMinProperties returns a format-string to format an ArrayMinPropertiesError +func (l DefaultLocale) ArrayMinProperties() string { + return `Must have at least {{.min}} properties` +} + +// ArrayMaxProperties returns a format-string to format an ArrayMaxPropertiesError +func (l DefaultLocale) ArrayMaxProperties() string { + return `Must have at most {{.max}} properties` +} + +// AdditionalPropertyNotAllowed returns a format-string to format an AdditionalPropertyNotAllowedError +func (l DefaultLocale) AdditionalPropertyNotAllowed() string { + return `Additional property {{.property}} is not allowed` +} + +// InvalidPropertyPattern returns a format-string to format an InvalidPropertyPatternError +func (l DefaultLocale) InvalidPropertyPattern() string { + return `Property "{{.property}}" does not match pattern {{.pattern}}` +} + +// InvalidPropertyName returns a format-string to format an InvalidPropertyNameError +func (l DefaultLocale) InvalidPropertyName() string { + return `Property name of "{{.property}}" does not match` +} + +// StringGTE returns a format-string to format an StringLengthGTEError +func (l DefaultLocale) StringGTE() string { + return `String length must be greater than or equal to {{.min}}` +} + +// StringLTE returns a format-string to format an StringLengthLTEError +func (l DefaultLocale) StringLTE() string { + return `String length must be less than or equal to {{.max}}` +} + +// DoesNotMatchPattern returns a format-string to format an DoesNotMatchPatternError +func (l DefaultLocale) DoesNotMatchPattern() string { + return `Does not match pattern '{{.pattern}}'` +} + +// DoesNotMatchFormat returns a format-string to format an DoesNotMatchFormatError +func (l DefaultLocale) DoesNotMatchFormat() string { + return `Does not match format '{{.format}}'` +} + +// MultipleOf returns a format-string to format an MultipleOfError +func (l DefaultLocale) MultipleOf() string { + return `Must be a multiple of {{.multiple}}` +} + +// NumberGTE returns the format string to format a NumberGTEError +func (l DefaultLocale) NumberGTE() string { + return `Must be greater than or equal to {{.min}}` +} + +// NumberGT returns the format string to format a NumberGTError +func (l DefaultLocale) NumberGT() string { + return `Must be greater than {{.min}}` +} + +// NumberLTE returns the format string to format a NumberLTEError +func (l DefaultLocale) NumberLTE() string { + return `Must be less than or equal to {{.max}}` +} + +// NumberLT returns the format string to format a NumberLTError +func (l DefaultLocale) NumberLT() string { + return `Must be less than {{.max}}` +} + +// Schema validators + +// RegexPattern returns a format-string to format a regex-pattern error +func (l DefaultLocale) RegexPattern() string { + return `Invalid regex pattern '{{.pattern}}'` +} + +// GreaterThanZero returns a format-string to format an error where a number must be greater than zero +func (l DefaultLocale) GreaterThanZero() string { + return `{{.number}} must be strictly greater than 0` +} + +// MustBeOfA returns a format-string to format an error where a value is of the wrong type +func (l DefaultLocale) MustBeOfA() string { + return `{{.x}} must be of a {{.y}}` +} + +// MustBeOfAn returns a format-string to format an error where a value is of the wrong type +func (l DefaultLocale) MustBeOfAn() string { + return `{{.x}} must be of an {{.y}}` +} + +// CannotBeUsedWithout returns a format-string to format a "cannot be used without" error +func (l DefaultLocale) CannotBeUsedWithout() string { + return `{{.x}} cannot be used without {{.y}}` +} + +// CannotBeGT returns a format-string to format an error where a value are greater than allowed +func (l DefaultLocale) CannotBeGT() string { + return `{{.x}} cannot be greater than {{.y}}` +} + +// MustBeOfType returns a format-string to format an error where a value does not match the required type +func (l DefaultLocale) MustBeOfType() string { + return `{{.key}} must be of type {{.type}}` +} + +// MustBeValidRegex returns a format-string to format an error where a regex is invalid +func (l DefaultLocale) MustBeValidRegex() string { + return `{{.key}} must be a valid regex` +} + +// MustBeValidFormat returns a format-string to format an error where a value does not match the expected format +func (l DefaultLocale) MustBeValidFormat() string { + return `{{.key}} must be a valid format {{.given}}` +} + +// MustBeGTEZero returns a format-string to format an error where a value must be greater or equal than 0 +func (l DefaultLocale) MustBeGTEZero() string { + return `{{.key}} must be greater than or equal to 0` +} + +// KeyCannotBeGreaterThan returns a format-string to format an error where a value is greater than the maximum allowed +func (l DefaultLocale) KeyCannotBeGreaterThan() string { + return `{{.key}} cannot be greater than {{.y}}` +} + +// KeyItemsMustBeOfType returns a format-string to format an error where a key is of the wrong type +func (l DefaultLocale) KeyItemsMustBeOfType() string { + return `{{.key}} items must be {{.type}}` +} + +// KeyItemsMustBeUnique returns a format-string to format an error where keys are not unique +func (l DefaultLocale) KeyItemsMustBeUnique() string { + return `{{.key}} items must be unique` +} + +// ReferenceMustBeCanonical returns a format-string to format a "reference must be canonical" error +func (l DefaultLocale) ReferenceMustBeCanonical() string { + return `Reference {{.reference}} must be canonical` +} + +// NotAValidType returns a format-string to format an invalid type error +func (l DefaultLocale) NotAValidType() string { + return `has a primitive type that is NOT VALID -- given: {{.given}} Expected valid values are:{{.expected}}` +} + +// Duplicated returns a format-string to format an error where types are duplicated +func (l DefaultLocale) Duplicated() string { + return `{{.type}} type is duplicated` +} + +// HttpBadStatus returns a format-string for errors when loading a schema using HTTP +func (l DefaultLocale) HttpBadStatus() string { + return `Could not read schema from HTTP, response status is {{.status}}` +} + +// ErrorFormat returns a format string for errors +// Replacement options: field, description, context, value +func (l DefaultLocale) ErrorFormat() string { + return `{{.field}}: {{.description}}` +} + +// ParseError returns a format-string for JSON parsing errors +func (l DefaultLocale) ParseError() string { + return `Expected: {{.expected}}, given: Invalid JSON` +} + +// ConditionThen returns a format-string for ConditionThenError errors +// If/Else +func (l DefaultLocale) ConditionThen() string { + return `Must validate "then" as "if" was valid` +} + +// ConditionElse returns a format-string for ConditionElseError errors +func (l DefaultLocale) ConditionElse() string { + return `Must validate "else" as "if" was not valid` +} + +// constants +const ( + STRING_NUMBER = "number" + STRING_ARRAY_OF_STRINGS = "array of strings" + STRING_ARRAY_OF_SCHEMAS = "array of schemas" + STRING_SCHEMA = "valid schema" + STRING_SCHEMA_OR_ARRAY_OF_STRINGS = "schema or array of strings" + STRING_PROPERTIES = "properties" + STRING_DEPENDENCY = "dependency" + STRING_PROPERTY = "property" + STRING_UNDEFINED = "undefined" + STRING_CONTEXT_ROOT = "(root)" + STRING_ROOT_SCHEMA_PROPERTY = "(root)" +) diff --git a/vendor/github.com/xeipuuv/gojsonschema/result.go b/vendor/github.com/xeipuuv/gojsonschema/result.go new file mode 100644 index 000000000..0a0179148 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/result.go @@ -0,0 +1,220 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Result and ResultError implementations. +// +// created 01-01-2015 + +package gojsonschema + +import ( + "fmt" + "strings" +) + +type ( + // ErrorDetails is a map of details specific to each error. + // While the values will vary, every error will contain a "field" value + ErrorDetails map[string]interface{} + + // ResultError is the interface that library errors must implement + ResultError interface { + // Field returns the field name without the root context + // i.e. firstName or person.firstName instead of (root).firstName or (root).person.firstName + Field() string + // SetType sets the error-type + SetType(string) + // Type returns the error-type + Type() string + // SetContext sets the JSON-context for the error + SetContext(*JsonContext) + // Context returns the JSON-context of the error + Context() *JsonContext + // SetDescription sets a description for the error + SetDescription(string) + // Description returns the description of the error + Description() string + // SetDescriptionFormat sets the format for the description in the default text/template format + SetDescriptionFormat(string) + // DescriptionFormat returns the format for the description in the default text/template format + DescriptionFormat() string + // SetValue sets the value related to the error + SetValue(interface{}) + // Value returns the value related to the error + Value() interface{} + // SetDetails sets the details specific to the error + SetDetails(ErrorDetails) + // Details returns details about the error + Details() ErrorDetails + // String returns a string representation of the error + String() string + } + + // ResultErrorFields holds the fields for each ResultError implementation. + // ResultErrorFields implements the ResultError interface, so custom errors + // can be defined by just embedding this type + ResultErrorFields struct { + errorType string // A string with the type of error (i.e. invalid_type) + context *JsonContext // Tree like notation of the part that failed the validation. ex (root).a.b ... + description string // A human readable error message + descriptionFormat string // A format for human readable error message + value interface{} // Value given by the JSON file that is the source of the error + details ErrorDetails + } + + // Result holds the result of a validation + Result struct { + errors []ResultError + // Scores how well the validation matched. Useful in generating + // better error messages for anyOf and oneOf. + score int + } +) + +// Field returns the field name without the root context +// i.e. firstName or person.firstName instead of (root).firstName or (root).person.firstName +func (v *ResultErrorFields) Field() string { + return strings.TrimPrefix(v.context.String(), STRING_ROOT_SCHEMA_PROPERTY+".") +} + +// SetType sets the error-type +func (v *ResultErrorFields) SetType(errorType string) { + v.errorType = errorType +} + +// Type returns the error-type +func (v *ResultErrorFields) Type() string { + return v.errorType +} + +// SetContext sets the JSON-context for the error +func (v *ResultErrorFields) SetContext(context *JsonContext) { + v.context = context +} + +// Context returns the JSON-context of the error +func (v *ResultErrorFields) Context() *JsonContext { + return v.context +} + +// SetDescription sets a description for the error +func (v *ResultErrorFields) SetDescription(description string) { + v.description = description +} + +// Description returns the description of the error +func (v *ResultErrorFields) Description() string { + return v.description +} + +// SetDescriptionFormat sets the format for the description in the default text/template format +func (v *ResultErrorFields) SetDescriptionFormat(descriptionFormat string) { + v.descriptionFormat = descriptionFormat +} + +// DescriptionFormat returns the format for the description in the default text/template format +func (v *ResultErrorFields) DescriptionFormat() string { + return v.descriptionFormat +} + +// SetValue sets the value related to the error +func (v *ResultErrorFields) SetValue(value interface{}) { + v.value = value +} + +// Value returns the value related to the error +func (v *ResultErrorFields) Value() interface{} { + return v.value +} + +// SetDetails sets the details specific to the error +func (v *ResultErrorFields) SetDetails(details ErrorDetails) { + v.details = details +} + +// Details returns details about the error +func (v *ResultErrorFields) Details() ErrorDetails { + return v.details +} + +// String returns a string representation of the error +func (v ResultErrorFields) String() string { + // as a fallback, the value is displayed go style + valueString := fmt.Sprintf("%v", v.value) + + // marshal the go value value to json + if v.value == nil { + valueString = TYPE_NULL + } else { + if vs, err := marshalToJSONString(v.value); err == nil { + if vs == nil { + valueString = TYPE_NULL + } else { + valueString = *vs + } + } + } + + return formatErrorDescription(Locale.ErrorFormat(), ErrorDetails{ + "context": v.context.String(), + "description": v.description, + "value": valueString, + "field": v.Field(), + }) +} + +// Valid indicates if no errors were found +func (v *Result) Valid() bool { + return len(v.errors) == 0 +} + +// Errors returns the errors that were found +func (v *Result) Errors() []ResultError { + return v.errors +} + +// AddError appends a fully filled error to the error set +// SetDescription() will be called with the result of the parsed err.DescriptionFormat() +func (v *Result) AddError(err ResultError, details ErrorDetails) { + if _, exists := details["context"]; !exists && err.Context() != nil { + details["context"] = err.Context().String() + } + + err.SetDescription(formatErrorDescription(err.DescriptionFormat(), details)) + + v.errors = append(v.errors, err) +} + +func (v *Result) addInternalError(err ResultError, context *JsonContext, value interface{}, details ErrorDetails) { + newError(err, context, value, Locale, details) + v.errors = append(v.errors, err) + v.score -= 2 // results in a net -1 when added to the +1 we get at the end of the validation function +} + +// Used to copy errors from a sub-schema to the main one +func (v *Result) mergeErrors(otherResult *Result) { + v.errors = append(v.errors, otherResult.Errors()...) + v.score += otherResult.score +} + +func (v *Result) incrementScore() { + v.score++ +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/schema.go b/vendor/github.com/xeipuuv/gojsonschema/schema.go new file mode 100644 index 000000000..9e93cd795 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/schema.go @@ -0,0 +1,1087 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Defines Schema, the main entry to every subSchema. +// Contains the parsing logic and error checking. +// +// created 26-02-2013 + +package gojsonschema + +import ( + "errors" + "math/big" + "reflect" + "regexp" + "text/template" + + "github.com/xeipuuv/gojsonreference" +) + +var ( + // Locale is the default locale to use + // Library users can overwrite with their own implementation + Locale locale = DefaultLocale{} + + // ErrorTemplateFuncs allows you to define custom template funcs for use in localization. + ErrorTemplateFuncs template.FuncMap +) + +// NewSchema instances a schema using the given JSONLoader +func NewSchema(l JSONLoader) (*Schema, error) { + return NewSchemaLoader().Compile(l) +} + +// Schema holds a schema +type Schema struct { + documentReference gojsonreference.JsonReference + rootSchema *subSchema + pool *schemaPool + referencePool *schemaReferencePool +} + +func (d *Schema) parse(document interface{}, draft Draft) error { + d.rootSchema = &subSchema{property: STRING_ROOT_SCHEMA_PROPERTY, draft: &draft} + return d.parseSchema(document, d.rootSchema) +} + +// SetRootSchemaName sets the root-schema name +func (d *Schema) SetRootSchemaName(name string) { + d.rootSchema.property = name +} + +// Parses a subSchema +// +// Pretty long function ( sorry :) )... but pretty straight forward, repetitive and boring +// Not much magic involved here, most of the job is to validate the key names and their values, +// then the values are copied into subSchema struct +// +func (d *Schema) parseSchema(documentNode interface{}, currentSchema *subSchema) error { + + if currentSchema.draft == nil { + if currentSchema.parent == nil { + return errors.New("Draft not set") + } + currentSchema.draft = currentSchema.parent.draft + } + + // As of draft 6 "true" is equivalent to an empty schema "{}" and false equals "{"not":{}}" + if *currentSchema.draft >= Draft6 && isKind(documentNode, reflect.Bool) { + b := documentNode.(bool) + currentSchema.pass = &b + return nil + } + + if !isKind(documentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.ParseError(), + ErrorDetails{ + "expected": STRING_SCHEMA, + }, + )) + } + + m := documentNode.(map[string]interface{}) + + if currentSchema.parent == nil { + currentSchema.ref = &d.documentReference + currentSchema.id = &d.documentReference + } + + if currentSchema.id == nil && currentSchema.parent != nil { + currentSchema.id = currentSchema.parent.id + } + + // In draft 6 the id keyword was renamed to $id + // Hybrid mode uses the old id by default + var keyID string + + switch *currentSchema.draft { + case Draft4: + keyID = KEY_ID + case Hybrid: + keyID = KEY_ID_NEW + if existsMapKey(m, KEY_ID) { + keyID = KEY_ID + } + default: + keyID = KEY_ID_NEW + } + if existsMapKey(m, keyID) && !isKind(m[keyID], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": keyID, + }, + )) + } + if k, ok := m[keyID].(string); ok { + jsonReference, err := gojsonreference.NewJsonReference(k) + if err != nil { + return err + } + if currentSchema == d.rootSchema { + currentSchema.id = &jsonReference + } else { + ref, err := currentSchema.parent.id.Inherits(jsonReference) + if err != nil { + return err + } + currentSchema.id = ref + } + } + + // definitions + if existsMapKey(m, KEY_DEFINITIONS) { + if isKind(m[KEY_DEFINITIONS], reflect.Map, reflect.Bool) { + for _, dv := range m[KEY_DEFINITIONS].(map[string]interface{}) { + if isKind(dv, reflect.Map, reflect.Bool) { + + newSchema := &subSchema{property: KEY_DEFINITIONS, parent: currentSchema} + + err := d.parseSchema(dv, newSchema) + + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_ARRAY_OF_SCHEMAS, + "given": KEY_DEFINITIONS, + }, + )) + } + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_ARRAY_OF_SCHEMAS, + "given": KEY_DEFINITIONS, + }, + )) + } + + } + + // title + if existsMapKey(m, KEY_TITLE) && !isKind(m[KEY_TITLE], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_TITLE, + }, + )) + } + if k, ok := m[KEY_TITLE].(string); ok { + currentSchema.title = &k + } + + // description + if existsMapKey(m, KEY_DESCRIPTION) && !isKind(m[KEY_DESCRIPTION], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_DESCRIPTION, + }, + )) + } + if k, ok := m[KEY_DESCRIPTION].(string); ok { + currentSchema.description = &k + } + + // $ref + if existsMapKey(m, KEY_REF) && !isKind(m[KEY_REF], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_REF, + }, + )) + } + + if k, ok := m[KEY_REF].(string); ok { + + jsonReference, err := gojsonreference.NewJsonReference(k) + if err != nil { + return err + } + + currentSchema.ref = &jsonReference + + if sch, ok := d.referencePool.Get(currentSchema.ref.String()); ok { + currentSchema.refSchema = sch + } else { + err := d.parseReference(documentNode, currentSchema) + + if err != nil { + return err + } + + return nil + } + } + + // type + if existsMapKey(m, KEY_TYPE) { + if isKind(m[KEY_TYPE], reflect.String) { + if k, ok := m[KEY_TYPE].(string); ok { + err := currentSchema.types.Add(k) + if err != nil { + return err + } + } + } else { + if isKind(m[KEY_TYPE], reflect.Slice) { + arrayOfTypes := m[KEY_TYPE].([]interface{}) + for _, typeInArray := range arrayOfTypes { + if reflect.ValueOf(typeInArray).Kind() != reflect.String { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING + "/" + STRING_ARRAY_OF_STRINGS, + "given": KEY_TYPE, + }, + )) + } + if err := currentSchema.types.Add(typeInArray.(string)); err != nil { + return err + } + } + + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING + "/" + STRING_ARRAY_OF_STRINGS, + "given": KEY_TYPE, + }, + )) + } + } + } + + // properties + if existsMapKey(m, KEY_PROPERTIES) { + err := d.parseProperties(m[KEY_PROPERTIES], currentSchema) + if err != nil { + return err + } + } + + // additionalProperties + if existsMapKey(m, KEY_ADDITIONAL_PROPERTIES) { + if isKind(m[KEY_ADDITIONAL_PROPERTIES], reflect.Bool) { + currentSchema.additionalProperties = m[KEY_ADDITIONAL_PROPERTIES].(bool) + } else if isKind(m[KEY_ADDITIONAL_PROPERTIES], reflect.Map) { + newSchema := &subSchema{property: KEY_ADDITIONAL_PROPERTIES, parent: currentSchema, ref: currentSchema.ref} + currentSchema.additionalProperties = newSchema + err := d.parseSchema(m[KEY_ADDITIONAL_PROPERTIES], newSchema) + if err != nil { + return errors.New(err.Error()) + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN + "/" + STRING_SCHEMA, + "given": KEY_ADDITIONAL_PROPERTIES, + }, + )) + } + } + + // patternProperties + if existsMapKey(m, KEY_PATTERN_PROPERTIES) { + if isKind(m[KEY_PATTERN_PROPERTIES], reflect.Map) { + patternPropertiesMap := m[KEY_PATTERN_PROPERTIES].(map[string]interface{}) + if len(patternPropertiesMap) > 0 { + currentSchema.patternProperties = make(map[string]*subSchema) + for k, v := range patternPropertiesMap { + _, err := regexp.MatchString(k, "") + if err != nil { + return errors.New(formatErrorDescription( + Locale.RegexPattern(), + ErrorDetails{"pattern": k}, + )) + } + newSchema := &subSchema{property: k, parent: currentSchema, ref: currentSchema.ref} + err = d.parseSchema(v, newSchema) + if err != nil { + return errors.New(err.Error()) + } + currentSchema.patternProperties[k] = newSchema + } + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA, + "given": KEY_PATTERN_PROPERTIES, + }, + )) + } + } + + // propertyNames + if existsMapKey(m, KEY_PROPERTY_NAMES) && *currentSchema.draft >= Draft6 { + if isKind(m[KEY_PROPERTY_NAMES], reflect.Map, reflect.Bool) { + newSchema := &subSchema{property: KEY_PROPERTY_NAMES, parent: currentSchema, ref: currentSchema.ref} + currentSchema.propertyNames = newSchema + err := d.parseSchema(m[KEY_PROPERTY_NAMES], newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA, + "given": KEY_PATTERN_PROPERTIES, + }, + )) + } + } + + // dependencies + if existsMapKey(m, KEY_DEPENDENCIES) { + err := d.parseDependencies(m[KEY_DEPENDENCIES], currentSchema) + if err != nil { + return err + } + } + + // items + if existsMapKey(m, KEY_ITEMS) { + if isKind(m[KEY_ITEMS], reflect.Slice) { + for _, itemElement := range m[KEY_ITEMS].([]interface{}) { + if isKind(itemElement, reflect.Map, reflect.Bool) { + newSchema := &subSchema{parent: currentSchema, property: KEY_ITEMS} + newSchema.ref = currentSchema.ref + currentSchema.itemsChildren = append(currentSchema.itemsChildren, newSchema) + err := d.parseSchema(itemElement, newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA + "/" + STRING_ARRAY_OF_SCHEMAS, + "given": KEY_ITEMS, + }, + )) + } + currentSchema.itemsChildrenIsSingleSchema = false + } + } else if isKind(m[KEY_ITEMS], reflect.Map, reflect.Bool) { + newSchema := &subSchema{parent: currentSchema, property: KEY_ITEMS} + newSchema.ref = currentSchema.ref + currentSchema.itemsChildren = append(currentSchema.itemsChildren, newSchema) + err := d.parseSchema(m[KEY_ITEMS], newSchema) + if err != nil { + return err + } + currentSchema.itemsChildrenIsSingleSchema = true + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA + "/" + STRING_ARRAY_OF_SCHEMAS, + "given": KEY_ITEMS, + }, + )) + } + } + + // additionalItems + if existsMapKey(m, KEY_ADDITIONAL_ITEMS) { + if isKind(m[KEY_ADDITIONAL_ITEMS], reflect.Bool) { + currentSchema.additionalItems = m[KEY_ADDITIONAL_ITEMS].(bool) + } else if isKind(m[KEY_ADDITIONAL_ITEMS], reflect.Map) { + newSchema := &subSchema{property: KEY_ADDITIONAL_ITEMS, parent: currentSchema, ref: currentSchema.ref} + currentSchema.additionalItems = newSchema + err := d.parseSchema(m[KEY_ADDITIONAL_ITEMS], newSchema) + if err != nil { + return errors.New(err.Error()) + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN + "/" + STRING_SCHEMA, + "given": KEY_ADDITIONAL_ITEMS, + }, + )) + } + } + + // validation : number / integer + + if existsMapKey(m, KEY_MULTIPLE_OF) { + multipleOfValue := mustBeNumber(m[KEY_MULTIPLE_OF]) + if multipleOfValue == nil { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_NUMBER, + "given": KEY_MULTIPLE_OF, + }, + )) + } + if multipleOfValue.Cmp(big.NewRat(0, 1)) <= 0 { + return errors.New(formatErrorDescription( + Locale.GreaterThanZero(), + ErrorDetails{"number": KEY_MULTIPLE_OF}, + )) + } + currentSchema.multipleOf = multipleOfValue + } + + if existsMapKey(m, KEY_MINIMUM) { + minimumValue := mustBeNumber(m[KEY_MINIMUM]) + if minimumValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_MINIMUM, "y": STRING_NUMBER}, + )) + } + currentSchema.minimum = minimumValue + } + + if existsMapKey(m, KEY_EXCLUSIVE_MINIMUM) { + switch *currentSchema.draft { + case Draft4: + if !isKind(m[KEY_EXCLUSIVE_MINIMUM], reflect.Bool) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN, + "given": KEY_EXCLUSIVE_MINIMUM, + }, + )) + } + if currentSchema.minimum == nil { + return errors.New(formatErrorDescription( + Locale.CannotBeUsedWithout(), + ErrorDetails{"x": KEY_EXCLUSIVE_MINIMUM, "y": KEY_MINIMUM}, + )) + } + if m[KEY_EXCLUSIVE_MINIMUM].(bool) { + currentSchema.exclusiveMinimum = currentSchema.minimum + currentSchema.minimum = nil + } + case Hybrid: + if isKind(m[KEY_EXCLUSIVE_MINIMUM], reflect.Bool) { + if currentSchema.minimum == nil { + return errors.New(formatErrorDescription( + Locale.CannotBeUsedWithout(), + ErrorDetails{"x": KEY_EXCLUSIVE_MINIMUM, "y": KEY_MINIMUM}, + )) + } + if m[KEY_EXCLUSIVE_MINIMUM].(bool) { + currentSchema.exclusiveMinimum = currentSchema.minimum + currentSchema.minimum = nil + } + } else if isJSONNumber(m[KEY_EXCLUSIVE_MINIMUM]) { + currentSchema.exclusiveMinimum = mustBeNumber(m[KEY_EXCLUSIVE_MINIMUM]) + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN + "/" + TYPE_NUMBER, + "given": KEY_EXCLUSIVE_MINIMUM, + }, + )) + } + default: + if isJSONNumber(m[KEY_EXCLUSIVE_MINIMUM]) { + currentSchema.exclusiveMinimum = mustBeNumber(m[KEY_EXCLUSIVE_MINIMUM]) + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_NUMBER, + "given": KEY_EXCLUSIVE_MINIMUM, + }, + )) + } + } + } + + if existsMapKey(m, KEY_MAXIMUM) { + maximumValue := mustBeNumber(m[KEY_MAXIMUM]) + if maximumValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_MAXIMUM, "y": STRING_NUMBER}, + )) + } + currentSchema.maximum = maximumValue + } + + if existsMapKey(m, KEY_EXCLUSIVE_MAXIMUM) { + switch *currentSchema.draft { + case Draft4: + if !isKind(m[KEY_EXCLUSIVE_MAXIMUM], reflect.Bool) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN, + "given": KEY_EXCLUSIVE_MAXIMUM, + }, + )) + } + if currentSchema.maximum == nil { + return errors.New(formatErrorDescription( + Locale.CannotBeUsedWithout(), + ErrorDetails{"x": KEY_EXCLUSIVE_MAXIMUM, "y": KEY_MAXIMUM}, + )) + } + if m[KEY_EXCLUSIVE_MAXIMUM].(bool) { + currentSchema.exclusiveMaximum = currentSchema.maximum + currentSchema.maximum = nil + } + case Hybrid: + if isKind(m[KEY_EXCLUSIVE_MAXIMUM], reflect.Bool) { + if currentSchema.maximum == nil { + return errors.New(formatErrorDescription( + Locale.CannotBeUsedWithout(), + ErrorDetails{"x": KEY_EXCLUSIVE_MAXIMUM, "y": KEY_MAXIMUM}, + )) + } + if m[KEY_EXCLUSIVE_MAXIMUM].(bool) { + currentSchema.exclusiveMaximum = currentSchema.maximum + currentSchema.maximum = nil + } + } else if isJSONNumber(m[KEY_EXCLUSIVE_MAXIMUM]) { + currentSchema.exclusiveMaximum = mustBeNumber(m[KEY_EXCLUSIVE_MAXIMUM]) + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN + "/" + TYPE_NUMBER, + "given": KEY_EXCLUSIVE_MAXIMUM, + }, + )) + } + default: + if isJSONNumber(m[KEY_EXCLUSIVE_MAXIMUM]) { + currentSchema.exclusiveMaximum = mustBeNumber(m[KEY_EXCLUSIVE_MAXIMUM]) + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_NUMBER, + "given": KEY_EXCLUSIVE_MAXIMUM, + }, + )) + } + } + } + + // validation : string + + if existsMapKey(m, KEY_MIN_LENGTH) { + minLengthIntegerValue := mustBeInteger(m[KEY_MIN_LENGTH]) + if minLengthIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MIN_LENGTH, "y": TYPE_INTEGER}, + )) + } + if *minLengthIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MIN_LENGTH}, + )) + } + currentSchema.minLength = minLengthIntegerValue + } + + if existsMapKey(m, KEY_MAX_LENGTH) { + maxLengthIntegerValue := mustBeInteger(m[KEY_MAX_LENGTH]) + if maxLengthIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MAX_LENGTH, "y": TYPE_INTEGER}, + )) + } + if *maxLengthIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MAX_LENGTH}, + )) + } + currentSchema.maxLength = maxLengthIntegerValue + } + + if currentSchema.minLength != nil && currentSchema.maxLength != nil { + if *currentSchema.minLength > *currentSchema.maxLength { + return errors.New(formatErrorDescription( + Locale.CannotBeGT(), + ErrorDetails{"x": KEY_MIN_LENGTH, "y": KEY_MAX_LENGTH}, + )) + } + } + + if existsMapKey(m, KEY_PATTERN) { + if isKind(m[KEY_PATTERN], reflect.String) { + regexpObject, err := regexp.Compile(m[KEY_PATTERN].(string)) + if err != nil { + return errors.New(formatErrorDescription( + Locale.MustBeValidRegex(), + ErrorDetails{"key": KEY_PATTERN}, + )) + } + currentSchema.pattern = regexpObject + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_PATTERN, "y": TYPE_STRING}, + )) + } + } + + if existsMapKey(m, KEY_FORMAT) { + formatString, ok := m[KEY_FORMAT].(string) + if !ok { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": KEY_FORMAT, "type": TYPE_STRING}, + )) + } + currentSchema.format = formatString + } + + // validation : object + + if existsMapKey(m, KEY_MIN_PROPERTIES) { + minPropertiesIntegerValue := mustBeInteger(m[KEY_MIN_PROPERTIES]) + if minPropertiesIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MIN_PROPERTIES, "y": TYPE_INTEGER}, + )) + } + if *minPropertiesIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MIN_PROPERTIES}, + )) + } + currentSchema.minProperties = minPropertiesIntegerValue + } + + if existsMapKey(m, KEY_MAX_PROPERTIES) { + maxPropertiesIntegerValue := mustBeInteger(m[KEY_MAX_PROPERTIES]) + if maxPropertiesIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MAX_PROPERTIES, "y": TYPE_INTEGER}, + )) + } + if *maxPropertiesIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MAX_PROPERTIES}, + )) + } + currentSchema.maxProperties = maxPropertiesIntegerValue + } + + if currentSchema.minProperties != nil && currentSchema.maxProperties != nil { + if *currentSchema.minProperties > *currentSchema.maxProperties { + return errors.New(formatErrorDescription( + Locale.KeyCannotBeGreaterThan(), + ErrorDetails{"key": KEY_MIN_PROPERTIES, "y": KEY_MAX_PROPERTIES}, + )) + } + } + + if existsMapKey(m, KEY_REQUIRED) { + if isKind(m[KEY_REQUIRED], reflect.Slice) { + requiredValues := m[KEY_REQUIRED].([]interface{}) + for _, requiredValue := range requiredValues { + if isKind(requiredValue, reflect.String) { + if isStringInSlice(currentSchema.required, requiredValue.(string)) { + return errors.New(formatErrorDescription( + Locale.KeyItemsMustBeUnique(), + ErrorDetails{"key": KEY_REQUIRED}, + )) + } + currentSchema.required = append(currentSchema.required, requiredValue.(string)) + } else { + return errors.New(formatErrorDescription( + Locale.KeyItemsMustBeOfType(), + ErrorDetails{"key": KEY_REQUIRED, "type": TYPE_STRING}, + )) + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_REQUIRED, "y": TYPE_ARRAY}, + )) + } + } + + // validation : array + + if existsMapKey(m, KEY_MIN_ITEMS) { + minItemsIntegerValue := mustBeInteger(m[KEY_MIN_ITEMS]) + if minItemsIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MIN_ITEMS, "y": TYPE_INTEGER}, + )) + } + if *minItemsIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MIN_ITEMS}, + )) + } + currentSchema.minItems = minItemsIntegerValue + } + + if existsMapKey(m, KEY_MAX_ITEMS) { + maxItemsIntegerValue := mustBeInteger(m[KEY_MAX_ITEMS]) + if maxItemsIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MAX_ITEMS, "y": TYPE_INTEGER}, + )) + } + if *maxItemsIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MAX_ITEMS}, + )) + } + currentSchema.maxItems = maxItemsIntegerValue + } + + if existsMapKey(m, KEY_UNIQUE_ITEMS) { + if isKind(m[KEY_UNIQUE_ITEMS], reflect.Bool) { + currentSchema.uniqueItems = m[KEY_UNIQUE_ITEMS].(bool) + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_UNIQUE_ITEMS, "y": TYPE_BOOLEAN}, + )) + } + } + + if existsMapKey(m, KEY_CONTAINS) && *currentSchema.draft >= Draft6 { + newSchema := &subSchema{property: KEY_CONTAINS, parent: currentSchema, ref: currentSchema.ref} + currentSchema.contains = newSchema + err := d.parseSchema(m[KEY_CONTAINS], newSchema) + if err != nil { + return err + } + } + + // validation : all + + if existsMapKey(m, KEY_CONST) && *currentSchema.draft >= Draft6 { + is, err := marshalWithoutNumber(m[KEY_CONST]) + if err != nil { + return err + } + currentSchema._const = is + } + + if existsMapKey(m, KEY_ENUM) { + if isKind(m[KEY_ENUM], reflect.Slice) { + for _, v := range m[KEY_ENUM].([]interface{}) { + is, err := marshalWithoutNumber(v) + if err != nil { + return err + } + if isStringInSlice(currentSchema.enum, *is) { + return errors.New(formatErrorDescription( + Locale.KeyItemsMustBeUnique(), + ErrorDetails{"key": KEY_ENUM}, + )) + } + currentSchema.enum = append(currentSchema.enum, *is) + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ENUM, "y": TYPE_ARRAY}, + )) + } + } + + // validation : subSchema + + if existsMapKey(m, KEY_ONE_OF) { + if isKind(m[KEY_ONE_OF], reflect.Slice) { + for _, v := range m[KEY_ONE_OF].([]interface{}) { + newSchema := &subSchema{property: KEY_ONE_OF, parent: currentSchema, ref: currentSchema.ref} + currentSchema.oneOf = append(currentSchema.oneOf, newSchema) + err := d.parseSchema(v, newSchema) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ONE_OF, "y": TYPE_ARRAY}, + )) + } + } + + if existsMapKey(m, KEY_ANY_OF) { + if isKind(m[KEY_ANY_OF], reflect.Slice) { + for _, v := range m[KEY_ANY_OF].([]interface{}) { + newSchema := &subSchema{property: KEY_ANY_OF, parent: currentSchema, ref: currentSchema.ref} + currentSchema.anyOf = append(currentSchema.anyOf, newSchema) + err := d.parseSchema(v, newSchema) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ANY_OF, "y": TYPE_ARRAY}, + )) + } + } + + if existsMapKey(m, KEY_ALL_OF) { + if isKind(m[KEY_ALL_OF], reflect.Slice) { + for _, v := range m[KEY_ALL_OF].([]interface{}) { + newSchema := &subSchema{property: KEY_ALL_OF, parent: currentSchema, ref: currentSchema.ref} + currentSchema.allOf = append(currentSchema.allOf, newSchema) + err := d.parseSchema(v, newSchema) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ANY_OF, "y": TYPE_ARRAY}, + )) + } + } + + if existsMapKey(m, KEY_NOT) { + if isKind(m[KEY_NOT], reflect.Map, reflect.Bool) { + newSchema := &subSchema{property: KEY_NOT, parent: currentSchema, ref: currentSchema.ref} + currentSchema.not = newSchema + err := d.parseSchema(m[KEY_NOT], newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_NOT, "y": TYPE_OBJECT}, + )) + } + } + + if *currentSchema.draft >= Draft7 { + if existsMapKey(m, KEY_IF) { + if isKind(m[KEY_IF], reflect.Map, reflect.Bool) { + newSchema := &subSchema{property: KEY_IF, parent: currentSchema, ref: currentSchema.ref} + currentSchema._if = newSchema + err := d.parseSchema(m[KEY_IF], newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_IF, "y": TYPE_OBJECT}, + )) + } + } + + if existsMapKey(m, KEY_THEN) { + if isKind(m[KEY_THEN], reflect.Map, reflect.Bool) { + newSchema := &subSchema{property: KEY_THEN, parent: currentSchema, ref: currentSchema.ref} + currentSchema._then = newSchema + err := d.parseSchema(m[KEY_THEN], newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_THEN, "y": TYPE_OBJECT}, + )) + } + } + + if existsMapKey(m, KEY_ELSE) { + if isKind(m[KEY_ELSE], reflect.Map, reflect.Bool) { + newSchema := &subSchema{property: KEY_ELSE, parent: currentSchema, ref: currentSchema.ref} + currentSchema._else = newSchema + err := d.parseSchema(m[KEY_ELSE], newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ELSE, "y": TYPE_OBJECT}, + )) + } + } + } + + return nil +} + +func (d *Schema) parseReference(documentNode interface{}, currentSchema *subSchema) error { + var ( + refdDocumentNode interface{} + dsp *schemaPoolDocument + err error + ) + + newSchema := &subSchema{property: KEY_REF, parent: currentSchema, ref: currentSchema.ref} + + d.referencePool.Add(currentSchema.ref.String(), newSchema) + + dsp, err = d.pool.GetDocument(*currentSchema.ref) + if err != nil { + return err + } + newSchema.id = currentSchema.ref + + refdDocumentNode = dsp.Document + newSchema.draft = dsp.Draft + + if err != nil { + return err + } + + if !isKind(refdDocumentNode, reflect.Map, reflect.Bool) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": STRING_SCHEMA, "type": TYPE_OBJECT}, + )) + } + + err = d.parseSchema(refdDocumentNode, newSchema) + if err != nil { + return err + } + + currentSchema.refSchema = newSchema + + return nil + +} + +func (d *Schema) parseProperties(documentNode interface{}, currentSchema *subSchema) error { + + if !isKind(documentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": STRING_PROPERTIES, "type": TYPE_OBJECT}, + )) + } + + m := documentNode.(map[string]interface{}) + for k := range m { + schemaProperty := k + newSchema := &subSchema{property: schemaProperty, parent: currentSchema, ref: currentSchema.ref} + currentSchema.propertiesChildren = append(currentSchema.propertiesChildren, newSchema) + err := d.parseSchema(m[k], newSchema) + if err != nil { + return err + } + } + + return nil +} + +func (d *Schema) parseDependencies(documentNode interface{}, currentSchema *subSchema) error { + + if !isKind(documentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": KEY_DEPENDENCIES, "type": TYPE_OBJECT}, + )) + } + + m := documentNode.(map[string]interface{}) + currentSchema.dependencies = make(map[string]interface{}) + + for k := range m { + switch reflect.ValueOf(m[k]).Kind() { + + case reflect.Slice: + values := m[k].([]interface{}) + var valuesToRegister []string + + for _, value := range values { + if !isKind(value, reflect.String) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{ + "key": STRING_DEPENDENCY, + "type": STRING_SCHEMA_OR_ARRAY_OF_STRINGS, + }, + )) + } + valuesToRegister = append(valuesToRegister, value.(string)) + currentSchema.dependencies[k] = valuesToRegister + } + + case reflect.Map, reflect.Bool: + depSchema := &subSchema{property: k, parent: currentSchema, ref: currentSchema.ref} + err := d.parseSchema(m[k], depSchema) + if err != nil { + return err + } + currentSchema.dependencies[k] = depSchema + + default: + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{ + "key": STRING_DEPENDENCY, + "type": STRING_SCHEMA_OR_ARRAY_OF_STRINGS, + }, + )) + } + + } + + return nil +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go b/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go new file mode 100644 index 000000000..20db0c1f9 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go @@ -0,0 +1,206 @@ +// Copyright 2018 johandorland ( https://github.com/johandorland ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gojsonschema + +import ( + "bytes" + "errors" + + "github.com/xeipuuv/gojsonreference" +) + +// SchemaLoader is used to load schemas +type SchemaLoader struct { + pool *schemaPool + AutoDetect bool + Validate bool + Draft Draft +} + +// NewSchemaLoader creates a new NewSchemaLoader +func NewSchemaLoader() *SchemaLoader { + + ps := &SchemaLoader{ + pool: &schemaPool{ + schemaPoolDocuments: make(map[string]*schemaPoolDocument), + }, + AutoDetect: true, + Validate: false, + Draft: Hybrid, + } + ps.pool.autoDetect = &ps.AutoDetect + + return ps +} + +func (sl *SchemaLoader) validateMetaschema(documentNode interface{}) error { + + var ( + schema string + err error + ) + if sl.AutoDetect { + schema, _, err = parseSchemaURL(documentNode) + if err != nil { + return err + } + } + + // If no explicit "$schema" is used, use the default metaschema associated with the draft used + if schema == "" { + if sl.Draft == Hybrid { + return nil + } + schema = drafts.GetSchemaURL(sl.Draft) + } + + //Disable validation when loading the metaschema to prevent an infinite recursive loop + sl.Validate = false + + metaSchema, err := sl.Compile(NewReferenceLoader(schema)) + + if err != nil { + return err + } + + sl.Validate = true + + result := metaSchema.validateDocument(documentNode) + + if !result.Valid() { + var res bytes.Buffer + for _, err := range result.Errors() { + res.WriteString(err.String()) + res.WriteString("\n") + } + return errors.New(res.String()) + } + + return nil +} + +// AddSchemas adds an arbritrary amount of schemas to the schema cache. As this function does not require +// an explicit URL, every schema should contain an $id, so that it can be referenced by the main schema +func (sl *SchemaLoader) AddSchemas(loaders ...JSONLoader) error { + emptyRef, _ := gojsonreference.NewJsonReference("") + + for _, loader := range loaders { + doc, err := loader.LoadJSON() + + if err != nil { + return err + } + + if sl.Validate { + if err := sl.validateMetaschema(doc); err != nil { + return err + } + } + + // Directly use the Recursive function, so that it get only added to the schema pool by $id + // and not by the ref of the document as it's empty + if err = sl.pool.parseReferences(doc, emptyRef, false); err != nil { + return err + } + } + + return nil +} + +//AddSchema adds a schema under the provided URL to the schema cache +func (sl *SchemaLoader) AddSchema(url string, loader JSONLoader) error { + + ref, err := gojsonreference.NewJsonReference(url) + + if err != nil { + return err + } + + doc, err := loader.LoadJSON() + + if err != nil { + return err + } + + if sl.Validate { + if err := sl.validateMetaschema(doc); err != nil { + return err + } + } + + return sl.pool.parseReferences(doc, ref, true) +} + +// Compile loads and compiles a schema +func (sl *SchemaLoader) Compile(rootSchema JSONLoader) (*Schema, error) { + + ref, err := rootSchema.JsonReference() + + if err != nil { + return nil, err + } + + d := Schema{} + d.pool = sl.pool + d.pool.jsonLoaderFactory = rootSchema.LoaderFactory() + d.documentReference = ref + d.referencePool = newSchemaReferencePool() + + var doc interface{} + if ref.String() != "" { + // Get document from schema pool + spd, err := d.pool.GetDocument(d.documentReference) + if err != nil { + return nil, err + } + doc = spd.Document + } else { + // Load JSON directly + doc, err = rootSchema.LoadJSON() + if err != nil { + return nil, err + } + // References need only be parsed if loading JSON directly + // as pool.GetDocument already does this for us if loading by reference + err = sl.pool.parseReferences(doc, ref, true) + if err != nil { + return nil, err + } + } + + if sl.Validate { + if err := sl.validateMetaschema(doc); err != nil { + return nil, err + } + } + + draft := sl.Draft + if sl.AutoDetect { + _, detectedDraft, err := parseSchemaURL(doc) + if err != nil { + return nil, err + } + if detectedDraft != nil { + draft = *detectedDraft + } + } + + err = d.parse(doc, draft) + if err != nil { + return nil, err + } + + return &d, nil +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/schemaPool.go b/vendor/github.com/xeipuuv/gojsonschema/schemaPool.go new file mode 100644 index 000000000..35b1cc630 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/schemaPool.go @@ -0,0 +1,215 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Defines resources pooling. +// Eases referencing and avoids downloading the same resource twice. +// +// created 26-02-2013 + +package gojsonschema + +import ( + "errors" + "fmt" + "reflect" + + "github.com/xeipuuv/gojsonreference" +) + +type schemaPoolDocument struct { + Document interface{} + Draft *Draft +} + +type schemaPool struct { + schemaPoolDocuments map[string]*schemaPoolDocument + jsonLoaderFactory JSONLoaderFactory + autoDetect *bool +} + +func (p *schemaPool) parseReferences(document interface{}, ref gojsonreference.JsonReference, pooled bool) error { + + var ( + draft *Draft + err error + reference = ref.String() + ) + // Only the root document should be added to the schema pool if pooled is true + if _, ok := p.schemaPoolDocuments[reference]; pooled && ok { + return fmt.Errorf("Reference already exists: \"%s\"", reference) + } + + if *p.autoDetect { + _, draft, err = parseSchemaURL(document) + if err != nil { + return err + } + } + + err = p.parseReferencesRecursive(document, ref, draft) + + if pooled { + p.schemaPoolDocuments[reference] = &schemaPoolDocument{Document: document, Draft: draft} + } + + return err +} + +func (p *schemaPool) parseReferencesRecursive(document interface{}, ref gojsonreference.JsonReference, draft *Draft) error { + // parseReferencesRecursive parses a JSON document and resolves all $id and $ref references. + // For $ref references it takes into account the $id scope it is in and replaces + // the reference by the absolute resolved reference + + // When encountering errors it fails silently. Error handling is done when the schema + // is syntactically parsed and any error encountered here should also come up there. + switch m := document.(type) { + case []interface{}: + for _, v := range m { + p.parseReferencesRecursive(v, ref, draft) + } + case map[string]interface{}: + localRef := &ref + + keyID := KEY_ID_NEW + if existsMapKey(m, KEY_ID) { + keyID = KEY_ID + } + if existsMapKey(m, keyID) && isKind(m[keyID], reflect.String) { + jsonReference, err := gojsonreference.NewJsonReference(m[keyID].(string)) + if err == nil { + localRef, err = ref.Inherits(jsonReference) + if err == nil { + if _, ok := p.schemaPoolDocuments[localRef.String()]; ok { + return fmt.Errorf("Reference already exists: \"%s\"", localRef.String()) + } + p.schemaPoolDocuments[localRef.String()] = &schemaPoolDocument{Document: document, Draft: draft} + } + } + } + + if existsMapKey(m, KEY_REF) && isKind(m[KEY_REF], reflect.String) { + jsonReference, err := gojsonreference.NewJsonReference(m[KEY_REF].(string)) + if err == nil { + absoluteRef, err := localRef.Inherits(jsonReference) + if err == nil { + m[KEY_REF] = absoluteRef.String() + } + } + } + + for k, v := range m { + // const and enums should be interpreted literally, so ignore them + if k == KEY_CONST || k == KEY_ENUM { + continue + } + // Something like a property or a dependency is not a valid schema, as it might describe properties named "$ref", "$id" or "const", etc + // Therefore don't treat it like a schema. + if k == KEY_PROPERTIES || k == KEY_DEPENDENCIES || k == KEY_PATTERN_PROPERTIES { + if child, ok := v.(map[string]interface{}); ok { + for _, v := range child { + p.parseReferencesRecursive(v, *localRef, draft) + } + } + } else { + p.parseReferencesRecursive(v, *localRef, draft) + } + } + } + return nil +} + +func (p *schemaPool) GetDocument(reference gojsonreference.JsonReference) (*schemaPoolDocument, error) { + + var ( + spd *schemaPoolDocument + draft *Draft + ok bool + err error + ) + + if internalLogEnabled { + internalLog("Get Document ( %s )", reference.String()) + } + + // Create a deep copy, so we can remove the fragment part later on without altering the original + refToURL, _ := gojsonreference.NewJsonReference(reference.String()) + + // First check if the given fragment is a location independent identifier + // http://json-schema.org/latest/json-schema-core.html#rfc.section.8.2.3 + + if spd, ok = p.schemaPoolDocuments[refToURL.String()]; ok { + if internalLogEnabled { + internalLog(" From pool") + } + return spd, nil + } + + // If the given reference is not a location independent identifier, + // strip the fragment and look for a document with it's base URI + + refToURL.GetUrl().Fragment = "" + + if cachedSpd, ok := p.schemaPoolDocuments[refToURL.String()]; ok { + document, _, err := reference.GetPointer().Get(cachedSpd.Document) + + if err != nil { + return nil, err + } + + if internalLogEnabled { + internalLog(" From pool") + } + + spd = &schemaPoolDocument{Document: document, Draft: cachedSpd.Draft} + p.schemaPoolDocuments[reference.String()] = spd + + return spd, nil + } + + // It is not possible to load anything remotely that is not canonical... + if !reference.IsCanonical() { + return nil, errors.New(formatErrorDescription( + Locale.ReferenceMustBeCanonical(), + ErrorDetails{"reference": reference.String()}, + )) + } + + jsonReferenceLoader := p.jsonLoaderFactory.New(reference.String()) + document, err := jsonReferenceLoader.LoadJSON() + + if err != nil { + return nil, err + } + + // add the whole document to the pool for potential re-use + p.parseReferences(document, refToURL, true) + + _, draft, _ = parseSchemaURL(document) + + // resolve the potential fragment and also cache it + document, _, err = reference.GetPointer().Get(document) + + if err != nil { + return nil, err + } + + return &schemaPoolDocument{Document: document, Draft: draft}, nil +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go b/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go new file mode 100644 index 000000000..6e5e1b5cd --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go @@ -0,0 +1,68 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Pool of referenced schemas. +// +// created 25-06-2013 + +package gojsonschema + +import ( + "fmt" +) + +type schemaReferencePool struct { + documents map[string]*subSchema +} + +func newSchemaReferencePool() *schemaReferencePool { + + p := &schemaReferencePool{} + p.documents = make(map[string]*subSchema) + + return p +} + +func (p *schemaReferencePool) Get(ref string) (r *subSchema, o bool) { + + if internalLogEnabled { + internalLog(fmt.Sprintf("Schema Reference ( %s )", ref)) + } + + if sch, ok := p.documents[ref]; ok { + if internalLogEnabled { + internalLog(fmt.Sprintf(" From pool")) + } + return sch, true + } + + return nil, false +} + +func (p *schemaReferencePool) Add(ref string, sch *subSchema) { + + if internalLogEnabled { + internalLog(fmt.Sprintf("Add Schema Reference %s to pool", ref)) + } + if _, ok := p.documents[ref]; !ok { + p.documents[ref] = sch + } +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/schemaType.go b/vendor/github.com/xeipuuv/gojsonschema/schemaType.go new file mode 100644 index 000000000..36b447a29 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/schemaType.go @@ -0,0 +1,83 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Helper structure to handle schema types, and the combination of them. +// +// created 28-02-2013 + +package gojsonschema + +import ( + "errors" + "fmt" + "strings" +) + +type jsonSchemaType struct { + types []string +} + +// Is the schema typed ? that is containing at least one type +// When not typed, the schema does not need any type validation +func (t *jsonSchemaType) IsTyped() bool { + return len(t.types) > 0 +} + +func (t *jsonSchemaType) Add(etype string) error { + + if !isStringInSlice(JSON_TYPES, etype) { + return errors.New(formatErrorDescription(Locale.NotAValidType(), ErrorDetails{"given": "/" + etype + "/", "expected": JSON_TYPES})) + } + + if t.Contains(etype) { + return errors.New(formatErrorDescription(Locale.Duplicated(), ErrorDetails{"type": etype})) + } + + t.types = append(t.types, etype) + + return nil +} + +func (t *jsonSchemaType) Contains(etype string) bool { + + for _, v := range t.types { + if v == etype { + return true + } + } + + return false +} + +func (t *jsonSchemaType) String() string { + + if len(t.types) == 0 { + return STRING_UNDEFINED // should never happen + } + + // Displayed as a list [type1,type2,...] + if len(t.types) > 1 { + return fmt.Sprintf("[%s]", strings.Join(t.types, ",")) + } + + // Only one type: name only + return t.types[0] +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/subSchema.go b/vendor/github.com/xeipuuv/gojsonschema/subSchema.go new file mode 100644 index 000000000..ec779812c --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/subSchema.go @@ -0,0 +1,149 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Defines the structure of a sub-subSchema. +// A sub-subSchema can contain other sub-schemas. +// +// created 27-02-2013 + +package gojsonschema + +import ( + "github.com/xeipuuv/gojsonreference" + "math/big" + "regexp" +) + +// Constants +const ( + KEY_SCHEMA = "$schema" + KEY_ID = "id" + KEY_ID_NEW = "$id" + KEY_REF = "$ref" + KEY_TITLE = "title" + KEY_DESCRIPTION = "description" + KEY_TYPE = "type" + KEY_ITEMS = "items" + KEY_ADDITIONAL_ITEMS = "additionalItems" + KEY_PROPERTIES = "properties" + KEY_PATTERN_PROPERTIES = "patternProperties" + KEY_ADDITIONAL_PROPERTIES = "additionalProperties" + KEY_PROPERTY_NAMES = "propertyNames" + KEY_DEFINITIONS = "definitions" + KEY_MULTIPLE_OF = "multipleOf" + KEY_MINIMUM = "minimum" + KEY_MAXIMUM = "maximum" + KEY_EXCLUSIVE_MINIMUM = "exclusiveMinimum" + KEY_EXCLUSIVE_MAXIMUM = "exclusiveMaximum" + KEY_MIN_LENGTH = "minLength" + KEY_MAX_LENGTH = "maxLength" + KEY_PATTERN = "pattern" + KEY_FORMAT = "format" + KEY_MIN_PROPERTIES = "minProperties" + KEY_MAX_PROPERTIES = "maxProperties" + KEY_DEPENDENCIES = "dependencies" + KEY_REQUIRED = "required" + KEY_MIN_ITEMS = "minItems" + KEY_MAX_ITEMS = "maxItems" + KEY_UNIQUE_ITEMS = "uniqueItems" + KEY_CONTAINS = "contains" + KEY_CONST = "const" + KEY_ENUM = "enum" + KEY_ONE_OF = "oneOf" + KEY_ANY_OF = "anyOf" + KEY_ALL_OF = "allOf" + KEY_NOT = "not" + KEY_IF = "if" + KEY_THEN = "then" + KEY_ELSE = "else" +) + +type subSchema struct { + draft *Draft + + // basic subSchema meta properties + id *gojsonreference.JsonReference + title *string + description *string + + property string + + // Quick pass/fail for boolean schemas + pass *bool + + // Types associated with the subSchema + types jsonSchemaType + + // Reference url + ref *gojsonreference.JsonReference + // Schema referenced + refSchema *subSchema + + // hierarchy + parent *subSchema + itemsChildren []*subSchema + itemsChildrenIsSingleSchema bool + propertiesChildren []*subSchema + + // validation : number / integer + multipleOf *big.Rat + maximum *big.Rat + exclusiveMaximum *big.Rat + minimum *big.Rat + exclusiveMinimum *big.Rat + + // validation : string + minLength *int + maxLength *int + pattern *regexp.Regexp + format string + + // validation : object + minProperties *int + maxProperties *int + required []string + + dependencies map[string]interface{} + additionalProperties interface{} + patternProperties map[string]*subSchema + propertyNames *subSchema + + // validation : array + minItems *int + maxItems *int + uniqueItems bool + contains *subSchema + + additionalItems interface{} + + // validation : all + _const *string //const is a golang keyword + enum []string + + // validation : subSchema + oneOf []*subSchema + anyOf []*subSchema + allOf []*subSchema + not *subSchema + _if *subSchema // if/else are golang keywords + _then *subSchema + _else *subSchema +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/types.go b/vendor/github.com/xeipuuv/gojsonschema/types.go new file mode 100644 index 000000000..0e6fd5173 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/types.go @@ -0,0 +1,62 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Contains const types for schema and JSON. +// +// created 28-02-2013 + +package gojsonschema + +// Type constants +const ( + TYPE_ARRAY = `array` + TYPE_BOOLEAN = `boolean` + TYPE_INTEGER = `integer` + TYPE_NUMBER = `number` + TYPE_NULL = `null` + TYPE_OBJECT = `object` + TYPE_STRING = `string` +) + +// JSON_TYPES hosts the list of type that are supported in JSON +var JSON_TYPES []string + +// SCHEMA_TYPES hosts the list of type that are supported in schemas +var SCHEMA_TYPES []string + +func init() { + JSON_TYPES = []string{ + TYPE_ARRAY, + TYPE_BOOLEAN, + TYPE_INTEGER, + TYPE_NUMBER, + TYPE_NULL, + TYPE_OBJECT, + TYPE_STRING} + + SCHEMA_TYPES = []string{ + TYPE_ARRAY, + TYPE_BOOLEAN, + TYPE_INTEGER, + TYPE_NUMBER, + TYPE_OBJECT, + TYPE_STRING} +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/utils.go b/vendor/github.com/xeipuuv/gojsonschema/utils.go new file mode 100644 index 000000000..a17d22e3b --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/utils.go @@ -0,0 +1,197 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Various utility functions. +// +// created 26-02-2013 + +package gojsonschema + +import ( + "encoding/json" + "math/big" + "reflect" +) + +func isKind(what interface{}, kinds ...reflect.Kind) bool { + target := what + if isJSONNumber(what) { + // JSON Numbers are strings! + target = *mustBeNumber(what) + } + targetKind := reflect.ValueOf(target).Kind() + for _, kind := range kinds { + if targetKind == kind { + return true + } + } + return false +} + +func existsMapKey(m map[string]interface{}, k string) bool { + _, ok := m[k] + return ok +} + +func isStringInSlice(s []string, what string) bool { + for i := range s { + if s[i] == what { + return true + } + } + return false +} + +// indexStringInSlice returns the index of the first instance of 'what' in s or -1 if it is not found in s. +func indexStringInSlice(s []string, what string) int { + for i := range s { + if s[i] == what { + return i + } + } + return -1 +} + +func marshalToJSONString(value interface{}) (*string, error) { + + mBytes, err := json.Marshal(value) + if err != nil { + return nil, err + } + + sBytes := string(mBytes) + return &sBytes, nil +} + +func marshalWithoutNumber(value interface{}) (*string, error) { + + // The JSON is decoded using https://golang.org/pkg/encoding/json/#Decoder.UseNumber + // This means the numbers are internally still represented as strings and therefore 1.00 is unequal to 1 + // One way to eliminate these differences is to decode and encode the JSON one more time without Decoder.UseNumber + // so that these differences in representation are removed + + jsonString, err := marshalToJSONString(value) + if err != nil { + return nil, err + } + + var document interface{} + + err = json.Unmarshal([]byte(*jsonString), &document) + if err != nil { + return nil, err + } + + return marshalToJSONString(document) +} + +func isJSONNumber(what interface{}) bool { + + switch what.(type) { + + case json.Number: + return true + } + + return false +} + +func checkJSONInteger(what interface{}) (isInt bool) { + + jsonNumber := what.(json.Number) + + bigFloat, isValidNumber := new(big.Rat).SetString(string(jsonNumber)) + + return isValidNumber && bigFloat.IsInt() + +} + +// same as ECMA Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER +const ( + maxJSONFloat = float64(1<<53 - 1) // 9007199254740991.0 2^53 - 1 + minJSONFloat = -float64(1<<53 - 1) //-9007199254740991.0 -2^53 - 1 +) + +func mustBeInteger(what interface{}) *int { + + if isJSONNumber(what) { + + number := what.(json.Number) + + isInt := checkJSONInteger(number) + + if isInt { + + int64Value, err := number.Int64() + if err != nil { + return nil + } + + int32Value := int(int64Value) + return &int32Value + } + + } + + return nil +} + +func mustBeNumber(what interface{}) *big.Rat { + + if isJSONNumber(what) { + number := what.(json.Number) + float64Value, success := new(big.Rat).SetString(string(number)) + if success { + return float64Value + } + } + + return nil + +} + +func convertDocumentNode(val interface{}) interface{} { + + if lval, ok := val.([]interface{}); ok { + + res := []interface{}{} + for _, v := range lval { + res = append(res, convertDocumentNode(v)) + } + + return res + + } + + if mval, ok := val.(map[interface{}]interface{}); ok { + + res := map[string]interface{}{} + + for k, v := range mval { + res[k.(string)] = convertDocumentNode(v) + } + + return res + + } + + return val +} diff --git a/vendor/github.com/xeipuuv/gojsonschema/validation.go b/vendor/github.com/xeipuuv/gojsonschema/validation.go new file mode 100644 index 000000000..74091bca1 --- /dev/null +++ b/vendor/github.com/xeipuuv/gojsonschema/validation.go @@ -0,0 +1,858 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Extends Schema and subSchema, implements the validation phase. +// +// created 28-02-2013 + +package gojsonschema + +import ( + "encoding/json" + "math/big" + "reflect" + "regexp" + "strconv" + "strings" + "unicode/utf8" +) + +// Validate loads and validates a JSON schema +func Validate(ls JSONLoader, ld JSONLoader) (*Result, error) { + // load schema + schema, err := NewSchema(ls) + if err != nil { + return nil, err + } + return schema.Validate(ld) +} + +// Validate loads and validates a JSON document +func (v *Schema) Validate(l JSONLoader) (*Result, error) { + root, err := l.LoadJSON() + if err != nil { + return nil, err + } + return v.validateDocument(root), nil +} + +func (v *Schema) validateDocument(root interface{}) *Result { + result := &Result{} + context := NewJsonContext(STRING_CONTEXT_ROOT, nil) + v.rootSchema.validateRecursive(v.rootSchema, root, result, context) + return result +} + +func (v *subSchema) subValidateWithContext(document interface{}, context *JsonContext) *Result { + result := &Result{} + v.validateRecursive(v, document, result, context) + return result +} + +// Walker function to validate the json recursively against the subSchema +func (v *subSchema) validateRecursive(currentSubSchema *subSchema, currentNode interface{}, result *Result, context *JsonContext) { + + if internalLogEnabled { + internalLog("validateRecursive %s", context.String()) + internalLog(" %v", currentNode) + } + + // Handle true/false schema as early as possible as all other fields will be nil + if currentSubSchema.pass != nil { + if !*currentSubSchema.pass { + result.addInternalError( + new(FalseError), + context, + currentNode, + ErrorDetails{}, + ) + } + return + } + + // Handle referenced schemas, returns directly when a $ref is found + if currentSubSchema.refSchema != nil { + v.validateRecursive(currentSubSchema.refSchema, currentNode, result, context) + return + } + + // Check for null value + if currentNode == nil { + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_NULL) { + result.addInternalError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_NULL, + }, + ) + return + } + + currentSubSchema.validateSchema(currentSubSchema, currentNode, result, context) + v.validateCommon(currentSubSchema, currentNode, result, context) + + } else { // Not a null value + + if isJSONNumber(currentNode) { + + value := currentNode.(json.Number) + + isInt := checkJSONInteger(value) + + validType := currentSubSchema.types.Contains(TYPE_NUMBER) || (isInt && currentSubSchema.types.Contains(TYPE_INTEGER)) + + if currentSubSchema.types.IsTyped() && !validType { + + givenType := TYPE_INTEGER + if !isInt { + givenType = TYPE_NUMBER + } + + result.addInternalError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": givenType, + }, + ) + return + } + + currentSubSchema.validateSchema(currentSubSchema, value, result, context) + v.validateNumber(currentSubSchema, value, result, context) + v.validateCommon(currentSubSchema, value, result, context) + v.validateString(currentSubSchema, value, result, context) + + } else { + + rValue := reflect.ValueOf(currentNode) + rKind := rValue.Kind() + + switch rKind { + + // Slice => JSON array + + case reflect.Slice: + + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_ARRAY) { + result.addInternalError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_ARRAY, + }, + ) + return + } + + castCurrentNode := currentNode.([]interface{}) + + currentSubSchema.validateSchema(currentSubSchema, castCurrentNode, result, context) + + v.validateArray(currentSubSchema, castCurrentNode, result, context) + v.validateCommon(currentSubSchema, castCurrentNode, result, context) + + // Map => JSON object + + case reflect.Map: + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_OBJECT) { + result.addInternalError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_OBJECT, + }, + ) + return + } + + castCurrentNode, ok := currentNode.(map[string]interface{}) + if !ok { + castCurrentNode = convertDocumentNode(currentNode).(map[string]interface{}) + } + + currentSubSchema.validateSchema(currentSubSchema, castCurrentNode, result, context) + + v.validateObject(currentSubSchema, castCurrentNode, result, context) + v.validateCommon(currentSubSchema, castCurrentNode, result, context) + + for _, pSchema := range currentSubSchema.propertiesChildren { + nextNode, ok := castCurrentNode[pSchema.property] + if ok { + subContext := NewJsonContext(pSchema.property, context) + v.validateRecursive(pSchema, nextNode, result, subContext) + } + } + + // Simple JSON values : string, number, boolean + + case reflect.Bool: + + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_BOOLEAN) { + result.addInternalError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_BOOLEAN, + }, + ) + return + } + + value := currentNode.(bool) + + currentSubSchema.validateSchema(currentSubSchema, value, result, context) + v.validateNumber(currentSubSchema, value, result, context) + v.validateCommon(currentSubSchema, value, result, context) + v.validateString(currentSubSchema, value, result, context) + + case reflect.String: + + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_STRING) { + result.addInternalError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_STRING, + }, + ) + return + } + + value := currentNode.(string) + + currentSubSchema.validateSchema(currentSubSchema, value, result, context) + v.validateNumber(currentSubSchema, value, result, context) + v.validateCommon(currentSubSchema, value, result, context) + v.validateString(currentSubSchema, value, result, context) + + } + + } + + } + + result.incrementScore() +} + +// Different kinds of validation there, subSchema / common / array / object / string... +func (v *subSchema) validateSchema(currentSubSchema *subSchema, currentNode interface{}, result *Result, context *JsonContext) { + + if internalLogEnabled { + internalLog("validateSchema %s", context.String()) + internalLog(" %v", currentNode) + } + + if len(currentSubSchema.anyOf) > 0 { + + validatedAnyOf := false + var bestValidationResult *Result + + for _, anyOfSchema := range currentSubSchema.anyOf { + if !validatedAnyOf { + validationResult := anyOfSchema.subValidateWithContext(currentNode, context) + validatedAnyOf = validationResult.Valid() + + if !validatedAnyOf && (bestValidationResult == nil || validationResult.score > bestValidationResult.score) { + bestValidationResult = validationResult + } + } + } + if !validatedAnyOf { + + result.addInternalError(new(NumberAnyOfError), context, currentNode, ErrorDetails{}) + + if bestValidationResult != nil { + // add error messages of closest matching subSchema as + // that's probably the one the user was trying to match + result.mergeErrors(bestValidationResult) + } + } + } + + if len(currentSubSchema.oneOf) > 0 { + + nbValidated := 0 + var bestValidationResult *Result + + for _, oneOfSchema := range currentSubSchema.oneOf { + validationResult := oneOfSchema.subValidateWithContext(currentNode, context) + if validationResult.Valid() { + nbValidated++ + } else if nbValidated == 0 && (bestValidationResult == nil || validationResult.score > bestValidationResult.score) { + bestValidationResult = validationResult + } + } + + if nbValidated != 1 { + + result.addInternalError(new(NumberOneOfError), context, currentNode, ErrorDetails{}) + + if nbValidated == 0 { + // add error messages of closest matching subSchema as + // that's probably the one the user was trying to match + result.mergeErrors(bestValidationResult) + } + } + + } + + if len(currentSubSchema.allOf) > 0 { + nbValidated := 0 + + for _, allOfSchema := range currentSubSchema.allOf { + validationResult := allOfSchema.subValidateWithContext(currentNode, context) + if validationResult.Valid() { + nbValidated++ + } + result.mergeErrors(validationResult) + } + + if nbValidated != len(currentSubSchema.allOf) { + result.addInternalError(new(NumberAllOfError), context, currentNode, ErrorDetails{}) + } + } + + if currentSubSchema.not != nil { + validationResult := currentSubSchema.not.subValidateWithContext(currentNode, context) + if validationResult.Valid() { + result.addInternalError(new(NumberNotError), context, currentNode, ErrorDetails{}) + } + } + + if currentSubSchema.dependencies != nil && len(currentSubSchema.dependencies) > 0 { + if isKind(currentNode, reflect.Map) { + for elementKey := range currentNode.(map[string]interface{}) { + if dependency, ok := currentSubSchema.dependencies[elementKey]; ok { + switch dependency := dependency.(type) { + + case []string: + for _, dependOnKey := range dependency { + if _, dependencyResolved := currentNode.(map[string]interface{})[dependOnKey]; !dependencyResolved { + result.addInternalError( + new(MissingDependencyError), + context, + currentNode, + ErrorDetails{"dependency": dependOnKey}, + ) + } + } + + case *subSchema: + dependency.validateRecursive(dependency, currentNode, result, context) + } + } + } + } + } + + if currentSubSchema._if != nil { + validationResultIf := currentSubSchema._if.subValidateWithContext(currentNode, context) + if currentSubSchema._then != nil && validationResultIf.Valid() { + validationResultThen := currentSubSchema._then.subValidateWithContext(currentNode, context) + if !validationResultThen.Valid() { + result.addInternalError(new(ConditionThenError), context, currentNode, ErrorDetails{}) + result.mergeErrors(validationResultThen) + } + } + if currentSubSchema._else != nil && !validationResultIf.Valid() { + validationResultElse := currentSubSchema._else.subValidateWithContext(currentNode, context) + if !validationResultElse.Valid() { + result.addInternalError(new(ConditionElseError), context, currentNode, ErrorDetails{}) + result.mergeErrors(validationResultElse) + } + } + } + + result.incrementScore() +} + +func (v *subSchema) validateCommon(currentSubSchema *subSchema, value interface{}, result *Result, context *JsonContext) { + + if internalLogEnabled { + internalLog("validateCommon %s", context.String()) + internalLog(" %v", value) + } + + // const: + if currentSubSchema._const != nil { + vString, err := marshalWithoutNumber(value) + if err != nil { + result.addInternalError(new(InternalError), context, value, ErrorDetails{"error": err}) + } + if *vString != *currentSubSchema._const { + result.addInternalError(new(ConstError), + context, + value, + ErrorDetails{ + "allowed": *currentSubSchema._const, + }, + ) + } + } + + // enum: + if len(currentSubSchema.enum) > 0 { + vString, err := marshalWithoutNumber(value) + if err != nil { + result.addInternalError(new(InternalError), context, value, ErrorDetails{"error": err}) + } + if !isStringInSlice(currentSubSchema.enum, *vString) { + result.addInternalError( + new(EnumError), + context, + value, + ErrorDetails{ + "allowed": strings.Join(currentSubSchema.enum, ", "), + }, + ) + } + } + + result.incrementScore() +} + +func (v *subSchema) validateArray(currentSubSchema *subSchema, value []interface{}, result *Result, context *JsonContext) { + + if internalLogEnabled { + internalLog("validateArray %s", context.String()) + internalLog(" %v", value) + } + + nbValues := len(value) + + // TODO explain + if currentSubSchema.itemsChildrenIsSingleSchema { + for i := range value { + subContext := NewJsonContext(strconv.Itoa(i), context) + validationResult := currentSubSchema.itemsChildren[0].subValidateWithContext(value[i], subContext) + result.mergeErrors(validationResult) + } + } else { + if currentSubSchema.itemsChildren != nil && len(currentSubSchema.itemsChildren) > 0 { + + nbItems := len(currentSubSchema.itemsChildren) + + // while we have both schemas and values, check them against each other + for i := 0; i != nbItems && i != nbValues; i++ { + subContext := NewJsonContext(strconv.Itoa(i), context) + validationResult := currentSubSchema.itemsChildren[i].subValidateWithContext(value[i], subContext) + result.mergeErrors(validationResult) + } + + if nbItems < nbValues { + // we have less schemas than elements in the instance array, + // but that might be ok if "additionalItems" is specified. + + switch currentSubSchema.additionalItems.(type) { + case bool: + if !currentSubSchema.additionalItems.(bool) { + result.addInternalError(new(ArrayNoAdditionalItemsError), context, value, ErrorDetails{}) + } + case *subSchema: + additionalItemSchema := currentSubSchema.additionalItems.(*subSchema) + for i := nbItems; i != nbValues; i++ { + subContext := NewJsonContext(strconv.Itoa(i), context) + validationResult := additionalItemSchema.subValidateWithContext(value[i], subContext) + result.mergeErrors(validationResult) + } + } + } + } + } + + // minItems & maxItems + if currentSubSchema.minItems != nil { + if nbValues < int(*currentSubSchema.minItems) { + result.addInternalError( + new(ArrayMinItemsError), + context, + value, + ErrorDetails{"min": *currentSubSchema.minItems}, + ) + } + } + if currentSubSchema.maxItems != nil { + if nbValues > int(*currentSubSchema.maxItems) { + result.addInternalError( + new(ArrayMaxItemsError), + context, + value, + ErrorDetails{"max": *currentSubSchema.maxItems}, + ) + } + } + + // uniqueItems: + if currentSubSchema.uniqueItems { + var stringifiedItems = make(map[string]int) + for j, v := range value { + vString, err := marshalWithoutNumber(v) + if err != nil { + result.addInternalError(new(InternalError), context, value, ErrorDetails{"err": err}) + } + if i, ok := stringifiedItems[*vString]; ok { + result.addInternalError( + new(ItemsMustBeUniqueError), + context, + value, + ErrorDetails{"type": TYPE_ARRAY, "i": i, "j": j}, + ) + } + stringifiedItems[*vString] = j + } + } + + // contains: + + if currentSubSchema.contains != nil { + validatedOne := false + var bestValidationResult *Result + + for i, v := range value { + subContext := NewJsonContext(strconv.Itoa(i), context) + + validationResult := currentSubSchema.contains.subValidateWithContext(v, subContext) + if validationResult.Valid() { + validatedOne = true + break + } else { + if bestValidationResult == nil || validationResult.score > bestValidationResult.score { + bestValidationResult = validationResult + } + } + } + if !validatedOne { + result.addInternalError( + new(ArrayContainsError), + context, + value, + ErrorDetails{}, + ) + if bestValidationResult != nil { + result.mergeErrors(bestValidationResult) + } + } + } + + result.incrementScore() +} + +func (v *subSchema) validateObject(currentSubSchema *subSchema, value map[string]interface{}, result *Result, context *JsonContext) { + + if internalLogEnabled { + internalLog("validateObject %s", context.String()) + internalLog(" %v", value) + } + + // minProperties & maxProperties: + if currentSubSchema.minProperties != nil { + if len(value) < int(*currentSubSchema.minProperties) { + result.addInternalError( + new(ArrayMinPropertiesError), + context, + value, + ErrorDetails{"min": *currentSubSchema.minProperties}, + ) + } + } + if currentSubSchema.maxProperties != nil { + if len(value) > int(*currentSubSchema.maxProperties) { + result.addInternalError( + new(ArrayMaxPropertiesError), + context, + value, + ErrorDetails{"max": *currentSubSchema.maxProperties}, + ) + } + } + + // required: + for _, requiredProperty := range currentSubSchema.required { + _, ok := value[requiredProperty] + if ok { + result.incrementScore() + } else { + result.addInternalError( + new(RequiredError), + context, + value, + ErrorDetails{"property": requiredProperty}, + ) + } + } + + // additionalProperty & patternProperty: + for pk := range value { + + // Check whether this property is described by "properties" + found := false + for _, spValue := range currentSubSchema.propertiesChildren { + if pk == spValue.property { + found = true + } + } + + // Check whether this property is described by "patternProperties" + ppMatch := v.validatePatternProperty(currentSubSchema, pk, value[pk], result, context) + + // If it is not described by neither "properties" nor "patternProperties" it must pass "additionalProperties" + if !found && !ppMatch { + switch ap := currentSubSchema.additionalProperties.(type) { + case bool: + // Handle the boolean case separately as it's cleaner to return a specific error than failing to pass the false schema + if !ap { + result.addInternalError( + new(AdditionalPropertyNotAllowedError), + context, + value[pk], + ErrorDetails{"property": pk}, + ) + + } + case *subSchema: + validationResult := ap.subValidateWithContext(value[pk], NewJsonContext(pk, context)) + result.mergeErrors(validationResult) + } + } + } + + // propertyNames: + if currentSubSchema.propertyNames != nil { + for pk := range value { + validationResult := currentSubSchema.propertyNames.subValidateWithContext(pk, context) + if !validationResult.Valid() { + result.addInternalError(new(InvalidPropertyNameError), + context, + value, ErrorDetails{ + "property": pk, + }) + result.mergeErrors(validationResult) + } + } + } + + result.incrementScore() +} + +func (v *subSchema) validatePatternProperty(currentSubSchema *subSchema, key string, value interface{}, result *Result, context *JsonContext) bool { + + if internalLogEnabled { + internalLog("validatePatternProperty %s", context.String()) + internalLog(" %s %v", key, value) + } + + validated := false + + for pk, pv := range currentSubSchema.patternProperties { + if matches, _ := regexp.MatchString(pk, key); matches { + validated = true + subContext := NewJsonContext(key, context) + validationResult := pv.subValidateWithContext(value, subContext) + result.mergeErrors(validationResult) + } + } + + if !validated { + return false + } + + result.incrementScore() + return true +} + +func (v *subSchema) validateString(currentSubSchema *subSchema, value interface{}, result *Result, context *JsonContext) { + + // Ignore JSON numbers + if isJSONNumber(value) { + return + } + + // Ignore non strings + if !isKind(value, reflect.String) { + return + } + + if internalLogEnabled { + internalLog("validateString %s", context.String()) + internalLog(" %v", value) + } + + stringValue := value.(string) + + // minLength & maxLength: + if currentSubSchema.minLength != nil { + if utf8.RuneCount([]byte(stringValue)) < int(*currentSubSchema.minLength) { + result.addInternalError( + new(StringLengthGTEError), + context, + value, + ErrorDetails{"min": *currentSubSchema.minLength}, + ) + } + } + if currentSubSchema.maxLength != nil { + if utf8.RuneCount([]byte(stringValue)) > int(*currentSubSchema.maxLength) { + result.addInternalError( + new(StringLengthLTEError), + context, + value, + ErrorDetails{"max": *currentSubSchema.maxLength}, + ) + } + } + + // pattern: + if currentSubSchema.pattern != nil { + if !currentSubSchema.pattern.MatchString(stringValue) { + result.addInternalError( + new(DoesNotMatchPatternError), + context, + value, + ErrorDetails{"pattern": currentSubSchema.pattern}, + ) + + } + } + + // format + if currentSubSchema.format != "" { + if !FormatCheckers.IsFormat(currentSubSchema.format, stringValue) { + result.addInternalError( + new(DoesNotMatchFormatError), + context, + value, + ErrorDetails{"format": currentSubSchema.format}, + ) + } + } + + result.incrementScore() +} + +func (v *subSchema) validateNumber(currentSubSchema *subSchema, value interface{}, result *Result, context *JsonContext) { + + // Ignore non numbers + if !isJSONNumber(value) { + return + } + + if internalLogEnabled { + internalLog("validateNumber %s", context.String()) + internalLog(" %v", value) + } + + number := value.(json.Number) + float64Value, _ := new(big.Rat).SetString(string(number)) + + // multipleOf: + if currentSubSchema.multipleOf != nil { + if q := new(big.Rat).Quo(float64Value, currentSubSchema.multipleOf); !q.IsInt() { + result.addInternalError( + new(MultipleOfError), + context, + number, + ErrorDetails{ + "multiple": new(big.Float).SetRat(currentSubSchema.multipleOf), + }, + ) + } + } + + //maximum & exclusiveMaximum: + if currentSubSchema.maximum != nil { + if float64Value.Cmp(currentSubSchema.maximum) == 1 { + result.addInternalError( + new(NumberLTEError), + context, + number, + ErrorDetails{ + "max": new(big.Float).SetRat(currentSubSchema.maximum), + }, + ) + } + } + if currentSubSchema.exclusiveMaximum != nil { + if float64Value.Cmp(currentSubSchema.exclusiveMaximum) >= 0 { + result.addInternalError( + new(NumberLTError), + context, + number, + ErrorDetails{ + "max": new(big.Float).SetRat(currentSubSchema.exclusiveMaximum), + }, + ) + } + } + + //minimum & exclusiveMinimum: + if currentSubSchema.minimum != nil { + if float64Value.Cmp(currentSubSchema.minimum) == -1 { + result.addInternalError( + new(NumberGTEError), + context, + number, + ErrorDetails{ + "min": new(big.Float).SetRat(currentSubSchema.minimum), + }, + ) + } + } + if currentSubSchema.exclusiveMinimum != nil { + if float64Value.Cmp(currentSubSchema.exclusiveMinimum) <= 0 { + result.addInternalError( + new(NumberGTError), + context, + number, + ErrorDetails{ + "min": new(big.Float).SetRat(currentSubSchema.exclusiveMinimum), + }, + ) + } + } + + // format + if currentSubSchema.format != "" { + if !FormatCheckers.IsFormat(currentSubSchema.format, float64Value) { + result.addInternalError( + new(DoesNotMatchFormatError), + context, + value, + ErrorDetails{"format": currentSubSchema.format}, + ) + } + } + + result.incrementScore() +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go new file mode 100644 index 000000000..6aae83bfd --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// DefaultClient is the default Client and is used by Get, Head, Post and PostForm. +// Please be careful of initialization order - for example, if you change +// the global propagator, the DefaultClient might still be using the old one. +var DefaultClient = &http.Client{Transport: NewTransport(http.DefaultTransport)} + +// Get is a convenient replacement for http.Get that adds a span around the request. +func Get(ctx context.Context, targetURL string) (resp *http.Response, err error) { + req, err := http.NewRequestWithContext(ctx, "GET", targetURL, nil) + if err != nil { + return nil, err + } + return DefaultClient.Do(req) +} + +// Head is a convenient replacement for http.Head that adds a span around the request. +func Head(ctx context.Context, targetURL string) (resp *http.Response, err error) { + req, err := http.NewRequestWithContext(ctx, "HEAD", targetURL, nil) + if err != nil { + return nil, err + } + return DefaultClient.Do(req) +} + +// Post is a convenient replacement for http.Post that adds a span around the request. +func Post(ctx context.Context, targetURL, contentType string, body io.Reader) (resp *http.Response, err error) { + req, err := http.NewRequestWithContext(ctx, "POST", targetURL, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", contentType) + return DefaultClient.Do(req) +} + +// PostForm is a convenient replacement for http.PostForm that adds a span around the request. +func PostForm(ctx context.Context, targetURL string, data url.Values) (resp *http.Response, err error) { + return Post(ctx, targetURL, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go new file mode 100644 index 000000000..214acaf58 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "net/http" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// Attribute keys that can be added to a span. +const ( + ReadBytesKey = attribute.Key("http.read_bytes") // if anything was read from the request body, the total number of bytes read + ReadErrorKey = attribute.Key("http.read_error") // If an error occurred while reading a request, the string of the error (io.EOF is not recorded) + WroteBytesKey = attribute.Key("http.wrote_bytes") // if anything was written to the response writer, the total number of bytes written + WriteErrorKey = attribute.Key("http.write_error") // if an error occurred while writing a reply, the string of the error (io.EOF is not recorded) +) + +// Server HTTP metrics. +const ( + serverRequestSize = "http.server.request.size" // Incoming request bytes total + serverResponseSize = "http.server.response.size" // Incoming response bytes total + serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds +) + +// Client HTTP metrics. +const ( + clientRequestSize = "http.client.request.size" // Outgoing request bytes total + clientResponseSize = "http.client.response.size" // Outgoing response bytes total + clientDuration = "http.client.duration" // Outgoing end to end duration, milliseconds +) + +// Filter is a predicate used to determine whether a given http.request should +// be traced. A Filter must return true if the request should be traced. +type Filter func(*http.Request) bool + +func newTracer(tp trace.TracerProvider) trace.Tracer { + return tp.Tracer(ScopeName, trace.WithInstrumentationVersion(Version())) +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go new file mode 100644 index 000000000..f0a9bb9ef --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go @@ -0,0 +1,196 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "context" + "net/http" + "net/http/httptrace" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" +) + +// ScopeName is the instrumentation scope name. +const ScopeName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +// config represents the configuration options available for the http.Handler +// and http.Transport types. +type config struct { + ServerName string + Tracer trace.Tracer + Meter metric.Meter + Propagators propagation.TextMapPropagator + SpanStartOptions []trace.SpanStartOption + PublicEndpoint bool + PublicEndpointFn func(*http.Request) bool + ReadEvent bool + WriteEvent bool + Filters []Filter + SpanNameFormatter func(string, *http.Request) string + ClientTrace func(context.Context) *httptrace.ClientTrace + + TracerProvider trace.TracerProvider + MeterProvider metric.MeterProvider +} + +// Option interface used for setting optional config properties. +type Option interface { + apply(*config) +} + +type optionFunc func(*config) + +func (o optionFunc) apply(c *config) { + o(c) +} + +// newConfig creates a new config struct and applies opts to it. +func newConfig(opts ...Option) *config { + c := &config{ + Propagators: otel.GetTextMapPropagator(), + MeterProvider: otel.GetMeterProvider(), + } + for _, opt := range opts { + opt.apply(c) + } + + // Tracer is only initialized if manually specified. Otherwise, can be passed with the tracing context. + if c.TracerProvider != nil { + c.Tracer = newTracer(c.TracerProvider) + } + + c.Meter = c.MeterProvider.Meter( + ScopeName, + metric.WithInstrumentationVersion(Version()), + ) + + return c +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) Option { + return optionFunc(func(cfg *config) { + if provider != nil { + cfg.TracerProvider = provider + } + }) +} + +// WithMeterProvider specifies a meter provider to use for creating a meter. +// If none is specified, the global provider is used. +func WithMeterProvider(provider metric.MeterProvider) Option { + return optionFunc(func(cfg *config) { + if provider != nil { + cfg.MeterProvider = provider + } + }) +} + +// WithPublicEndpoint configures the Handler to link the span with an incoming +// span context. If this option is not provided, then the association is a child +// association instead of a link. +func WithPublicEndpoint() Option { + return optionFunc(func(c *config) { + c.PublicEndpoint = true + }) +} + +// WithPublicEndpointFn runs with every request, and allows conditionally +// configuring the Handler to link the span with an incoming span context. If +// this option is not provided or returns false, then the association is a +// child association instead of a link. +// Note: WithPublicEndpoint takes precedence over WithPublicEndpointFn. +func WithPublicEndpointFn(fn func(*http.Request) bool) Option { + return optionFunc(func(c *config) { + c.PublicEndpointFn = fn + }) +} + +// WithPropagators configures specific propagators. If this +// option isn't specified, then the global TextMapPropagator is used. +func WithPropagators(ps propagation.TextMapPropagator) Option { + return optionFunc(func(c *config) { + if ps != nil { + c.Propagators = ps + } + }) +} + +// WithSpanOptions configures an additional set of +// trace.SpanOptions, which are applied to each new span. +func WithSpanOptions(opts ...trace.SpanStartOption) Option { + return optionFunc(func(c *config) { + c.SpanStartOptions = append(c.SpanStartOptions, opts...) + }) +} + +// WithFilter adds a filter to the list of filters used by the handler. +// If any filter indicates to exclude a request then the request will not be +// traced. All filters must allow a request to be traced for a Span to be created. +// If no filters are provided then all requests are traced. +// Filters will be invoked for each processed request, it is advised to make them +// simple and fast. +func WithFilter(f Filter) Option { + return optionFunc(func(c *config) { + c.Filters = append(c.Filters, f) + }) +} + +type event int + +// Different types of events that can be recorded, see WithMessageEvents. +const ( + ReadEvents event = iota + WriteEvents +) + +// WithMessageEvents configures the Handler to record the specified events +// (span.AddEvent) on spans. By default only summary attributes are added at the +// end of the request. +// +// Valid events are: +// - ReadEvents: Record the number of bytes read after every http.Request.Body.Read +// using the ReadBytesKey +// - WriteEvents: Record the number of bytes written after every http.ResponeWriter.Write +// using the WriteBytesKey +func WithMessageEvents(events ...event) Option { + return optionFunc(func(c *config) { + for _, e := range events { + switch e { + case ReadEvents: + c.ReadEvent = true + case WriteEvents: + c.WriteEvent = true + } + } + }) +} + +// WithSpanNameFormatter takes a function that will be called on every +// request and the returned string will become the Span Name. +func WithSpanNameFormatter(f func(operation string, r *http.Request) string) Option { + return optionFunc(func(c *config) { + c.SpanNameFormatter = f + }) +} + +// WithClientTrace takes a function that returns client trace instance that will be +// applied to the requests sent through the otelhttp Transport. +func WithClientTrace(f func(context.Context) *httptrace.ClientTrace) Option { + return optionFunc(func(c *config) { + c.ClientTrace = f + }) +} + +// WithServerName returns an Option that sets the name of the (virtual) server +// handling requests. +func WithServerName(server string) Option { + return optionFunc(func(c *config) { + c.ServerName = server + }) +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go new file mode 100644 index 000000000..56b24b982 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package otelhttp provides an http.Handler and functions that are intended +// to be used to add tracing by wrapping existing handlers (with Handler) and +// routes WithRouteTag. +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go new file mode 100644 index 000000000..d01bdccf4 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go @@ -0,0 +1,258 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "net/http" + "time" + + "github.com/felixge/httpsnoop" + + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" +) + +// middleware is an http middleware which wraps the next handler in a span. +type middleware struct { + operation string + server string + + tracer trace.Tracer + meter metric.Meter + propagators propagation.TextMapPropagator + spanStartOptions []trace.SpanStartOption + readEvent bool + writeEvent bool + filters []Filter + spanNameFormatter func(string, *http.Request) string + publicEndpoint bool + publicEndpointFn func(*http.Request) bool + + traceSemconv semconv.HTTPServer + requestBytesCounter metric.Int64Counter + responseBytesCounter metric.Int64Counter + serverLatencyMeasure metric.Float64Histogram +} + +func defaultHandlerFormatter(operation string, _ *http.Request) string { + return operation +} + +// NewHandler wraps the passed handler in a span named after the operation and +// enriches it with metrics. +func NewHandler(handler http.Handler, operation string, opts ...Option) http.Handler { + return NewMiddleware(operation, opts...)(handler) +} + +// NewMiddleware returns a tracing and metrics instrumentation middleware. +// The handler returned by the middleware wraps a handler +// in a span named after the operation and enriches it with metrics. +func NewMiddleware(operation string, opts ...Option) func(http.Handler) http.Handler { + h := middleware{ + operation: operation, + + traceSemconv: semconv.NewHTTPServer(), + } + + defaultOpts := []Option{ + WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)), + WithSpanNameFormatter(defaultHandlerFormatter), + } + + c := newConfig(append(defaultOpts, opts...)...) + h.configure(c) + h.createMeasures() + + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h.serveHTTP(w, r, next) + }) + } +} + +func (h *middleware) configure(c *config) { + h.tracer = c.Tracer + h.meter = c.Meter + h.propagators = c.Propagators + h.spanStartOptions = c.SpanStartOptions + h.readEvent = c.ReadEvent + h.writeEvent = c.WriteEvent + h.filters = c.Filters + h.spanNameFormatter = c.SpanNameFormatter + h.publicEndpoint = c.PublicEndpoint + h.publicEndpointFn = c.PublicEndpointFn + h.server = c.ServerName +} + +func handleErr(err error) { + if err != nil { + otel.Handle(err) + } +} + +func (h *middleware) createMeasures() { + var err error + h.requestBytesCounter, err = h.meter.Int64Counter( + serverRequestSize, + metric.WithUnit("By"), + metric.WithDescription("Measures the size of HTTP request messages."), + ) + handleErr(err) + + h.responseBytesCounter, err = h.meter.Int64Counter( + serverResponseSize, + metric.WithUnit("By"), + metric.WithDescription("Measures the size of HTTP response messages."), + ) + handleErr(err) + + h.serverLatencyMeasure, err = h.meter.Float64Histogram( + serverDuration, + metric.WithUnit("ms"), + metric.WithDescription("Measures the duration of inbound HTTP requests."), + ) + handleErr(err) +} + +// serveHTTP sets up tracing and calls the given next http.Handler with the span +// context injected into the request context. +func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http.Handler) { + requestStartTime := time.Now() + for _, f := range h.filters { + if !f(r) { + // Simply pass through to the handler if a filter rejects the request + next.ServeHTTP(w, r) + return + } + } + + ctx := h.propagators.Extract(r.Context(), propagation.HeaderCarrier(r.Header)) + opts := []trace.SpanStartOption{ + trace.WithAttributes(h.traceSemconv.RequestTraceAttrs(h.server, r)...), + } + + opts = append(opts, h.spanStartOptions...) + if h.publicEndpoint || (h.publicEndpointFn != nil && h.publicEndpointFn(r.WithContext(ctx))) { + opts = append(opts, trace.WithNewRoot()) + // Linking incoming span context if any for public endpoint. + if s := trace.SpanContextFromContext(ctx); s.IsValid() && s.IsRemote() { + opts = append(opts, trace.WithLinks(trace.Link{SpanContext: s})) + } + } + + tracer := h.tracer + + if tracer == nil { + if span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() { + tracer = newTracer(span.TracerProvider()) + } else { + tracer = newTracer(otel.GetTracerProvider()) + } + } + + ctx, span := tracer.Start(ctx, h.spanNameFormatter(h.operation, r), opts...) + defer span.End() + + readRecordFunc := func(int64) {} + if h.readEvent { + readRecordFunc = func(n int64) { + span.AddEvent("read", trace.WithAttributes(ReadBytesKey.Int64(n))) + } + } + + var bw bodyWrapper + // if request body is nil or NoBody, we don't want to mutate the body as it + // will affect the identity of it in an unforeseeable way because we assert + // ReadCloser fulfills a certain interface and it is indeed nil or NoBody. + if r.Body != nil && r.Body != http.NoBody { + bw.ReadCloser = r.Body + bw.record = readRecordFunc + r.Body = &bw + } + + writeRecordFunc := func(int64) {} + if h.writeEvent { + writeRecordFunc = func(n int64) { + span.AddEvent("write", trace.WithAttributes(WroteBytesKey.Int64(n))) + } + } + + rww := &respWriterWrapper{ + ResponseWriter: w, + record: writeRecordFunc, + ctx: ctx, + props: h.propagators, + statusCode: http.StatusOK, // default status code in case the Handler doesn't write anything + } + + // Wrap w to use our ResponseWriter methods while also exposing + // other interfaces that w may implement (http.CloseNotifier, + // http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom). + + w = httpsnoop.Wrap(w, httpsnoop.Hooks{ + Header: func(httpsnoop.HeaderFunc) httpsnoop.HeaderFunc { + return rww.Header + }, + Write: func(httpsnoop.WriteFunc) httpsnoop.WriteFunc { + return rww.Write + }, + WriteHeader: func(httpsnoop.WriteHeaderFunc) httpsnoop.WriteHeaderFunc { + return rww.WriteHeader + }, + Flush: func(httpsnoop.FlushFunc) httpsnoop.FlushFunc { + return rww.Flush + }, + }) + + labeler, found := LabelerFromContext(ctx) + if !found { + ctx = ContextWithLabeler(ctx, labeler) + } + + next.ServeHTTP(w, r.WithContext(ctx)) + + span.SetStatus(semconv.ServerStatus(rww.statusCode)) + span.SetAttributes(h.traceSemconv.ResponseTraceAttrs(semconv.ResponseTelemetry{ + StatusCode: rww.statusCode, + ReadBytes: bw.read.Load(), + ReadError: bw.err, + WriteBytes: rww.written, + WriteError: rww.err, + })...) + + // Add metrics + attributes := append(labeler.Get(), semconvutil.HTTPServerRequestMetrics(h.server, r)...) + if rww.statusCode > 0 { + attributes = append(attributes, semconv.HTTPStatusCode(rww.statusCode)) + } + o := metric.WithAttributeSet(attribute.NewSet(attributes...)) + addOpts := []metric.AddOption{o} // Allocate vararg slice once. + h.requestBytesCounter.Add(ctx, bw.read.Load(), addOpts...) + h.responseBytesCounter.Add(ctx, rww.written, addOpts...) + + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) + + h.serverLatencyMeasure.Record(ctx, elapsedTime, o) +} + +// WithRouteTag annotates spans and metrics with the provided route name +// with HTTP route attribute. +func WithRouteTag(route string, h http.Handler) http.Handler { + attr := semconv.NewHTTPServer().Route(route) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + span := trace.SpanFromContext(r.Context()) + span.SetAttributes(attr) + + labeler, _ := LabelerFromContext(r.Context()) + labeler.Add(attr) + + h.ServeHTTP(w, r) + }) +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go new file mode 100644 index 000000000..3ec0ad00c --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + +import ( + "fmt" + "net/http" + "os" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" +) + +type ResponseTelemetry struct { + StatusCode int + ReadBytes int64 + ReadError error + WriteBytes int64 + WriteError error +} + +type HTTPServer struct { + duplicate bool +} + +// RequestTraceAttrs returns trace attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +func (s HTTPServer) RequestTraceAttrs(server string, req *http.Request) []attribute.KeyValue { + if s.duplicate { + return append(oldHTTPServer{}.RequestTraceAttrs(server, req), newHTTPServer{}.RequestTraceAttrs(server, req)...) + } + return oldHTTPServer{}.RequestTraceAttrs(server, req) +} + +// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. +// +// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. +func (s HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { + if s.duplicate { + return append(oldHTTPServer{}.ResponseTraceAttrs(resp), newHTTPServer{}.ResponseTraceAttrs(resp)...) + } + return oldHTTPServer{}.ResponseTraceAttrs(resp) +} + +// Route returns the attribute for the route. +func (s HTTPServer) Route(route string) attribute.KeyValue { + return oldHTTPServer{}.Route(route) +} + +func NewHTTPServer() HTTPServer { + env := strings.ToLower(os.Getenv("OTEL_HTTP_CLIENT_COMPATIBILITY_MODE")) + return HTTPServer{duplicate: env == "http/dup"} +} + +// ServerStatus returns a span status code and message for an HTTP status code +// value returned by a server. Status codes in the 400-499 range are not +// returned as errors. +func ServerStatus(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 500 { + return codes.Error, "" + } + return codes.Unset, "" +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go new file mode 100644 index 000000000..e7f293761 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go @@ -0,0 +1,91 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + +import ( + "net" + "net/http" + "strconv" + "strings" + + "go.opentelemetry.io/otel/attribute" + semconvNew "go.opentelemetry.io/otel/semconv/v1.24.0" +) + +// splitHostPort splits a network address hostport of the form "host", +// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", +// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and +// port. +// +// An empty host is returned if it is not provided or unparsable. A negative +// port is returned if it is not provided or unparsable. +func splitHostPort(hostport string) (host string, port int) { + port = -1 + + if strings.HasPrefix(hostport, "[") { + addrEnd := strings.LastIndex(hostport, "]") + if addrEnd < 0 { + // Invalid hostport. + return + } + if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { + host = hostport[1:addrEnd] + return + } + } else { + if i := strings.LastIndex(hostport, ":"); i < 0 { + host = hostport + return + } + } + + host, pStr, err := net.SplitHostPort(hostport) + if err != nil { + return + } + + p, err := strconv.ParseUint(pStr, 10, 16) + if err != nil { + return + } + return host, int(p) +} + +func requiredHTTPPort(https bool, port int) int { // nolint:revive + if https { + if port > 0 && port != 443 { + return port + } + } else { + if port > 0 && port != 80 { + return port + } + } + return -1 +} + +func serverClientIP(xForwardedFor string) string { + if idx := strings.Index(xForwardedFor, ","); idx >= 0 { + xForwardedFor = xForwardedFor[:idx] + } + return xForwardedFor +} + +func netProtocol(proto string) (name string, version string) { + name, version, _ = strings.Cut(proto, "/") + name = strings.ToLower(name) + return name, version +} + +var methodLookup = map[string]attribute.KeyValue{ + http.MethodConnect: semconvNew.HTTPRequestMethodConnect, + http.MethodDelete: semconvNew.HTTPRequestMethodDelete, + http.MethodGet: semconvNew.HTTPRequestMethodGet, + http.MethodHead: semconvNew.HTTPRequestMethodHead, + http.MethodOptions: semconvNew.HTTPRequestMethodOptions, + http.MethodPatch: semconvNew.HTTPRequestMethodPatch, + http.MethodPost: semconvNew.HTTPRequestMethodPost, + http.MethodPut: semconvNew.HTTPRequestMethodPut, + http.MethodTrace: semconvNew.HTTPRequestMethodTrace, +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go new file mode 100644 index 000000000..c3e838aaa --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + +import ( + "errors" + "io" + "net/http" + + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.20.0" +) + +type oldHTTPServer struct{} + +// RequestTraceAttrs returns trace attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +func (o oldHTTPServer) RequestTraceAttrs(server string, req *http.Request) []attribute.KeyValue { + return semconvutil.HTTPServerRequest(server, req) +} + +// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. +// +// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. +func (o oldHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { + attributes := []attribute.KeyValue{} + + if resp.ReadBytes > 0 { + attributes = append(attributes, semconv.HTTPRequestContentLength(int(resp.ReadBytes))) + } + if resp.ReadError != nil && !errors.Is(resp.ReadError, io.EOF) { + // This is not in the semantic conventions, but is historically provided + attributes = append(attributes, attribute.String("http.read_error", resp.ReadError.Error())) + } + if resp.WriteBytes > 0 { + attributes = append(attributes, semconv.HTTPResponseContentLength(int(resp.WriteBytes))) + } + if resp.StatusCode > 0 { + attributes = append(attributes, semconv.HTTPStatusCode(resp.StatusCode)) + } + if resp.WriteError != nil && !errors.Is(resp.WriteError, io.EOF) { + // This is not in the semantic conventions, but is historically provided + attributes = append(attributes, attribute.String("http.write_error", resp.WriteError.Error())) + } + + return attributes +} + +// Route returns the attribute for the route. +func (o oldHTTPServer) Route(route string) attribute.KeyValue { + return semconv.HTTPRoute(route) +} + +// HTTPStatusCode returns the attribute for the HTTP status code. +// This is a temporary function needed by metrics. This will be removed when MetricsRequest is added. +func HTTPStatusCode(status int) attribute.KeyValue { + return semconv.HTTPStatusCode(status) +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.24.0.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.24.0.go new file mode 100644 index 000000000..0c5d4c460 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.24.0.go @@ -0,0 +1,197 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + +import ( + "net/http" + "strings" + + "go.opentelemetry.io/otel/attribute" + semconvNew "go.opentelemetry.io/otel/semconv/v1.24.0" +) + +type newHTTPServer struct{} + +// TraceRequest returns trace attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +func (n newHTTPServer) RequestTraceAttrs(server string, req *http.Request) []attribute.KeyValue { + count := 3 // ServerAddress, Method, Scheme + + var host string + var p int + if server == "" { + host, p = splitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = splitHostPort(server) + if p < 0 { + _, p = splitHostPort(req.Host) + } + } + + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + count++ + } + + method, methodOriginal := n.method(req.Method) + if methodOriginal != (attribute.KeyValue{}) { + count++ + } + + scheme := n.scheme(req.TLS != nil) + + if peer, peerPort := splitHostPort(req.RemoteAddr); peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + count++ + if peerPort > 0 { + count++ + } + } + + useragent := req.UserAgent() + if useragent != "" { + count++ + } + + clientIP := serverClientIP(req.Header.Get("X-Forwarded-For")) + if clientIP != "" { + count++ + } + + if req.URL != nil && req.URL.Path != "" { + count++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" && protoName != "http" { + count++ + } + if protoVersion != "" { + count++ + } + + attrs := make([]attribute.KeyValue, 0, count) + attrs = append(attrs, + semconvNew.ServerAddress(host), + method, + scheme, + ) + + if hostPort > 0 { + attrs = append(attrs, semconvNew.ServerPort(hostPort)) + } + if methodOriginal != (attribute.KeyValue{}) { + attrs = append(attrs, methodOriginal) + } + + if peer, peerPort := splitHostPort(req.RemoteAddr); peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + attrs = append(attrs, semconvNew.NetworkPeerAddress(peer)) + if peerPort > 0 { + attrs = append(attrs, semconvNew.NetworkPeerPort(peerPort)) + } + } + + if useragent := req.UserAgent(); useragent != "" { + attrs = append(attrs, semconvNew.UserAgentOriginal(useragent)) + } + + if clientIP != "" { + attrs = append(attrs, semconvNew.ClientAddress(clientIP)) + } + + if req.URL != nil && req.URL.Path != "" { + attrs = append(attrs, semconvNew.URLPath(req.URL.Path)) + } + + if protoName != "" && protoName != "http" { + attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) + } + + return attrs +} + +func (n newHTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { + if method == "" { + return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} + } + if attr, ok := methodLookup[method]; ok { + return attr, attribute.KeyValue{} + } + + orig := semconvNew.HTTPRequestMethodOriginal(method) + if attr, ok := methodLookup[strings.ToUpper(method)]; ok { + return attr, orig + } + return semconvNew.HTTPRequestMethodGet, orig +} + +func (n newHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive + if https { + return semconvNew.URLScheme("https") + } + return semconvNew.URLScheme("http") +} + +// TraceResponse returns trace attributes for telemetry from an HTTP response. +// +// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. +func (n newHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { + var count int + + if resp.ReadBytes > 0 { + count++ + } + if resp.WriteBytes > 0 { + count++ + } + if resp.StatusCode > 0 { + count++ + } + + attributes := make([]attribute.KeyValue, 0, count) + + if resp.ReadBytes > 0 { + attributes = append(attributes, + semconvNew.HTTPRequestBodySize(int(resp.ReadBytes)), + ) + } + if resp.WriteBytes > 0 { + attributes = append(attributes, + semconvNew.HTTPResponseBodySize(int(resp.WriteBytes)), + ) + } + if resp.StatusCode > 0 { + attributes = append(attributes, + semconvNew.HTTPResponseStatusCode(resp.StatusCode), + ) + } + + return attributes +} + +// Route returns the attribute for the route. +func (n newHTTPServer) Route(route string) attribute.KeyValue { + return semconvNew.HTTPRoute(route) +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go new file mode 100644 index 000000000..7aa5f99e8 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" + +// Generate semconvutil package: +//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv_test.go.tmpl "--data={}" --out=httpconv_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv.go.tmpl "--data={}" --out=httpconv.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv_test.go.tmpl "--data={}" --out=netconv_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv.go.tmpl "--data={}" --out=netconv.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go new file mode 100644 index 000000000..a73bb06e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go @@ -0,0 +1,575 @@ +// Code created by gotmpl. DO NOT MODIFY. +// source: internal/shared/semconvutil/httpconv.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" + +import ( + "fmt" + "net/http" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + semconv "go.opentelemetry.io/otel/semconv/v1.20.0" +) + +// HTTPClientResponse returns trace attributes for an HTTP response received by a +// client from a server. It will return the following attributes if the related +// values are defined in resp: "http.status.code", +// "http.response_content_length". +// +// This does not add all OpenTelemetry required attributes for an HTTP event, +// it assumes ClientRequest was used to create the span with a complete set of +// attributes. If a complete set of attributes can be generated using the +// request contained in resp. For example: +// +// append(HTTPClientResponse(resp), ClientRequest(resp.Request)...) +func HTTPClientResponse(resp *http.Response) []attribute.KeyValue { + return hc.ClientResponse(resp) +} + +// HTTPClientRequest returns trace attributes for an HTTP request made by a client. +// The following attributes are always returned: "http.url", "http.method", +// "net.peer.name". The following attributes are returned if the related values +// are defined in req: "net.peer.port", "user_agent.original", +// "http.request_content_length". +func HTTPClientRequest(req *http.Request) []attribute.KeyValue { + return hc.ClientRequest(req) +} + +// HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client. +// The following attributes are always returned: "http.method", "net.peer.name". +// The following attributes are returned if the +// related values are defined in req: "net.peer.port". +func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue { + return hc.ClientRequestMetrics(req) +} + +// HTTPClientStatus returns a span status code and message for an HTTP status code +// value received by a client. +func HTTPClientStatus(code int) (codes.Code, string) { + return hc.ClientStatus(code) +} + +// HTTPServerRequest returns trace attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +// +// The following attributes are always returned: "http.method", "http.scheme", +// "http.target", "net.host.name". The following attributes are returned if +// they related values are defined in req: "net.host.port", "net.sock.peer.addr", +// "net.sock.peer.port", "user_agent.original", "http.client_ip". +func HTTPServerRequest(server string, req *http.Request) []attribute.KeyValue { + return hc.ServerRequest(server, req) +} + +// HTTPServerRequestMetrics returns metric attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +// +// The following attributes are always returned: "http.method", "http.scheme", +// "net.host.name". The following attributes are returned if they related +// values are defined in req: "net.host.port". +func HTTPServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { + return hc.ServerRequestMetrics(server, req) +} + +// HTTPServerStatus returns a span status code and message for an HTTP status code +// value returned by a server. Status codes in the 400-499 range are not +// returned as errors. +func HTTPServerStatus(code int) (codes.Code, string) { + return hc.ServerStatus(code) +} + +// httpConv are the HTTP semantic convention attributes defined for a version +// of the OpenTelemetry specification. +type httpConv struct { + NetConv *netConv + + HTTPClientIPKey attribute.Key + HTTPMethodKey attribute.Key + HTTPRequestContentLengthKey attribute.Key + HTTPResponseContentLengthKey attribute.Key + HTTPRouteKey attribute.Key + HTTPSchemeHTTP attribute.KeyValue + HTTPSchemeHTTPS attribute.KeyValue + HTTPStatusCodeKey attribute.Key + HTTPTargetKey attribute.Key + HTTPURLKey attribute.Key + UserAgentOriginalKey attribute.Key +} + +var hc = &httpConv{ + NetConv: nc, + + HTTPClientIPKey: semconv.HTTPClientIPKey, + HTTPMethodKey: semconv.HTTPMethodKey, + HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey, + HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey, + HTTPRouteKey: semconv.HTTPRouteKey, + HTTPSchemeHTTP: semconv.HTTPSchemeHTTP, + HTTPSchemeHTTPS: semconv.HTTPSchemeHTTPS, + HTTPStatusCodeKey: semconv.HTTPStatusCodeKey, + HTTPTargetKey: semconv.HTTPTargetKey, + HTTPURLKey: semconv.HTTPURLKey, + UserAgentOriginalKey: semconv.UserAgentOriginalKey, +} + +// ClientResponse returns attributes for an HTTP response received by a client +// from a server. The following attributes are returned if the related values +// are defined in resp: "http.status.code", "http.response_content_length". +// +// This does not add all OpenTelemetry required attributes for an HTTP event, +// it assumes ClientRequest was used to create the span with a complete set of +// attributes. If a complete set of attributes can be generated using the +// request contained in resp. For example: +// +// append(ClientResponse(resp), ClientRequest(resp.Request)...) +func (c *httpConv) ClientResponse(resp *http.Response) []attribute.KeyValue { + /* The following semantic conventions are returned if present: + http.status_code int + http.response_content_length int + */ + var n int + if resp.StatusCode > 0 { + n++ + } + if resp.ContentLength > 0 { + n++ + } + + attrs := make([]attribute.KeyValue, 0, n) + if resp.StatusCode > 0 { + attrs = append(attrs, c.HTTPStatusCodeKey.Int(resp.StatusCode)) + } + if resp.ContentLength > 0 { + attrs = append(attrs, c.HTTPResponseContentLengthKey.Int(int(resp.ContentLength))) + } + return attrs +} + +// ClientRequest returns attributes for an HTTP request made by a client. The +// following attributes are always returned: "http.url", "http.method", +// "net.peer.name". The following attributes are returned if the related values +// are defined in req: "net.peer.port", "user_agent.original", +// "http.request_content_length", "user_agent.original". +func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue { + /* The following semantic conventions are returned if present: + http.method string + user_agent.original string + http.url string + net.peer.name string + net.peer.port int + http.request_content_length int + */ + + /* The following semantic conventions are not returned: + http.status_code This requires the response. See ClientResponse. + http.response_content_length This requires the response. See ClientResponse. + net.sock.family This requires the socket used. + net.sock.peer.addr This requires the socket used. + net.sock.peer.name This requires the socket used. + net.sock.peer.port This requires the socket used. + http.resend_count This is something outside of a single request. + net.protocol.name The value is the Request is ignored, and the go client will always use "http". + net.protocol.version The value in the Request is ignored, and the go client will always use 1.1 or 2.0. + */ + n := 3 // URL, peer name, proto, and method. + var h string + if req.URL != nil { + h = req.URL.Host + } + peer, p := firstHostPort(h, req.Header.Get("Host")) + port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) + if port > 0 { + n++ + } + useragent := req.UserAgent() + if useragent != "" { + n++ + } + if req.ContentLength > 0 { + n++ + } + + attrs := make([]attribute.KeyValue, 0, n) + + attrs = append(attrs, c.method(req.Method)) + + var u string + if req.URL != nil { + // Remove any username/password info that may be in the URL. + userinfo := req.URL.User + req.URL.User = nil + u = req.URL.String() + // Restore any username/password info that was removed. + req.URL.User = userinfo + } + attrs = append(attrs, c.HTTPURLKey.String(u)) + + attrs = append(attrs, c.NetConv.PeerName(peer)) + if port > 0 { + attrs = append(attrs, c.NetConv.PeerPort(port)) + } + + if useragent != "" { + attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) + } + + if l := req.ContentLength; l > 0 { + attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l)) + } + + return attrs +} + +// ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The +// following attributes are always returned: "http.method", "net.peer.name". +// The following attributes are returned if the related values +// are defined in req: "net.peer.port". +func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue { + /* The following semantic conventions are returned if present: + http.method string + net.peer.name string + net.peer.port int + */ + + n := 2 // method, peer name. + var h string + if req.URL != nil { + h = req.URL.Host + } + peer, p := firstHostPort(h, req.Header.Get("Host")) + port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) + if port > 0 { + n++ + } + + attrs := make([]attribute.KeyValue, 0, n) + attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer)) + + if port > 0 { + attrs = append(attrs, c.NetConv.PeerPort(port)) + } + + return attrs +} + +// ServerRequest returns attributes for an HTTP request received by a server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +// +// The following attributes are always returned: "http.method", "http.scheme", +// "http.target", "net.host.name". The following attributes are returned if they +// related values are defined in req: "net.host.port", "net.sock.peer.addr", +// "net.sock.peer.port", "user_agent.original", "http.client_ip", +// "net.protocol.name", "net.protocol.version". +func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.KeyValue { + /* The following semantic conventions are returned if present: + http.method string + http.scheme string + net.host.name string + net.host.port int + net.sock.peer.addr string + net.sock.peer.port int + user_agent.original string + http.client_ip string + net.protocol.name string Note: not set if the value is "http". + net.protocol.version string + http.target string Note: doesn't include the query parameter. + */ + + /* The following semantic conventions are not returned: + http.status_code This requires the response. + http.request_content_length This requires the len() of body, which can mutate it. + http.response_content_length This requires the response. + http.route This is not available. + net.sock.peer.name This would require a DNS lookup. + net.sock.host.addr The request doesn't have access to the underlying socket. + net.sock.host.port The request doesn't have access to the underlying socket. + + */ + n := 4 // Method, scheme, proto, and host name. + var host string + var p int + if server == "" { + host, p = splitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = splitHostPort(server) + if p < 0 { + _, p = splitHostPort(req.Host) + } + } + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + n++ + } + peer, peerPort := splitHostPort(req.RemoteAddr) + if peer != "" { + n++ + if peerPort > 0 { + n++ + } + } + useragent := req.UserAgent() + if useragent != "" { + n++ + } + + clientIP := serverClientIP(req.Header.Get("X-Forwarded-For")) + if clientIP != "" { + n++ + } + + var target string + if req.URL != nil { + target = req.URL.Path + if target != "" { + n++ + } + } + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" && protoName != "http" { + n++ + } + if protoVersion != "" { + n++ + } + + attrs := make([]attribute.KeyValue, 0, n) + + attrs = append(attrs, c.method(req.Method)) + attrs = append(attrs, c.scheme(req.TLS != nil)) + attrs = append(attrs, c.NetConv.HostName(host)) + + if hostPort > 0 { + attrs = append(attrs, c.NetConv.HostPort(hostPort)) + } + + if peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + attrs = append(attrs, c.NetConv.SockPeerAddr(peer)) + if peerPort > 0 { + attrs = append(attrs, c.NetConv.SockPeerPort(peerPort)) + } + } + + if useragent != "" { + attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) + } + + if clientIP != "" { + attrs = append(attrs, c.HTTPClientIPKey.String(clientIP)) + } + + if target != "" { + attrs = append(attrs, c.HTTPTargetKey.String(target)) + } + + if protoName != "" && protoName != "http" { + attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) + } + + return attrs +} + +// ServerRequestMetrics returns metric attributes for an HTTP request received +// by a server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +// +// The following attributes are always returned: "http.method", "http.scheme", +// "net.host.name". The following attributes are returned if they related +// values are defined in req: "net.host.port". +func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { + /* The following semantic conventions are returned if present: + http.scheme string + http.route string + http.method string + http.status_code int + net.host.name string + net.host.port int + net.protocol.name string Note: not set if the value is "http". + net.protocol.version string + */ + + n := 3 // Method, scheme, and host name. + var host string + var p int + if server == "" { + host, p = splitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = splitHostPort(server) + if p < 0 { + _, p = splitHostPort(req.Host) + } + } + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + n++ + } + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" { + n++ + } + if protoVersion != "" { + n++ + } + + attrs := make([]attribute.KeyValue, 0, n) + + attrs = append(attrs, c.methodMetric(req.Method)) + attrs = append(attrs, c.scheme(req.TLS != nil)) + attrs = append(attrs, c.NetConv.HostName(host)) + + if hostPort > 0 { + attrs = append(attrs, c.NetConv.HostPort(hostPort)) + } + if protoName != "" { + attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) + } + + return attrs +} + +func (c *httpConv) method(method string) attribute.KeyValue { + if method == "" { + return c.HTTPMethodKey.String(http.MethodGet) + } + return c.HTTPMethodKey.String(method) +} + +func (c *httpConv) methodMetric(method string) attribute.KeyValue { + method = strings.ToUpper(method) + switch method { + case http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace: + default: + method = "_OTHER" + } + return c.HTTPMethodKey.String(method) +} + +func (c *httpConv) scheme(https bool) attribute.KeyValue { // nolint:revive + if https { + return c.HTTPSchemeHTTPS + } + return c.HTTPSchemeHTTP +} + +func serverClientIP(xForwardedFor string) string { + if idx := strings.Index(xForwardedFor, ","); idx >= 0 { + xForwardedFor = xForwardedFor[:idx] + } + return xForwardedFor +} + +func requiredHTTPPort(https bool, port int) int { // nolint:revive + if https { + if port > 0 && port != 443 { + return port + } + } else { + if port > 0 && port != 80 { + return port + } + } + return -1 +} + +// Return the request host and port from the first non-empty source. +func firstHostPort(source ...string) (host string, port int) { + for _, hostport := range source { + host, port = splitHostPort(hostport) + if host != "" || port > 0 { + break + } + } + return +} + +// ClientStatus returns a span status code and message for an HTTP status code +// value received by a client. +func (c *httpConv) ClientStatus(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 400 { + return codes.Error, "" + } + return codes.Unset, "" +} + +// ServerStatus returns a span status code and message for an HTTP status code +// value returned by a server. Status codes in the 400-499 range are not +// returned as errors. +func (c *httpConv) ServerStatus(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 500 { + return codes.Error, "" + } + return codes.Unset, "" +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go new file mode 100644 index 000000000..a9a9226b3 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go @@ -0,0 +1,205 @@ +// Code created by gotmpl. DO NOT MODIFY. +// source: internal/shared/semconvutil/netconv.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" + +import ( + "net" + "strconv" + "strings" + + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.20.0" +) + +// NetTransport returns a trace attribute describing the transport protocol of the +// passed network. See the net.Dial for information about acceptable network +// values. +func NetTransport(network string) attribute.KeyValue { + return nc.Transport(network) +} + +// netConv are the network semantic convention attributes defined for a version +// of the OpenTelemetry specification. +type netConv struct { + NetHostNameKey attribute.Key + NetHostPortKey attribute.Key + NetPeerNameKey attribute.Key + NetPeerPortKey attribute.Key + NetProtocolName attribute.Key + NetProtocolVersion attribute.Key + NetSockFamilyKey attribute.Key + NetSockPeerAddrKey attribute.Key + NetSockPeerPortKey attribute.Key + NetSockHostAddrKey attribute.Key + NetSockHostPortKey attribute.Key + NetTransportOther attribute.KeyValue + NetTransportTCP attribute.KeyValue + NetTransportUDP attribute.KeyValue + NetTransportInProc attribute.KeyValue +} + +var nc = &netConv{ + NetHostNameKey: semconv.NetHostNameKey, + NetHostPortKey: semconv.NetHostPortKey, + NetPeerNameKey: semconv.NetPeerNameKey, + NetPeerPortKey: semconv.NetPeerPortKey, + NetProtocolName: semconv.NetProtocolNameKey, + NetProtocolVersion: semconv.NetProtocolVersionKey, + NetSockFamilyKey: semconv.NetSockFamilyKey, + NetSockPeerAddrKey: semconv.NetSockPeerAddrKey, + NetSockPeerPortKey: semconv.NetSockPeerPortKey, + NetSockHostAddrKey: semconv.NetSockHostAddrKey, + NetSockHostPortKey: semconv.NetSockHostPortKey, + NetTransportOther: semconv.NetTransportOther, + NetTransportTCP: semconv.NetTransportTCP, + NetTransportUDP: semconv.NetTransportUDP, + NetTransportInProc: semconv.NetTransportInProc, +} + +func (c *netConv) Transport(network string) attribute.KeyValue { + switch network { + case "tcp", "tcp4", "tcp6": + return c.NetTransportTCP + case "udp", "udp4", "udp6": + return c.NetTransportUDP + case "unix", "unixgram", "unixpacket": + return c.NetTransportInProc + default: + // "ip:*", "ip4:*", and "ip6:*" all are considered other. + return c.NetTransportOther + } +} + +// Host returns attributes for a network host address. +func (c *netConv) Host(address string) []attribute.KeyValue { + h, p := splitHostPort(address) + var n int + if h != "" { + n++ + if p > 0 { + n++ + } + } + + if n == 0 { + return nil + } + + attrs := make([]attribute.KeyValue, 0, n) + attrs = append(attrs, c.HostName(h)) + if p > 0 { + attrs = append(attrs, c.HostPort(p)) + } + return attrs +} + +func (c *netConv) HostName(name string) attribute.KeyValue { + return c.NetHostNameKey.String(name) +} + +func (c *netConv) HostPort(port int) attribute.KeyValue { + return c.NetHostPortKey.Int(port) +} + +func family(network, address string) string { + switch network { + case "unix", "unixgram", "unixpacket": + return "unix" + default: + if ip := net.ParseIP(address); ip != nil { + if ip.To4() == nil { + return "inet6" + } + return "inet" + } + } + return "" +} + +// Peer returns attributes for a network peer address. +func (c *netConv) Peer(address string) []attribute.KeyValue { + h, p := splitHostPort(address) + var n int + if h != "" { + n++ + if p > 0 { + n++ + } + } + + if n == 0 { + return nil + } + + attrs := make([]attribute.KeyValue, 0, n) + attrs = append(attrs, c.PeerName(h)) + if p > 0 { + attrs = append(attrs, c.PeerPort(p)) + } + return attrs +} + +func (c *netConv) PeerName(name string) attribute.KeyValue { + return c.NetPeerNameKey.String(name) +} + +func (c *netConv) PeerPort(port int) attribute.KeyValue { + return c.NetPeerPortKey.Int(port) +} + +func (c *netConv) SockPeerAddr(addr string) attribute.KeyValue { + return c.NetSockPeerAddrKey.String(addr) +} + +func (c *netConv) SockPeerPort(port int) attribute.KeyValue { + return c.NetSockPeerPortKey.Int(port) +} + +// splitHostPort splits a network address hostport of the form "host", +// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", +// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and +// port. +// +// An empty host is returned if it is not provided or unparsable. A negative +// port is returned if it is not provided or unparsable. +func splitHostPort(hostport string) (host string, port int) { + port = -1 + + if strings.HasPrefix(hostport, "[") { + addrEnd := strings.LastIndex(hostport, "]") + if addrEnd < 0 { + // Invalid hostport. + return + } + if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { + host = hostport[1:addrEnd] + return + } + } else { + if i := strings.LastIndex(hostport, ":"); i < 0 { + host = hostport + return + } + } + + host, pStr, err := net.SplitHostPort(hostport) + if err != nil { + return + } + + p, err := strconv.ParseUint(pStr, 10, 16) + if err != nil { + return + } + return host, int(p) +} + +func netProtocol(proto string) (name string, version string) { + name, version, _ = strings.Cut(proto, "/") + name = strings.ToLower(name) + return name, version +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go new file mode 100644 index 000000000..ea504e396 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/attribute" +) + +// Labeler is used to allow instrumented HTTP handlers to add custom attributes to +// the metrics recorded by the net/http instrumentation. +type Labeler struct { + mu sync.Mutex + attributes []attribute.KeyValue +} + +// Add attributes to a Labeler. +func (l *Labeler) Add(ls ...attribute.KeyValue) { + l.mu.Lock() + defer l.mu.Unlock() + l.attributes = append(l.attributes, ls...) +} + +// Get returns a copy of the attributes added to the Labeler. +func (l *Labeler) Get() []attribute.KeyValue { + l.mu.Lock() + defer l.mu.Unlock() + ret := make([]attribute.KeyValue, len(l.attributes)) + copy(ret, l.attributes) + return ret +} + +type labelerContextKeyType int + +const lablelerContextKey labelerContextKeyType = 0 + +// ContextWithLabeler returns a new context with the provided Labeler instance. +// Attributes added to the specified labeler will be injected into metrics +// emitted by the instrumentation. Only one labeller can be injected into the +// context. Injecting it multiple times will override the previous calls. +func ContextWithLabeler(parent context.Context, l *Labeler) context.Context { + return context.WithValue(parent, lablelerContextKey, l) +} + +// LabelerFromContext retrieves a Labeler instance from the provided context if +// one is available. If no Labeler was found in the provided context a new, empty +// Labeler is returned and the second return value is false. In this case it is +// safe to use the Labeler but any attributes added to it will not be used. +func LabelerFromContext(ctx context.Context) (*Labeler, bool) { + l, ok := ctx.Value(lablelerContextKey).(*Labeler) + if !ok { + l = &Labeler{} + } + return l, ok +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go new file mode 100644 index 000000000..0d3cb2e4a --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go @@ -0,0 +1,277 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "context" + "io" + "net/http" + "net/http/httptrace" + "sync/atomic" + "time" + + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/propagation" + semconv "go.opentelemetry.io/otel/semconv/v1.20.0" + "go.opentelemetry.io/otel/trace" +) + +// Transport implements the http.RoundTripper interface and wraps +// outbound HTTP(S) requests with a span and enriches it with metrics. +type Transport struct { + rt http.RoundTripper + + tracer trace.Tracer + meter metric.Meter + propagators propagation.TextMapPropagator + spanStartOptions []trace.SpanStartOption + filters []Filter + spanNameFormatter func(string, *http.Request) string + clientTrace func(context.Context) *httptrace.ClientTrace + + requestBytesCounter metric.Int64Counter + responseBytesCounter metric.Int64Counter + latencyMeasure metric.Float64Histogram +} + +var _ http.RoundTripper = &Transport{} + +// NewTransport wraps the provided http.RoundTripper with one that +// starts a span, injects the span context into the outbound request headers, +// and enriches it with metrics. +// +// If the provided http.RoundTripper is nil, http.DefaultTransport will be used +// as the base http.RoundTripper. +func NewTransport(base http.RoundTripper, opts ...Option) *Transport { + if base == nil { + base = http.DefaultTransport + } + + t := Transport{ + rt: base, + } + + defaultOpts := []Option{ + WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)), + WithSpanNameFormatter(defaultTransportFormatter), + } + + c := newConfig(append(defaultOpts, opts...)...) + t.applyConfig(c) + t.createMeasures() + + return &t +} + +func (t *Transport) applyConfig(c *config) { + t.tracer = c.Tracer + t.meter = c.Meter + t.propagators = c.Propagators + t.spanStartOptions = c.SpanStartOptions + t.filters = c.Filters + t.spanNameFormatter = c.SpanNameFormatter + t.clientTrace = c.ClientTrace +} + +func (t *Transport) createMeasures() { + var err error + t.requestBytesCounter, err = t.meter.Int64Counter( + clientRequestSize, + metric.WithUnit("By"), + metric.WithDescription("Measures the size of HTTP request messages."), + ) + handleErr(err) + + t.responseBytesCounter, err = t.meter.Int64Counter( + clientResponseSize, + metric.WithUnit("By"), + metric.WithDescription("Measures the size of HTTP response messages."), + ) + handleErr(err) + + t.latencyMeasure, err = t.meter.Float64Histogram( + clientDuration, + metric.WithUnit("ms"), + metric.WithDescription("Measures the duration of outbound HTTP requests."), + ) + handleErr(err) +} + +func defaultTransportFormatter(_ string, r *http.Request) string { + return "HTTP " + r.Method +} + +// RoundTrip creates a Span and propagates its context via the provided request's headers +// before handing the request to the configured base RoundTripper. The created span will +// end when the response body is closed or when a read from the body returns io.EOF. +func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { + requestStartTime := time.Now() + for _, f := range t.filters { + if !f(r) { + // Simply pass through to the base RoundTripper if a filter rejects the request + return t.rt.RoundTrip(r) + } + } + + tracer := t.tracer + + if tracer == nil { + if span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() { + tracer = newTracer(span.TracerProvider()) + } else { + tracer = newTracer(otel.GetTracerProvider()) + } + } + + opts := append([]trace.SpanStartOption{}, t.spanStartOptions...) // start with the configured options + + ctx, span := tracer.Start(r.Context(), t.spanNameFormatter("", r), opts...) + + if t.clientTrace != nil { + ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx)) + } + + labeler, found := LabelerFromContext(ctx) + if !found { + ctx = ContextWithLabeler(ctx, labeler) + } + + r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request. + + // use a body wrapper to determine the request size + var bw bodyWrapper + // if request body is nil or NoBody, we don't want to mutate the body as it + // will affect the identity of it in an unforeseeable way because we assert + // ReadCloser fulfills a certain interface and it is indeed nil or NoBody. + if r.Body != nil && r.Body != http.NoBody { + bw.ReadCloser = r.Body + // noop to prevent nil panic. not using this record fun yet. + bw.record = func(int64) {} + r.Body = &bw + } + + span.SetAttributes(semconvutil.HTTPClientRequest(r)...) + t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header)) + + res, err := t.rt.RoundTrip(r) + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) + span.End() + return res, err + } + + // metrics + metricAttrs := append(labeler.Get(), semconvutil.HTTPClientRequestMetrics(r)...) + if res.StatusCode > 0 { + metricAttrs = append(metricAttrs, semconv.HTTPStatusCode(res.StatusCode)) + } + o := metric.WithAttributeSet(attribute.NewSet(metricAttrs...)) + addOpts := []metric.AddOption{o} // Allocate vararg slice once. + t.requestBytesCounter.Add(ctx, bw.read.Load(), addOpts...) + // For handling response bytes we leverage a callback when the client reads the http response + readRecordFunc := func(n int64) { + t.responseBytesCounter.Add(ctx, n, addOpts...) + } + + // traces + span.SetAttributes(semconvutil.HTTPClientResponse(res)...) + span.SetStatus(semconvutil.HTTPClientStatus(res.StatusCode)) + + res.Body = newWrappedBody(span, readRecordFunc, res.Body) + + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) + + t.latencyMeasure.Record(ctx, elapsedTime, o) + + return res, err +} + +// newWrappedBody returns a new and appropriately scoped *wrappedBody as an +// io.ReadCloser. If the passed body implements io.Writer, the returned value +// will implement io.ReadWriteCloser. +func newWrappedBody(span trace.Span, record func(n int64), body io.ReadCloser) io.ReadCloser { + // The successful protocol switch responses will have a body that + // implement an io.ReadWriteCloser. Ensure this interface type continues + // to be satisfied if that is the case. + if _, ok := body.(io.ReadWriteCloser); ok { + return &wrappedBody{span: span, record: record, body: body} + } + + // Remove the implementation of the io.ReadWriteCloser and only implement + // the io.ReadCloser. + return struct{ io.ReadCloser }{&wrappedBody{span: span, record: record, body: body}} +} + +// wrappedBody is the response body type returned by the transport +// instrumentation to complete a span. Errors encountered when using the +// response body are recorded in span tracking the response. +// +// The span tracking the response is ended when this body is closed. +// +// If the response body implements the io.Writer interface (i.e. for +// successful protocol switches), the wrapped body also will. +type wrappedBody struct { + span trace.Span + recorded atomic.Bool + record func(n int64) + body io.ReadCloser + read atomic.Int64 +} + +var _ io.ReadWriteCloser = &wrappedBody{} + +func (wb *wrappedBody) Write(p []byte) (int, error) { + // This will not panic given the guard in newWrappedBody. + n, err := wb.body.(io.Writer).Write(p) + if err != nil { + wb.span.RecordError(err) + wb.span.SetStatus(codes.Error, err.Error()) + } + return n, err +} + +func (wb *wrappedBody) Read(b []byte) (int, error) { + n, err := wb.body.Read(b) + // Record the number of bytes read + wb.read.Add(int64(n)) + + switch err { + case nil: + // nothing to do here but fall through to the return + case io.EOF: + wb.recordBytesRead() + wb.span.End() + default: + wb.span.RecordError(err) + wb.span.SetStatus(codes.Error, err.Error()) + } + return n, err +} + +// recordBytesRead is a function that ensures the number of bytes read is recorded once and only once. +func (wb *wrappedBody) recordBytesRead() { + // note: it is more performant (and equally correct) to use atomic.Bool over sync.Once here. In the event that + // two goroutines are racing to call this method, the number of bytes read will no longer increase. Using + // CompareAndSwap allows later goroutines to return quickly and not block waiting for the race winner to finish + // calling wb.record(wb.read.Load()). + if wb.recorded.CompareAndSwap(false, true) { + // Record the total number of bytes read + wb.record(wb.read.Load()) + } +} + +func (wb *wrappedBody) Close() error { + wb.recordBytesRead() + wb.span.End() + if wb.body != nil { + return wb.body.Close() + } + return nil +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go new file mode 100644 index 000000000..b0957f28c --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +// Version is the current release version of the otelhttp instrumentation. +func Version() string { + return "0.53.0" + // This string is updated by the pre_release.sh script during release +} + +// SemVersion is the semantic version to be supplied to tracer/meter creation. +// +// Deprecated: Use [Version] instead. +func SemVersion() string { + return Version() +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go new file mode 100644 index 000000000..948f8406c --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go @@ -0,0 +1,99 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + +import ( + "context" + "io" + "net/http" + "sync/atomic" + + "go.opentelemetry.io/otel/propagation" +) + +var _ io.ReadCloser = &bodyWrapper{} + +// bodyWrapper wraps a http.Request.Body (an io.ReadCloser) to track the number +// of bytes read and the last error. +type bodyWrapper struct { + io.ReadCloser + record func(n int64) // must not be nil + + read atomic.Int64 + err error +} + +func (w *bodyWrapper) Read(b []byte) (int, error) { + n, err := w.ReadCloser.Read(b) + n1 := int64(n) + w.read.Add(n1) + w.err = err + w.record(n1) + return n, err +} + +func (w *bodyWrapper) Close() error { + return w.ReadCloser.Close() +} + +var _ http.ResponseWriter = &respWriterWrapper{} + +// respWriterWrapper wraps a http.ResponseWriter in order to track the number of +// bytes written, the last error, and to catch the first written statusCode. +// TODO: The wrapped http.ResponseWriter doesn't implement any of the optional +// types (http.Hijacker, http.Pusher, http.CloseNotifier, http.Flusher, etc) +// that may be useful when using it in real life situations. +type respWriterWrapper struct { + http.ResponseWriter + record func(n int64) // must not be nil + + // used to inject the header + ctx context.Context + + props propagation.TextMapPropagator + + written int64 + statusCode int + err error + wroteHeader bool +} + +func (w *respWriterWrapper) Header() http.Header { + return w.ResponseWriter.Header() +} + +func (w *respWriterWrapper) Write(p []byte) (int, error) { + if !w.wroteHeader { + w.WriteHeader(http.StatusOK) + } + n, err := w.ResponseWriter.Write(p) + n1 := int64(n) + w.record(n1) + w.written += n1 + w.err = err + return n, err +} + +// WriteHeader persists initial statusCode for span attribution. +// All calls to WriteHeader will be propagated to the underlying ResponseWriter +// and will persist the statusCode from the first call. +// Blocking consecutive calls to WriteHeader alters expected behavior and will +// remove warning logs from net/http where developers will notice incorrect handler implementations. +func (w *respWriterWrapper) WriteHeader(statusCode int) { + if !w.wroteHeader { + w.wroteHeader = true + w.statusCode = statusCode + } + w.ResponseWriter.WriteHeader(statusCode) +} + +func (w *respWriterWrapper) Flush() { + if !w.wroteHeader { + w.WriteHeader(http.StatusOK) + } + + if f, ok := w.ResponseWriter.(http.Flusher); ok { + f.Flush() + } +} diff --git a/vendor/go.opentelemetry.io/otel/.codespellignore b/vendor/go.opentelemetry.io/otel/.codespellignore new file mode 100644 index 000000000..6bf3abc41 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.codespellignore @@ -0,0 +1,9 @@ +ot +fo +te +collison +consequentially +ans +nam +valu +thirdparty diff --git a/vendor/go.opentelemetry.io/otel/.codespellrc b/vendor/go.opentelemetry.io/otel/.codespellrc new file mode 100644 index 000000000..e2cb3ea94 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.codespellrc @@ -0,0 +1,10 @@ +# https://github.com/codespell-project/codespell +[codespell] +builtin = clear,rare,informal +check-filenames = +check-hidden = +ignore-words = .codespellignore +interactive = 1 +skip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools +uri-ignore-words-list = * +write = diff --git a/vendor/go.opentelemetry.io/otel/.gitattributes b/vendor/go.opentelemetry.io/otel/.gitattributes new file mode 100644 index 000000000..314766e91 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf diff --git a/vendor/go.opentelemetry.io/otel/.gitignore b/vendor/go.opentelemetry.io/otel/.gitignore new file mode 100644 index 000000000..895c7664b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.gitignore @@ -0,0 +1,22 @@ +.DS_Store +Thumbs.db + +.tools/ +venv/ +.idea/ +.vscode/ +*.iml +*.so +coverage.* +go.work +go.work.sum + +gen/ + +/example/dice/dice +/example/namedtracer/namedtracer +/example/otel-collector/otel-collector +/example/opencensus/opencensus +/example/passthrough/passthrough +/example/prometheus/prometheus +/example/zipkin/zipkin diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml new file mode 100644 index 000000000..6d9c8b649 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.golangci.yml @@ -0,0 +1,302 @@ +# See https://github.com/golangci/golangci-lint#config-file +run: + issues-exit-code: 1 #Default + tests: true #Default + +linters: + # Disable everything by default so upgrades to not include new "default + # enabled" linters. + disable-all: true + # Specifically enable linters we want to use. + enable: + - depguard + - errcheck + - errorlint + - godot + - gofumpt + - goimports + - gosec + - gosimple + - govet + - ineffassign + - misspell + - revive + - staticcheck + - tenv + - typecheck + - unconvert + - unused + - unparam + +issues: + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 + # Setting to unlimited so the linter only is run once to debug all issues. + max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 + # Setting to unlimited so the linter only is run once to debug all issues. + max-same-issues: 0 + # Excluding configuration per-path, per-linter, per-text and per-source. + exclude-rules: + # TODO: Having appropriate comments for exported objects helps development, + # even for objects in internal packages. Appropriate comments for all + # exported objects should be added and this exclusion removed. + - path: '.*internal/.*' + text: "exported (method|function|type|const) (.+) should have comment or be unexported" + linters: + - revive + # Yes, they are, but it's okay in a test. + - path: _test\.go + text: "exported func.*returns unexported type.*which can be annoying to use" + linters: + - revive + # Example test functions should be treated like main. + - path: example.*_test\.go + text: "calls to (.+) only in main[(][)] or init[(][)] functions" + linters: + - revive + # It's okay to not run gosec in a test. + - path: _test\.go + linters: + - gosec + # Igonoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand) + # as we commonly use it in tests and examples. + - text: "G404:" + linters: + - gosec + # Igonoring gosec G402: TLS MinVersion too low + # as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well. + - text: "G402: TLS MinVersion too low." + linters: + - gosec + include: + # revive exported should have comment or be unexported. + - EXC0012 + # revive package comment should be of the form ... + - EXC0013 + +linters-settings: + depguard: + rules: + non-tests: + files: + - "!$test" + - "!**/*test/*.go" + - "!**/internal/matchers/*.go" + deny: + - pkg: "testing" + - pkg: "github.com/stretchr/testify" + - pkg: "crypto/md5" + - pkg: "crypto/sha1" + - pkg: "crypto/**/pkix" + otlp-internal: + files: + - "!**/exporters/otlp/internal/**/*.go" + deny: + - pkg: "go.opentelemetry.io/otel/exporters/otlp/internal" + desc: Do not use cross-module internal packages. + otlptrace-internal: + files: + - "!**/exporters/otlp/otlptrace/*.go" + - "!**/exporters/otlp/otlptrace/internal/**.go" + deny: + - pkg: "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal" + desc: Do not use cross-module internal packages. + otlpmetric-internal: + files: + - "!**/exporters/otlp/otlpmetric/internal/*.go" + - "!**/exporters/otlp/otlpmetric/internal/**/*.go" + deny: + - pkg: "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal" + desc: Do not use cross-module internal packages. + otel-internal: + files: + - "**/sdk/*.go" + - "**/sdk/**/*.go" + - "**/exporters/*.go" + - "**/exporters/**/*.go" + - "**/schema/*.go" + - "**/schema/**/*.go" + - "**/metric/*.go" + - "**/metric/**/*.go" + - "**/bridge/*.go" + - "**/bridge/**/*.go" + - "**/example/*.go" + - "**/example/**/*.go" + - "**/trace/*.go" + - "**/trace/**/*.go" + - "**/log/*.go" + - "**/log/**/*.go" + deny: + - pkg: "go.opentelemetry.io/otel/internal$" + desc: Do not use cross-module internal packages. + - pkg: "go.opentelemetry.io/otel/internal/attribute" + desc: Do not use cross-module internal packages. + - pkg: "go.opentelemetry.io/otel/internal/internaltest" + desc: Do not use cross-module internal packages. + - pkg: "go.opentelemetry.io/otel/internal/matchers" + desc: Do not use cross-module internal packages. + godot: + exclude: + # Exclude links. + - '^ *\[[^]]+\]:' + # Exclude sentence fragments for lists. + - '^[ ]*[-•]' + # Exclude sentences prefixing a list. + - ':$' + goimports: + local-prefixes: go.opentelemetry.io + misspell: + locale: US + ignore-words: + - cancelled + revive: + # Sets the default failure confidence. + # This means that linting errors with less than 0.8 confidence will be ignored. + # Default: 0.8 + confidence: 0.01 + rules: + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports + - name: blank-imports + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr + - name: bool-literal-in-expr + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr + - name: constant-logical-expr + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument + # TODO (#3372) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280 + - name: context-as-argument + disabled: true + arguments: + allowTypesBefore: "*testing.T" + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type + - name: context-keys-type + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit + - name: deep-exit + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer + - name: defer + disabled: false + arguments: + - ["call-chain", "loop"] + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports + - name: dot-imports + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports + - name: duplicated-imports + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return + - name: early-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block + - name: empty-block + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines + - name: empty-lines + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming + - name: error-naming + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return + - name: error-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings + - name: error-strings + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf + - name: errorf + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported + - name: exported + disabled: false + arguments: + - "sayRepetitiveInsteadOfStutters" + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter + - name: flag-parameter + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches + - name: identical-branches + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return + - name: if-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement + - name: increment-decrement + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow + - name: indent-error-flow + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing + - name: import-shadowing + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments + - name: package-comments + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range + - name: range + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure + - name: range-val-in-closure + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address + - name: range-val-address + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id + - name: redefines-builtin-id + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format + - name: string-format + disabled: false + arguments: + - - panic + - '/^[^\n]*$/' + - must not contain line breaks + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag + - name: struct-tag + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else + - name: superfluous-else + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal + - name: time-equal + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming + - name: var-naming + disabled: false + arguments: + - ["ID"] # AllowList + - ["Otel", "Aws", "Gcp"] # DenyList + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration + - name: var-declaration + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion + - name: unconditional-recursion + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return + - name: unexported-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error + - name: unhandled-error + disabled: false + arguments: + - "fmt.Fprint" + - "fmt.Fprintf" + - "fmt.Fprintln" + - "fmt.Print" + - "fmt.Printf" + - "fmt.Println" + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt + - name: unnecessary-stmt + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break + - name: useless-break + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value + - name: waitgroup-by-value + disabled: false diff --git a/vendor/go.opentelemetry.io/otel/.lycheeignore b/vendor/go.opentelemetry.io/otel/.lycheeignore new file mode 100644 index 000000000..40d62fa2e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.lycheeignore @@ -0,0 +1,6 @@ +http://localhost +http://jaeger-collector +https://github.com/open-telemetry/opentelemetry-go/milestone/ +https://github.com/open-telemetry/opentelemetry-go/projects +file:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries +file:///home/runner/work/opentelemetry-go/opentelemetry-go/manual diff --git a/vendor/go.opentelemetry.io/otel/.markdownlint.yaml b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml new file mode 100644 index 000000000..3202496c3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml @@ -0,0 +1,29 @@ +# Default state for all rules +default: true + +# ul-style +MD004: false + +# hard-tabs +MD010: false + +# line-length +MD013: false + +# no-duplicate-header +MD024: + siblings_only: true + +#single-title +MD025: false + +# ol-prefix +MD029: + style: ordered + +# no-inline-html +MD033: false + +# fenced-code-language +MD040: false + diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md new file mode 100644 index 000000000..c01e6998e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -0,0 +1,3099 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.28.0/0.50.0/0.4.0] 2024-07-02 + +### Added + +- The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`. + This method is used to check if an `Instrument` instance is a zero-value. (#5431) +- Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. (#5468) +- The `go.opentelemetry.io/otel/semconv/v1.26.0` package. + The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. (#5476) +- The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. (#5499) +- The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. (#5530) + +### Changed + +- `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. (#5457) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. (#5490) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. (#5490) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#5490) + - The exporter no longer exports the deprecated "otel.library.name" or "otel.library.version" attributes. +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. (#5490) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. (#5490) +- `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. (#5493) +- Use non-generic functions in the `Start` method of `"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory allocation. (#5497) +- `service.instance.id` is populated for a `Resource` created with `"go.opentelemetry.io/otel/sdk/resource".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. (#5520) +- Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. (#5545) + +### Fixed + +- Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. (#5376) +- Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) +- Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) +- Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. (#5434) +- Document instrument name requirements in `go.opentelemetry.io/otel/metric`. (#5435) +- Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456) +- Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5464) +- Fix panic in baggage creation when a member contains `0x80` char in key or value. (#5494) +- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5508) +- Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. (#5514) +- Fix stale timestamps reported by the last-value aggregation. (#5517) +- Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. (#5521) +- Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. (#5549) + +## [1.27.0/0.49.0/0.3.0] 2024-05-21 + +### Added + +- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5242) +- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. (#5258) +- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. (#5263) +- The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. (#5276) +- Add metrics in the `otel-collector` example. (#5283) +- Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. (#5304) + - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`. + - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument. +- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349) + +### Changed + +- The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. (#5189) +- The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. (#5189) +- Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. (#5230) +- De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5230) +- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. (#5241) +- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. (#5272) +- Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. (#5286) +- Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. (#5305) +- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. (#5315) +- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374) + +### Fixed + +- Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. (#5306) +- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311) +- Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. (#5365) +- Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5371) +- Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. (#5375) + +## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24 + +### Added + +- Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134) +- Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194) +- Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`. + This new module contains the Go implementation of the OpenTelemetry Logs SDK. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. + This new module contains an OTLP exporter that transmits log telemetry using HTTP. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. + This new module contains an exporter prints log records to STDOUT. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- The `go.opentelemetry.io/otel/semconv/v1.25.0` package. + The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254) + +### Changed + +- Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177) +- Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214) +- The `otel-collector` example now uses docker compose to bring up services instead of kubernetes. (#5244) + +### Fixed + +- Slice attribute values in `go.opentelemetry.io/otel/attribute` are now emitted as their JSON representation. (#5159) + +## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05 + +### Added + +- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4906) +- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. (#4906) +- Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. (#5032) +- The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`. + This method is used to notify users if a log record will be emitted or not. (#5071) +- Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`. + This value represents an unset severity level. (#5072) +- Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. (#5076) +- Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`. + This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes. + At which point, users will be required to migrage their code, and this package will be deprecated then removed. (#5085) +- Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. (#5100) +- Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. (#5108) +- Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. (#5116) +- Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. (#5117) +- Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5111) +- Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. (#4528) + +### Changed + +- `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. (#5049) +- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with "dns" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). (#5151) + Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError). + Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated. + +### Fixed + +- Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. (#5027) +- Prevent default `ErrorHandler` self-delegation. (#5137) +- Update all dependencies to address [GO-2024-2687]. (#5139) + +### Removed + +- Drop support for [Go 1.20]. (#4967) + +### Deprecated + +- Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. (#4734) +- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. (#4734) +- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. (#4734) + +## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23 + +This release is the last to support [Go 1.20]. +The next release will require at least [Go 1.21]. + +### Added + +- Support [Go 1.22]. (#4890) +- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4900) +- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4900) +- The `go.opentelemetry.io/otel/log` module is added. + This module includes OpenTelemetry Go's implementation of the Logs Bridge API. + This module is in an alpha state, it is subject to breaking changes. + See our [versioning policy](./VERSIONING.md) for more info. (#4961) +- ARM64 platform to the compatibility testing suite. (#4994) + +### Fixed + +- Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. (#4945) +- Fix negative buckets in output of exponential histograms. (#4956) + +## [1.23.1] 2024-02-07 + +### Fixed + +- Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888) + +## [1.23.0] 2024-02-06 + +This release contains the first stable, `v1`, release of the following modules: + +- `go.opentelemetry.io/otel/bridge/opencensus` +- `go.opentelemetry.io/otel/bridge/opencensus/test` +- `go.opentelemetry.io/otel/example/opencensus` +- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` +- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` +- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` + +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +### Added + +- Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808) +- Experimental exemplar exporting is added to the metric SDK. + See [metric documentation](./sdk/metric/internal/x/README.md#exemplars) for more information about this feature and how to enable it. (#4871) +- `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`. + This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876) + +### Changed + +- The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict. + Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned. + It is up to the user to decide if they want to use the returned `Resource` or not. + It may have desired attributes overwritten or include stale semantic conventions. (#4876) + +### Fixed + +- Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449) +- Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820) +- Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827) + +## [1.23.0-rc.1] 2024-01-18 + +This is a release candidate for the v1.23.0 release. +That release is expected to include the `v1` release of the following modules: + +- `go.opentelemetry.io/otel/bridge/opencensus` +- `go.opentelemetry.io/otel/bridge/opencensus/test` +- `go.opentelemetry.io/otel/example/opencensus` +- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` +- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` +- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` + +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +## [1.22.0/0.45.0] 2024-01-17 + +### Added + +- The `go.opentelemetry.io/otel/semconv/v1.22.0` package. + The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. (#4735) +- The `go.opentelemetry.io/otel/semconv/v1.23.0` package. + The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. (#4746) +- The `go.opentelemetry.io/otel/semconv/v1.23.1` package. + The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. (#4749) +- The `go.opentelemetry.io/otel/semconv/v1.24.0` package. + The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770) +- Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733) +- Experimental cardinality limiting is added to the metric SDK. + See [metric documentation](./sdk/metric/internal/x/README.md#cardinality-limit) for more information about this feature and how to enable it. (#4457) +- Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804) + +### Changed + +- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754) +- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754) +- Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`. + If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). (#4671) +- Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722) +- Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. (#4721) +- Improve `go.opentelemetry.io/otel/baggage` performance. (#4743) +- Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. (#4774) +- `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. (#4775) +- Improve `go.opentelemetry.io/otel/trace.Span`'s performance when adding multiple attributes. (#4818) +- `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. (#4804) + +### Fixed + +- Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. (#4755) +- Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. (#4756) +- Fix observable not registered error when the asynchronous instrument has a drop aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#4772) +- Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. (#4776) +- Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. (#4804) +- Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. (#4742) + +## [1.21.0/0.44.0] 2023-11-16 + +### Removed + +- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706) +- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707) +- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708) +- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723) + +### Fixed + +- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719) +- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719) + +## [1.20.0/0.43.0] 2023-11-10 + +This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementers need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this. + +### Added + +- Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567) +- Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584) +- Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620) +- Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620) +- Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644) +- Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649) +- Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603) +- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660) +- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660) +- Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622) +- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585) +- Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605) +- Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668) + +### Deprecated + +- Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567) +- Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618) +- Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`. + Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620) +- Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649) +- Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693) + +### Changed + +- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583) +- The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type. + This extends the `TracerProvider` interface and is is a breaking change for any existing implementation. + Implementers need to update their implementations based on what they want the default behavior of the interface to be. + See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) +- The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type. + This extends the `Tracer` interface and is is a breaking change for any existing implementation. + Implementers need to update their implementations based on what they want the default behavior of the interface to be. + See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) +- The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type. + This extends the `Span` interface and is is a breaking change for any existing implementation. + Implementers need to update their implementations based on what they want the default behavior of the interface to be. + See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) +- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) +- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) +- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670) +- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670) +- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669) +- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669) +- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679) +- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679) + +### Fixed + +- Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667) +- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699) +- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699) +- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699) +- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699) +- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699) +- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648) +- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695) +- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695) + +## [1.19.0/0.42.0/0.0.7] 2023-09-28 + +This release contains the first stable release of the OpenTelemetry Go [metric SDK]. +Our project stability guarantees now apply to the `go.opentelemetry.io/otel/sdk/metric` package. +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +### Added + +- Add the "Roll the dice" getting started application example in `go.opentelemetry.io/otel/example/dice`. (#4539) +- The `WithWriter` and `WithPrettyPrint` options to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to set a custom `io.Writer`, and allow displaying the output in human-readable JSON. (#4507) + +### Changed + +- Allow '/' characters in metric instrument names. (#4501) +- The exporter in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` does not prettify its output by default anymore. (#4507) +- Upgrade `gopkg.io/yaml` from `v2` to `v3` in `go.opentelemetry.io/otel/schema`. (#4535) + +### Fixed + +- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the Prometheus metric on every `Collect` if we know the scope is invalid. (#4499) + +### Removed + +- Remove `"go.opentelemetry.io/otel/bridge/opencensus".NewMetricExporter`, which is replaced by `NewMetricProducer`. (#4566) + +## [1.19.0-rc.1/0.42.0-rc.1] 2023-09-14 + +This is a release candidate for the v1.19.0/v0.42.0 release. +That release is expected to include the `v1` release of the OpenTelemetry Go metric SDK and will provide stability guarantees of that SDK. +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +### Changed + +- Allow '/' characters in metric instrument names. (#4501) + +### Fixed + +- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the prometheus metric on every `Collect` if we know the scope is invalid. (#4499) + +## [1.18.0/0.41.0/0.0.6] 2023-09-12 + +This release drops the compatibility guarantee of [Go 1.19]. + +### Added + +- Add `WithProducer` option in `go.opentelemetry.op/otel/exporters/prometheus` to restore the ability to register producers on the prometheus exporter's manual reader. (#4473) +- Add `IgnoreValue` option in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest` to allow ignoring values when comparing metrics. (#4447) + +### Changed + +- Use a `TestingT` interface instead of `*testing.T` struct in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#4483) + +### Deprecated + +- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` was deprecated in `v0.35.0` (#3541). + The deprecation notice format for the function has been corrected to trigger Go documentation and build tooling. (#4470) + +### Removed + +- Removed the deprecated `go.opentelemetry.io/otel/exporters/jaeger` package. (#4467) +- Removed the deprecated `go.opentelemetry.io/otel/example/jaeger` package. (#4467) +- Removed the deprecated `go.opentelemetry.io/otel/sdk/metric/aggregation` package. (#4468) +- Removed the deprecated internal packages in `go.opentelemetry.io/otel/exporters/otlp` and its sub-packages. (#4469) +- Dropped guaranteed support for versions of Go less than 1.20. (#4481) + +## [1.17.0/0.40.0/0.0.5] 2023-08-28 + +### Added + +- Export the `ManualReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244) +- Export the `PeriodicReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244) +- Add support for exponential histogram aggregations. + A histogram can be configured as an exponential histogram using a view with `"go.opentelemetry.io/otel/sdk/metric".ExponentialHistogram` as the aggregation. (#4245) +- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4272) +- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4272) +- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` environment variable. (#4287) +- Add `WithoutCounterSuffixes` option in `go.opentelemetry.io/otel/exporters/prometheus` to disable addition of `_total` suffixes. (#4306) +- Add info and debug logging to the metric SDK in `go.opentelemetry.io/otel/sdk/metric`. (#4315) +- The `go.opentelemetry.io/otel/semconv/v1.21.0` package. + The package contains semantic conventions from the `v1.21.0` version of the OpenTelemetry Semantic Conventions. (#4362) +- Accept 201 to 299 HTTP status as success in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4365) +- Document the `Temporality` and `Aggregation` methods of the `"go.opentelemetry.io/otel/sdk/metric".Exporter"` need to be concurrent safe. (#4381) +- Expand the set of units supported by the Prometheus exporter, and don't add unit suffixes if they are already present in `go.opentelemetry.op/otel/exporters/prometheus` (#4374) +- Move the `Aggregation` interface and its implementations from `go.opentelemetry.io/otel/sdk/metric/aggregation` to `go.opentelemetry.io/otel/sdk/metric`. (#4435) +- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION` environment variable. (#4437) +- Add the `NewAllowKeysFilter` and `NewDenyKeysFilter` functions to `go.opentelemetry.io/otel/attribute` to allow convenient creation of allow-keys and deny-keys filters. (#4444) +- Support Go 1.21. (#4463) + +### Changed + +- Starting from `v1.21.0` of semantic conventions, `go.opentelemetry.io/otel/semconv/{version}/httpconv` and `go.opentelemetry.io/otel/semconv/{version}/netconv` packages will no longer be published. (#4145) +- Log duplicate instrument conflict at a warning level instead of info in `go.opentelemetry.io/otel/sdk/metric`. (#4202) +- Return an error on the creation of new instruments in `go.opentelemetry.io/otel/sdk/metric` if their name doesn't pass regexp validation. (#4210) +- `NewManualReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*ManualReader` instead of `Reader`. (#4244) +- `NewPeriodicReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*PeriodicReader` instead of `Reader`. (#4244) +- Count the Collect time in the `PeriodicReader` timeout in `go.opentelemetry.io/otel/sdk/metric`. (#4221) +- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272) +- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272) +- If an attribute set is omitted from an async callback, the previous value will no longer be exported in `go.opentelemetry.io/otel/sdk/metric`. (#4290) +- If an attribute set is observed multiple times in an async callback in `go.opentelemetry.io/otel/sdk/metric`, the values will be summed instead of the last observation winning. (#4289) +- Allow the explicit bucket histogram aggregation to be used for the up-down counter, observable counter, observable up-down counter, and observable gauge in the `go.opentelemetry.io/otel/sdk/metric` package. (#4332) +- Restrict `Meter`s in `go.opentelemetry.io/otel/sdk/metric` to only register and collect instruments it created. (#4333) +- `PeriodicReader.Shutdown` and `PeriodicReader.ForceFlush` in `go.opentelemetry.io/otel/sdk/metric` now apply the periodic reader's timeout to the operation if the user provided context does not contain a deadline. (#4356, #4377) +- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.21.0`. (#4408) +- Increase instrument name maximum length from 63 to 255 characters in `go.opentelemetry.io/otel/sdk/metric`. (#4434) +- Add `go.opentelemetry.op/otel/sdk/metric.WithProducer` as an `Option` for `"go.opentelemetry.io/otel/sdk/metric".NewManualReader` and `"go.opentelemetry.io/otel/sdk/metric".NewPeriodicReader`. (#4346) + +### Removed + +- Remove `Reader.RegisterProducer` in `go.opentelemetry.io/otel/metric`. + Use the added `WithProducer` option instead. (#4346) +- Remove `Reader.ForceFlush` in `go.opentelemetry.io/otel/metric`. + Notice that `PeriodicReader.ForceFlush` is still available. (#4375) + +### Fixed + +- Correctly format log messages from the `go.opentelemetry.io/otel/exporters/zipkin` exporter. (#4143) +- Log an error for calls to `NewView` in `go.opentelemetry.io/otel/sdk/metric` that have empty criteria. (#4307) +- Fix `"go.opentelemetry.io/otel/sdk/resource".WithHostID()` to not set an empty `host.id`. (#4317) +- Use the instrument identifying fields to cache aggregators and determine duplicate instrument registrations in `go.opentelemetry.io/otel/sdk/metric`. (#4337) +- Detect duplicate instruments for case-insensitive names in `go.opentelemetry.io/otel/sdk/metric`. (#4338) +- The `ManualReader` will not panic if `AggregationSelector` returns `nil` in `go.opentelemetry.io/otel/sdk/metric`. (#4350) +- If a `Reader`'s `AggregationSelector` returns `nil` or `DefaultAggregation` the pipeline will use the default aggregation. (#4350) +- Log a suggested view that fixes instrument conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4349) +- Fix possible panic, deadlock and race condition in batch span processor in `go.opentelemetry.io/otel/sdk/trace`. (#4353) +- Improve context cancellation handling in batch span processor's `ForceFlush` in `go.opentelemetry.io/otel/sdk/trace`. (#4369) +- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` using gotmpl. (#4397, #3846) +- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4404, #3846) +- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4407, #3846) +- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4400, #3846) +- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4401, #3846) +- Do not block the metric SDK when OTLP metric exports are blocked in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#3925, #4395) +- Do not append `_total` if the counter already has that suffix for the Prometheus exproter in `go.opentelemetry.io/otel/exporter/prometheus`. (#4373) +- Fix resource detection data race in `go.opentelemetry.io/otel/sdk/resource`. (#4409) +- Use the first-seen instrument name during instrument name conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4428) + +### Deprecated + +- The `go.opentelemetry.io/otel/exporters/jaeger` package is deprecated. + OpenTelemetry dropped support for Jaeger exporter in July 2023. + Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` + or `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` instead. (#4423) +- The `go.opentelemetry.io/otel/example/jaeger` package is deprecated. (#4423) +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` package is deprecated. (#4420) +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/oconf` package is deprecated. (#4420) +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otest` package is deprecated. (#4420) +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/transform` package is deprecated. (#4420) +- The `go.opentelemetry.io/otel/exporters/otlp/internal` package is deprecated. (#4421) +- The `go.opentelemetry.io/otel/exporters/otlp/internal/envconfig` package is deprecated. (#4421) +- The `go.opentelemetry.io/otel/exporters/otlp/internal/retry` package is deprecated. (#4421) +- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` package is deprecated. (#4425) +- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/envconfig` package is deprecated. (#4425) +- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig` package is deprecated. (#4425) +- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest` package is deprecated. (#4425) +- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry` package is deprecated. (#4425) +- The `go.opentelemetry.io/otel/sdk/metric/aggregation` package is deprecated. + Use the aggregation types added to `go.opentelemetry.io/otel/sdk/metric` instead. (#4435) + +## [1.16.0/0.39.0] 2023-05-18 + +This release contains the first stable release of the OpenTelemetry Go [metric API]. +Our project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package. +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +### Added + +- The `go.opentelemetry.io/otel/semconv/v1.19.0` package. + The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. (#3848) +- The `go.opentelemetry.io/otel/semconv/v1.20.0` package. + The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. (#4078) +- The Exponential Histogram data types in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#4165) +- OTLP metrics exporter now supports the Exponential Histogram Data Type. (#4222) +- Fix serialization of `time.Time` zero values in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` packages. (#4271) + +### Changed + +- Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. (#4049) +- `MeterProvider` returns noop meters once it has been shutdown. (#4154) + +### Removed + +- The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed. + Use `go.opentelemetry.io/otel/metric` instead. (#4055) + +### Fixed + +- Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. (#4077) + +## [1.16.0-rc.1/0.39.0-rc.1] 2023-05-03 + +This is a release candidate for the v1.16.0/v0.39.0 release. +That release is expected to include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +### Added + +- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#4039) + - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`. + - Use `GetMeterProivder` for a global `metric.MeterProvider`. + - Use `SetMeterProivder` to set the global `metric.MeterProvider`. + +### Changed + +- Move the `go.opentelemetry.io/otel/metric` module to the `stable-v1` module set. + This stages the metric API to be released as a stable module. (#4038) + +### Removed + +- The `go.opentelemetry.io/otel/metric/global` package is removed. + Use `go.opentelemetry.io/otel` instead. (#4039) + +## [1.15.1/0.38.1] 2023-05-02 + +### Fixed + +- Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. (#4040, #4041) + +## [1.15.0/0.38.0] 2023-04-27 + +### Added + +- The `go.opentelemetry.io/otel/metric/embedded` package. (#3916) +- The `Version` function to `go.opentelemetry.io/otel/sdk` to return the SDK version. (#3949) +- Add a `WithNamespace` option to `go.opentelemetry.io/otel/exporters/prometheus` to allow users to prefix metrics with a namespace. (#3970) +- The following configuration types were added to `go.opentelemetry.io/otel/metric/instrument` to be used in the configuration of measurement methods. (#3971) + - The `AddConfig` used to hold configuration for addition measurements + - `NewAddConfig` used to create a new `AddConfig` + - `AddOption` used to configure an `AddConfig` + - The `RecordConfig` used to hold configuration for recorded measurements + - `NewRecordConfig` used to create a new `RecordConfig` + - `RecordOption` used to configure a `RecordConfig` + - The `ObserveConfig` used to hold configuration for observed measurements + - `NewObserveConfig` used to create a new `ObserveConfig` + - `ObserveOption` used to configure an `ObserveConfig` +- `WithAttributeSet` and `WithAttributes` are added to `go.opentelemetry.io/otel/metric/instrument`. + They return an option used during a measurement that defines the attribute Set associated with the measurement. (#3971) +- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` to return the OTLP metrics client version. (#3956) +- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlptrace` to return the OTLP trace client version. (#3956) + +### Changed + +- The `Extrema` in `go.opentelemetry.io/otel/sdk/metric/metricdata` is redefined with a generic argument of `[N int64 | float64]`. (#3870) +- Update all exported interfaces from `go.opentelemetry.io/otel/metric` to embed their corresponding interface from `go.opentelemetry.io/otel/metric/embedded`. + This adds an implementation requirement to set the interface default behavior for unimplemented methods. (#3916) +- Move No-Op implementation from `go.opentelemetry.io/otel/metric` into its own package `go.opentelemetry.io/otel/metric/noop`. (#3941) + - `metric.NewNoopMeterProvider` is replaced with `noop.NewMeterProvider` +- Add all the methods from `"go.opentelemetry.io/otel/trace".SpanContext` to `bridgeSpanContext` by embedding `otel.SpanContext` in `bridgeSpanContext`. (#3966) +- Wrap `UploadMetrics` error in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/` to improve error message when encountering generic grpc errors. (#3974) +- The measurement methods for all instruments in `go.opentelemetry.io/otel/metric/instrument` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971) + - The `Int64Counter.Add` method now accepts `...AddOption` + - The `Float64Counter.Add` method now accepts `...AddOption` + - The `Int64UpDownCounter.Add` method now accepts `...AddOption` + - The `Float64UpDownCounter.Add` method now accepts `...AddOption` + - The `Int64Histogram.Record` method now accepts `...RecordOption` + - The `Float64Histogram.Record` method now accepts `...RecordOption` + - The `Int64Observer.Observe` method now accepts `...ObserveOption` + - The `Float64Observer.Observe` method now accepts `...ObserveOption` +- The `Observer` methods in `go.opentelemetry.io/otel/metric` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971) + - The `Observer.ObserveInt64` method now accepts `...ObserveOption` + - The `Observer.ObserveFloat64` method now accepts `...ObserveOption` +- Move global metric back to `go.opentelemetry.io/otel/metric/global` from `go.opentelemetry.io/otel`. (#3986) + +### Fixed + +- `TracerProvider` allows calling `Tracer()` while it's shutting down. + It used to deadlock. (#3924) +- Use the SDK version for the Telemetry SDK resource detector in `go.opentelemetry.io/otel/sdk/resource`. (#3949) +- Fix a data race in `SpanProcessor` returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. (#3951) +- Automatically figure out the default aggregation with `aggregation.Default`. (#3967) + +### Deprecated + +- The `go.opentelemetry.io/otel/metric/instrument` package is deprecated. + Use the equivalent types added to `go.opentelemetry.io/otel/metric` instead. (#4018) + +## [1.15.0-rc.2/0.38.0-rc.2] 2023-03-23 + +This is a release candidate for the v1.15.0/v0.38.0 release. +That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +### Added + +- The `WithHostID` option to `go.opentelemetry.io/otel/sdk/resource`. (#3812) +- The `WithoutTimestamps` option to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to sets all timestamps to zero. (#3828) +- The new `Exemplar` type is added to `go.opentelemetry.io/otel/sdk/metric/metricdata`. + Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849) +- Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895) +- The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900) +- Added a log message warning about usage of `SimpleSpanProcessor` in production environments. (#3854) + +### Changed + +- Optimize memory allocation when creation a new `Set` using `NewSet` or `NewSetWithFiltered` in `go.opentelemetry.io/otel/attribute`. (#3832) +- Optimize memory allocation when creation new metric instruments in `go.opentelemetry.io/otel/sdk/metric`. (#3832) +- Avoid creating new objects on all calls to `WithDeferredSetup` and `SkipContextSetup` in OpenTracing bridge. (#3833) +- The `New` and `Detect` functions from `go.opentelemetry.io/otel/sdk/resource` return errors that wrap underlying errors instead of just containing the underlying error strings. (#3844) +- Both the `Histogram` and `HistogramDataPoint` are redefined with a generic argument of `[N int64 | float64]` in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#3849) +- The metric `Export` interface from `go.opentelemetry.io/otel/sdk/metric` accepts a `*ResourceMetrics` instead of `ResourceMetrics`. (#3853) +- Rename `Asynchronous` to `Observable` in `go.opentelemetry.io/otel/metric/instrument`. (#3892) +- Rename `Int64ObserverOption` to `Int64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895) +- Rename `Float64ObserverOption` to `Float64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895) +- The internal logging changes the verbosity level of info to `V(4)`, the verbosity level of debug to `V(8)`. (#3900) + +### Fixed + +- `TracerProvider` consistently doesn't allow to register a `SpanProcessor` after shutdown. (#3845) + +### Removed + +- The deprecated `go.opentelemetry.io/otel/metric/global` package is removed. (#3829) +- The unneeded `Synchronous` interface in `go.opentelemetry.io/otel/metric/instrument` was removed. (#3892) +- The `Float64ObserverConfig` and `NewFloat64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`. + Use the added `float64` instrument configuration instead. (#3895) +- The `Int64ObserverConfig` and `NewInt64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`. + Use the added `int64` instrument configuration instead. (#3895) +- The `NewNoopMeter` function in `go.opentelemetry.io/otel/metric`, use `NewMeterProvider().Meter("")` instead. (#3893) + +## [1.15.0-rc.1/0.38.0-rc.1] 2023-03-01 + +This is a release candidate for the v1.15.0/v0.38.0 release. +That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. +See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. + +This release drops the compatibility guarantee of [Go 1.18]. + +### Added + +- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#3818) + - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`. + - Use `GetMeterProivder` for a global `metric.MeterProvider`. + - Use `SetMeterProivder` to set the global `metric.MeterProvider`. + +### Changed + +- Dropped compatibility testing for [Go 1.18]. + The project no longer guarantees support for this version of Go. (#3813) + +### Fixed + +- Handle empty environment variable as it they were not set. (#3764) +- Clarify the `httpconv` and `netconv` packages in `go.opentelemetry.io/otel/semconv/*` provide tracing semantic conventions. (#3823) +- Fix race conditions in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic. (#3899) +- Fix sending nil `scopeInfo` to metrics channel in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic in `github.com/prometheus/client_golang/prometheus`. (#3899) + +### Deprecated + +- The `go.opentelemetry.io/otel/metric/global` package is deprecated. + Use `go.opentelemetry.io/otel` instead. (#3818) + +### Removed + +- The deprecated `go.opentelemetry.io/otel/metric/unit` package is removed. (#3814) + +## [1.14.0/0.37.0/0.0.4] 2023-02-27 + +This release is the last to support [Go 1.18]. +The next release will require at least [Go 1.19]. + +### Added + +- The `event` type semantic conventions are added to `go.opentelemetry.io/otel/semconv/v1.17.0`. (#3697) +- Support [Go 1.20]. (#3693) +- The `go.opentelemetry.io/otel/semconv/v1.18.0` package. + The package contains semantic conventions from the `v1.18.0` version of the OpenTelemetry specification. (#3719) + - The following `const` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included: + - `OtelScopeNameKey` -> `OTelScopeNameKey` + - `OtelScopeVersionKey` -> `OTelScopeVersionKey` + - `OtelLibraryNameKey` -> `OTelLibraryNameKey` + - `OtelLibraryVersionKey` -> `OTelLibraryVersionKey` + - `OtelStatusCodeKey` -> `OTelStatusCodeKey` + - `OtelStatusDescriptionKey` -> `OTelStatusDescriptionKey` + - `OtelStatusCodeOk` -> `OTelStatusCodeOk` + - `OtelStatusCodeError` -> `OTelStatusCodeError` + - The following `func` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included: + - `OtelScopeName` -> `OTelScopeName` + - `OtelScopeVersion` -> `OTelScopeVersion` + - `OtelLibraryName` -> `OTelLibraryName` + - `OtelLibraryVersion` -> `OTelLibraryVersion` + - `OtelStatusDescription` -> `OTelStatusDescription` +- A `IsSampled` method is added to the `SpanContext` implementation in `go.opentelemetry.io/otel/bridge/opentracing` to expose the span sampled state. + See the [README](./bridge/opentracing/README.md) for more information. (#3570) +- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/metric`. (#3738) +- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/trace`. (#3739) +- The following environment variables are supported by the periodic `Reader` in `go.opentelemetry.io/otel/sdk/metric`. (#3763) + - `OTEL_METRIC_EXPORT_INTERVAL` sets the time between collections and exports. + - `OTEL_METRIC_EXPORT_TIMEOUT` sets the timeout an export is attempted. + +### Changed + +- Fall-back to `TextMapCarrier` when it's not `HttpHeader`s in `go.opentelemetry.io/otel/bridge/opentracing`. (#3679) +- The `Collect` method of the `"go.opentelemetry.io/otel/sdk/metric".Reader` interface is updated to accept the `metricdata.ResourceMetrics` value the collection will be made into. + This change is made to enable memory reuse by SDK users. (#3732) +- The `WithUnit` option in `go.opentelemetry.io/otel/sdk/metric/instrument` is updated to accept a `string` for the unit value. (#3776) + +### Fixed + +- Ensure `go.opentelemetry.io/otel` does not use generics. (#3723, #3725) +- Multi-reader `MeterProvider`s now export metrics for all readers, instead of just the first reader. (#3720, #3724) +- Remove use of deprecated `"math/rand".Seed` in `go.opentelemetry.io/otel/example/prometheus`. (#3733) +- Do not silently drop unknown schema data with `Parse` in `go.opentelemetry.io/otel/schema/v1.1`. (#3743) +- Data race issue in OTLP exporter retry mechanism. (#3755, #3756) +- Wrapping empty errors when exporting in `go.opentelemetry.io/otel/sdk/metric`. (#3698, #3772) +- Incorrect "all" and "resource" definition for schema files in `go.opentelemetry.io/otel/schema/v1.1`. (#3777) + +### Deprecated + +- The `go.opentelemetry.io/otel/metric/unit` package is deprecated. + Use the equivalent unit string instead. (#3776) + - Use `"1"` instead of `unit.Dimensionless` + - Use `"By"` instead of `unit.Bytes` + - Use `"ms"` instead of `unit.Milliseconds` + +## [1.13.0/0.36.0] 2023-02-07 + +### Added + +- Attribute `KeyValue` creations functions to `go.opentelemetry.io/otel/semconv/v1.17.0` for all non-enum semantic conventions. + These functions ensure semantic convention type correctness. (#3675) + +### Fixed + +- Removed the `http.target` attribute from being added by `ServerRequest` in the following packages. (#3687) + - `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv` + - `go.opentelemetry.io/otel/semconv/v1.14.0/httpconv` + - `go.opentelemetry.io/otel/semconv/v1.15.0/httpconv` + - `go.opentelemetry.io/otel/semconv/v1.16.0/httpconv` + - `go.opentelemetry.io/otel/semconv/v1.17.0/httpconv` + +### Removed + +- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is removed. (#3631) +- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is removed. (#3631) +- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is removed. (#3631) +- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncint64` package is removed. (#3631) + +## [1.12.0/0.35.0] 2023-01-28 + +### Added + +- The `WithInt64Callback` option to `go.opentelemetry.io/otel/metric/instrument`. + This options is used to configure `int64` Observer callbacks during their creation. (#3507) +- The `WithFloat64Callback` option to `go.opentelemetry.io/otel/metric/instrument`. + This options is used to configure `float64` Observer callbacks during their creation. (#3507) +- The `Producer` interface and `Reader.RegisterProducer(Producer)` to `go.opentelemetry.io/otel/sdk/metric`. + These additions are used to enable external metric Producers. (#3524) +- The `Callback` function type to `go.opentelemetry.io/otel/metric`. + This new named function type is registered with a `Meter`. (#3564) +- The `go.opentelemetry.io/otel/semconv/v1.13.0` package. + The package contains semantic conventions from the `v1.13.0` version of the OpenTelemetry specification. (#3499) + - The `EndUserAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientRequest` and `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `HTTPAttributesFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientResponse` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `HTTPClientAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `HTTPServerAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `HTTPServerMetricAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `NetAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `Transport` in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` and `ClientRequest` or `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `SpanStatusFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `SpanStatusFromHTTPStatusCodeAndSpanKind` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `ClientStatus` and `ServerStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. + - The `Client` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Conn`. + - The `Server` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Listener`. +- The `go.opentelemetry.io/otel/semconv/v1.14.0` package. + The package contains semantic conventions from the `v1.14.0` version of the OpenTelemetry specification. (#3566) +- The `go.opentelemetry.io/otel/semconv/v1.15.0` package. + The package contains semantic conventions from the `v1.15.0` version of the OpenTelemetry specification. (#3578) +- The `go.opentelemetry.io/otel/semconv/v1.16.0` package. + The package contains semantic conventions from the `v1.16.0` version of the OpenTelemetry specification. (#3579) +- Metric instruments to `go.opentelemetry.io/otel/metric/instrument`. + These instruments are use as replacements of the deprecated `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586) + - `Float64ObservableCounter` replaces the `asyncfloat64.Counter` + - `Float64ObservableUpDownCounter` replaces the `asyncfloat64.UpDownCounter` + - `Float64ObservableGauge` replaces the `asyncfloat64.Gauge` + - `Int64ObservableCounter` replaces the `asyncint64.Counter` + - `Int64ObservableUpDownCounter` replaces the `asyncint64.UpDownCounter` + - `Int64ObservableGauge` replaces the `asyncint64.Gauge` + - `Float64Counter` replaces the `syncfloat64.Counter` + - `Float64UpDownCounter` replaces the `syncfloat64.UpDownCounter` + - `Float64Histogram` replaces the `syncfloat64.Histogram` + - `Int64Counter` replaces the `syncint64.Counter` + - `Int64UpDownCounter` replaces the `syncint64.UpDownCounter` + - `Int64Histogram` replaces the `syncint64.Histogram` +- `NewTracerProvider` to `go.opentelemetry.io/otel/bridge/opentracing`. + This is used to create `WrapperTracer` instances from a `TracerProvider`. (#3116) +- The `Extrema` type to `go.opentelemetry.io/otel/sdk/metric/metricdata`. + This type is used to represent min/max values and still be able to distinguish unset and zero values. (#3487) +- The `go.opentelemetry.io/otel/semconv/v1.17.0` package. + The package contains semantic conventions from the `v1.17.0` version of the OpenTelemetry specification. (#3599) + +### Changed + +- Jaeger and Zipkin exporter use `github.com/go-logr/logr` as the logging interface, and add the `WithLogr` option. (#3497, #3500) +- Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and configuration based on the instrument type. (#3507) + - Use the added `Int64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncint64`. + - Use the added `Float64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncfloat64`. + - Use the added `Int64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncint64`. + - Use the added `Float64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncfloat64`. +- Return a `Registration` from the `RegisterCallback` method of a `Meter` in the `go.opentelemetry.io/otel/metric` package. + This `Registration` can be used to unregister callbacks. (#3522) +- Global error handler uses an atomic value instead of a mutex. (#3543) +- Add `NewMetricProducer` to `go.opentelemetry.io/otel/bridge/opencensus`, which can be used to pass OpenCensus metrics to an OpenTelemetry Reader. (#3541) +- Global logger uses an atomic value instead of a mutex. (#3545) +- The `Shutdown` method of the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` releases all computational resources when called the first time. (#3551) +- The `Sampler` returned from `TraceIDRatioBased` `go.opentelemetry.io/otel/sdk/trace` now uses the rightmost bits for sampling decisions. + This fixes random sampling when using ID generators like `xray.IDGenerator` and increasing parity with other language implementations. (#3557) +- Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in errors identifying their signal name. + Existing users of the exporters attempting to identify specific errors will need to use `errors.Unwrap()` to get the underlying error. (#3516) +- Exporters from `go.opentelemetry.io/otel/exporters/otlp` will print the final retryable error message when attempts to retry time out. (#3514) +- The instrument kind names in `go.opentelemetry.io/otel/sdk/metric` are updated to match the API. (#3562) + - `InstrumentKindSyncCounter` is renamed to `InstrumentKindCounter` + - `InstrumentKindSyncUpDownCounter` is renamed to `InstrumentKindUpDownCounter` + - `InstrumentKindSyncHistogram` is renamed to `InstrumentKindHistogram` + - `InstrumentKindAsyncCounter` is renamed to `InstrumentKindObservableCounter` + - `InstrumentKindAsyncUpDownCounter` is renamed to `InstrumentKindObservableUpDownCounter` + - `InstrumentKindAsyncGauge` is renamed to `InstrumentKindObservableGauge` +- The `RegisterCallback` method of the `Meter` in `go.opentelemetry.io/otel/metric` changed. + - The named `Callback` replaces the inline function parameter. (#3564) + - `Callback` is required to return an error. (#3576) + - `Callback` accepts the added `Observer` parameter added. + This new parameter is used by `Callback` implementations to observe values for asynchronous instruments instead of calling the `Observe` method of the instrument directly. (#3584) + - The slice of `instrument.Asynchronous` is now passed as a variadic argument. (#3587) +- The exporter from `go.opentelemetry.io/otel/exporters/zipkin` is updated to use the `v1.16.0` version of semantic conventions. + This means it no longer uses the removed `net.peer.ip` or `http.host` attributes to determine the remote endpoint. + Instead it uses the `net.sock.peer` attributes. (#3581) +- The `Min` and `Max` fields of the `HistogramDataPoint` in `go.opentelemetry.io/otel/sdk/metric/metricdata` are now defined with the added `Extrema` type instead of a `*float64`. (#3487) + +### Fixed + +- Asynchronous instruments that use sum aggregators and attribute filters correctly add values from equivalent attribute sets that have been filtered. (#3439, #3549) +- The `RegisterCallback` method of the `Meter` from `go.opentelemetry.io/otel/sdk/metric` only registers a callback for instruments created by that meter. + Trying to register a callback with instruments from a different meter will result in an error being returned. (#3584) + +### Deprecated + +- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` is deprecated. + Use `NewMetricProducer` instead. (#3541) +- The `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is deprecated. + Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) +- The `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is deprecated. + Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) +- The `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is deprecated. + Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) +- The `go.opentelemetry.io/otel/metric/instrument/syncint64` package is deprecated. + Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) +- The `NewWrappedTracerProvider` in `go.opentelemetry.io/otel/bridge/opentracing` is now deprecated. + Use `NewTracerProvider` instead. (#3116) + +### Removed + +- The deprecated `go.opentelemetry.io/otel/sdk/metric/view` package is removed. (#3520) +- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncint64` is removed. + Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) + - The `Counter` method is replaced by `Meter.Int64ObservableCounter` + - The `UpDownCounter` method is replaced by `Meter.Int64ObservableUpDownCounter` + - The `Gauge` method is replaced by `Meter.Int64ObservableGauge` +- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncfloat64` is removed. + Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) + - The `Counter` method is replaced by `Meter.Float64ObservableCounter` + - The `UpDownCounter` method is replaced by `Meter.Float64ObservableUpDownCounter` + - The `Gauge` method is replaced by `Meter.Float64ObservableGauge` +- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncint64` is removed. + Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) + - The `Counter` method is replaced by `Meter.Int64Counter` + - The `UpDownCounter` method is replaced by `Meter.Int64UpDownCounter` + - The `Histogram` method is replaced by `Meter.Int64Histogram` +- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncfloat64` is removed. + Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) + - The `Counter` method is replaced by `Meter.Float64Counter` + - The `UpDownCounter` method is replaced by `Meter.Float64UpDownCounter` + - The `Histogram` method is replaced by `Meter.Float64Histogram` + +## [1.11.2/0.34.0] 2022-12-05 + +### Added + +- The `WithView` `Option` is added to the `go.opentelemetry.io/otel/sdk/metric` package. + This option is used to configure the view(s) a `MeterProvider` will use for all `Reader`s that are registered with it. (#3387) +- Add Instrumentation Scope and Version as info metric and label in Prometheus exporter. + This can be disabled using the `WithoutScopeInfo()` option added to that package.(#3273, #3357) +- OTLP exporters now recognize: (#3363) + - `OTEL_EXPORTER_OTLP_INSECURE` + - `OTEL_EXPORTER_OTLP_TRACES_INSECURE` + - `OTEL_EXPORTER_OTLP_METRICS_INSECURE` + - `OTEL_EXPORTER_OTLP_CLIENT_KEY` + - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY` + - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` + - `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` +- The `View` type and related `NewView` function to create a view according to the OpenTelemetry specification are added to `go.opentelemetry.io/otel/sdk/metric`. + These additions are replacements for the `View` type and `New` function from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) +- The `Instrument` and `InstrumentKind` type are added to `go.opentelemetry.io/otel/sdk/metric`. + These additions are replacements for the `Instrument` and `InstrumentKind` types from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) +- The `Stream` type is added to `go.opentelemetry.io/otel/sdk/metric` to define a metric data stream a view will produce. (#3459) +- The `AssertHasAttributes` allows instrument authors to test that datapoints returned have appropriate attributes. (#3487) + +### Changed + +- The `"go.opentelemetry.io/otel/sdk/metric".WithReader` option no longer accepts views to associate with the `Reader`. + Instead, views are now registered directly with the `MeterProvider` via the new `WithView` option. + The views registered with the `MeterProvider` apply to all `Reader`s. (#3387) +- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/sdk/metric".Exporter` interface. (#3260) +- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client` interface. (#3260) +- The `WithTemporalitySelector` and `WithAggregationSelector` `ReaderOption`s have been changed to `ManualReaderOption`s in the `go.opentelemetry.io/otel/sdk/metric` package. (#3260) +- The periodic reader in the `go.opentelemetry.io/otel/sdk/metric` package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260) + +### Fixed + +- The `go.opentelemetry.io/otel/exporters/prometheus` exporter fixes duplicated `_total` suffixes. (#3369) +- Remove comparable requirement for `Reader`s. (#3387) +- Cumulative metrics from the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) are defined as monotonic sums, instead of non-monotonic. (#3389) +- Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398) +- Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340) +- `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436) +- Re-enabled Attribute Filters in the Metric SDK. (#3396) +- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggregation. (#3408) +- Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) +- Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) +- Prevent duplicate Prometheus description, unit, and type. (#3469) +- Prevents panic when using incorrect `attribute.Value.As[Type]Slice()`. (#3489) + +### Removed + +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.Client` interface is removed. (#3486) +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.New` function is removed. Use the `otlpmetric[http|grpc].New` directly. (#3486) + +### Deprecated + +- The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated. + Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476) + +## [1.11.1/0.33.0] 2022-10-19 + +### Added + +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` registers with a Prometheus registerer on creation. + By default, it will register with the default Prometheus registerer. + A non-default registerer can be used by passing the `WithRegisterer` option. (#3239) +- Added the `WithAggregationSelector` option to the `go.opentelemetry.io/otel/exporters/prometheus` package to change the default `AggregationSelector` used. (#3341) +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` converts the `Resource` associated with metric exports into a `target_info` metric. (#3285) + +### Changed + +- The `"go.opentelemetry.io/otel/exporters/prometheus".New` function is updated to return an error. + It will return an error if the exporter fails to register with Prometheus. (#3239) + +### Fixed + +- The URL-encoded values from the `OTEL_RESOURCE_ATTRIBUTES` environment variable are decoded. (#2963) +- The `baggage.NewMember` function decodes the `value` parameter instead of directly using it. + This fixes the implementation to be compliant with the W3C specification. (#3226) +- Slice attributes of the `attribute` package are now comparable based on their value, not instance. (#3108 #3252) +- The `Shutdown` and `ForceFlush` methods of the `"go.opentelemetry.io/otel/sdk/trace".TraceProvider` no longer return an error when no processor is registered. (#3268) +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` cumulatively sums histogram buckets. (#3281) +- The sum of each histogram data point is now uniquely exported by the `go.opentelemetry.io/otel/exporters/otlpmetric` exporters. (#3284, #3293) +- Recorded values for asynchronous counters (`Counter` and `UpDownCounter`) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278) +- `UpDownCounters` are now correctly output as Prometheus gauges in the `go.opentelemetry.io/otel/exporters/prometheus` exporter. (#3358) +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` no longer describes the metrics it will send to Prometheus on startup. + Instead the exporter is defined as an "unchecked" collector for Prometheus. + This fixes the `reader is not registered` warning currently emitted on startup. (#3291 #3342) +- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now correctly adds `_total` suffixes to counter metrics. (#3360) +- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now adds a unit suffix to metric names. + This can be disabled using the `WithoutUnits()` option added to that package. (#3352) + +## [1.11.0/0.32.3] 2022-10-12 + +### Added + +- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp`). (#3261) + +### Changed + +- `span.SetStatus` has been updated such that calls that lower the status are now no-ops. (#3214) +- Upgrade `golang.org/x/sys/unix` from `v0.0.0-20210423185535-09eb48e85fd7` to `v0.0.0-20220919091848-fb04ddd9f9c8`. + This addresses [GO-2022-0493](https://pkg.go.dev/vuln/GO-2022-0493). (#3235) + +## [0.32.2] Metric SDK (Alpha) - 2022-10-11 + +### Added + +- Added an example of using metric views to customize instruments. (#3177) +- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetrichttp`). (#3261) + +### Changed + +- Flush pending measurements with the `PeriodicReader` in the `go.opentelemetry.io/otel/sdk/metric` when `ForceFlush` or `Shutdown` are called. (#3220) +- Update histogram default bounds to match the requirements of the latest specification. (#3222) +- Encode the HTTP status code in the OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`) as an integer. (#3265) + +### Fixed + +- Use default view if instrument does not match any registered view of a reader. (#3224, #3237) +- Return the same instrument every time a user makes the exact same instrument creation call. (#3229, #3251) +- Return the existing instrument when a view transforms a creation call to match an existing instrument. (#3240, #3251) +- Log a warning when a conflicting instrument (e.g. description, unit, data-type) is created instead of returning an error. (#3251) +- The OpenCensus bridge no longer sends empty batches of metrics. (#3263) + +## [0.32.1] Metric SDK (Alpha) - 2022-09-22 + +### Changed + +- The Prometheus exporter sanitizes OpenTelemetry instrument names when exporting. + Invalid characters are replaced with `_`. (#3212) + +### Added + +- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been reintroduced. (#3192) +- The OpenCensus bridge example (`go.opentelemetry.io/otel/example/opencensus`) has been reintroduced. (#3206) + +### Fixed + +- Updated go.mods to point to valid versions of the sdk. (#3216) +- Set the `MeterProvider` resource on all exported metric data. (#3218) + +## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18 + +### Changed + +- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification. + Please see the package documentation for how the new SDK is initialized and configured. (#3175) +- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179) + +### Removed + +- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed. + A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed. + A replacement package that supports the new metric SDK will be added back in a future release. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".ErrUninitializedInstrument` variable was removed. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".ErrBadInstrument` variable was removed. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175) +- The deprecated `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets` function was removed. (#3175) + +## [1.10.0] - 2022-09-09 + +### Added + +- Support Go 1.19. (#3077) + Include compatibility testing and document support. (#3077) +- Support the OTLP ExportTracePartialSuccess response; these are passed to the registered error handler. (#3106) +- Upgrade go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107) + +### Changed + +- Fix misidentification of OpenTelemetry `SpanKind` in OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`). (#3096) +- Attempting to start a span with a nil `context` will no longer cause a panic. (#3110) +- All exporters will be shutdown even if one reports an error (#3091) +- Ensure valid UTF-8 when truncating over-length attribute values. (#3156) + +## [1.9.0/0.0.3] - 2022-08-01 + +### Added + +- Add support for Schema Files format 1.1.x (metric "split" transform) with the new `go.opentelemetry.io/otel/schema/v1.1` package. (#2999) +- Add the `go.opentelemetry.io/otel/semconv/v1.11.0` package. + The package contains semantic conventions from the `v1.11.0` version of the OpenTelemetry specification. (#3009) +- Add the `go.opentelemetry.io/otel/semconv/v1.12.0` package. + The package contains semantic conventions from the `v1.12.0` version of the OpenTelemetry specification. (#3010) +- Add the `http.method` attribute to HTTP server metric from all `go.opentelemetry.io/otel/semconv/*` packages. (#3018) + +### Fixed + +- Invalid warning for context setup being deferred in `go.opentelemetry.io/otel/bridge/opentracing` package. (#3029) + +## [1.8.0/0.31.0] - 2022-07-08 + +### Added + +- Add support for `opentracing.TextMap` format in the `Inject` and `Extract` methods +of the `"go.opentelemetry.io/otel/bridge/opentracing".BridgeTracer` type. (#2911) + +### Changed + +- The `crosslink` make target has been updated to use the `go.opentelemetry.io/build-tools/crosslink` package. (#2886) +- In the `go.opentelemetry.io/otel/sdk/instrumentation` package rename `Library` to `Scope` and alias `Library` as `Scope` (#2976) +- Move metric no-op implementation form `nonrecording` to `metric` package. (#2866) + +### Removed + +- Support for go1.16. Support is now only for go1.17 and go1.18 (#2917) + +### Deprecated + +- The `Library` struct in the `go.opentelemetry.io/otel/sdk/instrumentation` package is deprecated. + Use the equivalent `Scope` struct instead. (#2977) +- The `ReadOnlySpan.InstrumentationLibrary` method from the `go.opentelemetry.io/otel/sdk/trace` package is deprecated. + Use the equivalent `ReadOnlySpan.InstrumentationScope` method instead. (#2977) + +## [1.7.0/0.30.0] - 2022-04-28 + +### Added + +- Add the `go.opentelemetry.io/otel/semconv/v1.8.0` package. + The package contains semantic conventions from the `v1.8.0` version of the OpenTelemetry specification. (#2763) +- Add the `go.opentelemetry.io/otel/semconv/v1.9.0` package. + The package contains semantic conventions from the `v1.9.0` version of the OpenTelemetry specification. (#2792) +- Add the `go.opentelemetry.io/otel/semconv/v1.10.0` package. + The package contains semantic conventions from the `v1.10.0` version of the OpenTelemetry specification. (#2842) +- Added an in-memory exporter to metrictest to aid testing with a full SDK. (#2776) + +### Fixed + +- Globally delegated instruments are unwrapped before delegating asynchronous callbacks. (#2784) +- Remove import of `testing` package in non-tests builds of the `go.opentelemetry.io/otel` package. (#2786) + +### Changed + +- The `WithLabelEncoder` option from the `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` package is renamed to `WithAttributeEncoder`. (#2790) +- The `LabelFilterSelector` interface from `go.opentelemetry.io/otel/sdk/metric/processor/reducer` is renamed to `AttributeFilterSelector`. + The method included in the renamed interface also changed from `LabelFilterFor` to `AttributeFilterFor`. (#2790) +- The `Metadata.Labels` method from the `go.opentelemetry.io/otel/sdk/metric/export` package is renamed to `Metadata.Attributes`. + Consequentially, the `Record` type from the same package also has had the embedded method renamed. (#2790) + +### Deprecated + +- The `Iterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. + Use the equivalent `Iterator.Attribute` method instead. (#2790) +- The `Iterator.IndexedLabel` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. + Use the equivalent `Iterator.IndexedAttribute` method instead. (#2790) +- The `MergeIterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. + Use the equivalent `MergeIterator.Attribute` method instead. (#2790) + +### Removed + +- Removed the `Batch` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) +- Removed the `Measurement` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) + +## [0.29.0] - 2022-04-11 + +### Added + +- The metrics global package was added back into several test files. (#2764) +- The `Meter` function is added back to the `go.opentelemetry.io/otel/metric/global` package. + This function is a convenience function equivalent to calling `global.MeterProvider().Meter(...)`. (#2750) + +### Removed + +- Removed module the `go.opentelemetry.io/otel/sdk/export/metric`. + Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720) + +### Changed + +- Don't panic anymore when setting a global MeterProvider to itself. (#2749) +- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` from `v0.12.1` to `v0.15.0`. + This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibraryMetrics` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeMetrics`. (#2748) + +## [1.6.3] - 2022-04-07 + +### Fixed + +- Allow non-comparable global `MeterProvider`, `TracerProvider`, and `TextMapPropagator` types to be set. (#2772, #2773) + +## [1.6.2] - 2022-04-06 + +### Changed + +- Don't panic anymore when setting a global TracerProvider or TextMapPropagator to itself. (#2749) +- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from `v0.12.1` to `v0.15.0`. + This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibrarySpans` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeSpans`. (#2748) + +## [1.6.1] - 2022-03-28 + +### Fixed + +- The `go.opentelemetry.io/otel/schema/*` packages now use the correct schema URL for their `SchemaURL` constant. + Instead of using `"https://opentelemetry.io/schemas/v"` they now use the correct URL without a `v` prefix, `"https://opentelemetry.io/schemas/"`. (#2743, #2744) + +### Security + +- Upgrade `go.opentelemetry.io/proto/otlp` from `v0.12.0` to `v0.12.1`. + This includes an indirect upgrade of `github.com/grpc-ecosystem/grpc-gateway` which resolves [a vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2019-11254) from `gopkg.in/yaml.v2` in version `v2.2.3`. (#2724, #2728) + +## [1.6.0/0.28.0] - 2022-03-23 + +### ⚠️ Notice ⚠️ + +This update is a breaking change of the unstable Metrics API. +Code instrumented with the `go.opentelemetry.io/otel/metric` will need to be modified. + +### Added + +- Add metrics exponential histogram support. + New mapping functions have been made available in `sdk/metric/aggregator/exponential/mapping` for other OpenTelemetry projects to take dependencies on. (#2502) +- Add Go 1.18 to our compatibility tests. (#2679) +- Allow configuring the Sampler with the `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG` environment variables. (#2305, #2517) +- Add the `metric/global` for obtaining and setting the global `MeterProvider`. (#2660) + +### Changed + +- The metrics API has been significantly changed to match the revised OpenTelemetry specification. + High-level changes include: + + - Synchronous and asynchronous instruments are now handled by independent `InstrumentProvider`s. + These `InstrumentProvider`s are managed with a `Meter`. + - Synchronous and asynchronous instruments are grouped into their own packages based on value types. + - Asynchronous callbacks can now be registered with a `Meter`. + + Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660) + +### Fixed + +- Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677) + +## [1.5.0] - 2022-03-16 + +### Added + +- Log the Exporters configuration in the TracerProviders message. (#2578) +- Added support to configure the span limits with environment variables. + The following environment variables are supported. (#2606, #2637) + - `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` + - `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` + - `OTEL_SPAN_EVENT_COUNT_LIMIT` + - `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT` + - `OTEL_SPAN_LINK_COUNT_LIMIT` + - `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT` + + If the provided environment variables are invalid (negative), the default values would be used. +- Rename the `gc` runtime name to `go` (#2560) +- Add resource container ID detection. (#2418) +- Add span attribute value length limit. + The new `AttributeValueLengthLimit` field is added to the `"go.opentelemetry.io/otel/sdk/trace".SpanLimits` type to configure this limit for a `TracerProvider`. + The default limit for this resource is "unlimited". (#2637) +- Add the `WithRawSpanLimits` option to `go.opentelemetry.io/otel/sdk/trace`. + This option replaces the `WithSpanLimits` option. + Zero or negative values will not be changed to the default value like `WithSpanLimits` does. + Setting a limit to zero will effectively disable the related resource it limits and setting to a negative value will mean that resource is unlimited. + Consequentially, limits should be constructed using `NewSpanLimits` and updated accordingly. (#2637) + +### Changed + +- Drop oldest tracestate `Member` when capacity is reached. (#2592) +- Add event and link drop counts to the exported data from the `oltptrace` exporter. (#2601) +- Unify path cleaning functionally in the `otlpmetric` and `otlptrace` configuration. (#2639) +- Change the debug message from the `sdk/trace.BatchSpanProcessor` to reflect the count is cumulative. (#2640) +- Introduce new internal `envconfig` package for OTLP exporters. (#2608) +- If `http.Request.Host` is empty, fall back to use `URL.Host` when populating `http.host` in the `semconv` packages. (#2661) + +### Fixed + +- Remove the OTLP trace exporter limit of SpanEvents when exporting. (#2616) +- Default to port `4318` instead of `4317` for the `otlpmetrichttp` and `otlptracehttp` client. (#2614, #2625) +- Unlimited span limits are now supported (negative values). (#2636, #2637) + +### Deprecated + +- Deprecated `"go.opentelemetry.io/otel/sdk/trace".WithSpanLimits`. + Use `WithRawSpanLimits` instead. + That option allows setting unlimited and zero limits, this option does not. + This option will be kept until the next major version incremented release. (#2637) + +## [1.4.1] - 2022-02-16 + +### Fixed + +- Fix race condition in reading the dropped spans number for the `BatchSpanProcessor`. (#2615) + +## [1.4.0] - 2022-02-11 + +### Added + +- Use `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable to specify zipkin collector endpoint. (#2490) +- Log the configuration of `TracerProvider`s, and `Tracer`s for debugging. + To enable use a logger with Verbosity (V level) `>=1`. (#2500) +- Added support to configure the batch span-processor with environment variables. + The following environment variables are used. (#2515) + - `OTEL_BSP_SCHEDULE_DELAY` + - `OTEL_BSP_EXPORT_TIMEOUT` + - `OTEL_BSP_MAX_QUEUE_SIZE`. + - `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` + +### Changed + +- Zipkin exporter exports `Resource` attributes in the `Tags` field. (#2589) + +### Deprecated + +- Deprecate module the `go.opentelemetry.io/otel/sdk/export/metric`. + Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2382) +- Deprecate `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets`. (#2445) + +### Fixed + +- Fixed the instrument kind for noop async instruments to correctly report an implementation. (#2461) +- Fix UDP packets overflowing with Jaeger payloads. (#2489, #2512) +- Change the `otlpmetric.Client` interface's `UploadMetrics` method to accept a single `ResourceMetrics` instead of a slice of them. (#2491) +- Specify explicit buckets in Prometheus example, fixing issue where example only has `+inf` bucket. (#2419, #2493) +- W3C baggage will now decode urlescaped values. (#2529) +- Baggage members are now only validated once, when calling `NewMember` and not also when adding it to the baggage itself. (#2522) +- The order attributes are dropped from spans in the `go.opentelemetry.io/otel/sdk/trace` package when capacity is reached is fixed to be in compliance with the OpenTelemetry specification. + Instead of dropping the least-recently-used attribute, the last added attribute is dropped. + This drop order still only applies to attributes with unique keys not already contained in the span. + If an attribute is added with a key already contained in the span, that attribute is updated to the new value being added. (#2576) + +### Removed + +- Updated `go.opentelemetry.io/proto/otlp` from `v0.11.0` to `v0.12.0`. This version removes a number of deprecated methods. (#2546) + - [`Metric.GetIntGauge()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntGauge) + - [`Metric.GetIntHistogram()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntHistogram) + - [`Metric.GetIntSum()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntSum) + +## [1.3.0] - 2021-12-10 + +### ⚠️ Notice ⚠️ + +We have updated the project minimum supported Go version to 1.16 + +### Added + +- Added an internal Logger. + This can be used by the SDK and API to provide users with feedback of the internal state. + To enable verbose logs configure the logger which will print V(1) logs. For debugging information configure to print V(5) logs. (#2343) +- Add the `WithRetry` `Option` and the `RetryConfig` type to the `go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp` package to specify retry behavior consistently. (#2425) +- Add `SpanStatusFromHTTPStatusCodeAndSpanKind` to all `semconv` packages to return a span status code similar to `SpanStatusFromHTTPStatusCode`, but exclude `4XX` HTTP errors as span errors if the span is of server kind. (#2296) + +### Changed + +- The `"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329) +- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2425) +- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".RetrySettings` type is renamed to `RetryConfig`. (#2425) +- The `go.opentelemetry.io/otel/exporter/otel/*` gRPC exporters now default to using the host's root CA set if none are provided by the user and `WithInsecure` is not specified. (#2432) +- Change `resource.Default` to be evaluated the first time it is called, rather than on import. This allows the caller the option to update `OTEL_RESOURCE_ATTRIBUTES` first, such as with `os.Setenv`. (#2371) + +### Fixed + +- The `go.opentelemetry.io/otel/exporter/otel/*` exporters are updated to handle per-signal and universal endpoints according to the OpenTelemetry specification. + Any per-signal endpoint set via an `OTEL_EXPORTER_OTLP__ENDPOINT` environment variable is now used without modification of the path. + When `OTEL_EXPORTER_OTLP_ENDPOINT` is set, if it contains a path, that path is used as a base path which per-signal paths are appended to. (#2433) +- Basic metric controller updated to use sync.Map to avoid blocking calls (#2381) +- The `go.opentelemetry.io/otel/exporter/jaeger` correctly sets the `otel.status_code` value to be a string of `ERROR` or `OK` instead of an integer code. (#2439, #2440) + +### Deprecated + +- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithMaxAttempts` `Option`, use the new `WithRetry` `Option` instead. (#2425) +- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithBackoff` `Option`, use the new `WithRetry` `Option` instead. (#2425) + +### Removed + +- Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350) +- Remove the metric Bound Instruments interface and implementations. (#2399) +- Remove the metric MinMaxSumCount kind aggregation and the corresponding OTLP export path. (#2423) +- Metric SDK removes the "exact" aggregator for histogram instruments, as it performed a non-standard aggregation for OTLP export (creating repeated Gauge points) and worked its way into a number of confusing examples. (#2348) + +## [1.2.0] - 2021-11-12 + +### Changed + +- Metric SDK `export.ExportKind`, `export.ExportKindSelector` types have been renamed to `aggregation.Temporality` and `aggregation.TemporalitySelector` respectively to keep in line with current specification and protocol along with built-in selectors (e.g., `aggregation.CumulativeTemporalitySelector`, ...). (#2274) +- The Metric `Exporter` interface now requires a `TemporalitySelector` method instead of an `ExportKindSelector`. (#2274) +- Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface: + - The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner` + - The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`. + - The No-op implementations of sync and async instruments are no longer exported, new functions `sdkapi.NewNoopAsyncInstrument()` and `sdkapi.NewNoopSyncInstrument()` are provided instead. (#2271) +- Update the SDK `BatchSpanProcessor` to export all queued spans when `ForceFlush` is called. (#2080, #2335) + +### Added + +- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) +- Added a new `schema` module to help parse Schema Files in OTEP 0152 format. (#2267) +- Added a new `MapCarrier` to the `go.opentelemetry.io/otel/propagation` package to hold propagated cross-cutting concerns as a `map[string]string` held in memory. (#2334) + +## [1.1.0] - 2021-10-27 + +### Added + +- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) +- Add the `go.opentelemetry.io/otel/semconv/v1.7.0` package. + The package contains semantic conventions from the `v1.7.0` version of the OpenTelemetry specification. (#2320) +- Add the `go.opentelemetry.io/otel/semconv/v1.6.1` package. + The package contains semantic conventions from the `v1.6.1` version of the OpenTelemetry specification. (#2321) +- Add the `go.opentelemetry.io/otel/semconv/v1.5.0` package. + The package contains semantic conventions from the `v1.5.0` version of the OpenTelemetry specification. (#2322) + - When upgrading from the `semconv/v1.4.0` package note the following name changes: + - `K8SReplicasetUIDKey` -> `K8SReplicaSetUIDKey` + - `K8SReplicasetNameKey` -> `K8SReplicaSetNameKey` + - `K8SStatefulsetUIDKey` -> `K8SStatefulSetUIDKey` + - `k8SStatefulsetNameKey` -> `K8SStatefulSetNameKey` + - `K8SDaemonsetUIDKey` -> `K8SDaemonSetUIDKey` + - `K8SDaemonsetNameKey` -> `K8SDaemonSetNameKey` + +### Changed + +- Links added to a span will be dropped by the SDK if they contain an invalid span context (#2275). + +### Fixed + +- The `"go.opentelemetry.io/otel/semconv/v1.4.0".HTTPServerAttributesFromHTTPRequest` now correctly only sets the HTTP client IP attribute even if the connection was routed with proxies and there are multiple addresses in the `X-Forwarded-For` header. (#2282, #2284) +- The `"go.opentelemetry.io/otel/semconv/v1.4.0".NetAttributesFromHTTPRequest` function correctly handles IPv6 addresses as IP addresses and sets the correct net peer IP instead of the net peer hostname attribute. (#2283, #2285) +- The simple span processor shutdown method deterministically returns the exporter error status if it simultaneously finishes when the deadline is reached. (#2290, #2289) + +## [1.0.1] - 2021-10-01 + +### Fixed + +- json stdout exporter no longer crashes due to concurrency bug. (#2265) + +## [Metrics 0.24.0] - 2021-10-01 + +### Changed + +- NoopMeterProvider is now private and NewNoopMeterProvider must be used to obtain a noopMeterProvider. (#2237) +- The Metric SDK `Export()` function takes a new two-level reader interface for iterating over results one instrumentation library at a time. (#2197) + - The former `"go.opentelemetry.io/otel/sdk/export/metric".CheckpointSet` is renamed `Reader`. + - The new interface is named `"go.opentelemetry.io/otel/sdk/export/metric".InstrumentationLibraryReader`. + +## [1.0.0] - 2021-09-20 + +This is the first stable release for the project. +This release includes an API and SDK for the tracing signal that will comply with the stability guarantees defined by the projects [versioning policy](./VERSIONING.md). + +### Added + +- OTLP trace exporter now sets the `SchemaURL` field in the exported telemetry if the Tracer has `WithSchemaURL` option. (#2242) + +### Fixed + +- Slice-valued attributes can correctly be used as map keys. (#2223) + +### Removed + +- Removed the `"go.opentelemetry.io/otel/exporters/zipkin".WithSDKOptions` function. (#2248) +- Removed the deprecated package `go.opentelemetry.io/otel/oteltest`. (#2234) +- Removed the deprecated package `go.opentelemetry.io/otel/bridge/opencensus/utils`. (#2233) +- Removed deprecated functions, types, and methods from `go.opentelemetry.io/otel/attribute` package. + Use the typed functions and methods added to the package instead. (#2235) + - The `Key.Array` method is removed. + - The `Array` function is removed. + - The `Any` function is removed. + - The `ArrayValue` function is removed. + - The `AsArray` function is removed. + +## [1.0.0-RC3] - 2021-09-02 + +### Added + +- Added `ErrorHandlerFunc` to use a function as an `"go.opentelemetry.io/otel".ErrorHandler`. (#2149) +- Added `"go.opentelemetry.io/otel/trace".WithStackTrace` option to add a stack trace when using `span.RecordError` or when panic is handled in `span.End`. (#2163) +- Added typed slice attribute types and functionality to the `go.opentelemetry.io/otel/attribute` package to replace the existing array type and functions. (#2162) + - `BoolSlice`, `IntSlice`, `Int64Slice`, `Float64Slice`, and `StringSlice` replace the use of the `Array` function in the package. +- Added the `go.opentelemetry.io/otel/example/fib` example package. + Included is an example application that computes Fibonacci numbers. (#2203) + +### Changed + +- Metric instruments have been renamed to match the (feature-frozen) metric API specification: + - ValueRecorder becomes Histogram + - ValueObserver becomes Gauge + - SumObserver becomes CounterObserver + - UpDownSumObserver becomes UpDownCounterObserver + The API exported from this project is still considered experimental. (#2202) +- Metric SDK/API implementation type `InstrumentKind` moves into `sdkapi` sub-package. (#2091) +- The Metrics SDK export record no longer contains a Resource pointer, the SDK `"go.opentelemetry.io/otel/sdk/trace/export/metric".Exporter.Export()` function for push-based exporters now takes a single Resource argument, pull-based exporters use `"go.opentelemetry.io/otel/sdk/metric/controller/basic".Controller.Resource()`. (#2120) +- The JSON output of the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` is harmonized now such that the output is "plain" JSON objects after each other of the form `{ ... } { ... } { ... }`. Earlier the JSON objects describing a span were wrapped in a slice for each `Exporter.ExportSpans` call, like `[ { ... } ][ { ... } { ... } ]`. Outputting JSON object directly after each other is consistent with JSON loggers, and a bit easier to parse and read. (#2196) +- Update the `NewTracerConfig`, `NewSpanStartConfig`, `NewSpanEndConfig`, and `NewEventConfig` function in the `go.opentelemetry.io/otel/trace` package to return their respective configurations as structs instead of pointers to the struct. (#2212) + +### Deprecated + +- The `go.opentelemetry.io/otel/bridge/opencensus/utils` package is deprecated. + All functionality from this package now exists in the `go.opentelemetry.io/otel/bridge/opencensus` package. + The functions from that package should be used instead. (#2166) +- The `"go.opentelemetry.io/otel/attribute".Array` function and the related `ARRAY` value type is deprecated. + Use the typed `*Slice` functions and types added to the package instead. (#2162) +- The `"go.opentelemetry.io/otel/attribute".Any` function is deprecated. + Use the typed functions instead. (#2181) +- The `go.opentelemetry.io/otel/oteltest` package is deprecated. + The `"go.opentelemetry.io/otel/sdk/trace/tracetest".SpanRecorder` can be registered with the default SDK (`go.opentelemetry.io/otel/sdk/trace`) as a `SpanProcessor` and used as a replacement for this deprecated package. (#2188) + +### Removed + +- Removed metrics test package `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#2105) + +### Fixed + +- The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES` environment variable is not set or empty. (#2138) +- Setting the global `ErrorHandler` with `"go.opentelemetry.io/otel".SetErrorHandler` multiple times is now supported. (#2160, #2140) +- The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169) +- Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120) +- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly omit timestamps. (#2195) +- Fixed typos in resources.go. (#2201) + +## [1.0.0-RC2] - 2021-07-26 + +### Added + +- Added `WithOSDescription` resource configuration option to set OS (Operating System) description resource attribute (`os.description`). (#1840) +- Added `WithOS` resource configuration option to set all OS (Operating System) resource attributes at once. (#1840) +- Added the `WithRetry` option to the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. + This option is a replacement for the removed `WithMaxAttempts` and `WithBackoff` options. (#2095) +- Added API `LinkFromContext` to return Link which encapsulates SpanContext from provided context and also encapsulates attributes. (#2115) +- Added a new `Link` type under the SDK `otel/sdk/trace` package that counts the number of attributes that were dropped for surpassing the `AttributePerLinkCountLimit` configured in the Span's `SpanLimits`. + This new type replaces the equal-named API `Link` type found in the `otel/trace` package for most usages within the SDK. + For example, instances of this type are now returned by the `Links()` function of `ReadOnlySpan`s provided in places like the `OnEnd` function of `SpanProcessor` implementations. (#2118) +- Added the `SpanRecorder` type to the `go.opentelemetry.io/otel/skd/trace/tracetest` package. + This type can be used with the default SDK as a `SpanProcessor` during testing. (#2132) + +### Changed + +- The `SpanModels` function is now exported from the `go.opentelemetry.io/otel/exporters/zipkin` package to convert OpenTelemetry spans into Zipkin model spans. (#2027) +- Rename the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".RetrySettings` to `RetryConfig`. (#2095) + +### Deprecated + +- The `TextMapCarrier` and `TextMapPropagator` from the `go.opentelemetry.io/otel/oteltest` package and their associated creation functions (`TextMapCarrier`, `NewTextMapPropagator`) are deprecated. (#2114) +- The `Harness` type from the `go.opentelemetry.io/otel/oteltest` package and its associated creation function, `NewHarness` are deprecated and will be removed in the next release. (#2123) +- The `TraceStateFromKeyValues` function from the `go.opentelemetry.io/otel/oteltest` package is deprecated. + Use the `trace.ParseTraceState` function instead. (#2122) + +### Removed + +- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/jaeger`. (#2020) +- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/zipkin`. (#2020) +- Removed the `"go.opentelemetry.io/otel/sdk/resource".WithBuiltinDetectors` function. + The explicit `With*` options for every built-in detector should be used instead. (#2026 #2097) +- Removed the `WithMaxAttempts` and `WithBackoff` options from the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. + The retry logic of the package has been updated to match the `otlptracegrpc` package and accordingly a `WithRetry` option is added that should be used instead. (#2095) +- Removed `DroppedAttributeCount` field from `otel/trace.Link` struct. (#2118) + +### Fixed + +- When using WithNewRoot, don't use the parent context for making sampling decisions. (#2032) +- `oteltest.Tracer` now creates a valid `SpanContext` when using `WithNewRoot`. (#2073) +- OS type detector now sets the correct `dragonflybsd` value for DragonFly BSD. (#2092) +- The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package. + This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102) +- The `Inject` method for the `"go.opentelemetry.io/otel/propagation".TraceContext` type no longer injects empty `tracestate` values. (#2108) +- Use `6831` as default Jaeger agent port instead of `6832`. (#2131) + +## [Experimental Metrics v0.22.0] - 2021-07-19 + +### Added + +- Adds HTTP support for OTLP metrics exporter. (#2022) + +### Removed + +- Removed the deprecated package `go.opentelemetry.io/otel/exporters/metric/prometheus`. (#2020) + +## [1.0.0-RC1] / 0.21.0 - 2021-06-18 + +With this release we are introducing a split in module versions. The tracing API and SDK are entering the `v1.0.0` Release Candidate phase with `v1.0.0-RC1` +while the experimental metrics API and SDK continue with `v0.x` releases at `v0.21.0`. Modules at major version 1 or greater will not depend on modules +with major version 0. + +### Added + +- Adds `otlpgrpc.WithRetry`option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832) + - The following status codes are defined as transient errors: + | gRPC Status Code | Description | + | ---------------- | ----------- | + | 1 | Cancelled | + | 4 | Deadline Exceeded | + | 8 | Resource Exhausted | + | 10 | Aborted | + | 10 | Out of Range | + | 14 | Unavailable | + | 15 | Data Loss | +- Added `Status` type to the `go.opentelemetry.io/otel/sdk/trace` package to represent the status of a span. (#1874) +- Added `SpanStub` type and its associated functions to the `go.opentelemetry.io/otel/sdk/trace/tracetest` package. + This type can be used as a testing replacement for the `SpanSnapshot` that was removed from the `go.opentelemetry.io/otel/sdk/trace` package. (#1873) +- Adds support for scheme in `OTEL_EXPORTER_OTLP_ENDPOINT` according to the spec. (#1886) +- Adds `trace.WithSchemaURL` option for configuring the tracer with a Schema URL. (#1889) +- Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912) +- `ParseTraceState` is added to the `go.opentelemetry.io/otel/trace` package. + It can be used to decode a `TraceState` from a `tracestate` header string value. (#1937) +- Added `Len` method to the `TraceState` type in the `go.opentelemetry.io/otel/trace` package. + This method returns the number of list-members the `TraceState` holds. (#1937) +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace` that defines a trace exporter that uses a `otlptrace.Client` to send data. + Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` implementing a gRPC `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing .(#1922) +- Added `Baggage`, `Member`, and `Property` types to the `go.opentelemetry.io/otel/baggage` package along with their related functions. (#1967) +- Added `ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext` functions to the `go.opentelemetry.io/otel/baggage` package. + These functions replace the `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions from that package and directly work with the new `Baggage` type. (#1967) +- The `OTEL_SERVICE_NAME` environment variable is the preferred source for `service.name`, used by the environment resource detector if a service name is present both there and in `OTEL_RESOURCE_ATTRIBUTES`. (#1969) +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` implementing an HTTP `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing. (#1963) +- Changes `go.opentelemetry.io/otel/sdk/resource.NewWithAttributes` to require a schema URL. The old function is still available as `resource.NewSchemaless`. This is a breaking change. (#1938) +- Several builtin resource detectors now correctly populate the schema URL. (#1938) +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` that defines a metrics exporter that uses a `otlpmetric.Client` to send data. +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` implementing a gRPC `otlpmetric.Client` and offers convenience functions, `New` and `NewUnstarted`, to create an `otlpmetric.Exporter`.(#1991) +- Added `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter. (#2005) +- Added `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` exporter. (#2005) +- Added a `TracerProvider()` method to the `"go.opentelemetry.io/otel/trace".Span` interface. This can be used to obtain a `TracerProvider` from a given span that utilizes the same trace processing pipeline. (#2009) + +### Changed + +- Make `NewSplitDriver` from `go.opentelemetry.io/otel/exporters/otlp` take variadic arguments instead of a `SplitConfig` item. + `NewSplitDriver` now automatically implements an internal `noopDriver` for `SplitConfig` fields that are not initialized. (#1798) +- `resource.New()` now creates a Resource without builtin detectors. Previous behavior is now achieved by using `WithBuiltinDetectors` Option. (#1810) +- Move the `Event` type from the `go.opentelemetry.io/otel` package to the `go.opentelemetry.io/otel/sdk/trace` package. (#1846) +- CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865) +- BatchSpanProcessor now report export failures when calling `ForceFlush()` method. (#1860) +- `Set.Encoded(Encoder)` no longer caches the result of an encoding. (#1855) +- Renamed `CloudZoneKey` to `CloudAvailabilityZoneKey` in Resource semantic conventions according to spec. (#1871) +- The `StatusCode` and `StatusMessage` methods of the `ReadOnlySpan` interface and the `Span` produced by the `go.opentelemetry.io/otel/sdk/trace` package have been replaced with a single `Status` method. + This method returns the status of a span using the new `Status` type. (#1874) +- Updated `ExportSpans` method of the`SpanExporter` interface type to accept `ReadOnlySpan`s instead of the removed `SpanSnapshot`. + This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873) +- Unembed `SpanContext` in `Link`. (#1877) +- Generate Semantic conventions from the specification YAML. (#1891) +- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901) +- The `"go.opentelemetry.io/otel".Tracer` function now accepts tracer options. (#1902) +- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903) +- Changed `go.opentelemetry.io/otel/trace.TracerConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config.) (#1921) +- Changed `go.opentelemetry.io/otel/trace.SpanConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) +- Changed `span.End()` now only accepts Options that are allowed at `End()`. (#1921) +- Changed `go.opentelemetry.io/otel/metric.InstrumentConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) +- Changed `go.opentelemetry.io/otel/metric.MeterConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) +- Refactored option types according to the contribution style guide. (#1882) +- Move the `go.opentelemetry.io/otel/trace.TraceStateFromKeyValues` function to the `go.opentelemetry.io/otel/oteltest` package. + This function is preserved for testing purposes where it may be useful to create a `TraceState` from `attribute.KeyValue`s, but it is not intended for production use. + The new `ParseTraceState` function should be used to create a `TraceState`. (#1931) +- Updated `MarshalJSON` method of the `go.opentelemetry.io/otel/trace.TraceState` type to marshal the type into the string representation of the `TraceState`. (#1931) +- The `TraceState.Delete` method from the `go.opentelemetry.io/otel/trace` package no longer returns an error in addition to a `TraceState`. (#1931) +- Updated `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) +- Updated `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931) +- Updated `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/stdout` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/metric/prometheus` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) +- Renamed `NewUnstartedExporter` to `NewUnstarted` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) +- The `go.opentelemetry.io/otel/semconv` package has been moved to `go.opentelemetry.io/otel/semconv/v1.4.0` to allow for multiple [telemetry schema](https://github.com/open-telemetry/oteps/blob/main/text/0152-telemetry-schemas.md) versions to be used concurrently. (#1987) +- Metrics test helpers in `go.opentelemetry.io/otel/oteltest` have been moved to `go.opentelemetry.io/otel/metric/metrictest`. (#1988) + +### Deprecated + +- The `go.opentelemetry.io/otel/exporters/metric/prometheus` is deprecated, use `go.opentelemetry.io/otel/exporters/prometheus` instead. (#1993) +- The `go.opentelemetry.io/otel/exporters/trace/jaeger` is deprecated, use `go.opentelemetry.io/otel/exporters/jaeger` instead. (#1993) +- The `go.opentelemetry.io/otel/exporters/trace/zipkin` is deprecated, use `go.opentelemetry.io/otel/exporters/zipkin` instead. (#1993) + +### Removed + +- Removed `resource.WithoutBuiltin()`. Use `resource.New()`. (#1810) +- Unexported types `resource.FromEnv`, `resource.Host`, and `resource.TelemetrySDK`, Use the corresponding `With*()` to use individually. (#1810) +- Removed the `Tracer` and `IsRecording` method from the `ReadOnlySpan` in the `go.opentelemetry.io/otel/sdk/trace`. + The `Tracer` method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate. + The `IsRecording` method returns if the span is recording or not. + A read-only span value does not need to know if updates to it will be recorded or not. + By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873) +- Removed the `SpanSnapshot` type from the `go.opentelemetry.io/otel/sdk/trace` package. + The use of this type has been replaced with the use of the explicitly immutable `ReadOnlySpan` type. + When a concrete representation of a read-only span is needed for testing, the newly added `SpanStub` in the `go.opentelemetry.io/otel/sdk/trace/tracetest` package should be used. (#1873) +- Removed the `Tracer` method from the `Span` interface in the `go.opentelemetry.io/otel/trace` package. + Using the same tracer that created a span introduces the error where an instrumentation library's `Tracer` is used by other code instead of their own. + The `"go.opentelemetry.io/otel".Tracer` function or a `TracerProvider` should be used to acquire a library specific `Tracer` instead. (#1900) + - The `TracerProvider()` method on the `Span` interface may also be used to obtain a `TracerProvider` using the same trace processing pipeline. (#2009) +- The `http.url` attribute generated by `HTTPClientAttributesFromHTTPRequest` will no longer include username or password information. (#1919) +- Removed `IsEmpty` method of the `TraceState` type in the `go.opentelemetry.io/otel/trace` package in favor of using the added `TraceState.Len` method. (#1931) +- Removed `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions in the `go.opentelemetry.io/otel/baggage` package. + Handling of baggage is now done using the added `Baggage` type and related context functions (`ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext`) in that package. (#1967) +- The `InstallNewPipeline` and `NewExportPipeline` creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed. + These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985) +- The `go.opentelemetry.io/otel/exporters/otlp` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace` instead. (#1990) +- The `go.opentelemetry.io/otel/exporters/stdout` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` or `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` instead. (#2005) + +### Fixed + +- Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851) +- The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856) +- BatchSpanProcessor now drops span batches that failed to be exported. (#1860) +- Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898) +- Allow trailing and leading whitespace in the parsing of a `tracestate` header. (#1931) +- Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973) +- Avoid transport security when OTLP endpoint is a Unix socket. (#2001) + +### Security + +## [0.20.0] - 2021-04-23 + +### Added + +- The OTLP exporter now has two new convenience functions, `NewExportPipeline` and `InstallNewPipeline`, setup and install the exporter in tracing and metrics pipelines. (#1373) +- Adds semantic conventions for exceptions. (#1492) +- Added Jaeger Environment variables: `OTEL_EXPORTER_JAEGER_AGENT_HOST`, `OTEL_EXPORTER_JAEGER_AGENT_PORT` + These environment variables can be used to override Jaeger agent hostname and port (#1752) +- Option `ExportTimeout` was added to batch span processor. (#1755) +- `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770) +- The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771) +- The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771) +- Adds test to check BatchSpanProcessor ignores `OnEnd` and `ForceFlush` post `Shutdown`. (#1772) +- Extract resource attributes from the `OTEL_RESOURCE_ATTRIBUTES` environment variable and merge them with the `resource.Default` resource as well as resources provided to the `TracerProvider` and metric `Controller`. (#1785) +- Added `WithOSType` resource configuration option to set OS (Operating System) type resource attribute (`os.type`). (#1788) +- Added `WithProcess*` resource configuration options to set Process resource attributes. (#1788) + - `process.pid` + - `process.executable.name` + - `process.executable.path` + - `process.command_args` + - `process.owner` + - `process.runtime.name` + - `process.runtime.version` + - `process.runtime.description` +- Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789) +- Added support for configuring OTLP/HTTP and OTLP/gRPC Endpoints, TLS Certificates, Headers, Compression and Timeout via Environment Variables. (#1758, #1769 and #1811) + - `OTEL_EXPORTER_OTLP_ENDPOINT` + - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` + - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` + - `OTEL_EXPORTER_OTLP_HEADERS` + - `OTEL_EXPORTER_OTLP_TRACES_HEADERS` + - `OTEL_EXPORTER_OTLP_METRICS_HEADERS` + - `OTEL_EXPORTER_OTLP_COMPRESSION` + - `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` + - `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION` + - `OTEL_EXPORTER_OTLP_TIMEOUT` + - `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` + - `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` + - `OTEL_EXPORTER_OTLP_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE` +- Adds `otlpgrpc.WithTimeout` option for configuring timeout to the otlp/gRPC exporter. (#1821) +- Adds `jaeger.WithMaxPacketSize` option for configuring maximum UDP packet size used when connecting to the Jaeger agent. (#1853) + +### Fixed + +- The `Span.IsRecording` implementation from `go.opentelemetry.io/otel/sdk/trace` always returns false when not being sampled. (#1750) +- The Jaeger exporter now correctly sets tags for the Span status code and message. + This means it uses the correct tag keys (`"otel.status_code"`, `"otel.status_description"`) and does not set the status message as a tag unless it is set on the span. (#1761) +- The Jaeger exporter now correctly records Span event's names using the `"event"` key for a tag. + Additionally, this tag is overridden, as specified in the OTel specification, if the event contains an attribute with that key. (#1768) +- Zipkin Exporter: Ensure mapping between OTel and Zipkin span data complies with the specification. (#1688) +- Fixed typo for default service name in Jaeger Exporter. (#1797) +- Fix flaky OTLP for the reconnnection of the client connection. (#1527, #1814) +- Fix Jaeger exporter dropping of span batches that exceed the UDP packet size limit. + Instead, the exporter now splits the batch into smaller sendable batches. (#1828) + +### Changed + +- Span `RecordError` now records an `exception` event to comply with the semantic convention specification. (#1492) +- Jaeger exporter was updated to use thrift v0.14.1. (#1712) +- Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713) +- Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713) +- The storage of a local or remote Span in a `context.Context` using its SpanContext is unified to store just the current Span. + The Span's SpanContext can now self-identify as being remote or not. + This means that `"go.opentelemetry.io/otel/trace".ContextWithRemoteSpanContext` will now overwrite any existing current Span, not just existing remote Spans, and make it the current Span in a `context.Context`. (#1731) +- Improve OTLP/gRPC exporter connection errors. (#1737) +- Information about a parent span context in a `"go.opentelemetry.io/otel/export/trace".SpanSnapshot` is unified in a new `Parent` field. + The existing `ParentSpanID` and `HasRemoteParent` fields are removed in favor of this. (#1748) +- The `ParentContext` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is updated to hold a `context.Context` containing the parent span. + This changes it to make `SamplingParameters` conform with the OpenTelemetry specification. (#1749) +- Updated Jaeger Environment Variables: `JAEGER_ENDPOINT`, `JAEGER_USER`, `JAEGER_PASSWORD` + to `OTEL_EXPORTER_JAEGER_ENDPOINT`, `OTEL_EXPORTER_JAEGER_USER`, `OTEL_EXPORTER_JAEGER_PASSWORD` in compliance with OTel specification. (#1752) +- Modify `BatchSpanProcessor.ForceFlush` to abort after timeout/cancellation. (#1757) +- The `DroppedAttributeCount` field of the `Span` in the `go.opentelemetry.io/otel` package now only represents the number of attributes dropped for the span itself. + It no longer is a conglomerate of itself, events, and link attributes that have been dropped. (#1771) +- Make `ExportSpans` in Jaeger Exporter honor context deadline. (#1773) +- Modify Zipkin Exporter default service name, use default resource's serviceName instead of empty. (#1777) +- The `go.opentelemetry.io/otel/sdk/export/trace` package is merged into the `go.opentelemetry.io/otel/sdk/trace` package. (#1778) +- The prometheus.InstallNewPipeline example is moved from comment to example test (#1796) +- The convenience functions for the stdout exporter have been updated to return the `TracerProvider` implementation and enable the shutdown of the exporter. (#1800) +- Replace the flush function returned from the Jaeger exporter's convenience creation functions (`InstallNewPipeline` and `NewExportPipeline`) with the `TracerProvider` implementation they create. + This enables the caller to shutdown and flush using the related `TracerProvider` methods. (#1822) +- Updated the Jaeger exporter to have a default endpoint, `http://localhost:14250`, for the collector. (#1824) +- Changed the function `WithCollectorEndpoint` in the Jaeger exporter to no longer accept an endpoint as an argument. + The endpoint can be passed with the `CollectorEndpointOption` using the `WithEndpoint` function or by setting the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable value appropriately. (#1824) +- The Jaeger exporter no longer batches exported spans itself, instead it relies on the SDK's `BatchSpanProcessor` for this functionality. (#1830) +- The Jaeger exporter creation functions (`NewRawExporter`, `NewExportPipeline`, and `InstallNewPipeline`) no longer accept the removed `Option` type as a variadic argument. (#1830) + +### Removed + +- Removed Jaeger Environment variables: `JAEGER_SERVICE_NAME`, `JAEGER_DISABLED`, `JAEGER_TAGS` + These environment variables will no longer be used to override values of the Jaeger exporter (#1752) +- No longer set the links for a `Span` in `go.opentelemetry.io/otel/sdk/trace` that is configured to be a new root. + This is unspecified behavior that the OpenTelemetry community plans to standardize in the future. + To prevent backwards incompatible changes when it is specified, these links are removed. (#1726) +- Setting error status while recording error with Span from oteltest package. (#1729) +- The concept of a remote and local Span stored in a context is unified to just the current Span. + Because of this `"go.opentelemetry.io/otel/trace".RemoteSpanContextFromContext` is removed as it is no longer needed. + Instead, `"go.opentelemetry.io/otel/trace".SpanContextFromContex` can be used to return the current Span. + If needed, that Span's `SpanContext.IsRemote()` can then be used to determine if it is remote or not. (#1731) +- The `HasRemoteParent` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is removed. + This field is redundant to the information returned from the `Remote` method of the `SpanContext` held in the `ParentContext` field. (#1749) +- The `trace.FlagsDebug` and `trace.FlagsDeferred` constants have been removed and will be localized to the B3 propagator. (#1770) +- Remove `Process` configuration, `WithProcessFromEnv` and `ProcessFromEnv`, and type from the Jaeger exporter package. + The information that could be configured in the `Process` struct should be configured in a `Resource` instead. (#1776, #1804) +- Remove the `WithDisabled` option from the Jaeger exporter. + To disable the exporter unregister it from the `TracerProvider` or use a no-operation `TracerProvider`. (#1806) +- Removed the functions `CollectorEndpointFromEnv` and `WithCollectorEndpointOptionFromEnv` from the Jaeger exporter. + These functions for retrieving specific environment variable values are redundant of other internal functions and + are not intended for end user use. (#1824) +- Removed the Jaeger exporter `WithSDKOptions` `Option`. + This option was used to set SDK options for the exporter creation convenience functions. + These functions are provided as a way to easily setup or install the exporter with what are deemed reasonable SDK settings for common use cases. + If the SDK needs to be configured differently, the `NewRawExporter` function and direct setup of the SDK with the desired settings should be used. (#1825) +- The `WithBufferMaxCount` and `WithBatchMaxCount` `Option`s from the Jaeger exporter are removed. + The exporter no longer batches exports, instead relying on the SDK's `BatchSpanProcessor` for this functionality. (#1830) +- The Jaeger exporter `Option` type is removed. + The type is no longer used by the exporter to configure anything. + All the previous configurations these options provided were duplicates of SDK configuration. + They have been removed in favor of using the SDK configuration and focuses the exporter configuration to be only about the endpoints it will send telemetry to. (#1830) + +## [0.19.0] - 2021-03-18 + +### Added + +- Added `Marshaler` config option to `otlphttp` to enable otlp over json or protobufs. (#1586) +- A `ForceFlush` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` to flush all registered `SpanProcessor`s. (#1608) +- Added `WithSampler` and `WithSpanLimits` to tracer provider. (#1633, #1702) +- `"go.opentelemetry.io/otel/trace".SpanContext` now has a `remote` property, and `IsRemote()` predicate, that is true when the `SpanContext` has been extracted from remote context data. (#1701) +- A `Valid` method to the `"go.opentelemetry.io/otel/attribute".KeyValue` type. (#1703) + +### Changed + +- `trace.SpanContext` is now immutable and has no exported fields. (#1573) + - `trace.NewSpanContext()` can be used in conjunction with the `trace.SpanContextConfig` struct to initialize a new `SpanContext` where all values are known. +- Update the `ForceFlush` method signature to the `"go.opentelemetry.io/otel/sdk/trace".SpanProcessor` to accept a `context.Context` and return an error. (#1608) +- Update the `Shutdown` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` return an error on shutdown failure. (#1608) +- The SimpleSpanProcessor will now shut down the enclosed `SpanExporter` and gracefully ignore subsequent calls to `OnEnd` after `Shutdown` is called. (#1612) +- `"go.opentelemetry.io/sdk/metric/controller.basic".WithPusher` is replaced with `WithExporter` to provide consistent naming across project. (#1656) +- Added non-empty string check for trace `Attribute` keys. (#1659) +- Add `description` to SpanStatus only when `StatusCode` is set to error. (#1662) +- Jaeger exporter falls back to `resource.Default`'s `service.name` if the exported Span does not have one. (#1673) +- Jaeger exporter populates Jaeger's Span Process from Resource. (#1673) +- Renamed the `LabelSet` method of `"go.opentelemetry.io/otel/sdk/resource".Resource` to `Set`. (#1692) +- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1693) +- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1693) + +### Removed + +- Removed `serviceName` parameter from Zipkin exporter and uses resource instead. (#1549) +- Removed `WithConfig` from tracer provider to avoid overriding configuration. (#1633) +- Removed the exported `SimpleSpanProcessor` and `BatchSpanProcessor` structs. + These are now returned as a SpanProcessor interface from their respective constructors. (#1638) +- Removed `WithRecord()` from `trace.SpanOption` when creating a span. (#1660) +- Removed setting status to `Error` while recording an error as a span event in `RecordError`. (#1663) +- Removed `jaeger.WithProcess` configuration option. (#1673) +- Removed `ApplyConfig` method from `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` and the now unneeded `Config` struct. (#1693) + +### Fixed + +- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626) +- `SamplingResult.TraceState` is correctly propagated to a newly created span's `SpanContext`. (#1655) +- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678) +- Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681) +- Synchronization issues in global trace delegate implementation. (#1686) +- Reduced excess memory usage by global `TracerProvider`. (#1687) + +## [0.18.0] - 2021-03-03 + +### Added + +- Added `resource.Default()` for use with meter and tracer providers. (#1507) +- `AttributePerEventCountLimit` and `AttributePerLinkCountLimit` for `SpanLimits`. (#1535) +- Added `Keys()` method to `propagation.TextMapCarrier` and `propagation.HeaderCarrier` to adapt `http.Header` to this interface. (#1544) +- Added `code` attributes to `go.opentelemetry.io/otel/semconv` package. (#1558) +- Compatibility testing suite in the CI system for the following systems. (#1567) + | OS | Go Version | Architecture | + | ------- | ---------- | ------------ | + | Ubuntu | 1.15 | amd64 | + | Ubuntu | 1.14 | amd64 | + | Ubuntu | 1.15 | 386 | + | Ubuntu | 1.14 | 386 | + | MacOS | 1.15 | amd64 | + | MacOS | 1.14 | amd64 | + | Windows | 1.15 | amd64 | + | Windows | 1.14 | amd64 | + | Windows | 1.15 | 386 | + | Windows | 1.14 | 386 | + +### Changed + +- Replaced interface `oteltest.SpanRecorder` with its existing implementation + `StandardSpanRecorder`. (#1542) +- Default span limit values to 128. (#1535) +- Rename `MaxEventsPerSpan`, `MaxAttributesPerSpan` and `MaxLinksPerSpan` to `EventCountLimit`, `AttributeCountLimit` and `LinkCountLimit`, and move these fields into `SpanLimits`. (#1535) +- Renamed the `otel/label` package to `otel/attribute`. (#1541) +- Vendor the Jaeger exporter's dependency on Apache Thrift. (#1551) +- Parallelize the CI linting and testing. (#1567) +- Stagger timestamps in exact aggregator tests. (#1569) +- Changed all examples to use `WithBatchTimeout(5 * time.Second)` rather than `WithBatchTimeout(5)`. (#1621) +- Prevent end-users from implementing some interfaces (#1575) + + ``` + "otel/exporters/otlp/otlphttp".Option + "otel/exporters/stdout".Option + "otel/oteltest".Option + "otel/trace".TracerOption + "otel/trace".SpanOption + "otel/trace".EventOption + "otel/trace".LifeCycleOption + "otel/trace".InstrumentationOption + "otel/sdk/resource".Option + "otel/sdk/trace".ParentBasedSamplerOption + "otel/sdk/trace".ReadOnlySpan + "otel/sdk/trace".ReadWriteSpan + ``` + +### Removed + +- Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545) +- The `test-benchmark` is no longer a dependency of the `precommit` make target. (#1567) +- Removed the `test-386` make target. + This was replaced with a full compatibility testing suite (i.e. multi OS/arch) in the CI system. (#1567) + +### Fixed + +- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572) +- Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577) +- The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579) +- Validate tracestate header keys with vendors according to the W3C TraceContext specification (#1475). (#1581) +- The OTLP exporter includes related labels for translations of a GaugeArray (#1563). (#1570) + +## [0.17.0] - 2021-02-12 + +### Changed + +- Rename project default branch from `master` to `main`. (#1505) +- Reverse order in which `Resource` attributes are merged, per change in spec. (#1501) +- Add tooling to maintain "replace" directives in go.mod files automatically. (#1528) +- Create new modules: otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (#1528) +- Move metric-related public global APIs from otel to otel/metric/global. (#1528) + +## Fixed + +- Fixed otlpgrpc reconnection issue. +- The example code in the README.md of `go.opentelemetry.io/otel/exporters/otlp` is moved to a compiled example test and used the new `WithAddress` instead of `WithEndpoint`. (#1513) +- The otel-collector example now uses the default OTLP receiver port of the collector. + +## [0.16.0] - 2021-01-13 + +### Added + +- Add the `ReadOnlySpan` and `ReadWriteSpan` interfaces to provide better control for accessing span data. (#1360) +- `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369) +- Added documentation about the project's versioning policy. (#1388) +- Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418) +- Added codeql workflow to GitHub Actions (#1428) +- Added Gosec workflow to GitHub Actions (#1429) +- Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420) +- Add an OpenCensus exporter bridge. (#1444) + +### Changed + +- Rename `internal/testing` to `internal/internaltest`. (#1449) +- Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360) +- Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360) +- Improve span duration accuracy. (#1360) +- Migrated CI/CD from CircleCI to GitHub Actions (#1382) +- Remove duplicate checkout from GitHub Actions workflow (#1407) +- Metric `array` aggregator renamed `exact` to match its `aggregation.Kind` (#1412) +- Metric `exact` aggregator includes per-point timestamps (#1412) +- Metric stdout exporter uses MinMaxSumCount aggregator for ValueRecorder instruments (#1412) +- `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369) +- Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369) +- Unify endpoint API that related to OTel exporter. (#1401) +- Optimize metric histogram aggregator to reuse its slice of buckets. (#1435) +- Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430) +- Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434) +- `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432) +- Moved gRPC driver for OTLP exporter to `exporters/otlp/otlpgrpc`. (#1420) +- The `TraceContext` propagator now correctly propagates `TraceState` through the `SpanContext`. (#1447) +- Metric Push and Pull Controller components are combined into a single "basic" Controller: + - `WithExporter()` and `Start()` to configure Push behavior + - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior + - `Start()` and `Stop()` accept Context. (#1378) +- The `Event` type is moved from the `otel/sdk/export/trace` package to the `otel/trace` API package. (#1452) + +### Removed + +- Remove `errUninitializedSpan` as its only usage is now obsolete. (#1360) +- Remove Metric export functionality related to quantiles and summary data points: this is not specified (#1412) +- Remove DDSketch metric aggregator; our intention is to re-introduce this as an option of the histogram aggregator after [new OTLP histogram data types](https://github.com/open-telemetry/opentelemetry-proto/pull/226) are released (#1412) + +### Fixed + +- `BatchSpanProcessor.Shutdown()` will now shutdown underlying `export.SpanExporter`. (#1443) + +## [0.15.0] - 2020-12-10 + +### Added + +- The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. (#1363) + +### Changed + +- The Zipkin exporter now uses the Span status code to determine. (#1328) +- `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357) +- Move the OpenCensus example into `example` directory. (#1359) +- Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. (#1363) +- Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 (#1374) +- Bump `github.com/golangci/golangci-lint` in `/internal/tools` (#1375) + +### Fixed + +- Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. (#1381) + +## [0.14.0] - 2020-11-19 + +### Added + +- An `EventOption` and the related `NewEventConfig` function are added to the `go.opentelemetry.io/otel` package to configure Span events. (#1254) +- A `TextMapPropagator` and associated `TextMapCarrier` are added to the `go.opentelemetry.io/otel/oteltest` package to test `TextMap` type propagators and their use. (#1259) +- `SpanContextFromContext` returns `SpanContext` from context. (#1255) +- `TraceState` has been added to `SpanContext`. (#1340) +- `DeploymentEnvironmentKey` added to `go.opentelemetry.io/otel/semconv` package. (#1323) +- Add an OpenCensus to OpenTelemetry tracing bridge. (#1305) +- Add a parent context argument to `SpanProcessor.OnStart` to follow the specification. (#1333) +- Add missing tests for `sdk/trace/attributes_map.go`. (#1337) + +### Changed + +- Move the `go.opentelemetry.io/otel/api/trace` package into `go.opentelemetry.io/otel/trace` with the following changes. (#1229) (#1307) + - `ID` has been renamed to `TraceID`. + - `IDFromHex` has been renamed to `TraceIDFromHex`. + - `EmptySpanContext` is removed. +- Move the `go.opentelemetry.io/otel/api/trace/tracetest` package into `go.opentelemetry.io/otel/oteltest`. (#1229) +- OTLP Exporter updates: + - supports OTLP v0.6.0 (#1230, #1354) + - supports configurable aggregation temporality (default: Cumulative, optional: Stateless). (#1296) +- The Sampler is now called on local child spans. (#1233) +- The `Kind` type from the `go.opentelemetry.io/otel/api/metric` package was renamed to `InstrumentKind` to more specifically describe what it is and avoid semantic ambiguity. (#1240) +- The `MetricKind` method of the `Descriptor` type in the `go.opentelemetry.io/otel/api/metric` package was renamed to `Descriptor.InstrumentKind`. + This matches the returned type and fixes misuse of the term metric. (#1240) +- Move test harness from the `go.opentelemetry.io/otel/api/apitest` package into `go.opentelemetry.io/otel/oteltest`. (#1241) +- Move the `go.opentelemetry.io/otel/api/metric/metrictest` package into `go.opentelemetry.io/oteltest` as part of #964. (#1252) +- Move the `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric` as part of #1303. (#1321) +- Move the `go.opentelemetry.io/otel/api/metric/registry` package into `go.opentelemetry.io/otel/metric/registry` as a part of #1303. (#1316) +- Move the `Number` type (together with related functions) from `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric/number` as a part of #1303. (#1316) +- The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254) +- The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254) +- Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel`. (#1262) (#1330) +- Move the `Version` function from `go.opentelemetry.io/otel/sdk` to `go.opentelemetry.io/otel`. (#1330) +- Rename correlation context header from `"otcorrelations"` to `"baggage"` to match the OpenTelemetry specification. (#1267) +- Fix `Code.UnmarshalJSON` to work with valid JSON only. (#1276) +- The `resource.New()` method changes signature to support builtin attributes and functional options, including `telemetry.sdk.*` and + `host.name` semantic conventions; the former method is renamed `resource.NewWithAttributes`. (#1235) +- The Prometheus exporter now exports non-monotonic counters (i.e. `UpDownCounter`s) as gauges. (#1210) +- Correct the `Span.End` method documentation in the `otel` API to state updates are not allowed on a span after it has ended. (#1310) +- Updated span collection limits for attribute, event and link counts to 1000 (#1318) +- Renamed `semconv.HTTPUrlKey` to `semconv.HTTPURLKey`. (#1338) + +### Removed + +- The `ErrInvalidHexID`, `ErrInvalidTraceIDLength`, `ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID` from the `go.opentelemetry.io/otel` package are unexported now. (#1243) +- The `AddEventWithTimestamp` method on the `Span` interface in `go.opentelemetry.io/otel` is removed due to its redundancy. + It is replaced by using the `AddEvent` method with a `WithTimestamp` option. (#1254) +- The `MockSpan` and `MockTracer` types are removed from `go.opentelemetry.io/otel/oteltest`. + `Tracer` and `Span` from the same module should be used in their place instead. (#1306) +- `WorkerCount` option is removed from `go.opentelemetry.io/otel/exporters/otlp`. (#1350) +- Remove the following labels types: INT32, UINT32, UINT64 and FLOAT32. (#1314) + +### Fixed + +- Rename `MergeItererator` to `MergeIterator` in the `go.opentelemetry.io/otel/label` package. (#1244) +- The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258) +- Fix condition in `label.Any`. (#1299) +- Fix global `TracerProvider` to pass options to its configured provider. (#1329) +- Fix missing handler for `ExactKind` aggregator in OTLP metrics transformer (#1309) + +## [0.13.0] - 2020-10-08 + +### Added + +- OTLP Metric exporter supports Histogram aggregation. (#1209) +- The `Code` struct from the `go.opentelemetry.io/otel/codes` package now supports JSON marshaling and unmarshaling as well as implements the `Stringer` interface. (#1214) +- A Baggage API to implement the OpenTelemetry specification. (#1217) +- Add Shutdown method to sdk/trace/provider, shutdown processors in the order they were registered. (#1227) + +### Changed + +- Set default propagator to no-op propagator. (#1184) +- The `HTTPSupplier`, `HTTPExtractor`, `HTTPInjector`, and `HTTPPropagator` from the `go.opentelemetry.io/otel/api/propagation` package were replaced with unified `TextMapCarrier` and `TextMapPropagator` in the `go.opentelemetry.io/otel/propagation` package. (#1212) (#1325) +- The `New` function from the `go.opentelemetry.io/otel/api/propagation` package was replaced with `NewCompositeTextMapPropagator` in the `go.opentelemetry.io/otel` package. (#1212) +- The status codes of the `go.opentelemetry.io/otel/codes` package have been updated to match the latest OpenTelemetry specification. + They now are `Unset`, `Error`, and `Ok`. + They no longer track the gRPC codes. (#1214) +- The `StatusCode` field of the `SpanData` struct in the `go.opentelemetry.io/otel/sdk/export/trace` package now uses the codes package from this package instead of the gRPC project. (#1214) +- Move the `go.opentelemetry.io/otel/api/baggage` package into `go.opentelemetry.io/otel/baggage`. (#1217) (#1325) +- A `Shutdown` method of `SpanProcessor` and all its implementations receives a context and returns an error. (#1264) + +### Fixed + +- Copies of data from arrays and slices passed to `go.opentelemetry.io/otel/label.ArrayValue()` are now used in the returned `Value` instead of using the mutable data itself. (#1226) + +### Removed + +- The `ExtractHTTP` and `InjectHTTP` functions from the `go.opentelemetry.io/otel/api/propagation` package were removed. (#1212) +- The `Propagators` interface from the `go.opentelemetry.io/otel/api/propagation` package was removed to conform to the OpenTelemetry specification. + The explicit `TextMapPropagator` type can be used in its place as this is the `Propagator` type the specification defines. (#1212) +- The `SetAttribute` method of the `Span` from the `go.opentelemetry.io/otel/api/trace` package was removed given its redundancy with the `SetAttributes` method. (#1216) +- The internal implementation of Baggage storage is removed in favor of using the new Baggage API functionality. (#1217) +- Remove duplicate hostname key `HostHostNameKey` in Resource semantic conventions. (#1219) +- Nested array/slice support has been removed. (#1226) + +## [0.12.0] - 2020-09-24 + +### Added + +- A `SpanConfigure` function in `go.opentelemetry.io/otel/api/trace` to create a new `SpanConfig` from `SpanOption`s. (#1108) +- In the `go.opentelemetry.io/otel/api/trace` package, `NewTracerConfig` was added to construct new `TracerConfig`s. + This addition was made to conform with our project option conventions. (#1155) +- Instrumentation library information was added to the Zipkin exporter. (#1119) +- The `SpanProcessor` interface now has a `ForceFlush()` method. (#1166) +- More semantic conventions for k8s as resource attributes. (#1167) + +### Changed + +- Add reconnecting udp connection type to Jaeger exporter. + This change adds a new optional implementation of the udp conn interface used to detect changes to an agent's host dns record. + It then adopts the new destination address to ensure the exporter doesn't get stuck. This change was ported from jaegertracing/jaeger-client-go#520. (#1063) +- Replace `StartOption` and `EndOption` in `go.opentelemetry.io/otel/api/trace` with `SpanOption`. + This change is matched by replacing the `StartConfig` and `EndConfig` with a unified `SpanConfig`. (#1108) +- Replace the `LinkedTo` span option in `go.opentelemetry.io/otel/api/trace` with `WithLinks`. + This is be more consistent with our other option patterns, i.e. passing the item to be configured directly instead of its component parts, and provides a cleaner function signature. (#1108) +- The `go.opentelemetry.io/otel/api/trace` `TracerOption` was changed to an interface to conform to project option conventions. (#1109) +- Move the `B3` and `TraceContext` from within the `go.opentelemetry.io/otel/api/trace` package to their own `go.opentelemetry.io/otel/propagators` package. + This removal of the propagators is reflective of the OpenTelemetry specification for these propagators as well as cleans up the `go.opentelemetry.io/otel/api/trace` API. (#1118) +- Rename Jaeger tags used for instrumentation library information to reflect changes in OpenTelemetry specification. (#1119) +- Rename `ProbabilitySampler` to `TraceIDRatioBased` and change semantics to ignore parent span sampling status. (#1115) +- Move `tools` package under `internal`. (#1141) +- Move `go.opentelemetry.io/otel/api/correlation` package to `go.opentelemetry.io/otel/api/baggage`. (#1142) + The `correlation.CorrelationContext` propagator has been renamed `baggage.Baggage`. Other exported functions and types are unchanged. +- Rename `ParentOrElse` sampler to `ParentBased` and allow setting samplers depending on parent span. (#1153) +- In the `go.opentelemetry.io/otel/api/trace` package, `SpanConfigure` was renamed to `NewSpanConfig`. (#1155) +- Change `dependabot.yml` to add a `Skip Changelog` label to dependabot-sourced PRs. (#1161) +- The [configuration style guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#config) has been updated to + recommend the use of `newConfig()` instead of `configure()`. (#1163) +- The `otlp.Config` type has been unexported and changed to `otlp.config`, along with its initializer. (#1163) +- Ensure exported interface types include parameter names and update the + Style Guide to reflect this styling rule. (#1172) +- Don't consider unset environment variable for resource detection to be an error. (#1170) +- Rename `go.opentelemetry.io/otel/api/metric.ConfigureInstrument` to `NewInstrumentConfig` and + `go.opentelemetry.io/otel/api/metric.ConfigureMeter` to `NewMeterConfig`. +- ValueObserver instruments use LastValue aggregator by default. (#1165) +- OTLP Metric exporter supports LastValue aggregation. (#1165) +- Move the `go.opentelemetry.io/otel/api/unit` package to `go.opentelemetry.io/otel/unit`. (#1185) +- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) +- Rename `NoopProvider` to `NoopMeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) +- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metric/metrictest` package. (#1190) +- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric/registry` package. (#1190) +- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metri/registryc` package. (#1190) +- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) +- Rename `NoopProvider` to `NoopTracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) +- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) +- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) +- Rename `WrapperProvider` to `WrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) +- Rename `NewWrapperProvider` to `NewWrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) +- Rename `Provider` method of the pull controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/pull` package. (#1190) +- Rename `Provider` method of the push controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/push` package. (#1190) +- Rename `ProviderOptions` to `TracerProviderConfig` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Rename `ProviderOption` to `TracerProviderOption` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Renamed `SamplingDecision` values to comply with OpenTelemetry specification change. (#1192) +- Renamed Zipkin attribute names from `ot.status_code & ot.status_description` to `otel.status_code & otel.status_description`. (#1201) +- The default SDK now invokes registered `SpanProcessor`s in the order they were registered with the `TracerProvider`. (#1195) +- Add test of spans being processed by the `SpanProcessor`s in the order they were registered. (#1203) + +### Removed + +- Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the + `go.opentelemetry.io/contrib/propagators/` module. (#1191) +- Remove the semantic convention for HTTP status text, `HTTPStatusTextKey` from package `go.opentelemetry.io/otel/semconv`. (#1194) + +### Fixed + +- Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171) +- Fix missing shutdown processor in otel-collector example. (#1186) +- Fix missing shutdown processor in basic and namedtracer examples. (#1197) + +## [0.11.0] - 2020-08-24 + +### Added + +- Support for exporting array-valued attributes via OTLP. (#992) +- `Noop` and `InMemory` `SpanBatcher` implementations to help with testing integrations. (#994) +- Support for filtering metric label sets. (#1047) +- A dimensionality-reducing metric Processor. (#1057) +- Integration tests for more OTel Collector Attribute types. (#1062) +- A new `WithSpanProcessor` `ProviderOption` is added to the `go.opentelemetry.io/otel/sdk/trace` package to create a `Provider` and automatically register the `SpanProcessor`. (#1078) + +### Changed + +- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`. (#1049) +- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`. (#1049) +- Rename `api/testharness` to `api/apitest`. (#1049) +- Rename `api/trace/testtrace` to `api/trace/tracetest`. (#1049) +- Change Metric Processor to merge multiple observations. (#1024) +- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. + This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) +- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) +- The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) +- Replace `WithSyncer` with `WithBatcher` in examples. (#1044) +- Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046) +- Merge the `go.opentelemetry.io/otel/api/label` and `go.opentelemetry.io/otel/api/kv` into the new `go.opentelemetry.io/otel/label` package. (#1060) +- Unify Callback Function Naming. + Rename `*Callback` with `*Func`. (#1061) +- CI builds validate against last two versions of Go, dropping 1.13 and adding 1.15. (#1064) +- The `go.opentelemetry.io/otel/sdk/export/trace` interfaces `SpanSyncer` and `SpanBatcher` have been replaced with a specification compliant `Exporter` interface. + This interface still supports the export of `SpanData`, but only as a slice. + Implementation are also required now to return any error from `ExportSpans` if one occurs as well as implement a `Shutdown` method for exporter clean-up. (#1078) +- The `go.opentelemetry.io/otel/sdk/trace` `NewBatchSpanProcessor` function no longer returns an error. + If a `nil` exporter is passed as an argument to this function, instead of it returning an error, it now returns a `BatchSpanProcessor` that handles the export of `SpanData` by not taking any action. (#1078) +- The `go.opentelemetry.io/otel/sdk/trace` `NewProvider` function to create a `Provider` no longer returns an error, instead only a `*Provider`. + This change is related to `NewBatchSpanProcessor` not returning an error which was the only error this function would return. (#1078) + +### Removed + +- Duplicate, unused API sampler interface. (#999) + Use the [`Sampler` interface](https://github.com/open-telemetry/opentelemetry-go/blob/v0.11.0/sdk/trace/sampling.go) provided by the SDK instead. +- The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository. + This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027) +- The `WithSpan` method of the `Tracer` interface. + The functionality this method provided was limited compared to what a user can provide themselves. + It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043) +- The `RegisterSpanProcessor` and `UnregisterSpanProcessor` functions. + These were holdovers from an approach prior to the TracerProvider design. They were not used anymore. (#1077) +- The `oterror` package. (#1026) +- The `othttp` and `httptrace` instrumentations were moved to `go.opentelemetry.io/contrib`. (#1032) + +### Fixed + +- The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) +- Correct instrumentation version tag in Jaeger exporter. (#1037) +- The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043) +- Move internally generated protobuf code from the `go.opentelemetry.io/otel` to the OTLP exporter to reduce dependency overhead. (#1050) +- The `otel-collector` example referenced outdated collector processors. (#1006) + +## [0.10.0] - 2020-07-29 + +This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. + +### Added + +- The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. + These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) +- Add propagator option for gRPC instrumentation. (#986) +- The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987) + +### Changed + +- Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function. + This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944) +- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. + This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963) +- Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962) +- The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968) + - `value.Bool` was replaced with `kv.BoolValue`. + - `value.Int64` was replaced with `kv.Int64Value`. + - `value.Uint64` was replaced with `kv.Uint64Value`. + - `value.Float64` was replaced with `kv.Float64Value`. + - `value.Int32` was replaced with `kv.Int32Value`. + - `value.Uint32` was replaced with `kv.Uint32Value`. + - `value.Float32` was replaced with `kv.Float32Value`. + - `value.String` was replaced with `kv.StringValue`. + - `value.Int` was replaced with `kv.IntValue`. + - `value.Uint` was replaced with `kv.UintValue`. + - `value.Array` was replaced with `kv.ArrayValue`. +- Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) +- Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979) +- Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) +- Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985) +- Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989) + +### Removed + +- The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970) + +### Fixed + +- Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953) +- Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957) +- Use `global.Handle` for span export errors in the OTLP exporter. (#946) +- Correct Go language formatting in the README documentation. (#961) +- Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) +- Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983) +- Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984) + +## [0.9.0] - 2020-07-20 + +### Added + +- A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939) +- A Detector to automatically detect resources from an environment variable. (#939) +- Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) +- OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. + References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) + +### Changed + +- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) + +### Removed + +- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) + +## [0.8.0] - 2020-07-09 + +### Added + +- The `B3Encoding` type to represent the B3 encoding(s) the B3 propagator can inject. + A value for HTTP supported encodings (Multiple Header: `MultipleHeader`, Single Header: `SingleHeader`) are included. (#882) +- The `FlagsDeferred` trace flag to indicate if the trace sampling decision has been deferred. (#882) +- The `FlagsDebug` trace flag to indicate if the trace is a debug trace. (#882) +- Add `peer.service` semantic attribute. (#898) +- Add database-specific semantic attributes. (#899) +- Add semantic convention for `faas.coldstart` and `container.id`. (#909) +- Add http content size semantic conventions. (#905) +- Include `http.request_content_length` in HTTP request basic attributes. (#905) +- Add semantic conventions for operating system process resource attribute keys. (#919) +- The Jaeger exporter now has a `WithBatchMaxCount` option to specify the maximum number of spans sent in a batch. (#931) + +### Changed + +- Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879) +- Use lowercase header names for B3 Multiple Headers. (#881) +- The B3 propagator `SingleHeader` field has been replaced with `InjectEncoding`. + This new field can be set to combinations of the `B3Encoding` bitmasks and will inject trace information in these encodings. + If no encoding is set, the propagator will default to `MultipleHeader` encoding. (#882) +- The B3 propagator now extracts from either HTTP encoding of B3 (Single Header or Multiple Header) based on what is contained in the header. + Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid. + This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882) +- Extend semantic conventions for RPC. (#900) +- To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920) + - `"api/standard".FaaSName` -> `FaaSNameKey` + - `"api/standard".FaaSID` -> `FaaSIDKey` + - `"api/standard".FaaSVersion` -> `FaaSVersionKey` + - `"api/standard".FaaSInstance` -> `FaaSInstanceKey` + +### Removed + +- The `FlagsUnused` trace flag is removed. + The purpose of this flag was to act as the inverse of `FlagsSampled`, the inverse of `FlagsSampled` is used instead. (#882) +- The B3 header constants (`B3SingleHeader`, `B3DebugFlagHeader`, `B3TraceIDHeader`, `B3SpanIDHeader`, `B3SampledHeader`, `B3ParentSpanIDHeader`) are removed. + If B3 header keys are needed [the authoritative OpenZipkin package constants](https://pkg.go.dev/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3?tab=doc#pkg-constants) should be used instead. (#882) + +### Fixed + +- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881) +- The B3 propagator now correctly supports sampling only values (`b3: 0`, `b3: 1`, or `b3: d`) for a Single B3 Header. (#882) +- The B3 propagator now propagates the debug flag. + This removes the behavior of changing the debug flag into a set sampling bit. + Instead, this now follow the B3 specification and omits the `X-B3-Sampling` header. (#882) +- The B3 propagator now tracks "unset" sampling state (meaning "defer the decision") and does not set the `X-B3-Sampling` header when injecting. (#882) +- Bump github.com/itchyny/gojq from 0.10.3 to 0.10.4 in /tools. (#883) +- Bump github.com/opentracing/opentracing-go from v1.1.1-0.20190913142402-a7454ce5950e to v1.2.0. (#885) +- The tracing time conversion for OTLP spans is now correctly set to `UnixNano`. (#896) +- Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908) +- Ensure `httptrace.clientTracer` closes `http.headers` span. (#912) +- Prometheus exporter will not apply stale updates or forget inactive metrics. (#903) +- Add test for api.standard `HTTPClientAttributesFromHTTPRequest`. (#905) +- Bump github.com/golangci/golangci-lint from 1.27.0 to 1.28.1 in /tools. (#901, #913) +- Update otel-colector example to use the v0.5.0 collector. (#915) +- The `grpctrace` instrumentation uses a span name conforming to the OpenTelemetry semantic conventions (does not contain a leading slash (`/`)). (#922) +- The `grpctrace` instrumentation includes an `rpc.method` attribute now set to the gRPC method name. (#900, #922) +- The `grpctrace` instrumentation `rpc.service` attribute now contains the package name if one exists. + This is in accordance with OpenTelemetry semantic conventions. (#922) +- Correlation Context extractor will no longer insert an empty map into the returned context when no valid values are extracted. (#923) +- Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger. (#925) +- Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools. (#926) +- Bump github.com/golangci/golangci-lint from 1.28.1 to 1.28.2 in /tools. (#930) + +## [0.7.0] - 2020-06-26 + +This release implements the v0.5.0 version of the OpenTelemetry specification. + +### Added + +- The othttp instrumentation now includes default metrics. (#861) +- This CHANGELOG file to track all changes in the project going forward. +- Support for array type attributes. (#798) +- Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844) +- Timestamps are now passed to exporters for each export. (#835) +- Add new `Accumulation` type to metric SDK to transport telemetry from `Accumulator`s to `Processor`s. + This replaces the prior `Record` `struct` use for this purpose. (#835) +- New dependabot integration to automate package upgrades. (#814) +- `Meter` and `Tracer` implementations accept instrumentation version version as an optional argument. + This instrumentation version is passed on to exporters. (#811) (#805) (#802) +- The OTLP exporter includes the instrumentation version in telemetry it exports. (#811) +- Environment variables for Jaeger exporter are supported. (#796) +- New `aggregation.Kind` in the export metric API. (#808) +- New example that uses OTLP and the collector. (#790) +- Handle errors in the span `SetName` during span initialization. (#791) +- Default service config to enable retries for retry-able failed requests in the OTLP exporter and an option to override this default. (#777) +- New `go.opentelemetry.io/otel/api/oterror` package to uniformly support error handling and definitions for the project. (#778) +- New `global` default implementation of the `go.opentelemetry.io/otel/api/oterror.Handler` interface to be used to handle errors prior to an user defined `Handler`. + There is also functionality for the user to register their `Handler` as well as a convenience function `Handle` to handle an error with this global `Handler`(#778) +- Options to specify propagators for httptrace and grpctrace instrumentation. (#784) +- The required `application/json` header for the Zipkin exporter is included in all exports. (#774) +- Integrate HTTP semantics helpers from the contrib repository into the `api/standard` package. #769 + +### Changed + +- Rename `Integrator` to `Processor` in the metric SDK. (#863) +- Rename `AggregationSelector` to `AggregatorSelector`. (#859) +- Rename `SynchronizedCopy` to `SynchronizedMove`. (#858) +- Rename `simple` integrator to `basic` integrator. (#857) +- Merge otlp collector examples. (#841) +- Change the metric SDK to support cumulative, delta, and pass-through exporters directly. + With these changes, cumulative and delta specific exporters are able to request the correct kind of aggregation from the SDK. (#840) +- The `Aggregator.Checkpoint` API is renamed to `SynchronizedCopy` and adds an argument, a different `Aggregator` into which the copy is stored. (#812) +- The `export.Aggregator` contract is that `Update()` and `SynchronizedCopy()` are synchronized with each other. + All the aggregation interfaces (`Sum`, `LastValue`, ...) are not meant to be synchronized, as the caller is expected to synchronize aggregators at a higher level after the `Accumulator`. + Some of the `Aggregators` used unnecessary locking and that has been cleaned up. (#812) +- Use of `metric.Number` was replaced by `int64` now that we use `sync.Mutex` in the `MinMaxSumCount` and `Histogram` `Aggregators`. (#812) +- Replace `AlwaysParentSample` with `ParentSample(fallback)` to match the OpenTelemetry v0.5.0 specification. (#810) +- Rename `sdk/export/metric/aggregator` to `sdk/export/metric/aggregation`. #808 +- Send configured headers with every request in the OTLP exporter, instead of just on connection creation. (#806) +- Update error handling for any one off error handlers, replacing, instead, with the `global.Handle` function. (#791) +- Rename `plugin` directory to `instrumentation` to match the OpenTelemetry specification. (#779) +- Makes the argument order to Histogram and DDSketch `New()` consistent. (#781) + +### Removed + +- `Uint64NumberKind` and related functions from the API. (#864) +- Context arguments from `Aggregator.Checkpoint` and `Integrator.Process` as they were unused. (#803) +- `SpanID` is no longer included in parameters for sampling decision to match the OpenTelemetry specification. (#775) + +### Fixed + +- Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release. (#866) +- Allow changes to `go.sum` and `go.mod` when running dependabot tidy-up. (#871) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1. (#824) +- Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus. (#867) +- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger. (#853) +- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin. (#854) +- Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817) +- Bump github.com/golangci/golangci-lint from 1.25.1 to 1.27.0 in /tools (#828) +- Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829) +- Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823) +- Bump github.com/itchyny/gojq from 0.10.1 to 0.10.3 in /tools (#830) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822) +- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820) +- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831) +- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836) +- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837) +- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839) +- Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843) +- Set span status from HTTP status code in the othttp instrumentation. (#832) +- Fixed typo in push controller comment. (#834) +- The `Aggregator` testing has been updated and cleaned. (#812) +- `metric.Number(0)` expressions are replaced by `0` where possible. (#812) +- Fixed `global` `handler_test.go` test failure. #804 +- Fixed `BatchSpanProcessor.Shutdown` to wait until all spans are processed. (#766) +- Fixed OTLP example's accidental early close of exporter. (#807) +- Ensure zipkin exporter reads and closes response body. (#788) +- Update instrumentation to use `api/standard` keys instead of custom keys. (#782) +- Clean up tools and RELEASING documentation. (#762) + +## [0.6.0] - 2020-05-21 + +### Added + +- Support for `Resource`s in the prometheus exporter. (#757) +- New pull controller. (#751) +- New `UpDownSumObserver` instrument. (#750) +- OpenTelemetry collector demo. (#711) +- New `SumObserver` instrument. (#747) +- New `UpDownCounter` instrument. (#745) +- New timeout `Option` and configuration function `WithTimeout` to the push controller. (#742) +- New `api/standards` package to implement semantic conventions and standard key-value generation. (#731) + +### Changed + +- Rename `Register*` functions in the metric API to `New*` for all `Observer` instruments. (#761) +- Use `[]float64` for histogram boundaries, not `[]metric.Number`. (#758) +- Change OTLP example to use exporter as a trace `Syncer` instead of as an unneeded `Batcher`. (#756) +- Replace `WithResourceAttributes()` with `WithResource()` in the trace SDK. (#754) +- The prometheus exporter now uses the new pull controller. (#751) +- Rename `ScheduleDelayMillis` to `BatchTimeout` in the trace `BatchSpanProcessor`.(#752) +- Support use of synchronous instruments in asynchronous callbacks (#725) +- Move `Resource` from the `Export` method parameter into the metric export `Record`. (#739) +- Rename `Observer` instrument to `ValueObserver`. (#734) +- The push controller now has a method (`Provider()`) to return a `metric.Provider` instead of the old `Meter` method that acted as a `metric.Provider`. (#738) +- Replace `Measure` instrument by `ValueRecorder` instrument. (#732) +- Rename correlation context header from `"Correlation-Context"` to `"otcorrelations"` to match the OpenTelemetry specification. (#727) + +### Fixed + +- Ensure gRPC `ClientStream` override methods do not panic in grpctrace package. (#755) +- Disable parts of `BatchSpanProcessor` test until a fix is found. (#743) +- Fix `string` case in `kv` `Infer` function. (#746) +- Fix panic in grpctrace client interceptors. (#740) +- Refactor the `api/metrics` push controller and add `CheckpointSet` synchronization. (#737) +- Rewrite span batch process queue batching logic. (#719) +- Remove the push controller named Meter map. (#738) +- Fix Histogram aggregator initial state (fix #735). (#736) +- Ensure golang alpine image is running `golang-1.14` for examples. (#733) +- Added test for grpctrace `UnaryInterceptorClient`. (#695) +- Rearrange `api/metric` code layout. (#724) + +## [0.5.0] - 2020-05-13 + +### Added + +- Batch `Observer` callback support. (#717) +- Alias `api` types to root package of project. (#696) +- Create basic `othttp.Transport` for simple client instrumentation. (#678) +- `SetAttribute(string, interface{})` to the trace API. (#674) +- Jaeger exporter option that allows user to specify custom http client. (#671) +- `Stringer` and `Infer` methods to `key`s. (#662) + +### Changed + +- Rename `NewKey` in the `kv` package to just `Key`. (#721) +- Move `core` and `key` to `kv` package. (#720) +- Make the metric API `Meter` a `struct` so the abstract `MeterImpl` can be passed and simplify implementation. (#709) +- Rename SDK `Batcher` to `Integrator` to match draft OpenTelemetry SDK specification. (#710) +- Rename SDK `Ungrouped` integrator to `simple.Integrator` to match draft OpenTelemetry SDK specification. (#710) +- Rename SDK `SDK` `struct` to `Accumulator` to match draft OpenTelemetry SDK specification. (#710) +- Move `Number` from `core` to `api/metric` package. (#706) +- Move `SpanContext` from `core` to `trace` package. (#692) +- Change traceparent header from `Traceparent` to `traceparent` to implement the W3C specification. (#681) + +### Fixed + +- Update tooling to run generators in all submodules. (#705) +- gRPC interceptor regexp to match methods without a service name. (#683) +- Use a `const` for padding 64-bit B3 trace IDs. (#701) +- Update `mockZipkin` listen address from `:0` to `127.0.0.1:0`. (#700) +- Left-pad 64-bit B3 trace IDs with zero. (#698) +- Propagate at least the first W3C tracestate header. (#694) +- Remove internal `StateLocker` implementation. (#688) +- Increase instance size CI system uses. (#690) +- Add a `key` benchmark and use reflection in `key.Infer()`. (#679) +- Fix internal `global` test by using `global.Meter` with `RecordBatch()`. (#680) +- Reimplement histogram using mutex instead of `StateLocker`. (#669) +- Switch `MinMaxSumCount` to a mutex lock implementation instead of `StateLocker`. (#667) +- Update documentation to not include any references to `WithKeys`. (#672) +- Correct misspelling. (#668) +- Fix clobbering of the span context if extraction fails. (#656) +- Bump `golangci-lint` and work around the corrupting bug. (#666) (#670) + +## [0.4.3] - 2020-04-24 + +### Added + +- `Dockerfile` and `docker-compose.yml` to run example code. (#635) +- New `grpctrace` package that provides gRPC client and server interceptors for both unary and stream connections. (#621) +- New `api/label` package, providing common label set implementation. (#651) +- Support for JSON marshaling of `Resources`. (#654) +- `TraceID` and `SpanID` implementations for `Stringer` interface. (#642) +- `RemoteAddrKey` in the othttp plugin to include the HTTP client address in top-level spans. (#627) +- `WithSpanFormatter` option to the othttp plugin. (#617) +- Updated README to include section for compatible libraries and include reference to the contrib repository. (#612) +- The prometheus exporter now supports exporting histograms. (#601) +- A `String` method to the `Resource` to return a hashable identifier for a now unique resource. (#613) +- An `Iter` method to the `Resource` to return an array `AttributeIterator`. (#613) +- An `Equal` method to the `Resource` test the equivalence of resources. (#613) +- An iterable structure (`AttributeIterator`) for `Resource` attributes. + +### Changed + +- zipkin export's `NewExporter` now requires a `serviceName` argument to ensure this needed values is provided. (#644) +- Pass `Resources` through the metrics export pipeline. (#659) + +### Removed + +- `WithKeys` option from the metric API. (#639) + +### Fixed + +- Use the `label.Set.Equivalent` value instead of an encoding in the batcher. (#658) +- Correct typo `trace.Exporter` to `trace.SpanSyncer` in comments. (#653) +- Use type names for return values in jaeger exporter. (#648) +- Increase the visibility of the `api/key` package by updating comments and fixing usages locally. (#650) +- `Checkpoint` only after `Update`; Keep records in the `sync.Map` longer. (#647) +- Do not cache `reflect.ValueOf()` in metric Labels. (#649) +- Batch metrics exported from the OTLP exporter based on `Resource` and labels. (#626) +- Add error wrapping to the prometheus exporter. (#631) +- Update the OTLP exporter batching of traces to use a unique `string` representation of an associated `Resource` as the batching key. (#623) +- Update OTLP `SpanData` transform to only include the `ParentSpanID` if one exists. (#614) +- Update `Resource` internal representation to uniquely and reliably identify resources. (#613) +- Check return value from `CheckpointSet.ForEach` in prometheus exporter. (#622) +- Ensure spans created by httptrace client tracer reflect operation structure. (#618) +- Create a new recorder rather than reuse when multiple observations in same epoch for asynchronous instruments. #610 +- The default port the OTLP exporter uses to connect to the OpenTelemetry collector is updated to match the one the collector listens on by default. (#611) + +## [0.4.2] - 2020-03-31 + +### Fixed + +- Fix `pre_release.sh` to update version in `sdk/opentelemetry.go`. (#607) +- Fix time conversion from internal to OTLP in OTLP exporter. (#606) + +## [0.4.1] - 2020-03-31 + +### Fixed + +- Update `tag.sh` to create signed tags. (#604) + +## [0.4.0] - 2020-03-30 + +### Added + +- New API package `api/metric/registry` that exposes a `MeterImpl` wrapper for use by SDKs to generate unique instruments. (#580) +- Script to verify examples after a new release. (#579) + +### Removed + +- The dogstatsd exporter due to lack of support. + This additionally removes support for statsd. (#591) +- `LabelSet` from the metric API. + This is replaced by a `[]core.KeyValue` slice. (#595) +- `Labels` from the metric API's `Meter` interface. (#595) + +### Changed + +- The metric `export.Labels` became an interface which the SDK implements and the `export` package provides a simple, immutable implementation of this interface intended for testing purposes. (#574) +- Renamed `internal/metric.Meter` to `MeterImpl`. (#580) +- Renamed `api/global/internal.obsImpl` to `asyncImpl`. (#580) + +### Fixed + +- Corrected missing return in mock span. (#582) +- Update License header for all source files to match CNCF guidelines and include a test to ensure it is present. (#586) (#596) +- Update to v0.3.0 of the OTLP in the OTLP exporter. (#588) +- Update pre-release script to be compatible between GNU and BSD based systems. (#592) +- Add a `RecordBatch` benchmark. (#594) +- Moved span transforms of the OTLP exporter to the internal package. (#593) +- Build both go-1.13 and go-1.14 in circleci to test for all supported versions of Go. (#569) +- Removed unneeded allocation on empty labels in OLTP exporter. (#597) +- Update `BatchedSpanProcessor` to process the queue until no data but respect max batch size. (#599) +- Update project documentation godoc.org links to pkg.go.dev. (#602) + +## [0.3.0] - 2020-03-21 + +This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality. +There is still a possibility of breaking changes. + +### Added + +- Add `Observer` metric instrument. (#474) +- Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. (#494) +- Simplified export setup pipeline for the jaeger exporter to match other exporters. (#459) +- The zipkin trace exporter. (#495) +- The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. (#497) (#544) (#545) +- Add `StatusMessage` field to the trace `Span`. (#524) +- Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. (#525) +- The `Resource` type was added to the SDK. (#528) +- The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. (#538) +- The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction. + Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. (#560) +- A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. (#560) +- Scripts to better automate the release process. (#576) + +### Changed + +- Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. (#506) +- Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. (#511) +- Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. (#511) +- The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. (#524) +- Updated the trace `Sampler` interface conform to the OpenTelemetry specification. (#531) +- Rename metric API `Options` to `Config`. (#541) +- Rename metric `Counter` aggregator to be `Sum`. (#541) +- Unify metric options into `Option` from instrument specific options. (#541) +- The trace API's `TraceProvider` now support `Resource`s. (#545) +- Correct error in zipkin module name. (#548) +- The jaeger trace exporter now supports `Resource`s. (#551) +- Metric SDK now supports `Resource`s. + The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. (#552) +- Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. (#557) +- The stdout trace exporter now supports `Resource`s. (#558) +- The metric `Descriptor` is now included at the API instead of the SDK. (#560) +- Replace `Ordered` with an iterator in `export.Labels`. (#567) + +### Removed + +- The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. (#452) +- The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. (#560) +- `GetDescriptor` from the metric SDK. (#575) +- The `Gauge` instrument from the metric API. (#537) + +### Fixed + +- Make histogram aggregator checkpoint consistent. (#438) +- Update README with import instructions and how to build and test. (#505) +- The default label encoding was updated to be unique. (#508) +- Use `NewRoot` in the othttp plugin for public endpoints. (#513) +- Fix data race in `BatchedSpanProcessor`. (#518) +- Skip test-386 for Mac OS 10.15.x (Catalina and upwards). #521 +- Use a variable-size array to represent ordered labels in maps. (#523) +- Update the OTLP protobuf and update changed import path. (#532) +- Use `StateLocker` implementation in `MinMaxSumCount`. (#546) +- Eliminate goroutine leak in histogram stress test. (#547) +- Update OTLP exporter with latest protobuf. (#550) +- Add filters to the othttp plugin. (#556) +- Provide an implementation of the `Header*` filters that do not depend on Go 1.14. (#565) +- Encode labels once during checkpoint. + The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter. + This is a cheap and quick way to avoid encoding the labels on every collection interval. (#572) +- Run coverage over all packages in `COVERAGE_MOD_DIR`. (#573) + +## [0.2.3] - 2020-03-04 + +### Added + +- `RecordError` method on `Span`s in the trace API to Simplify adding error events to spans. (#473) +- Configurable push frequency for exporters setup pipeline. (#504) + +### Changed + +- Rename the `exporter` directory to `exporters`. + The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`. + This resulted in all subsequent releases not becoming the default latest. + A consequence of this was that all `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages. + Renaming the `exporter` directory to `exporters` fixes this issue by renaming the package and therefore clearing any existing dependency tags. + Consequentially, this action also renames *all* exporter packages. (#502) + +### Removed + +- The `CorrelationContextHeader` constant in the `correlation` package is no longer exported. (#503) + +## [0.2.2] - 2020-02-27 + +### Added + +- `HTTPSupplier` interface in the propagation API to specify methods to retrieve and store a single value for a key to be associated with a carrier. (#467) +- `HTTPExtractor` interface in the propagation API to extract information from an `HTTPSupplier` into a context. (#467) +- `HTTPInjector` interface in the propagation API to inject information into an `HTTPSupplier.` (#467) +- `Config` and configuring `Option` to the propagator API. (#467) +- `Propagators` interface in the propagation API to contain the set of injectors and extractors for all supported carrier formats. (#467) +- `HTTPPropagator` interface in the propagation API to inject and extract from an `HTTPSupplier.` (#467) +- `WithInjectors` and `WithExtractors` functions to the propagator API to configure injectors and extractors to use. (#467) +- `ExtractHTTP` and `InjectHTTP` functions to apply configured HTTP extractors and injectors to a passed context. (#467) +- Histogram aggregator. (#433) +- `DefaultPropagator` function and have it return `trace.TraceContext` as the default context propagator. (#456) +- `AlwaysParentSample` sampler to the trace API. (#455) +- `WithNewRoot` option function to the trace API to specify the created span should be considered a root span. (#451) + +### Changed + +- Renamed `WithMap` to `ContextWithMap` in the correlation package. (#481) +- Renamed `FromContext` to `MapFromContext` in the correlation package. (#481) +- Move correlation context propagation to correlation package. (#479) +- Do not default to putting remote span context into links. (#480) +- `Tracer.WithSpan` updated to accept `StartOptions`. (#472) +- Renamed `MetricKind` to `Kind` to not stutter in the type usage. (#432) +- Renamed the `export` package to `metric` to match directory structure. (#432) +- Rename the `api/distributedcontext` package to `api/correlation`. (#444) +- Rename the `api/propagators` package to `api/propagation`. (#444) +- Move the propagators from the `propagators` package into the `trace` API package. (#444) +- Update `Float64Gauge`, `Int64Gauge`, `Float64Counter`, `Int64Counter`, `Float64Measure`, and `Int64Measure` metric methods to use value receivers instead of pointers. (#462) +- Moved all dependencies of tools package to a tools directory. (#466) + +### Removed + +- Binary propagators. (#467) +- NOOP propagator. (#467) + +### Fixed + +- Upgraded `github.com/golangci/golangci-lint` from `v1.21.0` to `v1.23.6` in `tools/`. (#492) +- Fix a possible nil-dereference crash (#478) +- Correct comments for `InstallNewPipeline` in the stdout exporter. (#483) +- Correct comments for `InstallNewPipeline` in the dogstatsd exporter. (#484) +- Correct comments for `InstallNewPipeline` in the prometheus exporter. (#482) +- Initialize `onError` based on `Config` in prometheus exporter. (#486) +- Correct module name in prometheus exporter README. (#475) +- Removed tracer name prefix from span names. (#430) +- Fix `aggregator_test.go` import package comment. (#431) +- Improved detail in stdout exporter. (#436) +- Fix a dependency issue (generate target should depend on stringer, not lint target) in Makefile. (#442) +- Reorders the Makefile targets within `precommit` target so we generate files and build the code before doing linting, so we can get much nicer errors about syntax errors from the compiler. (#442) +- Reword function documentation in gRPC plugin. (#446) +- Send the `span.kind` tag to Jaeger from the jaeger exporter. (#441) +- Fix `metadataSupplier` in the jaeger exporter to overwrite the header if existing instead of appending to it. (#441) +- Upgraded to Go 1.13 in CI. (#465) +- Correct opentelemetry.io URL in trace SDK documentation. (#464) +- Refactored reference counting logic in SDK determination of stale records. (#468) +- Add call to `runtime.Gosched` in instrument `acquireHandle` logic to not block the collector. (#469) + +## [0.2.1.1] - 2020-01-13 + +### Fixed + +- Use stateful batcher on Prometheus exporter fixing regression introduced in #395. (#428) + +## [0.2.1] - 2020-01-08 + +### Added + +- Global meter forwarding implementation. + This enables deferred initialization for metric instruments registered before the first Meter SDK is installed. (#392) +- Global trace forwarding implementation. + This enables deferred initialization for tracers registered before the first Trace SDK is installed. (#406) +- Standardize export pipeline creation in all exporters. (#395) +- A testing, organization, and comments for 64-bit field alignment. (#418) +- Script to tag all modules in the project. (#414) + +### Changed + +- Renamed `propagation` package to `propagators`. (#362) +- Renamed `B3Propagator` propagator to `B3`. (#362) +- Renamed `TextFormatPropagator` propagator to `TextFormat`. (#362) +- Renamed `BinaryPropagator` propagator to `Binary`. (#362) +- Renamed `BinaryFormatPropagator` propagator to `BinaryFormat`. (#362) +- Renamed `NoopTextFormatPropagator` propagator to `NoopTextFormat`. (#362) +- Renamed `TraceContextPropagator` propagator to `TraceContext`. (#362) +- Renamed `SpanOption` to `StartOption` in the trace API. (#369) +- Renamed `StartOptions` to `StartConfig` in the trace API. (#369) +- Renamed `EndOptions` to `EndConfig` in the trace API. (#369) +- `Number` now has a pointer receiver for its methods. (#375) +- Renamed `CurrentSpan` to `SpanFromContext` in the trace API. (#379) +- Renamed `SetCurrentSpan` to `ContextWithSpan` in the trace API. (#379) +- Renamed `Message` in Event to `Name` in the trace API. (#389) +- Prometheus exporter no longer aggregates metrics, instead it only exports them. (#385) +- Renamed `HandleImpl` to `BoundInstrumentImpl` in the metric API. (#400) +- Renamed `Float64CounterHandle` to `Float64CounterBoundInstrument` in the metric API. (#400) +- Renamed `Int64CounterHandle` to `Int64CounterBoundInstrument` in the metric API. (#400) +- Renamed `Float64GaugeHandle` to `Float64GaugeBoundInstrument` in the metric API. (#400) +- Renamed `Int64GaugeHandle` to `Int64GaugeBoundInstrument` in the metric API. (#400) +- Renamed `Float64MeasureHandle` to `Float64MeasureBoundInstrument` in the metric API. (#400) +- Renamed `Int64MeasureHandle` to `Int64MeasureBoundInstrument` in the metric API. (#400) +- Renamed `Release` method for bound instruments in the metric API to `Unbind`. (#400) +- Renamed `AcquireHandle` method for bound instruments in the metric API to `Bind`. (#400) +- Renamed the `File` option in the stdout exporter to `Writer`. (#404) +- Renamed all `Options` to `Config` for all metric exports where this wasn't already the case. + +### Fixed + +- Aggregator import path corrected. (#421) +- Correct links in README. (#368) +- The README was updated to match latest code changes in its examples. (#374) +- Don't capitalize error statements. (#375) +- Fix ignored errors. (#375) +- Fix ambiguous variable naming. (#375) +- Removed unnecessary type casting. (#375) +- Use named parameters. (#375) +- Updated release schedule. (#378) +- Correct http-stackdriver example module name. (#394) +- Removed the `http.request` span in `httptrace` package. (#397) +- Add comments in the metrics SDK (#399) +- Initialize checkpoint when creating ddsketch aggregator to prevent panic when merging into a empty one. (#402) (#403) +- Add documentation of compatible exporters in the README. (#405) +- Typo fix. (#408) +- Simplify span check logic in SDK tracer implementation. (#419) + +## [0.2.0] - 2019-12-03 + +### Added + +- Unary gRPC tracing example. (#351) +- Prometheus exporter. (#334) +- Dogstatsd metrics exporter. (#326) + +### Changed + +- Rename `MaxSumCount` aggregation to `MinMaxSumCount` and add the `Min` interface for this aggregation. (#352) +- Rename `GetMeter` to `Meter`. (#357) +- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) +- Rename `HTTPB3Propagator` to `B3Propagator`. (#355) +- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) +- Move `/global` package to `/api/global`. (#356) +- Rename `GetTracer` to `Tracer`. (#347) + +### Removed + +- `SetAttribute` from the `Span` interface in the trace API. (#361) +- `AddLink` from the `Span` interface in the trace API. (#349) +- `Link` from the `Span` interface in the trace API. (#349) + +### Fixed + +- Exclude example directories from coverage report. (#365) +- Lint make target now implements automatic fixes with `golangci-lint` before a second run to report the remaining issues. (#360) +- Drop `GO111MODULE` environment variable in Makefile as Go 1.13 is the project specified minimum version and this is environment variable is not needed for that version of Go. (#359) +- Run the race checker for all test. (#354) +- Redundant commands in the Makefile are removed. (#354) +- Split the `generate` and `lint` targets of the Makefile. (#354) +- Renames `circle-ci` target to more generic `ci` in Makefile. (#354) +- Add example Prometheus binary to gitignore. (#358) +- Support negative numbers with the `MaxSumCount`. (#335) +- Resolve race conditions in `push_test.go` identified in #339. (#340) +- Use `/usr/bin/env bash` as a shebang in scripts rather than `/bin/bash`. (#336) +- Trace benchmark now tests both `AlwaysSample` and `NeverSample`. + Previously it was testing `AlwaysSample` twice. (#325) +- Trace benchmark now uses a `[]byte` for `TraceID` to fix failing test. (#325) +- Added a trace benchmark to test variadic functions in `setAttribute` vs `setAttributes` (#325) +- The `defaultkeys` batcher was only using the encoded label set as its map key while building a checkpoint. + This allowed distinct label sets through, but any metrics sharing a label set could be overwritten or merged incorrectly. + This was corrected. (#333) + +## [0.1.2] - 2019-11-18 + +### Fixed + +- Optimized the `simplelru` map for attributes to reduce the number of allocations. (#328) +- Removed unnecessary unslicing of parameters that are already a slice. (#324) + +## [0.1.1] - 2019-11-18 + +This release contains a Metrics SDK with stdout exporter and supports basic aggregations such as counter, gauges, array, maxsumcount, and ddsketch. + +### Added + +- Metrics stdout export pipeline. (#265) +- Array aggregation for raw measure metrics. (#282) +- The core.Value now have a `MarshalJSON` method. (#281) + +### Removed + +- `WithService`, `WithResources`, and `WithComponent` methods of tracers. (#314) +- Prefix slash in `Tracer.Start()` for the Jaeger example. (#292) + +### Changed + +- Allocation in LabelSet construction to reduce GC overhead. (#318) +- `trace.WithAttributes` to append values instead of replacing (#315) +- Use a formula for tolerance in sampling tests. (#298) +- Move export types into trace and metric-specific sub-directories. (#289) +- `SpanKind` back to being based on an `int` type. (#288) + +### Fixed + +- URL to OpenTelemetry website in README. (#323) +- Name of othttp default tracer. (#321) +- `ExportSpans` for the stackdriver exporter now handles `nil` context. (#294) +- CI modules cache to correctly restore/save from/to the cache. (#316) +- Fix metric SDK race condition between `LoadOrStore` and the assignment `rec.recorder = i.meter.exporter.AggregatorFor(rec)`. (#293) +- README now reflects the new code structure introduced with these changes. (#291) +- Make the basic example work. (#279) + +## [0.1.0] - 2019-11-04 + +This is the first release of open-telemetry go library. +It contains api and sdk for trace and meter. + +### Added + +- Initial OpenTelemetry trace and metric API prototypes. +- Initial OpenTelemetry trace, metric, and export SDK packages. +- A wireframe bridge to support compatibility with OpenTracing. +- Example code for a basic, http-stackdriver, http, jaeger, and named tracer setup. +- Exporters for Jaeger, Stackdriver, and stdout. +- Propagators for binary, B3, and trace-context protocols. +- Project information and guidelines in the form of a README and CONTRIBUTING. +- Tools to build the project and a Makefile to automate the process. +- Apache-2.0 license. +- CircleCI build CI manifest files. +- CODEOWNERS file to track owners of this project. + +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...HEAD +[1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0 +[1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0 +[1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0 +[1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0 +[1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0 +[1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1 +[1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0 +[1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1 +[1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0 +[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0 +[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0 +[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0 +[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1 +[1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0 +[1.17.0/0.40.0/0.0.5]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.17.0 +[1.16.0/0.39.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0 +[1.16.0-rc.1/0.39.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0-rc.1 +[1.15.1/0.38.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1 +[1.15.0/0.38.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0 +[1.15.0-rc.2/0.38.0-rc.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.2 +[1.15.0-rc.1/0.38.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.1 +[1.14.0/0.37.0/0.0.4]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.14.0 +[1.13.0/0.36.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.13.0 +[1.12.0/0.35.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0 +[1.11.2/0.34.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.2 +[1.11.1/0.33.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.1 +[1.11.0/0.32.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.0 +[0.32.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.2 +[0.32.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.1 +[0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0 +[1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0 +[1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0 +[1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0 +[1.7.0/0.30.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.7.0 +[0.29.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.29.0 +[1.6.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.3 +[1.6.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.2 +[1.6.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.1 +[1.6.0/0.28.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.0 +[1.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.5.0 +[1.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.1 +[1.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.0 +[1.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.3.0 +[1.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.2.0 +[1.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.1.0 +[1.0.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.1 +[Metrics 0.24.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.24.0 +[1.0.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0 +[1.0.0-RC3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC3 +[1.0.0-RC2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC2 +[Experimental Metrics v0.22.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.22.0 +[1.0.0-RC1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC1 +[0.20.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.20.0 +[0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.19.0 +[0.18.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.18.0 +[0.17.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.17.0 +[0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.16.0 +[0.15.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0 +[0.14.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0 +[0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.13.0 +[0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.12.0 +[0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.11.0 +[0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0 +[0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0 +[0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0 +[0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0 +[0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0 +[0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.5.0 +[0.4.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.3 +[0.4.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.2 +[0.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.1 +[0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.0 +[0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0 +[0.2.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.3 +[0.2.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.2 +[0.2.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1.1 +[0.2.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1 +[0.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.0 +[0.1.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.2 +[0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1 +[0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0 + +[Go 1.22]: https://go.dev/doc/go1.22 +[Go 1.21]: https://go.dev/doc/go1.21 +[Go 1.20]: https://go.dev/doc/go1.20 +[Go 1.19]: https://go.dev/doc/go1.19 +[Go 1.18]: https://go.dev/doc/go1.18 + +[metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric +[metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric +[trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace + +[GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687 diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS new file mode 100644 index 000000000..202554933 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/CODEOWNERS @@ -0,0 +1,17 @@ +##################################################### +# +# List of approvers for this repository +# +##################################################### +# +# Learn about membership in OpenTelemetry community: +# https://github.com/open-telemetry/community/blob/main/community-membership.md +# +# +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# + +* @MrAlias @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu + +CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole @XSAM @dmathieu diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md new file mode 100644 index 000000000..b86572f58 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md @@ -0,0 +1,658 @@ +# Contributing to opentelemetry-go + +The Go special interest group (SIG) meets regularly. See the +OpenTelemetry +[community](https://github.com/open-telemetry/community#golang-sdk) +repo for information on this and other language SIGs. + +See the [public meeting +notes](https://docs.google.com/document/d/1E5e7Ld0NuU1iVvf-42tOBpu2VBBLYnh73GJuITGJTTU/edit) +for a summary description of past meetings. To request edit access, +join the meeting or get in touch on +[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT). + +## Development + +You can view and edit the source code by cloning this repository: + +```sh +git clone https://github.com/open-telemetry/opentelemetry-go.git +``` + +Run `make test` to run the tests instead of `go test`. + +There are some generated files checked into the repo. To make sure +that the generated files are up-to-date, run `make` (or `make +precommit` - the `precommit` target is the default). + +The `precommit` target also fixes the formatting of the code and +checks the status of the go module files. + +Additionally, there is a `codespell` target that checks for common +typos in the code. It is not run by default, but you can run it +manually with `make codespell`. It will set up a virtual environment +in `venv` and install `codespell` there. + +If after running `make precommit` the output of `git status` contains +`nothing to commit, working tree clean` then it means that everything +is up-to-date and properly formatted. + +## Pull Requests + +### How to Send Pull Requests + +Everyone is welcome to contribute code to `opentelemetry-go` via +GitHub pull requests (PRs). + +To create a new PR, fork the project in GitHub and clone the upstream +repo: + +```sh +go get -d go.opentelemetry.io/otel +``` + +(This may print some warning about "build constraints exclude all Go +files", just ignore it.) + +This will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`. You +can alternatively use `git` directly with: + +```sh +git clone https://github.com/open-telemetry/opentelemetry-go +``` + +(Note that `git clone` is *not* using the `go.opentelemetry.io/otel` name - +that name is a kind of a redirector to GitHub that `go get` can +understand, but `git` does not.) + +This would put the project in the `opentelemetry-go` directory in +current working directory. + +Enter the newly created directory and add your fork as a new remote: + +```sh +git remote add git@github.com:/opentelemetry-go +``` + +Check out a new branch, make modifications, run linters and tests, update +`CHANGELOG.md`, and push the branch to your fork: + +```sh +git checkout -b +# edit files +# update changelog +make precommit +git add -p +git commit +git push +``` + +Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull +request ID to the entry you added to `CHANGELOG.md`. + +Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request. +Rewriting Git history makes it difficult to keep track of iterations during code review. +All pull requests are squashed to a single commit upon merge to `main`. + +### How to Receive Comments + +* If the PR is not ready for review, please put `[WIP]` in the title, + tag it as `work-in-progress`, or mark it as + [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/). +* Make sure CLA is signed and CI is clear. + +### How to Get PRs Merged + +A PR is considered **ready to merge** when: + +* It has received two qualified approvals[^1]. + + This is not enforced through automation, but needs to be validated by the + maintainer merging. + * The qualified approvals need to be from [Approver]s/[Maintainer]s + affiliated with different companies. Two qualified approvals from + [Approver]s or [Maintainer]s affiliated with the same company counts as a + single qualified approval. + * PRs introducing changes that have already been discussed and consensus + reached only need one qualified approval. The discussion and resolution + needs to be linked to the PR. + * Trivial changes[^2] only need one qualified approval. + +* All feedback has been addressed. + * All PR comments and suggestions are resolved. + * All GitHub Pull Request reviews with a status of "Request changes" have + been addressed. Another review by the objecting reviewer with a different + status can be submitted to clear the original review, or the review can be + dismissed by a [Maintainer] when the issues from the original review have + been addressed. + * Any comments or reviews that cannot be resolved between the PR author and + reviewers can be submitted to the community [Approver]s and [Maintainer]s + during the weekly SIG meeting. If consensus is reached among the + [Approver]s and [Maintainer]s during the SIG meeting the objections to the + PR may be dismissed or resolved or the PR closed by a [Maintainer]. + * Any substantive changes to the PR require existing Approval reviews be + cleared unless the approver explicitly states that their approval persists + across changes. This includes changes resulting from other feedback. + [Approver]s and [Maintainer]s can help in clearing reviews and they should + be consulted if there are any questions. + +* The PR branch is up to date with the base branch it is merging into. + * To ensure this does not block the PR, it should be configured to allow + maintainers to update it. + +* It has been open for review for at least one working day. This gives people + reasonable time to review. + * Trivial changes[^2] do not have to wait for one day and may be merged with + a single [Maintainer]'s approval. + +* All required GitHub workflows have succeeded. +* Urgent fix can take exception as long as it has been actively communicated + among [Maintainer]s. + +Any [Maintainer] can merge the PR once the above criteria have been met. + +[^1]: A qualified approval is a GitHub Pull Request review with "Approve" + status from an OpenTelemetry Go [Approver] or [Maintainer]. +[^2]: Trivial changes include: typo corrections, cosmetic non-substantive + changes, documentation corrections or updates, dependency updates, etc. + +## Design Choices + +As with other OpenTelemetry clients, opentelemetry-go follows the +[OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel). + +It's especially valuable to read through the [library +guidelines](https://opentelemetry.io/docs/specs/otel/library-guidelines). + +### Focus on Capabilities, Not Structure Compliance + +OpenTelemetry is an evolving specification, one where the desires and +use cases are clear, but the method to satisfy those uses cases are +not. + +As such, Contributions should provide functionality and behavior that +conforms to the specification, but the interface and structure is +flexible. + +It is preferable to have contributions follow the idioms of the +language rather than conform to specific API names or argument +patterns in the spec. + +For a deeper discussion, see +[this](https://github.com/open-telemetry/opentelemetry-specification/issues/165). + +## Documentation + +Each (non-internal, non-test) package must be documented using +[Go Doc Comments](https://go.dev/doc/comment), +preferably in a `doc.go` file. + +Prefer using [Examples](https://pkg.go.dev/testing#hdr-Examples) +instead of putting code snippets in Go doc comments. +In some cases, you can even create [Testable Examples](https://go.dev/blog/examples). + +You can install and run a "local Go Doc site" in the following way: + + ```sh + go install golang.org/x/pkgsite/cmd/pkgsite@latest + pkgsite + ``` + +[`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric) +is an example of a very well-documented package. + +### README files + +Each (non-internal, non-test, non-documentation) package must contain a +`README.md` file containing at least a title, and a `pkg.go.dev` badge. + +The README should not be a repetition of Go doc comments. + +You can verify the presence of all README files with the `make verify-readmes` +command. + +## Style Guide + +One of the primary goals of this project is that it is actually used by +developers. With this goal in mind the project strives to build +user-friendly and idiomatic Go code adhering to the Go community's best +practices. + +For a non-comprehensive but foundational overview of these best practices +the [Effective Go](https://golang.org/doc/effective_go.html) documentation +is an excellent starting place. + +As a convenience for developers building this project the `make precommit` +will format, lint, validate, and in some cases fix the changes you plan to +submit. This check will need to pass for your changes to be able to be +merged. + +In addition to idiomatic Go, the project has adopted certain standards for +implementations of common patterns. These standards should be followed as a +default, and if they are not followed documentation needs to be included as +to the reasons why. + +### Configuration + +When creating an instantiation function for a complex `type T struct`, it is +useful to allow variable number of options to be applied. However, the strong +type system of Go restricts the function design options. There are a few ways +to solve this problem, but we have landed on the following design. + +#### `config` + +Configuration should be held in a `struct` named `config`, or prefixed with +specific type name this Configuration applies to if there are multiple +`config` in the package. This type must contain configuration options. + +```go +// config contains configuration options for a thing. +type config struct { + // options ... +} +``` + +In general the `config` type will not need to be used externally to the +package and should be unexported. If, however, it is expected that the user +will likely want to build custom options for the configuration, the `config` +should be exported. Please, include in the documentation for the `config` +how the user can extend the configuration. + +It is important that internal `config` are not shared across package boundaries. +Meaning a `config` from one package should not be directly used by another. The +one exception is the API packages. The configs from the base API, eg. +`go.opentelemetry.io/otel/trace.TracerConfig` and +`go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed +by the SDK therefore it is expected that these are exported. + +When a config is exported we want to maintain forward and backward +compatibility, to achieve this no fields should be exported but should +instead be accessed by methods. + +Optionally, it is common to include a `newConfig` function (with the same +naming scheme). This function wraps any defaults setting and looping over +all options to create a configured `config`. + +```go +// newConfig returns an appropriately configured config. +func newConfig(options ...Option) config { + // Set default values for config. + config := config{/* […] */} + for _, option := range options { + config = option.apply(config) + } + // Perform any validation here. + return config +} +``` + +If validation of the `config` options is also performed this can return an +error as well that is expected to be handled by the instantiation function +or propagated to the user. + +Given the design goal of not having the user need to work with the `config`, +the `newConfig` function should also be unexported. + +#### `Option` + +To set the value of the options a `config` contains, a corresponding +`Option` interface type should be used. + +```go +type Option interface { + apply(config) config +} +``` + +Having `apply` unexported makes sure that it will not be used externally. +Moreover, the interface becomes sealed so the user cannot easily implement +the interface on its own. + +The `apply` method should return a modified version of the passed config. +This approach, instead of passing a pointer, is used to prevent the config from being allocated to the heap. + +The name of the interface should be prefixed in the same way the +corresponding `config` is (if at all). + +#### Options + +All user configurable options for a `config` must have a related unexported +implementation of the `Option` interface and an exported configuration +function that wraps this implementation. + +The wrapping function name should be prefixed with `With*` (or in the +special case of a boolean options `Without*`) and should have the following +function signature. + +```go +func With*(…) Option { … } +``` + +##### `bool` Options + +```go +type defaultFalseOption bool + +func (o defaultFalseOption) apply(c config) config { + c.Bool = bool(o) + return c +} + +// WithOption sets a T to have an option included. +func WithOption() Option { + return defaultFalseOption(true) +} +``` + +```go +type defaultTrueOption bool + +func (o defaultTrueOption) apply(c config) config { + c.Bool = bool(o) + return c +} + +// WithoutOption sets a T to have Bool option excluded. +func WithoutOption() Option { + return defaultTrueOption(false) +} +``` + +##### Declared Type Options + +```go +type myTypeOption struct { + MyType MyType +} + +func (o myTypeOption) apply(c config) config { + c.MyType = o.MyType + return c +} + +// WithMyType sets T to have include MyType. +func WithMyType(t MyType) Option { + return myTypeOption{t} +} +``` + +##### Functional Options + +```go +type optionFunc func(config) config + +func (fn optionFunc) apply(c config) config { + return fn(c) +} + +// WithMyType sets t as MyType. +func WithMyType(t MyType) Option { + return optionFunc(func(c config) config { + c.MyType = t + return c + }) +} +``` + +#### Instantiation + +Using this configuration pattern to configure instantiation with a `NewT` +function. + +```go +func NewT(options ...Option) T {…} +``` + +Any required parameters can be declared before the variadic `options`. + +#### Dealing with Overlap + +Sometimes there are multiple complex `struct` that share common +configuration and also have distinct configuration. To avoid repeated +portions of `config`s, a common `config` can be used with the union of +options being handled with the `Option` interface. + +For example. + +```go +// config holds options for all animals. +type config struct { + Weight float64 + Color string + MaxAltitude float64 +} + +// DogOption apply Dog specific options. +type DogOption interface { + applyDog(config) config +} + +// BirdOption apply Bird specific options. +type BirdOption interface { + applyBird(config) config +} + +// Option apply options for all animals. +type Option interface { + BirdOption + DogOption +} + +type weightOption float64 + +func (o weightOption) applyDog(c config) config { + c.Weight = float64(o) + return c +} + +func (o weightOption) applyBird(c config) config { + c.Weight = float64(o) + return c +} + +func WithWeight(w float64) Option { return weightOption(w) } + +type furColorOption string + +func (o furColorOption) applyDog(c config) config { + c.Color = string(o) + return c +} + +func WithFurColor(c string) DogOption { return furColorOption(c) } + +type maxAltitudeOption float64 + +func (o maxAltitudeOption) applyBird(c config) config { + c.MaxAltitude = float64(o) + return c +} + +func WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) } + +func NewDog(name string, o ...DogOption) Dog {…} +func NewBird(name string, o ...BirdOption) Bird {…} +``` + +### Interfaces + +To allow other developers to better comprehend the code, it is important +to ensure it is sufficiently documented. One simple measure that contributes +to this aim is self-documenting by naming method parameters. Therefore, +where appropriate, methods of every exported interface type should have +their parameters appropriately named. + +#### Interface Stability + +All exported stable interfaces that include the following warning in their +documentation are allowed to be extended with additional methods. + +> Warning: methods may be added to this interface in minor releases. + +These interfaces are defined by the OpenTelemetry specification and will be +updated as the specification evolves. + +Otherwise, stable interfaces MUST NOT be modified. + +#### How to Change Specification Interfaces + +When an API change must be made, we will update the SDK with the new method one +release before the API change. This will allow the SDK one version before the +API change to work seamlessly with the new API. + +If an incompatible version of the SDK is used with the new API the application +will fail to compile. + +#### How Not to Change Specification Interfaces + +We have explored using a v2 of the API to change interfaces and found that there +was no way to introduce a v2 and have it work seamlessly with the v1 of the API. +Problems happened with libraries that upgraded to v2 when an application did not, +and would not produce any telemetry. + +More detail of the approaches considered and their limitations can be found in +the [Use a V2 API to evolve interfaces](https://github.com/open-telemetry/opentelemetry-go/issues/3920) +issue. + +#### How to Change Other Interfaces + +If new functionality is needed for an interface that cannot be changed it MUST +be added by including an additional interface. That added interface can be a +simple interface for the specific functionality that you want to add or it can +be a super-set of the original interface. For example, if you wanted to a +`Close` method to the `Exporter` interface: + +```go +type Exporter interface { + Export() +} +``` + +A new interface, `Closer`, can be added: + +```go +type Closer interface { + Close() +} +``` + +Code that is passed the `Exporter` interface can now check to see if the passed +value also satisfies the new interface. E.g. + +```go +func caller(e Exporter) { + /* ... */ + if c, ok := e.(Closer); ok { + c.Close() + } + /* ... */ +} +``` + +Alternatively, a new type that is the super-set of an `Exporter` can be created. + +```go +type ClosingExporter struct { + Exporter + Close() +} +``` + +This new type can be used similar to the simple interface above in that a +passed `Exporter` type can be asserted to satisfy the `ClosingExporter` type +and the `Close` method called. + +This super-set approach can be useful if there is explicit behavior that needs +to be coupled with the original type and passed as a unified type to a new +function, but, because of this coupling, it also limits the applicability of +the added functionality. If there exist other interfaces where this +functionality should be added, each one will need their own super-set +interfaces and will duplicate the pattern. For this reason, the simple targeted +interface that defines the specific functionality should be preferred. + +See also: +[Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces). + +### Testing + +The tests should never leak goroutines. + +Use the term `ConcurrentSafe` in the test name when it aims to verify the +absence of race conditions. + +### Internal packages + +The use of internal packages should be scoped to a single module. A sub-module +should never import from a parent internal package. This creates a coupling +between the two modules where a user can upgrade the parent without the child +and if the internal package API has changed it will fail to upgrade[^3]. + +There are two known exceptions to this rule: + +- `go.opentelemetry.io/otel/internal/global` + - This package manages global state for all of opentelemetry-go. It needs to + be a single package in order to ensure the uniqueness of the global state. +- `go.opentelemetry.io/otel/internal/baggage` + - This package provides values in a `context.Context` that need to be + recognized by `go.opentelemetry.io/otel/baggage` and + `go.opentelemetry.io/otel/bridge/opentracing` but remain private. + +If you have duplicate code in multiple modules, make that code into a Go +template stored in `go.opentelemetry.io/otel/internal/shared` and use [gotmpl] +to render the templates in the desired locations. See [#4404] for an example of +this. + +[^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548 + +### Ignoring context cancellation + +OpenTelemetry API implementations need to ignore the cancellation of the context that are +passed when recording a value (e.g. starting a span, recording a measurement, emitting a log). +Recording methods should not return an error describing the cancellation state of the context +when they complete, nor should they abort any work. + +This rule may not apply if the OpenTelemetry specification defines a timeout mechanism for +the method. In that case the context cancellation can be used for the timeout with the +restriction that this behavior is documented for the method. Otherwise, timeouts +are expected to be handled by the user calling the API, not the implementation. + +Stoppage of the telemetry pipeline is handled by calling the appropriate `Shutdown` method +of a provider. It is assumed the context passed from a user is not used for this purpose. + +Outside of the direct recording of telemetry from the API (e.g. exporting telemetry, +force flushing telemetry, shutting down a signal provider) the context cancellation +should be honored. This means all work done on behalf of the user provided context +should be canceled. + +## Approvers and Maintainers + +### Approvers + +- [Chester Cheung](https://github.com/hanyuancheung), Tencent + +### Maintainers + +- [Aaron Clawson](https://github.com/MadVikingGod), LightStep +- [Damien Mathieu](https://github.com/dmathieu), Elastic +- [David Ashpole](https://github.com/dashpole), Google +- [Robert Pająk](https://github.com/pellared), Splunk +- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics +- [Tyler Yahn](https://github.com/MrAlias), Splunk + +### Emeritus + +- [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb +- [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep +- [Josh MacDonald](https://github.com/jmacd), LightStep +- [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Evan Torrie](https://github.com/evantorrie), Yahoo + +### Become an Approver or a Maintainer + +See the [community membership document in OpenTelemetry community +repo](https://github.com/open-telemetry/community/blob/main/community-membership.md). + +[Approver]: #approvers +[Maintainer]: #maintainers +[gotmpl]: https://pkg.go.dev/go.opentelemetry.io/build-tools/gotmpl +[#4404]: https://github.com/open-telemetry/opentelemetry-go/pull/4404 diff --git a/vendor/go.opentelemetry.io/otel/LICENSE b/vendor/go.opentelemetry.io/otel/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile new file mode 100644 index 000000000..f33619f76 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -0,0 +1,301 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +TOOLS_MOD_DIR := ./internal/tools + +ALL_DOCS := $(shell find . -name '*.md' -type f | sort) +ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) +OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)) +ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort) + +GO = go +TIMEOUT = 60 + +.DEFAULT_GOAL := precommit + +.PHONY: precommit ci +precommit: generate license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default +ci: generate license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage + +# Tools + +TOOLS = $(CURDIR)/.tools + +$(TOOLS): + @mkdir -p $@ +$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS) + cd $(TOOLS_MOD_DIR) && \ + $(GO) build -o $@ $(PACKAGE) + +MULTIMOD = $(TOOLS)/multimod +$(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod + +SEMCONVGEN = $(TOOLS)/semconvgen +$(TOOLS)/semconvgen: PACKAGE=go.opentelemetry.io/build-tools/semconvgen + +CROSSLINK = $(TOOLS)/crosslink +$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink + +SEMCONVKIT = $(TOOLS)/semconvkit +$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit + +GOLANGCI_LINT = $(TOOLS)/golangci-lint +$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint + +MISSPELL = $(TOOLS)/misspell +$(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell + +GOCOVMERGE = $(TOOLS)/gocovmerge +$(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge + +STRINGER = $(TOOLS)/stringer +$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer + +PORTO = $(TOOLS)/porto +$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto + +GOJQ = $(TOOLS)/gojq +$(TOOLS)/gojq: PACKAGE=github.com/itchyny/gojq/cmd/gojq + +GOTMPL = $(TOOLS)/gotmpl +$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl + +GORELEASE = $(TOOLS)/gorelease +$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease + +GOVULNCHECK = $(TOOLS)/govulncheck +$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck + +.PHONY: tools +tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) + +# Virtualized python tools via docker + +# The directory where the virtual environment is created. +VENVDIR := venv + +# The directory where the python tools are installed. +PYTOOLS := $(VENVDIR)/bin + +# The pip executable in the virtual environment. +PIP := $(PYTOOLS)/pip + +# The directory in the docker image where the current directory is mounted. +WORKDIR := /workdir + +# The python image to use for the virtual environment. +PYTHONIMAGE := python:3.11.3-slim-bullseye + +# Run the python image with the current directory mounted. +DOCKERPY := docker run --rm -v "$(CURDIR):$(WORKDIR)" -w $(WORKDIR) $(PYTHONIMAGE) + +# Create a virtual environment for Python tools. +$(PYTOOLS): +# The `--upgrade` flag is needed to ensure that the virtual environment is +# created with the latest pip version. + @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade pip" + +# Install python packages into the virtual environment. +$(PYTOOLS)/%: $(PYTOOLS) + @$(DOCKERPY) $(PIP) install -r requirements.txt + +CODESPELL = $(PYTOOLS)/codespell +$(CODESPELL): PACKAGE=codespell + +# Generate + +.PHONY: generate +generate: go-generate vanity-import-fix + +.PHONY: go-generate +go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%) +go-generate/%: DIR=$* +go-generate/%: $(STRINGER) $(GOTMPL) + @echo "$(GO) generate $(DIR)/..." \ + && cd $(DIR) \ + && PATH="$(TOOLS):$${PATH}" $(GO) generate ./... + +.PHONY: vanity-import-fix +vanity-import-fix: $(PORTO) + @$(PORTO) --include-internal -w . + +# Generate go.work file for local development. +.PHONY: go-work +go-work: $(CROSSLINK) + $(CROSSLINK) work --root=$(shell pwd) + +# Build + +.PHONY: build + +build: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%) +build/%: DIR=$* +build/%: + @echo "$(GO) build $(DIR)/..." \ + && cd $(DIR) \ + && $(GO) build ./... + +build-tests/%: DIR=$* +build-tests/%: + @echo "$(GO) build tests $(DIR)/..." \ + && cd $(DIR) \ + && $(GO) list ./... \ + | grep -v third_party \ + | xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null + +# Tests + +TEST_TARGETS := test-default test-bench test-short test-verbose test-race +.PHONY: $(TEST_TARGETS) test +test-default test-race: ARGS=-race +test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=. +test-short: ARGS=-short +test-verbose: ARGS=-v -race +$(TEST_TARGETS): test +test: $(OTEL_GO_MOD_DIRS:%=test/%) +test/%: DIR=$* +test/%: + @echo "$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/..." \ + && cd $(DIR) \ + && $(GO) list ./... \ + | grep -v third_party \ + | xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS) + +COVERAGE_MODE = atomic +COVERAGE_PROFILE = coverage.out +.PHONY: test-coverage +test-coverage: $(GOCOVMERGE) + @set -e; \ + printf "" > coverage.txt; \ + for dir in $(ALL_COVERAGE_MOD_DIRS); do \ + echo "$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \ + (cd "$${dir}" && \ + $(GO) list ./... \ + | grep -v third_party \ + | grep -v 'semconv/v.*' \ + | xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \ + $(GO) tool cover -html=coverage.out -o coverage.html); \ + done; \ + $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt + +# Adding a directory will include all benchmarks in that directory if a filter is not specified. +BENCHMARK_TARGETS := sdk/trace +.PHONY: benchmark +benchmark: $(BENCHMARK_TARGETS:%=benchmark/%) +BENCHMARK_FILTER = . +# You can override the filter for a particular directory by adding a rule here. +benchmark/sdk/trace: BENCHMARK_FILTER = SpanWithAttributes_8/AlwaysSample +benchmark/%: + @echo "$(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(BENCHMARK_FILTER) $*..." \ + && cd $* \ + $(foreach filter, $(BENCHMARK_FILTER), && $(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(filter)) + +.PHONY: golangci-lint golangci-lint-fix +golangci-lint-fix: ARGS=--fix +golangci-lint-fix: golangci-lint +golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%) +golangci-lint/%: DIR=$* +golangci-lint/%: $(GOLANGCI_LINT) + @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \ + && cd $(DIR) \ + && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS) + +.PHONY: crosslink +crosslink: $(CROSSLINK) + @echo "Updating intra-repository dependencies in all go modules" \ + && $(CROSSLINK) --root=$(shell pwd) --prune + +.PHONY: go-mod-tidy +go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%) +go-mod-tidy/%: DIR=$* +go-mod-tidy/%: crosslink + @echo "$(GO) mod tidy in $(DIR)" \ + && cd $(DIR) \ + && $(GO) mod tidy -compat=1.21 + +.PHONY: lint-modules +lint-modules: go-mod-tidy + +.PHONY: lint +lint: misspell lint-modules golangci-lint govulncheck + +.PHONY: vanity-import-check +vanity-import-check: $(PORTO) + @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 ) + +.PHONY: misspell +misspell: $(MISSPELL) + @$(MISSPELL) -w $(ALL_DOCS) + +.PHONY: govulncheck +govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%) +govulncheck/%: DIR=$* +govulncheck/%: $(GOVULNCHECK) + @echo "govulncheck ./... in $(DIR)" \ + && cd $(DIR) \ + && $(GOVULNCHECK) ./... + +.PHONY: codespell +codespell: $(CODESPELL) + @$(DOCKERPY) $(CODESPELL) + +.PHONY: license-check +license-check: + @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \ + awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \ + done); \ + if [ -n "$${licRes}" ]; then \ + echo "license header checking failed:"; echo "$${licRes}"; \ + exit 1; \ + fi + +.PHONY: check-clean-work-tree +check-clean-work-tree: + @if ! git diff --quiet; then \ + echo; \ + echo 'Working tree is not clean, did you forget to run "make precommit"?'; \ + echo; \ + git status; \ + exit 1; \ + fi + +SEMCONVPKG ?= "semconv/" +.PHONY: semconv-generate +semconv-generate: $(SEMCONVGEN) $(SEMCONVKIT) + [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 ) + [ "$(OTEL_SEMCONV_REPO)" ] || ( echo "OTEL_SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 ) + $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=attribute_group -p conventionType=trace -f attribute_group.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" + $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=metric -f metric.go -t "$(SEMCONVPKG)/metric_template.j2" -s "$(TAG)" + $(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)" + +.PHONY: gorelease +gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%) +gorelease/%: DIR=$* +gorelease/%:| $(GORELEASE) + @echo "gorelease in $(DIR):" \ + && cd $(DIR) \ + && $(GORELEASE) \ + || echo "" + +.PHONY: verify-mods +verify-mods: $(MULTIMOD) + $(MULTIMOD) verify + +.PHONY: prerelease +prerelease: verify-mods + @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) + $(MULTIMOD) prerelease -m ${MODSET} + +COMMIT ?= "HEAD" +.PHONY: add-tags +add-tags: verify-mods + @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) + $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} + +.PHONY: lint-markdown +lint-markdown: + docker run -v "$(CURDIR):$(WORKDIR)" avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md + +.PHONY: verify-readmes +verify-readmes: + ./verify_readmes.sh diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md new file mode 100644 index 000000000..5a8909317 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/README.md @@ -0,0 +1,109 @@ +# OpenTelemetry-Go + +[![CI](https://github.com/open-telemetry/opentelemetry-go/workflows/ci/badge.svg)](https://github.com/open-telemetry/opentelemetry-go/actions?query=workflow%3Aci+branch%3Amain) +[![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-go/coverage.svg?branch=main)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main) +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel) +[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel) +[![Slack](https://img.shields.io/badge/slack-@cncf/otel--go-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01NPAXACKT) + +OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/). +It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms. + +## Project Status + +| Signal | Status | +|---------|--------------------| +| Traces | Stable | +| Metrics | Stable | +| Logs | Beta[^1] | + +Progress and status specific to this repository is tracked in our +[project boards](https://github.com/open-telemetry/opentelemetry-go/projects) +and +[milestones](https://github.com/open-telemetry/opentelemetry-go/milestones). + +Project versioning information and stability guarantees can be found in the +[versioning documentation](VERSIONING.md). + +[^1]: https://github.com/orgs/open-telemetry/projects/43 + +### Compatibility + +OpenTelemetry-Go ensures compatibility with the current supported versions of +the [Go language](https://golang.org/doc/devel/release#policy): + +> Each major Go release is supported until there are two newer major releases. +> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. + +For versions of Go that are no longer supported upstream, opentelemetry-go will +stop ensuring compatibility with these versions in the following manner: + +- A minor release of opentelemetry-go will be made to add support for the new + supported release of Go. +- The following minor release of opentelemetry-go will remove compatibility + testing for the oldest (now archived upstream) version of Go. This, and + future, releases of opentelemetry-go may include features only supported by + the currently supported versions of Go. + +Currently, this project supports the following environments. + +| OS | Go Version | Architecture | +|---------|------------|--------------| +| Ubuntu | 1.22 | amd64 | +| Ubuntu | 1.21 | amd64 | +| Ubuntu | 1.22 | 386 | +| Ubuntu | 1.21 | 386 | +| Linux | 1.22 | arm64 | +| Linux | 1.21 | arm64 | +| MacOS | 1.22 | amd64 | +| MacOS | 1.21 | amd64 | +| Windows | 1.22 | amd64 | +| Windows | 1.21 | amd64 | +| Windows | 1.22 | 386 | +| Windows | 1.21 | 386 | + +While this project should work for other systems, no compatibility guarantees +are made for those systems currently. + +## Getting Started + +You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/languages/go/getting-started/). + +OpenTelemetry's goal is to provide a single set of APIs to capture distributed +traces and metrics from your application and send them to an observability +platform. This project allows you to do just that for applications written in +Go. There are two steps to this process: instrument your application, and +configure an exporter. + +### Instrumentation + +To start capturing distributed traces and metric events from your application +it first needs to be instrumented. The easiest way to do this is by using an +instrumentation library for your code. Be sure to check out [the officially +supported instrumentation +libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation). + +If you need to extend the telemetry an instrumentation library provides or want +to build your own instrumentation for your application directly you will need +to use the +[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel) +package. The included [examples](./example/) are a good way to see some +practical uses of this process. + +### Export + +Now that your application is instrumented to collect telemetry, it needs an +export pipeline to send that telemetry to an observability platform. + +All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters). + +| Exporter | Logs | Metrics | Traces | +|---------------------------------------|:----:|:-------:|:------:| +| [OTLP](./exporters/otlp/) | ✓ | ✓ | ✓ | +| [Prometheus](./exporters/prometheus/) | | ✓ | | +| [stdout](./exporters/stdout/) | ✓ | ✓ | ✓ | +| [Zipkin](./exporters/zipkin/) | | | ✓ | + +## Contributing + +See the [contributing documentation](CONTRIBUTING.md). diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md new file mode 100644 index 000000000..940f57f3d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/RELEASING.md @@ -0,0 +1,145 @@ +# Release Process + +## Semantic Convention Generation + +New versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated. +The `semconv-generate` make target is used for this. + +1. Checkout a local copy of the [OpenTelemetry Semantic Conventions] to the desired release tag. +2. Pull the latest `otel/semconvgen` image: `docker pull otel/semconvgen:latest` +3. Run the `make semconv-generate ...` target from this repository. + +For example, + +```sh +export TAG="v1.21.0" # Change to the release version you are generating. +export OTEL_SEMCONV_REPO="/absolute/path/to/opentelemetry/semantic-conventions" +docker pull otel/semconvgen:latest +make semconv-generate # Uses the exported TAG and OTEL_SEMCONV_REPO. +``` + +This should create a new sub-package of [`semconv`](./semconv). +Ensure things look correct before submitting a pull request to include the addition. + +## Breaking changes validation + +You can run `make gorelease` that runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes done in the public API. + +You can check/report problems with `gorelease` [here](https://golang.org/issues/26420). + +## Verify changes for contrib repository + +If the changes in the main repository are going to affect the contrib repository, it is important to verify that the changes are compatible with the contrib repository. + +Follow [the steps](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md#verify-otel-changes) in the contrib repository to verify OTel changes. + +## Pre-Release + +First, decide which module sets will be released and update their versions +in `versions.yaml`. Commit this change to a new branch. + +Update go.mod for submodules to depend on the new release which will happen in the next step. + +1. Run the `prerelease` make target. It creates a branch + `prerelease__` that will contain all release changes. + + ``` + make prerelease MODSET= + ``` + +2. Verify the changes. + + ``` + git diff ...prerelease__ + ``` + + This should have changed the version for all modules to be ``. + If these changes look correct, merge them into your pre-release branch: + + ```go + git merge prerelease__ + ``` + +3. Update the [Changelog](./CHANGELOG.md). + - Make sure all relevant changes for this release are included and are in language that non-contributors to the project can understand. + To verify this, you can look directly at the commits since the ``. + + ``` + git --no-pager log --pretty=oneline "..HEAD" + ``` + + - Move all the `Unreleased` changes into a new section following the title scheme (`[] - `). + - Update all the appropriate links at the bottom. + +4. Push the changes to upstream and create a Pull Request on GitHub. + Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description. + +## Tag + +Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit. + +***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step! +Failure to do so will leave things in a broken state. As long as you do not +change `versions.yaml` between pre-release and this step, things should be fine. + +***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189). +It is critical you make sure the version you push upstream is correct. +[Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331). + +1. For each module set that will be released, run the `add-tags` make target + using the `` of the commit on the main branch for the merged Pull Request. + + ``` + make add-tags MODSET= COMMIT= + ``` + + It should only be necessary to provide an explicit `COMMIT` value if the + current `HEAD` of your working directory is not the correct commit. + +2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`). + Make sure you push all sub-modules as well. + + ``` + git push upstream + git push upstream + ... + ``` + +## Release + +Finally create a Release for the new `` on GitHub. +The release body should include all the release notes from the Changelog for this release. + +## Verify Examples + +After releasing verify that examples build outside of the repository. + +``` +./verify_examples.sh +``` + +The script copies examples into a different directory removes any `replace` declarations in `go.mod` and builds them. +This ensures they build with the published release, not the local copy. + +## Post-Release + +### Contrib Repository + +Once verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md) that uses this release. + +### Website Documentation + +Update the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/languages/go]. +Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate. + +[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions +[Go instrumentation documentation]: https://opentelemetry.io/docs/languages/go/ +[content/en/docs/languages/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/languages/go + +### Demo Repository + +Bump the dependencies in the following Go services: + +- [`accountingservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/accountingservice) +- [`checkoutservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/checkoutservice) +- [`productcatalogservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/productcatalogservice) diff --git a/vendor/go.opentelemetry.io/otel/VERSIONING.md b/vendor/go.opentelemetry.io/otel/VERSIONING.md new file mode 100644 index 000000000..412f1e362 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/VERSIONING.md @@ -0,0 +1,224 @@ +# Versioning + +This document describes the versioning policy for this repository. This policy +is designed so the following goals can be achieved. + +**Users are provided a codebase of value that is stable and secure.** + +## Policy + +* Versioning of this project will be idiomatic of a Go project using [Go + modules](https://github.com/golang/go/wiki/Modules). + * [Semantic import + versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) + will be used. + * Versions will comply with [semver + 2.0](https://semver.org/spec/v2.0.0.html) with the following exceptions. + * New methods may be added to exported API interfaces. All exported + interfaces that fall within this exception will include the following + paragraph in their public documentation. + + > Warning: methods may be added to this interface in minor releases. + + * If a module is version `v2` or higher, the major version of the module + must be included as a `/vN` at the end of the module paths used in + `go.mod` files (e.g., `module go.opentelemetry.io/otel/v2`, `require + go.opentelemetry.io/otel/v2 v2.0.1`) and in the package import path + (e.g., `import "go.opentelemetry.io/otel/v2/trace"`). This includes the + paths used in `go get` commands (e.g., `go get + go.opentelemetry.io/otel/v2@v2.0.1`. Note there is both a `/v2` and a + `@v2.0.1` in that example. One way to think about it is that the module + name now includes the `/v2`, so include `/v2` whenever you are using the + module name). + * If a module is version `v0` or `v1`, do not include the major version in + either the module path or the import path. + * Modules will be used to encapsulate signals and components. + * Experimental modules still under active development will be versioned at + `v0` to imply the stability guarantee defined by + [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). + + > Major version zero (0.y.z) is for initial development. Anything MAY + > change at any time. The public API SHOULD NOT be considered stable. + + * Mature modules for which we guarantee a stable public API will be versioned + with a major version greater than `v0`. + * The decision to make a module stable will be made on a case-by-case + basis by the maintainers of this project. + * Experimental modules will start their versioning at `v0.0.0` and will + increment their minor version when backwards incompatible changes are + released and increment their patch version when backwards compatible + changes are released. + * All stable modules that use the same major version number will use the + same entire version number. + * Stable modules may be released with an incremented minor or patch + version even though that module has not been changed, but rather so + that it will remain at the same version as other stable modules that + did undergo change. + * When an experimental module becomes stable a new stable module version + will be released and will include this now stable module. The new + stable module version will be an increment of the minor version number + and will be applied to all existing stable modules as well as the newly + stable module being released. +* Versioning of the associated [contrib + repository](https://github.com/open-telemetry/opentelemetry-go-contrib) of + this project will be idiomatic of a Go project using [Go + modules](https://github.com/golang/go/wiki/Modules). + * [Semantic import + versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) + will be used. + * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html). + * If a module is version `v2` or higher, the + major version of the module must be included as a `/vN` at the end of the + module paths used in `go.mod` files (e.g., `module + go.opentelemetry.io/contrib/instrumentation/host/v2`, `require + go.opentelemetry.io/contrib/instrumentation/host/v2 v2.0.1`) and in the + package import path (e.g., `import + "go.opentelemetry.io/contrib/instrumentation/host/v2"`). This includes + the paths used in `go get` commands (e.g., `go get + go.opentelemetry.io/contrib/instrumentation/host/v2@v2.0.1`. Note there + is both a `/v2` and a `@v2.0.1` in that example. One way to think about + it is that the module name now includes the `/v2`, so include `/v2` + whenever you are using the module name). + * If a module is version `v0` or `v1`, do not include the major version + in either the module path or the import path. + * In addition to public APIs, telemetry produced by stable instrumentation + will remain stable and backwards compatible. This is to avoid breaking + alerts and dashboard. + * Modules will be used to encapsulate instrumentation, detectors, exporters, + propagators, and any other independent sets of related components. + * Experimental modules still under active development will be versioned at + `v0` to imply the stability guarantee defined by + [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). + + > Major version zero (0.y.z) is for initial development. Anything MAY + > change at any time. The public API SHOULD NOT be considered stable. + + * Mature modules for which we guarantee a stable public API and telemetry will + be versioned with a major version greater than `v0`. + * Experimental modules will start their versioning at `v0.0.0` and will + increment their minor version when backwards incompatible changes are + released and increment their patch version when backwards compatible + changes are released. + * Stable contrib modules cannot depend on experimental modules from this + project. + * All stable contrib modules of the same major version with this project + will use the same entire version as this project. + * Stable modules may be released with an incremented minor or patch + version even though that module's code has not been changed. Instead + the only change that will have been included is to have updated that + modules dependency on this project's stable APIs. + * When an experimental module in contrib becomes stable a new stable + module version will be released and will include this now stable + module. The new stable module version will be an increment of the minor + version number and will be applied to all existing stable contrib + modules, this project's modules, and the newly stable module being + released. + * Contrib modules will be kept up to date with this project's releases. + * Due to the dependency contrib modules will implicitly have on this + project's modules the release of stable contrib modules to match the + released version number will be staggered after this project's release. + There is no explicit time guarantee for how long after this projects + release the contrib release will be. Effort should be made to keep them + as close in time as possible. + * No additional stable release in this project can be made until the + contrib repository has a matching stable release. + * No release can be made in the contrib repository after this project's + stable release except for a stable release of the contrib repository. +* GitHub releases will be made for all releases. +* Go modules will be made available at Go package mirrors. + +## Example Versioning Lifecycle + +To better understand the implementation of the above policy the following +example is provided. This project is simplified to include only the following +modules and their versions: + +* `otel`: `v0.14.0` +* `otel/trace`: `v0.14.0` +* `otel/metric`: `v0.14.0` +* `otel/baggage`: `v0.14.0` +* `otel/sdk/trace`: `v0.14.0` +* `otel/sdk/metric`: `v0.14.0` + +These modules have been developed to a point where the `otel/trace`, +`otel/baggage`, and `otel/sdk/trace` modules have reached a point that they +should be considered for a stable release. The `otel/metric` and +`otel/sdk/metric` are still under active development and the `otel` module +depends on both `otel/trace` and `otel/metric`. + +The `otel` package is refactored to remove its dependencies on `otel/metric` so +it can be released as stable as well. With that done the following release +candidates are made: + +* `otel`: `v1.0.0-RC1` +* `otel/trace`: `v1.0.0-RC1` +* `otel/baggage`: `v1.0.0-RC1` +* `otel/sdk/trace`: `v1.0.0-RC1` + +The `otel/metric` and `otel/sdk/metric` modules remain at `v0.14.0`. + +A few minor issues are discovered in the `otel/trace` package. These issues are +resolved with some minor, but backwards incompatible, changes and are released +as a second release candidate: + +* `otel`: `v1.0.0-RC2` +* `otel/trace`: `v1.0.0-RC2` +* `otel/baggage`: `v1.0.0-RC2` +* `otel/sdk/trace`: `v1.0.0-RC2` + +Notice that all module version numbers are incremented to adhere to our +versioning policy. + +After these release candidates have been evaluated to satisfaction, they are +released as version `v1.0.0`. + +* `otel`: `v1.0.0` +* `otel/trace`: `v1.0.0` +* `otel/baggage`: `v1.0.0` +* `otel/sdk/trace`: `v1.0.0` + +Since both the `go` utility and the Go module system support [the semantic +versioning definition of +precedence](https://semver.org/spec/v2.0.0.html#spec-item-11), this release +will correctly be interpreted as the successor to the previous release +candidates. + +Active development of this project continues. The `otel/metric` module now has +backwards incompatible changes to its API that need to be released and the +`otel/baggage` module has a minor bug fix that needs to be released. The +following release is made: + +* `otel`: `v1.0.1` +* `otel/trace`: `v1.0.1` +* `otel/metric`: `v0.15.0` +* `otel/baggage`: `v1.0.1` +* `otel/sdk/trace`: `v1.0.1` +* `otel/sdk/metric`: `v0.15.0` + +Notice that, again, all stable module versions are incremented in unison and +the `otel/sdk/metric` package, which depends on the `otel/metric` package, also +bumped its version. This bump of the `otel/sdk/metric` package makes sense +given their coupling, though it is not explicitly required by our versioning +policy. + +As we progress, the `otel/metric` and `otel/sdk/metric` packages have reached a +point where they should be evaluated for stability. The `otel` module is +reintegrated with the `otel/metric` package and the following release is made: + +* `otel`: `v1.1.0-RC1` +* `otel/trace`: `v1.1.0-RC1` +* `otel/metric`: `v1.1.0-RC1` +* `otel/baggage`: `v1.1.0-RC1` +* `otel/sdk/trace`: `v1.1.0-RC1` +* `otel/sdk/metric`: `v1.1.0-RC1` + +All the modules are evaluated and determined to a viable stable release. They +are then released as version `v1.1.0` (the minor version is incremented to +indicate the addition of new signal). + +* `otel`: `v1.1.0` +* `otel/trace`: `v1.1.0` +* `otel/metric`: `v1.1.0` +* `otel/baggage`: `v1.1.0` +* `otel/sdk/trace`: `v1.1.0` +* `otel/sdk/metric`: `v1.1.0` diff --git a/vendor/go.opentelemetry.io/otel/attribute/README.md b/vendor/go.opentelemetry.io/otel/attribute/README.md new file mode 100644 index 000000000..5b3da8f14 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/README.md @@ -0,0 +1,3 @@ +# Attribute + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/attribute)](https://pkg.go.dev/go.opentelemetry.io/otel/attribute) diff --git a/vendor/go.opentelemetry.io/otel/attribute/doc.go b/vendor/go.opentelemetry.io/otel/attribute/doc.go new file mode 100644 index 000000000..eef51ebc2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package attribute provides key and value attributes. +package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go new file mode 100644 index 000000000..318e42fca --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/encoder.go @@ -0,0 +1,135 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "bytes" + "sync" + "sync/atomic" +) + +type ( + // Encoder is a mechanism for serializing an attribute set into a specific + // string representation that supports caching, to avoid repeated + // serialization. An example could be an exporter encoding the attribute + // set into a wire representation. + Encoder interface { + // Encode returns the serialized encoding of the attribute set using + // its Iterator. This result may be cached by a attribute.Set. + Encode(iterator Iterator) string + + // ID returns a value that is unique for each class of attribute + // encoder. Attribute encoders allocate these using `NewEncoderID`. + ID() EncoderID + } + + // EncoderID is used to identify distinct Encoder + // implementations, for caching encoded results. + EncoderID struct { + value uint64 + } + + // defaultAttrEncoder uses a sync.Pool of buffers to reduce the number of + // allocations used in encoding attributes. This implementation encodes a + // comma-separated list of key=value, with '/'-escaping of '=', ',', and + // '\'. + defaultAttrEncoder struct { + // pool is a pool of attribute set builders. The buffers in this pool + // grow to a size that most attribute encodings will not allocate new + // memory. + pool sync.Pool // *bytes.Buffer + } +) + +// escapeChar is used to ensure uniqueness of the attribute encoding where +// keys or values contain either '=' or ','. Since there is no parser needed +// for this encoding and its only requirement is to be unique, this choice is +// arbitrary. Users will see these in some exporters (e.g., stdout), so the +// backslash ('\') is used as a conventional choice. +const escapeChar = '\\' + +var ( + _ Encoder = &defaultAttrEncoder{} + + // encoderIDCounter is for generating IDs for other attribute encoders. + encoderIDCounter uint64 + + defaultEncoderOnce sync.Once + defaultEncoderID = NewEncoderID() + defaultEncoderInstance *defaultAttrEncoder +) + +// NewEncoderID returns a unique attribute encoder ID. It should be called +// once per each type of attribute encoder. Preferably in init() or in var +// definition. +func NewEncoderID() EncoderID { + return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)} +} + +// DefaultEncoder returns an attribute encoder that encodes attributes in such +// a way that each escaped attribute's key is followed by an equal sign and +// then by an escaped attribute's value. All key-value pairs are separated by +// a comma. +// +// Escaping is done by prepending a backslash before either a backslash, equal +// sign or a comma. +func DefaultEncoder() Encoder { + defaultEncoderOnce.Do(func() { + defaultEncoderInstance = &defaultAttrEncoder{ + pool: sync.Pool{ + New: func() interface{} { + return &bytes.Buffer{} + }, + }, + } + }) + return defaultEncoderInstance +} + +// Encode is a part of an implementation of the AttributeEncoder interface. +func (d *defaultAttrEncoder) Encode(iter Iterator) string { + buf := d.pool.Get().(*bytes.Buffer) + defer d.pool.Put(buf) + buf.Reset() + + for iter.Next() { + i, keyValue := iter.IndexedAttribute() + if i > 0 { + _, _ = buf.WriteRune(',') + } + copyAndEscape(buf, string(keyValue.Key)) + + _, _ = buf.WriteRune('=') + + if keyValue.Value.Type() == STRING { + copyAndEscape(buf, keyValue.Value.AsString()) + } else { + _, _ = buf.WriteString(keyValue.Value.Emit()) + } + } + return buf.String() +} + +// ID is a part of an implementation of the AttributeEncoder interface. +func (*defaultAttrEncoder) ID() EncoderID { + return defaultEncoderID +} + +// copyAndEscape escapes `=`, `,` and its own escape character (`\`), +// making the default encoding unique. +func copyAndEscape(buf *bytes.Buffer, val string) { + for _, ch := range val { + switch ch { + case '=', ',', escapeChar: + _, _ = buf.WriteRune(escapeChar) + } + _, _ = buf.WriteRune(ch) + } +} + +// Valid returns true if this encoder ID was allocated by +// `NewEncoderID`. Invalid encoder IDs will not be cached. +func (id EncoderID) Valid() bool { + return id.value != 0 +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/filter.go b/vendor/go.opentelemetry.io/otel/attribute/filter.go new file mode 100644 index 000000000..be9cd922d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/filter.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +// Filter supports removing certain attributes from attribute sets. When +// the filter returns true, the attribute will be kept in the filtered +// attribute set. When the filter returns false, the attribute is excluded +// from the filtered attribute set, and the attribute instead appears in +// the removed list of excluded attributes. +type Filter func(KeyValue) bool + +// NewAllowKeysFilter returns a Filter that only allows attributes with one of +// the provided keys. +// +// If keys is empty a deny-all filter is returned. +func NewAllowKeysFilter(keys ...Key) Filter { + if len(keys) <= 0 { + return func(kv KeyValue) bool { return false } + } + + allowed := make(map[Key]struct{}) + for _, k := range keys { + allowed[k] = struct{}{} + } + return func(kv KeyValue) bool { + _, ok := allowed[kv.Key] + return ok + } +} + +// NewDenyKeysFilter returns a Filter that only allows attributes +// that do not have one of the provided keys. +// +// If keys is empty an allow-all filter is returned. +func NewDenyKeysFilter(keys ...Key) Filter { + if len(keys) <= 0 { + return func(kv KeyValue) bool { return true } + } + + forbid := make(map[Key]struct{}) + for _, k := range keys { + forbid[k] = struct{}{} + } + return func(kv KeyValue) bool { + _, ok := forbid[kv.Key] + return !ok + } +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/vendor/go.opentelemetry.io/otel/attribute/iterator.go new file mode 100644 index 000000000..f2ba89ce4 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/iterator.go @@ -0,0 +1,150 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +// Iterator allows iterating over the set of attributes in order, sorted by +// key. +type Iterator struct { + storage *Set + idx int +} + +// MergeIterator supports iterating over two sets of attributes while +// eliminating duplicate values from the combined set. The first iterator +// value takes precedence. +type MergeIterator struct { + one oneIterator + two oneIterator + current KeyValue +} + +type oneIterator struct { + iter Iterator + done bool + attr KeyValue +} + +// Next moves the iterator to the next position. Returns false if there are no +// more attributes. +func (i *Iterator) Next() bool { + i.idx++ + return i.idx < i.Len() +} + +// Label returns current KeyValue. Must be called only after Next returns +// true. +// +// Deprecated: Use Attribute instead. +func (i *Iterator) Label() KeyValue { + return i.Attribute() +} + +// Attribute returns the current KeyValue of the Iterator. It must be called +// only after Next returns true. +func (i *Iterator) Attribute() KeyValue { + kv, _ := i.storage.Get(i.idx) + return kv +} + +// IndexedLabel returns current index and attribute. Must be called only +// after Next returns true. +// +// Deprecated: Use IndexedAttribute instead. +func (i *Iterator) IndexedLabel() (int, KeyValue) { + return i.idx, i.Attribute() +} + +// IndexedAttribute returns current index and attribute. Must be called only +// after Next returns true. +func (i *Iterator) IndexedAttribute() (int, KeyValue) { + return i.idx, i.Attribute() +} + +// Len returns a number of attributes in the iterated set. +func (i *Iterator) Len() int { + return i.storage.Len() +} + +// ToSlice is a convenience function that creates a slice of attributes from +// the passed iterator. The iterator is set up to start from the beginning +// before creating the slice. +func (i *Iterator) ToSlice() []KeyValue { + l := i.Len() + if l == 0 { + return nil + } + i.idx = -1 + slice := make([]KeyValue, 0, l) + for i.Next() { + slice = append(slice, i.Attribute()) + } + return slice +} + +// NewMergeIterator returns a MergeIterator for merging two attribute sets. +// Duplicates are resolved by taking the value from the first set. +func NewMergeIterator(s1, s2 *Set) MergeIterator { + mi := MergeIterator{ + one: makeOne(s1.Iter()), + two: makeOne(s2.Iter()), + } + return mi +} + +func makeOne(iter Iterator) oneIterator { + oi := oneIterator{ + iter: iter, + } + oi.advance() + return oi +} + +func (oi *oneIterator) advance() { + if oi.done = !oi.iter.Next(); !oi.done { + oi.attr = oi.iter.Attribute() + } +} + +// Next returns true if there is another attribute available. +func (m *MergeIterator) Next() bool { + if m.one.done && m.two.done { + return false + } + if m.one.done { + m.current = m.two.attr + m.two.advance() + return true + } + if m.two.done { + m.current = m.one.attr + m.one.advance() + return true + } + if m.one.attr.Key == m.two.attr.Key { + m.current = m.one.attr // first iterator attribute value wins + m.one.advance() + m.two.advance() + return true + } + if m.one.attr.Key < m.two.attr.Key { + m.current = m.one.attr + m.one.advance() + return true + } + m.current = m.two.attr + m.two.advance() + return true +} + +// Label returns the current value after Next() returns true. +// +// Deprecated: Use Attribute instead. +func (m *MergeIterator) Label() KeyValue { + return m.current +} + +// Attribute returns the current value after Next() returns true. +func (m *MergeIterator) Attribute() KeyValue { + return m.current +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go new file mode 100644 index 000000000..d9a22c650 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/key.go @@ -0,0 +1,123 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +// Key represents the key part in key-value pairs. It's a string. The +// allowed character set in the key depends on the use of the key. +type Key string + +// Bool creates a KeyValue instance with a BOOL Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Bool(name, value). +func (k Key) Bool(v bool) KeyValue { + return KeyValue{ + Key: k, + Value: BoolValue(v), + } +} + +// BoolSlice creates a KeyValue instance with a BOOLSLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- BoolSlice(name, value). +func (k Key) BoolSlice(v []bool) KeyValue { + return KeyValue{ + Key: k, + Value: BoolSliceValue(v), + } +} + +// Int creates a KeyValue instance with an INT64 Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Int(name, value). +func (k Key) Int(v int) KeyValue { + return KeyValue{ + Key: k, + Value: IntValue(v), + } +} + +// IntSlice creates a KeyValue instance with an INT64SLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- IntSlice(name, value). +func (k Key) IntSlice(v []int) KeyValue { + return KeyValue{ + Key: k, + Value: IntSliceValue(v), + } +} + +// Int64 creates a KeyValue instance with an INT64 Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Int64(name, value). +func (k Key) Int64(v int64) KeyValue { + return KeyValue{ + Key: k, + Value: Int64Value(v), + } +} + +// Int64Slice creates a KeyValue instance with an INT64SLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Int64Slice(name, value). +func (k Key) Int64Slice(v []int64) KeyValue { + return KeyValue{ + Key: k, + Value: Int64SliceValue(v), + } +} + +// Float64 creates a KeyValue instance with a FLOAT64 Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Float64(name, value). +func (k Key) Float64(v float64) KeyValue { + return KeyValue{ + Key: k, + Value: Float64Value(v), + } +} + +// Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Float64(name, value). +func (k Key) Float64Slice(v []float64) KeyValue { + return KeyValue{ + Key: k, + Value: Float64SliceValue(v), + } +} + +// String creates a KeyValue instance with a STRING Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- String(name, value). +func (k Key) String(v string) KeyValue { + return KeyValue{ + Key: k, + Value: StringValue(v), + } +} + +// StringSlice creates a KeyValue instance with a STRINGSLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- StringSlice(name, value). +func (k Key) StringSlice(v []string) KeyValue { + return KeyValue{ + Key: k, + Value: StringSliceValue(v), + } +} + +// Defined returns true for non-empty keys. +func (k Key) Defined() bool { + return len(k) != 0 +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go new file mode 100644 index 000000000..3028f9a40 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/kv.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "fmt" +) + +// KeyValue holds a key and value pair. +type KeyValue struct { + Key Key + Value Value +} + +// Valid returns if kv is a valid OpenTelemetry attribute. +func (kv KeyValue) Valid() bool { + return kv.Key.Defined() && kv.Value.Type() != INVALID +} + +// Bool creates a KeyValue with a BOOL Value type. +func Bool(k string, v bool) KeyValue { + return Key(k).Bool(v) +} + +// BoolSlice creates a KeyValue with a BOOLSLICE Value type. +func BoolSlice(k string, v []bool) KeyValue { + return Key(k).BoolSlice(v) +} + +// Int creates a KeyValue with an INT64 Value type. +func Int(k string, v int) KeyValue { + return Key(k).Int(v) +} + +// IntSlice creates a KeyValue with an INT64SLICE Value type. +func IntSlice(k string, v []int) KeyValue { + return Key(k).IntSlice(v) +} + +// Int64 creates a KeyValue with an INT64 Value type. +func Int64(k string, v int64) KeyValue { + return Key(k).Int64(v) +} + +// Int64Slice creates a KeyValue with an INT64SLICE Value type. +func Int64Slice(k string, v []int64) KeyValue { + return Key(k).Int64Slice(v) +} + +// Float64 creates a KeyValue with a FLOAT64 Value type. +func Float64(k string, v float64) KeyValue { + return Key(k).Float64(v) +} + +// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type. +func Float64Slice(k string, v []float64) KeyValue { + return Key(k).Float64Slice(v) +} + +// String creates a KeyValue with a STRING Value type. +func String(k, v string) KeyValue { + return Key(k).String(v) +} + +// StringSlice creates a KeyValue with a STRINGSLICE Value type. +func StringSlice(k string, v []string) KeyValue { + return Key(k).StringSlice(v) +} + +// Stringer creates a new key-value pair with a passed name and a string +// value generated by the passed Stringer interface. +func Stringer(k string, v fmt.Stringer) KeyValue { + return Key(k).String(v.String()) +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go new file mode 100644 index 000000000..bff9c7fdb --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/set.go @@ -0,0 +1,431 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "cmp" + "encoding/json" + "reflect" + "slices" + "sort" +) + +type ( + // Set is the representation for a distinct attribute set. It manages an + // immutable set of attributes, with an internal cache for storing + // attribute encodings. + // + // This type will remain comparable for backwards compatibility. The + // equivalence of Sets across versions is not guaranteed to be stable. + // Prior versions may find two Sets to be equal or not when compared + // directly (i.e. ==), but subsequent versions may not. Users should use + // the Equals method to ensure stable equivalence checking. + // + // Users should also use the Distinct returned from Equivalent as a map key + // instead of a Set directly. In addition to that type providing guarantees + // on stable equivalence, it may also provide performance improvements. + Set struct { + equivalent Distinct + } + + // Distinct is a unique identifier of a Set. + // + // Distinct is designed to be ensures equivalence stability: comparisons + // will return the save value across versions. For this reason, Distinct + // should always be used as a map key instead of a Set. + Distinct struct { + iface interface{} + } + + // Sortable implements sort.Interface, used for sorting KeyValue. + // + // Deprecated: This type is no longer used. It was added as a performance + // optimization for Go < 1.21 that is no longer needed (Go < 1.21 is no + // longer supported by the module). + Sortable []KeyValue +) + +var ( + // keyValueType is used in computeDistinctReflect. + keyValueType = reflect.TypeOf(KeyValue{}) + + // emptySet is returned for empty attribute sets. + emptySet = &Set{ + equivalent: Distinct{ + iface: [0]KeyValue{}, + }, + } +) + +// EmptySet returns a reference to a Set with no elements. +// +// This is a convenience provided for optimized calling utility. +func EmptySet() *Set { + return emptySet +} + +// reflectValue abbreviates reflect.ValueOf(d). +func (d Distinct) reflectValue() reflect.Value { + return reflect.ValueOf(d.iface) +} + +// Valid returns true if this value refers to a valid Set. +func (d Distinct) Valid() bool { + return d.iface != nil +} + +// Len returns the number of attributes in this set. +func (l *Set) Len() int { + if l == nil || !l.equivalent.Valid() { + return 0 + } + return l.equivalent.reflectValue().Len() +} + +// Get returns the KeyValue at ordered position idx in this set. +func (l *Set) Get(idx int) (KeyValue, bool) { + if l == nil || !l.equivalent.Valid() { + return KeyValue{}, false + } + value := l.equivalent.reflectValue() + + if idx >= 0 && idx < value.Len() { + // Note: The Go compiler successfully avoids an allocation for + // the interface{} conversion here: + return value.Index(idx).Interface().(KeyValue), true + } + + return KeyValue{}, false +} + +// Value returns the value of a specified key in this set. +func (l *Set) Value(k Key) (Value, bool) { + if l == nil || !l.equivalent.Valid() { + return Value{}, false + } + rValue := l.equivalent.reflectValue() + vlen := rValue.Len() + + idx := sort.Search(vlen, func(idx int) bool { + return rValue.Index(idx).Interface().(KeyValue).Key >= k + }) + if idx >= vlen { + return Value{}, false + } + keyValue := rValue.Index(idx).Interface().(KeyValue) + if k == keyValue.Key { + return keyValue.Value, true + } + return Value{}, false +} + +// HasValue tests whether a key is defined in this set. +func (l *Set) HasValue(k Key) bool { + if l == nil { + return false + } + _, ok := l.Value(k) + return ok +} + +// Iter returns an iterator for visiting the attributes in this set. +func (l *Set) Iter() Iterator { + return Iterator{ + storage: l, + idx: -1, + } +} + +// ToSlice returns the set of attributes belonging to this set, sorted, where +// keys appear no more than once. +func (l *Set) ToSlice() []KeyValue { + iter := l.Iter() + return iter.ToSlice() +} + +// Equivalent returns a value that may be used as a map key. The Distinct type +// guarantees that the result will equal the equivalent. Distinct value of any +// attribute set with the same elements as this, where sets are made unique by +// choosing the last value in the input for any given key. +func (l *Set) Equivalent() Distinct { + if l == nil || !l.equivalent.Valid() { + return emptySet.equivalent + } + return l.equivalent +} + +// Equals returns true if the argument set is equivalent to this set. +func (l *Set) Equals(o *Set) bool { + return l.Equivalent() == o.Equivalent() +} + +// Encoded returns the encoded form of this set, according to encoder. +func (l *Set) Encoded(encoder Encoder) string { + if l == nil || encoder == nil { + return "" + } + + return encoder.Encode(l.Iter()) +} + +func empty() Set { + return Set{ + equivalent: emptySet.equivalent, + } +} + +// NewSet returns a new Set. See the documentation for +// NewSetWithSortableFiltered for more details. +// +// Except for empty sets, this method adds an additional allocation compared +// with calls that include a Sortable. +func NewSet(kvs ...KeyValue) Set { + s, _ := NewSetWithFiltered(kvs, nil) + return s +} + +// NewSetWithSortable returns a new Set. See the documentation for +// NewSetWithSortableFiltered for more details. +// +// This call includes a Sortable option as a memory optimization. +// +// Deprecated: Use [NewSet] instead. +func NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set { + s, _ := NewSetWithFiltered(kvs, nil) + return s +} + +// NewSetWithFiltered returns a new Set. See the documentation for +// NewSetWithSortableFiltered for more details. +// +// This call includes a Filter to include/exclude attribute keys from the +// return value. Excluded keys are returned as a slice of attribute values. +func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { + // Check for empty set. + if len(kvs) == 0 { + return empty(), nil + } + + // Stable sort so the following de-duplication can implement + // last-value-wins semantics. + slices.SortStableFunc(kvs, func(a, b KeyValue) int { + return cmp.Compare(a.Key, b.Key) + }) + + position := len(kvs) - 1 + offset := position - 1 + + // The requirements stated above require that the stable + // result be placed in the end of the input slice, while + // overwritten values are swapped to the beginning. + // + // De-duplicate with last-value-wins semantics. Preserve + // duplicate values at the beginning of the input slice. + for ; offset >= 0; offset-- { + if kvs[offset].Key == kvs[position].Key { + continue + } + position-- + kvs[offset], kvs[position] = kvs[position], kvs[offset] + } + kvs = kvs[position:] + + if filter != nil { + if div := filteredToFront(kvs, filter); div != 0 { + return Set{equivalent: computeDistinct(kvs[div:])}, kvs[:div] + } + } + return Set{equivalent: computeDistinct(kvs)}, nil +} + +// NewSetWithSortableFiltered returns a new Set. +// +// Duplicate keys are eliminated by taking the last value. This +// re-orders the input slice so that unique last-values are contiguous +// at the end of the slice. +// +// This ensures the following: +// +// - Last-value-wins semantics +// - Caller sees the reordering, but doesn't lose values +// - Repeated call preserve last-value wins. +// +// Note that methods are defined on Set, although this returns Set. Callers +// can avoid memory allocations by: +// +// - allocating a Sortable for use as a temporary in this method +// - allocating a Set for storing the return value of this constructor. +// +// The result maintains a cache of encoded attributes, by attribute.EncoderID. +// This value should not be copied after its first use. +// +// The second []KeyValue return value is a list of attributes that were +// excluded by the Filter (if non-nil). +// +// Deprecated: Use [NewSetWithFiltered] instead. +func NewSetWithSortableFiltered(kvs []KeyValue, _ *Sortable, filter Filter) (Set, []KeyValue) { + return NewSetWithFiltered(kvs, filter) +} + +// filteredToFront filters slice in-place using keep function. All KeyValues that need to +// be removed are moved to the front. All KeyValues that need to be kept are +// moved (in-order) to the back. The index for the first KeyValue to be kept is +// returned. +func filteredToFront(slice []KeyValue, keep Filter) int { + n := len(slice) + j := n + for i := n - 1; i >= 0; i-- { + if keep(slice[i]) { + j-- + slice[i], slice[j] = slice[j], slice[i] + } + } + return j +} + +// Filter returns a filtered copy of this Set. See the documentation for +// NewSetWithSortableFiltered for more details. +func (l *Set) Filter(re Filter) (Set, []KeyValue) { + if re == nil { + return *l, nil + } + + // Iterate in reverse to the first attribute that will be filtered out. + n := l.Len() + first := n - 1 + for ; first >= 0; first-- { + kv, _ := l.Get(first) + if !re(kv) { + break + } + } + + // No attributes will be dropped, return the immutable Set l and nil. + if first < 0 { + return *l, nil + } + + // Copy now that we know we need to return a modified set. + // + // Do not do this in-place on the underlying storage of *Set l. Sets are + // immutable and filtering should not change this. + slice := l.ToSlice() + + // Don't re-iterate the slice if only slice[0] is filtered. + if first == 0 { + // It is safe to assume len(slice) >= 1 given we found at least one + // attribute above that needs to be filtered out. + return Set{equivalent: computeDistinct(slice[1:])}, slice[:1] + } + + // Move the filtered slice[first] to the front (preserving order). + kv := slice[first] + copy(slice[1:first+1], slice[:first]) + slice[0] = kv + + // Do not re-evaluate re(slice[first+1:]). + div := filteredToFront(slice[1:first+1], re) + 1 + return Set{equivalent: computeDistinct(slice[div:])}, slice[:div] +} + +// computeDistinct returns a Distinct using either the fixed- or +// reflect-oriented code path, depending on the size of the input. The input +// slice is assumed to already be sorted and de-duplicated. +func computeDistinct(kvs []KeyValue) Distinct { + iface := computeDistinctFixed(kvs) + if iface == nil { + iface = computeDistinctReflect(kvs) + } + return Distinct{ + iface: iface, + } +} + +// computeDistinctFixed computes a Distinct for small slices. It returns nil +// if the input is too large for this code path. +func computeDistinctFixed(kvs []KeyValue) interface{} { + switch len(kvs) { + case 1: + ptr := new([1]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 2: + ptr := new([2]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 3: + ptr := new([3]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 4: + ptr := new([4]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 5: + ptr := new([5]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 6: + ptr := new([6]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 7: + ptr := new([7]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 8: + ptr := new([8]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 9: + ptr := new([9]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 10: + ptr := new([10]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + default: + return nil + } +} + +// computeDistinctReflect computes a Distinct using reflection, works for any +// size input. +func computeDistinctReflect(kvs []KeyValue) interface{} { + at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() + for i, keyValue := range kvs { + *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue + } + return at.Interface() +} + +// MarshalJSON returns the JSON encoding of the Set. +func (l *Set) MarshalJSON() ([]byte, error) { + return json.Marshal(l.equivalent.iface) +} + +// MarshalLog is the marshaling function used by the logging system to represent this Set. +func (l Set) MarshalLog() interface{} { + kvs := make(map[string]string) + for _, kv := range l.ToSlice() { + kvs[string(kv.Key)] = kv.Value.Emit() + } + return kvs +} + +// Len implements sort.Interface. +func (l *Sortable) Len() int { + return len(*l) +} + +// Swap implements sort.Interface. +func (l *Sortable) Swap(i, j int) { + (*l)[i], (*l)[j] = (*l)[j], (*l)[i] +} + +// Less implements sort.Interface. +func (l *Sortable) Less(i, j int) bool { + return (*l)[i].Key < (*l)[j].Key +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go new file mode 100644 index 000000000..e584b2477 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/type_string.go @@ -0,0 +1,31 @@ +// Code generated by "stringer -type=Type"; DO NOT EDIT. + +package attribute + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[INVALID-0] + _ = x[BOOL-1] + _ = x[INT64-2] + _ = x[FLOAT64-3] + _ = x[STRING-4] + _ = x[BOOLSLICE-5] + _ = x[INT64SLICE-6] + _ = x[FLOAT64SLICE-7] + _ = x[STRINGSLICE-8] +} + +const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE" + +var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} + +func (i Type) String() string { + if i < 0 || i >= Type(len(_Type_index)-1) { + return "Type(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Type_name[_Type_index[i]:_Type_index[i+1]] +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go new file mode 100644 index 000000000..9ea0ecbbd --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/value.go @@ -0,0 +1,271 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "encoding/json" + "fmt" + "reflect" + "strconv" + + "go.opentelemetry.io/otel/internal" + "go.opentelemetry.io/otel/internal/attribute" +) + +//go:generate stringer -type=Type + +// Type describes the type of the data Value holds. +type Type int // nolint: revive // redefines builtin Type. + +// Value represents the value part in key-value pairs. +type Value struct { + vtype Type + numeric uint64 + stringly string + slice interface{} +} + +const ( + // INVALID is used for a Value with no value set. + INVALID Type = iota + // BOOL is a boolean Type Value. + BOOL + // INT64 is a 64-bit signed integral Type Value. + INT64 + // FLOAT64 is a 64-bit floating point Type Value. + FLOAT64 + // STRING is a string Type Value. + STRING + // BOOLSLICE is a slice of booleans Type Value. + BOOLSLICE + // INT64SLICE is a slice of 64-bit signed integral numbers Type Value. + INT64SLICE + // FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value. + FLOAT64SLICE + // STRINGSLICE is a slice of strings Type Value. + STRINGSLICE +) + +// BoolValue creates a BOOL Value. +func BoolValue(v bool) Value { + return Value{ + vtype: BOOL, + numeric: internal.BoolToRaw(v), + } +} + +// BoolSliceValue creates a BOOLSLICE Value. +func BoolSliceValue(v []bool) Value { + return Value{vtype: BOOLSLICE, slice: attribute.BoolSliceValue(v)} +} + +// IntValue creates an INT64 Value. +func IntValue(v int) Value { + return Int64Value(int64(v)) +} + +// IntSliceValue creates an INTSLICE Value. +func IntSliceValue(v []int) Value { + var int64Val int64 + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(int64Val))) + for i, val := range v { + cp.Elem().Index(i).SetInt(int64(val)) + } + return Value{ + vtype: INT64SLICE, + slice: cp.Elem().Interface(), + } +} + +// Int64Value creates an INT64 Value. +func Int64Value(v int64) Value { + return Value{ + vtype: INT64, + numeric: internal.Int64ToRaw(v), + } +} + +// Int64SliceValue creates an INT64SLICE Value. +func Int64SliceValue(v []int64) Value { + return Value{vtype: INT64SLICE, slice: attribute.Int64SliceValue(v)} +} + +// Float64Value creates a FLOAT64 Value. +func Float64Value(v float64) Value { + return Value{ + vtype: FLOAT64, + numeric: internal.Float64ToRaw(v), + } +} + +// Float64SliceValue creates a FLOAT64SLICE Value. +func Float64SliceValue(v []float64) Value { + return Value{vtype: FLOAT64SLICE, slice: attribute.Float64SliceValue(v)} +} + +// StringValue creates a STRING Value. +func StringValue(v string) Value { + return Value{ + vtype: STRING, + stringly: v, + } +} + +// StringSliceValue creates a STRINGSLICE Value. +func StringSliceValue(v []string) Value { + return Value{vtype: STRINGSLICE, slice: attribute.StringSliceValue(v)} +} + +// Type returns a type of the Value. +func (v Value) Type() Type { + return v.vtype +} + +// AsBool returns the bool value. Make sure that the Value's type is +// BOOL. +func (v Value) AsBool() bool { + return internal.RawToBool(v.numeric) +} + +// AsBoolSlice returns the []bool value. Make sure that the Value's type is +// BOOLSLICE. +func (v Value) AsBoolSlice() []bool { + if v.vtype != BOOLSLICE { + return nil + } + return v.asBoolSlice() +} + +func (v Value) asBoolSlice() []bool { + return attribute.AsBoolSlice(v.slice) +} + +// AsInt64 returns the int64 value. Make sure that the Value's type is +// INT64. +func (v Value) AsInt64() int64 { + return internal.RawToInt64(v.numeric) +} + +// AsInt64Slice returns the []int64 value. Make sure that the Value's type is +// INT64SLICE. +func (v Value) AsInt64Slice() []int64 { + if v.vtype != INT64SLICE { + return nil + } + return v.asInt64Slice() +} + +func (v Value) asInt64Slice() []int64 { + return attribute.AsInt64Slice(v.slice) +} + +// AsFloat64 returns the float64 value. Make sure that the Value's +// type is FLOAT64. +func (v Value) AsFloat64() float64 { + return internal.RawToFloat64(v.numeric) +} + +// AsFloat64Slice returns the []float64 value. Make sure that the Value's type is +// FLOAT64SLICE. +func (v Value) AsFloat64Slice() []float64 { + if v.vtype != FLOAT64SLICE { + return nil + } + return v.asFloat64Slice() +} + +func (v Value) asFloat64Slice() []float64 { + return attribute.AsFloat64Slice(v.slice) +} + +// AsString returns the string value. Make sure that the Value's type +// is STRING. +func (v Value) AsString() string { + return v.stringly +} + +// AsStringSlice returns the []string value. Make sure that the Value's type is +// STRINGSLICE. +func (v Value) AsStringSlice() []string { + if v.vtype != STRINGSLICE { + return nil + } + return v.asStringSlice() +} + +func (v Value) asStringSlice() []string { + return attribute.AsStringSlice(v.slice) +} + +type unknownValueType struct{} + +// AsInterface returns Value's data as interface{}. +func (v Value) AsInterface() interface{} { + switch v.Type() { + case BOOL: + return v.AsBool() + case BOOLSLICE: + return v.asBoolSlice() + case INT64: + return v.AsInt64() + case INT64SLICE: + return v.asInt64Slice() + case FLOAT64: + return v.AsFloat64() + case FLOAT64SLICE: + return v.asFloat64Slice() + case STRING: + return v.stringly + case STRINGSLICE: + return v.asStringSlice() + } + return unknownValueType{} +} + +// Emit returns a string representation of Value's data. +func (v Value) Emit() string { + switch v.Type() { + case BOOLSLICE: + return fmt.Sprint(v.asBoolSlice()) + case BOOL: + return strconv.FormatBool(v.AsBool()) + case INT64SLICE: + j, err := json.Marshal(v.asInt64Slice()) + if err != nil { + return fmt.Sprintf("invalid: %v", v.asInt64Slice()) + } + return string(j) + case INT64: + return strconv.FormatInt(v.AsInt64(), 10) + case FLOAT64SLICE: + j, err := json.Marshal(v.asFloat64Slice()) + if err != nil { + return fmt.Sprintf("invalid: %v", v.asFloat64Slice()) + } + return string(j) + case FLOAT64: + return fmt.Sprint(v.AsFloat64()) + case STRINGSLICE: + j, err := json.Marshal(v.asStringSlice()) + if err != nil { + return fmt.Sprintf("invalid: %v", v.asStringSlice()) + } + return string(j) + case STRING: + return v.stringly + default: + return "unknown" + } +} + +// MarshalJSON returns the JSON encoding of the Value. +func (v Value) MarshalJSON() ([]byte, error) { + var jsonVal struct { + Type string + Value interface{} + } + jsonVal.Type = v.Type().String() + jsonVal.Value = v.AsInterface() + return json.Marshal(jsonVal) +} diff --git a/vendor/go.opentelemetry.io/otel/baggage/README.md b/vendor/go.opentelemetry.io/otel/baggage/README.md new file mode 100644 index 000000000..7d798435e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/README.md @@ -0,0 +1,3 @@ +# Baggage + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/baggage)](https://pkg.go.dev/go.opentelemetry.io/otel/baggage) diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go new file mode 100644 index 000000000..c40c896cc --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go @@ -0,0 +1,910 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package baggage // import "go.opentelemetry.io/otel/baggage" + +import ( + "errors" + "fmt" + "net/url" + "strings" + "unicode/utf8" + + "go.opentelemetry.io/otel/internal/baggage" +) + +const ( + maxMembers = 180 + maxBytesPerMembers = 4096 + maxBytesPerBaggageString = 8192 + + listDelimiter = "," + keyValueDelimiter = "=" + propertyDelimiter = ";" +) + +var ( + errInvalidKey = errors.New("invalid key") + errInvalidValue = errors.New("invalid value") + errInvalidProperty = errors.New("invalid baggage list-member property") + errInvalidMember = errors.New("invalid baggage list-member") + errMemberNumber = errors.New("too many list-members in baggage-string") + errMemberBytes = errors.New("list-member too large") + errBaggageBytes = errors.New("baggage-string too large") +) + +// Property is an additional metadata entry for a baggage list-member. +type Property struct { + key, value string + + // hasValue indicates if a zero-value value means the property does not + // have a value or if it was the zero-value. + hasValue bool +} + +// NewKeyProperty returns a new Property for key. +// +// If key is invalid, an error will be returned. +func NewKeyProperty(key string) (Property, error) { + if !validateKey(key) { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) + } + + p := Property{key: key} + return p, nil +} + +// NewKeyValueProperty returns a new Property for key with value. +// +// The passed key must be compliant with W3C Baggage specification. +// The passed value must be percent-encoded as defined in W3C Baggage specification. +// +// Notice: Consider using [NewKeyValuePropertyRaw] instead +// that does not require percent-encoding of the value. +func NewKeyValueProperty(key, value string) (Property, error) { + if !validateValue(value) { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + decodedValue, err := url.PathUnescape(value) + if err != nil { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + return NewKeyValuePropertyRaw(key, decodedValue) +} + +// NewKeyValuePropertyRaw returns a new Property for key with value. +// +// The passed key must be compliant with W3C Baggage specification. +func NewKeyValuePropertyRaw(key, value string) (Property, error) { + if !validateKey(key) { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) + } + + p := Property{ + key: key, + value: value, + hasValue: true, + } + return p, nil +} + +func newInvalidProperty() Property { + return Property{} +} + +// parseProperty attempts to decode a Property from the passed string. It +// returns an error if the input is invalid according to the W3C Baggage +// specification. +func parseProperty(property string) (Property, error) { + if property == "" { + return newInvalidProperty(), nil + } + + p, ok := parsePropertyInternal(property) + if !ok { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property) + } + + return p, nil +} + +// validate ensures p conforms to the W3C Baggage specification, returning an +// error otherwise. +func (p Property) validate() error { + errFunc := func(err error) error { + return fmt.Errorf("invalid property: %w", err) + } + + if !validateKey(p.key) { + return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key)) + } + if !p.hasValue && p.value != "" { + return errFunc(errors.New("inconsistent value")) + } + return nil +} + +// Key returns the Property key. +func (p Property) Key() string { + return p.key +} + +// Value returns the Property value. Additionally, a boolean value is returned +// indicating if the returned value is the empty if the Property has a value +// that is empty or if the value is not set. +func (p Property) Value() (string, bool) { + return p.value, p.hasValue +} + +// String encodes Property into a header string compliant with the W3C Baggage +// specification. +func (p Property) String() string { + if p.hasValue { + return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, valueEscape(p.value)) + } + return p.key +} + +type properties []Property + +func fromInternalProperties(iProps []baggage.Property) properties { + if len(iProps) == 0 { + return nil + } + + props := make(properties, len(iProps)) + for i, p := range iProps { + props[i] = Property{ + key: p.Key, + value: p.Value, + hasValue: p.HasValue, + } + } + return props +} + +func (p properties) asInternal() []baggage.Property { + if len(p) == 0 { + return nil + } + + iProps := make([]baggage.Property, len(p)) + for i, prop := range p { + iProps[i] = baggage.Property{ + Key: prop.key, + Value: prop.value, + HasValue: prop.hasValue, + } + } + return iProps +} + +func (p properties) Copy() properties { + if len(p) == 0 { + return nil + } + + props := make(properties, len(p)) + copy(props, p) + return props +} + +// validate ensures each Property in p conforms to the W3C Baggage +// specification, returning an error otherwise. +func (p properties) validate() error { + for _, prop := range p { + if err := prop.validate(); err != nil { + return err + } + } + return nil +} + +// String encodes properties into a header string compliant with the W3C Baggage +// specification. +func (p properties) String() string { + props := make([]string, len(p)) + for i, prop := range p { + props[i] = prop.String() + } + return strings.Join(props, propertyDelimiter) +} + +// Member is a list-member of a baggage-string as defined by the W3C Baggage +// specification. +type Member struct { + key, value string + properties properties + + // hasData indicates whether the created property contains data or not. + // Properties that do not contain data are invalid with no other check + // required. + hasData bool +} + +// NewMember returns a new Member from the passed arguments. +// +// The passed key must be compliant with W3C Baggage specification. +// The passed value must be percent-encoded as defined in W3C Baggage specification. +// +// Notice: Consider using [NewMemberRaw] instead +// that does not require percent-encoding of the value. +func NewMember(key, value string, props ...Property) (Member, error) { + if !validateValue(value) { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + decodedValue, err := url.PathUnescape(value) + if err != nil { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + return NewMemberRaw(key, decodedValue, props...) +} + +// NewMemberRaw returns a new Member from the passed arguments. +// +// The passed key must be compliant with W3C Baggage specification. +func NewMemberRaw(key, value string, props ...Property) (Member, error) { + m := Member{ + key: key, + value: value, + properties: properties(props).Copy(), + hasData: true, + } + if err := m.validate(); err != nil { + return newInvalidMember(), err + } + return m, nil +} + +func newInvalidMember() Member { + return Member{} +} + +// parseMember attempts to decode a Member from the passed string. It returns +// an error if the input is invalid according to the W3C Baggage +// specification. +func parseMember(member string) (Member, error) { + if n := len(member); n > maxBytesPerMembers { + return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n) + } + + var props properties + keyValue, properties, found := strings.Cut(member, propertyDelimiter) + if found { + // Parse the member properties. + for _, pStr := range strings.Split(properties, propertyDelimiter) { + p, err := parseProperty(pStr) + if err != nil { + return newInvalidMember(), err + } + props = append(props, p) + } + } + // Parse the member key/value pair. + + // Take into account a value can contain equal signs (=). + k, v, found := strings.Cut(keyValue, keyValueDelimiter) + if !found { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidMember, member) + } + // "Leading and trailing whitespaces are allowed but MUST be trimmed + // when converting the header into a data structure." + key := strings.TrimSpace(k) + if !validateKey(key) { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key) + } + + val := strings.TrimSpace(v) + if !validateValue(val) { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v) + } + + // Decode a percent-encoded value. + value, err := url.PathUnescape(val) + if err != nil { + return newInvalidMember(), fmt.Errorf("%w: %w", errInvalidValue, err) + } + return Member{key: key, value: value, properties: props, hasData: true}, nil +} + +// validate ensures m conforms to the W3C Baggage specification. +// A key must be an ASCII string, returning an error otherwise. +func (m Member) validate() error { + if !m.hasData { + return fmt.Errorf("%w: %q", errInvalidMember, m) + } + + if !validateKey(m.key) { + return fmt.Errorf("%w: %q", errInvalidKey, m.key) + } + return m.properties.validate() +} + +// Key returns the Member key. +func (m Member) Key() string { return m.key } + +// Value returns the Member value. +func (m Member) Value() string { return m.value } + +// Properties returns a copy of the Member properties. +func (m Member) Properties() []Property { return m.properties.Copy() } + +// String encodes Member into a header string compliant with the W3C Baggage +// specification. +func (m Member) String() string { + // A key is just an ASCII string. A value is restricted to be + // US-ASCII characters excluding CTLs, whitespace, + // DQUOTE, comma, semicolon, and backslash. + s := m.key + keyValueDelimiter + valueEscape(m.value) + if len(m.properties) > 0 { + s += propertyDelimiter + m.properties.String() + } + return s +} + +// Baggage is a list of baggage members representing the baggage-string as +// defined by the W3C Baggage specification. +type Baggage struct { //nolint:golint + list baggage.List +} + +// New returns a new valid Baggage. It returns an error if it results in a +// Baggage exceeding limits set in that specification. +// +// It expects all the provided members to have already been validated. +func New(members ...Member) (Baggage, error) { + if len(members) == 0 { + return Baggage{}, nil + } + + b := make(baggage.List) + for _, m := range members { + if !m.hasData { + return Baggage{}, errInvalidMember + } + + // OpenTelemetry resolves duplicates by last-one-wins. + b[m.key] = baggage.Item{ + Value: m.value, + Properties: m.properties.asInternal(), + } + } + + // Check member numbers after deduplication. + if len(b) > maxMembers { + return Baggage{}, errMemberNumber + } + + bag := Baggage{b} + if n := len(bag.String()); n > maxBytesPerBaggageString { + return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) + } + + return bag, nil +} + +// Parse attempts to decode a baggage-string from the passed string. It +// returns an error if the input is invalid according to the W3C Baggage +// specification. +// +// If there are duplicate list-members contained in baggage, the last one +// defined (reading left-to-right) will be the only one kept. This diverges +// from the W3C Baggage specification which allows duplicate list-members, but +// conforms to the OpenTelemetry Baggage specification. +func Parse(bStr string) (Baggage, error) { + if bStr == "" { + return Baggage{}, nil + } + + if n := len(bStr); n > maxBytesPerBaggageString { + return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) + } + + b := make(baggage.List) + for _, memberStr := range strings.Split(bStr, listDelimiter) { + m, err := parseMember(memberStr) + if err != nil { + return Baggage{}, err + } + // OpenTelemetry resolves duplicates by last-one-wins. + b[m.key] = baggage.Item{ + Value: m.value, + Properties: m.properties.asInternal(), + } + } + + // OpenTelemetry does not allow for duplicate list-members, but the W3C + // specification does. Now that we have deduplicated, ensure the baggage + // does not exceed list-member limits. + if len(b) > maxMembers { + return Baggage{}, errMemberNumber + } + + return Baggage{b}, nil +} + +// Member returns the baggage list-member identified by key. +// +// If there is no list-member matching the passed key the returned Member will +// be a zero-value Member. +// The returned member is not validated, as we assume the validation happened +// when it was added to the Baggage. +func (b Baggage) Member(key string) Member { + v, ok := b.list[key] + if !ok { + // We do not need to worry about distinguishing between the situation + // where a zero-valued Member is included in the Baggage because a + // zero-valued Member is invalid according to the W3C Baggage + // specification (it has an empty key). + return newInvalidMember() + } + + return Member{ + key: key, + value: v.Value, + properties: fromInternalProperties(v.Properties), + hasData: true, + } +} + +// Members returns all the baggage list-members. +// The order of the returned list-members does not have significance. +// +// The returned members are not validated, as we assume the validation happened +// when they were added to the Baggage. +func (b Baggage) Members() []Member { + if len(b.list) == 0 { + return nil + } + + members := make([]Member, 0, len(b.list)) + for k, v := range b.list { + members = append(members, Member{ + key: k, + value: v.Value, + properties: fromInternalProperties(v.Properties), + hasData: true, + }) + } + return members +} + +// SetMember returns a copy the Baggage with the member included. If the +// baggage contains a Member with the same key the existing Member is +// replaced. +// +// If member is invalid according to the W3C Baggage specification, an error +// is returned with the original Baggage. +func (b Baggage) SetMember(member Member) (Baggage, error) { + if !member.hasData { + return b, errInvalidMember + } + + n := len(b.list) + if _, ok := b.list[member.key]; !ok { + n++ + } + list := make(baggage.List, n) + + for k, v := range b.list { + // Do not copy if we are just going to overwrite. + if k == member.key { + continue + } + list[k] = v + } + + list[member.key] = baggage.Item{ + Value: member.value, + Properties: member.properties.asInternal(), + } + + return Baggage{list: list}, nil +} + +// DeleteMember returns a copy of the Baggage with the list-member identified +// by key removed. +func (b Baggage) DeleteMember(key string) Baggage { + n := len(b.list) + if _, ok := b.list[key]; ok { + n-- + } + list := make(baggage.List, n) + + for k, v := range b.list { + if k == key { + continue + } + list[k] = v + } + + return Baggage{list: list} +} + +// Len returns the number of list-members in the Baggage. +func (b Baggage) Len() int { + return len(b.list) +} + +// String encodes Baggage into a header string compliant with the W3C Baggage +// specification. +func (b Baggage) String() string { + members := make([]string, 0, len(b.list)) + for k, v := range b.list { + members = append(members, Member{ + key: k, + value: v.Value, + properties: fromInternalProperties(v.Properties), + }.String()) + } + return strings.Join(members, listDelimiter) +} + +// parsePropertyInternal attempts to decode a Property from the passed string. +// It follows the spec at https://www.w3.org/TR/baggage/#definition. +func parsePropertyInternal(s string) (p Property, ok bool) { + // For the entire function we will use " key = value " as an example. + // Attempting to parse the key. + // First skip spaces at the beginning "< >key = value " (they could be empty). + index := skipSpace(s, 0) + + // Parse the key: " = value ". + keyStart := index + keyEnd := index + for _, c := range s[keyStart:] { + if !validateKeyChar(c) { + break + } + keyEnd++ + } + + // If we couldn't find any valid key character, + // it means the key is either empty or invalid. + if keyStart == keyEnd { + return + } + + // Skip spaces after the key: " key< >= value ". + index = skipSpace(s, keyEnd) + + if index == len(s) { + // A key can have no value, like: " key ". + ok = true + p.key = s[keyStart:keyEnd] + return + } + + // If we have not reached the end and we can't find the '=' delimiter, + // it means the property is invalid. + if s[index] != keyValueDelimiter[0] { + return + } + + // Attempting to parse the value. + // Match: " key =< >value ". + index = skipSpace(s, index+1) + + // Match the value string: " key = ". + // A valid property can be: " key =". + // Therefore, we don't have to check if the value is empty. + valueStart := index + valueEnd := index + for _, c := range s[valueStart:] { + if !validateValueChar(c) { + break + } + valueEnd++ + } + + // Skip all trailing whitespaces: " key = value< >". + index = skipSpace(s, valueEnd) + + // If after looking for the value and skipping whitespaces + // we have not reached the end, it means the property is + // invalid, something like: " key = value value1". + if index != len(s) { + return + } + + // Decode a percent-encoded value. + value, err := url.PathUnescape(s[valueStart:valueEnd]) + if err != nil { + return + } + + ok = true + p.key = s[keyStart:keyEnd] + p.hasValue = true + + p.value = value + return +} + +func skipSpace(s string, offset int) int { + i := offset + for ; i < len(s); i++ { + c := s[i] + if c != ' ' && c != '\t' { + break + } + } + return i +} + +var safeKeyCharset = [utf8.RuneSelf]bool{ + // 0x23 to 0x27 + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + + // 0x30 to 0x39 + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + + // 0x41 to 0x5a + 'A': true, + 'B': true, + 'C': true, + 'D': true, + 'E': true, + 'F': true, + 'G': true, + 'H': true, + 'I': true, + 'J': true, + 'K': true, + 'L': true, + 'M': true, + 'N': true, + 'O': true, + 'P': true, + 'Q': true, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'V': true, + 'W': true, + 'X': true, + 'Y': true, + 'Z': true, + + // 0x5e to 0x7a + '^': true, + '_': true, + '`': true, + 'a': true, + 'b': true, + 'c': true, + 'd': true, + 'e': true, + 'f': true, + 'g': true, + 'h': true, + 'i': true, + 'j': true, + 'k': true, + 'l': true, + 'm': true, + 'n': true, + 'o': true, + 'p': true, + 'q': true, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + + // remainder + '!': true, + '*': true, + '+': true, + '-': true, + '.': true, + '|': true, + '~': true, +} + +func validateKey(s string) bool { + if len(s) == 0 { + return false + } + + for _, c := range s { + if !validateKeyChar(c) { + return false + } + } + + return true +} + +func validateKeyChar(c int32) bool { + return c >= 0 && c < int32(utf8.RuneSelf) && safeKeyCharset[c] +} + +func validateValue(s string) bool { + for _, c := range s { + if !validateValueChar(c) { + return false + } + } + + return true +} + +var safeValueCharset = [utf8.RuneSelf]bool{ + '!': true, // 0x21 + + // 0x23 to 0x2b + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + '(': true, + ')': true, + '*': true, + '+': true, + + // 0x2d to 0x3a + '-': true, + '.': true, + '/': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + ':': true, + + // 0x3c to 0x5b + '<': true, // 0x3C + '=': true, // 0x3D + '>': true, // 0x3E + '?': true, // 0x3F + '@': true, // 0x40 + 'A': true, // 0x41 + 'B': true, // 0x42 + 'C': true, // 0x43 + 'D': true, // 0x44 + 'E': true, // 0x45 + 'F': true, // 0x46 + 'G': true, // 0x47 + 'H': true, // 0x48 + 'I': true, // 0x49 + 'J': true, // 0x4A + 'K': true, // 0x4B + 'L': true, // 0x4C + 'M': true, // 0x4D + 'N': true, // 0x4E + 'O': true, // 0x4F + 'P': true, // 0x50 + 'Q': true, // 0x51 + 'R': true, // 0x52 + 'S': true, // 0x53 + 'T': true, // 0x54 + 'U': true, // 0x55 + 'V': true, // 0x56 + 'W': true, // 0x57 + 'X': true, // 0x58 + 'Y': true, // 0x59 + 'Z': true, // 0x5A + '[': true, // 0x5B + + // 0x5d to 0x7e + ']': true, // 0x5D + '^': true, // 0x5E + '_': true, // 0x5F + '`': true, // 0x60 + 'a': true, // 0x61 + 'b': true, // 0x62 + 'c': true, // 0x63 + 'd': true, // 0x64 + 'e': true, // 0x65 + 'f': true, // 0x66 + 'g': true, // 0x67 + 'h': true, // 0x68 + 'i': true, // 0x69 + 'j': true, // 0x6A + 'k': true, // 0x6B + 'l': true, // 0x6C + 'm': true, // 0x6D + 'n': true, // 0x6E + 'o': true, // 0x6F + 'p': true, // 0x70 + 'q': true, // 0x71 + 'r': true, // 0x72 + 's': true, // 0x73 + 't': true, // 0x74 + 'u': true, // 0x75 + 'v': true, // 0x76 + 'w': true, // 0x77 + 'x': true, // 0x78 + 'y': true, // 0x79 + 'z': true, // 0x7A + '{': true, // 0x7B + '|': true, // 0x7C + '}': true, // 0x7D + '~': true, // 0x7E +} + +func validateValueChar(c int32) bool { + return c >= 0 && c < int32(utf8.RuneSelf) && safeValueCharset[c] +} + +// valueEscape escapes the string so it can be safely placed inside a baggage value, +// replacing special characters with %XX sequences as needed. +// +// The implementation is based on: +// https://github.com/golang/go/blob/f6509cf5cdbb5787061b784973782933c47f1782/src/net/url/url.go#L285. +func valueEscape(s string) string { + hexCount := 0 + for i := 0; i < len(s); i++ { + c := s[i] + if shouldEscape(c) { + hexCount++ + } + } + + if hexCount == 0 { + return s + } + + var buf [64]byte + var t []byte + + required := len(s) + 2*hexCount + if required <= len(buf) { + t = buf[:required] + } else { + t = make([]byte, required) + } + + j := 0 + for i := 0; i < len(s); i++ { + c := s[i] + if shouldEscape(s[i]) { + const upperhex = "0123456789ABCDEF" + t[j] = '%' + t[j+1] = upperhex[c>>4] + t[j+2] = upperhex[c&15] + j += 3 + } else { + t[j] = c + j++ + } + } + + return string(t) +} + +// shouldEscape returns true if the specified byte should be escaped when +// appearing in a baggage value string. +func shouldEscape(c byte) bool { + if c == '%' { + // The percent character must be encoded so that percent-encoding can work. + return true + } + return !validateValueChar(int32(c)) +} diff --git a/vendor/go.opentelemetry.io/otel/baggage/context.go b/vendor/go.opentelemetry.io/otel/baggage/context.go new file mode 100644 index 000000000..a572461a0 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/context.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package baggage // import "go.opentelemetry.io/otel/baggage" + +import ( + "context" + + "go.opentelemetry.io/otel/internal/baggage" +) + +// ContextWithBaggage returns a copy of parent with baggage. +func ContextWithBaggage(parent context.Context, b Baggage) context.Context { + // Delegate so any hooks for the OpenTracing bridge are handled. + return baggage.ContextWithList(parent, b.list) +} + +// ContextWithoutBaggage returns a copy of parent with no baggage. +func ContextWithoutBaggage(parent context.Context) context.Context { + // Delegate so any hooks for the OpenTracing bridge are handled. + return baggage.ContextWithList(parent, nil) +} + +// FromContext returns the baggage contained in ctx. +func FromContext(ctx context.Context) Baggage { + // Delegate so any hooks for the OpenTracing bridge are handled. + return Baggage{list: baggage.ListFromContext(ctx)} +} diff --git a/vendor/go.opentelemetry.io/otel/baggage/doc.go b/vendor/go.opentelemetry.io/otel/baggage/doc.go new file mode 100644 index 000000000..b51d87cab --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package baggage provides functionality for storing and retrieving +baggage items in Go context. For propagating the baggage, see the +go.opentelemetry.io/otel/propagation package. +*/ +package baggage // import "go.opentelemetry.io/otel/baggage" diff --git a/vendor/go.opentelemetry.io/otel/codes/README.md b/vendor/go.opentelemetry.io/otel/codes/README.md new file mode 100644 index 000000000..24c52b387 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/codes/README.md @@ -0,0 +1,3 @@ +# Codes + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/codes)](https://pkg.go.dev/go.opentelemetry.io/otel/codes) diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go new file mode 100644 index 000000000..df29d96a6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/codes/codes.go @@ -0,0 +1,105 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package codes // import "go.opentelemetry.io/otel/codes" + +import ( + "encoding/json" + "fmt" + "strconv" +) + +const ( + // Unset is the default status code. + Unset Code = 0 + + // Error indicates the operation contains an error. + // + // NOTE: The error code in OTLP is 2. + // The value of this enum is only relevant to the internals + // of the Go SDK. + Error Code = 1 + + // Ok indicates operation has been validated by an Application developers + // or Operator to have completed successfully, or contain no error. + // + // NOTE: The Ok code in OTLP is 1. + // The value of this enum is only relevant to the internals + // of the Go SDK. + Ok Code = 2 + + maxCode = 3 +) + +// Code is an 32-bit representation of a status state. +type Code uint32 + +var codeToStr = map[Code]string{ + Unset: "Unset", + Error: "Error", + Ok: "Ok", +} + +var strToCode = map[string]Code{ + `"Unset"`: Unset, + `"Error"`: Error, + `"Ok"`: Ok, +} + +// String returns the Code as a string. +func (c Code) String() string { + return codeToStr[c] +} + +// UnmarshalJSON unmarshals b into the Code. +// +// This is based on the functionality in the gRPC codes package: +// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 +func (c *Code) UnmarshalJSON(b []byte) error { + // From json.Unmarshaler: By convention, to approximate the behavior of + // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as + // a no-op. + if string(b) == "null" { + return nil + } + if c == nil { + return fmt.Errorf("nil receiver passed to UnmarshalJSON") + } + + var x interface{} + if err := json.Unmarshal(b, &x); err != nil { + return err + } + switch x.(type) { + case string: + if jc, ok := strToCode[string(b)]; ok { + *c = jc + return nil + } + return fmt.Errorf("invalid code: %q", string(b)) + case float64: + if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { + if ci >= maxCode { + return fmt.Errorf("invalid code: %q", ci) + } + + *c = Code(ci) + return nil + } + return fmt.Errorf("invalid code: %q", string(b)) + default: + return fmt.Errorf("invalid code: %q", string(b)) + } +} + +// MarshalJSON returns c as the JSON encoding of c. +func (c *Code) MarshalJSON() ([]byte, error) { + if c == nil { + return []byte("null"), nil + } + str, ok := codeToStr[*c] + if !ok { + return nil, fmt.Errorf("invalid code: %d", *c) + } + return []byte(fmt.Sprintf("%q", str)), nil +} diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go new file mode 100644 index 000000000..ee8db448b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/codes/doc.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package codes defines the canonical error codes used by OpenTelemetry. + +It conforms to [the OpenTelemetry +specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status). +*/ +package codes // import "go.opentelemetry.io/otel/codes" diff --git a/vendor/go.opentelemetry.io/otel/doc.go b/vendor/go.opentelemetry.io/otel/doc.go new file mode 100644 index 000000000..441c59501 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/doc.go @@ -0,0 +1,23 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package otel provides global access to the OpenTelemetry API. The subpackages of +the otel package provide an implementation of the OpenTelemetry API. + +The provided API is used to instrument code and measure data about that code's +performance and operation. The measured data, by default, is not processed or +transmitted anywhere. An implementation of the OpenTelemetry SDK, like the +default SDK implementation (go.opentelemetry.io/otel/sdk), and associated +exporters are used to process and transport this data. + +To read the getting started guide, see https://opentelemetry.io/docs/languages/go/getting-started/. + +To read more about tracing, see go.opentelemetry.io/otel/trace. + +To read more about metrics, see go.opentelemetry.io/otel/metric. + +To read more about propagation, see go.opentelemetry.io/otel/propagation and +go.opentelemetry.io/otel/baggage. +*/ +package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/error_handler.go b/vendor/go.opentelemetry.io/otel/error_handler.go new file mode 100644 index 000000000..67414c71e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/error_handler.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +// ErrorHandler handles irremediable events. +type ErrorHandler interface { + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Handle handles any error deemed irremediable by an OpenTelemetry + // component. + Handle(error) + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. +} + +// ErrorHandlerFunc is a convenience adapter to allow the use of a function +// as an ErrorHandler. +type ErrorHandlerFunc func(error) + +var _ ErrorHandler = ErrorHandlerFunc(nil) + +// Handle handles the irremediable error by calling the ErrorHandlerFunc itself. +func (f ErrorHandlerFunc) Handle(err error) { + f(err) +} diff --git a/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh new file mode 100644 index 000000000..93e80ea30 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +top_dir='.' +if [[ $# -gt 0 ]]; then + top_dir="${1}" +fi + +p=$(pwd) +mod_dirs=() + +# Note `mapfile` does not exist in older bash versions: +# https://stackoverflow.com/questions/41475261/need-alternative-to-readarray-mapfile-for-script-on-older-version-of-bash + +while IFS= read -r line; do + mod_dirs+=("$line") +done < <(find "${top_dir}" -type f -name 'go.mod' -exec dirname {} \; | sort) + +for mod_dir in "${mod_dirs[@]}"; do + cd "${mod_dir}" + + while IFS= read -r line; do + echo ".${line#${p}}" + done < <(go list --find -f '{{.Name}}|{{.Dir}}' ./... | grep '^main|' | cut -f 2- -d '|') + cd "${p}" +done diff --git a/vendor/go.opentelemetry.io/otel/handler.go b/vendor/go.opentelemetry.io/otel/handler.go new file mode 100644 index 000000000..07623b679 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/handler.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +import ( + "go.opentelemetry.io/otel/internal/global" +) + +// Compile-time check global.ErrDelegator implements ErrorHandler. +var _ ErrorHandler = (*global.ErrDelegator)(nil) + +// GetErrorHandler returns the global ErrorHandler instance. +// +// The default ErrorHandler instance returned will log all errors to STDERR +// until an override ErrorHandler is set with SetErrorHandler. All +// ErrorHandler returned prior to this will automatically forward errors to +// the set instance instead of logging. +// +// Subsequent calls to SetErrorHandler after the first will not forward errors +// to the new ErrorHandler for prior returned instances. +func GetErrorHandler() ErrorHandler { return global.GetErrorHandler() } + +// SetErrorHandler sets the global ErrorHandler to h. +// +// The first time this is called all ErrorHandler previously returned from +// GetErrorHandler will send errors to h instead of the default logging +// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not +// delegate errors to h. +func SetErrorHandler(h ErrorHandler) { global.SetErrorHandler(h) } + +// Handle is a convenience function for GetErrorHandler().Handle(err). +func Handle(err error) { global.GetErrorHandler().Handle(err) } diff --git a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go new file mode 100644 index 000000000..822d84794 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go @@ -0,0 +1,100 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package attribute provide several helper functions for some commonly used +logic of processing attributes. +*/ +package attribute // import "go.opentelemetry.io/otel/internal/attribute" + +import ( + "reflect" +) + +// BoolSliceValue converts a bool slice into an array with same elements as slice. +func BoolSliceValue(v []bool) interface{} { + var zero bool + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() +} + +// Int64SliceValue converts an int64 slice into an array with same elements as slice. +func Int64SliceValue(v []int64) interface{} { + var zero int64 + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() +} + +// Float64SliceValue converts a float64 slice into an array with same elements as slice. +func Float64SliceValue(v []float64) interface{} { + var zero float64 + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() +} + +// StringSliceValue converts a string slice into an array with same elements as slice. +func StringSliceValue(v []string) interface{} { + var zero string + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() +} + +// AsBoolSlice converts a bool array into a slice into with same elements as array. +func AsBoolSlice(v interface{}) []bool { + rv := reflect.ValueOf(v) + if rv.Type().Kind() != reflect.Array { + return nil + } + var zero bool + correctLen := rv.Len() + correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) + cpy := reflect.New(correctType) + _ = reflect.Copy(cpy.Elem(), rv) + return cpy.Elem().Slice(0, correctLen).Interface().([]bool) +} + +// AsInt64Slice converts an int64 array into a slice into with same elements as array. +func AsInt64Slice(v interface{}) []int64 { + rv := reflect.ValueOf(v) + if rv.Type().Kind() != reflect.Array { + return nil + } + var zero int64 + correctLen := rv.Len() + correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) + cpy := reflect.New(correctType) + _ = reflect.Copy(cpy.Elem(), rv) + return cpy.Elem().Slice(0, correctLen).Interface().([]int64) +} + +// AsFloat64Slice converts a float64 array into a slice into with same elements as array. +func AsFloat64Slice(v interface{}) []float64 { + rv := reflect.ValueOf(v) + if rv.Type().Kind() != reflect.Array { + return nil + } + var zero float64 + correctLen := rv.Len() + correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) + cpy := reflect.New(correctType) + _ = reflect.Copy(cpy.Elem(), rv) + return cpy.Elem().Slice(0, correctLen).Interface().([]float64) +} + +// AsStringSlice converts a string array into a slice into with same elements as array. +func AsStringSlice(v interface{}) []string { + rv := reflect.ValueOf(v) + if rv.Type().Kind() != reflect.Array { + return nil + } + var zero string + correctLen := rv.Len() + correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) + cpy := reflect.New(correctType) + _ = reflect.Copy(cpy.Elem(), rv) + return cpy.Elem().Slice(0, correctLen).Interface().([]string) +} diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go new file mode 100644 index 000000000..b4f85f44a --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package baggage provides base types and functionality to store and retrieve +baggage in Go context. This package exists because the OpenTracing bridge to +OpenTelemetry needs to synchronize state whenever baggage for a context is +modified and that context contains an OpenTracing span. If it were not for +this need this package would not need to exist and the +`go.opentelemetry.io/otel/baggage` package would be the singular place where +W3C baggage is handled. +*/ +package baggage // import "go.opentelemetry.io/otel/internal/baggage" + +// List is the collection of baggage members. The W3C allows for duplicates, +// but OpenTelemetry does not, therefore, this is represented as a map. +type List map[string]Item + +// Item is the value and metadata properties part of a list-member. +type Item struct { + Value string + Properties []Property +} + +// Property is a metadata entry for a list-member. +type Property struct { + Key, Value string + + // HasValue indicates if a zero-value value means the property does not + // have a value or if it was the zero-value. + HasValue bool +} diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go new file mode 100644 index 000000000..3aea9c491 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package baggage // import "go.opentelemetry.io/otel/internal/baggage" + +import "context" + +type baggageContextKeyType int + +const baggageKey baggageContextKeyType = iota + +// SetHookFunc is a callback called when storing baggage in the context. +type SetHookFunc func(context.Context, List) context.Context + +// GetHookFunc is a callback called when getting baggage from the context. +type GetHookFunc func(context.Context, List) List + +type baggageState struct { + list List + + setHook SetHookFunc + getHook GetHookFunc +} + +// ContextWithSetHook returns a copy of parent with hook configured to be +// invoked every time ContextWithBaggage is called. +// +// Passing nil SetHookFunc creates a context with no set hook to call. +func ContextWithSetHook(parent context.Context, hook SetHookFunc) context.Context { + var s baggageState + if v, ok := parent.Value(baggageKey).(baggageState); ok { + s = v + } + + s.setHook = hook + return context.WithValue(parent, baggageKey, s) +} + +// ContextWithGetHook returns a copy of parent with hook configured to be +// invoked every time FromContext is called. +// +// Passing nil GetHookFunc creates a context with no get hook to call. +func ContextWithGetHook(parent context.Context, hook GetHookFunc) context.Context { + var s baggageState + if v, ok := parent.Value(baggageKey).(baggageState); ok { + s = v + } + + s.getHook = hook + return context.WithValue(parent, baggageKey, s) +} + +// ContextWithList returns a copy of parent with baggage. Passing nil list +// returns a context without any baggage. +func ContextWithList(parent context.Context, list List) context.Context { + var s baggageState + if v, ok := parent.Value(baggageKey).(baggageState); ok { + s = v + } + + s.list = list + ctx := context.WithValue(parent, baggageKey, s) + if s.setHook != nil { + ctx = s.setHook(ctx, list) + } + + return ctx +} + +// ListFromContext returns the baggage contained in ctx. +func ListFromContext(ctx context.Context) List { + switch v := ctx.Value(baggageKey).(type) { + case baggageState: + if v.getHook != nil { + return v.getHook(ctx, v.list) + } + return v.list + default: + return nil + } +} diff --git a/vendor/go.opentelemetry.io/otel/internal/gen.go b/vendor/go.opentelemetry.io/otel/internal/gen.go new file mode 100644 index 000000000..4259f0320 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/gen.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/otel/internal" + +//go:generate gotmpl --body=./shared/matchers/expectation.go.tmpl "--data={}" --out=matchers/expectation.go +//go:generate gotmpl --body=./shared/matchers/expecter.go.tmpl "--data={}" --out=matchers/expecter.go +//go:generate gotmpl --body=./shared/matchers/temporal_matcher.go.tmpl "--data={}" --out=matchers/temporal_matcher.go + +//go:generate gotmpl --body=./shared/internaltest/alignment.go.tmpl "--data={}" --out=internaltest/alignment.go +//go:generate gotmpl --body=./shared/internaltest/env.go.tmpl "--data={}" --out=internaltest/env.go +//go:generate gotmpl --body=./shared/internaltest/env_test.go.tmpl "--data={}" --out=internaltest/env_test.go +//go:generate gotmpl --body=./shared/internaltest/errors.go.tmpl "--data={}" --out=internaltest/errors.go +//go:generate gotmpl --body=./shared/internaltest/harness.go.tmpl "--data={\"matchersImportPath\": \"go.opentelemetry.io/otel/internal/matchers\"}" --out=internaltest/harness.go +//go:generate gotmpl --body=./shared/internaltest/text_map_carrier.go.tmpl "--data={}" --out=internaltest/text_map_carrier.go +//go:generate gotmpl --body=./shared/internaltest/text_map_carrier_test.go.tmpl "--data={}" --out=internaltest/text_map_carrier_test.go +//go:generate gotmpl --body=./shared/internaltest/text_map_propagator.go.tmpl "--data={}" --out=internaltest/text_map_propagator.go +//go:generate gotmpl --body=./shared/internaltest/text_map_propagator_test.go.tmpl "--data={}" --out=internaltest/text_map_propagator_test.go diff --git a/vendor/go.opentelemetry.io/otel/internal/global/handler.go b/vendor/go.opentelemetry.io/otel/internal/global/handler.go new file mode 100644 index 000000000..c657ff8e7 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/handler.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "log" + "sync/atomic" +) + +// ErrorHandler handles irremediable events. +type ErrorHandler interface { + // Handle handles any error deemed irremediable by an OpenTelemetry + // component. + Handle(error) +} + +type ErrDelegator struct { + delegate atomic.Pointer[ErrorHandler] +} + +// Compile-time check that delegator implements ErrorHandler. +var _ ErrorHandler = (*ErrDelegator)(nil) + +func (d *ErrDelegator) Handle(err error) { + if eh := d.delegate.Load(); eh != nil { + (*eh).Handle(err) + return + } + log.Print(err) +} + +// setDelegate sets the ErrorHandler delegate. +func (d *ErrDelegator) setDelegate(eh ErrorHandler) { + d.delegate.Store(&eh) +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go new file mode 100644 index 000000000..3a0cc42f6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go @@ -0,0 +1,412 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "context" + "sync/atomic" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/embedded" +) + +// unwrapper unwraps to return the underlying instrument implementation. +type unwrapper interface { + Unwrap() metric.Observable +} + +type afCounter struct { + embedded.Float64ObservableCounter + metric.Float64Observable + + name string + opts []metric.Float64ObservableCounterOption + + delegate atomic.Value // metric.Float64ObservableCounter +} + +var ( + _ unwrapper = (*afCounter)(nil) + _ metric.Float64ObservableCounter = (*afCounter)(nil) +) + +func (i *afCounter) setDelegate(m metric.Meter) { + ctr, err := m.Float64ObservableCounter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *afCounter) Unwrap() metric.Observable { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64ObservableCounter) + } + return nil +} + +type afUpDownCounter struct { + embedded.Float64ObservableUpDownCounter + metric.Float64Observable + + name string + opts []metric.Float64ObservableUpDownCounterOption + + delegate atomic.Value // metric.Float64ObservableUpDownCounter +} + +var ( + _ unwrapper = (*afUpDownCounter)(nil) + _ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil) +) + +func (i *afUpDownCounter) setDelegate(m metric.Meter) { + ctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *afUpDownCounter) Unwrap() metric.Observable { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64ObservableUpDownCounter) + } + return nil +} + +type afGauge struct { + embedded.Float64ObservableGauge + metric.Float64Observable + + name string + opts []metric.Float64ObservableGaugeOption + + delegate atomic.Value // metric.Float64ObservableGauge +} + +var ( + _ unwrapper = (*afGauge)(nil) + _ metric.Float64ObservableGauge = (*afGauge)(nil) +) + +func (i *afGauge) setDelegate(m metric.Meter) { + ctr, err := m.Float64ObservableGauge(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *afGauge) Unwrap() metric.Observable { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64ObservableGauge) + } + return nil +} + +type aiCounter struct { + embedded.Int64ObservableCounter + metric.Int64Observable + + name string + opts []metric.Int64ObservableCounterOption + + delegate atomic.Value // metric.Int64ObservableCounter +} + +var ( + _ unwrapper = (*aiCounter)(nil) + _ metric.Int64ObservableCounter = (*aiCounter)(nil) +) + +func (i *aiCounter) setDelegate(m metric.Meter) { + ctr, err := m.Int64ObservableCounter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *aiCounter) Unwrap() metric.Observable { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64ObservableCounter) + } + return nil +} + +type aiUpDownCounter struct { + embedded.Int64ObservableUpDownCounter + metric.Int64Observable + + name string + opts []metric.Int64ObservableUpDownCounterOption + + delegate atomic.Value // metric.Int64ObservableUpDownCounter +} + +var ( + _ unwrapper = (*aiUpDownCounter)(nil) + _ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil) +) + +func (i *aiUpDownCounter) setDelegate(m metric.Meter) { + ctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *aiUpDownCounter) Unwrap() metric.Observable { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64ObservableUpDownCounter) + } + return nil +} + +type aiGauge struct { + embedded.Int64ObservableGauge + metric.Int64Observable + + name string + opts []metric.Int64ObservableGaugeOption + + delegate atomic.Value // metric.Int64ObservableGauge +} + +var ( + _ unwrapper = (*aiGauge)(nil) + _ metric.Int64ObservableGauge = (*aiGauge)(nil) +) + +func (i *aiGauge) setDelegate(m metric.Meter) { + ctr, err := m.Int64ObservableGauge(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *aiGauge) Unwrap() metric.Observable { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64ObservableGauge) + } + return nil +} + +// Sync Instruments. +type sfCounter struct { + embedded.Float64Counter + + name string + opts []metric.Float64CounterOption + + delegate atomic.Value // metric.Float64Counter +} + +var _ metric.Float64Counter = (*sfCounter)(nil) + +func (i *sfCounter) setDelegate(m metric.Meter) { + ctr, err := m.Float64Counter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *sfCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Float64Counter).Add(ctx, incr, opts...) + } +} + +type sfUpDownCounter struct { + embedded.Float64UpDownCounter + + name string + opts []metric.Float64UpDownCounterOption + + delegate atomic.Value // metric.Float64UpDownCounter +} + +var _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil) + +func (i *sfUpDownCounter) setDelegate(m metric.Meter) { + ctr, err := m.Float64UpDownCounter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *sfUpDownCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Float64UpDownCounter).Add(ctx, incr, opts...) + } +} + +type sfHistogram struct { + embedded.Float64Histogram + + name string + opts []metric.Float64HistogramOption + + delegate atomic.Value // metric.Float64Histogram +} + +var _ metric.Float64Histogram = (*sfHistogram)(nil) + +func (i *sfHistogram) setDelegate(m metric.Meter) { + ctr, err := m.Float64Histogram(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Float64Histogram).Record(ctx, x, opts...) + } +} + +type sfGauge struct { + embedded.Float64Gauge + + name string + opts []metric.Float64GaugeOption + + delegate atomic.Value // metric.Float64Gauge +} + +var _ metric.Float64Gauge = (*sfGauge)(nil) + +func (i *sfGauge) setDelegate(m metric.Meter) { + ctr, err := m.Float64Gauge(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Float64Gauge).Record(ctx, x, opts...) + } +} + +type siCounter struct { + embedded.Int64Counter + + name string + opts []metric.Int64CounterOption + + delegate atomic.Value // metric.Int64Counter +} + +var _ metric.Int64Counter = (*siCounter)(nil) + +func (i *siCounter) setDelegate(m metric.Meter) { + ctr, err := m.Int64Counter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *siCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Int64Counter).Add(ctx, x, opts...) + } +} + +type siUpDownCounter struct { + embedded.Int64UpDownCounter + + name string + opts []metric.Int64UpDownCounterOption + + delegate atomic.Value // metric.Int64UpDownCounter +} + +var _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil) + +func (i *siUpDownCounter) setDelegate(m metric.Meter) { + ctr, err := m.Int64UpDownCounter(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *siUpDownCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Int64UpDownCounter).Add(ctx, x, opts...) + } +} + +type siHistogram struct { + embedded.Int64Histogram + + name string + opts []metric.Int64HistogramOption + + delegate atomic.Value // metric.Int64Histogram +} + +var _ metric.Int64Histogram = (*siHistogram)(nil) + +func (i *siHistogram) setDelegate(m metric.Meter) { + ctr, err := m.Int64Histogram(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Int64Histogram).Record(ctx, x, opts...) + } +} + +type siGauge struct { + embedded.Int64Gauge + + name string + opts []metric.Int64GaugeOption + + delegate atomic.Value // metric.Int64Gauge +} + +var _ metric.Int64Gauge = (*siGauge)(nil) + +func (i *siGauge) setDelegate(m metric.Meter) { + ctr, err := m.Int64Gauge(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Int64Gauge).Record(ctx, x, opts...) + } +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go new file mode 100644 index 000000000..adbca7d34 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "log" + "os" + "sync/atomic" + + "github.com/go-logr/logr" + "github.com/go-logr/stdr" +) + +// globalLogger holds a reference to the [logr.Logger] used within +// go.opentelemetry.io/otel. +// +// The default logger uses stdr which is backed by the standard `log.Logger` +// interface. This logger will only show messages at the Error Level. +var globalLogger = func() *atomic.Pointer[logr.Logger] { + l := stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)) + + p := new(atomic.Pointer[logr.Logger]) + p.Store(&l) + return p +}() + +// SetLogger sets the global Logger to l. +// +// To see Warn messages use a logger with `l.V(1).Enabled() == true` +// To see Info messages use a logger with `l.V(4).Enabled() == true` +// To see Debug messages use a logger with `l.V(8).Enabled() == true`. +func SetLogger(l logr.Logger) { + globalLogger.Store(&l) +} + +// GetLogger returns the global logger. +func GetLogger() logr.Logger { + return *globalLogger.Load() +} + +// Info prints messages about the general state of the API or SDK. +// This should usually be less than 5 messages a minute. +func Info(msg string, keysAndValues ...interface{}) { + GetLogger().V(4).Info(msg, keysAndValues...) +} + +// Error prints messages about exceptional states of the API or SDK. +func Error(err error, msg string, keysAndValues ...interface{}) { + GetLogger().Error(err, msg, keysAndValues...) +} + +// Debug prints messages about all internal changes in the API or SDK. +func Debug(msg string, keysAndValues ...interface{}) { + GetLogger().V(8).Info(msg, keysAndValues...) +} + +// Warn prints messages about warnings in the API or SDK. +// Not an error but is likely more important than an informational event. +func Warn(msg string, keysAndValues ...interface{}) { + GetLogger().V(1).Info(msg, keysAndValues...) +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go new file mode 100644 index 000000000..cfd1df9bf --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go @@ -0,0 +1,368 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "container/list" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/embedded" +) + +// meterProvider is a placeholder for a configured SDK MeterProvider. +// +// All MeterProvider functionality is forwarded to a delegate once +// configured. +type meterProvider struct { + embedded.MeterProvider + + mtx sync.Mutex + meters map[il]*meter + + delegate metric.MeterProvider +} + +// setDelegate configures p to delegate all MeterProvider functionality to +// provider. +// +// All Meters provided prior to this function call are switched out to be +// Meters provided by provider. All instruments and callbacks are recreated and +// delegated. +// +// It is guaranteed by the caller that this happens only once. +func (p *meterProvider) setDelegate(provider metric.MeterProvider) { + p.mtx.Lock() + defer p.mtx.Unlock() + + p.delegate = provider + + if len(p.meters) == 0 { + return + } + + for _, meter := range p.meters { + meter.setDelegate(provider) + } + + p.meters = nil +} + +// Meter implements MeterProvider. +func (p *meterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + p.mtx.Lock() + defer p.mtx.Unlock() + + if p.delegate != nil { + return p.delegate.Meter(name, opts...) + } + + // At this moment it is guaranteed that no sdk is installed, save the meter in the meters map. + + c := metric.NewMeterConfig(opts...) + key := il{ + name: name, + version: c.InstrumentationVersion(), + schema: c.SchemaURL(), + } + + if p.meters == nil { + p.meters = make(map[il]*meter) + } + + if val, ok := p.meters[key]; ok { + return val + } + + t := &meter{name: name, opts: opts} + p.meters[key] = t + return t +} + +// meter is a placeholder for a metric.Meter. +// +// All Meter functionality is forwarded to a delegate once configured. +// Otherwise, all functionality is forwarded to a NoopMeter. +type meter struct { + embedded.Meter + + name string + opts []metric.MeterOption + + mtx sync.Mutex + instruments []delegatedInstrument + + registry list.List + + delegate atomic.Value // metric.Meter +} + +type delegatedInstrument interface { + setDelegate(metric.Meter) +} + +// setDelegate configures m to delegate all Meter functionality to Meters +// created by provider. +// +// All subsequent calls to the Meter methods will be passed to the delegate. +// +// It is guaranteed by the caller that this happens only once. +func (m *meter) setDelegate(provider metric.MeterProvider) { + meter := provider.Meter(m.name, m.opts...) + m.delegate.Store(meter) + + m.mtx.Lock() + defer m.mtx.Unlock() + + for _, inst := range m.instruments { + inst.setDelegate(meter) + } + + var n *list.Element + for e := m.registry.Front(); e != nil; e = n { + r := e.Value.(*registration) + r.setDelegate(meter) + n = e.Next() + m.registry.Remove(e) + } + + m.instruments = nil + m.registry.Init() +} + +func (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) (metric.Int64Counter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64Counter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &siCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Int64UpDownCounter(name string, options ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64UpDownCounter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &siUpDownCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64Histogram(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &siHistogram{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64Gauge(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &siGauge{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Int64ObservableCounter(name string, options ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64ObservableCounter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &aiCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Int64ObservableUpDownCounter(name string, options ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64ObservableUpDownCounter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &aiUpDownCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Int64ObservableGauge(name string, options ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64ObservableGauge(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &aiGauge{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64Counter(name string, options ...metric.Float64CounterOption) (metric.Float64Counter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64Counter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &sfCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64UpDownCounter(name string, options ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64UpDownCounter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &sfUpDownCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64Histogram(name string, options ...metric.Float64HistogramOption) (metric.Float64Histogram, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64Histogram(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &sfHistogram{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64Gauge(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &sfGauge{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64ObservableCounter(name string, options ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64ObservableCounter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &afCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64ObservableUpDownCounter(name string, options ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64ObservableUpDownCounter(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &afUpDownCounter{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +func (m *meter) Float64ObservableGauge(name string, options ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64ObservableGauge(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &afGauge{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + +// RegisterCallback captures the function that will be called during Collect. +func (m *meter) RegisterCallback(f metric.Callback, insts ...metric.Observable) (metric.Registration, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + insts = unwrapInstruments(insts) + return del.RegisterCallback(f, insts...) + } + + m.mtx.Lock() + defer m.mtx.Unlock() + + reg := ®istration{instruments: insts, function: f} + e := m.registry.PushBack(reg) + reg.unreg = func() error { + m.mtx.Lock() + _ = m.registry.Remove(e) + m.mtx.Unlock() + return nil + } + return reg, nil +} + +type wrapped interface { + unwrap() metric.Observable +} + +func unwrapInstruments(instruments []metric.Observable) []metric.Observable { + out := make([]metric.Observable, 0, len(instruments)) + + for _, inst := range instruments { + if in, ok := inst.(wrapped); ok { + out = append(out, in.unwrap()) + } else { + out = append(out, inst) + } + } + + return out +} + +type registration struct { + embedded.Registration + + instruments []metric.Observable + function metric.Callback + + unreg func() error + unregMu sync.Mutex +} + +func (c *registration) setDelegate(m metric.Meter) { + insts := unwrapInstruments(c.instruments) + + c.unregMu.Lock() + defer c.unregMu.Unlock() + + if c.unreg == nil { + // Unregister already called. + return + } + + reg, err := m.RegisterCallback(c.function, insts...) + if err != nil { + GetErrorHandler().Handle(err) + } + + c.unreg = reg.Unregister +} + +func (c *registration) Unregister() error { + c.unregMu.Lock() + defer c.unregMu.Unlock() + if c.unreg == nil { + // Unregister already called. + return nil + } + + var err error + err, c.unreg = c.unreg(), nil + return err +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go new file mode 100644 index 000000000..38560ff99 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go @@ -0,0 +1,71 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/propagation" +) + +// textMapPropagator is a default TextMapPropagator that delegates calls to a +// registered delegate if one is set, otherwise it defaults to delegating the +// calls to a the default no-op propagation.TextMapPropagator. +type textMapPropagator struct { + mtx sync.Mutex + once sync.Once + delegate propagation.TextMapPropagator + noop propagation.TextMapPropagator +} + +// Compile-time guarantee that textMapPropagator implements the +// propagation.TextMapPropagator interface. +var _ propagation.TextMapPropagator = (*textMapPropagator)(nil) + +func newTextMapPropagator() *textMapPropagator { + return &textMapPropagator{ + noop: propagation.NewCompositeTextMapPropagator(), + } +} + +// SetDelegate sets a delegate propagation.TextMapPropagator that all calls are +// forwarded to. Delegation can only be performed once, all subsequent calls +// perform no delegation. +func (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) { + if delegate == nil { + return + } + + p.mtx.Lock() + p.once.Do(func() { p.delegate = delegate }) + p.mtx.Unlock() +} + +// effectiveDelegate returns the current delegate of p if one is set, +// otherwise the default noop TextMapPropagator is returned. This method +// can be called concurrently. +func (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator { + p.mtx.Lock() + defer p.mtx.Unlock() + if p.delegate != nil { + return p.delegate + } + return p.noop +} + +// Inject set cross-cutting concerns from the Context into the carrier. +func (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { + p.effectiveDelegate().Inject(ctx, carrier) +} + +// Extract reads cross-cutting concerns from the carrier into a Context. +func (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { + return p.effectiveDelegate().Extract(ctx, carrier) +} + +// Fields returns the keys whose values are set with Inject. +func (p *textMapPropagator) Fields() []string { + return p.effectiveDelegate().Fields() +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go new file mode 100644 index 000000000..204ea142a --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/state.go @@ -0,0 +1,199 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "errors" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" +) + +type ( + errorHandlerHolder struct { + eh ErrorHandler + } + + tracerProviderHolder struct { + tp trace.TracerProvider + } + + propagatorsHolder struct { + tm propagation.TextMapPropagator + } + + meterProviderHolder struct { + mp metric.MeterProvider + } +) + +var ( + globalErrorHandler = defaultErrorHandler() + globalTracer = defaultTracerValue() + globalPropagators = defaultPropagatorsValue() + globalMeterProvider = defaultMeterProvider() + + delegateErrorHandlerOnce sync.Once + delegateTraceOnce sync.Once + delegateTextMapPropagatorOnce sync.Once + delegateMeterOnce sync.Once +) + +// GetErrorHandler returns the global ErrorHandler instance. +// +// The default ErrorHandler instance returned will log all errors to STDERR +// until an override ErrorHandler is set with SetErrorHandler. All +// ErrorHandler returned prior to this will automatically forward errors to +// the set instance instead of logging. +// +// Subsequent calls to SetErrorHandler after the first will not forward errors +// to the new ErrorHandler for prior returned instances. +func GetErrorHandler() ErrorHandler { + return globalErrorHandler.Load().(errorHandlerHolder).eh +} + +// SetErrorHandler sets the global ErrorHandler to h. +// +// The first time this is called all ErrorHandler previously returned from +// GetErrorHandler will send errors to h instead of the default logging +// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not +// delegate errors to h. +func SetErrorHandler(h ErrorHandler) { + current := GetErrorHandler() + + if _, cOk := current.(*ErrDelegator); cOk { + if _, ehOk := h.(*ErrDelegator); ehOk && current == h { + // Do not assign to the delegate of the default ErrDelegator to be + // itself. + Error( + errors.New("no ErrorHandler delegate configured"), + "ErrorHandler remains its current value.", + ) + return + } + } + + delegateErrorHandlerOnce.Do(func() { + if def, ok := current.(*ErrDelegator); ok { + def.setDelegate(h) + } + }) + globalErrorHandler.Store(errorHandlerHolder{eh: h}) +} + +// TracerProvider is the internal implementation for global.TracerProvider. +func TracerProvider() trace.TracerProvider { + return globalTracer.Load().(tracerProviderHolder).tp +} + +// SetTracerProvider is the internal implementation for global.SetTracerProvider. +func SetTracerProvider(tp trace.TracerProvider) { + current := TracerProvider() + + if _, cOk := current.(*tracerProvider); cOk { + if _, tpOk := tp.(*tracerProvider); tpOk && current == tp { + // Do not assign the default delegating TracerProvider to delegate + // to itself. + Error( + errors.New("no delegate configured in tracer provider"), + "Setting tracer provider to its current value. No delegate will be configured", + ) + return + } + } + + delegateTraceOnce.Do(func() { + if def, ok := current.(*tracerProvider); ok { + def.setDelegate(tp) + } + }) + globalTracer.Store(tracerProviderHolder{tp: tp}) +} + +// TextMapPropagator is the internal implementation for global.TextMapPropagator. +func TextMapPropagator() propagation.TextMapPropagator { + return globalPropagators.Load().(propagatorsHolder).tm +} + +// SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator. +func SetTextMapPropagator(p propagation.TextMapPropagator) { + current := TextMapPropagator() + + if _, cOk := current.(*textMapPropagator); cOk { + if _, pOk := p.(*textMapPropagator); pOk && current == p { + // Do not assign the default delegating TextMapPropagator to + // delegate to itself. + Error( + errors.New("no delegate configured in text map propagator"), + "Setting text map propagator to its current value. No delegate will be configured", + ) + return + } + } + + // For the textMapPropagator already returned by TextMapPropagator + // delegate to p. + delegateTextMapPropagatorOnce.Do(func() { + if def, ok := current.(*textMapPropagator); ok { + def.SetDelegate(p) + } + }) + // Return p when subsequent calls to TextMapPropagator are made. + globalPropagators.Store(propagatorsHolder{tm: p}) +} + +// MeterProvider is the internal implementation for global.MeterProvider. +func MeterProvider() metric.MeterProvider { + return globalMeterProvider.Load().(meterProviderHolder).mp +} + +// SetMeterProvider is the internal implementation for global.SetMeterProvider. +func SetMeterProvider(mp metric.MeterProvider) { + current := MeterProvider() + if _, cOk := current.(*meterProvider); cOk { + if _, mpOk := mp.(*meterProvider); mpOk && current == mp { + // Do not assign the default delegating MeterProvider to delegate + // to itself. + Error( + errors.New("no delegate configured in meter provider"), + "Setting meter provider to its current value. No delegate will be configured", + ) + return + } + } + + delegateMeterOnce.Do(func() { + if def, ok := current.(*meterProvider); ok { + def.setDelegate(mp) + } + }) + globalMeterProvider.Store(meterProviderHolder{mp: mp}) +} + +func defaultErrorHandler() *atomic.Value { + v := &atomic.Value{} + v.Store(errorHandlerHolder{eh: &ErrDelegator{}}) + return v +} + +func defaultTracerValue() *atomic.Value { + v := &atomic.Value{} + v.Store(tracerProviderHolder{tp: &tracerProvider{}}) + return v +} + +func defaultPropagatorsValue() *atomic.Value { + v := &atomic.Value{} + v.Store(propagatorsHolder{tm: newTextMapPropagator()}) + return v +} + +func defaultMeterProvider() *atomic.Value { + v := &atomic.Value{} + v.Store(meterProviderHolder{mp: &meterProvider{}}) + return v +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go new file mode 100644 index 000000000..e31f442b4 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/trace.go @@ -0,0 +1,189 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package global // import "go.opentelemetry.io/otel/internal/global" + +/* +This file contains the forwarding implementation of the TracerProvider used as +the default global instance. Prior to initialization of an SDK, Tracers +returned by the global TracerProvider will provide no-op functionality. This +means that all Span created prior to initialization are no-op Spans. + +Once an SDK has been initialized, all provided no-op Tracers are swapped for +Tracers provided by the SDK defined TracerProvider. However, any Span started +prior to this initialization does not change its behavior. Meaning, the Span +remains a no-op Span. + +The implementation to track and swap Tracers locks all new Tracer creation +until the swap is complete. This assumes that this operation is not +performance-critical. If that assumption is incorrect, be sure to configure an +SDK prior to any Tracer creation. +*/ + +import ( + "context" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/otel/trace/embedded" +) + +// tracerProvider is a placeholder for a configured SDK TracerProvider. +// +// All TracerProvider functionality is forwarded to a delegate once +// configured. +type tracerProvider struct { + embedded.TracerProvider + + mtx sync.Mutex + tracers map[il]*tracer + delegate trace.TracerProvider +} + +// Compile-time guarantee that tracerProvider implements the TracerProvider +// interface. +var _ trace.TracerProvider = &tracerProvider{} + +// setDelegate configures p to delegate all TracerProvider functionality to +// provider. +// +// All Tracers provided prior to this function call are switched out to be +// Tracers provided by provider. +// +// It is guaranteed by the caller that this happens only once. +func (p *tracerProvider) setDelegate(provider trace.TracerProvider) { + p.mtx.Lock() + defer p.mtx.Unlock() + + p.delegate = provider + + if len(p.tracers) == 0 { + return + } + + for _, t := range p.tracers { + t.setDelegate(provider) + } + + p.tracers = nil +} + +// Tracer implements TracerProvider. +func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + p.mtx.Lock() + defer p.mtx.Unlock() + + if p.delegate != nil { + return p.delegate.Tracer(name, opts...) + } + + // At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map. + + c := trace.NewTracerConfig(opts...) + key := il{ + name: name, + version: c.InstrumentationVersion(), + schema: c.SchemaURL(), + } + + if p.tracers == nil { + p.tracers = make(map[il]*tracer) + } + + if val, ok := p.tracers[key]; ok { + return val + } + + t := &tracer{name: name, opts: opts, provider: p} + p.tracers[key] = t + return t +} + +type il struct{ name, version, schema string } + +// tracer is a placeholder for a trace.Tracer. +// +// All Tracer functionality is forwarded to a delegate once configured. +// Otherwise, all functionality is forwarded to a NoopTracer. +type tracer struct { + embedded.Tracer + + name string + opts []trace.TracerOption + provider *tracerProvider + + delegate atomic.Value +} + +// Compile-time guarantee that tracer implements the trace.Tracer interface. +var _ trace.Tracer = &tracer{} + +// setDelegate configures t to delegate all Tracer functionality to Tracers +// created by provider. +// +// All subsequent calls to the Tracer methods will be passed to the delegate. +// +// It is guaranteed by the caller that this happens only once. +func (t *tracer) setDelegate(provider trace.TracerProvider) { + t.delegate.Store(provider.Tracer(t.name, t.opts...)) +} + +// Start implements trace.Tracer by forwarding the call to t.delegate if +// set, otherwise it forwards the call to a NoopTracer. +func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { + delegate := t.delegate.Load() + if delegate != nil { + return delegate.(trace.Tracer).Start(ctx, name, opts...) + } + + s := nonRecordingSpan{sc: trace.SpanContextFromContext(ctx), tracer: t} + ctx = trace.ContextWithSpan(ctx, s) + return ctx, s +} + +// nonRecordingSpan is a minimal implementation of a Span that wraps a +// SpanContext. It performs no operations other than to return the wrapped +// SpanContext. +type nonRecordingSpan struct { + embedded.Span + + sc trace.SpanContext + tracer *tracer +} + +var _ trace.Span = nonRecordingSpan{} + +// SpanContext returns the wrapped SpanContext. +func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc } + +// IsRecording always returns false. +func (nonRecordingSpan) IsRecording() bool { return false } + +// SetStatus does nothing. +func (nonRecordingSpan) SetStatus(codes.Code, string) {} + +// SetError does nothing. +func (nonRecordingSpan) SetError(bool) {} + +// SetAttributes does nothing. +func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {} + +// End does nothing. +func (nonRecordingSpan) End(...trace.SpanEndOption) {} + +// RecordError does nothing. +func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {} + +// AddEvent does nothing. +func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {} + +// AddLink does nothing. +func (nonRecordingSpan) AddLink(trace.Link) {} + +// SetName does nothing. +func (nonRecordingSpan) SetName(string) {} + +func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider } diff --git a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go new file mode 100644 index 000000000..3e7bb3b35 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/otel/internal" + +import ( + "math" + "unsafe" +) + +func BoolToRaw(b bool) uint64 { // nolint:revive // b is not a control flag. + if b { + return 1 + } + return 0 +} + +func RawToBool(r uint64) bool { + return r != 0 +} + +func Int64ToRaw(i int64) uint64 { + return uint64(i) +} + +func RawToInt64(r uint64) int64 { + return int64(r) +} + +func Float64ToRaw(f float64) uint64 { + return math.Float64bits(f) +} + +func RawToFloat64(r uint64) float64 { + return math.Float64frombits(r) +} + +func RawPtrToFloat64Ptr(r *uint64) *float64 { + return (*float64)(unsafe.Pointer(r)) +} + +func RawPtrToInt64Ptr(r *uint64) *int64 { + return (*int64)(unsafe.Pointer(r)) +} diff --git a/vendor/go.opentelemetry.io/otel/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal_logging.go new file mode 100644 index 000000000..6de7f2e4d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal_logging.go @@ -0,0 +1,15 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +import ( + "github.com/go-logr/logr" + + "go.opentelemetry.io/otel/internal/global" +) + +// SetLogger configures the logger used internally to opentelemetry. +func SetLogger(logger logr.Logger) { + global.SetLogger(logger) +} diff --git a/vendor/go.opentelemetry.io/otel/metric.go b/vendor/go.opentelemetry.io/otel/metric.go new file mode 100644 index 000000000..1e6473b32 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +import ( + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/metric" +) + +// Meter returns a Meter from the global MeterProvider. The name must be the +// name of the library providing instrumentation. This name may be the same as +// the instrumented code only if that code provides built-in instrumentation. +// If the name is empty, then a implementation defined default name will be +// used instead. +// +// If this is called before a global MeterProvider is registered the returned +// Meter will be a No-op implementation of a Meter. When a global MeterProvider +// is registered for the first time, the returned Meter, and all the +// instruments it has created or will create, are recreated automatically from +// the new MeterProvider. +// +// This is short for GetMeterProvider().Meter(name). +func Meter(name string, opts ...metric.MeterOption) metric.Meter { + return GetMeterProvider().Meter(name, opts...) +} + +// GetMeterProvider returns the registered global meter provider. +// +// If no global GetMeterProvider has been registered, a No-op GetMeterProvider +// implementation is returned. When a global GetMeterProvider is registered for +// the first time, the returned GetMeterProvider, and all the Meters it has +// created or will create, are recreated automatically from the new +// GetMeterProvider. +func GetMeterProvider() metric.MeterProvider { + return global.MeterProvider() +} + +// SetMeterProvider registers mp as the global MeterProvider. +func SetMeterProvider(mp metric.MeterProvider) { + global.SetMeterProvider(mp) +} diff --git a/vendor/go.opentelemetry.io/otel/metric/LICENSE b/vendor/go.opentelemetry.io/otel/metric/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/metric/README.md b/vendor/go.opentelemetry.io/otel/metric/README.md new file mode 100644 index 000000000..0cf902e01 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/README.md @@ -0,0 +1,3 @@ +# Metric API + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric)](https://pkg.go.dev/go.opentelemetry.io/otel/metric) diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go new file mode 100644 index 000000000..cf23db778 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go @@ -0,0 +1,260 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import ( + "context" + + "go.opentelemetry.io/otel/metric/embedded" +) + +// Float64Observable describes a set of instruments used asynchronously to +// record float64 measurements once per collection cycle. Observations of +// these instruments are only made within a callback. +// +// Warning: Methods may be added to this interface in minor releases. +type Float64Observable interface { + Observable + + float64Observable() +} + +// Float64ObservableCounter is an instrument used to asynchronously record +// increasing float64 measurements once per collection cycle. Observations are +// only made within a callback for this instrument. The value observed is +// assumed the to be the cumulative sum of the count. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for +// unimplemented methods. +type Float64ObservableCounter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64ObservableCounter + + Float64Observable +} + +// Float64ObservableCounterConfig contains options for asynchronous counter +// instruments that record float64 values. +type Float64ObservableCounterConfig struct { + description string + unit string + callbacks []Float64Callback +} + +// NewFloat64ObservableCounterConfig returns a new +// [Float64ObservableCounterConfig] with all opts applied. +func NewFloat64ObservableCounterConfig(opts ...Float64ObservableCounterOption) Float64ObservableCounterConfig { + var config Float64ObservableCounterConfig + for _, o := range opts { + config = o.applyFloat64ObservableCounter(config) + } + return config +} + +// Description returns the configured description. +func (c Float64ObservableCounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64ObservableCounterConfig) Unit() string { + return c.unit +} + +// Callbacks returns the configured callbacks. +func (c Float64ObservableCounterConfig) Callbacks() []Float64Callback { + return c.callbacks +} + +// Float64ObservableCounterOption applies options to a +// [Float64ObservableCounterConfig]. See [Float64ObservableOption] and +// [InstrumentOption] for other options that can be used as a +// Float64ObservableCounterOption. +type Float64ObservableCounterOption interface { + applyFloat64ObservableCounter(Float64ObservableCounterConfig) Float64ObservableCounterConfig +} + +// Float64ObservableUpDownCounter is an instrument used to asynchronously +// record float64 measurements once per collection cycle. Observations are only +// made within a callback for this instrument. The value observed is assumed +// the to be the cumulative sum of the count. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64ObservableUpDownCounter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64ObservableUpDownCounter + + Float64Observable +} + +// Float64ObservableUpDownCounterConfig contains options for asynchronous +// counter instruments that record float64 values. +type Float64ObservableUpDownCounterConfig struct { + description string + unit string + callbacks []Float64Callback +} + +// NewFloat64ObservableUpDownCounterConfig returns a new +// [Float64ObservableUpDownCounterConfig] with all opts applied. +func NewFloat64ObservableUpDownCounterConfig(opts ...Float64ObservableUpDownCounterOption) Float64ObservableUpDownCounterConfig { + var config Float64ObservableUpDownCounterConfig + for _, o := range opts { + config = o.applyFloat64ObservableUpDownCounter(config) + } + return config +} + +// Description returns the configured description. +func (c Float64ObservableUpDownCounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64ObservableUpDownCounterConfig) Unit() string { + return c.unit +} + +// Callbacks returns the configured callbacks. +func (c Float64ObservableUpDownCounterConfig) Callbacks() []Float64Callback { + return c.callbacks +} + +// Float64ObservableUpDownCounterOption applies options to a +// [Float64ObservableUpDownCounterConfig]. See [Float64ObservableOption] and +// [InstrumentOption] for other options that can be used as a +// Float64ObservableUpDownCounterOption. +type Float64ObservableUpDownCounterOption interface { + applyFloat64ObservableUpDownCounter(Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig +} + +// Float64ObservableGauge is an instrument used to asynchronously record +// instantaneous float64 measurements once per collection cycle. Observations +// are only made within a callback for this instrument. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64ObservableGauge interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64ObservableGauge + + Float64Observable +} + +// Float64ObservableGaugeConfig contains options for asynchronous counter +// instruments that record float64 values. +type Float64ObservableGaugeConfig struct { + description string + unit string + callbacks []Float64Callback +} + +// NewFloat64ObservableGaugeConfig returns a new [Float64ObservableGaugeConfig] +// with all opts applied. +func NewFloat64ObservableGaugeConfig(opts ...Float64ObservableGaugeOption) Float64ObservableGaugeConfig { + var config Float64ObservableGaugeConfig + for _, o := range opts { + config = o.applyFloat64ObservableGauge(config) + } + return config +} + +// Description returns the configured description. +func (c Float64ObservableGaugeConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64ObservableGaugeConfig) Unit() string { + return c.unit +} + +// Callbacks returns the configured callbacks. +func (c Float64ObservableGaugeConfig) Callbacks() []Float64Callback { + return c.callbacks +} + +// Float64ObservableGaugeOption applies options to a +// [Float64ObservableGaugeConfig]. See [Float64ObservableOption] and +// [InstrumentOption] for other options that can be used as a +// Float64ObservableGaugeOption. +type Float64ObservableGaugeOption interface { + applyFloat64ObservableGauge(Float64ObservableGaugeConfig) Float64ObservableGaugeConfig +} + +// Float64Observer is a recorder of float64 measurements. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64Observer interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64Observer + + // Observe records the float64 value. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Observe(value float64, options ...ObserveOption) +} + +// Float64Callback is a function registered with a Meter that makes +// observations for a Float64Observerable instrument it is registered with. +// Calls to the Float64Observer record measurement values for the +// Float64Observable. +// +// The function needs to complete in a finite amount of time and the deadline +// of the passed context is expected to be honored. +// +// The function needs to make unique observations across all registered +// Float64Callbacks. Meaning, it should not report measurements with the same +// attributes as another Float64Callbacks also registered for the same +// instrument. +// +// The function needs to be concurrent safe. +type Float64Callback func(context.Context, Float64Observer) error + +// Float64ObservableOption applies options to float64 Observer instruments. +type Float64ObservableOption interface { + Float64ObservableCounterOption + Float64ObservableUpDownCounterOption + Float64ObservableGaugeOption +} + +type float64CallbackOpt struct { + cback Float64Callback +} + +func (o float64CallbackOpt) applyFloat64ObservableCounter(cfg Float64ObservableCounterConfig) Float64ObservableCounterConfig { + cfg.callbacks = append(cfg.callbacks, o.cback) + return cfg +} + +func (o float64CallbackOpt) applyFloat64ObservableUpDownCounter(cfg Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig { + cfg.callbacks = append(cfg.callbacks, o.cback) + return cfg +} + +func (o float64CallbackOpt) applyFloat64ObservableGauge(cfg Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { + cfg.callbacks = append(cfg.callbacks, o.cback) + return cfg +} + +// WithFloat64Callback adds callback to be called for an instrument. +func WithFloat64Callback(callback Float64Callback) Float64ObservableOption { + return float64CallbackOpt{callback} +} diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go new file mode 100644 index 000000000..c82ba5324 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go @@ -0,0 +1,258 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import ( + "context" + + "go.opentelemetry.io/otel/metric/embedded" +) + +// Int64Observable describes a set of instruments used asynchronously to record +// int64 measurements once per collection cycle. Observations of these +// instruments are only made within a callback. +// +// Warning: Methods may be added to this interface in minor releases. +type Int64Observable interface { + Observable + + int64Observable() +} + +// Int64ObservableCounter is an instrument used to asynchronously record +// increasing int64 measurements once per collection cycle. Observations are +// only made within a callback for this instrument. The value observed is +// assumed the to be the cumulative sum of the count. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64ObservableCounter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64ObservableCounter + + Int64Observable +} + +// Int64ObservableCounterConfig contains options for asynchronous counter +// instruments that record int64 values. +type Int64ObservableCounterConfig struct { + description string + unit string + callbacks []Int64Callback +} + +// NewInt64ObservableCounterConfig returns a new [Int64ObservableCounterConfig] +// with all opts applied. +func NewInt64ObservableCounterConfig(opts ...Int64ObservableCounterOption) Int64ObservableCounterConfig { + var config Int64ObservableCounterConfig + for _, o := range opts { + config = o.applyInt64ObservableCounter(config) + } + return config +} + +// Description returns the configured description. +func (c Int64ObservableCounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64ObservableCounterConfig) Unit() string { + return c.unit +} + +// Callbacks returns the configured callbacks. +func (c Int64ObservableCounterConfig) Callbacks() []Int64Callback { + return c.callbacks +} + +// Int64ObservableCounterOption applies options to a +// [Int64ObservableCounterConfig]. See [Int64ObservableOption] and +// [InstrumentOption] for other options that can be used as an +// Int64ObservableCounterOption. +type Int64ObservableCounterOption interface { + applyInt64ObservableCounter(Int64ObservableCounterConfig) Int64ObservableCounterConfig +} + +// Int64ObservableUpDownCounter is an instrument used to asynchronously record +// int64 measurements once per collection cycle. Observations are only made +// within a callback for this instrument. The value observed is assumed the to +// be the cumulative sum of the count. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64ObservableUpDownCounter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64ObservableUpDownCounter + + Int64Observable +} + +// Int64ObservableUpDownCounterConfig contains options for asynchronous counter +// instruments that record int64 values. +type Int64ObservableUpDownCounterConfig struct { + description string + unit string + callbacks []Int64Callback +} + +// NewInt64ObservableUpDownCounterConfig returns a new +// [Int64ObservableUpDownCounterConfig] with all opts applied. +func NewInt64ObservableUpDownCounterConfig(opts ...Int64ObservableUpDownCounterOption) Int64ObservableUpDownCounterConfig { + var config Int64ObservableUpDownCounterConfig + for _, o := range opts { + config = o.applyInt64ObservableUpDownCounter(config) + } + return config +} + +// Description returns the configured description. +func (c Int64ObservableUpDownCounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64ObservableUpDownCounterConfig) Unit() string { + return c.unit +} + +// Callbacks returns the configured callbacks. +func (c Int64ObservableUpDownCounterConfig) Callbacks() []Int64Callback { + return c.callbacks +} + +// Int64ObservableUpDownCounterOption applies options to a +// [Int64ObservableUpDownCounterConfig]. See [Int64ObservableOption] and +// [InstrumentOption] for other options that can be used as an +// Int64ObservableUpDownCounterOption. +type Int64ObservableUpDownCounterOption interface { + applyInt64ObservableUpDownCounter(Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig +} + +// Int64ObservableGauge is an instrument used to asynchronously record +// instantaneous int64 measurements once per collection cycle. Observations are +// only made within a callback for this instrument. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64ObservableGauge interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64ObservableGauge + + Int64Observable +} + +// Int64ObservableGaugeConfig contains options for asynchronous counter +// instruments that record int64 values. +type Int64ObservableGaugeConfig struct { + description string + unit string + callbacks []Int64Callback +} + +// NewInt64ObservableGaugeConfig returns a new [Int64ObservableGaugeConfig] +// with all opts applied. +func NewInt64ObservableGaugeConfig(opts ...Int64ObservableGaugeOption) Int64ObservableGaugeConfig { + var config Int64ObservableGaugeConfig + for _, o := range opts { + config = o.applyInt64ObservableGauge(config) + } + return config +} + +// Description returns the configured description. +func (c Int64ObservableGaugeConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64ObservableGaugeConfig) Unit() string { + return c.unit +} + +// Callbacks returns the configured callbacks. +func (c Int64ObservableGaugeConfig) Callbacks() []Int64Callback { + return c.callbacks +} + +// Int64ObservableGaugeOption applies options to a +// [Int64ObservableGaugeConfig]. See [Int64ObservableOption] and +// [InstrumentOption] for other options that can be used as an +// Int64ObservableGaugeOption. +type Int64ObservableGaugeOption interface { + applyInt64ObservableGauge(Int64ObservableGaugeConfig) Int64ObservableGaugeConfig +} + +// Int64Observer is a recorder of int64 measurements. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64Observer interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64Observer + + // Observe records the int64 value. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Observe(value int64, options ...ObserveOption) +} + +// Int64Callback is a function registered with a Meter that makes observations +// for an Int64Observerable instrument it is registered with. Calls to the +// Int64Observer record measurement values for the Int64Observable. +// +// The function needs to complete in a finite amount of time and the deadline +// of the passed context is expected to be honored. +// +// The function needs to make unique observations across all registered +// Int64Callbacks. Meaning, it should not report measurements with the same +// attributes as another Int64Callbacks also registered for the same +// instrument. +// +// The function needs to be concurrent safe. +type Int64Callback func(context.Context, Int64Observer) error + +// Int64ObservableOption applies options to int64 Observer instruments. +type Int64ObservableOption interface { + Int64ObservableCounterOption + Int64ObservableUpDownCounterOption + Int64ObservableGaugeOption +} + +type int64CallbackOpt struct { + cback Int64Callback +} + +func (o int64CallbackOpt) applyInt64ObservableCounter(cfg Int64ObservableCounterConfig) Int64ObservableCounterConfig { + cfg.callbacks = append(cfg.callbacks, o.cback) + return cfg +} + +func (o int64CallbackOpt) applyInt64ObservableUpDownCounter(cfg Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig { + cfg.callbacks = append(cfg.callbacks, o.cback) + return cfg +} + +func (o int64CallbackOpt) applyInt64ObservableGauge(cfg Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { + cfg.callbacks = append(cfg.callbacks, o.cback) + return cfg +} + +// WithInt64Callback adds callback to be called for an instrument. +func WithInt64Callback(callback Int64Callback) Int64ObservableOption { + return int64CallbackOpt{callback} +} diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go new file mode 100644 index 000000000..d9e3b13e4 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/config.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import "go.opentelemetry.io/otel/attribute" + +// MeterConfig contains options for Meters. +type MeterConfig struct { + instrumentationVersion string + schemaURL string + attrs attribute.Set + + // Ensure forward compatibility by explicitly making this not comparable. + noCmp [0]func() //nolint: unused // This is indeed used. +} + +// InstrumentationVersion returns the version of the library providing +// instrumentation. +func (cfg MeterConfig) InstrumentationVersion() string { + return cfg.instrumentationVersion +} + +// InstrumentationAttributes returns the attributes associated with the library +// providing instrumentation. +func (cfg MeterConfig) InstrumentationAttributes() attribute.Set { + return cfg.attrs +} + +// SchemaURL is the schema_url of the library providing instrumentation. +func (cfg MeterConfig) SchemaURL() string { + return cfg.schemaURL +} + +// MeterOption is an interface for applying Meter options. +type MeterOption interface { + // applyMeter is used to set a MeterOption value of a MeterConfig. + applyMeter(MeterConfig) MeterConfig +} + +// NewMeterConfig creates a new MeterConfig and applies +// all the given options. +func NewMeterConfig(opts ...MeterOption) MeterConfig { + var config MeterConfig + for _, o := range opts { + config = o.applyMeter(config) + } + return config +} + +type meterOptionFunc func(MeterConfig) MeterConfig + +func (fn meterOptionFunc) applyMeter(cfg MeterConfig) MeterConfig { + return fn(cfg) +} + +// WithInstrumentationVersion sets the instrumentation version. +func WithInstrumentationVersion(version string) MeterOption { + return meterOptionFunc(func(config MeterConfig) MeterConfig { + config.instrumentationVersion = version + return config + }) +} + +// WithInstrumentationAttributes sets the instrumentation attributes. +// +// The passed attributes will be de-duplicated. +func WithInstrumentationAttributes(attr ...attribute.KeyValue) MeterOption { + return meterOptionFunc(func(config MeterConfig) MeterConfig { + config.attrs = attribute.NewSet(attr...) + return config + }) +} + +// WithSchemaURL sets the schema URL. +func WithSchemaURL(schemaURL string) MeterOption { + return meterOptionFunc(func(config MeterConfig) MeterConfig { + config.schemaURL = schemaURL + return config + }) +} diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go new file mode 100644 index 000000000..f153745b0 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/doc.go @@ -0,0 +1,177 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package metric provides the OpenTelemetry API used to measure metrics about +source code operation. + +This API is separate from its implementation so the instrumentation built from +it is reusable. See [go.opentelemetry.io/otel/sdk/metric] for the official +OpenTelemetry implementation of this API. + +All measurements made with this package are made via instruments. These +instruments are created by a [Meter] which itself is created by a +[MeterProvider]. Applications need to accept a [MeterProvider] implementation +as a starting point when instrumenting. This can be done directly, or by using +the OpenTelemetry global MeterProvider via [GetMeterProvider]. Using an +appropriately named [Meter] from the accepted [MeterProvider], instrumentation +can then be built from the [Meter]'s instruments. + +# Instruments + +Each instrument is designed to make measurements of a particular type. Broadly, +all instruments fall into two overlapping logical categories: asynchronous or +synchronous, and int64 or float64. + +All synchronous instruments ([Int64Counter], [Int64UpDownCounter], +[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and +[Float64Histogram]) are used to measure the operation and performance of source +code during the source code execution. These instruments only make measurements +when the source code they instrument is run. + +All asynchronous instruments ([Int64ObservableCounter], +[Int64ObservableUpDownCounter], [Int64ObservableGauge], +[Float64ObservableCounter], [Float64ObservableUpDownCounter], and +[Float64ObservableGauge]) are used to measure metrics outside of the execution +of source code. They are said to make "observations" via a callback function +called once every measurement collection cycle. + +Each instrument is also grouped by the value type it measures. Either int64 or +float64. The value being measured will dictate which instrument in these +categories to use. + +Outside of these two broad categories, instruments are described by the +function they are designed to serve. All Counters ([Int64Counter], +[Float64Counter], [Int64ObservableCounter], and [Float64ObservableCounter]) are +designed to measure values that never decrease in value, but instead only +incrementally increase in value. UpDownCounters ([Int64UpDownCounter], +[Float64UpDownCounter], [Int64ObservableUpDownCounter], and +[Float64ObservableUpDownCounter]) on the other hand, are designed to measure +values that can increase and decrease. When more information needs to be +conveyed about all the synchronous measurements made during a collection cycle, +a Histogram ([Int64Histogram] and [Float64Histogram]) should be used. Finally, +when just the most recent measurement needs to be conveyed about an +asynchronous measurement, a Gauge ([Int64ObservableGauge] and +[Float64ObservableGauge]) should be used. + +See the [OpenTelemetry documentation] for more information about instruments +and their intended use. + +# Instrument Name + +OpenTelemetry defines an [instrument name syntax] that restricts what +instrument names are allowed. + +Instrument names should ... + + - Not be empty. + - Have an alphabetic character as their first letter. + - Have any letter after the first be an alphanumeric character, ‘_’, ‘.’, + ‘-’, or ‘/’. + - Have a maximum length of 255 letters. + +To ensure compatibility with observability platforms, all instruments created +need to conform to this syntax. Not all implementations of the API will validate +these names, it is the callers responsibility to ensure compliance. + +# Measurements + +Measurements are made by recording values and information about the values with +an instrument. How these measurements are recorded depends on the instrument. + +Measurements for synchronous instruments ([Int64Counter], [Int64UpDownCounter], +[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and +[Float64Histogram]) are recorded using the instrument methods directly. All +counter instruments have an Add method that is used to measure an increment +value, and all histogram instruments have a Record method to measure a data +point. + +Asynchronous instruments ([Int64ObservableCounter], +[Int64ObservableUpDownCounter], [Int64ObservableGauge], +[Float64ObservableCounter], [Float64ObservableUpDownCounter], and +[Float64ObservableGauge]) record measurements within a callback function. The +callback is registered with the Meter which ensures the callback is called once +per collection cycle. A callback can be registered two ways: during the +instrument's creation using an option, or later using the RegisterCallback +method of the [Meter] that created the instrument. + +If the following criteria are met, an option ([WithInt64Callback] or +[WithFloat64Callback]) can be used during the asynchronous instrument's +creation to register a callback ([Int64Callback] or [Float64Callback], +respectively): + + - The measurement process is known when the instrument is created + - Only that instrument will make a measurement within the callback + - The callback never needs to be unregistered + +If the criteria are not met, use the RegisterCallback method of the [Meter] that +created the instrument to register a [Callback]. + +# API Implementations + +This package does not conform to the standard Go versioning policy, all of its +interfaces may have methods added to them without a package major version bump. +This non-standard API evolution could surprise an uninformed implementation +author. They could unknowingly build their implementation in a way that would +result in a runtime panic for their users that update to the new API. + +The API is designed to help inform an instrumentation author about this +non-standard API evolution. It requires them to choose a default behavior for +unimplemented interface methods. There are three behavior choices they can +make: + + - Compilation failure + - Panic + - Default to another implementation + +All interfaces in this API embed a corresponding interface from +[go.opentelemetry.io/otel/metric/embedded]. If an author wants the default +behavior of their implementations to be a compilation failure, signaling to +their users they need to update to the latest version of that implementation, +they need to embed the corresponding interface from +[go.opentelemetry.io/otel/metric/embedded] in their implementation. For +example, + + import "go.opentelemetry.io/otel/metric/embedded" + + type MeterProvider struct { + embedded.MeterProvider + // ... + } + +If an author wants the default behavior of their implementations to a panic, +they need to embed the API interface directly. + + import "go.opentelemetry.io/otel/metric" + + type MeterProvider struct { + metric.MeterProvider + // ... + } + +This is not a recommended behavior as it could lead to publishing packages that +contain runtime panics when users update other package that use newer versions +of [go.opentelemetry.io/otel/metric]. + +Finally, an author can embed another implementation in theirs. The embedded +implementation will be used for methods not defined by the author. For example, +an author who wants to default to silently dropping the call can use +[go.opentelemetry.io/otel/metric/noop]: + + import "go.opentelemetry.io/otel/metric/noop" + + type MeterProvider struct { + noop.MeterProvider + // ... + } + +It is strongly recommended that authors only embed +[go.opentelemetry.io/otel/metric/noop] if they choose this default behavior. +That implementation is the only one OpenTelemetry authors can guarantee will +fully implement all the API interfaces when a user updates their API. + +[instrument name syntax]: https://opentelemetry.io/docs/specs/otel/metrics/api/#instrument-name-syntax +[OpenTelemetry documentation]: https://opentelemetry.io/docs/concepts/signals/metrics/ +[GetMeterProvider]: https://pkg.go.dev/go.opentelemetry.io/otel#GetMeterProvider +*/ +package metric // import "go.opentelemetry.io/otel/metric" diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/README.md b/vendor/go.opentelemetry.io/otel/metric/embedded/README.md new file mode 100644 index 000000000..1f6e0efa7 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/embedded/README.md @@ -0,0 +1,3 @@ +# Metric Embedded + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/embedded) diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go new file mode 100644 index 000000000..1a9dc6809 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go @@ -0,0 +1,243 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package embedded provides interfaces embedded within the [OpenTelemetry +// metric API]. +// +// Implementers of the [OpenTelemetry metric API] can embed the relevant type +// from this package into their implementation directly. Doing so will result +// in a compilation error for users when the [OpenTelemetry metric API] is +// extended (which is something that can happen without a major version bump of +// the API package). +// +// [OpenTelemetry metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric +package embedded // import "go.opentelemetry.io/otel/metric/embedded" + +// MeterProvider is embedded in +// [go.opentelemetry.io/otel/metric.MeterProvider]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.MeterProvider] if you want users to +// experience a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.MeterProvider] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type MeterProvider interface{ meterProvider() } + +// Meter is embedded in [go.opentelemetry.io/otel/metric.Meter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Meter] if you want users to experience a +// compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Meter] interface +// is extended (which is something that can happen without a major version bump +// of the API package). +type Meter interface{ meter() } + +// Float64Observer is embedded in +// [go.opentelemetry.io/otel/metric.Float64Observer]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64Observer] if you want +// users to experience a compilation error, signaling they need to update to +// your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64Observer] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Float64Observer interface{ float64Observer() } + +// Int64Observer is embedded in +// [go.opentelemetry.io/otel/metric.Int64Observer]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64Observer] if you want users +// to experience a compilation error, signaling they need to update to your +// latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64Observer] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Int64Observer interface{ int64Observer() } + +// Observer is embedded in [go.opentelemetry.io/otel/metric.Observer]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Observer] if you want users to experience a +// compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Observer] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Observer interface{ observer() } + +// Registration is embedded in [go.opentelemetry.io/otel/metric.Registration]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Registration] if you want users to +// experience a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Registration] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Registration interface{ registration() } + +// Float64Counter is embedded in +// [go.opentelemetry.io/otel/metric.Float64Counter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64Counter] if you want +// users to experience a compilation error, signaling they need to update to +// your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64Counter] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Float64Counter interface{ float64Counter() } + +// Float64Histogram is embedded in +// [go.opentelemetry.io/otel/metric.Float64Histogram]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64Histogram] if you want +// users to experience a compilation error, signaling they need to update to +// your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64Histogram] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Float64Histogram interface{ float64Histogram() } + +// Float64Gauge is embedded in [go.opentelemetry.io/otel/metric.Float64Gauge]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64Gauge] if you want users to +// experience a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Float64Gauge] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Float64Gauge interface{ float64Gauge() } + +// Float64ObservableCounter is embedded in +// [go.opentelemetry.io/otel/metric.Float64ObservableCounter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64ObservableCounter] if you +// want users to experience a compilation error, signaling they need to update +// to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64ObservableCounter] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Float64ObservableCounter interface{ float64ObservableCounter() } + +// Float64ObservableGauge is embedded in +// [go.opentelemetry.io/otel/metric.Float64ObservableGauge]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64ObservableGauge] if you +// want users to experience a compilation error, signaling they need to update +// to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64ObservableGauge] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Float64ObservableGauge interface{ float64ObservableGauge() } + +// Float64ObservableUpDownCounter is embedded in +// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter] +// if you want users to experience a compilation error, signaling they need to +// update to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Float64ObservableUpDownCounter interface{ float64ObservableUpDownCounter() } + +// Float64UpDownCounter is embedded in +// [go.opentelemetry.io/otel/metric.Float64UpDownCounter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64UpDownCounter] if you +// want users to experience a compilation error, signaling they need to update +// to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Float64UpDownCounter] interface +// is extended (which is something that can happen without a major version bump +// of the API package). +type Float64UpDownCounter interface{ float64UpDownCounter() } + +// Int64Counter is embedded in +// [go.opentelemetry.io/otel/metric.Int64Counter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64Counter] if you want users +// to experience a compilation error, signaling they need to update to your +// latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64Counter] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Int64Counter interface{ int64Counter() } + +// Int64Histogram is embedded in +// [go.opentelemetry.io/otel/metric.Int64Histogram]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64Histogram] if you want +// users to experience a compilation error, signaling they need to update to +// your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64Histogram] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Int64Histogram interface{ int64Histogram() } + +// Int64Gauge is embedded in [go.opentelemetry.io/otel/metric.Int64Gauge]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64Gauge] if you want users to experience +// a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Int64Gauge] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Int64Gauge interface{ int64Gauge() } + +// Int64ObservableCounter is embedded in +// [go.opentelemetry.io/otel/metric.Int64ObservableCounter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64ObservableCounter] if you +// want users to experience a compilation error, signaling they need to update +// to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64ObservableCounter] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Int64ObservableCounter interface{ int64ObservableCounter() } + +// Int64ObservableGauge is embedded in +// [go.opentelemetry.io/otel/metric.Int64ObservableGauge]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64ObservableGauge] if you +// want users to experience a compilation error, signaling they need to update +// to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64ObservableGauge] interface +// is extended (which is something that can happen without a major version bump +// of the API package). +type Int64ObservableGauge interface{ int64ObservableGauge() } + +// Int64ObservableUpDownCounter is embedded in +// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] if +// you want users to experience a compilation error, signaling they need to +// update to your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Int64ObservableUpDownCounter interface{ int64ObservableUpDownCounter() } + +// Int64UpDownCounter is embedded in +// [go.opentelemetry.io/otel/metric.Int64UpDownCounter]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64UpDownCounter] if you want +// users to experience a compilation error, signaling they need to update to +// your latest implementation, when the +// [go.opentelemetry.io/otel/metric.Int64UpDownCounter] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Int64UpDownCounter interface{ int64UpDownCounter() } diff --git a/vendor/go.opentelemetry.io/otel/metric/instrument.go b/vendor/go.opentelemetry.io/otel/metric/instrument.go new file mode 100644 index 000000000..ea52e4023 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/instrument.go @@ -0,0 +1,368 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import "go.opentelemetry.io/otel/attribute" + +// Observable is used as a grouping mechanism for all instruments that are +// updated within a Callback. +type Observable interface { + observable() +} + +// InstrumentOption applies options to all instruments. +type InstrumentOption interface { + Int64CounterOption + Int64UpDownCounterOption + Int64HistogramOption + Int64GaugeOption + Int64ObservableCounterOption + Int64ObservableUpDownCounterOption + Int64ObservableGaugeOption + + Float64CounterOption + Float64UpDownCounterOption + Float64HistogramOption + Float64GaugeOption + Float64ObservableCounterOption + Float64ObservableUpDownCounterOption + Float64ObservableGaugeOption +} + +// HistogramOption applies options to histogram instruments. +type HistogramOption interface { + Int64HistogramOption + Float64HistogramOption +} + +type descOpt string + +func (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyFloat64ObservableUpDownCounter(c Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64ObservableUpDownCounter(c Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig { + c.description = string(o) + return c +} + +func (o descOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { + c.description = string(o) + return c +} + +// WithDescription sets the instrument description. +func WithDescription(desc string) InstrumentOption { return descOpt(desc) } + +type unitOpt string + +func (o unitOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyFloat64ObservableUpDownCounter(c Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64ObservableUpDownCounter(c Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig { + c.unit = string(o) + return c +} + +func (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { + c.unit = string(o) + return c +} + +// WithUnit sets the instrument unit. +// +// The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code. +func WithUnit(u string) InstrumentOption { return unitOpt(u) } + +// WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries. +// +// This option is considered "advisory", and may be ignored by API implementations. +func WithExplicitBucketBoundaries(bounds ...float64) HistogramOption { return bucketOpt(bounds) } + +type bucketOpt []float64 + +func (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { + c.explicitBucketBoundaries = o + return c +} + +func (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { + c.explicitBucketBoundaries = o + return c +} + +// AddOption applies options to an addition measurement. See +// [MeasurementOption] for other options that can be used as an AddOption. +type AddOption interface { + applyAdd(AddConfig) AddConfig +} + +// AddConfig contains options for an addition measurement. +type AddConfig struct { + attrs attribute.Set +} + +// NewAddConfig returns a new [AddConfig] with all opts applied. +func NewAddConfig(opts []AddOption) AddConfig { + config := AddConfig{attrs: *attribute.EmptySet()} + for _, o := range opts { + config = o.applyAdd(config) + } + return config +} + +// Attributes returns the configured attribute set. +func (c AddConfig) Attributes() attribute.Set { + return c.attrs +} + +// RecordOption applies options to an addition measurement. See +// [MeasurementOption] for other options that can be used as a RecordOption. +type RecordOption interface { + applyRecord(RecordConfig) RecordConfig +} + +// RecordConfig contains options for a recorded measurement. +type RecordConfig struct { + attrs attribute.Set +} + +// NewRecordConfig returns a new [RecordConfig] with all opts applied. +func NewRecordConfig(opts []RecordOption) RecordConfig { + config := RecordConfig{attrs: *attribute.EmptySet()} + for _, o := range opts { + config = o.applyRecord(config) + } + return config +} + +// Attributes returns the configured attribute set. +func (c RecordConfig) Attributes() attribute.Set { + return c.attrs +} + +// ObserveOption applies options to an addition measurement. See +// [MeasurementOption] for other options that can be used as a ObserveOption. +type ObserveOption interface { + applyObserve(ObserveConfig) ObserveConfig +} + +// ObserveConfig contains options for an observed measurement. +type ObserveConfig struct { + attrs attribute.Set +} + +// NewObserveConfig returns a new [ObserveConfig] with all opts applied. +func NewObserveConfig(opts []ObserveOption) ObserveConfig { + config := ObserveConfig{attrs: *attribute.EmptySet()} + for _, o := range opts { + config = o.applyObserve(config) + } + return config +} + +// Attributes returns the configured attribute set. +func (c ObserveConfig) Attributes() attribute.Set { + return c.attrs +} + +// MeasurementOption applies options to all instrument measurement. +type MeasurementOption interface { + AddOption + RecordOption + ObserveOption +} + +type attrOpt struct { + set attribute.Set +} + +// mergeSets returns the union of keys between a and b. Any duplicate keys will +// use the value associated with b. +func mergeSets(a, b attribute.Set) attribute.Set { + // NewMergeIterator uses the first value for any duplicates. + iter := attribute.NewMergeIterator(&b, &a) + merged := make([]attribute.KeyValue, 0, a.Len()+b.Len()) + for iter.Next() { + merged = append(merged, iter.Attribute()) + } + return attribute.NewSet(merged...) +} + +func (o attrOpt) applyAdd(c AddConfig) AddConfig { + switch { + case o.set.Len() == 0: + case c.attrs.Len() == 0: + c.attrs = o.set + default: + c.attrs = mergeSets(c.attrs, o.set) + } + return c +} + +func (o attrOpt) applyRecord(c RecordConfig) RecordConfig { + switch { + case o.set.Len() == 0: + case c.attrs.Len() == 0: + c.attrs = o.set + default: + c.attrs = mergeSets(c.attrs, o.set) + } + return c +} + +func (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig { + switch { + case o.set.Len() == 0: + case c.attrs.Len() == 0: + c.attrs = o.set + default: + c.attrs = mergeSets(c.attrs, o.set) + } + return c +} + +// WithAttributeSet sets the attribute Set associated with a measurement is +// made with. +// +// If multiple WithAttributeSet or WithAttributes options are passed the +// attributes will be merged together in the order they are passed. Attributes +// with duplicate keys will use the last value passed. +func WithAttributeSet(attributes attribute.Set) MeasurementOption { + return attrOpt{set: attributes} +} + +// WithAttributes converts attributes into an attribute Set and sets the Set to +// be associated with a measurement. This is shorthand for: +// +// cp := make([]attribute.KeyValue, len(attributes)) +// copy(cp, attributes) +// WithAttributes(attribute.NewSet(cp...)) +// +// [attribute.NewSet] may modify the passed attributes so this will make a copy +// of attributes before creating a set in order to ensure this function is +// concurrent safe. This makes this option function less optimized in +// comparison to [WithAttributeSet]. Therefore, [WithAttributeSet] should be +// preferred for performance sensitive code. +// +// See [WithAttributeSet] for information about how multiple WithAttributes are +// merged. +func WithAttributes(attributes ...attribute.KeyValue) MeasurementOption { + cp := make([]attribute.KeyValue, len(attributes)) + copy(cp, attributes) + return attrOpt{set: attribute.NewSet(cp...)} +} diff --git a/vendor/go.opentelemetry.io/otel/metric/meter.go b/vendor/go.opentelemetry.io/otel/metric/meter.go new file mode 100644 index 000000000..6a7991e01 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/meter.go @@ -0,0 +1,265 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import ( + "context" + + "go.opentelemetry.io/otel/metric/embedded" +) + +// MeterProvider provides access to named Meter instances, for instrumenting +// an application or package. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type MeterProvider interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.MeterProvider + + // Meter returns a new Meter with the provided name and configuration. + // + // A Meter should be scoped at most to a single package. The name needs to + // be unique so it does not collide with other names used by + // an application, nor other applications. To achieve this, the import path + // of the instrumentation package is recommended to be used as name. + // + // If the name is empty, then an implementation defined default name will + // be used instead. + Meter(name string, opts ...MeterOption) Meter +} + +// Meter provides access to instrument instances for recording metrics. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Meter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Meter + + // Int64Counter returns a new Int64Counter instrument identified by name + // and configured with options. The instrument is used to synchronously + // record increasing int64 measurements during a computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64Counter(name string, options ...Int64CounterOption) (Int64Counter, error) + // Int64UpDownCounter returns a new Int64UpDownCounter instrument + // identified by name and configured with options. The instrument is used + // to synchronously record int64 measurements during a computational + // operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64UpDownCounter(name string, options ...Int64UpDownCounterOption) (Int64UpDownCounter, error) + // Int64Histogram returns a new Int64Histogram instrument identified by + // name and configured with options. The instrument is used to + // synchronously record the distribution of int64 measurements during a + // computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error) + // Int64Gauge returns a new Int64Gauge instrument identified by name and + // configured with options. The instrument is used to synchronously record + // instantaneous int64 measurements during a computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error) + // Int64ObservableCounter returns a new Int64ObservableCounter identified + // by name and configured with options. The instrument is used to + // asynchronously record increasing int64 measurements once per a + // measurement collection cycle. + // + // Measurements for the returned instrument are made via a callback. Use + // the WithInt64Callback option to register the callback here, or use the + // RegisterCallback method of this Meter to register one later. See the + // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64ObservableCounter(name string, options ...Int64ObservableCounterOption) (Int64ObservableCounter, error) + // Int64ObservableUpDownCounter returns a new Int64ObservableUpDownCounter + // instrument identified by name and configured with options. The + // instrument is used to asynchronously record int64 measurements once per + // a measurement collection cycle. + // + // Measurements for the returned instrument are made via a callback. Use + // the WithInt64Callback option to register the callback here, or use the + // RegisterCallback method of this Meter to register one later. See the + // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64ObservableUpDownCounter(name string, options ...Int64ObservableUpDownCounterOption) (Int64ObservableUpDownCounter, error) + // Int64ObservableGauge returns a new Int64ObservableGauge instrument + // identified by name and configured with options. The instrument is used + // to asynchronously record instantaneous int64 measurements once per a + // measurement collection cycle. + // + // Measurements for the returned instrument are made via a callback. Use + // the WithInt64Callback option to register the callback here, or use the + // RegisterCallback method of this Meter to register one later. See the + // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Int64ObservableGauge(name string, options ...Int64ObservableGaugeOption) (Int64ObservableGauge, error) + + // Float64Counter returns a new Float64Counter instrument identified by + // name and configured with options. The instrument is used to + // synchronously record increasing float64 measurements during a + // computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64Counter(name string, options ...Float64CounterOption) (Float64Counter, error) + // Float64UpDownCounter returns a new Float64UpDownCounter instrument + // identified by name and configured with options. The instrument is used + // to synchronously record float64 measurements during a computational + // operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64UpDownCounter(name string, options ...Float64UpDownCounterOption) (Float64UpDownCounter, error) + // Float64Histogram returns a new Float64Histogram instrument identified by + // name and configured with options. The instrument is used to + // synchronously record the distribution of float64 measurements during a + // computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error) + // Float64Gauge returns a new Float64Gauge instrument identified by name and + // configured with options. The instrument is used to synchronously record + // instantaneous float64 measurements during a computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error) + // Float64ObservableCounter returns a new Float64ObservableCounter + // instrument identified by name and configured with options. The + // instrument is used to asynchronously record increasing float64 + // measurements once per a measurement collection cycle. + // + // Measurements for the returned instrument are made via a callback. Use + // the WithFloat64Callback option to register the callback here, or use the + // RegisterCallback method of this Meter to register one later. See the + // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64ObservableCounter(name string, options ...Float64ObservableCounterOption) (Float64ObservableCounter, error) + // Float64ObservableUpDownCounter returns a new + // Float64ObservableUpDownCounter instrument identified by name and + // configured with options. The instrument is used to asynchronously record + // float64 measurements once per a measurement collection cycle. + // + // Measurements for the returned instrument are made via a callback. Use + // the WithFloat64Callback option to register the callback here, or use the + // RegisterCallback method of this Meter to register one later. See the + // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64ObservableUpDownCounter(name string, options ...Float64ObservableUpDownCounterOption) (Float64ObservableUpDownCounter, error) + // Float64ObservableGauge returns a new Float64ObservableGauge instrument + // identified by name and configured with options. The instrument is used + // to asynchronously record instantaneous float64 measurements once per a + // measurement collection cycle. + // + // Measurements for the returned instrument are made via a callback. Use + // the WithFloat64Callback option to register the callback here, or use the + // RegisterCallback method of this Meter to register one later. See the + // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. + Float64ObservableGauge(name string, options ...Float64ObservableGaugeOption) (Float64ObservableGauge, error) + + // RegisterCallback registers f to be called during the collection of a + // measurement cycle. + // + // If Unregister of the returned Registration is called, f needs to be + // unregistered and not called during collection. + // + // The instruments f is registered with are the only instruments that f may + // observe values for. + // + // If no instruments are passed, f should not be registered nor called + // during collection. + // + // The function f needs to be concurrent safe. + RegisterCallback(f Callback, instruments ...Observable) (Registration, error) +} + +// Callback is a function registered with a Meter that makes observations for +// the set of instruments it is registered with. The Observer parameter is used +// to record measurement observations for these instruments. +// +// The function needs to complete in a finite amount of time and the deadline +// of the passed context is expected to be honored. +// +// The function needs to make unique observations across all registered +// Callbacks. Meaning, it should not report measurements for an instrument with +// the same attributes as another Callback will report. +// +// The function needs to be concurrent safe. +type Callback func(context.Context, Observer) error + +// Observer records measurements for multiple instruments in a Callback. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Observer interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Observer + + // ObserveFloat64 records the float64 value for obsrv. + ObserveFloat64(obsrv Float64Observable, value float64, opts ...ObserveOption) + // ObserveInt64 records the int64 value for obsrv. + ObserveInt64(obsrv Int64Observable, value int64, opts ...ObserveOption) +} + +// Registration is an token representing the unique registration of a callback +// for a set of instruments with a Meter. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Registration interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Registration + + // Unregister removes the callback registration from a Meter. + // + // This method needs to be idempotent and concurrent safe. + Unregister() error +} diff --git a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go new file mode 100644 index 000000000..8403a4bad --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go @@ -0,0 +1,226 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import ( + "context" + + "go.opentelemetry.io/otel/metric/embedded" +) + +// Float64Counter is an instrument that records increasing float64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64Counter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64Counter + + // Add records a change to the counter. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Add(ctx context.Context, incr float64, options ...AddOption) +} + +// Float64CounterConfig contains options for synchronous counter instruments that +// record float64 values. +type Float64CounterConfig struct { + description string + unit string +} + +// NewFloat64CounterConfig returns a new [Float64CounterConfig] with all opts +// applied. +func NewFloat64CounterConfig(opts ...Float64CounterOption) Float64CounterConfig { + var config Float64CounterConfig + for _, o := range opts { + config = o.applyFloat64Counter(config) + } + return config +} + +// Description returns the configured description. +func (c Float64CounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64CounterConfig) Unit() string { + return c.unit +} + +// Float64CounterOption applies options to a [Float64CounterConfig]. See +// [InstrumentOption] for other options that can be used as a +// Float64CounterOption. +type Float64CounterOption interface { + applyFloat64Counter(Float64CounterConfig) Float64CounterConfig +} + +// Float64UpDownCounter is an instrument that records increasing or decreasing +// float64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64UpDownCounter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64UpDownCounter + + // Add records a change to the counter. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Add(ctx context.Context, incr float64, options ...AddOption) +} + +// Float64UpDownCounterConfig contains options for synchronous counter +// instruments that record float64 values. +type Float64UpDownCounterConfig struct { + description string + unit string +} + +// NewFloat64UpDownCounterConfig returns a new [Float64UpDownCounterConfig] +// with all opts applied. +func NewFloat64UpDownCounterConfig(opts ...Float64UpDownCounterOption) Float64UpDownCounterConfig { + var config Float64UpDownCounterConfig + for _, o := range opts { + config = o.applyFloat64UpDownCounter(config) + } + return config +} + +// Description returns the configured description. +func (c Float64UpDownCounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64UpDownCounterConfig) Unit() string { + return c.unit +} + +// Float64UpDownCounterOption applies options to a +// [Float64UpDownCounterConfig]. See [InstrumentOption] for other options that +// can be used as a Float64UpDownCounterOption. +type Float64UpDownCounterOption interface { + applyFloat64UpDownCounter(Float64UpDownCounterConfig) Float64UpDownCounterConfig +} + +// Float64Histogram is an instrument that records a distribution of float64 +// values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64Histogram interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64Histogram + + // Record adds an additional value to the distribution. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Record(ctx context.Context, incr float64, options ...RecordOption) +} + +// Float64HistogramConfig contains options for synchronous histogram +// instruments that record float64 values. +type Float64HistogramConfig struct { + description string + unit string + explicitBucketBoundaries []float64 +} + +// NewFloat64HistogramConfig returns a new [Float64HistogramConfig] with all +// opts applied. +func NewFloat64HistogramConfig(opts ...Float64HistogramOption) Float64HistogramConfig { + var config Float64HistogramConfig + for _, o := range opts { + config = o.applyFloat64Histogram(config) + } + return config +} + +// Description returns the configured description. +func (c Float64HistogramConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64HistogramConfig) Unit() string { + return c.unit +} + +// ExplicitBucketBoundaries returns the configured explicit bucket boundaries. +func (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 { + return c.explicitBucketBoundaries +} + +// Float64HistogramOption applies options to a [Float64HistogramConfig]. See +// [InstrumentOption] for other options that can be used as a +// Float64HistogramOption. +type Float64HistogramOption interface { + applyFloat64Histogram(Float64HistogramConfig) Float64HistogramConfig +} + +// Float64Gauge is an instrument that records instantaneous float64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64Gauge interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64Gauge + + // Record records the instantaneous value. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Record(ctx context.Context, value float64, options ...RecordOption) +} + +// Float64GaugeConfig contains options for synchronous gauge instruments that +// record float64 values. +type Float64GaugeConfig struct { + description string + unit string +} + +// NewFloat64GaugeConfig returns a new [Float64GaugeConfig] with all opts +// applied. +func NewFloat64GaugeConfig(opts ...Float64GaugeOption) Float64GaugeConfig { + var config Float64GaugeConfig + for _, o := range opts { + config = o.applyFloat64Gauge(config) + } + return config +} + +// Description returns the configured description. +func (c Float64GaugeConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64GaugeConfig) Unit() string { + return c.unit +} + +// Float64GaugeOption applies options to a [Float64GaugeConfig]. See +// [InstrumentOption] for other options that can be used as a +// Float64GaugeOption. +type Float64GaugeOption interface { + applyFloat64Gauge(Float64GaugeConfig) Float64GaugeConfig +} diff --git a/vendor/go.opentelemetry.io/otel/metric/syncint64.go b/vendor/go.opentelemetry.io/otel/metric/syncint64.go new file mode 100644 index 000000000..783fdfba7 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/syncint64.go @@ -0,0 +1,226 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metric // import "go.opentelemetry.io/otel/metric" + +import ( + "context" + + "go.opentelemetry.io/otel/metric/embedded" +) + +// Int64Counter is an instrument that records increasing int64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64Counter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64Counter + + // Add records a change to the counter. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Add(ctx context.Context, incr int64, options ...AddOption) +} + +// Int64CounterConfig contains options for synchronous counter instruments that +// record int64 values. +type Int64CounterConfig struct { + description string + unit string +} + +// NewInt64CounterConfig returns a new [Int64CounterConfig] with all opts +// applied. +func NewInt64CounterConfig(opts ...Int64CounterOption) Int64CounterConfig { + var config Int64CounterConfig + for _, o := range opts { + config = o.applyInt64Counter(config) + } + return config +} + +// Description returns the configured description. +func (c Int64CounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64CounterConfig) Unit() string { + return c.unit +} + +// Int64CounterOption applies options to a [Int64CounterConfig]. See +// [InstrumentOption] for other options that can be used as an +// Int64CounterOption. +type Int64CounterOption interface { + applyInt64Counter(Int64CounterConfig) Int64CounterConfig +} + +// Int64UpDownCounter is an instrument that records increasing or decreasing +// int64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64UpDownCounter interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64UpDownCounter + + // Add records a change to the counter. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Add(ctx context.Context, incr int64, options ...AddOption) +} + +// Int64UpDownCounterConfig contains options for synchronous counter +// instruments that record int64 values. +type Int64UpDownCounterConfig struct { + description string + unit string +} + +// NewInt64UpDownCounterConfig returns a new [Int64UpDownCounterConfig] with +// all opts applied. +func NewInt64UpDownCounterConfig(opts ...Int64UpDownCounterOption) Int64UpDownCounterConfig { + var config Int64UpDownCounterConfig + for _, o := range opts { + config = o.applyInt64UpDownCounter(config) + } + return config +} + +// Description returns the configured description. +func (c Int64UpDownCounterConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64UpDownCounterConfig) Unit() string { + return c.unit +} + +// Int64UpDownCounterOption applies options to a [Int64UpDownCounterConfig]. +// See [InstrumentOption] for other options that can be used as an +// Int64UpDownCounterOption. +type Int64UpDownCounterOption interface { + applyInt64UpDownCounter(Int64UpDownCounterConfig) Int64UpDownCounterConfig +} + +// Int64Histogram is an instrument that records a distribution of int64 +// values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64Histogram interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64Histogram + + // Record adds an additional value to the distribution. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Record(ctx context.Context, incr int64, options ...RecordOption) +} + +// Int64HistogramConfig contains options for synchronous histogram instruments +// that record int64 values. +type Int64HistogramConfig struct { + description string + unit string + explicitBucketBoundaries []float64 +} + +// NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts +// applied. +func NewInt64HistogramConfig(opts ...Int64HistogramOption) Int64HistogramConfig { + var config Int64HistogramConfig + for _, o := range opts { + config = o.applyInt64Histogram(config) + } + return config +} + +// Description returns the configured description. +func (c Int64HistogramConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64HistogramConfig) Unit() string { + return c.unit +} + +// ExplicitBucketBoundaries returns the configured explicit bucket boundaries. +func (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 { + return c.explicitBucketBoundaries +} + +// Int64HistogramOption applies options to a [Int64HistogramConfig]. See +// [InstrumentOption] for other options that can be used as an +// Int64HistogramOption. +type Int64HistogramOption interface { + applyInt64Histogram(Int64HistogramConfig) Int64HistogramConfig +} + +// Int64Gauge is an instrument that records instantaneous int64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64Gauge interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64Gauge + + // Record records the instantaneous value. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Record(ctx context.Context, value int64, options ...RecordOption) +} + +// Int64GaugeConfig contains options for synchronous gauge instruments that +// record int64 values. +type Int64GaugeConfig struct { + description string + unit string +} + +// NewInt64GaugeConfig returns a new [Int64GaugeConfig] with all opts +// applied. +func NewInt64GaugeConfig(opts ...Int64GaugeOption) Int64GaugeConfig { + var config Int64GaugeConfig + for _, o := range opts { + config = o.applyInt64Gauge(config) + } + return config +} + +// Description returns the configured description. +func (c Int64GaugeConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64GaugeConfig) Unit() string { + return c.unit +} + +// Int64GaugeOption applies options to a [Int64GaugeConfig]. See +// [InstrumentOption] for other options that can be used as a +// Int64GaugeOption. +type Int64GaugeOption interface { + applyInt64Gauge(Int64GaugeConfig) Int64GaugeConfig +} diff --git a/vendor/go.opentelemetry.io/otel/propagation.go b/vendor/go.opentelemetry.io/otel/propagation.go new file mode 100644 index 000000000..2fd949733 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +import ( + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/propagation" +) + +// GetTextMapPropagator returns the global TextMapPropagator. If none has been +// set, a No-Op TextMapPropagator is returned. +func GetTextMapPropagator() propagation.TextMapPropagator { + return global.TextMapPropagator() +} + +// SetTextMapPropagator sets propagator as the global TextMapPropagator. +func SetTextMapPropagator(propagator propagation.TextMapPropagator) { + global.SetTextMapPropagator(propagator) +} diff --git a/vendor/go.opentelemetry.io/otel/propagation/README.md b/vendor/go.opentelemetry.io/otel/propagation/README.md new file mode 100644 index 000000000..e2959ac74 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/README.md @@ -0,0 +1,3 @@ +# Propagation + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/propagation)](https://pkg.go.dev/go.opentelemetry.io/otel/propagation) diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go new file mode 100644 index 000000000..552263ba7 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/baggage.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package propagation // import "go.opentelemetry.io/otel/propagation" + +import ( + "context" + + "go.opentelemetry.io/otel/baggage" +) + +const baggageHeader = "baggage" + +// Baggage is a propagator that supports the W3C Baggage format. +// +// This propagates user-defined baggage associated with a trace. The complete +// specification is defined at https://www.w3.org/TR/baggage/. +type Baggage struct{} + +var _ TextMapPropagator = Baggage{} + +// Inject sets baggage key-values from ctx into the carrier. +func (b Baggage) Inject(ctx context.Context, carrier TextMapCarrier) { + bStr := baggage.FromContext(ctx).String() + if bStr != "" { + carrier.Set(baggageHeader, bStr) + } +} + +// Extract returns a copy of parent with the baggage from the carrier added. +func (b Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context { + bStr := carrier.Get(baggageHeader) + if bStr == "" { + return parent + } + + bag, err := baggage.Parse(bStr) + if err != nil { + return parent + } + return baggage.ContextWithBaggage(parent, bag) +} + +// Fields returns the keys who's values are set with Inject. +func (b Baggage) Fields() []string { + return []string{baggageHeader} +} diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go new file mode 100644 index 000000000..33a3baf15 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/doc.go @@ -0,0 +1,13 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package propagation contains OpenTelemetry context propagators. + +OpenTelemetry propagators are used to extract and inject context data from and +into messages exchanged by applications. The propagator supported by this +package is the W3C Trace Context encoding +(https://www.w3.org/TR/trace-context/), and W3C Baggage +(https://www.w3.org/TR/baggage/). +*/ +package propagation // import "go.opentelemetry.io/otel/propagation" diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go new file mode 100644 index 000000000..8c8286aab --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/propagation.go @@ -0,0 +1,142 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package propagation // import "go.opentelemetry.io/otel/propagation" + +import ( + "context" + "net/http" +) + +// TextMapCarrier is the storage medium used by a TextMapPropagator. +type TextMapCarrier interface { + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Get returns the value associated with the passed key. + Get(key string) string + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Set stores the key-value pair. + Set(key string, value string) + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Keys lists the keys stored in this carrier. + Keys() []string + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. +} + +// MapCarrier is a TextMapCarrier that uses a map held in memory as a storage +// medium for propagated key-value pairs. +type MapCarrier map[string]string + +// Compile time check that MapCarrier implements the TextMapCarrier. +var _ TextMapCarrier = MapCarrier{} + +// Get returns the value associated with the passed key. +func (c MapCarrier) Get(key string) string { + return c[key] +} + +// Set stores the key-value pair. +func (c MapCarrier) Set(key, value string) { + c[key] = value +} + +// Keys lists the keys stored in this carrier. +func (c MapCarrier) Keys() []string { + keys := make([]string, 0, len(c)) + for k := range c { + keys = append(keys, k) + } + return keys +} + +// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface. +type HeaderCarrier http.Header + +// Get returns the value associated with the passed key. +func (hc HeaderCarrier) Get(key string) string { + return http.Header(hc).Get(key) +} + +// Set stores the key-value pair. +func (hc HeaderCarrier) Set(key string, value string) { + http.Header(hc).Set(key, value) +} + +// Keys lists the keys stored in this carrier. +func (hc HeaderCarrier) Keys() []string { + keys := make([]string, 0, len(hc)) + for k := range hc { + keys = append(keys, k) + } + return keys +} + +// TextMapPropagator propagates cross-cutting concerns as key-value text +// pairs within a carrier that travels in-band across process boundaries. +type TextMapPropagator interface { + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Inject set cross-cutting concerns from the Context into the carrier. + Inject(ctx context.Context, carrier TextMapCarrier) + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Extract reads cross-cutting concerns from the carrier into a Context. + Extract(ctx context.Context, carrier TextMapCarrier) context.Context + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Fields returns the keys whose values are set with Inject. + Fields() []string + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. +} + +type compositeTextMapPropagator []TextMapPropagator + +func (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) { + for _, i := range p { + i.Inject(ctx, carrier) + } +} + +func (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { + for _, i := range p { + ctx = i.Extract(ctx, carrier) + } + return ctx +} + +func (p compositeTextMapPropagator) Fields() []string { + unique := make(map[string]struct{}) + for _, i := range p { + for _, k := range i.Fields() { + unique[k] = struct{}{} + } + } + + fields := make([]string, 0, len(unique)) + for k := range unique { + fields = append(fields, k) + } + return fields +} + +// NewCompositeTextMapPropagator returns a unified TextMapPropagator from the +// group of passed TextMapPropagator. This allows different cross-cutting +// concerns to be propagates in a unified manner. +// +// The returned TextMapPropagator will inject and extract cross-cutting +// concerns in the order the TextMapPropagators were provided. Additionally, +// the Fields method will return a de-duplicated slice of the keys that are +// set with the Inject method. +func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator { + return compositeTextMapPropagator(p) +} diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go new file mode 100644 index 000000000..6870e316d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package propagation // import "go.opentelemetry.io/otel/propagation" + +import ( + "context" + "encoding/hex" + "fmt" + "strings" + + "go.opentelemetry.io/otel/trace" +) + +const ( + supportedVersion = 0 + maxVersion = 254 + traceparentHeader = "traceparent" + tracestateHeader = "tracestate" + delimiter = "-" +) + +// TraceContext is a propagator that supports the W3C Trace Context format +// (https://www.w3.org/TR/trace-context/) +// +// This propagator will propagate the traceparent and tracestate headers to +// guarantee traces are not broken. It is up to the users of this propagator +// to choose if they want to participate in a trace by modifying the +// traceparent header and relevant parts of the tracestate header containing +// their proprietary information. +type TraceContext struct{} + +var ( + _ TextMapPropagator = TraceContext{} + versionPart = fmt.Sprintf("%.2X", supportedVersion) +) + +// Inject injects the trace context from ctx into carrier. +func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { + sc := trace.SpanContextFromContext(ctx) + if !sc.IsValid() { + return + } + + if ts := sc.TraceState().String(); ts != "" { + carrier.Set(tracestateHeader, ts) + } + + // Clear all flags other than the trace-context supported sampling bit. + flags := sc.TraceFlags() & trace.FlagsSampled + + var sb strings.Builder + sb.Grow(2 + 32 + 16 + 2 + 3) + _, _ = sb.WriteString(versionPart) + traceID := sc.TraceID() + spanID := sc.SpanID() + flagByte := [1]byte{byte(flags)} + var buf [32]byte + for _, src := range [][]byte{traceID[:], spanID[:], flagByte[:]} { + _ = sb.WriteByte(delimiter[0]) + n := hex.Encode(buf[:], src) + _, _ = sb.Write(buf[:n]) + } + carrier.Set(traceparentHeader, sb.String()) +} + +// Extract reads tracecontext from the carrier into a returned Context. +// +// The returned Context will be a copy of ctx and contain the extracted +// tracecontext as the remote SpanContext. If the extracted tracecontext is +// invalid, the passed ctx will be returned directly instead. +func (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { + sc := tc.extract(carrier) + if !sc.IsValid() { + return ctx + } + return trace.ContextWithRemoteSpanContext(ctx, sc) +} + +func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext { + h := carrier.Get(traceparentHeader) + if h == "" { + return trace.SpanContext{} + } + + var ver [1]byte + if !extractPart(ver[:], &h, 2) { + return trace.SpanContext{} + } + version := int(ver[0]) + if version > maxVersion { + return trace.SpanContext{} + } + + var scc trace.SpanContextConfig + if !extractPart(scc.TraceID[:], &h, 32) { + return trace.SpanContext{} + } + if !extractPart(scc.SpanID[:], &h, 16) { + return trace.SpanContext{} + } + + var opts [1]byte + if !extractPart(opts[:], &h, 2) { + return trace.SpanContext{} + } + if version == 0 && (h != "" || opts[0] > 2) { + // version 0 not allow extra + // version 0 not allow other flag + return trace.SpanContext{} + } + + // Clear all flags other than the trace-context supported sampling bit. + scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled + + // Ignore the error returned here. Failure to parse tracestate MUST NOT + // affect the parsing of traceparent according to the W3C tracecontext + // specification. + scc.TraceState, _ = trace.ParseTraceState(carrier.Get(tracestateHeader)) + scc.Remote = true + + sc := trace.NewSpanContext(scc) + if !sc.IsValid() { + return trace.SpanContext{} + } + + return sc +} + +// upperHex detect hex is upper case Unicode characters. +func upperHex(v string) bool { + for _, c := range v { + if c >= 'A' && c <= 'F' { + return true + } + } + return false +} + +func extractPart(dst []byte, h *string, n int) bool { + part, left, _ := strings.Cut(*h, delimiter) + *h = left + // hex.Decode decodes unsupported upper-case characters, so exclude explicitly. + if len(part) != n || upperHex(part) { + return false + } + if p, err := hex.Decode(dst, []byte(part)); err != nil || p != n/2 { + return false + } + return true +} + +// Fields returns the keys who's values are set with Inject. +func (tc TraceContext) Fields() []string { + return []string{traceparentHeader, tracestateHeader} +} diff --git a/vendor/go.opentelemetry.io/otel/renovate.json b/vendor/go.opentelemetry.io/otel/renovate.json new file mode 100644 index 000000000..8c5ac55ca --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/renovate.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "ignorePaths": [], + "labels": ["Skip Changelog", "dependencies"], + "postUpdateOptions" : [ + "gomodTidy" + ], + "packageRules": [ + { + "matchManagers": ["gomod"], + "matchDepTypes": ["indirect"], + "enabled": true + }, + { + "matchFileNames": ["internal/tools/**"], + "matchManagers": ["gomod"], + "matchDepTypes": ["indirect"], + "enabled": false + } + ] +} diff --git a/vendor/go.opentelemetry.io/otel/requirements.txt b/vendor/go.opentelemetry.io/otel/requirements.txt new file mode 100644 index 000000000..ab09daf9d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/requirements.txt @@ -0,0 +1 @@ +codespell==2.3.0 diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md new file mode 100644 index 000000000..82e1f46b4 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.20.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.20.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.20.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go new file mode 100644 index 000000000..6685c392b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go @@ -0,0 +1,1198 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +import "go.opentelemetry.io/otel/attribute" + +// Describes HTTP attributes. +const ( + // HTTPMethodKey is the attribute Key conforming to the "http.method" + // semantic conventions. It represents the hTTP request method. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + HTTPMethodKey = attribute.Key("http.method") + + // HTTPStatusCodeKey is the attribute Key conforming to the + // "http.status_code" semantic conventions. It represents the [HTTP + // response status code](https://tools.ietf.org/html/rfc7231#section-6). + // + // Type: int + // RequirementLevel: ConditionallyRequired (If and only if one was + // received/sent.) + // Stability: stable + // Examples: 200 + HTTPStatusCodeKey = attribute.Key("http.status_code") +) + +// HTTPMethod returns an attribute KeyValue conforming to the "http.method" +// semantic conventions. It represents the hTTP request method. +func HTTPMethod(val string) attribute.KeyValue { + return HTTPMethodKey.String(val) +} + +// HTTPStatusCode returns an attribute KeyValue conforming to the +// "http.status_code" semantic conventions. It represents the [HTTP response +// status code](https://tools.ietf.org/html/rfc7231#section-6). +func HTTPStatusCode(val int) attribute.KeyValue { + return HTTPStatusCodeKey.Int(val) +} + +// HTTP Server spans attributes +const ( + // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" + // semantic conventions. It represents the URI scheme identifying the used + // protocol. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'http', 'https' + HTTPSchemeKey = attribute.Key("http.scheme") + + // HTTPRouteKey is the attribute Key conforming to the "http.route" + // semantic conventions. It represents the matched route (path template in + // the format used by the respective server framework). See note below + // + // Type: string + // RequirementLevel: ConditionallyRequired (If and only if it's available) + // Stability: stable + // Examples: '/users/:userID?', '{controller}/{action}/{id?}' + // Note: MUST NOT be populated when this is not supported by the HTTP + // server framework as the route attribute should have low-cardinality and + // the URI path can NOT substitute it. + // SHOULD include the [application + // root](/specification/trace/semantic_conventions/http.md#http-server-definitions) + // if there is one. + HTTPRouteKey = attribute.Key("http.route") +) + +// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" +// semantic conventions. It represents the URI scheme identifying the used +// protocol. +func HTTPScheme(val string) attribute.KeyValue { + return HTTPSchemeKey.String(val) +} + +// HTTPRoute returns an attribute KeyValue conforming to the "http.route" +// semantic conventions. It represents the matched route (path template in the +// format used by the respective server framework). See note below +func HTTPRoute(val string) attribute.KeyValue { + return HTTPRouteKey.String(val) +} + +// Attributes for Events represented using Log Records. +const ( + // EventNameKey is the attribute Key conforming to the "event.name" + // semantic conventions. It represents the name identifies the event. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'click', 'exception' + EventNameKey = attribute.Key("event.name") + + // EventDomainKey is the attribute Key conforming to the "event.domain" + // semantic conventions. It represents the domain identifies the business + // context for the events. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Note: Events across different domains may have same `event.name`, yet be + // unrelated events. + EventDomainKey = attribute.Key("event.domain") +) + +var ( + // Events from browser apps + EventDomainBrowser = EventDomainKey.String("browser") + // Events from mobile apps + EventDomainDevice = EventDomainKey.String("device") + // Events from Kubernetes + EventDomainK8S = EventDomainKey.String("k8s") +) + +// EventName returns an attribute KeyValue conforming to the "event.name" +// semantic conventions. It represents the name identifies the event. +func EventName(val string) attribute.KeyValue { + return EventNameKey.String(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetTransportKey is the attribute Key conforming to the "net.transport" + // semantic conventions. It represents the transport protocol used. See + // note below. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + NetTransportKey = attribute.Key("net.transport") + + // NetProtocolNameKey is the attribute Key conforming to the + // "net.protocol.name" semantic conventions. It represents the application + // layer protocol used. The value SHOULD be normalized to lowercase. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'amqp', 'http', 'mqtt' + NetProtocolNameKey = attribute.Key("net.protocol.name") + + // NetProtocolVersionKey is the attribute Key conforming to the + // "net.protocol.version" semantic conventions. It represents the version + // of the application layer protocol used. See note below. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '3.1.1' + // Note: `net.protocol.version` refers to the version of the protocol used + // and might be different from the protocol client's version. If the HTTP + // client used has a version of `0.27.2`, but sends HTTP version `1.1`, + // this attribute should be set to `1.1`. + NetProtocolVersionKey = attribute.Key("net.protocol.version") + + // NetSockPeerNameKey is the attribute Key conforming to the + // "net.sock.peer.name" semantic conventions. It represents the remote + // socket peer name. + // + // Type: string + // RequirementLevel: Recommended (If available and different from + // `net.peer.name` and if `net.sock.peer.addr` is set.) + // Stability: stable + // Examples: 'proxy.example.com' + NetSockPeerNameKey = attribute.Key("net.sock.peer.name") + + // NetSockPeerAddrKey is the attribute Key conforming to the + // "net.sock.peer.addr" semantic conventions. It represents the remote + // socket peer address: IPv4 or IPv6 for internet protocols, path for local + // communication, + // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '127.0.0.1', '/tmp/mysql.sock' + NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") + + // NetSockPeerPortKey is the attribute Key conforming to the + // "net.sock.peer.port" semantic conventions. It represents the remote + // socket peer port. + // + // Type: int + // RequirementLevel: Recommended (If defined for the address family and if + // different than `net.peer.port` and if `net.sock.peer.addr` is set.) + // Stability: stable + // Examples: 16456 + NetSockPeerPortKey = attribute.Key("net.sock.peer.port") + + // NetSockFamilyKey is the attribute Key conforming to the + // "net.sock.family" semantic conventions. It represents the protocol + // [address + // family](https://man7.org/linux/man-pages/man7/address_families.7.html) + // which is used for communication. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (If different than `inet` and if + // any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers + // of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in + // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support + // instrumentations that follow previous versions of this document.) + // Stability: stable + // Examples: 'inet6', 'bluetooth' + NetSockFamilyKey = attribute.Key("net.sock.family") + + // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" + // semantic conventions. It represents the logical remote hostname, see + // note below. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'example.com' + // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an + // extra DNS lookup. + NetPeerNameKey = attribute.Key("net.peer.name") + + // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" + // semantic conventions. It represents the logical remote port number + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 80, 8080, 443 + NetPeerPortKey = attribute.Key("net.peer.port") + + // NetHostNameKey is the attribute Key conforming to the "net.host.name" + // semantic conventions. It represents the logical local hostname or + // similar, see note below. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'localhost' + NetHostNameKey = attribute.Key("net.host.name") + + // NetHostPortKey is the attribute Key conforming to the "net.host.port" + // semantic conventions. It represents the logical local port number, + // preferably the one that the peer used to connect + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 8080 + NetHostPortKey = attribute.Key("net.host.port") + + // NetSockHostAddrKey is the attribute Key conforming to the + // "net.sock.host.addr" semantic conventions. It represents the local + // socket address. Useful in case of a multi-IP host. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '192.168.0.1' + NetSockHostAddrKey = attribute.Key("net.sock.host.addr") + + // NetSockHostPortKey is the attribute Key conforming to the + // "net.sock.host.port" semantic conventions. It represents the local + // socket port number. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If defined for the address + // family and if different than `net.host.port` and if `net.sock.host.addr` + // is set. In other cases, it is still recommended to set this.) + // Stability: stable + // Examples: 35555 + NetSockHostPortKey = attribute.Key("net.sock.host.port") +) + +var ( + // ip_tcp + NetTransportTCP = NetTransportKey.String("ip_tcp") + // ip_udp + NetTransportUDP = NetTransportKey.String("ip_udp") + // Named or anonymous pipe. See note below + NetTransportPipe = NetTransportKey.String("pipe") + // In-process communication + NetTransportInProc = NetTransportKey.String("inproc") + // Something else (non IP-based) + NetTransportOther = NetTransportKey.String("other") +) + +var ( + // IPv4 address + NetSockFamilyInet = NetSockFamilyKey.String("inet") + // IPv6 address + NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") + // Unix domain socket path + NetSockFamilyUnix = NetSockFamilyKey.String("unix") +) + +// NetProtocolName returns an attribute KeyValue conforming to the +// "net.protocol.name" semantic conventions. It represents the application +// layer protocol used. The value SHOULD be normalized to lowercase. +func NetProtocolName(val string) attribute.KeyValue { + return NetProtocolNameKey.String(val) +} + +// NetProtocolVersion returns an attribute KeyValue conforming to the +// "net.protocol.version" semantic conventions. It represents the version of +// the application layer protocol used. See note below. +func NetProtocolVersion(val string) attribute.KeyValue { + return NetProtocolVersionKey.String(val) +} + +// NetSockPeerName returns an attribute KeyValue conforming to the +// "net.sock.peer.name" semantic conventions. It represents the remote socket +// peer name. +func NetSockPeerName(val string) attribute.KeyValue { + return NetSockPeerNameKey.String(val) +} + +// NetSockPeerAddr returns an attribute KeyValue conforming to the +// "net.sock.peer.addr" semantic conventions. It represents the remote socket +// peer address: IPv4 or IPv6 for internet protocols, path for local +// communication, +// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). +func NetSockPeerAddr(val string) attribute.KeyValue { + return NetSockPeerAddrKey.String(val) +} + +// NetSockPeerPort returns an attribute KeyValue conforming to the +// "net.sock.peer.port" semantic conventions. It represents the remote socket +// peer port. +func NetSockPeerPort(val int) attribute.KeyValue { + return NetSockPeerPortKey.Int(val) +} + +// NetPeerName returns an attribute KeyValue conforming to the +// "net.peer.name" semantic conventions. It represents the logical remote +// hostname, see note below. +func NetPeerName(val string) attribute.KeyValue { + return NetPeerNameKey.String(val) +} + +// NetPeerPort returns an attribute KeyValue conforming to the +// "net.peer.port" semantic conventions. It represents the logical remote port +// number +func NetPeerPort(val int) attribute.KeyValue { + return NetPeerPortKey.Int(val) +} + +// NetHostName returns an attribute KeyValue conforming to the +// "net.host.name" semantic conventions. It represents the logical local +// hostname or similar, see note below. +func NetHostName(val string) attribute.KeyValue { + return NetHostNameKey.String(val) +} + +// NetHostPort returns an attribute KeyValue conforming to the +// "net.host.port" semantic conventions. It represents the logical local port +// number, preferably the one that the peer used to connect +func NetHostPort(val int) attribute.KeyValue { + return NetHostPortKey.Int(val) +} + +// NetSockHostAddr returns an attribute KeyValue conforming to the +// "net.sock.host.addr" semantic conventions. It represents the local socket +// address. Useful in case of a multi-IP host. +func NetSockHostAddr(val string) attribute.KeyValue { + return NetSockHostAddrKey.String(val) +} + +// NetSockHostPort returns an attribute KeyValue conforming to the +// "net.sock.host.port" semantic conventions. It represents the local socket +// port number. +func NetSockHostPort(val int) attribute.KeyValue { + return NetSockHostPortKey.Int(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetHostConnectionTypeKey is the attribute Key conforming to the + // "net.host.connection.type" semantic conventions. It represents the + // internet connection type currently being used by the host. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'wifi' + NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") + + // NetHostConnectionSubtypeKey is the attribute Key conforming to the + // "net.host.connection.subtype" semantic conventions. It represents the + // this describes more details regarding the connection.type. It may be the + // type of cell technology connection, but it could be used for describing + // details about a wifi connection. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'LTE' + NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") + + // NetHostCarrierNameKey is the attribute Key conforming to the + // "net.host.carrier.name" semantic conventions. It represents the name of + // the mobile carrier. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'sprint' + NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") + + // NetHostCarrierMccKey is the attribute Key conforming to the + // "net.host.carrier.mcc" semantic conventions. It represents the mobile + // carrier country code. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '310' + NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") + + // NetHostCarrierMncKey is the attribute Key conforming to the + // "net.host.carrier.mnc" semantic conventions. It represents the mobile + // carrier network code. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '001' + NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") + + // NetHostCarrierIccKey is the attribute Key conforming to the + // "net.host.carrier.icc" semantic conventions. It represents the ISO + // 3166-1 alpha-2 2-character country code associated with the mobile + // carrier network. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'DE' + NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") +) + +var ( + // wifi + NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") + // wired + NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") + // cell + NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") + // unavailable + NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") + // unknown + NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") +) + +var ( + // GPRS + NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") + // EDGE + NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") + // UMTS + NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") + // CDMA + NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") + // HSUPA + NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") + // HSPA + NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") + // IDEN + NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") + // EVDO Rev. B + NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") + // LTE + NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") + // EHRPD + NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") + // HSPAP + NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") + // GSM + NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") + // TD-SCDMA + NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") + // IWLAN + NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") + // LTE CA + NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") +) + +// NetHostCarrierName returns an attribute KeyValue conforming to the +// "net.host.carrier.name" semantic conventions. It represents the name of the +// mobile carrier. +func NetHostCarrierName(val string) attribute.KeyValue { + return NetHostCarrierNameKey.String(val) +} + +// NetHostCarrierMcc returns an attribute KeyValue conforming to the +// "net.host.carrier.mcc" semantic conventions. It represents the mobile +// carrier country code. +func NetHostCarrierMcc(val string) attribute.KeyValue { + return NetHostCarrierMccKey.String(val) +} + +// NetHostCarrierMnc returns an attribute KeyValue conforming to the +// "net.host.carrier.mnc" semantic conventions. It represents the mobile +// carrier network code. +func NetHostCarrierMnc(val string) attribute.KeyValue { + return NetHostCarrierMncKey.String(val) +} + +// NetHostCarrierIcc returns an attribute KeyValue conforming to the +// "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1 +// alpha-2 2-character country code associated with the mobile carrier network. +func NetHostCarrierIcc(val string) attribute.KeyValue { + return NetHostCarrierIccKey.String(val) +} + +// Semantic conventions for HTTP client and server Spans. +const ( + // HTTPRequestContentLengthKey is the attribute Key conforming to the + // "http.request_content_length" semantic conventions. It represents the + // size of the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3495 + HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") + + // HTTPResponseContentLengthKey is the attribute Key conforming to the + // "http.response_content_length" semantic conventions. It represents the + // size of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3495 + HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") +) + +// HTTPRequestContentLength returns an attribute KeyValue conforming to the +// "http.request_content_length" semantic conventions. It represents the size +// of the request payload body in bytes. This is the number of bytes +// transferred excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPRequestContentLength(val int) attribute.KeyValue { + return HTTPRequestContentLengthKey.Int(val) +} + +// HTTPResponseContentLength returns an attribute KeyValue conforming to the +// "http.response_content_length" semantic conventions. It represents the size +// of the response payload body in bytes. This is the number of bytes +// transferred excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPResponseContentLength(val int) attribute.KeyValue { + return HTTPResponseContentLengthKey.Int(val) +} + +// Semantic convention describing per-message attributes populated on messaging +// spans or links. +const ( + // MessagingMessageIDKey is the attribute Key conforming to the + // "messaging.message.id" semantic conventions. It represents a value used + // by the messaging system as an identifier for the message, represented as + // a string. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + MessagingMessageIDKey = attribute.Key("messaging.message.id") + + // MessagingMessageConversationIDKey is the attribute Key conforming to the + // "messaging.message.conversation_id" semantic conventions. It represents + // the [conversation ID](#conversations) identifying the conversation to + // which the message belongs, represented as a string. Sometimes called + // "Correlation ID". + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MyConversationID' + MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") + + // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to + // the "messaging.message.payload_size_bytes" semantic conventions. It + // represents the (uncompressed) size of the message payload in bytes. Also + // use this attribute if it is unknown whether the compressed or + // uncompressed payload size is reported. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2738 + MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes") + + // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key + // conforming to the "messaging.message.payload_compressed_size_bytes" + // semantic conventions. It represents the compressed size of the message + // payload in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2048 + MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes") +) + +// MessagingMessageID returns an attribute KeyValue conforming to the +// "messaging.message.id" semantic conventions. It represents a value used by +// the messaging system as an identifier for the message, represented as a +// string. +func MessagingMessageID(val string) attribute.KeyValue { + return MessagingMessageIDKey.String(val) +} + +// MessagingMessageConversationID returns an attribute KeyValue conforming +// to the "messaging.message.conversation_id" semantic conventions. It +// represents the [conversation ID](#conversations) identifying the +// conversation to which the message belongs, represented as a string. +// Sometimes called "Correlation ID". +func MessagingMessageConversationID(val string) attribute.KeyValue { + return MessagingMessageConversationIDKey.String(val) +} + +// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming +// to the "messaging.message.payload_size_bytes" semantic conventions. It +// represents the (uncompressed) size of the message payload in bytes. Also use +// this attribute if it is unknown whether the compressed or uncompressed +// payload size is reported. +func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue { + return MessagingMessagePayloadSizeBytesKey.Int(val) +} + +// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue +// conforming to the "messaging.message.payload_compressed_size_bytes" semantic +// conventions. It represents the compressed size of the message payload in +// bytes. +func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue { + return MessagingMessagePayloadCompressedSizeBytesKey.Int(val) +} + +// Semantic convention for attributes that describe messaging destination on +// broker +const ( + // MessagingDestinationNameKey is the attribute Key conforming to the + // "messaging.destination.name" semantic conventions. It represents the + // message destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MyQueue', 'MyTopic' + // Note: Destination name SHOULD uniquely identify a specific queue, topic + // or other entity within the broker. If + // the broker does not have such notion, the destination name SHOULD + // uniquely identify the broker. + MessagingDestinationNameKey = attribute.Key("messaging.destination.name") + + // MessagingDestinationTemplateKey is the attribute Key conforming to the + // "messaging.destination.template" semantic conventions. It represents the + // low cardinality representation of the messaging destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/customers/{customerID}' + // Note: Destination names could be constructed from templates. An example + // would be a destination name involving a user name or product id. + // Although the destination name in this case is of high cardinality, the + // underlying template is of low cardinality and can be effectively used + // for grouping and aggregation. + MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") + + // MessagingDestinationTemporaryKey is the attribute Key conforming to the + // "messaging.destination.temporary" semantic conventions. It represents a + // boolean that is true if the message destination is temporary and might + // not exist anymore after messages are processed. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") + + // MessagingDestinationAnonymousKey is the attribute Key conforming to the + // "messaging.destination.anonymous" semantic conventions. It represents a + // boolean that is true if the message destination is anonymous (could be + // unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") +) + +// MessagingDestinationName returns an attribute KeyValue conforming to the +// "messaging.destination.name" semantic conventions. It represents the message +// destination name +func MessagingDestinationName(val string) attribute.KeyValue { + return MessagingDestinationNameKey.String(val) +} + +// MessagingDestinationTemplate returns an attribute KeyValue conforming to +// the "messaging.destination.template" semantic conventions. It represents the +// low cardinality representation of the messaging destination name +func MessagingDestinationTemplate(val string) attribute.KeyValue { + return MessagingDestinationTemplateKey.String(val) +} + +// MessagingDestinationTemporary returns an attribute KeyValue conforming to +// the "messaging.destination.temporary" semantic conventions. It represents a +// boolean that is true if the message destination is temporary and might not +// exist anymore after messages are processed. +func MessagingDestinationTemporary(val bool) attribute.KeyValue { + return MessagingDestinationTemporaryKey.Bool(val) +} + +// MessagingDestinationAnonymous returns an attribute KeyValue conforming to +// the "messaging.destination.anonymous" semantic conventions. It represents a +// boolean that is true if the message destination is anonymous (could be +// unnamed or have auto-generated name). +func MessagingDestinationAnonymous(val bool) attribute.KeyValue { + return MessagingDestinationAnonymousKey.Bool(val) +} + +// Semantic convention for attributes that describe messaging source on broker +const ( + // MessagingSourceNameKey is the attribute Key conforming to the + // "messaging.source.name" semantic conventions. It represents the message + // source name + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MyQueue', 'MyTopic' + // Note: Source name SHOULD uniquely identify a specific queue, topic, or + // other entity within the broker. If + // the broker does not have such notion, the source name SHOULD uniquely + // identify the broker. + MessagingSourceNameKey = attribute.Key("messaging.source.name") + + // MessagingSourceTemplateKey is the attribute Key conforming to the + // "messaging.source.template" semantic conventions. It represents the low + // cardinality representation of the messaging source name + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/customers/{customerID}' + // Note: Source names could be constructed from templates. An example would + // be a source name involving a user name or product id. Although the + // source name in this case is of high cardinality, the underlying template + // is of low cardinality and can be effectively used for grouping and + // aggregation. + MessagingSourceTemplateKey = attribute.Key("messaging.source.template") + + // MessagingSourceTemporaryKey is the attribute Key conforming to the + // "messaging.source.temporary" semantic conventions. It represents a + // boolean that is true if the message source is temporary and might not + // exist anymore after messages are processed. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary") + + // MessagingSourceAnonymousKey is the attribute Key conforming to the + // "messaging.source.anonymous" semantic conventions. It represents a + // boolean that is true if the message source is anonymous (could be + // unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous") +) + +// MessagingSourceName returns an attribute KeyValue conforming to the +// "messaging.source.name" semantic conventions. It represents the message +// source name +func MessagingSourceName(val string) attribute.KeyValue { + return MessagingSourceNameKey.String(val) +} + +// MessagingSourceTemplate returns an attribute KeyValue conforming to the +// "messaging.source.template" semantic conventions. It represents the low +// cardinality representation of the messaging source name +func MessagingSourceTemplate(val string) attribute.KeyValue { + return MessagingSourceTemplateKey.String(val) +} + +// MessagingSourceTemporary returns an attribute KeyValue conforming to the +// "messaging.source.temporary" semantic conventions. It represents a boolean +// that is true if the message source is temporary and might not exist anymore +// after messages are processed. +func MessagingSourceTemporary(val bool) attribute.KeyValue { + return MessagingSourceTemporaryKey.Bool(val) +} + +// MessagingSourceAnonymous returns an attribute KeyValue conforming to the +// "messaging.source.anonymous" semantic conventions. It represents a boolean +// that is true if the message source is anonymous (could be unnamed or have +// auto-generated name). +func MessagingSourceAnonymous(val bool) attribute.KeyValue { + return MessagingSourceAnonymousKey.Bool(val) +} + +// Attributes for RabbitMQ +const ( + // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key + // conforming to the "messaging.rabbitmq.destination.routing_key" semantic + // conventions. It represents the rabbitMQ message routing key. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If not empty.) + // Stability: stable + // Examples: 'myKey' + MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") +) + +// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue +// conforming to the "messaging.rabbitmq.destination.routing_key" semantic +// conventions. It represents the rabbitMQ message routing key. +func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { + return MessagingRabbitmqDestinationRoutingKeyKey.String(val) +} + +// Attributes for Apache Kafka +const ( + // MessagingKafkaMessageKeyKey is the attribute Key conforming to the + // "messaging.kafka.message.key" semantic conventions. It represents the + // message keys in Kafka are used for grouping alike messages to ensure + // they're processed on the same partition. They differ from + // `messaging.message.id` in that they're not unique. If the key is `null`, + // the attribute MUST NOT be set. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to + // be supplied for the attribute. If the key has no unambiguous, canonical + // string form, don't include its value. + MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") + + // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the + // "messaging.kafka.consumer.group" semantic conventions. It represents the + // name of the Kafka Consumer Group that is handling the message. Only + // applies to consumers, not producers. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'my-group' + MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") + + // MessagingKafkaClientIDKey is the attribute Key conforming to the + // "messaging.kafka.client_id" semantic conventions. It represents the + // client ID for the Consumer or Producer that is handling the message. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'client-5' + MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") + + // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to + // the "messaging.kafka.destination.partition" semantic conventions. It + // represents the partition the message is sent to. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2 + MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") + + // MessagingKafkaSourcePartitionKey is the attribute Key conforming to the + // "messaging.kafka.source.partition" semantic conventions. It represents + // the partition the message is received from. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2 + MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition") + + // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the + // "messaging.kafka.message.offset" semantic conventions. It represents the + // offset of a record in the corresponding Kafka partition. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 42 + MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") + + // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the + // "messaging.kafka.message.tombstone" semantic conventions. It represents + // a boolean that is true if the message is a tombstone. + // + // Type: boolean + // RequirementLevel: ConditionallyRequired (If value is `true`. When + // missing, the value is assumed to be `false`.) + // Stability: stable + MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") +) + +// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the +// "messaging.kafka.message.key" semantic conventions. It represents the +// message keys in Kafka are used for grouping alike messages to ensure they're +// processed on the same partition. They differ from `messaging.message.id` in +// that they're not unique. If the key is `null`, the attribute MUST NOT be +// set. +func MessagingKafkaMessageKey(val string) attribute.KeyValue { + return MessagingKafkaMessageKeyKey.String(val) +} + +// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to +// the "messaging.kafka.consumer.group" semantic conventions. It represents the +// name of the Kafka Consumer Group that is handling the message. Only applies +// to consumers, not producers. +func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { + return MessagingKafkaConsumerGroupKey.String(val) +} + +// MessagingKafkaClientID returns an attribute KeyValue conforming to the +// "messaging.kafka.client_id" semantic conventions. It represents the client +// ID for the Consumer or Producer that is handling the message. +func MessagingKafkaClientID(val string) attribute.KeyValue { + return MessagingKafkaClientIDKey.String(val) +} + +// MessagingKafkaDestinationPartition returns an attribute KeyValue +// conforming to the "messaging.kafka.destination.partition" semantic +// conventions. It represents the partition the message is sent to. +func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { + return MessagingKafkaDestinationPartitionKey.Int(val) +} + +// MessagingKafkaSourcePartition returns an attribute KeyValue conforming to +// the "messaging.kafka.source.partition" semantic conventions. It represents +// the partition the message is received from. +func MessagingKafkaSourcePartition(val int) attribute.KeyValue { + return MessagingKafkaSourcePartitionKey.Int(val) +} + +// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to +// the "messaging.kafka.message.offset" semantic conventions. It represents the +// offset of a record in the corresponding Kafka partition. +func MessagingKafkaMessageOffset(val int) attribute.KeyValue { + return MessagingKafkaMessageOffsetKey.Int(val) +} + +// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming +// to the "messaging.kafka.message.tombstone" semantic conventions. It +// represents a boolean that is true if the message is a tombstone. +func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { + return MessagingKafkaMessageTombstoneKey.Bool(val) +} + +// Attributes for Apache RocketMQ +const ( + // MessagingRocketmqNamespaceKey is the attribute Key conforming to the + // "messaging.rocketmq.namespace" semantic conventions. It represents the + // namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myNamespace' + MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + + // MessagingRocketmqClientGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.client_group" semantic conventions. It represents + // the name of the RocketMQ producer/consumer group that is handling the + // message. The client type is identified by the SpanKind. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myConsumerGroup' + MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") + + // MessagingRocketmqClientIDKey is the attribute Key conforming to the + // "messaging.rocketmq.client_id" semantic conventions. It represents the + // unique identifier for each client. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myhost@8742@s8083jm' + MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") + + // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delivery_timestamp" + // semantic conventions. It represents the timestamp in milliseconds that + // the delay message is expected to be delivered to consumer. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If the message type is delay + // and delay time level is not specified.) + // Stability: stable + // Examples: 1665987217045 + MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") + + // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delay_time_level" semantic + // conventions. It represents the delay time level for delay message, which + // determines the message delay time. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If the message type is delay + // and delivery timestamp is not specified.) + // Stability: stable + // Examples: 3 + MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") + + // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.message.group" semantic conventions. It represents + // the it is essential for FIFO message. Messages that belong to the same + // message group are always processed one by one within the same consumer + // group. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If the message type is FIFO.) + // Stability: stable + // Examples: 'myMessageGroup' + MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") + + // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the + // "messaging.rocketmq.message.type" semantic conventions. It represents + // the type of message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") + + // MessagingRocketmqMessageTagKey is the attribute Key conforming to the + // "messaging.rocketmq.message.tag" semantic conventions. It represents the + // secondary classifier of message besides topic. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'tagA' + MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") + + // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the + // "messaging.rocketmq.message.keys" semantic conventions. It represents + // the key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'keyA', 'keyB' + MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") + + // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to + // the "messaging.rocketmq.consumption_model" semantic conventions. It + // represents the model of message consumption. This only applies to + // consumer spans. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") +) + +var ( + // Normal message + MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + // FIFO message + MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + // Delay message + MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + // Transaction message + MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") +) + +var ( + // Clustering consumption model + MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + // Broadcasting consumption model + MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") +) + +// MessagingRocketmqNamespace returns an attribute KeyValue conforming to +// the "messaging.rocketmq.namespace" semantic conventions. It represents the +// namespace of RocketMQ resources, resources in different namespaces are +// individual. +func MessagingRocketmqNamespace(val string) attribute.KeyValue { + return MessagingRocketmqNamespaceKey.String(val) +} + +// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.client_group" semantic conventions. It represents +// the name of the RocketMQ producer/consumer group that is handling the +// message. The client type is identified by the SpanKind. +func MessagingRocketmqClientGroup(val string) attribute.KeyValue { + return MessagingRocketmqClientGroupKey.String(val) +} + +// MessagingRocketmqClientID returns an attribute KeyValue conforming to the +// "messaging.rocketmq.client_id" semantic conventions. It represents the +// unique identifier for each client. +func MessagingRocketmqClientID(val string) attribute.KeyValue { + return MessagingRocketmqClientIDKey.String(val) +} + +// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic +// conventions. It represents the timestamp in milliseconds that the delay +// message is expected to be delivered to consumer. +func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { + return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) +} + +// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delay_time_level" semantic +// conventions. It represents the delay time level for delay message, which +// determines the message delay time. +func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { + return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) +} + +// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.group" semantic conventions. It represents +// the it is essential for FIFO message. Messages that belong to the same +// message group are always processed one by one within the same consumer +// group. +func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { + return MessagingRocketmqMessageGroupKey.String(val) +} + +// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.tag" semantic conventions. It represents the +// secondary classifier of message besides topic. +func MessagingRocketmqMessageTag(val string) attribute.KeyValue { + return MessagingRocketmqMessageTagKey.String(val) +} + +// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.keys" semantic conventions. It represents +// the key(s) of message, another way to mark message besides message id. +func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { + return MessagingRocketmqMessageKeysKey.StringSlice(val) +} + +// Describes user-agent attributes. +const ( + // UserAgentOriginalKey is the attribute Key conforming to the + // "user_agent.original" semantic conventions. It represents the value of + // the [HTTP + // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) + // header sent by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' + UserAgentOriginalKey = attribute.Key("user_agent.original") +) + +// UserAgentOriginal returns an attribute KeyValue conforming to the +// "user_agent.original" semantic conventions. It represents the value of the +// [HTTP +// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) +// header sent by the client. +func UserAgentOriginal(val string) attribute.KeyValue { + return UserAgentOriginalKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go new file mode 100644 index 000000000..0d1f55a8f --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the conventions +// as of the v1.20.0 version of the OpenTelemetry specification. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go new file mode 100644 index 000000000..637763932 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go @@ -0,0 +1,188 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +import "go.opentelemetry.io/otel/attribute" + +// This semantic convention defines the attributes used to represent a feature +// flag evaluation as an event. +const ( + // FeatureFlagKeyKey is the attribute Key conforming to the + // "feature_flag.key" semantic conventions. It represents the unique + // identifier of the feature flag. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'logo-color' + FeatureFlagKeyKey = attribute.Key("feature_flag.key") + + // FeatureFlagProviderNameKey is the attribute Key conforming to the + // "feature_flag.provider_name" semantic conventions. It represents the + // name of the service provider that performs the flag evaluation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'Flag Manager' + FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") + + // FeatureFlagVariantKey is the attribute Key conforming to the + // "feature_flag.variant" semantic conventions. It represents the sHOULD be + // a semantic identifier for a value. If one is unavailable, a stringified + // version of the value can be used. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides + // a means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant `red` maybe be used for the value `#c05543`. + // + // A stringified version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + FeatureFlagVariantKey = attribute.Key("feature_flag.variant") +) + +// FeatureFlagKey returns an attribute KeyValue conforming to the +// "feature_flag.key" semantic conventions. It represents the unique identifier +// of the feature flag. +func FeatureFlagKey(val string) attribute.KeyValue { + return FeatureFlagKeyKey.String(val) +} + +// FeatureFlagProviderName returns an attribute KeyValue conforming to the +// "feature_flag.provider_name" semantic conventions. It represents the name of +// the service provider that performs the flag evaluation. +func FeatureFlagProviderName(val string) attribute.KeyValue { + return FeatureFlagProviderNameKey.String(val) +} + +// FeatureFlagVariant returns an attribute KeyValue conforming to the +// "feature_flag.variant" semantic conventions. It represents the sHOULD be a +// semantic identifier for a value. If one is unavailable, a stringified +// version of the value can be used. +func FeatureFlagVariant(val string) attribute.KeyValue { + return FeatureFlagVariantKey.String(val) +} + +// RPC received/sent message. +const ( + // MessageTypeKey is the attribute Key conforming to the "message.type" + // semantic conventions. It represents the whether this is a received or + // sent message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + MessageTypeKey = attribute.Key("message.type") + + // MessageIDKey is the attribute Key conforming to the "message.id" + // semantic conventions. It represents the mUST be calculated as two + // different counters starting from `1` one for sent messages and one for + // received message. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Note: This way we guarantee that the values will be consistent between + // different implementations. + MessageIDKey = attribute.Key("message.id") + + // MessageCompressedSizeKey is the attribute Key conforming to the + // "message.compressed_size" semantic conventions. It represents the + // compressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + MessageCompressedSizeKey = attribute.Key("message.compressed_size") + + // MessageUncompressedSizeKey is the attribute Key conforming to the + // "message.uncompressed_size" semantic conventions. It represents the + // uncompressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") +) + +var ( + // sent + MessageTypeSent = MessageTypeKey.String("SENT") + // received + MessageTypeReceived = MessageTypeKey.String("RECEIVED") +) + +// MessageID returns an attribute KeyValue conforming to the "message.id" +// semantic conventions. It represents the mUST be calculated as two different +// counters starting from `1` one for sent messages and one for received +// message. +func MessageID(val int) attribute.KeyValue { + return MessageIDKey.Int(val) +} + +// MessageCompressedSize returns an attribute KeyValue conforming to the +// "message.compressed_size" semantic conventions. It represents the compressed +// size of the message in bytes. +func MessageCompressedSize(val int) attribute.KeyValue { + return MessageCompressedSizeKey.Int(val) +} + +// MessageUncompressedSize returns an attribute KeyValue conforming to the +// "message.uncompressed_size" semantic conventions. It represents the +// uncompressed size of the message in bytes. +func MessageUncompressedSize(val int) attribute.KeyValue { + return MessageUncompressedSizeKey.Int(val) +} + +// The attributes used to report a single exception associated with a span. +const ( + // ExceptionEscapedKey is the attribute Key conforming to the + // "exception.escaped" semantic conventions. It represents the sHOULD be + // set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Note: An exception is considered to have escaped (or left) the scope of + // a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's `__exit__` method in Python) but will + // usually be caught at the point of recording the exception in most + // languages. + // + // It is usually not possible to determine at the point where an exception + // is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending + // the span, + // as done in the [example above](#recording-an-exception). + // + // It follows that an exception may still escape the scope of the span + // even if the `exception.escaped` attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + ExceptionEscapedKey = attribute.Key("exception.escaped") +) + +// ExceptionEscaped returns an attribute KeyValue conforming to the +// "exception.escaped" semantic conventions. It represents the sHOULD be set to +// true if the exception event is recorded at a point where it is known that +// the exception is escaping the scope of the span. +func ExceptionEscaped(val bool) attribute.KeyValue { + return ExceptionEscapedKey.Bool(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go new file mode 100644 index 000000000..f40c97825 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +const ( + // ExceptionEventName is the name of the Span event representing an exception. + ExceptionEventName = "exception" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go new file mode 100644 index 000000000..9c1840631 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +// HTTP scheme attributes. +var ( + HTTPSchemeHTTP = HTTPSchemeKey.String("http") + HTTPSchemeHTTPS = HTTPSchemeKey.String("https") +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go new file mode 100644 index 000000000..3d44dae27 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go @@ -0,0 +1,2060 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +import "go.opentelemetry.io/otel/attribute" + +// The web browser in which the application represented by the resource is +// running. The `browser.*` attributes MUST be used only for resources that +// represent applications running in a web browser (regardless of whether +// running on a mobile or desktop device). +const ( + // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" + // semantic conventions. It represents the array of brand name and version + // separated by a space + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.brands`). + BrowserBrandsKey = attribute.Key("browser.brands") + + // BrowserPlatformKey is the attribute Key conforming to the + // "browser.platform" semantic conventions. It represents the platform on + // which the browser is running + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.platform`). If unavailable, the legacy + // `navigator.platform` API SHOULD NOT be used instead and this attribute + // SHOULD be left unset in order for the values to be consistent. + // The list of possible values is defined in the [W3C User-Agent Client + // Hints + // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). + // Note that some (but not all) of these values can overlap with values in + // the [`os.type` and `os.name` attributes](./os.md). However, for + // consistency, the values in the `browser.platform` attribute should + // capture the exact value that the user agent provides. + BrowserPlatformKey = attribute.Key("browser.platform") + + // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" + // semantic conventions. It represents a boolean that is true if the + // browser is running on a mobile device + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.mobile`). If unavailable, this attribute + // SHOULD be left unset. + BrowserMobileKey = attribute.Key("browser.mobile") + + // BrowserLanguageKey is the attribute Key conforming to the + // "browser.language" semantic conventions. It represents the preferred + // language of the user using the browser + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // `navigator.language`. + BrowserLanguageKey = attribute.Key("browser.language") +) + +// BrowserBrands returns an attribute KeyValue conforming to the +// "browser.brands" semantic conventions. It represents the array of brand name +// and version separated by a space +func BrowserBrands(val ...string) attribute.KeyValue { + return BrowserBrandsKey.StringSlice(val) +} + +// BrowserPlatform returns an attribute KeyValue conforming to the +// "browser.platform" semantic conventions. It represents the platform on which +// the browser is running +func BrowserPlatform(val string) attribute.KeyValue { + return BrowserPlatformKey.String(val) +} + +// BrowserMobile returns an attribute KeyValue conforming to the +// "browser.mobile" semantic conventions. It represents a boolean that is true +// if the browser is running on a mobile device +func BrowserMobile(val bool) attribute.KeyValue { + return BrowserMobileKey.Bool(val) +} + +// BrowserLanguage returns an attribute KeyValue conforming to the +// "browser.language" semantic conventions. It represents the preferred +// language of the user using the browser +func BrowserLanguage(val string) attribute.KeyValue { + return BrowserLanguageKey.String(val) +} + +// A cloud environment (e.g. GCP, Azure, AWS) +const ( + // CloudProviderKey is the attribute Key conforming to the "cloud.provider" + // semantic conventions. It represents the name of the cloud provider. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + CloudProviderKey = attribute.Key("cloud.provider") + + // CloudAccountIDKey is the attribute Key conforming to the + // "cloud.account.id" semantic conventions. It represents the cloud account + // ID the resource is assigned to. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '111111111111', 'opentelemetry' + CloudAccountIDKey = attribute.Key("cloud.account.id") + + // CloudRegionKey is the attribute Key conforming to the "cloud.region" + // semantic conventions. It represents the geographical region the resource + // is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for + // example [Alibaba Cloud + // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS + // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), + // [Azure + // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), + // [Google Cloud regions](https://cloud.google.com/about/locations), or + // [Tencent Cloud + // regions](https://www.tencentcloud.com/document/product/213/6091). + CloudRegionKey = attribute.Key("cloud.region") + + // CloudResourceIDKey is the attribute Key conforming to the + // "cloud.resource_id" semantic conventions. It represents the cloud + // provider-specific native identifier of the monitored cloud resource + // (e.g. an + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // on AWS, a [fully qualified resource + // ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) + // on Azure, a [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // on GCP) + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', + // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', + // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' + // Note: On some cloud providers, it may not be possible to determine the + // full ID at startup, + // so it may be necessary to set `cloud.resource_id` as a span attribute + // instead. + // + // The exact value to use for `cloud.resource_id` depends on the cloud + // provider. + // The following well-known definitions MUST be used if you set this + // attribute and they apply: + // + // * **AWS Lambda:** The function + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + // Take care not to use the "invoked ARN" directly but replace any + // [alias + // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) + // with the resolved function version, as the same runtime instance may + // be invokable with + // multiple different aliases. + // * **GCP:** The [URI of the + // resource](https://cloud.google.com/iam/docs/full-resource-names) + // * **Azure:** The [Fully Qualified Resource + // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) + // of the invoked function, + // *not* the function app, having the form + // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider. + CloudResourceIDKey = attribute.Key("cloud.resource_id") + + // CloudAvailabilityZoneKey is the attribute Key conforming to the + // "cloud.availability_zone" semantic conventions. It represents the cloud + // regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the + // resource is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and Google + // Cloud. + CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") + + // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" + // semantic conventions. It represents the cloud platform in use. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Note: The prefix of the service SHOULD match the one specified in + // `cloud.provider`. + CloudPlatformKey = attribute.Key("cloud.platform") +) + +var ( + // Alibaba Cloud + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + CloudProviderGCP = CloudProviderKey.String("gcp") + // Heroku Platform as a Service + CloudProviderHeroku = CloudProviderKey.String("heroku") + // IBM Cloud + CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") + // Tencent Cloud + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") +) + +var ( + // Alibaba Cloud Elastic Compute Service + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + // Red Hat OpenShift on Alibaba Cloud + CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") + // AWS Elastic Compute Cloud + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Red Hat OpenShift on AWS (ROSA) + CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") + // Azure Virtual Machines + CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") + // Azure Container Instances + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") + // Azure Kubernetes Service + CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") + // Azure Functions + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") + // Azure App Service + CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") + // Azure Red Hat OpenShift + CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") + // Google Cloud Compute Engine (GCE) + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Red Hat OpenShift on Google Cloud + CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") + // Red Hat OpenShift on IBM Cloud + CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") + // Tencent Cloud Cloud Virtual Machine (CVM) + CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") +) + +// CloudAccountID returns an attribute KeyValue conforming to the +// "cloud.account.id" semantic conventions. It represents the cloud account ID +// the resource is assigned to. +func CloudAccountID(val string) attribute.KeyValue { + return CloudAccountIDKey.String(val) +} + +// CloudRegion returns an attribute KeyValue conforming to the +// "cloud.region" semantic conventions. It represents the geographical region +// the resource is running. +func CloudRegion(val string) attribute.KeyValue { + return CloudRegionKey.String(val) +} + +// CloudResourceID returns an attribute KeyValue conforming to the +// "cloud.resource_id" semantic conventions. It represents the cloud +// provider-specific native identifier of the monitored cloud resource (e.g. an +// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// on AWS, a [fully qualified resource +// ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) +// on Azure, a [full resource +// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) +// on GCP) +func CloudResourceID(val string) attribute.KeyValue { + return CloudResourceIDKey.String(val) +} + +// CloudAvailabilityZone returns an attribute KeyValue conforming to the +// "cloud.availability_zone" semantic conventions. It represents the cloud +// regions often have multiple, isolated locations known as zones to increase +// availability. Availability zone represents the zone where the resource is +// running. +func CloudAvailabilityZone(val string) attribute.KeyValue { + return CloudAvailabilityZoneKey.String(val) +} + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // AWSECSContainerARNKey is the attribute Key conforming to the + // "aws.ecs.container.arn" semantic conventions. It represents the Amazon + // Resource Name (ARN) of an [ECS container + // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") + + // AWSECSClusterARNKey is the attribute Key conforming to the + // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an + // [ECS + // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") + + // AWSECSLaunchtypeKey is the attribute Key conforming to the + // "aws.ecs.launchtype" semantic conventions. It represents the [launch + // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // for an ECS task. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") + + // AWSECSTaskARNKey is the attribute Key conforming to the + // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an + // [ECS task + // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") + + // AWSECSTaskFamilyKey is the attribute Key conforming to the + // "aws.ecs.task.family" semantic conventions. It represents the task + // definition family this task definition is a member of. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-family' + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + + // AWSECSTaskRevisionKey is the attribute Key conforming to the + // "aws.ecs.task.revision" semantic conventions. It represents the revision + // for this task definition. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '8', '26' + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") +) + +var ( + // ec2 + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // fargate + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// AWSECSContainerARN returns an attribute KeyValue conforming to the +// "aws.ecs.container.arn" semantic conventions. It represents the Amazon +// Resource Name (ARN) of an [ECS container +// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +func AWSECSContainerARN(val string) attribute.KeyValue { + return AWSECSContainerARNKey.String(val) +} + +// AWSECSClusterARN returns an attribute KeyValue conforming to the +// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS +// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +func AWSECSClusterARN(val string) attribute.KeyValue { + return AWSECSClusterARNKey.String(val) +} + +// AWSECSTaskARN returns an attribute KeyValue conforming to the +// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS +// task +// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). +func AWSECSTaskARN(val string) attribute.KeyValue { + return AWSECSTaskARNKey.String(val) +} + +// AWSECSTaskFamily returns an attribute KeyValue conforming to the +// "aws.ecs.task.family" semantic conventions. It represents the task +// definition family this task definition is a member of. +func AWSECSTaskFamily(val string) attribute.KeyValue { + return AWSECSTaskFamilyKey.String(val) +} + +// AWSECSTaskRevision returns an attribute KeyValue conforming to the +// "aws.ecs.task.revision" semantic conventions. It represents the revision for +// this task definition. +func AWSECSTaskRevision(val string) attribute.KeyValue { + return AWSECSTaskRevisionKey.String(val) +} + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // AWSEKSClusterARNKey is the attribute Key conforming to the + // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an + // EKS cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") +) + +// AWSEKSClusterARN returns an attribute KeyValue conforming to the +// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS +// cluster. +func AWSEKSClusterARN(val string) attribute.KeyValue { + return AWSEKSClusterARNKey.String(val) +} + +// Resources specific to Amazon Web Services. +const ( + // AWSLogGroupNamesKey is the attribute Key conforming to the + // "aws.log.group.names" semantic conventions. It represents the name(s) of + // the AWS log group(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like + // multi-container applications, where a single application has sidecar + // containers, and each write to their own log group. + AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") + + // AWSLogGroupARNsKey is the attribute Key conforming to the + // "aws.log.group.arns" semantic conventions. It represents the Amazon + // Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the [log group ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") + + // AWSLogStreamNamesKey is the attribute Key conforming to the + // "aws.log.stream.names" semantic conventions. It represents the name(s) + // of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") + + // AWSLogStreamARNsKey is the attribute Key conforming to the + // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of + // the AWS log stream(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the [log stream ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + // One log group can contain several log streams, so these ARNs necessarily + // identify both a log group and a log stream. + AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") +) + +// AWSLogGroupNames returns an attribute KeyValue conforming to the +// "aws.log.group.names" semantic conventions. It represents the name(s) of the +// AWS log group(s) an application is writing to. +func AWSLogGroupNames(val ...string) attribute.KeyValue { + return AWSLogGroupNamesKey.StringSlice(val) +} + +// AWSLogGroupARNs returns an attribute KeyValue conforming to the +// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource +// Name(s) (ARN) of the AWS log group(s). +func AWSLogGroupARNs(val ...string) attribute.KeyValue { + return AWSLogGroupARNsKey.StringSlice(val) +} + +// AWSLogStreamNames returns an attribute KeyValue conforming to the +// "aws.log.stream.names" semantic conventions. It represents the name(s) of +// the AWS log stream(s) an application is writing to. +func AWSLogStreamNames(val ...string) attribute.KeyValue { + return AWSLogStreamNamesKey.StringSlice(val) +} + +// AWSLogStreamARNs returns an attribute KeyValue conforming to the +// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the +// AWS log stream(s). +func AWSLogStreamARNs(val ...string) attribute.KeyValue { + return AWSLogStreamARNsKey.StringSlice(val) +} + +// Heroku dyno metadata +const ( + // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the + // "heroku.release.creation_timestamp" semantic conventions. It represents + // the time and date the release was created + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2022-10-23T18:00:42Z' + HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") + + // HerokuReleaseCommitKey is the attribute Key conforming to the + // "heroku.release.commit" semantic conventions. It represents the commit + // hash for the current release + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") + + // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" + // semantic conventions. It represents the unique identifier for the + // application + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + HerokuAppIDKey = attribute.Key("heroku.app.id") +) + +// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming +// to the "heroku.release.creation_timestamp" semantic conventions. It +// represents the time and date the release was created +func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { + return HerokuReleaseCreationTimestampKey.String(val) +} + +// HerokuReleaseCommit returns an attribute KeyValue conforming to the +// "heroku.release.commit" semantic conventions. It represents the commit hash +// for the current release +func HerokuReleaseCommit(val string) attribute.KeyValue { + return HerokuReleaseCommitKey.String(val) +} + +// HerokuAppID returns an attribute KeyValue conforming to the +// "heroku.app.id" semantic conventions. It represents the unique identifier +// for the application +func HerokuAppID(val string) attribute.KeyValue { + return HerokuAppIDKey.String(val) +} + +// A container instance. +const ( + // ContainerNameKey is the attribute Key conforming to the "container.name" + // semantic conventions. It represents the container name used by container + // runtime. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-autoconf' + ContainerNameKey = attribute.Key("container.name") + + // ContainerIDKey is the attribute Key conforming to the "container.id" + // semantic conventions. It represents the container ID. Usually a UUID, as + // for example used to [identify Docker + // containers](https://docs.docker.com/engine/reference/run/#container-identification). + // The UUID might be abbreviated. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'a3bf90e006b2' + ContainerIDKey = attribute.Key("container.id") + + // ContainerRuntimeKey is the attribute Key conforming to the + // "container.runtime" semantic conventions. It represents the container + // runtime managing this container. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'docker', 'containerd', 'rkt' + ContainerRuntimeKey = attribute.Key("container.runtime") + + // ContainerImageNameKey is the attribute Key conforming to the + // "container.image.name" semantic conventions. It represents the name of + // the image the container was built on. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'gcr.io/opentelemetry/operator' + ContainerImageNameKey = attribute.Key("container.image.name") + + // ContainerImageTagKey is the attribute Key conforming to the + // "container.image.tag" semantic conventions. It represents the container + // image tag. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '0.1' + ContainerImageTagKey = attribute.Key("container.image.tag") +) + +// ContainerName returns an attribute KeyValue conforming to the +// "container.name" semantic conventions. It represents the container name used +// by container runtime. +func ContainerName(val string) attribute.KeyValue { + return ContainerNameKey.String(val) +} + +// ContainerID returns an attribute KeyValue conforming to the +// "container.id" semantic conventions. It represents the container ID. Usually +// a UUID, as for example used to [identify Docker +// containers](https://docs.docker.com/engine/reference/run/#container-identification). +// The UUID might be abbreviated. +func ContainerID(val string) attribute.KeyValue { + return ContainerIDKey.String(val) +} + +// ContainerRuntime returns an attribute KeyValue conforming to the +// "container.runtime" semantic conventions. It represents the container +// runtime managing this container. +func ContainerRuntime(val string) attribute.KeyValue { + return ContainerRuntimeKey.String(val) +} + +// ContainerImageName returns an attribute KeyValue conforming to the +// "container.image.name" semantic conventions. It represents the name of the +// image the container was built on. +func ContainerImageName(val string) attribute.KeyValue { + return ContainerImageNameKey.String(val) +} + +// ContainerImageTag returns an attribute KeyValue conforming to the +// "container.image.tag" semantic conventions. It represents the container +// image tag. +func ContainerImageTag(val string) attribute.KeyValue { + return ContainerImageTagKey.String(val) +} + +// The software deployment. +const ( + // DeploymentEnvironmentKey is the attribute Key conforming to the + // "deployment.environment" semantic conventions. It represents the name of + // the [deployment + // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka + // deployment tier). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'staging', 'production' + DeploymentEnvironmentKey = attribute.Key("deployment.environment") +) + +// DeploymentEnvironment returns an attribute KeyValue conforming to the +// "deployment.environment" semantic conventions. It represents the name of the +// [deployment +// environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka +// deployment tier). +func DeploymentEnvironment(val string) attribute.KeyValue { + return DeploymentEnvironmentKey.String(val) +} + +// The device on which the process represented by this resource is running. +const ( + // DeviceIDKey is the attribute Key conforming to the "device.id" semantic + // conventions. It represents a unique identifier representing the device + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values + // outlined below. This value is not an advertising identifier and MUST NOT + // be used as such. On iOS (Swift or Objective-C), this value MUST be equal + // to the [vendor + // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). + // On Android (Java or Kotlin), this value MUST be equal to the Firebase + // Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found + // [here](https://developer.android.com/training/articles/user-data-ids) on + // best practices and exact implementation details. Caution should be taken + // when storing personal data or anything which can identify a user. GDPR + // and data protection laws may apply, ensure you do your own due + // diligence. + DeviceIDKey = attribute.Key("device.id") + + // DeviceModelIdentifierKey is the attribute Key conforming to the + // "device.model.identifier" semantic conventions. It represents the model + // identifier for the device + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine readable version + // of the model identifier rather than the market or consumer-friendly name + // of the device. + DeviceModelIdentifierKey = attribute.Key("device.model.identifier") + + // DeviceModelNameKey is the attribute Key conforming to the + // "device.model.name" semantic conventions. It represents the marketing + // name for the device model + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human readable version of + // the device model rather than a machine readable alternative. + DeviceModelNameKey = attribute.Key("device.model.name") + + // DeviceManufacturerKey is the attribute Key conforming to the + // "device.manufacturer" semantic conventions. It represents the name of + // the device manufacturer + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via + // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). + // iOS apps SHOULD hardcode the value `Apple`. + DeviceManufacturerKey = attribute.Key("device.manufacturer") +) + +// DeviceID returns an attribute KeyValue conforming to the "device.id" +// semantic conventions. It represents a unique identifier representing the +// device +func DeviceID(val string) attribute.KeyValue { + return DeviceIDKey.String(val) +} + +// DeviceModelIdentifier returns an attribute KeyValue conforming to the +// "device.model.identifier" semantic conventions. It represents the model +// identifier for the device +func DeviceModelIdentifier(val string) attribute.KeyValue { + return DeviceModelIdentifierKey.String(val) +} + +// DeviceModelName returns an attribute KeyValue conforming to the +// "device.model.name" semantic conventions. It represents the marketing name +// for the device model +func DeviceModelName(val string) attribute.KeyValue { + return DeviceModelNameKey.String(val) +} + +// DeviceManufacturer returns an attribute KeyValue conforming to the +// "device.manufacturer" semantic conventions. It represents the name of the +// device manufacturer +func DeviceManufacturer(val string) attribute.KeyValue { + return DeviceManufacturerKey.String(val) +} + +// A serverless instance. +const ( + // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic + // conventions. It represents the name of the single function that this + // runtime instance executes. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the + // FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) + // span attributes). + // + // For some cloud providers, the above definition is ambiguous. The + // following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud + // providers/products: + // + // * **Azure:** The full name `/`, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the `cloud.resource_id` attribute). + FaaSNameKey = attribute.Key("faas.name") + + // FaaSVersionKey is the attribute Key conforming to the "faas.version" + // semantic conventions. It represents the immutable version of the + // function being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use: + // + // * **AWS Lambda:** The [function + // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + // (an integer represented as a decimal string). + // * **Google Cloud Run:** The + // [revision](https://cloud.google.com/run/docs/managing/revisions) + // (i.e., the function name plus the revision suffix). + // * **Google Cloud Functions:** The value of the + // [`K_REVISION` environment + // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). + // * **Azure Functions:** Not applicable. Do not set this attribute. + FaaSVersionKey = attribute.Key("faas.version") + + // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" + // semantic conventions. It represents the execution environment ID as a + // string, that will be potentially reused for other invocations to the + // same function/function version. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note: * **AWS Lambda:** Use the (full) log stream name. + FaaSInstanceKey = attribute.Key("faas.instance") + + // FaaSMaxMemoryKey is the attribute Key conforming to the + // "faas.max_memory" semantic conventions. It represents the amount of + // memory available to the serverless function converted to Bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little + // memory can easily stop a Java AWS Lambda function from working + // correctly. On AWS Lambda, the environment variable + // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must + // be multiplied by 1,048,576). + FaaSMaxMemoryKey = attribute.Key("faas.max_memory") +) + +// FaaSName returns an attribute KeyValue conforming to the "faas.name" +// semantic conventions. It represents the name of the single function that +// this runtime instance executes. +func FaaSName(val string) attribute.KeyValue { + return FaaSNameKey.String(val) +} + +// FaaSVersion returns an attribute KeyValue conforming to the +// "faas.version" semantic conventions. It represents the immutable version of +// the function being executed. +func FaaSVersion(val string) attribute.KeyValue { + return FaaSVersionKey.String(val) +} + +// FaaSInstance returns an attribute KeyValue conforming to the +// "faas.instance" semantic conventions. It represents the execution +// environment ID as a string, that will be potentially reused for other +// invocations to the same function/function version. +func FaaSInstance(val string) attribute.KeyValue { + return FaaSInstanceKey.String(val) +} + +// FaaSMaxMemory returns an attribute KeyValue conforming to the +// "faas.max_memory" semantic conventions. It represents the amount of memory +// available to the serverless function converted to Bytes. +func FaaSMaxMemory(val int) attribute.KeyValue { + return FaaSMaxMemoryKey.Int(val) +} + +// A host is defined as a general computing instance. +const ( + // HostIDKey is the attribute Key conforming to the "host.id" semantic + // conventions. It represents the unique host ID. For Cloud, this must be + // the instance_id assigned by the cloud provider. For non-containerized + // systems, this should be the `machine-id`. See the table below for the + // sources to use to determine the `machine-id` based on operating system. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + HostIDKey = attribute.Key("host.id") + + // HostNameKey is the attribute Key conforming to the "host.name" semantic + // conventions. It represents the name of the host. On Unix systems, it may + // contain what the hostname command returns, or the fully qualified + // hostname, or another name specified by the user. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-test' + HostNameKey = attribute.Key("host.name") + + // HostTypeKey is the attribute Key conforming to the "host.type" semantic + // conventions. It represents the type of host. For Cloud, this must be the + // machine type. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'n1-standard-1' + HostTypeKey = attribute.Key("host.type") + + // HostArchKey is the attribute Key conforming to the "host.arch" semantic + // conventions. It represents the CPU architecture the host system is + // running on. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + HostArchKey = attribute.Key("host.arch") + + // HostImageNameKey is the attribute Key conforming to the + // "host.image.name" semantic conventions. It represents the name of the VM + // image or OS install the host was instantiated from. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + HostImageNameKey = attribute.Key("host.image.name") + + // HostImageIDKey is the attribute Key conforming to the "host.image.id" + // semantic conventions. It represents the vM image ID. For Cloud, this + // value is from the provider. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ami-07b06b442921831e5' + HostImageIDKey = attribute.Key("host.image.id") + + // HostImageVersionKey is the attribute Key conforming to the + // "host.image.version" semantic conventions. It represents the version + // string of the VM image as defined in [Version + // Attributes](README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '0.1' + HostImageVersionKey = attribute.Key("host.image.version") +) + +var ( + // AMD64 + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + HostArchX86 = HostArchKey.String("x86") +) + +// HostID returns an attribute KeyValue conforming to the "host.id" semantic +// conventions. It represents the unique host ID. For Cloud, this must be the +// instance_id assigned by the cloud provider. For non-containerized systems, +// this should be the `machine-id`. See the table below for the sources to use +// to determine the `machine-id` based on operating system. +func HostID(val string) attribute.KeyValue { + return HostIDKey.String(val) +} + +// HostName returns an attribute KeyValue conforming to the "host.name" +// semantic conventions. It represents the name of the host. On Unix systems, +// it may contain what the hostname command returns, or the fully qualified +// hostname, or another name specified by the user. +func HostName(val string) attribute.KeyValue { + return HostNameKey.String(val) +} + +// HostType returns an attribute KeyValue conforming to the "host.type" +// semantic conventions. It represents the type of host. For Cloud, this must +// be the machine type. +func HostType(val string) attribute.KeyValue { + return HostTypeKey.String(val) +} + +// HostImageName returns an attribute KeyValue conforming to the +// "host.image.name" semantic conventions. It represents the name of the VM +// image or OS install the host was instantiated from. +func HostImageName(val string) attribute.KeyValue { + return HostImageNameKey.String(val) +} + +// HostImageID returns an attribute KeyValue conforming to the +// "host.image.id" semantic conventions. It represents the vM image ID. For +// Cloud, this value is from the provider. +func HostImageID(val string) attribute.KeyValue { + return HostImageIDKey.String(val) +} + +// HostImageVersion returns an attribute KeyValue conforming to the +// "host.image.version" semantic conventions. It represents the version string +// of the VM image as defined in [Version +// Attributes](README.md#version-attributes). +func HostImageVersion(val string) attribute.KeyValue { + return HostImageVersionKey.String(val) +} + +// A Kubernetes Cluster. +const ( + // K8SClusterNameKey is the attribute Key conforming to the + // "k8s.cluster.name" semantic conventions. It represents the name of the + // cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-cluster' + K8SClusterNameKey = attribute.Key("k8s.cluster.name") +) + +// K8SClusterName returns an attribute KeyValue conforming to the +// "k8s.cluster.name" semantic conventions. It represents the name of the +// cluster. +func K8SClusterName(val string) attribute.KeyValue { + return K8SClusterNameKey.String(val) +} + +// A Kubernetes Node object. +const ( + // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" + // semantic conventions. It represents the name of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'node-1' + K8SNodeNameKey = attribute.Key("k8s.node.name") + + // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" + // semantic conventions. It represents the UID of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + K8SNodeUIDKey = attribute.Key("k8s.node.uid") +) + +// K8SNodeName returns an attribute KeyValue conforming to the +// "k8s.node.name" semantic conventions. It represents the name of the Node. +func K8SNodeName(val string) attribute.KeyValue { + return K8SNodeNameKey.String(val) +} + +// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" +// semantic conventions. It represents the UID of the Node. +func K8SNodeUID(val string) attribute.KeyValue { + return K8SNodeUIDKey.String(val) +} + +// A Kubernetes Namespace. +const ( + // K8SNamespaceNameKey is the attribute Key conforming to the + // "k8s.namespace.name" semantic conventions. It represents the name of the + // namespace that the pod is running in. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'default' + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") +) + +// K8SNamespaceName returns an attribute KeyValue conforming to the +// "k8s.namespace.name" semantic conventions. It represents the name of the +// namespace that the pod is running in. +func K8SNamespaceName(val string) attribute.KeyValue { + return K8SNamespaceNameKey.String(val) +} + +// A Kubernetes Pod object. +const ( + // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" + // semantic conventions. It represents the UID of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SPodUIDKey = attribute.Key("k8s.pod.uid") + + // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" + // semantic conventions. It represents the name of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-pod-autoconf' + K8SPodNameKey = attribute.Key("k8s.pod.name") +) + +// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" +// semantic conventions. It represents the UID of the Pod. +func K8SPodUID(val string) attribute.KeyValue { + return K8SPodUIDKey.String(val) +} + +// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" +// semantic conventions. It represents the name of the Pod. +func K8SPodName(val string) attribute.KeyValue { + return K8SPodNameKey.String(val) +} + +// A container in a +// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). +const ( + // K8SContainerNameKey is the attribute Key conforming to the + // "k8s.container.name" semantic conventions. It represents the name of the + // Container from Pod specification, must be unique within a Pod. Container + // runtime usually uses different globally unique name (`container.name`). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'redis' + K8SContainerNameKey = attribute.Key("k8s.container.name") + + // K8SContainerRestartCountKey is the attribute Key conforming to the + // "k8s.container.restart_count" semantic conventions. It represents the + // number of times the container was restarted. This attribute can be used + // to identify a particular container (running or stopped) within a + // container spec. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 0, 2 + K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") +) + +// K8SContainerName returns an attribute KeyValue conforming to the +// "k8s.container.name" semantic conventions. It represents the name of the +// Container from Pod specification, must be unique within a Pod. Container +// runtime usually uses different globally unique name (`container.name`). +func K8SContainerName(val string) attribute.KeyValue { + return K8SContainerNameKey.String(val) +} + +// K8SContainerRestartCount returns an attribute KeyValue conforming to the +// "k8s.container.restart_count" semantic conventions. It represents the number +// of times the container was restarted. This attribute can be used to identify +// a particular container (running or stopped) within a container spec. +func K8SContainerRestartCount(val int) attribute.KeyValue { + return K8SContainerRestartCountKey.Int(val) +} + +// A Kubernetes ReplicaSet object. +const ( + // K8SReplicaSetUIDKey is the attribute Key conforming to the + // "k8s.replicaset.uid" semantic conventions. It represents the UID of the + // ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + + // K8SReplicaSetNameKey is the attribute Key conforming to the + // "k8s.replicaset.name" semantic conventions. It represents the name of + // the ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") +) + +// K8SReplicaSetUID returns an attribute KeyValue conforming to the +// "k8s.replicaset.uid" semantic conventions. It represents the UID of the +// ReplicaSet. +func K8SReplicaSetUID(val string) attribute.KeyValue { + return K8SReplicaSetUIDKey.String(val) +} + +// K8SReplicaSetName returns an attribute KeyValue conforming to the +// "k8s.replicaset.name" semantic conventions. It represents the name of the +// ReplicaSet. +func K8SReplicaSetName(val string) attribute.KeyValue { + return K8SReplicaSetNameKey.String(val) +} + +// A Kubernetes Deployment object. +const ( + // K8SDeploymentUIDKey is the attribute Key conforming to the + // "k8s.deployment.uid" semantic conventions. It represents the UID of the + // Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + + // K8SDeploymentNameKey is the attribute Key conforming to the + // "k8s.deployment.name" semantic conventions. It represents the name of + // the Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") +) + +// K8SDeploymentUID returns an attribute KeyValue conforming to the +// "k8s.deployment.uid" semantic conventions. It represents the UID of the +// Deployment. +func K8SDeploymentUID(val string) attribute.KeyValue { + return K8SDeploymentUIDKey.String(val) +} + +// K8SDeploymentName returns an attribute KeyValue conforming to the +// "k8s.deployment.name" semantic conventions. It represents the name of the +// Deployment. +func K8SDeploymentName(val string) attribute.KeyValue { + return K8SDeploymentNameKey.String(val) +} + +// A Kubernetes StatefulSet object. +const ( + // K8SStatefulSetUIDKey is the attribute Key conforming to the + // "k8s.statefulset.uid" semantic conventions. It represents the UID of the + // StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") + + // K8SStatefulSetNameKey is the attribute Key conforming to the + // "k8s.statefulset.name" semantic conventions. It represents the name of + // the StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") +) + +// K8SStatefulSetUID returns an attribute KeyValue conforming to the +// "k8s.statefulset.uid" semantic conventions. It represents the UID of the +// StatefulSet. +func K8SStatefulSetUID(val string) attribute.KeyValue { + return K8SStatefulSetUIDKey.String(val) +} + +// K8SStatefulSetName returns an attribute KeyValue conforming to the +// "k8s.statefulset.name" semantic conventions. It represents the name of the +// StatefulSet. +func K8SStatefulSetName(val string) attribute.KeyValue { + return K8SStatefulSetNameKey.String(val) +} + +// A Kubernetes DaemonSet object. +const ( + // K8SDaemonSetUIDKey is the attribute Key conforming to the + // "k8s.daemonset.uid" semantic conventions. It represents the UID of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") + + // K8SDaemonSetNameKey is the attribute Key conforming to the + // "k8s.daemonset.name" semantic conventions. It represents the name of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") +) + +// K8SDaemonSetUID returns an attribute KeyValue conforming to the +// "k8s.daemonset.uid" semantic conventions. It represents the UID of the +// DaemonSet. +func K8SDaemonSetUID(val string) attribute.KeyValue { + return K8SDaemonSetUIDKey.String(val) +} + +// K8SDaemonSetName returns an attribute KeyValue conforming to the +// "k8s.daemonset.name" semantic conventions. It represents the name of the +// DaemonSet. +func K8SDaemonSetName(val string) attribute.KeyValue { + return K8SDaemonSetNameKey.String(val) +} + +// A Kubernetes Job object. +const ( + // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" + // semantic conventions. It represents the UID of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SJobUIDKey = attribute.Key("k8s.job.uid") + + // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" + // semantic conventions. It represents the name of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SJobNameKey = attribute.Key("k8s.job.name") +) + +// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" +// semantic conventions. It represents the UID of the Job. +func K8SJobUID(val string) attribute.KeyValue { + return K8SJobUIDKey.String(val) +} + +// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" +// semantic conventions. It represents the name of the Job. +func K8SJobName(val string) attribute.KeyValue { + return K8SJobNameKey.String(val) +} + +// A Kubernetes CronJob object. +const ( + // K8SCronJobUIDKey is the attribute Key conforming to the + // "k8s.cronjob.uid" semantic conventions. It represents the UID of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") + + // K8SCronJobNameKey is the attribute Key conforming to the + // "k8s.cronjob.name" semantic conventions. It represents the name of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") +) + +// K8SCronJobUID returns an attribute KeyValue conforming to the +// "k8s.cronjob.uid" semantic conventions. It represents the UID of the +// CronJob. +func K8SCronJobUID(val string) attribute.KeyValue { + return K8SCronJobUIDKey.String(val) +} + +// K8SCronJobName returns an attribute KeyValue conforming to the +// "k8s.cronjob.name" semantic conventions. It represents the name of the +// CronJob. +func K8SCronJobName(val string) attribute.KeyValue { + return K8SCronJobNameKey.String(val) +} + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // OSTypeKey is the attribute Key conforming to the "os.type" semantic + // conventions. It represents the operating system type. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + OSTypeKey = attribute.Key("os.type") + + // OSDescriptionKey is the attribute Key conforming to the "os.description" + // semantic conventions. It represents the human readable (not intended to + // be parsed) OS version information, like e.g. reported by `ver` or + // `lsb_release -a` commands. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 + // LTS' + OSDescriptionKey = attribute.Key("os.description") + + // OSNameKey is the attribute Key conforming to the "os.name" semantic + // conventions. It represents the human readable operating system name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'iOS', 'Android', 'Ubuntu' + OSNameKey = attribute.Key("os.name") + + // OSVersionKey is the attribute Key conforming to the "os.version" + // semantic conventions. It represents the version string of the operating + // system as defined in [Version + // Attributes](../../resource/semantic_conventions/README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '14.2.1', '18.04.1' + OSVersionKey = attribute.Key("os.version") +) + +var ( + // Microsoft Windows + OSTypeWindows = OSTypeKey.String("windows") + // Linux + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + OSTypeZOS = OSTypeKey.String("z_os") +) + +// OSDescription returns an attribute KeyValue conforming to the +// "os.description" semantic conventions. It represents the human readable (not +// intended to be parsed) OS version information, like e.g. reported by `ver` +// or `lsb_release -a` commands. +func OSDescription(val string) attribute.KeyValue { + return OSDescriptionKey.String(val) +} + +// OSName returns an attribute KeyValue conforming to the "os.name" semantic +// conventions. It represents the human readable operating system name. +func OSName(val string) attribute.KeyValue { + return OSNameKey.String(val) +} + +// OSVersion returns an attribute KeyValue conforming to the "os.version" +// semantic conventions. It represents the version string of the operating +// system as defined in [Version +// Attributes](../../resource/semantic_conventions/README.md#version-attributes). +func OSVersion(val string) attribute.KeyValue { + return OSVersionKey.String(val) +} + +// An operating system process. +const ( + // ProcessPIDKey is the attribute Key conforming to the "process.pid" + // semantic conventions. It represents the process identifier (PID). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 1234 + ProcessPIDKey = attribute.Key("process.pid") + + // ProcessParentPIDKey is the attribute Key conforming to the + // "process.parent_pid" semantic conventions. It represents the parent + // Process identifier (PID). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 111 + ProcessParentPIDKey = attribute.Key("process.parent_pid") + + // ProcessExecutableNameKey is the attribute Key conforming to the + // "process.executable.name" semantic conventions. It represents the name + // of the process executable. On Linux based systems, can be set to the + // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name + // of `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'otelcol' + ProcessExecutableNameKey = attribute.Key("process.executable.name") + + // ProcessExecutablePathKey is the attribute Key conforming to the + // "process.executable.path" semantic conventions. It represents the full + // path to the process executable. On Linux based systems, can be set to + // the target of `proc/[pid]/exe`. On Windows, can be set to the result of + // `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: '/usr/bin/cmd/otelcol' + ProcessExecutablePathKey = attribute.Key("process.executable.path") + + // ProcessCommandKey is the attribute Key conforming to the + // "process.command" semantic conventions. It represents the command used + // to launch the process (i.e. the command name). On Linux based systems, + // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can + // be set to the first parameter extracted from `GetCommandLineW`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'cmd/otelcol' + ProcessCommandKey = attribute.Key("process.command") + + // ProcessCommandLineKey is the attribute Key conforming to the + // "process.command_line" semantic conventions. It represents the full + // command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of `GetCommandLineW`. + // Do not set this if you have to assemble it just for monitoring; use + // `process.command_args` instead. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + ProcessCommandLineKey = attribute.Key("process.command_line") + + // ProcessCommandArgsKey is the attribute Key conforming to the + // "process.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited + // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, + // this would be the full argv vector passed to `main`. + // + // Type: string[] + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'cmd/otecol', '--config=config.yaml' + ProcessCommandArgsKey = attribute.Key("process.command_args") + + // ProcessOwnerKey is the attribute Key conforming to the "process.owner" + // semantic conventions. It represents the username of the user that owns + // the process. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'root' + ProcessOwnerKey = attribute.Key("process.owner") +) + +// ProcessPID returns an attribute KeyValue conforming to the "process.pid" +// semantic conventions. It represents the process identifier (PID). +func ProcessPID(val int) attribute.KeyValue { + return ProcessPIDKey.Int(val) +} + +// ProcessParentPID returns an attribute KeyValue conforming to the +// "process.parent_pid" semantic conventions. It represents the parent Process +// identifier (PID). +func ProcessParentPID(val int) attribute.KeyValue { + return ProcessParentPIDKey.Int(val) +} + +// ProcessExecutableName returns an attribute KeyValue conforming to the +// "process.executable.name" semantic conventions. It represents the name of +// the process executable. On Linux based systems, can be set to the `Name` in +// `proc/[pid]/status`. On Windows, can be set to the base name of +// `GetProcessImageFileNameW`. +func ProcessExecutableName(val string) attribute.KeyValue { + return ProcessExecutableNameKey.String(val) +} + +// ProcessExecutablePath returns an attribute KeyValue conforming to the +// "process.executable.path" semantic conventions. It represents the full path +// to the process executable. On Linux based systems, can be set to the target +// of `proc/[pid]/exe`. On Windows, can be set to the result of +// `GetProcessImageFileNameW`. +func ProcessExecutablePath(val string) attribute.KeyValue { + return ProcessExecutablePathKey.String(val) +} + +// ProcessCommand returns an attribute KeyValue conforming to the +// "process.command" semantic conventions. It represents the command used to +// launch the process (i.e. the command name). On Linux based systems, can be +// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to +// the first parameter extracted from `GetCommandLineW`. +func ProcessCommand(val string) attribute.KeyValue { + return ProcessCommandKey.String(val) +} + +// ProcessCommandLine returns an attribute KeyValue conforming to the +// "process.command_line" semantic conventions. It represents the full command +// used to launch the process as a single string representing the full command. +// On Windows, can be set to the result of `GetCommandLineW`. Do not set this +// if you have to assemble it just for monitoring; use `process.command_args` +// instead. +func ProcessCommandLine(val string) attribute.KeyValue { + return ProcessCommandLineKey.String(val) +} + +// ProcessCommandArgs returns an attribute KeyValue conforming to the +// "process.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) as received by +// the process. On Linux-based systems (and some other Unixoid systems +// supporting procfs), can be set according to the list of null-delimited +// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, +// this would be the full argv vector passed to `main`. +func ProcessCommandArgs(val ...string) attribute.KeyValue { + return ProcessCommandArgsKey.StringSlice(val) +} + +// ProcessOwner returns an attribute KeyValue conforming to the +// "process.owner" semantic conventions. It represents the username of the user +// that owns the process. +func ProcessOwner(val string) attribute.KeyValue { + return ProcessOwnerKey.String(val) +} + +// The single (language) runtime instance which is monitored. +const ( + // ProcessRuntimeNameKey is the attribute Key conforming to the + // "process.runtime.name" semantic conventions. It represents the name of + // the runtime of this process. For compiled native binaries, this SHOULD + // be the name of the compiler. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'OpenJDK Runtime Environment' + ProcessRuntimeNameKey = attribute.Key("process.runtime.name") + + // ProcessRuntimeVersionKey is the attribute Key conforming to the + // "process.runtime.version" semantic conventions. It represents the + // version of the runtime of this process, as returned by the runtime + // without modification. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '14.0.2' + ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") + + // ProcessRuntimeDescriptionKey is the attribute Key conforming to the + // "process.runtime.description" semantic conventions. It represents an + // additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") +) + +// ProcessRuntimeName returns an attribute KeyValue conforming to the +// "process.runtime.name" semantic conventions. It represents the name of the +// runtime of this process. For compiled native binaries, this SHOULD be the +// name of the compiler. +func ProcessRuntimeName(val string) attribute.KeyValue { + return ProcessRuntimeNameKey.String(val) +} + +// ProcessRuntimeVersion returns an attribute KeyValue conforming to the +// "process.runtime.version" semantic conventions. It represents the version of +// the runtime of this process, as returned by the runtime without +// modification. +func ProcessRuntimeVersion(val string) attribute.KeyValue { + return ProcessRuntimeVersionKey.String(val) +} + +// ProcessRuntimeDescription returns an attribute KeyValue conforming to the +// "process.runtime.description" semantic conventions. It represents an +// additional description about the runtime of the process, for example a +// specific vendor customization of the runtime environment. +func ProcessRuntimeDescription(val string) attribute.KeyValue { + return ProcessRuntimeDescriptionKey.String(val) +} + +// A service instance. +const ( + // ServiceNameKey is the attribute Key conforming to the "service.name" + // semantic conventions. It represents the logical name of the service. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled + // services. If the value was not specified, SDKs MUST fallback to + // `unknown_service:` concatenated with + // [`process.executable.name`](process.md#process), e.g. + // `unknown_service:bash`. If `process.executable.name` is not available, + // the value MUST be set to `unknown_service`. + ServiceNameKey = attribute.Key("service.name") +) + +// ServiceName returns an attribute KeyValue conforming to the +// "service.name" semantic conventions. It represents the logical name of the +// service. +func ServiceName(val string) attribute.KeyValue { + return ServiceNameKey.String(val) +} + +// A service instance. +const ( + // ServiceNamespaceKey is the attribute Key conforming to the + // "service.namespace" semantic conventions. It represents a namespace for + // `service.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group + // of services, for example the team name that owns a group of services. + // `service.name` is expected to be unique within the same namespace. If + // `service.namespace` is not specified in the Resource then `service.name` + // is expected to be unique for all services that have no explicit + // namespace defined (so the empty/unspecified namespace is simply one more + // valid namespace). Zero-length namespace string is assumed equal to + // unspecified namespace. + ServiceNamespaceKey = attribute.Key("service.namespace") + + // ServiceInstanceIDKey is the attribute Key conforming to the + // "service.instance.id" semantic conventions. It represents the string ID + // of the service instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'my-k8s-pod-deployment-1', + // '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // `service.namespace,service.name` pair (in other words + // `service.namespace,service.name,service.instance.id` triplet MUST be + // globally unique). The ID helps to distinguish instances of the same + // service that exist at the same time (e.g. instances of a horizontally + // scaled service). It is preferable for the ID to be persistent and stay + // the same for the lifetime of the service instance, however it is + // acceptable that the ID is ephemeral and changes during important + // lifetime events for the service (e.g. service restarts). If the service + // has no inherent unique ID that can be used as the value of this + // attribute it is recommended to generate a random Version 1 or Version 4 + // RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + ServiceInstanceIDKey = attribute.Key("service.instance.id") + + // ServiceVersionKey is the attribute Key conforming to the + // "service.version" semantic conventions. It represents the version string + // of the service API or implementation. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2.0.0' + ServiceVersionKey = attribute.Key("service.version") +) + +// ServiceNamespace returns an attribute KeyValue conforming to the +// "service.namespace" semantic conventions. It represents a namespace for +// `service.name`. +func ServiceNamespace(val string) attribute.KeyValue { + return ServiceNamespaceKey.String(val) +} + +// ServiceInstanceID returns an attribute KeyValue conforming to the +// "service.instance.id" semantic conventions. It represents the string ID of +// the service instance. +func ServiceInstanceID(val string) attribute.KeyValue { + return ServiceInstanceIDKey.String(val) +} + +// ServiceVersion returns an attribute KeyValue conforming to the +// "service.version" semantic conventions. It represents the version string of +// the service API or implementation. +func ServiceVersion(val string) attribute.KeyValue { + return ServiceVersionKey.String(val) +} + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // TelemetrySDKNameKey is the attribute Key conforming to the + // "telemetry.sdk.name" semantic conventions. It represents the name of the + // telemetry SDK as defined above. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'opentelemetry' + TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") + + // TelemetrySDKLanguageKey is the attribute Key conforming to the + // "telemetry.sdk.language" semantic conventions. It represents the + // language of the telemetry SDK. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") + + // TelemetrySDKVersionKey is the attribute Key conforming to the + // "telemetry.sdk.version" semantic conventions. It represents the version + // string of the telemetry SDK. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: '1.2.3' + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") +) + +var ( + // cpp + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // webjs + TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") + // swift + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") +) + +// TelemetrySDKName returns an attribute KeyValue conforming to the +// "telemetry.sdk.name" semantic conventions. It represents the name of the +// telemetry SDK as defined above. +func TelemetrySDKName(val string) attribute.KeyValue { + return TelemetrySDKNameKey.String(val) +} + +// TelemetrySDKVersion returns an attribute KeyValue conforming to the +// "telemetry.sdk.version" semantic conventions. It represents the version +// string of the telemetry SDK. +func TelemetrySDKVersion(val string) attribute.KeyValue { + return TelemetrySDKVersionKey.String(val) +} + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // TelemetryAutoVersionKey is the attribute Key conforming to the + // "telemetry.auto.version" semantic conventions. It represents the version + // string of the auto instrumentation agent, if used. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.2.3' + TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") +) + +// TelemetryAutoVersion returns an attribute KeyValue conforming to the +// "telemetry.auto.version" semantic conventions. It represents the version +// string of the auto instrumentation agent, if used. +func TelemetryAutoVersion(val string) attribute.KeyValue { + return TelemetryAutoVersionKey.String(val) +} + +// Resource describing the packaged software running the application code. Web +// engines are typically executed using process.runtime. +const ( + // WebEngineNameKey is the attribute Key conforming to the "webengine.name" + // semantic conventions. It represents the name of the web engine. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'WildFly' + WebEngineNameKey = attribute.Key("webengine.name") + + // WebEngineVersionKey is the attribute Key conforming to the + // "webengine.version" semantic conventions. It represents the version of + // the web engine. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '21.0.0' + WebEngineVersionKey = attribute.Key("webengine.version") + + // WebEngineDescriptionKey is the attribute Key conforming to the + // "webengine.description" semantic conventions. It represents the + // additional description of the web engine (e.g. detailed version and + // edition information). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - + // 2.2.2.Final' + WebEngineDescriptionKey = attribute.Key("webengine.description") +) + +// WebEngineName returns an attribute KeyValue conforming to the +// "webengine.name" semantic conventions. It represents the name of the web +// engine. +func WebEngineName(val string) attribute.KeyValue { + return WebEngineNameKey.String(val) +} + +// WebEngineVersion returns an attribute KeyValue conforming to the +// "webengine.version" semantic conventions. It represents the version of the +// web engine. +func WebEngineVersion(val string) attribute.KeyValue { + return WebEngineVersionKey.String(val) +} + +// WebEngineDescription returns an attribute KeyValue conforming to the +// "webengine.description" semantic conventions. It represents the additional +// description of the web engine (e.g. detailed version and edition +// information). +func WebEngineDescription(val string) attribute.KeyValue { + return WebEngineDescriptionKey.String(val) +} + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // OTelScopeNameKey is the attribute Key conforming to the + // "otel.scope.name" semantic conventions. It represents the name of the + // instrumentation scope - (`InstrumentationScope.Name` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'io.opentelemetry.contrib.mongodb' + OTelScopeNameKey = attribute.Key("otel.scope.name") + + // OTelScopeVersionKey is the attribute Key conforming to the + // "otel.scope.version" semantic conventions. It represents the version of + // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.0.0' + OTelScopeVersionKey = attribute.Key("otel.scope.version") +) + +// OTelScopeName returns an attribute KeyValue conforming to the +// "otel.scope.name" semantic conventions. It represents the name of the +// instrumentation scope - (`InstrumentationScope.Name` in OTLP). +func OTelScopeName(val string) attribute.KeyValue { + return OTelScopeNameKey.String(val) +} + +// OTelScopeVersion returns an attribute KeyValue conforming to the +// "otel.scope.version" semantic conventions. It represents the version of the +// instrumentation scope - (`InstrumentationScope.Version` in OTLP). +func OTelScopeVersion(val string) attribute.KeyValue { + return OTelScopeVersionKey.String(val) +} + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry +// Scope's concepts. +const ( + // OTelLibraryNameKey is the attribute Key conforming to the + // "otel.library.name" semantic conventions. It represents the deprecated, + // use the `otel.scope.name` attribute. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'io.opentelemetry.contrib.mongodb' + OTelLibraryNameKey = attribute.Key("otel.library.name") + + // OTelLibraryVersionKey is the attribute Key conforming to the + // "otel.library.version" semantic conventions. It represents the + // deprecated, use the `otel.scope.version` attribute. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '1.0.0' + OTelLibraryVersionKey = attribute.Key("otel.library.version") +) + +// OTelLibraryName returns an attribute KeyValue conforming to the +// "otel.library.name" semantic conventions. It represents the deprecated, use +// the `otel.scope.name` attribute. +func OTelLibraryName(val string) attribute.KeyValue { + return OTelLibraryNameKey.String(val) +} + +// OTelLibraryVersion returns an attribute KeyValue conforming to the +// "otel.library.version" semantic conventions. It represents the deprecated, +// use the `otel.scope.version` attribute. +func OTelLibraryVersion(val string) attribute.KeyValue { + return OTelLibraryVersionKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go new file mode 100644 index 000000000..95d0210e3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go new file mode 100644 index 000000000..90b1b0452 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go @@ -0,0 +1,2599 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" + +import "go.opentelemetry.io/otel/attribute" + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // ExceptionTypeKey is the attribute Key conforming to the "exception.type" + // semantic conventions. It represents the type of the exception (its + // fully-qualified class name, if applicable). The dynamic type of the + // exception should be preferred over the static type in languages that + // support it. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'java.net.ConnectException', 'OSError' + ExceptionTypeKey = attribute.Key("exception.type") + + // ExceptionMessageKey is the attribute Key conforming to the + // "exception.message" semantic conventions. It represents the exception + // message. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Division by zero', "Can't convert 'int' object to str + // implicitly" + ExceptionMessageKey = attribute.Key("exception.message") + + // ExceptionStacktraceKey is the attribute Key conforming to the + // "exception.stacktrace" semantic conventions. It represents a stacktrace + // as a string in the natural representation for the language runtime. The + // representation is to be determined and documented by each language SIG. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + ExceptionStacktraceKey = attribute.Key("exception.stacktrace") +) + +// ExceptionType returns an attribute KeyValue conforming to the +// "exception.type" semantic conventions. It represents the type of the +// exception (its fully-qualified class name, if applicable). The dynamic type +// of the exception should be preferred over the static type in languages that +// support it. +func ExceptionType(val string) attribute.KeyValue { + return ExceptionTypeKey.String(val) +} + +// ExceptionMessage returns an attribute KeyValue conforming to the +// "exception.message" semantic conventions. It represents the exception +// message. +func ExceptionMessage(val string) attribute.KeyValue { + return ExceptionMessageKey.String(val) +} + +// ExceptionStacktrace returns an attribute KeyValue conforming to the +// "exception.stacktrace" semantic conventions. It represents a stacktrace as a +// string in the natural representation for the language runtime. The +// representation is to be determined and documented by each language SIG. +func ExceptionStacktrace(val string) attribute.KeyValue { + return ExceptionStacktraceKey.String(val) +} + +// The attributes described in this section are rather generic. They may be +// used in any Log Record they apply to. +const ( + // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" + // semantic conventions. It represents a unique identifier for the Log + // Record. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' + // Note: If an id is provided, other log records with the same id will be + // considered duplicates and can be removed safely. This means, that two + // distinguishable log records MUST have different values. + // The id MAY be an [Universally Unique Lexicographically Sortable + // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers + // (e.g. UUID) may be used as needed. + LogRecordUIDKey = attribute.Key("log.record.uid") +) + +// LogRecordUID returns an attribute KeyValue conforming to the +// "log.record.uid" semantic conventions. It represents a unique identifier for +// the Log Record. +func LogRecordUID(val string) attribute.KeyValue { + return LogRecordUIDKey.String(val) +} + +// Span attributes used by AWS Lambda (in addition to general `faas` +// attributes). +const ( + // AWSLambdaInvokedARNKey is the attribute Key conforming to the + // "aws.lambda.invoked_arn" semantic conventions. It represents the full + // invoked ARN as provided on the `Context` passed to the function + // (`Lambda-Runtime-Invoked-Function-ARN` header on the + // `/runtime/invocation/next` applicable). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from `cloud.resource_id` if an alias is + // involved. + AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") +) + +// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the +// "aws.lambda.invoked_arn" semantic conventions. It represents the full +// invoked ARN as provided on the `Context` passed to the function +// (`Lambda-Runtime-Invoked-Function-ARN` header on the +// `/runtime/invocation/next` applicable). +func AWSLambdaInvokedARN(val string) attribute.KeyValue { + return AWSLambdaInvokedARNKey.String(val) +} + +// Attributes for CloudEvents. CloudEvents is a specification on how to define +// event data in a standard way. These attributes can be attached to spans when +// performing operations with CloudEvents, regardless of the protocol being +// used. +const ( + // CloudeventsEventIDKey is the attribute Key conforming to the + // "cloudevents.event_id" semantic conventions. It represents the + // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) + // uniquely identifies the event. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + + // CloudeventsEventSourceKey is the attribute Key conforming to the + // "cloudevents.event_source" semantic conventions. It represents the + // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) + // identifies the context in which an event happened. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'https://github.com/cloudevents', + // '/cloudevents/spec/pull/123', 'my-service' + CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + + // CloudeventsEventSpecVersionKey is the attribute Key conforming to the + // "cloudevents.event_spec_version" semantic conventions. It represents the + // [version of the CloudEvents + // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) + // which the event uses. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.0' + CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + + // CloudeventsEventTypeKey is the attribute Key conforming to the + // "cloudevents.event_type" semantic conventions. It represents the + // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) + // contains a value describing the type of event related to the originating + // occurrence. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'com.github.pull_request.opened', + // 'com.example.object.deleted.v2' + CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") + + // CloudeventsEventSubjectKey is the attribute Key conforming to the + // "cloudevents.event_subject" semantic conventions. It represents the + // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) + // of the event in the context of the event producer (identified by + // source). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'mynewfile.jpg' + CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") +) + +// CloudeventsEventID returns an attribute KeyValue conforming to the +// "cloudevents.event_id" semantic conventions. It represents the +// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) +// uniquely identifies the event. +func CloudeventsEventID(val string) attribute.KeyValue { + return CloudeventsEventIDKey.String(val) +} + +// CloudeventsEventSource returns an attribute KeyValue conforming to the +// "cloudevents.event_source" semantic conventions. It represents the +// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) +// identifies the context in which an event happened. +func CloudeventsEventSource(val string) attribute.KeyValue { + return CloudeventsEventSourceKey.String(val) +} + +// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to +// the "cloudevents.event_spec_version" semantic conventions. It represents the +// [version of the CloudEvents +// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) +// which the event uses. +func CloudeventsEventSpecVersion(val string) attribute.KeyValue { + return CloudeventsEventSpecVersionKey.String(val) +} + +// CloudeventsEventType returns an attribute KeyValue conforming to the +// "cloudevents.event_type" semantic conventions. It represents the +// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) +// contains a value describing the type of event related to the originating +// occurrence. +func CloudeventsEventType(val string) attribute.KeyValue { + return CloudeventsEventTypeKey.String(val) +} + +// CloudeventsEventSubject returns an attribute KeyValue conforming to the +// "cloudevents.event_subject" semantic conventions. It represents the +// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) +// of the event in the context of the event producer (identified by source). +func CloudeventsEventSubject(val string) attribute.KeyValue { + return CloudeventsEventSubjectKey.String(val) +} + +// Semantic conventions for the OpenTracing Shim +const ( + // OpentracingRefTypeKey is the attribute Key conforming to the + // "opentracing.ref_type" semantic conventions. It represents the + // parent-child Reference type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Note: The causal relationship between a child Span and a parent Span. + OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +var ( + // The parent Span depends on the child Span in some capacity + OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + // The parent Span does not depend in any way on the result of the child Span + OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") +) + +// The attributes used to perform database client calls. +const ( + // DBSystemKey is the attribute Key conforming to the "db.system" semantic + // conventions. It represents an identifier for the database management + // system (DBMS) product being used. See below for a list of well-known + // identifiers. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + DBSystemKey = attribute.Key("db.system") + + // DBConnectionStringKey is the attribute Key conforming to the + // "db.connection_string" semantic conventions. It represents the + // connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + DBConnectionStringKey = attribute.Key("db.connection_string") + + // DBUserKey is the attribute Key conforming to the "db.user" semantic + // conventions. It represents the username for accessing the database. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'readonly_user', 'reporting_user' + DBUserKey = attribute.Key("db.user") + + // DBJDBCDriverClassnameKey is the attribute Key conforming to the + // "db.jdbc.driver_classname" semantic conventions. It represents the + // fully-qualified class name of the [Java Database Connectivity + // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) + // driver used to connect. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") + + // DBNameKey is the attribute Key conforming to the "db.name" semantic + // conventions. It represents the this attribute is used to report the name + // of the database being accessed. For commands that switch the database, + // this should be set to the target database (even if the command fails). + // + // Type: string + // RequirementLevel: ConditionallyRequired (If applicable.) + // Stability: stable + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called + // "schema name". In case there are multiple layers that could be + // considered for database name (e.g. Oracle instance name and schema + // name), the database name to be used is the more specific layer (e.g. + // Oracle schema name). + DBNameKey = attribute.Key("db.name") + + // DBStatementKey is the attribute Key conforming to the "db.statement" + // semantic conventions. It represents the database statement being + // executed. + // + // Type: string + // RequirementLevel: Recommended (Should be collected by default only if + // there is sanitization that excludes sensitive information.) + // Stability: stable + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + DBStatementKey = attribute.Key("db.statement") + + // DBOperationKey is the attribute Key conforming to the "db.operation" + // semantic conventions. It represents the name of the operation being + // executed, e.g. the [MongoDB command + // name](https://docs.mongodb.com/manual/reference/command/#database-operations) + // such as `findAndModify`, or the SQL keyword. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If `db.statement` is not + // applicable.) + // Stability: stable + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to + // attempt any client-side parsing of `db.statement` just to get this + // property, but it should be set if the operation name is provided by the + // library being instrumented. If the SQL statement has an ambiguous + // operation, or performs more than one operation, this value may be + // omitted. + DBOperationKey = attribute.Key("db.operation") +) + +var ( + // Some other SQL database. Fallback only. See notes + DBSystemOtherSQL = DBSystemKey.String("other_sql") + // Microsoft SQL Server + DBSystemMSSQL = DBSystemKey.String("mssql") + // Microsoft SQL Server Compact + DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") + // MySQL + DBSystemMySQL = DBSystemKey.String("mysql") + // Oracle Database + DBSystemOracle = DBSystemKey.String("oracle") + // IBM DB2 + DBSystemDB2 = DBSystemKey.String("db2") + // PostgreSQL + DBSystemPostgreSQL = DBSystemKey.String("postgresql") + // Amazon Redshift + DBSystemRedshift = DBSystemKey.String("redshift") + // Apache Hive + DBSystemHive = DBSystemKey.String("hive") + // Cloudscape + DBSystemCloudscape = DBSystemKey.String("cloudscape") + // HyperSQL DataBase + DBSystemHSQLDB = DBSystemKey.String("hsqldb") + // Progress Database + DBSystemProgress = DBSystemKey.String("progress") + // SAP MaxDB + DBSystemMaxDB = DBSystemKey.String("maxdb") + // SAP HANA + DBSystemHanaDB = DBSystemKey.String("hanadb") + // Ingres + DBSystemIngres = DBSystemKey.String("ingres") + // FirstSQL + DBSystemFirstSQL = DBSystemKey.String("firstsql") + // EnterpriseDB + DBSystemEDB = DBSystemKey.String("edb") + // InterSystems Caché + DBSystemCache = DBSystemKey.String("cache") + // Adabas (Adaptable Database System) + DBSystemAdabas = DBSystemKey.String("adabas") + // Firebird + DBSystemFirebird = DBSystemKey.String("firebird") + // Apache Derby + DBSystemDerby = DBSystemKey.String("derby") + // FileMaker + DBSystemFilemaker = DBSystemKey.String("filemaker") + // Informix + DBSystemInformix = DBSystemKey.String("informix") + // InstantDB + DBSystemInstantDB = DBSystemKey.String("instantdb") + // InterBase + DBSystemInterbase = DBSystemKey.String("interbase") + // MariaDB + DBSystemMariaDB = DBSystemKey.String("mariadb") + // Netezza + DBSystemNetezza = DBSystemKey.String("netezza") + // Pervasive PSQL + DBSystemPervasive = DBSystemKey.String("pervasive") + // PointBase + DBSystemPointbase = DBSystemKey.String("pointbase") + // SQLite + DBSystemSqlite = DBSystemKey.String("sqlite") + // Sybase + DBSystemSybase = DBSystemKey.String("sybase") + // Teradata + DBSystemTeradata = DBSystemKey.String("teradata") + // Vertica + DBSystemVertica = DBSystemKey.String("vertica") + // H2 + DBSystemH2 = DBSystemKey.String("h2") + // ColdFusion IMQ + DBSystemColdfusion = DBSystemKey.String("coldfusion") + // Apache Cassandra + DBSystemCassandra = DBSystemKey.String("cassandra") + // Apache HBase + DBSystemHBase = DBSystemKey.String("hbase") + // MongoDB + DBSystemMongoDB = DBSystemKey.String("mongodb") + // Redis + DBSystemRedis = DBSystemKey.String("redis") + // Couchbase + DBSystemCouchbase = DBSystemKey.String("couchbase") + // CouchDB + DBSystemCouchDB = DBSystemKey.String("couchdb") + // Microsoft Azure Cosmos DB + DBSystemCosmosDB = DBSystemKey.String("cosmosdb") + // Amazon DynamoDB + DBSystemDynamoDB = DBSystemKey.String("dynamodb") + // Neo4j + DBSystemNeo4j = DBSystemKey.String("neo4j") + // Apache Geode + DBSystemGeode = DBSystemKey.String("geode") + // Elasticsearch + DBSystemElasticsearch = DBSystemKey.String("elasticsearch") + // Memcached + DBSystemMemcached = DBSystemKey.String("memcached") + // CockroachDB + DBSystemCockroachdb = DBSystemKey.String("cockroachdb") + // OpenSearch + DBSystemOpensearch = DBSystemKey.String("opensearch") + // ClickHouse + DBSystemClickhouse = DBSystemKey.String("clickhouse") + // Cloud Spanner + DBSystemSpanner = DBSystemKey.String("spanner") + // Trino + DBSystemTrino = DBSystemKey.String("trino") +) + +// DBConnectionString returns an attribute KeyValue conforming to the +// "db.connection_string" semantic conventions. It represents the connection +// string used to connect to the database. It is recommended to remove embedded +// credentials. +func DBConnectionString(val string) attribute.KeyValue { + return DBConnectionStringKey.String(val) +} + +// DBUser returns an attribute KeyValue conforming to the "db.user" semantic +// conventions. It represents the username for accessing the database. +func DBUser(val string) attribute.KeyValue { + return DBUserKey.String(val) +} + +// DBJDBCDriverClassname returns an attribute KeyValue conforming to the +// "db.jdbc.driver_classname" semantic conventions. It represents the +// fully-qualified class name of the [Java Database Connectivity +// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver +// used to connect. +func DBJDBCDriverClassname(val string) attribute.KeyValue { + return DBJDBCDriverClassnameKey.String(val) +} + +// DBName returns an attribute KeyValue conforming to the "db.name" semantic +// conventions. It represents the this attribute is used to report the name of +// the database being accessed. For commands that switch the database, this +// should be set to the target database (even if the command fails). +func DBName(val string) attribute.KeyValue { + return DBNameKey.String(val) +} + +// DBStatement returns an attribute KeyValue conforming to the +// "db.statement" semantic conventions. It represents the database statement +// being executed. +func DBStatement(val string) attribute.KeyValue { + return DBStatementKey.String(val) +} + +// DBOperation returns an attribute KeyValue conforming to the +// "db.operation" semantic conventions. It represents the name of the operation +// being executed, e.g. the [MongoDB command +// name](https://docs.mongodb.com/manual/reference/command/#database-operations) +// such as `findAndModify`, or the SQL keyword. +func DBOperation(val string) attribute.KeyValue { + return DBOperationKey.String(val) +} + +// Connection-level attributes for Microsoft SQL Server +const ( + // DBMSSQLInstanceNameKey is the attribute Key conforming to the + // "db.mssql.instance_name" semantic conventions. It represents the + // Microsoft SQL Server [instance + // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) + // connecting to. This name is used to determine the port of a named + // instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MSSQLSERVER' + // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no + // longer required (but still recommended if non-standard). + DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") +) + +// DBMSSQLInstanceName returns an attribute KeyValue conforming to the +// "db.mssql.instance_name" semantic conventions. It represents the Microsoft +// SQL Server [instance +// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) +// connecting to. This name is used to determine the port of a named instance. +func DBMSSQLInstanceName(val string) attribute.KeyValue { + return DBMSSQLInstanceNameKey.String(val) +} + +// Call-level attributes for Cassandra +const ( + // DBCassandraPageSizeKey is the attribute Key conforming to the + // "db.cassandra.page_size" semantic conventions. It represents the fetch + // size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 5000 + DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") + + // DBCassandraConsistencyLevelKey is the attribute Key conforming to the + // "db.cassandra.consistency_level" semantic conventions. It represents the + // consistency level of the query. Based on consistency values from + // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") + + // DBCassandraTableKey is the attribute Key conforming to the + // "db.cassandra.table" semantic conventions. It represents the name of the + // primary table that the operation is acting upon, including the keyspace + // name (if applicable). + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra + // rather than sql. It is not recommended to attempt any client-side + // parsing of `db.statement` just to get this property, but it should be + // set if it is provided by the library being instrumented. If the + // operation is acting upon an anonymous table, or more than one table, + // this value MUST NOT be set. + DBCassandraTableKey = attribute.Key("db.cassandra.table") + + // DBCassandraIdempotenceKey is the attribute Key conforming to the + // "db.cassandra.idempotence" semantic conventions. It represents the + // whether or not the query is idempotent. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") + + // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming + // to the "db.cassandra.speculative_execution_count" semantic conventions. + // It represents the number of times a query was speculatively executed. + // Not set or `0` if the query was not executed speculatively. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 0, 2 + DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") + + // DBCassandraCoordinatorIDKey is the attribute Key conforming to the + // "db.cassandra.coordinator.id" semantic conventions. It represents the ID + // of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") + + // DBCassandraCoordinatorDCKey is the attribute Key conforming to the + // "db.cassandra.coordinator.dc" semantic conventions. It represents the + // data center of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'us-west-2' + DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") +) + +var ( + // all + DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") + // each_quorum + DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") + // quorum + DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") + // local_quorum + DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") + // one + DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") + // two + DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") + // three + DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") + // local_one + DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") + // any + DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") + // serial + DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") + // local_serial + DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") +) + +// DBCassandraPageSize returns an attribute KeyValue conforming to the +// "db.cassandra.page_size" semantic conventions. It represents the fetch size +// used for paging, i.e. how many rows will be returned at once. +func DBCassandraPageSize(val int) attribute.KeyValue { + return DBCassandraPageSizeKey.Int(val) +} + +// DBCassandraTable returns an attribute KeyValue conforming to the +// "db.cassandra.table" semantic conventions. It represents the name of the +// primary table that the operation is acting upon, including the keyspace name +// (if applicable). +func DBCassandraTable(val string) attribute.KeyValue { + return DBCassandraTableKey.String(val) +} + +// DBCassandraIdempotence returns an attribute KeyValue conforming to the +// "db.cassandra.idempotence" semantic conventions. It represents the whether +// or not the query is idempotent. +func DBCassandraIdempotence(val bool) attribute.KeyValue { + return DBCassandraIdempotenceKey.Bool(val) +} + +// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue +// conforming to the "db.cassandra.speculative_execution_count" semantic +// conventions. It represents the number of times a query was speculatively +// executed. Not set or `0` if the query was not executed speculatively. +func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { + return DBCassandraSpeculativeExecutionCountKey.Int(val) +} + +// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of +// the coordinating node for a query. +func DBCassandraCoordinatorID(val string) attribute.KeyValue { + return DBCassandraCoordinatorIDKey.String(val) +} + +// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.dc" semantic conventions. It represents the data +// center of the coordinating node for a query. +func DBCassandraCoordinatorDC(val string) attribute.KeyValue { + return DBCassandraCoordinatorDCKey.String(val) +} + +// Call-level attributes for Redis +const ( + // DBRedisDBIndexKey is the attribute Key conforming to the + // "db.redis.database_index" semantic conventions. It represents the index + // of the database being accessed as used in the [`SELECT` + // command](https://redis.io/commands/select), provided as an integer. To + // be used instead of the generic `db.name` attribute. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If other than the default + // database (`0`).) + // Stability: stable + // Examples: 0, 1, 15 + DBRedisDBIndexKey = attribute.Key("db.redis.database_index") +) + +// DBRedisDBIndex returns an attribute KeyValue conforming to the +// "db.redis.database_index" semantic conventions. It represents the index of +// the database being accessed as used in the [`SELECT` +// command](https://redis.io/commands/select), provided as an integer. To be +// used instead of the generic `db.name` attribute. +func DBRedisDBIndex(val int) attribute.KeyValue { + return DBRedisDBIndexKey.Int(val) +} + +// Call-level attributes for MongoDB +const ( + // DBMongoDBCollectionKey is the attribute Key conforming to the + // "db.mongodb.collection" semantic conventions. It represents the + // collection being accessed within the database stated in `db.name`. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'customers', 'products' + DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") +) + +// DBMongoDBCollection returns an attribute KeyValue conforming to the +// "db.mongodb.collection" semantic conventions. It represents the collection +// being accessed within the database stated in `db.name`. +func DBMongoDBCollection(val string) attribute.KeyValue { + return DBMongoDBCollectionKey.String(val) +} + +// Call-level attributes for SQL databases +const ( + // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" + // semantic conventions. It represents the name of the primary table that + // the operation is acting upon, including the database name (if + // applicable). + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting + // upon an anonymous table, or more than one table, this value MUST NOT be + // set. + DBSQLTableKey = attribute.Key("db.sql.table") +) + +// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" +// semantic conventions. It represents the name of the primary table that the +// operation is acting upon, including the database name (if applicable). +func DBSQLTable(val string) attribute.KeyValue { + return DBSQLTableKey.String(val) +} + +// Call-level attributes for Cosmos DB. +const ( + // DBCosmosDBClientIDKey is the attribute Key conforming to the + // "db.cosmosdb.client_id" semantic conventions. It represents the unique + // Cosmos client instance id. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") + + // DBCosmosDBOperationTypeKey is the attribute Key conforming to the + // "db.cosmosdb.operation_type" semantic conventions. It represents the + // cosmosDB Operation Type. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (when performing one of the + // operations in this list) + // Stability: stable + DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") + + // DBCosmosDBConnectionModeKey is the attribute Key conforming to the + // "db.cosmosdb.connection_mode" semantic conventions. It represents the + // cosmos client connection mode. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as + // default)) + // Stability: stable + DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") + + // DBCosmosDBContainerKey is the attribute Key conforming to the + // "db.cosmosdb.container" semantic conventions. It represents the cosmos + // DB container name. + // + // Type: string + // RequirementLevel: ConditionallyRequired (if available) + // Stability: stable + // Examples: 'anystring' + DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") + + // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the + // "db.cosmosdb.request_content_length" semantic conventions. It represents + // the request payload size in bytes + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") + + // DBCosmosDBStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos + // DB status code. + // + // Type: int + // RequirementLevel: ConditionallyRequired (if response was received) + // Stability: stable + // Examples: 200, 201 + DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") + + // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.sub_status_code" semantic conventions. It represents the + // cosmos DB sub status code. + // + // Type: int + // RequirementLevel: ConditionallyRequired (when response was received and + // contained sub-code.) + // Stability: stable + // Examples: 1000, 1002 + DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") + + // DBCosmosDBRequestChargeKey is the attribute Key conforming to the + // "db.cosmosdb.request_charge" semantic conventions. It represents the rU + // consumed for that operation + // + // Type: double + // RequirementLevel: ConditionallyRequired (when available) + // Stability: stable + // Examples: 46.18, 1.0 + DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") +) + +var ( + // invalid + DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") + // create + DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") + // patch + DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") + // read + DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") + // read_feed + DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") + // delete + DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") + // replace + DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") + // execute + DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") + // query + DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") + // head + DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") + // head_feed + DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") + // upsert + DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") + // batch + DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") + // query_plan + DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") + // execute_javascript + DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") +) + +var ( + // Gateway (HTTP) connections mode + DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") + // Direct connection + DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") +) + +// DBCosmosDBClientID returns an attribute KeyValue conforming to the +// "db.cosmosdb.client_id" semantic conventions. It represents the unique +// Cosmos client instance id. +func DBCosmosDBClientID(val string) attribute.KeyValue { + return DBCosmosDBClientIDKey.String(val) +} + +// DBCosmosDBContainer returns an attribute KeyValue conforming to the +// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB +// container name. +func DBCosmosDBContainer(val string) attribute.KeyValue { + return DBCosmosDBContainerKey.String(val) +} + +// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming +// to the "db.cosmosdb.request_content_length" semantic conventions. It +// represents the request payload size in bytes +func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { + return DBCosmosDBRequestContentLengthKey.Int(val) +} + +// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB +// status code. +func DBCosmosDBStatusCode(val int) attribute.KeyValue { + return DBCosmosDBStatusCodeKey.Int(val) +} + +// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos +// DB sub status code. +func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { + return DBCosmosDBSubStatusCodeKey.Int(val) +} + +// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the +// "db.cosmosdb.request_charge" semantic conventions. It represents the rU +// consumed for that operation +func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { + return DBCosmosDBRequestChargeKey.Float64(val) +} + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's +// concepts. +const ( + // OTelStatusCodeKey is the attribute Key conforming to the + // "otel.status_code" semantic conventions. It represents the name of the + // code, either "OK" or "ERROR". MUST NOT be set if the status code is + // UNSET. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + OTelStatusCodeKey = attribute.Key("otel.status_code") + + // OTelStatusDescriptionKey is the attribute Key conforming to the + // "otel.status_description" semantic conventions. It represents the + // description of the Status if it has a value, otherwise not set. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'resource not found' + OTelStatusDescriptionKey = attribute.Key("otel.status_description") +) + +var ( + // The operation has been validated by an Application developer or Operator to have completed successfully + OTelStatusCodeOk = OTelStatusCodeKey.String("OK") + // The operation contains an error + OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") +) + +// OTelStatusDescription returns an attribute KeyValue conforming to the +// "otel.status_description" semantic conventions. It represents the +// description of the Status if it has a value, otherwise not set. +func OTelStatusDescription(val string) attribute.KeyValue { + return OTelStatusDescriptionKey.String(val) +} + +// This semantic convention describes an instance of a function that runs +// without provisioning or managing of servers (also known as serverless +// functions or Function as a Service (FaaS)) with spans. +const ( + // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" + // semantic conventions. It represents the type of the trigger which caused + // this function invocation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Note: For the server/consumer span on the incoming side, + // `faas.trigger` MUST be set. + // + // Clients invoking FaaS instances usually cannot set `faas.trigger`, + // since they would typically need to look in the payload to determine + // the event type. If clients set it, it should be the same as the + // trigger that corresponding incoming would have (i.e., this has + // nothing to do with the underlying transport used to make the API + // call to invoke the lambda, which is often HTTP). + FaaSTriggerKey = attribute.Key("faas.trigger") + + // FaaSInvocationIDKey is the attribute Key conforming to the + // "faas.invocation_id" semantic conventions. It represents the invocation + // ID of the current function invocation. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + FaaSInvocationIDKey = attribute.Key("faas.invocation_id") +) + +var ( + // A response to some data source operation such as a database or filesystem read/write + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// FaaSInvocationID returns an attribute KeyValue conforming to the +// "faas.invocation_id" semantic conventions. It represents the invocation ID +// of the current function invocation. +func FaaSInvocationID(val string) attribute.KeyValue { + return FaaSInvocationIDKey.String(val) +} + +// Semantic Convention for FaaS triggered as a response to some data source +// operation such as a database or filesystem read/write. +const ( + // FaaSDocumentCollectionKey is the attribute Key conforming to the + // "faas.document.collection" semantic conventions. It represents the name + // of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in + // Cosmos DB to the database name. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myBucketName', 'myDBName' + FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") + + // FaaSDocumentOperationKey is the attribute Key conforming to the + // "faas.document.operation" semantic conventions. It represents the + // describes the type of the operation that was performed on the data. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + FaaSDocumentOperationKey = attribute.Key("faas.document.operation") + + // FaaSDocumentTimeKey is the attribute Key conforming to the + // "faas.document.time" semantic conventions. It represents a string + // containing the time when the data was accessed in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSDocumentTimeKey = attribute.Key("faas.document.time") + + // FaaSDocumentNameKey is the attribute Key conforming to the + // "faas.document.name" semantic conventions. It represents the document + // name/table subjected to the operation. For example, in Cloud Storage or + // S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'myFile.txt', 'myTableName' + FaaSDocumentNameKey = attribute.Key("faas.document.name") +) + +var ( + // When a new object is created + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +// FaaSDocumentCollection returns an attribute KeyValue conforming to the +// "faas.document.collection" semantic conventions. It represents the name of +// the source on which the triggering operation was performed. For example, in +// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the +// database name. +func FaaSDocumentCollection(val string) attribute.KeyValue { + return FaaSDocumentCollectionKey.String(val) +} + +// FaaSDocumentTime returns an attribute KeyValue conforming to the +// "faas.document.time" semantic conventions. It represents a string containing +// the time when the data was accessed in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSDocumentTime(val string) attribute.KeyValue { + return FaaSDocumentTimeKey.String(val) +} + +// FaaSDocumentName returns an attribute KeyValue conforming to the +// "faas.document.name" semantic conventions. It represents the document +// name/table subjected to the operation. For example, in Cloud Storage or S3 +// is the name of the file, and in Cosmos DB the table name. +func FaaSDocumentName(val string) attribute.KeyValue { + return FaaSDocumentNameKey.String(val) +} + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic + // conventions. It represents a string containing the function invocation + // time in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSTimeKey = attribute.Key("faas.time") + + // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic + // conventions. It represents a string containing the schedule period as + // [Cron + // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '0/5 * * * ? *' + FaaSCronKey = attribute.Key("faas.cron") +) + +// FaaSTime returns an attribute KeyValue conforming to the "faas.time" +// semantic conventions. It represents a string containing the function +// invocation time in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSTime(val string) attribute.KeyValue { + return FaaSTimeKey.String(val) +} + +// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" +// semantic conventions. It represents a string containing the schedule period +// as [Cron +// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +func FaaSCron(val string) attribute.KeyValue { + return FaaSCronKey.String(val) +} + +// Contains additional attributes for incoming FaaS spans. +const ( + // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" + // semantic conventions. It represents a boolean that is true if the + // serverless function is executed for the first time (aka cold-start). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + FaaSColdstartKey = attribute.Key("faas.coldstart") +) + +// FaaSColdstart returns an attribute KeyValue conforming to the +// "faas.coldstart" semantic conventions. It represents a boolean that is true +// if the serverless function is executed for the first time (aka cold-start). +func FaaSColdstart(val bool) attribute.KeyValue { + return FaaSColdstartKey.Bool(val) +} + +// Contains additional attributes for outgoing FaaS spans. +const ( + // FaaSInvokedNameKey is the attribute Key conforming to the + // "faas.invoked_name" semantic conventions. It represents the name of the + // invoked function. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'my-function' + // Note: SHOULD be equal to the `faas.name` resource attribute of the + // invoked function. + FaaSInvokedNameKey = attribute.Key("faas.invoked_name") + + // FaaSInvokedProviderKey is the attribute Key conforming to the + // "faas.invoked_provider" semantic conventions. It represents the cloud + // provider of the invoked function. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Note: SHOULD be equal to the `cloud.provider` resource attribute of the + // invoked function. + FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") + + // FaaSInvokedRegionKey is the attribute Key conforming to the + // "faas.invoked_region" semantic conventions. It represents the cloud + // region of the invoked function. + // + // Type: string + // RequirementLevel: ConditionallyRequired (For some cloud providers, like + // AWS or GCP, the region in which a function is hosted is essential to + // uniquely identify the function and also part of its endpoint. Since it's + // part of the endpoint being called, the region is always known to + // clients. In these cases, `faas.invoked_region` MUST be set accordingly. + // If the region is unknown to the client or not required for identifying + // the invoked function, setting `faas.invoked_region` is optional.) + // Stability: stable + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the `cloud.region` resource attribute of the + // invoked function. + FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") +) + +var ( + // Alibaba Cloud + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +// FaaSInvokedName returns an attribute KeyValue conforming to the +// "faas.invoked_name" semantic conventions. It represents the name of the +// invoked function. +func FaaSInvokedName(val string) attribute.KeyValue { + return FaaSInvokedNameKey.String(val) +} + +// FaaSInvokedRegion returns an attribute KeyValue conforming to the +// "faas.invoked_region" semantic conventions. It represents the cloud region +// of the invoked function. +func FaaSInvokedRegion(val string) attribute.KeyValue { + return FaaSInvokedRegionKey.String(val) +} + +// Operations that access some remote service. +const ( + // PeerServiceKey is the attribute Key conforming to the "peer.service" + // semantic conventions. It represents the + // [`service.name`](../../resource/semantic_conventions/README.md#service) + // of the remote service. SHOULD be equal to the actual `service.name` + // resource attribute of the remote service if any. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'AuthTokenCache' + PeerServiceKey = attribute.Key("peer.service") +) + +// PeerService returns an attribute KeyValue conforming to the +// "peer.service" semantic conventions. It represents the +// [`service.name`](../../resource/semantic_conventions/README.md#service) of +// the remote service. SHOULD be equal to the actual `service.name` resource +// attribute of the remote service if any. +func PeerService(val string) attribute.KeyValue { + return PeerServiceKey.String(val) +} + +// These attributes may be used for any operation with an authenticated and/or +// authorized enduser. +const ( + // EnduserIDKey is the attribute Key conforming to the "enduser.id" + // semantic conventions. It represents the username or client_id extracted + // from the access token or + // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header + // in the inbound request from outside the system. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'username' + EnduserIDKey = attribute.Key("enduser.id") + + // EnduserRoleKey is the attribute Key conforming to the "enduser.role" + // semantic conventions. It represents the actual/assumed role the client + // is making the request under extracted from token or application security + // context. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'admin' + EnduserRoleKey = attribute.Key("enduser.role") + + // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" + // semantic conventions. It represents the scopes or granted authorities + // the client currently possesses extracted from token or application + // security context. The value would come from the scope associated with an + // [OAuth 2.0 Access + // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute + // value in a [SAML 2.0 + // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'read:message, write:files' + EnduserScopeKey = attribute.Key("enduser.scope") +) + +// EnduserID returns an attribute KeyValue conforming to the "enduser.id" +// semantic conventions. It represents the username or client_id extracted from +// the access token or +// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in +// the inbound request from outside the system. +func EnduserID(val string) attribute.KeyValue { + return EnduserIDKey.String(val) +} + +// EnduserRole returns an attribute KeyValue conforming to the +// "enduser.role" semantic conventions. It represents the actual/assumed role +// the client is making the request under extracted from token or application +// security context. +func EnduserRole(val string) attribute.KeyValue { + return EnduserRoleKey.String(val) +} + +// EnduserScope returns an attribute KeyValue conforming to the +// "enduser.scope" semantic conventions. It represents the scopes or granted +// authorities the client currently possesses extracted from token or +// application security context. The value would come from the scope associated +// with an [OAuth 2.0 Access +// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute +// value in a [SAML 2.0 +// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). +func EnduserScope(val string) attribute.KeyValue { + return EnduserScopeKey.String(val) +} + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic + // conventions. It represents the current "managed" thread ID (as opposed + // to OS thread ID). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 42 + ThreadIDKey = attribute.Key("thread.id") + + // ThreadNameKey is the attribute Key conforming to the "thread.name" + // semantic conventions. It represents the current thread name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'main' + ThreadNameKey = attribute.Key("thread.name") +) + +// ThreadID returns an attribute KeyValue conforming to the "thread.id" +// semantic conventions. It represents the current "managed" thread ID (as +// opposed to OS thread ID). +func ThreadID(val int) attribute.KeyValue { + return ThreadIDKey.Int(val) +} + +// ThreadName returns an attribute KeyValue conforming to the "thread.name" +// semantic conventions. It represents the current thread name. +func ThreadName(val string) attribute.KeyValue { + return ThreadNameKey.String(val) +} + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // CodeFunctionKey is the attribute Key conforming to the "code.function" + // semantic conventions. It represents the method or function name, or + // equivalent (usually rightmost part of the code unit's name). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'serveRequest' + CodeFunctionKey = attribute.Key("code.function") + + // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" + // semantic conventions. It represents the "namespace" within which + // `code.function` is defined. Usually the qualified class or module name, + // such that `code.namespace` + some separator + `code.function` form a + // unique identifier for the code unit. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'com.example.MyHTTPService' + CodeNamespaceKey = attribute.Key("code.namespace") + + // CodeFilepathKey is the attribute Key conforming to the "code.filepath" + // semantic conventions. It represents the source code file name that + // identifies the code unit as uniquely as possible (preferably an absolute + // file path). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + CodeFilepathKey = attribute.Key("code.filepath") + + // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" + // semantic conventions. It represents the line number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 42 + CodeLineNumberKey = attribute.Key("code.lineno") + + // CodeColumnKey is the attribute Key conforming to the "code.column" + // semantic conventions. It represents the column number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 16 + CodeColumnKey = attribute.Key("code.column") +) + +// CodeFunction returns an attribute KeyValue conforming to the +// "code.function" semantic conventions. It represents the method or function +// name, or equivalent (usually rightmost part of the code unit's name). +func CodeFunction(val string) attribute.KeyValue { + return CodeFunctionKey.String(val) +} + +// CodeNamespace returns an attribute KeyValue conforming to the +// "code.namespace" semantic conventions. It represents the "namespace" within +// which `code.function` is defined. Usually the qualified class or module +// name, such that `code.namespace` + some separator + `code.function` form a +// unique identifier for the code unit. +func CodeNamespace(val string) attribute.KeyValue { + return CodeNamespaceKey.String(val) +} + +// CodeFilepath returns an attribute KeyValue conforming to the +// "code.filepath" semantic conventions. It represents the source code file +// name that identifies the code unit as uniquely as possible (preferably an +// absolute file path). +func CodeFilepath(val string) attribute.KeyValue { + return CodeFilepathKey.String(val) +} + +// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" +// semantic conventions. It represents the line number in `code.filepath` best +// representing the operation. It SHOULD point within the code unit named in +// `code.function`. +func CodeLineNumber(val int) attribute.KeyValue { + return CodeLineNumberKey.Int(val) +} + +// CodeColumn returns an attribute KeyValue conforming to the "code.column" +// semantic conventions. It represents the column number in `code.filepath` +// best representing the operation. It SHOULD point within the code unit named +// in `code.function`. +func CodeColumn(val int) attribute.KeyValue { + return CodeColumnKey.Int(val) +} + +// Semantic Convention for HTTP Client +const ( + // HTTPURLKey is the attribute Key conforming to the "http.url" semantic + // conventions. It represents the full HTTP request URL in the form + // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is + // not transmitted over HTTP, but if it is known, it should be included + // nevertheless. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' + // Note: `http.url` MUST NOT contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case the + // attribute's value should be `https://www.example.com/`. + HTTPURLKey = attribute.Key("http.url") + + // HTTPResendCountKey is the attribute Key conforming to the + // "http.resend_count" semantic conventions. It represents the ordinal + // number of request resending attempt (for any reason, including + // redirects). + // + // Type: int + // RequirementLevel: Recommended (if and only if request was retried.) + // Stability: stable + // Examples: 3 + // Note: The resend count SHOULD be updated each time an HTTP request gets + // resent by the client, regardless of what was the cause of the resending + // (e.g. redirection, authorization failure, 503 Server Unavailable, + // network issues, or any other). + HTTPResendCountKey = attribute.Key("http.resend_count") +) + +// HTTPURL returns an attribute KeyValue conforming to the "http.url" +// semantic conventions. It represents the full HTTP request URL in the form +// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not +// transmitted over HTTP, but if it is known, it should be included +// nevertheless. +func HTTPURL(val string) attribute.KeyValue { + return HTTPURLKey.String(val) +} + +// HTTPResendCount returns an attribute KeyValue conforming to the +// "http.resend_count" semantic conventions. It represents the ordinal number +// of request resending attempt (for any reason, including redirects). +func HTTPResendCount(val int) attribute.KeyValue { + return HTTPResendCountKey.Int(val) +} + +// Semantic Convention for HTTP Server +const ( + // HTTPTargetKey is the attribute Key conforming to the "http.target" + // semantic conventions. It represents the full request target as passed in + // a HTTP request line or equivalent. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: '/users/12314/?q=ddds' + HTTPTargetKey = attribute.Key("http.target") + + // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip" + // semantic conventions. It represents the IP address of the original + // client behind all proxies, if known (e.g. from + // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '83.164.160.102' + // Note: This is not necessarily the same as `net.sock.peer.addr`, which + // would + // identify the network-level peer, which may be a proxy. + // + // This attribute should be set when a source of information different + // from the one used for `net.sock.peer.addr`, is available even if that + // other + // source just confirms the same value as `net.sock.peer.addr`. + // Rationale: For `net.sock.peer.addr`, one typically does not know if it + // comes from a proxy, reverse proxy, or the actual client. Setting + // `http.client_ip` when it's the same as `net.sock.peer.addr` means that + // one is at least somewhat confident that the address is not that of + // the closest proxy. + HTTPClientIPKey = attribute.Key("http.client_ip") +) + +// HTTPTarget returns an attribute KeyValue conforming to the "http.target" +// semantic conventions. It represents the full request target as passed in a +// HTTP request line or equivalent. +func HTTPTarget(val string) attribute.KeyValue { + return HTTPTargetKey.String(val) +} + +// HTTPClientIP returns an attribute KeyValue conforming to the +// "http.client_ip" semantic conventions. It represents the IP address of the +// original client behind all proxies, if known (e.g. from +// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). +func HTTPClientIP(val string) attribute.KeyValue { + return HTTPClientIPKey.String(val) +} + +// The `aws` conventions apply to operations using the AWS SDK. They map +// request or response parameters in AWS SDK API calls to attributes on a Span. +// The conventions have been collected over time based on feedback from AWS +// users of tracing and will continue to evolve as new interesting conventions +// are found. +// Some descriptions are also provided for populating general OpenTelemetry +// semantic conventions based on these APIs. +const ( + // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" + // semantic conventions. It represents the AWS request ID as returned in + // the response headers `x-amz-request-id` or `x-amz-requestid`. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AWSRequestIDKey = attribute.Key("aws.request_id") +) + +// AWSRequestID returns an attribute KeyValue conforming to the +// "aws.request_id" semantic conventions. It represents the AWS request ID as +// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +func AWSRequestID(val string) attribute.KeyValue { + return AWSRequestIDKey.String(val) +} + +// Attributes that exist for multiple DynamoDB request types. +const ( + // AWSDynamoDBTableNamesKey is the attribute Key conforming to the + // "aws.dynamodb.table_names" semantic conventions. It represents the keys + // in the `RequestItems` object field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Users', 'Cats' + AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") + + // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the + // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the + // JSON-serialized value of each item in the `ConsumedCapacity` response + // field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { + // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number }, "TableName": "string", + // "WriteCapacityUnits": number }' + AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") + + // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to + // the "aws.dynamodb.item_collection_metrics" semantic conventions. It + // represents the JSON-serialized value of the `ItemCollectionMetrics` + // response field. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": + // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { + // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], + // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, + // "SizeEstimateRangeGB": [ number ] } ] }' + AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") + + // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to + // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It + // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` + // request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") + + // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming + // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. + // It represents the value of the + // `ProvisionedThroughput.WriteCapacityUnits` request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") + + // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the + // "aws.dynamodb.consistent_read" semantic conventions. It represents the + // value of the `ConsistentRead` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") + + // AWSDynamoDBProjectionKey is the attribute Key conforming to the + // "aws.dynamodb.projection" semantic conventions. It represents the value + // of the `ProjectionExpression` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, + // RelatedItems, ProductReviews' + AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") + + // AWSDynamoDBLimitKey is the attribute Key conforming to the + // "aws.dynamodb.limit" semantic conventions. It represents the value of + // the `Limit` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 10 + AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") + + // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the + // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the + // value of the `AttributesToGet` request parameter. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'lives', 'id' + AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") + + // AWSDynamoDBIndexNameKey is the attribute Key conforming to the + // "aws.dynamodb.index_name" semantic conventions. It represents the value + // of the `IndexName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'name_to_group' + AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") + + // AWSDynamoDBSelectKey is the attribute Key conforming to the + // "aws.dynamodb.select" semantic conventions. It represents the value of + // the `Select` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") +) + +// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_names" semantic conventions. It represents the keys in +// the `RequestItems` object field. +func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { + return AWSDynamoDBTableNamesKey.StringSlice(val) +} + +// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to +// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the +// JSON-serialized value of each item in the `ConsumedCapacity` response field. +func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { + return AWSDynamoDBConsumedCapacityKey.StringSlice(val) +} + +// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming +// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It +// represents the JSON-serialized value of the `ItemCollectionMetrics` response +// field. +func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { + return AWSDynamoDBItemCollectionMetricsKey.String(val) +} + +// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.ReadCapacityUnits` request parameter. +func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) +} + +// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.WriteCapacityUnits` request parameter. +func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) +} + +// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the +// "aws.dynamodb.consistent_read" semantic conventions. It represents the value +// of the `ConsistentRead` request parameter. +func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { + return AWSDynamoDBConsistentReadKey.Bool(val) +} + +// AWSDynamoDBProjection returns an attribute KeyValue conforming to the +// "aws.dynamodb.projection" semantic conventions. It represents the value of +// the `ProjectionExpression` request parameter. +func AWSDynamoDBProjection(val string) attribute.KeyValue { + return AWSDynamoDBProjectionKey.String(val) +} + +// AWSDynamoDBLimit returns an attribute KeyValue conforming to the +// "aws.dynamodb.limit" semantic conventions. It represents the value of the +// `Limit` request parameter. +func AWSDynamoDBLimit(val int) attribute.KeyValue { + return AWSDynamoDBLimitKey.Int(val) +} + +// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to +// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the +// value of the `AttributesToGet` request parameter. +func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributesToGetKey.StringSlice(val) +} + +// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the +// "aws.dynamodb.index_name" semantic conventions. It represents the value of +// the `IndexName` request parameter. +func AWSDynamoDBIndexName(val string) attribute.KeyValue { + return AWSDynamoDBIndexNameKey.String(val) +} + +// AWSDynamoDBSelect returns an attribute KeyValue conforming to the +// "aws.dynamodb.select" semantic conventions. It represents the value of the +// `Select` request parameter. +func AWSDynamoDBSelect(val string) attribute.KeyValue { + return AWSDynamoDBSelectKey.String(val) +} + +// DynamoDB.CreateTable +const ( + // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `GlobalSecondaryIndexes` request field + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": + // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ + // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") + + // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `LocalSecondaryIndexes` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "IndexARN": "string", "IndexName": "string", + // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' + AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") +) + +// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_indexes" semantic +// conventions. It represents the JSON-serialized value of each item of the +// `GlobalSecondaryIndexes` request field +func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) +} + +// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming +// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It +// represents the JSON-serialized value of each item of the +// `LocalSecondaryIndexes` request field. +func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) +} + +// DynamoDB.ListTables +const ( + // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the + // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents + // the value of the `ExclusiveStartTableName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Users', 'CatsTable' + AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") + + // AWSDynamoDBTableCountKey is the attribute Key conforming to the + // "aws.dynamodb.table_count" semantic conventions. It represents the the + // number of items in the `TableNames` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 20 + AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") +) + +// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming +// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It +// represents the value of the `ExclusiveStartTableName` request parameter. +func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { + return AWSDynamoDBExclusiveStartTableKey.String(val) +} + +// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_count" semantic conventions. It represents the the +// number of items in the `TableNames` response parameter. +func AWSDynamoDBTableCount(val int) attribute.KeyValue { + return AWSDynamoDBTableCountKey.Int(val) +} + +// DynamoDB.Query +const ( + // AWSDynamoDBScanForwardKey is the attribute Key conforming to the + // "aws.dynamodb.scan_forward" semantic conventions. It represents the + // value of the `ScanIndexForward` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") +) + +// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the +// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of +// the `ScanIndexForward` request parameter. +func AWSDynamoDBScanForward(val bool) attribute.KeyValue { + return AWSDynamoDBScanForwardKey.Bool(val) +} + +// DynamoDB.Scan +const ( + // AWSDynamoDBSegmentKey is the attribute Key conforming to the + // "aws.dynamodb.segment" semantic conventions. It represents the value of + // the `Segment` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 10 + AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") + + // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the + // "aws.dynamodb.total_segments" semantic conventions. It represents the + // value of the `TotalSegments` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") + + // AWSDynamoDBCountKey is the attribute Key conforming to the + // "aws.dynamodb.count" semantic conventions. It represents the value of + // the `Count` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 10 + AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") + + // AWSDynamoDBScannedCountKey is the attribute Key conforming to the + // "aws.dynamodb.scanned_count" semantic conventions. It represents the + // value of the `ScannedCount` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 50 + AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") +) + +// AWSDynamoDBSegment returns an attribute KeyValue conforming to the +// "aws.dynamodb.segment" semantic conventions. It represents the value of the +// `Segment` request parameter. +func AWSDynamoDBSegment(val int) attribute.KeyValue { + return AWSDynamoDBSegmentKey.Int(val) +} + +// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the +// "aws.dynamodb.total_segments" semantic conventions. It represents the value +// of the `TotalSegments` request parameter. +func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { + return AWSDynamoDBTotalSegmentsKey.Int(val) +} + +// AWSDynamoDBCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.count" semantic conventions. It represents the value of the +// `Count` response parameter. +func AWSDynamoDBCount(val int) attribute.KeyValue { + return AWSDynamoDBCountKey.Int(val) +} + +// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.scanned_count" semantic conventions. It represents the value +// of the `ScannedCount` response parameter. +func AWSDynamoDBScannedCount(val int) attribute.KeyValue { + return AWSDynamoDBScannedCountKey.Int(val) +} + +// DynamoDB.UpdateTable +const ( + // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to + // the "aws.dynamodb.attribute_definitions" semantic conventions. It + // represents the JSON-serialized value of each item in the + // `AttributeDefinitions` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") + + // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key + // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic + // conventions. It represents the JSON-serialized value of each item in the + // the `GlobalSecondaryIndexUpdates` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") +) + +// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming +// to the "aws.dynamodb.attribute_definitions" semantic conventions. It +// represents the JSON-serialized value of each item in the +// `AttributeDefinitions` request field. +func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) +} + +// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic +// conventions. It represents the JSON-serialized value of each item in the the +// `GlobalSecondaryIndexUpdates` request field. +func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) +} + +// Attributes that exist for S3 request types. +const ( + // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" + // semantic conventions. It represents the S3 bucket name the request + // refers to. Corresponds to the `--bucket` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'some-bucket-name' + // Note: The `bucket` attribute is applicable to all S3 operations that + // reference a bucket, i.e. that require the bucket name as a mandatory + // parameter. + // This applies to almost all S3 operations except `list-buckets`. + AWSS3BucketKey = attribute.Key("aws.s3.bucket") + + // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic + // conventions. It represents the S3 object key the request refers to. + // Corresponds to the `--key` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'someFile.yml' + // Note: The `key` attribute is applicable to all object-related S3 + // operations, i.e. that require the object key as a mandatory parameter. + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // - + // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) + // - + // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) + // - + // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) + // - + // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) + // - + // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3KeyKey = attribute.Key("aws.s3.key") + + // AWSS3CopySourceKey is the attribute Key conforming to the + // "aws.s3.copy_source" semantic conventions. It represents the source + // object (in the form `bucket`/`key`) for the copy operation. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'someFile.yml' + // Note: The `copy_source` attribute applies to S3 copy operations and + // corresponds to the `--copy-source` parameter + // of the [copy-object operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") + + // AWSS3UploadIDKey is the attribute Key conforming to the + // "aws.s3.upload_id" semantic conventions. It represents the upload ID + // that identifies the multipart upload. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The `upload_id` attribute applies to S3 multipart-upload + // operations and corresponds to the `--upload-id` parameter + // of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // multipart operations. + // This applies in particular to the following operations: + // + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") + + // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" + // semantic conventions. It represents the delete request container that + // specifies the objects to be deleted. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' + // Note: The `delete` attribute is only applicable to the + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // operation. + // The `delete` attribute corresponds to the `--delete` parameter of the + // [delete-objects operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). + AWSS3DeleteKey = attribute.Key("aws.s3.delete") + + // AWSS3PartNumberKey is the attribute Key conforming to the + // "aws.s3.part_number" semantic conventions. It represents the part number + // of the part being uploaded in a multipart-upload operation. This is a + // positive integer between 1 and 10,000. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3456 + // Note: The `part_number` attribute is only applicable to the + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // and + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + // operations. + // The `part_number` attribute corresponds to the `--part-number` parameter + // of the + // [upload-part operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). + AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") +) + +// AWSS3Bucket returns an attribute KeyValue conforming to the +// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the +// request refers to. Corresponds to the `--bucket` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Bucket(val string) attribute.KeyValue { + return AWSS3BucketKey.String(val) +} + +// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" +// semantic conventions. It represents the S3 object key the request refers to. +// Corresponds to the `--key` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Key(val string) attribute.KeyValue { + return AWSS3KeyKey.String(val) +} + +// AWSS3CopySource returns an attribute KeyValue conforming to the +// "aws.s3.copy_source" semantic conventions. It represents the source object +// (in the form `bucket`/`key`) for the copy operation. +func AWSS3CopySource(val string) attribute.KeyValue { + return AWSS3CopySourceKey.String(val) +} + +// AWSS3UploadID returns an attribute KeyValue conforming to the +// "aws.s3.upload_id" semantic conventions. It represents the upload ID that +// identifies the multipart upload. +func AWSS3UploadID(val string) attribute.KeyValue { + return AWSS3UploadIDKey.String(val) +} + +// AWSS3Delete returns an attribute KeyValue conforming to the +// "aws.s3.delete" semantic conventions. It represents the delete request +// container that specifies the objects to be deleted. +func AWSS3Delete(val string) attribute.KeyValue { + return AWSS3DeleteKey.String(val) +} + +// AWSS3PartNumber returns an attribute KeyValue conforming to the +// "aws.s3.part_number" semantic conventions. It represents the part number of +// the part being uploaded in a multipart-upload operation. This is a positive +// integer between 1 and 10,000. +func AWSS3PartNumber(val int) attribute.KeyValue { + return AWSS3PartNumberKey.Int(val) +} + +// Semantic conventions to apply when instrumenting the GraphQL implementation. +// They map GraphQL operations to attributes on a Span. +const ( + // GraphqlOperationNameKey is the attribute Key conforming to the + // "graphql.operation.name" semantic conventions. It represents the name of + // the operation being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'findBookByID' + GraphqlOperationNameKey = attribute.Key("graphql.operation.name") + + // GraphqlOperationTypeKey is the attribute Key conforming to the + // "graphql.operation.type" semantic conventions. It represents the type of + // the operation being executed. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'query', 'mutation', 'subscription' + GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") + + // GraphqlDocumentKey is the attribute Key conforming to the + // "graphql.document" semantic conventions. It represents the GraphQL + // document being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + GraphqlDocumentKey = attribute.Key("graphql.document") +) + +var ( + // GraphQL query + GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") + // GraphQL mutation + GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") + // GraphQL subscription + GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") +) + +// GraphqlOperationName returns an attribute KeyValue conforming to the +// "graphql.operation.name" semantic conventions. It represents the name of the +// operation being executed. +func GraphqlOperationName(val string) attribute.KeyValue { + return GraphqlOperationNameKey.String(val) +} + +// GraphqlDocument returns an attribute KeyValue conforming to the +// "graphql.document" semantic conventions. It represents the GraphQL document +// being executed. +func GraphqlDocument(val string) attribute.KeyValue { + return GraphqlDocumentKey.String(val) +} + +// General attributes used in messaging systems. +const ( + // MessagingSystemKey is the attribute Key conforming to the + // "messaging.system" semantic conventions. It represents a string + // identifying the messaging system. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' + MessagingSystemKey = attribute.Key("messaging.system") + + // MessagingOperationKey is the attribute Key conforming to the + // "messaging.operation" semantic conventions. It represents a string + // identifying the kind of messaging operation as defined in the [Operation + // names](#operation-names) section above. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Note: If a custom value is used, it MUST be of low cardinality. + MessagingOperationKey = attribute.Key("messaging.operation") + + // MessagingBatchMessageCountKey is the attribute Key conforming to the + // "messaging.batch.message_count" semantic conventions. It represents the + // number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If the span describes an + // operation on a batch of messages.) + // Stability: stable + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on + // spans that operate with a single message. When a messaging client + // library supports both batch and single-message API for the same + // operation, instrumentations SHOULD use `messaging.batch.message_count` + // for batching APIs and SHOULD NOT use it for single-message APIs. + MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") +) + +var ( + // publish + MessagingOperationPublish = MessagingOperationKey.String("publish") + // receive + MessagingOperationReceive = MessagingOperationKey.String("receive") + // process + MessagingOperationProcess = MessagingOperationKey.String("process") +) + +// MessagingSystem returns an attribute KeyValue conforming to the +// "messaging.system" semantic conventions. It represents a string identifying +// the messaging system. +func MessagingSystem(val string) attribute.KeyValue { + return MessagingSystemKey.String(val) +} + +// MessagingBatchMessageCount returns an attribute KeyValue conforming to +// the "messaging.batch.message_count" semantic conventions. It represents the +// number of messages sent, received, or processed in the scope of the batching +// operation. +func MessagingBatchMessageCount(val int) attribute.KeyValue { + return MessagingBatchMessageCountKey.Int(val) +} + +// Semantic convention for a consumer of messages received from a messaging +// system +const ( + // MessagingConsumerIDKey is the attribute Key conforming to the + // "messaging.consumer.id" semantic conventions. It represents the + // identifier for the consumer receiving a message. For Kafka, set it to + // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if + // both are present, or only `messaging.kafka.consumer.group`. For brokers, + // such as RabbitMQ and Artemis, set it to the `client_id` of the client + // consuming the message. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'mygroup - client-6' + MessagingConsumerIDKey = attribute.Key("messaging.consumer.id") +) + +// MessagingConsumerID returns an attribute KeyValue conforming to the +// "messaging.consumer.id" semantic conventions. It represents the identifier +// for the consumer receiving a message. For Kafka, set it to +// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both +// are present, or only `messaging.kafka.consumer.group`. For brokers, such as +// RabbitMQ and Artemis, set it to the `client_id` of the client consuming the +// message. +func MessagingConsumerID(val string) attribute.KeyValue { + return MessagingConsumerIDKey.String(val) +} + +// Semantic conventions for remote procedure calls. +const ( + // RPCSystemKey is the attribute Key conforming to the "rpc.system" + // semantic conventions. It represents a string identifying the remoting + // system. See below for a list of well-known identifiers. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + RPCSystemKey = attribute.Key("rpc.system") + + // RPCServiceKey is the attribute Key conforming to the "rpc.service" + // semantic conventions. It represents the full (logical) name of the + // service being called, including its package name, if applicable. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing + // class. The `code.namespace` attribute may be used to store the latter + // (despite the attribute name, it may include a class name; e.g., class + // with method actually executing the call on the server side, RPC client + // stub class on the client side). + RPCServiceKey = attribute.Key("rpc.service") + + // RPCMethodKey is the attribute Key conforming to the "rpc.method" + // semantic conventions. It represents the name of the (logical) method + // being called, must be equal to the $method part in the span name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The `code.function` attribute may be used to store the + // latter (e.g., method actually executing the call on the server side, RPC + // client stub method on the client side). + RPCMethodKey = attribute.Key("rpc.method") +) + +var ( + // gRPC + RPCSystemGRPC = RPCSystemKey.String("grpc") + // Java RMI + RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") + // .NET WCF + RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") + // Apache Dubbo + RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") + // Connect RPC + RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") +) + +// RPCService returns an attribute KeyValue conforming to the "rpc.service" +// semantic conventions. It represents the full (logical) name of the service +// being called, including its package name, if applicable. +func RPCService(val string) attribute.KeyValue { + return RPCServiceKey.String(val) +} + +// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" +// semantic conventions. It represents the name of the (logical) method being +// called, must be equal to the $method part in the span name. +func RPCMethod(val string) attribute.KeyValue { + return RPCMethodKey.String(val) +} + +// Tech-specific attributes for gRPC. +const ( + // RPCGRPCStatusCodeKey is the attribute Key conforming to the + // "rpc.grpc.status_code" semantic conventions. It represents the [numeric + // status + // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of + // the gRPC request. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") +) + +var ( + // OK + RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) + // CANCELLED + RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) + // UNKNOWN + RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) + // INVALID_ARGUMENT + RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) + // DEADLINE_EXCEEDED + RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) + // NOT_FOUND + RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) + // ALREADY_EXISTS + RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) + // PERMISSION_DENIED + RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) + // RESOURCE_EXHAUSTED + RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) + // FAILED_PRECONDITION + RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) + // ABORTED + RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) + // OUT_OF_RANGE + RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) + // UNIMPLEMENTED + RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) + // INTERNAL + RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) + // UNAVAILABLE + RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) + // DATA_LOSS + RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) + // UNAUTHENTICATED + RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) +) + +// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). +const ( + // RPCJsonrpcVersionKey is the attribute Key conforming to the + // "rpc.jsonrpc.version" semantic conventions. It represents the protocol + // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 + // does not specify this, the value can be omitted. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If other than the default + // version (`1.0`)) + // Stability: stable + // Examples: '2.0', '1.0' + RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + + // RPCJsonrpcRequestIDKey is the attribute Key conforming to the + // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` + // property of request or response. Since protocol allows id to be int, + // string, `null` or missing (for notifications), value is expected to be + // cast to string for simplicity. Use empty string in case of `null` value. + // Omit entirely if this is a notification. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10', 'request-7', '' + RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + + // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_code" semantic conventions. It represents the + // `error.code` property of response if it is an error response. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If response is not successful.) + // Stability: stable + // Examples: -32700, 100 + RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + + // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_message" semantic conventions. It represents the + // `error.message` property of response if it is an error response. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Parse error', 'User already exists' + RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") +) + +// RPCJsonrpcVersion returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.version" semantic conventions. It represents the protocol +// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 +// does not specify this, the value can be omitted. +func RPCJsonrpcVersion(val string) attribute.KeyValue { + return RPCJsonrpcVersionKey.String(val) +} + +// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` +// property of request or response. Since protocol allows id to be int, string, +// `null` or missing (for notifications), value is expected to be cast to +// string for simplicity. Use empty string in case of `null` value. Omit +// entirely if this is a notification. +func RPCJsonrpcRequestID(val string) attribute.KeyValue { + return RPCJsonrpcRequestIDKey.String(val) +} + +// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_code" semantic conventions. It represents the +// `error.code` property of response if it is an error response. +func RPCJsonrpcErrorCode(val int) attribute.KeyValue { + return RPCJsonrpcErrorCodeKey.Int(val) +} + +// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_message" semantic conventions. It represents the +// `error.message` property of response if it is an error response. +func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { + return RPCJsonrpcErrorMessageKey.String(val) +} + +// Tech-specific attributes for Connect RPC. +const ( + // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the + // "rpc.connect_rpc.error_code" semantic conventions. It represents the + // [error codes](https://connect.build/docs/protocol/#error-codes) of the + // Connect request. Error codes are always string values. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (If response is not successful + // and if error code available.) + // Stability: stable + RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") +) + +var ( + // cancelled + RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") + // unknown + RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") + // invalid_argument + RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") + // deadline_exceeded + RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") + // not_found + RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") + // already_exists + RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") + // permission_denied + RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") + // resource_exhausted + RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") + // failed_precondition + RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") + // aborted + RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") + // out_of_range + RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") + // unimplemented + RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") + // internal + RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") + // unavailable + RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") + // data_loss + RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") + // unauthenticated + RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/README.md new file mode 100644 index 000000000..bc60aa603 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.21.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.21.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.21.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/attribute_group.go new file mode 100644 index 000000000..a9a15a1da --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/attribute_group.go @@ -0,0 +1,1866 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" + +import "go.opentelemetry.io/otel/attribute" + +// These attributes may be used to describe the client in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API does not expose a +// clear notion of client and server). This also covers UDP network +// interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) +// and DNS. +const ( + // ClientAddressKey is the attribute Key conforming to the "client.address" + // semantic conventions. It represents the client address - unix domain + // socket name, IPv4 or IPv6 address. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/tmp/my.sock', '10.1.2.80' + // Note: When observed from the server side, and when communicating through + // an intermediary, `client.address` SHOULD represent client address behind + // any intermediaries (e.g. proxies) if it's available. + ClientAddressKey = attribute.Key("client.address") + + // ClientPortKey is the attribute Key conforming to the "client.port" + // semantic conventions. It represents the client port number + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + // Note: When observed from the server side, and when communicating through + // an intermediary, `client.port` SHOULD represent client port behind any + // intermediaries (e.g. proxies) if it's available. + ClientPortKey = attribute.Key("client.port") + + // ClientSocketAddressKey is the attribute Key conforming to the + // "client.socket.address" semantic conventions. It represents the + // immediate client peer address - unix domain socket name, IPv4 or IPv6 + // address. + // + // Type: string + // RequirementLevel: Recommended (If different than `client.address`.) + // Stability: stable + // Examples: '/tmp/my.sock', '127.0.0.1' + ClientSocketAddressKey = attribute.Key("client.socket.address") + + // ClientSocketPortKey is the attribute Key conforming to the + // "client.socket.port" semantic conventions. It represents the immediate + // client peer port number + // + // Type: int + // RequirementLevel: Recommended (If different than `client.port`.) + // Stability: stable + // Examples: 35555 + ClientSocketPortKey = attribute.Key("client.socket.port") +) + +// ClientAddress returns an attribute KeyValue conforming to the +// "client.address" semantic conventions. It represents the client address - +// unix domain socket name, IPv4 or IPv6 address. +func ClientAddress(val string) attribute.KeyValue { + return ClientAddressKey.String(val) +} + +// ClientPort returns an attribute KeyValue conforming to the "client.port" +// semantic conventions. It represents the client port number +func ClientPort(val int) attribute.KeyValue { + return ClientPortKey.Int(val) +} + +// ClientSocketAddress returns an attribute KeyValue conforming to the +// "client.socket.address" semantic conventions. It represents the immediate +// client peer address - unix domain socket name, IPv4 or IPv6 address. +func ClientSocketAddress(val string) attribute.KeyValue { + return ClientSocketAddressKey.String(val) +} + +// ClientSocketPort returns an attribute KeyValue conforming to the +// "client.socket.port" semantic conventions. It represents the immediate +// client peer port number +func ClientSocketPort(val int) attribute.KeyValue { + return ClientSocketPortKey.Int(val) +} + +// Describes deprecated HTTP attributes. +const ( + // HTTPMethodKey is the attribute Key conforming to the "http.method" + // semantic conventions. It represents the deprecated, use + // `http.request.method` instead. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'GET', 'POST', 'HEAD' + HTTPMethodKey = attribute.Key("http.method") + + // HTTPStatusCodeKey is the attribute Key conforming to the + // "http.status_code" semantic conventions. It represents the deprecated, + // use `http.response.status_code` instead. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 200 + HTTPStatusCodeKey = attribute.Key("http.status_code") + + // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" + // semantic conventions. It represents the deprecated, use `url.scheme` + // instead. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'http', 'https' + HTTPSchemeKey = attribute.Key("http.scheme") + + // HTTPURLKey is the attribute Key conforming to the "http.url" semantic + // conventions. It represents the deprecated, use `url.full` instead. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' + HTTPURLKey = attribute.Key("http.url") + + // HTTPTargetKey is the attribute Key conforming to the "http.target" + // semantic conventions. It represents the deprecated, use `url.path` and + // `url.query` instead. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '/search?q=OpenTelemetry#SemConv' + HTTPTargetKey = attribute.Key("http.target") + + // HTTPRequestContentLengthKey is the attribute Key conforming to the + // "http.request_content_length" semantic conventions. It represents the + // deprecated, use `http.request.body.size` instead. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 3495 + HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") + + // HTTPResponseContentLengthKey is the attribute Key conforming to the + // "http.response_content_length" semantic conventions. It represents the + // deprecated, use `http.response.body.size` instead. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 3495 + HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") +) + +// HTTPMethod returns an attribute KeyValue conforming to the "http.method" +// semantic conventions. It represents the deprecated, use +// `http.request.method` instead. +func HTTPMethod(val string) attribute.KeyValue { + return HTTPMethodKey.String(val) +} + +// HTTPStatusCode returns an attribute KeyValue conforming to the +// "http.status_code" semantic conventions. It represents the deprecated, use +// `http.response.status_code` instead. +func HTTPStatusCode(val int) attribute.KeyValue { + return HTTPStatusCodeKey.Int(val) +} + +// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" +// semantic conventions. It represents the deprecated, use `url.scheme` +// instead. +func HTTPScheme(val string) attribute.KeyValue { + return HTTPSchemeKey.String(val) +} + +// HTTPURL returns an attribute KeyValue conforming to the "http.url" +// semantic conventions. It represents the deprecated, use `url.full` instead. +func HTTPURL(val string) attribute.KeyValue { + return HTTPURLKey.String(val) +} + +// HTTPTarget returns an attribute KeyValue conforming to the "http.target" +// semantic conventions. It represents the deprecated, use `url.path` and +// `url.query` instead. +func HTTPTarget(val string) attribute.KeyValue { + return HTTPTargetKey.String(val) +} + +// HTTPRequestContentLength returns an attribute KeyValue conforming to the +// "http.request_content_length" semantic conventions. It represents the +// deprecated, use `http.request.body.size` instead. +func HTTPRequestContentLength(val int) attribute.KeyValue { + return HTTPRequestContentLengthKey.Int(val) +} + +// HTTPResponseContentLength returns an attribute KeyValue conforming to the +// "http.response_content_length" semantic conventions. It represents the +// deprecated, use `http.response.body.size` instead. +func HTTPResponseContentLength(val int) attribute.KeyValue { + return HTTPResponseContentLengthKey.Int(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetSockPeerNameKey is the attribute Key conforming to the + // "net.sock.peer.name" semantic conventions. It represents the deprecated, + // use `server.socket.domain` on client spans. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '/var/my.sock' + NetSockPeerNameKey = attribute.Key("net.sock.peer.name") + + // NetSockPeerAddrKey is the attribute Key conforming to the + // "net.sock.peer.addr" semantic conventions. It represents the deprecated, + // use `server.socket.address` on client spans and `client.socket.address` + // on server spans. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '192.168.0.1' + NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") + + // NetSockPeerPortKey is the attribute Key conforming to the + // "net.sock.peer.port" semantic conventions. It represents the deprecated, + // use `server.socket.port` on client spans and `client.socket.port` on + // server spans. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 65531 + NetSockPeerPortKey = attribute.Key("net.sock.peer.port") + + // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" + // semantic conventions. It represents the deprecated, use `server.address` + // on client spans and `client.address` on server spans. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'example.com' + NetPeerNameKey = attribute.Key("net.peer.name") + + // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" + // semantic conventions. It represents the deprecated, use `server.port` on + // client spans and `client.port` on server spans. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 8080 + NetPeerPortKey = attribute.Key("net.peer.port") + + // NetHostNameKey is the attribute Key conforming to the "net.host.name" + // semantic conventions. It represents the deprecated, use + // `server.address`. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'example.com' + NetHostNameKey = attribute.Key("net.host.name") + + // NetHostPortKey is the attribute Key conforming to the "net.host.port" + // semantic conventions. It represents the deprecated, use `server.port`. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 8080 + NetHostPortKey = attribute.Key("net.host.port") + + // NetSockHostAddrKey is the attribute Key conforming to the + // "net.sock.host.addr" semantic conventions. It represents the deprecated, + // use `server.socket.address`. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '/var/my.sock' + NetSockHostAddrKey = attribute.Key("net.sock.host.addr") + + // NetSockHostPortKey is the attribute Key conforming to the + // "net.sock.host.port" semantic conventions. It represents the deprecated, + // use `server.socket.port`. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 8080 + NetSockHostPortKey = attribute.Key("net.sock.host.port") + + // NetTransportKey is the attribute Key conforming to the "net.transport" + // semantic conventions. It represents the deprecated, use + // `network.transport`. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: deprecated + NetTransportKey = attribute.Key("net.transport") + + // NetProtocolNameKey is the attribute Key conforming to the + // "net.protocol.name" semantic conventions. It represents the deprecated, + // use `network.protocol.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'amqp', 'http', 'mqtt' + NetProtocolNameKey = attribute.Key("net.protocol.name") + + // NetProtocolVersionKey is the attribute Key conforming to the + // "net.protocol.version" semantic conventions. It represents the + // deprecated, use `network.protocol.version`. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '3.1.1' + NetProtocolVersionKey = attribute.Key("net.protocol.version") + + // NetSockFamilyKey is the attribute Key conforming to the + // "net.sock.family" semantic conventions. It represents the deprecated, + // use `network.transport` and `network.type`. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: deprecated + NetSockFamilyKey = attribute.Key("net.sock.family") +) + +var ( + // ip_tcp + NetTransportTCP = NetTransportKey.String("ip_tcp") + // ip_udp + NetTransportUDP = NetTransportKey.String("ip_udp") + // Named or anonymous pipe + NetTransportPipe = NetTransportKey.String("pipe") + // In-process communication + NetTransportInProc = NetTransportKey.String("inproc") + // Something else (non IP-based) + NetTransportOther = NetTransportKey.String("other") +) + +var ( + // IPv4 address + NetSockFamilyInet = NetSockFamilyKey.String("inet") + // IPv6 address + NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") + // Unix domain socket path + NetSockFamilyUnix = NetSockFamilyKey.String("unix") +) + +// NetSockPeerName returns an attribute KeyValue conforming to the +// "net.sock.peer.name" semantic conventions. It represents the deprecated, use +// `server.socket.domain` on client spans. +func NetSockPeerName(val string) attribute.KeyValue { + return NetSockPeerNameKey.String(val) +} + +// NetSockPeerAddr returns an attribute KeyValue conforming to the +// "net.sock.peer.addr" semantic conventions. It represents the deprecated, use +// `server.socket.address` on client spans and `client.socket.address` on +// server spans. +func NetSockPeerAddr(val string) attribute.KeyValue { + return NetSockPeerAddrKey.String(val) +} + +// NetSockPeerPort returns an attribute KeyValue conforming to the +// "net.sock.peer.port" semantic conventions. It represents the deprecated, use +// `server.socket.port` on client spans and `client.socket.port` on server +// spans. +func NetSockPeerPort(val int) attribute.KeyValue { + return NetSockPeerPortKey.Int(val) +} + +// NetPeerName returns an attribute KeyValue conforming to the +// "net.peer.name" semantic conventions. It represents the deprecated, use +// `server.address` on client spans and `client.address` on server spans. +func NetPeerName(val string) attribute.KeyValue { + return NetPeerNameKey.String(val) +} + +// NetPeerPort returns an attribute KeyValue conforming to the +// "net.peer.port" semantic conventions. It represents the deprecated, use +// `server.port` on client spans and `client.port` on server spans. +func NetPeerPort(val int) attribute.KeyValue { + return NetPeerPortKey.Int(val) +} + +// NetHostName returns an attribute KeyValue conforming to the +// "net.host.name" semantic conventions. It represents the deprecated, use +// `server.address`. +func NetHostName(val string) attribute.KeyValue { + return NetHostNameKey.String(val) +} + +// NetHostPort returns an attribute KeyValue conforming to the +// "net.host.port" semantic conventions. It represents the deprecated, use +// `server.port`. +func NetHostPort(val int) attribute.KeyValue { + return NetHostPortKey.Int(val) +} + +// NetSockHostAddr returns an attribute KeyValue conforming to the +// "net.sock.host.addr" semantic conventions. It represents the deprecated, use +// `server.socket.address`. +func NetSockHostAddr(val string) attribute.KeyValue { + return NetSockHostAddrKey.String(val) +} + +// NetSockHostPort returns an attribute KeyValue conforming to the +// "net.sock.host.port" semantic conventions. It represents the deprecated, use +// `server.socket.port`. +func NetSockHostPort(val int) attribute.KeyValue { + return NetSockHostPortKey.Int(val) +} + +// NetProtocolName returns an attribute KeyValue conforming to the +// "net.protocol.name" semantic conventions. It represents the deprecated, use +// `network.protocol.name`. +func NetProtocolName(val string) attribute.KeyValue { + return NetProtocolNameKey.String(val) +} + +// NetProtocolVersion returns an attribute KeyValue conforming to the +// "net.protocol.version" semantic conventions. It represents the deprecated, +// use `network.protocol.version`. +func NetProtocolVersion(val string) attribute.KeyValue { + return NetProtocolVersionKey.String(val) +} + +// These attributes may be used to describe the receiver of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API does not expose a clear notion +// of client and server. +const ( + // DestinationDomainKey is the attribute Key conforming to the + // "destination.domain" semantic conventions. It represents the domain name + // of the destination system. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'foo.example.com' + // Note: This value may be a host name, a fully qualified domain name, or + // another host naming format. + DestinationDomainKey = attribute.Key("destination.domain") + + // DestinationAddressKey is the attribute Key conforming to the + // "destination.address" semantic conventions. It represents the peer + // address, for example IP address or UNIX socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10.5.3.2' + DestinationAddressKey = attribute.Key("destination.address") + + // DestinationPortKey is the attribute Key conforming to the + // "destination.port" semantic conventions. It represents the peer port + // number + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3389, 2888 + DestinationPortKey = attribute.Key("destination.port") +) + +// DestinationDomain returns an attribute KeyValue conforming to the +// "destination.domain" semantic conventions. It represents the domain name of +// the destination system. +func DestinationDomain(val string) attribute.KeyValue { + return DestinationDomainKey.String(val) +} + +// DestinationAddress returns an attribute KeyValue conforming to the +// "destination.address" semantic conventions. It represents the peer address, +// for example IP address or UNIX socket name. +func DestinationAddress(val string) attribute.KeyValue { + return DestinationAddressKey.String(val) +} + +// DestinationPort returns an attribute KeyValue conforming to the +// "destination.port" semantic conventions. It represents the peer port number +func DestinationPort(val int) attribute.KeyValue { + return DestinationPortKey.Int(val) +} + +// Describes HTTP attributes. +const ( + // HTTPRequestMethodKey is the attribute Key conforming to the + // "http.request.method" semantic conventions. It represents the hTTP + // request method. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + // Note: HTTP request method value SHOULD be "known" to the + // instrumentation. + // By default, this convention defines "known" methods as the ones listed + // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) + // and the PATCH method defined in + // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). + // + // If the HTTP request method is not known to instrumentation, it MUST set + // the `http.request.method` attribute to `_OTHER` and, except if reporting + // a metric, MUST + // set the exact method received in the request line as value of the + // `http.request.method_original` attribute. + // + // If the HTTP instrumentation could end up converting valid HTTP request + // methods to `_OTHER`, then it MUST provide a way to override + // the list of known HTTP methods. If this override is done via environment + // variable, then the environment variable MUST be named + // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated + // list of case-sensitive known HTTP methods + // (this list MUST be a full override of the default known method, it is + // not a list of known methods in addition to the defaults). + // + // HTTP method names are case-sensitive and `http.request.method` attribute + // value MUST match a known HTTP method name exactly. + // Instrumentations for specific web frameworks that consider HTTP methods + // to be case insensitive, SHOULD populate a canonical equivalent. + // Tracing instrumentations that do so, MUST also set + // `http.request.method_original` to the original value. + HTTPRequestMethodKey = attribute.Key("http.request.method") + + // HTTPResponseStatusCodeKey is the attribute Key conforming to the + // "http.response.status_code" semantic conventions. It represents the + // [HTTP response status + // code](https://tools.ietf.org/html/rfc7231#section-6). + // + // Type: int + // RequirementLevel: ConditionallyRequired (If and only if one was + // received/sent.) + // Stability: stable + // Examples: 200 + HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") +) + +var ( + // CONNECT method + HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") + // DELETE method + HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") + // GET method + HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") + // HEAD method + HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") + // OPTIONS method + HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") + // PATCH method + HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") + // POST method + HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") + // PUT method + HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") + // TRACE method + HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") + // Any HTTP method that the instrumentation has no prior knowledge of + HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") +) + +// HTTPResponseStatusCode returns an attribute KeyValue conforming to the +// "http.response.status_code" semantic conventions. It represents the [HTTP +// response status code](https://tools.ietf.org/html/rfc7231#section-6). +func HTTPResponseStatusCode(val int) attribute.KeyValue { + return HTTPResponseStatusCodeKey.Int(val) +} + +// HTTP Server attributes +const ( + // HTTPRouteKey is the attribute Key conforming to the "http.route" + // semantic conventions. It represents the matched route (path template in + // the format used by the respective server framework). See note below + // + // Type: string + // RequirementLevel: ConditionallyRequired (If and only if it's available) + // Stability: stable + // Examples: '/users/:userID?', '{controller}/{action}/{id?}' + // Note: MUST NOT be populated when this is not supported by the HTTP + // server framework as the route attribute should have low-cardinality and + // the URI path can NOT substitute it. + // SHOULD include the [application + // root](/docs/http/http-spans.md#http-server-definitions) if there is one. + HTTPRouteKey = attribute.Key("http.route") +) + +// HTTPRoute returns an attribute KeyValue conforming to the "http.route" +// semantic conventions. It represents the matched route (path template in the +// format used by the respective server framework). See note below +func HTTPRoute(val string) attribute.KeyValue { + return HTTPRouteKey.String(val) +} + +// Attributes for Events represented using Log Records. +const ( + // EventNameKey is the attribute Key conforming to the "event.name" + // semantic conventions. It represents the name identifies the event. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'click', 'exception' + EventNameKey = attribute.Key("event.name") + + // EventDomainKey is the attribute Key conforming to the "event.domain" + // semantic conventions. It represents the domain identifies the business + // context for the events. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Note: Events across different domains may have same `event.name`, yet be + // unrelated events. + EventDomainKey = attribute.Key("event.domain") +) + +var ( + // Events from browser apps + EventDomainBrowser = EventDomainKey.String("browser") + // Events from mobile apps + EventDomainDevice = EventDomainKey.String("device") + // Events from Kubernetes + EventDomainK8S = EventDomainKey.String("k8s") +) + +// EventName returns an attribute KeyValue conforming to the "event.name" +// semantic conventions. It represents the name identifies the event. +func EventName(val string) attribute.KeyValue { + return EventNameKey.String(val) +} + +// The attributes described in this section are rather generic. They may be +// used in any Log Record they apply to. +const ( + // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" + // semantic conventions. It represents a unique identifier for the Log + // Record. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' + // Note: If an id is provided, other log records with the same id will be + // considered duplicates and can be removed safely. This means, that two + // distinguishable log records MUST have different values. + // The id MAY be an [Universally Unique Lexicographically Sortable + // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers + // (e.g. UUID) may be used as needed. + LogRecordUIDKey = attribute.Key("log.record.uid") +) + +// LogRecordUID returns an attribute KeyValue conforming to the +// "log.record.uid" semantic conventions. It represents a unique identifier for +// the Log Record. +func LogRecordUID(val string) attribute.KeyValue { + return LogRecordUIDKey.String(val) +} + +// Describes Log attributes +const ( + // LogIostreamKey is the attribute Key conforming to the "log.iostream" + // semantic conventions. It represents the stream associated with the log. + // See below for a list of well-known values. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + LogIostreamKey = attribute.Key("log.iostream") +) + +var ( + // Logs from stdout stream + LogIostreamStdout = LogIostreamKey.String("stdout") + // Events from stderr stream + LogIostreamStderr = LogIostreamKey.String("stderr") +) + +// A file to which log was emitted. +const ( + // LogFileNameKey is the attribute Key conforming to the "log.file.name" + // semantic conventions. It represents the basename of the file. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'audit.log' + LogFileNameKey = attribute.Key("log.file.name") + + // LogFilePathKey is the attribute Key conforming to the "log.file.path" + // semantic conventions. It represents the full path to the file. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/var/log/mysql/audit.log' + LogFilePathKey = attribute.Key("log.file.path") + + // LogFileNameResolvedKey is the attribute Key conforming to the + // "log.file.name_resolved" semantic conventions. It represents the + // basename of the file, with symlinks resolved. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'uuid.log' + LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") + + // LogFilePathResolvedKey is the attribute Key conforming to the + // "log.file.path_resolved" semantic conventions. It represents the full + // path to the file, with symlinks resolved. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/var/lib/docker/uuid.log' + LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") +) + +// LogFileName returns an attribute KeyValue conforming to the +// "log.file.name" semantic conventions. It represents the basename of the +// file. +func LogFileName(val string) attribute.KeyValue { + return LogFileNameKey.String(val) +} + +// LogFilePath returns an attribute KeyValue conforming to the +// "log.file.path" semantic conventions. It represents the full path to the +// file. +func LogFilePath(val string) attribute.KeyValue { + return LogFilePathKey.String(val) +} + +// LogFileNameResolved returns an attribute KeyValue conforming to the +// "log.file.name_resolved" semantic conventions. It represents the basename of +// the file, with symlinks resolved. +func LogFileNameResolved(val string) attribute.KeyValue { + return LogFileNameResolvedKey.String(val) +} + +// LogFilePathResolved returns an attribute KeyValue conforming to the +// "log.file.path_resolved" semantic conventions. It represents the full path +// to the file, with symlinks resolved. +func LogFilePathResolved(val string) attribute.KeyValue { + return LogFilePathResolvedKey.String(val) +} + +// Describes JVM memory metric attributes. +const ( + // TypeKey is the attribute Key conforming to the "type" semantic + // conventions. It represents the type of memory. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'heap', 'non_heap' + TypeKey = attribute.Key("type") + + // PoolKey is the attribute Key conforming to the "pool" semantic + // conventions. It represents the name of the memory pool. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' + // Note: Pool names are generally obtained via + // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). + PoolKey = attribute.Key("pool") +) + +var ( + // Heap memory + TypeHeap = TypeKey.String("heap") + // Non-heap memory + TypeNonHeap = TypeKey.String("non_heap") +) + +// Pool returns an attribute KeyValue conforming to the "pool" semantic +// conventions. It represents the name of the memory pool. +func Pool(val string) attribute.KeyValue { + return PoolKey.String(val) +} + +// These attributes may be used to describe the server in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API does not expose a +// clear notion of client and server). This also covers UDP network +// interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) +// and DNS. +const ( + // ServerAddressKey is the attribute Key conforming to the "server.address" + // semantic conventions. It represents the logical server hostname, matches + // server FQDN if available, and IP or socket address if FQDN is not known. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'example.com' + ServerAddressKey = attribute.Key("server.address") + + // ServerPortKey is the attribute Key conforming to the "server.port" + // semantic conventions. It represents the logical server port number + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 80, 8080, 443 + ServerPortKey = attribute.Key("server.port") + + // ServerSocketDomainKey is the attribute Key conforming to the + // "server.socket.domain" semantic conventions. It represents the domain + // name of an immediate peer. + // + // Type: string + // RequirementLevel: Recommended (If different than `server.address`.) + // Stability: stable + // Examples: 'proxy.example.com' + // Note: Typically observed from the client side, and represents a proxy or + // other intermediary domain name. + ServerSocketDomainKey = attribute.Key("server.socket.domain") + + // ServerSocketAddressKey is the attribute Key conforming to the + // "server.socket.address" semantic conventions. It represents the physical + // server IP address or Unix socket address. If set from the client, should + // simply use the socket's peer address, and not attempt to find any actual + // server IP (i.e., if set from client, this may represent some proxy + // server instead of the logical server). + // + // Type: string + // RequirementLevel: Recommended (If different than `server.address`.) + // Stability: stable + // Examples: '10.5.3.2' + ServerSocketAddressKey = attribute.Key("server.socket.address") + + // ServerSocketPortKey is the attribute Key conforming to the + // "server.socket.port" semantic conventions. It represents the physical + // server port. + // + // Type: int + // RequirementLevel: Recommended (If different than `server.port`.) + // Stability: stable + // Examples: 16456 + ServerSocketPortKey = attribute.Key("server.socket.port") +) + +// ServerAddress returns an attribute KeyValue conforming to the +// "server.address" semantic conventions. It represents the logical server +// hostname, matches server FQDN if available, and IP or socket address if FQDN +// is not known. +func ServerAddress(val string) attribute.KeyValue { + return ServerAddressKey.String(val) +} + +// ServerPort returns an attribute KeyValue conforming to the "server.port" +// semantic conventions. It represents the logical server port number +func ServerPort(val int) attribute.KeyValue { + return ServerPortKey.Int(val) +} + +// ServerSocketDomain returns an attribute KeyValue conforming to the +// "server.socket.domain" semantic conventions. It represents the domain name +// of an immediate peer. +func ServerSocketDomain(val string) attribute.KeyValue { + return ServerSocketDomainKey.String(val) +} + +// ServerSocketAddress returns an attribute KeyValue conforming to the +// "server.socket.address" semantic conventions. It represents the physical +// server IP address or Unix socket address. If set from the client, should +// simply use the socket's peer address, and not attempt to find any actual +// server IP (i.e., if set from client, this may represent some proxy server +// instead of the logical server). +func ServerSocketAddress(val string) attribute.KeyValue { + return ServerSocketAddressKey.String(val) +} + +// ServerSocketPort returns an attribute KeyValue conforming to the +// "server.socket.port" semantic conventions. It represents the physical server +// port. +func ServerSocketPort(val int) attribute.KeyValue { + return ServerSocketPortKey.Int(val) +} + +// These attributes may be used to describe the sender of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API does not expose a clear notion +// of client and server. +const ( + // SourceDomainKey is the attribute Key conforming to the "source.domain" + // semantic conventions. It represents the domain name of the source + // system. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'foo.example.com' + // Note: This value may be a host name, a fully qualified domain name, or + // another host naming format. + SourceDomainKey = attribute.Key("source.domain") + + // SourceAddressKey is the attribute Key conforming to the "source.address" + // semantic conventions. It represents the source address, for example IP + // address or Unix socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10.5.3.2' + SourceAddressKey = attribute.Key("source.address") + + // SourcePortKey is the attribute Key conforming to the "source.port" + // semantic conventions. It represents the source port number + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3389, 2888 + SourcePortKey = attribute.Key("source.port") +) + +// SourceDomain returns an attribute KeyValue conforming to the +// "source.domain" semantic conventions. It represents the domain name of the +// source system. +func SourceDomain(val string) attribute.KeyValue { + return SourceDomainKey.String(val) +} + +// SourceAddress returns an attribute KeyValue conforming to the +// "source.address" semantic conventions. It represents the source address, for +// example IP address or Unix socket name. +func SourceAddress(val string) attribute.KeyValue { + return SourceAddressKey.String(val) +} + +// SourcePort returns an attribute KeyValue conforming to the "source.port" +// semantic conventions. It represents the source port number +func SourcePort(val int) attribute.KeyValue { + return SourcePortKey.Int(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetworkTransportKey is the attribute Key conforming to the + // "network.transport" semantic conventions. It represents the [OSI + // Transport Layer](https://osi-model.com/transport-layer/) or + // [Inter-process Communication + // method](https://en.wikipedia.org/wiki/Inter-process_communication). The + // value SHOULD be normalized to lowercase. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'tcp', 'udp' + NetworkTransportKey = attribute.Key("network.transport") + + // NetworkTypeKey is the attribute Key conforming to the "network.type" + // semantic conventions. It represents the [OSI Network + // Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. The + // value SHOULD be normalized to lowercase. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ipv4', 'ipv6' + NetworkTypeKey = attribute.Key("network.type") + + // NetworkProtocolNameKey is the attribute Key conforming to the + // "network.protocol.name" semantic conventions. It represents the [OSI + // Application Layer](https://osi-model.com/application-layer/) or non-OSI + // equivalent. The value SHOULD be normalized to lowercase. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'amqp', 'http', 'mqtt' + NetworkProtocolNameKey = attribute.Key("network.protocol.name") + + // NetworkProtocolVersionKey is the attribute Key conforming to the + // "network.protocol.version" semantic conventions. It represents the + // version of the application layer protocol used. See note below. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '3.1.1' + // Note: `network.protocol.version` refers to the version of the protocol + // used and might be different from the protocol client's version. If the + // HTTP client used has a version of `0.27.2`, but sends HTTP version + // `1.1`, this attribute should be set to `1.1`. + NetworkProtocolVersionKey = attribute.Key("network.protocol.version") +) + +var ( + // TCP + NetworkTransportTCP = NetworkTransportKey.String("tcp") + // UDP + NetworkTransportUDP = NetworkTransportKey.String("udp") + // Named or anonymous pipe. See note below + NetworkTransportPipe = NetworkTransportKey.String("pipe") + // Unix domain socket + NetworkTransportUnix = NetworkTransportKey.String("unix") +) + +var ( + // IPv4 + NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") + // IPv6 + NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") +) + +// NetworkProtocolName returns an attribute KeyValue conforming to the +// "network.protocol.name" semantic conventions. It represents the [OSI +// Application Layer](https://osi-model.com/application-layer/) or non-OSI +// equivalent. The value SHOULD be normalized to lowercase. +func NetworkProtocolName(val string) attribute.KeyValue { + return NetworkProtocolNameKey.String(val) +} + +// NetworkProtocolVersion returns an attribute KeyValue conforming to the +// "network.protocol.version" semantic conventions. It represents the version +// of the application layer protocol used. See note below. +func NetworkProtocolVersion(val string) attribute.KeyValue { + return NetworkProtocolVersionKey.String(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetworkConnectionTypeKey is the attribute Key conforming to the + // "network.connection.type" semantic conventions. It represents the + // internet connection type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'wifi' + NetworkConnectionTypeKey = attribute.Key("network.connection.type") + + // NetworkConnectionSubtypeKey is the attribute Key conforming to the + // "network.connection.subtype" semantic conventions. It represents the + // this describes more details regarding the connection.type. It may be the + // type of cell technology connection, but it could be used for describing + // details about a wifi connection. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'LTE' + NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") + + // NetworkCarrierNameKey is the attribute Key conforming to the + // "network.carrier.name" semantic conventions. It represents the name of + // the mobile carrier. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'sprint' + NetworkCarrierNameKey = attribute.Key("network.carrier.name") + + // NetworkCarrierMccKey is the attribute Key conforming to the + // "network.carrier.mcc" semantic conventions. It represents the mobile + // carrier country code. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '310' + NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") + + // NetworkCarrierMncKey is the attribute Key conforming to the + // "network.carrier.mnc" semantic conventions. It represents the mobile + // carrier network code. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '001' + NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") + + // NetworkCarrierIccKey is the attribute Key conforming to the + // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 + // alpha-2 2-character country code associated with the mobile carrier + // network. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'DE' + NetworkCarrierIccKey = attribute.Key("network.carrier.icc") +) + +var ( + // wifi + NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") + // wired + NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") + // cell + NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") + // unavailable + NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") + // unknown + NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") +) + +var ( + // GPRS + NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") + // EDGE + NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") + // UMTS + NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") + // CDMA + NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") + // HSUPA + NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") + // HSPA + NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") + // IDEN + NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") + // EVDO Rev. B + NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") + // LTE + NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") + // EHRPD + NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") + // HSPAP + NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") + // GSM + NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") + // TD-SCDMA + NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") + // IWLAN + NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") + // LTE CA + NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") +) + +// NetworkCarrierName returns an attribute KeyValue conforming to the +// "network.carrier.name" semantic conventions. It represents the name of the +// mobile carrier. +func NetworkCarrierName(val string) attribute.KeyValue { + return NetworkCarrierNameKey.String(val) +} + +// NetworkCarrierMcc returns an attribute KeyValue conforming to the +// "network.carrier.mcc" semantic conventions. It represents the mobile carrier +// country code. +func NetworkCarrierMcc(val string) attribute.KeyValue { + return NetworkCarrierMccKey.String(val) +} + +// NetworkCarrierMnc returns an attribute KeyValue conforming to the +// "network.carrier.mnc" semantic conventions. It represents the mobile carrier +// network code. +func NetworkCarrierMnc(val string) attribute.KeyValue { + return NetworkCarrierMncKey.String(val) +} + +// NetworkCarrierIcc returns an attribute KeyValue conforming to the +// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 +// alpha-2 2-character country code associated with the mobile carrier network. +func NetworkCarrierIcc(val string) attribute.KeyValue { + return NetworkCarrierIccKey.String(val) +} + +// Semantic conventions for HTTP client and server Spans. +const ( + // HTTPRequestMethodOriginalKey is the attribute Key conforming to the + // "http.request.method_original" semantic conventions. It represents the + // original HTTP method sent by the client in the request line. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If and only if it's different + // than `http.request.method`.) + // Stability: stable + // Examples: 'GeT', 'ACL', 'foo' + HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") + + // HTTPRequestBodySizeKey is the attribute Key conforming to the + // "http.request.body.size" semantic conventions. It represents the size of + // the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3495 + HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") + + // HTTPResponseBodySizeKey is the attribute Key conforming to the + // "http.response.body.size" semantic conventions. It represents the size + // of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3495 + HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") +) + +// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the +// "http.request.method_original" semantic conventions. It represents the +// original HTTP method sent by the client in the request line. +func HTTPRequestMethodOriginal(val string) attribute.KeyValue { + return HTTPRequestMethodOriginalKey.String(val) +} + +// HTTPRequestBodySize returns an attribute KeyValue conforming to the +// "http.request.body.size" semantic conventions. It represents the size of the +// request payload body in bytes. This is the number of bytes transferred +// excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPRequestBodySize(val int) attribute.KeyValue { + return HTTPRequestBodySizeKey.Int(val) +} + +// HTTPResponseBodySize returns an attribute KeyValue conforming to the +// "http.response.body.size" semantic conventions. It represents the size of +// the response payload body in bytes. This is the number of bytes transferred +// excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPResponseBodySize(val int) attribute.KeyValue { + return HTTPResponseBodySizeKey.Int(val) +} + +// Semantic convention describing per-message attributes populated on messaging +// spans or links. +const ( + // MessagingMessageIDKey is the attribute Key conforming to the + // "messaging.message.id" semantic conventions. It represents a value used + // by the messaging system as an identifier for the message, represented as + // a string. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + MessagingMessageIDKey = attribute.Key("messaging.message.id") + + // MessagingMessageConversationIDKey is the attribute Key conforming to the + // "messaging.message.conversation_id" semantic conventions. It represents + // the [conversation ID](#conversations) identifying the conversation to + // which the message belongs, represented as a string. Sometimes called + // "Correlation ID". + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MyConversationID' + MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") + + // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to + // the "messaging.message.payload_size_bytes" semantic conventions. It + // represents the (uncompressed) size of the message payload in bytes. Also + // use this attribute if it is unknown whether the compressed or + // uncompressed payload size is reported. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2738 + MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes") + + // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key + // conforming to the "messaging.message.payload_compressed_size_bytes" + // semantic conventions. It represents the compressed size of the message + // payload in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2048 + MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes") +) + +// MessagingMessageID returns an attribute KeyValue conforming to the +// "messaging.message.id" semantic conventions. It represents a value used by +// the messaging system as an identifier for the message, represented as a +// string. +func MessagingMessageID(val string) attribute.KeyValue { + return MessagingMessageIDKey.String(val) +} + +// MessagingMessageConversationID returns an attribute KeyValue conforming +// to the "messaging.message.conversation_id" semantic conventions. It +// represents the [conversation ID](#conversations) identifying the +// conversation to which the message belongs, represented as a string. +// Sometimes called "Correlation ID". +func MessagingMessageConversationID(val string) attribute.KeyValue { + return MessagingMessageConversationIDKey.String(val) +} + +// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming +// to the "messaging.message.payload_size_bytes" semantic conventions. It +// represents the (uncompressed) size of the message payload in bytes. Also use +// this attribute if it is unknown whether the compressed or uncompressed +// payload size is reported. +func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue { + return MessagingMessagePayloadSizeBytesKey.Int(val) +} + +// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue +// conforming to the "messaging.message.payload_compressed_size_bytes" semantic +// conventions. It represents the compressed size of the message payload in +// bytes. +func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue { + return MessagingMessagePayloadCompressedSizeBytesKey.Int(val) +} + +// Semantic convention for attributes that describe messaging destination on +// broker +const ( + // MessagingDestinationNameKey is the attribute Key conforming to the + // "messaging.destination.name" semantic conventions. It represents the + // message destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MyQueue', 'MyTopic' + // Note: Destination name SHOULD uniquely identify a specific queue, topic + // or other entity within the broker. If + // the broker does not have such notion, the destination name SHOULD + // uniquely identify the broker. + MessagingDestinationNameKey = attribute.Key("messaging.destination.name") + + // MessagingDestinationTemplateKey is the attribute Key conforming to the + // "messaging.destination.template" semantic conventions. It represents the + // low cardinality representation of the messaging destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/customers/{customerID}' + // Note: Destination names could be constructed from templates. An example + // would be a destination name involving a user name or product id. + // Although the destination name in this case is of high cardinality, the + // underlying template is of low cardinality and can be effectively used + // for grouping and aggregation. + MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") + + // MessagingDestinationTemporaryKey is the attribute Key conforming to the + // "messaging.destination.temporary" semantic conventions. It represents a + // boolean that is true if the message destination is temporary and might + // not exist anymore after messages are processed. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") + + // MessagingDestinationAnonymousKey is the attribute Key conforming to the + // "messaging.destination.anonymous" semantic conventions. It represents a + // boolean that is true if the message destination is anonymous (could be + // unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") +) + +// MessagingDestinationName returns an attribute KeyValue conforming to the +// "messaging.destination.name" semantic conventions. It represents the message +// destination name +func MessagingDestinationName(val string) attribute.KeyValue { + return MessagingDestinationNameKey.String(val) +} + +// MessagingDestinationTemplate returns an attribute KeyValue conforming to +// the "messaging.destination.template" semantic conventions. It represents the +// low cardinality representation of the messaging destination name +func MessagingDestinationTemplate(val string) attribute.KeyValue { + return MessagingDestinationTemplateKey.String(val) +} + +// MessagingDestinationTemporary returns an attribute KeyValue conforming to +// the "messaging.destination.temporary" semantic conventions. It represents a +// boolean that is true if the message destination is temporary and might not +// exist anymore after messages are processed. +func MessagingDestinationTemporary(val bool) attribute.KeyValue { + return MessagingDestinationTemporaryKey.Bool(val) +} + +// MessagingDestinationAnonymous returns an attribute KeyValue conforming to +// the "messaging.destination.anonymous" semantic conventions. It represents a +// boolean that is true if the message destination is anonymous (could be +// unnamed or have auto-generated name). +func MessagingDestinationAnonymous(val bool) attribute.KeyValue { + return MessagingDestinationAnonymousKey.Bool(val) +} + +// Attributes for RabbitMQ +const ( + // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key + // conforming to the "messaging.rabbitmq.destination.routing_key" semantic + // conventions. It represents the rabbitMQ message routing key. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If not empty.) + // Stability: stable + // Examples: 'myKey' + MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") +) + +// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue +// conforming to the "messaging.rabbitmq.destination.routing_key" semantic +// conventions. It represents the rabbitMQ message routing key. +func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { + return MessagingRabbitmqDestinationRoutingKeyKey.String(val) +} + +// Attributes for Apache Kafka +const ( + // MessagingKafkaMessageKeyKey is the attribute Key conforming to the + // "messaging.kafka.message.key" semantic conventions. It represents the + // message keys in Kafka are used for grouping alike messages to ensure + // they're processed on the same partition. They differ from + // `messaging.message.id` in that they're not unique. If the key is `null`, + // the attribute MUST NOT be set. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to + // be supplied for the attribute. If the key has no unambiguous, canonical + // string form, don't include its value. + MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") + + // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the + // "messaging.kafka.consumer.group" semantic conventions. It represents the + // name of the Kafka Consumer Group that is handling the message. Only + // applies to consumers, not producers. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'my-group' + MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") + + // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to + // the "messaging.kafka.destination.partition" semantic conventions. It + // represents the partition the message is sent to. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 2 + MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") + + // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the + // "messaging.kafka.message.offset" semantic conventions. It represents the + // offset of a record in the corresponding Kafka partition. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 42 + MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") + + // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the + // "messaging.kafka.message.tombstone" semantic conventions. It represents + // a boolean that is true if the message is a tombstone. + // + // Type: boolean + // RequirementLevel: ConditionallyRequired (If value is `true`. When + // missing, the value is assumed to be `false`.) + // Stability: stable + MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") +) + +// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the +// "messaging.kafka.message.key" semantic conventions. It represents the +// message keys in Kafka are used for grouping alike messages to ensure they're +// processed on the same partition. They differ from `messaging.message.id` in +// that they're not unique. If the key is `null`, the attribute MUST NOT be +// set. +func MessagingKafkaMessageKey(val string) attribute.KeyValue { + return MessagingKafkaMessageKeyKey.String(val) +} + +// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to +// the "messaging.kafka.consumer.group" semantic conventions. It represents the +// name of the Kafka Consumer Group that is handling the message. Only applies +// to consumers, not producers. +func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { + return MessagingKafkaConsumerGroupKey.String(val) +} + +// MessagingKafkaDestinationPartition returns an attribute KeyValue +// conforming to the "messaging.kafka.destination.partition" semantic +// conventions. It represents the partition the message is sent to. +func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { + return MessagingKafkaDestinationPartitionKey.Int(val) +} + +// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to +// the "messaging.kafka.message.offset" semantic conventions. It represents the +// offset of a record in the corresponding Kafka partition. +func MessagingKafkaMessageOffset(val int) attribute.KeyValue { + return MessagingKafkaMessageOffsetKey.Int(val) +} + +// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming +// to the "messaging.kafka.message.tombstone" semantic conventions. It +// represents a boolean that is true if the message is a tombstone. +func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { + return MessagingKafkaMessageTombstoneKey.Bool(val) +} + +// Attributes for Apache RocketMQ +const ( + // MessagingRocketmqNamespaceKey is the attribute Key conforming to the + // "messaging.rocketmq.namespace" semantic conventions. It represents the + // namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myNamespace' + MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + + // MessagingRocketmqClientGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.client_group" semantic conventions. It represents + // the name of the RocketMQ producer/consumer group that is handling the + // message. The client type is identified by the SpanKind. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myConsumerGroup' + MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") + + // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delivery_timestamp" + // semantic conventions. It represents the timestamp in milliseconds that + // the delay message is expected to be delivered to consumer. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If the message type is delay + // and delay time level is not specified.) + // Stability: stable + // Examples: 1665987217045 + MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") + + // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delay_time_level" semantic + // conventions. It represents the delay time level for delay message, which + // determines the message delay time. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If the message type is delay + // and delivery timestamp is not specified.) + // Stability: stable + // Examples: 3 + MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") + + // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.message.group" semantic conventions. It represents + // the it is essential for FIFO message. Messages that belong to the same + // message group are always processed one by one within the same consumer + // group. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If the message type is FIFO.) + // Stability: stable + // Examples: 'myMessageGroup' + MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") + + // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the + // "messaging.rocketmq.message.type" semantic conventions. It represents + // the type of message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") + + // MessagingRocketmqMessageTagKey is the attribute Key conforming to the + // "messaging.rocketmq.message.tag" semantic conventions. It represents the + // secondary classifier of message besides topic. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'tagA' + MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") + + // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the + // "messaging.rocketmq.message.keys" semantic conventions. It represents + // the key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'keyA', 'keyB' + MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") + + // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to + // the "messaging.rocketmq.consumption_model" semantic conventions. It + // represents the model of message consumption. This only applies to + // consumer spans. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") +) + +var ( + // Normal message + MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + // FIFO message + MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + // Delay message + MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + // Transaction message + MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") +) + +var ( + // Clustering consumption model + MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + // Broadcasting consumption model + MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") +) + +// MessagingRocketmqNamespace returns an attribute KeyValue conforming to +// the "messaging.rocketmq.namespace" semantic conventions. It represents the +// namespace of RocketMQ resources, resources in different namespaces are +// individual. +func MessagingRocketmqNamespace(val string) attribute.KeyValue { + return MessagingRocketmqNamespaceKey.String(val) +} + +// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.client_group" semantic conventions. It represents +// the name of the RocketMQ producer/consumer group that is handling the +// message. The client type is identified by the SpanKind. +func MessagingRocketmqClientGroup(val string) attribute.KeyValue { + return MessagingRocketmqClientGroupKey.String(val) +} + +// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic +// conventions. It represents the timestamp in milliseconds that the delay +// message is expected to be delivered to consumer. +func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { + return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) +} + +// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delay_time_level" semantic +// conventions. It represents the delay time level for delay message, which +// determines the message delay time. +func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { + return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) +} + +// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.group" semantic conventions. It represents +// the it is essential for FIFO message. Messages that belong to the same +// message group are always processed one by one within the same consumer +// group. +func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { + return MessagingRocketmqMessageGroupKey.String(val) +} + +// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.tag" semantic conventions. It represents the +// secondary classifier of message besides topic. +func MessagingRocketmqMessageTag(val string) attribute.KeyValue { + return MessagingRocketmqMessageTagKey.String(val) +} + +// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.keys" semantic conventions. It represents +// the key(s) of message, another way to mark message besides message id. +func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { + return MessagingRocketmqMessageKeysKey.StringSlice(val) +} + +// Attributes describing URL. +const ( + // URLSchemeKey is the attribute Key conforming to the "url.scheme" + // semantic conventions. It represents the [URI + // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component + // identifying the used protocol. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'https', 'ftp', 'telnet' + URLSchemeKey = attribute.Key("url.scheme") + + // URLFullKey is the attribute Key conforming to the "url.full" semantic + // conventions. It represents the absolute URL describing a network + // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', + // '//localhost' + // Note: For network calls, URL usually has + // `scheme://host[:port][path][?query][#fragment]` format, where the + // fragment is not transmitted over HTTP, but if it is known, it should be + // included nevertheless. + // `url.full` MUST NOT contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case username and + // password should be redacted and attribute's value should be + // `https://REDACTED:REDACTED@www.example.com/`. + // `url.full` SHOULD capture the absolute URL when it is available (or can + // be reconstructed) and SHOULD NOT be validated or modified except for + // sanitizing purposes. + URLFullKey = attribute.Key("url.full") + + // URLPathKey is the attribute Key conforming to the "url.path" semantic + // conventions. It represents the [URI + // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/search' + // Note: When missing, the value is assumed to be `/` + URLPathKey = attribute.Key("url.path") + + // URLQueryKey is the attribute Key conforming to the "url.query" semantic + // conventions. It represents the [URI + // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'q=OpenTelemetry' + // Note: Sensitive content provided in query string SHOULD be scrubbed when + // instrumentations can identify it. + URLQueryKey = attribute.Key("url.query") + + // URLFragmentKey is the attribute Key conforming to the "url.fragment" + // semantic conventions. It represents the [URI + // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'SemConv' + URLFragmentKey = attribute.Key("url.fragment") +) + +// URLScheme returns an attribute KeyValue conforming to the "url.scheme" +// semantic conventions. It represents the [URI +// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component +// identifying the used protocol. +func URLScheme(val string) attribute.KeyValue { + return URLSchemeKey.String(val) +} + +// URLFull returns an attribute KeyValue conforming to the "url.full" +// semantic conventions. It represents the absolute URL describing a network +// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) +func URLFull(val string) attribute.KeyValue { + return URLFullKey.String(val) +} + +// URLPath returns an attribute KeyValue conforming to the "url.path" +// semantic conventions. It represents the [URI +// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component +func URLPath(val string) attribute.KeyValue { + return URLPathKey.String(val) +} + +// URLQuery returns an attribute KeyValue conforming to the "url.query" +// semantic conventions. It represents the [URI +// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component +func URLQuery(val string) attribute.KeyValue { + return URLQueryKey.String(val) +} + +// URLFragment returns an attribute KeyValue conforming to the +// "url.fragment" semantic conventions. It represents the [URI +// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component +func URLFragment(val string) attribute.KeyValue { + return URLFragmentKey.String(val) +} + +// Describes user-agent attributes. +const ( + // UserAgentOriginalKey is the attribute Key conforming to the + // "user_agent.original" semantic conventions. It represents the value of + // the [HTTP + // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) + // header sent by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' + UserAgentOriginalKey = attribute.Key("user_agent.original") +) + +// UserAgentOriginal returns an attribute KeyValue conforming to the +// "user_agent.original" semantic conventions. It represents the value of the +// [HTTP +// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) +// header sent by the client. +func UserAgentOriginal(val string) attribute.KeyValue { + return UserAgentOriginalKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/doc.go new file mode 100644 index 000000000..461331a55 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the v1.21.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/event.go new file mode 100644 index 000000000..c09d9317e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/event.go @@ -0,0 +1,188 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" + +import "go.opentelemetry.io/otel/attribute" + +// This semantic convention defines the attributes used to represent a feature +// flag evaluation as an event. +const ( + // FeatureFlagKeyKey is the attribute Key conforming to the + // "feature_flag.key" semantic conventions. It represents the unique + // identifier of the feature flag. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'logo-color' + FeatureFlagKeyKey = attribute.Key("feature_flag.key") + + // FeatureFlagProviderNameKey is the attribute Key conforming to the + // "feature_flag.provider_name" semantic conventions. It represents the + // name of the service provider that performs the flag evaluation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'Flag Manager' + FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") + + // FeatureFlagVariantKey is the attribute Key conforming to the + // "feature_flag.variant" semantic conventions. It represents the sHOULD be + // a semantic identifier for a value. If one is unavailable, a stringified + // version of the value can be used. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides + // a means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant `red` maybe be used for the value `#c05543`. + // + // A stringified version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + FeatureFlagVariantKey = attribute.Key("feature_flag.variant") +) + +// FeatureFlagKey returns an attribute KeyValue conforming to the +// "feature_flag.key" semantic conventions. It represents the unique identifier +// of the feature flag. +func FeatureFlagKey(val string) attribute.KeyValue { + return FeatureFlagKeyKey.String(val) +} + +// FeatureFlagProviderName returns an attribute KeyValue conforming to the +// "feature_flag.provider_name" semantic conventions. It represents the name of +// the service provider that performs the flag evaluation. +func FeatureFlagProviderName(val string) attribute.KeyValue { + return FeatureFlagProviderNameKey.String(val) +} + +// FeatureFlagVariant returns an attribute KeyValue conforming to the +// "feature_flag.variant" semantic conventions. It represents the sHOULD be a +// semantic identifier for a value. If one is unavailable, a stringified +// version of the value can be used. +func FeatureFlagVariant(val string) attribute.KeyValue { + return FeatureFlagVariantKey.String(val) +} + +// RPC received/sent message. +const ( + // MessageTypeKey is the attribute Key conforming to the "message.type" + // semantic conventions. It represents the whether this is a received or + // sent message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + MessageTypeKey = attribute.Key("message.type") + + // MessageIDKey is the attribute Key conforming to the "message.id" + // semantic conventions. It represents the mUST be calculated as two + // different counters starting from `1` one for sent messages and one for + // received message. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Note: This way we guarantee that the values will be consistent between + // different implementations. + MessageIDKey = attribute.Key("message.id") + + // MessageCompressedSizeKey is the attribute Key conforming to the + // "message.compressed_size" semantic conventions. It represents the + // compressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + MessageCompressedSizeKey = attribute.Key("message.compressed_size") + + // MessageUncompressedSizeKey is the attribute Key conforming to the + // "message.uncompressed_size" semantic conventions. It represents the + // uncompressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") +) + +var ( + // sent + MessageTypeSent = MessageTypeKey.String("SENT") + // received + MessageTypeReceived = MessageTypeKey.String("RECEIVED") +) + +// MessageID returns an attribute KeyValue conforming to the "message.id" +// semantic conventions. It represents the mUST be calculated as two different +// counters starting from `1` one for sent messages and one for received +// message. +func MessageID(val int) attribute.KeyValue { + return MessageIDKey.Int(val) +} + +// MessageCompressedSize returns an attribute KeyValue conforming to the +// "message.compressed_size" semantic conventions. It represents the compressed +// size of the message in bytes. +func MessageCompressedSize(val int) attribute.KeyValue { + return MessageCompressedSizeKey.Int(val) +} + +// MessageUncompressedSize returns an attribute KeyValue conforming to the +// "message.uncompressed_size" semantic conventions. It represents the +// uncompressed size of the message in bytes. +func MessageUncompressedSize(val int) attribute.KeyValue { + return MessageUncompressedSizeKey.Int(val) +} + +// The attributes used to report a single exception associated with a span. +const ( + // ExceptionEscapedKey is the attribute Key conforming to the + // "exception.escaped" semantic conventions. It represents the sHOULD be + // set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Note: An exception is considered to have escaped (or left) the scope of + // a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's `__exit__` method in Python) but will + // usually be caught at the point of recording the exception in most + // languages. + // + // It is usually not possible to determine at the point where an exception + // is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending + // the span, + // as done in the [example above](#recording-an-exception). + // + // It follows that an exception may still escape the scope of the span + // even if the `exception.escaped` attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + ExceptionEscapedKey = attribute.Key("exception.escaped") +) + +// ExceptionEscaped returns an attribute KeyValue conforming to the +// "exception.escaped" semantic conventions. It represents the sHOULD be set to +// true if the exception event is recorded at a point where it is known that +// the exception is escaping the scope of the span. +func ExceptionEscaped(val bool) attribute.KeyValue { + return ExceptionEscapedKey.Bool(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/exception.go new file mode 100644 index 000000000..5184ee339 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/exception.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" + +const ( + // ExceptionEventName is the name of the Span event representing an exception. + ExceptionEventName = "exception" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/resource.go new file mode 100644 index 000000000..f7aaa50b9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/resource.go @@ -0,0 +1,2299 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" + +import "go.opentelemetry.io/otel/attribute" + +// The web browser in which the application represented by the resource is +// running. The `browser.*` attributes MUST be used only for resources that +// represent applications running in a web browser (regardless of whether +// running on a mobile or desktop device). +const ( + // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" + // semantic conventions. It represents the array of brand name and version + // separated by a space + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.brands`). + BrowserBrandsKey = attribute.Key("browser.brands") + + // BrowserPlatformKey is the attribute Key conforming to the + // "browser.platform" semantic conventions. It represents the platform on + // which the browser is running + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.platform`). If unavailable, the legacy + // `navigator.platform` API SHOULD NOT be used instead and this attribute + // SHOULD be left unset in order for the values to be consistent. + // The list of possible values is defined in the [W3C User-Agent Client + // Hints + // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). + // Note that some (but not all) of these values can overlap with values in + // the [`os.type` and `os.name` attributes](./os.md). However, for + // consistency, the values in the `browser.platform` attribute should + // capture the exact value that the user agent provides. + BrowserPlatformKey = attribute.Key("browser.platform") + + // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" + // semantic conventions. It represents a boolean that is true if the + // browser is running on a mobile device + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.mobile`). If unavailable, this attribute + // SHOULD be left unset. + BrowserMobileKey = attribute.Key("browser.mobile") + + // BrowserLanguageKey is the attribute Key conforming to the + // "browser.language" semantic conventions. It represents the preferred + // language of the user using the browser + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // `navigator.language`. + BrowserLanguageKey = attribute.Key("browser.language") +) + +// BrowserBrands returns an attribute KeyValue conforming to the +// "browser.brands" semantic conventions. It represents the array of brand name +// and version separated by a space +func BrowserBrands(val ...string) attribute.KeyValue { + return BrowserBrandsKey.StringSlice(val) +} + +// BrowserPlatform returns an attribute KeyValue conforming to the +// "browser.platform" semantic conventions. It represents the platform on which +// the browser is running +func BrowserPlatform(val string) attribute.KeyValue { + return BrowserPlatformKey.String(val) +} + +// BrowserMobile returns an attribute KeyValue conforming to the +// "browser.mobile" semantic conventions. It represents a boolean that is true +// if the browser is running on a mobile device +func BrowserMobile(val bool) attribute.KeyValue { + return BrowserMobileKey.Bool(val) +} + +// BrowserLanguage returns an attribute KeyValue conforming to the +// "browser.language" semantic conventions. It represents the preferred +// language of the user using the browser +func BrowserLanguage(val string) attribute.KeyValue { + return BrowserLanguageKey.String(val) +} + +// A cloud environment (e.g. GCP, Azure, AWS) +const ( + // CloudProviderKey is the attribute Key conforming to the "cloud.provider" + // semantic conventions. It represents the name of the cloud provider. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + CloudProviderKey = attribute.Key("cloud.provider") + + // CloudAccountIDKey is the attribute Key conforming to the + // "cloud.account.id" semantic conventions. It represents the cloud account + // ID the resource is assigned to. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '111111111111', 'opentelemetry' + CloudAccountIDKey = attribute.Key("cloud.account.id") + + // CloudRegionKey is the attribute Key conforming to the "cloud.region" + // semantic conventions. It represents the geographical region the resource + // is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for + // example [Alibaba Cloud + // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS + // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), + // [Azure + // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), + // [Google Cloud regions](https://cloud.google.com/about/locations), or + // [Tencent Cloud + // regions](https://www.tencentcloud.com/document/product/213/6091). + CloudRegionKey = attribute.Key("cloud.region") + + // CloudResourceIDKey is the attribute Key conforming to the + // "cloud.resource_id" semantic conventions. It represents the cloud + // provider-specific native identifier of the monitored cloud resource + // (e.g. an + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // on AWS, a [fully qualified resource + // ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) + // on Azure, a [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // on GCP) + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', + // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', + // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' + // Note: On some cloud providers, it may not be possible to determine the + // full ID at startup, + // so it may be necessary to set `cloud.resource_id` as a span attribute + // instead. + // + // The exact value to use for `cloud.resource_id` depends on the cloud + // provider. + // The following well-known definitions MUST be used if you set this + // attribute and they apply: + // + // * **AWS Lambda:** The function + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + // Take care not to use the "invoked ARN" directly but replace any + // [alias + // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) + // with the resolved function version, as the same runtime instance may + // be invokable with + // multiple different aliases. + // * **GCP:** The [URI of the + // resource](https://cloud.google.com/iam/docs/full-resource-names) + // * **Azure:** The [Fully Qualified Resource + // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) + // of the invoked function, + // *not* the function app, having the form + // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider. + CloudResourceIDKey = attribute.Key("cloud.resource_id") + + // CloudAvailabilityZoneKey is the attribute Key conforming to the + // "cloud.availability_zone" semantic conventions. It represents the cloud + // regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the + // resource is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and Google + // Cloud. + CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") + + // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" + // semantic conventions. It represents the cloud platform in use. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Note: The prefix of the service SHOULD match the one specified in + // `cloud.provider`. + CloudPlatformKey = attribute.Key("cloud.platform") +) + +var ( + // Alibaba Cloud + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + CloudProviderGCP = CloudProviderKey.String("gcp") + // Heroku Platform as a Service + CloudProviderHeroku = CloudProviderKey.String("heroku") + // IBM Cloud + CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") + // Tencent Cloud + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") +) + +var ( + // Alibaba Cloud Elastic Compute Service + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + // Red Hat OpenShift on Alibaba Cloud + CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") + // AWS Elastic Compute Cloud + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Red Hat OpenShift on AWS (ROSA) + CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") + // Azure Virtual Machines + CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") + // Azure Container Instances + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") + // Azure Kubernetes Service + CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") + // Azure Functions + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") + // Azure App Service + CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") + // Azure Red Hat OpenShift + CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") + // Google Bare Metal Solution (BMS) + CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") + // Google Cloud Compute Engine (GCE) + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Red Hat OpenShift on Google Cloud + CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") + // Red Hat OpenShift on IBM Cloud + CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") + // Tencent Cloud Cloud Virtual Machine (CVM) + CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") +) + +// CloudAccountID returns an attribute KeyValue conforming to the +// "cloud.account.id" semantic conventions. It represents the cloud account ID +// the resource is assigned to. +func CloudAccountID(val string) attribute.KeyValue { + return CloudAccountIDKey.String(val) +} + +// CloudRegion returns an attribute KeyValue conforming to the +// "cloud.region" semantic conventions. It represents the geographical region +// the resource is running. +func CloudRegion(val string) attribute.KeyValue { + return CloudRegionKey.String(val) +} + +// CloudResourceID returns an attribute KeyValue conforming to the +// "cloud.resource_id" semantic conventions. It represents the cloud +// provider-specific native identifier of the monitored cloud resource (e.g. an +// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// on AWS, a [fully qualified resource +// ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) +// on Azure, a [full resource +// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) +// on GCP) +func CloudResourceID(val string) attribute.KeyValue { + return CloudResourceIDKey.String(val) +} + +// CloudAvailabilityZone returns an attribute KeyValue conforming to the +// "cloud.availability_zone" semantic conventions. It represents the cloud +// regions often have multiple, isolated locations known as zones to increase +// availability. Availability zone represents the zone where the resource is +// running. +func CloudAvailabilityZone(val string) attribute.KeyValue { + return CloudAvailabilityZoneKey.String(val) +} + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // AWSECSContainerARNKey is the attribute Key conforming to the + // "aws.ecs.container.arn" semantic conventions. It represents the Amazon + // Resource Name (ARN) of an [ECS container + // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") + + // AWSECSClusterARNKey is the attribute Key conforming to the + // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an + // [ECS + // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") + + // AWSECSLaunchtypeKey is the attribute Key conforming to the + // "aws.ecs.launchtype" semantic conventions. It represents the [launch + // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // for an ECS task. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") + + // AWSECSTaskARNKey is the attribute Key conforming to the + // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an + // [ECS task + // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") + + // AWSECSTaskFamilyKey is the attribute Key conforming to the + // "aws.ecs.task.family" semantic conventions. It represents the task + // definition family this task definition is a member of. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-family' + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + + // AWSECSTaskRevisionKey is the attribute Key conforming to the + // "aws.ecs.task.revision" semantic conventions. It represents the revision + // for this task definition. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '8', '26' + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") +) + +var ( + // ec2 + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // fargate + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// AWSECSContainerARN returns an attribute KeyValue conforming to the +// "aws.ecs.container.arn" semantic conventions. It represents the Amazon +// Resource Name (ARN) of an [ECS container +// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +func AWSECSContainerARN(val string) attribute.KeyValue { + return AWSECSContainerARNKey.String(val) +} + +// AWSECSClusterARN returns an attribute KeyValue conforming to the +// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS +// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +func AWSECSClusterARN(val string) attribute.KeyValue { + return AWSECSClusterARNKey.String(val) +} + +// AWSECSTaskARN returns an attribute KeyValue conforming to the +// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS +// task +// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). +func AWSECSTaskARN(val string) attribute.KeyValue { + return AWSECSTaskARNKey.String(val) +} + +// AWSECSTaskFamily returns an attribute KeyValue conforming to the +// "aws.ecs.task.family" semantic conventions. It represents the task +// definition family this task definition is a member of. +func AWSECSTaskFamily(val string) attribute.KeyValue { + return AWSECSTaskFamilyKey.String(val) +} + +// AWSECSTaskRevision returns an attribute KeyValue conforming to the +// "aws.ecs.task.revision" semantic conventions. It represents the revision for +// this task definition. +func AWSECSTaskRevision(val string) attribute.KeyValue { + return AWSECSTaskRevisionKey.String(val) +} + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // AWSEKSClusterARNKey is the attribute Key conforming to the + // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an + // EKS cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") +) + +// AWSEKSClusterARN returns an attribute KeyValue conforming to the +// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS +// cluster. +func AWSEKSClusterARN(val string) attribute.KeyValue { + return AWSEKSClusterARNKey.String(val) +} + +// Resources specific to Amazon Web Services. +const ( + // AWSLogGroupNamesKey is the attribute Key conforming to the + // "aws.log.group.names" semantic conventions. It represents the name(s) of + // the AWS log group(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like + // multi-container applications, where a single application has sidecar + // containers, and each write to their own log group. + AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") + + // AWSLogGroupARNsKey is the attribute Key conforming to the + // "aws.log.group.arns" semantic conventions. It represents the Amazon + // Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the [log group ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") + + // AWSLogStreamNamesKey is the attribute Key conforming to the + // "aws.log.stream.names" semantic conventions. It represents the name(s) + // of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") + + // AWSLogStreamARNsKey is the attribute Key conforming to the + // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of + // the AWS log stream(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the [log stream ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + // One log group can contain several log streams, so these ARNs necessarily + // identify both a log group and a log stream. + AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") +) + +// AWSLogGroupNames returns an attribute KeyValue conforming to the +// "aws.log.group.names" semantic conventions. It represents the name(s) of the +// AWS log group(s) an application is writing to. +func AWSLogGroupNames(val ...string) attribute.KeyValue { + return AWSLogGroupNamesKey.StringSlice(val) +} + +// AWSLogGroupARNs returns an attribute KeyValue conforming to the +// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource +// Name(s) (ARN) of the AWS log group(s). +func AWSLogGroupARNs(val ...string) attribute.KeyValue { + return AWSLogGroupARNsKey.StringSlice(val) +} + +// AWSLogStreamNames returns an attribute KeyValue conforming to the +// "aws.log.stream.names" semantic conventions. It represents the name(s) of +// the AWS log stream(s) an application is writing to. +func AWSLogStreamNames(val ...string) attribute.KeyValue { + return AWSLogStreamNamesKey.StringSlice(val) +} + +// AWSLogStreamARNs returns an attribute KeyValue conforming to the +// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the +// AWS log stream(s). +func AWSLogStreamARNs(val ...string) attribute.KeyValue { + return AWSLogStreamARNsKey.StringSlice(val) +} + +// Resource used by Google Cloud Run. +const ( + // GCPCloudRunJobExecutionKey is the attribute Key conforming to the + // "gcp.cloud_run.job.execution" semantic conventions. It represents the + // name of the Cloud Run + // [execution](https://cloud.google.com/run/docs/managing/job-executions) + // being run for the Job, as set by the + // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) + // environment variable. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'job-name-xxxx', 'sample-job-mdw84' + GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") + + // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the + // "gcp.cloud_run.job.task_index" semantic conventions. It represents the + // index for a task within an execution as provided by the + // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) + // environment variable. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 0, 1 + GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") +) + +// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.execution" semantic conventions. It represents the name +// of the Cloud Run +// [execution](https://cloud.google.com/run/docs/managing/job-executions) being +// run for the Job, as set by the +// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) +// environment variable. +func GCPCloudRunJobExecution(val string) attribute.KeyValue { + return GCPCloudRunJobExecutionKey.String(val) +} + +// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index +// for a task within an execution as provided by the +// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) +// environment variable. +func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { + return GCPCloudRunJobTaskIndexKey.Int(val) +} + +// Resources used by Google Compute Engine (GCE). +const ( + // GCPGceInstanceNameKey is the attribute Key conforming to the + // "gcp.gce.instance.name" semantic conventions. It represents the instance + // name of a GCE instance. This is the value provided by `host.name`, the + // visible name of the instance in the Cloud Console UI, and the prefix for + // the default hostname of the instance as defined by the [default internal + // DNS + // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'instance-1', 'my-vm-name' + GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") + + // GCPGceInstanceHostnameKey is the attribute Key conforming to the + // "gcp.gce.instance.hostname" semantic conventions. It represents the + // hostname of a GCE instance. This is the full value of the default or + // [custom + // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'my-host1234.example.com', + // 'sample-vm.us-west1-b.c.my-project.internal' + GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") +) + +// GCPGceInstanceName returns an attribute KeyValue conforming to the +// "gcp.gce.instance.name" semantic conventions. It represents the instance +// name of a GCE instance. This is the value provided by `host.name`, the +// visible name of the instance in the Cloud Console UI, and the prefix for the +// default hostname of the instance as defined by the [default internal DNS +// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). +func GCPGceInstanceName(val string) attribute.KeyValue { + return GCPGceInstanceNameKey.String(val) +} + +// GCPGceInstanceHostname returns an attribute KeyValue conforming to the +// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname +// of a GCE instance. This is the full value of the default or [custom +// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). +func GCPGceInstanceHostname(val string) attribute.KeyValue { + return GCPGceInstanceHostnameKey.String(val) +} + +// Heroku dyno metadata +const ( + // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the + // "heroku.release.creation_timestamp" semantic conventions. It represents + // the time and date the release was created + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2022-10-23T18:00:42Z' + HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") + + // HerokuReleaseCommitKey is the attribute Key conforming to the + // "heroku.release.commit" semantic conventions. It represents the commit + // hash for the current release + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") + + // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" + // semantic conventions. It represents the unique identifier for the + // application + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + HerokuAppIDKey = attribute.Key("heroku.app.id") +) + +// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming +// to the "heroku.release.creation_timestamp" semantic conventions. It +// represents the time and date the release was created +func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { + return HerokuReleaseCreationTimestampKey.String(val) +} + +// HerokuReleaseCommit returns an attribute KeyValue conforming to the +// "heroku.release.commit" semantic conventions. It represents the commit hash +// for the current release +func HerokuReleaseCommit(val string) attribute.KeyValue { + return HerokuReleaseCommitKey.String(val) +} + +// HerokuAppID returns an attribute KeyValue conforming to the +// "heroku.app.id" semantic conventions. It represents the unique identifier +// for the application +func HerokuAppID(val string) attribute.KeyValue { + return HerokuAppIDKey.String(val) +} + +// A container instance. +const ( + // ContainerNameKey is the attribute Key conforming to the "container.name" + // semantic conventions. It represents the container name used by container + // runtime. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-autoconf' + ContainerNameKey = attribute.Key("container.name") + + // ContainerIDKey is the attribute Key conforming to the "container.id" + // semantic conventions. It represents the container ID. Usually a UUID, as + // for example used to [identify Docker + // containers](https://docs.docker.com/engine/reference/run/#container-identification). + // The UUID might be abbreviated. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'a3bf90e006b2' + ContainerIDKey = attribute.Key("container.id") + + // ContainerRuntimeKey is the attribute Key conforming to the + // "container.runtime" semantic conventions. It represents the container + // runtime managing this container. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'docker', 'containerd', 'rkt' + ContainerRuntimeKey = attribute.Key("container.runtime") + + // ContainerImageNameKey is the attribute Key conforming to the + // "container.image.name" semantic conventions. It represents the name of + // the image the container was built on. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'gcr.io/opentelemetry/operator' + ContainerImageNameKey = attribute.Key("container.image.name") + + // ContainerImageTagKey is the attribute Key conforming to the + // "container.image.tag" semantic conventions. It represents the container + // image tag. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '0.1' + ContainerImageTagKey = attribute.Key("container.image.tag") + + // ContainerImageIDKey is the attribute Key conforming to the + // "container.image.id" semantic conventions. It represents the runtime + // specific image identifier. Usually a hash algorithm followed by a UUID. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' + // Note: Docker defines a sha256 of the image id; `container.image.id` + // corresponds to the `Image` field from the Docker container inspect + // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) + // endpoint. + // K8S defines a link to the container registry repository with digest + // `"imageID": "registry.azurecr.io + // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. + // OCI defines a digest of manifest. + ContainerImageIDKey = attribute.Key("container.image.id") + + // ContainerCommandKey is the attribute Key conforming to the + // "container.command" semantic conventions. It represents the command used + // to run the container (i.e. the command name). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'otelcontribcol' + // Note: If using embedded credentials or sensitive data, it is recommended + // to remove them to prevent potential leakage. + ContainerCommandKey = attribute.Key("container.command") + + // ContainerCommandLineKey is the attribute Key conforming to the + // "container.command_line" semantic conventions. It represents the full + // command run by the container as a single string representing the full + // command. [2] + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'otelcontribcol --config config.yaml' + ContainerCommandLineKey = attribute.Key("container.command_line") + + // ContainerCommandArgsKey is the attribute Key conforming to the + // "container.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) run by the + // container. [2] + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'otelcontribcol, --config, config.yaml' + ContainerCommandArgsKey = attribute.Key("container.command_args") +) + +// ContainerName returns an attribute KeyValue conforming to the +// "container.name" semantic conventions. It represents the container name used +// by container runtime. +func ContainerName(val string) attribute.KeyValue { + return ContainerNameKey.String(val) +} + +// ContainerID returns an attribute KeyValue conforming to the +// "container.id" semantic conventions. It represents the container ID. Usually +// a UUID, as for example used to [identify Docker +// containers](https://docs.docker.com/engine/reference/run/#container-identification). +// The UUID might be abbreviated. +func ContainerID(val string) attribute.KeyValue { + return ContainerIDKey.String(val) +} + +// ContainerRuntime returns an attribute KeyValue conforming to the +// "container.runtime" semantic conventions. It represents the container +// runtime managing this container. +func ContainerRuntime(val string) attribute.KeyValue { + return ContainerRuntimeKey.String(val) +} + +// ContainerImageName returns an attribute KeyValue conforming to the +// "container.image.name" semantic conventions. It represents the name of the +// image the container was built on. +func ContainerImageName(val string) attribute.KeyValue { + return ContainerImageNameKey.String(val) +} + +// ContainerImageTag returns an attribute KeyValue conforming to the +// "container.image.tag" semantic conventions. It represents the container +// image tag. +func ContainerImageTag(val string) attribute.KeyValue { + return ContainerImageTagKey.String(val) +} + +// ContainerImageID returns an attribute KeyValue conforming to the +// "container.image.id" semantic conventions. It represents the runtime +// specific image identifier. Usually a hash algorithm followed by a UUID. +func ContainerImageID(val string) attribute.KeyValue { + return ContainerImageIDKey.String(val) +} + +// ContainerCommand returns an attribute KeyValue conforming to the +// "container.command" semantic conventions. It represents the command used to +// run the container (i.e. the command name). +func ContainerCommand(val string) attribute.KeyValue { + return ContainerCommandKey.String(val) +} + +// ContainerCommandLine returns an attribute KeyValue conforming to the +// "container.command_line" semantic conventions. It represents the full +// command run by the container as a single string representing the full +// command. [2] +func ContainerCommandLine(val string) attribute.KeyValue { + return ContainerCommandLineKey.String(val) +} + +// ContainerCommandArgs returns an attribute KeyValue conforming to the +// "container.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) run by the +// container. [2] +func ContainerCommandArgs(val ...string) attribute.KeyValue { + return ContainerCommandArgsKey.StringSlice(val) +} + +// The software deployment. +const ( + // DeploymentEnvironmentKey is the attribute Key conforming to the + // "deployment.environment" semantic conventions. It represents the name of + // the [deployment + // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka + // deployment tier). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'staging', 'production' + DeploymentEnvironmentKey = attribute.Key("deployment.environment") +) + +// DeploymentEnvironment returns an attribute KeyValue conforming to the +// "deployment.environment" semantic conventions. It represents the name of the +// [deployment +// environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka +// deployment tier). +func DeploymentEnvironment(val string) attribute.KeyValue { + return DeploymentEnvironmentKey.String(val) +} + +// The device on which the process represented by this resource is running. +const ( + // DeviceIDKey is the attribute Key conforming to the "device.id" semantic + // conventions. It represents a unique identifier representing the device + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values + // outlined below. This value is not an advertising identifier and MUST NOT + // be used as such. On iOS (Swift or Objective-C), this value MUST be equal + // to the [vendor + // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). + // On Android (Java or Kotlin), this value MUST be equal to the Firebase + // Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found + // [here](https://developer.android.com/training/articles/user-data-ids) on + // best practices and exact implementation details. Caution should be taken + // when storing personal data or anything which can identify a user. GDPR + // and data protection laws may apply, ensure you do your own due + // diligence. + DeviceIDKey = attribute.Key("device.id") + + // DeviceModelIdentifierKey is the attribute Key conforming to the + // "device.model.identifier" semantic conventions. It represents the model + // identifier for the device + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine readable version + // of the model identifier rather than the market or consumer-friendly name + // of the device. + DeviceModelIdentifierKey = attribute.Key("device.model.identifier") + + // DeviceModelNameKey is the attribute Key conforming to the + // "device.model.name" semantic conventions. It represents the marketing + // name for the device model + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human readable version of + // the device model rather than a machine readable alternative. + DeviceModelNameKey = attribute.Key("device.model.name") + + // DeviceManufacturerKey is the attribute Key conforming to the + // "device.manufacturer" semantic conventions. It represents the name of + // the device manufacturer + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via + // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). + // iOS apps SHOULD hardcode the value `Apple`. + DeviceManufacturerKey = attribute.Key("device.manufacturer") +) + +// DeviceID returns an attribute KeyValue conforming to the "device.id" +// semantic conventions. It represents a unique identifier representing the +// device +func DeviceID(val string) attribute.KeyValue { + return DeviceIDKey.String(val) +} + +// DeviceModelIdentifier returns an attribute KeyValue conforming to the +// "device.model.identifier" semantic conventions. It represents the model +// identifier for the device +func DeviceModelIdentifier(val string) attribute.KeyValue { + return DeviceModelIdentifierKey.String(val) +} + +// DeviceModelName returns an attribute KeyValue conforming to the +// "device.model.name" semantic conventions. It represents the marketing name +// for the device model +func DeviceModelName(val string) attribute.KeyValue { + return DeviceModelNameKey.String(val) +} + +// DeviceManufacturer returns an attribute KeyValue conforming to the +// "device.manufacturer" semantic conventions. It represents the name of the +// device manufacturer +func DeviceManufacturer(val string) attribute.KeyValue { + return DeviceManufacturerKey.String(val) +} + +// A serverless instance. +const ( + // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic + // conventions. It represents the name of the single function that this + // runtime instance executes. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the + // FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // [`code.namespace`/`code.function`](/docs/general/general-attributes.md#source-code-attributes) + // span attributes). + // + // For some cloud providers, the above definition is ambiguous. The + // following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud + // providers/products: + // + // * **Azure:** The full name `/`, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the `cloud.resource_id` attribute). + FaaSNameKey = attribute.Key("faas.name") + + // FaaSVersionKey is the attribute Key conforming to the "faas.version" + // semantic conventions. It represents the immutable version of the + // function being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use: + // + // * **AWS Lambda:** The [function + // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + // (an integer represented as a decimal string). + // * **Google Cloud Run (Services):** The + // [revision](https://cloud.google.com/run/docs/managing/revisions) + // (i.e., the function name plus the revision suffix). + // * **Google Cloud Functions:** The value of the + // [`K_REVISION` environment + // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). + // * **Azure Functions:** Not applicable. Do not set this attribute. + FaaSVersionKey = attribute.Key("faas.version") + + // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" + // semantic conventions. It represents the execution environment ID as a + // string, that will be potentially reused for other invocations to the + // same function/function version. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note: * **AWS Lambda:** Use the (full) log stream name. + FaaSInstanceKey = attribute.Key("faas.instance") + + // FaaSMaxMemoryKey is the attribute Key conforming to the + // "faas.max_memory" semantic conventions. It represents the amount of + // memory available to the serverless function converted to Bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little + // memory can easily stop a Java AWS Lambda function from working + // correctly. On AWS Lambda, the environment variable + // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must + // be multiplied by 1,048,576). + FaaSMaxMemoryKey = attribute.Key("faas.max_memory") +) + +// FaaSName returns an attribute KeyValue conforming to the "faas.name" +// semantic conventions. It represents the name of the single function that +// this runtime instance executes. +func FaaSName(val string) attribute.KeyValue { + return FaaSNameKey.String(val) +} + +// FaaSVersion returns an attribute KeyValue conforming to the +// "faas.version" semantic conventions. It represents the immutable version of +// the function being executed. +func FaaSVersion(val string) attribute.KeyValue { + return FaaSVersionKey.String(val) +} + +// FaaSInstance returns an attribute KeyValue conforming to the +// "faas.instance" semantic conventions. It represents the execution +// environment ID as a string, that will be potentially reused for other +// invocations to the same function/function version. +func FaaSInstance(val string) attribute.KeyValue { + return FaaSInstanceKey.String(val) +} + +// FaaSMaxMemory returns an attribute KeyValue conforming to the +// "faas.max_memory" semantic conventions. It represents the amount of memory +// available to the serverless function converted to Bytes. +func FaaSMaxMemory(val int) attribute.KeyValue { + return FaaSMaxMemoryKey.Int(val) +} + +// A host is defined as a computing instance. For example, physical servers, +// virtual machines, switches or disk array. +const ( + // HostIDKey is the attribute Key conforming to the "host.id" semantic + // conventions. It represents the unique host ID. For Cloud, this must be + // the instance_id assigned by the cloud provider. For non-containerized + // systems, this should be the `machine-id`. See the table below for the + // sources to use to determine the `machine-id` based on operating system. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + HostIDKey = attribute.Key("host.id") + + // HostNameKey is the attribute Key conforming to the "host.name" semantic + // conventions. It represents the name of the host. On Unix systems, it may + // contain what the hostname command returns, or the fully qualified + // hostname, or another name specified by the user. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-test' + HostNameKey = attribute.Key("host.name") + + // HostTypeKey is the attribute Key conforming to the "host.type" semantic + // conventions. It represents the type of host. For Cloud, this must be the + // machine type. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'n1-standard-1' + HostTypeKey = attribute.Key("host.type") + + // HostArchKey is the attribute Key conforming to the "host.arch" semantic + // conventions. It represents the CPU architecture the host system is + // running on. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + HostArchKey = attribute.Key("host.arch") + + // HostImageNameKey is the attribute Key conforming to the + // "host.image.name" semantic conventions. It represents the name of the VM + // image or OS install the host was instantiated from. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + HostImageNameKey = attribute.Key("host.image.name") + + // HostImageIDKey is the attribute Key conforming to the "host.image.id" + // semantic conventions. It represents the vM image ID or host OS image ID. + // For Cloud, this value is from the provider. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ami-07b06b442921831e5' + HostImageIDKey = attribute.Key("host.image.id") + + // HostImageVersionKey is the attribute Key conforming to the + // "host.image.version" semantic conventions. It represents the version + // string of the VM image or host OS as defined in [Version + // Attributes](README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '0.1' + HostImageVersionKey = attribute.Key("host.image.version") +) + +var ( + // AMD64 + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + HostArchX86 = HostArchKey.String("x86") +) + +// HostID returns an attribute KeyValue conforming to the "host.id" semantic +// conventions. It represents the unique host ID. For Cloud, this must be the +// instance_id assigned by the cloud provider. For non-containerized systems, +// this should be the `machine-id`. See the table below for the sources to use +// to determine the `machine-id` based on operating system. +func HostID(val string) attribute.KeyValue { + return HostIDKey.String(val) +} + +// HostName returns an attribute KeyValue conforming to the "host.name" +// semantic conventions. It represents the name of the host. On Unix systems, +// it may contain what the hostname command returns, or the fully qualified +// hostname, or another name specified by the user. +func HostName(val string) attribute.KeyValue { + return HostNameKey.String(val) +} + +// HostType returns an attribute KeyValue conforming to the "host.type" +// semantic conventions. It represents the type of host. For Cloud, this must +// be the machine type. +func HostType(val string) attribute.KeyValue { + return HostTypeKey.String(val) +} + +// HostImageName returns an attribute KeyValue conforming to the +// "host.image.name" semantic conventions. It represents the name of the VM +// image or OS install the host was instantiated from. +func HostImageName(val string) attribute.KeyValue { + return HostImageNameKey.String(val) +} + +// HostImageID returns an attribute KeyValue conforming to the +// "host.image.id" semantic conventions. It represents the vM image ID or host +// OS image ID. For Cloud, this value is from the provider. +func HostImageID(val string) attribute.KeyValue { + return HostImageIDKey.String(val) +} + +// HostImageVersion returns an attribute KeyValue conforming to the +// "host.image.version" semantic conventions. It represents the version string +// of the VM image or host OS as defined in [Version +// Attributes](README.md#version-attributes). +func HostImageVersion(val string) attribute.KeyValue { + return HostImageVersionKey.String(val) +} + +// A Kubernetes Cluster. +const ( + // K8SClusterNameKey is the attribute Key conforming to the + // "k8s.cluster.name" semantic conventions. It represents the name of the + // cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-cluster' + K8SClusterNameKey = attribute.Key("k8s.cluster.name") + + // K8SClusterUIDKey is the attribute Key conforming to the + // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for + // the cluster, set to the UID of the `kube-system` namespace. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + // Note: K8S does not have support for obtaining a cluster ID. If this is + // ever + // added, we will recommend collecting the `k8s.cluster.uid` through the + // official APIs. In the meantime, we are able to use the `uid` of the + // `kube-system` namespace as a proxy for cluster ID. Read on for the + // rationale. + // + // Every object created in a K8S cluster is assigned a distinct UID. The + // `kube-system` namespace is used by Kubernetes itself and will exist + // for the lifetime of the cluster. Using the `uid` of the `kube-system` + // namespace is a reasonable proxy for the K8S ClusterID as it will only + // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + // UUIDs as standardized by + // [ISO/IEC 9834-8 and ITU-T + // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). + // Which states: + // + // > If generated according to one of the mechanisms defined in Rec. + // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + // different from all other UUIDs generated before 3603 A.D., or is + // extremely likely to be different (depending on the mechanism chosen). + // + // Therefore, UIDs between clusters should be extremely unlikely to + // conflict. + K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") +) + +// K8SClusterName returns an attribute KeyValue conforming to the +// "k8s.cluster.name" semantic conventions. It represents the name of the +// cluster. +func K8SClusterName(val string) attribute.KeyValue { + return K8SClusterNameKey.String(val) +} + +// K8SClusterUID returns an attribute KeyValue conforming to the +// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the +// cluster, set to the UID of the `kube-system` namespace. +func K8SClusterUID(val string) attribute.KeyValue { + return K8SClusterUIDKey.String(val) +} + +// A Kubernetes Node object. +const ( + // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" + // semantic conventions. It represents the name of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'node-1' + K8SNodeNameKey = attribute.Key("k8s.node.name") + + // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" + // semantic conventions. It represents the UID of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + K8SNodeUIDKey = attribute.Key("k8s.node.uid") +) + +// K8SNodeName returns an attribute KeyValue conforming to the +// "k8s.node.name" semantic conventions. It represents the name of the Node. +func K8SNodeName(val string) attribute.KeyValue { + return K8SNodeNameKey.String(val) +} + +// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" +// semantic conventions. It represents the UID of the Node. +func K8SNodeUID(val string) attribute.KeyValue { + return K8SNodeUIDKey.String(val) +} + +// A Kubernetes Namespace. +const ( + // K8SNamespaceNameKey is the attribute Key conforming to the + // "k8s.namespace.name" semantic conventions. It represents the name of the + // namespace that the pod is running in. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'default' + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") +) + +// K8SNamespaceName returns an attribute KeyValue conforming to the +// "k8s.namespace.name" semantic conventions. It represents the name of the +// namespace that the pod is running in. +func K8SNamespaceName(val string) attribute.KeyValue { + return K8SNamespaceNameKey.String(val) +} + +// A Kubernetes Pod object. +const ( + // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" + // semantic conventions. It represents the UID of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SPodUIDKey = attribute.Key("k8s.pod.uid") + + // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" + // semantic conventions. It represents the name of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry-pod-autoconf' + K8SPodNameKey = attribute.Key("k8s.pod.name") +) + +// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" +// semantic conventions. It represents the UID of the Pod. +func K8SPodUID(val string) attribute.KeyValue { + return K8SPodUIDKey.String(val) +} + +// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" +// semantic conventions. It represents the name of the Pod. +func K8SPodName(val string) attribute.KeyValue { + return K8SPodNameKey.String(val) +} + +// A container in a +// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). +const ( + // K8SContainerNameKey is the attribute Key conforming to the + // "k8s.container.name" semantic conventions. It represents the name of the + // Container from Pod specification, must be unique within a Pod. Container + // runtime usually uses different globally unique name (`container.name`). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'redis' + K8SContainerNameKey = attribute.Key("k8s.container.name") + + // K8SContainerRestartCountKey is the attribute Key conforming to the + // "k8s.container.restart_count" semantic conventions. It represents the + // number of times the container was restarted. This attribute can be used + // to identify a particular container (running or stopped) within a + // container spec. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 0, 2 + K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") +) + +// K8SContainerName returns an attribute KeyValue conforming to the +// "k8s.container.name" semantic conventions. It represents the name of the +// Container from Pod specification, must be unique within a Pod. Container +// runtime usually uses different globally unique name (`container.name`). +func K8SContainerName(val string) attribute.KeyValue { + return K8SContainerNameKey.String(val) +} + +// K8SContainerRestartCount returns an attribute KeyValue conforming to the +// "k8s.container.restart_count" semantic conventions. It represents the number +// of times the container was restarted. This attribute can be used to identify +// a particular container (running or stopped) within a container spec. +func K8SContainerRestartCount(val int) attribute.KeyValue { + return K8SContainerRestartCountKey.Int(val) +} + +// A Kubernetes ReplicaSet object. +const ( + // K8SReplicaSetUIDKey is the attribute Key conforming to the + // "k8s.replicaset.uid" semantic conventions. It represents the UID of the + // ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + + // K8SReplicaSetNameKey is the attribute Key conforming to the + // "k8s.replicaset.name" semantic conventions. It represents the name of + // the ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") +) + +// K8SReplicaSetUID returns an attribute KeyValue conforming to the +// "k8s.replicaset.uid" semantic conventions. It represents the UID of the +// ReplicaSet. +func K8SReplicaSetUID(val string) attribute.KeyValue { + return K8SReplicaSetUIDKey.String(val) +} + +// K8SReplicaSetName returns an attribute KeyValue conforming to the +// "k8s.replicaset.name" semantic conventions. It represents the name of the +// ReplicaSet. +func K8SReplicaSetName(val string) attribute.KeyValue { + return K8SReplicaSetNameKey.String(val) +} + +// A Kubernetes Deployment object. +const ( + // K8SDeploymentUIDKey is the attribute Key conforming to the + // "k8s.deployment.uid" semantic conventions. It represents the UID of the + // Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + + // K8SDeploymentNameKey is the attribute Key conforming to the + // "k8s.deployment.name" semantic conventions. It represents the name of + // the Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") +) + +// K8SDeploymentUID returns an attribute KeyValue conforming to the +// "k8s.deployment.uid" semantic conventions. It represents the UID of the +// Deployment. +func K8SDeploymentUID(val string) attribute.KeyValue { + return K8SDeploymentUIDKey.String(val) +} + +// K8SDeploymentName returns an attribute KeyValue conforming to the +// "k8s.deployment.name" semantic conventions. It represents the name of the +// Deployment. +func K8SDeploymentName(val string) attribute.KeyValue { + return K8SDeploymentNameKey.String(val) +} + +// A Kubernetes StatefulSet object. +const ( + // K8SStatefulSetUIDKey is the attribute Key conforming to the + // "k8s.statefulset.uid" semantic conventions. It represents the UID of the + // StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") + + // K8SStatefulSetNameKey is the attribute Key conforming to the + // "k8s.statefulset.name" semantic conventions. It represents the name of + // the StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") +) + +// K8SStatefulSetUID returns an attribute KeyValue conforming to the +// "k8s.statefulset.uid" semantic conventions. It represents the UID of the +// StatefulSet. +func K8SStatefulSetUID(val string) attribute.KeyValue { + return K8SStatefulSetUIDKey.String(val) +} + +// K8SStatefulSetName returns an attribute KeyValue conforming to the +// "k8s.statefulset.name" semantic conventions. It represents the name of the +// StatefulSet. +func K8SStatefulSetName(val string) attribute.KeyValue { + return K8SStatefulSetNameKey.String(val) +} + +// A Kubernetes DaemonSet object. +const ( + // K8SDaemonSetUIDKey is the attribute Key conforming to the + // "k8s.daemonset.uid" semantic conventions. It represents the UID of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") + + // K8SDaemonSetNameKey is the attribute Key conforming to the + // "k8s.daemonset.name" semantic conventions. It represents the name of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") +) + +// K8SDaemonSetUID returns an attribute KeyValue conforming to the +// "k8s.daemonset.uid" semantic conventions. It represents the UID of the +// DaemonSet. +func K8SDaemonSetUID(val string) attribute.KeyValue { + return K8SDaemonSetUIDKey.String(val) +} + +// K8SDaemonSetName returns an attribute KeyValue conforming to the +// "k8s.daemonset.name" semantic conventions. It represents the name of the +// DaemonSet. +func K8SDaemonSetName(val string) attribute.KeyValue { + return K8SDaemonSetNameKey.String(val) +} + +// A Kubernetes Job object. +const ( + // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" + // semantic conventions. It represents the UID of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SJobUIDKey = attribute.Key("k8s.job.uid") + + // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" + // semantic conventions. It represents the name of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SJobNameKey = attribute.Key("k8s.job.name") +) + +// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" +// semantic conventions. It represents the UID of the Job. +func K8SJobUID(val string) attribute.KeyValue { + return K8SJobUIDKey.String(val) +} + +// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" +// semantic conventions. It represents the name of the Job. +func K8SJobName(val string) attribute.KeyValue { + return K8SJobNameKey.String(val) +} + +// A Kubernetes CronJob object. +const ( + // K8SCronJobUIDKey is the attribute Key conforming to the + // "k8s.cronjob.uid" semantic conventions. It represents the UID of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") + + // K8SCronJobNameKey is the attribute Key conforming to the + // "k8s.cronjob.name" semantic conventions. It represents the name of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'opentelemetry' + K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") +) + +// K8SCronJobUID returns an attribute KeyValue conforming to the +// "k8s.cronjob.uid" semantic conventions. It represents the UID of the +// CronJob. +func K8SCronJobUID(val string) attribute.KeyValue { + return K8SCronJobUIDKey.String(val) +} + +// K8SCronJobName returns an attribute KeyValue conforming to the +// "k8s.cronjob.name" semantic conventions. It represents the name of the +// CronJob. +func K8SCronJobName(val string) attribute.KeyValue { + return K8SCronJobNameKey.String(val) +} + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // OSTypeKey is the attribute Key conforming to the "os.type" semantic + // conventions. It represents the operating system type. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + OSTypeKey = attribute.Key("os.type") + + // OSDescriptionKey is the attribute Key conforming to the "os.description" + // semantic conventions. It represents the human readable (not intended to + // be parsed) OS version information, like e.g. reported by `ver` or + // `lsb_release -a` commands. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 + // LTS' + OSDescriptionKey = attribute.Key("os.description") + + // OSNameKey is the attribute Key conforming to the "os.name" semantic + // conventions. It represents the human readable operating system name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'iOS', 'Android', 'Ubuntu' + OSNameKey = attribute.Key("os.name") + + // OSVersionKey is the attribute Key conforming to the "os.version" + // semantic conventions. It represents the version string of the operating + // system as defined in [Version + // Attributes](/docs/resource/README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '14.2.1', '18.04.1' + OSVersionKey = attribute.Key("os.version") +) + +var ( + // Microsoft Windows + OSTypeWindows = OSTypeKey.String("windows") + // Linux + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + OSTypeZOS = OSTypeKey.String("z_os") +) + +// OSDescription returns an attribute KeyValue conforming to the +// "os.description" semantic conventions. It represents the human readable (not +// intended to be parsed) OS version information, like e.g. reported by `ver` +// or `lsb_release -a` commands. +func OSDescription(val string) attribute.KeyValue { + return OSDescriptionKey.String(val) +} + +// OSName returns an attribute KeyValue conforming to the "os.name" semantic +// conventions. It represents the human readable operating system name. +func OSName(val string) attribute.KeyValue { + return OSNameKey.String(val) +} + +// OSVersion returns an attribute KeyValue conforming to the "os.version" +// semantic conventions. It represents the version string of the operating +// system as defined in [Version +// Attributes](/docs/resource/README.md#version-attributes). +func OSVersion(val string) attribute.KeyValue { + return OSVersionKey.String(val) +} + +// An operating system process. +const ( + // ProcessPIDKey is the attribute Key conforming to the "process.pid" + // semantic conventions. It represents the process identifier (PID). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 1234 + ProcessPIDKey = attribute.Key("process.pid") + + // ProcessParentPIDKey is the attribute Key conforming to the + // "process.parent_pid" semantic conventions. It represents the parent + // Process identifier (PID). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 111 + ProcessParentPIDKey = attribute.Key("process.parent_pid") + + // ProcessExecutableNameKey is the attribute Key conforming to the + // "process.executable.name" semantic conventions. It represents the name + // of the process executable. On Linux based systems, can be set to the + // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name + // of `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'otelcol' + ProcessExecutableNameKey = attribute.Key("process.executable.name") + + // ProcessExecutablePathKey is the attribute Key conforming to the + // "process.executable.path" semantic conventions. It represents the full + // path to the process executable. On Linux based systems, can be set to + // the target of `proc/[pid]/exe`. On Windows, can be set to the result of + // `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: '/usr/bin/cmd/otelcol' + ProcessExecutablePathKey = attribute.Key("process.executable.path") + + // ProcessCommandKey is the attribute Key conforming to the + // "process.command" semantic conventions. It represents the command used + // to launch the process (i.e. the command name). On Linux based systems, + // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can + // be set to the first parameter extracted from `GetCommandLineW`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'cmd/otelcol' + ProcessCommandKey = attribute.Key("process.command") + + // ProcessCommandLineKey is the attribute Key conforming to the + // "process.command_line" semantic conventions. It represents the full + // command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of `GetCommandLineW`. + // Do not set this if you have to assemble it just for monitoring; use + // `process.command_args` instead. + // + // Type: string + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + ProcessCommandLineKey = attribute.Key("process.command_line") + + // ProcessCommandArgsKey is the attribute Key conforming to the + // "process.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited + // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, + // this would be the full argv vector passed to `main`. + // + // Type: string[] + // RequirementLevel: ConditionallyRequired (See alternative attributes + // below.) + // Stability: stable + // Examples: 'cmd/otecol', '--config=config.yaml' + ProcessCommandArgsKey = attribute.Key("process.command_args") + + // ProcessOwnerKey is the attribute Key conforming to the "process.owner" + // semantic conventions. It represents the username of the user that owns + // the process. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'root' + ProcessOwnerKey = attribute.Key("process.owner") +) + +// ProcessPID returns an attribute KeyValue conforming to the "process.pid" +// semantic conventions. It represents the process identifier (PID). +func ProcessPID(val int) attribute.KeyValue { + return ProcessPIDKey.Int(val) +} + +// ProcessParentPID returns an attribute KeyValue conforming to the +// "process.parent_pid" semantic conventions. It represents the parent Process +// identifier (PID). +func ProcessParentPID(val int) attribute.KeyValue { + return ProcessParentPIDKey.Int(val) +} + +// ProcessExecutableName returns an attribute KeyValue conforming to the +// "process.executable.name" semantic conventions. It represents the name of +// the process executable. On Linux based systems, can be set to the `Name` in +// `proc/[pid]/status`. On Windows, can be set to the base name of +// `GetProcessImageFileNameW`. +func ProcessExecutableName(val string) attribute.KeyValue { + return ProcessExecutableNameKey.String(val) +} + +// ProcessExecutablePath returns an attribute KeyValue conforming to the +// "process.executable.path" semantic conventions. It represents the full path +// to the process executable. On Linux based systems, can be set to the target +// of `proc/[pid]/exe`. On Windows, can be set to the result of +// `GetProcessImageFileNameW`. +func ProcessExecutablePath(val string) attribute.KeyValue { + return ProcessExecutablePathKey.String(val) +} + +// ProcessCommand returns an attribute KeyValue conforming to the +// "process.command" semantic conventions. It represents the command used to +// launch the process (i.e. the command name). On Linux based systems, can be +// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to +// the first parameter extracted from `GetCommandLineW`. +func ProcessCommand(val string) attribute.KeyValue { + return ProcessCommandKey.String(val) +} + +// ProcessCommandLine returns an attribute KeyValue conforming to the +// "process.command_line" semantic conventions. It represents the full command +// used to launch the process as a single string representing the full command. +// On Windows, can be set to the result of `GetCommandLineW`. Do not set this +// if you have to assemble it just for monitoring; use `process.command_args` +// instead. +func ProcessCommandLine(val string) attribute.KeyValue { + return ProcessCommandLineKey.String(val) +} + +// ProcessCommandArgs returns an attribute KeyValue conforming to the +// "process.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) as received by +// the process. On Linux-based systems (and some other Unixoid systems +// supporting procfs), can be set according to the list of null-delimited +// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, +// this would be the full argv vector passed to `main`. +func ProcessCommandArgs(val ...string) attribute.KeyValue { + return ProcessCommandArgsKey.StringSlice(val) +} + +// ProcessOwner returns an attribute KeyValue conforming to the +// "process.owner" semantic conventions. It represents the username of the user +// that owns the process. +func ProcessOwner(val string) attribute.KeyValue { + return ProcessOwnerKey.String(val) +} + +// The single (language) runtime instance which is monitored. +const ( + // ProcessRuntimeNameKey is the attribute Key conforming to the + // "process.runtime.name" semantic conventions. It represents the name of + // the runtime of this process. For compiled native binaries, this SHOULD + // be the name of the compiler. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'OpenJDK Runtime Environment' + ProcessRuntimeNameKey = attribute.Key("process.runtime.name") + + // ProcessRuntimeVersionKey is the attribute Key conforming to the + // "process.runtime.version" semantic conventions. It represents the + // version of the runtime of this process, as returned by the runtime + // without modification. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '14.0.2' + ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") + + // ProcessRuntimeDescriptionKey is the attribute Key conforming to the + // "process.runtime.description" semantic conventions. It represents an + // additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") +) + +// ProcessRuntimeName returns an attribute KeyValue conforming to the +// "process.runtime.name" semantic conventions. It represents the name of the +// runtime of this process. For compiled native binaries, this SHOULD be the +// name of the compiler. +func ProcessRuntimeName(val string) attribute.KeyValue { + return ProcessRuntimeNameKey.String(val) +} + +// ProcessRuntimeVersion returns an attribute KeyValue conforming to the +// "process.runtime.version" semantic conventions. It represents the version of +// the runtime of this process, as returned by the runtime without +// modification. +func ProcessRuntimeVersion(val string) attribute.KeyValue { + return ProcessRuntimeVersionKey.String(val) +} + +// ProcessRuntimeDescription returns an attribute KeyValue conforming to the +// "process.runtime.description" semantic conventions. It represents an +// additional description about the runtime of the process, for example a +// specific vendor customization of the runtime environment. +func ProcessRuntimeDescription(val string) attribute.KeyValue { + return ProcessRuntimeDescriptionKey.String(val) +} + +// A service instance. +const ( + // ServiceNameKey is the attribute Key conforming to the "service.name" + // semantic conventions. It represents the logical name of the service. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled + // services. If the value was not specified, SDKs MUST fallback to + // `unknown_service:` concatenated with + // [`process.executable.name`](process.md#process), e.g. + // `unknown_service:bash`. If `process.executable.name` is not available, + // the value MUST be set to `unknown_service`. + ServiceNameKey = attribute.Key("service.name") + + // ServiceVersionKey is the attribute Key conforming to the + // "service.version" semantic conventions. It represents the version string + // of the service API or implementation. The format is not defined by these + // conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2.0.0', 'a01dbef8a' + ServiceVersionKey = attribute.Key("service.version") +) + +// ServiceName returns an attribute KeyValue conforming to the +// "service.name" semantic conventions. It represents the logical name of the +// service. +func ServiceName(val string) attribute.KeyValue { + return ServiceNameKey.String(val) +} + +// ServiceVersion returns an attribute KeyValue conforming to the +// "service.version" semantic conventions. It represents the version string of +// the service API or implementation. The format is not defined by these +// conventions. +func ServiceVersion(val string) attribute.KeyValue { + return ServiceVersionKey.String(val) +} + +// A service instance. +const ( + // ServiceNamespaceKey is the attribute Key conforming to the + // "service.namespace" semantic conventions. It represents a namespace for + // `service.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group + // of services, for example the team name that owns a group of services. + // `service.name` is expected to be unique within the same namespace. If + // `service.namespace` is not specified in the Resource then `service.name` + // is expected to be unique for all services that have no explicit + // namespace defined (so the empty/unspecified namespace is simply one more + // valid namespace). Zero-length namespace string is assumed equal to + // unspecified namespace. + ServiceNamespaceKey = attribute.Key("service.namespace") + + // ServiceInstanceIDKey is the attribute Key conforming to the + // "service.instance.id" semantic conventions. It represents the string ID + // of the service instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'my-k8s-pod-deployment-1', + // '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // `service.namespace,service.name` pair (in other words + // `service.namespace,service.name,service.instance.id` triplet MUST be + // globally unique). The ID helps to distinguish instances of the same + // service that exist at the same time (e.g. instances of a horizontally + // scaled service). It is preferable for the ID to be persistent and stay + // the same for the lifetime of the service instance, however it is + // acceptable that the ID is ephemeral and changes during important + // lifetime events for the service (e.g. service restarts). If the service + // has no inherent unique ID that can be used as the value of this + // attribute it is recommended to generate a random Version 1 or Version 4 + // RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + ServiceInstanceIDKey = attribute.Key("service.instance.id") +) + +// ServiceNamespace returns an attribute KeyValue conforming to the +// "service.namespace" semantic conventions. It represents a namespace for +// `service.name`. +func ServiceNamespace(val string) attribute.KeyValue { + return ServiceNamespaceKey.String(val) +} + +// ServiceInstanceID returns an attribute KeyValue conforming to the +// "service.instance.id" semantic conventions. It represents the string ID of +// the service instance. +func ServiceInstanceID(val string) attribute.KeyValue { + return ServiceInstanceIDKey.String(val) +} + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // TelemetrySDKNameKey is the attribute Key conforming to the + // "telemetry.sdk.name" semantic conventions. It represents the name of the + // telemetry SDK as defined above. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'opentelemetry' + // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute + // to `opentelemetry`. + // If another SDK, like a fork or a vendor-provided implementation, is + // used, this SDK MUST set the + // `telemetry.sdk.name` attribute to the fully-qualified class or module + // name of this SDK's main entry point + // or another suitable identifier depending on the language. + // The identifier `opentelemetry` is reserved and MUST NOT be used in this + // case. + // All custom identifiers SHOULD be stable across different versions of an + // implementation. + TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") + + // TelemetrySDKLanguageKey is the attribute Key conforming to the + // "telemetry.sdk.language" semantic conventions. It represents the + // language of the telemetry SDK. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") + + // TelemetrySDKVersionKey is the attribute Key conforming to the + // "telemetry.sdk.version" semantic conventions. It represents the version + // string of the telemetry SDK. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: '1.2.3' + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") +) + +var ( + // cpp + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // rust + TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") + // swift + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") + // webjs + TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") +) + +// TelemetrySDKName returns an attribute KeyValue conforming to the +// "telemetry.sdk.name" semantic conventions. It represents the name of the +// telemetry SDK as defined above. +func TelemetrySDKName(val string) attribute.KeyValue { + return TelemetrySDKNameKey.String(val) +} + +// TelemetrySDKVersion returns an attribute KeyValue conforming to the +// "telemetry.sdk.version" semantic conventions. It represents the version +// string of the telemetry SDK. +func TelemetrySDKVersion(val string) attribute.KeyValue { + return TelemetrySDKVersionKey.String(val) +} + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // TelemetryAutoVersionKey is the attribute Key conforming to the + // "telemetry.auto.version" semantic conventions. It represents the version + // string of the auto instrumentation agent, if used. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.2.3' + TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") +) + +// TelemetryAutoVersion returns an attribute KeyValue conforming to the +// "telemetry.auto.version" semantic conventions. It represents the version +// string of the auto instrumentation agent, if used. +func TelemetryAutoVersion(val string) attribute.KeyValue { + return TelemetryAutoVersionKey.String(val) +} + +// Resource describing the packaged software running the application code. Web +// engines are typically executed using process.runtime. +const ( + // WebEngineNameKey is the attribute Key conforming to the "webengine.name" + // semantic conventions. It represents the name of the web engine. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'WildFly' + WebEngineNameKey = attribute.Key("webengine.name") + + // WebEngineVersionKey is the attribute Key conforming to the + // "webengine.version" semantic conventions. It represents the version of + // the web engine. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '21.0.0' + WebEngineVersionKey = attribute.Key("webengine.version") + + // WebEngineDescriptionKey is the attribute Key conforming to the + // "webengine.description" semantic conventions. It represents the + // additional description of the web engine (e.g. detailed version and + // edition information). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - + // 2.2.2.Final' + WebEngineDescriptionKey = attribute.Key("webengine.description") +) + +// WebEngineName returns an attribute KeyValue conforming to the +// "webengine.name" semantic conventions. It represents the name of the web +// engine. +func WebEngineName(val string) attribute.KeyValue { + return WebEngineNameKey.String(val) +} + +// WebEngineVersion returns an attribute KeyValue conforming to the +// "webengine.version" semantic conventions. It represents the version of the +// web engine. +func WebEngineVersion(val string) attribute.KeyValue { + return WebEngineVersionKey.String(val) +} + +// WebEngineDescription returns an attribute KeyValue conforming to the +// "webengine.description" semantic conventions. It represents the additional +// description of the web engine (e.g. detailed version and edition +// information). +func WebEngineDescription(val string) attribute.KeyValue { + return WebEngineDescriptionKey.String(val) +} + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // OTelScopeNameKey is the attribute Key conforming to the + // "otel.scope.name" semantic conventions. It represents the name of the + // instrumentation scope - (`InstrumentationScope.Name` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'io.opentelemetry.contrib.mongodb' + OTelScopeNameKey = attribute.Key("otel.scope.name") + + // OTelScopeVersionKey is the attribute Key conforming to the + // "otel.scope.version" semantic conventions. It represents the version of + // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.0.0' + OTelScopeVersionKey = attribute.Key("otel.scope.version") +) + +// OTelScopeName returns an attribute KeyValue conforming to the +// "otel.scope.name" semantic conventions. It represents the name of the +// instrumentation scope - (`InstrumentationScope.Name` in OTLP). +func OTelScopeName(val string) attribute.KeyValue { + return OTelScopeNameKey.String(val) +} + +// OTelScopeVersion returns an attribute KeyValue conforming to the +// "otel.scope.version" semantic conventions. It represents the version of the +// instrumentation scope - (`InstrumentationScope.Version` in OTLP). +func OTelScopeVersion(val string) attribute.KeyValue { + return OTelScopeVersionKey.String(val) +} + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry +// Scope's concepts. +const ( + // OTelLibraryNameKey is the attribute Key conforming to the + // "otel.library.name" semantic conventions. It represents the deprecated, + // use the `otel.scope.name` attribute. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'io.opentelemetry.contrib.mongodb' + OTelLibraryNameKey = attribute.Key("otel.library.name") + + // OTelLibraryVersionKey is the attribute Key conforming to the + // "otel.library.version" semantic conventions. It represents the + // deprecated, use the `otel.scope.version` attribute. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '1.0.0' + OTelLibraryVersionKey = attribute.Key("otel.library.version") +) + +// OTelLibraryName returns an attribute KeyValue conforming to the +// "otel.library.name" semantic conventions. It represents the deprecated, use +// the `otel.scope.name` attribute. +func OTelLibraryName(val string) attribute.KeyValue { + return OTelLibraryNameKey.String(val) +} + +// OTelLibraryVersion returns an attribute KeyValue conforming to the +// "otel.library.version" semantic conventions. It represents the deprecated, +// use the `otel.scope.version` attribute. +func OTelLibraryVersion(val string) attribute.KeyValue { + return OTelLibraryVersionKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/schema.go new file mode 100644 index 000000000..be07217d8 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.21.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/trace.go new file mode 100644 index 000000000..55698cc44 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.21.0/trace.go @@ -0,0 +1,2484 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0" + +import "go.opentelemetry.io/otel/attribute" + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // ExceptionTypeKey is the attribute Key conforming to the "exception.type" + // semantic conventions. It represents the type of the exception (its + // fully-qualified class name, if applicable). The dynamic type of the + // exception should be preferred over the static type in languages that + // support it. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'java.net.ConnectException', 'OSError' + ExceptionTypeKey = attribute.Key("exception.type") + + // ExceptionMessageKey is the attribute Key conforming to the + // "exception.message" semantic conventions. It represents the exception + // message. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Division by zero', "Can't convert 'int' object to str + // implicitly" + ExceptionMessageKey = attribute.Key("exception.message") + + // ExceptionStacktraceKey is the attribute Key conforming to the + // "exception.stacktrace" semantic conventions. It represents a stacktrace + // as a string in the natural representation for the language runtime. The + // representation is to be determined and documented by each language SIG. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + ExceptionStacktraceKey = attribute.Key("exception.stacktrace") +) + +// ExceptionType returns an attribute KeyValue conforming to the +// "exception.type" semantic conventions. It represents the type of the +// exception (its fully-qualified class name, if applicable). The dynamic type +// of the exception should be preferred over the static type in languages that +// support it. +func ExceptionType(val string) attribute.KeyValue { + return ExceptionTypeKey.String(val) +} + +// ExceptionMessage returns an attribute KeyValue conforming to the +// "exception.message" semantic conventions. It represents the exception +// message. +func ExceptionMessage(val string) attribute.KeyValue { + return ExceptionMessageKey.String(val) +} + +// ExceptionStacktrace returns an attribute KeyValue conforming to the +// "exception.stacktrace" semantic conventions. It represents a stacktrace as a +// string in the natural representation for the language runtime. The +// representation is to be determined and documented by each language SIG. +func ExceptionStacktrace(val string) attribute.KeyValue { + return ExceptionStacktraceKey.String(val) +} + +// Span attributes used by AWS Lambda (in addition to general `faas` +// attributes). +const ( + // AWSLambdaInvokedARNKey is the attribute Key conforming to the + // "aws.lambda.invoked_arn" semantic conventions. It represents the full + // invoked ARN as provided on the `Context` passed to the function + // (`Lambda-Runtime-Invoked-Function-ARN` header on the + // `/runtime/invocation/next` applicable). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from `cloud.resource_id` if an alias is + // involved. + AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") +) + +// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the +// "aws.lambda.invoked_arn" semantic conventions. It represents the full +// invoked ARN as provided on the `Context` passed to the function +// (`Lambda-Runtime-Invoked-Function-ARN` header on the +// `/runtime/invocation/next` applicable). +func AWSLambdaInvokedARN(val string) attribute.KeyValue { + return AWSLambdaInvokedARNKey.String(val) +} + +// Attributes for CloudEvents. CloudEvents is a specification on how to define +// event data in a standard way. These attributes can be attached to spans when +// performing operations with CloudEvents, regardless of the protocol being +// used. +const ( + // CloudeventsEventIDKey is the attribute Key conforming to the + // "cloudevents.event_id" semantic conventions. It represents the + // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) + // uniquely identifies the event. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + + // CloudeventsEventSourceKey is the attribute Key conforming to the + // "cloudevents.event_source" semantic conventions. It represents the + // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) + // identifies the context in which an event happened. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'https://github.com/cloudevents', + // '/cloudevents/spec/pull/123', 'my-service' + CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + + // CloudeventsEventSpecVersionKey is the attribute Key conforming to the + // "cloudevents.event_spec_version" semantic conventions. It represents the + // [version of the CloudEvents + // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) + // which the event uses. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.0' + CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + + // CloudeventsEventTypeKey is the attribute Key conforming to the + // "cloudevents.event_type" semantic conventions. It represents the + // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) + // contains a value describing the type of event related to the originating + // occurrence. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'com.github.pull_request.opened', + // 'com.example.object.deleted.v2' + CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") + + // CloudeventsEventSubjectKey is the attribute Key conforming to the + // "cloudevents.event_subject" semantic conventions. It represents the + // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) + // of the event in the context of the event producer (identified by + // source). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'mynewfile.jpg' + CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") +) + +// CloudeventsEventID returns an attribute KeyValue conforming to the +// "cloudevents.event_id" semantic conventions. It represents the +// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) +// uniquely identifies the event. +func CloudeventsEventID(val string) attribute.KeyValue { + return CloudeventsEventIDKey.String(val) +} + +// CloudeventsEventSource returns an attribute KeyValue conforming to the +// "cloudevents.event_source" semantic conventions. It represents the +// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) +// identifies the context in which an event happened. +func CloudeventsEventSource(val string) attribute.KeyValue { + return CloudeventsEventSourceKey.String(val) +} + +// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to +// the "cloudevents.event_spec_version" semantic conventions. It represents the +// [version of the CloudEvents +// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) +// which the event uses. +func CloudeventsEventSpecVersion(val string) attribute.KeyValue { + return CloudeventsEventSpecVersionKey.String(val) +} + +// CloudeventsEventType returns an attribute KeyValue conforming to the +// "cloudevents.event_type" semantic conventions. It represents the +// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) +// contains a value describing the type of event related to the originating +// occurrence. +func CloudeventsEventType(val string) attribute.KeyValue { + return CloudeventsEventTypeKey.String(val) +} + +// CloudeventsEventSubject returns an attribute KeyValue conforming to the +// "cloudevents.event_subject" semantic conventions. It represents the +// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) +// of the event in the context of the event producer (identified by source). +func CloudeventsEventSubject(val string) attribute.KeyValue { + return CloudeventsEventSubjectKey.String(val) +} + +// Semantic conventions for the OpenTracing Shim +const ( + // OpentracingRefTypeKey is the attribute Key conforming to the + // "opentracing.ref_type" semantic conventions. It represents the + // parent-child Reference type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Note: The causal relationship between a child Span and a parent Span. + OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +var ( + // The parent Span depends on the child Span in some capacity + OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + // The parent Span does not depend in any way on the result of the child Span + OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") +) + +// The attributes used to perform database client calls. +const ( + // DBSystemKey is the attribute Key conforming to the "db.system" semantic + // conventions. It represents an identifier for the database management + // system (DBMS) product being used. See below for a list of well-known + // identifiers. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + DBSystemKey = attribute.Key("db.system") + + // DBConnectionStringKey is the attribute Key conforming to the + // "db.connection_string" semantic conventions. It represents the + // connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + DBConnectionStringKey = attribute.Key("db.connection_string") + + // DBUserKey is the attribute Key conforming to the "db.user" semantic + // conventions. It represents the username for accessing the database. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'readonly_user', 'reporting_user' + DBUserKey = attribute.Key("db.user") + + // DBJDBCDriverClassnameKey is the attribute Key conforming to the + // "db.jdbc.driver_classname" semantic conventions. It represents the + // fully-qualified class name of the [Java Database Connectivity + // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) + // driver used to connect. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") + + // DBNameKey is the attribute Key conforming to the "db.name" semantic + // conventions. It represents the this attribute is used to report the name + // of the database being accessed. For commands that switch the database, + // this should be set to the target database (even if the command fails). + // + // Type: string + // RequirementLevel: ConditionallyRequired (If applicable.) + // Stability: stable + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called + // "schema name". In case there are multiple layers that could be + // considered for database name (e.g. Oracle instance name and schema + // name), the database name to be used is the more specific layer (e.g. + // Oracle schema name). + DBNameKey = attribute.Key("db.name") + + // DBStatementKey is the attribute Key conforming to the "db.statement" + // semantic conventions. It represents the database statement being + // executed. + // + // Type: string + // RequirementLevel: Recommended (Should be collected by default only if + // there is sanitization that excludes sensitive information.) + // Stability: stable + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + DBStatementKey = attribute.Key("db.statement") + + // DBOperationKey is the attribute Key conforming to the "db.operation" + // semantic conventions. It represents the name of the operation being + // executed, e.g. the [MongoDB command + // name](https://docs.mongodb.com/manual/reference/command/#database-operations) + // such as `findAndModify`, or the SQL keyword. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If `db.statement` is not + // applicable.) + // Stability: stable + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to + // attempt any client-side parsing of `db.statement` just to get this + // property, but it should be set if the operation name is provided by the + // library being instrumented. If the SQL statement has an ambiguous + // operation, or performs more than one operation, this value may be + // omitted. + DBOperationKey = attribute.Key("db.operation") +) + +var ( + // Some other SQL database. Fallback only. See notes + DBSystemOtherSQL = DBSystemKey.String("other_sql") + // Microsoft SQL Server + DBSystemMSSQL = DBSystemKey.String("mssql") + // Microsoft SQL Server Compact + DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") + // MySQL + DBSystemMySQL = DBSystemKey.String("mysql") + // Oracle Database + DBSystemOracle = DBSystemKey.String("oracle") + // IBM DB2 + DBSystemDB2 = DBSystemKey.String("db2") + // PostgreSQL + DBSystemPostgreSQL = DBSystemKey.String("postgresql") + // Amazon Redshift + DBSystemRedshift = DBSystemKey.String("redshift") + // Apache Hive + DBSystemHive = DBSystemKey.String("hive") + // Cloudscape + DBSystemCloudscape = DBSystemKey.String("cloudscape") + // HyperSQL DataBase + DBSystemHSQLDB = DBSystemKey.String("hsqldb") + // Progress Database + DBSystemProgress = DBSystemKey.String("progress") + // SAP MaxDB + DBSystemMaxDB = DBSystemKey.String("maxdb") + // SAP HANA + DBSystemHanaDB = DBSystemKey.String("hanadb") + // Ingres + DBSystemIngres = DBSystemKey.String("ingres") + // FirstSQL + DBSystemFirstSQL = DBSystemKey.String("firstsql") + // EnterpriseDB + DBSystemEDB = DBSystemKey.String("edb") + // InterSystems Caché + DBSystemCache = DBSystemKey.String("cache") + // Adabas (Adaptable Database System) + DBSystemAdabas = DBSystemKey.String("adabas") + // Firebird + DBSystemFirebird = DBSystemKey.String("firebird") + // Apache Derby + DBSystemDerby = DBSystemKey.String("derby") + // FileMaker + DBSystemFilemaker = DBSystemKey.String("filemaker") + // Informix + DBSystemInformix = DBSystemKey.String("informix") + // InstantDB + DBSystemInstantDB = DBSystemKey.String("instantdb") + // InterBase + DBSystemInterbase = DBSystemKey.String("interbase") + // MariaDB + DBSystemMariaDB = DBSystemKey.String("mariadb") + // Netezza + DBSystemNetezza = DBSystemKey.String("netezza") + // Pervasive PSQL + DBSystemPervasive = DBSystemKey.String("pervasive") + // PointBase + DBSystemPointbase = DBSystemKey.String("pointbase") + // SQLite + DBSystemSqlite = DBSystemKey.String("sqlite") + // Sybase + DBSystemSybase = DBSystemKey.String("sybase") + // Teradata + DBSystemTeradata = DBSystemKey.String("teradata") + // Vertica + DBSystemVertica = DBSystemKey.String("vertica") + // H2 + DBSystemH2 = DBSystemKey.String("h2") + // ColdFusion IMQ + DBSystemColdfusion = DBSystemKey.String("coldfusion") + // Apache Cassandra + DBSystemCassandra = DBSystemKey.String("cassandra") + // Apache HBase + DBSystemHBase = DBSystemKey.String("hbase") + // MongoDB + DBSystemMongoDB = DBSystemKey.String("mongodb") + // Redis + DBSystemRedis = DBSystemKey.String("redis") + // Couchbase + DBSystemCouchbase = DBSystemKey.String("couchbase") + // CouchDB + DBSystemCouchDB = DBSystemKey.String("couchdb") + // Microsoft Azure Cosmos DB + DBSystemCosmosDB = DBSystemKey.String("cosmosdb") + // Amazon DynamoDB + DBSystemDynamoDB = DBSystemKey.String("dynamodb") + // Neo4j + DBSystemNeo4j = DBSystemKey.String("neo4j") + // Apache Geode + DBSystemGeode = DBSystemKey.String("geode") + // Elasticsearch + DBSystemElasticsearch = DBSystemKey.String("elasticsearch") + // Memcached + DBSystemMemcached = DBSystemKey.String("memcached") + // CockroachDB + DBSystemCockroachdb = DBSystemKey.String("cockroachdb") + // OpenSearch + DBSystemOpensearch = DBSystemKey.String("opensearch") + // ClickHouse + DBSystemClickhouse = DBSystemKey.String("clickhouse") + // Cloud Spanner + DBSystemSpanner = DBSystemKey.String("spanner") + // Trino + DBSystemTrino = DBSystemKey.String("trino") +) + +// DBConnectionString returns an attribute KeyValue conforming to the +// "db.connection_string" semantic conventions. It represents the connection +// string used to connect to the database. It is recommended to remove embedded +// credentials. +func DBConnectionString(val string) attribute.KeyValue { + return DBConnectionStringKey.String(val) +} + +// DBUser returns an attribute KeyValue conforming to the "db.user" semantic +// conventions. It represents the username for accessing the database. +func DBUser(val string) attribute.KeyValue { + return DBUserKey.String(val) +} + +// DBJDBCDriverClassname returns an attribute KeyValue conforming to the +// "db.jdbc.driver_classname" semantic conventions. It represents the +// fully-qualified class name of the [Java Database Connectivity +// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver +// used to connect. +func DBJDBCDriverClassname(val string) attribute.KeyValue { + return DBJDBCDriverClassnameKey.String(val) +} + +// DBName returns an attribute KeyValue conforming to the "db.name" semantic +// conventions. It represents the this attribute is used to report the name of +// the database being accessed. For commands that switch the database, this +// should be set to the target database (even if the command fails). +func DBName(val string) attribute.KeyValue { + return DBNameKey.String(val) +} + +// DBStatement returns an attribute KeyValue conforming to the +// "db.statement" semantic conventions. It represents the database statement +// being executed. +func DBStatement(val string) attribute.KeyValue { + return DBStatementKey.String(val) +} + +// DBOperation returns an attribute KeyValue conforming to the +// "db.operation" semantic conventions. It represents the name of the operation +// being executed, e.g. the [MongoDB command +// name](https://docs.mongodb.com/manual/reference/command/#database-operations) +// such as `findAndModify`, or the SQL keyword. +func DBOperation(val string) attribute.KeyValue { + return DBOperationKey.String(val) +} + +// Connection-level attributes for Microsoft SQL Server +const ( + // DBMSSQLInstanceNameKey is the attribute Key conforming to the + // "db.mssql.instance_name" semantic conventions. It represents the + // Microsoft SQL Server [instance + // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) + // connecting to. This name is used to determine the port of a named + // instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'MSSQLSERVER' + // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer + // required (but still recommended if non-standard). + DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") +) + +// DBMSSQLInstanceName returns an attribute KeyValue conforming to the +// "db.mssql.instance_name" semantic conventions. It represents the Microsoft +// SQL Server [instance +// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) +// connecting to. This name is used to determine the port of a named instance. +func DBMSSQLInstanceName(val string) attribute.KeyValue { + return DBMSSQLInstanceNameKey.String(val) +} + +// Call-level attributes for Cassandra +const ( + // DBCassandraPageSizeKey is the attribute Key conforming to the + // "db.cassandra.page_size" semantic conventions. It represents the fetch + // size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 5000 + DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") + + // DBCassandraConsistencyLevelKey is the attribute Key conforming to the + // "db.cassandra.consistency_level" semantic conventions. It represents the + // consistency level of the query. Based on consistency values from + // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") + + // DBCassandraTableKey is the attribute Key conforming to the + // "db.cassandra.table" semantic conventions. It represents the name of the + // primary table that the operation is acting upon, including the keyspace + // name (if applicable). + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra + // rather than sql. It is not recommended to attempt any client-side + // parsing of `db.statement` just to get this property, but it should be + // set if it is provided by the library being instrumented. If the + // operation is acting upon an anonymous table, or more than one table, + // this value MUST NOT be set. + DBCassandraTableKey = attribute.Key("db.cassandra.table") + + // DBCassandraIdempotenceKey is the attribute Key conforming to the + // "db.cassandra.idempotence" semantic conventions. It represents the + // whether or not the query is idempotent. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") + + // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming + // to the "db.cassandra.speculative_execution_count" semantic conventions. + // It represents the number of times a query was speculatively executed. + // Not set or `0` if the query was not executed speculatively. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 0, 2 + DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") + + // DBCassandraCoordinatorIDKey is the attribute Key conforming to the + // "db.cassandra.coordinator.id" semantic conventions. It represents the ID + // of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") + + // DBCassandraCoordinatorDCKey is the attribute Key conforming to the + // "db.cassandra.coordinator.dc" semantic conventions. It represents the + // data center of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'us-west-2' + DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") +) + +var ( + // all + DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") + // each_quorum + DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") + // quorum + DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") + // local_quorum + DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") + // one + DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") + // two + DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") + // three + DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") + // local_one + DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") + // any + DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") + // serial + DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") + // local_serial + DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") +) + +// DBCassandraPageSize returns an attribute KeyValue conforming to the +// "db.cassandra.page_size" semantic conventions. It represents the fetch size +// used for paging, i.e. how many rows will be returned at once. +func DBCassandraPageSize(val int) attribute.KeyValue { + return DBCassandraPageSizeKey.Int(val) +} + +// DBCassandraTable returns an attribute KeyValue conforming to the +// "db.cassandra.table" semantic conventions. It represents the name of the +// primary table that the operation is acting upon, including the keyspace name +// (if applicable). +func DBCassandraTable(val string) attribute.KeyValue { + return DBCassandraTableKey.String(val) +} + +// DBCassandraIdempotence returns an attribute KeyValue conforming to the +// "db.cassandra.idempotence" semantic conventions. It represents the whether +// or not the query is idempotent. +func DBCassandraIdempotence(val bool) attribute.KeyValue { + return DBCassandraIdempotenceKey.Bool(val) +} + +// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue +// conforming to the "db.cassandra.speculative_execution_count" semantic +// conventions. It represents the number of times a query was speculatively +// executed. Not set or `0` if the query was not executed speculatively. +func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { + return DBCassandraSpeculativeExecutionCountKey.Int(val) +} + +// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of +// the coordinating node for a query. +func DBCassandraCoordinatorID(val string) attribute.KeyValue { + return DBCassandraCoordinatorIDKey.String(val) +} + +// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.dc" semantic conventions. It represents the data +// center of the coordinating node for a query. +func DBCassandraCoordinatorDC(val string) attribute.KeyValue { + return DBCassandraCoordinatorDCKey.String(val) +} + +// Call-level attributes for Redis +const ( + // DBRedisDBIndexKey is the attribute Key conforming to the + // "db.redis.database_index" semantic conventions. It represents the index + // of the database being accessed as used in the [`SELECT` + // command](https://redis.io/commands/select), provided as an integer. To + // be used instead of the generic `db.name` attribute. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If other than the default + // database (`0`).) + // Stability: stable + // Examples: 0, 1, 15 + DBRedisDBIndexKey = attribute.Key("db.redis.database_index") +) + +// DBRedisDBIndex returns an attribute KeyValue conforming to the +// "db.redis.database_index" semantic conventions. It represents the index of +// the database being accessed as used in the [`SELECT` +// command](https://redis.io/commands/select), provided as an integer. To be +// used instead of the generic `db.name` attribute. +func DBRedisDBIndex(val int) attribute.KeyValue { + return DBRedisDBIndexKey.Int(val) +} + +// Call-level attributes for MongoDB +const ( + // DBMongoDBCollectionKey is the attribute Key conforming to the + // "db.mongodb.collection" semantic conventions. It represents the + // collection being accessed within the database stated in `db.name`. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'customers', 'products' + DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") +) + +// DBMongoDBCollection returns an attribute KeyValue conforming to the +// "db.mongodb.collection" semantic conventions. It represents the collection +// being accessed within the database stated in `db.name`. +func DBMongoDBCollection(val string) attribute.KeyValue { + return DBMongoDBCollectionKey.String(val) +} + +// Call-level attributes for SQL databases +const ( + // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" + // semantic conventions. It represents the name of the primary table that + // the operation is acting upon, including the database name (if + // applicable). + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting + // upon an anonymous table, or more than one table, this value MUST NOT be + // set. + DBSQLTableKey = attribute.Key("db.sql.table") +) + +// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" +// semantic conventions. It represents the name of the primary table that the +// operation is acting upon, including the database name (if applicable). +func DBSQLTable(val string) attribute.KeyValue { + return DBSQLTableKey.String(val) +} + +// Call-level attributes for Cosmos DB. +const ( + // DBCosmosDBClientIDKey is the attribute Key conforming to the + // "db.cosmosdb.client_id" semantic conventions. It represents the unique + // Cosmos client instance id. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") + + // DBCosmosDBOperationTypeKey is the attribute Key conforming to the + // "db.cosmosdb.operation_type" semantic conventions. It represents the + // cosmosDB Operation Type. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (when performing one of the + // operations in this list) + // Stability: stable + DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") + + // DBCosmosDBConnectionModeKey is the attribute Key conforming to the + // "db.cosmosdb.connection_mode" semantic conventions. It represents the + // cosmos client connection mode. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as + // default)) + // Stability: stable + DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") + + // DBCosmosDBContainerKey is the attribute Key conforming to the + // "db.cosmosdb.container" semantic conventions. It represents the cosmos + // DB container name. + // + // Type: string + // RequirementLevel: ConditionallyRequired (if available) + // Stability: stable + // Examples: 'anystring' + DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") + + // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the + // "db.cosmosdb.request_content_length" semantic conventions. It represents + // the request payload size in bytes + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") + + // DBCosmosDBStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos + // DB status code. + // + // Type: int + // RequirementLevel: ConditionallyRequired (if response was received) + // Stability: stable + // Examples: 200, 201 + DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") + + // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.sub_status_code" semantic conventions. It represents the + // cosmos DB sub status code. + // + // Type: int + // RequirementLevel: ConditionallyRequired (when response was received and + // contained sub-code.) + // Stability: stable + // Examples: 1000, 1002 + DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") + + // DBCosmosDBRequestChargeKey is the attribute Key conforming to the + // "db.cosmosdb.request_charge" semantic conventions. It represents the rU + // consumed for that operation + // + // Type: double + // RequirementLevel: ConditionallyRequired (when available) + // Stability: stable + // Examples: 46.18, 1.0 + DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") +) + +var ( + // invalid + DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") + // create + DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") + // patch + DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") + // read + DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") + // read_feed + DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") + // delete + DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") + // replace + DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") + // execute + DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") + // query + DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") + // head + DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") + // head_feed + DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") + // upsert + DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") + // batch + DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") + // query_plan + DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") + // execute_javascript + DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") +) + +var ( + // Gateway (HTTP) connections mode + DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") + // Direct connection + DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") +) + +// DBCosmosDBClientID returns an attribute KeyValue conforming to the +// "db.cosmosdb.client_id" semantic conventions. It represents the unique +// Cosmos client instance id. +func DBCosmosDBClientID(val string) attribute.KeyValue { + return DBCosmosDBClientIDKey.String(val) +} + +// DBCosmosDBContainer returns an attribute KeyValue conforming to the +// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB +// container name. +func DBCosmosDBContainer(val string) attribute.KeyValue { + return DBCosmosDBContainerKey.String(val) +} + +// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming +// to the "db.cosmosdb.request_content_length" semantic conventions. It +// represents the request payload size in bytes +func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { + return DBCosmosDBRequestContentLengthKey.Int(val) +} + +// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB +// status code. +func DBCosmosDBStatusCode(val int) attribute.KeyValue { + return DBCosmosDBStatusCodeKey.Int(val) +} + +// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos +// DB sub status code. +func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { + return DBCosmosDBSubStatusCodeKey.Int(val) +} + +// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the +// "db.cosmosdb.request_charge" semantic conventions. It represents the rU +// consumed for that operation +func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { + return DBCosmosDBRequestChargeKey.Float64(val) +} + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's +// concepts. +const ( + // OTelStatusCodeKey is the attribute Key conforming to the + // "otel.status_code" semantic conventions. It represents the name of the + // code, either "OK" or "ERROR". MUST NOT be set if the status code is + // UNSET. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + OTelStatusCodeKey = attribute.Key("otel.status_code") + + // OTelStatusDescriptionKey is the attribute Key conforming to the + // "otel.status_description" semantic conventions. It represents the + // description of the Status if it has a value, otherwise not set. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'resource not found' + OTelStatusDescriptionKey = attribute.Key("otel.status_description") +) + +var ( + // The operation has been validated by an Application developer or Operator to have completed successfully + OTelStatusCodeOk = OTelStatusCodeKey.String("OK") + // The operation contains an error + OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") +) + +// OTelStatusDescription returns an attribute KeyValue conforming to the +// "otel.status_description" semantic conventions. It represents the +// description of the Status if it has a value, otherwise not set. +func OTelStatusDescription(val string) attribute.KeyValue { + return OTelStatusDescriptionKey.String(val) +} + +// This semantic convention describes an instance of a function that runs +// without provisioning or managing of servers (also known as serverless +// functions or Function as a Service (FaaS)) with spans. +const ( + // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" + // semantic conventions. It represents the type of the trigger which caused + // this function invocation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Note: For the server/consumer span on the incoming side, + // `faas.trigger` MUST be set. + // + // Clients invoking FaaS instances usually cannot set `faas.trigger`, + // since they would typically need to look in the payload to determine + // the event type. If clients set it, it should be the same as the + // trigger that corresponding incoming would have (i.e., this has + // nothing to do with the underlying transport used to make the API + // call to invoke the lambda, which is often HTTP). + FaaSTriggerKey = attribute.Key("faas.trigger") + + // FaaSInvocationIDKey is the attribute Key conforming to the + // "faas.invocation_id" semantic conventions. It represents the invocation + // ID of the current function invocation. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + FaaSInvocationIDKey = attribute.Key("faas.invocation_id") +) + +var ( + // A response to some data source operation such as a database or filesystem read/write + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// FaaSInvocationID returns an attribute KeyValue conforming to the +// "faas.invocation_id" semantic conventions. It represents the invocation ID +// of the current function invocation. +func FaaSInvocationID(val string) attribute.KeyValue { + return FaaSInvocationIDKey.String(val) +} + +// Semantic Convention for FaaS triggered as a response to some data source +// operation such as a database or filesystem read/write. +const ( + // FaaSDocumentCollectionKey is the attribute Key conforming to the + // "faas.document.collection" semantic conventions. It represents the name + // of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in + // Cosmos DB to the database name. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'myBucketName', 'myDBName' + FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") + + // FaaSDocumentOperationKey is the attribute Key conforming to the + // "faas.document.operation" semantic conventions. It represents the + // describes the type of the operation that was performed on the data. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + FaaSDocumentOperationKey = attribute.Key("faas.document.operation") + + // FaaSDocumentTimeKey is the attribute Key conforming to the + // "faas.document.time" semantic conventions. It represents a string + // containing the time when the data was accessed in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSDocumentTimeKey = attribute.Key("faas.document.time") + + // FaaSDocumentNameKey is the attribute Key conforming to the + // "faas.document.name" semantic conventions. It represents the document + // name/table subjected to the operation. For example, in Cloud Storage or + // S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'myFile.txt', 'myTableName' + FaaSDocumentNameKey = attribute.Key("faas.document.name") +) + +var ( + // When a new object is created + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +// FaaSDocumentCollection returns an attribute KeyValue conforming to the +// "faas.document.collection" semantic conventions. It represents the name of +// the source on which the triggering operation was performed. For example, in +// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the +// database name. +func FaaSDocumentCollection(val string) attribute.KeyValue { + return FaaSDocumentCollectionKey.String(val) +} + +// FaaSDocumentTime returns an attribute KeyValue conforming to the +// "faas.document.time" semantic conventions. It represents a string containing +// the time when the data was accessed in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSDocumentTime(val string) attribute.KeyValue { + return FaaSDocumentTimeKey.String(val) +} + +// FaaSDocumentName returns an attribute KeyValue conforming to the +// "faas.document.name" semantic conventions. It represents the document +// name/table subjected to the operation. For example, in Cloud Storage or S3 +// is the name of the file, and in Cosmos DB the table name. +func FaaSDocumentName(val string) attribute.KeyValue { + return FaaSDocumentNameKey.String(val) +} + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic + // conventions. It represents a string containing the function invocation + // time in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSTimeKey = attribute.Key("faas.time") + + // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic + // conventions. It represents a string containing the schedule period as + // [Cron + // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '0/5 * * * ? *' + FaaSCronKey = attribute.Key("faas.cron") +) + +// FaaSTime returns an attribute KeyValue conforming to the "faas.time" +// semantic conventions. It represents a string containing the function +// invocation time in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSTime(val string) attribute.KeyValue { + return FaaSTimeKey.String(val) +} + +// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" +// semantic conventions. It represents a string containing the schedule period +// as [Cron +// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +func FaaSCron(val string) attribute.KeyValue { + return FaaSCronKey.String(val) +} + +// Contains additional attributes for incoming FaaS spans. +const ( + // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" + // semantic conventions. It represents a boolean that is true if the + // serverless function is executed for the first time (aka cold-start). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + FaaSColdstartKey = attribute.Key("faas.coldstart") +) + +// FaaSColdstart returns an attribute KeyValue conforming to the +// "faas.coldstart" semantic conventions. It represents a boolean that is true +// if the serverless function is executed for the first time (aka cold-start). +func FaaSColdstart(val bool) attribute.KeyValue { + return FaaSColdstartKey.Bool(val) +} + +// Contains additional attributes for outgoing FaaS spans. +const ( + // FaaSInvokedNameKey is the attribute Key conforming to the + // "faas.invoked_name" semantic conventions. It represents the name of the + // invoked function. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'my-function' + // Note: SHOULD be equal to the `faas.name` resource attribute of the + // invoked function. + FaaSInvokedNameKey = attribute.Key("faas.invoked_name") + + // FaaSInvokedProviderKey is the attribute Key conforming to the + // "faas.invoked_provider" semantic conventions. It represents the cloud + // provider of the invoked function. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Note: SHOULD be equal to the `cloud.provider` resource attribute of the + // invoked function. + FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") + + // FaaSInvokedRegionKey is the attribute Key conforming to the + // "faas.invoked_region" semantic conventions. It represents the cloud + // region of the invoked function. + // + // Type: string + // RequirementLevel: ConditionallyRequired (For some cloud providers, like + // AWS or GCP, the region in which a function is hosted is essential to + // uniquely identify the function and also part of its endpoint. Since it's + // part of the endpoint being called, the region is always known to + // clients. In these cases, `faas.invoked_region` MUST be set accordingly. + // If the region is unknown to the client or not required for identifying + // the invoked function, setting `faas.invoked_region` is optional.) + // Stability: stable + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the `cloud.region` resource attribute of the + // invoked function. + FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") +) + +var ( + // Alibaba Cloud + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +// FaaSInvokedName returns an attribute KeyValue conforming to the +// "faas.invoked_name" semantic conventions. It represents the name of the +// invoked function. +func FaaSInvokedName(val string) attribute.KeyValue { + return FaaSInvokedNameKey.String(val) +} + +// FaaSInvokedRegion returns an attribute KeyValue conforming to the +// "faas.invoked_region" semantic conventions. It represents the cloud region +// of the invoked function. +func FaaSInvokedRegion(val string) attribute.KeyValue { + return FaaSInvokedRegionKey.String(val) +} + +// Operations that access some remote service. +const ( + // PeerServiceKey is the attribute Key conforming to the "peer.service" + // semantic conventions. It represents the + // [`service.name`](/docs/resource/README.md#service) of the remote + // service. SHOULD be equal to the actual `service.name` resource attribute + // of the remote service if any. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'AuthTokenCache' + PeerServiceKey = attribute.Key("peer.service") +) + +// PeerService returns an attribute KeyValue conforming to the +// "peer.service" semantic conventions. It represents the +// [`service.name`](/docs/resource/README.md#service) of the remote service. +// SHOULD be equal to the actual `service.name` resource attribute of the +// remote service if any. +func PeerService(val string) attribute.KeyValue { + return PeerServiceKey.String(val) +} + +// These attributes may be used for any operation with an authenticated and/or +// authorized enduser. +const ( + // EnduserIDKey is the attribute Key conforming to the "enduser.id" + // semantic conventions. It represents the username or client_id extracted + // from the access token or + // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header + // in the inbound request from outside the system. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'username' + EnduserIDKey = attribute.Key("enduser.id") + + // EnduserRoleKey is the attribute Key conforming to the "enduser.role" + // semantic conventions. It represents the actual/assumed role the client + // is making the request under extracted from token or application security + // context. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'admin' + EnduserRoleKey = attribute.Key("enduser.role") + + // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" + // semantic conventions. It represents the scopes or granted authorities + // the client currently possesses extracted from token or application + // security context. The value would come from the scope associated with an + // [OAuth 2.0 Access + // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute + // value in a [SAML 2.0 + // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'read:message, write:files' + EnduserScopeKey = attribute.Key("enduser.scope") +) + +// EnduserID returns an attribute KeyValue conforming to the "enduser.id" +// semantic conventions. It represents the username or client_id extracted from +// the access token or +// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in +// the inbound request from outside the system. +func EnduserID(val string) attribute.KeyValue { + return EnduserIDKey.String(val) +} + +// EnduserRole returns an attribute KeyValue conforming to the +// "enduser.role" semantic conventions. It represents the actual/assumed role +// the client is making the request under extracted from token or application +// security context. +func EnduserRole(val string) attribute.KeyValue { + return EnduserRoleKey.String(val) +} + +// EnduserScope returns an attribute KeyValue conforming to the +// "enduser.scope" semantic conventions. It represents the scopes or granted +// authorities the client currently possesses extracted from token or +// application security context. The value would come from the scope associated +// with an [OAuth 2.0 Access +// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute +// value in a [SAML 2.0 +// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). +func EnduserScope(val string) attribute.KeyValue { + return EnduserScopeKey.String(val) +} + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic + // conventions. It represents the current "managed" thread ID (as opposed + // to OS thread ID). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 42 + ThreadIDKey = attribute.Key("thread.id") + + // ThreadNameKey is the attribute Key conforming to the "thread.name" + // semantic conventions. It represents the current thread name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'main' + ThreadNameKey = attribute.Key("thread.name") +) + +// ThreadID returns an attribute KeyValue conforming to the "thread.id" +// semantic conventions. It represents the current "managed" thread ID (as +// opposed to OS thread ID). +func ThreadID(val int) attribute.KeyValue { + return ThreadIDKey.Int(val) +} + +// ThreadName returns an attribute KeyValue conforming to the "thread.name" +// semantic conventions. It represents the current thread name. +func ThreadName(val string) attribute.KeyValue { + return ThreadNameKey.String(val) +} + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // CodeFunctionKey is the attribute Key conforming to the "code.function" + // semantic conventions. It represents the method or function name, or + // equivalent (usually rightmost part of the code unit's name). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'serveRequest' + CodeFunctionKey = attribute.Key("code.function") + + // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" + // semantic conventions. It represents the "namespace" within which + // `code.function` is defined. Usually the qualified class or module name, + // such that `code.namespace` + some separator + `code.function` form a + // unique identifier for the code unit. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'com.example.MyHTTPService' + CodeNamespaceKey = attribute.Key("code.namespace") + + // CodeFilepathKey is the attribute Key conforming to the "code.filepath" + // semantic conventions. It represents the source code file name that + // identifies the code unit as uniquely as possible (preferably an absolute + // file path). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + CodeFilepathKey = attribute.Key("code.filepath") + + // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" + // semantic conventions. It represents the line number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 42 + CodeLineNumberKey = attribute.Key("code.lineno") + + // CodeColumnKey is the attribute Key conforming to the "code.column" + // semantic conventions. It represents the column number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 16 + CodeColumnKey = attribute.Key("code.column") +) + +// CodeFunction returns an attribute KeyValue conforming to the +// "code.function" semantic conventions. It represents the method or function +// name, or equivalent (usually rightmost part of the code unit's name). +func CodeFunction(val string) attribute.KeyValue { + return CodeFunctionKey.String(val) +} + +// CodeNamespace returns an attribute KeyValue conforming to the +// "code.namespace" semantic conventions. It represents the "namespace" within +// which `code.function` is defined. Usually the qualified class or module +// name, such that `code.namespace` + some separator + `code.function` form a +// unique identifier for the code unit. +func CodeNamespace(val string) attribute.KeyValue { + return CodeNamespaceKey.String(val) +} + +// CodeFilepath returns an attribute KeyValue conforming to the +// "code.filepath" semantic conventions. It represents the source code file +// name that identifies the code unit as uniquely as possible (preferably an +// absolute file path). +func CodeFilepath(val string) attribute.KeyValue { + return CodeFilepathKey.String(val) +} + +// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" +// semantic conventions. It represents the line number in `code.filepath` best +// representing the operation. It SHOULD point within the code unit named in +// `code.function`. +func CodeLineNumber(val int) attribute.KeyValue { + return CodeLineNumberKey.Int(val) +} + +// CodeColumn returns an attribute KeyValue conforming to the "code.column" +// semantic conventions. It represents the column number in `code.filepath` +// best representing the operation. It SHOULD point within the code unit named +// in `code.function`. +func CodeColumn(val int) attribute.KeyValue { + return CodeColumnKey.Int(val) +} + +// Semantic Convention for HTTP Client +const ( + // HTTPResendCountKey is the attribute Key conforming to the + // "http.resend_count" semantic conventions. It represents the ordinal + // number of request resending attempt (for any reason, including + // redirects). + // + // Type: int + // RequirementLevel: Recommended (if and only if request was retried.) + // Stability: stable + // Examples: 3 + // Note: The resend count SHOULD be updated each time an HTTP request gets + // resent by the client, regardless of what was the cause of the resending + // (e.g. redirection, authorization failure, 503 Server Unavailable, + // network issues, or any other). + HTTPResendCountKey = attribute.Key("http.resend_count") +) + +// HTTPResendCount returns an attribute KeyValue conforming to the +// "http.resend_count" semantic conventions. It represents the ordinal number +// of request resending attempt (for any reason, including redirects). +func HTTPResendCount(val int) attribute.KeyValue { + return HTTPResendCountKey.Int(val) +} + +// The `aws` conventions apply to operations using the AWS SDK. They map +// request or response parameters in AWS SDK API calls to attributes on a Span. +// The conventions have been collected over time based on feedback from AWS +// users of tracing and will continue to evolve as new interesting conventions +// are found. +// Some descriptions are also provided for populating general OpenTelemetry +// semantic conventions based on these APIs. +const ( + // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" + // semantic conventions. It represents the AWS request ID as returned in + // the response headers `x-amz-request-id` or `x-amz-requestid`. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AWSRequestIDKey = attribute.Key("aws.request_id") +) + +// AWSRequestID returns an attribute KeyValue conforming to the +// "aws.request_id" semantic conventions. It represents the AWS request ID as +// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +func AWSRequestID(val string) attribute.KeyValue { + return AWSRequestIDKey.String(val) +} + +// Attributes that exist for multiple DynamoDB request types. +const ( + // AWSDynamoDBTableNamesKey is the attribute Key conforming to the + // "aws.dynamodb.table_names" semantic conventions. It represents the keys + // in the `RequestItems` object field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Users', 'Cats' + AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") + + // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the + // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the + // JSON-serialized value of each item in the `ConsumedCapacity` response + // field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { + // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number }, "TableName": "string", + // "WriteCapacityUnits": number }' + AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") + + // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to + // the "aws.dynamodb.item_collection_metrics" semantic conventions. It + // represents the JSON-serialized value of the `ItemCollectionMetrics` + // response field. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": + // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { + // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], + // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, + // "SizeEstimateRangeGB": [ number ] } ] }' + AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") + + // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to + // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It + // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` + // request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") + + // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming + // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. + // It represents the value of the + // `ProvisionedThroughput.WriteCapacityUnits` request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") + + // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the + // "aws.dynamodb.consistent_read" semantic conventions. It represents the + // value of the `ConsistentRead` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") + + // AWSDynamoDBProjectionKey is the attribute Key conforming to the + // "aws.dynamodb.projection" semantic conventions. It represents the value + // of the `ProjectionExpression` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, + // RelatedItems, ProductReviews' + AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") + + // AWSDynamoDBLimitKey is the attribute Key conforming to the + // "aws.dynamodb.limit" semantic conventions. It represents the value of + // the `Limit` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 10 + AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") + + // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the + // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the + // value of the `AttributesToGet` request parameter. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: 'lives', 'id' + AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") + + // AWSDynamoDBIndexNameKey is the attribute Key conforming to the + // "aws.dynamodb.index_name" semantic conventions. It represents the value + // of the `IndexName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'name_to_group' + AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") + + // AWSDynamoDBSelectKey is the attribute Key conforming to the + // "aws.dynamodb.select" semantic conventions. It represents the value of + // the `Select` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") +) + +// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_names" semantic conventions. It represents the keys in +// the `RequestItems` object field. +func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { + return AWSDynamoDBTableNamesKey.StringSlice(val) +} + +// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to +// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the +// JSON-serialized value of each item in the `ConsumedCapacity` response field. +func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { + return AWSDynamoDBConsumedCapacityKey.StringSlice(val) +} + +// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming +// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It +// represents the JSON-serialized value of the `ItemCollectionMetrics` response +// field. +func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { + return AWSDynamoDBItemCollectionMetricsKey.String(val) +} + +// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.ReadCapacityUnits` request parameter. +func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) +} + +// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.WriteCapacityUnits` request parameter. +func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) +} + +// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the +// "aws.dynamodb.consistent_read" semantic conventions. It represents the value +// of the `ConsistentRead` request parameter. +func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { + return AWSDynamoDBConsistentReadKey.Bool(val) +} + +// AWSDynamoDBProjection returns an attribute KeyValue conforming to the +// "aws.dynamodb.projection" semantic conventions. It represents the value of +// the `ProjectionExpression` request parameter. +func AWSDynamoDBProjection(val string) attribute.KeyValue { + return AWSDynamoDBProjectionKey.String(val) +} + +// AWSDynamoDBLimit returns an attribute KeyValue conforming to the +// "aws.dynamodb.limit" semantic conventions. It represents the value of the +// `Limit` request parameter. +func AWSDynamoDBLimit(val int) attribute.KeyValue { + return AWSDynamoDBLimitKey.Int(val) +} + +// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to +// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the +// value of the `AttributesToGet` request parameter. +func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributesToGetKey.StringSlice(val) +} + +// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the +// "aws.dynamodb.index_name" semantic conventions. It represents the value of +// the `IndexName` request parameter. +func AWSDynamoDBIndexName(val string) attribute.KeyValue { + return AWSDynamoDBIndexNameKey.String(val) +} + +// AWSDynamoDBSelect returns an attribute KeyValue conforming to the +// "aws.dynamodb.select" semantic conventions. It represents the value of the +// `Select` request parameter. +func AWSDynamoDBSelect(val string) attribute.KeyValue { + return AWSDynamoDBSelectKey.String(val) +} + +// DynamoDB.CreateTable +const ( + // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `GlobalSecondaryIndexes` request field + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": + // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ + // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") + + // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `LocalSecondaryIndexes` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "IndexARN": "string", "IndexName": "string", + // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' + AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") +) + +// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_indexes" semantic +// conventions. It represents the JSON-serialized value of each item of the +// `GlobalSecondaryIndexes` request field +func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) +} + +// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming +// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It +// represents the JSON-serialized value of each item of the +// `LocalSecondaryIndexes` request field. +func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) +} + +// DynamoDB.ListTables +const ( + // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the + // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents + // the value of the `ExclusiveStartTableName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Users', 'CatsTable' + AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") + + // AWSDynamoDBTableCountKey is the attribute Key conforming to the + // "aws.dynamodb.table_count" semantic conventions. It represents the the + // number of items in the `TableNames` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 20 + AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") +) + +// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming +// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It +// represents the value of the `ExclusiveStartTableName` request parameter. +func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { + return AWSDynamoDBExclusiveStartTableKey.String(val) +} + +// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_count" semantic conventions. It represents the the +// number of items in the `TableNames` response parameter. +func AWSDynamoDBTableCount(val int) attribute.KeyValue { + return AWSDynamoDBTableCountKey.Int(val) +} + +// DynamoDB.Query +const ( + // AWSDynamoDBScanForwardKey is the attribute Key conforming to the + // "aws.dynamodb.scan_forward" semantic conventions. It represents the + // value of the `ScanIndexForward` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") +) + +// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the +// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of +// the `ScanIndexForward` request parameter. +func AWSDynamoDBScanForward(val bool) attribute.KeyValue { + return AWSDynamoDBScanForwardKey.Bool(val) +} + +// DynamoDB.Scan +const ( + // AWSDynamoDBSegmentKey is the attribute Key conforming to the + // "aws.dynamodb.segment" semantic conventions. It represents the value of + // the `Segment` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 10 + AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") + + // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the + // "aws.dynamodb.total_segments" semantic conventions. It represents the + // value of the `TotalSegments` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") + + // AWSDynamoDBCountKey is the attribute Key conforming to the + // "aws.dynamodb.count" semantic conventions. It represents the value of + // the `Count` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 10 + AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") + + // AWSDynamoDBScannedCountKey is the attribute Key conforming to the + // "aws.dynamodb.scanned_count" semantic conventions. It represents the + // value of the `ScannedCount` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 50 + AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") +) + +// AWSDynamoDBSegment returns an attribute KeyValue conforming to the +// "aws.dynamodb.segment" semantic conventions. It represents the value of the +// `Segment` request parameter. +func AWSDynamoDBSegment(val int) attribute.KeyValue { + return AWSDynamoDBSegmentKey.Int(val) +} + +// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the +// "aws.dynamodb.total_segments" semantic conventions. It represents the value +// of the `TotalSegments` request parameter. +func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { + return AWSDynamoDBTotalSegmentsKey.Int(val) +} + +// AWSDynamoDBCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.count" semantic conventions. It represents the value of the +// `Count` response parameter. +func AWSDynamoDBCount(val int) attribute.KeyValue { + return AWSDynamoDBCountKey.Int(val) +} + +// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.scanned_count" semantic conventions. It represents the value +// of the `ScannedCount` response parameter. +func AWSDynamoDBScannedCount(val int) attribute.KeyValue { + return AWSDynamoDBScannedCountKey.Int(val) +} + +// DynamoDB.UpdateTable +const ( + // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to + // the "aws.dynamodb.attribute_definitions" semantic conventions. It + // represents the JSON-serialized value of each item in the + // `AttributeDefinitions` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") + + // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key + // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic + // conventions. It represents the JSON-serialized value of each item in the + // the `GlobalSecondaryIndexUpdates` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: stable + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") +) + +// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming +// to the "aws.dynamodb.attribute_definitions" semantic conventions. It +// represents the JSON-serialized value of each item in the +// `AttributeDefinitions` request field. +func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) +} + +// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic +// conventions. It represents the JSON-serialized value of each item in the the +// `GlobalSecondaryIndexUpdates` request field. +func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) +} + +// Attributes that exist for S3 request types. +const ( + // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" + // semantic conventions. It represents the S3 bucket name the request + // refers to. Corresponds to the `--bucket` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'some-bucket-name' + // Note: The `bucket` attribute is applicable to all S3 operations that + // reference a bucket, i.e. that require the bucket name as a mandatory + // parameter. + // This applies to almost all S3 operations except `list-buckets`. + AWSS3BucketKey = attribute.Key("aws.s3.bucket") + + // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic + // conventions. It represents the S3 object key the request refers to. + // Corresponds to the `--key` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'someFile.yml' + // Note: The `key` attribute is applicable to all object-related S3 + // operations, i.e. that require the object key as a mandatory parameter. + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // - + // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) + // - + // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) + // - + // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) + // - + // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) + // - + // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3KeyKey = attribute.Key("aws.s3.key") + + // AWSS3CopySourceKey is the attribute Key conforming to the + // "aws.s3.copy_source" semantic conventions. It represents the source + // object (in the form `bucket`/`key`) for the copy operation. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'someFile.yml' + // Note: The `copy_source` attribute applies to S3 copy operations and + // corresponds to the `--copy-source` parameter + // of the [copy-object operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") + + // AWSS3UploadIDKey is the attribute Key conforming to the + // "aws.s3.upload_id" semantic conventions. It represents the upload ID + // that identifies the multipart upload. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The `upload_id` attribute applies to S3 multipart-upload + // operations and corresponds to the `--upload-id` parameter + // of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // multipart operations. + // This applies in particular to the following operations: + // + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") + + // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" + // semantic conventions. It represents the delete request container that + // specifies the objects to be deleted. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: + // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' + // Note: The `delete` attribute is only applicable to the + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // operation. + // The `delete` attribute corresponds to the `--delete` parameter of the + // [delete-objects operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). + AWSS3DeleteKey = attribute.Key("aws.s3.delete") + + // AWSS3PartNumberKey is the attribute Key conforming to the + // "aws.s3.part_number" semantic conventions. It represents the part number + // of the part being uploaded in a multipart-upload operation. This is a + // positive integer between 1 and 10,000. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3456 + // Note: The `part_number` attribute is only applicable to the + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // and + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + // operations. + // The `part_number` attribute corresponds to the `--part-number` parameter + // of the + // [upload-part operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). + AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") +) + +// AWSS3Bucket returns an attribute KeyValue conforming to the +// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the +// request refers to. Corresponds to the `--bucket` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Bucket(val string) attribute.KeyValue { + return AWSS3BucketKey.String(val) +} + +// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" +// semantic conventions. It represents the S3 object key the request refers to. +// Corresponds to the `--key` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Key(val string) attribute.KeyValue { + return AWSS3KeyKey.String(val) +} + +// AWSS3CopySource returns an attribute KeyValue conforming to the +// "aws.s3.copy_source" semantic conventions. It represents the source object +// (in the form `bucket`/`key`) for the copy operation. +func AWSS3CopySource(val string) attribute.KeyValue { + return AWSS3CopySourceKey.String(val) +} + +// AWSS3UploadID returns an attribute KeyValue conforming to the +// "aws.s3.upload_id" semantic conventions. It represents the upload ID that +// identifies the multipart upload. +func AWSS3UploadID(val string) attribute.KeyValue { + return AWSS3UploadIDKey.String(val) +} + +// AWSS3Delete returns an attribute KeyValue conforming to the +// "aws.s3.delete" semantic conventions. It represents the delete request +// container that specifies the objects to be deleted. +func AWSS3Delete(val string) attribute.KeyValue { + return AWSS3DeleteKey.String(val) +} + +// AWSS3PartNumber returns an attribute KeyValue conforming to the +// "aws.s3.part_number" semantic conventions. It represents the part number of +// the part being uploaded in a multipart-upload operation. This is a positive +// integer between 1 and 10,000. +func AWSS3PartNumber(val int) attribute.KeyValue { + return AWSS3PartNumberKey.Int(val) +} + +// Semantic conventions to apply when instrumenting the GraphQL implementation. +// They map GraphQL operations to attributes on a Span. +const ( + // GraphqlOperationNameKey is the attribute Key conforming to the + // "graphql.operation.name" semantic conventions. It represents the name of + // the operation being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'findBookByID' + GraphqlOperationNameKey = attribute.Key("graphql.operation.name") + + // GraphqlOperationTypeKey is the attribute Key conforming to the + // "graphql.operation.type" semantic conventions. It represents the type of + // the operation being executed. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'query', 'mutation', 'subscription' + GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") + + // GraphqlDocumentKey is the attribute Key conforming to the + // "graphql.document" semantic conventions. It represents the GraphQL + // document being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + GraphqlDocumentKey = attribute.Key("graphql.document") +) + +var ( + // GraphQL query + GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") + // GraphQL mutation + GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") + // GraphQL subscription + GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") +) + +// GraphqlOperationName returns an attribute KeyValue conforming to the +// "graphql.operation.name" semantic conventions. It represents the name of the +// operation being executed. +func GraphqlOperationName(val string) attribute.KeyValue { + return GraphqlOperationNameKey.String(val) +} + +// GraphqlDocument returns an attribute KeyValue conforming to the +// "graphql.document" semantic conventions. It represents the GraphQL document +// being executed. +func GraphqlDocument(val string) attribute.KeyValue { + return GraphqlDocumentKey.String(val) +} + +// General attributes used in messaging systems. +const ( + // MessagingSystemKey is the attribute Key conforming to the + // "messaging.system" semantic conventions. It represents a string + // identifying the messaging system. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' + MessagingSystemKey = attribute.Key("messaging.system") + + // MessagingOperationKey is the attribute Key conforming to the + // "messaging.operation" semantic conventions. It represents a string + // identifying the kind of messaging operation as defined in the [Operation + // names](#operation-names) section above. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Note: If a custom value is used, it MUST be of low cardinality. + MessagingOperationKey = attribute.Key("messaging.operation") + + // MessagingBatchMessageCountKey is the attribute Key conforming to the + // "messaging.batch.message_count" semantic conventions. It represents the + // number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If the span describes an + // operation on a batch of messages.) + // Stability: stable + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on + // spans that operate with a single message. When a messaging client + // library supports both batch and single-message API for the same + // operation, instrumentations SHOULD use `messaging.batch.message_count` + // for batching APIs and SHOULD NOT use it for single-message APIs. + MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") + + // MessagingClientIDKey is the attribute Key conforming to the + // "messaging.client_id" semantic conventions. It represents a unique + // identifier for the client that consumes or produces a message. + // + // Type: string + // RequirementLevel: Recommended (If a client id is available) + // Stability: stable + // Examples: 'client-5', 'myhost@8742@s8083jm' + MessagingClientIDKey = attribute.Key("messaging.client_id") +) + +var ( + // publish + MessagingOperationPublish = MessagingOperationKey.String("publish") + // receive + MessagingOperationReceive = MessagingOperationKey.String("receive") + // process + MessagingOperationProcess = MessagingOperationKey.String("process") +) + +// MessagingSystem returns an attribute KeyValue conforming to the +// "messaging.system" semantic conventions. It represents a string identifying +// the messaging system. +func MessagingSystem(val string) attribute.KeyValue { + return MessagingSystemKey.String(val) +} + +// MessagingBatchMessageCount returns an attribute KeyValue conforming to +// the "messaging.batch.message_count" semantic conventions. It represents the +// number of messages sent, received, or processed in the scope of the batching +// operation. +func MessagingBatchMessageCount(val int) attribute.KeyValue { + return MessagingBatchMessageCountKey.Int(val) +} + +// MessagingClientID returns an attribute KeyValue conforming to the +// "messaging.client_id" semantic conventions. It represents a unique +// identifier for the client that consumes or produces a message. +func MessagingClientID(val string) attribute.KeyValue { + return MessagingClientIDKey.String(val) +} + +// Semantic conventions for remote procedure calls. +const ( + // RPCSystemKey is the attribute Key conforming to the "rpc.system" + // semantic conventions. It represents a string identifying the remoting + // system. See below for a list of well-known identifiers. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + RPCSystemKey = attribute.Key("rpc.system") + + // RPCServiceKey is the attribute Key conforming to the "rpc.service" + // semantic conventions. It represents the full (logical) name of the + // service being called, including its package name, if applicable. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing + // class. The `code.namespace` attribute may be used to store the latter + // (despite the attribute name, it may include a class name; e.g., class + // with method actually executing the call on the server side, RPC client + // stub class on the client side). + RPCServiceKey = attribute.Key("rpc.service") + + // RPCMethodKey is the attribute Key conforming to the "rpc.method" + // semantic conventions. It represents the name of the (logical) method + // being called, must be equal to the $method part in the span name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The `code.function` attribute may be used to store the + // latter (e.g., method actually executing the call on the server side, RPC + // client stub method on the client side). + RPCMethodKey = attribute.Key("rpc.method") +) + +var ( + // gRPC + RPCSystemGRPC = RPCSystemKey.String("grpc") + // Java RMI + RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") + // .NET WCF + RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") + // Apache Dubbo + RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") + // Connect RPC + RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") +) + +// RPCService returns an attribute KeyValue conforming to the "rpc.service" +// semantic conventions. It represents the full (logical) name of the service +// being called, including its package name, if applicable. +func RPCService(val string) attribute.KeyValue { + return RPCServiceKey.String(val) +} + +// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" +// semantic conventions. It represents the name of the (logical) method being +// called, must be equal to the $method part in the span name. +func RPCMethod(val string) attribute.KeyValue { + return RPCMethodKey.String(val) +} + +// Tech-specific attributes for gRPC. +const ( + // RPCGRPCStatusCodeKey is the attribute Key conforming to the + // "rpc.grpc.status_code" semantic conventions. It represents the [numeric + // status + // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of + // the gRPC request. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") +) + +var ( + // OK + RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) + // CANCELLED + RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) + // UNKNOWN + RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) + // INVALID_ARGUMENT + RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) + // DEADLINE_EXCEEDED + RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) + // NOT_FOUND + RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) + // ALREADY_EXISTS + RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) + // PERMISSION_DENIED + RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) + // RESOURCE_EXHAUSTED + RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) + // FAILED_PRECONDITION + RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) + // ABORTED + RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) + // OUT_OF_RANGE + RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) + // UNIMPLEMENTED + RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) + // INTERNAL + RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) + // UNAVAILABLE + RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) + // DATA_LOSS + RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) + // UNAUTHENTICATED + RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) +) + +// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). +const ( + // RPCJsonrpcVersionKey is the attribute Key conforming to the + // "rpc.jsonrpc.version" semantic conventions. It represents the protocol + // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 + // does not specify this, the value can be omitted. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If other than the default + // version (`1.0`)) + // Stability: stable + // Examples: '2.0', '1.0' + RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + + // RPCJsonrpcRequestIDKey is the attribute Key conforming to the + // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` + // property of request or response. Since protocol allows id to be int, + // string, `null` or missing (for notifications), value is expected to be + // cast to string for simplicity. Use empty string in case of `null` value. + // Omit entirely if this is a notification. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10', 'request-7', '' + RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + + // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_code" semantic conventions. It represents the + // `error.code` property of response if it is an error response. + // + // Type: int + // RequirementLevel: ConditionallyRequired (If response is not successful.) + // Stability: stable + // Examples: -32700, 100 + RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + + // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_message" semantic conventions. It represents the + // `error.message` property of response if it is an error response. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Parse error', 'User already exists' + RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") +) + +// RPCJsonrpcVersion returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.version" semantic conventions. It represents the protocol +// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 +// does not specify this, the value can be omitted. +func RPCJsonrpcVersion(val string) attribute.KeyValue { + return RPCJsonrpcVersionKey.String(val) +} + +// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` +// property of request or response. Since protocol allows id to be int, string, +// `null` or missing (for notifications), value is expected to be cast to +// string for simplicity. Use empty string in case of `null` value. Omit +// entirely if this is a notification. +func RPCJsonrpcRequestID(val string) attribute.KeyValue { + return RPCJsonrpcRequestIDKey.String(val) +} + +// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_code" semantic conventions. It represents the +// `error.code` property of response if it is an error response. +func RPCJsonrpcErrorCode(val int) attribute.KeyValue { + return RPCJsonrpcErrorCodeKey.Int(val) +} + +// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_message" semantic conventions. It represents the +// `error.message` property of response if it is an error response. +func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { + return RPCJsonrpcErrorMessageKey.String(val) +} + +// Tech-specific attributes for Connect RPC. +const ( + // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the + // "rpc.connect_rpc.error_code" semantic conventions. It represents the + // [error codes](https://connect.build/docs/protocol/#error-codes) of the + // Connect request. Error codes are always string values. + // + // Type: Enum + // RequirementLevel: ConditionallyRequired (If response is not successful + // and if error code available.) + // Stability: stable + RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") +) + +var ( + // cancelled + RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") + // unknown + RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") + // invalid_argument + RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") + // deadline_exceeded + RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") + // not_found + RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") + // already_exists + RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") + // permission_denied + RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") + // resource_exhausted + RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") + // failed_precondition + RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") + // aborted + RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") + // out_of_range + RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") + // unimplemented + RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") + // internal + RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") + // unavailable + RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") + // data_loss + RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") + // unauthenticated + RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/README.md new file mode 100644 index 000000000..0b6cbe960 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.24.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.24.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.24.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go new file mode 100644 index 000000000..6e688345c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go @@ -0,0 +1,4387 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +import "go.opentelemetry.io/otel/attribute" + +// Describes FaaS attributes. +const ( + // FaaSInvokedNameKey is the attribute Key conforming to the + // "faas.invoked_name" semantic conventions. It represents the name of the + // invoked function. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'my-function' + // Note: SHOULD be equal to the `faas.name` resource attribute of the + // invoked function. + FaaSInvokedNameKey = attribute.Key("faas.invoked_name") + + // FaaSInvokedProviderKey is the attribute Key conforming to the + // "faas.invoked_provider" semantic conventions. It represents the cloud + // provider of the invoked function. + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + // Note: SHOULD be equal to the `cloud.provider` resource attribute of the + // invoked function. + FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") + + // FaaSInvokedRegionKey is the attribute Key conforming to the + // "faas.invoked_region" semantic conventions. It represents the cloud + // region of the invoked function. + // + // Type: string + // RequirementLevel: ConditionallyRequired (For some cloud providers, like + // AWS or GCP, the region in which a function is hosted is essential to + // uniquely identify the function and also part of its endpoint. Since it's + // part of the endpoint being called, the region is always known to + // clients. In these cases, `faas.invoked_region` MUST be set accordingly. + // If the region is unknown to the client or not required for identifying + // the invoked function, setting `faas.invoked_region` is optional.) + // Stability: experimental + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the `cloud.region` resource attribute of the + // invoked function. + FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") + + // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" + // semantic conventions. It represents the type of the trigger which caused + // this function invocation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + FaaSTriggerKey = attribute.Key("faas.trigger") +) + +var ( + // Alibaba Cloud + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +var ( + // A response to some data source operation such as a database or filesystem read/write + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// FaaSInvokedName returns an attribute KeyValue conforming to the +// "faas.invoked_name" semantic conventions. It represents the name of the +// invoked function. +func FaaSInvokedName(val string) attribute.KeyValue { + return FaaSInvokedNameKey.String(val) +} + +// FaaSInvokedRegion returns an attribute KeyValue conforming to the +// "faas.invoked_region" semantic conventions. It represents the cloud region +// of the invoked function. +func FaaSInvokedRegion(val string) attribute.KeyValue { + return FaaSInvokedRegionKey.String(val) +} + +// Attributes for Events represented using Log Records. +const ( + // EventNameKey is the attribute Key conforming to the "event.name" + // semantic conventions. It represents the identifies the class / type of + // event. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'browser.mouse.click', 'device.app.lifecycle' + // Note: Event names are subject to the same rules as [attribute + // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/common/attribute-naming.md). + // Notably, event names are namespaced to avoid collisions and provide a + // clean separation of semantics for events in separate domains like + // browser, mobile, and kubernetes. + EventNameKey = attribute.Key("event.name") +) + +// EventName returns an attribute KeyValue conforming to the "event.name" +// semantic conventions. It represents the identifies the class / type of +// event. +func EventName(val string) attribute.KeyValue { + return EventNameKey.String(val) +} + +// The attributes described in this section are rather generic. They may be +// used in any Log Record they apply to. +const ( + // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" + // semantic conventions. It represents a unique identifier for the Log + // Record. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' + // Note: If an id is provided, other log records with the same id will be + // considered duplicates and can be removed safely. This means, that two + // distinguishable log records MUST have different values. + // The id MAY be an [Universally Unique Lexicographically Sortable + // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers + // (e.g. UUID) may be used as needed. + LogRecordUIDKey = attribute.Key("log.record.uid") +) + +// LogRecordUID returns an attribute KeyValue conforming to the +// "log.record.uid" semantic conventions. It represents a unique identifier for +// the Log Record. +func LogRecordUID(val string) attribute.KeyValue { + return LogRecordUIDKey.String(val) +} + +// Describes Log attributes +const ( + // LogIostreamKey is the attribute Key conforming to the "log.iostream" + // semantic conventions. It represents the stream associated with the log. + // See below for a list of well-known values. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + LogIostreamKey = attribute.Key("log.iostream") +) + +var ( + // Logs from stdout stream + LogIostreamStdout = LogIostreamKey.String("stdout") + // Events from stderr stream + LogIostreamStderr = LogIostreamKey.String("stderr") +) + +// A file to which log was emitted. +const ( + // LogFileNameKey is the attribute Key conforming to the "log.file.name" + // semantic conventions. It represents the basename of the file. + // + // Type: string + // RequirementLevel: Recommended + // Stability: experimental + // Examples: 'audit.log' + LogFileNameKey = attribute.Key("log.file.name") + + // LogFileNameResolvedKey is the attribute Key conforming to the + // "log.file.name_resolved" semantic conventions. It represents the + // basename of the file, with symlinks resolved. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'uuid.log' + LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") + + // LogFilePathKey is the attribute Key conforming to the "log.file.path" + // semantic conventions. It represents the full path to the file. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/var/log/mysql/audit.log' + LogFilePathKey = attribute.Key("log.file.path") + + // LogFilePathResolvedKey is the attribute Key conforming to the + // "log.file.path_resolved" semantic conventions. It represents the full + // path to the file, with symlinks resolved. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/var/lib/docker/uuid.log' + LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") +) + +// LogFileName returns an attribute KeyValue conforming to the +// "log.file.name" semantic conventions. It represents the basename of the +// file. +func LogFileName(val string) attribute.KeyValue { + return LogFileNameKey.String(val) +} + +// LogFileNameResolved returns an attribute KeyValue conforming to the +// "log.file.name_resolved" semantic conventions. It represents the basename of +// the file, with symlinks resolved. +func LogFileNameResolved(val string) attribute.KeyValue { + return LogFileNameResolvedKey.String(val) +} + +// LogFilePath returns an attribute KeyValue conforming to the +// "log.file.path" semantic conventions. It represents the full path to the +// file. +func LogFilePath(val string) attribute.KeyValue { + return LogFilePathKey.String(val) +} + +// LogFilePathResolved returns an attribute KeyValue conforming to the +// "log.file.path_resolved" semantic conventions. It represents the full path +// to the file, with symlinks resolved. +func LogFilePathResolved(val string) attribute.KeyValue { + return LogFilePathResolvedKey.String(val) +} + +// Describes Database attributes +const ( + // PoolNameKey is the attribute Key conforming to the "pool.name" semantic + // conventions. It represents the name of the connection pool; unique + // within the instrumented application. In case the connection pool + // implementation doesn't provide a name, then the + // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes) + // should be used + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'myDataSource' + PoolNameKey = attribute.Key("pool.name") + + // StateKey is the attribute Key conforming to the "state" semantic + // conventions. It represents the state of a connection in the pool + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + // Examples: 'idle' + StateKey = attribute.Key("state") +) + +var ( + // idle + StateIdle = StateKey.String("idle") + // used + StateUsed = StateKey.String("used") +) + +// PoolName returns an attribute KeyValue conforming to the "pool.name" +// semantic conventions. It represents the name of the connection pool; unique +// within the instrumented application. In case the connection pool +// implementation doesn't provide a name, then the +// [db.connection_string](/docs/database/database-spans.md#connection-level-attributes) +// should be used +func PoolName(val string) attribute.KeyValue { + return PoolNameKey.String(val) +} + +// ASP.NET Core attributes +const ( + // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to + // the "aspnetcore.diagnostics.handler.type" semantic conventions. It + // represents the full type name of the + // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) + // implementation that handled the exception. + // + // Type: string + // RequirementLevel: ConditionallyRequired (if and only if the exception + // was handled by this handler.) + // Stability: experimental + // Examples: 'Contoso.MyHandler' + AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type") + + // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the + // "aspnetcore.rate_limiting.policy" semantic conventions. It represents + // the rate limiting policy name. + // + // Type: string + // RequirementLevel: ConditionallyRequired (if the matched endpoint for the + // request had a rate-limiting policy.) + // Stability: experimental + // Examples: 'fixed', 'sliding', 'token' + AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy") + + // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the + // "aspnetcore.rate_limiting.result" semantic conventions. It represents + // the rate-limiting result, shows whether the lease was acquired or + // contains a rejection reason + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + // Examples: 'acquired', 'request_canceled' + AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result") + + // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the + // "aspnetcore.request.is_unhandled" semantic conventions. It represents + // the flag indicating if request was handled by the application pipeline. + // + // Type: boolean + // RequirementLevel: ConditionallyRequired (if and only if the request was + // not handled.) + // Stability: experimental + // Examples: True + AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled") + + // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the + // "aspnetcore.routing.is_fallback" semantic conventions. It represents a + // value that indicates whether the matched route is a fallback route. + // + // Type: boolean + // RequirementLevel: ConditionallyRequired (If and only if a route was + // successfully matched.) + // Stability: experimental + // Examples: True + AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback") +) + +var ( + // Lease was acquired + AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired") + // Lease request was rejected by the endpoint limiter + AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter") + // Lease request was rejected by the global limiter + AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter") + // Lease request was canceled + AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled") +) + +// AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming +// to the "aspnetcore.diagnostics.handler.type" semantic conventions. It +// represents the full type name of the +// [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) +// implementation that handled the exception. +func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue { + return AspnetcoreDiagnosticsHandlerTypeKey.String(val) +} + +// AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to +// the "aspnetcore.rate_limiting.policy" semantic conventions. It represents +// the rate limiting policy name. +func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue { + return AspnetcoreRateLimitingPolicyKey.String(val) +} + +// AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to +// the "aspnetcore.request.is_unhandled" semantic conventions. It represents +// the flag indicating if request was handled by the application pipeline. +func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue { + return AspnetcoreRequestIsUnhandledKey.Bool(val) +} + +// AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to +// the "aspnetcore.routing.is_fallback" semantic conventions. It represents a +// value that indicates whether the matched route is a fallback route. +func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue { + return AspnetcoreRoutingIsFallbackKey.Bool(val) +} + +// SignalR attributes +const ( + // SignalrConnectionStatusKey is the attribute Key conforming to the + // "signalr.connection.status" semantic conventions. It represents the + // signalR HTTP connection closure status. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'app_shutdown', 'timeout' + SignalrConnectionStatusKey = attribute.Key("signalr.connection.status") + + // SignalrTransportKey is the attribute Key conforming to the + // "signalr.transport" semantic conventions. It represents the [SignalR + // transport + // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'web_sockets', 'long_polling' + SignalrTransportKey = attribute.Key("signalr.transport") +) + +var ( + // The connection was closed normally + SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure") + // The connection was closed due to a timeout + SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout") + // The connection was closed because the app is shutting down + SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown") +) + +var ( + // ServerSentEvents protocol + SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events") + // LongPolling protocol + SignalrTransportLongPolling = SignalrTransportKey.String("long_polling") + // WebSockets protocol + SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets") +) + +// Describes JVM buffer metric attributes. +const ( + // JvmBufferPoolNameKey is the attribute Key conforming to the + // "jvm.buffer.pool.name" semantic conventions. It represents the name of + // the buffer pool. + // + // Type: string + // RequirementLevel: Recommended + // Stability: experimental + // Examples: 'mapped', 'direct' + // Note: Pool names are generally obtained via + // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). + JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name") +) + +// JvmBufferPoolName returns an attribute KeyValue conforming to the +// "jvm.buffer.pool.name" semantic conventions. It represents the name of the +// buffer pool. +func JvmBufferPoolName(val string) attribute.KeyValue { + return JvmBufferPoolNameKey.String(val) +} + +// Describes JVM memory metric attributes. +const ( + // JvmMemoryPoolNameKey is the attribute Key conforming to the + // "jvm.memory.pool.name" semantic conventions. It represents the name of + // the memory pool. + // + // Type: string + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' + // Note: Pool names are generally obtained via + // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). + JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name") + + // JvmMemoryTypeKey is the attribute Key conforming to the + // "jvm.memory.type" semantic conventions. It represents the type of + // memory. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: stable + // Examples: 'heap', 'non_heap' + JvmMemoryTypeKey = attribute.Key("jvm.memory.type") +) + +var ( + // Heap memory + JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap") + // Non-heap memory + JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap") +) + +// JvmMemoryPoolName returns an attribute KeyValue conforming to the +// "jvm.memory.pool.name" semantic conventions. It represents the name of the +// memory pool. +func JvmMemoryPoolName(val string) attribute.KeyValue { + return JvmMemoryPoolNameKey.String(val) +} + +// Describes System metric attributes +const ( + // SystemDeviceKey is the attribute Key conforming to the "system.device" + // semantic conventions. It represents the device identifier + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '(identifier)' + SystemDeviceKey = attribute.Key("system.device") +) + +// SystemDevice returns an attribute KeyValue conforming to the +// "system.device" semantic conventions. It represents the device identifier +func SystemDevice(val string) attribute.KeyValue { + return SystemDeviceKey.String(val) +} + +// Describes System CPU metric attributes +const ( + // SystemCPULogicalNumberKey is the attribute Key conforming to the + // "system.cpu.logical_number" semantic conventions. It represents the + // logical CPU number [0..n-1] + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1 + SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number") + + // SystemCPUStateKey is the attribute Key conforming to the + // "system.cpu.state" semantic conventions. It represents the state of the + // CPU + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'idle', 'interrupt' + SystemCPUStateKey = attribute.Key("system.cpu.state") +) + +var ( + // user + SystemCPUStateUser = SystemCPUStateKey.String("user") + // system + SystemCPUStateSystem = SystemCPUStateKey.String("system") + // nice + SystemCPUStateNice = SystemCPUStateKey.String("nice") + // idle + SystemCPUStateIdle = SystemCPUStateKey.String("idle") + // iowait + SystemCPUStateIowait = SystemCPUStateKey.String("iowait") + // interrupt + SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt") + // steal + SystemCPUStateSteal = SystemCPUStateKey.String("steal") +) + +// SystemCPULogicalNumber returns an attribute KeyValue conforming to the +// "system.cpu.logical_number" semantic conventions. It represents the logical +// CPU number [0..n-1] +func SystemCPULogicalNumber(val int) attribute.KeyValue { + return SystemCPULogicalNumberKey.Int(val) +} + +// Describes System Memory metric attributes +const ( + // SystemMemoryStateKey is the attribute Key conforming to the + // "system.memory.state" semantic conventions. It represents the memory + // state + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'free', 'cached' + SystemMemoryStateKey = attribute.Key("system.memory.state") +) + +var ( + // used + SystemMemoryStateUsed = SystemMemoryStateKey.String("used") + // free + SystemMemoryStateFree = SystemMemoryStateKey.String("free") + // shared + SystemMemoryStateShared = SystemMemoryStateKey.String("shared") + // buffers + SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") + // cached + SystemMemoryStateCached = SystemMemoryStateKey.String("cached") +) + +// Describes System Memory Paging metric attributes +const ( + // SystemPagingDirectionKey is the attribute Key conforming to the + // "system.paging.direction" semantic conventions. It represents the paging + // access direction + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'in' + SystemPagingDirectionKey = attribute.Key("system.paging.direction") + + // SystemPagingStateKey is the attribute Key conforming to the + // "system.paging.state" semantic conventions. It represents the memory + // paging state + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'free' + SystemPagingStateKey = attribute.Key("system.paging.state") + + // SystemPagingTypeKey is the attribute Key conforming to the + // "system.paging.type" semantic conventions. It represents the memory + // paging type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'minor' + SystemPagingTypeKey = attribute.Key("system.paging.type") +) + +var ( + // in + SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") + // out + SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") +) + +var ( + // used + SystemPagingStateUsed = SystemPagingStateKey.String("used") + // free + SystemPagingStateFree = SystemPagingStateKey.String("free") +) + +var ( + // major + SystemPagingTypeMajor = SystemPagingTypeKey.String("major") + // minor + SystemPagingTypeMinor = SystemPagingTypeKey.String("minor") +) + +// Describes Filesystem metric attributes +const ( + // SystemFilesystemModeKey is the attribute Key conforming to the + // "system.filesystem.mode" semantic conventions. It represents the + // filesystem mode + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'rw, ro' + SystemFilesystemModeKey = attribute.Key("system.filesystem.mode") + + // SystemFilesystemMountpointKey is the attribute Key conforming to the + // "system.filesystem.mountpoint" semantic conventions. It represents the + // filesystem mount path + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/mnt/data' + SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint") + + // SystemFilesystemStateKey is the attribute Key conforming to the + // "system.filesystem.state" semantic conventions. It represents the + // filesystem state + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'used' + SystemFilesystemStateKey = attribute.Key("system.filesystem.state") + + // SystemFilesystemTypeKey is the attribute Key conforming to the + // "system.filesystem.type" semantic conventions. It represents the + // filesystem type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ext4' + SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") +) + +var ( + // used + SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") + // free + SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") + // reserved + SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") +) + +var ( + // fat32 + SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") + // exfat + SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") + // ntfs + SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") + // refs + SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") + // hfsplus + SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") + // ext4 + SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") +) + +// SystemFilesystemMode returns an attribute KeyValue conforming to the +// "system.filesystem.mode" semantic conventions. It represents the filesystem +// mode +func SystemFilesystemMode(val string) attribute.KeyValue { + return SystemFilesystemModeKey.String(val) +} + +// SystemFilesystemMountpoint returns an attribute KeyValue conforming to +// the "system.filesystem.mountpoint" semantic conventions. It represents the +// filesystem mount path +func SystemFilesystemMountpoint(val string) attribute.KeyValue { + return SystemFilesystemMountpointKey.String(val) +} + +// Describes Network metric attributes +const ( + // SystemNetworkStateKey is the attribute Key conforming to the + // "system.network.state" semantic conventions. It represents a stateless + // protocol MUST NOT set this attribute + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'close_wait' + SystemNetworkStateKey = attribute.Key("system.network.state") +) + +var ( + // close + SystemNetworkStateClose = SystemNetworkStateKey.String("close") + // close_wait + SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait") + // closing + SystemNetworkStateClosing = SystemNetworkStateKey.String("closing") + // delete + SystemNetworkStateDelete = SystemNetworkStateKey.String("delete") + // established + SystemNetworkStateEstablished = SystemNetworkStateKey.String("established") + // fin_wait_1 + SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1") + // fin_wait_2 + SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2") + // last_ack + SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack") + // listen + SystemNetworkStateListen = SystemNetworkStateKey.String("listen") + // syn_recv + SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv") + // syn_sent + SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent") + // time_wait + SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait") +) + +// Describes System Process metric attributes +const ( + // SystemProcessesStatusKey is the attribute Key conforming to the + // "system.processes.status" semantic conventions. It represents the + // process state, e.g., [Linux Process State + // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'running' + SystemProcessesStatusKey = attribute.Key("system.processes.status") +) + +var ( + // running + SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running") + // sleeping + SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping") + // stopped + SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped") + // defunct + SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct") +) + +// These attributes may be used to describe the client in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API doesn't expose a clear +// notion of client and server). This also covers UDP network interactions +// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. +const ( + // ClientAddressKey is the attribute Key conforming to the "client.address" + // semantic conventions. It represents the client address - domain name if + // available without reverse DNS lookup; otherwise, IP address or Unix + // domain socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the server side, and when communicating through + // an intermediary, `client.address` SHOULD represent the client address + // behind any intermediaries, for example proxies, if it's available. + ClientAddressKey = attribute.Key("client.address") + + // ClientPortKey is the attribute Key conforming to the "client.port" + // semantic conventions. It represents the client port number. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + // Note: When observed from the server side, and when communicating through + // an intermediary, `client.port` SHOULD represent the client port behind + // any intermediaries, for example proxies, if it's available. + ClientPortKey = attribute.Key("client.port") +) + +// ClientAddress returns an attribute KeyValue conforming to the +// "client.address" semantic conventions. It represents the client address - +// domain name if available without reverse DNS lookup; otherwise, IP address +// or Unix domain socket name. +func ClientAddress(val string) attribute.KeyValue { + return ClientAddressKey.String(val) +} + +// ClientPort returns an attribute KeyValue conforming to the "client.port" +// semantic conventions. It represents the client port number. +func ClientPort(val int) attribute.KeyValue { + return ClientPortKey.Int(val) +} + +// The attributes used to describe telemetry in the context of databases. +const ( + // DBCassandraConsistencyLevelKey is the attribute Key conforming to the + // "db.cassandra.consistency_level" semantic conventions. It represents the + // consistency level of the query. Based on consistency values from + // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") + + // DBCassandraCoordinatorDCKey is the attribute Key conforming to the + // "db.cassandra.coordinator.dc" semantic conventions. It represents the + // data center of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'us-west-2' + DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") + + // DBCassandraCoordinatorIDKey is the attribute Key conforming to the + // "db.cassandra.coordinator.id" semantic conventions. It represents the ID + // of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") + + // DBCassandraIdempotenceKey is the attribute Key conforming to the + // "db.cassandra.idempotence" semantic conventions. It represents the + // whether or not the query is idempotent. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") + + // DBCassandraPageSizeKey is the attribute Key conforming to the + // "db.cassandra.page_size" semantic conventions. It represents the fetch + // size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 5000 + DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") + + // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming + // to the "db.cassandra.speculative_execution_count" semantic conventions. + // It represents the number of times a query was speculatively executed. + // Not set or `0` if the query was not executed speculatively. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 2 + DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") + + // DBCassandraTableKey is the attribute Key conforming to the + // "db.cassandra.table" semantic conventions. It represents the name of the + // primary Cassandra table that the operation is acting upon, including the + // keyspace name (if applicable). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra + // rather than sql. It is not recommended to attempt any client-side + // parsing of `db.statement` just to get this property, but it should be + // set if it is provided by the library being instrumented. If the + // operation is acting upon an anonymous table, or more than one table, + // this value MUST NOT be set. + DBCassandraTableKey = attribute.Key("db.cassandra.table") + + // DBConnectionStringKey is the attribute Key conforming to the + // "db.connection_string" semantic conventions. It represents the + // connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + DBConnectionStringKey = attribute.Key("db.connection_string") + + // DBCosmosDBClientIDKey is the attribute Key conforming to the + // "db.cosmosdb.client_id" semantic conventions. It represents the unique + // Cosmos client instance id. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") + + // DBCosmosDBConnectionModeKey is the attribute Key conforming to the + // "db.cosmosdb.connection_mode" semantic conventions. It represents the + // cosmos client connection mode. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") + + // DBCosmosDBContainerKey is the attribute Key conforming to the + // "db.cosmosdb.container" semantic conventions. It represents the cosmos + // DB container name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'anystring' + DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") + + // DBCosmosDBOperationTypeKey is the attribute Key conforming to the + // "db.cosmosdb.operation_type" semantic conventions. It represents the + // cosmosDB Operation Type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") + + // DBCosmosDBRequestChargeKey is the attribute Key conforming to the + // "db.cosmosdb.request_charge" semantic conventions. It represents the rU + // consumed for that operation + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 46.18, 1.0 + DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") + + // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the + // "db.cosmosdb.request_content_length" semantic conventions. It represents + // the request payload size in bytes + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") + + // DBCosmosDBStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos + // DB status code. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 200, 201 + DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") + + // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.sub_status_code" semantic conventions. It represents the + // cosmos DB sub status code. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1000, 1002 + DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") + + // DBElasticsearchClusterNameKey is the attribute Key conforming to the + // "db.elasticsearch.cluster.name" semantic conventions. It represents the + // represents the identifier of an Elasticsearch cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' + DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name") + + // DBElasticsearchNodeNameKey is the attribute Key conforming to the + // "db.elasticsearch.node.name" semantic conventions. It represents the + // represents the human-readable identifier of the node/instance to which a + // request was routed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'instance-0000000001' + DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name") + + // DBInstanceIDKey is the attribute Key conforming to the "db.instance.id" + // semantic conventions. It represents an identifier (address, unique name, + // or any other identifier) of the database instance that is executing + // queries or mutations on the current connection. This is useful in cases + // where the database is running in a clustered environment and the + // instrumentation is able to record the node executing the query. The + // client may obtain this value in databases like MySQL using queries like + // `select @@hostname`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'mysql-e26b99z.example.com' + DBInstanceIDKey = attribute.Key("db.instance.id") + + // DBJDBCDriverClassnameKey is the attribute Key conforming to the + // "db.jdbc.driver_classname" semantic conventions. It represents the + // fully-qualified class name of the [Java Database Connectivity + // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) + // driver used to connect. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") + + // DBMongoDBCollectionKey is the attribute Key conforming to the + // "db.mongodb.collection" semantic conventions. It represents the MongoDB + // collection being accessed within the database stated in `db.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'customers', 'products' + DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") + + // DBMSSQLInstanceNameKey is the attribute Key conforming to the + // "db.mssql.instance_name" semantic conventions. It represents the + // Microsoft SQL Server [instance + // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) + // connecting to. This name is used to determine the port of a named + // instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MSSQLSERVER' + // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer + // required (but still recommended if non-standard). + DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") + + // DBNameKey is the attribute Key conforming to the "db.name" semantic + // conventions. It represents the this attribute is used to report the name + // of the database being accessed. For commands that switch the database, + // this should be set to the target database (even if the command fails). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called + // "schema name". In case there are multiple layers that could be + // considered for database name (e.g. Oracle instance name and schema + // name), the database name to be used is the more specific layer (e.g. + // Oracle schema name). + DBNameKey = attribute.Key("db.name") + + // DBOperationKey is the attribute Key conforming to the "db.operation" + // semantic conventions. It represents the name of the operation being + // executed, e.g. the [MongoDB command + // name](https://docs.mongodb.com/manual/reference/command/#database-operations) + // such as `findAndModify`, or the SQL keyword. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to + // attempt any client-side parsing of `db.statement` just to get this + // property, but it should be set if the operation name is provided by the + // library being instrumented. If the SQL statement has an ambiguous + // operation, or performs more than one operation, this value may be + // omitted. + DBOperationKey = attribute.Key("db.operation") + + // DBRedisDBIndexKey is the attribute Key conforming to the + // "db.redis.database_index" semantic conventions. It represents the index + // of the database being accessed as used in the [`SELECT` + // command](https://redis.io/commands/select), provided as an integer. To + // be used instead of the generic `db.name` attribute. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 1, 15 + DBRedisDBIndexKey = attribute.Key("db.redis.database_index") + + // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" + // semantic conventions. It represents the name of the primary table that + // the operation is acting upon, including the database name (if + // applicable). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting + // upon an anonymous table, or more than one table, this value MUST NOT be + // set. + DBSQLTableKey = attribute.Key("db.sql.table") + + // DBStatementKey is the attribute Key conforming to the "db.statement" + // semantic conventions. It represents the database statement being + // executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + DBStatementKey = attribute.Key("db.statement") + + // DBSystemKey is the attribute Key conforming to the "db.system" semantic + // conventions. It represents an identifier for the database management + // system (DBMS) product being used. See below for a list of well-known + // identifiers. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBSystemKey = attribute.Key("db.system") + + // DBUserKey is the attribute Key conforming to the "db.user" semantic + // conventions. It represents the username for accessing the database. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'readonly_user', 'reporting_user' + DBUserKey = attribute.Key("db.user") +) + +var ( + // all + DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") + // each_quorum + DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") + // quorum + DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") + // local_quorum + DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") + // one + DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") + // two + DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") + // three + DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") + // local_one + DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") + // any + DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") + // serial + DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") + // local_serial + DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") +) + +var ( + // Gateway (HTTP) connections mode + DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") + // Direct connection + DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") +) + +var ( + // invalid + DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") + // create + DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") + // patch + DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") + // read + DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") + // read_feed + DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") + // delete + DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") + // replace + DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") + // execute + DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") + // query + DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") + // head + DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") + // head_feed + DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") + // upsert + DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") + // batch + DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") + // query_plan + DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") + // execute_javascript + DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") +) + +var ( + // Some other SQL database. Fallback only. See notes + DBSystemOtherSQL = DBSystemKey.String("other_sql") + // Microsoft SQL Server + DBSystemMSSQL = DBSystemKey.String("mssql") + // Microsoft SQL Server Compact + DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") + // MySQL + DBSystemMySQL = DBSystemKey.String("mysql") + // Oracle Database + DBSystemOracle = DBSystemKey.String("oracle") + // IBM DB2 + DBSystemDB2 = DBSystemKey.String("db2") + // PostgreSQL + DBSystemPostgreSQL = DBSystemKey.String("postgresql") + // Amazon Redshift + DBSystemRedshift = DBSystemKey.String("redshift") + // Apache Hive + DBSystemHive = DBSystemKey.String("hive") + // Cloudscape + DBSystemCloudscape = DBSystemKey.String("cloudscape") + // HyperSQL DataBase + DBSystemHSQLDB = DBSystemKey.String("hsqldb") + // Progress Database + DBSystemProgress = DBSystemKey.String("progress") + // SAP MaxDB + DBSystemMaxDB = DBSystemKey.String("maxdb") + // SAP HANA + DBSystemHanaDB = DBSystemKey.String("hanadb") + // Ingres + DBSystemIngres = DBSystemKey.String("ingres") + // FirstSQL + DBSystemFirstSQL = DBSystemKey.String("firstsql") + // EnterpriseDB + DBSystemEDB = DBSystemKey.String("edb") + // InterSystems Caché + DBSystemCache = DBSystemKey.String("cache") + // Adabas (Adaptable Database System) + DBSystemAdabas = DBSystemKey.String("adabas") + // Firebird + DBSystemFirebird = DBSystemKey.String("firebird") + // Apache Derby + DBSystemDerby = DBSystemKey.String("derby") + // FileMaker + DBSystemFilemaker = DBSystemKey.String("filemaker") + // Informix + DBSystemInformix = DBSystemKey.String("informix") + // InstantDB + DBSystemInstantDB = DBSystemKey.String("instantdb") + // InterBase + DBSystemInterbase = DBSystemKey.String("interbase") + // MariaDB + DBSystemMariaDB = DBSystemKey.String("mariadb") + // Netezza + DBSystemNetezza = DBSystemKey.String("netezza") + // Pervasive PSQL + DBSystemPervasive = DBSystemKey.String("pervasive") + // PointBase + DBSystemPointbase = DBSystemKey.String("pointbase") + // SQLite + DBSystemSqlite = DBSystemKey.String("sqlite") + // Sybase + DBSystemSybase = DBSystemKey.String("sybase") + // Teradata + DBSystemTeradata = DBSystemKey.String("teradata") + // Vertica + DBSystemVertica = DBSystemKey.String("vertica") + // H2 + DBSystemH2 = DBSystemKey.String("h2") + // ColdFusion IMQ + DBSystemColdfusion = DBSystemKey.String("coldfusion") + // Apache Cassandra + DBSystemCassandra = DBSystemKey.String("cassandra") + // Apache HBase + DBSystemHBase = DBSystemKey.String("hbase") + // MongoDB + DBSystemMongoDB = DBSystemKey.String("mongodb") + // Redis + DBSystemRedis = DBSystemKey.String("redis") + // Couchbase + DBSystemCouchbase = DBSystemKey.String("couchbase") + // CouchDB + DBSystemCouchDB = DBSystemKey.String("couchdb") + // Microsoft Azure Cosmos DB + DBSystemCosmosDB = DBSystemKey.String("cosmosdb") + // Amazon DynamoDB + DBSystemDynamoDB = DBSystemKey.String("dynamodb") + // Neo4j + DBSystemNeo4j = DBSystemKey.String("neo4j") + // Apache Geode + DBSystemGeode = DBSystemKey.String("geode") + // Elasticsearch + DBSystemElasticsearch = DBSystemKey.String("elasticsearch") + // Memcached + DBSystemMemcached = DBSystemKey.String("memcached") + // CockroachDB + DBSystemCockroachdb = DBSystemKey.String("cockroachdb") + // OpenSearch + DBSystemOpensearch = DBSystemKey.String("opensearch") + // ClickHouse + DBSystemClickhouse = DBSystemKey.String("clickhouse") + // Cloud Spanner + DBSystemSpanner = DBSystemKey.String("spanner") + // Trino + DBSystemTrino = DBSystemKey.String("trino") +) + +// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.dc" semantic conventions. It represents the data +// center of the coordinating node for a query. +func DBCassandraCoordinatorDC(val string) attribute.KeyValue { + return DBCassandraCoordinatorDCKey.String(val) +} + +// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of +// the coordinating node for a query. +func DBCassandraCoordinatorID(val string) attribute.KeyValue { + return DBCassandraCoordinatorIDKey.String(val) +} + +// DBCassandraIdempotence returns an attribute KeyValue conforming to the +// "db.cassandra.idempotence" semantic conventions. It represents the whether +// or not the query is idempotent. +func DBCassandraIdempotence(val bool) attribute.KeyValue { + return DBCassandraIdempotenceKey.Bool(val) +} + +// DBCassandraPageSize returns an attribute KeyValue conforming to the +// "db.cassandra.page_size" semantic conventions. It represents the fetch size +// used for paging, i.e. how many rows will be returned at once. +func DBCassandraPageSize(val int) attribute.KeyValue { + return DBCassandraPageSizeKey.Int(val) +} + +// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue +// conforming to the "db.cassandra.speculative_execution_count" semantic +// conventions. It represents the number of times a query was speculatively +// executed. Not set or `0` if the query was not executed speculatively. +func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { + return DBCassandraSpeculativeExecutionCountKey.Int(val) +} + +// DBCassandraTable returns an attribute KeyValue conforming to the +// "db.cassandra.table" semantic conventions. It represents the name of the +// primary Cassandra table that the operation is acting upon, including the +// keyspace name (if applicable). +func DBCassandraTable(val string) attribute.KeyValue { + return DBCassandraTableKey.String(val) +} + +// DBConnectionString returns an attribute KeyValue conforming to the +// "db.connection_string" semantic conventions. It represents the connection +// string used to connect to the database. It is recommended to remove embedded +// credentials. +func DBConnectionString(val string) attribute.KeyValue { + return DBConnectionStringKey.String(val) +} + +// DBCosmosDBClientID returns an attribute KeyValue conforming to the +// "db.cosmosdb.client_id" semantic conventions. It represents the unique +// Cosmos client instance id. +func DBCosmosDBClientID(val string) attribute.KeyValue { + return DBCosmosDBClientIDKey.String(val) +} + +// DBCosmosDBContainer returns an attribute KeyValue conforming to the +// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB +// container name. +func DBCosmosDBContainer(val string) attribute.KeyValue { + return DBCosmosDBContainerKey.String(val) +} + +// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the +// "db.cosmosdb.request_charge" semantic conventions. It represents the rU +// consumed for that operation +func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { + return DBCosmosDBRequestChargeKey.Float64(val) +} + +// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming +// to the "db.cosmosdb.request_content_length" semantic conventions. It +// represents the request payload size in bytes +func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { + return DBCosmosDBRequestContentLengthKey.Int(val) +} + +// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB +// status code. +func DBCosmosDBStatusCode(val int) attribute.KeyValue { + return DBCosmosDBStatusCodeKey.Int(val) +} + +// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos +// DB sub status code. +func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { + return DBCosmosDBSubStatusCodeKey.Int(val) +} + +// DBElasticsearchClusterName returns an attribute KeyValue conforming to +// the "db.elasticsearch.cluster.name" semantic conventions. It represents the +// represents the identifier of an Elasticsearch cluster. +func DBElasticsearchClusterName(val string) attribute.KeyValue { + return DBElasticsearchClusterNameKey.String(val) +} + +// DBElasticsearchNodeName returns an attribute KeyValue conforming to the +// "db.elasticsearch.node.name" semantic conventions. It represents the +// represents the human-readable identifier of the node/instance to which a +// request was routed. +func DBElasticsearchNodeName(val string) attribute.KeyValue { + return DBElasticsearchNodeNameKey.String(val) +} + +// DBInstanceID returns an attribute KeyValue conforming to the +// "db.instance.id" semantic conventions. It represents an identifier (address, +// unique name, or any other identifier) of the database instance that is +// executing queries or mutations on the current connection. This is useful in +// cases where the database is running in a clustered environment and the +// instrumentation is able to record the node executing the query. The client +// may obtain this value in databases like MySQL using queries like `select +// @@hostname`. +func DBInstanceID(val string) attribute.KeyValue { + return DBInstanceIDKey.String(val) +} + +// DBJDBCDriverClassname returns an attribute KeyValue conforming to the +// "db.jdbc.driver_classname" semantic conventions. It represents the +// fully-qualified class name of the [Java Database Connectivity +// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver +// used to connect. +func DBJDBCDriverClassname(val string) attribute.KeyValue { + return DBJDBCDriverClassnameKey.String(val) +} + +// DBMongoDBCollection returns an attribute KeyValue conforming to the +// "db.mongodb.collection" semantic conventions. It represents the MongoDB +// collection being accessed within the database stated in `db.name`. +func DBMongoDBCollection(val string) attribute.KeyValue { + return DBMongoDBCollectionKey.String(val) +} + +// DBMSSQLInstanceName returns an attribute KeyValue conforming to the +// "db.mssql.instance_name" semantic conventions. It represents the Microsoft +// SQL Server [instance +// name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) +// connecting to. This name is used to determine the port of a named instance. +func DBMSSQLInstanceName(val string) attribute.KeyValue { + return DBMSSQLInstanceNameKey.String(val) +} + +// DBName returns an attribute KeyValue conforming to the "db.name" semantic +// conventions. It represents the this attribute is used to report the name of +// the database being accessed. For commands that switch the database, this +// should be set to the target database (even if the command fails). +func DBName(val string) attribute.KeyValue { + return DBNameKey.String(val) +} + +// DBOperation returns an attribute KeyValue conforming to the +// "db.operation" semantic conventions. It represents the name of the operation +// being executed, e.g. the [MongoDB command +// name](https://docs.mongodb.com/manual/reference/command/#database-operations) +// such as `findAndModify`, or the SQL keyword. +func DBOperation(val string) attribute.KeyValue { + return DBOperationKey.String(val) +} + +// DBRedisDBIndex returns an attribute KeyValue conforming to the +// "db.redis.database_index" semantic conventions. It represents the index of +// the database being accessed as used in the [`SELECT` +// command](https://redis.io/commands/select), provided as an integer. To be +// used instead of the generic `db.name` attribute. +func DBRedisDBIndex(val int) attribute.KeyValue { + return DBRedisDBIndexKey.Int(val) +} + +// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" +// semantic conventions. It represents the name of the primary table that the +// operation is acting upon, including the database name (if applicable). +func DBSQLTable(val string) attribute.KeyValue { + return DBSQLTableKey.String(val) +} + +// DBStatement returns an attribute KeyValue conforming to the +// "db.statement" semantic conventions. It represents the database statement +// being executed. +func DBStatement(val string) attribute.KeyValue { + return DBStatementKey.String(val) +} + +// DBUser returns an attribute KeyValue conforming to the "db.user" semantic +// conventions. It represents the username for accessing the database. +func DBUser(val string) attribute.KeyValue { + return DBUserKey.String(val) +} + +// Describes deprecated HTTP attributes. +const ( + // HTTPFlavorKey is the attribute Key conforming to the "http.flavor" + // semantic conventions. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: deprecated + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorKey = attribute.Key("http.flavor") + + // HTTPMethodKey is the attribute Key conforming to the "http.method" + // semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'GET', 'POST', 'HEAD' + // Deprecated: use `http.request.method` instead. + HTTPMethodKey = attribute.Key("http.method") + + // HTTPRequestContentLengthKey is the attribute Key conforming to the + // "http.request_content_length" semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 3495 + // Deprecated: use `http.request.header.content-length` instead. + HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") + + // HTTPResponseContentLengthKey is the attribute Key conforming to the + // "http.response_content_length" semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 3495 + // Deprecated: use `http.response.header.content-length` instead. + HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") + + // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" + // semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'http', 'https' + // Deprecated: use `url.scheme` instead. + HTTPSchemeKey = attribute.Key("http.scheme") + + // HTTPStatusCodeKey is the attribute Key conforming to the + // "http.status_code" semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 200 + // Deprecated: use `http.response.status_code` instead. + HTTPStatusCodeKey = attribute.Key("http.status_code") + + // HTTPTargetKey is the attribute Key conforming to the "http.target" + // semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '/search?q=OpenTelemetry#SemConv' + // Deprecated: use `url.path` and `url.query` instead. + HTTPTargetKey = attribute.Key("http.target") + + // HTTPURLKey is the attribute Key conforming to the "http.url" semantic + // conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' + // Deprecated: use `url.full` instead. + HTTPURLKey = attribute.Key("http.url") + + // HTTPUserAgentKey is the attribute Key conforming to the + // "http.user_agent" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU + // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) + // Version/14.1.2 Mobile/15E148 Safari/604.1' + // Deprecated: use `user_agent.original` instead. + HTTPUserAgentKey = attribute.Key("http.user_agent") +) + +var ( + // HTTP/1.0 + // + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0") + // HTTP/1.1 + // + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1") + // HTTP/2 + // + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0") + // HTTP/3 + // + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0") + // SPDY protocol + // + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY") + // QUIC protocol + // + // Deprecated: use `network.protocol.name` instead. + HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") +) + +// HTTPMethod returns an attribute KeyValue conforming to the "http.method" +// semantic conventions. +// +// Deprecated: use `http.request.method` instead. +func HTTPMethod(val string) attribute.KeyValue { + return HTTPMethodKey.String(val) +} + +// HTTPRequestContentLength returns an attribute KeyValue conforming to the +// "http.request_content_length" semantic conventions. +// +// Deprecated: use `http.request.header.content-length` instead. +func HTTPRequestContentLength(val int) attribute.KeyValue { + return HTTPRequestContentLengthKey.Int(val) +} + +// HTTPResponseContentLength returns an attribute KeyValue conforming to the +// "http.response_content_length" semantic conventions. +// +// Deprecated: use `http.response.header.content-length` instead. +func HTTPResponseContentLength(val int) attribute.KeyValue { + return HTTPResponseContentLengthKey.Int(val) +} + +// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" +// semantic conventions. +// +// Deprecated: use `url.scheme` instead. +func HTTPScheme(val string) attribute.KeyValue { + return HTTPSchemeKey.String(val) +} + +// HTTPStatusCode returns an attribute KeyValue conforming to the +// "http.status_code" semantic conventions. +// +// Deprecated: use `http.response.status_code` instead. +func HTTPStatusCode(val int) attribute.KeyValue { + return HTTPStatusCodeKey.Int(val) +} + +// HTTPTarget returns an attribute KeyValue conforming to the "http.target" +// semantic conventions. +// +// Deprecated: use `url.path` and `url.query` instead. +func HTTPTarget(val string) attribute.KeyValue { + return HTTPTargetKey.String(val) +} + +// HTTPURL returns an attribute KeyValue conforming to the "http.url" +// semantic conventions. +// +// Deprecated: use `url.full` instead. +func HTTPURL(val string) attribute.KeyValue { + return HTTPURLKey.String(val) +} + +// HTTPUserAgent returns an attribute KeyValue conforming to the +// "http.user_agent" semantic conventions. +// +// Deprecated: use `user_agent.original` instead. +func HTTPUserAgent(val string) attribute.KeyValue { + return HTTPUserAgentKey.String(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetHostNameKey is the attribute Key conforming to the "net.host.name" + // semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'example.com' + // Deprecated: use `server.address`. + NetHostNameKey = attribute.Key("net.host.name") + + // NetHostPortKey is the attribute Key conforming to the "net.host.port" + // semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 8080 + // Deprecated: use `server.port`. + NetHostPortKey = attribute.Key("net.host.port") + + // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" + // semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'example.com' + // Deprecated: use `server.address` on client spans and `client.address` on + // server spans. + NetPeerNameKey = attribute.Key("net.peer.name") + + // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" + // semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 8080 + // Deprecated: use `server.port` on client spans and `client.port` on + // server spans. + NetPeerPortKey = attribute.Key("net.peer.port") + + // NetProtocolNameKey is the attribute Key conforming to the + // "net.protocol.name" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'amqp', 'http', 'mqtt' + // Deprecated: use `network.protocol.name`. + NetProtocolNameKey = attribute.Key("net.protocol.name") + + // NetProtocolVersionKey is the attribute Key conforming to the + // "net.protocol.version" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '3.1.1' + // Deprecated: use `network.protocol.version`. + NetProtocolVersionKey = attribute.Key("net.protocol.version") + + // NetSockFamilyKey is the attribute Key conforming to the + // "net.sock.family" semantic conventions. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: deprecated + // Deprecated: use `network.transport` and `network.type`. + NetSockFamilyKey = attribute.Key("net.sock.family") + + // NetSockHostAddrKey is the attribute Key conforming to the + // "net.sock.host.addr" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '/var/my.sock' + // Deprecated: use `network.local.address`. + NetSockHostAddrKey = attribute.Key("net.sock.host.addr") + + // NetSockHostPortKey is the attribute Key conforming to the + // "net.sock.host.port" semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 8080 + // Deprecated: use `network.local.port`. + NetSockHostPortKey = attribute.Key("net.sock.host.port") + + // NetSockPeerAddrKey is the attribute Key conforming to the + // "net.sock.peer.addr" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '192.168.0.1' + // Deprecated: use `network.peer.address`. + NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") + + // NetSockPeerNameKey is the attribute Key conforming to the + // "net.sock.peer.name" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '/var/my.sock' + // Deprecated: no replacement at this time. + NetSockPeerNameKey = attribute.Key("net.sock.peer.name") + + // NetSockPeerPortKey is the attribute Key conforming to the + // "net.sock.peer.port" semantic conventions. + // + // Type: int + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 65531 + // Deprecated: use `network.peer.port`. + NetSockPeerPortKey = attribute.Key("net.sock.peer.port") + + // NetTransportKey is the attribute Key conforming to the "net.transport" + // semantic conventions. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: deprecated + // Deprecated: use `network.transport`. + NetTransportKey = attribute.Key("net.transport") +) + +var ( + // IPv4 address + // + // Deprecated: use `network.transport` and `network.type`. + NetSockFamilyInet = NetSockFamilyKey.String("inet") + // IPv6 address + // + // Deprecated: use `network.transport` and `network.type`. + NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") + // Unix domain socket path + // + // Deprecated: use `network.transport` and `network.type`. + NetSockFamilyUnix = NetSockFamilyKey.String("unix") +) + +var ( + // ip_tcp + // + // Deprecated: use `network.transport`. + NetTransportTCP = NetTransportKey.String("ip_tcp") + // ip_udp + // + // Deprecated: use `network.transport`. + NetTransportUDP = NetTransportKey.String("ip_udp") + // Named or anonymous pipe + // + // Deprecated: use `network.transport`. + NetTransportPipe = NetTransportKey.String("pipe") + // In-process communication + // + // Deprecated: use `network.transport`. + NetTransportInProc = NetTransportKey.String("inproc") + // Something else (non IP-based) + // + // Deprecated: use `network.transport`. + NetTransportOther = NetTransportKey.String("other") +) + +// NetHostName returns an attribute KeyValue conforming to the +// "net.host.name" semantic conventions. +// +// Deprecated: use `server.address`. +func NetHostName(val string) attribute.KeyValue { + return NetHostNameKey.String(val) +} + +// NetHostPort returns an attribute KeyValue conforming to the +// "net.host.port" semantic conventions. +// +// Deprecated: use `server.port`. +func NetHostPort(val int) attribute.KeyValue { + return NetHostPortKey.Int(val) +} + +// NetPeerName returns an attribute KeyValue conforming to the +// "net.peer.name" semantic conventions. +// +// Deprecated: use `server.address` on client spans and `client.address` on +// server spans. +func NetPeerName(val string) attribute.KeyValue { + return NetPeerNameKey.String(val) +} + +// NetPeerPort returns an attribute KeyValue conforming to the +// "net.peer.port" semantic conventions. +// +// Deprecated: use `server.port` on client spans and `client.port` on server +// spans. +func NetPeerPort(val int) attribute.KeyValue { + return NetPeerPortKey.Int(val) +} + +// NetProtocolName returns an attribute KeyValue conforming to the +// "net.protocol.name" semantic conventions. +// +// Deprecated: use `network.protocol.name`. +func NetProtocolName(val string) attribute.KeyValue { + return NetProtocolNameKey.String(val) +} + +// NetProtocolVersion returns an attribute KeyValue conforming to the +// "net.protocol.version" semantic conventions. +// +// Deprecated: use `network.protocol.version`. +func NetProtocolVersion(val string) attribute.KeyValue { + return NetProtocolVersionKey.String(val) +} + +// NetSockHostAddr returns an attribute KeyValue conforming to the +// "net.sock.host.addr" semantic conventions. +// +// Deprecated: use `network.local.address`. +func NetSockHostAddr(val string) attribute.KeyValue { + return NetSockHostAddrKey.String(val) +} + +// NetSockHostPort returns an attribute KeyValue conforming to the +// "net.sock.host.port" semantic conventions. +// +// Deprecated: use `network.local.port`. +func NetSockHostPort(val int) attribute.KeyValue { + return NetSockHostPortKey.Int(val) +} + +// NetSockPeerAddr returns an attribute KeyValue conforming to the +// "net.sock.peer.addr" semantic conventions. +// +// Deprecated: use `network.peer.address`. +func NetSockPeerAddr(val string) attribute.KeyValue { + return NetSockPeerAddrKey.String(val) +} + +// NetSockPeerName returns an attribute KeyValue conforming to the +// "net.sock.peer.name" semantic conventions. +// +// Deprecated: no replacement at this time. +func NetSockPeerName(val string) attribute.KeyValue { + return NetSockPeerNameKey.String(val) +} + +// NetSockPeerPort returns an attribute KeyValue conforming to the +// "net.sock.peer.port" semantic conventions. +// +// Deprecated: use `network.peer.port`. +func NetSockPeerPort(val int) attribute.KeyValue { + return NetSockPeerPortKey.Int(val) +} + +// These attributes may be used to describe the receiver of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API doesn't expose a clear notion of +// client and server. +const ( + // DestinationAddressKey is the attribute Key conforming to the + // "destination.address" semantic conventions. It represents the + // destination address - domain name if available without reverse DNS + // lookup; otherwise, IP address or Unix domain socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the source side, and when communicating through + // an intermediary, `destination.address` SHOULD represent the destination + // address behind any intermediaries, for example proxies, if it's + // available. + DestinationAddressKey = attribute.Key("destination.address") + + // DestinationPortKey is the attribute Key conforming to the + // "destination.port" semantic conventions. It represents the destination + // port number + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3389, 2888 + DestinationPortKey = attribute.Key("destination.port") +) + +// DestinationAddress returns an attribute KeyValue conforming to the +// "destination.address" semantic conventions. It represents the destination +// address - domain name if available without reverse DNS lookup; otherwise, IP +// address or Unix domain socket name. +func DestinationAddress(val string) attribute.KeyValue { + return DestinationAddressKey.String(val) +} + +// DestinationPort returns an attribute KeyValue conforming to the +// "destination.port" semantic conventions. It represents the destination port +// number +func DestinationPort(val int) attribute.KeyValue { + return DestinationPortKey.Int(val) +} + +// These attributes may be used for any disk related operation. +const ( + // DiskIoDirectionKey is the attribute Key conforming to the + // "disk.io.direction" semantic conventions. It represents the disk IO + // operation direction. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'read' + DiskIoDirectionKey = attribute.Key("disk.io.direction") +) + +var ( + // read + DiskIoDirectionRead = DiskIoDirectionKey.String("read") + // write + DiskIoDirectionWrite = DiskIoDirectionKey.String("write") +) + +// The shared attributes used to report an error. +const ( + // ErrorTypeKey is the attribute Key conforming to the "error.type" + // semantic conventions. It represents the describes a class of error the + // operation ended with. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'timeout', 'java.net.UnknownHostException', + // 'server_certificate_invalid', '500' + // Note: The `error.type` SHOULD be predictable and SHOULD have low + // cardinality. + // Instrumentations SHOULD document the list of errors they report. + // + // The cardinality of `error.type` within one instrumentation library + // SHOULD be low. + // Telemetry consumers that aggregate data from multiple instrumentation + // libraries and applications + // should be prepared for `error.type` to have high cardinality at query + // time when no + // additional filters are applied. + // + // If the operation has completed successfully, instrumentations SHOULD NOT + // set `error.type`. + // + // If a specific domain defines its own set of error identifiers (such as + // HTTP or gRPC status codes), + // it's RECOMMENDED to: + // + // * Use a domain-specific attribute + // * Set `error.type` to capture all errors, regardless of whether they are + // defined within the domain-specific set or not. + ErrorTypeKey = attribute.Key("error.type") +) + +var ( + // A fallback error value to be used when the instrumentation doesn't define a custom value + ErrorTypeOther = ErrorTypeKey.String("_OTHER") +) + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // ExceptionEscapedKey is the attribute Key conforming to the + // "exception.escaped" semantic conventions. It represents the sHOULD be + // set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Note: An exception is considered to have escaped (or left) the scope of + // a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's `__exit__` method in Python) but will + // usually be caught at the point of recording the exception in most + // languages. + // + // It is usually not possible to determine at the point where an exception + // is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending + // the span, + // as done in the [example for recording span + // exceptions](#recording-an-exception). + // + // It follows that an exception may still escape the scope of the span + // even if the `exception.escaped` attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + ExceptionEscapedKey = attribute.Key("exception.escaped") + + // ExceptionMessageKey is the attribute Key conforming to the + // "exception.message" semantic conventions. It represents the exception + // message. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Division by zero', "Can't convert 'int' object to str + // implicitly" + ExceptionMessageKey = attribute.Key("exception.message") + + // ExceptionStacktraceKey is the attribute Key conforming to the + // "exception.stacktrace" semantic conventions. It represents a stacktrace + // as a string in the natural representation for the language runtime. The + // representation is to be determined and documented by each language SIG. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + ExceptionStacktraceKey = attribute.Key("exception.stacktrace") + + // ExceptionTypeKey is the attribute Key conforming to the "exception.type" + // semantic conventions. It represents the type of the exception (its + // fully-qualified class name, if applicable). The dynamic type of the + // exception should be preferred over the static type in languages that + // support it. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'java.net.ConnectException', 'OSError' + ExceptionTypeKey = attribute.Key("exception.type") +) + +// ExceptionEscaped returns an attribute KeyValue conforming to the +// "exception.escaped" semantic conventions. It represents the sHOULD be set to +// true if the exception event is recorded at a point where it is known that +// the exception is escaping the scope of the span. +func ExceptionEscaped(val bool) attribute.KeyValue { + return ExceptionEscapedKey.Bool(val) +} + +// ExceptionMessage returns an attribute KeyValue conforming to the +// "exception.message" semantic conventions. It represents the exception +// message. +func ExceptionMessage(val string) attribute.KeyValue { + return ExceptionMessageKey.String(val) +} + +// ExceptionStacktrace returns an attribute KeyValue conforming to the +// "exception.stacktrace" semantic conventions. It represents a stacktrace as a +// string in the natural representation for the language runtime. The +// representation is to be determined and documented by each language SIG. +func ExceptionStacktrace(val string) attribute.KeyValue { + return ExceptionStacktraceKey.String(val) +} + +// ExceptionType returns an attribute KeyValue conforming to the +// "exception.type" semantic conventions. It represents the type of the +// exception (its fully-qualified class name, if applicable). The dynamic type +// of the exception should be preferred over the static type in languages that +// support it. +func ExceptionType(val string) attribute.KeyValue { + return ExceptionTypeKey.String(val) +} + +// Semantic convention attributes in the HTTP namespace. +const ( + // HTTPRequestBodySizeKey is the attribute Key conforming to the + // "http.request.body.size" semantic conventions. It represents the size of + // the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3495 + HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") + + // HTTPRequestMethodKey is the attribute Key conforming to the + // "http.request.method" semantic conventions. It represents the hTTP + // request method. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + // Note: HTTP request method value SHOULD be "known" to the + // instrumentation. + // By default, this convention defines "known" methods as the ones listed + // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) + // and the PATCH method defined in + // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). + // + // If the HTTP request method is not known to instrumentation, it MUST set + // the `http.request.method` attribute to `_OTHER`. + // + // If the HTTP instrumentation could end up converting valid HTTP request + // methods to `_OTHER`, then it MUST provide a way to override + // the list of known HTTP methods. If this override is done via environment + // variable, then the environment variable MUST be named + // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated + // list of case-sensitive known HTTP methods + // (this list MUST be a full override of the default known method, it is + // not a list of known methods in addition to the defaults). + // + // HTTP method names are case-sensitive and `http.request.method` attribute + // value MUST match a known HTTP method name exactly. + // Instrumentations for specific web frameworks that consider HTTP methods + // to be case insensitive, SHOULD populate a canonical equivalent. + // Tracing instrumentations that do so, MUST also set + // `http.request.method_original` to the original value. + HTTPRequestMethodKey = attribute.Key("http.request.method") + + // HTTPRequestMethodOriginalKey is the attribute Key conforming to the + // "http.request.method_original" semantic conventions. It represents the + // original HTTP method sent by the client in the request line. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'GeT', 'ACL', 'foo' + HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") + + // HTTPRequestResendCountKey is the attribute Key conforming to the + // "http.request.resend_count" semantic conventions. It represents the + // ordinal number of request resending attempt (for any reason, including + // redirects). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3 + // Note: The resend count SHOULD be updated each time an HTTP request gets + // resent by the client, regardless of what was the cause of the resending + // (e.g. redirection, authorization failure, 503 Server Unavailable, + // network issues, or any other). + HTTPRequestResendCountKey = attribute.Key("http.request.resend_count") + + // HTTPResponseBodySizeKey is the attribute Key conforming to the + // "http.response.body.size" semantic conventions. It represents the size + // of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3495 + HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") + + // HTTPResponseStatusCodeKey is the attribute Key conforming to the + // "http.response.status_code" semantic conventions. It represents the + // [HTTP response status + // code](https://tools.ietf.org/html/rfc7231#section-6). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 200 + HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") + + // HTTPRouteKey is the attribute Key conforming to the "http.route" + // semantic conventions. It represents the matched route, that is, the path + // template in the format used by the respective server framework. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/users/:userID?', '{controller}/{action}/{id?}' + // Note: MUST NOT be populated when this is not supported by the HTTP + // server framework as the route attribute should have low-cardinality and + // the URI path can NOT substitute it. + // SHOULD include the [application + // root](/docs/http/http-spans.md#http-server-definitions) if there is one. + HTTPRouteKey = attribute.Key("http.route") +) + +var ( + // CONNECT method + HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") + // DELETE method + HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") + // GET method + HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") + // HEAD method + HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") + // OPTIONS method + HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") + // PATCH method + HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") + // POST method + HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") + // PUT method + HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") + // TRACE method + HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") + // Any HTTP method that the instrumentation has no prior knowledge of + HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") +) + +// HTTPRequestBodySize returns an attribute KeyValue conforming to the +// "http.request.body.size" semantic conventions. It represents the size of the +// request payload body in bytes. This is the number of bytes transferred +// excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPRequestBodySize(val int) attribute.KeyValue { + return HTTPRequestBodySizeKey.Int(val) +} + +// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the +// "http.request.method_original" semantic conventions. It represents the +// original HTTP method sent by the client in the request line. +func HTTPRequestMethodOriginal(val string) attribute.KeyValue { + return HTTPRequestMethodOriginalKey.String(val) +} + +// HTTPRequestResendCount returns an attribute KeyValue conforming to the +// "http.request.resend_count" semantic conventions. It represents the ordinal +// number of request resending attempt (for any reason, including redirects). +func HTTPRequestResendCount(val int) attribute.KeyValue { + return HTTPRequestResendCountKey.Int(val) +} + +// HTTPResponseBodySize returns an attribute KeyValue conforming to the +// "http.response.body.size" semantic conventions. It represents the size of +// the response payload body in bytes. This is the number of bytes transferred +// excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPResponseBodySize(val int) attribute.KeyValue { + return HTTPResponseBodySizeKey.Int(val) +} + +// HTTPResponseStatusCode returns an attribute KeyValue conforming to the +// "http.response.status_code" semantic conventions. It represents the [HTTP +// response status code](https://tools.ietf.org/html/rfc7231#section-6). +func HTTPResponseStatusCode(val int) attribute.KeyValue { + return HTTPResponseStatusCodeKey.Int(val) +} + +// HTTPRoute returns an attribute KeyValue conforming to the "http.route" +// semantic conventions. It represents the matched route, that is, the path +// template in the format used by the respective server framework. +func HTTPRoute(val string) attribute.KeyValue { + return HTTPRouteKey.String(val) +} + +// Attributes describing telemetry around messaging systems and messaging +// activities. +const ( + // MessagingBatchMessageCountKey is the attribute Key conforming to the + // "messaging.batch.message_count" semantic conventions. It represents the + // number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on + // spans that operate with a single message. When a messaging client + // library supports both batch and single-message API for the same + // operation, instrumentations SHOULD use `messaging.batch.message_count` + // for batching APIs and SHOULD NOT use it for single-message APIs. + MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") + + // MessagingClientIDKey is the attribute Key conforming to the + // "messaging.client_id" semantic conventions. It represents a unique + // identifier for the client that consumes or produces a message. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'client-5', 'myhost@8742@s8083jm' + MessagingClientIDKey = attribute.Key("messaging.client_id") + + // MessagingDestinationAnonymousKey is the attribute Key conforming to the + // "messaging.destination.anonymous" semantic conventions. It represents a + // boolean that is true if the message destination is anonymous (could be + // unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") + + // MessagingDestinationNameKey is the attribute Key conforming to the + // "messaging.destination.name" semantic conventions. It represents the + // message destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MyQueue', 'MyTopic' + // Note: Destination name SHOULD uniquely identify a specific queue, topic + // or other entity within the broker. If + // the broker doesn't have such notion, the destination name SHOULD + // uniquely identify the broker. + MessagingDestinationNameKey = attribute.Key("messaging.destination.name") + + // MessagingDestinationTemplateKey is the attribute Key conforming to the + // "messaging.destination.template" semantic conventions. It represents the + // low cardinality representation of the messaging destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/customers/{customerID}' + // Note: Destination names could be constructed from templates. An example + // would be a destination name involving a user name or product id. + // Although the destination name in this case is of high cardinality, the + // underlying template is of low cardinality and can be effectively used + // for grouping and aggregation. + MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") + + // MessagingDestinationTemporaryKey is the attribute Key conforming to the + // "messaging.destination.temporary" semantic conventions. It represents a + // boolean that is true if the message destination is temporary and might + // not exist anymore after messages are processed. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") + + // MessagingDestinationPublishAnonymousKey is the attribute Key conforming + // to the "messaging.destination_publish.anonymous" semantic conventions. + // It represents a boolean that is true if the publish message destination + // is anonymous (could be unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous") + + // MessagingDestinationPublishNameKey is the attribute Key conforming to + // the "messaging.destination_publish.name" semantic conventions. It + // represents the name of the original destination the message was + // published to + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MyQueue', 'MyTopic' + // Note: The name SHOULD uniquely identify a specific queue, topic, or + // other entity within the broker. If + // the broker doesn't have such notion, the original destination name + // SHOULD uniquely identify the broker. + MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name") + + // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming + // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. + // It represents the ordering key for a given message. If the attribute is + // not present, the message does not have an ordering key. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ordering_key' + MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") + + // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the + // "messaging.kafka.consumer.group" semantic conventions. It represents the + // name of the Kafka Consumer Group that is handling the message. Only + // applies to consumers, not producers. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-group' + MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") + + // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to + // the "messaging.kafka.destination.partition" semantic conventions. It + // represents the partition the message is sent to. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 2 + MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") + + // MessagingKafkaMessageKeyKey is the attribute Key conforming to the + // "messaging.kafka.message.key" semantic conventions. It represents the + // message keys in Kafka are used for grouping alike messages to ensure + // they're processed on the same partition. They differ from + // `messaging.message.id` in that they're not unique. If the key is `null`, + // the attribute MUST NOT be set. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to + // be supplied for the attribute. If the key has no unambiguous, canonical + // string form, don't include its value. + MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") + + // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the + // "messaging.kafka.message.offset" semantic conventions. It represents the + // offset of a record in the corresponding Kafka partition. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 42 + MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") + + // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the + // "messaging.kafka.message.tombstone" semantic conventions. It represents + // a boolean that is true if the message is a tombstone. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") + + // MessagingMessageBodySizeKey is the attribute Key conforming to the + // "messaging.message.body.size" semantic conventions. It represents the + // size of the message body in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1439 + // Note: This can refer to both the compressed or uncompressed body size. + // If both sizes are known, the uncompressed + // body size should be used. + MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size") + + // MessagingMessageConversationIDKey is the attribute Key conforming to the + // "messaging.message.conversation_id" semantic conventions. It represents + // the conversation ID identifying the conversation to which the message + // belongs, represented as a string. Sometimes called "Correlation ID". + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MyConversationID' + MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") + + // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the + // "messaging.message.envelope.size" semantic conventions. It represents + // the size of the message body and metadata in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 2738 + // Note: This can refer to both the compressed or uncompressed size. If + // both sizes are known, the uncompressed + // size should be used. + MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size") + + // MessagingMessageIDKey is the attribute Key conforming to the + // "messaging.message.id" semantic conventions. It represents a value used + // by the messaging system as an identifier for the message, represented as + // a string. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + MessagingMessageIDKey = attribute.Key("messaging.message.id") + + // MessagingOperationKey is the attribute Key conforming to the + // "messaging.operation" semantic conventions. It represents a string + // identifying the kind of messaging operation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: If a custom value is used, it MUST be of low cardinality. + MessagingOperationKey = attribute.Key("messaging.operation") + + // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key + // conforming to the "messaging.rabbitmq.destination.routing_key" semantic + // conventions. It represents the rabbitMQ message routing key. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myKey' + MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") + + // MessagingRocketmqClientGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.client_group" semantic conventions. It represents + // the name of the RocketMQ producer/consumer group that is handling the + // message. The client type is identified by the SpanKind. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myConsumerGroup' + MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") + + // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to + // the "messaging.rocketmq.consumption_model" semantic conventions. It + // represents the model of message consumption. This only applies to + // consumer spans. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") + + // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delay_time_level" semantic + // conventions. It represents the delay time level for delay message, which + // determines the message delay time. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3 + MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") + + // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delivery_timestamp" + // semantic conventions. It represents the timestamp in milliseconds that + // the delay message is expected to be delivered to consumer. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1665987217045 + MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") + + // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.message.group" semantic conventions. It represents + // the it is essential for FIFO message. Messages that belong to the same + // message group are always processed one by one within the same consumer + // group. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myMessageGroup' + MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") + + // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the + // "messaging.rocketmq.message.keys" semantic conventions. It represents + // the key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'keyA', 'keyB' + MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") + + // MessagingRocketmqMessageTagKey is the attribute Key conforming to the + // "messaging.rocketmq.message.tag" semantic conventions. It represents the + // secondary classifier of message besides topic. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'tagA' + MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") + + // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the + // "messaging.rocketmq.message.type" semantic conventions. It represents + // the type of message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") + + // MessagingRocketmqNamespaceKey is the attribute Key conforming to the + // "messaging.rocketmq.namespace" semantic conventions. It represents the + // namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myNamespace' + MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + + // MessagingSystemKey is the attribute Key conforming to the + // "messaging.system" semantic conventions. It represents an identifier for + // the messaging system being used. See below for a list of well-known + // identifiers. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessagingSystemKey = attribute.Key("messaging.system") +) + +var ( + // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created + MessagingOperationPublish = MessagingOperationKey.String("publish") + // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios + MessagingOperationCreate = MessagingOperationKey.String("create") + // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages + MessagingOperationReceive = MessagingOperationKey.String("receive") + // One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs + MessagingOperationDeliver = MessagingOperationKey.String("deliver") +) + +var ( + // Clustering consumption model + MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + // Broadcasting consumption model + MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") +) + +var ( + // Normal message + MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + // FIFO message + MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + // Delay message + MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + // Transaction message + MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") +) + +var ( + // Apache ActiveMQ + MessagingSystemActivemq = MessagingSystemKey.String("activemq") + // Amazon Simple Queue Service (SQS) + MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs") + // Azure Event Grid + MessagingSystemAzureEventgrid = MessagingSystemKey.String("azure_eventgrid") + // Azure Event Hubs + MessagingSystemAzureEventhubs = MessagingSystemKey.String("azure_eventhubs") + // Azure Service Bus + MessagingSystemAzureServicebus = MessagingSystemKey.String("azure_servicebus") + // Google Cloud Pub/Sub + MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub") + // Java Message Service + MessagingSystemJms = MessagingSystemKey.String("jms") + // Apache Kafka + MessagingSystemKafka = MessagingSystemKey.String("kafka") + // RabbitMQ + MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq") + // Apache RocketMQ + MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq") +) + +// MessagingBatchMessageCount returns an attribute KeyValue conforming to +// the "messaging.batch.message_count" semantic conventions. It represents the +// number of messages sent, received, or processed in the scope of the batching +// operation. +func MessagingBatchMessageCount(val int) attribute.KeyValue { + return MessagingBatchMessageCountKey.Int(val) +} + +// MessagingClientID returns an attribute KeyValue conforming to the +// "messaging.client_id" semantic conventions. It represents a unique +// identifier for the client that consumes or produces a message. +func MessagingClientID(val string) attribute.KeyValue { + return MessagingClientIDKey.String(val) +} + +// MessagingDestinationAnonymous returns an attribute KeyValue conforming to +// the "messaging.destination.anonymous" semantic conventions. It represents a +// boolean that is true if the message destination is anonymous (could be +// unnamed or have auto-generated name). +func MessagingDestinationAnonymous(val bool) attribute.KeyValue { + return MessagingDestinationAnonymousKey.Bool(val) +} + +// MessagingDestinationName returns an attribute KeyValue conforming to the +// "messaging.destination.name" semantic conventions. It represents the message +// destination name +func MessagingDestinationName(val string) attribute.KeyValue { + return MessagingDestinationNameKey.String(val) +} + +// MessagingDestinationTemplate returns an attribute KeyValue conforming to +// the "messaging.destination.template" semantic conventions. It represents the +// low cardinality representation of the messaging destination name +func MessagingDestinationTemplate(val string) attribute.KeyValue { + return MessagingDestinationTemplateKey.String(val) +} + +// MessagingDestinationTemporary returns an attribute KeyValue conforming to +// the "messaging.destination.temporary" semantic conventions. It represents a +// boolean that is true if the message destination is temporary and might not +// exist anymore after messages are processed. +func MessagingDestinationTemporary(val bool) attribute.KeyValue { + return MessagingDestinationTemporaryKey.Bool(val) +} + +// MessagingDestinationPublishAnonymous returns an attribute KeyValue +// conforming to the "messaging.destination_publish.anonymous" semantic +// conventions. It represents a boolean that is true if the publish message +// destination is anonymous (could be unnamed or have auto-generated name). +func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue { + return MessagingDestinationPublishAnonymousKey.Bool(val) +} + +// MessagingDestinationPublishName returns an attribute KeyValue conforming +// to the "messaging.destination_publish.name" semantic conventions. It +// represents the name of the original destination the message was published to +func MessagingDestinationPublishName(val string) attribute.KeyValue { + return MessagingDestinationPublishNameKey.String(val) +} + +// MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue +// conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic +// conventions. It represents the ordering key for a given message. If the +// attribute is not present, the message does not have an ordering key. +func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue { + return MessagingGCPPubsubMessageOrderingKeyKey.String(val) +} + +// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to +// the "messaging.kafka.consumer.group" semantic conventions. It represents the +// name of the Kafka Consumer Group that is handling the message. Only applies +// to consumers, not producers. +func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { + return MessagingKafkaConsumerGroupKey.String(val) +} + +// MessagingKafkaDestinationPartition returns an attribute KeyValue +// conforming to the "messaging.kafka.destination.partition" semantic +// conventions. It represents the partition the message is sent to. +func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { + return MessagingKafkaDestinationPartitionKey.Int(val) +} + +// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the +// "messaging.kafka.message.key" semantic conventions. It represents the +// message keys in Kafka are used for grouping alike messages to ensure they're +// processed on the same partition. They differ from `messaging.message.id` in +// that they're not unique. If the key is `null`, the attribute MUST NOT be +// set. +func MessagingKafkaMessageKey(val string) attribute.KeyValue { + return MessagingKafkaMessageKeyKey.String(val) +} + +// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to +// the "messaging.kafka.message.offset" semantic conventions. It represents the +// offset of a record in the corresponding Kafka partition. +func MessagingKafkaMessageOffset(val int) attribute.KeyValue { + return MessagingKafkaMessageOffsetKey.Int(val) +} + +// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming +// to the "messaging.kafka.message.tombstone" semantic conventions. It +// represents a boolean that is true if the message is a tombstone. +func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { + return MessagingKafkaMessageTombstoneKey.Bool(val) +} + +// MessagingMessageBodySize returns an attribute KeyValue conforming to the +// "messaging.message.body.size" semantic conventions. It represents the size +// of the message body in bytes. +func MessagingMessageBodySize(val int) attribute.KeyValue { + return MessagingMessageBodySizeKey.Int(val) +} + +// MessagingMessageConversationID returns an attribute KeyValue conforming +// to the "messaging.message.conversation_id" semantic conventions. It +// represents the conversation ID identifying the conversation to which the +// message belongs, represented as a string. Sometimes called "Correlation ID". +func MessagingMessageConversationID(val string) attribute.KeyValue { + return MessagingMessageConversationIDKey.String(val) +} + +// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to +// the "messaging.message.envelope.size" semantic conventions. It represents +// the size of the message body and metadata in bytes. +func MessagingMessageEnvelopeSize(val int) attribute.KeyValue { + return MessagingMessageEnvelopeSizeKey.Int(val) +} + +// MessagingMessageID returns an attribute KeyValue conforming to the +// "messaging.message.id" semantic conventions. It represents a value used by +// the messaging system as an identifier for the message, represented as a +// string. +func MessagingMessageID(val string) attribute.KeyValue { + return MessagingMessageIDKey.String(val) +} + +// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue +// conforming to the "messaging.rabbitmq.destination.routing_key" semantic +// conventions. It represents the rabbitMQ message routing key. +func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { + return MessagingRabbitmqDestinationRoutingKeyKey.String(val) +} + +// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.client_group" semantic conventions. It represents +// the name of the RocketMQ producer/consumer group that is handling the +// message. The client type is identified by the SpanKind. +func MessagingRocketmqClientGroup(val string) attribute.KeyValue { + return MessagingRocketmqClientGroupKey.String(val) +} + +// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delay_time_level" semantic +// conventions. It represents the delay time level for delay message, which +// determines the message delay time. +func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { + return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) +} + +// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic +// conventions. It represents the timestamp in milliseconds that the delay +// message is expected to be delivered to consumer. +func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { + return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) +} + +// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.group" semantic conventions. It represents +// the it is essential for FIFO message. Messages that belong to the same +// message group are always processed one by one within the same consumer +// group. +func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { + return MessagingRocketmqMessageGroupKey.String(val) +} + +// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.keys" semantic conventions. It represents +// the key(s) of message, another way to mark message besides message id. +func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { + return MessagingRocketmqMessageKeysKey.StringSlice(val) +} + +// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.tag" semantic conventions. It represents the +// secondary classifier of message besides topic. +func MessagingRocketmqMessageTag(val string) attribute.KeyValue { + return MessagingRocketmqMessageTagKey.String(val) +} + +// MessagingRocketmqNamespace returns an attribute KeyValue conforming to +// the "messaging.rocketmq.namespace" semantic conventions. It represents the +// namespace of RocketMQ resources, resources in different namespaces are +// individual. +func MessagingRocketmqNamespace(val string) attribute.KeyValue { + return MessagingRocketmqNamespaceKey.String(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetworkCarrierIccKey is the attribute Key conforming to the + // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 + // alpha-2 2-character country code associated with the mobile carrier + // network. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'DE' + NetworkCarrierIccKey = attribute.Key("network.carrier.icc") + + // NetworkCarrierMccKey is the attribute Key conforming to the + // "network.carrier.mcc" semantic conventions. It represents the mobile + // carrier country code. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '310' + NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") + + // NetworkCarrierMncKey is the attribute Key conforming to the + // "network.carrier.mnc" semantic conventions. It represents the mobile + // carrier network code. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '001' + NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") + + // NetworkCarrierNameKey is the attribute Key conforming to the + // "network.carrier.name" semantic conventions. It represents the name of + // the mobile carrier. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'sprint' + NetworkCarrierNameKey = attribute.Key("network.carrier.name") + + // NetworkConnectionSubtypeKey is the attribute Key conforming to the + // "network.connection.subtype" semantic conventions. It represents the + // this describes more details regarding the connection.type. It may be the + // type of cell technology connection, but it could be used for describing + // details about a wifi connection. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'LTE' + NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") + + // NetworkConnectionTypeKey is the attribute Key conforming to the + // "network.connection.type" semantic conventions. It represents the + // internet connection type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'wifi' + NetworkConnectionTypeKey = attribute.Key("network.connection.type") + + // NetworkIoDirectionKey is the attribute Key conforming to the + // "network.io.direction" semantic conventions. It represents the network + // IO operation direction. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'transmit' + NetworkIoDirectionKey = attribute.Key("network.io.direction") + + // NetworkLocalAddressKey is the attribute Key conforming to the + // "network.local.address" semantic conventions. It represents the local + // address of the network connection - IP address or Unix domain socket + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10.1.2.80', '/tmp/my.sock' + NetworkLocalAddressKey = attribute.Key("network.local.address") + + // NetworkLocalPortKey is the attribute Key conforming to the + // "network.local.port" semantic conventions. It represents the local port + // number of the network connection. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + NetworkLocalPortKey = attribute.Key("network.local.port") + + // NetworkPeerAddressKey is the attribute Key conforming to the + // "network.peer.address" semantic conventions. It represents the peer + // address of the network connection - IP address or Unix domain socket + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10.1.2.80', '/tmp/my.sock' + NetworkPeerAddressKey = attribute.Key("network.peer.address") + + // NetworkPeerPortKey is the attribute Key conforming to the + // "network.peer.port" semantic conventions. It represents the peer port + // number of the network connection. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + NetworkPeerPortKey = attribute.Key("network.peer.port") + + // NetworkProtocolNameKey is the attribute Key conforming to the + // "network.protocol.name" semantic conventions. It represents the [OSI + // application layer](https://osi-model.com/application-layer/) or non-OSI + // equivalent. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'amqp', 'http', 'mqtt' + // Note: The value SHOULD be normalized to lowercase. + NetworkProtocolNameKey = attribute.Key("network.protocol.name") + + // NetworkProtocolVersionKey is the attribute Key conforming to the + // "network.protocol.version" semantic conventions. It represents the + // version of the protocol specified in `network.protocol.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '3.1.1' + // Note: `network.protocol.version` refers to the version of the protocol + // used and might be different from the protocol client's version. If the + // HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, + // this attribute should be set to `1.1`. + NetworkProtocolVersionKey = attribute.Key("network.protocol.version") + + // NetworkTransportKey is the attribute Key conforming to the + // "network.transport" semantic conventions. It represents the [OSI + // transport layer](https://osi-model.com/transport-layer/) or + // [inter-process communication + // method](https://wikipedia.org/wiki/Inter-process_communication). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'tcp', 'udp' + // Note: The value SHOULD be normalized to lowercase. + // + // Consider always setting the transport when setting a port number, since + // a port number is ambiguous without knowing the transport. For example + // different processes could be listening on TCP port 12345 and UDP port + // 12345. + NetworkTransportKey = attribute.Key("network.transport") + + // NetworkTypeKey is the attribute Key conforming to the "network.type" + // semantic conventions. It represents the [OSI network + // layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ipv4', 'ipv6' + // Note: The value SHOULD be normalized to lowercase. + NetworkTypeKey = attribute.Key("network.type") +) + +var ( + // GPRS + NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") + // EDGE + NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") + // UMTS + NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") + // CDMA + NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") + // HSUPA + NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") + // HSPA + NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") + // IDEN + NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") + // EVDO Rev. B + NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") + // LTE + NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") + // EHRPD + NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") + // HSPAP + NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") + // GSM + NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") + // TD-SCDMA + NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") + // IWLAN + NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") + // LTE CA + NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") +) + +var ( + // wifi + NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") + // wired + NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") + // cell + NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") + // unavailable + NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") + // unknown + NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") +) + +var ( + // transmit + NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit") + // receive + NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive") +) + +var ( + // TCP + NetworkTransportTCP = NetworkTransportKey.String("tcp") + // UDP + NetworkTransportUDP = NetworkTransportKey.String("udp") + // Named or anonymous pipe + NetworkTransportPipe = NetworkTransportKey.String("pipe") + // Unix domain socket + NetworkTransportUnix = NetworkTransportKey.String("unix") +) + +var ( + // IPv4 + NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") + // IPv6 + NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") +) + +// NetworkCarrierIcc returns an attribute KeyValue conforming to the +// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 +// alpha-2 2-character country code associated with the mobile carrier network. +func NetworkCarrierIcc(val string) attribute.KeyValue { + return NetworkCarrierIccKey.String(val) +} + +// NetworkCarrierMcc returns an attribute KeyValue conforming to the +// "network.carrier.mcc" semantic conventions. It represents the mobile carrier +// country code. +func NetworkCarrierMcc(val string) attribute.KeyValue { + return NetworkCarrierMccKey.String(val) +} + +// NetworkCarrierMnc returns an attribute KeyValue conforming to the +// "network.carrier.mnc" semantic conventions. It represents the mobile carrier +// network code. +func NetworkCarrierMnc(val string) attribute.KeyValue { + return NetworkCarrierMncKey.String(val) +} + +// NetworkCarrierName returns an attribute KeyValue conforming to the +// "network.carrier.name" semantic conventions. It represents the name of the +// mobile carrier. +func NetworkCarrierName(val string) attribute.KeyValue { + return NetworkCarrierNameKey.String(val) +} + +// NetworkLocalAddress returns an attribute KeyValue conforming to the +// "network.local.address" semantic conventions. It represents the local +// address of the network connection - IP address or Unix domain socket name. +func NetworkLocalAddress(val string) attribute.KeyValue { + return NetworkLocalAddressKey.String(val) +} + +// NetworkLocalPort returns an attribute KeyValue conforming to the +// "network.local.port" semantic conventions. It represents the local port +// number of the network connection. +func NetworkLocalPort(val int) attribute.KeyValue { + return NetworkLocalPortKey.Int(val) +} + +// NetworkPeerAddress returns an attribute KeyValue conforming to the +// "network.peer.address" semantic conventions. It represents the peer address +// of the network connection - IP address or Unix domain socket name. +func NetworkPeerAddress(val string) attribute.KeyValue { + return NetworkPeerAddressKey.String(val) +} + +// NetworkPeerPort returns an attribute KeyValue conforming to the +// "network.peer.port" semantic conventions. It represents the peer port number +// of the network connection. +func NetworkPeerPort(val int) attribute.KeyValue { + return NetworkPeerPortKey.Int(val) +} + +// NetworkProtocolName returns an attribute KeyValue conforming to the +// "network.protocol.name" semantic conventions. It represents the [OSI +// application layer](https://osi-model.com/application-layer/) or non-OSI +// equivalent. +func NetworkProtocolName(val string) attribute.KeyValue { + return NetworkProtocolNameKey.String(val) +} + +// NetworkProtocolVersion returns an attribute KeyValue conforming to the +// "network.protocol.version" semantic conventions. It represents the version +// of the protocol specified in `network.protocol.name`. +func NetworkProtocolVersion(val string) attribute.KeyValue { + return NetworkProtocolVersionKey.String(val) +} + +// Attributes for remote procedure calls. +const ( + // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the + // "rpc.connect_rpc.error_code" semantic conventions. It represents the + // [error codes](https://connect.build/docs/protocol/#error-codes) of the + // Connect request. Error codes are always string values. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") + + // RPCGRPCStatusCodeKey is the attribute Key conforming to the + // "rpc.grpc.status_code" semantic conventions. It represents the [numeric + // status + // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of + // the gRPC request. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") + + // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_code" semantic conventions. It represents the + // `error.code` property of response if it is an error response. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: -32700, 100 + RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + + // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_message" semantic conventions. It represents the + // `error.message` property of response if it is an error response. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Parse error', 'User already exists' + RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") + + // RPCJsonrpcRequestIDKey is the attribute Key conforming to the + // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` + // property of request or response. Since protocol allows id to be int, + // string, `null` or missing (for notifications), value is expected to be + // cast to string for simplicity. Use empty string in case of `null` value. + // Omit entirely if this is a notification. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '10', 'request-7', '' + RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + + // RPCJsonrpcVersionKey is the attribute Key conforming to the + // "rpc.jsonrpc.version" semantic conventions. It represents the protocol + // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 + // doesn't specify this, the value can be omitted. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2.0', '1.0' + RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + + // RPCMethodKey is the attribute Key conforming to the "rpc.method" + // semantic conventions. It represents the name of the (logical) method + // being called, must be equal to the $method part in the span name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The `code.function` attribute may be used to store the + // latter (e.g., method actually executing the call on the server side, RPC + // client stub method on the client side). + RPCMethodKey = attribute.Key("rpc.method") + + // RPCServiceKey is the attribute Key conforming to the "rpc.service" + // semantic conventions. It represents the full (logical) name of the + // service being called, including its package name, if applicable. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing + // class. The `code.namespace` attribute may be used to store the latter + // (despite the attribute name, it may include a class name; e.g., class + // with method actually executing the call on the server side, RPC client + // stub class on the client side). + RPCServiceKey = attribute.Key("rpc.service") + + // RPCSystemKey is the attribute Key conforming to the "rpc.system" + // semantic conventions. It represents a string identifying the remoting + // system. See below for a list of well-known identifiers. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCSystemKey = attribute.Key("rpc.system") +) + +var ( + // cancelled + RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") + // unknown + RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") + // invalid_argument + RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") + // deadline_exceeded + RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") + // not_found + RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") + // already_exists + RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") + // permission_denied + RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") + // resource_exhausted + RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") + // failed_precondition + RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") + // aborted + RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") + // out_of_range + RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") + // unimplemented + RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") + // internal + RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") + // unavailable + RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") + // data_loss + RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") + // unauthenticated + RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") +) + +var ( + // OK + RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) + // CANCELLED + RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) + // UNKNOWN + RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) + // INVALID_ARGUMENT + RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) + // DEADLINE_EXCEEDED + RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) + // NOT_FOUND + RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) + // ALREADY_EXISTS + RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) + // PERMISSION_DENIED + RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) + // RESOURCE_EXHAUSTED + RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) + // FAILED_PRECONDITION + RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) + // ABORTED + RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) + // OUT_OF_RANGE + RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) + // UNIMPLEMENTED + RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) + // INTERNAL + RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) + // UNAVAILABLE + RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) + // DATA_LOSS + RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) + // UNAUTHENTICATED + RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) +) + +var ( + // gRPC + RPCSystemGRPC = RPCSystemKey.String("grpc") + // Java RMI + RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") + // .NET WCF + RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") + // Apache Dubbo + RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") + // Connect RPC + RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") +) + +// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_code" semantic conventions. It represents the +// `error.code` property of response if it is an error response. +func RPCJsonrpcErrorCode(val int) attribute.KeyValue { + return RPCJsonrpcErrorCodeKey.Int(val) +} + +// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_message" semantic conventions. It represents the +// `error.message` property of response if it is an error response. +func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { + return RPCJsonrpcErrorMessageKey.String(val) +} + +// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` +// property of request or response. Since protocol allows id to be int, string, +// `null` or missing (for notifications), value is expected to be cast to +// string for simplicity. Use empty string in case of `null` value. Omit +// entirely if this is a notification. +func RPCJsonrpcRequestID(val string) attribute.KeyValue { + return RPCJsonrpcRequestIDKey.String(val) +} + +// RPCJsonrpcVersion returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.version" semantic conventions. It represents the protocol +// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 +// doesn't specify this, the value can be omitted. +func RPCJsonrpcVersion(val string) attribute.KeyValue { + return RPCJsonrpcVersionKey.String(val) +} + +// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" +// semantic conventions. It represents the name of the (logical) method being +// called, must be equal to the $method part in the span name. +func RPCMethod(val string) attribute.KeyValue { + return RPCMethodKey.String(val) +} + +// RPCService returns an attribute KeyValue conforming to the "rpc.service" +// semantic conventions. It represents the full (logical) name of the service +// being called, including its package name, if applicable. +func RPCService(val string) attribute.KeyValue { + return RPCServiceKey.String(val) +} + +// These attributes may be used to describe the server in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API doesn't expose a clear +// notion of client and server). This also covers UDP network interactions +// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. +const ( + // ServerAddressKey is the attribute Key conforming to the "server.address" + // semantic conventions. It represents the server domain name if available + // without reverse DNS lookup; otherwise, IP address or Unix domain socket + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the client side, and when communicating through + // an intermediary, `server.address` SHOULD represent the server address + // behind any intermediaries, for example proxies, if it's available. + ServerAddressKey = attribute.Key("server.address") + + // ServerPortKey is the attribute Key conforming to the "server.port" + // semantic conventions. It represents the server port number. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 80, 8080, 443 + // Note: When observed from the client side, and when communicating through + // an intermediary, `server.port` SHOULD represent the server port behind + // any intermediaries, for example proxies, if it's available. + ServerPortKey = attribute.Key("server.port") +) + +// ServerAddress returns an attribute KeyValue conforming to the +// "server.address" semantic conventions. It represents the server domain name +// if available without reverse DNS lookup; otherwise, IP address or Unix +// domain socket name. +func ServerAddress(val string) attribute.KeyValue { + return ServerAddressKey.String(val) +} + +// ServerPort returns an attribute KeyValue conforming to the "server.port" +// semantic conventions. It represents the server port number. +func ServerPort(val int) attribute.KeyValue { + return ServerPortKey.Int(val) +} + +// These attributes may be used to describe the sender of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API doesn't expose a clear notion of +// client and server. +const ( + // SourceAddressKey is the attribute Key conforming to the "source.address" + // semantic conventions. It represents the source address - domain name if + // available without reverse DNS lookup; otherwise, IP address or Unix + // domain socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the destination side, and when communicating + // through an intermediary, `source.address` SHOULD represent the source + // address behind any intermediaries, for example proxies, if it's + // available. + SourceAddressKey = attribute.Key("source.address") + + // SourcePortKey is the attribute Key conforming to the "source.port" + // semantic conventions. It represents the source port number + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3389, 2888 + SourcePortKey = attribute.Key("source.port") +) + +// SourceAddress returns an attribute KeyValue conforming to the +// "source.address" semantic conventions. It represents the source address - +// domain name if available without reverse DNS lookup; otherwise, IP address +// or Unix domain socket name. +func SourceAddress(val string) attribute.KeyValue { + return SourceAddressKey.String(val) +} + +// SourcePort returns an attribute KeyValue conforming to the "source.port" +// semantic conventions. It represents the source port number +func SourcePort(val int) attribute.KeyValue { + return SourcePortKey.Int(val) +} + +// Semantic convention attributes in the TLS namespace. +const ( + // TLSCipherKey is the attribute Key conforming to the "tls.cipher" + // semantic conventions. It represents the string indicating the + // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) + // used during the current connection. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', + // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' + // Note: The values allowed for `tls.cipher` MUST be one of the + // `Descriptions` of the [registered TLS Cipher + // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). + TLSCipherKey = attribute.Key("tls.cipher") + + // TLSClientCertificateKey is the attribute Key conforming to the + // "tls.client.certificate" semantic conventions. It represents the + // pEM-encoded stand-alone certificate offered by the client. This is + // usually mutually-exclusive of `client.certificate_chain` since this + // value also exists in that list. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...' + TLSClientCertificateKey = attribute.Key("tls.client.certificate") + + // TLSClientCertificateChainKey is the attribute Key conforming to the + // "tls.client.certificate_chain" semantic conventions. It represents the + // array of PEM-encoded certificates that make up the certificate chain + // offered by the client. This is usually mutually-exclusive of + // `client.certificate` since that value should be the first certificate in + // the chain. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...', 'MI...' + TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain") + + // TLSClientHashMd5Key is the attribute Key conforming to the + // "tls.client.hash.md5" semantic conventions. It represents the + // certificate fingerprint using the MD5 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' + TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5") + + // TLSClientHashSha1Key is the attribute Key conforming to the + // "tls.client.hash.sha1" semantic conventions. It represents the + // certificate fingerprint using the SHA1 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' + TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1") + + // TLSClientHashSha256Key is the attribute Key conforming to the + // "tls.client.hash.sha256" semantic conventions. It represents the + // certificate fingerprint using the SHA256 digest of DER-encoded version + // of certificate offered by the client. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' + TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256") + + // TLSClientIssuerKey is the attribute Key conforming to the + // "tls.client.issuer" semantic conventions. It represents the + // distinguished name of + // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) + // of the issuer of the x.509 certificate presented by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, + // DC=com' + TLSClientIssuerKey = attribute.Key("tls.client.issuer") + + // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3" + // semantic conventions. It represents a hash that identifies clients based + // on how they perform an SSL/TLS handshake. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'd4e5b18d6b55c71272893221c96ba240' + TLSClientJa3Key = attribute.Key("tls.client.ja3") + + // TLSClientNotAfterKey is the attribute Key conforming to the + // "tls.client.not_after" semantic conventions. It represents the date/Time + // indicating when client certificate is no longer considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2021-01-01T00:00:00.000Z' + TLSClientNotAfterKey = attribute.Key("tls.client.not_after") + + // TLSClientNotBeforeKey is the attribute Key conforming to the + // "tls.client.not_before" semantic conventions. It represents the + // date/Time indicating when client certificate is first considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1970-01-01T00:00:00.000Z' + TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") + + // TLSClientServerNameKey is the attribute Key conforming to the + // "tls.client.server_name" semantic conventions. It represents the also + // called an SNI, this tells the server which hostname to which the client + // is attempting to connect to. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry.io' + TLSClientServerNameKey = attribute.Key("tls.client.server_name") + + // TLSClientSubjectKey is the attribute Key conforming to the + // "tls.client.subject" semantic conventions. It represents the + // distinguished name of subject of the x.509 certificate presented by the + // client. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' + TLSClientSubjectKey = attribute.Key("tls.client.subject") + + // TLSClientSupportedCiphersKey is the attribute Key conforming to the + // "tls.client.supported_ciphers" semantic conventions. It represents the + // array of ciphers offered by the client during the client hello. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."' + TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers") + + // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic + // conventions. It represents the string indicating the curve used for the + // given cipher, when applicable + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'secp256r1' + TLSCurveKey = attribute.Key("tls.curve") + + // TLSEstablishedKey is the attribute Key conforming to the + // "tls.established" semantic conventions. It represents the boolean flag + // indicating if the TLS negotiation was successful and transitioned to an + // encrypted tunnel. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Examples: True + TLSEstablishedKey = attribute.Key("tls.established") + + // TLSNextProtocolKey is the attribute Key conforming to the + // "tls.next_protocol" semantic conventions. It represents the string + // indicating the protocol being tunneled. Per the values in the [IANA + // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), + // this string should be lower case. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'http/1.1' + TLSNextProtocolKey = attribute.Key("tls.next_protocol") + + // TLSProtocolNameKey is the attribute Key conforming to the + // "tls.protocol.name" semantic conventions. It represents the normalized + // lowercase protocol name parsed from original string of the negotiated + // [SSL/TLS protocol + // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + TLSProtocolNameKey = attribute.Key("tls.protocol.name") + + // TLSProtocolVersionKey is the attribute Key conforming to the + // "tls.protocol.version" semantic conventions. It represents the numeric + // part of the version parsed from the original string of the negotiated + // [SSL/TLS protocol + // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.2', '3' + TLSProtocolVersionKey = attribute.Key("tls.protocol.version") + + // TLSResumedKey is the attribute Key conforming to the "tls.resumed" + // semantic conventions. It represents the boolean flag indicating if this + // TLS connection was resumed from an existing TLS negotiation. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Examples: True + TLSResumedKey = attribute.Key("tls.resumed") + + // TLSServerCertificateKey is the attribute Key conforming to the + // "tls.server.certificate" semantic conventions. It represents the + // pEM-encoded stand-alone certificate offered by the server. This is + // usually mutually-exclusive of `server.certificate_chain` since this + // value also exists in that list. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...' + TLSServerCertificateKey = attribute.Key("tls.server.certificate") + + // TLSServerCertificateChainKey is the attribute Key conforming to the + // "tls.server.certificate_chain" semantic conventions. It represents the + // array of PEM-encoded certificates that make up the certificate chain + // offered by the server. This is usually mutually-exclusive of + // `server.certificate` since that value should be the first certificate in + // the chain. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...', 'MI...' + TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain") + + // TLSServerHashMd5Key is the attribute Key conforming to the + // "tls.server.hash.md5" semantic conventions. It represents the + // certificate fingerprint using the MD5 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' + TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5") + + // TLSServerHashSha1Key is the attribute Key conforming to the + // "tls.server.hash.sha1" semantic conventions. It represents the + // certificate fingerprint using the SHA1 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' + TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1") + + // TLSServerHashSha256Key is the attribute Key conforming to the + // "tls.server.hash.sha256" semantic conventions. It represents the + // certificate fingerprint using the SHA256 digest of DER-encoded version + // of certificate offered by the server. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' + TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256") + + // TLSServerIssuerKey is the attribute Key conforming to the + // "tls.server.issuer" semantic conventions. It represents the + // distinguished name of + // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) + // of the issuer of the x.509 certificate presented by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, + // DC=com' + TLSServerIssuerKey = attribute.Key("tls.server.issuer") + + // TLSServerJa3sKey is the attribute Key conforming to the + // "tls.server.ja3s" semantic conventions. It represents a hash that + // identifies servers based on how they perform an SSL/TLS handshake. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'd4e5b18d6b55c71272893221c96ba240' + TLSServerJa3sKey = attribute.Key("tls.server.ja3s") + + // TLSServerNotAfterKey is the attribute Key conforming to the + // "tls.server.not_after" semantic conventions. It represents the date/Time + // indicating when server certificate is no longer considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2021-01-01T00:00:00.000Z' + TLSServerNotAfterKey = attribute.Key("tls.server.not_after") + + // TLSServerNotBeforeKey is the attribute Key conforming to the + // "tls.server.not_before" semantic conventions. It represents the + // date/Time indicating when server certificate is first considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1970-01-01T00:00:00.000Z' + TLSServerNotBeforeKey = attribute.Key("tls.server.not_before") + + // TLSServerSubjectKey is the attribute Key conforming to the + // "tls.server.subject" semantic conventions. It represents the + // distinguished name of subject of the x.509 certificate presented by the + // server. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' + TLSServerSubjectKey = attribute.Key("tls.server.subject") +) + +var ( + // ssl + TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") + // tls + TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") +) + +// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" +// semantic conventions. It represents the string indicating the +// [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used +// during the current connection. +func TLSCipher(val string) attribute.KeyValue { + return TLSCipherKey.String(val) +} + +// TLSClientCertificate returns an attribute KeyValue conforming to the +// "tls.client.certificate" semantic conventions. It represents the pEM-encoded +// stand-alone certificate offered by the client. This is usually +// mutually-exclusive of `client.certificate_chain` since this value also +// exists in that list. +func TLSClientCertificate(val string) attribute.KeyValue { + return TLSClientCertificateKey.String(val) +} + +// TLSClientCertificateChain returns an attribute KeyValue conforming to the +// "tls.client.certificate_chain" semantic conventions. It represents the array +// of PEM-encoded certificates that make up the certificate chain offered by +// the client. This is usually mutually-exclusive of `client.certificate` since +// that value should be the first certificate in the chain. +func TLSClientCertificateChain(val ...string) attribute.KeyValue { + return TLSClientCertificateChainKey.StringSlice(val) +} + +// TLSClientHashMd5 returns an attribute KeyValue conforming to the +// "tls.client.hash.md5" semantic conventions. It represents the certificate +// fingerprint using the MD5 digest of DER-encoded version of certificate +// offered by the client. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSClientHashMd5(val string) attribute.KeyValue { + return TLSClientHashMd5Key.String(val) +} + +// TLSClientHashSha1 returns an attribute KeyValue conforming to the +// "tls.client.hash.sha1" semantic conventions. It represents the certificate +// fingerprint using the SHA1 digest of DER-encoded version of certificate +// offered by the client. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSClientHashSha1(val string) attribute.KeyValue { + return TLSClientHashSha1Key.String(val) +} + +// TLSClientHashSha256 returns an attribute KeyValue conforming to the +// "tls.client.hash.sha256" semantic conventions. It represents the certificate +// fingerprint using the SHA256 digest of DER-encoded version of certificate +// offered by the client. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSClientHashSha256(val string) attribute.KeyValue { + return TLSClientHashSha256Key.String(val) +} + +// TLSClientIssuer returns an attribute KeyValue conforming to the +// "tls.client.issuer" semantic conventions. It represents the distinguished +// name of +// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of +// the issuer of the x.509 certificate presented by the client. +func TLSClientIssuer(val string) attribute.KeyValue { + return TLSClientIssuerKey.String(val) +} + +// TLSClientJa3 returns an attribute KeyValue conforming to the +// "tls.client.ja3" semantic conventions. It represents a hash that identifies +// clients based on how they perform an SSL/TLS handshake. +func TLSClientJa3(val string) attribute.KeyValue { + return TLSClientJa3Key.String(val) +} + +// TLSClientNotAfter returns an attribute KeyValue conforming to the +// "tls.client.not_after" semantic conventions. It represents the date/Time +// indicating when client certificate is no longer considered valid. +func TLSClientNotAfter(val string) attribute.KeyValue { + return TLSClientNotAfterKey.String(val) +} + +// TLSClientNotBefore returns an attribute KeyValue conforming to the +// "tls.client.not_before" semantic conventions. It represents the date/Time +// indicating when client certificate is first considered valid. +func TLSClientNotBefore(val string) attribute.KeyValue { + return TLSClientNotBeforeKey.String(val) +} + +// TLSClientServerName returns an attribute KeyValue conforming to the +// "tls.client.server_name" semantic conventions. It represents the also called +// an SNI, this tells the server which hostname to which the client is +// attempting to connect to. +func TLSClientServerName(val string) attribute.KeyValue { + return TLSClientServerNameKey.String(val) +} + +// TLSClientSubject returns an attribute KeyValue conforming to the +// "tls.client.subject" semantic conventions. It represents the distinguished +// name of subject of the x.509 certificate presented by the client. +func TLSClientSubject(val string) attribute.KeyValue { + return TLSClientSubjectKey.String(val) +} + +// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the +// "tls.client.supported_ciphers" semantic conventions. It represents the array +// of ciphers offered by the client during the client hello. +func TLSClientSupportedCiphers(val ...string) attribute.KeyValue { + return TLSClientSupportedCiphersKey.StringSlice(val) +} + +// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" +// semantic conventions. It represents the string indicating the curve used for +// the given cipher, when applicable +func TLSCurve(val string) attribute.KeyValue { + return TLSCurveKey.String(val) +} + +// TLSEstablished returns an attribute KeyValue conforming to the +// "tls.established" semantic conventions. It represents the boolean flag +// indicating if the TLS negotiation was successful and transitioned to an +// encrypted tunnel. +func TLSEstablished(val bool) attribute.KeyValue { + return TLSEstablishedKey.Bool(val) +} + +// TLSNextProtocol returns an attribute KeyValue conforming to the +// "tls.next_protocol" semantic conventions. It represents the string +// indicating the protocol being tunneled. Per the values in the [IANA +// registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), +// this string should be lower case. +func TLSNextProtocol(val string) attribute.KeyValue { + return TLSNextProtocolKey.String(val) +} + +// TLSProtocolVersion returns an attribute KeyValue conforming to the +// "tls.protocol.version" semantic conventions. It represents the numeric part +// of the version parsed from the original string of the negotiated [SSL/TLS +// protocol +// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +func TLSProtocolVersion(val string) attribute.KeyValue { + return TLSProtocolVersionKey.String(val) +} + +// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed" +// semantic conventions. It represents the boolean flag indicating if this TLS +// connection was resumed from an existing TLS negotiation. +func TLSResumed(val bool) attribute.KeyValue { + return TLSResumedKey.Bool(val) +} + +// TLSServerCertificate returns an attribute KeyValue conforming to the +// "tls.server.certificate" semantic conventions. It represents the pEM-encoded +// stand-alone certificate offered by the server. This is usually +// mutually-exclusive of `server.certificate_chain` since this value also +// exists in that list. +func TLSServerCertificate(val string) attribute.KeyValue { + return TLSServerCertificateKey.String(val) +} + +// TLSServerCertificateChain returns an attribute KeyValue conforming to the +// "tls.server.certificate_chain" semantic conventions. It represents the array +// of PEM-encoded certificates that make up the certificate chain offered by +// the server. This is usually mutually-exclusive of `server.certificate` since +// that value should be the first certificate in the chain. +func TLSServerCertificateChain(val ...string) attribute.KeyValue { + return TLSServerCertificateChainKey.StringSlice(val) +} + +// TLSServerHashMd5 returns an attribute KeyValue conforming to the +// "tls.server.hash.md5" semantic conventions. It represents the certificate +// fingerprint using the MD5 digest of DER-encoded version of certificate +// offered by the server. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSServerHashMd5(val string) attribute.KeyValue { + return TLSServerHashMd5Key.String(val) +} + +// TLSServerHashSha1 returns an attribute KeyValue conforming to the +// "tls.server.hash.sha1" semantic conventions. It represents the certificate +// fingerprint using the SHA1 digest of DER-encoded version of certificate +// offered by the server. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSServerHashSha1(val string) attribute.KeyValue { + return TLSServerHashSha1Key.String(val) +} + +// TLSServerHashSha256 returns an attribute KeyValue conforming to the +// "tls.server.hash.sha256" semantic conventions. It represents the certificate +// fingerprint using the SHA256 digest of DER-encoded version of certificate +// offered by the server. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSServerHashSha256(val string) attribute.KeyValue { + return TLSServerHashSha256Key.String(val) +} + +// TLSServerIssuer returns an attribute KeyValue conforming to the +// "tls.server.issuer" semantic conventions. It represents the distinguished +// name of +// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of +// the issuer of the x.509 certificate presented by the client. +func TLSServerIssuer(val string) attribute.KeyValue { + return TLSServerIssuerKey.String(val) +} + +// TLSServerJa3s returns an attribute KeyValue conforming to the +// "tls.server.ja3s" semantic conventions. It represents a hash that identifies +// servers based on how they perform an SSL/TLS handshake. +func TLSServerJa3s(val string) attribute.KeyValue { + return TLSServerJa3sKey.String(val) +} + +// TLSServerNotAfter returns an attribute KeyValue conforming to the +// "tls.server.not_after" semantic conventions. It represents the date/Time +// indicating when server certificate is no longer considered valid. +func TLSServerNotAfter(val string) attribute.KeyValue { + return TLSServerNotAfterKey.String(val) +} + +// TLSServerNotBefore returns an attribute KeyValue conforming to the +// "tls.server.not_before" semantic conventions. It represents the date/Time +// indicating when server certificate is first considered valid. +func TLSServerNotBefore(val string) attribute.KeyValue { + return TLSServerNotBeforeKey.String(val) +} + +// TLSServerSubject returns an attribute KeyValue conforming to the +// "tls.server.subject" semantic conventions. It represents the distinguished +// name of subject of the x.509 certificate presented by the server. +func TLSServerSubject(val string) attribute.KeyValue { + return TLSServerSubjectKey.String(val) +} + +// Attributes describing URL. +const ( + // URLFragmentKey is the attribute Key conforming to the "url.fragment" + // semantic conventions. It represents the [URI + // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'SemConv' + URLFragmentKey = attribute.Key("url.fragment") + + // URLFullKey is the attribute Key conforming to the "url.full" semantic + // conventions. It represents the absolute URL describing a network + // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', + // '//localhost' + // Note: For network calls, URL usually has + // `scheme://host[:port][path][?query][#fragment]` format, where the + // fragment is not transmitted over HTTP, but if it is known, it SHOULD be + // included nevertheless. + // `url.full` MUST NOT contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case username and + // password SHOULD be redacted and attribute's value SHOULD be + // `https://REDACTED:REDACTED@www.example.com/`. + // `url.full` SHOULD capture the absolute URL when it is available (or can + // be reconstructed) and SHOULD NOT be validated or modified except for + // sanitizing purposes. + URLFullKey = attribute.Key("url.full") + + // URLPathKey is the attribute Key conforming to the "url.path" semantic + // conventions. It represents the [URI + // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/search' + URLPathKey = attribute.Key("url.path") + + // URLQueryKey is the attribute Key conforming to the "url.query" semantic + // conventions. It represents the [URI + // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'q=OpenTelemetry' + // Note: Sensitive content provided in query string SHOULD be scrubbed when + // instrumentations can identify it. + URLQueryKey = attribute.Key("url.query") + + // URLSchemeKey is the attribute Key conforming to the "url.scheme" + // semantic conventions. It represents the [URI + // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component + // identifying the used protocol. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'https', 'ftp', 'telnet' + URLSchemeKey = attribute.Key("url.scheme") +) + +// URLFragment returns an attribute KeyValue conforming to the +// "url.fragment" semantic conventions. It represents the [URI +// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component +func URLFragment(val string) attribute.KeyValue { + return URLFragmentKey.String(val) +} + +// URLFull returns an attribute KeyValue conforming to the "url.full" +// semantic conventions. It represents the absolute URL describing a network +// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) +func URLFull(val string) attribute.KeyValue { + return URLFullKey.String(val) +} + +// URLPath returns an attribute KeyValue conforming to the "url.path" +// semantic conventions. It represents the [URI +// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component +func URLPath(val string) attribute.KeyValue { + return URLPathKey.String(val) +} + +// URLQuery returns an attribute KeyValue conforming to the "url.query" +// semantic conventions. It represents the [URI +// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component +func URLQuery(val string) attribute.KeyValue { + return URLQueryKey.String(val) +} + +// URLScheme returns an attribute KeyValue conforming to the "url.scheme" +// semantic conventions. It represents the [URI +// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component +// identifying the used protocol. +func URLScheme(val string) attribute.KeyValue { + return URLSchemeKey.String(val) +} + +// Describes user-agent attributes. +const ( + // UserAgentOriginalKey is the attribute Key conforming to the + // "user_agent.original" semantic conventions. It represents the value of + // the [HTTP + // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) + // header sent by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU + // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) + // Version/14.1.2 Mobile/15E148 Safari/604.1' + UserAgentOriginalKey = attribute.Key("user_agent.original") +) + +// UserAgentOriginal returns an attribute KeyValue conforming to the +// "user_agent.original" semantic conventions. It represents the value of the +// [HTTP +// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) +// header sent by the client. +func UserAgentOriginal(val string) attribute.KeyValue { + return UserAgentOriginalKey.String(val) +} + +// Session is defined as the period of time encompassing all activities +// performed by the application and the actions executed by the end user. +// Consequently, a Session is represented as a collection of Logs, Events, and +// Spans emitted by the Client Application throughout the Session's duration. +// Each Session is assigned a unique identifier, which is included as an +// attribute in the Logs, Events, and Spans generated during the Session's +// lifecycle. +// When a session reaches end of life, typically due to user inactivity or +// session timeout, a new session identifier will be assigned. The previous +// session identifier may be provided by the instrumentation so that telemetry +// backends can link the two sessions. +const ( + // SessionIDKey is the attribute Key conforming to the "session.id" + // semantic conventions. It represents a unique id to identify a session. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '00112233-4455-6677-8899-aabbccddeeff' + SessionIDKey = attribute.Key("session.id") + + // SessionPreviousIDKey is the attribute Key conforming to the + // "session.previous_id" semantic conventions. It represents the previous + // `session.id` for this user, when known. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '00112233-4455-6677-8899-aabbccddeeff' + SessionPreviousIDKey = attribute.Key("session.previous_id") +) + +// SessionID returns an attribute KeyValue conforming to the "session.id" +// semantic conventions. It represents a unique id to identify a session. +func SessionID(val string) attribute.KeyValue { + return SessionIDKey.String(val) +} + +// SessionPreviousID returns an attribute KeyValue conforming to the +// "session.previous_id" semantic conventions. It represents the previous +// `session.id` for this user, when known. +func SessionPreviousID(val string) attribute.KeyValue { + return SessionPreviousIDKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go new file mode 100644 index 000000000..d27e8a8f8 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the v1.24.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go new file mode 100644 index 000000000..6c019aafc --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go @@ -0,0 +1,200 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +import "go.opentelemetry.io/otel/attribute" + +// This event represents an occurrence of a lifecycle transition on the iOS +// platform. +const ( + // IosStateKey is the attribute Key conforming to the "ios.state" semantic + // conventions. It represents the this attribute represents the state the + // application has transitioned into at the occurrence of the event. + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + // Note: The iOS lifecycle states are defined in the [UIApplicationDelegate + // documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), + // and from which the `OS terminology` column values are derived. + IosStateKey = attribute.Key("ios.state") +) + +var ( + // The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive` + IosStateActive = IosStateKey.String("active") + // The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive` + IosStateInactive = IosStateKey.String("inactive") + // The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground` + IosStateBackground = IosStateKey.String("background") + // The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground` + IosStateForeground = IosStateKey.String("foreground") + // The app is about to terminate. Associated with UIKit notification `applicationWillTerminate` + IosStateTerminate = IosStateKey.String("terminate") +) + +// This event represents an occurrence of a lifecycle transition on the Android +// platform. +const ( + // AndroidStateKey is the attribute Key conforming to the "android.state" + // semantic conventions. It represents the this attribute represents the + // state the application has transitioned into at the occurrence of the + // event. + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + // Note: The Android lifecycle states are defined in [Activity lifecycle + // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), + // and from which the `OS identifiers` are derived. + AndroidStateKey = attribute.Key("android.state") +) + +var ( + // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time + AndroidStateCreated = AndroidStateKey.String("created") + // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state + AndroidStateBackground = AndroidStateKey.String("background") + // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states + AndroidStateForeground = AndroidStateKey.String("foreground") +) + +// This semantic convention defines the attributes used to represent a feature +// flag evaluation as an event. +const ( + // FeatureFlagKeyKey is the attribute Key conforming to the + // "feature_flag.key" semantic conventions. It represents the unique + // identifier of the feature flag. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'logo-color' + FeatureFlagKeyKey = attribute.Key("feature_flag.key") + + // FeatureFlagProviderNameKey is the attribute Key conforming to the + // "feature_flag.provider_name" semantic conventions. It represents the + // name of the service provider that performs the flag evaluation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: experimental + // Examples: 'Flag Manager' + FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") + + // FeatureFlagVariantKey is the attribute Key conforming to the + // "feature_flag.variant" semantic conventions. It represents the sHOULD be + // a semantic identifier for a value. If one is unavailable, a stringified + // version of the value can be used. + // + // Type: string + // RequirementLevel: Recommended + // Stability: experimental + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides + // a means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant `red` maybe be used for the value `#c05543`. + // + // A stringified version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + FeatureFlagVariantKey = attribute.Key("feature_flag.variant") +) + +// FeatureFlagKey returns an attribute KeyValue conforming to the +// "feature_flag.key" semantic conventions. It represents the unique identifier +// of the feature flag. +func FeatureFlagKey(val string) attribute.KeyValue { + return FeatureFlagKeyKey.String(val) +} + +// FeatureFlagProviderName returns an attribute KeyValue conforming to the +// "feature_flag.provider_name" semantic conventions. It represents the name of +// the service provider that performs the flag evaluation. +func FeatureFlagProviderName(val string) attribute.KeyValue { + return FeatureFlagProviderNameKey.String(val) +} + +// FeatureFlagVariant returns an attribute KeyValue conforming to the +// "feature_flag.variant" semantic conventions. It represents the sHOULD be a +// semantic identifier for a value. If one is unavailable, a stringified +// version of the value can be used. +func FeatureFlagVariant(val string) attribute.KeyValue { + return FeatureFlagVariantKey.String(val) +} + +// RPC received/sent message. +const ( + // MessageCompressedSizeKey is the attribute Key conforming to the + // "message.compressed_size" semantic conventions. It represents the + // compressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + MessageCompressedSizeKey = attribute.Key("message.compressed_size") + + // MessageIDKey is the attribute Key conforming to the "message.id" + // semantic conventions. It represents the mUST be calculated as two + // different counters starting from `1` one for sent messages and one for + // received message. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Note: This way we guarantee that the values will be consistent between + // different implementations. + MessageIDKey = attribute.Key("message.id") + + // MessageTypeKey is the attribute Key conforming to the "message.type" + // semantic conventions. It represents the whether this is a received or + // sent message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessageTypeKey = attribute.Key("message.type") + + // MessageUncompressedSizeKey is the attribute Key conforming to the + // "message.uncompressed_size" semantic conventions. It represents the + // uncompressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") +) + +var ( + // sent + MessageTypeSent = MessageTypeKey.String("SENT") + // received + MessageTypeReceived = MessageTypeKey.String("RECEIVED") +) + +// MessageCompressedSize returns an attribute KeyValue conforming to the +// "message.compressed_size" semantic conventions. It represents the compressed +// size of the message in bytes. +func MessageCompressedSize(val int) attribute.KeyValue { + return MessageCompressedSizeKey.Int(val) +} + +// MessageID returns an attribute KeyValue conforming to the "message.id" +// semantic conventions. It represents the mUST be calculated as two different +// counters starting from `1` one for sent messages and one for received +// message. +func MessageID(val int) attribute.KeyValue { + return MessageIDKey.Int(val) +} + +// MessageUncompressedSize returns an attribute KeyValue conforming to the +// "message.uncompressed_size" semantic conventions. It represents the +// uncompressed size of the message in bytes. +func MessageUncompressedSize(val int) attribute.KeyValue { + return MessageUncompressedSizeKey.Int(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go new file mode 100644 index 000000000..7235bb51d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +const ( + // ExceptionEventName is the name of the Span event representing an exception. + ExceptionEventName = "exception" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/metric.go new file mode 100644 index 000000000..a6b953f62 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/metric.go @@ -0,0 +1,1071 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +const ( + + // DBClientConnectionsUsage is the metric conforming to the + // "db.client.connections.usage" semantic conventions. It represents the number + // of connections that are currently in state described by the `state` + // attribute. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsUsageName = "db.client.connections.usage" + DBClientConnectionsUsageUnit = "{connection}" + DBClientConnectionsUsageDescription = "The number of connections that are currently in state described by the `state` attribute" + + // DBClientConnectionsIdleMax is the metric conforming to the + // "db.client.connections.idle.max" semantic conventions. It represents the + // maximum number of idle open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" + DBClientConnectionsIdleMaxUnit = "{connection}" + DBClientConnectionsIdleMaxDescription = "The maximum number of idle open connections allowed" + + // DBClientConnectionsIdleMin is the metric conforming to the + // "db.client.connections.idle.min" semantic conventions. It represents the + // minimum number of idle open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsIdleMinName = "db.client.connections.idle.min" + DBClientConnectionsIdleMinUnit = "{connection}" + DBClientConnectionsIdleMinDescription = "The minimum number of idle open connections allowed" + + // DBClientConnectionsMax is the metric conforming to the + // "db.client.connections.max" semantic conventions. It represents the maximum + // number of open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsMaxName = "db.client.connections.max" + DBClientConnectionsMaxUnit = "{connection}" + DBClientConnectionsMaxDescription = "The maximum number of open connections allowed" + + // DBClientConnectionsPendingRequests is the metric conforming to the + // "db.client.connections.pending_requests" semantic conventions. It represents + // the number of pending requests for an open connection, cumulative for the + // entire pool. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" + DBClientConnectionsPendingRequestsUnit = "{request}" + DBClientConnectionsPendingRequestsDescription = "The number of pending requests for an open connection, cumulative for the entire pool" + + // DBClientConnectionsTimeouts is the metric conforming to the + // "db.client.connections.timeouts" semantic conventions. It represents the + // number of connection timeouts that have occurred trying to obtain a + // connection from the pool. + // Instrument: counter + // Unit: {timeout} + // Stability: Experimental + DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" + DBClientConnectionsTimeoutsUnit = "{timeout}" + DBClientConnectionsTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" + + // DBClientConnectionsCreateTime is the metric conforming to the + // "db.client.connections.create_time" semantic conventions. It represents the + // time it took to create a new connection. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + DBClientConnectionsCreateTimeName = "db.client.connections.create_time" + DBClientConnectionsCreateTimeUnit = "ms" + DBClientConnectionsCreateTimeDescription = "The time it took to create a new connection" + + // DBClientConnectionsWaitTime is the metric conforming to the + // "db.client.connections.wait_time" semantic conventions. It represents the + // time it took to obtain an open connection from the pool. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" + DBClientConnectionsWaitTimeUnit = "ms" + DBClientConnectionsWaitTimeDescription = "The time it took to obtain an open connection from the pool" + + // DBClientConnectionsUseTime is the metric conforming to the + // "db.client.connections.use_time" semantic conventions. It represents the + // time between borrowing a connection and returning it to the pool. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + DBClientConnectionsUseTimeName = "db.client.connections.use_time" + DBClientConnectionsUseTimeUnit = "ms" + DBClientConnectionsUseTimeDescription = "The time between borrowing a connection and returning it to the pool" + + // AspnetcoreRoutingMatchAttempts is the metric conforming to the + // "aspnetcore.routing.match_attempts" semantic conventions. It represents the + // number of requests that were attempted to be matched to an endpoint. + // Instrument: counter + // Unit: {match_attempt} + // Stability: Experimental + AspnetcoreRoutingMatchAttemptsName = "aspnetcore.routing.match_attempts" + AspnetcoreRoutingMatchAttemptsUnit = "{match_attempt}" + AspnetcoreRoutingMatchAttemptsDescription = "Number of requests that were attempted to be matched to an endpoint." + + // AspnetcoreDiagnosticsExceptions is the metric conforming to the + // "aspnetcore.diagnostics.exceptions" semantic conventions. It represents the + // number of exceptions caught by exception handling middleware. + // Instrument: counter + // Unit: {exception} + // Stability: Experimental + AspnetcoreDiagnosticsExceptionsName = "aspnetcore.diagnostics.exceptions" + AspnetcoreDiagnosticsExceptionsUnit = "{exception}" + AspnetcoreDiagnosticsExceptionsDescription = "Number of exceptions caught by exception handling middleware." + + // AspnetcoreRateLimitingActiveRequestLeases is the metric conforming to the + // "aspnetcore.rate_limiting.active_request_leases" semantic conventions. It + // represents the number of requests that are currently active on the server + // that hold a rate limiting lease. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + AspnetcoreRateLimitingActiveRequestLeasesName = "aspnetcore.rate_limiting.active_request_leases" + AspnetcoreRateLimitingActiveRequestLeasesUnit = "{request}" + AspnetcoreRateLimitingActiveRequestLeasesDescription = "Number of requests that are currently active on the server that hold a rate limiting lease." + + // AspnetcoreRateLimitingRequestLeaseDuration is the metric conforming to the + // "aspnetcore.rate_limiting.request_lease.duration" semantic conventions. It + // represents the duration of rate limiting lease held by requests on the + // server. + // Instrument: histogram + // Unit: s + // Stability: Experimental + AspnetcoreRateLimitingRequestLeaseDurationName = "aspnetcore.rate_limiting.request_lease.duration" + AspnetcoreRateLimitingRequestLeaseDurationUnit = "s" + AspnetcoreRateLimitingRequestLeaseDurationDescription = "The duration of rate limiting lease held by requests on the server." + + // AspnetcoreRateLimitingRequestTimeInQueue is the metric conforming to the + // "aspnetcore.rate_limiting.request.time_in_queue" semantic conventions. It + // represents the time the request spent in a queue waiting to acquire a rate + // limiting lease. + // Instrument: histogram + // Unit: s + // Stability: Experimental + AspnetcoreRateLimitingRequestTimeInQueueName = "aspnetcore.rate_limiting.request.time_in_queue" + AspnetcoreRateLimitingRequestTimeInQueueUnit = "s" + AspnetcoreRateLimitingRequestTimeInQueueDescription = "The time the request spent in a queue waiting to acquire a rate limiting lease." + + // AspnetcoreRateLimitingQueuedRequests is the metric conforming to the + // "aspnetcore.rate_limiting.queued_requests" semantic conventions. It + // represents the number of requests that are currently queued, waiting to + // acquire a rate limiting lease. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + AspnetcoreRateLimitingQueuedRequestsName = "aspnetcore.rate_limiting.queued_requests" + AspnetcoreRateLimitingQueuedRequestsUnit = "{request}" + AspnetcoreRateLimitingQueuedRequestsDescription = "Number of requests that are currently queued, waiting to acquire a rate limiting lease." + + // AspnetcoreRateLimitingRequests is the metric conforming to the + // "aspnetcore.rate_limiting.requests" semantic conventions. It represents the + // number of requests that tried to acquire a rate limiting lease. + // Instrument: counter + // Unit: {request} + // Stability: Experimental + AspnetcoreRateLimitingRequestsName = "aspnetcore.rate_limiting.requests" + AspnetcoreRateLimitingRequestsUnit = "{request}" + AspnetcoreRateLimitingRequestsDescription = "Number of requests that tried to acquire a rate limiting lease." + + // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" + // semantic conventions. It represents the measures the time taken to perform a + // DNS lookup. + // Instrument: histogram + // Unit: s + // Stability: Experimental + DNSLookupDurationName = "dns.lookup.duration" + DNSLookupDurationUnit = "s" + DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." + + // HTTPClientOpenConnections is the metric conforming to the + // "http.client.open_connections" semantic conventions. It represents the + // number of outbound HTTP connections that are currently active or idle on the + // client. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + HTTPClientOpenConnectionsName = "http.client.open_connections" + HTTPClientOpenConnectionsUnit = "{connection}" + HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." + + // HTTPClientConnectionDuration is the metric conforming to the + // "http.client.connection.duration" semantic conventions. It represents the + // duration of the successfully established outbound HTTP connections. + // Instrument: histogram + // Unit: s + // Stability: Experimental + HTTPClientConnectionDurationName = "http.client.connection.duration" + HTTPClientConnectionDurationUnit = "s" + HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." + + // HTTPClientActiveRequests is the metric conforming to the + // "http.client.active_requests" semantic conventions. It represents the number + // of active HTTP requests. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + HTTPClientActiveRequestsName = "http.client.active_requests" + HTTPClientActiveRequestsUnit = "{request}" + HTTPClientActiveRequestsDescription = "Number of active HTTP requests." + + // HTTPClientRequestTimeInQueue is the metric conforming to the + // "http.client.request.time_in_queue" semantic conventions. It represents the + // amount of time requests spent on a queue waiting for an available + // connection. + // Instrument: histogram + // Unit: s + // Stability: Experimental + HTTPClientRequestTimeInQueueName = "http.client.request.time_in_queue" + HTTPClientRequestTimeInQueueUnit = "s" + HTTPClientRequestTimeInQueueDescription = "The amount of time requests spent on a queue waiting for an available connection." + + // KestrelActiveConnections is the metric conforming to the + // "kestrel.active_connections" semantic conventions. It represents the number + // of connections that are currently active on the server. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + KestrelActiveConnectionsName = "kestrel.active_connections" + KestrelActiveConnectionsUnit = "{connection}" + KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." + + // KestrelConnectionDuration is the metric conforming to the + // "kestrel.connection.duration" semantic conventions. It represents the + // duration of connections on the server. + // Instrument: histogram + // Unit: s + // Stability: Experimental + KestrelConnectionDurationName = "kestrel.connection.duration" + KestrelConnectionDurationUnit = "s" + KestrelConnectionDurationDescription = "The duration of connections on the server." + + // KestrelRejectedConnections is the metric conforming to the + // "kestrel.rejected_connections" semantic conventions. It represents the + // number of connections rejected by the server. + // Instrument: counter + // Unit: {connection} + // Stability: Experimental + KestrelRejectedConnectionsName = "kestrel.rejected_connections" + KestrelRejectedConnectionsUnit = "{connection}" + KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." + + // KestrelQueuedConnections is the metric conforming to the + // "kestrel.queued_connections" semantic conventions. It represents the number + // of connections that are currently queued and are waiting to start. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + KestrelQueuedConnectionsName = "kestrel.queued_connections" + KestrelQueuedConnectionsUnit = "{connection}" + KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." + + // KestrelQueuedRequests is the metric conforming to the + // "kestrel.queued_requests" semantic conventions. It represents the number of + // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are + // currently queued and are waiting to start. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + KestrelQueuedRequestsName = "kestrel.queued_requests" + KestrelQueuedRequestsUnit = "{request}" + KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." + + // KestrelUpgradedConnections is the metric conforming to the + // "kestrel.upgraded_connections" semantic conventions. It represents the + // number of connections that are currently upgraded (WebSockets). . + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" + KestrelUpgradedConnectionsUnit = "{connection}" + KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." + + // KestrelTLSHandshakeDuration is the metric conforming to the + // "kestrel.tls_handshake.duration" semantic conventions. It represents the + // duration of TLS handshakes on the server. + // Instrument: histogram + // Unit: s + // Stability: Experimental + KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" + KestrelTLSHandshakeDurationUnit = "s" + KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." + + // KestrelActiveTLSHandshakes is the metric conforming to the + // "kestrel.active_tls_handshakes" semantic conventions. It represents the + // number of TLS handshakes that are currently in progress on the server. + // Instrument: updowncounter + // Unit: {handshake} + // Stability: Experimental + KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" + KestrelActiveTLSHandshakesUnit = "{handshake}" + KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." + + // SignalrServerConnectionDuration is the metric conforming to the + // "signalr.server.connection.duration" semantic conventions. It represents the + // duration of connections on the server. + // Instrument: histogram + // Unit: s + // Stability: Experimental + SignalrServerConnectionDurationName = "signalr.server.connection.duration" + SignalrServerConnectionDurationUnit = "s" + SignalrServerConnectionDurationDescription = "The duration of connections on the server." + + // SignalrServerActiveConnections is the metric conforming to the + // "signalr.server.active_connections" semantic conventions. It represents the + // number of connections that are currently active on the server. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + SignalrServerActiveConnectionsName = "signalr.server.active_connections" + SignalrServerActiveConnectionsUnit = "{connection}" + SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." + + // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" + // semantic conventions. It represents the measures the duration of the + // function's logic execution. + // Instrument: histogram + // Unit: s + // Stability: Experimental + FaaSInvokeDurationName = "faas.invoke_duration" + FaaSInvokeDurationUnit = "s" + FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" + + // FaaSInitDuration is the metric conforming to the "faas.init_duration" + // semantic conventions. It represents the measures the duration of the + // function's initialization, such as a cold start. + // Instrument: histogram + // Unit: s + // Stability: Experimental + FaaSInitDurationName = "faas.init_duration" + FaaSInitDurationUnit = "s" + FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" + + // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic + // conventions. It represents the number of invocation cold starts. + // Instrument: counter + // Unit: {coldstart} + // Stability: Experimental + FaaSColdstartsName = "faas.coldstarts" + FaaSColdstartsUnit = "{coldstart}" + FaaSColdstartsDescription = "Number of invocation cold starts" + + // FaaSErrors is the metric conforming to the "faas.errors" semantic + // conventions. It represents the number of invocation errors. + // Instrument: counter + // Unit: {error} + // Stability: Experimental + FaaSErrorsName = "faas.errors" + FaaSErrorsUnit = "{error}" + FaaSErrorsDescription = "Number of invocation errors" + + // FaaSInvocations is the metric conforming to the "faas.invocations" semantic + // conventions. It represents the number of successful invocations. + // Instrument: counter + // Unit: {invocation} + // Stability: Experimental + FaaSInvocationsName = "faas.invocations" + FaaSInvocationsUnit = "{invocation}" + FaaSInvocationsDescription = "Number of successful invocations" + + // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic + // conventions. It represents the number of invocation timeouts. + // Instrument: counter + // Unit: {timeout} + // Stability: Experimental + FaaSTimeoutsName = "faas.timeouts" + FaaSTimeoutsUnit = "{timeout}" + FaaSTimeoutsDescription = "Number of invocation timeouts" + + // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic + // conventions. It represents the distribution of max memory usage per + // invocation. + // Instrument: histogram + // Unit: By + // Stability: Experimental + FaaSMemUsageName = "faas.mem_usage" + FaaSMemUsageUnit = "By" + FaaSMemUsageDescription = "Distribution of max memory usage per invocation" + + // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic + // conventions. It represents the distribution of CPU usage per invocation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + FaaSCPUUsageName = "faas.cpu_usage" + FaaSCPUUsageUnit = "s" + FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" + + // FaaSNetIo is the metric conforming to the "faas.net_io" semantic + // conventions. It represents the distribution of net I/O usage per invocation. + // Instrument: histogram + // Unit: By + // Stability: Experimental + FaaSNetIoName = "faas.net_io" + FaaSNetIoUnit = "By" + FaaSNetIoDescription = "Distribution of net I/O usage per invocation" + + // HTTPServerRequestDuration is the metric conforming to the + // "http.server.request.duration" semantic conventions. It represents the + // duration of HTTP server requests. + // Instrument: histogram + // Unit: s + // Stability: Stable + HTTPServerRequestDurationName = "http.server.request.duration" + HTTPServerRequestDurationUnit = "s" + HTTPServerRequestDurationDescription = "Duration of HTTP server requests." + + // HTTPServerActiveRequests is the metric conforming to the + // "http.server.active_requests" semantic conventions. It represents the number + // of active HTTP server requests. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + HTTPServerActiveRequestsName = "http.server.active_requests" + HTTPServerActiveRequestsUnit = "{request}" + HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." + + // HTTPServerRequestBodySize is the metric conforming to the + // "http.server.request.body.size" semantic conventions. It represents the size + // of HTTP server request bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPServerRequestBodySizeName = "http.server.request.body.size" + HTTPServerRequestBodySizeUnit = "By" + HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." + + // HTTPServerResponseBodySize is the metric conforming to the + // "http.server.response.body.size" semantic conventions. It represents the + // size of HTTP server response bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPServerResponseBodySizeName = "http.server.response.body.size" + HTTPServerResponseBodySizeUnit = "By" + HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." + + // HTTPClientRequestDuration is the metric conforming to the + // "http.client.request.duration" semantic conventions. It represents the + // duration of HTTP client requests. + // Instrument: histogram + // Unit: s + // Stability: Stable + HTTPClientRequestDurationName = "http.client.request.duration" + HTTPClientRequestDurationUnit = "s" + HTTPClientRequestDurationDescription = "Duration of HTTP client requests." + + // HTTPClientRequestBodySize is the metric conforming to the + // "http.client.request.body.size" semantic conventions. It represents the size + // of HTTP client request bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPClientRequestBodySizeName = "http.client.request.body.size" + HTTPClientRequestBodySizeUnit = "By" + HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." + + // HTTPClientResponseBodySize is the metric conforming to the + // "http.client.response.body.size" semantic conventions. It represents the + // size of HTTP client response bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPClientResponseBodySizeName = "http.client.response.body.size" + HTTPClientResponseBodySizeUnit = "By" + HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." + + // JvmMemoryInit is the metric conforming to the "jvm.memory.init" semantic + // conventions. It represents the measure of initial memory requested. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + JvmMemoryInitName = "jvm.memory.init" + JvmMemoryInitUnit = "By" + JvmMemoryInitDescription = "Measure of initial memory requested." + + // JvmSystemCPUUtilization is the metric conforming to the + // "jvm.system.cpu.utilization" semantic conventions. It represents the recent + // CPU utilization for the whole system as reported by the JVM. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + JvmSystemCPUUtilizationName = "jvm.system.cpu.utilization" + JvmSystemCPUUtilizationUnit = "1" + JvmSystemCPUUtilizationDescription = "Recent CPU utilization for the whole system as reported by the JVM." + + // JvmSystemCPULoad1m is the metric conforming to the "jvm.system.cpu.load_1m" + // semantic conventions. It represents the average CPU load of the whole system + // for the last minute as reported by the JVM. + // Instrument: gauge + // Unit: {run_queue_item} + // Stability: Experimental + JvmSystemCPULoad1mName = "jvm.system.cpu.load_1m" + JvmSystemCPULoad1mUnit = "{run_queue_item}" + JvmSystemCPULoad1mDescription = "Average CPU load of the whole system for the last minute as reported by the JVM." + + // JvmBufferMemoryUsage is the metric conforming to the + // "jvm.buffer.memory.usage" semantic conventions. It represents the measure of + // memory used by buffers. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + JvmBufferMemoryUsageName = "jvm.buffer.memory.usage" + JvmBufferMemoryUsageUnit = "By" + JvmBufferMemoryUsageDescription = "Measure of memory used by buffers." + + // JvmBufferMemoryLimit is the metric conforming to the + // "jvm.buffer.memory.limit" semantic conventions. It represents the measure of + // total memory capacity of buffers. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + JvmBufferMemoryLimitName = "jvm.buffer.memory.limit" + JvmBufferMemoryLimitUnit = "By" + JvmBufferMemoryLimitDescription = "Measure of total memory capacity of buffers." + + // JvmBufferCount is the metric conforming to the "jvm.buffer.count" semantic + // conventions. It represents the number of buffers in the pool. + // Instrument: updowncounter + // Unit: {buffer} + // Stability: Experimental + JvmBufferCountName = "jvm.buffer.count" + JvmBufferCountUnit = "{buffer}" + JvmBufferCountDescription = "Number of buffers in the pool." + + // JvmMemoryUsed is the metric conforming to the "jvm.memory.used" semantic + // conventions. It represents the measure of memory used. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryUsedName = "jvm.memory.used" + JvmMemoryUsedUnit = "By" + JvmMemoryUsedDescription = "Measure of memory used." + + // JvmMemoryCommitted is the metric conforming to the "jvm.memory.committed" + // semantic conventions. It represents the measure of memory committed. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryCommittedName = "jvm.memory.committed" + JvmMemoryCommittedUnit = "By" + JvmMemoryCommittedDescription = "Measure of memory committed." + + // JvmMemoryLimit is the metric conforming to the "jvm.memory.limit" semantic + // conventions. It represents the measure of max obtainable memory. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryLimitName = "jvm.memory.limit" + JvmMemoryLimitUnit = "By" + JvmMemoryLimitDescription = "Measure of max obtainable memory." + + // JvmMemoryUsedAfterLastGc is the metric conforming to the + // "jvm.memory.used_after_last_gc" semantic conventions. It represents the + // measure of memory used, as measured after the most recent garbage collection + // event on this pool. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryUsedAfterLastGcName = "jvm.memory.used_after_last_gc" + JvmMemoryUsedAfterLastGcUnit = "By" + JvmMemoryUsedAfterLastGcDescription = "Measure of memory used, as measured after the most recent garbage collection event on this pool." + + // JvmGcDuration is the metric conforming to the "jvm.gc.duration" semantic + // conventions. It represents the duration of JVM garbage collection actions. + // Instrument: histogram + // Unit: s + // Stability: Stable + JvmGcDurationName = "jvm.gc.duration" + JvmGcDurationUnit = "s" + JvmGcDurationDescription = "Duration of JVM garbage collection actions." + + // JvmThreadCount is the metric conforming to the "jvm.thread.count" semantic + // conventions. It represents the number of executing platform threads. + // Instrument: updowncounter + // Unit: {thread} + // Stability: Stable + JvmThreadCountName = "jvm.thread.count" + JvmThreadCountUnit = "{thread}" + JvmThreadCountDescription = "Number of executing platform threads." + + // JvmClassLoaded is the metric conforming to the "jvm.class.loaded" semantic + // conventions. It represents the number of classes loaded since JVM start. + // Instrument: counter + // Unit: {class} + // Stability: Stable + JvmClassLoadedName = "jvm.class.loaded" + JvmClassLoadedUnit = "{class}" + JvmClassLoadedDescription = "Number of classes loaded since JVM start." + + // JvmClassUnloaded is the metric conforming to the "jvm.class.unloaded" + // semantic conventions. It represents the number of classes unloaded since JVM + // start. + // Instrument: counter + // Unit: {class} + // Stability: Stable + JvmClassUnloadedName = "jvm.class.unloaded" + JvmClassUnloadedUnit = "{class}" + JvmClassUnloadedDescription = "Number of classes unloaded since JVM start." + + // JvmClassCount is the metric conforming to the "jvm.class.count" semantic + // conventions. It represents the number of classes currently loaded. + // Instrument: updowncounter + // Unit: {class} + // Stability: Stable + JvmClassCountName = "jvm.class.count" + JvmClassCountUnit = "{class}" + JvmClassCountDescription = "Number of classes currently loaded." + + // JvmCPUCount is the metric conforming to the "jvm.cpu.count" semantic + // conventions. It represents the number of processors available to the Java + // virtual machine. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: Stable + JvmCPUCountName = "jvm.cpu.count" + JvmCPUCountUnit = "{cpu}" + JvmCPUCountDescription = "Number of processors available to the Java virtual machine." + + // JvmCPUTime is the metric conforming to the "jvm.cpu.time" semantic + // conventions. It represents the cPU time used by the process as reported by + // the JVM. + // Instrument: counter + // Unit: s + // Stability: Stable + JvmCPUTimeName = "jvm.cpu.time" + JvmCPUTimeUnit = "s" + JvmCPUTimeDescription = "CPU time used by the process as reported by the JVM." + + // JvmCPURecentUtilization is the metric conforming to the + // "jvm.cpu.recent_utilization" semantic conventions. It represents the recent + // CPU utilization for the process as reported by the JVM. + // Instrument: gauge + // Unit: 1 + // Stability: Stable + JvmCPURecentUtilizationName = "jvm.cpu.recent_utilization" + JvmCPURecentUtilizationUnit = "1" + JvmCPURecentUtilizationDescription = "Recent CPU utilization for the process as reported by the JVM." + + // MessagingPublishDuration is the metric conforming to the + // "messaging.publish.duration" semantic conventions. It represents the + // measures the duration of publish operation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + MessagingPublishDurationName = "messaging.publish.duration" + MessagingPublishDurationUnit = "s" + MessagingPublishDurationDescription = "Measures the duration of publish operation." + + // MessagingReceiveDuration is the metric conforming to the + // "messaging.receive.duration" semantic conventions. It represents the + // measures the duration of receive operation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + MessagingReceiveDurationName = "messaging.receive.duration" + MessagingReceiveDurationUnit = "s" + MessagingReceiveDurationDescription = "Measures the duration of receive operation." + + // MessagingDeliverDuration is the metric conforming to the + // "messaging.deliver.duration" semantic conventions. It represents the + // measures the duration of deliver operation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + MessagingDeliverDurationName = "messaging.deliver.duration" + MessagingDeliverDurationUnit = "s" + MessagingDeliverDurationDescription = "Measures the duration of deliver operation." + + // MessagingPublishMessages is the metric conforming to the + // "messaging.publish.messages" semantic conventions. It represents the + // measures the number of published messages. + // Instrument: counter + // Unit: {message} + // Stability: Experimental + MessagingPublishMessagesName = "messaging.publish.messages" + MessagingPublishMessagesUnit = "{message}" + MessagingPublishMessagesDescription = "Measures the number of published messages." + + // MessagingReceiveMessages is the metric conforming to the + // "messaging.receive.messages" semantic conventions. It represents the + // measures the number of received messages. + // Instrument: counter + // Unit: {message} + // Stability: Experimental + MessagingReceiveMessagesName = "messaging.receive.messages" + MessagingReceiveMessagesUnit = "{message}" + MessagingReceiveMessagesDescription = "Measures the number of received messages." + + // MessagingDeliverMessages is the metric conforming to the + // "messaging.deliver.messages" semantic conventions. It represents the + // measures the number of delivered messages. + // Instrument: counter + // Unit: {message} + // Stability: Experimental + MessagingDeliverMessagesName = "messaging.deliver.messages" + MessagingDeliverMessagesUnit = "{message}" + MessagingDeliverMessagesDescription = "Measures the number of delivered messages." + + // RPCServerDuration is the metric conforming to the "rpc.server.duration" + // semantic conventions. It represents the measures the duration of inbound + // RPC. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + RPCServerDurationName = "rpc.server.duration" + RPCServerDurationUnit = "ms" + RPCServerDurationDescription = "Measures the duration of inbound RPC." + + // RPCServerRequestSize is the metric conforming to the + // "rpc.server.request.size" semantic conventions. It represents the measures + // the size of RPC request messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCServerRequestSizeName = "rpc.server.request.size" + RPCServerRequestSizeUnit = "By" + RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." + + // RPCServerResponseSize is the metric conforming to the + // "rpc.server.response.size" semantic conventions. It represents the measures + // the size of RPC response messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCServerResponseSizeName = "rpc.server.response.size" + RPCServerResponseSizeUnit = "By" + RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." + + // RPCServerRequestsPerRPC is the metric conforming to the + // "rpc.server.requests_per_rpc" semantic conventions. It represents the + // measures the number of messages received per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" + RPCServerRequestsPerRPCUnit = "{count}" + RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." + + // RPCServerResponsesPerRPC is the metric conforming to the + // "rpc.server.responses_per_rpc" semantic conventions. It represents the + // measures the number of messages sent per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" + RPCServerResponsesPerRPCUnit = "{count}" + RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." + + // RPCClientDuration is the metric conforming to the "rpc.client.duration" + // semantic conventions. It represents the measures the duration of outbound + // RPC. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + RPCClientDurationName = "rpc.client.duration" + RPCClientDurationUnit = "ms" + RPCClientDurationDescription = "Measures the duration of outbound RPC." + + // RPCClientRequestSize is the metric conforming to the + // "rpc.client.request.size" semantic conventions. It represents the measures + // the size of RPC request messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCClientRequestSizeName = "rpc.client.request.size" + RPCClientRequestSizeUnit = "By" + RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." + + // RPCClientResponseSize is the metric conforming to the + // "rpc.client.response.size" semantic conventions. It represents the measures + // the size of RPC response messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCClientResponseSizeName = "rpc.client.response.size" + RPCClientResponseSizeUnit = "By" + RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." + + // RPCClientRequestsPerRPC is the metric conforming to the + // "rpc.client.requests_per_rpc" semantic conventions. It represents the + // measures the number of messages received per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" + RPCClientRequestsPerRPCUnit = "{count}" + RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." + + // RPCClientResponsesPerRPC is the metric conforming to the + // "rpc.client.responses_per_rpc" semantic conventions. It represents the + // measures the number of messages sent per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" + RPCClientResponsesPerRPCUnit = "{count}" + RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." + + // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic + // conventions. It represents the seconds each logical CPU spent on each mode. + // Instrument: counter + // Unit: s + // Stability: Experimental + SystemCPUTimeName = "system.cpu.time" + SystemCPUTimeUnit = "s" + SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" + + // SystemCPUUtilization is the metric conforming to the + // "system.cpu.utilization" semantic conventions. It represents the difference + // in system.cpu.time since the last measurement, divided by the elapsed time + // and number of logical CPUs. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + SystemCPUUtilizationName = "system.cpu.utilization" + SystemCPUUtilizationUnit = "1" + SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" + + // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" + // semantic conventions. It represents the reports the current frequency of the + // CPU in Hz. + // Instrument: gauge + // Unit: {Hz} + // Stability: Experimental + SystemCPUFrequencyName = "system.cpu.frequency" + SystemCPUFrequencyUnit = "{Hz}" + SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" + + // SystemCPUPhysicalCount is the metric conforming to the + // "system.cpu.physical.count" semantic conventions. It represents the reports + // the number of actual physical processor cores on the hardware. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: Experimental + SystemCPUPhysicalCountName = "system.cpu.physical.count" + SystemCPUPhysicalCountUnit = "{cpu}" + SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" + + // SystemCPULogicalCount is the metric conforming to the + // "system.cpu.logical.count" semantic conventions. It represents the reports + // the number of logical (virtual) processor cores created by the operating + // system to manage multitasking. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: Experimental + SystemCPULogicalCountName = "system.cpu.logical.count" + SystemCPULogicalCountUnit = "{cpu}" + SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" + + // SystemMemoryUsage is the metric conforming to the "system.memory.usage" + // semantic conventions. It represents the reports memory in use by state. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemMemoryUsageName = "system.memory.usage" + SystemMemoryUsageUnit = "By" + SystemMemoryUsageDescription = "Reports memory in use by state." + + // SystemMemoryLimit is the metric conforming to the "system.memory.limit" + // semantic conventions. It represents the total memory available in the + // system. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemMemoryLimitName = "system.memory.limit" + SystemMemoryLimitUnit = "By" + SystemMemoryLimitDescription = "Total memory available in the system." + + // SystemMemoryUtilization is the metric conforming to the + // "system.memory.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemMemoryUtilizationName = "system.memory.utilization" + SystemMemoryUtilizationUnit = "1" + + // SystemPagingUsage is the metric conforming to the "system.paging.usage" + // semantic conventions. It represents the unix swap or windows pagefile usage. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemPagingUsageName = "system.paging.usage" + SystemPagingUsageUnit = "By" + SystemPagingUsageDescription = "Unix swap or windows pagefile usage" + + // SystemPagingUtilization is the metric conforming to the + // "system.paging.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingUtilizationName = "system.paging.utilization" + SystemPagingUtilizationUnit = "1" + + // SystemPagingFaults is the metric conforming to the "system.paging.faults" + // semantic conventions. + // Instrument: counter + // Unit: {fault} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingFaultsName = "system.paging.faults" + SystemPagingFaultsUnit = "{fault}" + + // SystemPagingOperations is the metric conforming to the + // "system.paging.operations" semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingOperationsName = "system.paging.operations" + SystemPagingOperationsUnit = "{operation}" + + // SystemDiskIo is the metric conforming to the "system.disk.io" semantic + // conventions. + // Instrument: counter + // Unit: By + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskIoName = "system.disk.io" + SystemDiskIoUnit = "By" + + // SystemDiskOperations is the metric conforming to the + // "system.disk.operations" semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskOperationsName = "system.disk.operations" + SystemDiskOperationsUnit = "{operation}" + + // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" + // semantic conventions. It represents the time disk spent activated. + // Instrument: counter + // Unit: s + // Stability: Experimental + SystemDiskIoTimeName = "system.disk.io_time" + SystemDiskIoTimeUnit = "s" + SystemDiskIoTimeDescription = "Time disk spent activated" + + // SystemDiskOperationTime is the metric conforming to the + // "system.disk.operation_time" semantic conventions. It represents the sum of + // the time each operation took to complete. + // Instrument: counter + // Unit: s + // Stability: Experimental + SystemDiskOperationTimeName = "system.disk.operation_time" + SystemDiskOperationTimeUnit = "s" + SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" + + // SystemDiskMerged is the metric conforming to the "system.disk.merged" + // semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskMergedName = "system.disk.merged" + SystemDiskMergedUnit = "{operation}" + + // SystemFilesystemUsage is the metric conforming to the + // "system.filesystem.usage" semantic conventions. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemFilesystemUsageName = "system.filesystem.usage" + SystemFilesystemUsageUnit = "By" + + // SystemFilesystemUtilization is the metric conforming to the + // "system.filesystem.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemFilesystemUtilizationName = "system.filesystem.utilization" + SystemFilesystemUtilizationUnit = "1" + + // SystemNetworkDropped is the metric conforming to the + // "system.network.dropped" semantic conventions. It represents the count of + // packets that are dropped or discarded even though there was no error. + // Instrument: counter + // Unit: {packet} + // Stability: Experimental + SystemNetworkDroppedName = "system.network.dropped" + SystemNetworkDroppedUnit = "{packet}" + SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" + + // SystemNetworkPackets is the metric conforming to the + // "system.network.packets" semantic conventions. + // Instrument: counter + // Unit: {packet} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkPacketsName = "system.network.packets" + SystemNetworkPacketsUnit = "{packet}" + + // SystemNetworkErrors is the metric conforming to the "system.network.errors" + // semantic conventions. It represents the count of network errors detected. + // Instrument: counter + // Unit: {error} + // Stability: Experimental + SystemNetworkErrorsName = "system.network.errors" + SystemNetworkErrorsUnit = "{error}" + SystemNetworkErrorsDescription = "Count of network errors detected" + + // SystemNetworkIo is the metric conforming to the "system.network.io" semantic + // conventions. + // Instrument: counter + // Unit: By + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkIoName = "system.network.io" + SystemNetworkIoUnit = "By" + + // SystemNetworkConnections is the metric conforming to the + // "system.network.connections" semantic conventions. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkConnectionsName = "system.network.connections" + SystemNetworkConnectionsUnit = "{connection}" + + // SystemProcessesCount is the metric conforming to the + // "system.processes.count" semantic conventions. It represents the total + // number of processes in each state. + // Instrument: updowncounter + // Unit: {process} + // Stability: Experimental + SystemProcessesCountName = "system.processes.count" + SystemProcessesCountUnit = "{process}" + SystemProcessesCountDescription = "Total number of processes in each state" + + // SystemProcessesCreated is the metric conforming to the + // "system.processes.created" semantic conventions. It represents the total + // number of processes created over uptime of the host. + // Instrument: counter + // Unit: {process} + // Stability: Experimental + SystemProcessesCreatedName = "system.processes.created" + SystemProcessesCreatedUnit = "{process}" + SystemProcessesCreatedDescription = "Total number of processes created over uptime of the host" + + // SystemLinuxMemoryAvailable is the metric conforming to the + // "system.linux.memory.available" semantic conventions. It represents an + // estimate of how much memory is available for starting new applications, + // without causing swapping. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemLinuxMemoryAvailableName = "system.linux.memory.available" + SystemLinuxMemoryAvailableUnit = "By" + SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go new file mode 100644 index 000000000..d66bbe9c2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go @@ -0,0 +1,2545 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +import "go.opentelemetry.io/otel/attribute" + +// A cloud environment (e.g. GCP, Azure, AWS). +const ( + // CloudAccountIDKey is the attribute Key conforming to the + // "cloud.account.id" semantic conventions. It represents the cloud account + // ID the resource is assigned to. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '111111111111', 'opentelemetry' + CloudAccountIDKey = attribute.Key("cloud.account.id") + + // CloudAvailabilityZoneKey is the attribute Key conforming to the + // "cloud.availability_zone" semantic conventions. It represents the cloud + // regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the + // resource is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and Google + // Cloud. + CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") + + // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" + // semantic conventions. It represents the cloud platform in use. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The prefix of the service SHOULD match the one specified in + // `cloud.provider`. + CloudPlatformKey = attribute.Key("cloud.platform") + + // CloudProviderKey is the attribute Key conforming to the "cloud.provider" + // semantic conventions. It represents the name of the cloud provider. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + CloudProviderKey = attribute.Key("cloud.provider") + + // CloudRegionKey is the attribute Key conforming to the "cloud.region" + // semantic conventions. It represents the geographical region the resource + // is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for + // example [Alibaba Cloud + // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS + // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), + // [Azure + // regions](https://azure.microsoft.com/global-infrastructure/geographies/), + // [Google Cloud regions](https://cloud.google.com/about/locations), or + // [Tencent Cloud + // regions](https://www.tencentcloud.com/document/product/213/6091). + CloudRegionKey = attribute.Key("cloud.region") + + // CloudResourceIDKey is the attribute Key conforming to the + // "cloud.resource_id" semantic conventions. It represents the cloud + // provider-specific native identifier of the monitored cloud resource + // (e.g. an + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // on AWS, a [fully qualified resource + // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) + // on Azure, a [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // on GCP) + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', + // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', + // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' + // Note: On some cloud providers, it may not be possible to determine the + // full ID at startup, + // so it may be necessary to set `cloud.resource_id` as a span attribute + // instead. + // + // The exact value to use for `cloud.resource_id` depends on the cloud + // provider. + // The following well-known definitions MUST be used if you set this + // attribute and they apply: + // + // * **AWS Lambda:** The function + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + // Take care not to use the "invoked ARN" directly but replace any + // [alias + // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) + // with the resolved function version, as the same runtime instance may + // be invokable with + // multiple different aliases. + // * **GCP:** The [URI of the + // resource](https://cloud.google.com/iam/docs/full-resource-names) + // * **Azure:** The [Fully Qualified Resource + // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) + // of the invoked function, + // *not* the function app, having the form + // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider. + CloudResourceIDKey = attribute.Key("cloud.resource_id") +) + +var ( + // Alibaba Cloud Elastic Compute Service + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + // Red Hat OpenShift on Alibaba Cloud + CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") + // AWS Elastic Compute Cloud + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Red Hat OpenShift on AWS (ROSA) + CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") + // Azure Virtual Machines + CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") + // Azure Container Instances + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") + // Azure Kubernetes Service + CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") + // Azure Functions + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") + // Azure App Service + CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") + // Azure Red Hat OpenShift + CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") + // Google Bare Metal Solution (BMS) + CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") + // Google Cloud Compute Engine (GCE) + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Red Hat OpenShift on Google Cloud + CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") + // Red Hat OpenShift on IBM Cloud + CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") + // Tencent Cloud Cloud Virtual Machine (CVM) + CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") +) + +var ( + // Alibaba Cloud + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + CloudProviderGCP = CloudProviderKey.String("gcp") + // Heroku Platform as a Service + CloudProviderHeroku = CloudProviderKey.String("heroku") + // IBM Cloud + CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") + // Tencent Cloud + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") +) + +// CloudAccountID returns an attribute KeyValue conforming to the +// "cloud.account.id" semantic conventions. It represents the cloud account ID +// the resource is assigned to. +func CloudAccountID(val string) attribute.KeyValue { + return CloudAccountIDKey.String(val) +} + +// CloudAvailabilityZone returns an attribute KeyValue conforming to the +// "cloud.availability_zone" semantic conventions. It represents the cloud +// regions often have multiple, isolated locations known as zones to increase +// availability. Availability zone represents the zone where the resource is +// running. +func CloudAvailabilityZone(val string) attribute.KeyValue { + return CloudAvailabilityZoneKey.String(val) +} + +// CloudRegion returns an attribute KeyValue conforming to the +// "cloud.region" semantic conventions. It represents the geographical region +// the resource is running. +func CloudRegion(val string) attribute.KeyValue { + return CloudRegionKey.String(val) +} + +// CloudResourceID returns an attribute KeyValue conforming to the +// "cloud.resource_id" semantic conventions. It represents the cloud +// provider-specific native identifier of the monitored cloud resource (e.g. an +// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// on AWS, a [fully qualified resource +// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on +// Azure, a [full resource +// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) +// on GCP) +func CloudResourceID(val string) attribute.KeyValue { + return CloudResourceIDKey.String(val) +} + +// A container instance. +const ( + // ContainerCommandKey is the attribute Key conforming to the + // "container.command" semantic conventions. It represents the command used + // to run the container (i.e. the command name). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcontribcol' + // Note: If using embedded credentials or sensitive data, it is recommended + // to remove them to prevent potential leakage. + ContainerCommandKey = attribute.Key("container.command") + + // ContainerCommandArgsKey is the attribute Key conforming to the + // "container.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) run by the + // container. [2] + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcontribcol, --config, config.yaml' + ContainerCommandArgsKey = attribute.Key("container.command_args") + + // ContainerCommandLineKey is the attribute Key conforming to the + // "container.command_line" semantic conventions. It represents the full + // command run by the container as a single string representing the full + // command. [2] + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcontribcol --config config.yaml' + ContainerCommandLineKey = attribute.Key("container.command_line") + + // ContainerIDKey is the attribute Key conforming to the "container.id" + // semantic conventions. It represents the container ID. Usually a UUID, as + // for example used to [identify Docker + // containers](https://docs.docker.com/engine/reference/run/#container-identification). + // The UUID might be abbreviated. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'a3bf90e006b2' + ContainerIDKey = attribute.Key("container.id") + + // ContainerImageIDKey is the attribute Key conforming to the + // "container.image.id" semantic conventions. It represents the runtime + // specific image identifier. Usually a hash algorithm followed by a UUID. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' + // Note: Docker defines a sha256 of the image id; `container.image.id` + // corresponds to the `Image` field from the Docker container inspect + // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) + // endpoint. + // K8S defines a link to the container registry repository with digest + // `"imageID": "registry.azurecr.io + // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. + // The ID is assinged by the container runtime and can vary in different + // environments. Consider using `oci.manifest.digest` if it is important to + // identify the same image in different environments/runtimes. + ContainerImageIDKey = attribute.Key("container.image.id") + + // ContainerImageNameKey is the attribute Key conforming to the + // "container.image.name" semantic conventions. It represents the name of + // the image the container was built on. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'gcr.io/opentelemetry/operator' + ContainerImageNameKey = attribute.Key("container.image.name") + + // ContainerImageRepoDigestsKey is the attribute Key conforming to the + // "container.image.repo_digests" semantic conventions. It represents the + // repo digests of the container image as provided by the container + // runtime. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb', + // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' + // Note: + // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) + // and + // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) + // report those under the `RepoDigests` field. + ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests") + + // ContainerImageTagsKey is the attribute Key conforming to the + // "container.image.tags" semantic conventions. It represents the container + // image tags. An example can be found in [Docker Image + // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). + // Should be only the `` section of the full name for example from + // `registry.example.com/my-org/my-image:`. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'v1.27.1', '3.5.7-0' + ContainerImageTagsKey = attribute.Key("container.image.tags") + + // ContainerNameKey is the attribute Key conforming to the "container.name" + // semantic conventions. It represents the container name used by container + // runtime. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-autoconf' + ContainerNameKey = attribute.Key("container.name") + + // ContainerRuntimeKey is the attribute Key conforming to the + // "container.runtime" semantic conventions. It represents the container + // runtime managing this container. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'docker', 'containerd', 'rkt' + ContainerRuntimeKey = attribute.Key("container.runtime") +) + +// ContainerCommand returns an attribute KeyValue conforming to the +// "container.command" semantic conventions. It represents the command used to +// run the container (i.e. the command name). +func ContainerCommand(val string) attribute.KeyValue { + return ContainerCommandKey.String(val) +} + +// ContainerCommandArgs returns an attribute KeyValue conforming to the +// "container.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) run by the +// container. [2] +func ContainerCommandArgs(val ...string) attribute.KeyValue { + return ContainerCommandArgsKey.StringSlice(val) +} + +// ContainerCommandLine returns an attribute KeyValue conforming to the +// "container.command_line" semantic conventions. It represents the full +// command run by the container as a single string representing the full +// command. [2] +func ContainerCommandLine(val string) attribute.KeyValue { + return ContainerCommandLineKey.String(val) +} + +// ContainerID returns an attribute KeyValue conforming to the +// "container.id" semantic conventions. It represents the container ID. Usually +// a UUID, as for example used to [identify Docker +// containers](https://docs.docker.com/engine/reference/run/#container-identification). +// The UUID might be abbreviated. +func ContainerID(val string) attribute.KeyValue { + return ContainerIDKey.String(val) +} + +// ContainerImageID returns an attribute KeyValue conforming to the +// "container.image.id" semantic conventions. It represents the runtime +// specific image identifier. Usually a hash algorithm followed by a UUID. +func ContainerImageID(val string) attribute.KeyValue { + return ContainerImageIDKey.String(val) +} + +// ContainerImageName returns an attribute KeyValue conforming to the +// "container.image.name" semantic conventions. It represents the name of the +// image the container was built on. +func ContainerImageName(val string) attribute.KeyValue { + return ContainerImageNameKey.String(val) +} + +// ContainerImageRepoDigests returns an attribute KeyValue conforming to the +// "container.image.repo_digests" semantic conventions. It represents the repo +// digests of the container image as provided by the container runtime. +func ContainerImageRepoDigests(val ...string) attribute.KeyValue { + return ContainerImageRepoDigestsKey.StringSlice(val) +} + +// ContainerImageTags returns an attribute KeyValue conforming to the +// "container.image.tags" semantic conventions. It represents the container +// image tags. An example can be found in [Docker Image +// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). +// Should be only the `` section of the full name for example from +// `registry.example.com/my-org/my-image:`. +func ContainerImageTags(val ...string) attribute.KeyValue { + return ContainerImageTagsKey.StringSlice(val) +} + +// ContainerName returns an attribute KeyValue conforming to the +// "container.name" semantic conventions. It represents the container name used +// by container runtime. +func ContainerName(val string) attribute.KeyValue { + return ContainerNameKey.String(val) +} + +// ContainerRuntime returns an attribute KeyValue conforming to the +// "container.runtime" semantic conventions. It represents the container +// runtime managing this container. +func ContainerRuntime(val string) attribute.KeyValue { + return ContainerRuntimeKey.String(val) +} + +// Describes device attributes. +const ( + // DeviceIDKey is the attribute Key conforming to the "device.id" semantic + // conventions. It represents a unique identifier representing the device + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values + // outlined below. This value is not an advertising identifier and MUST NOT + // be used as such. On iOS (Swift or Objective-C), this value MUST be equal + // to the [vendor + // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). + // On Android (Java or Kotlin), this value MUST be equal to the Firebase + // Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found + // [here](https://developer.android.com/training/articles/user-data-ids) on + // best practices and exact implementation details. Caution should be taken + // when storing personal data or anything which can identify a user. GDPR + // and data protection laws may apply, ensure you do your own due + // diligence. + DeviceIDKey = attribute.Key("device.id") + + // DeviceManufacturerKey is the attribute Key conforming to the + // "device.manufacturer" semantic conventions. It represents the name of + // the device manufacturer + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via + // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). + // iOS apps SHOULD hardcode the value `Apple`. + DeviceManufacturerKey = attribute.Key("device.manufacturer") + + // DeviceModelIdentifierKey is the attribute Key conforming to the + // "device.model.identifier" semantic conventions. It represents the model + // identifier for the device + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine-readable version + // of the model identifier rather than the market or consumer-friendly name + // of the device. + DeviceModelIdentifierKey = attribute.Key("device.model.identifier") + + // DeviceModelNameKey is the attribute Key conforming to the + // "device.model.name" semantic conventions. It represents the marketing + // name for the device model + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human-readable version of + // the device model rather than a machine-readable alternative. + DeviceModelNameKey = attribute.Key("device.model.name") +) + +// DeviceID returns an attribute KeyValue conforming to the "device.id" +// semantic conventions. It represents a unique identifier representing the +// device +func DeviceID(val string) attribute.KeyValue { + return DeviceIDKey.String(val) +} + +// DeviceManufacturer returns an attribute KeyValue conforming to the +// "device.manufacturer" semantic conventions. It represents the name of the +// device manufacturer +func DeviceManufacturer(val string) attribute.KeyValue { + return DeviceManufacturerKey.String(val) +} + +// DeviceModelIdentifier returns an attribute KeyValue conforming to the +// "device.model.identifier" semantic conventions. It represents the model +// identifier for the device +func DeviceModelIdentifier(val string) attribute.KeyValue { + return DeviceModelIdentifierKey.String(val) +} + +// DeviceModelName returns an attribute KeyValue conforming to the +// "device.model.name" semantic conventions. It represents the marketing name +// for the device model +func DeviceModelName(val string) attribute.KeyValue { + return DeviceModelNameKey.String(val) +} + +// A host is defined as a computing instance. For example, physical servers, +// virtual machines, switches or disk array. +const ( + // HostArchKey is the attribute Key conforming to the "host.arch" semantic + // conventions. It represents the CPU architecture the host system is + // running on. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + HostArchKey = attribute.Key("host.arch") + + // HostCPUCacheL2SizeKey is the attribute Key conforming to the + // "host.cpu.cache.l2.size" semantic conventions. It represents the amount + // of level 2 memory cache available to the processor (in Bytes). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 12288000 + HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size") + + // HostCPUFamilyKey is the attribute Key conforming to the + // "host.cpu.family" semantic conventions. It represents the family or + // generation of the CPU. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '6', 'PA-RISC 1.1e' + HostCPUFamilyKey = attribute.Key("host.cpu.family") + + // HostCPUModelIDKey is the attribute Key conforming to the + // "host.cpu.model.id" semantic conventions. It represents the model + // identifier. It provides more granular information about the CPU, + // distinguishing it from other CPUs within the same family. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '6', '9000/778/B180L' + HostCPUModelIDKey = attribute.Key("host.cpu.model.id") + + // HostCPUModelNameKey is the attribute Key conforming to the + // "host.cpu.model.name" semantic conventions. It represents the model + // designation of the processor. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' + HostCPUModelNameKey = attribute.Key("host.cpu.model.name") + + // HostCPUSteppingKey is the attribute Key conforming to the + // "host.cpu.stepping" semantic conventions. It represents the stepping or + // core revisions. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1 + HostCPUSteppingKey = attribute.Key("host.cpu.stepping") + + // HostCPUVendorIDKey is the attribute Key conforming to the + // "host.cpu.vendor.id" semantic conventions. It represents the processor + // manufacturer identifier. A maximum 12-character string. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'GenuineIntel' + // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor + // ID string in EBX, EDX and ECX registers. Writing these to memory in this + // order results in a 12-character string. + HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id") + + // HostIDKey is the attribute Key conforming to the "host.id" semantic + // conventions. It represents the unique host ID. For Cloud, this must be + // the instance_id assigned by the cloud provider. For non-containerized + // systems, this should be the `machine-id`. See the table below for the + // sources to use to determine the `machine-id` based on operating system. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + HostIDKey = attribute.Key("host.id") + + // HostImageIDKey is the attribute Key conforming to the "host.image.id" + // semantic conventions. It represents the vM image ID or host OS image ID. + // For Cloud, this value is from the provider. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ami-07b06b442921831e5' + HostImageIDKey = attribute.Key("host.image.id") + + // HostImageNameKey is the attribute Key conforming to the + // "host.image.name" semantic conventions. It represents the name of the VM + // image or OS install the host was instantiated from. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + HostImageNameKey = attribute.Key("host.image.name") + + // HostImageVersionKey is the attribute Key conforming to the + // "host.image.version" semantic conventions. It represents the version + // string of the VM image or host OS as defined in [Version + // Attributes](/docs/resource/README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0.1' + HostImageVersionKey = attribute.Key("host.image.version") + + // HostIPKey is the attribute Key conforming to the "host.ip" semantic + // conventions. It represents the available IP addresses of the host, + // excluding loopback interfaces. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' + // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 + // addresses MUST be specified in the [RFC + // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. + HostIPKey = attribute.Key("host.ip") + + // HostMacKey is the attribute Key conforming to the "host.mac" semantic + // conventions. It represents the available MAC addresses of the host, + // excluding loopback interfaces. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' + // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal + // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): + // as hyphen-separated octets in uppercase hexadecimal form from most to + // least significant. + HostMacKey = attribute.Key("host.mac") + + // HostNameKey is the attribute Key conforming to the "host.name" semantic + // conventions. It represents the name of the host. On Unix systems, it may + // contain what the hostname command returns, or the fully qualified + // hostname, or another name specified by the user. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-test' + HostNameKey = attribute.Key("host.name") + + // HostTypeKey is the attribute Key conforming to the "host.type" semantic + // conventions. It represents the type of host. For Cloud, this must be the + // machine type. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'n1-standard-1' + HostTypeKey = attribute.Key("host.type") +) + +var ( + // AMD64 + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + HostArchX86 = HostArchKey.String("x86") +) + +// HostCPUCacheL2Size returns an attribute KeyValue conforming to the +// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of +// level 2 memory cache available to the processor (in Bytes). +func HostCPUCacheL2Size(val int) attribute.KeyValue { + return HostCPUCacheL2SizeKey.Int(val) +} + +// HostCPUFamily returns an attribute KeyValue conforming to the +// "host.cpu.family" semantic conventions. It represents the family or +// generation of the CPU. +func HostCPUFamily(val string) attribute.KeyValue { + return HostCPUFamilyKey.String(val) +} + +// HostCPUModelID returns an attribute KeyValue conforming to the +// "host.cpu.model.id" semantic conventions. It represents the model +// identifier. It provides more granular information about the CPU, +// distinguishing it from other CPUs within the same family. +func HostCPUModelID(val string) attribute.KeyValue { + return HostCPUModelIDKey.String(val) +} + +// HostCPUModelName returns an attribute KeyValue conforming to the +// "host.cpu.model.name" semantic conventions. It represents the model +// designation of the processor. +func HostCPUModelName(val string) attribute.KeyValue { + return HostCPUModelNameKey.String(val) +} + +// HostCPUStepping returns an attribute KeyValue conforming to the +// "host.cpu.stepping" semantic conventions. It represents the stepping or core +// revisions. +func HostCPUStepping(val int) attribute.KeyValue { + return HostCPUSteppingKey.Int(val) +} + +// HostCPUVendorID returns an attribute KeyValue conforming to the +// "host.cpu.vendor.id" semantic conventions. It represents the processor +// manufacturer identifier. A maximum 12-character string. +func HostCPUVendorID(val string) attribute.KeyValue { + return HostCPUVendorIDKey.String(val) +} + +// HostID returns an attribute KeyValue conforming to the "host.id" semantic +// conventions. It represents the unique host ID. For Cloud, this must be the +// instance_id assigned by the cloud provider. For non-containerized systems, +// this should be the `machine-id`. See the table below for the sources to use +// to determine the `machine-id` based on operating system. +func HostID(val string) attribute.KeyValue { + return HostIDKey.String(val) +} + +// HostImageID returns an attribute KeyValue conforming to the +// "host.image.id" semantic conventions. It represents the vM image ID or host +// OS image ID. For Cloud, this value is from the provider. +func HostImageID(val string) attribute.KeyValue { + return HostImageIDKey.String(val) +} + +// HostImageName returns an attribute KeyValue conforming to the +// "host.image.name" semantic conventions. It represents the name of the VM +// image or OS install the host was instantiated from. +func HostImageName(val string) attribute.KeyValue { + return HostImageNameKey.String(val) +} + +// HostImageVersion returns an attribute KeyValue conforming to the +// "host.image.version" semantic conventions. It represents the version string +// of the VM image or host OS as defined in [Version +// Attributes](/docs/resource/README.md#version-attributes). +func HostImageVersion(val string) attribute.KeyValue { + return HostImageVersionKey.String(val) +} + +// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic +// conventions. It represents the available IP addresses of the host, excluding +// loopback interfaces. +func HostIP(val ...string) attribute.KeyValue { + return HostIPKey.StringSlice(val) +} + +// HostMac returns an attribute KeyValue conforming to the "host.mac" +// semantic conventions. It represents the available MAC addresses of the host, +// excluding loopback interfaces. +func HostMac(val ...string) attribute.KeyValue { + return HostMacKey.StringSlice(val) +} + +// HostName returns an attribute KeyValue conforming to the "host.name" +// semantic conventions. It represents the name of the host. On Unix systems, +// it may contain what the hostname command returns, or the fully qualified +// hostname, or another name specified by the user. +func HostName(val string) attribute.KeyValue { + return HostNameKey.String(val) +} + +// HostType returns an attribute KeyValue conforming to the "host.type" +// semantic conventions. It represents the type of host. For Cloud, this must +// be the machine type. +func HostType(val string) attribute.KeyValue { + return HostTypeKey.String(val) +} + +// Kubernetes resource attributes. +const ( + // K8SClusterNameKey is the attribute Key conforming to the + // "k8s.cluster.name" semantic conventions. It represents the name of the + // cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-cluster' + K8SClusterNameKey = attribute.Key("k8s.cluster.name") + + // K8SClusterUIDKey is the attribute Key conforming to the + // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for + // the cluster, set to the UID of the `kube-system` namespace. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + // Note: K8S doesn't have support for obtaining a cluster ID. If this is + // ever + // added, we will recommend collecting the `k8s.cluster.uid` through the + // official APIs. In the meantime, we are able to use the `uid` of the + // `kube-system` namespace as a proxy for cluster ID. Read on for the + // rationale. + // + // Every object created in a K8S cluster is assigned a distinct UID. The + // `kube-system` namespace is used by Kubernetes itself and will exist + // for the lifetime of the cluster. Using the `uid` of the `kube-system` + // namespace is a reasonable proxy for the K8S ClusterID as it will only + // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + // UUIDs as standardized by + // [ISO/IEC 9834-8 and ITU-T + // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). + // Which states: + // + // > If generated according to one of the mechanisms defined in Rec. + // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + // different from all other UUIDs generated before 3603 A.D., or is + // extremely likely to be different (depending on the mechanism chosen). + // + // Therefore, UIDs between clusters should be extremely unlikely to + // conflict. + K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") + + // K8SContainerNameKey is the attribute Key conforming to the + // "k8s.container.name" semantic conventions. It represents the name of the + // Container from Pod specification, must be unique within a Pod. Container + // runtime usually uses different globally unique name (`container.name`). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'redis' + K8SContainerNameKey = attribute.Key("k8s.container.name") + + // K8SContainerRestartCountKey is the attribute Key conforming to the + // "k8s.container.restart_count" semantic conventions. It represents the + // number of times the container was restarted. This attribute can be used + // to identify a particular container (running or stopped) within a + // container spec. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 2 + K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") + + // K8SCronJobNameKey is the attribute Key conforming to the + // "k8s.cronjob.name" semantic conventions. It represents the name of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") + + // K8SCronJobUIDKey is the attribute Key conforming to the + // "k8s.cronjob.uid" semantic conventions. It represents the UID of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") + + // K8SDaemonSetNameKey is the attribute Key conforming to the + // "k8s.daemonset.name" semantic conventions. It represents the name of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") + + // K8SDaemonSetUIDKey is the attribute Key conforming to the + // "k8s.daemonset.uid" semantic conventions. It represents the UID of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") + + // K8SDeploymentNameKey is the attribute Key conforming to the + // "k8s.deployment.name" semantic conventions. It represents the name of + // the Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") + + // K8SDeploymentUIDKey is the attribute Key conforming to the + // "k8s.deployment.uid" semantic conventions. It represents the UID of the + // Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + + // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" + // semantic conventions. It represents the name of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SJobNameKey = attribute.Key("k8s.job.name") + + // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" + // semantic conventions. It represents the UID of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SJobUIDKey = attribute.Key("k8s.job.uid") + + // K8SNamespaceNameKey is the attribute Key conforming to the + // "k8s.namespace.name" semantic conventions. It represents the name of the + // namespace that the pod is running in. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'default' + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") + + // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" + // semantic conventions. It represents the name of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'node-1' + K8SNodeNameKey = attribute.Key("k8s.node.name") + + // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" + // semantic conventions. It represents the UID of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + K8SNodeUIDKey = attribute.Key("k8s.node.uid") + + // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" + // semantic conventions. It represents the name of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-pod-autoconf' + K8SPodNameKey = attribute.Key("k8s.pod.name") + + // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" + // semantic conventions. It represents the UID of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SPodUIDKey = attribute.Key("k8s.pod.uid") + + // K8SReplicaSetNameKey is the attribute Key conforming to the + // "k8s.replicaset.name" semantic conventions. It represents the name of + // the ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") + + // K8SReplicaSetUIDKey is the attribute Key conforming to the + // "k8s.replicaset.uid" semantic conventions. It represents the UID of the + // ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + + // K8SStatefulSetNameKey is the attribute Key conforming to the + // "k8s.statefulset.name" semantic conventions. It represents the name of + // the StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") + + // K8SStatefulSetUIDKey is the attribute Key conforming to the + // "k8s.statefulset.uid" semantic conventions. It represents the UID of the + // StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") +) + +// K8SClusterName returns an attribute KeyValue conforming to the +// "k8s.cluster.name" semantic conventions. It represents the name of the +// cluster. +func K8SClusterName(val string) attribute.KeyValue { + return K8SClusterNameKey.String(val) +} + +// K8SClusterUID returns an attribute KeyValue conforming to the +// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the +// cluster, set to the UID of the `kube-system` namespace. +func K8SClusterUID(val string) attribute.KeyValue { + return K8SClusterUIDKey.String(val) +} + +// K8SContainerName returns an attribute KeyValue conforming to the +// "k8s.container.name" semantic conventions. It represents the name of the +// Container from Pod specification, must be unique within a Pod. Container +// runtime usually uses different globally unique name (`container.name`). +func K8SContainerName(val string) attribute.KeyValue { + return K8SContainerNameKey.String(val) +} + +// K8SContainerRestartCount returns an attribute KeyValue conforming to the +// "k8s.container.restart_count" semantic conventions. It represents the number +// of times the container was restarted. This attribute can be used to identify +// a particular container (running or stopped) within a container spec. +func K8SContainerRestartCount(val int) attribute.KeyValue { + return K8SContainerRestartCountKey.Int(val) +} + +// K8SCronJobName returns an attribute KeyValue conforming to the +// "k8s.cronjob.name" semantic conventions. It represents the name of the +// CronJob. +func K8SCronJobName(val string) attribute.KeyValue { + return K8SCronJobNameKey.String(val) +} + +// K8SCronJobUID returns an attribute KeyValue conforming to the +// "k8s.cronjob.uid" semantic conventions. It represents the UID of the +// CronJob. +func K8SCronJobUID(val string) attribute.KeyValue { + return K8SCronJobUIDKey.String(val) +} + +// K8SDaemonSetName returns an attribute KeyValue conforming to the +// "k8s.daemonset.name" semantic conventions. It represents the name of the +// DaemonSet. +func K8SDaemonSetName(val string) attribute.KeyValue { + return K8SDaemonSetNameKey.String(val) +} + +// K8SDaemonSetUID returns an attribute KeyValue conforming to the +// "k8s.daemonset.uid" semantic conventions. It represents the UID of the +// DaemonSet. +func K8SDaemonSetUID(val string) attribute.KeyValue { + return K8SDaemonSetUIDKey.String(val) +} + +// K8SDeploymentName returns an attribute KeyValue conforming to the +// "k8s.deployment.name" semantic conventions. It represents the name of the +// Deployment. +func K8SDeploymentName(val string) attribute.KeyValue { + return K8SDeploymentNameKey.String(val) +} + +// K8SDeploymentUID returns an attribute KeyValue conforming to the +// "k8s.deployment.uid" semantic conventions. It represents the UID of the +// Deployment. +func K8SDeploymentUID(val string) attribute.KeyValue { + return K8SDeploymentUIDKey.String(val) +} + +// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" +// semantic conventions. It represents the name of the Job. +func K8SJobName(val string) attribute.KeyValue { + return K8SJobNameKey.String(val) +} + +// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" +// semantic conventions. It represents the UID of the Job. +func K8SJobUID(val string) attribute.KeyValue { + return K8SJobUIDKey.String(val) +} + +// K8SNamespaceName returns an attribute KeyValue conforming to the +// "k8s.namespace.name" semantic conventions. It represents the name of the +// namespace that the pod is running in. +func K8SNamespaceName(val string) attribute.KeyValue { + return K8SNamespaceNameKey.String(val) +} + +// K8SNodeName returns an attribute KeyValue conforming to the +// "k8s.node.name" semantic conventions. It represents the name of the Node. +func K8SNodeName(val string) attribute.KeyValue { + return K8SNodeNameKey.String(val) +} + +// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" +// semantic conventions. It represents the UID of the Node. +func K8SNodeUID(val string) attribute.KeyValue { + return K8SNodeUIDKey.String(val) +} + +// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" +// semantic conventions. It represents the name of the Pod. +func K8SPodName(val string) attribute.KeyValue { + return K8SPodNameKey.String(val) +} + +// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" +// semantic conventions. It represents the UID of the Pod. +func K8SPodUID(val string) attribute.KeyValue { + return K8SPodUIDKey.String(val) +} + +// K8SReplicaSetName returns an attribute KeyValue conforming to the +// "k8s.replicaset.name" semantic conventions. It represents the name of the +// ReplicaSet. +func K8SReplicaSetName(val string) attribute.KeyValue { + return K8SReplicaSetNameKey.String(val) +} + +// K8SReplicaSetUID returns an attribute KeyValue conforming to the +// "k8s.replicaset.uid" semantic conventions. It represents the UID of the +// ReplicaSet. +func K8SReplicaSetUID(val string) attribute.KeyValue { + return K8SReplicaSetUIDKey.String(val) +} + +// K8SStatefulSetName returns an attribute KeyValue conforming to the +// "k8s.statefulset.name" semantic conventions. It represents the name of the +// StatefulSet. +func K8SStatefulSetName(val string) attribute.KeyValue { + return K8SStatefulSetNameKey.String(val) +} + +// K8SStatefulSetUID returns an attribute KeyValue conforming to the +// "k8s.statefulset.uid" semantic conventions. It represents the UID of the +// StatefulSet. +func K8SStatefulSetUID(val string) attribute.KeyValue { + return K8SStatefulSetUIDKey.String(val) +} + +// An OCI image manifest. +const ( + // OciManifestDigestKey is the attribute Key conforming to the + // "oci.manifest.digest" semantic conventions. It represents the digest of + // the OCI image manifest. For container images specifically is the digest + // by which the container image is known. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' + // Note: Follows [OCI Image Manifest + // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), + // and specifically the [Digest + // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). + // An example can be found in [Example Image + // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). + OciManifestDigestKey = attribute.Key("oci.manifest.digest") +) + +// OciManifestDigest returns an attribute KeyValue conforming to the +// "oci.manifest.digest" semantic conventions. It represents the digest of the +// OCI image manifest. For container images specifically is the digest by which +// the container image is known. +func OciManifestDigest(val string) attribute.KeyValue { + return OciManifestDigestKey.String(val) +} + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // OSBuildIDKey is the attribute Key conforming to the "os.build_id" + // semantic conventions. It represents the unique identifier for a + // particular build or compilation of the operating system. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' + OSBuildIDKey = attribute.Key("os.build_id") + + // OSDescriptionKey is the attribute Key conforming to the "os.description" + // semantic conventions. It represents the human readable (not intended to + // be parsed) OS version information, like e.g. reported by `ver` or + // `lsb_release -a` commands. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 + // LTS' + OSDescriptionKey = attribute.Key("os.description") + + // OSNameKey is the attribute Key conforming to the "os.name" semantic + // conventions. It represents the human readable operating system name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'iOS', 'Android', 'Ubuntu' + OSNameKey = attribute.Key("os.name") + + // OSTypeKey is the attribute Key conforming to the "os.type" semantic + // conventions. It represents the operating system type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + OSTypeKey = attribute.Key("os.type") + + // OSVersionKey is the attribute Key conforming to the "os.version" + // semantic conventions. It represents the version string of the operating + // system as defined in [Version + // Attributes](/docs/resource/README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '14.2.1', '18.04.1' + OSVersionKey = attribute.Key("os.version") +) + +var ( + // Microsoft Windows + OSTypeWindows = OSTypeKey.String("windows") + // Linux + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + OSTypeZOS = OSTypeKey.String("z_os") +) + +// OSBuildID returns an attribute KeyValue conforming to the "os.build_id" +// semantic conventions. It represents the unique identifier for a particular +// build or compilation of the operating system. +func OSBuildID(val string) attribute.KeyValue { + return OSBuildIDKey.String(val) +} + +// OSDescription returns an attribute KeyValue conforming to the +// "os.description" semantic conventions. It represents the human readable (not +// intended to be parsed) OS version information, like e.g. reported by `ver` +// or `lsb_release -a` commands. +func OSDescription(val string) attribute.KeyValue { + return OSDescriptionKey.String(val) +} + +// OSName returns an attribute KeyValue conforming to the "os.name" semantic +// conventions. It represents the human readable operating system name. +func OSName(val string) attribute.KeyValue { + return OSNameKey.String(val) +} + +// OSVersion returns an attribute KeyValue conforming to the "os.version" +// semantic conventions. It represents the version string of the operating +// system as defined in [Version +// Attributes](/docs/resource/README.md#version-attributes). +func OSVersion(val string) attribute.KeyValue { + return OSVersionKey.String(val) +} + +// An operating system process. +const ( + // ProcessCommandKey is the attribute Key conforming to the + // "process.command" semantic conventions. It represents the command used + // to launch the process (i.e. the command name). On Linux based systems, + // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can + // be set to the first parameter extracted from `GetCommandLineW`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'cmd/otelcol' + ProcessCommandKey = attribute.Key("process.command") + + // ProcessCommandArgsKey is the attribute Key conforming to the + // "process.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited + // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, + // this would be the full argv vector passed to `main`. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'cmd/otecol', '--config=config.yaml' + ProcessCommandArgsKey = attribute.Key("process.command_args") + + // ProcessCommandLineKey is the attribute Key conforming to the + // "process.command_line" semantic conventions. It represents the full + // command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of `GetCommandLineW`. + // Do not set this if you have to assemble it just for monitoring; use + // `process.command_args` instead. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + ProcessCommandLineKey = attribute.Key("process.command_line") + + // ProcessExecutableNameKey is the attribute Key conforming to the + // "process.executable.name" semantic conventions. It represents the name + // of the process executable. On Linux based systems, can be set to the + // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name + // of `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcol' + ProcessExecutableNameKey = attribute.Key("process.executable.name") + + // ProcessExecutablePathKey is the attribute Key conforming to the + // "process.executable.path" semantic conventions. It represents the full + // path to the process executable. On Linux based systems, can be set to + // the target of `proc/[pid]/exe`. On Windows, can be set to the result of + // `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/usr/bin/cmd/otelcol' + ProcessExecutablePathKey = attribute.Key("process.executable.path") + + // ProcessOwnerKey is the attribute Key conforming to the "process.owner" + // semantic conventions. It represents the username of the user that owns + // the process. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'root' + ProcessOwnerKey = attribute.Key("process.owner") + + // ProcessParentPIDKey is the attribute Key conforming to the + // "process.parent_pid" semantic conventions. It represents the parent + // Process identifier (PPID). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 111 + ProcessParentPIDKey = attribute.Key("process.parent_pid") + + // ProcessPIDKey is the attribute Key conforming to the "process.pid" + // semantic conventions. It represents the process identifier (PID). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1234 + ProcessPIDKey = attribute.Key("process.pid") + + // ProcessRuntimeDescriptionKey is the attribute Key conforming to the + // "process.runtime.description" semantic conventions. It represents an + // additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") + + // ProcessRuntimeNameKey is the attribute Key conforming to the + // "process.runtime.name" semantic conventions. It represents the name of + // the runtime of this process. For compiled native binaries, this SHOULD + // be the name of the compiler. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'OpenJDK Runtime Environment' + ProcessRuntimeNameKey = attribute.Key("process.runtime.name") + + // ProcessRuntimeVersionKey is the attribute Key conforming to the + // "process.runtime.version" semantic conventions. It represents the + // version of the runtime of this process, as returned by the runtime + // without modification. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '14.0.2' + ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") +) + +// ProcessCommand returns an attribute KeyValue conforming to the +// "process.command" semantic conventions. It represents the command used to +// launch the process (i.e. the command name). On Linux based systems, can be +// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to +// the first parameter extracted from `GetCommandLineW`. +func ProcessCommand(val string) attribute.KeyValue { + return ProcessCommandKey.String(val) +} + +// ProcessCommandArgs returns an attribute KeyValue conforming to the +// "process.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) as received by +// the process. On Linux-based systems (and some other Unixoid systems +// supporting procfs), can be set according to the list of null-delimited +// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, +// this would be the full argv vector passed to `main`. +func ProcessCommandArgs(val ...string) attribute.KeyValue { + return ProcessCommandArgsKey.StringSlice(val) +} + +// ProcessCommandLine returns an attribute KeyValue conforming to the +// "process.command_line" semantic conventions. It represents the full command +// used to launch the process as a single string representing the full command. +// On Windows, can be set to the result of `GetCommandLineW`. Do not set this +// if you have to assemble it just for monitoring; use `process.command_args` +// instead. +func ProcessCommandLine(val string) attribute.KeyValue { + return ProcessCommandLineKey.String(val) +} + +// ProcessExecutableName returns an attribute KeyValue conforming to the +// "process.executable.name" semantic conventions. It represents the name of +// the process executable. On Linux based systems, can be set to the `Name` in +// `proc/[pid]/status`. On Windows, can be set to the base name of +// `GetProcessImageFileNameW`. +func ProcessExecutableName(val string) attribute.KeyValue { + return ProcessExecutableNameKey.String(val) +} + +// ProcessExecutablePath returns an attribute KeyValue conforming to the +// "process.executable.path" semantic conventions. It represents the full path +// to the process executable. On Linux based systems, can be set to the target +// of `proc/[pid]/exe`. On Windows, can be set to the result of +// `GetProcessImageFileNameW`. +func ProcessExecutablePath(val string) attribute.KeyValue { + return ProcessExecutablePathKey.String(val) +} + +// ProcessOwner returns an attribute KeyValue conforming to the +// "process.owner" semantic conventions. It represents the username of the user +// that owns the process. +func ProcessOwner(val string) attribute.KeyValue { + return ProcessOwnerKey.String(val) +} + +// ProcessParentPID returns an attribute KeyValue conforming to the +// "process.parent_pid" semantic conventions. It represents the parent Process +// identifier (PPID). +func ProcessParentPID(val int) attribute.KeyValue { + return ProcessParentPIDKey.Int(val) +} + +// ProcessPID returns an attribute KeyValue conforming to the "process.pid" +// semantic conventions. It represents the process identifier (PID). +func ProcessPID(val int) attribute.KeyValue { + return ProcessPIDKey.Int(val) +} + +// ProcessRuntimeDescription returns an attribute KeyValue conforming to the +// "process.runtime.description" semantic conventions. It represents an +// additional description about the runtime of the process, for example a +// specific vendor customization of the runtime environment. +func ProcessRuntimeDescription(val string) attribute.KeyValue { + return ProcessRuntimeDescriptionKey.String(val) +} + +// ProcessRuntimeName returns an attribute KeyValue conforming to the +// "process.runtime.name" semantic conventions. It represents the name of the +// runtime of this process. For compiled native binaries, this SHOULD be the +// name of the compiler. +func ProcessRuntimeName(val string) attribute.KeyValue { + return ProcessRuntimeNameKey.String(val) +} + +// ProcessRuntimeVersion returns an attribute KeyValue conforming to the +// "process.runtime.version" semantic conventions. It represents the version of +// the runtime of this process, as returned by the runtime without +// modification. +func ProcessRuntimeVersion(val string) attribute.KeyValue { + return ProcessRuntimeVersionKey.String(val) +} + +// The Android platform on which the Android application is running. +const ( + // AndroidOSAPILevelKey is the attribute Key conforming to the + // "android.os.api_level" semantic conventions. It represents the uniquely + // identifies the framework API revision offered by a version + // (`os.version`) of the android operating system. More information can be + // found + // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '33', '32' + AndroidOSAPILevelKey = attribute.Key("android.os.api_level") +) + +// AndroidOSAPILevel returns an attribute KeyValue conforming to the +// "android.os.api_level" semantic conventions. It represents the uniquely +// identifies the framework API revision offered by a version (`os.version`) of +// the android operating system. More information can be found +// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). +func AndroidOSAPILevel(val string) attribute.KeyValue { + return AndroidOSAPILevelKey.String(val) +} + +// The web browser in which the application represented by the resource is +// running. The `browser.*` attributes MUST be used only for resources that +// represent applications running in a web browser (regardless of whether +// running on a mobile or desktop device). +const ( + // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" + // semantic conventions. It represents the array of brand name and version + // separated by a space + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.brands`). + BrowserBrandsKey = attribute.Key("browser.brands") + + // BrowserLanguageKey is the attribute Key conforming to the + // "browser.language" semantic conventions. It represents the preferred + // language of the user using the browser + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // `navigator.language`. + BrowserLanguageKey = attribute.Key("browser.language") + + // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" + // semantic conventions. It represents a boolean that is true if the + // browser is running on a mobile device + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.mobile`). If unavailable, this attribute + // SHOULD be left unset. + BrowserMobileKey = attribute.Key("browser.mobile") + + // BrowserPlatformKey is the attribute Key conforming to the + // "browser.platform" semantic conventions. It represents the platform on + // which the browser is running + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.platform`). If unavailable, the legacy + // `navigator.platform` API SHOULD NOT be used instead and this attribute + // SHOULD be left unset in order for the values to be consistent. + // The list of possible values is defined in the [W3C User-Agent Client + // Hints + // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). + // Note that some (but not all) of these values can overlap with values in + // the [`os.type` and `os.name` attributes](./os.md). However, for + // consistency, the values in the `browser.platform` attribute should + // capture the exact value that the user agent provides. + BrowserPlatformKey = attribute.Key("browser.platform") +) + +// BrowserBrands returns an attribute KeyValue conforming to the +// "browser.brands" semantic conventions. It represents the array of brand name +// and version separated by a space +func BrowserBrands(val ...string) attribute.KeyValue { + return BrowserBrandsKey.StringSlice(val) +} + +// BrowserLanguage returns an attribute KeyValue conforming to the +// "browser.language" semantic conventions. It represents the preferred +// language of the user using the browser +func BrowserLanguage(val string) attribute.KeyValue { + return BrowserLanguageKey.String(val) +} + +// BrowserMobile returns an attribute KeyValue conforming to the +// "browser.mobile" semantic conventions. It represents a boolean that is true +// if the browser is running on a mobile device +func BrowserMobile(val bool) attribute.KeyValue { + return BrowserMobileKey.Bool(val) +} + +// BrowserPlatform returns an attribute KeyValue conforming to the +// "browser.platform" semantic conventions. It represents the platform on which +// the browser is running +func BrowserPlatform(val string) attribute.KeyValue { + return BrowserPlatformKey.String(val) +} + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // AWSECSClusterARNKey is the attribute Key conforming to the + // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an + // [ECS + // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") + + // AWSECSContainerARNKey is the attribute Key conforming to the + // "aws.ecs.container.arn" semantic conventions. It represents the Amazon + // Resource Name (ARN) of an [ECS container + // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") + + // AWSECSLaunchtypeKey is the attribute Key conforming to the + // "aws.ecs.launchtype" semantic conventions. It represents the [launch + // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // for an ECS task. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") + + // AWSECSTaskARNKey is the attribute Key conforming to the + // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an + // [ECS task + // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") + + // AWSECSTaskFamilyKey is the attribute Key conforming to the + // "aws.ecs.task.family" semantic conventions. It represents the task + // definition family this task definition is a member of. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-family' + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + + // AWSECSTaskRevisionKey is the attribute Key conforming to the + // "aws.ecs.task.revision" semantic conventions. It represents the revision + // for this task definition. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '8', '26' + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") +) + +var ( + // ec2 + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // fargate + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// AWSECSClusterARN returns an attribute KeyValue conforming to the +// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS +// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +func AWSECSClusterARN(val string) attribute.KeyValue { + return AWSECSClusterARNKey.String(val) +} + +// AWSECSContainerARN returns an attribute KeyValue conforming to the +// "aws.ecs.container.arn" semantic conventions. It represents the Amazon +// Resource Name (ARN) of an [ECS container +// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +func AWSECSContainerARN(val string) attribute.KeyValue { + return AWSECSContainerARNKey.String(val) +} + +// AWSECSTaskARN returns an attribute KeyValue conforming to the +// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS +// task +// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). +func AWSECSTaskARN(val string) attribute.KeyValue { + return AWSECSTaskARNKey.String(val) +} + +// AWSECSTaskFamily returns an attribute KeyValue conforming to the +// "aws.ecs.task.family" semantic conventions. It represents the task +// definition family this task definition is a member of. +func AWSECSTaskFamily(val string) attribute.KeyValue { + return AWSECSTaskFamilyKey.String(val) +} + +// AWSECSTaskRevision returns an attribute KeyValue conforming to the +// "aws.ecs.task.revision" semantic conventions. It represents the revision for +// this task definition. +func AWSECSTaskRevision(val string) attribute.KeyValue { + return AWSECSTaskRevisionKey.String(val) +} + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // AWSEKSClusterARNKey is the attribute Key conforming to the + // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an + // EKS cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") +) + +// AWSEKSClusterARN returns an attribute KeyValue conforming to the +// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS +// cluster. +func AWSEKSClusterARN(val string) attribute.KeyValue { + return AWSEKSClusterARNKey.String(val) +} + +// Resources specific to Amazon Web Services. +const ( + // AWSLogGroupARNsKey is the attribute Key conforming to the + // "aws.log.group.arns" semantic conventions. It represents the Amazon + // Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the [log group ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") + + // AWSLogGroupNamesKey is the attribute Key conforming to the + // "aws.log.group.names" semantic conventions. It represents the name(s) of + // the AWS log group(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like + // multi-container applications, where a single application has sidecar + // containers, and each write to their own log group. + AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") + + // AWSLogStreamARNsKey is the attribute Key conforming to the + // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of + // the AWS log stream(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the [log stream ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + // One log group can contain several log streams, so these ARNs necessarily + // identify both a log group and a log stream. + AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") + + // AWSLogStreamNamesKey is the attribute Key conforming to the + // "aws.log.stream.names" semantic conventions. It represents the name(s) + // of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") +) + +// AWSLogGroupARNs returns an attribute KeyValue conforming to the +// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource +// Name(s) (ARN) of the AWS log group(s). +func AWSLogGroupARNs(val ...string) attribute.KeyValue { + return AWSLogGroupARNsKey.StringSlice(val) +} + +// AWSLogGroupNames returns an attribute KeyValue conforming to the +// "aws.log.group.names" semantic conventions. It represents the name(s) of the +// AWS log group(s) an application is writing to. +func AWSLogGroupNames(val ...string) attribute.KeyValue { + return AWSLogGroupNamesKey.StringSlice(val) +} + +// AWSLogStreamARNs returns an attribute KeyValue conforming to the +// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the +// AWS log stream(s). +func AWSLogStreamARNs(val ...string) attribute.KeyValue { + return AWSLogStreamARNsKey.StringSlice(val) +} + +// AWSLogStreamNames returns an attribute KeyValue conforming to the +// "aws.log.stream.names" semantic conventions. It represents the name(s) of +// the AWS log stream(s) an application is writing to. +func AWSLogStreamNames(val ...string) attribute.KeyValue { + return AWSLogStreamNamesKey.StringSlice(val) +} + +// Resource used by Google Cloud Run. +const ( + // GCPCloudRunJobExecutionKey is the attribute Key conforming to the + // "gcp.cloud_run.job.execution" semantic conventions. It represents the + // name of the Cloud Run + // [execution](https://cloud.google.com/run/docs/managing/job-executions) + // being run for the Job, as set by the + // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) + // environment variable. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'job-name-xxxx', 'sample-job-mdw84' + GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") + + // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the + // "gcp.cloud_run.job.task_index" semantic conventions. It represents the + // index for a task within an execution as provided by the + // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) + // environment variable. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 1 + GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") +) + +// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.execution" semantic conventions. It represents the name +// of the Cloud Run +// [execution](https://cloud.google.com/run/docs/managing/job-executions) being +// run for the Job, as set by the +// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) +// environment variable. +func GCPCloudRunJobExecution(val string) attribute.KeyValue { + return GCPCloudRunJobExecutionKey.String(val) +} + +// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index +// for a task within an execution as provided by the +// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) +// environment variable. +func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { + return GCPCloudRunJobTaskIndexKey.Int(val) +} + +// Resources used by Google Compute Engine (GCE). +const ( + // GCPGceInstanceHostnameKey is the attribute Key conforming to the + // "gcp.gce.instance.hostname" semantic conventions. It represents the + // hostname of a GCE instance. This is the full value of the default or + // [custom + // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-host1234.example.com', + // 'sample-vm.us-west1-b.c.my-project.internal' + GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") + + // GCPGceInstanceNameKey is the attribute Key conforming to the + // "gcp.gce.instance.name" semantic conventions. It represents the instance + // name of a GCE instance. This is the value provided by `host.name`, the + // visible name of the instance in the Cloud Console UI, and the prefix for + // the default hostname of the instance as defined by the [default internal + // DNS + // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'instance-1', 'my-vm-name' + GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") +) + +// GCPGceInstanceHostname returns an attribute KeyValue conforming to the +// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname +// of a GCE instance. This is the full value of the default or [custom +// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). +func GCPGceInstanceHostname(val string) attribute.KeyValue { + return GCPGceInstanceHostnameKey.String(val) +} + +// GCPGceInstanceName returns an attribute KeyValue conforming to the +// "gcp.gce.instance.name" semantic conventions. It represents the instance +// name of a GCE instance. This is the value provided by `host.name`, the +// visible name of the instance in the Cloud Console UI, and the prefix for the +// default hostname of the instance as defined by the [default internal DNS +// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). +func GCPGceInstanceName(val string) attribute.KeyValue { + return GCPGceInstanceNameKey.String(val) +} + +// Heroku dyno metadata +const ( + // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" + // semantic conventions. It represents the unique identifier for the + // application + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + HerokuAppIDKey = attribute.Key("heroku.app.id") + + // HerokuReleaseCommitKey is the attribute Key conforming to the + // "heroku.release.commit" semantic conventions. It represents the commit + // hash for the current release + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") + + // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the + // "heroku.release.creation_timestamp" semantic conventions. It represents + // the time and date the release was created + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2022-10-23T18:00:42Z' + HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") +) + +// HerokuAppID returns an attribute KeyValue conforming to the +// "heroku.app.id" semantic conventions. It represents the unique identifier +// for the application +func HerokuAppID(val string) attribute.KeyValue { + return HerokuAppIDKey.String(val) +} + +// HerokuReleaseCommit returns an attribute KeyValue conforming to the +// "heroku.release.commit" semantic conventions. It represents the commit hash +// for the current release +func HerokuReleaseCommit(val string) attribute.KeyValue { + return HerokuReleaseCommitKey.String(val) +} + +// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming +// to the "heroku.release.creation_timestamp" semantic conventions. It +// represents the time and date the release was created +func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { + return HerokuReleaseCreationTimestampKey.String(val) +} + +// The software deployment. +const ( + // DeploymentEnvironmentKey is the attribute Key conforming to the + // "deployment.environment" semantic conventions. It represents the name of + // the [deployment + // environment](https://wikipedia.org/wiki/Deployment_environment) (aka + // deployment tier). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'staging', 'production' + // Note: `deployment.environment` does not affect the uniqueness + // constraints defined through + // the `service.namespace`, `service.name` and `service.instance.id` + // resource attributes. + // This implies that resources carrying the following attribute + // combinations MUST be + // considered to be identifying the same service: + // + // * `service.name=frontend`, `deployment.environment=production` + // * `service.name=frontend`, `deployment.environment=staging`. + DeploymentEnvironmentKey = attribute.Key("deployment.environment") +) + +// DeploymentEnvironment returns an attribute KeyValue conforming to the +// "deployment.environment" semantic conventions. It represents the name of the +// [deployment environment](https://wikipedia.org/wiki/Deployment_environment) +// (aka deployment tier). +func DeploymentEnvironment(val string) attribute.KeyValue { + return DeploymentEnvironmentKey.String(val) +} + +// A serverless instance. +const ( + // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" + // semantic conventions. It represents the execution environment ID as a + // string, that will be potentially reused for other invocations to the + // same function/function version. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note: * **AWS Lambda:** Use the (full) log stream name. + FaaSInstanceKey = attribute.Key("faas.instance") + + // FaaSMaxMemoryKey is the attribute Key conforming to the + // "faas.max_memory" semantic conventions. It represents the amount of + // memory available to the serverless function converted to Bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little + // memory can easily stop a Java AWS Lambda function from working + // correctly. On AWS Lambda, the environment variable + // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must + // be multiplied by 1,048,576). + FaaSMaxMemoryKey = attribute.Key("faas.max_memory") + + // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic + // conventions. It represents the name of the single function that this + // runtime instance executes. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the + // FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) + // span attributes). + // + // For some cloud providers, the above definition is ambiguous. The + // following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud + // providers/products: + // + // * **Azure:** The full name `/`, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the `cloud.resource_id` attribute). + FaaSNameKey = attribute.Key("faas.name") + + // FaaSVersionKey is the attribute Key conforming to the "faas.version" + // semantic conventions. It represents the immutable version of the + // function being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use: + // + // * **AWS Lambda:** The [function + // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + // (an integer represented as a decimal string). + // * **Google Cloud Run (Services):** The + // [revision](https://cloud.google.com/run/docs/managing/revisions) + // (i.e., the function name plus the revision suffix). + // * **Google Cloud Functions:** The value of the + // [`K_REVISION` environment + // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). + // * **Azure Functions:** Not applicable. Do not set this attribute. + FaaSVersionKey = attribute.Key("faas.version") +) + +// FaaSInstance returns an attribute KeyValue conforming to the +// "faas.instance" semantic conventions. It represents the execution +// environment ID as a string, that will be potentially reused for other +// invocations to the same function/function version. +func FaaSInstance(val string) attribute.KeyValue { + return FaaSInstanceKey.String(val) +} + +// FaaSMaxMemory returns an attribute KeyValue conforming to the +// "faas.max_memory" semantic conventions. It represents the amount of memory +// available to the serverless function converted to Bytes. +func FaaSMaxMemory(val int) attribute.KeyValue { + return FaaSMaxMemoryKey.Int(val) +} + +// FaaSName returns an attribute KeyValue conforming to the "faas.name" +// semantic conventions. It represents the name of the single function that +// this runtime instance executes. +func FaaSName(val string) attribute.KeyValue { + return FaaSNameKey.String(val) +} + +// FaaSVersion returns an attribute KeyValue conforming to the +// "faas.version" semantic conventions. It represents the immutable version of +// the function being executed. +func FaaSVersion(val string) attribute.KeyValue { + return FaaSVersionKey.String(val) +} + +// A service instance. +const ( + // ServiceNameKey is the attribute Key conforming to the "service.name" + // semantic conventions. It represents the logical name of the service. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled + // services. If the value was not specified, SDKs MUST fallback to + // `unknown_service:` concatenated with + // [`process.executable.name`](process.md#process), e.g. + // `unknown_service:bash`. If `process.executable.name` is not available, + // the value MUST be set to `unknown_service`. + ServiceNameKey = attribute.Key("service.name") + + // ServiceVersionKey is the attribute Key conforming to the + // "service.version" semantic conventions. It represents the version string + // of the service API or implementation. The format is not defined by these + // conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2.0.0', 'a01dbef8a' + ServiceVersionKey = attribute.Key("service.version") +) + +// ServiceName returns an attribute KeyValue conforming to the +// "service.name" semantic conventions. It represents the logical name of the +// service. +func ServiceName(val string) attribute.KeyValue { + return ServiceNameKey.String(val) +} + +// ServiceVersion returns an attribute KeyValue conforming to the +// "service.version" semantic conventions. It represents the version string of +// the service API or implementation. The format is not defined by these +// conventions. +func ServiceVersion(val string) attribute.KeyValue { + return ServiceVersionKey.String(val) +} + +// A service instance. +const ( + // ServiceInstanceIDKey is the attribute Key conforming to the + // "service.instance.id" semantic conventions. It represents the string ID + // of the service instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-k8s-pod-deployment-1', + // '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // `service.namespace,service.name` pair (in other words + // `service.namespace,service.name,service.instance.id` triplet MUST be + // globally unique). The ID helps to distinguish instances of the same + // service that exist at the same time (e.g. instances of a horizontally + // scaled service). It is preferable for the ID to be persistent and stay + // the same for the lifetime of the service instance, however it is + // acceptable that the ID is ephemeral and changes during important + // lifetime events for the service (e.g. service restarts). If the service + // has no inherent unique ID that can be used as the value of this + // attribute it is recommended to generate a random Version 1 or Version 4 + // RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + ServiceInstanceIDKey = attribute.Key("service.instance.id") + + // ServiceNamespaceKey is the attribute Key conforming to the + // "service.namespace" semantic conventions. It represents a namespace for + // `service.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group + // of services, for example the team name that owns a group of services. + // `service.name` is expected to be unique within the same namespace. If + // `service.namespace` is not specified in the Resource then `service.name` + // is expected to be unique for all services that have no explicit + // namespace defined (so the empty/unspecified namespace is simply one more + // valid namespace). Zero-length namespace string is assumed equal to + // unspecified namespace. + ServiceNamespaceKey = attribute.Key("service.namespace") +) + +// ServiceInstanceID returns an attribute KeyValue conforming to the +// "service.instance.id" semantic conventions. It represents the string ID of +// the service instance. +func ServiceInstanceID(val string) attribute.KeyValue { + return ServiceInstanceIDKey.String(val) +} + +// ServiceNamespace returns an attribute KeyValue conforming to the +// "service.namespace" semantic conventions. It represents a namespace for +// `service.name`. +func ServiceNamespace(val string) attribute.KeyValue { + return ServiceNamespaceKey.String(val) +} + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // TelemetrySDKLanguageKey is the attribute Key conforming to the + // "telemetry.sdk.language" semantic conventions. It represents the + // language of the telemetry SDK. + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") + + // TelemetrySDKNameKey is the attribute Key conforming to the + // "telemetry.sdk.name" semantic conventions. It represents the name of the + // telemetry SDK as defined above. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'opentelemetry' + // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute + // to `opentelemetry`. + // If another SDK, like a fork or a vendor-provided implementation, is + // used, this SDK MUST set the + // `telemetry.sdk.name` attribute to the fully-qualified class or module + // name of this SDK's main entry point + // or another suitable identifier depending on the language. + // The identifier `opentelemetry` is reserved and MUST NOT be used in this + // case. + // All custom identifiers SHOULD be stable across different versions of an + // implementation. + TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") + + // TelemetrySDKVersionKey is the attribute Key conforming to the + // "telemetry.sdk.version" semantic conventions. It represents the version + // string of the telemetry SDK. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: '1.2.3' + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") +) + +var ( + // cpp + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // rust + TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") + // swift + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") + // webjs + TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") +) + +// TelemetrySDKName returns an attribute KeyValue conforming to the +// "telemetry.sdk.name" semantic conventions. It represents the name of the +// telemetry SDK as defined above. +func TelemetrySDKName(val string) attribute.KeyValue { + return TelemetrySDKNameKey.String(val) +} + +// TelemetrySDKVersion returns an attribute KeyValue conforming to the +// "telemetry.sdk.version" semantic conventions. It represents the version +// string of the telemetry SDK. +func TelemetrySDKVersion(val string) attribute.KeyValue { + return TelemetrySDKVersionKey.String(val) +} + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // TelemetryDistroNameKey is the attribute Key conforming to the + // "telemetry.distro.name" semantic conventions. It represents the name of + // the auto instrumentation agent or distribution, if used. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'parts-unlimited-java' + // Note: Official auto instrumentation agents and distributions SHOULD set + // the `telemetry.distro.name` attribute to + // a string starting with `opentelemetry-`, e.g. + // `opentelemetry-java-instrumentation`. + TelemetryDistroNameKey = attribute.Key("telemetry.distro.name") + + // TelemetryDistroVersionKey is the attribute Key conforming to the + // "telemetry.distro.version" semantic conventions. It represents the + // version string of the auto instrumentation agent or distribution, if + // used. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.2.3' + TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") +) + +// TelemetryDistroName returns an attribute KeyValue conforming to the +// "telemetry.distro.name" semantic conventions. It represents the name of the +// auto instrumentation agent or distribution, if used. +func TelemetryDistroName(val string) attribute.KeyValue { + return TelemetryDistroNameKey.String(val) +} + +// TelemetryDistroVersion returns an attribute KeyValue conforming to the +// "telemetry.distro.version" semantic conventions. It represents the version +// string of the auto instrumentation agent or distribution, if used. +func TelemetryDistroVersion(val string) attribute.KeyValue { + return TelemetryDistroVersionKey.String(val) +} + +// Resource describing the packaged software running the application code. Web +// engines are typically executed using process.runtime. +const ( + // WebEngineDescriptionKey is the attribute Key conforming to the + // "webengine.description" semantic conventions. It represents the + // additional description of the web engine (e.g. detailed version and + // edition information). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - + // 2.2.2.Final' + WebEngineDescriptionKey = attribute.Key("webengine.description") + + // WebEngineNameKey is the attribute Key conforming to the "webengine.name" + // semantic conventions. It represents the name of the web engine. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'WildFly' + WebEngineNameKey = attribute.Key("webengine.name") + + // WebEngineVersionKey is the attribute Key conforming to the + // "webengine.version" semantic conventions. It represents the version of + // the web engine. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '21.0.0' + WebEngineVersionKey = attribute.Key("webengine.version") +) + +// WebEngineDescription returns an attribute KeyValue conforming to the +// "webengine.description" semantic conventions. It represents the additional +// description of the web engine (e.g. detailed version and edition +// information). +func WebEngineDescription(val string) attribute.KeyValue { + return WebEngineDescriptionKey.String(val) +} + +// WebEngineName returns an attribute KeyValue conforming to the +// "webengine.name" semantic conventions. It represents the name of the web +// engine. +func WebEngineName(val string) attribute.KeyValue { + return WebEngineNameKey.String(val) +} + +// WebEngineVersion returns an attribute KeyValue conforming to the +// "webengine.version" semantic conventions. It represents the version of the +// web engine. +func WebEngineVersion(val string) attribute.KeyValue { + return WebEngineVersionKey.String(val) +} + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // OTelScopeNameKey is the attribute Key conforming to the + // "otel.scope.name" semantic conventions. It represents the name of the + // instrumentation scope - (`InstrumentationScope.Name` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'io.opentelemetry.contrib.mongodb' + OTelScopeNameKey = attribute.Key("otel.scope.name") + + // OTelScopeVersionKey is the attribute Key conforming to the + // "otel.scope.version" semantic conventions. It represents the version of + // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.0.0' + OTelScopeVersionKey = attribute.Key("otel.scope.version") +) + +// OTelScopeName returns an attribute KeyValue conforming to the +// "otel.scope.name" semantic conventions. It represents the name of the +// instrumentation scope - (`InstrumentationScope.Name` in OTLP). +func OTelScopeName(val string) attribute.KeyValue { + return OTelScopeNameKey.String(val) +} + +// OTelScopeVersion returns an attribute KeyValue conforming to the +// "otel.scope.version" semantic conventions. It represents the version of the +// instrumentation scope - (`InstrumentationScope.Version` in OTLP). +func OTelScopeVersion(val string) attribute.KeyValue { + return OTelScopeVersionKey.String(val) +} + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry +// Scope's concepts. +const ( + // OTelLibraryNameKey is the attribute Key conforming to the + // "otel.library.name" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: 'io.opentelemetry.contrib.mongodb' + // Deprecated: use the `otel.scope.name` attribute. + OTelLibraryNameKey = attribute.Key("otel.library.name") + + // OTelLibraryVersionKey is the attribute Key conforming to the + // "otel.library.version" semantic conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: deprecated + // Examples: '1.0.0' + // Deprecated: use the `otel.scope.version` attribute. + OTelLibraryVersionKey = attribute.Key("otel.library.version") +) + +// OTelLibraryName returns an attribute KeyValue conforming to the +// "otel.library.name" semantic conventions. +// +// Deprecated: use the `otel.scope.name` attribute. +func OTelLibraryName(val string) attribute.KeyValue { + return OTelLibraryNameKey.String(val) +} + +// OTelLibraryVersion returns an attribute KeyValue conforming to the +// "otel.library.version" semantic conventions. +// +// Deprecated: use the `otel.scope.version` attribute. +func OTelLibraryVersion(val string) attribute.KeyValue { + return OTelLibraryVersionKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/schema.go new file mode 100644 index 000000000..fe80b1731 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.24.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go new file mode 100644 index 000000000..c1718234e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go @@ -0,0 +1,1323 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" + +import "go.opentelemetry.io/otel/attribute" + +// Operations that access some remote service. +const ( + // PeerServiceKey is the attribute Key conforming to the "peer.service" + // semantic conventions. It represents the + // [`service.name`](/docs/resource/README.md#service) of the remote + // service. SHOULD be equal to the actual `service.name` resource attribute + // of the remote service if any. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'AuthTokenCache' + PeerServiceKey = attribute.Key("peer.service") +) + +// PeerService returns an attribute KeyValue conforming to the +// "peer.service" semantic conventions. It represents the +// [`service.name`](/docs/resource/README.md#service) of the remote service. +// SHOULD be equal to the actual `service.name` resource attribute of the +// remote service if any. +func PeerService(val string) attribute.KeyValue { + return PeerServiceKey.String(val) +} + +// These attributes may be used for any operation with an authenticated and/or +// authorized enduser. +const ( + // EnduserIDKey is the attribute Key conforming to the "enduser.id" + // semantic conventions. It represents the username or client_id extracted + // from the access token or + // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header + // in the inbound request from outside the system. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'username' + EnduserIDKey = attribute.Key("enduser.id") + + // EnduserRoleKey is the attribute Key conforming to the "enduser.role" + // semantic conventions. It represents the actual/assumed role the client + // is making the request under extracted from token or application security + // context. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'admin' + EnduserRoleKey = attribute.Key("enduser.role") + + // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" + // semantic conventions. It represents the scopes or granted authorities + // the client currently possesses extracted from token or application + // security context. The value would come from the scope associated with an + // [OAuth 2.0 Access + // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute + // value in a [SAML 2.0 + // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'read:message, write:files' + EnduserScopeKey = attribute.Key("enduser.scope") +) + +// EnduserID returns an attribute KeyValue conforming to the "enduser.id" +// semantic conventions. It represents the username or client_id extracted from +// the access token or +// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in +// the inbound request from outside the system. +func EnduserID(val string) attribute.KeyValue { + return EnduserIDKey.String(val) +} + +// EnduserRole returns an attribute KeyValue conforming to the +// "enduser.role" semantic conventions. It represents the actual/assumed role +// the client is making the request under extracted from token or application +// security context. +func EnduserRole(val string) attribute.KeyValue { + return EnduserRoleKey.String(val) +} + +// EnduserScope returns an attribute KeyValue conforming to the +// "enduser.scope" semantic conventions. It represents the scopes or granted +// authorities the client currently possesses extracted from token or +// application security context. The value would come from the scope associated +// with an [OAuth 2.0 Access +// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute +// value in a [SAML 2.0 +// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). +func EnduserScope(val string) attribute.KeyValue { + return EnduserScopeKey.String(val) +} + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // CodeColumnKey is the attribute Key conforming to the "code.column" + // semantic conventions. It represents the column number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 16 + CodeColumnKey = attribute.Key("code.column") + + // CodeFilepathKey is the attribute Key conforming to the "code.filepath" + // semantic conventions. It represents the source code file name that + // identifies the code unit as uniquely as possible (preferably an absolute + // file path). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + CodeFilepathKey = attribute.Key("code.filepath") + + // CodeFunctionKey is the attribute Key conforming to the "code.function" + // semantic conventions. It represents the method or function name, or + // equivalent (usually rightmost part of the code unit's name). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'serveRequest' + CodeFunctionKey = attribute.Key("code.function") + + // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" + // semantic conventions. It represents the line number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 42 + CodeLineNumberKey = attribute.Key("code.lineno") + + // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" + // semantic conventions. It represents the "namespace" within which + // `code.function` is defined. Usually the qualified class or module name, + // such that `code.namespace` + some separator + `code.function` form a + // unique identifier for the code unit. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'com.example.MyHTTPService' + CodeNamespaceKey = attribute.Key("code.namespace") + + // CodeStacktraceKey is the attribute Key conforming to the + // "code.stacktrace" semantic conventions. It represents a stacktrace as a + // string in the natural representation for the language runtime. The + // representation is to be determined and documented by each language SIG. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'at + // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + CodeStacktraceKey = attribute.Key("code.stacktrace") +) + +// CodeColumn returns an attribute KeyValue conforming to the "code.column" +// semantic conventions. It represents the column number in `code.filepath` +// best representing the operation. It SHOULD point within the code unit named +// in `code.function`. +func CodeColumn(val int) attribute.KeyValue { + return CodeColumnKey.Int(val) +} + +// CodeFilepath returns an attribute KeyValue conforming to the +// "code.filepath" semantic conventions. It represents the source code file +// name that identifies the code unit as uniquely as possible (preferably an +// absolute file path). +func CodeFilepath(val string) attribute.KeyValue { + return CodeFilepathKey.String(val) +} + +// CodeFunction returns an attribute KeyValue conforming to the +// "code.function" semantic conventions. It represents the method or function +// name, or equivalent (usually rightmost part of the code unit's name). +func CodeFunction(val string) attribute.KeyValue { + return CodeFunctionKey.String(val) +} + +// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" +// semantic conventions. It represents the line number in `code.filepath` best +// representing the operation. It SHOULD point within the code unit named in +// `code.function`. +func CodeLineNumber(val int) attribute.KeyValue { + return CodeLineNumberKey.Int(val) +} + +// CodeNamespace returns an attribute KeyValue conforming to the +// "code.namespace" semantic conventions. It represents the "namespace" within +// which `code.function` is defined. Usually the qualified class or module +// name, such that `code.namespace` + some separator + `code.function` form a +// unique identifier for the code unit. +func CodeNamespace(val string) attribute.KeyValue { + return CodeNamespaceKey.String(val) +} + +// CodeStacktrace returns an attribute KeyValue conforming to the +// "code.stacktrace" semantic conventions. It represents a stacktrace as a +// string in the natural representation for the language runtime. The +// representation is to be determined and documented by each language SIG. +func CodeStacktrace(val string) attribute.KeyValue { + return CodeStacktraceKey.String(val) +} + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic + // conventions. It represents the current "managed" thread ID (as opposed + // to OS thread ID). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 42 + ThreadIDKey = attribute.Key("thread.id") + + // ThreadNameKey is the attribute Key conforming to the "thread.name" + // semantic conventions. It represents the current thread name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'main' + ThreadNameKey = attribute.Key("thread.name") +) + +// ThreadID returns an attribute KeyValue conforming to the "thread.id" +// semantic conventions. It represents the current "managed" thread ID (as +// opposed to OS thread ID). +func ThreadID(val int) attribute.KeyValue { + return ThreadIDKey.Int(val) +} + +// ThreadName returns an attribute KeyValue conforming to the "thread.name" +// semantic conventions. It represents the current thread name. +func ThreadName(val string) attribute.KeyValue { + return ThreadNameKey.String(val) +} + +// Span attributes used by AWS Lambda (in addition to general `faas` +// attributes). +const ( + // AWSLambdaInvokedARNKey is the attribute Key conforming to the + // "aws.lambda.invoked_arn" semantic conventions. It represents the full + // invoked ARN as provided on the `Context` passed to the function + // (`Lambda-Runtime-Invoked-Function-ARN` header on the + // `/runtime/invocation/next` applicable). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from `cloud.resource_id` if an alias is + // involved. + AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") +) + +// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the +// "aws.lambda.invoked_arn" semantic conventions. It represents the full +// invoked ARN as provided on the `Context` passed to the function +// (`Lambda-Runtime-Invoked-Function-ARN` header on the +// `/runtime/invocation/next` applicable). +func AWSLambdaInvokedARN(val string) attribute.KeyValue { + return AWSLambdaInvokedARNKey.String(val) +} + +// Attributes for CloudEvents. CloudEvents is a specification on how to define +// event data in a standard way. These attributes can be attached to spans when +// performing operations with CloudEvents, regardless of the protocol being +// used. +const ( + // CloudeventsEventIDKey is the attribute Key conforming to the + // "cloudevents.event_id" semantic conventions. It represents the + // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) + // uniquely identifies the event. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + + // CloudeventsEventSourceKey is the attribute Key conforming to the + // "cloudevents.event_source" semantic conventions. It represents the + // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) + // identifies the context in which an event happened. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'https://github.com/cloudevents', + // '/cloudevents/spec/pull/123', 'my-service' + CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + + // CloudeventsEventSpecVersionKey is the attribute Key conforming to the + // "cloudevents.event_spec_version" semantic conventions. It represents the + // [version of the CloudEvents + // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) + // which the event uses. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.0' + CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + + // CloudeventsEventSubjectKey is the attribute Key conforming to the + // "cloudevents.event_subject" semantic conventions. It represents the + // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) + // of the event in the context of the event producer (identified by + // source). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'mynewfile.jpg' + CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") + + // CloudeventsEventTypeKey is the attribute Key conforming to the + // "cloudevents.event_type" semantic conventions. It represents the + // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) + // contains a value describing the type of event related to the originating + // occurrence. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'com.github.pull_request.opened', + // 'com.example.object.deleted.v2' + CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") +) + +// CloudeventsEventID returns an attribute KeyValue conforming to the +// "cloudevents.event_id" semantic conventions. It represents the +// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) +// uniquely identifies the event. +func CloudeventsEventID(val string) attribute.KeyValue { + return CloudeventsEventIDKey.String(val) +} + +// CloudeventsEventSource returns an attribute KeyValue conforming to the +// "cloudevents.event_source" semantic conventions. It represents the +// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) +// identifies the context in which an event happened. +func CloudeventsEventSource(val string) attribute.KeyValue { + return CloudeventsEventSourceKey.String(val) +} + +// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to +// the "cloudevents.event_spec_version" semantic conventions. It represents the +// [version of the CloudEvents +// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) +// which the event uses. +func CloudeventsEventSpecVersion(val string) attribute.KeyValue { + return CloudeventsEventSpecVersionKey.String(val) +} + +// CloudeventsEventSubject returns an attribute KeyValue conforming to the +// "cloudevents.event_subject" semantic conventions. It represents the +// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) +// of the event in the context of the event producer (identified by source). +func CloudeventsEventSubject(val string) attribute.KeyValue { + return CloudeventsEventSubjectKey.String(val) +} + +// CloudeventsEventType returns an attribute KeyValue conforming to the +// "cloudevents.event_type" semantic conventions. It represents the +// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) +// contains a value describing the type of event related to the originating +// occurrence. +func CloudeventsEventType(val string) attribute.KeyValue { + return CloudeventsEventTypeKey.String(val) +} + +// Semantic conventions for the OpenTracing Shim +const ( + // OpentracingRefTypeKey is the attribute Key conforming to the + // "opentracing.ref_type" semantic conventions. It represents the + // parent-child Reference type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The causal relationship between a child Span and a parent Span. + OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +var ( + // The parent Span depends on the child Span in some capacity + OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + // The parent Span doesn't depend in any way on the result of the child Span + OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's +// concepts. +const ( + // OTelStatusCodeKey is the attribute Key conforming to the + // "otel.status_code" semantic conventions. It represents the name of the + // code, either "OK" or "ERROR". MUST NOT be set if the status code is + // UNSET. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + OTelStatusCodeKey = attribute.Key("otel.status_code") + + // OTelStatusDescriptionKey is the attribute Key conforming to the + // "otel.status_description" semantic conventions. It represents the + // description of the Status if it has a value, otherwise not set. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'resource not found' + OTelStatusDescriptionKey = attribute.Key("otel.status_description") +) + +var ( + // The operation has been validated by an Application developer or Operator to have completed successfully + OTelStatusCodeOk = OTelStatusCodeKey.String("OK") + // The operation contains an error + OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") +) + +// OTelStatusDescription returns an attribute KeyValue conforming to the +// "otel.status_description" semantic conventions. It represents the +// description of the Status if it has a value, otherwise not set. +func OTelStatusDescription(val string) attribute.KeyValue { + return OTelStatusDescriptionKey.String(val) +} + +// This semantic convention describes an instance of a function that runs +// without provisioning or managing of servers (also known as serverless +// functions or Function as a Service (FaaS)) with spans. +const ( + // FaaSInvocationIDKey is the attribute Key conforming to the + // "faas.invocation_id" semantic conventions. It represents the invocation + // ID of the current function invocation. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + FaaSInvocationIDKey = attribute.Key("faas.invocation_id") +) + +// FaaSInvocationID returns an attribute KeyValue conforming to the +// "faas.invocation_id" semantic conventions. It represents the invocation ID +// of the current function invocation. +func FaaSInvocationID(val string) attribute.KeyValue { + return FaaSInvocationIDKey.String(val) +} + +// Semantic Convention for FaaS triggered as a response to some data source +// operation such as a database or filesystem read/write. +const ( + // FaaSDocumentCollectionKey is the attribute Key conforming to the + // "faas.document.collection" semantic conventions. It represents the name + // of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in + // Cosmos DB to the database name. + // + // Type: string + // RequirementLevel: Required + // Stability: experimental + // Examples: 'myBucketName', 'myDBName' + FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") + + // FaaSDocumentNameKey is the attribute Key conforming to the + // "faas.document.name" semantic conventions. It represents the document + // name/table subjected to the operation. For example, in Cloud Storage or + // S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myFile.txt', 'myTableName' + FaaSDocumentNameKey = attribute.Key("faas.document.name") + + // FaaSDocumentOperationKey is the attribute Key conforming to the + // "faas.document.operation" semantic conventions. It represents the + // describes the type of the operation that was performed on the data. + // + // Type: Enum + // RequirementLevel: Required + // Stability: experimental + FaaSDocumentOperationKey = attribute.Key("faas.document.operation") + + // FaaSDocumentTimeKey is the attribute Key conforming to the + // "faas.document.time" semantic conventions. It represents a string + // containing the time when the data was accessed in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + FaaSDocumentTimeKey = attribute.Key("faas.document.time") +) + +var ( + // When a new object is created + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +// FaaSDocumentCollection returns an attribute KeyValue conforming to the +// "faas.document.collection" semantic conventions. It represents the name of +// the source on which the triggering operation was performed. For example, in +// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the +// database name. +func FaaSDocumentCollection(val string) attribute.KeyValue { + return FaaSDocumentCollectionKey.String(val) +} + +// FaaSDocumentName returns an attribute KeyValue conforming to the +// "faas.document.name" semantic conventions. It represents the document +// name/table subjected to the operation. For example, in Cloud Storage or S3 +// is the name of the file, and in Cosmos DB the table name. +func FaaSDocumentName(val string) attribute.KeyValue { + return FaaSDocumentNameKey.String(val) +} + +// FaaSDocumentTime returns an attribute KeyValue conforming to the +// "faas.document.time" semantic conventions. It represents a string containing +// the time when the data was accessed in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSDocumentTime(val string) attribute.KeyValue { + return FaaSDocumentTimeKey.String(val) +} + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic + // conventions. It represents a string containing the schedule period as + // [Cron + // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0/5 * * * ? *' + FaaSCronKey = attribute.Key("faas.cron") + + // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic + // conventions. It represents a string containing the function invocation + // time in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + FaaSTimeKey = attribute.Key("faas.time") +) + +// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" +// semantic conventions. It represents a string containing the schedule period +// as [Cron +// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +func FaaSCron(val string) attribute.KeyValue { + return FaaSCronKey.String(val) +} + +// FaaSTime returns an attribute KeyValue conforming to the "faas.time" +// semantic conventions. It represents a string containing the function +// invocation time in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSTime(val string) attribute.KeyValue { + return FaaSTimeKey.String(val) +} + +// Contains additional attributes for incoming FaaS spans. +const ( + // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" + // semantic conventions. It represents a boolean that is true if the + // serverless function is executed for the first time (aka cold-start). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + FaaSColdstartKey = attribute.Key("faas.coldstart") +) + +// FaaSColdstart returns an attribute KeyValue conforming to the +// "faas.coldstart" semantic conventions. It represents a boolean that is true +// if the serverless function is executed for the first time (aka cold-start). +func FaaSColdstart(val bool) attribute.KeyValue { + return FaaSColdstartKey.Bool(val) +} + +// The `aws` conventions apply to operations using the AWS SDK. They map +// request or response parameters in AWS SDK API calls to attributes on a Span. +// The conventions have been collected over time based on feedback from AWS +// users of tracing and will continue to evolve as new interesting conventions +// are found. +// Some descriptions are also provided for populating general OpenTelemetry +// semantic conventions based on these APIs. +const ( + // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" + // semantic conventions. It represents the AWS request ID as returned in + // the response headers `x-amz-request-id` or `x-amz-requestid`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AWSRequestIDKey = attribute.Key("aws.request_id") +) + +// AWSRequestID returns an attribute KeyValue conforming to the +// "aws.request_id" semantic conventions. It represents the AWS request ID as +// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +func AWSRequestID(val string) attribute.KeyValue { + return AWSRequestIDKey.String(val) +} + +// Attributes that exist for multiple DynamoDB request types. +const ( + // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the + // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the + // value of the `AttributesToGet` request parameter. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'lives', 'id' + AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") + + // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the + // "aws.dynamodb.consistent_read" semantic conventions. It represents the + // value of the `ConsistentRead` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") + + // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the + // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the + // JSON-serialized value of each item in the `ConsumedCapacity` response + // field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { + // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number }, "TableName": "string", + // "WriteCapacityUnits": number }' + AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") + + // AWSDynamoDBIndexNameKey is the attribute Key conforming to the + // "aws.dynamodb.index_name" semantic conventions. It represents the value + // of the `IndexName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'name_to_group' + AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") + + // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to + // the "aws.dynamodb.item_collection_metrics" semantic conventions. It + // represents the JSON-serialized value of the `ItemCollectionMetrics` + // response field. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": + // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { + // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], + // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, + // "SizeEstimateRangeGB": [ number ] } ] }' + AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") + + // AWSDynamoDBLimitKey is the attribute Key conforming to the + // "aws.dynamodb.limit" semantic conventions. It represents the value of + // the `Limit` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") + + // AWSDynamoDBProjectionKey is the attribute Key conforming to the + // "aws.dynamodb.projection" semantic conventions. It represents the value + // of the `ProjectionExpression` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, + // RelatedItems, ProductReviews' + AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") + + // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to + // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It + // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` + // request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") + + // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming + // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. + // It represents the value of the + // `ProvisionedThroughput.WriteCapacityUnits` request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") + + // AWSDynamoDBSelectKey is the attribute Key conforming to the + // "aws.dynamodb.select" semantic conventions. It represents the value of + // the `Select` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") + + // AWSDynamoDBTableNamesKey is the attribute Key conforming to the + // "aws.dynamodb.table_names" semantic conventions. It represents the keys + // in the `RequestItems` object field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Users', 'Cats' + AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") +) + +// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to +// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the +// value of the `AttributesToGet` request parameter. +func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributesToGetKey.StringSlice(val) +} + +// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the +// "aws.dynamodb.consistent_read" semantic conventions. It represents the value +// of the `ConsistentRead` request parameter. +func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { + return AWSDynamoDBConsistentReadKey.Bool(val) +} + +// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to +// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the +// JSON-serialized value of each item in the `ConsumedCapacity` response field. +func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { + return AWSDynamoDBConsumedCapacityKey.StringSlice(val) +} + +// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the +// "aws.dynamodb.index_name" semantic conventions. It represents the value of +// the `IndexName` request parameter. +func AWSDynamoDBIndexName(val string) attribute.KeyValue { + return AWSDynamoDBIndexNameKey.String(val) +} + +// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming +// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It +// represents the JSON-serialized value of the `ItemCollectionMetrics` response +// field. +func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { + return AWSDynamoDBItemCollectionMetricsKey.String(val) +} + +// AWSDynamoDBLimit returns an attribute KeyValue conforming to the +// "aws.dynamodb.limit" semantic conventions. It represents the value of the +// `Limit` request parameter. +func AWSDynamoDBLimit(val int) attribute.KeyValue { + return AWSDynamoDBLimitKey.Int(val) +} + +// AWSDynamoDBProjection returns an attribute KeyValue conforming to the +// "aws.dynamodb.projection" semantic conventions. It represents the value of +// the `ProjectionExpression` request parameter. +func AWSDynamoDBProjection(val string) attribute.KeyValue { + return AWSDynamoDBProjectionKey.String(val) +} + +// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.ReadCapacityUnits` request parameter. +func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) +} + +// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.WriteCapacityUnits` request parameter. +func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) +} + +// AWSDynamoDBSelect returns an attribute KeyValue conforming to the +// "aws.dynamodb.select" semantic conventions. It represents the value of the +// `Select` request parameter. +func AWSDynamoDBSelect(val string) attribute.KeyValue { + return AWSDynamoDBSelectKey.String(val) +} + +// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_names" semantic conventions. It represents the keys in +// the `RequestItems` object field. +func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { + return AWSDynamoDBTableNamesKey.StringSlice(val) +} + +// DynamoDB.CreateTable +const ( + // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `GlobalSecondaryIndexes` request field + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": + // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ + // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") + + // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `LocalSecondaryIndexes` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "IndexARN": "string", "IndexName": "string", + // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' + AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") +) + +// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_indexes" semantic +// conventions. It represents the JSON-serialized value of each item of the +// `GlobalSecondaryIndexes` request field +func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) +} + +// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming +// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It +// represents the JSON-serialized value of each item of the +// `LocalSecondaryIndexes` request field. +func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) +} + +// DynamoDB.ListTables +const ( + // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the + // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents + // the value of the `ExclusiveStartTableName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Users', 'CatsTable' + AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") + + // AWSDynamoDBTableCountKey is the attribute Key conforming to the + // "aws.dynamodb.table_count" semantic conventions. It represents the the + // number of items in the `TableNames` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 20 + AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") +) + +// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming +// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It +// represents the value of the `ExclusiveStartTableName` request parameter. +func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { + return AWSDynamoDBExclusiveStartTableKey.String(val) +} + +// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_count" semantic conventions. It represents the the +// number of items in the `TableNames` response parameter. +func AWSDynamoDBTableCount(val int) attribute.KeyValue { + return AWSDynamoDBTableCountKey.Int(val) +} + +// DynamoDB.Query +const ( + // AWSDynamoDBScanForwardKey is the attribute Key conforming to the + // "aws.dynamodb.scan_forward" semantic conventions. It represents the + // value of the `ScanIndexForward` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") +) + +// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the +// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of +// the `ScanIndexForward` request parameter. +func AWSDynamoDBScanForward(val bool) attribute.KeyValue { + return AWSDynamoDBScanForwardKey.Bool(val) +} + +// DynamoDB.Scan +const ( + // AWSDynamoDBCountKey is the attribute Key conforming to the + // "aws.dynamodb.count" semantic conventions. It represents the value of + // the `Count` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") + + // AWSDynamoDBScannedCountKey is the attribute Key conforming to the + // "aws.dynamodb.scanned_count" semantic conventions. It represents the + // value of the `ScannedCount` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 50 + AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") + + // AWSDynamoDBSegmentKey is the attribute Key conforming to the + // "aws.dynamodb.segment" semantic conventions. It represents the value of + // the `Segment` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") + + // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the + // "aws.dynamodb.total_segments" semantic conventions. It represents the + // value of the `TotalSegments` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") +) + +// AWSDynamoDBCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.count" semantic conventions. It represents the value of the +// `Count` response parameter. +func AWSDynamoDBCount(val int) attribute.KeyValue { + return AWSDynamoDBCountKey.Int(val) +} + +// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.scanned_count" semantic conventions. It represents the value +// of the `ScannedCount` response parameter. +func AWSDynamoDBScannedCount(val int) attribute.KeyValue { + return AWSDynamoDBScannedCountKey.Int(val) +} + +// AWSDynamoDBSegment returns an attribute KeyValue conforming to the +// "aws.dynamodb.segment" semantic conventions. It represents the value of the +// `Segment` request parameter. +func AWSDynamoDBSegment(val int) attribute.KeyValue { + return AWSDynamoDBSegmentKey.Int(val) +} + +// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the +// "aws.dynamodb.total_segments" semantic conventions. It represents the value +// of the `TotalSegments` request parameter. +func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { + return AWSDynamoDBTotalSegmentsKey.Int(val) +} + +// DynamoDB.UpdateTable +const ( + // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to + // the "aws.dynamodb.attribute_definitions" semantic conventions. It + // represents the JSON-serialized value of each item in the + // `AttributeDefinitions` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") + + // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key + // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic + // conventions. It represents the JSON-serialized value of each item in the + // the `GlobalSecondaryIndexUpdates` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") +) + +// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming +// to the "aws.dynamodb.attribute_definitions" semantic conventions. It +// represents the JSON-serialized value of each item in the +// `AttributeDefinitions` request field. +func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) +} + +// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic +// conventions. It represents the JSON-serialized value of each item in the the +// `GlobalSecondaryIndexUpdates` request field. +func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) +} + +// Attributes that exist for S3 request types. +const ( + // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" + // semantic conventions. It represents the S3 bucket name the request + // refers to. Corresponds to the `--bucket` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'some-bucket-name' + // Note: The `bucket` attribute is applicable to all S3 operations that + // reference a bucket, i.e. that require the bucket name as a mandatory + // parameter. + // This applies to almost all S3 operations except `list-buckets`. + AWSS3BucketKey = attribute.Key("aws.s3.bucket") + + // AWSS3CopySourceKey is the attribute Key conforming to the + // "aws.s3.copy_source" semantic conventions. It represents the source + // object (in the form `bucket`/`key`) for the copy operation. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The `copy_source` attribute applies to S3 copy operations and + // corresponds to the `--copy-source` parameter + // of the [copy-object operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") + + // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" + // semantic conventions. It represents the delete request container that + // specifies the objects to be deleted. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' + // Note: The `delete` attribute is only applicable to the + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // operation. + // The `delete` attribute corresponds to the `--delete` parameter of the + // [delete-objects operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). + AWSS3DeleteKey = attribute.Key("aws.s3.delete") + + // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic + // conventions. It represents the S3 object key the request refers to. + // Corresponds to the `--key` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The `key` attribute is applicable to all object-related S3 + // operations, i.e. that require the object key as a mandatory parameter. + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // - + // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) + // - + // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) + // - + // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) + // - + // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) + // - + // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3KeyKey = attribute.Key("aws.s3.key") + + // AWSS3PartNumberKey is the attribute Key conforming to the + // "aws.s3.part_number" semantic conventions. It represents the part number + // of the part being uploaded in a multipart-upload operation. This is a + // positive integer between 1 and 10,000. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3456 + // Note: The `part_number` attribute is only applicable to the + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // and + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + // operations. + // The `part_number` attribute corresponds to the `--part-number` parameter + // of the + // [upload-part operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). + AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") + + // AWSS3UploadIDKey is the attribute Key conforming to the + // "aws.s3.upload_id" semantic conventions. It represents the upload ID + // that identifies the multipart upload. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The `upload_id` attribute applies to S3 multipart-upload + // operations and corresponds to the `--upload-id` parameter + // of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // multipart operations. + // This applies in particular to the following operations: + // + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") +) + +// AWSS3Bucket returns an attribute KeyValue conforming to the +// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the +// request refers to. Corresponds to the `--bucket` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Bucket(val string) attribute.KeyValue { + return AWSS3BucketKey.String(val) +} + +// AWSS3CopySource returns an attribute KeyValue conforming to the +// "aws.s3.copy_source" semantic conventions. It represents the source object +// (in the form `bucket`/`key`) for the copy operation. +func AWSS3CopySource(val string) attribute.KeyValue { + return AWSS3CopySourceKey.String(val) +} + +// AWSS3Delete returns an attribute KeyValue conforming to the +// "aws.s3.delete" semantic conventions. It represents the delete request +// container that specifies the objects to be deleted. +func AWSS3Delete(val string) attribute.KeyValue { + return AWSS3DeleteKey.String(val) +} + +// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" +// semantic conventions. It represents the S3 object key the request refers to. +// Corresponds to the `--key` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Key(val string) attribute.KeyValue { + return AWSS3KeyKey.String(val) +} + +// AWSS3PartNumber returns an attribute KeyValue conforming to the +// "aws.s3.part_number" semantic conventions. It represents the part number of +// the part being uploaded in a multipart-upload operation. This is a positive +// integer between 1 and 10,000. +func AWSS3PartNumber(val int) attribute.KeyValue { + return AWSS3PartNumberKey.Int(val) +} + +// AWSS3UploadID returns an attribute KeyValue conforming to the +// "aws.s3.upload_id" semantic conventions. It represents the upload ID that +// identifies the multipart upload. +func AWSS3UploadID(val string) attribute.KeyValue { + return AWSS3UploadIDKey.String(val) +} + +// Semantic conventions to apply when instrumenting the GraphQL implementation. +// They map GraphQL operations to attributes on a Span. +const ( + // GraphqlDocumentKey is the attribute Key conforming to the + // "graphql.document" semantic conventions. It represents the GraphQL + // document being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + GraphqlDocumentKey = attribute.Key("graphql.document") + + // GraphqlOperationNameKey is the attribute Key conforming to the + // "graphql.operation.name" semantic conventions. It represents the name of + // the operation being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'findBookByID' + GraphqlOperationNameKey = attribute.Key("graphql.operation.name") + + // GraphqlOperationTypeKey is the attribute Key conforming to the + // "graphql.operation.type" semantic conventions. It represents the type of + // the operation being executed. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'query', 'mutation', 'subscription' + GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") +) + +var ( + // GraphQL query + GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") + // GraphQL mutation + GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") + // GraphQL subscription + GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") +) + +// GraphqlDocument returns an attribute KeyValue conforming to the +// "graphql.document" semantic conventions. It represents the GraphQL document +// being executed. +func GraphqlDocument(val string) attribute.KeyValue { + return GraphqlDocumentKey.String(val) +} + +// GraphqlOperationName returns an attribute KeyValue conforming to the +// "graphql.operation.name" semantic conventions. It represents the name of the +// operation being executed. +func GraphqlOperationName(val string) attribute.KeyValue { + return GraphqlOperationNameKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/trace.go b/vendor/go.opentelemetry.io/otel/trace.go new file mode 100644 index 000000000..6836c6547 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +import ( + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/trace" +) + +// Tracer creates a named tracer that implements Tracer interface. +// If the name is an empty string then provider uses default name. +// +// This is short for GetTracerProvider().Tracer(name, opts...) +func Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return GetTracerProvider().Tracer(name, opts...) +} + +// GetTracerProvider returns the registered global trace provider. +// If none is registered then an instance of NoopTracerProvider is returned. +// +// Use the trace provider to create a named tracer. E.g. +// +// tracer := otel.GetTracerProvider().Tracer("example.com/foo") +// +// or +// +// tracer := otel.Tracer("example.com/foo") +func GetTracerProvider() trace.TracerProvider { + return global.TracerProvider() +} + +// SetTracerProvider registers `tp` as the global trace provider. +func SetTracerProvider(tp trace.TracerProvider) { + global.SetTracerProvider(tp) +} diff --git a/vendor/go.opentelemetry.io/otel/trace/LICENSE b/vendor/go.opentelemetry.io/otel/trace/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/trace/README.md b/vendor/go.opentelemetry.io/otel/trace/README.md new file mode 100644 index 000000000..58ccaba69 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/README.md @@ -0,0 +1,3 @@ +# Trace API + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/trace) diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go new file mode 100644 index 000000000..273d58e00 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/config.go @@ -0,0 +1,323 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "time" + + "go.opentelemetry.io/otel/attribute" +) + +// TracerConfig is a group of options for a Tracer. +type TracerConfig struct { + instrumentationVersion string + // Schema URL of the telemetry emitted by the Tracer. + schemaURL string + attrs attribute.Set +} + +// InstrumentationVersion returns the version of the library providing instrumentation. +func (t *TracerConfig) InstrumentationVersion() string { + return t.instrumentationVersion +} + +// InstrumentationAttributes returns the attributes associated with the library +// providing instrumentation. +func (t *TracerConfig) InstrumentationAttributes() attribute.Set { + return t.attrs +} + +// SchemaURL returns the Schema URL of the telemetry emitted by the Tracer. +func (t *TracerConfig) SchemaURL() string { + return t.schemaURL +} + +// NewTracerConfig applies all the options to a returned TracerConfig. +func NewTracerConfig(options ...TracerOption) TracerConfig { + var config TracerConfig + for _, option := range options { + config = option.apply(config) + } + return config +} + +// TracerOption applies an option to a TracerConfig. +type TracerOption interface { + apply(TracerConfig) TracerConfig +} + +type tracerOptionFunc func(TracerConfig) TracerConfig + +func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig { + return fn(cfg) +} + +// SpanConfig is a group of options for a Span. +type SpanConfig struct { + attributes []attribute.KeyValue + timestamp time.Time + links []Link + newRoot bool + spanKind SpanKind + stackTrace bool +} + +// Attributes describe the associated qualities of a Span. +func (cfg *SpanConfig) Attributes() []attribute.KeyValue { + return cfg.attributes +} + +// Timestamp is a time in a Span life-cycle. +func (cfg *SpanConfig) Timestamp() time.Time { + return cfg.timestamp +} + +// StackTrace checks whether stack trace capturing is enabled. +func (cfg *SpanConfig) StackTrace() bool { + return cfg.stackTrace +} + +// Links are the associations a Span has with other Spans. +func (cfg *SpanConfig) Links() []Link { + return cfg.links +} + +// NewRoot identifies a Span as the root Span for a new trace. This is +// commonly used when an existing trace crosses trust boundaries and the +// remote parent span context should be ignored for security. +func (cfg *SpanConfig) NewRoot() bool { + return cfg.newRoot +} + +// SpanKind is the role a Span has in a trace. +func (cfg *SpanConfig) SpanKind() SpanKind { + return cfg.spanKind +} + +// NewSpanStartConfig applies all the options to a returned SpanConfig. +// No validation is performed on the returned SpanConfig (e.g. no uniqueness +// checking or bounding of data), it is left to the SDK to perform this +// action. +func NewSpanStartConfig(options ...SpanStartOption) SpanConfig { + var c SpanConfig + for _, option := range options { + c = option.applySpanStart(c) + } + return c +} + +// NewSpanEndConfig applies all the options to a returned SpanConfig. +// No validation is performed on the returned SpanConfig (e.g. no uniqueness +// checking or bounding of data), it is left to the SDK to perform this +// action. +func NewSpanEndConfig(options ...SpanEndOption) SpanConfig { + var c SpanConfig + for _, option := range options { + c = option.applySpanEnd(c) + } + return c +} + +// SpanStartOption applies an option to a SpanConfig. These options are applicable +// only when the span is created. +type SpanStartOption interface { + applySpanStart(SpanConfig) SpanConfig +} + +type spanOptionFunc func(SpanConfig) SpanConfig + +func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig { + return fn(cfg) +} + +// SpanEndOption applies an option to a SpanConfig. These options are +// applicable only when the span is ended. +type SpanEndOption interface { + applySpanEnd(SpanConfig) SpanConfig +} + +// EventConfig is a group of options for an Event. +type EventConfig struct { + attributes []attribute.KeyValue + timestamp time.Time + stackTrace bool +} + +// Attributes describe the associated qualities of an Event. +func (cfg *EventConfig) Attributes() []attribute.KeyValue { + return cfg.attributes +} + +// Timestamp is a time in an Event life-cycle. +func (cfg *EventConfig) Timestamp() time.Time { + return cfg.timestamp +} + +// StackTrace checks whether stack trace capturing is enabled. +func (cfg *EventConfig) StackTrace() bool { + return cfg.stackTrace +} + +// NewEventConfig applies all the EventOptions to a returned EventConfig. If no +// timestamp option is passed, the returned EventConfig will have a Timestamp +// set to the call time, otherwise no validation is performed on the returned +// EventConfig. +func NewEventConfig(options ...EventOption) EventConfig { + var c EventConfig + for _, option := range options { + c = option.applyEvent(c) + } + if c.timestamp.IsZero() { + c.timestamp = time.Now() + } + return c +} + +// EventOption applies span event options to an EventConfig. +type EventOption interface { + applyEvent(EventConfig) EventConfig +} + +// SpanOption are options that can be used at both the beginning and end of a span. +type SpanOption interface { + SpanStartOption + SpanEndOption +} + +// SpanStartEventOption are options that can be used at the start of a span, or with an event. +type SpanStartEventOption interface { + SpanStartOption + EventOption +} + +// SpanEndEventOption are options that can be used at the end of a span, or with an event. +type SpanEndEventOption interface { + SpanEndOption + EventOption +} + +type attributeOption []attribute.KeyValue + +func (o attributeOption) applySpan(c SpanConfig) SpanConfig { + c.attributes = append(c.attributes, []attribute.KeyValue(o)...) + return c +} +func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } +func (o attributeOption) applyEvent(c EventConfig) EventConfig { + c.attributes = append(c.attributes, []attribute.KeyValue(o)...) + return c +} + +var _ SpanStartEventOption = attributeOption{} + +// WithAttributes adds the attributes related to a span life-cycle event. +// These attributes are used to describe the work a Span represents when this +// option is provided to a Span's start or end events. Otherwise, these +// attributes provide additional information about the event being recorded +// (e.g. error, state change, processing progress, system event). +// +// If multiple of these options are passed the attributes of each successive +// option will extend the attributes instead of overwriting. There is no +// guarantee of uniqueness in the resulting attributes. +func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption { + return attributeOption(attributes) +} + +// SpanEventOption are options that can be used with an event or a span. +type SpanEventOption interface { + SpanOption + EventOption +} + +type timestampOption time.Time + +func (o timestampOption) applySpan(c SpanConfig) SpanConfig { + c.timestamp = time.Time(o) + return c +} +func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } +func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } +func (o timestampOption) applyEvent(c EventConfig) EventConfig { + c.timestamp = time.Time(o) + return c +} + +var _ SpanEventOption = timestampOption{} + +// WithTimestamp sets the time of a Span or Event life-cycle moment (e.g. +// started, stopped, errored). +func WithTimestamp(t time.Time) SpanEventOption { + return timestampOption(t) +} + +type stackTraceOption bool + +func (o stackTraceOption) applyEvent(c EventConfig) EventConfig { + c.stackTrace = bool(o) + return c +} + +func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig { + c.stackTrace = bool(o) + return c +} +func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } + +// WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false). +func WithStackTrace(b bool) SpanEndEventOption { + return stackTraceOption(b) +} + +// WithLinks adds links to a Span. The links are added to the existing Span +// links, i.e. this does not overwrite. Links with invalid span context are ignored. +func WithLinks(links ...Link) SpanStartOption { + return spanOptionFunc(func(cfg SpanConfig) SpanConfig { + cfg.links = append(cfg.links, links...) + return cfg + }) +} + +// WithNewRoot specifies that the Span should be treated as a root Span. Any +// existing parent span context will be ignored when defining the Span's trace +// identifiers. +func WithNewRoot() SpanStartOption { + return spanOptionFunc(func(cfg SpanConfig) SpanConfig { + cfg.newRoot = true + return cfg + }) +} + +// WithSpanKind sets the SpanKind of a Span. +func WithSpanKind(kind SpanKind) SpanStartOption { + return spanOptionFunc(func(cfg SpanConfig) SpanConfig { + cfg.spanKind = kind + return cfg + }) +} + +// WithInstrumentationVersion sets the instrumentation version. +func WithInstrumentationVersion(version string) TracerOption { + return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { + cfg.instrumentationVersion = version + return cfg + }) +} + +// WithInstrumentationAttributes sets the instrumentation attributes. +// +// The passed attributes will be de-duplicated. +func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption { + return tracerOptionFunc(func(config TracerConfig) TracerConfig { + config.attrs = attribute.NewSet(attr...) + return config + }) +} + +// WithSchemaURL sets the schema URL for the Tracer. +func WithSchemaURL(schemaURL string) TracerOption { + return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { + cfg.schemaURL = schemaURL + return cfg + }) +} diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go new file mode 100644 index 000000000..5650a174b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/context.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "go.opentelemetry.io/otel/trace" + +import "context" + +type traceContextKeyType int + +const currentSpanKey traceContextKeyType = iota + +// ContextWithSpan returns a copy of parent with span set as the current Span. +func ContextWithSpan(parent context.Context, span Span) context.Context { + return context.WithValue(parent, currentSpanKey, span) +} + +// ContextWithSpanContext returns a copy of parent with sc as the current +// Span. The Span implementation that wraps sc is non-recording and performs +// no operations other than to return sc as the SpanContext from the +// SpanContext method. +func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context { + return ContextWithSpan(parent, nonRecordingSpan{sc: sc}) +} + +// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicly +// as a remote SpanContext and as the current Span. The Span implementation +// that wraps rsc is non-recording and performs no operations other than to +// return rsc as the SpanContext from the SpanContext method. +func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context { + return ContextWithSpanContext(parent, rsc.WithRemote(true)) +} + +// SpanFromContext returns the current Span from ctx. +// +// If no Span is currently set in ctx an implementation of a Span that +// performs no operations is returned. +func SpanFromContext(ctx context.Context) Span { + if ctx == nil { + return noopSpanInstance + } + if span, ok := ctx.Value(currentSpanKey).(Span); ok { + return span + } + return noopSpanInstance +} + +// SpanContextFromContext returns the current Span's SpanContext. +func SpanContextFromContext(ctx context.Context) SpanContext { + return SpanFromContext(ctx).SpanContext() +} diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go new file mode 100644 index 000000000..d661c5d10 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/doc.go @@ -0,0 +1,119 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package trace provides an implementation of the tracing part of the +OpenTelemetry API. + +To participate in distributed traces a Span needs to be created for the +operation being performed as part of a traced workflow. In its simplest form: + + var tracer trace.Tracer + + func init() { + tracer = otel.Tracer("instrumentation/package/name") + } + + func operation(ctx context.Context) { + var span trace.Span + ctx, span = tracer.Start(ctx, "operation") + defer span.End() + // ... + } + +A Tracer is unique to the instrumentation and is used to create Spans. +Instrumentation should be designed to accept a TracerProvider from which it +can create its own unique Tracer. Alternatively, the registered global +TracerProvider from the go.opentelemetry.io/otel package can be used as +a default. + + const ( + name = "instrumentation/package/name" + version = "0.1.0" + ) + + type Instrumentation struct { + tracer trace.Tracer + } + + func NewInstrumentation(tp trace.TracerProvider) *Instrumentation { + if tp == nil { + tp = otel.TracerProvider() + } + return &Instrumentation{ + tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)), + } + } + + func operation(ctx context.Context, inst *Instrumentation) { + var span trace.Span + ctx, span = inst.tracer.Start(ctx, "operation") + defer span.End() + // ... + } + +# API Implementations + +This package does not conform to the standard Go versioning policy; all of its +interfaces may have methods added to them without a package major version bump. +This non-standard API evolution could surprise an uninformed implementation +author. They could unknowingly build their implementation in a way that would +result in a runtime panic for their users that update to the new API. + +The API is designed to help inform an instrumentation author about this +non-standard API evolution. It requires them to choose a default behavior for +unimplemented interface methods. There are three behavior choices they can +make: + + - Compilation failure + - Panic + - Default to another implementation + +All interfaces in this API embed a corresponding interface from +[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default +behavior of their implementations to be a compilation failure, signaling to +their users they need to update to the latest version of that implementation, +they need to embed the corresponding interface from +[go.opentelemetry.io/otel/trace/embedded] in their implementation. For +example, + + import "go.opentelemetry.io/otel/trace/embedded" + + type TracerProvider struct { + embedded.TracerProvider + // ... + } + +If an author wants the default behavior of their implementations to panic, they +can embed the API interface directly. + + import "go.opentelemetry.io/otel/trace" + + type TracerProvider struct { + trace.TracerProvider + // ... + } + +This option is not recommended. It will lead to publishing packages that +contain runtime panics when users update to newer versions of +[go.opentelemetry.io/otel/trace], which may be done with a trasitive +dependency. + +Finally, an author can embed another implementation in theirs. The embedded +implementation will be used for methods not defined by the author. For example, +an author who wants to default to silently dropping the call can use +[go.opentelemetry.io/otel/trace/noop]: + + import "go.opentelemetry.io/otel/trace/noop" + + type TracerProvider struct { + noop.TracerProvider + // ... + } + +It is strongly recommended that authors only embed +[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior. +That implementation is the only one OpenTelemetry authors can guarantee will +fully implement all the API interfaces when a user updates their API. +*/ +package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/README.md b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md new file mode 100644 index 000000000..7754a239e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md @@ -0,0 +1,3 @@ +# Trace Embedded + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded) diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go new file mode 100644 index 000000000..3e359a00b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package embedded provides interfaces embedded within the [OpenTelemetry +// trace API]. +// +// Implementers of the [OpenTelemetry trace API] can embed the relevant type +// from this package into their implementation directly. Doing so will result +// in a compilation error for users when the [OpenTelemetry trace API] is +// extended (which is something that can happen without a major version bump of +// the API package). +// +// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace +package embedded // import "go.opentelemetry.io/otel/trace/embedded" + +// TracerProvider is embedded in +// [go.opentelemetry.io/otel/trace.TracerProvider]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to +// experience a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type TracerProvider interface{ tracerProvider() } + +// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a +// compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface +// is extended (which is something that can happen without a major version bump +// of the API package). +type Tracer interface{ tracer() } + +// Span is embedded in [go.opentelemetry.io/otel/trace.Span]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a +// compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is +// extended (which is something that can happen without a major version bump of +// the API package). +type Span interface{ span() } diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go new file mode 100644 index 000000000..c00221e7b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "go.opentelemetry.io/otel/trace" + +// nonRecordingSpan is a minimal implementation of a Span that wraps a +// SpanContext. It performs no operations other than to return the wrapped +// SpanContext. +type nonRecordingSpan struct { + noopSpan + + sc SpanContext +} + +// SpanContext returns the wrapped SpanContext. +func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go new file mode 100644 index 000000000..ca20e9997 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/noop.go @@ -0,0 +1,85 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "context" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace/embedded" +) + +// NewNoopTracerProvider returns an implementation of TracerProvider that +// performs no operations. The Tracer and Spans created from the returned +// TracerProvider also perform no operations. +// +// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider] +// instead. +func NewNoopTracerProvider() TracerProvider { + return noopTracerProvider{} +} + +type noopTracerProvider struct{ embedded.TracerProvider } + +var _ TracerProvider = noopTracerProvider{} + +// Tracer returns noop implementation of Tracer. +func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer { + return noopTracer{} +} + +// noopTracer is an implementation of Tracer that performs no operations. +type noopTracer struct{ embedded.Tracer } + +var _ Tracer = noopTracer{} + +// Start carries forward a non-recording Span, if one is present in the context, otherwise it +// creates a no-op Span. +func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption) (context.Context, Span) { + span := SpanFromContext(ctx) + if _, ok := span.(nonRecordingSpan); !ok { + // span is likely already a noopSpan, but let's be sure + span = noopSpanInstance + } + return ContextWithSpan(ctx, span), span +} + +// noopSpan is an implementation of Span that performs no operations. +type noopSpan struct{ embedded.Span } + +var noopSpanInstance Span = noopSpan{} + +// SpanContext returns an empty span context. +func (noopSpan) SpanContext() SpanContext { return SpanContext{} } + +// IsRecording always returns false. +func (noopSpan) IsRecording() bool { return false } + +// SetStatus does nothing. +func (noopSpan) SetStatus(codes.Code, string) {} + +// SetError does nothing. +func (noopSpan) SetError(bool) {} + +// SetAttributes does nothing. +func (noopSpan) SetAttributes(...attribute.KeyValue) {} + +// End does nothing. +func (noopSpan) End(...SpanEndOption) {} + +// RecordError does nothing. +func (noopSpan) RecordError(error, ...EventOption) {} + +// AddEvent does nothing. +func (noopSpan) AddEvent(string, ...EventOption) {} + +// AddLink does nothing. +func (noopSpan) AddLink(Link) {} + +// SetName does nothing. +func (noopSpan) SetName(string) {} + +// TracerProvider returns a no-op TracerProvider. +func (noopSpan) TracerProvider() TracerProvider { return noopTracerProvider{} } diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go new file mode 100644 index 000000000..28877d4ab --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/trace.go @@ -0,0 +1,572 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "bytes" + "context" + "encoding/hex" + "encoding/json" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace/embedded" +) + +const ( + // FlagsSampled is a bitmask with the sampled bit set. A SpanContext + // with the sampling bit set means the span is sampled. + FlagsSampled = TraceFlags(0x01) + + errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase" + + errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32" + errNilTraceID errorConst = "trace-id can't be all zero" + + errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16" + errNilSpanID errorConst = "span-id can't be all zero" +) + +type errorConst string + +func (e errorConst) Error() string { + return string(e) +} + +// TraceID is a unique identity of a trace. +// nolint:revive // revive complains about stutter of `trace.TraceID`. +type TraceID [16]byte + +var ( + nilTraceID TraceID + _ json.Marshaler = nilTraceID +) + +// IsValid checks whether the trace TraceID is valid. A valid trace ID does +// not consist of zeros only. +func (t TraceID) IsValid() bool { + return !bytes.Equal(t[:], nilTraceID[:]) +} + +// MarshalJSON implements a custom marshal function to encode TraceID +// as a hex string. +func (t TraceID) MarshalJSON() ([]byte, error) { + return json.Marshal(t.String()) +} + +// String returns the hex string representation form of a TraceID. +func (t TraceID) String() string { + return hex.EncodeToString(t[:]) +} + +// SpanID is a unique identity of a span in a trace. +type SpanID [8]byte + +var ( + nilSpanID SpanID + _ json.Marshaler = nilSpanID +) + +// IsValid checks whether the SpanID is valid. A valid SpanID does not consist +// of zeros only. +func (s SpanID) IsValid() bool { + return !bytes.Equal(s[:], nilSpanID[:]) +} + +// MarshalJSON implements a custom marshal function to encode SpanID +// as a hex string. +func (s SpanID) MarshalJSON() ([]byte, error) { + return json.Marshal(s.String()) +} + +// String returns the hex string representation form of a SpanID. +func (s SpanID) String() string { + return hex.EncodeToString(s[:]) +} + +// TraceIDFromHex returns a TraceID from a hex string if it is compliant with +// the W3C trace-context specification. See more at +// https://www.w3.org/TR/trace-context/#trace-id +// nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`. +func TraceIDFromHex(h string) (TraceID, error) { + t := TraceID{} + if len(h) != 32 { + return t, errInvalidTraceIDLength + } + + if err := decodeHex(h, t[:]); err != nil { + return t, err + } + + if !t.IsValid() { + return t, errNilTraceID + } + return t, nil +} + +// SpanIDFromHex returns a SpanID from a hex string if it is compliant +// with the w3c trace-context specification. +// See more at https://www.w3.org/TR/trace-context/#parent-id +func SpanIDFromHex(h string) (SpanID, error) { + s := SpanID{} + if len(h) != 16 { + return s, errInvalidSpanIDLength + } + + if err := decodeHex(h, s[:]); err != nil { + return s, err + } + + if !s.IsValid() { + return s, errNilSpanID + } + return s, nil +} + +func decodeHex(h string, b []byte) error { + for _, r := range h { + switch { + case 'a' <= r && r <= 'f': + continue + case '0' <= r && r <= '9': + continue + default: + return errInvalidHexID + } + } + + decoded, err := hex.DecodeString(h) + if err != nil { + return err + } + + copy(b, decoded) + return nil +} + +// TraceFlags contains flags that can be set on a SpanContext. +type TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`. + +// IsSampled returns if the sampling bit is set in the TraceFlags. +func (tf TraceFlags) IsSampled() bool { + return tf&FlagsSampled == FlagsSampled +} + +// WithSampled sets the sampling bit in a new copy of the TraceFlags. +func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive // sampled is not a control flag. + if sampled { + return tf | FlagsSampled + } + + return tf &^ FlagsSampled +} + +// MarshalJSON implements a custom marshal function to encode TraceFlags +// as a hex string. +func (tf TraceFlags) MarshalJSON() ([]byte, error) { + return json.Marshal(tf.String()) +} + +// String returns the hex string representation form of TraceFlags. +func (tf TraceFlags) String() string { + return hex.EncodeToString([]byte{byte(tf)}[:]) +} + +// SpanContextConfig contains mutable fields usable for constructing +// an immutable SpanContext. +type SpanContextConfig struct { + TraceID TraceID + SpanID SpanID + TraceFlags TraceFlags + TraceState TraceState + Remote bool +} + +// NewSpanContext constructs a SpanContext using values from the provided +// SpanContextConfig. +func NewSpanContext(config SpanContextConfig) SpanContext { + return SpanContext{ + traceID: config.TraceID, + spanID: config.SpanID, + traceFlags: config.TraceFlags, + traceState: config.TraceState, + remote: config.Remote, + } +} + +// SpanContext contains identifying trace information about a Span. +type SpanContext struct { + traceID TraceID + spanID SpanID + traceFlags TraceFlags + traceState TraceState + remote bool +} + +var _ json.Marshaler = SpanContext{} + +// IsValid returns if the SpanContext is valid. A valid span context has a +// valid TraceID and SpanID. +func (sc SpanContext) IsValid() bool { + return sc.HasTraceID() && sc.HasSpanID() +} + +// IsRemote indicates whether the SpanContext represents a remotely-created Span. +func (sc SpanContext) IsRemote() bool { + return sc.remote +} + +// WithRemote returns a copy of sc with the Remote property set to remote. +func (sc SpanContext) WithRemote(remote bool) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: sc.spanID, + traceFlags: sc.traceFlags, + traceState: sc.traceState, + remote: remote, + } +} + +// TraceID returns the TraceID from the SpanContext. +func (sc SpanContext) TraceID() TraceID { + return sc.traceID +} + +// HasTraceID checks if the SpanContext has a valid TraceID. +func (sc SpanContext) HasTraceID() bool { + return sc.traceID.IsValid() +} + +// WithTraceID returns a new SpanContext with the TraceID replaced. +func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext { + return SpanContext{ + traceID: traceID, + spanID: sc.spanID, + traceFlags: sc.traceFlags, + traceState: sc.traceState, + remote: sc.remote, + } +} + +// SpanID returns the SpanID from the SpanContext. +func (sc SpanContext) SpanID() SpanID { + return sc.spanID +} + +// HasSpanID checks if the SpanContext has a valid SpanID. +func (sc SpanContext) HasSpanID() bool { + return sc.spanID.IsValid() +} + +// WithSpanID returns a new SpanContext with the SpanID replaced. +func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: spanID, + traceFlags: sc.traceFlags, + traceState: sc.traceState, + remote: sc.remote, + } +} + +// TraceFlags returns the flags from the SpanContext. +func (sc SpanContext) TraceFlags() TraceFlags { + return sc.traceFlags +} + +// IsSampled returns if the sampling bit is set in the SpanContext's TraceFlags. +func (sc SpanContext) IsSampled() bool { + return sc.traceFlags.IsSampled() +} + +// WithTraceFlags returns a new SpanContext with the TraceFlags replaced. +func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: sc.spanID, + traceFlags: flags, + traceState: sc.traceState, + remote: sc.remote, + } +} + +// TraceState returns the TraceState from the SpanContext. +func (sc SpanContext) TraceState() TraceState { + return sc.traceState +} + +// WithTraceState returns a new SpanContext with the TraceState replaced. +func (sc SpanContext) WithTraceState(state TraceState) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: sc.spanID, + traceFlags: sc.traceFlags, + traceState: state, + remote: sc.remote, + } +} + +// Equal is a predicate that determines whether two SpanContext values are equal. +func (sc SpanContext) Equal(other SpanContext) bool { + return sc.traceID == other.traceID && + sc.spanID == other.spanID && + sc.traceFlags == other.traceFlags && + sc.traceState.String() == other.traceState.String() && + sc.remote == other.remote +} + +// MarshalJSON implements a custom marshal function to encode a SpanContext. +func (sc SpanContext) MarshalJSON() ([]byte, error) { + return json.Marshal(SpanContextConfig{ + TraceID: sc.traceID, + SpanID: sc.spanID, + TraceFlags: sc.traceFlags, + TraceState: sc.traceState, + Remote: sc.remote, + }) +} + +// Span is the individual component of a trace. It represents a single named +// and timed operation of a workflow that is traced. A Tracer is used to +// create a Span and it is then up to the operation the Span represents to +// properly end the Span when the operation itself ends. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Span interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Span + + // End completes the Span. The Span is considered complete and ready to be + // delivered through the rest of the telemetry pipeline after this method + // is called. Therefore, updates to the Span are not allowed after this + // method has been called. + End(options ...SpanEndOption) + + // AddEvent adds an event with the provided name and options. + AddEvent(name string, options ...EventOption) + + // AddLink adds a link. + // Adding links at span creation using WithLinks is preferred to calling AddLink + // later, for contexts that are available during span creation, because head + // sampling decisions can only consider information present during span creation. + AddLink(link Link) + + // IsRecording returns the recording state of the Span. It will return + // true if the Span is active and events can be recorded. + IsRecording() bool + + // RecordError will record err as an exception span event for this span. An + // additional call to SetStatus is required if the Status of the Span should + // be set to Error, as this method does not change the Span status. If this + // span is not being recorded or err is nil then this method does nothing. + RecordError(err error, options ...EventOption) + + // SpanContext returns the SpanContext of the Span. The returned SpanContext + // is usable even after the End method has been called for the Span. + SpanContext() SpanContext + + // SetStatus sets the status of the Span in the form of a code and a + // description, provided the status hasn't already been set to a higher + // value before (OK > Error > Unset). The description is only included in a + // status when the code is for an error. + SetStatus(code codes.Code, description string) + + // SetName sets the Span name. + SetName(name string) + + // SetAttributes sets kv as attributes of the Span. If a key from kv + // already exists for an attribute of the Span it will be overwritten with + // the value contained in kv. + SetAttributes(kv ...attribute.KeyValue) + + // TracerProvider returns a TracerProvider that can be used to generate + // additional Spans on the same telemetry pipeline as the current Span. + TracerProvider() TracerProvider +} + +// Link is the relationship between two Spans. The relationship can be within +// the same Trace or across different Traces. +// +// For example, a Link is used in the following situations: +// +// 1. Batch Processing: A batch of operations may contain operations +// associated with one or more traces/spans. Since there can only be one +// parent SpanContext, a Link is used to keep reference to the +// SpanContext of all operations in the batch. +// 2. Public Endpoint: A SpanContext for an in incoming client request on a +// public endpoint should be considered untrusted. In such a case, a new +// trace with its own identity and sampling decision needs to be created, +// but this new trace needs to be related to the original trace in some +// form. A Link is used to keep reference to the original SpanContext and +// track the relationship. +type Link struct { + // SpanContext of the linked Span. + SpanContext SpanContext + + // Attributes describe the aspects of the link. + Attributes []attribute.KeyValue +} + +// LinkFromContext returns a link encapsulating the SpanContext in the provided ctx. +func LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link { + return Link{ + SpanContext: SpanContextFromContext(ctx), + Attributes: attrs, + } +} + +// SpanKind is the role a Span plays in a Trace. +type SpanKind int + +// As a convenience, these match the proto definition, see +// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129 +// +// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()` +// to coerce a span kind to a valid value. +const ( + // SpanKindUnspecified is an unspecified SpanKind and is not a valid + // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal + // if it is received. + SpanKindUnspecified SpanKind = 0 + // SpanKindInternal is a SpanKind for a Span that represents an internal + // operation within an application. + SpanKindInternal SpanKind = 1 + // SpanKindServer is a SpanKind for a Span that represents the operation + // of handling a request from a client. + SpanKindServer SpanKind = 2 + // SpanKindClient is a SpanKind for a Span that represents the operation + // of client making a request to a server. + SpanKindClient SpanKind = 3 + // SpanKindProducer is a SpanKind for a Span that represents the operation + // of a producer sending a message to a message broker. Unlike + // SpanKindClient and SpanKindServer, there is often no direct + // relationship between this kind of Span and a SpanKindConsumer kind. A + // SpanKindProducer Span will end once the message is accepted by the + // message broker which might not overlap with the processing of that + // message. + SpanKindProducer SpanKind = 4 + // SpanKindConsumer is a SpanKind for a Span that represents the operation + // of a consumer receiving a message from a message broker. Like + // SpanKindProducer Spans, there is often no direct relationship between + // this Span and the Span that produced the message. + SpanKindConsumer SpanKind = 5 +) + +// ValidateSpanKind returns a valid span kind value. This will coerce +// invalid values into the default value, SpanKindInternal. +func ValidateSpanKind(spanKind SpanKind) SpanKind { + switch spanKind { + case SpanKindInternal, + SpanKindServer, + SpanKindClient, + SpanKindProducer, + SpanKindConsumer: + // valid + return spanKind + default: + return SpanKindInternal + } +} + +// String returns the specified name of the SpanKind in lower-case. +func (sk SpanKind) String() string { + switch sk { + case SpanKindInternal: + return "internal" + case SpanKindServer: + return "server" + case SpanKindClient: + return "client" + case SpanKindProducer: + return "producer" + case SpanKindConsumer: + return "consumer" + default: + return "unspecified" + } +} + +// Tracer is the creator of Spans. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Tracer interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Tracer + + // Start creates a span and a context.Context containing the newly-created span. + // + // If the context.Context provided in `ctx` contains a Span then the newly-created + // Span will be a child of that span, otherwise it will be a root span. This behavior + // can be overridden by providing `WithNewRoot()` as a SpanOption, causing the + // newly-created Span to be a root span even if `ctx` contains a Span. + // + // When creating a Span it is recommended to provide all known span attributes using + // the `WithAttributes()` SpanOption as samplers will only have access to the + // attributes provided when a Span is created. + // + // Any Span that is created MUST also be ended. This is the responsibility of the user. + // Implementations of this API may leak memory or other resources if Spans are not ended. + Start(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span) +} + +// TracerProvider provides Tracers that are used by instrumentation code to +// trace computational workflows. +// +// A TracerProvider is the collection destination of all Spans from Tracers it +// provides, it represents a unique telemetry collection pipeline. How that +// pipeline is defined, meaning how those Spans are collected, processed, and +// where they are exported, depends on its implementation. Instrumentation +// authors do not need to define this implementation, rather just use the +// provided Tracers to instrument code. +// +// Commonly, instrumentation code will accept a TracerProvider implementation +// at runtime from its users or it can simply use the globally registered one +// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider). +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type TracerProvider interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.TracerProvider + + // Tracer returns a unique Tracer scoped to be used by instrumentation code + // to trace computational workflows. The scope and identity of that + // instrumentation code is uniquely defined by the name and options passed. + // + // The passed name needs to uniquely identify instrumentation code. + // Therefore, it is recommended that name is the Go package name of the + // library providing instrumentation (note: not the code being + // instrumented). Instrumentation libraries can have multiple versions, + // therefore, the WithInstrumentationVersion option should be used to + // distinguish these different codebases. Additionally, instrumentation + // libraries may sometimes use traces to communicate different domains of + // workflow data (i.e. using spans to communicate workflow events only). If + // this is the case, the WithScopeAttributes option should be used to + // uniquely identify Tracers that handle the different domains of workflow + // data. + // + // If the same name and options are passed multiple times, the same Tracer + // will be returned (it is up to the implementation if this will be the + // same underlying instance of that Tracer or not). It is not necessary to + // call this multiple times with the same name and options to get an + // up-to-date Tracer. All implementations will ensure any TracerProvider + // configuration changes are propagated to all provided Tracers. + // + // If name is empty, then an implementation defined default name will be + // used instead. + // + // This method is safe to call concurrently. + Tracer(name string, options ...TracerOption) Tracer +} diff --git a/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/vendor/go.opentelemetry.io/otel/trace/tracestate.go new file mode 100644 index 000000000..20b5cf243 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/tracestate.go @@ -0,0 +1,320 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "encoding/json" + "fmt" + "strings" +) + +const ( + maxListMembers = 32 + + listDelimiters = "," + memberDelimiter = "=" + + errInvalidKey errorConst = "invalid tracestate key" + errInvalidValue errorConst = "invalid tracestate value" + errInvalidMember errorConst = "invalid tracestate list-member" + errMemberNumber errorConst = "too many list-members in tracestate" + errDuplicate errorConst = "duplicate list-member in tracestate" +) + +type member struct { + Key string + Value string +} + +// according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) ) +// means (chr = %x20-2B / %x2D-3C / %x3E-7E) . +func checkValueChar(v byte) bool { + return v >= '\x20' && v <= '\x7e' && v != '\x2c' && v != '\x3d' +} + +// according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) . +func checkValueLast(v byte) bool { + return v >= '\x21' && v <= '\x7e' && v != '\x2c' && v != '\x3d' +} + +// based on the W3C Trace Context specification +// +// value = (0*255(chr)) nblk-chr +// nblk-chr = %x21-2B / %x2D-3C / %x3E-7E +// chr = %x20 / nblk-chr +// +// see https://www.w3.org/TR/trace-context-1/#value +func checkValue(val string) bool { + n := len(val) + if n == 0 || n > 256 { + return false + } + for i := 0; i < n-1; i++ { + if !checkValueChar(val[i]) { + return false + } + } + return checkValueLast(val[n-1]) +} + +func checkKeyRemain(key string) bool { + // ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) + for _, v := range key { + if isAlphaNum(byte(v)) { + continue + } + switch v { + case '_', '-', '*', '/': + continue + } + return false + } + return true +} + +// according to +// +// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) +// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) +// +// param n is remain part length, should be 255 in simple-key or 13 in system-id. +func checkKeyPart(key string, n int) bool { + if len(key) == 0 { + return false + } + first := key[0] // key's first char + ret := len(key[1:]) <= n + ret = ret && first >= 'a' && first <= 'z' + return ret && checkKeyRemain(key[1:]) +} + +func isAlphaNum(c byte) bool { + if c >= 'a' && c <= 'z' { + return true + } + return c >= '0' && c <= '9' +} + +// according to +// +// tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) +// +// param n is remain part length, should be 240 exactly. +func checkKeyTenant(key string, n int) bool { + if len(key) == 0 { + return false + } + return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:]) +} + +// based on the W3C Trace Context specification +// +// key = simple-key / multi-tenant-key +// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) +// multi-tenant-key = tenant-id "@" system-id +// tenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) +// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) +// lcalpha = %x61-7A ; a-z +// +// see https://www.w3.org/TR/trace-context-1/#tracestate-header. +func checkKey(key string) bool { + tenant, system, ok := strings.Cut(key, "@") + if !ok { + return checkKeyPart(key, 255) + } + return checkKeyTenant(tenant, 240) && checkKeyPart(system, 13) +} + +func newMember(key, value string) (member, error) { + if !checkKey(key) { + return member{}, errInvalidKey + } + if !checkValue(value) { + return member{}, errInvalidValue + } + return member{Key: key, Value: value}, nil +} + +func parseMember(m string) (member, error) { + key, val, ok := strings.Cut(m, memberDelimiter) + if !ok { + return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) + } + key = strings.TrimLeft(key, " \t") + val = strings.TrimRight(val, " \t") + result, e := newMember(key, val) + if e != nil { + return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) + } + return result, nil +} + +// String encodes member into a string compliant with the W3C Trace Context +// specification. +func (m member) String() string { + return m.Key + "=" + m.Value +} + +// TraceState provides additional vendor-specific trace identification +// information across different distributed tracing systems. It represents an +// immutable list consisting of key/value pairs, each pair is referred to as a +// list-member. +// +// TraceState conforms to the W3C Trace Context specification +// (https://www.w3.org/TR/trace-context-1). All operations that create or copy +// a TraceState do so by validating all input and will only produce TraceState +// that conform to the specification. Specifically, this means that all +// list-member's key/value pairs are valid, no duplicate list-members exist, +// and the maximum number of list-members (32) is not exceeded. +type TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState` + // list is the members in order. + list []member +} + +var _ json.Marshaler = TraceState{} + +// ParseTraceState attempts to decode a TraceState from the passed +// string. It returns an error if the input is invalid according to the W3C +// Trace Context specification. +func ParseTraceState(ts string) (TraceState, error) { + if ts == "" { + return TraceState{}, nil + } + + wrapErr := func(err error) error { + return fmt.Errorf("failed to parse tracestate: %w", err) + } + + var members []member + found := make(map[string]struct{}) + for ts != "" { + var memberStr string + memberStr, ts, _ = strings.Cut(ts, listDelimiters) + if len(memberStr) == 0 { + continue + } + + m, err := parseMember(memberStr) + if err != nil { + return TraceState{}, wrapErr(err) + } + + if _, ok := found[m.Key]; ok { + return TraceState{}, wrapErr(errDuplicate) + } + found[m.Key] = struct{}{} + + members = append(members, m) + if n := len(members); n > maxListMembers { + return TraceState{}, wrapErr(errMemberNumber) + } + } + + return TraceState{list: members}, nil +} + +// MarshalJSON marshals the TraceState into JSON. +func (ts TraceState) MarshalJSON() ([]byte, error) { + return json.Marshal(ts.String()) +} + +// String encodes the TraceState into a string compliant with the W3C +// Trace Context specification. The returned string will be invalid if the +// TraceState contains any invalid members. +func (ts TraceState) String() string { + if len(ts.list) == 0 { + return "" + } + var n int + n += len(ts.list) // member delimiters: '=' + n += len(ts.list) - 1 // list delimiters: ',' + for _, mem := range ts.list { + n += len(mem.Key) + n += len(mem.Value) + } + + var sb strings.Builder + sb.Grow(n) + _, _ = sb.WriteString(ts.list[0].Key) + _ = sb.WriteByte('=') + _, _ = sb.WriteString(ts.list[0].Value) + for i := 1; i < len(ts.list); i++ { + _ = sb.WriteByte(listDelimiters[0]) + _, _ = sb.WriteString(ts.list[i].Key) + _ = sb.WriteByte('=') + _, _ = sb.WriteString(ts.list[i].Value) + } + return sb.String() +} + +// Get returns the value paired with key from the corresponding TraceState +// list-member if it exists, otherwise an empty string is returned. +func (ts TraceState) Get(key string) string { + for _, member := range ts.list { + if member.Key == key { + return member.Value + } + } + + return "" +} + +// Insert adds a new list-member defined by the key/value pair to the +// TraceState. If a list-member already exists for the given key, that +// list-member's value is updated. The new or updated list-member is always +// moved to the beginning of the TraceState as specified by the W3C Trace +// Context specification. +// +// If key or value are invalid according to the W3C Trace Context +// specification an error is returned with the original TraceState. +// +// If adding a new list-member means the TraceState would have more members +// then is allowed, the new list-member will be inserted and the right-most +// list-member will be dropped in the returned TraceState. +func (ts TraceState) Insert(key, value string) (TraceState, error) { + m, err := newMember(key, value) + if err != nil { + return ts, err + } + n := len(ts.list) + found := n + for i := range ts.list { + if ts.list[i].Key == key { + found = i + } + } + cTS := TraceState{} + if found == n && n < maxListMembers { + cTS.list = make([]member, n+1) + } else { + cTS.list = make([]member, n) + } + cTS.list[0] = m + // When the number of members exceeds capacity, drop the "right-most". + copy(cTS.list[1:], ts.list[0:found]) + if found < n { + copy(cTS.list[1+found:], ts.list[found+1:]) + } + return cTS, nil +} + +// Delete returns a copy of the TraceState with the list-member identified by +// key removed. +func (ts TraceState) Delete(key string) TraceState { + members := make([]member, ts.Len()) + copy(members, ts.list) + for i, member := range ts.list { + if member.Key == key { + members = append(members[:i], members[i+1:]...) + // TraceState should contain no duplicate members. + break + } + } + return TraceState{list: members} +} + +// Len returns the number of list-members in the TraceState. +func (ts TraceState) Len() int { + return len(ts.list) +} diff --git a/vendor/go.opentelemetry.io/otel/verify_examples.sh b/vendor/go.opentelemetry.io/otel/verify_examples.sh new file mode 100644 index 000000000..e57bf57fc --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/verify_examples.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +cd $(dirname $0) +TOOLS_DIR=$(pwd)/.tools + +if [ -z "${GOPATH}" ] ; then + printf "GOPATH is not defined.\n" + exit -1 +fi + +if [ ! -d "${GOPATH}" ] ; then + printf "GOPATH ${GOPATH} is invalid \n" + exit -1 +fi + +# Pre-requisites +if ! git diff --quiet; then \ + git status + printf "\n\nError: working tree is not clean\n" + exit -1 +fi + +if [ "$(git tag --contains $(git log -1 --pretty=format:"%H"))" = "" ] ; then + printf "$(git log -1)" + printf "\n\nError: HEAD is not pointing to a tagged version" +fi + +make ${TOOLS_DIR}/gojq + +DIR_TMP="${GOPATH}/src/oteltmp/" +rm -rf $DIR_TMP +mkdir -p $DIR_TMP + +printf "Copy examples to ${DIR_TMP}\n" +cp -a ./example ${DIR_TMP} + +# Update go.mod files +printf "Update go.mod: rename module and remove replace\n" + +PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | egrep 'example' | sed 's/^\.\///' | sort) + +for dir in $PACKAGE_DIRS; do + printf " Update go.mod for $dir\n" + (cd "${DIR_TMP}/${dir}" && \ + # replaces is ("mod1" "mod2" …) + replaces=($(go mod edit -json | ${TOOLS_DIR}/gojq '.Replace[].Old.Path')) && \ + # strip double quotes + replaces=("${replaces[@]%\"}") && \ + replaces=("${replaces[@]#\"}") && \ + # make an array (-dropreplace=mod1 -dropreplace=mod2 …) + dropreplaces=("${replaces[@]/#/-dropreplace=}") && \ + go mod edit -module "oteltmp/${dir}" "${dropreplaces[@]}" && \ + go mod tidy) +done +printf "Update done:\n\n" + +# Build directories that contain main package. These directories are different than +# directories that contain go.mod files. +printf "Build examples:\n" +EXAMPLES=$(./get_main_pkgs.sh ./example) +for ex in $EXAMPLES; do + printf " Build $ex in ${DIR_TMP}/${ex}\n" + (cd "${DIR_TMP}/${ex}" && \ + go build .) +done + +# Cleanup +printf "Remove copied files.\n" +rm -rf $DIR_TMP diff --git a/vendor/go.opentelemetry.io/otel/verify_readmes.sh b/vendor/go.opentelemetry.io/otel/verify_readmes.sh new file mode 100644 index 000000000..1e87855ee --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/verify_readmes.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +dirs=$(find . -type d -not -path "*/internal*" -not -path "*/test*" -not -path "*/example*" -not -path "*/.*" | sort) + +missingReadme=false +for dir in $dirs; do + if [ ! -f "$dir/README.md" ]; then + echo "couldn't find README.md for $dir" + missingReadme=true + fi +done + +if [ "$missingReadme" = true ] ; then + echo "Error: some READMEs couldn't be found." + exit 1 +fi diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go new file mode 100644 index 000000000..ab2896052 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otel // import "go.opentelemetry.io/otel" + +// Version is the current release version of OpenTelemetry in use. +func Version() string { + return "1.28.0" +} diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml new file mode 100644 index 000000000..241cfc82a --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -0,0 +1,49 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +module-sets: + stable-v1: + version: v1.28.0 + modules: + - go.opentelemetry.io/otel + - go.opentelemetry.io/otel/bridge/opencensus + - go.opentelemetry.io/otel/bridge/opencensus/test + - go.opentelemetry.io/otel/bridge/opentracing + - go.opentelemetry.io/otel/bridge/opentracing/test + - go.opentelemetry.io/otel/example/dice + - go.opentelemetry.io/otel/example/namedtracer + - go.opentelemetry.io/otel/example/opencensus + - go.opentelemetry.io/otel/example/otel-collector + - go.opentelemetry.io/otel/example/passthrough + - go.opentelemetry.io/otel/example/zipkin + - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc + - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp + - go.opentelemetry.io/otel/exporters/otlp/otlptrace + - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc + - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp + - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric + - go.opentelemetry.io/otel/exporters/stdout/stdouttrace + - go.opentelemetry.io/otel/exporters/zipkin + - go.opentelemetry.io/otel/metric + - go.opentelemetry.io/otel/sdk + - go.opentelemetry.io/otel/sdk/metric + - go.opentelemetry.io/otel/trace + experimental-metrics: + version: v0.50.0 + modules: + - go.opentelemetry.io/otel/example/prometheus + - go.opentelemetry.io/otel/exporters/prometheus + experimental-logs: + version: v0.4.0 + modules: + - go.opentelemetry.io/otel/log + - go.opentelemetry.io/otel/sdk/log + - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp + - go.opentelemetry.io/otel/exporters/stdout/stdoutlog + experimental-schema: + version: v0.0.8 + modules: + - go.opentelemetry.io/otel/schema +excluded-modules: + - go.opentelemetry.io/otel/internal/tools + - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc diff --git a/vendor/golang.org/x/crypto/bcrypt/base64.go b/vendor/golang.org/x/crypto/bcrypt/base64.go new file mode 100644 index 000000000..fc3116090 --- /dev/null +++ b/vendor/golang.org/x/crypto/bcrypt/base64.go @@ -0,0 +1,35 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bcrypt + +import "encoding/base64" + +const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + +var bcEncoding = base64.NewEncoding(alphabet) + +func base64Encode(src []byte) []byte { + n := bcEncoding.EncodedLen(len(src)) + dst := make([]byte, n) + bcEncoding.Encode(dst, src) + for dst[n-1] == '=' { + n-- + } + return dst[:n] +} + +func base64Decode(src []byte) ([]byte, error) { + numOfEquals := 4 - (len(src) % 4) + for i := 0; i < numOfEquals; i++ { + src = append(src, '=') + } + + dst := make([]byte, bcEncoding.DecodedLen(len(src))) + n, err := bcEncoding.Decode(dst, src) + if err != nil { + return nil, err + } + return dst[:n], nil +} diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go new file mode 100644 index 000000000..dc9311870 --- /dev/null +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -0,0 +1,304 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing +// algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf +package bcrypt + +// The code is a port of Provos and Mazières's C implementation. +import ( + "crypto/rand" + "crypto/subtle" + "errors" + "fmt" + "io" + "strconv" + + "golang.org/x/crypto/blowfish" +) + +const ( + MinCost int = 4 // the minimum allowable cost as passed in to GenerateFromPassword + MaxCost int = 31 // the maximum allowable cost as passed in to GenerateFromPassword + DefaultCost int = 10 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword +) + +// The error returned from CompareHashAndPassword when a password and hash do +// not match. +var ErrMismatchedHashAndPassword = errors.New("crypto/bcrypt: hashedPassword is not the hash of the given password") + +// The error returned from CompareHashAndPassword when a hash is too short to +// be a bcrypt hash. +var ErrHashTooShort = errors.New("crypto/bcrypt: hashedSecret too short to be a bcrypted password") + +// The error returned from CompareHashAndPassword when a hash was created with +// a bcrypt algorithm newer than this implementation. +type HashVersionTooNewError byte + +func (hv HashVersionTooNewError) Error() string { + return fmt.Sprintf("crypto/bcrypt: bcrypt algorithm version '%c' requested is newer than current version '%c'", byte(hv), majorVersion) +} + +// The error returned from CompareHashAndPassword when a hash starts with something other than '$' +type InvalidHashPrefixError byte + +func (ih InvalidHashPrefixError) Error() string { + return fmt.Sprintf("crypto/bcrypt: bcrypt hashes must start with '$', but hashedSecret started with '%c'", byte(ih)) +} + +type InvalidCostError int + +func (ic InvalidCostError) Error() string { + return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), MinCost, MaxCost) +} + +const ( + majorVersion = '2' + minorVersion = 'a' + maxSaltSize = 16 + maxCryptedHashSize = 23 + encodedSaltSize = 22 + encodedHashSize = 31 + minHashSize = 59 +) + +// magicCipherData is an IV for the 64 Blowfish encryption calls in +// bcrypt(). It's the string "OrpheanBeholderScryDoubt" in big-endian bytes. +var magicCipherData = []byte{ + 0x4f, 0x72, 0x70, 0x68, + 0x65, 0x61, 0x6e, 0x42, + 0x65, 0x68, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x53, + 0x63, 0x72, 0x79, 0x44, + 0x6f, 0x75, 0x62, 0x74, +} + +type hashed struct { + hash []byte + salt []byte + cost int // allowed range is MinCost to MaxCost + major byte + minor byte +} + +// ErrPasswordTooLong is returned when the password passed to +// GenerateFromPassword is too long (i.e. > 72 bytes). +var ErrPasswordTooLong = errors.New("bcrypt: password length exceeds 72 bytes") + +// GenerateFromPassword returns the bcrypt hash of the password at the given +// cost. If the cost given is less than MinCost, the cost will be set to +// DefaultCost, instead. Use CompareHashAndPassword, as defined in this package, +// to compare the returned hashed password with its cleartext version. +// GenerateFromPassword does not accept passwords longer than 72 bytes, which +// is the longest password bcrypt will operate on. +func GenerateFromPassword(password []byte, cost int) ([]byte, error) { + if len(password) > 72 { + return nil, ErrPasswordTooLong + } + p, err := newFromPassword(password, cost) + if err != nil { + return nil, err + } + return p.Hash(), nil +} + +// CompareHashAndPassword compares a bcrypt hashed password with its possible +// plaintext equivalent. Returns nil on success, or an error on failure. +func CompareHashAndPassword(hashedPassword, password []byte) error { + p, err := newFromHash(hashedPassword) + if err != nil { + return err + } + + otherHash, err := bcrypt(password, p.cost, p.salt) + if err != nil { + return err + } + + otherP := &hashed{otherHash, p.salt, p.cost, p.major, p.minor} + if subtle.ConstantTimeCompare(p.Hash(), otherP.Hash()) == 1 { + return nil + } + + return ErrMismatchedHashAndPassword +} + +// Cost returns the hashing cost used to create the given hashed +// password. When, in the future, the hashing cost of a password system needs +// to be increased in order to adjust for greater computational power, this +// function allows one to establish which passwords need to be updated. +func Cost(hashedPassword []byte) (int, error) { + p, err := newFromHash(hashedPassword) + if err != nil { + return 0, err + } + return p.cost, nil +} + +func newFromPassword(password []byte, cost int) (*hashed, error) { + if cost < MinCost { + cost = DefaultCost + } + p := new(hashed) + p.major = majorVersion + p.minor = minorVersion + + err := checkCost(cost) + if err != nil { + return nil, err + } + p.cost = cost + + unencodedSalt := make([]byte, maxSaltSize) + _, err = io.ReadFull(rand.Reader, unencodedSalt) + if err != nil { + return nil, err + } + + p.salt = base64Encode(unencodedSalt) + hash, err := bcrypt(password, p.cost, p.salt) + if err != nil { + return nil, err + } + p.hash = hash + return p, err +} + +func newFromHash(hashedSecret []byte) (*hashed, error) { + if len(hashedSecret) < minHashSize { + return nil, ErrHashTooShort + } + p := new(hashed) + n, err := p.decodeVersion(hashedSecret) + if err != nil { + return nil, err + } + hashedSecret = hashedSecret[n:] + n, err = p.decodeCost(hashedSecret) + if err != nil { + return nil, err + } + hashedSecret = hashedSecret[n:] + + // The "+2" is here because we'll have to append at most 2 '=' to the salt + // when base64 decoding it in expensiveBlowfishSetup(). + p.salt = make([]byte, encodedSaltSize, encodedSaltSize+2) + copy(p.salt, hashedSecret[:encodedSaltSize]) + + hashedSecret = hashedSecret[encodedSaltSize:] + p.hash = make([]byte, len(hashedSecret)) + copy(p.hash, hashedSecret) + + return p, nil +} + +func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) { + cipherData := make([]byte, len(magicCipherData)) + copy(cipherData, magicCipherData) + + c, err := expensiveBlowfishSetup(password, uint32(cost), salt) + if err != nil { + return nil, err + } + + for i := 0; i < 24; i += 8 { + for j := 0; j < 64; j++ { + c.Encrypt(cipherData[i:i+8], cipherData[i:i+8]) + } + } + + // Bug compatibility with C bcrypt implementations. We only encode 23 of + // the 24 bytes encrypted. + hsh := base64Encode(cipherData[:maxCryptedHashSize]) + return hsh, nil +} + +func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) { + csalt, err := base64Decode(salt) + if err != nil { + return nil, err + } + + // Bug compatibility with C bcrypt implementations. They use the trailing + // NULL in the key string during expansion. + // We copy the key to prevent changing the underlying array. + ckey := append(key[:len(key):len(key)], 0) + + c, err := blowfish.NewSaltedCipher(ckey, csalt) + if err != nil { + return nil, err + } + + var i, rounds uint64 + rounds = 1 << cost + for i = 0; i < rounds; i++ { + blowfish.ExpandKey(ckey, c) + blowfish.ExpandKey(csalt, c) + } + + return c, nil +} + +func (p *hashed) Hash() []byte { + arr := make([]byte, 60) + arr[0] = '$' + arr[1] = p.major + n := 2 + if p.minor != 0 { + arr[2] = p.minor + n = 3 + } + arr[n] = '$' + n++ + copy(arr[n:], []byte(fmt.Sprintf("%02d", p.cost))) + n += 2 + arr[n] = '$' + n++ + copy(arr[n:], p.salt) + n += encodedSaltSize + copy(arr[n:], p.hash) + n += encodedHashSize + return arr[:n] +} + +func (p *hashed) decodeVersion(sbytes []byte) (int, error) { + if sbytes[0] != '$' { + return -1, InvalidHashPrefixError(sbytes[0]) + } + if sbytes[1] > majorVersion { + return -1, HashVersionTooNewError(sbytes[1]) + } + p.major = sbytes[1] + n := 3 + if sbytes[2] != '$' { + p.minor = sbytes[2] + n++ + } + return n, nil +} + +// sbytes should begin where decodeVersion left off. +func (p *hashed) decodeCost(sbytes []byte) (int, error) { + cost, err := strconv.Atoi(string(sbytes[0:2])) + if err != nil { + return -1, err + } + err = checkCost(cost) + if err != nil { + return -1, err + } + p.cost = cost + return 3, nil +} + +func (p *hashed) String() string { + return fmt.Sprintf("&{hash: %#v, salt: %#v, cost: %d, major: %c, minor: %c}", string(p.hash), p.salt, p.cost, p.major, p.minor) +} + +func checkCost(cost int) error { + if cost < MinCost || cost > MaxCost { + return InvalidCostError(cost) + } + return nil +} diff --git a/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go new file mode 100644 index 000000000..016e90215 --- /dev/null +++ b/vendor/golang.org/x/crypto/cast5/cast5.go @@ -0,0 +1,536 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package cast5 implements CAST5, as defined in RFC 2144. +// +// CAST5 is a legacy cipher and its short block size makes it vulnerable to +// birthday bound attacks (see https://sweet32.info). It should only be used +// where compatibility with legacy systems, not security, is the goal. +// +// Deprecated: any new system should use AES (from crypto/aes, if necessary in +// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from +// golang.org/x/crypto/chacha20poly1305). +package cast5 + +import ( + "errors" + "math/bits" +) + +const BlockSize = 8 +const KeySize = 16 + +type Cipher struct { + masking [16]uint32 + rotate [16]uint8 +} + +func NewCipher(key []byte) (c *Cipher, err error) { + if len(key) != KeySize { + return nil, errors.New("CAST5: keys must be 16 bytes") + } + + c = new(Cipher) + c.keySchedule(key) + return +} + +func (c *Cipher) BlockSize() int { + return BlockSize +} + +func (c *Cipher) Encrypt(dst, src []byte) { + l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) + r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) + + l, r = r, l^f1(r, c.masking[0], c.rotate[0]) + l, r = r, l^f2(r, c.masking[1], c.rotate[1]) + l, r = r, l^f3(r, c.masking[2], c.rotate[2]) + l, r = r, l^f1(r, c.masking[3], c.rotate[3]) + + l, r = r, l^f2(r, c.masking[4], c.rotate[4]) + l, r = r, l^f3(r, c.masking[5], c.rotate[5]) + l, r = r, l^f1(r, c.masking[6], c.rotate[6]) + l, r = r, l^f2(r, c.masking[7], c.rotate[7]) + + l, r = r, l^f3(r, c.masking[8], c.rotate[8]) + l, r = r, l^f1(r, c.masking[9], c.rotate[9]) + l, r = r, l^f2(r, c.masking[10], c.rotate[10]) + l, r = r, l^f3(r, c.masking[11], c.rotate[11]) + + l, r = r, l^f1(r, c.masking[12], c.rotate[12]) + l, r = r, l^f2(r, c.masking[13], c.rotate[13]) + l, r = r, l^f3(r, c.masking[14], c.rotate[14]) + l, r = r, l^f1(r, c.masking[15], c.rotate[15]) + + dst[0] = uint8(r >> 24) + dst[1] = uint8(r >> 16) + dst[2] = uint8(r >> 8) + dst[3] = uint8(r) + dst[4] = uint8(l >> 24) + dst[5] = uint8(l >> 16) + dst[6] = uint8(l >> 8) + dst[7] = uint8(l) +} + +func (c *Cipher) Decrypt(dst, src []byte) { + l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) + r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) + + l, r = r, l^f1(r, c.masking[15], c.rotate[15]) + l, r = r, l^f3(r, c.masking[14], c.rotate[14]) + l, r = r, l^f2(r, c.masking[13], c.rotate[13]) + l, r = r, l^f1(r, c.masking[12], c.rotate[12]) + + l, r = r, l^f3(r, c.masking[11], c.rotate[11]) + l, r = r, l^f2(r, c.masking[10], c.rotate[10]) + l, r = r, l^f1(r, c.masking[9], c.rotate[9]) + l, r = r, l^f3(r, c.masking[8], c.rotate[8]) + + l, r = r, l^f2(r, c.masking[7], c.rotate[7]) + l, r = r, l^f1(r, c.masking[6], c.rotate[6]) + l, r = r, l^f3(r, c.masking[5], c.rotate[5]) + l, r = r, l^f2(r, c.masking[4], c.rotate[4]) + + l, r = r, l^f1(r, c.masking[3], c.rotate[3]) + l, r = r, l^f3(r, c.masking[2], c.rotate[2]) + l, r = r, l^f2(r, c.masking[1], c.rotate[1]) + l, r = r, l^f1(r, c.masking[0], c.rotate[0]) + + dst[0] = uint8(r >> 24) + dst[1] = uint8(r >> 16) + dst[2] = uint8(r >> 8) + dst[3] = uint8(r) + dst[4] = uint8(l >> 24) + dst[5] = uint8(l >> 16) + dst[6] = uint8(l >> 8) + dst[7] = uint8(l) +} + +type keyScheduleA [4][7]uint8 +type keyScheduleB [4][5]uint8 + +// keyScheduleRound contains the magic values for a round of the key schedule. +// The keyScheduleA deals with the lines like: +// z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8] +// Conceptually, both x and z are in the same array, x first. The first +// element describes which word of this array gets written to and the +// second, which word gets read. So, for the line above, it's "4, 0", because +// it's writing to the first word of z, which, being after x, is word 4, and +// reading from the first word of x: word 0. +// +// Next are the indexes into the S-boxes. Now the array is treated as bytes. So +// "xD" is 0xd. The first byte of z is written as "16 + 0", just to be clear +// that it's z that we're indexing. +// +// keyScheduleB deals with lines like: +// K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2] +// "K1" is ignored because key words are always written in order. So the five +// elements are the S-box indexes. They use the same form as in keyScheduleA, +// above. + +type keyScheduleRound struct{} +type keySchedule []keyScheduleRound + +var schedule = []struct { + a keyScheduleA + b keyScheduleB +}{ + { + keyScheduleA{ + {4, 0, 0xd, 0xf, 0xc, 0xe, 0x8}, + {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, + {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, + {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, + }, + keyScheduleB{ + {16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2}, + {16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6}, + {16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9}, + {16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc}, + }, + }, + { + keyScheduleA{ + {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, + {1, 4, 0, 2, 1, 3, 16 + 2}, + {2, 5, 7, 6, 5, 4, 16 + 1}, + {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, + }, + keyScheduleB{ + {3, 2, 0xc, 0xd, 8}, + {1, 0, 0xe, 0xf, 0xd}, + {7, 6, 8, 9, 3}, + {5, 4, 0xa, 0xb, 7}, + }, + }, + { + keyScheduleA{ + {4, 0, 0xd, 0xf, 0xc, 0xe, 8}, + {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, + {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, + {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, + }, + keyScheduleB{ + {16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9}, + {16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc}, + {16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2}, + {16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6}, + }, + }, + { + keyScheduleA{ + {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, + {1, 4, 0, 2, 1, 3, 16 + 2}, + {2, 5, 7, 6, 5, 4, 16 + 1}, + {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, + }, + keyScheduleB{ + {8, 9, 7, 6, 3}, + {0xa, 0xb, 5, 4, 7}, + {0xc, 0xd, 3, 2, 8}, + {0xe, 0xf, 1, 0, 0xd}, + }, + }, +} + +func (c *Cipher) keySchedule(in []byte) { + var t [8]uint32 + var k [32]uint32 + + for i := 0; i < 4; i++ { + j := i * 4 + t[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3]) + } + + x := []byte{6, 7, 4, 5} + ki := 0 + + for half := 0; half < 2; half++ { + for _, round := range schedule { + for j := 0; j < 4; j++ { + var a [7]uint8 + copy(a[:], round.a[j][:]) + w := t[a[1]] + w ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff] + w ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff] + w ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff] + w ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff] + w ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff] + t[a[0]] = w + } + + for j := 0; j < 4; j++ { + var b [5]uint8 + copy(b[:], round.b[j][:]) + w := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff] + w ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff] + w ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff] + w ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff] + w ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff] + k[ki] = w + ki++ + } + } + } + + for i := 0; i < 16; i++ { + c.masking[i] = k[i] + c.rotate[i] = uint8(k[16+i] & 0x1f) + } +} + +// These are the three 'f' functions. See RFC 2144, section 2.2. +func f1(d, m uint32, r uint8) uint32 { + t := m + d + I := bits.RotateLeft32(t, int(r)) + return ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff] +} + +func f2(d, m uint32, r uint8) uint32 { + t := m ^ d + I := bits.RotateLeft32(t, int(r)) + return ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff] +} + +func f3(d, m uint32, r uint8) uint32 { + t := m - d + I := bits.RotateLeft32(t, int(r)) + return ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff] +} + +var sBox = [8][256]uint32{ + { + 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949, + 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e, + 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d, + 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0, + 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7, + 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935, + 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d, + 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50, + 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe, + 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3, + 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167, + 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291, + 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779, + 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2, + 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511, + 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d, + 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5, + 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324, + 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c, + 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc, + 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d, + 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96, + 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a, + 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d, + 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd, + 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6, + 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9, + 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872, + 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c, + 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e, + 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9, + 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf, + }, + { + 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651, + 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3, + 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb, + 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806, + 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b, + 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359, + 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b, + 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c, + 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34, + 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb, + 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd, + 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860, + 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b, + 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304, + 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b, + 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf, + 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c, + 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13, + 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f, + 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6, + 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6, + 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58, + 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906, + 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d, + 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6, + 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4, + 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6, + 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f, + 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249, + 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa, + 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9, + 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1, + }, + { + 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90, + 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5, + 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e, + 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240, + 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5, + 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b, + 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71, + 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04, + 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82, + 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15, + 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2, + 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176, + 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148, + 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc, + 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341, + 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e, + 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51, + 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f, + 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a, + 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b, + 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b, + 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5, + 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45, + 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536, + 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc, + 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0, + 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69, + 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2, + 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49, + 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d, + 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a, + 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783, + }, + { + 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1, + 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf, + 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15, + 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121, + 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25, + 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5, + 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb, + 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5, + 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d, + 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6, + 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23, + 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003, + 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6, + 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119, + 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24, + 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a, + 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79, + 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df, + 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26, + 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab, + 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7, + 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417, + 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2, + 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2, + 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a, + 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919, + 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef, + 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876, + 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab, + 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04, + 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282, + 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2, + }, + { + 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f, + 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a, + 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff, + 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02, + 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a, + 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7, + 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9, + 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981, + 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774, + 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655, + 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2, + 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910, + 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1, + 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da, + 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049, + 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f, + 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba, + 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be, + 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3, + 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840, + 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4, + 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2, + 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7, + 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5, + 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e, + 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e, + 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801, + 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad, + 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0, + 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20, + 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8, + 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4, + }, + { + 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac, + 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138, + 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367, + 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98, + 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072, + 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3, + 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd, + 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8, + 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9, + 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54, + 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387, + 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc, + 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf, + 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf, + 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f, + 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289, + 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950, + 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f, + 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b, + 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be, + 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13, + 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976, + 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0, + 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891, + 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da, + 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc, + 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084, + 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25, + 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121, + 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5, + 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd, + 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f, + }, + { + 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f, + 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de, + 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43, + 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19, + 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2, + 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516, + 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88, + 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816, + 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756, + 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a, + 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264, + 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688, + 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28, + 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3, + 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7, + 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06, + 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033, + 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a, + 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566, + 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509, + 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962, + 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e, + 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c, + 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c, + 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285, + 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301, + 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be, + 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767, + 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647, + 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914, + 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c, + 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3, + }, + { + 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5, + 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc, + 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd, + 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d, + 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2, + 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862, + 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc, + 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c, + 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e, + 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039, + 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8, + 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42, + 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5, + 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472, + 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225, + 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c, + 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb, + 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054, + 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70, + 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc, + 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c, + 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3, + 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4, + 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101, + 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f, + 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e, + 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a, + 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c, + 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384, + 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c, + 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82, + 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e, + }, +} diff --git a/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/golang.org/x/crypto/openpgp/armor/armor.go new file mode 100644 index 000000000..e664d127c --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/armor/armor.go @@ -0,0 +1,233 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is +// very similar to PEM except that it has an additional CRC checksum. +// +// Deprecated: this package is unmaintained except for security fixes. New +// applications should consider a more focused, modern alternative to OpenPGP +// for their specific task. If you are required to interoperate with OpenPGP +// systems and need a maintained package, consider a community fork. +// See https://golang.org/issue/44226. +package armor + +import ( + "bufio" + "bytes" + "encoding/base64" + "io" + + "golang.org/x/crypto/openpgp/errors" +) + +// A Block represents an OpenPGP armored structure. +// +// The encoded form is: +// +// -----BEGIN Type----- +// Headers +// +// base64-encoded Bytes +// '=' base64 encoded checksum +// -----END Type----- +// +// where Headers is a possibly empty sequence of Key: Value lines. +// +// Since the armored data can be very large, this package presents a streaming +// interface. +type Block struct { + Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE"). + Header map[string]string // Optional headers. + Body io.Reader // A Reader from which the contents can be read + lReader lineReader + oReader openpgpReader +} + +var ArmorCorrupt error = errors.StructuralError("armor invalid") + +const crc24Init = 0xb704ce +const crc24Poly = 0x1864cfb +const crc24Mask = 0xffffff + +// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1 +func crc24(crc uint32, d []byte) uint32 { + for _, b := range d { + crc ^= uint32(b) << 16 + for i := 0; i < 8; i++ { + crc <<= 1 + if crc&0x1000000 != 0 { + crc ^= crc24Poly + } + } + } + return crc +} + +var armorStart = []byte("-----BEGIN ") +var armorEnd = []byte("-----END ") +var armorEndOfLine = []byte("-----") + +// lineReader wraps a line based reader. It watches for the end of an armor +// block and records the expected CRC value. +type lineReader struct { + in *bufio.Reader + buf []byte + eof bool + crc uint32 + crcSet bool +} + +func (l *lineReader) Read(p []byte) (n int, err error) { + if l.eof { + return 0, io.EOF + } + + if len(l.buf) > 0 { + n = copy(p, l.buf) + l.buf = l.buf[n:] + return + } + + line, isPrefix, err := l.in.ReadLine() + if err != nil { + return + } + if isPrefix { + return 0, ArmorCorrupt + } + + if bytes.HasPrefix(line, armorEnd) { + l.eof = true + return 0, io.EOF + } + + if len(line) == 5 && line[0] == '=' { + // This is the checksum line + var expectedBytes [3]byte + var m int + m, err = base64.StdEncoding.Decode(expectedBytes[0:], line[1:]) + if m != 3 || err != nil { + return + } + l.crc = uint32(expectedBytes[0])<<16 | + uint32(expectedBytes[1])<<8 | + uint32(expectedBytes[2]) + + line, _, err = l.in.ReadLine() + if err != nil && err != io.EOF { + return + } + if !bytes.HasPrefix(line, armorEnd) { + return 0, ArmorCorrupt + } + + l.eof = true + l.crcSet = true + return 0, io.EOF + } + + if len(line) > 96 { + return 0, ArmorCorrupt + } + + n = copy(p, line) + bytesToSave := len(line) - n + if bytesToSave > 0 { + if cap(l.buf) < bytesToSave { + l.buf = make([]byte, 0, bytesToSave) + } + l.buf = l.buf[0:bytesToSave] + copy(l.buf, line[n:]) + } + + return +} + +// openpgpReader passes Read calls to the underlying base64 decoder, but keeps +// a running CRC of the resulting data and checks the CRC against the value +// found by the lineReader at EOF. +type openpgpReader struct { + lReader *lineReader + b64Reader io.Reader + currentCRC uint32 +} + +func (r *openpgpReader) Read(p []byte) (n int, err error) { + n, err = r.b64Reader.Read(p) + r.currentCRC = crc24(r.currentCRC, p[:n]) + + if err == io.EOF && r.lReader.crcSet && r.lReader.crc != r.currentCRC&crc24Mask { + return 0, ArmorCorrupt + } + + return +} + +// Decode reads a PGP armored block from the given Reader. It will ignore +// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The +// given Reader is not usable after calling this function: an arbitrary amount +// of data may have been read past the end of the block. +func Decode(in io.Reader) (p *Block, err error) { + r := bufio.NewReaderSize(in, 100) + var line []byte + ignoreNext := false + +TryNextBlock: + p = nil + + // Skip leading garbage + for { + ignoreThis := ignoreNext + line, ignoreNext, err = r.ReadLine() + if err != nil { + return + } + if ignoreNext || ignoreThis { + continue + } + line = bytes.TrimSpace(line) + if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) { + break + } + } + + p = new(Block) + p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)]) + p.Header = make(map[string]string) + nextIsContinuation := false + var lastKey string + + // Read headers + for { + isContinuation := nextIsContinuation + line, nextIsContinuation, err = r.ReadLine() + if err != nil { + p = nil + return + } + if isContinuation { + p.Header[lastKey] += string(line) + continue + } + line = bytes.TrimSpace(line) + if len(line) == 0 { + break + } + + i := bytes.Index(line, []byte(": ")) + if i == -1 { + goto TryNextBlock + } + lastKey = string(line[:i]) + p.Header[lastKey] = string(line[i+2:]) + } + + p.lReader.in = r + p.oReader.currentCRC = crc24Init + p.oReader.lReader = &p.lReader + p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader) + p.Body = &p.oReader + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/armor/encode.go b/vendor/golang.org/x/crypto/openpgp/armor/encode.go new file mode 100644 index 000000000..5b6e16c19 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/armor/encode.go @@ -0,0 +1,161 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package armor + +import ( + "encoding/base64" + "io" +) + +var armorHeaderSep = []byte(": ") +var blockEnd = []byte("\n=") +var newline = []byte("\n") +var armorEndOfLineOut = []byte("-----\n") + +// writeSlices writes its arguments to the given Writer. +func writeSlices(out io.Writer, slices ...[]byte) (err error) { + for _, s := range slices { + _, err = out.Write(s) + if err != nil { + return err + } + } + return +} + +// lineBreaker breaks data across several lines, all of the same byte length +// (except possibly the last). Lines are broken with a single '\n'. +type lineBreaker struct { + lineLength int + line []byte + used int + out io.Writer + haveWritten bool +} + +func newLineBreaker(out io.Writer, lineLength int) *lineBreaker { + return &lineBreaker{ + lineLength: lineLength, + line: make([]byte, lineLength), + used: 0, + out: out, + } +} + +func (l *lineBreaker) Write(b []byte) (n int, err error) { + n = len(b) + + if n == 0 { + return + } + + if l.used == 0 && l.haveWritten { + _, err = l.out.Write([]byte{'\n'}) + if err != nil { + return + } + } + + if l.used+len(b) < l.lineLength { + l.used += copy(l.line[l.used:], b) + return + } + + l.haveWritten = true + _, err = l.out.Write(l.line[0:l.used]) + if err != nil { + return + } + excess := l.lineLength - l.used + l.used = 0 + + _, err = l.out.Write(b[0:excess]) + if err != nil { + return + } + + _, err = l.Write(b[excess:]) + return +} + +func (l *lineBreaker) Close() (err error) { + if l.used > 0 { + _, err = l.out.Write(l.line[0:l.used]) + if err != nil { + return + } + } + + return +} + +// encoding keeps track of a running CRC24 over the data which has been written +// to it and outputs a OpenPGP checksum when closed, followed by an armor +// trailer. +// +// It's built into a stack of io.Writers: +// +// encoding -> base64 encoder -> lineBreaker -> out +type encoding struct { + out io.Writer + breaker *lineBreaker + b64 io.WriteCloser + crc uint32 + blockType []byte +} + +func (e *encoding) Write(data []byte) (n int, err error) { + e.crc = crc24(e.crc, data) + return e.b64.Write(data) +} + +func (e *encoding) Close() (err error) { + err = e.b64.Close() + if err != nil { + return + } + e.breaker.Close() + + var checksumBytes [3]byte + checksumBytes[0] = byte(e.crc >> 16) + checksumBytes[1] = byte(e.crc >> 8) + checksumBytes[2] = byte(e.crc) + + var b64ChecksumBytes [4]byte + base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:]) + + return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine) +} + +// Encode returns a WriteCloser which will encode the data written to it in +// OpenPGP armor. +func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) { + bType := []byte(blockType) + err = writeSlices(out, armorStart, bType, armorEndOfLineOut) + if err != nil { + return + } + + for k, v := range headers { + err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline) + if err != nil { + return + } + } + + _, err = out.Write(newline) + if err != nil { + return + } + + e := &encoding{ + out: out, + breaker: newLineBreaker(out, 64), + crc: crc24Init, + blockType: bType, + } + e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker) + return e, nil +} diff --git a/vendor/golang.org/x/crypto/openpgp/canonical_text.go b/vendor/golang.org/x/crypto/openpgp/canonical_text.go new file mode 100644 index 000000000..e601e389f --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/canonical_text.go @@ -0,0 +1,59 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package openpgp + +import "hash" + +// NewCanonicalTextHash reformats text written to it into the canonical +// form and then applies the hash h. See RFC 4880, section 5.2.1. +func NewCanonicalTextHash(h hash.Hash) hash.Hash { + return &canonicalTextHash{h, 0} +} + +type canonicalTextHash struct { + h hash.Hash + s int +} + +var newline = []byte{'\r', '\n'} + +func (cth *canonicalTextHash) Write(buf []byte) (int, error) { + start := 0 + + for i, c := range buf { + switch cth.s { + case 0: + if c == '\r' { + cth.s = 1 + } else if c == '\n' { + cth.h.Write(buf[start:i]) + cth.h.Write(newline) + start = i + 1 + } + case 1: + cth.s = 0 + } + } + + cth.h.Write(buf[start:]) + return len(buf), nil +} + +func (cth *canonicalTextHash) Sum(in []byte) []byte { + return cth.h.Sum(in) +} + +func (cth *canonicalTextHash) Reset() { + cth.h.Reset() + cth.s = 0 +} + +func (cth *canonicalTextHash) Size() int { + return cth.h.Size() +} + +func (cth *canonicalTextHash) BlockSize() int { + return cth.h.BlockSize() +} diff --git a/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go b/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go new file mode 100644 index 000000000..cea48efdc --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go @@ -0,0 +1,424 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package clearsign generates and processes OpenPGP, clear-signed data. See +// RFC 4880, section 7. +// +// Clearsigned messages are cryptographically signed, but the contents of the +// message are kept in plaintext so that it can be read without special tools. +// +// Deprecated: this package is unmaintained except for security fixes. New +// applications should consider a more focused, modern alternative to OpenPGP +// for their specific task. If you are required to interoperate with OpenPGP +// systems and need a maintained package, consider a community fork. +// See https://golang.org/issue/44226. +package clearsign + +import ( + "bufio" + "bytes" + "crypto" + "fmt" + "hash" + "io" + "net/textproto" + "strconv" + "strings" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" +) + +// A Block represents a clearsigned message. A signature on a Block can +// be checked by passing Bytes into openpgp.CheckDetachedSignature. +type Block struct { + Headers textproto.MIMEHeader // Optional unverified Hash headers + Plaintext []byte // The original message text + Bytes []byte // The signed message + ArmoredSignature *armor.Block // The signature block +} + +// start is the marker which denotes the beginning of a clearsigned message. +var start = []byte("\n-----BEGIN PGP SIGNED MESSAGE-----") + +// dashEscape is prefixed to any lines that begin with a hyphen so that they +// can't be confused with endText. +var dashEscape = []byte("- ") + +// endText is a marker which denotes the end of the message and the start of +// an armored signature. +var endText = []byte("-----BEGIN PGP SIGNATURE-----") + +// end is a marker which denotes the end of the armored signature. +var end = []byte("\n-----END PGP SIGNATURE-----") + +var crlf = []byte("\r\n") +var lf = byte('\n') + +// getLine returns the first \r\n or \n delineated line from the given byte +// array. The line does not include the \r\n or \n. The remainder of the byte +// array (also not including the new line bytes) is also returned and this will +// always be smaller than the original argument. +func getLine(data []byte) (line, rest []byte) { + i := bytes.Index(data, []byte{'\n'}) + var j int + if i < 0 { + i = len(data) + j = i + } else { + j = i + 1 + if i > 0 && data[i-1] == '\r' { + i-- + } + } + return data[0:i], data[j:] +} + +// Decode finds the first clearsigned message in data and returns it, as well as +// the suffix of data which remains after the message. Any prefix data is +// discarded. +// +// If no message is found, or if the message is invalid, Decode returns nil and +// the whole data slice. The only allowed header type is Hash, and it is not +// verified against the signature hash. +func Decode(data []byte) (b *Block, rest []byte) { + // start begins with a newline. However, at the very beginning of + // the byte array, we'll accept the start string without it. + rest = data + if bytes.HasPrefix(data, start[1:]) { + rest = rest[len(start)-1:] + } else if i := bytes.Index(data, start); i >= 0 { + rest = rest[i+len(start):] + } else { + return nil, data + } + + // Consume the start line and check it does not have a suffix. + suffix, rest := getLine(rest) + if len(suffix) != 0 { + return nil, data + } + + var line []byte + b = &Block{ + Headers: make(textproto.MIMEHeader), + } + + // Next come a series of header lines. + for { + // This loop terminates because getLine's second result is + // always smaller than its argument. + if len(rest) == 0 { + return nil, data + } + // An empty line marks the end of the headers. + if line, rest = getLine(rest); len(line) == 0 { + break + } + + // Reject headers with control or Unicode characters. + if i := bytes.IndexFunc(line, func(r rune) bool { + return r < 0x20 || r > 0x7e + }); i != -1 { + return nil, data + } + + i := bytes.Index(line, []byte{':'}) + if i == -1 { + return nil, data + } + + key, val := string(line[0:i]), string(line[i+1:]) + key = strings.TrimSpace(key) + if key != "Hash" { + return nil, data + } + val = strings.TrimSpace(val) + b.Headers.Add(key, val) + } + + firstLine := true + for { + start := rest + + line, rest = getLine(rest) + if len(line) == 0 && len(rest) == 0 { + // No armored data was found, so this isn't a complete message. + return nil, data + } + if bytes.Equal(line, endText) { + // Back up to the start of the line because armor expects to see the + // header line. + rest = start + break + } + + // The final CRLF isn't included in the hash so we don't write it until + // we've seen the next line. + if firstLine { + firstLine = false + } else { + b.Bytes = append(b.Bytes, crlf...) + } + + if bytes.HasPrefix(line, dashEscape) { + line = line[2:] + } + line = bytes.TrimRight(line, " \t") + b.Bytes = append(b.Bytes, line...) + + b.Plaintext = append(b.Plaintext, line...) + b.Plaintext = append(b.Plaintext, lf) + } + + // We want to find the extent of the armored data (including any newlines at + // the end). + i := bytes.Index(rest, end) + if i == -1 { + return nil, data + } + i += len(end) + for i < len(rest) && (rest[i] == '\r' || rest[i] == '\n') { + i++ + } + armored := rest[:i] + rest = rest[i:] + + var err error + b.ArmoredSignature, err = armor.Decode(bytes.NewBuffer(armored)) + if err != nil { + return nil, data + } + + return b, rest +} + +// A dashEscaper is an io.WriteCloser which processes the body of a clear-signed +// message. The clear-signed message is written to buffered and a hash, suitable +// for signing, is maintained in h. +// +// When closed, an armored signature is created and written to complete the +// message. +type dashEscaper struct { + buffered *bufio.Writer + hashers []hash.Hash // one per key in privateKeys + hashType crypto.Hash + toHash io.Writer // writes to all the hashes in hashers + + atBeginningOfLine bool + isFirstLine bool + + whitespace []byte + byteBuf []byte // a one byte buffer to save allocations + + privateKeys []*packet.PrivateKey + config *packet.Config +} + +func (d *dashEscaper) Write(data []byte) (n int, err error) { + for _, b := range data { + d.byteBuf[0] = b + + if d.atBeginningOfLine { + // The final CRLF isn't included in the hash so we have to wait + // until this point (the start of the next line) before writing it. + if !d.isFirstLine { + d.toHash.Write(crlf) + } + d.isFirstLine = false + } + + // Any whitespace at the end of the line has to be removed so we + // buffer it until we find out whether there's more on this line. + if b == ' ' || b == '\t' || b == '\r' { + d.whitespace = append(d.whitespace, b) + d.atBeginningOfLine = false + continue + } + + if d.atBeginningOfLine { + // At the beginning of a line, hyphens have to be escaped. + if b == '-' { + // The signature isn't calculated over the dash-escaped text so + // the escape is only written to buffered. + if _, err = d.buffered.Write(dashEscape); err != nil { + return + } + d.toHash.Write(d.byteBuf) + d.atBeginningOfLine = false + } else if b == '\n' { + // Nothing to do because we delay writing CRLF to the hash. + } else { + d.toHash.Write(d.byteBuf) + d.atBeginningOfLine = false + } + if err = d.buffered.WriteByte(b); err != nil { + return + } + } else { + if b == '\n' { + // We got a raw \n. Drop any trailing whitespace and write a + // CRLF. + d.whitespace = d.whitespace[:0] + // We delay writing CRLF to the hash until the start of the + // next line. + if err = d.buffered.WriteByte(b); err != nil { + return + } + d.atBeginningOfLine = true + } else { + // Any buffered whitespace wasn't at the end of the line so + // we need to write it out. + if len(d.whitespace) > 0 { + d.toHash.Write(d.whitespace) + if _, err = d.buffered.Write(d.whitespace); err != nil { + return + } + d.whitespace = d.whitespace[:0] + } + d.toHash.Write(d.byteBuf) + if err = d.buffered.WriteByte(b); err != nil { + return + } + } + } + } + + n = len(data) + return +} + +func (d *dashEscaper) Close() (err error) { + if !d.atBeginningOfLine { + if err = d.buffered.WriteByte(lf); err != nil { + return + } + } + + out, err := armor.Encode(d.buffered, "PGP SIGNATURE", nil) + if err != nil { + return + } + + t := d.config.Now() + for i, k := range d.privateKeys { + sig := new(packet.Signature) + sig.SigType = packet.SigTypeText + sig.PubKeyAlgo = k.PubKeyAlgo + sig.Hash = d.hashType + sig.CreationTime = t + sig.IssuerKeyId = &k.KeyId + + if err = sig.Sign(d.hashers[i], k, d.config); err != nil { + return + } + if err = sig.Serialize(out); err != nil { + return + } + } + + if err = out.Close(); err != nil { + return + } + if err = d.buffered.Flush(); err != nil { + return + } + return +} + +// Encode returns a WriteCloser which will clear-sign a message with privateKey +// and write it to w. If config is nil, sensible defaults are used. +func Encode(w io.Writer, privateKey *packet.PrivateKey, config *packet.Config) (plaintext io.WriteCloser, err error) { + return EncodeMulti(w, []*packet.PrivateKey{privateKey}, config) +} + +// EncodeMulti returns a WriteCloser which will clear-sign a message with all the +// private keys indicated and write it to w. If config is nil, sensible defaults +// are used. +func EncodeMulti(w io.Writer, privateKeys []*packet.PrivateKey, config *packet.Config) (plaintext io.WriteCloser, err error) { + for _, k := range privateKeys { + if k.Encrypted { + return nil, errors.InvalidArgumentError(fmt.Sprintf("signing key %s is encrypted", k.KeyIdString())) + } + } + + hashType := config.Hash() + name := nameOfHash(hashType) + if len(name) == 0 { + return nil, errors.UnsupportedError("unknown hash type: " + strconv.Itoa(int(hashType))) + } + + if !hashType.Available() { + return nil, errors.UnsupportedError("unsupported hash type: " + strconv.Itoa(int(hashType))) + } + var hashers []hash.Hash + var ws []io.Writer + for range privateKeys { + h := hashType.New() + hashers = append(hashers, h) + ws = append(ws, h) + } + toHash := io.MultiWriter(ws...) + + buffered := bufio.NewWriter(w) + // start has a \n at the beginning that we don't want here. + if _, err = buffered.Write(start[1:]); err != nil { + return + } + if err = buffered.WriteByte(lf); err != nil { + return + } + if _, err = buffered.WriteString("Hash: "); err != nil { + return + } + if _, err = buffered.WriteString(name); err != nil { + return + } + if err = buffered.WriteByte(lf); err != nil { + return + } + if err = buffered.WriteByte(lf); err != nil { + return + } + + plaintext = &dashEscaper{ + buffered: buffered, + hashers: hashers, + hashType: hashType, + toHash: toHash, + + atBeginningOfLine: true, + isFirstLine: true, + + byteBuf: make([]byte, 1), + + privateKeys: privateKeys, + config: config, + } + + return +} + +// nameOfHash returns the OpenPGP name for the given hash, or the empty string +// if the name isn't known. See RFC 4880, section 9.4. +func nameOfHash(h crypto.Hash) string { + switch h { + case crypto.MD5: + return "MD5" + case crypto.SHA1: + return "SHA1" + case crypto.RIPEMD160: + return "RIPEMD160" + case crypto.SHA224: + return "SHA224" + case crypto.SHA256: + return "SHA256" + case crypto.SHA384: + return "SHA384" + case crypto.SHA512: + return "SHA512" + } + return "" +} diff --git a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go new file mode 100644 index 000000000..f922bdbca --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go @@ -0,0 +1,130 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package elgamal implements ElGamal encryption, suitable for OpenPGP, +// as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on +// Discrete Logarithms," IEEE Transactions on Information Theory, v. IT-31, +// n. 4, 1985, pp. 469-472. +// +// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it +// unsuitable for other protocols. RSA should be used in preference in any +// case. +// +// Deprecated: this package was only provided to support ElGamal encryption in +// OpenPGP. The golang.org/x/crypto/openpgp package is now deprecated (see +// https://golang.org/issue/44226), and ElGamal in the OpenPGP ecosystem has +// compatibility and security issues (see https://eprint.iacr.org/2021/923). +// Moreover, this package doesn't protect against side-channel attacks. +package elgamal + +import ( + "crypto/rand" + "crypto/subtle" + "errors" + "io" + "math/big" +) + +// PublicKey represents an ElGamal public key. +type PublicKey struct { + G, P, Y *big.Int +} + +// PrivateKey represents an ElGamal private key. +type PrivateKey struct { + PublicKey + X *big.Int +} + +// Encrypt encrypts the given message to the given public key. The result is a +// pair of integers. Errors can result from reading random, or because msg is +// too large to be encrypted to the public key. +func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) { + pLen := (pub.P.BitLen() + 7) / 8 + if len(msg) > pLen-11 { + err = errors.New("elgamal: message too long") + return + } + + // EM = 0x02 || PS || 0x00 || M + em := make([]byte, pLen-1) + em[0] = 2 + ps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):] + err = nonZeroRandomBytes(ps, random) + if err != nil { + return + } + em[len(em)-len(msg)-1] = 0 + copy(mm, msg) + + m := new(big.Int).SetBytes(em) + + k, err := rand.Int(random, pub.P) + if err != nil { + return + } + + c1 = new(big.Int).Exp(pub.G, k, pub.P) + s := new(big.Int).Exp(pub.Y, k, pub.P) + c2 = s.Mul(s, m) + c2.Mod(c2, pub.P) + + return +} + +// Decrypt takes two integers, resulting from an ElGamal encryption, and +// returns the plaintext of the message. An error can result only if the +// ciphertext is invalid. Users should keep in mind that this is a padding +// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can +// be used to break the cryptosystem. See “Chosen Ciphertext Attacks +// Against Protocols Based on the RSA Encryption Standard PKCS #1”, Daniel +// Bleichenbacher, Advances in Cryptology (Crypto '98), +func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) { + s := new(big.Int).Exp(c1, priv.X, priv.P) + if s.ModInverse(s, priv.P) == nil { + return nil, errors.New("elgamal: invalid private key") + } + s.Mul(s, c2) + s.Mod(s, priv.P) + em := s.Bytes() + + firstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2) + + // The remainder of the plaintext must be a string of non-zero random + // octets, followed by a 0, followed by the message. + // lookingForIndex: 1 iff we are still looking for the zero. + // index: the offset of the first zero byte. + var lookingForIndex, index int + lookingForIndex = 1 + + for i := 1; i < len(em); i++ { + equals0 := subtle.ConstantTimeByteEq(em[i], 0) + index = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index) + lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex) + } + + if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 { + return nil, errors.New("elgamal: decryption error") + } + return em[index+1:], nil +} + +// nonZeroRandomBytes fills the given slice with non-zero random octets. +func nonZeroRandomBytes(s []byte, rand io.Reader) (err error) { + _, err = io.ReadFull(rand, s) + if err != nil { + return + } + + for i := 0; i < len(s); i++ { + for s[i] == 0 { + _, err = io.ReadFull(rand, s[i:i+1]) + if err != nil { + return + } + } + } + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/errors/errors.go b/vendor/golang.org/x/crypto/openpgp/errors/errors.go new file mode 100644 index 000000000..a32874947 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/errors/errors.go @@ -0,0 +1,78 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package errors contains common error types for the OpenPGP packages. +// +// Deprecated: this package is unmaintained except for security fixes. New +// applications should consider a more focused, modern alternative to OpenPGP +// for their specific task. If you are required to interoperate with OpenPGP +// systems and need a maintained package, consider a community fork. +// See https://golang.org/issue/44226. +package errors + +import ( + "strconv" +) + +// A StructuralError is returned when OpenPGP data is found to be syntactically +// invalid. +type StructuralError string + +func (s StructuralError) Error() string { + return "openpgp: invalid data: " + string(s) +} + +// UnsupportedError indicates that, although the OpenPGP data is valid, it +// makes use of currently unimplemented features. +type UnsupportedError string + +func (s UnsupportedError) Error() string { + return "openpgp: unsupported feature: " + string(s) +} + +// InvalidArgumentError indicates that the caller is in error and passed an +// incorrect value. +type InvalidArgumentError string + +func (i InvalidArgumentError) Error() string { + return "openpgp: invalid argument: " + string(i) +} + +// SignatureError indicates that a syntactically valid signature failed to +// validate. +type SignatureError string + +func (b SignatureError) Error() string { + return "openpgp: invalid signature: " + string(b) +} + +type keyIncorrectError int + +func (ki keyIncorrectError) Error() string { + return "openpgp: incorrect key" +} + +var ErrKeyIncorrect error = keyIncorrectError(0) + +type unknownIssuerError int + +func (unknownIssuerError) Error() string { + return "openpgp: signature made by unknown entity" +} + +var ErrUnknownIssuer error = unknownIssuerError(0) + +type keyRevokedError int + +func (keyRevokedError) Error() string { + return "openpgp: signature made by revoked key" +} + +var ErrKeyRevoked error = keyRevokedError(0) + +type UnknownPacketTypeError uint8 + +func (upte UnknownPacketTypeError) Error() string { + return "openpgp: unknown packet type: " + strconv.Itoa(int(upte)) +} diff --git a/vendor/golang.org/x/crypto/openpgp/keys.go b/vendor/golang.org/x/crypto/openpgp/keys.go new file mode 100644 index 000000000..d62f787e9 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/keys.go @@ -0,0 +1,693 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package openpgp + +import ( + "crypto/rsa" + "io" + "time" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" +) + +// PublicKeyType is the armor type for a PGP public key. +var PublicKeyType = "PGP PUBLIC KEY BLOCK" + +// PrivateKeyType is the armor type for a PGP private key. +var PrivateKeyType = "PGP PRIVATE KEY BLOCK" + +// An Entity represents the components of an OpenPGP key: a primary public key +// (which must be a signing key), one or more identities claimed by that key, +// and zero or more subkeys, which may be encryption keys. +type Entity struct { + PrimaryKey *packet.PublicKey + PrivateKey *packet.PrivateKey + Identities map[string]*Identity // indexed by Identity.Name + Revocations []*packet.Signature + Subkeys []Subkey +} + +// An Identity represents an identity claimed by an Entity and zero or more +// assertions by other entities about that claim. +type Identity struct { + Name string // by convention, has the form "Full Name (comment) " + UserId *packet.UserId + SelfSignature *packet.Signature + Signatures []*packet.Signature +} + +// A Subkey is an additional public key in an Entity. Subkeys can be used for +// encryption. +type Subkey struct { + PublicKey *packet.PublicKey + PrivateKey *packet.PrivateKey + Sig *packet.Signature +} + +// A Key identifies a specific public key in an Entity. This is either the +// Entity's primary key or a subkey. +type Key struct { + Entity *Entity + PublicKey *packet.PublicKey + PrivateKey *packet.PrivateKey + SelfSignature *packet.Signature +} + +// A KeyRing provides access to public and private keys. +type KeyRing interface { + // KeysById returns the set of keys that have the given key id. + KeysById(id uint64) []Key + // KeysByIdUsage returns the set of keys with the given id + // that also meet the key usage given by requiredUsage. + // The requiredUsage is expressed as the bitwise-OR of + // packet.KeyFlag* values. + KeysByIdUsage(id uint64, requiredUsage byte) []Key + // DecryptionKeys returns all private keys that are valid for + // decryption. + DecryptionKeys() []Key +} + +// primaryIdentity returns the Identity marked as primary or the first identity +// if none are so marked. +func (e *Entity) primaryIdentity() *Identity { + var firstIdentity *Identity + for _, ident := range e.Identities { + if firstIdentity == nil { + firstIdentity = ident + } + if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { + return ident + } + } + return firstIdentity +} + +// encryptionKey returns the best candidate Key for encrypting a message to the +// given Entity. +func (e *Entity) encryptionKey(now time.Time) (Key, bool) { + candidateSubkey := -1 + + // Iterate the keys to find the newest key + var maxTime time.Time + for i, subkey := range e.Subkeys { + if subkey.Sig.FlagsValid && + subkey.Sig.FlagEncryptCommunications && + subkey.PublicKey.PubKeyAlgo.CanEncrypt() && + !subkey.Sig.KeyExpired(now) && + (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) { + candidateSubkey = i + maxTime = subkey.Sig.CreationTime + } + } + + if candidateSubkey != -1 { + subkey := e.Subkeys[candidateSubkey] + return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true + } + + // If we don't have any candidate subkeys for encryption and + // the primary key doesn't have any usage metadata then we + // assume that the primary key is ok. Or, if the primary key is + // marked as ok to encrypt to, then we can obviously use it. + i := e.primaryIdentity() + if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagEncryptCommunications && + e.PrimaryKey.PubKeyAlgo.CanEncrypt() && + !i.SelfSignature.KeyExpired(now) { + return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true + } + + // This Entity appears to be signing only. + return Key{}, false +} + +// signingKey return the best candidate Key for signing a message with this +// Entity. +func (e *Entity) signingKey(now time.Time) (Key, bool) { + candidateSubkey := -1 + + for i, subkey := range e.Subkeys { + if subkey.Sig.FlagsValid && + subkey.Sig.FlagSign && + subkey.PublicKey.PubKeyAlgo.CanSign() && + !subkey.Sig.KeyExpired(now) { + candidateSubkey = i + break + } + } + + if candidateSubkey != -1 { + subkey := e.Subkeys[candidateSubkey] + return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true + } + + // If we have no candidate subkey then we assume that it's ok to sign + // with the primary key. + i := e.primaryIdentity() + if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagSign && + !i.SelfSignature.KeyExpired(now) { + return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true + } + + return Key{}, false +} + +// An EntityList contains one or more Entities. +type EntityList []*Entity + +// KeysById returns the set of keys that have the given key id. +func (el EntityList) KeysById(id uint64) (keys []Key) { + for _, e := range el { + if e.PrimaryKey.KeyId == id { + var selfSig *packet.Signature + for _, ident := range e.Identities { + if selfSig == nil { + selfSig = ident.SelfSignature + } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { + selfSig = ident.SelfSignature + break + } + } + keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig}) + } + + for _, subKey := range e.Subkeys { + if subKey.PublicKey.KeyId == id { + keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) + } + } + } + return +} + +// KeysByIdUsage returns the set of keys with the given id that also meet +// the key usage given by requiredUsage. The requiredUsage is expressed as +// the bitwise-OR of packet.KeyFlag* values. +func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) { + for _, key := range el.KeysById(id) { + if len(key.Entity.Revocations) > 0 { + continue + } + + if key.SelfSignature.RevocationReason != nil { + continue + } + + if key.SelfSignature.FlagsValid && requiredUsage != 0 { + var usage byte + if key.SelfSignature.FlagCertify { + usage |= packet.KeyFlagCertify + } + if key.SelfSignature.FlagSign { + usage |= packet.KeyFlagSign + } + if key.SelfSignature.FlagEncryptCommunications { + usage |= packet.KeyFlagEncryptCommunications + } + if key.SelfSignature.FlagEncryptStorage { + usage |= packet.KeyFlagEncryptStorage + } + if usage&requiredUsage != requiredUsage { + continue + } + } + + keys = append(keys, key) + } + return +} + +// DecryptionKeys returns all private keys that are valid for decryption. +func (el EntityList) DecryptionKeys() (keys []Key) { + for _, e := range el { + for _, subKey := range e.Subkeys { + if subKey.PrivateKey != nil && (!subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) { + keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) + } + } + } + return +} + +// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file. +func ReadArmoredKeyRing(r io.Reader) (EntityList, error) { + block, err := armor.Decode(r) + if err == io.EOF { + return nil, errors.InvalidArgumentError("no armored data found") + } + if err != nil { + return nil, err + } + if block.Type != PublicKeyType && block.Type != PrivateKeyType { + return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type) + } + + return ReadKeyRing(block.Body) +} + +// ReadKeyRing reads one or more public/private keys. Unsupported keys are +// ignored as long as at least a single valid key is found. +func ReadKeyRing(r io.Reader) (el EntityList, err error) { + packets := packet.NewReader(r) + var lastUnsupportedError error + + for { + var e *Entity + e, err = ReadEntity(packets) + if err != nil { + // TODO: warn about skipped unsupported/unreadable keys + if _, ok := err.(errors.UnsupportedError); ok { + lastUnsupportedError = err + err = readToNextPublicKey(packets) + } else if _, ok := err.(errors.StructuralError); ok { + // Skip unreadable, badly-formatted keys + lastUnsupportedError = err + err = readToNextPublicKey(packets) + } + if err == io.EOF { + err = nil + break + } + if err != nil { + el = nil + break + } + } else { + el = append(el, e) + } + } + + if len(el) == 0 && err == nil { + err = lastUnsupportedError + } + return +} + +// readToNextPublicKey reads packets until the start of the entity and leaves +// the first packet of the new entity in the Reader. +func readToNextPublicKey(packets *packet.Reader) (err error) { + var p packet.Packet + for { + p, err = packets.Next() + if err == io.EOF { + return + } else if err != nil { + if _, ok := err.(errors.UnsupportedError); ok { + err = nil + continue + } + return + } + + if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey { + packets.Unread(p) + return + } + } +} + +// ReadEntity reads an entity (public key, identities, subkeys etc) from the +// given Reader. +func ReadEntity(packets *packet.Reader) (*Entity, error) { + e := new(Entity) + e.Identities = make(map[string]*Identity) + + p, err := packets.Next() + if err != nil { + return nil, err + } + + var ok bool + if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok { + if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok { + packets.Unread(p) + return nil, errors.StructuralError("first packet was not a public/private key") + } + e.PrimaryKey = &e.PrivateKey.PublicKey + } + + if !e.PrimaryKey.PubKeyAlgo.CanSign() { + return nil, errors.StructuralError("primary key cannot be used for signatures") + } + + var revocations []*packet.Signature +EachPacket: + for { + p, err := packets.Next() + if err == io.EOF { + break + } else if err != nil { + return nil, err + } + + switch pkt := p.(type) { + case *packet.UserId: + if err := addUserID(e, packets, pkt); err != nil { + return nil, err + } + case *packet.Signature: + if pkt.SigType == packet.SigTypeKeyRevocation { + revocations = append(revocations, pkt) + } else if pkt.SigType == packet.SigTypeDirectSignature { + // TODO: RFC4880 5.2.1 permits signatures + // directly on keys (eg. to bind additional + // revocation keys). + } + // Else, ignoring the signature as it does not follow anything + // we would know to attach it to. + case *packet.PrivateKey: + if pkt.IsSubkey == false { + packets.Unread(p) + break EachPacket + } + err = addSubkey(e, packets, &pkt.PublicKey, pkt) + if err != nil { + return nil, err + } + case *packet.PublicKey: + if pkt.IsSubkey == false { + packets.Unread(p) + break EachPacket + } + err = addSubkey(e, packets, pkt, nil) + if err != nil { + return nil, err + } + default: + // we ignore unknown packets + } + } + + if len(e.Identities) == 0 { + return nil, errors.StructuralError("entity without any identities") + } + + for _, revocation := range revocations { + err = e.PrimaryKey.VerifyRevocationSignature(revocation) + if err == nil { + e.Revocations = append(e.Revocations, revocation) + } else { + // TODO: RFC 4880 5.2.3.15 defines revocation keys. + return nil, errors.StructuralError("revocation signature signed by alternate key") + } + } + + return e, nil +} + +func addUserID(e *Entity, packets *packet.Reader, pkt *packet.UserId) error { + // Make a new Identity object, that we might wind up throwing away. + // We'll only add it if we get a valid self-signature over this + // userID. + identity := new(Identity) + identity.Name = pkt.Id + identity.UserId = pkt + + for { + p, err := packets.Next() + if err == io.EOF { + break + } else if err != nil { + return err + } + + sig, ok := p.(*packet.Signature) + if !ok { + packets.Unread(p) + break + } + + if (sig.SigType == packet.SigTypePositiveCert || sig.SigType == packet.SigTypeGenericCert) && sig.IssuerKeyId != nil && *sig.IssuerKeyId == e.PrimaryKey.KeyId { + if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil { + return errors.StructuralError("user ID self-signature invalid: " + err.Error()) + } + identity.SelfSignature = sig + e.Identities[pkt.Id] = identity + } else { + identity.Signatures = append(identity.Signatures, sig) + } + } + + return nil +} + +func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error { + var subKey Subkey + subKey.PublicKey = pub + subKey.PrivateKey = priv + + for { + p, err := packets.Next() + if err == io.EOF { + break + } else if err != nil { + return errors.StructuralError("subkey signature invalid: " + err.Error()) + } + + sig, ok := p.(*packet.Signature) + if !ok { + packets.Unread(p) + break + } + + if sig.SigType != packet.SigTypeSubkeyBinding && sig.SigType != packet.SigTypeSubkeyRevocation { + return errors.StructuralError("subkey signature with wrong type") + } + + if err := e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, sig); err != nil { + return errors.StructuralError("subkey signature invalid: " + err.Error()) + } + + switch sig.SigType { + case packet.SigTypeSubkeyRevocation: + subKey.Sig = sig + case packet.SigTypeSubkeyBinding: + + if shouldReplaceSubkeySig(subKey.Sig, sig) { + subKey.Sig = sig + } + } + } + + if subKey.Sig == nil { + return errors.StructuralError("subkey packet not followed by signature") + } + + e.Subkeys = append(e.Subkeys, subKey) + + return nil +} + +func shouldReplaceSubkeySig(existingSig, potentialNewSig *packet.Signature) bool { + if potentialNewSig == nil { + return false + } + + if existingSig == nil { + return true + } + + if existingSig.SigType == packet.SigTypeSubkeyRevocation { + return false // never override a revocation signature + } + + return potentialNewSig.CreationTime.After(existingSig.CreationTime) +} + +const defaultRSAKeyBits = 2048 + +// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a +// single identity composed of the given full name, comment and email, any of +// which may be empty but must not contain any of "()<>\x00". +// If config is nil, sensible defaults will be used. +func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) { + creationTime := config.Now() + + bits := defaultRSAKeyBits + if config != nil && config.RSABits != 0 { + bits = config.RSABits + } + + uid := packet.NewUserId(name, comment, email) + if uid == nil { + return nil, errors.InvalidArgumentError("user id field contained invalid characters") + } + signingPriv, err := rsa.GenerateKey(config.Random(), bits) + if err != nil { + return nil, err + } + encryptingPriv, err := rsa.GenerateKey(config.Random(), bits) + if err != nil { + return nil, err + } + + e := &Entity{ + PrimaryKey: packet.NewRSAPublicKey(creationTime, &signingPriv.PublicKey), + PrivateKey: packet.NewRSAPrivateKey(creationTime, signingPriv), + Identities: make(map[string]*Identity), + } + isPrimaryId := true + e.Identities[uid.Id] = &Identity{ + Name: uid.Id, + UserId: uid, + SelfSignature: &packet.Signature{ + CreationTime: creationTime, + SigType: packet.SigTypePositiveCert, + PubKeyAlgo: packet.PubKeyAlgoRSA, + Hash: config.Hash(), + IsPrimaryId: &isPrimaryId, + FlagsValid: true, + FlagSign: true, + FlagCertify: true, + IssuerKeyId: &e.PrimaryKey.KeyId, + }, + } + err = e.Identities[uid.Id].SelfSignature.SignUserId(uid.Id, e.PrimaryKey, e.PrivateKey, config) + if err != nil { + return nil, err + } + + // If the user passes in a DefaultHash via packet.Config, + // set the PreferredHash for the SelfSignature. + if config != nil && config.DefaultHash != 0 { + e.Identities[uid.Id].SelfSignature.PreferredHash = []uint8{hashToHashId(config.DefaultHash)} + } + + // Likewise for DefaultCipher. + if config != nil && config.DefaultCipher != 0 { + e.Identities[uid.Id].SelfSignature.PreferredSymmetric = []uint8{uint8(config.DefaultCipher)} + } + + e.Subkeys = make([]Subkey, 1) + e.Subkeys[0] = Subkey{ + PublicKey: packet.NewRSAPublicKey(creationTime, &encryptingPriv.PublicKey), + PrivateKey: packet.NewRSAPrivateKey(creationTime, encryptingPriv), + Sig: &packet.Signature{ + CreationTime: creationTime, + SigType: packet.SigTypeSubkeyBinding, + PubKeyAlgo: packet.PubKeyAlgoRSA, + Hash: config.Hash(), + FlagsValid: true, + FlagEncryptStorage: true, + FlagEncryptCommunications: true, + IssuerKeyId: &e.PrimaryKey.KeyId, + }, + } + e.Subkeys[0].PublicKey.IsSubkey = true + e.Subkeys[0].PrivateKey.IsSubkey = true + err = e.Subkeys[0].Sig.SignKey(e.Subkeys[0].PublicKey, e.PrivateKey, config) + if err != nil { + return nil, err + } + return e, nil +} + +// SerializePrivate serializes an Entity, including private key material, but +// excluding signatures from other entities, to the given Writer. +// Identities and subkeys are re-signed in case they changed since NewEntry. +// If config is nil, sensible defaults will be used. +func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) { + err = e.PrivateKey.Serialize(w) + if err != nil { + return + } + for _, ident := range e.Identities { + err = ident.UserId.Serialize(w) + if err != nil { + return + } + err = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config) + if err != nil { + return + } + err = ident.SelfSignature.Serialize(w) + if err != nil { + return + } + } + for _, subkey := range e.Subkeys { + err = subkey.PrivateKey.Serialize(w) + if err != nil { + return + } + err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config) + if err != nil { + return + } + err = subkey.Sig.Serialize(w) + if err != nil { + return + } + } + return nil +} + +// Serialize writes the public part of the given Entity to w, including +// signatures from other entities. No private key material will be output. +func (e *Entity) Serialize(w io.Writer) error { + err := e.PrimaryKey.Serialize(w) + if err != nil { + return err + } + for _, ident := range e.Identities { + err = ident.UserId.Serialize(w) + if err != nil { + return err + } + err = ident.SelfSignature.Serialize(w) + if err != nil { + return err + } + for _, sig := range ident.Signatures { + err = sig.Serialize(w) + if err != nil { + return err + } + } + } + for _, subkey := range e.Subkeys { + err = subkey.PublicKey.Serialize(w) + if err != nil { + return err + } + err = subkey.Sig.Serialize(w) + if err != nil { + return err + } + } + return nil +} + +// SignIdentity adds a signature to e, from signer, attesting that identity is +// associated with e. The provided identity must already be an element of +// e.Identities and the private key of signer must have been decrypted if +// necessary. +// If config is nil, sensible defaults will be used. +func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error { + if signer.PrivateKey == nil { + return errors.InvalidArgumentError("signing Entity must have a private key") + } + if signer.PrivateKey.Encrypted { + return errors.InvalidArgumentError("signing Entity's private key must be decrypted") + } + ident, ok := e.Identities[identity] + if !ok { + return errors.InvalidArgumentError("given identity string not found in Entity") + } + + sig := &packet.Signature{ + SigType: packet.SigTypeGenericCert, + PubKeyAlgo: signer.PrivateKey.PubKeyAlgo, + Hash: config.Hash(), + CreationTime: config.Now(), + IssuerKeyId: &signer.PrivateKey.KeyId, + } + if err := sig.SignUserId(identity, e.PrimaryKey, signer.PrivateKey, config); err != nil { + return err + } + ident.Signatures = append(ident.Signatures, sig) + return nil +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/compressed.go b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go new file mode 100644 index 000000000..353f94524 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go @@ -0,0 +1,123 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "compress/bzip2" + "compress/flate" + "compress/zlib" + "golang.org/x/crypto/openpgp/errors" + "io" + "strconv" +) + +// Compressed represents a compressed OpenPGP packet. The decompressed contents +// will contain more OpenPGP packets. See RFC 4880, section 5.6. +type Compressed struct { + Body io.Reader +} + +const ( + NoCompression = flate.NoCompression + BestSpeed = flate.BestSpeed + BestCompression = flate.BestCompression + DefaultCompression = flate.DefaultCompression +) + +// CompressionConfig contains compressor configuration settings. +type CompressionConfig struct { + // Level is the compression level to use. It must be set to + // between -1 and 9, with -1 causing the compressor to use the + // default compression level, 0 causing the compressor to use + // no compression and 1 to 9 representing increasing (better, + // slower) compression levels. If Level is less than -1 or + // more then 9, a non-nil error will be returned during + // encryption. See the constants above for convenient common + // settings for Level. + Level int +} + +func (c *Compressed) parse(r io.Reader) error { + var buf [1]byte + _, err := readFull(r, buf[:]) + if err != nil { + return err + } + + switch buf[0] { + case 1: + c.Body = flate.NewReader(r) + case 2: + c.Body, err = zlib.NewReader(r) + case 3: + c.Body = bzip2.NewReader(r) + default: + err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0]))) + } + + return err +} + +// compressedWriteCloser represents the serialized compression stream +// header and the compressor. Its Close() method ensures that both the +// compressor and serialized stream header are closed. Its Write() +// method writes to the compressor. +type compressedWriteCloser struct { + sh io.Closer // Stream Header + c io.WriteCloser // Compressor +} + +func (cwc compressedWriteCloser) Write(p []byte) (int, error) { + return cwc.c.Write(p) +} + +func (cwc compressedWriteCloser) Close() (err error) { + err = cwc.c.Close() + if err != nil { + return err + } + + return cwc.sh.Close() +} + +// SerializeCompressed serializes a compressed data packet to w and +// returns a WriteCloser to which the literal data packets themselves +// can be written and which MUST be closed on completion. If cc is +// nil, sensible defaults will be used to configure the compression +// algorithm. +func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) { + compressed, err := serializeStreamHeader(w, packetTypeCompressed) + if err != nil { + return + } + + _, err = compressed.Write([]byte{uint8(algo)}) + if err != nil { + return + } + + level := DefaultCompression + if cc != nil { + level = cc.Level + } + + var compressor io.WriteCloser + switch algo { + case CompressionZIP: + compressor, err = flate.NewWriter(compressed, level) + case CompressionZLIB: + compressor, err = zlib.NewWriterLevel(compressed, level) + default: + s := strconv.Itoa(int(algo)) + err = errors.UnsupportedError("Unsupported compression algorithm: " + s) + } + if err != nil { + return + } + + literaldata = compressedWriteCloser{compressed, compressor} + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/config.go b/vendor/golang.org/x/crypto/openpgp/packet/config.go new file mode 100644 index 000000000..c76eecc96 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/config.go @@ -0,0 +1,91 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "crypto/rand" + "io" + "time" +) + +// Config collects a number of parameters along with sensible defaults. +// A nil *Config is valid and results in all default values. +type Config struct { + // Rand provides the source of entropy. + // If nil, the crypto/rand Reader is used. + Rand io.Reader + // DefaultHash is the default hash function to be used. + // If zero, SHA-256 is used. + DefaultHash crypto.Hash + // DefaultCipher is the cipher to be used. + // If zero, AES-128 is used. + DefaultCipher CipherFunction + // Time returns the current time as the number of seconds since the + // epoch. If Time is nil, time.Now is used. + Time func() time.Time + // DefaultCompressionAlgo is the compression algorithm to be + // applied to the plaintext before encryption. If zero, no + // compression is done. + DefaultCompressionAlgo CompressionAlgo + // CompressionConfig configures the compression settings. + CompressionConfig *CompressionConfig + // S2KCount is only used for symmetric encryption. It + // determines the strength of the passphrase stretching when + // the said passphrase is hashed to produce a key. S2KCount + // should be between 1024 and 65011712, inclusive. If Config + // is nil or S2KCount is 0, the value 65536 used. Not all + // values in the above range can be represented. S2KCount will + // be rounded up to the next representable value if it cannot + // be encoded exactly. When set, it is strongly encrouraged to + // use a value that is at least 65536. See RFC 4880 Section + // 3.7.1.3. + S2KCount int + // RSABits is the number of bits in new RSA keys made with NewEntity. + // If zero, then 2048 bit keys are created. + RSABits int +} + +func (c *Config) Random() io.Reader { + if c == nil || c.Rand == nil { + return rand.Reader + } + return c.Rand +} + +func (c *Config) Hash() crypto.Hash { + if c == nil || uint(c.DefaultHash) == 0 { + return crypto.SHA256 + } + return c.DefaultHash +} + +func (c *Config) Cipher() CipherFunction { + if c == nil || uint8(c.DefaultCipher) == 0 { + return CipherAES128 + } + return c.DefaultCipher +} + +func (c *Config) Now() time.Time { + if c == nil || c.Time == nil { + return time.Now() + } + return c.Time() +} + +func (c *Config) Compression() CompressionAlgo { + if c == nil { + return CompressionNone + } + return c.DefaultCompressionAlgo +} + +func (c *Config) PasswordHashIterations() int { + if c == nil || c.S2KCount == 0 { + return 0 + } + return c.S2KCount +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go b/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go new file mode 100644 index 000000000..6d7639722 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go @@ -0,0 +1,208 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "crypto/rsa" + "encoding/binary" + "io" + "math/big" + "strconv" + + "golang.org/x/crypto/openpgp/elgamal" + "golang.org/x/crypto/openpgp/errors" +) + +const encryptedKeyVersion = 3 + +// EncryptedKey represents a public-key encrypted session key. See RFC 4880, +// section 5.1. +type EncryptedKey struct { + KeyId uint64 + Algo PublicKeyAlgorithm + CipherFunc CipherFunction // only valid after a successful Decrypt + Key []byte // only valid after a successful Decrypt + + encryptedMPI1, encryptedMPI2 parsedMPI +} + +func (e *EncryptedKey) parse(r io.Reader) (err error) { + var buf [10]byte + _, err = readFull(r, buf[:]) + if err != nil { + return + } + if buf[0] != encryptedKeyVersion { + return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0]))) + } + e.KeyId = binary.BigEndian.Uint64(buf[1:9]) + e.Algo = PublicKeyAlgorithm(buf[9]) + switch e.Algo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) + if err != nil { + return + } + case PubKeyAlgoElGamal: + e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) + if err != nil { + return + } + e.encryptedMPI2.bytes, e.encryptedMPI2.bitLength, err = readMPI(r) + if err != nil { + return + } + } + _, err = consumeAll(r) + return +} + +func checksumKeyMaterial(key []byte) uint16 { + var checksum uint16 + for _, v := range key { + checksum += uint16(v) + } + return checksum +} + +// Decrypt decrypts an encrypted session key with the given private key. The +// private key must have been decrypted first. +// If config is nil, sensible defaults will be used. +func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error { + var err error + var b []byte + + // TODO(agl): use session key decryption routines here to avoid + // padding oracle attacks. + switch priv.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + // Supports both *rsa.PrivateKey and crypto.Decrypter + k := priv.PrivateKey.(crypto.Decrypter) + b, err = k.Decrypt(config.Random(), padToKeySize(k.Public().(*rsa.PublicKey), e.encryptedMPI1.bytes), nil) + case PubKeyAlgoElGamal: + c1 := new(big.Int).SetBytes(e.encryptedMPI1.bytes) + c2 := new(big.Int).SetBytes(e.encryptedMPI2.bytes) + b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2) + default: + err = errors.InvalidArgumentError("cannot decrypted encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo))) + } + + if err != nil { + return err + } + + e.CipherFunc = CipherFunction(b[0]) + e.Key = b[1 : len(b)-2] + expectedChecksum := uint16(b[len(b)-2])<<8 | uint16(b[len(b)-1]) + checksum := checksumKeyMaterial(e.Key) + if checksum != expectedChecksum { + return errors.StructuralError("EncryptedKey checksum incorrect") + } + + return nil +} + +// Serialize writes the encrypted key packet, e, to w. +func (e *EncryptedKey) Serialize(w io.Writer) error { + var mpiLen int + switch e.Algo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + mpiLen = 2 + len(e.encryptedMPI1.bytes) + case PubKeyAlgoElGamal: + mpiLen = 2 + len(e.encryptedMPI1.bytes) + 2 + len(e.encryptedMPI2.bytes) + default: + return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo))) + } + + serializeHeader(w, packetTypeEncryptedKey, 1 /* version */ +8 /* key id */ +1 /* algo */ +mpiLen) + + w.Write([]byte{encryptedKeyVersion}) + binary.Write(w, binary.BigEndian, e.KeyId) + w.Write([]byte{byte(e.Algo)}) + + switch e.Algo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + writeMPIs(w, e.encryptedMPI1) + case PubKeyAlgoElGamal: + writeMPIs(w, e.encryptedMPI1, e.encryptedMPI2) + default: + panic("internal error") + } + + return nil +} + +// SerializeEncryptedKey serializes an encrypted key packet to w that contains +// key, encrypted to pub. +// If config is nil, sensible defaults will be used. +func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error { + var buf [10]byte + buf[0] = encryptedKeyVersion + binary.BigEndian.PutUint64(buf[1:9], pub.KeyId) + buf[9] = byte(pub.PubKeyAlgo) + + keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */) + keyBlock[0] = byte(cipherFunc) + copy(keyBlock[1:], key) + checksum := checksumKeyMaterial(key) + keyBlock[1+len(key)] = byte(checksum >> 8) + keyBlock[1+len(key)+1] = byte(checksum) + + switch pub.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + return serializeEncryptedKeyRSA(w, config.Random(), buf, pub.PublicKey.(*rsa.PublicKey), keyBlock) + case PubKeyAlgoElGamal: + return serializeEncryptedKeyElGamal(w, config.Random(), buf, pub.PublicKey.(*elgamal.PublicKey), keyBlock) + case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly: + return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) + } + + return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) +} + +func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header [10]byte, pub *rsa.PublicKey, keyBlock []byte) error { + cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock) + if err != nil { + return errors.InvalidArgumentError("RSA encryption failed: " + err.Error()) + } + + packetLen := 10 /* header length */ + 2 /* mpi size */ + len(cipherText) + + err = serializeHeader(w, packetTypeEncryptedKey, packetLen) + if err != nil { + return err + } + _, err = w.Write(header[:]) + if err != nil { + return err + } + return writeMPI(w, 8*uint16(len(cipherText)), cipherText) +} + +func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header [10]byte, pub *elgamal.PublicKey, keyBlock []byte) error { + c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock) + if err != nil { + return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error()) + } + + packetLen := 10 /* header length */ + packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8 + packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8 + + err = serializeHeader(w, packetTypeEncryptedKey, packetLen) + if err != nil { + return err + } + _, err = w.Write(header[:]) + if err != nil { + return err + } + err = writeBig(w, c1) + if err != nil { + return err + } + return writeBig(w, c2) +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/literal.go b/vendor/golang.org/x/crypto/openpgp/packet/literal.go new file mode 100644 index 000000000..1a9ec6e51 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/literal.go @@ -0,0 +1,89 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "encoding/binary" + "io" +) + +// LiteralData represents an encrypted file. See RFC 4880, section 5.9. +type LiteralData struct { + IsBinary bool + FileName string + Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined. + Body io.Reader +} + +// ForEyesOnly returns whether the contents of the LiteralData have been marked +// as especially sensitive. +func (l *LiteralData) ForEyesOnly() bool { + return l.FileName == "_CONSOLE" +} + +func (l *LiteralData) parse(r io.Reader) (err error) { + var buf [256]byte + + _, err = readFull(r, buf[:2]) + if err != nil { + return + } + + l.IsBinary = buf[0] == 'b' + fileNameLen := int(buf[1]) + + _, err = readFull(r, buf[:fileNameLen]) + if err != nil { + return + } + + l.FileName = string(buf[:fileNameLen]) + + _, err = readFull(r, buf[:4]) + if err != nil { + return + } + + l.Time = binary.BigEndian.Uint32(buf[:4]) + l.Body = r + return +} + +// SerializeLiteral serializes a literal data packet to w and returns a +// WriteCloser to which the data itself can be written and which MUST be closed +// on completion. The fileName is truncated to 255 bytes. +func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) { + var buf [4]byte + buf[0] = 't' + if isBinary { + buf[0] = 'b' + } + if len(fileName) > 255 { + fileName = fileName[:255] + } + buf[1] = byte(len(fileName)) + + inner, err := serializeStreamHeader(w, packetTypeLiteralData) + if err != nil { + return + } + + _, err = inner.Write(buf[:2]) + if err != nil { + return + } + _, err = inner.Write([]byte(fileName)) + if err != nil { + return + } + binary.BigEndian.PutUint32(buf[:], time) + _, err = inner.Write(buf[:]) + if err != nil { + return + } + + plaintext = inner + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go b/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go new file mode 100644 index 000000000..ce2a33a54 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go @@ -0,0 +1,143 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9 + +package packet + +import ( + "crypto/cipher" +) + +type ocfbEncrypter struct { + b cipher.Block + fre []byte + outUsed int +} + +// An OCFBResyncOption determines if the "resynchronization step" of OCFB is +// performed. +type OCFBResyncOption bool + +const ( + OCFBResync OCFBResyncOption = true + OCFBNoResync OCFBResyncOption = false +) + +// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's +// cipher feedback mode using the given cipher.Block, and an initial amount of +// ciphertext. randData must be random bytes and be the same length as the +// cipher.Block's block size. Resync determines if the "resynchronization step" +// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on +// this point. +func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) { + blockSize := block.BlockSize() + if len(randData) != blockSize { + return nil, nil + } + + x := &ocfbEncrypter{ + b: block, + fre: make([]byte, blockSize), + outUsed: 0, + } + prefix := make([]byte, blockSize+2) + + block.Encrypt(x.fre, x.fre) + for i := 0; i < blockSize; i++ { + prefix[i] = randData[i] ^ x.fre[i] + } + + block.Encrypt(x.fre, prefix[:blockSize]) + prefix[blockSize] = x.fre[0] ^ randData[blockSize-2] + prefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1] + + if resync { + block.Encrypt(x.fre, prefix[2:]) + } else { + x.fre[0] = prefix[blockSize] + x.fre[1] = prefix[blockSize+1] + x.outUsed = 2 + } + return x, prefix +} + +func (x *ocfbEncrypter) XORKeyStream(dst, src []byte) { + for i := 0; i < len(src); i++ { + if x.outUsed == len(x.fre) { + x.b.Encrypt(x.fre, x.fre) + x.outUsed = 0 + } + + x.fre[x.outUsed] ^= src[i] + dst[i] = x.fre[x.outUsed] + x.outUsed++ + } +} + +type ocfbDecrypter struct { + b cipher.Block + fre []byte + outUsed int +} + +// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's +// cipher feedback mode using the given cipher.Block. Prefix must be the first +// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's +// block size. If an incorrect key is detected then nil is returned. On +// successful exit, blockSize+2 bytes of decrypted data are written into +// prefix. Resync determines if the "resynchronization step" from RFC 4880, +// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point. +func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream { + blockSize := block.BlockSize() + if len(prefix) != blockSize+2 { + return nil + } + + x := &ocfbDecrypter{ + b: block, + fre: make([]byte, blockSize), + outUsed: 0, + } + prefixCopy := make([]byte, len(prefix)) + copy(prefixCopy, prefix) + + block.Encrypt(x.fre, x.fre) + for i := 0; i < blockSize; i++ { + prefixCopy[i] ^= x.fre[i] + } + + block.Encrypt(x.fre, prefix[:blockSize]) + prefixCopy[blockSize] ^= x.fre[0] + prefixCopy[blockSize+1] ^= x.fre[1] + + if prefixCopy[blockSize-2] != prefixCopy[blockSize] || + prefixCopy[blockSize-1] != prefixCopy[blockSize+1] { + return nil + } + + if resync { + block.Encrypt(x.fre, prefix[2:]) + } else { + x.fre[0] = prefix[blockSize] + x.fre[1] = prefix[blockSize+1] + x.outUsed = 2 + } + copy(prefix, prefixCopy) + return x +} + +func (x *ocfbDecrypter) XORKeyStream(dst, src []byte) { + for i := 0; i < len(src); i++ { + if x.outUsed == len(x.fre) { + x.b.Encrypt(x.fre, x.fre) + x.outUsed = 0 + } + + c := src[i] + dst[i] = x.fre[x.outUsed] ^ src[i] + x.fre[x.outUsed] = c + x.outUsed++ + } +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go new file mode 100644 index 000000000..171350339 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go @@ -0,0 +1,73 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "encoding/binary" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" + "io" + "strconv" +) + +// OnePassSignature represents a one-pass signature packet. See RFC 4880, +// section 5.4. +type OnePassSignature struct { + SigType SignatureType + Hash crypto.Hash + PubKeyAlgo PublicKeyAlgorithm + KeyId uint64 + IsLast bool +} + +const onePassSignatureVersion = 3 + +func (ops *OnePassSignature) parse(r io.Reader) (err error) { + var buf [13]byte + + _, err = readFull(r, buf[:]) + if err != nil { + return + } + if buf[0] != onePassSignatureVersion { + err = errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0]))) + } + + var ok bool + ops.Hash, ok = s2k.HashIdToHash(buf[2]) + if !ok { + return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2]))) + } + + ops.SigType = SignatureType(buf[1]) + ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3]) + ops.KeyId = binary.BigEndian.Uint64(buf[4:12]) + ops.IsLast = buf[12] != 0 + return +} + +// Serialize marshals the given OnePassSignature to w. +func (ops *OnePassSignature) Serialize(w io.Writer) error { + var buf [13]byte + buf[0] = onePassSignatureVersion + buf[1] = uint8(ops.SigType) + var ok bool + buf[2], ok = s2k.HashToHashId(ops.Hash) + if !ok { + return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash))) + } + buf[3] = uint8(ops.PubKeyAlgo) + binary.BigEndian.PutUint64(buf[4:12], ops.KeyId) + if ops.IsLast { + buf[12] = 1 + } + + if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err != nil { + return err + } + _, err := w.Write(buf[:]) + return err +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/opaque.go b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go new file mode 100644 index 000000000..398447731 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go @@ -0,0 +1,161 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "io" + + "golang.org/x/crypto/openpgp/errors" +) + +// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is +// useful for splitting and storing the original packet contents separately, +// handling unsupported packet types or accessing parts of the packet not yet +// implemented by this package. +type OpaquePacket struct { + // Packet type + Tag uint8 + // Reason why the packet was parsed opaquely + Reason error + // Binary contents of the packet data + Contents []byte +} + +func (op *OpaquePacket) parse(r io.Reader) (err error) { + op.Contents, err = io.ReadAll(r) + return +} + +// Serialize marshals the packet to a writer in its original form, including +// the packet header. +func (op *OpaquePacket) Serialize(w io.Writer) (err error) { + err = serializeHeader(w, packetType(op.Tag), len(op.Contents)) + if err == nil { + _, err = w.Write(op.Contents) + } + return +} + +// Parse attempts to parse the opaque contents into a structure supported by +// this package. If the packet is not known then the result will be another +// OpaquePacket. +func (op *OpaquePacket) Parse() (p Packet, err error) { + hdr := bytes.NewBuffer(nil) + err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents)) + if err != nil { + op.Reason = err + return op, err + } + p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents))) + if err != nil { + op.Reason = err + p = op + } + return +} + +// OpaqueReader reads OpaquePackets from an io.Reader. +type OpaqueReader struct { + r io.Reader +} + +func NewOpaqueReader(r io.Reader) *OpaqueReader { + return &OpaqueReader{r: r} +} + +// Read the next OpaquePacket. +func (or *OpaqueReader) Next() (op *OpaquePacket, err error) { + tag, _, contents, err := readHeader(or.r) + if err != nil { + return + } + op = &OpaquePacket{Tag: uint8(tag), Reason: err} + err = op.parse(contents) + if err != nil { + consumeAll(contents) + } + return +} + +// OpaqueSubpacket represents an unparsed OpenPGP subpacket, +// as found in signature and user attribute packets. +type OpaqueSubpacket struct { + SubType uint8 + Contents []byte +} + +// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from +// their byte representation. +func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) { + var ( + subHeaderLen int + subPacket *OpaqueSubpacket + ) + for len(contents) > 0 { + subHeaderLen, subPacket, err = nextSubpacket(contents) + if err != nil { + break + } + result = append(result, subPacket) + contents = contents[subHeaderLen+len(subPacket.Contents):] + } + return +} + +func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) { + // RFC 4880, section 5.2.3.1 + var subLen uint32 + if len(contents) < 1 { + goto Truncated + } + subPacket = &OpaqueSubpacket{} + switch { + case contents[0] < 192: + subHeaderLen = 2 // 1 length byte, 1 subtype byte + if len(contents) < subHeaderLen { + goto Truncated + } + subLen = uint32(contents[0]) + contents = contents[1:] + case contents[0] < 255: + subHeaderLen = 3 // 2 length bytes, 1 subtype + if len(contents) < subHeaderLen { + goto Truncated + } + subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192 + contents = contents[2:] + default: + subHeaderLen = 6 // 5 length bytes, 1 subtype + if len(contents) < subHeaderLen { + goto Truncated + } + subLen = uint32(contents[1])<<24 | + uint32(contents[2])<<16 | + uint32(contents[3])<<8 | + uint32(contents[4]) + contents = contents[5:] + } + if subLen > uint32(len(contents)) || subLen == 0 { + goto Truncated + } + subPacket.SubType = contents[0] + subPacket.Contents = contents[1:subLen] + return +Truncated: + err = errors.StructuralError("subpacket truncated") + return +} + +func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) { + buf := make([]byte, 6) + n := serializeSubpacketLength(buf, len(osp.Contents)+1) + buf[n] = osp.SubType + if _, err = w.Write(buf[:n+1]); err != nil { + return + } + _, err = w.Write(osp.Contents) + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go new file mode 100644 index 000000000..a84a1a214 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -0,0 +1,590 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package packet implements parsing and serialization of OpenPGP packets, as +// specified in RFC 4880. +// +// Deprecated: this package is unmaintained except for security fixes. New +// applications should consider a more focused, modern alternative to OpenPGP +// for their specific task. If you are required to interoperate with OpenPGP +// systems and need a maintained package, consider a community fork. +// See https://golang.org/issue/44226. +package packet + +import ( + "bufio" + "crypto/aes" + "crypto/cipher" + "crypto/des" + "crypto/rsa" + "io" + "math/big" + "math/bits" + + "golang.org/x/crypto/cast5" + "golang.org/x/crypto/openpgp/errors" +) + +// readFull is the same as io.ReadFull except that reading zero bytes returns +// ErrUnexpectedEOF rather than EOF. +func readFull(r io.Reader, buf []byte) (n int, err error) { + n, err = io.ReadFull(r, buf) + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2. +func readLength(r io.Reader) (length int64, isPartial bool, err error) { + var buf [4]byte + _, err = readFull(r, buf[:1]) + if err != nil { + return + } + switch { + case buf[0] < 192: + length = int64(buf[0]) + case buf[0] < 224: + length = int64(buf[0]-192) << 8 + _, err = readFull(r, buf[0:1]) + if err != nil { + return + } + length += int64(buf[0]) + 192 + case buf[0] < 255: + length = int64(1) << (buf[0] & 0x1f) + isPartial = true + default: + _, err = readFull(r, buf[0:4]) + if err != nil { + return + } + length = int64(buf[0])<<24 | + int64(buf[1])<<16 | + int64(buf[2])<<8 | + int64(buf[3]) + } + return +} + +// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths. +// The continuation lengths are parsed and removed from the stream and EOF is +// returned at the end of the packet. See RFC 4880, section 4.2.2.4. +type partialLengthReader struct { + r io.Reader + remaining int64 + isPartial bool +} + +func (r *partialLengthReader) Read(p []byte) (n int, err error) { + for r.remaining == 0 { + if !r.isPartial { + return 0, io.EOF + } + r.remaining, r.isPartial, err = readLength(r.r) + if err != nil { + return 0, err + } + } + + toRead := int64(len(p)) + if toRead > r.remaining { + toRead = r.remaining + } + + n, err = r.r.Read(p[:int(toRead)]) + r.remaining -= int64(n) + if n < int(toRead) && err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +// partialLengthWriter writes a stream of data using OpenPGP partial lengths. +// See RFC 4880, section 4.2.2.4. +type partialLengthWriter struct { + w io.WriteCloser + lengthByte [1]byte + sentFirst bool + buf []byte +} + +// RFC 4880 4.2.2.4: the first partial length MUST be at least 512 octets long. +const minFirstPartialWrite = 512 + +func (w *partialLengthWriter) Write(p []byte) (n int, err error) { + off := 0 + if !w.sentFirst { + if len(w.buf) > 0 || len(p) < minFirstPartialWrite { + off = len(w.buf) + w.buf = append(w.buf, p...) + if len(w.buf) < minFirstPartialWrite { + return len(p), nil + } + p = w.buf + w.buf = nil + } + w.sentFirst = true + } + + power := uint8(30) + for len(p) > 0 { + l := 1 << power + if len(p) < l { + power = uint8(bits.Len32(uint32(len(p)))) - 1 + l = 1 << power + } + w.lengthByte[0] = 224 + power + _, err = w.w.Write(w.lengthByte[:]) + if err == nil { + var m int + m, err = w.w.Write(p[:l]) + n += m + } + if err != nil { + if n < off { + return 0, err + } + return n - off, err + } + p = p[l:] + } + return n - off, nil +} + +func (w *partialLengthWriter) Close() error { + if len(w.buf) > 0 { + // In this case we can't send a 512 byte packet. + // Just send what we have. + p := w.buf + w.sentFirst = true + w.buf = nil + if _, err := w.Write(p); err != nil { + return err + } + } + + w.lengthByte[0] = 0 + _, err := w.w.Write(w.lengthByte[:]) + if err != nil { + return err + } + return w.w.Close() +} + +// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the +// underlying Reader returns EOF before the limit has been reached. +type spanReader struct { + r io.Reader + n int64 +} + +func (l *spanReader) Read(p []byte) (n int, err error) { + if l.n <= 0 { + return 0, io.EOF + } + if int64(len(p)) > l.n { + p = p[0:l.n] + } + n, err = l.r.Read(p) + l.n -= int64(n) + if l.n > 0 && err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +// readHeader parses a packet header and returns an io.Reader which will return +// the contents of the packet. See RFC 4880, section 4.2. +func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) { + var buf [4]byte + _, err = io.ReadFull(r, buf[:1]) + if err != nil { + return + } + if buf[0]&0x80 == 0 { + err = errors.StructuralError("tag byte does not have MSB set") + return + } + if buf[0]&0x40 == 0 { + // Old format packet + tag = packetType((buf[0] & 0x3f) >> 2) + lengthType := buf[0] & 3 + if lengthType == 3 { + length = -1 + contents = r + return + } + lengthBytes := 1 << lengthType + _, err = readFull(r, buf[0:lengthBytes]) + if err != nil { + return + } + for i := 0; i < lengthBytes; i++ { + length <<= 8 + length |= int64(buf[i]) + } + contents = &spanReader{r, length} + return + } + + // New format packet + tag = packetType(buf[0] & 0x3f) + length, isPartial, err := readLength(r) + if err != nil { + return + } + if isPartial { + contents = &partialLengthReader{ + remaining: length, + isPartial: true, + r: r, + } + length = -1 + } else { + contents = &spanReader{r, length} + } + return +} + +// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section +// 4.2. +func serializeHeader(w io.Writer, ptype packetType, length int) (err error) { + var buf [6]byte + var n int + + buf[0] = 0x80 | 0x40 | byte(ptype) + if length < 192 { + buf[1] = byte(length) + n = 2 + } else if length < 8384 { + length -= 192 + buf[1] = 192 + byte(length>>8) + buf[2] = byte(length) + n = 3 + } else { + buf[1] = 255 + buf[2] = byte(length >> 24) + buf[3] = byte(length >> 16) + buf[4] = byte(length >> 8) + buf[5] = byte(length) + n = 6 + } + + _, err = w.Write(buf[:n]) + return +} + +// serializeStreamHeader writes an OpenPGP packet header to w where the +// length of the packet is unknown. It returns a io.WriteCloser which can be +// used to write the contents of the packet. See RFC 4880, section 4.2. +func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) { + var buf [1]byte + buf[0] = 0x80 | 0x40 | byte(ptype) + _, err = w.Write(buf[:]) + if err != nil { + return + } + out = &partialLengthWriter{w: w} + return +} + +// Packet represents an OpenPGP packet. Users are expected to try casting +// instances of this interface to specific packet types. +type Packet interface { + parse(io.Reader) error +} + +// consumeAll reads from the given Reader until error, returning the number of +// bytes read. +func consumeAll(r io.Reader) (n int64, err error) { + var m int + var buf [1024]byte + + for { + m, err = r.Read(buf[:]) + n += int64(m) + if err == io.EOF { + err = nil + return + } + if err != nil { + return + } + } +} + +// packetType represents the numeric ids of the different OpenPGP packet types. See +// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2 +type packetType uint8 + +const ( + packetTypeEncryptedKey packetType = 1 + packetTypeSignature packetType = 2 + packetTypeSymmetricKeyEncrypted packetType = 3 + packetTypeOnePassSignature packetType = 4 + packetTypePrivateKey packetType = 5 + packetTypePublicKey packetType = 6 + packetTypePrivateSubkey packetType = 7 + packetTypeCompressed packetType = 8 + packetTypeSymmetricallyEncrypted packetType = 9 + packetTypeLiteralData packetType = 11 + packetTypeUserId packetType = 13 + packetTypePublicSubkey packetType = 14 + packetTypeUserAttribute packetType = 17 + packetTypeSymmetricallyEncryptedMDC packetType = 18 +) + +// peekVersion detects the version of a public key packet about to +// be read. A bufio.Reader at the original position of the io.Reader +// is returned. +func peekVersion(r io.Reader) (bufr *bufio.Reader, ver byte, err error) { + bufr = bufio.NewReader(r) + var verBuf []byte + if verBuf, err = bufr.Peek(1); err != nil { + return + } + ver = verBuf[0] + return +} + +// Read reads a single OpenPGP packet from the given io.Reader. If there is an +// error parsing a packet, the whole packet is consumed from the input. +func Read(r io.Reader) (p Packet, err error) { + tag, _, contents, err := readHeader(r) + if err != nil { + return + } + + switch tag { + case packetTypeEncryptedKey: + p = new(EncryptedKey) + case packetTypeSignature: + var version byte + // Detect signature version + if contents, version, err = peekVersion(contents); err != nil { + return + } + if version < 4 { + p = new(SignatureV3) + } else { + p = new(Signature) + } + case packetTypeSymmetricKeyEncrypted: + p = new(SymmetricKeyEncrypted) + case packetTypeOnePassSignature: + p = new(OnePassSignature) + case packetTypePrivateKey, packetTypePrivateSubkey: + pk := new(PrivateKey) + if tag == packetTypePrivateSubkey { + pk.IsSubkey = true + } + p = pk + case packetTypePublicKey, packetTypePublicSubkey: + var version byte + if contents, version, err = peekVersion(contents); err != nil { + return + } + isSubkey := tag == packetTypePublicSubkey + if version < 4 { + p = &PublicKeyV3{IsSubkey: isSubkey} + } else { + p = &PublicKey{IsSubkey: isSubkey} + } + case packetTypeCompressed: + p = new(Compressed) + case packetTypeSymmetricallyEncrypted: + p = new(SymmetricallyEncrypted) + case packetTypeLiteralData: + p = new(LiteralData) + case packetTypeUserId: + p = new(UserId) + case packetTypeUserAttribute: + p = new(UserAttribute) + case packetTypeSymmetricallyEncryptedMDC: + se := new(SymmetricallyEncrypted) + se.MDC = true + p = se + default: + err = errors.UnknownPacketTypeError(tag) + } + if p != nil { + err = p.parse(contents) + } + if err != nil { + consumeAll(contents) + } + return +} + +// SignatureType represents the different semantic meanings of an OpenPGP +// signature. See RFC 4880, section 5.2.1. +type SignatureType uint8 + +const ( + SigTypeBinary SignatureType = 0 + SigTypeText = 1 + SigTypeGenericCert = 0x10 + SigTypePersonaCert = 0x11 + SigTypeCasualCert = 0x12 + SigTypePositiveCert = 0x13 + SigTypeSubkeyBinding = 0x18 + SigTypePrimaryKeyBinding = 0x19 + SigTypeDirectSignature = 0x1F + SigTypeKeyRevocation = 0x20 + SigTypeSubkeyRevocation = 0x28 +) + +// PublicKeyAlgorithm represents the different public key system specified for +// OpenPGP. See +// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12 +type PublicKeyAlgorithm uint8 + +const ( + PubKeyAlgoRSA PublicKeyAlgorithm = 1 + PubKeyAlgoElGamal PublicKeyAlgorithm = 16 + PubKeyAlgoDSA PublicKeyAlgorithm = 17 + // RFC 6637, Section 5. + PubKeyAlgoECDH PublicKeyAlgorithm = 18 + PubKeyAlgoECDSA PublicKeyAlgorithm = 19 + + // Deprecated in RFC 4880, Section 13.5. Use key flags instead. + PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2 + PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3 +) + +// CanEncrypt returns true if it's possible to encrypt a message to a public +// key of the given type. +func (pka PublicKeyAlgorithm) CanEncrypt() bool { + switch pka { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal: + return true + } + return false +} + +// CanSign returns true if it's possible for a public key of the given type to +// sign a message. +func (pka PublicKeyAlgorithm) CanSign() bool { + switch pka { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: + return true + } + return false +} + +// CipherFunction represents the different block ciphers specified for OpenPGP. See +// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13 +type CipherFunction uint8 + +const ( + Cipher3DES CipherFunction = 2 + CipherCAST5 CipherFunction = 3 + CipherAES128 CipherFunction = 7 + CipherAES192 CipherFunction = 8 + CipherAES256 CipherFunction = 9 +) + +// KeySize returns the key size, in bytes, of cipher. +func (cipher CipherFunction) KeySize() int { + switch cipher { + case Cipher3DES: + return 24 + case CipherCAST5: + return cast5.KeySize + case CipherAES128: + return 16 + case CipherAES192: + return 24 + case CipherAES256: + return 32 + } + return 0 +} + +// blockSize returns the block size, in bytes, of cipher. +func (cipher CipherFunction) blockSize() int { + switch cipher { + case Cipher3DES: + return des.BlockSize + case CipherCAST5: + return 8 + case CipherAES128, CipherAES192, CipherAES256: + return 16 + } + return 0 +} + +// new returns a fresh instance of the given cipher. +func (cipher CipherFunction) new(key []byte) (block cipher.Block) { + switch cipher { + case Cipher3DES: + block, _ = des.NewTripleDESCipher(key) + case CipherCAST5: + block, _ = cast5.NewCipher(key) + case CipherAES128, CipherAES192, CipherAES256: + block, _ = aes.NewCipher(key) + } + return +} + +// readMPI reads a big integer from r. The bit length returned is the bit +// length that was specified in r. This is preserved so that the integer can be +// reserialized exactly. +func readMPI(r io.Reader) (mpi []byte, bitLength uint16, err error) { + var buf [2]byte + _, err = readFull(r, buf[0:]) + if err != nil { + return + } + bitLength = uint16(buf[0])<<8 | uint16(buf[1]) + numBytes := (int(bitLength) + 7) / 8 + mpi = make([]byte, numBytes) + _, err = readFull(r, mpi) + // According to RFC 4880 3.2. we should check that the MPI has no leading + // zeroes (at least when not an encrypted MPI?), but this implementation + // does generate leading zeroes, so we keep accepting them. + return +} + +// writeMPI serializes a big integer to w. +func writeMPI(w io.Writer, bitLength uint16, mpiBytes []byte) (err error) { + // Note that we can produce leading zeroes, in violation of RFC 4880 3.2. + // Implementations seem to be tolerant of them, and stripping them would + // make it complex to guarantee matching re-serialization. + _, err = w.Write([]byte{byte(bitLength >> 8), byte(bitLength)}) + if err == nil { + _, err = w.Write(mpiBytes) + } + return +} + +// writeBig serializes a *big.Int to w. +func writeBig(w io.Writer, i *big.Int) error { + return writeMPI(w, uint16(i.BitLen()), i.Bytes()) +} + +// padToKeySize left-pads a MPI with zeroes to match the length of the +// specified RSA public. +func padToKeySize(pub *rsa.PublicKey, b []byte) []byte { + k := (pub.N.BitLen() + 7) / 8 + if len(b) >= k { + return b + } + bb := make([]byte, k) + copy(bb[len(bb)-len(b):], b) + return bb +} + +// CompressionAlgo Represents the different compression algorithms +// supported by OpenPGP (except for BZIP2, which is not currently +// supported). See Section 9.3 of RFC 4880. +type CompressionAlgo uint8 + +const ( + CompressionNone CompressionAlgo = 0 + CompressionZIP CompressionAlgo = 1 + CompressionZLIB CompressionAlgo = 2 +) diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go new file mode 100644 index 000000000..192aac376 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go @@ -0,0 +1,384 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto" + "crypto/cipher" + "crypto/dsa" + "crypto/ecdsa" + "crypto/rsa" + "crypto/sha1" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/elgamal" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +// PrivateKey represents a possibly encrypted private key. See RFC 4880, +// section 5.5.3. +type PrivateKey struct { + PublicKey + Encrypted bool // if true then the private key is unavailable until Decrypt has been called. + encryptedData []byte + cipher CipherFunction + s2k func(out, in []byte) + PrivateKey interface{} // An *{rsa|dsa|ecdsa}.PrivateKey or crypto.Signer/crypto.Decrypter (Decryptor RSA only). + sha1Checksum bool + iv []byte +} + +func NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +func NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +func NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +func NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that +// implements RSA or ECDSA. +func NewSignerPrivateKey(creationTime time.Time, signer crypto.Signer) *PrivateKey { + pk := new(PrivateKey) + // In general, the public Keys should be used as pointers. We still + // type-switch on the values, for backwards-compatibility. + switch pubkey := signer.Public().(type) { + case *rsa.PublicKey: + pk.PublicKey = *NewRSAPublicKey(creationTime, pubkey) + case rsa.PublicKey: + pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey) + case *ecdsa.PublicKey: + pk.PublicKey = *NewECDSAPublicKey(creationTime, pubkey) + case ecdsa.PublicKey: + pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey) + default: + panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey") + } + pk.PrivateKey = signer + return pk +} + +func (pk *PrivateKey) parse(r io.Reader) (err error) { + err = (&pk.PublicKey).parse(r) + if err != nil { + return + } + var buf [1]byte + _, err = readFull(r, buf[:]) + if err != nil { + return + } + + s2kType := buf[0] + + switch s2kType { + case 0: + pk.s2k = nil + pk.Encrypted = false + case 254, 255: + _, err = readFull(r, buf[:]) + if err != nil { + return + } + pk.cipher = CipherFunction(buf[0]) + pk.Encrypted = true + pk.s2k, err = s2k.Parse(r) + if err != nil { + return + } + if s2kType == 254 { + pk.sha1Checksum = true + } + default: + return errors.UnsupportedError("deprecated s2k function in private key") + } + + if pk.Encrypted { + blockSize := pk.cipher.blockSize() + if blockSize == 0 { + return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher))) + } + pk.iv = make([]byte, blockSize) + _, err = readFull(r, pk.iv) + if err != nil { + return + } + } + + pk.encryptedData, err = io.ReadAll(r) + if err != nil { + return + } + + if !pk.Encrypted { + return pk.parsePrivateKey(pk.encryptedData) + } + + return +} + +func mod64kHash(d []byte) uint16 { + var h uint16 + for _, b := range d { + h += uint16(b) + } + return h +} + +func (pk *PrivateKey) Serialize(w io.Writer) (err error) { + // TODO(agl): support encrypted private keys + buf := bytes.NewBuffer(nil) + err = pk.PublicKey.serializeWithoutHeaders(buf) + if err != nil { + return + } + buf.WriteByte(0 /* no encryption */) + + privateKeyBuf := bytes.NewBuffer(nil) + + switch priv := pk.PrivateKey.(type) { + case *rsa.PrivateKey: + err = serializeRSAPrivateKey(privateKeyBuf, priv) + case *dsa.PrivateKey: + err = serializeDSAPrivateKey(privateKeyBuf, priv) + case *elgamal.PrivateKey: + err = serializeElGamalPrivateKey(privateKeyBuf, priv) + case *ecdsa.PrivateKey: + err = serializeECDSAPrivateKey(privateKeyBuf, priv) + default: + err = errors.InvalidArgumentError("unknown private key type") + } + if err != nil { + return + } + + ptype := packetTypePrivateKey + contents := buf.Bytes() + privateKeyBytes := privateKeyBuf.Bytes() + if pk.IsSubkey { + ptype = packetTypePrivateSubkey + } + err = serializeHeader(w, ptype, len(contents)+len(privateKeyBytes)+2) + if err != nil { + return + } + _, err = w.Write(contents) + if err != nil { + return + } + _, err = w.Write(privateKeyBytes) + if err != nil { + return + } + + checksum := mod64kHash(privateKeyBytes) + var checksumBytes [2]byte + checksumBytes[0] = byte(checksum >> 8) + checksumBytes[1] = byte(checksum) + _, err = w.Write(checksumBytes[:]) + + return +} + +func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error { + err := writeBig(w, priv.D) + if err != nil { + return err + } + err = writeBig(w, priv.Primes[1]) + if err != nil { + return err + } + err = writeBig(w, priv.Primes[0]) + if err != nil { + return err + } + return writeBig(w, priv.Precomputed.Qinv) +} + +func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error { + return writeBig(w, priv.X) +} + +func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error { + return writeBig(w, priv.X) +} + +func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error { + return writeBig(w, priv.D) +} + +// Decrypt decrypts an encrypted private key using a passphrase. +func (pk *PrivateKey) Decrypt(passphrase []byte) error { + if !pk.Encrypted { + return nil + } + + key := make([]byte, pk.cipher.KeySize()) + pk.s2k(key, passphrase) + block := pk.cipher.new(key) + cfb := cipher.NewCFBDecrypter(block, pk.iv) + + data := make([]byte, len(pk.encryptedData)) + cfb.XORKeyStream(data, pk.encryptedData) + + if pk.sha1Checksum { + if len(data) < sha1.Size { + return errors.StructuralError("truncated private key data") + } + h := sha1.New() + h.Write(data[:len(data)-sha1.Size]) + sum := h.Sum(nil) + if !bytes.Equal(sum, data[len(data)-sha1.Size:]) { + return errors.StructuralError("private key checksum failure") + } + data = data[:len(data)-sha1.Size] + } else { + if len(data) < 2 { + return errors.StructuralError("truncated private key data") + } + var sum uint16 + for i := 0; i < len(data)-2; i++ { + sum += uint16(data[i]) + } + if data[len(data)-2] != uint8(sum>>8) || + data[len(data)-1] != uint8(sum) { + return errors.StructuralError("private key checksum failure") + } + data = data[:len(data)-2] + } + + return pk.parsePrivateKey(data) +} + +func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) { + switch pk.PublicKey.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly: + return pk.parseRSAPrivateKey(data) + case PubKeyAlgoDSA: + return pk.parseDSAPrivateKey(data) + case PubKeyAlgoElGamal: + return pk.parseElGamalPrivateKey(data) + case PubKeyAlgoECDSA: + return pk.parseECDSAPrivateKey(data) + } + panic("impossible") +} + +func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) { + rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey) + rsaPriv := new(rsa.PrivateKey) + rsaPriv.PublicKey = *rsaPub + + buf := bytes.NewBuffer(data) + d, _, err := readMPI(buf) + if err != nil { + return + } + p, _, err := readMPI(buf) + if err != nil { + return + } + q, _, err := readMPI(buf) + if err != nil { + return + } + + rsaPriv.D = new(big.Int).SetBytes(d) + rsaPriv.Primes = make([]*big.Int, 2) + rsaPriv.Primes[0] = new(big.Int).SetBytes(p) + rsaPriv.Primes[1] = new(big.Int).SetBytes(q) + if err := rsaPriv.Validate(); err != nil { + return err + } + rsaPriv.Precompute() + pk.PrivateKey = rsaPriv + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} + +func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) { + dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey) + dsaPriv := new(dsa.PrivateKey) + dsaPriv.PublicKey = *dsaPub + + buf := bytes.NewBuffer(data) + x, _, err := readMPI(buf) + if err != nil { + return + } + + dsaPriv.X = new(big.Int).SetBytes(x) + pk.PrivateKey = dsaPriv + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} + +func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) { + pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey) + priv := new(elgamal.PrivateKey) + priv.PublicKey = *pub + + buf := bytes.NewBuffer(data) + x, _, err := readMPI(buf) + if err != nil { + return + } + + priv.X = new(big.Int).SetBytes(x) + pk.PrivateKey = priv + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} + +func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) { + ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey) + + buf := bytes.NewBuffer(data) + d, _, err := readMPI(buf) + if err != nil { + return + } + + pk.PrivateKey = &ecdsa.PrivateKey{ + PublicKey: *ecdsaPub, + D: new(big.Int).SetBytes(d), + } + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/public_key.go b/vendor/golang.org/x/crypto/openpgp/packet/public_key.go new file mode 100644 index 000000000..fcd5f5251 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/public_key.go @@ -0,0 +1,753 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rsa" + "crypto/sha1" + _ "crypto/sha256" + _ "crypto/sha512" + "encoding/binary" + "fmt" + "hash" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/elgamal" + "golang.org/x/crypto/openpgp/errors" +) + +var ( + // NIST curve P-256 + oidCurveP256 []byte = []byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07} + // NIST curve P-384 + oidCurveP384 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x22} + // NIST curve P-521 + oidCurveP521 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x23} +) + +const maxOIDLength = 8 + +// ecdsaKey stores the algorithm-specific fields for ECDSA keys. +// as defined in RFC 6637, Section 9. +type ecdsaKey struct { + // oid contains the OID byte sequence identifying the elliptic curve used + oid []byte + // p contains the elliptic curve point that represents the public key + p parsedMPI +} + +// parseOID reads the OID for the curve as defined in RFC 6637, Section 9. +func parseOID(r io.Reader) (oid []byte, err error) { + buf := make([]byte, maxOIDLength) + if _, err = readFull(r, buf[:1]); err != nil { + return + } + oidLen := buf[0] + if int(oidLen) > len(buf) { + err = errors.UnsupportedError("invalid oid length: " + strconv.Itoa(int(oidLen))) + return + } + oid = buf[:oidLen] + _, err = readFull(r, oid) + return +} + +func (f *ecdsaKey) parse(r io.Reader) (err error) { + if f.oid, err = parseOID(r); err != nil { + return err + } + f.p.bytes, f.p.bitLength, err = readMPI(r) + return +} + +func (f *ecdsaKey) serialize(w io.Writer) (err error) { + buf := make([]byte, maxOIDLength+1) + buf[0] = byte(len(f.oid)) + copy(buf[1:], f.oid) + if _, err = w.Write(buf[:len(f.oid)+1]); err != nil { + return + } + return writeMPIs(w, f.p) +} + +func (f *ecdsaKey) newECDSA() (*ecdsa.PublicKey, error) { + var c elliptic.Curve + if bytes.Equal(f.oid, oidCurveP256) { + c = elliptic.P256() + } else if bytes.Equal(f.oid, oidCurveP384) { + c = elliptic.P384() + } else if bytes.Equal(f.oid, oidCurveP521) { + c = elliptic.P521() + } else { + return nil, errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", f.oid)) + } + x, y := elliptic.Unmarshal(c, f.p.bytes) + if x == nil { + return nil, errors.UnsupportedError("failed to parse EC point") + } + return &ecdsa.PublicKey{Curve: c, X: x, Y: y}, nil +} + +func (f *ecdsaKey) byteLen() int { + return 1 + len(f.oid) + 2 + len(f.p.bytes) +} + +type kdfHashFunction byte +type kdfAlgorithm byte + +// ecdhKdf stores key derivation function parameters +// used for ECDH encryption. See RFC 6637, Section 9. +type ecdhKdf struct { + KdfHash kdfHashFunction + KdfAlgo kdfAlgorithm +} + +func (f *ecdhKdf) parse(r io.Reader) (err error) { + buf := make([]byte, 1) + if _, err = readFull(r, buf); err != nil { + return + } + kdfLen := int(buf[0]) + if kdfLen < 3 { + return errors.UnsupportedError("Unsupported ECDH KDF length: " + strconv.Itoa(kdfLen)) + } + buf = make([]byte, kdfLen) + if _, err = readFull(r, buf); err != nil { + return + } + reserved := int(buf[0]) + f.KdfHash = kdfHashFunction(buf[1]) + f.KdfAlgo = kdfAlgorithm(buf[2]) + if reserved != 0x01 { + return errors.UnsupportedError("Unsupported KDF reserved field: " + strconv.Itoa(reserved)) + } + return +} + +func (f *ecdhKdf) serialize(w io.Writer) (err error) { + buf := make([]byte, 4) + // See RFC 6637, Section 9, Algorithm-Specific Fields for ECDH keys. + buf[0] = byte(0x03) // Length of the following fields + buf[1] = byte(0x01) // Reserved for future extensions, must be 1 for now + buf[2] = byte(f.KdfHash) + buf[3] = byte(f.KdfAlgo) + _, err = w.Write(buf[:]) + return +} + +func (f *ecdhKdf) byteLen() int { + return 4 +} + +// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2. +type PublicKey struct { + CreationTime time.Time + PubKeyAlgo PublicKeyAlgorithm + PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey or *ecdsa.PublicKey + Fingerprint [20]byte + KeyId uint64 + IsSubkey bool + + n, e, p, q, g, y parsedMPI + + // RFC 6637 fields + ec *ecdsaKey + ecdh *ecdhKdf +} + +// signingKey provides a convenient abstraction over signature verification +// for v3 and v4 public keys. +type signingKey interface { + SerializeSignaturePrefix(io.Writer) + serializeWithoutHeaders(io.Writer) error +} + +func fromBig(n *big.Int) parsedMPI { + return parsedMPI{ + bytes: n.Bytes(), + bitLength: uint16(n.BitLen()), + } +} + +// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey. +func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoRSA, + PublicKey: pub, + n: fromBig(pub.N), + e: fromBig(big.NewInt(int64(pub.E))), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey. +func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoDSA, + PublicKey: pub, + p: fromBig(pub.P), + q: fromBig(pub.Q), + g: fromBig(pub.G), + y: fromBig(pub.Y), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey. +func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoElGamal, + PublicKey: pub, + p: fromBig(pub.P), + g: fromBig(pub.G), + y: fromBig(pub.Y), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoECDSA, + PublicKey: pub, + ec: new(ecdsaKey), + } + + switch pub.Curve { + case elliptic.P256(): + pk.ec.oid = oidCurveP256 + case elliptic.P384(): + pk.ec.oid = oidCurveP384 + case elliptic.P521(): + pk.ec.oid = oidCurveP521 + default: + panic("unknown elliptic curve") + } + + pk.ec.p.bytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y) + + // The bit length is 3 (for the 0x04 specifying an uncompressed key) + // plus two field elements (for x and y), which are rounded up to the + // nearest byte. See https://tools.ietf.org/html/rfc6637#section-6 + fieldBytes := (pub.Curve.Params().BitSize + 7) & ^7 + pk.ec.p.bitLength = uint16(3 + fieldBytes + fieldBytes) + + pk.setFingerPrintAndKeyId() + return pk +} + +func (pk *PublicKey) parse(r io.Reader) (err error) { + // RFC 4880, section 5.5.2 + var buf [6]byte + _, err = readFull(r, buf[:]) + if err != nil { + return + } + if buf[0] != 4 { + return errors.UnsupportedError("public key version") + } + pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) + pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5]) + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + err = pk.parseRSA(r) + case PubKeyAlgoDSA: + err = pk.parseDSA(r) + case PubKeyAlgoElGamal: + err = pk.parseElGamal(r) + case PubKeyAlgoECDSA: + pk.ec = new(ecdsaKey) + if err = pk.ec.parse(r); err != nil { + return err + } + pk.PublicKey, err = pk.ec.newECDSA() + case PubKeyAlgoECDH: + pk.ec = new(ecdsaKey) + if err = pk.ec.parse(r); err != nil { + return + } + pk.ecdh = new(ecdhKdf) + if err = pk.ecdh.parse(r); err != nil { + return + } + // The ECDH key is stored in an ecdsa.PublicKey for convenience. + pk.PublicKey, err = pk.ec.newECDSA() + default: + err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) + } + if err != nil { + return + } + + pk.setFingerPrintAndKeyId() + return +} + +func (pk *PublicKey) setFingerPrintAndKeyId() { + // RFC 4880, section 12.2 + fingerPrint := sha1.New() + pk.SerializeSignaturePrefix(fingerPrint) + pk.serializeWithoutHeaders(fingerPrint) + copy(pk.Fingerprint[:], fingerPrint.Sum(nil)) + pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20]) +} + +// parseRSA parses RSA public key material from the given Reader. See RFC 4880, +// section 5.5.2. +func (pk *PublicKey) parseRSA(r io.Reader) (err error) { + pk.n.bytes, pk.n.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.e.bytes, pk.e.bitLength, err = readMPI(r) + if err != nil { + return + } + + if len(pk.e.bytes) > 3 { + err = errors.UnsupportedError("large public exponent") + return + } + rsa := &rsa.PublicKey{ + N: new(big.Int).SetBytes(pk.n.bytes), + E: 0, + } + for i := 0; i < len(pk.e.bytes); i++ { + rsa.E <<= 8 + rsa.E |= int(pk.e.bytes[i]) + } + pk.PublicKey = rsa + return +} + +// parseDSA parses DSA public key material from the given Reader. See RFC 4880, +// section 5.5.2. +func (pk *PublicKey) parseDSA(r io.Reader) (err error) { + pk.p.bytes, pk.p.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.q.bytes, pk.q.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.g.bytes, pk.g.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.y.bytes, pk.y.bitLength, err = readMPI(r) + if err != nil { + return + } + + dsa := new(dsa.PublicKey) + dsa.P = new(big.Int).SetBytes(pk.p.bytes) + dsa.Q = new(big.Int).SetBytes(pk.q.bytes) + dsa.G = new(big.Int).SetBytes(pk.g.bytes) + dsa.Y = new(big.Int).SetBytes(pk.y.bytes) + pk.PublicKey = dsa + return +} + +// parseElGamal parses ElGamal public key material from the given Reader. See +// RFC 4880, section 5.5.2. +func (pk *PublicKey) parseElGamal(r io.Reader) (err error) { + pk.p.bytes, pk.p.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.g.bytes, pk.g.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.y.bytes, pk.y.bitLength, err = readMPI(r) + if err != nil { + return + } + + elgamal := new(elgamal.PublicKey) + elgamal.P = new(big.Int).SetBytes(pk.p.bytes) + elgamal.G = new(big.Int).SetBytes(pk.g.bytes) + elgamal.Y = new(big.Int).SetBytes(pk.y.bytes) + pk.PublicKey = elgamal + return +} + +// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. +// The prefix is used when calculating a signature over this public key. See +// RFC 4880, section 5.2.4. +func (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) { + var pLength uint16 + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + pLength += 2 + uint16(len(pk.n.bytes)) + pLength += 2 + uint16(len(pk.e.bytes)) + case PubKeyAlgoDSA: + pLength += 2 + uint16(len(pk.p.bytes)) + pLength += 2 + uint16(len(pk.q.bytes)) + pLength += 2 + uint16(len(pk.g.bytes)) + pLength += 2 + uint16(len(pk.y.bytes)) + case PubKeyAlgoElGamal: + pLength += 2 + uint16(len(pk.p.bytes)) + pLength += 2 + uint16(len(pk.g.bytes)) + pLength += 2 + uint16(len(pk.y.bytes)) + case PubKeyAlgoECDSA: + pLength += uint16(pk.ec.byteLen()) + case PubKeyAlgoECDH: + pLength += uint16(pk.ec.byteLen()) + pLength += uint16(pk.ecdh.byteLen()) + default: + panic("unknown public key algorithm") + } + pLength += 6 + h.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) + return +} + +func (pk *PublicKey) Serialize(w io.Writer) (err error) { + length := 6 // 6 byte header + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + length += 2 + len(pk.n.bytes) + length += 2 + len(pk.e.bytes) + case PubKeyAlgoDSA: + length += 2 + len(pk.p.bytes) + length += 2 + len(pk.q.bytes) + length += 2 + len(pk.g.bytes) + length += 2 + len(pk.y.bytes) + case PubKeyAlgoElGamal: + length += 2 + len(pk.p.bytes) + length += 2 + len(pk.g.bytes) + length += 2 + len(pk.y.bytes) + case PubKeyAlgoECDSA: + length += pk.ec.byteLen() + case PubKeyAlgoECDH: + length += pk.ec.byteLen() + length += pk.ecdh.byteLen() + default: + panic("unknown public key algorithm") + } + + packetType := packetTypePublicKey + if pk.IsSubkey { + packetType = packetTypePublicSubkey + } + err = serializeHeader(w, packetType, length) + if err != nil { + return + } + return pk.serializeWithoutHeaders(w) +} + +// serializeWithoutHeaders marshals the PublicKey to w in the form of an +// OpenPGP public key packet, not including the packet header. +func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) { + var buf [6]byte + buf[0] = 4 + t := uint32(pk.CreationTime.Unix()) + buf[1] = byte(t >> 24) + buf[2] = byte(t >> 16) + buf[3] = byte(t >> 8) + buf[4] = byte(t) + buf[5] = byte(pk.PubKeyAlgo) + + _, err = w.Write(buf[:]) + if err != nil { + return + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + return writeMPIs(w, pk.n, pk.e) + case PubKeyAlgoDSA: + return writeMPIs(w, pk.p, pk.q, pk.g, pk.y) + case PubKeyAlgoElGamal: + return writeMPIs(w, pk.p, pk.g, pk.y) + case PubKeyAlgoECDSA: + return pk.ec.serialize(w) + case PubKeyAlgoECDH: + if err = pk.ec.serialize(w); err != nil { + return + } + return pk.ecdh.serialize(w) + } + return errors.InvalidArgumentError("bad public-key algorithm") +} + +// CanSign returns true iff this public key can generate signatures +func (pk *PublicKey) CanSign() bool { + return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal +} + +// VerifySignature returns nil iff sig is a valid signature, made by this +// public key, of the data hashed into signed. signed is mutated by this call. +func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) { + if !pk.CanSign() { + return errors.InvalidArgumentError("public key cannot generate signatures") + } + + signed.Write(sig.HashSuffix) + hashBytes := signed.Sum(nil) + + if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { + return errors.SignatureError("hash tag doesn't match") + } + + if pk.PubKeyAlgo != sig.PubKeyAlgo { + return errors.InvalidArgumentError("public key and signature use different algorithms") + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey) + err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)) + if err != nil { + return errors.SignatureError("RSA verification failure") + } + return nil + case PubKeyAlgoDSA: + dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey) + // Need to truncate hashBytes to match FIPS 186-3 section 4.6. + subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 + if len(hashBytes) > subgroupSize { + hashBytes = hashBytes[:subgroupSize] + } + if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { + return errors.SignatureError("DSA verification failure") + } + return nil + case PubKeyAlgoECDSA: + ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey) + if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.bytes), new(big.Int).SetBytes(sig.ECDSASigS.bytes)) { + return errors.SignatureError("ECDSA verification failure") + } + return nil + default: + return errors.SignatureError("Unsupported public key algorithm used in signature") + } +} + +// VerifySignatureV3 returns nil iff sig is a valid signature, made by this +// public key, of the data hashed into signed. signed is mutated by this call. +func (pk *PublicKey) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { + if !pk.CanSign() { + return errors.InvalidArgumentError("public key cannot generate signatures") + } + + suffix := make([]byte, 5) + suffix[0] = byte(sig.SigType) + binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) + signed.Write(suffix) + hashBytes := signed.Sum(nil) + + if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { + return errors.SignatureError("hash tag doesn't match") + } + + if pk.PubKeyAlgo != sig.PubKeyAlgo { + return errors.InvalidArgumentError("public key and signature use different algorithms") + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + rsaPublicKey := pk.PublicKey.(*rsa.PublicKey) + if err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)); err != nil { + return errors.SignatureError("RSA verification failure") + } + return + case PubKeyAlgoDSA: + dsaPublicKey := pk.PublicKey.(*dsa.PublicKey) + // Need to truncate hashBytes to match FIPS 186-3 section 4.6. + subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 + if len(hashBytes) > subgroupSize { + hashBytes = hashBytes[:subgroupSize] + } + if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { + return errors.SignatureError("DSA verification failure") + } + return nil + default: + panic("shouldn't happen") + } +} + +// keySignatureHash returns a Hash of the message that needs to be signed for +// pk to assert a subkey relationship to signed. +func keySignatureHash(pk, signed signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { + if !hashFunc.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hashFunc.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + signed.SerializeSignaturePrefix(h) + signed.serializeWithoutHeaders(h) + return +} + +// VerifyKeySignature returns nil iff sig is a valid signature, made by this +// public key, of signed. +func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error { + h, err := keySignatureHash(pk, signed, sig.Hash) + if err != nil { + return err + } + if err = pk.VerifySignature(h, sig); err != nil { + return err + } + + if sig.FlagSign { + // Signing subkeys must be cross-signed. See + // https://www.gnupg.org/faq/subkey-cross-certify.html. + if sig.EmbeddedSignature == nil { + return errors.StructuralError("signing subkey is missing cross-signature") + } + // Verify the cross-signature. This is calculated over the same + // data as the main signature, so we cannot just recursively + // call signed.VerifyKeySignature(...) + if h, err = keySignatureHash(pk, signed, sig.EmbeddedSignature.Hash); err != nil { + return errors.StructuralError("error while hashing for cross-signature: " + err.Error()) + } + if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil { + return errors.StructuralError("error while verifying cross-signature: " + err.Error()) + } + } + + return nil +} + +func keyRevocationHash(pk signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { + if !hashFunc.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hashFunc.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + + return +} + +// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this +// public key. +func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) { + h, err := keyRevocationHash(pk, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignature(h, sig) +} + +// userIdSignatureHash returns a Hash of the message that needs to be signed +// to assert that pk is a valid key for id. +func userIdSignatureHash(id string, pk *PublicKey, hashFunc crypto.Hash) (h hash.Hash, err error) { + if !hashFunc.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hashFunc.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + + var buf [5]byte + buf[0] = 0xb4 + buf[1] = byte(len(id) >> 24) + buf[2] = byte(len(id) >> 16) + buf[3] = byte(len(id) >> 8) + buf[4] = byte(len(id)) + h.Write(buf[:]) + h.Write([]byte(id)) + + return +} + +// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this +// public key, that id is the identity of pub. +func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) { + h, err := userIdSignatureHash(id, pub, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignature(h, sig) +} + +// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this +// public key, that id is the identity of pub. +func (pk *PublicKey) VerifyUserIdSignatureV3(id string, pub *PublicKey, sig *SignatureV3) (err error) { + h, err := userIdSignatureV3Hash(id, pub, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignatureV3(h, sig) +} + +// KeyIdString returns the public key's fingerprint in capital hex +// (e.g. "6C7EE1B8621CC013"). +func (pk *PublicKey) KeyIdString() string { + return fmt.Sprintf("%X", pk.Fingerprint[12:20]) +} + +// KeyIdShortString returns the short form of public key's fingerprint +// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). +func (pk *PublicKey) KeyIdShortString() string { + return fmt.Sprintf("%X", pk.Fingerprint[16:20]) +} + +// A parsedMPI is used to store the contents of a big integer, along with the +// bit length that was specified in the original input. This allows the MPI to +// be reserialized exactly. +type parsedMPI struct { + bytes []byte + bitLength uint16 +} + +// writeMPIs is a utility function for serializing several big integers to the +// given Writer. +func writeMPIs(w io.Writer, mpis ...parsedMPI) (err error) { + for _, mpi := range mpis { + err = writeMPI(w, mpi.bitLength, mpi.bytes) + if err != nil { + return + } + } + return +} + +// BitLength returns the bit length for the given public key. +func (pk *PublicKey) BitLength() (bitLength uint16, err error) { + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + bitLength = pk.n.bitLength + case PubKeyAlgoDSA: + bitLength = pk.p.bitLength + case PubKeyAlgoElGamal: + bitLength = pk.p.bitLength + default: + err = errors.InvalidArgumentError("bad public-key algorithm") + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go b/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go new file mode 100644 index 000000000..5daf7b6cf --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go @@ -0,0 +1,279 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "crypto/md5" + "crypto/rsa" + "encoding/binary" + "fmt" + "hash" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/errors" +) + +// PublicKeyV3 represents older, version 3 public keys. These keys are less secure and +// should not be used for signing or encrypting. They are supported here only for +// parsing version 3 key material and validating signatures. +// See RFC 4880, section 5.5.2. +type PublicKeyV3 struct { + CreationTime time.Time + DaysToExpire uint16 + PubKeyAlgo PublicKeyAlgorithm + PublicKey *rsa.PublicKey + Fingerprint [16]byte + KeyId uint64 + IsSubkey bool + + n, e parsedMPI +} + +// newRSAPublicKeyV3 returns a PublicKey that wraps the given rsa.PublicKey. +// Included here for testing purposes only. RFC 4880, section 5.5.2: +// "an implementation MUST NOT generate a V3 key, but MAY accept it." +func newRSAPublicKeyV3(creationTime time.Time, pub *rsa.PublicKey) *PublicKeyV3 { + pk := &PublicKeyV3{ + CreationTime: creationTime, + PublicKey: pub, + n: fromBig(pub.N), + e: fromBig(big.NewInt(int64(pub.E))), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +func (pk *PublicKeyV3) parse(r io.Reader) (err error) { + // RFC 4880, section 5.5.2 + var buf [8]byte + if _, err = readFull(r, buf[:]); err != nil { + return + } + if buf[0] < 2 || buf[0] > 3 { + return errors.UnsupportedError("public key version") + } + pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) + pk.DaysToExpire = binary.BigEndian.Uint16(buf[5:7]) + pk.PubKeyAlgo = PublicKeyAlgorithm(buf[7]) + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + err = pk.parseRSA(r) + default: + err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) + } + if err != nil { + return + } + + pk.setFingerPrintAndKeyId() + return +} + +func (pk *PublicKeyV3) setFingerPrintAndKeyId() { + // RFC 4880, section 12.2 + fingerPrint := md5.New() + fingerPrint.Write(pk.n.bytes) + fingerPrint.Write(pk.e.bytes) + fingerPrint.Sum(pk.Fingerprint[:0]) + pk.KeyId = binary.BigEndian.Uint64(pk.n.bytes[len(pk.n.bytes)-8:]) +} + +// parseRSA parses RSA public key material from the given Reader. See RFC 4880, +// section 5.5.2. +func (pk *PublicKeyV3) parseRSA(r io.Reader) (err error) { + if pk.n.bytes, pk.n.bitLength, err = readMPI(r); err != nil { + return + } + if pk.e.bytes, pk.e.bitLength, err = readMPI(r); err != nil { + return + } + + // RFC 4880 Section 12.2 requires the low 8 bytes of the + // modulus to form the key id. + if len(pk.n.bytes) < 8 { + return errors.StructuralError("v3 public key modulus is too short") + } + if len(pk.e.bytes) > 3 { + err = errors.UnsupportedError("large public exponent") + return + } + rsa := &rsa.PublicKey{N: new(big.Int).SetBytes(pk.n.bytes)} + for i := 0; i < len(pk.e.bytes); i++ { + rsa.E <<= 8 + rsa.E |= int(pk.e.bytes[i]) + } + pk.PublicKey = rsa + return +} + +// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. +// The prefix is used when calculating a signature over this public key. See +// RFC 4880, section 5.2.4. +func (pk *PublicKeyV3) SerializeSignaturePrefix(w io.Writer) { + var pLength uint16 + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + pLength += 2 + uint16(len(pk.n.bytes)) + pLength += 2 + uint16(len(pk.e.bytes)) + default: + panic("unknown public key algorithm") + } + pLength += 6 + w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) + return +} + +func (pk *PublicKeyV3) Serialize(w io.Writer) (err error) { + length := 8 // 8 byte header + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + length += 2 + len(pk.n.bytes) + length += 2 + len(pk.e.bytes) + default: + panic("unknown public key algorithm") + } + + packetType := packetTypePublicKey + if pk.IsSubkey { + packetType = packetTypePublicSubkey + } + if err = serializeHeader(w, packetType, length); err != nil { + return + } + return pk.serializeWithoutHeaders(w) +} + +// serializeWithoutHeaders marshals the PublicKey to w in the form of an +// OpenPGP public key packet, not including the packet header. +func (pk *PublicKeyV3) serializeWithoutHeaders(w io.Writer) (err error) { + var buf [8]byte + // Version 3 + buf[0] = 3 + // Creation time + t := uint32(pk.CreationTime.Unix()) + buf[1] = byte(t >> 24) + buf[2] = byte(t >> 16) + buf[3] = byte(t >> 8) + buf[4] = byte(t) + // Days to expire + buf[5] = byte(pk.DaysToExpire >> 8) + buf[6] = byte(pk.DaysToExpire) + // Public key algorithm + buf[7] = byte(pk.PubKeyAlgo) + + if _, err = w.Write(buf[:]); err != nil { + return + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + return writeMPIs(w, pk.n, pk.e) + } + return errors.InvalidArgumentError("bad public-key algorithm") +} + +// CanSign returns true iff this public key can generate signatures +func (pk *PublicKeyV3) CanSign() bool { + return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly +} + +// VerifySignatureV3 returns nil iff sig is a valid signature, made by this +// public key, of the data hashed into signed. signed is mutated by this call. +func (pk *PublicKeyV3) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { + if !pk.CanSign() { + return errors.InvalidArgumentError("public key cannot generate signatures") + } + + suffix := make([]byte, 5) + suffix[0] = byte(sig.SigType) + binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) + signed.Write(suffix) + hashBytes := signed.Sum(nil) + + if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { + return errors.SignatureError("hash tag doesn't match") + } + + if pk.PubKeyAlgo != sig.PubKeyAlgo { + return errors.InvalidArgumentError("public key and signature use different algorithms") + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + if err = rsa.VerifyPKCS1v15(pk.PublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil { + return errors.SignatureError("RSA verification failure") + } + return + default: + // V3 public keys only support RSA. + panic("shouldn't happen") + } +} + +// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this +// public key, that id is the identity of pub. +func (pk *PublicKeyV3) VerifyUserIdSignatureV3(id string, pub *PublicKeyV3, sig *SignatureV3) (err error) { + h, err := userIdSignatureV3Hash(id, pk, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignatureV3(h, sig) +} + +// VerifyKeySignatureV3 returns nil iff sig is a valid signature, made by this +// public key, of signed. +func (pk *PublicKeyV3) VerifyKeySignatureV3(signed *PublicKeyV3, sig *SignatureV3) (err error) { + h, err := keySignatureHash(pk, signed, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignatureV3(h, sig) +} + +// userIdSignatureV3Hash returns a Hash of the message that needs to be signed +// to assert that pk is a valid key for id. +func userIdSignatureV3Hash(id string, pk signingKey, hfn crypto.Hash) (h hash.Hash, err error) { + if !hfn.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hfn.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + + h.Write([]byte(id)) + + return +} + +// KeyIdString returns the public key's fingerprint in capital hex +// (e.g. "6C7EE1B8621CC013"). +func (pk *PublicKeyV3) KeyIdString() string { + return fmt.Sprintf("%X", pk.KeyId) +} + +// KeyIdShortString returns the short form of public key's fingerprint +// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). +func (pk *PublicKeyV3) KeyIdShortString() string { + return fmt.Sprintf("%X", pk.KeyId&0xFFFFFFFF) +} + +// BitLength returns the bit length for the given public key. +func (pk *PublicKeyV3) BitLength() (bitLength uint16, err error) { + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + bitLength = pk.n.bitLength + default: + err = errors.InvalidArgumentError("bad public-key algorithm") + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/reader.go b/vendor/golang.org/x/crypto/openpgp/packet/reader.go new file mode 100644 index 000000000..34bc7c613 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/reader.go @@ -0,0 +1,76 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "golang.org/x/crypto/openpgp/errors" + "io" +) + +// Reader reads packets from an io.Reader and allows packets to be 'unread' so +// that they result from the next call to Next. +type Reader struct { + q []Packet + readers []io.Reader +} + +// New io.Readers are pushed when a compressed or encrypted packet is processed +// and recursively treated as a new source of packets. However, a carefully +// crafted packet can trigger an infinite recursive sequence of packets. See +// http://mumble.net/~campbell/misc/pgp-quine +// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402 +// This constant limits the number of recursive packets that may be pushed. +const maxReaders = 32 + +// Next returns the most recently unread Packet, or reads another packet from +// the top-most io.Reader. Unknown packet types are skipped. +func (r *Reader) Next() (p Packet, err error) { + if len(r.q) > 0 { + p = r.q[len(r.q)-1] + r.q = r.q[:len(r.q)-1] + return + } + + for len(r.readers) > 0 { + p, err = Read(r.readers[len(r.readers)-1]) + if err == nil { + return + } + if err == io.EOF { + r.readers = r.readers[:len(r.readers)-1] + continue + } + if _, ok := err.(errors.UnknownPacketTypeError); !ok { + return nil, err + } + } + + return nil, io.EOF +} + +// Push causes the Reader to start reading from a new io.Reader. When an EOF +// error is seen from the new io.Reader, it is popped and the Reader continues +// to read from the next most recent io.Reader. Push returns a StructuralError +// if pushing the reader would exceed the maximum recursion level, otherwise it +// returns nil. +func (r *Reader) Push(reader io.Reader) (err error) { + if len(r.readers) >= maxReaders { + return errors.StructuralError("too many layers of packets") + } + r.readers = append(r.readers, reader) + return nil +} + +// Unread causes the given Packet to be returned from the next call to Next. +func (r *Reader) Unread(p Packet) { + r.q = append(r.q, p) +} + +func NewReader(r io.Reader) *Reader { + return &Reader{ + q: nil, + readers: []io.Reader{r}, + } +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature.go b/vendor/golang.org/x/crypto/openpgp/packet/signature.go new file mode 100644 index 000000000..b2a24a532 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/signature.go @@ -0,0 +1,731 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "encoding/asn1" + "encoding/binary" + "hash" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +const ( + // See RFC 4880, section 5.2.3.21 for details. + KeyFlagCertify = 1 << iota + KeyFlagSign + KeyFlagEncryptCommunications + KeyFlagEncryptStorage +) + +// Signature represents a signature. See RFC 4880, section 5.2. +type Signature struct { + SigType SignatureType + PubKeyAlgo PublicKeyAlgorithm + Hash crypto.Hash + + // HashSuffix is extra data that is hashed in after the signed data. + HashSuffix []byte + // HashTag contains the first two bytes of the hash for fast rejection + // of bad signed data. + HashTag [2]byte + CreationTime time.Time + + RSASignature parsedMPI + DSASigR, DSASigS parsedMPI + ECDSASigR, ECDSASigS parsedMPI + + // rawSubpackets contains the unparsed subpackets, in order. + rawSubpackets []outputSubpacket + + // The following are optional so are nil when not included in the + // signature. + + SigLifetimeSecs, KeyLifetimeSecs *uint32 + PreferredSymmetric, PreferredHash, PreferredCompression []uint8 + IssuerKeyId *uint64 + IsPrimaryId *bool + + // FlagsValid is set if any flags were given. See RFC 4880, section + // 5.2.3.21 for details. + FlagsValid bool + FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage bool + + // RevocationReason is set if this signature has been revoked. + // See RFC 4880, section 5.2.3.23 for details. + RevocationReason *uint8 + RevocationReasonText string + + // MDC is set if this signature has a feature packet that indicates + // support for MDC subpackets. + MDC bool + + // EmbeddedSignature, if non-nil, is a signature of the parent key, by + // this key. This prevents an attacker from claiming another's signing + // subkey as their own. + EmbeddedSignature *Signature + + outSubpackets []outputSubpacket +} + +func (sig *Signature) parse(r io.Reader) (err error) { + // RFC 4880, section 5.2.3 + var buf [5]byte + _, err = readFull(r, buf[:1]) + if err != nil { + return + } + if buf[0] != 4 { + err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) + return + } + + _, err = readFull(r, buf[:5]) + if err != nil { + return + } + sig.SigType = SignatureType(buf[0]) + sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1]) + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: + default: + err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) + return + } + + var ok bool + sig.Hash, ok = s2k.HashIdToHash(buf[2]) + if !ok { + return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) + } + + hashedSubpacketsLength := int(buf[3])<<8 | int(buf[4]) + l := 6 + hashedSubpacketsLength + sig.HashSuffix = make([]byte, l+6) + sig.HashSuffix[0] = 4 + copy(sig.HashSuffix[1:], buf[:5]) + hashedSubpackets := sig.HashSuffix[6:l] + _, err = readFull(r, hashedSubpackets) + if err != nil { + return + } + // See RFC 4880, section 5.2.4 + trailer := sig.HashSuffix[l:] + trailer[0] = 4 + trailer[1] = 0xff + trailer[2] = uint8(l >> 24) + trailer[3] = uint8(l >> 16) + trailer[4] = uint8(l >> 8) + trailer[5] = uint8(l) + + err = parseSignatureSubpackets(sig, hashedSubpackets, true) + if err != nil { + return + } + + _, err = readFull(r, buf[:2]) + if err != nil { + return + } + unhashedSubpacketsLength := int(buf[0])<<8 | int(buf[1]) + unhashedSubpackets := make([]byte, unhashedSubpacketsLength) + _, err = readFull(r, unhashedSubpackets) + if err != nil { + return + } + err = parseSignatureSubpackets(sig, unhashedSubpackets, false) + if err != nil { + return + } + + _, err = readFull(r, sig.HashTag[:2]) + if err != nil { + return + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) + case PubKeyAlgoDSA: + sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r) + if err == nil { + sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) + } + case PubKeyAlgoECDSA: + sig.ECDSASigR.bytes, sig.ECDSASigR.bitLength, err = readMPI(r) + if err == nil { + sig.ECDSASigS.bytes, sig.ECDSASigS.bitLength, err = readMPI(r) + } + default: + panic("unreachable") + } + return +} + +// parseSignatureSubpackets parses subpackets of the main signature packet. See +// RFC 4880, section 5.2.3.1. +func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) { + for len(subpackets) > 0 { + subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed) + if err != nil { + return + } + } + + if sig.CreationTime.IsZero() { + err = errors.StructuralError("no creation time in signature") + } + + return +} + +type signatureSubpacketType uint8 + +const ( + creationTimeSubpacket signatureSubpacketType = 2 + signatureExpirationSubpacket signatureSubpacketType = 3 + keyExpirationSubpacket signatureSubpacketType = 9 + prefSymmetricAlgosSubpacket signatureSubpacketType = 11 + issuerSubpacket signatureSubpacketType = 16 + prefHashAlgosSubpacket signatureSubpacketType = 21 + prefCompressionSubpacket signatureSubpacketType = 22 + primaryUserIdSubpacket signatureSubpacketType = 25 + keyFlagsSubpacket signatureSubpacketType = 27 + reasonForRevocationSubpacket signatureSubpacketType = 29 + featuresSubpacket signatureSubpacketType = 30 + embeddedSignatureSubpacket signatureSubpacketType = 32 +) + +// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1. +func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) { + // RFC 4880, section 5.2.3.1 + var ( + length uint32 + packetType signatureSubpacketType + isCritical bool + ) + switch { + case subpacket[0] < 192: + length = uint32(subpacket[0]) + subpacket = subpacket[1:] + case subpacket[0] < 255: + if len(subpacket) < 2 { + goto Truncated + } + length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192 + subpacket = subpacket[2:] + default: + if len(subpacket) < 5 { + goto Truncated + } + length = uint32(subpacket[1])<<24 | + uint32(subpacket[2])<<16 | + uint32(subpacket[3])<<8 | + uint32(subpacket[4]) + subpacket = subpacket[5:] + } + if length > uint32(len(subpacket)) { + goto Truncated + } + rest = subpacket[length:] + subpacket = subpacket[:length] + if len(subpacket) == 0 { + err = errors.StructuralError("zero length signature subpacket") + return + } + packetType = signatureSubpacketType(subpacket[0] & 0x7f) + isCritical = subpacket[0]&0x80 == 0x80 + subpacket = subpacket[1:] + sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket}) + switch packetType { + case creationTimeSubpacket: + if !isHashed { + err = errors.StructuralError("signature creation time in non-hashed area") + return + } + if len(subpacket) != 4 { + err = errors.StructuralError("signature creation time not four bytes") + return + } + t := binary.BigEndian.Uint32(subpacket) + sig.CreationTime = time.Unix(int64(t), 0) + case signatureExpirationSubpacket: + // Signature expiration time, section 5.2.3.10 + if !isHashed { + return + } + if len(subpacket) != 4 { + err = errors.StructuralError("expiration subpacket with bad length") + return + } + sig.SigLifetimeSecs = new(uint32) + *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket) + case keyExpirationSubpacket: + // Key expiration time, section 5.2.3.6 + if !isHashed { + return + } + if len(subpacket) != 4 { + err = errors.StructuralError("key expiration subpacket with bad length") + return + } + sig.KeyLifetimeSecs = new(uint32) + *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket) + case prefSymmetricAlgosSubpacket: + // Preferred symmetric algorithms, section 5.2.3.7 + if !isHashed { + return + } + sig.PreferredSymmetric = make([]byte, len(subpacket)) + copy(sig.PreferredSymmetric, subpacket) + case issuerSubpacket: + // Issuer, section 5.2.3.5 + if len(subpacket) != 8 { + err = errors.StructuralError("issuer subpacket with bad length") + return + } + sig.IssuerKeyId = new(uint64) + *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket) + case prefHashAlgosSubpacket: + // Preferred hash algorithms, section 5.2.3.8 + if !isHashed { + return + } + sig.PreferredHash = make([]byte, len(subpacket)) + copy(sig.PreferredHash, subpacket) + case prefCompressionSubpacket: + // Preferred compression algorithms, section 5.2.3.9 + if !isHashed { + return + } + sig.PreferredCompression = make([]byte, len(subpacket)) + copy(sig.PreferredCompression, subpacket) + case primaryUserIdSubpacket: + // Primary User ID, section 5.2.3.19 + if !isHashed { + return + } + if len(subpacket) != 1 { + err = errors.StructuralError("primary user id subpacket with bad length") + return + } + sig.IsPrimaryId = new(bool) + if subpacket[0] > 0 { + *sig.IsPrimaryId = true + } + case keyFlagsSubpacket: + // Key flags, section 5.2.3.21 + if !isHashed { + return + } + if len(subpacket) == 0 { + err = errors.StructuralError("empty key flags subpacket") + return + } + sig.FlagsValid = true + if subpacket[0]&KeyFlagCertify != 0 { + sig.FlagCertify = true + } + if subpacket[0]&KeyFlagSign != 0 { + sig.FlagSign = true + } + if subpacket[0]&KeyFlagEncryptCommunications != 0 { + sig.FlagEncryptCommunications = true + } + if subpacket[0]&KeyFlagEncryptStorage != 0 { + sig.FlagEncryptStorage = true + } + case reasonForRevocationSubpacket: + // Reason For Revocation, section 5.2.3.23 + if !isHashed { + return + } + if len(subpacket) == 0 { + err = errors.StructuralError("empty revocation reason subpacket") + return + } + sig.RevocationReason = new(uint8) + *sig.RevocationReason = subpacket[0] + sig.RevocationReasonText = string(subpacket[1:]) + case featuresSubpacket: + // Features subpacket, section 5.2.3.24 specifies a very general + // mechanism for OpenPGP implementations to signal support for new + // features. In practice, the subpacket is used exclusively to + // indicate support for MDC-protected encryption. + sig.MDC = len(subpacket) >= 1 && subpacket[0]&1 == 1 + case embeddedSignatureSubpacket: + // Only usage is in signatures that cross-certify + // signing subkeys. section 5.2.3.26 describes the + // format, with its usage described in section 11.1 + if sig.EmbeddedSignature != nil { + err = errors.StructuralError("Cannot have multiple embedded signatures") + return + } + sig.EmbeddedSignature = new(Signature) + // Embedded signatures are required to be v4 signatures see + // section 12.1. However, we only parse v4 signatures in this + // file anyway. + if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil { + return nil, err + } + if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding { + return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType))) + } + default: + if isCritical { + err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType))) + return + } + } + return + +Truncated: + err = errors.StructuralError("signature subpacket truncated") + return +} + +// subpacketLengthLength returns the length, in bytes, of an encoded length value. +func subpacketLengthLength(length int) int { + if length < 192 { + return 1 + } + if length < 16320 { + return 2 + } + return 5 +} + +// serializeSubpacketLength marshals the given length into to. +func serializeSubpacketLength(to []byte, length int) int { + // RFC 4880, Section 4.2.2. + if length < 192 { + to[0] = byte(length) + return 1 + } + if length < 16320 { + length -= 192 + to[0] = byte((length >> 8) + 192) + to[1] = byte(length) + return 2 + } + to[0] = 255 + to[1] = byte(length >> 24) + to[2] = byte(length >> 16) + to[3] = byte(length >> 8) + to[4] = byte(length) + return 5 +} + +// subpacketsLength returns the serialized length, in bytes, of the given +// subpackets. +func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) { + for _, subpacket := range subpackets { + if subpacket.hashed == hashed { + length += subpacketLengthLength(len(subpacket.contents) + 1) + length += 1 // type byte + length += len(subpacket.contents) + } + } + return +} + +// serializeSubpackets marshals the given subpackets into to. +func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) { + for _, subpacket := range subpackets { + if subpacket.hashed == hashed { + n := serializeSubpacketLength(to, len(subpacket.contents)+1) + to[n] = byte(subpacket.subpacketType) + to = to[1+n:] + n = copy(to, subpacket.contents) + to = to[n:] + } + } + return +} + +// KeyExpired returns whether sig is a self-signature of a key that has +// expired. +func (sig *Signature) KeyExpired(currentTime time.Time) bool { + if sig.KeyLifetimeSecs == nil { + return false + } + expiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second) + return currentTime.After(expiry) +} + +// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing. +func (sig *Signature) buildHashSuffix() (err error) { + hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true) + + var ok bool + l := 6 + hashedSubpacketsLen + sig.HashSuffix = make([]byte, l+6) + sig.HashSuffix[0] = 4 + sig.HashSuffix[1] = uint8(sig.SigType) + sig.HashSuffix[2] = uint8(sig.PubKeyAlgo) + sig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash) + if !ok { + sig.HashSuffix = nil + return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash))) + } + sig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8) + sig.HashSuffix[5] = byte(hashedSubpacketsLen) + serializeSubpackets(sig.HashSuffix[6:l], sig.outSubpackets, true) + trailer := sig.HashSuffix[l:] + trailer[0] = 4 + trailer[1] = 0xff + trailer[2] = byte(l >> 24) + trailer[3] = byte(l >> 16) + trailer[4] = byte(l >> 8) + trailer[5] = byte(l) + return +} + +func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) { + err = sig.buildHashSuffix() + if err != nil { + return + } + + h.Write(sig.HashSuffix) + digest = h.Sum(nil) + copy(sig.HashTag[:], digest) + return +} + +// Sign signs a message with a private key. The hash, h, must contain +// the hash of the message to be signed and will be mutated by this function. +// On success, the signature is stored in sig. Call Serialize to write it out. +// If config is nil, sensible defaults will be used. +func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) { + sig.outSubpackets = sig.buildSubpackets() + digest, err := sig.signPrepareHash(h) + if err != nil { + return + } + + switch priv.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + // supports both *rsa.PrivateKey and crypto.Signer + sig.RSASignature.bytes, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) + sig.RSASignature.bitLength = uint16(8 * len(sig.RSASignature.bytes)) + case PubKeyAlgoDSA: + dsaPriv := priv.PrivateKey.(*dsa.PrivateKey) + + // Need to truncate hashBytes to match FIPS 186-3 section 4.6. + subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8 + if len(digest) > subgroupSize { + digest = digest[:subgroupSize] + } + r, s, err := dsa.Sign(config.Random(), dsaPriv, digest) + if err == nil { + sig.DSASigR.bytes = r.Bytes() + sig.DSASigR.bitLength = uint16(8 * len(sig.DSASigR.bytes)) + sig.DSASigS.bytes = s.Bytes() + sig.DSASigS.bitLength = uint16(8 * len(sig.DSASigS.bytes)) + } + case PubKeyAlgoECDSA: + var r, s *big.Int + if pk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok { + // direct support, avoid asn1 wrapping/unwrapping + r, s, err = ecdsa.Sign(config.Random(), pk, digest) + } else { + var b []byte + b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) + if err == nil { + r, s, err = unwrapECDSASig(b) + } + } + if err == nil { + sig.ECDSASigR = fromBig(r) + sig.ECDSASigS = fromBig(s) + } + default: + err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo))) + } + + return +} + +// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA +// signature. +func unwrapECDSASig(b []byte) (r, s *big.Int, err error) { + var ecsdaSig struct { + R, S *big.Int + } + _, err = asn1.Unmarshal(b, &ecsdaSig) + if err != nil { + return + } + return ecsdaSig.R, ecsdaSig.S, nil +} + +// SignUserId computes a signature from priv, asserting that pub is a valid +// key for the identity id. On success, the signature is stored in sig. Call +// Serialize to write it out. +// If config is nil, sensible defaults will be used. +func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error { + h, err := userIdSignatureHash(id, pub, sig.Hash) + if err != nil { + return err + } + return sig.Sign(h, priv, config) +} + +// SignKey computes a signature from priv, asserting that pub is a subkey. On +// success, the signature is stored in sig. Call Serialize to write it out. +// If config is nil, sensible defaults will be used. +func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error { + h, err := keySignatureHash(&priv.PublicKey, pub, sig.Hash) + if err != nil { + return err + } + return sig.Sign(h, priv, config) +} + +// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been +// called first. +func (sig *Signature) Serialize(w io.Writer) (err error) { + if len(sig.outSubpackets) == 0 { + sig.outSubpackets = sig.rawSubpackets + } + if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil && sig.ECDSASigR.bytes == nil { + return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") + } + + sigLength := 0 + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + sigLength = 2 + len(sig.RSASignature.bytes) + case PubKeyAlgoDSA: + sigLength = 2 + len(sig.DSASigR.bytes) + sigLength += 2 + len(sig.DSASigS.bytes) + case PubKeyAlgoECDSA: + sigLength = 2 + len(sig.ECDSASigR.bytes) + sigLength += 2 + len(sig.ECDSASigS.bytes) + default: + panic("impossible") + } + + unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false) + length := len(sig.HashSuffix) - 6 /* trailer not included */ + + 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen + + 2 /* hash tag */ + sigLength + err = serializeHeader(w, packetTypeSignature, length) + if err != nil { + return + } + + _, err = w.Write(sig.HashSuffix[:len(sig.HashSuffix)-6]) + if err != nil { + return + } + + unhashedSubpackets := make([]byte, 2+unhashedSubpacketsLen) + unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8) + unhashedSubpackets[1] = byte(unhashedSubpacketsLen) + serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false) + + _, err = w.Write(unhashedSubpackets) + if err != nil { + return + } + _, err = w.Write(sig.HashTag[:]) + if err != nil { + return + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + err = writeMPIs(w, sig.RSASignature) + case PubKeyAlgoDSA: + err = writeMPIs(w, sig.DSASigR, sig.DSASigS) + case PubKeyAlgoECDSA: + err = writeMPIs(w, sig.ECDSASigR, sig.ECDSASigS) + default: + panic("impossible") + } + return +} + +// outputSubpacket represents a subpacket to be marshaled. +type outputSubpacket struct { + hashed bool // true if this subpacket is in the hashed area. + subpacketType signatureSubpacketType + isCritical bool + contents []byte +} + +func (sig *Signature) buildSubpackets() (subpackets []outputSubpacket) { + creationTime := make([]byte, 4) + binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix())) + subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime}) + + if sig.IssuerKeyId != nil { + keyId := make([]byte, 8) + binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId) + subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId}) + } + + if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 { + sigLifetime := make([]byte, 4) + binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs) + subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime}) + } + + // Key flags may only appear in self-signatures or certification signatures. + + if sig.FlagsValid { + var flags byte + if sig.FlagCertify { + flags |= KeyFlagCertify + } + if sig.FlagSign { + flags |= KeyFlagSign + } + if sig.FlagEncryptCommunications { + flags |= KeyFlagEncryptCommunications + } + if sig.FlagEncryptStorage { + flags |= KeyFlagEncryptStorage + } + subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}}) + } + + // The following subpackets may only appear in self-signatures + + if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 { + keyLifetime := make([]byte, 4) + binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs) + subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime}) + } + + if sig.IsPrimaryId != nil && *sig.IsPrimaryId { + subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}}) + } + + if len(sig.PreferredSymmetric) > 0 { + subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric}) + } + + if len(sig.PreferredHash) > 0 { + subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash}) + } + + if len(sig.PreferredCompression) > 0 { + subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression}) + } + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go b/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go new file mode 100644 index 000000000..6edff8893 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go @@ -0,0 +1,146 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "encoding/binary" + "fmt" + "io" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +// SignatureV3 represents older version 3 signatures. These signatures are less secure +// than version 4 and should not be used to create new signatures. They are included +// here for backwards compatibility to read and validate with older key material. +// See RFC 4880, section 5.2.2. +type SignatureV3 struct { + SigType SignatureType + CreationTime time.Time + IssuerKeyId uint64 + PubKeyAlgo PublicKeyAlgorithm + Hash crypto.Hash + HashTag [2]byte + + RSASignature parsedMPI + DSASigR, DSASigS parsedMPI +} + +func (sig *SignatureV3) parse(r io.Reader) (err error) { + // RFC 4880, section 5.2.2 + var buf [8]byte + if _, err = readFull(r, buf[:1]); err != nil { + return + } + if buf[0] < 2 || buf[0] > 3 { + err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) + return + } + if _, err = readFull(r, buf[:1]); err != nil { + return + } + if buf[0] != 5 { + err = errors.UnsupportedError( + "invalid hashed material length " + strconv.Itoa(int(buf[0]))) + return + } + + // Read hashed material: signature type + creation time + if _, err = readFull(r, buf[:5]); err != nil { + return + } + sig.SigType = SignatureType(buf[0]) + t := binary.BigEndian.Uint32(buf[1:5]) + sig.CreationTime = time.Unix(int64(t), 0) + + // Eight-octet Key ID of signer. + if _, err = readFull(r, buf[:8]); err != nil { + return + } + sig.IssuerKeyId = binary.BigEndian.Uint64(buf[:]) + + // Public-key and hash algorithm + if _, err = readFull(r, buf[:2]); err != nil { + return + } + sig.PubKeyAlgo = PublicKeyAlgorithm(buf[0]) + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA: + default: + err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) + return + } + var ok bool + if sig.Hash, ok = s2k.HashIdToHash(buf[1]); !ok { + return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) + } + + // Two-octet field holding left 16 bits of signed hash value. + if _, err = readFull(r, sig.HashTag[:2]); err != nil { + return + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) + case PubKeyAlgoDSA: + if sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r); err != nil { + return + } + sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) + default: + panic("unreachable") + } + return +} + +// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been +// called first. +func (sig *SignatureV3) Serialize(w io.Writer) (err error) { + buf := make([]byte, 8) + + // Write the sig type and creation time + buf[0] = byte(sig.SigType) + binary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix())) + if _, err = w.Write(buf[:5]); err != nil { + return + } + + // Write the issuer long key ID + binary.BigEndian.PutUint64(buf[:8], sig.IssuerKeyId) + if _, err = w.Write(buf[:8]); err != nil { + return + } + + // Write public key algorithm, hash ID, and hash value + buf[0] = byte(sig.PubKeyAlgo) + hashId, ok := s2k.HashToHashId(sig.Hash) + if !ok { + return errors.UnsupportedError(fmt.Sprintf("hash function %v", sig.Hash)) + } + buf[1] = hashId + copy(buf[2:4], sig.HashTag[:]) + if _, err = w.Write(buf[:4]); err != nil { + return + } + + if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil { + return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + err = writeMPIs(w, sig.RSASignature) + case PubKeyAlgoDSA: + err = writeMPIs(w, sig.DSASigR, sig.DSASigS) + default: + panic("impossible") + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go new file mode 100644 index 000000000..744c2d2c4 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go @@ -0,0 +1,155 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto/cipher" + "io" + "strconv" + + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +// This is the largest session key that we'll support. Since no 512-bit cipher +// has even been seriously used, this is comfortably large. +const maxSessionKeySizeInBytes = 64 + +// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC +// 4880, section 5.3. +type SymmetricKeyEncrypted struct { + CipherFunc CipherFunction + s2k func(out, in []byte) + encryptedKey []byte +} + +const symmetricKeyEncryptedVersion = 4 + +func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error { + // RFC 4880, section 5.3. + var buf [2]byte + if _, err := readFull(r, buf[:]); err != nil { + return err + } + if buf[0] != symmetricKeyEncryptedVersion { + return errors.UnsupportedError("SymmetricKeyEncrypted version") + } + ske.CipherFunc = CipherFunction(buf[1]) + + if ske.CipherFunc.KeySize() == 0 { + return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[1]))) + } + + var err error + ske.s2k, err = s2k.Parse(r) + if err != nil { + return err + } + + encryptedKey := make([]byte, maxSessionKeySizeInBytes) + // The session key may follow. We just have to try and read to find + // out. If it exists then we limit it to maxSessionKeySizeInBytes. + n, err := readFull(r, encryptedKey) + if err != nil && err != io.ErrUnexpectedEOF { + return err + } + + if n != 0 { + if n == maxSessionKeySizeInBytes { + return errors.UnsupportedError("oversized encrypted session key") + } + ske.encryptedKey = encryptedKey[:n] + } + + return nil +} + +// Decrypt attempts to decrypt an encrypted session key and returns the key and +// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data +// packet. +func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) { + key := make([]byte, ske.CipherFunc.KeySize()) + ske.s2k(key, passphrase) + + if len(ske.encryptedKey) == 0 { + return key, ske.CipherFunc, nil + } + + // the IV is all zeros + iv := make([]byte, ske.CipherFunc.blockSize()) + c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv) + plaintextKey := make([]byte, len(ske.encryptedKey)) + c.XORKeyStream(plaintextKey, ske.encryptedKey) + cipherFunc := CipherFunction(plaintextKey[0]) + if cipherFunc.blockSize() == 0 { + return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) + } + plaintextKey = plaintextKey[1:] + if l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() { + return nil, cipherFunc, errors.StructuralError("length of decrypted key (" + strconv.Itoa(l) + ") " + + "not equal to cipher keysize (" + strconv.Itoa(cipherKeySize) + ")") + } + return plaintextKey, cipherFunc, nil +} + +// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. The +// packet contains a random session key, encrypted by a key derived from the +// given passphrase. The session key is returned and must be passed to +// SerializeSymmetricallyEncrypted. +// If config is nil, sensible defaults will be used. +func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) { + cipherFunc := config.Cipher() + keySize := cipherFunc.KeySize() + if keySize == 0 { + return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) + } + + s2kBuf := new(bytes.Buffer) + keyEncryptingKey := make([]byte, keySize) + // s2k.Serialize salts and stretches the passphrase, and writes the + // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf. + err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, &s2k.Config{Hash: config.Hash(), S2KCount: config.PasswordHashIterations()}) + if err != nil { + return + } + s2kBytes := s2kBuf.Bytes() + + packetLength := 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize + err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength) + if err != nil { + return + } + + var buf [2]byte + buf[0] = symmetricKeyEncryptedVersion + buf[1] = byte(cipherFunc) + _, err = w.Write(buf[:]) + if err != nil { + return + } + _, err = w.Write(s2kBytes) + if err != nil { + return + } + + sessionKey := make([]byte, keySize) + _, err = io.ReadFull(config.Random(), sessionKey) + if err != nil { + return + } + iv := make([]byte, cipherFunc.blockSize()) + c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv) + encryptedCipherAndKey := make([]byte, keySize+1) + c.XORKeyStream(encryptedCipherAndKey, buf[1:]) + c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey) + _, err = w.Write(encryptedCipherAndKey) + if err != nil { + return + } + + key = sessionKey + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go new file mode 100644 index 000000000..1a1a62964 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go @@ -0,0 +1,290 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto/cipher" + "crypto/sha1" + "crypto/subtle" + "golang.org/x/crypto/openpgp/errors" + "hash" + "io" + "strconv" +) + +// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The +// encrypted contents will consist of more OpenPGP packets. See RFC 4880, +// sections 5.7 and 5.13. +type SymmetricallyEncrypted struct { + MDC bool // true iff this is a type 18 packet and thus has an embedded MAC. + contents io.Reader + prefix []byte +} + +const symmetricallyEncryptedVersion = 1 + +func (se *SymmetricallyEncrypted) parse(r io.Reader) error { + if se.MDC { + // See RFC 4880, section 5.13. + var buf [1]byte + _, err := readFull(r, buf[:]) + if err != nil { + return err + } + if buf[0] != symmetricallyEncryptedVersion { + return errors.UnsupportedError("unknown SymmetricallyEncrypted version") + } + } + se.contents = r + return nil +} + +// Decrypt returns a ReadCloser, from which the decrypted contents of the +// packet can be read. An incorrect key can, with high probability, be detected +// immediately and this will result in a KeyIncorrect error being returned. +func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) { + keySize := c.KeySize() + if keySize == 0 { + return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(c))) + } + if len(key) != keySize { + return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length") + } + + if se.prefix == nil { + se.prefix = make([]byte, c.blockSize()+2) + _, err := readFull(se.contents, se.prefix) + if err != nil { + return nil, err + } + } else if len(se.prefix) != c.blockSize()+2 { + return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths") + } + + ocfbResync := OCFBResync + if se.MDC { + // MDC packets use a different form of OCFB mode. + ocfbResync = OCFBNoResync + } + + s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync) + if s == nil { + return nil, errors.ErrKeyIncorrect + } + + plaintext := cipher.StreamReader{S: s, R: se.contents} + + if se.MDC { + // MDC packets have an embedded hash that we need to check. + h := sha1.New() + h.Write(se.prefix) + return &seMDCReader{in: plaintext, h: h}, nil + } + + // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser. + return seReader{plaintext}, nil +} + +// seReader wraps an io.Reader with a no-op Close method. +type seReader struct { + in io.Reader +} + +func (ser seReader) Read(buf []byte) (int, error) { + return ser.in.Read(buf) +} + +func (ser seReader) Close() error { + return nil +} + +const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size + +// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold +// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an +// MDC packet containing a hash of the previous contents which is checked +// against the running hash. See RFC 4880, section 5.13. +type seMDCReader struct { + in io.Reader + h hash.Hash + trailer [mdcTrailerSize]byte + scratch [mdcTrailerSize]byte + trailerUsed int + error bool + eof bool +} + +func (ser *seMDCReader) Read(buf []byte) (n int, err error) { + if ser.error { + err = io.ErrUnexpectedEOF + return + } + if ser.eof { + err = io.EOF + return + } + + // If we haven't yet filled the trailer buffer then we must do that + // first. + for ser.trailerUsed < mdcTrailerSize { + n, err = ser.in.Read(ser.trailer[ser.trailerUsed:]) + ser.trailerUsed += n + if err == io.EOF { + if ser.trailerUsed != mdcTrailerSize { + n = 0 + err = io.ErrUnexpectedEOF + ser.error = true + return + } + ser.eof = true + n = 0 + return + } + + if err != nil { + n = 0 + return + } + } + + // If it's a short read then we read into a temporary buffer and shift + // the data into the caller's buffer. + if len(buf) <= mdcTrailerSize { + n, err = readFull(ser.in, ser.scratch[:len(buf)]) + copy(buf, ser.trailer[:n]) + ser.h.Write(buf[:n]) + copy(ser.trailer[:], ser.trailer[n:]) + copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:]) + if n < len(buf) { + ser.eof = true + err = io.EOF + } + return + } + + n, err = ser.in.Read(buf[mdcTrailerSize:]) + copy(buf, ser.trailer[:]) + ser.h.Write(buf[:n]) + copy(ser.trailer[:], buf[n:]) + + if err == io.EOF { + ser.eof = true + } + return +} + +// This is a new-format packet tag byte for a type 19 (MDC) packet. +const mdcPacketTagByte = byte(0x80) | 0x40 | 19 + +func (ser *seMDCReader) Close() error { + if ser.error { + return errors.SignatureError("error during reading") + } + + for !ser.eof { + // We haven't seen EOF so we need to read to the end + var buf [1024]byte + _, err := ser.Read(buf[:]) + if err == io.EOF { + break + } + if err != nil { + return errors.SignatureError("error during reading") + } + } + + if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size { + return errors.SignatureError("MDC packet not found") + } + ser.h.Write(ser.trailer[:2]) + + final := ser.h.Sum(nil) + if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 { + return errors.SignatureError("hash mismatch") + } + return nil +} + +// An seMDCWriter writes through to an io.WriteCloser while maintains a running +// hash of the data written. On close, it emits an MDC packet containing the +// running hash. +type seMDCWriter struct { + w io.WriteCloser + h hash.Hash +} + +func (w *seMDCWriter) Write(buf []byte) (n int, err error) { + w.h.Write(buf) + return w.w.Write(buf) +} + +func (w *seMDCWriter) Close() (err error) { + var buf [mdcTrailerSize]byte + + buf[0] = mdcPacketTagByte + buf[1] = sha1.Size + w.h.Write(buf[:2]) + digest := w.h.Sum(nil) + copy(buf[2:], digest) + + _, err = w.w.Write(buf[:]) + if err != nil { + return + } + return w.w.Close() +} + +// noOpCloser is like an io.NopCloser, but for an io.Writer. +type noOpCloser struct { + w io.Writer +} + +func (c noOpCloser) Write(data []byte) (n int, err error) { + return c.w.Write(data) +} + +func (c noOpCloser) Close() error { + return nil +} + +// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet +// to w and returns a WriteCloser to which the to-be-encrypted packets can be +// written. +// If config is nil, sensible defaults will be used. +func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte, config *Config) (contents io.WriteCloser, err error) { + if c.KeySize() != len(key) { + return nil, errors.InvalidArgumentError("SymmetricallyEncrypted.Serialize: bad key length") + } + writeCloser := noOpCloser{w} + ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedMDC) + if err != nil { + return + } + + _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersion}) + if err != nil { + return + } + + block := c.new(key) + blockSize := block.BlockSize() + iv := make([]byte, blockSize) + _, err = config.Random().Read(iv) + if err != nil { + return + } + s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync) + _, err = ciphertext.Write(prefix) + if err != nil { + return + } + plaintext := cipher.StreamWriter{S: s, W: ciphertext} + + h := sha1.New() + h.Write(iv) + h.Write(iv[blockSize-2:]) + contents = &seMDCWriter{w: plaintext, h: h} + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go new file mode 100644 index 000000000..ff7ef5307 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go @@ -0,0 +1,90 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "image" + "image/jpeg" + "io" +) + +const UserAttrImageSubpacket = 1 + +// UserAttribute is capable of storing other types of data about a user +// beyond name, email and a text comment. In practice, user attributes are typically used +// to store a signed thumbnail photo JPEG image of the user. +// See RFC 4880, section 5.12. +type UserAttribute struct { + Contents []*OpaqueSubpacket +} + +// NewUserAttributePhoto creates a user attribute packet +// containing the given images. +func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) { + uat = new(UserAttribute) + for _, photo := range photos { + var buf bytes.Buffer + // RFC 4880, Section 5.12.1. + data := []byte{ + 0x10, 0x00, // Little-endian image header length (16 bytes) + 0x01, // Image header version 1 + 0x01, // JPEG + 0, 0, 0, 0, // 12 reserved octets, must be all zero. + 0, 0, 0, 0, + 0, 0, 0, 0} + if _, err = buf.Write(data); err != nil { + return + } + if err = jpeg.Encode(&buf, photo, nil); err != nil { + return + } + uat.Contents = append(uat.Contents, &OpaqueSubpacket{ + SubType: UserAttrImageSubpacket, + Contents: buf.Bytes()}) + } + return +} + +// NewUserAttribute creates a new user attribute packet containing the given subpackets. +func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute { + return &UserAttribute{Contents: contents} +} + +func (uat *UserAttribute) parse(r io.Reader) (err error) { + // RFC 4880, section 5.13 + b, err := io.ReadAll(r) + if err != nil { + return + } + uat.Contents, err = OpaqueSubpackets(b) + return +} + +// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including +// header. +func (uat *UserAttribute) Serialize(w io.Writer) (err error) { + var buf bytes.Buffer + for _, sp := range uat.Contents { + sp.Serialize(&buf) + } + if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil { + return err + } + _, err = w.Write(buf.Bytes()) + return +} + +// ImageData returns zero or more byte slices, each containing +// JPEG File Interchange Format (JFIF), for each photo in the +// user attribute packet. +func (uat *UserAttribute) ImageData() (imageData [][]byte) { + for _, sp := range uat.Contents { + if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 { + imageData = append(imageData, sp.Contents[16:]) + } + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userid.go b/vendor/golang.org/x/crypto/openpgp/packet/userid.go new file mode 100644 index 000000000..359a462eb --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/userid.go @@ -0,0 +1,159 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "io" + "strings" +) + +// UserId contains text that is intended to represent the name and email +// address of the key holder. See RFC 4880, section 5.11. By convention, this +// takes the form "Full Name (Comment) " +type UserId struct { + Id string // By convention, this takes the form "Full Name (Comment) " which is split out in the fields below. + + Name, Comment, Email string +} + +func hasInvalidCharacters(s string) bool { + for _, c := range s { + switch c { + case '(', ')', '<', '>', 0: + return true + } + } + return false +} + +// NewUserId returns a UserId or nil if any of the arguments contain invalid +// characters. The invalid characters are '\x00', '(', ')', '<' and '>' +func NewUserId(name, comment, email string) *UserId { + // RFC 4880 doesn't deal with the structure of userid strings; the + // name, comment and email form is just a convention. However, there's + // no convention about escaping the metacharacters and GPG just refuses + // to create user ids where, say, the name contains a '('. We mirror + // this behaviour. + + if hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) { + return nil + } + + uid := new(UserId) + uid.Name, uid.Comment, uid.Email = name, comment, email + uid.Id = name + if len(comment) > 0 { + if len(uid.Id) > 0 { + uid.Id += " " + } + uid.Id += "(" + uid.Id += comment + uid.Id += ")" + } + if len(email) > 0 { + if len(uid.Id) > 0 { + uid.Id += " " + } + uid.Id += "<" + uid.Id += email + uid.Id += ">" + } + return uid +} + +func (uid *UserId) parse(r io.Reader) (err error) { + // RFC 4880, section 5.11 + b, err := io.ReadAll(r) + if err != nil { + return + } + uid.Id = string(b) + uid.Name, uid.Comment, uid.Email = parseUserId(uid.Id) + return +} + +// Serialize marshals uid to w in the form of an OpenPGP packet, including +// header. +func (uid *UserId) Serialize(w io.Writer) error { + err := serializeHeader(w, packetTypeUserId, len(uid.Id)) + if err != nil { + return err + } + _, err = w.Write([]byte(uid.Id)) + return err +} + +// parseUserId extracts the name, comment and email from a user id string that +// is formatted as "Full Name (Comment) ". +func parseUserId(id string) (name, comment, email string) { + var n, c, e struct { + start, end int + } + var state int + + for offset, rune := range id { + switch state { + case 0: + // Entering name + n.start = offset + state = 1 + fallthrough + case 1: + // In name + if rune == '(' { + state = 2 + n.end = offset + } else if rune == '<' { + state = 5 + n.end = offset + } + case 2: + // Entering comment + c.start = offset + state = 3 + fallthrough + case 3: + // In comment + if rune == ')' { + state = 4 + c.end = offset + } + case 4: + // Between comment and email + if rune == '<' { + state = 5 + } + case 5: + // Entering email + e.start = offset + state = 6 + fallthrough + case 6: + // In email + if rune == '>' { + state = 7 + e.end = offset + } + default: + // After email + } + } + switch state { + case 1: + // ended in the name + n.end = len(id) + case 3: + // ended in comment + c.end = len(id) + case 6: + // ended in email + e.end = len(id) + } + + name = strings.TrimSpace(id[n.start:n.end]) + comment = strings.TrimSpace(id[c.start:c.end]) + email = strings.TrimSpace(id[e.start:e.end]) + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/read.go b/vendor/golang.org/x/crypto/openpgp/read.go new file mode 100644 index 000000000..cff3db919 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/read.go @@ -0,0 +1,448 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package openpgp implements high level operations on OpenPGP messages. +// +// Deprecated: this package is unmaintained except for security fixes. New +// applications should consider a more focused, modern alternative to OpenPGP +// for their specific task. If you are required to interoperate with OpenPGP +// systems and need a maintained package, consider a community fork. +// See https://golang.org/issue/44226. +package openpgp + +import ( + "crypto" + _ "crypto/sha256" + "hash" + "io" + "strconv" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" +) + +// SignatureType is the armor type for a PGP signature. +var SignatureType = "PGP SIGNATURE" + +// readArmored reads an armored block with the given type. +func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) { + block, err := armor.Decode(r) + if err != nil { + return + } + + if block.Type != expectedType { + return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type) + } + + return block.Body, nil +} + +// MessageDetails contains the result of parsing an OpenPGP encrypted and/or +// signed message. +type MessageDetails struct { + IsEncrypted bool // true if the message was encrypted. + EncryptedToKeyIds []uint64 // the list of recipient key ids. + IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message. + DecryptedWith Key // the private key used to decrypt the message, if any. + IsSigned bool // true if the message is signed. + SignedByKeyId uint64 // the key id of the signer, if any. + SignedBy *Key // the key of the signer, if available. + LiteralData *packet.LiteralData // the metadata of the contents + UnverifiedBody io.Reader // the contents of the message. + + // If IsSigned is true and SignedBy is non-zero then the signature will + // be verified as UnverifiedBody is read. The signature cannot be + // checked until the whole of UnverifiedBody is read so UnverifiedBody + // must be consumed until EOF before the data can be trusted. Even if a + // message isn't signed (or the signer is unknown) the data may contain + // an authentication code that is only checked once UnverifiedBody has + // been consumed. Once EOF has been seen, the following fields are + // valid. (An authentication code failure is reported as a + // SignatureError error when reading from UnverifiedBody.) + SignatureError error // nil if the signature is good. + Signature *packet.Signature // the signature packet itself, if v4 (default) + SignatureV3 *packet.SignatureV3 // the signature packet if it is a v2 or v3 signature + + decrypted io.ReadCloser +} + +// A PromptFunction is used as a callback by functions that may need to decrypt +// a private key, or prompt for a passphrase. It is called with a list of +// acceptable, encrypted private keys and a boolean that indicates whether a +// passphrase is usable. It should either decrypt a private key or return a +// passphrase to try. If the decrypted private key or given passphrase isn't +// correct, the function will be called again, forever. Any error returned will +// be passed up. +type PromptFunction func(keys []Key, symmetric bool) ([]byte, error) + +// A keyEnvelopePair is used to store a private key with the envelope that +// contains a symmetric key, encrypted with that key. +type keyEnvelopePair struct { + key Key + encryptedKey *packet.EncryptedKey +} + +// ReadMessage parses an OpenPGP message that may be signed and/or encrypted. +// The given KeyRing should contain both public keys (for signature +// verification) and, possibly encrypted, private keys for decrypting. +// If config is nil, sensible defaults will be used. +func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) { + var p packet.Packet + + var symKeys []*packet.SymmetricKeyEncrypted + var pubKeys []keyEnvelopePair + var se *packet.SymmetricallyEncrypted + + packets := packet.NewReader(r) + md = new(MessageDetails) + md.IsEncrypted = true + + // The message, if encrypted, starts with a number of packets + // containing an encrypted decryption key. The decryption key is either + // encrypted to a public key, or with a passphrase. This loop + // collects these packets. +ParsePackets: + for { + p, err = packets.Next() + if err != nil { + return nil, err + } + switch p := p.(type) { + case *packet.SymmetricKeyEncrypted: + // This packet contains the decryption key encrypted with a passphrase. + md.IsSymmetricallyEncrypted = true + symKeys = append(symKeys, p) + case *packet.EncryptedKey: + // This packet contains the decryption key encrypted to a public key. + md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId) + switch p.Algo { + case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal: + break + default: + continue + } + var keys []Key + if p.KeyId == 0 { + keys = keyring.DecryptionKeys() + } else { + keys = keyring.KeysById(p.KeyId) + } + for _, k := range keys { + pubKeys = append(pubKeys, keyEnvelopePair{k, p}) + } + case *packet.SymmetricallyEncrypted: + se = p + break ParsePackets + case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature: + // This message isn't encrypted. + if len(symKeys) != 0 || len(pubKeys) != 0 { + return nil, errors.StructuralError("key material not followed by encrypted message") + } + packets.Unread(p) + return readSignedMessage(packets, nil, keyring) + } + } + + var candidates []Key + var decrypted io.ReadCloser + + // Now that we have the list of encrypted keys we need to decrypt at + // least one of them or, if we cannot, we need to call the prompt + // function so that it can decrypt a key or give us a passphrase. +FindKey: + for { + // See if any of the keys already have a private key available + candidates = candidates[:0] + candidateFingerprints := make(map[string]bool) + + for _, pk := range pubKeys { + if pk.key.PrivateKey == nil { + continue + } + if !pk.key.PrivateKey.Encrypted { + if len(pk.encryptedKey.Key) == 0 { + pk.encryptedKey.Decrypt(pk.key.PrivateKey, config) + } + if len(pk.encryptedKey.Key) == 0 { + continue + } + decrypted, err = se.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key) + if err != nil && err != errors.ErrKeyIncorrect { + return nil, err + } + if decrypted != nil { + md.DecryptedWith = pk.key + break FindKey + } + } else { + fpr := string(pk.key.PublicKey.Fingerprint[:]) + if v := candidateFingerprints[fpr]; v { + continue + } + candidates = append(candidates, pk.key) + candidateFingerprints[fpr] = true + } + } + + if len(candidates) == 0 && len(symKeys) == 0 { + return nil, errors.ErrKeyIncorrect + } + + if prompt == nil { + return nil, errors.ErrKeyIncorrect + } + + passphrase, err := prompt(candidates, len(symKeys) != 0) + if err != nil { + return nil, err + } + + // Try the symmetric passphrase first + if len(symKeys) != 0 && passphrase != nil { + for _, s := range symKeys { + key, cipherFunc, err := s.Decrypt(passphrase) + if err == nil { + decrypted, err = se.Decrypt(cipherFunc, key) + if err != nil && err != errors.ErrKeyIncorrect { + return nil, err + } + if decrypted != nil { + break FindKey + } + } + + } + } + } + + md.decrypted = decrypted + if err := packets.Push(decrypted); err != nil { + return nil, err + } + return readSignedMessage(packets, md, keyring) +} + +// readSignedMessage reads a possibly signed message if mdin is non-zero then +// that structure is updated and returned. Otherwise a fresh MessageDetails is +// used. +func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err error) { + if mdin == nil { + mdin = new(MessageDetails) + } + md = mdin + + var p packet.Packet + var h hash.Hash + var wrappedHash hash.Hash +FindLiteralData: + for { + p, err = packets.Next() + if err != nil { + return nil, err + } + switch p := p.(type) { + case *packet.Compressed: + if err := packets.Push(p.Body); err != nil { + return nil, err + } + case *packet.OnePassSignature: + if !p.IsLast { + return nil, errors.UnsupportedError("nested signatures") + } + + h, wrappedHash, err = hashForSignature(p.Hash, p.SigType) + if err != nil { + md = nil + return + } + + md.IsSigned = true + md.SignedByKeyId = p.KeyId + keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign) + if len(keys) > 0 { + md.SignedBy = &keys[0] + } + case *packet.LiteralData: + md.LiteralData = p + break FindLiteralData + } + } + + if md.SignedBy != nil { + md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md} + } else if md.decrypted != nil { + md.UnverifiedBody = checkReader{md} + } else { + md.UnverifiedBody = md.LiteralData.Body + } + + return md, nil +} + +// hashForSignature returns a pair of hashes that can be used to verify a +// signature. The signature may specify that the contents of the signed message +// should be preprocessed (i.e. to normalize line endings). Thus this function +// returns two hashes. The second should be used to hash the message itself and +// performs any needed preprocessing. +func hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, error) { + if !hashId.Available() { + return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashId))) + } + h := hashId.New() + + switch sigType { + case packet.SigTypeBinary: + return h, h, nil + case packet.SigTypeText: + return h, NewCanonicalTextHash(h), nil + } + + return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType))) +} + +// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF +// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger +// MDC checks. +type checkReader struct { + md *MessageDetails +} + +func (cr checkReader) Read(buf []byte) (n int, err error) { + n, err = cr.md.LiteralData.Body.Read(buf) + if err == io.EOF { + mdcErr := cr.md.decrypted.Close() + if mdcErr != nil { + err = mdcErr + } + } + return +} + +// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes +// the data as it is read. When it sees an EOF from the underlying io.Reader +// it parses and checks a trailing Signature packet and triggers any MDC checks. +type signatureCheckReader struct { + packets *packet.Reader + h, wrappedHash hash.Hash + md *MessageDetails +} + +func (scr *signatureCheckReader) Read(buf []byte) (n int, err error) { + n, err = scr.md.LiteralData.Body.Read(buf) + scr.wrappedHash.Write(buf[:n]) + if err == io.EOF { + var p packet.Packet + p, scr.md.SignatureError = scr.packets.Next() + if scr.md.SignatureError != nil { + return + } + + var ok bool + if scr.md.Signature, ok = p.(*packet.Signature); ok { + scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignature(scr.h, scr.md.Signature) + } else if scr.md.SignatureV3, ok = p.(*packet.SignatureV3); ok { + scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignatureV3(scr.h, scr.md.SignatureV3) + } else { + scr.md.SignatureError = errors.StructuralError("LiteralData not followed by Signature") + return + } + + // The SymmetricallyEncrypted packet, if any, might have an + // unsigned hash of its own. In order to check this we need to + // close that Reader. + if scr.md.decrypted != nil { + mdcErr := scr.md.decrypted.Close() + if mdcErr != nil { + err = mdcErr + } + } + } + return +} + +// CheckDetachedSignature takes a signed file and a detached signature and +// returns the signer if the signature is valid. If the signer isn't known, +// ErrUnknownIssuer is returned. +func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { + var issuerKeyId uint64 + var hashFunc crypto.Hash + var sigType packet.SignatureType + var keys []Key + var p packet.Packet + + packets := packet.NewReader(signature) + for { + p, err = packets.Next() + if err == io.EOF { + return nil, errors.ErrUnknownIssuer + } + if err != nil { + return nil, err + } + + switch sig := p.(type) { + case *packet.Signature: + if sig.IssuerKeyId == nil { + return nil, errors.StructuralError("signature doesn't have an issuer") + } + issuerKeyId = *sig.IssuerKeyId + hashFunc = sig.Hash + sigType = sig.SigType + case *packet.SignatureV3: + issuerKeyId = sig.IssuerKeyId + hashFunc = sig.Hash + sigType = sig.SigType + default: + return nil, errors.StructuralError("non signature packet found") + } + + keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign) + if len(keys) > 0 { + break + } + } + + if len(keys) == 0 { + panic("unreachable") + } + + h, wrappedHash, err := hashForSignature(hashFunc, sigType) + if err != nil { + return nil, err + } + + if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF { + return nil, err + } + + for _, key := range keys { + switch sig := p.(type) { + case *packet.Signature: + err = key.PublicKey.VerifySignature(h, sig) + case *packet.SignatureV3: + err = key.PublicKey.VerifySignatureV3(h, sig) + default: + panic("unreachable") + } + + if err == nil { + return key.Entity, nil + } + } + + return nil, err +} + +// CheckArmoredDetachedSignature performs the same actions as +// CheckDetachedSignature but expects the signature to be armored. +func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { + body, err := readArmored(signature, SignatureType) + if err != nil { + return + } + + return CheckDetachedSignature(keyring, signed, body) +} diff --git a/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go new file mode 100644 index 000000000..fa1a91907 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go @@ -0,0 +1,279 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package s2k implements the various OpenPGP string-to-key transforms as +// specified in RFC 4800 section 3.7.1. +// +// Deprecated: this package is unmaintained except for security fixes. New +// applications should consider a more focused, modern alternative to OpenPGP +// for their specific task. If you are required to interoperate with OpenPGP +// systems and need a maintained package, consider a community fork. +// See https://golang.org/issue/44226. +package s2k + +import ( + "crypto" + "hash" + "io" + "strconv" + + "golang.org/x/crypto/openpgp/errors" +) + +// Config collects configuration parameters for s2k key-stretching +// transformatioms. A nil *Config is valid and results in all default +// values. Currently, Config is used only by the Serialize function in +// this package. +type Config struct { + // Hash is the default hash function to be used. If + // nil, SHA1 is used. + Hash crypto.Hash + // S2KCount is only used for symmetric encryption. It + // determines the strength of the passphrase stretching when + // the said passphrase is hashed to produce a key. S2KCount + // should be between 1024 and 65011712, inclusive. If Config + // is nil or S2KCount is 0, the value 65536 used. Not all + // values in the above range can be represented. S2KCount will + // be rounded up to the next representable value if it cannot + // be encoded exactly. When set, it is strongly encrouraged to + // use a value that is at least 65536. See RFC 4880 Section + // 3.7.1.3. + S2KCount int +} + +func (c *Config) hash() crypto.Hash { + if c == nil || uint(c.Hash) == 0 { + // SHA1 is the historical default in this package. + return crypto.SHA1 + } + + return c.Hash +} + +func (c *Config) encodedCount() uint8 { + if c == nil || c.S2KCount == 0 { + return 96 // The common case. Correspoding to 65536 + } + + i := c.S2KCount + switch { + // Behave like GPG. Should we make 65536 the lowest value used? + case i < 1024: + i = 1024 + case i > 65011712: + i = 65011712 + } + + return encodeCount(i) +} + +// encodeCount converts an iterative "count" in the range 1024 to +// 65011712, inclusive, to an encoded count. The return value is the +// octet that is actually stored in the GPG file. encodeCount panics +// if i is not in the above range (encodedCount above takes care to +// pass i in the correct range). See RFC 4880 Section 3.7.7.1. +func encodeCount(i int) uint8 { + if i < 1024 || i > 65011712 { + panic("count arg i outside the required range") + } + + for encoded := 0; encoded < 256; encoded++ { + count := decodeCount(uint8(encoded)) + if count >= i { + return uint8(encoded) + } + } + + return 255 +} + +// decodeCount returns the s2k mode 3 iterative "count" corresponding to +// the encoded octet c. +func decodeCount(c uint8) int { + return (16 + int(c&15)) << (uint32(c>>4) + 6) +} + +// Simple writes to out the result of computing the Simple S2K function (RFC +// 4880, section 3.7.1.1) using the given hash and input passphrase. +func Simple(out []byte, h hash.Hash, in []byte) { + Salted(out, h, in, nil) +} + +var zero [1]byte + +// Salted writes to out the result of computing the Salted S2K function (RFC +// 4880, section 3.7.1.2) using the given hash, input passphrase and salt. +func Salted(out []byte, h hash.Hash, in []byte, salt []byte) { + done := 0 + var digest []byte + + for i := 0; done < len(out); i++ { + h.Reset() + for j := 0; j < i; j++ { + h.Write(zero[:]) + } + h.Write(salt) + h.Write(in) + digest = h.Sum(digest[:0]) + n := copy(out[done:], digest) + done += n + } +} + +// Iterated writes to out the result of computing the Iterated and Salted S2K +// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase, +// salt and iteration count. +func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) { + combined := make([]byte, len(in)+len(salt)) + copy(combined, salt) + copy(combined[len(salt):], in) + + if count < len(combined) { + count = len(combined) + } + + done := 0 + var digest []byte + for i := 0; done < len(out); i++ { + h.Reset() + for j := 0; j < i; j++ { + h.Write(zero[:]) + } + written := 0 + for written < count { + if written+len(combined) > count { + todo := count - written + h.Write(combined[:todo]) + written = count + } else { + h.Write(combined) + written += len(combined) + } + } + digest = h.Sum(digest[:0]) + n := copy(out[done:], digest) + done += n + } +} + +// Parse reads a binary specification for a string-to-key transformation from r +// and returns a function which performs that transform. +func Parse(r io.Reader) (f func(out, in []byte), err error) { + var buf [9]byte + + _, err = io.ReadFull(r, buf[:2]) + if err != nil { + return + } + + hash, ok := HashIdToHash(buf[1]) + if !ok { + return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(buf[1]))) + } + if !hash.Available() { + return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hash))) + } + h := hash.New() + + switch buf[0] { + case 0: + f := func(out, in []byte) { + Simple(out, h, in) + } + return f, nil + case 1: + _, err = io.ReadFull(r, buf[:8]) + if err != nil { + return + } + f := func(out, in []byte) { + Salted(out, h, in, buf[:8]) + } + return f, nil + case 3: + _, err = io.ReadFull(r, buf[:9]) + if err != nil { + return + } + count := decodeCount(buf[8]) + f := func(out, in []byte) { + Iterated(out, h, in, buf[:8], count) + } + return f, nil + } + + return nil, errors.UnsupportedError("S2K function") +} + +// Serialize salts and stretches the given passphrase and writes the +// resulting key into key. It also serializes an S2K descriptor to +// w. The key stretching can be configured with c, which may be +// nil. In that case, sensible defaults will be used. +func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error { + var buf [11]byte + buf[0] = 3 /* iterated and salted */ + buf[1], _ = HashToHashId(c.hash()) + salt := buf[2:10] + if _, err := io.ReadFull(rand, salt); err != nil { + return err + } + encodedCount := c.encodedCount() + count := decodeCount(encodedCount) + buf[10] = encodedCount + if _, err := w.Write(buf[:]); err != nil { + return err + } + + Iterated(key, c.hash().New(), passphrase, salt, count) + return nil +} + +// hashToHashIdMapping contains pairs relating OpenPGP's hash identifier with +// Go's crypto.Hash type. See RFC 4880, section 9.4. +var hashToHashIdMapping = []struct { + id byte + hash crypto.Hash + name string +}{ + {1, crypto.MD5, "MD5"}, + {2, crypto.SHA1, "SHA1"}, + {3, crypto.RIPEMD160, "RIPEMD160"}, + {8, crypto.SHA256, "SHA256"}, + {9, crypto.SHA384, "SHA384"}, + {10, crypto.SHA512, "SHA512"}, + {11, crypto.SHA224, "SHA224"}, +} + +// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP +// hash id. +func HashIdToHash(id byte) (h crypto.Hash, ok bool) { + for _, m := range hashToHashIdMapping { + if m.id == id { + return m.hash, true + } + } + return 0, false +} + +// HashIdToString returns the name of the hash function corresponding to the +// given OpenPGP hash id. +func HashIdToString(id byte) (name string, ok bool) { + for _, m := range hashToHashIdMapping { + if m.id == id { + return m.name, true + } + } + + return "", false +} + +// HashToHashId returns an OpenPGP hash id which corresponds the given Hash. +func HashToHashId(h crypto.Hash) (id byte, ok bool) { + for _, m := range hashToHashIdMapping { + if m.hash == h { + return m.id, true + } + } + return 0, false +} diff --git a/vendor/golang.org/x/crypto/openpgp/write.go b/vendor/golang.org/x/crypto/openpgp/write.go new file mode 100644 index 000000000..b89d48b81 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/write.go @@ -0,0 +1,418 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package openpgp + +import ( + "crypto" + "hash" + "io" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" + "golang.org/x/crypto/openpgp/s2k" +) + +// DetachSign signs message with the private key from signer (which must +// already have been decrypted) and writes the signature to w. +// If config is nil, sensible defaults will be used. +func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { + return detachSign(w, signer, message, packet.SigTypeBinary, config) +} + +// ArmoredDetachSign signs message with the private key from signer (which +// must already have been decrypted) and writes an armored signature to w. +// If config is nil, sensible defaults will be used. +func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) { + return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config) +} + +// DetachSignText signs message (after canonicalising the line endings) with +// the private key from signer (which must already have been decrypted) and +// writes the signature to w. +// If config is nil, sensible defaults will be used. +func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { + return detachSign(w, signer, message, packet.SigTypeText, config) +} + +// ArmoredDetachSignText signs message (after canonicalising the line endings) +// with the private key from signer (which must already have been decrypted) +// and writes an armored signature to w. +// If config is nil, sensible defaults will be used. +func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { + return armoredDetachSign(w, signer, message, packet.SigTypeText, config) +} + +func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { + out, err := armor.Encode(w, SignatureType, nil) + if err != nil { + return + } + err = detachSign(out, signer, message, sigType, config) + if err != nil { + return + } + return out.Close() +} + +func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { + if signer.PrivateKey == nil { + return errors.InvalidArgumentError("signing key doesn't have a private key") + } + if signer.PrivateKey.Encrypted { + return errors.InvalidArgumentError("signing key is encrypted") + } + + sig := new(packet.Signature) + sig.SigType = sigType + sig.PubKeyAlgo = signer.PrivateKey.PubKeyAlgo + sig.Hash = config.Hash() + sig.CreationTime = config.Now() + sig.IssuerKeyId = &signer.PrivateKey.KeyId + + h, wrappedHash, err := hashForSignature(sig.Hash, sig.SigType) + if err != nil { + return + } + io.Copy(wrappedHash, message) + + err = sig.Sign(h, signer.PrivateKey, config) + if err != nil { + return + } + + return sig.Serialize(w) +} + +// FileHints contains metadata about encrypted files. This metadata is, itself, +// encrypted. +type FileHints struct { + // IsBinary can be set to hint that the contents are binary data. + IsBinary bool + // FileName hints at the name of the file that should be written. It's + // truncated to 255 bytes if longer. It may be empty to suggest that the + // file should not be written to disk. It may be equal to "_CONSOLE" to + // suggest the data should not be written to disk. + FileName string + // ModTime contains the modification time of the file, or the zero time if not applicable. + ModTime time.Time +} + +// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase. +// The resulting WriteCloser must be closed after the contents of the file have +// been written. +// If config is nil, sensible defaults will be used. +func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { + if hints == nil { + hints = &FileHints{} + } + + key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config) + if err != nil { + return + } + w, err := packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), key, config) + if err != nil { + return + } + + literaldata := w + if algo := config.Compression(); algo != packet.CompressionNone { + var compConfig *packet.CompressionConfig + if config != nil { + compConfig = config.CompressionConfig + } + literaldata, err = packet.SerializeCompressed(w, algo, compConfig) + if err != nil { + return + } + } + + var epochSeconds uint32 + if !hints.ModTime.IsZero() { + epochSeconds = uint32(hints.ModTime.Unix()) + } + return packet.SerializeLiteral(literaldata, hints.IsBinary, hints.FileName, epochSeconds) +} + +// intersectPreferences mutates and returns a prefix of a that contains only +// the values in the intersection of a and b. The order of a is preserved. +func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) { + var j int + for _, v := range a { + for _, v2 := range b { + if v == v2 { + a[j] = v + j++ + break + } + } + } + + return a[:j] +} + +func hashToHashId(h crypto.Hash) uint8 { + v, ok := s2k.HashToHashId(h) + if !ok { + panic("tried to convert unknown hash") + } + return v +} + +// writeAndSign writes the data as a payload package and, optionally, signs +// it. hints contains optional information, that is also encrypted, +// that aids the recipients in processing the message. The resulting +// WriteCloser must be closed after the contents of the file have been +// written. If config is nil, sensible defaults will be used. +func writeAndSign(payload io.WriteCloser, candidateHashes []uint8, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { + var signer *packet.PrivateKey + if signed != nil { + signKey, ok := signed.signingKey(config.Now()) + if !ok { + return nil, errors.InvalidArgumentError("no valid signing keys") + } + signer = signKey.PrivateKey + if signer == nil { + return nil, errors.InvalidArgumentError("no private key in signing key") + } + if signer.Encrypted { + return nil, errors.InvalidArgumentError("signing key must be decrypted") + } + } + + var hash crypto.Hash + for _, hashId := range candidateHashes { + if h, ok := s2k.HashIdToHash(hashId); ok && h.Available() { + hash = h + break + } + } + + // If the hash specified by config is a candidate, we'll use that. + if configuredHash := config.Hash(); configuredHash.Available() { + for _, hashId := range candidateHashes { + if h, ok := s2k.HashIdToHash(hashId); ok && h == configuredHash { + hash = h + break + } + } + } + + if hash == 0 { + hashId := candidateHashes[0] + name, ok := s2k.HashIdToString(hashId) + if !ok { + name = "#" + strconv.Itoa(int(hashId)) + } + return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)") + } + + if signer != nil { + ops := &packet.OnePassSignature{ + SigType: packet.SigTypeBinary, + Hash: hash, + PubKeyAlgo: signer.PubKeyAlgo, + KeyId: signer.KeyId, + IsLast: true, + } + if err := ops.Serialize(payload); err != nil { + return nil, err + } + } + + if hints == nil { + hints = &FileHints{} + } + + w := payload + if signer != nil { + // If we need to write a signature packet after the literal + // data then we need to stop literalData from closing + // encryptedData. + w = noOpCloser{w} + + } + var epochSeconds uint32 + if !hints.ModTime.IsZero() { + epochSeconds = uint32(hints.ModTime.Unix()) + } + literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds) + if err != nil { + return nil, err + } + + if signer != nil { + return signatureWriter{payload, literalData, hash, hash.New(), signer, config}, nil + } + return literalData, nil +} + +// Encrypt encrypts a message to a number of recipients and, optionally, signs +// it. hints contains optional information, that is also encrypted, that aids +// the recipients in processing the message. The resulting WriteCloser must +// be closed after the contents of the file have been written. +// If config is nil, sensible defaults will be used. +func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { + if len(to) == 0 { + return nil, errors.InvalidArgumentError("no encryption recipient provided") + } + + // These are the possible ciphers that we'll use for the message. + candidateCiphers := []uint8{ + uint8(packet.CipherAES128), + uint8(packet.CipherAES256), + uint8(packet.CipherCAST5), + } + // These are the possible hash functions that we'll use for the signature. + candidateHashes := []uint8{ + hashToHashId(crypto.SHA256), + hashToHashId(crypto.SHA384), + hashToHashId(crypto.SHA512), + hashToHashId(crypto.SHA1), + hashToHashId(crypto.RIPEMD160), + } + // In the event that a recipient doesn't specify any supported ciphers + // or hash functions, these are the ones that we assume that every + // implementation supports. + defaultCiphers := candidateCiphers[len(candidateCiphers)-1:] + defaultHashes := candidateHashes[len(candidateHashes)-1:] + + encryptKeys := make([]Key, len(to)) + for i := range to { + var ok bool + encryptKeys[i], ok = to[i].encryptionKey(config.Now()) + if !ok { + return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no encryption keys") + } + + sig := to[i].primaryIdentity().SelfSignature + + preferredSymmetric := sig.PreferredSymmetric + if len(preferredSymmetric) == 0 { + preferredSymmetric = defaultCiphers + } + preferredHashes := sig.PreferredHash + if len(preferredHashes) == 0 { + preferredHashes = defaultHashes + } + candidateCiphers = intersectPreferences(candidateCiphers, preferredSymmetric) + candidateHashes = intersectPreferences(candidateHashes, preferredHashes) + } + + if len(candidateCiphers) == 0 || len(candidateHashes) == 0 { + return nil, errors.InvalidArgumentError("cannot encrypt because recipient set shares no common algorithms") + } + + cipher := packet.CipherFunction(candidateCiphers[0]) + // If the cipher specified by config is a candidate, we'll use that. + configuredCipher := config.Cipher() + for _, c := range candidateCiphers { + cipherFunc := packet.CipherFunction(c) + if cipherFunc == configuredCipher { + cipher = cipherFunc + break + } + } + + symKey := make([]byte, cipher.KeySize()) + if _, err := io.ReadFull(config.Random(), symKey); err != nil { + return nil, err + } + + for _, key := range encryptKeys { + if err := packet.SerializeEncryptedKey(ciphertext, key.PublicKey, cipher, symKey, config); err != nil { + return nil, err + } + } + + payload, err := packet.SerializeSymmetricallyEncrypted(ciphertext, cipher, symKey, config) + if err != nil { + return + } + + return writeAndSign(payload, candidateHashes, signed, hints, config) +} + +// Sign signs a message. The resulting WriteCloser must be closed after the +// contents of the file have been written. hints contains optional information +// that aids the recipients in processing the message. +// If config is nil, sensible defaults will be used. +func Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) { + if signed == nil { + return nil, errors.InvalidArgumentError("no signer provided") + } + + // These are the possible hash functions that we'll use for the signature. + candidateHashes := []uint8{ + hashToHashId(crypto.SHA256), + hashToHashId(crypto.SHA384), + hashToHashId(crypto.SHA512), + hashToHashId(crypto.SHA1), + hashToHashId(crypto.RIPEMD160), + } + defaultHashes := candidateHashes[len(candidateHashes)-1:] + preferredHashes := signed.primaryIdentity().SelfSignature.PreferredHash + if len(preferredHashes) == 0 { + preferredHashes = defaultHashes + } + candidateHashes = intersectPreferences(candidateHashes, preferredHashes) + return writeAndSign(noOpCloser{output}, candidateHashes, signed, hints, config) +} + +// signatureWriter hashes the contents of a message while passing it along to +// literalData. When closed, it closes literalData, writes a signature packet +// to encryptedData and then also closes encryptedData. +type signatureWriter struct { + encryptedData io.WriteCloser + literalData io.WriteCloser + hashType crypto.Hash + h hash.Hash + signer *packet.PrivateKey + config *packet.Config +} + +func (s signatureWriter) Write(data []byte) (int, error) { + s.h.Write(data) + return s.literalData.Write(data) +} + +func (s signatureWriter) Close() error { + sig := &packet.Signature{ + SigType: packet.SigTypeBinary, + PubKeyAlgo: s.signer.PubKeyAlgo, + Hash: s.hashType, + CreationTime: s.config.Now(), + IssuerKeyId: &s.signer.KeyId, + } + + if err := sig.Sign(s.h, s.signer, s.config); err != nil { + return err + } + if err := s.literalData.Close(); err != nil { + return err + } + if err := sig.Serialize(s.encryptedData); err != nil { + return err + } + return s.encryptedData.Close() +} + +// noOpCloser is like an io.NopCloser, but for an io.Writer. +// TODO: we have two of these in OpenPGP packages alone. This probably needs +// to be promoted somewhere more common. +type noOpCloser struct { + w io.Writer +} + +func (c noOpCloser) Write(data []byte) (n int, err error) { + return c.w.Write(data) +} + +func (c noOpCloser) Close() error { + return nil +} diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go new file mode 100644 index 000000000..28cd99c7f --- /dev/null +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go @@ -0,0 +1,77 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC +2898 / PKCS #5 v2.0. + +A key derivation function is useful when encrypting data based on a password +or any other not-fully-random data. It uses a pseudorandom function to derive +a secure encryption key based on the password. + +While v2.0 of the standard defines only one pseudorandom function to use, +HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved +Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To +choose, you can pass the `New` functions from the different SHA packages to +pbkdf2.Key. +*/ +package pbkdf2 + +import ( + "crypto/hmac" + "hash" +) + +// Key derives a key from the password, salt and iteration count, returning a +// []byte of length keylen that can be used as cryptographic key. The key is +// derived based on the method described as PBKDF2 with the HMAC variant using +// the supplied hash function. +// +// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you +// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by +// doing: +// +// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) +// +// Remember to get a good random salt. At least 8 bytes is recommended by the +// RFC. +// +// Using a higher iteration count will increase the cost of an exhaustive +// search but will also make derivation proportionally slower. +func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { + prf := hmac.New(h, password) + hashLen := prf.Size() + numBlocks := (keyLen + hashLen - 1) / hashLen + + var buf [4]byte + dk := make([]byte, 0, numBlocks*hashLen) + U := make([]byte, hashLen) + for block := 1; block <= numBlocks; block++ { + // N.B.: || means concatenation, ^ means XOR + // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter + // U_1 = PRF(password, salt || uint(i)) + prf.Reset() + prf.Write(salt) + buf[0] = byte(block >> 24) + buf[1] = byte(block >> 16) + buf[2] = byte(block >> 8) + buf[3] = byte(block) + prf.Write(buf[:4]) + dk = prf.Sum(dk) + T := dk[len(dk)-hashLen:] + copy(U, T) + + // U_n = PRF(password, U_(n-1)) + for n := 2; n <= iter; n++ { + prf.Reset() + prf.Write(U) + U = U[:0] + U = prf.Sum(U) + for x := range U { + T[x] ^= U[x] + } + } + } + return dk[:keyLen] +} diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go new file mode 100644 index 000000000..76fa40fb2 --- /dev/null +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -0,0 +1,212 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package scrypt implements the scrypt key derivation function as defined in +// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard +// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). +package scrypt + +import ( + "crypto/sha256" + "encoding/binary" + "errors" + "math/bits" + + "golang.org/x/crypto/pbkdf2" +) + +const maxInt = int(^uint(0) >> 1) + +// blockCopy copies n numbers from src into dst. +func blockCopy(dst, src []uint32, n int) { + copy(dst, src[:n]) +} + +// blockXOR XORs numbers from dst with n numbers from src. +func blockXOR(dst, src []uint32, n int) { + for i, v := range src[:n] { + dst[i] ^= v + } +} + +// salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in, +// and puts the result into both tmp and out. +func salsaXOR(tmp *[16]uint32, in, out []uint32) { + w0 := tmp[0] ^ in[0] + w1 := tmp[1] ^ in[1] + w2 := tmp[2] ^ in[2] + w3 := tmp[3] ^ in[3] + w4 := tmp[4] ^ in[4] + w5 := tmp[5] ^ in[5] + w6 := tmp[6] ^ in[6] + w7 := tmp[7] ^ in[7] + w8 := tmp[8] ^ in[8] + w9 := tmp[9] ^ in[9] + w10 := tmp[10] ^ in[10] + w11 := tmp[11] ^ in[11] + w12 := tmp[12] ^ in[12] + w13 := tmp[13] ^ in[13] + w14 := tmp[14] ^ in[14] + w15 := tmp[15] ^ in[15] + + x0, x1, x2, x3, x4, x5, x6, x7, x8 := w0, w1, w2, w3, w4, w5, w6, w7, w8 + x9, x10, x11, x12, x13, x14, x15 := w9, w10, w11, w12, w13, w14, w15 + + for i := 0; i < 8; i += 2 { + x4 ^= bits.RotateLeft32(x0+x12, 7) + x8 ^= bits.RotateLeft32(x4+x0, 9) + x12 ^= bits.RotateLeft32(x8+x4, 13) + x0 ^= bits.RotateLeft32(x12+x8, 18) + + x9 ^= bits.RotateLeft32(x5+x1, 7) + x13 ^= bits.RotateLeft32(x9+x5, 9) + x1 ^= bits.RotateLeft32(x13+x9, 13) + x5 ^= bits.RotateLeft32(x1+x13, 18) + + x14 ^= bits.RotateLeft32(x10+x6, 7) + x2 ^= bits.RotateLeft32(x14+x10, 9) + x6 ^= bits.RotateLeft32(x2+x14, 13) + x10 ^= bits.RotateLeft32(x6+x2, 18) + + x3 ^= bits.RotateLeft32(x15+x11, 7) + x7 ^= bits.RotateLeft32(x3+x15, 9) + x11 ^= bits.RotateLeft32(x7+x3, 13) + x15 ^= bits.RotateLeft32(x11+x7, 18) + + x1 ^= bits.RotateLeft32(x0+x3, 7) + x2 ^= bits.RotateLeft32(x1+x0, 9) + x3 ^= bits.RotateLeft32(x2+x1, 13) + x0 ^= bits.RotateLeft32(x3+x2, 18) + + x6 ^= bits.RotateLeft32(x5+x4, 7) + x7 ^= bits.RotateLeft32(x6+x5, 9) + x4 ^= bits.RotateLeft32(x7+x6, 13) + x5 ^= bits.RotateLeft32(x4+x7, 18) + + x11 ^= bits.RotateLeft32(x10+x9, 7) + x8 ^= bits.RotateLeft32(x11+x10, 9) + x9 ^= bits.RotateLeft32(x8+x11, 13) + x10 ^= bits.RotateLeft32(x9+x8, 18) + + x12 ^= bits.RotateLeft32(x15+x14, 7) + x13 ^= bits.RotateLeft32(x12+x15, 9) + x14 ^= bits.RotateLeft32(x13+x12, 13) + x15 ^= bits.RotateLeft32(x14+x13, 18) + } + x0 += w0 + x1 += w1 + x2 += w2 + x3 += w3 + x4 += w4 + x5 += w5 + x6 += w6 + x7 += w7 + x8 += w8 + x9 += w9 + x10 += w10 + x11 += w11 + x12 += w12 + x13 += w13 + x14 += w14 + x15 += w15 + + out[0], tmp[0] = x0, x0 + out[1], tmp[1] = x1, x1 + out[2], tmp[2] = x2, x2 + out[3], tmp[3] = x3, x3 + out[4], tmp[4] = x4, x4 + out[5], tmp[5] = x5, x5 + out[6], tmp[6] = x6, x6 + out[7], tmp[7] = x7, x7 + out[8], tmp[8] = x8, x8 + out[9], tmp[9] = x9, x9 + out[10], tmp[10] = x10, x10 + out[11], tmp[11] = x11, x11 + out[12], tmp[12] = x12, x12 + out[13], tmp[13] = x13, x13 + out[14], tmp[14] = x14, x14 + out[15], tmp[15] = x15, x15 +} + +func blockMix(tmp *[16]uint32, in, out []uint32, r int) { + blockCopy(tmp[:], in[(2*r-1)*16:], 16) + for i := 0; i < 2*r; i += 2 { + salsaXOR(tmp, in[i*16:], out[i*8:]) + salsaXOR(tmp, in[i*16+16:], out[i*8+r*16:]) + } +} + +func integer(b []uint32, r int) uint64 { + j := (2*r - 1) * 16 + return uint64(b[j]) | uint64(b[j+1])<<32 +} + +func smix(b []byte, r, N int, v, xy []uint32) { + var tmp [16]uint32 + R := 32 * r + x := xy + y := xy[R:] + + j := 0 + for i := 0; i < R; i++ { + x[i] = binary.LittleEndian.Uint32(b[j:]) + j += 4 + } + for i := 0; i < N; i += 2 { + blockCopy(v[i*R:], x, R) + blockMix(&tmp, x, y, r) + + blockCopy(v[(i+1)*R:], y, R) + blockMix(&tmp, y, x, r) + } + for i := 0; i < N; i += 2 { + j := int(integer(x, r) & uint64(N-1)) + blockXOR(x, v[j*R:], R) + blockMix(&tmp, x, y, r) + + j = int(integer(y, r) & uint64(N-1)) + blockXOR(y, v[j*R:], R) + blockMix(&tmp, y, x, r) + } + j = 0 + for _, v := range x[:R] { + binary.LittleEndian.PutUint32(b[j:], v) + j += 4 + } +} + +// Key derives a key from the password, salt, and cost parameters, returning +// a byte slice of length keyLen that can be used as cryptographic key. +// +// N is a CPU/memory cost parameter, which must be a power of two greater than 1. +// r and p must satisfy r * p < 2³⁰. If the parameters do not satisfy the +// limits, the function returns a nil byte slice and an error. +// +// For example, you can get a derived key for e.g. AES-256 (which needs a +// 32-byte key) by doing: +// +// dk, err := scrypt.Key([]byte("some password"), salt, 32768, 8, 1, 32) +// +// The recommended parameters for interactive logins as of 2017 are N=32768, r=8 +// and p=1. The parameters N, r, and p should be increased as memory latency and +// CPU parallelism increases; consider setting N to the highest power of 2 you +// can derive within 100 milliseconds. Remember to get a good random salt. +func Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) { + if N <= 1 || N&(N-1) != 0 { + return nil, errors.New("scrypt: N must be > 1 and a power of 2") + } + if uint64(r)*uint64(p) >= 1<<30 || r > maxInt/128/p || r > maxInt/256 || N > maxInt/128/r { + return nil, errors.New("scrypt: parameters are too large") + } + + xy := make([]uint32, 64*r) + v := make([]uint32, 32*N*r) + b := pbkdf2.Key(password, salt, 1, p*128*r, sha256.New) + + for i := 0; i < p; i++ { + smix(b[i*128*r:], r, N, v, xy) + } + + return pbkdf2.Key(password, b, 1, keyLen, sha256.New), nil +} diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go new file mode 100644 index 000000000..cf66309c4 --- /dev/null +++ b/vendor/golang.org/x/net/context/context.go @@ -0,0 +1,56 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// As of Go 1.7 this package is available in the standard library under the +// name context. https://golang.org/pkg/context. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context // import "golang.org/x/net/context" + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go new file mode 100644 index 000000000..0c1b86793 --- /dev/null +++ b/vendor/golang.org/x/net/context/go17.go @@ -0,0 +1,72 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.7 + +package context + +import ( + "context" // standard library's context, as of Go 1.7 + "time" +) + +var ( + todo = context.TODO() + background = context.Background() +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = context.Canceled + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = context.DeadlineExceeded + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + ctx, f := context.WithCancel(parent) + return ctx, f +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + ctx, f := context.WithDeadline(parent, deadline) + return ctx, f +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return context.WithValue(parent, key, val) +} diff --git a/vendor/golang.org/x/net/context/go19.go b/vendor/golang.org/x/net/context/go19.go new file mode 100644 index 000000000..e31e35a90 --- /dev/null +++ b/vendor/golang.org/x/net/context/go19.go @@ -0,0 +1,20 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.9 + +package context + +import "context" // standard library's context, as of Go 1.7 + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context = context.Context + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc = context.CancelFunc diff --git a/vendor/golang.org/x/net/context/pre_go17.go b/vendor/golang.org/x/net/context/pre_go17.go new file mode 100644 index 000000000..065ff3dfa --- /dev/null +++ b/vendor/golang.org/x/net/context/pre_go17.go @@ -0,0 +1,300 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.7 + +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, c) + return c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) *cancelCtx { + return &cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + *cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/vendor/golang.org/x/net/context/pre_go19.go b/vendor/golang.org/x/net/context/pre_go19.go new file mode 100644 index 000000000..ec5a63803 --- /dev/null +++ b/vendor/golang.org/x/net/context/pre_go19.go @@ -0,0 +1,109 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.9 + +package context + +import "time" + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out chan<- Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() diff --git a/vendor/golang.org/x/net/html/atom/atom.go b/vendor/golang.org/x/net/html/atom/atom.go new file mode 100644 index 000000000..cd0a8ac15 --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/atom.go @@ -0,0 +1,78 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package atom provides integer codes (also known as atoms) for a fixed set of +// frequently occurring HTML strings: tag names and attribute keys such as "p" +// and "id". +// +// Sharing an atom's name between all elements with the same tag can result in +// fewer string allocations when tokenizing and parsing HTML. Integer +// comparisons are also generally faster than string comparisons. +// +// The value of an atom's particular code is not guaranteed to stay the same +// between versions of this package. Neither is any ordering guaranteed: +// whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to +// be dense. The only guarantees are that e.g. looking up "div" will yield +// atom.Div, calling atom.Div.String will return "div", and atom.Div != 0. +package atom // import "golang.org/x/net/html/atom" + +// Atom is an integer code for a string. The zero value maps to "". +type Atom uint32 + +// String returns the atom's name. +func (a Atom) String() string { + start := uint32(a >> 8) + n := uint32(a & 0xff) + if start+n > uint32(len(atomText)) { + return "" + } + return atomText[start : start+n] +} + +func (a Atom) string() string { + return atomText[a>>8 : a>>8+a&0xff] +} + +// fnv computes the FNV hash with an arbitrary starting value h. +func fnv(h uint32, s []byte) uint32 { + for i := range s { + h ^= uint32(s[i]) + h *= 16777619 + } + return h +} + +func match(s string, t []byte) bool { + for i, c := range t { + if s[i] != c { + return false + } + } + return true +} + +// Lookup returns the atom whose name is s. It returns zero if there is no +// such atom. The lookup is case sensitive. +func Lookup(s []byte) Atom { + if len(s) == 0 || len(s) > maxAtomLen { + return 0 + } + h := fnv(hash0, s) + if a := table[h&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) { + return a + } + if a := table[(h>>16)&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) { + return a + } + return 0 +} + +// String returns a string whose contents are equal to s. In that sense, it is +// equivalent to string(s) but may be more efficient. +func String(s []byte) string { + if a := Lookup(s); a != 0 { + return a.String() + } + return string(s) +} diff --git a/vendor/golang.org/x/net/html/atom/table.go b/vendor/golang.org/x/net/html/atom/table.go new file mode 100644 index 000000000..2a938864c --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/table.go @@ -0,0 +1,783 @@ +// Code generated by go generate gen.go; DO NOT EDIT. + +//go:generate go run gen.go + +package atom + +const ( + A Atom = 0x1 + Abbr Atom = 0x4 + Accept Atom = 0x1a06 + AcceptCharset Atom = 0x1a0e + Accesskey Atom = 0x2c09 + Acronym Atom = 0xaa07 + Action Atom = 0x27206 + Address Atom = 0x6f307 + Align Atom = 0xb105 + Allowfullscreen Atom = 0x2080f + Allowpaymentrequest Atom = 0xc113 + Allowusermedia Atom = 0xdd0e + Alt Atom = 0xf303 + Annotation Atom = 0x1c90a + AnnotationXml Atom = 0x1c90e + Applet Atom = 0x31906 + Area Atom = 0x35604 + Article Atom = 0x3fc07 + As Atom = 0x3c02 + Aside Atom = 0x10705 + Async Atom = 0xff05 + Audio Atom = 0x11505 + Autocomplete Atom = 0x2780c + Autofocus Atom = 0x12109 + Autoplay Atom = 0x13c08 + B Atom = 0x101 + Base Atom = 0x3b04 + Basefont Atom = 0x3b08 + Bdi Atom = 0xba03 + Bdo Atom = 0x14b03 + Bgsound Atom = 0x15e07 + Big Atom = 0x17003 + Blink Atom = 0x17305 + Blockquote Atom = 0x1870a + Body Atom = 0x2804 + Br Atom = 0x202 + Button Atom = 0x19106 + Canvas Atom = 0x10306 + Caption Atom = 0x23107 + Center Atom = 0x22006 + Challenge Atom = 0x29b09 + Charset Atom = 0x2107 + Checked Atom = 0x47907 + Cite Atom = 0x19c04 + Class Atom = 0x56405 + Code Atom = 0x5c504 + Col Atom = 0x1ab03 + Colgroup Atom = 0x1ab08 + Color Atom = 0x1bf05 + Cols Atom = 0x1c404 + Colspan Atom = 0x1c407 + Command Atom = 0x1d707 + Content Atom = 0x58b07 + Contenteditable Atom = 0x58b0f + Contextmenu Atom = 0x3800b + Controls Atom = 0x1de08 + Coords Atom = 0x1ea06 + Crossorigin Atom = 0x1fb0b + Data Atom = 0x4a504 + Datalist Atom = 0x4a508 + Datetime Atom = 0x2b808 + Dd Atom = 0x2d702 + Default Atom = 0x10a07 + Defer Atom = 0x5c705 + Del Atom = 0x45203 + Desc Atom = 0x56104 + Details Atom = 0x7207 + Dfn Atom = 0x8703 + Dialog Atom = 0xbb06 + Dir Atom = 0x9303 + Dirname Atom = 0x9307 + Disabled Atom = 0x16408 + Div Atom = 0x16b03 + Dl Atom = 0x5e602 + Download Atom = 0x46308 + Draggable Atom = 0x17a09 + Dropzone Atom = 0x40508 + Dt Atom = 0x64b02 + Em Atom = 0x6e02 + Embed Atom = 0x6e05 + Enctype Atom = 0x28d07 + Face Atom = 0x21e04 + Fieldset Atom = 0x22608 + Figcaption Atom = 0x22e0a + Figure Atom = 0x24806 + Font Atom = 0x3f04 + Footer Atom = 0xf606 + For Atom = 0x25403 + ForeignObject Atom = 0x2540d + Foreignobject Atom = 0x2610d + Form Atom = 0x26e04 + Formaction Atom = 0x26e0a + Formenctype Atom = 0x2890b + Formmethod Atom = 0x2a40a + Formnovalidate Atom = 0x2ae0e + Formtarget Atom = 0x2c00a + Frame Atom = 0x8b05 + Frameset Atom = 0x8b08 + H1 Atom = 0x15c02 + H2 Atom = 0x2de02 + H3 Atom = 0x30d02 + H4 Atom = 0x34502 + H5 Atom = 0x34f02 + H6 Atom = 0x64d02 + Head Atom = 0x33104 + Header Atom = 0x33106 + Headers Atom = 0x33107 + Height Atom = 0x5206 + Hgroup Atom = 0x2ca06 + Hidden Atom = 0x2d506 + High Atom = 0x2db04 + Hr Atom = 0x15702 + Href Atom = 0x2e004 + Hreflang Atom = 0x2e008 + Html Atom = 0x5604 + HttpEquiv Atom = 0x2e80a + I Atom = 0x601 + Icon Atom = 0x58a04 + Id Atom = 0x10902 + Iframe Atom = 0x2fc06 + Image Atom = 0x30205 + Img Atom = 0x30703 + Input Atom = 0x44b05 + Inputmode Atom = 0x44b09 + Ins Atom = 0x20403 + Integrity Atom = 0x23f09 + Is Atom = 0x16502 + Isindex Atom = 0x30f07 + Ismap Atom = 0x31605 + Itemid Atom = 0x38b06 + Itemprop Atom = 0x19d08 + Itemref Atom = 0x3cd07 + Itemscope Atom = 0x67109 + Itemtype Atom = 0x31f08 + Kbd Atom = 0xb903 + Keygen Atom = 0x3206 + Keytype Atom = 0xd607 + Kind Atom = 0x17704 + Label Atom = 0x5905 + Lang Atom = 0x2e404 + Legend Atom = 0x18106 + Li Atom = 0xb202 + Link Atom = 0x17404 + List Atom = 0x4a904 + Listing Atom = 0x4a907 + Loop Atom = 0x5d04 + Low Atom = 0xc303 + Main Atom = 0x1004 + Malignmark Atom = 0xb00a + Manifest Atom = 0x6d708 + Map Atom = 0x31803 + Mark Atom = 0xb604 + Marquee Atom = 0x32707 + Math Atom = 0x32e04 + Max Atom = 0x33d03 + Maxlength Atom = 0x33d09 + Media Atom = 0xe605 + Mediagroup Atom = 0xe60a + Menu Atom = 0x38704 + Menuitem Atom = 0x38708 + Meta Atom = 0x4b804 + Meter Atom = 0x9805 + Method Atom = 0x2a806 + Mglyph Atom = 0x30806 + Mi Atom = 0x34702 + Min Atom = 0x34703 + Minlength Atom = 0x34709 + Mn Atom = 0x2b102 + Mo Atom = 0xa402 + Ms Atom = 0x67402 + Mtext Atom = 0x35105 + Multiple Atom = 0x35f08 + Muted Atom = 0x36705 + Name Atom = 0x9604 + Nav Atom = 0x1303 + Nobr Atom = 0x3704 + Noembed Atom = 0x6c07 + Noframes Atom = 0x8908 + Nomodule Atom = 0xa208 + Nonce Atom = 0x1a605 + Noscript Atom = 0x21608 + Novalidate Atom = 0x2b20a + Object Atom = 0x26806 + Ol Atom = 0x13702 + Onabort Atom = 0x19507 + Onafterprint Atom = 0x2360c + Onautocomplete Atom = 0x2760e + Onautocompleteerror Atom = 0x27613 + Onauxclick Atom = 0x61f0a + Onbeforeprint Atom = 0x69e0d + Onbeforeunload Atom = 0x6e70e + Onblur Atom = 0x56d06 + Oncancel Atom = 0x11908 + Oncanplay Atom = 0x14d09 + Oncanplaythrough Atom = 0x14d10 + Onchange Atom = 0x41b08 + Onclick Atom = 0x2f507 + Onclose Atom = 0x36c07 + Oncontextmenu Atom = 0x37e0d + Oncopy Atom = 0x39106 + Oncuechange Atom = 0x3970b + Oncut Atom = 0x3a205 + Ondblclick Atom = 0x3a70a + Ondrag Atom = 0x3b106 + Ondragend Atom = 0x3b109 + Ondragenter Atom = 0x3ba0b + Ondragexit Atom = 0x3c50a + Ondragleave Atom = 0x3df0b + Ondragover Atom = 0x3ea0a + Ondragstart Atom = 0x3f40b + Ondrop Atom = 0x40306 + Ondurationchange Atom = 0x41310 + Onemptied Atom = 0x40a09 + Onended Atom = 0x42307 + Onerror Atom = 0x42a07 + Onfocus Atom = 0x43107 + Onhashchange Atom = 0x43d0c + Oninput Atom = 0x44907 + Oninvalid Atom = 0x45509 + Onkeydown Atom = 0x45e09 + Onkeypress Atom = 0x46b0a + Onkeyup Atom = 0x48007 + Onlanguagechange Atom = 0x48d10 + Onload Atom = 0x49d06 + Onloadeddata Atom = 0x49d0c + Onloadedmetadata Atom = 0x4b010 + Onloadend Atom = 0x4c609 + Onloadstart Atom = 0x4cf0b + Onmessage Atom = 0x4da09 + Onmessageerror Atom = 0x4da0e + Onmousedown Atom = 0x4e80b + Onmouseenter Atom = 0x4f30c + Onmouseleave Atom = 0x4ff0c + Onmousemove Atom = 0x50b0b + Onmouseout Atom = 0x5160a + Onmouseover Atom = 0x5230b + Onmouseup Atom = 0x52e09 + Onmousewheel Atom = 0x53c0c + Onoffline Atom = 0x54809 + Ononline Atom = 0x55108 + Onpagehide Atom = 0x5590a + Onpageshow Atom = 0x5730a + Onpaste Atom = 0x57f07 + Onpause Atom = 0x59a07 + Onplay Atom = 0x5a406 + Onplaying Atom = 0x5a409 + Onpopstate Atom = 0x5ad0a + Onprogress Atom = 0x5b70a + Onratechange Atom = 0x5cc0c + Onrejectionhandled Atom = 0x5d812 + Onreset Atom = 0x5ea07 + Onresize Atom = 0x5f108 + Onscroll Atom = 0x60008 + Onsecuritypolicyviolation Atom = 0x60819 + Onseeked Atom = 0x62908 + Onseeking Atom = 0x63109 + Onselect Atom = 0x63a08 + Onshow Atom = 0x64406 + Onsort Atom = 0x64f06 + Onstalled Atom = 0x65909 + Onstorage Atom = 0x66209 + Onsubmit Atom = 0x66b08 + Onsuspend Atom = 0x67b09 + Ontimeupdate Atom = 0x400c + Ontoggle Atom = 0x68408 + Onunhandledrejection Atom = 0x68c14 + Onunload Atom = 0x6ab08 + Onvolumechange Atom = 0x6b30e + Onwaiting Atom = 0x6c109 + Onwheel Atom = 0x6ca07 + Open Atom = 0x1a304 + Optgroup Atom = 0x5f08 + Optimum Atom = 0x6d107 + Option Atom = 0x6e306 + Output Atom = 0x51d06 + P Atom = 0xc01 + Param Atom = 0xc05 + Pattern Atom = 0x6607 + Picture Atom = 0x7b07 + Ping Atom = 0xef04 + Placeholder Atom = 0x1310b + Plaintext Atom = 0x1b209 + Playsinline Atom = 0x1400b + Poster Atom = 0x2cf06 + Pre Atom = 0x47003 + Preload Atom = 0x48607 + Progress Atom = 0x5b908 + Prompt Atom = 0x53606 + Public Atom = 0x58606 + Q Atom = 0xcf01 + Radiogroup Atom = 0x30a + Rb Atom = 0x3a02 + Readonly Atom = 0x35708 + Referrerpolicy Atom = 0x3d10e + Rel Atom = 0x48703 + Required Atom = 0x24c08 + Reversed Atom = 0x8008 + Rows Atom = 0x9c04 + Rowspan Atom = 0x9c07 + Rp Atom = 0x23c02 + Rt Atom = 0x19a02 + Rtc Atom = 0x19a03 + Ruby Atom = 0xfb04 + S Atom = 0x2501 + Samp Atom = 0x7804 + Sandbox Atom = 0x12907 + Scope Atom = 0x67505 + Scoped Atom = 0x67506 + Script Atom = 0x21806 + Seamless Atom = 0x37108 + Section Atom = 0x56807 + Select Atom = 0x63c06 + Selected Atom = 0x63c08 + Shape Atom = 0x1e505 + Size Atom = 0x5f504 + Sizes Atom = 0x5f505 + Slot Atom = 0x1ef04 + Small Atom = 0x20605 + Sortable Atom = 0x65108 + Sorted Atom = 0x33706 + Source Atom = 0x37806 + Spacer Atom = 0x43706 + Span Atom = 0x9f04 + Spellcheck Atom = 0x4740a + Src Atom = 0x5c003 + Srcdoc Atom = 0x5c006 + Srclang Atom = 0x5f907 + Srcset Atom = 0x6f906 + Start Atom = 0x3fa05 + Step Atom = 0x58304 + Strike Atom = 0xd206 + Strong Atom = 0x6dd06 + Style Atom = 0x6ff05 + Sub Atom = 0x66d03 + Summary Atom = 0x70407 + Sup Atom = 0x70b03 + Svg Atom = 0x70e03 + System Atom = 0x71106 + Tabindex Atom = 0x4be08 + Table Atom = 0x59505 + Target Atom = 0x2c406 + Tbody Atom = 0x2705 + Td Atom = 0x9202 + Template Atom = 0x71408 + Textarea Atom = 0x35208 + Tfoot Atom = 0xf505 + Th Atom = 0x15602 + Thead Atom = 0x33005 + Time Atom = 0x4204 + Title Atom = 0x11005 + Tr Atom = 0xcc02 + Track Atom = 0x1ba05 + Translate Atom = 0x1f209 + Tt Atom = 0x6802 + Type Atom = 0xd904 + Typemustmatch Atom = 0x2900d + U Atom = 0xb01 + Ul Atom = 0xa702 + Updateviacache Atom = 0x460e + Usemap Atom = 0x59e06 + Value Atom = 0x1505 + Var Atom = 0x16d03 + Video Atom = 0x2f105 + Wbr Atom = 0x57c03 + Width Atom = 0x64905 + Workertype Atom = 0x71c0a + Wrap Atom = 0x72604 + Xmp Atom = 0x12f03 +) + +const hash0 = 0x81cdf10e + +const maxAtomLen = 25 + +var table = [1 << 9]Atom{ + 0x1: 0xe60a, // mediagroup + 0x2: 0x2e404, // lang + 0x4: 0x2c09, // accesskey + 0x5: 0x8b08, // frameset + 0x7: 0x63a08, // onselect + 0x8: 0x71106, // system + 0xa: 0x64905, // width + 0xc: 0x2890b, // formenctype + 0xd: 0x13702, // ol + 0xe: 0x3970b, // oncuechange + 0x10: 0x14b03, // bdo + 0x11: 0x11505, // audio + 0x12: 0x17a09, // draggable + 0x14: 0x2f105, // video + 0x15: 0x2b102, // mn + 0x16: 0x38704, // menu + 0x17: 0x2cf06, // poster + 0x19: 0xf606, // footer + 0x1a: 0x2a806, // method + 0x1b: 0x2b808, // datetime + 0x1c: 0x19507, // onabort + 0x1d: 0x460e, // updateviacache + 0x1e: 0xff05, // async + 0x1f: 0x49d06, // onload + 0x21: 0x11908, // oncancel + 0x22: 0x62908, // onseeked + 0x23: 0x30205, // image + 0x24: 0x5d812, // onrejectionhandled + 0x26: 0x17404, // link + 0x27: 0x51d06, // output + 0x28: 0x33104, // head + 0x29: 0x4ff0c, // onmouseleave + 0x2a: 0x57f07, // onpaste + 0x2b: 0x5a409, // onplaying + 0x2c: 0x1c407, // colspan + 0x2f: 0x1bf05, // color + 0x30: 0x5f504, // size + 0x31: 0x2e80a, // http-equiv + 0x33: 0x601, // i + 0x34: 0x5590a, // onpagehide + 0x35: 0x68c14, // onunhandledrejection + 0x37: 0x42a07, // onerror + 0x3a: 0x3b08, // basefont + 0x3f: 0x1303, // nav + 0x40: 0x17704, // kind + 0x41: 0x35708, // readonly + 0x42: 0x30806, // mglyph + 0x44: 0xb202, // li + 0x46: 0x2d506, // hidden + 0x47: 0x70e03, // svg + 0x48: 0x58304, // step + 0x49: 0x23f09, // integrity + 0x4a: 0x58606, // public + 0x4c: 0x1ab03, // col + 0x4d: 0x1870a, // blockquote + 0x4e: 0x34f02, // h5 + 0x50: 0x5b908, // progress + 0x51: 0x5f505, // sizes + 0x52: 0x34502, // h4 + 0x56: 0x33005, // thead + 0x57: 0xd607, // keytype + 0x58: 0x5b70a, // onprogress + 0x59: 0x44b09, // inputmode + 0x5a: 0x3b109, // ondragend + 0x5d: 0x3a205, // oncut + 0x5e: 0x43706, // spacer + 0x5f: 0x1ab08, // colgroup + 0x62: 0x16502, // is + 0x65: 0x3c02, // as + 0x66: 0x54809, // onoffline + 0x67: 0x33706, // sorted + 0x69: 0x48d10, // onlanguagechange + 0x6c: 0x43d0c, // onhashchange + 0x6d: 0x9604, // name + 0x6e: 0xf505, // tfoot + 0x6f: 0x56104, // desc + 0x70: 0x33d03, // max + 0x72: 0x1ea06, // coords + 0x73: 0x30d02, // h3 + 0x74: 0x6e70e, // onbeforeunload + 0x75: 0x9c04, // rows + 0x76: 0x63c06, // select + 0x77: 0x9805, // meter + 0x78: 0x38b06, // itemid + 0x79: 0x53c0c, // onmousewheel + 0x7a: 0x5c006, // srcdoc + 0x7d: 0x1ba05, // track + 0x7f: 0x31f08, // itemtype + 0x82: 0xa402, // mo + 0x83: 0x41b08, // onchange + 0x84: 0x33107, // headers + 0x85: 0x5cc0c, // onratechange + 0x86: 0x60819, // onsecuritypolicyviolation + 0x88: 0x4a508, // datalist + 0x89: 0x4e80b, // onmousedown + 0x8a: 0x1ef04, // slot + 0x8b: 0x4b010, // onloadedmetadata + 0x8c: 0x1a06, // accept + 0x8d: 0x26806, // object + 0x91: 0x6b30e, // onvolumechange + 0x92: 0x2107, // charset + 0x93: 0x27613, // onautocompleteerror + 0x94: 0xc113, // allowpaymentrequest + 0x95: 0x2804, // body + 0x96: 0x10a07, // default + 0x97: 0x63c08, // selected + 0x98: 0x21e04, // face + 0x99: 0x1e505, // shape + 0x9b: 0x68408, // ontoggle + 0x9e: 0x64b02, // dt + 0x9f: 0xb604, // mark + 0xa1: 0xb01, // u + 0xa4: 0x6ab08, // onunload + 0xa5: 0x5d04, // loop + 0xa6: 0x16408, // disabled + 0xaa: 0x42307, // onended + 0xab: 0xb00a, // malignmark + 0xad: 0x67b09, // onsuspend + 0xae: 0x35105, // mtext + 0xaf: 0x64f06, // onsort + 0xb0: 0x19d08, // itemprop + 0xb3: 0x67109, // itemscope + 0xb4: 0x17305, // blink + 0xb6: 0x3b106, // ondrag + 0xb7: 0xa702, // ul + 0xb8: 0x26e04, // form + 0xb9: 0x12907, // sandbox + 0xba: 0x8b05, // frame + 0xbb: 0x1505, // value + 0xbc: 0x66209, // onstorage + 0xbf: 0xaa07, // acronym + 0xc0: 0x19a02, // rt + 0xc2: 0x202, // br + 0xc3: 0x22608, // fieldset + 0xc4: 0x2900d, // typemustmatch + 0xc5: 0xa208, // nomodule + 0xc6: 0x6c07, // noembed + 0xc7: 0x69e0d, // onbeforeprint + 0xc8: 0x19106, // button + 0xc9: 0x2f507, // onclick + 0xca: 0x70407, // summary + 0xcd: 0xfb04, // ruby + 0xce: 0x56405, // class + 0xcf: 0x3f40b, // ondragstart + 0xd0: 0x23107, // caption + 0xd4: 0xdd0e, // allowusermedia + 0xd5: 0x4cf0b, // onloadstart + 0xd9: 0x16b03, // div + 0xda: 0x4a904, // list + 0xdb: 0x32e04, // math + 0xdc: 0x44b05, // input + 0xdf: 0x3ea0a, // ondragover + 0xe0: 0x2de02, // h2 + 0xe2: 0x1b209, // plaintext + 0xe4: 0x4f30c, // onmouseenter + 0xe7: 0x47907, // checked + 0xe8: 0x47003, // pre + 0xea: 0x35f08, // multiple + 0xeb: 0xba03, // bdi + 0xec: 0x33d09, // maxlength + 0xed: 0xcf01, // q + 0xee: 0x61f0a, // onauxclick + 0xf0: 0x57c03, // wbr + 0xf2: 0x3b04, // base + 0xf3: 0x6e306, // option + 0xf5: 0x41310, // ondurationchange + 0xf7: 0x8908, // noframes + 0xf9: 0x40508, // dropzone + 0xfb: 0x67505, // scope + 0xfc: 0x8008, // reversed + 0xfd: 0x3ba0b, // ondragenter + 0xfe: 0x3fa05, // start + 0xff: 0x12f03, // xmp + 0x100: 0x5f907, // srclang + 0x101: 0x30703, // img + 0x104: 0x101, // b + 0x105: 0x25403, // for + 0x106: 0x10705, // aside + 0x107: 0x44907, // oninput + 0x108: 0x35604, // area + 0x109: 0x2a40a, // formmethod + 0x10a: 0x72604, // wrap + 0x10c: 0x23c02, // rp + 0x10d: 0x46b0a, // onkeypress + 0x10e: 0x6802, // tt + 0x110: 0x34702, // mi + 0x111: 0x36705, // muted + 0x112: 0xf303, // alt + 0x113: 0x5c504, // code + 0x114: 0x6e02, // em + 0x115: 0x3c50a, // ondragexit + 0x117: 0x9f04, // span + 0x119: 0x6d708, // manifest + 0x11a: 0x38708, // menuitem + 0x11b: 0x58b07, // content + 0x11d: 0x6c109, // onwaiting + 0x11f: 0x4c609, // onloadend + 0x121: 0x37e0d, // oncontextmenu + 0x123: 0x56d06, // onblur + 0x124: 0x3fc07, // article + 0x125: 0x9303, // dir + 0x126: 0xef04, // ping + 0x127: 0x24c08, // required + 0x128: 0x45509, // oninvalid + 0x129: 0xb105, // align + 0x12b: 0x58a04, // icon + 0x12c: 0x64d02, // h6 + 0x12d: 0x1c404, // cols + 0x12e: 0x22e0a, // figcaption + 0x12f: 0x45e09, // onkeydown + 0x130: 0x66b08, // onsubmit + 0x131: 0x14d09, // oncanplay + 0x132: 0x70b03, // sup + 0x133: 0xc01, // p + 0x135: 0x40a09, // onemptied + 0x136: 0x39106, // oncopy + 0x137: 0x19c04, // cite + 0x138: 0x3a70a, // ondblclick + 0x13a: 0x50b0b, // onmousemove + 0x13c: 0x66d03, // sub + 0x13d: 0x48703, // rel + 0x13e: 0x5f08, // optgroup + 0x142: 0x9c07, // rowspan + 0x143: 0x37806, // source + 0x144: 0x21608, // noscript + 0x145: 0x1a304, // open + 0x146: 0x20403, // ins + 0x147: 0x2540d, // foreignObject + 0x148: 0x5ad0a, // onpopstate + 0x14a: 0x28d07, // enctype + 0x14b: 0x2760e, // onautocomplete + 0x14c: 0x35208, // textarea + 0x14e: 0x2780c, // autocomplete + 0x14f: 0x15702, // hr + 0x150: 0x1de08, // controls + 0x151: 0x10902, // id + 0x153: 0x2360c, // onafterprint + 0x155: 0x2610d, // foreignobject + 0x156: 0x32707, // marquee + 0x157: 0x59a07, // onpause + 0x158: 0x5e602, // dl + 0x159: 0x5206, // height + 0x15a: 0x34703, // min + 0x15b: 0x9307, // dirname + 0x15c: 0x1f209, // translate + 0x15d: 0x5604, // html + 0x15e: 0x34709, // minlength + 0x15f: 0x48607, // preload + 0x160: 0x71408, // template + 0x161: 0x3df0b, // ondragleave + 0x162: 0x3a02, // rb + 0x164: 0x5c003, // src + 0x165: 0x6dd06, // strong + 0x167: 0x7804, // samp + 0x168: 0x6f307, // address + 0x169: 0x55108, // ononline + 0x16b: 0x1310b, // placeholder + 0x16c: 0x2c406, // target + 0x16d: 0x20605, // small + 0x16e: 0x6ca07, // onwheel + 0x16f: 0x1c90a, // annotation + 0x170: 0x4740a, // spellcheck + 0x171: 0x7207, // details + 0x172: 0x10306, // canvas + 0x173: 0x12109, // autofocus + 0x174: 0xc05, // param + 0x176: 0x46308, // download + 0x177: 0x45203, // del + 0x178: 0x36c07, // onclose + 0x179: 0xb903, // kbd + 0x17a: 0x31906, // applet + 0x17b: 0x2e004, // href + 0x17c: 0x5f108, // onresize + 0x17e: 0x49d0c, // onloadeddata + 0x180: 0xcc02, // tr + 0x181: 0x2c00a, // formtarget + 0x182: 0x11005, // title + 0x183: 0x6ff05, // style + 0x184: 0xd206, // strike + 0x185: 0x59e06, // usemap + 0x186: 0x2fc06, // iframe + 0x187: 0x1004, // main + 0x189: 0x7b07, // picture + 0x18c: 0x31605, // ismap + 0x18e: 0x4a504, // data + 0x18f: 0x5905, // label + 0x191: 0x3d10e, // referrerpolicy + 0x192: 0x15602, // th + 0x194: 0x53606, // prompt + 0x195: 0x56807, // section + 0x197: 0x6d107, // optimum + 0x198: 0x2db04, // high + 0x199: 0x15c02, // h1 + 0x19a: 0x65909, // onstalled + 0x19b: 0x16d03, // var + 0x19c: 0x4204, // time + 0x19e: 0x67402, // ms + 0x19f: 0x33106, // header + 0x1a0: 0x4da09, // onmessage + 0x1a1: 0x1a605, // nonce + 0x1a2: 0x26e0a, // formaction + 0x1a3: 0x22006, // center + 0x1a4: 0x3704, // nobr + 0x1a5: 0x59505, // table + 0x1a6: 0x4a907, // listing + 0x1a7: 0x18106, // legend + 0x1a9: 0x29b09, // challenge + 0x1aa: 0x24806, // figure + 0x1ab: 0xe605, // media + 0x1ae: 0xd904, // type + 0x1af: 0x3f04, // font + 0x1b0: 0x4da0e, // onmessageerror + 0x1b1: 0x37108, // seamless + 0x1b2: 0x8703, // dfn + 0x1b3: 0x5c705, // defer + 0x1b4: 0xc303, // low + 0x1b5: 0x19a03, // rtc + 0x1b6: 0x5230b, // onmouseover + 0x1b7: 0x2b20a, // novalidate + 0x1b8: 0x71c0a, // workertype + 0x1ba: 0x3cd07, // itemref + 0x1bd: 0x1, // a + 0x1be: 0x31803, // map + 0x1bf: 0x400c, // ontimeupdate + 0x1c0: 0x15e07, // bgsound + 0x1c1: 0x3206, // keygen + 0x1c2: 0x2705, // tbody + 0x1c5: 0x64406, // onshow + 0x1c7: 0x2501, // s + 0x1c8: 0x6607, // pattern + 0x1cc: 0x14d10, // oncanplaythrough + 0x1ce: 0x2d702, // dd + 0x1cf: 0x6f906, // srcset + 0x1d0: 0x17003, // big + 0x1d2: 0x65108, // sortable + 0x1d3: 0x48007, // onkeyup + 0x1d5: 0x5a406, // onplay + 0x1d7: 0x4b804, // meta + 0x1d8: 0x40306, // ondrop + 0x1da: 0x60008, // onscroll + 0x1db: 0x1fb0b, // crossorigin + 0x1dc: 0x5730a, // onpageshow + 0x1dd: 0x4, // abbr + 0x1de: 0x9202, // td + 0x1df: 0x58b0f, // contenteditable + 0x1e0: 0x27206, // action + 0x1e1: 0x1400b, // playsinline + 0x1e2: 0x43107, // onfocus + 0x1e3: 0x2e008, // hreflang + 0x1e5: 0x5160a, // onmouseout + 0x1e6: 0x5ea07, // onreset + 0x1e7: 0x13c08, // autoplay + 0x1e8: 0x63109, // onseeking + 0x1ea: 0x67506, // scoped + 0x1ec: 0x30a, // radiogroup + 0x1ee: 0x3800b, // contextmenu + 0x1ef: 0x52e09, // onmouseup + 0x1f1: 0x2ca06, // hgroup + 0x1f2: 0x2080f, // allowfullscreen + 0x1f3: 0x4be08, // tabindex + 0x1f6: 0x30f07, // isindex + 0x1f7: 0x1a0e, // accept-charset + 0x1f8: 0x2ae0e, // formnovalidate + 0x1fb: 0x1c90e, // annotation-xml + 0x1fc: 0x6e05, // embed + 0x1fd: 0x21806, // script + 0x1fe: 0xbb06, // dialog + 0x1ff: 0x1d707, // command +} + +const atomText = "abbradiogrouparamainavalueaccept-charsetbodyaccesskeygenobrb" + + "asefontimeupdateviacacheightmlabelooptgroupatternoembedetail" + + "sampictureversedfnoframesetdirnameterowspanomoduleacronymali" + + "gnmarkbdialogallowpaymentrequestrikeytypeallowusermediagroup" + + "ingaltfooterubyasyncanvasidefaultitleaudioncancelautofocusan" + + "dboxmplaceholderautoplaysinlinebdoncanplaythrough1bgsoundisa" + + "bledivarbigblinkindraggablegendblockquotebuttonabortcitempro" + + "penoncecolgrouplaintextrackcolorcolspannotation-xmlcommandco" + + "ntrolshapecoordslotranslatecrossoriginsmallowfullscreenoscri" + + "ptfacenterfieldsetfigcaptionafterprintegrityfigurequiredfore" + + "ignObjectforeignobjectformactionautocompleteerrorformenctype" + + "mustmatchallengeformmethodformnovalidatetimeformtargethgroup" + + "osterhiddenhigh2hreflanghttp-equivideonclickiframeimageimgly" + + "ph3isindexismappletitemtypemarqueematheadersortedmaxlength4m" + + "inlength5mtextareadonlymultiplemutedoncloseamlessourceoncont" + + "extmenuitemidoncopyoncuechangeoncutondblclickondragendondrag" + + "enterondragexitemreferrerpolicyondragleaveondragoverondragst" + + "articleondropzonemptiedondurationchangeonendedonerroronfocus" + + "paceronhashchangeoninputmodeloninvalidonkeydownloadonkeypres" + + "spellcheckedonkeyupreloadonlanguagechangeonloadeddatalisting" + + "onloadedmetadatabindexonloadendonloadstartonmessageerroronmo" + + "usedownonmouseenteronmouseleaveonmousemoveonmouseoutputonmou" + + "seoveronmouseupromptonmousewheelonofflineononlineonpagehides" + + "classectionbluronpageshowbronpastepublicontenteditableonpaus" + + "emaponplayingonpopstateonprogressrcdocodeferonratechangeonre" + + "jectionhandledonresetonresizesrclangonscrollonsecuritypolicy" + + "violationauxclickonseekedonseekingonselectedonshowidth6onsor" + + "tableonstalledonstorageonsubmitemscopedonsuspendontoggleonun" + + "handledrejectionbeforeprintonunloadonvolumechangeonwaitingon" + + "wheeloptimumanifestrongoptionbeforeunloaddressrcsetstylesumm" + + "arysupsvgsystemplateworkertypewrap" diff --git a/vendor/golang.org/x/net/html/charset/charset.go b/vendor/golang.org/x/net/html/charset/charset.go new file mode 100644 index 000000000..13bed1599 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/charset.go @@ -0,0 +1,257 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package charset provides common text encodings for HTML documents. +// +// The mapping from encoding labels to encodings is defined at +// https://encoding.spec.whatwg.org/. +package charset // import "golang.org/x/net/html/charset" + +import ( + "bytes" + "fmt" + "io" + "mime" + "strings" + "unicode/utf8" + + "golang.org/x/net/html" + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/charmap" + "golang.org/x/text/encoding/htmlindex" + "golang.org/x/text/transform" +) + +// Lookup returns the encoding with the specified label, and its canonical +// name. It returns nil and the empty string if label is not one of the +// standard encodings for HTML. Matching is case-insensitive and ignores +// leading and trailing whitespace. Encoders will use HTML escape sequences for +// runes that are not supported by the character set. +func Lookup(label string) (e encoding.Encoding, name string) { + e, err := htmlindex.Get(label) + if err != nil { + return nil, "" + } + name, _ = htmlindex.Name(e) + return &htmlEncoding{e}, name +} + +type htmlEncoding struct{ encoding.Encoding } + +func (h *htmlEncoding) NewEncoder() *encoding.Encoder { + // HTML requires a non-terminating legacy encoder. We use HTML escapes to + // substitute unsupported code points. + return encoding.HTMLEscapeUnsupported(h.Encoding.NewEncoder()) +} + +// DetermineEncoding determines the encoding of an HTML document by examining +// up to the first 1024 bytes of content and the declared Content-Type. +// +// See http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#determining-the-character-encoding +func DetermineEncoding(content []byte, contentType string) (e encoding.Encoding, name string, certain bool) { + if len(content) > 1024 { + content = content[:1024] + } + + for _, b := range boms { + if bytes.HasPrefix(content, b.bom) { + e, name = Lookup(b.enc) + return e, name, true + } + } + + if _, params, err := mime.ParseMediaType(contentType); err == nil { + if cs, ok := params["charset"]; ok { + if e, name = Lookup(cs); e != nil { + return e, name, true + } + } + } + + if len(content) > 0 { + e, name = prescan(content) + if e != nil { + return e, name, false + } + } + + // Try to detect UTF-8. + // First eliminate any partial rune at the end. + for i := len(content) - 1; i >= 0 && i > len(content)-4; i-- { + b := content[i] + if b < 0x80 { + break + } + if utf8.RuneStart(b) { + content = content[:i] + break + } + } + hasHighBit := false + for _, c := range content { + if c >= 0x80 { + hasHighBit = true + break + } + } + if hasHighBit && utf8.Valid(content) { + return encoding.Nop, "utf-8", false + } + + // TODO: change default depending on user's locale? + return charmap.Windows1252, "windows-1252", false +} + +// NewReader returns an io.Reader that converts the content of r to UTF-8. +// It calls DetermineEncoding to find out what r's encoding is. +func NewReader(r io.Reader, contentType string) (io.Reader, error) { + preview := make([]byte, 1024) + n, err := io.ReadFull(r, preview) + switch { + case err == io.ErrUnexpectedEOF: + preview = preview[:n] + r = bytes.NewReader(preview) + case err != nil: + return nil, err + default: + r = io.MultiReader(bytes.NewReader(preview), r) + } + + if e, _, _ := DetermineEncoding(preview, contentType); e != encoding.Nop { + r = transform.NewReader(r, e.NewDecoder()) + } + return r, nil +} + +// NewReaderLabel returns a reader that converts from the specified charset to +// UTF-8. It uses Lookup to find the encoding that corresponds to label, and +// returns an error if Lookup returns nil. It is suitable for use as +// encoding/xml.Decoder's CharsetReader function. +func NewReaderLabel(label string, input io.Reader) (io.Reader, error) { + e, _ := Lookup(label) + if e == nil { + return nil, fmt.Errorf("unsupported charset: %q", label) + } + return transform.NewReader(input, e.NewDecoder()), nil +} + +func prescan(content []byte) (e encoding.Encoding, name string) { + z := html.NewTokenizer(bytes.NewReader(content)) + for { + switch z.Next() { + case html.ErrorToken: + return nil, "" + + case html.StartTagToken, html.SelfClosingTagToken: + tagName, hasAttr := z.TagName() + if !bytes.Equal(tagName, []byte("meta")) { + continue + } + attrList := make(map[string]bool) + gotPragma := false + + const ( + dontKnow = iota + doNeedPragma + doNotNeedPragma + ) + needPragma := dontKnow + + name = "" + e = nil + for hasAttr { + var key, val []byte + key, val, hasAttr = z.TagAttr() + ks := string(key) + if attrList[ks] { + continue + } + attrList[ks] = true + for i, c := range val { + if 'A' <= c && c <= 'Z' { + val[i] = c + 0x20 + } + } + + switch ks { + case "http-equiv": + if bytes.Equal(val, []byte("content-type")) { + gotPragma = true + } + + case "content": + if e == nil { + name = fromMetaElement(string(val)) + if name != "" { + e, name = Lookup(name) + if e != nil { + needPragma = doNeedPragma + } + } + } + + case "charset": + e, name = Lookup(string(val)) + needPragma = doNotNeedPragma + } + } + + if needPragma == dontKnow || needPragma == doNeedPragma && !gotPragma { + continue + } + + if strings.HasPrefix(name, "utf-16") { + name = "utf-8" + e = encoding.Nop + } + + if e != nil { + return e, name + } + } + } +} + +func fromMetaElement(s string) string { + for s != "" { + csLoc := strings.Index(s, "charset") + if csLoc == -1 { + return "" + } + s = s[csLoc+len("charset"):] + s = strings.TrimLeft(s, " \t\n\f\r") + if !strings.HasPrefix(s, "=") { + continue + } + s = s[1:] + s = strings.TrimLeft(s, " \t\n\f\r") + if s == "" { + return "" + } + if q := s[0]; q == '"' || q == '\'' { + s = s[1:] + closeQuote := strings.IndexRune(s, rune(q)) + if closeQuote == -1 { + return "" + } + return s[:closeQuote] + } + + end := strings.IndexAny(s, "; \t\n\f\r") + if end == -1 { + end = len(s) + } + return s[:end] + } + return "" +} + +var boms = []struct { + bom []byte + enc string +}{ + {[]byte{0xfe, 0xff}, "utf-16be"}, + {[]byte{0xff, 0xfe}, "utf-16le"}, + {[]byte{0xef, 0xbb, 0xbf}, "utf-8"}, +} diff --git a/vendor/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go new file mode 100644 index 000000000..ff7acf2d5 --- /dev/null +++ b/vendor/golang.org/x/net/html/const.go @@ -0,0 +1,111 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +// Section 12.2.4.2 of the HTML5 specification says "The following elements +// have varying levels of special parsing rules". +// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements +var isSpecialElementMap = map[string]bool{ + "address": true, + "applet": true, + "area": true, + "article": true, + "aside": true, + "base": true, + "basefont": true, + "bgsound": true, + "blockquote": true, + "body": true, + "br": true, + "button": true, + "caption": true, + "center": true, + "col": true, + "colgroup": true, + "dd": true, + "details": true, + "dir": true, + "div": true, + "dl": true, + "dt": true, + "embed": true, + "fieldset": true, + "figcaption": true, + "figure": true, + "footer": true, + "form": true, + "frame": true, + "frameset": true, + "h1": true, + "h2": true, + "h3": true, + "h4": true, + "h5": true, + "h6": true, + "head": true, + "header": true, + "hgroup": true, + "hr": true, + "html": true, + "iframe": true, + "img": true, + "input": true, + "keygen": true, // "keygen" has been removed from the spec, but are kept here for backwards compatibility. + "li": true, + "link": true, + "listing": true, + "main": true, + "marquee": true, + "menu": true, + "meta": true, + "nav": true, + "noembed": true, + "noframes": true, + "noscript": true, + "object": true, + "ol": true, + "p": true, + "param": true, + "plaintext": true, + "pre": true, + "script": true, + "section": true, + "select": true, + "source": true, + "style": true, + "summary": true, + "table": true, + "tbody": true, + "td": true, + "template": true, + "textarea": true, + "tfoot": true, + "th": true, + "thead": true, + "title": true, + "tr": true, + "track": true, + "ul": true, + "wbr": true, + "xmp": true, +} + +func isSpecialElement(element *Node) bool { + switch element.Namespace { + case "", "html": + return isSpecialElementMap[element.Data] + case "math": + switch element.Data { + case "mi", "mo", "mn", "ms", "mtext", "annotation-xml": + return true + } + case "svg": + switch element.Data { + case "foreignObject", "desc", "title": + return true + } + } + return false +} diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go new file mode 100644 index 000000000..3a7e5ab17 --- /dev/null +++ b/vendor/golang.org/x/net/html/doc.go @@ -0,0 +1,127 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package html implements an HTML5-compliant tokenizer and parser. + +Tokenization is done by creating a Tokenizer for an io.Reader r. It is the +caller's responsibility to ensure that r provides UTF-8 encoded HTML. + + z := html.NewTokenizer(r) + +Given a Tokenizer z, the HTML is tokenized by repeatedly calling z.Next(), +which parses the next token and returns its type, or an error: + + for { + tt := z.Next() + if tt == html.ErrorToken { + // ... + return ... + } + // Process the current token. + } + +There are two APIs for retrieving the current token. The high-level API is to +call Token; the low-level API is to call Text or TagName / TagAttr. Both APIs +allow optionally calling Raw after Next but before Token, Text, TagName, or +TagAttr. In EBNF notation, the valid call sequence per token is: + + Next {Raw} [ Token | Text | TagName {TagAttr} ] + +Token returns an independent data structure that completely describes a token. +Entities (such as "<") are unescaped, tag names and attribute keys are +lower-cased, and attributes are collected into a []Attribute. For example: + + for { + if z.Next() == html.ErrorToken { + // Returning io.EOF indicates success. + return z.Err() + } + emitToken(z.Token()) + } + +The low-level API performs fewer allocations and copies, but the contents of +the []byte values returned by Text, TagName and TagAttr may change on the next +call to Next. For example, to extract an HTML page's anchor text: + + depth := 0 + for { + tt := z.Next() + switch tt { + case html.ErrorToken: + return z.Err() + case html.TextToken: + if depth > 0 { + // emitBytes should copy the []byte it receives, + // if it doesn't process it immediately. + emitBytes(z.Text()) + } + case html.StartTagToken, html.EndTagToken: + tn, _ := z.TagName() + if len(tn) == 1 && tn[0] == 'a' { + if tt == html.StartTagToken { + depth++ + } else { + depth-- + } + } + } + } + +Parsing is done by calling Parse with an io.Reader, which returns the root of +the parse tree (the document element) as a *Node. It is the caller's +responsibility to ensure that the Reader provides UTF-8 encoded HTML. For +example, to process each anchor node in depth-first order: + + doc, err := html.Parse(r) + if err != nil { + // ... + } + var f func(*html.Node) + f = func(n *html.Node) { + if n.Type == html.ElementNode && n.Data == "a" { + // Do something with n... + } + for c := n.FirstChild; c != nil; c = c.NextSibling { + f(c) + } + } + f(doc) + +The relevant specifications include: +https://html.spec.whatwg.org/multipage/syntax.html and +https://html.spec.whatwg.org/multipage/syntax.html#tokenization + +# Security Considerations + +Care should be taken when parsing and interpreting HTML, whether full documents +or fragments, within the framework of the HTML specification, especially with +regard to untrusted inputs. + +This package provides both a tokenizer and a parser, which implement the +tokenization, and tokenization and tree construction stages of the WHATWG HTML +parsing specification respectively. While the tokenizer parses and normalizes +individual HTML tokens, only the parser constructs the DOM tree from the +tokenized HTML, as described in the tree construction stage of the +specification, dynamically modifying or extending the document's DOM tree. + +If your use case requires semantically well-formed HTML documents, as defined by +the WHATWG specification, the parser should be used rather than the tokenizer. + +In security contexts, if trust decisions are being made using the tokenized or +parsed content, the input must be re-serialized (for instance by using Render or +Token.String) in order for those trust decisions to hold, as the process of +tokenization or parsing may alter the content. +*/ +package html // import "golang.org/x/net/html" + +// The tokenization algorithm implemented by this package is not a line-by-line +// transliteration of the relatively verbose state-machine in the WHATWG +// specification. A more direct approach is used instead, where the program +// counter implies the state, such as whether it is tokenizing a tag or a text +// node. Specification compliance is verified by checking expected and actual +// outputs over a test suite rather than aiming for algorithmic fidelity. + +// TODO(nigeltao): Does a DOM API belong in this package or a separate one? +// TODO(nigeltao): How does parsing interact with a JavaScript engine? diff --git a/vendor/golang.org/x/net/html/doctype.go b/vendor/golang.org/x/net/html/doctype.go new file mode 100644 index 000000000..c484e5a94 --- /dev/null +++ b/vendor/golang.org/x/net/html/doctype.go @@ -0,0 +1,156 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "strings" +) + +// parseDoctype parses the data from a DoctypeToken into a name, +// public identifier, and system identifier. It returns a Node whose Type +// is DoctypeNode, whose Data is the name, and which has attributes +// named "system" and "public" for the two identifiers if they were present. +// quirks is whether the document should be parsed in "quirks mode". +func parseDoctype(s string) (n *Node, quirks bool) { + n = &Node{Type: DoctypeNode} + + // Find the name. + space := strings.IndexAny(s, whitespace) + if space == -1 { + space = len(s) + } + n.Data = s[:space] + // The comparison to "html" is case-sensitive. + if n.Data != "html" { + quirks = true + } + n.Data = strings.ToLower(n.Data) + s = strings.TrimLeft(s[space:], whitespace) + + if len(s) < 6 { + // It can't start with "PUBLIC" or "SYSTEM". + // Ignore the rest of the string. + return n, quirks || s != "" + } + + key := strings.ToLower(s[:6]) + s = s[6:] + for key == "public" || key == "system" { + s = strings.TrimLeft(s, whitespace) + if s == "" { + break + } + quote := s[0] + if quote != '"' && quote != '\'' { + break + } + s = s[1:] + q := strings.IndexRune(s, rune(quote)) + var id string + if q == -1 { + id = s + s = "" + } else { + id = s[:q] + s = s[q+1:] + } + n.Attr = append(n.Attr, Attribute{Key: key, Val: id}) + if key == "public" { + key = "system" + } else { + key = "" + } + } + + if key != "" || s != "" { + quirks = true + } else if len(n.Attr) > 0 { + if n.Attr[0].Key == "public" { + public := strings.ToLower(n.Attr[0].Val) + switch public { + case "-//w3o//dtd w3 html strict 3.0//en//", "-/w3d/dtd html 4.0 transitional/en", "html": + quirks = true + default: + for _, q := range quirkyIDs { + if strings.HasPrefix(public, q) { + quirks = true + break + } + } + } + // The following two public IDs only cause quirks mode if there is no system ID. + if len(n.Attr) == 1 && (strings.HasPrefix(public, "-//w3c//dtd html 4.01 frameset//") || + strings.HasPrefix(public, "-//w3c//dtd html 4.01 transitional//")) { + quirks = true + } + } + if lastAttr := n.Attr[len(n.Attr)-1]; lastAttr.Key == "system" && + strings.ToLower(lastAttr.Val) == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" { + quirks = true + } + } + + return n, quirks +} + +// quirkyIDs is a list of public doctype identifiers that cause a document +// to be interpreted in quirks mode. The identifiers should be in lower case. +var quirkyIDs = []string{ + "+//silmaril//dtd html pro v0r11 19970101//", + "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", + "-//as//dtd html 3.0 aswedit + extensions//", + "-//ietf//dtd html 2.0 level 1//", + "-//ietf//dtd html 2.0 level 2//", + "-//ietf//dtd html 2.0 strict level 1//", + "-//ietf//dtd html 2.0 strict level 2//", + "-//ietf//dtd html 2.0 strict//", + "-//ietf//dtd html 2.0//", + "-//ietf//dtd html 2.1e//", + "-//ietf//dtd html 3.0//", + "-//ietf//dtd html 3.2 final//", + "-//ietf//dtd html 3.2//", + "-//ietf//dtd html 3//", + "-//ietf//dtd html level 0//", + "-//ietf//dtd html level 1//", + "-//ietf//dtd html level 2//", + "-//ietf//dtd html level 3//", + "-//ietf//dtd html strict level 0//", + "-//ietf//dtd html strict level 1//", + "-//ietf//dtd html strict level 2//", + "-//ietf//dtd html strict level 3//", + "-//ietf//dtd html strict//", + "-//ietf//dtd html//", + "-//metrius//dtd metrius presentational//", + "-//microsoft//dtd internet explorer 2.0 html strict//", + "-//microsoft//dtd internet explorer 2.0 html//", + "-//microsoft//dtd internet explorer 2.0 tables//", + "-//microsoft//dtd internet explorer 3.0 html strict//", + "-//microsoft//dtd internet explorer 3.0 html//", + "-//microsoft//dtd internet explorer 3.0 tables//", + "-//netscape comm. corp.//dtd html//", + "-//netscape comm. corp.//dtd strict html//", + "-//o'reilly and associates//dtd html 2.0//", + "-//o'reilly and associates//dtd html extended 1.0//", + "-//o'reilly and associates//dtd html extended relaxed 1.0//", + "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", + "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", + "-//spyglass//dtd html 2.0 extended//", + "-//sq//dtd html 2.0 hotmetal + extensions//", + "-//sun microsystems corp.//dtd hotjava html//", + "-//sun microsystems corp.//dtd hotjava strict html//", + "-//w3c//dtd html 3 1995-03-24//", + "-//w3c//dtd html 3.2 draft//", + "-//w3c//dtd html 3.2 final//", + "-//w3c//dtd html 3.2//", + "-//w3c//dtd html 3.2s draft//", + "-//w3c//dtd html 4.0 frameset//", + "-//w3c//dtd html 4.0 transitional//", + "-//w3c//dtd html experimental 19960712//", + "-//w3c//dtd html experimental 970421//", + "-//w3c//dtd w3 html//", + "-//w3o//dtd w3 html 3.0//", + "-//webtechs//dtd mozilla html 2.0//", + "-//webtechs//dtd mozilla html//", +} diff --git a/vendor/golang.org/x/net/html/entity.go b/vendor/golang.org/x/net/html/entity.go new file mode 100644 index 000000000..b628880a0 --- /dev/null +++ b/vendor/golang.org/x/net/html/entity.go @@ -0,0 +1,2253 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +// All entities that do not end with ';' are 6 or fewer bytes long. +const longestEntityWithoutSemicolon = 6 + +// entity is a map from HTML entity names to their values. The semicolon matters: +// https://html.spec.whatwg.org/multipage/syntax.html#named-character-references +// lists both "amp" and "amp;" as two separate entries. +// +// Note that the HTML5 list is larger than the HTML4 list at +// http://www.w3.org/TR/html4/sgml/entities.html +var entity = map[string]rune{ + "AElig;": '\U000000C6', + "AMP;": '\U00000026', + "Aacute;": '\U000000C1', + "Abreve;": '\U00000102', + "Acirc;": '\U000000C2', + "Acy;": '\U00000410', + "Afr;": '\U0001D504', + "Agrave;": '\U000000C0', + "Alpha;": '\U00000391', + "Amacr;": '\U00000100', + "And;": '\U00002A53', + "Aogon;": '\U00000104', + "Aopf;": '\U0001D538', + "ApplyFunction;": '\U00002061', + "Aring;": '\U000000C5', + "Ascr;": '\U0001D49C', + "Assign;": '\U00002254', + "Atilde;": '\U000000C3', + "Auml;": '\U000000C4', + "Backslash;": '\U00002216', + "Barv;": '\U00002AE7', + "Barwed;": '\U00002306', + "Bcy;": '\U00000411', + "Because;": '\U00002235', + "Bernoullis;": '\U0000212C', + "Beta;": '\U00000392', + "Bfr;": '\U0001D505', + "Bopf;": '\U0001D539', + "Breve;": '\U000002D8', + "Bscr;": '\U0000212C', + "Bumpeq;": '\U0000224E', + "CHcy;": '\U00000427', + "COPY;": '\U000000A9', + "Cacute;": '\U00000106', + "Cap;": '\U000022D2', + "CapitalDifferentialD;": '\U00002145', + "Cayleys;": '\U0000212D', + "Ccaron;": '\U0000010C', + "Ccedil;": '\U000000C7', + "Ccirc;": '\U00000108', + "Cconint;": '\U00002230', + "Cdot;": '\U0000010A', + "Cedilla;": '\U000000B8', + "CenterDot;": '\U000000B7', + "Cfr;": '\U0000212D', + "Chi;": '\U000003A7', + "CircleDot;": '\U00002299', + "CircleMinus;": '\U00002296', + "CirclePlus;": '\U00002295', + "CircleTimes;": '\U00002297', + "ClockwiseContourIntegral;": '\U00002232', + "CloseCurlyDoubleQuote;": '\U0000201D', + "CloseCurlyQuote;": '\U00002019', + "Colon;": '\U00002237', + "Colone;": '\U00002A74', + "Congruent;": '\U00002261', + "Conint;": '\U0000222F', + "ContourIntegral;": '\U0000222E', + "Copf;": '\U00002102', + "Coproduct;": '\U00002210', + "CounterClockwiseContourIntegral;": '\U00002233', + "Cross;": '\U00002A2F', + "Cscr;": '\U0001D49E', + "Cup;": '\U000022D3', + "CupCap;": '\U0000224D', + "DD;": '\U00002145', + "DDotrahd;": '\U00002911', + "DJcy;": '\U00000402', + "DScy;": '\U00000405', + "DZcy;": '\U0000040F', + "Dagger;": '\U00002021', + "Darr;": '\U000021A1', + "Dashv;": '\U00002AE4', + "Dcaron;": '\U0000010E', + "Dcy;": '\U00000414', + "Del;": '\U00002207', + "Delta;": '\U00000394', + "Dfr;": '\U0001D507', + "DiacriticalAcute;": '\U000000B4', + "DiacriticalDot;": '\U000002D9', + "DiacriticalDoubleAcute;": '\U000002DD', + "DiacriticalGrave;": '\U00000060', + "DiacriticalTilde;": '\U000002DC', + "Diamond;": '\U000022C4', + "DifferentialD;": '\U00002146', + "Dopf;": '\U0001D53B', + "Dot;": '\U000000A8', + "DotDot;": '\U000020DC', + "DotEqual;": '\U00002250', + "DoubleContourIntegral;": '\U0000222F', + "DoubleDot;": '\U000000A8', + "DoubleDownArrow;": '\U000021D3', + "DoubleLeftArrow;": '\U000021D0', + "DoubleLeftRightArrow;": '\U000021D4', + "DoubleLeftTee;": '\U00002AE4', + "DoubleLongLeftArrow;": '\U000027F8', + "DoubleLongLeftRightArrow;": '\U000027FA', + "DoubleLongRightArrow;": '\U000027F9', + "DoubleRightArrow;": '\U000021D2', + "DoubleRightTee;": '\U000022A8', + "DoubleUpArrow;": '\U000021D1', + "DoubleUpDownArrow;": '\U000021D5', + "DoubleVerticalBar;": '\U00002225', + "DownArrow;": '\U00002193', + "DownArrowBar;": '\U00002913', + "DownArrowUpArrow;": '\U000021F5', + "DownBreve;": '\U00000311', + "DownLeftRightVector;": '\U00002950', + "DownLeftTeeVector;": '\U0000295E', + "DownLeftVector;": '\U000021BD', + "DownLeftVectorBar;": '\U00002956', + "DownRightTeeVector;": '\U0000295F', + "DownRightVector;": '\U000021C1', + "DownRightVectorBar;": '\U00002957', + "DownTee;": '\U000022A4', + "DownTeeArrow;": '\U000021A7', + "Downarrow;": '\U000021D3', + "Dscr;": '\U0001D49F', + "Dstrok;": '\U00000110', + "ENG;": '\U0000014A', + "ETH;": '\U000000D0', + "Eacute;": '\U000000C9', + "Ecaron;": '\U0000011A', + "Ecirc;": '\U000000CA', + "Ecy;": '\U0000042D', + "Edot;": '\U00000116', + "Efr;": '\U0001D508', + "Egrave;": '\U000000C8', + "Element;": '\U00002208', + "Emacr;": '\U00000112', + "EmptySmallSquare;": '\U000025FB', + "EmptyVerySmallSquare;": '\U000025AB', + "Eogon;": '\U00000118', + "Eopf;": '\U0001D53C', + "Epsilon;": '\U00000395', + "Equal;": '\U00002A75', + "EqualTilde;": '\U00002242', + "Equilibrium;": '\U000021CC', + "Escr;": '\U00002130', + "Esim;": '\U00002A73', + "Eta;": '\U00000397', + "Euml;": '\U000000CB', + "Exists;": '\U00002203', + "ExponentialE;": '\U00002147', + "Fcy;": '\U00000424', + "Ffr;": '\U0001D509', + "FilledSmallSquare;": '\U000025FC', + "FilledVerySmallSquare;": '\U000025AA', + "Fopf;": '\U0001D53D', + "ForAll;": '\U00002200', + "Fouriertrf;": '\U00002131', + "Fscr;": '\U00002131', + "GJcy;": '\U00000403', + "GT;": '\U0000003E', + "Gamma;": '\U00000393', + "Gammad;": '\U000003DC', + "Gbreve;": '\U0000011E', + "Gcedil;": '\U00000122', + "Gcirc;": '\U0000011C', + "Gcy;": '\U00000413', + "Gdot;": '\U00000120', + "Gfr;": '\U0001D50A', + "Gg;": '\U000022D9', + "Gopf;": '\U0001D53E', + "GreaterEqual;": '\U00002265', + "GreaterEqualLess;": '\U000022DB', + "GreaterFullEqual;": '\U00002267', + "GreaterGreater;": '\U00002AA2', + "GreaterLess;": '\U00002277', + "GreaterSlantEqual;": '\U00002A7E', + "GreaterTilde;": '\U00002273', + "Gscr;": '\U0001D4A2', + "Gt;": '\U0000226B', + "HARDcy;": '\U0000042A', + "Hacek;": '\U000002C7', + "Hat;": '\U0000005E', + "Hcirc;": '\U00000124', + "Hfr;": '\U0000210C', + "HilbertSpace;": '\U0000210B', + "Hopf;": '\U0000210D', + "HorizontalLine;": '\U00002500', + "Hscr;": '\U0000210B', + "Hstrok;": '\U00000126', + "HumpDownHump;": '\U0000224E', + "HumpEqual;": '\U0000224F', + "IEcy;": '\U00000415', + "IJlig;": '\U00000132', + "IOcy;": '\U00000401', + "Iacute;": '\U000000CD', + "Icirc;": '\U000000CE', + "Icy;": '\U00000418', + "Idot;": '\U00000130', + "Ifr;": '\U00002111', + "Igrave;": '\U000000CC', + "Im;": '\U00002111', + "Imacr;": '\U0000012A', + "ImaginaryI;": '\U00002148', + "Implies;": '\U000021D2', + "Int;": '\U0000222C', + "Integral;": '\U0000222B', + "Intersection;": '\U000022C2', + "InvisibleComma;": '\U00002063', + "InvisibleTimes;": '\U00002062', + "Iogon;": '\U0000012E', + "Iopf;": '\U0001D540', + "Iota;": '\U00000399', + "Iscr;": '\U00002110', + "Itilde;": '\U00000128', + "Iukcy;": '\U00000406', + "Iuml;": '\U000000CF', + "Jcirc;": '\U00000134', + "Jcy;": '\U00000419', + "Jfr;": '\U0001D50D', + "Jopf;": '\U0001D541', + "Jscr;": '\U0001D4A5', + "Jsercy;": '\U00000408', + "Jukcy;": '\U00000404', + "KHcy;": '\U00000425', + "KJcy;": '\U0000040C', + "Kappa;": '\U0000039A', + "Kcedil;": '\U00000136', + "Kcy;": '\U0000041A', + "Kfr;": '\U0001D50E', + "Kopf;": '\U0001D542', + "Kscr;": '\U0001D4A6', + "LJcy;": '\U00000409', + "LT;": '\U0000003C', + "Lacute;": '\U00000139', + "Lambda;": '\U0000039B', + "Lang;": '\U000027EA', + "Laplacetrf;": '\U00002112', + "Larr;": '\U0000219E', + "Lcaron;": '\U0000013D', + "Lcedil;": '\U0000013B', + "Lcy;": '\U0000041B', + "LeftAngleBracket;": '\U000027E8', + "LeftArrow;": '\U00002190', + "LeftArrowBar;": '\U000021E4', + "LeftArrowRightArrow;": '\U000021C6', + "LeftCeiling;": '\U00002308', + "LeftDoubleBracket;": '\U000027E6', + "LeftDownTeeVector;": '\U00002961', + "LeftDownVector;": '\U000021C3', + "LeftDownVectorBar;": '\U00002959', + "LeftFloor;": '\U0000230A', + "LeftRightArrow;": '\U00002194', + "LeftRightVector;": '\U0000294E', + "LeftTee;": '\U000022A3', + "LeftTeeArrow;": '\U000021A4', + "LeftTeeVector;": '\U0000295A', + "LeftTriangle;": '\U000022B2', + "LeftTriangleBar;": '\U000029CF', + "LeftTriangleEqual;": '\U000022B4', + "LeftUpDownVector;": '\U00002951', + "LeftUpTeeVector;": '\U00002960', + "LeftUpVector;": '\U000021BF', + "LeftUpVectorBar;": '\U00002958', + "LeftVector;": '\U000021BC', + "LeftVectorBar;": '\U00002952', + "Leftarrow;": '\U000021D0', + "Leftrightarrow;": '\U000021D4', + "LessEqualGreater;": '\U000022DA', + "LessFullEqual;": '\U00002266', + "LessGreater;": '\U00002276', + "LessLess;": '\U00002AA1', + "LessSlantEqual;": '\U00002A7D', + "LessTilde;": '\U00002272', + "Lfr;": '\U0001D50F', + "Ll;": '\U000022D8', + "Lleftarrow;": '\U000021DA', + "Lmidot;": '\U0000013F', + "LongLeftArrow;": '\U000027F5', + "LongLeftRightArrow;": '\U000027F7', + "LongRightArrow;": '\U000027F6', + "Longleftarrow;": '\U000027F8', + "Longleftrightarrow;": '\U000027FA', + "Longrightarrow;": '\U000027F9', + "Lopf;": '\U0001D543', + "LowerLeftArrow;": '\U00002199', + "LowerRightArrow;": '\U00002198', + "Lscr;": '\U00002112', + "Lsh;": '\U000021B0', + "Lstrok;": '\U00000141', + "Lt;": '\U0000226A', + "Map;": '\U00002905', + "Mcy;": '\U0000041C', + "MediumSpace;": '\U0000205F', + "Mellintrf;": '\U00002133', + "Mfr;": '\U0001D510', + "MinusPlus;": '\U00002213', + "Mopf;": '\U0001D544', + "Mscr;": '\U00002133', + "Mu;": '\U0000039C', + "NJcy;": '\U0000040A', + "Nacute;": '\U00000143', + "Ncaron;": '\U00000147', + "Ncedil;": '\U00000145', + "Ncy;": '\U0000041D', + "NegativeMediumSpace;": '\U0000200B', + "NegativeThickSpace;": '\U0000200B', + "NegativeThinSpace;": '\U0000200B', + "NegativeVeryThinSpace;": '\U0000200B', + "NestedGreaterGreater;": '\U0000226B', + "NestedLessLess;": '\U0000226A', + "NewLine;": '\U0000000A', + "Nfr;": '\U0001D511', + "NoBreak;": '\U00002060', + "NonBreakingSpace;": '\U000000A0', + "Nopf;": '\U00002115', + "Not;": '\U00002AEC', + "NotCongruent;": '\U00002262', + "NotCupCap;": '\U0000226D', + "NotDoubleVerticalBar;": '\U00002226', + "NotElement;": '\U00002209', + "NotEqual;": '\U00002260', + "NotExists;": '\U00002204', + "NotGreater;": '\U0000226F', + "NotGreaterEqual;": '\U00002271', + "NotGreaterLess;": '\U00002279', + "NotGreaterTilde;": '\U00002275', + "NotLeftTriangle;": '\U000022EA', + "NotLeftTriangleEqual;": '\U000022EC', + "NotLess;": '\U0000226E', + "NotLessEqual;": '\U00002270', + "NotLessGreater;": '\U00002278', + "NotLessTilde;": '\U00002274', + "NotPrecedes;": '\U00002280', + "NotPrecedesSlantEqual;": '\U000022E0', + "NotReverseElement;": '\U0000220C', + "NotRightTriangle;": '\U000022EB', + "NotRightTriangleEqual;": '\U000022ED', + "NotSquareSubsetEqual;": '\U000022E2', + "NotSquareSupersetEqual;": '\U000022E3', + "NotSubsetEqual;": '\U00002288', + "NotSucceeds;": '\U00002281', + "NotSucceedsSlantEqual;": '\U000022E1', + "NotSupersetEqual;": '\U00002289', + "NotTilde;": '\U00002241', + "NotTildeEqual;": '\U00002244', + "NotTildeFullEqual;": '\U00002247', + "NotTildeTilde;": '\U00002249', + "NotVerticalBar;": '\U00002224', + "Nscr;": '\U0001D4A9', + "Ntilde;": '\U000000D1', + "Nu;": '\U0000039D', + "OElig;": '\U00000152', + "Oacute;": '\U000000D3', + "Ocirc;": '\U000000D4', + "Ocy;": '\U0000041E', + "Odblac;": '\U00000150', + "Ofr;": '\U0001D512', + "Ograve;": '\U000000D2', + "Omacr;": '\U0000014C', + "Omega;": '\U000003A9', + "Omicron;": '\U0000039F', + "Oopf;": '\U0001D546', + "OpenCurlyDoubleQuote;": '\U0000201C', + "OpenCurlyQuote;": '\U00002018', + "Or;": '\U00002A54', + "Oscr;": '\U0001D4AA', + "Oslash;": '\U000000D8', + "Otilde;": '\U000000D5', + "Otimes;": '\U00002A37', + "Ouml;": '\U000000D6', + "OverBar;": '\U0000203E', + "OverBrace;": '\U000023DE', + "OverBracket;": '\U000023B4', + "OverParenthesis;": '\U000023DC', + "PartialD;": '\U00002202', + "Pcy;": '\U0000041F', + "Pfr;": '\U0001D513', + "Phi;": '\U000003A6', + "Pi;": '\U000003A0', + "PlusMinus;": '\U000000B1', + "Poincareplane;": '\U0000210C', + "Popf;": '\U00002119', + "Pr;": '\U00002ABB', + "Precedes;": '\U0000227A', + "PrecedesEqual;": '\U00002AAF', + "PrecedesSlantEqual;": '\U0000227C', + "PrecedesTilde;": '\U0000227E', + "Prime;": '\U00002033', + "Product;": '\U0000220F', + "Proportion;": '\U00002237', + "Proportional;": '\U0000221D', + "Pscr;": '\U0001D4AB', + "Psi;": '\U000003A8', + "QUOT;": '\U00000022', + "Qfr;": '\U0001D514', + "Qopf;": '\U0000211A', + "Qscr;": '\U0001D4AC', + "RBarr;": '\U00002910', + "REG;": '\U000000AE', + "Racute;": '\U00000154', + "Rang;": '\U000027EB', + "Rarr;": '\U000021A0', + "Rarrtl;": '\U00002916', + "Rcaron;": '\U00000158', + "Rcedil;": '\U00000156', + "Rcy;": '\U00000420', + "Re;": '\U0000211C', + "ReverseElement;": '\U0000220B', + "ReverseEquilibrium;": '\U000021CB', + "ReverseUpEquilibrium;": '\U0000296F', + "Rfr;": '\U0000211C', + "Rho;": '\U000003A1', + "RightAngleBracket;": '\U000027E9', + "RightArrow;": '\U00002192', + "RightArrowBar;": '\U000021E5', + "RightArrowLeftArrow;": '\U000021C4', + "RightCeiling;": '\U00002309', + "RightDoubleBracket;": '\U000027E7', + "RightDownTeeVector;": '\U0000295D', + "RightDownVector;": '\U000021C2', + "RightDownVectorBar;": '\U00002955', + "RightFloor;": '\U0000230B', + "RightTee;": '\U000022A2', + "RightTeeArrow;": '\U000021A6', + "RightTeeVector;": '\U0000295B', + "RightTriangle;": '\U000022B3', + "RightTriangleBar;": '\U000029D0', + "RightTriangleEqual;": '\U000022B5', + "RightUpDownVector;": '\U0000294F', + "RightUpTeeVector;": '\U0000295C', + "RightUpVector;": '\U000021BE', + "RightUpVectorBar;": '\U00002954', + "RightVector;": '\U000021C0', + "RightVectorBar;": '\U00002953', + "Rightarrow;": '\U000021D2', + "Ropf;": '\U0000211D', + "RoundImplies;": '\U00002970', + "Rrightarrow;": '\U000021DB', + "Rscr;": '\U0000211B', + "Rsh;": '\U000021B1', + "RuleDelayed;": '\U000029F4', + "SHCHcy;": '\U00000429', + "SHcy;": '\U00000428', + "SOFTcy;": '\U0000042C', + "Sacute;": '\U0000015A', + "Sc;": '\U00002ABC', + "Scaron;": '\U00000160', + "Scedil;": '\U0000015E', + "Scirc;": '\U0000015C', + "Scy;": '\U00000421', + "Sfr;": '\U0001D516', + "ShortDownArrow;": '\U00002193', + "ShortLeftArrow;": '\U00002190', + "ShortRightArrow;": '\U00002192', + "ShortUpArrow;": '\U00002191', + "Sigma;": '\U000003A3', + "SmallCircle;": '\U00002218', + "Sopf;": '\U0001D54A', + "Sqrt;": '\U0000221A', + "Square;": '\U000025A1', + "SquareIntersection;": '\U00002293', + "SquareSubset;": '\U0000228F', + "SquareSubsetEqual;": '\U00002291', + "SquareSuperset;": '\U00002290', + "SquareSupersetEqual;": '\U00002292', + "SquareUnion;": '\U00002294', + "Sscr;": '\U0001D4AE', + "Star;": '\U000022C6', + "Sub;": '\U000022D0', + "Subset;": '\U000022D0', + "SubsetEqual;": '\U00002286', + "Succeeds;": '\U0000227B', + "SucceedsEqual;": '\U00002AB0', + "SucceedsSlantEqual;": '\U0000227D', + "SucceedsTilde;": '\U0000227F', + "SuchThat;": '\U0000220B', + "Sum;": '\U00002211', + "Sup;": '\U000022D1', + "Superset;": '\U00002283', + "SupersetEqual;": '\U00002287', + "Supset;": '\U000022D1', + "THORN;": '\U000000DE', + "TRADE;": '\U00002122', + "TSHcy;": '\U0000040B', + "TScy;": '\U00000426', + "Tab;": '\U00000009', + "Tau;": '\U000003A4', + "Tcaron;": '\U00000164', + "Tcedil;": '\U00000162', + "Tcy;": '\U00000422', + "Tfr;": '\U0001D517', + "Therefore;": '\U00002234', + "Theta;": '\U00000398', + "ThinSpace;": '\U00002009', + "Tilde;": '\U0000223C', + "TildeEqual;": '\U00002243', + "TildeFullEqual;": '\U00002245', + "TildeTilde;": '\U00002248', + "Topf;": '\U0001D54B', + "TripleDot;": '\U000020DB', + "Tscr;": '\U0001D4AF', + "Tstrok;": '\U00000166', + "Uacute;": '\U000000DA', + "Uarr;": '\U0000219F', + "Uarrocir;": '\U00002949', + "Ubrcy;": '\U0000040E', + "Ubreve;": '\U0000016C', + "Ucirc;": '\U000000DB', + "Ucy;": '\U00000423', + "Udblac;": '\U00000170', + "Ufr;": '\U0001D518', + "Ugrave;": '\U000000D9', + "Umacr;": '\U0000016A', + "UnderBar;": '\U0000005F', + "UnderBrace;": '\U000023DF', + "UnderBracket;": '\U000023B5', + "UnderParenthesis;": '\U000023DD', + "Union;": '\U000022C3', + "UnionPlus;": '\U0000228E', + "Uogon;": '\U00000172', + "Uopf;": '\U0001D54C', + "UpArrow;": '\U00002191', + "UpArrowBar;": '\U00002912', + "UpArrowDownArrow;": '\U000021C5', + "UpDownArrow;": '\U00002195', + "UpEquilibrium;": '\U0000296E', + "UpTee;": '\U000022A5', + "UpTeeArrow;": '\U000021A5', + "Uparrow;": '\U000021D1', + "Updownarrow;": '\U000021D5', + "UpperLeftArrow;": '\U00002196', + "UpperRightArrow;": '\U00002197', + "Upsi;": '\U000003D2', + "Upsilon;": '\U000003A5', + "Uring;": '\U0000016E', + "Uscr;": '\U0001D4B0', + "Utilde;": '\U00000168', + "Uuml;": '\U000000DC', + "VDash;": '\U000022AB', + "Vbar;": '\U00002AEB', + "Vcy;": '\U00000412', + "Vdash;": '\U000022A9', + "Vdashl;": '\U00002AE6', + "Vee;": '\U000022C1', + "Verbar;": '\U00002016', + "Vert;": '\U00002016', + "VerticalBar;": '\U00002223', + "VerticalLine;": '\U0000007C', + "VerticalSeparator;": '\U00002758', + "VerticalTilde;": '\U00002240', + "VeryThinSpace;": '\U0000200A', + "Vfr;": '\U0001D519', + "Vopf;": '\U0001D54D', + "Vscr;": '\U0001D4B1', + "Vvdash;": '\U000022AA', + "Wcirc;": '\U00000174', + "Wedge;": '\U000022C0', + "Wfr;": '\U0001D51A', + "Wopf;": '\U0001D54E', + "Wscr;": '\U0001D4B2', + "Xfr;": '\U0001D51B', + "Xi;": '\U0000039E', + "Xopf;": '\U0001D54F', + "Xscr;": '\U0001D4B3', + "YAcy;": '\U0000042F', + "YIcy;": '\U00000407', + "YUcy;": '\U0000042E', + "Yacute;": '\U000000DD', + "Ycirc;": '\U00000176', + "Ycy;": '\U0000042B', + "Yfr;": '\U0001D51C', + "Yopf;": '\U0001D550', + "Yscr;": '\U0001D4B4', + "Yuml;": '\U00000178', + "ZHcy;": '\U00000416', + "Zacute;": '\U00000179', + "Zcaron;": '\U0000017D', + "Zcy;": '\U00000417', + "Zdot;": '\U0000017B', + "ZeroWidthSpace;": '\U0000200B', + "Zeta;": '\U00000396', + "Zfr;": '\U00002128', + "Zopf;": '\U00002124', + "Zscr;": '\U0001D4B5', + "aacute;": '\U000000E1', + "abreve;": '\U00000103', + "ac;": '\U0000223E', + "acd;": '\U0000223F', + "acirc;": '\U000000E2', + "acute;": '\U000000B4', + "acy;": '\U00000430', + "aelig;": '\U000000E6', + "af;": '\U00002061', + "afr;": '\U0001D51E', + "agrave;": '\U000000E0', + "alefsym;": '\U00002135', + "aleph;": '\U00002135', + "alpha;": '\U000003B1', + "amacr;": '\U00000101', + "amalg;": '\U00002A3F', + "amp;": '\U00000026', + "and;": '\U00002227', + "andand;": '\U00002A55', + "andd;": '\U00002A5C', + "andslope;": '\U00002A58', + "andv;": '\U00002A5A', + "ang;": '\U00002220', + "ange;": '\U000029A4', + "angle;": '\U00002220', + "angmsd;": '\U00002221', + "angmsdaa;": '\U000029A8', + "angmsdab;": '\U000029A9', + "angmsdac;": '\U000029AA', + "angmsdad;": '\U000029AB', + "angmsdae;": '\U000029AC', + "angmsdaf;": '\U000029AD', + "angmsdag;": '\U000029AE', + "angmsdah;": '\U000029AF', + "angrt;": '\U0000221F', + "angrtvb;": '\U000022BE', + "angrtvbd;": '\U0000299D', + "angsph;": '\U00002222', + "angst;": '\U000000C5', + "angzarr;": '\U0000237C', + "aogon;": '\U00000105', + "aopf;": '\U0001D552', + "ap;": '\U00002248', + "apE;": '\U00002A70', + "apacir;": '\U00002A6F', + "ape;": '\U0000224A', + "apid;": '\U0000224B', + "apos;": '\U00000027', + "approx;": '\U00002248', + "approxeq;": '\U0000224A', + "aring;": '\U000000E5', + "ascr;": '\U0001D4B6', + "ast;": '\U0000002A', + "asymp;": '\U00002248', + "asympeq;": '\U0000224D', + "atilde;": '\U000000E3', + "auml;": '\U000000E4', + "awconint;": '\U00002233', + "awint;": '\U00002A11', + "bNot;": '\U00002AED', + "backcong;": '\U0000224C', + "backepsilon;": '\U000003F6', + "backprime;": '\U00002035', + "backsim;": '\U0000223D', + "backsimeq;": '\U000022CD', + "barvee;": '\U000022BD', + "barwed;": '\U00002305', + "barwedge;": '\U00002305', + "bbrk;": '\U000023B5', + "bbrktbrk;": '\U000023B6', + "bcong;": '\U0000224C', + "bcy;": '\U00000431', + "bdquo;": '\U0000201E', + "becaus;": '\U00002235', + "because;": '\U00002235', + "bemptyv;": '\U000029B0', + "bepsi;": '\U000003F6', + "bernou;": '\U0000212C', + "beta;": '\U000003B2', + "beth;": '\U00002136', + "between;": '\U0000226C', + "bfr;": '\U0001D51F', + "bigcap;": '\U000022C2', + "bigcirc;": '\U000025EF', + "bigcup;": '\U000022C3', + "bigodot;": '\U00002A00', + "bigoplus;": '\U00002A01', + "bigotimes;": '\U00002A02', + "bigsqcup;": '\U00002A06', + "bigstar;": '\U00002605', + "bigtriangledown;": '\U000025BD', + "bigtriangleup;": '\U000025B3', + "biguplus;": '\U00002A04', + "bigvee;": '\U000022C1', + "bigwedge;": '\U000022C0', + "bkarow;": '\U0000290D', + "blacklozenge;": '\U000029EB', + "blacksquare;": '\U000025AA', + "blacktriangle;": '\U000025B4', + "blacktriangledown;": '\U000025BE', + "blacktriangleleft;": '\U000025C2', + "blacktriangleright;": '\U000025B8', + "blank;": '\U00002423', + "blk12;": '\U00002592', + "blk14;": '\U00002591', + "blk34;": '\U00002593', + "block;": '\U00002588', + "bnot;": '\U00002310', + "bopf;": '\U0001D553', + "bot;": '\U000022A5', + "bottom;": '\U000022A5', + "bowtie;": '\U000022C8', + "boxDL;": '\U00002557', + "boxDR;": '\U00002554', + "boxDl;": '\U00002556', + "boxDr;": '\U00002553', + "boxH;": '\U00002550', + "boxHD;": '\U00002566', + "boxHU;": '\U00002569', + "boxHd;": '\U00002564', + "boxHu;": '\U00002567', + "boxUL;": '\U0000255D', + "boxUR;": '\U0000255A', + "boxUl;": '\U0000255C', + "boxUr;": '\U00002559', + "boxV;": '\U00002551', + "boxVH;": '\U0000256C', + "boxVL;": '\U00002563', + "boxVR;": '\U00002560', + "boxVh;": '\U0000256B', + "boxVl;": '\U00002562', + "boxVr;": '\U0000255F', + "boxbox;": '\U000029C9', + "boxdL;": '\U00002555', + "boxdR;": '\U00002552', + "boxdl;": '\U00002510', + "boxdr;": '\U0000250C', + "boxh;": '\U00002500', + "boxhD;": '\U00002565', + "boxhU;": '\U00002568', + "boxhd;": '\U0000252C', + "boxhu;": '\U00002534', + "boxminus;": '\U0000229F', + "boxplus;": '\U0000229E', + "boxtimes;": '\U000022A0', + "boxuL;": '\U0000255B', + "boxuR;": '\U00002558', + "boxul;": '\U00002518', + "boxur;": '\U00002514', + "boxv;": '\U00002502', + "boxvH;": '\U0000256A', + "boxvL;": '\U00002561', + "boxvR;": '\U0000255E', + "boxvh;": '\U0000253C', + "boxvl;": '\U00002524', + "boxvr;": '\U0000251C', + "bprime;": '\U00002035', + "breve;": '\U000002D8', + "brvbar;": '\U000000A6', + "bscr;": '\U0001D4B7', + "bsemi;": '\U0000204F', + "bsim;": '\U0000223D', + "bsime;": '\U000022CD', + "bsol;": '\U0000005C', + "bsolb;": '\U000029C5', + "bsolhsub;": '\U000027C8', + "bull;": '\U00002022', + "bullet;": '\U00002022', + "bump;": '\U0000224E', + "bumpE;": '\U00002AAE', + "bumpe;": '\U0000224F', + "bumpeq;": '\U0000224F', + "cacute;": '\U00000107', + "cap;": '\U00002229', + "capand;": '\U00002A44', + "capbrcup;": '\U00002A49', + "capcap;": '\U00002A4B', + "capcup;": '\U00002A47', + "capdot;": '\U00002A40', + "caret;": '\U00002041', + "caron;": '\U000002C7', + "ccaps;": '\U00002A4D', + "ccaron;": '\U0000010D', + "ccedil;": '\U000000E7', + "ccirc;": '\U00000109', + "ccups;": '\U00002A4C', + "ccupssm;": '\U00002A50', + "cdot;": '\U0000010B', + "cedil;": '\U000000B8', + "cemptyv;": '\U000029B2', + "cent;": '\U000000A2', + "centerdot;": '\U000000B7', + "cfr;": '\U0001D520', + "chcy;": '\U00000447', + "check;": '\U00002713', + "checkmark;": '\U00002713', + "chi;": '\U000003C7', + "cir;": '\U000025CB', + "cirE;": '\U000029C3', + "circ;": '\U000002C6', + "circeq;": '\U00002257', + "circlearrowleft;": '\U000021BA', + "circlearrowright;": '\U000021BB', + "circledR;": '\U000000AE', + "circledS;": '\U000024C8', + "circledast;": '\U0000229B', + "circledcirc;": '\U0000229A', + "circleddash;": '\U0000229D', + "cire;": '\U00002257', + "cirfnint;": '\U00002A10', + "cirmid;": '\U00002AEF', + "cirscir;": '\U000029C2', + "clubs;": '\U00002663', + "clubsuit;": '\U00002663', + "colon;": '\U0000003A', + "colone;": '\U00002254', + "coloneq;": '\U00002254', + "comma;": '\U0000002C', + "commat;": '\U00000040', + "comp;": '\U00002201', + "compfn;": '\U00002218', + "complement;": '\U00002201', + "complexes;": '\U00002102', + "cong;": '\U00002245', + "congdot;": '\U00002A6D', + "conint;": '\U0000222E', + "copf;": '\U0001D554', + "coprod;": '\U00002210', + "copy;": '\U000000A9', + "copysr;": '\U00002117', + "crarr;": '\U000021B5', + "cross;": '\U00002717', + "cscr;": '\U0001D4B8', + "csub;": '\U00002ACF', + "csube;": '\U00002AD1', + "csup;": '\U00002AD0', + "csupe;": '\U00002AD2', + "ctdot;": '\U000022EF', + "cudarrl;": '\U00002938', + "cudarrr;": '\U00002935', + "cuepr;": '\U000022DE', + "cuesc;": '\U000022DF', + "cularr;": '\U000021B6', + "cularrp;": '\U0000293D', + "cup;": '\U0000222A', + "cupbrcap;": '\U00002A48', + "cupcap;": '\U00002A46', + "cupcup;": '\U00002A4A', + "cupdot;": '\U0000228D', + "cupor;": '\U00002A45', + "curarr;": '\U000021B7', + "curarrm;": '\U0000293C', + "curlyeqprec;": '\U000022DE', + "curlyeqsucc;": '\U000022DF', + "curlyvee;": '\U000022CE', + "curlywedge;": '\U000022CF', + "curren;": '\U000000A4', + "curvearrowleft;": '\U000021B6', + "curvearrowright;": '\U000021B7', + "cuvee;": '\U000022CE', + "cuwed;": '\U000022CF', + "cwconint;": '\U00002232', + "cwint;": '\U00002231', + "cylcty;": '\U0000232D', + "dArr;": '\U000021D3', + "dHar;": '\U00002965', + "dagger;": '\U00002020', + "daleth;": '\U00002138', + "darr;": '\U00002193', + "dash;": '\U00002010', + "dashv;": '\U000022A3', + "dbkarow;": '\U0000290F', + "dblac;": '\U000002DD', + "dcaron;": '\U0000010F', + "dcy;": '\U00000434', + "dd;": '\U00002146', + "ddagger;": '\U00002021', + "ddarr;": '\U000021CA', + "ddotseq;": '\U00002A77', + "deg;": '\U000000B0', + "delta;": '\U000003B4', + "demptyv;": '\U000029B1', + "dfisht;": '\U0000297F', + "dfr;": '\U0001D521', + "dharl;": '\U000021C3', + "dharr;": '\U000021C2', + "diam;": '\U000022C4', + "diamond;": '\U000022C4', + "diamondsuit;": '\U00002666', + "diams;": '\U00002666', + "die;": '\U000000A8', + "digamma;": '\U000003DD', + "disin;": '\U000022F2', + "div;": '\U000000F7', + "divide;": '\U000000F7', + "divideontimes;": '\U000022C7', + "divonx;": '\U000022C7', + "djcy;": '\U00000452', + "dlcorn;": '\U0000231E', + "dlcrop;": '\U0000230D', + "dollar;": '\U00000024', + "dopf;": '\U0001D555', + "dot;": '\U000002D9', + "doteq;": '\U00002250', + "doteqdot;": '\U00002251', + "dotminus;": '\U00002238', + "dotplus;": '\U00002214', + "dotsquare;": '\U000022A1', + "doublebarwedge;": '\U00002306', + "downarrow;": '\U00002193', + "downdownarrows;": '\U000021CA', + "downharpoonleft;": '\U000021C3', + "downharpoonright;": '\U000021C2', + "drbkarow;": '\U00002910', + "drcorn;": '\U0000231F', + "drcrop;": '\U0000230C', + "dscr;": '\U0001D4B9', + "dscy;": '\U00000455', + "dsol;": '\U000029F6', + "dstrok;": '\U00000111', + "dtdot;": '\U000022F1', + "dtri;": '\U000025BF', + "dtrif;": '\U000025BE', + "duarr;": '\U000021F5', + "duhar;": '\U0000296F', + "dwangle;": '\U000029A6', + "dzcy;": '\U0000045F', + "dzigrarr;": '\U000027FF', + "eDDot;": '\U00002A77', + "eDot;": '\U00002251', + "eacute;": '\U000000E9', + "easter;": '\U00002A6E', + "ecaron;": '\U0000011B', + "ecir;": '\U00002256', + "ecirc;": '\U000000EA', + "ecolon;": '\U00002255', + "ecy;": '\U0000044D', + "edot;": '\U00000117', + "ee;": '\U00002147', + "efDot;": '\U00002252', + "efr;": '\U0001D522', + "eg;": '\U00002A9A', + "egrave;": '\U000000E8', + "egs;": '\U00002A96', + "egsdot;": '\U00002A98', + "el;": '\U00002A99', + "elinters;": '\U000023E7', + "ell;": '\U00002113', + "els;": '\U00002A95', + "elsdot;": '\U00002A97', + "emacr;": '\U00000113', + "empty;": '\U00002205', + "emptyset;": '\U00002205', + "emptyv;": '\U00002205', + "emsp;": '\U00002003', + "emsp13;": '\U00002004', + "emsp14;": '\U00002005', + "eng;": '\U0000014B', + "ensp;": '\U00002002', + "eogon;": '\U00000119', + "eopf;": '\U0001D556', + "epar;": '\U000022D5', + "eparsl;": '\U000029E3', + "eplus;": '\U00002A71', + "epsi;": '\U000003B5', + "epsilon;": '\U000003B5', + "epsiv;": '\U000003F5', + "eqcirc;": '\U00002256', + "eqcolon;": '\U00002255', + "eqsim;": '\U00002242', + "eqslantgtr;": '\U00002A96', + "eqslantless;": '\U00002A95', + "equals;": '\U0000003D', + "equest;": '\U0000225F', + "equiv;": '\U00002261', + "equivDD;": '\U00002A78', + "eqvparsl;": '\U000029E5', + "erDot;": '\U00002253', + "erarr;": '\U00002971', + "escr;": '\U0000212F', + "esdot;": '\U00002250', + "esim;": '\U00002242', + "eta;": '\U000003B7', + "eth;": '\U000000F0', + "euml;": '\U000000EB', + "euro;": '\U000020AC', + "excl;": '\U00000021', + "exist;": '\U00002203', + "expectation;": '\U00002130', + "exponentiale;": '\U00002147', + "fallingdotseq;": '\U00002252', + "fcy;": '\U00000444', + "female;": '\U00002640', + "ffilig;": '\U0000FB03', + "fflig;": '\U0000FB00', + "ffllig;": '\U0000FB04', + "ffr;": '\U0001D523', + "filig;": '\U0000FB01', + "flat;": '\U0000266D', + "fllig;": '\U0000FB02', + "fltns;": '\U000025B1', + "fnof;": '\U00000192', + "fopf;": '\U0001D557', + "forall;": '\U00002200', + "fork;": '\U000022D4', + "forkv;": '\U00002AD9', + "fpartint;": '\U00002A0D', + "frac12;": '\U000000BD', + "frac13;": '\U00002153', + "frac14;": '\U000000BC', + "frac15;": '\U00002155', + "frac16;": '\U00002159', + "frac18;": '\U0000215B', + "frac23;": '\U00002154', + "frac25;": '\U00002156', + "frac34;": '\U000000BE', + "frac35;": '\U00002157', + "frac38;": '\U0000215C', + "frac45;": '\U00002158', + "frac56;": '\U0000215A', + "frac58;": '\U0000215D', + "frac78;": '\U0000215E', + "frasl;": '\U00002044', + "frown;": '\U00002322', + "fscr;": '\U0001D4BB', + "gE;": '\U00002267', + "gEl;": '\U00002A8C', + "gacute;": '\U000001F5', + "gamma;": '\U000003B3', + "gammad;": '\U000003DD', + "gap;": '\U00002A86', + "gbreve;": '\U0000011F', + "gcirc;": '\U0000011D', + "gcy;": '\U00000433', + "gdot;": '\U00000121', + "ge;": '\U00002265', + "gel;": '\U000022DB', + "geq;": '\U00002265', + "geqq;": '\U00002267', + "geqslant;": '\U00002A7E', + "ges;": '\U00002A7E', + "gescc;": '\U00002AA9', + "gesdot;": '\U00002A80', + "gesdoto;": '\U00002A82', + "gesdotol;": '\U00002A84', + "gesles;": '\U00002A94', + "gfr;": '\U0001D524', + "gg;": '\U0000226B', + "ggg;": '\U000022D9', + "gimel;": '\U00002137', + "gjcy;": '\U00000453', + "gl;": '\U00002277', + "glE;": '\U00002A92', + "gla;": '\U00002AA5', + "glj;": '\U00002AA4', + "gnE;": '\U00002269', + "gnap;": '\U00002A8A', + "gnapprox;": '\U00002A8A', + "gne;": '\U00002A88', + "gneq;": '\U00002A88', + "gneqq;": '\U00002269', + "gnsim;": '\U000022E7', + "gopf;": '\U0001D558', + "grave;": '\U00000060', + "gscr;": '\U0000210A', + "gsim;": '\U00002273', + "gsime;": '\U00002A8E', + "gsiml;": '\U00002A90', + "gt;": '\U0000003E', + "gtcc;": '\U00002AA7', + "gtcir;": '\U00002A7A', + "gtdot;": '\U000022D7', + "gtlPar;": '\U00002995', + "gtquest;": '\U00002A7C', + "gtrapprox;": '\U00002A86', + "gtrarr;": '\U00002978', + "gtrdot;": '\U000022D7', + "gtreqless;": '\U000022DB', + "gtreqqless;": '\U00002A8C', + "gtrless;": '\U00002277', + "gtrsim;": '\U00002273', + "hArr;": '\U000021D4', + "hairsp;": '\U0000200A', + "half;": '\U000000BD', + "hamilt;": '\U0000210B', + "hardcy;": '\U0000044A', + "harr;": '\U00002194', + "harrcir;": '\U00002948', + "harrw;": '\U000021AD', + "hbar;": '\U0000210F', + "hcirc;": '\U00000125', + "hearts;": '\U00002665', + "heartsuit;": '\U00002665', + "hellip;": '\U00002026', + "hercon;": '\U000022B9', + "hfr;": '\U0001D525', + "hksearow;": '\U00002925', + "hkswarow;": '\U00002926', + "hoarr;": '\U000021FF', + "homtht;": '\U0000223B', + "hookleftarrow;": '\U000021A9', + "hookrightarrow;": '\U000021AA', + "hopf;": '\U0001D559', + "horbar;": '\U00002015', + "hscr;": '\U0001D4BD', + "hslash;": '\U0000210F', + "hstrok;": '\U00000127', + "hybull;": '\U00002043', + "hyphen;": '\U00002010', + "iacute;": '\U000000ED', + "ic;": '\U00002063', + "icirc;": '\U000000EE', + "icy;": '\U00000438', + "iecy;": '\U00000435', + "iexcl;": '\U000000A1', + "iff;": '\U000021D4', + "ifr;": '\U0001D526', + "igrave;": '\U000000EC', + "ii;": '\U00002148', + "iiiint;": '\U00002A0C', + "iiint;": '\U0000222D', + "iinfin;": '\U000029DC', + "iiota;": '\U00002129', + "ijlig;": '\U00000133', + "imacr;": '\U0000012B', + "image;": '\U00002111', + "imagline;": '\U00002110', + "imagpart;": '\U00002111', + "imath;": '\U00000131', + "imof;": '\U000022B7', + "imped;": '\U000001B5', + "in;": '\U00002208', + "incare;": '\U00002105', + "infin;": '\U0000221E', + "infintie;": '\U000029DD', + "inodot;": '\U00000131', + "int;": '\U0000222B', + "intcal;": '\U000022BA', + "integers;": '\U00002124', + "intercal;": '\U000022BA', + "intlarhk;": '\U00002A17', + "intprod;": '\U00002A3C', + "iocy;": '\U00000451', + "iogon;": '\U0000012F', + "iopf;": '\U0001D55A', + "iota;": '\U000003B9', + "iprod;": '\U00002A3C', + "iquest;": '\U000000BF', + "iscr;": '\U0001D4BE', + "isin;": '\U00002208', + "isinE;": '\U000022F9', + "isindot;": '\U000022F5', + "isins;": '\U000022F4', + "isinsv;": '\U000022F3', + "isinv;": '\U00002208', + "it;": '\U00002062', + "itilde;": '\U00000129', + "iukcy;": '\U00000456', + "iuml;": '\U000000EF', + "jcirc;": '\U00000135', + "jcy;": '\U00000439', + "jfr;": '\U0001D527', + "jmath;": '\U00000237', + "jopf;": '\U0001D55B', + "jscr;": '\U0001D4BF', + "jsercy;": '\U00000458', + "jukcy;": '\U00000454', + "kappa;": '\U000003BA', + "kappav;": '\U000003F0', + "kcedil;": '\U00000137', + "kcy;": '\U0000043A', + "kfr;": '\U0001D528', + "kgreen;": '\U00000138', + "khcy;": '\U00000445', + "kjcy;": '\U0000045C', + "kopf;": '\U0001D55C', + "kscr;": '\U0001D4C0', + "lAarr;": '\U000021DA', + "lArr;": '\U000021D0', + "lAtail;": '\U0000291B', + "lBarr;": '\U0000290E', + "lE;": '\U00002266', + "lEg;": '\U00002A8B', + "lHar;": '\U00002962', + "lacute;": '\U0000013A', + "laemptyv;": '\U000029B4', + "lagran;": '\U00002112', + "lambda;": '\U000003BB', + "lang;": '\U000027E8', + "langd;": '\U00002991', + "langle;": '\U000027E8', + "lap;": '\U00002A85', + "laquo;": '\U000000AB', + "larr;": '\U00002190', + "larrb;": '\U000021E4', + "larrbfs;": '\U0000291F', + "larrfs;": '\U0000291D', + "larrhk;": '\U000021A9', + "larrlp;": '\U000021AB', + "larrpl;": '\U00002939', + "larrsim;": '\U00002973', + "larrtl;": '\U000021A2', + "lat;": '\U00002AAB', + "latail;": '\U00002919', + "late;": '\U00002AAD', + "lbarr;": '\U0000290C', + "lbbrk;": '\U00002772', + "lbrace;": '\U0000007B', + "lbrack;": '\U0000005B', + "lbrke;": '\U0000298B', + "lbrksld;": '\U0000298F', + "lbrkslu;": '\U0000298D', + "lcaron;": '\U0000013E', + "lcedil;": '\U0000013C', + "lceil;": '\U00002308', + "lcub;": '\U0000007B', + "lcy;": '\U0000043B', + "ldca;": '\U00002936', + "ldquo;": '\U0000201C', + "ldquor;": '\U0000201E', + "ldrdhar;": '\U00002967', + "ldrushar;": '\U0000294B', + "ldsh;": '\U000021B2', + "le;": '\U00002264', + "leftarrow;": '\U00002190', + "leftarrowtail;": '\U000021A2', + "leftharpoondown;": '\U000021BD', + "leftharpoonup;": '\U000021BC', + "leftleftarrows;": '\U000021C7', + "leftrightarrow;": '\U00002194', + "leftrightarrows;": '\U000021C6', + "leftrightharpoons;": '\U000021CB', + "leftrightsquigarrow;": '\U000021AD', + "leftthreetimes;": '\U000022CB', + "leg;": '\U000022DA', + "leq;": '\U00002264', + "leqq;": '\U00002266', + "leqslant;": '\U00002A7D', + "les;": '\U00002A7D', + "lescc;": '\U00002AA8', + "lesdot;": '\U00002A7F', + "lesdoto;": '\U00002A81', + "lesdotor;": '\U00002A83', + "lesges;": '\U00002A93', + "lessapprox;": '\U00002A85', + "lessdot;": '\U000022D6', + "lesseqgtr;": '\U000022DA', + "lesseqqgtr;": '\U00002A8B', + "lessgtr;": '\U00002276', + "lesssim;": '\U00002272', + "lfisht;": '\U0000297C', + "lfloor;": '\U0000230A', + "lfr;": '\U0001D529', + "lg;": '\U00002276', + "lgE;": '\U00002A91', + "lhard;": '\U000021BD', + "lharu;": '\U000021BC', + "lharul;": '\U0000296A', + "lhblk;": '\U00002584', + "ljcy;": '\U00000459', + "ll;": '\U0000226A', + "llarr;": '\U000021C7', + "llcorner;": '\U0000231E', + "llhard;": '\U0000296B', + "lltri;": '\U000025FA', + "lmidot;": '\U00000140', + "lmoust;": '\U000023B0', + "lmoustache;": '\U000023B0', + "lnE;": '\U00002268', + "lnap;": '\U00002A89', + "lnapprox;": '\U00002A89', + "lne;": '\U00002A87', + "lneq;": '\U00002A87', + "lneqq;": '\U00002268', + "lnsim;": '\U000022E6', + "loang;": '\U000027EC', + "loarr;": '\U000021FD', + "lobrk;": '\U000027E6', + "longleftarrow;": '\U000027F5', + "longleftrightarrow;": '\U000027F7', + "longmapsto;": '\U000027FC', + "longrightarrow;": '\U000027F6', + "looparrowleft;": '\U000021AB', + "looparrowright;": '\U000021AC', + "lopar;": '\U00002985', + "lopf;": '\U0001D55D', + "loplus;": '\U00002A2D', + "lotimes;": '\U00002A34', + "lowast;": '\U00002217', + "lowbar;": '\U0000005F', + "loz;": '\U000025CA', + "lozenge;": '\U000025CA', + "lozf;": '\U000029EB', + "lpar;": '\U00000028', + "lparlt;": '\U00002993', + "lrarr;": '\U000021C6', + "lrcorner;": '\U0000231F', + "lrhar;": '\U000021CB', + "lrhard;": '\U0000296D', + "lrm;": '\U0000200E', + "lrtri;": '\U000022BF', + "lsaquo;": '\U00002039', + "lscr;": '\U0001D4C1', + "lsh;": '\U000021B0', + "lsim;": '\U00002272', + "lsime;": '\U00002A8D', + "lsimg;": '\U00002A8F', + "lsqb;": '\U0000005B', + "lsquo;": '\U00002018', + "lsquor;": '\U0000201A', + "lstrok;": '\U00000142', + "lt;": '\U0000003C', + "ltcc;": '\U00002AA6', + "ltcir;": '\U00002A79', + "ltdot;": '\U000022D6', + "lthree;": '\U000022CB', + "ltimes;": '\U000022C9', + "ltlarr;": '\U00002976', + "ltquest;": '\U00002A7B', + "ltrPar;": '\U00002996', + "ltri;": '\U000025C3', + "ltrie;": '\U000022B4', + "ltrif;": '\U000025C2', + "lurdshar;": '\U0000294A', + "luruhar;": '\U00002966', + "mDDot;": '\U0000223A', + "macr;": '\U000000AF', + "male;": '\U00002642', + "malt;": '\U00002720', + "maltese;": '\U00002720', + "map;": '\U000021A6', + "mapsto;": '\U000021A6', + "mapstodown;": '\U000021A7', + "mapstoleft;": '\U000021A4', + "mapstoup;": '\U000021A5', + "marker;": '\U000025AE', + "mcomma;": '\U00002A29', + "mcy;": '\U0000043C', + "mdash;": '\U00002014', + "measuredangle;": '\U00002221', + "mfr;": '\U0001D52A', + "mho;": '\U00002127', + "micro;": '\U000000B5', + "mid;": '\U00002223', + "midast;": '\U0000002A', + "midcir;": '\U00002AF0', + "middot;": '\U000000B7', + "minus;": '\U00002212', + "minusb;": '\U0000229F', + "minusd;": '\U00002238', + "minusdu;": '\U00002A2A', + "mlcp;": '\U00002ADB', + "mldr;": '\U00002026', + "mnplus;": '\U00002213', + "models;": '\U000022A7', + "mopf;": '\U0001D55E', + "mp;": '\U00002213', + "mscr;": '\U0001D4C2', + "mstpos;": '\U0000223E', + "mu;": '\U000003BC', + "multimap;": '\U000022B8', + "mumap;": '\U000022B8', + "nLeftarrow;": '\U000021CD', + "nLeftrightarrow;": '\U000021CE', + "nRightarrow;": '\U000021CF', + "nVDash;": '\U000022AF', + "nVdash;": '\U000022AE', + "nabla;": '\U00002207', + "nacute;": '\U00000144', + "nap;": '\U00002249', + "napos;": '\U00000149', + "napprox;": '\U00002249', + "natur;": '\U0000266E', + "natural;": '\U0000266E', + "naturals;": '\U00002115', + "nbsp;": '\U000000A0', + "ncap;": '\U00002A43', + "ncaron;": '\U00000148', + "ncedil;": '\U00000146', + "ncong;": '\U00002247', + "ncup;": '\U00002A42', + "ncy;": '\U0000043D', + "ndash;": '\U00002013', + "ne;": '\U00002260', + "neArr;": '\U000021D7', + "nearhk;": '\U00002924', + "nearr;": '\U00002197', + "nearrow;": '\U00002197', + "nequiv;": '\U00002262', + "nesear;": '\U00002928', + "nexist;": '\U00002204', + "nexists;": '\U00002204', + "nfr;": '\U0001D52B', + "nge;": '\U00002271', + "ngeq;": '\U00002271', + "ngsim;": '\U00002275', + "ngt;": '\U0000226F', + "ngtr;": '\U0000226F', + "nhArr;": '\U000021CE', + "nharr;": '\U000021AE', + "nhpar;": '\U00002AF2', + "ni;": '\U0000220B', + "nis;": '\U000022FC', + "nisd;": '\U000022FA', + "niv;": '\U0000220B', + "njcy;": '\U0000045A', + "nlArr;": '\U000021CD', + "nlarr;": '\U0000219A', + "nldr;": '\U00002025', + "nle;": '\U00002270', + "nleftarrow;": '\U0000219A', + "nleftrightarrow;": '\U000021AE', + "nleq;": '\U00002270', + "nless;": '\U0000226E', + "nlsim;": '\U00002274', + "nlt;": '\U0000226E', + "nltri;": '\U000022EA', + "nltrie;": '\U000022EC', + "nmid;": '\U00002224', + "nopf;": '\U0001D55F', + "not;": '\U000000AC', + "notin;": '\U00002209', + "notinva;": '\U00002209', + "notinvb;": '\U000022F7', + "notinvc;": '\U000022F6', + "notni;": '\U0000220C', + "notniva;": '\U0000220C', + "notnivb;": '\U000022FE', + "notnivc;": '\U000022FD', + "npar;": '\U00002226', + "nparallel;": '\U00002226', + "npolint;": '\U00002A14', + "npr;": '\U00002280', + "nprcue;": '\U000022E0', + "nprec;": '\U00002280', + "nrArr;": '\U000021CF', + "nrarr;": '\U0000219B', + "nrightarrow;": '\U0000219B', + "nrtri;": '\U000022EB', + "nrtrie;": '\U000022ED', + "nsc;": '\U00002281', + "nsccue;": '\U000022E1', + "nscr;": '\U0001D4C3', + "nshortmid;": '\U00002224', + "nshortparallel;": '\U00002226', + "nsim;": '\U00002241', + "nsime;": '\U00002244', + "nsimeq;": '\U00002244', + "nsmid;": '\U00002224', + "nspar;": '\U00002226', + "nsqsube;": '\U000022E2', + "nsqsupe;": '\U000022E3', + "nsub;": '\U00002284', + "nsube;": '\U00002288', + "nsubseteq;": '\U00002288', + "nsucc;": '\U00002281', + "nsup;": '\U00002285', + "nsupe;": '\U00002289', + "nsupseteq;": '\U00002289', + "ntgl;": '\U00002279', + "ntilde;": '\U000000F1', + "ntlg;": '\U00002278', + "ntriangleleft;": '\U000022EA', + "ntrianglelefteq;": '\U000022EC', + "ntriangleright;": '\U000022EB', + "ntrianglerighteq;": '\U000022ED', + "nu;": '\U000003BD', + "num;": '\U00000023', + "numero;": '\U00002116', + "numsp;": '\U00002007', + "nvDash;": '\U000022AD', + "nvHarr;": '\U00002904', + "nvdash;": '\U000022AC', + "nvinfin;": '\U000029DE', + "nvlArr;": '\U00002902', + "nvrArr;": '\U00002903', + "nwArr;": '\U000021D6', + "nwarhk;": '\U00002923', + "nwarr;": '\U00002196', + "nwarrow;": '\U00002196', + "nwnear;": '\U00002927', + "oS;": '\U000024C8', + "oacute;": '\U000000F3', + "oast;": '\U0000229B', + "ocir;": '\U0000229A', + "ocirc;": '\U000000F4', + "ocy;": '\U0000043E', + "odash;": '\U0000229D', + "odblac;": '\U00000151', + "odiv;": '\U00002A38', + "odot;": '\U00002299', + "odsold;": '\U000029BC', + "oelig;": '\U00000153', + "ofcir;": '\U000029BF', + "ofr;": '\U0001D52C', + "ogon;": '\U000002DB', + "ograve;": '\U000000F2', + "ogt;": '\U000029C1', + "ohbar;": '\U000029B5', + "ohm;": '\U000003A9', + "oint;": '\U0000222E', + "olarr;": '\U000021BA', + "olcir;": '\U000029BE', + "olcross;": '\U000029BB', + "oline;": '\U0000203E', + "olt;": '\U000029C0', + "omacr;": '\U0000014D', + "omega;": '\U000003C9', + "omicron;": '\U000003BF', + "omid;": '\U000029B6', + "ominus;": '\U00002296', + "oopf;": '\U0001D560', + "opar;": '\U000029B7', + "operp;": '\U000029B9', + "oplus;": '\U00002295', + "or;": '\U00002228', + "orarr;": '\U000021BB', + "ord;": '\U00002A5D', + "order;": '\U00002134', + "orderof;": '\U00002134', + "ordf;": '\U000000AA', + "ordm;": '\U000000BA', + "origof;": '\U000022B6', + "oror;": '\U00002A56', + "orslope;": '\U00002A57', + "orv;": '\U00002A5B', + "oscr;": '\U00002134', + "oslash;": '\U000000F8', + "osol;": '\U00002298', + "otilde;": '\U000000F5', + "otimes;": '\U00002297', + "otimesas;": '\U00002A36', + "ouml;": '\U000000F6', + "ovbar;": '\U0000233D', + "par;": '\U00002225', + "para;": '\U000000B6', + "parallel;": '\U00002225', + "parsim;": '\U00002AF3', + "parsl;": '\U00002AFD', + "part;": '\U00002202', + "pcy;": '\U0000043F', + "percnt;": '\U00000025', + "period;": '\U0000002E', + "permil;": '\U00002030', + "perp;": '\U000022A5', + "pertenk;": '\U00002031', + "pfr;": '\U0001D52D', + "phi;": '\U000003C6', + "phiv;": '\U000003D5', + "phmmat;": '\U00002133', + "phone;": '\U0000260E', + "pi;": '\U000003C0', + "pitchfork;": '\U000022D4', + "piv;": '\U000003D6', + "planck;": '\U0000210F', + "planckh;": '\U0000210E', + "plankv;": '\U0000210F', + "plus;": '\U0000002B', + "plusacir;": '\U00002A23', + "plusb;": '\U0000229E', + "pluscir;": '\U00002A22', + "plusdo;": '\U00002214', + "plusdu;": '\U00002A25', + "pluse;": '\U00002A72', + "plusmn;": '\U000000B1', + "plussim;": '\U00002A26', + "plustwo;": '\U00002A27', + "pm;": '\U000000B1', + "pointint;": '\U00002A15', + "popf;": '\U0001D561', + "pound;": '\U000000A3', + "pr;": '\U0000227A', + "prE;": '\U00002AB3', + "prap;": '\U00002AB7', + "prcue;": '\U0000227C', + "pre;": '\U00002AAF', + "prec;": '\U0000227A', + "precapprox;": '\U00002AB7', + "preccurlyeq;": '\U0000227C', + "preceq;": '\U00002AAF', + "precnapprox;": '\U00002AB9', + "precneqq;": '\U00002AB5', + "precnsim;": '\U000022E8', + "precsim;": '\U0000227E', + "prime;": '\U00002032', + "primes;": '\U00002119', + "prnE;": '\U00002AB5', + "prnap;": '\U00002AB9', + "prnsim;": '\U000022E8', + "prod;": '\U0000220F', + "profalar;": '\U0000232E', + "profline;": '\U00002312', + "profsurf;": '\U00002313', + "prop;": '\U0000221D', + "propto;": '\U0000221D', + "prsim;": '\U0000227E', + "prurel;": '\U000022B0', + "pscr;": '\U0001D4C5', + "psi;": '\U000003C8', + "puncsp;": '\U00002008', + "qfr;": '\U0001D52E', + "qint;": '\U00002A0C', + "qopf;": '\U0001D562', + "qprime;": '\U00002057', + "qscr;": '\U0001D4C6', + "quaternions;": '\U0000210D', + "quatint;": '\U00002A16', + "quest;": '\U0000003F', + "questeq;": '\U0000225F', + "quot;": '\U00000022', + "rAarr;": '\U000021DB', + "rArr;": '\U000021D2', + "rAtail;": '\U0000291C', + "rBarr;": '\U0000290F', + "rHar;": '\U00002964', + "racute;": '\U00000155', + "radic;": '\U0000221A', + "raemptyv;": '\U000029B3', + "rang;": '\U000027E9', + "rangd;": '\U00002992', + "range;": '\U000029A5', + "rangle;": '\U000027E9', + "raquo;": '\U000000BB', + "rarr;": '\U00002192', + "rarrap;": '\U00002975', + "rarrb;": '\U000021E5', + "rarrbfs;": '\U00002920', + "rarrc;": '\U00002933', + "rarrfs;": '\U0000291E', + "rarrhk;": '\U000021AA', + "rarrlp;": '\U000021AC', + "rarrpl;": '\U00002945', + "rarrsim;": '\U00002974', + "rarrtl;": '\U000021A3', + "rarrw;": '\U0000219D', + "ratail;": '\U0000291A', + "ratio;": '\U00002236', + "rationals;": '\U0000211A', + "rbarr;": '\U0000290D', + "rbbrk;": '\U00002773', + "rbrace;": '\U0000007D', + "rbrack;": '\U0000005D', + "rbrke;": '\U0000298C', + "rbrksld;": '\U0000298E', + "rbrkslu;": '\U00002990', + "rcaron;": '\U00000159', + "rcedil;": '\U00000157', + "rceil;": '\U00002309', + "rcub;": '\U0000007D', + "rcy;": '\U00000440', + "rdca;": '\U00002937', + "rdldhar;": '\U00002969', + "rdquo;": '\U0000201D', + "rdquor;": '\U0000201D', + "rdsh;": '\U000021B3', + "real;": '\U0000211C', + "realine;": '\U0000211B', + "realpart;": '\U0000211C', + "reals;": '\U0000211D', + "rect;": '\U000025AD', + "reg;": '\U000000AE', + "rfisht;": '\U0000297D', + "rfloor;": '\U0000230B', + "rfr;": '\U0001D52F', + "rhard;": '\U000021C1', + "rharu;": '\U000021C0', + "rharul;": '\U0000296C', + "rho;": '\U000003C1', + "rhov;": '\U000003F1', + "rightarrow;": '\U00002192', + "rightarrowtail;": '\U000021A3', + "rightharpoondown;": '\U000021C1', + "rightharpoonup;": '\U000021C0', + "rightleftarrows;": '\U000021C4', + "rightleftharpoons;": '\U000021CC', + "rightrightarrows;": '\U000021C9', + "rightsquigarrow;": '\U0000219D', + "rightthreetimes;": '\U000022CC', + "ring;": '\U000002DA', + "risingdotseq;": '\U00002253', + "rlarr;": '\U000021C4', + "rlhar;": '\U000021CC', + "rlm;": '\U0000200F', + "rmoust;": '\U000023B1', + "rmoustache;": '\U000023B1', + "rnmid;": '\U00002AEE', + "roang;": '\U000027ED', + "roarr;": '\U000021FE', + "robrk;": '\U000027E7', + "ropar;": '\U00002986', + "ropf;": '\U0001D563', + "roplus;": '\U00002A2E', + "rotimes;": '\U00002A35', + "rpar;": '\U00000029', + "rpargt;": '\U00002994', + "rppolint;": '\U00002A12', + "rrarr;": '\U000021C9', + "rsaquo;": '\U0000203A', + "rscr;": '\U0001D4C7', + "rsh;": '\U000021B1', + "rsqb;": '\U0000005D', + "rsquo;": '\U00002019', + "rsquor;": '\U00002019', + "rthree;": '\U000022CC', + "rtimes;": '\U000022CA', + "rtri;": '\U000025B9', + "rtrie;": '\U000022B5', + "rtrif;": '\U000025B8', + "rtriltri;": '\U000029CE', + "ruluhar;": '\U00002968', + "rx;": '\U0000211E', + "sacute;": '\U0000015B', + "sbquo;": '\U0000201A', + "sc;": '\U0000227B', + "scE;": '\U00002AB4', + "scap;": '\U00002AB8', + "scaron;": '\U00000161', + "sccue;": '\U0000227D', + "sce;": '\U00002AB0', + "scedil;": '\U0000015F', + "scirc;": '\U0000015D', + "scnE;": '\U00002AB6', + "scnap;": '\U00002ABA', + "scnsim;": '\U000022E9', + "scpolint;": '\U00002A13', + "scsim;": '\U0000227F', + "scy;": '\U00000441', + "sdot;": '\U000022C5', + "sdotb;": '\U000022A1', + "sdote;": '\U00002A66', + "seArr;": '\U000021D8', + "searhk;": '\U00002925', + "searr;": '\U00002198', + "searrow;": '\U00002198', + "sect;": '\U000000A7', + "semi;": '\U0000003B', + "seswar;": '\U00002929', + "setminus;": '\U00002216', + "setmn;": '\U00002216', + "sext;": '\U00002736', + "sfr;": '\U0001D530', + "sfrown;": '\U00002322', + "sharp;": '\U0000266F', + "shchcy;": '\U00000449', + "shcy;": '\U00000448', + "shortmid;": '\U00002223', + "shortparallel;": '\U00002225', + "shy;": '\U000000AD', + "sigma;": '\U000003C3', + "sigmaf;": '\U000003C2', + "sigmav;": '\U000003C2', + "sim;": '\U0000223C', + "simdot;": '\U00002A6A', + "sime;": '\U00002243', + "simeq;": '\U00002243', + "simg;": '\U00002A9E', + "simgE;": '\U00002AA0', + "siml;": '\U00002A9D', + "simlE;": '\U00002A9F', + "simne;": '\U00002246', + "simplus;": '\U00002A24', + "simrarr;": '\U00002972', + "slarr;": '\U00002190', + "smallsetminus;": '\U00002216', + "smashp;": '\U00002A33', + "smeparsl;": '\U000029E4', + "smid;": '\U00002223', + "smile;": '\U00002323', + "smt;": '\U00002AAA', + "smte;": '\U00002AAC', + "softcy;": '\U0000044C', + "sol;": '\U0000002F', + "solb;": '\U000029C4', + "solbar;": '\U0000233F', + "sopf;": '\U0001D564', + "spades;": '\U00002660', + "spadesuit;": '\U00002660', + "spar;": '\U00002225', + "sqcap;": '\U00002293', + "sqcup;": '\U00002294', + "sqsub;": '\U0000228F', + "sqsube;": '\U00002291', + "sqsubset;": '\U0000228F', + "sqsubseteq;": '\U00002291', + "sqsup;": '\U00002290', + "sqsupe;": '\U00002292', + "sqsupset;": '\U00002290', + "sqsupseteq;": '\U00002292', + "squ;": '\U000025A1', + "square;": '\U000025A1', + "squarf;": '\U000025AA', + "squf;": '\U000025AA', + "srarr;": '\U00002192', + "sscr;": '\U0001D4C8', + "ssetmn;": '\U00002216', + "ssmile;": '\U00002323', + "sstarf;": '\U000022C6', + "star;": '\U00002606', + "starf;": '\U00002605', + "straightepsilon;": '\U000003F5', + "straightphi;": '\U000003D5', + "strns;": '\U000000AF', + "sub;": '\U00002282', + "subE;": '\U00002AC5', + "subdot;": '\U00002ABD', + "sube;": '\U00002286', + "subedot;": '\U00002AC3', + "submult;": '\U00002AC1', + "subnE;": '\U00002ACB', + "subne;": '\U0000228A', + "subplus;": '\U00002ABF', + "subrarr;": '\U00002979', + "subset;": '\U00002282', + "subseteq;": '\U00002286', + "subseteqq;": '\U00002AC5', + "subsetneq;": '\U0000228A', + "subsetneqq;": '\U00002ACB', + "subsim;": '\U00002AC7', + "subsub;": '\U00002AD5', + "subsup;": '\U00002AD3', + "succ;": '\U0000227B', + "succapprox;": '\U00002AB8', + "succcurlyeq;": '\U0000227D', + "succeq;": '\U00002AB0', + "succnapprox;": '\U00002ABA', + "succneqq;": '\U00002AB6', + "succnsim;": '\U000022E9', + "succsim;": '\U0000227F', + "sum;": '\U00002211', + "sung;": '\U0000266A', + "sup;": '\U00002283', + "sup1;": '\U000000B9', + "sup2;": '\U000000B2', + "sup3;": '\U000000B3', + "supE;": '\U00002AC6', + "supdot;": '\U00002ABE', + "supdsub;": '\U00002AD8', + "supe;": '\U00002287', + "supedot;": '\U00002AC4', + "suphsol;": '\U000027C9', + "suphsub;": '\U00002AD7', + "suplarr;": '\U0000297B', + "supmult;": '\U00002AC2', + "supnE;": '\U00002ACC', + "supne;": '\U0000228B', + "supplus;": '\U00002AC0', + "supset;": '\U00002283', + "supseteq;": '\U00002287', + "supseteqq;": '\U00002AC6', + "supsetneq;": '\U0000228B', + "supsetneqq;": '\U00002ACC', + "supsim;": '\U00002AC8', + "supsub;": '\U00002AD4', + "supsup;": '\U00002AD6', + "swArr;": '\U000021D9', + "swarhk;": '\U00002926', + "swarr;": '\U00002199', + "swarrow;": '\U00002199', + "swnwar;": '\U0000292A', + "szlig;": '\U000000DF', + "target;": '\U00002316', + "tau;": '\U000003C4', + "tbrk;": '\U000023B4', + "tcaron;": '\U00000165', + "tcedil;": '\U00000163', + "tcy;": '\U00000442', + "tdot;": '\U000020DB', + "telrec;": '\U00002315', + "tfr;": '\U0001D531', + "there4;": '\U00002234', + "therefore;": '\U00002234', + "theta;": '\U000003B8', + "thetasym;": '\U000003D1', + "thetav;": '\U000003D1', + "thickapprox;": '\U00002248', + "thicksim;": '\U0000223C', + "thinsp;": '\U00002009', + "thkap;": '\U00002248', + "thksim;": '\U0000223C', + "thorn;": '\U000000FE', + "tilde;": '\U000002DC', + "times;": '\U000000D7', + "timesb;": '\U000022A0', + "timesbar;": '\U00002A31', + "timesd;": '\U00002A30', + "tint;": '\U0000222D', + "toea;": '\U00002928', + "top;": '\U000022A4', + "topbot;": '\U00002336', + "topcir;": '\U00002AF1', + "topf;": '\U0001D565', + "topfork;": '\U00002ADA', + "tosa;": '\U00002929', + "tprime;": '\U00002034', + "trade;": '\U00002122', + "triangle;": '\U000025B5', + "triangledown;": '\U000025BF', + "triangleleft;": '\U000025C3', + "trianglelefteq;": '\U000022B4', + "triangleq;": '\U0000225C', + "triangleright;": '\U000025B9', + "trianglerighteq;": '\U000022B5', + "tridot;": '\U000025EC', + "trie;": '\U0000225C', + "triminus;": '\U00002A3A', + "triplus;": '\U00002A39', + "trisb;": '\U000029CD', + "tritime;": '\U00002A3B', + "trpezium;": '\U000023E2', + "tscr;": '\U0001D4C9', + "tscy;": '\U00000446', + "tshcy;": '\U0000045B', + "tstrok;": '\U00000167', + "twixt;": '\U0000226C', + "twoheadleftarrow;": '\U0000219E', + "twoheadrightarrow;": '\U000021A0', + "uArr;": '\U000021D1', + "uHar;": '\U00002963', + "uacute;": '\U000000FA', + "uarr;": '\U00002191', + "ubrcy;": '\U0000045E', + "ubreve;": '\U0000016D', + "ucirc;": '\U000000FB', + "ucy;": '\U00000443', + "udarr;": '\U000021C5', + "udblac;": '\U00000171', + "udhar;": '\U0000296E', + "ufisht;": '\U0000297E', + "ufr;": '\U0001D532', + "ugrave;": '\U000000F9', + "uharl;": '\U000021BF', + "uharr;": '\U000021BE', + "uhblk;": '\U00002580', + "ulcorn;": '\U0000231C', + "ulcorner;": '\U0000231C', + "ulcrop;": '\U0000230F', + "ultri;": '\U000025F8', + "umacr;": '\U0000016B', + "uml;": '\U000000A8', + "uogon;": '\U00000173', + "uopf;": '\U0001D566', + "uparrow;": '\U00002191', + "updownarrow;": '\U00002195', + "upharpoonleft;": '\U000021BF', + "upharpoonright;": '\U000021BE', + "uplus;": '\U0000228E', + "upsi;": '\U000003C5', + "upsih;": '\U000003D2', + "upsilon;": '\U000003C5', + "upuparrows;": '\U000021C8', + "urcorn;": '\U0000231D', + "urcorner;": '\U0000231D', + "urcrop;": '\U0000230E', + "uring;": '\U0000016F', + "urtri;": '\U000025F9', + "uscr;": '\U0001D4CA', + "utdot;": '\U000022F0', + "utilde;": '\U00000169', + "utri;": '\U000025B5', + "utrif;": '\U000025B4', + "uuarr;": '\U000021C8', + "uuml;": '\U000000FC', + "uwangle;": '\U000029A7', + "vArr;": '\U000021D5', + "vBar;": '\U00002AE8', + "vBarv;": '\U00002AE9', + "vDash;": '\U000022A8', + "vangrt;": '\U0000299C', + "varepsilon;": '\U000003F5', + "varkappa;": '\U000003F0', + "varnothing;": '\U00002205', + "varphi;": '\U000003D5', + "varpi;": '\U000003D6', + "varpropto;": '\U0000221D', + "varr;": '\U00002195', + "varrho;": '\U000003F1', + "varsigma;": '\U000003C2', + "vartheta;": '\U000003D1', + "vartriangleleft;": '\U000022B2', + "vartriangleright;": '\U000022B3', + "vcy;": '\U00000432', + "vdash;": '\U000022A2', + "vee;": '\U00002228', + "veebar;": '\U000022BB', + "veeeq;": '\U0000225A', + "vellip;": '\U000022EE', + "verbar;": '\U0000007C', + "vert;": '\U0000007C', + "vfr;": '\U0001D533', + "vltri;": '\U000022B2', + "vopf;": '\U0001D567', + "vprop;": '\U0000221D', + "vrtri;": '\U000022B3', + "vscr;": '\U0001D4CB', + "vzigzag;": '\U0000299A', + "wcirc;": '\U00000175', + "wedbar;": '\U00002A5F', + "wedge;": '\U00002227', + "wedgeq;": '\U00002259', + "weierp;": '\U00002118', + "wfr;": '\U0001D534', + "wopf;": '\U0001D568', + "wp;": '\U00002118', + "wr;": '\U00002240', + "wreath;": '\U00002240', + "wscr;": '\U0001D4CC', + "xcap;": '\U000022C2', + "xcirc;": '\U000025EF', + "xcup;": '\U000022C3', + "xdtri;": '\U000025BD', + "xfr;": '\U0001D535', + "xhArr;": '\U000027FA', + "xharr;": '\U000027F7', + "xi;": '\U000003BE', + "xlArr;": '\U000027F8', + "xlarr;": '\U000027F5', + "xmap;": '\U000027FC', + "xnis;": '\U000022FB', + "xodot;": '\U00002A00', + "xopf;": '\U0001D569', + "xoplus;": '\U00002A01', + "xotime;": '\U00002A02', + "xrArr;": '\U000027F9', + "xrarr;": '\U000027F6', + "xscr;": '\U0001D4CD', + "xsqcup;": '\U00002A06', + "xuplus;": '\U00002A04', + "xutri;": '\U000025B3', + "xvee;": '\U000022C1', + "xwedge;": '\U000022C0', + "yacute;": '\U000000FD', + "yacy;": '\U0000044F', + "ycirc;": '\U00000177', + "ycy;": '\U0000044B', + "yen;": '\U000000A5', + "yfr;": '\U0001D536', + "yicy;": '\U00000457', + "yopf;": '\U0001D56A', + "yscr;": '\U0001D4CE', + "yucy;": '\U0000044E', + "yuml;": '\U000000FF', + "zacute;": '\U0000017A', + "zcaron;": '\U0000017E', + "zcy;": '\U00000437', + "zdot;": '\U0000017C', + "zeetrf;": '\U00002128', + "zeta;": '\U000003B6', + "zfr;": '\U0001D537', + "zhcy;": '\U00000436', + "zigrarr;": '\U000021DD', + "zopf;": '\U0001D56B', + "zscr;": '\U0001D4CF', + "zwj;": '\U0000200D', + "zwnj;": '\U0000200C', + "AElig": '\U000000C6', + "AMP": '\U00000026', + "Aacute": '\U000000C1', + "Acirc": '\U000000C2', + "Agrave": '\U000000C0', + "Aring": '\U000000C5', + "Atilde": '\U000000C3', + "Auml": '\U000000C4', + "COPY": '\U000000A9', + "Ccedil": '\U000000C7', + "ETH": '\U000000D0', + "Eacute": '\U000000C9', + "Ecirc": '\U000000CA', + "Egrave": '\U000000C8', + "Euml": '\U000000CB', + "GT": '\U0000003E', + "Iacute": '\U000000CD', + "Icirc": '\U000000CE', + "Igrave": '\U000000CC', + "Iuml": '\U000000CF', + "LT": '\U0000003C', + "Ntilde": '\U000000D1', + "Oacute": '\U000000D3', + "Ocirc": '\U000000D4', + "Ograve": '\U000000D2', + "Oslash": '\U000000D8', + "Otilde": '\U000000D5', + "Ouml": '\U000000D6', + "QUOT": '\U00000022', + "REG": '\U000000AE', + "THORN": '\U000000DE', + "Uacute": '\U000000DA', + "Ucirc": '\U000000DB', + "Ugrave": '\U000000D9', + "Uuml": '\U000000DC', + "Yacute": '\U000000DD', + "aacute": '\U000000E1', + "acirc": '\U000000E2', + "acute": '\U000000B4', + "aelig": '\U000000E6', + "agrave": '\U000000E0', + "amp": '\U00000026', + "aring": '\U000000E5', + "atilde": '\U000000E3', + "auml": '\U000000E4', + "brvbar": '\U000000A6', + "ccedil": '\U000000E7', + "cedil": '\U000000B8', + "cent": '\U000000A2', + "copy": '\U000000A9', + "curren": '\U000000A4', + "deg": '\U000000B0', + "divide": '\U000000F7', + "eacute": '\U000000E9', + "ecirc": '\U000000EA', + "egrave": '\U000000E8', + "eth": '\U000000F0', + "euml": '\U000000EB', + "frac12": '\U000000BD', + "frac14": '\U000000BC', + "frac34": '\U000000BE', + "gt": '\U0000003E', + "iacute": '\U000000ED', + "icirc": '\U000000EE', + "iexcl": '\U000000A1', + "igrave": '\U000000EC', + "iquest": '\U000000BF', + "iuml": '\U000000EF', + "laquo": '\U000000AB', + "lt": '\U0000003C', + "macr": '\U000000AF', + "micro": '\U000000B5', + "middot": '\U000000B7', + "nbsp": '\U000000A0', + "not": '\U000000AC', + "ntilde": '\U000000F1', + "oacute": '\U000000F3', + "ocirc": '\U000000F4', + "ograve": '\U000000F2', + "ordf": '\U000000AA', + "ordm": '\U000000BA', + "oslash": '\U000000F8', + "otilde": '\U000000F5', + "ouml": '\U000000F6', + "para": '\U000000B6', + "plusmn": '\U000000B1', + "pound": '\U000000A3', + "quot": '\U00000022', + "raquo": '\U000000BB', + "reg": '\U000000AE', + "sect": '\U000000A7', + "shy": '\U000000AD', + "sup1": '\U000000B9', + "sup2": '\U000000B2', + "sup3": '\U000000B3', + "szlig": '\U000000DF', + "thorn": '\U000000FE', + "times": '\U000000D7', + "uacute": '\U000000FA', + "ucirc": '\U000000FB', + "ugrave": '\U000000F9', + "uml": '\U000000A8', + "uuml": '\U000000FC', + "yacute": '\U000000FD', + "yen": '\U000000A5', + "yuml": '\U000000FF', +} + +// HTML entities that are two unicode codepoints. +var entity2 = map[string][2]rune{ + // TODO(nigeltao): Handle replacements that are wider than their names. + // "nLt;": {'\u226A', '\u20D2'}, + // "nGt;": {'\u226B', '\u20D2'}, + "NotEqualTilde;": {'\u2242', '\u0338'}, + "NotGreaterFullEqual;": {'\u2267', '\u0338'}, + "NotGreaterGreater;": {'\u226B', '\u0338'}, + "NotGreaterSlantEqual;": {'\u2A7E', '\u0338'}, + "NotHumpDownHump;": {'\u224E', '\u0338'}, + "NotHumpEqual;": {'\u224F', '\u0338'}, + "NotLeftTriangleBar;": {'\u29CF', '\u0338'}, + "NotLessLess;": {'\u226A', '\u0338'}, + "NotLessSlantEqual;": {'\u2A7D', '\u0338'}, + "NotNestedGreaterGreater;": {'\u2AA2', '\u0338'}, + "NotNestedLessLess;": {'\u2AA1', '\u0338'}, + "NotPrecedesEqual;": {'\u2AAF', '\u0338'}, + "NotRightTriangleBar;": {'\u29D0', '\u0338'}, + "NotSquareSubset;": {'\u228F', '\u0338'}, + "NotSquareSuperset;": {'\u2290', '\u0338'}, + "NotSubset;": {'\u2282', '\u20D2'}, + "NotSucceedsEqual;": {'\u2AB0', '\u0338'}, + "NotSucceedsTilde;": {'\u227F', '\u0338'}, + "NotSuperset;": {'\u2283', '\u20D2'}, + "ThickSpace;": {'\u205F', '\u200A'}, + "acE;": {'\u223E', '\u0333'}, + "bne;": {'\u003D', '\u20E5'}, + "bnequiv;": {'\u2261', '\u20E5'}, + "caps;": {'\u2229', '\uFE00'}, + "cups;": {'\u222A', '\uFE00'}, + "fjlig;": {'\u0066', '\u006A'}, + "gesl;": {'\u22DB', '\uFE00'}, + "gvertneqq;": {'\u2269', '\uFE00'}, + "gvnE;": {'\u2269', '\uFE00'}, + "lates;": {'\u2AAD', '\uFE00'}, + "lesg;": {'\u22DA', '\uFE00'}, + "lvertneqq;": {'\u2268', '\uFE00'}, + "lvnE;": {'\u2268', '\uFE00'}, + "nGg;": {'\u22D9', '\u0338'}, + "nGtv;": {'\u226B', '\u0338'}, + "nLl;": {'\u22D8', '\u0338'}, + "nLtv;": {'\u226A', '\u0338'}, + "nang;": {'\u2220', '\u20D2'}, + "napE;": {'\u2A70', '\u0338'}, + "napid;": {'\u224B', '\u0338'}, + "nbump;": {'\u224E', '\u0338'}, + "nbumpe;": {'\u224F', '\u0338'}, + "ncongdot;": {'\u2A6D', '\u0338'}, + "nedot;": {'\u2250', '\u0338'}, + "nesim;": {'\u2242', '\u0338'}, + "ngE;": {'\u2267', '\u0338'}, + "ngeqq;": {'\u2267', '\u0338'}, + "ngeqslant;": {'\u2A7E', '\u0338'}, + "nges;": {'\u2A7E', '\u0338'}, + "nlE;": {'\u2266', '\u0338'}, + "nleqq;": {'\u2266', '\u0338'}, + "nleqslant;": {'\u2A7D', '\u0338'}, + "nles;": {'\u2A7D', '\u0338'}, + "notinE;": {'\u22F9', '\u0338'}, + "notindot;": {'\u22F5', '\u0338'}, + "nparsl;": {'\u2AFD', '\u20E5'}, + "npart;": {'\u2202', '\u0338'}, + "npre;": {'\u2AAF', '\u0338'}, + "npreceq;": {'\u2AAF', '\u0338'}, + "nrarrc;": {'\u2933', '\u0338'}, + "nrarrw;": {'\u219D', '\u0338'}, + "nsce;": {'\u2AB0', '\u0338'}, + "nsubE;": {'\u2AC5', '\u0338'}, + "nsubset;": {'\u2282', '\u20D2'}, + "nsubseteqq;": {'\u2AC5', '\u0338'}, + "nsucceq;": {'\u2AB0', '\u0338'}, + "nsupE;": {'\u2AC6', '\u0338'}, + "nsupset;": {'\u2283', '\u20D2'}, + "nsupseteqq;": {'\u2AC6', '\u0338'}, + "nvap;": {'\u224D', '\u20D2'}, + "nvge;": {'\u2265', '\u20D2'}, + "nvgt;": {'\u003E', '\u20D2'}, + "nvle;": {'\u2264', '\u20D2'}, + "nvlt;": {'\u003C', '\u20D2'}, + "nvltrie;": {'\u22B4', '\u20D2'}, + "nvrtrie;": {'\u22B5', '\u20D2'}, + "nvsim;": {'\u223C', '\u20D2'}, + "race;": {'\u223D', '\u0331'}, + "smtes;": {'\u2AAC', '\uFE00'}, + "sqcaps;": {'\u2293', '\uFE00'}, + "sqcups;": {'\u2294', '\uFE00'}, + "varsubsetneq;": {'\u228A', '\uFE00'}, + "varsubsetneqq;": {'\u2ACB', '\uFE00'}, + "varsupsetneq;": {'\u228B', '\uFE00'}, + "varsupsetneqq;": {'\u2ACC', '\uFE00'}, + "vnsub;": {'\u2282', '\u20D2'}, + "vnsup;": {'\u2283', '\u20D2'}, + "vsubnE;": {'\u2ACB', '\uFE00'}, + "vsubne;": {'\u228A', '\uFE00'}, + "vsupnE;": {'\u2ACC', '\uFE00'}, + "vsupne;": {'\u228B', '\uFE00'}, +} diff --git a/vendor/golang.org/x/net/html/escape.go b/vendor/golang.org/x/net/html/escape.go new file mode 100644 index 000000000..04c6bec21 --- /dev/null +++ b/vendor/golang.org/x/net/html/escape.go @@ -0,0 +1,339 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "bytes" + "strings" + "unicode/utf8" +) + +// These replacements permit compatibility with old numeric entities that +// assumed Windows-1252 encoding. +// https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference +var replacementTable = [...]rune{ + '\u20AC', // First entry is what 0x80 should be replaced with. + '\u0081', + '\u201A', + '\u0192', + '\u201E', + '\u2026', + '\u2020', + '\u2021', + '\u02C6', + '\u2030', + '\u0160', + '\u2039', + '\u0152', + '\u008D', + '\u017D', + '\u008F', + '\u0090', + '\u2018', + '\u2019', + '\u201C', + '\u201D', + '\u2022', + '\u2013', + '\u2014', + '\u02DC', + '\u2122', + '\u0161', + '\u203A', + '\u0153', + '\u009D', + '\u017E', + '\u0178', // Last entry is 0x9F. + // 0x00->'\uFFFD' is handled programmatically. + // 0x0D->'\u000D' is a no-op. +} + +// unescapeEntity reads an entity like "<" from b[src:] and writes the +// corresponding "<" to b[dst:], returning the incremented dst and src cursors. +// Precondition: b[src] == '&' && dst <= src. +// attribute should be true if parsing an attribute value. +func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) { + // https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference + + // i starts at 1 because we already know that s[0] == '&'. + i, s := 1, b[src:] + + if len(s) <= 1 { + b[dst] = b[src] + return dst + 1, src + 1 + } + + if s[i] == '#' { + if len(s) <= 3 { // We need to have at least "&#.". + b[dst] = b[src] + return dst + 1, src + 1 + } + i++ + c := s[i] + hex := false + if c == 'x' || c == 'X' { + hex = true + i++ + } + + x := '\x00' + for i < len(s) { + c = s[i] + i++ + if hex { + if '0' <= c && c <= '9' { + x = 16*x + rune(c) - '0' + continue + } else if 'a' <= c && c <= 'f' { + x = 16*x + rune(c) - 'a' + 10 + continue + } else if 'A' <= c && c <= 'F' { + x = 16*x + rune(c) - 'A' + 10 + continue + } + } else if '0' <= c && c <= '9' { + x = 10*x + rune(c) - '0' + continue + } + if c != ';' { + i-- + } + break + } + + if i <= 3 { // No characters matched. + b[dst] = b[src] + return dst + 1, src + 1 + } + + if 0x80 <= x && x <= 0x9F { + // Replace characters from Windows-1252 with UTF-8 equivalents. + x = replacementTable[x-0x80] + } else if x == 0 || (0xD800 <= x && x <= 0xDFFF) || x > 0x10FFFF { + // Replace invalid characters with the replacement character. + x = '\uFFFD' + } + + return dst + utf8.EncodeRune(b[dst:], x), src + i + } + + // Consume the maximum number of characters possible, with the + // consumed characters matching one of the named references. + + for i < len(s) { + c := s[i] + i++ + // Lower-cased characters are more common in entities, so we check for them first. + if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' { + continue + } + if c != ';' { + i-- + } + break + } + + entityName := string(s[1:i]) + if entityName == "" { + // No-op. + } else if attribute && entityName[len(entityName)-1] != ';' && len(s) > i && s[i] == '=' { + // No-op. + } else if x := entity[entityName]; x != 0 { + return dst + utf8.EncodeRune(b[dst:], x), src + i + } else if x := entity2[entityName]; x[0] != 0 { + dst1 := dst + utf8.EncodeRune(b[dst:], x[0]) + return dst1 + utf8.EncodeRune(b[dst1:], x[1]), src + i + } else if !attribute { + maxLen := len(entityName) - 1 + if maxLen > longestEntityWithoutSemicolon { + maxLen = longestEntityWithoutSemicolon + } + for j := maxLen; j > 1; j-- { + if x := entity[entityName[:j]]; x != 0 { + return dst + utf8.EncodeRune(b[dst:], x), src + j + 1 + } + } + } + + dst1, src1 = dst+i, src+i + copy(b[dst:dst1], b[src:src1]) + return dst1, src1 +} + +// unescape unescapes b's entities in-place, so that "a<b" becomes "a' byte that, per above, we'd like to avoid escaping unless we have to. +// +// Studying the summary table (and T actions in its '>' column) closely, we +// only need to escape in states 43, 44, 49, 51 and 52. State 43 is at the +// start of the comment data. State 52 is after a '!'. The other three states +// are after a '-'. +// +// Our algorithm is thus to escape every '&' and to escape '>' if and only if: +// - The '>' is after a '!' or '-' (in the unescaped data) or +// - The '>' is at the start of the comment data (after the opening ""); err != nil { + return err + } + return nil + case DoctypeNode: + if _, err := w.WriteString("') + case RawNode: + _, err := w.WriteString(n.Data) + return err + default: + return errors.New("html: unknown node type") + } + + // Render the opening tag. + if err := w.WriteByte('<'); err != nil { + return err + } + if _, err := w.WriteString(n.Data); err != nil { + return err + } + for _, a := range n.Attr { + if err := w.WriteByte(' '); err != nil { + return err + } + if a.Namespace != "" { + if _, err := w.WriteString(a.Namespace); err != nil { + return err + } + if err := w.WriteByte(':'); err != nil { + return err + } + } + if _, err := w.WriteString(a.Key); err != nil { + return err + } + if _, err := w.WriteString(`="`); err != nil { + return err + } + if err := escape(w, a.Val); err != nil { + return err + } + if err := w.WriteByte('"'); err != nil { + return err + } + } + if voidElements[n.Data] { + if n.FirstChild != nil { + return fmt.Errorf("html: void element <%s> has child nodes", n.Data) + } + _, err := w.WriteString("/>") + return err + } + if err := w.WriteByte('>'); err != nil { + return err + } + + // Add initial newline where there is danger of a newline beging ignored. + if c := n.FirstChild; c != nil && c.Type == TextNode && strings.HasPrefix(c.Data, "\n") { + switch n.Data { + case "pre", "listing", "textarea": + if err := w.WriteByte('\n'); err != nil { + return err + } + } + } + + // Render any child nodes + if childTextNodesAreLiteral(n) { + for c := n.FirstChild; c != nil; c = c.NextSibling { + if c.Type == TextNode { + if _, err := w.WriteString(c.Data); err != nil { + return err + } + } else { + if err := render1(w, c); err != nil { + return err + } + } + } + if n.Data == "plaintext" { + // Don't render anything else. must be the + // last element in the file, with no closing tag. + return plaintextAbort + } + } else { + for c := n.FirstChild; c != nil; c = c.NextSibling { + if err := render1(w, c); err != nil { + return err + } + } + } + + // Render the </xxx> closing tag. + if _, err := w.WriteString("</"); err != nil { + return err + } + if _, err := w.WriteString(n.Data); err != nil { + return err + } + return w.WriteByte('>') +} + +func childTextNodesAreLiteral(n *Node) bool { + // Per WHATWG HTML 13.3, if the parent of the current node is a style, + // script, xmp, iframe, noembed, noframes, or plaintext element, and the + // current node is a text node, append the value of the node's data + // literally. The specification is not explicit about it, but we only + // enforce this if we are in the HTML namespace (i.e. when the namespace is + // ""). + // NOTE: we also always include noscript elements, although the + // specification states that they should only be rendered as such if + // scripting is enabled for the node (which is not something we track). + if n.Namespace != "" { + return false + } + switch n.Data { + case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "xmp": + return true + default: + return false + } +} + +// writeQuoted writes s to w surrounded by quotes. Normally it will use double +// quotes, but if s contains a double quote, it will use single quotes. +// It is used for writing the identifiers in a doctype declaration. +// In valid HTML, they can't contain both types of quotes. +func writeQuoted(w writer, s string) error { + var q byte = '"' + if strings.Contains(s, `"`) { + q = '\'' + } + if err := w.WriteByte(q); err != nil { + return err + } + if _, err := w.WriteString(s); err != nil { + return err + } + if err := w.WriteByte(q); err != nil { + return err + } + return nil +} + +// Section 12.1.2, "Elements", gives this list of void elements. Void elements +// are those that can't have any contents. +var voidElements = map[string]bool{ + "area": true, + "base": true, + "br": true, + "col": true, + "embed": true, + "hr": true, + "img": true, + "input": true, + "keygen": true, // "keygen" has been removed from the spec, but are kept here for backwards compatibility. + "link": true, + "meta": true, + "param": true, + "source": true, + "track": true, + "wbr": true, +} diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go new file mode 100644 index 000000000..3c57880d6 --- /dev/null +++ b/vendor/golang.org/x/net/html/token.go @@ -0,0 +1,1272 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "bytes" + "errors" + "io" + "strconv" + "strings" + + "golang.org/x/net/html/atom" +) + +// A TokenType is the type of a Token. +type TokenType uint32 + +const ( + // ErrorToken means that an error occurred during tokenization. + ErrorToken TokenType = iota + // TextToken means a text node. + TextToken + // A StartTagToken looks like <a>. + StartTagToken + // An EndTagToken looks like </a>. + EndTagToken + // A SelfClosingTagToken tag looks like <br/>. + SelfClosingTagToken + // A CommentToken looks like <!--x-->. + CommentToken + // A DoctypeToken looks like <!DOCTYPE x> + DoctypeToken +) + +// ErrBufferExceeded means that the buffering limit was exceeded. +var ErrBufferExceeded = errors.New("max buffer exceeded") + +// String returns a string representation of the TokenType. +func (t TokenType) String() string { + switch t { + case ErrorToken: + return "Error" + case TextToken: + return "Text" + case StartTagToken: + return "StartTag" + case EndTagToken: + return "EndTag" + case SelfClosingTagToken: + return "SelfClosingTag" + case CommentToken: + return "Comment" + case DoctypeToken: + return "Doctype" + } + return "Invalid(" + strconv.Itoa(int(t)) + ")" +} + +// An Attribute is an attribute namespace-key-value triple. Namespace is +// non-empty for foreign attributes like xlink, Key is alphabetic (and hence +// does not contain escapable characters like '&', '<' or '>'), and Val is +// unescaped (it looks like "a<b" rather than "a&lt;b"). +// +// Namespace is only used by the parser, not the tokenizer. +type Attribute struct { + Namespace, Key, Val string +} + +// A Token consists of a TokenType and some Data (tag name for start and end +// tags, content for text, comments and doctypes). A tag Token may also contain +// a slice of Attributes. Data is unescaped for all Tokens (it looks like "a<b" +// rather than "a&lt;b"). For tag Tokens, DataAtom is the atom for Data, or +// zero if Data is not a known tag name. +type Token struct { + Type TokenType + DataAtom atom.Atom + Data string + Attr []Attribute +} + +// tagString returns a string representation of a tag Token's Data and Attr. +func (t Token) tagString() string { + if len(t.Attr) == 0 { + return t.Data + } + buf := bytes.NewBufferString(t.Data) + for _, a := range t.Attr { + buf.WriteByte(' ') + buf.WriteString(a.Key) + buf.WriteString(`="`) + escape(buf, a.Val) + buf.WriteByte('"') + } + return buf.String() +} + +// String returns a string representation of the Token. +func (t Token) String() string { + switch t.Type { + case ErrorToken: + return "" + case TextToken: + return EscapeString(t.Data) + case StartTagToken: + return "<" + t.tagString() + ">" + case EndTagToken: + return "</" + t.tagString() + ">" + case SelfClosingTagToken: + return "<" + t.tagString() + "/>" + case CommentToken: + return "<!--" + escapeCommentString(t.Data) + "-->" + case DoctypeToken: + return "<!DOCTYPE " + EscapeString(t.Data) + ">" + } + return "Invalid(" + strconv.Itoa(int(t.Type)) + ")" +} + +// span is a range of bytes in a Tokenizer's buffer. The start is inclusive, +// the end is exclusive. +type span struct { + start, end int +} + +// A Tokenizer returns a stream of HTML Tokens. +type Tokenizer struct { + // r is the source of the HTML text. + r io.Reader + // tt is the TokenType of the current token. + tt TokenType + // err is the first error encountered during tokenization. It is possible + // for tt != Error && err != nil to hold: this means that Next returned a + // valid token but the subsequent Next call will return an error token. + // For example, if the HTML text input was just "plain", then the first + // Next call would set z.err to io.EOF but return a TextToken, and all + // subsequent Next calls would return an ErrorToken. + // err is never reset. Once it becomes non-nil, it stays non-nil. + err error + // readErr is the error returned by the io.Reader r. It is separate from + // err because it is valid for an io.Reader to return (n int, err1 error) + // such that n > 0 && err1 != nil, and callers should always process the + // n > 0 bytes before considering the error err1. + readErr error + // buf[raw.start:raw.end] holds the raw bytes of the current token. + // buf[raw.end:] is buffered input that will yield future tokens. + raw span + buf []byte + // maxBuf limits the data buffered in buf. A value of 0 means unlimited. + maxBuf int + // buf[data.start:data.end] holds the raw bytes of the current token's data: + // a text token's text, a tag token's tag name, etc. + data span + // pendingAttr is the attribute key and value currently being tokenized. + // When complete, pendingAttr is pushed onto attr. nAttrReturned is + // incremented on each call to TagAttr. + pendingAttr [2]span + attr [][2]span + nAttrReturned int + // rawTag is the "script" in "</script>" that closes the next token. If + // non-empty, the subsequent call to Next will return a raw or RCDATA text + // token: one that treats "<p>" as text instead of an element. + // rawTag's contents are lower-cased. + rawTag string + // textIsRaw is whether the current text token's data is not escaped. + textIsRaw bool + // convertNUL is whether NUL bytes in the current token's data should + // be converted into \ufffd replacement characters. + convertNUL bool + // allowCDATA is whether CDATA sections are allowed in the current context. + allowCDATA bool +} + +// AllowCDATA sets whether or not the tokenizer recognizes <![CDATA[foo]]> as +// the text "foo". The default value is false, which means to recognize it as +// a bogus comment "<!-- [CDATA[foo]] -->" instead. +// +// Strictly speaking, an HTML5 compliant tokenizer should allow CDATA if and +// only if tokenizing foreign content, such as MathML and SVG. However, +// tracking foreign-contentness is difficult to do purely in the tokenizer, +// as opposed to the parser, due to HTML integration points: an <svg> element +// can contain a <foreignObject> that is foreign-to-SVG but not foreign-to- +// HTML. For strict compliance with the HTML5 tokenization algorithm, it is the +// responsibility of the user of a tokenizer to call AllowCDATA as appropriate. +// In practice, if using the tokenizer without caring whether MathML or SVG +// CDATA is text or comments, such as tokenizing HTML to find all the anchor +// text, it is acceptable to ignore this responsibility. +func (z *Tokenizer) AllowCDATA(allowCDATA bool) { + z.allowCDATA = allowCDATA +} + +// NextIsNotRawText instructs the tokenizer that the next token should not be +// considered as 'raw text'. Some elements, such as script and title elements, +// normally require the next token after the opening tag to be 'raw text' that +// has no child elements. For example, tokenizing "<title>a<b>c</b>d</title>" +// yields a start tag token for "<title>", a text token for "a<b>c</b>d", and +// an end tag token for "</title>". There are no distinct start tag or end tag +// tokens for the "<b>" and "</b>". +// +// This tokenizer implementation will generally look for raw text at the right +// times. Strictly speaking, an HTML5 compliant tokenizer should not look for +// raw text if in foreign content: <title> generally needs raw text, but a +// <title> inside an <svg> does not. Another example is that a <textarea> +// generally needs raw text, but a <textarea> is not allowed as an immediate +// child of a <select>; in normal parsing, a <textarea> implies </select>, but +// one cannot close the implicit element when parsing a <select>'s InnerHTML. +// Similarly to AllowCDATA, tracking the correct moment to override raw-text- +// ness is difficult to do purely in the tokenizer, as opposed to the parser. +// For strict compliance with the HTML5 tokenization algorithm, it is the +// responsibility of the user of a tokenizer to call NextIsNotRawText as +// appropriate. In practice, like AllowCDATA, it is acceptable to ignore this +// responsibility for basic usage. +// +// Note that this 'raw text' concept is different from the one offered by the +// Tokenizer.Raw method. +func (z *Tokenizer) NextIsNotRawText() { + z.rawTag = "" +} + +// Err returns the error associated with the most recent ErrorToken token. +// This is typically io.EOF, meaning the end of tokenization. +func (z *Tokenizer) Err() error { + if z.tt != ErrorToken { + return nil + } + return z.err +} + +// readByte returns the next byte from the input stream, doing a buffered read +// from z.r into z.buf if necessary. z.buf[z.raw.start:z.raw.end] remains a contiguous byte +// slice that holds all the bytes read so far for the current token. +// It sets z.err if the underlying reader returns an error. +// Pre-condition: z.err == nil. +func (z *Tokenizer) readByte() byte { + if z.raw.end >= len(z.buf) { + // Our buffer is exhausted and we have to read from z.r. Check if the + // previous read resulted in an error. + if z.readErr != nil { + z.err = z.readErr + return 0 + } + // We copy z.buf[z.raw.start:z.raw.end] to the beginning of z.buf. If the length + // z.raw.end - z.raw.start is more than half the capacity of z.buf, then we + // allocate a new buffer before the copy. + c := cap(z.buf) + d := z.raw.end - z.raw.start + var buf1 []byte + if 2*d > c { + buf1 = make([]byte, d, 2*c) + } else { + buf1 = z.buf[:d] + } + copy(buf1, z.buf[z.raw.start:z.raw.end]) + if x := z.raw.start; x != 0 { + // Adjust the data/attr spans to refer to the same contents after the copy. + z.data.start -= x + z.data.end -= x + z.pendingAttr[0].start -= x + z.pendingAttr[0].end -= x + z.pendingAttr[1].start -= x + z.pendingAttr[1].end -= x + for i := range z.attr { + z.attr[i][0].start -= x + z.attr[i][0].end -= x + z.attr[i][1].start -= x + z.attr[i][1].end -= x + } + } + z.raw.start, z.raw.end, z.buf = 0, d, buf1[:d] + // Now that we have copied the live bytes to the start of the buffer, + // we read from z.r into the remainder. + var n int + n, z.readErr = readAtLeastOneByte(z.r, buf1[d:cap(buf1)]) + if n == 0 { + z.err = z.readErr + return 0 + } + z.buf = buf1[:d+n] + } + x := z.buf[z.raw.end] + z.raw.end++ + if z.maxBuf > 0 && z.raw.end-z.raw.start >= z.maxBuf { + z.err = ErrBufferExceeded + return 0 + } + return x +} + +// Buffered returns a slice containing data buffered but not yet tokenized. +func (z *Tokenizer) Buffered() []byte { + return z.buf[z.raw.end:] +} + +// readAtLeastOneByte wraps an io.Reader so that reading cannot return (0, nil). +// It returns io.ErrNoProgress if the underlying r.Read method returns (0, nil) +// too many times in succession. +func readAtLeastOneByte(r io.Reader, b []byte) (int, error) { + for i := 0; i < 100; i++ { + if n, err := r.Read(b); n != 0 || err != nil { + return n, err + } + } + return 0, io.ErrNoProgress +} + +// skipWhiteSpace skips past any white space. +func (z *Tokenizer) skipWhiteSpace() { + if z.err != nil { + return + } + for { + c := z.readByte() + if z.err != nil { + return + } + switch c { + case ' ', '\n', '\r', '\t', '\f': + // No-op. + default: + z.raw.end-- + return + } + } +} + +// readRawOrRCDATA reads until the next "</foo>", where "foo" is z.rawTag and +// is typically something like "script" or "textarea". +func (z *Tokenizer) readRawOrRCDATA() { + if z.rawTag == "script" { + z.readScript() + z.textIsRaw = true + z.rawTag = "" + return + } +loop: + for { + c := z.readByte() + if z.err != nil { + break loop + } + if c != '<' { + continue loop + } + c = z.readByte() + if z.err != nil { + break loop + } + if c != '/' { + z.raw.end-- + continue loop + } + if z.readRawEndTag() || z.err != nil { + break loop + } + } + z.data.end = z.raw.end + // A textarea's or title's RCDATA can contain escaped entities. + z.textIsRaw = z.rawTag != "textarea" && z.rawTag != "title" + z.rawTag = "" +} + +// readRawEndTag attempts to read a tag like "</foo>", where "foo" is z.rawTag. +// If it succeeds, it backs up the input position to reconsume the tag and +// returns true. Otherwise it returns false. The opening "</" has already been +// consumed. +func (z *Tokenizer) readRawEndTag() bool { + for i := 0; i < len(z.rawTag); i++ { + c := z.readByte() + if z.err != nil { + return false + } + if c != z.rawTag[i] && c != z.rawTag[i]-('a'-'A') { + z.raw.end-- + return false + } + } + c := z.readByte() + if z.err != nil { + return false + } + switch c { + case ' ', '\n', '\r', '\t', '\f', '/', '>': + // The 3 is 2 for the leading "</" plus 1 for the trailing character c. + z.raw.end -= 3 + len(z.rawTag) + return true + } + z.raw.end-- + return false +} + +// readScript reads until the next </script> tag, following the byzantine +// rules for escaping/hiding the closing tag. +func (z *Tokenizer) readScript() { + defer func() { + z.data.end = z.raw.end + }() + var c byte + +scriptData: + c = z.readByte() + if z.err != nil { + return + } + if c == '<' { + goto scriptDataLessThanSign + } + goto scriptData + +scriptDataLessThanSign: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '/': + goto scriptDataEndTagOpen + case '!': + goto scriptDataEscapeStart + } + z.raw.end-- + goto scriptData + +scriptDataEndTagOpen: + if z.readRawEndTag() || z.err != nil { + return + } + goto scriptData + +scriptDataEscapeStart: + c = z.readByte() + if z.err != nil { + return + } + if c == '-' { + goto scriptDataEscapeStartDash + } + z.raw.end-- + goto scriptData + +scriptDataEscapeStartDash: + c = z.readByte() + if z.err != nil { + return + } + if c == '-' { + goto scriptDataEscapedDashDash + } + z.raw.end-- + goto scriptData + +scriptDataEscaped: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '-': + goto scriptDataEscapedDash + case '<': + goto scriptDataEscapedLessThanSign + } + goto scriptDataEscaped + +scriptDataEscapedDash: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '-': + goto scriptDataEscapedDashDash + case '<': + goto scriptDataEscapedLessThanSign + } + goto scriptDataEscaped + +scriptDataEscapedDashDash: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '-': + goto scriptDataEscapedDashDash + case '<': + goto scriptDataEscapedLessThanSign + case '>': + goto scriptData + } + goto scriptDataEscaped + +scriptDataEscapedLessThanSign: + c = z.readByte() + if z.err != nil { + return + } + if c == '/' { + goto scriptDataEscapedEndTagOpen + } + if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' { + goto scriptDataDoubleEscapeStart + } + z.raw.end-- + goto scriptData + +scriptDataEscapedEndTagOpen: + if z.readRawEndTag() || z.err != nil { + return + } + goto scriptDataEscaped + +scriptDataDoubleEscapeStart: + z.raw.end-- + for i := 0; i < len("script"); i++ { + c = z.readByte() + if z.err != nil { + return + } + if c != "script"[i] && c != "SCRIPT"[i] { + z.raw.end-- + goto scriptDataEscaped + } + } + c = z.readByte() + if z.err != nil { + return + } + switch c { + case ' ', '\n', '\r', '\t', '\f', '/', '>': + goto scriptDataDoubleEscaped + } + z.raw.end-- + goto scriptDataEscaped + +scriptDataDoubleEscaped: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '-': + goto scriptDataDoubleEscapedDash + case '<': + goto scriptDataDoubleEscapedLessThanSign + } + goto scriptDataDoubleEscaped + +scriptDataDoubleEscapedDash: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '-': + goto scriptDataDoubleEscapedDashDash + case '<': + goto scriptDataDoubleEscapedLessThanSign + } + goto scriptDataDoubleEscaped + +scriptDataDoubleEscapedDashDash: + c = z.readByte() + if z.err != nil { + return + } + switch c { + case '-': + goto scriptDataDoubleEscapedDashDash + case '<': + goto scriptDataDoubleEscapedLessThanSign + case '>': + goto scriptData + } + goto scriptDataDoubleEscaped + +scriptDataDoubleEscapedLessThanSign: + c = z.readByte() + if z.err != nil { + return + } + if c == '/' { + goto scriptDataDoubleEscapeEnd + } + z.raw.end-- + goto scriptDataDoubleEscaped + +scriptDataDoubleEscapeEnd: + if z.readRawEndTag() { + z.raw.end += len("</script>") + goto scriptDataEscaped + } + if z.err != nil { + return + } + goto scriptDataDoubleEscaped +} + +// readComment reads the next comment token starting with "<!--". The opening +// "<!--" has already been consumed. +func (z *Tokenizer) readComment() { + // When modifying this function, consider manually increasing the + // maxSuffixLen constant in func TestComments, from 6 to e.g. 9 or more. + // That increase should only be temporary, not committed, as it + // exponentially affects the test running time. + + z.data.start = z.raw.end + defer func() { + if z.data.end < z.data.start { + // It's a comment with no data, like <!-->. + z.data.end = z.data.start + } + }() + + var dashCount int + beginning := true + for { + c := z.readByte() + if z.err != nil { + z.data.end = z.calculateAbruptCommentDataEnd() + return + } + switch c { + case '-': + dashCount++ + continue + case '>': + if dashCount >= 2 || beginning { + z.data.end = z.raw.end - len("-->") + return + } + case '!': + if dashCount >= 2 { + c = z.readByte() + if z.err != nil { + z.data.end = z.calculateAbruptCommentDataEnd() + return + } else if c == '>' { + z.data.end = z.raw.end - len("--!>") + return + } else if c == '-' { + dashCount = 1 + beginning = false + continue + } + } + } + dashCount = 0 + beginning = false + } +} + +func (z *Tokenizer) calculateAbruptCommentDataEnd() int { + raw := z.Raw() + const prefixLen = len("<!--") + if len(raw) >= prefixLen { + raw = raw[prefixLen:] + if hasSuffix(raw, "--!") { + return z.raw.end - 3 + } else if hasSuffix(raw, "--") { + return z.raw.end - 2 + } else if hasSuffix(raw, "-") { + return z.raw.end - 1 + } + } + return z.raw.end +} + +func hasSuffix(b []byte, suffix string) bool { + if len(b) < len(suffix) { + return false + } + b = b[len(b)-len(suffix):] + for i := range b { + if b[i] != suffix[i] { + return false + } + } + return true +} + +// readUntilCloseAngle reads until the next ">". +func (z *Tokenizer) readUntilCloseAngle() { + z.data.start = z.raw.end + for { + c := z.readByte() + if z.err != nil { + z.data.end = z.raw.end + return + } + if c == '>' { + z.data.end = z.raw.end - len(">") + return + } + } +} + +// readMarkupDeclaration reads the next token starting with "<!". It might be +// a "<!--comment-->", a "<!DOCTYPE foo>", a "<![CDATA[section]]>" or +// "<!a bogus comment". The opening "<!" has already been consumed. +func (z *Tokenizer) readMarkupDeclaration() TokenType { + z.data.start = z.raw.end + var c [2]byte + for i := 0; i < 2; i++ { + c[i] = z.readByte() + if z.err != nil { + z.data.end = z.raw.end + return CommentToken + } + } + if c[0] == '-' && c[1] == '-' { + z.readComment() + return CommentToken + } + z.raw.end -= 2 + if z.readDoctype() { + return DoctypeToken + } + if z.allowCDATA && z.readCDATA() { + z.convertNUL = true + return TextToken + } + // It's a bogus comment. + z.readUntilCloseAngle() + return CommentToken +} + +// readDoctype attempts to read a doctype declaration and returns true if +// successful. The opening "<!" has already been consumed. +func (z *Tokenizer) readDoctype() bool { + const s = "DOCTYPE" + for i := 0; i < len(s); i++ { + c := z.readByte() + if z.err != nil { + z.data.end = z.raw.end + return false + } + if c != s[i] && c != s[i]+('a'-'A') { + // Back up to read the fragment of "DOCTYPE" again. + z.raw.end = z.data.start + return false + } + } + if z.skipWhiteSpace(); z.err != nil { + z.data.start = z.raw.end + z.data.end = z.raw.end + return true + } + z.readUntilCloseAngle() + return true +} + +// readCDATA attempts to read a CDATA section and returns true if +// successful. The opening "<!" has already been consumed. +func (z *Tokenizer) readCDATA() bool { + const s = "[CDATA[" + for i := 0; i < len(s); i++ { + c := z.readByte() + if z.err != nil { + z.data.end = z.raw.end + return false + } + if c != s[i] { + // Back up to read the fragment of "[CDATA[" again. + z.raw.end = z.data.start + return false + } + } + z.data.start = z.raw.end + brackets := 0 + for { + c := z.readByte() + if z.err != nil { + z.data.end = z.raw.end + return true + } + switch c { + case ']': + brackets++ + case '>': + if brackets >= 2 { + z.data.end = z.raw.end - len("]]>") + return true + } + brackets = 0 + default: + brackets = 0 + } + } +} + +// startTagIn returns whether the start tag in z.buf[z.data.start:z.data.end] +// case-insensitively matches any element of ss. +func (z *Tokenizer) startTagIn(ss ...string) bool { +loop: + for _, s := range ss { + if z.data.end-z.data.start != len(s) { + continue loop + } + for i := 0; i < len(s); i++ { + c := z.buf[z.data.start+i] + if 'A' <= c && c <= 'Z' { + c += 'a' - 'A' + } + if c != s[i] { + continue loop + } + } + return true + } + return false +} + +// readStartTag reads the next start tag token. The opening "<a" has already +// been consumed, where 'a' means anything in [A-Za-z]. +func (z *Tokenizer) readStartTag() TokenType { + z.readTag(true) + if z.err != nil { + return ErrorToken + } + // Several tags flag the tokenizer's next token as raw. + c, raw := z.buf[z.data.start], false + if 'A' <= c && c <= 'Z' { + c += 'a' - 'A' + } + switch c { + case 'i': + raw = z.startTagIn("iframe") + case 'n': + raw = z.startTagIn("noembed", "noframes", "noscript") + case 'p': + raw = z.startTagIn("plaintext") + case 's': + raw = z.startTagIn("script", "style") + case 't': + raw = z.startTagIn("textarea", "title") + case 'x': + raw = z.startTagIn("xmp") + } + if raw { + z.rawTag = strings.ToLower(string(z.buf[z.data.start:z.data.end])) + } + // Look for a self-closing token like "<br/>". + if z.err == nil && z.buf[z.raw.end-2] == '/' { + return SelfClosingTagToken + } + return StartTagToken +} + +// readTag reads the next tag token and its attributes. If saveAttr, those +// attributes are saved in z.attr, otherwise z.attr is set to an empty slice. +// The opening "<a" or "</a" has already been consumed, where 'a' means anything +// in [A-Za-z]. +func (z *Tokenizer) readTag(saveAttr bool) { + z.attr = z.attr[:0] + z.nAttrReturned = 0 + // Read the tag name and attribute key/value pairs. + z.readTagName() + if z.skipWhiteSpace(); z.err != nil { + return + } + for { + c := z.readByte() + if z.err != nil || c == '>' { + break + } + z.raw.end-- + z.readTagAttrKey() + z.readTagAttrVal() + // Save pendingAttr if saveAttr and that attribute has a non-empty key. + if saveAttr && z.pendingAttr[0].start != z.pendingAttr[0].end { + z.attr = append(z.attr, z.pendingAttr) + } + if z.skipWhiteSpace(); z.err != nil { + break + } + } +} + +// readTagName sets z.data to the "div" in "<div k=v>". The reader (z.raw.end) +// is positioned such that the first byte of the tag name (the "d" in "<div") +// has already been consumed. +func (z *Tokenizer) readTagName() { + z.data.start = z.raw.end - 1 + for { + c := z.readByte() + if z.err != nil { + z.data.end = z.raw.end + return + } + switch c { + case ' ', '\n', '\r', '\t', '\f': + z.data.end = z.raw.end - 1 + return + case '/', '>': + z.raw.end-- + z.data.end = z.raw.end + return + } + } +} + +// readTagAttrKey sets z.pendingAttr[0] to the "k" in "<div k=v>". +// Precondition: z.err == nil. +func (z *Tokenizer) readTagAttrKey() { + z.pendingAttr[0].start = z.raw.end + for { + c := z.readByte() + if z.err != nil { + z.pendingAttr[0].end = z.raw.end + return + } + switch c { + case '=': + if z.pendingAttr[0].start+1 == z.raw.end { + // WHATWG 13.2.5.32, if we see an equals sign before the attribute name + // begins, we treat it as a character in the attribute name and continue. + continue + } + fallthrough + case ' ', '\n', '\r', '\t', '\f', '/', '>': + // WHATWG 13.2.5.33 Attribute name state + // We need to reconsume the char in the after attribute name state to support the / character + z.raw.end-- + z.pendingAttr[0].end = z.raw.end + return + } + } +} + +// readTagAttrVal sets z.pendingAttr[1] to the "v" in "<div k=v>". +func (z *Tokenizer) readTagAttrVal() { + z.pendingAttr[1].start = z.raw.end + z.pendingAttr[1].end = z.raw.end + if z.skipWhiteSpace(); z.err != nil { + return + } + c := z.readByte() + if z.err != nil { + return + } + if c == '/' { + // WHATWG 13.2.5.34 After attribute name state + // U+002F SOLIDUS (/) - Switch to the self-closing start tag state. + return + } + if c != '=' { + z.raw.end-- + return + } + if z.skipWhiteSpace(); z.err != nil { + return + } + quote := z.readByte() + if z.err != nil { + return + } + switch quote { + case '>': + z.raw.end-- + return + + case '\'', '"': + z.pendingAttr[1].start = z.raw.end + for { + c := z.readByte() + if z.err != nil { + z.pendingAttr[1].end = z.raw.end + return + } + if c == quote { + z.pendingAttr[1].end = z.raw.end - 1 + return + } + } + + default: + z.pendingAttr[1].start = z.raw.end - 1 + for { + c := z.readByte() + if z.err != nil { + z.pendingAttr[1].end = z.raw.end + return + } + switch c { + case ' ', '\n', '\r', '\t', '\f': + z.pendingAttr[1].end = z.raw.end - 1 + return + case '>': + z.raw.end-- + z.pendingAttr[1].end = z.raw.end + return + } + } + } +} + +// Next scans the next token and returns its type. +func (z *Tokenizer) Next() TokenType { + z.raw.start = z.raw.end + z.data.start = z.raw.end + z.data.end = z.raw.end + if z.err != nil { + z.tt = ErrorToken + return z.tt + } + if z.rawTag != "" { + if z.rawTag == "plaintext" { + // Read everything up to EOF. + for z.err == nil { + z.readByte() + } + z.data.end = z.raw.end + z.textIsRaw = true + } else { + z.readRawOrRCDATA() + } + if z.data.end > z.data.start { + z.tt = TextToken + z.convertNUL = true + return z.tt + } + } + z.textIsRaw = false + z.convertNUL = false + +loop: + for { + c := z.readByte() + if z.err != nil { + break loop + } + if c != '<' { + continue loop + } + + // Check if the '<' we have just read is part of a tag, comment + // or doctype. If not, it's part of the accumulated text token. + c = z.readByte() + if z.err != nil { + break loop + } + var tokenType TokenType + switch { + case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z': + tokenType = StartTagToken + case c == '/': + tokenType = EndTagToken + case c == '!' || c == '?': + // We use CommentToken to mean any of "<!--actual comments-->", + // "<!DOCTYPE declarations>" and "<?xml processing instructions?>". + tokenType = CommentToken + default: + // Reconsume the current character. + z.raw.end-- + continue + } + + // We have a non-text token, but we might have accumulated some text + // before that. If so, we return the text first, and return the non- + // text token on the subsequent call to Next. + if x := z.raw.end - len("<a"); z.raw.start < x { + z.raw.end = x + z.data.end = x + z.tt = TextToken + return z.tt + } + switch tokenType { + case StartTagToken: + z.tt = z.readStartTag() + return z.tt + case EndTagToken: + c = z.readByte() + if z.err != nil { + break loop + } + if c == '>' { + // "</>" does not generate a token at all. Generate an empty comment + // to allow passthrough clients to pick up the data using Raw. + // Reset the tokenizer state and start again. + z.tt = CommentToken + return z.tt + } + if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' { + z.readTag(false) + if z.err != nil { + z.tt = ErrorToken + } else { + z.tt = EndTagToken + } + return z.tt + } + z.raw.end-- + z.readUntilCloseAngle() + z.tt = CommentToken + return z.tt + case CommentToken: + if c == '!' { + z.tt = z.readMarkupDeclaration() + return z.tt + } + z.raw.end-- + z.readUntilCloseAngle() + z.tt = CommentToken + return z.tt + } + } + if z.raw.start < z.raw.end { + z.data.end = z.raw.end + z.tt = TextToken + return z.tt + } + z.tt = ErrorToken + return z.tt +} + +// Raw returns the unmodified text of the current token. Calling Next, Token, +// Text, TagName or TagAttr may change the contents of the returned slice. +// +// The token stream's raw bytes partition the byte stream (up until an +// ErrorToken). There are no overlaps or gaps between two consecutive token's +// raw bytes. One implication is that the byte offset of the current token is +// the sum of the lengths of all previous tokens' raw bytes. +func (z *Tokenizer) Raw() []byte { + return z.buf[z.raw.start:z.raw.end] +} + +// convertNewlines converts "\r" and "\r\n" in s to "\n". +// The conversion happens in place, but the resulting slice may be shorter. +func convertNewlines(s []byte) []byte { + for i, c := range s { + if c != '\r' { + continue + } + + src := i + 1 + if src >= len(s) || s[src] != '\n' { + s[i] = '\n' + continue + } + + dst := i + for src < len(s) { + if s[src] == '\r' { + if src+1 < len(s) && s[src+1] == '\n' { + src++ + } + s[dst] = '\n' + } else { + s[dst] = s[src] + } + src++ + dst++ + } + return s[:dst] + } + return s +} + +var ( + nul = []byte("\x00") + replacement = []byte("\ufffd") +) + +// Text returns the unescaped text of a text, comment or doctype token. The +// contents of the returned slice may change on the next call to Next. +func (z *Tokenizer) Text() []byte { + switch z.tt { + case TextToken, CommentToken, DoctypeToken: + s := z.buf[z.data.start:z.data.end] + z.data.start = z.raw.end + z.data.end = z.raw.end + s = convertNewlines(s) + if (z.convertNUL || z.tt == CommentToken) && bytes.Contains(s, nul) { + s = bytes.Replace(s, nul, replacement, -1) + } + if !z.textIsRaw { + s = unescape(s, false) + } + return s + } + return nil +} + +// TagName returns the lower-cased name of a tag token (the `img` out of +// `<IMG SRC="foo">`) and whether the tag has attributes. +// The contents of the returned slice may change on the next call to Next. +func (z *Tokenizer) TagName() (name []byte, hasAttr bool) { + if z.data.start < z.data.end { + switch z.tt { + case StartTagToken, EndTagToken, SelfClosingTagToken: + s := z.buf[z.data.start:z.data.end] + z.data.start = z.raw.end + z.data.end = z.raw.end + return lower(s), z.nAttrReturned < len(z.attr) + } + } + return nil, false +} + +// TagAttr returns the lower-cased key and unescaped value of the next unparsed +// attribute for the current tag token and whether there are more attributes. +// The contents of the returned slices may change on the next call to Next. +func (z *Tokenizer) TagAttr() (key, val []byte, moreAttr bool) { + if z.nAttrReturned < len(z.attr) { + switch z.tt { + case StartTagToken, SelfClosingTagToken: + x := z.attr[z.nAttrReturned] + z.nAttrReturned++ + key = z.buf[x[0].start:x[0].end] + val = z.buf[x[1].start:x[1].end] + return lower(key), unescape(convertNewlines(val), true), z.nAttrReturned < len(z.attr) + } + } + return nil, nil, false +} + +// Token returns the current Token. The result's Data and Attr values remain +// valid after subsequent Next calls. +func (z *Tokenizer) Token() Token { + t := Token{Type: z.tt} + switch z.tt { + case TextToken, CommentToken, DoctypeToken: + t.Data = string(z.Text()) + case StartTagToken, SelfClosingTagToken, EndTagToken: + name, moreAttr := z.TagName() + for moreAttr { + var key, val []byte + key, val, moreAttr = z.TagAttr() + t.Attr = append(t.Attr, Attribute{"", atom.String(key), string(val)}) + } + if a := atom.Lookup(name); a != 0 { + t.DataAtom, t.Data = a, a.String() + } else { + t.DataAtom, t.Data = 0, string(name) + } + } + return t +} + +// SetMaxBuf sets a limit on the amount of data buffered during tokenization. +// A value of 0 means unlimited. +func (z *Tokenizer) SetMaxBuf(n int) { + z.maxBuf = n +} + +// NewTokenizer returns a new HTML Tokenizer for the given Reader. +// The input is assumed to be UTF-8 encoded. +func NewTokenizer(r io.Reader) *Tokenizer { + return NewTokenizerFragment(r, "") +} + +// NewTokenizerFragment returns a new HTML Tokenizer for the given Reader, for +// tokenizing an existing element's InnerHTML fragment. contextTag is that +// element's tag, such as "div" or "iframe". +// +// For example, how the InnerHTML "a<b" is tokenized depends on whether it is +// for a <p> tag or a <script> tag. +// +// The input is assumed to be UTF-8 encoded. +func NewTokenizerFragment(r io.Reader, contextTag string) *Tokenizer { + z := &Tokenizer{ + r: r, + buf: make([]byte, 0, 4096), + } + if contextTag != "" { + switch s := strings.ToLower(contextTag); s { + case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "title", "textarea", "xmp": + z.rawTag = s + } + } + return z +} diff --git a/vendor/golang.org/x/net/http2/config.go b/vendor/golang.org/x/net/http2/config.go new file mode 100644 index 000000000..de58dfb8d --- /dev/null +++ b/vendor/golang.org/x/net/http2/config.go @@ -0,0 +1,122 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "math" + "net/http" + "time" +) + +// http2Config is a package-internal version of net/http.HTTP2Config. +// +// http.HTTP2Config was added in Go 1.24. +// When running with a version of net/http that includes HTTP2Config, +// we merge the configuration with the fields in Transport or Server +// to produce an http2Config. +// +// Zero valued fields in http2Config are interpreted as in the +// net/http.HTTPConfig documentation. +// +// Precedence order for reconciling configurations is: +// +// - Use the net/http.{Server,Transport}.HTTP2Config value, when non-zero. +// - Otherwise use the http2.{Server.Transport} value. +// - If the resulting value is zero or out of range, use a default. +type http2Config struct { + MaxConcurrentStreams uint32 + MaxDecoderHeaderTableSize uint32 + MaxEncoderHeaderTableSize uint32 + MaxReadFrameSize uint32 + MaxUploadBufferPerConnection int32 + MaxUploadBufferPerStream int32 + SendPingTimeout time.Duration + PingTimeout time.Duration + WriteByteTimeout time.Duration + PermitProhibitedCipherSuites bool + CountError func(errType string) +} + +// configFromServer merges configuration settings from +// net/http.Server.HTTP2Config and http2.Server. +func configFromServer(h1 *http.Server, h2 *Server) http2Config { + conf := http2Config{ + MaxConcurrentStreams: h2.MaxConcurrentStreams, + MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize, + MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize, + MaxReadFrameSize: h2.MaxReadFrameSize, + MaxUploadBufferPerConnection: h2.MaxUploadBufferPerConnection, + MaxUploadBufferPerStream: h2.MaxUploadBufferPerStream, + SendPingTimeout: h2.ReadIdleTimeout, + PingTimeout: h2.PingTimeout, + WriteByteTimeout: h2.WriteByteTimeout, + PermitProhibitedCipherSuites: h2.PermitProhibitedCipherSuites, + CountError: h2.CountError, + } + fillNetHTTPServerConfig(&conf, h1) + setConfigDefaults(&conf, true) + return conf +} + +// configFromServer merges configuration settings from h2 and h2.t1.HTTP2 +// (the net/http Transport). +func configFromTransport(h2 *Transport) http2Config { + conf := http2Config{ + MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize, + MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize, + MaxReadFrameSize: h2.MaxReadFrameSize, + SendPingTimeout: h2.ReadIdleTimeout, + PingTimeout: h2.PingTimeout, + WriteByteTimeout: h2.WriteByteTimeout, + } + + // Unlike most config fields, where out-of-range values revert to the default, + // Transport.MaxReadFrameSize clips. + if conf.MaxReadFrameSize < minMaxFrameSize { + conf.MaxReadFrameSize = minMaxFrameSize + } else if conf.MaxReadFrameSize > maxFrameSize { + conf.MaxReadFrameSize = maxFrameSize + } + + if h2.t1 != nil { + fillNetHTTPTransportConfig(&conf, h2.t1) + } + setConfigDefaults(&conf, false) + return conf +} + +func setDefault[T ~int | ~int32 | ~uint32 | ~int64](v *T, minval, maxval, defval T) { + if *v < minval || *v > maxval { + *v = defval + } +} + +func setConfigDefaults(conf *http2Config, server bool) { + setDefault(&conf.MaxConcurrentStreams, 1, math.MaxUint32, defaultMaxStreams) + setDefault(&conf.MaxEncoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize) + setDefault(&conf.MaxDecoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize) + if server { + setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, 1<<20) + } else { + setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, transportDefaultConnFlow) + } + if server { + setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, 1<<20) + } else { + setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, transportDefaultStreamFlow) + } + setDefault(&conf.MaxReadFrameSize, minMaxFrameSize, maxFrameSize, defaultMaxReadFrameSize) + setDefault(&conf.PingTimeout, 1, math.MaxInt64, 15*time.Second) +} + +// adjustHTTP1MaxHeaderSize converts a limit in bytes on the size of an HTTP/1 header +// to an HTTP/2 MAX_HEADER_LIST_SIZE value. +func adjustHTTP1MaxHeaderSize(n int64) int64 { + // http2's count is in a slightly different unit and includes 32 bytes per pair. + // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. + const perFieldOverhead = 32 // per http2 spec + const typicalHeaders = 10 // conservative + return n + typicalHeaders*perFieldOverhead +} diff --git a/vendor/golang.org/x/net/http2/config_go124.go b/vendor/golang.org/x/net/http2/config_go124.go new file mode 100644 index 000000000..e3784123c --- /dev/null +++ b/vendor/golang.org/x/net/http2/config_go124.go @@ -0,0 +1,61 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.24 + +package http2 + +import "net/http" + +// fillNetHTTPServerConfig sets fields in conf from srv.HTTP2. +func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) { + fillNetHTTPConfig(conf, srv.HTTP2) +} + +// fillNetHTTPServerConfig sets fields in conf from tr.HTTP2. +func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) { + fillNetHTTPConfig(conf, tr.HTTP2) +} + +func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) { + if h2 == nil { + return + } + if h2.MaxConcurrentStreams != 0 { + conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams) + } + if h2.MaxEncoderHeaderTableSize != 0 { + conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize) + } + if h2.MaxDecoderHeaderTableSize != 0 { + conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize) + } + if h2.MaxConcurrentStreams != 0 { + conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams) + } + if h2.MaxReadFrameSize != 0 { + conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize) + } + if h2.MaxReceiveBufferPerConnection != 0 { + conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection) + } + if h2.MaxReceiveBufferPerStream != 0 { + conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream) + } + if h2.SendPingTimeout != 0 { + conf.SendPingTimeout = h2.SendPingTimeout + } + if h2.PingTimeout != 0 { + conf.PingTimeout = h2.PingTimeout + } + if h2.WriteByteTimeout != 0 { + conf.WriteByteTimeout = h2.WriteByteTimeout + } + if h2.PermitProhibitedCipherSuites { + conf.PermitProhibitedCipherSuites = true + } + if h2.CountError != nil { + conf.CountError = h2.CountError + } +} diff --git a/vendor/golang.org/x/net/http2/config_pre_go124.go b/vendor/golang.org/x/net/http2/config_pre_go124.go new file mode 100644 index 000000000..060fd6c64 --- /dev/null +++ b/vendor/golang.org/x/net/http2/config_pre_go124.go @@ -0,0 +1,16 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.24 + +package http2 + +import "net/http" + +// Pre-Go 1.24 fallback. +// The Server.HTTP2 and Transport.HTTP2 config fields were added in Go 1.24. + +func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {} + +func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {} diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 003e649f3..7688c356b 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -19,8 +19,9 @@ import ( "bufio" "context" "crypto/tls" + "errors" "fmt" - "io" + "net" "net/http" "os" "sort" @@ -237,13 +238,19 @@ func (cw closeWaiter) Wait() { // Its buffered writer is lazily allocated as needed, to minimize // idle memory usage with many connections. type bufferedWriter struct { - _ incomparable - w io.Writer // immutable - bw *bufio.Writer // non-nil when data is buffered + _ incomparable + group synctestGroupInterface // immutable + conn net.Conn // immutable + bw *bufio.Writer // non-nil when data is buffered + byteTimeout time.Duration // immutable, WriteByteTimeout } -func newBufferedWriter(w io.Writer) *bufferedWriter { - return &bufferedWriter{w: w} +func newBufferedWriter(group synctestGroupInterface, conn net.Conn, timeout time.Duration) *bufferedWriter { + return &bufferedWriter{ + group: group, + conn: conn, + byteTimeout: timeout, + } } // bufWriterPoolBufferSize is the size of bufio.Writer's @@ -270,7 +277,7 @@ func (w *bufferedWriter) Available() int { func (w *bufferedWriter) Write(p []byte) (n int, err error) { if w.bw == nil { bw := bufWriterPool.Get().(*bufio.Writer) - bw.Reset(w.w) + bw.Reset((*bufferedWriterTimeoutWriter)(w)) w.bw = bw } return w.bw.Write(p) @@ -288,6 +295,38 @@ func (w *bufferedWriter) Flush() error { return err } +type bufferedWriterTimeoutWriter bufferedWriter + +func (w *bufferedWriterTimeoutWriter) Write(p []byte) (n int, err error) { + return writeWithByteTimeout(w.group, w.conn, w.byteTimeout, p) +} + +// writeWithByteTimeout writes to conn. +// If more than timeout passes without any bytes being written to the connection, +// the write fails. +func writeWithByteTimeout(group synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) { + if timeout <= 0 { + return conn.Write(p) + } + for { + var now time.Time + if group == nil { + now = time.Now() + } else { + now = group.Now() + } + conn.SetWriteDeadline(now.Add(timeout)) + nn, err := conn.Write(p[n:]) + n += nn + if n == len(p) || nn == 0 || !errors.Is(err, os.ErrDeadlineExceeded) { + // Either we finished the write, made no progress, or hit the deadline. + // Whichever it is, we're done now. + conn.SetWriteDeadline(time.Time{}) + return n, err + } + } +} + func mustUint31(v int32) uint32 { if v < 0 || v > 2147483647 { panic("out of range") diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 6c349f3ec..617b4a476 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -29,6 +29,7 @@ import ( "bufio" "bytes" "context" + "crypto/rand" "crypto/tls" "errors" "fmt" @@ -52,10 +53,14 @@ import ( ) const ( - prefaceTimeout = 10 * time.Second - firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway - handlerChunkWriteSize = 4 << 10 - defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? + prefaceTimeout = 10 * time.Second + firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway + handlerChunkWriteSize = 4 << 10 + defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? + + // maxQueuedControlFrames is the maximum number of control frames like + // SETTINGS, PING and RST_STREAM that will be queued for writing before + // the connection is closed to prevent memory exhaustion attacks. maxQueuedControlFrames = 10000 ) @@ -127,6 +132,22 @@ type Server struct { // If zero or negative, there is no timeout. IdleTimeout time.Duration + // ReadIdleTimeout is the timeout after which a health check using a ping + // frame will be carried out if no frame is received on the connection. + // If zero, no health check is performed. + ReadIdleTimeout time.Duration + + // PingTimeout is the timeout after which the connection will be closed + // if a response to a ping is not received. + // If zero, a default of 15 seconds is used. + PingTimeout time.Duration + + // WriteByteTimeout is the timeout after which a connection will be + // closed if no data can be written to it. The timeout begins when data is + // available to write, and is extended whenever any bytes are written. + // If zero or negative, there is no timeout. + WriteByteTimeout time.Duration + // MaxUploadBufferPerConnection is the size of the initial flow // control window for each connections. The HTTP/2 spec does not // allow this to be smaller than 65535 or larger than 2^32-1. @@ -189,57 +210,6 @@ func (s *Server) afterFunc(d time.Duration, f func()) timer { return timeTimer{time.AfterFunc(d, f)} } -func (s *Server) initialConnRecvWindowSize() int32 { - if s.MaxUploadBufferPerConnection >= initialWindowSize { - return s.MaxUploadBufferPerConnection - } - return 1 << 20 -} - -func (s *Server) initialStreamRecvWindowSize() int32 { - if s.MaxUploadBufferPerStream > 0 { - return s.MaxUploadBufferPerStream - } - return 1 << 20 -} - -func (s *Server) maxReadFrameSize() uint32 { - if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize { - return v - } - return defaultMaxReadFrameSize -} - -func (s *Server) maxConcurrentStreams() uint32 { - if v := s.MaxConcurrentStreams; v > 0 { - return v - } - return defaultMaxStreams -} - -func (s *Server) maxDecoderHeaderTableSize() uint32 { - if v := s.MaxDecoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - -func (s *Server) maxEncoderHeaderTableSize() uint32 { - if v := s.MaxEncoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - -// maxQueuedControlFrames is the maximum number of control frames like -// SETTINGS, PING and RST_STREAM that will be queued for writing before -// the connection is closed to prevent memory exhaustion attacks. -func (s *Server) maxQueuedControlFrames() int { - // TODO: if anybody asks, add a Server field, and remember to define the - // behavior of negative values. - return maxQueuedControlFrames -} - type serverInternalState struct { mu sync.Mutex activeConns map[*serverConn]struct{} @@ -440,13 +410,15 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon baseCtx, cancel := serverConnBaseContext(c, opts) defer cancel() + http1srv := opts.baseConfig() + conf := configFromServer(http1srv, s) sc := &serverConn{ srv: s, - hs: opts.baseConfig(), + hs: http1srv, conn: c, baseCtx: baseCtx, remoteAddrStr: c.RemoteAddr().String(), - bw: newBufferedWriter(c), + bw: newBufferedWriter(s.group, c, conf.WriteByteTimeout), handler: opts.handler(), streams: make(map[uint32]*stream), readFrameCh: make(chan readFrameResult), @@ -456,9 +428,12 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way doneServing: make(chan struct{}), clientMaxStreams: math.MaxUint32, // Section 6.5.2: "Initially, there is no limit to this value" - advMaxStreams: s.maxConcurrentStreams(), + advMaxStreams: conf.MaxConcurrentStreams, initialStreamSendWindowSize: initialWindowSize, + initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream, maxFrameSize: initialMaxFrameSize, + pingTimeout: conf.PingTimeout, + countErrorFunc: conf.CountError, serveG: newGoroutineLock(), pushEnabled: true, sawClientPreface: opts.SawClientPreface, @@ -491,15 +466,15 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon sc.flow.add(initialWindowSize) sc.inflow.init(initialWindowSize) sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) - sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize()) + sc.hpackEncoder.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize) fr := NewFramer(sc.bw, c) - if s.CountError != nil { - fr.countError = s.CountError + if conf.CountError != nil { + fr.countError = conf.CountError } - fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil) + fr.ReadMetaHeaders = hpack.NewDecoder(conf.MaxDecoderHeaderTableSize, nil) fr.MaxHeaderListSize = sc.maxHeaderListSize() - fr.SetMaxReadFrameSize(s.maxReadFrameSize()) + fr.SetMaxReadFrameSize(conf.MaxReadFrameSize) sc.framer = fr if tc, ok := c.(connectionStater); ok { @@ -532,7 +507,7 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon // So for now, do nothing here again. } - if !s.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { + if !conf.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { // "Endpoints MAY choose to generate a connection error // (Section 5.4.1) of type INADEQUATE_SECURITY if one of // the prohibited cipher suites are negotiated." @@ -569,7 +544,7 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon opts.UpgradeRequest = nil } - sc.serve() + sc.serve(conf) } func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) { @@ -609,6 +584,7 @@ type serverConn struct { tlsState *tls.ConnectionState // shared by all handlers, like net/http remoteAddrStr string writeSched WriteScheduler + countErrorFunc func(errType string) // Everything following is owned by the serve loop; use serveG.check(): serveG goroutineLock // used to verify funcs are on serve() @@ -628,6 +604,7 @@ type serverConn struct { streams map[uint32]*stream unstartedHandlers []unstartedHandler initialStreamSendWindowSize int32 + initialStreamRecvWindowSize int32 maxFrameSize int32 peerMaxHeaderListSize uint32 // zero means unknown (default) canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case @@ -638,9 +615,14 @@ type serverConn struct { inGoAway bool // we've started to or sent GOAWAY inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop needToSendGoAway bool // we need to schedule a GOAWAY frame write + pingSent bool + sentPingData [8]byte goAwayCode ErrCode shutdownTimer timer // nil until used idleTimer timer // nil if unused + readIdleTimeout time.Duration + pingTimeout time.Duration + readIdleTimer timer // nil if unused // Owned by the writeFrameAsync goroutine: headerWriteBuf bytes.Buffer @@ -655,11 +637,7 @@ func (sc *serverConn) maxHeaderListSize() uint32 { if n <= 0 { n = http.DefaultMaxHeaderBytes } - // http2's count is in a slightly different unit and includes 32 bytes per pair. - // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. - const perFieldOverhead = 32 // per http2 spec - const typicalHeaders = 10 // conservative - return uint32(n + typicalHeaders*perFieldOverhead) + return uint32(adjustHTTP1MaxHeaderSize(int64(n))) } func (sc *serverConn) curOpenStreams() uint32 { @@ -923,7 +901,7 @@ func (sc *serverConn) notePanic() { } } -func (sc *serverConn) serve() { +func (sc *serverConn) serve(conf http2Config) { sc.serveG.check() defer sc.notePanic() defer sc.conn.Close() @@ -937,18 +915,18 @@ func (sc *serverConn) serve() { sc.writeFrame(FrameWriteRequest{ write: writeSettings{ - {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, + {SettingMaxFrameSize, conf.MaxReadFrameSize}, {SettingMaxConcurrentStreams, sc.advMaxStreams}, {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, - {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()}, - {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())}, + {SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize}, + {SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)}, }, }) sc.unackedSettings++ // Each connection starts with initialWindowSize inflow tokens. // If a higher value is configured, we add more tokens. - if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 { + if diff := conf.MaxUploadBufferPerConnection - initialWindowSize; diff > 0 { sc.sendWindowUpdate(nil, int(diff)) } @@ -968,11 +946,18 @@ func (sc *serverConn) serve() { defer sc.idleTimer.Stop() } + if conf.SendPingTimeout > 0 { + sc.readIdleTimeout = conf.SendPingTimeout + sc.readIdleTimer = sc.srv.afterFunc(conf.SendPingTimeout, sc.onReadIdleTimer) + defer sc.readIdleTimer.Stop() + } + go sc.readFrames() // closed by defer sc.conn.Close above settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer) defer settingsTimer.Stop() + lastFrameTime := sc.srv.now() loopNum := 0 for { loopNum++ @@ -986,6 +971,7 @@ func (sc *serverConn) serve() { case res := <-sc.wroteFrameCh: sc.wroteFrame(res) case res := <-sc.readFrameCh: + lastFrameTime = sc.srv.now() // Process any written frames before reading new frames from the client since a // written frame could have triggered a new stream to be started. if sc.writingFrameAsync { @@ -1017,6 +1003,8 @@ func (sc *serverConn) serve() { case idleTimerMsg: sc.vlogf("connection is idle") sc.goAway(ErrCodeNo) + case readIdleTimerMsg: + sc.handlePingTimer(lastFrameTime) case shutdownTimerMsg: sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) return @@ -1039,7 +1027,7 @@ func (sc *serverConn) serve() { // If the peer is causing us to generate a lot of control frames, // but not reading them from us, assume they are trying to make us // run out of memory. - if sc.queuedControlFrames > sc.srv.maxQueuedControlFrames() { + if sc.queuedControlFrames > maxQueuedControlFrames { sc.vlogf("http2: too many control frames in send queue, closing connection") return } @@ -1055,12 +1043,39 @@ func (sc *serverConn) serve() { } } +func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { + if sc.pingSent { + sc.vlogf("timeout waiting for PING response") + sc.conn.Close() + return + } + + pingAt := lastFrameReadTime.Add(sc.readIdleTimeout) + now := sc.srv.now() + if pingAt.After(now) { + // We received frames since arming the ping timer. + // Reset it for the next possible timeout. + sc.readIdleTimer.Reset(pingAt.Sub(now)) + return + } + + sc.pingSent = true + // Ignore crypto/rand.Read errors: It generally can't fail, and worse case if it does + // is we send a PING frame containing 0s. + _, _ = rand.Read(sc.sentPingData[:]) + sc.writeFrame(FrameWriteRequest{ + write: &writePing{data: sc.sentPingData}, + }) + sc.readIdleTimer.Reset(sc.pingTimeout) +} + type serverMessage int // Message values sent to serveMsgCh. var ( settingsTimerMsg = new(serverMessage) idleTimerMsg = new(serverMessage) + readIdleTimerMsg = new(serverMessage) shutdownTimerMsg = new(serverMessage) gracefulShutdownMsg = new(serverMessage) handlerDoneMsg = new(serverMessage) @@ -1068,6 +1083,7 @@ var ( func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) } func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) } +func (sc *serverConn) onReadIdleTimer() { sc.sendServeMsg(readIdleTimerMsg) } func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) } func (sc *serverConn) sendServeMsg(msg interface{}) { @@ -1320,6 +1336,10 @@ func (sc *serverConn) wroteFrame(res frameWriteResult) { sc.writingFrame = false sc.writingFrameAsync = false + if res.err != nil { + sc.conn.Close() + } + wr := res.wr if writeEndsStream(wr.write) { @@ -1594,6 +1614,11 @@ func (sc *serverConn) processFrame(f Frame) error { func (sc *serverConn) processPing(f *PingFrame) error { sc.serveG.check() if f.IsAck() { + if sc.pingSent && sc.sentPingData == f.Data { + // This is a response to a PING we sent. + sc.pingSent = false + sc.readIdleTimer.Reset(sc.readIdleTimeout) + } // 6.7 PING: " An endpoint MUST NOT respond to PING frames // containing this flag." return nil @@ -2160,7 +2185,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.cw.Init() st.flow.conn = &sc.flow // link to conn-level counter st.flow.add(sc.initialStreamSendWindowSize) - st.inflow.init(sc.srv.initialStreamRecvWindowSize()) + st.inflow.init(sc.initialStreamRecvWindowSize) if sc.hs.WriteTimeout > 0 { st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } @@ -3301,7 +3326,7 @@ func (sc *serverConn) countError(name string, err error) error { if sc == nil || sc.srv == nil { return err } - f := sc.srv.CountError + f := sc.countErrorFunc if f == nil { return err } diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 61f511f97..0c5f64aa8 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -25,7 +25,6 @@ import ( "net/http" "net/http/httptrace" "net/textproto" - "os" "sort" "strconv" "strings" @@ -227,40 +226,26 @@ func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (co } func (t *Transport) maxHeaderListSize() uint32 { - if t.MaxHeaderListSize == 0 { + n := int64(t.MaxHeaderListSize) + if t.t1 != nil && t.t1.MaxResponseHeaderBytes != 0 { + n = t.t1.MaxResponseHeaderBytes + if n > 0 { + n = adjustHTTP1MaxHeaderSize(n) + } + } + if n <= 0 { return 10 << 20 } - if t.MaxHeaderListSize == 0xffffffff { + if n >= 0xffffffff { return 0 } - return t.MaxHeaderListSize -} - -func (t *Transport) maxFrameReadSize() uint32 { - if t.MaxReadFrameSize == 0 { - return 0 // use the default provided by the peer - } - if t.MaxReadFrameSize < minMaxFrameSize { - return minMaxFrameSize - } - if t.MaxReadFrameSize > maxFrameSize { - return maxFrameSize - } - return t.MaxReadFrameSize + return uint32(n) } func (t *Transport) disableCompression() bool { return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) } -func (t *Transport) pingTimeout() time.Duration { - if t.PingTimeout == 0 { - return 15 * time.Second - } - return t.PingTimeout - -} - // ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. // It returns an error if t1 has already been HTTP/2-enabled. // @@ -370,11 +355,14 @@ type ClientConn struct { lastActive time.Time lastIdle time.Time // time last idle // Settings from peer: (also guarded by wmu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - peerMaxHeaderListSize uint64 - peerMaxHeaderTableSize uint32 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + peerMaxHeaderListSize uint64 + peerMaxHeaderTableSize uint32 + initialWindowSize uint32 + initialStreamRecvWindowSize int32 + readIdleTimeout time.Duration + pingTimeout time.Duration // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. // Write to reqHeaderMu to lock it, read from it to unlock. @@ -499,6 +487,7 @@ func (cs *clientStream) closeReqBodyLocked() { } type stickyErrWriter struct { + group synctestGroupInterface conn net.Conn timeout time.Duration err *error @@ -508,22 +497,9 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) { if *sew.err != nil { return 0, *sew.err } - for { - if sew.timeout != 0 { - sew.conn.SetWriteDeadline(time.Now().Add(sew.timeout)) - } - nn, err := sew.conn.Write(p[n:]) - n += nn - if n < len(p) && nn > 0 && errors.Is(err, os.ErrDeadlineExceeded) { - // Keep extending the deadline so long as we're making progress. - continue - } - if sew.timeout != 0 { - sew.conn.SetWriteDeadline(time.Time{}) - } - *sew.err = err - return n, err - } + n, err = writeWithByteTimeout(sew.group, sew.conn, sew.timeout, p) + *sew.err = err + return n, err } // noCachedConnError is the concrete type of ErrNoCachedConn, which @@ -758,44 +734,36 @@ func (t *Transport) expectContinueTimeout() time.Duration { return t.t1.ExpectContinueTimeout } -func (t *Transport) maxDecoderHeaderTableSize() uint32 { - if v := t.MaxDecoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - -func (t *Transport) maxEncoderHeaderTableSize() uint32 { - if v := t.MaxEncoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { return t.newClientConn(c, t.disableKeepAlives()) } func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { + conf := configFromTransport(t) cc := &ClientConn{ - t: t, - tconn: c, - readerDone: make(chan struct{}), - nextStreamID: 1, - maxFrameSize: 16 << 10, // spec default - initialWindowSize: 65535, // spec default - maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. - peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. - streams: make(map[uint32]*clientStream), - singleUse: singleUse, - wantSettingsAck: true, - pings: make(map[[8]byte]chan struct{}), - reqHeaderMu: make(chan struct{}, 1), - } + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream, + maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. + peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. + streams: make(map[uint32]*clientStream), + singleUse: singleUse, + wantSettingsAck: true, + readIdleTimeout: conf.SendPingTimeout, + pingTimeout: conf.PingTimeout, + pings: make(map[[8]byte]chan struct{}), + reqHeaderMu: make(chan struct{}, 1), + } + var group synctestGroupInterface if t.transportTestHooks != nil { t.markNewGoroutine() t.transportTestHooks.newclientconn(cc) c = cc.tconn + group = t.group } if VerboseLogs { t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr()) @@ -807,24 +775,23 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro // TODO: adjust this writer size to account for frame size + // MTU + crypto/tls record padding. cc.bw = bufio.NewWriter(stickyErrWriter{ + group: group, conn: c, - timeout: t.WriteByteTimeout, + timeout: conf.WriteByteTimeout, err: &cc.werr, }) cc.br = bufio.NewReader(c) cc.fr = NewFramer(cc.bw, cc.br) - if t.maxFrameReadSize() != 0 { - cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize()) - } + cc.fr.SetMaxReadFrameSize(conf.MaxReadFrameSize) if t.CountError != nil { cc.fr.countError = t.CountError } - maxHeaderTableSize := t.maxDecoderHeaderTableSize() + maxHeaderTableSize := conf.MaxDecoderHeaderTableSize cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil) cc.fr.MaxHeaderListSize = t.maxHeaderListSize() cc.henc = hpack.NewEncoder(&cc.hbuf) - cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize()) + cc.henc.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize) cc.peerMaxHeaderTableSize = initialHeaderTableSize if cs, ok := c.(connectionStater); ok { @@ -834,11 +801,9 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro initialSettings := []Setting{ {ID: SettingEnablePush, Val: 0}, - {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, - } - if max := t.maxFrameReadSize(); max != 0 { - initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max}) + {ID: SettingInitialWindowSize, Val: uint32(cc.initialStreamRecvWindowSize)}, } + initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: conf.MaxReadFrameSize}) if max := t.maxHeaderListSize(); max != 0 { initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max}) } @@ -848,8 +813,8 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro cc.bw.Write(clientPreface) cc.fr.WriteSettings(initialSettings...) - cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) - cc.inflow.init(transportDefaultConnFlow + initialWindowSize) + cc.fr.WriteWindowUpdate(0, uint32(conf.MaxUploadBufferPerConnection)) + cc.inflow.init(conf.MaxUploadBufferPerConnection + initialWindowSize) cc.bw.Flush() if cc.werr != nil { cc.Close() @@ -867,7 +832,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro } func (cc *ClientConn) healthCheck() { - pingTimeout := cc.t.pingTimeout() + pingTimeout := cc.pingTimeout // We don't need to periodically ping in the health check, because the readLoop of ClientConn will // trigger the healthCheck again if there is no frame received. ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout) @@ -2199,7 +2164,7 @@ type resAndError struct { func (cc *ClientConn) addStreamLocked(cs *clientStream) { cs.flow.add(int32(cc.initialWindowSize)) cs.flow.setConnFlow(&cc.flow) - cs.inflow.init(transportDefaultStreamFlow) + cs.inflow.init(cc.initialStreamRecvWindowSize) cs.ID = cc.nextStreamID cc.nextStreamID += 2 cc.streams[cs.ID] = cs @@ -2345,7 +2310,7 @@ func (cc *ClientConn) countReadFrameError(err error) { func (rl *clientConnReadLoop) run() error { cc := rl.cc gotSettings := false - readIdleTimeout := cc.t.ReadIdleTimeout + readIdleTimeout := cc.readIdleTimeout var t timer if readIdleTimeout != 0 { t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck) diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go index 33f61398a..6ff6bee7e 100644 --- a/vendor/golang.org/x/net/http2/write.go +++ b/vendor/golang.org/x/net/http2/write.go @@ -131,6 +131,16 @@ func (se StreamError) writeFrame(ctx writeContext) error { func (se StreamError) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max } +type writePing struct { + data [8]byte +} + +func (w writePing) writeFrame(ctx writeContext) error { + return ctx.Framer().WritePing(false, w.data) +} + +func (w writePing) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.data) <= max } + type writePingAck struct{ pf *PingFrame } func (w writePingAck) writeFrame(ctx writeContext) error { diff --git a/vendor/golang.org/x/sys/execabs/execabs.go b/vendor/golang.org/x/sys/execabs/execabs.go new file mode 100644 index 000000000..3bf40fdfe --- /dev/null +++ b/vendor/golang.org/x/sys/execabs/execabs.go @@ -0,0 +1,102 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package execabs is a drop-in replacement for os/exec +// that requires PATH lookups to find absolute paths. +// That is, execabs.Command("cmd") runs the same PATH lookup +// as exec.Command("cmd"), but if the result is a path +// which is relative, the Run and Start methods will report +// an error instead of running the executable. +// +// See https://blog.golang.org/path-security for more information +// about when it may be necessary or appropriate to use this package. +package execabs + +import ( + "context" + "fmt" + "os/exec" + "path/filepath" + "reflect" + "unsafe" +) + +// ErrNotFound is the error resulting if a path search failed to find an executable file. +// It is an alias for exec.ErrNotFound. +var ErrNotFound = exec.ErrNotFound + +// Cmd represents an external command being prepared or run. +// It is an alias for exec.Cmd. +type Cmd = exec.Cmd + +// Error is returned by LookPath when it fails to classify a file as an executable. +// It is an alias for exec.Error. +type Error = exec.Error + +// An ExitError reports an unsuccessful exit by a command. +// It is an alias for exec.ExitError. +type ExitError = exec.ExitError + +func relError(file, path string) error { + return fmt.Errorf("%s resolves to executable in current directory (.%c%s)", file, filepath.Separator, path) +} + +// LookPath searches for an executable named file in the directories +// named by the PATH environment variable. If file contains a slash, +// it is tried directly and the PATH is not consulted. The result will be +// an absolute path. +// +// LookPath differs from exec.LookPath in its handling of PATH lookups, +// which are used for file names without slashes. If exec.LookPath's +// PATH lookup would have returned an executable from the current directory, +// LookPath instead returns an error. +func LookPath(file string) (string, error) { + path, err := exec.LookPath(file) + if err != nil && !isGo119ErrDot(err) { + return "", err + } + if filepath.Base(file) == file && !filepath.IsAbs(path) { + return "", relError(file, path) + } + return path, nil +} + +func fixCmd(name string, cmd *exec.Cmd) { + if filepath.Base(name) == name && !filepath.IsAbs(cmd.Path) && !isGo119ErrFieldSet(cmd) { + // exec.Command was called with a bare binary name and + // exec.LookPath returned a path which is not absolute. + // Set cmd.lookPathErr and clear cmd.Path so that it + // cannot be run. + lookPathErr := (*error)(unsafe.Pointer(reflect.ValueOf(cmd).Elem().FieldByName("lookPathErr").Addr().Pointer())) + if *lookPathErr == nil { + *lookPathErr = relError(name, cmd.Path) + } + cmd.Path = "" + } +} + +// CommandContext is like Command but includes a context. +// +// The provided context is used to kill the process (by calling os.Process.Kill) +// if the context becomes done before the command completes on its own. +func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd { + cmd := exec.CommandContext(ctx, name, arg...) + fixCmd(name, cmd) + return cmd + +} + +// Command returns the Cmd struct to execute the named program with the given arguments. +// See exec.Command for most details. +// +// Command differs from exec.Command in its handling of PATH lookups, +// which are used when the program name contains no slashes. +// If exec.Command would have returned an exec.Cmd configured to run an +// executable from the current directory, Command instead +// returns an exec.Cmd that will return an error from Start or Run. +func Command(name string, arg ...string) *exec.Cmd { + cmd := exec.Command(name, arg...) + fixCmd(name, cmd) + return cmd +} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go118.go b/vendor/golang.org/x/sys/execabs/execabs_go118.go new file mode 100644 index 000000000..5627d70e3 --- /dev/null +++ b/vendor/golang.org/x/sys/execabs/execabs_go118.go @@ -0,0 +1,17 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.19 + +package execabs + +import "os/exec" + +func isGo119ErrDot(err error) bool { + return false +} + +func isGo119ErrFieldSet(cmd *exec.Cmd) bool { + return false +} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go119.go b/vendor/golang.org/x/sys/execabs/execabs_go119.go new file mode 100644 index 000000000..d60ab1b41 --- /dev/null +++ b/vendor/golang.org/x/sys/execabs/execabs_go119.go @@ -0,0 +1,20 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.19 + +package execabs + +import ( + "errors" + "os/exec" +) + +func isGo119ErrDot(err error) bool { + return errors.Is(err, exec.ErrDot) +} + +func isGo119ErrFieldSet(cmd *exec.Cmd) bool { + return cmd.Err != nil +} diff --git a/vendor/golang.org/x/text/encoding/charmap/charmap.go b/vendor/golang.org/x/text/encoding/charmap/charmap.go new file mode 100644 index 000000000..e89ff0734 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/charmap/charmap.go @@ -0,0 +1,249 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run maketables.go + +// Package charmap provides simple character encodings such as IBM Code Page 437 +// and Windows 1252. +package charmap // import "golang.org/x/text/encoding/charmap" + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// These encodings vary only in the way clients should interpret them. Their +// coded character set is identical and a single implementation can be shared. +var ( + // ISO8859_6E is the ISO 8859-6E encoding. + ISO8859_6E encoding.Encoding = &iso8859_6E + + // ISO8859_6I is the ISO 8859-6I encoding. + ISO8859_6I encoding.Encoding = &iso8859_6I + + // ISO8859_8E is the ISO 8859-8E encoding. + ISO8859_8E encoding.Encoding = &iso8859_8E + + // ISO8859_8I is the ISO 8859-8I encoding. + ISO8859_8I encoding.Encoding = &iso8859_8I + + iso8859_6E = internal.Encoding{ + Encoding: ISO8859_6, + Name: "ISO-8859-6E", + MIB: identifier.ISO88596E, + } + + iso8859_6I = internal.Encoding{ + Encoding: ISO8859_6, + Name: "ISO-8859-6I", + MIB: identifier.ISO88596I, + } + + iso8859_8E = internal.Encoding{ + Encoding: ISO8859_8, + Name: "ISO-8859-8E", + MIB: identifier.ISO88598E, + } + + iso8859_8I = internal.Encoding{ + Encoding: ISO8859_8, + Name: "ISO-8859-8I", + MIB: identifier.ISO88598I, + } +) + +// All is a list of all defined encodings in this package. +var All []encoding.Encoding = listAll + +// TODO: implement these encodings, in order of importance. +// ASCII, ISO8859_1: Rather common. Close to Windows 1252. +// ISO8859_9: Close to Windows 1254. + +// utf8Enc holds a rune's UTF-8 encoding in data[:len]. +type utf8Enc struct { + len uint8 + data [3]byte +} + +// Charmap is an 8-bit character set encoding. +type Charmap struct { + // name is the encoding's name. + name string + // mib is the encoding type of this encoder. + mib identifier.MIB + // asciiSuperset states whether the encoding is a superset of ASCII. + asciiSuperset bool + // low is the lower bound of the encoded byte for a non-ASCII rune. If + // Charmap.asciiSuperset is true then this will be 0x80, otherwise 0x00. + low uint8 + // replacement is the encoded replacement character. + replacement byte + // decode is the map from encoded byte to UTF-8. + decode [256]utf8Enc + // encoding is the map from runes to encoded bytes. Each entry is a + // uint32: the high 8 bits are the encoded byte and the low 24 bits are + // the rune. The table entries are sorted by ascending rune. + encode [256]uint32 +} + +// NewDecoder implements the encoding.Encoding interface. +func (m *Charmap) NewDecoder() *encoding.Decoder { + return &encoding.Decoder{Transformer: charmapDecoder{charmap: m}} +} + +// NewEncoder implements the encoding.Encoding interface. +func (m *Charmap) NewEncoder() *encoding.Encoder { + return &encoding.Encoder{Transformer: charmapEncoder{charmap: m}} +} + +// String returns the Charmap's name. +func (m *Charmap) String() string { + return m.name +} + +// ID implements an internal interface. +func (m *Charmap) ID() (mib identifier.MIB, other string) { + return m.mib, "" +} + +// charmapDecoder implements transform.Transformer by decoding to UTF-8. +type charmapDecoder struct { + transform.NopResetter + charmap *Charmap +} + +func (m charmapDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + for i, c := range src { + if m.charmap.asciiSuperset && c < utf8.RuneSelf { + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = c + nDst++ + nSrc = i + 1 + continue + } + + decode := &m.charmap.decode[c] + n := int(decode.len) + if nDst+n > len(dst) { + err = transform.ErrShortDst + break + } + // It's 15% faster to avoid calling copy for these tiny slices. + for j := 0; j < n; j++ { + dst[nDst] = decode.data[j] + nDst++ + } + nSrc = i + 1 + } + return nDst, nSrc, err +} + +// DecodeByte returns the Charmap's rune decoding of the byte b. +func (m *Charmap) DecodeByte(b byte) rune { + switch x := &m.decode[b]; x.len { + case 1: + return rune(x.data[0]) + case 2: + return rune(x.data[0]&0x1f)<<6 | rune(x.data[1]&0x3f) + default: + return rune(x.data[0]&0x0f)<<12 | rune(x.data[1]&0x3f)<<6 | rune(x.data[2]&0x3f) + } +} + +// charmapEncoder implements transform.Transformer by encoding from UTF-8. +type charmapEncoder struct { + transform.NopResetter + charmap *Charmap +} + +func (m charmapEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for nSrc < len(src) { + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + if m.charmap.asciiSuperset { + nSrc++ + dst[nDst] = uint8(r) + nDst++ + continue + } + size = 1 + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + } else { + err = internal.RepertoireError(m.charmap.replacement) + } + break + } + } + + // Binary search in [low, high) for that rune in the m.charmap.encode table. + for low, high := int(m.charmap.low), 0x100; ; { + if low >= high { + err = internal.RepertoireError(m.charmap.replacement) + break loop + } + mid := (low + high) / 2 + got := m.charmap.encode[mid] + gotRune := rune(got & (1<<24 - 1)) + if gotRune < r { + low = mid + 1 + } else if gotRune > r { + high = mid + } else { + dst[nDst] = byte(got >> 24) + nDst++ + break + } + } + nSrc += size + } + return nDst, nSrc, err +} + +// EncodeRune returns the Charmap's byte encoding of the rune r. ok is whether +// r is in the Charmap's repertoire. If not, b is set to the Charmap's +// replacement byte. This is often the ASCII substitute character '\x1a'. +func (m *Charmap) EncodeRune(r rune) (b byte, ok bool) { + if r < utf8.RuneSelf && m.asciiSuperset { + return byte(r), true + } + for low, high := int(m.low), 0x100; ; { + if low >= high { + return m.replacement, false + } + mid := (low + high) / 2 + got := m.encode[mid] + gotRune := rune(got & (1<<24 - 1)) + if gotRune < r { + low = mid + 1 + } else if gotRune > r { + high = mid + } else { + return byte(got >> 24), true + } + } +} diff --git a/vendor/golang.org/x/text/encoding/charmap/tables.go b/vendor/golang.org/x/text/encoding/charmap/tables.go new file mode 100644 index 000000000..cf7281e9e --- /dev/null +++ b/vendor/golang.org/x/text/encoding/charmap/tables.go @@ -0,0 +1,7410 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package charmap + +import ( + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal/identifier" +) + +// CodePage037 is the IBM Code Page 037 encoding. +var CodePage037 *Charmap = &codePage037 + +var codePage037 = Charmap{ + name: "IBM Code Page 037", + mib: identifier.IBM037, + asciiSuperset: false, + low: 0x00, + replacement: 0x3f, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9c, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x86, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x97, 0x00}}, {2, [3]byte{0xc2, 0x8d, 0x00}}, + {2, [3]byte{0xc2, 0x8e, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9d, 0x00}}, {2, [3]byte{0xc2, 0x85, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {2, [3]byte{0xc2, 0x87, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x92, 0x00}}, {2, [3]byte{0xc2, 0x8f, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x80, 0x00}}, {2, [3]byte{0xc2, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0x82, 0x00}}, {2, [3]byte{0xc2, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0x84, 0x00}}, {1, [3]byte{0x0a, 0x00, 0x00}}, + {1, [3]byte{0x17, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x88, 0x00}}, {2, [3]byte{0xc2, 0x89, 0x00}}, + {2, [3]byte{0xc2, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0x8b, 0x00}}, + {2, [3]byte{0xc2, 0x8c, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x90, 0x00}}, {2, [3]byte{0xc2, 0x91, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {2, [3]byte{0xc2, 0x93, 0x00}}, + {2, [3]byte{0xc2, 0x94, 0x00}}, {2, [3]byte{0xc2, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0x96, 0x00}}, {1, [3]byte{0x04, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x98, 0x00}}, {2, [3]byte{0xc2, 0x99, 0x00}}, + {2, [3]byte{0xc2, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9b, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9e, 0x00}}, {1, [3]byte{0x1a, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa4, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa7, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {1, [3]byte{0x2e, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x28, 0x00, 0x00}}, + {1, [3]byte{0x2b, 0x00, 0x00}}, {1, [3]byte{0x7c, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {1, [3]byte{0x21, 0x00, 0x00}}, {1, [3]byte{0x24, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x3b, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xac, 0x00}}, + {1, [3]byte{0x2d, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x84, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {1, [3]byte{0x2c, 0x00, 0x00}}, + {1, [3]byte{0x25, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {1, [3]byte{0x60, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x3d, 0x00, 0x00}}, {1, [3]byte{0x22, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {1, [3]byte{0x6a, 0x00, 0x00}}, + {1, [3]byte{0x6b, 0x00, 0x00}}, {1, [3]byte{0x6c, 0x00, 0x00}}, + {1, [3]byte{0x6d, 0x00, 0x00}}, {1, [3]byte{0x6e, 0x00, 0x00}}, + {1, [3]byte{0x6f, 0x00, 0x00}}, {1, [3]byte{0x70, 0x00, 0x00}}, + {1, [3]byte{0x71, 0x00, 0x00}}, {1, [3]byte{0x72, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {1, [3]byte{0x7e, 0x00, 0x00}}, + {1, [3]byte{0x73, 0x00, 0x00}}, {1, [3]byte{0x74, 0x00, 0x00}}, + {1, [3]byte{0x75, 0x00, 0x00}}, {1, [3]byte{0x76, 0x00, 0x00}}, + {1, [3]byte{0x77, 0x00, 0x00}}, {1, [3]byte{0x78, 0x00, 0x00}}, + {1, [3]byte{0x79, 0x00, 0x00}}, {1, [3]byte{0x7a, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xa1, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc2, 0xae, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa5, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xa9, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xbc, 0x00}}, + {2, [3]byte{0xc2, 0xbd, 0x00}}, {2, [3]byte{0xc2, 0xbe, 0x00}}, + {1, [3]byte{0x5b, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xaf, 0x00}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {1, [3]byte{0x7b, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {1, [3]byte{0x7d, 0x00, 0x00}}, {1, [3]byte{0x4a, 0x00, 0x00}}, + {1, [3]byte{0x4b, 0x00, 0x00}}, {1, [3]byte{0x4c, 0x00, 0x00}}, + {1, [3]byte{0x4d, 0x00, 0x00}}, {1, [3]byte{0x4e, 0x00, 0x00}}, + {1, [3]byte{0x4f, 0x00, 0x00}}, {1, [3]byte{0x50, 0x00, 0x00}}, + {1, [3]byte{0x51, 0x00, 0x00}}, {1, [3]byte{0x52, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb9, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {1, [3]byte{0x53, 0x00, 0x00}}, {1, [3]byte{0x54, 0x00, 0x00}}, + {1, [3]byte{0x55, 0x00, 0x00}}, {1, [3]byte{0x56, 0x00, 0x00}}, + {1, [3]byte{0x57, 0x00, 0x00}}, {1, [3]byte{0x58, 0x00, 0x00}}, + {1, [3]byte{0x59, 0x00, 0x00}}, {1, [3]byte{0x5a, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0x94, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9f, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x37000004, 0x2d000005, 0x2e000006, 0x2f000007, + 0x16000008, 0x05000009, 0x2500000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x3c000014, 0x3d000015, 0x32000016, 0x26000017, + 0x18000018, 0x19000019, 0x3f00001a, 0x2700001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x40000020, 0x5a000021, 0x7f000022, 0x7b000023, 0x5b000024, 0x6c000025, 0x50000026, 0x7d000027, + 0x4d000028, 0x5d000029, 0x5c00002a, 0x4e00002b, 0x6b00002c, 0x6000002d, 0x4b00002e, 0x6100002f, + 0xf0000030, 0xf1000031, 0xf2000032, 0xf3000033, 0xf4000034, 0xf5000035, 0xf6000036, 0xf7000037, + 0xf8000038, 0xf9000039, 0x7a00003a, 0x5e00003b, 0x4c00003c, 0x7e00003d, 0x6e00003e, 0x6f00003f, + 0x7c000040, 0xc1000041, 0xc2000042, 0xc3000043, 0xc4000044, 0xc5000045, 0xc6000046, 0xc7000047, + 0xc8000048, 0xc9000049, 0xd100004a, 0xd200004b, 0xd300004c, 0xd400004d, 0xd500004e, 0xd600004f, + 0xd7000050, 0xd8000051, 0xd9000052, 0xe2000053, 0xe3000054, 0xe4000055, 0xe5000056, 0xe6000057, + 0xe7000058, 0xe8000059, 0xe900005a, 0xba00005b, 0xe000005c, 0xbb00005d, 0xb000005e, 0x6d00005f, + 0x79000060, 0x81000061, 0x82000062, 0x83000063, 0x84000064, 0x85000065, 0x86000066, 0x87000067, + 0x88000068, 0x89000069, 0x9100006a, 0x9200006b, 0x9300006c, 0x9400006d, 0x9500006e, 0x9600006f, + 0x97000070, 0x98000071, 0x99000072, 0xa2000073, 0xa3000074, 0xa4000075, 0xa5000076, 0xa6000077, + 0xa7000078, 0xa8000079, 0xa900007a, 0xc000007b, 0x4f00007c, 0xd000007d, 0xa100007e, 0x0700007f, + 0x20000080, 0x21000081, 0x22000082, 0x23000083, 0x24000084, 0x15000085, 0x06000086, 0x17000087, + 0x28000088, 0x29000089, 0x2a00008a, 0x2b00008b, 0x2c00008c, 0x0900008d, 0x0a00008e, 0x1b00008f, + 0x30000090, 0x31000091, 0x1a000092, 0x33000093, 0x34000094, 0x35000095, 0x36000096, 0x08000097, + 0x38000098, 0x39000099, 0x3a00009a, 0x3b00009b, 0x0400009c, 0x1400009d, 0x3e00009e, 0xff00009f, + 0x410000a0, 0xaa0000a1, 0x4a0000a2, 0xb10000a3, 0x9f0000a4, 0xb20000a5, 0x6a0000a6, 0xb50000a7, + 0xbd0000a8, 0xb40000a9, 0x9a0000aa, 0x8a0000ab, 0x5f0000ac, 0xca0000ad, 0xaf0000ae, 0xbc0000af, + 0x900000b0, 0x8f0000b1, 0xea0000b2, 0xfa0000b3, 0xbe0000b4, 0xa00000b5, 0xb60000b6, 0xb30000b7, + 0x9d0000b8, 0xda0000b9, 0x9b0000ba, 0x8b0000bb, 0xb70000bc, 0xb80000bd, 0xb90000be, 0xab0000bf, + 0x640000c0, 0x650000c1, 0x620000c2, 0x660000c3, 0x630000c4, 0x670000c5, 0x9e0000c6, 0x680000c7, + 0x740000c8, 0x710000c9, 0x720000ca, 0x730000cb, 0x780000cc, 0x750000cd, 0x760000ce, 0x770000cf, + 0xac0000d0, 0x690000d1, 0xed0000d2, 0xee0000d3, 0xeb0000d4, 0xef0000d5, 0xec0000d6, 0xbf0000d7, + 0x800000d8, 0xfd0000d9, 0xfe0000da, 0xfb0000db, 0xfc0000dc, 0xad0000dd, 0xae0000de, 0x590000df, + 0x440000e0, 0x450000e1, 0x420000e2, 0x460000e3, 0x430000e4, 0x470000e5, 0x9c0000e6, 0x480000e7, + 0x540000e8, 0x510000e9, 0x520000ea, 0x530000eb, 0x580000ec, 0x550000ed, 0x560000ee, 0x570000ef, + 0x8c0000f0, 0x490000f1, 0xcd0000f2, 0xce0000f3, 0xcb0000f4, 0xcf0000f5, 0xcc0000f6, 0xe10000f7, + 0x700000f8, 0xdd0000f9, 0xde0000fa, 0xdb0000fb, 0xdc0000fc, 0x8d0000fd, 0x8e0000fe, 0xdf0000ff, + }, +} + +// CodePage437 is the IBM Code Page 437 encoding. +var CodePage437 *Charmap = &codePage437 + +var codePage437 = Charmap{ + name: "IBM Code Page 437", + mib: identifier.PC8CodePage437, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa5, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0xa2, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xa7}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0x90}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}}, + {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}}, + {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}}, + {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}}, + {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}}, + {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}}, + {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}}, + {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}}, + {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xad0000a1, 0x9b0000a2, 0x9c0000a3, 0x9d0000a5, 0xa60000aa, 0xae0000ab, 0xaa0000ac, + 0xf80000b0, 0xf10000b1, 0xfd0000b2, 0xe60000b5, 0xfa0000b7, 0xa70000ba, 0xaf0000bb, 0xac0000bc, + 0xab0000bd, 0xa80000bf, 0x8e0000c4, 0x8f0000c5, 0x920000c6, 0x800000c7, 0x900000c9, 0xa50000d1, + 0x990000d6, 0x9a0000dc, 0xe10000df, 0x850000e0, 0xa00000e1, 0x830000e2, 0x840000e4, 0x860000e5, + 0x910000e6, 0x870000e7, 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8d0000ec, 0xa10000ed, + 0x8c0000ee, 0x8b0000ef, 0xa40000f1, 0x950000f2, 0xa20000f3, 0x930000f4, 0x940000f6, 0xf60000f7, + 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0x980000ff, 0x9f000192, 0xe2000393, 0xe9000398, + 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, 0xe50003c3, + 0xe70003c4, 0xed0003c6, 0xfc00207f, 0x9e0020a7, 0xf9002219, 0xfb00221a, 0xec00221e, 0xef002229, + 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xa9002310, 0xf4002320, 0xf5002321, 0xc4002500, + 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, + 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555, + 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d, + 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565, + 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580, + 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage850 is the IBM Code Page 850 encoding. +var CodePage850 *Charmap = &codePage850 + +var codePage850 = Charmap{ + name: "IBM Code Page 850", + mib: identifier.PC850Multilingual, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa5, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x98, 0x00}}, + {2, [3]byte{0xc3, 0x97, 0x00}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {2, [3]byte{0xc2, 0xae, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x80, 0x00}}, + {2, [3]byte{0xc2, 0xa9, 0x00}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {2, [3]byte{0xc2, 0xa2, 0x00}}, + {2, [3]byte{0xc2, 0xa5, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0x90, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc4, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0x8e, 0x00}}, + {2, [3]byte{0xc3, 0x8f, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {2, [3]byte{0xc2, 0xa6, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0xbe, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9a, 0x00}}, + {2, [3]byte{0xc3, 0x9b, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0xbd, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc2, 0xaf, 0x00}}, {2, [3]byte{0xc2, 0xb4, 0x00}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x97}}, {2, [3]byte{0xc2, 0xbe, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xad0000a1, 0xbd0000a2, 0x9c0000a3, 0xcf0000a4, 0xbe0000a5, 0xdd0000a6, 0xf50000a7, + 0xf90000a8, 0xb80000a9, 0xa60000aa, 0xae0000ab, 0xaa0000ac, 0xf00000ad, 0xa90000ae, 0xee0000af, + 0xf80000b0, 0xf10000b1, 0xfd0000b2, 0xfc0000b3, 0xef0000b4, 0xe60000b5, 0xf40000b6, 0xfa0000b7, + 0xf70000b8, 0xfb0000b9, 0xa70000ba, 0xaf0000bb, 0xac0000bc, 0xab0000bd, 0xf30000be, 0xa80000bf, + 0xb70000c0, 0xb50000c1, 0xb60000c2, 0xc70000c3, 0x8e0000c4, 0x8f0000c5, 0x920000c6, 0x800000c7, + 0xd40000c8, 0x900000c9, 0xd20000ca, 0xd30000cb, 0xde0000cc, 0xd60000cd, 0xd70000ce, 0xd80000cf, + 0xd10000d0, 0xa50000d1, 0xe30000d2, 0xe00000d3, 0xe20000d4, 0xe50000d5, 0x990000d6, 0x9e0000d7, + 0x9d0000d8, 0xeb0000d9, 0xe90000da, 0xea0000db, 0x9a0000dc, 0xed0000dd, 0xe80000de, 0xe10000df, + 0x850000e0, 0xa00000e1, 0x830000e2, 0xc60000e3, 0x840000e4, 0x860000e5, 0x910000e6, 0x870000e7, + 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8d0000ec, 0xa10000ed, 0x8c0000ee, 0x8b0000ef, + 0xd00000f0, 0xa40000f1, 0x950000f2, 0xa20000f3, 0x930000f4, 0xe40000f5, 0x940000f6, 0xf60000f7, + 0x9b0000f8, 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0xec0000fd, 0xe70000fe, 0x980000ff, + 0xd5000131, 0x9f000192, 0xf2002017, 0xc4002500, 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, + 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, + 0xc9002554, 0xbb002557, 0xc800255a, 0xbc00255d, 0xcc002560, 0xb9002563, 0xcb002566, 0xca002569, + 0xce00256c, 0xdf002580, 0xdc002584, 0xdb002588, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage852 is the IBM Code Page 852 encoding. +var CodePage852 *Charmap = &codePage852 + +var codePage852 = Charmap{ + name: "IBM Code Page 852", + mib: identifier.PCp852, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc5, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc5, 0x82, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc5, 0x90, 0x00}}, {2, [3]byte{0xc5, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc5, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc4, 0x86, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc4, 0xb9, 0x00}}, + {2, [3]byte{0xc4, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc4, 0xbd, 0x00}}, + {2, [3]byte{0xc4, 0xbe, 0x00}}, {2, [3]byte{0xc5, 0x9a, 0x00}}, + {2, [3]byte{0xc5, 0x9b, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc5, 0xa4, 0x00}}, + {2, [3]byte{0xc5, 0xa5, 0x00}}, {2, [3]byte{0xc5, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x97, 0x00}}, {2, [3]byte{0xc4, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc4, 0x84, 0x00}}, {2, [3]byte{0xc4, 0x85, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc5, 0xbe, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc4, 0x99, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc5, 0xba, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc5, 0x9f, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc4, 0x9a, 0x00}}, + {2, [3]byte{0xc5, 0x9e, 0x00}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0xbc, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {2, [3]byte{0xc4, 0x82, 0x00}}, {2, [3]byte{0xc4, 0x83, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {2, [3]byte{0xc4, 0x91, 0x00}}, {2, [3]byte{0xc4, 0x90, 0x00}}, + {2, [3]byte{0xc4, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x8f, 0x00}}, {2, [3]byte{0xc5, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0x8e, 0x00}}, + {2, [3]byte{0xc4, 0x9b, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {2, [3]byte{0xc5, 0xa2, 0x00}}, + {2, [3]byte{0xc5, 0xae, 0x00}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc5, 0x83, 0x00}}, + {2, [3]byte{0xc5, 0x84, 0x00}}, {2, [3]byte{0xc5, 0x88, 0x00}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {2, [3]byte{0xc5, 0xa1, 0x00}}, + {2, [3]byte{0xc5, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x9a, 0x00}}, + {2, [3]byte{0xc5, 0x95, 0x00}}, {2, [3]byte{0xc5, 0xb0, 0x00}}, + {2, [3]byte{0xc3, 0xbd, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc5, 0xa3, 0x00}}, {2, [3]byte{0xc2, 0xb4, 0x00}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xcb, 0x9d, 0x00}}, + {2, [3]byte{0xcb, 0x9b, 0x00}}, {2, [3]byte{0xcb, 0x87, 0x00}}, + {2, [3]byte{0xcb, 0x98, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xcb, 0x99, 0x00}}, {2, [3]byte{0xc5, 0xb1, 0x00}}, + {2, [3]byte{0xc5, 0x98, 0x00}}, {2, [3]byte{0xc5, 0x99, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xcf0000a4, 0xf50000a7, 0xf90000a8, 0xae0000ab, 0xaa0000ac, 0xf00000ad, 0xf80000b0, + 0xef0000b4, 0xf70000b8, 0xaf0000bb, 0xb50000c1, 0xb60000c2, 0x8e0000c4, 0x800000c7, 0x900000c9, + 0xd30000cb, 0xd60000cd, 0xd70000ce, 0xe00000d3, 0xe20000d4, 0x990000d6, 0x9e0000d7, 0xe90000da, + 0x9a0000dc, 0xed0000dd, 0xe10000df, 0xa00000e1, 0x830000e2, 0x840000e4, 0x870000e7, 0x820000e9, + 0x890000eb, 0xa10000ed, 0x8c0000ee, 0xa20000f3, 0x930000f4, 0x940000f6, 0xf60000f7, 0xa30000fa, + 0x810000fc, 0xec0000fd, 0xc6000102, 0xc7000103, 0xa4000104, 0xa5000105, 0x8f000106, 0x86000107, + 0xac00010c, 0x9f00010d, 0xd200010e, 0xd400010f, 0xd1000110, 0xd0000111, 0xa8000118, 0xa9000119, + 0xb700011a, 0xd800011b, 0x91000139, 0x9200013a, 0x9500013d, 0x9600013e, 0x9d000141, 0x88000142, + 0xe3000143, 0xe4000144, 0xd5000147, 0xe5000148, 0x8a000150, 0x8b000151, 0xe8000154, 0xea000155, + 0xfc000158, 0xfd000159, 0x9700015a, 0x9800015b, 0xb800015e, 0xad00015f, 0xe6000160, 0xe7000161, + 0xdd000162, 0xee000163, 0x9b000164, 0x9c000165, 0xde00016e, 0x8500016f, 0xeb000170, 0xfb000171, + 0x8d000179, 0xab00017a, 0xbd00017b, 0xbe00017c, 0xa600017d, 0xa700017e, 0xf30002c7, 0xf40002d8, + 0xfa0002d9, 0xf20002db, 0xf10002dd, 0xc4002500, 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, + 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, + 0xc9002554, 0xbb002557, 0xc800255a, 0xbc00255d, 0xcc002560, 0xb9002563, 0xcb002566, 0xca002569, + 0xce00256c, 0xdf002580, 0xdc002584, 0xdb002588, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage855 is the IBM Code Page 855 encoding. +var CodePage855 *Charmap = &codePage855 + +var codePage855 = Charmap{ + name: "IBM Code Page 855", + mib: identifier.IBM855, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xd1, 0x92, 0x00}}, {2, [3]byte{0xd0, 0x82, 0x00}}, + {2, [3]byte{0xd1, 0x93, 0x00}}, {2, [3]byte{0xd0, 0x83, 0x00}}, + {2, [3]byte{0xd1, 0x91, 0x00}}, {2, [3]byte{0xd0, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x84, 0x00}}, + {2, [3]byte{0xd1, 0x95, 0x00}}, {2, [3]byte{0xd0, 0x85, 0x00}}, + {2, [3]byte{0xd1, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x86, 0x00}}, + {2, [3]byte{0xd1, 0x97, 0x00}}, {2, [3]byte{0xd0, 0x87, 0x00}}, + {2, [3]byte{0xd1, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x88, 0x00}}, + {2, [3]byte{0xd1, 0x99, 0x00}}, {2, [3]byte{0xd0, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x9a, 0x00}}, {2, [3]byte{0xd0, 0x8a, 0x00}}, + {2, [3]byte{0xd1, 0x9b, 0x00}}, {2, [3]byte{0xd0, 0x8b, 0x00}}, + {2, [3]byte{0xd1, 0x9c, 0x00}}, {2, [3]byte{0xd0, 0x8c, 0x00}}, + {2, [3]byte{0xd1, 0x9e, 0x00}}, {2, [3]byte{0xd0, 0x8e, 0x00}}, + {2, [3]byte{0xd1, 0x9f, 0x00}}, {2, [3]byte{0xd0, 0x8f, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {2, [3]byte{0xd0, 0xae, 0x00}}, + {2, [3]byte{0xd1, 0x8a, 0x00}}, {2, [3]byte{0xd0, 0xaa, 0x00}}, + {2, [3]byte{0xd0, 0xb0, 0x00}}, {2, [3]byte{0xd0, 0x90, 0x00}}, + {2, [3]byte{0xd0, 0xb1, 0x00}}, {2, [3]byte{0xd0, 0x91, 0x00}}, + {2, [3]byte{0xd1, 0x86, 0x00}}, {2, [3]byte{0xd0, 0xa6, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0x94, 0x00}}, + {2, [3]byte{0xd0, 0xb5, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd0, 0xa4, 0x00}}, + {2, [3]byte{0xd0, 0xb3, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {2, [3]byte{0xd1, 0x85, 0x00}}, + {2, [3]byte{0xd0, 0xa5, 0x00}}, {2, [3]byte{0xd0, 0xb8, 0x00}}, + {2, [3]byte{0xd0, 0x98, 0x00}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {2, [3]byte{0xd0, 0xb9, 0x00}}, + {2, [3]byte{0xd0, 0x99, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {2, [3]byte{0xd0, 0xba, 0x00}}, {2, [3]byte{0xd0, 0x9a, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {2, [3]byte{0xd0, 0xbb, 0x00}}, {2, [3]byte{0xd0, 0x9b, 0x00}}, + {2, [3]byte{0xd0, 0xbc, 0x00}}, {2, [3]byte{0xd0, 0x9c, 0x00}}, + {2, [3]byte{0xd0, 0xbd, 0x00}}, {2, [3]byte{0xd0, 0x9d, 0x00}}, + {2, [3]byte{0xd0, 0xbe, 0x00}}, {2, [3]byte{0xd0, 0x9e, 0x00}}, + {2, [3]byte{0xd0, 0xbf, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {2, [3]byte{0xd0, 0x9f, 0x00}}, + {2, [3]byte{0xd1, 0x8f, 0x00}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xd0, 0xaf, 0x00}}, {2, [3]byte{0xd1, 0x80, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd0, 0xa1, 0x00}}, {2, [3]byte{0xd1, 0x82, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd0, 0xa3, 0x00}}, {2, [3]byte{0xd0, 0xb6, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0xb2, 0x00}}, + {2, [3]byte{0xd0, 0x92, 0x00}}, {2, [3]byte{0xd1, 0x8c, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {3, [3]byte{0xe2, 0x84, 0x96}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd0, 0xab, 0x00}}, {2, [3]byte{0xd0, 0xb7, 0x00}}, + {2, [3]byte{0xd0, 0x97, 0x00}}, {2, [3]byte{0xd1, 0x88, 0x00}}, + {2, [3]byte{0xd0, 0xa8, 0x00}}, {2, [3]byte{0xd1, 0x8d, 0x00}}, + {2, [3]byte{0xd0, 0xad, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd0, 0xa9, 0x00}}, {2, [3]byte{0xd1, 0x87, 0x00}}, + {2, [3]byte{0xd0, 0xa7, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xcf0000a4, 0xfd0000a7, 0xae0000ab, 0xf00000ad, 0xaf0000bb, 0x85000401, 0x81000402, + 0x83000403, 0x87000404, 0x89000405, 0x8b000406, 0x8d000407, 0x8f000408, 0x91000409, 0x9300040a, + 0x9500040b, 0x9700040c, 0x9900040e, 0x9b00040f, 0xa1000410, 0xa3000411, 0xec000412, 0xad000413, + 0xa7000414, 0xa9000415, 0xea000416, 0xf4000417, 0xb8000418, 0xbe000419, 0xc700041a, 0xd100041b, + 0xd300041c, 0xd500041d, 0xd700041e, 0xdd00041f, 0xe2000420, 0xe4000421, 0xe6000422, 0xe8000423, + 0xab000424, 0xb6000425, 0xa5000426, 0xfc000427, 0xf6000428, 0xfa000429, 0x9f00042a, 0xf200042b, + 0xee00042c, 0xf800042d, 0x9d00042e, 0xe000042f, 0xa0000430, 0xa2000431, 0xeb000432, 0xac000433, + 0xa6000434, 0xa8000435, 0xe9000436, 0xf3000437, 0xb7000438, 0xbd000439, 0xc600043a, 0xd000043b, + 0xd200043c, 0xd400043d, 0xd600043e, 0xd800043f, 0xe1000440, 0xe3000441, 0xe5000442, 0xe7000443, + 0xaa000444, 0xb5000445, 0xa4000446, 0xfb000447, 0xf5000448, 0xf9000449, 0x9e00044a, 0xf100044b, + 0xed00044c, 0xf700044d, 0x9c00044e, 0xde00044f, 0x84000451, 0x80000452, 0x82000453, 0x86000454, + 0x88000455, 0x8a000456, 0x8c000457, 0x8e000458, 0x90000459, 0x9200045a, 0x9400045b, 0x9600045c, + 0x9800045e, 0x9a00045f, 0xef002116, 0xc4002500, 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, + 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, + 0xc9002554, 0xbb002557, 0xc800255a, 0xbc00255d, 0xcc002560, 0xb9002563, 0xcb002566, 0xca002569, + 0xce00256c, 0xdf002580, 0xdc002584, 0xdb002588, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage858 is the Windows Code Page 858 encoding. +var CodePage858 *Charmap = &codePage858 + +var codePage858 = Charmap{ + name: "Windows Code Page 858", + mib: identifier.IBM00858, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa5, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x98, 0x00}}, + {2, [3]byte{0xc3, 0x97, 0x00}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {2, [3]byte{0xc2, 0xae, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x80, 0x00}}, + {2, [3]byte{0xc2, 0xa9, 0x00}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {2, [3]byte{0xc2, 0xa2, 0x00}}, + {2, [3]byte{0xc2, 0xa5, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0x90, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {3, [3]byte{0xe2, 0x82, 0xac}}, + {2, [3]byte{0xc3, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0x8e, 0x00}}, + {2, [3]byte{0xc3, 0x8f, 0x00}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {2, [3]byte{0xc2, 0xa6, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0xbe, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9a, 0x00}}, + {2, [3]byte{0xc3, 0x9b, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0xbd, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc2, 0xaf, 0x00}}, {2, [3]byte{0xc2, 0xb4, 0x00}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x97}}, {2, [3]byte{0xc2, 0xbe, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xad0000a1, 0xbd0000a2, 0x9c0000a3, 0xcf0000a4, 0xbe0000a5, 0xdd0000a6, 0xf50000a7, + 0xf90000a8, 0xb80000a9, 0xa60000aa, 0xae0000ab, 0xaa0000ac, 0xf00000ad, 0xa90000ae, 0xee0000af, + 0xf80000b0, 0xf10000b1, 0xfd0000b2, 0xfc0000b3, 0xef0000b4, 0xe60000b5, 0xf40000b6, 0xfa0000b7, + 0xf70000b8, 0xfb0000b9, 0xa70000ba, 0xaf0000bb, 0xac0000bc, 0xab0000bd, 0xf30000be, 0xa80000bf, + 0xb70000c0, 0xb50000c1, 0xb60000c2, 0xc70000c3, 0x8e0000c4, 0x8f0000c5, 0x920000c6, 0x800000c7, + 0xd40000c8, 0x900000c9, 0xd20000ca, 0xd30000cb, 0xde0000cc, 0xd60000cd, 0xd70000ce, 0xd80000cf, + 0xd10000d0, 0xa50000d1, 0xe30000d2, 0xe00000d3, 0xe20000d4, 0xe50000d5, 0x990000d6, 0x9e0000d7, + 0x9d0000d8, 0xeb0000d9, 0xe90000da, 0xea0000db, 0x9a0000dc, 0xed0000dd, 0xe80000de, 0xe10000df, + 0x850000e0, 0xa00000e1, 0x830000e2, 0xc60000e3, 0x840000e4, 0x860000e5, 0x910000e6, 0x870000e7, + 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8d0000ec, 0xa10000ed, 0x8c0000ee, 0x8b0000ef, + 0xd00000f0, 0xa40000f1, 0x950000f2, 0xa20000f3, 0x930000f4, 0xe40000f5, 0x940000f6, 0xf60000f7, + 0x9b0000f8, 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0xec0000fd, 0xe70000fe, 0x980000ff, + 0x9f000192, 0xf2002017, 0xd50020ac, 0xc4002500, 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, + 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, + 0xc9002554, 0xbb002557, 0xc800255a, 0xbc00255d, 0xcc002560, 0xb9002563, 0xcb002566, 0xca002569, + 0xce00256c, 0xdf002580, 0xdc002584, 0xdb002588, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage860 is the IBM Code Page 860 encoding. +var CodePage860 *Charmap = &codePage860 + +var codePage860 = Charmap{ + name: "IBM Code Page 860", + mib: identifier.IBM860, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0x81, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0x8a, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}}, + {2, [3]byte{0xc3, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x82, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0x80, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0xa2, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xa7}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}}, + {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}}, + {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}}, + {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}}, + {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}}, + {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}}, + {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}}, + {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}}, + {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xad0000a1, 0x9b0000a2, 0x9c0000a3, 0xa60000aa, 0xae0000ab, 0xaa0000ac, 0xf80000b0, + 0xf10000b1, 0xfd0000b2, 0xe60000b5, 0xfa0000b7, 0xa70000ba, 0xaf0000bb, 0xac0000bc, 0xab0000bd, + 0xa80000bf, 0x910000c0, 0x860000c1, 0x8f0000c2, 0x8e0000c3, 0x800000c7, 0x920000c8, 0x900000c9, + 0x890000ca, 0x980000cc, 0x8b0000cd, 0xa50000d1, 0xa90000d2, 0x9f0000d3, 0x8c0000d4, 0x990000d5, + 0x9d0000d9, 0x960000da, 0x9a0000dc, 0xe10000df, 0x850000e0, 0xa00000e1, 0x830000e2, 0x840000e3, + 0x870000e7, 0x8a0000e8, 0x820000e9, 0x880000ea, 0x8d0000ec, 0xa10000ed, 0xa40000f1, 0x950000f2, + 0xa20000f3, 0x930000f4, 0x940000f5, 0xf60000f7, 0x970000f9, 0xa30000fa, 0x810000fc, 0xe2000393, + 0xe9000398, 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, + 0xe50003c3, 0xe70003c4, 0xed0003c6, 0xfc00207f, 0x9e0020a7, 0xf9002219, 0xfb00221a, 0xec00221e, + 0xef002229, 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xf4002320, 0xf5002321, 0xc4002500, + 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, + 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555, + 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d, + 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565, + 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580, + 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage862 is the IBM Code Page 862 encoding. +var CodePage862 *Charmap = &codePage862 + +var codePage862 = Charmap{ + name: "IBM Code Page 862", + mib: identifier.PC862LatinHebrew, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xd7, 0x90, 0x00}}, {2, [3]byte{0xd7, 0x91, 0x00}}, + {2, [3]byte{0xd7, 0x92, 0x00}}, {2, [3]byte{0xd7, 0x93, 0x00}}, + {2, [3]byte{0xd7, 0x94, 0x00}}, {2, [3]byte{0xd7, 0x95, 0x00}}, + {2, [3]byte{0xd7, 0x96, 0x00}}, {2, [3]byte{0xd7, 0x97, 0x00}}, + {2, [3]byte{0xd7, 0x98, 0x00}}, {2, [3]byte{0xd7, 0x99, 0x00}}, + {2, [3]byte{0xd7, 0x9a, 0x00}}, {2, [3]byte{0xd7, 0x9b, 0x00}}, + {2, [3]byte{0xd7, 0x9c, 0x00}}, {2, [3]byte{0xd7, 0x9d, 0x00}}, + {2, [3]byte{0xd7, 0x9e, 0x00}}, {2, [3]byte{0xd7, 0x9f, 0x00}}, + {2, [3]byte{0xd7, 0xa0, 0x00}}, {2, [3]byte{0xd7, 0xa1, 0x00}}, + {2, [3]byte{0xd7, 0xa2, 0x00}}, {2, [3]byte{0xd7, 0xa3, 0x00}}, + {2, [3]byte{0xd7, 0xa4, 0x00}}, {2, [3]byte{0xd7, 0xa5, 0x00}}, + {2, [3]byte{0xd7, 0xa6, 0x00}}, {2, [3]byte{0xd7, 0xa7, 0x00}}, + {2, [3]byte{0xd7, 0xa8, 0x00}}, {2, [3]byte{0xd7, 0xa9, 0x00}}, + {2, [3]byte{0xd7, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xa2, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xa7}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0x90}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}}, + {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}}, + {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}}, + {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}}, + {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}}, + {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}}, + {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}}, + {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}}, + {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xad0000a1, 0x9b0000a2, 0x9c0000a3, 0x9d0000a5, 0xa60000aa, 0xae0000ab, 0xaa0000ac, + 0xf80000b0, 0xf10000b1, 0xfd0000b2, 0xe60000b5, 0xfa0000b7, 0xa70000ba, 0xaf0000bb, 0xac0000bc, + 0xab0000bd, 0xa80000bf, 0xa50000d1, 0xe10000df, 0xa00000e1, 0xa10000ed, 0xa40000f1, 0xa20000f3, + 0xf60000f7, 0xa30000fa, 0x9f000192, 0xe2000393, 0xe9000398, 0xe40003a3, 0xe80003a6, 0xea0003a9, + 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, 0xe50003c3, 0xe70003c4, 0xed0003c6, 0x800005d0, + 0x810005d1, 0x820005d2, 0x830005d3, 0x840005d4, 0x850005d5, 0x860005d6, 0x870005d7, 0x880005d8, + 0x890005d9, 0x8a0005da, 0x8b0005db, 0x8c0005dc, 0x8d0005dd, 0x8e0005de, 0x8f0005df, 0x900005e0, + 0x910005e1, 0x920005e2, 0x930005e3, 0x940005e4, 0x950005e5, 0x960005e6, 0x970005e7, 0x980005e8, + 0x990005e9, 0x9a0005ea, 0xfc00207f, 0x9e0020a7, 0xf9002219, 0xfb00221a, 0xec00221e, 0xef002229, + 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xa9002310, 0xf4002320, 0xf5002321, 0xc4002500, + 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, + 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555, + 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d, + 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565, + 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580, + 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage863 is the IBM Code Page 863 encoding. +var CodePage863 *Charmap = &codePage863 + +var codePage863 = Charmap{ + name: "IBM Code Page 863", + mib: identifier.IBM863, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x97}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0x88, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0x8b, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0x94, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0xa2, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9b, 0x00}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0x90}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbe, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}}, + {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}}, + {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}}, + {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}}, + {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}}, + {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}}, + {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}}, + {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}}, + {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0x9b0000a2, 0x9c0000a3, 0x980000a4, 0xa00000a6, 0x8f0000a7, 0xa40000a8, 0xae0000ab, + 0xaa0000ac, 0xa70000af, 0xf80000b0, 0xf10000b1, 0xfd0000b2, 0xa60000b3, 0xa10000b4, 0xe60000b5, + 0x860000b6, 0xfa0000b7, 0xa50000b8, 0xaf0000bb, 0xac0000bc, 0xab0000bd, 0xad0000be, 0x8e0000c0, + 0x840000c2, 0x800000c7, 0x910000c8, 0x900000c9, 0x920000ca, 0x940000cb, 0xa80000ce, 0x950000cf, + 0x990000d4, 0x9d0000d9, 0x9e0000db, 0x9a0000dc, 0xe10000df, 0x850000e0, 0x830000e2, 0x870000e7, + 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8c0000ee, 0x8b0000ef, 0xa20000f3, 0x930000f4, + 0xf60000f7, 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0x9f000192, 0xe2000393, 0xe9000398, + 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, 0xe50003c3, + 0xe70003c4, 0xed0003c6, 0x8d002017, 0xfc00207f, 0xf9002219, 0xfb00221a, 0xec00221e, 0xef002229, + 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xa9002310, 0xf4002320, 0xf5002321, 0xc4002500, + 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, + 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555, + 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d, + 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565, + 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580, + 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage865 is the IBM Code Page 865 encoding. +var CodePage865 *Charmap = &codePage865 + +var codePage865 = Charmap{ + name: "IBM Code Page 865", + mib: identifier.IBM865, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa5, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x98, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xa7}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0x90}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}}, + {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}}, + {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}}, + {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}}, + {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}}, + {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}}, + {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}}, + {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}}, + {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xad0000a1, 0x9c0000a3, 0xaf0000a4, 0xa60000aa, 0xae0000ab, 0xaa0000ac, 0xf80000b0, + 0xf10000b1, 0xfd0000b2, 0xe60000b5, 0xfa0000b7, 0xa70000ba, 0xac0000bc, 0xab0000bd, 0xa80000bf, + 0x8e0000c4, 0x8f0000c5, 0x920000c6, 0x800000c7, 0x900000c9, 0xa50000d1, 0x990000d6, 0x9d0000d8, + 0x9a0000dc, 0xe10000df, 0x850000e0, 0xa00000e1, 0x830000e2, 0x840000e4, 0x860000e5, 0x910000e6, + 0x870000e7, 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8d0000ec, 0xa10000ed, 0x8c0000ee, + 0x8b0000ef, 0xa40000f1, 0x950000f2, 0xa20000f3, 0x930000f4, 0x940000f6, 0xf60000f7, 0x9b0000f8, + 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0x980000ff, 0x9f000192, 0xe2000393, 0xe9000398, + 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, 0xe50003c3, + 0xe70003c4, 0xed0003c6, 0xfc00207f, 0x9e0020a7, 0xf9002219, 0xfb00221a, 0xec00221e, 0xef002229, + 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xa9002310, 0xf4002320, 0xf5002321, 0xc4002500, + 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, + 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555, + 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d, + 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565, + 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580, + 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage866 is the IBM Code Page 866 encoding. +var CodePage866 *Charmap = &codePage866 + +var codePage866 = Charmap{ + name: "IBM Code Page 866", + mib: identifier.IBM866, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xd0, 0x90, 0x00}}, {2, [3]byte{0xd0, 0x91, 0x00}}, + {2, [3]byte{0xd0, 0x92, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xd0, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x99, 0x00}}, + {2, [3]byte{0xd0, 0x9a, 0x00}}, {2, [3]byte{0xd0, 0x9b, 0x00}}, + {2, [3]byte{0xd0, 0x9c, 0x00}}, {2, [3]byte{0xd0, 0x9d, 0x00}}, + {2, [3]byte{0xd0, 0x9e, 0x00}}, {2, [3]byte{0xd0, 0x9f, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0xa1, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd0, 0xa3, 0x00}}, + {2, [3]byte{0xd0, 0xa4, 0x00}}, {2, [3]byte{0xd0, 0xa5, 0x00}}, + {2, [3]byte{0xd0, 0xa6, 0x00}}, {2, [3]byte{0xd0, 0xa7, 0x00}}, + {2, [3]byte{0xd0, 0xa8, 0x00}}, {2, [3]byte{0xd0, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0xaa, 0x00}}, {2, [3]byte{0xd0, 0xab, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {2, [3]byte{0xd0, 0xad, 0x00}}, + {2, [3]byte{0xd0, 0xae, 0x00}}, {2, [3]byte{0xd0, 0xaf, 0x00}}, + {2, [3]byte{0xd0, 0xb0, 0x00}}, {2, [3]byte{0xd0, 0xb1, 0x00}}, + {2, [3]byte{0xd0, 0xb2, 0x00}}, {2, [3]byte{0xd0, 0xb3, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0xb5, 0x00}}, + {2, [3]byte{0xd0, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0xb7, 0x00}}, + {2, [3]byte{0xd0, 0xb8, 0x00}}, {2, [3]byte{0xd0, 0xb9, 0x00}}, + {2, [3]byte{0xd0, 0xba, 0x00}}, {2, [3]byte{0xd0, 0xbb, 0x00}}, + {2, [3]byte{0xd0, 0xbc, 0x00}}, {2, [3]byte{0xd0, 0xbd, 0x00}}, + {2, [3]byte{0xd0, 0xbe, 0x00}}, {2, [3]byte{0xd0, 0xbf, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}}, + {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}}, + {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}}, + {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}}, + {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}}, + {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}}, + {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {2, [3]byte{0xd1, 0x80, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x82, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd1, 0x85, 0x00}}, + {2, [3]byte{0xd1, 0x86, 0x00}}, {2, [3]byte{0xd1, 0x87, 0x00}}, + {2, [3]byte{0xd1, 0x88, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x8a, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd1, 0x8c, 0x00}}, {2, [3]byte{0xd1, 0x8d, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {2, [3]byte{0xd1, 0x8f, 0x00}}, + {2, [3]byte{0xd0, 0x81, 0x00}}, {2, [3]byte{0xd1, 0x91, 0x00}}, + {2, [3]byte{0xd0, 0x84, 0x00}}, {2, [3]byte{0xd1, 0x94, 0x00}}, + {2, [3]byte{0xd0, 0x87, 0x00}}, {2, [3]byte{0xd1, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x8e, 0x00}}, {2, [3]byte{0xd1, 0x9e, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {3, [3]byte{0xe2, 0x84, 0x96}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xff0000a0, 0xfd0000a4, 0xf80000b0, 0xfa0000b7, 0xf0000401, 0xf2000404, 0xf4000407, 0xf600040e, + 0x80000410, 0x81000411, 0x82000412, 0x83000413, 0x84000414, 0x85000415, 0x86000416, 0x87000417, + 0x88000418, 0x89000419, 0x8a00041a, 0x8b00041b, 0x8c00041c, 0x8d00041d, 0x8e00041e, 0x8f00041f, + 0x90000420, 0x91000421, 0x92000422, 0x93000423, 0x94000424, 0x95000425, 0x96000426, 0x97000427, + 0x98000428, 0x99000429, 0x9a00042a, 0x9b00042b, 0x9c00042c, 0x9d00042d, 0x9e00042e, 0x9f00042f, + 0xa0000430, 0xa1000431, 0xa2000432, 0xa3000433, 0xa4000434, 0xa5000435, 0xa6000436, 0xa7000437, + 0xa8000438, 0xa9000439, 0xaa00043a, 0xab00043b, 0xac00043c, 0xad00043d, 0xae00043e, 0xaf00043f, + 0xe0000440, 0xe1000441, 0xe2000442, 0xe3000443, 0xe4000444, 0xe5000445, 0xe6000446, 0xe7000447, + 0xe8000448, 0xe9000449, 0xea00044a, 0xeb00044b, 0xec00044c, 0xed00044d, 0xee00044e, 0xef00044f, + 0xf1000451, 0xf3000454, 0xf5000457, 0xf700045e, 0xfc002116, 0xf9002219, 0xfb00221a, 0xc4002500, + 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c, + 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555, + 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d, + 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565, + 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580, + 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0, + }, +} + +// CodePage1047 is the IBM Code Page 1047 encoding. +var CodePage1047 *Charmap = &codePage1047 + +var codePage1047 = Charmap{ + name: "IBM Code Page 1047", + mib: identifier.IBM1047, + asciiSuperset: false, + low: 0x00, + replacement: 0x3f, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9c, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x86, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x97, 0x00}}, {2, [3]byte{0xc2, 0x8d, 0x00}}, + {2, [3]byte{0xc2, 0x8e, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9d, 0x00}}, {2, [3]byte{0xc2, 0x85, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {2, [3]byte{0xc2, 0x87, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x92, 0x00}}, {2, [3]byte{0xc2, 0x8f, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x80, 0x00}}, {2, [3]byte{0xc2, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0x82, 0x00}}, {2, [3]byte{0xc2, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0x84, 0x00}}, {1, [3]byte{0x0a, 0x00, 0x00}}, + {1, [3]byte{0x17, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x88, 0x00}}, {2, [3]byte{0xc2, 0x89, 0x00}}, + {2, [3]byte{0xc2, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0x8b, 0x00}}, + {2, [3]byte{0xc2, 0x8c, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x90, 0x00}}, {2, [3]byte{0xc2, 0x91, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {2, [3]byte{0xc2, 0x93, 0x00}}, + {2, [3]byte{0xc2, 0x94, 0x00}}, {2, [3]byte{0xc2, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0x96, 0x00}}, {1, [3]byte{0x04, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x98, 0x00}}, {2, [3]byte{0xc2, 0x99, 0x00}}, + {2, [3]byte{0xc2, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9b, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9e, 0x00}}, {1, [3]byte{0x1a, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa4, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa7, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {1, [3]byte{0x2e, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x28, 0x00, 0x00}}, + {1, [3]byte{0x2b, 0x00, 0x00}}, {1, [3]byte{0x7c, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {1, [3]byte{0x21, 0x00, 0x00}}, {1, [3]byte{0x24, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x3b, 0x00, 0x00}}, {1, [3]byte{0x5e, 0x00, 0x00}}, + {1, [3]byte{0x2d, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x84, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {1, [3]byte{0x2c, 0x00, 0x00}}, + {1, [3]byte{0x25, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {1, [3]byte{0x60, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x3d, 0x00, 0x00}}, {1, [3]byte{0x22, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {1, [3]byte{0x6a, 0x00, 0x00}}, + {1, [3]byte{0x6b, 0x00, 0x00}}, {1, [3]byte{0x6c, 0x00, 0x00}}, + {1, [3]byte{0x6d, 0x00, 0x00}}, {1, [3]byte{0x6e, 0x00, 0x00}}, + {1, [3]byte{0x6f, 0x00, 0x00}}, {1, [3]byte{0x70, 0x00, 0x00}}, + {1, [3]byte{0x71, 0x00, 0x00}}, {1, [3]byte{0x72, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc2, 0xa4, 0x00}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {1, [3]byte{0x7e, 0x00, 0x00}}, + {1, [3]byte{0x73, 0x00, 0x00}}, {1, [3]byte{0x74, 0x00, 0x00}}, + {1, [3]byte{0x75, 0x00, 0x00}}, {1, [3]byte{0x76, 0x00, 0x00}}, + {1, [3]byte{0x77, 0x00, 0x00}}, {1, [3]byte{0x78, 0x00, 0x00}}, + {1, [3]byte{0x79, 0x00, 0x00}}, {1, [3]byte{0x7a, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xa1, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc2, 0xae, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa5, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xa9, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xbc, 0x00}}, + {2, [3]byte{0xc2, 0xbd, 0x00}}, {2, [3]byte{0xc2, 0xbe, 0x00}}, + {2, [3]byte{0xc3, 0x9d, 0x00}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xc2, 0xaf, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {1, [3]byte{0x7b, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {1, [3]byte{0x7d, 0x00, 0x00}}, {1, [3]byte{0x4a, 0x00, 0x00}}, + {1, [3]byte{0x4b, 0x00, 0x00}}, {1, [3]byte{0x4c, 0x00, 0x00}}, + {1, [3]byte{0x4d, 0x00, 0x00}}, {1, [3]byte{0x4e, 0x00, 0x00}}, + {1, [3]byte{0x4f, 0x00, 0x00}}, {1, [3]byte{0x50, 0x00, 0x00}}, + {1, [3]byte{0x51, 0x00, 0x00}}, {1, [3]byte{0x52, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb9, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {1, [3]byte{0x53, 0x00, 0x00}}, {1, [3]byte{0x54, 0x00, 0x00}}, + {1, [3]byte{0x55, 0x00, 0x00}}, {1, [3]byte{0x56, 0x00, 0x00}}, + {1, [3]byte{0x57, 0x00, 0x00}}, {1, [3]byte{0x58, 0x00, 0x00}}, + {1, [3]byte{0x59, 0x00, 0x00}}, {1, [3]byte{0x5a, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0x94, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9f, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x37000004, 0x2d000005, 0x2e000006, 0x2f000007, + 0x16000008, 0x05000009, 0x2500000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x3c000014, 0x3d000015, 0x32000016, 0x26000017, + 0x18000018, 0x19000019, 0x3f00001a, 0x2700001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x40000020, 0x5a000021, 0x7f000022, 0x7b000023, 0x5b000024, 0x6c000025, 0x50000026, 0x7d000027, + 0x4d000028, 0x5d000029, 0x5c00002a, 0x4e00002b, 0x6b00002c, 0x6000002d, 0x4b00002e, 0x6100002f, + 0xf0000030, 0xf1000031, 0xf2000032, 0xf3000033, 0xf4000034, 0xf5000035, 0xf6000036, 0xf7000037, + 0xf8000038, 0xf9000039, 0x7a00003a, 0x5e00003b, 0x4c00003c, 0x7e00003d, 0x6e00003e, 0x6f00003f, + 0x7c000040, 0xc1000041, 0xc2000042, 0xc3000043, 0xc4000044, 0xc5000045, 0xc6000046, 0xc7000047, + 0xc8000048, 0xc9000049, 0xd100004a, 0xd200004b, 0xd300004c, 0xd400004d, 0xd500004e, 0xd600004f, + 0xd7000050, 0xd8000051, 0xd9000052, 0xe2000053, 0xe3000054, 0xe4000055, 0xe5000056, 0xe6000057, + 0xe7000058, 0xe8000059, 0xe900005a, 0xad00005b, 0xe000005c, 0xbd00005d, 0x5f00005e, 0x6d00005f, + 0x79000060, 0x81000061, 0x82000062, 0x83000063, 0x84000064, 0x85000065, 0x86000066, 0x87000067, + 0x88000068, 0x89000069, 0x9100006a, 0x9200006b, 0x9300006c, 0x9400006d, 0x9500006e, 0x9600006f, + 0x97000070, 0x98000071, 0x99000072, 0xa2000073, 0xa3000074, 0xa4000075, 0xa5000076, 0xa6000077, + 0xa7000078, 0xa8000079, 0xa900007a, 0xc000007b, 0x4f00007c, 0xd000007d, 0xa100007e, 0x0700007f, + 0x20000080, 0x21000081, 0x22000082, 0x23000083, 0x24000084, 0x15000085, 0x06000086, 0x17000087, + 0x28000088, 0x29000089, 0x2a00008a, 0x2b00008b, 0x2c00008c, 0x0900008d, 0x0a00008e, 0x1b00008f, + 0x30000090, 0x31000091, 0x1a000092, 0x33000093, 0x34000094, 0x35000095, 0x36000096, 0x08000097, + 0x38000098, 0x39000099, 0x3a00009a, 0x3b00009b, 0x0400009c, 0x1400009d, 0x3e00009e, 0xff00009f, + 0x410000a0, 0xaa0000a1, 0x4a0000a2, 0xb10000a3, 0x9f0000a4, 0xb20000a5, 0x6a0000a6, 0xb50000a7, + 0xbb0000a8, 0xb40000a9, 0x9a0000aa, 0x8a0000ab, 0xb00000ac, 0xca0000ad, 0xaf0000ae, 0xbc0000af, + 0x900000b0, 0x8f0000b1, 0xea0000b2, 0xfa0000b3, 0xbe0000b4, 0xa00000b5, 0xb60000b6, 0xb30000b7, + 0x9d0000b8, 0xda0000b9, 0x9b0000ba, 0x8b0000bb, 0xb70000bc, 0xb80000bd, 0xb90000be, 0xab0000bf, + 0x640000c0, 0x650000c1, 0x620000c2, 0x660000c3, 0x630000c4, 0x670000c5, 0x9e0000c6, 0x680000c7, + 0x740000c8, 0x710000c9, 0x720000ca, 0x730000cb, 0x780000cc, 0x750000cd, 0x760000ce, 0x770000cf, + 0xac0000d0, 0x690000d1, 0xed0000d2, 0xee0000d3, 0xeb0000d4, 0xef0000d5, 0xec0000d6, 0xbf0000d7, + 0x800000d8, 0xfd0000d9, 0xfe0000da, 0xfb0000db, 0xfc0000dc, 0xba0000dd, 0xae0000de, 0x590000df, + 0x440000e0, 0x450000e1, 0x420000e2, 0x460000e3, 0x430000e4, 0x470000e5, 0x9c0000e6, 0x480000e7, + 0x540000e8, 0x510000e9, 0x520000ea, 0x530000eb, 0x580000ec, 0x550000ed, 0x560000ee, 0x570000ef, + 0x8c0000f0, 0x490000f1, 0xcd0000f2, 0xce0000f3, 0xcb0000f4, 0xcf0000f5, 0xcc0000f6, 0xe10000f7, + 0x700000f8, 0xdd0000f9, 0xde0000fa, 0xdb0000fb, 0xdc0000fc, 0x8d0000fd, 0x8e0000fe, 0xdf0000ff, + }, +} + +// CodePage1140 is the IBM Code Page 1140 encoding. +var CodePage1140 *Charmap = &codePage1140 + +var codePage1140 = Charmap{ + name: "IBM Code Page 1140", + mib: identifier.IBM01140, + asciiSuperset: false, + low: 0x00, + replacement: 0x3f, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9c, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x86, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x97, 0x00}}, {2, [3]byte{0xc2, 0x8d, 0x00}}, + {2, [3]byte{0xc2, 0x8e, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9d, 0x00}}, {2, [3]byte{0xc2, 0x85, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {2, [3]byte{0xc2, 0x87, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x92, 0x00}}, {2, [3]byte{0xc2, 0x8f, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x80, 0x00}}, {2, [3]byte{0xc2, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0x82, 0x00}}, {2, [3]byte{0xc2, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0x84, 0x00}}, {1, [3]byte{0x0a, 0x00, 0x00}}, + {1, [3]byte{0x17, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x88, 0x00}}, {2, [3]byte{0xc2, 0x89, 0x00}}, + {2, [3]byte{0xc2, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0x8b, 0x00}}, + {2, [3]byte{0xc2, 0x8c, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x90, 0x00}}, {2, [3]byte{0xc2, 0x91, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {2, [3]byte{0xc2, 0x93, 0x00}}, + {2, [3]byte{0xc2, 0x94, 0x00}}, {2, [3]byte{0xc2, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0x96, 0x00}}, {1, [3]byte{0x04, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x98, 0x00}}, {2, [3]byte{0xc2, 0x99, 0x00}}, + {2, [3]byte{0xc2, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9b, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x9e, 0x00}}, {1, [3]byte{0x1a, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa4, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa7, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {1, [3]byte{0x2e, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x28, 0x00, 0x00}}, + {1, [3]byte{0x2b, 0x00, 0x00}}, {1, [3]byte{0x7c, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {1, [3]byte{0x21, 0x00, 0x00}}, {1, [3]byte{0x24, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x3b, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xac, 0x00}}, + {1, [3]byte{0x2d, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x84, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {1, [3]byte{0x2c, 0x00, 0x00}}, + {1, [3]byte{0x25, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {1, [3]byte{0x60, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x3d, 0x00, 0x00}}, {1, [3]byte{0x22, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {1, [3]byte{0x6a, 0x00, 0x00}}, + {1, [3]byte{0x6b, 0x00, 0x00}}, {1, [3]byte{0x6c, 0x00, 0x00}}, + {1, [3]byte{0x6d, 0x00, 0x00}}, {1, [3]byte{0x6e, 0x00, 0x00}}, + {1, [3]byte{0x6f, 0x00, 0x00}}, {1, [3]byte{0x70, 0x00, 0x00}}, + {1, [3]byte{0x71, 0x00, 0x00}}, {1, [3]byte{0x72, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {3, [3]byte{0xe2, 0x82, 0xac}}, + {2, [3]byte{0xc2, 0xb5, 0x00}}, {1, [3]byte{0x7e, 0x00, 0x00}}, + {1, [3]byte{0x73, 0x00, 0x00}}, {1, [3]byte{0x74, 0x00, 0x00}}, + {1, [3]byte{0x75, 0x00, 0x00}}, {1, [3]byte{0x76, 0x00, 0x00}}, + {1, [3]byte{0x77, 0x00, 0x00}}, {1, [3]byte{0x78, 0x00, 0x00}}, + {1, [3]byte{0x79, 0x00, 0x00}}, {1, [3]byte{0x7a, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xa1, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc2, 0xae, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa5, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xa9, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xbc, 0x00}}, + {2, [3]byte{0xc2, 0xbd, 0x00}}, {2, [3]byte{0xc2, 0xbe, 0x00}}, + {1, [3]byte{0x5b, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xaf, 0x00}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {1, [3]byte{0x7b, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xad, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {1, [3]byte{0x7d, 0x00, 0x00}}, {1, [3]byte{0x4a, 0x00, 0x00}}, + {1, [3]byte{0x4b, 0x00, 0x00}}, {1, [3]byte{0x4c, 0x00, 0x00}}, + {1, [3]byte{0x4d, 0x00, 0x00}}, {1, [3]byte{0x4e, 0x00, 0x00}}, + {1, [3]byte{0x4f, 0x00, 0x00}}, {1, [3]byte{0x50, 0x00, 0x00}}, + {1, [3]byte{0x51, 0x00, 0x00}}, {1, [3]byte{0x52, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb9, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {1, [3]byte{0x53, 0x00, 0x00}}, {1, [3]byte{0x54, 0x00, 0x00}}, + {1, [3]byte{0x55, 0x00, 0x00}}, {1, [3]byte{0x56, 0x00, 0x00}}, + {1, [3]byte{0x57, 0x00, 0x00}}, {1, [3]byte{0x58, 0x00, 0x00}}, + {1, [3]byte{0x59, 0x00, 0x00}}, {1, [3]byte{0x5a, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0x94, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9f, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x37000004, 0x2d000005, 0x2e000006, 0x2f000007, + 0x16000008, 0x05000009, 0x2500000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x3c000014, 0x3d000015, 0x32000016, 0x26000017, + 0x18000018, 0x19000019, 0x3f00001a, 0x2700001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x40000020, 0x5a000021, 0x7f000022, 0x7b000023, 0x5b000024, 0x6c000025, 0x50000026, 0x7d000027, + 0x4d000028, 0x5d000029, 0x5c00002a, 0x4e00002b, 0x6b00002c, 0x6000002d, 0x4b00002e, 0x6100002f, + 0xf0000030, 0xf1000031, 0xf2000032, 0xf3000033, 0xf4000034, 0xf5000035, 0xf6000036, 0xf7000037, + 0xf8000038, 0xf9000039, 0x7a00003a, 0x5e00003b, 0x4c00003c, 0x7e00003d, 0x6e00003e, 0x6f00003f, + 0x7c000040, 0xc1000041, 0xc2000042, 0xc3000043, 0xc4000044, 0xc5000045, 0xc6000046, 0xc7000047, + 0xc8000048, 0xc9000049, 0xd100004a, 0xd200004b, 0xd300004c, 0xd400004d, 0xd500004e, 0xd600004f, + 0xd7000050, 0xd8000051, 0xd9000052, 0xe2000053, 0xe3000054, 0xe4000055, 0xe5000056, 0xe6000057, + 0xe7000058, 0xe8000059, 0xe900005a, 0xba00005b, 0xe000005c, 0xbb00005d, 0xb000005e, 0x6d00005f, + 0x79000060, 0x81000061, 0x82000062, 0x83000063, 0x84000064, 0x85000065, 0x86000066, 0x87000067, + 0x88000068, 0x89000069, 0x9100006a, 0x9200006b, 0x9300006c, 0x9400006d, 0x9500006e, 0x9600006f, + 0x97000070, 0x98000071, 0x99000072, 0xa2000073, 0xa3000074, 0xa4000075, 0xa5000076, 0xa6000077, + 0xa7000078, 0xa8000079, 0xa900007a, 0xc000007b, 0x4f00007c, 0xd000007d, 0xa100007e, 0x0700007f, + 0x20000080, 0x21000081, 0x22000082, 0x23000083, 0x24000084, 0x15000085, 0x06000086, 0x17000087, + 0x28000088, 0x29000089, 0x2a00008a, 0x2b00008b, 0x2c00008c, 0x0900008d, 0x0a00008e, 0x1b00008f, + 0x30000090, 0x31000091, 0x1a000092, 0x33000093, 0x34000094, 0x35000095, 0x36000096, 0x08000097, + 0x38000098, 0x39000099, 0x3a00009a, 0x3b00009b, 0x0400009c, 0x1400009d, 0x3e00009e, 0xff00009f, + 0x410000a0, 0xaa0000a1, 0x4a0000a2, 0xb10000a3, 0xb20000a5, 0x6a0000a6, 0xb50000a7, 0xbd0000a8, + 0xb40000a9, 0x9a0000aa, 0x8a0000ab, 0x5f0000ac, 0xca0000ad, 0xaf0000ae, 0xbc0000af, 0x900000b0, + 0x8f0000b1, 0xea0000b2, 0xfa0000b3, 0xbe0000b4, 0xa00000b5, 0xb60000b6, 0xb30000b7, 0x9d0000b8, + 0xda0000b9, 0x9b0000ba, 0x8b0000bb, 0xb70000bc, 0xb80000bd, 0xb90000be, 0xab0000bf, 0x640000c0, + 0x650000c1, 0x620000c2, 0x660000c3, 0x630000c4, 0x670000c5, 0x9e0000c6, 0x680000c7, 0x740000c8, + 0x710000c9, 0x720000ca, 0x730000cb, 0x780000cc, 0x750000cd, 0x760000ce, 0x770000cf, 0xac0000d0, + 0x690000d1, 0xed0000d2, 0xee0000d3, 0xeb0000d4, 0xef0000d5, 0xec0000d6, 0xbf0000d7, 0x800000d8, + 0xfd0000d9, 0xfe0000da, 0xfb0000db, 0xfc0000dc, 0xad0000dd, 0xae0000de, 0x590000df, 0x440000e0, + 0x450000e1, 0x420000e2, 0x460000e3, 0x430000e4, 0x470000e5, 0x9c0000e6, 0x480000e7, 0x540000e8, + 0x510000e9, 0x520000ea, 0x530000eb, 0x580000ec, 0x550000ed, 0x560000ee, 0x570000ef, 0x8c0000f0, + 0x490000f1, 0xcd0000f2, 0xce0000f3, 0xcb0000f4, 0xcf0000f5, 0xcc0000f6, 0xe10000f7, 0x700000f8, + 0xdd0000f9, 0xde0000fa, 0xdb0000fb, 0xdc0000fc, 0x8d0000fd, 0x8e0000fe, 0xdf0000ff, 0x9f0020ac, + }, +} + +// ISO8859_1 is the ISO 8859-1 encoding. +var ISO8859_1 *Charmap = &iso8859_1 + +var iso8859_1 = Charmap{ + name: "ISO 8859-1", + mib: identifier.ISOLatin1, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x80, 0x00}}, {2, [3]byte{0xc2, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0x82, 0x00}}, {2, [3]byte{0xc2, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0x84, 0x00}}, {2, [3]byte{0xc2, 0x85, 0x00}}, + {2, [3]byte{0xc2, 0x86, 0x00}}, {2, [3]byte{0xc2, 0x87, 0x00}}, + {2, [3]byte{0xc2, 0x88, 0x00}}, {2, [3]byte{0xc2, 0x89, 0x00}}, + {2, [3]byte{0xc2, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0x8b, 0x00}}, + {2, [3]byte{0xc2, 0x8c, 0x00}}, {2, [3]byte{0xc2, 0x8d, 0x00}}, + {2, [3]byte{0xc2, 0x8e, 0x00}}, {2, [3]byte{0xc2, 0x8f, 0x00}}, + {2, [3]byte{0xc2, 0x90, 0x00}}, {2, [3]byte{0xc2, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0x92, 0x00}}, {2, [3]byte{0xc2, 0x93, 0x00}}, + {2, [3]byte{0xc2, 0x94, 0x00}}, {2, [3]byte{0xc2, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0x96, 0x00}}, {2, [3]byte{0xc2, 0x97, 0x00}}, + {2, [3]byte{0xc2, 0x98, 0x00}}, {2, [3]byte{0xc2, 0x99, 0x00}}, + {2, [3]byte{0xc2, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9b, 0x00}}, + {2, [3]byte{0xc2, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0x9d, 0x00}}, + {2, [3]byte{0xc2, 0x9e, 0x00}}, {2, [3]byte{0xc2, 0x9f, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0x80000080, 0x81000081, 0x82000082, 0x83000083, 0x84000084, 0x85000085, 0x86000086, 0x87000087, + 0x88000088, 0x89000089, 0x8a00008a, 0x8b00008b, 0x8c00008c, 0x8d00008d, 0x8e00008e, 0x8f00008f, + 0x90000090, 0x91000091, 0x92000092, 0x93000093, 0x94000094, 0x95000095, 0x96000096, 0x97000097, + 0x98000098, 0x99000099, 0x9a00009a, 0x9b00009b, 0x9c00009c, 0x9d00009d, 0x9e00009e, 0x9f00009f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, + 0xa80000a8, 0xa90000a9, 0xaa0000aa, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, + 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, + 0xb80000b8, 0xb90000b9, 0xba0000ba, 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xbf0000bf, + 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, + 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd00000d0, 0xd10000d1, 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd70000d7, + 0xd80000d8, 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdd0000dd, 0xde0000de, 0xdf0000df, + 0xe00000e0, 0xe10000e1, 0xe20000e2, 0xe30000e3, 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, + 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, + 0xf00000f0, 0xf10000f1, 0xf20000f2, 0xf30000f3, 0xf40000f4, 0xf50000f5, 0xf60000f6, 0xf70000f7, + 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xfd0000fd, 0xfe0000fe, 0xff0000ff, + }, +} + +// ISO8859_2 is the ISO 8859-2 encoding. +var ISO8859_2 *Charmap = &iso8859_2 + +var iso8859_2 = Charmap{ + name: "ISO 8859-2", + mib: identifier.ISOLatin2, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc4, 0x84, 0x00}}, + {2, [3]byte{0xcb, 0x98, 0x00}}, {2, [3]byte{0xc5, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0xbd, 0x00}}, + {2, [3]byte{0xc5, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc5, 0xa0, 0x00}}, + {2, [3]byte{0xc5, 0x9e, 0x00}}, {2, [3]byte{0xc5, 0xa4, 0x00}}, + {2, [3]byte{0xc5, 0xb9, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc4, 0x85, 0x00}}, + {2, [3]byte{0xcb, 0x9b, 0x00}}, {2, [3]byte{0xc5, 0x82, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc4, 0xbe, 0x00}}, + {2, [3]byte{0xc5, 0x9b, 0x00}}, {2, [3]byte{0xcb, 0x87, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc5, 0xa1, 0x00}}, + {2, [3]byte{0xc5, 0x9f, 0x00}}, {2, [3]byte{0xc5, 0xa5, 0x00}}, + {2, [3]byte{0xc5, 0xba, 0x00}}, {2, [3]byte{0xcb, 0x9d, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xc5, 0xbc, 0x00}}, + {2, [3]byte{0xc5, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc4, 0x82, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc4, 0xb9, 0x00}}, + {2, [3]byte{0xc4, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc4, 0x8e, 0x00}}, + {2, [3]byte{0xc4, 0x90, 0x00}}, {2, [3]byte{0xc5, 0x83, 0x00}}, + {2, [3]byte{0xc5, 0x87, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc5, 0x90, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc5, 0x98, 0x00}}, {2, [3]byte{0xc5, 0xae, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc5, 0xb0, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc5, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc5, 0x95, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc4, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0xba, 0x00}}, + {2, [3]byte{0xc4, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc4, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc4, 0x99, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc4, 0x9b, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc4, 0x8f, 0x00}}, + {2, [3]byte{0xc4, 0x91, 0x00}}, {2, [3]byte{0xc5, 0x84, 0x00}}, + {2, [3]byte{0xc5, 0x88, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc5, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc5, 0x99, 0x00}}, {2, [3]byte{0xc5, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc5, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc5, 0xa3, 0x00}}, {2, [3]byte{0xcb, 0x99, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa40000a4, 0xa70000a7, 0xa80000a8, 0xad0000ad, 0xb00000b0, 0xb40000b4, 0xb80000b8, + 0xc10000c1, 0xc20000c2, 0xc40000c4, 0xc70000c7, 0xc90000c9, 0xcb0000cb, 0xcd0000cd, 0xce0000ce, + 0xd30000d3, 0xd40000d4, 0xd60000d6, 0xd70000d7, 0xda0000da, 0xdc0000dc, 0xdd0000dd, 0xdf0000df, + 0xe10000e1, 0xe20000e2, 0xe40000e4, 0xe70000e7, 0xe90000e9, 0xeb0000eb, 0xed0000ed, 0xee0000ee, + 0xf30000f3, 0xf40000f4, 0xf60000f6, 0xf70000f7, 0xfa0000fa, 0xfc0000fc, 0xfd0000fd, 0xc3000102, + 0xe3000103, 0xa1000104, 0xb1000105, 0xc6000106, 0xe6000107, 0xc800010c, 0xe800010d, 0xcf00010e, + 0xef00010f, 0xd0000110, 0xf0000111, 0xca000118, 0xea000119, 0xcc00011a, 0xec00011b, 0xc5000139, + 0xe500013a, 0xa500013d, 0xb500013e, 0xa3000141, 0xb3000142, 0xd1000143, 0xf1000144, 0xd2000147, + 0xf2000148, 0xd5000150, 0xf5000151, 0xc0000154, 0xe0000155, 0xd8000158, 0xf8000159, 0xa600015a, + 0xb600015b, 0xaa00015e, 0xba00015f, 0xa9000160, 0xb9000161, 0xde000162, 0xfe000163, 0xab000164, + 0xbb000165, 0xd900016e, 0xf900016f, 0xdb000170, 0xfb000171, 0xac000179, 0xbc00017a, 0xaf00017b, + 0xbf00017c, 0xae00017d, 0xbe00017e, 0xb70002c7, 0xa20002d8, 0xff0002d9, 0xb20002db, 0xbd0002dd, + 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, + 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, + 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, + 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, 0xbd0002dd, + }, +} + +// ISO8859_3 is the ISO 8859-3 encoding. +var ISO8859_3 *Charmap = &iso8859_3 + +var iso8859_3 = Charmap{ + name: "ISO 8859-3", + mib: identifier.ISOLatin3, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc4, 0xa6, 0x00}}, + {2, [3]byte{0xcb, 0x98, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc4, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc4, 0xb0, 0x00}}, + {2, [3]byte{0xc5, 0x9e, 0x00}}, {2, [3]byte{0xc4, 0x9e, 0x00}}, + {2, [3]byte{0xc4, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc4, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc4, 0xa5, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc4, 0xb1, 0x00}}, + {2, [3]byte{0xc5, 0x9f, 0x00}}, {2, [3]byte{0xc4, 0x9f, 0x00}}, + {2, [3]byte{0xc4, 0xb5, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc5, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc4, 0x8a, 0x00}}, + {2, [3]byte{0xc4, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc4, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc4, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc5, 0xac, 0x00}}, + {2, [3]byte{0xc5, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x89, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc4, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc4, 0x9d, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc5, 0xad, 0x00}}, + {2, [3]byte{0xc5, 0x9d, 0x00}}, {2, [3]byte{0xcb, 0x99, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa30000a3, 0xa40000a4, 0xa70000a7, 0xa80000a8, 0xad0000ad, 0xb00000b0, 0xb20000b2, + 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb70000b7, 0xb80000b8, 0xbd0000bd, 0xc00000c0, 0xc10000c1, + 0xc20000c2, 0xc40000c4, 0xc70000c7, 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, + 0xcd0000cd, 0xce0000ce, 0xcf0000cf, 0xd10000d1, 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd60000d6, + 0xd70000d7, 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdf0000df, 0xe00000e0, 0xe10000e1, + 0xe20000e2, 0xe40000e4, 0xe70000e7, 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xec0000ec, + 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf10000f1, 0xf20000f2, 0xf30000f3, 0xf40000f4, 0xf60000f6, + 0xf70000f7, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xc6000108, 0xe6000109, 0xc500010a, + 0xe500010b, 0xd800011c, 0xf800011d, 0xab00011e, 0xbb00011f, 0xd5000120, 0xf5000121, 0xa6000124, + 0xb6000125, 0xa1000126, 0xb1000127, 0xa9000130, 0xb9000131, 0xac000134, 0xbc000135, 0xde00015c, + 0xfe00015d, 0xaa00015e, 0xba00015f, 0xdd00016c, 0xfd00016d, 0xaf00017b, 0xbf00017c, 0xa20002d8, + 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, + 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, + 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, + 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, + 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, 0xff0002d9, + }, +} + +// ISO8859_4 is the ISO 8859-4 encoding. +var ISO8859_4 *Charmap = &iso8859_4 + +var iso8859_4 = Charmap{ + name: "ISO 8859-4", + mib: identifier.ISOLatin4, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc4, 0x84, 0x00}}, + {2, [3]byte{0xc4, 0xb8, 0x00}}, {2, [3]byte{0xc5, 0x96, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0xa8, 0x00}}, + {2, [3]byte{0xc4, 0xbb, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc5, 0xa0, 0x00}}, + {2, [3]byte{0xc4, 0x92, 0x00}}, {2, [3]byte{0xc4, 0xa2, 0x00}}, + {2, [3]byte{0xc5, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc4, 0x85, 0x00}}, + {2, [3]byte{0xcb, 0x9b, 0x00}}, {2, [3]byte{0xc5, 0x97, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc4, 0xa9, 0x00}}, + {2, [3]byte{0xc4, 0xbc, 0x00}}, {2, [3]byte{0xcb, 0x87, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc5, 0xa1, 0x00}}, + {2, [3]byte{0xc4, 0x93, 0x00}}, {2, [3]byte{0xc4, 0xa3, 0x00}}, + {2, [3]byte{0xc5, 0xa7, 0x00}}, {2, [3]byte{0xc5, 0x8a, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xc5, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc4, 0xae, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc4, 0xaa, 0x00}}, + {2, [3]byte{0xc4, 0x90, 0x00}}, {2, [3]byte{0xc5, 0x85, 0x00}}, + {2, [3]byte{0xc5, 0x8c, 0x00}}, {2, [3]byte{0xc4, 0xb6, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc5, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc5, 0xa8, 0x00}}, + {2, [3]byte{0xc5, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc4, 0x81, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc4, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc4, 0x99, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc4, 0x97, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc4, 0xab, 0x00}}, + {2, [3]byte{0xc4, 0x91, 0x00}}, {2, [3]byte{0xc5, 0x86, 0x00}}, + {2, [3]byte{0xc5, 0x8d, 0x00}}, {2, [3]byte{0xc4, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc5, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc5, 0xa9, 0x00}}, + {2, [3]byte{0xc5, 0xab, 0x00}}, {2, [3]byte{0xcb, 0x99, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa40000a4, 0xa70000a7, 0xa80000a8, 0xad0000ad, 0xaf0000af, 0xb00000b0, 0xb40000b4, + 0xb80000b8, 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc90000c9, + 0xcb0000cb, 0xcd0000cd, 0xce0000ce, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd70000d7, 0xd80000d8, + 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdf0000df, 0xe10000e1, 0xe20000e2, 0xe30000e3, 0xe40000e4, + 0xe50000e5, 0xe60000e6, 0xe90000e9, 0xeb0000eb, 0xed0000ed, 0xee0000ee, 0xf40000f4, 0xf50000f5, + 0xf60000f6, 0xf70000f7, 0xf80000f8, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xc0000100, 0xe0000101, + 0xa1000104, 0xb1000105, 0xc800010c, 0xe800010d, 0xd0000110, 0xf0000111, 0xaa000112, 0xba000113, + 0xcc000116, 0xec000117, 0xca000118, 0xea000119, 0xab000122, 0xbb000123, 0xa5000128, 0xb5000129, + 0xcf00012a, 0xef00012b, 0xc700012e, 0xe700012f, 0xd3000136, 0xf3000137, 0xa2000138, 0xa600013b, + 0xb600013c, 0xd1000145, 0xf1000146, 0xbd00014a, 0xbf00014b, 0xd200014c, 0xf200014d, 0xa3000156, + 0xb3000157, 0xa9000160, 0xb9000161, 0xac000166, 0xbc000167, 0xdd000168, 0xfd000169, 0xde00016a, + 0xfe00016b, 0xd9000172, 0xf9000173, 0xae00017d, 0xbe00017e, 0xb70002c7, 0xff0002d9, 0xb20002db, + 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, + 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, + 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, + 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, 0xb20002db, + }, +} + +// ISO8859_5 is the ISO 8859-5 encoding. +var ISO8859_5 *Charmap = &iso8859_5 + +var iso8859_5 = Charmap{ + name: "ISO 8859-5", + mib: identifier.ISOLatinCyrillic, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0x81, 0x00}}, + {2, [3]byte{0xd0, 0x82, 0x00}}, {2, [3]byte{0xd0, 0x83, 0x00}}, + {2, [3]byte{0xd0, 0x84, 0x00}}, {2, [3]byte{0xd0, 0x85, 0x00}}, + {2, [3]byte{0xd0, 0x86, 0x00}}, {2, [3]byte{0xd0, 0x87, 0x00}}, + {2, [3]byte{0xd0, 0x88, 0x00}}, {2, [3]byte{0xd0, 0x89, 0x00}}, + {2, [3]byte{0xd0, 0x8a, 0x00}}, {2, [3]byte{0xd0, 0x8b, 0x00}}, + {2, [3]byte{0xd0, 0x8c, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xd0, 0x8e, 0x00}}, {2, [3]byte{0xd0, 0x8f, 0x00}}, + {2, [3]byte{0xd0, 0x90, 0x00}}, {2, [3]byte{0xd0, 0x91, 0x00}}, + {2, [3]byte{0xd0, 0x92, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xd0, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x99, 0x00}}, + {2, [3]byte{0xd0, 0x9a, 0x00}}, {2, [3]byte{0xd0, 0x9b, 0x00}}, + {2, [3]byte{0xd0, 0x9c, 0x00}}, {2, [3]byte{0xd0, 0x9d, 0x00}}, + {2, [3]byte{0xd0, 0x9e, 0x00}}, {2, [3]byte{0xd0, 0x9f, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0xa1, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd0, 0xa3, 0x00}}, + {2, [3]byte{0xd0, 0xa4, 0x00}}, {2, [3]byte{0xd0, 0xa5, 0x00}}, + {2, [3]byte{0xd0, 0xa6, 0x00}}, {2, [3]byte{0xd0, 0xa7, 0x00}}, + {2, [3]byte{0xd0, 0xa8, 0x00}}, {2, [3]byte{0xd0, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0xaa, 0x00}}, {2, [3]byte{0xd0, 0xab, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {2, [3]byte{0xd0, 0xad, 0x00}}, + {2, [3]byte{0xd0, 0xae, 0x00}}, {2, [3]byte{0xd0, 0xaf, 0x00}}, + {2, [3]byte{0xd0, 0xb0, 0x00}}, {2, [3]byte{0xd0, 0xb1, 0x00}}, + {2, [3]byte{0xd0, 0xb2, 0x00}}, {2, [3]byte{0xd0, 0xb3, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0xb5, 0x00}}, + {2, [3]byte{0xd0, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0xb7, 0x00}}, + {2, [3]byte{0xd0, 0xb8, 0x00}}, {2, [3]byte{0xd0, 0xb9, 0x00}}, + {2, [3]byte{0xd0, 0xba, 0x00}}, {2, [3]byte{0xd0, 0xbb, 0x00}}, + {2, [3]byte{0xd0, 0xbc, 0x00}}, {2, [3]byte{0xd0, 0xbd, 0x00}}, + {2, [3]byte{0xd0, 0xbe, 0x00}}, {2, [3]byte{0xd0, 0xbf, 0x00}}, + {2, [3]byte{0xd1, 0x80, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x82, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd1, 0x85, 0x00}}, + {2, [3]byte{0xd1, 0x86, 0x00}}, {2, [3]byte{0xd1, 0x87, 0x00}}, + {2, [3]byte{0xd1, 0x88, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x8a, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd1, 0x8c, 0x00}}, {2, [3]byte{0xd1, 0x8d, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {2, [3]byte{0xd1, 0x8f, 0x00}}, + {3, [3]byte{0xe2, 0x84, 0x96}}, {2, [3]byte{0xd1, 0x91, 0x00}}, + {2, [3]byte{0xd1, 0x92, 0x00}}, {2, [3]byte{0xd1, 0x93, 0x00}}, + {2, [3]byte{0xd1, 0x94, 0x00}}, {2, [3]byte{0xd1, 0x95, 0x00}}, + {2, [3]byte{0xd1, 0x96, 0x00}}, {2, [3]byte{0xd1, 0x97, 0x00}}, + {2, [3]byte{0xd1, 0x98, 0x00}}, {2, [3]byte{0xd1, 0x99, 0x00}}, + {2, [3]byte{0xd1, 0x9a, 0x00}}, {2, [3]byte{0xd1, 0x9b, 0x00}}, + {2, [3]byte{0xd1, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xd1, 0x9e, 0x00}}, {2, [3]byte{0xd1, 0x9f, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xfd0000a7, 0xad0000ad, 0xa1000401, 0xa2000402, 0xa3000403, 0xa4000404, 0xa5000405, + 0xa6000406, 0xa7000407, 0xa8000408, 0xa9000409, 0xaa00040a, 0xab00040b, 0xac00040c, 0xae00040e, + 0xaf00040f, 0xb0000410, 0xb1000411, 0xb2000412, 0xb3000413, 0xb4000414, 0xb5000415, 0xb6000416, + 0xb7000417, 0xb8000418, 0xb9000419, 0xba00041a, 0xbb00041b, 0xbc00041c, 0xbd00041d, 0xbe00041e, + 0xbf00041f, 0xc0000420, 0xc1000421, 0xc2000422, 0xc3000423, 0xc4000424, 0xc5000425, 0xc6000426, + 0xc7000427, 0xc8000428, 0xc9000429, 0xca00042a, 0xcb00042b, 0xcc00042c, 0xcd00042d, 0xce00042e, + 0xcf00042f, 0xd0000430, 0xd1000431, 0xd2000432, 0xd3000433, 0xd4000434, 0xd5000435, 0xd6000436, + 0xd7000437, 0xd8000438, 0xd9000439, 0xda00043a, 0xdb00043b, 0xdc00043c, 0xdd00043d, 0xde00043e, + 0xdf00043f, 0xe0000440, 0xe1000441, 0xe2000442, 0xe3000443, 0xe4000444, 0xe5000445, 0xe6000446, + 0xe7000447, 0xe8000448, 0xe9000449, 0xea00044a, 0xeb00044b, 0xec00044c, 0xed00044d, 0xee00044e, + 0xef00044f, 0xf1000451, 0xf2000452, 0xf3000453, 0xf4000454, 0xf5000455, 0xf6000456, 0xf7000457, + 0xf8000458, 0xf9000459, 0xfa00045a, 0xfb00045b, 0xfc00045c, 0xfe00045e, 0xff00045f, 0xf0002116, + 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, + 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, + 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, + 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, 0xf0002116, + }, +} + +// ISO8859_6 is the ISO 8859-6 encoding. +var ISO8859_6 *Charmap = &iso8859_6 + +var iso8859_6 = Charmap{ + name: "ISO 8859-6", + mib: identifier.ISOLatinArabic, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xd8, 0x8c, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xd8, 0x9b, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xd8, 0x9f, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xd8, 0xa1, 0x00}}, + {2, [3]byte{0xd8, 0xa2, 0x00}}, {2, [3]byte{0xd8, 0xa3, 0x00}}, + {2, [3]byte{0xd8, 0xa4, 0x00}}, {2, [3]byte{0xd8, 0xa5, 0x00}}, + {2, [3]byte{0xd8, 0xa6, 0x00}}, {2, [3]byte{0xd8, 0xa7, 0x00}}, + {2, [3]byte{0xd8, 0xa8, 0x00}}, {2, [3]byte{0xd8, 0xa9, 0x00}}, + {2, [3]byte{0xd8, 0xaa, 0x00}}, {2, [3]byte{0xd8, 0xab, 0x00}}, + {2, [3]byte{0xd8, 0xac, 0x00}}, {2, [3]byte{0xd8, 0xad, 0x00}}, + {2, [3]byte{0xd8, 0xae, 0x00}}, {2, [3]byte{0xd8, 0xaf, 0x00}}, + {2, [3]byte{0xd8, 0xb0, 0x00}}, {2, [3]byte{0xd8, 0xb1, 0x00}}, + {2, [3]byte{0xd8, 0xb2, 0x00}}, {2, [3]byte{0xd8, 0xb3, 0x00}}, + {2, [3]byte{0xd8, 0xb4, 0x00}}, {2, [3]byte{0xd8, 0xb5, 0x00}}, + {2, [3]byte{0xd8, 0xb6, 0x00}}, {2, [3]byte{0xd8, 0xb7, 0x00}}, + {2, [3]byte{0xd8, 0xb8, 0x00}}, {2, [3]byte{0xd8, 0xb9, 0x00}}, + {2, [3]byte{0xd8, 0xba, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xd9, 0x80, 0x00}}, {2, [3]byte{0xd9, 0x81, 0x00}}, + {2, [3]byte{0xd9, 0x82, 0x00}}, {2, [3]byte{0xd9, 0x83, 0x00}}, + {2, [3]byte{0xd9, 0x84, 0x00}}, {2, [3]byte{0xd9, 0x85, 0x00}}, + {2, [3]byte{0xd9, 0x86, 0x00}}, {2, [3]byte{0xd9, 0x87, 0x00}}, + {2, [3]byte{0xd9, 0x88, 0x00}}, {2, [3]byte{0xd9, 0x89, 0x00}}, + {2, [3]byte{0xd9, 0x8a, 0x00}}, {2, [3]byte{0xd9, 0x8b, 0x00}}, + {2, [3]byte{0xd9, 0x8c, 0x00}}, {2, [3]byte{0xd9, 0x8d, 0x00}}, + {2, [3]byte{0xd9, 0x8e, 0x00}}, {2, [3]byte{0xd9, 0x8f, 0x00}}, + {2, [3]byte{0xd9, 0x90, 0x00}}, {2, [3]byte{0xd9, 0x91, 0x00}}, + {2, [3]byte{0xd9, 0x92, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa40000a4, 0xad0000ad, 0xac00060c, 0xbb00061b, 0xbf00061f, 0xc1000621, 0xc2000622, + 0xc3000623, 0xc4000624, 0xc5000625, 0xc6000626, 0xc7000627, 0xc8000628, 0xc9000629, 0xca00062a, + 0xcb00062b, 0xcc00062c, 0xcd00062d, 0xce00062e, 0xcf00062f, 0xd0000630, 0xd1000631, 0xd2000632, + 0xd3000633, 0xd4000634, 0xd5000635, 0xd6000636, 0xd7000637, 0xd8000638, 0xd9000639, 0xda00063a, + 0xe0000640, 0xe1000641, 0xe2000642, 0xe3000643, 0xe4000644, 0xe5000645, 0xe6000646, 0xe7000647, + 0xe8000648, 0xe9000649, 0xea00064a, 0xeb00064b, 0xec00064c, 0xed00064d, 0xee00064e, 0xef00064f, + 0xf0000650, 0xf1000651, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, 0xf2000652, + }, +} + +// ISO8859_7 is the ISO 8859-7 encoding. +var ISO8859_7 *Charmap = &iso8859_7 + +var iso8859_7 = Charmap{ + name: "ISO 8859-7", + mib: identifier.ISOLatinGreek, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xe2, 0x82, 0xaf}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xcd, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x95}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xce, 0x84, 0x00}}, {2, [3]byte{0xce, 0x85, 0x00}}, + {2, [3]byte{0xce, 0x86, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xce, 0x88, 0x00}}, {2, [3]byte{0xce, 0x89, 0x00}}, + {2, [3]byte{0xce, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xce, 0x8c, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xce, 0x8e, 0x00}}, {2, [3]byte{0xce, 0x8f, 0x00}}, + {2, [3]byte{0xce, 0x90, 0x00}}, {2, [3]byte{0xce, 0x91, 0x00}}, + {2, [3]byte{0xce, 0x92, 0x00}}, {2, [3]byte{0xce, 0x93, 0x00}}, + {2, [3]byte{0xce, 0x94, 0x00}}, {2, [3]byte{0xce, 0x95, 0x00}}, + {2, [3]byte{0xce, 0x96, 0x00}}, {2, [3]byte{0xce, 0x97, 0x00}}, + {2, [3]byte{0xce, 0x98, 0x00}}, {2, [3]byte{0xce, 0x99, 0x00}}, + {2, [3]byte{0xce, 0x9a, 0x00}}, {2, [3]byte{0xce, 0x9b, 0x00}}, + {2, [3]byte{0xce, 0x9c, 0x00}}, {2, [3]byte{0xce, 0x9d, 0x00}}, + {2, [3]byte{0xce, 0x9e, 0x00}}, {2, [3]byte{0xce, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0xa0, 0x00}}, {2, [3]byte{0xce, 0xa1, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xce, 0xa3, 0x00}}, + {2, [3]byte{0xce, 0xa4, 0x00}}, {2, [3]byte{0xce, 0xa5, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0xa7, 0x00}}, + {2, [3]byte{0xce, 0xa8, 0x00}}, {2, [3]byte{0xce, 0xa9, 0x00}}, + {2, [3]byte{0xce, 0xaa, 0x00}}, {2, [3]byte{0xce, 0xab, 0x00}}, + {2, [3]byte{0xce, 0xac, 0x00}}, {2, [3]byte{0xce, 0xad, 0x00}}, + {2, [3]byte{0xce, 0xae, 0x00}}, {2, [3]byte{0xce, 0xaf, 0x00}}, + {2, [3]byte{0xce, 0xb0, 0x00}}, {2, [3]byte{0xce, 0xb1, 0x00}}, + {2, [3]byte{0xce, 0xb2, 0x00}}, {2, [3]byte{0xce, 0xb3, 0x00}}, + {2, [3]byte{0xce, 0xb4, 0x00}}, {2, [3]byte{0xce, 0xb5, 0x00}}, + {2, [3]byte{0xce, 0xb6, 0x00}}, {2, [3]byte{0xce, 0xb7, 0x00}}, + {2, [3]byte{0xce, 0xb8, 0x00}}, {2, [3]byte{0xce, 0xb9, 0x00}}, + {2, [3]byte{0xce, 0xba, 0x00}}, {2, [3]byte{0xce, 0xbb, 0x00}}, + {2, [3]byte{0xce, 0xbc, 0x00}}, {2, [3]byte{0xce, 0xbd, 0x00}}, + {2, [3]byte{0xce, 0xbe, 0x00}}, {2, [3]byte{0xce, 0xbf, 0x00}}, + {2, [3]byte{0xcf, 0x80, 0x00}}, {2, [3]byte{0xcf, 0x81, 0x00}}, + {2, [3]byte{0xcf, 0x82, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xcf, 0x84, 0x00}}, {2, [3]byte{0xcf, 0x85, 0x00}}, + {2, [3]byte{0xcf, 0x86, 0x00}}, {2, [3]byte{0xcf, 0x87, 0x00}}, + {2, [3]byte{0xcf, 0x88, 0x00}}, {2, [3]byte{0xcf, 0x89, 0x00}}, + {2, [3]byte{0xcf, 0x8a, 0x00}}, {2, [3]byte{0xcf, 0x8b, 0x00}}, + {2, [3]byte{0xcf, 0x8c, 0x00}}, {2, [3]byte{0xcf, 0x8d, 0x00}}, + {2, [3]byte{0xcf, 0x8e, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa30000a3, 0xa60000a6, 0xa70000a7, 0xa80000a8, 0xa90000a9, 0xab0000ab, 0xac0000ac, + 0xad0000ad, 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb70000b7, 0xbb0000bb, 0xbd0000bd, + 0xaa00037a, 0xb4000384, 0xb5000385, 0xb6000386, 0xb8000388, 0xb9000389, 0xba00038a, 0xbc00038c, + 0xbe00038e, 0xbf00038f, 0xc0000390, 0xc1000391, 0xc2000392, 0xc3000393, 0xc4000394, 0xc5000395, + 0xc6000396, 0xc7000397, 0xc8000398, 0xc9000399, 0xca00039a, 0xcb00039b, 0xcc00039c, 0xcd00039d, + 0xce00039e, 0xcf00039f, 0xd00003a0, 0xd10003a1, 0xd30003a3, 0xd40003a4, 0xd50003a5, 0xd60003a6, + 0xd70003a7, 0xd80003a8, 0xd90003a9, 0xda0003aa, 0xdb0003ab, 0xdc0003ac, 0xdd0003ad, 0xde0003ae, + 0xdf0003af, 0xe00003b0, 0xe10003b1, 0xe20003b2, 0xe30003b3, 0xe40003b4, 0xe50003b5, 0xe60003b6, + 0xe70003b7, 0xe80003b8, 0xe90003b9, 0xea0003ba, 0xeb0003bb, 0xec0003bc, 0xed0003bd, 0xee0003be, + 0xef0003bf, 0xf00003c0, 0xf10003c1, 0xf20003c2, 0xf30003c3, 0xf40003c4, 0xf50003c5, 0xf60003c6, + 0xf70003c7, 0xf80003c8, 0xf90003c9, 0xfa0003ca, 0xfb0003cb, 0xfc0003cc, 0xfd0003cd, 0xfe0003ce, + 0xaf002015, 0xa1002018, 0xa2002019, 0xa40020ac, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, + 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, + 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, + 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, + 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, 0xa50020af, + }, +} + +// ISO8859_8 is the ISO 8859-8 encoding. +var ISO8859_8 *Charmap = &iso8859_8 + +var iso8859_8 = Charmap{ + name: "ISO 8859-8", + mib: identifier.ISOLatinHebrew, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0x97, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x97}}, + {2, [3]byte{0xd7, 0x90, 0x00}}, {2, [3]byte{0xd7, 0x91, 0x00}}, + {2, [3]byte{0xd7, 0x92, 0x00}}, {2, [3]byte{0xd7, 0x93, 0x00}}, + {2, [3]byte{0xd7, 0x94, 0x00}}, {2, [3]byte{0xd7, 0x95, 0x00}}, + {2, [3]byte{0xd7, 0x96, 0x00}}, {2, [3]byte{0xd7, 0x97, 0x00}}, + {2, [3]byte{0xd7, 0x98, 0x00}}, {2, [3]byte{0xd7, 0x99, 0x00}}, + {2, [3]byte{0xd7, 0x9a, 0x00}}, {2, [3]byte{0xd7, 0x9b, 0x00}}, + {2, [3]byte{0xd7, 0x9c, 0x00}}, {2, [3]byte{0xd7, 0x9d, 0x00}}, + {2, [3]byte{0xd7, 0x9e, 0x00}}, {2, [3]byte{0xd7, 0x9f, 0x00}}, + {2, [3]byte{0xd7, 0xa0, 0x00}}, {2, [3]byte{0xd7, 0xa1, 0x00}}, + {2, [3]byte{0xd7, 0xa2, 0x00}}, {2, [3]byte{0xd7, 0xa3, 0x00}}, + {2, [3]byte{0xd7, 0xa4, 0x00}}, {2, [3]byte{0xd7, 0xa5, 0x00}}, + {2, [3]byte{0xd7, 0xa6, 0x00}}, {2, [3]byte{0xd7, 0xa7, 0x00}}, + {2, [3]byte{0xd7, 0xa8, 0x00}}, {2, [3]byte{0xd7, 0xa9, 0x00}}, + {2, [3]byte{0xd7, 0xaa, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x8e}}, + {3, [3]byte{0xe2, 0x80, 0x8f}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, 0xa80000a8, + 0xa90000a9, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, 0xb00000b0, 0xb10000b1, + 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, 0xb80000b8, 0xb90000b9, + 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xaa0000d7, 0xba0000f7, 0xe00005d0, 0xe10005d1, + 0xe20005d2, 0xe30005d3, 0xe40005d4, 0xe50005d5, 0xe60005d6, 0xe70005d7, 0xe80005d8, 0xe90005d9, + 0xea0005da, 0xeb0005db, 0xec0005dc, 0xed0005dd, 0xee0005de, 0xef0005df, 0xf00005e0, 0xf10005e1, + 0xf20005e2, 0xf30005e3, 0xf40005e4, 0xf50005e5, 0xf60005e6, 0xf70005e7, 0xf80005e8, 0xf90005e9, + 0xfa0005ea, 0xfd00200e, 0xfe00200f, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, 0xdf002017, + }, +} + +// ISO8859_9 is the ISO 8859-9 encoding. +var ISO8859_9 *Charmap = &iso8859_9 + +var iso8859_9 = Charmap{ + name: "ISO 8859-9", + mib: identifier.ISOLatin5, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc2, 0x80, 0x00}}, {2, [3]byte{0xc2, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0x82, 0x00}}, {2, [3]byte{0xc2, 0x83, 0x00}}, + {2, [3]byte{0xc2, 0x84, 0x00}}, {2, [3]byte{0xc2, 0x85, 0x00}}, + {2, [3]byte{0xc2, 0x86, 0x00}}, {2, [3]byte{0xc2, 0x87, 0x00}}, + {2, [3]byte{0xc2, 0x88, 0x00}}, {2, [3]byte{0xc2, 0x89, 0x00}}, + {2, [3]byte{0xc2, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0x8b, 0x00}}, + {2, [3]byte{0xc2, 0x8c, 0x00}}, {2, [3]byte{0xc2, 0x8d, 0x00}}, + {2, [3]byte{0xc2, 0x8e, 0x00}}, {2, [3]byte{0xc2, 0x8f, 0x00}}, + {2, [3]byte{0xc2, 0x90, 0x00}}, {2, [3]byte{0xc2, 0x91, 0x00}}, + {2, [3]byte{0xc2, 0x92, 0x00}}, {2, [3]byte{0xc2, 0x93, 0x00}}, + {2, [3]byte{0xc2, 0x94, 0x00}}, {2, [3]byte{0xc2, 0x95, 0x00}}, + {2, [3]byte{0xc2, 0x96, 0x00}}, {2, [3]byte{0xc2, 0x97, 0x00}}, + {2, [3]byte{0xc2, 0x98, 0x00}}, {2, [3]byte{0xc2, 0x99, 0x00}}, + {2, [3]byte{0xc2, 0x9a, 0x00}}, {2, [3]byte{0xc2, 0x9b, 0x00}}, + {2, [3]byte{0xc2, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0x9d, 0x00}}, + {2, [3]byte{0xc2, 0x9e, 0x00}}, {2, [3]byte{0xc2, 0x9f, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc4, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc4, 0xb0, 0x00}}, + {2, [3]byte{0xc5, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x9f, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc4, 0xb1, 0x00}}, + {2, [3]byte{0xc5, 0x9f, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0x80000080, 0x81000081, 0x82000082, 0x83000083, 0x84000084, 0x85000085, 0x86000086, 0x87000087, + 0x88000088, 0x89000089, 0x8a00008a, 0x8b00008b, 0x8c00008c, 0x8d00008d, 0x8e00008e, 0x8f00008f, + 0x90000090, 0x91000091, 0x92000092, 0x93000093, 0x94000094, 0x95000095, 0x96000096, 0x97000097, + 0x98000098, 0x99000099, 0x9a00009a, 0x9b00009b, 0x9c00009c, 0x9d00009d, 0x9e00009e, 0x9f00009f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, + 0xa80000a8, 0xa90000a9, 0xaa0000aa, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, + 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, + 0xb80000b8, 0xb90000b9, 0xba0000ba, 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xbf0000bf, + 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, + 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd10000d1, 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd70000d7, 0xd80000d8, + 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdf0000df, 0xe00000e0, 0xe10000e1, 0xe20000e2, + 0xe30000e3, 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, 0xe80000e8, 0xe90000e9, 0xea0000ea, + 0xeb0000eb, 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf10000f1, 0xf20000f2, 0xf30000f3, + 0xf40000f4, 0xf50000f5, 0xf60000f6, 0xf70000f7, 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, + 0xfc0000fc, 0xff0000ff, 0xd000011e, 0xf000011f, 0xdd000130, 0xfd000131, 0xde00015e, 0xfe00015f, + }, +} + +// ISO8859_10 is the ISO 8859-10 encoding. +var ISO8859_10 *Charmap = &iso8859_10 + +var iso8859_10 = Charmap{ + name: "ISO 8859-10", + mib: identifier.ISOLatin6, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc4, 0x84, 0x00}}, + {2, [3]byte{0xc4, 0x92, 0x00}}, {2, [3]byte{0xc4, 0xa2, 0x00}}, + {2, [3]byte{0xc4, 0xaa, 0x00}}, {2, [3]byte{0xc4, 0xa8, 0x00}}, + {2, [3]byte{0xc4, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc4, 0xbb, 0x00}}, {2, [3]byte{0xc4, 0x90, 0x00}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {2, [3]byte{0xc5, 0xa6, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc5, 0xaa, 0x00}}, {2, [3]byte{0xc5, 0x8a, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc4, 0x85, 0x00}}, + {2, [3]byte{0xc4, 0x93, 0x00}}, {2, [3]byte{0xc4, 0xa3, 0x00}}, + {2, [3]byte{0xc4, 0xab, 0x00}}, {2, [3]byte{0xc4, 0xa9, 0x00}}, + {2, [3]byte{0xc4, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc4, 0xbc, 0x00}}, {2, [3]byte{0xc4, 0x91, 0x00}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {2, [3]byte{0xc5, 0xa7, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x95}}, + {2, [3]byte{0xc5, 0xab, 0x00}}, {2, [3]byte{0xc5, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc4, 0xae, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {2, [3]byte{0xc5, 0x85, 0x00}}, + {2, [3]byte{0xc5, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc5, 0xa8, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc5, 0xb2, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc4, 0x81, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc4, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc4, 0x99, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc4, 0x97, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc5, 0x86, 0x00}}, + {2, [3]byte{0xc5, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc5, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc5, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc4, 0xb8, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa70000a7, 0xad0000ad, 0xb00000b0, 0xb70000b7, 0xc10000c1, 0xc20000c2, 0xc30000c3, + 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc90000c9, 0xcb0000cb, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd00000d0, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd80000d8, 0xda0000da, 0xdb0000db, + 0xdc0000dc, 0xdd0000dd, 0xde0000de, 0xdf0000df, 0xe10000e1, 0xe20000e2, 0xe30000e3, 0xe40000e4, + 0xe50000e5, 0xe60000e6, 0xe90000e9, 0xeb0000eb, 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf00000f0, + 0xf30000f3, 0xf40000f4, 0xf50000f5, 0xf60000f6, 0xf80000f8, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, + 0xfd0000fd, 0xfe0000fe, 0xc0000100, 0xe0000101, 0xa1000104, 0xb1000105, 0xc800010c, 0xe800010d, + 0xa9000110, 0xb9000111, 0xa2000112, 0xb2000113, 0xcc000116, 0xec000117, 0xca000118, 0xea000119, + 0xa3000122, 0xb3000123, 0xa5000128, 0xb5000129, 0xa400012a, 0xb400012b, 0xc700012e, 0xe700012f, + 0xa6000136, 0xb6000137, 0xff000138, 0xa800013b, 0xb800013c, 0xd1000145, 0xf1000146, 0xaf00014a, + 0xbf00014b, 0xd200014c, 0xf200014d, 0xaa000160, 0xba000161, 0xab000166, 0xbb000167, 0xd7000168, + 0xf7000169, 0xae00016a, 0xbe00016b, 0xd9000172, 0xf9000173, 0xac00017d, 0xbc00017e, 0xbd002015, + 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, + 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, + 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, + 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, 0xbd002015, + }, +} + +// ISO8859_13 is the ISO 8859-13 encoding. +var ISO8859_13 *Charmap = &iso8859_13 + +var iso8859_13 = Charmap{ + name: "ISO 8859-13", + mib: identifier.ISO885913, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x9d}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x9e}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc5, 0x96, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc3, 0x86, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9c}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc5, 0x97, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}}, + {2, [3]byte{0xc4, 0x84, 0x00}}, {2, [3]byte{0xc4, 0xae, 0x00}}, + {2, [3]byte{0xc4, 0x80, 0x00}}, {2, [3]byte{0xc4, 0x86, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc4, 0x92, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc5, 0xb9, 0x00}}, {2, [3]byte{0xc4, 0x96, 0x00}}, + {2, [3]byte{0xc4, 0xa2, 0x00}}, {2, [3]byte{0xc4, 0xb6, 0x00}}, + {2, [3]byte{0xc4, 0xaa, 0x00}}, {2, [3]byte{0xc4, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {2, [3]byte{0xc5, 0x83, 0x00}}, + {2, [3]byte{0xc5, 0x85, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc5, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc5, 0xb2, 0x00}}, {2, [3]byte{0xc5, 0x81, 0x00}}, + {2, [3]byte{0xc5, 0x9a, 0x00}}, {2, [3]byte{0xc5, 0xaa, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc4, 0x85, 0x00}}, {2, [3]byte{0xc4, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x81, 0x00}}, {2, [3]byte{0xc4, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc4, 0x99, 0x00}}, {2, [3]byte{0xc4, 0x93, 0x00}}, + {2, [3]byte{0xc4, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc5, 0xba, 0x00}}, {2, [3]byte{0xc4, 0x97, 0x00}}, + {2, [3]byte{0xc4, 0xa3, 0x00}}, {2, [3]byte{0xc4, 0xb7, 0x00}}, + {2, [3]byte{0xc4, 0xab, 0x00}}, {2, [3]byte{0xc4, 0xbc, 0x00}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {2, [3]byte{0xc5, 0x84, 0x00}}, + {2, [3]byte{0xc5, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc5, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc5, 0xb3, 0x00}}, {2, [3]byte{0xc5, 0x82, 0x00}}, + {2, [3]byte{0xc5, 0x9b, 0x00}}, {2, [3]byte{0xc5, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc5, 0xbc, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x99}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa60000a6, 0xa70000a7, 0xa90000a9, 0xab0000ab, + 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb50000b5, + 0xb60000b6, 0xb70000b7, 0xb90000b9, 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xc40000c4, + 0xc50000c5, 0xaf0000c6, 0xc90000c9, 0xd30000d3, 0xd50000d5, 0xd60000d6, 0xd70000d7, 0xa80000d8, + 0xdc0000dc, 0xdf0000df, 0xe40000e4, 0xe50000e5, 0xbf0000e6, 0xe90000e9, 0xf30000f3, 0xf50000f5, + 0xf60000f6, 0xf70000f7, 0xb80000f8, 0xfc0000fc, 0xc2000100, 0xe2000101, 0xc0000104, 0xe0000105, + 0xc3000106, 0xe3000107, 0xc800010c, 0xe800010d, 0xc7000112, 0xe7000113, 0xcb000116, 0xeb000117, + 0xc6000118, 0xe6000119, 0xcc000122, 0xec000123, 0xce00012a, 0xee00012b, 0xc100012e, 0xe100012f, + 0xcd000136, 0xed000137, 0xcf00013b, 0xef00013c, 0xd9000141, 0xf9000142, 0xd1000143, 0xf1000144, + 0xd2000145, 0xf2000146, 0xd400014c, 0xf400014d, 0xaa000156, 0xba000157, 0xda00015a, 0xfa00015b, + 0xd0000160, 0xf0000161, 0xdb00016a, 0xfb00016b, 0xd8000172, 0xf8000173, 0xca000179, 0xea00017a, + 0xdd00017b, 0xfd00017c, 0xde00017d, 0xfe00017e, 0xff002019, 0xb400201c, 0xa100201d, 0xa500201e, + 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, + 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, + 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, + 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, 0xa500201e, + }, +} + +// ISO8859_14 is the ISO 8859-14 encoding. +var ISO8859_14 *Charmap = &iso8859_14 + +var iso8859_14 = Charmap{ + name: "ISO 8859-14", + mib: identifier.ISO885914, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xe1, 0xb8, 0x82}}, + {3, [3]byte{0xe1, 0xb8, 0x83}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc4, 0x8a, 0x00}}, {2, [3]byte{0xc4, 0x8b, 0x00}}, + {3, [3]byte{0xe1, 0xb8, 0x8a}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {3, [3]byte{0xe1, 0xba, 0x80}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {3, [3]byte{0xe1, 0xba, 0x82}}, {3, [3]byte{0xe1, 0xb8, 0x8b}}, + {3, [3]byte{0xe1, 0xbb, 0xb2}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc5, 0xb8, 0x00}}, + {3, [3]byte{0xe1, 0xb8, 0x9e}}, {3, [3]byte{0xe1, 0xb8, 0x9f}}, + {2, [3]byte{0xc4, 0xa0, 0x00}}, {2, [3]byte{0xc4, 0xa1, 0x00}}, + {3, [3]byte{0xe1, 0xb9, 0x80}}, {3, [3]byte{0xe1, 0xb9, 0x81}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {3, [3]byte{0xe1, 0xb9, 0x96}}, + {3, [3]byte{0xe1, 0xba, 0x81}}, {3, [3]byte{0xe1, 0xb9, 0x97}}, + {3, [3]byte{0xe1, 0xba, 0x83}}, {3, [3]byte{0xe1, 0xb9, 0xa0}}, + {3, [3]byte{0xe1, 0xbb, 0xb3}}, {3, [3]byte{0xe1, 0xba, 0x84}}, + {3, [3]byte{0xe1, 0xba, 0x85}}, {3, [3]byte{0xe1, 0xb9, 0xa1}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc5, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {3, [3]byte{0xe1, 0xb9, 0xaa}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc5, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc5, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {3, [3]byte{0xe1, 0xb9, 0xab}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc5, 0xb7, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa30000a3, 0xa70000a7, 0xa90000a9, 0xad0000ad, 0xae0000ae, 0xb60000b6, 0xc00000c0, + 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, 0xc80000c8, + 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, 0xd10000d1, + 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd80000d8, 0xd90000d9, 0xda0000da, + 0xdb0000db, 0xdc0000dc, 0xdd0000dd, 0xdf0000df, 0xe00000e0, 0xe10000e1, 0xe20000e2, 0xe30000e3, + 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, + 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf10000f1, 0xf20000f2, 0xf30000f3, 0xf40000f4, + 0xf50000f5, 0xf60000f6, 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xfd0000fd, + 0xff0000ff, 0xa400010a, 0xa500010b, 0xb2000120, 0xb3000121, 0xd0000174, 0xf0000175, 0xde000176, + 0xfe000177, 0xaf000178, 0xa1001e02, 0xa2001e03, 0xa6001e0a, 0xab001e0b, 0xb0001e1e, 0xb1001e1f, + 0xb4001e40, 0xb5001e41, 0xb7001e56, 0xb9001e57, 0xbb001e60, 0xbf001e61, 0xd7001e6a, 0xf7001e6b, + 0xa8001e80, 0xb8001e81, 0xaa001e82, 0xba001e83, 0xbd001e84, 0xbe001e85, 0xac001ef2, 0xbc001ef3, + 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, + 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, + 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, + 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, 0xbc001ef3, + }, +} + +// ISO8859_15 is the ISO 8859-15 encoding. +var ISO8859_15 *Charmap = &iso8859_15 + +var iso8859_15 = Charmap{ + name: "ISO 8859-15", + mib: identifier.ISO885915, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {2, [3]byte{0xc5, 0x93, 0x00}}, + {2, [3]byte{0xc5, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa50000a5, 0xa70000a7, 0xa90000a9, 0xaa0000aa, + 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, 0xb00000b0, 0xb10000b1, 0xb20000b2, + 0xb30000b3, 0xb50000b5, 0xb60000b6, 0xb70000b7, 0xb90000b9, 0xba0000ba, 0xbb0000bb, 0xbf0000bf, + 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, + 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd00000d0, 0xd10000d1, 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd70000d7, + 0xd80000d8, 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdd0000dd, 0xde0000de, 0xdf0000df, + 0xe00000e0, 0xe10000e1, 0xe20000e2, 0xe30000e3, 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, + 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, + 0xf00000f0, 0xf10000f1, 0xf20000f2, 0xf30000f3, 0xf40000f4, 0xf50000f5, 0xf60000f6, 0xf70000f7, + 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xfd0000fd, 0xfe0000fe, 0xff0000ff, + 0xbc000152, 0xbd000153, 0xa6000160, 0xa8000161, 0xbe000178, 0xb400017d, 0xb800017e, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + }, +} + +// ISO8859_16 is the ISO 8859-16 encoding. +var ISO8859_16 *Charmap = &iso8859_16 + +var iso8859_16 = Charmap{ + name: "ISO 8859-16", + mib: identifier.ISO885916, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc4, 0x84, 0x00}}, + {2, [3]byte{0xc4, 0x85, 0x00}}, {2, [3]byte{0xc5, 0x81, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xe2, 0x80, 0x9e}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc8, 0x98, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc5, 0xb9, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc5, 0xba, 0x00}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc5, 0x82, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x9d}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xc4, 0x8d, 0x00}}, + {2, [3]byte{0xc8, 0x99, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {2, [3]byte{0xc5, 0x93, 0x00}}, + {2, [3]byte{0xc5, 0xb8, 0x00}}, {2, [3]byte{0xc5, 0xbc, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc4, 0x82, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc4, 0x86, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc4, 0x90, 0x00}}, {2, [3]byte{0xc5, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc5, 0x90, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc5, 0x9a, 0x00}}, + {2, [3]byte{0xc5, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc4, 0x98, 0x00}}, + {2, [3]byte{0xc8, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc4, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x91, 0x00}}, {2, [3]byte{0xc5, 0x84, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc5, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc5, 0x9b, 0x00}}, + {2, [3]byte{0xc5, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc4, 0x99, 0x00}}, + {2, [3]byte{0xc8, 0x9b, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa70000a7, 0xa90000a9, 0xab0000ab, 0xad0000ad, 0xb00000b0, 0xb10000b1, 0xb60000b6, + 0xb70000b7, 0xbb0000bb, 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc40000c4, 0xc60000c6, 0xc70000c7, + 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd60000d6, 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, + 0xdf0000df, 0xe00000e0, 0xe10000e1, 0xe20000e2, 0xe40000e4, 0xe60000e6, 0xe70000e7, 0xe80000e8, + 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf20000f2, + 0xf30000f3, 0xf40000f4, 0xf60000f6, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xff0000ff, + 0xc3000102, 0xe3000103, 0xa1000104, 0xa2000105, 0xc5000106, 0xe5000107, 0xb200010c, 0xb900010d, + 0xd0000110, 0xf0000111, 0xdd000118, 0xfd000119, 0xa3000141, 0xb3000142, 0xd1000143, 0xf1000144, + 0xd5000150, 0xf5000151, 0xbc000152, 0xbd000153, 0xd700015a, 0xf700015b, 0xa6000160, 0xa8000161, + 0xd8000170, 0xf8000171, 0xbe000178, 0xac000179, 0xae00017a, 0xaf00017b, 0xbf00017c, 0xb400017d, + 0xb800017e, 0xaa000218, 0xba000219, 0xde00021a, 0xfe00021b, 0xb500201d, 0xa500201e, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, 0xa40020ac, + }, +} + +// KOI8R is the KOI8-R encoding. +var KOI8R *Charmap = &koi8R + +var koi8R = Charmap{ + name: "KOI8-R", + mib: identifier.KOI8R, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x9c}}, {3, [3]byte{0xe2, 0x94, 0xa4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xbc}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x90}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x8c, 0xa0}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {3, [3]byte{0xe2, 0x88, 0x9a}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {3, [3]byte{0xe2, 0x89, 0xa4}}, {3, [3]byte{0xe2, 0x89, 0xa5}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x90}}, {3, [3]byte{0xe2, 0x95, 0x91}}, + {3, [3]byte{0xe2, 0x95, 0x92}}, {2, [3]byte{0xd1, 0x91, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0x96}}, + {3, [3]byte{0xe2, 0x95, 0x97}}, {3, [3]byte{0xe2, 0x95, 0x98}}, + {3, [3]byte{0xe2, 0x95, 0x99}}, {3, [3]byte{0xe2, 0x95, 0x9a}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x95, 0x9c}}, + {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9e}}, + {3, [3]byte{0xe2, 0x95, 0x9f}}, {3, [3]byte{0xe2, 0x95, 0xa0}}, + {3, [3]byte{0xe2, 0x95, 0xa1}}, {2, [3]byte{0xd0, 0x81, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {3, [3]byte{0xe2, 0x95, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa5}}, + {3, [3]byte{0xe2, 0x95, 0xa6}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa9}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x95, 0xab}}, + {3, [3]byte{0xe2, 0x95, 0xac}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {2, [3]byte{0xd0, 0xb0, 0x00}}, + {2, [3]byte{0xd0, 0xb1, 0x00}}, {2, [3]byte{0xd1, 0x86, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0xb5, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd0, 0xb3, 0x00}}, + {2, [3]byte{0xd1, 0x85, 0x00}}, {2, [3]byte{0xd0, 0xb8, 0x00}}, + {2, [3]byte{0xd0, 0xb9, 0x00}}, {2, [3]byte{0xd0, 0xba, 0x00}}, + {2, [3]byte{0xd0, 0xbb, 0x00}}, {2, [3]byte{0xd0, 0xbc, 0x00}}, + {2, [3]byte{0xd0, 0xbd, 0x00}}, {2, [3]byte{0xd0, 0xbe, 0x00}}, + {2, [3]byte{0xd0, 0xbf, 0x00}}, {2, [3]byte{0xd1, 0x8f, 0x00}}, + {2, [3]byte{0xd1, 0x80, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x82, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd0, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0xb2, 0x00}}, + {2, [3]byte{0xd1, 0x8c, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd0, 0xb7, 0x00}}, {2, [3]byte{0xd1, 0x88, 0x00}}, + {2, [3]byte{0xd1, 0x8d, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x87, 0x00}}, {2, [3]byte{0xd1, 0x8a, 0x00}}, + {2, [3]byte{0xd0, 0xae, 0x00}}, {2, [3]byte{0xd0, 0x90, 0x00}}, + {2, [3]byte{0xd0, 0x91, 0x00}}, {2, [3]byte{0xd0, 0xa6, 0x00}}, + {2, [3]byte{0xd0, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd0, 0xa4, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xd0, 0xa5, 0x00}}, {2, [3]byte{0xd0, 0x98, 0x00}}, + {2, [3]byte{0xd0, 0x99, 0x00}}, {2, [3]byte{0xd0, 0x9a, 0x00}}, + {2, [3]byte{0xd0, 0x9b, 0x00}}, {2, [3]byte{0xd0, 0x9c, 0x00}}, + {2, [3]byte{0xd0, 0x9d, 0x00}}, {2, [3]byte{0xd0, 0x9e, 0x00}}, + {2, [3]byte{0xd0, 0x9f, 0x00}}, {2, [3]byte{0xd0, 0xaf, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0xa1, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd0, 0xa3, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x92, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {2, [3]byte{0xd0, 0xab, 0x00}}, + {2, [3]byte{0xd0, 0x97, 0x00}}, {2, [3]byte{0xd0, 0xa8, 0x00}}, + {2, [3]byte{0xd0, 0xad, 0x00}}, {2, [3]byte{0xd0, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0xa7, 0x00}}, {2, [3]byte{0xd0, 0xaa, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0x9a0000a0, 0xbf0000a9, 0x9c0000b0, 0x9d0000b2, 0x9e0000b7, 0x9f0000f7, 0xb3000401, 0xe1000410, + 0xe2000411, 0xf7000412, 0xe7000413, 0xe4000414, 0xe5000415, 0xf6000416, 0xfa000417, 0xe9000418, + 0xea000419, 0xeb00041a, 0xec00041b, 0xed00041c, 0xee00041d, 0xef00041e, 0xf000041f, 0xf2000420, + 0xf3000421, 0xf4000422, 0xf5000423, 0xe6000424, 0xe8000425, 0xe3000426, 0xfe000427, 0xfb000428, + 0xfd000429, 0xff00042a, 0xf900042b, 0xf800042c, 0xfc00042d, 0xe000042e, 0xf100042f, 0xc1000430, + 0xc2000431, 0xd7000432, 0xc7000433, 0xc4000434, 0xc5000435, 0xd6000436, 0xda000437, 0xc9000438, + 0xca000439, 0xcb00043a, 0xcc00043b, 0xcd00043c, 0xce00043d, 0xcf00043e, 0xd000043f, 0xd2000440, + 0xd3000441, 0xd4000442, 0xd5000443, 0xc6000444, 0xc8000445, 0xc3000446, 0xde000447, 0xdb000448, + 0xdd000449, 0xdf00044a, 0xd900044b, 0xd800044c, 0xdc00044d, 0xc000044e, 0xd100044f, 0xa3000451, + 0x95002219, 0x9600221a, 0x97002248, 0x98002264, 0x99002265, 0x93002320, 0x9b002321, 0x80002500, + 0x81002502, 0x8200250c, 0x83002510, 0x84002514, 0x85002518, 0x8600251c, 0x87002524, 0x8800252c, + 0x89002534, 0x8a00253c, 0xa0002550, 0xa1002551, 0xa2002552, 0xa4002553, 0xa5002554, 0xa6002555, + 0xa7002556, 0xa8002557, 0xa9002558, 0xaa002559, 0xab00255a, 0xac00255b, 0xad00255c, 0xae00255d, + 0xaf00255e, 0xb000255f, 0xb1002560, 0xb2002561, 0xb4002562, 0xb5002563, 0xb6002564, 0xb7002565, + 0xb8002566, 0xb9002567, 0xba002568, 0xbb002569, 0xbc00256a, 0xbd00256b, 0xbe00256c, 0x8b002580, + 0x8c002584, 0x8d002588, 0x8e00258c, 0x8f002590, 0x90002591, 0x91002592, 0x92002593, 0x940025a0, + }, +} + +// KOI8U is the KOI8-U encoding. +var KOI8U *Charmap = &koi8U + +var koi8U = Charmap{ + name: "KOI8-U", + mib: identifier.KOI8U, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0x82}}, + {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x94, 0x90}}, + {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0x98}}, + {3, [3]byte{0xe2, 0x94, 0x9c}}, {3, [3]byte{0xe2, 0x94, 0xa4}}, + {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0xb4}}, + {3, [3]byte{0xe2, 0x94, 0xbc}}, {3, [3]byte{0xe2, 0x96, 0x80}}, + {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x88}}, + {3, [3]byte{0xe2, 0x96, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x90}}, + {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}}, + {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x8c, 0xa0}}, + {3, [3]byte{0xe2, 0x96, 0xa0}}, {3, [3]byte{0xe2, 0x88, 0x99}}, + {3, [3]byte{0xe2, 0x88, 0x9a}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {3, [3]byte{0xe2, 0x89, 0xa4}}, {3, [3]byte{0xe2, 0x89, 0xa5}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0xa1}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb2, 0x00}}, + {2, [3]byte{0xc2, 0xb7, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x90}}, {3, [3]byte{0xe2, 0x95, 0x91}}, + {3, [3]byte{0xe2, 0x95, 0x92}}, {2, [3]byte{0xd1, 0x91, 0x00}}, + {2, [3]byte{0xd1, 0x94, 0x00}}, {3, [3]byte{0xe2, 0x95, 0x94}}, + {2, [3]byte{0xd1, 0x96, 0x00}}, {2, [3]byte{0xd1, 0x97, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0x97}}, {3, [3]byte{0xe2, 0x95, 0x98}}, + {3, [3]byte{0xe2, 0x95, 0x99}}, {3, [3]byte{0xe2, 0x95, 0x9a}}, + {3, [3]byte{0xe2, 0x95, 0x9b}}, {2, [3]byte{0xd2, 0x91, 0x00}}, + {2, [3]byte{0xd1, 0x9e, 0x00}}, {3, [3]byte{0xe2, 0x95, 0x9e}}, + {3, [3]byte{0xe2, 0x95, 0x9f}}, {3, [3]byte{0xe2, 0x95, 0xa0}}, + {3, [3]byte{0xe2, 0x95, 0xa1}}, {2, [3]byte{0xd0, 0x81, 0x00}}, + {2, [3]byte{0xd0, 0x84, 0x00}}, {3, [3]byte{0xe2, 0x95, 0xa3}}, + {2, [3]byte{0xd0, 0x86, 0x00}}, {2, [3]byte{0xd0, 0x87, 0x00}}, + {3, [3]byte{0xe2, 0x95, 0xa6}}, {3, [3]byte{0xe2, 0x95, 0xa7}}, + {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa9}}, + {3, [3]byte{0xe2, 0x95, 0xaa}}, {2, [3]byte{0xd2, 0x90, 0x00}}, + {2, [3]byte{0xd0, 0x8e, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {2, [3]byte{0xd0, 0xb0, 0x00}}, + {2, [3]byte{0xd0, 0xb1, 0x00}}, {2, [3]byte{0xd1, 0x86, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0xb5, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd0, 0xb3, 0x00}}, + {2, [3]byte{0xd1, 0x85, 0x00}}, {2, [3]byte{0xd0, 0xb8, 0x00}}, + {2, [3]byte{0xd0, 0xb9, 0x00}}, {2, [3]byte{0xd0, 0xba, 0x00}}, + {2, [3]byte{0xd0, 0xbb, 0x00}}, {2, [3]byte{0xd0, 0xbc, 0x00}}, + {2, [3]byte{0xd0, 0xbd, 0x00}}, {2, [3]byte{0xd0, 0xbe, 0x00}}, + {2, [3]byte{0xd0, 0xbf, 0x00}}, {2, [3]byte{0xd1, 0x8f, 0x00}}, + {2, [3]byte{0xd1, 0x80, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x82, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd0, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0xb2, 0x00}}, + {2, [3]byte{0xd1, 0x8c, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd0, 0xb7, 0x00}}, {2, [3]byte{0xd1, 0x88, 0x00}}, + {2, [3]byte{0xd1, 0x8d, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x87, 0x00}}, {2, [3]byte{0xd1, 0x8a, 0x00}}, + {2, [3]byte{0xd0, 0xae, 0x00}}, {2, [3]byte{0xd0, 0x90, 0x00}}, + {2, [3]byte{0xd0, 0x91, 0x00}}, {2, [3]byte{0xd0, 0xa6, 0x00}}, + {2, [3]byte{0xd0, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd0, 0xa4, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xd0, 0xa5, 0x00}}, {2, [3]byte{0xd0, 0x98, 0x00}}, + {2, [3]byte{0xd0, 0x99, 0x00}}, {2, [3]byte{0xd0, 0x9a, 0x00}}, + {2, [3]byte{0xd0, 0x9b, 0x00}}, {2, [3]byte{0xd0, 0x9c, 0x00}}, + {2, [3]byte{0xd0, 0x9d, 0x00}}, {2, [3]byte{0xd0, 0x9e, 0x00}}, + {2, [3]byte{0xd0, 0x9f, 0x00}}, {2, [3]byte{0xd0, 0xaf, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0xa1, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd0, 0xa3, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x92, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {2, [3]byte{0xd0, 0xab, 0x00}}, + {2, [3]byte{0xd0, 0x97, 0x00}}, {2, [3]byte{0xd0, 0xa8, 0x00}}, + {2, [3]byte{0xd0, 0xad, 0x00}}, {2, [3]byte{0xd0, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0xa7, 0x00}}, {2, [3]byte{0xd0, 0xaa, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0x9a0000a0, 0xbf0000a9, 0x9c0000b0, 0x9d0000b2, 0x9e0000b7, 0x9f0000f7, 0xb3000401, 0xb4000404, + 0xb6000406, 0xb7000407, 0xbe00040e, 0xe1000410, 0xe2000411, 0xf7000412, 0xe7000413, 0xe4000414, + 0xe5000415, 0xf6000416, 0xfa000417, 0xe9000418, 0xea000419, 0xeb00041a, 0xec00041b, 0xed00041c, + 0xee00041d, 0xef00041e, 0xf000041f, 0xf2000420, 0xf3000421, 0xf4000422, 0xf5000423, 0xe6000424, + 0xe8000425, 0xe3000426, 0xfe000427, 0xfb000428, 0xfd000429, 0xff00042a, 0xf900042b, 0xf800042c, + 0xfc00042d, 0xe000042e, 0xf100042f, 0xc1000430, 0xc2000431, 0xd7000432, 0xc7000433, 0xc4000434, + 0xc5000435, 0xd6000436, 0xda000437, 0xc9000438, 0xca000439, 0xcb00043a, 0xcc00043b, 0xcd00043c, + 0xce00043d, 0xcf00043e, 0xd000043f, 0xd2000440, 0xd3000441, 0xd4000442, 0xd5000443, 0xc6000444, + 0xc8000445, 0xc3000446, 0xde000447, 0xdb000448, 0xdd000449, 0xdf00044a, 0xd900044b, 0xd800044c, + 0xdc00044d, 0xc000044e, 0xd100044f, 0xa3000451, 0xa4000454, 0xa6000456, 0xa7000457, 0xae00045e, + 0xbd000490, 0xad000491, 0x95002219, 0x9600221a, 0x97002248, 0x98002264, 0x99002265, 0x93002320, + 0x9b002321, 0x80002500, 0x81002502, 0x8200250c, 0x83002510, 0x84002514, 0x85002518, 0x8600251c, + 0x87002524, 0x8800252c, 0x89002534, 0x8a00253c, 0xa0002550, 0xa1002551, 0xa2002552, 0xa5002554, + 0xa8002557, 0xa9002558, 0xaa002559, 0xab00255a, 0xac00255b, 0xaf00255e, 0xb000255f, 0xb1002560, + 0xb2002561, 0xb5002563, 0xb8002566, 0xb9002567, 0xba002568, 0xbb002569, 0xbc00256a, 0x8b002580, + 0x8c002584, 0x8d002588, 0x8e00258c, 0x8f002590, 0x90002591, 0x91002592, 0x92002593, 0x940025a0, + }, +} + +// Macintosh is the Macintosh encoding. +var Macintosh *Charmap = &macintosh + +var macintosh = Charmap{ + name: "Macintosh", + mib: identifier.Macintosh, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x91, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa5, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa8, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xad, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {2, [3]byte{0xc2, 0xb0, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa7, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {3, [3]byte{0xe2, 0x84, 0xa2}}, {2, [3]byte{0xc2, 0xb4, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {3, [3]byte{0xe2, 0x89, 0xa0}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x98, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa4}}, {3, [3]byte{0xe2, 0x89, 0xa5}}, + {2, [3]byte{0xc2, 0xa5, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x82}}, {3, [3]byte{0xe2, 0x88, 0x91}}, + {3, [3]byte{0xe2, 0x88, 0x8f}}, {2, [3]byte{0xcf, 0x80, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0xab}}, {2, [3]byte{0xc2, 0xaa, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xce, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xbf, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {2, [3]byte{0xc6, 0x92, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {3, [3]byte{0xe2, 0x88, 0x86}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xbb, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0x80, 0x00}}, + {2, [3]byte{0xc3, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {2, [3]byte{0xc5, 0x93, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xe2, 0x80, 0x9c}}, {3, [3]byte{0xe2, 0x80, 0x9d}}, + {3, [3]byte{0xe2, 0x80, 0x98}}, {3, [3]byte{0xe2, 0x80, 0x99}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x97, 0x8a}}, + {2, [3]byte{0xc3, 0xbf, 0x00}}, {2, [3]byte{0xc5, 0xb8, 0x00}}, + {3, [3]byte{0xe2, 0x81, 0x84}}, {3, [3]byte{0xe2, 0x82, 0xac}}, + {3, [3]byte{0xe2, 0x80, 0xb9}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {3, [3]byte{0xef, 0xac, 0x81}}, {3, [3]byte{0xef, 0xac, 0x82}}, + {3, [3]byte{0xe2, 0x80, 0xa1}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {3, [3]byte{0xe2, 0x80, 0x9e}}, + {3, [3]byte{0xe2, 0x80, 0xb0}}, {2, [3]byte{0xc3, 0x82, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x8b, 0x00}}, {2, [3]byte{0xc3, 0x88, 0x00}}, + {2, [3]byte{0xc3, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0x8e, 0x00}}, + {2, [3]byte{0xc3, 0x8f, 0x00}}, {2, [3]byte{0xc3, 0x8c, 0x00}}, + {2, [3]byte{0xc3, 0x93, 0x00}}, {2, [3]byte{0xc3, 0x94, 0x00}}, + {3, [3]byte{0xef, 0xa3, 0xbf}}, {2, [3]byte{0xc3, 0x92, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x99, 0x00}}, {2, [3]byte{0xc4, 0xb1, 0x00}}, + {2, [3]byte{0xcb, 0x86, 0x00}}, {2, [3]byte{0xcb, 0x9c, 0x00}}, + {2, [3]byte{0xc2, 0xaf, 0x00}}, {2, [3]byte{0xcb, 0x98, 0x00}}, + {2, [3]byte{0xcb, 0x99, 0x00}}, {2, [3]byte{0xcb, 0x9a, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xcb, 0x9d, 0x00}}, + {2, [3]byte{0xcb, 0x9b, 0x00}}, {2, [3]byte{0xcb, 0x87, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xca0000a0, 0xc10000a1, 0xa20000a2, 0xa30000a3, 0xb40000a5, 0xa40000a7, 0xac0000a8, 0xa90000a9, + 0xbb0000aa, 0xc70000ab, 0xc20000ac, 0xa80000ae, 0xf80000af, 0xa10000b0, 0xb10000b1, 0xab0000b4, + 0xb50000b5, 0xa60000b6, 0xe10000b7, 0xfc0000b8, 0xbc0000ba, 0xc80000bb, 0xc00000bf, 0xcb0000c0, + 0xe70000c1, 0xe50000c2, 0xcc0000c3, 0x800000c4, 0x810000c5, 0xae0000c6, 0x820000c7, 0xe90000c8, + 0x830000c9, 0xe60000ca, 0xe80000cb, 0xed0000cc, 0xea0000cd, 0xeb0000ce, 0xec0000cf, 0x840000d1, + 0xf10000d2, 0xee0000d3, 0xef0000d4, 0xcd0000d5, 0x850000d6, 0xaf0000d8, 0xf40000d9, 0xf20000da, + 0xf30000db, 0x860000dc, 0xa70000df, 0x880000e0, 0x870000e1, 0x890000e2, 0x8b0000e3, 0x8a0000e4, + 0x8c0000e5, 0xbe0000e6, 0x8d0000e7, 0x8f0000e8, 0x8e0000e9, 0x900000ea, 0x910000eb, 0x930000ec, + 0x920000ed, 0x940000ee, 0x950000ef, 0x960000f1, 0x980000f2, 0x970000f3, 0x990000f4, 0x9b0000f5, + 0x9a0000f6, 0xd60000f7, 0xbf0000f8, 0x9d0000f9, 0x9c0000fa, 0x9e0000fb, 0x9f0000fc, 0xd80000ff, + 0xf5000131, 0xce000152, 0xcf000153, 0xd9000178, 0xc4000192, 0xf60002c6, 0xff0002c7, 0xf90002d8, + 0xfa0002d9, 0xfb0002da, 0xfe0002db, 0xf70002dc, 0xfd0002dd, 0xbd0003a9, 0xb90003c0, 0xd0002013, + 0xd1002014, 0xd4002018, 0xd5002019, 0xe200201a, 0xd200201c, 0xd300201d, 0xe300201e, 0xa0002020, + 0xe0002021, 0xa5002022, 0xc9002026, 0xe4002030, 0xdc002039, 0xdd00203a, 0xda002044, 0xdb0020ac, + 0xaa002122, 0xb6002202, 0xc6002206, 0xb800220f, 0xb7002211, 0xc300221a, 0xb000221e, 0xba00222b, + 0xc5002248, 0xad002260, 0xb2002264, 0xb3002265, 0xd70025ca, 0xf000f8ff, 0xde00fb01, 0xdf00fb02, + }, +} + +// MacintoshCyrillic is the Macintosh Cyrillic encoding. +var MacintoshCyrillic *Charmap = &macintoshCyrillic + +var macintoshCyrillic = Charmap{ + name: "Macintosh Cyrillic", + mib: identifier.MacintoshCyrillic, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xd0, 0x90, 0x00}}, {2, [3]byte{0xd0, 0x91, 0x00}}, + {2, [3]byte{0xd0, 0x92, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xd0, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x99, 0x00}}, + {2, [3]byte{0xd0, 0x9a, 0x00}}, {2, [3]byte{0xd0, 0x9b, 0x00}}, + {2, [3]byte{0xd0, 0x9c, 0x00}}, {2, [3]byte{0xd0, 0x9d, 0x00}}, + {2, [3]byte{0xd0, 0x9e, 0x00}}, {2, [3]byte{0xd0, 0x9f, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0xa1, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd0, 0xa3, 0x00}}, + {2, [3]byte{0xd0, 0xa4, 0x00}}, {2, [3]byte{0xd0, 0xa5, 0x00}}, + {2, [3]byte{0xd0, 0xa6, 0x00}}, {2, [3]byte{0xd0, 0xa7, 0x00}}, + {2, [3]byte{0xd0, 0xa8, 0x00}}, {2, [3]byte{0xd0, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0xaa, 0x00}}, {2, [3]byte{0xd0, 0xab, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {2, [3]byte{0xd0, 0xad, 0x00}}, + {2, [3]byte{0xd0, 0xae, 0x00}}, {2, [3]byte{0xd0, 0xaf, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {2, [3]byte{0xc2, 0xb0, 0x00}}, + {2, [3]byte{0xd2, 0x90, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa7, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0x86, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {3, [3]byte{0xe2, 0x84, 0xa2}}, {2, [3]byte{0xd0, 0x82, 0x00}}, + {2, [3]byte{0xd1, 0x92, 0x00}}, {3, [3]byte{0xe2, 0x89, 0xa0}}, + {2, [3]byte{0xd0, 0x83, 0x00}}, {2, [3]byte{0xd1, 0x93, 0x00}}, + {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {3, [3]byte{0xe2, 0x89, 0xa4}}, {3, [3]byte{0xe2, 0x89, 0xa5}}, + {2, [3]byte{0xd1, 0x96, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xd2, 0x91, 0x00}}, {2, [3]byte{0xd0, 0x88, 0x00}}, + {2, [3]byte{0xd0, 0x84, 0x00}}, {2, [3]byte{0xd1, 0x94, 0x00}}, + {2, [3]byte{0xd0, 0x87, 0x00}}, {2, [3]byte{0xd1, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x89, 0x00}}, {2, [3]byte{0xd1, 0x99, 0x00}}, + {2, [3]byte{0xd0, 0x8a, 0x00}}, {2, [3]byte{0xd1, 0x9a, 0x00}}, + {2, [3]byte{0xd1, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x85, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}}, + {2, [3]byte{0xc6, 0x92, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}}, + {3, [3]byte{0xe2, 0x88, 0x86}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xbb, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0x8b, 0x00}}, + {2, [3]byte{0xd1, 0x9b, 0x00}}, {2, [3]byte{0xd0, 0x8c, 0x00}}, + {2, [3]byte{0xd1, 0x9c, 0x00}}, {2, [3]byte{0xd1, 0x95, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xe2, 0x80, 0x9c}}, {3, [3]byte{0xe2, 0x80, 0x9d}}, + {3, [3]byte{0xe2, 0x80, 0x98}}, {3, [3]byte{0xe2, 0x80, 0x99}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x9e}}, + {2, [3]byte{0xd0, 0x8e, 0x00}}, {2, [3]byte{0xd1, 0x9e, 0x00}}, + {2, [3]byte{0xd0, 0x8f, 0x00}}, {2, [3]byte{0xd1, 0x9f, 0x00}}, + {3, [3]byte{0xe2, 0x84, 0x96}}, {2, [3]byte{0xd0, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x91, 0x00}}, {2, [3]byte{0xd1, 0x8f, 0x00}}, + {2, [3]byte{0xd0, 0xb0, 0x00}}, {2, [3]byte{0xd0, 0xb1, 0x00}}, + {2, [3]byte{0xd0, 0xb2, 0x00}}, {2, [3]byte{0xd0, 0xb3, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0xb5, 0x00}}, + {2, [3]byte{0xd0, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0xb7, 0x00}}, + {2, [3]byte{0xd0, 0xb8, 0x00}}, {2, [3]byte{0xd0, 0xb9, 0x00}}, + {2, [3]byte{0xd0, 0xba, 0x00}}, {2, [3]byte{0xd0, 0xbb, 0x00}}, + {2, [3]byte{0xd0, 0xbc, 0x00}}, {2, [3]byte{0xd0, 0xbd, 0x00}}, + {2, [3]byte{0xd0, 0xbe, 0x00}}, {2, [3]byte{0xd0, 0xbf, 0x00}}, + {2, [3]byte{0xd1, 0x80, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x82, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd1, 0x85, 0x00}}, + {2, [3]byte{0xd1, 0x86, 0x00}}, {2, [3]byte{0xd1, 0x87, 0x00}}, + {2, [3]byte{0xd1, 0x88, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x8a, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd1, 0x8c, 0x00}}, {2, [3]byte{0xd1, 0x8d, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {3, [3]byte{0xe2, 0x82, 0xac}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xca0000a0, 0xa30000a3, 0xa40000a7, 0xa90000a9, 0xc70000ab, 0xc20000ac, 0xa80000ae, 0xa10000b0, + 0xb10000b1, 0xb50000b5, 0xa60000b6, 0xc80000bb, 0xd60000f7, 0xc4000192, 0xdd000401, 0xab000402, + 0xae000403, 0xb8000404, 0xc1000405, 0xa7000406, 0xba000407, 0xb7000408, 0xbc000409, 0xbe00040a, + 0xcb00040b, 0xcd00040c, 0xd800040e, 0xda00040f, 0x80000410, 0x81000411, 0x82000412, 0x83000413, + 0x84000414, 0x85000415, 0x86000416, 0x87000417, 0x88000418, 0x89000419, 0x8a00041a, 0x8b00041b, + 0x8c00041c, 0x8d00041d, 0x8e00041e, 0x8f00041f, 0x90000420, 0x91000421, 0x92000422, 0x93000423, + 0x94000424, 0x95000425, 0x96000426, 0x97000427, 0x98000428, 0x99000429, 0x9a00042a, 0x9b00042b, + 0x9c00042c, 0x9d00042d, 0x9e00042e, 0x9f00042f, 0xe0000430, 0xe1000431, 0xe2000432, 0xe3000433, + 0xe4000434, 0xe5000435, 0xe6000436, 0xe7000437, 0xe8000438, 0xe9000439, 0xea00043a, 0xeb00043b, + 0xec00043c, 0xed00043d, 0xee00043e, 0xef00043f, 0xf0000440, 0xf1000441, 0xf2000442, 0xf3000443, + 0xf4000444, 0xf5000445, 0xf6000446, 0xf7000447, 0xf8000448, 0xf9000449, 0xfa00044a, 0xfb00044b, + 0xfc00044c, 0xfd00044d, 0xfe00044e, 0xdf00044f, 0xde000451, 0xac000452, 0xaf000453, 0xb9000454, + 0xcf000455, 0xb4000456, 0xbb000457, 0xc0000458, 0xbd000459, 0xbf00045a, 0xcc00045b, 0xce00045c, + 0xd900045e, 0xdb00045f, 0xa2000490, 0xb6000491, 0xd0002013, 0xd1002014, 0xd4002018, 0xd5002019, + 0xd200201c, 0xd300201d, 0xd700201e, 0xa0002020, 0xa5002022, 0xc9002026, 0xff0020ac, 0xdc002116, + 0xaa002122, 0xc6002206, 0xc300221a, 0xb000221e, 0xc5002248, 0xad002260, 0xb2002264, 0xb3002265, + }, +} + +// Windows874 is the Windows 874 encoding. +var Windows874 *Charmap = &windows874 + +var windows874 = Charmap{ + name: "Windows 874", + mib: identifier.Windows874, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xe0, 0xb8, 0x81}}, + {3, [3]byte{0xe0, 0xb8, 0x82}}, {3, [3]byte{0xe0, 0xb8, 0x83}}, + {3, [3]byte{0xe0, 0xb8, 0x84}}, {3, [3]byte{0xe0, 0xb8, 0x85}}, + {3, [3]byte{0xe0, 0xb8, 0x86}}, {3, [3]byte{0xe0, 0xb8, 0x87}}, + {3, [3]byte{0xe0, 0xb8, 0x88}}, {3, [3]byte{0xe0, 0xb8, 0x89}}, + {3, [3]byte{0xe0, 0xb8, 0x8a}}, {3, [3]byte{0xe0, 0xb8, 0x8b}}, + {3, [3]byte{0xe0, 0xb8, 0x8c}}, {3, [3]byte{0xe0, 0xb8, 0x8d}}, + {3, [3]byte{0xe0, 0xb8, 0x8e}}, {3, [3]byte{0xe0, 0xb8, 0x8f}}, + {3, [3]byte{0xe0, 0xb8, 0x90}}, {3, [3]byte{0xe0, 0xb8, 0x91}}, + {3, [3]byte{0xe0, 0xb8, 0x92}}, {3, [3]byte{0xe0, 0xb8, 0x93}}, + {3, [3]byte{0xe0, 0xb8, 0x94}}, {3, [3]byte{0xe0, 0xb8, 0x95}}, + {3, [3]byte{0xe0, 0xb8, 0x96}}, {3, [3]byte{0xe0, 0xb8, 0x97}}, + {3, [3]byte{0xe0, 0xb8, 0x98}}, {3, [3]byte{0xe0, 0xb8, 0x99}}, + {3, [3]byte{0xe0, 0xb8, 0x9a}}, {3, [3]byte{0xe0, 0xb8, 0x9b}}, + {3, [3]byte{0xe0, 0xb8, 0x9c}}, {3, [3]byte{0xe0, 0xb8, 0x9d}}, + {3, [3]byte{0xe0, 0xb8, 0x9e}}, {3, [3]byte{0xe0, 0xb8, 0x9f}}, + {3, [3]byte{0xe0, 0xb8, 0xa0}}, {3, [3]byte{0xe0, 0xb8, 0xa1}}, + {3, [3]byte{0xe0, 0xb8, 0xa2}}, {3, [3]byte{0xe0, 0xb8, 0xa3}}, + {3, [3]byte{0xe0, 0xb8, 0xa4}}, {3, [3]byte{0xe0, 0xb8, 0xa5}}, + {3, [3]byte{0xe0, 0xb8, 0xa6}}, {3, [3]byte{0xe0, 0xb8, 0xa7}}, + {3, [3]byte{0xe0, 0xb8, 0xa8}}, {3, [3]byte{0xe0, 0xb8, 0xa9}}, + {3, [3]byte{0xe0, 0xb8, 0xaa}}, {3, [3]byte{0xe0, 0xb8, 0xab}}, + {3, [3]byte{0xe0, 0xb8, 0xac}}, {3, [3]byte{0xe0, 0xb8, 0xad}}, + {3, [3]byte{0xe0, 0xb8, 0xae}}, {3, [3]byte{0xe0, 0xb8, 0xaf}}, + {3, [3]byte{0xe0, 0xb8, 0xb0}}, {3, [3]byte{0xe0, 0xb8, 0xb1}}, + {3, [3]byte{0xe0, 0xb8, 0xb2}}, {3, [3]byte{0xe0, 0xb8, 0xb3}}, + {3, [3]byte{0xe0, 0xb8, 0xb4}}, {3, [3]byte{0xe0, 0xb8, 0xb5}}, + {3, [3]byte{0xe0, 0xb8, 0xb6}}, {3, [3]byte{0xe0, 0xb8, 0xb7}}, + {3, [3]byte{0xe0, 0xb8, 0xb8}}, {3, [3]byte{0xe0, 0xb8, 0xb9}}, + {3, [3]byte{0xe0, 0xb8, 0xba}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe0, 0xb8, 0xbf}}, + {3, [3]byte{0xe0, 0xb9, 0x80}}, {3, [3]byte{0xe0, 0xb9, 0x81}}, + {3, [3]byte{0xe0, 0xb9, 0x82}}, {3, [3]byte{0xe0, 0xb9, 0x83}}, + {3, [3]byte{0xe0, 0xb9, 0x84}}, {3, [3]byte{0xe0, 0xb9, 0x85}}, + {3, [3]byte{0xe0, 0xb9, 0x86}}, {3, [3]byte{0xe0, 0xb9, 0x87}}, + {3, [3]byte{0xe0, 0xb9, 0x88}}, {3, [3]byte{0xe0, 0xb9, 0x89}}, + {3, [3]byte{0xe0, 0xb9, 0x8a}}, {3, [3]byte{0xe0, 0xb9, 0x8b}}, + {3, [3]byte{0xe0, 0xb9, 0x8c}}, {3, [3]byte{0xe0, 0xb9, 0x8d}}, + {3, [3]byte{0xe0, 0xb9, 0x8e}}, {3, [3]byte{0xe0, 0xb9, 0x8f}}, + {3, [3]byte{0xe0, 0xb9, 0x90}}, {3, [3]byte{0xe0, 0xb9, 0x91}}, + {3, [3]byte{0xe0, 0xb9, 0x92}}, {3, [3]byte{0xe0, 0xb9, 0x93}}, + {3, [3]byte{0xe0, 0xb9, 0x94}}, {3, [3]byte{0xe0, 0xb9, 0x95}}, + {3, [3]byte{0xe0, 0xb9, 0x96}}, {3, [3]byte{0xe0, 0xb9, 0x97}}, + {3, [3]byte{0xe0, 0xb9, 0x98}}, {3, [3]byte{0xe0, 0xb9, 0x99}}, + {3, [3]byte{0xe0, 0xb9, 0x9a}}, {3, [3]byte{0xe0, 0xb9, 0x9b}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa1000e01, 0xa2000e02, 0xa3000e03, 0xa4000e04, 0xa5000e05, 0xa6000e06, 0xa7000e07, + 0xa8000e08, 0xa9000e09, 0xaa000e0a, 0xab000e0b, 0xac000e0c, 0xad000e0d, 0xae000e0e, 0xaf000e0f, + 0xb0000e10, 0xb1000e11, 0xb2000e12, 0xb3000e13, 0xb4000e14, 0xb5000e15, 0xb6000e16, 0xb7000e17, + 0xb8000e18, 0xb9000e19, 0xba000e1a, 0xbb000e1b, 0xbc000e1c, 0xbd000e1d, 0xbe000e1e, 0xbf000e1f, + 0xc0000e20, 0xc1000e21, 0xc2000e22, 0xc3000e23, 0xc4000e24, 0xc5000e25, 0xc6000e26, 0xc7000e27, + 0xc8000e28, 0xc9000e29, 0xca000e2a, 0xcb000e2b, 0xcc000e2c, 0xcd000e2d, 0xce000e2e, 0xcf000e2f, + 0xd0000e30, 0xd1000e31, 0xd2000e32, 0xd3000e33, 0xd4000e34, 0xd5000e35, 0xd6000e36, 0xd7000e37, + 0xd8000e38, 0xd9000e39, 0xda000e3a, 0xdf000e3f, 0xe0000e40, 0xe1000e41, 0xe2000e42, 0xe3000e43, + 0xe4000e44, 0xe5000e45, 0xe6000e46, 0xe7000e47, 0xe8000e48, 0xe9000e49, 0xea000e4a, 0xeb000e4b, + 0xec000e4c, 0xed000e4d, 0xee000e4e, 0xef000e4f, 0xf0000e50, 0xf1000e51, 0xf2000e52, 0xf3000e53, + 0xf4000e54, 0xf5000e55, 0xf6000e56, 0xf7000e57, 0xf8000e58, 0xf9000e59, 0xfa000e5a, 0xfb000e5b, + 0x96002013, 0x97002014, 0x91002018, 0x92002019, 0x9300201c, 0x9400201d, 0x95002022, 0x85002026, + 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, + 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, + 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, + 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, 0x800020ac, + }, +} + +// Windows1250 is the Windows 1250 encoding. +var Windows1250 *Charmap = &windows1250 + +var windows1250 = Charmap{ + name: "Windows 1250", + mib: identifier.Windows1250, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {2, [3]byte{0xc5, 0x9a, 0x00}}, {2, [3]byte{0xc5, 0xa4, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc5, 0xb9, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {2, [3]byte{0xc5, 0x9b, 0x00}}, {2, [3]byte{0xc5, 0xa5, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xc5, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xcb, 0x87, 0x00}}, + {2, [3]byte{0xcb, 0x98, 0x00}}, {2, [3]byte{0xc5, 0x81, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0x84, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc5, 0x9e, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xcb, 0x9b, 0x00}}, {2, [3]byte{0xc5, 0x82, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc4, 0x85, 0x00}}, + {2, [3]byte{0xc5, 0x9f, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc4, 0xbd, 0x00}}, {2, [3]byte{0xcb, 0x9d, 0x00}}, + {2, [3]byte{0xc4, 0xbe, 0x00}}, {2, [3]byte{0xc5, 0xbc, 0x00}}, + {2, [3]byte{0xc5, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc4, 0x82, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc4, 0xb9, 0x00}}, + {2, [3]byte{0xc4, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc4, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc4, 0x8e, 0x00}}, + {2, [3]byte{0xc4, 0x90, 0x00}}, {2, [3]byte{0xc5, 0x83, 0x00}}, + {2, [3]byte{0xc5, 0x87, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc5, 0x90, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc5, 0x98, 0x00}}, {2, [3]byte{0xc5, 0xae, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc5, 0xb0, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc5, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc5, 0x95, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc4, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc4, 0xba, 0x00}}, + {2, [3]byte{0xc4, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc4, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc4, 0x99, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc4, 0x9b, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc4, 0x8f, 0x00}}, + {2, [3]byte{0xc4, 0x91, 0x00}}, {2, [3]byte{0xc5, 0x84, 0x00}}, + {2, [3]byte{0xc5, 0x88, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc5, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc5, 0x99, 0x00}}, {2, [3]byte{0xc5, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc5, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc5, 0xa3, 0x00}}, {2, [3]byte{0xcb, 0x99, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa40000a4, 0xa60000a6, 0xa70000a7, 0xa80000a8, 0xa90000a9, 0xab0000ab, 0xac0000ac, + 0xad0000ad, 0xae0000ae, 0xb00000b0, 0xb10000b1, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, + 0xb80000b8, 0xbb0000bb, 0xc10000c1, 0xc20000c2, 0xc40000c4, 0xc70000c7, 0xc90000c9, 0xcb0000cb, + 0xcd0000cd, 0xce0000ce, 0xd30000d3, 0xd40000d4, 0xd60000d6, 0xd70000d7, 0xda0000da, 0xdc0000dc, + 0xdd0000dd, 0xdf0000df, 0xe10000e1, 0xe20000e2, 0xe40000e4, 0xe70000e7, 0xe90000e9, 0xeb0000eb, + 0xed0000ed, 0xee0000ee, 0xf30000f3, 0xf40000f4, 0xf60000f6, 0xf70000f7, 0xfa0000fa, 0xfc0000fc, + 0xfd0000fd, 0xc3000102, 0xe3000103, 0xa5000104, 0xb9000105, 0xc6000106, 0xe6000107, 0xc800010c, + 0xe800010d, 0xcf00010e, 0xef00010f, 0xd0000110, 0xf0000111, 0xca000118, 0xea000119, 0xcc00011a, + 0xec00011b, 0xc5000139, 0xe500013a, 0xbc00013d, 0xbe00013e, 0xa3000141, 0xb3000142, 0xd1000143, + 0xf1000144, 0xd2000147, 0xf2000148, 0xd5000150, 0xf5000151, 0xc0000154, 0xe0000155, 0xd8000158, + 0xf8000159, 0x8c00015a, 0x9c00015b, 0xaa00015e, 0xba00015f, 0x8a000160, 0x9a000161, 0xde000162, + 0xfe000163, 0x8d000164, 0x9d000165, 0xd900016e, 0xf900016f, 0xdb000170, 0xfb000171, 0x8f000179, + 0x9f00017a, 0xaf00017b, 0xbf00017c, 0x8e00017d, 0x9e00017e, 0xa10002c7, 0xa20002d8, 0xff0002d9, + 0xb20002db, 0xbd0002dd, 0x96002013, 0x97002014, 0x91002018, 0x92002019, 0x8200201a, 0x9300201c, + 0x9400201d, 0x8400201e, 0x86002020, 0x87002021, 0x95002022, 0x85002026, 0x89002030, 0x8b002039, + 0x9b00203a, 0x800020ac, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// Windows1251 is the Windows 1251 encoding. +var Windows1251 *Charmap = &windows1251 + +var windows1251 = Charmap{ + name: "Windows 1251", + mib: identifier.Windows1251, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {2, [3]byte{0xd0, 0x82, 0x00}}, {2, [3]byte{0xd0, 0x83, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xd1, 0x93, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {2, [3]byte{0xd0, 0x89, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {2, [3]byte{0xd0, 0x8a, 0x00}}, {2, [3]byte{0xd0, 0x8c, 0x00}}, + {2, [3]byte{0xd0, 0x8b, 0x00}}, {2, [3]byte{0xd0, 0x8f, 0x00}}, + {2, [3]byte{0xd1, 0x92, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {2, [3]byte{0xd1, 0x99, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {2, [3]byte{0xd1, 0x9a, 0x00}}, {2, [3]byte{0xd1, 0x9c, 0x00}}, + {2, [3]byte{0xd1, 0x9b, 0x00}}, {2, [3]byte{0xd1, 0x9f, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0x8e, 0x00}}, + {2, [3]byte{0xd1, 0x9e, 0x00}}, {2, [3]byte{0xd0, 0x88, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xd2, 0x90, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xd0, 0x81, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0x84, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xd0, 0x87, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xd0, 0x86, 0x00}}, {2, [3]byte{0xd1, 0x96, 0x00}}, + {2, [3]byte{0xd2, 0x91, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xd1, 0x91, 0x00}}, {3, [3]byte{0xe2, 0x84, 0x96}}, + {2, [3]byte{0xd1, 0x94, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xd1, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x85, 0x00}}, + {2, [3]byte{0xd1, 0x95, 0x00}}, {2, [3]byte{0xd1, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x90, 0x00}}, {2, [3]byte{0xd0, 0x91, 0x00}}, + {2, [3]byte{0xd0, 0x92, 0x00}}, {2, [3]byte{0xd0, 0x93, 0x00}}, + {2, [3]byte{0xd0, 0x94, 0x00}}, {2, [3]byte{0xd0, 0x95, 0x00}}, + {2, [3]byte{0xd0, 0x96, 0x00}}, {2, [3]byte{0xd0, 0x97, 0x00}}, + {2, [3]byte{0xd0, 0x98, 0x00}}, {2, [3]byte{0xd0, 0x99, 0x00}}, + {2, [3]byte{0xd0, 0x9a, 0x00}}, {2, [3]byte{0xd0, 0x9b, 0x00}}, + {2, [3]byte{0xd0, 0x9c, 0x00}}, {2, [3]byte{0xd0, 0x9d, 0x00}}, + {2, [3]byte{0xd0, 0x9e, 0x00}}, {2, [3]byte{0xd0, 0x9f, 0x00}}, + {2, [3]byte{0xd0, 0xa0, 0x00}}, {2, [3]byte{0xd0, 0xa1, 0x00}}, + {2, [3]byte{0xd0, 0xa2, 0x00}}, {2, [3]byte{0xd0, 0xa3, 0x00}}, + {2, [3]byte{0xd0, 0xa4, 0x00}}, {2, [3]byte{0xd0, 0xa5, 0x00}}, + {2, [3]byte{0xd0, 0xa6, 0x00}}, {2, [3]byte{0xd0, 0xa7, 0x00}}, + {2, [3]byte{0xd0, 0xa8, 0x00}}, {2, [3]byte{0xd0, 0xa9, 0x00}}, + {2, [3]byte{0xd0, 0xaa, 0x00}}, {2, [3]byte{0xd0, 0xab, 0x00}}, + {2, [3]byte{0xd0, 0xac, 0x00}}, {2, [3]byte{0xd0, 0xad, 0x00}}, + {2, [3]byte{0xd0, 0xae, 0x00}}, {2, [3]byte{0xd0, 0xaf, 0x00}}, + {2, [3]byte{0xd0, 0xb0, 0x00}}, {2, [3]byte{0xd0, 0xb1, 0x00}}, + {2, [3]byte{0xd0, 0xb2, 0x00}}, {2, [3]byte{0xd0, 0xb3, 0x00}}, + {2, [3]byte{0xd0, 0xb4, 0x00}}, {2, [3]byte{0xd0, 0xb5, 0x00}}, + {2, [3]byte{0xd0, 0xb6, 0x00}}, {2, [3]byte{0xd0, 0xb7, 0x00}}, + {2, [3]byte{0xd0, 0xb8, 0x00}}, {2, [3]byte{0xd0, 0xb9, 0x00}}, + {2, [3]byte{0xd0, 0xba, 0x00}}, {2, [3]byte{0xd0, 0xbb, 0x00}}, + {2, [3]byte{0xd0, 0xbc, 0x00}}, {2, [3]byte{0xd0, 0xbd, 0x00}}, + {2, [3]byte{0xd0, 0xbe, 0x00}}, {2, [3]byte{0xd0, 0xbf, 0x00}}, + {2, [3]byte{0xd1, 0x80, 0x00}}, {2, [3]byte{0xd1, 0x81, 0x00}}, + {2, [3]byte{0xd1, 0x82, 0x00}}, {2, [3]byte{0xd1, 0x83, 0x00}}, + {2, [3]byte{0xd1, 0x84, 0x00}}, {2, [3]byte{0xd1, 0x85, 0x00}}, + {2, [3]byte{0xd1, 0x86, 0x00}}, {2, [3]byte{0xd1, 0x87, 0x00}}, + {2, [3]byte{0xd1, 0x88, 0x00}}, {2, [3]byte{0xd1, 0x89, 0x00}}, + {2, [3]byte{0xd1, 0x8a, 0x00}}, {2, [3]byte{0xd1, 0x8b, 0x00}}, + {2, [3]byte{0xd1, 0x8c, 0x00}}, {2, [3]byte{0xd1, 0x8d, 0x00}}, + {2, [3]byte{0xd1, 0x8e, 0x00}}, {2, [3]byte{0xd1, 0x8f, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa40000a4, 0xa60000a6, 0xa70000a7, 0xa90000a9, 0xab0000ab, 0xac0000ac, 0xad0000ad, + 0xae0000ae, 0xb00000b0, 0xb10000b1, 0xb50000b5, 0xb60000b6, 0xb70000b7, 0xbb0000bb, 0xa8000401, + 0x80000402, 0x81000403, 0xaa000404, 0xbd000405, 0xb2000406, 0xaf000407, 0xa3000408, 0x8a000409, + 0x8c00040a, 0x8e00040b, 0x8d00040c, 0xa100040e, 0x8f00040f, 0xc0000410, 0xc1000411, 0xc2000412, + 0xc3000413, 0xc4000414, 0xc5000415, 0xc6000416, 0xc7000417, 0xc8000418, 0xc9000419, 0xca00041a, + 0xcb00041b, 0xcc00041c, 0xcd00041d, 0xce00041e, 0xcf00041f, 0xd0000420, 0xd1000421, 0xd2000422, + 0xd3000423, 0xd4000424, 0xd5000425, 0xd6000426, 0xd7000427, 0xd8000428, 0xd9000429, 0xda00042a, + 0xdb00042b, 0xdc00042c, 0xdd00042d, 0xde00042e, 0xdf00042f, 0xe0000430, 0xe1000431, 0xe2000432, + 0xe3000433, 0xe4000434, 0xe5000435, 0xe6000436, 0xe7000437, 0xe8000438, 0xe9000439, 0xea00043a, + 0xeb00043b, 0xec00043c, 0xed00043d, 0xee00043e, 0xef00043f, 0xf0000440, 0xf1000441, 0xf2000442, + 0xf3000443, 0xf4000444, 0xf5000445, 0xf6000446, 0xf7000447, 0xf8000448, 0xf9000449, 0xfa00044a, + 0xfb00044b, 0xfc00044c, 0xfd00044d, 0xfe00044e, 0xff00044f, 0xb8000451, 0x90000452, 0x83000453, + 0xba000454, 0xbe000455, 0xb3000456, 0xbf000457, 0xbc000458, 0x9a000459, 0x9c00045a, 0x9e00045b, + 0x9d00045c, 0xa200045e, 0x9f00045f, 0xa5000490, 0xb4000491, 0x96002013, 0x97002014, 0x91002018, + 0x92002019, 0x8200201a, 0x9300201c, 0x9400201d, 0x8400201e, 0x86002020, 0x87002021, 0x95002022, + 0x85002026, 0x89002030, 0x8b002039, 0x9b00203a, 0x880020ac, 0xb9002116, 0x99002122, 0x99002122, + }, +} + +// Windows1252 is the Windows 1252 encoding. +var Windows1252 *Charmap = &windows1252 + +var windows1252 = Charmap{ + name: "Windows 1252", + mib: identifier.Windows1252, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {2, [3]byte{0xcb, 0x86, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {2, [3]byte{0xcb, 0x9c, 0x00}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {2, [3]byte{0xc5, 0x93, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xc5, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc3, 0x90, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0x9d, 0x00}}, + {2, [3]byte{0xc3, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc3, 0xb0, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc3, 0xbd, 0x00}}, + {2, [3]byte{0xc3, 0xbe, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, + 0xa80000a8, 0xa90000a9, 0xaa0000aa, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, + 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, + 0xb80000b8, 0xb90000b9, 0xba0000ba, 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xbf0000bf, + 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, + 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd00000d0, 0xd10000d1, 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd70000d7, + 0xd80000d8, 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdd0000dd, 0xde0000de, 0xdf0000df, + 0xe00000e0, 0xe10000e1, 0xe20000e2, 0xe30000e3, 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, + 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, + 0xf00000f0, 0xf10000f1, 0xf20000f2, 0xf30000f3, 0xf40000f4, 0xf50000f5, 0xf60000f6, 0xf70000f7, + 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, 0xfc0000fc, 0xfd0000fd, 0xfe0000fe, 0xff0000ff, + 0x8c000152, 0x9c000153, 0x8a000160, 0x9a000161, 0x9f000178, 0x8e00017d, 0x9e00017e, 0x83000192, + 0x880002c6, 0x980002dc, 0x96002013, 0x97002014, 0x91002018, 0x92002019, 0x8200201a, 0x9300201c, + 0x9400201d, 0x8400201e, 0x86002020, 0x87002021, 0x95002022, 0x85002026, 0x89002030, 0x8b002039, + 0x9b00203a, 0x800020ac, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// Windows1253 is the Windows 1253 encoding. +var Windows1253 *Charmap = &windows1253 + +var windows1253 = Charmap{ + name: "Windows 1253", + mib: identifier.Windows1253, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xce, 0x85, 0x00}}, + {2, [3]byte{0xce, 0x86, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x95}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xce, 0x84, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xce, 0x88, 0x00}}, {2, [3]byte{0xce, 0x89, 0x00}}, + {2, [3]byte{0xce, 0x8a, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xce, 0x8c, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xce, 0x8e, 0x00}}, {2, [3]byte{0xce, 0x8f, 0x00}}, + {2, [3]byte{0xce, 0x90, 0x00}}, {2, [3]byte{0xce, 0x91, 0x00}}, + {2, [3]byte{0xce, 0x92, 0x00}}, {2, [3]byte{0xce, 0x93, 0x00}}, + {2, [3]byte{0xce, 0x94, 0x00}}, {2, [3]byte{0xce, 0x95, 0x00}}, + {2, [3]byte{0xce, 0x96, 0x00}}, {2, [3]byte{0xce, 0x97, 0x00}}, + {2, [3]byte{0xce, 0x98, 0x00}}, {2, [3]byte{0xce, 0x99, 0x00}}, + {2, [3]byte{0xce, 0x9a, 0x00}}, {2, [3]byte{0xce, 0x9b, 0x00}}, + {2, [3]byte{0xce, 0x9c, 0x00}}, {2, [3]byte{0xce, 0x9d, 0x00}}, + {2, [3]byte{0xce, 0x9e, 0x00}}, {2, [3]byte{0xce, 0x9f, 0x00}}, + {2, [3]byte{0xce, 0xa0, 0x00}}, {2, [3]byte{0xce, 0xa1, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xce, 0xa3, 0x00}}, + {2, [3]byte{0xce, 0xa4, 0x00}}, {2, [3]byte{0xce, 0xa5, 0x00}}, + {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0xa7, 0x00}}, + {2, [3]byte{0xce, 0xa8, 0x00}}, {2, [3]byte{0xce, 0xa9, 0x00}}, + {2, [3]byte{0xce, 0xaa, 0x00}}, {2, [3]byte{0xce, 0xab, 0x00}}, + {2, [3]byte{0xce, 0xac, 0x00}}, {2, [3]byte{0xce, 0xad, 0x00}}, + {2, [3]byte{0xce, 0xae, 0x00}}, {2, [3]byte{0xce, 0xaf, 0x00}}, + {2, [3]byte{0xce, 0xb0, 0x00}}, {2, [3]byte{0xce, 0xb1, 0x00}}, + {2, [3]byte{0xce, 0xb2, 0x00}}, {2, [3]byte{0xce, 0xb3, 0x00}}, + {2, [3]byte{0xce, 0xb4, 0x00}}, {2, [3]byte{0xce, 0xb5, 0x00}}, + {2, [3]byte{0xce, 0xb6, 0x00}}, {2, [3]byte{0xce, 0xb7, 0x00}}, + {2, [3]byte{0xce, 0xb8, 0x00}}, {2, [3]byte{0xce, 0xb9, 0x00}}, + {2, [3]byte{0xce, 0xba, 0x00}}, {2, [3]byte{0xce, 0xbb, 0x00}}, + {2, [3]byte{0xce, 0xbc, 0x00}}, {2, [3]byte{0xce, 0xbd, 0x00}}, + {2, [3]byte{0xce, 0xbe, 0x00}}, {2, [3]byte{0xce, 0xbf, 0x00}}, + {2, [3]byte{0xcf, 0x80, 0x00}}, {2, [3]byte{0xcf, 0x81, 0x00}}, + {2, [3]byte{0xcf, 0x82, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}}, + {2, [3]byte{0xcf, 0x84, 0x00}}, {2, [3]byte{0xcf, 0x85, 0x00}}, + {2, [3]byte{0xcf, 0x86, 0x00}}, {2, [3]byte{0xcf, 0x87, 0x00}}, + {2, [3]byte{0xcf, 0x88, 0x00}}, {2, [3]byte{0xcf, 0x89, 0x00}}, + {2, [3]byte{0xcf, 0x8a, 0x00}}, {2, [3]byte{0xcf, 0x8b, 0x00}}, + {2, [3]byte{0xcf, 0x8c, 0x00}}, {2, [3]byte{0xcf, 0x8d, 0x00}}, + {2, [3]byte{0xcf, 0x8e, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, 0xa80000a8, 0xa90000a9, + 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, + 0xb50000b5, 0xb60000b6, 0xb70000b7, 0xbb0000bb, 0xbd0000bd, 0x83000192, 0xb4000384, 0xa1000385, + 0xa2000386, 0xb8000388, 0xb9000389, 0xba00038a, 0xbc00038c, 0xbe00038e, 0xbf00038f, 0xc0000390, + 0xc1000391, 0xc2000392, 0xc3000393, 0xc4000394, 0xc5000395, 0xc6000396, 0xc7000397, 0xc8000398, + 0xc9000399, 0xca00039a, 0xcb00039b, 0xcc00039c, 0xcd00039d, 0xce00039e, 0xcf00039f, 0xd00003a0, + 0xd10003a1, 0xd30003a3, 0xd40003a4, 0xd50003a5, 0xd60003a6, 0xd70003a7, 0xd80003a8, 0xd90003a9, + 0xda0003aa, 0xdb0003ab, 0xdc0003ac, 0xdd0003ad, 0xde0003ae, 0xdf0003af, 0xe00003b0, 0xe10003b1, + 0xe20003b2, 0xe30003b3, 0xe40003b4, 0xe50003b5, 0xe60003b6, 0xe70003b7, 0xe80003b8, 0xe90003b9, + 0xea0003ba, 0xeb0003bb, 0xec0003bc, 0xed0003bd, 0xee0003be, 0xef0003bf, 0xf00003c0, 0xf10003c1, + 0xf20003c2, 0xf30003c3, 0xf40003c4, 0xf50003c5, 0xf60003c6, 0xf70003c7, 0xf80003c8, 0xf90003c9, + 0xfa0003ca, 0xfb0003cb, 0xfc0003cc, 0xfd0003cd, 0xfe0003ce, 0x96002013, 0x97002014, 0xaf002015, + 0x91002018, 0x92002019, 0x8200201a, 0x9300201c, 0x9400201d, 0x8400201e, 0x86002020, 0x87002021, + 0x95002022, 0x85002026, 0x89002030, 0x8b002039, 0x9b00203a, 0x800020ac, 0x99002122, 0x99002122, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// Windows1254 is the Windows 1254 encoding. +var Windows1254 *Charmap = &windows1254 + +var windows1254 = Charmap{ + name: "Windows 1254", + mib: identifier.Windows1254, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {2, [3]byte{0xcb, 0x86, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {2, [3]byte{0xcb, 0x9c, 0x00}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {2, [3]byte{0xc5, 0x93, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc5, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc4, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xc3, 0x92, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc4, 0xb0, 0x00}}, + {2, [3]byte{0xc5, 0x9e, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc3, 0xa3, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xac, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x9f, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xc3, 0xb2, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc4, 0xb1, 0x00}}, + {2, [3]byte{0xc5, 0x9f, 0x00}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, + 0xa80000a8, 0xa90000a9, 0xaa0000aa, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, + 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, + 0xb80000b8, 0xb90000b9, 0xba0000ba, 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xbf0000bf, + 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc30000c3, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, + 0xc80000c8, 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcc0000cc, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, + 0xd10000d1, 0xd20000d2, 0xd30000d3, 0xd40000d4, 0xd50000d5, 0xd60000d6, 0xd70000d7, 0xd80000d8, + 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, 0xdf0000df, 0xe00000e0, 0xe10000e1, 0xe20000e2, + 0xe30000e3, 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, 0xe80000e8, 0xe90000e9, 0xea0000ea, + 0xeb0000eb, 0xec0000ec, 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf10000f1, 0xf20000f2, 0xf30000f3, + 0xf40000f4, 0xf50000f5, 0xf60000f6, 0xf70000f7, 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, + 0xfc0000fc, 0xff0000ff, 0xd000011e, 0xf000011f, 0xdd000130, 0xfd000131, 0x8c000152, 0x9c000153, + 0xde00015e, 0xfe00015f, 0x8a000160, 0x9a000161, 0x9f000178, 0x83000192, 0x880002c6, 0x980002dc, + 0x96002013, 0x97002014, 0x91002018, 0x92002019, 0x8200201a, 0x9300201c, 0x9400201d, 0x8400201e, + 0x86002020, 0x87002021, 0x95002022, 0x85002026, 0x89002030, 0x8b002039, 0x9b00203a, 0x800020ac, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// Windows1255 is the Windows 1255 encoding. +var Windows1255 *Charmap = &windows1255 + +var windows1255 = Charmap{ + name: "Windows 1255", + mib: identifier.Windows1255, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {2, [3]byte{0xcb, 0x86, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {2, [3]byte{0xcb, 0x9c, 0x00}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xaa}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0x97, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xb7, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xd6, 0xb0, 0x00}}, {2, [3]byte{0xd6, 0xb1, 0x00}}, + {2, [3]byte{0xd6, 0xb2, 0x00}}, {2, [3]byte{0xd6, 0xb3, 0x00}}, + {2, [3]byte{0xd6, 0xb4, 0x00}}, {2, [3]byte{0xd6, 0xb5, 0x00}}, + {2, [3]byte{0xd6, 0xb6, 0x00}}, {2, [3]byte{0xd6, 0xb7, 0x00}}, + {2, [3]byte{0xd6, 0xb8, 0x00}}, {2, [3]byte{0xd6, 0xb9, 0x00}}, + {2, [3]byte{0xd6, 0xba, 0x00}}, {2, [3]byte{0xd6, 0xbb, 0x00}}, + {2, [3]byte{0xd6, 0xbc, 0x00}}, {2, [3]byte{0xd6, 0xbd, 0x00}}, + {2, [3]byte{0xd6, 0xbe, 0x00}}, {2, [3]byte{0xd6, 0xbf, 0x00}}, + {2, [3]byte{0xd7, 0x80, 0x00}}, {2, [3]byte{0xd7, 0x81, 0x00}}, + {2, [3]byte{0xd7, 0x82, 0x00}}, {2, [3]byte{0xd7, 0x83, 0x00}}, + {2, [3]byte{0xd7, 0xb0, 0x00}}, {2, [3]byte{0xd7, 0xb1, 0x00}}, + {2, [3]byte{0xd7, 0xb2, 0x00}}, {2, [3]byte{0xd7, 0xb3, 0x00}}, + {2, [3]byte{0xd7, 0xb4, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xd7, 0x90, 0x00}}, {2, [3]byte{0xd7, 0x91, 0x00}}, + {2, [3]byte{0xd7, 0x92, 0x00}}, {2, [3]byte{0xd7, 0x93, 0x00}}, + {2, [3]byte{0xd7, 0x94, 0x00}}, {2, [3]byte{0xd7, 0x95, 0x00}}, + {2, [3]byte{0xd7, 0x96, 0x00}}, {2, [3]byte{0xd7, 0x97, 0x00}}, + {2, [3]byte{0xd7, 0x98, 0x00}}, {2, [3]byte{0xd7, 0x99, 0x00}}, + {2, [3]byte{0xd7, 0x9a, 0x00}}, {2, [3]byte{0xd7, 0x9b, 0x00}}, + {2, [3]byte{0xd7, 0x9c, 0x00}}, {2, [3]byte{0xd7, 0x9d, 0x00}}, + {2, [3]byte{0xd7, 0x9e, 0x00}}, {2, [3]byte{0xd7, 0x9f, 0x00}}, + {2, [3]byte{0xd7, 0xa0, 0x00}}, {2, [3]byte{0xd7, 0xa1, 0x00}}, + {2, [3]byte{0xd7, 0xa2, 0x00}}, {2, [3]byte{0xd7, 0xa3, 0x00}}, + {2, [3]byte{0xd7, 0xa4, 0x00}}, {2, [3]byte{0xd7, 0xa5, 0x00}}, + {2, [3]byte{0xd7, 0xa6, 0x00}}, {2, [3]byte{0xd7, 0xa7, 0x00}}, + {2, [3]byte{0xd7, 0xa8, 0x00}}, {2, [3]byte{0xd7, 0xa9, 0x00}}, + {2, [3]byte{0xd7, 0xaa, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x8e}}, + {3, [3]byte{0xe2, 0x80, 0x8f}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa50000a5, 0xa60000a6, 0xa70000a7, 0xa80000a8, + 0xa90000a9, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, 0xb00000b0, 0xb10000b1, + 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, 0xb80000b8, 0xb90000b9, + 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xbf0000bf, 0xaa0000d7, 0xba0000f7, 0x83000192, + 0x880002c6, 0x980002dc, 0xc00005b0, 0xc10005b1, 0xc20005b2, 0xc30005b3, 0xc40005b4, 0xc50005b5, + 0xc60005b6, 0xc70005b7, 0xc80005b8, 0xc90005b9, 0xca0005ba, 0xcb0005bb, 0xcc0005bc, 0xcd0005bd, + 0xce0005be, 0xcf0005bf, 0xd00005c0, 0xd10005c1, 0xd20005c2, 0xd30005c3, 0xe00005d0, 0xe10005d1, + 0xe20005d2, 0xe30005d3, 0xe40005d4, 0xe50005d5, 0xe60005d6, 0xe70005d7, 0xe80005d8, 0xe90005d9, + 0xea0005da, 0xeb0005db, 0xec0005dc, 0xed0005dd, 0xee0005de, 0xef0005df, 0xf00005e0, 0xf10005e1, + 0xf20005e2, 0xf30005e3, 0xf40005e4, 0xf50005e5, 0xf60005e6, 0xf70005e7, 0xf80005e8, 0xf90005e9, + 0xfa0005ea, 0xd40005f0, 0xd50005f1, 0xd60005f2, 0xd70005f3, 0xd80005f4, 0xfd00200e, 0xfe00200f, + 0x96002013, 0x97002014, 0x91002018, 0x92002019, 0x8200201a, 0x9300201c, 0x9400201d, 0x8400201e, + 0x86002020, 0x87002021, 0x95002022, 0x85002026, 0x89002030, 0x8b002039, 0x9b00203a, 0xa40020aa, + 0x800020ac, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// Windows1256 is the Windows 1256 encoding. +var Windows1256 *Charmap = &windows1256 + +var windows1256 = Charmap{ + name: "Windows 1256", + mib: identifier.Windows1256, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {2, [3]byte{0xd9, 0xbe, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {2, [3]byte{0xcb, 0x86, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {2, [3]byte{0xd9, 0xb9, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {2, [3]byte{0xda, 0x86, 0x00}}, + {2, [3]byte{0xda, 0x98, 0x00}}, {2, [3]byte{0xda, 0x88, 0x00}}, + {2, [3]byte{0xda, 0xaf, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {2, [3]byte{0xda, 0xa9, 0x00}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {2, [3]byte{0xda, 0x91, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {2, [3]byte{0xc5, 0x93, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x8c}}, + {3, [3]byte{0xe2, 0x80, 0x8d}}, {2, [3]byte{0xda, 0xba, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xd8, 0x8c, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xda, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xd8, 0x9b, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xd8, 0x9f, 0x00}}, + {2, [3]byte{0xdb, 0x81, 0x00}}, {2, [3]byte{0xd8, 0xa1, 0x00}}, + {2, [3]byte{0xd8, 0xa2, 0x00}}, {2, [3]byte{0xd8, 0xa3, 0x00}}, + {2, [3]byte{0xd8, 0xa4, 0x00}}, {2, [3]byte{0xd8, 0xa5, 0x00}}, + {2, [3]byte{0xd8, 0xa6, 0x00}}, {2, [3]byte{0xd8, 0xa7, 0x00}}, + {2, [3]byte{0xd8, 0xa8, 0x00}}, {2, [3]byte{0xd8, 0xa9, 0x00}}, + {2, [3]byte{0xd8, 0xaa, 0x00}}, {2, [3]byte{0xd8, 0xab, 0x00}}, + {2, [3]byte{0xd8, 0xac, 0x00}}, {2, [3]byte{0xd8, 0xad, 0x00}}, + {2, [3]byte{0xd8, 0xae, 0x00}}, {2, [3]byte{0xd8, 0xaf, 0x00}}, + {2, [3]byte{0xd8, 0xb0, 0x00}}, {2, [3]byte{0xd8, 0xb1, 0x00}}, + {2, [3]byte{0xd8, 0xb2, 0x00}}, {2, [3]byte{0xd8, 0xb3, 0x00}}, + {2, [3]byte{0xd8, 0xb4, 0x00}}, {2, [3]byte{0xd8, 0xb5, 0x00}}, + {2, [3]byte{0xd8, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xd8, 0xb7, 0x00}}, {2, [3]byte{0xd8, 0xb8, 0x00}}, + {2, [3]byte{0xd8, 0xb9, 0x00}}, {2, [3]byte{0xd8, 0xba, 0x00}}, + {2, [3]byte{0xd9, 0x80, 0x00}}, {2, [3]byte{0xd9, 0x81, 0x00}}, + {2, [3]byte{0xd9, 0x82, 0x00}}, {2, [3]byte{0xd9, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xd9, 0x84, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xd9, 0x85, 0x00}}, + {2, [3]byte{0xd9, 0x86, 0x00}}, {2, [3]byte{0xd9, 0x87, 0x00}}, + {2, [3]byte{0xd9, 0x88, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xd9, 0x89, 0x00}}, {2, [3]byte{0xd9, 0x8a, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xd9, 0x8b, 0x00}}, {2, [3]byte{0xd9, 0x8c, 0x00}}, + {2, [3]byte{0xd9, 0x8d, 0x00}}, {2, [3]byte{0xd9, 0x8e, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xd9, 0x8f, 0x00}}, + {2, [3]byte{0xd9, 0x90, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xd9, 0x91, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xd9, 0x92, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x8e}}, + {3, [3]byte{0xe2, 0x80, 0x8f}}, {2, [3]byte{0xdb, 0x92, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, 0xa80000a8, + 0xa90000a9, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, 0xb00000b0, 0xb10000b1, + 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, 0xb80000b8, 0xb90000b9, + 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xd70000d7, 0xe00000e0, 0xe20000e2, 0xe70000e7, + 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xee0000ee, 0xef0000ef, 0xf40000f4, 0xf70000f7, + 0xf90000f9, 0xfb0000fb, 0xfc0000fc, 0x8c000152, 0x9c000153, 0x83000192, 0x880002c6, 0xa100060c, + 0xba00061b, 0xbf00061f, 0xc1000621, 0xc2000622, 0xc3000623, 0xc4000624, 0xc5000625, 0xc6000626, + 0xc7000627, 0xc8000628, 0xc9000629, 0xca00062a, 0xcb00062b, 0xcc00062c, 0xcd00062d, 0xce00062e, + 0xcf00062f, 0xd0000630, 0xd1000631, 0xd2000632, 0xd3000633, 0xd4000634, 0xd5000635, 0xd6000636, + 0xd8000637, 0xd9000638, 0xda000639, 0xdb00063a, 0xdc000640, 0xdd000641, 0xde000642, 0xdf000643, + 0xe1000644, 0xe3000645, 0xe4000646, 0xe5000647, 0xe6000648, 0xec000649, 0xed00064a, 0xf000064b, + 0xf100064c, 0xf200064d, 0xf300064e, 0xf500064f, 0xf6000650, 0xf8000651, 0xfa000652, 0x8a000679, + 0x8100067e, 0x8d000686, 0x8f000688, 0x9a000691, 0x8e000698, 0x980006a9, 0x900006af, 0x9f0006ba, + 0xaa0006be, 0xc00006c1, 0xff0006d2, 0x9d00200c, 0x9e00200d, 0xfd00200e, 0xfe00200f, 0x96002013, + 0x97002014, 0x91002018, 0x92002019, 0x8200201a, 0x9300201c, 0x9400201d, 0x8400201e, 0x86002020, + 0x87002021, 0x95002022, 0x85002026, 0x89002030, 0x8b002039, 0x9b00203a, 0x800020ac, 0x99002122, + }, +} + +// Windows1257 is the Windows 1257 encoding. +var Windows1257 *Charmap = &windows1257 + +var windows1257 = Charmap{ + name: "Windows 1257", + mib: identifier.Windows1257, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc2, 0xa8, 0x00}}, + {2, [3]byte{0xcb, 0x87, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xcb, 0x9b, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc5, 0x96, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc3, 0x86, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc5, 0x97, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}}, + {2, [3]byte{0xc4, 0x84, 0x00}}, {2, [3]byte{0xc4, 0xae, 0x00}}, + {2, [3]byte{0xc4, 0x80, 0x00}}, {2, [3]byte{0xc4, 0x86, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc4, 0x98, 0x00}}, {2, [3]byte{0xc4, 0x92, 0x00}}, + {2, [3]byte{0xc4, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc5, 0xb9, 0x00}}, {2, [3]byte{0xc4, 0x96, 0x00}}, + {2, [3]byte{0xc4, 0xa2, 0x00}}, {2, [3]byte{0xc4, 0xb6, 0x00}}, + {2, [3]byte{0xc4, 0xaa, 0x00}}, {2, [3]byte{0xc4, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0xa0, 0x00}}, {2, [3]byte{0xc5, 0x83, 0x00}}, + {2, [3]byte{0xc5, 0x85, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc5, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc5, 0xb2, 0x00}}, {2, [3]byte{0xc5, 0x81, 0x00}}, + {2, [3]byte{0xc5, 0x9a, 0x00}}, {2, [3]byte{0xc5, 0xaa, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc5, 0xbb, 0x00}}, + {2, [3]byte{0xc5, 0xbd, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc4, 0x85, 0x00}}, {2, [3]byte{0xc4, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x81, 0x00}}, {2, [3]byte{0xc4, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc4, 0x99, 0x00}}, {2, [3]byte{0xc4, 0x93, 0x00}}, + {2, [3]byte{0xc4, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc5, 0xba, 0x00}}, {2, [3]byte{0xc4, 0x97, 0x00}}, + {2, [3]byte{0xc4, 0xa3, 0x00}}, {2, [3]byte{0xc4, 0xb7, 0x00}}, + {2, [3]byte{0xc4, 0xab, 0x00}}, {2, [3]byte{0xc4, 0xbc, 0x00}}, + {2, [3]byte{0xc5, 0xa1, 0x00}}, {2, [3]byte{0xc5, 0x84, 0x00}}, + {2, [3]byte{0xc5, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc5, 0x8d, 0x00}}, {2, [3]byte{0xc3, 0xb5, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc5, 0xb3, 0x00}}, {2, [3]byte{0xc5, 0x82, 0x00}}, + {2, [3]byte{0xc5, 0x9b, 0x00}}, {2, [3]byte{0xc5, 0xab, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc5, 0xbc, 0x00}}, + {2, [3]byte{0xc5, 0xbe, 0x00}}, {2, [3]byte{0xcb, 0x99, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa60000a6, 0xa70000a7, 0x8d0000a8, 0xa90000a9, + 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0x9d0000af, 0xb00000b0, 0xb10000b1, 0xb20000b2, + 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, 0x8f0000b8, 0xb90000b9, 0xbb0000bb, + 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xc40000c4, 0xc50000c5, 0xaf0000c6, 0xc90000c9, 0xd30000d3, + 0xd50000d5, 0xd60000d6, 0xd70000d7, 0xa80000d8, 0xdc0000dc, 0xdf0000df, 0xe40000e4, 0xe50000e5, + 0xbf0000e6, 0xe90000e9, 0xf30000f3, 0xf50000f5, 0xf60000f6, 0xf70000f7, 0xb80000f8, 0xfc0000fc, + 0xc2000100, 0xe2000101, 0xc0000104, 0xe0000105, 0xc3000106, 0xe3000107, 0xc800010c, 0xe800010d, + 0xc7000112, 0xe7000113, 0xcb000116, 0xeb000117, 0xc6000118, 0xe6000119, 0xcc000122, 0xec000123, + 0xce00012a, 0xee00012b, 0xc100012e, 0xe100012f, 0xcd000136, 0xed000137, 0xcf00013b, 0xef00013c, + 0xd9000141, 0xf9000142, 0xd1000143, 0xf1000144, 0xd2000145, 0xf2000146, 0xd400014c, 0xf400014d, + 0xaa000156, 0xba000157, 0xda00015a, 0xfa00015b, 0xd0000160, 0xf0000161, 0xdb00016a, 0xfb00016b, + 0xd8000172, 0xf8000173, 0xca000179, 0xea00017a, 0xdd00017b, 0xfd00017c, 0xde00017d, 0xfe00017e, + 0x8e0002c7, 0xff0002d9, 0x9e0002db, 0x96002013, 0x97002014, 0x91002018, 0x92002019, 0x8200201a, + 0x9300201c, 0x9400201d, 0x8400201e, 0x86002020, 0x87002021, 0x95002022, 0x85002026, 0x89002030, + 0x8b002039, 0x9b00203a, 0x800020ac, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// Windows1258 is the Windows 1258 encoding. +var Windows1258 *Charmap = &windows1258 + +var windows1258 = Charmap{ + name: "Windows 1258", + mib: identifier.Windows1258, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xac}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xe2, 0x80, 0x9a}}, {2, [3]byte{0xc6, 0x92, 0x00}}, + {3, [3]byte{0xe2, 0x80, 0x9e}}, {3, [3]byte{0xe2, 0x80, 0xa6}}, + {3, [3]byte{0xe2, 0x80, 0xa0}}, {3, [3]byte{0xe2, 0x80, 0xa1}}, + {2, [3]byte{0xcb, 0x86, 0x00}}, {3, [3]byte{0xe2, 0x80, 0xb0}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xb9}}, + {2, [3]byte{0xc5, 0x92, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0x98}}, + {3, [3]byte{0xe2, 0x80, 0x99}}, {3, [3]byte{0xe2, 0x80, 0x9c}}, + {3, [3]byte{0xe2, 0x80, 0x9d}}, {3, [3]byte{0xe2, 0x80, 0xa2}}, + {3, [3]byte{0xe2, 0x80, 0x93}}, {3, [3]byte{0xe2, 0x80, 0x94}}, + {2, [3]byte{0xcb, 0x9c, 0x00}}, {3, [3]byte{0xe2, 0x84, 0xa2}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {3, [3]byte{0xe2, 0x80, 0xba}}, + {2, [3]byte{0xc5, 0x93, 0x00}}, {3, [3]byte{0xef, 0xbf, 0xbd}}, + {3, [3]byte{0xef, 0xbf, 0xbd}}, {2, [3]byte{0xc5, 0xb8, 0x00}}, + {2, [3]byte{0xc2, 0xa0, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}}, + {2, [3]byte{0xc2, 0xa2, 0x00}}, {2, [3]byte{0xc2, 0xa3, 0x00}}, + {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc2, 0xa5, 0x00}}, + {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}}, + {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xa9, 0x00}}, + {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xab, 0x00}}, + {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xad, 0x00}}, + {2, [3]byte{0xc2, 0xae, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}}, + {2, [3]byte{0xc2, 0xb0, 0x00}}, {2, [3]byte{0xc2, 0xb1, 0x00}}, + {2, [3]byte{0xc2, 0xb2, 0x00}}, {2, [3]byte{0xc2, 0xb3, 0x00}}, + {2, [3]byte{0xc2, 0xb4, 0x00}}, {2, [3]byte{0xc2, 0xb5, 0x00}}, + {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc2, 0xb7, 0x00}}, + {2, [3]byte{0xc2, 0xb8, 0x00}}, {2, [3]byte{0xc2, 0xb9, 0x00}}, + {2, [3]byte{0xc2, 0xba, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}}, + {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}}, + {2, [3]byte{0xc2, 0xbe, 0x00}}, {2, [3]byte{0xc2, 0xbf, 0x00}}, + {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x81, 0x00}}, + {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc4, 0x82, 0x00}}, + {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}}, + {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0x87, 0x00}}, + {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0x89, 0x00}}, + {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0x8b, 0x00}}, + {2, [3]byte{0xcc, 0x80, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}}, + {2, [3]byte{0xc3, 0x8e, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}}, + {2, [3]byte{0xc4, 0x90, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}}, + {2, [3]byte{0xcc, 0x89, 0x00}}, {2, [3]byte{0xc3, 0x93, 0x00}}, + {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc6, 0xa0, 0x00}}, + {2, [3]byte{0xc3, 0x96, 0x00}}, {2, [3]byte{0xc3, 0x97, 0x00}}, + {2, [3]byte{0xc3, 0x98, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}}, + {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0x9b, 0x00}}, + {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc6, 0xaf, 0x00}}, + {2, [3]byte{0xcc, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}}, + {2, [3]byte{0xc3, 0xa0, 0x00}}, {2, [3]byte{0xc3, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xa2, 0x00}}, {2, [3]byte{0xc4, 0x83, 0x00}}, + {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa5, 0x00}}, + {2, [3]byte{0xc3, 0xa6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}}, + {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xa9, 0x00}}, + {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}}, + {2, [3]byte{0xcc, 0x81, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}}, + {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}}, + {2, [3]byte{0xc4, 0x91, 0x00}}, {2, [3]byte{0xc3, 0xb1, 0x00}}, + {2, [3]byte{0xcc, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0xb3, 0x00}}, + {2, [3]byte{0xc3, 0xb4, 0x00}}, {2, [3]byte{0xc6, 0xa1, 0x00}}, + {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb7, 0x00}}, + {2, [3]byte{0xc3, 0xb8, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}}, + {2, [3]byte{0xc3, 0xba, 0x00}}, {2, [3]byte{0xc3, 0xbb, 0x00}}, + {2, [3]byte{0xc3, 0xbc, 0x00}}, {2, [3]byte{0xc6, 0xb0, 0x00}}, + {3, [3]byte{0xe2, 0x82, 0xab}}, {2, [3]byte{0xc3, 0xbf, 0x00}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0xa00000a0, 0xa10000a1, 0xa20000a2, 0xa30000a3, 0xa40000a4, 0xa50000a5, 0xa60000a6, 0xa70000a7, + 0xa80000a8, 0xa90000a9, 0xaa0000aa, 0xab0000ab, 0xac0000ac, 0xad0000ad, 0xae0000ae, 0xaf0000af, + 0xb00000b0, 0xb10000b1, 0xb20000b2, 0xb30000b3, 0xb40000b4, 0xb50000b5, 0xb60000b6, 0xb70000b7, + 0xb80000b8, 0xb90000b9, 0xba0000ba, 0xbb0000bb, 0xbc0000bc, 0xbd0000bd, 0xbe0000be, 0xbf0000bf, + 0xc00000c0, 0xc10000c1, 0xc20000c2, 0xc40000c4, 0xc50000c5, 0xc60000c6, 0xc70000c7, 0xc80000c8, + 0xc90000c9, 0xca0000ca, 0xcb0000cb, 0xcd0000cd, 0xce0000ce, 0xcf0000cf, 0xd10000d1, 0xd30000d3, + 0xd40000d4, 0xd60000d6, 0xd70000d7, 0xd80000d8, 0xd90000d9, 0xda0000da, 0xdb0000db, 0xdc0000dc, + 0xdf0000df, 0xe00000e0, 0xe10000e1, 0xe20000e2, 0xe40000e4, 0xe50000e5, 0xe60000e6, 0xe70000e7, + 0xe80000e8, 0xe90000e9, 0xea0000ea, 0xeb0000eb, 0xed0000ed, 0xee0000ee, 0xef0000ef, 0xf10000f1, + 0xf30000f3, 0xf40000f4, 0xf60000f6, 0xf70000f7, 0xf80000f8, 0xf90000f9, 0xfa0000fa, 0xfb0000fb, + 0xfc0000fc, 0xff0000ff, 0xc3000102, 0xe3000103, 0xd0000110, 0xf0000111, 0x8c000152, 0x9c000153, + 0x9f000178, 0x83000192, 0xd50001a0, 0xf50001a1, 0xdd0001af, 0xfd0001b0, 0x880002c6, 0x980002dc, + 0xcc000300, 0xec000301, 0xde000303, 0xd2000309, 0xf2000323, 0x96002013, 0x97002014, 0x91002018, + 0x92002019, 0x8200201a, 0x9300201c, 0x9400201d, 0x8400201e, 0x86002020, 0x87002021, 0x95002022, + 0x85002026, 0x89002030, 0x8b002039, 0x9b00203a, 0xfe0020ab, 0x800020ac, 0x99002122, 0x99002122, + 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, 0x99002122, + }, +} + +// XUserDefined is the X-User-Defined encoding. +// +// It is defined at http://encoding.spec.whatwg.org/#x-user-defined +var XUserDefined *Charmap = &xUserDefined + +var xUserDefined = Charmap{ + name: "X-User-Defined", + mib: identifier.XUserDefined, + asciiSuperset: true, + low: 0x80, + replacement: 0x1a, + decode: [256]utf8Enc{ + {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}}, + {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}}, + {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}}, + {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}}, + {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}}, + {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}}, + {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}}, + {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}}, + {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}}, + {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}}, + {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}}, + {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}}, + {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}}, + {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}}, + {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}}, + {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}}, + {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}}, + {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}}, + {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}}, + {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}}, + {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}}, + {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}}, + {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}}, + {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}}, + {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}}, + {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}}, + {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}}, + {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}}, + {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}}, + {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}}, + {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}}, + {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}}, + {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}}, + {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}}, + {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}}, + {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}}, + {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}}, + {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}}, + {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}}, + {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}}, + {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}}, + {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}}, + {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}}, + {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}}, + {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}}, + {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}}, + {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}}, + {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}}, + {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}}, + {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}}, + {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}}, + {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}}, + {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}}, + {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}}, + {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}}, + {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}}, + {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}}, + {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}}, + {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}}, + {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}}, + {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}}, + {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}}, + {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}}, + {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}}, + {3, [3]byte{0xef, 0x9e, 0x80}}, {3, [3]byte{0xef, 0x9e, 0x81}}, + {3, [3]byte{0xef, 0x9e, 0x82}}, {3, [3]byte{0xef, 0x9e, 0x83}}, + {3, [3]byte{0xef, 0x9e, 0x84}}, {3, [3]byte{0xef, 0x9e, 0x85}}, + {3, [3]byte{0xef, 0x9e, 0x86}}, {3, [3]byte{0xef, 0x9e, 0x87}}, + {3, [3]byte{0xef, 0x9e, 0x88}}, {3, [3]byte{0xef, 0x9e, 0x89}}, + {3, [3]byte{0xef, 0x9e, 0x8a}}, {3, [3]byte{0xef, 0x9e, 0x8b}}, + {3, [3]byte{0xef, 0x9e, 0x8c}}, {3, [3]byte{0xef, 0x9e, 0x8d}}, + {3, [3]byte{0xef, 0x9e, 0x8e}}, {3, [3]byte{0xef, 0x9e, 0x8f}}, + {3, [3]byte{0xef, 0x9e, 0x90}}, {3, [3]byte{0xef, 0x9e, 0x91}}, + {3, [3]byte{0xef, 0x9e, 0x92}}, {3, [3]byte{0xef, 0x9e, 0x93}}, + {3, [3]byte{0xef, 0x9e, 0x94}}, {3, [3]byte{0xef, 0x9e, 0x95}}, + {3, [3]byte{0xef, 0x9e, 0x96}}, {3, [3]byte{0xef, 0x9e, 0x97}}, + {3, [3]byte{0xef, 0x9e, 0x98}}, {3, [3]byte{0xef, 0x9e, 0x99}}, + {3, [3]byte{0xef, 0x9e, 0x9a}}, {3, [3]byte{0xef, 0x9e, 0x9b}}, + {3, [3]byte{0xef, 0x9e, 0x9c}}, {3, [3]byte{0xef, 0x9e, 0x9d}}, + {3, [3]byte{0xef, 0x9e, 0x9e}}, {3, [3]byte{0xef, 0x9e, 0x9f}}, + {3, [3]byte{0xef, 0x9e, 0xa0}}, {3, [3]byte{0xef, 0x9e, 0xa1}}, + {3, [3]byte{0xef, 0x9e, 0xa2}}, {3, [3]byte{0xef, 0x9e, 0xa3}}, + {3, [3]byte{0xef, 0x9e, 0xa4}}, {3, [3]byte{0xef, 0x9e, 0xa5}}, + {3, [3]byte{0xef, 0x9e, 0xa6}}, {3, [3]byte{0xef, 0x9e, 0xa7}}, + {3, [3]byte{0xef, 0x9e, 0xa8}}, {3, [3]byte{0xef, 0x9e, 0xa9}}, + {3, [3]byte{0xef, 0x9e, 0xaa}}, {3, [3]byte{0xef, 0x9e, 0xab}}, + {3, [3]byte{0xef, 0x9e, 0xac}}, {3, [3]byte{0xef, 0x9e, 0xad}}, + {3, [3]byte{0xef, 0x9e, 0xae}}, {3, [3]byte{0xef, 0x9e, 0xaf}}, + {3, [3]byte{0xef, 0x9e, 0xb0}}, {3, [3]byte{0xef, 0x9e, 0xb1}}, + {3, [3]byte{0xef, 0x9e, 0xb2}}, {3, [3]byte{0xef, 0x9e, 0xb3}}, + {3, [3]byte{0xef, 0x9e, 0xb4}}, {3, [3]byte{0xef, 0x9e, 0xb5}}, + {3, [3]byte{0xef, 0x9e, 0xb6}}, {3, [3]byte{0xef, 0x9e, 0xb7}}, + {3, [3]byte{0xef, 0x9e, 0xb8}}, {3, [3]byte{0xef, 0x9e, 0xb9}}, + {3, [3]byte{0xef, 0x9e, 0xba}}, {3, [3]byte{0xef, 0x9e, 0xbb}}, + {3, [3]byte{0xef, 0x9e, 0xbc}}, {3, [3]byte{0xef, 0x9e, 0xbd}}, + {3, [3]byte{0xef, 0x9e, 0xbe}}, {3, [3]byte{0xef, 0x9e, 0xbf}}, + {3, [3]byte{0xef, 0x9f, 0x80}}, {3, [3]byte{0xef, 0x9f, 0x81}}, + {3, [3]byte{0xef, 0x9f, 0x82}}, {3, [3]byte{0xef, 0x9f, 0x83}}, + {3, [3]byte{0xef, 0x9f, 0x84}}, {3, [3]byte{0xef, 0x9f, 0x85}}, + {3, [3]byte{0xef, 0x9f, 0x86}}, {3, [3]byte{0xef, 0x9f, 0x87}}, + {3, [3]byte{0xef, 0x9f, 0x88}}, {3, [3]byte{0xef, 0x9f, 0x89}}, + {3, [3]byte{0xef, 0x9f, 0x8a}}, {3, [3]byte{0xef, 0x9f, 0x8b}}, + {3, [3]byte{0xef, 0x9f, 0x8c}}, {3, [3]byte{0xef, 0x9f, 0x8d}}, + {3, [3]byte{0xef, 0x9f, 0x8e}}, {3, [3]byte{0xef, 0x9f, 0x8f}}, + {3, [3]byte{0xef, 0x9f, 0x90}}, {3, [3]byte{0xef, 0x9f, 0x91}}, + {3, [3]byte{0xef, 0x9f, 0x92}}, {3, [3]byte{0xef, 0x9f, 0x93}}, + {3, [3]byte{0xef, 0x9f, 0x94}}, {3, [3]byte{0xef, 0x9f, 0x95}}, + {3, [3]byte{0xef, 0x9f, 0x96}}, {3, [3]byte{0xef, 0x9f, 0x97}}, + {3, [3]byte{0xef, 0x9f, 0x98}}, {3, [3]byte{0xef, 0x9f, 0x99}}, + {3, [3]byte{0xef, 0x9f, 0x9a}}, {3, [3]byte{0xef, 0x9f, 0x9b}}, + {3, [3]byte{0xef, 0x9f, 0x9c}}, {3, [3]byte{0xef, 0x9f, 0x9d}}, + {3, [3]byte{0xef, 0x9f, 0x9e}}, {3, [3]byte{0xef, 0x9f, 0x9f}}, + {3, [3]byte{0xef, 0x9f, 0xa0}}, {3, [3]byte{0xef, 0x9f, 0xa1}}, + {3, [3]byte{0xef, 0x9f, 0xa2}}, {3, [3]byte{0xef, 0x9f, 0xa3}}, + {3, [3]byte{0xef, 0x9f, 0xa4}}, {3, [3]byte{0xef, 0x9f, 0xa5}}, + {3, [3]byte{0xef, 0x9f, 0xa6}}, {3, [3]byte{0xef, 0x9f, 0xa7}}, + {3, [3]byte{0xef, 0x9f, 0xa8}}, {3, [3]byte{0xef, 0x9f, 0xa9}}, + {3, [3]byte{0xef, 0x9f, 0xaa}}, {3, [3]byte{0xef, 0x9f, 0xab}}, + {3, [3]byte{0xef, 0x9f, 0xac}}, {3, [3]byte{0xef, 0x9f, 0xad}}, + {3, [3]byte{0xef, 0x9f, 0xae}}, {3, [3]byte{0xef, 0x9f, 0xaf}}, + {3, [3]byte{0xef, 0x9f, 0xb0}}, {3, [3]byte{0xef, 0x9f, 0xb1}}, + {3, [3]byte{0xef, 0x9f, 0xb2}}, {3, [3]byte{0xef, 0x9f, 0xb3}}, + {3, [3]byte{0xef, 0x9f, 0xb4}}, {3, [3]byte{0xef, 0x9f, 0xb5}}, + {3, [3]byte{0xef, 0x9f, 0xb6}}, {3, [3]byte{0xef, 0x9f, 0xb7}}, + {3, [3]byte{0xef, 0x9f, 0xb8}}, {3, [3]byte{0xef, 0x9f, 0xb9}}, + {3, [3]byte{0xef, 0x9f, 0xba}}, {3, [3]byte{0xef, 0x9f, 0xbb}}, + {3, [3]byte{0xef, 0x9f, 0xbc}}, {3, [3]byte{0xef, 0x9f, 0xbd}}, + {3, [3]byte{0xef, 0x9f, 0xbe}}, {3, [3]byte{0xef, 0x9f, 0xbf}}, + }, + encode: [256]uint32{ + 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007, + 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f, + 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017, + 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f, + 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027, + 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f, + 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037, + 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f, + 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047, + 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f, + 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057, + 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f, + 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067, + 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f, + 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077, + 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f, + 0x8000f780, 0x8100f781, 0x8200f782, 0x8300f783, 0x8400f784, 0x8500f785, 0x8600f786, 0x8700f787, + 0x8800f788, 0x8900f789, 0x8a00f78a, 0x8b00f78b, 0x8c00f78c, 0x8d00f78d, 0x8e00f78e, 0x8f00f78f, + 0x9000f790, 0x9100f791, 0x9200f792, 0x9300f793, 0x9400f794, 0x9500f795, 0x9600f796, 0x9700f797, + 0x9800f798, 0x9900f799, 0x9a00f79a, 0x9b00f79b, 0x9c00f79c, 0x9d00f79d, 0x9e00f79e, 0x9f00f79f, + 0xa000f7a0, 0xa100f7a1, 0xa200f7a2, 0xa300f7a3, 0xa400f7a4, 0xa500f7a5, 0xa600f7a6, 0xa700f7a7, + 0xa800f7a8, 0xa900f7a9, 0xaa00f7aa, 0xab00f7ab, 0xac00f7ac, 0xad00f7ad, 0xae00f7ae, 0xaf00f7af, + 0xb000f7b0, 0xb100f7b1, 0xb200f7b2, 0xb300f7b3, 0xb400f7b4, 0xb500f7b5, 0xb600f7b6, 0xb700f7b7, + 0xb800f7b8, 0xb900f7b9, 0xba00f7ba, 0xbb00f7bb, 0xbc00f7bc, 0xbd00f7bd, 0xbe00f7be, 0xbf00f7bf, + 0xc000f7c0, 0xc100f7c1, 0xc200f7c2, 0xc300f7c3, 0xc400f7c4, 0xc500f7c5, 0xc600f7c6, 0xc700f7c7, + 0xc800f7c8, 0xc900f7c9, 0xca00f7ca, 0xcb00f7cb, 0xcc00f7cc, 0xcd00f7cd, 0xce00f7ce, 0xcf00f7cf, + 0xd000f7d0, 0xd100f7d1, 0xd200f7d2, 0xd300f7d3, 0xd400f7d4, 0xd500f7d5, 0xd600f7d6, 0xd700f7d7, + 0xd800f7d8, 0xd900f7d9, 0xda00f7da, 0xdb00f7db, 0xdc00f7dc, 0xdd00f7dd, 0xde00f7de, 0xdf00f7df, + 0xe000f7e0, 0xe100f7e1, 0xe200f7e2, 0xe300f7e3, 0xe400f7e4, 0xe500f7e5, 0xe600f7e6, 0xe700f7e7, + 0xe800f7e8, 0xe900f7e9, 0xea00f7ea, 0xeb00f7eb, 0xec00f7ec, 0xed00f7ed, 0xee00f7ee, 0xef00f7ef, + 0xf000f7f0, 0xf100f7f1, 0xf200f7f2, 0xf300f7f3, 0xf400f7f4, 0xf500f7f5, 0xf600f7f6, 0xf700f7f7, + 0xf800f7f8, 0xf900f7f9, 0xfa00f7fa, 0xfb00f7fb, 0xfc00f7fc, 0xfd00f7fd, 0xfe00f7fe, 0xff00f7ff, + }, +} +var listAll = []encoding.Encoding{ + CodePage037, + CodePage437, + CodePage850, + CodePage852, + CodePage855, + CodePage858, + CodePage860, + CodePage862, + CodePage863, + CodePage865, + CodePage866, + CodePage1047, + CodePage1140, + ISO8859_1, + ISO8859_2, + ISO8859_3, + ISO8859_4, + ISO8859_5, + ISO8859_6, + ISO8859_6E, + ISO8859_6I, + ISO8859_7, + ISO8859_8, + ISO8859_8E, + ISO8859_8I, + ISO8859_9, + ISO8859_10, + ISO8859_13, + ISO8859_14, + ISO8859_15, + ISO8859_16, + KOI8R, + KOI8U, + Macintosh, + MacintoshCyrillic, + Windows874, + Windows1250, + Windows1251, + Windows1252, + Windows1253, + Windows1254, + Windows1255, + Windows1256, + Windows1257, + Windows1258, + XUserDefined, +} + +// Total table size 87024 bytes (84KiB); checksum: 811C9DC5 diff --git a/vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go b/vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go new file mode 100644 index 000000000..bdc7d15dd --- /dev/null +++ b/vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go @@ -0,0 +1,86 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go + +// Package htmlindex maps character set encoding names to Encodings as +// recommended by the W3C for use in HTML 5. See http://www.w3.org/TR/encoding. +package htmlindex + +// TODO: perhaps have a "bare" version of the index (used by this package) that +// is not pre-loaded with all encodings. Global variables in encodings prevent +// the linker from being able to purge unneeded tables. This means that +// referencing all encodings, as this package does for the default index, links +// in all encodings unconditionally. +// +// This issue can be solved by either solving the linking issue (see +// https://github.com/golang/go/issues/6330) or refactoring the encoding tables +// (e.g. moving the tables to internal packages that do not use global +// variables). + +// TODO: allow canonicalizing names + +import ( + "errors" + "strings" + "sync" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/language" +) + +var ( + errInvalidName = errors.New("htmlindex: invalid encoding name") + errUnknown = errors.New("htmlindex: unknown Encoding") + errUnsupported = errors.New("htmlindex: this encoding is not supported") +) + +var ( + matcherOnce sync.Once + matcher language.Matcher +) + +// LanguageDefault returns the canonical name of the default encoding for a +// given language. +func LanguageDefault(tag language.Tag) string { + matcherOnce.Do(func() { + tags := []language.Tag{} + for _, t := range strings.Split(locales, " ") { + tags = append(tags, language.MustParse(t)) + } + matcher = language.NewMatcher(tags, language.PreferSameScript(true)) + }) + _, i, _ := matcher.Match(tag) + return canonical[localeMap[i]] // Default is Windows-1252. +} + +// Get returns an Encoding for one of the names listed in +// http://www.w3.org/TR/encoding using the Default Index. Matching is case- +// insensitive. +func Get(name string) (encoding.Encoding, error) { + x, ok := nameMap[strings.ToLower(strings.TrimSpace(name))] + if !ok { + return nil, errInvalidName + } + return encodings[x], nil +} + +// Name reports the canonical name of the given Encoding. It will return +// an error if e is not associated with a supported encoding scheme. +func Name(e encoding.Encoding) (string, error) { + id, ok := e.(identifier.Interface) + if !ok { + return "", errUnknown + } + mib, _ := id.ID() + if mib == 0 { + return "", errUnknown + } + v, ok := mibMap[mib] + if !ok { + return "", errUnsupported + } + return canonical[v], nil +} diff --git a/vendor/golang.org/x/text/encoding/htmlindex/map.go b/vendor/golang.org/x/text/encoding/htmlindex/map.go new file mode 100644 index 000000000..c61439045 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/htmlindex/map.go @@ -0,0 +1,105 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package htmlindex + +import ( + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/charmap" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/encoding/japanese" + "golang.org/x/text/encoding/korean" + "golang.org/x/text/encoding/simplifiedchinese" + "golang.org/x/text/encoding/traditionalchinese" + "golang.org/x/text/encoding/unicode" +) + +// mibMap maps a MIB identifier to an htmlEncoding index. +var mibMap = map[identifier.MIB]htmlEncoding{ + identifier.UTF8: utf8, + identifier.UTF16BE: utf16be, + identifier.UTF16LE: utf16le, + identifier.IBM866: ibm866, + identifier.ISOLatin2: iso8859_2, + identifier.ISOLatin3: iso8859_3, + identifier.ISOLatin4: iso8859_4, + identifier.ISOLatinCyrillic: iso8859_5, + identifier.ISOLatinArabic: iso8859_6, + identifier.ISOLatinGreek: iso8859_7, + identifier.ISOLatinHebrew: iso8859_8, + identifier.ISO88598I: iso8859_8I, + identifier.ISOLatin6: iso8859_10, + identifier.ISO885913: iso8859_13, + identifier.ISO885914: iso8859_14, + identifier.ISO885915: iso8859_15, + identifier.ISO885916: iso8859_16, + identifier.KOI8R: koi8r, + identifier.KOI8U: koi8u, + identifier.Macintosh: macintosh, + identifier.MacintoshCyrillic: macintoshCyrillic, + identifier.Windows874: windows874, + identifier.Windows1250: windows1250, + identifier.Windows1251: windows1251, + identifier.Windows1252: windows1252, + identifier.Windows1253: windows1253, + identifier.Windows1254: windows1254, + identifier.Windows1255: windows1255, + identifier.Windows1256: windows1256, + identifier.Windows1257: windows1257, + identifier.Windows1258: windows1258, + identifier.XUserDefined: xUserDefined, + identifier.GBK: gbk, + identifier.GB18030: gb18030, + identifier.Big5: big5, + identifier.EUCPkdFmtJapanese: eucjp, + identifier.ISO2022JP: iso2022jp, + identifier.ShiftJIS: shiftJIS, + identifier.EUCKR: euckr, + identifier.Replacement: replacement, +} + +// encodings maps the internal htmlEncoding to an Encoding. +// TODO: consider using a reusable index in encoding/internal. +var encodings = [numEncodings]encoding.Encoding{ + utf8: unicode.UTF8, + ibm866: charmap.CodePage866, + iso8859_2: charmap.ISO8859_2, + iso8859_3: charmap.ISO8859_3, + iso8859_4: charmap.ISO8859_4, + iso8859_5: charmap.ISO8859_5, + iso8859_6: charmap.ISO8859_6, + iso8859_7: charmap.ISO8859_7, + iso8859_8: charmap.ISO8859_8, + iso8859_8I: charmap.ISO8859_8I, + iso8859_10: charmap.ISO8859_10, + iso8859_13: charmap.ISO8859_13, + iso8859_14: charmap.ISO8859_14, + iso8859_15: charmap.ISO8859_15, + iso8859_16: charmap.ISO8859_16, + koi8r: charmap.KOI8R, + koi8u: charmap.KOI8U, + macintosh: charmap.Macintosh, + windows874: charmap.Windows874, + windows1250: charmap.Windows1250, + windows1251: charmap.Windows1251, + windows1252: charmap.Windows1252, + windows1253: charmap.Windows1253, + windows1254: charmap.Windows1254, + windows1255: charmap.Windows1255, + windows1256: charmap.Windows1256, + windows1257: charmap.Windows1257, + windows1258: charmap.Windows1258, + macintoshCyrillic: charmap.MacintoshCyrillic, + gbk: simplifiedchinese.GBK, + gb18030: simplifiedchinese.GB18030, + big5: traditionalchinese.Big5, + eucjp: japanese.EUCJP, + iso2022jp: japanese.ISO2022JP, + shiftJIS: japanese.ShiftJIS, + euckr: korean.EUCKR, + replacement: encoding.Replacement, + utf16be: unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM), + utf16le: unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), + xUserDefined: charmap.XUserDefined, +} diff --git a/vendor/golang.org/x/text/encoding/htmlindex/tables.go b/vendor/golang.org/x/text/encoding/htmlindex/tables.go new file mode 100644 index 000000000..9e6daa896 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/htmlindex/tables.go @@ -0,0 +1,362 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package htmlindex + +type htmlEncoding byte + +const ( + utf8 htmlEncoding = iota + ibm866 + iso8859_2 + iso8859_3 + iso8859_4 + iso8859_5 + iso8859_6 + iso8859_7 + iso8859_8 + iso8859_8I + iso8859_10 + iso8859_13 + iso8859_14 + iso8859_15 + iso8859_16 + koi8r + koi8u + macintosh + windows874 + windows1250 + windows1251 + windows1252 + windows1253 + windows1254 + windows1255 + windows1256 + windows1257 + windows1258 + macintoshCyrillic + gbk + gb18030 + big5 + eucjp + iso2022jp + shiftJIS + euckr + replacement + utf16be + utf16le + xUserDefined + numEncodings +) + +var canonical = [numEncodings]string{ + "utf-8", + "ibm866", + "iso-8859-2", + "iso-8859-3", + "iso-8859-4", + "iso-8859-5", + "iso-8859-6", + "iso-8859-7", + "iso-8859-8", + "iso-8859-8-i", + "iso-8859-10", + "iso-8859-13", + "iso-8859-14", + "iso-8859-15", + "iso-8859-16", + "koi8-r", + "koi8-u", + "macintosh", + "windows-874", + "windows-1250", + "windows-1251", + "windows-1252", + "windows-1253", + "windows-1254", + "windows-1255", + "windows-1256", + "windows-1257", + "windows-1258", + "x-mac-cyrillic", + "gbk", + "gb18030", + "big5", + "euc-jp", + "iso-2022-jp", + "shift_jis", + "euc-kr", + "replacement", + "utf-16be", + "utf-16le", + "x-user-defined", +} + +var nameMap = map[string]htmlEncoding{ + "unicode-1-1-utf-8": utf8, + "unicode11utf8": utf8, + "unicode20utf8": utf8, + "utf-8": utf8, + "utf8": utf8, + "x-unicode20utf8": utf8, + "866": ibm866, + "cp866": ibm866, + "csibm866": ibm866, + "ibm866": ibm866, + "csisolatin2": iso8859_2, + "iso-8859-2": iso8859_2, + "iso-ir-101": iso8859_2, + "iso8859-2": iso8859_2, + "iso88592": iso8859_2, + "iso_8859-2": iso8859_2, + "iso_8859-2:1987": iso8859_2, + "l2": iso8859_2, + "latin2": iso8859_2, + "csisolatin3": iso8859_3, + "iso-8859-3": iso8859_3, + "iso-ir-109": iso8859_3, + "iso8859-3": iso8859_3, + "iso88593": iso8859_3, + "iso_8859-3": iso8859_3, + "iso_8859-3:1988": iso8859_3, + "l3": iso8859_3, + "latin3": iso8859_3, + "csisolatin4": iso8859_4, + "iso-8859-4": iso8859_4, + "iso-ir-110": iso8859_4, + "iso8859-4": iso8859_4, + "iso88594": iso8859_4, + "iso_8859-4": iso8859_4, + "iso_8859-4:1988": iso8859_4, + "l4": iso8859_4, + "latin4": iso8859_4, + "csisolatincyrillic": iso8859_5, + "cyrillic": iso8859_5, + "iso-8859-5": iso8859_5, + "iso-ir-144": iso8859_5, + "iso8859-5": iso8859_5, + "iso88595": iso8859_5, + "iso_8859-5": iso8859_5, + "iso_8859-5:1988": iso8859_5, + "arabic": iso8859_6, + "asmo-708": iso8859_6, + "csiso88596e": iso8859_6, + "csiso88596i": iso8859_6, + "csisolatinarabic": iso8859_6, + "ecma-114": iso8859_6, + "iso-8859-6": iso8859_6, + "iso-8859-6-e": iso8859_6, + "iso-8859-6-i": iso8859_6, + "iso-ir-127": iso8859_6, + "iso8859-6": iso8859_6, + "iso88596": iso8859_6, + "iso_8859-6": iso8859_6, + "iso_8859-6:1987": iso8859_6, + "csisolatingreek": iso8859_7, + "ecma-118": iso8859_7, + "elot_928": iso8859_7, + "greek": iso8859_7, + "greek8": iso8859_7, + "iso-8859-7": iso8859_7, + "iso-ir-126": iso8859_7, + "iso8859-7": iso8859_7, + "iso88597": iso8859_7, + "iso_8859-7": iso8859_7, + "iso_8859-7:1987": iso8859_7, + "sun_eu_greek": iso8859_7, + "csiso88598e": iso8859_8, + "csisolatinhebrew": iso8859_8, + "hebrew": iso8859_8, + "iso-8859-8": iso8859_8, + "iso-8859-8-e": iso8859_8, + "iso-ir-138": iso8859_8, + "iso8859-8": iso8859_8, + "iso88598": iso8859_8, + "iso_8859-8": iso8859_8, + "iso_8859-8:1988": iso8859_8, + "visual": iso8859_8, + "csiso88598i": iso8859_8I, + "iso-8859-8-i": iso8859_8I, + "logical": iso8859_8I, + "csisolatin6": iso8859_10, + "iso-8859-10": iso8859_10, + "iso-ir-157": iso8859_10, + "iso8859-10": iso8859_10, + "iso885910": iso8859_10, + "l6": iso8859_10, + "latin6": iso8859_10, + "iso-8859-13": iso8859_13, + "iso8859-13": iso8859_13, + "iso885913": iso8859_13, + "iso-8859-14": iso8859_14, + "iso8859-14": iso8859_14, + "iso885914": iso8859_14, + "csisolatin9": iso8859_15, + "iso-8859-15": iso8859_15, + "iso8859-15": iso8859_15, + "iso885915": iso8859_15, + "iso_8859-15": iso8859_15, + "l9": iso8859_15, + "iso-8859-16": iso8859_16, + "cskoi8r": koi8r, + "koi": koi8r, + "koi8": koi8r, + "koi8-r": koi8r, + "koi8_r": koi8r, + "koi8-ru": koi8u, + "koi8-u": koi8u, + "csmacintosh": macintosh, + "mac": macintosh, + "macintosh": macintosh, + "x-mac-roman": macintosh, + "dos-874": windows874, + "iso-8859-11": windows874, + "iso8859-11": windows874, + "iso885911": windows874, + "tis-620": windows874, + "windows-874": windows874, + "cp1250": windows1250, + "windows-1250": windows1250, + "x-cp1250": windows1250, + "cp1251": windows1251, + "windows-1251": windows1251, + "x-cp1251": windows1251, + "ansi_x3.4-1968": windows1252, + "ascii": windows1252, + "cp1252": windows1252, + "cp819": windows1252, + "csisolatin1": windows1252, + "ibm819": windows1252, + "iso-8859-1": windows1252, + "iso-ir-100": windows1252, + "iso8859-1": windows1252, + "iso88591": windows1252, + "iso_8859-1": windows1252, + "iso_8859-1:1987": windows1252, + "l1": windows1252, + "latin1": windows1252, + "us-ascii": windows1252, + "windows-1252": windows1252, + "x-cp1252": windows1252, + "cp1253": windows1253, + "windows-1253": windows1253, + "x-cp1253": windows1253, + "cp1254": windows1254, + "csisolatin5": windows1254, + "iso-8859-9": windows1254, + "iso-ir-148": windows1254, + "iso8859-9": windows1254, + "iso88599": windows1254, + "iso_8859-9": windows1254, + "iso_8859-9:1989": windows1254, + "l5": windows1254, + "latin5": windows1254, + "windows-1254": windows1254, + "x-cp1254": windows1254, + "cp1255": windows1255, + "windows-1255": windows1255, + "x-cp1255": windows1255, + "cp1256": windows1256, + "windows-1256": windows1256, + "x-cp1256": windows1256, + "cp1257": windows1257, + "windows-1257": windows1257, + "x-cp1257": windows1257, + "cp1258": windows1258, + "windows-1258": windows1258, + "x-cp1258": windows1258, + "x-mac-cyrillic": macintoshCyrillic, + "x-mac-ukrainian": macintoshCyrillic, + "chinese": gbk, + "csgb2312": gbk, + "csiso58gb231280": gbk, + "gb2312": gbk, + "gb_2312": gbk, + "gb_2312-80": gbk, + "gbk": gbk, + "iso-ir-58": gbk, + "x-gbk": gbk, + "gb18030": gb18030, + "big5": big5, + "big5-hkscs": big5, + "cn-big5": big5, + "csbig5": big5, + "x-x-big5": big5, + "cseucpkdfmtjapanese": eucjp, + "euc-jp": eucjp, + "x-euc-jp": eucjp, + "csiso2022jp": iso2022jp, + "iso-2022-jp": iso2022jp, + "csshiftjis": shiftJIS, + "ms932": shiftJIS, + "ms_kanji": shiftJIS, + "shift-jis": shiftJIS, + "shift_jis": shiftJIS, + "sjis": shiftJIS, + "windows-31j": shiftJIS, + "x-sjis": shiftJIS, + "cseuckr": euckr, + "csksc56011987": euckr, + "euc-kr": euckr, + "iso-ir-149": euckr, + "korean": euckr, + "ks_c_5601-1987": euckr, + "ks_c_5601-1989": euckr, + "ksc5601": euckr, + "ksc_5601": euckr, + "windows-949": euckr, + "csiso2022kr": replacement, + "hz-gb-2312": replacement, + "iso-2022-cn": replacement, + "iso-2022-cn-ext": replacement, + "iso-2022-kr": replacement, + "replacement": replacement, + "unicodefffe": utf16be, + "utf-16be": utf16be, + "csunicode": utf16le, + "iso-10646-ucs-2": utf16le, + "ucs-2": utf16le, + "unicode": utf16le, + "unicodefeff": utf16le, + "utf-16": utf16le, + "utf-16le": utf16le, + "x-user-defined": xUserDefined, +} + +var localeMap = []htmlEncoding{ + windows1252, // und_Latn + windows1256, // ar + windows1251, // ba + windows1251, // be + windows1251, // bg + windows1250, // cs + iso8859_7, // el + windows1257, // et + windows1256, // fa + windows1255, // he + windows1250, // hr + iso8859_2, // hu + shiftJIS, // ja + windows1251, // kk + euckr, // ko + windows1254, // ku + windows1251, // ky + windows1257, // lt + windows1257, // lv + windows1251, // mk + iso8859_2, // pl + windows1251, // ru + windows1251, // sah + windows1250, // sk + iso8859_2, // sl + windows1251, // sr + windows1251, // tg + windows874, // th + windows1254, // tr + windows1251, // tt + windows1251, // uk + windows1258, // vi + gb18030, // zh-hans + big5, // zh-hant +} + +const locales = "und_Latn ar ba be bg cs el et fa he hr hu ja kk ko ku ky lt lv mk pl ru sah sk sl sr tg th tr tt uk vi zh-hans zh-hant" diff --git a/vendor/golang.org/x/text/encoding/japanese/all.go b/vendor/golang.org/x/text/encoding/japanese/all.go new file mode 100644 index 000000000..6cfa8de45 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/japanese/all.go @@ -0,0 +1,12 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package japanese + +import ( + "golang.org/x/text/encoding" +) + +// All is a list of all defined encodings in this package. +var All = []encoding.Encoding{EUCJP, ISO2022JP, ShiftJIS} diff --git a/vendor/golang.org/x/text/encoding/japanese/eucjp.go b/vendor/golang.org/x/text/encoding/japanese/eucjp.go new file mode 100644 index 000000000..79313fa58 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/japanese/eucjp.go @@ -0,0 +1,225 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package japanese + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// EUCJP is the EUC-JP encoding. +var EUCJP encoding.Encoding = &eucJP + +var eucJP = internal.Encoding{ + &internal.SimpleEncoding{eucJPDecoder{}, eucJPEncoder{}}, + "EUC-JP", + identifier.EUCPkdFmtJapanese, +} + +type eucJPDecoder struct{ transform.NopResetter } + +// See https://encoding.spec.whatwg.org/#euc-jp-decoder. +func (eucJPDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for ; nSrc < len(src); nSrc += size { + switch c0 := src[nSrc]; { + case c0 < utf8.RuneSelf: + r, size = rune(c0), 1 + + case c0 == 0x8e: + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + break + } + c1 := src[nSrc+1] + switch { + case c1 < 0xa1: + r, size = utf8.RuneError, 1 + case c1 > 0xdf: + r, size = utf8.RuneError, 2 + if c1 == 0xff { + size = 1 + } + default: + r, size = rune(c1)+(0xff61-0xa1), 2 + } + case c0 == 0x8f: + if nSrc+2 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + if p := nSrc + 1; p < len(src) && 0xa1 <= src[p] && src[p] < 0xfe { + size = 2 + } + break + } + c1 := src[nSrc+1] + if c1 < 0xa1 || 0xfe < c1 { + r, size = utf8.RuneError, 1 + break + } + c2 := src[nSrc+2] + if c2 < 0xa1 || 0xfe < c2 { + r, size = utf8.RuneError, 2 + break + } + r, size = utf8.RuneError, 3 + if i := int(c1-0xa1)*94 + int(c2-0xa1); i < len(jis0212Decode) { + r = rune(jis0212Decode[i]) + if r == 0 { + r = utf8.RuneError + } + } + + case 0xa1 <= c0 && c0 <= 0xfe: + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + break + } + c1 := src[nSrc+1] + if c1 < 0xa1 || 0xfe < c1 { + r, size = utf8.RuneError, 1 + break + } + r, size = utf8.RuneError, 2 + if i := int(c0-0xa1)*94 + int(c1-0xa1); i < len(jis0208Decode) { + r = rune(jis0208Decode[i]) + if r == 0 { + r = utf8.RuneError + } + } + + default: + r, size = utf8.RuneError, 1 + } + + if nDst+utf8.RuneLen(r) > len(dst) { + err = transform.ErrShortDst + break loop + } + nDst += utf8.EncodeRune(dst[nDst:], r) + } + return nDst, nSrc, err +} + +type eucJPEncoder struct{ transform.NopResetter } + +func (eucJPEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break + } + } + + // func init checks that the switch covers all tables. + switch { + case encode0Low <= r && r < encode0High: + if r = rune(encode0[r-encode0Low]); r != 0 { + goto write2or3 + } + case encode1Low <= r && r < encode1High: + if r = rune(encode1[r-encode1Low]); r != 0 { + goto write2or3 + } + case encode2Low <= r && r < encode2High: + if r = rune(encode2[r-encode2Low]); r != 0 { + goto write2or3 + } + case encode3Low <= r && r < encode3High: + if r = rune(encode3[r-encode3Low]); r != 0 { + goto write2or3 + } + case encode4Low <= r && r < encode4High: + if r = rune(encode4[r-encode4Low]); r != 0 { + goto write2or3 + } + case encode5Low <= r && r < encode5High: + if 0xff61 <= r && r < 0xffa0 { + goto write2 + } + if r = rune(encode5[r-encode5Low]); r != 0 { + goto write2or3 + } + } + err = internal.ErrASCIIReplacement + break + } + + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst++ + continue + + write2or3: + if r>>tableShift == jis0208 { + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + } else { + if nDst+3 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = 0x8f + nDst++ + } + dst[nDst+0] = 0xa1 + uint8(r>>codeShift)&codeMask + dst[nDst+1] = 0xa1 + uint8(r)&codeMask + nDst += 2 + continue + + write2: + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = 0x8e + dst[nDst+1] = uint8(r - (0xff61 - 0xa1)) + nDst += 2 + continue + } + return nDst, nSrc, err +} + +func init() { + // Check that the hard-coded encode switch covers all tables. + if numEncodeTables != 6 { + panic("bad numEncodeTables") + } +} diff --git a/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go b/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go new file mode 100644 index 000000000..613226df5 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go @@ -0,0 +1,299 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package japanese + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// ISO2022JP is the ISO-2022-JP encoding. +var ISO2022JP encoding.Encoding = &iso2022JP + +var iso2022JP = internal.Encoding{ + internal.FuncEncoding{iso2022JPNewDecoder, iso2022JPNewEncoder}, + "ISO-2022-JP", + identifier.ISO2022JP, +} + +func iso2022JPNewDecoder() transform.Transformer { + return new(iso2022JPDecoder) +} + +func iso2022JPNewEncoder() transform.Transformer { + return new(iso2022JPEncoder) +} + +const ( + asciiState = iota + katakanaState + jis0208State + jis0212State +) + +const asciiEsc = 0x1b + +type iso2022JPDecoder int + +func (d *iso2022JPDecoder) Reset() { + *d = asciiState +} + +func (d *iso2022JPDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 + for ; nSrc < len(src); nSrc += size { + c0 := src[nSrc] + if c0 >= utf8.RuneSelf { + r, size = '\ufffd', 1 + goto write + } + + if c0 == asciiEsc { + if nSrc+2 >= len(src) { + if !atEOF { + return nDst, nSrc, transform.ErrShortSrc + } + // TODO: is it correct to only skip 1?? + r, size = '\ufffd', 1 + goto write + } + size = 3 + c1 := src[nSrc+1] + c2 := src[nSrc+2] + switch { + case c1 == '$' && (c2 == '@' || c2 == 'B'): // 0x24 {0x40, 0x42} + *d = jis0208State + continue + case c1 == '$' && c2 == '(': // 0x24 0x28 + if nSrc+3 >= len(src) { + if !atEOF { + return nDst, nSrc, transform.ErrShortSrc + } + r, size = '\ufffd', 1 + goto write + } + size = 4 + if src[nSrc+3] == 'D' { + *d = jis0212State + continue + } + case c1 == '(' && (c2 == 'B' || c2 == 'J'): // 0x28 {0x42, 0x4A} + *d = asciiState + continue + case c1 == '(' && c2 == 'I': // 0x28 0x49 + *d = katakanaState + continue + } + r, size = '\ufffd', 1 + goto write + } + + switch *d { + case asciiState: + r, size = rune(c0), 1 + + case katakanaState: + if c0 < 0x21 || 0x60 <= c0 { + r, size = '\ufffd', 1 + goto write + } + r, size = rune(c0)+(0xff61-0x21), 1 + + default: + if c0 == 0x0a { + *d = asciiState + r, size = rune(c0), 1 + goto write + } + if nSrc+1 >= len(src) { + if !atEOF { + return nDst, nSrc, transform.ErrShortSrc + } + r, size = '\ufffd', 1 + goto write + } + size = 2 + c1 := src[nSrc+1] + i := int(c0-0x21)*94 + int(c1-0x21) + if *d == jis0208State && i < len(jis0208Decode) { + r = rune(jis0208Decode[i]) + } else if *d == jis0212State && i < len(jis0212Decode) { + r = rune(jis0212Decode[i]) + } else { + r = '\ufffd' + goto write + } + if r == 0 { + r = '\ufffd' + } + } + + write: + if nDst+utf8.RuneLen(r) > len(dst) { + return nDst, nSrc, transform.ErrShortDst + } + nDst += utf8.EncodeRune(dst[nDst:], r) + } + return nDst, nSrc, err +} + +type iso2022JPEncoder int + +func (e *iso2022JPEncoder) Reset() { + *e = asciiState +} + +func (e *iso2022JPEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break + } + } + + // func init checks that the switch covers all tables. + // + // http://encoding.spec.whatwg.org/#iso-2022-jp says that "the index jis0212 + // is not used by the iso-2022-jp encoder due to lack of widespread support". + // + // TODO: do we have to special-case U+00A5 and U+203E, as per + // http://encoding.spec.whatwg.org/#iso-2022-jp + // Doing so would mean that "\u00a5" would not be preserved + // after an encode-decode round trip. + switch { + case encode0Low <= r && r < encode0High: + if r = rune(encode0[r-encode0Low]); r>>tableShift == jis0208 { + goto writeJIS + } + case encode1Low <= r && r < encode1High: + if r = rune(encode1[r-encode1Low]); r>>tableShift == jis0208 { + goto writeJIS + } + case encode2Low <= r && r < encode2High: + if r = rune(encode2[r-encode2Low]); r>>tableShift == jis0208 { + goto writeJIS + } + case encode3Low <= r && r < encode3High: + if r = rune(encode3[r-encode3Low]); r>>tableShift == jis0208 { + goto writeJIS + } + case encode4Low <= r && r < encode4High: + if r = rune(encode4[r-encode4Low]); r>>tableShift == jis0208 { + goto writeJIS + } + case encode5Low <= r && r < encode5High: + if 0xff61 <= r && r < 0xffa0 { + goto writeKatakana + } + if r = rune(encode5[r-encode5Low]); r>>tableShift == jis0208 { + goto writeJIS + } + } + + // Switch back to ASCII state in case of error so that an ASCII + // replacement character can be written in the correct state. + if *e != asciiState { + if nDst+3 > len(dst) { + err = transform.ErrShortDst + break + } + *e = asciiState + dst[nDst+0] = asciiEsc + dst[nDst+1] = '(' + dst[nDst+2] = 'B' + nDst += 3 + } + err = internal.ErrASCIIReplacement + break + } + + if *e != asciiState { + if nDst+4 > len(dst) { + err = transform.ErrShortDst + break + } + *e = asciiState + dst[nDst+0] = asciiEsc + dst[nDst+1] = '(' + dst[nDst+2] = 'B' + nDst += 3 + } else if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst++ + continue + + writeJIS: + if *e != jis0208State { + if nDst+5 > len(dst) { + err = transform.ErrShortDst + break + } + *e = jis0208State + dst[nDst+0] = asciiEsc + dst[nDst+1] = '$' + dst[nDst+2] = 'B' + nDst += 3 + } else if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = 0x21 + uint8(r>>codeShift)&codeMask + dst[nDst+1] = 0x21 + uint8(r)&codeMask + nDst += 2 + continue + + writeKatakana: + if *e != katakanaState { + if nDst+4 > len(dst) { + err = transform.ErrShortDst + break + } + *e = katakanaState + dst[nDst+0] = asciiEsc + dst[nDst+1] = '(' + dst[nDst+2] = 'I' + nDst += 3 + } else if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r - (0xff61 - 0x21)) + nDst++ + continue + } + if atEOF && err == nil && *e != asciiState { + if nDst+3 > len(dst) { + err = transform.ErrShortDst + } else { + *e = asciiState + dst[nDst+0] = asciiEsc + dst[nDst+1] = '(' + dst[nDst+2] = 'B' + nDst += 3 + } + } + return nDst, nSrc, err +} diff --git a/vendor/golang.org/x/text/encoding/japanese/shiftjis.go b/vendor/golang.org/x/text/encoding/japanese/shiftjis.go new file mode 100644 index 000000000..16fd8a6e3 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/japanese/shiftjis.go @@ -0,0 +1,189 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package japanese + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// ShiftJIS is the Shift JIS encoding, also known as Code Page 932 and +// Windows-31J. +var ShiftJIS encoding.Encoding = &shiftJIS + +var shiftJIS = internal.Encoding{ + &internal.SimpleEncoding{shiftJISDecoder{}, shiftJISEncoder{}}, + "Shift JIS", + identifier.ShiftJIS, +} + +type shiftJISDecoder struct{ transform.NopResetter } + +func (shiftJISDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for ; nSrc < len(src); nSrc += size { + switch c0 := src[nSrc]; { + case c0 < utf8.RuneSelf: + r, size = rune(c0), 1 + + case 0xa1 <= c0 && c0 < 0xe0: + r, size = rune(c0)+(0xff61-0xa1), 1 + + case (0x81 <= c0 && c0 < 0xa0) || (0xe0 <= c0 && c0 < 0xfd): + if c0 <= 0x9f { + c0 -= 0x70 + } else { + c0 -= 0xb0 + } + c0 = 2*c0 - 0x21 + + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = '\ufffd', 1 + goto write + } + c1 := src[nSrc+1] + switch { + case c1 < 0x40: + r, size = '\ufffd', 1 // c1 is ASCII so output on next round + goto write + case c1 < 0x7f: + c0-- + c1 -= 0x40 + case c1 == 0x7f: + r, size = '\ufffd', 1 // c1 is ASCII so output on next round + goto write + case c1 < 0x9f: + c0-- + c1 -= 0x41 + case c1 < 0xfd: + c1 -= 0x9f + default: + r, size = '\ufffd', 2 + goto write + } + r, size = '\ufffd', 2 + if i := int(c0)*94 + int(c1); i < len(jis0208Decode) { + r = rune(jis0208Decode[i]) + if r == 0 { + r = '\ufffd' + } + } + + case c0 == 0x80: + r, size = 0x80, 1 + + default: + r, size = '\ufffd', 1 + } + write: + if nDst+utf8.RuneLen(r) > len(dst) { + err = transform.ErrShortDst + break loop + } + nDst += utf8.EncodeRune(dst[nDst:], r) + } + return nDst, nSrc, err +} + +type shiftJISEncoder struct{ transform.NopResetter } + +func (shiftJISEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break loop + } + } + + // func init checks that the switch covers all tables. + switch { + case encode0Low <= r && r < encode0High: + if r = rune(encode0[r-encode0Low]); r>>tableShift == jis0208 { + goto write2 + } + case encode1Low <= r && r < encode1High: + if r = rune(encode1[r-encode1Low]); r>>tableShift == jis0208 { + goto write2 + } + case encode2Low <= r && r < encode2High: + if r = rune(encode2[r-encode2Low]); r>>tableShift == jis0208 { + goto write2 + } + case encode3Low <= r && r < encode3High: + if r = rune(encode3[r-encode3Low]); r>>tableShift == jis0208 { + goto write2 + } + case encode4Low <= r && r < encode4High: + if r = rune(encode4[r-encode4Low]); r>>tableShift == jis0208 { + goto write2 + } + case encode5Low <= r && r < encode5High: + if 0xff61 <= r && r < 0xffa0 { + r -= 0xff61 - 0xa1 + goto write1 + } + if r = rune(encode5[r-encode5Low]); r>>tableShift == jis0208 { + goto write2 + } + } + err = internal.ErrASCIIReplacement + break + } + + write1: + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst++ + continue + + write2: + j1 := uint8(r>>codeShift) & codeMask + j2 := uint8(r) & codeMask + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break loop + } + if j1 <= 61 { + dst[nDst+0] = 129 + j1/2 + } else { + dst[nDst+0] = 193 + j1/2 + } + if j1&1 == 0 { + dst[nDst+1] = j2 + j2/63 + 64 + } else { + dst[nDst+1] = j2 + 159 + } + nDst += 2 + continue + } + return nDst, nSrc, err +} diff --git a/vendor/golang.org/x/text/encoding/japanese/tables.go b/vendor/golang.org/x/text/encoding/japanese/tables.go new file mode 100644 index 000000000..8717b79ae --- /dev/null +++ b/vendor/golang.org/x/text/encoding/japanese/tables.go @@ -0,0 +1,26971 @@ +// generated by go run maketables.go; DO NOT EDIT + +// Package japanese provides Japanese encodings such as EUC-JP and Shift JIS. +package japanese // import "golang.org/x/text/encoding/japanese" + +// jis0208Decode is the decoding table from JIS 0208 code to Unicode. +// It is defined at http://encoding.spec.whatwg.org/index-jis0208.txt +var jis0208Decode = [...]uint16{ + 0: 0x3000, + 1: 0x3001, + 2: 0x3002, + 3: 0xFF0C, + 4: 0xFF0E, + 5: 0x30FB, + 6: 0xFF1A, + 7: 0xFF1B, + 8: 0xFF1F, + 9: 0xFF01, + 10: 0x309B, + 11: 0x309C, + 12: 0x00B4, + 13: 0xFF40, + 14: 0x00A8, + 15: 0xFF3E, + 16: 0xFFE3, + 17: 0xFF3F, + 18: 0x30FD, + 19: 0x30FE, + 20: 0x309D, + 21: 0x309E, + 22: 0x3003, + 23: 0x4EDD, + 24: 0x3005, + 25: 0x3006, + 26: 0x3007, + 27: 0x30FC, + 28: 0x2015, + 29: 0x2010, + 30: 0xFF0F, + 31: 0xFF3C, + 32: 0xFF5E, + 33: 0x2225, + 34: 0xFF5C, + 35: 0x2026, + 36: 0x2025, + 37: 0x2018, + 38: 0x2019, + 39: 0x201C, + 40: 0x201D, + 41: 0xFF08, + 42: 0xFF09, + 43: 0x3014, + 44: 0x3015, + 45: 0xFF3B, + 46: 0xFF3D, + 47: 0xFF5B, + 48: 0xFF5D, + 49: 0x3008, + 50: 0x3009, + 51: 0x300A, + 52: 0x300B, + 53: 0x300C, + 54: 0x300D, + 55: 0x300E, + 56: 0x300F, + 57: 0x3010, + 58: 0x3011, + 59: 0xFF0B, + 60: 0xFF0D, + 61: 0x00B1, + 62: 0x00D7, + 63: 0x00F7, + 64: 0xFF1D, + 65: 0x2260, + 66: 0xFF1C, + 67: 0xFF1E, + 68: 0x2266, + 69: 0x2267, + 70: 0x221E, + 71: 0x2234, + 72: 0x2642, + 73: 0x2640, + 74: 0x00B0, + 75: 0x2032, + 76: 0x2033, + 77: 0x2103, + 78: 0xFFE5, + 79: 0xFF04, + 80: 0xFFE0, + 81: 0xFFE1, + 82: 0xFF05, + 83: 0xFF03, + 84: 0xFF06, + 85: 0xFF0A, + 86: 0xFF20, + 87: 0x00A7, + 88: 0x2606, + 89: 0x2605, + 90: 0x25CB, + 91: 0x25CF, + 92: 0x25CE, + 93: 0x25C7, + 94: 0x25C6, + 95: 0x25A1, + 96: 0x25A0, + 97: 0x25B3, + 98: 0x25B2, + 99: 0x25BD, + 100: 0x25BC, + 101: 0x203B, + 102: 0x3012, + 103: 0x2192, + 104: 0x2190, + 105: 0x2191, + 106: 0x2193, + 107: 0x3013, + 119: 0x2208, + 120: 0x220B, + 121: 0x2286, + 122: 0x2287, + 123: 0x2282, + 124: 0x2283, + 125: 0x222A, + 126: 0x2229, + 135: 0x2227, + 136: 0x2228, + 137: 0xFFE2, + 138: 0x21D2, + 139: 0x21D4, + 140: 0x2200, + 141: 0x2203, + 153: 0x2220, + 154: 0x22A5, + 155: 0x2312, + 156: 0x2202, + 157: 0x2207, + 158: 0x2261, + 159: 0x2252, + 160: 0x226A, + 161: 0x226B, + 162: 0x221A, + 163: 0x223D, + 164: 0x221D, + 165: 0x2235, + 166: 0x222B, + 167: 0x222C, + 175: 0x212B, + 176: 0x2030, + 177: 0x266F, + 178: 0x266D, + 179: 0x266A, + 180: 0x2020, + 181: 0x2021, + 182: 0x00B6, + 187: 0x25EF, + 203: 0xFF10, + 204: 0xFF11, + 205: 0xFF12, + 206: 0xFF13, + 207: 0xFF14, + 208: 0xFF15, + 209: 0xFF16, + 210: 0xFF17, + 211: 0xFF18, + 212: 0xFF19, + 220: 0xFF21, + 221: 0xFF22, + 222: 0xFF23, + 223: 0xFF24, + 224: 0xFF25, + 225: 0xFF26, + 226: 0xFF27, + 227: 0xFF28, + 228: 0xFF29, + 229: 0xFF2A, + 230: 0xFF2B, + 231: 0xFF2C, + 232: 0xFF2D, + 233: 0xFF2E, + 234: 0xFF2F, + 235: 0xFF30, + 236: 0xFF31, + 237: 0xFF32, + 238: 0xFF33, + 239: 0xFF34, + 240: 0xFF35, + 241: 0xFF36, + 242: 0xFF37, + 243: 0xFF38, + 244: 0xFF39, + 245: 0xFF3A, + 252: 0xFF41, + 253: 0xFF42, + 254: 0xFF43, + 255: 0xFF44, + 256: 0xFF45, + 257: 0xFF46, + 258: 0xFF47, + 259: 0xFF48, + 260: 0xFF49, + 261: 0xFF4A, + 262: 0xFF4B, + 263: 0xFF4C, + 264: 0xFF4D, + 265: 0xFF4E, + 266: 0xFF4F, + 267: 0xFF50, + 268: 0xFF51, + 269: 0xFF52, + 270: 0xFF53, + 271: 0xFF54, + 272: 0xFF55, + 273: 0xFF56, + 274: 0xFF57, + 275: 0xFF58, + 276: 0xFF59, + 277: 0xFF5A, + 282: 0x3041, + 283: 0x3042, + 284: 0x3043, + 285: 0x3044, + 286: 0x3045, + 287: 0x3046, + 288: 0x3047, + 289: 0x3048, + 290: 0x3049, + 291: 0x304A, + 292: 0x304B, + 293: 0x304C, + 294: 0x304D, + 295: 0x304E, + 296: 0x304F, + 297: 0x3050, + 298: 0x3051, + 299: 0x3052, + 300: 0x3053, + 301: 0x3054, + 302: 0x3055, + 303: 0x3056, + 304: 0x3057, + 305: 0x3058, + 306: 0x3059, + 307: 0x305A, + 308: 0x305B, + 309: 0x305C, + 310: 0x305D, + 311: 0x305E, + 312: 0x305F, + 313: 0x3060, + 314: 0x3061, + 315: 0x3062, + 316: 0x3063, + 317: 0x3064, + 318: 0x3065, + 319: 0x3066, + 320: 0x3067, + 321: 0x3068, + 322: 0x3069, + 323: 0x306A, + 324: 0x306B, + 325: 0x306C, + 326: 0x306D, + 327: 0x306E, + 328: 0x306F, + 329: 0x3070, + 330: 0x3071, + 331: 0x3072, + 332: 0x3073, + 333: 0x3074, + 334: 0x3075, + 335: 0x3076, + 336: 0x3077, + 337: 0x3078, + 338: 0x3079, + 339: 0x307A, + 340: 0x307B, + 341: 0x307C, + 342: 0x307D, + 343: 0x307E, + 344: 0x307F, + 345: 0x3080, + 346: 0x3081, + 347: 0x3082, + 348: 0x3083, + 349: 0x3084, + 350: 0x3085, + 351: 0x3086, + 352: 0x3087, + 353: 0x3088, + 354: 0x3089, + 355: 0x308A, + 356: 0x308B, + 357: 0x308C, + 358: 0x308D, + 359: 0x308E, + 360: 0x308F, + 361: 0x3090, + 362: 0x3091, + 363: 0x3092, + 364: 0x3093, + 376: 0x30A1, + 377: 0x30A2, + 378: 0x30A3, + 379: 0x30A4, + 380: 0x30A5, + 381: 0x30A6, + 382: 0x30A7, + 383: 0x30A8, + 384: 0x30A9, + 385: 0x30AA, + 386: 0x30AB, + 387: 0x30AC, + 388: 0x30AD, + 389: 0x30AE, + 390: 0x30AF, + 391: 0x30B0, + 392: 0x30B1, + 393: 0x30B2, + 394: 0x30B3, + 395: 0x30B4, + 396: 0x30B5, + 397: 0x30B6, + 398: 0x30B7, + 399: 0x30B8, + 400: 0x30B9, + 401: 0x30BA, + 402: 0x30BB, + 403: 0x30BC, + 404: 0x30BD, + 405: 0x30BE, + 406: 0x30BF, + 407: 0x30C0, + 408: 0x30C1, + 409: 0x30C2, + 410: 0x30C3, + 411: 0x30C4, + 412: 0x30C5, + 413: 0x30C6, + 414: 0x30C7, + 415: 0x30C8, + 416: 0x30C9, + 417: 0x30CA, + 418: 0x30CB, + 419: 0x30CC, + 420: 0x30CD, + 421: 0x30CE, + 422: 0x30CF, + 423: 0x30D0, + 424: 0x30D1, + 425: 0x30D2, + 426: 0x30D3, + 427: 0x30D4, + 428: 0x30D5, + 429: 0x30D6, + 430: 0x30D7, + 431: 0x30D8, + 432: 0x30D9, + 433: 0x30DA, + 434: 0x30DB, + 435: 0x30DC, + 436: 0x30DD, + 437: 0x30DE, + 438: 0x30DF, + 439: 0x30E0, + 440: 0x30E1, + 441: 0x30E2, + 442: 0x30E3, + 443: 0x30E4, + 444: 0x30E5, + 445: 0x30E6, + 446: 0x30E7, + 447: 0x30E8, + 448: 0x30E9, + 449: 0x30EA, + 450: 0x30EB, + 451: 0x30EC, + 452: 0x30ED, + 453: 0x30EE, + 454: 0x30EF, + 455: 0x30F0, + 456: 0x30F1, + 457: 0x30F2, + 458: 0x30F3, + 459: 0x30F4, + 460: 0x30F5, + 461: 0x30F6, + 470: 0x0391, + 471: 0x0392, + 472: 0x0393, + 473: 0x0394, + 474: 0x0395, + 475: 0x0396, + 476: 0x0397, + 477: 0x0398, + 478: 0x0399, + 479: 0x039A, + 480: 0x039B, + 481: 0x039C, + 482: 0x039D, + 483: 0x039E, + 484: 0x039F, + 485: 0x03A0, + 486: 0x03A1, + 487: 0x03A3, + 488: 0x03A4, + 489: 0x03A5, + 490: 0x03A6, + 491: 0x03A7, + 492: 0x03A8, + 493: 0x03A9, + 502: 0x03B1, + 503: 0x03B2, + 504: 0x03B3, + 505: 0x03B4, + 506: 0x03B5, + 507: 0x03B6, + 508: 0x03B7, + 509: 0x03B8, + 510: 0x03B9, + 511: 0x03BA, + 512: 0x03BB, + 513: 0x03BC, + 514: 0x03BD, + 515: 0x03BE, + 516: 0x03BF, + 517: 0x03C0, + 518: 0x03C1, + 519: 0x03C3, + 520: 0x03C4, + 521: 0x03C5, + 522: 0x03C6, + 523: 0x03C7, + 524: 0x03C8, + 525: 0x03C9, + 564: 0x0410, + 565: 0x0411, + 566: 0x0412, + 567: 0x0413, + 568: 0x0414, + 569: 0x0415, + 570: 0x0401, + 571: 0x0416, + 572: 0x0417, + 573: 0x0418, + 574: 0x0419, + 575: 0x041A, + 576: 0x041B, + 577: 0x041C, + 578: 0x041D, + 579: 0x041E, + 580: 0x041F, + 581: 0x0420, + 582: 0x0421, + 583: 0x0422, + 584: 0x0423, + 585: 0x0424, + 586: 0x0425, + 587: 0x0426, + 588: 0x0427, + 589: 0x0428, + 590: 0x0429, + 591: 0x042A, + 592: 0x042B, + 593: 0x042C, + 594: 0x042D, + 595: 0x042E, + 596: 0x042F, + 612: 0x0430, + 613: 0x0431, + 614: 0x0432, + 615: 0x0433, + 616: 0x0434, + 617: 0x0435, + 618: 0x0451, + 619: 0x0436, + 620: 0x0437, + 621: 0x0438, + 622: 0x0439, + 623: 0x043A, + 624: 0x043B, + 625: 0x043C, + 626: 0x043D, + 627: 0x043E, + 628: 0x043F, + 629: 0x0440, + 630: 0x0441, + 631: 0x0442, + 632: 0x0443, + 633: 0x0444, + 634: 0x0445, + 635: 0x0446, + 636: 0x0447, + 637: 0x0448, + 638: 0x0449, + 639: 0x044A, + 640: 0x044B, + 641: 0x044C, + 642: 0x044D, + 643: 0x044E, + 644: 0x044F, + 658: 0x2500, + 659: 0x2502, + 660: 0x250C, + 661: 0x2510, + 662: 0x2518, + 663: 0x2514, + 664: 0x251C, + 665: 0x252C, + 666: 0x2524, + 667: 0x2534, + 668: 0x253C, + 669: 0x2501, + 670: 0x2503, + 671: 0x250F, + 672: 0x2513, + 673: 0x251B, + 674: 0x2517, + 675: 0x2523, + 676: 0x2533, + 677: 0x252B, + 678: 0x253B, + 679: 0x254B, + 680: 0x2520, + 681: 0x252F, + 682: 0x2528, + 683: 0x2537, + 684: 0x253F, + 685: 0x251D, + 686: 0x2530, + 687: 0x2525, + 688: 0x2538, + 689: 0x2542, + 1128: 0x2460, + 1129: 0x2461, + 1130: 0x2462, + 1131: 0x2463, + 1132: 0x2464, + 1133: 0x2465, + 1134: 0x2466, + 1135: 0x2467, + 1136: 0x2468, + 1137: 0x2469, + 1138: 0x246A, + 1139: 0x246B, + 1140: 0x246C, + 1141: 0x246D, + 1142: 0x246E, + 1143: 0x246F, + 1144: 0x2470, + 1145: 0x2471, + 1146: 0x2472, + 1147: 0x2473, + 1148: 0x2160, + 1149: 0x2161, + 1150: 0x2162, + 1151: 0x2163, + 1152: 0x2164, + 1153: 0x2165, + 1154: 0x2166, + 1155: 0x2167, + 1156: 0x2168, + 1157: 0x2169, + 1159: 0x3349, + 1160: 0x3314, + 1161: 0x3322, + 1162: 0x334D, + 1163: 0x3318, + 1164: 0x3327, + 1165: 0x3303, + 1166: 0x3336, + 1167: 0x3351, + 1168: 0x3357, + 1169: 0x330D, + 1170: 0x3326, + 1171: 0x3323, + 1172: 0x332B, + 1173: 0x334A, + 1174: 0x333B, + 1175: 0x339C, + 1176: 0x339D, + 1177: 0x339E, + 1178: 0x338E, + 1179: 0x338F, + 1180: 0x33C4, + 1181: 0x33A1, + 1190: 0x337B, + 1191: 0x301D, + 1192: 0x301F, + 1193: 0x2116, + 1194: 0x33CD, + 1195: 0x2121, + 1196: 0x32A4, + 1197: 0x32A5, + 1198: 0x32A6, + 1199: 0x32A7, + 1200: 0x32A8, + 1201: 0x3231, + 1202: 0x3232, + 1203: 0x3239, + 1204: 0x337E, + 1205: 0x337D, + 1206: 0x337C, + 1207: 0x2252, + 1208: 0x2261, + 1209: 0x222B, + 1210: 0x222E, + 1211: 0x2211, + 1212: 0x221A, + 1213: 0x22A5, + 1214: 0x2220, + 1215: 0x221F, + 1216: 0x22BF, + 1217: 0x2235, + 1218: 0x2229, + 1219: 0x222A, + 1410: 0x4E9C, + 1411: 0x5516, + 1412: 0x5A03, + 1413: 0x963F, + 1414: 0x54C0, + 1415: 0x611B, + 1416: 0x6328, + 1417: 0x59F6, + 1418: 0x9022, + 1419: 0x8475, + 1420: 0x831C, + 1421: 0x7A50, + 1422: 0x60AA, + 1423: 0x63E1, + 1424: 0x6E25, + 1425: 0x65ED, + 1426: 0x8466, + 1427: 0x82A6, + 1428: 0x9BF5, + 1429: 0x6893, + 1430: 0x5727, + 1431: 0x65A1, + 1432: 0x6271, + 1433: 0x5B9B, + 1434: 0x59D0, + 1435: 0x867B, + 1436: 0x98F4, + 1437: 0x7D62, + 1438: 0x7DBE, + 1439: 0x9B8E, + 1440: 0x6216, + 1441: 0x7C9F, + 1442: 0x88B7, + 1443: 0x5B89, + 1444: 0x5EB5, + 1445: 0x6309, + 1446: 0x6697, + 1447: 0x6848, + 1448: 0x95C7, + 1449: 0x978D, + 1450: 0x674F, + 1451: 0x4EE5, + 1452: 0x4F0A, + 1453: 0x4F4D, + 1454: 0x4F9D, + 1455: 0x5049, + 1456: 0x56F2, + 1457: 0x5937, + 1458: 0x59D4, + 1459: 0x5A01, + 1460: 0x5C09, + 1461: 0x60DF, + 1462: 0x610F, + 1463: 0x6170, + 1464: 0x6613, + 1465: 0x6905, + 1466: 0x70BA, + 1467: 0x754F, + 1468: 0x7570, + 1469: 0x79FB, + 1470: 0x7DAD, + 1471: 0x7DEF, + 1472: 0x80C3, + 1473: 0x840E, + 1474: 0x8863, + 1475: 0x8B02, + 1476: 0x9055, + 1477: 0x907A, + 1478: 0x533B, + 1479: 0x4E95, + 1480: 0x4EA5, + 1481: 0x57DF, + 1482: 0x80B2, + 1483: 0x90C1, + 1484: 0x78EF, + 1485: 0x4E00, + 1486: 0x58F1, + 1487: 0x6EA2, + 1488: 0x9038, + 1489: 0x7A32, + 1490: 0x8328, + 1491: 0x828B, + 1492: 0x9C2F, + 1493: 0x5141, + 1494: 0x5370, + 1495: 0x54BD, + 1496: 0x54E1, + 1497: 0x56E0, + 1498: 0x59FB, + 1499: 0x5F15, + 1500: 0x98F2, + 1501: 0x6DEB, + 1502: 0x80E4, + 1503: 0x852D, + 1504: 0x9662, + 1505: 0x9670, + 1506: 0x96A0, + 1507: 0x97FB, + 1508: 0x540B, + 1509: 0x53F3, + 1510: 0x5B87, + 1511: 0x70CF, + 1512: 0x7FBD, + 1513: 0x8FC2, + 1514: 0x96E8, + 1515: 0x536F, + 1516: 0x9D5C, + 1517: 0x7ABA, + 1518: 0x4E11, + 1519: 0x7893, + 1520: 0x81FC, + 1521: 0x6E26, + 1522: 0x5618, + 1523: 0x5504, + 1524: 0x6B1D, + 1525: 0x851A, + 1526: 0x9C3B, + 1527: 0x59E5, + 1528: 0x53A9, + 1529: 0x6D66, + 1530: 0x74DC, + 1531: 0x958F, + 1532: 0x5642, + 1533: 0x4E91, + 1534: 0x904B, + 1535: 0x96F2, + 1536: 0x834F, + 1537: 0x990C, + 1538: 0x53E1, + 1539: 0x55B6, + 1540: 0x5B30, + 1541: 0x5F71, + 1542: 0x6620, + 1543: 0x66F3, + 1544: 0x6804, + 1545: 0x6C38, + 1546: 0x6CF3, + 1547: 0x6D29, + 1548: 0x745B, + 1549: 0x76C8, + 1550: 0x7A4E, + 1551: 0x9834, + 1552: 0x82F1, + 1553: 0x885B, + 1554: 0x8A60, + 1555: 0x92ED, + 1556: 0x6DB2, + 1557: 0x75AB, + 1558: 0x76CA, + 1559: 0x99C5, + 1560: 0x60A6, + 1561: 0x8B01, + 1562: 0x8D8A, + 1563: 0x95B2, + 1564: 0x698E, + 1565: 0x53AD, + 1566: 0x5186, + 1567: 0x5712, + 1568: 0x5830, + 1569: 0x5944, + 1570: 0x5BB4, + 1571: 0x5EF6, + 1572: 0x6028, + 1573: 0x63A9, + 1574: 0x63F4, + 1575: 0x6CBF, + 1576: 0x6F14, + 1577: 0x708E, + 1578: 0x7114, + 1579: 0x7159, + 1580: 0x71D5, + 1581: 0x733F, + 1582: 0x7E01, + 1583: 0x8276, + 1584: 0x82D1, + 1585: 0x8597, + 1586: 0x9060, + 1587: 0x925B, + 1588: 0x9D1B, + 1589: 0x5869, + 1590: 0x65BC, + 1591: 0x6C5A, + 1592: 0x7525, + 1593: 0x51F9, + 1594: 0x592E, + 1595: 0x5965, + 1596: 0x5F80, + 1597: 0x5FDC, + 1598: 0x62BC, + 1599: 0x65FA, + 1600: 0x6A2A, + 1601: 0x6B27, + 1602: 0x6BB4, + 1603: 0x738B, + 1604: 0x7FC1, + 1605: 0x8956, + 1606: 0x9D2C, + 1607: 0x9D0E, + 1608: 0x9EC4, + 1609: 0x5CA1, + 1610: 0x6C96, + 1611: 0x837B, + 1612: 0x5104, + 1613: 0x5C4B, + 1614: 0x61B6, + 1615: 0x81C6, + 1616: 0x6876, + 1617: 0x7261, + 1618: 0x4E59, + 1619: 0x4FFA, + 1620: 0x5378, + 1621: 0x6069, + 1622: 0x6E29, + 1623: 0x7A4F, + 1624: 0x97F3, + 1625: 0x4E0B, + 1626: 0x5316, + 1627: 0x4EEE, + 1628: 0x4F55, + 1629: 0x4F3D, + 1630: 0x4FA1, + 1631: 0x4F73, + 1632: 0x52A0, + 1633: 0x53EF, + 1634: 0x5609, + 1635: 0x590F, + 1636: 0x5AC1, + 1637: 0x5BB6, + 1638: 0x5BE1, + 1639: 0x79D1, + 1640: 0x6687, + 1641: 0x679C, + 1642: 0x67B6, + 1643: 0x6B4C, + 1644: 0x6CB3, + 1645: 0x706B, + 1646: 0x73C2, + 1647: 0x798D, + 1648: 0x79BE, + 1649: 0x7A3C, + 1650: 0x7B87, + 1651: 0x82B1, + 1652: 0x82DB, + 1653: 0x8304, + 1654: 0x8377, + 1655: 0x83EF, + 1656: 0x83D3, + 1657: 0x8766, + 1658: 0x8AB2, + 1659: 0x5629, + 1660: 0x8CA8, + 1661: 0x8FE6, + 1662: 0x904E, + 1663: 0x971E, + 1664: 0x868A, + 1665: 0x4FC4, + 1666: 0x5CE8, + 1667: 0x6211, + 1668: 0x7259, + 1669: 0x753B, + 1670: 0x81E5, + 1671: 0x82BD, + 1672: 0x86FE, + 1673: 0x8CC0, + 1674: 0x96C5, + 1675: 0x9913, + 1676: 0x99D5, + 1677: 0x4ECB, + 1678: 0x4F1A, + 1679: 0x89E3, + 1680: 0x56DE, + 1681: 0x584A, + 1682: 0x58CA, + 1683: 0x5EFB, + 1684: 0x5FEB, + 1685: 0x602A, + 1686: 0x6094, + 1687: 0x6062, + 1688: 0x61D0, + 1689: 0x6212, + 1690: 0x62D0, + 1691: 0x6539, + 1692: 0x9B41, + 1693: 0x6666, + 1694: 0x68B0, + 1695: 0x6D77, + 1696: 0x7070, + 1697: 0x754C, + 1698: 0x7686, + 1699: 0x7D75, + 1700: 0x82A5, + 1701: 0x87F9, + 1702: 0x958B, + 1703: 0x968E, + 1704: 0x8C9D, + 1705: 0x51F1, + 1706: 0x52BE, + 1707: 0x5916, + 1708: 0x54B3, + 1709: 0x5BB3, + 1710: 0x5D16, + 1711: 0x6168, + 1712: 0x6982, + 1713: 0x6DAF, + 1714: 0x788D, + 1715: 0x84CB, + 1716: 0x8857, + 1717: 0x8A72, + 1718: 0x93A7, + 1719: 0x9AB8, + 1720: 0x6D6C, + 1721: 0x99A8, + 1722: 0x86D9, + 1723: 0x57A3, + 1724: 0x67FF, + 1725: 0x86CE, + 1726: 0x920E, + 1727: 0x5283, + 1728: 0x5687, + 1729: 0x5404, + 1730: 0x5ED3, + 1731: 0x62E1, + 1732: 0x64B9, + 1733: 0x683C, + 1734: 0x6838, + 1735: 0x6BBB, + 1736: 0x7372, + 1737: 0x78BA, + 1738: 0x7A6B, + 1739: 0x899A, + 1740: 0x89D2, + 1741: 0x8D6B, + 1742: 0x8F03, + 1743: 0x90ED, + 1744: 0x95A3, + 1745: 0x9694, + 1746: 0x9769, + 1747: 0x5B66, + 1748: 0x5CB3, + 1749: 0x697D, + 1750: 0x984D, + 1751: 0x984E, + 1752: 0x639B, + 1753: 0x7B20, + 1754: 0x6A2B, + 1755: 0x6A7F, + 1756: 0x68B6, + 1757: 0x9C0D, + 1758: 0x6F5F, + 1759: 0x5272, + 1760: 0x559D, + 1761: 0x6070, + 1762: 0x62EC, + 1763: 0x6D3B, + 1764: 0x6E07, + 1765: 0x6ED1, + 1766: 0x845B, + 1767: 0x8910, + 1768: 0x8F44, + 1769: 0x4E14, + 1770: 0x9C39, + 1771: 0x53F6, + 1772: 0x691B, + 1773: 0x6A3A, + 1774: 0x9784, + 1775: 0x682A, + 1776: 0x515C, + 1777: 0x7AC3, + 1778: 0x84B2, + 1779: 0x91DC, + 1780: 0x938C, + 1781: 0x565B, + 1782: 0x9D28, + 1783: 0x6822, + 1784: 0x8305, + 1785: 0x8431, + 1786: 0x7CA5, + 1787: 0x5208, + 1788: 0x82C5, + 1789: 0x74E6, + 1790: 0x4E7E, + 1791: 0x4F83, + 1792: 0x51A0, + 1793: 0x5BD2, + 1794: 0x520A, + 1795: 0x52D8, + 1796: 0x52E7, + 1797: 0x5DFB, + 1798: 0x559A, + 1799: 0x582A, + 1800: 0x59E6, + 1801: 0x5B8C, + 1802: 0x5B98, + 1803: 0x5BDB, + 1804: 0x5E72, + 1805: 0x5E79, + 1806: 0x60A3, + 1807: 0x611F, + 1808: 0x6163, + 1809: 0x61BE, + 1810: 0x63DB, + 1811: 0x6562, + 1812: 0x67D1, + 1813: 0x6853, + 1814: 0x68FA, + 1815: 0x6B3E, + 1816: 0x6B53, + 1817: 0x6C57, + 1818: 0x6F22, + 1819: 0x6F97, + 1820: 0x6F45, + 1821: 0x74B0, + 1822: 0x7518, + 1823: 0x76E3, + 1824: 0x770B, + 1825: 0x7AFF, + 1826: 0x7BA1, + 1827: 0x7C21, + 1828: 0x7DE9, + 1829: 0x7F36, + 1830: 0x7FF0, + 1831: 0x809D, + 1832: 0x8266, + 1833: 0x839E, + 1834: 0x89B3, + 1835: 0x8ACC, + 1836: 0x8CAB, + 1837: 0x9084, + 1838: 0x9451, + 1839: 0x9593, + 1840: 0x9591, + 1841: 0x95A2, + 1842: 0x9665, + 1843: 0x97D3, + 1844: 0x9928, + 1845: 0x8218, + 1846: 0x4E38, + 1847: 0x542B, + 1848: 0x5CB8, + 1849: 0x5DCC, + 1850: 0x73A9, + 1851: 0x764C, + 1852: 0x773C, + 1853: 0x5CA9, + 1854: 0x7FEB, + 1855: 0x8D0B, + 1856: 0x96C1, + 1857: 0x9811, + 1858: 0x9854, + 1859: 0x9858, + 1860: 0x4F01, + 1861: 0x4F0E, + 1862: 0x5371, + 1863: 0x559C, + 1864: 0x5668, + 1865: 0x57FA, + 1866: 0x5947, + 1867: 0x5B09, + 1868: 0x5BC4, + 1869: 0x5C90, + 1870: 0x5E0C, + 1871: 0x5E7E, + 1872: 0x5FCC, + 1873: 0x63EE, + 1874: 0x673A, + 1875: 0x65D7, + 1876: 0x65E2, + 1877: 0x671F, + 1878: 0x68CB, + 1879: 0x68C4, + 1880: 0x6A5F, + 1881: 0x5E30, + 1882: 0x6BC5, + 1883: 0x6C17, + 1884: 0x6C7D, + 1885: 0x757F, + 1886: 0x7948, + 1887: 0x5B63, + 1888: 0x7A00, + 1889: 0x7D00, + 1890: 0x5FBD, + 1891: 0x898F, + 1892: 0x8A18, + 1893: 0x8CB4, + 1894: 0x8D77, + 1895: 0x8ECC, + 1896: 0x8F1D, + 1897: 0x98E2, + 1898: 0x9A0E, + 1899: 0x9B3C, + 1900: 0x4E80, + 1901: 0x507D, + 1902: 0x5100, + 1903: 0x5993, + 1904: 0x5B9C, + 1905: 0x622F, + 1906: 0x6280, + 1907: 0x64EC, + 1908: 0x6B3A, + 1909: 0x72A0, + 1910: 0x7591, + 1911: 0x7947, + 1912: 0x7FA9, + 1913: 0x87FB, + 1914: 0x8ABC, + 1915: 0x8B70, + 1916: 0x63AC, + 1917: 0x83CA, + 1918: 0x97A0, + 1919: 0x5409, + 1920: 0x5403, + 1921: 0x55AB, + 1922: 0x6854, + 1923: 0x6A58, + 1924: 0x8A70, + 1925: 0x7827, + 1926: 0x6775, + 1927: 0x9ECD, + 1928: 0x5374, + 1929: 0x5BA2, + 1930: 0x811A, + 1931: 0x8650, + 1932: 0x9006, + 1933: 0x4E18, + 1934: 0x4E45, + 1935: 0x4EC7, + 1936: 0x4F11, + 1937: 0x53CA, + 1938: 0x5438, + 1939: 0x5BAE, + 1940: 0x5F13, + 1941: 0x6025, + 1942: 0x6551, + 1943: 0x673D, + 1944: 0x6C42, + 1945: 0x6C72, + 1946: 0x6CE3, + 1947: 0x7078, + 1948: 0x7403, + 1949: 0x7A76, + 1950: 0x7AAE, + 1951: 0x7B08, + 1952: 0x7D1A, + 1953: 0x7CFE, + 1954: 0x7D66, + 1955: 0x65E7, + 1956: 0x725B, + 1957: 0x53BB, + 1958: 0x5C45, + 1959: 0x5DE8, + 1960: 0x62D2, + 1961: 0x62E0, + 1962: 0x6319, + 1963: 0x6E20, + 1964: 0x865A, + 1965: 0x8A31, + 1966: 0x8DDD, + 1967: 0x92F8, + 1968: 0x6F01, + 1969: 0x79A6, + 1970: 0x9B5A, + 1971: 0x4EA8, + 1972: 0x4EAB, + 1973: 0x4EAC, + 1974: 0x4F9B, + 1975: 0x4FA0, + 1976: 0x50D1, + 1977: 0x5147, + 1978: 0x7AF6, + 1979: 0x5171, + 1980: 0x51F6, + 1981: 0x5354, + 1982: 0x5321, + 1983: 0x537F, + 1984: 0x53EB, + 1985: 0x55AC, + 1986: 0x5883, + 1987: 0x5CE1, + 1988: 0x5F37, + 1989: 0x5F4A, + 1990: 0x602F, + 1991: 0x6050, + 1992: 0x606D, + 1993: 0x631F, + 1994: 0x6559, + 1995: 0x6A4B, + 1996: 0x6CC1, + 1997: 0x72C2, + 1998: 0x72ED, + 1999: 0x77EF, + 2000: 0x80F8, + 2001: 0x8105, + 2002: 0x8208, + 2003: 0x854E, + 2004: 0x90F7, + 2005: 0x93E1, + 2006: 0x97FF, + 2007: 0x9957, + 2008: 0x9A5A, + 2009: 0x4EF0, + 2010: 0x51DD, + 2011: 0x5C2D, + 2012: 0x6681, + 2013: 0x696D, + 2014: 0x5C40, + 2015: 0x66F2, + 2016: 0x6975, + 2017: 0x7389, + 2018: 0x6850, + 2019: 0x7C81, + 2020: 0x50C5, + 2021: 0x52E4, + 2022: 0x5747, + 2023: 0x5DFE, + 2024: 0x9326, + 2025: 0x65A4, + 2026: 0x6B23, + 2027: 0x6B3D, + 2028: 0x7434, + 2029: 0x7981, + 2030: 0x79BD, + 2031: 0x7B4B, + 2032: 0x7DCA, + 2033: 0x82B9, + 2034: 0x83CC, + 2035: 0x887F, + 2036: 0x895F, + 2037: 0x8B39, + 2038: 0x8FD1, + 2039: 0x91D1, + 2040: 0x541F, + 2041: 0x9280, + 2042: 0x4E5D, + 2043: 0x5036, + 2044: 0x53E5, + 2045: 0x533A, + 2046: 0x72D7, + 2047: 0x7396, + 2048: 0x77E9, + 2049: 0x82E6, + 2050: 0x8EAF, + 2051: 0x99C6, + 2052: 0x99C8, + 2053: 0x99D2, + 2054: 0x5177, + 2055: 0x611A, + 2056: 0x865E, + 2057: 0x55B0, + 2058: 0x7A7A, + 2059: 0x5076, + 2060: 0x5BD3, + 2061: 0x9047, + 2062: 0x9685, + 2063: 0x4E32, + 2064: 0x6ADB, + 2065: 0x91E7, + 2066: 0x5C51, + 2067: 0x5C48, + 2068: 0x6398, + 2069: 0x7A9F, + 2070: 0x6C93, + 2071: 0x9774, + 2072: 0x8F61, + 2073: 0x7AAA, + 2074: 0x718A, + 2075: 0x9688, + 2076: 0x7C82, + 2077: 0x6817, + 2078: 0x7E70, + 2079: 0x6851, + 2080: 0x936C, + 2081: 0x52F2, + 2082: 0x541B, + 2083: 0x85AB, + 2084: 0x8A13, + 2085: 0x7FA4, + 2086: 0x8ECD, + 2087: 0x90E1, + 2088: 0x5366, + 2089: 0x8888, + 2090: 0x7941, + 2091: 0x4FC2, + 2092: 0x50BE, + 2093: 0x5211, + 2094: 0x5144, + 2095: 0x5553, + 2096: 0x572D, + 2097: 0x73EA, + 2098: 0x578B, + 2099: 0x5951, + 2100: 0x5F62, + 2101: 0x5F84, + 2102: 0x6075, + 2103: 0x6176, + 2104: 0x6167, + 2105: 0x61A9, + 2106: 0x63B2, + 2107: 0x643A, + 2108: 0x656C, + 2109: 0x666F, + 2110: 0x6842, + 2111: 0x6E13, + 2112: 0x7566, + 2113: 0x7A3D, + 2114: 0x7CFB, + 2115: 0x7D4C, + 2116: 0x7D99, + 2117: 0x7E4B, + 2118: 0x7F6B, + 2119: 0x830E, + 2120: 0x834A, + 2121: 0x86CD, + 2122: 0x8A08, + 2123: 0x8A63, + 2124: 0x8B66, + 2125: 0x8EFD, + 2126: 0x981A, + 2127: 0x9D8F, + 2128: 0x82B8, + 2129: 0x8FCE, + 2130: 0x9BE8, + 2131: 0x5287, + 2132: 0x621F, + 2133: 0x6483, + 2134: 0x6FC0, + 2135: 0x9699, + 2136: 0x6841, + 2137: 0x5091, + 2138: 0x6B20, + 2139: 0x6C7A, + 2140: 0x6F54, + 2141: 0x7A74, + 2142: 0x7D50, + 2143: 0x8840, + 2144: 0x8A23, + 2145: 0x6708, + 2146: 0x4EF6, + 2147: 0x5039, + 2148: 0x5026, + 2149: 0x5065, + 2150: 0x517C, + 2151: 0x5238, + 2152: 0x5263, + 2153: 0x55A7, + 2154: 0x570F, + 2155: 0x5805, + 2156: 0x5ACC, + 2157: 0x5EFA, + 2158: 0x61B2, + 2159: 0x61F8, + 2160: 0x62F3, + 2161: 0x6372, + 2162: 0x691C, + 2163: 0x6A29, + 2164: 0x727D, + 2165: 0x72AC, + 2166: 0x732E, + 2167: 0x7814, + 2168: 0x786F, + 2169: 0x7D79, + 2170: 0x770C, + 2171: 0x80A9, + 2172: 0x898B, + 2173: 0x8B19, + 2174: 0x8CE2, + 2175: 0x8ED2, + 2176: 0x9063, + 2177: 0x9375, + 2178: 0x967A, + 2179: 0x9855, + 2180: 0x9A13, + 2181: 0x9E78, + 2182: 0x5143, + 2183: 0x539F, + 2184: 0x53B3, + 2185: 0x5E7B, + 2186: 0x5F26, + 2187: 0x6E1B, + 2188: 0x6E90, + 2189: 0x7384, + 2190: 0x73FE, + 2191: 0x7D43, + 2192: 0x8237, + 2193: 0x8A00, + 2194: 0x8AFA, + 2195: 0x9650, + 2196: 0x4E4E, + 2197: 0x500B, + 2198: 0x53E4, + 2199: 0x547C, + 2200: 0x56FA, + 2201: 0x59D1, + 2202: 0x5B64, + 2203: 0x5DF1, + 2204: 0x5EAB, + 2205: 0x5F27, + 2206: 0x6238, + 2207: 0x6545, + 2208: 0x67AF, + 2209: 0x6E56, + 2210: 0x72D0, + 2211: 0x7CCA, + 2212: 0x88B4, + 2213: 0x80A1, + 2214: 0x80E1, + 2215: 0x83F0, + 2216: 0x864E, + 2217: 0x8A87, + 2218: 0x8DE8, + 2219: 0x9237, + 2220: 0x96C7, + 2221: 0x9867, + 2222: 0x9F13, + 2223: 0x4E94, + 2224: 0x4E92, + 2225: 0x4F0D, + 2226: 0x5348, + 2227: 0x5449, + 2228: 0x543E, + 2229: 0x5A2F, + 2230: 0x5F8C, + 2231: 0x5FA1, + 2232: 0x609F, + 2233: 0x68A7, + 2234: 0x6A8E, + 2235: 0x745A, + 2236: 0x7881, + 2237: 0x8A9E, + 2238: 0x8AA4, + 2239: 0x8B77, + 2240: 0x9190, + 2241: 0x4E5E, + 2242: 0x9BC9, + 2243: 0x4EA4, + 2244: 0x4F7C, + 2245: 0x4FAF, + 2246: 0x5019, + 2247: 0x5016, + 2248: 0x5149, + 2249: 0x516C, + 2250: 0x529F, + 2251: 0x52B9, + 2252: 0x52FE, + 2253: 0x539A, + 2254: 0x53E3, + 2255: 0x5411, + 2256: 0x540E, + 2257: 0x5589, + 2258: 0x5751, + 2259: 0x57A2, + 2260: 0x597D, + 2261: 0x5B54, + 2262: 0x5B5D, + 2263: 0x5B8F, + 2264: 0x5DE5, + 2265: 0x5DE7, + 2266: 0x5DF7, + 2267: 0x5E78, + 2268: 0x5E83, + 2269: 0x5E9A, + 2270: 0x5EB7, + 2271: 0x5F18, + 2272: 0x6052, + 2273: 0x614C, + 2274: 0x6297, + 2275: 0x62D8, + 2276: 0x63A7, + 2277: 0x653B, + 2278: 0x6602, + 2279: 0x6643, + 2280: 0x66F4, + 2281: 0x676D, + 2282: 0x6821, + 2283: 0x6897, + 2284: 0x69CB, + 2285: 0x6C5F, + 2286: 0x6D2A, + 2287: 0x6D69, + 2288: 0x6E2F, + 2289: 0x6E9D, + 2290: 0x7532, + 2291: 0x7687, + 2292: 0x786C, + 2293: 0x7A3F, + 2294: 0x7CE0, + 2295: 0x7D05, + 2296: 0x7D18, + 2297: 0x7D5E, + 2298: 0x7DB1, + 2299: 0x8015, + 2300: 0x8003, + 2301: 0x80AF, + 2302: 0x80B1, + 2303: 0x8154, + 2304: 0x818F, + 2305: 0x822A, + 2306: 0x8352, + 2307: 0x884C, + 2308: 0x8861, + 2309: 0x8B1B, + 2310: 0x8CA2, + 2311: 0x8CFC, + 2312: 0x90CA, + 2313: 0x9175, + 2314: 0x9271, + 2315: 0x783F, + 2316: 0x92FC, + 2317: 0x95A4, + 2318: 0x964D, + 2319: 0x9805, + 2320: 0x9999, + 2321: 0x9AD8, + 2322: 0x9D3B, + 2323: 0x525B, + 2324: 0x52AB, + 2325: 0x53F7, + 2326: 0x5408, + 2327: 0x58D5, + 2328: 0x62F7, + 2329: 0x6FE0, + 2330: 0x8C6A, + 2331: 0x8F5F, + 2332: 0x9EB9, + 2333: 0x514B, + 2334: 0x523B, + 2335: 0x544A, + 2336: 0x56FD, + 2337: 0x7A40, + 2338: 0x9177, + 2339: 0x9D60, + 2340: 0x9ED2, + 2341: 0x7344, + 2342: 0x6F09, + 2343: 0x8170, + 2344: 0x7511, + 2345: 0x5FFD, + 2346: 0x60DA, + 2347: 0x9AA8, + 2348: 0x72DB, + 2349: 0x8FBC, + 2350: 0x6B64, + 2351: 0x9803, + 2352: 0x4ECA, + 2353: 0x56F0, + 2354: 0x5764, + 2355: 0x58BE, + 2356: 0x5A5A, + 2357: 0x6068, + 2358: 0x61C7, + 2359: 0x660F, + 2360: 0x6606, + 2361: 0x6839, + 2362: 0x68B1, + 2363: 0x6DF7, + 2364: 0x75D5, + 2365: 0x7D3A, + 2366: 0x826E, + 2367: 0x9B42, + 2368: 0x4E9B, + 2369: 0x4F50, + 2370: 0x53C9, + 2371: 0x5506, + 2372: 0x5D6F, + 2373: 0x5DE6, + 2374: 0x5DEE, + 2375: 0x67FB, + 2376: 0x6C99, + 2377: 0x7473, + 2378: 0x7802, + 2379: 0x8A50, + 2380: 0x9396, + 2381: 0x88DF, + 2382: 0x5750, + 2383: 0x5EA7, + 2384: 0x632B, + 2385: 0x50B5, + 2386: 0x50AC, + 2387: 0x518D, + 2388: 0x6700, + 2389: 0x54C9, + 2390: 0x585E, + 2391: 0x59BB, + 2392: 0x5BB0, + 2393: 0x5F69, + 2394: 0x624D, + 2395: 0x63A1, + 2396: 0x683D, + 2397: 0x6B73, + 2398: 0x6E08, + 2399: 0x707D, + 2400: 0x91C7, + 2401: 0x7280, + 2402: 0x7815, + 2403: 0x7826, + 2404: 0x796D, + 2405: 0x658E, + 2406: 0x7D30, + 2407: 0x83DC, + 2408: 0x88C1, + 2409: 0x8F09, + 2410: 0x969B, + 2411: 0x5264, + 2412: 0x5728, + 2413: 0x6750, + 2414: 0x7F6A, + 2415: 0x8CA1, + 2416: 0x51B4, + 2417: 0x5742, + 2418: 0x962A, + 2419: 0x583A, + 2420: 0x698A, + 2421: 0x80B4, + 2422: 0x54B2, + 2423: 0x5D0E, + 2424: 0x57FC, + 2425: 0x7895, + 2426: 0x9DFA, + 2427: 0x4F5C, + 2428: 0x524A, + 2429: 0x548B, + 2430: 0x643E, + 2431: 0x6628, + 2432: 0x6714, + 2433: 0x67F5, + 2434: 0x7A84, + 2435: 0x7B56, + 2436: 0x7D22, + 2437: 0x932F, + 2438: 0x685C, + 2439: 0x9BAD, + 2440: 0x7B39, + 2441: 0x5319, + 2442: 0x518A, + 2443: 0x5237, + 2444: 0x5BDF, + 2445: 0x62F6, + 2446: 0x64AE, + 2447: 0x64E6, + 2448: 0x672D, + 2449: 0x6BBA, + 2450: 0x85A9, + 2451: 0x96D1, + 2452: 0x7690, + 2453: 0x9BD6, + 2454: 0x634C, + 2455: 0x9306, + 2456: 0x9BAB, + 2457: 0x76BF, + 2458: 0x6652, + 2459: 0x4E09, + 2460: 0x5098, + 2461: 0x53C2, + 2462: 0x5C71, + 2463: 0x60E8, + 2464: 0x6492, + 2465: 0x6563, + 2466: 0x685F, + 2467: 0x71E6, + 2468: 0x73CA, + 2469: 0x7523, + 2470: 0x7B97, + 2471: 0x7E82, + 2472: 0x8695, + 2473: 0x8B83, + 2474: 0x8CDB, + 2475: 0x9178, + 2476: 0x9910, + 2477: 0x65AC, + 2478: 0x66AB, + 2479: 0x6B8B, + 2480: 0x4ED5, + 2481: 0x4ED4, + 2482: 0x4F3A, + 2483: 0x4F7F, + 2484: 0x523A, + 2485: 0x53F8, + 2486: 0x53F2, + 2487: 0x55E3, + 2488: 0x56DB, + 2489: 0x58EB, + 2490: 0x59CB, + 2491: 0x59C9, + 2492: 0x59FF, + 2493: 0x5B50, + 2494: 0x5C4D, + 2495: 0x5E02, + 2496: 0x5E2B, + 2497: 0x5FD7, + 2498: 0x601D, + 2499: 0x6307, + 2500: 0x652F, + 2501: 0x5B5C, + 2502: 0x65AF, + 2503: 0x65BD, + 2504: 0x65E8, + 2505: 0x679D, + 2506: 0x6B62, + 2507: 0x6B7B, + 2508: 0x6C0F, + 2509: 0x7345, + 2510: 0x7949, + 2511: 0x79C1, + 2512: 0x7CF8, + 2513: 0x7D19, + 2514: 0x7D2B, + 2515: 0x80A2, + 2516: 0x8102, + 2517: 0x81F3, + 2518: 0x8996, + 2519: 0x8A5E, + 2520: 0x8A69, + 2521: 0x8A66, + 2522: 0x8A8C, + 2523: 0x8AEE, + 2524: 0x8CC7, + 2525: 0x8CDC, + 2526: 0x96CC, + 2527: 0x98FC, + 2528: 0x6B6F, + 2529: 0x4E8B, + 2530: 0x4F3C, + 2531: 0x4F8D, + 2532: 0x5150, + 2533: 0x5B57, + 2534: 0x5BFA, + 2535: 0x6148, + 2536: 0x6301, + 2537: 0x6642, + 2538: 0x6B21, + 2539: 0x6ECB, + 2540: 0x6CBB, + 2541: 0x723E, + 2542: 0x74BD, + 2543: 0x75D4, + 2544: 0x78C1, + 2545: 0x793A, + 2546: 0x800C, + 2547: 0x8033, + 2548: 0x81EA, + 2549: 0x8494, + 2550: 0x8F9E, + 2551: 0x6C50, + 2552: 0x9E7F, + 2553: 0x5F0F, + 2554: 0x8B58, + 2555: 0x9D2B, + 2556: 0x7AFA, + 2557: 0x8EF8, + 2558: 0x5B8D, + 2559: 0x96EB, + 2560: 0x4E03, + 2561: 0x53F1, + 2562: 0x57F7, + 2563: 0x5931, + 2564: 0x5AC9, + 2565: 0x5BA4, + 2566: 0x6089, + 2567: 0x6E7F, + 2568: 0x6F06, + 2569: 0x75BE, + 2570: 0x8CEA, + 2571: 0x5B9F, + 2572: 0x8500, + 2573: 0x7BE0, + 2574: 0x5072, + 2575: 0x67F4, + 2576: 0x829D, + 2577: 0x5C61, + 2578: 0x854A, + 2579: 0x7E1E, + 2580: 0x820E, + 2581: 0x5199, + 2582: 0x5C04, + 2583: 0x6368, + 2584: 0x8D66, + 2585: 0x659C, + 2586: 0x716E, + 2587: 0x793E, + 2588: 0x7D17, + 2589: 0x8005, + 2590: 0x8B1D, + 2591: 0x8ECA, + 2592: 0x906E, + 2593: 0x86C7, + 2594: 0x90AA, + 2595: 0x501F, + 2596: 0x52FA, + 2597: 0x5C3A, + 2598: 0x6753, + 2599: 0x707C, + 2600: 0x7235, + 2601: 0x914C, + 2602: 0x91C8, + 2603: 0x932B, + 2604: 0x82E5, + 2605: 0x5BC2, + 2606: 0x5F31, + 2607: 0x60F9, + 2608: 0x4E3B, + 2609: 0x53D6, + 2610: 0x5B88, + 2611: 0x624B, + 2612: 0x6731, + 2613: 0x6B8A, + 2614: 0x72E9, + 2615: 0x73E0, + 2616: 0x7A2E, + 2617: 0x816B, + 2618: 0x8DA3, + 2619: 0x9152, + 2620: 0x9996, + 2621: 0x5112, + 2622: 0x53D7, + 2623: 0x546A, + 2624: 0x5BFF, + 2625: 0x6388, + 2626: 0x6A39, + 2627: 0x7DAC, + 2628: 0x9700, + 2629: 0x56DA, + 2630: 0x53CE, + 2631: 0x5468, + 2632: 0x5B97, + 2633: 0x5C31, + 2634: 0x5DDE, + 2635: 0x4FEE, + 2636: 0x6101, + 2637: 0x62FE, + 2638: 0x6D32, + 2639: 0x79C0, + 2640: 0x79CB, + 2641: 0x7D42, + 2642: 0x7E4D, + 2643: 0x7FD2, + 2644: 0x81ED, + 2645: 0x821F, + 2646: 0x8490, + 2647: 0x8846, + 2648: 0x8972, + 2649: 0x8B90, + 2650: 0x8E74, + 2651: 0x8F2F, + 2652: 0x9031, + 2653: 0x914B, + 2654: 0x916C, + 2655: 0x96C6, + 2656: 0x919C, + 2657: 0x4EC0, + 2658: 0x4F4F, + 2659: 0x5145, + 2660: 0x5341, + 2661: 0x5F93, + 2662: 0x620E, + 2663: 0x67D4, + 2664: 0x6C41, + 2665: 0x6E0B, + 2666: 0x7363, + 2667: 0x7E26, + 2668: 0x91CD, + 2669: 0x9283, + 2670: 0x53D4, + 2671: 0x5919, + 2672: 0x5BBF, + 2673: 0x6DD1, + 2674: 0x795D, + 2675: 0x7E2E, + 2676: 0x7C9B, + 2677: 0x587E, + 2678: 0x719F, + 2679: 0x51FA, + 2680: 0x8853, + 2681: 0x8FF0, + 2682: 0x4FCA, + 2683: 0x5CFB, + 2684: 0x6625, + 2685: 0x77AC, + 2686: 0x7AE3, + 2687: 0x821C, + 2688: 0x99FF, + 2689: 0x51C6, + 2690: 0x5FAA, + 2691: 0x65EC, + 2692: 0x696F, + 2693: 0x6B89, + 2694: 0x6DF3, + 2695: 0x6E96, + 2696: 0x6F64, + 2697: 0x76FE, + 2698: 0x7D14, + 2699: 0x5DE1, + 2700: 0x9075, + 2701: 0x9187, + 2702: 0x9806, + 2703: 0x51E6, + 2704: 0x521D, + 2705: 0x6240, + 2706: 0x6691, + 2707: 0x66D9, + 2708: 0x6E1A, + 2709: 0x5EB6, + 2710: 0x7DD2, + 2711: 0x7F72, + 2712: 0x66F8, + 2713: 0x85AF, + 2714: 0x85F7, + 2715: 0x8AF8, + 2716: 0x52A9, + 2717: 0x53D9, + 2718: 0x5973, + 2719: 0x5E8F, + 2720: 0x5F90, + 2721: 0x6055, + 2722: 0x92E4, + 2723: 0x9664, + 2724: 0x50B7, + 2725: 0x511F, + 2726: 0x52DD, + 2727: 0x5320, + 2728: 0x5347, + 2729: 0x53EC, + 2730: 0x54E8, + 2731: 0x5546, + 2732: 0x5531, + 2733: 0x5617, + 2734: 0x5968, + 2735: 0x59BE, + 2736: 0x5A3C, + 2737: 0x5BB5, + 2738: 0x5C06, + 2739: 0x5C0F, + 2740: 0x5C11, + 2741: 0x5C1A, + 2742: 0x5E84, + 2743: 0x5E8A, + 2744: 0x5EE0, + 2745: 0x5F70, + 2746: 0x627F, + 2747: 0x6284, + 2748: 0x62DB, + 2749: 0x638C, + 2750: 0x6377, + 2751: 0x6607, + 2752: 0x660C, + 2753: 0x662D, + 2754: 0x6676, + 2755: 0x677E, + 2756: 0x68A2, + 2757: 0x6A1F, + 2758: 0x6A35, + 2759: 0x6CBC, + 2760: 0x6D88, + 2761: 0x6E09, + 2762: 0x6E58, + 2763: 0x713C, + 2764: 0x7126, + 2765: 0x7167, + 2766: 0x75C7, + 2767: 0x7701, + 2768: 0x785D, + 2769: 0x7901, + 2770: 0x7965, + 2771: 0x79F0, + 2772: 0x7AE0, + 2773: 0x7B11, + 2774: 0x7CA7, + 2775: 0x7D39, + 2776: 0x8096, + 2777: 0x83D6, + 2778: 0x848B, + 2779: 0x8549, + 2780: 0x885D, + 2781: 0x88F3, + 2782: 0x8A1F, + 2783: 0x8A3C, + 2784: 0x8A54, + 2785: 0x8A73, + 2786: 0x8C61, + 2787: 0x8CDE, + 2788: 0x91A4, + 2789: 0x9266, + 2790: 0x937E, + 2791: 0x9418, + 2792: 0x969C, + 2793: 0x9798, + 2794: 0x4E0A, + 2795: 0x4E08, + 2796: 0x4E1E, + 2797: 0x4E57, + 2798: 0x5197, + 2799: 0x5270, + 2800: 0x57CE, + 2801: 0x5834, + 2802: 0x58CC, + 2803: 0x5B22, + 2804: 0x5E38, + 2805: 0x60C5, + 2806: 0x64FE, + 2807: 0x6761, + 2808: 0x6756, + 2809: 0x6D44, + 2810: 0x72B6, + 2811: 0x7573, + 2812: 0x7A63, + 2813: 0x84B8, + 2814: 0x8B72, + 2815: 0x91B8, + 2816: 0x9320, + 2817: 0x5631, + 2818: 0x57F4, + 2819: 0x98FE, + 2820: 0x62ED, + 2821: 0x690D, + 2822: 0x6B96, + 2823: 0x71ED, + 2824: 0x7E54, + 2825: 0x8077, + 2826: 0x8272, + 2827: 0x89E6, + 2828: 0x98DF, + 2829: 0x8755, + 2830: 0x8FB1, + 2831: 0x5C3B, + 2832: 0x4F38, + 2833: 0x4FE1, + 2834: 0x4FB5, + 2835: 0x5507, + 2836: 0x5A20, + 2837: 0x5BDD, + 2838: 0x5BE9, + 2839: 0x5FC3, + 2840: 0x614E, + 2841: 0x632F, + 2842: 0x65B0, + 2843: 0x664B, + 2844: 0x68EE, + 2845: 0x699B, + 2846: 0x6D78, + 2847: 0x6DF1, + 2848: 0x7533, + 2849: 0x75B9, + 2850: 0x771F, + 2851: 0x795E, + 2852: 0x79E6, + 2853: 0x7D33, + 2854: 0x81E3, + 2855: 0x82AF, + 2856: 0x85AA, + 2857: 0x89AA, + 2858: 0x8A3A, + 2859: 0x8EAB, + 2860: 0x8F9B, + 2861: 0x9032, + 2862: 0x91DD, + 2863: 0x9707, + 2864: 0x4EBA, + 2865: 0x4EC1, + 2866: 0x5203, + 2867: 0x5875, + 2868: 0x58EC, + 2869: 0x5C0B, + 2870: 0x751A, + 2871: 0x5C3D, + 2872: 0x814E, + 2873: 0x8A0A, + 2874: 0x8FC5, + 2875: 0x9663, + 2876: 0x976D, + 2877: 0x7B25, + 2878: 0x8ACF, + 2879: 0x9808, + 2880: 0x9162, + 2881: 0x56F3, + 2882: 0x53A8, + 2883: 0x9017, + 2884: 0x5439, + 2885: 0x5782, + 2886: 0x5E25, + 2887: 0x63A8, + 2888: 0x6C34, + 2889: 0x708A, + 2890: 0x7761, + 2891: 0x7C8B, + 2892: 0x7FE0, + 2893: 0x8870, + 2894: 0x9042, + 2895: 0x9154, + 2896: 0x9310, + 2897: 0x9318, + 2898: 0x968F, + 2899: 0x745E, + 2900: 0x9AC4, + 2901: 0x5D07, + 2902: 0x5D69, + 2903: 0x6570, + 2904: 0x67A2, + 2905: 0x8DA8, + 2906: 0x96DB, + 2907: 0x636E, + 2908: 0x6749, + 2909: 0x6919, + 2910: 0x83C5, + 2911: 0x9817, + 2912: 0x96C0, + 2913: 0x88FE, + 2914: 0x6F84, + 2915: 0x647A, + 2916: 0x5BF8, + 2917: 0x4E16, + 2918: 0x702C, + 2919: 0x755D, + 2920: 0x662F, + 2921: 0x51C4, + 2922: 0x5236, + 2923: 0x52E2, + 2924: 0x59D3, + 2925: 0x5F81, + 2926: 0x6027, + 2927: 0x6210, + 2928: 0x653F, + 2929: 0x6574, + 2930: 0x661F, + 2931: 0x6674, + 2932: 0x68F2, + 2933: 0x6816, + 2934: 0x6B63, + 2935: 0x6E05, + 2936: 0x7272, + 2937: 0x751F, + 2938: 0x76DB, + 2939: 0x7CBE, + 2940: 0x8056, + 2941: 0x58F0, + 2942: 0x88FD, + 2943: 0x897F, + 2944: 0x8AA0, + 2945: 0x8A93, + 2946: 0x8ACB, + 2947: 0x901D, + 2948: 0x9192, + 2949: 0x9752, + 2950: 0x9759, + 2951: 0x6589, + 2952: 0x7A0E, + 2953: 0x8106, + 2954: 0x96BB, + 2955: 0x5E2D, + 2956: 0x60DC, + 2957: 0x621A, + 2958: 0x65A5, + 2959: 0x6614, + 2960: 0x6790, + 2961: 0x77F3, + 2962: 0x7A4D, + 2963: 0x7C4D, + 2964: 0x7E3E, + 2965: 0x810A, + 2966: 0x8CAC, + 2967: 0x8D64, + 2968: 0x8DE1, + 2969: 0x8E5F, + 2970: 0x78A9, + 2971: 0x5207, + 2972: 0x62D9, + 2973: 0x63A5, + 2974: 0x6442, + 2975: 0x6298, + 2976: 0x8A2D, + 2977: 0x7A83, + 2978: 0x7BC0, + 2979: 0x8AAC, + 2980: 0x96EA, + 2981: 0x7D76, + 2982: 0x820C, + 2983: 0x8749, + 2984: 0x4ED9, + 2985: 0x5148, + 2986: 0x5343, + 2987: 0x5360, + 2988: 0x5BA3, + 2989: 0x5C02, + 2990: 0x5C16, + 2991: 0x5DDD, + 2992: 0x6226, + 2993: 0x6247, + 2994: 0x64B0, + 2995: 0x6813, + 2996: 0x6834, + 2997: 0x6CC9, + 2998: 0x6D45, + 2999: 0x6D17, + 3000: 0x67D3, + 3001: 0x6F5C, + 3002: 0x714E, + 3003: 0x717D, + 3004: 0x65CB, + 3005: 0x7A7F, + 3006: 0x7BAD, + 3007: 0x7DDA, + 3008: 0x7E4A, + 3009: 0x7FA8, + 3010: 0x817A, + 3011: 0x821B, + 3012: 0x8239, + 3013: 0x85A6, + 3014: 0x8A6E, + 3015: 0x8CCE, + 3016: 0x8DF5, + 3017: 0x9078, + 3018: 0x9077, + 3019: 0x92AD, + 3020: 0x9291, + 3021: 0x9583, + 3022: 0x9BAE, + 3023: 0x524D, + 3024: 0x5584, + 3025: 0x6F38, + 3026: 0x7136, + 3027: 0x5168, + 3028: 0x7985, + 3029: 0x7E55, + 3030: 0x81B3, + 3031: 0x7CCE, + 3032: 0x564C, + 3033: 0x5851, + 3034: 0x5CA8, + 3035: 0x63AA, + 3036: 0x66FE, + 3037: 0x66FD, + 3038: 0x695A, + 3039: 0x72D9, + 3040: 0x758F, + 3041: 0x758E, + 3042: 0x790E, + 3043: 0x7956, + 3044: 0x79DF, + 3045: 0x7C97, + 3046: 0x7D20, + 3047: 0x7D44, + 3048: 0x8607, + 3049: 0x8A34, + 3050: 0x963B, + 3051: 0x9061, + 3052: 0x9F20, + 3053: 0x50E7, + 3054: 0x5275, + 3055: 0x53CC, + 3056: 0x53E2, + 3057: 0x5009, + 3058: 0x55AA, + 3059: 0x58EE, + 3060: 0x594F, + 3061: 0x723D, + 3062: 0x5B8B, + 3063: 0x5C64, + 3064: 0x531D, + 3065: 0x60E3, + 3066: 0x60F3, + 3067: 0x635C, + 3068: 0x6383, + 3069: 0x633F, + 3070: 0x63BB, + 3071: 0x64CD, + 3072: 0x65E9, + 3073: 0x66F9, + 3074: 0x5DE3, + 3075: 0x69CD, + 3076: 0x69FD, + 3077: 0x6F15, + 3078: 0x71E5, + 3079: 0x4E89, + 3080: 0x75E9, + 3081: 0x76F8, + 3082: 0x7A93, + 3083: 0x7CDF, + 3084: 0x7DCF, + 3085: 0x7D9C, + 3086: 0x8061, + 3087: 0x8349, + 3088: 0x8358, + 3089: 0x846C, + 3090: 0x84BC, + 3091: 0x85FB, + 3092: 0x88C5, + 3093: 0x8D70, + 3094: 0x9001, + 3095: 0x906D, + 3096: 0x9397, + 3097: 0x971C, + 3098: 0x9A12, + 3099: 0x50CF, + 3100: 0x5897, + 3101: 0x618E, + 3102: 0x81D3, + 3103: 0x8535, + 3104: 0x8D08, + 3105: 0x9020, + 3106: 0x4FC3, + 3107: 0x5074, + 3108: 0x5247, + 3109: 0x5373, + 3110: 0x606F, + 3111: 0x6349, + 3112: 0x675F, + 3113: 0x6E2C, + 3114: 0x8DB3, + 3115: 0x901F, + 3116: 0x4FD7, + 3117: 0x5C5E, + 3118: 0x8CCA, + 3119: 0x65CF, + 3120: 0x7D9A, + 3121: 0x5352, + 3122: 0x8896, + 3123: 0x5176, + 3124: 0x63C3, + 3125: 0x5B58, + 3126: 0x5B6B, + 3127: 0x5C0A, + 3128: 0x640D, + 3129: 0x6751, + 3130: 0x905C, + 3131: 0x4ED6, + 3132: 0x591A, + 3133: 0x592A, + 3134: 0x6C70, + 3135: 0x8A51, + 3136: 0x553E, + 3137: 0x5815, + 3138: 0x59A5, + 3139: 0x60F0, + 3140: 0x6253, + 3141: 0x67C1, + 3142: 0x8235, + 3143: 0x6955, + 3144: 0x9640, + 3145: 0x99C4, + 3146: 0x9A28, + 3147: 0x4F53, + 3148: 0x5806, + 3149: 0x5BFE, + 3150: 0x8010, + 3151: 0x5CB1, + 3152: 0x5E2F, + 3153: 0x5F85, + 3154: 0x6020, + 3155: 0x614B, + 3156: 0x6234, + 3157: 0x66FF, + 3158: 0x6CF0, + 3159: 0x6EDE, + 3160: 0x80CE, + 3161: 0x817F, + 3162: 0x82D4, + 3163: 0x888B, + 3164: 0x8CB8, + 3165: 0x9000, + 3166: 0x902E, + 3167: 0x968A, + 3168: 0x9EDB, + 3169: 0x9BDB, + 3170: 0x4EE3, + 3171: 0x53F0, + 3172: 0x5927, + 3173: 0x7B2C, + 3174: 0x918D, + 3175: 0x984C, + 3176: 0x9DF9, + 3177: 0x6EDD, + 3178: 0x7027, + 3179: 0x5353, + 3180: 0x5544, + 3181: 0x5B85, + 3182: 0x6258, + 3183: 0x629E, + 3184: 0x62D3, + 3185: 0x6CA2, + 3186: 0x6FEF, + 3187: 0x7422, + 3188: 0x8A17, + 3189: 0x9438, + 3190: 0x6FC1, + 3191: 0x8AFE, + 3192: 0x8338, + 3193: 0x51E7, + 3194: 0x86F8, + 3195: 0x53EA, + 3196: 0x53E9, + 3197: 0x4F46, + 3198: 0x9054, + 3199: 0x8FB0, + 3200: 0x596A, + 3201: 0x8131, + 3202: 0x5DFD, + 3203: 0x7AEA, + 3204: 0x8FBF, + 3205: 0x68DA, + 3206: 0x8C37, + 3207: 0x72F8, + 3208: 0x9C48, + 3209: 0x6A3D, + 3210: 0x8AB0, + 3211: 0x4E39, + 3212: 0x5358, + 3213: 0x5606, + 3214: 0x5766, + 3215: 0x62C5, + 3216: 0x63A2, + 3217: 0x65E6, + 3218: 0x6B4E, + 3219: 0x6DE1, + 3220: 0x6E5B, + 3221: 0x70AD, + 3222: 0x77ED, + 3223: 0x7AEF, + 3224: 0x7BAA, + 3225: 0x7DBB, + 3226: 0x803D, + 3227: 0x80C6, + 3228: 0x86CB, + 3229: 0x8A95, + 3230: 0x935B, + 3231: 0x56E3, + 3232: 0x58C7, + 3233: 0x5F3E, + 3234: 0x65AD, + 3235: 0x6696, + 3236: 0x6A80, + 3237: 0x6BB5, + 3238: 0x7537, + 3239: 0x8AC7, + 3240: 0x5024, + 3241: 0x77E5, + 3242: 0x5730, + 3243: 0x5F1B, + 3244: 0x6065, + 3245: 0x667A, + 3246: 0x6C60, + 3247: 0x75F4, + 3248: 0x7A1A, + 3249: 0x7F6E, + 3250: 0x81F4, + 3251: 0x8718, + 3252: 0x9045, + 3253: 0x99B3, + 3254: 0x7BC9, + 3255: 0x755C, + 3256: 0x7AF9, + 3257: 0x7B51, + 3258: 0x84C4, + 3259: 0x9010, + 3260: 0x79E9, + 3261: 0x7A92, + 3262: 0x8336, + 3263: 0x5AE1, + 3264: 0x7740, + 3265: 0x4E2D, + 3266: 0x4EF2, + 3267: 0x5B99, + 3268: 0x5FE0, + 3269: 0x62BD, + 3270: 0x663C, + 3271: 0x67F1, + 3272: 0x6CE8, + 3273: 0x866B, + 3274: 0x8877, + 3275: 0x8A3B, + 3276: 0x914E, + 3277: 0x92F3, + 3278: 0x99D0, + 3279: 0x6A17, + 3280: 0x7026, + 3281: 0x732A, + 3282: 0x82E7, + 3283: 0x8457, + 3284: 0x8CAF, + 3285: 0x4E01, + 3286: 0x5146, + 3287: 0x51CB, + 3288: 0x558B, + 3289: 0x5BF5, + 3290: 0x5E16, + 3291: 0x5E33, + 3292: 0x5E81, + 3293: 0x5F14, + 3294: 0x5F35, + 3295: 0x5F6B, + 3296: 0x5FB4, + 3297: 0x61F2, + 3298: 0x6311, + 3299: 0x66A2, + 3300: 0x671D, + 3301: 0x6F6E, + 3302: 0x7252, + 3303: 0x753A, + 3304: 0x773A, + 3305: 0x8074, + 3306: 0x8139, + 3307: 0x8178, + 3308: 0x8776, + 3309: 0x8ABF, + 3310: 0x8ADC, + 3311: 0x8D85, + 3312: 0x8DF3, + 3313: 0x929A, + 3314: 0x9577, + 3315: 0x9802, + 3316: 0x9CE5, + 3317: 0x52C5, + 3318: 0x6357, + 3319: 0x76F4, + 3320: 0x6715, + 3321: 0x6C88, + 3322: 0x73CD, + 3323: 0x8CC3, + 3324: 0x93AE, + 3325: 0x9673, + 3326: 0x6D25, + 3327: 0x589C, + 3328: 0x690E, + 3329: 0x69CC, + 3330: 0x8FFD, + 3331: 0x939A, + 3332: 0x75DB, + 3333: 0x901A, + 3334: 0x585A, + 3335: 0x6802, + 3336: 0x63B4, + 3337: 0x69FB, + 3338: 0x4F43, + 3339: 0x6F2C, + 3340: 0x67D8, + 3341: 0x8FBB, + 3342: 0x8526, + 3343: 0x7DB4, + 3344: 0x9354, + 3345: 0x693F, + 3346: 0x6F70, + 3347: 0x576A, + 3348: 0x58F7, + 3349: 0x5B2C, + 3350: 0x7D2C, + 3351: 0x722A, + 3352: 0x540A, + 3353: 0x91E3, + 3354: 0x9DB4, + 3355: 0x4EAD, + 3356: 0x4F4E, + 3357: 0x505C, + 3358: 0x5075, + 3359: 0x5243, + 3360: 0x8C9E, + 3361: 0x5448, + 3362: 0x5824, + 3363: 0x5B9A, + 3364: 0x5E1D, + 3365: 0x5E95, + 3366: 0x5EAD, + 3367: 0x5EF7, + 3368: 0x5F1F, + 3369: 0x608C, + 3370: 0x62B5, + 3371: 0x633A, + 3372: 0x63D0, + 3373: 0x68AF, + 3374: 0x6C40, + 3375: 0x7887, + 3376: 0x798E, + 3377: 0x7A0B, + 3378: 0x7DE0, + 3379: 0x8247, + 3380: 0x8A02, + 3381: 0x8AE6, + 3382: 0x8E44, + 3383: 0x9013, + 3384: 0x90B8, + 3385: 0x912D, + 3386: 0x91D8, + 3387: 0x9F0E, + 3388: 0x6CE5, + 3389: 0x6458, + 3390: 0x64E2, + 3391: 0x6575, + 3392: 0x6EF4, + 3393: 0x7684, + 3394: 0x7B1B, + 3395: 0x9069, + 3396: 0x93D1, + 3397: 0x6EBA, + 3398: 0x54F2, + 3399: 0x5FB9, + 3400: 0x64A4, + 3401: 0x8F4D, + 3402: 0x8FED, + 3403: 0x9244, + 3404: 0x5178, + 3405: 0x586B, + 3406: 0x5929, + 3407: 0x5C55, + 3408: 0x5E97, + 3409: 0x6DFB, + 3410: 0x7E8F, + 3411: 0x751C, + 3412: 0x8CBC, + 3413: 0x8EE2, + 3414: 0x985B, + 3415: 0x70B9, + 3416: 0x4F1D, + 3417: 0x6BBF, + 3418: 0x6FB1, + 3419: 0x7530, + 3420: 0x96FB, + 3421: 0x514E, + 3422: 0x5410, + 3423: 0x5835, + 3424: 0x5857, + 3425: 0x59AC, + 3426: 0x5C60, + 3427: 0x5F92, + 3428: 0x6597, + 3429: 0x675C, + 3430: 0x6E21, + 3431: 0x767B, + 3432: 0x83DF, + 3433: 0x8CED, + 3434: 0x9014, + 3435: 0x90FD, + 3436: 0x934D, + 3437: 0x7825, + 3438: 0x783A, + 3439: 0x52AA, + 3440: 0x5EA6, + 3441: 0x571F, + 3442: 0x5974, + 3443: 0x6012, + 3444: 0x5012, + 3445: 0x515A, + 3446: 0x51AC, + 3447: 0x51CD, + 3448: 0x5200, + 3449: 0x5510, + 3450: 0x5854, + 3451: 0x5858, + 3452: 0x5957, + 3453: 0x5B95, + 3454: 0x5CF6, + 3455: 0x5D8B, + 3456: 0x60BC, + 3457: 0x6295, + 3458: 0x642D, + 3459: 0x6771, + 3460: 0x6843, + 3461: 0x68BC, + 3462: 0x68DF, + 3463: 0x76D7, + 3464: 0x6DD8, + 3465: 0x6E6F, + 3466: 0x6D9B, + 3467: 0x706F, + 3468: 0x71C8, + 3469: 0x5F53, + 3470: 0x75D8, + 3471: 0x7977, + 3472: 0x7B49, + 3473: 0x7B54, + 3474: 0x7B52, + 3475: 0x7CD6, + 3476: 0x7D71, + 3477: 0x5230, + 3478: 0x8463, + 3479: 0x8569, + 3480: 0x85E4, + 3481: 0x8A0E, + 3482: 0x8B04, + 3483: 0x8C46, + 3484: 0x8E0F, + 3485: 0x9003, + 3486: 0x900F, + 3487: 0x9419, + 3488: 0x9676, + 3489: 0x982D, + 3490: 0x9A30, + 3491: 0x95D8, + 3492: 0x50CD, + 3493: 0x52D5, + 3494: 0x540C, + 3495: 0x5802, + 3496: 0x5C0E, + 3497: 0x61A7, + 3498: 0x649E, + 3499: 0x6D1E, + 3500: 0x77B3, + 3501: 0x7AE5, + 3502: 0x80F4, + 3503: 0x8404, + 3504: 0x9053, + 3505: 0x9285, + 3506: 0x5CE0, + 3507: 0x9D07, + 3508: 0x533F, + 3509: 0x5F97, + 3510: 0x5FB3, + 3511: 0x6D9C, + 3512: 0x7279, + 3513: 0x7763, + 3514: 0x79BF, + 3515: 0x7BE4, + 3516: 0x6BD2, + 3517: 0x72EC, + 3518: 0x8AAD, + 3519: 0x6803, + 3520: 0x6A61, + 3521: 0x51F8, + 3522: 0x7A81, + 3523: 0x6934, + 3524: 0x5C4A, + 3525: 0x9CF6, + 3526: 0x82EB, + 3527: 0x5BC5, + 3528: 0x9149, + 3529: 0x701E, + 3530: 0x5678, + 3531: 0x5C6F, + 3532: 0x60C7, + 3533: 0x6566, + 3534: 0x6C8C, + 3535: 0x8C5A, + 3536: 0x9041, + 3537: 0x9813, + 3538: 0x5451, + 3539: 0x66C7, + 3540: 0x920D, + 3541: 0x5948, + 3542: 0x90A3, + 3543: 0x5185, + 3544: 0x4E4D, + 3545: 0x51EA, + 3546: 0x8599, + 3547: 0x8B0E, + 3548: 0x7058, + 3549: 0x637A, + 3550: 0x934B, + 3551: 0x6962, + 3552: 0x99B4, + 3553: 0x7E04, + 3554: 0x7577, + 3555: 0x5357, + 3556: 0x6960, + 3557: 0x8EDF, + 3558: 0x96E3, + 3559: 0x6C5D, + 3560: 0x4E8C, + 3561: 0x5C3C, + 3562: 0x5F10, + 3563: 0x8FE9, + 3564: 0x5302, + 3565: 0x8CD1, + 3566: 0x8089, + 3567: 0x8679, + 3568: 0x5EFF, + 3569: 0x65E5, + 3570: 0x4E73, + 3571: 0x5165, + 3572: 0x5982, + 3573: 0x5C3F, + 3574: 0x97EE, + 3575: 0x4EFB, + 3576: 0x598A, + 3577: 0x5FCD, + 3578: 0x8A8D, + 3579: 0x6FE1, + 3580: 0x79B0, + 3581: 0x7962, + 3582: 0x5BE7, + 3583: 0x8471, + 3584: 0x732B, + 3585: 0x71B1, + 3586: 0x5E74, + 3587: 0x5FF5, + 3588: 0x637B, + 3589: 0x649A, + 3590: 0x71C3, + 3591: 0x7C98, + 3592: 0x4E43, + 3593: 0x5EFC, + 3594: 0x4E4B, + 3595: 0x57DC, + 3596: 0x56A2, + 3597: 0x60A9, + 3598: 0x6FC3, + 3599: 0x7D0D, + 3600: 0x80FD, + 3601: 0x8133, + 3602: 0x81BF, + 3603: 0x8FB2, + 3604: 0x8997, + 3605: 0x86A4, + 3606: 0x5DF4, + 3607: 0x628A, + 3608: 0x64AD, + 3609: 0x8987, + 3610: 0x6777, + 3611: 0x6CE2, + 3612: 0x6D3E, + 3613: 0x7436, + 3614: 0x7834, + 3615: 0x5A46, + 3616: 0x7F75, + 3617: 0x82AD, + 3618: 0x99AC, + 3619: 0x4FF3, + 3620: 0x5EC3, + 3621: 0x62DD, + 3622: 0x6392, + 3623: 0x6557, + 3624: 0x676F, + 3625: 0x76C3, + 3626: 0x724C, + 3627: 0x80CC, + 3628: 0x80BA, + 3629: 0x8F29, + 3630: 0x914D, + 3631: 0x500D, + 3632: 0x57F9, + 3633: 0x5A92, + 3634: 0x6885, + 3635: 0x6973, + 3636: 0x7164, + 3637: 0x72FD, + 3638: 0x8CB7, + 3639: 0x58F2, + 3640: 0x8CE0, + 3641: 0x966A, + 3642: 0x9019, + 3643: 0x877F, + 3644: 0x79E4, + 3645: 0x77E7, + 3646: 0x8429, + 3647: 0x4F2F, + 3648: 0x5265, + 3649: 0x535A, + 3650: 0x62CD, + 3651: 0x67CF, + 3652: 0x6CCA, + 3653: 0x767D, + 3654: 0x7B94, + 3655: 0x7C95, + 3656: 0x8236, + 3657: 0x8584, + 3658: 0x8FEB, + 3659: 0x66DD, + 3660: 0x6F20, + 3661: 0x7206, + 3662: 0x7E1B, + 3663: 0x83AB, + 3664: 0x99C1, + 3665: 0x9EA6, + 3666: 0x51FD, + 3667: 0x7BB1, + 3668: 0x7872, + 3669: 0x7BB8, + 3670: 0x8087, + 3671: 0x7B48, + 3672: 0x6AE8, + 3673: 0x5E61, + 3674: 0x808C, + 3675: 0x7551, + 3676: 0x7560, + 3677: 0x516B, + 3678: 0x9262, + 3679: 0x6E8C, + 3680: 0x767A, + 3681: 0x9197, + 3682: 0x9AEA, + 3683: 0x4F10, + 3684: 0x7F70, + 3685: 0x629C, + 3686: 0x7B4F, + 3687: 0x95A5, + 3688: 0x9CE9, + 3689: 0x567A, + 3690: 0x5859, + 3691: 0x86E4, + 3692: 0x96BC, + 3693: 0x4F34, + 3694: 0x5224, + 3695: 0x534A, + 3696: 0x53CD, + 3697: 0x53DB, + 3698: 0x5E06, + 3699: 0x642C, + 3700: 0x6591, + 3701: 0x677F, + 3702: 0x6C3E, + 3703: 0x6C4E, + 3704: 0x7248, + 3705: 0x72AF, + 3706: 0x73ED, + 3707: 0x7554, + 3708: 0x7E41, + 3709: 0x822C, + 3710: 0x85E9, + 3711: 0x8CA9, + 3712: 0x7BC4, + 3713: 0x91C6, + 3714: 0x7169, + 3715: 0x9812, + 3716: 0x98EF, + 3717: 0x633D, + 3718: 0x6669, + 3719: 0x756A, + 3720: 0x76E4, + 3721: 0x78D0, + 3722: 0x8543, + 3723: 0x86EE, + 3724: 0x532A, + 3725: 0x5351, + 3726: 0x5426, + 3727: 0x5983, + 3728: 0x5E87, + 3729: 0x5F7C, + 3730: 0x60B2, + 3731: 0x6249, + 3732: 0x6279, + 3733: 0x62AB, + 3734: 0x6590, + 3735: 0x6BD4, + 3736: 0x6CCC, + 3737: 0x75B2, + 3738: 0x76AE, + 3739: 0x7891, + 3740: 0x79D8, + 3741: 0x7DCB, + 3742: 0x7F77, + 3743: 0x80A5, + 3744: 0x88AB, + 3745: 0x8AB9, + 3746: 0x8CBB, + 3747: 0x907F, + 3748: 0x975E, + 3749: 0x98DB, + 3750: 0x6A0B, + 3751: 0x7C38, + 3752: 0x5099, + 3753: 0x5C3E, + 3754: 0x5FAE, + 3755: 0x6787, + 3756: 0x6BD8, + 3757: 0x7435, + 3758: 0x7709, + 3759: 0x7F8E, + 3760: 0x9F3B, + 3761: 0x67CA, + 3762: 0x7A17, + 3763: 0x5339, + 3764: 0x758B, + 3765: 0x9AED, + 3766: 0x5F66, + 3767: 0x819D, + 3768: 0x83F1, + 3769: 0x8098, + 3770: 0x5F3C, + 3771: 0x5FC5, + 3772: 0x7562, + 3773: 0x7B46, + 3774: 0x903C, + 3775: 0x6867, + 3776: 0x59EB, + 3777: 0x5A9B, + 3778: 0x7D10, + 3779: 0x767E, + 3780: 0x8B2C, + 3781: 0x4FF5, + 3782: 0x5F6A, + 3783: 0x6A19, + 3784: 0x6C37, + 3785: 0x6F02, + 3786: 0x74E2, + 3787: 0x7968, + 3788: 0x8868, + 3789: 0x8A55, + 3790: 0x8C79, + 3791: 0x5EDF, + 3792: 0x63CF, + 3793: 0x75C5, + 3794: 0x79D2, + 3795: 0x82D7, + 3796: 0x9328, + 3797: 0x92F2, + 3798: 0x849C, + 3799: 0x86ED, + 3800: 0x9C2D, + 3801: 0x54C1, + 3802: 0x5F6C, + 3803: 0x658C, + 3804: 0x6D5C, + 3805: 0x7015, + 3806: 0x8CA7, + 3807: 0x8CD3, + 3808: 0x983B, + 3809: 0x654F, + 3810: 0x74F6, + 3811: 0x4E0D, + 3812: 0x4ED8, + 3813: 0x57E0, + 3814: 0x592B, + 3815: 0x5A66, + 3816: 0x5BCC, + 3817: 0x51A8, + 3818: 0x5E03, + 3819: 0x5E9C, + 3820: 0x6016, + 3821: 0x6276, + 3822: 0x6577, + 3823: 0x65A7, + 3824: 0x666E, + 3825: 0x6D6E, + 3826: 0x7236, + 3827: 0x7B26, + 3828: 0x8150, + 3829: 0x819A, + 3830: 0x8299, + 3831: 0x8B5C, + 3832: 0x8CA0, + 3833: 0x8CE6, + 3834: 0x8D74, + 3835: 0x961C, + 3836: 0x9644, + 3837: 0x4FAE, + 3838: 0x64AB, + 3839: 0x6B66, + 3840: 0x821E, + 3841: 0x8461, + 3842: 0x856A, + 3843: 0x90E8, + 3844: 0x5C01, + 3845: 0x6953, + 3846: 0x98A8, + 3847: 0x847A, + 3848: 0x8557, + 3849: 0x4F0F, + 3850: 0x526F, + 3851: 0x5FA9, + 3852: 0x5E45, + 3853: 0x670D, + 3854: 0x798F, + 3855: 0x8179, + 3856: 0x8907, + 3857: 0x8986, + 3858: 0x6DF5, + 3859: 0x5F17, + 3860: 0x6255, + 3861: 0x6CB8, + 3862: 0x4ECF, + 3863: 0x7269, + 3864: 0x9B92, + 3865: 0x5206, + 3866: 0x543B, + 3867: 0x5674, + 3868: 0x58B3, + 3869: 0x61A4, + 3870: 0x626E, + 3871: 0x711A, + 3872: 0x596E, + 3873: 0x7C89, + 3874: 0x7CDE, + 3875: 0x7D1B, + 3876: 0x96F0, + 3877: 0x6587, + 3878: 0x805E, + 3879: 0x4E19, + 3880: 0x4F75, + 3881: 0x5175, + 3882: 0x5840, + 3883: 0x5E63, + 3884: 0x5E73, + 3885: 0x5F0A, + 3886: 0x67C4, + 3887: 0x4E26, + 3888: 0x853D, + 3889: 0x9589, + 3890: 0x965B, + 3891: 0x7C73, + 3892: 0x9801, + 3893: 0x50FB, + 3894: 0x58C1, + 3895: 0x7656, + 3896: 0x78A7, + 3897: 0x5225, + 3898: 0x77A5, + 3899: 0x8511, + 3900: 0x7B86, + 3901: 0x504F, + 3902: 0x5909, + 3903: 0x7247, + 3904: 0x7BC7, + 3905: 0x7DE8, + 3906: 0x8FBA, + 3907: 0x8FD4, + 3908: 0x904D, + 3909: 0x4FBF, + 3910: 0x52C9, + 3911: 0x5A29, + 3912: 0x5F01, + 3913: 0x97AD, + 3914: 0x4FDD, + 3915: 0x8217, + 3916: 0x92EA, + 3917: 0x5703, + 3918: 0x6355, + 3919: 0x6B69, + 3920: 0x752B, + 3921: 0x88DC, + 3922: 0x8F14, + 3923: 0x7A42, + 3924: 0x52DF, + 3925: 0x5893, + 3926: 0x6155, + 3927: 0x620A, + 3928: 0x66AE, + 3929: 0x6BCD, + 3930: 0x7C3F, + 3931: 0x83E9, + 3932: 0x5023, + 3933: 0x4FF8, + 3934: 0x5305, + 3935: 0x5446, + 3936: 0x5831, + 3937: 0x5949, + 3938: 0x5B9D, + 3939: 0x5CF0, + 3940: 0x5CEF, + 3941: 0x5D29, + 3942: 0x5E96, + 3943: 0x62B1, + 3944: 0x6367, + 3945: 0x653E, + 3946: 0x65B9, + 3947: 0x670B, + 3948: 0x6CD5, + 3949: 0x6CE1, + 3950: 0x70F9, + 3951: 0x7832, + 3952: 0x7E2B, + 3953: 0x80DE, + 3954: 0x82B3, + 3955: 0x840C, + 3956: 0x84EC, + 3957: 0x8702, + 3958: 0x8912, + 3959: 0x8A2A, + 3960: 0x8C4A, + 3961: 0x90A6, + 3962: 0x92D2, + 3963: 0x98FD, + 3964: 0x9CF3, + 3965: 0x9D6C, + 3966: 0x4E4F, + 3967: 0x4EA1, + 3968: 0x508D, + 3969: 0x5256, + 3970: 0x574A, + 3971: 0x59A8, + 3972: 0x5E3D, + 3973: 0x5FD8, + 3974: 0x5FD9, + 3975: 0x623F, + 3976: 0x66B4, + 3977: 0x671B, + 3978: 0x67D0, + 3979: 0x68D2, + 3980: 0x5192, + 3981: 0x7D21, + 3982: 0x80AA, + 3983: 0x81A8, + 3984: 0x8B00, + 3985: 0x8C8C, + 3986: 0x8CBF, + 3987: 0x927E, + 3988: 0x9632, + 3989: 0x5420, + 3990: 0x982C, + 3991: 0x5317, + 3992: 0x50D5, + 3993: 0x535C, + 3994: 0x58A8, + 3995: 0x64B2, + 3996: 0x6734, + 3997: 0x7267, + 3998: 0x7766, + 3999: 0x7A46, + 4000: 0x91E6, + 4001: 0x52C3, + 4002: 0x6CA1, + 4003: 0x6B86, + 4004: 0x5800, + 4005: 0x5E4C, + 4006: 0x5954, + 4007: 0x672C, + 4008: 0x7FFB, + 4009: 0x51E1, + 4010: 0x76C6, + 4011: 0x6469, + 4012: 0x78E8, + 4013: 0x9B54, + 4014: 0x9EBB, + 4015: 0x57CB, + 4016: 0x59B9, + 4017: 0x6627, + 4018: 0x679A, + 4019: 0x6BCE, + 4020: 0x54E9, + 4021: 0x69D9, + 4022: 0x5E55, + 4023: 0x819C, + 4024: 0x6795, + 4025: 0x9BAA, + 4026: 0x67FE, + 4027: 0x9C52, + 4028: 0x685D, + 4029: 0x4EA6, + 4030: 0x4FE3, + 4031: 0x53C8, + 4032: 0x62B9, + 4033: 0x672B, + 4034: 0x6CAB, + 4035: 0x8FC4, + 4036: 0x4FAD, + 4037: 0x7E6D, + 4038: 0x9EBF, + 4039: 0x4E07, + 4040: 0x6162, + 4041: 0x6E80, + 4042: 0x6F2B, + 4043: 0x8513, + 4044: 0x5473, + 4045: 0x672A, + 4046: 0x9B45, + 4047: 0x5DF3, + 4048: 0x7B95, + 4049: 0x5CAC, + 4050: 0x5BC6, + 4051: 0x871C, + 4052: 0x6E4A, + 4053: 0x84D1, + 4054: 0x7A14, + 4055: 0x8108, + 4056: 0x5999, + 4057: 0x7C8D, + 4058: 0x6C11, + 4059: 0x7720, + 4060: 0x52D9, + 4061: 0x5922, + 4062: 0x7121, + 4063: 0x725F, + 4064: 0x77DB, + 4065: 0x9727, + 4066: 0x9D61, + 4067: 0x690B, + 4068: 0x5A7F, + 4069: 0x5A18, + 4070: 0x51A5, + 4071: 0x540D, + 4072: 0x547D, + 4073: 0x660E, + 4074: 0x76DF, + 4075: 0x8FF7, + 4076: 0x9298, + 4077: 0x9CF4, + 4078: 0x59EA, + 4079: 0x725D, + 4080: 0x6EC5, + 4081: 0x514D, + 4082: 0x68C9, + 4083: 0x7DBF, + 4084: 0x7DEC, + 4085: 0x9762, + 4086: 0x9EBA, + 4087: 0x6478, + 4088: 0x6A21, + 4089: 0x8302, + 4090: 0x5984, + 4091: 0x5B5F, + 4092: 0x6BDB, + 4093: 0x731B, + 4094: 0x76F2, + 4095: 0x7DB2, + 4096: 0x8017, + 4097: 0x8499, + 4098: 0x5132, + 4099: 0x6728, + 4100: 0x9ED9, + 4101: 0x76EE, + 4102: 0x6762, + 4103: 0x52FF, + 4104: 0x9905, + 4105: 0x5C24, + 4106: 0x623B, + 4107: 0x7C7E, + 4108: 0x8CB0, + 4109: 0x554F, + 4110: 0x60B6, + 4111: 0x7D0B, + 4112: 0x9580, + 4113: 0x5301, + 4114: 0x4E5F, + 4115: 0x51B6, + 4116: 0x591C, + 4117: 0x723A, + 4118: 0x8036, + 4119: 0x91CE, + 4120: 0x5F25, + 4121: 0x77E2, + 4122: 0x5384, + 4123: 0x5F79, + 4124: 0x7D04, + 4125: 0x85AC, + 4126: 0x8A33, + 4127: 0x8E8D, + 4128: 0x9756, + 4129: 0x67F3, + 4130: 0x85AE, + 4131: 0x9453, + 4132: 0x6109, + 4133: 0x6108, + 4134: 0x6CB9, + 4135: 0x7652, + 4136: 0x8AED, + 4137: 0x8F38, + 4138: 0x552F, + 4139: 0x4F51, + 4140: 0x512A, + 4141: 0x52C7, + 4142: 0x53CB, + 4143: 0x5BA5, + 4144: 0x5E7D, + 4145: 0x60A0, + 4146: 0x6182, + 4147: 0x63D6, + 4148: 0x6709, + 4149: 0x67DA, + 4150: 0x6E67, + 4151: 0x6D8C, + 4152: 0x7336, + 4153: 0x7337, + 4154: 0x7531, + 4155: 0x7950, + 4156: 0x88D5, + 4157: 0x8A98, + 4158: 0x904A, + 4159: 0x9091, + 4160: 0x90F5, + 4161: 0x96C4, + 4162: 0x878D, + 4163: 0x5915, + 4164: 0x4E88, + 4165: 0x4F59, + 4166: 0x4E0E, + 4167: 0x8A89, + 4168: 0x8F3F, + 4169: 0x9810, + 4170: 0x50AD, + 4171: 0x5E7C, + 4172: 0x5996, + 4173: 0x5BB9, + 4174: 0x5EB8, + 4175: 0x63DA, + 4176: 0x63FA, + 4177: 0x64C1, + 4178: 0x66DC, + 4179: 0x694A, + 4180: 0x69D8, + 4181: 0x6D0B, + 4182: 0x6EB6, + 4183: 0x7194, + 4184: 0x7528, + 4185: 0x7AAF, + 4186: 0x7F8A, + 4187: 0x8000, + 4188: 0x8449, + 4189: 0x84C9, + 4190: 0x8981, + 4191: 0x8B21, + 4192: 0x8E0A, + 4193: 0x9065, + 4194: 0x967D, + 4195: 0x990A, + 4196: 0x617E, + 4197: 0x6291, + 4198: 0x6B32, + 4199: 0x6C83, + 4200: 0x6D74, + 4201: 0x7FCC, + 4202: 0x7FFC, + 4203: 0x6DC0, + 4204: 0x7F85, + 4205: 0x87BA, + 4206: 0x88F8, + 4207: 0x6765, + 4208: 0x83B1, + 4209: 0x983C, + 4210: 0x96F7, + 4211: 0x6D1B, + 4212: 0x7D61, + 4213: 0x843D, + 4214: 0x916A, + 4215: 0x4E71, + 4216: 0x5375, + 4217: 0x5D50, + 4218: 0x6B04, + 4219: 0x6FEB, + 4220: 0x85CD, + 4221: 0x862D, + 4222: 0x89A7, + 4223: 0x5229, + 4224: 0x540F, + 4225: 0x5C65, + 4226: 0x674E, + 4227: 0x68A8, + 4228: 0x7406, + 4229: 0x7483, + 4230: 0x75E2, + 4231: 0x88CF, + 4232: 0x88E1, + 4233: 0x91CC, + 4234: 0x96E2, + 4235: 0x9678, + 4236: 0x5F8B, + 4237: 0x7387, + 4238: 0x7ACB, + 4239: 0x844E, + 4240: 0x63A0, + 4241: 0x7565, + 4242: 0x5289, + 4243: 0x6D41, + 4244: 0x6E9C, + 4245: 0x7409, + 4246: 0x7559, + 4247: 0x786B, + 4248: 0x7C92, + 4249: 0x9686, + 4250: 0x7ADC, + 4251: 0x9F8D, + 4252: 0x4FB6, + 4253: 0x616E, + 4254: 0x65C5, + 4255: 0x865C, + 4256: 0x4E86, + 4257: 0x4EAE, + 4258: 0x50DA, + 4259: 0x4E21, + 4260: 0x51CC, + 4261: 0x5BEE, + 4262: 0x6599, + 4263: 0x6881, + 4264: 0x6DBC, + 4265: 0x731F, + 4266: 0x7642, + 4267: 0x77AD, + 4268: 0x7A1C, + 4269: 0x7CE7, + 4270: 0x826F, + 4271: 0x8AD2, + 4272: 0x907C, + 4273: 0x91CF, + 4274: 0x9675, + 4275: 0x9818, + 4276: 0x529B, + 4277: 0x7DD1, + 4278: 0x502B, + 4279: 0x5398, + 4280: 0x6797, + 4281: 0x6DCB, + 4282: 0x71D0, + 4283: 0x7433, + 4284: 0x81E8, + 4285: 0x8F2A, + 4286: 0x96A3, + 4287: 0x9C57, + 4288: 0x9E9F, + 4289: 0x7460, + 4290: 0x5841, + 4291: 0x6D99, + 4292: 0x7D2F, + 4293: 0x985E, + 4294: 0x4EE4, + 4295: 0x4F36, + 4296: 0x4F8B, + 4297: 0x51B7, + 4298: 0x52B1, + 4299: 0x5DBA, + 4300: 0x601C, + 4301: 0x73B2, + 4302: 0x793C, + 4303: 0x82D3, + 4304: 0x9234, + 4305: 0x96B7, + 4306: 0x96F6, + 4307: 0x970A, + 4308: 0x9E97, + 4309: 0x9F62, + 4310: 0x66A6, + 4311: 0x6B74, + 4312: 0x5217, + 4313: 0x52A3, + 4314: 0x70C8, + 4315: 0x88C2, + 4316: 0x5EC9, + 4317: 0x604B, + 4318: 0x6190, + 4319: 0x6F23, + 4320: 0x7149, + 4321: 0x7C3E, + 4322: 0x7DF4, + 4323: 0x806F, + 4324: 0x84EE, + 4325: 0x9023, + 4326: 0x932C, + 4327: 0x5442, + 4328: 0x9B6F, + 4329: 0x6AD3, + 4330: 0x7089, + 4331: 0x8CC2, + 4332: 0x8DEF, + 4333: 0x9732, + 4334: 0x52B4, + 4335: 0x5A41, + 4336: 0x5ECA, + 4337: 0x5F04, + 4338: 0x6717, + 4339: 0x697C, + 4340: 0x6994, + 4341: 0x6D6A, + 4342: 0x6F0F, + 4343: 0x7262, + 4344: 0x72FC, + 4345: 0x7BED, + 4346: 0x8001, + 4347: 0x807E, + 4348: 0x874B, + 4349: 0x90CE, + 4350: 0x516D, + 4351: 0x9E93, + 4352: 0x7984, + 4353: 0x808B, + 4354: 0x9332, + 4355: 0x8AD6, + 4356: 0x502D, + 4357: 0x548C, + 4358: 0x8A71, + 4359: 0x6B6A, + 4360: 0x8CC4, + 4361: 0x8107, + 4362: 0x60D1, + 4363: 0x67A0, + 4364: 0x9DF2, + 4365: 0x4E99, + 4366: 0x4E98, + 4367: 0x9C10, + 4368: 0x8A6B, + 4369: 0x85C1, + 4370: 0x8568, + 4371: 0x6900, + 4372: 0x6E7E, + 4373: 0x7897, + 4374: 0x8155, + 4418: 0x5F0C, + 4419: 0x4E10, + 4420: 0x4E15, + 4421: 0x4E2A, + 4422: 0x4E31, + 4423: 0x4E36, + 4424: 0x4E3C, + 4425: 0x4E3F, + 4426: 0x4E42, + 4427: 0x4E56, + 4428: 0x4E58, + 4429: 0x4E82, + 4430: 0x4E85, + 4431: 0x8C6B, + 4432: 0x4E8A, + 4433: 0x8212, + 4434: 0x5F0D, + 4435: 0x4E8E, + 4436: 0x4E9E, + 4437: 0x4E9F, + 4438: 0x4EA0, + 4439: 0x4EA2, + 4440: 0x4EB0, + 4441: 0x4EB3, + 4442: 0x4EB6, + 4443: 0x4ECE, + 4444: 0x4ECD, + 4445: 0x4EC4, + 4446: 0x4EC6, + 4447: 0x4EC2, + 4448: 0x4ED7, + 4449: 0x4EDE, + 4450: 0x4EED, + 4451: 0x4EDF, + 4452: 0x4EF7, + 4453: 0x4F09, + 4454: 0x4F5A, + 4455: 0x4F30, + 4456: 0x4F5B, + 4457: 0x4F5D, + 4458: 0x4F57, + 4459: 0x4F47, + 4460: 0x4F76, + 4461: 0x4F88, + 4462: 0x4F8F, + 4463: 0x4F98, + 4464: 0x4F7B, + 4465: 0x4F69, + 4466: 0x4F70, + 4467: 0x4F91, + 4468: 0x4F6F, + 4469: 0x4F86, + 4470: 0x4F96, + 4471: 0x5118, + 4472: 0x4FD4, + 4473: 0x4FDF, + 4474: 0x4FCE, + 4475: 0x4FD8, + 4476: 0x4FDB, + 4477: 0x4FD1, + 4478: 0x4FDA, + 4479: 0x4FD0, + 4480: 0x4FE4, + 4481: 0x4FE5, + 4482: 0x501A, + 4483: 0x5028, + 4484: 0x5014, + 4485: 0x502A, + 4486: 0x5025, + 4487: 0x5005, + 4488: 0x4F1C, + 4489: 0x4FF6, + 4490: 0x5021, + 4491: 0x5029, + 4492: 0x502C, + 4493: 0x4FFE, + 4494: 0x4FEF, + 4495: 0x5011, + 4496: 0x5006, + 4497: 0x5043, + 4498: 0x5047, + 4499: 0x6703, + 4500: 0x5055, + 4501: 0x5050, + 4502: 0x5048, + 4503: 0x505A, + 4504: 0x5056, + 4505: 0x506C, + 4506: 0x5078, + 4507: 0x5080, + 4508: 0x509A, + 4509: 0x5085, + 4510: 0x50B4, + 4511: 0x50B2, + 4512: 0x50C9, + 4513: 0x50CA, + 4514: 0x50B3, + 4515: 0x50C2, + 4516: 0x50D6, + 4517: 0x50DE, + 4518: 0x50E5, + 4519: 0x50ED, + 4520: 0x50E3, + 4521: 0x50EE, + 4522: 0x50F9, + 4523: 0x50F5, + 4524: 0x5109, + 4525: 0x5101, + 4526: 0x5102, + 4527: 0x5116, + 4528: 0x5115, + 4529: 0x5114, + 4530: 0x511A, + 4531: 0x5121, + 4532: 0x513A, + 4533: 0x5137, + 4534: 0x513C, + 4535: 0x513B, + 4536: 0x513F, + 4537: 0x5140, + 4538: 0x5152, + 4539: 0x514C, + 4540: 0x5154, + 4541: 0x5162, + 4542: 0x7AF8, + 4543: 0x5169, + 4544: 0x516A, + 4545: 0x516E, + 4546: 0x5180, + 4547: 0x5182, + 4548: 0x56D8, + 4549: 0x518C, + 4550: 0x5189, + 4551: 0x518F, + 4552: 0x5191, + 4553: 0x5193, + 4554: 0x5195, + 4555: 0x5196, + 4556: 0x51A4, + 4557: 0x51A6, + 4558: 0x51A2, + 4559: 0x51A9, + 4560: 0x51AA, + 4561: 0x51AB, + 4562: 0x51B3, + 4563: 0x51B1, + 4564: 0x51B2, + 4565: 0x51B0, + 4566: 0x51B5, + 4567: 0x51BD, + 4568: 0x51C5, + 4569: 0x51C9, + 4570: 0x51DB, + 4571: 0x51E0, + 4572: 0x8655, + 4573: 0x51E9, + 4574: 0x51ED, + 4575: 0x51F0, + 4576: 0x51F5, + 4577: 0x51FE, + 4578: 0x5204, + 4579: 0x520B, + 4580: 0x5214, + 4581: 0x520E, + 4582: 0x5227, + 4583: 0x522A, + 4584: 0x522E, + 4585: 0x5233, + 4586: 0x5239, + 4587: 0x524F, + 4588: 0x5244, + 4589: 0x524B, + 4590: 0x524C, + 4591: 0x525E, + 4592: 0x5254, + 4593: 0x526A, + 4594: 0x5274, + 4595: 0x5269, + 4596: 0x5273, + 4597: 0x527F, + 4598: 0x527D, + 4599: 0x528D, + 4600: 0x5294, + 4601: 0x5292, + 4602: 0x5271, + 4603: 0x5288, + 4604: 0x5291, + 4605: 0x8FA8, + 4606: 0x8FA7, + 4607: 0x52AC, + 4608: 0x52AD, + 4609: 0x52BC, + 4610: 0x52B5, + 4611: 0x52C1, + 4612: 0x52CD, + 4613: 0x52D7, + 4614: 0x52DE, + 4615: 0x52E3, + 4616: 0x52E6, + 4617: 0x98ED, + 4618: 0x52E0, + 4619: 0x52F3, + 4620: 0x52F5, + 4621: 0x52F8, + 4622: 0x52F9, + 4623: 0x5306, + 4624: 0x5308, + 4625: 0x7538, + 4626: 0x530D, + 4627: 0x5310, + 4628: 0x530F, + 4629: 0x5315, + 4630: 0x531A, + 4631: 0x5323, + 4632: 0x532F, + 4633: 0x5331, + 4634: 0x5333, + 4635: 0x5338, + 4636: 0x5340, + 4637: 0x5346, + 4638: 0x5345, + 4639: 0x4E17, + 4640: 0x5349, + 4641: 0x534D, + 4642: 0x51D6, + 4643: 0x535E, + 4644: 0x5369, + 4645: 0x536E, + 4646: 0x5918, + 4647: 0x537B, + 4648: 0x5377, + 4649: 0x5382, + 4650: 0x5396, + 4651: 0x53A0, + 4652: 0x53A6, + 4653: 0x53A5, + 4654: 0x53AE, + 4655: 0x53B0, + 4656: 0x53B6, + 4657: 0x53C3, + 4658: 0x7C12, + 4659: 0x96D9, + 4660: 0x53DF, + 4661: 0x66FC, + 4662: 0x71EE, + 4663: 0x53EE, + 4664: 0x53E8, + 4665: 0x53ED, + 4666: 0x53FA, + 4667: 0x5401, + 4668: 0x543D, + 4669: 0x5440, + 4670: 0x542C, + 4671: 0x542D, + 4672: 0x543C, + 4673: 0x542E, + 4674: 0x5436, + 4675: 0x5429, + 4676: 0x541D, + 4677: 0x544E, + 4678: 0x548F, + 4679: 0x5475, + 4680: 0x548E, + 4681: 0x545F, + 4682: 0x5471, + 4683: 0x5477, + 4684: 0x5470, + 4685: 0x5492, + 4686: 0x547B, + 4687: 0x5480, + 4688: 0x5476, + 4689: 0x5484, + 4690: 0x5490, + 4691: 0x5486, + 4692: 0x54C7, + 4693: 0x54A2, + 4694: 0x54B8, + 4695: 0x54A5, + 4696: 0x54AC, + 4697: 0x54C4, + 4698: 0x54C8, + 4699: 0x54A8, + 4700: 0x54AB, + 4701: 0x54C2, + 4702: 0x54A4, + 4703: 0x54BE, + 4704: 0x54BC, + 4705: 0x54D8, + 4706: 0x54E5, + 4707: 0x54E6, + 4708: 0x550F, + 4709: 0x5514, + 4710: 0x54FD, + 4711: 0x54EE, + 4712: 0x54ED, + 4713: 0x54FA, + 4714: 0x54E2, + 4715: 0x5539, + 4716: 0x5540, + 4717: 0x5563, + 4718: 0x554C, + 4719: 0x552E, + 4720: 0x555C, + 4721: 0x5545, + 4722: 0x5556, + 4723: 0x5557, + 4724: 0x5538, + 4725: 0x5533, + 4726: 0x555D, + 4727: 0x5599, + 4728: 0x5580, + 4729: 0x54AF, + 4730: 0x558A, + 4731: 0x559F, + 4732: 0x557B, + 4733: 0x557E, + 4734: 0x5598, + 4735: 0x559E, + 4736: 0x55AE, + 4737: 0x557C, + 4738: 0x5583, + 4739: 0x55A9, + 4740: 0x5587, + 4741: 0x55A8, + 4742: 0x55DA, + 4743: 0x55C5, + 4744: 0x55DF, + 4745: 0x55C4, + 4746: 0x55DC, + 4747: 0x55E4, + 4748: 0x55D4, + 4749: 0x5614, + 4750: 0x55F7, + 4751: 0x5616, + 4752: 0x55FE, + 4753: 0x55FD, + 4754: 0x561B, + 4755: 0x55F9, + 4756: 0x564E, + 4757: 0x5650, + 4758: 0x71DF, + 4759: 0x5634, + 4760: 0x5636, + 4761: 0x5632, + 4762: 0x5638, + 4763: 0x566B, + 4764: 0x5664, + 4765: 0x562F, + 4766: 0x566C, + 4767: 0x566A, + 4768: 0x5686, + 4769: 0x5680, + 4770: 0x568A, + 4771: 0x56A0, + 4772: 0x5694, + 4773: 0x568F, + 4774: 0x56A5, + 4775: 0x56AE, + 4776: 0x56B6, + 4777: 0x56B4, + 4778: 0x56C2, + 4779: 0x56BC, + 4780: 0x56C1, + 4781: 0x56C3, + 4782: 0x56C0, + 4783: 0x56C8, + 4784: 0x56CE, + 4785: 0x56D1, + 4786: 0x56D3, + 4787: 0x56D7, + 4788: 0x56EE, + 4789: 0x56F9, + 4790: 0x5700, + 4791: 0x56FF, + 4792: 0x5704, + 4793: 0x5709, + 4794: 0x5708, + 4795: 0x570B, + 4796: 0x570D, + 4797: 0x5713, + 4798: 0x5718, + 4799: 0x5716, + 4800: 0x55C7, + 4801: 0x571C, + 4802: 0x5726, + 4803: 0x5737, + 4804: 0x5738, + 4805: 0x574E, + 4806: 0x573B, + 4807: 0x5740, + 4808: 0x574F, + 4809: 0x5769, + 4810: 0x57C0, + 4811: 0x5788, + 4812: 0x5761, + 4813: 0x577F, + 4814: 0x5789, + 4815: 0x5793, + 4816: 0x57A0, + 4817: 0x57B3, + 4818: 0x57A4, + 4819: 0x57AA, + 4820: 0x57B0, + 4821: 0x57C3, + 4822: 0x57C6, + 4823: 0x57D4, + 4824: 0x57D2, + 4825: 0x57D3, + 4826: 0x580A, + 4827: 0x57D6, + 4828: 0x57E3, + 4829: 0x580B, + 4830: 0x5819, + 4831: 0x581D, + 4832: 0x5872, + 4833: 0x5821, + 4834: 0x5862, + 4835: 0x584B, + 4836: 0x5870, + 4837: 0x6BC0, + 4838: 0x5852, + 4839: 0x583D, + 4840: 0x5879, + 4841: 0x5885, + 4842: 0x58B9, + 4843: 0x589F, + 4844: 0x58AB, + 4845: 0x58BA, + 4846: 0x58DE, + 4847: 0x58BB, + 4848: 0x58B8, + 4849: 0x58AE, + 4850: 0x58C5, + 4851: 0x58D3, + 4852: 0x58D1, + 4853: 0x58D7, + 4854: 0x58D9, + 4855: 0x58D8, + 4856: 0x58E5, + 4857: 0x58DC, + 4858: 0x58E4, + 4859: 0x58DF, + 4860: 0x58EF, + 4861: 0x58FA, + 4862: 0x58F9, + 4863: 0x58FB, + 4864: 0x58FC, + 4865: 0x58FD, + 4866: 0x5902, + 4867: 0x590A, + 4868: 0x5910, + 4869: 0x591B, + 4870: 0x68A6, + 4871: 0x5925, + 4872: 0x592C, + 4873: 0x592D, + 4874: 0x5932, + 4875: 0x5938, + 4876: 0x593E, + 4877: 0x7AD2, + 4878: 0x5955, + 4879: 0x5950, + 4880: 0x594E, + 4881: 0x595A, + 4882: 0x5958, + 4883: 0x5962, + 4884: 0x5960, + 4885: 0x5967, + 4886: 0x596C, + 4887: 0x5969, + 4888: 0x5978, + 4889: 0x5981, + 4890: 0x599D, + 4891: 0x4F5E, + 4892: 0x4FAB, + 4893: 0x59A3, + 4894: 0x59B2, + 4895: 0x59C6, + 4896: 0x59E8, + 4897: 0x59DC, + 4898: 0x598D, + 4899: 0x59D9, + 4900: 0x59DA, + 4901: 0x5A25, + 4902: 0x5A1F, + 4903: 0x5A11, + 4904: 0x5A1C, + 4905: 0x5A09, + 4906: 0x5A1A, + 4907: 0x5A40, + 4908: 0x5A6C, + 4909: 0x5A49, + 4910: 0x5A35, + 4911: 0x5A36, + 4912: 0x5A62, + 4913: 0x5A6A, + 4914: 0x5A9A, + 4915: 0x5ABC, + 4916: 0x5ABE, + 4917: 0x5ACB, + 4918: 0x5AC2, + 4919: 0x5ABD, + 4920: 0x5AE3, + 4921: 0x5AD7, + 4922: 0x5AE6, + 4923: 0x5AE9, + 4924: 0x5AD6, + 4925: 0x5AFA, + 4926: 0x5AFB, + 4927: 0x5B0C, + 4928: 0x5B0B, + 4929: 0x5B16, + 4930: 0x5B32, + 4931: 0x5AD0, + 4932: 0x5B2A, + 4933: 0x5B36, + 4934: 0x5B3E, + 4935: 0x5B43, + 4936: 0x5B45, + 4937: 0x5B40, + 4938: 0x5B51, + 4939: 0x5B55, + 4940: 0x5B5A, + 4941: 0x5B5B, + 4942: 0x5B65, + 4943: 0x5B69, + 4944: 0x5B70, + 4945: 0x5B73, + 4946: 0x5B75, + 4947: 0x5B78, + 4948: 0x6588, + 4949: 0x5B7A, + 4950: 0x5B80, + 4951: 0x5B83, + 4952: 0x5BA6, + 4953: 0x5BB8, + 4954: 0x5BC3, + 4955: 0x5BC7, + 4956: 0x5BC9, + 4957: 0x5BD4, + 4958: 0x5BD0, + 4959: 0x5BE4, + 4960: 0x5BE6, + 4961: 0x5BE2, + 4962: 0x5BDE, + 4963: 0x5BE5, + 4964: 0x5BEB, + 4965: 0x5BF0, + 4966: 0x5BF6, + 4967: 0x5BF3, + 4968: 0x5C05, + 4969: 0x5C07, + 4970: 0x5C08, + 4971: 0x5C0D, + 4972: 0x5C13, + 4973: 0x5C20, + 4974: 0x5C22, + 4975: 0x5C28, + 4976: 0x5C38, + 4977: 0x5C39, + 4978: 0x5C41, + 4979: 0x5C46, + 4980: 0x5C4E, + 4981: 0x5C53, + 4982: 0x5C50, + 4983: 0x5C4F, + 4984: 0x5B71, + 4985: 0x5C6C, + 4986: 0x5C6E, + 4987: 0x4E62, + 4988: 0x5C76, + 4989: 0x5C79, + 4990: 0x5C8C, + 4991: 0x5C91, + 4992: 0x5C94, + 4993: 0x599B, + 4994: 0x5CAB, + 4995: 0x5CBB, + 4996: 0x5CB6, + 4997: 0x5CBC, + 4998: 0x5CB7, + 4999: 0x5CC5, + 5000: 0x5CBE, + 5001: 0x5CC7, + 5002: 0x5CD9, + 5003: 0x5CE9, + 5004: 0x5CFD, + 5005: 0x5CFA, + 5006: 0x5CED, + 5007: 0x5D8C, + 5008: 0x5CEA, + 5009: 0x5D0B, + 5010: 0x5D15, + 5011: 0x5D17, + 5012: 0x5D5C, + 5013: 0x5D1F, + 5014: 0x5D1B, + 5015: 0x5D11, + 5016: 0x5D14, + 5017: 0x5D22, + 5018: 0x5D1A, + 5019: 0x5D19, + 5020: 0x5D18, + 5021: 0x5D4C, + 5022: 0x5D52, + 5023: 0x5D4E, + 5024: 0x5D4B, + 5025: 0x5D6C, + 5026: 0x5D73, + 5027: 0x5D76, + 5028: 0x5D87, + 5029: 0x5D84, + 5030: 0x5D82, + 5031: 0x5DA2, + 5032: 0x5D9D, + 5033: 0x5DAC, + 5034: 0x5DAE, + 5035: 0x5DBD, + 5036: 0x5D90, + 5037: 0x5DB7, + 5038: 0x5DBC, + 5039: 0x5DC9, + 5040: 0x5DCD, + 5041: 0x5DD3, + 5042: 0x5DD2, + 5043: 0x5DD6, + 5044: 0x5DDB, + 5045: 0x5DEB, + 5046: 0x5DF2, + 5047: 0x5DF5, + 5048: 0x5E0B, + 5049: 0x5E1A, + 5050: 0x5E19, + 5051: 0x5E11, + 5052: 0x5E1B, + 5053: 0x5E36, + 5054: 0x5E37, + 5055: 0x5E44, + 5056: 0x5E43, + 5057: 0x5E40, + 5058: 0x5E4E, + 5059: 0x5E57, + 5060: 0x5E54, + 5061: 0x5E5F, + 5062: 0x5E62, + 5063: 0x5E64, + 5064: 0x5E47, + 5065: 0x5E75, + 5066: 0x5E76, + 5067: 0x5E7A, + 5068: 0x9EBC, + 5069: 0x5E7F, + 5070: 0x5EA0, + 5071: 0x5EC1, + 5072: 0x5EC2, + 5073: 0x5EC8, + 5074: 0x5ED0, + 5075: 0x5ECF, + 5076: 0x5ED6, + 5077: 0x5EE3, + 5078: 0x5EDD, + 5079: 0x5EDA, + 5080: 0x5EDB, + 5081: 0x5EE2, + 5082: 0x5EE1, + 5083: 0x5EE8, + 5084: 0x5EE9, + 5085: 0x5EEC, + 5086: 0x5EF1, + 5087: 0x5EF3, + 5088: 0x5EF0, + 5089: 0x5EF4, + 5090: 0x5EF8, + 5091: 0x5EFE, + 5092: 0x5F03, + 5093: 0x5F09, + 5094: 0x5F5D, + 5095: 0x5F5C, + 5096: 0x5F0B, + 5097: 0x5F11, + 5098: 0x5F16, + 5099: 0x5F29, + 5100: 0x5F2D, + 5101: 0x5F38, + 5102: 0x5F41, + 5103: 0x5F48, + 5104: 0x5F4C, + 5105: 0x5F4E, + 5106: 0x5F2F, + 5107: 0x5F51, + 5108: 0x5F56, + 5109: 0x5F57, + 5110: 0x5F59, + 5111: 0x5F61, + 5112: 0x5F6D, + 5113: 0x5F73, + 5114: 0x5F77, + 5115: 0x5F83, + 5116: 0x5F82, + 5117: 0x5F7F, + 5118: 0x5F8A, + 5119: 0x5F88, + 5120: 0x5F91, + 5121: 0x5F87, + 5122: 0x5F9E, + 5123: 0x5F99, + 5124: 0x5F98, + 5125: 0x5FA0, + 5126: 0x5FA8, + 5127: 0x5FAD, + 5128: 0x5FBC, + 5129: 0x5FD6, + 5130: 0x5FFB, + 5131: 0x5FE4, + 5132: 0x5FF8, + 5133: 0x5FF1, + 5134: 0x5FDD, + 5135: 0x60B3, + 5136: 0x5FFF, + 5137: 0x6021, + 5138: 0x6060, + 5139: 0x6019, + 5140: 0x6010, + 5141: 0x6029, + 5142: 0x600E, + 5143: 0x6031, + 5144: 0x601B, + 5145: 0x6015, + 5146: 0x602B, + 5147: 0x6026, + 5148: 0x600F, + 5149: 0x603A, + 5150: 0x605A, + 5151: 0x6041, + 5152: 0x606A, + 5153: 0x6077, + 5154: 0x605F, + 5155: 0x604A, + 5156: 0x6046, + 5157: 0x604D, + 5158: 0x6063, + 5159: 0x6043, + 5160: 0x6064, + 5161: 0x6042, + 5162: 0x606C, + 5163: 0x606B, + 5164: 0x6059, + 5165: 0x6081, + 5166: 0x608D, + 5167: 0x60E7, + 5168: 0x6083, + 5169: 0x609A, + 5170: 0x6084, + 5171: 0x609B, + 5172: 0x6096, + 5173: 0x6097, + 5174: 0x6092, + 5175: 0x60A7, + 5176: 0x608B, + 5177: 0x60E1, + 5178: 0x60B8, + 5179: 0x60E0, + 5180: 0x60D3, + 5181: 0x60B4, + 5182: 0x5FF0, + 5183: 0x60BD, + 5184: 0x60C6, + 5185: 0x60B5, + 5186: 0x60D8, + 5187: 0x614D, + 5188: 0x6115, + 5189: 0x6106, + 5190: 0x60F6, + 5191: 0x60F7, + 5192: 0x6100, + 5193: 0x60F4, + 5194: 0x60FA, + 5195: 0x6103, + 5196: 0x6121, + 5197: 0x60FB, + 5198: 0x60F1, + 5199: 0x610D, + 5200: 0x610E, + 5201: 0x6147, + 5202: 0x613E, + 5203: 0x6128, + 5204: 0x6127, + 5205: 0x614A, + 5206: 0x613F, + 5207: 0x613C, + 5208: 0x612C, + 5209: 0x6134, + 5210: 0x613D, + 5211: 0x6142, + 5212: 0x6144, + 5213: 0x6173, + 5214: 0x6177, + 5215: 0x6158, + 5216: 0x6159, + 5217: 0x615A, + 5218: 0x616B, + 5219: 0x6174, + 5220: 0x616F, + 5221: 0x6165, + 5222: 0x6171, + 5223: 0x615F, + 5224: 0x615D, + 5225: 0x6153, + 5226: 0x6175, + 5227: 0x6199, + 5228: 0x6196, + 5229: 0x6187, + 5230: 0x61AC, + 5231: 0x6194, + 5232: 0x619A, + 5233: 0x618A, + 5234: 0x6191, + 5235: 0x61AB, + 5236: 0x61AE, + 5237: 0x61CC, + 5238: 0x61CA, + 5239: 0x61C9, + 5240: 0x61F7, + 5241: 0x61C8, + 5242: 0x61C3, + 5243: 0x61C6, + 5244: 0x61BA, + 5245: 0x61CB, + 5246: 0x7F79, + 5247: 0x61CD, + 5248: 0x61E6, + 5249: 0x61E3, + 5250: 0x61F6, + 5251: 0x61FA, + 5252: 0x61F4, + 5253: 0x61FF, + 5254: 0x61FD, + 5255: 0x61FC, + 5256: 0x61FE, + 5257: 0x6200, + 5258: 0x6208, + 5259: 0x6209, + 5260: 0x620D, + 5261: 0x620C, + 5262: 0x6214, + 5263: 0x621B, + 5264: 0x621E, + 5265: 0x6221, + 5266: 0x622A, + 5267: 0x622E, + 5268: 0x6230, + 5269: 0x6232, + 5270: 0x6233, + 5271: 0x6241, + 5272: 0x624E, + 5273: 0x625E, + 5274: 0x6263, + 5275: 0x625B, + 5276: 0x6260, + 5277: 0x6268, + 5278: 0x627C, + 5279: 0x6282, + 5280: 0x6289, + 5281: 0x627E, + 5282: 0x6292, + 5283: 0x6293, + 5284: 0x6296, + 5285: 0x62D4, + 5286: 0x6283, + 5287: 0x6294, + 5288: 0x62D7, + 5289: 0x62D1, + 5290: 0x62BB, + 5291: 0x62CF, + 5292: 0x62FF, + 5293: 0x62C6, + 5294: 0x64D4, + 5295: 0x62C8, + 5296: 0x62DC, + 5297: 0x62CC, + 5298: 0x62CA, + 5299: 0x62C2, + 5300: 0x62C7, + 5301: 0x629B, + 5302: 0x62C9, + 5303: 0x630C, + 5304: 0x62EE, + 5305: 0x62F1, + 5306: 0x6327, + 5307: 0x6302, + 5308: 0x6308, + 5309: 0x62EF, + 5310: 0x62F5, + 5311: 0x6350, + 5312: 0x633E, + 5313: 0x634D, + 5314: 0x641C, + 5315: 0x634F, + 5316: 0x6396, + 5317: 0x638E, + 5318: 0x6380, + 5319: 0x63AB, + 5320: 0x6376, + 5321: 0x63A3, + 5322: 0x638F, + 5323: 0x6389, + 5324: 0x639F, + 5325: 0x63B5, + 5326: 0x636B, + 5327: 0x6369, + 5328: 0x63BE, + 5329: 0x63E9, + 5330: 0x63C0, + 5331: 0x63C6, + 5332: 0x63E3, + 5333: 0x63C9, + 5334: 0x63D2, + 5335: 0x63F6, + 5336: 0x63C4, + 5337: 0x6416, + 5338: 0x6434, + 5339: 0x6406, + 5340: 0x6413, + 5341: 0x6426, + 5342: 0x6436, + 5343: 0x651D, + 5344: 0x6417, + 5345: 0x6428, + 5346: 0x640F, + 5347: 0x6467, + 5348: 0x646F, + 5349: 0x6476, + 5350: 0x644E, + 5351: 0x652A, + 5352: 0x6495, + 5353: 0x6493, + 5354: 0x64A5, + 5355: 0x64A9, + 5356: 0x6488, + 5357: 0x64BC, + 5358: 0x64DA, + 5359: 0x64D2, + 5360: 0x64C5, + 5361: 0x64C7, + 5362: 0x64BB, + 5363: 0x64D8, + 5364: 0x64C2, + 5365: 0x64F1, + 5366: 0x64E7, + 5367: 0x8209, + 5368: 0x64E0, + 5369: 0x64E1, + 5370: 0x62AC, + 5371: 0x64E3, + 5372: 0x64EF, + 5373: 0x652C, + 5374: 0x64F6, + 5375: 0x64F4, + 5376: 0x64F2, + 5377: 0x64FA, + 5378: 0x6500, + 5379: 0x64FD, + 5380: 0x6518, + 5381: 0x651C, + 5382: 0x6505, + 5383: 0x6524, + 5384: 0x6523, + 5385: 0x652B, + 5386: 0x6534, + 5387: 0x6535, + 5388: 0x6537, + 5389: 0x6536, + 5390: 0x6538, + 5391: 0x754B, + 5392: 0x6548, + 5393: 0x6556, + 5394: 0x6555, + 5395: 0x654D, + 5396: 0x6558, + 5397: 0x655E, + 5398: 0x655D, + 5399: 0x6572, + 5400: 0x6578, + 5401: 0x6582, + 5402: 0x6583, + 5403: 0x8B8A, + 5404: 0x659B, + 5405: 0x659F, + 5406: 0x65AB, + 5407: 0x65B7, + 5408: 0x65C3, + 5409: 0x65C6, + 5410: 0x65C1, + 5411: 0x65C4, + 5412: 0x65CC, + 5413: 0x65D2, + 5414: 0x65DB, + 5415: 0x65D9, + 5416: 0x65E0, + 5417: 0x65E1, + 5418: 0x65F1, + 5419: 0x6772, + 5420: 0x660A, + 5421: 0x6603, + 5422: 0x65FB, + 5423: 0x6773, + 5424: 0x6635, + 5425: 0x6636, + 5426: 0x6634, + 5427: 0x661C, + 5428: 0x664F, + 5429: 0x6644, + 5430: 0x6649, + 5431: 0x6641, + 5432: 0x665E, + 5433: 0x665D, + 5434: 0x6664, + 5435: 0x6667, + 5436: 0x6668, + 5437: 0x665F, + 5438: 0x6662, + 5439: 0x6670, + 5440: 0x6683, + 5441: 0x6688, + 5442: 0x668E, + 5443: 0x6689, + 5444: 0x6684, + 5445: 0x6698, + 5446: 0x669D, + 5447: 0x66C1, + 5448: 0x66B9, + 5449: 0x66C9, + 5450: 0x66BE, + 5451: 0x66BC, + 5452: 0x66C4, + 5453: 0x66B8, + 5454: 0x66D6, + 5455: 0x66DA, + 5456: 0x66E0, + 5457: 0x663F, + 5458: 0x66E6, + 5459: 0x66E9, + 5460: 0x66F0, + 5461: 0x66F5, + 5462: 0x66F7, + 5463: 0x670F, + 5464: 0x6716, + 5465: 0x671E, + 5466: 0x6726, + 5467: 0x6727, + 5468: 0x9738, + 5469: 0x672E, + 5470: 0x673F, + 5471: 0x6736, + 5472: 0x6741, + 5473: 0x6738, + 5474: 0x6737, + 5475: 0x6746, + 5476: 0x675E, + 5477: 0x6760, + 5478: 0x6759, + 5479: 0x6763, + 5480: 0x6764, + 5481: 0x6789, + 5482: 0x6770, + 5483: 0x67A9, + 5484: 0x677C, + 5485: 0x676A, + 5486: 0x678C, + 5487: 0x678B, + 5488: 0x67A6, + 5489: 0x67A1, + 5490: 0x6785, + 5491: 0x67B7, + 5492: 0x67EF, + 5493: 0x67B4, + 5494: 0x67EC, + 5495: 0x67B3, + 5496: 0x67E9, + 5497: 0x67B8, + 5498: 0x67E4, + 5499: 0x67DE, + 5500: 0x67DD, + 5501: 0x67E2, + 5502: 0x67EE, + 5503: 0x67B9, + 5504: 0x67CE, + 5505: 0x67C6, + 5506: 0x67E7, + 5507: 0x6A9C, + 5508: 0x681E, + 5509: 0x6846, + 5510: 0x6829, + 5511: 0x6840, + 5512: 0x684D, + 5513: 0x6832, + 5514: 0x684E, + 5515: 0x68B3, + 5516: 0x682B, + 5517: 0x6859, + 5518: 0x6863, + 5519: 0x6877, + 5520: 0x687F, + 5521: 0x689F, + 5522: 0x688F, + 5523: 0x68AD, + 5524: 0x6894, + 5525: 0x689D, + 5526: 0x689B, + 5527: 0x6883, + 5528: 0x6AAE, + 5529: 0x68B9, + 5530: 0x6874, + 5531: 0x68B5, + 5532: 0x68A0, + 5533: 0x68BA, + 5534: 0x690F, + 5535: 0x688D, + 5536: 0x687E, + 5537: 0x6901, + 5538: 0x68CA, + 5539: 0x6908, + 5540: 0x68D8, + 5541: 0x6922, + 5542: 0x6926, + 5543: 0x68E1, + 5544: 0x690C, + 5545: 0x68CD, + 5546: 0x68D4, + 5547: 0x68E7, + 5548: 0x68D5, + 5549: 0x6936, + 5550: 0x6912, + 5551: 0x6904, + 5552: 0x68D7, + 5553: 0x68E3, + 5554: 0x6925, + 5555: 0x68F9, + 5556: 0x68E0, + 5557: 0x68EF, + 5558: 0x6928, + 5559: 0x692A, + 5560: 0x691A, + 5561: 0x6923, + 5562: 0x6921, + 5563: 0x68C6, + 5564: 0x6979, + 5565: 0x6977, + 5566: 0x695C, + 5567: 0x6978, + 5568: 0x696B, + 5569: 0x6954, + 5570: 0x697E, + 5571: 0x696E, + 5572: 0x6939, + 5573: 0x6974, + 5574: 0x693D, + 5575: 0x6959, + 5576: 0x6930, + 5577: 0x6961, + 5578: 0x695E, + 5579: 0x695D, + 5580: 0x6981, + 5581: 0x696A, + 5582: 0x69B2, + 5583: 0x69AE, + 5584: 0x69D0, + 5585: 0x69BF, + 5586: 0x69C1, + 5587: 0x69D3, + 5588: 0x69BE, + 5589: 0x69CE, + 5590: 0x5BE8, + 5591: 0x69CA, + 5592: 0x69DD, + 5593: 0x69BB, + 5594: 0x69C3, + 5595: 0x69A7, + 5596: 0x6A2E, + 5597: 0x6991, + 5598: 0x69A0, + 5599: 0x699C, + 5600: 0x6995, + 5601: 0x69B4, + 5602: 0x69DE, + 5603: 0x69E8, + 5604: 0x6A02, + 5605: 0x6A1B, + 5606: 0x69FF, + 5607: 0x6B0A, + 5608: 0x69F9, + 5609: 0x69F2, + 5610: 0x69E7, + 5611: 0x6A05, + 5612: 0x69B1, + 5613: 0x6A1E, + 5614: 0x69ED, + 5615: 0x6A14, + 5616: 0x69EB, + 5617: 0x6A0A, + 5618: 0x6A12, + 5619: 0x6AC1, + 5620: 0x6A23, + 5621: 0x6A13, + 5622: 0x6A44, + 5623: 0x6A0C, + 5624: 0x6A72, + 5625: 0x6A36, + 5626: 0x6A78, + 5627: 0x6A47, + 5628: 0x6A62, + 5629: 0x6A59, + 5630: 0x6A66, + 5631: 0x6A48, + 5632: 0x6A38, + 5633: 0x6A22, + 5634: 0x6A90, + 5635: 0x6A8D, + 5636: 0x6AA0, + 5637: 0x6A84, + 5638: 0x6AA2, + 5639: 0x6AA3, + 5640: 0x6A97, + 5641: 0x8617, + 5642: 0x6ABB, + 5643: 0x6AC3, + 5644: 0x6AC2, + 5645: 0x6AB8, + 5646: 0x6AB3, + 5647: 0x6AAC, + 5648: 0x6ADE, + 5649: 0x6AD1, + 5650: 0x6ADF, + 5651: 0x6AAA, + 5652: 0x6ADA, + 5653: 0x6AEA, + 5654: 0x6AFB, + 5655: 0x6B05, + 5656: 0x8616, + 5657: 0x6AFA, + 5658: 0x6B12, + 5659: 0x6B16, + 5660: 0x9B31, + 5661: 0x6B1F, + 5662: 0x6B38, + 5663: 0x6B37, + 5664: 0x76DC, + 5665: 0x6B39, + 5666: 0x98EE, + 5667: 0x6B47, + 5668: 0x6B43, + 5669: 0x6B49, + 5670: 0x6B50, + 5671: 0x6B59, + 5672: 0x6B54, + 5673: 0x6B5B, + 5674: 0x6B5F, + 5675: 0x6B61, + 5676: 0x6B78, + 5677: 0x6B79, + 5678: 0x6B7F, + 5679: 0x6B80, + 5680: 0x6B84, + 5681: 0x6B83, + 5682: 0x6B8D, + 5683: 0x6B98, + 5684: 0x6B95, + 5685: 0x6B9E, + 5686: 0x6BA4, + 5687: 0x6BAA, + 5688: 0x6BAB, + 5689: 0x6BAF, + 5690: 0x6BB2, + 5691: 0x6BB1, + 5692: 0x6BB3, + 5693: 0x6BB7, + 5694: 0x6BBC, + 5695: 0x6BC6, + 5696: 0x6BCB, + 5697: 0x6BD3, + 5698: 0x6BDF, + 5699: 0x6BEC, + 5700: 0x6BEB, + 5701: 0x6BF3, + 5702: 0x6BEF, + 5703: 0x9EBE, + 5704: 0x6C08, + 5705: 0x6C13, + 5706: 0x6C14, + 5707: 0x6C1B, + 5708: 0x6C24, + 5709: 0x6C23, + 5710: 0x6C5E, + 5711: 0x6C55, + 5712: 0x6C62, + 5713: 0x6C6A, + 5714: 0x6C82, + 5715: 0x6C8D, + 5716: 0x6C9A, + 5717: 0x6C81, + 5718: 0x6C9B, + 5719: 0x6C7E, + 5720: 0x6C68, + 5721: 0x6C73, + 5722: 0x6C92, + 5723: 0x6C90, + 5724: 0x6CC4, + 5725: 0x6CF1, + 5726: 0x6CD3, + 5727: 0x6CBD, + 5728: 0x6CD7, + 5729: 0x6CC5, + 5730: 0x6CDD, + 5731: 0x6CAE, + 5732: 0x6CB1, + 5733: 0x6CBE, + 5734: 0x6CBA, + 5735: 0x6CDB, + 5736: 0x6CEF, + 5737: 0x6CD9, + 5738: 0x6CEA, + 5739: 0x6D1F, + 5740: 0x884D, + 5741: 0x6D36, + 5742: 0x6D2B, + 5743: 0x6D3D, + 5744: 0x6D38, + 5745: 0x6D19, + 5746: 0x6D35, + 5747: 0x6D33, + 5748: 0x6D12, + 5749: 0x6D0C, + 5750: 0x6D63, + 5751: 0x6D93, + 5752: 0x6D64, + 5753: 0x6D5A, + 5754: 0x6D79, + 5755: 0x6D59, + 5756: 0x6D8E, + 5757: 0x6D95, + 5758: 0x6FE4, + 5759: 0x6D85, + 5760: 0x6DF9, + 5761: 0x6E15, + 5762: 0x6E0A, + 5763: 0x6DB5, + 5764: 0x6DC7, + 5765: 0x6DE6, + 5766: 0x6DB8, + 5767: 0x6DC6, + 5768: 0x6DEC, + 5769: 0x6DDE, + 5770: 0x6DCC, + 5771: 0x6DE8, + 5772: 0x6DD2, + 5773: 0x6DC5, + 5774: 0x6DFA, + 5775: 0x6DD9, + 5776: 0x6DE4, + 5777: 0x6DD5, + 5778: 0x6DEA, + 5779: 0x6DEE, + 5780: 0x6E2D, + 5781: 0x6E6E, + 5782: 0x6E2E, + 5783: 0x6E19, + 5784: 0x6E72, + 5785: 0x6E5F, + 5786: 0x6E3E, + 5787: 0x6E23, + 5788: 0x6E6B, + 5789: 0x6E2B, + 5790: 0x6E76, + 5791: 0x6E4D, + 5792: 0x6E1F, + 5793: 0x6E43, + 5794: 0x6E3A, + 5795: 0x6E4E, + 5796: 0x6E24, + 5797: 0x6EFF, + 5798: 0x6E1D, + 5799: 0x6E38, + 5800: 0x6E82, + 5801: 0x6EAA, + 5802: 0x6E98, + 5803: 0x6EC9, + 5804: 0x6EB7, + 5805: 0x6ED3, + 5806: 0x6EBD, + 5807: 0x6EAF, + 5808: 0x6EC4, + 5809: 0x6EB2, + 5810: 0x6ED4, + 5811: 0x6ED5, + 5812: 0x6E8F, + 5813: 0x6EA5, + 5814: 0x6EC2, + 5815: 0x6E9F, + 5816: 0x6F41, + 5817: 0x6F11, + 5818: 0x704C, + 5819: 0x6EEC, + 5820: 0x6EF8, + 5821: 0x6EFE, + 5822: 0x6F3F, + 5823: 0x6EF2, + 5824: 0x6F31, + 5825: 0x6EEF, + 5826: 0x6F32, + 5827: 0x6ECC, + 5828: 0x6F3E, + 5829: 0x6F13, + 5830: 0x6EF7, + 5831: 0x6F86, + 5832: 0x6F7A, + 5833: 0x6F78, + 5834: 0x6F81, + 5835: 0x6F80, + 5836: 0x6F6F, + 5837: 0x6F5B, + 5838: 0x6FF3, + 5839: 0x6F6D, + 5840: 0x6F82, + 5841: 0x6F7C, + 5842: 0x6F58, + 5843: 0x6F8E, + 5844: 0x6F91, + 5845: 0x6FC2, + 5846: 0x6F66, + 5847: 0x6FB3, + 5848: 0x6FA3, + 5849: 0x6FA1, + 5850: 0x6FA4, + 5851: 0x6FB9, + 5852: 0x6FC6, + 5853: 0x6FAA, + 5854: 0x6FDF, + 5855: 0x6FD5, + 5856: 0x6FEC, + 5857: 0x6FD4, + 5858: 0x6FD8, + 5859: 0x6FF1, + 5860: 0x6FEE, + 5861: 0x6FDB, + 5862: 0x7009, + 5863: 0x700B, + 5864: 0x6FFA, + 5865: 0x7011, + 5866: 0x7001, + 5867: 0x700F, + 5868: 0x6FFE, + 5869: 0x701B, + 5870: 0x701A, + 5871: 0x6F74, + 5872: 0x701D, + 5873: 0x7018, + 5874: 0x701F, + 5875: 0x7030, + 5876: 0x703E, + 5877: 0x7032, + 5878: 0x7051, + 5879: 0x7063, + 5880: 0x7099, + 5881: 0x7092, + 5882: 0x70AF, + 5883: 0x70F1, + 5884: 0x70AC, + 5885: 0x70B8, + 5886: 0x70B3, + 5887: 0x70AE, + 5888: 0x70DF, + 5889: 0x70CB, + 5890: 0x70DD, + 5891: 0x70D9, + 5892: 0x7109, + 5893: 0x70FD, + 5894: 0x711C, + 5895: 0x7119, + 5896: 0x7165, + 5897: 0x7155, + 5898: 0x7188, + 5899: 0x7166, + 5900: 0x7162, + 5901: 0x714C, + 5902: 0x7156, + 5903: 0x716C, + 5904: 0x718F, + 5905: 0x71FB, + 5906: 0x7184, + 5907: 0x7195, + 5908: 0x71A8, + 5909: 0x71AC, + 5910: 0x71D7, + 5911: 0x71B9, + 5912: 0x71BE, + 5913: 0x71D2, + 5914: 0x71C9, + 5915: 0x71D4, + 5916: 0x71CE, + 5917: 0x71E0, + 5918: 0x71EC, + 5919: 0x71E7, + 5920: 0x71F5, + 5921: 0x71FC, + 5922: 0x71F9, + 5923: 0x71FF, + 5924: 0x720D, + 5925: 0x7210, + 5926: 0x721B, + 5927: 0x7228, + 5928: 0x722D, + 5929: 0x722C, + 5930: 0x7230, + 5931: 0x7232, + 5932: 0x723B, + 5933: 0x723C, + 5934: 0x723F, + 5935: 0x7240, + 5936: 0x7246, + 5937: 0x724B, + 5938: 0x7258, + 5939: 0x7274, + 5940: 0x727E, + 5941: 0x7282, + 5942: 0x7281, + 5943: 0x7287, + 5944: 0x7292, + 5945: 0x7296, + 5946: 0x72A2, + 5947: 0x72A7, + 5948: 0x72B9, + 5949: 0x72B2, + 5950: 0x72C3, + 5951: 0x72C6, + 5952: 0x72C4, + 5953: 0x72CE, + 5954: 0x72D2, + 5955: 0x72E2, + 5956: 0x72E0, + 5957: 0x72E1, + 5958: 0x72F9, + 5959: 0x72F7, + 5960: 0x500F, + 5961: 0x7317, + 5962: 0x730A, + 5963: 0x731C, + 5964: 0x7316, + 5965: 0x731D, + 5966: 0x7334, + 5967: 0x732F, + 5968: 0x7329, + 5969: 0x7325, + 5970: 0x733E, + 5971: 0x734E, + 5972: 0x734F, + 5973: 0x9ED8, + 5974: 0x7357, + 5975: 0x736A, + 5976: 0x7368, + 5977: 0x7370, + 5978: 0x7378, + 5979: 0x7375, + 5980: 0x737B, + 5981: 0x737A, + 5982: 0x73C8, + 5983: 0x73B3, + 5984: 0x73CE, + 5985: 0x73BB, + 5986: 0x73C0, + 5987: 0x73E5, + 5988: 0x73EE, + 5989: 0x73DE, + 5990: 0x74A2, + 5991: 0x7405, + 5992: 0x746F, + 5993: 0x7425, + 5994: 0x73F8, + 5995: 0x7432, + 5996: 0x743A, + 5997: 0x7455, + 5998: 0x743F, + 5999: 0x745F, + 6000: 0x7459, + 6001: 0x7441, + 6002: 0x745C, + 6003: 0x7469, + 6004: 0x7470, + 6005: 0x7463, + 6006: 0x746A, + 6007: 0x7476, + 6008: 0x747E, + 6009: 0x748B, + 6010: 0x749E, + 6011: 0x74A7, + 6012: 0x74CA, + 6013: 0x74CF, + 6014: 0x74D4, + 6015: 0x73F1, + 6016: 0x74E0, + 6017: 0x74E3, + 6018: 0x74E7, + 6019: 0x74E9, + 6020: 0x74EE, + 6021: 0x74F2, + 6022: 0x74F0, + 6023: 0x74F1, + 6024: 0x74F8, + 6025: 0x74F7, + 6026: 0x7504, + 6027: 0x7503, + 6028: 0x7505, + 6029: 0x750C, + 6030: 0x750E, + 6031: 0x750D, + 6032: 0x7515, + 6033: 0x7513, + 6034: 0x751E, + 6035: 0x7526, + 6036: 0x752C, + 6037: 0x753C, + 6038: 0x7544, + 6039: 0x754D, + 6040: 0x754A, + 6041: 0x7549, + 6042: 0x755B, + 6043: 0x7546, + 6044: 0x755A, + 6045: 0x7569, + 6046: 0x7564, + 6047: 0x7567, + 6048: 0x756B, + 6049: 0x756D, + 6050: 0x7578, + 6051: 0x7576, + 6052: 0x7586, + 6053: 0x7587, + 6054: 0x7574, + 6055: 0x758A, + 6056: 0x7589, + 6057: 0x7582, + 6058: 0x7594, + 6059: 0x759A, + 6060: 0x759D, + 6061: 0x75A5, + 6062: 0x75A3, + 6063: 0x75C2, + 6064: 0x75B3, + 6065: 0x75C3, + 6066: 0x75B5, + 6067: 0x75BD, + 6068: 0x75B8, + 6069: 0x75BC, + 6070: 0x75B1, + 6071: 0x75CD, + 6072: 0x75CA, + 6073: 0x75D2, + 6074: 0x75D9, + 6075: 0x75E3, + 6076: 0x75DE, + 6077: 0x75FE, + 6078: 0x75FF, + 6079: 0x75FC, + 6080: 0x7601, + 6081: 0x75F0, + 6082: 0x75FA, + 6083: 0x75F2, + 6084: 0x75F3, + 6085: 0x760B, + 6086: 0x760D, + 6087: 0x7609, + 6088: 0x761F, + 6089: 0x7627, + 6090: 0x7620, + 6091: 0x7621, + 6092: 0x7622, + 6093: 0x7624, + 6094: 0x7634, + 6095: 0x7630, + 6096: 0x763B, + 6097: 0x7647, + 6098: 0x7648, + 6099: 0x7646, + 6100: 0x765C, + 6101: 0x7658, + 6102: 0x7661, + 6103: 0x7662, + 6104: 0x7668, + 6105: 0x7669, + 6106: 0x766A, + 6107: 0x7667, + 6108: 0x766C, + 6109: 0x7670, + 6110: 0x7672, + 6111: 0x7676, + 6112: 0x7678, + 6113: 0x767C, + 6114: 0x7680, + 6115: 0x7683, + 6116: 0x7688, + 6117: 0x768B, + 6118: 0x768E, + 6119: 0x7696, + 6120: 0x7693, + 6121: 0x7699, + 6122: 0x769A, + 6123: 0x76B0, + 6124: 0x76B4, + 6125: 0x76B8, + 6126: 0x76B9, + 6127: 0x76BA, + 6128: 0x76C2, + 6129: 0x76CD, + 6130: 0x76D6, + 6131: 0x76D2, + 6132: 0x76DE, + 6133: 0x76E1, + 6134: 0x76E5, + 6135: 0x76E7, + 6136: 0x76EA, + 6137: 0x862F, + 6138: 0x76FB, + 6139: 0x7708, + 6140: 0x7707, + 6141: 0x7704, + 6142: 0x7729, + 6143: 0x7724, + 6144: 0x771E, + 6145: 0x7725, + 6146: 0x7726, + 6147: 0x771B, + 6148: 0x7737, + 6149: 0x7738, + 6150: 0x7747, + 6151: 0x775A, + 6152: 0x7768, + 6153: 0x776B, + 6154: 0x775B, + 6155: 0x7765, + 6156: 0x777F, + 6157: 0x777E, + 6158: 0x7779, + 6159: 0x778E, + 6160: 0x778B, + 6161: 0x7791, + 6162: 0x77A0, + 6163: 0x779E, + 6164: 0x77B0, + 6165: 0x77B6, + 6166: 0x77B9, + 6167: 0x77BF, + 6168: 0x77BC, + 6169: 0x77BD, + 6170: 0x77BB, + 6171: 0x77C7, + 6172: 0x77CD, + 6173: 0x77D7, + 6174: 0x77DA, + 6175: 0x77DC, + 6176: 0x77E3, + 6177: 0x77EE, + 6178: 0x77FC, + 6179: 0x780C, + 6180: 0x7812, + 6181: 0x7926, + 6182: 0x7820, + 6183: 0x792A, + 6184: 0x7845, + 6185: 0x788E, + 6186: 0x7874, + 6187: 0x7886, + 6188: 0x787C, + 6189: 0x789A, + 6190: 0x788C, + 6191: 0x78A3, + 6192: 0x78B5, + 6193: 0x78AA, + 6194: 0x78AF, + 6195: 0x78D1, + 6196: 0x78C6, + 6197: 0x78CB, + 6198: 0x78D4, + 6199: 0x78BE, + 6200: 0x78BC, + 6201: 0x78C5, + 6202: 0x78CA, + 6203: 0x78EC, + 6204: 0x78E7, + 6205: 0x78DA, + 6206: 0x78FD, + 6207: 0x78F4, + 6208: 0x7907, + 6209: 0x7912, + 6210: 0x7911, + 6211: 0x7919, + 6212: 0x792C, + 6213: 0x792B, + 6214: 0x7940, + 6215: 0x7960, + 6216: 0x7957, + 6217: 0x795F, + 6218: 0x795A, + 6219: 0x7955, + 6220: 0x7953, + 6221: 0x797A, + 6222: 0x797F, + 6223: 0x798A, + 6224: 0x799D, + 6225: 0x79A7, + 6226: 0x9F4B, + 6227: 0x79AA, + 6228: 0x79AE, + 6229: 0x79B3, + 6230: 0x79B9, + 6231: 0x79BA, + 6232: 0x79C9, + 6233: 0x79D5, + 6234: 0x79E7, + 6235: 0x79EC, + 6236: 0x79E1, + 6237: 0x79E3, + 6238: 0x7A08, + 6239: 0x7A0D, + 6240: 0x7A18, + 6241: 0x7A19, + 6242: 0x7A20, + 6243: 0x7A1F, + 6244: 0x7980, + 6245: 0x7A31, + 6246: 0x7A3B, + 6247: 0x7A3E, + 6248: 0x7A37, + 6249: 0x7A43, + 6250: 0x7A57, + 6251: 0x7A49, + 6252: 0x7A61, + 6253: 0x7A62, + 6254: 0x7A69, + 6255: 0x9F9D, + 6256: 0x7A70, + 6257: 0x7A79, + 6258: 0x7A7D, + 6259: 0x7A88, + 6260: 0x7A97, + 6261: 0x7A95, + 6262: 0x7A98, + 6263: 0x7A96, + 6264: 0x7AA9, + 6265: 0x7AC8, + 6266: 0x7AB0, + 6267: 0x7AB6, + 6268: 0x7AC5, + 6269: 0x7AC4, + 6270: 0x7ABF, + 6271: 0x9083, + 6272: 0x7AC7, + 6273: 0x7ACA, + 6274: 0x7ACD, + 6275: 0x7ACF, + 6276: 0x7AD5, + 6277: 0x7AD3, + 6278: 0x7AD9, + 6279: 0x7ADA, + 6280: 0x7ADD, + 6281: 0x7AE1, + 6282: 0x7AE2, + 6283: 0x7AE6, + 6284: 0x7AED, + 6285: 0x7AF0, + 6286: 0x7B02, + 6287: 0x7B0F, + 6288: 0x7B0A, + 6289: 0x7B06, + 6290: 0x7B33, + 6291: 0x7B18, + 6292: 0x7B19, + 6293: 0x7B1E, + 6294: 0x7B35, + 6295: 0x7B28, + 6296: 0x7B36, + 6297: 0x7B50, + 6298: 0x7B7A, + 6299: 0x7B04, + 6300: 0x7B4D, + 6301: 0x7B0B, + 6302: 0x7B4C, + 6303: 0x7B45, + 6304: 0x7B75, + 6305: 0x7B65, + 6306: 0x7B74, + 6307: 0x7B67, + 6308: 0x7B70, + 6309: 0x7B71, + 6310: 0x7B6C, + 6311: 0x7B6E, + 6312: 0x7B9D, + 6313: 0x7B98, + 6314: 0x7B9F, + 6315: 0x7B8D, + 6316: 0x7B9C, + 6317: 0x7B9A, + 6318: 0x7B8B, + 6319: 0x7B92, + 6320: 0x7B8F, + 6321: 0x7B5D, + 6322: 0x7B99, + 6323: 0x7BCB, + 6324: 0x7BC1, + 6325: 0x7BCC, + 6326: 0x7BCF, + 6327: 0x7BB4, + 6328: 0x7BC6, + 6329: 0x7BDD, + 6330: 0x7BE9, + 6331: 0x7C11, + 6332: 0x7C14, + 6333: 0x7BE6, + 6334: 0x7BE5, + 6335: 0x7C60, + 6336: 0x7C00, + 6337: 0x7C07, + 6338: 0x7C13, + 6339: 0x7BF3, + 6340: 0x7BF7, + 6341: 0x7C17, + 6342: 0x7C0D, + 6343: 0x7BF6, + 6344: 0x7C23, + 6345: 0x7C27, + 6346: 0x7C2A, + 6347: 0x7C1F, + 6348: 0x7C37, + 6349: 0x7C2B, + 6350: 0x7C3D, + 6351: 0x7C4C, + 6352: 0x7C43, + 6353: 0x7C54, + 6354: 0x7C4F, + 6355: 0x7C40, + 6356: 0x7C50, + 6357: 0x7C58, + 6358: 0x7C5F, + 6359: 0x7C64, + 6360: 0x7C56, + 6361: 0x7C65, + 6362: 0x7C6C, + 6363: 0x7C75, + 6364: 0x7C83, + 6365: 0x7C90, + 6366: 0x7CA4, + 6367: 0x7CAD, + 6368: 0x7CA2, + 6369: 0x7CAB, + 6370: 0x7CA1, + 6371: 0x7CA8, + 6372: 0x7CB3, + 6373: 0x7CB2, + 6374: 0x7CB1, + 6375: 0x7CAE, + 6376: 0x7CB9, + 6377: 0x7CBD, + 6378: 0x7CC0, + 6379: 0x7CC5, + 6380: 0x7CC2, + 6381: 0x7CD8, + 6382: 0x7CD2, + 6383: 0x7CDC, + 6384: 0x7CE2, + 6385: 0x9B3B, + 6386: 0x7CEF, + 6387: 0x7CF2, + 6388: 0x7CF4, + 6389: 0x7CF6, + 6390: 0x7CFA, + 6391: 0x7D06, + 6392: 0x7D02, + 6393: 0x7D1C, + 6394: 0x7D15, + 6395: 0x7D0A, + 6396: 0x7D45, + 6397: 0x7D4B, + 6398: 0x7D2E, + 6399: 0x7D32, + 6400: 0x7D3F, + 6401: 0x7D35, + 6402: 0x7D46, + 6403: 0x7D73, + 6404: 0x7D56, + 6405: 0x7D4E, + 6406: 0x7D72, + 6407: 0x7D68, + 6408: 0x7D6E, + 6409: 0x7D4F, + 6410: 0x7D63, + 6411: 0x7D93, + 6412: 0x7D89, + 6413: 0x7D5B, + 6414: 0x7D8F, + 6415: 0x7D7D, + 6416: 0x7D9B, + 6417: 0x7DBA, + 6418: 0x7DAE, + 6419: 0x7DA3, + 6420: 0x7DB5, + 6421: 0x7DC7, + 6422: 0x7DBD, + 6423: 0x7DAB, + 6424: 0x7E3D, + 6425: 0x7DA2, + 6426: 0x7DAF, + 6427: 0x7DDC, + 6428: 0x7DB8, + 6429: 0x7D9F, + 6430: 0x7DB0, + 6431: 0x7DD8, + 6432: 0x7DDD, + 6433: 0x7DE4, + 6434: 0x7DDE, + 6435: 0x7DFB, + 6436: 0x7DF2, + 6437: 0x7DE1, + 6438: 0x7E05, + 6439: 0x7E0A, + 6440: 0x7E23, + 6441: 0x7E21, + 6442: 0x7E12, + 6443: 0x7E31, + 6444: 0x7E1F, + 6445: 0x7E09, + 6446: 0x7E0B, + 6447: 0x7E22, + 6448: 0x7E46, + 6449: 0x7E66, + 6450: 0x7E3B, + 6451: 0x7E35, + 6452: 0x7E39, + 6453: 0x7E43, + 6454: 0x7E37, + 6455: 0x7E32, + 6456: 0x7E3A, + 6457: 0x7E67, + 6458: 0x7E5D, + 6459: 0x7E56, + 6460: 0x7E5E, + 6461: 0x7E59, + 6462: 0x7E5A, + 6463: 0x7E79, + 6464: 0x7E6A, + 6465: 0x7E69, + 6466: 0x7E7C, + 6467: 0x7E7B, + 6468: 0x7E83, + 6469: 0x7DD5, + 6470: 0x7E7D, + 6471: 0x8FAE, + 6472: 0x7E7F, + 6473: 0x7E88, + 6474: 0x7E89, + 6475: 0x7E8C, + 6476: 0x7E92, + 6477: 0x7E90, + 6478: 0x7E93, + 6479: 0x7E94, + 6480: 0x7E96, + 6481: 0x7E8E, + 6482: 0x7E9B, + 6483: 0x7E9C, + 6484: 0x7F38, + 6485: 0x7F3A, + 6486: 0x7F45, + 6487: 0x7F4C, + 6488: 0x7F4D, + 6489: 0x7F4E, + 6490: 0x7F50, + 6491: 0x7F51, + 6492: 0x7F55, + 6493: 0x7F54, + 6494: 0x7F58, + 6495: 0x7F5F, + 6496: 0x7F60, + 6497: 0x7F68, + 6498: 0x7F69, + 6499: 0x7F67, + 6500: 0x7F78, + 6501: 0x7F82, + 6502: 0x7F86, + 6503: 0x7F83, + 6504: 0x7F88, + 6505: 0x7F87, + 6506: 0x7F8C, + 6507: 0x7F94, + 6508: 0x7F9E, + 6509: 0x7F9D, + 6510: 0x7F9A, + 6511: 0x7FA3, + 6512: 0x7FAF, + 6513: 0x7FB2, + 6514: 0x7FB9, + 6515: 0x7FAE, + 6516: 0x7FB6, + 6517: 0x7FB8, + 6518: 0x8B71, + 6519: 0x7FC5, + 6520: 0x7FC6, + 6521: 0x7FCA, + 6522: 0x7FD5, + 6523: 0x7FD4, + 6524: 0x7FE1, + 6525: 0x7FE6, + 6526: 0x7FE9, + 6527: 0x7FF3, + 6528: 0x7FF9, + 6529: 0x98DC, + 6530: 0x8006, + 6531: 0x8004, + 6532: 0x800B, + 6533: 0x8012, + 6534: 0x8018, + 6535: 0x8019, + 6536: 0x801C, + 6537: 0x8021, + 6538: 0x8028, + 6539: 0x803F, + 6540: 0x803B, + 6541: 0x804A, + 6542: 0x8046, + 6543: 0x8052, + 6544: 0x8058, + 6545: 0x805A, + 6546: 0x805F, + 6547: 0x8062, + 6548: 0x8068, + 6549: 0x8073, + 6550: 0x8072, + 6551: 0x8070, + 6552: 0x8076, + 6553: 0x8079, + 6554: 0x807D, + 6555: 0x807F, + 6556: 0x8084, + 6557: 0x8086, + 6558: 0x8085, + 6559: 0x809B, + 6560: 0x8093, + 6561: 0x809A, + 6562: 0x80AD, + 6563: 0x5190, + 6564: 0x80AC, + 6565: 0x80DB, + 6566: 0x80E5, + 6567: 0x80D9, + 6568: 0x80DD, + 6569: 0x80C4, + 6570: 0x80DA, + 6571: 0x80D6, + 6572: 0x8109, + 6573: 0x80EF, + 6574: 0x80F1, + 6575: 0x811B, + 6576: 0x8129, + 6577: 0x8123, + 6578: 0x812F, + 6579: 0x814B, + 6580: 0x968B, + 6581: 0x8146, + 6582: 0x813E, + 6583: 0x8153, + 6584: 0x8151, + 6585: 0x80FC, + 6586: 0x8171, + 6587: 0x816E, + 6588: 0x8165, + 6589: 0x8166, + 6590: 0x8174, + 6591: 0x8183, + 6592: 0x8188, + 6593: 0x818A, + 6594: 0x8180, + 6595: 0x8182, + 6596: 0x81A0, + 6597: 0x8195, + 6598: 0x81A4, + 6599: 0x81A3, + 6600: 0x815F, + 6601: 0x8193, + 6602: 0x81A9, + 6603: 0x81B0, + 6604: 0x81B5, + 6605: 0x81BE, + 6606: 0x81B8, + 6607: 0x81BD, + 6608: 0x81C0, + 6609: 0x81C2, + 6610: 0x81BA, + 6611: 0x81C9, + 6612: 0x81CD, + 6613: 0x81D1, + 6614: 0x81D9, + 6615: 0x81D8, + 6616: 0x81C8, + 6617: 0x81DA, + 6618: 0x81DF, + 6619: 0x81E0, + 6620: 0x81E7, + 6621: 0x81FA, + 6622: 0x81FB, + 6623: 0x81FE, + 6624: 0x8201, + 6625: 0x8202, + 6626: 0x8205, + 6627: 0x8207, + 6628: 0x820A, + 6629: 0x820D, + 6630: 0x8210, + 6631: 0x8216, + 6632: 0x8229, + 6633: 0x822B, + 6634: 0x8238, + 6635: 0x8233, + 6636: 0x8240, + 6637: 0x8259, + 6638: 0x8258, + 6639: 0x825D, + 6640: 0x825A, + 6641: 0x825F, + 6642: 0x8264, + 6643: 0x8262, + 6644: 0x8268, + 6645: 0x826A, + 6646: 0x826B, + 6647: 0x822E, + 6648: 0x8271, + 6649: 0x8277, + 6650: 0x8278, + 6651: 0x827E, + 6652: 0x828D, + 6653: 0x8292, + 6654: 0x82AB, + 6655: 0x829F, + 6656: 0x82BB, + 6657: 0x82AC, + 6658: 0x82E1, + 6659: 0x82E3, + 6660: 0x82DF, + 6661: 0x82D2, + 6662: 0x82F4, + 6663: 0x82F3, + 6664: 0x82FA, + 6665: 0x8393, + 6666: 0x8303, + 6667: 0x82FB, + 6668: 0x82F9, + 6669: 0x82DE, + 6670: 0x8306, + 6671: 0x82DC, + 6672: 0x8309, + 6673: 0x82D9, + 6674: 0x8335, + 6675: 0x8334, + 6676: 0x8316, + 6677: 0x8332, + 6678: 0x8331, + 6679: 0x8340, + 6680: 0x8339, + 6681: 0x8350, + 6682: 0x8345, + 6683: 0x832F, + 6684: 0x832B, + 6685: 0x8317, + 6686: 0x8318, + 6687: 0x8385, + 6688: 0x839A, + 6689: 0x83AA, + 6690: 0x839F, + 6691: 0x83A2, + 6692: 0x8396, + 6693: 0x8323, + 6694: 0x838E, + 6695: 0x8387, + 6696: 0x838A, + 6697: 0x837C, + 6698: 0x83B5, + 6699: 0x8373, + 6700: 0x8375, + 6701: 0x83A0, + 6702: 0x8389, + 6703: 0x83A8, + 6704: 0x83F4, + 6705: 0x8413, + 6706: 0x83EB, + 6707: 0x83CE, + 6708: 0x83FD, + 6709: 0x8403, + 6710: 0x83D8, + 6711: 0x840B, + 6712: 0x83C1, + 6713: 0x83F7, + 6714: 0x8407, + 6715: 0x83E0, + 6716: 0x83F2, + 6717: 0x840D, + 6718: 0x8422, + 6719: 0x8420, + 6720: 0x83BD, + 6721: 0x8438, + 6722: 0x8506, + 6723: 0x83FB, + 6724: 0x846D, + 6725: 0x842A, + 6726: 0x843C, + 6727: 0x855A, + 6728: 0x8484, + 6729: 0x8477, + 6730: 0x846B, + 6731: 0x84AD, + 6732: 0x846E, + 6733: 0x8482, + 6734: 0x8469, + 6735: 0x8446, + 6736: 0x842C, + 6737: 0x846F, + 6738: 0x8479, + 6739: 0x8435, + 6740: 0x84CA, + 6741: 0x8462, + 6742: 0x84B9, + 6743: 0x84BF, + 6744: 0x849F, + 6745: 0x84D9, + 6746: 0x84CD, + 6747: 0x84BB, + 6748: 0x84DA, + 6749: 0x84D0, + 6750: 0x84C1, + 6751: 0x84C6, + 6752: 0x84D6, + 6753: 0x84A1, + 6754: 0x8521, + 6755: 0x84FF, + 6756: 0x84F4, + 6757: 0x8517, + 6758: 0x8518, + 6759: 0x852C, + 6760: 0x851F, + 6761: 0x8515, + 6762: 0x8514, + 6763: 0x84FC, + 6764: 0x8540, + 6765: 0x8563, + 6766: 0x8558, + 6767: 0x8548, + 6768: 0x8541, + 6769: 0x8602, + 6770: 0x854B, + 6771: 0x8555, + 6772: 0x8580, + 6773: 0x85A4, + 6774: 0x8588, + 6775: 0x8591, + 6776: 0x858A, + 6777: 0x85A8, + 6778: 0x856D, + 6779: 0x8594, + 6780: 0x859B, + 6781: 0x85EA, + 6782: 0x8587, + 6783: 0x859C, + 6784: 0x8577, + 6785: 0x857E, + 6786: 0x8590, + 6787: 0x85C9, + 6788: 0x85BA, + 6789: 0x85CF, + 6790: 0x85B9, + 6791: 0x85D0, + 6792: 0x85D5, + 6793: 0x85DD, + 6794: 0x85E5, + 6795: 0x85DC, + 6796: 0x85F9, + 6797: 0x860A, + 6798: 0x8613, + 6799: 0x860B, + 6800: 0x85FE, + 6801: 0x85FA, + 6802: 0x8606, + 6803: 0x8622, + 6804: 0x861A, + 6805: 0x8630, + 6806: 0x863F, + 6807: 0x864D, + 6808: 0x4E55, + 6809: 0x8654, + 6810: 0x865F, + 6811: 0x8667, + 6812: 0x8671, + 6813: 0x8693, + 6814: 0x86A3, + 6815: 0x86A9, + 6816: 0x86AA, + 6817: 0x868B, + 6818: 0x868C, + 6819: 0x86B6, + 6820: 0x86AF, + 6821: 0x86C4, + 6822: 0x86C6, + 6823: 0x86B0, + 6824: 0x86C9, + 6825: 0x8823, + 6826: 0x86AB, + 6827: 0x86D4, + 6828: 0x86DE, + 6829: 0x86E9, + 6830: 0x86EC, + 6831: 0x86DF, + 6832: 0x86DB, + 6833: 0x86EF, + 6834: 0x8712, + 6835: 0x8706, + 6836: 0x8708, + 6837: 0x8700, + 6838: 0x8703, + 6839: 0x86FB, + 6840: 0x8711, + 6841: 0x8709, + 6842: 0x870D, + 6843: 0x86F9, + 6844: 0x870A, + 6845: 0x8734, + 6846: 0x873F, + 6847: 0x8737, + 6848: 0x873B, + 6849: 0x8725, + 6850: 0x8729, + 6851: 0x871A, + 6852: 0x8760, + 6853: 0x875F, + 6854: 0x8778, + 6855: 0x874C, + 6856: 0x874E, + 6857: 0x8774, + 6858: 0x8757, + 6859: 0x8768, + 6860: 0x876E, + 6861: 0x8759, + 6862: 0x8753, + 6863: 0x8763, + 6864: 0x876A, + 6865: 0x8805, + 6866: 0x87A2, + 6867: 0x879F, + 6868: 0x8782, + 6869: 0x87AF, + 6870: 0x87CB, + 6871: 0x87BD, + 6872: 0x87C0, + 6873: 0x87D0, + 6874: 0x96D6, + 6875: 0x87AB, + 6876: 0x87C4, + 6877: 0x87B3, + 6878: 0x87C7, + 6879: 0x87C6, + 6880: 0x87BB, + 6881: 0x87EF, + 6882: 0x87F2, + 6883: 0x87E0, + 6884: 0x880F, + 6885: 0x880D, + 6886: 0x87FE, + 6887: 0x87F6, + 6888: 0x87F7, + 6889: 0x880E, + 6890: 0x87D2, + 6891: 0x8811, + 6892: 0x8816, + 6893: 0x8815, + 6894: 0x8822, + 6895: 0x8821, + 6896: 0x8831, + 6897: 0x8836, + 6898: 0x8839, + 6899: 0x8827, + 6900: 0x883B, + 6901: 0x8844, + 6902: 0x8842, + 6903: 0x8852, + 6904: 0x8859, + 6905: 0x885E, + 6906: 0x8862, + 6907: 0x886B, + 6908: 0x8881, + 6909: 0x887E, + 6910: 0x889E, + 6911: 0x8875, + 6912: 0x887D, + 6913: 0x88B5, + 6914: 0x8872, + 6915: 0x8882, + 6916: 0x8897, + 6917: 0x8892, + 6918: 0x88AE, + 6919: 0x8899, + 6920: 0x88A2, + 6921: 0x888D, + 6922: 0x88A4, + 6923: 0x88B0, + 6924: 0x88BF, + 6925: 0x88B1, + 6926: 0x88C3, + 6927: 0x88C4, + 6928: 0x88D4, + 6929: 0x88D8, + 6930: 0x88D9, + 6931: 0x88DD, + 6932: 0x88F9, + 6933: 0x8902, + 6934: 0x88FC, + 6935: 0x88F4, + 6936: 0x88E8, + 6937: 0x88F2, + 6938: 0x8904, + 6939: 0x890C, + 6940: 0x890A, + 6941: 0x8913, + 6942: 0x8943, + 6943: 0x891E, + 6944: 0x8925, + 6945: 0x892A, + 6946: 0x892B, + 6947: 0x8941, + 6948: 0x8944, + 6949: 0x893B, + 6950: 0x8936, + 6951: 0x8938, + 6952: 0x894C, + 6953: 0x891D, + 6954: 0x8960, + 6955: 0x895E, + 6956: 0x8966, + 6957: 0x8964, + 6958: 0x896D, + 6959: 0x896A, + 6960: 0x896F, + 6961: 0x8974, + 6962: 0x8977, + 6963: 0x897E, + 6964: 0x8983, + 6965: 0x8988, + 6966: 0x898A, + 6967: 0x8993, + 6968: 0x8998, + 6969: 0x89A1, + 6970: 0x89A9, + 6971: 0x89A6, + 6972: 0x89AC, + 6973: 0x89AF, + 6974: 0x89B2, + 6975: 0x89BA, + 6976: 0x89BD, + 6977: 0x89BF, + 6978: 0x89C0, + 6979: 0x89DA, + 6980: 0x89DC, + 6981: 0x89DD, + 6982: 0x89E7, + 6983: 0x89F4, + 6984: 0x89F8, + 6985: 0x8A03, + 6986: 0x8A16, + 6987: 0x8A10, + 6988: 0x8A0C, + 6989: 0x8A1B, + 6990: 0x8A1D, + 6991: 0x8A25, + 6992: 0x8A36, + 6993: 0x8A41, + 6994: 0x8A5B, + 6995: 0x8A52, + 6996: 0x8A46, + 6997: 0x8A48, + 6998: 0x8A7C, + 6999: 0x8A6D, + 7000: 0x8A6C, + 7001: 0x8A62, + 7002: 0x8A85, + 7003: 0x8A82, + 7004: 0x8A84, + 7005: 0x8AA8, + 7006: 0x8AA1, + 7007: 0x8A91, + 7008: 0x8AA5, + 7009: 0x8AA6, + 7010: 0x8A9A, + 7011: 0x8AA3, + 7012: 0x8AC4, + 7013: 0x8ACD, + 7014: 0x8AC2, + 7015: 0x8ADA, + 7016: 0x8AEB, + 7017: 0x8AF3, + 7018: 0x8AE7, + 7019: 0x8AE4, + 7020: 0x8AF1, + 7021: 0x8B14, + 7022: 0x8AE0, + 7023: 0x8AE2, + 7024: 0x8AF7, + 7025: 0x8ADE, + 7026: 0x8ADB, + 7027: 0x8B0C, + 7028: 0x8B07, + 7029: 0x8B1A, + 7030: 0x8AE1, + 7031: 0x8B16, + 7032: 0x8B10, + 7033: 0x8B17, + 7034: 0x8B20, + 7035: 0x8B33, + 7036: 0x97AB, + 7037: 0x8B26, + 7038: 0x8B2B, + 7039: 0x8B3E, + 7040: 0x8B28, + 7041: 0x8B41, + 7042: 0x8B4C, + 7043: 0x8B4F, + 7044: 0x8B4E, + 7045: 0x8B49, + 7046: 0x8B56, + 7047: 0x8B5B, + 7048: 0x8B5A, + 7049: 0x8B6B, + 7050: 0x8B5F, + 7051: 0x8B6C, + 7052: 0x8B6F, + 7053: 0x8B74, + 7054: 0x8B7D, + 7055: 0x8B80, + 7056: 0x8B8C, + 7057: 0x8B8E, + 7058: 0x8B92, + 7059: 0x8B93, + 7060: 0x8B96, + 7061: 0x8B99, + 7062: 0x8B9A, + 7063: 0x8C3A, + 7064: 0x8C41, + 7065: 0x8C3F, + 7066: 0x8C48, + 7067: 0x8C4C, + 7068: 0x8C4E, + 7069: 0x8C50, + 7070: 0x8C55, + 7071: 0x8C62, + 7072: 0x8C6C, + 7073: 0x8C78, + 7074: 0x8C7A, + 7075: 0x8C82, + 7076: 0x8C89, + 7077: 0x8C85, + 7078: 0x8C8A, + 7079: 0x8C8D, + 7080: 0x8C8E, + 7081: 0x8C94, + 7082: 0x8C7C, + 7083: 0x8C98, + 7084: 0x621D, + 7085: 0x8CAD, + 7086: 0x8CAA, + 7087: 0x8CBD, + 7088: 0x8CB2, + 7089: 0x8CB3, + 7090: 0x8CAE, + 7091: 0x8CB6, + 7092: 0x8CC8, + 7093: 0x8CC1, + 7094: 0x8CE4, + 7095: 0x8CE3, + 7096: 0x8CDA, + 7097: 0x8CFD, + 7098: 0x8CFA, + 7099: 0x8CFB, + 7100: 0x8D04, + 7101: 0x8D05, + 7102: 0x8D0A, + 7103: 0x8D07, + 7104: 0x8D0F, + 7105: 0x8D0D, + 7106: 0x8D10, + 7107: 0x9F4E, + 7108: 0x8D13, + 7109: 0x8CCD, + 7110: 0x8D14, + 7111: 0x8D16, + 7112: 0x8D67, + 7113: 0x8D6D, + 7114: 0x8D71, + 7115: 0x8D73, + 7116: 0x8D81, + 7117: 0x8D99, + 7118: 0x8DC2, + 7119: 0x8DBE, + 7120: 0x8DBA, + 7121: 0x8DCF, + 7122: 0x8DDA, + 7123: 0x8DD6, + 7124: 0x8DCC, + 7125: 0x8DDB, + 7126: 0x8DCB, + 7127: 0x8DEA, + 7128: 0x8DEB, + 7129: 0x8DDF, + 7130: 0x8DE3, + 7131: 0x8DFC, + 7132: 0x8E08, + 7133: 0x8E09, + 7134: 0x8DFF, + 7135: 0x8E1D, + 7136: 0x8E1E, + 7137: 0x8E10, + 7138: 0x8E1F, + 7139: 0x8E42, + 7140: 0x8E35, + 7141: 0x8E30, + 7142: 0x8E34, + 7143: 0x8E4A, + 7144: 0x8E47, + 7145: 0x8E49, + 7146: 0x8E4C, + 7147: 0x8E50, + 7148: 0x8E48, + 7149: 0x8E59, + 7150: 0x8E64, + 7151: 0x8E60, + 7152: 0x8E2A, + 7153: 0x8E63, + 7154: 0x8E55, + 7155: 0x8E76, + 7156: 0x8E72, + 7157: 0x8E7C, + 7158: 0x8E81, + 7159: 0x8E87, + 7160: 0x8E85, + 7161: 0x8E84, + 7162: 0x8E8B, + 7163: 0x8E8A, + 7164: 0x8E93, + 7165: 0x8E91, + 7166: 0x8E94, + 7167: 0x8E99, + 7168: 0x8EAA, + 7169: 0x8EA1, + 7170: 0x8EAC, + 7171: 0x8EB0, + 7172: 0x8EC6, + 7173: 0x8EB1, + 7174: 0x8EBE, + 7175: 0x8EC5, + 7176: 0x8EC8, + 7177: 0x8ECB, + 7178: 0x8EDB, + 7179: 0x8EE3, + 7180: 0x8EFC, + 7181: 0x8EFB, + 7182: 0x8EEB, + 7183: 0x8EFE, + 7184: 0x8F0A, + 7185: 0x8F05, + 7186: 0x8F15, + 7187: 0x8F12, + 7188: 0x8F19, + 7189: 0x8F13, + 7190: 0x8F1C, + 7191: 0x8F1F, + 7192: 0x8F1B, + 7193: 0x8F0C, + 7194: 0x8F26, + 7195: 0x8F33, + 7196: 0x8F3B, + 7197: 0x8F39, + 7198: 0x8F45, + 7199: 0x8F42, + 7200: 0x8F3E, + 7201: 0x8F4C, + 7202: 0x8F49, + 7203: 0x8F46, + 7204: 0x8F4E, + 7205: 0x8F57, + 7206: 0x8F5C, + 7207: 0x8F62, + 7208: 0x8F63, + 7209: 0x8F64, + 7210: 0x8F9C, + 7211: 0x8F9F, + 7212: 0x8FA3, + 7213: 0x8FAD, + 7214: 0x8FAF, + 7215: 0x8FB7, + 7216: 0x8FDA, + 7217: 0x8FE5, + 7218: 0x8FE2, + 7219: 0x8FEA, + 7220: 0x8FEF, + 7221: 0x9087, + 7222: 0x8FF4, + 7223: 0x9005, + 7224: 0x8FF9, + 7225: 0x8FFA, + 7226: 0x9011, + 7227: 0x9015, + 7228: 0x9021, + 7229: 0x900D, + 7230: 0x901E, + 7231: 0x9016, + 7232: 0x900B, + 7233: 0x9027, + 7234: 0x9036, + 7235: 0x9035, + 7236: 0x9039, + 7237: 0x8FF8, + 7238: 0x904F, + 7239: 0x9050, + 7240: 0x9051, + 7241: 0x9052, + 7242: 0x900E, + 7243: 0x9049, + 7244: 0x903E, + 7245: 0x9056, + 7246: 0x9058, + 7247: 0x905E, + 7248: 0x9068, + 7249: 0x906F, + 7250: 0x9076, + 7251: 0x96A8, + 7252: 0x9072, + 7253: 0x9082, + 7254: 0x907D, + 7255: 0x9081, + 7256: 0x9080, + 7257: 0x908A, + 7258: 0x9089, + 7259: 0x908F, + 7260: 0x90A8, + 7261: 0x90AF, + 7262: 0x90B1, + 7263: 0x90B5, + 7264: 0x90E2, + 7265: 0x90E4, + 7266: 0x6248, + 7267: 0x90DB, + 7268: 0x9102, + 7269: 0x9112, + 7270: 0x9119, + 7271: 0x9132, + 7272: 0x9130, + 7273: 0x914A, + 7274: 0x9156, + 7275: 0x9158, + 7276: 0x9163, + 7277: 0x9165, + 7278: 0x9169, + 7279: 0x9173, + 7280: 0x9172, + 7281: 0x918B, + 7282: 0x9189, + 7283: 0x9182, + 7284: 0x91A2, + 7285: 0x91AB, + 7286: 0x91AF, + 7287: 0x91AA, + 7288: 0x91B5, + 7289: 0x91B4, + 7290: 0x91BA, + 7291: 0x91C0, + 7292: 0x91C1, + 7293: 0x91C9, + 7294: 0x91CB, + 7295: 0x91D0, + 7296: 0x91D6, + 7297: 0x91DF, + 7298: 0x91E1, + 7299: 0x91DB, + 7300: 0x91FC, + 7301: 0x91F5, + 7302: 0x91F6, + 7303: 0x921E, + 7304: 0x91FF, + 7305: 0x9214, + 7306: 0x922C, + 7307: 0x9215, + 7308: 0x9211, + 7309: 0x925E, + 7310: 0x9257, + 7311: 0x9245, + 7312: 0x9249, + 7313: 0x9264, + 7314: 0x9248, + 7315: 0x9295, + 7316: 0x923F, + 7317: 0x924B, + 7318: 0x9250, + 7319: 0x929C, + 7320: 0x9296, + 7321: 0x9293, + 7322: 0x929B, + 7323: 0x925A, + 7324: 0x92CF, + 7325: 0x92B9, + 7326: 0x92B7, + 7327: 0x92E9, + 7328: 0x930F, + 7329: 0x92FA, + 7330: 0x9344, + 7331: 0x932E, + 7332: 0x9319, + 7333: 0x9322, + 7334: 0x931A, + 7335: 0x9323, + 7336: 0x933A, + 7337: 0x9335, + 7338: 0x933B, + 7339: 0x935C, + 7340: 0x9360, + 7341: 0x937C, + 7342: 0x936E, + 7343: 0x9356, + 7344: 0x93B0, + 7345: 0x93AC, + 7346: 0x93AD, + 7347: 0x9394, + 7348: 0x93B9, + 7349: 0x93D6, + 7350: 0x93D7, + 7351: 0x93E8, + 7352: 0x93E5, + 7353: 0x93D8, + 7354: 0x93C3, + 7355: 0x93DD, + 7356: 0x93D0, + 7357: 0x93C8, + 7358: 0x93E4, + 7359: 0x941A, + 7360: 0x9414, + 7361: 0x9413, + 7362: 0x9403, + 7363: 0x9407, + 7364: 0x9410, + 7365: 0x9436, + 7366: 0x942B, + 7367: 0x9435, + 7368: 0x9421, + 7369: 0x943A, + 7370: 0x9441, + 7371: 0x9452, + 7372: 0x9444, + 7373: 0x945B, + 7374: 0x9460, + 7375: 0x9462, + 7376: 0x945E, + 7377: 0x946A, + 7378: 0x9229, + 7379: 0x9470, + 7380: 0x9475, + 7381: 0x9477, + 7382: 0x947D, + 7383: 0x945A, + 7384: 0x947C, + 7385: 0x947E, + 7386: 0x9481, + 7387: 0x947F, + 7388: 0x9582, + 7389: 0x9587, + 7390: 0x958A, + 7391: 0x9594, + 7392: 0x9596, + 7393: 0x9598, + 7394: 0x9599, + 7395: 0x95A0, + 7396: 0x95A8, + 7397: 0x95A7, + 7398: 0x95AD, + 7399: 0x95BC, + 7400: 0x95BB, + 7401: 0x95B9, + 7402: 0x95BE, + 7403: 0x95CA, + 7404: 0x6FF6, + 7405: 0x95C3, + 7406: 0x95CD, + 7407: 0x95CC, + 7408: 0x95D5, + 7409: 0x95D4, + 7410: 0x95D6, + 7411: 0x95DC, + 7412: 0x95E1, + 7413: 0x95E5, + 7414: 0x95E2, + 7415: 0x9621, + 7416: 0x9628, + 7417: 0x962E, + 7418: 0x962F, + 7419: 0x9642, + 7420: 0x964C, + 7421: 0x964F, + 7422: 0x964B, + 7423: 0x9677, + 7424: 0x965C, + 7425: 0x965E, + 7426: 0x965D, + 7427: 0x965F, + 7428: 0x9666, + 7429: 0x9672, + 7430: 0x966C, + 7431: 0x968D, + 7432: 0x9698, + 7433: 0x9695, + 7434: 0x9697, + 7435: 0x96AA, + 7436: 0x96A7, + 7437: 0x96B1, + 7438: 0x96B2, + 7439: 0x96B0, + 7440: 0x96B4, + 7441: 0x96B6, + 7442: 0x96B8, + 7443: 0x96B9, + 7444: 0x96CE, + 7445: 0x96CB, + 7446: 0x96C9, + 7447: 0x96CD, + 7448: 0x894D, + 7449: 0x96DC, + 7450: 0x970D, + 7451: 0x96D5, + 7452: 0x96F9, + 7453: 0x9704, + 7454: 0x9706, + 7455: 0x9708, + 7456: 0x9713, + 7457: 0x970E, + 7458: 0x9711, + 7459: 0x970F, + 7460: 0x9716, + 7461: 0x9719, + 7462: 0x9724, + 7463: 0x972A, + 7464: 0x9730, + 7465: 0x9739, + 7466: 0x973D, + 7467: 0x973E, + 7468: 0x9744, + 7469: 0x9746, + 7470: 0x9748, + 7471: 0x9742, + 7472: 0x9749, + 7473: 0x975C, + 7474: 0x9760, + 7475: 0x9764, + 7476: 0x9766, + 7477: 0x9768, + 7478: 0x52D2, + 7479: 0x976B, + 7480: 0x9771, + 7481: 0x9779, + 7482: 0x9785, + 7483: 0x977C, + 7484: 0x9781, + 7485: 0x977A, + 7486: 0x9786, + 7487: 0x978B, + 7488: 0x978F, + 7489: 0x9790, + 7490: 0x979C, + 7491: 0x97A8, + 7492: 0x97A6, + 7493: 0x97A3, + 7494: 0x97B3, + 7495: 0x97B4, + 7496: 0x97C3, + 7497: 0x97C6, + 7498: 0x97C8, + 7499: 0x97CB, + 7500: 0x97DC, + 7501: 0x97ED, + 7502: 0x9F4F, + 7503: 0x97F2, + 7504: 0x7ADF, + 7505: 0x97F6, + 7506: 0x97F5, + 7507: 0x980F, + 7508: 0x980C, + 7509: 0x9838, + 7510: 0x9824, + 7511: 0x9821, + 7512: 0x9837, + 7513: 0x983D, + 7514: 0x9846, + 7515: 0x984F, + 7516: 0x984B, + 7517: 0x986B, + 7518: 0x986F, + 7519: 0x9870, + 7520: 0x9871, + 7521: 0x9874, + 7522: 0x9873, + 7523: 0x98AA, + 7524: 0x98AF, + 7525: 0x98B1, + 7526: 0x98B6, + 7527: 0x98C4, + 7528: 0x98C3, + 7529: 0x98C6, + 7530: 0x98E9, + 7531: 0x98EB, + 7532: 0x9903, + 7533: 0x9909, + 7534: 0x9912, + 7535: 0x9914, + 7536: 0x9918, + 7537: 0x9921, + 7538: 0x991D, + 7539: 0x991E, + 7540: 0x9924, + 7541: 0x9920, + 7542: 0x992C, + 7543: 0x992E, + 7544: 0x993D, + 7545: 0x993E, + 7546: 0x9942, + 7547: 0x9949, + 7548: 0x9945, + 7549: 0x9950, + 7550: 0x994B, + 7551: 0x9951, + 7552: 0x9952, + 7553: 0x994C, + 7554: 0x9955, + 7555: 0x9997, + 7556: 0x9998, + 7557: 0x99A5, + 7558: 0x99AD, + 7559: 0x99AE, + 7560: 0x99BC, + 7561: 0x99DF, + 7562: 0x99DB, + 7563: 0x99DD, + 7564: 0x99D8, + 7565: 0x99D1, + 7566: 0x99ED, + 7567: 0x99EE, + 7568: 0x99F1, + 7569: 0x99F2, + 7570: 0x99FB, + 7571: 0x99F8, + 7572: 0x9A01, + 7573: 0x9A0F, + 7574: 0x9A05, + 7575: 0x99E2, + 7576: 0x9A19, + 7577: 0x9A2B, + 7578: 0x9A37, + 7579: 0x9A45, + 7580: 0x9A42, + 7581: 0x9A40, + 7582: 0x9A43, + 7583: 0x9A3E, + 7584: 0x9A55, + 7585: 0x9A4D, + 7586: 0x9A5B, + 7587: 0x9A57, + 7588: 0x9A5F, + 7589: 0x9A62, + 7590: 0x9A65, + 7591: 0x9A64, + 7592: 0x9A69, + 7593: 0x9A6B, + 7594: 0x9A6A, + 7595: 0x9AAD, + 7596: 0x9AB0, + 7597: 0x9ABC, + 7598: 0x9AC0, + 7599: 0x9ACF, + 7600: 0x9AD1, + 7601: 0x9AD3, + 7602: 0x9AD4, + 7603: 0x9ADE, + 7604: 0x9ADF, + 7605: 0x9AE2, + 7606: 0x9AE3, + 7607: 0x9AE6, + 7608: 0x9AEF, + 7609: 0x9AEB, + 7610: 0x9AEE, + 7611: 0x9AF4, + 7612: 0x9AF1, + 7613: 0x9AF7, + 7614: 0x9AFB, + 7615: 0x9B06, + 7616: 0x9B18, + 7617: 0x9B1A, + 7618: 0x9B1F, + 7619: 0x9B22, + 7620: 0x9B23, + 7621: 0x9B25, + 7622: 0x9B27, + 7623: 0x9B28, + 7624: 0x9B29, + 7625: 0x9B2A, + 7626: 0x9B2E, + 7627: 0x9B2F, + 7628: 0x9B32, + 7629: 0x9B44, + 7630: 0x9B43, + 7631: 0x9B4F, + 7632: 0x9B4D, + 7633: 0x9B4E, + 7634: 0x9B51, + 7635: 0x9B58, + 7636: 0x9B74, + 7637: 0x9B93, + 7638: 0x9B83, + 7639: 0x9B91, + 7640: 0x9B96, + 7641: 0x9B97, + 7642: 0x9B9F, + 7643: 0x9BA0, + 7644: 0x9BA8, + 7645: 0x9BB4, + 7646: 0x9BC0, + 7647: 0x9BCA, + 7648: 0x9BB9, + 7649: 0x9BC6, + 7650: 0x9BCF, + 7651: 0x9BD1, + 7652: 0x9BD2, + 7653: 0x9BE3, + 7654: 0x9BE2, + 7655: 0x9BE4, + 7656: 0x9BD4, + 7657: 0x9BE1, + 7658: 0x9C3A, + 7659: 0x9BF2, + 7660: 0x9BF1, + 7661: 0x9BF0, + 7662: 0x9C15, + 7663: 0x9C14, + 7664: 0x9C09, + 7665: 0x9C13, + 7666: 0x9C0C, + 7667: 0x9C06, + 7668: 0x9C08, + 7669: 0x9C12, + 7670: 0x9C0A, + 7671: 0x9C04, + 7672: 0x9C2E, + 7673: 0x9C1B, + 7674: 0x9C25, + 7675: 0x9C24, + 7676: 0x9C21, + 7677: 0x9C30, + 7678: 0x9C47, + 7679: 0x9C32, + 7680: 0x9C46, + 7681: 0x9C3E, + 7682: 0x9C5A, + 7683: 0x9C60, + 7684: 0x9C67, + 7685: 0x9C76, + 7686: 0x9C78, + 7687: 0x9CE7, + 7688: 0x9CEC, + 7689: 0x9CF0, + 7690: 0x9D09, + 7691: 0x9D08, + 7692: 0x9CEB, + 7693: 0x9D03, + 7694: 0x9D06, + 7695: 0x9D2A, + 7696: 0x9D26, + 7697: 0x9DAF, + 7698: 0x9D23, + 7699: 0x9D1F, + 7700: 0x9D44, + 7701: 0x9D15, + 7702: 0x9D12, + 7703: 0x9D41, + 7704: 0x9D3F, + 7705: 0x9D3E, + 7706: 0x9D46, + 7707: 0x9D48, + 7708: 0x9D5D, + 7709: 0x9D5E, + 7710: 0x9D64, + 7711: 0x9D51, + 7712: 0x9D50, + 7713: 0x9D59, + 7714: 0x9D72, + 7715: 0x9D89, + 7716: 0x9D87, + 7717: 0x9DAB, + 7718: 0x9D6F, + 7719: 0x9D7A, + 7720: 0x9D9A, + 7721: 0x9DA4, + 7722: 0x9DA9, + 7723: 0x9DB2, + 7724: 0x9DC4, + 7725: 0x9DC1, + 7726: 0x9DBB, + 7727: 0x9DB8, + 7728: 0x9DBA, + 7729: 0x9DC6, + 7730: 0x9DCF, + 7731: 0x9DC2, + 7732: 0x9DD9, + 7733: 0x9DD3, + 7734: 0x9DF8, + 7735: 0x9DE6, + 7736: 0x9DED, + 7737: 0x9DEF, + 7738: 0x9DFD, + 7739: 0x9E1A, + 7740: 0x9E1B, + 7741: 0x9E1E, + 7742: 0x9E75, + 7743: 0x9E79, + 7744: 0x9E7D, + 7745: 0x9E81, + 7746: 0x9E88, + 7747: 0x9E8B, + 7748: 0x9E8C, + 7749: 0x9E92, + 7750: 0x9E95, + 7751: 0x9E91, + 7752: 0x9E9D, + 7753: 0x9EA5, + 7754: 0x9EA9, + 7755: 0x9EB8, + 7756: 0x9EAA, + 7757: 0x9EAD, + 7758: 0x9761, + 7759: 0x9ECC, + 7760: 0x9ECE, + 7761: 0x9ECF, + 7762: 0x9ED0, + 7763: 0x9ED4, + 7764: 0x9EDC, + 7765: 0x9EDE, + 7766: 0x9EDD, + 7767: 0x9EE0, + 7768: 0x9EE5, + 7769: 0x9EE8, + 7770: 0x9EEF, + 7771: 0x9EF4, + 7772: 0x9EF6, + 7773: 0x9EF7, + 7774: 0x9EF9, + 7775: 0x9EFB, + 7776: 0x9EFC, + 7777: 0x9EFD, + 7778: 0x9F07, + 7779: 0x9F08, + 7780: 0x76B7, + 7781: 0x9F15, + 7782: 0x9F21, + 7783: 0x9F2C, + 7784: 0x9F3E, + 7785: 0x9F4A, + 7786: 0x9F52, + 7787: 0x9F54, + 7788: 0x9F63, + 7789: 0x9F5F, + 7790: 0x9F60, + 7791: 0x9F61, + 7792: 0x9F66, + 7793: 0x9F67, + 7794: 0x9F6C, + 7795: 0x9F6A, + 7796: 0x9F77, + 7797: 0x9F72, + 7798: 0x9F76, + 7799: 0x9F95, + 7800: 0x9F9C, + 7801: 0x9FA0, + 7802: 0x582F, + 7803: 0x69C7, + 7804: 0x9059, + 7805: 0x7464, + 7806: 0x51DC, + 7807: 0x7199, + 8272: 0x7E8A, + 8273: 0x891C, + 8274: 0x9348, + 8275: 0x9288, + 8276: 0x84DC, + 8277: 0x4FC9, + 8278: 0x70BB, + 8279: 0x6631, + 8280: 0x68C8, + 8281: 0x92F9, + 8282: 0x66FB, + 8283: 0x5F45, + 8284: 0x4E28, + 8285: 0x4EE1, + 8286: 0x4EFC, + 8287: 0x4F00, + 8288: 0x4F03, + 8289: 0x4F39, + 8290: 0x4F56, + 8291: 0x4F92, + 8292: 0x4F8A, + 8293: 0x4F9A, + 8294: 0x4F94, + 8295: 0x4FCD, + 8296: 0x5040, + 8297: 0x5022, + 8298: 0x4FFF, + 8299: 0x501E, + 8300: 0x5046, + 8301: 0x5070, + 8302: 0x5042, + 8303: 0x5094, + 8304: 0x50F4, + 8305: 0x50D8, + 8306: 0x514A, + 8307: 0x5164, + 8308: 0x519D, + 8309: 0x51BE, + 8310: 0x51EC, + 8311: 0x5215, + 8312: 0x529C, + 8313: 0x52A6, + 8314: 0x52C0, + 8315: 0x52DB, + 8316: 0x5300, + 8317: 0x5307, + 8318: 0x5324, + 8319: 0x5372, + 8320: 0x5393, + 8321: 0x53B2, + 8322: 0x53DD, + 8323: 0xFA0E, + 8324: 0x549C, + 8325: 0x548A, + 8326: 0x54A9, + 8327: 0x54FF, + 8328: 0x5586, + 8329: 0x5759, + 8330: 0x5765, + 8331: 0x57AC, + 8332: 0x57C8, + 8333: 0x57C7, + 8334: 0xFA0F, + 8335: 0xFA10, + 8336: 0x589E, + 8337: 0x58B2, + 8338: 0x590B, + 8339: 0x5953, + 8340: 0x595B, + 8341: 0x595D, + 8342: 0x5963, + 8343: 0x59A4, + 8344: 0x59BA, + 8345: 0x5B56, + 8346: 0x5BC0, + 8347: 0x752F, + 8348: 0x5BD8, + 8349: 0x5BEC, + 8350: 0x5C1E, + 8351: 0x5CA6, + 8352: 0x5CBA, + 8353: 0x5CF5, + 8354: 0x5D27, + 8355: 0x5D53, + 8356: 0xFA11, + 8357: 0x5D42, + 8358: 0x5D6D, + 8359: 0x5DB8, + 8360: 0x5DB9, + 8361: 0x5DD0, + 8362: 0x5F21, + 8363: 0x5F34, + 8364: 0x5F67, + 8365: 0x5FB7, + 8366: 0x5FDE, + 8367: 0x605D, + 8368: 0x6085, + 8369: 0x608A, + 8370: 0x60DE, + 8371: 0x60D5, + 8372: 0x6120, + 8373: 0x60F2, + 8374: 0x6111, + 8375: 0x6137, + 8376: 0x6130, + 8377: 0x6198, + 8378: 0x6213, + 8379: 0x62A6, + 8380: 0x63F5, + 8381: 0x6460, + 8382: 0x649D, + 8383: 0x64CE, + 8384: 0x654E, + 8385: 0x6600, + 8386: 0x6615, + 8387: 0x663B, + 8388: 0x6609, + 8389: 0x662E, + 8390: 0x661E, + 8391: 0x6624, + 8392: 0x6665, + 8393: 0x6657, + 8394: 0x6659, + 8395: 0xFA12, + 8396: 0x6673, + 8397: 0x6699, + 8398: 0x66A0, + 8399: 0x66B2, + 8400: 0x66BF, + 8401: 0x66FA, + 8402: 0x670E, + 8403: 0xF929, + 8404: 0x6766, + 8405: 0x67BB, + 8406: 0x6852, + 8407: 0x67C0, + 8408: 0x6801, + 8409: 0x6844, + 8410: 0x68CF, + 8411: 0xFA13, + 8412: 0x6968, + 8413: 0xFA14, + 8414: 0x6998, + 8415: 0x69E2, + 8416: 0x6A30, + 8417: 0x6A6B, + 8418: 0x6A46, + 8419: 0x6A73, + 8420: 0x6A7E, + 8421: 0x6AE2, + 8422: 0x6AE4, + 8423: 0x6BD6, + 8424: 0x6C3F, + 8425: 0x6C5C, + 8426: 0x6C86, + 8427: 0x6C6F, + 8428: 0x6CDA, + 8429: 0x6D04, + 8430: 0x6D87, + 8431: 0x6D6F, + 8432: 0x6D96, + 8433: 0x6DAC, + 8434: 0x6DCF, + 8435: 0x6DF8, + 8436: 0x6DF2, + 8437: 0x6DFC, + 8438: 0x6E39, + 8439: 0x6E5C, + 8440: 0x6E27, + 8441: 0x6E3C, + 8442: 0x6EBF, + 8443: 0x6F88, + 8444: 0x6FB5, + 8445: 0x6FF5, + 8446: 0x7005, + 8447: 0x7007, + 8448: 0x7028, + 8449: 0x7085, + 8450: 0x70AB, + 8451: 0x710F, + 8452: 0x7104, + 8453: 0x715C, + 8454: 0x7146, + 8455: 0x7147, + 8456: 0xFA15, + 8457: 0x71C1, + 8458: 0x71FE, + 8459: 0x72B1, + 8460: 0x72BE, + 8461: 0x7324, + 8462: 0xFA16, + 8463: 0x7377, + 8464: 0x73BD, + 8465: 0x73C9, + 8466: 0x73D6, + 8467: 0x73E3, + 8468: 0x73D2, + 8469: 0x7407, + 8470: 0x73F5, + 8471: 0x7426, + 8472: 0x742A, + 8473: 0x7429, + 8474: 0x742E, + 8475: 0x7462, + 8476: 0x7489, + 8477: 0x749F, + 8478: 0x7501, + 8479: 0x756F, + 8480: 0x7682, + 8481: 0x769C, + 8482: 0x769E, + 8483: 0x769B, + 8484: 0x76A6, + 8485: 0xFA17, + 8486: 0x7746, + 8487: 0x52AF, + 8488: 0x7821, + 8489: 0x784E, + 8490: 0x7864, + 8491: 0x787A, + 8492: 0x7930, + 8493: 0xFA18, + 8494: 0xFA19, + 8495: 0xFA1A, + 8496: 0x7994, + 8497: 0xFA1B, + 8498: 0x799B, + 8499: 0x7AD1, + 8500: 0x7AE7, + 8501: 0xFA1C, + 8502: 0x7AEB, + 8503: 0x7B9E, + 8504: 0xFA1D, + 8505: 0x7D48, + 8506: 0x7D5C, + 8507: 0x7DB7, + 8508: 0x7DA0, + 8509: 0x7DD6, + 8510: 0x7E52, + 8511: 0x7F47, + 8512: 0x7FA1, + 8513: 0xFA1E, + 8514: 0x8301, + 8515: 0x8362, + 8516: 0x837F, + 8517: 0x83C7, + 8518: 0x83F6, + 8519: 0x8448, + 8520: 0x84B4, + 8521: 0x8553, + 8522: 0x8559, + 8523: 0x856B, + 8524: 0xFA1F, + 8525: 0x85B0, + 8526: 0xFA20, + 8527: 0xFA21, + 8528: 0x8807, + 8529: 0x88F5, + 8530: 0x8A12, + 8531: 0x8A37, + 8532: 0x8A79, + 8533: 0x8AA7, + 8534: 0x8ABE, + 8535: 0x8ADF, + 8536: 0xFA22, + 8537: 0x8AF6, + 8538: 0x8B53, + 8539: 0x8B7F, + 8540: 0x8CF0, + 8541: 0x8CF4, + 8542: 0x8D12, + 8543: 0x8D76, + 8544: 0xFA23, + 8545: 0x8ECF, + 8546: 0xFA24, + 8547: 0xFA25, + 8548: 0x9067, + 8549: 0x90DE, + 8550: 0xFA26, + 8551: 0x9115, + 8552: 0x9127, + 8553: 0x91DA, + 8554: 0x91D7, + 8555: 0x91DE, + 8556: 0x91ED, + 8557: 0x91EE, + 8558: 0x91E4, + 8559: 0x91E5, + 8560: 0x9206, + 8561: 0x9210, + 8562: 0x920A, + 8563: 0x923A, + 8564: 0x9240, + 8565: 0x923C, + 8566: 0x924E, + 8567: 0x9259, + 8568: 0x9251, + 8569: 0x9239, + 8570: 0x9267, + 8571: 0x92A7, + 8572: 0x9277, + 8573: 0x9278, + 8574: 0x92E7, + 8575: 0x92D7, + 8576: 0x92D9, + 8577: 0x92D0, + 8578: 0xFA27, + 8579: 0x92D5, + 8580: 0x92E0, + 8581: 0x92D3, + 8582: 0x9325, + 8583: 0x9321, + 8584: 0x92FB, + 8585: 0xFA28, + 8586: 0x931E, + 8587: 0x92FF, + 8588: 0x931D, + 8589: 0x9302, + 8590: 0x9370, + 8591: 0x9357, + 8592: 0x93A4, + 8593: 0x93C6, + 8594: 0x93DE, + 8595: 0x93F8, + 8596: 0x9431, + 8597: 0x9445, + 8598: 0x9448, + 8599: 0x9592, + 8600: 0xF9DC, + 8601: 0xFA29, + 8602: 0x969D, + 8603: 0x96AF, + 8604: 0x9733, + 8605: 0x973B, + 8606: 0x9743, + 8607: 0x974D, + 8608: 0x974F, + 8609: 0x9751, + 8610: 0x9755, + 8611: 0x9857, + 8612: 0x9865, + 8613: 0xFA2A, + 8614: 0xFA2B, + 8615: 0x9927, + 8616: 0xFA2C, + 8617: 0x999E, + 8618: 0x9A4E, + 8619: 0x9AD9, + 8620: 0x9ADC, + 8621: 0x9B75, + 8622: 0x9B72, + 8623: 0x9B8F, + 8624: 0x9BB1, + 8625: 0x9BBB, + 8626: 0x9C00, + 8627: 0x9D70, + 8628: 0x9D6B, + 8629: 0xFA2D, + 8630: 0x9E19, + 8631: 0x9ED1, + 8634: 0x2170, + 8635: 0x2171, + 8636: 0x2172, + 8637: 0x2173, + 8638: 0x2174, + 8639: 0x2175, + 8640: 0x2176, + 8641: 0x2177, + 8642: 0x2178, + 8643: 0x2179, + 8644: 0xFFE2, + 8645: 0xFFE4, + 8646: 0xFF07, + 8647: 0xFF02, + 10716: 0x2170, + 10717: 0x2171, + 10718: 0x2172, + 10719: 0x2173, + 10720: 0x2174, + 10721: 0x2175, + 10722: 0x2176, + 10723: 0x2177, + 10724: 0x2178, + 10725: 0x2179, + 10726: 0x2160, + 10727: 0x2161, + 10728: 0x2162, + 10729: 0x2163, + 10730: 0x2164, + 10731: 0x2165, + 10732: 0x2166, + 10733: 0x2167, + 10734: 0x2168, + 10735: 0x2169, + 10736: 0xFFE2, + 10737: 0xFFE4, + 10738: 0xFF07, + 10739: 0xFF02, + 10740: 0x3231, + 10741: 0x2116, + 10742: 0x2121, + 10743: 0x2235, + 10744: 0x7E8A, + 10745: 0x891C, + 10746: 0x9348, + 10747: 0x9288, + 10748: 0x84DC, + 10749: 0x4FC9, + 10750: 0x70BB, + 10751: 0x6631, + 10752: 0x68C8, + 10753: 0x92F9, + 10754: 0x66FB, + 10755: 0x5F45, + 10756: 0x4E28, + 10757: 0x4EE1, + 10758: 0x4EFC, + 10759: 0x4F00, + 10760: 0x4F03, + 10761: 0x4F39, + 10762: 0x4F56, + 10763: 0x4F92, + 10764: 0x4F8A, + 10765: 0x4F9A, + 10766: 0x4F94, + 10767: 0x4FCD, + 10768: 0x5040, + 10769: 0x5022, + 10770: 0x4FFF, + 10771: 0x501E, + 10772: 0x5046, + 10773: 0x5070, + 10774: 0x5042, + 10775: 0x5094, + 10776: 0x50F4, + 10777: 0x50D8, + 10778: 0x514A, + 10779: 0x5164, + 10780: 0x519D, + 10781: 0x51BE, + 10782: 0x51EC, + 10783: 0x5215, + 10784: 0x529C, + 10785: 0x52A6, + 10786: 0x52C0, + 10787: 0x52DB, + 10788: 0x5300, + 10789: 0x5307, + 10790: 0x5324, + 10791: 0x5372, + 10792: 0x5393, + 10793: 0x53B2, + 10794: 0x53DD, + 10795: 0xFA0E, + 10796: 0x549C, + 10797: 0x548A, + 10798: 0x54A9, + 10799: 0x54FF, + 10800: 0x5586, + 10801: 0x5759, + 10802: 0x5765, + 10803: 0x57AC, + 10804: 0x57C8, + 10805: 0x57C7, + 10806: 0xFA0F, + 10807: 0xFA10, + 10808: 0x589E, + 10809: 0x58B2, + 10810: 0x590B, + 10811: 0x5953, + 10812: 0x595B, + 10813: 0x595D, + 10814: 0x5963, + 10815: 0x59A4, + 10816: 0x59BA, + 10817: 0x5B56, + 10818: 0x5BC0, + 10819: 0x752F, + 10820: 0x5BD8, + 10821: 0x5BEC, + 10822: 0x5C1E, + 10823: 0x5CA6, + 10824: 0x5CBA, + 10825: 0x5CF5, + 10826: 0x5D27, + 10827: 0x5D53, + 10828: 0xFA11, + 10829: 0x5D42, + 10830: 0x5D6D, + 10831: 0x5DB8, + 10832: 0x5DB9, + 10833: 0x5DD0, + 10834: 0x5F21, + 10835: 0x5F34, + 10836: 0x5F67, + 10837: 0x5FB7, + 10838: 0x5FDE, + 10839: 0x605D, + 10840: 0x6085, + 10841: 0x608A, + 10842: 0x60DE, + 10843: 0x60D5, + 10844: 0x6120, + 10845: 0x60F2, + 10846: 0x6111, + 10847: 0x6137, + 10848: 0x6130, + 10849: 0x6198, + 10850: 0x6213, + 10851: 0x62A6, + 10852: 0x63F5, + 10853: 0x6460, + 10854: 0x649D, + 10855: 0x64CE, + 10856: 0x654E, + 10857: 0x6600, + 10858: 0x6615, + 10859: 0x663B, + 10860: 0x6609, + 10861: 0x662E, + 10862: 0x661E, + 10863: 0x6624, + 10864: 0x6665, + 10865: 0x6657, + 10866: 0x6659, + 10867: 0xFA12, + 10868: 0x6673, + 10869: 0x6699, + 10870: 0x66A0, + 10871: 0x66B2, + 10872: 0x66BF, + 10873: 0x66FA, + 10874: 0x670E, + 10875: 0xF929, + 10876: 0x6766, + 10877: 0x67BB, + 10878: 0x6852, + 10879: 0x67C0, + 10880: 0x6801, + 10881: 0x6844, + 10882: 0x68CF, + 10883: 0xFA13, + 10884: 0x6968, + 10885: 0xFA14, + 10886: 0x6998, + 10887: 0x69E2, + 10888: 0x6A30, + 10889: 0x6A6B, + 10890: 0x6A46, + 10891: 0x6A73, + 10892: 0x6A7E, + 10893: 0x6AE2, + 10894: 0x6AE4, + 10895: 0x6BD6, + 10896: 0x6C3F, + 10897: 0x6C5C, + 10898: 0x6C86, + 10899: 0x6C6F, + 10900: 0x6CDA, + 10901: 0x6D04, + 10902: 0x6D87, + 10903: 0x6D6F, + 10904: 0x6D96, + 10905: 0x6DAC, + 10906: 0x6DCF, + 10907: 0x6DF8, + 10908: 0x6DF2, + 10909: 0x6DFC, + 10910: 0x6E39, + 10911: 0x6E5C, + 10912: 0x6E27, + 10913: 0x6E3C, + 10914: 0x6EBF, + 10915: 0x6F88, + 10916: 0x6FB5, + 10917: 0x6FF5, + 10918: 0x7005, + 10919: 0x7007, + 10920: 0x7028, + 10921: 0x7085, + 10922: 0x70AB, + 10923: 0x710F, + 10924: 0x7104, + 10925: 0x715C, + 10926: 0x7146, + 10927: 0x7147, + 10928: 0xFA15, + 10929: 0x71C1, + 10930: 0x71FE, + 10931: 0x72B1, + 10932: 0x72BE, + 10933: 0x7324, + 10934: 0xFA16, + 10935: 0x7377, + 10936: 0x73BD, + 10937: 0x73C9, + 10938: 0x73D6, + 10939: 0x73E3, + 10940: 0x73D2, + 10941: 0x7407, + 10942: 0x73F5, + 10943: 0x7426, + 10944: 0x742A, + 10945: 0x7429, + 10946: 0x742E, + 10947: 0x7462, + 10948: 0x7489, + 10949: 0x749F, + 10950: 0x7501, + 10951: 0x756F, + 10952: 0x7682, + 10953: 0x769C, + 10954: 0x769E, + 10955: 0x769B, + 10956: 0x76A6, + 10957: 0xFA17, + 10958: 0x7746, + 10959: 0x52AF, + 10960: 0x7821, + 10961: 0x784E, + 10962: 0x7864, + 10963: 0x787A, + 10964: 0x7930, + 10965: 0xFA18, + 10966: 0xFA19, + 10967: 0xFA1A, + 10968: 0x7994, + 10969: 0xFA1B, + 10970: 0x799B, + 10971: 0x7AD1, + 10972: 0x7AE7, + 10973: 0xFA1C, + 10974: 0x7AEB, + 10975: 0x7B9E, + 10976: 0xFA1D, + 10977: 0x7D48, + 10978: 0x7D5C, + 10979: 0x7DB7, + 10980: 0x7DA0, + 10981: 0x7DD6, + 10982: 0x7E52, + 10983: 0x7F47, + 10984: 0x7FA1, + 10985: 0xFA1E, + 10986: 0x8301, + 10987: 0x8362, + 10988: 0x837F, + 10989: 0x83C7, + 10990: 0x83F6, + 10991: 0x8448, + 10992: 0x84B4, + 10993: 0x8553, + 10994: 0x8559, + 10995: 0x856B, + 10996: 0xFA1F, + 10997: 0x85B0, + 10998: 0xFA20, + 10999: 0xFA21, + 11000: 0x8807, + 11001: 0x88F5, + 11002: 0x8A12, + 11003: 0x8A37, + 11004: 0x8A79, + 11005: 0x8AA7, + 11006: 0x8ABE, + 11007: 0x8ADF, + 11008: 0xFA22, + 11009: 0x8AF6, + 11010: 0x8B53, + 11011: 0x8B7F, + 11012: 0x8CF0, + 11013: 0x8CF4, + 11014: 0x8D12, + 11015: 0x8D76, + 11016: 0xFA23, + 11017: 0x8ECF, + 11018: 0xFA24, + 11019: 0xFA25, + 11020: 0x9067, + 11021: 0x90DE, + 11022: 0xFA26, + 11023: 0x9115, + 11024: 0x9127, + 11025: 0x91DA, + 11026: 0x91D7, + 11027: 0x91DE, + 11028: 0x91ED, + 11029: 0x91EE, + 11030: 0x91E4, + 11031: 0x91E5, + 11032: 0x9206, + 11033: 0x9210, + 11034: 0x920A, + 11035: 0x923A, + 11036: 0x9240, + 11037: 0x923C, + 11038: 0x924E, + 11039: 0x9259, + 11040: 0x9251, + 11041: 0x9239, + 11042: 0x9267, + 11043: 0x92A7, + 11044: 0x9277, + 11045: 0x9278, + 11046: 0x92E7, + 11047: 0x92D7, + 11048: 0x92D9, + 11049: 0x92D0, + 11050: 0xFA27, + 11051: 0x92D5, + 11052: 0x92E0, + 11053: 0x92D3, + 11054: 0x9325, + 11055: 0x9321, + 11056: 0x92FB, + 11057: 0xFA28, + 11058: 0x931E, + 11059: 0x92FF, + 11060: 0x931D, + 11061: 0x9302, + 11062: 0x9370, + 11063: 0x9357, + 11064: 0x93A4, + 11065: 0x93C6, + 11066: 0x93DE, + 11067: 0x93F8, + 11068: 0x9431, + 11069: 0x9445, + 11070: 0x9448, + 11071: 0x9592, + 11072: 0xF9DC, + 11073: 0xFA29, + 11074: 0x969D, + 11075: 0x96AF, + 11076: 0x9733, + 11077: 0x973B, + 11078: 0x9743, + 11079: 0x974D, + 11080: 0x974F, + 11081: 0x9751, + 11082: 0x9755, + 11083: 0x9857, + 11084: 0x9865, + 11085: 0xFA2A, + 11086: 0xFA2B, + 11087: 0x9927, + 11088: 0xFA2C, + 11089: 0x999E, + 11090: 0x9A4E, + 11091: 0x9AD9, + 11092: 0x9ADC, + 11093: 0x9B75, + 11094: 0x9B72, + 11095: 0x9B8F, + 11096: 0x9BB1, + 11097: 0x9BBB, + 11098: 0x9C00, + 11099: 0x9D70, + 11100: 0x9D6B, + 11101: 0xFA2D, + 11102: 0x9E19, + 11103: 0x9ED1, +} + +// jis0212Decode is the decoding table from JIS 0212 code to Unicode. +// It is defined at http://encoding.spec.whatwg.org/index-jis0212.txt +var jis0212Decode = [...]uint16{ + 108: 0x02D8, + 109: 0x02C7, + 110: 0x00B8, + 111: 0x02D9, + 112: 0x02DD, + 113: 0x00AF, + 114: 0x02DB, + 115: 0x02DA, + 116: 0xFF5E, + 117: 0x0384, + 118: 0x0385, + 127: 0x00A1, + 128: 0x00A6, + 129: 0x00BF, + 168: 0x00BA, + 169: 0x00AA, + 170: 0x00A9, + 171: 0x00AE, + 172: 0x2122, + 173: 0x00A4, + 174: 0x2116, + 534: 0x0386, + 535: 0x0388, + 536: 0x0389, + 537: 0x038A, + 538: 0x03AA, + 540: 0x038C, + 542: 0x038E, + 543: 0x03AB, + 545: 0x038F, + 550: 0x03AC, + 551: 0x03AD, + 552: 0x03AE, + 553: 0x03AF, + 554: 0x03CA, + 555: 0x0390, + 556: 0x03CC, + 557: 0x03C2, + 558: 0x03CD, + 559: 0x03CB, + 560: 0x03B0, + 561: 0x03CE, + 597: 0x0402, + 598: 0x0403, + 599: 0x0404, + 600: 0x0405, + 601: 0x0406, + 602: 0x0407, + 603: 0x0408, + 604: 0x0409, + 605: 0x040A, + 606: 0x040B, + 607: 0x040C, + 608: 0x040E, + 609: 0x040F, + 645: 0x0452, + 646: 0x0453, + 647: 0x0454, + 648: 0x0455, + 649: 0x0456, + 650: 0x0457, + 651: 0x0458, + 652: 0x0459, + 653: 0x045A, + 654: 0x045B, + 655: 0x045C, + 656: 0x045E, + 657: 0x045F, + 752: 0x00C6, + 753: 0x0110, + 755: 0x0126, + 757: 0x0132, + 759: 0x0141, + 760: 0x013F, + 762: 0x014A, + 763: 0x00D8, + 764: 0x0152, + 766: 0x0166, + 767: 0x00DE, + 784: 0x00E6, + 785: 0x0111, + 786: 0x00F0, + 787: 0x0127, + 788: 0x0131, + 789: 0x0133, + 790: 0x0138, + 791: 0x0142, + 792: 0x0140, + 793: 0x0149, + 794: 0x014B, + 795: 0x00F8, + 796: 0x0153, + 797: 0x00DF, + 798: 0x0167, + 799: 0x00FE, + 846: 0x00C1, + 847: 0x00C0, + 848: 0x00C4, + 849: 0x00C2, + 850: 0x0102, + 851: 0x01CD, + 852: 0x0100, + 853: 0x0104, + 854: 0x00C5, + 855: 0x00C3, + 856: 0x0106, + 857: 0x0108, + 858: 0x010C, + 859: 0x00C7, + 860: 0x010A, + 861: 0x010E, + 862: 0x00C9, + 863: 0x00C8, + 864: 0x00CB, + 865: 0x00CA, + 866: 0x011A, + 867: 0x0116, + 868: 0x0112, + 869: 0x0118, + 871: 0x011C, + 872: 0x011E, + 873: 0x0122, + 874: 0x0120, + 875: 0x0124, + 876: 0x00CD, + 877: 0x00CC, + 878: 0x00CF, + 879: 0x00CE, + 880: 0x01CF, + 881: 0x0130, + 882: 0x012A, + 883: 0x012E, + 884: 0x0128, + 885: 0x0134, + 886: 0x0136, + 887: 0x0139, + 888: 0x013D, + 889: 0x013B, + 890: 0x0143, + 891: 0x0147, + 892: 0x0145, + 893: 0x00D1, + 894: 0x00D3, + 895: 0x00D2, + 896: 0x00D6, + 897: 0x00D4, + 898: 0x01D1, + 899: 0x0150, + 900: 0x014C, + 901: 0x00D5, + 902: 0x0154, + 903: 0x0158, + 904: 0x0156, + 905: 0x015A, + 906: 0x015C, + 907: 0x0160, + 908: 0x015E, + 909: 0x0164, + 910: 0x0162, + 911: 0x00DA, + 912: 0x00D9, + 913: 0x00DC, + 914: 0x00DB, + 915: 0x016C, + 916: 0x01D3, + 917: 0x0170, + 918: 0x016A, + 919: 0x0172, + 920: 0x016E, + 921: 0x0168, + 922: 0x01D7, + 923: 0x01DB, + 924: 0x01D9, + 925: 0x01D5, + 926: 0x0174, + 927: 0x00DD, + 928: 0x0178, + 929: 0x0176, + 930: 0x0179, + 931: 0x017D, + 932: 0x017B, + 940: 0x00E1, + 941: 0x00E0, + 942: 0x00E4, + 943: 0x00E2, + 944: 0x0103, + 945: 0x01CE, + 946: 0x0101, + 947: 0x0105, + 948: 0x00E5, + 949: 0x00E3, + 950: 0x0107, + 951: 0x0109, + 952: 0x010D, + 953: 0x00E7, + 954: 0x010B, + 955: 0x010F, + 956: 0x00E9, + 957: 0x00E8, + 958: 0x00EB, + 959: 0x00EA, + 960: 0x011B, + 961: 0x0117, + 962: 0x0113, + 963: 0x0119, + 964: 0x01F5, + 965: 0x011D, + 966: 0x011F, + 968: 0x0121, + 969: 0x0125, + 970: 0x00ED, + 971: 0x00EC, + 972: 0x00EF, + 973: 0x00EE, + 974: 0x01D0, + 976: 0x012B, + 977: 0x012F, + 978: 0x0129, + 979: 0x0135, + 980: 0x0137, + 981: 0x013A, + 982: 0x013E, + 983: 0x013C, + 984: 0x0144, + 985: 0x0148, + 986: 0x0146, + 987: 0x00F1, + 988: 0x00F3, + 989: 0x00F2, + 990: 0x00F6, + 991: 0x00F4, + 992: 0x01D2, + 993: 0x0151, + 994: 0x014D, + 995: 0x00F5, + 996: 0x0155, + 997: 0x0159, + 998: 0x0157, + 999: 0x015B, + 1000: 0x015D, + 1001: 0x0161, + 1002: 0x015F, + 1003: 0x0165, + 1004: 0x0163, + 1005: 0x00FA, + 1006: 0x00F9, + 1007: 0x00FC, + 1008: 0x00FB, + 1009: 0x016D, + 1010: 0x01D4, + 1011: 0x0171, + 1012: 0x016B, + 1013: 0x0173, + 1014: 0x016F, + 1015: 0x0169, + 1016: 0x01D8, + 1017: 0x01DC, + 1018: 0x01DA, + 1019: 0x01D6, + 1020: 0x0175, + 1021: 0x00FD, + 1022: 0x00FF, + 1023: 0x0177, + 1024: 0x017A, + 1025: 0x017E, + 1026: 0x017C, + 1410: 0x4E02, + 1411: 0x4E04, + 1412: 0x4E05, + 1413: 0x4E0C, + 1414: 0x4E12, + 1415: 0x4E1F, + 1416: 0x4E23, + 1417: 0x4E24, + 1418: 0x4E28, + 1419: 0x4E2B, + 1420: 0x4E2E, + 1421: 0x4E2F, + 1422: 0x4E30, + 1423: 0x4E35, + 1424: 0x4E40, + 1425: 0x4E41, + 1426: 0x4E44, + 1427: 0x4E47, + 1428: 0x4E51, + 1429: 0x4E5A, + 1430: 0x4E5C, + 1431: 0x4E63, + 1432: 0x4E68, + 1433: 0x4E69, + 1434: 0x4E74, + 1435: 0x4E75, + 1436: 0x4E79, + 1437: 0x4E7F, + 1438: 0x4E8D, + 1439: 0x4E96, + 1440: 0x4E97, + 1441: 0x4E9D, + 1442: 0x4EAF, + 1443: 0x4EB9, + 1444: 0x4EC3, + 1445: 0x4ED0, + 1446: 0x4EDA, + 1447: 0x4EDB, + 1448: 0x4EE0, + 1449: 0x4EE1, + 1450: 0x4EE2, + 1451: 0x4EE8, + 1452: 0x4EEF, + 1453: 0x4EF1, + 1454: 0x4EF3, + 1455: 0x4EF5, + 1456: 0x4EFD, + 1457: 0x4EFE, + 1458: 0x4EFF, + 1459: 0x4F00, + 1460: 0x4F02, + 1461: 0x4F03, + 1462: 0x4F08, + 1463: 0x4F0B, + 1464: 0x4F0C, + 1465: 0x4F12, + 1466: 0x4F15, + 1467: 0x4F16, + 1468: 0x4F17, + 1469: 0x4F19, + 1470: 0x4F2E, + 1471: 0x4F31, + 1472: 0x4F60, + 1473: 0x4F33, + 1474: 0x4F35, + 1475: 0x4F37, + 1476: 0x4F39, + 1477: 0x4F3B, + 1478: 0x4F3E, + 1479: 0x4F40, + 1480: 0x4F42, + 1481: 0x4F48, + 1482: 0x4F49, + 1483: 0x4F4B, + 1484: 0x4F4C, + 1485: 0x4F52, + 1486: 0x4F54, + 1487: 0x4F56, + 1488: 0x4F58, + 1489: 0x4F5F, + 1490: 0x4F63, + 1491: 0x4F6A, + 1492: 0x4F6C, + 1493: 0x4F6E, + 1494: 0x4F71, + 1495: 0x4F77, + 1496: 0x4F78, + 1497: 0x4F79, + 1498: 0x4F7A, + 1499: 0x4F7D, + 1500: 0x4F7E, + 1501: 0x4F81, + 1502: 0x4F82, + 1503: 0x4F84, + 1504: 0x4F85, + 1505: 0x4F89, + 1506: 0x4F8A, + 1507: 0x4F8C, + 1508: 0x4F8E, + 1509: 0x4F90, + 1510: 0x4F92, + 1511: 0x4F93, + 1512: 0x4F94, + 1513: 0x4F97, + 1514: 0x4F99, + 1515: 0x4F9A, + 1516: 0x4F9E, + 1517: 0x4F9F, + 1518: 0x4FB2, + 1519: 0x4FB7, + 1520: 0x4FB9, + 1521: 0x4FBB, + 1522: 0x4FBC, + 1523: 0x4FBD, + 1524: 0x4FBE, + 1525: 0x4FC0, + 1526: 0x4FC1, + 1527: 0x4FC5, + 1528: 0x4FC6, + 1529: 0x4FC8, + 1530: 0x4FC9, + 1531: 0x4FCB, + 1532: 0x4FCC, + 1533: 0x4FCD, + 1534: 0x4FCF, + 1535: 0x4FD2, + 1536: 0x4FDC, + 1537: 0x4FE0, + 1538: 0x4FE2, + 1539: 0x4FF0, + 1540: 0x4FF2, + 1541: 0x4FFC, + 1542: 0x4FFD, + 1543: 0x4FFF, + 1544: 0x5000, + 1545: 0x5001, + 1546: 0x5004, + 1547: 0x5007, + 1548: 0x500A, + 1549: 0x500C, + 1550: 0x500E, + 1551: 0x5010, + 1552: 0x5013, + 1553: 0x5017, + 1554: 0x5018, + 1555: 0x501B, + 1556: 0x501C, + 1557: 0x501D, + 1558: 0x501E, + 1559: 0x5022, + 1560: 0x5027, + 1561: 0x502E, + 1562: 0x5030, + 1563: 0x5032, + 1564: 0x5033, + 1565: 0x5035, + 1566: 0x5040, + 1567: 0x5041, + 1568: 0x5042, + 1569: 0x5045, + 1570: 0x5046, + 1571: 0x504A, + 1572: 0x504C, + 1573: 0x504E, + 1574: 0x5051, + 1575: 0x5052, + 1576: 0x5053, + 1577: 0x5057, + 1578: 0x5059, + 1579: 0x505F, + 1580: 0x5060, + 1581: 0x5062, + 1582: 0x5063, + 1583: 0x5066, + 1584: 0x5067, + 1585: 0x506A, + 1586: 0x506D, + 1587: 0x5070, + 1588: 0x5071, + 1589: 0x503B, + 1590: 0x5081, + 1591: 0x5083, + 1592: 0x5084, + 1593: 0x5086, + 1594: 0x508A, + 1595: 0x508E, + 1596: 0x508F, + 1597: 0x5090, + 1598: 0x5092, + 1599: 0x5093, + 1600: 0x5094, + 1601: 0x5096, + 1602: 0x509B, + 1603: 0x509C, + 1604: 0x509E, + 1605: 0x509F, + 1606: 0x50A0, + 1607: 0x50A1, + 1608: 0x50A2, + 1609: 0x50AA, + 1610: 0x50AF, + 1611: 0x50B0, + 1612: 0x50B9, + 1613: 0x50BA, + 1614: 0x50BD, + 1615: 0x50C0, + 1616: 0x50C3, + 1617: 0x50C4, + 1618: 0x50C7, + 1619: 0x50CC, + 1620: 0x50CE, + 1621: 0x50D0, + 1622: 0x50D3, + 1623: 0x50D4, + 1624: 0x50D8, + 1625: 0x50DC, + 1626: 0x50DD, + 1627: 0x50DF, + 1628: 0x50E2, + 1629: 0x50E4, + 1630: 0x50E6, + 1631: 0x50E8, + 1632: 0x50E9, + 1633: 0x50EF, + 1634: 0x50F1, + 1635: 0x50F6, + 1636: 0x50FA, + 1637: 0x50FE, + 1638: 0x5103, + 1639: 0x5106, + 1640: 0x5107, + 1641: 0x5108, + 1642: 0x510B, + 1643: 0x510C, + 1644: 0x510D, + 1645: 0x510E, + 1646: 0x50F2, + 1647: 0x5110, + 1648: 0x5117, + 1649: 0x5119, + 1650: 0x511B, + 1651: 0x511C, + 1652: 0x511D, + 1653: 0x511E, + 1654: 0x5123, + 1655: 0x5127, + 1656: 0x5128, + 1657: 0x512C, + 1658: 0x512D, + 1659: 0x512F, + 1660: 0x5131, + 1661: 0x5133, + 1662: 0x5134, + 1663: 0x5135, + 1664: 0x5138, + 1665: 0x5139, + 1666: 0x5142, + 1667: 0x514A, + 1668: 0x514F, + 1669: 0x5153, + 1670: 0x5155, + 1671: 0x5157, + 1672: 0x5158, + 1673: 0x515F, + 1674: 0x5164, + 1675: 0x5166, + 1676: 0x517E, + 1677: 0x5183, + 1678: 0x5184, + 1679: 0x518B, + 1680: 0x518E, + 1681: 0x5198, + 1682: 0x519D, + 1683: 0x51A1, + 1684: 0x51A3, + 1685: 0x51AD, + 1686: 0x51B8, + 1687: 0x51BA, + 1688: 0x51BC, + 1689: 0x51BE, + 1690: 0x51BF, + 1691: 0x51C2, + 1692: 0x51C8, + 1693: 0x51CF, + 1694: 0x51D1, + 1695: 0x51D2, + 1696: 0x51D3, + 1697: 0x51D5, + 1698: 0x51D8, + 1699: 0x51DE, + 1700: 0x51E2, + 1701: 0x51E5, + 1702: 0x51EE, + 1703: 0x51F2, + 1704: 0x51F3, + 1705: 0x51F4, + 1706: 0x51F7, + 1707: 0x5201, + 1708: 0x5202, + 1709: 0x5205, + 1710: 0x5212, + 1711: 0x5213, + 1712: 0x5215, + 1713: 0x5216, + 1714: 0x5218, + 1715: 0x5222, + 1716: 0x5228, + 1717: 0x5231, + 1718: 0x5232, + 1719: 0x5235, + 1720: 0x523C, + 1721: 0x5245, + 1722: 0x5249, + 1723: 0x5255, + 1724: 0x5257, + 1725: 0x5258, + 1726: 0x525A, + 1727: 0x525C, + 1728: 0x525F, + 1729: 0x5260, + 1730: 0x5261, + 1731: 0x5266, + 1732: 0x526E, + 1733: 0x5277, + 1734: 0x5278, + 1735: 0x5279, + 1736: 0x5280, + 1737: 0x5282, + 1738: 0x5285, + 1739: 0x528A, + 1740: 0x528C, + 1741: 0x5293, + 1742: 0x5295, + 1743: 0x5296, + 1744: 0x5297, + 1745: 0x5298, + 1746: 0x529A, + 1747: 0x529C, + 1748: 0x52A4, + 1749: 0x52A5, + 1750: 0x52A6, + 1751: 0x52A7, + 1752: 0x52AF, + 1753: 0x52B0, + 1754: 0x52B6, + 1755: 0x52B7, + 1756: 0x52B8, + 1757: 0x52BA, + 1758: 0x52BB, + 1759: 0x52BD, + 1760: 0x52C0, + 1761: 0x52C4, + 1762: 0x52C6, + 1763: 0x52C8, + 1764: 0x52CC, + 1765: 0x52CF, + 1766: 0x52D1, + 1767: 0x52D4, + 1768: 0x52D6, + 1769: 0x52DB, + 1770: 0x52DC, + 1771: 0x52E1, + 1772: 0x52E5, + 1773: 0x52E8, + 1774: 0x52E9, + 1775: 0x52EA, + 1776: 0x52EC, + 1777: 0x52F0, + 1778: 0x52F1, + 1779: 0x52F4, + 1780: 0x52F6, + 1781: 0x52F7, + 1782: 0x5300, + 1783: 0x5303, + 1784: 0x530A, + 1785: 0x530B, + 1786: 0x530C, + 1787: 0x5311, + 1788: 0x5313, + 1789: 0x5318, + 1790: 0x531B, + 1791: 0x531C, + 1792: 0x531E, + 1793: 0x531F, + 1794: 0x5325, + 1795: 0x5327, + 1796: 0x5328, + 1797: 0x5329, + 1798: 0x532B, + 1799: 0x532C, + 1800: 0x532D, + 1801: 0x5330, + 1802: 0x5332, + 1803: 0x5335, + 1804: 0x533C, + 1805: 0x533D, + 1806: 0x533E, + 1807: 0x5342, + 1808: 0x534C, + 1809: 0x534B, + 1810: 0x5359, + 1811: 0x535B, + 1812: 0x5361, + 1813: 0x5363, + 1814: 0x5365, + 1815: 0x536C, + 1816: 0x536D, + 1817: 0x5372, + 1818: 0x5379, + 1819: 0x537E, + 1820: 0x5383, + 1821: 0x5387, + 1822: 0x5388, + 1823: 0x538E, + 1824: 0x5393, + 1825: 0x5394, + 1826: 0x5399, + 1827: 0x539D, + 1828: 0x53A1, + 1829: 0x53A4, + 1830: 0x53AA, + 1831: 0x53AB, + 1832: 0x53AF, + 1833: 0x53B2, + 1834: 0x53B4, + 1835: 0x53B5, + 1836: 0x53B7, + 1837: 0x53B8, + 1838: 0x53BA, + 1839: 0x53BD, + 1840: 0x53C0, + 1841: 0x53C5, + 1842: 0x53CF, + 1843: 0x53D2, + 1844: 0x53D3, + 1845: 0x53D5, + 1846: 0x53DA, + 1847: 0x53DD, + 1848: 0x53DE, + 1849: 0x53E0, + 1850: 0x53E6, + 1851: 0x53E7, + 1852: 0x53F5, + 1853: 0x5402, + 1854: 0x5413, + 1855: 0x541A, + 1856: 0x5421, + 1857: 0x5427, + 1858: 0x5428, + 1859: 0x542A, + 1860: 0x542F, + 1861: 0x5431, + 1862: 0x5434, + 1863: 0x5435, + 1864: 0x5443, + 1865: 0x5444, + 1866: 0x5447, + 1867: 0x544D, + 1868: 0x544F, + 1869: 0x545E, + 1870: 0x5462, + 1871: 0x5464, + 1872: 0x5466, + 1873: 0x5467, + 1874: 0x5469, + 1875: 0x546B, + 1876: 0x546D, + 1877: 0x546E, + 1878: 0x5474, + 1879: 0x547F, + 1880: 0x5481, + 1881: 0x5483, + 1882: 0x5485, + 1883: 0x5488, + 1884: 0x5489, + 1885: 0x548D, + 1886: 0x5491, + 1887: 0x5495, + 1888: 0x5496, + 1889: 0x549C, + 1890: 0x549F, + 1891: 0x54A1, + 1892: 0x54A6, + 1893: 0x54A7, + 1894: 0x54A9, + 1895: 0x54AA, + 1896: 0x54AD, + 1897: 0x54AE, + 1898: 0x54B1, + 1899: 0x54B7, + 1900: 0x54B9, + 1901: 0x54BA, + 1902: 0x54BB, + 1903: 0x54BF, + 1904: 0x54C6, + 1905: 0x54CA, + 1906: 0x54CD, + 1907: 0x54CE, + 1908: 0x54E0, + 1909: 0x54EA, + 1910: 0x54EC, + 1911: 0x54EF, + 1912: 0x54F6, + 1913: 0x54FC, + 1914: 0x54FE, + 1915: 0x54FF, + 1916: 0x5500, + 1917: 0x5501, + 1918: 0x5505, + 1919: 0x5508, + 1920: 0x5509, + 1921: 0x550C, + 1922: 0x550D, + 1923: 0x550E, + 1924: 0x5515, + 1925: 0x552A, + 1926: 0x552B, + 1927: 0x5532, + 1928: 0x5535, + 1929: 0x5536, + 1930: 0x553B, + 1931: 0x553C, + 1932: 0x553D, + 1933: 0x5541, + 1934: 0x5547, + 1935: 0x5549, + 1936: 0x554A, + 1937: 0x554D, + 1938: 0x5550, + 1939: 0x5551, + 1940: 0x5558, + 1941: 0x555A, + 1942: 0x555B, + 1943: 0x555E, + 1944: 0x5560, + 1945: 0x5561, + 1946: 0x5564, + 1947: 0x5566, + 1948: 0x557F, + 1949: 0x5581, + 1950: 0x5582, + 1951: 0x5586, + 1952: 0x5588, + 1953: 0x558E, + 1954: 0x558F, + 1955: 0x5591, + 1956: 0x5592, + 1957: 0x5593, + 1958: 0x5594, + 1959: 0x5597, + 1960: 0x55A3, + 1961: 0x55A4, + 1962: 0x55AD, + 1963: 0x55B2, + 1964: 0x55BF, + 1965: 0x55C1, + 1966: 0x55C3, + 1967: 0x55C6, + 1968: 0x55C9, + 1969: 0x55CB, + 1970: 0x55CC, + 1971: 0x55CE, + 1972: 0x55D1, + 1973: 0x55D2, + 1974: 0x55D3, + 1975: 0x55D7, + 1976: 0x55D8, + 1977: 0x55DB, + 1978: 0x55DE, + 1979: 0x55E2, + 1980: 0x55E9, + 1981: 0x55F6, + 1982: 0x55FF, + 1983: 0x5605, + 1984: 0x5608, + 1985: 0x560A, + 1986: 0x560D, + 1987: 0x560E, + 1988: 0x560F, + 1989: 0x5610, + 1990: 0x5611, + 1991: 0x5612, + 1992: 0x5619, + 1993: 0x562C, + 1994: 0x5630, + 1995: 0x5633, + 1996: 0x5635, + 1997: 0x5637, + 1998: 0x5639, + 1999: 0x563B, + 2000: 0x563C, + 2001: 0x563D, + 2002: 0x563F, + 2003: 0x5640, + 2004: 0x5641, + 2005: 0x5643, + 2006: 0x5644, + 2007: 0x5646, + 2008: 0x5649, + 2009: 0x564B, + 2010: 0x564D, + 2011: 0x564F, + 2012: 0x5654, + 2013: 0x565E, + 2014: 0x5660, + 2015: 0x5661, + 2016: 0x5662, + 2017: 0x5663, + 2018: 0x5666, + 2019: 0x5669, + 2020: 0x566D, + 2021: 0x566F, + 2022: 0x5671, + 2023: 0x5672, + 2024: 0x5675, + 2025: 0x5684, + 2026: 0x5685, + 2027: 0x5688, + 2028: 0x568B, + 2029: 0x568C, + 2030: 0x5695, + 2031: 0x5699, + 2032: 0x569A, + 2033: 0x569D, + 2034: 0x569E, + 2035: 0x569F, + 2036: 0x56A6, + 2037: 0x56A7, + 2038: 0x56A8, + 2039: 0x56A9, + 2040: 0x56AB, + 2041: 0x56AC, + 2042: 0x56AD, + 2043: 0x56B1, + 2044: 0x56B3, + 2045: 0x56B7, + 2046: 0x56BE, + 2047: 0x56C5, + 2048: 0x56C9, + 2049: 0x56CA, + 2050: 0x56CB, + 2051: 0x56CF, + 2052: 0x56D0, + 2053: 0x56CC, + 2054: 0x56CD, + 2055: 0x56D9, + 2056: 0x56DC, + 2057: 0x56DD, + 2058: 0x56DF, + 2059: 0x56E1, + 2060: 0x56E4, + 2061: 0x56E5, + 2062: 0x56E6, + 2063: 0x56E7, + 2064: 0x56E8, + 2065: 0x56F1, + 2066: 0x56EB, + 2067: 0x56ED, + 2068: 0x56F6, + 2069: 0x56F7, + 2070: 0x5701, + 2071: 0x5702, + 2072: 0x5707, + 2073: 0x570A, + 2074: 0x570C, + 2075: 0x5711, + 2076: 0x5715, + 2077: 0x571A, + 2078: 0x571B, + 2079: 0x571D, + 2080: 0x5720, + 2081: 0x5722, + 2082: 0x5723, + 2083: 0x5724, + 2084: 0x5725, + 2085: 0x5729, + 2086: 0x572A, + 2087: 0x572C, + 2088: 0x572E, + 2089: 0x572F, + 2090: 0x5733, + 2091: 0x5734, + 2092: 0x573D, + 2093: 0x573E, + 2094: 0x573F, + 2095: 0x5745, + 2096: 0x5746, + 2097: 0x574C, + 2098: 0x574D, + 2099: 0x5752, + 2100: 0x5762, + 2101: 0x5765, + 2102: 0x5767, + 2103: 0x5768, + 2104: 0x576B, + 2105: 0x576D, + 2106: 0x576E, + 2107: 0x576F, + 2108: 0x5770, + 2109: 0x5771, + 2110: 0x5773, + 2111: 0x5774, + 2112: 0x5775, + 2113: 0x5777, + 2114: 0x5779, + 2115: 0x577A, + 2116: 0x577B, + 2117: 0x577C, + 2118: 0x577E, + 2119: 0x5781, + 2120: 0x5783, + 2121: 0x578C, + 2122: 0x5794, + 2123: 0x5797, + 2124: 0x5799, + 2125: 0x579A, + 2126: 0x579C, + 2127: 0x579D, + 2128: 0x579E, + 2129: 0x579F, + 2130: 0x57A1, + 2131: 0x5795, + 2132: 0x57A7, + 2133: 0x57A8, + 2134: 0x57A9, + 2135: 0x57AC, + 2136: 0x57B8, + 2137: 0x57BD, + 2138: 0x57C7, + 2139: 0x57C8, + 2140: 0x57CC, + 2141: 0x57CF, + 2142: 0x57D5, + 2143: 0x57DD, + 2144: 0x57DE, + 2145: 0x57E4, + 2146: 0x57E6, + 2147: 0x57E7, + 2148: 0x57E9, + 2149: 0x57ED, + 2150: 0x57F0, + 2151: 0x57F5, + 2152: 0x57F6, + 2153: 0x57F8, + 2154: 0x57FD, + 2155: 0x57FE, + 2156: 0x57FF, + 2157: 0x5803, + 2158: 0x5804, + 2159: 0x5808, + 2160: 0x5809, + 2161: 0x57E1, + 2162: 0x580C, + 2163: 0x580D, + 2164: 0x581B, + 2165: 0x581E, + 2166: 0x581F, + 2167: 0x5820, + 2168: 0x5826, + 2169: 0x5827, + 2170: 0x582D, + 2171: 0x5832, + 2172: 0x5839, + 2173: 0x583F, + 2174: 0x5849, + 2175: 0x584C, + 2176: 0x584D, + 2177: 0x584F, + 2178: 0x5850, + 2179: 0x5855, + 2180: 0x585F, + 2181: 0x5861, + 2182: 0x5864, + 2183: 0x5867, + 2184: 0x5868, + 2185: 0x5878, + 2186: 0x587C, + 2187: 0x587F, + 2188: 0x5880, + 2189: 0x5881, + 2190: 0x5887, + 2191: 0x5888, + 2192: 0x5889, + 2193: 0x588A, + 2194: 0x588C, + 2195: 0x588D, + 2196: 0x588F, + 2197: 0x5890, + 2198: 0x5894, + 2199: 0x5896, + 2200: 0x589D, + 2201: 0x58A0, + 2202: 0x58A1, + 2203: 0x58A2, + 2204: 0x58A6, + 2205: 0x58A9, + 2206: 0x58B1, + 2207: 0x58B2, + 2208: 0x58C4, + 2209: 0x58BC, + 2210: 0x58C2, + 2211: 0x58C8, + 2212: 0x58CD, + 2213: 0x58CE, + 2214: 0x58D0, + 2215: 0x58D2, + 2216: 0x58D4, + 2217: 0x58D6, + 2218: 0x58DA, + 2219: 0x58DD, + 2220: 0x58E1, + 2221: 0x58E2, + 2222: 0x58E9, + 2223: 0x58F3, + 2224: 0x5905, + 2225: 0x5906, + 2226: 0x590B, + 2227: 0x590C, + 2228: 0x5912, + 2229: 0x5913, + 2230: 0x5914, + 2231: 0x8641, + 2232: 0x591D, + 2233: 0x5921, + 2234: 0x5923, + 2235: 0x5924, + 2236: 0x5928, + 2237: 0x592F, + 2238: 0x5930, + 2239: 0x5933, + 2240: 0x5935, + 2241: 0x5936, + 2242: 0x593F, + 2243: 0x5943, + 2244: 0x5946, + 2245: 0x5952, + 2246: 0x5953, + 2247: 0x5959, + 2248: 0x595B, + 2249: 0x595D, + 2250: 0x595E, + 2251: 0x595F, + 2252: 0x5961, + 2253: 0x5963, + 2254: 0x596B, + 2255: 0x596D, + 2256: 0x596F, + 2257: 0x5972, + 2258: 0x5975, + 2259: 0x5976, + 2260: 0x5979, + 2261: 0x597B, + 2262: 0x597C, + 2263: 0x598B, + 2264: 0x598C, + 2265: 0x598E, + 2266: 0x5992, + 2267: 0x5995, + 2268: 0x5997, + 2269: 0x599F, + 2270: 0x59A4, + 2271: 0x59A7, + 2272: 0x59AD, + 2273: 0x59AE, + 2274: 0x59AF, + 2275: 0x59B0, + 2276: 0x59B3, + 2277: 0x59B7, + 2278: 0x59BA, + 2279: 0x59BC, + 2280: 0x59C1, + 2281: 0x59C3, + 2282: 0x59C4, + 2283: 0x59C8, + 2284: 0x59CA, + 2285: 0x59CD, + 2286: 0x59D2, + 2287: 0x59DD, + 2288: 0x59DE, + 2289: 0x59DF, + 2290: 0x59E3, + 2291: 0x59E4, + 2292: 0x59E7, + 2293: 0x59EE, + 2294: 0x59EF, + 2295: 0x59F1, + 2296: 0x59F2, + 2297: 0x59F4, + 2298: 0x59F7, + 2299: 0x5A00, + 2300: 0x5A04, + 2301: 0x5A0C, + 2302: 0x5A0D, + 2303: 0x5A0E, + 2304: 0x5A12, + 2305: 0x5A13, + 2306: 0x5A1E, + 2307: 0x5A23, + 2308: 0x5A24, + 2309: 0x5A27, + 2310: 0x5A28, + 2311: 0x5A2A, + 2312: 0x5A2D, + 2313: 0x5A30, + 2314: 0x5A44, + 2315: 0x5A45, + 2316: 0x5A47, + 2317: 0x5A48, + 2318: 0x5A4C, + 2319: 0x5A50, + 2320: 0x5A55, + 2321: 0x5A5E, + 2322: 0x5A63, + 2323: 0x5A65, + 2324: 0x5A67, + 2325: 0x5A6D, + 2326: 0x5A77, + 2327: 0x5A7A, + 2328: 0x5A7B, + 2329: 0x5A7E, + 2330: 0x5A8B, + 2331: 0x5A90, + 2332: 0x5A93, + 2333: 0x5A96, + 2334: 0x5A99, + 2335: 0x5A9C, + 2336: 0x5A9E, + 2337: 0x5A9F, + 2338: 0x5AA0, + 2339: 0x5AA2, + 2340: 0x5AA7, + 2341: 0x5AAC, + 2342: 0x5AB1, + 2343: 0x5AB2, + 2344: 0x5AB3, + 2345: 0x5AB5, + 2346: 0x5AB8, + 2347: 0x5ABA, + 2348: 0x5ABB, + 2349: 0x5ABF, + 2350: 0x5AC4, + 2351: 0x5AC6, + 2352: 0x5AC8, + 2353: 0x5ACF, + 2354: 0x5ADA, + 2355: 0x5ADC, + 2356: 0x5AE0, + 2357: 0x5AE5, + 2358: 0x5AEA, + 2359: 0x5AEE, + 2360: 0x5AF5, + 2361: 0x5AF6, + 2362: 0x5AFD, + 2363: 0x5B00, + 2364: 0x5B01, + 2365: 0x5B08, + 2366: 0x5B17, + 2367: 0x5B34, + 2368: 0x5B19, + 2369: 0x5B1B, + 2370: 0x5B1D, + 2371: 0x5B21, + 2372: 0x5B25, + 2373: 0x5B2D, + 2374: 0x5B38, + 2375: 0x5B41, + 2376: 0x5B4B, + 2377: 0x5B4C, + 2378: 0x5B52, + 2379: 0x5B56, + 2380: 0x5B5E, + 2381: 0x5B68, + 2382: 0x5B6E, + 2383: 0x5B6F, + 2384: 0x5B7C, + 2385: 0x5B7D, + 2386: 0x5B7E, + 2387: 0x5B7F, + 2388: 0x5B81, + 2389: 0x5B84, + 2390: 0x5B86, + 2391: 0x5B8A, + 2392: 0x5B8E, + 2393: 0x5B90, + 2394: 0x5B91, + 2395: 0x5B93, + 2396: 0x5B94, + 2397: 0x5B96, + 2398: 0x5BA8, + 2399: 0x5BA9, + 2400: 0x5BAC, + 2401: 0x5BAD, + 2402: 0x5BAF, + 2403: 0x5BB1, + 2404: 0x5BB2, + 2405: 0x5BB7, + 2406: 0x5BBA, + 2407: 0x5BBC, + 2408: 0x5BC0, + 2409: 0x5BC1, + 2410: 0x5BCD, + 2411: 0x5BCF, + 2412: 0x5BD6, + 2413: 0x5BD7, + 2414: 0x5BD8, + 2415: 0x5BD9, + 2416: 0x5BDA, + 2417: 0x5BE0, + 2418: 0x5BEF, + 2419: 0x5BF1, + 2420: 0x5BF4, + 2421: 0x5BFD, + 2422: 0x5C0C, + 2423: 0x5C17, + 2424: 0x5C1E, + 2425: 0x5C1F, + 2426: 0x5C23, + 2427: 0x5C26, + 2428: 0x5C29, + 2429: 0x5C2B, + 2430: 0x5C2C, + 2431: 0x5C2E, + 2432: 0x5C30, + 2433: 0x5C32, + 2434: 0x5C35, + 2435: 0x5C36, + 2436: 0x5C59, + 2437: 0x5C5A, + 2438: 0x5C5C, + 2439: 0x5C62, + 2440: 0x5C63, + 2441: 0x5C67, + 2442: 0x5C68, + 2443: 0x5C69, + 2444: 0x5C6D, + 2445: 0x5C70, + 2446: 0x5C74, + 2447: 0x5C75, + 2448: 0x5C7A, + 2449: 0x5C7B, + 2450: 0x5C7C, + 2451: 0x5C7D, + 2452: 0x5C87, + 2453: 0x5C88, + 2454: 0x5C8A, + 2455: 0x5C8F, + 2456: 0x5C92, + 2457: 0x5C9D, + 2458: 0x5C9F, + 2459: 0x5CA0, + 2460: 0x5CA2, + 2461: 0x5CA3, + 2462: 0x5CA6, + 2463: 0x5CAA, + 2464: 0x5CB2, + 2465: 0x5CB4, + 2466: 0x5CB5, + 2467: 0x5CBA, + 2468: 0x5CC9, + 2469: 0x5CCB, + 2470: 0x5CD2, + 2471: 0x5CDD, + 2472: 0x5CD7, + 2473: 0x5CEE, + 2474: 0x5CF1, + 2475: 0x5CF2, + 2476: 0x5CF4, + 2477: 0x5D01, + 2478: 0x5D06, + 2479: 0x5D0D, + 2480: 0x5D12, + 2481: 0x5D2B, + 2482: 0x5D23, + 2483: 0x5D24, + 2484: 0x5D26, + 2485: 0x5D27, + 2486: 0x5D31, + 2487: 0x5D34, + 2488: 0x5D39, + 2489: 0x5D3D, + 2490: 0x5D3F, + 2491: 0x5D42, + 2492: 0x5D43, + 2493: 0x5D46, + 2494: 0x5D48, + 2495: 0x5D55, + 2496: 0x5D51, + 2497: 0x5D59, + 2498: 0x5D4A, + 2499: 0x5D5F, + 2500: 0x5D60, + 2501: 0x5D61, + 2502: 0x5D62, + 2503: 0x5D64, + 2504: 0x5D6A, + 2505: 0x5D6D, + 2506: 0x5D70, + 2507: 0x5D79, + 2508: 0x5D7A, + 2509: 0x5D7E, + 2510: 0x5D7F, + 2511: 0x5D81, + 2512: 0x5D83, + 2513: 0x5D88, + 2514: 0x5D8A, + 2515: 0x5D92, + 2516: 0x5D93, + 2517: 0x5D94, + 2518: 0x5D95, + 2519: 0x5D99, + 2520: 0x5D9B, + 2521: 0x5D9F, + 2522: 0x5DA0, + 2523: 0x5DA7, + 2524: 0x5DAB, + 2525: 0x5DB0, + 2526: 0x5DB4, + 2527: 0x5DB8, + 2528: 0x5DB9, + 2529: 0x5DC3, + 2530: 0x5DC7, + 2531: 0x5DCB, + 2532: 0x5DD0, + 2533: 0x5DCE, + 2534: 0x5DD8, + 2535: 0x5DD9, + 2536: 0x5DE0, + 2537: 0x5DE4, + 2538: 0x5DE9, + 2539: 0x5DF8, + 2540: 0x5DF9, + 2541: 0x5E00, + 2542: 0x5E07, + 2543: 0x5E0D, + 2544: 0x5E12, + 2545: 0x5E14, + 2546: 0x5E15, + 2547: 0x5E18, + 2548: 0x5E1F, + 2549: 0x5E20, + 2550: 0x5E2E, + 2551: 0x5E28, + 2552: 0x5E32, + 2553: 0x5E35, + 2554: 0x5E3E, + 2555: 0x5E4B, + 2556: 0x5E50, + 2557: 0x5E49, + 2558: 0x5E51, + 2559: 0x5E56, + 2560: 0x5E58, + 2561: 0x5E5B, + 2562: 0x5E5C, + 2563: 0x5E5E, + 2564: 0x5E68, + 2565: 0x5E6A, + 2566: 0x5E6B, + 2567: 0x5E6C, + 2568: 0x5E6D, + 2569: 0x5E6E, + 2570: 0x5E70, + 2571: 0x5E80, + 2572: 0x5E8B, + 2573: 0x5E8E, + 2574: 0x5EA2, + 2575: 0x5EA4, + 2576: 0x5EA5, + 2577: 0x5EA8, + 2578: 0x5EAA, + 2579: 0x5EAC, + 2580: 0x5EB1, + 2581: 0x5EB3, + 2582: 0x5EBD, + 2583: 0x5EBE, + 2584: 0x5EBF, + 2585: 0x5EC6, + 2586: 0x5ECC, + 2587: 0x5ECB, + 2588: 0x5ECE, + 2589: 0x5ED1, + 2590: 0x5ED2, + 2591: 0x5ED4, + 2592: 0x5ED5, + 2593: 0x5EDC, + 2594: 0x5EDE, + 2595: 0x5EE5, + 2596: 0x5EEB, + 2597: 0x5F02, + 2598: 0x5F06, + 2599: 0x5F07, + 2600: 0x5F08, + 2601: 0x5F0E, + 2602: 0x5F19, + 2603: 0x5F1C, + 2604: 0x5F1D, + 2605: 0x5F21, + 2606: 0x5F22, + 2607: 0x5F23, + 2608: 0x5F24, + 2609: 0x5F28, + 2610: 0x5F2B, + 2611: 0x5F2C, + 2612: 0x5F2E, + 2613: 0x5F30, + 2614: 0x5F34, + 2615: 0x5F36, + 2616: 0x5F3B, + 2617: 0x5F3D, + 2618: 0x5F3F, + 2619: 0x5F40, + 2620: 0x5F44, + 2621: 0x5F45, + 2622: 0x5F47, + 2623: 0x5F4D, + 2624: 0x5F50, + 2625: 0x5F54, + 2626: 0x5F58, + 2627: 0x5F5B, + 2628: 0x5F60, + 2629: 0x5F63, + 2630: 0x5F64, + 2631: 0x5F67, + 2632: 0x5F6F, + 2633: 0x5F72, + 2634: 0x5F74, + 2635: 0x5F75, + 2636: 0x5F78, + 2637: 0x5F7A, + 2638: 0x5F7D, + 2639: 0x5F7E, + 2640: 0x5F89, + 2641: 0x5F8D, + 2642: 0x5F8F, + 2643: 0x5F96, + 2644: 0x5F9C, + 2645: 0x5F9D, + 2646: 0x5FA2, + 2647: 0x5FA7, + 2648: 0x5FAB, + 2649: 0x5FA4, + 2650: 0x5FAC, + 2651: 0x5FAF, + 2652: 0x5FB0, + 2653: 0x5FB1, + 2654: 0x5FB8, + 2655: 0x5FC4, + 2656: 0x5FC7, + 2657: 0x5FC8, + 2658: 0x5FC9, + 2659: 0x5FCB, + 2660: 0x5FD0, + 2661: 0x5FD1, + 2662: 0x5FD2, + 2663: 0x5FD3, + 2664: 0x5FD4, + 2665: 0x5FDE, + 2666: 0x5FE1, + 2667: 0x5FE2, + 2668: 0x5FE8, + 2669: 0x5FE9, + 2670: 0x5FEA, + 2671: 0x5FEC, + 2672: 0x5FED, + 2673: 0x5FEE, + 2674: 0x5FEF, + 2675: 0x5FF2, + 2676: 0x5FF3, + 2677: 0x5FF6, + 2678: 0x5FFA, + 2679: 0x5FFC, + 2680: 0x6007, + 2681: 0x600A, + 2682: 0x600D, + 2683: 0x6013, + 2684: 0x6014, + 2685: 0x6017, + 2686: 0x6018, + 2687: 0x601A, + 2688: 0x601F, + 2689: 0x6024, + 2690: 0x602D, + 2691: 0x6033, + 2692: 0x6035, + 2693: 0x6040, + 2694: 0x6047, + 2695: 0x6048, + 2696: 0x6049, + 2697: 0x604C, + 2698: 0x6051, + 2699: 0x6054, + 2700: 0x6056, + 2701: 0x6057, + 2702: 0x605D, + 2703: 0x6061, + 2704: 0x6067, + 2705: 0x6071, + 2706: 0x607E, + 2707: 0x607F, + 2708: 0x6082, + 2709: 0x6086, + 2710: 0x6088, + 2711: 0x608A, + 2712: 0x608E, + 2713: 0x6091, + 2714: 0x6093, + 2715: 0x6095, + 2716: 0x6098, + 2717: 0x609D, + 2718: 0x609E, + 2719: 0x60A2, + 2720: 0x60A4, + 2721: 0x60A5, + 2722: 0x60A8, + 2723: 0x60B0, + 2724: 0x60B1, + 2725: 0x60B7, + 2726: 0x60BB, + 2727: 0x60BE, + 2728: 0x60C2, + 2729: 0x60C4, + 2730: 0x60C8, + 2731: 0x60C9, + 2732: 0x60CA, + 2733: 0x60CB, + 2734: 0x60CE, + 2735: 0x60CF, + 2736: 0x60D4, + 2737: 0x60D5, + 2738: 0x60D9, + 2739: 0x60DB, + 2740: 0x60DD, + 2741: 0x60DE, + 2742: 0x60E2, + 2743: 0x60E5, + 2744: 0x60F2, + 2745: 0x60F5, + 2746: 0x60F8, + 2747: 0x60FC, + 2748: 0x60FD, + 2749: 0x6102, + 2750: 0x6107, + 2751: 0x610A, + 2752: 0x610C, + 2753: 0x6110, + 2754: 0x6111, + 2755: 0x6112, + 2756: 0x6113, + 2757: 0x6114, + 2758: 0x6116, + 2759: 0x6117, + 2760: 0x6119, + 2761: 0x611C, + 2762: 0x611E, + 2763: 0x6122, + 2764: 0x612A, + 2765: 0x612B, + 2766: 0x6130, + 2767: 0x6131, + 2768: 0x6135, + 2769: 0x6136, + 2770: 0x6137, + 2771: 0x6139, + 2772: 0x6141, + 2773: 0x6145, + 2774: 0x6146, + 2775: 0x6149, + 2776: 0x615E, + 2777: 0x6160, + 2778: 0x616C, + 2779: 0x6172, + 2780: 0x6178, + 2781: 0x617B, + 2782: 0x617C, + 2783: 0x617F, + 2784: 0x6180, + 2785: 0x6181, + 2786: 0x6183, + 2787: 0x6184, + 2788: 0x618B, + 2789: 0x618D, + 2790: 0x6192, + 2791: 0x6193, + 2792: 0x6197, + 2793: 0x6198, + 2794: 0x619C, + 2795: 0x619D, + 2796: 0x619F, + 2797: 0x61A0, + 2798: 0x61A5, + 2799: 0x61A8, + 2800: 0x61AA, + 2801: 0x61AD, + 2802: 0x61B8, + 2803: 0x61B9, + 2804: 0x61BC, + 2805: 0x61C0, + 2806: 0x61C1, + 2807: 0x61C2, + 2808: 0x61CE, + 2809: 0x61CF, + 2810: 0x61D5, + 2811: 0x61DC, + 2812: 0x61DD, + 2813: 0x61DE, + 2814: 0x61DF, + 2815: 0x61E1, + 2816: 0x61E2, + 2817: 0x61E7, + 2818: 0x61E9, + 2819: 0x61E5, + 2820: 0x61EC, + 2821: 0x61ED, + 2822: 0x61EF, + 2823: 0x6201, + 2824: 0x6203, + 2825: 0x6204, + 2826: 0x6207, + 2827: 0x6213, + 2828: 0x6215, + 2829: 0x621C, + 2830: 0x6220, + 2831: 0x6222, + 2832: 0x6223, + 2833: 0x6227, + 2834: 0x6229, + 2835: 0x622B, + 2836: 0x6239, + 2837: 0x623D, + 2838: 0x6242, + 2839: 0x6243, + 2840: 0x6244, + 2841: 0x6246, + 2842: 0x624C, + 2843: 0x6250, + 2844: 0x6251, + 2845: 0x6252, + 2846: 0x6254, + 2847: 0x6256, + 2848: 0x625A, + 2849: 0x625C, + 2850: 0x6264, + 2851: 0x626D, + 2852: 0x626F, + 2853: 0x6273, + 2854: 0x627A, + 2855: 0x627D, + 2856: 0x628D, + 2857: 0x628E, + 2858: 0x628F, + 2859: 0x6290, + 2860: 0x62A6, + 2861: 0x62A8, + 2862: 0x62B3, + 2863: 0x62B6, + 2864: 0x62B7, + 2865: 0x62BA, + 2866: 0x62BE, + 2867: 0x62BF, + 2868: 0x62C4, + 2869: 0x62CE, + 2870: 0x62D5, + 2871: 0x62D6, + 2872: 0x62DA, + 2873: 0x62EA, + 2874: 0x62F2, + 2875: 0x62F4, + 2876: 0x62FC, + 2877: 0x62FD, + 2878: 0x6303, + 2879: 0x6304, + 2880: 0x630A, + 2881: 0x630B, + 2882: 0x630D, + 2883: 0x6310, + 2884: 0x6313, + 2885: 0x6316, + 2886: 0x6318, + 2887: 0x6329, + 2888: 0x632A, + 2889: 0x632D, + 2890: 0x6335, + 2891: 0x6336, + 2892: 0x6339, + 2893: 0x633C, + 2894: 0x6341, + 2895: 0x6342, + 2896: 0x6343, + 2897: 0x6344, + 2898: 0x6346, + 2899: 0x634A, + 2900: 0x634B, + 2901: 0x634E, + 2902: 0x6352, + 2903: 0x6353, + 2904: 0x6354, + 2905: 0x6358, + 2906: 0x635B, + 2907: 0x6365, + 2908: 0x6366, + 2909: 0x636C, + 2910: 0x636D, + 2911: 0x6371, + 2912: 0x6374, + 2913: 0x6375, + 2914: 0x6378, + 2915: 0x637C, + 2916: 0x637D, + 2917: 0x637F, + 2918: 0x6382, + 2919: 0x6384, + 2920: 0x6387, + 2921: 0x638A, + 2922: 0x6390, + 2923: 0x6394, + 2924: 0x6395, + 2925: 0x6399, + 2926: 0x639A, + 2927: 0x639E, + 2928: 0x63A4, + 2929: 0x63A6, + 2930: 0x63AD, + 2931: 0x63AE, + 2932: 0x63AF, + 2933: 0x63BD, + 2934: 0x63C1, + 2935: 0x63C5, + 2936: 0x63C8, + 2937: 0x63CE, + 2938: 0x63D1, + 2939: 0x63D3, + 2940: 0x63D4, + 2941: 0x63D5, + 2942: 0x63DC, + 2943: 0x63E0, + 2944: 0x63E5, + 2945: 0x63EA, + 2946: 0x63EC, + 2947: 0x63F2, + 2948: 0x63F3, + 2949: 0x63F5, + 2950: 0x63F8, + 2951: 0x63F9, + 2952: 0x6409, + 2953: 0x640A, + 2954: 0x6410, + 2955: 0x6412, + 2956: 0x6414, + 2957: 0x6418, + 2958: 0x641E, + 2959: 0x6420, + 2960: 0x6422, + 2961: 0x6424, + 2962: 0x6425, + 2963: 0x6429, + 2964: 0x642A, + 2965: 0x642F, + 2966: 0x6430, + 2967: 0x6435, + 2968: 0x643D, + 2969: 0x643F, + 2970: 0x644B, + 2971: 0x644F, + 2972: 0x6451, + 2973: 0x6452, + 2974: 0x6453, + 2975: 0x6454, + 2976: 0x645A, + 2977: 0x645B, + 2978: 0x645C, + 2979: 0x645D, + 2980: 0x645F, + 2981: 0x6460, + 2982: 0x6461, + 2983: 0x6463, + 2984: 0x646D, + 2985: 0x6473, + 2986: 0x6474, + 2987: 0x647B, + 2988: 0x647D, + 2989: 0x6485, + 2990: 0x6487, + 2991: 0x648F, + 2992: 0x6490, + 2993: 0x6491, + 2994: 0x6498, + 2995: 0x6499, + 2996: 0x649B, + 2997: 0x649D, + 2998: 0x649F, + 2999: 0x64A1, + 3000: 0x64A3, + 3001: 0x64A6, + 3002: 0x64A8, + 3003: 0x64AC, + 3004: 0x64B3, + 3005: 0x64BD, + 3006: 0x64BE, + 3007: 0x64BF, + 3008: 0x64C4, + 3009: 0x64C9, + 3010: 0x64CA, + 3011: 0x64CB, + 3012: 0x64CC, + 3013: 0x64CE, + 3014: 0x64D0, + 3015: 0x64D1, + 3016: 0x64D5, + 3017: 0x64D7, + 3018: 0x64E4, + 3019: 0x64E5, + 3020: 0x64E9, + 3021: 0x64EA, + 3022: 0x64ED, + 3023: 0x64F0, + 3024: 0x64F5, + 3025: 0x64F7, + 3026: 0x64FB, + 3027: 0x64FF, + 3028: 0x6501, + 3029: 0x6504, + 3030: 0x6508, + 3031: 0x6509, + 3032: 0x650A, + 3033: 0x650F, + 3034: 0x6513, + 3035: 0x6514, + 3036: 0x6516, + 3037: 0x6519, + 3038: 0x651B, + 3039: 0x651E, + 3040: 0x651F, + 3041: 0x6522, + 3042: 0x6526, + 3043: 0x6529, + 3044: 0x652E, + 3045: 0x6531, + 3046: 0x653A, + 3047: 0x653C, + 3048: 0x653D, + 3049: 0x6543, + 3050: 0x6547, + 3051: 0x6549, + 3052: 0x6550, + 3053: 0x6552, + 3054: 0x6554, + 3055: 0x655F, + 3056: 0x6560, + 3057: 0x6567, + 3058: 0x656B, + 3059: 0x657A, + 3060: 0x657D, + 3061: 0x6581, + 3062: 0x6585, + 3063: 0x658A, + 3064: 0x6592, + 3065: 0x6595, + 3066: 0x6598, + 3067: 0x659D, + 3068: 0x65A0, + 3069: 0x65A3, + 3070: 0x65A6, + 3071: 0x65AE, + 3072: 0x65B2, + 3073: 0x65B3, + 3074: 0x65B4, + 3075: 0x65BF, + 3076: 0x65C2, + 3077: 0x65C8, + 3078: 0x65C9, + 3079: 0x65CE, + 3080: 0x65D0, + 3081: 0x65D4, + 3082: 0x65D6, + 3083: 0x65D8, + 3084: 0x65DF, + 3085: 0x65F0, + 3086: 0x65F2, + 3087: 0x65F4, + 3088: 0x65F5, + 3089: 0x65F9, + 3090: 0x65FE, + 3091: 0x65FF, + 3092: 0x6600, + 3093: 0x6604, + 3094: 0x6608, + 3095: 0x6609, + 3096: 0x660D, + 3097: 0x6611, + 3098: 0x6612, + 3099: 0x6615, + 3100: 0x6616, + 3101: 0x661D, + 3102: 0x661E, + 3103: 0x6621, + 3104: 0x6622, + 3105: 0x6623, + 3106: 0x6624, + 3107: 0x6626, + 3108: 0x6629, + 3109: 0x662A, + 3110: 0x662B, + 3111: 0x662C, + 3112: 0x662E, + 3113: 0x6630, + 3114: 0x6631, + 3115: 0x6633, + 3116: 0x6639, + 3117: 0x6637, + 3118: 0x6640, + 3119: 0x6645, + 3120: 0x6646, + 3121: 0x664A, + 3122: 0x664C, + 3123: 0x6651, + 3124: 0x664E, + 3125: 0x6657, + 3126: 0x6658, + 3127: 0x6659, + 3128: 0x665B, + 3129: 0x665C, + 3130: 0x6660, + 3131: 0x6661, + 3132: 0x66FB, + 3133: 0x666A, + 3134: 0x666B, + 3135: 0x666C, + 3136: 0x667E, + 3137: 0x6673, + 3138: 0x6675, + 3139: 0x667F, + 3140: 0x6677, + 3141: 0x6678, + 3142: 0x6679, + 3143: 0x667B, + 3144: 0x6680, + 3145: 0x667C, + 3146: 0x668B, + 3147: 0x668C, + 3148: 0x668D, + 3149: 0x6690, + 3150: 0x6692, + 3151: 0x6699, + 3152: 0x669A, + 3153: 0x669B, + 3154: 0x669C, + 3155: 0x669F, + 3156: 0x66A0, + 3157: 0x66A4, + 3158: 0x66AD, + 3159: 0x66B1, + 3160: 0x66B2, + 3161: 0x66B5, + 3162: 0x66BB, + 3163: 0x66BF, + 3164: 0x66C0, + 3165: 0x66C2, + 3166: 0x66C3, + 3167: 0x66C8, + 3168: 0x66CC, + 3169: 0x66CE, + 3170: 0x66CF, + 3171: 0x66D4, + 3172: 0x66DB, + 3173: 0x66DF, + 3174: 0x66E8, + 3175: 0x66EB, + 3176: 0x66EC, + 3177: 0x66EE, + 3178: 0x66FA, + 3179: 0x6705, + 3180: 0x6707, + 3181: 0x670E, + 3182: 0x6713, + 3183: 0x6719, + 3184: 0x671C, + 3185: 0x6720, + 3186: 0x6722, + 3187: 0x6733, + 3188: 0x673E, + 3189: 0x6745, + 3190: 0x6747, + 3191: 0x6748, + 3192: 0x674C, + 3193: 0x6754, + 3194: 0x6755, + 3195: 0x675D, + 3196: 0x6766, + 3197: 0x676C, + 3198: 0x676E, + 3199: 0x6774, + 3200: 0x6776, + 3201: 0x677B, + 3202: 0x6781, + 3203: 0x6784, + 3204: 0x678E, + 3205: 0x678F, + 3206: 0x6791, + 3207: 0x6793, + 3208: 0x6796, + 3209: 0x6798, + 3210: 0x6799, + 3211: 0x679B, + 3212: 0x67B0, + 3213: 0x67B1, + 3214: 0x67B2, + 3215: 0x67B5, + 3216: 0x67BB, + 3217: 0x67BC, + 3218: 0x67BD, + 3219: 0x67F9, + 3220: 0x67C0, + 3221: 0x67C2, + 3222: 0x67C3, + 3223: 0x67C5, + 3224: 0x67C8, + 3225: 0x67C9, + 3226: 0x67D2, + 3227: 0x67D7, + 3228: 0x67D9, + 3229: 0x67DC, + 3230: 0x67E1, + 3231: 0x67E6, + 3232: 0x67F0, + 3233: 0x67F2, + 3234: 0x67F6, + 3235: 0x67F7, + 3236: 0x6852, + 3237: 0x6814, + 3238: 0x6819, + 3239: 0x681D, + 3240: 0x681F, + 3241: 0x6828, + 3242: 0x6827, + 3243: 0x682C, + 3244: 0x682D, + 3245: 0x682F, + 3246: 0x6830, + 3247: 0x6831, + 3248: 0x6833, + 3249: 0x683B, + 3250: 0x683F, + 3251: 0x6844, + 3252: 0x6845, + 3253: 0x684A, + 3254: 0x684C, + 3255: 0x6855, + 3256: 0x6857, + 3257: 0x6858, + 3258: 0x685B, + 3259: 0x686B, + 3260: 0x686E, + 3261: 0x686F, + 3262: 0x6870, + 3263: 0x6871, + 3264: 0x6872, + 3265: 0x6875, + 3266: 0x6879, + 3267: 0x687A, + 3268: 0x687B, + 3269: 0x687C, + 3270: 0x6882, + 3271: 0x6884, + 3272: 0x6886, + 3273: 0x6888, + 3274: 0x6896, + 3275: 0x6898, + 3276: 0x689A, + 3277: 0x689C, + 3278: 0x68A1, + 3279: 0x68A3, + 3280: 0x68A5, + 3281: 0x68A9, + 3282: 0x68AA, + 3283: 0x68AE, + 3284: 0x68B2, + 3285: 0x68BB, + 3286: 0x68C5, + 3287: 0x68C8, + 3288: 0x68CC, + 3289: 0x68CF, + 3290: 0x68D0, + 3291: 0x68D1, + 3292: 0x68D3, + 3293: 0x68D6, + 3294: 0x68D9, + 3295: 0x68DC, + 3296: 0x68DD, + 3297: 0x68E5, + 3298: 0x68E8, + 3299: 0x68EA, + 3300: 0x68EB, + 3301: 0x68EC, + 3302: 0x68ED, + 3303: 0x68F0, + 3304: 0x68F1, + 3305: 0x68F5, + 3306: 0x68F6, + 3307: 0x68FB, + 3308: 0x68FC, + 3309: 0x68FD, + 3310: 0x6906, + 3311: 0x6909, + 3312: 0x690A, + 3313: 0x6910, + 3314: 0x6911, + 3315: 0x6913, + 3316: 0x6916, + 3317: 0x6917, + 3318: 0x6931, + 3319: 0x6933, + 3320: 0x6935, + 3321: 0x6938, + 3322: 0x693B, + 3323: 0x6942, + 3324: 0x6945, + 3325: 0x6949, + 3326: 0x694E, + 3327: 0x6957, + 3328: 0x695B, + 3329: 0x6963, + 3330: 0x6964, + 3331: 0x6965, + 3332: 0x6966, + 3333: 0x6968, + 3334: 0x6969, + 3335: 0x696C, + 3336: 0x6970, + 3337: 0x6971, + 3338: 0x6972, + 3339: 0x697A, + 3340: 0x697B, + 3341: 0x697F, + 3342: 0x6980, + 3343: 0x698D, + 3344: 0x6992, + 3345: 0x6996, + 3346: 0x6998, + 3347: 0x69A1, + 3348: 0x69A5, + 3349: 0x69A6, + 3350: 0x69A8, + 3351: 0x69AB, + 3352: 0x69AD, + 3353: 0x69AF, + 3354: 0x69B7, + 3355: 0x69B8, + 3356: 0x69BA, + 3357: 0x69BC, + 3358: 0x69C5, + 3359: 0x69C8, + 3360: 0x69D1, + 3361: 0x69D6, + 3362: 0x69D7, + 3363: 0x69E2, + 3364: 0x69E5, + 3365: 0x69EE, + 3366: 0x69EF, + 3367: 0x69F1, + 3368: 0x69F3, + 3369: 0x69F5, + 3370: 0x69FE, + 3371: 0x6A00, + 3372: 0x6A01, + 3373: 0x6A03, + 3374: 0x6A0F, + 3375: 0x6A11, + 3376: 0x6A15, + 3377: 0x6A1A, + 3378: 0x6A1D, + 3379: 0x6A20, + 3380: 0x6A24, + 3381: 0x6A28, + 3382: 0x6A30, + 3383: 0x6A32, + 3384: 0x6A34, + 3385: 0x6A37, + 3386: 0x6A3B, + 3387: 0x6A3E, + 3388: 0x6A3F, + 3389: 0x6A45, + 3390: 0x6A46, + 3391: 0x6A49, + 3392: 0x6A4A, + 3393: 0x6A4E, + 3394: 0x6A50, + 3395: 0x6A51, + 3396: 0x6A52, + 3397: 0x6A55, + 3398: 0x6A56, + 3399: 0x6A5B, + 3400: 0x6A64, + 3401: 0x6A67, + 3402: 0x6A6A, + 3403: 0x6A71, + 3404: 0x6A73, + 3405: 0x6A7E, + 3406: 0x6A81, + 3407: 0x6A83, + 3408: 0x6A86, + 3409: 0x6A87, + 3410: 0x6A89, + 3411: 0x6A8B, + 3412: 0x6A91, + 3413: 0x6A9B, + 3414: 0x6A9D, + 3415: 0x6A9E, + 3416: 0x6A9F, + 3417: 0x6AA5, + 3418: 0x6AAB, + 3419: 0x6AAF, + 3420: 0x6AB0, + 3421: 0x6AB1, + 3422: 0x6AB4, + 3423: 0x6ABD, + 3424: 0x6ABE, + 3425: 0x6ABF, + 3426: 0x6AC6, + 3427: 0x6AC9, + 3428: 0x6AC8, + 3429: 0x6ACC, + 3430: 0x6AD0, + 3431: 0x6AD4, + 3432: 0x6AD5, + 3433: 0x6AD6, + 3434: 0x6ADC, + 3435: 0x6ADD, + 3436: 0x6AE4, + 3437: 0x6AE7, + 3438: 0x6AEC, + 3439: 0x6AF0, + 3440: 0x6AF1, + 3441: 0x6AF2, + 3442: 0x6AFC, + 3443: 0x6AFD, + 3444: 0x6B02, + 3445: 0x6B03, + 3446: 0x6B06, + 3447: 0x6B07, + 3448: 0x6B09, + 3449: 0x6B0F, + 3450: 0x6B10, + 3451: 0x6B11, + 3452: 0x6B17, + 3453: 0x6B1B, + 3454: 0x6B1E, + 3455: 0x6B24, + 3456: 0x6B28, + 3457: 0x6B2B, + 3458: 0x6B2C, + 3459: 0x6B2F, + 3460: 0x6B35, + 3461: 0x6B36, + 3462: 0x6B3B, + 3463: 0x6B3F, + 3464: 0x6B46, + 3465: 0x6B4A, + 3466: 0x6B4D, + 3467: 0x6B52, + 3468: 0x6B56, + 3469: 0x6B58, + 3470: 0x6B5D, + 3471: 0x6B60, + 3472: 0x6B67, + 3473: 0x6B6B, + 3474: 0x6B6E, + 3475: 0x6B70, + 3476: 0x6B75, + 3477: 0x6B7D, + 3478: 0x6B7E, + 3479: 0x6B82, + 3480: 0x6B85, + 3481: 0x6B97, + 3482: 0x6B9B, + 3483: 0x6B9F, + 3484: 0x6BA0, + 3485: 0x6BA2, + 3486: 0x6BA3, + 3487: 0x6BA8, + 3488: 0x6BA9, + 3489: 0x6BAC, + 3490: 0x6BAD, + 3491: 0x6BAE, + 3492: 0x6BB0, + 3493: 0x6BB8, + 3494: 0x6BB9, + 3495: 0x6BBD, + 3496: 0x6BBE, + 3497: 0x6BC3, + 3498: 0x6BC4, + 3499: 0x6BC9, + 3500: 0x6BCC, + 3501: 0x6BD6, + 3502: 0x6BDA, + 3503: 0x6BE1, + 3504: 0x6BE3, + 3505: 0x6BE6, + 3506: 0x6BE7, + 3507: 0x6BEE, + 3508: 0x6BF1, + 3509: 0x6BF7, + 3510: 0x6BF9, + 3511: 0x6BFF, + 3512: 0x6C02, + 3513: 0x6C04, + 3514: 0x6C05, + 3515: 0x6C09, + 3516: 0x6C0D, + 3517: 0x6C0E, + 3518: 0x6C10, + 3519: 0x6C12, + 3520: 0x6C19, + 3521: 0x6C1F, + 3522: 0x6C26, + 3523: 0x6C27, + 3524: 0x6C28, + 3525: 0x6C2C, + 3526: 0x6C2E, + 3527: 0x6C33, + 3528: 0x6C35, + 3529: 0x6C36, + 3530: 0x6C3A, + 3531: 0x6C3B, + 3532: 0x6C3F, + 3533: 0x6C4A, + 3534: 0x6C4B, + 3535: 0x6C4D, + 3536: 0x6C4F, + 3537: 0x6C52, + 3538: 0x6C54, + 3539: 0x6C59, + 3540: 0x6C5B, + 3541: 0x6C5C, + 3542: 0x6C6B, + 3543: 0x6C6D, + 3544: 0x6C6F, + 3545: 0x6C74, + 3546: 0x6C76, + 3547: 0x6C78, + 3548: 0x6C79, + 3549: 0x6C7B, + 3550: 0x6C85, + 3551: 0x6C86, + 3552: 0x6C87, + 3553: 0x6C89, + 3554: 0x6C94, + 3555: 0x6C95, + 3556: 0x6C97, + 3557: 0x6C98, + 3558: 0x6C9C, + 3559: 0x6C9F, + 3560: 0x6CB0, + 3561: 0x6CB2, + 3562: 0x6CB4, + 3563: 0x6CC2, + 3564: 0x6CC6, + 3565: 0x6CCD, + 3566: 0x6CCF, + 3567: 0x6CD0, + 3568: 0x6CD1, + 3569: 0x6CD2, + 3570: 0x6CD4, + 3571: 0x6CD6, + 3572: 0x6CDA, + 3573: 0x6CDC, + 3574: 0x6CE0, + 3575: 0x6CE7, + 3576: 0x6CE9, + 3577: 0x6CEB, + 3578: 0x6CEC, + 3579: 0x6CEE, + 3580: 0x6CF2, + 3581: 0x6CF4, + 3582: 0x6D04, + 3583: 0x6D07, + 3584: 0x6D0A, + 3585: 0x6D0E, + 3586: 0x6D0F, + 3587: 0x6D11, + 3588: 0x6D13, + 3589: 0x6D1A, + 3590: 0x6D26, + 3591: 0x6D27, + 3592: 0x6D28, + 3593: 0x6C67, + 3594: 0x6D2E, + 3595: 0x6D2F, + 3596: 0x6D31, + 3597: 0x6D39, + 3598: 0x6D3C, + 3599: 0x6D3F, + 3600: 0x6D57, + 3601: 0x6D5E, + 3602: 0x6D5F, + 3603: 0x6D61, + 3604: 0x6D65, + 3605: 0x6D67, + 3606: 0x6D6F, + 3607: 0x6D70, + 3608: 0x6D7C, + 3609: 0x6D82, + 3610: 0x6D87, + 3611: 0x6D91, + 3612: 0x6D92, + 3613: 0x6D94, + 3614: 0x6D96, + 3615: 0x6D97, + 3616: 0x6D98, + 3617: 0x6DAA, + 3618: 0x6DAC, + 3619: 0x6DB4, + 3620: 0x6DB7, + 3621: 0x6DB9, + 3622: 0x6DBD, + 3623: 0x6DBF, + 3624: 0x6DC4, + 3625: 0x6DC8, + 3626: 0x6DCA, + 3627: 0x6DCE, + 3628: 0x6DCF, + 3629: 0x6DD6, + 3630: 0x6DDB, + 3631: 0x6DDD, + 3632: 0x6DDF, + 3633: 0x6DE0, + 3634: 0x6DE2, + 3635: 0x6DE5, + 3636: 0x6DE9, + 3637: 0x6DEF, + 3638: 0x6DF0, + 3639: 0x6DF4, + 3640: 0x6DF6, + 3641: 0x6DFC, + 3642: 0x6E00, + 3643: 0x6E04, + 3644: 0x6E1E, + 3645: 0x6E22, + 3646: 0x6E27, + 3647: 0x6E32, + 3648: 0x6E36, + 3649: 0x6E39, + 3650: 0x6E3B, + 3651: 0x6E3C, + 3652: 0x6E44, + 3653: 0x6E45, + 3654: 0x6E48, + 3655: 0x6E49, + 3656: 0x6E4B, + 3657: 0x6E4F, + 3658: 0x6E51, + 3659: 0x6E52, + 3660: 0x6E53, + 3661: 0x6E54, + 3662: 0x6E57, + 3663: 0x6E5C, + 3664: 0x6E5D, + 3665: 0x6E5E, + 3666: 0x6E62, + 3667: 0x6E63, + 3668: 0x6E68, + 3669: 0x6E73, + 3670: 0x6E7B, + 3671: 0x6E7D, + 3672: 0x6E8D, + 3673: 0x6E93, + 3674: 0x6E99, + 3675: 0x6EA0, + 3676: 0x6EA7, + 3677: 0x6EAD, + 3678: 0x6EAE, + 3679: 0x6EB1, + 3680: 0x6EB3, + 3681: 0x6EBB, + 3682: 0x6EBF, + 3683: 0x6EC0, + 3684: 0x6EC1, + 3685: 0x6EC3, + 3686: 0x6EC7, + 3687: 0x6EC8, + 3688: 0x6ECA, + 3689: 0x6ECD, + 3690: 0x6ECE, + 3691: 0x6ECF, + 3692: 0x6EEB, + 3693: 0x6EED, + 3694: 0x6EEE, + 3695: 0x6EF9, + 3696: 0x6EFB, + 3697: 0x6EFD, + 3698: 0x6F04, + 3699: 0x6F08, + 3700: 0x6F0A, + 3701: 0x6F0C, + 3702: 0x6F0D, + 3703: 0x6F16, + 3704: 0x6F18, + 3705: 0x6F1A, + 3706: 0x6F1B, + 3707: 0x6F26, + 3708: 0x6F29, + 3709: 0x6F2A, + 3710: 0x6F2F, + 3711: 0x6F30, + 3712: 0x6F33, + 3713: 0x6F36, + 3714: 0x6F3B, + 3715: 0x6F3C, + 3716: 0x6F2D, + 3717: 0x6F4F, + 3718: 0x6F51, + 3719: 0x6F52, + 3720: 0x6F53, + 3721: 0x6F57, + 3722: 0x6F59, + 3723: 0x6F5A, + 3724: 0x6F5D, + 3725: 0x6F5E, + 3726: 0x6F61, + 3727: 0x6F62, + 3728: 0x6F68, + 3729: 0x6F6C, + 3730: 0x6F7D, + 3731: 0x6F7E, + 3732: 0x6F83, + 3733: 0x6F87, + 3734: 0x6F88, + 3735: 0x6F8B, + 3736: 0x6F8C, + 3737: 0x6F8D, + 3738: 0x6F90, + 3739: 0x6F92, + 3740: 0x6F93, + 3741: 0x6F94, + 3742: 0x6F96, + 3743: 0x6F9A, + 3744: 0x6F9F, + 3745: 0x6FA0, + 3746: 0x6FA5, + 3747: 0x6FA6, + 3748: 0x6FA7, + 3749: 0x6FA8, + 3750: 0x6FAE, + 3751: 0x6FAF, + 3752: 0x6FB0, + 3753: 0x6FB5, + 3754: 0x6FB6, + 3755: 0x6FBC, + 3756: 0x6FC5, + 3757: 0x6FC7, + 3758: 0x6FC8, + 3759: 0x6FCA, + 3760: 0x6FDA, + 3761: 0x6FDE, + 3762: 0x6FE8, + 3763: 0x6FE9, + 3764: 0x6FF0, + 3765: 0x6FF5, + 3766: 0x6FF9, + 3767: 0x6FFC, + 3768: 0x6FFD, + 3769: 0x7000, + 3770: 0x7005, + 3771: 0x7006, + 3772: 0x7007, + 3773: 0x700D, + 3774: 0x7017, + 3775: 0x7020, + 3776: 0x7023, + 3777: 0x702F, + 3778: 0x7034, + 3779: 0x7037, + 3780: 0x7039, + 3781: 0x703C, + 3782: 0x7043, + 3783: 0x7044, + 3784: 0x7048, + 3785: 0x7049, + 3786: 0x704A, + 3787: 0x704B, + 3788: 0x7054, + 3789: 0x7055, + 3790: 0x705D, + 3791: 0x705E, + 3792: 0x704E, + 3793: 0x7064, + 3794: 0x7065, + 3795: 0x706C, + 3796: 0x706E, + 3797: 0x7075, + 3798: 0x7076, + 3799: 0x707E, + 3800: 0x7081, + 3801: 0x7085, + 3802: 0x7086, + 3803: 0x7094, + 3804: 0x7095, + 3805: 0x7096, + 3806: 0x7097, + 3807: 0x7098, + 3808: 0x709B, + 3809: 0x70A4, + 3810: 0x70AB, + 3811: 0x70B0, + 3812: 0x70B1, + 3813: 0x70B4, + 3814: 0x70B7, + 3815: 0x70CA, + 3816: 0x70D1, + 3817: 0x70D3, + 3818: 0x70D4, + 3819: 0x70D5, + 3820: 0x70D6, + 3821: 0x70D8, + 3822: 0x70DC, + 3823: 0x70E4, + 3824: 0x70FA, + 3825: 0x7103, + 3826: 0x7104, + 3827: 0x7105, + 3828: 0x7106, + 3829: 0x7107, + 3830: 0x710B, + 3831: 0x710C, + 3832: 0x710F, + 3833: 0x711E, + 3834: 0x7120, + 3835: 0x712B, + 3836: 0x712D, + 3837: 0x712F, + 3838: 0x7130, + 3839: 0x7131, + 3840: 0x7138, + 3841: 0x7141, + 3842: 0x7145, + 3843: 0x7146, + 3844: 0x7147, + 3845: 0x714A, + 3846: 0x714B, + 3847: 0x7150, + 3848: 0x7152, + 3849: 0x7157, + 3850: 0x715A, + 3851: 0x715C, + 3852: 0x715E, + 3853: 0x7160, + 3854: 0x7168, + 3855: 0x7179, + 3856: 0x7180, + 3857: 0x7185, + 3858: 0x7187, + 3859: 0x718C, + 3860: 0x7192, + 3861: 0x719A, + 3862: 0x719B, + 3863: 0x71A0, + 3864: 0x71A2, + 3865: 0x71AF, + 3866: 0x71B0, + 3867: 0x71B2, + 3868: 0x71B3, + 3869: 0x71BA, + 3870: 0x71BF, + 3871: 0x71C0, + 3872: 0x71C1, + 3873: 0x71C4, + 3874: 0x71CB, + 3875: 0x71CC, + 3876: 0x71D3, + 3877: 0x71D6, + 3878: 0x71D9, + 3879: 0x71DA, + 3880: 0x71DC, + 3881: 0x71F8, + 3882: 0x71FE, + 3883: 0x7200, + 3884: 0x7207, + 3885: 0x7208, + 3886: 0x7209, + 3887: 0x7213, + 3888: 0x7217, + 3889: 0x721A, + 3890: 0x721D, + 3891: 0x721F, + 3892: 0x7224, + 3893: 0x722B, + 3894: 0x722F, + 3895: 0x7234, + 3896: 0x7238, + 3897: 0x7239, + 3898: 0x7241, + 3899: 0x7242, + 3900: 0x7243, + 3901: 0x7245, + 3902: 0x724E, + 3903: 0x724F, + 3904: 0x7250, + 3905: 0x7253, + 3906: 0x7255, + 3907: 0x7256, + 3908: 0x725A, + 3909: 0x725C, + 3910: 0x725E, + 3911: 0x7260, + 3912: 0x7263, + 3913: 0x7268, + 3914: 0x726B, + 3915: 0x726E, + 3916: 0x726F, + 3917: 0x7271, + 3918: 0x7277, + 3919: 0x7278, + 3920: 0x727B, + 3921: 0x727C, + 3922: 0x727F, + 3923: 0x7284, + 3924: 0x7289, + 3925: 0x728D, + 3926: 0x728E, + 3927: 0x7293, + 3928: 0x729B, + 3929: 0x72A8, + 3930: 0x72AD, + 3931: 0x72AE, + 3932: 0x72B1, + 3933: 0x72B4, + 3934: 0x72BE, + 3935: 0x72C1, + 3936: 0x72C7, + 3937: 0x72C9, + 3938: 0x72CC, + 3939: 0x72D5, + 3940: 0x72D6, + 3941: 0x72D8, + 3942: 0x72DF, + 3943: 0x72E5, + 3944: 0x72F3, + 3945: 0x72F4, + 3946: 0x72FA, + 3947: 0x72FB, + 3948: 0x72FE, + 3949: 0x7302, + 3950: 0x7304, + 3951: 0x7305, + 3952: 0x7307, + 3953: 0x730B, + 3954: 0x730D, + 3955: 0x7312, + 3956: 0x7313, + 3957: 0x7318, + 3958: 0x7319, + 3959: 0x731E, + 3960: 0x7322, + 3961: 0x7324, + 3962: 0x7327, + 3963: 0x7328, + 3964: 0x732C, + 3965: 0x7331, + 3966: 0x7332, + 3967: 0x7335, + 3968: 0x733A, + 3969: 0x733B, + 3970: 0x733D, + 3971: 0x7343, + 3972: 0x734D, + 3973: 0x7350, + 3974: 0x7352, + 3975: 0x7356, + 3976: 0x7358, + 3977: 0x735D, + 3978: 0x735E, + 3979: 0x735F, + 3980: 0x7360, + 3981: 0x7366, + 3982: 0x7367, + 3983: 0x7369, + 3984: 0x736B, + 3985: 0x736C, + 3986: 0x736E, + 3987: 0x736F, + 3988: 0x7371, + 3989: 0x7377, + 3990: 0x7379, + 3991: 0x737C, + 3992: 0x7380, + 3993: 0x7381, + 3994: 0x7383, + 3995: 0x7385, + 3996: 0x7386, + 3997: 0x738E, + 3998: 0x7390, + 3999: 0x7393, + 4000: 0x7395, + 4001: 0x7397, + 4002: 0x7398, + 4003: 0x739C, + 4004: 0x739E, + 4005: 0x739F, + 4006: 0x73A0, + 4007: 0x73A2, + 4008: 0x73A5, + 4009: 0x73A6, + 4010: 0x73AA, + 4011: 0x73AB, + 4012: 0x73AD, + 4013: 0x73B5, + 4014: 0x73B7, + 4015: 0x73B9, + 4016: 0x73BC, + 4017: 0x73BD, + 4018: 0x73BF, + 4019: 0x73C5, + 4020: 0x73C6, + 4021: 0x73C9, + 4022: 0x73CB, + 4023: 0x73CC, + 4024: 0x73CF, + 4025: 0x73D2, + 4026: 0x73D3, + 4027: 0x73D6, + 4028: 0x73D9, + 4029: 0x73DD, + 4030: 0x73E1, + 4031: 0x73E3, + 4032: 0x73E6, + 4033: 0x73E7, + 4034: 0x73E9, + 4035: 0x73F4, + 4036: 0x73F5, + 4037: 0x73F7, + 4038: 0x73F9, + 4039: 0x73FA, + 4040: 0x73FB, + 4041: 0x73FD, + 4042: 0x73FF, + 4043: 0x7400, + 4044: 0x7401, + 4045: 0x7404, + 4046: 0x7407, + 4047: 0x740A, + 4048: 0x7411, + 4049: 0x741A, + 4050: 0x741B, + 4051: 0x7424, + 4052: 0x7426, + 4053: 0x7428, + 4054: 0x7429, + 4055: 0x742A, + 4056: 0x742B, + 4057: 0x742C, + 4058: 0x742D, + 4059: 0x742E, + 4060: 0x742F, + 4061: 0x7430, + 4062: 0x7431, + 4063: 0x7439, + 4064: 0x7440, + 4065: 0x7443, + 4066: 0x7444, + 4067: 0x7446, + 4068: 0x7447, + 4069: 0x744B, + 4070: 0x744D, + 4071: 0x7451, + 4072: 0x7452, + 4073: 0x7457, + 4074: 0x745D, + 4075: 0x7462, + 4076: 0x7466, + 4077: 0x7467, + 4078: 0x7468, + 4079: 0x746B, + 4080: 0x746D, + 4081: 0x746E, + 4082: 0x7471, + 4083: 0x7472, + 4084: 0x7480, + 4085: 0x7481, + 4086: 0x7485, + 4087: 0x7486, + 4088: 0x7487, + 4089: 0x7489, + 4090: 0x748F, + 4091: 0x7490, + 4092: 0x7491, + 4093: 0x7492, + 4094: 0x7498, + 4095: 0x7499, + 4096: 0x749A, + 4097: 0x749C, + 4098: 0x749F, + 4099: 0x74A0, + 4100: 0x74A1, + 4101: 0x74A3, + 4102: 0x74A6, + 4103: 0x74A8, + 4104: 0x74A9, + 4105: 0x74AA, + 4106: 0x74AB, + 4107: 0x74AE, + 4108: 0x74AF, + 4109: 0x74B1, + 4110: 0x74B2, + 4111: 0x74B5, + 4112: 0x74B9, + 4113: 0x74BB, + 4114: 0x74BF, + 4115: 0x74C8, + 4116: 0x74C9, + 4117: 0x74CC, + 4118: 0x74D0, + 4119: 0x74D3, + 4120: 0x74D8, + 4121: 0x74DA, + 4122: 0x74DB, + 4123: 0x74DE, + 4124: 0x74DF, + 4125: 0x74E4, + 4126: 0x74E8, + 4127: 0x74EA, + 4128: 0x74EB, + 4129: 0x74EF, + 4130: 0x74F4, + 4131: 0x74FA, + 4132: 0x74FB, + 4133: 0x74FC, + 4134: 0x74FF, + 4135: 0x7506, + 4136: 0x7512, + 4137: 0x7516, + 4138: 0x7517, + 4139: 0x7520, + 4140: 0x7521, + 4141: 0x7524, + 4142: 0x7527, + 4143: 0x7529, + 4144: 0x752A, + 4145: 0x752F, + 4146: 0x7536, + 4147: 0x7539, + 4148: 0x753D, + 4149: 0x753E, + 4150: 0x753F, + 4151: 0x7540, + 4152: 0x7543, + 4153: 0x7547, + 4154: 0x7548, + 4155: 0x754E, + 4156: 0x7550, + 4157: 0x7552, + 4158: 0x7557, + 4159: 0x755E, + 4160: 0x755F, + 4161: 0x7561, + 4162: 0x756F, + 4163: 0x7571, + 4164: 0x7579, + 4165: 0x757A, + 4166: 0x757B, + 4167: 0x757C, + 4168: 0x757D, + 4169: 0x757E, + 4170: 0x7581, + 4171: 0x7585, + 4172: 0x7590, + 4173: 0x7592, + 4174: 0x7593, + 4175: 0x7595, + 4176: 0x7599, + 4177: 0x759C, + 4178: 0x75A2, + 4179: 0x75A4, + 4180: 0x75B4, + 4181: 0x75BA, + 4182: 0x75BF, + 4183: 0x75C0, + 4184: 0x75C1, + 4185: 0x75C4, + 4186: 0x75C6, + 4187: 0x75CC, + 4188: 0x75CE, + 4189: 0x75CF, + 4190: 0x75D7, + 4191: 0x75DC, + 4192: 0x75DF, + 4193: 0x75E0, + 4194: 0x75E1, + 4195: 0x75E4, + 4196: 0x75E7, + 4197: 0x75EC, + 4198: 0x75EE, + 4199: 0x75EF, + 4200: 0x75F1, + 4201: 0x75F9, + 4202: 0x7600, + 4203: 0x7602, + 4204: 0x7603, + 4205: 0x7604, + 4206: 0x7607, + 4207: 0x7608, + 4208: 0x760A, + 4209: 0x760C, + 4210: 0x760F, + 4211: 0x7612, + 4212: 0x7613, + 4213: 0x7615, + 4214: 0x7616, + 4215: 0x7619, + 4216: 0x761B, + 4217: 0x761C, + 4218: 0x761D, + 4219: 0x761E, + 4220: 0x7623, + 4221: 0x7625, + 4222: 0x7626, + 4223: 0x7629, + 4224: 0x762D, + 4225: 0x7632, + 4226: 0x7633, + 4227: 0x7635, + 4228: 0x7638, + 4229: 0x7639, + 4230: 0x763A, + 4231: 0x763C, + 4232: 0x764A, + 4233: 0x7640, + 4234: 0x7641, + 4235: 0x7643, + 4236: 0x7644, + 4237: 0x7645, + 4238: 0x7649, + 4239: 0x764B, + 4240: 0x7655, + 4241: 0x7659, + 4242: 0x765F, + 4243: 0x7664, + 4244: 0x7665, + 4245: 0x766D, + 4246: 0x766E, + 4247: 0x766F, + 4248: 0x7671, + 4249: 0x7674, + 4250: 0x7681, + 4251: 0x7685, + 4252: 0x768C, + 4253: 0x768D, + 4254: 0x7695, + 4255: 0x769B, + 4256: 0x769C, + 4257: 0x769D, + 4258: 0x769F, + 4259: 0x76A0, + 4260: 0x76A2, + 4261: 0x76A3, + 4262: 0x76A4, + 4263: 0x76A5, + 4264: 0x76A6, + 4265: 0x76A7, + 4266: 0x76A8, + 4267: 0x76AA, + 4268: 0x76AD, + 4269: 0x76BD, + 4270: 0x76C1, + 4271: 0x76C5, + 4272: 0x76C9, + 4273: 0x76CB, + 4274: 0x76CC, + 4275: 0x76CE, + 4276: 0x76D4, + 4277: 0x76D9, + 4278: 0x76E0, + 4279: 0x76E6, + 4280: 0x76E8, + 4281: 0x76EC, + 4282: 0x76F0, + 4283: 0x76F1, + 4284: 0x76F6, + 4285: 0x76F9, + 4286: 0x76FC, + 4287: 0x7700, + 4288: 0x7706, + 4289: 0x770A, + 4290: 0x770E, + 4291: 0x7712, + 4292: 0x7714, + 4293: 0x7715, + 4294: 0x7717, + 4295: 0x7719, + 4296: 0x771A, + 4297: 0x771C, + 4298: 0x7722, + 4299: 0x7728, + 4300: 0x772D, + 4301: 0x772E, + 4302: 0x772F, + 4303: 0x7734, + 4304: 0x7735, + 4305: 0x7736, + 4306: 0x7739, + 4307: 0x773D, + 4308: 0x773E, + 4309: 0x7742, + 4310: 0x7745, + 4311: 0x7746, + 4312: 0x774A, + 4313: 0x774D, + 4314: 0x774E, + 4315: 0x774F, + 4316: 0x7752, + 4317: 0x7756, + 4318: 0x7757, + 4319: 0x775C, + 4320: 0x775E, + 4321: 0x775F, + 4322: 0x7760, + 4323: 0x7762, + 4324: 0x7764, + 4325: 0x7767, + 4326: 0x776A, + 4327: 0x776C, + 4328: 0x7770, + 4329: 0x7772, + 4330: 0x7773, + 4331: 0x7774, + 4332: 0x777A, + 4333: 0x777D, + 4334: 0x7780, + 4335: 0x7784, + 4336: 0x778C, + 4337: 0x778D, + 4338: 0x7794, + 4339: 0x7795, + 4340: 0x7796, + 4341: 0x779A, + 4342: 0x779F, + 4343: 0x77A2, + 4344: 0x77A7, + 4345: 0x77AA, + 4346: 0x77AE, + 4347: 0x77AF, + 4348: 0x77B1, + 4349: 0x77B5, + 4350: 0x77BE, + 4351: 0x77C3, + 4352: 0x77C9, + 4353: 0x77D1, + 4354: 0x77D2, + 4355: 0x77D5, + 4356: 0x77D9, + 4357: 0x77DE, + 4358: 0x77DF, + 4359: 0x77E0, + 4360: 0x77E4, + 4361: 0x77E6, + 4362: 0x77EA, + 4363: 0x77EC, + 4364: 0x77F0, + 4365: 0x77F1, + 4366: 0x77F4, + 4367: 0x77F8, + 4368: 0x77FB, + 4369: 0x7805, + 4370: 0x7806, + 4371: 0x7809, + 4372: 0x780D, + 4373: 0x780E, + 4374: 0x7811, + 4375: 0x781D, + 4376: 0x7821, + 4377: 0x7822, + 4378: 0x7823, + 4379: 0x782D, + 4380: 0x782E, + 4381: 0x7830, + 4382: 0x7835, + 4383: 0x7837, + 4384: 0x7843, + 4385: 0x7844, + 4386: 0x7847, + 4387: 0x7848, + 4388: 0x784C, + 4389: 0x784E, + 4390: 0x7852, + 4391: 0x785C, + 4392: 0x785E, + 4393: 0x7860, + 4394: 0x7861, + 4395: 0x7863, + 4396: 0x7864, + 4397: 0x7868, + 4398: 0x786A, + 4399: 0x786E, + 4400: 0x787A, + 4401: 0x787E, + 4402: 0x788A, + 4403: 0x788F, + 4404: 0x7894, + 4405: 0x7898, + 4406: 0x78A1, + 4407: 0x789D, + 4408: 0x789E, + 4409: 0x789F, + 4410: 0x78A4, + 4411: 0x78A8, + 4412: 0x78AC, + 4413: 0x78AD, + 4414: 0x78B0, + 4415: 0x78B1, + 4416: 0x78B2, + 4417: 0x78B3, + 4418: 0x78BB, + 4419: 0x78BD, + 4420: 0x78BF, + 4421: 0x78C7, + 4422: 0x78C8, + 4423: 0x78C9, + 4424: 0x78CC, + 4425: 0x78CE, + 4426: 0x78D2, + 4427: 0x78D3, + 4428: 0x78D5, + 4429: 0x78D6, + 4430: 0x78E4, + 4431: 0x78DB, + 4432: 0x78DF, + 4433: 0x78E0, + 4434: 0x78E1, + 4435: 0x78E6, + 4436: 0x78EA, + 4437: 0x78F2, + 4438: 0x78F3, + 4439: 0x7900, + 4440: 0x78F6, + 4441: 0x78F7, + 4442: 0x78FA, + 4443: 0x78FB, + 4444: 0x78FF, + 4445: 0x7906, + 4446: 0x790C, + 4447: 0x7910, + 4448: 0x791A, + 4449: 0x791C, + 4450: 0x791E, + 4451: 0x791F, + 4452: 0x7920, + 4453: 0x7925, + 4454: 0x7927, + 4455: 0x7929, + 4456: 0x792D, + 4457: 0x7931, + 4458: 0x7934, + 4459: 0x7935, + 4460: 0x793B, + 4461: 0x793D, + 4462: 0x793F, + 4463: 0x7944, + 4464: 0x7945, + 4465: 0x7946, + 4466: 0x794A, + 4467: 0x794B, + 4468: 0x794F, + 4469: 0x7951, + 4470: 0x7954, + 4471: 0x7958, + 4472: 0x795B, + 4473: 0x795C, + 4474: 0x7967, + 4475: 0x7969, + 4476: 0x796B, + 4477: 0x7972, + 4478: 0x7979, + 4479: 0x797B, + 4480: 0x797C, + 4481: 0x797E, + 4482: 0x798B, + 4483: 0x798C, + 4484: 0x7991, + 4485: 0x7993, + 4486: 0x7994, + 4487: 0x7995, + 4488: 0x7996, + 4489: 0x7998, + 4490: 0x799B, + 4491: 0x799C, + 4492: 0x79A1, + 4493: 0x79A8, + 4494: 0x79A9, + 4495: 0x79AB, + 4496: 0x79AF, + 4497: 0x79B1, + 4498: 0x79B4, + 4499: 0x79B8, + 4500: 0x79BB, + 4501: 0x79C2, + 4502: 0x79C4, + 4503: 0x79C7, + 4504: 0x79C8, + 4505: 0x79CA, + 4506: 0x79CF, + 4507: 0x79D4, + 4508: 0x79D6, + 4509: 0x79DA, + 4510: 0x79DD, + 4511: 0x79DE, + 4512: 0x79E0, + 4513: 0x79E2, + 4514: 0x79E5, + 4515: 0x79EA, + 4516: 0x79EB, + 4517: 0x79ED, + 4518: 0x79F1, + 4519: 0x79F8, + 4520: 0x79FC, + 4521: 0x7A02, + 4522: 0x7A03, + 4523: 0x7A07, + 4524: 0x7A09, + 4525: 0x7A0A, + 4526: 0x7A0C, + 4527: 0x7A11, + 4528: 0x7A15, + 4529: 0x7A1B, + 4530: 0x7A1E, + 4531: 0x7A21, + 4532: 0x7A27, + 4533: 0x7A2B, + 4534: 0x7A2D, + 4535: 0x7A2F, + 4536: 0x7A30, + 4537: 0x7A34, + 4538: 0x7A35, + 4539: 0x7A38, + 4540: 0x7A39, + 4541: 0x7A3A, + 4542: 0x7A44, + 4543: 0x7A45, + 4544: 0x7A47, + 4545: 0x7A48, + 4546: 0x7A4C, + 4547: 0x7A55, + 4548: 0x7A56, + 4549: 0x7A59, + 4550: 0x7A5C, + 4551: 0x7A5D, + 4552: 0x7A5F, + 4553: 0x7A60, + 4554: 0x7A65, + 4555: 0x7A67, + 4556: 0x7A6A, + 4557: 0x7A6D, + 4558: 0x7A75, + 4559: 0x7A78, + 4560: 0x7A7E, + 4561: 0x7A80, + 4562: 0x7A82, + 4563: 0x7A85, + 4564: 0x7A86, + 4565: 0x7A8A, + 4566: 0x7A8B, + 4567: 0x7A90, + 4568: 0x7A91, + 4569: 0x7A94, + 4570: 0x7A9E, + 4571: 0x7AA0, + 4572: 0x7AA3, + 4573: 0x7AAC, + 4574: 0x7AB3, + 4575: 0x7AB5, + 4576: 0x7AB9, + 4577: 0x7ABB, + 4578: 0x7ABC, + 4579: 0x7AC6, + 4580: 0x7AC9, + 4581: 0x7ACC, + 4582: 0x7ACE, + 4583: 0x7AD1, + 4584: 0x7ADB, + 4585: 0x7AE8, + 4586: 0x7AE9, + 4587: 0x7AEB, + 4588: 0x7AEC, + 4589: 0x7AF1, + 4590: 0x7AF4, + 4591: 0x7AFB, + 4592: 0x7AFD, + 4593: 0x7AFE, + 4594: 0x7B07, + 4595: 0x7B14, + 4596: 0x7B1F, + 4597: 0x7B23, + 4598: 0x7B27, + 4599: 0x7B29, + 4600: 0x7B2A, + 4601: 0x7B2B, + 4602: 0x7B2D, + 4603: 0x7B2E, + 4604: 0x7B2F, + 4605: 0x7B30, + 4606: 0x7B31, + 4607: 0x7B34, + 4608: 0x7B3D, + 4609: 0x7B3F, + 4610: 0x7B40, + 4611: 0x7B41, + 4612: 0x7B47, + 4613: 0x7B4E, + 4614: 0x7B55, + 4615: 0x7B60, + 4616: 0x7B64, + 4617: 0x7B66, + 4618: 0x7B69, + 4619: 0x7B6A, + 4620: 0x7B6D, + 4621: 0x7B6F, + 4622: 0x7B72, + 4623: 0x7B73, + 4624: 0x7B77, + 4625: 0x7B84, + 4626: 0x7B89, + 4627: 0x7B8E, + 4628: 0x7B90, + 4629: 0x7B91, + 4630: 0x7B96, + 4631: 0x7B9B, + 4632: 0x7B9E, + 4633: 0x7BA0, + 4634: 0x7BA5, + 4635: 0x7BAC, + 4636: 0x7BAF, + 4637: 0x7BB0, + 4638: 0x7BB2, + 4639: 0x7BB5, + 4640: 0x7BB6, + 4641: 0x7BBA, + 4642: 0x7BBB, + 4643: 0x7BBC, + 4644: 0x7BBD, + 4645: 0x7BC2, + 4646: 0x7BC5, + 4647: 0x7BC8, + 4648: 0x7BCA, + 4649: 0x7BD4, + 4650: 0x7BD6, + 4651: 0x7BD7, + 4652: 0x7BD9, + 4653: 0x7BDA, + 4654: 0x7BDB, + 4655: 0x7BE8, + 4656: 0x7BEA, + 4657: 0x7BF2, + 4658: 0x7BF4, + 4659: 0x7BF5, + 4660: 0x7BF8, + 4661: 0x7BF9, + 4662: 0x7BFA, + 4663: 0x7BFC, + 4664: 0x7BFE, + 4665: 0x7C01, + 4666: 0x7C02, + 4667: 0x7C03, + 4668: 0x7C04, + 4669: 0x7C06, + 4670: 0x7C09, + 4671: 0x7C0B, + 4672: 0x7C0C, + 4673: 0x7C0E, + 4674: 0x7C0F, + 4675: 0x7C19, + 4676: 0x7C1B, + 4677: 0x7C20, + 4678: 0x7C25, + 4679: 0x7C26, + 4680: 0x7C28, + 4681: 0x7C2C, + 4682: 0x7C31, + 4683: 0x7C33, + 4684: 0x7C34, + 4685: 0x7C36, + 4686: 0x7C39, + 4687: 0x7C3A, + 4688: 0x7C46, + 4689: 0x7C4A, + 4690: 0x7C55, + 4691: 0x7C51, + 4692: 0x7C52, + 4693: 0x7C53, + 4694: 0x7C59, + 4695: 0x7C5A, + 4696: 0x7C5B, + 4697: 0x7C5C, + 4698: 0x7C5D, + 4699: 0x7C5E, + 4700: 0x7C61, + 4701: 0x7C63, + 4702: 0x7C67, + 4703: 0x7C69, + 4704: 0x7C6D, + 4705: 0x7C6E, + 4706: 0x7C70, + 4707: 0x7C72, + 4708: 0x7C79, + 4709: 0x7C7C, + 4710: 0x7C7D, + 4711: 0x7C86, + 4712: 0x7C87, + 4713: 0x7C8F, + 4714: 0x7C94, + 4715: 0x7C9E, + 4716: 0x7CA0, + 4717: 0x7CA6, + 4718: 0x7CB0, + 4719: 0x7CB6, + 4720: 0x7CB7, + 4721: 0x7CBA, + 4722: 0x7CBB, + 4723: 0x7CBC, + 4724: 0x7CBF, + 4725: 0x7CC4, + 4726: 0x7CC7, + 4727: 0x7CC8, + 4728: 0x7CC9, + 4729: 0x7CCD, + 4730: 0x7CCF, + 4731: 0x7CD3, + 4732: 0x7CD4, + 4733: 0x7CD5, + 4734: 0x7CD7, + 4735: 0x7CD9, + 4736: 0x7CDA, + 4737: 0x7CDD, + 4738: 0x7CE6, + 4739: 0x7CE9, + 4740: 0x7CEB, + 4741: 0x7CF5, + 4742: 0x7D03, + 4743: 0x7D07, + 4744: 0x7D08, + 4745: 0x7D09, + 4746: 0x7D0F, + 4747: 0x7D11, + 4748: 0x7D12, + 4749: 0x7D13, + 4750: 0x7D16, + 4751: 0x7D1D, + 4752: 0x7D1E, + 4753: 0x7D23, + 4754: 0x7D26, + 4755: 0x7D2A, + 4756: 0x7D2D, + 4757: 0x7D31, + 4758: 0x7D3C, + 4759: 0x7D3D, + 4760: 0x7D3E, + 4761: 0x7D40, + 4762: 0x7D41, + 4763: 0x7D47, + 4764: 0x7D48, + 4765: 0x7D4D, + 4766: 0x7D51, + 4767: 0x7D53, + 4768: 0x7D57, + 4769: 0x7D59, + 4770: 0x7D5A, + 4771: 0x7D5C, + 4772: 0x7D5D, + 4773: 0x7D65, + 4774: 0x7D67, + 4775: 0x7D6A, + 4776: 0x7D70, + 4777: 0x7D78, + 4778: 0x7D7A, + 4779: 0x7D7B, + 4780: 0x7D7F, + 4781: 0x7D81, + 4782: 0x7D82, + 4783: 0x7D83, + 4784: 0x7D85, + 4785: 0x7D86, + 4786: 0x7D88, + 4787: 0x7D8B, + 4788: 0x7D8C, + 4789: 0x7D8D, + 4790: 0x7D91, + 4791: 0x7D96, + 4792: 0x7D97, + 4793: 0x7D9D, + 4794: 0x7D9E, + 4795: 0x7DA6, + 4796: 0x7DA7, + 4797: 0x7DAA, + 4798: 0x7DB3, + 4799: 0x7DB6, + 4800: 0x7DB7, + 4801: 0x7DB9, + 4802: 0x7DC2, + 4803: 0x7DC3, + 4804: 0x7DC4, + 4805: 0x7DC5, + 4806: 0x7DC6, + 4807: 0x7DCC, + 4808: 0x7DCD, + 4809: 0x7DCE, + 4810: 0x7DD7, + 4811: 0x7DD9, + 4812: 0x7E00, + 4813: 0x7DE2, + 4814: 0x7DE5, + 4815: 0x7DE6, + 4816: 0x7DEA, + 4817: 0x7DEB, + 4818: 0x7DED, + 4819: 0x7DF1, + 4820: 0x7DF5, + 4821: 0x7DF6, + 4822: 0x7DF9, + 4823: 0x7DFA, + 4824: 0x7E08, + 4825: 0x7E10, + 4826: 0x7E11, + 4827: 0x7E15, + 4828: 0x7E17, + 4829: 0x7E1C, + 4830: 0x7E1D, + 4831: 0x7E20, + 4832: 0x7E27, + 4833: 0x7E28, + 4834: 0x7E2C, + 4835: 0x7E2D, + 4836: 0x7E2F, + 4837: 0x7E33, + 4838: 0x7E36, + 4839: 0x7E3F, + 4840: 0x7E44, + 4841: 0x7E45, + 4842: 0x7E47, + 4843: 0x7E4E, + 4844: 0x7E50, + 4845: 0x7E52, + 4846: 0x7E58, + 4847: 0x7E5F, + 4848: 0x7E61, + 4849: 0x7E62, + 4850: 0x7E65, + 4851: 0x7E6B, + 4852: 0x7E6E, + 4853: 0x7E6F, + 4854: 0x7E73, + 4855: 0x7E78, + 4856: 0x7E7E, + 4857: 0x7E81, + 4858: 0x7E86, + 4859: 0x7E87, + 4860: 0x7E8A, + 4861: 0x7E8D, + 4862: 0x7E91, + 4863: 0x7E95, + 4864: 0x7E98, + 4865: 0x7E9A, + 4866: 0x7E9D, + 4867: 0x7E9E, + 4868: 0x7F3C, + 4869: 0x7F3B, + 4870: 0x7F3D, + 4871: 0x7F3E, + 4872: 0x7F3F, + 4873: 0x7F43, + 4874: 0x7F44, + 4875: 0x7F47, + 4876: 0x7F4F, + 4877: 0x7F52, + 4878: 0x7F53, + 4879: 0x7F5B, + 4880: 0x7F5C, + 4881: 0x7F5D, + 4882: 0x7F61, + 4883: 0x7F63, + 4884: 0x7F64, + 4885: 0x7F65, + 4886: 0x7F66, + 4887: 0x7F6D, + 4888: 0x7F71, + 4889: 0x7F7D, + 4890: 0x7F7E, + 4891: 0x7F7F, + 4892: 0x7F80, + 4893: 0x7F8B, + 4894: 0x7F8D, + 4895: 0x7F8F, + 4896: 0x7F90, + 4897: 0x7F91, + 4898: 0x7F96, + 4899: 0x7F97, + 4900: 0x7F9C, + 4901: 0x7FA1, + 4902: 0x7FA2, + 4903: 0x7FA6, + 4904: 0x7FAA, + 4905: 0x7FAD, + 4906: 0x7FB4, + 4907: 0x7FBC, + 4908: 0x7FBF, + 4909: 0x7FC0, + 4910: 0x7FC3, + 4911: 0x7FC8, + 4912: 0x7FCE, + 4913: 0x7FCF, + 4914: 0x7FDB, + 4915: 0x7FDF, + 4916: 0x7FE3, + 4917: 0x7FE5, + 4918: 0x7FE8, + 4919: 0x7FEC, + 4920: 0x7FEE, + 4921: 0x7FEF, + 4922: 0x7FF2, + 4923: 0x7FFA, + 4924: 0x7FFD, + 4925: 0x7FFE, + 4926: 0x7FFF, + 4927: 0x8007, + 4928: 0x8008, + 4929: 0x800A, + 4930: 0x800D, + 4931: 0x800E, + 4932: 0x800F, + 4933: 0x8011, + 4934: 0x8013, + 4935: 0x8014, + 4936: 0x8016, + 4937: 0x801D, + 4938: 0x801E, + 4939: 0x801F, + 4940: 0x8020, + 4941: 0x8024, + 4942: 0x8026, + 4943: 0x802C, + 4944: 0x802E, + 4945: 0x8030, + 4946: 0x8034, + 4947: 0x8035, + 4948: 0x8037, + 4949: 0x8039, + 4950: 0x803A, + 4951: 0x803C, + 4952: 0x803E, + 4953: 0x8040, + 4954: 0x8044, + 4955: 0x8060, + 4956: 0x8064, + 4957: 0x8066, + 4958: 0x806D, + 4959: 0x8071, + 4960: 0x8075, + 4961: 0x8081, + 4962: 0x8088, + 4963: 0x808E, + 4964: 0x809C, + 4965: 0x809E, + 4966: 0x80A6, + 4967: 0x80A7, + 4968: 0x80AB, + 4969: 0x80B8, + 4970: 0x80B9, + 4971: 0x80C8, + 4972: 0x80CD, + 4973: 0x80CF, + 4974: 0x80D2, + 4975: 0x80D4, + 4976: 0x80D5, + 4977: 0x80D7, + 4978: 0x80D8, + 4979: 0x80E0, + 4980: 0x80ED, + 4981: 0x80EE, + 4982: 0x80F0, + 4983: 0x80F2, + 4984: 0x80F3, + 4985: 0x80F6, + 4986: 0x80F9, + 4987: 0x80FA, + 4988: 0x80FE, + 4989: 0x8103, + 4990: 0x810B, + 4991: 0x8116, + 4992: 0x8117, + 4993: 0x8118, + 4994: 0x811C, + 4995: 0x811E, + 4996: 0x8120, + 4997: 0x8124, + 4998: 0x8127, + 4999: 0x812C, + 5000: 0x8130, + 5001: 0x8135, + 5002: 0x813A, + 5003: 0x813C, + 5004: 0x8145, + 5005: 0x8147, + 5006: 0x814A, + 5007: 0x814C, + 5008: 0x8152, + 5009: 0x8157, + 5010: 0x8160, + 5011: 0x8161, + 5012: 0x8167, + 5013: 0x8168, + 5014: 0x8169, + 5015: 0x816D, + 5016: 0x816F, + 5017: 0x8177, + 5018: 0x8181, + 5019: 0x8190, + 5020: 0x8184, + 5021: 0x8185, + 5022: 0x8186, + 5023: 0x818B, + 5024: 0x818E, + 5025: 0x8196, + 5026: 0x8198, + 5027: 0x819B, + 5028: 0x819E, + 5029: 0x81A2, + 5030: 0x81AE, + 5031: 0x81B2, + 5032: 0x81B4, + 5033: 0x81BB, + 5034: 0x81CB, + 5035: 0x81C3, + 5036: 0x81C5, + 5037: 0x81CA, + 5038: 0x81CE, + 5039: 0x81CF, + 5040: 0x81D5, + 5041: 0x81D7, + 5042: 0x81DB, + 5043: 0x81DD, + 5044: 0x81DE, + 5045: 0x81E1, + 5046: 0x81E4, + 5047: 0x81EB, + 5048: 0x81EC, + 5049: 0x81F0, + 5050: 0x81F1, + 5051: 0x81F2, + 5052: 0x81F5, + 5053: 0x81F6, + 5054: 0x81F8, + 5055: 0x81F9, + 5056: 0x81FD, + 5057: 0x81FF, + 5058: 0x8200, + 5059: 0x8203, + 5060: 0x820F, + 5061: 0x8213, + 5062: 0x8214, + 5063: 0x8219, + 5064: 0x821A, + 5065: 0x821D, + 5066: 0x8221, + 5067: 0x8222, + 5068: 0x8228, + 5069: 0x8232, + 5070: 0x8234, + 5071: 0x823A, + 5072: 0x8243, + 5073: 0x8244, + 5074: 0x8245, + 5075: 0x8246, + 5076: 0x824B, + 5077: 0x824E, + 5078: 0x824F, + 5079: 0x8251, + 5080: 0x8256, + 5081: 0x825C, + 5082: 0x8260, + 5083: 0x8263, + 5084: 0x8267, + 5085: 0x826D, + 5086: 0x8274, + 5087: 0x827B, + 5088: 0x827D, + 5089: 0x827F, + 5090: 0x8280, + 5091: 0x8281, + 5092: 0x8283, + 5093: 0x8284, + 5094: 0x8287, + 5095: 0x8289, + 5096: 0x828A, + 5097: 0x828E, + 5098: 0x8291, + 5099: 0x8294, + 5100: 0x8296, + 5101: 0x8298, + 5102: 0x829A, + 5103: 0x829B, + 5104: 0x82A0, + 5105: 0x82A1, + 5106: 0x82A3, + 5107: 0x82A4, + 5108: 0x82A7, + 5109: 0x82A8, + 5110: 0x82A9, + 5111: 0x82AA, + 5112: 0x82AE, + 5113: 0x82B0, + 5114: 0x82B2, + 5115: 0x82B4, + 5116: 0x82B7, + 5117: 0x82BA, + 5118: 0x82BC, + 5119: 0x82BE, + 5120: 0x82BF, + 5121: 0x82C6, + 5122: 0x82D0, + 5123: 0x82D5, + 5124: 0x82DA, + 5125: 0x82E0, + 5126: 0x82E2, + 5127: 0x82E4, + 5128: 0x82E8, + 5129: 0x82EA, + 5130: 0x82ED, + 5131: 0x82EF, + 5132: 0x82F6, + 5133: 0x82F7, + 5134: 0x82FD, + 5135: 0x82FE, + 5136: 0x8300, + 5137: 0x8301, + 5138: 0x8307, + 5139: 0x8308, + 5140: 0x830A, + 5141: 0x830B, + 5142: 0x8354, + 5143: 0x831B, + 5144: 0x831D, + 5145: 0x831E, + 5146: 0x831F, + 5147: 0x8321, + 5148: 0x8322, + 5149: 0x832C, + 5150: 0x832D, + 5151: 0x832E, + 5152: 0x8330, + 5153: 0x8333, + 5154: 0x8337, + 5155: 0x833A, + 5156: 0x833C, + 5157: 0x833D, + 5158: 0x8342, + 5159: 0x8343, + 5160: 0x8344, + 5161: 0x8347, + 5162: 0x834D, + 5163: 0x834E, + 5164: 0x8351, + 5165: 0x8355, + 5166: 0x8356, + 5167: 0x8357, + 5168: 0x8370, + 5169: 0x8378, + 5170: 0x837D, + 5171: 0x837F, + 5172: 0x8380, + 5173: 0x8382, + 5174: 0x8384, + 5175: 0x8386, + 5176: 0x838D, + 5177: 0x8392, + 5178: 0x8394, + 5179: 0x8395, + 5180: 0x8398, + 5181: 0x8399, + 5182: 0x839B, + 5183: 0x839C, + 5184: 0x839D, + 5185: 0x83A6, + 5186: 0x83A7, + 5187: 0x83A9, + 5188: 0x83AC, + 5189: 0x83BE, + 5190: 0x83BF, + 5191: 0x83C0, + 5192: 0x83C7, + 5193: 0x83C9, + 5194: 0x83CF, + 5195: 0x83D0, + 5196: 0x83D1, + 5197: 0x83D4, + 5198: 0x83DD, + 5199: 0x8353, + 5200: 0x83E8, + 5201: 0x83EA, + 5202: 0x83F6, + 5203: 0x83F8, + 5204: 0x83F9, + 5205: 0x83FC, + 5206: 0x8401, + 5207: 0x8406, + 5208: 0x840A, + 5209: 0x840F, + 5210: 0x8411, + 5211: 0x8415, + 5212: 0x8419, + 5213: 0x83AD, + 5214: 0x842F, + 5215: 0x8439, + 5216: 0x8445, + 5217: 0x8447, + 5218: 0x8448, + 5219: 0x844A, + 5220: 0x844D, + 5221: 0x844F, + 5222: 0x8451, + 5223: 0x8452, + 5224: 0x8456, + 5225: 0x8458, + 5226: 0x8459, + 5227: 0x845A, + 5228: 0x845C, + 5229: 0x8460, + 5230: 0x8464, + 5231: 0x8465, + 5232: 0x8467, + 5233: 0x846A, + 5234: 0x8470, + 5235: 0x8473, + 5236: 0x8474, + 5237: 0x8476, + 5238: 0x8478, + 5239: 0x847C, + 5240: 0x847D, + 5241: 0x8481, + 5242: 0x8485, + 5243: 0x8492, + 5244: 0x8493, + 5245: 0x8495, + 5246: 0x849E, + 5247: 0x84A6, + 5248: 0x84A8, + 5249: 0x84A9, + 5250: 0x84AA, + 5251: 0x84AF, + 5252: 0x84B1, + 5253: 0x84B4, + 5254: 0x84BA, + 5255: 0x84BD, + 5256: 0x84BE, + 5257: 0x84C0, + 5258: 0x84C2, + 5259: 0x84C7, + 5260: 0x84C8, + 5261: 0x84CC, + 5262: 0x84CF, + 5263: 0x84D3, + 5264: 0x84DC, + 5265: 0x84E7, + 5266: 0x84EA, + 5267: 0x84EF, + 5268: 0x84F0, + 5269: 0x84F1, + 5270: 0x84F2, + 5271: 0x84F7, + 5272: 0x8532, + 5273: 0x84FA, + 5274: 0x84FB, + 5275: 0x84FD, + 5276: 0x8502, + 5277: 0x8503, + 5278: 0x8507, + 5279: 0x850C, + 5280: 0x850E, + 5281: 0x8510, + 5282: 0x851C, + 5283: 0x851E, + 5284: 0x8522, + 5285: 0x8523, + 5286: 0x8524, + 5287: 0x8525, + 5288: 0x8527, + 5289: 0x852A, + 5290: 0x852B, + 5291: 0x852F, + 5292: 0x8533, + 5293: 0x8534, + 5294: 0x8536, + 5295: 0x853F, + 5296: 0x8546, + 5297: 0x854F, + 5298: 0x8550, + 5299: 0x8551, + 5300: 0x8552, + 5301: 0x8553, + 5302: 0x8556, + 5303: 0x8559, + 5304: 0x855C, + 5305: 0x855D, + 5306: 0x855E, + 5307: 0x855F, + 5308: 0x8560, + 5309: 0x8561, + 5310: 0x8562, + 5311: 0x8564, + 5312: 0x856B, + 5313: 0x856F, + 5314: 0x8579, + 5315: 0x857A, + 5316: 0x857B, + 5317: 0x857D, + 5318: 0x857F, + 5319: 0x8581, + 5320: 0x8585, + 5321: 0x8586, + 5322: 0x8589, + 5323: 0x858B, + 5324: 0x858C, + 5325: 0x858F, + 5326: 0x8593, + 5327: 0x8598, + 5328: 0x859D, + 5329: 0x859F, + 5330: 0x85A0, + 5331: 0x85A2, + 5332: 0x85A5, + 5333: 0x85A7, + 5334: 0x85B4, + 5335: 0x85B6, + 5336: 0x85B7, + 5337: 0x85B8, + 5338: 0x85BC, + 5339: 0x85BD, + 5340: 0x85BE, + 5341: 0x85BF, + 5342: 0x85C2, + 5343: 0x85C7, + 5344: 0x85CA, + 5345: 0x85CB, + 5346: 0x85CE, + 5347: 0x85AD, + 5348: 0x85D8, + 5349: 0x85DA, + 5350: 0x85DF, + 5351: 0x85E0, + 5352: 0x85E6, + 5353: 0x85E8, + 5354: 0x85ED, + 5355: 0x85F3, + 5356: 0x85F6, + 5357: 0x85FC, + 5358: 0x85FF, + 5359: 0x8600, + 5360: 0x8604, + 5361: 0x8605, + 5362: 0x860D, + 5363: 0x860E, + 5364: 0x8610, + 5365: 0x8611, + 5366: 0x8612, + 5367: 0x8618, + 5368: 0x8619, + 5369: 0x861B, + 5370: 0x861E, + 5371: 0x8621, + 5372: 0x8627, + 5373: 0x8629, + 5374: 0x8636, + 5375: 0x8638, + 5376: 0x863A, + 5377: 0x863C, + 5378: 0x863D, + 5379: 0x8640, + 5380: 0x8642, + 5381: 0x8646, + 5382: 0x8652, + 5383: 0x8653, + 5384: 0x8656, + 5385: 0x8657, + 5386: 0x8658, + 5387: 0x8659, + 5388: 0x865D, + 5389: 0x8660, + 5390: 0x8661, + 5391: 0x8662, + 5392: 0x8663, + 5393: 0x8664, + 5394: 0x8669, + 5395: 0x866C, + 5396: 0x866F, + 5397: 0x8675, + 5398: 0x8676, + 5399: 0x8677, + 5400: 0x867A, + 5401: 0x868D, + 5402: 0x8691, + 5403: 0x8696, + 5404: 0x8698, + 5405: 0x869A, + 5406: 0x869C, + 5407: 0x86A1, + 5408: 0x86A6, + 5409: 0x86A7, + 5410: 0x86A8, + 5411: 0x86AD, + 5412: 0x86B1, + 5413: 0x86B3, + 5414: 0x86B4, + 5415: 0x86B5, + 5416: 0x86B7, + 5417: 0x86B8, + 5418: 0x86B9, + 5419: 0x86BF, + 5420: 0x86C0, + 5421: 0x86C1, + 5422: 0x86C3, + 5423: 0x86C5, + 5424: 0x86D1, + 5425: 0x86D2, + 5426: 0x86D5, + 5427: 0x86D7, + 5428: 0x86DA, + 5429: 0x86DC, + 5430: 0x86E0, + 5431: 0x86E3, + 5432: 0x86E5, + 5433: 0x86E7, + 5434: 0x8688, + 5435: 0x86FA, + 5436: 0x86FC, + 5437: 0x86FD, + 5438: 0x8704, + 5439: 0x8705, + 5440: 0x8707, + 5441: 0x870B, + 5442: 0x870E, + 5443: 0x870F, + 5444: 0x8710, + 5445: 0x8713, + 5446: 0x8714, + 5447: 0x8719, + 5448: 0x871E, + 5449: 0x871F, + 5450: 0x8721, + 5451: 0x8723, + 5452: 0x8728, + 5453: 0x872E, + 5454: 0x872F, + 5455: 0x8731, + 5456: 0x8732, + 5457: 0x8739, + 5458: 0x873A, + 5459: 0x873C, + 5460: 0x873D, + 5461: 0x873E, + 5462: 0x8740, + 5463: 0x8743, + 5464: 0x8745, + 5465: 0x874D, + 5466: 0x8758, + 5467: 0x875D, + 5468: 0x8761, + 5469: 0x8764, + 5470: 0x8765, + 5471: 0x876F, + 5472: 0x8771, + 5473: 0x8772, + 5474: 0x877B, + 5475: 0x8783, + 5476: 0x8784, + 5477: 0x8785, + 5478: 0x8786, + 5479: 0x8787, + 5480: 0x8788, + 5481: 0x8789, + 5482: 0x878B, + 5483: 0x878C, + 5484: 0x8790, + 5485: 0x8793, + 5486: 0x8795, + 5487: 0x8797, + 5488: 0x8798, + 5489: 0x8799, + 5490: 0x879E, + 5491: 0x87A0, + 5492: 0x87A3, + 5493: 0x87A7, + 5494: 0x87AC, + 5495: 0x87AD, + 5496: 0x87AE, + 5497: 0x87B1, + 5498: 0x87B5, + 5499: 0x87BE, + 5500: 0x87BF, + 5501: 0x87C1, + 5502: 0x87C8, + 5503: 0x87C9, + 5504: 0x87CA, + 5505: 0x87CE, + 5506: 0x87D5, + 5507: 0x87D6, + 5508: 0x87D9, + 5509: 0x87DA, + 5510: 0x87DC, + 5511: 0x87DF, + 5512: 0x87E2, + 5513: 0x87E3, + 5514: 0x87E4, + 5515: 0x87EA, + 5516: 0x87EB, + 5517: 0x87ED, + 5518: 0x87F1, + 5519: 0x87F3, + 5520: 0x87F8, + 5521: 0x87FA, + 5522: 0x87FF, + 5523: 0x8801, + 5524: 0x8803, + 5525: 0x8806, + 5526: 0x8809, + 5527: 0x880A, + 5528: 0x880B, + 5529: 0x8810, + 5530: 0x8819, + 5531: 0x8812, + 5532: 0x8813, + 5533: 0x8814, + 5534: 0x8818, + 5535: 0x881A, + 5536: 0x881B, + 5537: 0x881C, + 5538: 0x881E, + 5539: 0x881F, + 5540: 0x8828, + 5541: 0x882D, + 5542: 0x882E, + 5543: 0x8830, + 5544: 0x8832, + 5545: 0x8835, + 5546: 0x883A, + 5547: 0x883C, + 5548: 0x8841, + 5549: 0x8843, + 5550: 0x8845, + 5551: 0x8848, + 5552: 0x8849, + 5553: 0x884A, + 5554: 0x884B, + 5555: 0x884E, + 5556: 0x8851, + 5557: 0x8855, + 5558: 0x8856, + 5559: 0x8858, + 5560: 0x885A, + 5561: 0x885C, + 5562: 0x885F, + 5563: 0x8860, + 5564: 0x8864, + 5565: 0x8869, + 5566: 0x8871, + 5567: 0x8879, + 5568: 0x887B, + 5569: 0x8880, + 5570: 0x8898, + 5571: 0x889A, + 5572: 0x889B, + 5573: 0x889C, + 5574: 0x889F, + 5575: 0x88A0, + 5576: 0x88A8, + 5577: 0x88AA, + 5578: 0x88BA, + 5579: 0x88BD, + 5580: 0x88BE, + 5581: 0x88C0, + 5582: 0x88CA, + 5583: 0x88CB, + 5584: 0x88CC, + 5585: 0x88CD, + 5586: 0x88CE, + 5587: 0x88D1, + 5588: 0x88D2, + 5589: 0x88D3, + 5590: 0x88DB, + 5591: 0x88DE, + 5592: 0x88E7, + 5593: 0x88EF, + 5594: 0x88F0, + 5595: 0x88F1, + 5596: 0x88F5, + 5597: 0x88F7, + 5598: 0x8901, + 5599: 0x8906, + 5600: 0x890D, + 5601: 0x890E, + 5602: 0x890F, + 5603: 0x8915, + 5604: 0x8916, + 5605: 0x8918, + 5606: 0x8919, + 5607: 0x891A, + 5608: 0x891C, + 5609: 0x8920, + 5610: 0x8926, + 5611: 0x8927, + 5612: 0x8928, + 5613: 0x8930, + 5614: 0x8931, + 5615: 0x8932, + 5616: 0x8935, + 5617: 0x8939, + 5618: 0x893A, + 5619: 0x893E, + 5620: 0x8940, + 5621: 0x8942, + 5622: 0x8945, + 5623: 0x8946, + 5624: 0x8949, + 5625: 0x894F, + 5626: 0x8952, + 5627: 0x8957, + 5628: 0x895A, + 5629: 0x895B, + 5630: 0x895C, + 5631: 0x8961, + 5632: 0x8962, + 5633: 0x8963, + 5634: 0x896B, + 5635: 0x896E, + 5636: 0x8970, + 5637: 0x8973, + 5638: 0x8975, + 5639: 0x897A, + 5640: 0x897B, + 5641: 0x897C, + 5642: 0x897D, + 5643: 0x8989, + 5644: 0x898D, + 5645: 0x8990, + 5646: 0x8994, + 5647: 0x8995, + 5648: 0x899B, + 5649: 0x899C, + 5650: 0x899F, + 5651: 0x89A0, + 5652: 0x89A5, + 5653: 0x89B0, + 5654: 0x89B4, + 5655: 0x89B5, + 5656: 0x89B6, + 5657: 0x89B7, + 5658: 0x89BC, + 5659: 0x89D4, + 5660: 0x89D5, + 5661: 0x89D6, + 5662: 0x89D7, + 5663: 0x89D8, + 5664: 0x89E5, + 5665: 0x89E9, + 5666: 0x89EB, + 5667: 0x89ED, + 5668: 0x89F1, + 5669: 0x89F3, + 5670: 0x89F6, + 5671: 0x89F9, + 5672: 0x89FD, + 5673: 0x89FF, + 5674: 0x8A04, + 5675: 0x8A05, + 5676: 0x8A07, + 5677: 0x8A0F, + 5678: 0x8A11, + 5679: 0x8A12, + 5680: 0x8A14, + 5681: 0x8A15, + 5682: 0x8A1E, + 5683: 0x8A20, + 5684: 0x8A22, + 5685: 0x8A24, + 5686: 0x8A26, + 5687: 0x8A2B, + 5688: 0x8A2C, + 5689: 0x8A2F, + 5690: 0x8A35, + 5691: 0x8A37, + 5692: 0x8A3D, + 5693: 0x8A3E, + 5694: 0x8A40, + 5695: 0x8A43, + 5696: 0x8A45, + 5697: 0x8A47, + 5698: 0x8A49, + 5699: 0x8A4D, + 5700: 0x8A4E, + 5701: 0x8A53, + 5702: 0x8A56, + 5703: 0x8A57, + 5704: 0x8A58, + 5705: 0x8A5C, + 5706: 0x8A5D, + 5707: 0x8A61, + 5708: 0x8A65, + 5709: 0x8A67, + 5710: 0x8A75, + 5711: 0x8A76, + 5712: 0x8A77, + 5713: 0x8A79, + 5714: 0x8A7A, + 5715: 0x8A7B, + 5716: 0x8A7E, + 5717: 0x8A7F, + 5718: 0x8A80, + 5719: 0x8A83, + 5720: 0x8A86, + 5721: 0x8A8B, + 5722: 0x8A8F, + 5723: 0x8A90, + 5724: 0x8A92, + 5725: 0x8A96, + 5726: 0x8A97, + 5727: 0x8A99, + 5728: 0x8A9F, + 5729: 0x8AA7, + 5730: 0x8AA9, + 5731: 0x8AAE, + 5732: 0x8AAF, + 5733: 0x8AB3, + 5734: 0x8AB6, + 5735: 0x8AB7, + 5736: 0x8ABB, + 5737: 0x8ABE, + 5738: 0x8AC3, + 5739: 0x8AC6, + 5740: 0x8AC8, + 5741: 0x8AC9, + 5742: 0x8ACA, + 5743: 0x8AD1, + 5744: 0x8AD3, + 5745: 0x8AD4, + 5746: 0x8AD5, + 5747: 0x8AD7, + 5748: 0x8ADD, + 5749: 0x8ADF, + 5750: 0x8AEC, + 5751: 0x8AF0, + 5752: 0x8AF4, + 5753: 0x8AF5, + 5754: 0x8AF6, + 5755: 0x8AFC, + 5756: 0x8AFF, + 5757: 0x8B05, + 5758: 0x8B06, + 5759: 0x8B0B, + 5760: 0x8B11, + 5761: 0x8B1C, + 5762: 0x8B1E, + 5763: 0x8B1F, + 5764: 0x8B0A, + 5765: 0x8B2D, + 5766: 0x8B30, + 5767: 0x8B37, + 5768: 0x8B3C, + 5769: 0x8B42, + 5770: 0x8B43, + 5771: 0x8B44, + 5772: 0x8B45, + 5773: 0x8B46, + 5774: 0x8B48, + 5775: 0x8B52, + 5776: 0x8B53, + 5777: 0x8B54, + 5778: 0x8B59, + 5779: 0x8B4D, + 5780: 0x8B5E, + 5781: 0x8B63, + 5782: 0x8B6D, + 5783: 0x8B76, + 5784: 0x8B78, + 5785: 0x8B79, + 5786: 0x8B7C, + 5787: 0x8B7E, + 5788: 0x8B81, + 5789: 0x8B84, + 5790: 0x8B85, + 5791: 0x8B8B, + 5792: 0x8B8D, + 5793: 0x8B8F, + 5794: 0x8B94, + 5795: 0x8B95, + 5796: 0x8B9C, + 5797: 0x8B9E, + 5798: 0x8B9F, + 5799: 0x8C38, + 5800: 0x8C39, + 5801: 0x8C3D, + 5802: 0x8C3E, + 5803: 0x8C45, + 5804: 0x8C47, + 5805: 0x8C49, + 5806: 0x8C4B, + 5807: 0x8C4F, + 5808: 0x8C51, + 5809: 0x8C53, + 5810: 0x8C54, + 5811: 0x8C57, + 5812: 0x8C58, + 5813: 0x8C5B, + 5814: 0x8C5D, + 5815: 0x8C59, + 5816: 0x8C63, + 5817: 0x8C64, + 5818: 0x8C66, + 5819: 0x8C68, + 5820: 0x8C69, + 5821: 0x8C6D, + 5822: 0x8C73, + 5823: 0x8C75, + 5824: 0x8C76, + 5825: 0x8C7B, + 5826: 0x8C7E, + 5827: 0x8C86, + 5828: 0x8C87, + 5829: 0x8C8B, + 5830: 0x8C90, + 5831: 0x8C92, + 5832: 0x8C93, + 5833: 0x8C99, + 5834: 0x8C9B, + 5835: 0x8C9C, + 5836: 0x8CA4, + 5837: 0x8CB9, + 5838: 0x8CBA, + 5839: 0x8CC5, + 5840: 0x8CC6, + 5841: 0x8CC9, + 5842: 0x8CCB, + 5843: 0x8CCF, + 5844: 0x8CD6, + 5845: 0x8CD5, + 5846: 0x8CD9, + 5847: 0x8CDD, + 5848: 0x8CE1, + 5849: 0x8CE8, + 5850: 0x8CEC, + 5851: 0x8CEF, + 5852: 0x8CF0, + 5853: 0x8CF2, + 5854: 0x8CF5, + 5855: 0x8CF7, + 5856: 0x8CF8, + 5857: 0x8CFE, + 5858: 0x8CFF, + 5859: 0x8D01, + 5860: 0x8D03, + 5861: 0x8D09, + 5862: 0x8D12, + 5863: 0x8D17, + 5864: 0x8D1B, + 5865: 0x8D65, + 5866: 0x8D69, + 5867: 0x8D6C, + 5868: 0x8D6E, + 5869: 0x8D7F, + 5870: 0x8D82, + 5871: 0x8D84, + 5872: 0x8D88, + 5873: 0x8D8D, + 5874: 0x8D90, + 5875: 0x8D91, + 5876: 0x8D95, + 5877: 0x8D9E, + 5878: 0x8D9F, + 5879: 0x8DA0, + 5880: 0x8DA6, + 5881: 0x8DAB, + 5882: 0x8DAC, + 5883: 0x8DAF, + 5884: 0x8DB2, + 5885: 0x8DB5, + 5886: 0x8DB7, + 5887: 0x8DB9, + 5888: 0x8DBB, + 5889: 0x8DC0, + 5890: 0x8DC5, + 5891: 0x8DC6, + 5892: 0x8DC7, + 5893: 0x8DC8, + 5894: 0x8DCA, + 5895: 0x8DCE, + 5896: 0x8DD1, + 5897: 0x8DD4, + 5898: 0x8DD5, + 5899: 0x8DD7, + 5900: 0x8DD9, + 5901: 0x8DE4, + 5902: 0x8DE5, + 5903: 0x8DE7, + 5904: 0x8DEC, + 5905: 0x8DF0, + 5906: 0x8DBC, + 5907: 0x8DF1, + 5908: 0x8DF2, + 5909: 0x8DF4, + 5910: 0x8DFD, + 5911: 0x8E01, + 5912: 0x8E04, + 5913: 0x8E05, + 5914: 0x8E06, + 5915: 0x8E0B, + 5916: 0x8E11, + 5917: 0x8E14, + 5918: 0x8E16, + 5919: 0x8E20, + 5920: 0x8E21, + 5921: 0x8E22, + 5922: 0x8E23, + 5923: 0x8E26, + 5924: 0x8E27, + 5925: 0x8E31, + 5926: 0x8E33, + 5927: 0x8E36, + 5928: 0x8E37, + 5929: 0x8E38, + 5930: 0x8E39, + 5931: 0x8E3D, + 5932: 0x8E40, + 5933: 0x8E41, + 5934: 0x8E4B, + 5935: 0x8E4D, + 5936: 0x8E4E, + 5937: 0x8E4F, + 5938: 0x8E54, + 5939: 0x8E5B, + 5940: 0x8E5C, + 5941: 0x8E5D, + 5942: 0x8E5E, + 5943: 0x8E61, + 5944: 0x8E62, + 5945: 0x8E69, + 5946: 0x8E6C, + 5947: 0x8E6D, + 5948: 0x8E6F, + 5949: 0x8E70, + 5950: 0x8E71, + 5951: 0x8E79, + 5952: 0x8E7A, + 5953: 0x8E7B, + 5954: 0x8E82, + 5955: 0x8E83, + 5956: 0x8E89, + 5957: 0x8E90, + 5958: 0x8E92, + 5959: 0x8E95, + 5960: 0x8E9A, + 5961: 0x8E9B, + 5962: 0x8E9D, + 5963: 0x8E9E, + 5964: 0x8EA2, + 5965: 0x8EA7, + 5966: 0x8EA9, + 5967: 0x8EAD, + 5968: 0x8EAE, + 5969: 0x8EB3, + 5970: 0x8EB5, + 5971: 0x8EBA, + 5972: 0x8EBB, + 5973: 0x8EC0, + 5974: 0x8EC1, + 5975: 0x8EC3, + 5976: 0x8EC4, + 5977: 0x8EC7, + 5978: 0x8ECF, + 5979: 0x8ED1, + 5980: 0x8ED4, + 5981: 0x8EDC, + 5982: 0x8EE8, + 5983: 0x8EEE, + 5984: 0x8EF0, + 5985: 0x8EF1, + 5986: 0x8EF7, + 5987: 0x8EF9, + 5988: 0x8EFA, + 5989: 0x8EED, + 5990: 0x8F00, + 5991: 0x8F02, + 5992: 0x8F07, + 5993: 0x8F08, + 5994: 0x8F0F, + 5995: 0x8F10, + 5996: 0x8F16, + 5997: 0x8F17, + 5998: 0x8F18, + 5999: 0x8F1E, + 6000: 0x8F20, + 6001: 0x8F21, + 6002: 0x8F23, + 6003: 0x8F25, + 6004: 0x8F27, + 6005: 0x8F28, + 6006: 0x8F2C, + 6007: 0x8F2D, + 6008: 0x8F2E, + 6009: 0x8F34, + 6010: 0x8F35, + 6011: 0x8F36, + 6012: 0x8F37, + 6013: 0x8F3A, + 6014: 0x8F40, + 6015: 0x8F41, + 6016: 0x8F43, + 6017: 0x8F47, + 6018: 0x8F4F, + 6019: 0x8F51, + 6020: 0x8F52, + 6021: 0x8F53, + 6022: 0x8F54, + 6023: 0x8F55, + 6024: 0x8F58, + 6025: 0x8F5D, + 6026: 0x8F5E, + 6027: 0x8F65, + 6028: 0x8F9D, + 6029: 0x8FA0, + 6030: 0x8FA1, + 6031: 0x8FA4, + 6032: 0x8FA5, + 6033: 0x8FA6, + 6034: 0x8FB5, + 6035: 0x8FB6, + 6036: 0x8FB8, + 6037: 0x8FBE, + 6038: 0x8FC0, + 6039: 0x8FC1, + 6040: 0x8FC6, + 6041: 0x8FCA, + 6042: 0x8FCB, + 6043: 0x8FCD, + 6044: 0x8FD0, + 6045: 0x8FD2, + 6046: 0x8FD3, + 6047: 0x8FD5, + 6048: 0x8FE0, + 6049: 0x8FE3, + 6050: 0x8FE4, + 6051: 0x8FE8, + 6052: 0x8FEE, + 6053: 0x8FF1, + 6054: 0x8FF5, + 6055: 0x8FF6, + 6056: 0x8FFB, + 6057: 0x8FFE, + 6058: 0x9002, + 6059: 0x9004, + 6060: 0x9008, + 6061: 0x900C, + 6062: 0x9018, + 6063: 0x901B, + 6064: 0x9028, + 6065: 0x9029, + 6066: 0x902F, + 6067: 0x902A, + 6068: 0x902C, + 6069: 0x902D, + 6070: 0x9033, + 6071: 0x9034, + 6072: 0x9037, + 6073: 0x903F, + 6074: 0x9043, + 6075: 0x9044, + 6076: 0x904C, + 6077: 0x905B, + 6078: 0x905D, + 6079: 0x9062, + 6080: 0x9066, + 6081: 0x9067, + 6082: 0x906C, + 6083: 0x9070, + 6084: 0x9074, + 6085: 0x9079, + 6086: 0x9085, + 6087: 0x9088, + 6088: 0x908B, + 6089: 0x908C, + 6090: 0x908E, + 6091: 0x9090, + 6092: 0x9095, + 6093: 0x9097, + 6094: 0x9098, + 6095: 0x9099, + 6096: 0x909B, + 6097: 0x90A0, + 6098: 0x90A1, + 6099: 0x90A2, + 6100: 0x90A5, + 6101: 0x90B0, + 6102: 0x90B2, + 6103: 0x90B3, + 6104: 0x90B4, + 6105: 0x90B6, + 6106: 0x90BD, + 6107: 0x90CC, + 6108: 0x90BE, + 6109: 0x90C3, + 6110: 0x90C4, + 6111: 0x90C5, + 6112: 0x90C7, + 6113: 0x90C8, + 6114: 0x90D5, + 6115: 0x90D7, + 6116: 0x90D8, + 6117: 0x90D9, + 6118: 0x90DC, + 6119: 0x90DD, + 6120: 0x90DF, + 6121: 0x90E5, + 6122: 0x90D2, + 6123: 0x90F6, + 6124: 0x90EB, + 6125: 0x90EF, + 6126: 0x90F0, + 6127: 0x90F4, + 6128: 0x90FE, + 6129: 0x90FF, + 6130: 0x9100, + 6131: 0x9104, + 6132: 0x9105, + 6133: 0x9106, + 6134: 0x9108, + 6135: 0x910D, + 6136: 0x9110, + 6137: 0x9114, + 6138: 0x9116, + 6139: 0x9117, + 6140: 0x9118, + 6141: 0x911A, + 6142: 0x911C, + 6143: 0x911E, + 6144: 0x9120, + 6145: 0x9125, + 6146: 0x9122, + 6147: 0x9123, + 6148: 0x9127, + 6149: 0x9129, + 6150: 0x912E, + 6151: 0x912F, + 6152: 0x9131, + 6153: 0x9134, + 6154: 0x9136, + 6155: 0x9137, + 6156: 0x9139, + 6157: 0x913A, + 6158: 0x913C, + 6159: 0x913D, + 6160: 0x9143, + 6161: 0x9147, + 6162: 0x9148, + 6163: 0x914F, + 6164: 0x9153, + 6165: 0x9157, + 6166: 0x9159, + 6167: 0x915A, + 6168: 0x915B, + 6169: 0x9161, + 6170: 0x9164, + 6171: 0x9167, + 6172: 0x916D, + 6173: 0x9174, + 6174: 0x9179, + 6175: 0x917A, + 6176: 0x917B, + 6177: 0x9181, + 6178: 0x9183, + 6179: 0x9185, + 6180: 0x9186, + 6181: 0x918A, + 6182: 0x918E, + 6183: 0x9191, + 6184: 0x9193, + 6185: 0x9194, + 6186: 0x9195, + 6187: 0x9198, + 6188: 0x919E, + 6189: 0x91A1, + 6190: 0x91A6, + 6191: 0x91A8, + 6192: 0x91AC, + 6193: 0x91AD, + 6194: 0x91AE, + 6195: 0x91B0, + 6196: 0x91B1, + 6197: 0x91B2, + 6198: 0x91B3, + 6199: 0x91B6, + 6200: 0x91BB, + 6201: 0x91BC, + 6202: 0x91BD, + 6203: 0x91BF, + 6204: 0x91C2, + 6205: 0x91C3, + 6206: 0x91C5, + 6207: 0x91D3, + 6208: 0x91D4, + 6209: 0x91D7, + 6210: 0x91D9, + 6211: 0x91DA, + 6212: 0x91DE, + 6213: 0x91E4, + 6214: 0x91E5, + 6215: 0x91E9, + 6216: 0x91EA, + 6217: 0x91EC, + 6218: 0x91ED, + 6219: 0x91EE, + 6220: 0x91EF, + 6221: 0x91F0, + 6222: 0x91F1, + 6223: 0x91F7, + 6224: 0x91F9, + 6225: 0x91FB, + 6226: 0x91FD, + 6227: 0x9200, + 6228: 0x9201, + 6229: 0x9204, + 6230: 0x9205, + 6231: 0x9206, + 6232: 0x9207, + 6233: 0x9209, + 6234: 0x920A, + 6235: 0x920C, + 6236: 0x9210, + 6237: 0x9212, + 6238: 0x9213, + 6239: 0x9216, + 6240: 0x9218, + 6241: 0x921C, + 6242: 0x921D, + 6243: 0x9223, + 6244: 0x9224, + 6245: 0x9225, + 6246: 0x9226, + 6247: 0x9228, + 6248: 0x922E, + 6249: 0x922F, + 6250: 0x9230, + 6251: 0x9233, + 6252: 0x9235, + 6253: 0x9236, + 6254: 0x9238, + 6255: 0x9239, + 6256: 0x923A, + 6257: 0x923C, + 6258: 0x923E, + 6259: 0x9240, + 6260: 0x9242, + 6261: 0x9243, + 6262: 0x9246, + 6263: 0x9247, + 6264: 0x924A, + 6265: 0x924D, + 6266: 0x924E, + 6267: 0x924F, + 6268: 0x9251, + 6269: 0x9258, + 6270: 0x9259, + 6271: 0x925C, + 6272: 0x925D, + 6273: 0x9260, + 6274: 0x9261, + 6275: 0x9265, + 6276: 0x9267, + 6277: 0x9268, + 6278: 0x9269, + 6279: 0x926E, + 6280: 0x926F, + 6281: 0x9270, + 6282: 0x9275, + 6283: 0x9276, + 6284: 0x9277, + 6285: 0x9278, + 6286: 0x9279, + 6287: 0x927B, + 6288: 0x927C, + 6289: 0x927D, + 6290: 0x927F, + 6291: 0x9288, + 6292: 0x9289, + 6293: 0x928A, + 6294: 0x928D, + 6295: 0x928E, + 6296: 0x9292, + 6297: 0x9297, + 6298: 0x9299, + 6299: 0x929F, + 6300: 0x92A0, + 6301: 0x92A4, + 6302: 0x92A5, + 6303: 0x92A7, + 6304: 0x92A8, + 6305: 0x92AB, + 6306: 0x92AF, + 6307: 0x92B2, + 6308: 0x92B6, + 6309: 0x92B8, + 6310: 0x92BA, + 6311: 0x92BB, + 6312: 0x92BC, + 6313: 0x92BD, + 6314: 0x92BF, + 6315: 0x92C0, + 6316: 0x92C1, + 6317: 0x92C2, + 6318: 0x92C3, + 6319: 0x92C5, + 6320: 0x92C6, + 6321: 0x92C7, + 6322: 0x92C8, + 6323: 0x92CB, + 6324: 0x92CC, + 6325: 0x92CD, + 6326: 0x92CE, + 6327: 0x92D0, + 6328: 0x92D3, + 6329: 0x92D5, + 6330: 0x92D7, + 6331: 0x92D8, + 6332: 0x92D9, + 6333: 0x92DC, + 6334: 0x92DD, + 6335: 0x92DF, + 6336: 0x92E0, + 6337: 0x92E1, + 6338: 0x92E3, + 6339: 0x92E5, + 6340: 0x92E7, + 6341: 0x92E8, + 6342: 0x92EC, + 6343: 0x92EE, + 6344: 0x92F0, + 6345: 0x92F9, + 6346: 0x92FB, + 6347: 0x92FF, + 6348: 0x9300, + 6349: 0x9302, + 6350: 0x9308, + 6351: 0x930D, + 6352: 0x9311, + 6353: 0x9314, + 6354: 0x9315, + 6355: 0x931C, + 6356: 0x931D, + 6357: 0x931E, + 6358: 0x931F, + 6359: 0x9321, + 6360: 0x9324, + 6361: 0x9325, + 6362: 0x9327, + 6363: 0x9329, + 6364: 0x932A, + 6365: 0x9333, + 6366: 0x9334, + 6367: 0x9336, + 6368: 0x9337, + 6369: 0x9347, + 6370: 0x9348, + 6371: 0x9349, + 6372: 0x9350, + 6373: 0x9351, + 6374: 0x9352, + 6375: 0x9355, + 6376: 0x9357, + 6377: 0x9358, + 6378: 0x935A, + 6379: 0x935E, + 6380: 0x9364, + 6381: 0x9365, + 6382: 0x9367, + 6383: 0x9369, + 6384: 0x936A, + 6385: 0x936D, + 6386: 0x936F, + 6387: 0x9370, + 6388: 0x9371, + 6389: 0x9373, + 6390: 0x9374, + 6391: 0x9376, + 6392: 0x937A, + 6393: 0x937D, + 6394: 0x937F, + 6395: 0x9380, + 6396: 0x9381, + 6397: 0x9382, + 6398: 0x9388, + 6399: 0x938A, + 6400: 0x938B, + 6401: 0x938D, + 6402: 0x938F, + 6403: 0x9392, + 6404: 0x9395, + 6405: 0x9398, + 6406: 0x939B, + 6407: 0x939E, + 6408: 0x93A1, + 6409: 0x93A3, + 6410: 0x93A4, + 6411: 0x93A6, + 6412: 0x93A8, + 6413: 0x93AB, + 6414: 0x93B4, + 6415: 0x93B5, + 6416: 0x93B6, + 6417: 0x93BA, + 6418: 0x93A9, + 6419: 0x93C1, + 6420: 0x93C4, + 6421: 0x93C5, + 6422: 0x93C6, + 6423: 0x93C7, + 6424: 0x93C9, + 6425: 0x93CA, + 6426: 0x93CB, + 6427: 0x93CC, + 6428: 0x93CD, + 6429: 0x93D3, + 6430: 0x93D9, + 6431: 0x93DC, + 6432: 0x93DE, + 6433: 0x93DF, + 6434: 0x93E2, + 6435: 0x93E6, + 6436: 0x93E7, + 6437: 0x93F9, + 6438: 0x93F7, + 6439: 0x93F8, + 6440: 0x93FA, + 6441: 0x93FB, + 6442: 0x93FD, + 6443: 0x9401, + 6444: 0x9402, + 6445: 0x9404, + 6446: 0x9408, + 6447: 0x9409, + 6448: 0x940D, + 6449: 0x940E, + 6450: 0x940F, + 6451: 0x9415, + 6452: 0x9416, + 6453: 0x9417, + 6454: 0x941F, + 6455: 0x942E, + 6456: 0x942F, + 6457: 0x9431, + 6458: 0x9432, + 6459: 0x9433, + 6460: 0x9434, + 6461: 0x943B, + 6462: 0x943F, + 6463: 0x943D, + 6464: 0x9443, + 6465: 0x9445, + 6466: 0x9448, + 6467: 0x944A, + 6468: 0x944C, + 6469: 0x9455, + 6470: 0x9459, + 6471: 0x945C, + 6472: 0x945F, + 6473: 0x9461, + 6474: 0x9463, + 6475: 0x9468, + 6476: 0x946B, + 6477: 0x946D, + 6478: 0x946E, + 6479: 0x946F, + 6480: 0x9471, + 6481: 0x9472, + 6482: 0x9484, + 6483: 0x9483, + 6484: 0x9578, + 6485: 0x9579, + 6486: 0x957E, + 6487: 0x9584, + 6488: 0x9588, + 6489: 0x958C, + 6490: 0x958D, + 6491: 0x958E, + 6492: 0x959D, + 6493: 0x959E, + 6494: 0x959F, + 6495: 0x95A1, + 6496: 0x95A6, + 6497: 0x95A9, + 6498: 0x95AB, + 6499: 0x95AC, + 6500: 0x95B4, + 6501: 0x95B6, + 6502: 0x95BA, + 6503: 0x95BD, + 6504: 0x95BF, + 6505: 0x95C6, + 6506: 0x95C8, + 6507: 0x95C9, + 6508: 0x95CB, + 6509: 0x95D0, + 6510: 0x95D1, + 6511: 0x95D2, + 6512: 0x95D3, + 6513: 0x95D9, + 6514: 0x95DA, + 6515: 0x95DD, + 6516: 0x95DE, + 6517: 0x95DF, + 6518: 0x95E0, + 6519: 0x95E4, + 6520: 0x95E6, + 6521: 0x961D, + 6522: 0x961E, + 6523: 0x9622, + 6524: 0x9624, + 6525: 0x9625, + 6526: 0x9626, + 6527: 0x962C, + 6528: 0x9631, + 6529: 0x9633, + 6530: 0x9637, + 6531: 0x9638, + 6532: 0x9639, + 6533: 0x963A, + 6534: 0x963C, + 6535: 0x963D, + 6536: 0x9641, + 6537: 0x9652, + 6538: 0x9654, + 6539: 0x9656, + 6540: 0x9657, + 6541: 0x9658, + 6542: 0x9661, + 6543: 0x966E, + 6544: 0x9674, + 6545: 0x967B, + 6546: 0x967C, + 6547: 0x967E, + 6548: 0x967F, + 6549: 0x9681, + 6550: 0x9682, + 6551: 0x9683, + 6552: 0x9684, + 6553: 0x9689, + 6554: 0x9691, + 6555: 0x9696, + 6556: 0x969A, + 6557: 0x969D, + 6558: 0x969F, + 6559: 0x96A4, + 6560: 0x96A5, + 6561: 0x96A6, + 6562: 0x96A9, + 6563: 0x96AE, + 6564: 0x96AF, + 6565: 0x96B3, + 6566: 0x96BA, + 6567: 0x96CA, + 6568: 0x96D2, + 6569: 0x5DB2, + 6570: 0x96D8, + 6571: 0x96DA, + 6572: 0x96DD, + 6573: 0x96DE, + 6574: 0x96DF, + 6575: 0x96E9, + 6576: 0x96EF, + 6577: 0x96F1, + 6578: 0x96FA, + 6579: 0x9702, + 6580: 0x9703, + 6581: 0x9705, + 6582: 0x9709, + 6583: 0x971A, + 6584: 0x971B, + 6585: 0x971D, + 6586: 0x9721, + 6587: 0x9722, + 6588: 0x9723, + 6589: 0x9728, + 6590: 0x9731, + 6591: 0x9733, + 6592: 0x9741, + 6593: 0x9743, + 6594: 0x974A, + 6595: 0x974E, + 6596: 0x974F, + 6597: 0x9755, + 6598: 0x9757, + 6599: 0x9758, + 6600: 0x975A, + 6601: 0x975B, + 6602: 0x9763, + 6603: 0x9767, + 6604: 0x976A, + 6605: 0x976E, + 6606: 0x9773, + 6607: 0x9776, + 6608: 0x9777, + 6609: 0x9778, + 6610: 0x977B, + 6611: 0x977D, + 6612: 0x977F, + 6613: 0x9780, + 6614: 0x9789, + 6615: 0x9795, + 6616: 0x9796, + 6617: 0x9797, + 6618: 0x9799, + 6619: 0x979A, + 6620: 0x979E, + 6621: 0x979F, + 6622: 0x97A2, + 6623: 0x97AC, + 6624: 0x97AE, + 6625: 0x97B1, + 6626: 0x97B2, + 6627: 0x97B5, + 6628: 0x97B6, + 6629: 0x97B8, + 6630: 0x97B9, + 6631: 0x97BA, + 6632: 0x97BC, + 6633: 0x97BE, + 6634: 0x97BF, + 6635: 0x97C1, + 6636: 0x97C4, + 6637: 0x97C5, + 6638: 0x97C7, + 6639: 0x97C9, + 6640: 0x97CA, + 6641: 0x97CC, + 6642: 0x97CD, + 6643: 0x97CE, + 6644: 0x97D0, + 6645: 0x97D1, + 6646: 0x97D4, + 6647: 0x97D7, + 6648: 0x97D8, + 6649: 0x97D9, + 6650: 0x97DD, + 6651: 0x97DE, + 6652: 0x97E0, + 6653: 0x97DB, + 6654: 0x97E1, + 6655: 0x97E4, + 6656: 0x97EF, + 6657: 0x97F1, + 6658: 0x97F4, + 6659: 0x97F7, + 6660: 0x97F8, + 6661: 0x97FA, + 6662: 0x9807, + 6663: 0x980A, + 6664: 0x9819, + 6665: 0x980D, + 6666: 0x980E, + 6667: 0x9814, + 6668: 0x9816, + 6669: 0x981C, + 6670: 0x981E, + 6671: 0x9820, + 6672: 0x9823, + 6673: 0x9826, + 6674: 0x982B, + 6675: 0x982E, + 6676: 0x982F, + 6677: 0x9830, + 6678: 0x9832, + 6679: 0x9833, + 6680: 0x9835, + 6681: 0x9825, + 6682: 0x983E, + 6683: 0x9844, + 6684: 0x9847, + 6685: 0x984A, + 6686: 0x9851, + 6687: 0x9852, + 6688: 0x9853, + 6689: 0x9856, + 6690: 0x9857, + 6691: 0x9859, + 6692: 0x985A, + 6693: 0x9862, + 6694: 0x9863, + 6695: 0x9865, + 6696: 0x9866, + 6697: 0x986A, + 6698: 0x986C, + 6699: 0x98AB, + 6700: 0x98AD, + 6701: 0x98AE, + 6702: 0x98B0, + 6703: 0x98B4, + 6704: 0x98B7, + 6705: 0x98B8, + 6706: 0x98BA, + 6707: 0x98BB, + 6708: 0x98BF, + 6709: 0x98C2, + 6710: 0x98C5, + 6711: 0x98C8, + 6712: 0x98CC, + 6713: 0x98E1, + 6714: 0x98E3, + 6715: 0x98E5, + 6716: 0x98E6, + 6717: 0x98E7, + 6718: 0x98EA, + 6719: 0x98F3, + 6720: 0x98F6, + 6721: 0x9902, + 6722: 0x9907, + 6723: 0x9908, + 6724: 0x9911, + 6725: 0x9915, + 6726: 0x9916, + 6727: 0x9917, + 6728: 0x991A, + 6729: 0x991B, + 6730: 0x991C, + 6731: 0x991F, + 6732: 0x9922, + 6733: 0x9926, + 6734: 0x9927, + 6735: 0x992B, + 6736: 0x9931, + 6737: 0x9932, + 6738: 0x9933, + 6739: 0x9934, + 6740: 0x9935, + 6741: 0x9939, + 6742: 0x993A, + 6743: 0x993B, + 6744: 0x993C, + 6745: 0x9940, + 6746: 0x9941, + 6747: 0x9946, + 6748: 0x9947, + 6749: 0x9948, + 6750: 0x994D, + 6751: 0x994E, + 6752: 0x9954, + 6753: 0x9958, + 6754: 0x9959, + 6755: 0x995B, + 6756: 0x995C, + 6757: 0x995E, + 6758: 0x995F, + 6759: 0x9960, + 6760: 0x999B, + 6761: 0x999D, + 6762: 0x999F, + 6763: 0x99A6, + 6764: 0x99B0, + 6765: 0x99B1, + 6766: 0x99B2, + 6767: 0x99B5, + 6768: 0x99B9, + 6769: 0x99BA, + 6770: 0x99BD, + 6771: 0x99BF, + 6772: 0x99C3, + 6773: 0x99C9, + 6774: 0x99D3, + 6775: 0x99D4, + 6776: 0x99D9, + 6777: 0x99DA, + 6778: 0x99DC, + 6779: 0x99DE, + 6780: 0x99E7, + 6781: 0x99EA, + 6782: 0x99EB, + 6783: 0x99EC, + 6784: 0x99F0, + 6785: 0x99F4, + 6786: 0x99F5, + 6787: 0x99F9, + 6788: 0x99FD, + 6789: 0x99FE, + 6790: 0x9A02, + 6791: 0x9A03, + 6792: 0x9A04, + 6793: 0x9A0B, + 6794: 0x9A0C, + 6795: 0x9A10, + 6796: 0x9A11, + 6797: 0x9A16, + 6798: 0x9A1E, + 6799: 0x9A20, + 6800: 0x9A22, + 6801: 0x9A23, + 6802: 0x9A24, + 6803: 0x9A27, + 6804: 0x9A2D, + 6805: 0x9A2E, + 6806: 0x9A33, + 6807: 0x9A35, + 6808: 0x9A36, + 6809: 0x9A38, + 6810: 0x9A47, + 6811: 0x9A41, + 6812: 0x9A44, + 6813: 0x9A4A, + 6814: 0x9A4B, + 6815: 0x9A4C, + 6816: 0x9A4E, + 6817: 0x9A51, + 6818: 0x9A54, + 6819: 0x9A56, + 6820: 0x9A5D, + 6821: 0x9AAA, + 6822: 0x9AAC, + 6823: 0x9AAE, + 6824: 0x9AAF, + 6825: 0x9AB2, + 6826: 0x9AB4, + 6827: 0x9AB5, + 6828: 0x9AB6, + 6829: 0x9AB9, + 6830: 0x9ABB, + 6831: 0x9ABE, + 6832: 0x9ABF, + 6833: 0x9AC1, + 6834: 0x9AC3, + 6835: 0x9AC6, + 6836: 0x9AC8, + 6837: 0x9ACE, + 6838: 0x9AD0, + 6839: 0x9AD2, + 6840: 0x9AD5, + 6841: 0x9AD6, + 6842: 0x9AD7, + 6843: 0x9ADB, + 6844: 0x9ADC, + 6845: 0x9AE0, + 6846: 0x9AE4, + 6847: 0x9AE5, + 6848: 0x9AE7, + 6849: 0x9AE9, + 6850: 0x9AEC, + 6851: 0x9AF2, + 6852: 0x9AF3, + 6853: 0x9AF5, + 6854: 0x9AF9, + 6855: 0x9AFA, + 6856: 0x9AFD, + 6857: 0x9AFF, + 6858: 0x9B00, + 6859: 0x9B01, + 6860: 0x9B02, + 6861: 0x9B03, + 6862: 0x9B04, + 6863: 0x9B05, + 6864: 0x9B08, + 6865: 0x9B09, + 6866: 0x9B0B, + 6867: 0x9B0C, + 6868: 0x9B0D, + 6869: 0x9B0E, + 6870: 0x9B10, + 6871: 0x9B12, + 6872: 0x9B16, + 6873: 0x9B19, + 6874: 0x9B1B, + 6875: 0x9B1C, + 6876: 0x9B20, + 6877: 0x9B26, + 6878: 0x9B2B, + 6879: 0x9B2D, + 6880: 0x9B33, + 6881: 0x9B34, + 6882: 0x9B35, + 6883: 0x9B37, + 6884: 0x9B39, + 6885: 0x9B3A, + 6886: 0x9B3D, + 6887: 0x9B48, + 6888: 0x9B4B, + 6889: 0x9B4C, + 6890: 0x9B55, + 6891: 0x9B56, + 6892: 0x9B57, + 6893: 0x9B5B, + 6894: 0x9B5E, + 6895: 0x9B61, + 6896: 0x9B63, + 6897: 0x9B65, + 6898: 0x9B66, + 6899: 0x9B68, + 6900: 0x9B6A, + 6901: 0x9B6B, + 6902: 0x9B6C, + 6903: 0x9B6D, + 6904: 0x9B6E, + 6905: 0x9B73, + 6906: 0x9B75, + 6907: 0x9B77, + 6908: 0x9B78, + 6909: 0x9B79, + 6910: 0x9B7F, + 6911: 0x9B80, + 6912: 0x9B84, + 6913: 0x9B85, + 6914: 0x9B86, + 6915: 0x9B87, + 6916: 0x9B89, + 6917: 0x9B8A, + 6918: 0x9B8B, + 6919: 0x9B8D, + 6920: 0x9B8F, + 6921: 0x9B90, + 6922: 0x9B94, + 6923: 0x9B9A, + 6924: 0x9B9D, + 6925: 0x9B9E, + 6926: 0x9BA6, + 6927: 0x9BA7, + 6928: 0x9BA9, + 6929: 0x9BAC, + 6930: 0x9BB0, + 6931: 0x9BB1, + 6932: 0x9BB2, + 6933: 0x9BB7, + 6934: 0x9BB8, + 6935: 0x9BBB, + 6936: 0x9BBC, + 6937: 0x9BBE, + 6938: 0x9BBF, + 6939: 0x9BC1, + 6940: 0x9BC7, + 6941: 0x9BC8, + 6942: 0x9BCE, + 6943: 0x9BD0, + 6944: 0x9BD7, + 6945: 0x9BD8, + 6946: 0x9BDD, + 6947: 0x9BDF, + 6948: 0x9BE5, + 6949: 0x9BE7, + 6950: 0x9BEA, + 6951: 0x9BEB, + 6952: 0x9BEF, + 6953: 0x9BF3, + 6954: 0x9BF7, + 6955: 0x9BF8, + 6956: 0x9BF9, + 6957: 0x9BFA, + 6958: 0x9BFD, + 6959: 0x9BFF, + 6960: 0x9C00, + 6961: 0x9C02, + 6962: 0x9C0B, + 6963: 0x9C0F, + 6964: 0x9C11, + 6965: 0x9C16, + 6966: 0x9C18, + 6967: 0x9C19, + 6968: 0x9C1A, + 6969: 0x9C1C, + 6970: 0x9C1E, + 6971: 0x9C22, + 6972: 0x9C23, + 6973: 0x9C26, + 6974: 0x9C27, + 6975: 0x9C28, + 6976: 0x9C29, + 6977: 0x9C2A, + 6978: 0x9C31, + 6979: 0x9C35, + 6980: 0x9C36, + 6981: 0x9C37, + 6982: 0x9C3D, + 6983: 0x9C41, + 6984: 0x9C43, + 6985: 0x9C44, + 6986: 0x9C45, + 6987: 0x9C49, + 6988: 0x9C4A, + 6989: 0x9C4E, + 6990: 0x9C4F, + 6991: 0x9C50, + 6992: 0x9C53, + 6993: 0x9C54, + 6994: 0x9C56, + 6995: 0x9C58, + 6996: 0x9C5B, + 6997: 0x9C5D, + 6998: 0x9C5E, + 6999: 0x9C5F, + 7000: 0x9C63, + 7001: 0x9C69, + 7002: 0x9C6A, + 7003: 0x9C5C, + 7004: 0x9C6B, + 7005: 0x9C68, + 7006: 0x9C6E, + 7007: 0x9C70, + 7008: 0x9C72, + 7009: 0x9C75, + 7010: 0x9C77, + 7011: 0x9C7B, + 7012: 0x9CE6, + 7013: 0x9CF2, + 7014: 0x9CF7, + 7015: 0x9CF9, + 7016: 0x9D0B, + 7017: 0x9D02, + 7018: 0x9D11, + 7019: 0x9D17, + 7020: 0x9D18, + 7021: 0x9D1C, + 7022: 0x9D1D, + 7023: 0x9D1E, + 7024: 0x9D2F, + 7025: 0x9D30, + 7026: 0x9D32, + 7027: 0x9D33, + 7028: 0x9D34, + 7029: 0x9D3A, + 7030: 0x9D3C, + 7031: 0x9D45, + 7032: 0x9D3D, + 7033: 0x9D42, + 7034: 0x9D43, + 7035: 0x9D47, + 7036: 0x9D4A, + 7037: 0x9D53, + 7038: 0x9D54, + 7039: 0x9D5F, + 7040: 0x9D63, + 7041: 0x9D62, + 7042: 0x9D65, + 7043: 0x9D69, + 7044: 0x9D6A, + 7045: 0x9D6B, + 7046: 0x9D70, + 7047: 0x9D76, + 7048: 0x9D77, + 7049: 0x9D7B, + 7050: 0x9D7C, + 7051: 0x9D7E, + 7052: 0x9D83, + 7053: 0x9D84, + 7054: 0x9D86, + 7055: 0x9D8A, + 7056: 0x9D8D, + 7057: 0x9D8E, + 7058: 0x9D92, + 7059: 0x9D93, + 7060: 0x9D95, + 7061: 0x9D96, + 7062: 0x9D97, + 7063: 0x9D98, + 7064: 0x9DA1, + 7065: 0x9DAA, + 7066: 0x9DAC, + 7067: 0x9DAE, + 7068: 0x9DB1, + 7069: 0x9DB5, + 7070: 0x9DB9, + 7071: 0x9DBC, + 7072: 0x9DBF, + 7073: 0x9DC3, + 7074: 0x9DC7, + 7075: 0x9DC9, + 7076: 0x9DCA, + 7077: 0x9DD4, + 7078: 0x9DD5, + 7079: 0x9DD6, + 7080: 0x9DD7, + 7081: 0x9DDA, + 7082: 0x9DDE, + 7083: 0x9DDF, + 7084: 0x9DE0, + 7085: 0x9DE5, + 7086: 0x9DE7, + 7087: 0x9DE9, + 7088: 0x9DEB, + 7089: 0x9DEE, + 7090: 0x9DF0, + 7091: 0x9DF3, + 7092: 0x9DF4, + 7093: 0x9DFE, + 7094: 0x9E0A, + 7095: 0x9E02, + 7096: 0x9E07, + 7097: 0x9E0E, + 7098: 0x9E10, + 7099: 0x9E11, + 7100: 0x9E12, + 7101: 0x9E15, + 7102: 0x9E16, + 7103: 0x9E19, + 7104: 0x9E1C, + 7105: 0x9E1D, + 7106: 0x9E7A, + 7107: 0x9E7B, + 7108: 0x9E7C, + 7109: 0x9E80, + 7110: 0x9E82, + 7111: 0x9E83, + 7112: 0x9E84, + 7113: 0x9E85, + 7114: 0x9E87, + 7115: 0x9E8E, + 7116: 0x9E8F, + 7117: 0x9E96, + 7118: 0x9E98, + 7119: 0x9E9B, + 7120: 0x9E9E, + 7121: 0x9EA4, + 7122: 0x9EA8, + 7123: 0x9EAC, + 7124: 0x9EAE, + 7125: 0x9EAF, + 7126: 0x9EB0, + 7127: 0x9EB3, + 7128: 0x9EB4, + 7129: 0x9EB5, + 7130: 0x9EC6, + 7131: 0x9EC8, + 7132: 0x9ECB, + 7133: 0x9ED5, + 7134: 0x9EDF, + 7135: 0x9EE4, + 7136: 0x9EE7, + 7137: 0x9EEC, + 7138: 0x9EED, + 7139: 0x9EEE, + 7140: 0x9EF0, + 7141: 0x9EF1, + 7142: 0x9EF2, + 7143: 0x9EF5, + 7144: 0x9EF8, + 7145: 0x9EFF, + 7146: 0x9F02, + 7147: 0x9F03, + 7148: 0x9F09, + 7149: 0x9F0F, + 7150: 0x9F10, + 7151: 0x9F11, + 7152: 0x9F12, + 7153: 0x9F14, + 7154: 0x9F16, + 7155: 0x9F17, + 7156: 0x9F19, + 7157: 0x9F1A, + 7158: 0x9F1B, + 7159: 0x9F1F, + 7160: 0x9F22, + 7161: 0x9F26, + 7162: 0x9F2A, + 7163: 0x9F2B, + 7164: 0x9F2F, + 7165: 0x9F31, + 7166: 0x9F32, + 7167: 0x9F34, + 7168: 0x9F37, + 7169: 0x9F39, + 7170: 0x9F3A, + 7171: 0x9F3C, + 7172: 0x9F3D, + 7173: 0x9F3F, + 7174: 0x9F41, + 7175: 0x9F43, + 7176: 0x9F44, + 7177: 0x9F45, + 7178: 0x9F46, + 7179: 0x9F47, + 7180: 0x9F53, + 7181: 0x9F55, + 7182: 0x9F56, + 7183: 0x9F57, + 7184: 0x9F58, + 7185: 0x9F5A, + 7186: 0x9F5D, + 7187: 0x9F5E, + 7188: 0x9F68, + 7189: 0x9F69, + 7190: 0x9F6D, + 7191: 0x9F6E, + 7192: 0x9F6F, + 7193: 0x9F70, + 7194: 0x9F71, + 7195: 0x9F73, + 7196: 0x9F75, + 7197: 0x9F7A, + 7198: 0x9F7D, + 7199: 0x9F8F, + 7200: 0x9F90, + 7201: 0x9F91, + 7202: 0x9F92, + 7203: 0x9F94, + 7204: 0x9F96, + 7205: 0x9F97, + 7206: 0x9F9E, + 7207: 0x9FA1, + 7208: 0x9FA2, + 7209: 0x9FA3, + 7210: 0x9FA5, +} + +const ( + jis0208 = 1 + jis0212 = 2 + codeMask = 0x7f + codeShift = 7 + tableShift = 14 +) + +const numEncodeTables = 6 + +// encodeX are the encoding tables from Unicode to JIS code, +// sorted by decreasing length. +// encode0: 20902 entries for runes in [19968, 40870). +// encode1: 1632 entries for runes in [ 8208, 9840). +// encode2: 974 entries for runes in [12288, 13262). +// encode3: 959 entries for runes in [ 161, 1120). +// encode4: 261 entries for runes in [63785, 64046). +// encode5: 229 entries for runes in [65281, 65510). +// +// The high two bits of the value record whether the JIS code comes from the +// JIS0208 table (high bits == 1) or the JIS0212 table (high bits == 2). +// The low 14 bits are two 7-bit unsigned integers j1 and j2 that form the +// JIS code (94*j1 + j2) within that table. + +const encode0Low, encode0High = 19968, 40870 + +var encode0 = [...]uint16{ + 19968 - 19968: jis0208<<14 | 0x0F<<7 | 0x4B, + 19969 - 19968: jis0208<<14 | 0x22<<7 | 0x59, + 19970 - 19968: jis0212<<14 | 0x0F<<7 | 0x00, + 19971 - 19968: jis0208<<14 | 0x1B<<7 | 0x16, + 19972 - 19968: jis0212<<14 | 0x0F<<7 | 0x01, + 19973 - 19968: jis0212<<14 | 0x0F<<7 | 0x02, + 19975 - 19968: jis0208<<14 | 0x2A<<7 | 0x5B, + 19976 - 19968: jis0208<<14 | 0x1D<<7 | 0x45, + 19977 - 19968: jis0208<<14 | 0x1A<<7 | 0x0F, + 19978 - 19968: jis0208<<14 | 0x1D<<7 | 0x44, + 19979 - 19968: jis0208<<14 | 0x11<<7 | 0x1B, + 19980 - 19968: jis0212<<14 | 0x0F<<7 | 0x03, + 19981 - 19968: jis0208<<14 | 0x28<<7 | 0x33, + 19982 - 19968: jis0208<<14 | 0x2C<<7 | 0x1E, + 19984 - 19968: jis0208<<14 | 0x2F<<7 | 0x01, + 19985 - 19968: jis0208<<14 | 0x10<<7 | 0x0E, + 19986 - 19968: jis0212<<14 | 0x0F<<7 | 0x04, + 19988 - 19968: jis0208<<14 | 0x12<<7 | 0x4D, + 19989 - 19968: jis0208<<14 | 0x2F<<7 | 0x02, + 19990 - 19968: jis0208<<14 | 0x1F<<7 | 0x03, + 19991 - 19968: jis0208<<14 | 0x31<<7 | 0x21, + 19992 - 19968: jis0208<<14 | 0x14<<7 | 0x35, + 19993 - 19968: jis0208<<14 | 0x29<<7 | 0x19, + 19998 - 19968: jis0208<<14 | 0x1D<<7 | 0x46, + 19999 - 19968: jis0212<<14 | 0x0F<<7 | 0x05, + 20001 - 19968: jis0208<<14 | 0x2D<<7 | 0x1D, + 20003 - 19968: jis0212<<14 | 0x0F<<7 | 0x06, + 20004 - 19968: jis0212<<14 | 0x0F<<7 | 0x07, + 20006 - 19968: jis0208<<14 | 0x29<<7 | 0x21, + 20008 - 19968: jis0208<<14 | 0x58<<7 | 0x0C, + 20010 - 19968: jis0208<<14 | 0x2F<<7 | 0x03, + 20011 - 19968: jis0212<<14 | 0x0F<<7 | 0x09, + 20013 - 19968: jis0208<<14 | 0x22<<7 | 0x45, + 20014 - 19968: jis0212<<14 | 0x0F<<7 | 0x0A, + 20015 - 19968: jis0212<<14 | 0x0F<<7 | 0x0B, + 20016 - 19968: jis0212<<14 | 0x0F<<7 | 0x0C, + 20017 - 19968: jis0208<<14 | 0x2F<<7 | 0x04, + 20018 - 19968: jis0208<<14 | 0x15<<7 | 0x59, + 20021 - 19968: jis0212<<14 | 0x0F<<7 | 0x0D, + 20022 - 19968: jis0208<<14 | 0x2F<<7 | 0x05, + 20024 - 19968: jis0208<<14 | 0x13<<7 | 0x3C, + 20025 - 19968: jis0208<<14 | 0x22<<7 | 0x0F, + 20027 - 19968: jis0208<<14 | 0x1B<<7 | 0x46, + 20028 - 19968: jis0208<<14 | 0x2F<<7 | 0x06, + 20031 - 19968: jis0208<<14 | 0x2F<<7 | 0x07, + 20032 - 19968: jis0212<<14 | 0x0F<<7 | 0x0E, + 20033 - 19968: jis0212<<14 | 0x0F<<7 | 0x0F, + 20034 - 19968: jis0208<<14 | 0x2F<<7 | 0x08, + 20035 - 19968: jis0208<<14 | 0x26<<7 | 0x14, + 20036 - 19968: jis0212<<14 | 0x0F<<7 | 0x10, + 20037 - 19968: jis0208<<14 | 0x14<<7 | 0x36, + 20039 - 19968: jis0212<<14 | 0x0F<<7 | 0x11, + 20043 - 19968: jis0208<<14 | 0x26<<7 | 0x16, + 20045 - 19968: jis0208<<14 | 0x25<<7 | 0x42, + 20046 - 19968: jis0208<<14 | 0x17<<7 | 0x22, + 20047 - 19968: jis0208<<14 | 0x2A<<7 | 0x12, + 20049 - 19968: jis0212<<14 | 0x0F<<7 | 0x12, + 20053 - 19968: jis0208<<14 | 0x48<<7 | 0x28, + 20054 - 19968: jis0208<<14 | 0x2F<<7 | 0x09, + 20055 - 19968: jis0208<<14 | 0x1D<<7 | 0x47, + 20056 - 19968: jis0208<<14 | 0x2F<<7 | 0x0A, + 20057 - 19968: jis0208<<14 | 0x11<<7 | 0x14, + 20058 - 19968: jis0212<<14 | 0x0F<<7 | 0x13, + 20060 - 19968: jis0212<<14 | 0x0F<<7 | 0x14, + 20061 - 19968: jis0208<<14 | 0x15<<7 | 0x44, + 20062 - 19968: jis0208<<14 | 0x17<<7 | 0x4F, + 20063 - 19968: jis0208<<14 | 0x2B<<7 | 0x48, + 20066 - 19968: jis0208<<14 | 0x35<<7 | 0x05, + 20067 - 19968: jis0212<<14 | 0x0F<<7 | 0x15, + 20072 - 19968: jis0212<<14 | 0x0F<<7 | 0x16, + 20073 - 19968: jis0212<<14 | 0x0F<<7 | 0x17, + 20081 - 19968: jis0208<<14 | 0x2C<<7 | 0x4F, + 20083 - 19968: jis0208<<14 | 0x25<<7 | 0x5C, + 20084 - 19968: jis0212<<14 | 0x0F<<7 | 0x18, + 20085 - 19968: jis0212<<14 | 0x0F<<7 | 0x19, + 20089 - 19968: jis0212<<14 | 0x0F<<7 | 0x1A, + 20094 - 19968: jis0208<<14 | 0x13<<7 | 0x04, + 20095 - 19968: jis0212<<14 | 0x0F<<7 | 0x1B, + 20096 - 19968: jis0208<<14 | 0x14<<7 | 0x14, + 20098 - 19968: jis0208<<14 | 0x2F<<7 | 0x0B, + 20101 - 19968: jis0208<<14 | 0x2F<<7 | 0x0C, + 20102 - 19968: jis0208<<14 | 0x2D<<7 | 0x1A, + 20104 - 19968: jis0208<<14 | 0x2C<<7 | 0x1C, + 20105 - 19968: jis0208<<14 | 0x20<<7 | 0x47, + 20106 - 19968: jis0208<<14 | 0x2F<<7 | 0x0E, + 20107 - 19968: jis0208<<14 | 0x1A<<7 | 0x55, + 20108 - 19968: jis0208<<14 | 0x25<<7 | 0x52, + 20109 - 19968: jis0212<<14 | 0x0F<<7 | 0x1C, + 20110 - 19968: jis0208<<14 | 0x2F<<7 | 0x11, + 20113 - 19968: jis0208<<14 | 0x10<<7 | 0x1D, + 20114 - 19968: jis0208<<14 | 0x17<<7 | 0x3E, + 20116 - 19968: jis0208<<14 | 0x17<<7 | 0x3D, + 20117 - 19968: jis0208<<14 | 0x0F<<7 | 0x45, + 20118 - 19968: jis0212<<14 | 0x0F<<7 | 0x1D, + 20119 - 19968: jis0212<<14 | 0x0F<<7 | 0x1E, + 20120 - 19968: jis0208<<14 | 0x2E<<7 | 0x2A, + 20121 - 19968: jis0208<<14 | 0x2E<<7 | 0x29, + 20123 - 19968: jis0208<<14 | 0x19<<7 | 0x12, + 20124 - 19968: jis0208<<14 | 0x0F<<7 | 0x00, + 20125 - 19968: jis0212<<14 | 0x0F<<7 | 0x1F, + 20126 - 19968: jis0208<<14 | 0x2F<<7 | 0x12, + 20127 - 19968: jis0208<<14 | 0x2F<<7 | 0x13, + 20128 - 19968: jis0208<<14 | 0x2F<<7 | 0x14, + 20129 - 19968: jis0208<<14 | 0x2A<<7 | 0x13, + 20130 - 19968: jis0208<<14 | 0x2F<<7 | 0x15, + 20132 - 19968: jis0208<<14 | 0x17<<7 | 0x51, + 20133 - 19968: jis0208<<14 | 0x0F<<7 | 0x46, + 20134 - 19968: jis0208<<14 | 0x2A<<7 | 0x51, + 20136 - 19968: jis0208<<14 | 0x14<<7 | 0x5B, + 20139 - 19968: jis0208<<14 | 0x14<<7 | 0x5C, + 20140 - 19968: jis0208<<14 | 0x14<<7 | 0x5D, + 20141 - 19968: jis0208<<14 | 0x23<<7 | 0x41, + 20142 - 19968: jis0208<<14 | 0x2D<<7 | 0x1B, + 20143 - 19968: jis0212<<14 | 0x0F<<7 | 0x20, + 20144 - 19968: jis0208<<14 | 0x2F<<7 | 0x16, + 20147 - 19968: jis0208<<14 | 0x2F<<7 | 0x17, + 20150 - 19968: jis0208<<14 | 0x2F<<7 | 0x18, + 20153 - 19968: jis0212<<14 | 0x0F<<7 | 0x21, + 20154 - 19968: jis0208<<14 | 0x1E<<7 | 0x2C, + 20160 - 19968: jis0208<<14 | 0x1C<<7 | 0x19, + 20161 - 19968: jis0208<<14 | 0x1E<<7 | 0x2D, + 20162 - 19968: jis0208<<14 | 0x2F<<7 | 0x1D, + 20163 - 19968: jis0212<<14 | 0x0F<<7 | 0x22, + 20164 - 19968: jis0208<<14 | 0x2F<<7 | 0x1B, + 20166 - 19968: jis0208<<14 | 0x2F<<7 | 0x1C, + 20167 - 19968: jis0208<<14 | 0x14<<7 | 0x37, + 20170 - 19968: jis0208<<14 | 0x19<<7 | 0x02, + 20171 - 19968: jis0208<<14 | 0x11<<7 | 0x4F, + 20173 - 19968: jis0208<<14 | 0x2F<<7 | 0x1A, + 20174 - 19968: jis0208<<14 | 0x2F<<7 | 0x19, + 20175 - 19968: jis0208<<14 | 0x29<<7 | 0x08, + 20176 - 19968: jis0212<<14 | 0x0F<<7 | 0x23, + 20180 - 19968: jis0208<<14 | 0x1A<<7 | 0x25, + 20181 - 19968: jis0208<<14 | 0x1A<<7 | 0x24, + 20182 - 19968: jis0208<<14 | 0x21<<7 | 0x1D, + 20183 - 19968: jis0208<<14 | 0x2F<<7 | 0x1E, + 20184 - 19968: jis0208<<14 | 0x28<<7 | 0x34, + 20185 - 19968: jis0208<<14 | 0x1F<<7 | 0x46, + 20186 - 19968: jis0212<<14 | 0x0F<<7 | 0x24, + 20187 - 19968: jis0212<<14 | 0x0F<<7 | 0x25, + 20189 - 19968: jis0208<<14 | 0x00<<7 | 0x17, + 20190 - 19968: jis0208<<14 | 0x2F<<7 | 0x1F, + 20191 - 19968: jis0208<<14 | 0x2F<<7 | 0x21, + 20192 - 19968: jis0212<<14 | 0x0F<<7 | 0x26, + 20193 - 19968: jis0208<<14 | 0x58<<7 | 0x0D, + 20194 - 19968: jis0212<<14 | 0x0F<<7 | 0x28, + 20195 - 19968: jis0208<<14 | 0x21<<7 | 0x44, + 20196 - 19968: jis0208<<14 | 0x2D<<7 | 0x40, + 20197 - 19968: jis0208<<14 | 0x0F<<7 | 0x29, + 20200 - 19968: jis0212<<14 | 0x0F<<7 | 0x29, + 20205 - 19968: jis0208<<14 | 0x2F<<7 | 0x20, + 20206 - 19968: jis0208<<14 | 0x11<<7 | 0x1D, + 20207 - 19968: jis0212<<14 | 0x0F<<7 | 0x2A, + 20208 - 19968: jis0208<<14 | 0x15<<7 | 0x23, + 20209 - 19968: jis0212<<14 | 0x0F<<7 | 0x2B, + 20210 - 19968: jis0208<<14 | 0x22<<7 | 0x46, + 20211 - 19968: jis0212<<14 | 0x0F<<7 | 0x2C, + 20213 - 19968: jis0212<<14 | 0x0F<<7 | 0x2D, + 20214 - 19968: jis0208<<14 | 0x16<<7 | 0x4E, + 20215 - 19968: jis0208<<14 | 0x2F<<7 | 0x22, + 20219 - 19968: jis0208<<14 | 0x26<<7 | 0x03, + 20220 - 19968: jis0208<<14 | 0x58<<7 | 0x0E, + 20221 - 19968: jis0212<<14 | 0x0F<<7 | 0x2E, + 20222 - 19968: jis0212<<14 | 0x0F<<7 | 0x2F, + 20223 - 19968: jis0212<<14 | 0x0F<<7 | 0x30, + 20224 - 19968: jis0208<<14 | 0x58<<7 | 0x0F, + 20225 - 19968: jis0208<<14 | 0x13<<7 | 0x4A, + 20226 - 19968: jis0212<<14 | 0x0F<<7 | 0x32, + 20227 - 19968: jis0208<<14 | 0x58<<7 | 0x10, + 20232 - 19968: jis0212<<14 | 0x0F<<7 | 0x34, + 20233 - 19968: jis0208<<14 | 0x2F<<7 | 0x23, + 20234 - 19968: jis0208<<14 | 0x0F<<7 | 0x2A, + 20235 - 19968: jis0212<<14 | 0x0F<<7 | 0x35, + 20236 - 19968: jis0212<<14 | 0x0F<<7 | 0x36, + 20237 - 19968: jis0208<<14 | 0x17<<7 | 0x3F, + 20238 - 19968: jis0208<<14 | 0x13<<7 | 0x4B, + 20239 - 19968: jis0208<<14 | 0x28<<7 | 0x59, + 20240 - 19968: jis0208<<14 | 0x27<<7 | 0x11, + 20241 - 19968: jis0208<<14 | 0x14<<7 | 0x38, + 20242 - 19968: jis0212<<14 | 0x0F<<7 | 0x37, + 20245 - 19968: jis0212<<14 | 0x0F<<7 | 0x38, + 20246 - 19968: jis0212<<14 | 0x0F<<7 | 0x39, + 20247 - 19968: jis0212<<14 | 0x0F<<7 | 0x3A, + 20249 - 19968: jis0212<<14 | 0x0F<<7 | 0x3B, + 20250 - 19968: jis0208<<14 | 0x11<<7 | 0x50, + 20252 - 19968: jis0208<<14 | 0x2F<<7 | 0x46, + 20253 - 19968: jis0208<<14 | 0x24<<7 | 0x20, + 20270 - 19968: jis0212<<14 | 0x0F<<7 | 0x3C, + 20271 - 19968: jis0208<<14 | 0x26<<7 | 0x4B, + 20272 - 19968: jis0208<<14 | 0x2F<<7 | 0x25, + 20273 - 19968: jis0212<<14 | 0x0F<<7 | 0x3D, + 20275 - 19968: jis0212<<14 | 0x0F<<7 | 0x3F, + 20276 - 19968: jis0208<<14 | 0x27<<7 | 0x1B, + 20277 - 19968: jis0212<<14 | 0x0F<<7 | 0x40, + 20278 - 19968: jis0208<<14 | 0x2D<<7 | 0x41, + 20279 - 19968: jis0212<<14 | 0x0F<<7 | 0x41, + 20280 - 19968: jis0208<<14 | 0x1E<<7 | 0x0C, + 20281 - 19968: jis0208<<14 | 0x58<<7 | 0x11, + 20282 - 19968: jis0208<<14 | 0x1A<<7 | 0x26, + 20283 - 19968: jis0212<<14 | 0x0F<<7 | 0x43, + 20284 - 19968: jis0208<<14 | 0x1A<<7 | 0x56, + 20285 - 19968: jis0208<<14 | 0x11<<7 | 0x1F, + 20286 - 19968: jis0212<<14 | 0x0F<<7 | 0x44, + 20288 - 19968: jis0212<<14 | 0x0F<<7 | 0x45, + 20290 - 19968: jis0212<<14 | 0x0F<<7 | 0x46, + 20291 - 19968: jis0208<<14 | 0x23<<7 | 0x30, + 20294 - 19968: jis0208<<14 | 0x22<<7 | 0x01, + 20295 - 19968: jis0208<<14 | 0x2F<<7 | 0x29, + 20296 - 19968: jis0212<<14 | 0x0F<<7 | 0x47, + 20297 - 19968: jis0212<<14 | 0x0F<<7 | 0x48, + 20299 - 19968: jis0212<<14 | 0x0F<<7 | 0x49, + 20300 - 19968: jis0212<<14 | 0x0F<<7 | 0x4A, + 20301 - 19968: jis0208<<14 | 0x0F<<7 | 0x2B, + 20302 - 19968: jis0208<<14 | 0x23<<7 | 0x42, + 20303 - 19968: jis0208<<14 | 0x1C<<7 | 0x1A, + 20304 - 19968: jis0208<<14 | 0x19<<7 | 0x13, + 20305 - 19968: jis0208<<14 | 0x2C<<7 | 0x03, + 20306 - 19968: jis0212<<14 | 0x0F<<7 | 0x4B, + 20307 - 19968: jis0208<<14 | 0x21<<7 | 0x2D, + 20308 - 19968: jis0212<<14 | 0x0F<<7 | 0x4C, + 20309 - 19968: jis0208<<14 | 0x11<<7 | 0x1E, + 20310 - 19968: jis0208<<14 | 0x58<<7 | 0x12, + 20311 - 19968: jis0208<<14 | 0x2F<<7 | 0x28, + 20312 - 19968: jis0212<<14 | 0x0F<<7 | 0x4E, + 20313 - 19968: jis0208<<14 | 0x2C<<7 | 0x1D, + 20314 - 19968: jis0208<<14 | 0x2F<<7 | 0x24, + 20315 - 19968: jis0208<<14 | 0x2F<<7 | 0x26, + 20316 - 19968: jis0208<<14 | 0x19<<7 | 0x4D, + 20317 - 19968: jis0208<<14 | 0x2F<<7 | 0x27, + 20318 - 19968: jis0208<<14 | 0x34<<7 | 0x03, + 20319 - 19968: jis0212<<14 | 0x0F<<7 | 0x4F, + 20320 - 19968: jis0212<<14 | 0x0F<<7 | 0x3E, + 20323 - 19968: jis0212<<14 | 0x0F<<7 | 0x50, + 20329 - 19968: jis0208<<14 | 0x2F<<7 | 0x2F, + 20330 - 19968: jis0212<<14 | 0x0F<<7 | 0x51, + 20332 - 19968: jis0212<<14 | 0x0F<<7 | 0x52, + 20334 - 19968: jis0212<<14 | 0x0F<<7 | 0x53, + 20335 - 19968: jis0208<<14 | 0x2F<<7 | 0x32, + 20336 - 19968: jis0208<<14 | 0x2F<<7 | 0x30, + 20337 - 19968: jis0212<<14 | 0x0F<<7 | 0x54, + 20339 - 19968: jis0208<<14 | 0x11<<7 | 0x21, + 20341 - 19968: jis0208<<14 | 0x29<<7 | 0x1A, + 20342 - 19968: jis0208<<14 | 0x2F<<7 | 0x2A, + 20343 - 19968: jis0212<<14 | 0x0F<<7 | 0x55, + 20344 - 19968: jis0212<<14 | 0x0F<<7 | 0x56, + 20345 - 19968: jis0212<<14 | 0x0F<<7 | 0x57, + 20346 - 19968: jis0212<<14 | 0x0F<<7 | 0x58, + 20347 - 19968: jis0208<<14 | 0x2F<<7 | 0x2E, + 20348 - 19968: jis0208<<14 | 0x17<<7 | 0x52, + 20349 - 19968: jis0212<<14 | 0x0F<<7 | 0x59, + 20350 - 19968: jis0212<<14 | 0x0F<<7 | 0x5A, + 20351 - 19968: jis0208<<14 | 0x1A<<7 | 0x27, + 20353 - 19968: jis0212<<14 | 0x0F<<7 | 0x5B, + 20354 - 19968: jis0212<<14 | 0x0F<<7 | 0x5C, + 20355 - 19968: jis0208<<14 | 0x13<<7 | 0x05, + 20356 - 19968: jis0212<<14 | 0x0F<<7 | 0x5D, + 20357 - 19968: jis0212<<14 | 0x10<<7 | 0x00, + 20358 - 19968: jis0208<<14 | 0x2F<<7 | 0x33, + 20360 - 19968: jis0208<<14 | 0x2F<<7 | 0x2B, + 20361 - 19968: jis0212<<14 | 0x10<<7 | 0x01, + 20362 - 19968: jis0208<<14 | 0x58<<7 | 0x14, + 20363 - 19968: jis0208<<14 | 0x2D<<7 | 0x42, + 20364 - 19968: jis0212<<14 | 0x10<<7 | 0x03, + 20365 - 19968: jis0208<<14 | 0x1A<<7 | 0x57, + 20366 - 19968: jis0212<<14 | 0x10<<7 | 0x04, + 20367 - 19968: jis0208<<14 | 0x2F<<7 | 0x2C, + 20368 - 19968: jis0212<<14 | 0x10<<7 | 0x05, + 20369 - 19968: jis0208<<14 | 0x2F<<7 | 0x31, + 20370 - 19968: jis0208<<14 | 0x58<<7 | 0x13, + 20371 - 19968: jis0212<<14 | 0x10<<7 | 0x07, + 20372 - 19968: jis0208<<14 | 0x58<<7 | 0x16, + 20374 - 19968: jis0208<<14 | 0x2F<<7 | 0x34, + 20375 - 19968: jis0212<<14 | 0x10<<7 | 0x09, + 20376 - 19968: jis0208<<14 | 0x2F<<7 | 0x2D, + 20377 - 19968: jis0212<<14 | 0x10<<7 | 0x0A, + 20378 - 19968: jis0208<<14 | 0x58<<7 | 0x15, + 20379 - 19968: jis0208<<14 | 0x15<<7 | 0x00, + 20381 - 19968: jis0208<<14 | 0x0F<<7 | 0x2C, + 20382 - 19968: jis0212<<14 | 0x10<<7 | 0x0C, + 20383 - 19968: jis0212<<14 | 0x10<<7 | 0x0D, + 20384 - 19968: jis0208<<14 | 0x15<<7 | 0x01, + 20385 - 19968: jis0208<<14 | 0x11<<7 | 0x20, + 20395 - 19968: jis0208<<14 | 0x34<<7 | 0x04, + 20397 - 19968: jis0208<<14 | 0x2A<<7 | 0x58, + 20398 - 19968: jis0208<<14 | 0x28<<7 | 0x4D, + 20399 - 19968: jis0208<<14 | 0x17<<7 | 0x53, + 20402 - 19968: jis0212<<14 | 0x10<<7 | 0x0E, + 20405 - 19968: jis0208<<14 | 0x1E<<7 | 0x0E, + 20406 - 19968: jis0208<<14 | 0x2D<<7 | 0x16, + 20407 - 19968: jis0212<<14 | 0x10<<7 | 0x0F, + 20409 - 19968: jis0212<<14 | 0x10<<7 | 0x10, + 20411 - 19968: jis0212<<14 | 0x10<<7 | 0x11, + 20412 - 19968: jis0212<<14 | 0x10<<7 | 0x12, + 20413 - 19968: jis0212<<14 | 0x10<<7 | 0x13, + 20414 - 19968: jis0212<<14 | 0x10<<7 | 0x14, + 20415 - 19968: jis0208<<14 | 0x29<<7 | 0x37, + 20416 - 19968: jis0212<<14 | 0x10<<7 | 0x15, + 20417 - 19968: jis0212<<14 | 0x10<<7 | 0x16, + 20418 - 19968: jis0208<<14 | 0x16<<7 | 0x17, + 20419 - 19968: jis0208<<14 | 0x21<<7 | 0x04, + 20420 - 19968: jis0208<<14 | 0x11<<7 | 0x43, + 20421 - 19968: jis0212<<14 | 0x10<<7 | 0x17, + 20422 - 19968: jis0212<<14 | 0x10<<7 | 0x18, + 20424 - 19968: jis0212<<14 | 0x10<<7 | 0x19, + 20425 - 19968: jis0208<<14 | 0x58<<7 | 0x05, + 20426 - 19968: jis0208<<14 | 0x1C<<7 | 0x32, + 20427 - 19968: jis0212<<14 | 0x10<<7 | 0x1B, + 20428 - 19968: jis0212<<14 | 0x10<<7 | 0x1C, + 20429 - 19968: jis0208<<14 | 0x58<<7 | 0x17, + 20430 - 19968: jis0208<<14 | 0x2F<<7 | 0x38, + 20431 - 19968: jis0212<<14 | 0x10<<7 | 0x1E, + 20432 - 19968: jis0208<<14 | 0x2F<<7 | 0x3D, + 20433 - 19968: jis0208<<14 | 0x2F<<7 | 0x3B, + 20434 - 19968: jis0212<<14 | 0x10<<7 | 0x1F, + 20436 - 19968: jis0208<<14 | 0x2F<<7 | 0x36, + 20439 - 19968: jis0208<<14 | 0x21<<7 | 0x0E, + 20440 - 19968: jis0208<<14 | 0x2F<<7 | 0x39, + 20442 - 19968: jis0208<<14 | 0x2F<<7 | 0x3C, + 20443 - 19968: jis0208<<14 | 0x2F<<7 | 0x3A, + 20444 - 19968: jis0212<<14 | 0x10<<7 | 0x20, + 20445 - 19968: jis0208<<14 | 0x29<<7 | 0x3C, + 20447 - 19968: jis0208<<14 | 0x2F<<7 | 0x37, + 20448 - 19968: jis0212<<14 | 0x10<<7 | 0x21, + 20449 - 19968: jis0208<<14 | 0x1E<<7 | 0x0D, + 20450 - 19968: jis0212<<14 | 0x10<<7 | 0x22, + 20451 - 19968: jis0208<<14 | 0x2A<<7 | 0x52, + 20452 - 19968: jis0208<<14 | 0x2F<<7 | 0x3E, + 20453 - 19968: jis0208<<14 | 0x2F<<7 | 0x3F, + 20462 - 19968: jis0208<<14 | 0x1C<<7 | 0x03, + 20463 - 19968: jis0208<<14 | 0x2F<<7 | 0x4C, + 20464 - 19968: jis0212<<14 | 0x10<<7 | 0x23, + 20466 - 19968: jis0212<<14 | 0x10<<7 | 0x24, + 20467 - 19968: jis0208<<14 | 0x26<<7 | 0x2F, + 20469 - 19968: jis0208<<14 | 0x28<<7 | 0x15, + 20470 - 19968: jis0208<<14 | 0x2F<<7 | 0x47, + 20472 - 19968: jis0208<<14 | 0x29<<7 | 0x4F, + 20474 - 19968: jis0208<<14 | 0x11<<7 | 0x15, + 20476 - 19968: jis0212<<14 | 0x10<<7 | 0x25, + 20477 - 19968: jis0212<<14 | 0x10<<7 | 0x26, + 20478 - 19968: jis0208<<14 | 0x2F<<7 | 0x4B, + 20479 - 19968: jis0208<<14 | 0x58<<7 | 0x1A, + 20480 - 19968: jis0212<<14 | 0x10<<7 | 0x28, + 20481 - 19968: jis0212<<14 | 0x10<<7 | 0x29, + 20484 - 19968: jis0212<<14 | 0x10<<7 | 0x2A, + 20485 - 19968: jis0208<<14 | 0x2F<<7 | 0x45, + 20486 - 19968: jis0208<<14 | 0x2F<<7 | 0x4E, + 20487 - 19968: jis0212<<14 | 0x10<<7 | 0x2B, + 20489 - 19968: jis0208<<14 | 0x20<<7 | 0x31, + 20490 - 19968: jis0212<<14 | 0x10<<7 | 0x2C, + 20491 - 19968: jis0208<<14 | 0x17<<7 | 0x23, + 20492 - 19968: jis0212<<14 | 0x10<<7 | 0x2D, + 20493 - 19968: jis0208<<14 | 0x26<<7 | 0x3B, + 20494 - 19968: jis0212<<14 | 0x10<<7 | 0x2E, + 20495 - 19968: jis0208<<14 | 0x3F<<7 | 0x26, + 20496 - 19968: jis0212<<14 | 0x10<<7 | 0x2F, + 20497 - 19968: jis0208<<14 | 0x2F<<7 | 0x4D, + 20498 - 19968: jis0208<<14 | 0x24<<7 | 0x3C, + 20499 - 19968: jis0212<<14 | 0x10<<7 | 0x30, + 20500 - 19968: jis0208<<14 | 0x2F<<7 | 0x42, + 20502 - 19968: jis0208<<14 | 0x17<<7 | 0x55, + 20503 - 19968: jis0212<<14 | 0x10<<7 | 0x31, + 20504 - 19968: jis0212<<14 | 0x10<<7 | 0x32, + 20505 - 19968: jis0208<<14 | 0x17<<7 | 0x54, + 20506 - 19968: jis0208<<14 | 0x2F<<7 | 0x40, + 20507 - 19968: jis0212<<14 | 0x10<<7 | 0x33, + 20508 - 19968: jis0212<<14 | 0x10<<7 | 0x34, + 20509 - 19968: jis0212<<14 | 0x10<<7 | 0x35, + 20510 - 19968: jis0208<<14 | 0x58<<7 | 0x1B, + 20511 - 19968: jis0208<<14 | 0x1B<<7 | 0x39, + 20513 - 19968: jis0208<<14 | 0x2F<<7 | 0x48, + 20514 - 19968: jis0208<<14 | 0x58<<7 | 0x19, + 20515 - 19968: jis0208<<14 | 0x29<<7 | 0x4E, + 20516 - 19968: jis0208<<14 | 0x22<<7 | 0x2C, + 20517 - 19968: jis0208<<14 | 0x2F<<7 | 0x44, + 20518 - 19968: jis0208<<14 | 0x16<<7 | 0x50, + 20519 - 19968: jis0212<<14 | 0x10<<7 | 0x38, + 20520 - 19968: jis0208<<14 | 0x2F<<7 | 0x41, + 20521 - 19968: jis0208<<14 | 0x2F<<7 | 0x49, + 20522 - 19968: jis0208<<14 | 0x2F<<7 | 0x43, + 20523 - 19968: jis0208<<14 | 0x2D<<7 | 0x30, + 20524 - 19968: jis0208<<14 | 0x2F<<7 | 0x4A, + 20525 - 19968: jis0208<<14 | 0x2E<<7 | 0x20, + 20526 - 19968: jis0212<<14 | 0x10<<7 | 0x39, + 20528 - 19968: jis0212<<14 | 0x10<<7 | 0x3A, + 20530 - 19968: jis0212<<14 | 0x10<<7 | 0x3B, + 20531 - 19968: jis0212<<14 | 0x10<<7 | 0x3C, + 20533 - 19968: jis0212<<14 | 0x10<<7 | 0x3D, + 20534 - 19968: jis0208<<14 | 0x15<<7 | 0x45, + 20537 - 19968: jis0208<<14 | 0x16<<7 | 0x4F, + 20539 - 19968: jis0212<<14 | 0x10<<7 | 0x55, + 20544 - 19968: jis0208<<14 | 0x58<<7 | 0x18, + 20545 - 19968: jis0212<<14 | 0x10<<7 | 0x3F, + 20546 - 19968: jis0208<<14 | 0x58<<7 | 0x1E, + 20547 - 19968: jis0208<<14 | 0x2F<<7 | 0x4F, + 20549 - 19968: jis0212<<14 | 0x10<<7 | 0x41, + 20550 - 19968: jis0208<<14 | 0x58<<7 | 0x1C, + 20551 - 19968: jis0208<<14 | 0x2F<<7 | 0x50, + 20552 - 19968: jis0208<<14 | 0x2F<<7 | 0x54, + 20553 - 19968: jis0208<<14 | 0x0F<<7 | 0x2D, + 20554 - 19968: jis0212<<14 | 0x10<<7 | 0x43, + 20556 - 19968: jis0212<<14 | 0x10<<7 | 0x44, + 20558 - 19968: jis0212<<14 | 0x10<<7 | 0x45, + 20559 - 19968: jis0208<<14 | 0x29<<7 | 0x2F, + 20560 - 19968: jis0208<<14 | 0x2F<<7 | 0x53, + 20561 - 19968: jis0212<<14 | 0x10<<7 | 0x46, + 20562 - 19968: jis0212<<14 | 0x10<<7 | 0x47, + 20563 - 19968: jis0212<<14 | 0x10<<7 | 0x48, + 20565 - 19968: jis0208<<14 | 0x2F<<7 | 0x52, + 20566 - 19968: jis0208<<14 | 0x2F<<7 | 0x56, + 20567 - 19968: jis0212<<14 | 0x10<<7 | 0x49, + 20569 - 19968: jis0212<<14 | 0x10<<7 | 0x4A, + 20570 - 19968: jis0208<<14 | 0x2F<<7 | 0x55, + 20572 - 19968: jis0208<<14 | 0x23<<7 | 0x43, + 20575 - 19968: jis0212<<14 | 0x10<<7 | 0x4B, + 20576 - 19968: jis0212<<14 | 0x10<<7 | 0x4C, + 20578 - 19968: jis0212<<14 | 0x10<<7 | 0x4D, + 20579 - 19968: jis0212<<14 | 0x10<<7 | 0x4E, + 20581 - 19968: jis0208<<14 | 0x16<<7 | 0x51, + 20582 - 19968: jis0212<<14 | 0x10<<7 | 0x4F, + 20583 - 19968: jis0212<<14 | 0x10<<7 | 0x50, + 20586 - 19968: jis0212<<14 | 0x10<<7 | 0x51, + 20588 - 19968: jis0208<<14 | 0x2F<<7 | 0x57, + 20589 - 19968: jis0212<<14 | 0x10<<7 | 0x52, + 20592 - 19968: jis0208<<14 | 0x58<<7 | 0x1D, + 20593 - 19968: jis0212<<14 | 0x10<<7 | 0x54, + 20594 - 19968: jis0208<<14 | 0x1B<<7 | 0x24, + 20596 - 19968: jis0208<<14 | 0x21<<7 | 0x05, + 20597 - 19968: jis0208<<14 | 0x23<<7 | 0x44, + 20598 - 19968: jis0208<<14 | 0x15<<7 | 0x55, + 20600 - 19968: jis0208<<14 | 0x2F<<7 | 0x58, + 20605 - 19968: jis0208<<14 | 0x14<<7 | 0x15, + 20608 - 19968: jis0208<<14 | 0x2F<<7 | 0x59, + 20609 - 19968: jis0212<<14 | 0x10<<7 | 0x56, + 20611 - 19968: jis0212<<14 | 0x10<<7 | 0x57, + 20612 - 19968: jis0212<<14 | 0x10<<7 | 0x58, + 20613 - 19968: jis0208<<14 | 0x2F<<7 | 0x5B, + 20614 - 19968: jis0212<<14 | 0x10<<7 | 0x59, + 20618 - 19968: jis0212<<14 | 0x10<<7 | 0x5A, + 20621 - 19968: jis0208<<14 | 0x2A<<7 | 0x14, + 20622 - 19968: jis0212<<14 | 0x10<<7 | 0x5B, + 20623 - 19968: jis0212<<14 | 0x10<<7 | 0x5C, + 20624 - 19968: jis0212<<14 | 0x10<<7 | 0x5D, + 20625 - 19968: jis0208<<14 | 0x16<<7 | 0x45, + 20626 - 19968: jis0212<<14 | 0x11<<7 | 0x00, + 20627 - 19968: jis0212<<14 | 0x11<<7 | 0x01, + 20628 - 19968: jis0208<<14 | 0x58<<7 | 0x1F, + 20630 - 19968: jis0212<<14 | 0x11<<7 | 0x03, + 20632 - 19968: jis0208<<14 | 0x1A<<7 | 0x10, + 20633 - 19968: jis0208<<14 | 0x27<<7 | 0x56, + 20634 - 19968: jis0208<<14 | 0x2F<<7 | 0x5A, + 20635 - 19968: jis0212<<14 | 0x11<<7 | 0x04, + 20636 - 19968: jis0212<<14 | 0x11<<7 | 0x05, + 20638 - 19968: jis0212<<14 | 0x11<<7 | 0x06, + 20639 - 19968: jis0212<<14 | 0x11<<7 | 0x07, + 20640 - 19968: jis0212<<14 | 0x11<<7 | 0x08, + 20641 - 19968: jis0212<<14 | 0x11<<7 | 0x09, + 20642 - 19968: jis0212<<14 | 0x11<<7 | 0x0A, + 20650 - 19968: jis0212<<14 | 0x11<<7 | 0x0B, + 20652 - 19968: jis0208<<14 | 0x19<<7 | 0x24, + 20653 - 19968: jis0208<<14 | 0x2C<<7 | 0x22, + 20655 - 19968: jis0212<<14 | 0x11<<7 | 0x0C, + 20656 - 19968: jis0212<<14 | 0x11<<7 | 0x0D, + 20658 - 19968: jis0208<<14 | 0x2F<<7 | 0x5D, + 20659 - 19968: jis0208<<14 | 0x30<<7 | 0x02, + 20660 - 19968: jis0208<<14 | 0x2F<<7 | 0x5C, + 20661 - 19968: jis0208<<14 | 0x19<<7 | 0x23, + 20663 - 19968: jis0208<<14 | 0x1C<<7 | 0x5C, + 20665 - 19968: jis0212<<14 | 0x11<<7 | 0x0E, + 20666 - 19968: jis0212<<14 | 0x11<<7 | 0x0F, + 20669 - 19968: jis0212<<14 | 0x11<<7 | 0x10, + 20670 - 19968: jis0208<<14 | 0x16<<7 | 0x18, + 20672 - 19968: jis0212<<14 | 0x11<<7 | 0x11, + 20674 - 19968: jis0208<<14 | 0x30<<7 | 0x03, + 20675 - 19968: jis0212<<14 | 0x11<<7 | 0x12, + 20676 - 19968: jis0212<<14 | 0x11<<7 | 0x13, + 20677 - 19968: jis0208<<14 | 0x15<<7 | 0x2E, + 20679 - 19968: jis0212<<14 | 0x11<<7 | 0x14, + 20681 - 19968: jis0208<<14 | 0x30<<7 | 0x00, + 20682 - 19968: jis0208<<14 | 0x30<<7 | 0x01, + 20684 - 19968: jis0212<<14 | 0x11<<7 | 0x15, + 20685 - 19968: jis0208<<14 | 0x25<<7 | 0x0E, + 20686 - 19968: jis0212<<14 | 0x11<<7 | 0x16, + 20687 - 19968: jis0208<<14 | 0x20<<7 | 0x5B, + 20688 - 19968: jis0212<<14 | 0x11<<7 | 0x17, + 20689 - 19968: jis0208<<14 | 0x15<<7 | 0x02, + 20691 - 19968: jis0212<<14 | 0x11<<7 | 0x18, + 20692 - 19968: jis0212<<14 | 0x11<<7 | 0x19, + 20693 - 19968: jis0208<<14 | 0x2A<<7 | 0x2C, + 20694 - 19968: jis0208<<14 | 0x30<<7 | 0x04, + 20696 - 19968: jis0208<<14 | 0x58<<7 | 0x21, + 20698 - 19968: jis0208<<14 | 0x2D<<7 | 0x1C, + 20700 - 19968: jis0212<<14 | 0x11<<7 | 0x1B, + 20701 - 19968: jis0212<<14 | 0x11<<7 | 0x1C, + 20702 - 19968: jis0208<<14 | 0x30<<7 | 0x05, + 20703 - 19968: jis0212<<14 | 0x11<<7 | 0x1D, + 20706 - 19968: jis0212<<14 | 0x11<<7 | 0x1E, + 20707 - 19968: jis0208<<14 | 0x30<<7 | 0x08, + 20708 - 19968: jis0212<<14 | 0x11<<7 | 0x1F, + 20709 - 19968: jis0208<<14 | 0x30<<7 | 0x06, + 20710 - 19968: jis0212<<14 | 0x11<<7 | 0x20, + 20711 - 19968: jis0208<<14 | 0x20<<7 | 0x2D, + 20712 - 19968: jis0212<<14 | 0x11<<7 | 0x21, + 20713 - 19968: jis0212<<14 | 0x11<<7 | 0x22, + 20717 - 19968: jis0208<<14 | 0x30<<7 | 0x07, + 20718 - 19968: jis0208<<14 | 0x30<<7 | 0x09, + 20719 - 19968: jis0212<<14 | 0x11<<7 | 0x23, + 20721 - 19968: jis0212<<14 | 0x11<<7 | 0x24, + 20722 - 19968: jis0212<<14 | 0x11<<7 | 0x30, + 20724 - 19968: jis0208<<14 | 0x58<<7 | 0x20, + 20725 - 19968: jis0208<<14 | 0x30<<7 | 0x0B, + 20726 - 19968: jis0212<<14 | 0x11<<7 | 0x25, + 20729 - 19968: jis0208<<14 | 0x30<<7 | 0x0A, + 20730 - 19968: jis0212<<14 | 0x11<<7 | 0x26, + 20731 - 19968: jis0208<<14 | 0x29<<7 | 0x27, + 20734 - 19968: jis0212<<14 | 0x11<<7 | 0x27, + 20736 - 19968: jis0208<<14 | 0x14<<7 | 0x16, + 20737 - 19968: jis0208<<14 | 0x30<<7 | 0x0D, + 20738 - 19968: jis0208<<14 | 0x30<<7 | 0x0E, + 20739 - 19968: jis0212<<14 | 0x11<<7 | 0x28, + 20740 - 19968: jis0208<<14 | 0x11<<7 | 0x0E, + 20742 - 19968: jis0212<<14 | 0x11<<7 | 0x29, + 20743 - 19968: jis0212<<14 | 0x11<<7 | 0x2A, + 20744 - 19968: jis0212<<14 | 0x11<<7 | 0x2B, + 20745 - 19968: jis0208<<14 | 0x30<<7 | 0x0C, + 20747 - 19968: jis0212<<14 | 0x11<<7 | 0x2C, + 20748 - 19968: jis0212<<14 | 0x11<<7 | 0x2D, + 20749 - 19968: jis0212<<14 | 0x11<<7 | 0x2E, + 20750 - 19968: jis0212<<14 | 0x11<<7 | 0x2F, + 20752 - 19968: jis0212<<14 | 0x11<<7 | 0x31, + 20754 - 19968: jis0208<<14 | 0x1B<<7 | 0x53, + 20756 - 19968: jis0208<<14 | 0x30<<7 | 0x11, + 20757 - 19968: jis0208<<14 | 0x30<<7 | 0x10, + 20758 - 19968: jis0208<<14 | 0x30<<7 | 0x0F, + 20759 - 19968: jis0212<<14 | 0x11<<7 | 0x32, + 20760 - 19968: jis0208<<14 | 0x2F<<7 | 0x35, + 20761 - 19968: jis0212<<14 | 0x11<<7 | 0x33, + 20762 - 19968: jis0208<<14 | 0x30<<7 | 0x12, + 20763 - 19968: jis0212<<14 | 0x11<<7 | 0x34, + 20764 - 19968: jis0212<<14 | 0x11<<7 | 0x35, + 20765 - 19968: jis0212<<14 | 0x11<<7 | 0x36, + 20766 - 19968: jis0212<<14 | 0x11<<7 | 0x37, + 20767 - 19968: jis0208<<14 | 0x1C<<7 | 0x5D, + 20769 - 19968: jis0208<<14 | 0x30<<7 | 0x13, + 20771 - 19968: jis0212<<14 | 0x11<<7 | 0x38, + 20775 - 19968: jis0212<<14 | 0x11<<7 | 0x39, + 20776 - 19968: jis0212<<14 | 0x11<<7 | 0x3A, + 20778 - 19968: jis0208<<14 | 0x2C<<7 | 0x04, + 20780 - 19968: jis0212<<14 | 0x11<<7 | 0x3B, + 20781 - 19968: jis0212<<14 | 0x11<<7 | 0x3C, + 20783 - 19968: jis0212<<14 | 0x11<<7 | 0x3D, + 20785 - 19968: jis0212<<14 | 0x11<<7 | 0x3E, + 20786 - 19968: jis0208<<14 | 0x2B<<7 | 0x38, + 20787 - 19968: jis0212<<14 | 0x11<<7 | 0x3F, + 20788 - 19968: jis0212<<14 | 0x11<<7 | 0x40, + 20789 - 19968: jis0212<<14 | 0x11<<7 | 0x41, + 20791 - 19968: jis0208<<14 | 0x30<<7 | 0x15, + 20792 - 19968: jis0212<<14 | 0x11<<7 | 0x42, + 20793 - 19968: jis0212<<14 | 0x11<<7 | 0x43, + 20794 - 19968: jis0208<<14 | 0x30<<7 | 0x14, + 20795 - 19968: jis0208<<14 | 0x30<<7 | 0x17, + 20796 - 19968: jis0208<<14 | 0x30<<7 | 0x16, + 20799 - 19968: jis0208<<14 | 0x30<<7 | 0x18, + 20800 - 19968: jis0208<<14 | 0x30<<7 | 0x19, + 20801 - 19968: jis0208<<14 | 0x0F<<7 | 0x53, + 20802 - 19968: jis0212<<14 | 0x11<<7 | 0x44, + 20803 - 19968: jis0208<<14 | 0x17<<7 | 0x14, + 20804 - 19968: jis0208<<14 | 0x16<<7 | 0x1A, + 20805 - 19968: jis0208<<14 | 0x1C<<7 | 0x1B, + 20806 - 19968: jis0208<<14 | 0x22<<7 | 0x5A, + 20807 - 19968: jis0208<<14 | 0x15<<7 | 0x03, + 20808 - 19968: jis0208<<14 | 0x1F<<7 | 0x47, + 20809 - 19968: jis0208<<14 | 0x17<<7 | 0x56, + 20810 - 19968: jis0208<<14 | 0x58<<7 | 0x22, + 20811 - 19968: jis0208<<14 | 0x18<<7 | 0x4D, + 20812 - 19968: jis0208<<14 | 0x30<<7 | 0x1B, + 20813 - 19968: jis0208<<14 | 0x2B<<7 | 0x27, + 20814 - 19968: jis0208<<14 | 0x24<<7 | 0x25, + 20815 - 19968: jis0212<<14 | 0x11<<7 | 0x46, + 20816 - 19968: jis0208<<14 | 0x1A<<7 | 0x58, + 20818 - 19968: jis0208<<14 | 0x30<<7 | 0x1A, + 20819 - 19968: jis0212<<14 | 0x11<<7 | 0x47, + 20820 - 19968: jis0208<<14 | 0x30<<7 | 0x1C, + 20821 - 19968: jis0212<<14 | 0x11<<7 | 0x48, + 20823 - 19968: jis0212<<14 | 0x11<<7 | 0x49, + 20824 - 19968: jis0212<<14 | 0x11<<7 | 0x4A, + 20826 - 19968: jis0208<<14 | 0x24<<7 | 0x3D, + 20828 - 19968: jis0208<<14 | 0x12<<7 | 0x54, + 20831 - 19968: jis0212<<14 | 0x11<<7 | 0x4B, + 20834 - 19968: jis0208<<14 | 0x30<<7 | 0x1D, + 20836 - 19968: jis0208<<14 | 0x58<<7 | 0x23, + 20837 - 19968: jis0208<<14 | 0x25<<7 | 0x5D, + 20838 - 19968: jis0212<<14 | 0x11<<7 | 0x4D, + 20840 - 19968: jis0208<<14 | 0x20<<7 | 0x13, + 20841 - 19968: jis0208<<14 | 0x30<<7 | 0x1F, + 20842 - 19968: jis0208<<14 | 0x30<<7 | 0x20, + 20843 - 19968: jis0208<<14 | 0x27<<7 | 0x0B, + 20844 - 19968: jis0208<<14 | 0x17<<7 | 0x57, + 20845 - 19968: jis0208<<14 | 0x2E<<7 | 0x1A, + 20846 - 19968: jis0208<<14 | 0x30<<7 | 0x21, + 20849 - 19968: jis0208<<14 | 0x15<<7 | 0x05, + 20853 - 19968: jis0208<<14 | 0x29<<7 | 0x1B, + 20854 - 19968: jis0208<<14 | 0x21<<7 | 0x15, + 20855 - 19968: jis0208<<14 | 0x15<<7 | 0x50, + 20856 - 19968: jis0208<<14 | 0x24<<7 | 0x14, + 20860 - 19968: jis0208<<14 | 0x16<<7 | 0x52, + 20862 - 19968: jis0212<<14 | 0x11<<7 | 0x4E, + 20864 - 19968: jis0208<<14 | 0x30<<7 | 0x22, + 20866 - 19968: jis0208<<14 | 0x30<<7 | 0x23, + 20867 - 19968: jis0212<<14 | 0x11<<7 | 0x4F, + 20868 - 19968: jis0212<<14 | 0x11<<7 | 0x50, + 20869 - 19968: jis0208<<14 | 0x25<<7 | 0x41, + 20870 - 19968: jis0208<<14 | 0x10<<7 | 0x3E, + 20873 - 19968: jis0208<<14 | 0x30<<7 | 0x26, + 20874 - 19968: jis0208<<14 | 0x19<<7 | 0x5C, + 20875 - 19968: jis0212<<14 | 0x11<<7 | 0x51, + 20876 - 19968: jis0208<<14 | 0x30<<7 | 0x25, + 20877 - 19968: jis0208<<14 | 0x19<<7 | 0x25, + 20878 - 19968: jis0212<<14 | 0x11<<7 | 0x52, + 20879 - 19968: jis0208<<14 | 0x30<<7 | 0x27, + 20880 - 19968: jis0208<<14 | 0x45<<7 | 0x4D, + 20881 - 19968: jis0208<<14 | 0x30<<7 | 0x28, + 20882 - 19968: jis0208<<14 | 0x2A<<7 | 0x20, + 20883 - 19968: jis0208<<14 | 0x30<<7 | 0x29, + 20885 - 19968: jis0208<<14 | 0x30<<7 | 0x2A, + 20886 - 19968: jis0208<<14 | 0x30<<7 | 0x2B, + 20887 - 19968: jis0208<<14 | 0x1D<<7 | 0x48, + 20888 - 19968: jis0212<<14 | 0x11<<7 | 0x53, + 20889 - 19968: jis0208<<14 | 0x1B<<7 | 0x2B, + 20893 - 19968: jis0208<<14 | 0x58<<7 | 0x24, + 20896 - 19968: jis0208<<14 | 0x13<<7 | 0x06, + 20897 - 19968: jis0212<<14 | 0x11<<7 | 0x55, + 20898 - 19968: jis0208<<14 | 0x30<<7 | 0x2E, + 20899 - 19968: jis0212<<14 | 0x11<<7 | 0x56, + 20900 - 19968: jis0208<<14 | 0x30<<7 | 0x2C, + 20901 - 19968: jis0208<<14 | 0x2B<<7 | 0x1C, + 20902 - 19968: jis0208<<14 | 0x30<<7 | 0x2D, + 20904 - 19968: jis0208<<14 | 0x28<<7 | 0x39, + 20905 - 19968: jis0208<<14 | 0x30<<7 | 0x2F, + 20906 - 19968: jis0208<<14 | 0x30<<7 | 0x30, + 20907 - 19968: jis0208<<14 | 0x30<<7 | 0x31, + 20908 - 19968: jis0208<<14 | 0x24<<7 | 0x3E, + 20909 - 19968: jis0212<<14 | 0x11<<7 | 0x57, + 20912 - 19968: jis0208<<14 | 0x30<<7 | 0x35, + 20913 - 19968: jis0208<<14 | 0x30<<7 | 0x33, + 20914 - 19968: jis0208<<14 | 0x30<<7 | 0x34, + 20915 - 19968: jis0208<<14 | 0x30<<7 | 0x32, + 20916 - 19968: jis0208<<14 | 0x19<<7 | 0x42, + 20917 - 19968: jis0208<<14 | 0x30<<7 | 0x36, + 20918 - 19968: jis0208<<14 | 0x2B<<7 | 0x49, + 20919 - 19968: jis0208<<14 | 0x2D<<7 | 0x43, + 20920 - 19968: jis0212<<14 | 0x11<<7 | 0x58, + 20922 - 19968: jis0212<<14 | 0x11<<7 | 0x59, + 20924 - 19968: jis0212<<14 | 0x11<<7 | 0x5A, + 20925 - 19968: jis0208<<14 | 0x30<<7 | 0x37, + 20926 - 19968: jis0208<<14 | 0x58<<7 | 0x25, + 20927 - 19968: jis0212<<14 | 0x11<<7 | 0x5C, + 20930 - 19968: jis0212<<14 | 0x11<<7 | 0x5D, + 20932 - 19968: jis0208<<14 | 0x1F<<7 | 0x07, + 20933 - 19968: jis0208<<14 | 0x30<<7 | 0x38, + 20934 - 19968: jis0208<<14 | 0x1C<<7 | 0x39, + 20936 - 19968: jis0212<<14 | 0x12<<7 | 0x00, + 20937 - 19968: jis0208<<14 | 0x30<<7 | 0x39, + 20939 - 19968: jis0208<<14 | 0x22<<7 | 0x5B, + 20940 - 19968: jis0208<<14 | 0x2D<<7 | 0x1E, + 20941 - 19968: jis0208<<14 | 0x24<<7 | 0x3F, + 20943 - 19968: jis0212<<14 | 0x12<<7 | 0x01, + 20945 - 19968: jis0212<<14 | 0x12<<7 | 0x02, + 20946 - 19968: jis0212<<14 | 0x12<<7 | 0x03, + 20947 - 19968: jis0212<<14 | 0x12<<7 | 0x04, + 20949 - 19968: jis0212<<14 | 0x12<<7 | 0x05, + 20950 - 19968: jis0208<<14 | 0x31<<7 | 0x24, + 20952 - 19968: jis0212<<14 | 0x12<<7 | 0x06, + 20955 - 19968: jis0208<<14 | 0x30<<7 | 0x3A, + 20956 - 19968: jis0208<<14 | 0x53<<7 | 0x04, + 20957 - 19968: jis0208<<14 | 0x15<<7 | 0x24, + 20958 - 19968: jis0212<<14 | 0x12<<7 | 0x07, + 20960 - 19968: jis0208<<14 | 0x30<<7 | 0x3B, + 20961 - 19968: jis0208<<14 | 0x2A<<7 | 0x3D, + 20962 - 19968: jis0212<<14 | 0x12<<7 | 0x08, + 20965 - 19968: jis0212<<14 | 0x12<<7 | 0x09, + 20966 - 19968: jis0208<<14 | 0x1C<<7 | 0x47, + 20967 - 19968: jis0208<<14 | 0x21<<7 | 0x5B, + 20969 - 19968: jis0208<<14 | 0x30<<7 | 0x3D, + 20970 - 19968: jis0208<<14 | 0x25<<7 | 0x43, + 20972 - 19968: jis0208<<14 | 0x58<<7 | 0x26, + 20973 - 19968: jis0208<<14 | 0x30<<7 | 0x3E, + 20974 - 19968: jis0212<<14 | 0x12<<7 | 0x0A, + 20976 - 19968: jis0208<<14 | 0x30<<7 | 0x3F, + 20977 - 19968: jis0208<<14 | 0x12<<7 | 0x0D, + 20978 - 19968: jis0212<<14 | 0x12<<7 | 0x0B, + 20979 - 19968: jis0212<<14 | 0x12<<7 | 0x0C, + 20980 - 19968: jis0212<<14 | 0x12<<7 | 0x0D, + 20981 - 19968: jis0208<<14 | 0x30<<7 | 0x40, + 20982 - 19968: jis0208<<14 | 0x15<<7 | 0x06, + 20983 - 19968: jis0212<<14 | 0x12<<7 | 0x0E, + 20984 - 19968: jis0208<<14 | 0x25<<7 | 0x2B, + 20985 - 19968: jis0208<<14 | 0x10<<7 | 0x59, + 20986 - 19968: jis0208<<14 | 0x1C<<7 | 0x2F, + 20989 - 19968: jis0208<<14 | 0x27<<7 | 0x00, + 20990 - 19968: jis0208<<14 | 0x30<<7 | 0x41, + 20992 - 19968: jis0208<<14 | 0x24<<7 | 0x40, + 20993 - 19968: jis0212<<14 | 0x12<<7 | 0x0F, + 20994 - 19968: jis0212<<14 | 0x12<<7 | 0x10, + 20995 - 19968: jis0208<<14 | 0x1E<<7 | 0x2E, + 20996 - 19968: jis0208<<14 | 0x30<<7 | 0x42, + 20997 - 19968: jis0212<<14 | 0x12<<7 | 0x11, + 20998 - 19968: jis0208<<14 | 0x29<<7 | 0x0B, + 20999 - 19968: jis0208<<14 | 0x1F<<7 | 0x39, + 21000 - 19968: jis0208<<14 | 0x13<<7 | 0x01, + 21002 - 19968: jis0208<<14 | 0x13<<7 | 0x08, + 21003 - 19968: jis0208<<14 | 0x30<<7 | 0x43, + 21006 - 19968: jis0208<<14 | 0x30<<7 | 0x45, + 21009 - 19968: jis0208<<14 | 0x16<<7 | 0x19, + 21010 - 19968: jis0212<<14 | 0x12<<7 | 0x12, + 21011 - 19968: jis0212<<14 | 0x12<<7 | 0x13, + 21012 - 19968: jis0208<<14 | 0x30<<7 | 0x44, + 21013 - 19968: jis0208<<14 | 0x58<<7 | 0x27, + 21014 - 19968: jis0212<<14 | 0x12<<7 | 0x15, + 21015 - 19968: jis0208<<14 | 0x2D<<7 | 0x52, + 21016 - 19968: jis0212<<14 | 0x12<<7 | 0x16, + 21021 - 19968: jis0208<<14 | 0x1C<<7 | 0x48, + 21026 - 19968: jis0212<<14 | 0x12<<7 | 0x17, + 21028 - 19968: jis0208<<14 | 0x27<<7 | 0x1C, + 21029 - 19968: jis0208<<14 | 0x29<<7 | 0x2B, + 21031 - 19968: jis0208<<14 | 0x30<<7 | 0x46, + 21032 - 19968: jis0212<<14 | 0x12<<7 | 0x18, + 21033 - 19968: jis0208<<14 | 0x2C<<7 | 0x57, + 21034 - 19968: jis0208<<14 | 0x30<<7 | 0x47, + 21038 - 19968: jis0208<<14 | 0x30<<7 | 0x48, + 21040 - 19968: jis0208<<14 | 0x24<<7 | 0x5D, + 21041 - 19968: jis0212<<14 | 0x12<<7 | 0x19, + 21042 - 19968: jis0212<<14 | 0x12<<7 | 0x1A, + 21043 - 19968: jis0208<<14 | 0x30<<7 | 0x49, + 21045 - 19968: jis0212<<14 | 0x12<<7 | 0x1B, + 21046 - 19968: jis0208<<14 | 0x1F<<7 | 0x08, + 21047 - 19968: jis0208<<14 | 0x19<<7 | 0x5D, + 21048 - 19968: jis0208<<14 | 0x16<<7 | 0x53, + 21049 - 19968: jis0208<<14 | 0x30<<7 | 0x4A, + 21050 - 19968: jis0208<<14 | 0x1A<<7 | 0x28, + 21051 - 19968: jis0208<<14 | 0x18<<7 | 0x4E, + 21052 - 19968: jis0212<<14 | 0x12<<7 | 0x1C, + 21059 - 19968: jis0208<<14 | 0x23<<7 | 0x45, + 21060 - 19968: jis0208<<14 | 0x30<<7 | 0x4C, + 21061 - 19968: jis0212<<14 | 0x12<<7 | 0x1D, + 21063 - 19968: jis0208<<14 | 0x21<<7 | 0x06, + 21065 - 19968: jis0212<<14 | 0x12<<7 | 0x1E, + 21066 - 19968: jis0208<<14 | 0x19<<7 | 0x4E, + 21067 - 19968: jis0208<<14 | 0x30<<7 | 0x4D, + 21068 - 19968: jis0208<<14 | 0x30<<7 | 0x4E, + 21069 - 19968: jis0208<<14 | 0x20<<7 | 0x0F, + 21071 - 19968: jis0208<<14 | 0x30<<7 | 0x4B, + 21076 - 19968: jis0208<<14 | 0x30<<7 | 0x50, + 21077 - 19968: jis0212<<14 | 0x12<<7 | 0x1F, + 21078 - 19968: jis0208<<14 | 0x2A<<7 | 0x15, + 21079 - 19968: jis0212<<14 | 0x12<<7 | 0x20, + 21080 - 19968: jis0212<<14 | 0x12<<7 | 0x21, + 21082 - 19968: jis0212<<14 | 0x12<<7 | 0x22, + 21083 - 19968: jis0208<<14 | 0x18<<7 | 0x43, + 21084 - 19968: jis0212<<14 | 0x12<<7 | 0x23, + 21086 - 19968: jis0208<<14 | 0x30<<7 | 0x4F, + 21087 - 19968: jis0212<<14 | 0x12<<7 | 0x24, + 21088 - 19968: jis0212<<14 | 0x12<<7 | 0x25, + 21089 - 19968: jis0212<<14 | 0x12<<7 | 0x26, + 21091 - 19968: jis0208<<14 | 0x16<<7 | 0x54, + 21092 - 19968: jis0208<<14 | 0x19<<7 | 0x3D, + 21093 - 19968: jis0208<<14 | 0x26<<7 | 0x4C, + 21094 - 19968: jis0212<<14 | 0x12<<7 | 0x27, + 21097 - 19968: jis0208<<14 | 0x30<<7 | 0x53, + 21098 - 19968: jis0208<<14 | 0x30<<7 | 0x51, + 21102 - 19968: jis0212<<14 | 0x12<<7 | 0x28, + 21103 - 19968: jis0208<<14 | 0x28<<7 | 0x5A, + 21104 - 19968: jis0208<<14 | 0x1D<<7 | 0x49, + 21105 - 19968: jis0208<<14 | 0x30<<7 | 0x5A, + 21106 - 19968: jis0208<<14 | 0x12<<7 | 0x43, + 21107 - 19968: jis0208<<14 | 0x30<<7 | 0x54, + 21108 - 19968: jis0208<<14 | 0x30<<7 | 0x52, + 21109 - 19968: jis0208<<14 | 0x20<<7 | 0x2E, + 21111 - 19968: jis0212<<14 | 0x12<<7 | 0x29, + 21112 - 19968: jis0212<<14 | 0x12<<7 | 0x2A, + 21113 - 19968: jis0212<<14 | 0x12<<7 | 0x2B, + 21117 - 19968: jis0208<<14 | 0x30<<7 | 0x56, + 21119 - 19968: jis0208<<14 | 0x30<<7 | 0x55, + 21120 - 19968: jis0212<<14 | 0x12<<7 | 0x2C, + 21122 - 19968: jis0212<<14 | 0x12<<7 | 0x2D, + 21123 - 19968: jis0208<<14 | 0x12<<7 | 0x23, + 21125 - 19968: jis0212<<14 | 0x12<<7 | 0x2E, + 21127 - 19968: jis0208<<14 | 0x16<<7 | 0x3F, + 21128 - 19968: jis0208<<14 | 0x30<<7 | 0x5B, + 21129 - 19968: jis0208<<14 | 0x2D<<7 | 0x0C, + 21130 - 19968: jis0212<<14 | 0x12<<7 | 0x2F, + 21132 - 19968: jis0212<<14 | 0x12<<7 | 0x30, + 21133 - 19968: jis0208<<14 | 0x30<<7 | 0x57, + 21137 - 19968: jis0208<<14 | 0x30<<7 | 0x5C, + 21138 - 19968: jis0208<<14 | 0x30<<7 | 0x59, + 21139 - 19968: jis0212<<14 | 0x12<<7 | 0x31, + 21140 - 19968: jis0208<<14 | 0x30<<7 | 0x58, + 21141 - 19968: jis0212<<14 | 0x12<<7 | 0x32, + 21142 - 19968: jis0212<<14 | 0x12<<7 | 0x33, + 21143 - 19968: jis0212<<14 | 0x12<<7 | 0x34, + 21144 - 19968: jis0212<<14 | 0x12<<7 | 0x35, + 21146 - 19968: jis0212<<14 | 0x12<<7 | 0x36, + 21147 - 19968: jis0208<<14 | 0x2D<<7 | 0x2E, + 21148 - 19968: jis0208<<14 | 0x58<<7 | 0x28, + 21151 - 19968: jis0208<<14 | 0x17<<7 | 0x58, + 21152 - 19968: jis0208<<14 | 0x11<<7 | 0x22, + 21155 - 19968: jis0208<<14 | 0x2D<<7 | 0x53, + 21156 - 19968: jis0212<<14 | 0x12<<7 | 0x38, + 21157 - 19968: jis0212<<14 | 0x12<<7 | 0x39, + 21158 - 19968: jis0208<<14 | 0x58<<7 | 0x29, + 21159 - 19968: jis0212<<14 | 0x12<<7 | 0x3B, + 21161 - 19968: jis0208<<14 | 0x1C<<7 | 0x54, + 21162 - 19968: jis0208<<14 | 0x24<<7 | 0x37, + 21163 - 19968: jis0208<<14 | 0x18<<7 | 0x44, + 21164 - 19968: jis0208<<14 | 0x31<<7 | 0x01, + 21165 - 19968: jis0208<<14 | 0x31<<7 | 0x02, + 21167 - 19968: jis0208<<14 | 0x5A<<7 | 0x1B, + 21168 - 19968: jis0212<<14 | 0x12<<7 | 0x3D, + 21169 - 19968: jis0208<<14 | 0x2D<<7 | 0x44, + 21172 - 19968: jis0208<<14 | 0x2E<<7 | 0x0A, + 21173 - 19968: jis0208<<14 | 0x31<<7 | 0x04, + 21174 - 19968: jis0212<<14 | 0x12<<7 | 0x3E, + 21175 - 19968: jis0212<<14 | 0x12<<7 | 0x3F, + 21176 - 19968: jis0212<<14 | 0x12<<7 | 0x40, + 21177 - 19968: jis0208<<14 | 0x17<<7 | 0x59, + 21178 - 19968: jis0212<<14 | 0x12<<7 | 0x41, + 21179 - 19968: jis0212<<14 | 0x12<<7 | 0x42, + 21180 - 19968: jis0208<<14 | 0x31<<7 | 0x03, + 21181 - 19968: jis0212<<14 | 0x12<<7 | 0x43, + 21182 - 19968: jis0208<<14 | 0x12<<7 | 0x0E, + 21184 - 19968: jis0208<<14 | 0x58<<7 | 0x2A, + 21185 - 19968: jis0208<<14 | 0x31<<7 | 0x05, + 21187 - 19968: jis0208<<14 | 0x2A<<7 | 0x35, + 21188 - 19968: jis0212<<14 | 0x12<<7 | 0x45, + 21189 - 19968: jis0208<<14 | 0x23<<7 | 0x1B, + 21190 - 19968: jis0212<<14 | 0x12<<7 | 0x46, + 21191 - 19968: jis0208<<14 | 0x2C<<7 | 0x05, + 21192 - 19968: jis0212<<14 | 0x12<<7 | 0x47, + 21193 - 19968: jis0208<<14 | 0x29<<7 | 0x38, + 21196 - 19968: jis0212<<14 | 0x12<<7 | 0x48, + 21197 - 19968: jis0208<<14 | 0x31<<7 | 0x06, + 21199 - 19968: jis0212<<14 | 0x12<<7 | 0x49, + 21201 - 19968: jis0212<<14 | 0x12<<7 | 0x4A, + 21202 - 19968: jis0208<<14 | 0x4F<<7 | 0x34, + 21204 - 19968: jis0212<<14 | 0x12<<7 | 0x4B, + 21205 - 19968: jis0208<<14 | 0x25<<7 | 0x0F, + 21206 - 19968: jis0212<<14 | 0x12<<7 | 0x4C, + 21207 - 19968: jis0208<<14 | 0x31<<7 | 0x07, + 21208 - 19968: jis0208<<14 | 0x13<<7 | 0x09, + 21209 - 19968: jis0208<<14 | 0x2B<<7 | 0x12, + 21211 - 19968: jis0208<<14 | 0x58<<7 | 0x2B, + 21212 - 19968: jis0212<<14 | 0x12<<7 | 0x4E, + 21213 - 19968: jis0208<<14 | 0x1D<<7 | 0x00, + 21214 - 19968: jis0208<<14 | 0x31<<7 | 0x08, + 21215 - 19968: jis0208<<14 | 0x29<<7 | 0x46, + 21216 - 19968: jis0208<<14 | 0x31<<7 | 0x0C, + 21217 - 19968: jis0212<<14 | 0x12<<7 | 0x4F, + 21218 - 19968: jis0208<<14 | 0x1F<<7 | 0x09, + 21219 - 19968: jis0208<<14 | 0x31<<7 | 0x09, + 21220 - 19968: jis0208<<14 | 0x15<<7 | 0x2F, + 21221 - 19968: jis0212<<14 | 0x12<<7 | 0x50, + 21222 - 19968: jis0208<<14 | 0x31<<7 | 0x0A, + 21223 - 19968: jis0208<<14 | 0x13<<7 | 0x0A, + 21224 - 19968: jis0212<<14 | 0x12<<7 | 0x51, + 21225 - 19968: jis0212<<14 | 0x12<<7 | 0x52, + 21226 - 19968: jis0212<<14 | 0x12<<7 | 0x53, + 21228 - 19968: jis0212<<14 | 0x12<<7 | 0x54, + 21232 - 19968: jis0212<<14 | 0x12<<7 | 0x55, + 21233 - 19968: jis0212<<14 | 0x12<<7 | 0x56, + 21234 - 19968: jis0208<<14 | 0x16<<7 | 0x0D, + 21235 - 19968: jis0208<<14 | 0x31<<7 | 0x0D, + 21236 - 19968: jis0212<<14 | 0x12<<7 | 0x57, + 21237 - 19968: jis0208<<14 | 0x31<<7 | 0x0E, + 21238 - 19968: jis0212<<14 | 0x12<<7 | 0x58, + 21239 - 19968: jis0212<<14 | 0x12<<7 | 0x59, + 21240 - 19968: jis0208<<14 | 0x31<<7 | 0x0F, + 21241 - 19968: jis0208<<14 | 0x31<<7 | 0x10, + 21242 - 19968: jis0208<<14 | 0x1B<<7 | 0x3A, + 21246 - 19968: jis0208<<14 | 0x17<<7 | 0x5A, + 21247 - 19968: jis0208<<14 | 0x2B<<7 | 0x3D, + 21248 - 19968: jis0208<<14 | 0x58<<7 | 0x2C, + 21249 - 19968: jis0208<<14 | 0x2B<<7 | 0x47, + 21250 - 19968: jis0208<<14 | 0x25<<7 | 0x56, + 21251 - 19968: jis0212<<14 | 0x12<<7 | 0x5B, + 21253 - 19968: jis0208<<14 | 0x29<<7 | 0x50, + 21254 - 19968: jis0208<<14 | 0x31<<7 | 0x11, + 21255 - 19968: jis0208<<14 | 0x58<<7 | 0x2D, + 21256 - 19968: jis0208<<14 | 0x31<<7 | 0x12, + 21258 - 19968: jis0212<<14 | 0x12<<7 | 0x5C, + 21259 - 19968: jis0212<<14 | 0x12<<7 | 0x5D, + 21260 - 19968: jis0212<<14 | 0x13<<7 | 0x00, + 21261 - 19968: jis0208<<14 | 0x31<<7 | 0x14, + 21263 - 19968: jis0208<<14 | 0x31<<7 | 0x16, + 21264 - 19968: jis0208<<14 | 0x31<<7 | 0x15, + 21265 - 19968: jis0212<<14 | 0x13<<7 | 0x01, + 21267 - 19968: jis0212<<14 | 0x13<<7 | 0x02, + 21269 - 19968: jis0208<<14 | 0x31<<7 | 0x17, + 21270 - 19968: jis0208<<14 | 0x11<<7 | 0x1C, + 21271 - 19968: jis0208<<14 | 0x2A<<7 | 0x2B, + 21272 - 19968: jis0212<<14 | 0x13<<7 | 0x03, + 21273 - 19968: jis0208<<14 | 0x19<<7 | 0x5B, + 21274 - 19968: jis0208<<14 | 0x31<<7 | 0x18, + 21275 - 19968: jis0212<<14 | 0x13<<7 | 0x04, + 21276 - 19968: jis0212<<14 | 0x13<<7 | 0x05, + 21277 - 19968: jis0208<<14 | 0x20<<7 | 0x38, + 21278 - 19968: jis0212<<14 | 0x13<<7 | 0x06, + 21279 - 19968: jis0212<<14 | 0x13<<7 | 0x07, + 21280 - 19968: jis0208<<14 | 0x1D<<7 | 0x01, + 21281 - 19968: jis0208<<14 | 0x15<<7 | 0x08, + 21283 - 19968: jis0208<<14 | 0x31<<7 | 0x19, + 21284 - 19968: jis0208<<14 | 0x58<<7 | 0x2E, + 21285 - 19968: jis0212<<14 | 0x13<<7 | 0x08, + 21287 - 19968: jis0212<<14 | 0x13<<7 | 0x09, + 21288 - 19968: jis0212<<14 | 0x13<<7 | 0x0A, + 21289 - 19968: jis0212<<14 | 0x13<<7 | 0x0B, + 21290 - 19968: jis0208<<14 | 0x27<<7 | 0x3A, + 21291 - 19968: jis0212<<14 | 0x13<<7 | 0x0C, + 21292 - 19968: jis0212<<14 | 0x13<<7 | 0x0D, + 21293 - 19968: jis0212<<14 | 0x13<<7 | 0x0E, + 21295 - 19968: jis0208<<14 | 0x31<<7 | 0x1A, + 21296 - 19968: jis0212<<14 | 0x13<<7 | 0x0F, + 21297 - 19968: jis0208<<14 | 0x31<<7 | 0x1B, + 21298 - 19968: jis0212<<14 | 0x13<<7 | 0x10, + 21299 - 19968: jis0208<<14 | 0x31<<7 | 0x1C, + 21301 - 19968: jis0212<<14 | 0x13<<7 | 0x11, + 21304 - 19968: jis0208<<14 | 0x31<<7 | 0x1D, + 21305 - 19968: jis0208<<14 | 0x28<<7 | 0x03, + 21306 - 19968: jis0208<<14 | 0x15<<7 | 0x47, + 21307 - 19968: jis0208<<14 | 0x0F<<7 | 0x44, + 21308 - 19968: jis0212<<14 | 0x13<<7 | 0x12, + 21309 - 19968: jis0212<<14 | 0x13<<7 | 0x13, + 21310 - 19968: jis0212<<14 | 0x13<<7 | 0x14, + 21311 - 19968: jis0208<<14 | 0x25<<7 | 0x1E, + 21312 - 19968: jis0208<<14 | 0x31<<7 | 0x1E, + 21313 - 19968: jis0208<<14 | 0x1C<<7 | 0x1C, + 21314 - 19968: jis0212<<14 | 0x13<<7 | 0x15, + 21315 - 19968: jis0208<<14 | 0x1F<<7 | 0x48, + 21317 - 19968: jis0208<<14 | 0x31<<7 | 0x20, + 21318 - 19968: jis0208<<14 | 0x31<<7 | 0x1F, + 21319 - 19968: jis0208<<14 | 0x1D<<7 | 0x02, + 21320 - 19968: jis0208<<14 | 0x17<<7 | 0x40, + 21321 - 19968: jis0208<<14 | 0x31<<7 | 0x22, + 21322 - 19968: jis0208<<14 | 0x27<<7 | 0x1D, + 21323 - 19968: jis0212<<14 | 0x13<<7 | 0x17, + 21324 - 19968: jis0212<<14 | 0x13<<7 | 0x16, + 21325 - 19968: jis0208<<14 | 0x31<<7 | 0x23, + 21329 - 19968: jis0208<<14 | 0x27<<7 | 0x3B, + 21330 - 19968: jis0208<<14 | 0x21<<7 | 0x13, + 21331 - 19968: jis0208<<14 | 0x21<<7 | 0x4D, + 21332 - 19968: jis0208<<14 | 0x15<<7 | 0x07, + 21335 - 19968: jis0208<<14 | 0x25<<7 | 0x4D, + 21336 - 19968: jis0208<<14 | 0x22<<7 | 0x10, + 21337 - 19968: jis0212<<14 | 0x13<<7 | 0x18, + 21338 - 19968: jis0208<<14 | 0x26<<7 | 0x4D, + 21339 - 19968: jis0212<<14 | 0x13<<7 | 0x19, + 21340 - 19968: jis0208<<14 | 0x2A<<7 | 0x2D, + 21342 - 19968: jis0208<<14 | 0x31<<7 | 0x25, + 21344 - 19968: jis0208<<14 | 0x1F<<7 | 0x49, + 21345 - 19968: jis0212<<14 | 0x13<<7 | 0x1A, + 21347 - 19968: jis0212<<14 | 0x13<<7 | 0x1B, + 21349 - 19968: jis0212<<14 | 0x13<<7 | 0x1C, + 21350 - 19968: jis0208<<14 | 0x16<<7 | 0x14, + 21353 - 19968: jis0208<<14 | 0x31<<7 | 0x26, + 21356 - 19968: jis0212<<14 | 0x13<<7 | 0x1D, + 21357 - 19968: jis0212<<14 | 0x13<<7 | 0x1E, + 21358 - 19968: jis0208<<14 | 0x31<<7 | 0x27, + 21359 - 19968: jis0208<<14 | 0x10<<7 | 0x0B, + 21360 - 19968: jis0208<<14 | 0x0F<<7 | 0x54, + 21361 - 19968: jis0208<<14 | 0x13<<7 | 0x4C, + 21362 - 19968: jis0208<<14 | 0x58<<7 | 0x2F, + 21363 - 19968: jis0208<<14 | 0x21<<7 | 0x07, + 21364 - 19968: jis0208<<14 | 0x14<<7 | 0x30, + 21365 - 19968: jis0208<<14 | 0x2C<<7 | 0x50, + 21367 - 19968: jis0208<<14 | 0x31<<7 | 0x2A, + 21368 - 19968: jis0208<<14 | 0x11<<7 | 0x16, + 21369 - 19968: jis0212<<14 | 0x13<<7 | 0x20, + 21371 - 19968: jis0208<<14 | 0x31<<7 | 0x29, + 21374 - 19968: jis0212<<14 | 0x13<<7 | 0x21, + 21375 - 19968: jis0208<<14 | 0x15<<7 | 0x09, + 21378 - 19968: jis0208<<14 | 0x31<<7 | 0x2B, + 21379 - 19968: jis0212<<14 | 0x13<<7 | 0x22, + 21380 - 19968: jis0208<<14 | 0x2B<<7 | 0x50, + 21383 - 19968: jis0212<<14 | 0x13<<7 | 0x23, + 21384 - 19968: jis0212<<14 | 0x13<<7 | 0x24, + 21390 - 19968: jis0212<<14 | 0x13<<7 | 0x25, + 21395 - 19968: jis0208<<14 | 0x58<<7 | 0x30, + 21396 - 19968: jis0212<<14 | 0x13<<7 | 0x27, + 21398 - 19968: jis0208<<14 | 0x31<<7 | 0x2C, + 21400 - 19968: jis0208<<14 | 0x2D<<7 | 0x31, + 21401 - 19968: jis0212<<14 | 0x13<<7 | 0x28, + 21402 - 19968: jis0208<<14 | 0x17<<7 | 0x5B, + 21405 - 19968: jis0212<<14 | 0x13<<7 | 0x29, + 21407 - 19968: jis0208<<14 | 0x17<<7 | 0x15, + 21408 - 19968: jis0208<<14 | 0x31<<7 | 0x2D, + 21409 - 19968: jis0212<<14 | 0x13<<7 | 0x2A, + 21412 - 19968: jis0212<<14 | 0x13<<7 | 0x2B, + 21413 - 19968: jis0208<<14 | 0x31<<7 | 0x2F, + 21414 - 19968: jis0208<<14 | 0x31<<7 | 0x2E, + 21416 - 19968: jis0208<<14 | 0x1E<<7 | 0x3E, + 21417 - 19968: jis0208<<14 | 0x10<<7 | 0x18, + 21418 - 19968: jis0212<<14 | 0x13<<7 | 0x2C, + 21419 - 19968: jis0212<<14 | 0x13<<7 | 0x2D, + 21421 - 19968: jis0208<<14 | 0x10<<7 | 0x3D, + 21422 - 19968: jis0208<<14 | 0x31<<7 | 0x30, + 21423 - 19968: jis0212<<14 | 0x13<<7 | 0x2E, + 21424 - 19968: jis0208<<14 | 0x31<<7 | 0x31, + 21426 - 19968: jis0208<<14 | 0x58<<7 | 0x31, + 21427 - 19968: jis0208<<14 | 0x17<<7 | 0x16, + 21428 - 19968: jis0212<<14 | 0x13<<7 | 0x30, + 21429 - 19968: jis0212<<14 | 0x13<<7 | 0x31, + 21430 - 19968: jis0208<<14 | 0x31<<7 | 0x32, + 21431 - 19968: jis0212<<14 | 0x13<<7 | 0x32, + 21432 - 19968: jis0212<<14 | 0x13<<7 | 0x33, + 21434 - 19968: jis0212<<14 | 0x13<<7 | 0x34, + 21435 - 19968: jis0208<<14 | 0x14<<7 | 0x4D, + 21437 - 19968: jis0212<<14 | 0x13<<7 | 0x35, + 21440 - 19968: jis0212<<14 | 0x13<<7 | 0x36, + 21442 - 19968: jis0208<<14 | 0x1A<<7 | 0x11, + 21443 - 19968: jis0208<<14 | 0x31<<7 | 0x33, + 21445 - 19968: jis0212<<14 | 0x13<<7 | 0x37, + 21448 - 19968: jis0208<<14 | 0x2A<<7 | 0x53, + 21449 - 19968: jis0208<<14 | 0x19<<7 | 0x14, + 21450 - 19968: jis0208<<14 | 0x14<<7 | 0x39, + 21451 - 19968: jis0208<<14 | 0x2C<<7 | 0x06, + 21452 - 19968: jis0208<<14 | 0x20<<7 | 0x2F, + 21453 - 19968: jis0208<<14 | 0x27<<7 | 0x1E, + 21454 - 19968: jis0208<<14 | 0x1B<<7 | 0x5C, + 21455 - 19968: jis0212<<14 | 0x13<<7 | 0x38, + 21458 - 19968: jis0212<<14 | 0x13<<7 | 0x39, + 21459 - 19968: jis0212<<14 | 0x13<<7 | 0x3A, + 21460 - 19968: jis0208<<14 | 0x1C<<7 | 0x26, + 21461 - 19968: jis0212<<14 | 0x13<<7 | 0x3B, + 21462 - 19968: jis0208<<14 | 0x1B<<7 | 0x47, + 21463 - 19968: jis0208<<14 | 0x1B<<7 | 0x54, + 21465 - 19968: jis0208<<14 | 0x1C<<7 | 0x55, + 21466 - 19968: jis0212<<14 | 0x13<<7 | 0x3C, + 21467 - 19968: jis0208<<14 | 0x27<<7 | 0x1F, + 21469 - 19968: jis0208<<14 | 0x58<<7 | 0x32, + 21470 - 19968: jis0212<<14 | 0x13<<7 | 0x3E, + 21471 - 19968: jis0208<<14 | 0x31<<7 | 0x36, + 21472 - 19968: jis0212<<14 | 0x13<<7 | 0x3F, + 21473 - 19968: jis0208<<14 | 0x10<<7 | 0x22, + 21474 - 19968: jis0208<<14 | 0x20<<7 | 0x30, + 21475 - 19968: jis0208<<14 | 0x17<<7 | 0x5C, + 21476 - 19968: jis0208<<14 | 0x17<<7 | 0x24, + 21477 - 19968: jis0208<<14 | 0x15<<7 | 0x46, + 21478 - 19968: jis0212<<14 | 0x13<<7 | 0x40, + 21479 - 19968: jis0212<<14 | 0x13<<7 | 0x41, + 21480 - 19968: jis0208<<14 | 0x31<<7 | 0x3A, + 21481 - 19968: jis0208<<14 | 0x22<<7 | 0x00, + 21482 - 19968: jis0208<<14 | 0x21<<7 | 0x5D, + 21483 - 19968: jis0208<<14 | 0x15<<7 | 0x0A, + 21484 - 19968: jis0208<<14 | 0x1D<<7 | 0x03, + 21485 - 19968: jis0208<<14 | 0x31<<7 | 0x3B, + 21486 - 19968: jis0208<<14 | 0x31<<7 | 0x39, + 21487 - 19968: jis0208<<14 | 0x11<<7 | 0x23, + 21488 - 19968: jis0208<<14 | 0x21<<7 | 0x45, + 21489 - 19968: jis0208<<14 | 0x1B<<7 | 0x17, + 21490 - 19968: jis0208<<14 | 0x1A<<7 | 0x2A, + 21491 - 19968: jis0208<<14 | 0x10<<7 | 0x05, + 21493 - 19968: jis0212<<14 | 0x13<<7 | 0x42, + 21494 - 19968: jis0208<<14 | 0x12<<7 | 0x4F, + 21495 - 19968: jis0208<<14 | 0x18<<7 | 0x45, + 21496 - 19968: jis0208<<14 | 0x1A<<7 | 0x29, + 21498 - 19968: jis0208<<14 | 0x31<<7 | 0x3C, + 21505 - 19968: jis0208<<14 | 0x31<<7 | 0x3D, + 21506 - 19968: jis0212<<14 | 0x13<<7 | 0x43, + 21507 - 19968: jis0208<<14 | 0x14<<7 | 0x28, + 21508 - 19968: jis0208<<14 | 0x12<<7 | 0x25, + 21512 - 19968: jis0208<<14 | 0x18<<7 | 0x46, + 21513 - 19968: jis0208<<14 | 0x14<<7 | 0x27, + 21514 - 19968: jis0208<<14 | 0x23<<7 | 0x3E, + 21515 - 19968: jis0208<<14 | 0x10<<7 | 0x04, + 21516 - 19968: jis0208<<14 | 0x25<<7 | 0x10, + 21517 - 19968: jis0208<<14 | 0x2B<<7 | 0x1D, + 21518 - 19968: jis0208<<14 | 0x18<<7 | 0x00, + 21519 - 19968: jis0208<<14 | 0x2C<<7 | 0x58, + 21520 - 19968: jis0208<<14 | 0x24<<7 | 0x26, + 21521 - 19968: jis0208<<14 | 0x17<<7 | 0x5D, + 21523 - 19968: jis0212<<14 | 0x13<<7 | 0x44, + 21530 - 19968: jis0212<<14 | 0x13<<7 | 0x45, + 21531 - 19968: jis0208<<14 | 0x16<<7 | 0x0E, + 21533 - 19968: jis0208<<14 | 0x31<<7 | 0x46, + 21535 - 19968: jis0208<<14 | 0x15<<7 | 0x42, + 21536 - 19968: jis0208<<14 | 0x2A<<7 | 0x29, + 21537 - 19968: jis0212<<14 | 0x13<<7 | 0x46, + 21542 - 19968: jis0208<<14 | 0x27<<7 | 0x3C, + 21543 - 19968: jis0212<<14 | 0x13<<7 | 0x47, + 21544 - 19968: jis0212<<14 | 0x13<<7 | 0x48, + 21545 - 19968: jis0208<<14 | 0x31<<7 | 0x45, + 21546 - 19968: jis0212<<14 | 0x13<<7 | 0x49, + 21547 - 19968: jis0208<<14 | 0x13<<7 | 0x3D, + 21548 - 19968: jis0208<<14 | 0x31<<7 | 0x40, + 21549 - 19968: jis0208<<14 | 0x31<<7 | 0x41, + 21550 - 19968: jis0208<<14 | 0x31<<7 | 0x43, + 21551 - 19968: jis0212<<14 | 0x13<<7 | 0x4A, + 21553 - 19968: jis0212<<14 | 0x13<<7 | 0x4B, + 21556 - 19968: jis0212<<14 | 0x13<<7 | 0x4C, + 21557 - 19968: jis0212<<14 | 0x13<<7 | 0x4D, + 21558 - 19968: jis0208<<14 | 0x31<<7 | 0x44, + 21560 - 19968: jis0208<<14 | 0x14<<7 | 0x3A, + 21561 - 19968: jis0208<<14 | 0x1E<<7 | 0x40, + 21563 - 19968: jis0208<<14 | 0x29<<7 | 0x0C, + 21564 - 19968: jis0208<<14 | 0x31<<7 | 0x42, + 21565 - 19968: jis0208<<14 | 0x31<<7 | 0x3E, + 21566 - 19968: jis0208<<14 | 0x17<<7 | 0x42, + 21568 - 19968: jis0208<<14 | 0x31<<7 | 0x3F, + 21570 - 19968: jis0208<<14 | 0x2E<<7 | 0x03, + 21571 - 19968: jis0212<<14 | 0x13<<7 | 0x4E, + 21572 - 19968: jis0212<<14 | 0x13<<7 | 0x4F, + 21574 - 19968: jis0208<<14 | 0x29<<7 | 0x51, + 21575 - 19968: jis0212<<14 | 0x13<<7 | 0x50, + 21576 - 19968: jis0208<<14 | 0x23<<7 | 0x47, + 21577 - 19968: jis0208<<14 | 0x17<<7 | 0x41, + 21578 - 19968: jis0208<<14 | 0x18<<7 | 0x4F, + 21581 - 19968: jis0212<<14 | 0x13<<7 | 0x51, + 21582 - 19968: jis0208<<14 | 0x31<<7 | 0x47, + 21583 - 19968: jis0212<<14 | 0x13<<7 | 0x52, + 21585 - 19968: jis0208<<14 | 0x25<<7 | 0x3C, + 21598 - 19968: jis0212<<14 | 0x13<<7 | 0x53, + 21599 - 19968: jis0208<<14 | 0x31<<7 | 0x4B, + 21602 - 19968: jis0212<<14 | 0x13<<7 | 0x54, + 21604 - 19968: jis0212<<14 | 0x13<<7 | 0x55, + 21606 - 19968: jis0212<<14 | 0x13<<7 | 0x56, + 21607 - 19968: jis0212<<14 | 0x13<<7 | 0x57, + 21608 - 19968: jis0208<<14 | 0x1B<<7 | 0x5D, + 21609 - 19968: jis0212<<14 | 0x13<<7 | 0x58, + 21610 - 19968: jis0208<<14 | 0x1B<<7 | 0x55, + 21611 - 19968: jis0212<<14 | 0x13<<7 | 0x59, + 21613 - 19968: jis0212<<14 | 0x13<<7 | 0x5A, + 21614 - 19968: jis0212<<14 | 0x13<<7 | 0x5B, + 21616 - 19968: jis0208<<14 | 0x31<<7 | 0x4E, + 21617 - 19968: jis0208<<14 | 0x31<<7 | 0x4C, + 21619 - 19968: jis0208<<14 | 0x2B<<7 | 0x02, + 21620 - 19968: jis0212<<14 | 0x13<<7 | 0x5C, + 21621 - 19968: jis0208<<14 | 0x31<<7 | 0x49, + 21622 - 19968: jis0208<<14 | 0x31<<7 | 0x52, + 21623 - 19968: jis0208<<14 | 0x31<<7 | 0x4D, + 21627 - 19968: jis0208<<14 | 0x31<<7 | 0x50, + 21628 - 19968: jis0208<<14 | 0x17<<7 | 0x25, + 21629 - 19968: jis0208<<14 | 0x2B<<7 | 0x1E, + 21631 - 19968: jis0212<<14 | 0x13<<7 | 0x5D, + 21632 - 19968: jis0208<<14 | 0x31<<7 | 0x51, + 21633 - 19968: jis0212<<14 | 0x14<<7 | 0x00, + 21635 - 19968: jis0212<<14 | 0x14<<7 | 0x01, + 21636 - 19968: jis0208<<14 | 0x31<<7 | 0x53, + 21637 - 19968: jis0212<<14 | 0x14<<7 | 0x02, + 21638 - 19968: jis0208<<14 | 0x31<<7 | 0x55, + 21640 - 19968: jis0212<<14 | 0x14<<7 | 0x03, + 21641 - 19968: jis0212<<14 | 0x14<<7 | 0x04, + 21642 - 19968: jis0208<<14 | 0x58<<7 | 0x35, + 21643 - 19968: jis0208<<14 | 0x19<<7 | 0x4F, + 21644 - 19968: jis0208<<14 | 0x2E<<7 | 0x21, + 21645 - 19968: jis0212<<14 | 0x14<<7 | 0x05, + 21646 - 19968: jis0208<<14 | 0x31<<7 | 0x4A, + 21647 - 19968: jis0208<<14 | 0x31<<7 | 0x48, + 21648 - 19968: jis0208<<14 | 0x31<<7 | 0x54, + 21649 - 19968: jis0212<<14 | 0x14<<7 | 0x06, + 21650 - 19968: jis0208<<14 | 0x31<<7 | 0x4F, + 21653 - 19968: jis0212<<14 | 0x14<<7 | 0x07, + 21654 - 19968: jis0212<<14 | 0x14<<7 | 0x08, + 21660 - 19968: jis0208<<14 | 0x58<<7 | 0x34, + 21663 - 19968: jis0212<<14 | 0x14<<7 | 0x0A, + 21665 - 19968: jis0212<<14 | 0x14<<7 | 0x0B, + 21666 - 19968: jis0208<<14 | 0x31<<7 | 0x57, + 21668 - 19968: jis0208<<14 | 0x32<<7 | 0x02, + 21669 - 19968: jis0208<<14 | 0x31<<7 | 0x59, + 21670 - 19968: jis0212<<14 | 0x14<<7 | 0x0C, + 21671 - 19968: jis0212<<14 | 0x14<<7 | 0x0D, + 21672 - 19968: jis0208<<14 | 0x31<<7 | 0x5D, + 21673 - 19968: jis0208<<14 | 0x58<<7 | 0x36, + 21674 - 19968: jis0212<<14 | 0x14<<7 | 0x0F, + 21675 - 19968: jis0208<<14 | 0x32<<7 | 0x00, + 21676 - 19968: jis0208<<14 | 0x31<<7 | 0x5A, + 21677 - 19968: jis0212<<14 | 0x14<<7 | 0x10, + 21678 - 19968: jis0212<<14 | 0x14<<7 | 0x11, + 21679 - 19968: jis0208<<14 | 0x32<<7 | 0x1D, + 21681 - 19968: jis0212<<14 | 0x14<<7 | 0x12, + 21682 - 19968: jis0208<<14 | 0x19<<7 | 0x48, + 21683 - 19968: jis0208<<14 | 0x12<<7 | 0x10, + 21687 - 19968: jis0212<<14 | 0x14<<7 | 0x13, + 21688 - 19968: jis0208<<14 | 0x31<<7 | 0x58, + 21689 - 19968: jis0212<<14 | 0x14<<7 | 0x14, + 21690 - 19968: jis0212<<14 | 0x14<<7 | 0x15, + 21691 - 19968: jis0212<<14 | 0x14<<7 | 0x16, + 21692 - 19968: jis0208<<14 | 0x32<<7 | 0x04, + 21693 - 19968: jis0208<<14 | 0x0F<<7 | 0x55, + 21694 - 19968: jis0208<<14 | 0x32<<7 | 0x03, + 21695 - 19968: jis0212<<14 | 0x14<<7 | 0x17, + 21696 - 19968: jis0208<<14 | 0x0F<<7 | 0x04, + 21697 - 19968: jis0208<<14 | 0x28<<7 | 0x29, + 21698 - 19968: jis0208<<14 | 0x32<<7 | 0x01, + 21700 - 19968: jis0208<<14 | 0x31<<7 | 0x5B, + 21702 - 19968: jis0212<<14 | 0x14<<7 | 0x18, + 21703 - 19968: jis0208<<14 | 0x31<<7 | 0x56, + 21704 - 19968: jis0208<<14 | 0x31<<7 | 0x5C, + 21705 - 19968: jis0208<<14 | 0x19<<7 | 0x27, + 21706 - 19968: jis0212<<14 | 0x14<<7 | 0x19, + 21709 - 19968: jis0212<<14 | 0x14<<7 | 0x1A, + 21710 - 19968: jis0212<<14 | 0x14<<7 | 0x1B, + 21720 - 19968: jis0208<<14 | 0x32<<7 | 0x05, + 21728 - 19968: jis0212<<14 | 0x14<<7 | 0x1C, + 21729 - 19968: jis0208<<14 | 0x0F<<7 | 0x56, + 21730 - 19968: jis0208<<14 | 0x32<<7 | 0x0E, + 21733 - 19968: jis0208<<14 | 0x32<<7 | 0x06, + 21734 - 19968: jis0208<<14 | 0x32<<7 | 0x07, + 21736 - 19968: jis0208<<14 | 0x1D<<7 | 0x04, + 21737 - 19968: jis0208<<14 | 0x2A<<7 | 0x48, + 21738 - 19968: jis0212<<14 | 0x14<<7 | 0x1D, + 21740 - 19968: jis0212<<14 | 0x14<<7 | 0x1E, + 21741 - 19968: jis0208<<14 | 0x32<<7 | 0x0C, + 21742 - 19968: jis0208<<14 | 0x32<<7 | 0x0B, + 21743 - 19968: jis0212<<14 | 0x14<<7 | 0x1F, + 21746 - 19968: jis0208<<14 | 0x24<<7 | 0x0E, + 21750 - 19968: jis0212<<14 | 0x14<<7 | 0x20, + 21754 - 19968: jis0208<<14 | 0x32<<7 | 0x0D, + 21756 - 19968: jis0212<<14 | 0x14<<7 | 0x21, + 21757 - 19968: jis0208<<14 | 0x32<<7 | 0x0A, + 21758 - 19968: jis0212<<14 | 0x14<<7 | 0x22, + 21759 - 19968: jis0208<<14 | 0x58<<7 | 0x37, + 21760 - 19968: jis0212<<14 | 0x14<<7 | 0x24, + 21761 - 19968: jis0212<<14 | 0x14<<7 | 0x25, + 21764 - 19968: jis0208<<14 | 0x10<<7 | 0x13, + 21765 - 19968: jis0212<<14 | 0x14<<7 | 0x26, + 21766 - 19968: jis0208<<14 | 0x19<<7 | 0x15, + 21767 - 19968: jis0208<<14 | 0x1E<<7 | 0x0F, + 21768 - 19968: jis0212<<14 | 0x14<<7 | 0x27, + 21769 - 19968: jis0212<<14 | 0x14<<7 | 0x28, + 21772 - 19968: jis0212<<14 | 0x14<<7 | 0x29, + 21773 - 19968: jis0212<<14 | 0x14<<7 | 0x2A, + 21774 - 19968: jis0212<<14 | 0x14<<7 | 0x2B, + 21775 - 19968: jis0208<<14 | 0x32<<7 | 0x08, + 21776 - 19968: jis0208<<14 | 0x24<<7 | 0x41, + 21780 - 19968: jis0208<<14 | 0x32<<7 | 0x09, + 21781 - 19968: jis0212<<14 | 0x14<<7 | 0x2C, + 21782 - 19968: jis0208<<14 | 0x0F<<7 | 0x01, + 21802 - 19968: jis0212<<14 | 0x14<<7 | 0x2D, + 21803 - 19968: jis0212<<14 | 0x14<<7 | 0x2E, + 21806 - 19968: jis0208<<14 | 0x32<<7 | 0x13, + 21807 - 19968: jis0208<<14 | 0x2C<<7 | 0x02, + 21809 - 19968: jis0208<<14 | 0x1D<<7 | 0x06, + 21810 - 19968: jis0212<<14 | 0x14<<7 | 0x2F, + 21811 - 19968: jis0208<<14 | 0x32<<7 | 0x19, + 21813 - 19968: jis0212<<14 | 0x14<<7 | 0x30, + 21814 - 19968: jis0212<<14 | 0x14<<7 | 0x31, + 21816 - 19968: jis0208<<14 | 0x32<<7 | 0x18, + 21817 - 19968: jis0208<<14 | 0x32<<7 | 0x0F, + 21819 - 19968: jis0212<<14 | 0x14<<7 | 0x32, + 21820 - 19968: jis0212<<14 | 0x14<<7 | 0x33, + 21821 - 19968: jis0212<<14 | 0x14<<7 | 0x34, + 21822 - 19968: jis0208<<14 | 0x21<<7 | 0x22, + 21824 - 19968: jis0208<<14 | 0x32<<7 | 0x10, + 21825 - 19968: jis0212<<14 | 0x14<<7 | 0x35, + 21828 - 19968: jis0208<<14 | 0x21<<7 | 0x4E, + 21829 - 19968: jis0208<<14 | 0x32<<7 | 0x15, + 21830 - 19968: jis0208<<14 | 0x1D<<7 | 0x05, + 21831 - 19968: jis0212<<14 | 0x14<<7 | 0x36, + 21833 - 19968: jis0212<<14 | 0x14<<7 | 0x37, + 21834 - 19968: jis0212<<14 | 0x14<<7 | 0x38, + 21836 - 19968: jis0208<<14 | 0x32<<7 | 0x12, + 21837 - 19968: jis0212<<14 | 0x14<<7 | 0x39, + 21839 - 19968: jis0208<<14 | 0x2B<<7 | 0x43, + 21840 - 19968: jis0212<<14 | 0x14<<7 | 0x3A, + 21841 - 19968: jis0212<<14 | 0x14<<7 | 0x3B, + 21843 - 19968: jis0208<<14 | 0x16<<7 | 0x1B, + 21846 - 19968: jis0208<<14 | 0x32<<7 | 0x16, + 21847 - 19968: jis0208<<14 | 0x32<<7 | 0x17, + 21848 - 19968: jis0212<<14 | 0x14<<7 | 0x3C, + 21850 - 19968: jis0212<<14 | 0x14<<7 | 0x3D, + 21851 - 19968: jis0212<<14 | 0x14<<7 | 0x3E, + 21852 - 19968: jis0208<<14 | 0x32<<7 | 0x14, + 21853 - 19968: jis0208<<14 | 0x32<<7 | 0x1A, + 21854 - 19968: jis0212<<14 | 0x14<<7 | 0x3F, + 21856 - 19968: jis0212<<14 | 0x14<<7 | 0x40, + 21857 - 19968: jis0212<<14 | 0x14<<7 | 0x41, + 21859 - 19968: jis0208<<14 | 0x32<<7 | 0x11, + 21860 - 19968: jis0212<<14 | 0x14<<7 | 0x42, + 21862 - 19968: jis0212<<14 | 0x14<<7 | 0x43, + 21883 - 19968: jis0208<<14 | 0x32<<7 | 0x20, + 21884 - 19968: jis0208<<14 | 0x32<<7 | 0x25, + 21886 - 19968: jis0208<<14 | 0x32<<7 | 0x21, + 21887 - 19968: jis0212<<14 | 0x14<<7 | 0x44, + 21888 - 19968: jis0208<<14 | 0x32<<7 | 0x1C, + 21889 - 19968: jis0212<<14 | 0x14<<7 | 0x45, + 21890 - 19968: jis0212<<14 | 0x14<<7 | 0x46, + 21891 - 19968: jis0208<<14 | 0x32<<7 | 0x26, + 21892 - 19968: jis0208<<14 | 0x20<<7 | 0x10, + 21894 - 19968: jis0208<<14 | 0x58<<7 | 0x38, + 21895 - 19968: jis0208<<14 | 0x32<<7 | 0x28, + 21896 - 19968: jis0212<<14 | 0x14<<7 | 0x48, + 21897 - 19968: jis0208<<14 | 0x18<<7 | 0x01, + 21898 - 19968: jis0208<<14 | 0x32<<7 | 0x1E, + 21899 - 19968: jis0208<<14 | 0x22<<7 | 0x5C, + 21902 - 19968: jis0212<<14 | 0x14<<7 | 0x49, + 21903 - 19968: jis0212<<14 | 0x14<<7 | 0x4A, + 21905 - 19968: jis0212<<14 | 0x14<<7 | 0x4B, + 21906 - 19968: jis0212<<14 | 0x14<<7 | 0x4C, + 21907 - 19968: jis0212<<14 | 0x14<<7 | 0x4D, + 21908 - 19968: jis0212<<14 | 0x14<<7 | 0x4E, + 21911 - 19968: jis0212<<14 | 0x14<<7 | 0x4F, + 21912 - 19968: jis0208<<14 | 0x32<<7 | 0x22, + 21913 - 19968: jis0208<<14 | 0x32<<7 | 0x1B, + 21914 - 19968: jis0208<<14 | 0x13<<7 | 0x0C, + 21916 - 19968: jis0208<<14 | 0x13<<7 | 0x4D, + 21917 - 19968: jis0208<<14 | 0x12<<7 | 0x44, + 21918 - 19968: jis0208<<14 | 0x32<<7 | 0x23, + 21919 - 19968: jis0208<<14 | 0x32<<7 | 0x1F, + 21923 - 19968: jis0212<<14 | 0x14<<7 | 0x50, + 21924 - 19968: jis0212<<14 | 0x14<<7 | 0x51, + 21927 - 19968: jis0208<<14 | 0x16<<7 | 0x55, + 21928 - 19968: jis0208<<14 | 0x32<<7 | 0x29, + 21929 - 19968: jis0208<<14 | 0x32<<7 | 0x27, + 21930 - 19968: jis0208<<14 | 0x20<<7 | 0x32, + 21931 - 19968: jis0208<<14 | 0x14<<7 | 0x29, + 21932 - 19968: jis0208<<14 | 0x15<<7 | 0x0B, + 21933 - 19968: jis0212<<14 | 0x14<<7 | 0x52, + 21934 - 19968: jis0208<<14 | 0x32<<7 | 0x24, + 21936 - 19968: jis0208<<14 | 0x15<<7 | 0x53, + 21938 - 19968: jis0212<<14 | 0x14<<7 | 0x53, + 21942 - 19968: jis0208<<14 | 0x10<<7 | 0x23, + 21951 - 19968: jis0212<<14 | 0x14<<7 | 0x54, + 21953 - 19968: jis0212<<14 | 0x14<<7 | 0x55, + 21955 - 19968: jis0212<<14 | 0x14<<7 | 0x56, + 21956 - 19968: jis0208<<14 | 0x32<<7 | 0x2D, + 21957 - 19968: jis0208<<14 | 0x32<<7 | 0x2B, + 21958 - 19968: jis0212<<14 | 0x14<<7 | 0x57, + 21959 - 19968: jis0208<<14 | 0x33<<7 | 0x06, + 21961 - 19968: jis0212<<14 | 0x14<<7 | 0x58, + 21963 - 19968: jis0212<<14 | 0x14<<7 | 0x59, + 21964 - 19968: jis0212<<14 | 0x14<<7 | 0x5A, + 21966 - 19968: jis0212<<14 | 0x14<<7 | 0x5B, + 21969 - 19968: jis0212<<14 | 0x14<<7 | 0x5C, + 21970 - 19968: jis0212<<14 | 0x14<<7 | 0x5D, + 21971 - 19968: jis0212<<14 | 0x15<<7 | 0x00, + 21972 - 19968: jis0208<<14 | 0x32<<7 | 0x30, + 21975 - 19968: jis0212<<14 | 0x15<<7 | 0x01, + 21976 - 19968: jis0212<<14 | 0x15<<7 | 0x02, + 21978 - 19968: jis0208<<14 | 0x32<<7 | 0x2A, + 21979 - 19968: jis0212<<14 | 0x15<<7 | 0x03, + 21980 - 19968: jis0208<<14 | 0x32<<7 | 0x2E, + 21982 - 19968: jis0212<<14 | 0x15<<7 | 0x04, + 21983 - 19968: jis0208<<14 | 0x32<<7 | 0x2C, + 21986 - 19968: jis0212<<14 | 0x15<<7 | 0x05, + 21987 - 19968: jis0208<<14 | 0x1A<<7 | 0x2B, + 21988 - 19968: jis0208<<14 | 0x32<<7 | 0x2F, + 21993 - 19968: jis0212<<14 | 0x15<<7 | 0x06, + 22006 - 19968: jis0212<<14 | 0x15<<7 | 0x07, + 22007 - 19968: jis0208<<14 | 0x32<<7 | 0x32, + 22009 - 19968: jis0208<<14 | 0x32<<7 | 0x37, + 22013 - 19968: jis0208<<14 | 0x32<<7 | 0x35, + 22014 - 19968: jis0208<<14 | 0x32<<7 | 0x34, + 22015 - 19968: jis0212<<14 | 0x15<<7 | 0x08, + 22021 - 19968: jis0212<<14 | 0x15<<7 | 0x09, + 22022 - 19968: jis0208<<14 | 0x22<<7 | 0x11, + 22024 - 19968: jis0212<<14 | 0x15<<7 | 0x0A, + 22025 - 19968: jis0208<<14 | 0x11<<7 | 0x24, + 22026 - 19968: jis0212<<14 | 0x15<<7 | 0x0B, + 22029 - 19968: jis0212<<14 | 0x15<<7 | 0x0C, + 22030 - 19968: jis0212<<14 | 0x15<<7 | 0x0D, + 22031 - 19968: jis0212<<14 | 0x15<<7 | 0x0E, + 22032 - 19968: jis0212<<14 | 0x15<<7 | 0x0F, + 22033 - 19968: jis0212<<14 | 0x15<<7 | 0x10, + 22034 - 19968: jis0212<<14 | 0x15<<7 | 0x11, + 22036 - 19968: jis0208<<14 | 0x32<<7 | 0x31, + 22038 - 19968: jis0208<<14 | 0x32<<7 | 0x33, + 22039 - 19968: jis0208<<14 | 0x1D<<7 | 0x07, + 22040 - 19968: jis0208<<14 | 0x10<<7 | 0x12, + 22041 - 19968: jis0212<<14 | 0x15<<7 | 0x12, + 22043 - 19968: jis0208<<14 | 0x32<<7 | 0x36, + 22057 - 19968: jis0208<<14 | 0x11<<7 | 0x3D, + 22060 - 19968: jis0212<<14 | 0x15<<7 | 0x13, + 22063 - 19968: jis0208<<14 | 0x32<<7 | 0x41, + 22064 - 19968: jis0212<<14 | 0x15<<7 | 0x14, + 22065 - 19968: jis0208<<14 | 0x1D<<7 | 0x5B, + 22066 - 19968: jis0208<<14 | 0x32<<7 | 0x3D, + 22067 - 19968: jis0212<<14 | 0x15<<7 | 0x15, + 22068 - 19968: jis0208<<14 | 0x32<<7 | 0x3B, + 22069 - 19968: jis0212<<14 | 0x15<<7 | 0x16, + 22070 - 19968: jis0208<<14 | 0x32<<7 | 0x3C, + 22071 - 19968: jis0212<<14 | 0x15<<7 | 0x17, + 22072 - 19968: jis0208<<14 | 0x32<<7 | 0x3E, + 22073 - 19968: jis0212<<14 | 0x15<<7 | 0x18, + 22075 - 19968: jis0212<<14 | 0x15<<7 | 0x19, + 22076 - 19968: jis0212<<14 | 0x15<<7 | 0x1A, + 22077 - 19968: jis0212<<14 | 0x15<<7 | 0x1B, + 22079 - 19968: jis0212<<14 | 0x15<<7 | 0x1C, + 22080 - 19968: jis0212<<14 | 0x15<<7 | 0x1D, + 22081 - 19968: jis0212<<14 | 0x15<<7 | 0x1E, + 22082 - 19968: jis0208<<14 | 0x10<<7 | 0x1C, + 22083 - 19968: jis0212<<14 | 0x15<<7 | 0x1F, + 22084 - 19968: jis0212<<14 | 0x15<<7 | 0x20, + 22086 - 19968: jis0212<<14 | 0x15<<7 | 0x21, + 22089 - 19968: jis0212<<14 | 0x15<<7 | 0x22, + 22091 - 19968: jis0212<<14 | 0x15<<7 | 0x23, + 22092 - 19968: jis0208<<14 | 0x20<<7 | 0x18, + 22093 - 19968: jis0212<<14 | 0x15<<7 | 0x24, + 22094 - 19968: jis0208<<14 | 0x32<<7 | 0x38, + 22095 - 19968: jis0212<<14 | 0x15<<7 | 0x25, + 22096 - 19968: jis0208<<14 | 0x32<<7 | 0x39, + 22100 - 19968: jis0212<<14 | 0x15<<7 | 0x26, + 22107 - 19968: jis0208<<14 | 0x12<<7 | 0x59, + 22110 - 19968: jis0212<<14 | 0x15<<7 | 0x27, + 22112 - 19968: jis0212<<14 | 0x15<<7 | 0x28, + 22113 - 19968: jis0212<<14 | 0x15<<7 | 0x29, + 22114 - 19968: jis0212<<14 | 0x15<<7 | 0x2A, + 22115 - 19968: jis0212<<14 | 0x15<<7 | 0x2B, + 22116 - 19968: jis0208<<14 | 0x32<<7 | 0x40, + 22118 - 19968: jis0212<<14 | 0x15<<7 | 0x2C, + 22120 - 19968: jis0208<<14 | 0x13<<7 | 0x4E, + 22121 - 19968: jis0212<<14 | 0x15<<7 | 0x2D, + 22122 - 19968: jis0208<<14 | 0x32<<7 | 0x43, + 22123 - 19968: jis0208<<14 | 0x32<<7 | 0x3F, + 22124 - 19968: jis0208<<14 | 0x32<<7 | 0x42, + 22125 - 19968: jis0212<<14 | 0x15<<7 | 0x2E, + 22127 - 19968: jis0212<<14 | 0x15<<7 | 0x2F, + 22129 - 19968: jis0212<<14 | 0x15<<7 | 0x30, + 22130 - 19968: jis0212<<14 | 0x15<<7 | 0x31, + 22132 - 19968: jis0208<<14 | 0x29<<7 | 0x0D, + 22133 - 19968: jis0212<<14 | 0x15<<7 | 0x32, + 22136 - 19968: jis0208<<14 | 0x25<<7 | 0x34, + 22138 - 19968: jis0208<<14 | 0x27<<7 | 0x17, + 22144 - 19968: jis0208<<14 | 0x32<<7 | 0x45, + 22148 - 19968: jis0212<<14 | 0x15<<7 | 0x33, + 22149 - 19968: jis0212<<14 | 0x15<<7 | 0x34, + 22150 - 19968: jis0208<<14 | 0x32<<7 | 0x44, + 22151 - 19968: jis0208<<14 | 0x12<<7 | 0x24, + 22152 - 19968: jis0212<<14 | 0x15<<7 | 0x35, + 22154 - 19968: jis0208<<14 | 0x32<<7 | 0x46, + 22155 - 19968: jis0212<<14 | 0x15<<7 | 0x36, + 22156 - 19968: jis0212<<14 | 0x15<<7 | 0x37, + 22159 - 19968: jis0208<<14 | 0x32<<7 | 0x49, + 22164 - 19968: jis0208<<14 | 0x32<<7 | 0x48, + 22165 - 19968: jis0212<<14 | 0x15<<7 | 0x38, + 22169 - 19968: jis0212<<14 | 0x15<<7 | 0x39, + 22170 - 19968: jis0212<<14 | 0x15<<7 | 0x3A, + 22173 - 19968: jis0212<<14 | 0x15<<7 | 0x3B, + 22174 - 19968: jis0212<<14 | 0x15<<7 | 0x3C, + 22175 - 19968: jis0212<<14 | 0x15<<7 | 0x3D, + 22176 - 19968: jis0208<<14 | 0x32<<7 | 0x47, + 22178 - 19968: jis0208<<14 | 0x26<<7 | 0x18, + 22181 - 19968: jis0208<<14 | 0x32<<7 | 0x4A, + 22182 - 19968: jis0212<<14 | 0x15<<7 | 0x3E, + 22183 - 19968: jis0212<<14 | 0x15<<7 | 0x3F, + 22184 - 19968: jis0212<<14 | 0x15<<7 | 0x40, + 22185 - 19968: jis0212<<14 | 0x15<<7 | 0x41, + 22187 - 19968: jis0212<<14 | 0x15<<7 | 0x42, + 22188 - 19968: jis0212<<14 | 0x15<<7 | 0x43, + 22189 - 19968: jis0212<<14 | 0x15<<7 | 0x44, + 22190 - 19968: jis0208<<14 | 0x32<<7 | 0x4B, + 22193 - 19968: jis0212<<14 | 0x15<<7 | 0x45, + 22195 - 19968: jis0212<<14 | 0x15<<7 | 0x46, + 22196 - 19968: jis0208<<14 | 0x32<<7 | 0x4D, + 22198 - 19968: jis0208<<14 | 0x32<<7 | 0x4C, + 22199 - 19968: jis0212<<14 | 0x15<<7 | 0x47, + 22204 - 19968: jis0208<<14 | 0x32<<7 | 0x4F, + 22206 - 19968: jis0212<<14 | 0x15<<7 | 0x48, + 22208 - 19968: jis0208<<14 | 0x32<<7 | 0x52, + 22209 - 19968: jis0208<<14 | 0x32<<7 | 0x50, + 22210 - 19968: jis0208<<14 | 0x32<<7 | 0x4E, + 22211 - 19968: jis0208<<14 | 0x32<<7 | 0x51, + 22213 - 19968: jis0212<<14 | 0x15<<7 | 0x49, + 22216 - 19968: jis0208<<14 | 0x32<<7 | 0x53, + 22217 - 19968: jis0212<<14 | 0x15<<7 | 0x4A, + 22218 - 19968: jis0212<<14 | 0x15<<7 | 0x4B, + 22219 - 19968: jis0212<<14 | 0x15<<7 | 0x4C, + 22220 - 19968: jis0212<<14 | 0x15<<7 | 0x4F, + 22221 - 19968: jis0212<<14 | 0x15<<7 | 0x50, + 22222 - 19968: jis0208<<14 | 0x32<<7 | 0x54, + 22223 - 19968: jis0212<<14 | 0x15<<7 | 0x4D, + 22224 - 19968: jis0212<<14 | 0x15<<7 | 0x4E, + 22225 - 19968: jis0208<<14 | 0x32<<7 | 0x55, + 22227 - 19968: jis0208<<14 | 0x32<<7 | 0x56, + 22231 - 19968: jis0208<<14 | 0x32<<7 | 0x57, + 22232 - 19968: jis0208<<14 | 0x30<<7 | 0x24, + 22233 - 19968: jis0212<<14 | 0x15<<7 | 0x51, + 22234 - 19968: jis0208<<14 | 0x1B<<7 | 0x5B, + 22235 - 19968: jis0208<<14 | 0x1A<<7 | 0x2C, + 22236 - 19968: jis0212<<14 | 0x15<<7 | 0x52, + 22237 - 19968: jis0212<<14 | 0x15<<7 | 0x53, + 22238 - 19968: jis0208<<14 | 0x11<<7 | 0x52, + 22239 - 19968: jis0212<<14 | 0x15<<7 | 0x54, + 22240 - 19968: jis0208<<14 | 0x0F<<7 | 0x57, + 22241 - 19968: jis0212<<14 | 0x15<<7 | 0x55, + 22243 - 19968: jis0208<<14 | 0x22<<7 | 0x23, + 22244 - 19968: jis0212<<14 | 0x15<<7 | 0x56, + 22245 - 19968: jis0212<<14 | 0x15<<7 | 0x57, + 22246 - 19968: jis0212<<14 | 0x15<<7 | 0x58, + 22247 - 19968: jis0212<<14 | 0x15<<7 | 0x59, + 22248 - 19968: jis0212<<14 | 0x15<<7 | 0x5A, + 22251 - 19968: jis0212<<14 | 0x15<<7 | 0x5C, + 22253 - 19968: jis0212<<14 | 0x15<<7 | 0x5D, + 22254 - 19968: jis0208<<14 | 0x32<<7 | 0x58, + 22256 - 19968: jis0208<<14 | 0x19<<7 | 0x03, + 22257 - 19968: jis0212<<14 | 0x15<<7 | 0x5B, + 22258 - 19968: jis0208<<14 | 0x0F<<7 | 0x2E, + 22259 - 19968: jis0208<<14 | 0x1E<<7 | 0x3D, + 22262 - 19968: jis0212<<14 | 0x16<<7 | 0x00, + 22263 - 19968: jis0212<<14 | 0x16<<7 | 0x01, + 22265 - 19968: jis0208<<14 | 0x32<<7 | 0x59, + 22266 - 19968: jis0208<<14 | 0x17<<7 | 0x26, + 22269 - 19968: jis0208<<14 | 0x18<<7 | 0x50, + 22271 - 19968: jis0208<<14 | 0x32<<7 | 0x5B, + 22272 - 19968: jis0208<<14 | 0x32<<7 | 0x5A, + 22273 - 19968: jis0212<<14 | 0x16<<7 | 0x02, + 22274 - 19968: jis0212<<14 | 0x16<<7 | 0x03, + 22275 - 19968: jis0208<<14 | 0x29<<7 | 0x3F, + 22276 - 19968: jis0208<<14 | 0x32<<7 | 0x5C, + 22279 - 19968: jis0212<<14 | 0x16<<7 | 0x04, + 22280 - 19968: jis0208<<14 | 0x33<<7 | 0x00, + 22281 - 19968: jis0208<<14 | 0x32<<7 | 0x5D, + 22282 - 19968: jis0212<<14 | 0x16<<7 | 0x05, + 22283 - 19968: jis0208<<14 | 0x33<<7 | 0x01, + 22284 - 19968: jis0212<<14 | 0x16<<7 | 0x06, + 22285 - 19968: jis0208<<14 | 0x33<<7 | 0x02, + 22287 - 19968: jis0208<<14 | 0x16<<7 | 0x56, + 22289 - 19968: jis0212<<14 | 0x16<<7 | 0x07, + 22290 - 19968: jis0208<<14 | 0x10<<7 | 0x3F, + 22291 - 19968: jis0208<<14 | 0x33<<7 | 0x03, + 22293 - 19968: jis0212<<14 | 0x16<<7 | 0x08, + 22294 - 19968: jis0208<<14 | 0x33<<7 | 0x05, + 22296 - 19968: jis0208<<14 | 0x33<<7 | 0x04, + 22298 - 19968: jis0212<<14 | 0x16<<7 | 0x09, + 22299 - 19968: jis0212<<14 | 0x16<<7 | 0x0A, + 22300 - 19968: jis0208<<14 | 0x33<<7 | 0x07, + 22301 - 19968: jis0212<<14 | 0x16<<7 | 0x0B, + 22303 - 19968: jis0208<<14 | 0x24<<7 | 0x39, + 22304 - 19968: jis0212<<14 | 0x16<<7 | 0x0C, + 22306 - 19968: jis0212<<14 | 0x16<<7 | 0x0D, + 22307 - 19968: jis0212<<14 | 0x16<<7 | 0x0E, + 22308 - 19968: jis0212<<14 | 0x16<<7 | 0x0F, + 22309 - 19968: jis0212<<14 | 0x16<<7 | 0x10, + 22310 - 19968: jis0208<<14 | 0x33<<7 | 0x08, + 22311 - 19968: jis0208<<14 | 0x0F<<7 | 0x14, + 22312 - 19968: jis0208<<14 | 0x19<<7 | 0x3E, + 22313 - 19968: jis0212<<14 | 0x16<<7 | 0x11, + 22314 - 19968: jis0212<<14 | 0x16<<7 | 0x12, + 22316 - 19968: jis0212<<14 | 0x16<<7 | 0x13, + 22317 - 19968: jis0208<<14 | 0x16<<7 | 0x1C, + 22318 - 19968: jis0212<<14 | 0x16<<7 | 0x14, + 22319 - 19968: jis0212<<14 | 0x16<<7 | 0x15, + 22320 - 19968: jis0208<<14 | 0x22<<7 | 0x2E, + 22323 - 19968: jis0212<<14 | 0x16<<7 | 0x16, + 22324 - 19968: jis0212<<14 | 0x16<<7 | 0x17, + 22327 - 19968: jis0208<<14 | 0x33<<7 | 0x09, + 22328 - 19968: jis0208<<14 | 0x33<<7 | 0x0A, + 22331 - 19968: jis0208<<14 | 0x33<<7 | 0x0C, + 22333 - 19968: jis0212<<14 | 0x16<<7 | 0x18, + 22334 - 19968: jis0212<<14 | 0x16<<7 | 0x19, + 22335 - 19968: jis0212<<14 | 0x16<<7 | 0x1A, + 22336 - 19968: jis0208<<14 | 0x33<<7 | 0x0D, + 22338 - 19968: jis0208<<14 | 0x19<<7 | 0x43, + 22341 - 19968: jis0212<<14 | 0x16<<7 | 0x1B, + 22342 - 19968: jis0212<<14 | 0x16<<7 | 0x1C, + 22343 - 19968: jis0208<<14 | 0x15<<7 | 0x30, + 22346 - 19968: jis0208<<14 | 0x2A<<7 | 0x16, + 22348 - 19968: jis0212<<14 | 0x16<<7 | 0x1D, + 22349 - 19968: jis0212<<14 | 0x16<<7 | 0x1E, + 22350 - 19968: jis0208<<14 | 0x33<<7 | 0x0B, + 22351 - 19968: jis0208<<14 | 0x33<<7 | 0x0E, + 22352 - 19968: jis0208<<14 | 0x19<<7 | 0x20, + 22353 - 19968: jis0208<<14 | 0x18<<7 | 0x02, + 22354 - 19968: jis0212<<14 | 0x16<<7 | 0x1F, + 22361 - 19968: jis0208<<14 | 0x58<<7 | 0x39, + 22369 - 19968: jis0208<<14 | 0x33<<7 | 0x12, + 22370 - 19968: jis0212<<14 | 0x16<<7 | 0x20, + 22372 - 19968: jis0208<<14 | 0x19<<7 | 0x04, + 22373 - 19968: jis0208<<14 | 0x58<<7 | 0x3A, + 22374 - 19968: jis0208<<14 | 0x22<<7 | 0x12, + 22375 - 19968: jis0212<<14 | 0x16<<7 | 0x22, + 22376 - 19968: jis0212<<14 | 0x16<<7 | 0x23, + 22377 - 19968: jis0208<<14 | 0x33<<7 | 0x0F, + 22378 - 19968: jis0208<<14 | 0x23<<7 | 0x39, + 22379 - 19968: jis0212<<14 | 0x16<<7 | 0x24, + 22381 - 19968: jis0212<<14 | 0x16<<7 | 0x25, + 22382 - 19968: jis0212<<14 | 0x16<<7 | 0x26, + 22383 - 19968: jis0212<<14 | 0x16<<7 | 0x27, + 22384 - 19968: jis0212<<14 | 0x16<<7 | 0x28, + 22385 - 19968: jis0212<<14 | 0x16<<7 | 0x29, + 22387 - 19968: jis0212<<14 | 0x16<<7 | 0x2A, + 22388 - 19968: jis0212<<14 | 0x16<<7 | 0x2B, + 22389 - 19968: jis0212<<14 | 0x16<<7 | 0x2C, + 22391 - 19968: jis0212<<14 | 0x16<<7 | 0x2D, + 22393 - 19968: jis0212<<14 | 0x16<<7 | 0x2E, + 22394 - 19968: jis0212<<14 | 0x16<<7 | 0x2F, + 22395 - 19968: jis0212<<14 | 0x16<<7 | 0x30, + 22396 - 19968: jis0212<<14 | 0x16<<7 | 0x31, + 22398 - 19968: jis0212<<14 | 0x16<<7 | 0x32, + 22399 - 19968: jis0208<<14 | 0x33<<7 | 0x13, + 22401 - 19968: jis0212<<14 | 0x16<<7 | 0x33, + 22402 - 19968: jis0208<<14 | 0x1E<<7 | 0x41, + 22403 - 19968: jis0212<<14 | 0x16<<7 | 0x34, + 22408 - 19968: jis0208<<14 | 0x33<<7 | 0x11, + 22409 - 19968: jis0208<<14 | 0x33<<7 | 0x14, + 22411 - 19968: jis0208<<14 | 0x16<<7 | 0x1E, + 22412 - 19968: jis0212<<14 | 0x16<<7 | 0x35, + 22419 - 19968: jis0208<<14 | 0x33<<7 | 0x15, + 22420 - 19968: jis0212<<14 | 0x16<<7 | 0x36, + 22421 - 19968: jis0212<<14 | 0x16<<7 | 0x3F, + 22423 - 19968: jis0212<<14 | 0x16<<7 | 0x37, + 22425 - 19968: jis0212<<14 | 0x16<<7 | 0x38, + 22426 - 19968: jis0212<<14 | 0x16<<7 | 0x39, + 22428 - 19968: jis0212<<14 | 0x16<<7 | 0x3A, + 22429 - 19968: jis0212<<14 | 0x16<<7 | 0x3B, + 22430 - 19968: jis0212<<14 | 0x16<<7 | 0x3C, + 22431 - 19968: jis0212<<14 | 0x16<<7 | 0x3D, + 22432 - 19968: jis0208<<14 | 0x33<<7 | 0x16, + 22433 - 19968: jis0212<<14 | 0x16<<7 | 0x3E, + 22434 - 19968: jis0208<<14 | 0x18<<7 | 0x03, + 22435 - 19968: jis0208<<14 | 0x12<<7 | 0x1F, + 22436 - 19968: jis0208<<14 | 0x33<<7 | 0x18, + 22439 - 19968: jis0212<<14 | 0x16<<7 | 0x40, + 22440 - 19968: jis0212<<14 | 0x16<<7 | 0x41, + 22441 - 19968: jis0212<<14 | 0x16<<7 | 0x42, + 22442 - 19968: jis0208<<14 | 0x33<<7 | 0x19, + 22444 - 19968: jis0208<<14 | 0x58<<7 | 0x3B, + 22448 - 19968: jis0208<<14 | 0x33<<7 | 0x1A, + 22451 - 19968: jis0208<<14 | 0x33<<7 | 0x17, + 22456 - 19968: jis0212<<14 | 0x16<<7 | 0x44, + 22461 - 19968: jis0212<<14 | 0x16<<7 | 0x45, + 22464 - 19968: jis0208<<14 | 0x33<<7 | 0x10, + 22467 - 19968: jis0208<<14 | 0x33<<7 | 0x1B, + 22470 - 19968: jis0208<<14 | 0x33<<7 | 0x1C, + 22471 - 19968: jis0208<<14 | 0x58<<7 | 0x3D, + 22472 - 19968: jis0208<<14 | 0x58<<7 | 0x3C, + 22475 - 19968: jis0208<<14 | 0x2A<<7 | 0x43, + 22476 - 19968: jis0212<<14 | 0x16<<7 | 0x48, + 22478 - 19968: jis0208<<14 | 0x1D<<7 | 0x4A, + 22479 - 19968: jis0212<<14 | 0x16<<7 | 0x49, + 22482 - 19968: jis0208<<14 | 0x33<<7 | 0x1E, + 22483 - 19968: jis0208<<14 | 0x33<<7 | 0x1F, + 22484 - 19968: jis0208<<14 | 0x33<<7 | 0x1D, + 22485 - 19968: jis0212<<14 | 0x16<<7 | 0x4A, + 22486 - 19968: jis0208<<14 | 0x33<<7 | 0x21, + 22492 - 19968: jis0208<<14 | 0x26<<7 | 0x17, + 22493 - 19968: jis0212<<14 | 0x16<<7 | 0x4B, + 22494 - 19968: jis0212<<14 | 0x16<<7 | 0x4C, + 22495 - 19968: jis0208<<14 | 0x0F<<7 | 0x47, + 22496 - 19968: jis0208<<14 | 0x28<<7 | 0x35, + 22497 - 19968: jis0212<<14 | 0x16<<7 | 0x5D, + 22499 - 19968: jis0208<<14 | 0x33<<7 | 0x22, + 22500 - 19968: jis0212<<14 | 0x16<<7 | 0x4D, + 22502 - 19968: jis0212<<14 | 0x16<<7 | 0x4E, + 22503 - 19968: jis0212<<14 | 0x16<<7 | 0x4F, + 22505 - 19968: jis0212<<14 | 0x16<<7 | 0x50, + 22509 - 19968: jis0212<<14 | 0x16<<7 | 0x51, + 22512 - 19968: jis0212<<14 | 0x16<<7 | 0x52, + 22516 - 19968: jis0208<<14 | 0x1D<<7 | 0x5C, + 22517 - 19968: jis0212<<14 | 0x16<<7 | 0x53, + 22518 - 19968: jis0212<<14 | 0x16<<7 | 0x54, + 22519 - 19968: jis0208<<14 | 0x1B<<7 | 0x18, + 22520 - 19968: jis0212<<14 | 0x16<<7 | 0x55, + 22521 - 19968: jis0208<<14 | 0x26<<7 | 0x3C, + 22522 - 19968: jis0208<<14 | 0x13<<7 | 0x4F, + 22524 - 19968: jis0208<<14 | 0x19<<7 | 0x4A, + 22525 - 19968: jis0212<<14 | 0x16<<7 | 0x56, + 22526 - 19968: jis0212<<14 | 0x16<<7 | 0x57, + 22527 - 19968: jis0212<<14 | 0x16<<7 | 0x58, + 22528 - 19968: jis0208<<14 | 0x2A<<7 | 0x38, + 22530 - 19968: jis0208<<14 | 0x25<<7 | 0x11, + 22531 - 19968: jis0212<<14 | 0x16<<7 | 0x59, + 22532 - 19968: jis0212<<14 | 0x16<<7 | 0x5A, + 22533 - 19968: jis0208<<14 | 0x16<<7 | 0x57, + 22534 - 19968: jis0208<<14 | 0x21<<7 | 0x2E, + 22536 - 19968: jis0212<<14 | 0x16<<7 | 0x5B, + 22537 - 19968: jis0212<<14 | 0x16<<7 | 0x5C, + 22538 - 19968: jis0208<<14 | 0x33<<7 | 0x20, + 22539 - 19968: jis0208<<14 | 0x33<<7 | 0x23, + 22540 - 19968: jis0212<<14 | 0x17<<7 | 0x00, + 22541 - 19968: jis0212<<14 | 0x17<<7 | 0x01, + 22549 - 19968: jis0208<<14 | 0x21<<7 | 0x23, + 22553 - 19968: jis0208<<14 | 0x33<<7 | 0x24, + 22555 - 19968: jis0212<<14 | 0x17<<7 | 0x02, + 22557 - 19968: jis0208<<14 | 0x33<<7 | 0x25, + 22558 - 19968: jis0212<<14 | 0x17<<7 | 0x03, + 22559 - 19968: jis0212<<14 | 0x17<<7 | 0x04, + 22560 - 19968: jis0212<<14 | 0x17<<7 | 0x05, + 22561 - 19968: jis0208<<14 | 0x33<<7 | 0x27, + 22564 - 19968: jis0208<<14 | 0x23<<7 | 0x48, + 22566 - 19968: jis0212<<14 | 0x17<<7 | 0x06, + 22567 - 19968: jis0212<<14 | 0x17<<7 | 0x07, + 22570 - 19968: jis0208<<14 | 0x13<<7 | 0x0D, + 22573 - 19968: jis0212<<14 | 0x17<<7 | 0x08, + 22575 - 19968: jis0208<<14 | 0x53<<7 | 0x00, + 22576 - 19968: jis0208<<14 | 0x10<<7 | 0x40, + 22577 - 19968: jis0208<<14 | 0x29<<7 | 0x52, + 22578 - 19968: jis0212<<14 | 0x17<<7 | 0x09, + 22580 - 19968: jis0208<<14 | 0x1D<<7 | 0x4B, + 22581 - 19968: jis0208<<14 | 0x24<<7 | 0x27, + 22585 - 19968: jis0212<<14 | 0x17<<7 | 0x0A, + 22586 - 19968: jis0208<<14 | 0x19<<7 | 0x45, + 22589 - 19968: jis0208<<14 | 0x33<<7 | 0x2D, + 22591 - 19968: jis0212<<14 | 0x17<<7 | 0x0B, + 22592 - 19968: jis0208<<14 | 0x29<<7 | 0x1C, + 22593 - 19968: jis0208<<14 | 0x2D<<7 | 0x3C, + 22601 - 19968: jis0212<<14 | 0x17<<7 | 0x0C, + 22602 - 19968: jis0208<<14 | 0x11<<7 | 0x53, + 22603 - 19968: jis0208<<14 | 0x33<<7 | 0x29, + 22604 - 19968: jis0212<<14 | 0x17<<7 | 0x0D, + 22605 - 19968: jis0212<<14 | 0x17<<7 | 0x0E, + 22607 - 19968: jis0212<<14 | 0x17<<7 | 0x0F, + 22608 - 19968: jis0212<<14 | 0x17<<7 | 0x10, + 22609 - 19968: jis0208<<14 | 0x20<<7 | 0x19, + 22610 - 19968: jis0208<<14 | 0x33<<7 | 0x2C, + 22612 - 19968: jis0208<<14 | 0x24<<7 | 0x42, + 22613 - 19968: jis0212<<14 | 0x17<<7 | 0x11, + 22615 - 19968: jis0208<<14 | 0x24<<7 | 0x28, + 22616 - 19968: jis0208<<14 | 0x24<<7 | 0x43, + 22617 - 19968: jis0208<<14 | 0x27<<7 | 0x18, + 22618 - 19968: jis0208<<14 | 0x23<<7 | 0x2C, + 22622 - 19968: jis0208<<14 | 0x19<<7 | 0x28, + 22623 - 19968: jis0212<<14 | 0x17<<7 | 0x12, + 22625 - 19968: jis0212<<14 | 0x17<<7 | 0x13, + 22626 - 19968: jis0208<<14 | 0x33<<7 | 0x28, + 22628 - 19968: jis0212<<14 | 0x17<<7 | 0x14, + 22631 - 19968: jis0212<<14 | 0x17<<7 | 0x15, + 22632 - 19968: jis0212<<14 | 0x17<<7 | 0x16, + 22633 - 19968: jis0208<<14 | 0x10<<7 | 0x55, + 22635 - 19968: jis0208<<14 | 0x24<<7 | 0x15, + 22640 - 19968: jis0208<<14 | 0x33<<7 | 0x2A, + 22642 - 19968: jis0208<<14 | 0x33<<7 | 0x26, + 22645 - 19968: jis0208<<14 | 0x1E<<7 | 0x2F, + 22648 - 19968: jis0212<<14 | 0x17<<7 | 0x17, + 22649 - 19968: jis0208<<14 | 0x33<<7 | 0x2E, + 22652 - 19968: jis0212<<14 | 0x17<<7 | 0x18, + 22654 - 19968: jis0208<<14 | 0x1C<<7 | 0x2D, + 22655 - 19968: jis0212<<14 | 0x17<<7 | 0x19, + 22656 - 19968: jis0212<<14 | 0x17<<7 | 0x1A, + 22657 - 19968: jis0212<<14 | 0x17<<7 | 0x1B, + 22659 - 19968: jis0208<<14 | 0x15<<7 | 0x0C, + 22661 - 19968: jis0208<<14 | 0x33<<7 | 0x2F, + 22663 - 19968: jis0212<<14 | 0x17<<7 | 0x1C, + 22664 - 19968: jis0212<<14 | 0x17<<7 | 0x1D, + 22665 - 19968: jis0212<<14 | 0x17<<7 | 0x1E, + 22666 - 19968: jis0212<<14 | 0x17<<7 | 0x1F, + 22668 - 19968: jis0212<<14 | 0x17<<7 | 0x20, + 22669 - 19968: jis0212<<14 | 0x17<<7 | 0x21, + 22671 - 19968: jis0212<<14 | 0x17<<7 | 0x22, + 22672 - 19968: jis0212<<14 | 0x17<<7 | 0x23, + 22675 - 19968: jis0208<<14 | 0x29<<7 | 0x47, + 22676 - 19968: jis0212<<14 | 0x17<<7 | 0x24, + 22678 - 19968: jis0212<<14 | 0x17<<7 | 0x25, + 22679 - 19968: jis0208<<14 | 0x20<<7 | 0x5C, + 22684 - 19968: jis0208<<14 | 0x23<<7 | 0x25, + 22685 - 19968: jis0212<<14 | 0x17<<7 | 0x26, + 22686 - 19968: jis0208<<14 | 0x58<<7 | 0x40, + 22687 - 19968: jis0208<<14 | 0x33<<7 | 0x31, + 22688 - 19968: jis0212<<14 | 0x17<<7 | 0x27, + 22689 - 19968: jis0212<<14 | 0x17<<7 | 0x28, + 22690 - 19968: jis0212<<14 | 0x17<<7 | 0x29, + 22694 - 19968: jis0212<<14 | 0x17<<7 | 0x2A, + 22696 - 19968: jis0208<<14 | 0x2A<<7 | 0x2E, + 22697 - 19968: jis0212<<14 | 0x17<<7 | 0x2B, + 22699 - 19968: jis0208<<14 | 0x33<<7 | 0x32, + 22702 - 19968: jis0208<<14 | 0x33<<7 | 0x37, + 22705 - 19968: jis0212<<14 | 0x17<<7 | 0x2C, + 22706 - 19968: jis0208<<14 | 0x58<<7 | 0x41, + 22707 - 19968: jis0208<<14 | 0x29<<7 | 0x0E, + 22712 - 19968: jis0208<<14 | 0x33<<7 | 0x36, + 22713 - 19968: jis0208<<14 | 0x33<<7 | 0x30, + 22714 - 19968: jis0208<<14 | 0x33<<7 | 0x33, + 22715 - 19968: jis0208<<14 | 0x33<<7 | 0x35, + 22716 - 19968: jis0212<<14 | 0x17<<7 | 0x2F, + 22718 - 19968: jis0208<<14 | 0x19<<7 | 0x05, + 22721 - 19968: jis0208<<14 | 0x29<<7 | 0x28, + 22722 - 19968: jis0212<<14 | 0x17<<7 | 0x30, + 22724 - 19968: jis0212<<14 | 0x17<<7 | 0x2E, + 22725 - 19968: jis0208<<14 | 0x33<<7 | 0x38, + 22727 - 19968: jis0208<<14 | 0x22<<7 | 0x24, + 22728 - 19968: jis0212<<14 | 0x17<<7 | 0x31, + 22730 - 19968: jis0208<<14 | 0x11<<7 | 0x54, + 22732 - 19968: jis0208<<14 | 0x1D<<7 | 0x4C, + 22733 - 19968: jis0212<<14 | 0x17<<7 | 0x32, + 22734 - 19968: jis0212<<14 | 0x17<<7 | 0x33, + 22736 - 19968: jis0212<<14 | 0x17<<7 | 0x34, + 22737 - 19968: jis0208<<14 | 0x33<<7 | 0x3A, + 22738 - 19968: jis0212<<14 | 0x17<<7 | 0x35, + 22739 - 19968: jis0208<<14 | 0x33<<7 | 0x39, + 22740 - 19968: jis0212<<14 | 0x17<<7 | 0x36, + 22741 - 19968: jis0208<<14 | 0x18<<7 | 0x47, + 22742 - 19968: jis0212<<14 | 0x17<<7 | 0x37, + 22743 - 19968: jis0208<<14 | 0x33<<7 | 0x3B, + 22744 - 19968: jis0208<<14 | 0x33<<7 | 0x3D, + 22745 - 19968: jis0208<<14 | 0x33<<7 | 0x3C, + 22746 - 19968: jis0212<<14 | 0x17<<7 | 0x38, + 22748 - 19968: jis0208<<14 | 0x33<<7 | 0x3F, + 22749 - 19968: jis0212<<14 | 0x17<<7 | 0x39, + 22750 - 19968: jis0208<<14 | 0x33<<7 | 0x34, + 22751 - 19968: jis0208<<14 | 0x33<<7 | 0x41, + 22753 - 19968: jis0212<<14 | 0x17<<7 | 0x3A, + 22754 - 19968: jis0212<<14 | 0x17<<7 | 0x3B, + 22756 - 19968: jis0208<<14 | 0x33<<7 | 0x40, + 22757 - 19968: jis0208<<14 | 0x33<<7 | 0x3E, + 22761 - 19968: jis0212<<14 | 0x17<<7 | 0x3C, + 22763 - 19968: jis0208<<14 | 0x1A<<7 | 0x2D, + 22764 - 19968: jis0208<<14 | 0x1E<<7 | 0x30, + 22766 - 19968: jis0208<<14 | 0x20<<7 | 0x33, + 22767 - 19968: jis0208<<14 | 0x33<<7 | 0x42, + 22768 - 19968: jis0208<<14 | 0x1F<<7 | 0x1B, + 22769 - 19968: jis0208<<14 | 0x0F<<7 | 0x4C, + 22770 - 19968: jis0208<<14 | 0x26<<7 | 0x43, + 22771 - 19968: jis0212<<14 | 0x17<<7 | 0x3D, + 22775 - 19968: jis0208<<14 | 0x23<<7 | 0x3A, + 22777 - 19968: jis0208<<14 | 0x33<<7 | 0x44, + 22778 - 19968: jis0208<<14 | 0x33<<7 | 0x43, + 22779 - 19968: jis0208<<14 | 0x33<<7 | 0x45, + 22780 - 19968: jis0208<<14 | 0x33<<7 | 0x46, + 22781 - 19968: jis0208<<14 | 0x33<<7 | 0x47, + 22786 - 19968: jis0208<<14 | 0x33<<7 | 0x48, + 22789 - 19968: jis0212<<14 | 0x17<<7 | 0x3E, + 22790 - 19968: jis0212<<14 | 0x17<<7 | 0x3F, + 22793 - 19968: jis0208<<14 | 0x29<<7 | 0x30, + 22794 - 19968: jis0208<<14 | 0x33<<7 | 0x49, + 22795 - 19968: jis0208<<14 | 0x58<<7 | 0x42, + 22796 - 19968: jis0212<<14 | 0x17<<7 | 0x41, + 22799 - 19968: jis0208<<14 | 0x11<<7 | 0x25, + 22800 - 19968: jis0208<<14 | 0x33<<7 | 0x4A, + 22802 - 19968: jis0212<<14 | 0x17<<7 | 0x42, + 22803 - 19968: jis0212<<14 | 0x17<<7 | 0x43, + 22804 - 19968: jis0212<<14 | 0x17<<7 | 0x44, + 22805 - 19968: jis0208<<14 | 0x2C<<7 | 0x1B, + 22806 - 19968: jis0208<<14 | 0x12<<7 | 0x0F, + 22808 - 19968: jis0208<<14 | 0x31<<7 | 0x28, + 22809 - 19968: jis0208<<14 | 0x1C<<7 | 0x27, + 22810 - 19968: jis0208<<14 | 0x21<<7 | 0x1E, + 22811 - 19968: jis0208<<14 | 0x33<<7 | 0x4B, + 22812 - 19968: jis0208<<14 | 0x2B<<7 | 0x4A, + 22813 - 19968: jis0212<<14 | 0x17<<7 | 0x46, + 22817 - 19968: jis0212<<14 | 0x17<<7 | 0x47, + 22818 - 19968: jis0208<<14 | 0x2B<<7 | 0x13, + 22819 - 19968: jis0212<<14 | 0x17<<7 | 0x48, + 22820 - 19968: jis0212<<14 | 0x17<<7 | 0x49, + 22821 - 19968: jis0208<<14 | 0x33<<7 | 0x4D, + 22823 - 19968: jis0208<<14 | 0x21<<7 | 0x46, + 22824 - 19968: jis0212<<14 | 0x17<<7 | 0x4A, + 22825 - 19968: jis0208<<14 | 0x24<<7 | 0x16, + 22826 - 19968: jis0208<<14 | 0x21<<7 | 0x1F, + 22827 - 19968: jis0208<<14 | 0x28<<7 | 0x36, + 22828 - 19968: jis0208<<14 | 0x33<<7 | 0x4E, + 22829 - 19968: jis0208<<14 | 0x33<<7 | 0x4F, + 22830 - 19968: jis0208<<14 | 0x10<<7 | 0x5A, + 22831 - 19968: jis0212<<14 | 0x17<<7 | 0x4B, + 22832 - 19968: jis0212<<14 | 0x17<<7 | 0x4C, + 22833 - 19968: jis0208<<14 | 0x1B<<7 | 0x19, + 22834 - 19968: jis0208<<14 | 0x33<<7 | 0x50, + 22835 - 19968: jis0212<<14 | 0x17<<7 | 0x4D, + 22837 - 19968: jis0212<<14 | 0x17<<7 | 0x4E, + 22838 - 19968: jis0212<<14 | 0x17<<7 | 0x4F, + 22839 - 19968: jis0208<<14 | 0x0F<<7 | 0x2F, + 22840 - 19968: jis0208<<14 | 0x33<<7 | 0x51, + 22846 - 19968: jis0208<<14 | 0x33<<7 | 0x52, + 22847 - 19968: jis0212<<14 | 0x17<<7 | 0x50, + 22851 - 19968: jis0212<<14 | 0x17<<7 | 0x51, + 22852 - 19968: jis0208<<14 | 0x10<<7 | 0x41, + 22854 - 19968: jis0212<<14 | 0x17<<7 | 0x52, + 22855 - 19968: jis0208<<14 | 0x13<<7 | 0x50, + 22856 - 19968: jis0208<<14 | 0x25<<7 | 0x3F, + 22857 - 19968: jis0208<<14 | 0x29<<7 | 0x53, + 22862 - 19968: jis0208<<14 | 0x33<<7 | 0x56, + 22863 - 19968: jis0208<<14 | 0x20<<7 | 0x34, + 22864 - 19968: jis0208<<14 | 0x33<<7 | 0x55, + 22865 - 19968: jis0208<<14 | 0x16<<7 | 0x1F, + 22866 - 19968: jis0212<<14 | 0x17<<7 | 0x53, + 22867 - 19968: jis0208<<14 | 0x58<<7 | 0x43, + 22868 - 19968: jis0208<<14 | 0x2A<<7 | 0x3A, + 22869 - 19968: jis0208<<14 | 0x33<<7 | 0x54, + 22871 - 19968: jis0208<<14 | 0x24<<7 | 0x44, + 22872 - 19968: jis0208<<14 | 0x33<<7 | 0x58, + 22873 - 19968: jis0212<<14 | 0x17<<7 | 0x55, + 22874 - 19968: jis0208<<14 | 0x33<<7 | 0x57, + 22875 - 19968: jis0208<<14 | 0x58<<7 | 0x44, + 22877 - 19968: jis0208<<14 | 0x58<<7 | 0x45, + 22878 - 19968: jis0212<<14 | 0x17<<7 | 0x58, + 22879 - 19968: jis0212<<14 | 0x17<<7 | 0x59, + 22880 - 19968: jis0208<<14 | 0x33<<7 | 0x5A, + 22881 - 19968: jis0212<<14 | 0x17<<7 | 0x5A, + 22882 - 19968: jis0208<<14 | 0x33<<7 | 0x59, + 22883 - 19968: jis0208<<14 | 0x58<<7 | 0x46, + 22885 - 19968: jis0208<<14 | 0x10<<7 | 0x5B, + 22887 - 19968: jis0208<<14 | 0x33<<7 | 0x5B, + 22888 - 19968: jis0208<<14 | 0x1D<<7 | 0x08, + 22889 - 19968: jis0208<<14 | 0x33<<7 | 0x5D, + 22890 - 19968: jis0208<<14 | 0x22<<7 | 0x04, + 22891 - 19968: jis0212<<14 | 0x17<<7 | 0x5C, + 22892 - 19968: jis0208<<14 | 0x33<<7 | 0x5C, + 22893 - 19968: jis0212<<14 | 0x17<<7 | 0x5D, + 22894 - 19968: jis0208<<14 | 0x29<<7 | 0x12, + 22895 - 19968: jis0212<<14 | 0x18<<7 | 0x00, + 22898 - 19968: jis0212<<14 | 0x18<<7 | 0x01, + 22899 - 19968: jis0208<<14 | 0x1C<<7 | 0x56, + 22900 - 19968: jis0208<<14 | 0x24<<7 | 0x3A, + 22901 - 19968: jis0212<<14 | 0x18<<7 | 0x02, + 22902 - 19968: jis0212<<14 | 0x18<<7 | 0x03, + 22904 - 19968: jis0208<<14 | 0x34<<7 | 0x00, + 22905 - 19968: jis0212<<14 | 0x18<<7 | 0x04, + 22907 - 19968: jis0212<<14 | 0x18<<7 | 0x05, + 22908 - 19968: jis0212<<14 | 0x18<<7 | 0x06, + 22909 - 19968: jis0208<<14 | 0x18<<7 | 0x04, + 22913 - 19968: jis0208<<14 | 0x34<<7 | 0x01, + 22914 - 19968: jis0208<<14 | 0x26<<7 | 0x00, + 22915 - 19968: jis0208<<14 | 0x27<<7 | 0x3D, + 22916 - 19968: jis0208<<14 | 0x2B<<7 | 0x30, + 22922 - 19968: jis0208<<14 | 0x26<<7 | 0x04, + 22923 - 19968: jis0212<<14 | 0x18<<7 | 0x07, + 22924 - 19968: jis0212<<14 | 0x18<<7 | 0x08, + 22925 - 19968: jis0208<<14 | 0x34<<7 | 0x0A, + 22926 - 19968: jis0212<<14 | 0x18<<7 | 0x09, + 22930 - 19968: jis0212<<14 | 0x18<<7 | 0x0A, + 22931 - 19968: jis0208<<14 | 0x14<<7 | 0x17, + 22933 - 19968: jis0212<<14 | 0x18<<7 | 0x0B, + 22934 - 19968: jis0208<<14 | 0x2C<<7 | 0x24, + 22935 - 19968: jis0212<<14 | 0x18<<7 | 0x0C, + 22937 - 19968: jis0208<<14 | 0x2B<<7 | 0x0E, + 22939 - 19968: jis0208<<14 | 0x35<<7 | 0x0B, + 22941 - 19968: jis0208<<14 | 0x34<<7 | 0x02, + 22943 - 19968: jis0212<<14 | 0x18<<7 | 0x0D, + 22947 - 19968: jis0208<<14 | 0x34<<7 | 0x05, + 22948 - 19968: jis0208<<14 | 0x58<<7 | 0x47, + 22949 - 19968: jis0208<<14 | 0x21<<7 | 0x24, + 22951 - 19968: jis0212<<14 | 0x18<<7 | 0x0F, + 22952 - 19968: jis0208<<14 | 0x2A<<7 | 0x17, + 22956 - 19968: jis0208<<14 | 0x24<<7 | 0x29, + 22957 - 19968: jis0212<<14 | 0x18<<7 | 0x10, + 22958 - 19968: jis0212<<14 | 0x18<<7 | 0x11, + 22959 - 19968: jis0212<<14 | 0x18<<7 | 0x12, + 22960 - 19968: jis0212<<14 | 0x18<<7 | 0x13, + 22962 - 19968: jis0208<<14 | 0x34<<7 | 0x06, + 22963 - 19968: jis0212<<14 | 0x18<<7 | 0x14, + 22967 - 19968: jis0212<<14 | 0x18<<7 | 0x15, + 22969 - 19968: jis0208<<14 | 0x2A<<7 | 0x44, + 22970 - 19968: jis0208<<14 | 0x58<<7 | 0x48, + 22971 - 19968: jis0208<<14 | 0x19<<7 | 0x29, + 22972 - 19968: jis0212<<14 | 0x18<<7 | 0x17, + 22974 - 19968: jis0208<<14 | 0x1D<<7 | 0x09, + 22977 - 19968: jis0212<<14 | 0x18<<7 | 0x18, + 22979 - 19968: jis0212<<14 | 0x18<<7 | 0x19, + 22980 - 19968: jis0212<<14 | 0x18<<7 | 0x1A, + 22982 - 19968: jis0208<<14 | 0x34<<7 | 0x07, + 22984 - 19968: jis0212<<14 | 0x18<<7 | 0x1B, + 22985 - 19968: jis0208<<14 | 0x1A<<7 | 0x2F, + 22986 - 19968: jis0212<<14 | 0x18<<7 | 0x1C, + 22987 - 19968: jis0208<<14 | 0x1A<<7 | 0x2E, + 22989 - 19968: jis0212<<14 | 0x18<<7 | 0x1D, + 22992 - 19968: jis0208<<14 | 0x0F<<7 | 0x18, + 22993 - 19968: jis0208<<14 | 0x17<<7 | 0x27, + 22994 - 19968: jis0212<<14 | 0x18<<7 | 0x1E, + 22995 - 19968: jis0208<<14 | 0x1F<<7 | 0x0A, + 22996 - 19968: jis0208<<14 | 0x0F<<7 | 0x30, + 23001 - 19968: jis0208<<14 | 0x34<<7 | 0x0B, + 23002 - 19968: jis0208<<14 | 0x34<<7 | 0x0C, + 23004 - 19968: jis0208<<14 | 0x34<<7 | 0x09, + 23005 - 19968: jis0212<<14 | 0x18<<7 | 0x1F, + 23006 - 19968: jis0212<<14 | 0x18<<7 | 0x20, + 23007 - 19968: jis0212<<14 | 0x18<<7 | 0x21, + 23011 - 19968: jis0212<<14 | 0x18<<7 | 0x22, + 23012 - 19968: jis0212<<14 | 0x18<<7 | 0x23, + 23013 - 19968: jis0208<<14 | 0x10<<7 | 0x17, + 23014 - 19968: jis0208<<14 | 0x13<<7 | 0x0E, + 23015 - 19968: jis0212<<14 | 0x18<<7 | 0x24, + 23016 - 19968: jis0208<<14 | 0x34<<7 | 0x08, + 23018 - 19968: jis0208<<14 | 0x2B<<7 | 0x24, + 23019 - 19968: jis0208<<14 | 0x28<<7 | 0x10, + 23022 - 19968: jis0212<<14 | 0x18<<7 | 0x25, + 23023 - 19968: jis0212<<14 | 0x18<<7 | 0x26, + 23025 - 19968: jis0212<<14 | 0x18<<7 | 0x27, + 23026 - 19968: jis0212<<14 | 0x18<<7 | 0x28, + 23028 - 19968: jis0212<<14 | 0x18<<7 | 0x29, + 23030 - 19968: jis0208<<14 | 0x0F<<7 | 0x07, + 23031 - 19968: jis0212<<14 | 0x18<<7 | 0x2A, + 23035 - 19968: jis0208<<14 | 0x0F<<7 | 0x58, + 23039 - 19968: jis0208<<14 | 0x1A<<7 | 0x30, + 23040 - 19968: jis0212<<14 | 0x18<<7 | 0x2B, + 23041 - 19968: jis0208<<14 | 0x0F<<7 | 0x31, + 23043 - 19968: jis0208<<14 | 0x0F<<7 | 0x02, + 23044 - 19968: jis0212<<14 | 0x18<<7 | 0x2C, + 23049 - 19968: jis0208<<14 | 0x34<<7 | 0x11, + 23052 - 19968: jis0212<<14 | 0x18<<7 | 0x2D, + 23053 - 19968: jis0212<<14 | 0x18<<7 | 0x2E, + 23054 - 19968: jis0212<<14 | 0x18<<7 | 0x2F, + 23057 - 19968: jis0208<<14 | 0x34<<7 | 0x0F, + 23058 - 19968: jis0212<<14 | 0x18<<7 | 0x30, + 23059 - 19968: jis0212<<14 | 0x18<<7 | 0x31, + 23064 - 19968: jis0208<<14 | 0x2B<<7 | 0x1B, + 23066 - 19968: jis0208<<14 | 0x34<<7 | 0x12, + 23068 - 19968: jis0208<<14 | 0x34<<7 | 0x10, + 23070 - 19968: jis0212<<14 | 0x18<<7 | 0x32, + 23071 - 19968: jis0208<<14 | 0x34<<7 | 0x0E, + 23072 - 19968: jis0208<<14 | 0x1E<<7 | 0x10, + 23075 - 19968: jis0212<<14 | 0x18<<7 | 0x33, + 23076 - 19968: jis0212<<14 | 0x18<<7 | 0x34, + 23077 - 19968: jis0208<<14 | 0x34<<7 | 0x0D, + 23079 - 19968: jis0212<<14 | 0x18<<7 | 0x35, + 23080 - 19968: jis0212<<14 | 0x18<<7 | 0x36, + 23081 - 19968: jis0208<<14 | 0x29<<7 | 0x39, + 23082 - 19968: jis0212<<14 | 0x18<<7 | 0x37, + 23085 - 19968: jis0212<<14 | 0x18<<7 | 0x38, + 23087 - 19968: jis0208<<14 | 0x17<<7 | 0x43, + 23088 - 19968: jis0212<<14 | 0x18<<7 | 0x39, + 23093 - 19968: jis0208<<14 | 0x34<<7 | 0x16, + 23094 - 19968: jis0208<<14 | 0x34<<7 | 0x17, + 23100 - 19968: jis0208<<14 | 0x1D<<7 | 0x0A, + 23104 - 19968: jis0208<<14 | 0x34<<7 | 0x13, + 23105 - 19968: jis0208<<14 | 0x2E<<7 | 0x0B, + 23108 - 19968: jis0212<<14 | 0x18<<7 | 0x3A, + 23109 - 19968: jis0212<<14 | 0x18<<7 | 0x3B, + 23110 - 19968: jis0208<<14 | 0x26<<7 | 0x2B, + 23111 - 19968: jis0212<<14 | 0x18<<7 | 0x3C, + 23112 - 19968: jis0212<<14 | 0x18<<7 | 0x3D, + 23113 - 19968: jis0208<<14 | 0x34<<7 | 0x15, + 23116 - 19968: jis0212<<14 | 0x18<<7 | 0x3E, + 23120 - 19968: jis0212<<14 | 0x18<<7 | 0x3F, + 23125 - 19968: jis0212<<14 | 0x18<<7 | 0x40, + 23130 - 19968: jis0208<<14 | 0x19<<7 | 0x06, + 23134 - 19968: jis0212<<14 | 0x18<<7 | 0x41, + 23138 - 19968: jis0208<<14 | 0x34<<7 | 0x18, + 23139 - 19968: jis0212<<14 | 0x18<<7 | 0x42, + 23141 - 19968: jis0212<<14 | 0x18<<7 | 0x43, + 23142 - 19968: jis0208<<14 | 0x28<<7 | 0x37, + 23143 - 19968: jis0212<<14 | 0x18<<7 | 0x44, + 23146 - 19968: jis0208<<14 | 0x34<<7 | 0x19, + 23148 - 19968: jis0208<<14 | 0x34<<7 | 0x14, + 23149 - 19968: jis0212<<14 | 0x18<<7 | 0x45, + 23159 - 19968: jis0212<<14 | 0x18<<7 | 0x46, + 23162 - 19968: jis0212<<14 | 0x18<<7 | 0x47, + 23163 - 19968: jis0212<<14 | 0x18<<7 | 0x48, + 23166 - 19968: jis0212<<14 | 0x18<<7 | 0x49, + 23167 - 19968: jis0208<<14 | 0x2B<<7 | 0x1A, + 23179 - 19968: jis0212<<14 | 0x18<<7 | 0x4A, + 23184 - 19968: jis0212<<14 | 0x18<<7 | 0x4B, + 23186 - 19968: jis0208<<14 | 0x26<<7 | 0x3D, + 23187 - 19968: jis0212<<14 | 0x18<<7 | 0x4C, + 23190 - 19968: jis0212<<14 | 0x18<<7 | 0x4D, + 23193 - 19968: jis0212<<14 | 0x18<<7 | 0x4E, + 23194 - 19968: jis0208<<14 | 0x34<<7 | 0x1A, + 23195 - 19968: jis0208<<14 | 0x28<<7 | 0x11, + 23196 - 19968: jis0212<<14 | 0x18<<7 | 0x4F, + 23198 - 19968: jis0212<<14 | 0x18<<7 | 0x50, + 23199 - 19968: jis0212<<14 | 0x18<<7 | 0x51, + 23200 - 19968: jis0212<<14 | 0x18<<7 | 0x52, + 23202 - 19968: jis0212<<14 | 0x18<<7 | 0x53, + 23207 - 19968: jis0212<<14 | 0x18<<7 | 0x54, + 23212 - 19968: jis0212<<14 | 0x18<<7 | 0x55, + 23217 - 19968: jis0212<<14 | 0x18<<7 | 0x56, + 23218 - 19968: jis0212<<14 | 0x18<<7 | 0x57, + 23219 - 19968: jis0212<<14 | 0x18<<7 | 0x58, + 23221 - 19968: jis0212<<14 | 0x18<<7 | 0x59, + 23224 - 19968: jis0212<<14 | 0x18<<7 | 0x5A, + 23226 - 19968: jis0212<<14 | 0x18<<7 | 0x5B, + 23227 - 19968: jis0212<<14 | 0x18<<7 | 0x5C, + 23228 - 19968: jis0208<<14 | 0x34<<7 | 0x1B, + 23229 - 19968: jis0208<<14 | 0x34<<7 | 0x1F, + 23230 - 19968: jis0208<<14 | 0x34<<7 | 0x1C, + 23231 - 19968: jis0212<<14 | 0x18<<7 | 0x5D, + 23233 - 19968: jis0208<<14 | 0x11<<7 | 0x26, + 23234 - 19968: jis0208<<14 | 0x34<<7 | 0x1E, + 23236 - 19968: jis0212<<14 | 0x19<<7 | 0x00, + 23238 - 19968: jis0212<<14 | 0x19<<7 | 0x01, + 23240 - 19968: jis0212<<14 | 0x19<<7 | 0x02, + 23241 - 19968: jis0208<<14 | 0x1B<<7 | 0x1A, + 23243 - 19968: jis0208<<14 | 0x34<<7 | 0x1D, + 23244 - 19968: jis0208<<14 | 0x16<<7 | 0x58, + 23247 - 19968: jis0212<<14 | 0x19<<7 | 0x03, + 23248 - 19968: jis0208<<14 | 0x34<<7 | 0x2B, + 23254 - 19968: jis0208<<14 | 0x34<<7 | 0x24, + 23255 - 19968: jis0208<<14 | 0x34<<7 | 0x21, + 23258 - 19968: jis0212<<14 | 0x19<<7 | 0x04, + 23260 - 19968: jis0212<<14 | 0x19<<7 | 0x05, + 23264 - 19968: jis0212<<14 | 0x19<<7 | 0x06, + 23265 - 19968: jis0208<<14 | 0x22<<7 | 0x43, + 23267 - 19968: jis0208<<14 | 0x34<<7 | 0x20, + 23269 - 19968: jis0212<<14 | 0x19<<7 | 0x07, + 23270 - 19968: jis0208<<14 | 0x34<<7 | 0x22, + 23273 - 19968: jis0208<<14 | 0x34<<7 | 0x23, + 23274 - 19968: jis0212<<14 | 0x19<<7 | 0x08, + 23278 - 19968: jis0212<<14 | 0x19<<7 | 0x09, + 23285 - 19968: jis0212<<14 | 0x19<<7 | 0x0A, + 23286 - 19968: jis0212<<14 | 0x19<<7 | 0x0B, + 23290 - 19968: jis0208<<14 | 0x34<<7 | 0x25, + 23291 - 19968: jis0208<<14 | 0x34<<7 | 0x26, + 23293 - 19968: jis0212<<14 | 0x19<<7 | 0x0C, + 23296 - 19968: jis0212<<14 | 0x19<<7 | 0x0D, + 23297 - 19968: jis0212<<14 | 0x19<<7 | 0x0E, + 23304 - 19968: jis0212<<14 | 0x19<<7 | 0x0F, + 23305 - 19968: jis0208<<14 | 0x13<<7 | 0x51, + 23307 - 19968: jis0208<<14 | 0x34<<7 | 0x28, + 23308 - 19968: jis0208<<14 | 0x34<<7 | 0x27, + 23318 - 19968: jis0208<<14 | 0x34<<7 | 0x29, + 23319 - 19968: jis0212<<14 | 0x19<<7 | 0x10, + 23321 - 19968: jis0212<<14 | 0x19<<7 | 0x12, + 23323 - 19968: jis0212<<14 | 0x19<<7 | 0x13, + 23325 - 19968: jis0212<<14 | 0x19<<7 | 0x14, + 23329 - 19968: jis0212<<14 | 0x19<<7 | 0x15, + 23330 - 19968: jis0208<<14 | 0x1D<<7 | 0x4D, + 23333 - 19968: jis0212<<14 | 0x19<<7 | 0x16, + 23338 - 19968: jis0208<<14 | 0x34<<7 | 0x2C, + 23340 - 19968: jis0208<<14 | 0x23<<7 | 0x3B, + 23341 - 19968: jis0212<<14 | 0x19<<7 | 0x17, + 23344 - 19968: jis0208<<14 | 0x10<<7 | 0x24, + 23346 - 19968: jis0208<<14 | 0x34<<7 | 0x2A, + 23348 - 19968: jis0212<<14 | 0x19<<7 | 0x11, + 23350 - 19968: jis0208<<14 | 0x34<<7 | 0x2D, + 23352 - 19968: jis0212<<14 | 0x19<<7 | 0x18, + 23358 - 19968: jis0208<<14 | 0x34<<7 | 0x2E, + 23360 - 19968: jis0208<<14 | 0x34<<7 | 0x31, + 23361 - 19968: jis0212<<14 | 0x19<<7 | 0x19, + 23363 - 19968: jis0208<<14 | 0x34<<7 | 0x2F, + 23365 - 19968: jis0208<<14 | 0x34<<7 | 0x30, + 23371 - 19968: jis0212<<14 | 0x19<<7 | 0x1A, + 23372 - 19968: jis0212<<14 | 0x19<<7 | 0x1B, + 23376 - 19968: jis0208<<14 | 0x1A<<7 | 0x31, + 23377 - 19968: jis0208<<14 | 0x34<<7 | 0x32, + 23378 - 19968: jis0212<<14 | 0x19<<7 | 0x1C, + 23380 - 19968: jis0208<<14 | 0x18<<7 | 0x05, + 23381 - 19968: jis0208<<14 | 0x34<<7 | 0x33, + 23382 - 19968: jis0208<<14 | 0x58<<7 | 0x49, + 23383 - 19968: jis0208<<14 | 0x1A<<7 | 0x59, + 23384 - 19968: jis0208<<14 | 0x21<<7 | 0x17, + 23386 - 19968: jis0208<<14 | 0x34<<7 | 0x34, + 23387 - 19968: jis0208<<14 | 0x34<<7 | 0x35, + 23388 - 19968: jis0208<<14 | 0x1A<<7 | 0x39, + 23389 - 19968: jis0208<<14 | 0x18<<7 | 0x06, + 23390 - 19968: jis0212<<14 | 0x19<<7 | 0x1E, + 23391 - 19968: jis0208<<14 | 0x2B<<7 | 0x31, + 23395 - 19968: jis0208<<14 | 0x14<<7 | 0x07, + 23396 - 19968: jis0208<<14 | 0x17<<7 | 0x28, + 23397 - 19968: jis0208<<14 | 0x34<<7 | 0x36, + 23398 - 19968: jis0208<<14 | 0x12<<7 | 0x37, + 23400 - 19968: jis0212<<14 | 0x19<<7 | 0x1F, + 23401 - 19968: jis0208<<14 | 0x34<<7 | 0x37, + 23403 - 19968: jis0208<<14 | 0x21<<7 | 0x18, + 23406 - 19968: jis0212<<14 | 0x19<<7 | 0x20, + 23407 - 19968: jis0212<<14 | 0x19<<7 | 0x21, + 23408 - 19968: jis0208<<14 | 0x34<<7 | 0x38, + 23409 - 19968: jis0208<<14 | 0x35<<7 | 0x02, + 23411 - 19968: jis0208<<14 | 0x34<<7 | 0x39, + 23413 - 19968: jis0208<<14 | 0x34<<7 | 0x3A, + 23416 - 19968: jis0208<<14 | 0x34<<7 | 0x3B, + 23418 - 19968: jis0208<<14 | 0x34<<7 | 0x3D, + 23420 - 19968: jis0212<<14 | 0x19<<7 | 0x22, + 23421 - 19968: jis0212<<14 | 0x19<<7 | 0x23, + 23422 - 19968: jis0212<<14 | 0x19<<7 | 0x24, + 23423 - 19968: jis0212<<14 | 0x19<<7 | 0x25, + 23424 - 19968: jis0208<<14 | 0x34<<7 | 0x3E, + 23425 - 19968: jis0212<<14 | 0x19<<7 | 0x26, + 23427 - 19968: jis0208<<14 | 0x34<<7 | 0x3F, + 23428 - 19968: jis0212<<14 | 0x19<<7 | 0x27, + 23429 - 19968: jis0208<<14 | 0x21<<7 | 0x4F, + 23430 - 19968: jis0212<<14 | 0x19<<7 | 0x28, + 23431 - 19968: jis0208<<14 | 0x10<<7 | 0x06, + 23432 - 19968: jis0208<<14 | 0x1B<<7 | 0x48, + 23433 - 19968: jis0208<<14 | 0x0F<<7 | 0x21, + 23434 - 19968: jis0212<<14 | 0x19<<7 | 0x29, + 23435 - 19968: jis0208<<14 | 0x20<<7 | 0x36, + 23436 - 19968: jis0208<<14 | 0x13<<7 | 0x0F, + 23437 - 19968: jis0208<<14 | 0x1B<<7 | 0x14, + 23438 - 19968: jis0212<<14 | 0x19<<7 | 0x2A, + 23439 - 19968: jis0208<<14 | 0x18<<7 | 0x07, + 23440 - 19968: jis0212<<14 | 0x19<<7 | 0x2B, + 23441 - 19968: jis0212<<14 | 0x19<<7 | 0x2C, + 23443 - 19968: jis0212<<14 | 0x19<<7 | 0x2D, + 23444 - 19968: jis0212<<14 | 0x19<<7 | 0x2E, + 23445 - 19968: jis0208<<14 | 0x24<<7 | 0x45, + 23446 - 19968: jis0212<<14 | 0x19<<7 | 0x2F, + 23447 - 19968: jis0208<<14 | 0x1C<<7 | 0x00, + 23448 - 19968: jis0208<<14 | 0x13<<7 | 0x10, + 23449 - 19968: jis0208<<14 | 0x22<<7 | 0x47, + 23450 - 19968: jis0208<<14 | 0x23<<7 | 0x49, + 23451 - 19968: jis0208<<14 | 0x0F<<7 | 0x17, + 23452 - 19968: jis0208<<14 | 0x14<<7 | 0x18, + 23453 - 19968: jis0208<<14 | 0x29<<7 | 0x54, + 23455 - 19968: jis0208<<14 | 0x1B<<7 | 0x21, + 23458 - 19968: jis0208<<14 | 0x14<<7 | 0x31, + 23459 - 19968: jis0208<<14 | 0x1F<<7 | 0x4A, + 23460 - 19968: jis0208<<14 | 0x1B<<7 | 0x1B, + 23461 - 19968: jis0208<<14 | 0x2C<<7 | 0x07, + 23462 - 19968: jis0208<<14 | 0x34<<7 | 0x40, + 23464 - 19968: jis0212<<14 | 0x19<<7 | 0x30, + 23465 - 19968: jis0212<<14 | 0x19<<7 | 0x31, + 23468 - 19968: jis0212<<14 | 0x19<<7 | 0x32, + 23469 - 19968: jis0212<<14 | 0x19<<7 | 0x33, + 23470 - 19968: jis0208<<14 | 0x14<<7 | 0x3B, + 23471 - 19968: jis0212<<14 | 0x19<<7 | 0x34, + 23472 - 19968: jis0208<<14 | 0x19<<7 | 0x2A, + 23473 - 19968: jis0212<<14 | 0x19<<7 | 0x35, + 23474 - 19968: jis0212<<14 | 0x19<<7 | 0x36, + 23475 - 19968: jis0208<<14 | 0x12<<7 | 0x11, + 23476 - 19968: jis0208<<14 | 0x10<<7 | 0x42, + 23477 - 19968: jis0208<<14 | 0x1D<<7 | 0x0B, + 23478 - 19968: jis0208<<14 | 0x11<<7 | 0x27, + 23479 - 19968: jis0212<<14 | 0x19<<7 | 0x37, + 23480 - 19968: jis0208<<14 | 0x34<<7 | 0x41, + 23481 - 19968: jis0208<<14 | 0x2C<<7 | 0x25, + 23482 - 19968: jis0212<<14 | 0x19<<7 | 0x38, + 23484 - 19968: jis0212<<14 | 0x19<<7 | 0x39, + 23487 - 19968: jis0208<<14 | 0x1C<<7 | 0x28, + 23488 - 19968: jis0208<<14 | 0x58<<7 | 0x4A, + 23489 - 19968: jis0212<<14 | 0x19<<7 | 0x3B, + 23490 - 19968: jis0208<<14 | 0x1B<<7 | 0x43, + 23491 - 19968: jis0208<<14 | 0x34<<7 | 0x42, + 23492 - 19968: jis0208<<14 | 0x13<<7 | 0x52, + 23493 - 19968: jis0208<<14 | 0x25<<7 | 0x31, + 23494 - 19968: jis0208<<14 | 0x2B<<7 | 0x08, + 23495 - 19968: jis0208<<14 | 0x34<<7 | 0x43, + 23497 - 19968: jis0208<<14 | 0x34<<7 | 0x44, + 23500 - 19968: jis0208<<14 | 0x28<<7 | 0x38, + 23501 - 19968: jis0212<<14 | 0x19<<7 | 0x3C, + 23503 - 19968: jis0212<<14 | 0x19<<7 | 0x3D, + 23504 - 19968: jis0208<<14 | 0x34<<7 | 0x46, + 23506 - 19968: jis0208<<14 | 0x13<<7 | 0x07, + 23507 - 19968: jis0208<<14 | 0x15<<7 | 0x56, + 23508 - 19968: jis0208<<14 | 0x34<<7 | 0x45, + 23510 - 19968: jis0212<<14 | 0x19<<7 | 0x3E, + 23511 - 19968: jis0212<<14 | 0x19<<7 | 0x3F, + 23512 - 19968: jis0208<<14 | 0x58<<7 | 0x4C, + 23513 - 19968: jis0212<<14 | 0x19<<7 | 0x41, + 23514 - 19968: jis0212<<14 | 0x19<<7 | 0x42, + 23515 - 19968: jis0208<<14 | 0x13<<7 | 0x11, + 23517 - 19968: jis0208<<14 | 0x1E<<7 | 0x11, + 23518 - 19968: jis0208<<14 | 0x34<<7 | 0x4A, + 23519 - 19968: jis0208<<14 | 0x1A<<7 | 0x00, + 23520 - 19968: jis0212<<14 | 0x19<<7 | 0x43, + 23521 - 19968: jis0208<<14 | 0x11<<7 | 0x28, + 23522 - 19968: jis0208<<14 | 0x34<<7 | 0x49, + 23524 - 19968: jis0208<<14 | 0x34<<7 | 0x47, + 23525 - 19968: jis0208<<14 | 0x34<<7 | 0x4B, + 23526 - 19968: jis0208<<14 | 0x34<<7 | 0x48, + 23527 - 19968: jis0208<<14 | 0x26<<7 | 0x0A, + 23528 - 19968: jis0208<<14 | 0x3B<<7 | 0x2C, + 23529 - 19968: jis0208<<14 | 0x1E<<7 | 0x12, + 23531 - 19968: jis0208<<14 | 0x34<<7 | 0x4C, + 23532 - 19968: jis0208<<14 | 0x58<<7 | 0x4D, + 23534 - 19968: jis0208<<14 | 0x2D<<7 | 0x1F, + 23535 - 19968: jis0212<<14 | 0x19<<7 | 0x44, + 23536 - 19968: jis0208<<14 | 0x34<<7 | 0x4D, + 23537 - 19968: jis0212<<14 | 0x19<<7 | 0x45, + 23539 - 19968: jis0208<<14 | 0x34<<7 | 0x4F, + 23540 - 19968: jis0212<<14 | 0x19<<7 | 0x46, + 23541 - 19968: jis0208<<14 | 0x22<<7 | 0x5D, + 23542 - 19968: jis0208<<14 | 0x34<<7 | 0x4E, + 23544 - 19968: jis0208<<14 | 0x1F<<7 | 0x02, + 23546 - 19968: jis0208<<14 | 0x1A<<7 | 0x5A, + 23549 - 19968: jis0212<<14 | 0x19<<7 | 0x47, + 23550 - 19968: jis0208<<14 | 0x21<<7 | 0x2F, + 23551 - 19968: jis0208<<14 | 0x1B<<7 | 0x56, + 23553 - 19968: jis0208<<14 | 0x28<<7 | 0x54, + 23554 - 19968: jis0208<<14 | 0x1F<<7 | 0x4B, + 23556 - 19968: jis0208<<14 | 0x1B<<7 | 0x2C, + 23557 - 19968: jis0208<<14 | 0x34<<7 | 0x50, + 23558 - 19968: jis0208<<14 | 0x1D<<7 | 0x0C, + 23559 - 19968: jis0208<<14 | 0x34<<7 | 0x51, + 23560 - 19968: jis0208<<14 | 0x34<<7 | 0x52, + 23561 - 19968: jis0208<<14 | 0x0F<<7 | 0x32, + 23562 - 19968: jis0208<<14 | 0x21<<7 | 0x19, + 23563 - 19968: jis0208<<14 | 0x1E<<7 | 0x31, + 23564 - 19968: jis0212<<14 | 0x19<<7 | 0x48, + 23565 - 19968: jis0208<<14 | 0x34<<7 | 0x53, + 23566 - 19968: jis0208<<14 | 0x25<<7 | 0x12, + 23567 - 19968: jis0208<<14 | 0x1D<<7 | 0x0D, + 23569 - 19968: jis0208<<14 | 0x1D<<7 | 0x0E, + 23571 - 19968: jis0208<<14 | 0x34<<7 | 0x54, + 23574 - 19968: jis0208<<14 | 0x1F<<7 | 0x4C, + 23575 - 19968: jis0212<<14 | 0x19<<7 | 0x49, + 23578 - 19968: jis0208<<14 | 0x1D<<7 | 0x0F, + 23582 - 19968: jis0208<<14 | 0x58<<7 | 0x4E, + 23583 - 19968: jis0212<<14 | 0x19<<7 | 0x4B, + 23584 - 19968: jis0208<<14 | 0x34<<7 | 0x55, + 23586 - 19968: jis0208<<14 | 0x34<<7 | 0x56, + 23587 - 19968: jis0212<<14 | 0x19<<7 | 0x4C, + 23588 - 19968: jis0208<<14 | 0x2B<<7 | 0x3F, + 23590 - 19968: jis0212<<14 | 0x19<<7 | 0x4D, + 23592 - 19968: jis0208<<14 | 0x34<<7 | 0x57, + 23593 - 19968: jis0212<<14 | 0x19<<7 | 0x4E, + 23595 - 19968: jis0212<<14 | 0x19<<7 | 0x4F, + 23596 - 19968: jis0212<<14 | 0x19<<7 | 0x50, + 23597 - 19968: jis0208<<14 | 0x15<<7 | 0x25, + 23598 - 19968: jis0212<<14 | 0x19<<7 | 0x51, + 23600 - 19968: jis0212<<14 | 0x19<<7 | 0x52, + 23601 - 19968: jis0208<<14 | 0x1C<<7 | 0x01, + 23602 - 19968: jis0212<<14 | 0x19<<7 | 0x53, + 23605 - 19968: jis0212<<14 | 0x19<<7 | 0x54, + 23606 - 19968: jis0212<<14 | 0x19<<7 | 0x55, + 23608 - 19968: jis0208<<14 | 0x34<<7 | 0x58, + 23609 - 19968: jis0208<<14 | 0x34<<7 | 0x59, + 23610 - 19968: jis0208<<14 | 0x1B<<7 | 0x3B, + 23611 - 19968: jis0208<<14 | 0x1E<<7 | 0x0B, + 23612 - 19968: jis0208<<14 | 0x25<<7 | 0x53, + 23613 - 19968: jis0208<<14 | 0x1E<<7 | 0x33, + 23614 - 19968: jis0208<<14 | 0x27<<7 | 0x57, + 23615 - 19968: jis0208<<14 | 0x26<<7 | 0x01, + 23616 - 19968: jis0208<<14 | 0x15<<7 | 0x28, + 23617 - 19968: jis0208<<14 | 0x34<<7 | 0x5A, + 23621 - 19968: jis0208<<14 | 0x14<<7 | 0x4E, + 23622 - 19968: jis0208<<14 | 0x34<<7 | 0x5B, + 23624 - 19968: jis0208<<14 | 0x15<<7 | 0x5D, + 23626 - 19968: jis0208<<14 | 0x25<<7 | 0x2E, + 23627 - 19968: jis0208<<14 | 0x11<<7 | 0x0F, + 23629 - 19968: jis0208<<14 | 0x1A<<7 | 0x32, + 23630 - 19968: jis0208<<14 | 0x34<<7 | 0x5C, + 23631 - 19968: jis0208<<14 | 0x35<<7 | 0x01, + 23632 - 19968: jis0208<<14 | 0x35<<7 | 0x00, + 23633 - 19968: jis0208<<14 | 0x15<<7 | 0x5C, + 23635 - 19968: jis0208<<14 | 0x34<<7 | 0x5D, + 23637 - 19968: jis0208<<14 | 0x24<<7 | 0x17, + 23641 - 19968: jis0212<<14 | 0x19<<7 | 0x56, + 23642 - 19968: jis0212<<14 | 0x19<<7 | 0x57, + 23644 - 19968: jis0212<<14 | 0x19<<7 | 0x58, + 23646 - 19968: jis0208<<14 | 0x21<<7 | 0x0F, + 23648 - 19968: jis0208<<14 | 0x24<<7 | 0x2A, + 23649 - 19968: jis0208<<14 | 0x1B<<7 | 0x27, + 23650 - 19968: jis0212<<14 | 0x19<<7 | 0x59, + 23651 - 19968: jis0212<<14 | 0x19<<7 | 0x5A, + 23652 - 19968: jis0208<<14 | 0x20<<7 | 0x37, + 23653 - 19968: jis0208<<14 | 0x2C<<7 | 0x59, + 23655 - 19968: jis0212<<14 | 0x19<<7 | 0x5B, + 23656 - 19968: jis0212<<14 | 0x19<<7 | 0x5C, + 23657 - 19968: jis0212<<14 | 0x19<<7 | 0x5D, + 23660 - 19968: jis0208<<14 | 0x35<<7 | 0x03, + 23661 - 19968: jis0212<<14 | 0x1A<<7 | 0x00, + 23662 - 19968: jis0208<<14 | 0x35<<7 | 0x04, + 23663 - 19968: jis0208<<14 | 0x25<<7 | 0x35, + 23664 - 19968: jis0212<<14 | 0x1A<<7 | 0x01, + 23665 - 19968: jis0208<<14 | 0x1A<<7 | 0x12, + 23668 - 19968: jis0212<<14 | 0x1A<<7 | 0x02, + 23669 - 19968: jis0212<<14 | 0x1A<<7 | 0x03, + 23670 - 19968: jis0208<<14 | 0x35<<7 | 0x06, + 23673 - 19968: jis0208<<14 | 0x35<<7 | 0x07, + 23674 - 19968: jis0212<<14 | 0x1A<<7 | 0x04, + 23675 - 19968: jis0212<<14 | 0x1A<<7 | 0x05, + 23676 - 19968: jis0212<<14 | 0x1A<<7 | 0x06, + 23677 - 19968: jis0212<<14 | 0x1A<<7 | 0x07, + 23687 - 19968: jis0212<<14 | 0x1A<<7 | 0x08, + 23688 - 19968: jis0212<<14 | 0x1A<<7 | 0x09, + 23690 - 19968: jis0212<<14 | 0x1A<<7 | 0x0A, + 23692 - 19968: jis0208<<14 | 0x35<<7 | 0x08, + 23695 - 19968: jis0212<<14 | 0x1A<<7 | 0x0B, + 23696 - 19968: jis0208<<14 | 0x13<<7 | 0x53, + 23697 - 19968: jis0208<<14 | 0x35<<7 | 0x09, + 23698 - 19968: jis0212<<14 | 0x1A<<7 | 0x0C, + 23700 - 19968: jis0208<<14 | 0x35<<7 | 0x0A, + 23709 - 19968: jis0212<<14 | 0x1A<<7 | 0x0D, + 23711 - 19968: jis0212<<14 | 0x1A<<7 | 0x0E, + 23712 - 19968: jis0212<<14 | 0x1A<<7 | 0x0F, + 23713 - 19968: jis0208<<14 | 0x11<<7 | 0x0B, + 23714 - 19968: jis0212<<14 | 0x1A<<7 | 0x10, + 23715 - 19968: jis0212<<14 | 0x1A<<7 | 0x11, + 23718 - 19968: jis0208<<14 | 0x58<<7 | 0x4F, + 23720 - 19968: jis0208<<14 | 0x20<<7 | 0x1A, + 23721 - 19968: jis0208<<14 | 0x13<<7 | 0x43, + 23722 - 19968: jis0212<<14 | 0x1A<<7 | 0x13, + 23723 - 19968: jis0208<<14 | 0x35<<7 | 0x0C, + 23724 - 19968: jis0208<<14 | 0x2B<<7 | 0x07, + 23729 - 19968: jis0208<<14 | 0x21<<7 | 0x31, + 23730 - 19968: jis0212<<14 | 0x1A<<7 | 0x14, + 23731 - 19968: jis0208<<14 | 0x12<<7 | 0x38, + 23732 - 19968: jis0212<<14 | 0x1A<<7 | 0x15, + 23733 - 19968: jis0212<<14 | 0x1A<<7 | 0x16, + 23734 - 19968: jis0208<<14 | 0x35<<7 | 0x0E, + 23735 - 19968: jis0208<<14 | 0x35<<7 | 0x10, + 23736 - 19968: jis0208<<14 | 0x13<<7 | 0x3E, + 23738 - 19968: jis0208<<14 | 0x58<<7 | 0x50, + 23739 - 19968: jis0208<<14 | 0x35<<7 | 0x0D, + 23740 - 19968: jis0208<<14 | 0x35<<7 | 0x0F, + 23742 - 19968: jis0208<<14 | 0x35<<7 | 0x12, + 23749 - 19968: jis0208<<14 | 0x35<<7 | 0x11, + 23751 - 19968: jis0208<<14 | 0x35<<7 | 0x13, + 23753 - 19968: jis0212<<14 | 0x1A<<7 | 0x18, + 23755 - 19968: jis0212<<14 | 0x1A<<7 | 0x19, + 23762 - 19968: jis0212<<14 | 0x1A<<7 | 0x1A, + 23767 - 19968: jis0212<<14 | 0x1A<<7 | 0x1C, + 23769 - 19968: jis0208<<14 | 0x35<<7 | 0x14, + 23773 - 19968: jis0212<<14 | 0x1A<<7 | 0x1B, + 23776 - 19968: jis0208<<14 | 0x25<<7 | 0x1C, + 23777 - 19968: jis0208<<14 | 0x15<<7 | 0x0D, + 23784 - 19968: jis0208<<14 | 0x11<<7 | 0x44, + 23785 - 19968: jis0208<<14 | 0x35<<7 | 0x15, + 23786 - 19968: jis0208<<14 | 0x35<<7 | 0x1A, + 23789 - 19968: jis0208<<14 | 0x35<<7 | 0x18, + 23790 - 19968: jis0212<<14 | 0x1A<<7 | 0x1D, + 23791 - 19968: jis0208<<14 | 0x29<<7 | 0x56, + 23792 - 19968: jis0208<<14 | 0x29<<7 | 0x55, + 23793 - 19968: jis0212<<14 | 0x1A<<7 | 0x1E, + 23794 - 19968: jis0212<<14 | 0x1A<<7 | 0x1F, + 23796 - 19968: jis0212<<14 | 0x1A<<7 | 0x20, + 23797 - 19968: jis0208<<14 | 0x58<<7 | 0x51, + 23798 - 19968: jis0208<<14 | 0x24<<7 | 0x46, + 23802 - 19968: jis0208<<14 | 0x35<<7 | 0x17, + 23803 - 19968: jis0208<<14 | 0x1C<<7 | 0x33, + 23805 - 19968: jis0208<<14 | 0x35<<7 | 0x16, + 23809 - 19968: jis0212<<14 | 0x1A<<7 | 0x21, + 23814 - 19968: jis0212<<14 | 0x1A<<7 | 0x22, + 23815 - 19968: jis0208<<14 | 0x1E<<7 | 0x51, + 23819 - 19968: jis0208<<14 | 0x35<<7 | 0x1B, + 23821 - 19968: jis0212<<14 | 0x1A<<7 | 0x23, + 23822 - 19968: jis0208<<14 | 0x19<<7 | 0x49, + 23825 - 19968: jis0208<<14 | 0x35<<7 | 0x21, + 23826 - 19968: jis0212<<14 | 0x1A<<7 | 0x24, + 23828 - 19968: jis0208<<14 | 0x35<<7 | 0x22, + 23829 - 19968: jis0208<<14 | 0x35<<7 | 0x1C, + 23830 - 19968: jis0208<<14 | 0x12<<7 | 0x12, + 23831 - 19968: jis0208<<14 | 0x35<<7 | 0x1D, + 23832 - 19968: jis0208<<14 | 0x35<<7 | 0x26, + 23833 - 19968: jis0208<<14 | 0x35<<7 | 0x25, + 23834 - 19968: jis0208<<14 | 0x35<<7 | 0x24, + 23835 - 19968: jis0208<<14 | 0x35<<7 | 0x20, + 23839 - 19968: jis0208<<14 | 0x35<<7 | 0x1F, + 23842 - 19968: jis0208<<14 | 0x35<<7 | 0x23, + 23843 - 19968: jis0212<<14 | 0x1A<<7 | 0x26, + 23844 - 19968: jis0212<<14 | 0x1A<<7 | 0x27, + 23846 - 19968: jis0212<<14 | 0x1A<<7 | 0x28, + 23847 - 19968: jis0208<<14 | 0x58<<7 | 0x52, + 23849 - 19968: jis0208<<14 | 0x29<<7 | 0x57, + 23851 - 19968: jis0212<<14 | 0x1A<<7 | 0x25, + 23857 - 19968: jis0212<<14 | 0x1A<<7 | 0x2A, + 23860 - 19968: jis0212<<14 | 0x1A<<7 | 0x2B, + 23865 - 19968: jis0212<<14 | 0x1A<<7 | 0x2C, + 23869 - 19968: jis0212<<14 | 0x1A<<7 | 0x2D, + 23871 - 19968: jis0212<<14 | 0x1A<<7 | 0x2E, + 23874 - 19968: jis0208<<14 | 0x58<<7 | 0x55, + 23875 - 19968: jis0212<<14 | 0x1A<<7 | 0x30, + 23878 - 19968: jis0212<<14 | 0x1A<<7 | 0x31, + 23880 - 19968: jis0212<<14 | 0x1A<<7 | 0x32, + 23882 - 19968: jis0212<<14 | 0x1A<<7 | 0x36, + 23883 - 19968: jis0208<<14 | 0x35<<7 | 0x2A, + 23884 - 19968: jis0208<<14 | 0x35<<7 | 0x27, + 23886 - 19968: jis0208<<14 | 0x35<<7 | 0x29, + 23888 - 19968: jis0208<<14 | 0x2C<<7 | 0x51, + 23889 - 19968: jis0212<<14 | 0x1A<<7 | 0x34, + 23890 - 19968: jis0208<<14 | 0x35<<7 | 0x28, + 23891 - 19968: jis0208<<14 | 0x58<<7 | 0x53, + 23893 - 19968: jis0212<<14 | 0x1A<<7 | 0x33, + 23897 - 19968: jis0212<<14 | 0x1A<<7 | 0x35, + 23900 - 19968: jis0208<<14 | 0x35<<7 | 0x1E, + 23903 - 19968: jis0212<<14 | 0x1A<<7 | 0x37, + 23904 - 19968: jis0212<<14 | 0x1A<<7 | 0x38, + 23905 - 19968: jis0212<<14 | 0x1A<<7 | 0x39, + 23906 - 19968: jis0212<<14 | 0x1A<<7 | 0x3A, + 23908 - 19968: jis0212<<14 | 0x1A<<7 | 0x3B, + 23913 - 19968: jis0208<<14 | 0x1E<<7 | 0x52, + 23914 - 19968: jis0212<<14 | 0x1A<<7 | 0x3C, + 23916 - 19968: jis0208<<14 | 0x35<<7 | 0x2B, + 23917 - 19968: jis0208<<14 | 0x58<<7 | 0x56, + 23919 - 19968: jis0208<<14 | 0x19<<7 | 0x16, + 23920 - 19968: jis0212<<14 | 0x1A<<7 | 0x3E, + 23923 - 19968: jis0208<<14 | 0x35<<7 | 0x2C, + 23926 - 19968: jis0208<<14 | 0x35<<7 | 0x2D, + 23929 - 19968: jis0212<<14 | 0x1A<<7 | 0x3F, + 23930 - 19968: jis0212<<14 | 0x1A<<7 | 0x40, + 23934 - 19968: jis0212<<14 | 0x1A<<7 | 0x41, + 23935 - 19968: jis0212<<14 | 0x1A<<7 | 0x42, + 23937 - 19968: jis0212<<14 | 0x1A<<7 | 0x43, + 23938 - 19968: jis0208<<14 | 0x35<<7 | 0x30, + 23939 - 19968: jis0212<<14 | 0x1A<<7 | 0x44, + 23940 - 19968: jis0208<<14 | 0x35<<7 | 0x2F, + 23943 - 19968: jis0208<<14 | 0x35<<7 | 0x2E, + 23944 - 19968: jis0212<<14 | 0x1A<<7 | 0x45, + 23946 - 19968: jis0212<<14 | 0x1A<<7 | 0x46, + 23947 - 19968: jis0208<<14 | 0x24<<7 | 0x47, + 23948 - 19968: jis0208<<14 | 0x35<<7 | 0x19, + 23952 - 19968: jis0208<<14 | 0x35<<7 | 0x36, + 23954 - 19968: jis0212<<14 | 0x1A<<7 | 0x47, + 23955 - 19968: jis0212<<14 | 0x1A<<7 | 0x48, + 23956 - 19968: jis0212<<14 | 0x1A<<7 | 0x49, + 23957 - 19968: jis0212<<14 | 0x1A<<7 | 0x4A, + 23961 - 19968: jis0212<<14 | 0x1A<<7 | 0x4B, + 23963 - 19968: jis0212<<14 | 0x1A<<7 | 0x4C, + 23965 - 19968: jis0208<<14 | 0x35<<7 | 0x32, + 23967 - 19968: jis0212<<14 | 0x1A<<7 | 0x4D, + 23968 - 19968: jis0212<<14 | 0x1A<<7 | 0x4E, + 23970 - 19968: jis0208<<14 | 0x35<<7 | 0x31, + 23975 - 19968: jis0212<<14 | 0x1A<<7 | 0x4F, + 23979 - 19968: jis0212<<14 | 0x1A<<7 | 0x50, + 23980 - 19968: jis0208<<14 | 0x35<<7 | 0x33, + 23982 - 19968: jis0208<<14 | 0x35<<7 | 0x34, + 23984 - 19968: jis0212<<14 | 0x1A<<7 | 0x51, + 23986 - 19968: jis0212<<14 | 0x45<<7 | 0x53, + 23988 - 19968: jis0212<<14 | 0x1A<<7 | 0x52, + 23991 - 19968: jis0208<<14 | 0x35<<7 | 0x37, + 23992 - 19968: jis0208<<14 | 0x58<<7 | 0x57, + 23993 - 19968: jis0208<<14 | 0x58<<7 | 0x58, + 23994 - 19968: jis0208<<14 | 0x2D<<7 | 0x45, + 23996 - 19968: jis0208<<14 | 0x35<<7 | 0x38, + 23997 - 19968: jis0208<<14 | 0x35<<7 | 0x35, + 24003 - 19968: jis0212<<14 | 0x1A<<7 | 0x55, + 24007 - 19968: jis0212<<14 | 0x1A<<7 | 0x56, + 24009 - 19968: jis0208<<14 | 0x35<<7 | 0x39, + 24011 - 19968: jis0212<<14 | 0x1A<<7 | 0x57, + 24012 - 19968: jis0208<<14 | 0x13<<7 | 0x3F, + 24013 - 19968: jis0208<<14 | 0x35<<7 | 0x3A, + 24014 - 19968: jis0212<<14 | 0x1A<<7 | 0x59, + 24016 - 19968: jis0208<<14 | 0x58<<7 | 0x59, + 24018 - 19968: jis0208<<14 | 0x35<<7 | 0x3C, + 24019 - 19968: jis0208<<14 | 0x35<<7 | 0x3B, + 24022 - 19968: jis0208<<14 | 0x35<<7 | 0x3D, + 24024 - 19968: jis0212<<14 | 0x1A<<7 | 0x5A, + 24025 - 19968: jis0212<<14 | 0x1A<<7 | 0x5B, + 24027 - 19968: jis0208<<14 | 0x35<<7 | 0x3E, + 24029 - 19968: jis0208<<14 | 0x1F<<7 | 0x4D, + 24030 - 19968: jis0208<<14 | 0x1C<<7 | 0x02, + 24032 - 19968: jis0212<<14 | 0x1A<<7 | 0x5C, + 24033 - 19968: jis0208<<14 | 0x1C<<7 | 0x43, + 24035 - 19968: jis0208<<14 | 0x20<<7 | 0x42, + 24036 - 19968: jis0212<<14 | 0x1A<<7 | 0x5D, + 24037 - 19968: jis0208<<14 | 0x18<<7 | 0x08, + 24038 - 19968: jis0208<<14 | 0x19<<7 | 0x17, + 24039 - 19968: jis0208<<14 | 0x18<<7 | 0x09, + 24040 - 19968: jis0208<<14 | 0x14<<7 | 0x4F, + 24041 - 19968: jis0212<<14 | 0x1B<<7 | 0x00, + 24043 - 19968: jis0208<<14 | 0x35<<7 | 0x3F, + 24046 - 19968: jis0208<<14 | 0x19<<7 | 0x18, + 24049 - 19968: jis0208<<14 | 0x17<<7 | 0x29, + 24050 - 19968: jis0208<<14 | 0x35<<7 | 0x40, + 24051 - 19968: jis0208<<14 | 0x2B<<7 | 0x05, + 24052 - 19968: jis0208<<14 | 0x26<<7 | 0x22, + 24053 - 19968: jis0208<<14 | 0x35<<7 | 0x41, + 24055 - 19968: jis0208<<14 | 0x18<<7 | 0x0A, + 24056 - 19968: jis0212<<14 | 0x1B<<7 | 0x01, + 24057 - 19968: jis0212<<14 | 0x1B<<7 | 0x02, + 24059 - 19968: jis0208<<14 | 0x13<<7 | 0x0B, + 24061 - 19968: jis0208<<14 | 0x22<<7 | 0x06, + 24062 - 19968: jis0208<<14 | 0x15<<7 | 0x31, + 24064 - 19968: jis0212<<14 | 0x1B<<7 | 0x03, + 24066 - 19968: jis0208<<14 | 0x1A<<7 | 0x33, + 24067 - 19968: jis0208<<14 | 0x28<<7 | 0x3A, + 24070 - 19968: jis0208<<14 | 0x27<<7 | 0x20, + 24071 - 19968: jis0212<<14 | 0x1B<<7 | 0x04, + 24075 - 19968: jis0208<<14 | 0x35<<7 | 0x42, + 24076 - 19968: jis0208<<14 | 0x13<<7 | 0x54, + 24077 - 19968: jis0212<<14 | 0x1B<<7 | 0x05, + 24081 - 19968: jis0208<<14 | 0x35<<7 | 0x45, + 24082 - 19968: jis0212<<14 | 0x1B<<7 | 0x06, + 24084 - 19968: jis0212<<14 | 0x1B<<7 | 0x07, + 24085 - 19968: jis0212<<14 | 0x1B<<7 | 0x08, + 24086 - 19968: jis0208<<14 | 0x23<<7 | 0x00, + 24088 - 19968: jis0212<<14 | 0x1B<<7 | 0x09, + 24089 - 19968: jis0208<<14 | 0x35<<7 | 0x44, + 24090 - 19968: jis0208<<14 | 0x35<<7 | 0x43, + 24091 - 19968: jis0208<<14 | 0x35<<7 | 0x46, + 24093 - 19968: jis0208<<14 | 0x23<<7 | 0x4A, + 24095 - 19968: jis0212<<14 | 0x1B<<7 | 0x0A, + 24096 - 19968: jis0212<<14 | 0x1B<<7 | 0x0B, + 24101 - 19968: jis0208<<14 | 0x1E<<7 | 0x42, + 24104 - 19968: jis0212<<14 | 0x1B<<7 | 0x0D, + 24107 - 19968: jis0208<<14 | 0x1A<<7 | 0x34, + 24109 - 19968: jis0208<<14 | 0x1F<<7 | 0x29, + 24110 - 19968: jis0212<<14 | 0x1B<<7 | 0x0C, + 24111 - 19968: jis0208<<14 | 0x21<<7 | 0x32, + 24112 - 19968: jis0208<<14 | 0x14<<7 | 0x01, + 24114 - 19968: jis0212<<14 | 0x1B<<7 | 0x0E, + 24115 - 19968: jis0208<<14 | 0x23<<7 | 0x01, + 24117 - 19968: jis0212<<14 | 0x1B<<7 | 0x0F, + 24118 - 19968: jis0208<<14 | 0x35<<7 | 0x47, + 24119 - 19968: jis0208<<14 | 0x35<<7 | 0x48, + 24120 - 19968: jis0208<<14 | 0x1D<<7 | 0x4E, + 24125 - 19968: jis0208<<14 | 0x2A<<7 | 0x18, + 24126 - 19968: jis0212<<14 | 0x1B<<7 | 0x10, + 24128 - 19968: jis0208<<14 | 0x35<<7 | 0x4B, + 24131 - 19968: jis0208<<14 | 0x35<<7 | 0x4A, + 24132 - 19968: jis0208<<14 | 0x35<<7 | 0x49, + 24133 - 19968: jis0208<<14 | 0x28<<7 | 0x5C, + 24135 - 19968: jis0208<<14 | 0x35<<7 | 0x52, + 24137 - 19968: jis0212<<14 | 0x1B<<7 | 0x13, + 24139 - 19968: jis0212<<14 | 0x1B<<7 | 0x11, + 24140 - 19968: jis0208<<14 | 0x2A<<7 | 0x39, + 24142 - 19968: jis0208<<14 | 0x35<<7 | 0x4C, + 24144 - 19968: jis0212<<14 | 0x1B<<7 | 0x12, + 24145 - 19968: jis0212<<14 | 0x1B<<7 | 0x14, + 24148 - 19968: jis0208<<14 | 0x35<<7 | 0x4E, + 24149 - 19968: jis0208<<14 | 0x2A<<7 | 0x4A, + 24150 - 19968: jis0212<<14 | 0x1B<<7 | 0x15, + 24151 - 19968: jis0208<<14 | 0x35<<7 | 0x4D, + 24152 - 19968: jis0212<<14 | 0x1B<<7 | 0x16, + 24155 - 19968: jis0212<<14 | 0x1B<<7 | 0x17, + 24156 - 19968: jis0212<<14 | 0x1B<<7 | 0x18, + 24158 - 19968: jis0212<<14 | 0x1B<<7 | 0x19, + 24159 - 19968: jis0208<<14 | 0x35<<7 | 0x4F, + 24161 - 19968: jis0208<<14 | 0x27<<7 | 0x07, + 24162 - 19968: jis0208<<14 | 0x35<<7 | 0x50, + 24163 - 19968: jis0208<<14 | 0x29<<7 | 0x1D, + 24164 - 19968: jis0208<<14 | 0x35<<7 | 0x51, + 24168 - 19968: jis0212<<14 | 0x1B<<7 | 0x1A, + 24170 - 19968: jis0212<<14 | 0x1B<<7 | 0x1B, + 24171 - 19968: jis0212<<14 | 0x1B<<7 | 0x1C, + 24172 - 19968: jis0212<<14 | 0x1B<<7 | 0x1D, + 24173 - 19968: jis0212<<14 | 0x1B<<7 | 0x1E, + 24174 - 19968: jis0212<<14 | 0x1B<<7 | 0x1F, + 24176 - 19968: jis0212<<14 | 0x1B<<7 | 0x20, + 24178 - 19968: jis0208<<14 | 0x13<<7 | 0x12, + 24179 - 19968: jis0208<<14 | 0x29<<7 | 0x1E, + 24180 - 19968: jis0208<<14 | 0x26<<7 | 0x0E, + 24181 - 19968: jis0208<<14 | 0x35<<7 | 0x53, + 24182 - 19968: jis0208<<14 | 0x35<<7 | 0x54, + 24184 - 19968: jis0208<<14 | 0x18<<7 | 0x0B, + 24185 - 19968: jis0208<<14 | 0x13<<7 | 0x13, + 24186 - 19968: jis0208<<14 | 0x35<<7 | 0x55, + 24187 - 19968: jis0208<<14 | 0x17<<7 | 0x17, + 24188 - 19968: jis0208<<14 | 0x2C<<7 | 0x23, + 24189 - 19968: jis0208<<14 | 0x2C<<7 | 0x08, + 24190 - 19968: jis0208<<14 | 0x13<<7 | 0x55, + 24191 - 19968: jis0208<<14 | 0x35<<7 | 0x57, + 24192 - 19968: jis0212<<14 | 0x1B<<7 | 0x21, + 24193 - 19968: jis0208<<14 | 0x23<<7 | 0x02, + 24195 - 19968: jis0208<<14 | 0x18<<7 | 0x0C, + 24196 - 19968: jis0208<<14 | 0x1D<<7 | 0x10, + 24199 - 19968: jis0208<<14 | 0x27<<7 | 0x3E, + 24202 - 19968: jis0208<<14 | 0x1D<<7 | 0x11, + 24203 - 19968: jis0212<<14 | 0x1B<<7 | 0x22, + 24206 - 19968: jis0212<<14 | 0x1B<<7 | 0x23, + 24207 - 19968: jis0208<<14 | 0x1C<<7 | 0x57, + 24213 - 19968: jis0208<<14 | 0x23<<7 | 0x4B, + 24214 - 19968: jis0208<<14 | 0x29<<7 | 0x58, + 24215 - 19968: jis0208<<14 | 0x24<<7 | 0x18, + 24218 - 19968: jis0208<<14 | 0x18<<7 | 0x0D, + 24220 - 19968: jis0208<<14 | 0x28<<7 | 0x3B, + 24224 - 19968: jis0208<<14 | 0x35<<7 | 0x58, + 24226 - 19968: jis0212<<14 | 0x1B<<7 | 0x24, + 24228 - 19968: jis0212<<14 | 0x1B<<7 | 0x25, + 24229 - 19968: jis0212<<14 | 0x1B<<7 | 0x26, + 24230 - 19968: jis0208<<14 | 0x24<<7 | 0x38, + 24231 - 19968: jis0208<<14 | 0x19<<7 | 0x21, + 24232 - 19968: jis0212<<14 | 0x1B<<7 | 0x27, + 24234 - 19968: jis0212<<14 | 0x1B<<7 | 0x28, + 24235 - 19968: jis0208<<14 | 0x17<<7 | 0x2A, + 24236 - 19968: jis0212<<14 | 0x1B<<7 | 0x29, + 24237 - 19968: jis0208<<14 | 0x23<<7 | 0x4C, + 24241 - 19968: jis0212<<14 | 0x1B<<7 | 0x2A, + 24243 - 19968: jis0212<<14 | 0x1B<<7 | 0x2B, + 24245 - 19968: jis0208<<14 | 0x0F<<7 | 0x22, + 24246 - 19968: jis0208<<14 | 0x1C<<7 | 0x4D, + 24247 - 19968: jis0208<<14 | 0x18<<7 | 0x0E, + 24248 - 19968: jis0208<<14 | 0x2C<<7 | 0x26, + 24253 - 19968: jis0212<<14 | 0x1B<<7 | 0x2C, + 24254 - 19968: jis0212<<14 | 0x1B<<7 | 0x2D, + 24255 - 19968: jis0212<<14 | 0x1B<<7 | 0x2E, + 24257 - 19968: jis0208<<14 | 0x35<<7 | 0x59, + 24258 - 19968: jis0208<<14 | 0x35<<7 | 0x5A, + 24259 - 19968: jis0208<<14 | 0x26<<7 | 0x30, + 24262 - 19968: jis0212<<14 | 0x1B<<7 | 0x2F, + 24264 - 19968: jis0208<<14 | 0x35<<7 | 0x5B, + 24265 - 19968: jis0208<<14 | 0x2D<<7 | 0x56, + 24266 - 19968: jis0208<<14 | 0x2E<<7 | 0x0C, + 24267 - 19968: jis0212<<14 | 0x1B<<7 | 0x31, + 24268 - 19968: jis0212<<14 | 0x1B<<7 | 0x30, + 24270 - 19968: jis0212<<14 | 0x1B<<7 | 0x32, + 24271 - 19968: jis0208<<14 | 0x35<<7 | 0x5D, + 24272 - 19968: jis0208<<14 | 0x35<<7 | 0x5C, + 24273 - 19968: jis0212<<14 | 0x1B<<7 | 0x33, + 24274 - 19968: jis0212<<14 | 0x1B<<7 | 0x34, + 24275 - 19968: jis0208<<14 | 0x12<<7 | 0x26, + 24276 - 19968: jis0212<<14 | 0x1B<<7 | 0x35, + 24277 - 19968: jis0212<<14 | 0x1B<<7 | 0x36, + 24278 - 19968: jis0208<<14 | 0x36<<7 | 0x00, + 24282 - 19968: jis0208<<14 | 0x36<<7 | 0x03, + 24283 - 19968: jis0208<<14 | 0x36<<7 | 0x04, + 24284 - 19968: jis0212<<14 | 0x1B<<7 | 0x37, + 24285 - 19968: jis0208<<14 | 0x36<<7 | 0x02, + 24286 - 19968: jis0212<<14 | 0x1B<<7 | 0x38, + 24287 - 19968: jis0208<<14 | 0x28<<7 | 0x1F, + 24288 - 19968: jis0208<<14 | 0x1D<<7 | 0x12, + 24289 - 19968: jis0208<<14 | 0x36<<7 | 0x06, + 24290 - 19968: jis0208<<14 | 0x36<<7 | 0x05, + 24291 - 19968: jis0208<<14 | 0x36<<7 | 0x01, + 24293 - 19968: jis0212<<14 | 0x1B<<7 | 0x39, + 24296 - 19968: jis0208<<14 | 0x36<<7 | 0x07, + 24297 - 19968: jis0208<<14 | 0x36<<7 | 0x08, + 24299 - 19968: jis0212<<14 | 0x1B<<7 | 0x3A, + 24300 - 19968: jis0208<<14 | 0x36<<7 | 0x09, + 24304 - 19968: jis0208<<14 | 0x36<<7 | 0x0C, + 24305 - 19968: jis0208<<14 | 0x36<<7 | 0x0A, + 24307 - 19968: jis0208<<14 | 0x36<<7 | 0x0B, + 24308 - 19968: jis0208<<14 | 0x36<<7 | 0x0D, + 24310 - 19968: jis0208<<14 | 0x10<<7 | 0x43, + 24311 - 19968: jis0208<<14 | 0x23<<7 | 0x4D, + 24312 - 19968: jis0208<<14 | 0x36<<7 | 0x0E, + 24314 - 19968: jis0208<<14 | 0x16<<7 | 0x59, + 24315 - 19968: jis0208<<14 | 0x11<<7 | 0x55, + 24316 - 19968: jis0208<<14 | 0x26<<7 | 0x15, + 24318 - 19968: jis0208<<14 | 0x36<<7 | 0x0F, + 24319 - 19968: jis0208<<14 | 0x25<<7 | 0x5A, + 24321 - 19968: jis0208<<14 | 0x29<<7 | 0x3A, + 24322 - 19968: jis0212<<14 | 0x1B<<7 | 0x3B, + 24323 - 19968: jis0208<<14 | 0x36<<7 | 0x10, + 24324 - 19968: jis0208<<14 | 0x2E<<7 | 0x0D, + 24326 - 19968: jis0212<<14 | 0x1B<<7 | 0x3C, + 24327 - 19968: jis0212<<14 | 0x1B<<7 | 0x3D, + 24328 - 19968: jis0212<<14 | 0x1B<<7 | 0x3E, + 24329 - 19968: jis0208<<14 | 0x36<<7 | 0x11, + 24330 - 19968: jis0208<<14 | 0x29<<7 | 0x1F, + 24331 - 19968: jis0208<<14 | 0x36<<7 | 0x14, + 24332 - 19968: jis0208<<14 | 0x2F<<7 | 0x00, + 24333 - 19968: jis0208<<14 | 0x2F<<7 | 0x10, + 24334 - 19968: jis0212<<14 | 0x1B<<7 | 0x3F, + 24335 - 19968: jis0208<<14 | 0x1B<<7 | 0x0F, + 24336 - 19968: jis0208<<14 | 0x25<<7 | 0x54, + 24337 - 19968: jis0208<<14 | 0x36<<7 | 0x15, + 24339 - 19968: jis0208<<14 | 0x14<<7 | 0x3C, + 24340 - 19968: jis0208<<14 | 0x23<<7 | 0x03, + 24341 - 19968: jis0208<<14 | 0x0F<<7 | 0x59, + 24342 - 19968: jis0208<<14 | 0x36<<7 | 0x16, + 24343 - 19968: jis0208<<14 | 0x29<<7 | 0x05, + 24344 - 19968: jis0208<<14 | 0x18<<7 | 0x0F, + 24345 - 19968: jis0212<<14 | 0x1B<<7 | 0x40, + 24347 - 19968: jis0208<<14 | 0x22<<7 | 0x2F, + 24348 - 19968: jis0212<<14 | 0x1B<<7 | 0x41, + 24349 - 19968: jis0212<<14 | 0x1B<<7 | 0x42, + 24351 - 19968: jis0208<<14 | 0x23<<7 | 0x4E, + 24353 - 19968: jis0208<<14 | 0x58<<7 | 0x5A, + 24354 - 19968: jis0212<<14 | 0x1B<<7 | 0x44, + 24355 - 19968: jis0212<<14 | 0x1B<<7 | 0x45, + 24356 - 19968: jis0212<<14 | 0x1B<<7 | 0x46, + 24357 - 19968: jis0208<<14 | 0x2B<<7 | 0x4E, + 24358 - 19968: jis0208<<14 | 0x17<<7 | 0x18, + 24359 - 19968: jis0208<<14 | 0x17<<7 | 0x2B, + 24360 - 19968: jis0212<<14 | 0x1B<<7 | 0x47, + 24361 - 19968: jis0208<<14 | 0x36<<7 | 0x17, + 24363 - 19968: jis0212<<14 | 0x1B<<7 | 0x48, + 24364 - 19968: jis0212<<14 | 0x1B<<7 | 0x49, + 24365 - 19968: jis0208<<14 | 0x36<<7 | 0x18, + 24366 - 19968: jis0212<<14 | 0x1B<<7 | 0x4A, + 24367 - 19968: jis0208<<14 | 0x36<<7 | 0x1E, + 24368 - 19968: jis0212<<14 | 0x1B<<7 | 0x4B, + 24369 - 19968: jis0208<<14 | 0x1B<<7 | 0x44, + 24372 - 19968: jis0208<<14 | 0x58<<7 | 0x5B, + 24373 - 19968: jis0208<<14 | 0x23<<7 | 0x04, + 24374 - 19968: jis0212<<14 | 0x1B<<7 | 0x4D, + 24375 - 19968: jis0208<<14 | 0x15<<7 | 0x0E, + 24376 - 19968: jis0208<<14 | 0x36<<7 | 0x19, + 24379 - 19968: jis0212<<14 | 0x1B<<7 | 0x4E, + 24380 - 19968: jis0208<<14 | 0x28<<7 | 0x0A, + 24381 - 19968: jis0212<<14 | 0x1B<<7 | 0x4F, + 24382 - 19968: jis0208<<14 | 0x22<<7 | 0x25, + 24383 - 19968: jis0212<<14 | 0x1B<<7 | 0x50, + 24384 - 19968: jis0212<<14 | 0x1B<<7 | 0x51, + 24385 - 19968: jis0208<<14 | 0x36<<7 | 0x1A, + 24388 - 19968: jis0212<<14 | 0x1B<<7 | 0x52, + 24389 - 19968: jis0208<<14 | 0x58<<7 | 0x0B, + 24391 - 19968: jis0212<<14 | 0x1B<<7 | 0x54, + 24392 - 19968: jis0208<<14 | 0x36<<7 | 0x1B, + 24394 - 19968: jis0208<<14 | 0x15<<7 | 0x0F, + 24396 - 19968: jis0208<<14 | 0x36<<7 | 0x1C, + 24397 - 19968: jis0212<<14 | 0x1B<<7 | 0x55, + 24398 - 19968: jis0208<<14 | 0x36<<7 | 0x1D, + 24400 - 19968: jis0212<<14 | 0x1B<<7 | 0x56, + 24401 - 19968: jis0208<<14 | 0x36<<7 | 0x1F, + 24403 - 19968: jis0208<<14 | 0x24<<7 | 0x55, + 24404 - 19968: jis0212<<14 | 0x1B<<7 | 0x57, + 24406 - 19968: jis0208<<14 | 0x36<<7 | 0x20, + 24407 - 19968: jis0208<<14 | 0x36<<7 | 0x21, + 24408 - 19968: jis0212<<14 | 0x1B<<7 | 0x58, + 24409 - 19968: jis0208<<14 | 0x36<<7 | 0x22, + 24411 - 19968: jis0212<<14 | 0x1B<<7 | 0x59, + 24412 - 19968: jis0208<<14 | 0x36<<7 | 0x13, + 24413 - 19968: jis0208<<14 | 0x36<<7 | 0x12, + 24416 - 19968: jis0212<<14 | 0x1B<<7 | 0x5A, + 24417 - 19968: jis0208<<14 | 0x36<<7 | 0x23, + 24418 - 19968: jis0208<<14 | 0x16<<7 | 0x20, + 24419 - 19968: jis0212<<14 | 0x1B<<7 | 0x5B, + 24420 - 19968: jis0212<<14 | 0x1B<<7 | 0x5C, + 24422 - 19968: jis0208<<14 | 0x28<<7 | 0x06, + 24423 - 19968: jis0208<<14 | 0x58<<7 | 0x5C, + 24425 - 19968: jis0208<<14 | 0x19<<7 | 0x2B, + 24426 - 19968: jis0208<<14 | 0x28<<7 | 0x16, + 24427 - 19968: jis0208<<14 | 0x23<<7 | 0x05, + 24428 - 19968: jis0208<<14 | 0x28<<7 | 0x2A, + 24429 - 19968: jis0208<<14 | 0x36<<7 | 0x24, + 24431 - 19968: jis0212<<14 | 0x1C<<7 | 0x00, + 24432 - 19968: jis0208<<14 | 0x1D<<7 | 0x13, + 24433 - 19968: jis0208<<14 | 0x10<<7 | 0x25, + 24434 - 19968: jis0212<<14 | 0x1C<<7 | 0x01, + 24435 - 19968: jis0208<<14 | 0x36<<7 | 0x25, + 24436 - 19968: jis0212<<14 | 0x1C<<7 | 0x02, + 24437 - 19968: jis0212<<14 | 0x1C<<7 | 0x03, + 24439 - 19968: jis0208<<14 | 0x36<<7 | 0x26, + 24440 - 19968: jis0212<<14 | 0x1C<<7 | 0x04, + 24441 - 19968: jis0208<<14 | 0x2B<<7 | 0x51, + 24442 - 19968: jis0212<<14 | 0x1C<<7 | 0x05, + 24444 - 19968: jis0208<<14 | 0x27<<7 | 0x3F, + 24445 - 19968: jis0212<<14 | 0x1C<<7 | 0x06, + 24446 - 19968: jis0212<<14 | 0x1C<<7 | 0x07, + 24447 - 19968: jis0208<<14 | 0x36<<7 | 0x29, + 24448 - 19968: jis0208<<14 | 0x10<<7 | 0x5C, + 24449 - 19968: jis0208<<14 | 0x1F<<7 | 0x0B, + 24450 - 19968: jis0208<<14 | 0x36<<7 | 0x28, + 24451 - 19968: jis0208<<14 | 0x36<<7 | 0x27, + 24452 - 19968: jis0208<<14 | 0x16<<7 | 0x21, + 24453 - 19968: jis0208<<14 | 0x21<<7 | 0x33, + 24455 - 19968: jis0208<<14 | 0x36<<7 | 0x2D, + 24456 - 19968: jis0208<<14 | 0x36<<7 | 0x2B, + 24457 - 19968: jis0212<<14 | 0x1C<<7 | 0x08, + 24458 - 19968: jis0208<<14 | 0x36<<7 | 0x2A, + 24459 - 19968: jis0208<<14 | 0x2D<<7 | 0x06, + 24460 - 19968: jis0208<<14 | 0x17<<7 | 0x44, + 24461 - 19968: jis0212<<14 | 0x1C<<7 | 0x09, + 24463 - 19968: jis0212<<14 | 0x1C<<7 | 0x0A, + 24464 - 19968: jis0208<<14 | 0x1C<<7 | 0x58, + 24465 - 19968: jis0208<<14 | 0x36<<7 | 0x2C, + 24466 - 19968: jis0208<<14 | 0x24<<7 | 0x2B, + 24467 - 19968: jis0208<<14 | 0x1C<<7 | 0x1D, + 24470 - 19968: jis0212<<14 | 0x1C<<7 | 0x0B, + 24471 - 19968: jis0208<<14 | 0x25<<7 | 0x1F, + 24472 - 19968: jis0208<<14 | 0x36<<7 | 0x30, + 24473 - 19968: jis0208<<14 | 0x36<<7 | 0x2F, + 24476 - 19968: jis0212<<14 | 0x1C<<7 | 0x0C, + 24477 - 19968: jis0212<<14 | 0x1C<<7 | 0x0D, + 24478 - 19968: jis0208<<14 | 0x36<<7 | 0x2E, + 24480 - 19968: jis0208<<14 | 0x36<<7 | 0x31, + 24481 - 19968: jis0208<<14 | 0x17<<7 | 0x45, + 24482 - 19968: jis0212<<14 | 0x1C<<7 | 0x0E, + 24484 - 19968: jis0212<<14 | 0x1C<<7 | 0x11, + 24487 - 19968: jis0212<<14 | 0x1C<<7 | 0x0F, + 24488 - 19968: jis0208<<14 | 0x36<<7 | 0x32, + 24489 - 19968: jis0208<<14 | 0x28<<7 | 0x5B, + 24490 - 19968: jis0208<<14 | 0x1C<<7 | 0x3A, + 24491 - 19968: jis0212<<14 | 0x1C<<7 | 0x10, + 24492 - 19968: jis0212<<14 | 0x1C<<7 | 0x12, + 24493 - 19968: jis0208<<14 | 0x36<<7 | 0x33, + 24494 - 19968: jis0208<<14 | 0x27<<7 | 0x58, + 24495 - 19968: jis0212<<14 | 0x1C<<7 | 0x13, + 24496 - 19968: jis0212<<14 | 0x1C<<7 | 0x14, + 24497 - 19968: jis0212<<14 | 0x1C<<7 | 0x15, + 24499 - 19968: jis0208<<14 | 0x25<<7 | 0x20, + 24500 - 19968: jis0208<<14 | 0x23<<7 | 0x06, + 24503 - 19968: jis0208<<14 | 0x58<<7 | 0x5D, + 24504 - 19968: jis0212<<14 | 0x1C<<7 | 0x16, + 24505 - 19968: jis0208<<14 | 0x24<<7 | 0x0F, + 24508 - 19968: jis0208<<14 | 0x36<<7 | 0x34, + 24509 - 19968: jis0208<<14 | 0x14<<7 | 0x0A, + 24515 - 19968: jis0208<<14 | 0x1E<<7 | 0x13, + 24516 - 19968: jis0212<<14 | 0x1C<<7 | 0x17, + 24517 - 19968: jis0208<<14 | 0x28<<7 | 0x0B, + 24519 - 19968: jis0212<<14 | 0x1C<<7 | 0x18, + 24520 - 19968: jis0212<<14 | 0x1C<<7 | 0x19, + 24521 - 19968: jis0212<<14 | 0x1C<<7 | 0x1A, + 24523 - 19968: jis0212<<14 | 0x1C<<7 | 0x1B, + 24524 - 19968: jis0208<<14 | 0x13<<7 | 0x56, + 24525 - 19968: jis0208<<14 | 0x26<<7 | 0x05, + 24528 - 19968: jis0212<<14 | 0x1C<<7 | 0x1C, + 24529 - 19968: jis0212<<14 | 0x1C<<7 | 0x1D, + 24530 - 19968: jis0212<<14 | 0x1C<<7 | 0x1E, + 24531 - 19968: jis0212<<14 | 0x1C<<7 | 0x1F, + 24532 - 19968: jis0212<<14 | 0x1C<<7 | 0x20, + 24534 - 19968: jis0208<<14 | 0x36<<7 | 0x35, + 24535 - 19968: jis0208<<14 | 0x1A<<7 | 0x35, + 24536 - 19968: jis0208<<14 | 0x2A<<7 | 0x19, + 24537 - 19968: jis0208<<14 | 0x2A<<7 | 0x1A, + 24540 - 19968: jis0208<<14 | 0x10<<7 | 0x5D, + 24541 - 19968: jis0208<<14 | 0x36<<7 | 0x3A, + 24542 - 19968: jis0208<<14 | 0x59<<7 | 0x00, + 24544 - 19968: jis0208<<14 | 0x22<<7 | 0x48, + 24545 - 19968: jis0212<<14 | 0x1C<<7 | 0x22, + 24546 - 19968: jis0212<<14 | 0x1C<<7 | 0x23, + 24548 - 19968: jis0208<<14 | 0x36<<7 | 0x37, + 24552 - 19968: jis0212<<14 | 0x1C<<7 | 0x24, + 24553 - 19968: jis0212<<14 | 0x1C<<7 | 0x25, + 24554 - 19968: jis0212<<14 | 0x1C<<7 | 0x26, + 24555 - 19968: jis0208<<14 | 0x11<<7 | 0x56, + 24556 - 19968: jis0212<<14 | 0x1C<<7 | 0x27, + 24557 - 19968: jis0212<<14 | 0x1C<<7 | 0x28, + 24558 - 19968: jis0212<<14 | 0x1C<<7 | 0x29, + 24559 - 19968: jis0212<<14 | 0x1C<<7 | 0x2A, + 24560 - 19968: jis0208<<14 | 0x37<<7 | 0x0C, + 24561 - 19968: jis0208<<14 | 0x36<<7 | 0x39, + 24562 - 19968: jis0212<<14 | 0x1C<<7 | 0x2B, + 24563 - 19968: jis0212<<14 | 0x1C<<7 | 0x2C, + 24565 - 19968: jis0208<<14 | 0x26<<7 | 0x0F, + 24566 - 19968: jis0212<<14 | 0x1C<<7 | 0x2D, + 24568 - 19968: jis0208<<14 | 0x36<<7 | 0x38, + 24570 - 19968: jis0212<<14 | 0x1C<<7 | 0x2E, + 24571 - 19968: jis0208<<14 | 0x36<<7 | 0x36, + 24572 - 19968: jis0212<<14 | 0x1C<<7 | 0x2F, + 24573 - 19968: jis0208<<14 | 0x18<<7 | 0x59, + 24575 - 19968: jis0208<<14 | 0x36<<7 | 0x3C, + 24583 - 19968: jis0212<<14 | 0x1C<<7 | 0x30, + 24586 - 19968: jis0212<<14 | 0x1C<<7 | 0x31, + 24589 - 19968: jis0212<<14 | 0x1C<<7 | 0x32, + 24590 - 19968: jis0208<<14 | 0x36<<7 | 0x42, + 24591 - 19968: jis0208<<14 | 0x36<<7 | 0x48, + 24592 - 19968: jis0208<<14 | 0x36<<7 | 0x40, + 24594 - 19968: jis0208<<14 | 0x24<<7 | 0x3B, + 24595 - 19968: jis0212<<14 | 0x1C<<7 | 0x33, + 24596 - 19968: jis0212<<14 | 0x1C<<7 | 0x34, + 24597 - 19968: jis0208<<14 | 0x36<<7 | 0x45, + 24598 - 19968: jis0208<<14 | 0x28<<7 | 0x3C, + 24599 - 19968: jis0212<<14 | 0x1C<<7 | 0x35, + 24600 - 19968: jis0212<<14 | 0x1C<<7 | 0x36, + 24601 - 19968: jis0208<<14 | 0x36<<7 | 0x3F, + 24602 - 19968: jis0212<<14 | 0x1C<<7 | 0x37, + 24603 - 19968: jis0208<<14 | 0x36<<7 | 0x44, + 24604 - 19968: jis0208<<14 | 0x2D<<7 | 0x46, + 24605 - 19968: jis0208<<14 | 0x1A<<7 | 0x36, + 24607 - 19968: jis0212<<14 | 0x1C<<7 | 0x38, + 24608 - 19968: jis0208<<14 | 0x21<<7 | 0x34, + 24609 - 19968: jis0208<<14 | 0x36<<7 | 0x3D, + 24612 - 19968: jis0212<<14 | 0x1C<<7 | 0x39, + 24613 - 19968: jis0208<<14 | 0x14<<7 | 0x3D, + 24614 - 19968: jis0208<<14 | 0x36<<7 | 0x47, + 24615 - 19968: jis0208<<14 | 0x1F<<7 | 0x0C, + 24616 - 19968: jis0208<<14 | 0x10<<7 | 0x44, + 24617 - 19968: jis0208<<14 | 0x36<<7 | 0x41, + 24618 - 19968: jis0208<<14 | 0x11<<7 | 0x57, + 24619 - 19968: jis0208<<14 | 0x36<<7 | 0x46, + 24621 - 19968: jis0212<<14 | 0x1C<<7 | 0x3A, + 24623 - 19968: jis0208<<14 | 0x15<<7 | 0x10, + 24625 - 19968: jis0208<<14 | 0x36<<7 | 0x43, + 24627 - 19968: jis0212<<14 | 0x1C<<7 | 0x3B, + 24629 - 19968: jis0212<<14 | 0x1C<<7 | 0x3C, + 24634 - 19968: jis0208<<14 | 0x36<<7 | 0x49, + 24640 - 19968: jis0212<<14 | 0x1C<<7 | 0x3D, + 24641 - 19968: jis0208<<14 | 0x36<<7 | 0x4B, + 24642 - 19968: jis0208<<14 | 0x36<<7 | 0x55, + 24643 - 19968: jis0208<<14 | 0x36<<7 | 0x53, + 24646 - 19968: jis0208<<14 | 0x36<<7 | 0x50, + 24647 - 19968: jis0212<<14 | 0x1C<<7 | 0x3E, + 24648 - 19968: jis0212<<14 | 0x1C<<7 | 0x3F, + 24649 - 19968: jis0212<<14 | 0x1C<<7 | 0x40, + 24650 - 19968: jis0208<<14 | 0x36<<7 | 0x4F, + 24651 - 19968: jis0208<<14 | 0x2D<<7 | 0x57, + 24652 - 19968: jis0212<<14 | 0x1C<<7 | 0x41, + 24653 - 19968: jis0208<<14 | 0x36<<7 | 0x51, + 24656 - 19968: jis0208<<14 | 0x15<<7 | 0x11, + 24657 - 19968: jis0212<<14 | 0x1C<<7 | 0x42, + 24658 - 19968: jis0208<<14 | 0x18<<7 | 0x10, + 24660 - 19968: jis0212<<14 | 0x1C<<7 | 0x43, + 24661 - 19968: jis0208<<14 | 0x1C<<7 | 0x59, + 24662 - 19968: jis0212<<14 | 0x1C<<7 | 0x44, + 24663 - 19968: jis0212<<14 | 0x1C<<7 | 0x45, + 24665 - 19968: jis0208<<14 | 0x36<<7 | 0x58, + 24666 - 19968: jis0208<<14 | 0x36<<7 | 0x4A, + 24669 - 19968: jis0208<<14 | 0x59<<7 | 0x01, + 24671 - 19968: jis0208<<14 | 0x36<<7 | 0x4E, + 24672 - 19968: jis0208<<14 | 0x36<<7 | 0x3E, + 24673 - 19968: jis0212<<14 | 0x1C<<7 | 0x47, + 24674 - 19968: jis0208<<14 | 0x11<<7 | 0x59, + 24675 - 19968: jis0208<<14 | 0x36<<7 | 0x52, + 24676 - 19968: jis0208<<14 | 0x36<<7 | 0x54, + 24677 - 19968: jis0208<<14 | 0x22<<7 | 0x30, + 24679 - 19968: jis0212<<14 | 0x1C<<7 | 0x48, + 24680 - 19968: jis0208<<14 | 0x19<<7 | 0x07, + 24681 - 19968: jis0208<<14 | 0x11<<7 | 0x17, + 24682 - 19968: jis0208<<14 | 0x36<<7 | 0x4C, + 24683 - 19968: jis0208<<14 | 0x36<<7 | 0x57, + 24684 - 19968: jis0208<<14 | 0x36<<7 | 0x56, + 24685 - 19968: jis0208<<14 | 0x15<<7 | 0x12, + 24687 - 19968: jis0208<<14 | 0x21<<7 | 0x08, + 24688 - 19968: jis0208<<14 | 0x12<<7 | 0x45, + 24689 - 19968: jis0212<<14 | 0x1C<<7 | 0x49, + 24693 - 19968: jis0208<<14 | 0x16<<7 | 0x22, + 24695 - 19968: jis0208<<14 | 0x36<<7 | 0x4D, + 24702 - 19968: jis0212<<14 | 0x1C<<7 | 0x4A, + 24703 - 19968: jis0212<<14 | 0x1C<<7 | 0x4B, + 24705 - 19968: jis0208<<14 | 0x36<<7 | 0x59, + 24706 - 19968: jis0212<<14 | 0x1C<<7 | 0x4C, + 24707 - 19968: jis0208<<14 | 0x36<<7 | 0x5C, + 24708 - 19968: jis0208<<14 | 0x37<<7 | 0x00, + 24709 - 19968: jis0208<<14 | 0x59<<7 | 0x02, + 24710 - 19968: jis0212<<14 | 0x1C<<7 | 0x4D, + 24712 - 19968: jis0212<<14 | 0x1C<<7 | 0x4E, + 24713 - 19968: jis0208<<14 | 0x1B<<7 | 0x1C, + 24714 - 19968: jis0208<<14 | 0x59<<7 | 0x03, + 24715 - 19968: jis0208<<14 | 0x37<<7 | 0x06, + 24716 - 19968: jis0208<<14 | 0x23<<7 | 0x4F, + 24717 - 19968: jis0208<<14 | 0x36<<7 | 0x5A, + 24718 - 19968: jis0212<<14 | 0x1C<<7 | 0x50, + 24721 - 19968: jis0212<<14 | 0x1C<<7 | 0x51, + 24722 - 19968: jis0208<<14 | 0x37<<7 | 0x04, + 24723 - 19968: jis0212<<14 | 0x1C<<7 | 0x52, + 24724 - 19968: jis0208<<14 | 0x11<<7 | 0x58, + 24725 - 19968: jis0212<<14 | 0x1C<<7 | 0x53, + 24726 - 19968: jis0208<<14 | 0x37<<7 | 0x02, + 24727 - 19968: jis0208<<14 | 0x37<<7 | 0x03, + 24728 - 19968: jis0212<<14 | 0x1C<<7 | 0x54, + 24730 - 19968: jis0208<<14 | 0x36<<7 | 0x5D, + 24731 - 19968: jis0208<<14 | 0x37<<7 | 0x01, + 24733 - 19968: jis0212<<14 | 0x1C<<7 | 0x55, + 24734 - 19968: jis0212<<14 | 0x1C<<7 | 0x56, + 24735 - 19968: jis0208<<14 | 0x17<<7 | 0x46, + 24736 - 19968: jis0208<<14 | 0x2C<<7 | 0x09, + 24738 - 19968: jis0212<<14 | 0x1C<<7 | 0x57, + 24739 - 19968: jis0208<<14 | 0x13<<7 | 0x14, + 24740 - 19968: jis0212<<14 | 0x1C<<7 | 0x58, + 24741 - 19968: jis0212<<14 | 0x1C<<7 | 0x59, + 24742 - 19968: jis0208<<14 | 0x10<<7 | 0x38, + 24743 - 19968: jis0208<<14 | 0x37<<7 | 0x05, + 24744 - 19968: jis0212<<14 | 0x1C<<7 | 0x5A, + 24745 - 19968: jis0208<<14 | 0x26<<7 | 0x19, + 24746 - 19968: jis0208<<14 | 0x0F<<7 | 0x0C, + 24752 - 19968: jis0212<<14 | 0x1C<<7 | 0x5B, + 24753 - 19968: jis0212<<14 | 0x1C<<7 | 0x5C, + 24754 - 19968: jis0208<<14 | 0x27<<7 | 0x40, + 24755 - 19968: jis0208<<14 | 0x36<<7 | 0x3B, + 24756 - 19968: jis0208<<14 | 0x37<<7 | 0x0B, + 24757 - 19968: jis0208<<14 | 0x37<<7 | 0x0F, + 24758 - 19968: jis0208<<14 | 0x2B<<7 | 0x44, + 24759 - 19968: jis0212<<14 | 0x1C<<7 | 0x5D, + 24760 - 19968: jis0208<<14 | 0x37<<7 | 0x08, + 24763 - 19968: jis0212<<14 | 0x1D<<7 | 0x00, + 24764 - 19968: jis0208<<14 | 0x24<<7 | 0x48, + 24765 - 19968: jis0208<<14 | 0x37<<7 | 0x0D, + 24766 - 19968: jis0212<<14 | 0x1D<<7 | 0x01, + 24770 - 19968: jis0212<<14 | 0x1D<<7 | 0x02, + 24772 - 19968: jis0212<<14 | 0x1D<<7 | 0x03, + 24773 - 19968: jis0208<<14 | 0x1D<<7 | 0x4F, + 24774 - 19968: jis0208<<14 | 0x37<<7 | 0x0E, + 24775 - 19968: jis0208<<14 | 0x25<<7 | 0x36, + 24776 - 19968: jis0212<<14 | 0x1D<<7 | 0x04, + 24777 - 19968: jis0212<<14 | 0x1D<<7 | 0x05, + 24778 - 19968: jis0212<<14 | 0x1D<<7 | 0x06, + 24779 - 19968: jis0212<<14 | 0x1D<<7 | 0x07, + 24782 - 19968: jis0212<<14 | 0x1D<<7 | 0x08, + 24783 - 19968: jis0212<<14 | 0x1D<<7 | 0x09, + 24785 - 19968: jis0208<<14 | 0x2E<<7 | 0x26, + 24787 - 19968: jis0208<<14 | 0x37<<7 | 0x0A, + 24788 - 19968: jis0212<<14 | 0x1D<<7 | 0x0A, + 24789 - 19968: jis0208<<14 | 0x59<<7 | 0x05, + 24792 - 19968: jis0208<<14 | 0x37<<7 | 0x10, + 24793 - 19968: jis0212<<14 | 0x1D<<7 | 0x0C, + 24794 - 19968: jis0208<<14 | 0x18<<7 | 0x5A, + 24795 - 19968: jis0212<<14 | 0x1D<<7 | 0x0D, + 24796 - 19968: jis0208<<14 | 0x1F<<7 | 0x2A, + 24797 - 19968: jis0212<<14 | 0x1D<<7 | 0x0E, + 24798 - 19968: jis0208<<14 | 0x59<<7 | 0x04, + 24799 - 19968: jis0208<<14 | 0x0F<<7 | 0x33, + 24800 - 19968: jis0208<<14 | 0x37<<7 | 0x09, + 24801 - 19968: jis0208<<14 | 0x37<<7 | 0x07, + 24802 - 19968: jis0212<<14 | 0x1D<<7 | 0x10, + 24803 - 19968: jis0208<<14 | 0x20<<7 | 0x39, + 24805 - 19968: jis0212<<14 | 0x1D<<7 | 0x11, + 24807 - 19968: jis0208<<14 | 0x36<<7 | 0x5B, + 24808 - 19968: jis0208<<14 | 0x1A<<7 | 0x13, + 24816 - 19968: jis0208<<14 | 0x21<<7 | 0x25, + 24817 - 19968: jis0208<<14 | 0x37<<7 | 0x1C, + 24818 - 19968: jis0208<<14 | 0x59<<7 | 0x07, + 24819 - 19968: jis0208<<14 | 0x20<<7 | 0x3A, + 24820 - 19968: jis0208<<14 | 0x37<<7 | 0x17, + 24821 - 19968: jis0212<<14 | 0x1D<<7 | 0x13, + 24822 - 19968: jis0208<<14 | 0x37<<7 | 0x14, + 24823 - 19968: jis0208<<14 | 0x37<<7 | 0x15, + 24824 - 19968: jis0212<<14 | 0x1D<<7 | 0x14, + 24825 - 19968: jis0208<<14 | 0x1B<<7 | 0x45, + 24826 - 19968: jis0208<<14 | 0x37<<7 | 0x18, + 24827 - 19968: jis0208<<14 | 0x37<<7 | 0x1B, + 24828 - 19968: jis0212<<14 | 0x1D<<7 | 0x15, + 24829 - 19968: jis0212<<14 | 0x1D<<7 | 0x16, + 24832 - 19968: jis0208<<14 | 0x37<<7 | 0x16, + 24833 - 19968: jis0208<<14 | 0x1C<<7 | 0x04, + 24834 - 19968: jis0212<<14 | 0x1D<<7 | 0x17, + 24835 - 19968: jis0208<<14 | 0x37<<7 | 0x19, + 24838 - 19968: jis0208<<14 | 0x37<<7 | 0x13, + 24839 - 19968: jis0212<<14 | 0x1D<<7 | 0x18, + 24840 - 19968: jis0208<<14 | 0x2B<<7 | 0x5B, + 24841 - 19968: jis0208<<14 | 0x2B<<7 | 0x5A, + 24842 - 19968: jis0212<<14 | 0x1D<<7 | 0x19, + 24844 - 19968: jis0212<<14 | 0x1D<<7 | 0x1A, + 24845 - 19968: jis0208<<14 | 0x37<<7 | 0x1D, + 24846 - 19968: jis0208<<14 | 0x37<<7 | 0x1E, + 24847 - 19968: jis0208<<14 | 0x0F<<7 | 0x34, + 24848 - 19968: jis0212<<14 | 0x1D<<7 | 0x1B, + 24849 - 19968: jis0208<<14 | 0x59<<7 | 0x08, + 24850 - 19968: jis0212<<14 | 0x1D<<7 | 0x1D, + 24851 - 19968: jis0212<<14 | 0x1D<<7 | 0x1E, + 24852 - 19968: jis0212<<14 | 0x1D<<7 | 0x1F, + 24853 - 19968: jis0208<<14 | 0x37<<7 | 0x12, + 24854 - 19968: jis0212<<14 | 0x1D<<7 | 0x20, + 24855 - 19968: jis0212<<14 | 0x1D<<7 | 0x21, + 24857 - 19968: jis0212<<14 | 0x1D<<7 | 0x22, + 24858 - 19968: jis0208<<14 | 0x15<<7 | 0x51, + 24859 - 19968: jis0208<<14 | 0x0F<<7 | 0x05, + 24860 - 19968: jis0212<<14 | 0x1D<<7 | 0x23, + 24862 - 19968: jis0212<<14 | 0x1D<<7 | 0x24, + 24863 - 19968: jis0208<<14 | 0x13<<7 | 0x15, + 24864 - 19968: jis0208<<14 | 0x59<<7 | 0x06, + 24865 - 19968: jis0208<<14 | 0x37<<7 | 0x1A, + 24866 - 19968: jis0212<<14 | 0x1D<<7 | 0x25, + 24871 - 19968: jis0208<<14 | 0x37<<7 | 0x22, + 24872 - 19968: jis0208<<14 | 0x37<<7 | 0x21, + 24874 - 19968: jis0212<<14 | 0x1D<<7 | 0x26, + 24875 - 19968: jis0212<<14 | 0x1D<<7 | 0x27, + 24876 - 19968: jis0208<<14 | 0x37<<7 | 0x26, + 24880 - 19968: jis0208<<14 | 0x59<<7 | 0x0A, + 24881 - 19968: jis0212<<14 | 0x1D<<7 | 0x29, + 24884 - 19968: jis0208<<14 | 0x37<<7 | 0x27, + 24885 - 19968: jis0212<<14 | 0x1D<<7 | 0x2A, + 24886 - 19968: jis0212<<14 | 0x1D<<7 | 0x2B, + 24887 - 19968: jis0208<<14 | 0x59<<7 | 0x09, + 24889 - 19968: jis0212<<14 | 0x1D<<7 | 0x2D, + 24892 - 19968: jis0208<<14 | 0x37<<7 | 0x25, + 24893 - 19968: jis0208<<14 | 0x37<<7 | 0x28, + 24894 - 19968: jis0208<<14 | 0x37<<7 | 0x20, + 24895 - 19968: jis0208<<14 | 0x37<<7 | 0x24, + 24897 - 19968: jis0212<<14 | 0x1D<<7 | 0x2E, + 24898 - 19968: jis0208<<14 | 0x37<<7 | 0x29, + 24900 - 19968: jis0208<<14 | 0x37<<7 | 0x2A, + 24901 - 19968: jis0212<<14 | 0x1D<<7 | 0x2F, + 24902 - 19968: jis0212<<14 | 0x1D<<7 | 0x30, + 24903 - 19968: jis0208<<14 | 0x37<<7 | 0x1F, + 24904 - 19968: jis0208<<14 | 0x1A<<7 | 0x5B, + 24905 - 19968: jis0212<<14 | 0x1D<<7 | 0x31, + 24906 - 19968: jis0208<<14 | 0x37<<7 | 0x23, + 24907 - 19968: jis0208<<14 | 0x21<<7 | 0x35, + 24908 - 19968: jis0208<<14 | 0x18<<7 | 0x11, + 24909 - 19968: jis0208<<14 | 0x37<<7 | 0x11, + 24910 - 19968: jis0208<<14 | 0x1E<<7 | 0x14, + 24915 - 19968: jis0208<<14 | 0x37<<7 | 0x37, + 24917 - 19968: jis0208<<14 | 0x29<<7 | 0x48, + 24920 - 19968: jis0208<<14 | 0x37<<7 | 0x2D, + 24921 - 19968: jis0208<<14 | 0x37<<7 | 0x2E, + 24922 - 19968: jis0208<<14 | 0x37<<7 | 0x2F, + 24925 - 19968: jis0208<<14 | 0x37<<7 | 0x36, + 24926 - 19968: jis0212<<14 | 0x1D<<7 | 0x32, + 24927 - 19968: jis0208<<14 | 0x37<<7 | 0x35, + 24928 - 19968: jis0212<<14 | 0x1D<<7 | 0x33, + 24930 - 19968: jis0208<<14 | 0x2A<<7 | 0x5C, + 24931 - 19968: jis0208<<14 | 0x13<<7 | 0x16, + 24933 - 19968: jis0208<<14 | 0x37<<7 | 0x33, + 24935 - 19968: jis0208<<14 | 0x16<<7 | 0x24, + 24936 - 19968: jis0208<<14 | 0x12<<7 | 0x13, + 24939 - 19968: jis0208<<14 | 0x37<<7 | 0x30, + 24940 - 19968: jis0212<<14 | 0x1D<<7 | 0x34, + 24942 - 19968: jis0208<<14 | 0x2D<<7 | 0x17, + 24943 - 19968: jis0208<<14 | 0x37<<7 | 0x32, + 24944 - 19968: jis0208<<14 | 0x0F<<7 | 0x35, + 24945 - 19968: jis0208<<14 | 0x37<<7 | 0x34, + 24946 - 19968: jis0212<<14 | 0x1D<<7 | 0x35, + 24947 - 19968: jis0208<<14 | 0x37<<7 | 0x2B, + 24948 - 19968: jis0208<<14 | 0x37<<7 | 0x31, + 24949 - 19968: jis0208<<14 | 0x37<<7 | 0x38, + 24950 - 19968: jis0208<<14 | 0x16<<7 | 0x23, + 24951 - 19968: jis0208<<14 | 0x37<<7 | 0x2C, + 24952 - 19968: jis0212<<14 | 0x1D<<7 | 0x36, + 24955 - 19968: jis0212<<14 | 0x1D<<7 | 0x37, + 24956 - 19968: jis0212<<14 | 0x1D<<7 | 0x38, + 24958 - 19968: jis0208<<14 | 0x2C<<7 | 0x3C, + 24959 - 19968: jis0212<<14 | 0x1D<<7 | 0x39, + 24960 - 19968: jis0212<<14 | 0x1D<<7 | 0x3A, + 24961 - 19968: jis0212<<14 | 0x1D<<7 | 0x3B, + 24962 - 19968: jis0208<<14 | 0x2C<<7 | 0x0A, + 24963 - 19968: jis0212<<14 | 0x1D<<7 | 0x3C, + 24964 - 19968: jis0212<<14 | 0x1D<<7 | 0x3D, + 24967 - 19968: jis0208<<14 | 0x37<<7 | 0x3B, + 24970 - 19968: jis0208<<14 | 0x37<<7 | 0x3F, + 24971 - 19968: jis0212<<14 | 0x1D<<7 | 0x3E, + 24973 - 19968: jis0212<<14 | 0x1D<<7 | 0x3F, + 24974 - 19968: jis0208<<14 | 0x20<<7 | 0x5D, + 24976 - 19968: jis0208<<14 | 0x2D<<7 | 0x58, + 24977 - 19968: jis0208<<14 | 0x37<<7 | 0x40, + 24978 - 19968: jis0212<<14 | 0x1D<<7 | 0x40, + 24979 - 19968: jis0212<<14 | 0x1D<<7 | 0x41, + 24980 - 19968: jis0208<<14 | 0x37<<7 | 0x3D, + 24982 - 19968: jis0208<<14 | 0x37<<7 | 0x3A, + 24983 - 19968: jis0212<<14 | 0x1D<<7 | 0x42, + 24984 - 19968: jis0208<<14 | 0x59<<7 | 0x0B, + 24985 - 19968: jis0208<<14 | 0x37<<7 | 0x39, + 24986 - 19968: jis0208<<14 | 0x37<<7 | 0x3E, + 24988 - 19968: jis0212<<14 | 0x1D<<7 | 0x44, + 24989 - 19968: jis0212<<14 | 0x1D<<7 | 0x45, + 24991 - 19968: jis0212<<14 | 0x1D<<7 | 0x46, + 24992 - 19968: jis0212<<14 | 0x1D<<7 | 0x47, + 24996 - 19968: jis0208<<14 | 0x29<<7 | 0x0F, + 24997 - 19968: jis0212<<14 | 0x1D<<7 | 0x48, + 24999 - 19968: jis0208<<14 | 0x25<<7 | 0x13, + 25000 - 19968: jis0212<<14 | 0x1D<<7 | 0x49, + 25001 - 19968: jis0208<<14 | 0x16<<7 | 0x25, + 25002 - 19968: jis0212<<14 | 0x1D<<7 | 0x4A, + 25003 - 19968: jis0208<<14 | 0x37<<7 | 0x41, + 25004 - 19968: jis0208<<14 | 0x37<<7 | 0x3C, + 25005 - 19968: jis0212<<14 | 0x1D<<7 | 0x4B, + 25006 - 19968: jis0208<<14 | 0x37<<7 | 0x42, + 25010 - 19968: jis0208<<14 | 0x16<<7 | 0x5A, + 25014 - 19968: jis0208<<14 | 0x11<<7 | 0x10, + 25016 - 19968: jis0212<<14 | 0x1D<<7 | 0x4C, + 25017 - 19968: jis0212<<14 | 0x1D<<7 | 0x4D, + 25018 - 19968: jis0208<<14 | 0x37<<7 | 0x4A, + 25020 - 19968: jis0212<<14 | 0x1D<<7 | 0x4E, + 25022 - 19968: jis0208<<14 | 0x13<<7 | 0x17, + 25024 - 19968: jis0212<<14 | 0x1D<<7 | 0x4F, + 25025 - 19968: jis0212<<14 | 0x1D<<7 | 0x50, + 25026 - 19968: jis0212<<14 | 0x1D<<7 | 0x51, + 25027 - 19968: jis0208<<14 | 0x37<<7 | 0x48, + 25030 - 19968: jis0208<<14 | 0x37<<7 | 0x49, + 25031 - 19968: jis0208<<14 | 0x19<<7 | 0x08, + 25032 - 19968: jis0208<<14 | 0x37<<7 | 0x47, + 25033 - 19968: jis0208<<14 | 0x37<<7 | 0x45, + 25034 - 19968: jis0208<<14 | 0x37<<7 | 0x44, + 25035 - 19968: jis0208<<14 | 0x37<<7 | 0x4B, + 25036 - 19968: jis0208<<14 | 0x37<<7 | 0x43, + 25037 - 19968: jis0208<<14 | 0x37<<7 | 0x4D, + 25038 - 19968: jis0212<<14 | 0x1D<<7 | 0x52, + 25039 - 19968: jis0212<<14 | 0x1D<<7 | 0x53, + 25040 - 19968: jis0208<<14 | 0x11<<7 | 0x5A, + 25045 - 19968: jis0212<<14 | 0x1D<<7 | 0x54, + 25052 - 19968: jis0212<<14 | 0x1D<<7 | 0x55, + 25053 - 19968: jis0212<<14 | 0x1D<<7 | 0x56, + 25054 - 19968: jis0212<<14 | 0x1D<<7 | 0x57, + 25055 - 19968: jis0212<<14 | 0x1D<<7 | 0x58, + 25057 - 19968: jis0212<<14 | 0x1D<<7 | 0x59, + 25058 - 19968: jis0212<<14 | 0x1D<<7 | 0x5A, + 25059 - 19968: jis0208<<14 | 0x37<<7 | 0x4F, + 25061 - 19968: jis0212<<14 | 0x1D<<7 | 0x5D, + 25062 - 19968: jis0208<<14 | 0x37<<7 | 0x4E, + 25063 - 19968: jis0212<<14 | 0x1D<<7 | 0x5B, + 25065 - 19968: jis0212<<14 | 0x1D<<7 | 0x5C, + 25068 - 19968: jis0212<<14 | 0x1E<<7 | 0x00, + 25069 - 19968: jis0212<<14 | 0x1E<<7 | 0x01, + 25071 - 19968: jis0212<<14 | 0x1E<<7 | 0x02, + 25074 - 19968: jis0208<<14 | 0x23<<7 | 0x07, + 25076 - 19968: jis0208<<14 | 0x37<<7 | 0x52, + 25078 - 19968: jis0208<<14 | 0x37<<7 | 0x50, + 25079 - 19968: jis0208<<14 | 0x37<<7 | 0x46, + 25080 - 19968: jis0208<<14 | 0x16<<7 | 0x5B, + 25082 - 19968: jis0208<<14 | 0x37<<7 | 0x51, + 25084 - 19968: jis0208<<14 | 0x37<<7 | 0x55, + 25085 - 19968: jis0208<<14 | 0x37<<7 | 0x54, + 25086 - 19968: jis0208<<14 | 0x37<<7 | 0x56, + 25087 - 19968: jis0208<<14 | 0x37<<7 | 0x53, + 25088 - 19968: jis0208<<14 | 0x37<<7 | 0x57, + 25089 - 19968: jis0212<<14 | 0x1E<<7 | 0x03, + 25091 - 19968: jis0212<<14 | 0x1E<<7 | 0x04, + 25092 - 19968: jis0212<<14 | 0x1E<<7 | 0x05, + 25095 - 19968: jis0212<<14 | 0x1E<<7 | 0x06, + 25096 - 19968: jis0208<<14 | 0x37<<7 | 0x58, + 25097 - 19968: jis0208<<14 | 0x37<<7 | 0x59, + 25098 - 19968: jis0208<<14 | 0x29<<7 | 0x49, + 25100 - 19968: jis0208<<14 | 0x37<<7 | 0x5B, + 25101 - 19968: jis0208<<14 | 0x37<<7 | 0x5A, + 25102 - 19968: jis0208<<14 | 0x1C<<7 | 0x1E, + 25104 - 19968: jis0208<<14 | 0x1F<<7 | 0x0D, + 25105 - 19968: jis0208<<14 | 0x11<<7 | 0x45, + 25106 - 19968: jis0208<<14 | 0x11<<7 | 0x5B, + 25107 - 19968: jis0208<<14 | 0x59<<7 | 0x0C, + 25108 - 19968: jis0208<<14 | 0x37<<7 | 0x5C, + 25109 - 19968: jis0212<<14 | 0x1E<<7 | 0x08, + 25110 - 19968: jis0208<<14 | 0x0F<<7 | 0x1E, + 25114 - 19968: jis0208<<14 | 0x1F<<7 | 0x2B, + 25115 - 19968: jis0208<<14 | 0x37<<7 | 0x5D, + 25116 - 19968: jis0212<<14 | 0x1E<<7 | 0x09, + 25117 - 19968: jis0208<<14 | 0x4B<<7 | 0x22, + 25118 - 19968: jis0208<<14 | 0x38<<7 | 0x00, + 25119 - 19968: jis0208<<14 | 0x16<<7 | 0x40, + 25120 - 19968: jis0212<<14 | 0x1E<<7 | 0x0A, + 25121 - 19968: jis0208<<14 | 0x38<<7 | 0x01, + 25122 - 19968: jis0212<<14 | 0x1E<<7 | 0x0B, + 25123 - 19968: jis0212<<14 | 0x1E<<7 | 0x0C, + 25126 - 19968: jis0208<<14 | 0x1F<<7 | 0x4E, + 25127 - 19968: jis0212<<14 | 0x1E<<7 | 0x0D, + 25129 - 19968: jis0212<<14 | 0x1E<<7 | 0x0E, + 25130 - 19968: jis0208<<14 | 0x38<<7 | 0x02, + 25131 - 19968: jis0212<<14 | 0x1E<<7 | 0x0F, + 25134 - 19968: jis0208<<14 | 0x38<<7 | 0x03, + 25135 - 19968: jis0208<<14 | 0x14<<7 | 0x19, + 25136 - 19968: jis0208<<14 | 0x38<<7 | 0x04, + 25138 - 19968: jis0208<<14 | 0x38<<7 | 0x05, + 25139 - 19968: jis0208<<14 | 0x38<<7 | 0x06, + 25140 - 19968: jis0208<<14 | 0x21<<7 | 0x36, + 25144 - 19968: jis0208<<14 | 0x17<<7 | 0x2C, + 25145 - 19968: jis0212<<14 | 0x1E<<7 | 0x10, + 25147 - 19968: jis0208<<14 | 0x2B<<7 | 0x40, + 25149 - 19968: jis0212<<14 | 0x1E<<7 | 0x11, + 25151 - 19968: jis0208<<14 | 0x2A<<7 | 0x1B, + 25152 - 19968: jis0208<<14 | 0x1C<<7 | 0x49, + 25153 - 19968: jis0208<<14 | 0x38<<7 | 0x07, + 25154 - 19968: jis0212<<14 | 0x1E<<7 | 0x12, + 25155 - 19968: jis0212<<14 | 0x1E<<7 | 0x13, + 25156 - 19968: jis0212<<14 | 0x1E<<7 | 0x14, + 25158 - 19968: jis0212<<14 | 0x1E<<7 | 0x15, + 25159 - 19968: jis0208<<14 | 0x1F<<7 | 0x4F, + 25160 - 19968: jis0208<<14 | 0x4D<<7 | 0x1C, + 25161 - 19968: jis0208<<14 | 0x27<<7 | 0x41, + 25163 - 19968: jis0208<<14 | 0x1B<<7 | 0x49, + 25164 - 19968: jis0212<<14 | 0x1E<<7 | 0x16, + 25165 - 19968: jis0208<<14 | 0x19<<7 | 0x2C, + 25166 - 19968: jis0208<<14 | 0x38<<7 | 0x08, + 25168 - 19968: jis0212<<14 | 0x1E<<7 | 0x17, + 25169 - 19968: jis0212<<14 | 0x1E<<7 | 0x18, + 25170 - 19968: jis0212<<14 | 0x1E<<7 | 0x19, + 25171 - 19968: jis0208<<14 | 0x21<<7 | 0x26, + 25172 - 19968: jis0212<<14 | 0x1E<<7 | 0x1A, + 25173 - 19968: jis0208<<14 | 0x29<<7 | 0x06, + 25174 - 19968: jis0212<<14 | 0x1E<<7 | 0x1B, + 25176 - 19968: jis0208<<14 | 0x21<<7 | 0x50, + 25178 - 19968: jis0212<<14 | 0x1E<<7 | 0x1C, + 25179 - 19968: jis0208<<14 | 0x38<<7 | 0x0B, + 25180 - 19968: jis0212<<14 | 0x1E<<7 | 0x1D, + 25182 - 19968: jis0208<<14 | 0x38<<7 | 0x09, + 25184 - 19968: jis0208<<14 | 0x38<<7 | 0x0C, + 25187 - 19968: jis0208<<14 | 0x38<<7 | 0x0A, + 25188 - 19968: jis0212<<14 | 0x1E<<7 | 0x1E, + 25192 - 19968: jis0208<<14 | 0x38<<7 | 0x0D, + 25197 - 19968: jis0212<<14 | 0x1E<<7 | 0x1F, + 25198 - 19968: jis0208<<14 | 0x29<<7 | 0x10, + 25199 - 19968: jis0212<<14 | 0x1E<<7 | 0x20, + 25201 - 19968: jis0208<<14 | 0x0F<<7 | 0x16, + 25203 - 19968: jis0212<<14 | 0x1E<<7 | 0x21, + 25206 - 19968: jis0208<<14 | 0x28<<7 | 0x3D, + 25209 - 19968: jis0208<<14 | 0x27<<7 | 0x42, + 25210 - 19968: jis0212<<14 | 0x1E<<7 | 0x22, + 25212 - 19968: jis0208<<14 | 0x38<<7 | 0x0E, + 25213 - 19968: jis0212<<14 | 0x1E<<7 | 0x23, + 25214 - 19968: jis0208<<14 | 0x38<<7 | 0x11, + 25215 - 19968: jis0208<<14 | 0x1D<<7 | 0x14, + 25216 - 19968: jis0208<<14 | 0x14<<7 | 0x1A, + 25218 - 19968: jis0208<<14 | 0x38<<7 | 0x0F, + 25219 - 19968: jis0208<<14 | 0x38<<7 | 0x16, + 25220 - 19968: jis0208<<14 | 0x1D<<7 | 0x15, + 25225 - 19968: jis0208<<14 | 0x38<<7 | 0x10, + 25226 - 19968: jis0208<<14 | 0x26<<7 | 0x23, + 25229 - 19968: jis0212<<14 | 0x1E<<7 | 0x24, + 25230 - 19968: jis0212<<14 | 0x1E<<7 | 0x25, + 25231 - 19968: jis0212<<14 | 0x1E<<7 | 0x26, + 25232 - 19968: jis0212<<14 | 0x1E<<7 | 0x27, + 25233 - 19968: jis0208<<14 | 0x2C<<7 | 0x3D, + 25234 - 19968: jis0208<<14 | 0x38<<7 | 0x12, + 25235 - 19968: jis0208<<14 | 0x38<<7 | 0x13, + 25236 - 19968: jis0208<<14 | 0x38<<7 | 0x17, + 25237 - 19968: jis0208<<14 | 0x24<<7 | 0x49, + 25238 - 19968: jis0208<<14 | 0x38<<7 | 0x14, + 25239 - 19968: jis0208<<14 | 0x18<<7 | 0x12, + 25240 - 19968: jis0208<<14 | 0x1F<<7 | 0x3D, + 25243 - 19968: jis0208<<14 | 0x38<<7 | 0x25, + 25244 - 19968: jis0208<<14 | 0x27<<7 | 0x13, + 25246 - 19968: jis0208<<14 | 0x21<<7 | 0x51, + 25254 - 19968: jis0208<<14 | 0x59<<7 | 0x0D, + 25256 - 19968: jis0212<<14 | 0x1E<<7 | 0x29, + 25259 - 19968: jis0208<<14 | 0x27<<7 | 0x43, + 25260 - 19968: jis0208<<14 | 0x39<<7 | 0x0C, + 25265 - 19968: jis0208<<14 | 0x29<<7 | 0x59, + 25267 - 19968: jis0212<<14 | 0x1E<<7 | 0x2A, + 25269 - 19968: jis0208<<14 | 0x23<<7 | 0x50, + 25270 - 19968: jis0212<<14 | 0x1E<<7 | 0x2B, + 25271 - 19968: jis0212<<14 | 0x1E<<7 | 0x2C, + 25273 - 19968: jis0208<<14 | 0x2A<<7 | 0x54, + 25274 - 19968: jis0212<<14 | 0x1E<<7 | 0x2D, + 25275 - 19968: jis0208<<14 | 0x38<<7 | 0x1A, + 25276 - 19968: jis0208<<14 | 0x11<<7 | 0x00, + 25277 - 19968: jis0208<<14 | 0x22<<7 | 0x49, + 25278 - 19968: jis0212<<14 | 0x1E<<7 | 0x2E, + 25279 - 19968: jis0212<<14 | 0x1E<<7 | 0x2F, + 25282 - 19968: jis0208<<14 | 0x38<<7 | 0x23, + 25284 - 19968: jis0212<<14 | 0x1E<<7 | 0x30, + 25285 - 19968: jis0208<<14 | 0x22<<7 | 0x13, + 25286 - 19968: jis0208<<14 | 0x38<<7 | 0x1D, + 25287 - 19968: jis0208<<14 | 0x38<<7 | 0x24, + 25288 - 19968: jis0208<<14 | 0x38<<7 | 0x1F, + 25289 - 19968: jis0208<<14 | 0x38<<7 | 0x26, + 25290 - 19968: jis0208<<14 | 0x38<<7 | 0x22, + 25292 - 19968: jis0208<<14 | 0x38<<7 | 0x21, + 25293 - 19968: jis0208<<14 | 0x26<<7 | 0x4E, + 25294 - 19968: jis0212<<14 | 0x1E<<7 | 0x31, + 25295 - 19968: jis0208<<14 | 0x38<<7 | 0x1B, + 25296 - 19968: jis0208<<14 | 0x11<<7 | 0x5C, + 25297 - 19968: jis0208<<14 | 0x38<<7 | 0x19, + 25298 - 19968: jis0208<<14 | 0x14<<7 | 0x50, + 25299 - 19968: jis0208<<14 | 0x21<<7 | 0x52, + 25300 - 19968: jis0208<<14 | 0x38<<7 | 0x15, + 25301 - 19968: jis0212<<14 | 0x1E<<7 | 0x32, + 25302 - 19968: jis0212<<14 | 0x1E<<7 | 0x33, + 25303 - 19968: jis0208<<14 | 0x38<<7 | 0x18, + 25304 - 19968: jis0208<<14 | 0x18<<7 | 0x13, + 25305 - 19968: jis0208<<14 | 0x1F<<7 | 0x3A, + 25306 - 19968: jis0212<<14 | 0x1E<<7 | 0x34, + 25307 - 19968: jis0208<<14 | 0x1D<<7 | 0x16, + 25308 - 19968: jis0208<<14 | 0x38<<7 | 0x20, + 25309 - 19968: jis0208<<14 | 0x26<<7 | 0x31, + 25312 - 19968: jis0208<<14 | 0x14<<7 | 0x51, + 25313 - 19968: jis0208<<14 | 0x12<<7 | 0x27, + 25322 - 19968: jis0212<<14 | 0x1E<<7 | 0x35, + 25324 - 19968: jis0208<<14 | 0x12<<7 | 0x46, + 25325 - 19968: jis0208<<14 | 0x1E<<7 | 0x00, + 25326 - 19968: jis0208<<14 | 0x38<<7 | 0x28, + 25327 - 19968: jis0208<<14 | 0x38<<7 | 0x2D, + 25329 - 19968: jis0208<<14 | 0x38<<7 | 0x29, + 25330 - 19968: jis0212<<14 | 0x1E<<7 | 0x36, + 25331 - 19968: jis0208<<14 | 0x16<<7 | 0x5C, + 25332 - 19968: jis0212<<14 | 0x1E<<7 | 0x37, + 25333 - 19968: jis0208<<14 | 0x38<<7 | 0x2E, + 25334 - 19968: jis0208<<14 | 0x1A<<7 | 0x01, + 25335 - 19968: jis0208<<14 | 0x18<<7 | 0x48, + 25340 - 19968: jis0212<<14 | 0x1E<<7 | 0x38, + 25341 - 19968: jis0212<<14 | 0x1E<<7 | 0x39, + 25342 - 19968: jis0208<<14 | 0x1C<<7 | 0x05, + 25343 - 19968: jis0208<<14 | 0x38<<7 | 0x1C, + 25345 - 19968: jis0208<<14 | 0x1A<<7 | 0x5C, + 25346 - 19968: jis0208<<14 | 0x38<<7 | 0x2B, + 25347 - 19968: jis0212<<14 | 0x1E<<7 | 0x3A, + 25348 - 19968: jis0212<<14 | 0x1E<<7 | 0x3B, + 25351 - 19968: jis0208<<14 | 0x1A<<7 | 0x37, + 25352 - 19968: jis0208<<14 | 0x38<<7 | 0x2C, + 25353 - 19968: jis0208<<14 | 0x0F<<7 | 0x23, + 25354 - 19968: jis0212<<14 | 0x1E<<7 | 0x3C, + 25355 - 19968: jis0212<<14 | 0x1E<<7 | 0x3D, + 25356 - 19968: jis0208<<14 | 0x38<<7 | 0x27, + 25357 - 19968: jis0212<<14 | 0x1E<<7 | 0x3E, + 25360 - 19968: jis0212<<14 | 0x1E<<7 | 0x3F, + 25361 - 19968: jis0208<<14 | 0x23<<7 | 0x08, + 25363 - 19968: jis0212<<14 | 0x1E<<7 | 0x40, + 25366 - 19968: jis0212<<14 | 0x1E<<7 | 0x41, + 25368 - 19968: jis0212<<14 | 0x1E<<7 | 0x42, + 25369 - 19968: jis0208<<14 | 0x14<<7 | 0x52, + 25375 - 19968: jis0208<<14 | 0x15<<7 | 0x13, + 25383 - 19968: jis0208<<14 | 0x38<<7 | 0x2A, + 25384 - 19968: jis0208<<14 | 0x0F<<7 | 0x06, + 25385 - 19968: jis0212<<14 | 0x1E<<7 | 0x43, + 25386 - 19968: jis0212<<14 | 0x1E<<7 | 0x44, + 25387 - 19968: jis0208<<14 | 0x19<<7 | 0x22, + 25389 - 19968: jis0212<<14 | 0x1E<<7 | 0x45, + 25391 - 19968: jis0208<<14 | 0x1E<<7 | 0x15, + 25397 - 19968: jis0212<<14 | 0x1E<<7 | 0x46, + 25398 - 19968: jis0212<<14 | 0x1E<<7 | 0x47, + 25401 - 19968: jis0212<<14 | 0x1E<<7 | 0x48, + 25402 - 19968: jis0208<<14 | 0x23<<7 | 0x51, + 25404 - 19968: jis0212<<14 | 0x1E<<7 | 0x49, + 25405 - 19968: jis0208<<14 | 0x27<<7 | 0x33, + 25406 - 19968: jis0208<<14 | 0x38<<7 | 0x30, + 25407 - 19968: jis0208<<14 | 0x20<<7 | 0x3D, + 25409 - 19968: jis0212<<14 | 0x1E<<7 | 0x4A, + 25410 - 19968: jis0212<<14 | 0x1E<<7 | 0x4B, + 25411 - 19968: jis0212<<14 | 0x1E<<7 | 0x4C, + 25412 - 19968: jis0212<<14 | 0x1E<<7 | 0x4D, + 25414 - 19968: jis0212<<14 | 0x1E<<7 | 0x4E, + 25417 - 19968: jis0208<<14 | 0x21<<7 | 0x09, + 25418 - 19968: jis0212<<14 | 0x1E<<7 | 0x4F, + 25419 - 19968: jis0212<<14 | 0x1E<<7 | 0x50, + 25420 - 19968: jis0208<<14 | 0x1A<<7 | 0x0A, + 25421 - 19968: jis0208<<14 | 0x38<<7 | 0x31, + 25422 - 19968: jis0212<<14 | 0x1E<<7 | 0x51, + 25423 - 19968: jis0208<<14 | 0x38<<7 | 0x33, + 25424 - 19968: jis0208<<14 | 0x38<<7 | 0x2F, + 25426 - 19968: jis0212<<14 | 0x1E<<7 | 0x52, + 25427 - 19968: jis0212<<14 | 0x1E<<7 | 0x53, + 25428 - 19968: jis0212<<14 | 0x1E<<7 | 0x54, + 25429 - 19968: jis0208<<14 | 0x29<<7 | 0x40, + 25431 - 19968: jis0208<<14 | 0x23<<7 | 0x1C, + 25432 - 19968: jis0212<<14 | 0x1E<<7 | 0x55, + 25435 - 19968: jis0212<<14 | 0x1E<<7 | 0x56, + 25436 - 19968: jis0208<<14 | 0x20<<7 | 0x3B, + 25445 - 19968: jis0212<<14 | 0x1E<<7 | 0x57, + 25446 - 19968: jis0212<<14 | 0x1E<<7 | 0x58, + 25447 - 19968: jis0208<<14 | 0x29<<7 | 0x5A, + 25448 - 19968: jis0208<<14 | 0x1B<<7 | 0x2D, + 25449 - 19968: jis0208<<14 | 0x38<<7 | 0x3F, + 25451 - 19968: jis0208<<14 | 0x38<<7 | 0x3E, + 25452 - 19968: jis0212<<14 | 0x1E<<7 | 0x59, + 25453 - 19968: jis0212<<14 | 0x1E<<7 | 0x5A, + 25454 - 19968: jis0208<<14 | 0x1E<<7 | 0x57, + 25457 - 19968: jis0212<<14 | 0x1E<<7 | 0x5B, + 25458 - 19968: jis0208<<14 | 0x16<<7 | 0x5D, + 25460 - 19968: jis0212<<14 | 0x1E<<7 | 0x5C, + 25461 - 19968: jis0212<<14 | 0x1E<<7 | 0x5D, + 25462 - 19968: jis0208<<14 | 0x38<<7 | 0x38, + 25463 - 19968: jis0208<<14 | 0x1D<<7 | 0x18, + 25464 - 19968: jis0212<<14 | 0x1F<<7 | 0x00, + 25466 - 19968: jis0208<<14 | 0x25<<7 | 0x47, + 25467 - 19968: jis0208<<14 | 0x26<<7 | 0x10, + 25468 - 19968: jis0212<<14 | 0x1F<<7 | 0x01, + 25469 - 19968: jis0212<<14 | 0x1F<<7 | 0x02, + 25471 - 19968: jis0212<<14 | 0x1F<<7 | 0x03, + 25472 - 19968: jis0208<<14 | 0x38<<7 | 0x36, + 25474 - 19968: jis0212<<14 | 0x1F<<7 | 0x04, + 25475 - 19968: jis0208<<14 | 0x20<<7 | 0x3C, + 25476 - 19968: jis0212<<14 | 0x1F<<7 | 0x05, + 25479 - 19968: jis0212<<14 | 0x1F<<7 | 0x06, + 25480 - 19968: jis0208<<14 | 0x1B<<7 | 0x57, + 25481 - 19968: jis0208<<14 | 0x38<<7 | 0x3B, + 25482 - 19968: jis0212<<14 | 0x1F<<7 | 0x07, + 25484 - 19968: jis0208<<14 | 0x1D<<7 | 0x17, + 25486 - 19968: jis0208<<14 | 0x38<<7 | 0x35, + 25487 - 19968: jis0208<<14 | 0x38<<7 | 0x3A, + 25488 - 19968: jis0212<<14 | 0x1F<<7 | 0x08, + 25490 - 19968: jis0208<<14 | 0x26<<7 | 0x32, + 25492 - 19968: jis0212<<14 | 0x1F<<7 | 0x09, + 25493 - 19968: jis0212<<14 | 0x1F<<7 | 0x0A, + 25494 - 19968: jis0208<<14 | 0x38<<7 | 0x34, + 25496 - 19968: jis0208<<14 | 0x16<<7 | 0x00, + 25497 - 19968: jis0212<<14 | 0x1F<<7 | 0x0B, + 25498 - 19968: jis0212<<14 | 0x1F<<7 | 0x0C, + 25499 - 19968: jis0208<<14 | 0x12<<7 | 0x3C, + 25502 - 19968: jis0212<<14 | 0x1F<<7 | 0x0D, + 25503 - 19968: jis0208<<14 | 0x38<<7 | 0x3C, + 25504 - 19968: jis0208<<14 | 0x2D<<7 | 0x0A, + 25505 - 19968: jis0208<<14 | 0x19<<7 | 0x2D, + 25506 - 19968: jis0208<<14 | 0x22<<7 | 0x14, + 25507 - 19968: jis0208<<14 | 0x38<<7 | 0x39, + 25508 - 19968: jis0212<<14 | 0x1F<<7 | 0x0E, + 25509 - 19968: jis0208<<14 | 0x1F<<7 | 0x3B, + 25510 - 19968: jis0212<<14 | 0x1F<<7 | 0x0F, + 25511 - 19968: jis0208<<14 | 0x18<<7 | 0x14, + 25512 - 19968: jis0208<<14 | 0x1E<<7 | 0x43, + 25513 - 19968: jis0208<<14 | 0x10<<7 | 0x45, + 25514 - 19968: jis0208<<14 | 0x20<<7 | 0x1B, + 25515 - 19968: jis0208<<14 | 0x38<<7 | 0x37, + 25516 - 19968: jis0208<<14 | 0x14<<7 | 0x24, + 25517 - 19968: jis0212<<14 | 0x1F<<7 | 0x10, + 25518 - 19968: jis0212<<14 | 0x1F<<7 | 0x11, + 25519 - 19968: jis0212<<14 | 0x1F<<7 | 0x12, + 25522 - 19968: jis0208<<14 | 0x16<<7 | 0x26, + 25524 - 19968: jis0208<<14 | 0x23<<7 | 0x2E, + 25525 - 19968: jis0208<<14 | 0x38<<7 | 0x3D, + 25531 - 19968: jis0208<<14 | 0x20<<7 | 0x3E, + 25533 - 19968: jis0212<<14 | 0x1F<<7 | 0x13, + 25534 - 19968: jis0208<<14 | 0x38<<7 | 0x40, + 25536 - 19968: jis0208<<14 | 0x38<<7 | 0x42, + 25537 - 19968: jis0212<<14 | 0x1F<<7 | 0x14, + 25539 - 19968: jis0208<<14 | 0x21<<7 | 0x16, + 25540 - 19968: jis0208<<14 | 0x38<<7 | 0x48, + 25541 - 19968: jis0212<<14 | 0x1F<<7 | 0x15, + 25542 - 19968: jis0208<<14 | 0x38<<7 | 0x43, + 25544 - 19968: jis0212<<14 | 0x1F<<7 | 0x16, + 25545 - 19968: jis0208<<14 | 0x38<<7 | 0x45, + 25550 - 19968: jis0212<<14 | 0x1F<<7 | 0x17, + 25551 - 19968: jis0208<<14 | 0x28<<7 | 0x20, + 25552 - 19968: jis0208<<14 | 0x23<<7 | 0x52, + 25553 - 19968: jis0212<<14 | 0x1F<<7 | 0x18, + 25554 - 19968: jis0208<<14 | 0x38<<7 | 0x46, + 25555 - 19968: jis0212<<14 | 0x1F<<7 | 0x19, + 25556 - 19968: jis0212<<14 | 0x1F<<7 | 0x1A, + 25557 - 19968: jis0212<<14 | 0x1F<<7 | 0x1B, + 25558 - 19968: jis0208<<14 | 0x2C<<7 | 0x0B, + 25562 - 19968: jis0208<<14 | 0x2C<<7 | 0x27, + 25563 - 19968: jis0208<<14 | 0x13<<7 | 0x18, + 25564 - 19968: jis0212<<14 | 0x1F<<7 | 0x1C, + 25568 - 19968: jis0212<<14 | 0x1F<<7 | 0x1D, + 25569 - 19968: jis0208<<14 | 0x0F<<7 | 0x0D, + 25571 - 19968: jis0208<<14 | 0x38<<7 | 0x44, + 25573 - 19968: jis0212<<14 | 0x1F<<7 | 0x1E, + 25577 - 19968: jis0208<<14 | 0x38<<7 | 0x41, + 25578 - 19968: jis0212<<14 | 0x1F<<7 | 0x1F, + 25580 - 19968: jis0212<<14 | 0x1F<<7 | 0x20, + 25582 - 19968: jis0208<<14 | 0x13<<7 | 0x57, + 25586 - 19968: jis0212<<14 | 0x1F<<7 | 0x21, + 25587 - 19968: jis0212<<14 | 0x1F<<7 | 0x22, + 25588 - 19968: jis0208<<14 | 0x10<<7 | 0x46, + 25589 - 19968: jis0208<<14 | 0x59<<7 | 0x0E, + 25590 - 19968: jis0208<<14 | 0x38<<7 | 0x47, + 25592 - 19968: jis0212<<14 | 0x1F<<7 | 0x24, + 25593 - 19968: jis0212<<14 | 0x1F<<7 | 0x25, + 25594 - 19968: jis0208<<14 | 0x2C<<7 | 0x28, + 25606 - 19968: jis0208<<14 | 0x38<<7 | 0x4B, + 25609 - 19968: jis0212<<14 | 0x1F<<7 | 0x26, + 25610 - 19968: jis0212<<14 | 0x1F<<7 | 0x27, + 25613 - 19968: jis0208<<14 | 0x21<<7 | 0x1A, + 25615 - 19968: jis0208<<14 | 0x38<<7 | 0x52, + 25616 - 19968: jis0212<<14 | 0x1F<<7 | 0x28, + 25618 - 19968: jis0212<<14 | 0x1F<<7 | 0x29, + 25619 - 19968: jis0208<<14 | 0x38<<7 | 0x4C, + 25620 - 19968: jis0212<<14 | 0x1F<<7 | 0x2A, + 25622 - 19968: jis0208<<14 | 0x38<<7 | 0x49, + 25623 - 19968: jis0208<<14 | 0x38<<7 | 0x50, + 25624 - 19968: jis0212<<14 | 0x1F<<7 | 0x2B, + 25628 - 19968: jis0208<<14 | 0x38<<7 | 0x32, + 25630 - 19968: jis0212<<14 | 0x1F<<7 | 0x2C, + 25632 - 19968: jis0212<<14 | 0x1F<<7 | 0x2D, + 25634 - 19968: jis0212<<14 | 0x1F<<7 | 0x2E, + 25636 - 19968: jis0212<<14 | 0x1F<<7 | 0x2F, + 25637 - 19968: jis0212<<14 | 0x1F<<7 | 0x30, + 25638 - 19968: jis0208<<14 | 0x38<<7 | 0x4D, + 25640 - 19968: jis0208<<14 | 0x38<<7 | 0x51, + 25641 - 19968: jis0212<<14 | 0x1F<<7 | 0x31, + 25642 - 19968: jis0212<<14 | 0x1F<<7 | 0x32, + 25644 - 19968: jis0208<<14 | 0x27<<7 | 0x21, + 25645 - 19968: jis0208<<14 | 0x24<<7 | 0x4A, + 25647 - 19968: jis0212<<14 | 0x1F<<7 | 0x33, + 25648 - 19968: jis0212<<14 | 0x1F<<7 | 0x34, + 25652 - 19968: jis0208<<14 | 0x38<<7 | 0x4A, + 25653 - 19968: jis0212<<14 | 0x1F<<7 | 0x35, + 25654 - 19968: jis0208<<14 | 0x38<<7 | 0x4E, + 25658 - 19968: jis0208<<14 | 0x16<<7 | 0x27, + 25661 - 19968: jis0212<<14 | 0x1F<<7 | 0x36, + 25662 - 19968: jis0208<<14 | 0x19<<7 | 0x50, + 25663 - 19968: jis0212<<14 | 0x1F<<7 | 0x37, + 25666 - 19968: jis0208<<14 | 0x1F<<7 | 0x3C, + 25675 - 19968: jis0212<<14 | 0x1F<<7 | 0x38, + 25678 - 19968: jis0208<<14 | 0x38<<7 | 0x56, + 25679 - 19968: jis0212<<14 | 0x1F<<7 | 0x39, + 25681 - 19968: jis0212<<14 | 0x1F<<7 | 0x3A, + 25682 - 19968: jis0212<<14 | 0x1F<<7 | 0x3B, + 25683 - 19968: jis0212<<14 | 0x1F<<7 | 0x3C, + 25684 - 19968: jis0212<<14 | 0x1F<<7 | 0x3D, + 25688 - 19968: jis0208<<14 | 0x24<<7 | 0x05, + 25690 - 19968: jis0212<<14 | 0x1F<<7 | 0x3E, + 25691 - 19968: jis0212<<14 | 0x1F<<7 | 0x3F, + 25692 - 19968: jis0212<<14 | 0x1F<<7 | 0x40, + 25693 - 19968: jis0212<<14 | 0x1F<<7 | 0x41, + 25695 - 19968: jis0212<<14 | 0x1F<<7 | 0x42, + 25696 - 19968: jis0208<<14 | 0x59<<7 | 0x0F, + 25697 - 19968: jis0212<<14 | 0x1F<<7 | 0x44, + 25699 - 19968: jis0212<<14 | 0x1F<<7 | 0x45, + 25703 - 19968: jis0208<<14 | 0x38<<7 | 0x53, + 25705 - 19968: jis0208<<14 | 0x2A<<7 | 0x3F, + 25709 - 19968: jis0212<<14 | 0x1F<<7 | 0x46, + 25711 - 19968: jis0208<<14 | 0x38<<7 | 0x54, + 25715 - 19968: jis0212<<14 | 0x1F<<7 | 0x47, + 25716 - 19968: jis0212<<14 | 0x1F<<7 | 0x48, + 25718 - 19968: jis0208<<14 | 0x38<<7 | 0x55, + 25720 - 19968: jis0208<<14 | 0x2B<<7 | 0x2D, + 25722 - 19968: jis0208<<14 | 0x1F<<7 | 0x01, + 25723 - 19968: jis0212<<14 | 0x1F<<7 | 0x49, + 25725 - 19968: jis0212<<14 | 0x1F<<7 | 0x4A, + 25731 - 19968: jis0208<<14 | 0x16<<7 | 0x41, + 25733 - 19968: jis0212<<14 | 0x1F<<7 | 0x4B, + 25735 - 19968: jis0212<<14 | 0x1F<<7 | 0x4C, + 25736 - 19968: jis0208<<14 | 0x38<<7 | 0x5C, + 25743 - 19968: jis0212<<14 | 0x1F<<7 | 0x4D, + 25744 - 19968: jis0212<<14 | 0x1F<<7 | 0x4E, + 25745 - 19968: jis0212<<14 | 0x1F<<7 | 0x4F, + 25746 - 19968: jis0208<<14 | 0x1A<<7 | 0x14, + 25747 - 19968: jis0208<<14 | 0x38<<7 | 0x59, + 25749 - 19968: jis0208<<14 | 0x38<<7 | 0x58, + 25752 - 19968: jis0212<<14 | 0x1F<<7 | 0x50, + 25753 - 19968: jis0212<<14 | 0x1F<<7 | 0x51, + 25754 - 19968: jis0208<<14 | 0x26<<7 | 0x11, + 25755 - 19968: jis0212<<14 | 0x1F<<7 | 0x52, + 25757 - 19968: jis0208<<14 | 0x59<<7 | 0x10, + 25758 - 19968: jis0208<<14 | 0x25<<7 | 0x14, + 25759 - 19968: jis0212<<14 | 0x1F<<7 | 0x54, + 25761 - 19968: jis0212<<14 | 0x1F<<7 | 0x55, + 25763 - 19968: jis0212<<14 | 0x1F<<7 | 0x56, + 25764 - 19968: jis0208<<14 | 0x24<<7 | 0x10, + 25765 - 19968: jis0208<<14 | 0x38<<7 | 0x5A, + 25766 - 19968: jis0212<<14 | 0x1F<<7 | 0x57, + 25768 - 19968: jis0212<<14 | 0x1F<<7 | 0x58, + 25769 - 19968: jis0208<<14 | 0x38<<7 | 0x5B, + 25771 - 19968: jis0208<<14 | 0x28<<7 | 0x4E, + 25772 - 19968: jis0212<<14 | 0x1F<<7 | 0x59, + 25773 - 19968: jis0208<<14 | 0x26<<7 | 0x24, + 25774 - 19968: jis0208<<14 | 0x1A<<7 | 0x02, + 25776 - 19968: jis0208<<14 | 0x1F<<7 | 0x50, + 25778 - 19968: jis0208<<14 | 0x2A<<7 | 0x2F, + 25779 - 19968: jis0212<<14 | 0x1F<<7 | 0x5A, + 25785 - 19968: jis0208<<14 | 0x12<<7 | 0x28, + 25787 - 19968: jis0208<<14 | 0x39<<7 | 0x04, + 25788 - 19968: jis0208<<14 | 0x38<<7 | 0x5D, + 25789 - 19968: jis0212<<14 | 0x1F<<7 | 0x5B, + 25790 - 19968: jis0212<<14 | 0x1F<<7 | 0x5C, + 25791 - 19968: jis0212<<14 | 0x1F<<7 | 0x5D, + 25793 - 19968: jis0208<<14 | 0x2C<<7 | 0x29, + 25794 - 19968: jis0208<<14 | 0x39<<7 | 0x06, + 25796 - 19968: jis0212<<14 | 0x20<<7 | 0x00, + 25797 - 19968: jis0208<<14 | 0x39<<7 | 0x02, + 25799 - 19968: jis0208<<14 | 0x39<<7 | 0x03, + 25801 - 19968: jis0212<<14 | 0x20<<7 | 0x01, + 25802 - 19968: jis0212<<14 | 0x20<<7 | 0x02, + 25803 - 19968: jis0212<<14 | 0x20<<7 | 0x03, + 25804 - 19968: jis0212<<14 | 0x20<<7 | 0x04, + 25805 - 19968: jis0208<<14 | 0x20<<7 | 0x3F, + 25806 - 19968: jis0208<<14 | 0x59<<7 | 0x11, + 25808 - 19968: jis0212<<14 | 0x20<<7 | 0x06, + 25809 - 19968: jis0212<<14 | 0x20<<7 | 0x07, + 25810 - 19968: jis0208<<14 | 0x39<<7 | 0x01, + 25812 - 19968: jis0208<<14 | 0x38<<7 | 0x1E, + 25813 - 19968: jis0212<<14 | 0x20<<7 | 0x08, + 25815 - 19968: jis0212<<14 | 0x20<<7 | 0x09, + 25816 - 19968: jis0208<<14 | 0x39<<7 | 0x05, + 25818 - 19968: jis0208<<14 | 0x39<<7 | 0x00, + 25824 - 19968: jis0208<<14 | 0x39<<7 | 0x0A, + 25825 - 19968: jis0208<<14 | 0x39<<7 | 0x0B, + 25826 - 19968: jis0208<<14 | 0x24<<7 | 0x06, + 25827 - 19968: jis0208<<14 | 0x39<<7 | 0x0D, + 25828 - 19968: jis0212<<14 | 0x20<<7 | 0x0A, + 25829 - 19968: jis0212<<14 | 0x20<<7 | 0x0B, + 25830 - 19968: jis0208<<14 | 0x1A<<7 | 0x03, + 25831 - 19968: jis0208<<14 | 0x39<<7 | 0x08, + 25833 - 19968: jis0212<<14 | 0x20<<7 | 0x0C, + 25834 - 19968: jis0212<<14 | 0x20<<7 | 0x0D, + 25836 - 19968: jis0208<<14 | 0x14<<7 | 0x1B, + 25837 - 19968: jis0212<<14 | 0x20<<7 | 0x0E, + 25839 - 19968: jis0208<<14 | 0x39<<7 | 0x0E, + 25840 - 19968: jis0212<<14 | 0x20<<7 | 0x0F, + 25841 - 19968: jis0208<<14 | 0x39<<7 | 0x07, + 25842 - 19968: jis0208<<14 | 0x39<<7 | 0x12, + 25844 - 19968: jis0208<<14 | 0x39<<7 | 0x11, + 25845 - 19968: jis0212<<14 | 0x20<<7 | 0x10, + 25846 - 19968: jis0208<<14 | 0x39<<7 | 0x10, + 25847 - 19968: jis0212<<14 | 0x20<<7 | 0x11, + 25850 - 19968: jis0208<<14 | 0x39<<7 | 0x13, + 25851 - 19968: jis0212<<14 | 0x20<<7 | 0x12, + 25853 - 19968: jis0208<<14 | 0x39<<7 | 0x15, + 25854 - 19968: jis0208<<14 | 0x1D<<7 | 0x50, + 25855 - 19968: jis0212<<14 | 0x20<<7 | 0x13, + 25856 - 19968: jis0208<<14 | 0x39<<7 | 0x14, + 25857 - 19968: jis0212<<14 | 0x20<<7 | 0x14, + 25860 - 19968: jis0212<<14 | 0x20<<7 | 0x15, + 25861 - 19968: jis0208<<14 | 0x39<<7 | 0x18, + 25864 - 19968: jis0212<<14 | 0x20<<7 | 0x16, + 25865 - 19968: jis0212<<14 | 0x20<<7 | 0x17, + 25866 - 19968: jis0212<<14 | 0x20<<7 | 0x18, + 25871 - 19968: jis0212<<14 | 0x20<<7 | 0x19, + 25875 - 19968: jis0212<<14 | 0x20<<7 | 0x1A, + 25876 - 19968: jis0212<<14 | 0x20<<7 | 0x1B, + 25878 - 19968: jis0212<<14 | 0x20<<7 | 0x1C, + 25880 - 19968: jis0208<<14 | 0x39<<7 | 0x16, + 25881 - 19968: jis0212<<14 | 0x20<<7 | 0x1D, + 25883 - 19968: jis0212<<14 | 0x20<<7 | 0x1E, + 25884 - 19968: jis0208<<14 | 0x39<<7 | 0x17, + 25885 - 19968: jis0208<<14 | 0x38<<7 | 0x4F, + 25886 - 19968: jis0212<<14 | 0x20<<7 | 0x1F, + 25887 - 19968: jis0212<<14 | 0x20<<7 | 0x20, + 25890 - 19968: jis0212<<14 | 0x20<<7 | 0x21, + 25891 - 19968: jis0208<<14 | 0x39<<7 | 0x1A, + 25892 - 19968: jis0208<<14 | 0x39<<7 | 0x19, + 25894 - 19968: jis0212<<14 | 0x20<<7 | 0x22, + 25897 - 19968: jis0212<<14 | 0x20<<7 | 0x23, + 25898 - 19968: jis0208<<14 | 0x38<<7 | 0x57, + 25899 - 19968: jis0208<<14 | 0x39<<7 | 0x1B, + 25900 - 19968: jis0208<<14 | 0x39<<7 | 0x0F, + 25902 - 19968: jis0212<<14 | 0x20<<7 | 0x24, + 25903 - 19968: jis0208<<14 | 0x1A<<7 | 0x38, + 25905 - 19968: jis0212<<14 | 0x20<<7 | 0x25, + 25908 - 19968: jis0208<<14 | 0x39<<7 | 0x1C, + 25909 - 19968: jis0208<<14 | 0x39<<7 | 0x1D, + 25910 - 19968: jis0208<<14 | 0x39<<7 | 0x1F, + 25911 - 19968: jis0208<<14 | 0x39<<7 | 0x1E, + 25912 - 19968: jis0208<<14 | 0x39<<7 | 0x20, + 25913 - 19968: jis0208<<14 | 0x11<<7 | 0x5D, + 25914 - 19968: jis0212<<14 | 0x20<<7 | 0x26, + 25915 - 19968: jis0208<<14 | 0x18<<7 | 0x15, + 25916 - 19968: jis0212<<14 | 0x20<<7 | 0x27, + 25917 - 19968: jis0212<<14 | 0x20<<7 | 0x28, + 25918 - 19968: jis0208<<14 | 0x29<<7 | 0x5B, + 25919 - 19968: jis0208<<14 | 0x1F<<7 | 0x0E, + 25923 - 19968: jis0212<<14 | 0x20<<7 | 0x29, + 25925 - 19968: jis0208<<14 | 0x17<<7 | 0x2D, + 25927 - 19968: jis0212<<14 | 0x20<<7 | 0x2A, + 25928 - 19968: jis0208<<14 | 0x39<<7 | 0x22, + 25929 - 19968: jis0212<<14 | 0x20<<7 | 0x2B, + 25933 - 19968: jis0208<<14 | 0x39<<7 | 0x25, + 25934 - 19968: jis0208<<14 | 0x59<<7 | 0x12, + 25935 - 19968: jis0208<<14 | 0x28<<7 | 0x31, + 25936 - 19968: jis0212<<14 | 0x20<<7 | 0x2C, + 25937 - 19968: jis0208<<14 | 0x14<<7 | 0x3E, + 25938 - 19968: jis0212<<14 | 0x20<<7 | 0x2D, + 25940 - 19968: jis0212<<14 | 0x20<<7 | 0x2E, + 25941 - 19968: jis0208<<14 | 0x39<<7 | 0x24, + 25942 - 19968: jis0208<<14 | 0x39<<7 | 0x23, + 25943 - 19968: jis0208<<14 | 0x26<<7 | 0x33, + 25944 - 19968: jis0208<<14 | 0x39<<7 | 0x26, + 25945 - 19968: jis0208<<14 | 0x15<<7 | 0x14, + 25949 - 19968: jis0208<<14 | 0x39<<7 | 0x28, + 25950 - 19968: jis0208<<14 | 0x39<<7 | 0x27, + 25951 - 19968: jis0212<<14 | 0x20<<7 | 0x2F, + 25952 - 19968: jis0212<<14 | 0x20<<7 | 0x30, + 25954 - 19968: jis0208<<14 | 0x13<<7 | 0x19, + 25955 - 19968: jis0208<<14 | 0x1A<<7 | 0x15, + 25958 - 19968: jis0208<<14 | 0x25<<7 | 0x37, + 25959 - 19968: jis0212<<14 | 0x20<<7 | 0x31, + 25963 - 19968: jis0212<<14 | 0x20<<7 | 0x32, + 25964 - 19968: jis0208<<14 | 0x16<<7 | 0x28, + 25968 - 19968: jis0208<<14 | 0x1E<<7 | 0x53, + 25970 - 19968: jis0208<<14 | 0x39<<7 | 0x29, + 25972 - 19968: jis0208<<14 | 0x1F<<7 | 0x0F, + 25973 - 19968: jis0208<<14 | 0x24<<7 | 0x07, + 25975 - 19968: jis0208<<14 | 0x28<<7 | 0x3E, + 25976 - 19968: jis0208<<14 | 0x39<<7 | 0x2A, + 25978 - 19968: jis0212<<14 | 0x20<<7 | 0x33, + 25981 - 19968: jis0212<<14 | 0x20<<7 | 0x34, + 25985 - 19968: jis0212<<14 | 0x20<<7 | 0x35, + 25986 - 19968: jis0208<<14 | 0x39<<7 | 0x2B, + 25987 - 19968: jis0208<<14 | 0x39<<7 | 0x2C, + 25989 - 19968: jis0212<<14 | 0x20<<7 | 0x36, + 25991 - 19968: jis0208<<14 | 0x29<<7 | 0x17, + 25992 - 19968: jis0208<<14 | 0x34<<7 | 0x3C, + 25993 - 19968: jis0208<<14 | 0x1F<<7 | 0x25, + 25994 - 19968: jis0212<<14 | 0x20<<7 | 0x37, + 25996 - 19968: jis0208<<14 | 0x28<<7 | 0x2B, + 25998 - 19968: jis0208<<14 | 0x19<<7 | 0x37, + 26000 - 19968: jis0208<<14 | 0x27<<7 | 0x44, + 26001 - 19968: jis0208<<14 | 0x27<<7 | 0x22, + 26002 - 19968: jis0212<<14 | 0x20<<7 | 0x38, + 26005 - 19968: jis0212<<14 | 0x20<<7 | 0x39, + 26007 - 19968: jis0208<<14 | 0x24<<7 | 0x2C, + 26008 - 19968: jis0212<<14 | 0x20<<7 | 0x3A, + 26009 - 19968: jis0208<<14 | 0x2D<<7 | 0x20, + 26011 - 19968: jis0208<<14 | 0x39<<7 | 0x2E, + 26012 - 19968: jis0208<<14 | 0x1B<<7 | 0x2F, + 26013 - 19968: jis0212<<14 | 0x20<<7 | 0x3B, + 26015 - 19968: jis0208<<14 | 0x39<<7 | 0x2F, + 26016 - 19968: jis0212<<14 | 0x20<<7 | 0x3C, + 26017 - 19968: jis0208<<14 | 0x0F<<7 | 0x15, + 26019 - 19968: jis0212<<14 | 0x20<<7 | 0x3D, + 26020 - 19968: jis0208<<14 | 0x15<<7 | 0x33, + 26021 - 19968: jis0208<<14 | 0x1F<<7 | 0x2C, + 26022 - 19968: jis0212<<14 | 0x20<<7 | 0x3E, + 26023 - 19968: jis0208<<14 | 0x28<<7 | 0x3F, + 26027 - 19968: jis0208<<14 | 0x39<<7 | 0x30, + 26028 - 19968: jis0208<<14 | 0x1A<<7 | 0x21, + 26029 - 19968: jis0208<<14 | 0x22<<7 | 0x26, + 26030 - 19968: jis0212<<14 | 0x20<<7 | 0x3F, + 26031 - 19968: jis0208<<14 | 0x1A<<7 | 0x3A, + 26032 - 19968: jis0208<<14 | 0x1E<<7 | 0x16, + 26034 - 19968: jis0212<<14 | 0x20<<7 | 0x40, + 26035 - 19968: jis0212<<14 | 0x20<<7 | 0x41, + 26036 - 19968: jis0212<<14 | 0x20<<7 | 0x42, + 26039 - 19968: jis0208<<14 | 0x39<<7 | 0x31, + 26041 - 19968: jis0208<<14 | 0x29<<7 | 0x5C, + 26044 - 19968: jis0208<<14 | 0x10<<7 | 0x56, + 26045 - 19968: jis0208<<14 | 0x1A<<7 | 0x3B, + 26047 - 19968: jis0212<<14 | 0x20<<7 | 0x43, + 26049 - 19968: jis0208<<14 | 0x39<<7 | 0x34, + 26050 - 19968: jis0212<<14 | 0x20<<7 | 0x44, + 26051 - 19968: jis0208<<14 | 0x39<<7 | 0x32, + 26052 - 19968: jis0208<<14 | 0x39<<7 | 0x35, + 26053 - 19968: jis0208<<14 | 0x2D<<7 | 0x18, + 26054 - 19968: jis0208<<14 | 0x39<<7 | 0x33, + 26056 - 19968: jis0212<<14 | 0x20<<7 | 0x45, + 26057 - 19968: jis0212<<14 | 0x20<<7 | 0x46, + 26059 - 19968: jis0208<<14 | 0x1F<<7 | 0x5A, + 26060 - 19968: jis0208<<14 | 0x39<<7 | 0x36, + 26062 - 19968: jis0212<<14 | 0x20<<7 | 0x47, + 26063 - 19968: jis0208<<14 | 0x21<<7 | 0x11, + 26064 - 19968: jis0212<<14 | 0x20<<7 | 0x48, + 26066 - 19968: jis0208<<14 | 0x39<<7 | 0x37, + 26068 - 19968: jis0212<<14 | 0x20<<7 | 0x49, + 26070 - 19968: jis0212<<14 | 0x20<<7 | 0x4A, + 26071 - 19968: jis0208<<14 | 0x13<<7 | 0x59, + 26072 - 19968: jis0212<<14 | 0x20<<7 | 0x4B, + 26073 - 19968: jis0208<<14 | 0x39<<7 | 0x39, + 26075 - 19968: jis0208<<14 | 0x39<<7 | 0x38, + 26079 - 19968: jis0212<<14 | 0x20<<7 | 0x4C, + 26080 - 19968: jis0208<<14 | 0x39<<7 | 0x3A, + 26081 - 19968: jis0208<<14 | 0x39<<7 | 0x3B, + 26082 - 19968: jis0208<<14 | 0x13<<7 | 0x5A, + 26085 - 19968: jis0208<<14 | 0x25<<7 | 0x5B, + 26086 - 19968: jis0208<<14 | 0x22<<7 | 0x15, + 26087 - 19968: jis0208<<14 | 0x14<<7 | 0x4B, + 26088 - 19968: jis0208<<14 | 0x1A<<7 | 0x3C, + 26089 - 19968: jis0208<<14 | 0x20<<7 | 0x40, + 26092 - 19968: jis0208<<14 | 0x1C<<7 | 0x3B, + 26093 - 19968: jis0208<<14 | 0x0F<<7 | 0x0F, + 26096 - 19968: jis0212<<14 | 0x20<<7 | 0x4D, + 26097 - 19968: jis0208<<14 | 0x39<<7 | 0x3C, + 26098 - 19968: jis0212<<14 | 0x20<<7 | 0x4E, + 26100 - 19968: jis0212<<14 | 0x20<<7 | 0x4F, + 26101 - 19968: jis0212<<14 | 0x20<<7 | 0x50, + 26105 - 19968: jis0212<<14 | 0x20<<7 | 0x51, + 26106 - 19968: jis0208<<14 | 0x11<<7 | 0x01, + 26107 - 19968: jis0208<<14 | 0x39<<7 | 0x40, + 26110 - 19968: jis0212<<14 | 0x20<<7 | 0x52, + 26111 - 19968: jis0212<<14 | 0x20<<7 | 0x53, + 26112 - 19968: jis0208<<14 | 0x59<<7 | 0x13, + 26114 - 19968: jis0208<<14 | 0x18<<7 | 0x16, + 26115 - 19968: jis0208<<14 | 0x39<<7 | 0x3F, + 26116 - 19968: jis0212<<14 | 0x20<<7 | 0x55, + 26118 - 19968: jis0208<<14 | 0x19<<7 | 0x0A, + 26119 - 19968: jis0208<<14 | 0x1D<<7 | 0x19, + 26120 - 19968: jis0212<<14 | 0x20<<7 | 0x56, + 26121 - 19968: jis0208<<14 | 0x59<<7 | 0x16, + 26122 - 19968: jis0208<<14 | 0x39<<7 | 0x3E, + 26124 - 19968: jis0208<<14 | 0x1D<<7 | 0x1A, + 26125 - 19968: jis0212<<14 | 0x20<<7 | 0x58, + 26126 - 19968: jis0208<<14 | 0x2B<<7 | 0x1F, + 26127 - 19968: jis0208<<14 | 0x19<<7 | 0x09, + 26129 - 19968: jis0212<<14 | 0x20<<7 | 0x59, + 26130 - 19968: jis0212<<14 | 0x20<<7 | 0x5A, + 26131 - 19968: jis0208<<14 | 0x0F<<7 | 0x36, + 26132 - 19968: jis0208<<14 | 0x1F<<7 | 0x2D, + 26133 - 19968: jis0208<<14 | 0x59<<7 | 0x14, + 26134 - 19968: jis0212<<14 | 0x20<<7 | 0x5C, + 26140 - 19968: jis0208<<14 | 0x39<<7 | 0x45, + 26141 - 19968: jis0212<<14 | 0x20<<7 | 0x5D, + 26142 - 19968: jis0208<<14 | 0x59<<7 | 0x18, + 26143 - 19968: jis0208<<14 | 0x1F<<7 | 0x10, + 26144 - 19968: jis0208<<14 | 0x10<<7 | 0x26, + 26145 - 19968: jis0212<<14 | 0x21<<7 | 0x01, + 26146 - 19968: jis0212<<14 | 0x21<<7 | 0x02, + 26147 - 19968: jis0212<<14 | 0x21<<7 | 0x03, + 26148 - 19968: jis0208<<14 | 0x59<<7 | 0x19, + 26149 - 19968: jis0208<<14 | 0x1C<<7 | 0x34, + 26150 - 19968: jis0212<<14 | 0x21<<7 | 0x05, + 26151 - 19968: jis0208<<14 | 0x2A<<7 | 0x45, + 26152 - 19968: jis0208<<14 | 0x19<<7 | 0x51, + 26153 - 19968: jis0212<<14 | 0x21<<7 | 0x06, + 26154 - 19968: jis0212<<14 | 0x21<<7 | 0x07, + 26155 - 19968: jis0212<<14 | 0x21<<7 | 0x08, + 26156 - 19968: jis0212<<14 | 0x21<<7 | 0x09, + 26157 - 19968: jis0208<<14 | 0x1D<<7 | 0x1B, + 26158 - 19968: jis0208<<14 | 0x59<<7 | 0x17, + 26159 - 19968: jis0208<<14 | 0x1F<<7 | 0x06, + 26160 - 19968: jis0212<<14 | 0x21<<7 | 0x0B, + 26161 - 19968: jis0208<<14 | 0x58<<7 | 0x07, + 26163 - 19968: jis0212<<14 | 0x21<<7 | 0x0D, + 26164 - 19968: jis0208<<14 | 0x39<<7 | 0x44, + 26165 - 19968: jis0208<<14 | 0x39<<7 | 0x42, + 26166 - 19968: jis0208<<14 | 0x39<<7 | 0x43, + 26167 - 19968: jis0212<<14 | 0x21<<7 | 0x0F, + 26169 - 19968: jis0212<<14 | 0x21<<7 | 0x0E, + 26171 - 19968: jis0208<<14 | 0x59<<7 | 0x15, + 26172 - 19968: jis0208<<14 | 0x22<<7 | 0x4A, + 26175 - 19968: jis0208<<14 | 0x3A<<7 | 0x05, + 26176 - 19968: jis0212<<14 | 0x21<<7 | 0x10, + 26177 - 19968: jis0208<<14 | 0x39<<7 | 0x49, + 26178 - 19968: jis0208<<14 | 0x1A<<7 | 0x5D, + 26179 - 19968: jis0208<<14 | 0x18<<7 | 0x17, + 26180 - 19968: jis0208<<14 | 0x39<<7 | 0x47, + 26181 - 19968: jis0212<<14 | 0x21<<7 | 0x11, + 26182 - 19968: jis0212<<14 | 0x21<<7 | 0x12, + 26185 - 19968: jis0208<<14 | 0x39<<7 | 0x48, + 26186 - 19968: jis0212<<14 | 0x21<<7 | 0x13, + 26187 - 19968: jis0208<<14 | 0x1E<<7 | 0x17, + 26188 - 19968: jis0212<<14 | 0x21<<7 | 0x14, + 26190 - 19968: jis0212<<14 | 0x21<<7 | 0x16, + 26191 - 19968: jis0208<<14 | 0x39<<7 | 0x46, + 26193 - 19968: jis0212<<14 | 0x21<<7 | 0x15, + 26194 - 19968: jis0208<<14 | 0x1A<<7 | 0x0E, + 26199 - 19968: jis0208<<14 | 0x59<<7 | 0x1B, + 26200 - 19968: jis0212<<14 | 0x21<<7 | 0x18, + 26201 - 19968: jis0208<<14 | 0x59<<7 | 0x1C, + 26203 - 19968: jis0212<<14 | 0x21<<7 | 0x1A, + 26204 - 19968: jis0212<<14 | 0x21<<7 | 0x1B, + 26205 - 19968: jis0208<<14 | 0x39<<7 | 0x4B, + 26206 - 19968: jis0208<<14 | 0x39<<7 | 0x4A, + 26207 - 19968: jis0208<<14 | 0x39<<7 | 0x4F, + 26208 - 19968: jis0212<<14 | 0x21<<7 | 0x1C, + 26209 - 19968: jis0212<<14 | 0x21<<7 | 0x1D, + 26210 - 19968: jis0208<<14 | 0x39<<7 | 0x50, + 26212 - 19968: jis0208<<14 | 0x39<<7 | 0x4C, + 26213 - 19968: jis0208<<14 | 0x59<<7 | 0x1A, + 26214 - 19968: jis0208<<14 | 0x12<<7 | 0x01, + 26215 - 19968: jis0208<<14 | 0x39<<7 | 0x4D, + 26216 - 19968: jis0208<<14 | 0x39<<7 | 0x4E, + 26217 - 19968: jis0208<<14 | 0x27<<7 | 0x34, + 26218 - 19968: jis0212<<14 | 0x21<<7 | 0x1F, + 26219 - 19968: jis0212<<14 | 0x21<<7 | 0x20, + 26220 - 19968: jis0212<<14 | 0x21<<7 | 0x21, + 26222 - 19968: jis0208<<14 | 0x28<<7 | 0x40, + 26223 - 19968: jis0208<<14 | 0x16<<7 | 0x29, + 26224 - 19968: jis0208<<14 | 0x39<<7 | 0x51, + 26227 - 19968: jis0208<<14 | 0x59<<7 | 0x1E, + 26228 - 19968: jis0208<<14 | 0x1F<<7 | 0x11, + 26229 - 19968: jis0212<<14 | 0x21<<7 | 0x24, + 26230 - 19968: jis0208<<14 | 0x1D<<7 | 0x1C, + 26231 - 19968: jis0212<<14 | 0x21<<7 | 0x26, + 26232 - 19968: jis0212<<14 | 0x21<<7 | 0x27, + 26233 - 19968: jis0212<<14 | 0x21<<7 | 0x28, + 26234 - 19968: jis0208<<14 | 0x22<<7 | 0x31, + 26235 - 19968: jis0212<<14 | 0x21<<7 | 0x29, + 26236 - 19968: jis0212<<14 | 0x21<<7 | 0x2B, + 26238 - 19968: jis0212<<14 | 0x21<<7 | 0x22, + 26239 - 19968: jis0212<<14 | 0x21<<7 | 0x25, + 26240 - 19968: jis0212<<14 | 0x21<<7 | 0x2A, + 26241 - 19968: jis0208<<14 | 0x15<<7 | 0x26, + 26243 - 19968: jis0208<<14 | 0x39<<7 | 0x52, + 26244 - 19968: jis0208<<14 | 0x39<<7 | 0x56, + 26247 - 19968: jis0208<<14 | 0x11<<7 | 0x2A, + 26248 - 19968: jis0208<<14 | 0x39<<7 | 0x53, + 26249 - 19968: jis0208<<14 | 0x39<<7 | 0x55, + 26251 - 19968: jis0212<<14 | 0x21<<7 | 0x2C, + 26252 - 19968: jis0212<<14 | 0x21<<7 | 0x2D, + 26253 - 19968: jis0212<<14 | 0x21<<7 | 0x2E, + 26254 - 19968: jis0208<<14 | 0x39<<7 | 0x54, + 26256 - 19968: jis0212<<14 | 0x21<<7 | 0x2F, + 26257 - 19968: jis0208<<14 | 0x1C<<7 | 0x4A, + 26258 - 19968: jis0212<<14 | 0x21<<7 | 0x30, + 26262 - 19968: jis0208<<14 | 0x22<<7 | 0x27, + 26263 - 19968: jis0208<<14 | 0x0F<<7 | 0x24, + 26264 - 19968: jis0208<<14 | 0x39<<7 | 0x57, + 26265 - 19968: jis0208<<14 | 0x59<<7 | 0x1F, + 26266 - 19968: jis0212<<14 | 0x21<<7 | 0x32, + 26267 - 19968: jis0212<<14 | 0x21<<7 | 0x33, + 26268 - 19968: jis0212<<14 | 0x21<<7 | 0x34, + 26269 - 19968: jis0208<<14 | 0x39<<7 | 0x58, + 26271 - 19968: jis0212<<14 | 0x21<<7 | 0x35, + 26272 - 19968: jis0208<<14 | 0x59<<7 | 0x20, + 26274 - 19968: jis0208<<14 | 0x23<<7 | 0x09, + 26276 - 19968: jis0212<<14 | 0x21<<7 | 0x37, + 26278 - 19968: jis0208<<14 | 0x2D<<7 | 0x50, + 26283 - 19968: jis0208<<14 | 0x1A<<7 | 0x22, + 26285 - 19968: jis0212<<14 | 0x21<<7 | 0x38, + 26286 - 19968: jis0208<<14 | 0x29<<7 | 0x4A, + 26289 - 19968: jis0212<<14 | 0x21<<7 | 0x39, + 26290 - 19968: jis0208<<14 | 0x59<<7 | 0x21, + 26292 - 19968: jis0208<<14 | 0x2A<<7 | 0x1C, + 26293 - 19968: jis0212<<14 | 0x21<<7 | 0x3B, + 26296 - 19968: jis0208<<14 | 0x3A<<7 | 0x01, + 26297 - 19968: jis0208<<14 | 0x39<<7 | 0x5A, + 26299 - 19968: jis0212<<14 | 0x21<<7 | 0x3C, + 26300 - 19968: jis0208<<14 | 0x39<<7 | 0x5D, + 26302 - 19968: jis0208<<14 | 0x39<<7 | 0x5C, + 26303 - 19968: jis0208<<14 | 0x59<<7 | 0x22, + 26304 - 19968: jis0212<<14 | 0x21<<7 | 0x3E, + 26305 - 19968: jis0208<<14 | 0x39<<7 | 0x59, + 26306 - 19968: jis0212<<14 | 0x21<<7 | 0x3F, + 26307 - 19968: jis0212<<14 | 0x21<<7 | 0x40, + 26308 - 19968: jis0208<<14 | 0x3A<<7 | 0x00, + 26311 - 19968: jis0208<<14 | 0x25<<7 | 0x3D, + 26312 - 19968: jis0212<<14 | 0x21<<7 | 0x41, + 26313 - 19968: jis0208<<14 | 0x39<<7 | 0x5B, + 26316 - 19968: jis0212<<14 | 0x21<<7 | 0x42, + 26318 - 19968: jis0212<<14 | 0x21<<7 | 0x43, + 26319 - 19968: jis0212<<14 | 0x21<<7 | 0x44, + 26324 - 19968: jis0212<<14 | 0x21<<7 | 0x45, + 26326 - 19968: jis0208<<14 | 0x3A<<7 | 0x02, + 26329 - 19968: jis0208<<14 | 0x1C<<7 | 0x4B, + 26330 - 19968: jis0208<<14 | 0x3A<<7 | 0x03, + 26331 - 19968: jis0212<<14 | 0x21<<7 | 0x46, + 26332 - 19968: jis0208<<14 | 0x2C<<7 | 0x2A, + 26333 - 19968: jis0208<<14 | 0x26<<7 | 0x57, + 26335 - 19968: jis0212<<14 | 0x21<<7 | 0x47, + 26336 - 19968: jis0208<<14 | 0x3A<<7 | 0x04, + 26342 - 19968: jis0208<<14 | 0x3A<<7 | 0x06, + 26344 - 19968: jis0212<<14 | 0x21<<7 | 0x48, + 26345 - 19968: jis0208<<14 | 0x3A<<7 | 0x07, + 26347 - 19968: jis0212<<14 | 0x21<<7 | 0x49, + 26348 - 19968: jis0212<<14 | 0x21<<7 | 0x4A, + 26350 - 19968: jis0212<<14 | 0x21<<7 | 0x4B, + 26352 - 19968: jis0208<<14 | 0x3A<<7 | 0x08, + 26354 - 19968: jis0208<<14 | 0x15<<7 | 0x29, + 26355 - 19968: jis0208<<14 | 0x10<<7 | 0x27, + 26356 - 19968: jis0208<<14 | 0x18<<7 | 0x18, + 26357 - 19968: jis0208<<14 | 0x3A<<7 | 0x09, + 26359 - 19968: jis0208<<14 | 0x3A<<7 | 0x0A, + 26360 - 19968: jis0208<<14 | 0x1C<<7 | 0x50, + 26361 - 19968: jis0208<<14 | 0x20<<7 | 0x41, + 26362 - 19968: jis0208<<14 | 0x59<<7 | 0x23, + 26363 - 19968: jis0208<<14 | 0x58<<7 | 0x0A, + 26364 - 19968: jis0208<<14 | 0x31<<7 | 0x37, + 26365 - 19968: jis0208<<14 | 0x20<<7 | 0x1D, + 26366 - 19968: jis0208<<14 | 0x20<<7 | 0x1C, + 26367 - 19968: jis0208<<14 | 0x21<<7 | 0x37, + 26368 - 19968: jis0208<<14 | 0x19<<7 | 0x26, + 26371 - 19968: jis0208<<14 | 0x2F<<7 | 0x51, + 26373 - 19968: jis0212<<14 | 0x21<<7 | 0x4D, + 26375 - 19968: jis0212<<14 | 0x21<<7 | 0x4E, + 26376 - 19968: jis0208<<14 | 0x16<<7 | 0x4D, + 26377 - 19968: jis0208<<14 | 0x2C<<7 | 0x0C, + 26379 - 19968: jis0208<<14 | 0x29<<7 | 0x5D, + 26381 - 19968: jis0208<<14 | 0x28<<7 | 0x5D, + 26382 - 19968: jis0208<<14 | 0x59<<7 | 0x24, + 26383 - 19968: jis0208<<14 | 0x3A<<7 | 0x0B, + 26387 - 19968: jis0212<<14 | 0x21<<7 | 0x50, + 26388 - 19968: jis0208<<14 | 0x19<<7 | 0x52, + 26389 - 19968: jis0208<<14 | 0x23<<7 | 0x1E, + 26390 - 19968: jis0208<<14 | 0x3A<<7 | 0x0C, + 26391 - 19968: jis0208<<14 | 0x2E<<7 | 0x0E, + 26393 - 19968: jis0212<<14 | 0x21<<7 | 0x51, + 26395 - 19968: jis0208<<14 | 0x2A<<7 | 0x1D, + 26396 - 19968: jis0212<<14 | 0x21<<7 | 0x52, + 26397 - 19968: jis0208<<14 | 0x23<<7 | 0x0A, + 26398 - 19968: jis0208<<14 | 0x3A<<7 | 0x0D, + 26399 - 19968: jis0208<<14 | 0x13<<7 | 0x5B, + 26400 - 19968: jis0212<<14 | 0x21<<7 | 0x53, + 26402 - 19968: jis0212<<14 | 0x21<<7 | 0x54, + 26406 - 19968: jis0208<<14 | 0x3A<<7 | 0x0E, + 26407 - 19968: jis0208<<14 | 0x3A<<7 | 0x0F, + 26408 - 19968: jis0208<<14 | 0x2B<<7 | 0x39, + 26410 - 19968: jis0208<<14 | 0x2B<<7 | 0x03, + 26411 - 19968: jis0208<<14 | 0x2A<<7 | 0x55, + 26412 - 19968: jis0208<<14 | 0x2A<<7 | 0x3B, + 26413 - 19968: jis0208<<14 | 0x1A<<7 | 0x04, + 26414 - 19968: jis0208<<14 | 0x3A<<7 | 0x11, + 26417 - 19968: jis0208<<14 | 0x1B<<7 | 0x4A, + 26419 - 19968: jis0212<<14 | 0x21<<7 | 0x55, + 26420 - 19968: jis0208<<14 | 0x2A<<7 | 0x30, + 26422 - 19968: jis0208<<14 | 0x3A<<7 | 0x13, + 26423 - 19968: jis0208<<14 | 0x3A<<7 | 0x16, + 26424 - 19968: jis0208<<14 | 0x3A<<7 | 0x15, + 26426 - 19968: jis0208<<14 | 0x13<<7 | 0x58, + 26429 - 19968: jis0208<<14 | 0x14<<7 | 0x3F, + 26430 - 19968: jis0212<<14 | 0x21<<7 | 0x56, + 26431 - 19968: jis0208<<14 | 0x3A<<7 | 0x12, + 26433 - 19968: jis0208<<14 | 0x3A<<7 | 0x14, + 26437 - 19968: jis0212<<14 | 0x21<<7 | 0x57, + 26438 - 19968: jis0208<<14 | 0x3A<<7 | 0x17, + 26439 - 19968: jis0212<<14 | 0x21<<7 | 0x58, + 26440 - 19968: jis0212<<14 | 0x21<<7 | 0x59, + 26441 - 19968: jis0208<<14 | 0x1E<<7 | 0x58, + 26444 - 19968: jis0212<<14 | 0x21<<7 | 0x5A, + 26446 - 19968: jis0208<<14 | 0x2C<<7 | 0x5A, + 26447 - 19968: jis0208<<14 | 0x0F<<7 | 0x28, + 26448 - 19968: jis0208<<14 | 0x19<<7 | 0x3F, + 26449 - 19968: jis0208<<14 | 0x21<<7 | 0x1B, + 26451 - 19968: jis0208<<14 | 0x1B<<7 | 0x3C, + 26452 - 19968: jis0212<<14 | 0x21<<7 | 0x5B, + 26453 - 19968: jis0212<<14 | 0x21<<7 | 0x5C, + 26454 - 19968: jis0208<<14 | 0x1D<<7 | 0x52, + 26457 - 19968: jis0208<<14 | 0x3A<<7 | 0x1A, + 26460 - 19968: jis0208<<14 | 0x24<<7 | 0x2D, + 26461 - 19968: jis0212<<14 | 0x21<<7 | 0x5D, + 26462 - 19968: jis0208<<14 | 0x3A<<7 | 0x18, + 26463 - 19968: jis0208<<14 | 0x21<<7 | 0x0A, + 26464 - 19968: jis0208<<14 | 0x3A<<7 | 0x19, + 26465 - 19968: jis0208<<14 | 0x1D<<7 | 0x51, + 26466 - 19968: jis0208<<14 | 0x2B<<7 | 0x3C, + 26467 - 19968: jis0208<<14 | 0x3A<<7 | 0x1B, + 26468 - 19968: jis0208<<14 | 0x3A<<7 | 0x1C, + 26469 - 19968: jis0208<<14 | 0x2C<<7 | 0x47, + 26470 - 19968: jis0208<<14 | 0x59<<7 | 0x26, + 26474 - 19968: jis0208<<14 | 0x3A<<7 | 0x21, + 26476 - 19968: jis0212<<14 | 0x22<<7 | 0x01, + 26477 - 19968: jis0208<<14 | 0x18<<7 | 0x19, + 26478 - 19968: jis0212<<14 | 0x22<<7 | 0x02, + 26479 - 19968: jis0208<<14 | 0x26<<7 | 0x34, + 26480 - 19968: jis0208<<14 | 0x3A<<7 | 0x1E, + 26481 - 19968: jis0208<<14 | 0x24<<7 | 0x4B, + 26482 - 19968: jis0208<<14 | 0x39<<7 | 0x3D, + 26483 - 19968: jis0208<<14 | 0x39<<7 | 0x41, + 26484 - 19968: jis0212<<14 | 0x22<<7 | 0x03, + 26485 - 19968: jis0208<<14 | 0x14<<7 | 0x2E, + 26486 - 19968: jis0212<<14 | 0x22<<7 | 0x04, + 26487 - 19968: jis0208<<14 | 0x26<<7 | 0x26, + 26491 - 19968: jis0212<<14 | 0x22<<7 | 0x05, + 26492 - 19968: jis0208<<14 | 0x3A<<7 | 0x20, + 26494 - 19968: jis0208<<14 | 0x1D<<7 | 0x1D, + 26495 - 19968: jis0208<<14 | 0x27<<7 | 0x23, + 26497 - 19968: jis0212<<14 | 0x22<<7 | 0x06, + 26500 - 19968: jis0212<<14 | 0x22<<7 | 0x07, + 26501 - 19968: jis0208<<14 | 0x3A<<7 | 0x26, + 26503 - 19968: jis0208<<14 | 0x27<<7 | 0x59, + 26505 - 19968: jis0208<<14 | 0x3A<<7 | 0x1D, + 26507 - 19968: jis0208<<14 | 0x3A<<7 | 0x23, + 26508 - 19968: jis0208<<14 | 0x3A<<7 | 0x22, + 26510 - 19968: jis0212<<14 | 0x22<<7 | 0x08, + 26511 - 19968: jis0212<<14 | 0x22<<7 | 0x09, + 26512 - 19968: jis0208<<14 | 0x1F<<7 | 0x2E, + 26513 - 19968: jis0212<<14 | 0x22<<7 | 0x0A, + 26515 - 19968: jis0212<<14 | 0x22<<7 | 0x0B, + 26517 - 19968: jis0208<<14 | 0x2A<<7 | 0x4C, + 26518 - 19968: jis0212<<14 | 0x22<<7 | 0x0C, + 26519 - 19968: jis0208<<14 | 0x2D<<7 | 0x32, + 26520 - 19968: jis0212<<14 | 0x22<<7 | 0x0D, + 26521 - 19968: jis0212<<14 | 0x22<<7 | 0x0E, + 26522 - 19968: jis0208<<14 | 0x2A<<7 | 0x46, + 26523 - 19968: jis0212<<14 | 0x22<<7 | 0x0F, + 26524 - 19968: jis0208<<14 | 0x11<<7 | 0x2B, + 26525 - 19968: jis0208<<14 | 0x1A<<7 | 0x3D, + 26528 - 19968: jis0208<<14 | 0x2E<<7 | 0x27, + 26529 - 19968: jis0208<<14 | 0x3A<<7 | 0x25, + 26530 - 19968: jis0208<<14 | 0x1E<<7 | 0x54, + 26534 - 19968: jis0208<<14 | 0x3A<<7 | 0x24, + 26537 - 19968: jis0208<<14 | 0x3A<<7 | 0x1F, + 26543 - 19968: jis0208<<14 | 0x17<<7 | 0x2E, + 26544 - 19968: jis0212<<14 | 0x22<<7 | 0x10, + 26545 - 19968: jis0212<<14 | 0x22<<7 | 0x11, + 26546 - 19968: jis0212<<14 | 0x22<<7 | 0x12, + 26547 - 19968: jis0208<<14 | 0x3A<<7 | 0x2B, + 26548 - 19968: jis0208<<14 | 0x3A<<7 | 0x29, + 26549 - 19968: jis0212<<14 | 0x22<<7 | 0x13, + 26550 - 19968: jis0208<<14 | 0x11<<7 | 0x2C, + 26551 - 19968: jis0208<<14 | 0x3A<<7 | 0x27, + 26552 - 19968: jis0208<<14 | 0x3A<<7 | 0x2D, + 26553 - 19968: jis0208<<14 | 0x3A<<7 | 0x33, + 26555 - 19968: jis0208<<14 | 0x59<<7 | 0x27, + 26556 - 19968: jis0212<<14 | 0x22<<7 | 0x15, + 26557 - 19968: jis0212<<14 | 0x22<<7 | 0x16, + 26560 - 19968: jis0208<<14 | 0x59<<7 | 0x29, + 26561 - 19968: jis0208<<14 | 0x21<<7 | 0x27, + 26562 - 19968: jis0212<<14 | 0x22<<7 | 0x19, + 26563 - 19968: jis0212<<14 | 0x22<<7 | 0x1A, + 26564 - 19968: jis0208<<14 | 0x29<<7 | 0x20, + 26565 - 19968: jis0212<<14 | 0x22<<7 | 0x1B, + 26566 - 19968: jis0208<<14 | 0x3A<<7 | 0x35, + 26568 - 19968: jis0212<<14 | 0x22<<7 | 0x1C, + 26569 - 19968: jis0212<<14 | 0x22<<7 | 0x1D, + 26570 - 19968: jis0208<<14 | 0x28<<7 | 0x01, + 26574 - 19968: jis0208<<14 | 0x3A<<7 | 0x34, + 26575 - 19968: jis0208<<14 | 0x26<<7 | 0x4F, + 26576 - 19968: jis0208<<14 | 0x2A<<7 | 0x1E, + 26577 - 19968: jis0208<<14 | 0x13<<7 | 0x1A, + 26578 - 19968: jis0212<<14 | 0x22<<7 | 0x1E, + 26579 - 19968: jis0208<<14 | 0x1F<<7 | 0x56, + 26580 - 19968: jis0208<<14 | 0x1C<<7 | 0x1F, + 26583 - 19968: jis0212<<14 | 0x22<<7 | 0x1F, + 26584 - 19968: jis0208<<14 | 0x23<<7 | 0x32, + 26585 - 19968: jis0212<<14 | 0x22<<7 | 0x20, + 26586 - 19968: jis0208<<14 | 0x2C<<7 | 0x0D, + 26588 - 19968: jis0212<<14 | 0x22<<7 | 0x21, + 26589 - 19968: jis0208<<14 | 0x3A<<7 | 0x30, + 26590 - 19968: jis0208<<14 | 0x3A<<7 | 0x2F, + 26593 - 19968: jis0212<<14 | 0x22<<7 | 0x22, + 26594 - 19968: jis0208<<14 | 0x3A<<7 | 0x31, + 26596 - 19968: jis0208<<14 | 0x3A<<7 | 0x2E, + 26598 - 19968: jis0212<<14 | 0x22<<7 | 0x23, + 26599 - 19968: jis0208<<14 | 0x3A<<7 | 0x36, + 26601 - 19968: jis0208<<14 | 0x3A<<7 | 0x2C, + 26604 - 19968: jis0208<<14 | 0x3A<<7 | 0x2A, + 26606 - 19968: jis0208<<14 | 0x3A<<7 | 0x32, + 26607 - 19968: jis0208<<14 | 0x3A<<7 | 0x28, + 26608 - 19968: jis0212<<14 | 0x22<<7 | 0x24, + 26609 - 19968: jis0208<<14 | 0x22<<7 | 0x4B, + 26610 - 19968: jis0212<<14 | 0x22<<7 | 0x25, + 26611 - 19968: jis0208<<14 | 0x2B<<7 | 0x57, + 26612 - 19968: jis0208<<14 | 0x1B<<7 | 0x25, + 26613 - 19968: jis0208<<14 | 0x19<<7 | 0x53, + 26614 - 19968: jis0212<<14 | 0x22<<7 | 0x26, + 26615 - 19968: jis0212<<14 | 0x22<<7 | 0x27, + 26617 - 19968: jis0212<<14 | 0x22<<7 | 0x17, + 26619 - 19968: jis0208<<14 | 0x19<<7 | 0x19, + 26622 - 19968: jis0208<<14 | 0x2A<<7 | 0x4E, + 26623 - 19968: jis0208<<14 | 0x12<<7 | 0x20, + 26625 - 19968: jis0208<<14 | 0x59<<7 | 0x2A, + 26626 - 19968: jis0208<<14 | 0x23<<7 | 0x2D, + 26627 - 19968: jis0208<<14 | 0x25<<7 | 0x29, + 26628 - 19968: jis0208<<14 | 0x10<<7 | 0x28, + 26643 - 19968: jis0208<<14 | 0x1F<<7 | 0x51, + 26644 - 19968: jis0212<<14 | 0x22<<7 | 0x29, + 26646 - 19968: jis0208<<14 | 0x1F<<7 | 0x13, + 26647 - 19968: jis0208<<14 | 0x16<<7 | 0x09, + 26649 - 19968: jis0212<<14 | 0x22<<7 | 0x2A, + 26653 - 19968: jis0212<<14 | 0x22<<7 | 0x2B, + 26654 - 19968: jis0208<<14 | 0x3A<<7 | 0x38, + 26655 - 19968: jis0212<<14 | 0x22<<7 | 0x2C, + 26657 - 19968: jis0208<<14 | 0x18<<7 | 0x1A, + 26658 - 19968: jis0208<<14 | 0x12<<7 | 0x5B, + 26663 - 19968: jis0212<<14 | 0x22<<7 | 0x2E, + 26664 - 19968: jis0212<<14 | 0x22<<7 | 0x2D, + 26665 - 19968: jis0208<<14 | 0x3A<<7 | 0x3A, + 26666 - 19968: jis0208<<14 | 0x12<<7 | 0x53, + 26667 - 19968: jis0208<<14 | 0x3A<<7 | 0x40, + 26668 - 19968: jis0212<<14 | 0x22<<7 | 0x2F, + 26669 - 19968: jis0212<<14 | 0x22<<7 | 0x30, + 26671 - 19968: jis0212<<14 | 0x22<<7 | 0x31, + 26672 - 19968: jis0212<<14 | 0x22<<7 | 0x32, + 26673 - 19968: jis0212<<14 | 0x22<<7 | 0x33, + 26674 - 19968: jis0208<<14 | 0x3A<<7 | 0x3D, + 26675 - 19968: jis0212<<14 | 0x22<<7 | 0x34, + 26676 - 19968: jis0208<<14 | 0x1F<<7 | 0x52, + 26680 - 19968: jis0208<<14 | 0x12<<7 | 0x2A, + 26681 - 19968: jis0208<<14 | 0x19<<7 | 0x0B, + 26683 - 19968: jis0212<<14 | 0x22<<7 | 0x35, + 26684 - 19968: jis0208<<14 | 0x12<<7 | 0x29, + 26685 - 19968: jis0208<<14 | 0x19<<7 | 0x2E, + 26687 - 19968: jis0212<<14 | 0x22<<7 | 0x36, + 26688 - 19968: jis0208<<14 | 0x3A<<7 | 0x3B, + 26689 - 19968: jis0208<<14 | 0x16<<7 | 0x44, + 26690 - 19968: jis0208<<14 | 0x16<<7 | 0x2A, + 26691 - 19968: jis0208<<14 | 0x24<<7 | 0x4C, + 26692 - 19968: jis0208<<14 | 0x59<<7 | 0x2B, + 26693 - 19968: jis0212<<14 | 0x22<<7 | 0x38, + 26694 - 19968: jis0208<<14 | 0x3A<<7 | 0x39, + 26696 - 19968: jis0208<<14 | 0x0F<<7 | 0x25, + 26698 - 19968: jis0212<<14 | 0x22<<7 | 0x39, + 26700 - 19968: jis0212<<14 | 0x22<<7 | 0x3A, + 26701 - 19968: jis0208<<14 | 0x3A<<7 | 0x3C, + 26702 - 19968: jis0208<<14 | 0x3A<<7 | 0x3E, + 26704 - 19968: jis0208<<14 | 0x15<<7 | 0x2C, + 26705 - 19968: jis0208<<14 | 0x16<<7 | 0x0B, + 26706 - 19968: jis0208<<14 | 0x59<<7 | 0x28, + 26707 - 19968: jis0208<<14 | 0x13<<7 | 0x1B, + 26708 - 19968: jis0208<<14 | 0x14<<7 | 0x2A, + 26709 - 19968: jis0212<<14 | 0x22<<7 | 0x3B, + 26711 - 19968: jis0212<<14 | 0x22<<7 | 0x3C, + 26712 - 19968: jis0212<<14 | 0x22<<7 | 0x3D, + 26713 - 19968: jis0208<<14 | 0x3A<<7 | 0x41, + 26715 - 19968: jis0212<<14 | 0x22<<7 | 0x3E, + 26716 - 19968: jis0208<<14 | 0x19<<7 | 0x58, + 26717 - 19968: jis0208<<14 | 0x2A<<7 | 0x50, + 26719 - 19968: jis0208<<14 | 0x1A<<7 | 0x16, + 26723 - 19968: jis0208<<14 | 0x3A<<7 | 0x42, + 26727 - 19968: jis0208<<14 | 0x28<<7 | 0x0F, + 26731 - 19968: jis0212<<14 | 0x22<<7 | 0x3F, + 26734 - 19968: jis0212<<14 | 0x22<<7 | 0x40, + 26735 - 19968: jis0212<<14 | 0x22<<7 | 0x41, + 26736 - 19968: jis0212<<14 | 0x22<<7 | 0x42, + 26737 - 19968: jis0212<<14 | 0x22<<7 | 0x43, + 26738 - 19968: jis0212<<14 | 0x22<<7 | 0x44, + 26740 - 19968: jis0208<<14 | 0x3A<<7 | 0x4E, + 26741 - 19968: jis0212<<14 | 0x22<<7 | 0x45, + 26742 - 19968: jis0208<<14 | 0x11<<7 | 0x12, + 26743 - 19968: jis0208<<14 | 0x3A<<7 | 0x43, + 26745 - 19968: jis0212<<14 | 0x22<<7 | 0x46, + 26746 - 19968: jis0212<<14 | 0x22<<7 | 0x47, + 26747 - 19968: jis0212<<14 | 0x22<<7 | 0x48, + 26748 - 19968: jis0212<<14 | 0x22<<7 | 0x49, + 26750 - 19968: jis0208<<14 | 0x3A<<7 | 0x54, + 26751 - 19968: jis0208<<14 | 0x3A<<7 | 0x44, + 26753 - 19968: jis0208<<14 | 0x2D<<7 | 0x21, + 26754 - 19968: jis0212<<14 | 0x22<<7 | 0x4A, + 26755 - 19968: jis0208<<14 | 0x3A<<7 | 0x4B, + 26756 - 19968: jis0212<<14 | 0x22<<7 | 0x4B, + 26757 - 19968: jis0208<<14 | 0x26<<7 | 0x3E, + 26758 - 19968: jis0212<<14 | 0x22<<7 | 0x4C, + 26760 - 19968: jis0212<<14 | 0x22<<7 | 0x4D, + 26765 - 19968: jis0208<<14 | 0x3A<<7 | 0x53, + 26767 - 19968: jis0208<<14 | 0x3A<<7 | 0x46, + 26771 - 19968: jis0208<<14 | 0x0F<<7 | 0x13, + 26772 - 19968: jis0208<<14 | 0x3A<<7 | 0x48, + 26774 - 19968: jis0212<<14 | 0x22<<7 | 0x4E, + 26775 - 19968: jis0208<<14 | 0x18<<7 | 0x1B, + 26776 - 19968: jis0212<<14 | 0x22<<7 | 0x4F, + 26778 - 19968: jis0212<<14 | 0x22<<7 | 0x50, + 26779 - 19968: jis0208<<14 | 0x3A<<7 | 0x4A, + 26780 - 19968: jis0212<<14 | 0x22<<7 | 0x51, + 26781 - 19968: jis0208<<14 | 0x3A<<7 | 0x49, + 26783 - 19968: jis0208<<14 | 0x3A<<7 | 0x45, + 26784 - 19968: jis0208<<14 | 0x3A<<7 | 0x50, + 26785 - 19968: jis0212<<14 | 0x22<<7 | 0x52, + 26786 - 19968: jis0208<<14 | 0x1D<<7 | 0x1E, + 26787 - 19968: jis0212<<14 | 0x22<<7 | 0x53, + 26789 - 19968: jis0212<<14 | 0x22<<7 | 0x54, + 26790 - 19968: jis0208<<14 | 0x33<<7 | 0x4C, + 26791 - 19968: jis0208<<14 | 0x17<<7 | 0x47, + 26792 - 19968: jis0208<<14 | 0x2C<<7 | 0x5B, + 26793 - 19968: jis0212<<14 | 0x22<<7 | 0x55, + 26794 - 19968: jis0212<<14 | 0x22<<7 | 0x56, + 26797 - 19968: jis0208<<14 | 0x3A<<7 | 0x47, + 26798 - 19968: jis0212<<14 | 0x22<<7 | 0x57, + 26799 - 19968: jis0208<<14 | 0x23<<7 | 0x53, + 26800 - 19968: jis0208<<14 | 0x12<<7 | 0x02, + 26801 - 19968: jis0208<<14 | 0x19<<7 | 0x0C, + 26802 - 19968: jis0212<<14 | 0x22<<7 | 0x58, + 26803 - 19968: jis0208<<14 | 0x3A<<7 | 0x3F, + 26805 - 19968: jis0208<<14 | 0x3A<<7 | 0x4F, + 26806 - 19968: jis0208<<14 | 0x12<<7 | 0x40, + 26809 - 19968: jis0208<<14 | 0x3A<<7 | 0x4D, + 26810 - 19968: jis0208<<14 | 0x3A<<7 | 0x51, + 26811 - 19968: jis0212<<14 | 0x22<<7 | 0x59, + 26812 - 19968: jis0208<<14 | 0x24<<7 | 0x4D, + 26820 - 19968: jis0208<<14 | 0x13<<7 | 0x5D, + 26821 - 19968: jis0212<<14 | 0x22<<7 | 0x5A, + 26822 - 19968: jis0208<<14 | 0x3B<<7 | 0x11, + 26824 - 19968: jis0208<<14 | 0x58<<7 | 0x08, + 26825 - 19968: jis0208<<14 | 0x2B<<7 | 0x28, + 26826 - 19968: jis0208<<14 | 0x3A<<7 | 0x56, + 26827 - 19968: jis0208<<14 | 0x13<<7 | 0x5C, + 26828 - 19968: jis0212<<14 | 0x22<<7 | 0x5C, + 26829 - 19968: jis0208<<14 | 0x3A<<7 | 0x5D, + 26831 - 19968: jis0208<<14 | 0x59<<7 | 0x2C, + 26832 - 19968: jis0212<<14 | 0x23<<7 | 0x00, + 26833 - 19968: jis0212<<14 | 0x23<<7 | 0x01, + 26834 - 19968: jis0208<<14 | 0x2A<<7 | 0x1F, + 26835 - 19968: jis0212<<14 | 0x23<<7 | 0x02, + 26836 - 19968: jis0208<<14 | 0x3B<<7 | 0x00, + 26837 - 19968: jis0208<<14 | 0x3B<<7 | 0x02, + 26838 - 19968: jis0212<<14 | 0x23<<7 | 0x03, + 26839 - 19968: jis0208<<14 | 0x3B<<7 | 0x06, + 26840 - 19968: jis0208<<14 | 0x3A<<7 | 0x58, + 26841 - 19968: jis0212<<14 | 0x23<<7 | 0x04, + 26842 - 19968: jis0208<<14 | 0x22<<7 | 0x09, + 26844 - 19968: jis0212<<14 | 0x23<<7 | 0x05, + 26845 - 19968: jis0212<<14 | 0x23<<7 | 0x06, + 26847 - 19968: jis0208<<14 | 0x24<<7 | 0x4E, + 26848 - 19968: jis0208<<14 | 0x3B<<7 | 0x0A, + 26849 - 19968: jis0208<<14 | 0x3A<<7 | 0x5B, + 26851 - 19968: jis0208<<14 | 0x3B<<7 | 0x07, + 26853 - 19968: jis0212<<14 | 0x23<<7 | 0x07, + 26855 - 19968: jis0208<<14 | 0x3B<<7 | 0x01, + 26856 - 19968: jis0212<<14 | 0x23<<7 | 0x08, + 26858 - 19968: jis0212<<14 | 0x23<<7 | 0x09, + 26859 - 19968: jis0212<<14 | 0x23<<7 | 0x0A, + 26860 - 19968: jis0212<<14 | 0x23<<7 | 0x0B, + 26861 - 19968: jis0212<<14 | 0x23<<7 | 0x0C, + 26862 - 19968: jis0208<<14 | 0x1E<<7 | 0x18, + 26863 - 19968: jis0208<<14 | 0x3B<<7 | 0x0B, + 26864 - 19968: jis0212<<14 | 0x23<<7 | 0x0D, + 26865 - 19968: jis0212<<14 | 0x23<<7 | 0x0E, + 26866 - 19968: jis0208<<14 | 0x1F<<7 | 0x12, + 26869 - 19968: jis0212<<14 | 0x23<<7 | 0x0F, + 26870 - 19968: jis0212<<14 | 0x23<<7 | 0x10, + 26873 - 19968: jis0208<<14 | 0x3B<<7 | 0x09, + 26874 - 19968: jis0208<<14 | 0x13<<7 | 0x1C, + 26875 - 19968: jis0212<<14 | 0x23<<7 | 0x11, + 26876 - 19968: jis0212<<14 | 0x23<<7 | 0x12, + 26877 - 19968: jis0212<<14 | 0x23<<7 | 0x13, + 26880 - 19968: jis0208<<14 | 0x2E<<7 | 0x2F, + 26881 - 19968: jis0208<<14 | 0x3A<<7 | 0x55, + 26884 - 19968: jis0208<<14 | 0x3B<<7 | 0x05, + 26885 - 19968: jis0208<<14 | 0x0F<<7 | 0x37, + 26886 - 19968: jis0212<<14 | 0x23<<7 | 0x14, + 26888 - 19968: jis0208<<14 | 0x3A<<7 | 0x57, + 26889 - 19968: jis0212<<14 | 0x23<<7 | 0x15, + 26890 - 19968: jis0212<<14 | 0x23<<7 | 0x16, + 26891 - 19968: jis0208<<14 | 0x2B<<7 | 0x19, + 26892 - 19968: jis0208<<14 | 0x3A<<7 | 0x5C, + 26893 - 19968: jis0208<<14 | 0x1E<<7 | 0x01, + 26894 - 19968: jis0208<<14 | 0x23<<7 | 0x26, + 26895 - 19968: jis0208<<14 | 0x3A<<7 | 0x52, + 26896 - 19968: jis0212<<14 | 0x23<<7 | 0x17, + 26897 - 19968: jis0212<<14 | 0x23<<7 | 0x18, + 26898 - 19968: jis0208<<14 | 0x3B<<7 | 0x04, + 26899 - 19968: jis0212<<14 | 0x23<<7 | 0x19, + 26902 - 19968: jis0212<<14 | 0x23<<7 | 0x1A, + 26903 - 19968: jis0212<<14 | 0x23<<7 | 0x1B, + 26905 - 19968: jis0208<<14 | 0x1E<<7 | 0x59, + 26906 - 19968: jis0208<<14 | 0x3B<<7 | 0x0E, + 26907 - 19968: jis0208<<14 | 0x12<<7 | 0x50, + 26908 - 19968: jis0208<<14 | 0x17<<7 | 0x00, + 26913 - 19968: jis0208<<14 | 0x3B<<7 | 0x10, + 26914 - 19968: jis0208<<14 | 0x3A<<7 | 0x59, + 26915 - 19968: jis0208<<14 | 0x3B<<7 | 0x0F, + 26917 - 19968: jis0208<<14 | 0x3B<<7 | 0x08, + 26918 - 19968: jis0208<<14 | 0x3A<<7 | 0x5A, + 26920 - 19968: jis0208<<14 | 0x3B<<7 | 0x0C, + 26922 - 19968: jis0208<<14 | 0x3B<<7 | 0x0D, + 26928 - 19968: jis0208<<14 | 0x3B<<7 | 0x1E, + 26929 - 19968: jis0212<<14 | 0x23<<7 | 0x1C, + 26931 - 19968: jis0212<<14 | 0x23<<7 | 0x1D, + 26932 - 19968: jis0208<<14 | 0x25<<7 | 0x2D, + 26933 - 19968: jis0212<<14 | 0x23<<7 | 0x1E, + 26934 - 19968: jis0208<<14 | 0x3B<<7 | 0x03, + 26936 - 19968: jis0212<<14 | 0x23<<7 | 0x1F, + 26937 - 19968: jis0208<<14 | 0x3B<<7 | 0x1A, + 26939 - 19968: jis0212<<14 | 0x23<<7 | 0x20, + 26941 - 19968: jis0208<<14 | 0x3B<<7 | 0x1C, + 26943 - 19968: jis0208<<14 | 0x23<<7 | 0x37, + 26946 - 19968: jis0212<<14 | 0x23<<7 | 0x21, + 26949 - 19968: jis0212<<14 | 0x23<<7 | 0x22, + 26953 - 19968: jis0212<<14 | 0x23<<7 | 0x23, + 26954 - 19968: jis0208<<14 | 0x2C<<7 | 0x2B, + 26958 - 19968: jis0212<<14 | 0x23<<7 | 0x24, + 26963 - 19968: jis0208<<14 | 0x28<<7 | 0x55, + 26964 - 19968: jis0208<<14 | 0x3B<<7 | 0x17, + 26965 - 19968: jis0208<<14 | 0x21<<7 | 0x29, + 26967 - 19968: jis0212<<14 | 0x23<<7 | 0x25, + 26969 - 19968: jis0208<<14 | 0x3B<<7 | 0x1D, + 26970 - 19968: jis0208<<14 | 0x20<<7 | 0x1E, + 26971 - 19968: jis0212<<14 | 0x23<<7 | 0x26, + 26972 - 19968: jis0208<<14 | 0x3B<<7 | 0x14, + 26973 - 19968: jis0208<<14 | 0x3B<<7 | 0x21, + 26974 - 19968: jis0208<<14 | 0x3B<<7 | 0x20, + 26976 - 19968: jis0208<<14 | 0x25<<7 | 0x4E, + 26977 - 19968: jis0208<<14 | 0x3B<<7 | 0x1F, + 26978 - 19968: jis0208<<14 | 0x25<<7 | 0x49, + 26979 - 19968: jis0212<<14 | 0x23<<7 | 0x27, + 26980 - 19968: jis0212<<14 | 0x23<<7 | 0x28, + 26981 - 19968: jis0212<<14 | 0x23<<7 | 0x29, + 26982 - 19968: jis0212<<14 | 0x23<<7 | 0x2A, + 26984 - 19968: jis0208<<14 | 0x59<<7 | 0x2E, + 26985 - 19968: jis0212<<14 | 0x23<<7 | 0x2C, + 26986 - 19968: jis0208<<14 | 0x3B<<7 | 0x23, + 26987 - 19968: jis0208<<14 | 0x3B<<7 | 0x16, + 26988 - 19968: jis0212<<14 | 0x23<<7 | 0x2D, + 26989 - 19968: jis0208<<14 | 0x15<<7 | 0x27, + 26990 - 19968: jis0208<<14 | 0x3B<<7 | 0x19, + 26991 - 19968: jis0208<<14 | 0x1C<<7 | 0x3C, + 26992 - 19968: jis0212<<14 | 0x23<<7 | 0x2E, + 26993 - 19968: jis0212<<14 | 0x23<<7 | 0x2F, + 26994 - 19968: jis0212<<14 | 0x23<<7 | 0x30, + 26995 - 19968: jis0208<<14 | 0x26<<7 | 0x3F, + 26996 - 19968: jis0208<<14 | 0x3B<<7 | 0x1B, + 26997 - 19968: jis0208<<14 | 0x15<<7 | 0x2A, + 26999 - 19968: jis0208<<14 | 0x3B<<7 | 0x13, + 27000 - 19968: jis0208<<14 | 0x3B<<7 | 0x15, + 27001 - 19968: jis0208<<14 | 0x3B<<7 | 0x12, + 27002 - 19968: jis0212<<14 | 0x23<<7 | 0x31, + 27003 - 19968: jis0212<<14 | 0x23<<7 | 0x32, + 27004 - 19968: jis0208<<14 | 0x2E<<7 | 0x0F, + 27005 - 19968: jis0208<<14 | 0x12<<7 | 0x39, + 27006 - 19968: jis0208<<14 | 0x3B<<7 | 0x18, + 27007 - 19968: jis0212<<14 | 0x23<<7 | 0x33, + 27008 - 19968: jis0212<<14 | 0x23<<7 | 0x34, + 27009 - 19968: jis0208<<14 | 0x3B<<7 | 0x22, + 27010 - 19968: jis0208<<14 | 0x12<<7 | 0x14, + 27018 - 19968: jis0208<<14 | 0x19<<7 | 0x46, + 27021 - 19968: jis0212<<14 | 0x23<<7 | 0x35, + 27022 - 19968: jis0208<<14 | 0x10<<7 | 0x3C, + 27025 - 19968: jis0208<<14 | 0x3B<<7 | 0x33, + 27026 - 19968: jis0212<<14 | 0x23<<7 | 0x36, + 27028 - 19968: jis0208<<14 | 0x2E<<7 | 0x10, + 27029 - 19968: jis0208<<14 | 0x3B<<7 | 0x36, + 27030 - 19968: jis0212<<14 | 0x23<<7 | 0x37, + 27032 - 19968: jis0208<<14 | 0x59<<7 | 0x30, + 27035 - 19968: jis0208<<14 | 0x1E<<7 | 0x19, + 27036 - 19968: jis0208<<14 | 0x3B<<7 | 0x35, + 27040 - 19968: jis0208<<14 | 0x3B<<7 | 0x34, + 27041 - 19968: jis0212<<14 | 0x23<<7 | 0x39, + 27045 - 19968: jis0212<<14 | 0x23<<7 | 0x3A, + 27046 - 19968: jis0212<<14 | 0x23<<7 | 0x3B, + 27047 - 19968: jis0208<<14 | 0x3B<<7 | 0x31, + 27048 - 19968: jis0212<<14 | 0x23<<7 | 0x3C, + 27051 - 19968: jis0212<<14 | 0x23<<7 | 0x3D, + 27053 - 19968: jis0212<<14 | 0x23<<7 | 0x3E, + 27054 - 19968: jis0208<<14 | 0x3B<<7 | 0x25, + 27055 - 19968: jis0212<<14 | 0x23<<7 | 0x3F, + 27057 - 19968: jis0208<<14 | 0x3B<<7 | 0x42, + 27058 - 19968: jis0208<<14 | 0x3B<<7 | 0x24, + 27060 - 19968: jis0208<<14 | 0x3B<<7 | 0x37, + 27063 - 19968: jis0212<<14 | 0x23<<7 | 0x40, + 27064 - 19968: jis0212<<14 | 0x23<<7 | 0x41, + 27066 - 19968: jis0212<<14 | 0x23<<7 | 0x42, + 27067 - 19968: jis0208<<14 | 0x3B<<7 | 0x2F, + 27068 - 19968: jis0212<<14 | 0x23<<7 | 0x43, + 27070 - 19968: jis0208<<14 | 0x3B<<7 | 0x2A, + 27071 - 19968: jis0208<<14 | 0x3B<<7 | 0x27, + 27073 - 19968: jis0208<<14 | 0x3B<<7 | 0x28, + 27075 - 19968: jis0208<<14 | 0x3B<<7 | 0x30, + 27077 - 19968: jis0212<<14 | 0x23<<7 | 0x44, + 27079 - 19968: jis0208<<14 | 0x53<<7 | 0x01, + 27080 - 19968: jis0212<<14 | 0x23<<7 | 0x45, + 27082 - 19968: jis0208<<14 | 0x3B<<7 | 0x2D, + 27083 - 19968: jis0208<<14 | 0x18<<7 | 0x1C, + 27084 - 19968: jis0208<<14 | 0x23<<7 | 0x27, + 27085 - 19968: jis0208<<14 | 0x20<<7 | 0x43, + 27086 - 19968: jis0208<<14 | 0x3B<<7 | 0x2B, + 27088 - 19968: jis0208<<14 | 0x3B<<7 | 0x26, + 27089 - 19968: jis0212<<14 | 0x23<<7 | 0x46, + 27091 - 19968: jis0208<<14 | 0x3B<<7 | 0x29, + 27094 - 19968: jis0212<<14 | 0x23<<7 | 0x47, + 27095 - 19968: jis0212<<14 | 0x23<<7 | 0x48, + 27096 - 19968: jis0208<<14 | 0x2C<<7 | 0x2C, + 27097 - 19968: jis0208<<14 | 0x2A<<7 | 0x49, + 27101 - 19968: jis0208<<14 | 0x3B<<7 | 0x2E, + 27102 - 19968: jis0208<<14 | 0x3B<<7 | 0x38, + 27106 - 19968: jis0208<<14 | 0x59<<7 | 0x31, + 27109 - 19968: jis0212<<14 | 0x23<<7 | 0x4A, + 27111 - 19968: jis0208<<14 | 0x3B<<7 | 0x40, + 27112 - 19968: jis0208<<14 | 0x3B<<7 | 0x39, + 27115 - 19968: jis0208<<14 | 0x3B<<7 | 0x46, + 27117 - 19968: jis0208<<14 | 0x3B<<7 | 0x44, + 27118 - 19968: jis0212<<14 | 0x23<<7 | 0x4B, + 27119 - 19968: jis0212<<14 | 0x23<<7 | 0x4C, + 27121 - 19968: jis0212<<14 | 0x23<<7 | 0x4D, + 27122 - 19968: jis0208<<14 | 0x3B<<7 | 0x3F, + 27123 - 19968: jis0212<<14 | 0x23<<7 | 0x4E, + 27125 - 19968: jis0212<<14 | 0x23<<7 | 0x4F, + 27129 - 19968: jis0208<<14 | 0x3B<<7 | 0x3E, + 27131 - 19968: jis0208<<14 | 0x23<<7 | 0x2F, + 27133 - 19968: jis0208<<14 | 0x20<<7 | 0x44, + 27134 - 19968: jis0212<<14 | 0x23<<7 | 0x50, + 27135 - 19968: jis0208<<14 | 0x3B<<7 | 0x3C, + 27136 - 19968: jis0212<<14 | 0x23<<7 | 0x51, + 27137 - 19968: jis0212<<14 | 0x23<<7 | 0x52, + 27138 - 19968: jis0208<<14 | 0x3B<<7 | 0x3A, + 27139 - 19968: jis0212<<14 | 0x23<<7 | 0x53, + 27141 - 19968: jis0208<<14 | 0x3B<<7 | 0x41, + 27146 - 19968: jis0208<<14 | 0x3B<<7 | 0x47, + 27147 - 19968: jis0208<<14 | 0x27<<7 | 0x54, + 27148 - 19968: jis0208<<14 | 0x3B<<7 | 0x4D, + 27151 - 19968: jis0212<<14 | 0x23<<7 | 0x54, + 27153 - 19968: jis0212<<14 | 0x23<<7 | 0x55, + 27154 - 19968: jis0208<<14 | 0x3B<<7 | 0x48, + 27155 - 19968: jis0208<<14 | 0x3B<<7 | 0x4B, + 27156 - 19968: jis0208<<14 | 0x3B<<7 | 0x45, + 27157 - 19968: jis0212<<14 | 0x23<<7 | 0x56, + 27159 - 19968: jis0208<<14 | 0x22<<7 | 0x53, + 27161 - 19968: jis0208<<14 | 0x28<<7 | 0x17, + 27162 - 19968: jis0212<<14 | 0x23<<7 | 0x57, + 27163 - 19968: jis0208<<14 | 0x3B<<7 | 0x3B, + 27165 - 19968: jis0212<<14 | 0x23<<7 | 0x58, + 27166 - 19968: jis0208<<14 | 0x3B<<7 | 0x43, + 27167 - 19968: jis0208<<14 | 0x1D<<7 | 0x1F, + 27168 - 19968: jis0212<<14 | 0x23<<7 | 0x59, + 27169 - 19968: jis0208<<14 | 0x2B<<7 | 0x2E, + 27170 - 19968: jis0208<<14 | 0x3B<<7 | 0x57, + 27171 - 19968: jis0208<<14 | 0x3B<<7 | 0x4A, + 27172 - 19968: jis0212<<14 | 0x23<<7 | 0x5A, + 27176 - 19968: jis0212<<14 | 0x23<<7 | 0x5B, + 27177 - 19968: jis0208<<14 | 0x17<<7 | 0x01, + 27178 - 19968: jis0208<<14 | 0x11<<7 | 0x02, + 27179 - 19968: jis0208<<14 | 0x12<<7 | 0x3E, + 27182 - 19968: jis0208<<14 | 0x3B<<7 | 0x32, + 27184 - 19968: jis0208<<14 | 0x59<<7 | 0x32, + 27186 - 19968: jis0212<<14 | 0x23<<7 | 0x5D, + 27188 - 19968: jis0212<<14 | 0x24<<7 | 0x00, + 27189 - 19968: jis0208<<14 | 0x1D<<7 | 0x20, + 27190 - 19968: jis0208<<14 | 0x3B<<7 | 0x4F, + 27191 - 19968: jis0212<<14 | 0x24<<7 | 0x01, + 27192 - 19968: jis0208<<14 | 0x3B<<7 | 0x56, + 27193 - 19968: jis0208<<14 | 0x1B<<7 | 0x58, + 27194 - 19968: jis0208<<14 | 0x12<<7 | 0x51, + 27195 - 19968: jis0212<<14 | 0x24<<7 | 0x02, + 27197 - 19968: jis0208<<14 | 0x22<<7 | 0x0D, + 27198 - 19968: jis0212<<14 | 0x24<<7 | 0x03, + 27199 - 19968: jis0212<<14 | 0x24<<7 | 0x04, + 27204 - 19968: jis0208<<14 | 0x3B<<7 | 0x4C, + 27205 - 19968: jis0212<<14 | 0x24<<7 | 0x05, + 27206 - 19968: jis0208<<14 | 0x59<<7 | 0x34, + 27207 - 19968: jis0208<<14 | 0x3B<<7 | 0x51, + 27208 - 19968: jis0208<<14 | 0x3B<<7 | 0x55, + 27209 - 19968: jis0212<<14 | 0x24<<7 | 0x07, + 27210 - 19968: jis0212<<14 | 0x24<<7 | 0x08, + 27211 - 19968: jis0208<<14 | 0x15<<7 | 0x15, + 27214 - 19968: jis0212<<14 | 0x24<<7 | 0x09, + 27216 - 19968: jis0212<<14 | 0x24<<7 | 0x0A, + 27217 - 19968: jis0212<<14 | 0x24<<7 | 0x0B, + 27218 - 19968: jis0212<<14 | 0x24<<7 | 0x0C, + 27221 - 19968: jis0212<<14 | 0x24<<7 | 0x0D, + 27222 - 19968: jis0212<<14 | 0x24<<7 | 0x0E, + 27224 - 19968: jis0208<<14 | 0x14<<7 | 0x2B, + 27225 - 19968: jis0208<<14 | 0x3B<<7 | 0x53, + 27227 - 19968: jis0212<<14 | 0x24<<7 | 0x0F, + 27231 - 19968: jis0208<<14 | 0x14<<7 | 0x00, + 27233 - 19968: jis0208<<14 | 0x25<<7 | 0x2A, + 27234 - 19968: jis0208<<14 | 0x3B<<7 | 0x52, + 27236 - 19968: jis0212<<14 | 0x24<<7 | 0x10, + 27238 - 19968: jis0208<<14 | 0x3B<<7 | 0x54, + 27239 - 19968: jis0212<<14 | 0x24<<7 | 0x11, + 27242 - 19968: jis0212<<14 | 0x24<<7 | 0x12, + 27243 - 19968: jis0208<<14 | 0x59<<7 | 0x33, + 27249 - 19968: jis0212<<14 | 0x24<<7 | 0x13, + 27250 - 19968: jis0208<<14 | 0x3B<<7 | 0x4E, + 27251 - 19968: jis0208<<14 | 0x59<<7 | 0x35, + 27256 - 19968: jis0208<<14 | 0x3B<<7 | 0x50, + 27262 - 19968: jis0208<<14 | 0x59<<7 | 0x36, + 27263 - 19968: jis0208<<14 | 0x12<<7 | 0x3F, + 27264 - 19968: jis0208<<14 | 0x22<<7 | 0x28, + 27265 - 19968: jis0212<<14 | 0x24<<7 | 0x16, + 27267 - 19968: jis0212<<14 | 0x24<<7 | 0x17, + 27268 - 19968: jis0208<<14 | 0x3B<<7 | 0x5B, + 27270 - 19968: jis0212<<14 | 0x24<<7 | 0x18, + 27271 - 19968: jis0212<<14 | 0x24<<7 | 0x19, + 27273 - 19968: jis0212<<14 | 0x24<<7 | 0x1A, + 27275 - 19968: jis0212<<14 | 0x24<<7 | 0x1B, + 27277 - 19968: jis0208<<14 | 0x3B<<7 | 0x59, + 27278 - 19968: jis0208<<14 | 0x17<<7 | 0x48, + 27280 - 19968: jis0208<<14 | 0x3B<<7 | 0x58, + 27281 - 19968: jis0212<<14 | 0x24<<7 | 0x1C, + 27287 - 19968: jis0208<<14 | 0x3C<<7 | 0x00, + 27291 - 19968: jis0212<<14 | 0x24<<7 | 0x1D, + 27292 - 19968: jis0208<<14 | 0x3A<<7 | 0x37, + 27293 - 19968: jis0212<<14 | 0x24<<7 | 0x1E, + 27294 - 19968: jis0212<<14 | 0x24<<7 | 0x1F, + 27295 - 19968: jis0212<<14 | 0x24<<7 | 0x20, + 27296 - 19968: jis0208<<14 | 0x3B<<7 | 0x5A, + 27298 - 19968: jis0208<<14 | 0x3B<<7 | 0x5C, + 27299 - 19968: jis0208<<14 | 0x3B<<7 | 0x5D, + 27301 - 19968: jis0212<<14 | 0x24<<7 | 0x21, + 27306 - 19968: jis0208<<14 | 0x3C<<7 | 0x0B, + 27307 - 19968: jis0212<<14 | 0x24<<7 | 0x22, + 27308 - 19968: jis0208<<14 | 0x3C<<7 | 0x07, + 27310 - 19968: jis0208<<14 | 0x3A<<7 | 0x4C, + 27311 - 19968: jis0212<<14 | 0x24<<7 | 0x23, + 27312 - 19968: jis0212<<14 | 0x24<<7 | 0x24, + 27313 - 19968: jis0212<<14 | 0x24<<7 | 0x25, + 27315 - 19968: jis0208<<14 | 0x3C<<7 | 0x06, + 27316 - 19968: jis0212<<14 | 0x24<<7 | 0x26, + 27320 - 19968: jis0208<<14 | 0x3C<<7 | 0x05, + 27323 - 19968: jis0208<<14 | 0x3C<<7 | 0x02, + 27325 - 19968: jis0212<<14 | 0x24<<7 | 0x27, + 27326 - 19968: jis0212<<14 | 0x24<<7 | 0x28, + 27327 - 19968: jis0212<<14 | 0x24<<7 | 0x29, + 27329 - 19968: jis0208<<14 | 0x3B<<7 | 0x49, + 27330 - 19968: jis0208<<14 | 0x3C<<7 | 0x04, + 27331 - 19968: jis0208<<14 | 0x3C<<7 | 0x03, + 27334 - 19968: jis0212<<14 | 0x24<<7 | 0x2A, + 27336 - 19968: jis0212<<14 | 0x24<<7 | 0x2C, + 27337 - 19968: jis0212<<14 | 0x24<<7 | 0x2B, + 27340 - 19968: jis0212<<14 | 0x24<<7 | 0x2D, + 27344 - 19968: jis0212<<14 | 0x24<<7 | 0x2E, + 27345 - 19968: jis0208<<14 | 0x3C<<7 | 0x09, + 27347 - 19968: jis0208<<14 | 0x2E<<7 | 0x05, + 27348 - 19968: jis0212<<14 | 0x24<<7 | 0x2F, + 27349 - 19968: jis0212<<14 | 0x24<<7 | 0x30, + 27350 - 19968: jis0212<<14 | 0x24<<7 | 0x31, + 27354 - 19968: jis0208<<14 | 0x3C<<7 | 0x0C, + 27355 - 19968: jis0208<<14 | 0x15<<7 | 0x5A, + 27356 - 19968: jis0212<<14 | 0x24<<7 | 0x32, + 27357 - 19968: jis0212<<14 | 0x24<<7 | 0x33, + 27358 - 19968: jis0208<<14 | 0x3C<<7 | 0x08, + 27359 - 19968: jis0208<<14 | 0x3C<<7 | 0x0A, + 27362 - 19968: jis0208<<14 | 0x59<<7 | 0x37, + 27364 - 19968: jis0208<<14 | 0x59<<7 | 0x38, + 27367 - 19968: jis0212<<14 | 0x24<<7 | 0x35, + 27368 - 19968: jis0208<<14 | 0x27<<7 | 0x06, + 27370 - 19968: jis0208<<14 | 0x3C<<7 | 0x0D, + 27372 - 19968: jis0212<<14 | 0x24<<7 | 0x36, + 27376 - 19968: jis0212<<14 | 0x24<<7 | 0x37, + 27377 - 19968: jis0212<<14 | 0x24<<7 | 0x38, + 27378 - 19968: jis0212<<14 | 0x24<<7 | 0x39, + 27386 - 19968: jis0208<<14 | 0x3C<<7 | 0x11, + 27387 - 19968: jis0208<<14 | 0x3C<<7 | 0x0E, + 27388 - 19968: jis0212<<14 | 0x24<<7 | 0x3A, + 27389 - 19968: jis0212<<14 | 0x24<<7 | 0x3B, + 27394 - 19968: jis0212<<14 | 0x24<<7 | 0x3C, + 27395 - 19968: jis0212<<14 | 0x24<<7 | 0x3D, + 27396 - 19968: jis0208<<14 | 0x2C<<7 | 0x52, + 27397 - 19968: jis0208<<14 | 0x3C<<7 | 0x0F, + 27398 - 19968: jis0212<<14 | 0x24<<7 | 0x3E, + 27399 - 19968: jis0212<<14 | 0x24<<7 | 0x3F, + 27401 - 19968: jis0212<<14 | 0x24<<7 | 0x40, + 27402 - 19968: jis0208<<14 | 0x3B<<7 | 0x3D, + 27407 - 19968: jis0212<<14 | 0x24<<7 | 0x41, + 27408 - 19968: jis0212<<14 | 0x24<<7 | 0x42, + 27409 - 19968: jis0212<<14 | 0x24<<7 | 0x43, + 27410 - 19968: jis0208<<14 | 0x3C<<7 | 0x12, + 27414 - 19968: jis0208<<14 | 0x3C<<7 | 0x13, + 27415 - 19968: jis0212<<14 | 0x24<<7 | 0x44, + 27419 - 19968: jis0212<<14 | 0x24<<7 | 0x45, + 27421 - 19968: jis0208<<14 | 0x10<<7 | 0x14, + 27422 - 19968: jis0212<<14 | 0x24<<7 | 0x46, + 27423 - 19968: jis0208<<14 | 0x3C<<7 | 0x15, + 27424 - 19968: jis0208<<14 | 0x16<<7 | 0x46, + 27425 - 19968: jis0208<<14 | 0x1B<<7 | 0x00, + 27427 - 19968: jis0208<<14 | 0x15<<7 | 0x34, + 27428 - 19968: jis0212<<14 | 0x24<<7 | 0x47, + 27431 - 19968: jis0208<<14 | 0x11<<7 | 0x03, + 27432 - 19968: jis0212<<14 | 0x24<<7 | 0x48, + 27435 - 19968: jis0212<<14 | 0x24<<7 | 0x49, + 27436 - 19968: jis0212<<14 | 0x24<<7 | 0x4A, + 27439 - 19968: jis0212<<14 | 0x24<<7 | 0x4B, + 27442 - 19968: jis0208<<14 | 0x2C<<7 | 0x3E, + 27445 - 19968: jis0212<<14 | 0x24<<7 | 0x4C, + 27446 - 19968: jis0212<<14 | 0x24<<7 | 0x4D, + 27447 - 19968: jis0208<<14 | 0x3C<<7 | 0x17, + 27448 - 19968: jis0208<<14 | 0x3C<<7 | 0x16, + 27449 - 19968: jis0208<<14 | 0x3C<<7 | 0x19, + 27450 - 19968: jis0208<<14 | 0x14<<7 | 0x1C, + 27451 - 19968: jis0212<<14 | 0x24<<7 | 0x4E, + 27453 - 19968: jis0208<<14 | 0x15<<7 | 0x35, + 27454 - 19968: jis0208<<14 | 0x13<<7 | 0x1D, + 27455 - 19968: jis0212<<14 | 0x24<<7 | 0x4F, + 27459 - 19968: jis0208<<14 | 0x3C<<7 | 0x1C, + 27462 - 19968: jis0212<<14 | 0x24<<7 | 0x50, + 27463 - 19968: jis0208<<14 | 0x3C<<7 | 0x1B, + 27465 - 19968: jis0208<<14 | 0x3C<<7 | 0x1D, + 27466 - 19968: jis0212<<14 | 0x24<<7 | 0x51, + 27468 - 19968: jis0208<<14 | 0x11<<7 | 0x2D, + 27469 - 19968: jis0212<<14 | 0x24<<7 | 0x52, + 27470 - 19968: jis0208<<14 | 0x22<<7 | 0x16, + 27472 - 19968: jis0208<<14 | 0x3C<<7 | 0x1E, + 27474 - 19968: jis0212<<14 | 0x24<<7 | 0x53, + 27475 - 19968: jis0208<<14 | 0x13<<7 | 0x1E, + 27476 - 19968: jis0208<<14 | 0x3C<<7 | 0x20, + 27478 - 19968: jis0212<<14 | 0x24<<7 | 0x54, + 27480 - 19968: jis0212<<14 | 0x24<<7 | 0x55, + 27481 - 19968: jis0208<<14 | 0x3C<<7 | 0x1F, + 27483 - 19968: jis0208<<14 | 0x3C<<7 | 0x21, + 27485 - 19968: jis0212<<14 | 0x24<<7 | 0x56, + 27487 - 19968: jis0208<<14 | 0x3C<<7 | 0x22, + 27488 - 19968: jis0212<<14 | 0x24<<7 | 0x57, + 27489 - 19968: jis0208<<14 | 0x3C<<7 | 0x23, + 27490 - 19968: jis0208<<14 | 0x1A<<7 | 0x3E, + 27491 - 19968: jis0208<<14 | 0x1F<<7 | 0x14, + 27492 - 19968: jis0208<<14 | 0x19<<7 | 0x00, + 27494 - 19968: jis0208<<14 | 0x28<<7 | 0x4F, + 27495 - 19968: jis0212<<14 | 0x24<<7 | 0x58, + 27497 - 19968: jis0208<<14 | 0x29<<7 | 0x41, + 27498 - 19968: jis0208<<14 | 0x2E<<7 | 0x23, + 27499 - 19968: jis0212<<14 | 0x24<<7 | 0x59, + 27502 - 19968: jis0212<<14 | 0x24<<7 | 0x5A, + 27503 - 19968: jis0208<<14 | 0x1A<<7 | 0x54, + 27504 - 19968: jis0212<<14 | 0x24<<7 | 0x5B, + 27507 - 19968: jis0208<<14 | 0x19<<7 | 0x2F, + 27508 - 19968: jis0208<<14 | 0x2D<<7 | 0x51, + 27509 - 19968: jis0212<<14 | 0x24<<7 | 0x5C, + 27512 - 19968: jis0208<<14 | 0x3C<<7 | 0x24, + 27513 - 19968: jis0208<<14 | 0x3C<<7 | 0x25, + 27515 - 19968: jis0208<<14 | 0x1A<<7 | 0x3F, + 27517 - 19968: jis0212<<14 | 0x24<<7 | 0x5D, + 27518 - 19968: jis0212<<14 | 0x25<<7 | 0x00, + 27519 - 19968: jis0208<<14 | 0x3C<<7 | 0x26, + 27520 - 19968: jis0208<<14 | 0x3C<<7 | 0x27, + 27522 - 19968: jis0212<<14 | 0x25<<7 | 0x01, + 27523 - 19968: jis0208<<14 | 0x3C<<7 | 0x29, + 27524 - 19968: jis0208<<14 | 0x3C<<7 | 0x28, + 27525 - 19968: jis0212<<14 | 0x25<<7 | 0x02, + 27526 - 19968: jis0208<<14 | 0x2A<<7 | 0x37, + 27529 - 19968: jis0208<<14 | 0x1C<<7 | 0x3D, + 27530 - 19968: jis0208<<14 | 0x1B<<7 | 0x4B, + 27531 - 19968: jis0208<<14 | 0x1A<<7 | 0x23, + 27533 - 19968: jis0208<<14 | 0x3C<<7 | 0x2A, + 27541 - 19968: jis0208<<14 | 0x3C<<7 | 0x2C, + 27542 - 19968: jis0208<<14 | 0x1E<<7 | 0x02, + 27543 - 19968: jis0212<<14 | 0x25<<7 | 0x03, + 27544 - 19968: jis0208<<14 | 0x3C<<7 | 0x2B, + 27547 - 19968: jis0212<<14 | 0x25<<7 | 0x04, + 27550 - 19968: jis0208<<14 | 0x3C<<7 | 0x2D, + 27551 - 19968: jis0212<<14 | 0x25<<7 | 0x05, + 27552 - 19968: jis0212<<14 | 0x25<<7 | 0x06, + 27554 - 19968: jis0212<<14 | 0x25<<7 | 0x07, + 27555 - 19968: jis0212<<14 | 0x25<<7 | 0x08, + 27556 - 19968: jis0208<<14 | 0x3C<<7 | 0x2E, + 27560 - 19968: jis0212<<14 | 0x25<<7 | 0x09, + 27561 - 19968: jis0212<<14 | 0x25<<7 | 0x0A, + 27562 - 19968: jis0208<<14 | 0x3C<<7 | 0x2F, + 27563 - 19968: jis0208<<14 | 0x3C<<7 | 0x30, + 27564 - 19968: jis0212<<14 | 0x25<<7 | 0x0B, + 27565 - 19968: jis0212<<14 | 0x25<<7 | 0x0C, + 27566 - 19968: jis0212<<14 | 0x25<<7 | 0x0D, + 27567 - 19968: jis0208<<14 | 0x3C<<7 | 0x31, + 27568 - 19968: jis0212<<14 | 0x25<<7 | 0x0E, + 27569 - 19968: jis0208<<14 | 0x3C<<7 | 0x33, + 27570 - 19968: jis0208<<14 | 0x3C<<7 | 0x32, + 27571 - 19968: jis0208<<14 | 0x3C<<7 | 0x34, + 27572 - 19968: jis0208<<14 | 0x11<<7 | 0x04, + 27573 - 19968: jis0208<<14 | 0x22<<7 | 0x29, + 27575 - 19968: jis0208<<14 | 0x3C<<7 | 0x35, + 27576 - 19968: jis0212<<14 | 0x25<<7 | 0x0F, + 27577 - 19968: jis0212<<14 | 0x25<<7 | 0x10, + 27578 - 19968: jis0208<<14 | 0x1A<<7 | 0x05, + 27579 - 19968: jis0208<<14 | 0x12<<7 | 0x2B, + 27580 - 19968: jis0208<<14 | 0x3C<<7 | 0x36, + 27581 - 19968: jis0212<<14 | 0x25<<7 | 0x11, + 27582 - 19968: jis0212<<14 | 0x25<<7 | 0x12, + 27583 - 19968: jis0208<<14 | 0x24<<7 | 0x21, + 27584 - 19968: jis0208<<14 | 0x33<<7 | 0x2B, + 27587 - 19968: jis0212<<14 | 0x25<<7 | 0x13, + 27588 - 19968: jis0212<<14 | 0x25<<7 | 0x14, + 27589 - 19968: jis0208<<14 | 0x14<<7 | 0x02, + 27590 - 19968: jis0208<<14 | 0x3C<<7 | 0x37, + 27593 - 19968: jis0212<<14 | 0x25<<7 | 0x15, + 27595 - 19968: jis0208<<14 | 0x3C<<7 | 0x38, + 27596 - 19968: jis0212<<14 | 0x25<<7 | 0x16, + 27597 - 19968: jis0208<<14 | 0x29<<7 | 0x4B, + 27598 - 19968: jis0208<<14 | 0x2A<<7 | 0x47, + 27602 - 19968: jis0208<<14 | 0x25<<7 | 0x26, + 27603 - 19968: jis0208<<14 | 0x3C<<7 | 0x39, + 27604 - 19968: jis0208<<14 | 0x27<<7 | 0x45, + 27606 - 19968: jis0208<<14 | 0x59<<7 | 0x39, + 27608 - 19968: jis0208<<14 | 0x27<<7 | 0x5A, + 27610 - 19968: jis0212<<14 | 0x25<<7 | 0x18, + 27611 - 19968: jis0208<<14 | 0x2B<<7 | 0x32, + 27615 - 19968: jis0208<<14 | 0x3C<<7 | 0x3A, + 27617 - 19968: jis0212<<14 | 0x25<<7 | 0x19, + 27619 - 19968: jis0212<<14 | 0x25<<7 | 0x1A, + 27622 - 19968: jis0212<<14 | 0x25<<7 | 0x1B, + 27623 - 19968: jis0212<<14 | 0x25<<7 | 0x1C, + 27627 - 19968: jis0208<<14 | 0x3C<<7 | 0x3C, + 27628 - 19968: jis0208<<14 | 0x3C<<7 | 0x3B, + 27630 - 19968: jis0212<<14 | 0x25<<7 | 0x1D, + 27631 - 19968: jis0208<<14 | 0x3C<<7 | 0x3E, + 27633 - 19968: jis0212<<14 | 0x25<<7 | 0x1E, + 27635 - 19968: jis0208<<14 | 0x3C<<7 | 0x3D, + 27639 - 19968: jis0212<<14 | 0x25<<7 | 0x1F, + 27641 - 19968: jis0212<<14 | 0x25<<7 | 0x20, + 27647 - 19968: jis0212<<14 | 0x25<<7 | 0x21, + 27650 - 19968: jis0212<<14 | 0x25<<7 | 0x22, + 27652 - 19968: jis0212<<14 | 0x25<<7 | 0x23, + 27653 - 19968: jis0212<<14 | 0x25<<7 | 0x24, + 27656 - 19968: jis0208<<14 | 0x3C<<7 | 0x40, + 27657 - 19968: jis0212<<14 | 0x25<<7 | 0x25, + 27661 - 19968: jis0212<<14 | 0x25<<7 | 0x26, + 27662 - 19968: jis0212<<14 | 0x25<<7 | 0x27, + 27663 - 19968: jis0208<<14 | 0x1A<<7 | 0x40, + 27664 - 19968: jis0212<<14 | 0x25<<7 | 0x28, + 27665 - 19968: jis0208<<14 | 0x2B<<7 | 0x10, + 27666 - 19968: jis0212<<14 | 0x25<<7 | 0x29, + 27667 - 19968: jis0208<<14 | 0x3C<<7 | 0x41, + 27668 - 19968: jis0208<<14 | 0x3C<<7 | 0x42, + 27671 - 19968: jis0208<<14 | 0x14<<7 | 0x03, + 27673 - 19968: jis0212<<14 | 0x25<<7 | 0x2A, + 27675 - 19968: jis0208<<14 | 0x3C<<7 | 0x43, + 27679 - 19968: jis0212<<14 | 0x25<<7 | 0x2B, + 27683 - 19968: jis0208<<14 | 0x3C<<7 | 0x45, + 27684 - 19968: jis0208<<14 | 0x3C<<7 | 0x44, + 27686 - 19968: jis0212<<14 | 0x25<<7 | 0x2C, + 27687 - 19968: jis0212<<14 | 0x25<<7 | 0x2D, + 27688 - 19968: jis0212<<14 | 0x25<<7 | 0x2E, + 27692 - 19968: jis0212<<14 | 0x25<<7 | 0x2F, + 27694 - 19968: jis0212<<14 | 0x25<<7 | 0x30, + 27699 - 19968: jis0212<<14 | 0x25<<7 | 0x31, + 27700 - 19968: jis0208<<14 | 0x1E<<7 | 0x44, + 27701 - 19968: jis0212<<14 | 0x25<<7 | 0x32, + 27702 - 19968: jis0212<<14 | 0x25<<7 | 0x33, + 27703 - 19968: jis0208<<14 | 0x28<<7 | 0x18, + 27704 - 19968: jis0208<<14 | 0x10<<7 | 0x29, + 27706 - 19968: jis0212<<14 | 0x25<<7 | 0x34, + 27707 - 19968: jis0212<<14 | 0x25<<7 | 0x35, + 27710 - 19968: jis0208<<14 | 0x27<<7 | 0x24, + 27711 - 19968: jis0208<<14 | 0x59<<7 | 0x3A, + 27712 - 19968: jis0208<<14 | 0x23<<7 | 0x54, + 27713 - 19968: jis0208<<14 | 0x1C<<7 | 0x20, + 27714 - 19968: jis0208<<14 | 0x14<<7 | 0x40, + 27722 - 19968: jis0212<<14 | 0x25<<7 | 0x37, + 27723 - 19968: jis0212<<14 | 0x25<<7 | 0x38, + 27725 - 19968: jis0212<<14 | 0x25<<7 | 0x39, + 27726 - 19968: jis0208<<14 | 0x27<<7 | 0x25, + 27727 - 19968: jis0212<<14 | 0x25<<7 | 0x3A, + 27728 - 19968: jis0208<<14 | 0x1B<<7 | 0x0D, + 27730 - 19968: jis0212<<14 | 0x25<<7 | 0x3B, + 27732 - 19968: jis0212<<14 | 0x25<<7 | 0x3C, + 27733 - 19968: jis0208<<14 | 0x3C<<7 | 0x47, + 27735 - 19968: jis0208<<14 | 0x13<<7 | 0x1F, + 27737 - 19968: jis0212<<14 | 0x25<<7 | 0x3D, + 27738 - 19968: jis0208<<14 | 0x10<<7 | 0x57, + 27739 - 19968: jis0212<<14 | 0x25<<7 | 0x3E, + 27740 - 19968: jis0208<<14 | 0x59<<7 | 0x3B, + 27741 - 19968: jis0208<<14 | 0x25<<7 | 0x51, + 27742 - 19968: jis0208<<14 | 0x3C<<7 | 0x46, + 27743 - 19968: jis0208<<14 | 0x18<<7 | 0x1D, + 27744 - 19968: jis0208<<14 | 0x22<<7 | 0x32, + 27746 - 19968: jis0208<<14 | 0x3C<<7 | 0x48, + 27751 - 19968: jis0212<<14 | 0x26<<7 | 0x15, + 27752 - 19968: jis0208<<14 | 0x3C<<7 | 0x50, + 27754 - 19968: jis0208<<14 | 0x3C<<7 | 0x49, + 27755 - 19968: jis0212<<14 | 0x25<<7 | 0x40, + 27757 - 19968: jis0212<<14 | 0x25<<7 | 0x41, + 27759 - 19968: jis0208<<14 | 0x59<<7 | 0x3D, + 27760 - 19968: jis0208<<14 | 0x21<<7 | 0x20, + 27762 - 19968: jis0208<<14 | 0x14<<7 | 0x41, + 27763 - 19968: jis0208<<14 | 0x3C<<7 | 0x51, + 27764 - 19968: jis0212<<14 | 0x25<<7 | 0x43, + 27766 - 19968: jis0212<<14 | 0x25<<7 | 0x44, + 27768 - 19968: jis0212<<14 | 0x25<<7 | 0x45, + 27769 - 19968: jis0212<<14 | 0x25<<7 | 0x46, + 27770 - 19968: jis0208<<14 | 0x16<<7 | 0x47, + 27771 - 19968: jis0212<<14 | 0x25<<7 | 0x47, + 27773 - 19968: jis0208<<14 | 0x14<<7 | 0x04, + 27774 - 19968: jis0208<<14 | 0x3C<<7 | 0x4F, + 27777 - 19968: jis0208<<14 | 0x3C<<7 | 0x4D, + 27778 - 19968: jis0208<<14 | 0x3C<<7 | 0x4A, + 27779 - 19968: jis0208<<14 | 0x2C<<7 | 0x3F, + 27781 - 19968: jis0212<<14 | 0x25<<7 | 0x48, + 27782 - 19968: jis0208<<14 | 0x59<<7 | 0x3C, + 27783 - 19968: jis0212<<14 | 0x25<<7 | 0x4A, + 27784 - 19968: jis0208<<14 | 0x23<<7 | 0x1F, + 27785 - 19968: jis0212<<14 | 0x25<<7 | 0x4B, + 27788 - 19968: jis0208<<14 | 0x25<<7 | 0x38, + 27789 - 19968: jis0208<<14 | 0x3C<<7 | 0x4B, + 27792 - 19968: jis0208<<14 | 0x3C<<7 | 0x53, + 27794 - 19968: jis0208<<14 | 0x3C<<7 | 0x52, + 27795 - 19968: jis0208<<14 | 0x16<<7 | 0x02, + 27796 - 19968: jis0212<<14 | 0x25<<7 | 0x4C, + 27797 - 19968: jis0212<<14 | 0x25<<7 | 0x4D, + 27798 - 19968: jis0208<<14 | 0x11<<7 | 0x0C, + 27799 - 19968: jis0212<<14 | 0x25<<7 | 0x4E, + 27800 - 19968: jis0212<<14 | 0x25<<7 | 0x4F, + 27801 - 19968: jis0208<<14 | 0x19<<7 | 0x1A, + 27802 - 19968: jis0208<<14 | 0x3C<<7 | 0x4C, + 27803 - 19968: jis0208<<14 | 0x3C<<7 | 0x4E, + 27804 - 19968: jis0212<<14 | 0x25<<7 | 0x50, + 27807 - 19968: jis0212<<14 | 0x25<<7 | 0x51, + 27809 - 19968: jis0208<<14 | 0x2A<<7 | 0x36, + 27810 - 19968: jis0208<<14 | 0x21<<7 | 0x53, + 27819 - 19968: jis0208<<14 | 0x2A<<7 | 0x56, + 27822 - 19968: jis0208<<14 | 0x3C<<7 | 0x5B, + 27824 - 19968: jis0212<<14 | 0x25<<7 | 0x52, + 27825 - 19968: jis0208<<14 | 0x3C<<7 | 0x5C, + 27826 - 19968: jis0212<<14 | 0x25<<7 | 0x53, + 27827 - 19968: jis0208<<14 | 0x11<<7 | 0x2E, + 27828 - 19968: jis0212<<14 | 0x25<<7 | 0x54, + 27832 - 19968: jis0208<<14 | 0x29<<7 | 0x07, + 27833 - 19968: jis0208<<14 | 0x2B<<7 | 0x5C, + 27834 - 19968: jis0208<<14 | 0x3D<<7 | 0x00, + 27835 - 19968: jis0208<<14 | 0x1B<<7 | 0x02, + 27836 - 19968: jis0208<<14 | 0x1D<<7 | 0x21, + 27837 - 19968: jis0208<<14 | 0x3C<<7 | 0x57, + 27838 - 19968: jis0208<<14 | 0x3C<<7 | 0x5D, + 27839 - 19968: jis0208<<14 | 0x10<<7 | 0x47, + 27841 - 19968: jis0208<<14 | 0x15<<7 | 0x16, + 27842 - 19968: jis0212<<14 | 0x25<<7 | 0x55, + 27844 - 19968: jis0208<<14 | 0x3C<<7 | 0x54, + 27845 - 19968: jis0208<<14 | 0x3C<<7 | 0x59, + 27846 - 19968: jis0212<<14 | 0x25<<7 | 0x56, + 27849 - 19968: jis0208<<14 | 0x1F<<7 | 0x53, + 27850 - 19968: jis0208<<14 | 0x26<<7 | 0x50, + 27852 - 19968: jis0208<<14 | 0x27<<7 | 0x46, + 27853 - 19968: jis0212<<14 | 0x25<<7 | 0x57, + 27855 - 19968: jis0212<<14 | 0x25<<7 | 0x58, + 27856 - 19968: jis0212<<14 | 0x25<<7 | 0x59, + 27857 - 19968: jis0212<<14 | 0x25<<7 | 0x5A, + 27858 - 19968: jis0212<<14 | 0x25<<7 | 0x5B, + 27859 - 19968: jis0208<<14 | 0x3C<<7 | 0x56, + 27860 - 19968: jis0212<<14 | 0x25<<7 | 0x5C, + 27861 - 19968: jis0208<<14 | 0x2A<<7 | 0x00, + 27862 - 19968: jis0212<<14 | 0x25<<7 | 0x5D, + 27863 - 19968: jis0208<<14 | 0x3C<<7 | 0x58, + 27865 - 19968: jis0208<<14 | 0x3D<<7 | 0x03, + 27866 - 19968: jis0208<<14 | 0x59<<7 | 0x3E, + 27867 - 19968: jis0208<<14 | 0x3D<<7 | 0x01, + 27868 - 19968: jis0212<<14 | 0x26<<7 | 0x01, + 27869 - 19968: jis0208<<14 | 0x3C<<7 | 0x5A, + 27872 - 19968: jis0212<<14 | 0x26<<7 | 0x02, + 27873 - 19968: jis0208<<14 | 0x2A<<7 | 0x01, + 27874 - 19968: jis0208<<14 | 0x26<<7 | 0x27, + 27875 - 19968: jis0208<<14 | 0x14<<7 | 0x42, + 27877 - 19968: jis0208<<14 | 0x24<<7 | 0x04, + 27879 - 19968: jis0212<<14 | 0x26<<7 | 0x03, + 27880 - 19968: jis0208<<14 | 0x22<<7 | 0x4C, + 27881 - 19968: jis0212<<14 | 0x26<<7 | 0x04, + 27882 - 19968: jis0208<<14 | 0x3D<<7 | 0x04, + 27883 - 19968: jis0212<<14 | 0x26<<7 | 0x05, + 27884 - 19968: jis0212<<14 | 0x26<<7 | 0x06, + 27886 - 19968: jis0212<<14 | 0x26<<7 | 0x07, + 27887 - 19968: jis0208<<14 | 0x3D<<7 | 0x02, + 27888 - 19968: jis0208<<14 | 0x21<<7 | 0x38, + 27889 - 19968: jis0208<<14 | 0x3C<<7 | 0x55, + 27890 - 19968: jis0212<<14 | 0x26<<7 | 0x08, + 27891 - 19968: jis0208<<14 | 0x10<<7 | 0x2A, + 27892 - 19968: jis0212<<14 | 0x26<<7 | 0x09, + 27908 - 19968: jis0208<<14 | 0x59<<7 | 0x3F, + 27911 - 19968: jis0212<<14 | 0x26<<7 | 0x0B, + 27914 - 19968: jis0212<<14 | 0x26<<7 | 0x0C, + 27915 - 19968: jis0208<<14 | 0x2C<<7 | 0x2D, + 27916 - 19968: jis0208<<14 | 0x3D<<7 | 0x0F, + 27918 - 19968: jis0212<<14 | 0x26<<7 | 0x0D, + 27919 - 19968: jis0212<<14 | 0x26<<7 | 0x0E, + 27921 - 19968: jis0212<<14 | 0x26<<7 | 0x0F, + 27922 - 19968: jis0208<<14 | 0x3D<<7 | 0x0E, + 27923 - 19968: jis0212<<14 | 0x26<<7 | 0x10, + 27927 - 19968: jis0208<<14 | 0x1F<<7 | 0x55, + 27929 - 19968: jis0208<<14 | 0x3D<<7 | 0x0B, + 27930 - 19968: jis0212<<14 | 0x26<<7 | 0x11, + 27931 - 19968: jis0208<<14 | 0x2C<<7 | 0x4B, + 27934 - 19968: jis0208<<14 | 0x25<<7 | 0x15, + 27935 - 19968: jis0208<<14 | 0x3D<<7 | 0x05, + 27941 - 19968: jis0208<<14 | 0x23<<7 | 0x24, + 27942 - 19968: jis0212<<14 | 0x26<<7 | 0x12, + 27943 - 19968: jis0212<<14 | 0x26<<7 | 0x13, + 27944 - 19968: jis0212<<14 | 0x26<<7 | 0x14, + 27945 - 19968: jis0208<<14 | 0x10<<7 | 0x2B, + 27946 - 19968: jis0208<<14 | 0x18<<7 | 0x1E, + 27947 - 19968: jis0208<<14 | 0x3D<<7 | 0x08, + 27950 - 19968: jis0212<<14 | 0x26<<7 | 0x16, + 27951 - 19968: jis0212<<14 | 0x26<<7 | 0x17, + 27953 - 19968: jis0212<<14 | 0x26<<7 | 0x18, + 27954 - 19968: jis0208<<14 | 0x1C<<7 | 0x06, + 27955 - 19968: jis0208<<14 | 0x3D<<7 | 0x0D, + 27957 - 19968: jis0208<<14 | 0x3D<<7 | 0x0C, + 27958 - 19968: jis0208<<14 | 0x3D<<7 | 0x07, + 27960 - 19968: jis0208<<14 | 0x3D<<7 | 0x0A, + 27961 - 19968: jis0212<<14 | 0x26<<7 | 0x19, + 27963 - 19968: jis0208<<14 | 0x12<<7 | 0x47, + 27964 - 19968: jis0212<<14 | 0x26<<7 | 0x1A, + 27965 - 19968: jis0208<<14 | 0x3D<<7 | 0x09, + 27966 - 19968: jis0208<<14 | 0x26<<7 | 0x28, + 27967 - 19968: jis0212<<14 | 0x26<<7 | 0x1B, + 27969 - 19968: jis0208<<14 | 0x2D<<7 | 0x0D, + 27972 - 19968: jis0208<<14 | 0x1D<<7 | 0x53, + 27973 - 19968: jis0208<<14 | 0x1F<<7 | 0x54, + 27991 - 19968: jis0212<<14 | 0x26<<7 | 0x1C, + 27993 - 19968: jis0208<<14 | 0x3D<<7 | 0x15, + 27994 - 19968: jis0208<<14 | 0x3D<<7 | 0x13, + 27996 - 19968: jis0208<<14 | 0x28<<7 | 0x2C, + 27998 - 19968: jis0212<<14 | 0x26<<7 | 0x1D, + 27999 - 19968: jis0212<<14 | 0x26<<7 | 0x1E, + 28001 - 19968: jis0212<<14 | 0x26<<7 | 0x1F, + 28003 - 19968: jis0208<<14 | 0x3D<<7 | 0x10, + 28004 - 19968: jis0208<<14 | 0x3D<<7 | 0x12, + 28005 - 19968: jis0212<<14 | 0x26<<7 | 0x20, + 28006 - 19968: jis0208<<14 | 0x10<<7 | 0x19, + 28007 - 19968: jis0212<<14 | 0x26<<7 | 0x21, + 28009 - 19968: jis0208<<14 | 0x18<<7 | 0x1F, + 28010 - 19968: jis0208<<14 | 0x2E<<7 | 0x11, + 28012 - 19968: jis0208<<14 | 0x12<<7 | 0x1C, + 28014 - 19968: jis0208<<14 | 0x28<<7 | 0x41, + 28015 - 19968: jis0208<<14 | 0x59<<7 | 0x41, + 28016 - 19968: jis0212<<14 | 0x26<<7 | 0x23, + 28020 - 19968: jis0208<<14 | 0x2C<<7 | 0x40, + 28023 - 19968: jis0208<<14 | 0x12<<7 | 0x03, + 28024 - 19968: jis0208<<14 | 0x1E<<7 | 0x1A, + 28025 - 19968: jis0208<<14 | 0x3D<<7 | 0x14, + 28028 - 19968: jis0212<<14 | 0x26<<7 | 0x24, + 28034 - 19968: jis0212<<14 | 0x26<<7 | 0x25, + 28037 - 19968: jis0208<<14 | 0x3D<<7 | 0x19, + 28039 - 19968: jis0208<<14 | 0x59<<7 | 0x40, + 28040 - 19968: jis0208<<14 | 0x1D<<7 | 0x22, + 28044 - 19968: jis0208<<14 | 0x2C<<7 | 0x0F, + 28046 - 19968: jis0208<<14 | 0x3D<<7 | 0x16, + 28049 - 19968: jis0212<<14 | 0x26<<7 | 0x27, + 28050 - 19968: jis0212<<14 | 0x26<<7 | 0x28, + 28051 - 19968: jis0208<<14 | 0x3D<<7 | 0x11, + 28052 - 19968: jis0212<<14 | 0x26<<7 | 0x29, + 28053 - 19968: jis0208<<14 | 0x3D<<7 | 0x17, + 28054 - 19968: jis0208<<14 | 0x59<<7 | 0x42, + 28055 - 19968: jis0212<<14 | 0x26<<7 | 0x2B, + 28056 - 19968: jis0212<<14 | 0x26<<7 | 0x2C, + 28057 - 19968: jis0208<<14 | 0x2D<<7 | 0x3D, + 28059 - 19968: jis0208<<14 | 0x24<<7 | 0x52, + 28060 - 19968: jis0208<<14 | 0x25<<7 | 0x21, + 28074 - 19968: jis0212<<14 | 0x26<<7 | 0x2D, + 28076 - 19968: jis0208<<14 | 0x59<<7 | 0x43, + 28079 - 19968: jis0208<<14 | 0x12<<7 | 0x15, + 28082 - 19968: jis0208<<14 | 0x10<<7 | 0x34, + 28084 - 19968: jis0212<<14 | 0x26<<7 | 0x2F, + 28085 - 19968: jis0208<<14 | 0x3D<<7 | 0x1D, + 28087 - 19968: jis0212<<14 | 0x26<<7 | 0x30, + 28088 - 19968: jis0208<<14 | 0x3D<<7 | 0x20, + 28089 - 19968: jis0212<<14 | 0x26<<7 | 0x31, + 28092 - 19968: jis0208<<14 | 0x2D<<7 | 0x22, + 28093 - 19968: jis0212<<14 | 0x26<<7 | 0x32, + 28095 - 19968: jis0212<<14 | 0x26<<7 | 0x33, + 28096 - 19968: jis0208<<14 | 0x2C<<7 | 0x43, + 28100 - 19968: jis0212<<14 | 0x26<<7 | 0x34, + 28101 - 19968: jis0208<<14 | 0x3D<<7 | 0x27, + 28102 - 19968: jis0208<<14 | 0x3D<<7 | 0x21, + 28103 - 19968: jis0208<<14 | 0x3D<<7 | 0x1E, + 28104 - 19968: jis0212<<14 | 0x26<<7 | 0x35, + 28106 - 19968: jis0212<<14 | 0x26<<7 | 0x36, + 28107 - 19968: jis0208<<14 | 0x2D<<7 | 0x33, + 28108 - 19968: jis0208<<14 | 0x3D<<7 | 0x24, + 28110 - 19968: jis0212<<14 | 0x26<<7 | 0x37, + 28111 - 19968: jis0208<<14 | 0x59<<7 | 0x44, + 28113 - 19968: jis0208<<14 | 0x1C<<7 | 0x29, + 28114 - 19968: jis0208<<14 | 0x3D<<7 | 0x26, + 28117 - 19968: jis0208<<14 | 0x3D<<7 | 0x2B, + 28118 - 19968: jis0212<<14 | 0x26<<7 | 0x39, + 28120 - 19968: jis0208<<14 | 0x24<<7 | 0x50, + 28121 - 19968: jis0208<<14 | 0x3D<<7 | 0x29, + 28123 - 19968: jis0212<<14 | 0x26<<7 | 0x3A, + 28125 - 19968: jis0212<<14 | 0x26<<7 | 0x3B, + 28126 - 19968: jis0208<<14 | 0x3D<<7 | 0x23, + 28127 - 19968: jis0212<<14 | 0x26<<7 | 0x3C, + 28128 - 19968: jis0212<<14 | 0x26<<7 | 0x3D, + 28129 - 19968: jis0208<<14 | 0x22<<7 | 0x17, + 28130 - 19968: jis0212<<14 | 0x26<<7 | 0x3E, + 28132 - 19968: jis0208<<14 | 0x3D<<7 | 0x2A, + 28133 - 19968: jis0212<<14 | 0x26<<7 | 0x3F, + 28134 - 19968: jis0208<<14 | 0x3D<<7 | 0x1F, + 28136 - 19968: jis0208<<14 | 0x3D<<7 | 0x25, + 28137 - 19968: jis0212<<14 | 0x26<<7 | 0x40, + 28138 - 19968: jis0208<<14 | 0x3D<<7 | 0x2C, + 28139 - 19968: jis0208<<14 | 0x0F<<7 | 0x5B, + 28140 - 19968: jis0208<<14 | 0x3D<<7 | 0x22, + 28142 - 19968: jis0208<<14 | 0x3D<<7 | 0x2D, + 28143 - 19968: jis0212<<14 | 0x26<<7 | 0x41, + 28144 - 19968: jis0212<<14 | 0x26<<7 | 0x42, + 28145 - 19968: jis0208<<14 | 0x1E<<7 | 0x1B, + 28146 - 19968: jis0208<<14 | 0x59<<7 | 0x46, + 28147 - 19968: jis0208<<14 | 0x1C<<7 | 0x3E, + 28148 - 19968: jis0212<<14 | 0x26<<7 | 0x43, + 28149 - 19968: jis0208<<14 | 0x29<<7 | 0x04, + 28150 - 19968: jis0212<<14 | 0x26<<7 | 0x44, + 28151 - 19968: jis0208<<14 | 0x19<<7 | 0x0D, + 28152 - 19968: jis0208<<14 | 0x59<<7 | 0x45, + 28153 - 19968: jis0208<<14 | 0x3D<<7 | 0x1A, + 28154 - 19968: jis0208<<14 | 0x3D<<7 | 0x28, + 28155 - 19968: jis0208<<14 | 0x24<<7 | 0x19, + 28156 - 19968: jis0208<<14 | 0x59<<7 | 0x47, + 28160 - 19968: jis0212<<14 | 0x26<<7 | 0x46, + 28164 - 19968: jis0212<<14 | 0x26<<7 | 0x47, + 28165 - 19968: jis0208<<14 | 0x1F<<7 | 0x15, + 28167 - 19968: jis0208<<14 | 0x12<<7 | 0x48, + 28168 - 19968: jis0208<<14 | 0x19<<7 | 0x30, + 28169 - 19968: jis0208<<14 | 0x1D<<7 | 0x23, + 28170 - 19968: jis0208<<14 | 0x3D<<7 | 0x1C, + 28171 - 19968: jis0208<<14 | 0x1C<<7 | 0x21, + 28179 - 19968: jis0208<<14 | 0x16<<7 | 0x2B, + 28181 - 19968: jis0208<<14 | 0x3D<<7 | 0x1B, + 28185 - 19968: jis0208<<14 | 0x3D<<7 | 0x31, + 28186 - 19968: jis0208<<14 | 0x1C<<7 | 0x4C, + 28187 - 19968: jis0208<<14 | 0x17<<7 | 0x19, + 28189 - 19968: jis0208<<14 | 0x3D<<7 | 0x40, + 28190 - 19968: jis0212<<14 | 0x26<<7 | 0x48, + 28191 - 19968: jis0208<<14 | 0x3D<<7 | 0x3A, + 28192 - 19968: jis0208<<14 | 0x14<<7 | 0x53, + 28193 - 19968: jis0208<<14 | 0x24<<7 | 0x2E, + 28194 - 19968: jis0212<<14 | 0x26<<7 | 0x49, + 28195 - 19968: jis0208<<14 | 0x3D<<7 | 0x35, + 28196 - 19968: jis0208<<14 | 0x3D<<7 | 0x3E, + 28197 - 19968: jis0208<<14 | 0x0F<<7 | 0x0E, + 28198 - 19968: jis0208<<14 | 0x10<<7 | 0x11, + 28199 - 19968: jis0208<<14 | 0x59<<7 | 0x4A, + 28201 - 19968: jis0208<<14 | 0x11<<7 | 0x18, + 28203 - 19968: jis0208<<14 | 0x3D<<7 | 0x37, + 28204 - 19968: jis0208<<14 | 0x21<<7 | 0x0B, + 28205 - 19968: jis0208<<14 | 0x3D<<7 | 0x2E, + 28206 - 19968: jis0208<<14 | 0x3D<<7 | 0x30, + 28207 - 19968: jis0208<<14 | 0x18<<7 | 0x20, + 28210 - 19968: jis0212<<14 | 0x26<<7 | 0x4B, + 28214 - 19968: jis0212<<14 | 0x26<<7 | 0x4C, + 28216 - 19968: jis0208<<14 | 0x3D<<7 | 0x41, + 28217 - 19968: jis0208<<14 | 0x59<<7 | 0x48, + 28218 - 19968: jis0208<<14 | 0x3D<<7 | 0x3C, + 28219 - 19968: jis0212<<14 | 0x26<<7 | 0x4E, + 28220 - 19968: jis0208<<14 | 0x59<<7 | 0x4B, + 28222 - 19968: jis0208<<14 | 0x3D<<7 | 0x34, + 28227 - 19968: jis0208<<14 | 0x3D<<7 | 0x3B, + 28228 - 19968: jis0212<<14 | 0x26<<7 | 0x50, + 28229 - 19968: jis0212<<14 | 0x26<<7 | 0x51, + 28232 - 19968: jis0212<<14 | 0x26<<7 | 0x52, + 28233 - 19968: jis0212<<14 | 0x26<<7 | 0x53, + 28234 - 19968: jis0208<<14 | 0x2B<<7 | 0x0A, + 28235 - 19968: jis0212<<14 | 0x26<<7 | 0x54, + 28237 - 19968: jis0208<<14 | 0x3D<<7 | 0x39, + 28238 - 19968: jis0208<<14 | 0x3D<<7 | 0x3D, + 28239 - 19968: jis0212<<14 | 0x26<<7 | 0x55, + 28241 - 19968: jis0212<<14 | 0x26<<7 | 0x56, + 28242 - 19968: jis0212<<14 | 0x26<<7 | 0x57, + 28243 - 19968: jis0212<<14 | 0x26<<7 | 0x58, + 28244 - 19968: jis0212<<14 | 0x26<<7 | 0x59, + 28246 - 19968: jis0208<<14 | 0x17<<7 | 0x2F, + 28247 - 19968: jis0212<<14 | 0x26<<7 | 0x5A, + 28248 - 19968: jis0208<<14 | 0x1D<<7 | 0x24, + 28251 - 19968: jis0208<<14 | 0x22<<7 | 0x18, + 28252 - 19968: jis0208<<14 | 0x59<<7 | 0x49, + 28253 - 19968: jis0212<<14 | 0x26<<7 | 0x5C, + 28254 - 19968: jis0212<<14 | 0x26<<7 | 0x5D, + 28255 - 19968: jis0208<<14 | 0x3D<<7 | 0x33, + 28258 - 19968: jis0212<<14 | 0x27<<7 | 0x00, + 28259 - 19968: jis0212<<14 | 0x27<<7 | 0x01, + 28263 - 19968: jis0208<<14 | 0x2C<<7 | 0x0E, + 28264 - 19968: jis0212<<14 | 0x27<<7 | 0x02, + 28267 - 19968: jis0208<<14 | 0x3D<<7 | 0x36, + 28270 - 19968: jis0208<<14 | 0x3D<<7 | 0x2F, + 28271 - 19968: jis0208<<14 | 0x24<<7 | 0x51, + 28274 - 19968: jis0208<<14 | 0x3D<<7 | 0x32, + 28275 - 19968: jis0212<<14 | 0x27<<7 | 0x03, + 28278 - 19968: jis0208<<14 | 0x3D<<7 | 0x38, + 28283 - 19968: jis0212<<14 | 0x27<<7 | 0x04, + 28285 - 19968: jis0212<<14 | 0x27<<7 | 0x05, + 28286 - 19968: jis0208<<14 | 0x2E<<7 | 0x30, + 28287 - 19968: jis0208<<14 | 0x1B<<7 | 0x1D, + 28288 - 19968: jis0208<<14 | 0x2A<<7 | 0x5D, + 28290 - 19968: jis0208<<14 | 0x3D<<7 | 0x42, + 28300 - 19968: jis0208<<14 | 0x27<<7 | 0x0D, + 28301 - 19968: jis0212<<14 | 0x27<<7 | 0x06, + 28303 - 19968: jis0208<<14 | 0x3D<<7 | 0x4E, + 28304 - 19968: jis0208<<14 | 0x17<<7 | 0x1A, + 28307 - 19968: jis0212<<14 | 0x27<<7 | 0x07, + 28310 - 19968: jis0208<<14 | 0x1C<<7 | 0x3F, + 28312 - 19968: jis0208<<14 | 0x3D<<7 | 0x44, + 28313 - 19968: jis0212<<14 | 0x27<<7 | 0x08, + 28316 - 19968: jis0208<<14 | 0x2D<<7 | 0x0E, + 28317 - 19968: jis0208<<14 | 0x18<<7 | 0x21, + 28319 - 19968: jis0208<<14 | 0x3D<<7 | 0x51, + 28320 - 19968: jis0212<<14 | 0x27<<7 | 0x09, + 28322 - 19968: jis0208<<14 | 0x0F<<7 | 0x4D, + 28325 - 19968: jis0208<<14 | 0x3D<<7 | 0x4F, + 28327 - 19968: jis0212<<14 | 0x27<<7 | 0x0A, + 28330 - 19968: jis0208<<14 | 0x3D<<7 | 0x43, + 28333 - 19968: jis0212<<14 | 0x27<<7 | 0x0B, + 28334 - 19968: jis0212<<14 | 0x27<<7 | 0x0C, + 28335 - 19968: jis0208<<14 | 0x3D<<7 | 0x49, + 28337 - 19968: jis0212<<14 | 0x27<<7 | 0x0D, + 28338 - 19968: jis0208<<14 | 0x3D<<7 | 0x4B, + 28339 - 19968: jis0212<<14 | 0x27<<7 | 0x0E, + 28342 - 19968: jis0208<<14 | 0x2C<<7 | 0x2E, + 28343 - 19968: jis0208<<14 | 0x3D<<7 | 0x46, + 28346 - 19968: jis0208<<14 | 0x24<<7 | 0x0D, + 28347 - 19968: jis0212<<14 | 0x27<<7 | 0x0F, + 28349 - 19968: jis0208<<14 | 0x3D<<7 | 0x48, + 28351 - 19968: jis0208<<14 | 0x59<<7 | 0x4C, + 28352 - 19968: jis0212<<14 | 0x27<<7 | 0x11, + 28353 - 19968: jis0212<<14 | 0x27<<7 | 0x12, + 28354 - 19968: jis0208<<14 | 0x3D<<7 | 0x50, + 28355 - 19968: jis0212<<14 | 0x27<<7 | 0x13, + 28356 - 19968: jis0208<<14 | 0x3D<<7 | 0x4A, + 28357 - 19968: jis0208<<14 | 0x2B<<7 | 0x26, + 28359 - 19968: jis0212<<14 | 0x27<<7 | 0x14, + 28360 - 19968: jis0212<<14 | 0x27<<7 | 0x15, + 28361 - 19968: jis0208<<14 | 0x3D<<7 | 0x45, + 28362 - 19968: jis0212<<14 | 0x27<<7 | 0x16, + 28363 - 19968: jis0208<<14 | 0x1B<<7 | 0x01, + 28364 - 19968: jis0208<<14 | 0x3D<<7 | 0x5D, + 28365 - 19968: jis0212<<14 | 0x27<<7 | 0x17, + 28366 - 19968: jis0212<<14 | 0x27<<7 | 0x18, + 28367 - 19968: jis0212<<14 | 0x27<<7 | 0x19, + 28369 - 19968: jis0208<<14 | 0x12<<7 | 0x49, + 28371 - 19968: jis0208<<14 | 0x3D<<7 | 0x47, + 28372 - 19968: jis0208<<14 | 0x3D<<7 | 0x4C, + 28373 - 19968: jis0208<<14 | 0x3D<<7 | 0x4D, + 28381 - 19968: jis0208<<14 | 0x21<<7 | 0x4B, + 28382 - 19968: jis0208<<14 | 0x21<<7 | 0x39, + 28395 - 19968: jis0212<<14 | 0x27<<7 | 0x1A, + 28396 - 19968: jis0208<<14 | 0x3D<<7 | 0x55, + 28397 - 19968: jis0212<<14 | 0x27<<7 | 0x1B, + 28398 - 19968: jis0212<<14 | 0x27<<7 | 0x1C, + 28399 - 19968: jis0208<<14 | 0x3D<<7 | 0x5B, + 28402 - 19968: jis0208<<14 | 0x3D<<7 | 0x59, + 28404 - 19968: jis0208<<14 | 0x24<<7 | 0x08, + 28407 - 19968: jis0208<<14 | 0x3E<<7 | 0x02, + 28408 - 19968: jis0208<<14 | 0x3D<<7 | 0x56, + 28409 - 19968: jis0212<<14 | 0x27<<7 | 0x1D, + 28411 - 19968: jis0212<<14 | 0x27<<7 | 0x1E, + 28413 - 19968: jis0212<<14 | 0x27<<7 | 0x1F, + 28414 - 19968: jis0208<<14 | 0x3D<<7 | 0x57, + 28415 - 19968: jis0208<<14 | 0x3D<<7 | 0x3F, + 28417 - 19968: jis0208<<14 | 0x14<<7 | 0x58, + 28418 - 19968: jis0208<<14 | 0x28<<7 | 0x19, + 28420 - 19968: jis0212<<14 | 0x27<<7 | 0x20, + 28422 - 19968: jis0208<<14 | 0x1B<<7 | 0x1E, + 28424 - 19968: jis0212<<14 | 0x27<<7 | 0x21, + 28425 - 19968: jis0208<<14 | 0x18<<7 | 0x56, + 28426 - 19968: jis0212<<14 | 0x27<<7 | 0x22, + 28428 - 19968: jis0212<<14 | 0x27<<7 | 0x23, + 28429 - 19968: jis0212<<14 | 0x27<<7 | 0x24, + 28431 - 19968: jis0208<<14 | 0x2E<<7 | 0x12, + 28433 - 19968: jis0208<<14 | 0x3D<<7 | 0x53, + 28435 - 19968: jis0208<<14 | 0x3E<<7 | 0x01, + 28436 - 19968: jis0208<<14 | 0x10<<7 | 0x48, + 28437 - 19968: jis0208<<14 | 0x20<<7 | 0x45, + 28438 - 19968: jis0212<<14 | 0x27<<7 | 0x25, + 28440 - 19968: jis0212<<14 | 0x27<<7 | 0x26, + 28442 - 19968: jis0212<<14 | 0x27<<7 | 0x27, + 28443 - 19968: jis0212<<14 | 0x27<<7 | 0x28, + 28448 - 19968: jis0208<<14 | 0x26<<7 | 0x58, + 28450 - 19968: jis0208<<14 | 0x13<<7 | 0x20, + 28451 - 19968: jis0208<<14 | 0x2D<<7 | 0x59, + 28454 - 19968: jis0212<<14 | 0x27<<7 | 0x29, + 28457 - 19968: jis0212<<14 | 0x27<<7 | 0x2A, + 28458 - 19968: jis0212<<14 | 0x27<<7 | 0x2B, + 28459 - 19968: jis0208<<14 | 0x2B<<7 | 0x00, + 28460 - 19968: jis0208<<14 | 0x23<<7 | 0x31, + 28461 - 19968: jis0212<<14 | 0x27<<7 | 0x32, + 28463 - 19968: jis0212<<14 | 0x27<<7 | 0x2C, + 28464 - 19968: jis0212<<14 | 0x27<<7 | 0x2D, + 28465 - 19968: jis0208<<14 | 0x3D<<7 | 0x5A, + 28466 - 19968: jis0208<<14 | 0x3D<<7 | 0x5C, + 28467 - 19968: jis0212<<14 | 0x27<<7 | 0x2E, + 28470 - 19968: jis0212<<14 | 0x27<<7 | 0x2F, + 28472 - 19968: jis0208<<14 | 0x20<<7 | 0x11, + 28475 - 19968: jis0212<<14 | 0x27<<7 | 0x30, + 28476 - 19968: jis0212<<14 | 0x27<<7 | 0x31, + 28478 - 19968: jis0208<<14 | 0x3E<<7 | 0x00, + 28479 - 19968: jis0208<<14 | 0x3D<<7 | 0x58, + 28481 - 19968: jis0208<<14 | 0x3D<<7 | 0x52, + 28485 - 19968: jis0208<<14 | 0x13<<7 | 0x22, + 28495 - 19968: jis0212<<14 | 0x27<<7 | 0x33, + 28497 - 19968: jis0212<<14 | 0x27<<7 | 0x34, + 28498 - 19968: jis0212<<14 | 0x27<<7 | 0x35, + 28499 - 19968: jis0212<<14 | 0x27<<7 | 0x36, + 28500 - 19968: jis0208<<14 | 0x16<<7 | 0x48, + 28503 - 19968: jis0212<<14 | 0x27<<7 | 0x37, + 28504 - 19968: jis0208<<14 | 0x3E<<7 | 0x0E, + 28505 - 19968: jis0212<<14 | 0x27<<7 | 0x38, + 28506 - 19968: jis0212<<14 | 0x27<<7 | 0x39, + 28507 - 19968: jis0208<<14 | 0x3E<<7 | 0x09, + 28508 - 19968: jis0208<<14 | 0x1F<<7 | 0x57, + 28509 - 19968: jis0212<<14 | 0x27<<7 | 0x3A, + 28510 - 19968: jis0212<<14 | 0x27<<7 | 0x3B, + 28511 - 19968: jis0208<<14 | 0x12<<7 | 0x42, + 28513 - 19968: jis0212<<14 | 0x27<<7 | 0x3C, + 28514 - 19968: jis0212<<14 | 0x27<<7 | 0x3D, + 28516 - 19968: jis0208<<14 | 0x1C<<7 | 0x40, + 28518 - 19968: jis0208<<14 | 0x3E<<7 | 0x12, + 28520 - 19968: jis0212<<14 | 0x27<<7 | 0x3E, + 28524 - 19968: jis0212<<14 | 0x27<<7 | 0x3F, + 28525 - 19968: jis0208<<14 | 0x3E<<7 | 0x0B, + 28526 - 19968: jis0208<<14 | 0x23<<7 | 0x0B, + 28527 - 19968: jis0208<<14 | 0x3E<<7 | 0x08, + 28528 - 19968: jis0208<<14 | 0x23<<7 | 0x38, + 28532 - 19968: jis0208<<14 | 0x3E<<7 | 0x2B, + 28536 - 19968: jis0208<<14 | 0x3E<<7 | 0x05, + 28538 - 19968: jis0208<<14 | 0x3E<<7 | 0x04, + 28540 - 19968: jis0208<<14 | 0x3E<<7 | 0x0D, + 28541 - 19968: jis0212<<14 | 0x27<<7 | 0x40, + 28542 - 19968: jis0212<<14 | 0x27<<7 | 0x41, + 28544 - 19968: jis0208<<14 | 0x3E<<7 | 0x07, + 28545 - 19968: jis0208<<14 | 0x3E<<7 | 0x06, + 28546 - 19968: jis0208<<14 | 0x3E<<7 | 0x0C, + 28547 - 19968: jis0212<<14 | 0x27<<7 | 0x42, + 28548 - 19968: jis0208<<14 | 0x1F<<7 | 0x00, + 28550 - 19968: jis0208<<14 | 0x3E<<7 | 0x03, + 28551 - 19968: jis0212<<14 | 0x27<<7 | 0x43, + 28552 - 19968: jis0208<<14 | 0x59<<7 | 0x4D, + 28555 - 19968: jis0212<<14 | 0x27<<7 | 0x45, + 28556 - 19968: jis0212<<14 | 0x27<<7 | 0x46, + 28557 - 19968: jis0212<<14 | 0x27<<7 | 0x47, + 28558 - 19968: jis0208<<14 | 0x3E<<7 | 0x0F, + 28560 - 19968: jis0212<<14 | 0x27<<7 | 0x48, + 28561 - 19968: jis0208<<14 | 0x3E<<7 | 0x10, + 28562 - 19968: jis0212<<14 | 0x27<<7 | 0x49, + 28563 - 19968: jis0212<<14 | 0x27<<7 | 0x4A, + 28564 - 19968: jis0212<<14 | 0x27<<7 | 0x4B, + 28566 - 19968: jis0212<<14 | 0x27<<7 | 0x4C, + 28567 - 19968: jis0208<<14 | 0x13<<7 | 0x21, + 28570 - 19968: jis0212<<14 | 0x27<<7 | 0x4D, + 28575 - 19968: jis0212<<14 | 0x27<<7 | 0x4E, + 28576 - 19968: jis0212<<14 | 0x27<<7 | 0x4F, + 28577 - 19968: jis0208<<14 | 0x3E<<7 | 0x15, + 28579 - 19968: jis0208<<14 | 0x3E<<7 | 0x14, + 28580 - 19968: jis0208<<14 | 0x3E<<7 | 0x16, + 28581 - 19968: jis0212<<14 | 0x27<<7 | 0x50, + 28582 - 19968: jis0212<<14 | 0x27<<7 | 0x51, + 28583 - 19968: jis0212<<14 | 0x27<<7 | 0x52, + 28584 - 19968: jis0212<<14 | 0x27<<7 | 0x53, + 28586 - 19968: jis0208<<14 | 0x3E<<7 | 0x19, + 28590 - 19968: jis0212<<14 | 0x27<<7 | 0x54, + 28591 - 19968: jis0212<<14 | 0x27<<7 | 0x55, + 28592 - 19968: jis0212<<14 | 0x27<<7 | 0x56, + 28593 - 19968: jis0208<<14 | 0x24<<7 | 0x22, + 28595 - 19968: jis0208<<14 | 0x3E<<7 | 0x13, + 28597 - 19968: jis0208<<14 | 0x59<<7 | 0x4E, + 28598 - 19968: jis0212<<14 | 0x27<<7 | 0x58, + 28601 - 19968: jis0208<<14 | 0x3E<<7 | 0x17, + 28604 - 19968: jis0212<<14 | 0x27<<7 | 0x59, + 28608 - 19968: jis0208<<14 | 0x16<<7 | 0x42, + 28609 - 19968: jis0208<<14 | 0x21<<7 | 0x58, + 28610 - 19968: jis0208<<14 | 0x3E<<7 | 0x11, + 28611 - 19968: jis0208<<14 | 0x26<<7 | 0x1A, + 28613 - 19968: jis0212<<14 | 0x27<<7 | 0x5A, + 28614 - 19968: jis0208<<14 | 0x3E<<7 | 0x18, + 28615 - 19968: jis0212<<14 | 0x27<<7 | 0x5B, + 28616 - 19968: jis0212<<14 | 0x27<<7 | 0x5C, + 28618 - 19968: jis0212<<14 | 0x27<<7 | 0x5D, + 28628 - 19968: jis0208<<14 | 0x3E<<7 | 0x1D, + 28629 - 19968: jis0208<<14 | 0x3E<<7 | 0x1B, + 28632 - 19968: jis0208<<14 | 0x3E<<7 | 0x1E, + 28634 - 19968: jis0212<<14 | 0x28<<7 | 0x00, + 28635 - 19968: jis0208<<14 | 0x3E<<7 | 0x21, + 28638 - 19968: jis0212<<14 | 0x28<<7 | 0x01, + 28639 - 19968: jis0208<<14 | 0x3E<<7 | 0x1A, + 28640 - 19968: jis0208<<14 | 0x18<<7 | 0x49, + 28641 - 19968: jis0208<<14 | 0x26<<7 | 0x07, + 28644 - 19968: jis0208<<14 | 0x3D<<7 | 0x18, + 28648 - 19968: jis0212<<14 | 0x28<<7 | 0x02, + 28649 - 19968: jis0212<<14 | 0x28<<7 | 0x03, + 28651 - 19968: jis0208<<14 | 0x2C<<7 | 0x53, + 28652 - 19968: jis0208<<14 | 0x3E<<7 | 0x1C, + 28654 - 19968: jis0208<<14 | 0x3E<<7 | 0x20, + 28655 - 19968: jis0208<<14 | 0x21<<7 | 0x54, + 28656 - 19968: jis0212<<14 | 0x28<<7 | 0x04, + 28657 - 19968: jis0208<<14 | 0x3E<<7 | 0x1F, + 28659 - 19968: jis0208<<14 | 0x3E<<7 | 0x0A, + 28661 - 19968: jis0208<<14 | 0x59<<7 | 0x4F, + 28662 - 19968: jis0208<<14 | 0x4E<<7 | 0x48, + 28665 - 19968: jis0212<<14 | 0x28<<7 | 0x06, + 28666 - 19968: jis0208<<14 | 0x3E<<7 | 0x24, + 28668 - 19968: jis0212<<14 | 0x28<<7 | 0x07, + 28669 - 19968: jis0212<<14 | 0x28<<7 | 0x08, + 28670 - 19968: jis0208<<14 | 0x3E<<7 | 0x28, + 28672 - 19968: jis0212<<14 | 0x28<<7 | 0x09, + 28673 - 19968: jis0208<<14 | 0x3E<<7 | 0x26, + 28677 - 19968: jis0208<<14 | 0x59<<7 | 0x50, + 28678 - 19968: jis0212<<14 | 0x28<<7 | 0x0B, + 28679 - 19968: jis0208<<14 | 0x59<<7 | 0x51, + 28681 - 19968: jis0208<<14 | 0x3E<<7 | 0x22, + 28683 - 19968: jis0208<<14 | 0x3E<<7 | 0x23, + 28685 - 19968: jis0212<<14 | 0x28<<7 | 0x0D, + 28687 - 19968: jis0208<<14 | 0x3E<<7 | 0x27, + 28689 - 19968: jis0208<<14 | 0x3E<<7 | 0x25, + 28693 - 19968: jis0208<<14 | 0x28<<7 | 0x2D, + 28695 - 19968: jis0212<<14 | 0x28<<7 | 0x0E, + 28696 - 19968: jis0208<<14 | 0x3E<<7 | 0x2D, + 28698 - 19968: jis0208<<14 | 0x3E<<7 | 0x2A, + 28699 - 19968: jis0208<<14 | 0x3E<<7 | 0x29, + 28701 - 19968: jis0208<<14 | 0x3E<<7 | 0x2C, + 28702 - 19968: jis0208<<14 | 0x25<<7 | 0x33, + 28703 - 19968: jis0208<<14 | 0x3E<<7 | 0x2E, + 28704 - 19968: jis0212<<14 | 0x28<<7 | 0x0F, + 28707 - 19968: jis0212<<14 | 0x28<<7 | 0x10, + 28710 - 19968: jis0208<<14 | 0x22<<7 | 0x54, + 28711 - 19968: jis0208<<14 | 0x21<<7 | 0x4C, + 28712 - 19968: jis0208<<14 | 0x59<<7 | 0x52, + 28716 - 19968: jis0208<<14 | 0x1F<<7 | 0x04, + 28719 - 19968: jis0212<<14 | 0x28<<7 | 0x11, + 28720 - 19968: jis0208<<14 | 0x3E<<7 | 0x2F, + 28722 - 19968: jis0208<<14 | 0x3E<<7 | 0x31, + 28724 - 19968: jis0212<<14 | 0x28<<7 | 0x12, + 28727 - 19968: jis0212<<14 | 0x28<<7 | 0x13, + 28729 - 19968: jis0212<<14 | 0x28<<7 | 0x14, + 28732 - 19968: jis0212<<14 | 0x28<<7 | 0x15, + 28734 - 19968: jis0208<<14 | 0x3E<<7 | 0x30, + 28739 - 19968: jis0212<<14 | 0x28<<7 | 0x16, + 28740 - 19968: jis0212<<14 | 0x28<<7 | 0x17, + 28744 - 19968: jis0212<<14 | 0x28<<7 | 0x18, + 28745 - 19968: jis0212<<14 | 0x28<<7 | 0x19, + 28746 - 19968: jis0212<<14 | 0x28<<7 | 0x1A, + 28747 - 19968: jis0212<<14 | 0x28<<7 | 0x1B, + 28748 - 19968: jis0208<<14 | 0x3D<<7 | 0x54, + 28750 - 19968: jis0212<<14 | 0x28<<7 | 0x20, + 28753 - 19968: jis0208<<14 | 0x3E<<7 | 0x32, + 28756 - 19968: jis0212<<14 | 0x28<<7 | 0x1C, + 28757 - 19968: jis0212<<14 | 0x28<<7 | 0x1D, + 28760 - 19968: jis0208<<14 | 0x25<<7 | 0x46, + 28765 - 19968: jis0212<<14 | 0x28<<7 | 0x1E, + 28766 - 19968: jis0212<<14 | 0x28<<7 | 0x1F, + 28771 - 19968: jis0208<<14 | 0x3E<<7 | 0x33, + 28772 - 19968: jis0212<<14 | 0x28<<7 | 0x21, + 28773 - 19968: jis0212<<14 | 0x28<<7 | 0x22, + 28779 - 19968: jis0208<<14 | 0x11<<7 | 0x2F, + 28780 - 19968: jis0212<<14 | 0x28<<7 | 0x23, + 28782 - 19968: jis0212<<14 | 0x28<<7 | 0x24, + 28783 - 19968: jis0208<<14 | 0x24<<7 | 0x53, + 28784 - 19968: jis0208<<14 | 0x12<<7 | 0x04, + 28789 - 19968: jis0212<<14 | 0x28<<7 | 0x25, + 28790 - 19968: jis0212<<14 | 0x28<<7 | 0x26, + 28792 - 19968: jis0208<<14 | 0x14<<7 | 0x43, + 28796 - 19968: jis0208<<14 | 0x1B<<7 | 0x3D, + 28797 - 19968: jis0208<<14 | 0x19<<7 | 0x31, + 28798 - 19968: jis0212<<14 | 0x28<<7 | 0x27, + 28801 - 19968: jis0212<<14 | 0x28<<7 | 0x28, + 28805 - 19968: jis0208<<14 | 0x59<<7 | 0x53, + 28806 - 19968: jis0212<<14 | 0x28<<7 | 0x2A, + 28809 - 19968: jis0208<<14 | 0x2E<<7 | 0x06, + 28810 - 19968: jis0208<<14 | 0x1E<<7 | 0x45, + 28814 - 19968: jis0208<<14 | 0x10<<7 | 0x49, + 28818 - 19968: jis0208<<14 | 0x3E<<7 | 0x35, + 28820 - 19968: jis0212<<14 | 0x28<<7 | 0x2B, + 28821 - 19968: jis0212<<14 | 0x28<<7 | 0x2C, + 28822 - 19968: jis0212<<14 | 0x28<<7 | 0x2D, + 28823 - 19968: jis0212<<14 | 0x28<<7 | 0x2E, + 28824 - 19968: jis0212<<14 | 0x28<<7 | 0x2F, + 28825 - 19968: jis0208<<14 | 0x3E<<7 | 0x34, + 28827 - 19968: jis0212<<14 | 0x28<<7 | 0x30, + 28836 - 19968: jis0212<<14 | 0x28<<7 | 0x31, + 28843 - 19968: jis0208<<14 | 0x59<<7 | 0x54, + 28844 - 19968: jis0208<<14 | 0x3E<<7 | 0x38, + 28845 - 19968: jis0208<<14 | 0x22<<7 | 0x19, + 28846 - 19968: jis0208<<14 | 0x3E<<7 | 0x3B, + 28847 - 19968: jis0208<<14 | 0x3E<<7 | 0x36, + 28848 - 19968: jis0212<<14 | 0x28<<7 | 0x33, + 28849 - 19968: jis0212<<14 | 0x28<<7 | 0x34, + 28851 - 19968: jis0208<<14 | 0x3E<<7 | 0x3A, + 28852 - 19968: jis0212<<14 | 0x28<<7 | 0x35, + 28855 - 19968: jis0212<<14 | 0x28<<7 | 0x36, + 28856 - 19968: jis0208<<14 | 0x3E<<7 | 0x39, + 28857 - 19968: jis0208<<14 | 0x24<<7 | 0x1F, + 28858 - 19968: jis0208<<14 | 0x0F<<7 | 0x38, + 28859 - 19968: jis0208<<14 | 0x58<<7 | 0x06, + 28872 - 19968: jis0208<<14 | 0x2D<<7 | 0x54, + 28874 - 19968: jis0212<<14 | 0x28<<7 | 0x37, + 28875 - 19968: jis0208<<14 | 0x3E<<7 | 0x3D, + 28879 - 19968: jis0208<<14 | 0x10<<7 | 0x07, + 28881 - 19968: jis0212<<14 | 0x28<<7 | 0x38, + 28883 - 19968: jis0212<<14 | 0x28<<7 | 0x39, + 28884 - 19968: jis0212<<14 | 0x28<<7 | 0x3A, + 28885 - 19968: jis0212<<14 | 0x28<<7 | 0x3B, + 28886 - 19968: jis0212<<14 | 0x28<<7 | 0x3C, + 28888 - 19968: jis0212<<14 | 0x28<<7 | 0x3D, + 28889 - 19968: jis0208<<14 | 0x3E<<7 | 0x3F, + 28892 - 19968: jis0212<<14 | 0x28<<7 | 0x3E, + 28893 - 19968: jis0208<<14 | 0x3E<<7 | 0x3E, + 28895 - 19968: jis0208<<14 | 0x3E<<7 | 0x3C, + 28900 - 19968: jis0212<<14 | 0x28<<7 | 0x3F, + 28913 - 19968: jis0208<<14 | 0x3E<<7 | 0x37, + 28921 - 19968: jis0208<<14 | 0x2A<<7 | 0x02, + 28922 - 19968: jis0212<<14 | 0x28<<7 | 0x40, + 28925 - 19968: jis0208<<14 | 0x3E<<7 | 0x41, + 28931 - 19968: jis0212<<14 | 0x28<<7 | 0x41, + 28932 - 19968: jis0208<<14 | 0x59<<7 | 0x56, + 28933 - 19968: jis0212<<14 | 0x28<<7 | 0x43, + 28934 - 19968: jis0212<<14 | 0x28<<7 | 0x44, + 28935 - 19968: jis0212<<14 | 0x28<<7 | 0x45, + 28937 - 19968: jis0208<<14 | 0x3E<<7 | 0x40, + 28939 - 19968: jis0212<<14 | 0x28<<7 | 0x46, + 28940 - 19968: jis0212<<14 | 0x28<<7 | 0x47, + 28943 - 19968: jis0208<<14 | 0x59<<7 | 0x55, + 28948 - 19968: jis0208<<14 | 0x10<<7 | 0x4A, + 28953 - 19968: jis0208<<14 | 0x3E<<7 | 0x43, + 28954 - 19968: jis0208<<14 | 0x29<<7 | 0x11, + 28956 - 19968: jis0208<<14 | 0x3E<<7 | 0x42, + 28958 - 19968: jis0212<<14 | 0x28<<7 | 0x49, + 28960 - 19968: jis0212<<14 | 0x28<<7 | 0x4A, + 28961 - 19968: jis0208<<14 | 0x2B<<7 | 0x14, + 28966 - 19968: jis0208<<14 | 0x1D<<7 | 0x26, + 28971 - 19968: jis0212<<14 | 0x28<<7 | 0x4B, + 28973 - 19968: jis0212<<14 | 0x28<<7 | 0x4C, + 28975 - 19968: jis0212<<14 | 0x28<<7 | 0x4D, + 28976 - 19968: jis0212<<14 | 0x28<<7 | 0x4E, + 28977 - 19968: jis0212<<14 | 0x28<<7 | 0x4F, + 28982 - 19968: jis0208<<14 | 0x20<<7 | 0x12, + 28984 - 19968: jis0212<<14 | 0x28<<7 | 0x50, + 28988 - 19968: jis0208<<14 | 0x1D<<7 | 0x25, + 28993 - 19968: jis0212<<14 | 0x28<<7 | 0x51, + 28997 - 19968: jis0212<<14 | 0x28<<7 | 0x52, + 28998 - 19968: jis0208<<14 | 0x59<<7 | 0x58, + 28999 - 19968: jis0208<<14 | 0x59<<7 | 0x59, + 29001 - 19968: jis0208<<14 | 0x2D<<7 | 0x5A, + 29002 - 19968: jis0212<<14 | 0x28<<7 | 0x55, + 29003 - 19968: jis0212<<14 | 0x28<<7 | 0x56, + 29004 - 19968: jis0208<<14 | 0x3E<<7 | 0x49, + 29006 - 19968: jis0208<<14 | 0x1F<<7 | 0x58, + 29008 - 19968: jis0212<<14 | 0x28<<7 | 0x57, + 29010 - 19968: jis0212<<14 | 0x28<<7 | 0x58, + 29013 - 19968: jis0208<<14 | 0x3E<<7 | 0x45, + 29014 - 19968: jis0208<<14 | 0x3E<<7 | 0x4A, + 29015 - 19968: jis0212<<14 | 0x28<<7 | 0x59, + 29017 - 19968: jis0208<<14 | 0x10<<7 | 0x4B, + 29018 - 19968: jis0212<<14 | 0x28<<7 | 0x5A, + 29020 - 19968: jis0208<<14 | 0x59<<7 | 0x57, + 29022 - 19968: jis0212<<14 | 0x28<<7 | 0x5C, + 29024 - 19968: jis0212<<14 | 0x28<<7 | 0x5D, + 29026 - 19968: jis0208<<14 | 0x3E<<7 | 0x48, + 29028 - 19968: jis0208<<14 | 0x26<<7 | 0x40, + 29029 - 19968: jis0208<<14 | 0x3E<<7 | 0x44, + 29030 - 19968: jis0208<<14 | 0x3E<<7 | 0x47, + 29031 - 19968: jis0208<<14 | 0x1D<<7 | 0x27, + 29032 - 19968: jis0212<<14 | 0x29<<7 | 0x00, + 29033 - 19968: jis0208<<14 | 0x27<<7 | 0x30, + 29036 - 19968: jis0208<<14 | 0x3E<<7 | 0x4B, + 29038 - 19968: jis0208<<14 | 0x1B<<7 | 0x30, + 29049 - 19968: jis0212<<14 | 0x29<<7 | 0x01, + 29053 - 19968: jis0208<<14 | 0x1F<<7 | 0x59, + 29056 - 19968: jis0212<<14 | 0x29<<7 | 0x02, + 29060 - 19968: jis0208<<14 | 0x3E<<7 | 0x4E, + 29061 - 19968: jis0212<<14 | 0x29<<7 | 0x03, + 29063 - 19968: jis0212<<14 | 0x29<<7 | 0x04, + 29064 - 19968: jis0208<<14 | 0x3E<<7 | 0x46, + 29066 - 19968: jis0208<<14 | 0x16<<7 | 0x06, + 29068 - 19968: jis0212<<14 | 0x29<<7 | 0x05, + 29071 - 19968: jis0208<<14 | 0x3E<<7 | 0x4C, + 29074 - 19968: jis0212<<14 | 0x29<<7 | 0x06, + 29076 - 19968: jis0208<<14 | 0x2C<<7 | 0x2F, + 29077 - 19968: jis0208<<14 | 0x3E<<7 | 0x4F, + 29081 - 19968: jis0208<<14 | 0x53<<7 | 0x05, + 29082 - 19968: jis0212<<14 | 0x29<<7 | 0x07, + 29083 - 19968: jis0212<<14 | 0x29<<7 | 0x08, + 29087 - 19968: jis0208<<14 | 0x1C<<7 | 0x2E, + 29088 - 19968: jis0212<<14 | 0x29<<7 | 0x09, + 29090 - 19968: jis0212<<14 | 0x29<<7 | 0x0A, + 29096 - 19968: jis0208<<14 | 0x3E<<7 | 0x50, + 29100 - 19968: jis0208<<14 | 0x3E<<7 | 0x51, + 29103 - 19968: jis0212<<14 | 0x29<<7 | 0x0B, + 29104 - 19968: jis0212<<14 | 0x29<<7 | 0x0C, + 29105 - 19968: jis0208<<14 | 0x26<<7 | 0x0D, + 29106 - 19968: jis0212<<14 | 0x29<<7 | 0x0D, + 29107 - 19968: jis0212<<14 | 0x29<<7 | 0x0E, + 29113 - 19968: jis0208<<14 | 0x3E<<7 | 0x53, + 29114 - 19968: jis0212<<14 | 0x29<<7 | 0x0F, + 29118 - 19968: jis0208<<14 | 0x3E<<7 | 0x54, + 29119 - 19968: jis0212<<14 | 0x29<<7 | 0x10, + 29120 - 19968: jis0212<<14 | 0x29<<7 | 0x11, + 29121 - 19968: jis0208<<14 | 0x59<<7 | 0x5B, + 29123 - 19968: jis0208<<14 | 0x26<<7 | 0x12, + 29124 - 19968: jis0212<<14 | 0x29<<7 | 0x13, + 29128 - 19968: jis0208<<14 | 0x24<<7 | 0x54, + 29129 - 19968: jis0208<<14 | 0x3E<<7 | 0x56, + 29131 - 19968: jis0212<<14 | 0x29<<7 | 0x14, + 29132 - 19968: jis0212<<14 | 0x29<<7 | 0x15, + 29134 - 19968: jis0208<<14 | 0x3E<<7 | 0x58, + 29136 - 19968: jis0208<<14 | 0x2D<<7 | 0x34, + 29138 - 19968: jis0208<<14 | 0x3E<<7 | 0x55, + 29139 - 19968: jis0212<<14 | 0x29<<7 | 0x16, + 29140 - 19968: jis0208<<14 | 0x3E<<7 | 0x57, + 29141 - 19968: jis0208<<14 | 0x10<<7 | 0x4C, + 29142 - 19968: jis0212<<14 | 0x29<<7 | 0x17, + 29143 - 19968: jis0208<<14 | 0x3E<<7 | 0x52, + 29145 - 19968: jis0212<<14 | 0x29<<7 | 0x18, + 29146 - 19968: jis0212<<14 | 0x29<<7 | 0x19, + 29148 - 19968: jis0212<<14 | 0x29<<7 | 0x1A, + 29151 - 19968: jis0208<<14 | 0x32<<7 | 0x3A, + 29152 - 19968: jis0208<<14 | 0x3E<<7 | 0x59, + 29157 - 19968: jis0208<<14 | 0x20<<7 | 0x46, + 29158 - 19968: jis0208<<14 | 0x1A<<7 | 0x17, + 29159 - 19968: jis0208<<14 | 0x3E<<7 | 0x5B, + 29164 - 19968: jis0208<<14 | 0x3E<<7 | 0x5A, + 29165 - 19968: jis0208<<14 | 0x1E<<7 | 0x03, + 29166 - 19968: jis0208<<14 | 0x31<<7 | 0x38, + 29173 - 19968: jis0208<<14 | 0x3E<<7 | 0x5C, + 29176 - 19968: jis0212<<14 | 0x29<<7 | 0x1B, + 29177 - 19968: jis0208<<14 | 0x3F<<7 | 0x00, + 29179 - 19968: jis0208<<14 | 0x3E<<7 | 0x4D, + 29180 - 19968: jis0208<<14 | 0x3E<<7 | 0x5D, + 29182 - 19968: jis0208<<14 | 0x59<<7 | 0x5C, + 29183 - 19968: jis0208<<14 | 0x3F<<7 | 0x01, + 29184 - 19968: jis0212<<14 | 0x29<<7 | 0x1D, + 29190 - 19968: jis0208<<14 | 0x26<<7 | 0x59, + 29191 - 19968: jis0212<<14 | 0x29<<7 | 0x1E, + 29192 - 19968: jis0212<<14 | 0x29<<7 | 0x1F, + 29193 - 19968: jis0212<<14 | 0x29<<7 | 0x20, + 29197 - 19968: jis0208<<14 | 0x3F<<7 | 0x02, + 29200 - 19968: jis0208<<14 | 0x3F<<7 | 0x03, + 29203 - 19968: jis0212<<14 | 0x29<<7 | 0x21, + 29207 - 19968: jis0212<<14 | 0x29<<7 | 0x22, + 29210 - 19968: jis0212<<14 | 0x29<<7 | 0x23, + 29211 - 19968: jis0208<<14 | 0x3F<<7 | 0x04, + 29213 - 19968: jis0212<<14 | 0x29<<7 | 0x24, + 29215 - 19968: jis0212<<14 | 0x29<<7 | 0x25, + 29220 - 19968: jis0212<<14 | 0x29<<7 | 0x26, + 29224 - 19968: jis0208<<14 | 0x3F<<7 | 0x05, + 29226 - 19968: jis0208<<14 | 0x23<<7 | 0x3D, + 29227 - 19968: jis0212<<14 | 0x29<<7 | 0x27, + 29228 - 19968: jis0208<<14 | 0x3F<<7 | 0x07, + 29229 - 19968: jis0208<<14 | 0x3F<<7 | 0x06, + 29231 - 19968: jis0212<<14 | 0x29<<7 | 0x28, + 29232 - 19968: jis0208<<14 | 0x3F<<7 | 0x08, + 29234 - 19968: jis0208<<14 | 0x3F<<7 | 0x09, + 29236 - 19968: jis0212<<14 | 0x29<<7 | 0x29, + 29237 - 19968: jis0208<<14 | 0x1B<<7 | 0x3E, + 29238 - 19968: jis0208<<14 | 0x28<<7 | 0x42, + 29240 - 19968: jis0212<<14 | 0x29<<7 | 0x2A, + 29241 - 19968: jis0212<<14 | 0x29<<7 | 0x2B, + 29242 - 19968: jis0208<<14 | 0x2B<<7 | 0x4B, + 29243 - 19968: jis0208<<14 | 0x3F<<7 | 0x0A, + 29244 - 19968: jis0208<<14 | 0x3F<<7 | 0x0B, + 29245 - 19968: jis0208<<14 | 0x20<<7 | 0x35, + 29246 - 19968: jis0208<<14 | 0x1B<<7 | 0x03, + 29247 - 19968: jis0208<<14 | 0x3F<<7 | 0x0C, + 29248 - 19968: jis0208<<14 | 0x3F<<7 | 0x0D, + 29249 - 19968: jis0212<<14 | 0x29<<7 | 0x2C, + 29250 - 19968: jis0212<<14 | 0x29<<7 | 0x2D, + 29251 - 19968: jis0212<<14 | 0x29<<7 | 0x2E, + 29253 - 19968: jis0212<<14 | 0x29<<7 | 0x2F, + 29254 - 19968: jis0208<<14 | 0x3F<<7 | 0x0E, + 29255 - 19968: jis0208<<14 | 0x29<<7 | 0x31, + 29256 - 19968: jis0208<<14 | 0x27<<7 | 0x26, + 29259 - 19968: jis0208<<14 | 0x3F<<7 | 0x0F, + 29260 - 19968: jis0208<<14 | 0x26<<7 | 0x36, + 29262 - 19968: jis0212<<14 | 0x29<<7 | 0x30, + 29263 - 19968: jis0212<<14 | 0x29<<7 | 0x31, + 29264 - 19968: jis0212<<14 | 0x29<<7 | 0x32, + 29266 - 19968: jis0208<<14 | 0x23<<7 | 0x0C, + 29267 - 19968: jis0212<<14 | 0x29<<7 | 0x33, + 29269 - 19968: jis0212<<14 | 0x29<<7 | 0x34, + 29270 - 19968: jis0212<<14 | 0x29<<7 | 0x35, + 29272 - 19968: jis0208<<14 | 0x3F<<7 | 0x10, + 29273 - 19968: jis0208<<14 | 0x11<<7 | 0x46, + 29274 - 19968: jis0212<<14 | 0x29<<7 | 0x36, + 29275 - 19968: jis0208<<14 | 0x14<<7 | 0x4C, + 29276 - 19968: jis0212<<14 | 0x29<<7 | 0x37, + 29277 - 19968: jis0208<<14 | 0x2B<<7 | 0x25, + 29278 - 19968: jis0212<<14 | 0x29<<7 | 0x38, + 29279 - 19968: jis0208<<14 | 0x2B<<7 | 0x15, + 29280 - 19968: jis0212<<14 | 0x29<<7 | 0x39, + 29281 - 19968: jis0208<<14 | 0x11<<7 | 0x13, + 29282 - 19968: jis0208<<14 | 0x2E<<7 | 0x13, + 29283 - 19968: jis0212<<14 | 0x29<<7 | 0x3A, + 29287 - 19968: jis0208<<14 | 0x2A<<7 | 0x31, + 29288 - 19968: jis0212<<14 | 0x29<<7 | 0x3B, + 29289 - 19968: jis0208<<14 | 0x29<<7 | 0x09, + 29291 - 19968: jis0212<<14 | 0x29<<7 | 0x3C, + 29294 - 19968: jis0212<<14 | 0x29<<7 | 0x3D, + 29295 - 19968: jis0212<<14 | 0x29<<7 | 0x3E, + 29297 - 19968: jis0212<<14 | 0x29<<7 | 0x3F, + 29298 - 19968: jis0208<<14 | 0x1F<<7 | 0x16, + 29300 - 19968: jis0208<<14 | 0x3F<<7 | 0x11, + 29303 - 19968: jis0212<<14 | 0x29<<7 | 0x40, + 29304 - 19968: jis0212<<14 | 0x29<<7 | 0x41, + 29305 - 19968: jis0208<<14 | 0x25<<7 | 0x22, + 29307 - 19968: jis0212<<14 | 0x29<<7 | 0x42, + 29308 - 19968: jis0212<<14 | 0x29<<7 | 0x43, + 29309 - 19968: jis0208<<14 | 0x17<<7 | 0x02, + 29310 - 19968: jis0208<<14 | 0x3F<<7 | 0x12, + 29311 - 19968: jis0212<<14 | 0x29<<7 | 0x44, + 29312 - 19968: jis0208<<14 | 0x19<<7 | 0x33, + 29313 - 19968: jis0208<<14 | 0x3F<<7 | 0x14, + 29314 - 19968: jis0208<<14 | 0x3F<<7 | 0x13, + 29316 - 19968: jis0212<<14 | 0x29<<7 | 0x45, + 29319 - 19968: jis0208<<14 | 0x3F<<7 | 0x15, + 29321 - 19968: jis0212<<14 | 0x29<<7 | 0x46, + 29325 - 19968: jis0212<<14 | 0x29<<7 | 0x47, + 29326 - 19968: jis0212<<14 | 0x29<<7 | 0x48, + 29330 - 19968: jis0208<<14 | 0x3F<<7 | 0x16, + 29331 - 19968: jis0212<<14 | 0x29<<7 | 0x49, + 29334 - 19968: jis0208<<14 | 0x3F<<7 | 0x17, + 29339 - 19968: jis0212<<14 | 0x29<<7 | 0x4A, + 29344 - 19968: jis0208<<14 | 0x14<<7 | 0x1D, + 29346 - 19968: jis0208<<14 | 0x3F<<7 | 0x18, + 29351 - 19968: jis0208<<14 | 0x3F<<7 | 0x19, + 29352 - 19968: jis0212<<14 | 0x29<<7 | 0x4B, + 29356 - 19968: jis0208<<14 | 0x17<<7 | 0x03, + 29357 - 19968: jis0212<<14 | 0x29<<7 | 0x4C, + 29358 - 19968: jis0212<<14 | 0x29<<7 | 0x4D, + 29359 - 19968: jis0208<<14 | 0x27<<7 | 0x27, + 29361 - 19968: jis0208<<14 | 0x59<<7 | 0x5D, + 29362 - 19968: jis0208<<14 | 0x3F<<7 | 0x1B, + 29364 - 19968: jis0212<<14 | 0x29<<7 | 0x4F, + 29366 - 19968: jis0208<<14 | 0x1D<<7 | 0x54, + 29369 - 19968: jis0208<<14 | 0x3F<<7 | 0x1A, + 29374 - 19968: jis0208<<14 | 0x5A<<7 | 0x00, + 29377 - 19968: jis0212<<14 | 0x29<<7 | 0x51, + 29378 - 19968: jis0208<<14 | 0x15<<7 | 0x17, + 29379 - 19968: jis0208<<14 | 0x3F<<7 | 0x1C, + 29380 - 19968: jis0208<<14 | 0x3F<<7 | 0x1E, + 29382 - 19968: jis0208<<14 | 0x3F<<7 | 0x1D, + 29383 - 19968: jis0212<<14 | 0x29<<7 | 0x52, + 29385 - 19968: jis0212<<14 | 0x29<<7 | 0x53, + 29388 - 19968: jis0212<<14 | 0x29<<7 | 0x54, + 29390 - 19968: jis0208<<14 | 0x3F<<7 | 0x1F, + 29392 - 19968: jis0208<<14 | 0x17<<7 | 0x30, + 29394 - 19968: jis0208<<14 | 0x3F<<7 | 0x20, + 29397 - 19968: jis0212<<14 | 0x29<<7 | 0x55, + 29398 - 19968: jis0212<<14 | 0x29<<7 | 0x56, + 29399 - 19968: jis0208<<14 | 0x15<<7 | 0x48, + 29400 - 19968: jis0212<<14 | 0x29<<7 | 0x57, + 29401 - 19968: jis0208<<14 | 0x20<<7 | 0x1F, + 29403 - 19968: jis0208<<14 | 0x18<<7 | 0x5C, + 29407 - 19968: jis0212<<14 | 0x29<<7 | 0x58, + 29408 - 19968: jis0208<<14 | 0x3F<<7 | 0x22, + 29409 - 19968: jis0208<<14 | 0x3F<<7 | 0x23, + 29410 - 19968: jis0208<<14 | 0x3F<<7 | 0x21, + 29413 - 19968: jis0212<<14 | 0x29<<7 | 0x59, + 29417 - 19968: jis0208<<14 | 0x1B<<7 | 0x4C, + 29420 - 19968: jis0208<<14 | 0x25<<7 | 0x27, + 29421 - 19968: jis0208<<14 | 0x15<<7 | 0x18, + 29427 - 19968: jis0212<<14 | 0x29<<7 | 0x5A, + 29428 - 19968: jis0212<<14 | 0x29<<7 | 0x5B, + 29431 - 19968: jis0208<<14 | 0x3F<<7 | 0x25, + 29432 - 19968: jis0208<<14 | 0x22<<7 | 0x0B, + 29433 - 19968: jis0208<<14 | 0x3F<<7 | 0x24, + 29434 - 19968: jis0212<<14 | 0x29<<7 | 0x5C, + 29435 - 19968: jis0212<<14 | 0x29<<7 | 0x5D, + 29436 - 19968: jis0208<<14 | 0x2E<<7 | 0x14, + 29437 - 19968: jis0208<<14 | 0x26<<7 | 0x41, + 29438 - 19968: jis0212<<14 | 0x2A<<7 | 0x00, + 29442 - 19968: jis0212<<14 | 0x2A<<7 | 0x01, + 29444 - 19968: jis0212<<14 | 0x2A<<7 | 0x02, + 29445 - 19968: jis0212<<14 | 0x2A<<7 | 0x03, + 29447 - 19968: jis0212<<14 | 0x2A<<7 | 0x04, + 29450 - 19968: jis0208<<14 | 0x3F<<7 | 0x28, + 29451 - 19968: jis0212<<14 | 0x2A<<7 | 0x05, + 29453 - 19968: jis0212<<14 | 0x2A<<7 | 0x06, + 29458 - 19968: jis0212<<14 | 0x2A<<7 | 0x07, + 29459 - 19968: jis0212<<14 | 0x2A<<7 | 0x08, + 29462 - 19968: jis0208<<14 | 0x3F<<7 | 0x2A, + 29463 - 19968: jis0208<<14 | 0x3F<<7 | 0x27, + 29464 - 19968: jis0212<<14 | 0x2A<<7 | 0x09, + 29465 - 19968: jis0212<<14 | 0x2A<<7 | 0x0A, + 29467 - 19968: jis0208<<14 | 0x2B<<7 | 0x33, + 29468 - 19968: jis0208<<14 | 0x3F<<7 | 0x29, + 29469 - 19968: jis0208<<14 | 0x3F<<7 | 0x2B, + 29470 - 19968: jis0212<<14 | 0x2A<<7 | 0x0B, + 29471 - 19968: jis0208<<14 | 0x2D<<7 | 0x23, + 29474 - 19968: jis0212<<14 | 0x2A<<7 | 0x0C, + 29476 - 19968: jis0208<<14 | 0x5A<<7 | 0x01, + 29477 - 19968: jis0208<<14 | 0x3F<<7 | 0x2F, + 29479 - 19968: jis0212<<14 | 0x2A<<7 | 0x0E, + 29480 - 19968: jis0212<<14 | 0x2A<<7 | 0x0F, + 29481 - 19968: jis0208<<14 | 0x3F<<7 | 0x2E, + 29482 - 19968: jis0208<<14 | 0x22<<7 | 0x55, + 29483 - 19968: jis0208<<14 | 0x26<<7 | 0x0C, + 29484 - 19968: jis0212<<14 | 0x2A<<7 | 0x10, + 29486 - 19968: jis0208<<14 | 0x17<<7 | 0x04, + 29487 - 19968: jis0208<<14 | 0x3F<<7 | 0x2D, + 29489 - 19968: jis0212<<14 | 0x2A<<7 | 0x11, + 29490 - 19968: jis0212<<14 | 0x2A<<7 | 0x12, + 29492 - 19968: jis0208<<14 | 0x3F<<7 | 0x2C, + 29493 - 19968: jis0212<<14 | 0x2A<<7 | 0x13, + 29494 - 19968: jis0208<<14 | 0x2C<<7 | 0x10, + 29495 - 19968: jis0208<<14 | 0x2C<<7 | 0x11, + 29498 - 19968: jis0212<<14 | 0x2A<<7 | 0x14, + 29499 - 19968: jis0212<<14 | 0x2A<<7 | 0x15, + 29501 - 19968: jis0212<<14 | 0x2A<<7 | 0x16, + 29502 - 19968: jis0208<<14 | 0x3F<<7 | 0x30, + 29503 - 19968: jis0208<<14 | 0x10<<7 | 0x4D, + 29507 - 19968: jis0212<<14 | 0x2A<<7 | 0x17, + 29508 - 19968: jis0208<<14 | 0x18<<7 | 0x55, + 29509 - 19968: jis0208<<14 | 0x1A<<7 | 0x41, + 29517 - 19968: jis0212<<14 | 0x2A<<7 | 0x18, + 29518 - 19968: jis0208<<14 | 0x3F<<7 | 0x31, + 29519 - 19968: jis0208<<14 | 0x3F<<7 | 0x32, + 29520 - 19968: jis0212<<14 | 0x2A<<7 | 0x19, + 29522 - 19968: jis0212<<14 | 0x2A<<7 | 0x1A, + 29526 - 19968: jis0212<<14 | 0x2A<<7 | 0x1B, + 29527 - 19968: jis0208<<14 | 0x3F<<7 | 0x34, + 29528 - 19968: jis0212<<14 | 0x2A<<7 | 0x1C, + 29533 - 19968: jis0212<<14 | 0x2A<<7 | 0x1D, + 29534 - 19968: jis0212<<14 | 0x2A<<7 | 0x1E, + 29535 - 19968: jis0212<<14 | 0x2A<<7 | 0x1F, + 29536 - 19968: jis0212<<14 | 0x2A<<7 | 0x20, + 29539 - 19968: jis0208<<14 | 0x1C<<7 | 0x22, + 29542 - 19968: jis0212<<14 | 0x2A<<7 | 0x21, + 29543 - 19968: jis0212<<14 | 0x2A<<7 | 0x22, + 29544 - 19968: jis0208<<14 | 0x3F<<7 | 0x36, + 29545 - 19968: jis0212<<14 | 0x2A<<7 | 0x23, + 29546 - 19968: jis0208<<14 | 0x3F<<7 | 0x35, + 29547 - 19968: jis0212<<14 | 0x2A<<7 | 0x24, + 29548 - 19968: jis0212<<14 | 0x2A<<7 | 0x25, + 29550 - 19968: jis0212<<14 | 0x2A<<7 | 0x26, + 29551 - 19968: jis0212<<14 | 0x2A<<7 | 0x27, + 29552 - 19968: jis0208<<14 | 0x3F<<7 | 0x37, + 29553 - 19968: jis0212<<14 | 0x2A<<7 | 0x28, + 29554 - 19968: jis0208<<14 | 0x12<<7 | 0x2C, + 29557 - 19968: jis0208<<14 | 0x3F<<7 | 0x39, + 29559 - 19968: jis0208<<14 | 0x5A<<7 | 0x03, + 29560 - 19968: jis0208<<14 | 0x3F<<7 | 0x38, + 29561 - 19968: jis0212<<14 | 0x2A<<7 | 0x2A, + 29562 - 19968: jis0208<<14 | 0x3F<<7 | 0x3B, + 29563 - 19968: jis0208<<14 | 0x3F<<7 | 0x3A, + 29564 - 19968: jis0212<<14 | 0x2A<<7 | 0x2B, + 29568 - 19968: jis0212<<14 | 0x2A<<7 | 0x2C, + 29569 - 19968: jis0212<<14 | 0x2A<<7 | 0x2D, + 29571 - 19968: jis0212<<14 | 0x2A<<7 | 0x2E, + 29572 - 19968: jis0208<<14 | 0x17<<7 | 0x1B, + 29573 - 19968: jis0212<<14 | 0x2A<<7 | 0x2F, + 29574 - 19968: jis0212<<14 | 0x2A<<7 | 0x30, + 29575 - 19968: jis0208<<14 | 0x2D<<7 | 0x07, + 29577 - 19968: jis0208<<14 | 0x15<<7 | 0x2B, + 29579 - 19968: jis0208<<14 | 0x11<<7 | 0x05, + 29582 - 19968: jis0212<<14 | 0x2A<<7 | 0x31, + 29584 - 19968: jis0212<<14 | 0x2A<<7 | 0x32, + 29587 - 19968: jis0212<<14 | 0x2A<<7 | 0x33, + 29589 - 19968: jis0212<<14 | 0x2A<<7 | 0x34, + 29590 - 19968: jis0208<<14 | 0x15<<7 | 0x49, + 29591 - 19968: jis0212<<14 | 0x2A<<7 | 0x35, + 29592 - 19968: jis0212<<14 | 0x2A<<7 | 0x36, + 29596 - 19968: jis0212<<14 | 0x2A<<7 | 0x37, + 29598 - 19968: jis0212<<14 | 0x2A<<7 | 0x38, + 29599 - 19968: jis0212<<14 | 0x2A<<7 | 0x39, + 29600 - 19968: jis0212<<14 | 0x2A<<7 | 0x3A, + 29602 - 19968: jis0212<<14 | 0x2A<<7 | 0x3B, + 29605 - 19968: jis0212<<14 | 0x2A<<7 | 0x3C, + 29606 - 19968: jis0212<<14 | 0x2A<<7 | 0x3D, + 29609 - 19968: jis0208<<14 | 0x13<<7 | 0x40, + 29610 - 19968: jis0212<<14 | 0x2A<<7 | 0x3E, + 29611 - 19968: jis0212<<14 | 0x2A<<7 | 0x3F, + 29613 - 19968: jis0212<<14 | 0x2A<<7 | 0x40, + 29618 - 19968: jis0208<<14 | 0x2D<<7 | 0x47, + 29619 - 19968: jis0208<<14 | 0x3F<<7 | 0x3D, + 29621 - 19968: jis0212<<14 | 0x2A<<7 | 0x41, + 29623 - 19968: jis0212<<14 | 0x2A<<7 | 0x42, + 29625 - 19968: jis0212<<14 | 0x2A<<7 | 0x43, + 29627 - 19968: jis0208<<14 | 0x3F<<7 | 0x3F, + 29628 - 19968: jis0212<<14 | 0x2A<<7 | 0x44, + 29629 - 19968: jis0208<<14 | 0x5A<<7 | 0x04, + 29631 - 19968: jis0212<<14 | 0x2A<<7 | 0x46, + 29632 - 19968: jis0208<<14 | 0x3F<<7 | 0x40, + 29634 - 19968: jis0208<<14 | 0x11<<7 | 0x30, + 29637 - 19968: jis0212<<14 | 0x2A<<7 | 0x47, + 29638 - 19968: jis0212<<14 | 0x2A<<7 | 0x48, + 29640 - 19968: jis0208<<14 | 0x3F<<7 | 0x3C, + 29641 - 19968: jis0208<<14 | 0x5A<<7 | 0x05, + 29642 - 19968: jis0208<<14 | 0x1A<<7 | 0x18, + 29643 - 19968: jis0212<<14 | 0x2A<<7 | 0x4A, + 29644 - 19968: jis0212<<14 | 0x2A<<7 | 0x4B, + 29645 - 19968: jis0208<<14 | 0x23<<7 | 0x20, + 29646 - 19968: jis0208<<14 | 0x3F<<7 | 0x3E, + 29647 - 19968: jis0212<<14 | 0x2A<<7 | 0x4C, + 29650 - 19968: jis0208<<14 | 0x5A<<7 | 0x08, + 29651 - 19968: jis0212<<14 | 0x2A<<7 | 0x4E, + 29654 - 19968: jis0208<<14 | 0x5A<<7 | 0x06, + 29657 - 19968: jis0212<<14 | 0x2A<<7 | 0x50, + 29661 - 19968: jis0212<<14 | 0x2A<<7 | 0x51, + 29662 - 19968: jis0208<<14 | 0x3F<<7 | 0x43, + 29664 - 19968: jis0208<<14 | 0x1B<<7 | 0x4D, + 29665 - 19968: jis0212<<14 | 0x2A<<7 | 0x52, + 29667 - 19968: jis0208<<14 | 0x5A<<7 | 0x07, + 29669 - 19968: jis0208<<14 | 0x3F<<7 | 0x41, + 29670 - 19968: jis0212<<14 | 0x2A<<7 | 0x54, + 29671 - 19968: jis0212<<14 | 0x2A<<7 | 0x55, + 29673 - 19968: jis0212<<14 | 0x2A<<7 | 0x56, + 29674 - 19968: jis0208<<14 | 0x16<<7 | 0x1D, + 29677 - 19968: jis0208<<14 | 0x27<<7 | 0x28, + 29678 - 19968: jis0208<<14 | 0x3F<<7 | 0x42, + 29681 - 19968: jis0208<<14 | 0x3F<<7 | 0x5D, + 29684 - 19968: jis0212<<14 | 0x2A<<7 | 0x57, + 29685 - 19968: jis0208<<14 | 0x5A<<7 | 0x0A, + 29687 - 19968: jis0212<<14 | 0x2A<<7 | 0x59, + 29688 - 19968: jis0208<<14 | 0x3F<<7 | 0x48, + 29689 - 19968: jis0212<<14 | 0x2A<<7 | 0x5A, + 29690 - 19968: jis0212<<14 | 0x2A<<7 | 0x5B, + 29691 - 19968: jis0212<<14 | 0x2A<<7 | 0x5C, + 29693 - 19968: jis0212<<14 | 0x2A<<7 | 0x5D, + 29694 - 19968: jis0208<<14 | 0x17<<7 | 0x1C, + 29695 - 19968: jis0212<<14 | 0x2B<<7 | 0x00, + 29696 - 19968: jis0212<<14 | 0x2B<<7 | 0x01, + 29697 - 19968: jis0212<<14 | 0x2B<<7 | 0x02, + 29699 - 19968: jis0208<<14 | 0x14<<7 | 0x44, + 29700 - 19968: jis0212<<14 | 0x2B<<7 | 0x03, + 29701 - 19968: jis0208<<14 | 0x3F<<7 | 0x45, + 29702 - 19968: jis0208<<14 | 0x2C<<7 | 0x5C, + 29703 - 19968: jis0208<<14 | 0x5A<<7 | 0x09, + 29705 - 19968: jis0208<<14 | 0x2D<<7 | 0x0F, + 29706 - 19968: jis0212<<14 | 0x2B<<7 | 0x05, + 29713 - 19968: jis0212<<14 | 0x2B<<7 | 0x06, + 29722 - 19968: jis0212<<14 | 0x2B<<7 | 0x07, + 29723 - 19968: jis0212<<14 | 0x2B<<7 | 0x08, + 29730 - 19968: jis0208<<14 | 0x21<<7 | 0x55, + 29732 - 19968: jis0212<<14 | 0x2B<<7 | 0x09, + 29733 - 19968: jis0208<<14 | 0x3F<<7 | 0x47, + 29734 - 19968: jis0208<<14 | 0x5A<<7 | 0x0B, + 29736 - 19968: jis0212<<14 | 0x2B<<7 | 0x0B, + 29737 - 19968: jis0208<<14 | 0x5A<<7 | 0x0D, + 29738 - 19968: jis0208<<14 | 0x5A<<7 | 0x0C, + 29739 - 19968: jis0212<<14 | 0x2B<<7 | 0x0E, + 29740 - 19968: jis0212<<14 | 0x2B<<7 | 0x0F, + 29741 - 19968: jis0212<<14 | 0x2B<<7 | 0x10, + 29742 - 19968: jis0208<<14 | 0x5A<<7 | 0x0E, + 29743 - 19968: jis0212<<14 | 0x2B<<7 | 0x12, + 29744 - 19968: jis0212<<14 | 0x2B<<7 | 0x13, + 29745 - 19968: jis0212<<14 | 0x2B<<7 | 0x14, + 29746 - 19968: jis0208<<14 | 0x3F<<7 | 0x49, + 29747 - 19968: jis0208<<14 | 0x2D<<7 | 0x35, + 29748 - 19968: jis0208<<14 | 0x15<<7 | 0x36, + 29749 - 19968: jis0208<<14 | 0x27<<7 | 0x5B, + 29750 - 19968: jis0208<<14 | 0x26<<7 | 0x29, + 29753 - 19968: jis0212<<14 | 0x2B<<7 | 0x15, + 29754 - 19968: jis0208<<14 | 0x3F<<7 | 0x4A, + 29759 - 19968: jis0208<<14 | 0x3F<<7 | 0x4C, + 29760 - 19968: jis0212<<14 | 0x2B<<7 | 0x16, + 29761 - 19968: jis0208<<14 | 0x3F<<7 | 0x4F, + 29763 - 19968: jis0212<<14 | 0x2B<<7 | 0x17, + 29764 - 19968: jis0212<<14 | 0x2B<<7 | 0x18, + 29766 - 19968: jis0212<<14 | 0x2B<<7 | 0x19, + 29767 - 19968: jis0212<<14 | 0x2B<<7 | 0x1A, + 29771 - 19968: jis0212<<14 | 0x2B<<7 | 0x1B, + 29773 - 19968: jis0212<<14 | 0x2B<<7 | 0x1C, + 29777 - 19968: jis0212<<14 | 0x2B<<7 | 0x1D, + 29778 - 19968: jis0212<<14 | 0x2B<<7 | 0x1E, + 29781 - 19968: jis0208<<14 | 0x3F<<7 | 0x4B, + 29783 - 19968: jis0212<<14 | 0x2B<<7 | 0x1F, + 29785 - 19968: jis0208<<14 | 0x3F<<7 | 0x4E, + 29786 - 19968: jis0208<<14 | 0x17<<7 | 0x49, + 29787 - 19968: jis0208<<14 | 0x10<<7 | 0x2C, + 29788 - 19968: jis0208<<14 | 0x3F<<7 | 0x50, + 29789 - 19968: jis0212<<14 | 0x2B<<7 | 0x20, + 29790 - 19968: jis0208<<14 | 0x1E<<7 | 0x4F, + 29791 - 19968: jis0208<<14 | 0x3F<<7 | 0x4D, + 29792 - 19968: jis0208<<14 | 0x2D<<7 | 0x3B, + 29794 - 19968: jis0208<<14 | 0x5A<<7 | 0x0F, + 29795 - 19968: jis0208<<14 | 0x3F<<7 | 0x53, + 29796 - 19968: jis0208<<14 | 0x53<<7 | 0x03, + 29798 - 19968: jis0212<<14 | 0x2B<<7 | 0x22, + 29799 - 19968: jis0212<<14 | 0x2B<<7 | 0x23, + 29800 - 19968: jis0212<<14 | 0x2B<<7 | 0x24, + 29801 - 19968: jis0208<<14 | 0x3F<<7 | 0x51, + 29802 - 19968: jis0208<<14 | 0x3F<<7 | 0x54, + 29803 - 19968: jis0212<<14 | 0x2B<<7 | 0x25, + 29805 - 19968: jis0212<<14 | 0x2B<<7 | 0x26, + 29806 - 19968: jis0212<<14 | 0x2B<<7 | 0x27, + 29807 - 19968: jis0208<<14 | 0x3F<<7 | 0x46, + 29808 - 19968: jis0208<<14 | 0x3F<<7 | 0x52, + 29809 - 19968: jis0212<<14 | 0x2B<<7 | 0x28, + 29810 - 19968: jis0212<<14 | 0x2B<<7 | 0x29, + 29811 - 19968: jis0208<<14 | 0x19<<7 | 0x1B, + 29814 - 19968: jis0208<<14 | 0x3F<<7 | 0x55, + 29822 - 19968: jis0208<<14 | 0x3F<<7 | 0x56, + 29824 - 19968: jis0212<<14 | 0x2B<<7 | 0x2A, + 29825 - 19968: jis0212<<14 | 0x2B<<7 | 0x2B, + 29827 - 19968: jis0208<<14 | 0x2C<<7 | 0x5D, + 29829 - 19968: jis0212<<14 | 0x2B<<7 | 0x2C, + 29830 - 19968: jis0212<<14 | 0x2B<<7 | 0x2D, + 29831 - 19968: jis0212<<14 | 0x2B<<7 | 0x2E, + 29833 - 19968: jis0208<<14 | 0x5A<<7 | 0x10, + 29835 - 19968: jis0208<<14 | 0x3F<<7 | 0x57, + 29839 - 19968: jis0212<<14 | 0x2B<<7 | 0x30, + 29840 - 19968: jis0212<<14 | 0x2B<<7 | 0x31, + 29841 - 19968: jis0212<<14 | 0x2B<<7 | 0x32, + 29842 - 19968: jis0212<<14 | 0x2B<<7 | 0x33, + 29848 - 19968: jis0212<<14 | 0x2B<<7 | 0x34, + 29849 - 19968: jis0212<<14 | 0x2B<<7 | 0x35, + 29850 - 19968: jis0212<<14 | 0x2B<<7 | 0x36, + 29852 - 19968: jis0212<<14 | 0x2B<<7 | 0x37, + 29854 - 19968: jis0208<<14 | 0x3F<<7 | 0x58, + 29855 - 19968: jis0208<<14 | 0x5A<<7 | 0x11, + 29856 - 19968: jis0212<<14 | 0x2B<<7 | 0x39, + 29857 - 19968: jis0212<<14 | 0x2B<<7 | 0x3A, + 29858 - 19968: jis0208<<14 | 0x3F<<7 | 0x44, + 29859 - 19968: jis0212<<14 | 0x2B<<7 | 0x3B, + 29862 - 19968: jis0212<<14 | 0x2B<<7 | 0x3C, + 29863 - 19968: jis0208<<14 | 0x3F<<7 | 0x59, + 29864 - 19968: jis0212<<14 | 0x2B<<7 | 0x3D, + 29865 - 19968: jis0212<<14 | 0x2B<<7 | 0x3E, + 29866 - 19968: jis0212<<14 | 0x2B<<7 | 0x3F, + 29867 - 19968: jis0212<<14 | 0x2B<<7 | 0x40, + 29870 - 19968: jis0212<<14 | 0x2B<<7 | 0x41, + 29871 - 19968: jis0212<<14 | 0x2B<<7 | 0x42, + 29872 - 19968: jis0208<<14 | 0x13<<7 | 0x23, + 29873 - 19968: jis0212<<14 | 0x2B<<7 | 0x43, + 29874 - 19968: jis0212<<14 | 0x2B<<7 | 0x44, + 29877 - 19968: jis0212<<14 | 0x2B<<7 | 0x45, + 29881 - 19968: jis0212<<14 | 0x2B<<7 | 0x46, + 29883 - 19968: jis0212<<14 | 0x2B<<7 | 0x47, + 29885 - 19968: jis0208<<14 | 0x1B<<7 | 0x04, + 29887 - 19968: jis0212<<14 | 0x2B<<7 | 0x48, + 29896 - 19968: jis0212<<14 | 0x2B<<7 | 0x49, + 29897 - 19968: jis0212<<14 | 0x2B<<7 | 0x4A, + 29898 - 19968: jis0208<<14 | 0x3F<<7 | 0x5A, + 29900 - 19968: jis0212<<14 | 0x2B<<7 | 0x4B, + 29903 - 19968: jis0208<<14 | 0x3F<<7 | 0x5B, + 29904 - 19968: jis0212<<14 | 0x2B<<7 | 0x4C, + 29907 - 19968: jis0212<<14 | 0x2B<<7 | 0x4D, + 29908 - 19968: jis0208<<14 | 0x3F<<7 | 0x5C, + 29912 - 19968: jis0212<<14 | 0x2B<<7 | 0x4E, + 29914 - 19968: jis0212<<14 | 0x2B<<7 | 0x4F, + 29915 - 19968: jis0212<<14 | 0x2B<<7 | 0x50, + 29916 - 19968: jis0208<<14 | 0x10<<7 | 0x1A, + 29918 - 19968: jis0212<<14 | 0x2B<<7 | 0x51, + 29919 - 19968: jis0212<<14 | 0x2B<<7 | 0x52, + 29920 - 19968: jis0208<<14 | 0x40<<7 | 0x00, + 29922 - 19968: jis0208<<14 | 0x28<<7 | 0x1A, + 29923 - 19968: jis0208<<14 | 0x40<<7 | 0x01, + 29924 - 19968: jis0212<<14 | 0x2B<<7 | 0x53, + 29926 - 19968: jis0208<<14 | 0x13<<7 | 0x03, + 29927 - 19968: jis0208<<14 | 0x40<<7 | 0x02, + 29928 - 19968: jis0212<<14 | 0x2B<<7 | 0x54, + 29929 - 19968: jis0208<<14 | 0x40<<7 | 0x03, + 29930 - 19968: jis0212<<14 | 0x2B<<7 | 0x55, + 29931 - 19968: jis0212<<14 | 0x2B<<7 | 0x56, + 29934 - 19968: jis0208<<14 | 0x40<<7 | 0x04, + 29935 - 19968: jis0212<<14 | 0x2B<<7 | 0x57, + 29936 - 19968: jis0208<<14 | 0x40<<7 | 0x06, + 29937 - 19968: jis0208<<14 | 0x40<<7 | 0x07, + 29938 - 19968: jis0208<<14 | 0x40<<7 | 0x05, + 29940 - 19968: jis0212<<14 | 0x2B<<7 | 0x58, + 29942 - 19968: jis0208<<14 | 0x28<<7 | 0x32, + 29943 - 19968: jis0208<<14 | 0x40<<7 | 0x09, + 29944 - 19968: jis0208<<14 | 0x40<<7 | 0x08, + 29946 - 19968: jis0212<<14 | 0x2B<<7 | 0x59, + 29947 - 19968: jis0212<<14 | 0x2B<<7 | 0x5A, + 29948 - 19968: jis0212<<14 | 0x2B<<7 | 0x5B, + 29951 - 19968: jis0212<<14 | 0x2B<<7 | 0x5C, + 29953 - 19968: jis0208<<14 | 0x5A<<7 | 0x12, + 29955 - 19968: jis0208<<14 | 0x40<<7 | 0x0B, + 29956 - 19968: jis0208<<14 | 0x40<<7 | 0x0A, + 29957 - 19968: jis0208<<14 | 0x40<<7 | 0x0C, + 29958 - 19968: jis0212<<14 | 0x2B<<7 | 0x5D, + 29964 - 19968: jis0208<<14 | 0x40<<7 | 0x0D, + 29965 - 19968: jis0208<<14 | 0x40<<7 | 0x0F, + 29966 - 19968: jis0208<<14 | 0x40<<7 | 0x0E, + 29969 - 19968: jis0208<<14 | 0x18<<7 | 0x58, + 29970 - 19968: jis0212<<14 | 0x2C<<7 | 0x00, + 29971 - 19968: jis0208<<14 | 0x40<<7 | 0x11, + 29973 - 19968: jis0208<<14 | 0x40<<7 | 0x10, + 29974 - 19968: jis0212<<14 | 0x2C<<7 | 0x01, + 29975 - 19968: jis0212<<14 | 0x2C<<7 | 0x02, + 29976 - 19968: jis0208<<14 | 0x13<<7 | 0x24, + 29978 - 19968: jis0208<<14 | 0x1E<<7 | 0x32, + 29980 - 19968: jis0208<<14 | 0x24<<7 | 0x1B, + 29982 - 19968: jis0208<<14 | 0x40<<7 | 0x12, + 29983 - 19968: jis0208<<14 | 0x1F<<7 | 0x17, + 29984 - 19968: jis0212<<14 | 0x2C<<7 | 0x03, + 29985 - 19968: jis0212<<14 | 0x2C<<7 | 0x04, + 29987 - 19968: jis0208<<14 | 0x1A<<7 | 0x19, + 29988 - 19968: jis0212<<14 | 0x2C<<7 | 0x05, + 29989 - 19968: jis0208<<14 | 0x10<<7 | 0x58, + 29990 - 19968: jis0208<<14 | 0x40<<7 | 0x13, + 29991 - 19968: jis0212<<14 | 0x2C<<7 | 0x06, + 29992 - 19968: jis0208<<14 | 0x2C<<7 | 0x30, + 29993 - 19968: jis0212<<14 | 0x2C<<7 | 0x07, + 29994 - 19968: jis0212<<14 | 0x2C<<7 | 0x08, + 29995 - 19968: jis0208<<14 | 0x29<<7 | 0x42, + 29996 - 19968: jis0208<<14 | 0x40<<7 | 0x14, + 29999 - 19968: jis0208<<14 | 0x58<<7 | 0x4B, + 30000 - 19968: jis0208<<14 | 0x24<<7 | 0x23, + 30001 - 19968: jis0208<<14 | 0x2C<<7 | 0x12, + 30002 - 19968: jis0208<<14 | 0x18<<7 | 0x22, + 30003 - 19968: jis0208<<14 | 0x1E<<7 | 0x1C, + 30006 - 19968: jis0212<<14 | 0x2C<<7 | 0x0A, + 30007 - 19968: jis0208<<14 | 0x22<<7 | 0x2A, + 30008 - 19968: jis0208<<14 | 0x31<<7 | 0x13, + 30009 - 19968: jis0212<<14 | 0x2C<<7 | 0x0B, + 30010 - 19968: jis0208<<14 | 0x23<<7 | 0x0D, + 30011 - 19968: jis0208<<14 | 0x11<<7 | 0x47, + 30012 - 19968: jis0208<<14 | 0x40<<7 | 0x15, + 30013 - 19968: jis0212<<14 | 0x2C<<7 | 0x0C, + 30014 - 19968: jis0212<<14 | 0x2C<<7 | 0x0D, + 30015 - 19968: jis0212<<14 | 0x2C<<7 | 0x0E, + 30016 - 19968: jis0212<<14 | 0x2C<<7 | 0x0F, + 30019 - 19968: jis0212<<14 | 0x2C<<7 | 0x10, + 30020 - 19968: jis0208<<14 | 0x40<<7 | 0x16, + 30022 - 19968: jis0208<<14 | 0x40<<7 | 0x1B, + 30023 - 19968: jis0212<<14 | 0x2C<<7 | 0x11, + 30024 - 19968: jis0212<<14 | 0x2C<<7 | 0x12, + 30025 - 19968: jis0208<<14 | 0x40<<7 | 0x19, + 30026 - 19968: jis0208<<14 | 0x40<<7 | 0x18, + 30027 - 19968: jis0208<<14 | 0x39<<7 | 0x21, + 30028 - 19968: jis0208<<14 | 0x12<<7 | 0x05, + 30029 - 19968: jis0208<<14 | 0x40<<7 | 0x17, + 30030 - 19968: jis0212<<14 | 0x2C<<7 | 0x13, + 30031 - 19968: jis0208<<14 | 0x0F<<7 | 0x39, + 30032 - 19968: jis0212<<14 | 0x2C<<7 | 0x14, + 30033 - 19968: jis0208<<14 | 0x27<<7 | 0x09, + 30034 - 19968: jis0212<<14 | 0x2C<<7 | 0x15, + 30036 - 19968: jis0208<<14 | 0x27<<7 | 0x29, + 30039 - 19968: jis0212<<14 | 0x2C<<7 | 0x16, + 30041 - 19968: jis0208<<14 | 0x2D<<7 | 0x10, + 30042 - 19968: jis0208<<14 | 0x40<<7 | 0x1C, + 30043 - 19968: jis0208<<14 | 0x40<<7 | 0x1A, + 30044 - 19968: jis0208<<14 | 0x22<<7 | 0x3B, + 30045 - 19968: jis0208<<14 | 0x1F<<7 | 0x05, + 30046 - 19968: jis0212<<14 | 0x2C<<7 | 0x17, + 30047 - 19968: jis0212<<14 | 0x2C<<7 | 0x18, + 30048 - 19968: jis0208<<14 | 0x27<<7 | 0x0A, + 30049 - 19968: jis0212<<14 | 0x2C<<7 | 0x19, + 30050 - 19968: jis0208<<14 | 0x28<<7 | 0x0C, + 30052 - 19968: jis0208<<14 | 0x40<<7 | 0x1E, + 30053 - 19968: jis0208<<14 | 0x2D<<7 | 0x0B, + 30054 - 19968: jis0208<<14 | 0x16<<7 | 0x2C, + 30055 - 19968: jis0208<<14 | 0x40<<7 | 0x1F, + 30057 - 19968: jis0208<<14 | 0x40<<7 | 0x1D, + 30058 - 19968: jis0208<<14 | 0x27<<7 | 0x35, + 30059 - 19968: jis0208<<14 | 0x40<<7 | 0x20, + 30061 - 19968: jis0208<<14 | 0x40<<7 | 0x21, + 30063 - 19968: jis0208<<14 | 0x5A<<7 | 0x13, + 30064 - 19968: jis0208<<14 | 0x0F<<7 | 0x3A, + 30065 - 19968: jis0212<<14 | 0x2C<<7 | 0x1B, + 30067 - 19968: jis0208<<14 | 0x1D<<7 | 0x55, + 30068 - 19968: jis0208<<14 | 0x40<<7 | 0x26, + 30070 - 19968: jis0208<<14 | 0x40<<7 | 0x23, + 30071 - 19968: jis0208<<14 | 0x25<<7 | 0x4C, + 30072 - 19968: jis0208<<14 | 0x40<<7 | 0x22, + 30073 - 19968: jis0212<<14 | 0x2C<<7 | 0x1C, + 30074 - 19968: jis0212<<14 | 0x2C<<7 | 0x1D, + 30075 - 19968: jis0212<<14 | 0x2C<<7 | 0x1E, + 30076 - 19968: jis0212<<14 | 0x2C<<7 | 0x1F, + 30077 - 19968: jis0212<<14 | 0x2C<<7 | 0x20, + 30078 - 19968: jis0212<<14 | 0x2C<<7 | 0x21, + 30079 - 19968: jis0208<<14 | 0x14<<7 | 0x05, + 30081 - 19968: jis0212<<14 | 0x2C<<7 | 0x22, + 30082 - 19968: jis0208<<14 | 0x40<<7 | 0x29, + 30085 - 19968: jis0212<<14 | 0x2C<<7 | 0x23, + 30086 - 19968: jis0208<<14 | 0x40<<7 | 0x24, + 30087 - 19968: jis0208<<14 | 0x40<<7 | 0x25, + 30089 - 19968: jis0208<<14 | 0x40<<7 | 0x28, + 30090 - 19968: jis0208<<14 | 0x40<<7 | 0x27, + 30091 - 19968: jis0208<<14 | 0x28<<7 | 0x04, + 30094 - 19968: jis0208<<14 | 0x20<<7 | 0x21, + 30095 - 19968: jis0208<<14 | 0x20<<7 | 0x20, + 30096 - 19968: jis0212<<14 | 0x2C<<7 | 0x24, + 30097 - 19968: jis0208<<14 | 0x14<<7 | 0x1E, + 30098 - 19968: jis0212<<14 | 0x2C<<7 | 0x25, + 30099 - 19968: jis0212<<14 | 0x2C<<7 | 0x26, + 30100 - 19968: jis0208<<14 | 0x40<<7 | 0x2A, + 30101 - 19968: jis0212<<14 | 0x2C<<7 | 0x27, + 30105 - 19968: jis0212<<14 | 0x2C<<7 | 0x28, + 30106 - 19968: jis0208<<14 | 0x40<<7 | 0x2B, + 30108 - 19968: jis0212<<14 | 0x2C<<7 | 0x29, + 30109 - 19968: jis0208<<14 | 0x40<<7 | 0x2C, + 30114 - 19968: jis0212<<14 | 0x2C<<7 | 0x2A, + 30115 - 19968: jis0208<<14 | 0x40<<7 | 0x2E, + 30116 - 19968: jis0212<<14 | 0x2C<<7 | 0x2B, + 30117 - 19968: jis0208<<14 | 0x40<<7 | 0x2D, + 30123 - 19968: jis0208<<14 | 0x10<<7 | 0x35, + 30129 - 19968: jis0208<<14 | 0x40<<7 | 0x36, + 30130 - 19968: jis0208<<14 | 0x27<<7 | 0x47, + 30131 - 19968: jis0208<<14 | 0x40<<7 | 0x30, + 30132 - 19968: jis0212<<14 | 0x2C<<7 | 0x2C, + 30133 - 19968: jis0208<<14 | 0x40<<7 | 0x32, + 30136 - 19968: jis0208<<14 | 0x40<<7 | 0x34, + 30137 - 19968: jis0208<<14 | 0x1E<<7 | 0x1D, + 30138 - 19968: jis0212<<14 | 0x2C<<7 | 0x2D, + 30140 - 19968: jis0208<<14 | 0x40<<7 | 0x35, + 30141 - 19968: jis0208<<14 | 0x40<<7 | 0x33, + 30142 - 19968: jis0208<<14 | 0x1B<<7 | 0x1F, + 30143 - 19968: jis0212<<14 | 0x2C<<7 | 0x2E, + 30144 - 19968: jis0212<<14 | 0x2C<<7 | 0x2F, + 30145 - 19968: jis0212<<14 | 0x2C<<7 | 0x30, + 30146 - 19968: jis0208<<14 | 0x40<<7 | 0x2F, + 30147 - 19968: jis0208<<14 | 0x40<<7 | 0x31, + 30148 - 19968: jis0212<<14 | 0x2C<<7 | 0x31, + 30149 - 19968: jis0208<<14 | 0x28<<7 | 0x21, + 30150 - 19968: jis0212<<14 | 0x2C<<7 | 0x32, + 30151 - 19968: jis0208<<14 | 0x1D<<7 | 0x28, + 30154 - 19968: jis0208<<14 | 0x40<<7 | 0x38, + 30156 - 19968: jis0212<<14 | 0x2C<<7 | 0x33, + 30157 - 19968: jis0208<<14 | 0x40<<7 | 0x37, + 30158 - 19968: jis0212<<14 | 0x2C<<7 | 0x34, + 30159 - 19968: jis0212<<14 | 0x2C<<7 | 0x35, + 30162 - 19968: jis0208<<14 | 0x40<<7 | 0x39, + 30164 - 19968: jis0208<<14 | 0x1B<<7 | 0x05, + 30165 - 19968: jis0208<<14 | 0x19<<7 | 0x0E, + 30167 - 19968: jis0212<<14 | 0x2C<<7 | 0x36, + 30168 - 19968: jis0208<<14 | 0x24<<7 | 0x56, + 30169 - 19968: jis0208<<14 | 0x40<<7 | 0x3A, + 30171 - 19968: jis0208<<14 | 0x23<<7 | 0x2A, + 30172 - 19968: jis0212<<14 | 0x2C<<7 | 0x37, + 30174 - 19968: jis0208<<14 | 0x40<<7 | 0x3C, + 30175 - 19968: jis0212<<14 | 0x2C<<7 | 0x38, + 30176 - 19968: jis0212<<14 | 0x2C<<7 | 0x39, + 30177 - 19968: jis0212<<14 | 0x2C<<7 | 0x3A, + 30178 - 19968: jis0208<<14 | 0x2D<<7 | 0x00, + 30179 - 19968: jis0208<<14 | 0x40<<7 | 0x3B, + 30180 - 19968: jis0212<<14 | 0x2C<<7 | 0x3B, + 30183 - 19968: jis0212<<14 | 0x2C<<7 | 0x3C, + 30185 - 19968: jis0208<<14 | 0x20<<7 | 0x48, + 30188 - 19968: jis0212<<14 | 0x2C<<7 | 0x3D, + 30190 - 19968: jis0212<<14 | 0x2C<<7 | 0x3E, + 30191 - 19968: jis0212<<14 | 0x2C<<7 | 0x3F, + 30192 - 19968: jis0208<<14 | 0x40<<7 | 0x41, + 30193 - 19968: jis0212<<14 | 0x2C<<7 | 0x40, + 30194 - 19968: jis0208<<14 | 0x40<<7 | 0x43, + 30195 - 19968: jis0208<<14 | 0x40<<7 | 0x44, + 30196 - 19968: jis0208<<14 | 0x22<<7 | 0x33, + 30201 - 19968: jis0212<<14 | 0x2C<<7 | 0x41, + 30202 - 19968: jis0208<<14 | 0x40<<7 | 0x42, + 30204 - 19968: jis0208<<14 | 0x40<<7 | 0x3F, + 30206 - 19968: jis0208<<14 | 0x40<<7 | 0x3D, + 30207 - 19968: jis0208<<14 | 0x40<<7 | 0x3E, + 30208 - 19968: jis0212<<14 | 0x2C<<7 | 0x42, + 30209 - 19968: jis0208<<14 | 0x40<<7 | 0x40, + 30210 - 19968: jis0212<<14 | 0x2C<<7 | 0x43, + 30211 - 19968: jis0212<<14 | 0x2C<<7 | 0x44, + 30212 - 19968: jis0212<<14 | 0x2C<<7 | 0x45, + 30215 - 19968: jis0212<<14 | 0x2C<<7 | 0x46, + 30216 - 19968: jis0212<<14 | 0x2C<<7 | 0x47, + 30217 - 19968: jis0208<<14 | 0x40<<7 | 0x47, + 30218 - 19968: jis0212<<14 | 0x2C<<7 | 0x48, + 30219 - 19968: jis0208<<14 | 0x40<<7 | 0x45, + 30220 - 19968: jis0212<<14 | 0x2C<<7 | 0x49, + 30221 - 19968: jis0208<<14 | 0x40<<7 | 0x46, + 30223 - 19968: jis0212<<14 | 0x2C<<7 | 0x4A, + 30226 - 19968: jis0212<<14 | 0x2C<<7 | 0x4B, + 30227 - 19968: jis0212<<14 | 0x2C<<7 | 0x4C, + 30229 - 19968: jis0212<<14 | 0x2C<<7 | 0x4D, + 30230 - 19968: jis0212<<14 | 0x2C<<7 | 0x4E, + 30233 - 19968: jis0212<<14 | 0x2C<<7 | 0x4F, + 30235 - 19968: jis0212<<14 | 0x2C<<7 | 0x50, + 30236 - 19968: jis0212<<14 | 0x2C<<7 | 0x51, + 30237 - 19968: jis0212<<14 | 0x2C<<7 | 0x52, + 30238 - 19968: jis0212<<14 | 0x2C<<7 | 0x53, + 30239 - 19968: jis0208<<14 | 0x40<<7 | 0x48, + 30240 - 19968: jis0208<<14 | 0x40<<7 | 0x4A, + 30241 - 19968: jis0208<<14 | 0x40<<7 | 0x4B, + 30242 - 19968: jis0208<<14 | 0x40<<7 | 0x4C, + 30243 - 19968: jis0212<<14 | 0x2C<<7 | 0x54, + 30244 - 19968: jis0208<<14 | 0x40<<7 | 0x4D, + 30245 - 19968: jis0212<<14 | 0x2C<<7 | 0x55, + 30246 - 19968: jis0212<<14 | 0x2C<<7 | 0x56, + 30247 - 19968: jis0208<<14 | 0x40<<7 | 0x49, + 30249 - 19968: jis0212<<14 | 0x2C<<7 | 0x57, + 30253 - 19968: jis0212<<14 | 0x2C<<7 | 0x58, + 30256 - 19968: jis0208<<14 | 0x40<<7 | 0x4F, + 30258 - 19968: jis0212<<14 | 0x2C<<7 | 0x59, + 30259 - 19968: jis0212<<14 | 0x2C<<7 | 0x5A, + 30260 - 19968: jis0208<<14 | 0x40<<7 | 0x4E, + 30261 - 19968: jis0212<<14 | 0x2C<<7 | 0x5B, + 30264 - 19968: jis0212<<14 | 0x2C<<7 | 0x5C, + 30265 - 19968: jis0212<<14 | 0x2C<<7 | 0x5D, + 30266 - 19968: jis0212<<14 | 0x2D<<7 | 0x00, + 30267 - 19968: jis0208<<14 | 0x40<<7 | 0x50, + 30268 - 19968: jis0212<<14 | 0x2D<<7 | 0x01, + 30272 - 19968: jis0212<<14 | 0x2D<<7 | 0x03, + 30273 - 19968: jis0212<<14 | 0x2D<<7 | 0x04, + 30274 - 19968: jis0208<<14 | 0x2D<<7 | 0x24, + 30275 - 19968: jis0212<<14 | 0x2D<<7 | 0x05, + 30276 - 19968: jis0212<<14 | 0x2D<<7 | 0x06, + 30277 - 19968: jis0212<<14 | 0x2D<<7 | 0x07, + 30278 - 19968: jis0208<<14 | 0x40<<7 | 0x53, + 30279 - 19968: jis0208<<14 | 0x40<<7 | 0x51, + 30280 - 19968: jis0208<<14 | 0x40<<7 | 0x52, + 30281 - 19968: jis0212<<14 | 0x2D<<7 | 0x08, + 30282 - 19968: jis0212<<14 | 0x2D<<7 | 0x02, + 30283 - 19968: jis0212<<14 | 0x2D<<7 | 0x09, + 30284 - 19968: jis0208<<14 | 0x13<<7 | 0x41, + 30290 - 19968: jis0208<<14 | 0x2B<<7 | 0x5D, + 30293 - 19968: jis0212<<14 | 0x2D<<7 | 0x0A, + 30294 - 19968: jis0208<<14 | 0x29<<7 | 0x29, + 30296 - 19968: jis0208<<14 | 0x40<<7 | 0x55, + 30297 - 19968: jis0212<<14 | 0x2D<<7 | 0x0B, + 30300 - 19968: jis0208<<14 | 0x40<<7 | 0x54, + 30303 - 19968: jis0212<<14 | 0x2D<<7 | 0x0C, + 30305 - 19968: jis0208<<14 | 0x40<<7 | 0x56, + 30306 - 19968: jis0208<<14 | 0x40<<7 | 0x57, + 30308 - 19968: jis0212<<14 | 0x2D<<7 | 0x0D, + 30309 - 19968: jis0212<<14 | 0x2D<<7 | 0x0E, + 30311 - 19968: jis0208<<14 | 0x40<<7 | 0x5B, + 30312 - 19968: jis0208<<14 | 0x40<<7 | 0x58, + 30313 - 19968: jis0208<<14 | 0x40<<7 | 0x59, + 30314 - 19968: jis0208<<14 | 0x40<<7 | 0x5A, + 30316 - 19968: jis0208<<14 | 0x40<<7 | 0x5C, + 30317 - 19968: jis0212<<14 | 0x2D<<7 | 0x0F, + 30318 - 19968: jis0212<<14 | 0x2D<<7 | 0x10, + 30319 - 19968: jis0212<<14 | 0x2D<<7 | 0x11, + 30320 - 19968: jis0208<<14 | 0x40<<7 | 0x5D, + 30321 - 19968: jis0212<<14 | 0x2D<<7 | 0x12, + 30322 - 19968: jis0208<<14 | 0x41<<7 | 0x00, + 30324 - 19968: jis0212<<14 | 0x2D<<7 | 0x13, + 30326 - 19968: jis0208<<14 | 0x41<<7 | 0x01, + 30328 - 19968: jis0208<<14 | 0x41<<7 | 0x02, + 30330 - 19968: jis0208<<14 | 0x27<<7 | 0x0E, + 30331 - 19968: jis0208<<14 | 0x24<<7 | 0x2F, + 30332 - 19968: jis0208<<14 | 0x41<<7 | 0x03, + 30333 - 19968: jis0208<<14 | 0x26<<7 | 0x51, + 30334 - 19968: jis0208<<14 | 0x28<<7 | 0x13, + 30336 - 19968: jis0208<<14 | 0x41<<7 | 0x04, + 30337 - 19968: jis0212<<14 | 0x2D<<7 | 0x14, + 30338 - 19968: jis0208<<14 | 0x5A<<7 | 0x14, + 30339 - 19968: jis0208<<14 | 0x41<<7 | 0x05, + 30340 - 19968: jis0208<<14 | 0x24<<7 | 0x09, + 30341 - 19968: jis0212<<14 | 0x2D<<7 | 0x15, + 30342 - 19968: jis0208<<14 | 0x12<<7 | 0x06, + 30343 - 19968: jis0208<<14 | 0x18<<7 | 0x23, + 30344 - 19968: jis0208<<14 | 0x41<<7 | 0x06, + 30347 - 19968: jis0208<<14 | 0x41<<7 | 0x07, + 30348 - 19968: jis0212<<14 | 0x2D<<7 | 0x16, + 30349 - 19968: jis0212<<14 | 0x2D<<7 | 0x17, + 30350 - 19968: jis0208<<14 | 0x41<<7 | 0x08, + 30352 - 19968: jis0208<<14 | 0x1A<<7 | 0x08, + 30355 - 19968: jis0208<<14 | 0x41<<7 | 0x0A, + 30357 - 19968: jis0212<<14 | 0x2D<<7 | 0x18, + 30358 - 19968: jis0208<<14 | 0x41<<7 | 0x09, + 30361 - 19968: jis0208<<14 | 0x41<<7 | 0x0B, + 30362 - 19968: jis0208<<14 | 0x41<<7 | 0x0C, + 30363 - 19968: jis0208<<14 | 0x5A<<7 | 0x17, + 30364 - 19968: jis0208<<14 | 0x5A<<7 | 0x15, + 30365 - 19968: jis0212<<14 | 0x2D<<7 | 0x1B, + 30366 - 19968: jis0208<<14 | 0x5A<<7 | 0x16, + 30367 - 19968: jis0212<<14 | 0x2D<<7 | 0x1C, + 30368 - 19968: jis0212<<14 | 0x2D<<7 | 0x1D, + 30370 - 19968: jis0212<<14 | 0x2D<<7 | 0x1E, + 30371 - 19968: jis0212<<14 | 0x2D<<7 | 0x1F, + 30372 - 19968: jis0212<<14 | 0x2D<<7 | 0x20, + 30373 - 19968: jis0212<<14 | 0x2D<<7 | 0x21, + 30374 - 19968: jis0208<<14 | 0x5A<<7 | 0x18, + 30375 - 19968: jis0212<<14 | 0x2D<<7 | 0x23, + 30376 - 19968: jis0212<<14 | 0x2D<<7 | 0x24, + 30378 - 19968: jis0212<<14 | 0x2D<<7 | 0x25, + 30381 - 19968: jis0212<<14 | 0x2D<<7 | 0x26, + 30382 - 19968: jis0208<<14 | 0x27<<7 | 0x48, + 30384 - 19968: jis0208<<14 | 0x41<<7 | 0x0D, + 30388 - 19968: jis0208<<14 | 0x41<<7 | 0x0E, + 30391 - 19968: jis0208<<14 | 0x52<<7 | 0x48, + 30392 - 19968: jis0208<<14 | 0x41<<7 | 0x0F, + 30393 - 19968: jis0208<<14 | 0x41<<7 | 0x10, + 30394 - 19968: jis0208<<14 | 0x41<<7 | 0x11, + 30397 - 19968: jis0212<<14 | 0x2D<<7 | 0x27, + 30399 - 19968: jis0208<<14 | 0x1A<<7 | 0x0D, + 30401 - 19968: jis0212<<14 | 0x2D<<7 | 0x28, + 30402 - 19968: jis0208<<14 | 0x41<<7 | 0x12, + 30403 - 19968: jis0208<<14 | 0x26<<7 | 0x35, + 30405 - 19968: jis0212<<14 | 0x2D<<7 | 0x29, + 30406 - 19968: jis0208<<14 | 0x2A<<7 | 0x3E, + 30408 - 19968: jis0208<<14 | 0x10<<7 | 0x2D, + 30409 - 19968: jis0212<<14 | 0x2D<<7 | 0x2A, + 30410 - 19968: jis0208<<14 | 0x10<<7 | 0x36, + 30411 - 19968: jis0212<<14 | 0x2D<<7 | 0x2B, + 30412 - 19968: jis0212<<14 | 0x2D<<7 | 0x2C, + 30413 - 19968: jis0208<<14 | 0x41<<7 | 0x13, + 30414 - 19968: jis0212<<14 | 0x2D<<7 | 0x2D, + 30418 - 19968: jis0208<<14 | 0x41<<7 | 0x15, + 30420 - 19968: jis0212<<14 | 0x2D<<7 | 0x2E, + 30422 - 19968: jis0208<<14 | 0x41<<7 | 0x14, + 30423 - 19968: jis0208<<14 | 0x24<<7 | 0x4F, + 30425 - 19968: jis0212<<14 | 0x2D<<7 | 0x2F, + 30427 - 19968: jis0208<<14 | 0x1F<<7 | 0x18, + 30428 - 19968: jis0208<<14 | 0x3C<<7 | 0x18, + 30430 - 19968: jis0208<<14 | 0x41<<7 | 0x16, + 30431 - 19968: jis0208<<14 | 0x2B<<7 | 0x20, + 30432 - 19968: jis0212<<14 | 0x2D<<7 | 0x30, + 30433 - 19968: jis0208<<14 | 0x41<<7 | 0x17, + 30435 - 19968: jis0208<<14 | 0x13<<7 | 0x25, + 30436 - 19968: jis0208<<14 | 0x27<<7 | 0x36, + 30437 - 19968: jis0208<<14 | 0x41<<7 | 0x18, + 30438 - 19968: jis0212<<14 | 0x2D<<7 | 0x31, + 30439 - 19968: jis0208<<14 | 0x41<<7 | 0x19, + 30440 - 19968: jis0212<<14 | 0x2D<<7 | 0x32, + 30442 - 19968: jis0208<<14 | 0x41<<7 | 0x1A, + 30444 - 19968: jis0212<<14 | 0x2D<<7 | 0x33, + 30446 - 19968: jis0208<<14 | 0x2B<<7 | 0x3B, + 30448 - 19968: jis0212<<14 | 0x2D<<7 | 0x34, + 30449 - 19968: jis0212<<14 | 0x2D<<7 | 0x35, + 30450 - 19968: jis0208<<14 | 0x2B<<7 | 0x34, + 30452 - 19968: jis0208<<14 | 0x23<<7 | 0x1D, + 30454 - 19968: jis0212<<14 | 0x2D<<7 | 0x36, + 30456 - 19968: jis0208<<14 | 0x20<<7 | 0x49, + 30457 - 19968: jis0212<<14 | 0x2D<<7 | 0x37, + 30459 - 19968: jis0208<<14 | 0x41<<7 | 0x1C, + 30460 - 19968: jis0212<<14 | 0x2D<<7 | 0x38, + 30462 - 19968: jis0208<<14 | 0x1C<<7 | 0x41, + 30464 - 19968: jis0212<<14 | 0x2D<<7 | 0x39, + 30465 - 19968: jis0208<<14 | 0x1D<<7 | 0x29, + 30468 - 19968: jis0208<<14 | 0x41<<7 | 0x1F, + 30470 - 19968: jis0212<<14 | 0x2D<<7 | 0x3A, + 30471 - 19968: jis0208<<14 | 0x41<<7 | 0x1E, + 30472 - 19968: jis0208<<14 | 0x41<<7 | 0x1D, + 30473 - 19968: jis0208<<14 | 0x27<<7 | 0x5C, + 30474 - 19968: jis0212<<14 | 0x2D<<7 | 0x3B, + 30475 - 19968: jis0208<<14 | 0x13<<7 | 0x26, + 30476 - 19968: jis0208<<14 | 0x17<<7 | 0x08, + 30478 - 19968: jis0212<<14 | 0x2D<<7 | 0x3C, + 30482 - 19968: jis0212<<14 | 0x2D<<7 | 0x3D, + 30484 - 19968: jis0212<<14 | 0x2D<<7 | 0x3E, + 30485 - 19968: jis0212<<14 | 0x2D<<7 | 0x3F, + 30487 - 19968: jis0212<<14 | 0x2D<<7 | 0x40, + 30489 - 19968: jis0212<<14 | 0x2D<<7 | 0x41, + 30490 - 19968: jis0212<<14 | 0x2D<<7 | 0x42, + 30491 - 19968: jis0208<<14 | 0x41<<7 | 0x25, + 30492 - 19968: jis0212<<14 | 0x2D<<7 | 0x43, + 30494 - 19968: jis0208<<14 | 0x41<<7 | 0x22, + 30495 - 19968: jis0208<<14 | 0x1E<<7 | 0x1E, + 30496 - 19968: jis0208<<14 | 0x2B<<7 | 0x11, + 30498 - 19968: jis0212<<14 | 0x2D<<7 | 0x44, + 30500 - 19968: jis0208<<14 | 0x41<<7 | 0x21, + 30501 - 19968: jis0208<<14 | 0x41<<7 | 0x23, + 30502 - 19968: jis0208<<14 | 0x41<<7 | 0x24, + 30504 - 19968: jis0212<<14 | 0x2D<<7 | 0x45, + 30505 - 19968: jis0208<<14 | 0x41<<7 | 0x20, + 30509 - 19968: jis0212<<14 | 0x2D<<7 | 0x46, + 30510 - 19968: jis0212<<14 | 0x2D<<7 | 0x47, + 30511 - 19968: jis0212<<14 | 0x2D<<7 | 0x48, + 30516 - 19968: jis0212<<14 | 0x2D<<7 | 0x49, + 30517 - 19968: jis0212<<14 | 0x2D<<7 | 0x4A, + 30518 - 19968: jis0212<<14 | 0x2D<<7 | 0x4B, + 30519 - 19968: jis0208<<14 | 0x41<<7 | 0x26, + 30520 - 19968: jis0208<<14 | 0x41<<7 | 0x27, + 30521 - 19968: jis0212<<14 | 0x2D<<7 | 0x4C, + 30522 - 19968: jis0208<<14 | 0x23<<7 | 0x0E, + 30524 - 19968: jis0208<<14 | 0x13<<7 | 0x42, + 30525 - 19968: jis0212<<14 | 0x2D<<7 | 0x4D, + 30526 - 19968: jis0212<<14 | 0x2D<<7 | 0x4E, + 30528 - 19968: jis0208<<14 | 0x22<<7 | 0x44, + 30530 - 19968: jis0212<<14 | 0x2D<<7 | 0x4F, + 30533 - 19968: jis0212<<14 | 0x2D<<7 | 0x50, + 30534 - 19968: jis0208<<14 | 0x5A<<7 | 0x1A, + 30535 - 19968: jis0208<<14 | 0x41<<7 | 0x28, + 30538 - 19968: jis0212<<14 | 0x2D<<7 | 0x52, + 30541 - 19968: jis0212<<14 | 0x2D<<7 | 0x53, + 30542 - 19968: jis0212<<14 | 0x2D<<7 | 0x54, + 30543 - 19968: jis0212<<14 | 0x2D<<7 | 0x55, + 30546 - 19968: jis0212<<14 | 0x2D<<7 | 0x56, + 30550 - 19968: jis0212<<14 | 0x2D<<7 | 0x57, + 30551 - 19968: jis0212<<14 | 0x2D<<7 | 0x58, + 30554 - 19968: jis0208<<14 | 0x41<<7 | 0x29, + 30555 - 19968: jis0208<<14 | 0x41<<7 | 0x2C, + 30556 - 19968: jis0212<<14 | 0x2D<<7 | 0x59, + 30558 - 19968: jis0212<<14 | 0x2D<<7 | 0x5A, + 30559 - 19968: jis0212<<14 | 0x2D<<7 | 0x5B, + 30560 - 19968: jis0212<<14 | 0x2D<<7 | 0x5C, + 30561 - 19968: jis0208<<14 | 0x1E<<7 | 0x46, + 30562 - 19968: jis0212<<14 | 0x2D<<7 | 0x5D, + 30563 - 19968: jis0208<<14 | 0x25<<7 | 0x23, + 30564 - 19968: jis0212<<14 | 0x2E<<7 | 0x00, + 30565 - 19968: jis0208<<14 | 0x41<<7 | 0x2D, + 30566 - 19968: jis0208<<14 | 0x2A<<7 | 0x32, + 30567 - 19968: jis0212<<14 | 0x2E<<7 | 0x01, + 30568 - 19968: jis0208<<14 | 0x41<<7 | 0x2A, + 30570 - 19968: jis0212<<14 | 0x2E<<7 | 0x02, + 30571 - 19968: jis0208<<14 | 0x41<<7 | 0x2B, + 30572 - 19968: jis0212<<14 | 0x2E<<7 | 0x03, + 30576 - 19968: jis0212<<14 | 0x2E<<7 | 0x04, + 30578 - 19968: jis0212<<14 | 0x2E<<7 | 0x05, + 30579 - 19968: jis0212<<14 | 0x2E<<7 | 0x06, + 30580 - 19968: jis0212<<14 | 0x2E<<7 | 0x07, + 30585 - 19968: jis0208<<14 | 0x41<<7 | 0x30, + 30586 - 19968: jis0212<<14 | 0x2E<<7 | 0x08, + 30589 - 19968: jis0212<<14 | 0x2E<<7 | 0x09, + 30590 - 19968: jis0208<<14 | 0x41<<7 | 0x2F, + 30591 - 19968: jis0208<<14 | 0x41<<7 | 0x2E, + 30592 - 19968: jis0212<<14 | 0x2E<<7 | 0x0A, + 30596 - 19968: jis0212<<14 | 0x2E<<7 | 0x0B, + 30603 - 19968: jis0208<<14 | 0x41<<7 | 0x32, + 30604 - 19968: jis0212<<14 | 0x2E<<7 | 0x0C, + 30605 - 19968: jis0212<<14 | 0x2E<<7 | 0x0D, + 30606 - 19968: jis0208<<14 | 0x41<<7 | 0x31, + 30609 - 19968: jis0208<<14 | 0x41<<7 | 0x33, + 30612 - 19968: jis0212<<14 | 0x2E<<7 | 0x0E, + 30613 - 19968: jis0212<<14 | 0x2E<<7 | 0x0F, + 30614 - 19968: jis0212<<14 | 0x2E<<7 | 0x10, + 30618 - 19968: jis0212<<14 | 0x2E<<7 | 0x11, + 30622 - 19968: jis0208<<14 | 0x41<<7 | 0x35, + 30623 - 19968: jis0212<<14 | 0x2E<<7 | 0x12, + 30624 - 19968: jis0208<<14 | 0x41<<7 | 0x34, + 30626 - 19968: jis0212<<14 | 0x2E<<7 | 0x13, + 30629 - 19968: jis0208<<14 | 0x29<<7 | 0x2C, + 30631 - 19968: jis0212<<14 | 0x2E<<7 | 0x14, + 30634 - 19968: jis0212<<14 | 0x2E<<7 | 0x15, + 30636 - 19968: jis0208<<14 | 0x1C<<7 | 0x35, + 30637 - 19968: jis0208<<14 | 0x2D<<7 | 0x25, + 30638 - 19968: jis0212<<14 | 0x2E<<7 | 0x16, + 30639 - 19968: jis0212<<14 | 0x2E<<7 | 0x17, + 30640 - 19968: jis0208<<14 | 0x41<<7 | 0x36, + 30641 - 19968: jis0212<<14 | 0x2E<<7 | 0x18, + 30643 - 19968: jis0208<<14 | 0x25<<7 | 0x16, + 30645 - 19968: jis0212<<14 | 0x2E<<7 | 0x19, + 30646 - 19968: jis0208<<14 | 0x41<<7 | 0x37, + 30649 - 19968: jis0208<<14 | 0x41<<7 | 0x38, + 30651 - 19968: jis0208<<14 | 0x41<<7 | 0x3C, + 30652 - 19968: jis0208<<14 | 0x41<<7 | 0x3A, + 30653 - 19968: jis0208<<14 | 0x41<<7 | 0x3B, + 30654 - 19968: jis0212<<14 | 0x2E<<7 | 0x1A, + 30655 - 19968: jis0208<<14 | 0x41<<7 | 0x39, + 30659 - 19968: jis0212<<14 | 0x2E<<7 | 0x1B, + 30663 - 19968: jis0208<<14 | 0x41<<7 | 0x3D, + 30665 - 19968: jis0212<<14 | 0x2E<<7 | 0x1C, + 30669 - 19968: jis0208<<14 | 0x41<<7 | 0x3E, + 30673 - 19968: jis0212<<14 | 0x2E<<7 | 0x1D, + 30674 - 19968: jis0212<<14 | 0x2E<<7 | 0x1E, + 30677 - 19968: jis0212<<14 | 0x2E<<7 | 0x1F, + 30679 - 19968: jis0208<<14 | 0x41<<7 | 0x3F, + 30681 - 19968: jis0212<<14 | 0x2E<<7 | 0x20, + 30682 - 19968: jis0208<<14 | 0x41<<7 | 0x40, + 30683 - 19968: jis0208<<14 | 0x2B<<7 | 0x16, + 30684 - 19968: jis0208<<14 | 0x41<<7 | 0x41, + 30686 - 19968: jis0212<<14 | 0x2E<<7 | 0x21, + 30687 - 19968: jis0212<<14 | 0x2E<<7 | 0x22, + 30688 - 19968: jis0212<<14 | 0x2E<<7 | 0x23, + 30690 - 19968: jis0208<<14 | 0x2B<<7 | 0x4F, + 30691 - 19968: jis0208<<14 | 0x41<<7 | 0x42, + 30692 - 19968: jis0212<<14 | 0x2E<<7 | 0x24, + 30693 - 19968: jis0208<<14 | 0x22<<7 | 0x2D, + 30694 - 19968: jis0212<<14 | 0x2E<<7 | 0x25, + 30695 - 19968: jis0208<<14 | 0x26<<7 | 0x49, + 30697 - 19968: jis0208<<14 | 0x15<<7 | 0x4A, + 30698 - 19968: jis0212<<14 | 0x2E<<7 | 0x26, + 30700 - 19968: jis0212<<14 | 0x2E<<7 | 0x27, + 30701 - 19968: jis0208<<14 | 0x22<<7 | 0x1A, + 30702 - 19968: jis0208<<14 | 0x41<<7 | 0x43, + 30703 - 19968: jis0208<<14 | 0x15<<7 | 0x19, + 30704 - 19968: jis0212<<14 | 0x2E<<7 | 0x28, + 30705 - 19968: jis0212<<14 | 0x2E<<7 | 0x29, + 30707 - 19968: jis0208<<14 | 0x1F<<7 | 0x2F, + 30708 - 19968: jis0212<<14 | 0x2E<<7 | 0x2A, + 30712 - 19968: jis0212<<14 | 0x2E<<7 | 0x2B, + 30715 - 19968: jis0212<<14 | 0x2E<<7 | 0x2C, + 30716 - 19968: jis0208<<14 | 0x41<<7 | 0x44, + 30722 - 19968: jis0208<<14 | 0x19<<7 | 0x1C, + 30725 - 19968: jis0212<<14 | 0x2E<<7 | 0x2D, + 30726 - 19968: jis0212<<14 | 0x2E<<7 | 0x2E, + 30729 - 19968: jis0212<<14 | 0x2E<<7 | 0x2F, + 30732 - 19968: jis0208<<14 | 0x41<<7 | 0x45, + 30733 - 19968: jis0212<<14 | 0x2E<<7 | 0x30, + 30734 - 19968: jis0212<<14 | 0x2E<<7 | 0x31, + 30737 - 19968: jis0212<<14 | 0x2E<<7 | 0x32, + 30738 - 19968: jis0208<<14 | 0x41<<7 | 0x46, + 30740 - 19968: jis0208<<14 | 0x17<<7 | 0x05, + 30741 - 19968: jis0208<<14 | 0x19<<7 | 0x34, + 30749 - 19968: jis0212<<14 | 0x2E<<7 | 0x33, + 30752 - 19968: jis0208<<14 | 0x41<<7 | 0x48, + 30753 - 19968: jis0208<<14 | 0x5A<<7 | 0x1C, + 30754 - 19968: jis0212<<14 | 0x2E<<7 | 0x35, + 30755 - 19968: jis0212<<14 | 0x2E<<7 | 0x36, + 30757 - 19968: jis0208<<14 | 0x24<<7 | 0x35, + 30758 - 19968: jis0208<<14 | 0x19<<7 | 0x35, + 30759 - 19968: jis0208<<14 | 0x14<<7 | 0x2D, + 30765 - 19968: jis0212<<14 | 0x2E<<7 | 0x37, + 30766 - 19968: jis0212<<14 | 0x2E<<7 | 0x38, + 30768 - 19968: jis0212<<14 | 0x2E<<7 | 0x39, + 30770 - 19968: jis0208<<14 | 0x2A<<7 | 0x03, + 30772 - 19968: jis0208<<14 | 0x26<<7 | 0x2A, + 30773 - 19968: jis0212<<14 | 0x2E<<7 | 0x3A, + 30775 - 19968: jis0212<<14 | 0x2E<<7 | 0x3B, + 30778 - 19968: jis0208<<14 | 0x24<<7 | 0x36, + 30783 - 19968: jis0208<<14 | 0x18<<7 | 0x3B, + 30787 - 19968: jis0212<<14 | 0x2E<<7 | 0x3C, + 30788 - 19968: jis0212<<14 | 0x2E<<7 | 0x3D, + 30789 - 19968: jis0208<<14 | 0x41<<7 | 0x4A, + 30791 - 19968: jis0212<<14 | 0x2E<<7 | 0x3E, + 30792 - 19968: jis0212<<14 | 0x2E<<7 | 0x3F, + 30796 - 19968: jis0212<<14 | 0x2E<<7 | 0x40, + 30798 - 19968: jis0208<<14 | 0x5A<<7 | 0x1D, + 30802 - 19968: jis0212<<14 | 0x2E<<7 | 0x42, + 30812 - 19968: jis0212<<14 | 0x2E<<7 | 0x43, + 30813 - 19968: jis0208<<14 | 0x1D<<7 | 0x2A, + 30814 - 19968: jis0212<<14 | 0x2E<<7 | 0x44, + 30816 - 19968: jis0212<<14 | 0x2E<<7 | 0x45, + 30817 - 19968: jis0212<<14 | 0x2E<<7 | 0x46, + 30819 - 19968: jis0212<<14 | 0x2E<<7 | 0x47, + 30820 - 19968: jis0208<<14 | 0x5A<<7 | 0x1E, + 30824 - 19968: jis0212<<14 | 0x2E<<7 | 0x49, + 30826 - 19968: jis0212<<14 | 0x2E<<7 | 0x4A, + 30827 - 19968: jis0208<<14 | 0x2D<<7 | 0x11, + 30828 - 19968: jis0208<<14 | 0x18<<7 | 0x24, + 30830 - 19968: jis0212<<14 | 0x2E<<7 | 0x4B, + 30831 - 19968: jis0208<<14 | 0x17<<7 | 0x06, + 30834 - 19968: jis0208<<14 | 0x27<<7 | 0x02, + 30836 - 19968: jis0208<<14 | 0x41<<7 | 0x4C, + 30842 - 19968: jis0208<<14 | 0x5A<<7 | 0x1F, + 30844 - 19968: jis0208<<14 | 0x41<<7 | 0x4E, + 30846 - 19968: jis0212<<14 | 0x2E<<7 | 0x4D, + 30849 - 19968: jis0208<<14 | 0x17<<7 | 0x4A, + 30854 - 19968: jis0208<<14 | 0x41<<7 | 0x4D, + 30855 - 19968: jis0208<<14 | 0x23<<7 | 0x55, + 30858 - 19968: jis0212<<14 | 0x2E<<7 | 0x4E, + 30860 - 19968: jis0208<<14 | 0x41<<7 | 0x50, + 30861 - 19968: jis0208<<14 | 0x12<<7 | 0x16, + 30862 - 19968: jis0208<<14 | 0x41<<7 | 0x4B, + 30863 - 19968: jis0212<<14 | 0x2E<<7 | 0x4F, + 30865 - 19968: jis0208<<14 | 0x27<<7 | 0x49, + 30867 - 19968: jis0208<<14 | 0x10<<7 | 0x0F, + 30868 - 19968: jis0212<<14 | 0x2E<<7 | 0x50, + 30869 - 19968: jis0208<<14 | 0x19<<7 | 0x4B, + 30871 - 19968: jis0208<<14 | 0x2E<<7 | 0x31, + 30872 - 19968: jis0212<<14 | 0x2E<<7 | 0x51, + 30874 - 19968: jis0208<<14 | 0x41<<7 | 0x4F, + 30877 - 19968: jis0212<<14 | 0x2E<<7 | 0x53, + 30878 - 19968: jis0212<<14 | 0x2E<<7 | 0x54, + 30879 - 19968: jis0212<<14 | 0x2E<<7 | 0x55, + 30881 - 19968: jis0212<<14 | 0x2E<<7 | 0x52, + 30883 - 19968: jis0208<<14 | 0x41<<7 | 0x51, + 30884 - 19968: jis0212<<14 | 0x2E<<7 | 0x56, + 30887 - 19968: jis0208<<14 | 0x29<<7 | 0x2A, + 30888 - 19968: jis0212<<14 | 0x2E<<7 | 0x57, + 30889 - 19968: jis0208<<14 | 0x1F<<7 | 0x38, + 30890 - 19968: jis0208<<14 | 0x41<<7 | 0x53, + 30892 - 19968: jis0212<<14 | 0x2E<<7 | 0x58, + 30893 - 19968: jis0212<<14 | 0x2E<<7 | 0x59, + 30895 - 19968: jis0208<<14 | 0x41<<7 | 0x54, + 30896 - 19968: jis0212<<14 | 0x2E<<7 | 0x5A, + 30897 - 19968: jis0212<<14 | 0x2E<<7 | 0x5B, + 30898 - 19968: jis0212<<14 | 0x2E<<7 | 0x5C, + 30899 - 19968: jis0212<<14 | 0x2E<<7 | 0x5D, + 30901 - 19968: jis0208<<14 | 0x41<<7 | 0x52, + 30906 - 19968: jis0208<<14 | 0x12<<7 | 0x2D, + 30907 - 19968: jis0212<<14 | 0x2F<<7 | 0x00, + 30908 - 19968: jis0208<<14 | 0x41<<7 | 0x5A, + 30909 - 19968: jis0212<<14 | 0x2F<<7 | 0x01, + 30910 - 19968: jis0208<<14 | 0x41<<7 | 0x59, + 30911 - 19968: jis0212<<14 | 0x2F<<7 | 0x02, + 30913 - 19968: jis0208<<14 | 0x1B<<7 | 0x06, + 30917 - 19968: jis0208<<14 | 0x41<<7 | 0x5B, + 30918 - 19968: jis0208<<14 | 0x41<<7 | 0x56, + 30919 - 19968: jis0212<<14 | 0x2F<<7 | 0x03, + 30920 - 19968: jis0212<<14 | 0x2F<<7 | 0x04, + 30921 - 19968: jis0212<<14 | 0x2F<<7 | 0x05, + 30922 - 19968: jis0208<<14 | 0x41<<7 | 0x5C, + 30923 - 19968: jis0208<<14 | 0x41<<7 | 0x57, + 30924 - 19968: jis0212<<14 | 0x2F<<7 | 0x06, + 30926 - 19968: jis0212<<14 | 0x2F<<7 | 0x07, + 30928 - 19968: jis0208<<14 | 0x27<<7 | 0x37, + 30929 - 19968: jis0208<<14 | 0x41<<7 | 0x55, + 30930 - 19968: jis0212<<14 | 0x2F<<7 | 0x08, + 30931 - 19968: jis0212<<14 | 0x2F<<7 | 0x09, + 30932 - 19968: jis0208<<14 | 0x41<<7 | 0x58, + 30933 - 19968: jis0212<<14 | 0x2F<<7 | 0x0A, + 30934 - 19968: jis0212<<14 | 0x2F<<7 | 0x0B, + 30938 - 19968: jis0208<<14 | 0x42<<7 | 0x01, + 30939 - 19968: jis0212<<14 | 0x2F<<7 | 0x0D, + 30943 - 19968: jis0212<<14 | 0x2F<<7 | 0x0E, + 30944 - 19968: jis0212<<14 | 0x2F<<7 | 0x0F, + 30945 - 19968: jis0212<<14 | 0x2F<<7 | 0x10, + 30948 - 19968: jis0212<<14 | 0x2F<<7 | 0x0C, + 30950 - 19968: jis0212<<14 | 0x2F<<7 | 0x11, + 30951 - 19968: jis0208<<14 | 0x42<<7 | 0x00, + 30952 - 19968: jis0208<<14 | 0x2A<<7 | 0x40, + 30954 - 19968: jis0212<<14 | 0x2F<<7 | 0x12, + 30956 - 19968: jis0208<<14 | 0x41<<7 | 0x5D, + 30959 - 19968: jis0208<<14 | 0x0F<<7 | 0x4A, + 30962 - 19968: jis0212<<14 | 0x2F<<7 | 0x13, + 30963 - 19968: jis0212<<14 | 0x2F<<7 | 0x14, + 30964 - 19968: jis0208<<14 | 0x42<<7 | 0x03, + 30966 - 19968: jis0212<<14 | 0x2F<<7 | 0x16, + 30967 - 19968: jis0212<<14 | 0x2F<<7 | 0x17, + 30970 - 19968: jis0212<<14 | 0x2F<<7 | 0x18, + 30971 - 19968: jis0212<<14 | 0x2F<<7 | 0x19, + 30973 - 19968: jis0208<<14 | 0x42<<7 | 0x02, + 30975 - 19968: jis0212<<14 | 0x2F<<7 | 0x1A, + 30976 - 19968: jis0212<<14 | 0x2F<<7 | 0x15, + 30977 - 19968: jis0208<<14 | 0x1D<<7 | 0x2B, + 30982 - 19968: jis0212<<14 | 0x2F<<7 | 0x1B, + 30983 - 19968: jis0208<<14 | 0x42<<7 | 0x04, + 30988 - 19968: jis0212<<14 | 0x2F<<7 | 0x1C, + 30990 - 19968: jis0208<<14 | 0x20<<7 | 0x22, + 30992 - 19968: jis0212<<14 | 0x2F<<7 | 0x1D, + 30993 - 19968: jis0208<<14 | 0x42<<7 | 0x06, + 30994 - 19968: jis0208<<14 | 0x42<<7 | 0x05, + 31001 - 19968: jis0208<<14 | 0x42<<7 | 0x07, + 31002 - 19968: jis0212<<14 | 0x2F<<7 | 0x1E, + 31004 - 19968: jis0212<<14 | 0x2F<<7 | 0x1F, + 31006 - 19968: jis0212<<14 | 0x2F<<7 | 0x20, + 31007 - 19968: jis0212<<14 | 0x2F<<7 | 0x21, + 31008 - 19968: jis0212<<14 | 0x2F<<7 | 0x22, + 31013 - 19968: jis0212<<14 | 0x2F<<7 | 0x23, + 31014 - 19968: jis0208<<14 | 0x41<<7 | 0x47, + 31015 - 19968: jis0212<<14 | 0x2F<<7 | 0x24, + 31017 - 19968: jis0212<<14 | 0x2F<<7 | 0x25, + 31018 - 19968: jis0208<<14 | 0x41<<7 | 0x49, + 31019 - 19968: jis0208<<14 | 0x42<<7 | 0x09, + 31020 - 19968: jis0208<<14 | 0x42<<7 | 0x08, + 31021 - 19968: jis0212<<14 | 0x2F<<7 | 0x26, + 31024 - 19968: jis0208<<14 | 0x5A<<7 | 0x20, + 31025 - 19968: jis0212<<14 | 0x2F<<7 | 0x27, + 31028 - 19968: jis0212<<14 | 0x2F<<7 | 0x28, + 31029 - 19968: jis0212<<14 | 0x2F<<7 | 0x29, + 31034 - 19968: jis0208<<14 | 0x1B<<7 | 0x07, + 31035 - 19968: jis0212<<14 | 0x2F<<7 | 0x2A, + 31036 - 19968: jis0208<<14 | 0x2D<<7 | 0x48, + 31037 - 19968: jis0212<<14 | 0x2F<<7 | 0x2B, + 31038 - 19968: jis0208<<14 | 0x1B<<7 | 0x31, + 31039 - 19968: jis0212<<14 | 0x2F<<7 | 0x2C, + 31040 - 19968: jis0208<<14 | 0x42<<7 | 0x0A, + 31041 - 19968: jis0208<<14 | 0x16<<7 | 0x16, + 31044 - 19968: jis0212<<14 | 0x2F<<7 | 0x2D, + 31045 - 19968: jis0212<<14 | 0x2F<<7 | 0x2E, + 31046 - 19968: jis0212<<14 | 0x2F<<7 | 0x2F, + 31047 - 19968: jis0208<<14 | 0x14<<7 | 0x1F, + 31048 - 19968: jis0208<<14 | 0x14<<7 | 0x06, + 31049 - 19968: jis0208<<14 | 0x1A<<7 | 0x42, + 31050 - 19968: jis0212<<14 | 0x2F<<7 | 0x30, + 31051 - 19968: jis0212<<14 | 0x2F<<7 | 0x31, + 31055 - 19968: jis0212<<14 | 0x2F<<7 | 0x32, + 31056 - 19968: jis0208<<14 | 0x2C<<7 | 0x13, + 31057 - 19968: jis0212<<14 | 0x2F<<7 | 0x33, + 31059 - 19968: jis0208<<14 | 0x42<<7 | 0x10, + 31060 - 19968: jis0212<<14 | 0x2F<<7 | 0x34, + 31061 - 19968: jis0208<<14 | 0x42<<7 | 0x0F, + 31062 - 19968: jis0208<<14 | 0x20<<7 | 0x23, + 31063 - 19968: jis0208<<14 | 0x42<<7 | 0x0C, + 31064 - 19968: jis0212<<14 | 0x2F<<7 | 0x35, + 31066 - 19968: jis0208<<14 | 0x42<<7 | 0x0E, + 31067 - 19968: jis0212<<14 | 0x2F<<7 | 0x36, + 31068 - 19968: jis0212<<14 | 0x2F<<7 | 0x37, + 31069 - 19968: jis0208<<14 | 0x1C<<7 | 0x2A, + 31070 - 19968: jis0208<<14 | 0x1E<<7 | 0x1F, + 31071 - 19968: jis0208<<14 | 0x42<<7 | 0x0D, + 31072 - 19968: jis0208<<14 | 0x42<<7 | 0x0B, + 31074 - 19968: jis0208<<14 | 0x26<<7 | 0x09, + 31077 - 19968: jis0208<<14 | 0x1D<<7 | 0x2C, + 31079 - 19968: jis0212<<14 | 0x2F<<7 | 0x38, + 31080 - 19968: jis0208<<14 | 0x28<<7 | 0x1B, + 31081 - 19968: jis0212<<14 | 0x2F<<7 | 0x39, + 31083 - 19968: jis0212<<14 | 0x2F<<7 | 0x3A, + 31085 - 19968: jis0208<<14 | 0x19<<7 | 0x36, + 31090 - 19968: jis0212<<14 | 0x2F<<7 | 0x3B, + 31095 - 19968: jis0208<<14 | 0x24<<7 | 0x57, + 31097 - 19968: jis0212<<14 | 0x2F<<7 | 0x3C, + 31098 - 19968: jis0208<<14 | 0x42<<7 | 0x11, + 31099 - 19968: jis0212<<14 | 0x2F<<7 | 0x3D, + 31100 - 19968: jis0212<<14 | 0x2F<<7 | 0x3E, + 31102 - 19968: jis0212<<14 | 0x2F<<7 | 0x3F, + 31103 - 19968: jis0208<<14 | 0x42<<7 | 0x12, + 31104 - 19968: jis0208<<14 | 0x42<<7 | 0x28, + 31105 - 19968: jis0208<<14 | 0x15<<7 | 0x37, + 31108 - 19968: jis0208<<14 | 0x2E<<7 | 0x1C, + 31109 - 19968: jis0208<<14 | 0x20<<7 | 0x14, + 31114 - 19968: jis0208<<14 | 0x42<<7 | 0x13, + 31115 - 19968: jis0212<<14 | 0x2F<<7 | 0x40, + 31116 - 19968: jis0212<<14 | 0x2F<<7 | 0x41, + 31117 - 19968: jis0208<<14 | 0x11<<7 | 0x31, + 31118 - 19968: jis0208<<14 | 0x23<<7 | 0x56, + 31119 - 19968: jis0208<<14 | 0x29<<7 | 0x00, + 31121 - 19968: jis0212<<14 | 0x2F<<7 | 0x42, + 31123 - 19968: jis0212<<14 | 0x2F<<7 | 0x43, + 31124 - 19968: jis0208<<14 | 0x5A<<7 | 0x24, + 31125 - 19968: jis0212<<14 | 0x2F<<7 | 0x45, + 31126 - 19968: jis0212<<14 | 0x2F<<7 | 0x46, + 31128 - 19968: jis0212<<14 | 0x2F<<7 | 0x47, + 31131 - 19968: jis0208<<14 | 0x5A<<7 | 0x26, + 31132 - 19968: jis0212<<14 | 0x2F<<7 | 0x49, + 31133 - 19968: jis0208<<14 | 0x42<<7 | 0x14, + 31137 - 19968: jis0212<<14 | 0x2F<<7 | 0x4A, + 31142 - 19968: jis0208<<14 | 0x14<<7 | 0x59, + 31143 - 19968: jis0208<<14 | 0x42<<7 | 0x15, + 31144 - 19968: jis0212<<14 | 0x2F<<7 | 0x4B, + 31145 - 19968: jis0212<<14 | 0x2F<<7 | 0x4C, + 31146 - 19968: jis0208<<14 | 0x42<<7 | 0x17, + 31147 - 19968: jis0212<<14 | 0x2F<<7 | 0x4D, + 31150 - 19968: jis0208<<14 | 0x42<<7 | 0x18, + 31151 - 19968: jis0212<<14 | 0x2F<<7 | 0x4E, + 31152 - 19968: jis0208<<14 | 0x26<<7 | 0x08, + 31153 - 19968: jis0212<<14 | 0x2F<<7 | 0x4F, + 31155 - 19968: jis0208<<14 | 0x42<<7 | 0x19, + 31156 - 19968: jis0212<<14 | 0x2F<<7 | 0x50, + 31160 - 19968: jis0212<<14 | 0x2F<<7 | 0x51, + 31161 - 19968: jis0208<<14 | 0x42<<7 | 0x1A, + 31162 - 19968: jis0208<<14 | 0x42<<7 | 0x1B, + 31163 - 19968: jis0212<<14 | 0x2F<<7 | 0x52, + 31165 - 19968: jis0208<<14 | 0x15<<7 | 0x38, + 31166 - 19968: jis0208<<14 | 0x11<<7 | 0x32, + 31167 - 19968: jis0208<<14 | 0x25<<7 | 0x24, + 31168 - 19968: jis0208<<14 | 0x1C<<7 | 0x07, + 31169 - 19968: jis0208<<14 | 0x1A<<7 | 0x43, + 31170 - 19968: jis0212<<14 | 0x2F<<7 | 0x53, + 31172 - 19968: jis0212<<14 | 0x2F<<7 | 0x54, + 31175 - 19968: jis0212<<14 | 0x2F<<7 | 0x55, + 31176 - 19968: jis0212<<14 | 0x2F<<7 | 0x56, + 31177 - 19968: jis0208<<14 | 0x42<<7 | 0x1C, + 31178 - 19968: jis0212<<14 | 0x2F<<7 | 0x57, + 31179 - 19968: jis0208<<14 | 0x1C<<7 | 0x08, + 31183 - 19968: jis0212<<14 | 0x2F<<7 | 0x58, + 31185 - 19968: jis0208<<14 | 0x11<<7 | 0x29, + 31186 - 19968: jis0208<<14 | 0x28<<7 | 0x22, + 31188 - 19968: jis0212<<14 | 0x2F<<7 | 0x59, + 31189 - 19968: jis0208<<14 | 0x42<<7 | 0x1D, + 31190 - 19968: jis0212<<14 | 0x2F<<7 | 0x5A, + 31192 - 19968: jis0208<<14 | 0x27<<7 | 0x4A, + 31194 - 19968: jis0212<<14 | 0x2F<<7 | 0x5B, + 31197 - 19968: jis0212<<14 | 0x2F<<7 | 0x5C, + 31198 - 19968: jis0212<<14 | 0x2F<<7 | 0x5D, + 31199 - 19968: jis0208<<14 | 0x20<<7 | 0x24, + 31200 - 19968: jis0212<<14 | 0x30<<7 | 0x00, + 31201 - 19968: jis0208<<14 | 0x42<<7 | 0x20, + 31202 - 19968: jis0212<<14 | 0x30<<7 | 0x01, + 31203 - 19968: jis0208<<14 | 0x42<<7 | 0x21, + 31204 - 19968: jis0208<<14 | 0x26<<7 | 0x48, + 31205 - 19968: jis0212<<14 | 0x30<<7 | 0x02, + 31206 - 19968: jis0208<<14 | 0x1E<<7 | 0x20, + 31207 - 19968: jis0208<<14 | 0x42<<7 | 0x1E, + 31209 - 19968: jis0208<<14 | 0x22<<7 | 0x40, + 31210 - 19968: jis0212<<14 | 0x30<<7 | 0x03, + 31211 - 19968: jis0212<<14 | 0x30<<7 | 0x04, + 31212 - 19968: jis0208<<14 | 0x42<<7 | 0x1F, + 31213 - 19968: jis0212<<14 | 0x30<<7 | 0x05, + 31216 - 19968: jis0208<<14 | 0x1D<<7 | 0x2D, + 31217 - 19968: jis0212<<14 | 0x30<<7 | 0x06, + 31224 - 19968: jis0212<<14 | 0x30<<7 | 0x07, + 31227 - 19968: jis0208<<14 | 0x0F<<7 | 0x3B, + 31228 - 19968: jis0212<<14 | 0x30<<7 | 0x08, + 31232 - 19968: jis0208<<14 | 0x14<<7 | 0x08, + 31234 - 19968: jis0212<<14 | 0x30<<7 | 0x09, + 31235 - 19968: jis0212<<14 | 0x30<<7 | 0x0A, + 31239 - 19968: jis0212<<14 | 0x30<<7 | 0x0B, + 31240 - 19968: jis0208<<14 | 0x42<<7 | 0x22, + 31241 - 19968: jis0212<<14 | 0x30<<7 | 0x0C, + 31242 - 19968: jis0212<<14 | 0x30<<7 | 0x0D, + 31243 - 19968: jis0208<<14 | 0x23<<7 | 0x57, + 31244 - 19968: jis0212<<14 | 0x30<<7 | 0x0E, + 31245 - 19968: jis0208<<14 | 0x42<<7 | 0x23, + 31246 - 19968: jis0208<<14 | 0x1F<<7 | 0x26, + 31249 - 19968: jis0212<<14 | 0x30<<7 | 0x0F, + 31252 - 19968: jis0208<<14 | 0x2B<<7 | 0x0C, + 31253 - 19968: jis0212<<14 | 0x30<<7 | 0x10, + 31255 - 19968: jis0208<<14 | 0x28<<7 | 0x02, + 31256 - 19968: jis0208<<14 | 0x42<<7 | 0x24, + 31257 - 19968: jis0208<<14 | 0x42<<7 | 0x25, + 31258 - 19968: jis0208<<14 | 0x22<<7 | 0x34, + 31259 - 19968: jis0212<<14 | 0x30<<7 | 0x11, + 31260 - 19968: jis0208<<14 | 0x2D<<7 | 0x26, + 31262 - 19968: jis0212<<14 | 0x30<<7 | 0x12, + 31263 - 19968: jis0208<<14 | 0x42<<7 | 0x27, + 31264 - 19968: jis0208<<14 | 0x42<<7 | 0x26, + 31265 - 19968: jis0212<<14 | 0x30<<7 | 0x13, + 31271 - 19968: jis0212<<14 | 0x30<<7 | 0x14, + 31275 - 19968: jis0212<<14 | 0x30<<7 | 0x15, + 31277 - 19968: jis0212<<14 | 0x30<<7 | 0x16, + 31278 - 19968: jis0208<<14 | 0x1B<<7 | 0x4E, + 31279 - 19968: jis0212<<14 | 0x30<<7 | 0x17, + 31280 - 19968: jis0212<<14 | 0x30<<7 | 0x18, + 31281 - 19968: jis0208<<14 | 0x42<<7 | 0x29, + 31282 - 19968: jis0208<<14 | 0x0F<<7 | 0x4F, + 31284 - 19968: jis0212<<14 | 0x30<<7 | 0x19, + 31285 - 19968: jis0212<<14 | 0x30<<7 | 0x1A, + 31287 - 19968: jis0208<<14 | 0x42<<7 | 0x2C, + 31288 - 19968: jis0212<<14 | 0x30<<7 | 0x1B, + 31289 - 19968: jis0212<<14 | 0x30<<7 | 0x1C, + 31290 - 19968: jis0212<<14 | 0x30<<7 | 0x1D, + 31291 - 19968: jis0208<<14 | 0x42<<7 | 0x2A, + 31292 - 19968: jis0208<<14 | 0x11<<7 | 0x33, + 31293 - 19968: jis0208<<14 | 0x16<<7 | 0x2D, + 31294 - 19968: jis0208<<14 | 0x42<<7 | 0x2B, + 31295 - 19968: jis0208<<14 | 0x18<<7 | 0x25, + 31296 - 19968: jis0208<<14 | 0x18<<7 | 0x51, + 31298 - 19968: jis0208<<14 | 0x29<<7 | 0x45, + 31299 - 19968: jis0208<<14 | 0x42<<7 | 0x2D, + 31300 - 19968: jis0212<<14 | 0x30<<7 | 0x1E, + 31301 - 19968: jis0212<<14 | 0x30<<7 | 0x1F, + 31302 - 19968: jis0208<<14 | 0x2A<<7 | 0x33, + 31303 - 19968: jis0212<<14 | 0x30<<7 | 0x20, + 31304 - 19968: jis0212<<14 | 0x30<<7 | 0x21, + 31305 - 19968: jis0208<<14 | 0x42<<7 | 0x2F, + 31308 - 19968: jis0212<<14 | 0x30<<7 | 0x22, + 31309 - 19968: jis0208<<14 | 0x1F<<7 | 0x30, + 31310 - 19968: jis0208<<14 | 0x10<<7 | 0x2E, + 31311 - 19968: jis0208<<14 | 0x11<<7 | 0x19, + 31312 - 19968: jis0208<<14 | 0x0F<<7 | 0x0B, + 31317 - 19968: jis0212<<14 | 0x30<<7 | 0x23, + 31318 - 19968: jis0212<<14 | 0x30<<7 | 0x24, + 31319 - 19968: jis0208<<14 | 0x42<<7 | 0x2E, + 31321 - 19968: jis0212<<14 | 0x30<<7 | 0x25, + 31324 - 19968: jis0212<<14 | 0x30<<7 | 0x26, + 31325 - 19968: jis0212<<14 | 0x30<<7 | 0x27, + 31327 - 19968: jis0212<<14 | 0x30<<7 | 0x28, + 31328 - 19968: jis0212<<14 | 0x30<<7 | 0x29, + 31329 - 19968: jis0208<<14 | 0x42<<7 | 0x30, + 31330 - 19968: jis0208<<14 | 0x42<<7 | 0x31, + 31331 - 19968: jis0208<<14 | 0x1D<<7 | 0x56, + 31333 - 19968: jis0212<<14 | 0x30<<7 | 0x2A, + 31335 - 19968: jis0212<<14 | 0x30<<7 | 0x2B, + 31337 - 19968: jis0208<<14 | 0x42<<7 | 0x32, + 31338 - 19968: jis0212<<14 | 0x30<<7 | 0x2C, + 31339 - 19968: jis0208<<14 | 0x12<<7 | 0x2E, + 31341 - 19968: jis0212<<14 | 0x30<<7 | 0x2D, + 31344 - 19968: jis0208<<14 | 0x42<<7 | 0x34, + 31348 - 19968: jis0208<<14 | 0x16<<7 | 0x49, + 31349 - 19968: jis0212<<14 | 0x30<<7 | 0x2E, + 31350 - 19968: jis0208<<14 | 0x14<<7 | 0x45, + 31352 - 19968: jis0212<<14 | 0x30<<7 | 0x2F, + 31353 - 19968: jis0208<<14 | 0x42<<7 | 0x35, + 31354 - 19968: jis0208<<14 | 0x15<<7 | 0x54, + 31357 - 19968: jis0208<<14 | 0x42<<7 | 0x36, + 31358 - 19968: jis0212<<14 | 0x30<<7 | 0x30, + 31359 - 19968: jis0208<<14 | 0x1F<<7 | 0x5B, + 31360 - 19968: jis0212<<14 | 0x30<<7 | 0x31, + 31361 - 19968: jis0208<<14 | 0x25<<7 | 0x2C, + 31362 - 19968: jis0212<<14 | 0x30<<7 | 0x32, + 31363 - 19968: jis0208<<14 | 0x1F<<7 | 0x3F, + 31364 - 19968: jis0208<<14 | 0x19<<7 | 0x54, + 31365 - 19968: jis0212<<14 | 0x30<<7 | 0x33, + 31366 - 19968: jis0212<<14 | 0x30<<7 | 0x34, + 31368 - 19968: jis0208<<14 | 0x42<<7 | 0x37, + 31370 - 19968: jis0212<<14 | 0x30<<7 | 0x35, + 31371 - 19968: jis0212<<14 | 0x30<<7 | 0x36, + 31376 - 19968: jis0212<<14 | 0x30<<7 | 0x37, + 31377 - 19968: jis0212<<14 | 0x30<<7 | 0x38, + 31378 - 19968: jis0208<<14 | 0x22<<7 | 0x41, + 31379 - 19968: jis0208<<14 | 0x20<<7 | 0x4A, + 31380 - 19968: jis0212<<14 | 0x30<<7 | 0x39, + 31381 - 19968: jis0208<<14 | 0x42<<7 | 0x39, + 31382 - 19968: jis0208<<14 | 0x42<<7 | 0x3B, + 31383 - 19968: jis0208<<14 | 0x42<<7 | 0x38, + 31384 - 19968: jis0208<<14 | 0x42<<7 | 0x3A, + 31390 - 19968: jis0212<<14 | 0x30<<7 | 0x3A, + 31391 - 19968: jis0208<<14 | 0x16<<7 | 0x01, + 31392 - 19968: jis0212<<14 | 0x30<<7 | 0x3B, + 31395 - 19968: jis0212<<14 | 0x30<<7 | 0x3C, + 31401 - 19968: jis0208<<14 | 0x42<<7 | 0x3C, + 31402 - 19968: jis0208<<14 | 0x16<<7 | 0x05, + 31404 - 19968: jis0212<<14 | 0x30<<7 | 0x3D, + 31406 - 19968: jis0208<<14 | 0x14<<7 | 0x46, + 31407 - 19968: jis0208<<14 | 0x2C<<7 | 0x31, + 31408 - 19968: jis0208<<14 | 0x42<<7 | 0x3E, + 31411 - 19968: jis0212<<14 | 0x30<<7 | 0x3E, + 31413 - 19968: jis0212<<14 | 0x30<<7 | 0x3F, + 31414 - 19968: jis0208<<14 | 0x42<<7 | 0x3F, + 31417 - 19968: jis0212<<14 | 0x30<<7 | 0x40, + 31418 - 19968: jis0208<<14 | 0x10<<7 | 0x0D, + 31419 - 19968: jis0212<<14 | 0x30<<7 | 0x41, + 31420 - 19968: jis0212<<14 | 0x30<<7 | 0x42, + 31423 - 19968: jis0208<<14 | 0x42<<7 | 0x42, + 31427 - 19968: jis0208<<14 | 0x12<<7 | 0x55, + 31428 - 19968: jis0208<<14 | 0x42<<7 | 0x41, + 31429 - 19968: jis0208<<14 | 0x42<<7 | 0x40, + 31430 - 19968: jis0212<<14 | 0x30<<7 | 0x43, + 31431 - 19968: jis0208<<14 | 0x42<<7 | 0x44, + 31432 - 19968: jis0208<<14 | 0x42<<7 | 0x3D, + 31433 - 19968: jis0212<<14 | 0x30<<7 | 0x44, + 31434 - 19968: jis0208<<14 | 0x42<<7 | 0x45, + 31435 - 19968: jis0208<<14 | 0x2D<<7 | 0x08, + 31436 - 19968: jis0212<<14 | 0x30<<7 | 0x45, + 31437 - 19968: jis0208<<14 | 0x42<<7 | 0x46, + 31438 - 19968: jis0212<<14 | 0x30<<7 | 0x46, + 31439 - 19968: jis0208<<14 | 0x42<<7 | 0x47, + 31441 - 19968: jis0208<<14 | 0x5A<<7 | 0x27, + 31442 - 19968: jis0208<<14 | 0x33<<7 | 0x53, + 31443 - 19968: jis0208<<14 | 0x42<<7 | 0x49, + 31445 - 19968: jis0208<<14 | 0x42<<7 | 0x48, + 31449 - 19968: jis0208<<14 | 0x42<<7 | 0x4A, + 31450 - 19968: jis0208<<14 | 0x42<<7 | 0x4B, + 31451 - 19968: jis0212<<14 | 0x30<<7 | 0x48, + 31452 - 19968: jis0208<<14 | 0x2D<<7 | 0x14, + 31453 - 19968: jis0208<<14 | 0x42<<7 | 0x4C, + 31455 - 19968: jis0208<<14 | 0x4F<<7 | 0x4E, + 31456 - 19968: jis0208<<14 | 0x1D<<7 | 0x2E, + 31457 - 19968: jis0208<<14 | 0x42<<7 | 0x4D, + 31458 - 19968: jis0208<<14 | 0x42<<7 | 0x4E, + 31459 - 19968: jis0208<<14 | 0x1C<<7 | 0x36, + 31461 - 19968: jis0208<<14 | 0x25<<7 | 0x17, + 31462 - 19968: jis0208<<14 | 0x42<<7 | 0x4F, + 31463 - 19968: jis0208<<14 | 0x5A<<7 | 0x28, + 31464 - 19968: jis0212<<14 | 0x30<<7 | 0x49, + 31465 - 19968: jis0212<<14 | 0x30<<7 | 0x4A, + 31466 - 19968: jis0208<<14 | 0x22<<7 | 0x07, + 31467 - 19968: jis0208<<14 | 0x5A<<7 | 0x2A, + 31468 - 19968: jis0212<<14 | 0x30<<7 | 0x4C, + 31469 - 19968: jis0208<<14 | 0x42<<7 | 0x50, + 31471 - 19968: jis0208<<14 | 0x22<<7 | 0x1B, + 31472 - 19968: jis0208<<14 | 0x42<<7 | 0x51, + 31473 - 19968: jis0212<<14 | 0x30<<7 | 0x4D, + 31476 - 19968: jis0212<<14 | 0x30<<7 | 0x4E, + 31478 - 19968: jis0208<<14 | 0x15<<7 | 0x04, + 31480 - 19968: jis0208<<14 | 0x30<<7 | 0x1E, + 31481 - 19968: jis0208<<14 | 0x22<<7 | 0x3C, + 31482 - 19968: jis0208<<14 | 0x1B<<7 | 0x12, + 31483 - 19968: jis0212<<14 | 0x30<<7 | 0x4F, + 31485 - 19968: jis0212<<14 | 0x30<<7 | 0x50, + 31486 - 19968: jis0212<<14 | 0x30<<7 | 0x51, + 31487 - 19968: jis0208<<14 | 0x13<<7 | 0x27, + 31490 - 19968: jis0208<<14 | 0x42<<7 | 0x52, + 31492 - 19968: jis0208<<14 | 0x43<<7 | 0x01, + 31494 - 19968: jis0208<<14 | 0x42<<7 | 0x55, + 31495 - 19968: jis0212<<14 | 0x30<<7 | 0x52, + 31496 - 19968: jis0208<<14 | 0x14<<7 | 0x47, + 31498 - 19968: jis0208<<14 | 0x42<<7 | 0x54, + 31499 - 19968: jis0208<<14 | 0x43<<7 | 0x03, + 31503 - 19968: jis0208<<14 | 0x42<<7 | 0x53, + 31505 - 19968: jis0208<<14 | 0x1D<<7 | 0x2F, + 31508 - 19968: jis0212<<14 | 0x30<<7 | 0x53, + 31512 - 19968: jis0208<<14 | 0x42<<7 | 0x57, + 31513 - 19968: jis0208<<14 | 0x42<<7 | 0x58, + 31515 - 19968: jis0208<<14 | 0x24<<7 | 0x0A, + 31518 - 19968: jis0208<<14 | 0x42<<7 | 0x59, + 31519 - 19968: jis0212<<14 | 0x30<<7 | 0x54, + 31520 - 19968: jis0208<<14 | 0x12<<7 | 0x3D, + 31523 - 19968: jis0212<<14 | 0x30<<7 | 0x55, + 31525 - 19968: jis0208<<14 | 0x1E<<7 | 0x39, + 31526 - 19968: jis0208<<14 | 0x28<<7 | 0x43, + 31527 - 19968: jis0212<<14 | 0x30<<7 | 0x56, + 31528 - 19968: jis0208<<14 | 0x42<<7 | 0x5B, + 31529 - 19968: jis0212<<14 | 0x30<<7 | 0x57, + 31530 - 19968: jis0212<<14 | 0x30<<7 | 0x58, + 31531 - 19968: jis0212<<14 | 0x30<<7 | 0x59, + 31532 - 19968: jis0208<<14 | 0x21<<7 | 0x47, + 31533 - 19968: jis0212<<14 | 0x30<<7 | 0x5A, + 31534 - 19968: jis0212<<14 | 0x30<<7 | 0x5B, + 31535 - 19968: jis0212<<14 | 0x30<<7 | 0x5C, + 31536 - 19968: jis0212<<14 | 0x30<<7 | 0x5D, + 31537 - 19968: jis0212<<14 | 0x31<<7 | 0x00, + 31539 - 19968: jis0208<<14 | 0x42<<7 | 0x56, + 31540 - 19968: jis0212<<14 | 0x31<<7 | 0x01, + 31541 - 19968: jis0208<<14 | 0x42<<7 | 0x5A, + 31542 - 19968: jis0208<<14 | 0x42<<7 | 0x5C, + 31545 - 19968: jis0208<<14 | 0x19<<7 | 0x5A, + 31549 - 19968: jis0212<<14 | 0x31<<7 | 0x02, + 31551 - 19968: jis0212<<14 | 0x31<<7 | 0x03, + 31552 - 19968: jis0212<<14 | 0x31<<7 | 0x04, + 31553 - 19968: jis0212<<14 | 0x31<<7 | 0x05, + 31557 - 19968: jis0208<<14 | 0x43<<7 | 0x05, + 31558 - 19968: jis0208<<14 | 0x28<<7 | 0x0D, + 31559 - 19968: jis0212<<14 | 0x31<<7 | 0x06, + 31560 - 19968: jis0208<<14 | 0x27<<7 | 0x05, + 31561 - 19968: jis0208<<14 | 0x24<<7 | 0x58, + 31563 - 19968: jis0208<<14 | 0x15<<7 | 0x39, + 31564 - 19968: jis0208<<14 | 0x43<<7 | 0x04, + 31565 - 19968: jis0208<<14 | 0x43<<7 | 0x02, + 31566 - 19968: jis0212<<14 | 0x31<<7 | 0x07, + 31567 - 19968: jis0208<<14 | 0x27<<7 | 0x14, + 31568 - 19968: jis0208<<14 | 0x42<<7 | 0x5D, + 31569 - 19968: jis0208<<14 | 0x22<<7 | 0x3D, + 31570 - 19968: jis0208<<14 | 0x24<<7 | 0x5A, + 31572 - 19968: jis0208<<14 | 0x24<<7 | 0x59, + 31573 - 19968: jis0212<<14 | 0x31<<7 | 0x08, + 31574 - 19968: jis0208<<14 | 0x19<<7 | 0x55, + 31581 - 19968: jis0208<<14 | 0x43<<7 | 0x17, + 31584 - 19968: jis0212<<14 | 0x31<<7 | 0x09, + 31588 - 19968: jis0212<<14 | 0x31<<7 | 0x0A, + 31589 - 19968: jis0208<<14 | 0x43<<7 | 0x07, + 31590 - 19968: jis0212<<14 | 0x31<<7 | 0x0B, + 31591 - 19968: jis0208<<14 | 0x43<<7 | 0x09, + 31593 - 19968: jis0212<<14 | 0x31<<7 | 0x0C, + 31594 - 19968: jis0212<<14 | 0x31<<7 | 0x0D, + 31596 - 19968: jis0208<<14 | 0x43<<7 | 0x0C, + 31597 - 19968: jis0212<<14 | 0x31<<7 | 0x0E, + 31598 - 19968: jis0208<<14 | 0x43<<7 | 0x0D, + 31599 - 19968: jis0212<<14 | 0x31<<7 | 0x0F, + 31600 - 19968: jis0208<<14 | 0x43<<7 | 0x0A, + 31601 - 19968: jis0208<<14 | 0x43<<7 | 0x0B, + 31602 - 19968: jis0212<<14 | 0x31<<7 | 0x10, + 31603 - 19968: jis0212<<14 | 0x31<<7 | 0x11, + 31604 - 19968: jis0208<<14 | 0x43<<7 | 0x08, + 31605 - 19968: jis0208<<14 | 0x43<<7 | 0x06, + 31607 - 19968: jis0212<<14 | 0x31<<7 | 0x12, + 31610 - 19968: jis0208<<14 | 0x43<<7 | 0x00, + 31620 - 19968: jis0212<<14 | 0x31<<7 | 0x13, + 31622 - 19968: jis0208<<14 | 0x29<<7 | 0x2E, + 31623 - 19968: jis0208<<14 | 0x11<<7 | 0x34, + 31625 - 19968: jis0212<<14 | 0x31<<7 | 0x14, + 31627 - 19968: jis0208<<14 | 0x43<<7 | 0x14, + 31629 - 19968: jis0208<<14 | 0x43<<7 | 0x11, + 31630 - 19968: jis0212<<14 | 0x31<<7 | 0x15, + 31631 - 19968: jis0208<<14 | 0x43<<7 | 0x16, + 31632 - 19968: jis0212<<14 | 0x31<<7 | 0x16, + 31633 - 19968: jis0212<<14 | 0x31<<7 | 0x17, + 31634 - 19968: jis0208<<14 | 0x43<<7 | 0x15, + 31636 - 19968: jis0208<<14 | 0x26<<7 | 0x52, + 31637 - 19968: jis0208<<14 | 0x2B<<7 | 0x06, + 31638 - 19968: jis0212<<14 | 0x31<<7 | 0x18, + 31639 - 19968: jis0208<<14 | 0x1A<<7 | 0x1A, + 31640 - 19968: jis0208<<14 | 0x43<<7 | 0x0F, + 31641 - 19968: jis0208<<14 | 0x43<<7 | 0x18, + 31642 - 19968: jis0208<<14 | 0x43<<7 | 0x13, + 31643 - 19968: jis0212<<14 | 0x31<<7 | 0x19, + 31644 - 19968: jis0208<<14 | 0x43<<7 | 0x12, + 31645 - 19968: jis0208<<14 | 0x43<<7 | 0x0E, + 31646 - 19968: jis0208<<14 | 0x5A<<7 | 0x2B, + 31647 - 19968: jis0208<<14 | 0x43<<7 | 0x10, + 31648 - 19968: jis0212<<14 | 0x31<<7 | 0x1B, + 31649 - 19968: jis0208<<14 | 0x13<<7 | 0x28, + 31653 - 19968: jis0212<<14 | 0x31<<7 | 0x1C, + 31658 - 19968: jis0208<<14 | 0x22<<7 | 0x1C, + 31660 - 19968: jis0212<<14 | 0x31<<7 | 0x1D, + 31661 - 19968: jis0208<<14 | 0x1F<<7 | 0x5C, + 31663 - 19968: jis0212<<14 | 0x31<<7 | 0x1E, + 31664 - 19968: jis0212<<14 | 0x31<<7 | 0x1F, + 31665 - 19968: jis0208<<14 | 0x27<<7 | 0x01, + 31666 - 19968: jis0212<<14 | 0x31<<7 | 0x20, + 31668 - 19968: jis0208<<14 | 0x43<<7 | 0x1D, + 31669 - 19968: jis0212<<14 | 0x31<<7 | 0x21, + 31670 - 19968: jis0212<<14 | 0x31<<7 | 0x22, + 31672 - 19968: jis0208<<14 | 0x27<<7 | 0x03, + 31674 - 19968: jis0212<<14 | 0x31<<7 | 0x23, + 31675 - 19968: jis0212<<14 | 0x31<<7 | 0x24, + 31676 - 19968: jis0212<<14 | 0x31<<7 | 0x25, + 31677 - 19968: jis0212<<14 | 0x31<<7 | 0x26, + 31680 - 19968: jis0208<<14 | 0x1F<<7 | 0x40, + 31681 - 19968: jis0208<<14 | 0x43<<7 | 0x1A, + 31682 - 19968: jis0212<<14 | 0x31<<7 | 0x27, + 31684 - 19968: jis0208<<14 | 0x27<<7 | 0x2E, + 31685 - 19968: jis0212<<14 | 0x31<<7 | 0x28, + 31686 - 19968: jis0208<<14 | 0x43<<7 | 0x1E, + 31687 - 19968: jis0208<<14 | 0x29<<7 | 0x32, + 31688 - 19968: jis0212<<14 | 0x31<<7 | 0x29, + 31689 - 19968: jis0208<<14 | 0x22<<7 | 0x3A, + 31690 - 19968: jis0212<<14 | 0x31<<7 | 0x2A, + 31691 - 19968: jis0208<<14 | 0x43<<7 | 0x19, + 31692 - 19968: jis0208<<14 | 0x43<<7 | 0x1B, + 31695 - 19968: jis0208<<14 | 0x43<<7 | 0x1C, + 31700 - 19968: jis0212<<14 | 0x31<<7 | 0x2B, + 31702 - 19968: jis0212<<14 | 0x31<<7 | 0x2C, + 31703 - 19968: jis0212<<14 | 0x31<<7 | 0x2D, + 31705 - 19968: jis0212<<14 | 0x31<<7 | 0x2E, + 31706 - 19968: jis0212<<14 | 0x31<<7 | 0x2F, + 31707 - 19968: jis0212<<14 | 0x31<<7 | 0x30, + 31709 - 19968: jis0208<<14 | 0x43<<7 | 0x1F, + 31712 - 19968: jis0208<<14 | 0x1B<<7 | 0x23, + 31716 - 19968: jis0208<<14 | 0x25<<7 | 0x25, + 31717 - 19968: jis0208<<14 | 0x43<<7 | 0x24, + 31718 - 19968: jis0208<<14 | 0x43<<7 | 0x23, + 31720 - 19968: jis0212<<14 | 0x31<<7 | 0x31, + 31721 - 19968: jis0208<<14 | 0x43<<7 | 0x20, + 31722 - 19968: jis0212<<14 | 0x31<<7 | 0x32, + 31725 - 19968: jis0208<<14 | 0x2E<<7 | 0x15, + 31730 - 19968: jis0212<<14 | 0x31<<7 | 0x33, + 31731 - 19968: jis0208<<14 | 0x43<<7 | 0x29, + 31732 - 19968: jis0212<<14 | 0x31<<7 | 0x34, + 31733 - 19968: jis0212<<14 | 0x31<<7 | 0x35, + 31734 - 19968: jis0208<<14 | 0x43<<7 | 0x2D, + 31735 - 19968: jis0208<<14 | 0x43<<7 | 0x2A, + 31736 - 19968: jis0212<<14 | 0x31<<7 | 0x36, + 31737 - 19968: jis0212<<14 | 0x31<<7 | 0x37, + 31738 - 19968: jis0212<<14 | 0x31<<7 | 0x38, + 31740 - 19968: jis0212<<14 | 0x31<<7 | 0x39, + 31742 - 19968: jis0212<<14 | 0x31<<7 | 0x3A, + 31744 - 19968: jis0208<<14 | 0x43<<7 | 0x26, + 31745 - 19968: jis0212<<14 | 0x31<<7 | 0x3B, + 31746 - 19968: jis0212<<14 | 0x31<<7 | 0x3C, + 31747 - 19968: jis0212<<14 | 0x31<<7 | 0x3D, + 31748 - 19968: jis0212<<14 | 0x31<<7 | 0x3E, + 31750 - 19968: jis0212<<14 | 0x31<<7 | 0x3F, + 31751 - 19968: jis0208<<14 | 0x43<<7 | 0x27, + 31753 - 19968: jis0212<<14 | 0x31<<7 | 0x40, + 31755 - 19968: jis0212<<14 | 0x31<<7 | 0x41, + 31756 - 19968: jis0212<<14 | 0x31<<7 | 0x42, + 31757 - 19968: jis0208<<14 | 0x43<<7 | 0x2C, + 31758 - 19968: jis0212<<14 | 0x31<<7 | 0x43, + 31759 - 19968: jis0212<<14 | 0x31<<7 | 0x44, + 31761 - 19968: jis0208<<14 | 0x43<<7 | 0x21, + 31762 - 19968: jis0208<<14 | 0x31<<7 | 0x34, + 31763 - 19968: jis0208<<14 | 0x43<<7 | 0x28, + 31764 - 19968: jis0208<<14 | 0x43<<7 | 0x22, + 31767 - 19968: jis0208<<14 | 0x43<<7 | 0x2B, + 31769 - 19968: jis0212<<14 | 0x31<<7 | 0x45, + 31771 - 19968: jis0212<<14 | 0x31<<7 | 0x46, + 31775 - 19968: jis0208<<14 | 0x43<<7 | 0x31, + 31776 - 19968: jis0212<<14 | 0x31<<7 | 0x47, + 31777 - 19968: jis0208<<14 | 0x13<<7 | 0x29, + 31779 - 19968: jis0208<<14 | 0x43<<7 | 0x2E, + 31781 - 19968: jis0212<<14 | 0x31<<7 | 0x48, + 31782 - 19968: jis0212<<14 | 0x31<<7 | 0x49, + 31783 - 19968: jis0208<<14 | 0x43<<7 | 0x2F, + 31784 - 19968: jis0212<<14 | 0x31<<7 | 0x4A, + 31786 - 19968: jis0208<<14 | 0x43<<7 | 0x30, + 31787 - 19968: jis0208<<14 | 0x43<<7 | 0x33, + 31788 - 19968: jis0212<<14 | 0x31<<7 | 0x4B, + 31793 - 19968: jis0212<<14 | 0x31<<7 | 0x4C, + 31795 - 19968: jis0212<<14 | 0x31<<7 | 0x4D, + 31796 - 19968: jis0212<<14 | 0x31<<7 | 0x4E, + 31798 - 19968: jis0212<<14 | 0x31<<7 | 0x4F, + 31799 - 19968: jis0208<<14 | 0x43<<7 | 0x32, + 31800 - 19968: jis0208<<14 | 0x27<<7 | 0x55, + 31801 - 19968: jis0212<<14 | 0x31<<7 | 0x50, + 31802 - 19968: jis0212<<14 | 0x31<<7 | 0x51, + 31805 - 19968: jis0208<<14 | 0x43<<7 | 0x34, + 31806 - 19968: jis0208<<14 | 0x2D<<7 | 0x5B, + 31807 - 19968: jis0208<<14 | 0x29<<7 | 0x4C, + 31808 - 19968: jis0208<<14 | 0x43<<7 | 0x39, + 31811 - 19968: jis0208<<14 | 0x43<<7 | 0x36, + 31814 - 19968: jis0212<<14 | 0x31<<7 | 0x52, + 31818 - 19968: jis0212<<14 | 0x31<<7 | 0x53, + 31820 - 19968: jis0208<<14 | 0x43<<7 | 0x35, + 31821 - 19968: jis0208<<14 | 0x1F<<7 | 0x31, + 31823 - 19968: jis0208<<14 | 0x43<<7 | 0x38, + 31824 - 19968: jis0208<<14 | 0x43<<7 | 0x3A, + 31825 - 19968: jis0212<<14 | 0x31<<7 | 0x55, + 31826 - 19968: jis0212<<14 | 0x31<<7 | 0x56, + 31827 - 19968: jis0212<<14 | 0x31<<7 | 0x57, + 31828 - 19968: jis0208<<14 | 0x43<<7 | 0x37, + 31829 - 19968: jis0212<<14 | 0x31<<7 | 0x54, + 31830 - 19968: jis0208<<14 | 0x43<<7 | 0x3E, + 31832 - 19968: jis0208<<14 | 0x43<<7 | 0x3B, + 31833 - 19968: jis0212<<14 | 0x31<<7 | 0x58, + 31834 - 19968: jis0212<<14 | 0x31<<7 | 0x59, + 31835 - 19968: jis0212<<14 | 0x31<<7 | 0x5A, + 31836 - 19968: jis0212<<14 | 0x31<<7 | 0x5B, + 31837 - 19968: jis0212<<14 | 0x31<<7 | 0x5C, + 31838 - 19968: jis0212<<14 | 0x31<<7 | 0x5D, + 31839 - 19968: jis0208<<14 | 0x43<<7 | 0x3C, + 31840 - 19968: jis0208<<14 | 0x43<<7 | 0x25, + 31841 - 19968: jis0212<<14 | 0x32<<7 | 0x00, + 31843 - 19968: jis0212<<14 | 0x32<<7 | 0x01, + 31844 - 19968: jis0208<<14 | 0x43<<7 | 0x3D, + 31845 - 19968: jis0208<<14 | 0x43<<7 | 0x3F, + 31847 - 19968: jis0212<<14 | 0x32<<7 | 0x02, + 31849 - 19968: jis0212<<14 | 0x32<<7 | 0x03, + 31852 - 19968: jis0208<<14 | 0x43<<7 | 0x40, + 31853 - 19968: jis0212<<14 | 0x32<<7 | 0x04, + 31854 - 19968: jis0212<<14 | 0x32<<7 | 0x05, + 31856 - 19968: jis0212<<14 | 0x32<<7 | 0x06, + 31858 - 19968: jis0212<<14 | 0x32<<7 | 0x07, + 31859 - 19968: jis0208<<14 | 0x29<<7 | 0x25, + 31861 - 19968: jis0208<<14 | 0x43<<7 | 0x41, + 31865 - 19968: jis0212<<14 | 0x32<<7 | 0x08, + 31868 - 19968: jis0212<<14 | 0x32<<7 | 0x09, + 31869 - 19968: jis0212<<14 | 0x32<<7 | 0x0A, + 31870 - 19968: jis0208<<14 | 0x2B<<7 | 0x41, + 31873 - 19968: jis0208<<14 | 0x15<<7 | 0x2D, + 31874 - 19968: jis0208<<14 | 0x16<<7 | 0x08, + 31875 - 19968: jis0208<<14 | 0x43<<7 | 0x42, + 31878 - 19968: jis0212<<14 | 0x32<<7 | 0x0B, + 31879 - 19968: jis0212<<14 | 0x32<<7 | 0x0C, + 31881 - 19968: jis0208<<14 | 0x29<<7 | 0x13, + 31883 - 19968: jis0208<<14 | 0x1E<<7 | 0x47, + 31885 - 19968: jis0208<<14 | 0x2B<<7 | 0x0F, + 31887 - 19968: jis0212<<14 | 0x32<<7 | 0x0D, + 31888 - 19968: jis0208<<14 | 0x43<<7 | 0x43, + 31890 - 19968: jis0208<<14 | 0x2D<<7 | 0x12, + 31892 - 19968: jis0212<<14 | 0x32<<7 | 0x0E, + 31893 - 19968: jis0208<<14 | 0x26<<7 | 0x53, + 31895 - 19968: jis0208<<14 | 0x20<<7 | 0x25, + 31896 - 19968: jis0208<<14 | 0x26<<7 | 0x13, + 31899 - 19968: jis0208<<14 | 0x1C<<7 | 0x2C, + 31902 - 19968: jis0212<<14 | 0x32<<7 | 0x0F, + 31903 - 19968: jis0208<<14 | 0x0F<<7 | 0x1F, + 31904 - 19968: jis0212<<14 | 0x32<<7 | 0x10, + 31905 - 19968: jis0208<<14 | 0x43<<7 | 0x48, + 31906 - 19968: jis0208<<14 | 0x43<<7 | 0x46, + 31908 - 19968: jis0208<<14 | 0x43<<7 | 0x44, + 31909 - 19968: jis0208<<14 | 0x13<<7 | 0x00, + 31910 - 19968: jis0212<<14 | 0x32<<7 | 0x11, + 31911 - 19968: jis0208<<14 | 0x1D<<7 | 0x30, + 31912 - 19968: jis0208<<14 | 0x43<<7 | 0x49, + 31915 - 19968: jis0208<<14 | 0x43<<7 | 0x47, + 31917 - 19968: jis0208<<14 | 0x43<<7 | 0x45, + 31918 - 19968: jis0208<<14 | 0x43<<7 | 0x4D, + 31920 - 19968: jis0212<<14 | 0x32<<7 | 0x12, + 31921 - 19968: jis0208<<14 | 0x43<<7 | 0x4C, + 31922 - 19968: jis0208<<14 | 0x43<<7 | 0x4B, + 31923 - 19968: jis0208<<14 | 0x43<<7 | 0x4A, + 31926 - 19968: jis0212<<14 | 0x32<<7 | 0x13, + 31927 - 19968: jis0212<<14 | 0x32<<7 | 0x14, + 31929 - 19968: jis0208<<14 | 0x43<<7 | 0x4E, + 31930 - 19968: jis0212<<14 | 0x32<<7 | 0x15, + 31931 - 19968: jis0212<<14 | 0x32<<7 | 0x16, + 31932 - 19968: jis0212<<14 | 0x32<<7 | 0x17, + 31933 - 19968: jis0208<<14 | 0x43<<7 | 0x4F, + 31934 - 19968: jis0208<<14 | 0x1F<<7 | 0x19, + 31935 - 19968: jis0212<<14 | 0x32<<7 | 0x18, + 31936 - 19968: jis0208<<14 | 0x43<<7 | 0x50, + 31938 - 19968: jis0208<<14 | 0x43<<7 | 0x52, + 31940 - 19968: jis0212<<14 | 0x32<<7 | 0x19, + 31941 - 19968: jis0208<<14 | 0x43<<7 | 0x51, + 31943 - 19968: jis0212<<14 | 0x32<<7 | 0x1A, + 31944 - 19968: jis0212<<14 | 0x32<<7 | 0x1B, + 31945 - 19968: jis0212<<14 | 0x32<<7 | 0x1C, + 31946 - 19968: jis0208<<14 | 0x17<<7 | 0x31, + 31949 - 19968: jis0212<<14 | 0x32<<7 | 0x1D, + 31950 - 19968: jis0208<<14 | 0x20<<7 | 0x17, + 31951 - 19968: jis0212<<14 | 0x32<<7 | 0x1E, + 31954 - 19968: jis0208<<14 | 0x43<<7 | 0x54, + 31955 - 19968: jis0212<<14 | 0x32<<7 | 0x1F, + 31956 - 19968: jis0212<<14 | 0x32<<7 | 0x20, + 31957 - 19968: jis0212<<14 | 0x32<<7 | 0x21, + 31958 - 19968: jis0208<<14 | 0x24<<7 | 0x5B, + 31959 - 19968: jis0212<<14 | 0x32<<7 | 0x22, + 31960 - 19968: jis0208<<14 | 0x43<<7 | 0x53, + 31961 - 19968: jis0212<<14 | 0x32<<7 | 0x23, + 31962 - 19968: jis0212<<14 | 0x32<<7 | 0x24, + 31964 - 19968: jis0208<<14 | 0x43<<7 | 0x55, + 31965 - 19968: jis0212<<14 | 0x32<<7 | 0x25, + 31966 - 19968: jis0208<<14 | 0x29<<7 | 0x14, + 31967 - 19968: jis0208<<14 | 0x20<<7 | 0x4B, + 31968 - 19968: jis0208<<14 | 0x18<<7 | 0x26, + 31970 - 19968: jis0208<<14 | 0x43<<7 | 0x56, + 31974 - 19968: jis0212<<14 | 0x32<<7 | 0x26, + 31975 - 19968: jis0208<<14 | 0x2D<<7 | 0x27, + 31977 - 19968: jis0212<<14 | 0x32<<7 | 0x27, + 31979 - 19968: jis0212<<14 | 0x32<<7 | 0x28, + 31983 - 19968: jis0208<<14 | 0x43<<7 | 0x58, + 31986 - 19968: jis0208<<14 | 0x43<<7 | 0x59, + 31988 - 19968: jis0208<<14 | 0x43<<7 | 0x5A, + 31989 - 19968: jis0212<<14 | 0x32<<7 | 0x29, + 31990 - 19968: jis0208<<14 | 0x43<<7 | 0x5B, + 31992 - 19968: jis0208<<14 | 0x1A<<7 | 0x44, + 31994 - 19968: jis0208<<14 | 0x43<<7 | 0x5C, + 31995 - 19968: jis0208<<14 | 0x16<<7 | 0x2E, + 31998 - 19968: jis0208<<14 | 0x14<<7 | 0x49, + 32000 - 19968: jis0208<<14 | 0x14<<7 | 0x09, + 32002 - 19968: jis0208<<14 | 0x44<<7 | 0x00, + 32003 - 19968: jis0212<<14 | 0x32<<7 | 0x2A, + 32004 - 19968: jis0208<<14 | 0x2B<<7 | 0x52, + 32005 - 19968: jis0208<<14 | 0x18<<7 | 0x27, + 32006 - 19968: jis0208<<14 | 0x43<<7 | 0x5D, + 32007 - 19968: jis0212<<14 | 0x32<<7 | 0x2B, + 32008 - 19968: jis0212<<14 | 0x32<<7 | 0x2C, + 32009 - 19968: jis0212<<14 | 0x32<<7 | 0x2D, + 32010 - 19968: jis0208<<14 | 0x44<<7 | 0x03, + 32011 - 19968: jis0208<<14 | 0x2B<<7 | 0x45, + 32013 - 19968: jis0208<<14 | 0x26<<7 | 0x1B, + 32015 - 19968: jis0212<<14 | 0x32<<7 | 0x2E, + 32016 - 19968: jis0208<<14 | 0x28<<7 | 0x12, + 32017 - 19968: jis0212<<14 | 0x32<<7 | 0x2F, + 32018 - 19968: jis0212<<14 | 0x32<<7 | 0x30, + 32019 - 19968: jis0212<<14 | 0x32<<7 | 0x31, + 32020 - 19968: jis0208<<14 | 0x1C<<7 | 0x42, + 32021 - 19968: jis0208<<14 | 0x44<<7 | 0x02, + 32022 - 19968: jis0212<<14 | 0x32<<7 | 0x32, + 32023 - 19968: jis0208<<14 | 0x1B<<7 | 0x32, + 32024 - 19968: jis0208<<14 | 0x18<<7 | 0x28, + 32025 - 19968: jis0208<<14 | 0x1A<<7 | 0x45, + 32026 - 19968: jis0208<<14 | 0x14<<7 | 0x48, + 32027 - 19968: jis0208<<14 | 0x29<<7 | 0x15, + 32028 - 19968: jis0208<<14 | 0x44<<7 | 0x01, + 32029 - 19968: jis0212<<14 | 0x32<<7 | 0x33, + 32030 - 19968: jis0212<<14 | 0x32<<7 | 0x34, + 32032 - 19968: jis0208<<14 | 0x20<<7 | 0x26, + 32033 - 19968: jis0208<<14 | 0x2A<<7 | 0x21, + 32034 - 19968: jis0208<<14 | 0x19<<7 | 0x56, + 32035 - 19968: jis0212<<14 | 0x32<<7 | 0x35, + 32038 - 19968: jis0212<<14 | 0x32<<7 | 0x36, + 32042 - 19968: jis0212<<14 | 0x32<<7 | 0x37, + 32043 - 19968: jis0208<<14 | 0x1A<<7 | 0x46, + 32044 - 19968: jis0208<<14 | 0x23<<7 | 0x3C, + 32045 - 19968: jis0212<<14 | 0x32<<7 | 0x38, + 32046 - 19968: jis0208<<14 | 0x44<<7 | 0x06, + 32047 - 19968: jis0208<<14 | 0x2D<<7 | 0x3E, + 32048 - 19968: jis0208<<14 | 0x19<<7 | 0x38, + 32049 - 19968: jis0212<<14 | 0x32<<7 | 0x39, + 32050 - 19968: jis0208<<14 | 0x44<<7 | 0x07, + 32051 - 19968: jis0208<<14 | 0x1E<<7 | 0x21, + 32053 - 19968: jis0208<<14 | 0x44<<7 | 0x09, + 32057 - 19968: jis0208<<14 | 0x1D<<7 | 0x31, + 32058 - 19968: jis0208<<14 | 0x19<<7 | 0x0F, + 32060 - 19968: jis0212<<14 | 0x32<<7 | 0x3A, + 32061 - 19968: jis0212<<14 | 0x32<<7 | 0x3B, + 32062 - 19968: jis0212<<14 | 0x32<<7 | 0x3C, + 32063 - 19968: jis0208<<14 | 0x44<<7 | 0x08, + 32064 - 19968: jis0212<<14 | 0x32<<7 | 0x3D, + 32065 - 19968: jis0212<<14 | 0x32<<7 | 0x3E, + 32066 - 19968: jis0208<<14 | 0x1C<<7 | 0x09, + 32067 - 19968: jis0208<<14 | 0x17<<7 | 0x1D, + 32068 - 19968: jis0208<<14 | 0x20<<7 | 0x27, + 32069 - 19968: jis0208<<14 | 0x44<<7 | 0x04, + 32070 - 19968: jis0208<<14 | 0x44<<7 | 0x0A, + 32071 - 19968: jis0212<<14 | 0x32<<7 | 0x3F, + 32072 - 19968: jis0208<<14 | 0x5A<<7 | 0x2D, + 32075 - 19968: jis0208<<14 | 0x44<<7 | 0x05, + 32076 - 19968: jis0208<<14 | 0x16<<7 | 0x2F, + 32077 - 19968: jis0212<<14 | 0x32<<7 | 0x41, + 32078 - 19968: jis0208<<14 | 0x44<<7 | 0x0D, + 32079 - 19968: jis0208<<14 | 0x44<<7 | 0x11, + 32080 - 19968: jis0208<<14 | 0x16<<7 | 0x4A, + 32081 - 19968: jis0212<<14 | 0x32<<7 | 0x42, + 32083 - 19968: jis0212<<14 | 0x32<<7 | 0x43, + 32086 - 19968: jis0208<<14 | 0x44<<7 | 0x0C, + 32087 - 19968: jis0212<<14 | 0x32<<7 | 0x44, + 32089 - 19968: jis0212<<14 | 0x32<<7 | 0x45, + 32090 - 19968: jis0212<<14 | 0x32<<7 | 0x46, + 32091 - 19968: jis0208<<14 | 0x44<<7 | 0x15, + 32092 - 19968: jis0208<<14 | 0x5A<<7 | 0x2E, + 32093 - 19968: jis0212<<14 | 0x32<<7 | 0x48, + 32094 - 19968: jis0208<<14 | 0x18<<7 | 0x29, + 32097 - 19968: jis0208<<14 | 0x2C<<7 | 0x4C, + 32098 - 19968: jis0208<<14 | 0x0F<<7 | 0x1B, + 32099 - 19968: jis0208<<14 | 0x44<<7 | 0x12, + 32101 - 19968: jis0212<<14 | 0x32<<7 | 0x49, + 32102 - 19968: jis0208<<14 | 0x14<<7 | 0x4A, + 32103 - 19968: jis0212<<14 | 0x32<<7 | 0x4A, + 32104 - 19968: jis0208<<14 | 0x44<<7 | 0x0F, + 32106 - 19968: jis0212<<14 | 0x32<<7 | 0x4B, + 32110 - 19968: jis0208<<14 | 0x44<<7 | 0x10, + 32112 - 19968: jis0212<<14 | 0x32<<7 | 0x4C, + 32113 - 19968: jis0208<<14 | 0x24<<7 | 0x5C, + 32114 - 19968: jis0208<<14 | 0x44<<7 | 0x0E, + 32115 - 19968: jis0208<<14 | 0x44<<7 | 0x0B, + 32117 - 19968: jis0208<<14 | 0x12<<7 | 0x07, + 32118 - 19968: jis0208<<14 | 0x1F<<7 | 0x43, + 32120 - 19968: jis0212<<14 | 0x32<<7 | 0x4D, + 32121 - 19968: jis0208<<14 | 0x17<<7 | 0x07, + 32122 - 19968: jis0212<<14 | 0x32<<7 | 0x4E, + 32123 - 19968: jis0212<<14 | 0x32<<7 | 0x4F, + 32125 - 19968: jis0208<<14 | 0x44<<7 | 0x17, + 32127 - 19968: jis0212<<14 | 0x32<<7 | 0x50, + 32129 - 19968: jis0212<<14 | 0x32<<7 | 0x51, + 32130 - 19968: jis0212<<14 | 0x32<<7 | 0x52, + 32131 - 19968: jis0212<<14 | 0x32<<7 | 0x53, + 32133 - 19968: jis0212<<14 | 0x32<<7 | 0x54, + 32134 - 19968: jis0212<<14 | 0x32<<7 | 0x55, + 32136 - 19968: jis0212<<14 | 0x32<<7 | 0x56, + 32137 - 19968: jis0208<<14 | 0x44<<7 | 0x14, + 32139 - 19968: jis0212<<14 | 0x32<<7 | 0x57, + 32140 - 19968: jis0212<<14 | 0x32<<7 | 0x58, + 32141 - 19968: jis0212<<14 | 0x32<<7 | 0x59, + 32143 - 19968: jis0208<<14 | 0x44<<7 | 0x16, + 32145 - 19968: jis0212<<14 | 0x32<<7 | 0x5A, + 32147 - 19968: jis0208<<14 | 0x44<<7 | 0x13, + 32150 - 19968: jis0212<<14 | 0x32<<7 | 0x5B, + 32151 - 19968: jis0212<<14 | 0x32<<7 | 0x5C, + 32153 - 19968: jis0208<<14 | 0x16<<7 | 0x30, + 32154 - 19968: jis0208<<14 | 0x21<<7 | 0x12, + 32155 - 19968: jis0208<<14 | 0x44<<7 | 0x18, + 32156 - 19968: jis0208<<14 | 0x20<<7 | 0x4D, + 32157 - 19968: jis0212<<14 | 0x32<<7 | 0x5D, + 32158 - 19968: jis0212<<14 | 0x33<<7 | 0x00, + 32159 - 19968: jis0208<<14 | 0x44<<7 | 0x25, + 32160 - 19968: jis0208<<14 | 0x5A<<7 | 0x30, + 32162 - 19968: jis0208<<14 | 0x44<<7 | 0x21, + 32163 - 19968: jis0208<<14 | 0x44<<7 | 0x1B, + 32166 - 19968: jis0212<<14 | 0x33<<7 | 0x01, + 32167 - 19968: jis0212<<14 | 0x33<<7 | 0x02, + 32170 - 19968: jis0212<<14 | 0x33<<7 | 0x03, + 32171 - 19968: jis0208<<14 | 0x44<<7 | 0x1F, + 32172 - 19968: jis0208<<14 | 0x1B<<7 | 0x59, + 32173 - 19968: jis0208<<14 | 0x0F<<7 | 0x3C, + 32174 - 19968: jis0208<<14 | 0x44<<7 | 0x1A, + 32175 - 19968: jis0208<<14 | 0x44<<7 | 0x22, + 32176 - 19968: jis0208<<14 | 0x44<<7 | 0x26, + 32177 - 19968: jis0208<<14 | 0x18<<7 | 0x2A, + 32178 - 19968: jis0208<<14 | 0x2B<<7 | 0x35, + 32179 - 19968: jis0212<<14 | 0x33<<7 | 0x04, + 32180 - 19968: jis0208<<14 | 0x23<<7 | 0x35, + 32181 - 19968: jis0208<<14 | 0x44<<7 | 0x1C, + 32182 - 19968: jis0212<<14 | 0x33<<7 | 0x05, + 32183 - 19968: jis0208<<14 | 0x5A<<7 | 0x2F, + 32184 - 19968: jis0208<<14 | 0x44<<7 | 0x24, + 32185 - 19968: jis0212<<14 | 0x33<<7 | 0x07, + 32186 - 19968: jis0208<<14 | 0x44<<7 | 0x19, + 32187 - 19968: jis0208<<14 | 0x22<<7 | 0x1D, + 32189 - 19968: jis0208<<14 | 0x44<<7 | 0x1E, + 32190 - 19968: jis0208<<14 | 0x0F<<7 | 0x1C, + 32191 - 19968: jis0208<<14 | 0x2B<<7 | 0x29, + 32194 - 19968: jis0212<<14 | 0x33<<7 | 0x08, + 32195 - 19968: jis0212<<14 | 0x33<<7 | 0x09, + 32196 - 19968: jis0212<<14 | 0x33<<7 | 0x0A, + 32197 - 19968: jis0212<<14 | 0x33<<7 | 0x0B, + 32198 - 19968: jis0212<<14 | 0x33<<7 | 0x0C, + 32199 - 19968: jis0208<<14 | 0x44<<7 | 0x1D, + 32202 - 19968: jis0208<<14 | 0x15<<7 | 0x3A, + 32203 - 19968: jis0208<<14 | 0x27<<7 | 0x4B, + 32204 - 19968: jis0212<<14 | 0x33<<7 | 0x0D, + 32205 - 19968: jis0212<<14 | 0x33<<7 | 0x0E, + 32206 - 19968: jis0212<<14 | 0x33<<7 | 0x0F, + 32207 - 19968: jis0208<<14 | 0x20<<7 | 0x4C, + 32209 - 19968: jis0208<<14 | 0x2D<<7 | 0x2F, + 32210 - 19968: jis0208<<14 | 0x1C<<7 | 0x4E, + 32213 - 19968: jis0208<<14 | 0x44<<7 | 0x4D, + 32214 - 19968: jis0208<<14 | 0x5A<<7 | 0x31, + 32215 - 19968: jis0212<<14 | 0x33<<7 | 0x10, + 32216 - 19968: jis0208<<14 | 0x44<<7 | 0x27, + 32217 - 19968: jis0212<<14 | 0x33<<7 | 0x11, + 32218 - 19968: jis0208<<14 | 0x1F<<7 | 0x5D, + 32220 - 19968: jis0208<<14 | 0x44<<7 | 0x23, + 32221 - 19968: jis0208<<14 | 0x44<<7 | 0x28, + 32222 - 19968: jis0208<<14 | 0x44<<7 | 0x2A, + 32224 - 19968: jis0208<<14 | 0x23<<7 | 0x58, + 32225 - 19968: jis0208<<14 | 0x44<<7 | 0x2D, + 32226 - 19968: jis0212<<14 | 0x33<<7 | 0x13, + 32228 - 19968: jis0208<<14 | 0x44<<7 | 0x29, + 32229 - 19968: jis0212<<14 | 0x33<<7 | 0x14, + 32230 - 19968: jis0212<<14 | 0x33<<7 | 0x15, + 32232 - 19968: jis0208<<14 | 0x29<<7 | 0x33, + 32233 - 19968: jis0208<<14 | 0x13<<7 | 0x2A, + 32234 - 19968: jis0212<<14 | 0x33<<7 | 0x16, + 32235 - 19968: jis0212<<14 | 0x33<<7 | 0x17, + 32236 - 19968: jis0208<<14 | 0x2B<<7 | 0x2A, + 32237 - 19968: jis0212<<14 | 0x33<<7 | 0x18, + 32239 - 19968: jis0208<<14 | 0x0F<<7 | 0x3D, + 32241 - 19968: jis0212<<14 | 0x33<<7 | 0x19, + 32242 - 19968: jis0208<<14 | 0x44<<7 | 0x2C, + 32244 - 19968: jis0208<<14 | 0x2D<<7 | 0x5C, + 32245 - 19968: jis0212<<14 | 0x33<<7 | 0x1A, + 32246 - 19968: jis0212<<14 | 0x33<<7 | 0x1B, + 32249 - 19968: jis0212<<14 | 0x33<<7 | 0x1C, + 32250 - 19968: jis0212<<14 | 0x33<<7 | 0x1D, + 32251 - 19968: jis0208<<14 | 0x44<<7 | 0x2B, + 32256 - 19968: jis0212<<14 | 0x33<<7 | 0x12, + 32257 - 19968: jis0208<<14 | 0x10<<7 | 0x4E, + 32260 - 19968: jis0208<<14 | 0x25<<7 | 0x4B, + 32261 - 19968: jis0208<<14 | 0x44<<7 | 0x2E, + 32264 - 19968: jis0212<<14 | 0x33<<7 | 0x1E, + 32265 - 19968: jis0208<<14 | 0x44<<7 | 0x35, + 32266 - 19968: jis0208<<14 | 0x44<<7 | 0x2F, + 32267 - 19968: jis0208<<14 | 0x44<<7 | 0x36, + 32272 - 19968: jis0212<<14 | 0x33<<7 | 0x1F, + 32273 - 19968: jis0212<<14 | 0x33<<7 | 0x20, + 32274 - 19968: jis0208<<14 | 0x44<<7 | 0x32, + 32277 - 19968: jis0212<<14 | 0x33<<7 | 0x21, + 32279 - 19968: jis0212<<14 | 0x33<<7 | 0x22, + 32283 - 19968: jis0208<<14 | 0x26<<7 | 0x5A, + 32284 - 19968: jis0212<<14 | 0x33<<7 | 0x23, + 32285 - 19968: jis0212<<14 | 0x33<<7 | 0x24, + 32286 - 19968: jis0208<<14 | 0x1B<<7 | 0x29, + 32287 - 19968: jis0208<<14 | 0x44<<7 | 0x34, + 32288 - 19968: jis0212<<14 | 0x33<<7 | 0x25, + 32289 - 19968: jis0208<<14 | 0x44<<7 | 0x31, + 32290 - 19968: jis0208<<14 | 0x44<<7 | 0x37, + 32291 - 19968: jis0208<<14 | 0x44<<7 | 0x30, + 32294 - 19968: jis0208<<14 | 0x1C<<7 | 0x23, + 32295 - 19968: jis0212<<14 | 0x33<<7 | 0x26, + 32296 - 19968: jis0212<<14 | 0x33<<7 | 0x27, + 32299 - 19968: jis0208<<14 | 0x2A<<7 | 0x04, + 32300 - 19968: jis0212<<14 | 0x33<<7 | 0x28, + 32301 - 19968: jis0212<<14 | 0x33<<7 | 0x29, + 32302 - 19968: jis0208<<14 | 0x1C<<7 | 0x2B, + 32303 - 19968: jis0212<<14 | 0x33<<7 | 0x2A, + 32305 - 19968: jis0208<<14 | 0x44<<7 | 0x33, + 32306 - 19968: jis0208<<14 | 0x44<<7 | 0x3F, + 32307 - 19968: jis0212<<14 | 0x33<<7 | 0x2B, + 32309 - 19968: jis0208<<14 | 0x44<<7 | 0x3B, + 32310 - 19968: jis0212<<14 | 0x33<<7 | 0x2C, + 32311 - 19968: jis0208<<14 | 0x44<<7 | 0x3E, + 32313 - 19968: jis0208<<14 | 0x44<<7 | 0x3C, + 32314 - 19968: jis0208<<14 | 0x44<<7 | 0x40, + 32315 - 19968: jis0208<<14 | 0x44<<7 | 0x3A, + 32317 - 19968: jis0208<<14 | 0x44<<7 | 0x20, + 32318 - 19968: jis0208<<14 | 0x1F<<7 | 0x32, + 32319 - 19968: jis0212<<14 | 0x33<<7 | 0x2D, + 32321 - 19968: jis0208<<14 | 0x27<<7 | 0x2A, + 32323 - 19968: jis0208<<14 | 0x44<<7 | 0x3D, + 32324 - 19968: jis0212<<14 | 0x33<<7 | 0x2E, + 32325 - 19968: jis0212<<14 | 0x33<<7 | 0x2F, + 32326 - 19968: jis0208<<14 | 0x44<<7 | 0x38, + 32327 - 19968: jis0212<<14 | 0x33<<7 | 0x30, + 32330 - 19968: jis0208<<14 | 0x20<<7 | 0x00, + 32331 - 19968: jis0208<<14 | 0x16<<7 | 0x31, + 32333 - 19968: jis0208<<14 | 0x1C<<7 | 0x0A, + 32334 - 19968: jis0212<<14 | 0x33<<7 | 0x31, + 32336 - 19968: jis0212<<14 | 0x33<<7 | 0x32, + 32338 - 19968: jis0208<<14 | 0x5A<<7 | 0x32, + 32340 - 19968: jis0208<<14 | 0x1E<<7 | 0x04, + 32341 - 19968: jis0208<<14 | 0x20<<7 | 0x15, + 32342 - 19968: jis0208<<14 | 0x44<<7 | 0x43, + 32344 - 19968: jis0212<<14 | 0x33<<7 | 0x34, + 32345 - 19968: jis0208<<14 | 0x44<<7 | 0x45, + 32346 - 19968: jis0208<<14 | 0x44<<7 | 0x46, + 32349 - 19968: jis0208<<14 | 0x44<<7 | 0x42, + 32350 - 19968: jis0208<<14 | 0x44<<7 | 0x44, + 32351 - 19968: jis0212<<14 | 0x33<<7 | 0x35, + 32353 - 19968: jis0212<<14 | 0x33<<7 | 0x36, + 32354 - 19968: jis0212<<14 | 0x33<<7 | 0x37, + 32357 - 19968: jis0212<<14 | 0x33<<7 | 0x38, + 32358 - 19968: jis0208<<14 | 0x44<<7 | 0x39, + 32359 - 19968: jis0208<<14 | 0x44<<7 | 0x41, + 32361 - 19968: jis0208<<14 | 0x44<<7 | 0x49, + 32362 - 19968: jis0208<<14 | 0x44<<7 | 0x48, + 32363 - 19968: jis0212<<14 | 0x33<<7 | 0x39, + 32365 - 19968: jis0208<<14 | 0x2A<<7 | 0x59, + 32366 - 19968: jis0212<<14 | 0x33<<7 | 0x3A, + 32367 - 19968: jis0212<<14 | 0x33<<7 | 0x3B, + 32368 - 19968: jis0208<<14 | 0x16<<7 | 0x0A, + 32371 - 19968: jis0212<<14 | 0x33<<7 | 0x3C, + 32376 - 19968: jis0212<<14 | 0x33<<7 | 0x3D, + 32377 - 19968: jis0208<<14 | 0x44<<7 | 0x47, + 32379 - 19968: jis0208<<14 | 0x44<<7 | 0x4B, + 32380 - 19968: jis0208<<14 | 0x44<<7 | 0x4A, + 32381 - 19968: jis0208<<14 | 0x44<<7 | 0x4E, + 32382 - 19968: jis0212<<14 | 0x33<<7 | 0x3E, + 32383 - 19968: jis0208<<14 | 0x44<<7 | 0x50, + 32385 - 19968: jis0212<<14 | 0x33<<7 | 0x3F, + 32386 - 19968: jis0208<<14 | 0x1A<<7 | 0x1B, + 32387 - 19968: jis0208<<14 | 0x44<<7 | 0x4C, + 32390 - 19968: jis0212<<14 | 0x33<<7 | 0x40, + 32391 - 19968: jis0212<<14 | 0x33<<7 | 0x41, + 32392 - 19968: jis0208<<14 | 0x44<<7 | 0x51, + 32393 - 19968: jis0208<<14 | 0x44<<7 | 0x52, + 32394 - 19968: jis0208<<14 | 0x58<<7 | 0x00, + 32396 - 19968: jis0208<<14 | 0x44<<7 | 0x53, + 32397 - 19968: jis0212<<14 | 0x33<<7 | 0x43, + 32398 - 19968: jis0208<<14 | 0x44<<7 | 0x59, + 32399 - 19968: jis0208<<14 | 0x24<<7 | 0x1A, + 32400 - 19968: jis0208<<14 | 0x44<<7 | 0x55, + 32401 - 19968: jis0212<<14 | 0x33<<7 | 0x44, + 32402 - 19968: jis0208<<14 | 0x44<<7 | 0x54, + 32403 - 19968: jis0208<<14 | 0x44<<7 | 0x56, + 32404 - 19968: jis0208<<14 | 0x44<<7 | 0x57, + 32405 - 19968: jis0212<<14 | 0x33<<7 | 0x45, + 32406 - 19968: jis0208<<14 | 0x44<<7 | 0x58, + 32408 - 19968: jis0212<<14 | 0x33<<7 | 0x46, + 32410 - 19968: jis0212<<14 | 0x33<<7 | 0x47, + 32411 - 19968: jis0208<<14 | 0x44<<7 | 0x5A, + 32412 - 19968: jis0208<<14 | 0x44<<7 | 0x5B, + 32413 - 19968: jis0212<<14 | 0x33<<7 | 0x48, + 32414 - 19968: jis0212<<14 | 0x33<<7 | 0x49, + 32566 - 19968: jis0208<<14 | 0x13<<7 | 0x2B, + 32568 - 19968: jis0208<<14 | 0x44<<7 | 0x5C, + 32570 - 19968: jis0208<<14 | 0x44<<7 | 0x5D, + 32571 - 19968: jis0212<<14 | 0x33<<7 | 0x4B, + 32572 - 19968: jis0212<<14 | 0x33<<7 | 0x4A, + 32573 - 19968: jis0212<<14 | 0x33<<7 | 0x4C, + 32574 - 19968: jis0212<<14 | 0x33<<7 | 0x4D, + 32575 - 19968: jis0212<<14 | 0x33<<7 | 0x4E, + 32579 - 19968: jis0212<<14 | 0x33<<7 | 0x4F, + 32580 - 19968: jis0212<<14 | 0x33<<7 | 0x50, + 32581 - 19968: jis0208<<14 | 0x45<<7 | 0x00, + 32583 - 19968: jis0208<<14 | 0x5A<<7 | 0x33, + 32588 - 19968: jis0208<<14 | 0x45<<7 | 0x01, + 32589 - 19968: jis0208<<14 | 0x45<<7 | 0x02, + 32590 - 19968: jis0208<<14 | 0x45<<7 | 0x03, + 32591 - 19968: jis0212<<14 | 0x33<<7 | 0x52, + 32592 - 19968: jis0208<<14 | 0x45<<7 | 0x04, + 32593 - 19968: jis0208<<14 | 0x45<<7 | 0x05, + 32594 - 19968: jis0212<<14 | 0x33<<7 | 0x53, + 32595 - 19968: jis0212<<14 | 0x33<<7 | 0x54, + 32596 - 19968: jis0208<<14 | 0x45<<7 | 0x07, + 32597 - 19968: jis0208<<14 | 0x45<<7 | 0x06, + 32600 - 19968: jis0208<<14 | 0x45<<7 | 0x08, + 32603 - 19968: jis0212<<14 | 0x33<<7 | 0x55, + 32604 - 19968: jis0212<<14 | 0x33<<7 | 0x56, + 32605 - 19968: jis0212<<14 | 0x33<<7 | 0x57, + 32607 - 19968: jis0208<<14 | 0x45<<7 | 0x09, + 32608 - 19968: jis0208<<14 | 0x45<<7 | 0x0A, + 32609 - 19968: jis0212<<14 | 0x33<<7 | 0x58, + 32611 - 19968: jis0212<<14 | 0x33<<7 | 0x59, + 32612 - 19968: jis0212<<14 | 0x33<<7 | 0x5A, + 32613 - 19968: jis0212<<14 | 0x33<<7 | 0x5B, + 32614 - 19968: jis0212<<14 | 0x33<<7 | 0x5C, + 32615 - 19968: jis0208<<14 | 0x45<<7 | 0x0D, + 32616 - 19968: jis0208<<14 | 0x45<<7 | 0x0B, + 32617 - 19968: jis0208<<14 | 0x45<<7 | 0x0C, + 32618 - 19968: jis0208<<14 | 0x19<<7 | 0x40, + 32619 - 19968: jis0208<<14 | 0x16<<7 | 0x32, + 32621 - 19968: jis0212<<14 | 0x33<<7 | 0x5D, + 32622 - 19968: jis0208<<14 | 0x22<<7 | 0x35, + 32624 - 19968: jis0208<<14 | 0x27<<7 | 0x12, + 32625 - 19968: jis0212<<14 | 0x34<<7 | 0x00, + 32626 - 19968: jis0208<<14 | 0x1C<<7 | 0x4F, + 32629 - 19968: jis0208<<14 | 0x26<<7 | 0x2C, + 32631 - 19968: jis0208<<14 | 0x27<<7 | 0x4C, + 32632 - 19968: jis0208<<14 | 0x45<<7 | 0x0E, + 32633 - 19968: jis0208<<14 | 0x37<<7 | 0x4C, + 32637 - 19968: jis0212<<14 | 0x34<<7 | 0x01, + 32638 - 19968: jis0212<<14 | 0x34<<7 | 0x02, + 32639 - 19968: jis0212<<14 | 0x34<<7 | 0x03, + 32640 - 19968: jis0212<<14 | 0x34<<7 | 0x04, + 32642 - 19968: jis0208<<14 | 0x45<<7 | 0x0F, + 32643 - 19968: jis0208<<14 | 0x45<<7 | 0x11, + 32645 - 19968: jis0208<<14 | 0x2C<<7 | 0x44, + 32646 - 19968: jis0208<<14 | 0x45<<7 | 0x10, + 32647 - 19968: jis0208<<14 | 0x45<<7 | 0x13, + 32648 - 19968: jis0208<<14 | 0x45<<7 | 0x12, + 32650 - 19968: jis0208<<14 | 0x2C<<7 | 0x32, + 32651 - 19968: jis0212<<14 | 0x34<<7 | 0x05, + 32652 - 19968: jis0208<<14 | 0x45<<7 | 0x14, + 32653 - 19968: jis0212<<14 | 0x34<<7 | 0x06, + 32654 - 19968: jis0208<<14 | 0x27<<7 | 0x5D, + 32655 - 19968: jis0212<<14 | 0x34<<7 | 0x07, + 32656 - 19968: jis0212<<14 | 0x34<<7 | 0x08, + 32657 - 19968: jis0212<<14 | 0x34<<7 | 0x09, + 32660 - 19968: jis0208<<14 | 0x45<<7 | 0x15, + 32662 - 19968: jis0212<<14 | 0x34<<7 | 0x0A, + 32663 - 19968: jis0212<<14 | 0x34<<7 | 0x0B, + 32666 - 19968: jis0208<<14 | 0x45<<7 | 0x18, + 32668 - 19968: jis0212<<14 | 0x34<<7 | 0x0C, + 32669 - 19968: jis0208<<14 | 0x45<<7 | 0x17, + 32670 - 19968: jis0208<<14 | 0x45<<7 | 0x16, + 32673 - 19968: jis0208<<14 | 0x5A<<7 | 0x34, + 32674 - 19968: jis0212<<14 | 0x34<<7 | 0x0E, + 32675 - 19968: jis0208<<14 | 0x45<<7 | 0x19, + 32676 - 19968: jis0208<<14 | 0x16<<7 | 0x11, + 32678 - 19968: jis0212<<14 | 0x34<<7 | 0x0F, + 32680 - 19968: jis0208<<14 | 0x20<<7 | 0x01, + 32681 - 19968: jis0208<<14 | 0x14<<7 | 0x20, + 32682 - 19968: jis0212<<14 | 0x34<<7 | 0x10, + 32685 - 19968: jis0212<<14 | 0x34<<7 | 0x11, + 32686 - 19968: jis0208<<14 | 0x45<<7 | 0x1D, + 32687 - 19968: jis0208<<14 | 0x45<<7 | 0x1A, + 32690 - 19968: jis0208<<14 | 0x45<<7 | 0x1B, + 32692 - 19968: jis0212<<14 | 0x34<<7 | 0x12, + 32694 - 19968: jis0208<<14 | 0x45<<7 | 0x1E, + 32696 - 19968: jis0208<<14 | 0x45<<7 | 0x1F, + 32697 - 19968: jis0208<<14 | 0x45<<7 | 0x1C, + 32700 - 19968: jis0212<<14 | 0x34<<7 | 0x13, + 32701 - 19968: jis0208<<14 | 0x10<<7 | 0x08, + 32703 - 19968: jis0212<<14 | 0x34<<7 | 0x14, + 32704 - 19968: jis0212<<14 | 0x34<<7 | 0x15, + 32705 - 19968: jis0208<<14 | 0x11<<7 | 0x06, + 32707 - 19968: jis0212<<14 | 0x34<<7 | 0x16, + 32709 - 19968: jis0208<<14 | 0x45<<7 | 0x21, + 32710 - 19968: jis0208<<14 | 0x45<<7 | 0x22, + 32712 - 19968: jis0212<<14 | 0x34<<7 | 0x17, + 32714 - 19968: jis0208<<14 | 0x45<<7 | 0x23, + 32716 - 19968: jis0208<<14 | 0x2C<<7 | 0x41, + 32718 - 19968: jis0212<<14 | 0x34<<7 | 0x18, + 32719 - 19968: jis0212<<14 | 0x34<<7 | 0x19, + 32722 - 19968: jis0208<<14 | 0x1C<<7 | 0x0B, + 32724 - 19968: jis0208<<14 | 0x45<<7 | 0x25, + 32725 - 19968: jis0208<<14 | 0x45<<7 | 0x24, + 32731 - 19968: jis0212<<14 | 0x34<<7 | 0x1A, + 32735 - 19968: jis0212<<14 | 0x34<<7 | 0x1B, + 32736 - 19968: jis0208<<14 | 0x1E<<7 | 0x48, + 32737 - 19968: jis0208<<14 | 0x45<<7 | 0x26, + 32739 - 19968: jis0212<<14 | 0x34<<7 | 0x1C, + 32741 - 19968: jis0212<<14 | 0x34<<7 | 0x1D, + 32742 - 19968: jis0208<<14 | 0x45<<7 | 0x27, + 32744 - 19968: jis0212<<14 | 0x34<<7 | 0x1E, + 32745 - 19968: jis0208<<14 | 0x45<<7 | 0x28, + 32747 - 19968: jis0208<<14 | 0x13<<7 | 0x44, + 32748 - 19968: jis0212<<14 | 0x34<<7 | 0x1F, + 32750 - 19968: jis0212<<14 | 0x34<<7 | 0x20, + 32751 - 19968: jis0212<<14 | 0x34<<7 | 0x21, + 32752 - 19968: jis0208<<14 | 0x13<<7 | 0x2C, + 32754 - 19968: jis0212<<14 | 0x34<<7 | 0x22, + 32755 - 19968: jis0208<<14 | 0x45<<7 | 0x29, + 32761 - 19968: jis0208<<14 | 0x45<<7 | 0x2A, + 32762 - 19968: jis0212<<14 | 0x34<<7 | 0x23, + 32763 - 19968: jis0208<<14 | 0x2A<<7 | 0x3C, + 32764 - 19968: jis0208<<14 | 0x2C<<7 | 0x42, + 32765 - 19968: jis0212<<14 | 0x34<<7 | 0x24, + 32766 - 19968: jis0212<<14 | 0x34<<7 | 0x25, + 32767 - 19968: jis0212<<14 | 0x34<<7 | 0x26, + 32768 - 19968: jis0208<<14 | 0x2C<<7 | 0x33, + 32769 - 19968: jis0208<<14 | 0x2E<<7 | 0x16, + 32771 - 19968: jis0208<<14 | 0x18<<7 | 0x2C, + 32772 - 19968: jis0208<<14 | 0x45<<7 | 0x2D, + 32773 - 19968: jis0208<<14 | 0x1B<<7 | 0x33, + 32774 - 19968: jis0208<<14 | 0x45<<7 | 0x2C, + 32775 - 19968: jis0212<<14 | 0x34<<7 | 0x27, + 32776 - 19968: jis0212<<14 | 0x34<<7 | 0x28, + 32778 - 19968: jis0212<<14 | 0x34<<7 | 0x29, + 32779 - 19968: jis0208<<14 | 0x45<<7 | 0x2E, + 32780 - 19968: jis0208<<14 | 0x1B<<7 | 0x08, + 32781 - 19968: jis0212<<14 | 0x34<<7 | 0x2A, + 32782 - 19968: jis0212<<14 | 0x34<<7 | 0x2B, + 32783 - 19968: jis0212<<14 | 0x34<<7 | 0x2C, + 32784 - 19968: jis0208<<14 | 0x21<<7 | 0x30, + 32785 - 19968: jis0212<<14 | 0x34<<7 | 0x2D, + 32786 - 19968: jis0208<<14 | 0x45<<7 | 0x2F, + 32787 - 19968: jis0212<<14 | 0x34<<7 | 0x2E, + 32788 - 19968: jis0212<<14 | 0x34<<7 | 0x2F, + 32789 - 19968: jis0208<<14 | 0x18<<7 | 0x2B, + 32790 - 19968: jis0212<<14 | 0x34<<7 | 0x30, + 32791 - 19968: jis0208<<14 | 0x2B<<7 | 0x36, + 32792 - 19968: jis0208<<14 | 0x45<<7 | 0x30, + 32793 - 19968: jis0208<<14 | 0x45<<7 | 0x31, + 32796 - 19968: jis0208<<14 | 0x45<<7 | 0x32, + 32797 - 19968: jis0212<<14 | 0x34<<7 | 0x31, + 32798 - 19968: jis0212<<14 | 0x34<<7 | 0x32, + 32799 - 19968: jis0212<<14 | 0x34<<7 | 0x33, + 32800 - 19968: jis0212<<14 | 0x34<<7 | 0x34, + 32801 - 19968: jis0208<<14 | 0x45<<7 | 0x33, + 32804 - 19968: jis0212<<14 | 0x34<<7 | 0x35, + 32806 - 19968: jis0212<<14 | 0x34<<7 | 0x36, + 32808 - 19968: jis0208<<14 | 0x45<<7 | 0x34, + 32812 - 19968: jis0212<<14 | 0x34<<7 | 0x37, + 32814 - 19968: jis0212<<14 | 0x34<<7 | 0x38, + 32816 - 19968: jis0212<<14 | 0x34<<7 | 0x39, + 32819 - 19968: jis0208<<14 | 0x1B<<7 | 0x09, + 32820 - 19968: jis0212<<14 | 0x34<<7 | 0x3A, + 32821 - 19968: jis0212<<14 | 0x34<<7 | 0x3B, + 32822 - 19968: jis0208<<14 | 0x2B<<7 | 0x4C, + 32823 - 19968: jis0212<<14 | 0x34<<7 | 0x3C, + 32825 - 19968: jis0212<<14 | 0x34<<7 | 0x3D, + 32826 - 19968: jis0212<<14 | 0x34<<7 | 0x3E, + 32827 - 19968: jis0208<<14 | 0x45<<7 | 0x36, + 32828 - 19968: jis0212<<14 | 0x34<<7 | 0x3F, + 32829 - 19968: jis0208<<14 | 0x22<<7 | 0x1E, + 32830 - 19968: jis0212<<14 | 0x34<<7 | 0x40, + 32831 - 19968: jis0208<<14 | 0x45<<7 | 0x35, + 32832 - 19968: jis0212<<14 | 0x34<<7 | 0x41, + 32836 - 19968: jis0212<<14 | 0x34<<7 | 0x42, + 32838 - 19968: jis0208<<14 | 0x45<<7 | 0x38, + 32842 - 19968: jis0208<<14 | 0x45<<7 | 0x37, + 32850 - 19968: jis0208<<14 | 0x45<<7 | 0x39, + 32854 - 19968: jis0208<<14 | 0x1F<<7 | 0x1A, + 32856 - 19968: jis0208<<14 | 0x45<<7 | 0x3A, + 32858 - 19968: jis0208<<14 | 0x45<<7 | 0x3B, + 32862 - 19968: jis0208<<14 | 0x29<<7 | 0x18, + 32863 - 19968: jis0208<<14 | 0x45<<7 | 0x3C, + 32864 - 19968: jis0212<<14 | 0x34<<7 | 0x43, + 32865 - 19968: jis0208<<14 | 0x20<<7 | 0x4E, + 32866 - 19968: jis0208<<14 | 0x45<<7 | 0x3D, + 32868 - 19968: jis0212<<14 | 0x34<<7 | 0x44, + 32870 - 19968: jis0212<<14 | 0x34<<7 | 0x45, + 32872 - 19968: jis0208<<14 | 0x45<<7 | 0x3E, + 32877 - 19968: jis0212<<14 | 0x34<<7 | 0x46, + 32879 - 19968: jis0208<<14 | 0x2D<<7 | 0x5D, + 32880 - 19968: jis0208<<14 | 0x45<<7 | 0x41, + 32881 - 19968: jis0212<<14 | 0x34<<7 | 0x47, + 32882 - 19968: jis0208<<14 | 0x45<<7 | 0x40, + 32883 - 19968: jis0208<<14 | 0x45<<7 | 0x3F, + 32884 - 19968: jis0208<<14 | 0x23<<7 | 0x0F, + 32885 - 19968: jis0212<<14 | 0x34<<7 | 0x48, + 32886 - 19968: jis0208<<14 | 0x45<<7 | 0x42, + 32887 - 19968: jis0208<<14 | 0x1E<<7 | 0x05, + 32889 - 19968: jis0208<<14 | 0x45<<7 | 0x43, + 32893 - 19968: jis0208<<14 | 0x45<<7 | 0x44, + 32894 - 19968: jis0208<<14 | 0x2E<<7 | 0x17, + 32895 - 19968: jis0208<<14 | 0x45<<7 | 0x45, + 32897 - 19968: jis0212<<14 | 0x34<<7 | 0x49, + 32900 - 19968: jis0208<<14 | 0x45<<7 | 0x46, + 32901 - 19968: jis0208<<14 | 0x45<<7 | 0x48, + 32902 - 19968: jis0208<<14 | 0x45<<7 | 0x47, + 32903 - 19968: jis0208<<14 | 0x27<<7 | 0x04, + 32904 - 19968: jis0212<<14 | 0x34<<7 | 0x4A, + 32905 - 19968: jis0208<<14 | 0x25<<7 | 0x58, + 32907 - 19968: jis0208<<14 | 0x2E<<7 | 0x1D, + 32908 - 19968: jis0208<<14 | 0x27<<7 | 0x08, + 32910 - 19968: jis0212<<14 | 0x34<<7 | 0x4B, + 32915 - 19968: jis0208<<14 | 0x45<<7 | 0x4A, + 32918 - 19968: jis0208<<14 | 0x1D<<7 | 0x32, + 32920 - 19968: jis0208<<14 | 0x28<<7 | 0x09, + 32922 - 19968: jis0208<<14 | 0x45<<7 | 0x4B, + 32923 - 19968: jis0208<<14 | 0x45<<7 | 0x49, + 32924 - 19968: jis0212<<14 | 0x34<<7 | 0x4C, + 32925 - 19968: jis0208<<14 | 0x13<<7 | 0x2D, + 32926 - 19968: jis0212<<14 | 0x34<<7 | 0x4D, + 32929 - 19968: jis0208<<14 | 0x17<<7 | 0x33, + 32930 - 19968: jis0208<<14 | 0x1A<<7 | 0x47, + 32933 - 19968: jis0208<<14 | 0x27<<7 | 0x4D, + 32934 - 19968: jis0212<<14 | 0x34<<7 | 0x4E, + 32935 - 19968: jis0212<<14 | 0x34<<7 | 0x4F, + 32937 - 19968: jis0208<<14 | 0x17<<7 | 0x09, + 32938 - 19968: jis0208<<14 | 0x2A<<7 | 0x22, + 32939 - 19968: jis0212<<14 | 0x34<<7 | 0x50, + 32940 - 19968: jis0208<<14 | 0x45<<7 | 0x4E, + 32941 - 19968: jis0208<<14 | 0x45<<7 | 0x4C, + 32943 - 19968: jis0208<<14 | 0x18<<7 | 0x2D, + 32945 - 19968: jis0208<<14 | 0x18<<7 | 0x2E, + 32946 - 19968: jis0208<<14 | 0x0F<<7 | 0x48, + 32948 - 19968: jis0208<<14 | 0x19<<7 | 0x47, + 32952 - 19968: jis0212<<14 | 0x34<<7 | 0x51, + 32953 - 19968: jis0212<<14 | 0x34<<7 | 0x52, + 32954 - 19968: jis0208<<14 | 0x26<<7 | 0x38, + 32963 - 19968: jis0208<<14 | 0x0F<<7 | 0x3E, + 32964 - 19968: jis0208<<14 | 0x45<<7 | 0x53, + 32966 - 19968: jis0208<<14 | 0x22<<7 | 0x1F, + 32968 - 19968: jis0212<<14 | 0x34<<7 | 0x53, + 32972 - 19968: jis0208<<14 | 0x26<<7 | 0x37, + 32973 - 19968: jis0212<<14 | 0x34<<7 | 0x54, + 32974 - 19968: jis0208<<14 | 0x21<<7 | 0x3A, + 32975 - 19968: jis0212<<14 | 0x34<<7 | 0x55, + 32978 - 19968: jis0212<<14 | 0x34<<7 | 0x56, + 32980 - 19968: jis0212<<14 | 0x34<<7 | 0x57, + 32981 - 19968: jis0212<<14 | 0x34<<7 | 0x58, + 32982 - 19968: jis0208<<14 | 0x45<<7 | 0x55, + 32983 - 19968: jis0212<<14 | 0x34<<7 | 0x59, + 32984 - 19968: jis0212<<14 | 0x34<<7 | 0x5A, + 32985 - 19968: jis0208<<14 | 0x45<<7 | 0x51, + 32986 - 19968: jis0208<<14 | 0x45<<7 | 0x54, + 32987 - 19968: jis0208<<14 | 0x45<<7 | 0x4F, + 32989 - 19968: jis0208<<14 | 0x45<<7 | 0x52, + 32990 - 19968: jis0208<<14 | 0x2A<<7 | 0x05, + 32992 - 19968: jis0212<<14 | 0x34<<7 | 0x5B, + 32993 - 19968: jis0208<<14 | 0x17<<7 | 0x34, + 32996 - 19968: jis0208<<14 | 0x0F<<7 | 0x5C, + 32997 - 19968: jis0208<<14 | 0x45<<7 | 0x50, + 33005 - 19968: jis0212<<14 | 0x34<<7 | 0x5C, + 33006 - 19968: jis0212<<14 | 0x34<<7 | 0x5D, + 33007 - 19968: jis0208<<14 | 0x45<<7 | 0x57, + 33008 - 19968: jis0212<<14 | 0x35<<7 | 0x00, + 33009 - 19968: jis0208<<14 | 0x45<<7 | 0x58, + 33010 - 19968: jis0212<<14 | 0x35<<7 | 0x01, + 33011 - 19968: jis0212<<14 | 0x35<<7 | 0x02, + 33012 - 19968: jis0208<<14 | 0x25<<7 | 0x18, + 33014 - 19968: jis0212<<14 | 0x35<<7 | 0x03, + 33016 - 19968: jis0208<<14 | 0x15<<7 | 0x1A, + 33017 - 19968: jis0212<<14 | 0x35<<7 | 0x04, + 33018 - 19968: jis0212<<14 | 0x35<<7 | 0x05, + 33020 - 19968: jis0208<<14 | 0x46<<7 | 0x05, + 33021 - 19968: jis0208<<14 | 0x26<<7 | 0x1C, + 33022 - 19968: jis0212<<14 | 0x35<<7 | 0x06, + 33026 - 19968: jis0208<<14 | 0x1A<<7 | 0x48, + 33027 - 19968: jis0212<<14 | 0x35<<7 | 0x07, + 33029 - 19968: jis0208<<14 | 0x15<<7 | 0x1B, + 33030 - 19968: jis0208<<14 | 0x1F<<7 | 0x27, + 33031 - 19968: jis0208<<14 | 0x2E<<7 | 0x25, + 33032 - 19968: jis0208<<14 | 0x2B<<7 | 0x0D, + 33033 - 19968: jis0208<<14 | 0x45<<7 | 0x56, + 33034 - 19968: jis0208<<14 | 0x1F<<7 | 0x33, + 33035 - 19968: jis0212<<14 | 0x35<<7 | 0x08, + 33046 - 19968: jis0212<<14 | 0x35<<7 | 0x09, + 33047 - 19968: jis0212<<14 | 0x35<<7 | 0x0A, + 33048 - 19968: jis0212<<14 | 0x35<<7 | 0x0B, + 33050 - 19968: jis0208<<14 | 0x14<<7 | 0x32, + 33051 - 19968: jis0208<<14 | 0x45<<7 | 0x59, + 33052 - 19968: jis0212<<14 | 0x35<<7 | 0x0C, + 33054 - 19968: jis0212<<14 | 0x35<<7 | 0x0D, + 33056 - 19968: jis0212<<14 | 0x35<<7 | 0x0E, + 33059 - 19968: jis0208<<14 | 0x45<<7 | 0x5B, + 33060 - 19968: jis0212<<14 | 0x35<<7 | 0x0F, + 33063 - 19968: jis0212<<14 | 0x35<<7 | 0x10, + 33065 - 19968: jis0208<<14 | 0x45<<7 | 0x5A, + 33068 - 19968: jis0212<<14 | 0x35<<7 | 0x11, + 33071 - 19968: jis0208<<14 | 0x45<<7 | 0x5C, + 33072 - 19968: jis0212<<14 | 0x35<<7 | 0x12, + 33073 - 19968: jis0208<<14 | 0x22<<7 | 0x05, + 33075 - 19968: jis0208<<14 | 0x26<<7 | 0x1D, + 33077 - 19968: jis0212<<14 | 0x35<<7 | 0x13, + 33081 - 19968: jis0208<<14 | 0x23<<7 | 0x10, + 33082 - 19968: jis0212<<14 | 0x35<<7 | 0x14, + 33084 - 19968: jis0212<<14 | 0x35<<7 | 0x15, + 33086 - 19968: jis0208<<14 | 0x46<<7 | 0x02, + 33093 - 19968: jis0212<<14 | 0x35<<7 | 0x16, + 33094 - 19968: jis0208<<14 | 0x46<<7 | 0x01, + 33095 - 19968: jis0212<<14 | 0x35<<7 | 0x17, + 33098 - 19968: jis0212<<14 | 0x35<<7 | 0x18, + 33099 - 19968: jis0208<<14 | 0x45<<7 | 0x5D, + 33100 - 19968: jis0212<<14 | 0x35<<7 | 0x19, + 33102 - 19968: jis0208<<14 | 0x1E<<7 | 0x34, + 33104 - 19968: jis0208<<14 | 0x28<<7 | 0x44, + 33105 - 19968: jis0208<<14 | 0x46<<7 | 0x04, + 33106 - 19968: jis0212<<14 | 0x35<<7 | 0x1A, + 33107 - 19968: jis0208<<14 | 0x46<<7 | 0x03, + 33108 - 19968: jis0208<<14 | 0x18<<7 | 0x2F, + 33109 - 19968: jis0208<<14 | 0x2E<<7 | 0x32, + 33111 - 19968: jis0212<<14 | 0x35<<7 | 0x1B, + 33119 - 19968: jis0208<<14 | 0x46<<7 | 0x14, + 33120 - 19968: jis0212<<14 | 0x35<<7 | 0x1C, + 33121 - 19968: jis0212<<14 | 0x35<<7 | 0x1D, + 33125 - 19968: jis0208<<14 | 0x46<<7 | 0x08, + 33126 - 19968: jis0208<<14 | 0x46<<7 | 0x09, + 33127 - 19968: jis0212<<14 | 0x35<<7 | 0x1E, + 33128 - 19968: jis0212<<14 | 0x35<<7 | 0x1F, + 33129 - 19968: jis0212<<14 | 0x35<<7 | 0x20, + 33131 - 19968: jis0208<<14 | 0x1B<<7 | 0x4F, + 33133 - 19968: jis0212<<14 | 0x35<<7 | 0x21, + 33134 - 19968: jis0208<<14 | 0x46<<7 | 0x07, + 33135 - 19968: jis0212<<14 | 0x35<<7 | 0x22, + 33136 - 19968: jis0208<<14 | 0x18<<7 | 0x57, + 33137 - 19968: jis0208<<14 | 0x46<<7 | 0x06, + 33140 - 19968: jis0208<<14 | 0x46<<7 | 0x0A, + 33143 - 19968: jis0212<<14 | 0x35<<7 | 0x23, + 33144 - 19968: jis0208<<14 | 0x23<<7 | 0x11, + 33145 - 19968: jis0208<<14 | 0x29<<7 | 0x01, + 33146 - 19968: jis0208<<14 | 0x20<<7 | 0x02, + 33151 - 19968: jis0208<<14 | 0x21<<7 | 0x3B, + 33152 - 19968: jis0208<<14 | 0x46<<7 | 0x0E, + 33153 - 19968: jis0212<<14 | 0x35<<7 | 0x24, + 33154 - 19968: jis0208<<14 | 0x46<<7 | 0x0F, + 33155 - 19968: jis0208<<14 | 0x46<<7 | 0x0B, + 33156 - 19968: jis0212<<14 | 0x35<<7 | 0x26, + 33157 - 19968: jis0212<<14 | 0x35<<7 | 0x27, + 33158 - 19968: jis0212<<14 | 0x35<<7 | 0x28, + 33160 - 19968: jis0208<<14 | 0x46<<7 | 0x0C, + 33162 - 19968: jis0208<<14 | 0x46<<7 | 0x0D, + 33163 - 19968: jis0212<<14 | 0x35<<7 | 0x29, + 33166 - 19968: jis0212<<14 | 0x35<<7 | 0x2A, + 33167 - 19968: jis0208<<14 | 0x18<<7 | 0x30, + 33168 - 19968: jis0212<<14 | 0x35<<7 | 0x25, + 33171 - 19968: jis0208<<14 | 0x46<<7 | 0x15, + 33173 - 19968: jis0208<<14 | 0x46<<7 | 0x11, + 33174 - 19968: jis0212<<14 | 0x35<<7 | 0x2B, + 33176 - 19968: jis0212<<14 | 0x35<<7 | 0x2C, + 33178 - 19968: jis0208<<14 | 0x28<<7 | 0x45, + 33179 - 19968: jis0212<<14 | 0x35<<7 | 0x2D, + 33180 - 19968: jis0208<<14 | 0x2A<<7 | 0x4B, + 33181 - 19968: jis0208<<14 | 0x28<<7 | 0x07, + 33182 - 19968: jis0212<<14 | 0x35<<7 | 0x2E, + 33184 - 19968: jis0208<<14 | 0x46<<7 | 0x10, + 33186 - 19968: jis0212<<14 | 0x35<<7 | 0x2F, + 33187 - 19968: jis0208<<14 | 0x46<<7 | 0x13, + 33188 - 19968: jis0208<<14 | 0x46<<7 | 0x12, + 33192 - 19968: jis0208<<14 | 0x2A<<7 | 0x23, + 33193 - 19968: jis0208<<14 | 0x46<<7 | 0x16, + 33198 - 19968: jis0212<<14 | 0x35<<7 | 0x30, + 33200 - 19968: jis0208<<14 | 0x46<<7 | 0x17, + 33202 - 19968: jis0212<<14 | 0x35<<7 | 0x31, + 33203 - 19968: jis0208<<14 | 0x20<<7 | 0x16, + 33204 - 19968: jis0212<<14 | 0x35<<7 | 0x32, + 33205 - 19968: jis0208<<14 | 0x46<<7 | 0x18, + 33208 - 19968: jis0208<<14 | 0x46<<7 | 0x1A, + 33210 - 19968: jis0208<<14 | 0x46<<7 | 0x1E, + 33211 - 19968: jis0212<<14 | 0x35<<7 | 0x33, + 33213 - 19968: jis0208<<14 | 0x46<<7 | 0x1B, + 33214 - 19968: jis0208<<14 | 0x46<<7 | 0x19, + 33215 - 19968: jis0208<<14 | 0x26<<7 | 0x1E, + 33216 - 19968: jis0208<<14 | 0x46<<7 | 0x1C, + 33218 - 19968: jis0208<<14 | 0x46<<7 | 0x1D, + 33219 - 19968: jis0212<<14 | 0x35<<7 | 0x35, + 33221 - 19968: jis0212<<14 | 0x35<<7 | 0x36, + 33222 - 19968: jis0208<<14 | 0x11<<7 | 0x11, + 33224 - 19968: jis0208<<14 | 0x46<<7 | 0x24, + 33225 - 19968: jis0208<<14 | 0x46<<7 | 0x1F, + 33226 - 19968: jis0212<<14 | 0x35<<7 | 0x37, + 33227 - 19968: jis0212<<14 | 0x35<<7 | 0x34, + 33229 - 19968: jis0208<<14 | 0x46<<7 | 0x20, + 33230 - 19968: jis0212<<14 | 0x35<<7 | 0x38, + 33231 - 19968: jis0212<<14 | 0x35<<7 | 0x39, + 33233 - 19968: jis0208<<14 | 0x46<<7 | 0x21, + 33235 - 19968: jis0208<<14 | 0x21<<7 | 0x00, + 33237 - 19968: jis0212<<14 | 0x35<<7 | 0x3A, + 33239 - 19968: jis0212<<14 | 0x35<<7 | 0x3B, + 33240 - 19968: jis0208<<14 | 0x46<<7 | 0x23, + 33241 - 19968: jis0208<<14 | 0x46<<7 | 0x22, + 33242 - 19968: jis0208<<14 | 0x46<<7 | 0x25, + 33243 - 19968: jis0212<<14 | 0x35<<7 | 0x3C, + 33245 - 19968: jis0212<<14 | 0x35<<7 | 0x3D, + 33246 - 19968: jis0212<<14 | 0x35<<7 | 0x3E, + 33247 - 19968: jis0208<<14 | 0x46<<7 | 0x26, + 33248 - 19968: jis0208<<14 | 0x46<<7 | 0x27, + 33249 - 19968: jis0212<<14 | 0x35<<7 | 0x3F, + 33251 - 19968: jis0208<<14 | 0x1E<<7 | 0x22, + 33252 - 19968: jis0212<<14 | 0x35<<7 | 0x40, + 33253 - 19968: jis0208<<14 | 0x11<<7 | 0x48, + 33255 - 19968: jis0208<<14 | 0x46<<7 | 0x28, + 33256 - 19968: jis0208<<14 | 0x2D<<7 | 0x36, + 33258 - 19968: jis0208<<14 | 0x1B<<7 | 0x0A, + 33259 - 19968: jis0212<<14 | 0x35<<7 | 0x41, + 33260 - 19968: jis0212<<14 | 0x35<<7 | 0x42, + 33261 - 19968: jis0208<<14 | 0x1C<<7 | 0x0C, + 33264 - 19968: jis0212<<14 | 0x35<<7 | 0x43, + 33265 - 19968: jis0212<<14 | 0x35<<7 | 0x44, + 33266 - 19968: jis0212<<14 | 0x35<<7 | 0x45, + 33267 - 19968: jis0208<<14 | 0x1A<<7 | 0x49, + 33268 - 19968: jis0208<<14 | 0x22<<7 | 0x36, + 33269 - 19968: jis0212<<14 | 0x35<<7 | 0x46, + 33270 - 19968: jis0212<<14 | 0x35<<7 | 0x47, + 33272 - 19968: jis0212<<14 | 0x35<<7 | 0x48, + 33273 - 19968: jis0212<<14 | 0x35<<7 | 0x49, + 33274 - 19968: jis0208<<14 | 0x46<<7 | 0x29, + 33275 - 19968: jis0208<<14 | 0x46<<7 | 0x2A, + 33276 - 19968: jis0208<<14 | 0x10<<7 | 0x10, + 33277 - 19968: jis0212<<14 | 0x35<<7 | 0x4A, + 33278 - 19968: jis0208<<14 | 0x46<<7 | 0x2B, + 33279 - 19968: jis0212<<14 | 0x35<<7 | 0x4B, + 33280 - 19968: jis0212<<14 | 0x35<<7 | 0x4C, + 33281 - 19968: jis0208<<14 | 0x46<<7 | 0x2C, + 33282 - 19968: jis0208<<14 | 0x46<<7 | 0x2D, + 33283 - 19968: jis0212<<14 | 0x35<<7 | 0x4D, + 33285 - 19968: jis0208<<14 | 0x46<<7 | 0x2E, + 33287 - 19968: jis0208<<14 | 0x46<<7 | 0x2F, + 33288 - 19968: jis0208<<14 | 0x15<<7 | 0x1C, + 33289 - 19968: jis0208<<14 | 0x39<<7 | 0x09, + 33290 - 19968: jis0208<<14 | 0x46<<7 | 0x30, + 33292 - 19968: jis0208<<14 | 0x1F<<7 | 0x44, + 33293 - 19968: jis0208<<14 | 0x46<<7 | 0x31, + 33294 - 19968: jis0208<<14 | 0x1B<<7 | 0x2A, + 33295 - 19968: jis0212<<14 | 0x35<<7 | 0x4E, + 33296 - 19968: jis0208<<14 | 0x46<<7 | 0x32, + 33298 - 19968: jis0208<<14 | 0x2F<<7 | 0x0F, + 33299 - 19968: jis0212<<14 | 0x35<<7 | 0x4F, + 33300 - 19968: jis0212<<14 | 0x35<<7 | 0x50, + 33302 - 19968: jis0208<<14 | 0x46<<7 | 0x33, + 33303 - 19968: jis0208<<14 | 0x29<<7 | 0x3D, + 33304 - 19968: jis0208<<14 | 0x13<<7 | 0x3B, + 33305 - 19968: jis0212<<14 | 0x35<<7 | 0x51, + 33306 - 19968: jis0212<<14 | 0x35<<7 | 0x52, + 33307 - 19968: jis0208<<14 | 0x20<<7 | 0x03, + 33308 - 19968: jis0208<<14 | 0x1C<<7 | 0x37, + 33309 - 19968: jis0212<<14 | 0x35<<7 | 0x53, + 33310 - 19968: jis0208<<14 | 0x28<<7 | 0x50, + 33311 - 19968: jis0208<<14 | 0x1C<<7 | 0x0D, + 33313 - 19968: jis0212<<14 | 0x35<<7 | 0x54, + 33314 - 19968: jis0212<<14 | 0x35<<7 | 0x55, + 33320 - 19968: jis0212<<14 | 0x35<<7 | 0x56, + 33321 - 19968: jis0208<<14 | 0x46<<7 | 0x34, + 33322 - 19968: jis0208<<14 | 0x18<<7 | 0x31, + 33323 - 19968: jis0208<<14 | 0x46<<7 | 0x35, + 33324 - 19968: jis0208<<14 | 0x27<<7 | 0x2B, + 33326 - 19968: jis0208<<14 | 0x46<<7 | 0x43, + 33330 - 19968: jis0212<<14 | 0x35<<7 | 0x57, + 33331 - 19968: jis0208<<14 | 0x46<<7 | 0x37, + 33332 - 19968: jis0212<<14 | 0x35<<7 | 0x58, + 33333 - 19968: jis0208<<14 | 0x21<<7 | 0x28, + 33334 - 19968: jis0208<<14 | 0x26<<7 | 0x54, + 33335 - 19968: jis0208<<14 | 0x17<<7 | 0x1E, + 33336 - 19968: jis0208<<14 | 0x46<<7 | 0x36, + 33337 - 19968: jis0208<<14 | 0x20<<7 | 0x04, + 33338 - 19968: jis0212<<14 | 0x35<<7 | 0x59, + 33344 - 19968: jis0208<<14 | 0x46<<7 | 0x38, + 33347 - 19968: jis0212<<14 | 0x35<<7 | 0x5A, + 33348 - 19968: jis0212<<14 | 0x35<<7 | 0x5B, + 33349 - 19968: jis0212<<14 | 0x35<<7 | 0x5C, + 33350 - 19968: jis0212<<14 | 0x35<<7 | 0x5D, + 33351 - 19968: jis0208<<14 | 0x23<<7 | 0x59, + 33355 - 19968: jis0212<<14 | 0x36<<7 | 0x00, + 33358 - 19968: jis0212<<14 | 0x36<<7 | 0x01, + 33359 - 19968: jis0212<<14 | 0x36<<7 | 0x02, + 33361 - 19968: jis0212<<14 | 0x36<<7 | 0x03, + 33366 - 19968: jis0212<<14 | 0x36<<7 | 0x04, + 33368 - 19968: jis0208<<14 | 0x46<<7 | 0x3A, + 33369 - 19968: jis0208<<14 | 0x46<<7 | 0x39, + 33370 - 19968: jis0208<<14 | 0x46<<7 | 0x3C, + 33372 - 19968: jis0212<<14 | 0x36<<7 | 0x05, + 33373 - 19968: jis0208<<14 | 0x46<<7 | 0x3B, + 33375 - 19968: jis0208<<14 | 0x46<<7 | 0x3D, + 33376 - 19968: jis0212<<14 | 0x36<<7 | 0x06, + 33378 - 19968: jis0208<<14 | 0x46<<7 | 0x3F, + 33379 - 19968: jis0212<<14 | 0x36<<7 | 0x07, + 33380 - 19968: jis0208<<14 | 0x46<<7 | 0x3E, + 33382 - 19968: jis0208<<14 | 0x13<<7 | 0x2E, + 33383 - 19968: jis0212<<14 | 0x36<<7 | 0x08, + 33384 - 19968: jis0208<<14 | 0x46<<7 | 0x40, + 33386 - 19968: jis0208<<14 | 0x46<<7 | 0x41, + 33387 - 19968: jis0208<<14 | 0x46<<7 | 0x42, + 33389 - 19968: jis0212<<14 | 0x36<<7 | 0x09, + 33390 - 19968: jis0208<<14 | 0x19<<7 | 0x10, + 33391 - 19968: jis0208<<14 | 0x2D<<7 | 0x28, + 33393 - 19968: jis0208<<14 | 0x46<<7 | 0x44, + 33394 - 19968: jis0208<<14 | 0x1E<<7 | 0x06, + 33396 - 19968: jis0212<<14 | 0x36<<7 | 0x0A, + 33398 - 19968: jis0208<<14 | 0x10<<7 | 0x4F, + 33399 - 19968: jis0208<<14 | 0x46<<7 | 0x45, + 33400 - 19968: jis0208<<14 | 0x46<<7 | 0x46, + 33403 - 19968: jis0212<<14 | 0x36<<7 | 0x0B, + 33405 - 19968: jis0212<<14 | 0x36<<7 | 0x0C, + 33406 - 19968: jis0208<<14 | 0x46<<7 | 0x47, + 33407 - 19968: jis0212<<14 | 0x36<<7 | 0x0D, + 33408 - 19968: jis0212<<14 | 0x36<<7 | 0x0E, + 33409 - 19968: jis0212<<14 | 0x36<<7 | 0x0F, + 33411 - 19968: jis0212<<14 | 0x36<<7 | 0x10, + 33412 - 19968: jis0212<<14 | 0x36<<7 | 0x11, + 33415 - 19968: jis0212<<14 | 0x36<<7 | 0x12, + 33417 - 19968: jis0212<<14 | 0x36<<7 | 0x13, + 33418 - 19968: jis0212<<14 | 0x36<<7 | 0x14, + 33419 - 19968: jis0208<<14 | 0x0F<<7 | 0x51, + 33421 - 19968: jis0208<<14 | 0x46<<7 | 0x48, + 33422 - 19968: jis0212<<14 | 0x36<<7 | 0x15, + 33425 - 19968: jis0212<<14 | 0x36<<7 | 0x16, + 33426 - 19968: jis0208<<14 | 0x46<<7 | 0x49, + 33428 - 19968: jis0212<<14 | 0x36<<7 | 0x17, + 33430 - 19968: jis0212<<14 | 0x36<<7 | 0x18, + 33432 - 19968: jis0212<<14 | 0x36<<7 | 0x19, + 33433 - 19968: jis0208<<14 | 0x28<<7 | 0x46, + 33434 - 19968: jis0212<<14 | 0x36<<7 | 0x1A, + 33435 - 19968: jis0212<<14 | 0x36<<7 | 0x1B, + 33437 - 19968: jis0208<<14 | 0x1B<<7 | 0x26, + 33439 - 19968: jis0208<<14 | 0x46<<7 | 0x4B, + 33440 - 19968: jis0212<<14 | 0x36<<7 | 0x1C, + 33441 - 19968: jis0212<<14 | 0x36<<7 | 0x1D, + 33443 - 19968: jis0212<<14 | 0x36<<7 | 0x1E, + 33444 - 19968: jis0212<<14 | 0x36<<7 | 0x1F, + 33445 - 19968: jis0208<<14 | 0x12<<7 | 0x08, + 33446 - 19968: jis0208<<14 | 0x0F<<7 | 0x11, + 33447 - 19968: jis0212<<14 | 0x36<<7 | 0x20, + 33448 - 19968: jis0212<<14 | 0x36<<7 | 0x21, + 33449 - 19968: jis0212<<14 | 0x36<<7 | 0x22, + 33450 - 19968: jis0212<<14 | 0x36<<7 | 0x23, + 33451 - 19968: jis0208<<14 | 0x46<<7 | 0x4A, + 33452 - 19968: jis0208<<14 | 0x46<<7 | 0x4D, + 33453 - 19968: jis0208<<14 | 0x26<<7 | 0x2D, + 33454 - 19968: jis0212<<14 | 0x36<<7 | 0x24, + 33455 - 19968: jis0208<<14 | 0x1E<<7 | 0x23, + 33456 - 19968: jis0212<<14 | 0x36<<7 | 0x25, + 33457 - 19968: jis0208<<14 | 0x11<<7 | 0x35, + 33458 - 19968: jis0212<<14 | 0x36<<7 | 0x26, + 33459 - 19968: jis0208<<14 | 0x2A<<7 | 0x06, + 33460 - 19968: jis0212<<14 | 0x36<<7 | 0x27, + 33463 - 19968: jis0212<<14 | 0x36<<7 | 0x28, + 33464 - 19968: jis0208<<14 | 0x16<<7 | 0x3C, + 33465 - 19968: jis0208<<14 | 0x15<<7 | 0x3B, + 33466 - 19968: jis0212<<14 | 0x36<<7 | 0x29, + 33467 - 19968: jis0208<<14 | 0x46<<7 | 0x4C, + 33468 - 19968: jis0212<<14 | 0x36<<7 | 0x2A, + 33469 - 19968: jis0208<<14 | 0x11<<7 | 0x49, + 33470 - 19968: jis0212<<14 | 0x36<<7 | 0x2B, + 33471 - 19968: jis0212<<14 | 0x36<<7 | 0x2C, + 33477 - 19968: jis0208<<14 | 0x13<<7 | 0x02, + 33478 - 19968: jis0212<<14 | 0x36<<7 | 0x2D, + 33488 - 19968: jis0212<<14 | 0x36<<7 | 0x2E, + 33489 - 19968: jis0208<<14 | 0x10<<7 | 0x50, + 33490 - 19968: jis0208<<14 | 0x46<<7 | 0x51, + 33491 - 19968: jis0208<<14 | 0x2D<<7 | 0x49, + 33492 - 19968: jis0208<<14 | 0x21<<7 | 0x3C, + 33493 - 19968: jis0212<<14 | 0x36<<7 | 0x2F, + 33495 - 19968: jis0208<<14 | 0x28<<7 | 0x23, + 33497 - 19968: jis0208<<14 | 0x46<<7 | 0x5D, + 33498 - 19968: jis0212<<14 | 0x36<<7 | 0x30, + 33499 - 19968: jis0208<<14 | 0x11<<7 | 0x36, + 33500 - 19968: jis0208<<14 | 0x46<<7 | 0x5B, + 33502 - 19968: jis0208<<14 | 0x46<<7 | 0x59, + 33503 - 19968: jis0208<<14 | 0x46<<7 | 0x50, + 33504 - 19968: jis0212<<14 | 0x36<<7 | 0x31, + 33505 - 19968: jis0208<<14 | 0x46<<7 | 0x4E, + 33506 - 19968: jis0212<<14 | 0x36<<7 | 0x32, + 33507 - 19968: jis0208<<14 | 0x46<<7 | 0x4F, + 33508 - 19968: jis0212<<14 | 0x36<<7 | 0x33, + 33509 - 19968: jis0208<<14 | 0x1B<<7 | 0x42, + 33510 - 19968: jis0208<<14 | 0x15<<7 | 0x4B, + 33511 - 19968: jis0208<<14 | 0x22<<7 | 0x56, + 33512 - 19968: jis0212<<14 | 0x36<<7 | 0x34, + 33514 - 19968: jis0212<<14 | 0x36<<7 | 0x35, + 33515 - 19968: jis0208<<14 | 0x25<<7 | 0x30, + 33517 - 19968: jis0212<<14 | 0x36<<7 | 0x36, + 33519 - 19968: jis0212<<14 | 0x36<<7 | 0x37, + 33521 - 19968: jis0208<<14 | 0x10<<7 | 0x30, + 33523 - 19968: jis0208<<14 | 0x46<<7 | 0x53, + 33524 - 19968: jis0208<<14 | 0x46<<7 | 0x52, + 33526 - 19968: jis0212<<14 | 0x36<<7 | 0x38, + 33527 - 19968: jis0212<<14 | 0x36<<7 | 0x39, + 33529 - 19968: jis0208<<14 | 0x46<<7 | 0x58, + 33530 - 19968: jis0208<<14 | 0x46<<7 | 0x54, + 33531 - 19968: jis0208<<14 | 0x46<<7 | 0x57, + 33533 - 19968: jis0212<<14 | 0x36<<7 | 0x3A, + 33534 - 19968: jis0212<<14 | 0x36<<7 | 0x3B, + 33536 - 19968: jis0212<<14 | 0x36<<7 | 0x3C, + 33537 - 19968: jis0208<<14 | 0x5A<<7 | 0x36, + 33538 - 19968: jis0208<<14 | 0x2B<<7 | 0x2F, + 33539 - 19968: jis0208<<14 | 0x46<<7 | 0x56, + 33540 - 19968: jis0208<<14 | 0x11<<7 | 0x37, + 33541 - 19968: jis0208<<14 | 0x12<<7 | 0x5C, + 33542 - 19968: jis0208<<14 | 0x46<<7 | 0x5A, + 33543 - 19968: jis0212<<14 | 0x36<<7 | 0x3E, + 33544 - 19968: jis0212<<14 | 0x36<<7 | 0x3F, + 33545 - 19968: jis0208<<14 | 0x46<<7 | 0x5C, + 33546 - 19968: jis0212<<14 | 0x36<<7 | 0x40, + 33547 - 19968: jis0212<<14 | 0x36<<7 | 0x41, + 33550 - 19968: jis0208<<14 | 0x16<<7 | 0x33, + 33558 - 19968: jis0208<<14 | 0x47<<7 | 0x02, + 33559 - 19968: jis0208<<14 | 0x47<<7 | 0x0B, + 33560 - 19968: jis0208<<14 | 0x47<<7 | 0x0C, + 33563 - 19968: jis0212<<14 | 0x36<<7 | 0x43, + 33564 - 19968: jis0208<<14 | 0x0F<<7 | 0x0A, + 33565 - 19968: jis0212<<14 | 0x36<<7 | 0x44, + 33566 - 19968: jis0212<<14 | 0x36<<7 | 0x45, + 33567 - 19968: jis0212<<14 | 0x36<<7 | 0x46, + 33569 - 19968: jis0212<<14 | 0x36<<7 | 0x47, + 33570 - 19968: jis0212<<14 | 0x36<<7 | 0x48, + 33571 - 19968: jis0208<<14 | 0x47<<7 | 0x13, + 33576 - 19968: jis0208<<14 | 0x0F<<7 | 0x50, + 33579 - 19968: jis0208<<14 | 0x47<<7 | 0x0A, + 33580 - 19968: jis0212<<14 | 0x36<<7 | 0x49, + 33581 - 19968: jis0212<<14 | 0x36<<7 | 0x4A, + 33582 - 19968: jis0212<<14 | 0x36<<7 | 0x4B, + 33583 - 19968: jis0208<<14 | 0x47<<7 | 0x09, + 33584 - 19968: jis0212<<14 | 0x36<<7 | 0x4C, + 33585 - 19968: jis0208<<14 | 0x47<<7 | 0x04, + 33586 - 19968: jis0208<<14 | 0x47<<7 | 0x03, + 33587 - 19968: jis0212<<14 | 0x36<<7 | 0x4D, + 33588 - 19968: jis0208<<14 | 0x47<<7 | 0x01, + 33589 - 19968: jis0208<<14 | 0x47<<7 | 0x00, + 33590 - 19968: jis0208<<14 | 0x22<<7 | 0x42, + 33591 - 19968: jis0212<<14 | 0x36<<7 | 0x4E, + 33592 - 19968: jis0208<<14 | 0x21<<7 | 0x5A, + 33593 - 19968: jis0208<<14 | 0x47<<7 | 0x06, + 33594 - 19968: jis0212<<14 | 0x36<<7 | 0x4F, + 33596 - 19968: jis0212<<14 | 0x36<<7 | 0x50, + 33597 - 19968: jis0212<<14 | 0x36<<7 | 0x51, + 33600 - 19968: jis0208<<14 | 0x47<<7 | 0x05, + 33602 - 19968: jis0212<<14 | 0x36<<7 | 0x52, + 33603 - 19968: jis0212<<14 | 0x36<<7 | 0x53, + 33604 - 19968: jis0212<<14 | 0x36<<7 | 0x54, + 33605 - 19968: jis0208<<14 | 0x47<<7 | 0x08, + 33607 - 19968: jis0212<<14 | 0x36<<7 | 0x55, + 33609 - 19968: jis0208<<14 | 0x20<<7 | 0x4F, + 33610 - 19968: jis0208<<14 | 0x16<<7 | 0x34, + 33613 - 19968: jis0212<<14 | 0x36<<7 | 0x56, + 33614 - 19968: jis0212<<14 | 0x36<<7 | 0x57, + 33615 - 19968: jis0208<<14 | 0x10<<7 | 0x20, + 33616 - 19968: jis0208<<14 | 0x47<<7 | 0x07, + 33617 - 19968: jis0212<<14 | 0x36<<7 | 0x58, + 33618 - 19968: jis0208<<14 | 0x18<<7 | 0x32, + 33619 - 19968: jis0212<<14 | 0x37<<7 | 0x1D, + 33620 - 19968: jis0212<<14 | 0x36<<7 | 0x42, + 33621 - 19968: jis0212<<14 | 0x36<<7 | 0x59, + 33622 - 19968: jis0212<<14 | 0x36<<7 | 0x5A, + 33623 - 19968: jis0212<<14 | 0x36<<7 | 0x5B, + 33624 - 19968: jis0208<<14 | 0x20<<7 | 0x50, + 33634 - 19968: jis0208<<14 | 0x5A<<7 | 0x37, + 33648 - 19968: jis0212<<14 | 0x36<<7 | 0x5C, + 33651 - 19968: jis0208<<14 | 0x47<<7 | 0x19, + 33653 - 19968: jis0208<<14 | 0x47<<7 | 0x1A, + 33655 - 19968: jis0208<<14 | 0x11<<7 | 0x38, + 33656 - 19968: jis0212<<14 | 0x36<<7 | 0x5D, + 33659 - 19968: jis0208<<14 | 0x11<<7 | 0x0D, + 33660 - 19968: jis0208<<14 | 0x47<<7 | 0x17, + 33661 - 19968: jis0212<<14 | 0x37<<7 | 0x00, + 33663 - 19968: jis0208<<14 | 0x5A<<7 | 0x38, + 33664 - 19968: jis0212<<14 | 0x37<<7 | 0x02, + 33666 - 19968: jis0212<<14 | 0x37<<7 | 0x03, + 33668 - 19968: jis0212<<14 | 0x37<<7 | 0x04, + 33669 - 19968: jis0208<<14 | 0x47<<7 | 0x0D, + 33670 - 19968: jis0212<<14 | 0x37<<7 | 0x05, + 33671 - 19968: jis0208<<14 | 0x47<<7 | 0x15, + 33673 - 19968: jis0208<<14 | 0x47<<7 | 0x1C, + 33674 - 19968: jis0208<<14 | 0x47<<7 | 0x16, + 33677 - 19968: jis0212<<14 | 0x37<<7 | 0x06, + 33678 - 19968: jis0208<<14 | 0x47<<7 | 0x14, + 33682 - 19968: jis0212<<14 | 0x37<<7 | 0x07, + 33683 - 19968: jis0208<<14 | 0x46<<7 | 0x55, + 33684 - 19968: jis0212<<14 | 0x37<<7 | 0x08, + 33685 - 19968: jis0212<<14 | 0x37<<7 | 0x09, + 33686 - 19968: jis0208<<14 | 0x47<<7 | 0x12, + 33688 - 19968: jis0212<<14 | 0x37<<7 | 0x0A, + 33689 - 19968: jis0212<<14 | 0x37<<7 | 0x0B, + 33690 - 19968: jis0208<<14 | 0x47<<7 | 0x0E, + 33691 - 19968: jis0212<<14 | 0x37<<7 | 0x0C, + 33692 - 19968: jis0212<<14 | 0x37<<7 | 0x0D, + 33693 - 19968: jis0212<<14 | 0x37<<7 | 0x0E, + 33694 - 19968: jis0208<<14 | 0x13<<7 | 0x2F, + 33695 - 19968: jis0208<<14 | 0x47<<7 | 0x10, + 33696 - 19968: jis0208<<14 | 0x47<<7 | 0x1B, + 33698 - 19968: jis0208<<14 | 0x47<<7 | 0x11, + 33702 - 19968: jis0212<<14 | 0x37<<7 | 0x0F, + 33703 - 19968: jis0212<<14 | 0x37<<7 | 0x10, + 33704 - 19968: jis0208<<14 | 0x47<<7 | 0x1D, + 33705 - 19968: jis0212<<14 | 0x37<<7 | 0x11, + 33706 - 19968: jis0208<<14 | 0x47<<7 | 0x0F, + 33707 - 19968: jis0208<<14 | 0x26<<7 | 0x5B, + 33708 - 19968: jis0212<<14 | 0x37<<7 | 0x12, + 33709 - 19968: jis0212<<14 | 0x37<<7 | 0x2B, + 33713 - 19968: jis0208<<14 | 0x2C<<7 | 0x48, + 33717 - 19968: jis0208<<14 | 0x47<<7 | 0x18, + 33725 - 19968: jis0208<<14 | 0x47<<7 | 0x2E, + 33726 - 19968: jis0212<<14 | 0x37<<7 | 0x13, + 33727 - 19968: jis0212<<14 | 0x37<<7 | 0x14, + 33728 - 19968: jis0212<<14 | 0x37<<7 | 0x15, + 33729 - 19968: jis0208<<14 | 0x47<<7 | 0x26, + 33733 - 19968: jis0208<<14 | 0x1E<<7 | 0x5A, + 33735 - 19968: jis0208<<14 | 0x5A<<7 | 0x39, + 33737 - 19968: jis0212<<14 | 0x37<<7 | 0x17, + 33738 - 19968: jis0208<<14 | 0x14<<7 | 0x25, + 33740 - 19968: jis0208<<14 | 0x15<<7 | 0x3C, + 33742 - 19968: jis0208<<14 | 0x47<<7 | 0x21, + 33743 - 19968: jis0212<<14 | 0x37<<7 | 0x18, + 33744 - 19968: jis0212<<14 | 0x37<<7 | 0x19, + 33745 - 19968: jis0212<<14 | 0x37<<7 | 0x1A, + 33747 - 19968: jis0208<<14 | 0x11<<7 | 0x3A, + 33748 - 19968: jis0212<<14 | 0x37<<7 | 0x1B, + 33750 - 19968: jis0208<<14 | 0x1D<<7 | 0x33, + 33752 - 19968: jis0208<<14 | 0x47<<7 | 0x24, + 33756 - 19968: jis0208<<14 | 0x19<<7 | 0x39, + 33757 - 19968: jis0212<<14 | 0x37<<7 | 0x1C, + 33759 - 19968: jis0208<<14 | 0x24<<7 | 0x30, + 33760 - 19968: jis0208<<14 | 0x47<<7 | 0x29, + 33768 - 19968: jis0212<<14 | 0x37<<7 | 0x1E, + 33769 - 19968: jis0208<<14 | 0x29<<7 | 0x4D, + 33770 - 19968: jis0212<<14 | 0x37<<7 | 0x1F, + 33771 - 19968: jis0208<<14 | 0x47<<7 | 0x20, + 33775 - 19968: jis0208<<14 | 0x11<<7 | 0x39, + 33776 - 19968: jis0208<<14 | 0x17<<7 | 0x35, + 33777 - 19968: jis0208<<14 | 0x28<<7 | 0x08, + 33778 - 19968: jis0208<<14 | 0x47<<7 | 0x2A, + 33780 - 19968: jis0208<<14 | 0x47<<7 | 0x1E, + 33782 - 19968: jis0208<<14 | 0x5A<<7 | 0x3A, + 33783 - 19968: jis0208<<14 | 0x47<<7 | 0x27, + 33784 - 19968: jis0212<<14 | 0x37<<7 | 0x21, + 33785 - 19968: jis0212<<14 | 0x37<<7 | 0x22, + 33787 - 19968: jis0208<<14 | 0x47<<7 | 0x31, + 33788 - 19968: jis0212<<14 | 0x37<<7 | 0x23, + 33789 - 19968: jis0208<<14 | 0x47<<7 | 0x22, + 33793 - 19968: jis0212<<14 | 0x37<<7 | 0x24, + 33795 - 19968: jis0208<<14 | 0x47<<7 | 0x23, + 33796 - 19968: jis0208<<14 | 0x25<<7 | 0x19, + 33798 - 19968: jis0212<<14 | 0x37<<7 | 0x25, + 33799 - 19968: jis0208<<14 | 0x47<<7 | 0x28, + 33802 - 19968: jis0212<<14 | 0x37<<7 | 0x26, + 33803 - 19968: jis0208<<14 | 0x47<<7 | 0x25, + 33804 - 19968: jis0208<<14 | 0x2A<<7 | 0x07, + 33805 - 19968: jis0208<<14 | 0x47<<7 | 0x2B, + 33806 - 19968: jis0208<<14 | 0x0F<<7 | 0x3F, + 33807 - 19968: jis0212<<14 | 0x37<<7 | 0x27, + 33809 - 19968: jis0212<<14 | 0x37<<7 | 0x28, + 33811 - 19968: jis0208<<14 | 0x47<<7 | 0x1F, + 33813 - 19968: jis0212<<14 | 0x37<<7 | 0x29, + 33817 - 19968: jis0212<<14 | 0x37<<7 | 0x2A, + 33824 - 19968: jis0208<<14 | 0x47<<7 | 0x2D, + 33826 - 19968: jis0208<<14 | 0x47<<7 | 0x2C, + 33833 - 19968: jis0208<<14 | 0x26<<7 | 0x4A, + 33834 - 19968: jis0208<<14 | 0x47<<7 | 0x33, + 33836 - 19968: jis0208<<14 | 0x47<<7 | 0x3E, + 33839 - 19968: jis0212<<14 | 0x37<<7 | 0x2C, + 33841 - 19968: jis0208<<14 | 0x12<<7 | 0x5D, + 33845 - 19968: jis0208<<14 | 0x47<<7 | 0x41, + 33848 - 19968: jis0208<<14 | 0x47<<7 | 0x2F, + 33849 - 19968: jis0212<<14 | 0x37<<7 | 0x2D, + 33852 - 19968: jis0208<<14 | 0x47<<7 | 0x34, + 33853 - 19968: jis0208<<14 | 0x2C<<7 | 0x4D, + 33861 - 19968: jis0212<<14 | 0x37<<7 | 0x2E, + 33862 - 19968: jis0208<<14 | 0x47<<7 | 0x3D, + 33863 - 19968: jis0212<<14 | 0x37<<7 | 0x2F, + 33864 - 19968: jis0208<<14 | 0x5A<<7 | 0x3B, + 33865 - 19968: jis0208<<14 | 0x2C<<7 | 0x34, + 33866 - 19968: jis0212<<14 | 0x37<<7 | 0x31, + 33869 - 19968: jis0212<<14 | 0x37<<7 | 0x32, + 33870 - 19968: jis0208<<14 | 0x2D<<7 | 0x09, + 33871 - 19968: jis0212<<14 | 0x37<<7 | 0x33, + 33873 - 19968: jis0212<<14 | 0x37<<7 | 0x34, + 33874 - 19968: jis0212<<14 | 0x37<<7 | 0x35, + 33878 - 19968: jis0212<<14 | 0x37<<7 | 0x36, + 33879 - 19968: jis0208<<14 | 0x22<<7 | 0x57, + 33880 - 19968: jis0212<<14 | 0x37<<7 | 0x37, + 33881 - 19968: jis0212<<14 | 0x37<<7 | 0x38, + 33882 - 19968: jis0212<<14 | 0x37<<7 | 0x39, + 33883 - 19968: jis0208<<14 | 0x12<<7 | 0x4A, + 33884 - 19968: jis0212<<14 | 0x37<<7 | 0x3A, + 33888 - 19968: jis0212<<14 | 0x37<<7 | 0x3B, + 33889 - 19968: jis0208<<14 | 0x28<<7 | 0x51, + 33890 - 19968: jis0208<<14 | 0x47<<7 | 0x43, + 33891 - 19968: jis0208<<14 | 0x25<<7 | 0x00, + 33892 - 19968: jis0212<<14 | 0x37<<7 | 0x3C, + 33893 - 19968: jis0212<<14 | 0x37<<7 | 0x3D, + 33894 - 19968: jis0208<<14 | 0x0F<<7 | 0x10, + 33895 - 19968: jis0212<<14 | 0x37<<7 | 0x3E, + 33897 - 19968: jis0208<<14 | 0x47<<7 | 0x3C, + 33898 - 19968: jis0212<<14 | 0x37<<7 | 0x3F, + 33899 - 19968: jis0208<<14 | 0x47<<7 | 0x38, + 33900 - 19968: jis0208<<14 | 0x20<<7 | 0x51, + 33901 - 19968: jis0208<<14 | 0x47<<7 | 0x32, + 33902 - 19968: jis0208<<14 | 0x47<<7 | 0x3A, + 33903 - 19968: jis0208<<14 | 0x47<<7 | 0x3F, + 33904 - 19968: jis0212<<14 | 0x37<<7 | 0x40, + 33905 - 19968: jis0208<<14 | 0x26<<7 | 0x0B, + 33907 - 19968: jis0212<<14 | 0x37<<7 | 0x41, + 33908 - 19968: jis0212<<14 | 0x37<<7 | 0x42, + 33909 - 19968: jis0208<<14 | 0x0F<<7 | 0x09, + 33910 - 19968: jis0212<<14 | 0x37<<7 | 0x43, + 33911 - 19968: jis0208<<14 | 0x47<<7 | 0x37, + 33912 - 19968: jis0212<<14 | 0x37<<7 | 0x44, + 33913 - 19968: jis0208<<14 | 0x47<<7 | 0x40, + 33914 - 19968: jis0208<<14 | 0x28<<7 | 0x57, + 33916 - 19968: jis0212<<14 | 0x37<<7 | 0x45, + 33917 - 19968: jis0212<<14 | 0x37<<7 | 0x46, + 33921 - 19968: jis0212<<14 | 0x37<<7 | 0x47, + 33922 - 19968: jis0208<<14 | 0x47<<7 | 0x3B, + 33924 - 19968: jis0208<<14 | 0x47<<7 | 0x36, + 33925 - 19968: jis0212<<14 | 0x37<<7 | 0x48, + 33931 - 19968: jis0208<<14 | 0x1D<<7 | 0x34, + 33936 - 19968: jis0208<<14 | 0x1C<<7 | 0x0E, + 33938 - 19968: jis0212<<14 | 0x37<<7 | 0x49, + 33939 - 19968: jis0212<<14 | 0x37<<7 | 0x4A, + 33940 - 19968: jis0208<<14 | 0x1B<<7 | 0x0B, + 33941 - 19968: jis0212<<14 | 0x37<<7 | 0x4B, + 33945 - 19968: jis0208<<14 | 0x2B<<7 | 0x37, + 33948 - 19968: jis0208<<14 | 0x28<<7 | 0x26, + 33950 - 19968: jis0212<<14 | 0x37<<7 | 0x4C, + 33951 - 19968: jis0208<<14 | 0x47<<7 | 0x46, + 33953 - 19968: jis0208<<14 | 0x47<<7 | 0x4F, + 33958 - 19968: jis0212<<14 | 0x37<<7 | 0x4D, + 33960 - 19968: jis0212<<14 | 0x37<<7 | 0x4E, + 33961 - 19968: jis0212<<14 | 0x37<<7 | 0x4F, + 33962 - 19968: jis0212<<14 | 0x37<<7 | 0x50, + 33965 - 19968: jis0208<<14 | 0x47<<7 | 0x39, + 33967 - 19968: jis0212<<14 | 0x37<<7 | 0x51, + 33969 - 19968: jis0212<<14 | 0x37<<7 | 0x52, + 33970 - 19968: jis0208<<14 | 0x12<<7 | 0x56, + 33972 - 19968: jis0208<<14 | 0x5A<<7 | 0x3C, + 33976 - 19968: jis0208<<14 | 0x1D<<7 | 0x57, + 33977 - 19968: jis0208<<14 | 0x47<<7 | 0x44, + 33978 - 19968: jis0212<<14 | 0x37<<7 | 0x54, + 33979 - 19968: jis0208<<14 | 0x47<<7 | 0x49, + 33980 - 19968: jis0208<<14 | 0x20<<7 | 0x52, + 33981 - 19968: jis0212<<14 | 0x37<<7 | 0x55, + 33982 - 19968: jis0212<<14 | 0x37<<7 | 0x56, + 33983 - 19968: jis0208<<14 | 0x47<<7 | 0x45, + 33984 - 19968: jis0212<<14 | 0x37<<7 | 0x57, + 33985 - 19968: jis0208<<14 | 0x47<<7 | 0x4C, + 33986 - 19968: jis0212<<14 | 0x37<<7 | 0x58, + 33988 - 19968: jis0208<<14 | 0x22<<7 | 0x3E, + 33990 - 19968: jis0208<<14 | 0x47<<7 | 0x4D, + 33991 - 19968: jis0212<<14 | 0x37<<7 | 0x59, + 33992 - 19968: jis0212<<14 | 0x37<<7 | 0x5A, + 33993 - 19968: jis0208<<14 | 0x2C<<7 | 0x35, + 33994 - 19968: jis0208<<14 | 0x47<<7 | 0x42, + 33995 - 19968: jis0208<<14 | 0x12<<7 | 0x17, + 33996 - 19968: jis0212<<14 | 0x37<<7 | 0x5B, + 33997 - 19968: jis0208<<14 | 0x47<<7 | 0x48, + 33999 - 19968: jis0212<<14 | 0x37<<7 | 0x5C, + 34000 - 19968: jis0208<<14 | 0x47<<7 | 0x4B, + 34001 - 19968: jis0208<<14 | 0x2B<<7 | 0x0B, + 34003 - 19968: jis0212<<14 | 0x37<<7 | 0x5D, + 34006 - 19968: jis0208<<14 | 0x47<<7 | 0x4E, + 34009 - 19968: jis0208<<14 | 0x47<<7 | 0x47, + 34010 - 19968: jis0208<<14 | 0x47<<7 | 0x4A, + 34012 - 19968: jis0208<<14 | 0x58<<7 | 0x04, + 34023 - 19968: jis0212<<14 | 0x38<<7 | 0x01, + 34026 - 19968: jis0212<<14 | 0x38<<7 | 0x02, + 34028 - 19968: jis0208<<14 | 0x2A<<7 | 0x08, + 34030 - 19968: jis0208<<14 | 0x2E<<7 | 0x00, + 34031 - 19968: jis0212<<14 | 0x38<<7 | 0x03, + 34032 - 19968: jis0212<<14 | 0x38<<7 | 0x04, + 34033 - 19968: jis0212<<14 | 0x38<<7 | 0x05, + 34034 - 19968: jis0212<<14 | 0x38<<7 | 0x06, + 34036 - 19968: jis0208<<14 | 0x47<<7 | 0x52, + 34039 - 19968: jis0212<<14 | 0x38<<7 | 0x07, + 34042 - 19968: jis0212<<14 | 0x38<<7 | 0x09, + 34043 - 19968: jis0212<<14 | 0x38<<7 | 0x0A, + 34044 - 19968: jis0208<<14 | 0x47<<7 | 0x59, + 34045 - 19968: jis0212<<14 | 0x38<<7 | 0x0B, + 34047 - 19968: jis0208<<14 | 0x47<<7 | 0x51, + 34048 - 19968: jis0208<<14 | 0x1B<<7 | 0x22, + 34050 - 19968: jis0212<<14 | 0x38<<7 | 0x0C, + 34051 - 19968: jis0212<<14 | 0x38<<7 | 0x0D, + 34054 - 19968: jis0208<<14 | 0x47<<7 | 0x30, + 34055 - 19968: jis0212<<14 | 0x38<<7 | 0x0E, + 34060 - 19968: jis0212<<14 | 0x38<<7 | 0x0F, + 34062 - 19968: jis0212<<14 | 0x38<<7 | 0x10, + 34064 - 19968: jis0212<<14 | 0x38<<7 | 0x11, + 34065 - 19968: jis0208<<14 | 0x29<<7 | 0x2D, + 34067 - 19968: jis0208<<14 | 0x2B<<7 | 0x01, + 34068 - 19968: jis0208<<14 | 0x47<<7 | 0x58, + 34069 - 19968: jis0208<<14 | 0x47<<7 | 0x57, + 34071 - 19968: jis0208<<14 | 0x47<<7 | 0x53, + 34072 - 19968: jis0208<<14 | 0x47<<7 | 0x54, + 34074 - 19968: jis0208<<14 | 0x10<<7 | 0x15, + 34076 - 19968: jis0212<<14 | 0x38<<7 | 0x12, + 34078 - 19968: jis0212<<14 | 0x38<<7 | 0x13, + 34079 - 19968: jis0208<<14 | 0x47<<7 | 0x56, + 34081 - 19968: jis0208<<14 | 0x47<<7 | 0x50, + 34082 - 19968: jis0212<<14 | 0x38<<7 | 0x14, + 34083 - 19968: jis0212<<14 | 0x38<<7 | 0x15, + 34084 - 19968: jis0212<<14 | 0x38<<7 | 0x16, + 34085 - 19968: jis0212<<14 | 0x38<<7 | 0x17, + 34086 - 19968: jis0208<<14 | 0x23<<7 | 0x34, + 34087 - 19968: jis0212<<14 | 0x38<<7 | 0x18, + 34090 - 19968: jis0212<<14 | 0x38<<7 | 0x19, + 34091 - 19968: jis0212<<14 | 0x38<<7 | 0x1A, + 34092 - 19968: jis0208<<14 | 0x47<<7 | 0x55, + 34093 - 19968: jis0208<<14 | 0x0F<<7 | 0x5D, + 34095 - 19968: jis0212<<14 | 0x38<<7 | 0x1B, + 34098 - 19968: jis0212<<14 | 0x38<<7 | 0x08, + 34099 - 19968: jis0212<<14 | 0x38<<7 | 0x1C, + 34100 - 19968: jis0212<<14 | 0x38<<7 | 0x1D, + 34101 - 19968: jis0208<<14 | 0x21<<7 | 0x01, + 34102 - 19968: jis0212<<14 | 0x38<<7 | 0x1E, + 34109 - 19968: jis0208<<14 | 0x29<<7 | 0x22, + 34111 - 19968: jis0212<<14 | 0x38<<7 | 0x1F, + 34112 - 19968: jis0208<<14 | 0x47<<7 | 0x5A, + 34113 - 19968: jis0208<<14 | 0x48<<7 | 0x00, + 34115 - 19968: jis0208<<14 | 0x27<<7 | 0x38, + 34118 - 19968: jis0212<<14 | 0x38<<7 | 0x20, + 34120 - 19968: jis0208<<14 | 0x47<<7 | 0x5D, + 34121 - 19968: jis0208<<14 | 0x1D<<7 | 0x35, + 34122 - 19968: jis0208<<14 | 0x1B<<7 | 0x28, + 34123 - 19968: jis0208<<14 | 0x48<<7 | 0x02, + 34126 - 19968: jis0208<<14 | 0x15<<7 | 0x1D, + 34127 - 19968: jis0212<<14 | 0x38<<7 | 0x21, + 34128 - 19968: jis0212<<14 | 0x38<<7 | 0x22, + 34129 - 19968: jis0212<<14 | 0x38<<7 | 0x23, + 34130 - 19968: jis0212<<14 | 0x38<<7 | 0x24, + 34131 - 19968: jis0208<<14 | 0x5A<<7 | 0x3D, + 34133 - 19968: jis0208<<14 | 0x48<<7 | 0x03, + 34134 - 19968: jis0212<<14 | 0x38<<7 | 0x26, + 34135 - 19968: jis0208<<14 | 0x28<<7 | 0x58, + 34136 - 19968: jis0208<<14 | 0x47<<7 | 0x5C, + 34137 - 19968: jis0208<<14 | 0x5A<<7 | 0x3E, + 34138 - 19968: jis0208<<14 | 0x47<<7 | 0x35, + 34140 - 19968: jis0212<<14 | 0x38<<7 | 0x28, + 34141 - 19968: jis0212<<14 | 0x38<<7 | 0x29, + 34142 - 19968: jis0212<<14 | 0x38<<7 | 0x2A, + 34143 - 19968: jis0212<<14 | 0x38<<7 | 0x2B, + 34144 - 19968: jis0212<<14 | 0x38<<7 | 0x2C, + 34145 - 19968: jis0212<<14 | 0x38<<7 | 0x2D, + 34146 - 19968: jis0212<<14 | 0x38<<7 | 0x2E, + 34147 - 19968: jis0208<<14 | 0x47<<7 | 0x5B, + 34148 - 19968: jis0212<<14 | 0x38<<7 | 0x2F, + 34152 - 19968: jis0208<<14 | 0x2E<<7 | 0x2E, + 34153 - 19968: jis0208<<14 | 0x25<<7 | 0x01, + 34154 - 19968: jis0208<<14 | 0x28<<7 | 0x52, + 34155 - 19968: jis0208<<14 | 0x5A<<7 | 0x3F, + 34157 - 19968: jis0208<<14 | 0x48<<7 | 0x0A, + 34159 - 19968: jis0212<<14 | 0x38<<7 | 0x31, + 34167 - 19968: jis0208<<14 | 0x48<<7 | 0x10, + 34169 - 19968: jis0212<<14 | 0x38<<7 | 0x32, + 34170 - 19968: jis0212<<14 | 0x38<<7 | 0x33, + 34171 - 19968: jis0212<<14 | 0x38<<7 | 0x34, + 34173 - 19968: jis0212<<14 | 0x38<<7 | 0x35, + 34174 - 19968: jis0208<<14 | 0x48<<7 | 0x11, + 34175 - 19968: jis0212<<14 | 0x38<<7 | 0x36, + 34176 - 19968: jis0208<<14 | 0x48<<7 | 0x04, + 34177 - 19968: jis0212<<14 | 0x38<<7 | 0x37, + 34180 - 19968: jis0208<<14 | 0x26<<7 | 0x55, + 34181 - 19968: jis0212<<14 | 0x38<<7 | 0x38, + 34182 - 19968: jis0212<<14 | 0x38<<7 | 0x39, + 34183 - 19968: jis0208<<14 | 0x48<<7 | 0x0E, + 34184 - 19968: jis0208<<14 | 0x48<<7 | 0x06, + 34185 - 19968: jis0212<<14 | 0x38<<7 | 0x3A, + 34186 - 19968: jis0208<<14 | 0x48<<7 | 0x08, + 34187 - 19968: jis0212<<14 | 0x38<<7 | 0x3B, + 34188 - 19968: jis0212<<14 | 0x38<<7 | 0x3C, + 34191 - 19968: jis0212<<14 | 0x38<<7 | 0x3D, + 34192 - 19968: jis0208<<14 | 0x48<<7 | 0x12, + 34193 - 19968: jis0208<<14 | 0x48<<7 | 0x07, + 34195 - 19968: jis0212<<14 | 0x38<<7 | 0x3E, + 34196 - 19968: jis0208<<14 | 0x48<<7 | 0x0B, + 34199 - 19968: jis0208<<14 | 0x10<<7 | 0x51, + 34200 - 19968: jis0212<<14 | 0x38<<7 | 0x3F, + 34201 - 19968: jis0208<<14 | 0x25<<7 | 0x44, + 34203 - 19968: jis0208<<14 | 0x48<<7 | 0x0C, + 34204 - 19968: jis0208<<14 | 0x48<<7 | 0x0F, + 34205 - 19968: jis0212<<14 | 0x38<<7 | 0x40, + 34207 - 19968: jis0212<<14 | 0x38<<7 | 0x41, + 34208 - 19968: jis0212<<14 | 0x38<<7 | 0x42, + 34210 - 19968: jis0212<<14 | 0x38<<7 | 0x43, + 34212 - 19968: jis0208<<14 | 0x48<<7 | 0x05, + 34213 - 19968: jis0212<<14 | 0x38<<7 | 0x44, + 34214 - 19968: jis0208<<14 | 0x20<<7 | 0x05, + 34215 - 19968: jis0212<<14 | 0x38<<7 | 0x45, + 34216 - 19968: jis0208<<14 | 0x48<<7 | 0x09, + 34217 - 19968: jis0208<<14 | 0x1A<<7 | 0x06, + 34218 - 19968: jis0208<<14 | 0x1E<<7 | 0x24, + 34219 - 19968: jis0208<<14 | 0x16<<7 | 0x0F, + 34220 - 19968: jis0208<<14 | 0x2B<<7 | 0x53, + 34221 - 19968: jis0212<<14 | 0x38<<7 | 0x53, + 34222 - 19968: jis0208<<14 | 0x2B<<7 | 0x58, + 34223 - 19968: jis0208<<14 | 0x1C<<7 | 0x51, + 34224 - 19968: jis0208<<14 | 0x5A<<7 | 0x41, + 34228 - 19968: jis0212<<14 | 0x38<<7 | 0x46, + 34230 - 19968: jis0212<<14 | 0x38<<7 | 0x47, + 34231 - 19968: jis0212<<14 | 0x38<<7 | 0x48, + 34232 - 19968: jis0212<<14 | 0x38<<7 | 0x49, + 34233 - 19968: jis0208<<14 | 0x48<<7 | 0x16, + 34234 - 19968: jis0208<<14 | 0x48<<7 | 0x14, + 34236 - 19968: jis0212<<14 | 0x38<<7 | 0x4A, + 34237 - 19968: jis0212<<14 | 0x38<<7 | 0x4B, + 34238 - 19968: jis0212<<14 | 0x38<<7 | 0x4C, + 34239 - 19968: jis0212<<14 | 0x38<<7 | 0x4D, + 34241 - 19968: jis0208<<14 | 0x2E<<7 | 0x2D, + 34242 - 19968: jis0212<<14 | 0x38<<7 | 0x4E, + 34247 - 19968: jis0212<<14 | 0x38<<7 | 0x4F, + 34249 - 19968: jis0208<<14 | 0x48<<7 | 0x13, + 34250 - 19968: jis0212<<14 | 0x38<<7 | 0x50, + 34251 - 19968: jis0212<<14 | 0x38<<7 | 0x51, + 34253 - 19968: jis0208<<14 | 0x2C<<7 | 0x54, + 34254 - 19968: jis0212<<14 | 0x38<<7 | 0x52, + 34255 - 19968: jis0208<<14 | 0x48<<7 | 0x15, + 34256 - 19968: jis0208<<14 | 0x48<<7 | 0x17, + 34261 - 19968: jis0208<<14 | 0x48<<7 | 0x18, + 34264 - 19968: jis0212<<14 | 0x38<<7 | 0x54, + 34266 - 19968: jis0212<<14 | 0x38<<7 | 0x55, + 34268 - 19968: jis0208<<14 | 0x48<<7 | 0x1B, + 34269 - 19968: jis0208<<14 | 0x48<<7 | 0x19, + 34271 - 19968: jis0212<<14 | 0x38<<7 | 0x56, + 34272 - 19968: jis0212<<14 | 0x38<<7 | 0x57, + 34276 - 19968: jis0208<<14 | 0x25<<7 | 0x02, + 34277 - 19968: jis0208<<14 | 0x48<<7 | 0x1A, + 34278 - 19968: jis0212<<14 | 0x38<<7 | 0x58, + 34280 - 19968: jis0212<<14 | 0x38<<7 | 0x59, + 34281 - 19968: jis0208<<14 | 0x27<<7 | 0x2C, + 34282 - 19968: jis0208<<14 | 0x48<<7 | 0x0D, + 34285 - 19968: jis0212<<14 | 0x38<<7 | 0x5A, + 34291 - 19968: jis0212<<14 | 0x38<<7 | 0x5B, + 34294 - 19968: jis0212<<14 | 0x38<<7 | 0x5C, + 34295 - 19968: jis0208<<14 | 0x1C<<7 | 0x52, + 34297 - 19968: jis0208<<14 | 0x48<<7 | 0x1C, + 34298 - 19968: jis0208<<14 | 0x48<<7 | 0x21, + 34299 - 19968: jis0208<<14 | 0x20<<7 | 0x53, + 34300 - 19968: jis0212<<14 | 0x38<<7 | 0x5D, + 34302 - 19968: jis0208<<14 | 0x48<<7 | 0x20, + 34303 - 19968: jis0212<<14 | 0x39<<7 | 0x00, + 34304 - 19968: jis0212<<14 | 0x39<<7 | 0x01, + 34306 - 19968: jis0208<<14 | 0x48<<7 | 0x01, + 34308 - 19968: jis0212<<14 | 0x39<<7 | 0x02, + 34309 - 19968: jis0212<<14 | 0x39<<7 | 0x03, + 34310 - 19968: jis0208<<14 | 0x48<<7 | 0x22, + 34311 - 19968: jis0208<<14 | 0x20<<7 | 0x28, + 34314 - 19968: jis0208<<14 | 0x48<<7 | 0x1D, + 34315 - 19968: jis0208<<14 | 0x48<<7 | 0x1F, + 34317 - 19968: jis0212<<14 | 0x39<<7 | 0x04, + 34318 - 19968: jis0212<<14 | 0x39<<7 | 0x05, + 34320 - 19968: jis0212<<14 | 0x39<<7 | 0x06, + 34321 - 19968: jis0212<<14 | 0x39<<7 | 0x07, + 34322 - 19968: jis0212<<14 | 0x39<<7 | 0x08, + 34323 - 19968: jis0208<<14 | 0x48<<7 | 0x1E, + 34326 - 19968: jis0208<<14 | 0x3C<<7 | 0x10, + 34327 - 19968: jis0208<<14 | 0x3C<<7 | 0x01, + 34328 - 19968: jis0212<<14 | 0x39<<7 | 0x09, + 34329 - 19968: jis0212<<14 | 0x39<<7 | 0x0A, + 34330 - 19968: jis0208<<14 | 0x48<<7 | 0x24, + 34331 - 19968: jis0212<<14 | 0x39<<7 | 0x0B, + 34334 - 19968: jis0212<<14 | 0x39<<7 | 0x0C, + 34337 - 19968: jis0212<<14 | 0x39<<7 | 0x0D, + 34338 - 19968: jis0208<<14 | 0x48<<7 | 0x23, + 34343 - 19968: jis0212<<14 | 0x39<<7 | 0x0E, + 34345 - 19968: jis0212<<14 | 0x39<<7 | 0x0F, + 34349 - 19968: jis0208<<14 | 0x2C<<7 | 0x55, + 34351 - 19968: jis0208<<14 | 0x41<<7 | 0x1B, + 34352 - 19968: jis0208<<14 | 0x48<<7 | 0x25, + 34358 - 19968: jis0212<<14 | 0x39<<7 | 0x10, + 34360 - 19968: jis0212<<14 | 0x39<<7 | 0x11, + 34362 - 19968: jis0212<<14 | 0x39<<7 | 0x12, + 34364 - 19968: jis0212<<14 | 0x39<<7 | 0x13, + 34365 - 19968: jis0212<<14 | 0x39<<7 | 0x14, + 34367 - 19968: jis0208<<14 | 0x48<<7 | 0x26, + 34368 - 19968: jis0212<<14 | 0x39<<7 | 0x15, + 34369 - 19968: jis0212<<14 | 0x17<<7 | 0x45, + 34370 - 19968: jis0212<<14 | 0x39<<7 | 0x16, + 34374 - 19968: jis0212<<14 | 0x39<<7 | 0x17, + 34381 - 19968: jis0208<<14 | 0x48<<7 | 0x27, + 34382 - 19968: jis0208<<14 | 0x17<<7 | 0x36, + 34384 - 19968: jis0208<<14 | 0x14<<7 | 0x33, + 34386 - 19968: jis0212<<14 | 0x39<<7 | 0x18, + 34387 - 19968: jis0212<<14 | 0x39<<7 | 0x19, + 34388 - 19968: jis0208<<14 | 0x48<<7 | 0x29, + 34389 - 19968: jis0208<<14 | 0x30<<7 | 0x3C, + 34390 - 19968: jis0212<<14 | 0x39<<7 | 0x1A, + 34391 - 19968: jis0212<<14 | 0x39<<7 | 0x1B, + 34392 - 19968: jis0212<<14 | 0x39<<7 | 0x1C, + 34393 - 19968: jis0212<<14 | 0x39<<7 | 0x1D, + 34394 - 19968: jis0208<<14 | 0x14<<7 | 0x54, + 34396 - 19968: jis0208<<14 | 0x2D<<7 | 0x19, + 34397 - 19968: jis0212<<14 | 0x39<<7 | 0x1E, + 34398 - 19968: jis0208<<14 | 0x15<<7 | 0x52, + 34399 - 19968: jis0208<<14 | 0x48<<7 | 0x2A, + 34400 - 19968: jis0212<<14 | 0x39<<7 | 0x1F, + 34401 - 19968: jis0212<<14 | 0x39<<7 | 0x20, + 34402 - 19968: jis0212<<14 | 0x39<<7 | 0x21, + 34403 - 19968: jis0212<<14 | 0x39<<7 | 0x22, + 34404 - 19968: jis0212<<14 | 0x39<<7 | 0x23, + 34407 - 19968: jis0208<<14 | 0x48<<7 | 0x2B, + 34409 - 19968: jis0212<<14 | 0x39<<7 | 0x24, + 34411 - 19968: jis0208<<14 | 0x22<<7 | 0x4D, + 34412 - 19968: jis0212<<14 | 0x39<<7 | 0x25, + 34415 - 19968: jis0212<<14 | 0x39<<7 | 0x26, + 34417 - 19968: jis0208<<14 | 0x48<<7 | 0x2C, + 34421 - 19968: jis0212<<14 | 0x39<<7 | 0x27, + 34422 - 19968: jis0212<<14 | 0x39<<7 | 0x28, + 34423 - 19968: jis0212<<14 | 0x39<<7 | 0x29, + 34425 - 19968: jis0208<<14 | 0x25<<7 | 0x59, + 34426 - 19968: jis0212<<14 | 0x39<<7 | 0x2A, + 34427 - 19968: jis0208<<14 | 0x0F<<7 | 0x19, + 34440 - 19968: jis0212<<14 | 0x39<<7 | 0x4C, + 34442 - 19968: jis0208<<14 | 0x11<<7 | 0x42, + 34443 - 19968: jis0208<<14 | 0x48<<7 | 0x31, + 34444 - 19968: jis0208<<14 | 0x48<<7 | 0x32, + 34445 - 19968: jis0212<<14 | 0x39<<7 | 0x2B, + 34449 - 19968: jis0212<<14 | 0x39<<7 | 0x2C, + 34451 - 19968: jis0208<<14 | 0x48<<7 | 0x2D, + 34453 - 19968: jis0208<<14 | 0x1A<<7 | 0x1C, + 34454 - 19968: jis0212<<14 | 0x39<<7 | 0x2D, + 34456 - 19968: jis0212<<14 | 0x39<<7 | 0x2E, + 34458 - 19968: jis0212<<14 | 0x39<<7 | 0x2F, + 34460 - 19968: jis0212<<14 | 0x39<<7 | 0x30, + 34465 - 19968: jis0212<<14 | 0x39<<7 | 0x31, + 34467 - 19968: jis0208<<14 | 0x48<<7 | 0x2E, + 34468 - 19968: jis0208<<14 | 0x26<<7 | 0x21, + 34470 - 19968: jis0212<<14 | 0x39<<7 | 0x32, + 34471 - 19968: jis0212<<14 | 0x39<<7 | 0x33, + 34472 - 19968: jis0212<<14 | 0x39<<7 | 0x34, + 34473 - 19968: jis0208<<14 | 0x48<<7 | 0x2F, + 34474 - 19968: jis0208<<14 | 0x48<<7 | 0x30, + 34475 - 19968: jis0208<<14 | 0x48<<7 | 0x3A, + 34477 - 19968: jis0212<<14 | 0x39<<7 | 0x35, + 34479 - 19968: jis0208<<14 | 0x48<<7 | 0x34, + 34480 - 19968: jis0208<<14 | 0x48<<7 | 0x37, + 34481 - 19968: jis0212<<14 | 0x39<<7 | 0x36, + 34483 - 19968: jis0212<<14 | 0x39<<7 | 0x37, + 34484 - 19968: jis0212<<14 | 0x39<<7 | 0x38, + 34485 - 19968: jis0212<<14 | 0x39<<7 | 0x39, + 34486 - 19968: jis0208<<14 | 0x48<<7 | 0x33, + 34487 - 19968: jis0212<<14 | 0x39<<7 | 0x3A, + 34488 - 19968: jis0212<<14 | 0x39<<7 | 0x3B, + 34489 - 19968: jis0212<<14 | 0x39<<7 | 0x3C, + 34495 - 19968: jis0212<<14 | 0x39<<7 | 0x3D, + 34496 - 19968: jis0212<<14 | 0x39<<7 | 0x3E, + 34497 - 19968: jis0212<<14 | 0x39<<7 | 0x3F, + 34499 - 19968: jis0212<<14 | 0x39<<7 | 0x40, + 34500 - 19968: jis0208<<14 | 0x48<<7 | 0x35, + 34501 - 19968: jis0212<<14 | 0x39<<7 | 0x41, + 34502 - 19968: jis0208<<14 | 0x48<<7 | 0x36, + 34503 - 19968: jis0208<<14 | 0x1B<<7 | 0x37, + 34505 - 19968: jis0208<<14 | 0x48<<7 | 0x38, + 34507 - 19968: jis0208<<14 | 0x22<<7 | 0x20, + 34509 - 19968: jis0208<<14 | 0x16<<7 | 0x35, + 34510 - 19968: jis0208<<14 | 0x12<<7 | 0x21, + 34513 - 19968: jis0212<<14 | 0x39<<7 | 0x42, + 34514 - 19968: jis0212<<14 | 0x39<<7 | 0x43, + 34516 - 19968: jis0208<<14 | 0x48<<7 | 0x3B, + 34517 - 19968: jis0212<<14 | 0x39<<7 | 0x44, + 34519 - 19968: jis0212<<14 | 0x39<<7 | 0x45, + 34521 - 19968: jis0208<<14 | 0x12<<7 | 0x1E, + 34522 - 19968: jis0212<<14 | 0x39<<7 | 0x46, + 34523 - 19968: jis0208<<14 | 0x48<<7 | 0x40, + 34524 - 19968: jis0212<<14 | 0x39<<7 | 0x47, + 34526 - 19968: jis0208<<14 | 0x48<<7 | 0x3C, + 34527 - 19968: jis0208<<14 | 0x48<<7 | 0x3F, + 34528 - 19968: jis0212<<14 | 0x39<<7 | 0x48, + 34531 - 19968: jis0212<<14 | 0x39<<7 | 0x49, + 34532 - 19968: jis0208<<14 | 0x27<<7 | 0x19, + 34533 - 19968: jis0212<<14 | 0x39<<7 | 0x4A, + 34535 - 19968: jis0212<<14 | 0x39<<7 | 0x4B, + 34537 - 19968: jis0208<<14 | 0x48<<7 | 0x3D, + 34540 - 19968: jis0208<<14 | 0x48<<7 | 0x3E, + 34541 - 19968: jis0208<<14 | 0x28<<7 | 0x27, + 34542 - 19968: jis0208<<14 | 0x27<<7 | 0x39, + 34543 - 19968: jis0208<<14 | 0x48<<7 | 0x41, + 34552 - 19968: jis0208<<14 | 0x21<<7 | 0x5C, + 34553 - 19968: jis0208<<14 | 0x48<<7 | 0x4B, + 34554 - 19968: jis0212<<14 | 0x39<<7 | 0x4D, + 34555 - 19968: jis0208<<14 | 0x48<<7 | 0x47, + 34556 - 19968: jis0212<<14 | 0x39<<7 | 0x4E, + 34557 - 19968: jis0212<<14 | 0x39<<7 | 0x4F, + 34558 - 19968: jis0208<<14 | 0x11<<7 | 0x4A, + 34560 - 19968: jis0208<<14 | 0x48<<7 | 0x45, + 34562 - 19968: jis0208<<14 | 0x2A<<7 | 0x09, + 34563 - 19968: jis0208<<14 | 0x48<<7 | 0x46, + 34564 - 19968: jis0212<<14 | 0x39<<7 | 0x50, + 34565 - 19968: jis0212<<14 | 0x39<<7 | 0x51, + 34566 - 19968: jis0208<<14 | 0x48<<7 | 0x43, + 34567 - 19968: jis0212<<14 | 0x39<<7 | 0x52, + 34568 - 19968: jis0208<<14 | 0x48<<7 | 0x44, + 34569 - 19968: jis0208<<14 | 0x48<<7 | 0x49, + 34570 - 19968: jis0208<<14 | 0x48<<7 | 0x4C, + 34571 - 19968: jis0212<<14 | 0x39<<7 | 0x53, + 34573 - 19968: jis0208<<14 | 0x48<<7 | 0x4A, + 34574 - 19968: jis0212<<14 | 0x39<<7 | 0x54, + 34575 - 19968: jis0212<<14 | 0x39<<7 | 0x55, + 34576 - 19968: jis0212<<14 | 0x39<<7 | 0x56, + 34577 - 19968: jis0208<<14 | 0x48<<7 | 0x48, + 34578 - 19968: jis0208<<14 | 0x48<<7 | 0x42, + 34579 - 19968: jis0212<<14 | 0x39<<7 | 0x57, + 34580 - 19968: jis0212<<14 | 0x39<<7 | 0x58, + 34584 - 19968: jis0208<<14 | 0x22<<7 | 0x37, + 34585 - 19968: jis0212<<14 | 0x39<<7 | 0x59, + 34586 - 19968: jis0208<<14 | 0x48<<7 | 0x53, + 34588 - 19968: jis0208<<14 | 0x2B<<7 | 0x09, + 34590 - 19968: jis0212<<14 | 0x39<<7 | 0x5A, + 34591 - 19968: jis0212<<14 | 0x39<<7 | 0x5B, + 34593 - 19968: jis0212<<14 | 0x39<<7 | 0x5C, + 34595 - 19968: jis0212<<14 | 0x39<<7 | 0x5D, + 34597 - 19968: jis0208<<14 | 0x48<<7 | 0x51, + 34600 - 19968: jis0212<<14 | 0x3A<<7 | 0x00, + 34601 - 19968: jis0208<<14 | 0x48<<7 | 0x52, + 34606 - 19968: jis0212<<14 | 0x3A<<7 | 0x01, + 34607 - 19968: jis0212<<14 | 0x3A<<7 | 0x02, + 34609 - 19968: jis0212<<14 | 0x3A<<7 | 0x03, + 34610 - 19968: jis0212<<14 | 0x3A<<7 | 0x04, + 34612 - 19968: jis0208<<14 | 0x48<<7 | 0x4D, + 34615 - 19968: jis0208<<14 | 0x48<<7 | 0x4F, + 34617 - 19968: jis0212<<14 | 0x3A<<7 | 0x05, + 34618 - 19968: jis0212<<14 | 0x3A<<7 | 0x06, + 34619 - 19968: jis0208<<14 | 0x48<<7 | 0x50, + 34620 - 19968: jis0212<<14 | 0x3A<<7 | 0x07, + 34621 - 19968: jis0212<<14 | 0x3A<<7 | 0x08, + 34622 - 19968: jis0212<<14 | 0x3A<<7 | 0x09, + 34623 - 19968: jis0208<<14 | 0x48<<7 | 0x4E, + 34624 - 19968: jis0212<<14 | 0x3A<<7 | 0x0A, + 34627 - 19968: jis0212<<14 | 0x3A<<7 | 0x0B, + 34629 - 19968: jis0212<<14 | 0x3A<<7 | 0x0C, + 34633 - 19968: jis0208<<14 | 0x1F<<7 | 0x45, + 34635 - 19968: jis0208<<14 | 0x2E<<7 | 0x18, + 34636 - 19968: jis0208<<14 | 0x48<<7 | 0x57, + 34637 - 19968: jis0212<<14 | 0x3A<<7 | 0x0D, + 34638 - 19968: jis0208<<14 | 0x48<<7 | 0x58, + 34643 - 19968: jis0208<<14 | 0x49<<7 | 0x00, + 34645 - 19968: jis0208<<14 | 0x1E<<7 | 0x09, + 34647 - 19968: jis0208<<14 | 0x48<<7 | 0x5A, + 34648 - 19968: jis0212<<14 | 0x3A<<7 | 0x0E, + 34649 - 19968: jis0208<<14 | 0x48<<7 | 0x5D, + 34653 - 19968: jis0212<<14 | 0x3A<<7 | 0x0F, + 34655 - 19968: jis0208<<14 | 0x48<<7 | 0x55, + 34656 - 19968: jis0208<<14 | 0x48<<7 | 0x54, + 34657 - 19968: jis0212<<14 | 0x3A<<7 | 0x10, + 34659 - 19968: jis0208<<14 | 0x49<<7 | 0x01, + 34660 - 19968: jis0212<<14 | 0x3A<<7 | 0x11, + 34661 - 19968: jis0212<<14 | 0x3A<<7 | 0x12, + 34662 - 19968: jis0208<<14 | 0x11<<7 | 0x3B, + 34664 - 19968: jis0208<<14 | 0x48<<7 | 0x5B, + 34666 - 19968: jis0208<<14 | 0x49<<7 | 0x02, + 34670 - 19968: jis0208<<14 | 0x48<<7 | 0x5C, + 34671 - 19968: jis0212<<14 | 0x3A<<7 | 0x13, + 34673 - 19968: jis0212<<14 | 0x3A<<7 | 0x14, + 34674 - 19968: jis0212<<14 | 0x3A<<7 | 0x15, + 34676 - 19968: jis0208<<14 | 0x48<<7 | 0x59, + 34678 - 19968: jis0208<<14 | 0x23<<7 | 0x12, + 34680 - 19968: jis0208<<14 | 0x48<<7 | 0x56, + 34683 - 19968: jis0212<<14 | 0x3A<<7 | 0x16, + 34687 - 19968: jis0208<<14 | 0x26<<7 | 0x47, + 34690 - 19968: jis0208<<14 | 0x49<<7 | 0x06, + 34691 - 19968: jis0212<<14 | 0x3A<<7 | 0x17, + 34692 - 19968: jis0212<<14 | 0x3A<<7 | 0x18, + 34693 - 19968: jis0212<<14 | 0x3A<<7 | 0x19, + 34694 - 19968: jis0212<<14 | 0x3A<<7 | 0x1A, + 34695 - 19968: jis0212<<14 | 0x3A<<7 | 0x1B, + 34696 - 19968: jis0212<<14 | 0x3A<<7 | 0x1C, + 34697 - 19968: jis0212<<14 | 0x3A<<7 | 0x1D, + 34699 - 19968: jis0212<<14 | 0x3A<<7 | 0x1E, + 34700 - 19968: jis0212<<14 | 0x3A<<7 | 0x1F, + 34701 - 19968: jis0208<<14 | 0x2C<<7 | 0x1A, + 34704 - 19968: jis0212<<14 | 0x3A<<7 | 0x20, + 34707 - 19968: jis0212<<14 | 0x3A<<7 | 0x21, + 34709 - 19968: jis0212<<14 | 0x3A<<7 | 0x22, + 34711 - 19968: jis0212<<14 | 0x3A<<7 | 0x23, + 34712 - 19968: jis0212<<14 | 0x3A<<7 | 0x24, + 34713 - 19968: jis0212<<14 | 0x3A<<7 | 0x25, + 34718 - 19968: jis0212<<14 | 0x3A<<7 | 0x26, + 34719 - 19968: jis0208<<14 | 0x49<<7 | 0x05, + 34720 - 19968: jis0212<<14 | 0x3A<<7 | 0x27, + 34722 - 19968: jis0208<<14 | 0x49<<7 | 0x04, + 34723 - 19968: jis0212<<14 | 0x3A<<7 | 0x28, + 34727 - 19968: jis0212<<14 | 0x3A<<7 | 0x29, + 34731 - 19968: jis0208<<14 | 0x49<<7 | 0x0D, + 34732 - 19968: jis0212<<14 | 0x3A<<7 | 0x2A, + 34733 - 19968: jis0212<<14 | 0x3A<<7 | 0x2B, + 34734 - 19968: jis0212<<14 | 0x3A<<7 | 0x2C, + 34735 - 19968: jis0208<<14 | 0x49<<7 | 0x07, + 34737 - 19968: jis0212<<14 | 0x3A<<7 | 0x2D, + 34739 - 19968: jis0208<<14 | 0x49<<7 | 0x0F, + 34741 - 19968: jis0212<<14 | 0x3A<<7 | 0x2E, + 34746 - 19968: jis0208<<14 | 0x2C<<7 | 0x45, + 34747 - 19968: jis0208<<14 | 0x49<<7 | 0x12, + 34749 - 19968: jis0208<<14 | 0x49<<7 | 0x09, + 34750 - 19968: jis0212<<14 | 0x3A<<7 | 0x2F, + 34751 - 19968: jis0212<<14 | 0x3A<<7 | 0x30, + 34752 - 19968: jis0208<<14 | 0x49<<7 | 0x0A, + 34753 - 19968: jis0212<<14 | 0x3A<<7 | 0x31, + 34756 - 19968: jis0208<<14 | 0x49<<7 | 0x0E, + 34758 - 19968: jis0208<<14 | 0x49<<7 | 0x11, + 34759 - 19968: jis0208<<14 | 0x49<<7 | 0x10, + 34760 - 19968: jis0212<<14 | 0x3A<<7 | 0x32, + 34761 - 19968: jis0212<<14 | 0x3A<<7 | 0x33, + 34762 - 19968: jis0212<<14 | 0x3A<<7 | 0x34, + 34763 - 19968: jis0208<<14 | 0x49<<7 | 0x08, + 34766 - 19968: jis0212<<14 | 0x3A<<7 | 0x35, + 34768 - 19968: jis0208<<14 | 0x49<<7 | 0x0B, + 34770 - 19968: jis0208<<14 | 0x49<<7 | 0x1C, + 34773 - 19968: jis0212<<14 | 0x3A<<7 | 0x36, + 34774 - 19968: jis0212<<14 | 0x3A<<7 | 0x37, + 34777 - 19968: jis0212<<14 | 0x3A<<7 | 0x38, + 34778 - 19968: jis0212<<14 | 0x3A<<7 | 0x39, + 34780 - 19968: jis0212<<14 | 0x3A<<7 | 0x3A, + 34783 - 19968: jis0212<<14 | 0x3A<<7 | 0x3B, + 34784 - 19968: jis0208<<14 | 0x49<<7 | 0x15, + 34786 - 19968: jis0212<<14 | 0x3A<<7 | 0x3C, + 34787 - 19968: jis0212<<14 | 0x3A<<7 | 0x3D, + 34788 - 19968: jis0212<<14 | 0x3A<<7 | 0x3E, + 34794 - 19968: jis0212<<14 | 0x3A<<7 | 0x3F, + 34795 - 19968: jis0212<<14 | 0x3A<<7 | 0x40, + 34797 - 19968: jis0212<<14 | 0x3A<<7 | 0x41, + 34799 - 19968: jis0208<<14 | 0x49<<7 | 0x13, + 34801 - 19968: jis0212<<14 | 0x3A<<7 | 0x42, + 34802 - 19968: jis0208<<14 | 0x49<<7 | 0x14, + 34803 - 19968: jis0212<<14 | 0x3A<<7 | 0x43, + 34806 - 19968: jis0208<<14 | 0x49<<7 | 0x19, + 34807 - 19968: jis0208<<14 | 0x49<<7 | 0x1A, + 34808 - 19968: jis0212<<14 | 0x3A<<7 | 0x44, + 34809 - 19968: jis0208<<14 | 0x12<<7 | 0x09, + 34810 - 19968: jis0212<<14 | 0x3A<<7 | 0x45, + 34811 - 19968: jis0208<<14 | 0x14<<7 | 0x21, + 34814 - 19968: jis0208<<14 | 0x49<<7 | 0x18, + 34815 - 19968: jis0212<<14 | 0x3A<<7 | 0x46, + 34817 - 19968: jis0212<<14 | 0x3A<<7 | 0x47, + 34819 - 19968: jis0212<<14 | 0x3A<<7 | 0x48, + 34821 - 19968: jis0208<<14 | 0x49<<7 | 0x03, + 34822 - 19968: jis0212<<14 | 0x3A<<7 | 0x49, + 34823 - 19968: jis0208<<14 | 0x5A<<7 | 0x44, + 34825 - 19968: jis0212<<14 | 0x3A<<7 | 0x4A, + 34826 - 19968: jis0212<<14 | 0x3A<<7 | 0x4B, + 34827 - 19968: jis0212<<14 | 0x3A<<7 | 0x4C, + 34829 - 19968: jis0208<<14 | 0x49<<7 | 0x17, + 34830 - 19968: jis0208<<14 | 0x49<<7 | 0x1B, + 34831 - 19968: jis0208<<14 | 0x49<<7 | 0x16, + 34832 - 19968: jis0212<<14 | 0x3A<<7 | 0x4D, + 34833 - 19968: jis0208<<14 | 0x49<<7 | 0x1D, + 34834 - 19968: jis0212<<14 | 0x3A<<7 | 0x4F, + 34835 - 19968: jis0212<<14 | 0x3A<<7 | 0x50, + 34836 - 19968: jis0212<<14 | 0x3A<<7 | 0x51, + 34837 - 19968: jis0208<<14 | 0x49<<7 | 0x1F, + 34838 - 19968: jis0208<<14 | 0x49<<7 | 0x1E, + 34840 - 19968: jis0212<<14 | 0x3A<<7 | 0x52, + 34841 - 19968: jis0212<<14 | 0x3A<<7 | 0x4E, + 34842 - 19968: jis0212<<14 | 0x3A<<7 | 0x53, + 34843 - 19968: jis0212<<14 | 0x3A<<7 | 0x54, + 34844 - 19968: jis0212<<14 | 0x3A<<7 | 0x55, + 34846 - 19968: jis0212<<14 | 0x3A<<7 | 0x56, + 34847 - 19968: jis0212<<14 | 0x3A<<7 | 0x57, + 34849 - 19968: jis0208<<14 | 0x49<<7 | 0x21, + 34850 - 19968: jis0208<<14 | 0x49<<7 | 0x20, + 34851 - 19968: jis0208<<14 | 0x48<<7 | 0x39, + 34855 - 19968: jis0208<<14 | 0x49<<7 | 0x25, + 34856 - 19968: jis0212<<14 | 0x3A<<7 | 0x58, + 34861 - 19968: jis0212<<14 | 0x3A<<7 | 0x59, + 34862 - 19968: jis0212<<14 | 0x3A<<7 | 0x5A, + 34864 - 19968: jis0212<<14 | 0x3A<<7 | 0x5B, + 34865 - 19968: jis0208<<14 | 0x49<<7 | 0x22, + 34866 - 19968: jis0212<<14 | 0x3A<<7 | 0x5C, + 34869 - 19968: jis0212<<14 | 0x3A<<7 | 0x5D, + 34870 - 19968: jis0208<<14 | 0x49<<7 | 0x23, + 34873 - 19968: jis0208<<14 | 0x49<<7 | 0x24, + 34874 - 19968: jis0212<<14 | 0x3B<<7 | 0x00, + 34875 - 19968: jis0208<<14 | 0x49<<7 | 0x26, + 34876 - 19968: jis0212<<14 | 0x3B<<7 | 0x01, + 34880 - 19968: jis0208<<14 | 0x16<<7 | 0x4B, + 34881 - 19968: jis0212<<14 | 0x3B<<7 | 0x02, + 34882 - 19968: jis0208<<14 | 0x49<<7 | 0x28, + 34883 - 19968: jis0212<<14 | 0x3B<<7 | 0x03, + 34884 - 19968: jis0208<<14 | 0x49<<7 | 0x27, + 34885 - 19968: jis0212<<14 | 0x3B<<7 | 0x04, + 34886 - 19968: jis0208<<14 | 0x1C<<7 | 0x0F, + 34888 - 19968: jis0212<<14 | 0x3B<<7 | 0x05, + 34889 - 19968: jis0212<<14 | 0x3B<<7 | 0x06, + 34890 - 19968: jis0212<<14 | 0x3B<<7 | 0x07, + 34891 - 19968: jis0212<<14 | 0x3B<<7 | 0x08, + 34892 - 19968: jis0208<<14 | 0x18<<7 | 0x33, + 34893 - 19968: jis0208<<14 | 0x3D<<7 | 0x06, + 34894 - 19968: jis0212<<14 | 0x3B<<7 | 0x09, + 34897 - 19968: jis0212<<14 | 0x3B<<7 | 0x0A, + 34898 - 19968: jis0208<<14 | 0x49<<7 | 0x29, + 34899 - 19968: jis0208<<14 | 0x1C<<7 | 0x30, + 34901 - 19968: jis0212<<14 | 0x3B<<7 | 0x0B, + 34902 - 19968: jis0212<<14 | 0x3B<<7 | 0x0C, + 34903 - 19968: jis0208<<14 | 0x12<<7 | 0x18, + 34904 - 19968: jis0212<<14 | 0x3B<<7 | 0x0D, + 34905 - 19968: jis0208<<14 | 0x49<<7 | 0x2A, + 34906 - 19968: jis0212<<14 | 0x3B<<7 | 0x0E, + 34907 - 19968: jis0208<<14 | 0x10<<7 | 0x31, + 34908 - 19968: jis0212<<14 | 0x3B<<7 | 0x0F, + 34909 - 19968: jis0208<<14 | 0x1D<<7 | 0x36, + 34910 - 19968: jis0208<<14 | 0x49<<7 | 0x2B, + 34911 - 19968: jis0212<<14 | 0x3B<<7 | 0x10, + 34912 - 19968: jis0212<<14 | 0x3B<<7 | 0x11, + 34913 - 19968: jis0208<<14 | 0x18<<7 | 0x34, + 34914 - 19968: jis0208<<14 | 0x49<<7 | 0x2C, + 34915 - 19968: jis0208<<14 | 0x0F<<7 | 0x40, + 34916 - 19968: jis0212<<14 | 0x3B<<7 | 0x12, + 34920 - 19968: jis0208<<14 | 0x28<<7 | 0x1C, + 34921 - 19968: jis0212<<14 | 0x3B<<7 | 0x13, + 34923 - 19968: jis0208<<14 | 0x49<<7 | 0x2D, + 34928 - 19968: jis0208<<14 | 0x1E<<7 | 0x49, + 34929 - 19968: jis0212<<14 | 0x3B<<7 | 0x14, + 34930 - 19968: jis0208<<14 | 0x49<<7 | 0x34, + 34933 - 19968: jis0208<<14 | 0x49<<7 | 0x31, + 34935 - 19968: jis0208<<14 | 0x22<<7 | 0x4E, + 34937 - 19968: jis0212<<14 | 0x3B<<7 | 0x15, + 34939 - 19968: jis0212<<14 | 0x3B<<7 | 0x16, + 34941 - 19968: jis0208<<14 | 0x49<<7 | 0x32, + 34942 - 19968: jis0208<<14 | 0x49<<7 | 0x2F, + 34943 - 19968: jis0208<<14 | 0x15<<7 | 0x3D, + 34944 - 19968: jis0212<<14 | 0x3B<<7 | 0x17, + 34945 - 19968: jis0208<<14 | 0x49<<7 | 0x2E, + 34946 - 19968: jis0208<<14 | 0x49<<7 | 0x35, + 34952 - 19968: jis0208<<14 | 0x16<<7 | 0x15, + 34955 - 19968: jis0208<<14 | 0x21<<7 | 0x3D, + 34957 - 19968: jis0208<<14 | 0x49<<7 | 0x3B, + 34962 - 19968: jis0208<<14 | 0x49<<7 | 0x37, + 34966 - 19968: jis0208<<14 | 0x21<<7 | 0x14, + 34967 - 19968: jis0208<<14 | 0x49<<7 | 0x36, + 34968 - 19968: jis0212<<14 | 0x3B<<7 | 0x18, + 34969 - 19968: jis0208<<14 | 0x49<<7 | 0x39, + 34970 - 19968: jis0212<<14 | 0x3B<<7 | 0x19, + 34971 - 19968: jis0212<<14 | 0x3B<<7 | 0x1A, + 34972 - 19968: jis0212<<14 | 0x3B<<7 | 0x1B, + 34974 - 19968: jis0208<<14 | 0x49<<7 | 0x30, + 34975 - 19968: jis0212<<14 | 0x3B<<7 | 0x1C, + 34976 - 19968: jis0212<<14 | 0x3B<<7 | 0x1D, + 34978 - 19968: jis0208<<14 | 0x49<<7 | 0x3A, + 34980 - 19968: jis0208<<14 | 0x49<<7 | 0x3C, + 34984 - 19968: jis0212<<14 | 0x3B<<7 | 0x1E, + 34986 - 19968: jis0212<<14 | 0x3B<<7 | 0x1F, + 34987 - 19968: jis0208<<14 | 0x27<<7 | 0x4E, + 34990 - 19968: jis0208<<14 | 0x49<<7 | 0x38, + 34992 - 19968: jis0208<<14 | 0x49<<7 | 0x3D, + 34993 - 19968: jis0208<<14 | 0x49<<7 | 0x3F, + 34996 - 19968: jis0208<<14 | 0x17<<7 | 0x32, + 34997 - 19968: jis0208<<14 | 0x49<<7 | 0x33, + 34999 - 19968: jis0208<<14 | 0x0F<<7 | 0x20, + 35002 - 19968: jis0212<<14 | 0x3B<<7 | 0x20, + 35005 - 19968: jis0212<<14 | 0x3B<<7 | 0x21, + 35006 - 19968: jis0212<<14 | 0x3B<<7 | 0x22, + 35007 - 19968: jis0208<<14 | 0x49<<7 | 0x3E, + 35008 - 19968: jis0212<<14 | 0x3B<<7 | 0x23, + 35009 - 19968: jis0208<<14 | 0x19<<7 | 0x3A, + 35010 - 19968: jis0208<<14 | 0x2D<<7 | 0x55, + 35011 - 19968: jis0208<<14 | 0x49<<7 | 0x40, + 35012 - 19968: jis0208<<14 | 0x49<<7 | 0x41, + 35013 - 19968: jis0208<<14 | 0x20<<7 | 0x54, + 35018 - 19968: jis0212<<14 | 0x3B<<7 | 0x24, + 35019 - 19968: jis0212<<14 | 0x3B<<7 | 0x25, + 35020 - 19968: jis0212<<14 | 0x3B<<7 | 0x26, + 35021 - 19968: jis0212<<14 | 0x3B<<7 | 0x27, + 35022 - 19968: jis0212<<14 | 0x3B<<7 | 0x28, + 35023 - 19968: jis0208<<14 | 0x2D<<7 | 0x01, + 35025 - 19968: jis0212<<14 | 0x3B<<7 | 0x29, + 35026 - 19968: jis0212<<14 | 0x3B<<7 | 0x2A, + 35027 - 19968: jis0212<<14 | 0x3B<<7 | 0x2B, + 35028 - 19968: jis0208<<14 | 0x49<<7 | 0x42, + 35029 - 19968: jis0208<<14 | 0x2C<<7 | 0x14, + 35032 - 19968: jis0208<<14 | 0x49<<7 | 0x43, + 35033 - 19968: jis0208<<14 | 0x49<<7 | 0x44, + 35035 - 19968: jis0212<<14 | 0x3B<<7 | 0x2C, + 35036 - 19968: jis0208<<14 | 0x29<<7 | 0x43, + 35037 - 19968: jis0208<<14 | 0x49<<7 | 0x45, + 35038 - 19968: jis0212<<14 | 0x3B<<7 | 0x2D, + 35039 - 19968: jis0208<<14 | 0x19<<7 | 0x1F, + 35041 - 19968: jis0208<<14 | 0x2D<<7 | 0x02, + 35047 - 19968: jis0212<<14 | 0x3B<<7 | 0x2E, + 35048 - 19968: jis0208<<14 | 0x49<<7 | 0x4A, + 35055 - 19968: jis0212<<14 | 0x3B<<7 | 0x2F, + 35056 - 19968: jis0212<<14 | 0x3B<<7 | 0x30, + 35057 - 19968: jis0212<<14 | 0x3B<<7 | 0x31, + 35058 - 19968: jis0208<<14 | 0x49<<7 | 0x4B, + 35059 - 19968: jis0208<<14 | 0x1D<<7 | 0x37, + 35060 - 19968: jis0208<<14 | 0x49<<7 | 0x49, + 35061 - 19968: jis0208<<14 | 0x5A<<7 | 0x45, + 35063 - 19968: jis0212<<14 | 0x3B<<7 | 0x33, + 35064 - 19968: jis0208<<14 | 0x2C<<7 | 0x46, + 35065 - 19968: jis0208<<14 | 0x49<<7 | 0x46, + 35068 - 19968: jis0208<<14 | 0x49<<7 | 0x48, + 35069 - 19968: jis0208<<14 | 0x1F<<7 | 0x1C, + 35070 - 19968: jis0208<<14 | 0x1E<<7 | 0x5D, + 35073 - 19968: jis0212<<14 | 0x3B<<7 | 0x34, + 35074 - 19968: jis0208<<14 | 0x49<<7 | 0x47, + 35076 - 19968: jis0208<<14 | 0x49<<7 | 0x4C, + 35078 - 19968: jis0212<<14 | 0x3B<<7 | 0x35, + 35079 - 19968: jis0208<<14 | 0x29<<7 | 0x02, + 35082 - 19968: jis0208<<14 | 0x49<<7 | 0x4E, + 35084 - 19968: jis0208<<14 | 0x49<<7 | 0x4D, + 35085 - 19968: jis0212<<14 | 0x3B<<7 | 0x36, + 35086 - 19968: jis0212<<14 | 0x3B<<7 | 0x37, + 35087 - 19968: jis0212<<14 | 0x3B<<7 | 0x38, + 35088 - 19968: jis0208<<14 | 0x12<<7 | 0x4B, + 35090 - 19968: jis0208<<14 | 0x2A<<7 | 0x0A, + 35091 - 19968: jis0208<<14 | 0x49<<7 | 0x4F, + 35093 - 19968: jis0212<<14 | 0x3B<<7 | 0x39, + 35094 - 19968: jis0212<<14 | 0x3B<<7 | 0x3A, + 35096 - 19968: jis0212<<14 | 0x3B<<7 | 0x3B, + 35097 - 19968: jis0212<<14 | 0x3B<<7 | 0x3C, + 35098 - 19968: jis0212<<14 | 0x3B<<7 | 0x3D, + 35100 - 19968: jis0208<<14 | 0x58<<7 | 0x01, + 35101 - 19968: jis0208<<14 | 0x49<<7 | 0x5B, + 35102 - 19968: jis0208<<14 | 0x49<<7 | 0x51, + 35104 - 19968: jis0212<<14 | 0x3B<<7 | 0x3F, + 35109 - 19968: jis0208<<14 | 0x49<<7 | 0x52, + 35110 - 19968: jis0212<<14 | 0x3B<<7 | 0x40, + 35111 - 19968: jis0212<<14 | 0x3B<<7 | 0x41, + 35112 - 19968: jis0212<<14 | 0x3B<<7 | 0x42, + 35114 - 19968: jis0208<<14 | 0x49<<7 | 0x53, + 35115 - 19968: jis0208<<14 | 0x49<<7 | 0x54, + 35120 - 19968: jis0212<<14 | 0x3B<<7 | 0x43, + 35121 - 19968: jis0212<<14 | 0x3B<<7 | 0x44, + 35122 - 19968: jis0212<<14 | 0x3B<<7 | 0x45, + 35125 - 19968: jis0212<<14 | 0x3B<<7 | 0x46, + 35126 - 19968: jis0208<<14 | 0x49<<7 | 0x58, + 35128 - 19968: jis0208<<14 | 0x49<<7 | 0x59, + 35129 - 19968: jis0212<<14 | 0x3B<<7 | 0x47, + 35130 - 19968: jis0212<<14 | 0x3B<<7 | 0x48, + 35131 - 19968: jis0208<<14 | 0x49<<7 | 0x57, + 35134 - 19968: jis0212<<14 | 0x3B<<7 | 0x49, + 35136 - 19968: jis0212<<14 | 0x3B<<7 | 0x4A, + 35137 - 19968: jis0208<<14 | 0x49<<7 | 0x55, + 35138 - 19968: jis0212<<14 | 0x3B<<7 | 0x4B, + 35139 - 19968: jis0208<<14 | 0x49<<7 | 0x50, + 35140 - 19968: jis0208<<14 | 0x49<<7 | 0x56, + 35141 - 19968: jis0212<<14 | 0x3B<<7 | 0x4C, + 35142 - 19968: jis0212<<14 | 0x3B<<7 | 0x4D, + 35145 - 19968: jis0212<<14 | 0x3B<<7 | 0x4E, + 35148 - 19968: jis0208<<14 | 0x49<<7 | 0x5A, + 35149 - 19968: jis0208<<14 | 0x4F<<7 | 0x16, + 35151 - 19968: jis0212<<14 | 0x3B<<7 | 0x4F, + 35154 - 19968: jis0212<<14 | 0x3B<<7 | 0x50, + 35158 - 19968: jis0208<<14 | 0x11<<7 | 0x07, + 35159 - 19968: jis0212<<14 | 0x3B<<7 | 0x51, + 35162 - 19968: jis0212<<14 | 0x3B<<7 | 0x52, + 35163 - 19968: jis0212<<14 | 0x3B<<7 | 0x53, + 35164 - 19968: jis0212<<14 | 0x3B<<7 | 0x54, + 35166 - 19968: jis0208<<14 | 0x49<<7 | 0x5D, + 35167 - 19968: jis0208<<14 | 0x15<<7 | 0x3E, + 35168 - 19968: jis0208<<14 | 0x49<<7 | 0x5C, + 35169 - 19968: jis0212<<14 | 0x3B<<7 | 0x55, + 35170 - 19968: jis0212<<14 | 0x3B<<7 | 0x56, + 35171 - 19968: jis0212<<14 | 0x3B<<7 | 0x57, + 35172 - 19968: jis0208<<14 | 0x4A<<7 | 0x01, + 35174 - 19968: jis0208<<14 | 0x4A<<7 | 0x00, + 35178 - 19968: jis0208<<14 | 0x4A<<7 | 0x03, + 35179 - 19968: jis0212<<14 | 0x3B<<7 | 0x58, + 35181 - 19968: jis0208<<14 | 0x4A<<7 | 0x02, + 35182 - 19968: jis0212<<14 | 0x3B<<7 | 0x59, + 35183 - 19968: jis0208<<14 | 0x4A<<7 | 0x04, + 35184 - 19968: jis0212<<14 | 0x3B<<7 | 0x5A, + 35186 - 19968: jis0208<<14 | 0x1C<<7 | 0x10, + 35187 - 19968: jis0212<<14 | 0x3B<<7 | 0x5B, + 35188 - 19968: jis0208<<14 | 0x4A<<7 | 0x05, + 35189 - 19968: jis0212<<14 | 0x3B<<7 | 0x5C, + 35191 - 19968: jis0208<<14 | 0x4A<<7 | 0x06, + 35194 - 19968: jis0212<<14 | 0x3B<<7 | 0x5D, + 35195 - 19968: jis0212<<14 | 0x3C<<7 | 0x00, + 35196 - 19968: jis0212<<14 | 0x3C<<7 | 0x01, + 35197 - 19968: jis0212<<14 | 0x3C<<7 | 0x02, + 35198 - 19968: jis0208<<14 | 0x4A<<7 | 0x07, + 35199 - 19968: jis0208<<14 | 0x1F<<7 | 0x1D, + 35201 - 19968: jis0208<<14 | 0x2C<<7 | 0x36, + 35203 - 19968: jis0208<<14 | 0x4A<<7 | 0x08, + 35206 - 19968: jis0208<<14 | 0x29<<7 | 0x03, + 35207 - 19968: jis0208<<14 | 0x26<<7 | 0x25, + 35208 - 19968: jis0208<<14 | 0x4A<<7 | 0x09, + 35209 - 19968: jis0212<<14 | 0x3C<<7 | 0x03, + 35210 - 19968: jis0208<<14 | 0x4A<<7 | 0x0A, + 35211 - 19968: jis0208<<14 | 0x17<<7 | 0x0A, + 35213 - 19968: jis0212<<14 | 0x3C<<7 | 0x04, + 35215 - 19968: jis0208<<14 | 0x14<<7 | 0x0B, + 35216 - 19968: jis0212<<14 | 0x3C<<7 | 0x05, + 35219 - 19968: jis0208<<14 | 0x4A<<7 | 0x0B, + 35220 - 19968: jis0212<<14 | 0x3C<<7 | 0x06, + 35221 - 19968: jis0212<<14 | 0x3C<<7 | 0x07, + 35222 - 19968: jis0208<<14 | 0x1A<<7 | 0x4A, + 35223 - 19968: jis0208<<14 | 0x26<<7 | 0x20, + 35224 - 19968: jis0208<<14 | 0x4A<<7 | 0x0C, + 35226 - 19968: jis0208<<14 | 0x12<<7 | 0x2F, + 35227 - 19968: jis0212<<14 | 0x3C<<7 | 0x08, + 35228 - 19968: jis0212<<14 | 0x3C<<7 | 0x09, + 35231 - 19968: jis0212<<14 | 0x3C<<7 | 0x0A, + 35232 - 19968: jis0212<<14 | 0x3C<<7 | 0x0B, + 35233 - 19968: jis0208<<14 | 0x4A<<7 | 0x0D, + 35237 - 19968: jis0212<<14 | 0x3C<<7 | 0x0C, + 35238 - 19968: jis0208<<14 | 0x4A<<7 | 0x0F, + 35239 - 19968: jis0208<<14 | 0x2C<<7 | 0x56, + 35241 - 19968: jis0208<<14 | 0x4A<<7 | 0x0E, + 35242 - 19968: jis0208<<14 | 0x1E<<7 | 0x25, + 35244 - 19968: jis0208<<14 | 0x4A<<7 | 0x10, + 35247 - 19968: jis0208<<14 | 0x4A<<7 | 0x11, + 35248 - 19968: jis0212<<14 | 0x3C<<7 | 0x0D, + 35250 - 19968: jis0208<<14 | 0x4A<<7 | 0x12, + 35251 - 19968: jis0208<<14 | 0x13<<7 | 0x30, + 35252 - 19968: jis0212<<14 | 0x3C<<7 | 0x0E, + 35253 - 19968: jis0212<<14 | 0x3C<<7 | 0x0F, + 35254 - 19968: jis0212<<14 | 0x3C<<7 | 0x10, + 35255 - 19968: jis0212<<14 | 0x3C<<7 | 0x11, + 35258 - 19968: jis0208<<14 | 0x4A<<7 | 0x13, + 35260 - 19968: jis0212<<14 | 0x3C<<7 | 0x12, + 35261 - 19968: jis0208<<14 | 0x4A<<7 | 0x14, + 35263 - 19968: jis0208<<14 | 0x4A<<7 | 0x15, + 35264 - 19968: jis0208<<14 | 0x4A<<7 | 0x16, + 35282 - 19968: jis0208<<14 | 0x12<<7 | 0x30, + 35284 - 19968: jis0212<<14 | 0x3C<<7 | 0x13, + 35285 - 19968: jis0212<<14 | 0x3C<<7 | 0x14, + 35286 - 19968: jis0212<<14 | 0x3C<<7 | 0x15, + 35287 - 19968: jis0212<<14 | 0x3C<<7 | 0x16, + 35288 - 19968: jis0212<<14 | 0x3C<<7 | 0x17, + 35290 - 19968: jis0208<<14 | 0x4A<<7 | 0x17, + 35292 - 19968: jis0208<<14 | 0x4A<<7 | 0x18, + 35293 - 19968: jis0208<<14 | 0x4A<<7 | 0x19, + 35299 - 19968: jis0208<<14 | 0x11<<7 | 0x51, + 35301 - 19968: jis0212<<14 | 0x3C<<7 | 0x18, + 35302 - 19968: jis0208<<14 | 0x1E<<7 | 0x07, + 35303 - 19968: jis0208<<14 | 0x4A<<7 | 0x1A, + 35305 - 19968: jis0212<<14 | 0x3C<<7 | 0x19, + 35307 - 19968: jis0212<<14 | 0x3C<<7 | 0x1A, + 35309 - 19968: jis0212<<14 | 0x3C<<7 | 0x1B, + 35313 - 19968: jis0212<<14 | 0x3C<<7 | 0x1C, + 35315 - 19968: jis0212<<14 | 0x3C<<7 | 0x1D, + 35316 - 19968: jis0208<<14 | 0x4A<<7 | 0x1B, + 35318 - 19968: jis0212<<14 | 0x3C<<7 | 0x1E, + 35320 - 19968: jis0208<<14 | 0x4A<<7 | 0x1C, + 35321 - 19968: jis0212<<14 | 0x3C<<7 | 0x1F, + 35325 - 19968: jis0212<<14 | 0x3C<<7 | 0x20, + 35327 - 19968: jis0212<<14 | 0x3C<<7 | 0x21, + 35328 - 19968: jis0208<<14 | 0x17<<7 | 0x1F, + 35330 - 19968: jis0208<<14 | 0x23<<7 | 0x5A, + 35331 - 19968: jis0208<<14 | 0x4A<<7 | 0x1D, + 35332 - 19968: jis0212<<14 | 0x3C<<7 | 0x22, + 35333 - 19968: jis0212<<14 | 0x3C<<7 | 0x23, + 35335 - 19968: jis0212<<14 | 0x3C<<7 | 0x24, + 35336 - 19968: jis0208<<14 | 0x16<<7 | 0x36, + 35338 - 19968: jis0208<<14 | 0x1E<<7 | 0x35, + 35340 - 19968: jis0208<<14 | 0x4A<<7 | 0x20, + 35342 - 19968: jis0208<<14 | 0x25<<7 | 0x03, + 35343 - 19968: jis0212<<14 | 0x3C<<7 | 0x25, + 35344 - 19968: jis0208<<14 | 0x4A<<7 | 0x1F, + 35345 - 19968: jis0212<<14 | 0x3C<<7 | 0x26, + 35346 - 19968: jis0208<<14 | 0x5A<<7 | 0x46, + 35347 - 19968: jis0208<<14 | 0x16<<7 | 0x10, + 35348 - 19968: jis0212<<14 | 0x3C<<7 | 0x28, + 35349 - 19968: jis0212<<14 | 0x3C<<7 | 0x29, + 35350 - 19968: jis0208<<14 | 0x4A<<7 | 0x1E, + 35351 - 19968: jis0208<<14 | 0x21<<7 | 0x56, + 35352 - 19968: jis0208<<14 | 0x14<<7 | 0x0C, + 35355 - 19968: jis0208<<14 | 0x4A<<7 | 0x21, + 35357 - 19968: jis0208<<14 | 0x4A<<7 | 0x22, + 35358 - 19968: jis0212<<14 | 0x3C<<7 | 0x2A, + 35359 - 19968: jis0208<<14 | 0x1D<<7 | 0x38, + 35360 - 19968: jis0212<<14 | 0x3C<<7 | 0x2B, + 35362 - 19968: jis0212<<14 | 0x3C<<7 | 0x2C, + 35363 - 19968: jis0208<<14 | 0x16<<7 | 0x4C, + 35364 - 19968: jis0212<<14 | 0x3C<<7 | 0x2D, + 35365 - 19968: jis0208<<14 | 0x4A<<7 | 0x23, + 35366 - 19968: jis0212<<14 | 0x3C<<7 | 0x2E, + 35370 - 19968: jis0208<<14 | 0x2A<<7 | 0x0B, + 35371 - 19968: jis0212<<14 | 0x3C<<7 | 0x2F, + 35372 - 19968: jis0212<<14 | 0x3C<<7 | 0x30, + 35373 - 19968: jis0208<<14 | 0x1F<<7 | 0x3E, + 35375 - 19968: jis0212<<14 | 0x3C<<7 | 0x31, + 35377 - 19968: jis0208<<14 | 0x14<<7 | 0x55, + 35379 - 19968: jis0208<<14 | 0x2B<<7 | 0x54, + 35380 - 19968: jis0208<<14 | 0x20<<7 | 0x29, + 35381 - 19968: jis0212<<14 | 0x3C<<7 | 0x32, + 35382 - 19968: jis0208<<14 | 0x4A<<7 | 0x24, + 35383 - 19968: jis0208<<14 | 0x5A<<7 | 0x47, + 35386 - 19968: jis0208<<14 | 0x1E<<7 | 0x26, + 35387 - 19968: jis0208<<14 | 0x22<<7 | 0x4F, + 35388 - 19968: jis0208<<14 | 0x1D<<7 | 0x39, + 35389 - 19968: jis0212<<14 | 0x3C<<7 | 0x34, + 35390 - 19968: jis0212<<14 | 0x3C<<7 | 0x35, + 35392 - 19968: jis0212<<14 | 0x3C<<7 | 0x36, + 35393 - 19968: jis0208<<14 | 0x4A<<7 | 0x25, + 35395 - 19968: jis0212<<14 | 0x3C<<7 | 0x37, + 35397 - 19968: jis0212<<14 | 0x3C<<7 | 0x38, + 35398 - 19968: jis0208<<14 | 0x4A<<7 | 0x28, + 35399 - 19968: jis0212<<14 | 0x3C<<7 | 0x39, + 35400 - 19968: jis0208<<14 | 0x4A<<7 | 0x29, + 35401 - 19968: jis0212<<14 | 0x3C<<7 | 0x3A, + 35405 - 19968: jis0212<<14 | 0x3C<<7 | 0x3B, + 35406 - 19968: jis0212<<14 | 0x3C<<7 | 0x3C, + 35408 - 19968: jis0208<<14 | 0x19<<7 | 0x1D, + 35409 - 19968: jis0208<<14 | 0x21<<7 | 0x21, + 35410 - 19968: jis0208<<14 | 0x4A<<7 | 0x27, + 35411 - 19968: jis0212<<14 | 0x3C<<7 | 0x3D, + 35412 - 19968: jis0208<<14 | 0x1D<<7 | 0x3A, + 35413 - 19968: jis0208<<14 | 0x28<<7 | 0x1D, + 35414 - 19968: jis0212<<14 | 0x3C<<7 | 0x3E, + 35415 - 19968: jis0212<<14 | 0x3C<<7 | 0x3F, + 35416 - 19968: jis0212<<14 | 0x3C<<7 | 0x40, + 35419 - 19968: jis0208<<14 | 0x4A<<7 | 0x26, + 35420 - 19968: jis0212<<14 | 0x3C<<7 | 0x41, + 35421 - 19968: jis0212<<14 | 0x3C<<7 | 0x42, + 35422 - 19968: jis0208<<14 | 0x1A<<7 | 0x4B, + 35424 - 19968: jis0208<<14 | 0x10<<7 | 0x32, + 35425 - 19968: jis0212<<14 | 0x3C<<7 | 0x43, + 35426 - 19968: jis0208<<14 | 0x4A<<7 | 0x2D, + 35427 - 19968: jis0208<<14 | 0x16<<7 | 0x37, + 35429 - 19968: jis0212<<14 | 0x3C<<7 | 0x44, + 35430 - 19968: jis0208<<14 | 0x1A<<7 | 0x4D, + 35431 - 19968: jis0212<<14 | 0x3C<<7 | 0x45, + 35433 - 19968: jis0208<<14 | 0x1A<<7 | 0x4C, + 35435 - 19968: jis0208<<14 | 0x2E<<7 | 0x2C, + 35436 - 19968: jis0208<<14 | 0x4A<<7 | 0x2C, + 35437 - 19968: jis0208<<14 | 0x4A<<7 | 0x2B, + 35438 - 19968: jis0208<<14 | 0x20<<7 | 0x06, + 35440 - 19968: jis0208<<14 | 0x14<<7 | 0x2C, + 35441 - 19968: jis0208<<14 | 0x2E<<7 | 0x22, + 35442 - 19968: jis0208<<14 | 0x12<<7 | 0x19, + 35443 - 19968: jis0208<<14 | 0x1D<<7 | 0x3B, + 35445 - 19968: jis0212<<14 | 0x3C<<7 | 0x46, + 35446 - 19968: jis0212<<14 | 0x3C<<7 | 0x47, + 35447 - 19968: jis0212<<14 | 0x3C<<7 | 0x48, + 35449 - 19968: jis0208<<14 | 0x5A<<7 | 0x48, + 35450 - 19968: jis0212<<14 | 0x3C<<7 | 0x4A, + 35451 - 19968: jis0212<<14 | 0x3C<<7 | 0x4B, + 35452 - 19968: jis0208<<14 | 0x4A<<7 | 0x2A, + 35454 - 19968: jis0212<<14 | 0x3C<<7 | 0x4C, + 35455 - 19968: jis0212<<14 | 0x3C<<7 | 0x4D, + 35456 - 19968: jis0212<<14 | 0x3C<<7 | 0x4E, + 35458 - 19968: jis0208<<14 | 0x4A<<7 | 0x2F, + 35459 - 19968: jis0212<<14 | 0x3C<<7 | 0x4F, + 35460 - 19968: jis0208<<14 | 0x4A<<7 | 0x30, + 35461 - 19968: jis0208<<14 | 0x4A<<7 | 0x2E, + 35462 - 19968: jis0212<<14 | 0x3C<<7 | 0x50, + 35463 - 19968: jis0208<<14 | 0x17<<7 | 0x37, + 35465 - 19968: jis0208<<14 | 0x2C<<7 | 0x1F, + 35467 - 19968: jis0212<<14 | 0x3C<<7 | 0x51, + 35468 - 19968: jis0208<<14 | 0x1A<<7 | 0x4E, + 35469 - 19968: jis0208<<14 | 0x26<<7 | 0x06, + 35471 - 19968: jis0212<<14 | 0x3C<<7 | 0x52, + 35472 - 19968: jis0212<<14 | 0x3C<<7 | 0x53, + 35473 - 19968: jis0208<<14 | 0x4A<<7 | 0x33, + 35474 - 19968: jis0212<<14 | 0x3C<<7 | 0x54, + 35475 - 19968: jis0208<<14 | 0x1F<<7 | 0x1F, + 35477 - 19968: jis0208<<14 | 0x22<<7 | 0x21, + 35478 - 19968: jis0212<<14 | 0x3C<<7 | 0x55, + 35479 - 19968: jis0212<<14 | 0x3C<<7 | 0x56, + 35480 - 19968: jis0208<<14 | 0x2C<<7 | 0x15, + 35481 - 19968: jis0212<<14 | 0x3C<<7 | 0x57, + 35482 - 19968: jis0208<<14 | 0x4A<<7 | 0x36, + 35486 - 19968: jis0208<<14 | 0x17<<7 | 0x4B, + 35487 - 19968: jis0212<<14 | 0x3C<<7 | 0x58, + 35488 - 19968: jis0208<<14 | 0x1F<<7 | 0x1E, + 35489 - 19968: jis0208<<14 | 0x4A<<7 | 0x32, + 35491 - 19968: jis0208<<14 | 0x4A<<7 | 0x37, + 35492 - 19968: jis0208<<14 | 0x17<<7 | 0x4C, + 35493 - 19968: jis0208<<14 | 0x4A<<7 | 0x34, + 35494 - 19968: jis0208<<14 | 0x4A<<7 | 0x35, + 35495 - 19968: jis0208<<14 | 0x5A<<7 | 0x49, + 35496 - 19968: jis0208<<14 | 0x4A<<7 | 0x31, + 35497 - 19968: jis0212<<14 | 0x3C<<7 | 0x5A, + 35500 - 19968: jis0208<<14 | 0x1F<<7 | 0x41, + 35501 - 19968: jis0208<<14 | 0x25<<7 | 0x28, + 35502 - 19968: jis0212<<14 | 0x3C<<7 | 0x5B, + 35503 - 19968: jis0212<<14 | 0x3C<<7 | 0x5C, + 35504 - 19968: jis0208<<14 | 0x22<<7 | 0x0E, + 35506 - 19968: jis0208<<14 | 0x11<<7 | 0x3C, + 35507 - 19968: jis0212<<14 | 0x3C<<7 | 0x5D, + 35510 - 19968: jis0212<<14 | 0x3D<<7 | 0x00, + 35511 - 19968: jis0212<<14 | 0x3D<<7 | 0x01, + 35513 - 19968: jis0208<<14 | 0x27<<7 | 0x4F, + 35515 - 19968: jis0212<<14 | 0x3D<<7 | 0x02, + 35516 - 19968: jis0208<<14 | 0x14<<7 | 0x22, + 35518 - 19968: jis0208<<14 | 0x5A<<7 | 0x4A, + 35519 - 19968: jis0208<<14 | 0x23<<7 | 0x13, + 35522 - 19968: jis0208<<14 | 0x4A<<7 | 0x3A, + 35523 - 19968: jis0212<<14 | 0x3D<<7 | 0x04, + 35524 - 19968: jis0208<<14 | 0x4A<<7 | 0x38, + 35526 - 19968: jis0212<<14 | 0x3D<<7 | 0x05, + 35527 - 19968: jis0208<<14 | 0x22<<7 | 0x2B, + 35528 - 19968: jis0212<<14 | 0x3D<<7 | 0x06, + 35529 - 19968: jis0212<<14 | 0x3D<<7 | 0x07, + 35530 - 19968: jis0212<<14 | 0x3D<<7 | 0x08, + 35531 - 19968: jis0208<<14 | 0x1F<<7 | 0x20, + 35532 - 19968: jis0208<<14 | 0x13<<7 | 0x31, + 35533 - 19968: jis0208<<14 | 0x4A<<7 | 0x39, + 35535 - 19968: jis0208<<14 | 0x1E<<7 | 0x3A, + 35537 - 19968: jis0212<<14 | 0x3D<<7 | 0x09, + 35538 - 19968: jis0208<<14 | 0x2D<<7 | 0x29, + 35539 - 19968: jis0212<<14 | 0x3D<<7 | 0x0A, + 35540 - 19968: jis0212<<14 | 0x3D<<7 | 0x0B, + 35541 - 19968: jis0212<<14 | 0x3D<<7 | 0x0C, + 35542 - 19968: jis0208<<14 | 0x2E<<7 | 0x1F, + 35543 - 19968: jis0212<<14 | 0x3D<<7 | 0x0D, + 35546 - 19968: jis0208<<14 | 0x4A<<7 | 0x3B, + 35547 - 19968: jis0208<<14 | 0x4A<<7 | 0x46, + 35548 - 19968: jis0208<<14 | 0x23<<7 | 0x14, + 35549 - 19968: jis0212<<14 | 0x3D<<7 | 0x0E, + 35550 - 19968: jis0208<<14 | 0x4A<<7 | 0x45, + 35551 - 19968: jis0208<<14 | 0x5A<<7 | 0x4B, + 35552 - 19968: jis0208<<14 | 0x4A<<7 | 0x42, + 35553 - 19968: jis0208<<14 | 0x4A<<7 | 0x4A, + 35554 - 19968: jis0208<<14 | 0x4A<<7 | 0x43, + 35556 - 19968: jis0208<<14 | 0x4A<<7 | 0x3F, + 35558 - 19968: jis0208<<14 | 0x23<<7 | 0x5B, + 35559 - 19968: jis0208<<14 | 0x4A<<7 | 0x3E, + 35563 - 19968: jis0208<<14 | 0x4A<<7 | 0x3C, + 35564 - 19968: jis0212<<14 | 0x3D<<7 | 0x10, + 35565 - 19968: jis0208<<14 | 0x2C<<7 | 0x00, + 35566 - 19968: jis0208<<14 | 0x1A<<7 | 0x4F, + 35568 - 19968: jis0212<<14 | 0x3D<<7 | 0x11, + 35569 - 19968: jis0208<<14 | 0x4A<<7 | 0x40, + 35571 - 19968: jis0208<<14 | 0x4A<<7 | 0x3D, + 35572 - 19968: jis0212<<14 | 0x3D<<7 | 0x12, + 35573 - 19968: jis0212<<14 | 0x3D<<7 | 0x13, + 35574 - 19968: jis0208<<14 | 0x5A<<7 | 0x4D, + 35575 - 19968: jis0208<<14 | 0x4A<<7 | 0x44, + 35576 - 19968: jis0208<<14 | 0x1C<<7 | 0x53, + 35578 - 19968: jis0208<<14 | 0x17<<7 | 0x20, + 35580 - 19968: jis0212<<14 | 0x3D<<7 | 0x15, + 35582 - 19968: jis0208<<14 | 0x21<<7 | 0x59, + 35583 - 19968: jis0212<<14 | 0x3D<<7 | 0x16, + 35584 - 19968: jis0208<<14 | 0x2A<<7 | 0x24, + 35585 - 19968: jis0208<<14 | 0x10<<7 | 0x39, + 35586 - 19968: jis0208<<14 | 0x0F<<7 | 0x41, + 35588 - 19968: jis0208<<14 | 0x25<<7 | 0x04, + 35589 - 19968: jis0212<<14 | 0x3D<<7 | 0x17, + 35590 - 19968: jis0212<<14 | 0x3D<<7 | 0x18, + 35591 - 19968: jis0208<<14 | 0x4A<<7 | 0x48, + 35594 - 19968: jis0212<<14 | 0x3D<<7 | 0x1E, + 35595 - 19968: jis0212<<14 | 0x3D<<7 | 0x19, + 35596 - 19968: jis0208<<14 | 0x4A<<7 | 0x47, + 35598 - 19968: jis0208<<14 | 0x25<<7 | 0x45, + 35600 - 19968: jis0208<<14 | 0x4A<<7 | 0x4C, + 35601 - 19968: jis0212<<14 | 0x3D<<7 | 0x1A, + 35604 - 19968: jis0208<<14 | 0x4A<<7 | 0x41, + 35606 - 19968: jis0208<<14 | 0x4A<<7 | 0x4B, + 35607 - 19968: jis0208<<14 | 0x4A<<7 | 0x4D, + 35609 - 19968: jis0208<<14 | 0x17<<7 | 0x0B, + 35610 - 19968: jis0208<<14 | 0x4A<<7 | 0x49, + 35611 - 19968: jis0208<<14 | 0x18<<7 | 0x35, + 35612 - 19968: jis0212<<14 | 0x3D<<7 | 0x1B, + 35613 - 19968: jis0208<<14 | 0x1B<<7 | 0x34, + 35614 - 19968: jis0212<<14 | 0x3D<<7 | 0x1C, + 35615 - 19968: jis0212<<14 | 0x3D<<7 | 0x1D, + 35616 - 19968: jis0208<<14 | 0x4A<<7 | 0x4E, + 35617 - 19968: jis0208<<14 | 0x2C<<7 | 0x37, + 35622 - 19968: jis0208<<14 | 0x4A<<7 | 0x51, + 35624 - 19968: jis0208<<14 | 0x4A<<7 | 0x54, + 35627 - 19968: jis0208<<14 | 0x4A<<7 | 0x52, + 35628 - 19968: jis0208<<14 | 0x28<<7 | 0x14, + 35629 - 19968: jis0212<<14 | 0x3D<<7 | 0x1F, + 35632 - 19968: jis0212<<14 | 0x3D<<7 | 0x20, + 35635 - 19968: jis0208<<14 | 0x4A<<7 | 0x4F, + 35639 - 19968: jis0212<<14 | 0x3D<<7 | 0x21, + 35641 - 19968: jis0208<<14 | 0x15<<7 | 0x3F, + 35644 - 19968: jis0212<<14 | 0x3D<<7 | 0x22, + 35646 - 19968: jis0208<<14 | 0x4A<<7 | 0x53, + 35649 - 19968: jis0208<<14 | 0x4A<<7 | 0x55, + 35650 - 19968: jis0212<<14 | 0x3D<<7 | 0x23, + 35651 - 19968: jis0212<<14 | 0x3D<<7 | 0x24, + 35652 - 19968: jis0212<<14 | 0x3D<<7 | 0x25, + 35653 - 19968: jis0212<<14 | 0x3D<<7 | 0x26, + 35654 - 19968: jis0212<<14 | 0x3D<<7 | 0x27, + 35656 - 19968: jis0212<<14 | 0x3D<<7 | 0x28, + 35657 - 19968: jis0208<<14 | 0x4A<<7 | 0x59, + 35660 - 19968: jis0208<<14 | 0x4A<<7 | 0x56, + 35661 - 19968: jis0212<<14 | 0x3D<<7 | 0x2D, + 35662 - 19968: jis0208<<14 | 0x4A<<7 | 0x58, + 35663 - 19968: jis0208<<14 | 0x4A<<7 | 0x57, + 35666 - 19968: jis0212<<14 | 0x3D<<7 | 0x29, + 35667 - 19968: jis0208<<14 | 0x5A<<7 | 0x4E, + 35668 - 19968: jis0212<<14 | 0x3D<<7 | 0x2B, + 35670 - 19968: jis0208<<14 | 0x4A<<7 | 0x5A, + 35672 - 19968: jis0208<<14 | 0x1B<<7 | 0x10, + 35673 - 19968: jis0212<<14 | 0x3D<<7 | 0x2C, + 35674 - 19968: jis0208<<14 | 0x4A<<7 | 0x5C, + 35675 - 19968: jis0208<<14 | 0x4A<<7 | 0x5B, + 35676 - 19968: jis0208<<14 | 0x28<<7 | 0x47, + 35678 - 19968: jis0212<<14 | 0x3D<<7 | 0x2E, + 35679 - 19968: jis0208<<14 | 0x4B<<7 | 0x00, + 35683 - 19968: jis0212<<14 | 0x3D<<7 | 0x2F, + 35686 - 19968: jis0208<<14 | 0x16<<7 | 0x38, + 35691 - 19968: jis0208<<14 | 0x4A<<7 | 0x5D, + 35692 - 19968: jis0208<<14 | 0x4B<<7 | 0x01, + 35693 - 19968: jis0212<<14 | 0x3D<<7 | 0x30, + 35695 - 19968: jis0208<<14 | 0x4B<<7 | 0x02, + 35696 - 19968: jis0208<<14 | 0x14<<7 | 0x23, + 35697 - 19968: jis0208<<14 | 0x45<<7 | 0x20, + 35698 - 19968: jis0208<<14 | 0x1D<<7 | 0x58, + 35700 - 19968: jis0208<<14 | 0x4B<<7 | 0x03, + 35702 - 19968: jis0212<<14 | 0x3D<<7 | 0x31, + 35703 - 19968: jis0208<<14 | 0x17<<7 | 0x4D, + 35704 - 19968: jis0212<<14 | 0x3D<<7 | 0x32, + 35705 - 19968: jis0212<<14 | 0x3D<<7 | 0x33, + 35708 - 19968: jis0212<<14 | 0x3D<<7 | 0x34, + 35709 - 19968: jis0208<<14 | 0x4B<<7 | 0x04, + 35710 - 19968: jis0212<<14 | 0x3D<<7 | 0x35, + 35711 - 19968: jis0208<<14 | 0x5A<<7 | 0x4F, + 35712 - 19968: jis0208<<14 | 0x4B<<7 | 0x05, + 35713 - 19968: jis0212<<14 | 0x3D<<7 | 0x36, + 35715 - 19968: jis0208<<14 | 0x1A<<7 | 0x1D, + 35716 - 19968: jis0212<<14 | 0x3D<<7 | 0x37, + 35717 - 19968: jis0212<<14 | 0x3D<<7 | 0x38, + 35722 - 19968: jis0208<<14 | 0x39<<7 | 0x2D, + 35723 - 19968: jis0212<<14 | 0x3D<<7 | 0x39, + 35724 - 19968: jis0208<<14 | 0x4B<<7 | 0x06, + 35725 - 19968: jis0212<<14 | 0x3D<<7 | 0x3A, + 35726 - 19968: jis0208<<14 | 0x4B<<7 | 0x07, + 35727 - 19968: jis0212<<14 | 0x3D<<7 | 0x3B, + 35728 - 19968: jis0208<<14 | 0x1C<<7 | 0x11, + 35730 - 19968: jis0208<<14 | 0x4B<<7 | 0x08, + 35731 - 19968: jis0208<<14 | 0x4B<<7 | 0x09, + 35732 - 19968: jis0212<<14 | 0x3D<<7 | 0x3C, + 35733 - 19968: jis0212<<14 | 0x3D<<7 | 0x3D, + 35734 - 19968: jis0208<<14 | 0x4B<<7 | 0x0A, + 35737 - 19968: jis0208<<14 | 0x4B<<7 | 0x0B, + 35738 - 19968: jis0208<<14 | 0x4B<<7 | 0x0C, + 35740 - 19968: jis0212<<14 | 0x3D<<7 | 0x3E, + 35742 - 19968: jis0212<<14 | 0x3D<<7 | 0x3F, + 35743 - 19968: jis0212<<14 | 0x3D<<7 | 0x40, + 35895 - 19968: jis0208<<14 | 0x22<<7 | 0x0A, + 35896 - 19968: jis0212<<14 | 0x3D<<7 | 0x41, + 35897 - 19968: jis0212<<14 | 0x3D<<7 | 0x42, + 35898 - 19968: jis0208<<14 | 0x4B<<7 | 0x0D, + 35901 - 19968: jis0212<<14 | 0x3D<<7 | 0x43, + 35902 - 19968: jis0212<<14 | 0x3D<<7 | 0x44, + 35903 - 19968: jis0208<<14 | 0x4B<<7 | 0x0F, + 35905 - 19968: jis0208<<14 | 0x4B<<7 | 0x0E, + 35909 - 19968: jis0212<<14 | 0x3D<<7 | 0x45, + 35910 - 19968: jis0208<<14 | 0x25<<7 | 0x05, + 35911 - 19968: jis0212<<14 | 0x3D<<7 | 0x46, + 35912 - 19968: jis0208<<14 | 0x4B<<7 | 0x10, + 35913 - 19968: jis0212<<14 | 0x3D<<7 | 0x47, + 35914 - 19968: jis0208<<14 | 0x2A<<7 | 0x0C, + 35915 - 19968: jis0212<<14 | 0x3D<<7 | 0x48, + 35916 - 19968: jis0208<<14 | 0x4B<<7 | 0x11, + 35918 - 19968: jis0208<<14 | 0x4B<<7 | 0x12, + 35919 - 19968: jis0212<<14 | 0x3D<<7 | 0x49, + 35920 - 19968: jis0208<<14 | 0x4B<<7 | 0x13, + 35921 - 19968: jis0212<<14 | 0x3D<<7 | 0x4A, + 35923 - 19968: jis0212<<14 | 0x3D<<7 | 0x4B, + 35924 - 19968: jis0212<<14 | 0x3D<<7 | 0x4C, + 35925 - 19968: jis0208<<14 | 0x4B<<7 | 0x14, + 35927 - 19968: jis0212<<14 | 0x3D<<7 | 0x4D, + 35928 - 19968: jis0212<<14 | 0x3D<<7 | 0x4E, + 35929 - 19968: jis0212<<14 | 0x3D<<7 | 0x51, + 35930 - 19968: jis0208<<14 | 0x25<<7 | 0x39, + 35931 - 19968: jis0212<<14 | 0x3D<<7 | 0x4F, + 35933 - 19968: jis0212<<14 | 0x3D<<7 | 0x50, + 35937 - 19968: jis0208<<14 | 0x1D<<7 | 0x3C, + 35938 - 19968: jis0208<<14 | 0x4B<<7 | 0x15, + 35939 - 19968: jis0212<<14 | 0x3D<<7 | 0x52, + 35940 - 19968: jis0212<<14 | 0x3D<<7 | 0x53, + 35942 - 19968: jis0212<<14 | 0x3D<<7 | 0x54, + 35944 - 19968: jis0212<<14 | 0x3D<<7 | 0x55, + 35945 - 19968: jis0212<<14 | 0x3D<<7 | 0x56, + 35946 - 19968: jis0208<<14 | 0x18<<7 | 0x4A, + 35947 - 19968: jis0208<<14 | 0x2F<<7 | 0x0D, + 35948 - 19968: jis0208<<14 | 0x4B<<7 | 0x16, + 35949 - 19968: jis0212<<14 | 0x3D<<7 | 0x57, + 35955 - 19968: jis0212<<14 | 0x3D<<7 | 0x58, + 35957 - 19968: jis0212<<14 | 0x3D<<7 | 0x59, + 35958 - 19968: jis0212<<14 | 0x3D<<7 | 0x5A, + 35960 - 19968: jis0208<<14 | 0x4B<<7 | 0x17, + 35961 - 19968: jis0208<<14 | 0x28<<7 | 0x1E, + 35962 - 19968: jis0208<<14 | 0x4B<<7 | 0x18, + 35963 - 19968: jis0212<<14 | 0x3D<<7 | 0x5B, + 35964 - 19968: jis0208<<14 | 0x4B<<7 | 0x20, + 35966 - 19968: jis0212<<14 | 0x3D<<7 | 0x5C, + 35970 - 19968: jis0208<<14 | 0x4B<<7 | 0x19, + 35973 - 19968: jis0208<<14 | 0x4B<<7 | 0x1B, + 35974 - 19968: jis0212<<14 | 0x3D<<7 | 0x5D, + 35975 - 19968: jis0212<<14 | 0x3E<<7 | 0x00, + 35977 - 19968: jis0208<<14 | 0x4B<<7 | 0x1A, + 35978 - 19968: jis0208<<14 | 0x4B<<7 | 0x1C, + 35979 - 19968: jis0212<<14 | 0x3E<<7 | 0x01, + 35980 - 19968: jis0208<<14 | 0x2A<<7 | 0x25, + 35981 - 19968: jis0208<<14 | 0x4B<<7 | 0x1D, + 35982 - 19968: jis0208<<14 | 0x4B<<7 | 0x1E, + 35984 - 19968: jis0212<<14 | 0x3E<<7 | 0x02, + 35986 - 19968: jis0212<<14 | 0x3E<<7 | 0x03, + 35987 - 19968: jis0212<<14 | 0x3E<<7 | 0x04, + 35988 - 19968: jis0208<<14 | 0x4B<<7 | 0x1F, + 35992 - 19968: jis0208<<14 | 0x4B<<7 | 0x21, + 35993 - 19968: jis0212<<14 | 0x3E<<7 | 0x05, + 35995 - 19968: jis0212<<14 | 0x3E<<7 | 0x06, + 35996 - 19968: jis0212<<14 | 0x3E<<7 | 0x07, + 35997 - 19968: jis0208<<14 | 0x12<<7 | 0x0C, + 35998 - 19968: jis0208<<14 | 0x23<<7 | 0x46, + 36000 - 19968: jis0208<<14 | 0x28<<7 | 0x48, + 36001 - 19968: jis0208<<14 | 0x19<<7 | 0x41, + 36002 - 19968: jis0208<<14 | 0x18<<7 | 0x36, + 36004 - 19968: jis0212<<14 | 0x3E<<7 | 0x08, + 36007 - 19968: jis0208<<14 | 0x28<<7 | 0x2E, + 36008 - 19968: jis0208<<14 | 0x11<<7 | 0x3E, + 36009 - 19968: jis0208<<14 | 0x27<<7 | 0x2D, + 36010 - 19968: jis0208<<14 | 0x4B<<7 | 0x24, + 36011 - 19968: jis0208<<14 | 0x13<<7 | 0x32, + 36012 - 19968: jis0208<<14 | 0x1F<<7 | 0x34, + 36013 - 19968: jis0208<<14 | 0x4B<<7 | 0x23, + 36014 - 19968: jis0208<<14 | 0x4B<<7 | 0x28, + 36015 - 19968: jis0208<<14 | 0x22<<7 | 0x58, + 36016 - 19968: jis0208<<14 | 0x2B<<7 | 0x42, + 36018 - 19968: jis0208<<14 | 0x4B<<7 | 0x26, + 36019 - 19968: jis0208<<14 | 0x4B<<7 | 0x27, + 36020 - 19968: jis0208<<14 | 0x14<<7 | 0x0D, + 36022 - 19968: jis0208<<14 | 0x4B<<7 | 0x29, + 36023 - 19968: jis0208<<14 | 0x26<<7 | 0x42, + 36024 - 19968: jis0208<<14 | 0x21<<7 | 0x3E, + 36025 - 19968: jis0212<<14 | 0x3E<<7 | 0x09, + 36026 - 19968: jis0212<<14 | 0x3E<<7 | 0x0A, + 36027 - 19968: jis0208<<14 | 0x27<<7 | 0x50, + 36028 - 19968: jis0208<<14 | 0x24<<7 | 0x1C, + 36029 - 19968: jis0208<<14 | 0x4B<<7 | 0x25, + 36031 - 19968: jis0208<<14 | 0x2A<<7 | 0x26, + 36032 - 19968: jis0208<<14 | 0x11<<7 | 0x4B, + 36033 - 19968: jis0208<<14 | 0x4B<<7 | 0x2B, + 36034 - 19968: jis0208<<14 | 0x2E<<7 | 0x07, + 36035 - 19968: jis0208<<14 | 0x23<<7 | 0x21, + 36036 - 19968: jis0208<<14 | 0x2E<<7 | 0x24, + 36037 - 19968: jis0212<<14 | 0x3E<<7 | 0x0B, + 36038 - 19968: jis0212<<14 | 0x3E<<7 | 0x0C, + 36039 - 19968: jis0208<<14 | 0x1A<<7 | 0x50, + 36040 - 19968: jis0208<<14 | 0x4B<<7 | 0x2A, + 36041 - 19968: jis0212<<14 | 0x3E<<7 | 0x0D, + 36042 - 19968: jis0208<<14 | 0x21<<7 | 0x10, + 36043 - 19968: jis0212<<14 | 0x3E<<7 | 0x0E, + 36045 - 19968: jis0208<<14 | 0x4B<<7 | 0x3B, + 36046 - 19968: jis0208<<14 | 0x20<<7 | 0x07, + 36047 - 19968: jis0212<<14 | 0x3E<<7 | 0x0F, + 36049 - 19968: jis0208<<14 | 0x25<<7 | 0x57, + 36051 - 19968: jis0208<<14 | 0x28<<7 | 0x2F, + 36053 - 19968: jis0212<<14 | 0x3E<<7 | 0x11, + 36054 - 19968: jis0212<<14 | 0x3E<<7 | 0x10, + 36057 - 19968: jis0212<<14 | 0x3E<<7 | 0x12, + 36058 - 19968: jis0208<<14 | 0x4B<<7 | 0x2E, + 36059 - 19968: jis0208<<14 | 0x1A<<7 | 0x1E, + 36060 - 19968: jis0208<<14 | 0x1A<<7 | 0x51, + 36061 - 19968: jis0212<<14 | 0x3E<<7 | 0x13, + 36062 - 19968: jis0208<<14 | 0x1D<<7 | 0x3D, + 36064 - 19968: jis0208<<14 | 0x26<<7 | 0x44, + 36065 - 19968: jis0212<<14 | 0x3E<<7 | 0x14, + 36066 - 19968: jis0208<<14 | 0x17<<7 | 0x0C, + 36067 - 19968: jis0208<<14 | 0x4B<<7 | 0x2D, + 36068 - 19968: jis0208<<14 | 0x4B<<7 | 0x2C, + 36070 - 19968: jis0208<<14 | 0x28<<7 | 0x49, + 36072 - 19968: jis0212<<14 | 0x3E<<7 | 0x15, + 36074 - 19968: jis0208<<14 | 0x1B<<7 | 0x20, + 36076 - 19968: jis0212<<14 | 0x3E<<7 | 0x16, + 36077 - 19968: jis0208<<14 | 0x24<<7 | 0x31, + 36079 - 19968: jis0212<<14 | 0x3E<<7 | 0x17, + 36080 - 19968: jis0208<<14 | 0x5A<<7 | 0x50, + 36082 - 19968: jis0212<<14 | 0x3E<<7 | 0x19, + 36084 - 19968: jis0208<<14 | 0x5A<<7 | 0x51, + 36085 - 19968: jis0212<<14 | 0x3E<<7 | 0x1A, + 36087 - 19968: jis0212<<14 | 0x3E<<7 | 0x1B, + 36088 - 19968: jis0212<<14 | 0x3E<<7 | 0x1C, + 36090 - 19968: jis0208<<14 | 0x4B<<7 | 0x30, + 36091 - 19968: jis0208<<14 | 0x4B<<7 | 0x31, + 36092 - 19968: jis0208<<14 | 0x18<<7 | 0x37, + 36093 - 19968: jis0208<<14 | 0x4B<<7 | 0x2F, + 36094 - 19968: jis0212<<14 | 0x3E<<7 | 0x1D, + 36095 - 19968: jis0212<<14 | 0x3E<<7 | 0x1E, + 36097 - 19968: jis0212<<14 | 0x3E<<7 | 0x1F, + 36099 - 19968: jis0212<<14 | 0x3E<<7 | 0x20, + 36100 - 19968: jis0208<<14 | 0x4B<<7 | 0x32, + 36101 - 19968: jis0208<<14 | 0x4B<<7 | 0x33, + 36103 - 19968: jis0208<<14 | 0x4B<<7 | 0x35, + 36104 - 19968: jis0208<<14 | 0x21<<7 | 0x02, + 36105 - 19968: jis0212<<14 | 0x3E<<7 | 0x21, + 36106 - 19968: jis0208<<14 | 0x4B<<7 | 0x34, + 36107 - 19968: jis0208<<14 | 0x13<<7 | 0x45, + 36109 - 19968: jis0208<<14 | 0x4B<<7 | 0x37, + 36111 - 19968: jis0208<<14 | 0x4B<<7 | 0x36, + 36112 - 19968: jis0208<<14 | 0x4B<<7 | 0x38, + 36114 - 19968: jis0208<<14 | 0x5A<<7 | 0x52, + 36115 - 19968: jis0208<<14 | 0x4B<<7 | 0x3A, + 36116 - 19968: jis0208<<14 | 0x4B<<7 | 0x3C, + 36118 - 19968: jis0208<<14 | 0x4B<<7 | 0x3D, + 36119 - 19968: jis0212<<14 | 0x3E<<7 | 0x23, + 36123 - 19968: jis0212<<14 | 0x3E<<7 | 0x24, + 36196 - 19968: jis0208<<14 | 0x1F<<7 | 0x35, + 36197 - 19968: jis0212<<14 | 0x3E<<7 | 0x25, + 36198 - 19968: jis0208<<14 | 0x1B<<7 | 0x2E, + 36199 - 19968: jis0208<<14 | 0x4B<<7 | 0x3E, + 36201 - 19968: jis0212<<14 | 0x3E<<7 | 0x26, + 36203 - 19968: jis0208<<14 | 0x12<<7 | 0x31, + 36204 - 19968: jis0212<<14 | 0x3E<<7 | 0x27, + 36205 - 19968: jis0208<<14 | 0x4B<<7 | 0x3F, + 36206 - 19968: jis0212<<14 | 0x3E<<7 | 0x28, + 36208 - 19968: jis0208<<14 | 0x20<<7 | 0x55, + 36209 - 19968: jis0208<<14 | 0x4B<<7 | 0x40, + 36211 - 19968: jis0208<<14 | 0x4B<<7 | 0x41, + 36212 - 19968: jis0208<<14 | 0x28<<7 | 0x4A, + 36214 - 19968: jis0208<<14 | 0x5A<<7 | 0x53, + 36215 - 19968: jis0208<<14 | 0x14<<7 | 0x0E, + 36223 - 19968: jis0212<<14 | 0x3E<<7 | 0x29, + 36225 - 19968: jis0208<<14 | 0x4B<<7 | 0x42, + 36226 - 19968: jis0212<<14 | 0x3E<<7 | 0x2A, + 36228 - 19968: jis0212<<14 | 0x3E<<7 | 0x2B, + 36229 - 19968: jis0208<<14 | 0x23<<7 | 0x15, + 36232 - 19968: jis0212<<14 | 0x3E<<7 | 0x2C, + 36234 - 19968: jis0208<<14 | 0x10<<7 | 0x3A, + 36237 - 19968: jis0212<<14 | 0x3E<<7 | 0x2D, + 36240 - 19968: jis0212<<14 | 0x3E<<7 | 0x2E, + 36241 - 19968: jis0212<<14 | 0x3E<<7 | 0x2F, + 36245 - 19968: jis0212<<14 | 0x3E<<7 | 0x30, + 36249 - 19968: jis0208<<14 | 0x4B<<7 | 0x43, + 36254 - 19968: jis0212<<14 | 0x3E<<7 | 0x31, + 36255 - 19968: jis0212<<14 | 0x3E<<7 | 0x32, + 36256 - 19968: jis0212<<14 | 0x3E<<7 | 0x33, + 36259 - 19968: jis0208<<14 | 0x1B<<7 | 0x50, + 36262 - 19968: jis0212<<14 | 0x3E<<7 | 0x34, + 36264 - 19968: jis0208<<14 | 0x1E<<7 | 0x55, + 36267 - 19968: jis0212<<14 | 0x3E<<7 | 0x35, + 36268 - 19968: jis0212<<14 | 0x3E<<7 | 0x36, + 36271 - 19968: jis0212<<14 | 0x3E<<7 | 0x37, + 36274 - 19968: jis0212<<14 | 0x3E<<7 | 0x38, + 36275 - 19968: jis0208<<14 | 0x21<<7 | 0x0C, + 36277 - 19968: jis0212<<14 | 0x3E<<7 | 0x39, + 36279 - 19968: jis0212<<14 | 0x3E<<7 | 0x3A, + 36281 - 19968: jis0212<<14 | 0x3E<<7 | 0x3B, + 36282 - 19968: jis0208<<14 | 0x4B<<7 | 0x46, + 36283 - 19968: jis0212<<14 | 0x3E<<7 | 0x3C, + 36284 - 19968: jis0212<<14 | 0x3E<<7 | 0x4E, + 36286 - 19968: jis0208<<14 | 0x4B<<7 | 0x45, + 36288 - 19968: jis0212<<14 | 0x3E<<7 | 0x3D, + 36290 - 19968: jis0208<<14 | 0x4B<<7 | 0x44, + 36293 - 19968: jis0212<<14 | 0x3E<<7 | 0x3E, + 36294 - 19968: jis0212<<14 | 0x3E<<7 | 0x3F, + 36295 - 19968: jis0212<<14 | 0x3E<<7 | 0x40, + 36296 - 19968: jis0212<<14 | 0x3E<<7 | 0x41, + 36298 - 19968: jis0212<<14 | 0x3E<<7 | 0x42, + 36299 - 19968: jis0208<<14 | 0x4B<<7 | 0x4C, + 36300 - 19968: jis0208<<14 | 0x4B<<7 | 0x4A, + 36302 - 19968: jis0212<<14 | 0x3E<<7 | 0x43, + 36303 - 19968: jis0208<<14 | 0x4B<<7 | 0x47, + 36305 - 19968: jis0212<<14 | 0x3E<<7 | 0x44, + 36308 - 19968: jis0212<<14 | 0x3E<<7 | 0x45, + 36309 - 19968: jis0212<<14 | 0x3E<<7 | 0x46, + 36310 - 19968: jis0208<<14 | 0x4B<<7 | 0x49, + 36311 - 19968: jis0212<<14 | 0x3E<<7 | 0x47, + 36313 - 19968: jis0212<<14 | 0x3E<<7 | 0x48, + 36314 - 19968: jis0208<<14 | 0x4B<<7 | 0x48, + 36315 - 19968: jis0208<<14 | 0x4B<<7 | 0x4B, + 36317 - 19968: jis0208<<14 | 0x14<<7 | 0x56, + 36319 - 19968: jis0208<<14 | 0x4B<<7 | 0x4F, + 36321 - 19968: jis0208<<14 | 0x1F<<7 | 0x36, + 36323 - 19968: jis0208<<14 | 0x4B<<7 | 0x50, + 36324 - 19968: jis0212<<14 | 0x3E<<7 | 0x49, + 36325 - 19968: jis0212<<14 | 0x3E<<7 | 0x4A, + 36327 - 19968: jis0212<<14 | 0x3E<<7 | 0x4B, + 36328 - 19968: jis0208<<14 | 0x17<<7 | 0x38, + 36330 - 19968: jis0208<<14 | 0x4B<<7 | 0x4D, + 36331 - 19968: jis0208<<14 | 0x4B<<7 | 0x4E, + 36332 - 19968: jis0212<<14 | 0x3E<<7 | 0x4C, + 36335 - 19968: jis0208<<14 | 0x2E<<7 | 0x08, + 36336 - 19968: jis0212<<14 | 0x3E<<7 | 0x4D, + 36337 - 19968: jis0212<<14 | 0x3E<<7 | 0x4F, + 36338 - 19968: jis0212<<14 | 0x3E<<7 | 0x50, + 36339 - 19968: jis0208<<14 | 0x23<<7 | 0x16, + 36340 - 19968: jis0212<<14 | 0x3E<<7 | 0x51, + 36341 - 19968: jis0208<<14 | 0x20<<7 | 0x08, + 36348 - 19968: jis0208<<14 | 0x4B<<7 | 0x51, + 36349 - 19968: jis0212<<14 | 0x3E<<7 | 0x52, + 36351 - 19968: jis0208<<14 | 0x4B<<7 | 0x54, + 36353 - 19968: jis0212<<14 | 0x3E<<7 | 0x53, + 36356 - 19968: jis0212<<14 | 0x3E<<7 | 0x54, + 36357 - 19968: jis0212<<14 | 0x3E<<7 | 0x55, + 36358 - 19968: jis0212<<14 | 0x3E<<7 | 0x56, + 36360 - 19968: jis0208<<14 | 0x4B<<7 | 0x52, + 36361 - 19968: jis0208<<14 | 0x4B<<7 | 0x53, + 36362 - 19968: jis0208<<14 | 0x2C<<7 | 0x38, + 36363 - 19968: jis0212<<14 | 0x3E<<7 | 0x57, + 36367 - 19968: jis0208<<14 | 0x25<<7 | 0x06, + 36368 - 19968: jis0208<<14 | 0x4B<<7 | 0x57, + 36369 - 19968: jis0212<<14 | 0x3E<<7 | 0x58, + 36372 - 19968: jis0212<<14 | 0x3E<<7 | 0x59, + 36374 - 19968: jis0212<<14 | 0x3E<<7 | 0x5A, + 36381 - 19968: jis0208<<14 | 0x4B<<7 | 0x55, + 36382 - 19968: jis0208<<14 | 0x4B<<7 | 0x56, + 36383 - 19968: jis0208<<14 | 0x4B<<7 | 0x58, + 36384 - 19968: jis0212<<14 | 0x3E<<7 | 0x5B, + 36385 - 19968: jis0212<<14 | 0x3E<<7 | 0x5C, + 36386 - 19968: jis0212<<14 | 0x3E<<7 | 0x5D, + 36387 - 19968: jis0212<<14 | 0x3F<<7 | 0x00, + 36390 - 19968: jis0212<<14 | 0x3F<<7 | 0x01, + 36391 - 19968: jis0212<<14 | 0x3F<<7 | 0x02, + 36394 - 19968: jis0208<<14 | 0x4C<<7 | 0x08, + 36400 - 19968: jis0208<<14 | 0x4B<<7 | 0x5B, + 36401 - 19968: jis0212<<14 | 0x3F<<7 | 0x03, + 36403 - 19968: jis0212<<14 | 0x3F<<7 | 0x04, + 36404 - 19968: jis0208<<14 | 0x4B<<7 | 0x5C, + 36405 - 19968: jis0208<<14 | 0x4B<<7 | 0x5A, + 36406 - 19968: jis0212<<14 | 0x3F<<7 | 0x05, + 36407 - 19968: jis0212<<14 | 0x3F<<7 | 0x06, + 36408 - 19968: jis0212<<14 | 0x3F<<7 | 0x07, + 36409 - 19968: jis0212<<14 | 0x3F<<7 | 0x08, + 36413 - 19968: jis0212<<14 | 0x3F<<7 | 0x09, + 36416 - 19968: jis0212<<14 | 0x3F<<7 | 0x0A, + 36417 - 19968: jis0212<<14 | 0x3F<<7 | 0x0B, + 36418 - 19968: jis0208<<14 | 0x4B<<7 | 0x59, + 36420 - 19968: jis0208<<14 | 0x23<<7 | 0x5C, + 36423 - 19968: jis0208<<14 | 0x4C<<7 | 0x00, + 36424 - 19968: jis0208<<14 | 0x4C<<7 | 0x04, + 36425 - 19968: jis0208<<14 | 0x4C<<7 | 0x01, + 36426 - 19968: jis0208<<14 | 0x4B<<7 | 0x5D, + 36427 - 19968: jis0212<<14 | 0x3F<<7 | 0x0C, + 36428 - 19968: jis0208<<14 | 0x4C<<7 | 0x02, + 36429 - 19968: jis0212<<14 | 0x3F<<7 | 0x0D, + 36430 - 19968: jis0212<<14 | 0x3F<<7 | 0x0E, + 36431 - 19968: jis0212<<14 | 0x3F<<7 | 0x0F, + 36432 - 19968: jis0208<<14 | 0x4C<<7 | 0x03, + 36436 - 19968: jis0212<<14 | 0x3F<<7 | 0x10, + 36437 - 19968: jis0208<<14 | 0x4C<<7 | 0x0A, + 36441 - 19968: jis0208<<14 | 0x4C<<7 | 0x05, + 36443 - 19968: jis0212<<14 | 0x3F<<7 | 0x11, + 36444 - 19968: jis0212<<14 | 0x3F<<7 | 0x12, + 36445 - 19968: jis0212<<14 | 0x3F<<7 | 0x13, + 36446 - 19968: jis0212<<14 | 0x3F<<7 | 0x14, + 36447 - 19968: jis0208<<14 | 0x1F<<7 | 0x37, + 36448 - 19968: jis0208<<14 | 0x4C<<7 | 0x07, + 36449 - 19968: jis0212<<14 | 0x3F<<7 | 0x15, + 36450 - 19968: jis0212<<14 | 0x3F<<7 | 0x16, + 36451 - 19968: jis0208<<14 | 0x4C<<7 | 0x09, + 36452 - 19968: jis0208<<14 | 0x4C<<7 | 0x06, + 36457 - 19968: jis0212<<14 | 0x3F<<7 | 0x17, + 36460 - 19968: jis0212<<14 | 0x3F<<7 | 0x18, + 36461 - 19968: jis0212<<14 | 0x3F<<7 | 0x19, + 36463 - 19968: jis0212<<14 | 0x3F<<7 | 0x1A, + 36464 - 19968: jis0212<<14 | 0x3F<<7 | 0x1B, + 36465 - 19968: jis0212<<14 | 0x3F<<7 | 0x1C, + 36466 - 19968: jis0208<<14 | 0x4C<<7 | 0x0C, + 36468 - 19968: jis0208<<14 | 0x1C<<7 | 0x12, + 36470 - 19968: jis0208<<14 | 0x4C<<7 | 0x0B, + 36473 - 19968: jis0212<<14 | 0x3F<<7 | 0x1D, + 36474 - 19968: jis0212<<14 | 0x3F<<7 | 0x1E, + 36475 - 19968: jis0212<<14 | 0x3F<<7 | 0x1F, + 36476 - 19968: jis0208<<14 | 0x4C<<7 | 0x0D, + 36481 - 19968: jis0208<<14 | 0x4C<<7 | 0x0E, + 36482 - 19968: jis0212<<14 | 0x3F<<7 | 0x20, + 36483 - 19968: jis0212<<14 | 0x3F<<7 | 0x21, + 36484 - 19968: jis0208<<14 | 0x4C<<7 | 0x11, + 36485 - 19968: jis0208<<14 | 0x4C<<7 | 0x10, + 36487 - 19968: jis0208<<14 | 0x4C<<7 | 0x0F, + 36489 - 19968: jis0212<<14 | 0x3F<<7 | 0x22, + 36490 - 19968: jis0208<<14 | 0x4C<<7 | 0x13, + 36491 - 19968: jis0208<<14 | 0x4C<<7 | 0x12, + 36493 - 19968: jis0208<<14 | 0x2B<<7 | 0x55, + 36496 - 19968: jis0212<<14 | 0x3F<<7 | 0x23, + 36497 - 19968: jis0208<<14 | 0x4C<<7 | 0x15, + 36498 - 19968: jis0212<<14 | 0x3F<<7 | 0x24, + 36499 - 19968: jis0208<<14 | 0x4C<<7 | 0x14, + 36500 - 19968: jis0208<<14 | 0x4C<<7 | 0x16, + 36501 - 19968: jis0212<<14 | 0x3F<<7 | 0x25, + 36505 - 19968: jis0208<<14 | 0x4C<<7 | 0x17, + 36506 - 19968: jis0212<<14 | 0x3F<<7 | 0x26, + 36507 - 19968: jis0212<<14 | 0x3F<<7 | 0x27, + 36509 - 19968: jis0212<<14 | 0x3F<<7 | 0x28, + 36510 - 19968: jis0212<<14 | 0x3F<<7 | 0x29, + 36513 - 19968: jis0208<<14 | 0x4C<<7 | 0x19, + 36514 - 19968: jis0212<<14 | 0x3F<<7 | 0x2A, + 36519 - 19968: jis0212<<14 | 0x3F<<7 | 0x2B, + 36521 - 19968: jis0212<<14 | 0x3F<<7 | 0x2C, + 36522 - 19968: jis0208<<14 | 0x4C<<7 | 0x18, + 36523 - 19968: jis0208<<14 | 0x1E<<7 | 0x27, + 36524 - 19968: jis0208<<14 | 0x4C<<7 | 0x1A, + 36525 - 19968: jis0212<<14 | 0x3F<<7 | 0x2D, + 36526 - 19968: jis0212<<14 | 0x3F<<7 | 0x2E, + 36527 - 19968: jis0208<<14 | 0x15<<7 | 0x4C, + 36528 - 19968: jis0208<<14 | 0x4C<<7 | 0x1B, + 36529 - 19968: jis0208<<14 | 0x4C<<7 | 0x1D, + 36531 - 19968: jis0212<<14 | 0x3F<<7 | 0x2F, + 36533 - 19968: jis0212<<14 | 0x3F<<7 | 0x30, + 36538 - 19968: jis0212<<14 | 0x3F<<7 | 0x31, + 36539 - 19968: jis0212<<14 | 0x3F<<7 | 0x32, + 36542 - 19968: jis0208<<14 | 0x4C<<7 | 0x1E, + 36544 - 19968: jis0212<<14 | 0x3F<<7 | 0x33, + 36545 - 19968: jis0212<<14 | 0x3F<<7 | 0x34, + 36547 - 19968: jis0212<<14 | 0x3F<<7 | 0x35, + 36548 - 19968: jis0212<<14 | 0x3F<<7 | 0x36, + 36549 - 19968: jis0208<<14 | 0x4C<<7 | 0x1F, + 36550 - 19968: jis0208<<14 | 0x4C<<7 | 0x1C, + 36551 - 19968: jis0212<<14 | 0x3F<<7 | 0x37, + 36552 - 19968: jis0208<<14 | 0x4C<<7 | 0x20, + 36554 - 19968: jis0208<<14 | 0x1B<<7 | 0x35, + 36555 - 19968: jis0208<<14 | 0x4C<<7 | 0x21, + 36556 - 19968: jis0208<<14 | 0x14<<7 | 0x0F, + 36557 - 19968: jis0208<<14 | 0x16<<7 | 0x12, + 36559 - 19968: jis0208<<14 | 0x5A<<7 | 0x55, + 36561 - 19968: jis0212<<14 | 0x3F<<7 | 0x39, + 36562 - 19968: jis0208<<14 | 0x17<<7 | 0x0D, + 36564 - 19968: jis0212<<14 | 0x3F<<7 | 0x3A, + 36571 - 19968: jis0208<<14 | 0x4C<<7 | 0x22, + 36572 - 19968: jis0212<<14 | 0x3F<<7 | 0x3B, + 36575 - 19968: jis0208<<14 | 0x25<<7 | 0x4F, + 36578 - 19968: jis0208<<14 | 0x24<<7 | 0x1D, + 36579 - 19968: jis0208<<14 | 0x4C<<7 | 0x23, + 36584 - 19968: jis0212<<14 | 0x3F<<7 | 0x3C, + 36587 - 19968: jis0208<<14 | 0x4C<<7 | 0x26, + 36589 - 19968: jis0212<<14 | 0x3F<<7 | 0x43, + 36590 - 19968: jis0212<<14 | 0x3F<<7 | 0x3D, + 36592 - 19968: jis0212<<14 | 0x3F<<7 | 0x3E, + 36593 - 19968: jis0212<<14 | 0x3F<<7 | 0x3F, + 36599 - 19968: jis0212<<14 | 0x3F<<7 | 0x40, + 36600 - 19968: jis0208<<14 | 0x1B<<7 | 0x13, + 36601 - 19968: jis0212<<14 | 0x3F<<7 | 0x41, + 36602 - 19968: jis0212<<14 | 0x3F<<7 | 0x42, + 36603 - 19968: jis0208<<14 | 0x4C<<7 | 0x25, + 36604 - 19968: jis0208<<14 | 0x4C<<7 | 0x24, + 36605 - 19968: jis0208<<14 | 0x16<<7 | 0x39, + 36606 - 19968: jis0208<<14 | 0x4C<<7 | 0x27, + 36608 - 19968: jis0212<<14 | 0x3F<<7 | 0x44, + 36610 - 19968: jis0212<<14 | 0x3F<<7 | 0x45, + 36611 - 19968: jis0208<<14 | 0x12<<7 | 0x32, + 36613 - 19968: jis0208<<14 | 0x4C<<7 | 0x29, + 36615 - 19968: jis0212<<14 | 0x3F<<7 | 0x46, + 36616 - 19968: jis0212<<14 | 0x3F<<7 | 0x47, + 36617 - 19968: jis0208<<14 | 0x19<<7 | 0x3B, + 36618 - 19968: jis0208<<14 | 0x4C<<7 | 0x28, + 36620 - 19968: jis0208<<14 | 0x4C<<7 | 0x31, + 36623 - 19968: jis0212<<14 | 0x3F<<7 | 0x48, + 36624 - 19968: jis0212<<14 | 0x3F<<7 | 0x49, + 36626 - 19968: jis0208<<14 | 0x4C<<7 | 0x2B, + 36627 - 19968: jis0208<<14 | 0x4C<<7 | 0x2D, + 36628 - 19968: jis0208<<14 | 0x29<<7 | 0x44, + 36629 - 19968: jis0208<<14 | 0x4C<<7 | 0x2A, + 36630 - 19968: jis0212<<14 | 0x3F<<7 | 0x4A, + 36631 - 19968: jis0212<<14 | 0x3F<<7 | 0x4B, + 36632 - 19968: jis0212<<14 | 0x3F<<7 | 0x4C, + 36633 - 19968: jis0208<<14 | 0x4C<<7 | 0x2C, + 36635 - 19968: jis0208<<14 | 0x4C<<7 | 0x30, + 36636 - 19968: jis0208<<14 | 0x4C<<7 | 0x2E, + 36637 - 19968: jis0208<<14 | 0x14<<7 | 0x10, + 36638 - 19968: jis0212<<14 | 0x3F<<7 | 0x4D, + 36639 - 19968: jis0208<<14 | 0x4C<<7 | 0x2F, + 36640 - 19968: jis0212<<14 | 0x3F<<7 | 0x4E, + 36641 - 19968: jis0212<<14 | 0x3F<<7 | 0x4F, + 36643 - 19968: jis0212<<14 | 0x3F<<7 | 0x50, + 36645 - 19968: jis0212<<14 | 0x3F<<7 | 0x51, + 36646 - 19968: jis0208<<14 | 0x4C<<7 | 0x32, + 36647 - 19968: jis0212<<14 | 0x3F<<7 | 0x52, + 36648 - 19968: jis0212<<14 | 0x3F<<7 | 0x53, + 36649 - 19968: jis0208<<14 | 0x26<<7 | 0x39, + 36650 - 19968: jis0208<<14 | 0x2D<<7 | 0x37, + 36652 - 19968: jis0212<<14 | 0x3F<<7 | 0x54, + 36653 - 19968: jis0212<<14 | 0x3F<<7 | 0x55, + 36654 - 19968: jis0212<<14 | 0x3F<<7 | 0x56, + 36655 - 19968: jis0208<<14 | 0x1C<<7 | 0x13, + 36659 - 19968: jis0208<<14 | 0x4C<<7 | 0x33, + 36660 - 19968: jis0212<<14 | 0x3F<<7 | 0x57, + 36661 - 19968: jis0212<<14 | 0x3F<<7 | 0x58, + 36662 - 19968: jis0212<<14 | 0x3F<<7 | 0x59, + 36663 - 19968: jis0212<<14 | 0x3F<<7 | 0x5A, + 36664 - 19968: jis0208<<14 | 0x2C<<7 | 0x01, + 36665 - 19968: jis0208<<14 | 0x4C<<7 | 0x35, + 36666 - 19968: jis0212<<14 | 0x3F<<7 | 0x5B, + 36667 - 19968: jis0208<<14 | 0x4C<<7 | 0x34, + 36670 - 19968: jis0208<<14 | 0x4C<<7 | 0x38, + 36671 - 19968: jis0208<<14 | 0x2C<<7 | 0x20, + 36672 - 19968: jis0212<<14 | 0x3F<<7 | 0x5C, + 36673 - 19968: jis0212<<14 | 0x3F<<7 | 0x5D, + 36674 - 19968: jis0208<<14 | 0x4C<<7 | 0x37, + 36675 - 19968: jis0212<<14 | 0x40<<7 | 0x00, + 36676 - 19968: jis0208<<14 | 0x12<<7 | 0x4C, + 36677 - 19968: jis0208<<14 | 0x4C<<7 | 0x36, + 36678 - 19968: jis0208<<14 | 0x4C<<7 | 0x3B, + 36679 - 19968: jis0212<<14 | 0x40<<7 | 0x01, + 36681 - 19968: jis0208<<14 | 0x4C<<7 | 0x3A, + 36684 - 19968: jis0208<<14 | 0x4C<<7 | 0x39, + 36685 - 19968: jis0208<<14 | 0x24<<7 | 0x11, + 36686 - 19968: jis0208<<14 | 0x4C<<7 | 0x3C, + 36687 - 19968: jis0212<<14 | 0x40<<7 | 0x02, + 36689 - 19968: jis0212<<14 | 0x40<<7 | 0x03, + 36690 - 19968: jis0212<<14 | 0x40<<7 | 0x04, + 36691 - 19968: jis0212<<14 | 0x40<<7 | 0x05, + 36692 - 19968: jis0212<<14 | 0x40<<7 | 0x06, + 36693 - 19968: jis0212<<14 | 0x40<<7 | 0x07, + 36695 - 19968: jis0208<<14 | 0x4C<<7 | 0x3D, + 36696 - 19968: jis0212<<14 | 0x40<<7 | 0x08, + 36700 - 19968: jis0208<<14 | 0x4C<<7 | 0x3E, + 36701 - 19968: jis0212<<14 | 0x40<<7 | 0x09, + 36702 - 19968: jis0212<<14 | 0x40<<7 | 0x0A, + 36703 - 19968: jis0208<<14 | 0x18<<7 | 0x4B, + 36705 - 19968: jis0208<<14 | 0x16<<7 | 0x04, + 36706 - 19968: jis0208<<14 | 0x4C<<7 | 0x3F, + 36707 - 19968: jis0208<<14 | 0x4C<<7 | 0x40, + 36708 - 19968: jis0208<<14 | 0x4C<<7 | 0x41, + 36709 - 19968: jis0212<<14 | 0x40<<7 | 0x0B, + 36763 - 19968: jis0208<<14 | 0x1E<<7 | 0x28, + 36764 - 19968: jis0208<<14 | 0x4C<<7 | 0x42, + 36765 - 19968: jis0212<<14 | 0x40<<7 | 0x0C, + 36766 - 19968: jis0208<<14 | 0x1B<<7 | 0x0C, + 36767 - 19968: jis0208<<14 | 0x4C<<7 | 0x43, + 36768 - 19968: jis0212<<14 | 0x40<<7 | 0x0D, + 36769 - 19968: jis0212<<14 | 0x40<<7 | 0x0E, + 36771 - 19968: jis0208<<14 | 0x4C<<7 | 0x44, + 36772 - 19968: jis0212<<14 | 0x40<<7 | 0x0F, + 36773 - 19968: jis0212<<14 | 0x40<<7 | 0x10, + 36774 - 19968: jis0212<<14 | 0x40<<7 | 0x11, + 36775 - 19968: jis0208<<14 | 0x31<<7 | 0x00, + 36776 - 19968: jis0208<<14 | 0x30<<7 | 0x5D, + 36781 - 19968: jis0208<<14 | 0x4C<<7 | 0x45, + 36782 - 19968: jis0208<<14 | 0x44<<7 | 0x4F, + 36783 - 19968: jis0208<<14 | 0x4C<<7 | 0x46, + 36784 - 19968: jis0208<<14 | 0x22<<7 | 0x03, + 36785 - 19968: jis0208<<14 | 0x1E<<7 | 0x0A, + 36786 - 19968: jis0208<<14 | 0x26<<7 | 0x1F, + 36789 - 19968: jis0212<<14 | 0x40<<7 | 0x12, + 36790 - 19968: jis0212<<14 | 0x40<<7 | 0x13, + 36791 - 19968: jis0208<<14 | 0x4C<<7 | 0x47, + 36792 - 19968: jis0212<<14 | 0x40<<7 | 0x14, + 36794 - 19968: jis0208<<14 | 0x29<<7 | 0x34, + 36795 - 19968: jis0208<<14 | 0x23<<7 | 0x33, + 36796 - 19968: jis0208<<14 | 0x18<<7 | 0x5D, + 36798 - 19968: jis0212<<14 | 0x40<<7 | 0x15, + 36799 - 19968: jis0208<<14 | 0x22<<7 | 0x08, + 36800 - 19968: jis0212<<14 | 0x40<<7 | 0x16, + 36801 - 19968: jis0212<<14 | 0x40<<7 | 0x17, + 36802 - 19968: jis0208<<14 | 0x10<<7 | 0x09, + 36804 - 19968: jis0208<<14 | 0x2A<<7 | 0x57, + 36805 - 19968: jis0208<<14 | 0x1E<<7 | 0x36, + 36806 - 19968: jis0212<<14 | 0x40<<7 | 0x18, + 36810 - 19968: jis0212<<14 | 0x40<<7 | 0x19, + 36811 - 19968: jis0212<<14 | 0x40<<7 | 0x1A, + 36813 - 19968: jis0212<<14 | 0x40<<7 | 0x1B, + 36814 - 19968: jis0208<<14 | 0x16<<7 | 0x3D, + 36816 - 19968: jis0212<<14 | 0x40<<7 | 0x1C, + 36817 - 19968: jis0208<<14 | 0x15<<7 | 0x40, + 36818 - 19968: jis0212<<14 | 0x40<<7 | 0x1D, + 36819 - 19968: jis0212<<14 | 0x40<<7 | 0x1E, + 36820 - 19968: jis0208<<14 | 0x29<<7 | 0x35, + 36821 - 19968: jis0212<<14 | 0x40<<7 | 0x1F, + 36826 - 19968: jis0208<<14 | 0x4C<<7 | 0x48, + 36832 - 19968: jis0212<<14 | 0x40<<7 | 0x20, + 36834 - 19968: jis0208<<14 | 0x4C<<7 | 0x4A, + 36835 - 19968: jis0212<<14 | 0x40<<7 | 0x21, + 36836 - 19968: jis0212<<14 | 0x40<<7 | 0x22, + 36837 - 19968: jis0208<<14 | 0x4C<<7 | 0x49, + 36838 - 19968: jis0208<<14 | 0x11<<7 | 0x3F, + 36840 - 19968: jis0212<<14 | 0x40<<7 | 0x23, + 36841 - 19968: jis0208<<14 | 0x25<<7 | 0x55, + 36842 - 19968: jis0208<<14 | 0x4C<<7 | 0x4B, + 36843 - 19968: jis0208<<14 | 0x26<<7 | 0x56, + 36845 - 19968: jis0208<<14 | 0x24<<7 | 0x12, + 36846 - 19968: jis0212<<14 | 0x40<<7 | 0x24, + 36847 - 19968: jis0208<<14 | 0x4C<<7 | 0x4C, + 36848 - 19968: jis0208<<14 | 0x1C<<7 | 0x31, + 36849 - 19968: jis0212<<14 | 0x40<<7 | 0x25, + 36852 - 19968: jis0208<<14 | 0x4C<<7 | 0x4E, + 36853 - 19968: jis0212<<14 | 0x40<<7 | 0x26, + 36854 - 19968: jis0212<<14 | 0x40<<7 | 0x27, + 36855 - 19968: jis0208<<14 | 0x2B<<7 | 0x21, + 36856 - 19968: jis0208<<14 | 0x4C<<7 | 0x5D, + 36857 - 19968: jis0208<<14 | 0x4C<<7 | 0x50, + 36858 - 19968: jis0208<<14 | 0x4C<<7 | 0x51, + 36859 - 19968: jis0212<<14 | 0x40<<7 | 0x28, + 36861 - 19968: jis0208<<14 | 0x23<<7 | 0x28, + 36862 - 19968: jis0212<<14 | 0x40<<7 | 0x29, + 36864 - 19968: jis0208<<14 | 0x21<<7 | 0x3F, + 36865 - 19968: jis0208<<14 | 0x20<<7 | 0x56, + 36866 - 19968: jis0212<<14 | 0x40<<7 | 0x2A, + 36867 - 19968: jis0208<<14 | 0x25<<7 | 0x07, + 36868 - 19968: jis0212<<14 | 0x40<<7 | 0x2B, + 36869 - 19968: jis0208<<14 | 0x4C<<7 | 0x4F, + 36870 - 19968: jis0208<<14 | 0x14<<7 | 0x34, + 36872 - 19968: jis0212<<14 | 0x40<<7 | 0x2C, + 36875 - 19968: jis0208<<14 | 0x4C<<7 | 0x58, + 36876 - 19968: jis0212<<14 | 0x40<<7 | 0x2D, + 36877 - 19968: jis0208<<14 | 0x4C<<7 | 0x55, + 36878 - 19968: jis0208<<14 | 0x4D<<7 | 0x04, + 36879 - 19968: jis0208<<14 | 0x25<<7 | 0x08, + 36880 - 19968: jis0208<<14 | 0x22<<7 | 0x3F, + 36881 - 19968: jis0208<<14 | 0x4C<<7 | 0x52, + 36883 - 19968: jis0208<<14 | 0x23<<7 | 0x5D, + 36884 - 19968: jis0208<<14 | 0x24<<7 | 0x32, + 36885 - 19968: jis0208<<14 | 0x4C<<7 | 0x53, + 36886 - 19968: jis0208<<14 | 0x4C<<7 | 0x57, + 36887 - 19968: jis0208<<14 | 0x1E<<7 | 0x3F, + 36888 - 19968: jis0212<<14 | 0x40<<7 | 0x2E, + 36889 - 19968: jis0208<<14 | 0x26<<7 | 0x46, + 36890 - 19968: jis0208<<14 | 0x23<<7 | 0x2B, + 36891 - 19968: jis0212<<14 | 0x40<<7 | 0x2F, + 36893 - 19968: jis0208<<14 | 0x1F<<7 | 0x21, + 36894 - 19968: jis0208<<14 | 0x4C<<7 | 0x56, + 36895 - 19968: jis0208<<14 | 0x21<<7 | 0x0D, + 36896 - 19968: jis0208<<14 | 0x21<<7 | 0x03, + 36897 - 19968: jis0208<<14 | 0x4C<<7 | 0x54, + 36898 - 19968: jis0208<<14 | 0x0F<<7 | 0x08, + 36899 - 19968: jis0208<<14 | 0x2E<<7 | 0x01, + 36903 - 19968: jis0208<<14 | 0x4C<<7 | 0x59, + 36904 - 19968: jis0212<<14 | 0x40<<7 | 0x30, + 36905 - 19968: jis0212<<14 | 0x40<<7 | 0x31, + 36906 - 19968: jis0212<<14 | 0x40<<7 | 0x33, + 36908 - 19968: jis0212<<14 | 0x40<<7 | 0x34, + 36909 - 19968: jis0212<<14 | 0x40<<7 | 0x35, + 36910 - 19968: jis0208<<14 | 0x21<<7 | 0x40, + 36911 - 19968: jis0212<<14 | 0x40<<7 | 0x32, + 36913 - 19968: jis0208<<14 | 0x1C<<7 | 0x14, + 36914 - 19968: jis0208<<14 | 0x1E<<7 | 0x29, + 36915 - 19968: jis0212<<14 | 0x40<<7 | 0x36, + 36916 - 19968: jis0212<<14 | 0x40<<7 | 0x37, + 36917 - 19968: jis0208<<14 | 0x4C<<7 | 0x5B, + 36918 - 19968: jis0208<<14 | 0x4C<<7 | 0x5A, + 36919 - 19968: jis0212<<14 | 0x40<<7 | 0x38, + 36920 - 19968: jis0208<<14 | 0x0F<<7 | 0x4E, + 36921 - 19968: jis0208<<14 | 0x4C<<7 | 0x5C, + 36924 - 19968: jis0208<<14 | 0x28<<7 | 0x0E, + 36926 - 19968: jis0208<<14 | 0x4D<<7 | 0x06, + 36927 - 19968: jis0212<<14 | 0x40<<7 | 0x39, + 36929 - 19968: jis0208<<14 | 0x25<<7 | 0x3A, + 36930 - 19968: jis0208<<14 | 0x1E<<7 | 0x4A, + 36931 - 19968: jis0212<<14 | 0x40<<7 | 0x3A, + 36932 - 19968: jis0212<<14 | 0x40<<7 | 0x3B, + 36933 - 19968: jis0208<<14 | 0x22<<7 | 0x38, + 36935 - 19968: jis0208<<14 | 0x15<<7 | 0x57, + 36937 - 19968: jis0208<<14 | 0x4D<<7 | 0x05, + 36938 - 19968: jis0208<<14 | 0x2C<<7 | 0x16, + 36939 - 19968: jis0208<<14 | 0x10<<7 | 0x1E, + 36940 - 19968: jis0212<<14 | 0x40<<7 | 0x3C, + 36941 - 19968: jis0208<<14 | 0x29<<7 | 0x36, + 36942 - 19968: jis0208<<14 | 0x11<<7 | 0x40, + 36943 - 19968: jis0208<<14 | 0x4D<<7 | 0x00, + 36944 - 19968: jis0208<<14 | 0x4D<<7 | 0x01, + 36945 - 19968: jis0208<<14 | 0x4D<<7 | 0x02, + 36946 - 19968: jis0208<<14 | 0x4D<<7 | 0x03, + 36947 - 19968: jis0208<<14 | 0x25<<7 | 0x1A, + 36948 - 19968: jis0208<<14 | 0x22<<7 | 0x02, + 36949 - 19968: jis0208<<14 | 0x0F<<7 | 0x42, + 36950 - 19968: jis0208<<14 | 0x4D<<7 | 0x07, + 36952 - 19968: jis0208<<14 | 0x4D<<7 | 0x08, + 36953 - 19968: jis0208<<14 | 0x53<<7 | 0x02, + 36955 - 19968: jis0212<<14 | 0x40<<7 | 0x3D, + 36956 - 19968: jis0208<<14 | 0x21<<7 | 0x1C, + 36957 - 19968: jis0212<<14 | 0x40<<7 | 0x3E, + 36958 - 19968: jis0208<<14 | 0x4D<<7 | 0x09, + 36960 - 19968: jis0208<<14 | 0x10<<7 | 0x52, + 36961 - 19968: jis0208<<14 | 0x20<<7 | 0x2B, + 36962 - 19968: jis0212<<14 | 0x40<<7 | 0x3F, + 36963 - 19968: jis0208<<14 | 0x17<<7 | 0x0E, + 36965 - 19968: jis0208<<14 | 0x2C<<7 | 0x39, + 36966 - 19968: jis0212<<14 | 0x40<<7 | 0x40, + 36967 - 19968: jis0208<<14 | 0x5A<<7 | 0x58, + 36968 - 19968: jis0208<<14 | 0x4D<<7 | 0x0A, + 36969 - 19968: jis0208<<14 | 0x24<<7 | 0x0B, + 36972 - 19968: jis0212<<14 | 0x40<<7 | 0x42, + 36973 - 19968: jis0208<<14 | 0x20<<7 | 0x57, + 36974 - 19968: jis0208<<14 | 0x1B<<7 | 0x36, + 36975 - 19968: jis0208<<14 | 0x4D<<7 | 0x0B, + 36976 - 19968: jis0212<<14 | 0x40<<7 | 0x43, + 36978 - 19968: jis0208<<14 | 0x4D<<7 | 0x0E, + 36980 - 19968: jis0212<<14 | 0x40<<7 | 0x44, + 36981 - 19968: jis0208<<14 | 0x1C<<7 | 0x44, + 36982 - 19968: jis0208<<14 | 0x4D<<7 | 0x0C, + 36983 - 19968: jis0208<<14 | 0x20<<7 | 0x0A, + 36984 - 19968: jis0208<<14 | 0x20<<7 | 0x09, + 36985 - 19968: jis0212<<14 | 0x40<<7 | 0x45, + 36986 - 19968: jis0208<<14 | 0x0F<<7 | 0x43, + 36988 - 19968: jis0208<<14 | 0x2D<<7 | 0x2A, + 36989 - 19968: jis0208<<14 | 0x4D<<7 | 0x10, + 36991 - 19968: jis0208<<14 | 0x27<<7 | 0x51, + 36992 - 19968: jis0208<<14 | 0x4D<<7 | 0x12, + 36993 - 19968: jis0208<<14 | 0x4D<<7 | 0x11, + 36994 - 19968: jis0208<<14 | 0x4D<<7 | 0x0F, + 36995 - 19968: jis0208<<14 | 0x42<<7 | 0x43, + 36996 - 19968: jis0208<<14 | 0x13<<7 | 0x33, + 36997 - 19968: jis0212<<14 | 0x40<<7 | 0x46, + 36999 - 19968: jis0208<<14 | 0x4C<<7 | 0x4D, + 37000 - 19968: jis0212<<14 | 0x40<<7 | 0x47, + 37001 - 19968: jis0208<<14 | 0x4D<<7 | 0x14, + 37002 - 19968: jis0208<<14 | 0x4D<<7 | 0x13, + 37003 - 19968: jis0212<<14 | 0x40<<7 | 0x48, + 37004 - 19968: jis0212<<14 | 0x40<<7 | 0x49, + 37006 - 19968: jis0212<<14 | 0x40<<7 | 0x4A, + 37007 - 19968: jis0208<<14 | 0x4D<<7 | 0x15, + 37008 - 19968: jis0212<<14 | 0x40<<7 | 0x4B, + 37009 - 19968: jis0208<<14 | 0x2C<<7 | 0x17, + 37013 - 19968: jis0212<<14 | 0x40<<7 | 0x4C, + 37015 - 19968: jis0212<<14 | 0x40<<7 | 0x4D, + 37016 - 19968: jis0212<<14 | 0x40<<7 | 0x4E, + 37017 - 19968: jis0212<<14 | 0x40<<7 | 0x4F, + 37019 - 19968: jis0212<<14 | 0x40<<7 | 0x50, + 37024 - 19968: jis0212<<14 | 0x40<<7 | 0x51, + 37025 - 19968: jis0212<<14 | 0x40<<7 | 0x52, + 37026 - 19968: jis0212<<14 | 0x40<<7 | 0x53, + 37027 - 19968: jis0208<<14 | 0x25<<7 | 0x40, + 37029 - 19968: jis0212<<14 | 0x40<<7 | 0x54, + 37030 - 19968: jis0208<<14 | 0x2A<<7 | 0x0D, + 37032 - 19968: jis0208<<14 | 0x4D<<7 | 0x16, + 37034 - 19968: jis0208<<14 | 0x1B<<7 | 0x38, + 37039 - 19968: jis0208<<14 | 0x4D<<7 | 0x17, + 37040 - 19968: jis0212<<14 | 0x40<<7 | 0x55, + 37041 - 19968: jis0208<<14 | 0x4D<<7 | 0x18, + 37042 - 19968: jis0212<<14 | 0x40<<7 | 0x56, + 37043 - 19968: jis0212<<14 | 0x40<<7 | 0x57, + 37044 - 19968: jis0212<<14 | 0x40<<7 | 0x58, + 37045 - 19968: jis0208<<14 | 0x4D<<7 | 0x19, + 37046 - 19968: jis0212<<14 | 0x40<<7 | 0x59, + 37048 - 19968: jis0208<<14 | 0x24<<7 | 0x00, + 37053 - 19968: jis0212<<14 | 0x40<<7 | 0x5A, + 37054 - 19968: jis0212<<14 | 0x40<<7 | 0x5C, + 37057 - 19968: jis0208<<14 | 0x0F<<7 | 0x49, + 37059 - 19968: jis0212<<14 | 0x40<<7 | 0x5D, + 37060 - 19968: jis0212<<14 | 0x41<<7 | 0x00, + 37061 - 19968: jis0212<<14 | 0x41<<7 | 0x01, + 37063 - 19968: jis0212<<14 | 0x41<<7 | 0x02, + 37064 - 19968: jis0212<<14 | 0x41<<7 | 0x03, + 37066 - 19968: jis0208<<14 | 0x18<<7 | 0x38, + 37068 - 19968: jis0212<<14 | 0x40<<7 | 0x5B, + 37070 - 19968: jis0208<<14 | 0x2E<<7 | 0x19, + 37074 - 19968: jis0212<<14 | 0x41<<7 | 0x0C, + 37077 - 19968: jis0212<<14 | 0x41<<7 | 0x04, + 37079 - 19968: jis0212<<14 | 0x41<<7 | 0x05, + 37080 - 19968: jis0212<<14 | 0x41<<7 | 0x06, + 37081 - 19968: jis0212<<14 | 0x41<<7 | 0x07, + 37083 - 19968: jis0208<<14 | 0x4D<<7 | 0x1D, + 37084 - 19968: jis0212<<14 | 0x41<<7 | 0x08, + 37085 - 19968: jis0212<<14 | 0x41<<7 | 0x09, + 37086 - 19968: jis0208<<14 | 0x5A<<7 | 0x59, + 37087 - 19968: jis0212<<14 | 0x41<<7 | 0x0A, + 37089 - 19968: jis0208<<14 | 0x16<<7 | 0x13, + 37090 - 19968: jis0208<<14 | 0x4D<<7 | 0x1A, + 37092 - 19968: jis0208<<14 | 0x4D<<7 | 0x1B, + 37093 - 19968: jis0212<<14 | 0x41<<7 | 0x0B, + 37096 - 19968: jis0208<<14 | 0x28<<7 | 0x53, + 37099 - 19968: jis0212<<14 | 0x41<<7 | 0x0E, + 37101 - 19968: jis0208<<14 | 0x12<<7 | 0x33, + 37103 - 19968: jis0212<<14 | 0x41<<7 | 0x0F, + 37104 - 19968: jis0212<<14 | 0x41<<7 | 0x10, + 37108 - 19968: jis0212<<14 | 0x41<<7 | 0x11, + 37109 - 19968: jis0208<<14 | 0x2C<<7 | 0x18, + 37110 - 19968: jis0212<<14 | 0x41<<7 | 0x0D, + 37111 - 19968: jis0208<<14 | 0x15<<7 | 0x1E, + 37117 - 19968: jis0208<<14 | 0x24<<7 | 0x33, + 37118 - 19968: jis0212<<14 | 0x41<<7 | 0x12, + 37119 - 19968: jis0212<<14 | 0x41<<7 | 0x13, + 37120 - 19968: jis0212<<14 | 0x41<<7 | 0x14, + 37122 - 19968: jis0208<<14 | 0x4D<<7 | 0x1E, + 37124 - 19968: jis0212<<14 | 0x41<<7 | 0x15, + 37125 - 19968: jis0212<<14 | 0x41<<7 | 0x16, + 37126 - 19968: jis0212<<14 | 0x41<<7 | 0x17, + 37128 - 19968: jis0212<<14 | 0x41<<7 | 0x18, + 37133 - 19968: jis0212<<14 | 0x41<<7 | 0x19, + 37136 - 19968: jis0212<<14 | 0x41<<7 | 0x1A, + 37138 - 19968: jis0208<<14 | 0x4D<<7 | 0x1F, + 37140 - 19968: jis0212<<14 | 0x41<<7 | 0x1B, + 37141 - 19968: jis0208<<14 | 0x5A<<7 | 0x5B, + 37142 - 19968: jis0212<<14 | 0x41<<7 | 0x1C, + 37143 - 19968: jis0212<<14 | 0x41<<7 | 0x1D, + 37144 - 19968: jis0212<<14 | 0x41<<7 | 0x1E, + 37145 - 19968: jis0208<<14 | 0x4D<<7 | 0x20, + 37146 - 19968: jis0212<<14 | 0x41<<7 | 0x1F, + 37148 - 19968: jis0212<<14 | 0x41<<7 | 0x20, + 37150 - 19968: jis0212<<14 | 0x41<<7 | 0x21, + 37152 - 19968: jis0212<<14 | 0x41<<7 | 0x22, + 37154 - 19968: jis0212<<14 | 0x41<<7 | 0x24, + 37155 - 19968: jis0212<<14 | 0x41<<7 | 0x25, + 37157 - 19968: jis0212<<14 | 0x41<<7 | 0x23, + 37159 - 19968: jis0208<<14 | 0x5A<<7 | 0x5C, + 37161 - 19968: jis0212<<14 | 0x41<<7 | 0x27, + 37165 - 19968: jis0208<<14 | 0x24<<7 | 0x01, + 37166 - 19968: jis0212<<14 | 0x41<<7 | 0x28, + 37167 - 19968: jis0212<<14 | 0x41<<7 | 0x29, + 37168 - 19968: jis0208<<14 | 0x4D<<7 | 0x22, + 37169 - 19968: jis0212<<14 | 0x41<<7 | 0x2A, + 37170 - 19968: jis0208<<14 | 0x4D<<7 | 0x21, + 37172 - 19968: jis0212<<14 | 0x41<<7 | 0x2B, + 37174 - 19968: jis0212<<14 | 0x41<<7 | 0x2C, + 37175 - 19968: jis0212<<14 | 0x41<<7 | 0x2D, + 37177 - 19968: jis0212<<14 | 0x41<<7 | 0x2E, + 37178 - 19968: jis0212<<14 | 0x41<<7 | 0x2F, + 37180 - 19968: jis0212<<14 | 0x41<<7 | 0x30, + 37181 - 19968: jis0212<<14 | 0x41<<7 | 0x31, + 37187 - 19968: jis0212<<14 | 0x41<<7 | 0x32, + 37191 - 19968: jis0212<<14 | 0x41<<7 | 0x33, + 37192 - 19968: jis0212<<14 | 0x41<<7 | 0x34, + 37193 - 19968: jis0208<<14 | 0x25<<7 | 0x32, + 37194 - 19968: jis0208<<14 | 0x4D<<7 | 0x23, + 37195 - 19968: jis0208<<14 | 0x1C<<7 | 0x15, + 37196 - 19968: jis0208<<14 | 0x1B<<7 | 0x3F, + 37197 - 19968: jis0208<<14 | 0x26<<7 | 0x3A, + 37198 - 19968: jis0208<<14 | 0x22<<7 | 0x50, + 37199 - 19968: jis0212<<14 | 0x41<<7 | 0x35, + 37202 - 19968: jis0208<<14 | 0x1B<<7 | 0x51, + 37203 - 19968: jis0212<<14 | 0x41<<7 | 0x36, + 37204 - 19968: jis0208<<14 | 0x1E<<7 | 0x4B, + 37206 - 19968: jis0208<<14 | 0x4D<<7 | 0x24, + 37207 - 19968: jis0212<<14 | 0x41<<7 | 0x37, + 37208 - 19968: jis0208<<14 | 0x4D<<7 | 0x25, + 37209 - 19968: jis0212<<14 | 0x41<<7 | 0x38, + 37210 - 19968: jis0212<<14 | 0x41<<7 | 0x39, + 37211 - 19968: jis0212<<14 | 0x41<<7 | 0x3A, + 37217 - 19968: jis0212<<14 | 0x41<<7 | 0x3B, + 37218 - 19968: jis0208<<14 | 0x1E<<7 | 0x3C, + 37219 - 19968: jis0208<<14 | 0x4D<<7 | 0x26, + 37220 - 19968: jis0212<<14 | 0x41<<7 | 0x3C, + 37221 - 19968: jis0208<<14 | 0x4D<<7 | 0x27, + 37223 - 19968: jis0212<<14 | 0x41<<7 | 0x3D, + 37225 - 19968: jis0208<<14 | 0x4D<<7 | 0x28, + 37226 - 19968: jis0208<<14 | 0x2C<<7 | 0x4E, + 37228 - 19968: jis0208<<14 | 0x1C<<7 | 0x16, + 37229 - 19968: jis0212<<14 | 0x41<<7 | 0x3E, + 37234 - 19968: jis0208<<14 | 0x4D<<7 | 0x2A, + 37235 - 19968: jis0208<<14 | 0x4D<<7 | 0x29, + 37236 - 19968: jis0212<<14 | 0x41<<7 | 0x3F, + 37237 - 19968: jis0208<<14 | 0x18<<7 | 0x39, + 37239 - 19968: jis0208<<14 | 0x18<<7 | 0x52, + 37240 - 19968: jis0208<<14 | 0x1A<<7 | 0x1F, + 37241 - 19968: jis0212<<14 | 0x41<<7 | 0x40, + 37242 - 19968: jis0212<<14 | 0x41<<7 | 0x41, + 37243 - 19968: jis0212<<14 | 0x41<<7 | 0x42, + 37249 - 19968: jis0212<<14 | 0x41<<7 | 0x43, + 37250 - 19968: jis0208<<14 | 0x4D<<7 | 0x2D, + 37251 - 19968: jis0212<<14 | 0x41<<7 | 0x44, + 37253 - 19968: jis0212<<14 | 0x41<<7 | 0x45, + 37254 - 19968: jis0212<<14 | 0x41<<7 | 0x46, + 37255 - 19968: jis0208<<14 | 0x1C<<7 | 0x45, + 37257 - 19968: jis0208<<14 | 0x4D<<7 | 0x2C, + 37258 - 19968: jis0212<<14 | 0x41<<7 | 0x47, + 37259 - 19968: jis0208<<14 | 0x4D<<7 | 0x2B, + 37261 - 19968: jis0208<<14 | 0x21<<7 | 0x48, + 37262 - 19968: jis0212<<14 | 0x41<<7 | 0x48, + 37264 - 19968: jis0208<<14 | 0x17<<7 | 0x4E, + 37265 - 19968: jis0212<<14 | 0x41<<7 | 0x49, + 37266 - 19968: jis0208<<14 | 0x1F<<7 | 0x22, + 37267 - 19968: jis0212<<14 | 0x41<<7 | 0x4A, + 37268 - 19968: jis0212<<14 | 0x41<<7 | 0x4B, + 37269 - 19968: jis0212<<14 | 0x41<<7 | 0x4C, + 37271 - 19968: jis0208<<14 | 0x27<<7 | 0x0F, + 37272 - 19968: jis0212<<14 | 0x41<<7 | 0x4D, + 37276 - 19968: jis0208<<14 | 0x1C<<7 | 0x18, + 37278 - 19968: jis0212<<14 | 0x41<<7 | 0x4E, + 37281 - 19968: jis0212<<14 | 0x41<<7 | 0x4F, + 37282 - 19968: jis0208<<14 | 0x4D<<7 | 0x2E, + 37284 - 19968: jis0208<<14 | 0x1D<<7 | 0x3E, + 37286 - 19968: jis0212<<14 | 0x41<<7 | 0x50, + 37288 - 19968: jis0212<<14 | 0x41<<7 | 0x51, + 37290 - 19968: jis0208<<14 | 0x4D<<7 | 0x31, + 37291 - 19968: jis0208<<14 | 0x4D<<7 | 0x2F, + 37292 - 19968: jis0212<<14 | 0x41<<7 | 0x52, + 37293 - 19968: jis0212<<14 | 0x41<<7 | 0x53, + 37294 - 19968: jis0212<<14 | 0x41<<7 | 0x54, + 37295 - 19968: jis0208<<14 | 0x4D<<7 | 0x30, + 37296 - 19968: jis0212<<14 | 0x41<<7 | 0x55, + 37297 - 19968: jis0212<<14 | 0x41<<7 | 0x56, + 37298 - 19968: jis0212<<14 | 0x41<<7 | 0x57, + 37299 - 19968: jis0212<<14 | 0x41<<7 | 0x58, + 37300 - 19968: jis0208<<14 | 0x4D<<7 | 0x33, + 37301 - 19968: jis0208<<14 | 0x4D<<7 | 0x32, + 37302 - 19968: jis0212<<14 | 0x41<<7 | 0x59, + 37304 - 19968: jis0208<<14 | 0x1D<<7 | 0x59, + 37306 - 19968: jis0208<<14 | 0x4D<<7 | 0x34, + 37307 - 19968: jis0212<<14 | 0x41<<7 | 0x5A, + 37308 - 19968: jis0212<<14 | 0x41<<7 | 0x5B, + 37309 - 19968: jis0212<<14 | 0x41<<7 | 0x5C, + 37311 - 19968: jis0212<<14 | 0x41<<7 | 0x5D, + 37312 - 19968: jis0208<<14 | 0x4D<<7 | 0x35, + 37313 - 19968: jis0208<<14 | 0x4D<<7 | 0x36, + 37314 - 19968: jis0212<<14 | 0x42<<7 | 0x00, + 37315 - 19968: jis0212<<14 | 0x42<<7 | 0x01, + 37317 - 19968: jis0212<<14 | 0x42<<7 | 0x02, + 37318 - 19968: jis0208<<14 | 0x27<<7 | 0x2F, + 37319 - 19968: jis0208<<14 | 0x19<<7 | 0x32, + 37320 - 19968: jis0208<<14 | 0x1B<<7 | 0x40, + 37321 - 19968: jis0208<<14 | 0x4D<<7 | 0x37, + 37323 - 19968: jis0208<<14 | 0x4D<<7 | 0x38, + 37324 - 19968: jis0208<<14 | 0x2D<<7 | 0x03, + 37325 - 19968: jis0208<<14 | 0x1C<<7 | 0x24, + 37326 - 19968: jis0208<<14 | 0x2B<<7 | 0x4D, + 37327 - 19968: jis0208<<14 | 0x2D<<7 | 0x2B, + 37328 - 19968: jis0208<<14 | 0x4D<<7 | 0x39, + 37329 - 19968: jis0208<<14 | 0x15<<7 | 0x41, + 37331 - 19968: jis0212<<14 | 0x42<<7 | 0x03, + 37332 - 19968: jis0212<<14 | 0x42<<7 | 0x04, + 37334 - 19968: jis0208<<14 | 0x4D<<7 | 0x3A, + 37335 - 19968: jis0208<<14 | 0x5B<<7 | 0x00, + 37336 - 19968: jis0208<<14 | 0x24<<7 | 0x02, + 37337 - 19968: jis0212<<14 | 0x42<<7 | 0x06, + 37338 - 19968: jis0208<<14 | 0x5A<<7 | 0x5D, + 37339 - 19968: jis0208<<14 | 0x4D<<7 | 0x3D, + 37340 - 19968: jis0208<<14 | 0x12<<7 | 0x57, + 37341 - 19968: jis0208<<14 | 0x1E<<7 | 0x2A, + 37342 - 19968: jis0208<<14 | 0x5B<<7 | 0x01, + 37343 - 19968: jis0208<<14 | 0x4D<<7 | 0x3B, + 37345 - 19968: jis0208<<14 | 0x4D<<7 | 0x3C, + 37347 - 19968: jis0208<<14 | 0x23<<7 | 0x3F, + 37348 - 19968: jis0208<<14 | 0x5B<<7 | 0x04, + 37349 - 19968: jis0208<<14 | 0x5B<<7 | 0x05, + 37350 - 19968: jis0208<<14 | 0x2A<<7 | 0x34, + 37351 - 19968: jis0208<<14 | 0x15<<7 | 0x5B, + 37353 - 19968: jis0212<<14 | 0x42<<7 | 0x0B, + 37354 - 19968: jis0212<<14 | 0x42<<7 | 0x0C, + 37356 - 19968: jis0212<<14 | 0x42<<7 | 0x0D, + 37357 - 19968: jis0208<<14 | 0x5B<<7 | 0x02, + 37358 - 19968: jis0208<<14 | 0x5B<<7 | 0x03, + 37359 - 19968: jis0212<<14 | 0x42<<7 | 0x10, + 37360 - 19968: jis0212<<14 | 0x42<<7 | 0x11, + 37361 - 19968: jis0212<<14 | 0x42<<7 | 0x12, + 37365 - 19968: jis0208<<14 | 0x4D<<7 | 0x3F, + 37366 - 19968: jis0208<<14 | 0x4D<<7 | 0x40, + 37367 - 19968: jis0212<<14 | 0x42<<7 | 0x13, + 37369 - 19968: jis0212<<14 | 0x42<<7 | 0x14, + 37371 - 19968: jis0212<<14 | 0x42<<7 | 0x15, + 37372 - 19968: jis0208<<14 | 0x4D<<7 | 0x3E, + 37373 - 19968: jis0212<<14 | 0x42<<7 | 0x16, + 37375 - 19968: jis0208<<14 | 0x4D<<7 | 0x42, + 37376 - 19968: jis0212<<14 | 0x42<<7 | 0x17, + 37377 - 19968: jis0212<<14 | 0x42<<7 | 0x18, + 37380 - 19968: jis0212<<14 | 0x42<<7 | 0x19, + 37381 - 19968: jis0212<<14 | 0x42<<7 | 0x1A, + 37382 - 19968: jis0208<<14 | 0x5B<<7 | 0x06, + 37383 - 19968: jis0212<<14 | 0x42<<7 | 0x1C, + 37385 - 19968: jis0212<<14 | 0x42<<7 | 0x1D, + 37386 - 19968: jis0208<<14 | 0x5B<<7 | 0x08, + 37388 - 19968: jis0212<<14 | 0x42<<7 | 0x1F, + 37389 - 19968: jis0208<<14 | 0x25<<7 | 0x3E, + 37390 - 19968: jis0208<<14 | 0x12<<7 | 0x22, + 37392 - 19968: jis0208<<14 | 0x5B<<7 | 0x07, + 37393 - 19968: jis0208<<14 | 0x4D<<7 | 0x46, + 37394 - 19968: jis0212<<14 | 0x42<<7 | 0x21, + 37395 - 19968: jis0212<<14 | 0x42<<7 | 0x22, + 37396 - 19968: jis0208<<14 | 0x4D<<7 | 0x43, + 37397 - 19968: jis0208<<14 | 0x4D<<7 | 0x45, + 37398 - 19968: jis0212<<14 | 0x42<<7 | 0x23, + 37400 - 19968: jis0212<<14 | 0x42<<7 | 0x24, + 37404 - 19968: jis0212<<14 | 0x42<<7 | 0x25, + 37405 - 19968: jis0212<<14 | 0x42<<7 | 0x26, + 37406 - 19968: jis0208<<14 | 0x4D<<7 | 0x41, + 37411 - 19968: jis0212<<14 | 0x42<<7 | 0x27, + 37412 - 19968: jis0212<<14 | 0x42<<7 | 0x28, + 37413 - 19968: jis0212<<14 | 0x42<<7 | 0x29, + 37414 - 19968: jis0212<<14 | 0x42<<7 | 0x2A, + 37416 - 19968: jis0212<<14 | 0x42<<7 | 0x2B, + 37417 - 19968: jis0208<<14 | 0x4E<<7 | 0x2E, + 37420 - 19968: jis0208<<14 | 0x4D<<7 | 0x44, + 37422 - 19968: jis0212<<14 | 0x42<<7 | 0x2C, + 37423 - 19968: jis0212<<14 | 0x42<<7 | 0x2D, + 37424 - 19968: jis0212<<14 | 0x42<<7 | 0x2E, + 37427 - 19968: jis0212<<14 | 0x42<<7 | 0x2F, + 37428 - 19968: jis0208<<14 | 0x2D<<7 | 0x4A, + 37429 - 19968: jis0212<<14 | 0x42<<7 | 0x30, + 37430 - 19968: jis0212<<14 | 0x42<<7 | 0x31, + 37431 - 19968: jis0208<<14 | 0x17<<7 | 0x39, + 37432 - 19968: jis0212<<14 | 0x42<<7 | 0x32, + 37433 - 19968: jis0208<<14 | 0x5B<<7 | 0x0F, + 37434 - 19968: jis0208<<14 | 0x5B<<7 | 0x09, + 37436 - 19968: jis0208<<14 | 0x5B<<7 | 0x0B, + 37438 - 19968: jis0212<<14 | 0x42<<7 | 0x36, + 37439 - 19968: jis0208<<14 | 0x4D<<7 | 0x4E, + 37440 - 19968: jis0208<<14 | 0x5B<<7 | 0x0A, + 37442 - 19968: jis0212<<14 | 0x42<<7 | 0x38, + 37443 - 19968: jis0212<<14 | 0x42<<7 | 0x39, + 37444 - 19968: jis0208<<14 | 0x24<<7 | 0x13, + 37445 - 19968: jis0208<<14 | 0x4D<<7 | 0x49, + 37446 - 19968: jis0212<<14 | 0x42<<7 | 0x3A, + 37447 - 19968: jis0212<<14 | 0x42<<7 | 0x3B, + 37448 - 19968: jis0208<<14 | 0x4D<<7 | 0x4C, + 37449 - 19968: jis0208<<14 | 0x4D<<7 | 0x4A, + 37450 - 19968: jis0212<<14 | 0x42<<7 | 0x3C, + 37451 - 19968: jis0208<<14 | 0x4D<<7 | 0x4F, + 37453 - 19968: jis0212<<14 | 0x42<<7 | 0x3D, + 37454 - 19968: jis0208<<14 | 0x5B<<7 | 0x0C, + 37455 - 19968: jis0212<<14 | 0x42<<7 | 0x3F, + 37456 - 19968: jis0208<<14 | 0x4D<<7 | 0x50, + 37457 - 19968: jis0208<<14 | 0x5B<<7 | 0x0E, + 37463 - 19968: jis0208<<14 | 0x4D<<7 | 0x48, + 37464 - 19968: jis0212<<14 | 0x42<<7 | 0x41, + 37465 - 19968: jis0208<<14 | 0x5B<<7 | 0x0D, + 37466 - 19968: jis0208<<14 | 0x4D<<7 | 0x55, + 37467 - 19968: jis0208<<14 | 0x10<<7 | 0x53, + 37468 - 19968: jis0212<<14 | 0x42<<7 | 0x43, + 37469 - 19968: jis0212<<14 | 0x42<<7 | 0x44, + 37470 - 19968: jis0208<<14 | 0x4D<<7 | 0x47, + 37472 - 19968: jis0212<<14 | 0x42<<7 | 0x45, + 37473 - 19968: jis0212<<14 | 0x42<<7 | 0x46, + 37474 - 19968: jis0208<<14 | 0x27<<7 | 0x0C, + 37476 - 19968: jis0208<<14 | 0x4D<<7 | 0x4B, + 37477 - 19968: jis0212<<14 | 0x42<<7 | 0x47, + 37478 - 19968: jis0208<<14 | 0x1D<<7 | 0x3F, + 37479 - 19968: jis0208<<14 | 0x5B<<7 | 0x10, + 37480 - 19968: jis0212<<14 | 0x42<<7 | 0x49, + 37481 - 19968: jis0212<<14 | 0x42<<7 | 0x4A, + 37486 - 19968: jis0212<<14 | 0x42<<7 | 0x4B, + 37487 - 19968: jis0212<<14 | 0x42<<7 | 0x4C, + 37488 - 19968: jis0212<<14 | 0x42<<7 | 0x4D, + 37489 - 19968: jis0208<<14 | 0x18<<7 | 0x3A, + 37493 - 19968: jis0212<<14 | 0x42<<7 | 0x4E, + 37494 - 19968: jis0212<<14 | 0x42<<7 | 0x4F, + 37495 - 19968: jis0208<<14 | 0x5B<<7 | 0x12, + 37496 - 19968: jis0208<<14 | 0x5B<<7 | 0x13, + 37497 - 19968: jis0212<<14 | 0x42<<7 | 0x52, + 37499 - 19968: jis0212<<14 | 0x42<<7 | 0x53, + 37500 - 19968: jis0212<<14 | 0x42<<7 | 0x54, + 37501 - 19968: jis0212<<14 | 0x42<<7 | 0x55, + 37502 - 19968: jis0208<<14 | 0x2A<<7 | 0x27, + 37503 - 19968: jis0212<<14 | 0x42<<7 | 0x56, + 37504 - 19968: jis0208<<14 | 0x15<<7 | 0x43, + 37507 - 19968: jis0208<<14 | 0x1C<<7 | 0x25, + 37509 - 19968: jis0208<<14 | 0x25<<7 | 0x1B, + 37512 - 19968: jis0208<<14 | 0x58<<7 | 0x03, + 37513 - 19968: jis0212<<14 | 0x42<<7 | 0x58, + 37514 - 19968: jis0212<<14 | 0x42<<7 | 0x59, + 37517 - 19968: jis0212<<14 | 0x42<<7 | 0x5A, + 37518 - 19968: jis0212<<14 | 0x42<<7 | 0x5B, + 37521 - 19968: jis0208<<14 | 0x20<<7 | 0x0C, + 37522 - 19968: jis0212<<14 | 0x42<<7 | 0x5C, + 37523 - 19968: jis0208<<14 | 0x4D<<7 | 0x53, + 37525 - 19968: jis0208<<14 | 0x4D<<7 | 0x4D, + 37526 - 19968: jis0208<<14 | 0x4D<<7 | 0x52, + 37527 - 19968: jis0212<<14 | 0x42<<7 | 0x5D, + 37528 - 19968: jis0208<<14 | 0x2B<<7 | 0x22, + 37529 - 19968: jis0212<<14 | 0x43<<7 | 0x00, + 37530 - 19968: jis0208<<14 | 0x23<<7 | 0x17, + 37531 - 19968: jis0208<<14 | 0x4D<<7 | 0x54, + 37532 - 19968: jis0208<<14 | 0x4D<<7 | 0x51, + 37535 - 19968: jis0212<<14 | 0x43<<7 | 0x01, + 37536 - 19968: jis0212<<14 | 0x43<<7 | 0x02, + 37540 - 19968: jis0212<<14 | 0x43<<7 | 0x03, + 37541 - 19968: jis0212<<14 | 0x43<<7 | 0x04, + 37543 - 19968: jis0208<<14 | 0x5B<<7 | 0x11, + 37544 - 19968: jis0212<<14 | 0x43<<7 | 0x06, + 37547 - 19968: jis0212<<14 | 0x43<<7 | 0x07, + 37549 - 19968: jis0208<<14 | 0x20<<7 | 0x0B, + 37551 - 19968: jis0212<<14 | 0x43<<7 | 0x08, + 37554 - 19968: jis0212<<14 | 0x43<<7 | 0x09, + 37558 - 19968: jis0212<<14 | 0x43<<7 | 0x0A, + 37559 - 19968: jis0208<<14 | 0x4D<<7 | 0x58, + 37560 - 19968: jis0212<<14 | 0x43<<7 | 0x0B, + 37561 - 19968: jis0208<<14 | 0x4D<<7 | 0x57, + 37562 - 19968: jis0212<<14 | 0x43<<7 | 0x0C, + 37563 - 19968: jis0212<<14 | 0x43<<7 | 0x0D, + 37564 - 19968: jis0212<<14 | 0x43<<7 | 0x0E, + 37565 - 19968: jis0212<<14 | 0x43<<7 | 0x0F, + 37567 - 19968: jis0212<<14 | 0x43<<7 | 0x10, + 37568 - 19968: jis0212<<14 | 0x43<<7 | 0x11, + 37569 - 19968: jis0212<<14 | 0x43<<7 | 0x12, + 37570 - 19968: jis0212<<14 | 0x43<<7 | 0x13, + 37571 - 19968: jis0212<<14 | 0x43<<7 | 0x14, + 37573 - 19968: jis0212<<14 | 0x43<<7 | 0x15, + 37574 - 19968: jis0212<<14 | 0x43<<7 | 0x16, + 37575 - 19968: jis0212<<14 | 0x43<<7 | 0x17, + 37576 - 19968: jis0212<<14 | 0x43<<7 | 0x18, + 37579 - 19968: jis0212<<14 | 0x43<<7 | 0x19, + 37580 - 19968: jis0212<<14 | 0x43<<7 | 0x1A, + 37581 - 19968: jis0212<<14 | 0x43<<7 | 0x1B, + 37582 - 19968: jis0212<<14 | 0x43<<7 | 0x1C, + 37583 - 19968: jis0208<<14 | 0x4D<<7 | 0x56, + 37584 - 19968: jis0208<<14 | 0x5B<<7 | 0x17, + 37586 - 19968: jis0208<<14 | 0x2A<<7 | 0x0E, + 37587 - 19968: jis0208<<14 | 0x5B<<7 | 0x1B, + 37589 - 19968: jis0208<<14 | 0x5B<<7 | 0x19, + 37591 - 19968: jis0208<<14 | 0x5B<<7 | 0x15, + 37592 - 19968: jis0212<<14 | 0x43<<7 | 0x21, + 37593 - 19968: jis0208<<14 | 0x5B<<7 | 0x16, + 37596 - 19968: jis0212<<14 | 0x43<<7 | 0x23, + 37597 - 19968: jis0212<<14 | 0x43<<7 | 0x24, + 37599 - 19968: jis0212<<14 | 0x43<<7 | 0x25, + 37600 - 19968: jis0208<<14 | 0x5B<<7 | 0x1A, + 37601 - 19968: jis0212<<14 | 0x43<<7 | 0x27, + 37603 - 19968: jis0212<<14 | 0x43<<7 | 0x28, + 37604 - 19968: jis0208<<14 | 0x1C<<7 | 0x5A, + 37605 - 19968: jis0212<<14 | 0x43<<7 | 0x29, + 37607 - 19968: jis0208<<14 | 0x5B<<7 | 0x14, + 37608 - 19968: jis0212<<14 | 0x43<<7 | 0x2B, + 37609 - 19968: jis0208<<14 | 0x4D<<7 | 0x59, + 37610 - 19968: jis0208<<14 | 0x29<<7 | 0x3E, + 37612 - 19968: jis0212<<14 | 0x43<<7 | 0x2C, + 37613 - 19968: jis0208<<14 | 0x10<<7 | 0x33, + 37614 - 19968: jis0212<<14 | 0x43<<7 | 0x2D, + 37616 - 19968: jis0212<<14 | 0x43<<7 | 0x2E, + 37618 - 19968: jis0208<<14 | 0x28<<7 | 0x25, + 37619 - 19968: jis0208<<14 | 0x22<<7 | 0x51, + 37624 - 19968: jis0208<<14 | 0x14<<7 | 0x57, + 37625 - 19968: jis0208<<14 | 0x58<<7 | 0x09, + 37626 - 19968: jis0208<<14 | 0x4D<<7 | 0x5B, + 37627 - 19968: jis0208<<14 | 0x5B<<7 | 0x1E, + 37628 - 19968: jis0208<<14 | 0x18<<7 | 0x3C, + 37631 - 19968: jis0208<<14 | 0x5B<<7 | 0x21, + 37632 - 19968: jis0212<<14 | 0x43<<7 | 0x32, + 37634 - 19968: jis0208<<14 | 0x5B<<7 | 0x23, + 37638 - 19968: jis0208<<14 | 0x1A<<7 | 0x0B, + 37640 - 19968: jis0212<<14 | 0x43<<7 | 0x34, + 37645 - 19968: jis0212<<14 | 0x43<<7 | 0x35, + 37647 - 19968: jis0208<<14 | 0x4D<<7 | 0x5A, + 37648 - 19968: jis0208<<14 | 0x1E<<7 | 0x4C, + 37649 - 19968: jis0212<<14 | 0x43<<7 | 0x36, + 37652 - 19968: jis0212<<14 | 0x43<<7 | 0x37, + 37653 - 19968: jis0212<<14 | 0x43<<7 | 0x38, + 37656 - 19968: jis0208<<14 | 0x1E<<7 | 0x4D, + 37657 - 19968: jis0208<<14 | 0x4E<<7 | 0x00, + 37658 - 19968: jis0208<<14 | 0x4E<<7 | 0x02, + 37660 - 19968: jis0212<<14 | 0x43<<7 | 0x39, + 37661 - 19968: jis0208<<14 | 0x5B<<7 | 0x22, + 37662 - 19968: jis0208<<14 | 0x5B<<7 | 0x20, + 37663 - 19968: jis0212<<14 | 0x43<<7 | 0x3C, + 37664 - 19968: jis0208<<14 | 0x1D<<7 | 0x5A, + 37665 - 19968: jis0208<<14 | 0x5B<<7 | 0x1D, + 37666 - 19968: jis0208<<14 | 0x4E<<7 | 0x01, + 37667 - 19968: jis0208<<14 | 0x4E<<7 | 0x03, + 37668 - 19968: jis0212<<14 | 0x43<<7 | 0x3E, + 37669 - 19968: jis0208<<14 | 0x5B<<7 | 0x1C, + 37670 - 19968: jis0208<<14 | 0x15<<7 | 0x32, + 37671 - 19968: jis0212<<14 | 0x43<<7 | 0x40, + 37672 - 19968: jis0208<<14 | 0x28<<7 | 0x24, + 37673 - 19968: jis0212<<14 | 0x43<<7 | 0x41, + 37674 - 19968: jis0212<<14 | 0x43<<7 | 0x42, + 37675 - 19968: jis0208<<14 | 0x1B<<7 | 0x41, + 37676 - 19968: jis0208<<14 | 0x2E<<7 | 0x02, + 37678 - 19968: jis0208<<14 | 0x4D<<7 | 0x5D, + 37679 - 19968: jis0208<<14 | 0x19<<7 | 0x57, + 37682 - 19968: jis0208<<14 | 0x2E<<7 | 0x1E, + 37683 - 19968: jis0212<<14 | 0x43<<7 | 0x43, + 37684 - 19968: jis0212<<14 | 0x43<<7 | 0x44, + 37685 - 19968: jis0208<<14 | 0x4E<<7 | 0x05, + 37686 - 19968: jis0212<<14 | 0x43<<7 | 0x45, + 37687 - 19968: jis0212<<14 | 0x43<<7 | 0x46, + 37690 - 19968: jis0208<<14 | 0x4E<<7 | 0x04, + 37691 - 19968: jis0208<<14 | 0x4E<<7 | 0x06, + 37700 - 19968: jis0208<<14 | 0x4D<<7 | 0x5C, + 37703 - 19968: jis0212<<14 | 0x43<<7 | 0x47, + 37704 - 19968: jis0208<<14 | 0x58<<7 | 0x02, + 37705 - 19968: jis0212<<14 | 0x43<<7 | 0x49, + 37707 - 19968: jis0208<<14 | 0x25<<7 | 0x48, + 37709 - 19968: jis0208<<14 | 0x24<<7 | 0x34, + 37712 - 19968: jis0212<<14 | 0x43<<7 | 0x4A, + 37713 - 19968: jis0212<<14 | 0x43<<7 | 0x4B, + 37714 - 19968: jis0212<<14 | 0x43<<7 | 0x4C, + 37716 - 19968: jis0208<<14 | 0x23<<7 | 0x36, + 37717 - 19968: jis0212<<14 | 0x43<<7 | 0x4D, + 37718 - 19968: jis0208<<14 | 0x4E<<7 | 0x0B, + 37719 - 19968: jis0208<<14 | 0x5B<<7 | 0x25, + 37720 - 19968: jis0212<<14 | 0x43<<7 | 0x4F, + 37722 - 19968: jis0212<<14 | 0x43<<7 | 0x50, + 37723 - 19968: jis0208<<14 | 0x22<<7 | 0x22, + 37724 - 19968: jis0208<<14 | 0x4E<<7 | 0x07, + 37726 - 19968: jis0212<<14 | 0x43<<7 | 0x51, + 37728 - 19968: jis0208<<14 | 0x4E<<7 | 0x08, + 37732 - 19968: jis0212<<14 | 0x43<<7 | 0x52, + 37733 - 19968: jis0212<<14 | 0x43<<7 | 0x53, + 37735 - 19968: jis0212<<14 | 0x43<<7 | 0x54, + 37737 - 19968: jis0212<<14 | 0x43<<7 | 0x55, + 37738 - 19968: jis0212<<14 | 0x43<<7 | 0x56, + 37740 - 19968: jis0208<<14 | 0x16<<7 | 0x0C, + 37741 - 19968: jis0212<<14 | 0x43<<7 | 0x57, + 37742 - 19968: jis0208<<14 | 0x4E<<7 | 0x0A, + 37743 - 19968: jis0212<<14 | 0x43<<7 | 0x58, + 37744 - 19968: jis0208<<14 | 0x5B<<7 | 0x24, + 37745 - 19968: jis0212<<14 | 0x43<<7 | 0x5A, + 37747 - 19968: jis0212<<14 | 0x43<<7 | 0x5B, + 37748 - 19968: jis0212<<14 | 0x43<<7 | 0x5C, + 37749 - 19968: jis0208<<14 | 0x17<<7 | 0x0F, + 37750 - 19968: jis0212<<14 | 0x43<<7 | 0x5D, + 37754 - 19968: jis0212<<14 | 0x44<<7 | 0x00, + 37756 - 19968: jis0208<<14 | 0x4E<<7 | 0x09, + 37757 - 19968: jis0212<<14 | 0x44<<7 | 0x01, + 37758 - 19968: jis0208<<14 | 0x1D<<7 | 0x40, + 37759 - 19968: jis0212<<14 | 0x44<<7 | 0x02, + 37760 - 19968: jis0212<<14 | 0x44<<7 | 0x03, + 37761 - 19968: jis0212<<14 | 0x44<<7 | 0x04, + 37762 - 19968: jis0212<<14 | 0x44<<7 | 0x05, + 37768 - 19968: jis0212<<14 | 0x44<<7 | 0x06, + 37770 - 19968: jis0212<<14 | 0x44<<7 | 0x07, + 37771 - 19968: jis0212<<14 | 0x44<<7 | 0x08, + 37772 - 19968: jis0208<<14 | 0x12<<7 | 0x58, + 37773 - 19968: jis0212<<14 | 0x44<<7 | 0x09, + 37775 - 19968: jis0212<<14 | 0x44<<7 | 0x0A, + 37778 - 19968: jis0212<<14 | 0x44<<7 | 0x0B, + 37780 - 19968: jis0208<<14 | 0x4E<<7 | 0x0F, + 37781 - 19968: jis0212<<14 | 0x44<<7 | 0x0C, + 37782 - 19968: jis0208<<14 | 0x19<<7 | 0x1E, + 37783 - 19968: jis0208<<14 | 0x20<<7 | 0x58, + 37784 - 19968: jis0212<<14 | 0x44<<7 | 0x0D, + 37786 - 19968: jis0208<<14 | 0x23<<7 | 0x29, + 37787 - 19968: jis0212<<14 | 0x44<<7 | 0x0E, + 37790 - 19968: jis0212<<14 | 0x44<<7 | 0x0F, + 37793 - 19968: jis0212<<14 | 0x44<<7 | 0x10, + 37795 - 19968: jis0212<<14 | 0x44<<7 | 0x11, + 37796 - 19968: jis0208<<14 | 0x5B<<7 | 0x26, + 37798 - 19968: jis0212<<14 | 0x44<<7 | 0x13, + 37799 - 19968: jis0208<<14 | 0x12<<7 | 0x1A, + 37800 - 19968: jis0212<<14 | 0x44<<7 | 0x14, + 37801 - 19968: jis0212<<14 | 0x44<<7 | 0x1A, + 37803 - 19968: jis0212<<14 | 0x44<<7 | 0x15, + 37804 - 19968: jis0208<<14 | 0x4E<<7 | 0x0D, + 37805 - 19968: jis0208<<14 | 0x4E<<7 | 0x0E, + 37806 - 19968: jis0208<<14 | 0x23<<7 | 0x22, + 37808 - 19968: jis0208<<14 | 0x4E<<7 | 0x0C, + 37812 - 19968: jis0212<<14 | 0x44<<7 | 0x16, + 37813 - 19968: jis0212<<14 | 0x44<<7 | 0x17, + 37814 - 19968: jis0212<<14 | 0x44<<7 | 0x18, + 37817 - 19968: jis0208<<14 | 0x4E<<7 | 0x10, + 37818 - 19968: jis0212<<14 | 0x44<<7 | 0x19, + 37825 - 19968: jis0212<<14 | 0x44<<7 | 0x1B, + 37827 - 19968: jis0208<<14 | 0x4E<<7 | 0x16, + 37828 - 19968: jis0212<<14 | 0x44<<7 | 0x1C, + 37829 - 19968: jis0212<<14 | 0x44<<7 | 0x1D, + 37830 - 19968: jis0208<<14 | 0x5B<<7 | 0x27, + 37831 - 19968: jis0212<<14 | 0x44<<7 | 0x1F, + 37832 - 19968: jis0208<<14 | 0x4E<<7 | 0x19, + 37833 - 19968: jis0212<<14 | 0x44<<7 | 0x20, + 37834 - 19968: jis0212<<14 | 0x44<<7 | 0x21, + 37835 - 19968: jis0212<<14 | 0x44<<7 | 0x22, + 37836 - 19968: jis0212<<14 | 0x44<<7 | 0x23, + 37837 - 19968: jis0212<<14 | 0x44<<7 | 0x24, + 37840 - 19968: jis0208<<14 | 0x4E<<7 | 0x18, + 37841 - 19968: jis0208<<14 | 0x24<<7 | 0x0C, + 37843 - 19968: jis0212<<14 | 0x44<<7 | 0x25, + 37846 - 19968: jis0208<<14 | 0x4E<<7 | 0x11, + 37847 - 19968: jis0208<<14 | 0x4E<<7 | 0x12, + 37848 - 19968: jis0208<<14 | 0x4E<<7 | 0x15, + 37849 - 19968: jis0212<<14 | 0x44<<7 | 0x26, + 37852 - 19968: jis0212<<14 | 0x44<<7 | 0x27, + 37853 - 19968: jis0208<<14 | 0x4E<<7 | 0x17, + 37854 - 19968: jis0208<<14 | 0x5B<<7 | 0x28, + 37855 - 19968: jis0212<<14 | 0x44<<7 | 0x29, + 37857 - 19968: jis0208<<14 | 0x15<<7 | 0x1F, + 37858 - 19968: jis0212<<14 | 0x44<<7 | 0x2A, + 37860 - 19968: jis0208<<14 | 0x4E<<7 | 0x1A, + 37861 - 19968: jis0208<<14 | 0x4E<<7 | 0x14, + 37862 - 19968: jis0212<<14 | 0x44<<7 | 0x2B, + 37863 - 19968: jis0212<<14 | 0x44<<7 | 0x2C, + 37864 - 19968: jis0208<<14 | 0x4E<<7 | 0x13, + 37879 - 19968: jis0212<<14 | 0x44<<7 | 0x2E, + 37880 - 19968: jis0208<<14 | 0x5B<<7 | 0x29, + 37881 - 19968: jis0212<<14 | 0x44<<7 | 0x2D, + 37882 - 19968: jis0212<<14 | 0x44<<7 | 0x30, + 37883 - 19968: jis0212<<14 | 0x44<<7 | 0x31, + 37885 - 19968: jis0212<<14 | 0x44<<7 | 0x32, + 37889 - 19968: jis0212<<14 | 0x44<<7 | 0x33, + 37890 - 19968: jis0212<<14 | 0x44<<7 | 0x34, + 37891 - 19968: jis0208<<14 | 0x4E<<7 | 0x1E, + 37892 - 19968: jis0212<<14 | 0x44<<7 | 0x35, + 37895 - 19968: jis0208<<14 | 0x4E<<7 | 0x1F, + 37896 - 19968: jis0212<<14 | 0x44<<7 | 0x36, + 37897 - 19968: jis0212<<14 | 0x44<<7 | 0x37, + 37901 - 19968: jis0212<<14 | 0x44<<7 | 0x38, + 37902 - 19968: jis0212<<14 | 0x44<<7 | 0x39, + 37903 - 19968: jis0212<<14 | 0x44<<7 | 0x3A, + 37904 - 19968: jis0208<<14 | 0x4E<<7 | 0x20, + 37907 - 19968: jis0208<<14 | 0x4E<<7 | 0x1D, + 37908 - 19968: jis0208<<14 | 0x4E<<7 | 0x1C, + 37909 - 19968: jis0212<<14 | 0x44<<7 | 0x3B, + 37910 - 19968: jis0212<<14 | 0x44<<7 | 0x3C, + 37911 - 19968: jis0212<<14 | 0x44<<7 | 0x3D, + 37912 - 19968: jis0208<<14 | 0x1D<<7 | 0x41, + 37913 - 19968: jis0208<<14 | 0x25<<7 | 0x09, + 37914 - 19968: jis0208<<14 | 0x4E<<7 | 0x1B, + 37919 - 19968: jis0212<<14 | 0x44<<7 | 0x3E, + 37921 - 19968: jis0208<<14 | 0x4E<<7 | 0x24, + 37931 - 19968: jis0208<<14 | 0x4E<<7 | 0x22, + 37934 - 19968: jis0212<<14 | 0x44<<7 | 0x3F, + 37935 - 19968: jis0212<<14 | 0x44<<7 | 0x40, + 37937 - 19968: jis0208<<14 | 0x5B<<7 | 0x2A, + 37938 - 19968: jis0212<<14 | 0x44<<7 | 0x42, + 37939 - 19968: jis0212<<14 | 0x44<<7 | 0x43, + 37940 - 19968: jis0212<<14 | 0x44<<7 | 0x44, + 37941 - 19968: jis0208<<14 | 0x4E<<7 | 0x23, + 37942 - 19968: jis0208<<14 | 0x4E<<7 | 0x21, + 37944 - 19968: jis0208<<14 | 0x21<<7 | 0x57, + 37946 - 19968: jis0208<<14 | 0x4E<<7 | 0x25, + 37947 - 19968: jis0212<<14 | 0x44<<7 | 0x45, + 37949 - 19968: jis0212<<14 | 0x44<<7 | 0x47, + 37951 - 19968: jis0212<<14 | 0x44<<7 | 0x46, + 37953 - 19968: jis0208<<14 | 0x4E<<7 | 0x26, + 37955 - 19968: jis0212<<14 | 0x44<<7 | 0x48, + 37956 - 19968: jis0208<<14 | 0x4E<<7 | 0x28, + 37957 - 19968: jis0208<<14 | 0x5B<<7 | 0x2B, + 37960 - 19968: jis0208<<14 | 0x5B<<7 | 0x2C, + 37962 - 19968: jis0212<<14 | 0x44<<7 | 0x4B, + 37964 - 19968: jis0212<<14 | 0x44<<7 | 0x4C, + 37969 - 19968: jis0208<<14 | 0x13<<7 | 0x34, + 37970 - 19968: jis0208<<14 | 0x4E<<7 | 0x27, + 37971 - 19968: jis0208<<14 | 0x2B<<7 | 0x59, + 37973 - 19968: jis0212<<14 | 0x44<<7 | 0x4D, + 37977 - 19968: jis0212<<14 | 0x44<<7 | 0x4E, + 37978 - 19968: jis0208<<14 | 0x4E<<7 | 0x33, + 37979 - 19968: jis0208<<14 | 0x4E<<7 | 0x29, + 37980 - 19968: jis0212<<14 | 0x44<<7 | 0x4F, + 37982 - 19968: jis0208<<14 | 0x4E<<7 | 0x2C, + 37983 - 19968: jis0212<<14 | 0x44<<7 | 0x50, + 37984 - 19968: jis0208<<14 | 0x4E<<7 | 0x2A, + 37985 - 19968: jis0212<<14 | 0x44<<7 | 0x51, + 37986 - 19968: jis0208<<14 | 0x4E<<7 | 0x2B, + 37987 - 19968: jis0212<<14 | 0x44<<7 | 0x52, + 37992 - 19968: jis0212<<14 | 0x44<<7 | 0x53, + 37994 - 19968: jis0208<<14 | 0x4E<<7 | 0x2D, + 37995 - 19968: jis0212<<14 | 0x44<<7 | 0x54, + 37997 - 19968: jis0212<<14 | 0x44<<7 | 0x55, + 37998 - 19968: jis0212<<14 | 0x44<<7 | 0x56, + 37999 - 19968: jis0212<<14 | 0x44<<7 | 0x57, + 38000 - 19968: jis0208<<14 | 0x4E<<7 | 0x2F, + 38001 - 19968: jis0212<<14 | 0x44<<7 | 0x58, + 38002 - 19968: jis0212<<14 | 0x44<<7 | 0x59, + 38005 - 19968: jis0208<<14 | 0x4E<<7 | 0x30, + 38007 - 19968: jis0208<<14 | 0x4E<<7 | 0x31, + 38012 - 19968: jis0208<<14 | 0x4E<<7 | 0x34, + 38013 - 19968: jis0208<<14 | 0x4E<<7 | 0x32, + 38014 - 19968: jis0208<<14 | 0x4E<<7 | 0x35, + 38015 - 19968: jis0208<<14 | 0x4E<<7 | 0x37, + 38017 - 19968: jis0208<<14 | 0x4E<<7 | 0x36, + 38019 - 19968: jis0212<<14 | 0x44<<7 | 0x5B, + 38020 - 19968: jis0212<<14 | 0x44<<7 | 0x5A, + 38263 - 19968: jis0208<<14 | 0x23<<7 | 0x18, + 38264 - 19968: jis0212<<14 | 0x44<<7 | 0x5C, + 38265 - 19968: jis0212<<14 | 0x44<<7 | 0x5D, + 38270 - 19968: jis0212<<14 | 0x45<<7 | 0x00, + 38272 - 19968: jis0208<<14 | 0x2B<<7 | 0x46, + 38274 - 19968: jis0208<<14 | 0x4E<<7 | 0x38, + 38275 - 19968: jis0208<<14 | 0x20<<7 | 0x0D, + 38276 - 19968: jis0212<<14 | 0x45<<7 | 0x01, + 38279 - 19968: jis0208<<14 | 0x4E<<7 | 0x39, + 38280 - 19968: jis0212<<14 | 0x45<<7 | 0x02, + 38281 - 19968: jis0208<<14 | 0x29<<7 | 0x23, + 38282 - 19968: jis0208<<14 | 0x4E<<7 | 0x3A, + 38283 - 19968: jis0208<<14 | 0x12<<7 | 0x0A, + 38284 - 19968: jis0212<<14 | 0x45<<7 | 0x03, + 38285 - 19968: jis0212<<14 | 0x45<<7 | 0x04, + 38286 - 19968: jis0212<<14 | 0x45<<7 | 0x05, + 38287 - 19968: jis0208<<14 | 0x10<<7 | 0x1B, + 38289 - 19968: jis0208<<14 | 0x13<<7 | 0x36, + 38290 - 19968: jis0208<<14 | 0x5B<<7 | 0x2D, + 38291 - 19968: jis0208<<14 | 0x13<<7 | 0x35, + 38292 - 19968: jis0208<<14 | 0x4E<<7 | 0x3B, + 38294 - 19968: jis0208<<14 | 0x4E<<7 | 0x3C, + 38296 - 19968: jis0208<<14 | 0x4E<<7 | 0x3D, + 38297 - 19968: jis0208<<14 | 0x4E<<7 | 0x3E, + 38301 - 19968: jis0212<<14 | 0x45<<7 | 0x06, + 38302 - 19968: jis0212<<14 | 0x45<<7 | 0x07, + 38303 - 19968: jis0212<<14 | 0x45<<7 | 0x08, + 38304 - 19968: jis0208<<14 | 0x4E<<7 | 0x3F, + 38305 - 19968: jis0212<<14 | 0x45<<7 | 0x09, + 38306 - 19968: jis0208<<14 | 0x13<<7 | 0x37, + 38307 - 19968: jis0208<<14 | 0x12<<7 | 0x34, + 38308 - 19968: jis0208<<14 | 0x18<<7 | 0x3D, + 38309 - 19968: jis0208<<14 | 0x27<<7 | 0x15, + 38310 - 19968: jis0212<<14 | 0x45<<7 | 0x0A, + 38311 - 19968: jis0208<<14 | 0x4E<<7 | 0x41, + 38312 - 19968: jis0208<<14 | 0x4E<<7 | 0x40, + 38313 - 19968: jis0212<<14 | 0x45<<7 | 0x0B, + 38315 - 19968: jis0212<<14 | 0x45<<7 | 0x0C, + 38316 - 19968: jis0212<<14 | 0x45<<7 | 0x0D, + 38317 - 19968: jis0208<<14 | 0x4E<<7 | 0x42, + 38322 - 19968: jis0208<<14 | 0x10<<7 | 0x3B, + 38324 - 19968: jis0212<<14 | 0x45<<7 | 0x0E, + 38326 - 19968: jis0212<<14 | 0x45<<7 | 0x0F, + 38329 - 19968: jis0208<<14 | 0x4E<<7 | 0x45, + 38330 - 19968: jis0212<<14 | 0x45<<7 | 0x10, + 38331 - 19968: jis0208<<14 | 0x4E<<7 | 0x44, + 38332 - 19968: jis0208<<14 | 0x4E<<7 | 0x43, + 38333 - 19968: jis0212<<14 | 0x45<<7 | 0x11, + 38334 - 19968: jis0208<<14 | 0x4E<<7 | 0x46, + 38335 - 19968: jis0212<<14 | 0x45<<7 | 0x12, + 38339 - 19968: jis0208<<14 | 0x4E<<7 | 0x49, + 38342 - 19968: jis0212<<14 | 0x45<<7 | 0x13, + 38343 - 19968: jis0208<<14 | 0x0F<<7 | 0x26, + 38344 - 19968: jis0212<<14 | 0x45<<7 | 0x14, + 38345 - 19968: jis0212<<14 | 0x45<<7 | 0x15, + 38346 - 19968: jis0208<<14 | 0x4E<<7 | 0x47, + 38347 - 19968: jis0212<<14 | 0x45<<7 | 0x16, + 38348 - 19968: jis0208<<14 | 0x4E<<7 | 0x4B, + 38349 - 19968: jis0208<<14 | 0x4E<<7 | 0x4A, + 38352 - 19968: jis0212<<14 | 0x45<<7 | 0x17, + 38353 - 19968: jis0212<<14 | 0x45<<7 | 0x18, + 38354 - 19968: jis0212<<14 | 0x45<<7 | 0x19, + 38355 - 19968: jis0212<<14 | 0x45<<7 | 0x1A, + 38356 - 19968: jis0208<<14 | 0x4E<<7 | 0x4D, + 38357 - 19968: jis0208<<14 | 0x4E<<7 | 0x4C, + 38358 - 19968: jis0208<<14 | 0x4E<<7 | 0x4E, + 38360 - 19968: jis0208<<14 | 0x25<<7 | 0x0D, + 38361 - 19968: jis0212<<14 | 0x45<<7 | 0x1B, + 38362 - 19968: jis0212<<14 | 0x45<<7 | 0x1C, + 38364 - 19968: jis0208<<14 | 0x4E<<7 | 0x4F, + 38365 - 19968: jis0212<<14 | 0x45<<7 | 0x1D, + 38366 - 19968: jis0212<<14 | 0x45<<7 | 0x1E, + 38367 - 19968: jis0212<<14 | 0x45<<7 | 0x1F, + 38368 - 19968: jis0212<<14 | 0x45<<7 | 0x20, + 38369 - 19968: jis0208<<14 | 0x4E<<7 | 0x50, + 38370 - 19968: jis0208<<14 | 0x4E<<7 | 0x52, + 38372 - 19968: jis0212<<14 | 0x45<<7 | 0x21, + 38373 - 19968: jis0208<<14 | 0x4E<<7 | 0x51, + 38374 - 19968: jis0212<<14 | 0x45<<7 | 0x22, + 38428 - 19968: jis0208<<14 | 0x28<<7 | 0x4B, + 38429 - 19968: jis0212<<14 | 0x45<<7 | 0x23, + 38430 - 19968: jis0212<<14 | 0x45<<7 | 0x24, + 38433 - 19968: jis0208<<14 | 0x4E<<7 | 0x53, + 38434 - 19968: jis0212<<14 | 0x45<<7 | 0x25, + 38436 - 19968: jis0212<<14 | 0x45<<7 | 0x26, + 38437 - 19968: jis0212<<14 | 0x45<<7 | 0x27, + 38438 - 19968: jis0212<<14 | 0x45<<7 | 0x28, + 38440 - 19968: jis0208<<14 | 0x4E<<7 | 0x54, + 38442 - 19968: jis0208<<14 | 0x19<<7 | 0x44, + 38444 - 19968: jis0212<<14 | 0x45<<7 | 0x29, + 38446 - 19968: jis0208<<14 | 0x4E<<7 | 0x55, + 38447 - 19968: jis0208<<14 | 0x4E<<7 | 0x56, + 38449 - 19968: jis0212<<14 | 0x45<<7 | 0x2A, + 38450 - 19968: jis0208<<14 | 0x2A<<7 | 0x28, + 38451 - 19968: jis0212<<14 | 0x45<<7 | 0x2B, + 38455 - 19968: jis0212<<14 | 0x45<<7 | 0x2C, + 38456 - 19968: jis0212<<14 | 0x45<<7 | 0x2D, + 38457 - 19968: jis0212<<14 | 0x45<<7 | 0x2E, + 38458 - 19968: jis0212<<14 | 0x45<<7 | 0x2F, + 38459 - 19968: jis0208<<14 | 0x20<<7 | 0x2A, + 38460 - 19968: jis0212<<14 | 0x45<<7 | 0x30, + 38461 - 19968: jis0212<<14 | 0x45<<7 | 0x31, + 38463 - 19968: jis0208<<14 | 0x0F<<7 | 0x03, + 38464 - 19968: jis0208<<14 | 0x21<<7 | 0x2A, + 38465 - 19968: jis0212<<14 | 0x45<<7 | 0x32, + 38466 - 19968: jis0208<<14 | 0x4E<<7 | 0x57, + 38468 - 19968: jis0208<<14 | 0x28<<7 | 0x4C, + 38475 - 19968: jis0208<<14 | 0x4E<<7 | 0x5A, + 38476 - 19968: jis0208<<14 | 0x4E<<7 | 0x58, + 38477 - 19968: jis0208<<14 | 0x18<<7 | 0x3E, + 38479 - 19968: jis0208<<14 | 0x4E<<7 | 0x59, + 38480 - 19968: jis0208<<14 | 0x17<<7 | 0x21, + 38482 - 19968: jis0212<<14 | 0x45<<7 | 0x33, + 38484 - 19968: jis0212<<14 | 0x45<<7 | 0x34, + 38486 - 19968: jis0212<<14 | 0x45<<7 | 0x35, + 38487 - 19968: jis0212<<14 | 0x45<<7 | 0x36, + 38488 - 19968: jis0212<<14 | 0x45<<7 | 0x37, + 38491 - 19968: jis0208<<14 | 0x29<<7 | 0x24, + 38492 - 19968: jis0208<<14 | 0x4E<<7 | 0x5C, + 38493 - 19968: jis0208<<14 | 0x4F<<7 | 0x00, + 38494 - 19968: jis0208<<14 | 0x4E<<7 | 0x5D, + 38495 - 19968: jis0208<<14 | 0x4F<<7 | 0x01, + 38497 - 19968: jis0212<<14 | 0x45<<7 | 0x38, + 38498 - 19968: jis0208<<14 | 0x10<<7 | 0x00, + 38499 - 19968: jis0208<<14 | 0x1E<<7 | 0x37, + 38500 - 19968: jis0208<<14 | 0x1C<<7 | 0x5B, + 38501 - 19968: jis0208<<14 | 0x13<<7 | 0x38, + 38502 - 19968: jis0208<<14 | 0x4F<<7 | 0x02, + 38506 - 19968: jis0208<<14 | 0x26<<7 | 0x45, + 38508 - 19968: jis0208<<14 | 0x4F<<7 | 0x04, + 38510 - 19968: jis0212<<14 | 0x45<<7 | 0x39, + 38512 - 19968: jis0208<<14 | 0x10<<7 | 0x01, + 38514 - 19968: jis0208<<14 | 0x4F<<7 | 0x03, + 38515 - 19968: jis0208<<14 | 0x23<<7 | 0x23, + 38516 - 19968: jis0212<<14 | 0x45<<7 | 0x3A, + 38517 - 19968: jis0208<<14 | 0x2D<<7 | 0x2C, + 38518 - 19968: jis0208<<14 | 0x25<<7 | 0x0A, + 38519 - 19968: jis0208<<14 | 0x4E<<7 | 0x5B, + 38520 - 19968: jis0208<<14 | 0x2D<<7 | 0x05, + 38522 - 19968: jis0208<<14 | 0x17<<7 | 0x10, + 38523 - 19968: jis0212<<14 | 0x45<<7 | 0x3B, + 38524 - 19968: jis0212<<14 | 0x45<<7 | 0x3C, + 38525 - 19968: jis0208<<14 | 0x2C<<7 | 0x3A, + 38526 - 19968: jis0212<<14 | 0x45<<7 | 0x3D, + 38527 - 19968: jis0212<<14 | 0x45<<7 | 0x3E, + 38529 - 19968: jis0212<<14 | 0x45<<7 | 0x3F, + 38530 - 19968: jis0212<<14 | 0x45<<7 | 0x40, + 38531 - 19968: jis0212<<14 | 0x45<<7 | 0x41, + 38532 - 19968: jis0212<<14 | 0x45<<7 | 0x42, + 38533 - 19968: jis0208<<14 | 0x15<<7 | 0x58, + 38534 - 19968: jis0208<<14 | 0x2D<<7 | 0x13, + 38536 - 19968: jis0208<<14 | 0x16<<7 | 0x07, + 38537 - 19968: jis0212<<14 | 0x45<<7 | 0x43, + 38538 - 19968: jis0208<<14 | 0x21<<7 | 0x41, + 38539 - 19968: jis0208<<14 | 0x46<<7 | 0x00, + 38541 - 19968: jis0208<<14 | 0x4F<<7 | 0x05, + 38542 - 19968: jis0208<<14 | 0x12<<7 | 0x0B, + 38543 - 19968: jis0208<<14 | 0x1E<<7 | 0x4E, + 38545 - 19968: jis0212<<14 | 0x45<<7 | 0x44, + 38548 - 19968: jis0208<<14 | 0x12<<7 | 0x35, + 38549 - 19968: jis0208<<14 | 0x4F<<7 | 0x07, + 38550 - 19968: jis0212<<14 | 0x45<<7 | 0x45, + 38551 - 19968: jis0208<<14 | 0x4F<<7 | 0x08, + 38552 - 19968: jis0208<<14 | 0x4F<<7 | 0x06, + 38553 - 19968: jis0208<<14 | 0x16<<7 | 0x43, + 38554 - 19968: jis0212<<14 | 0x45<<7 | 0x46, + 38555 - 19968: jis0208<<14 | 0x19<<7 | 0x3C, + 38556 - 19968: jis0208<<14 | 0x1D<<7 | 0x42, + 38557 - 19968: jis0208<<14 | 0x5B<<7 | 0x30, + 38559 - 19968: jis0212<<14 | 0x45<<7 | 0x48, + 38560 - 19968: jis0208<<14 | 0x10<<7 | 0x02, + 38563 - 19968: jis0208<<14 | 0x2D<<7 | 0x38, + 38564 - 19968: jis0212<<14 | 0x45<<7 | 0x49, + 38565 - 19968: jis0212<<14 | 0x45<<7 | 0x4A, + 38566 - 19968: jis0212<<14 | 0x45<<7 | 0x4B, + 38567 - 19968: jis0208<<14 | 0x4F<<7 | 0x0A, + 38568 - 19968: jis0208<<14 | 0x4D<<7 | 0x0D, + 38569 - 19968: jis0212<<14 | 0x45<<7 | 0x4C, + 38570 - 19968: jis0208<<14 | 0x4F<<7 | 0x09, + 38574 - 19968: jis0212<<14 | 0x45<<7 | 0x4D, + 38575 - 19968: jis0208<<14 | 0x5B<<7 | 0x31, + 38576 - 19968: jis0208<<14 | 0x4F<<7 | 0x0D, + 38577 - 19968: jis0208<<14 | 0x4F<<7 | 0x0B, + 38578 - 19968: jis0208<<14 | 0x4F<<7 | 0x0C, + 38579 - 19968: jis0212<<14 | 0x45<<7 | 0x4F, + 38580 - 19968: jis0208<<14 | 0x4F<<7 | 0x0E, + 38582 - 19968: jis0208<<14 | 0x4F<<7 | 0x0F, + 38583 - 19968: jis0208<<14 | 0x2D<<7 | 0x4B, + 38584 - 19968: jis0208<<14 | 0x4F<<7 | 0x10, + 38585 - 19968: jis0208<<14 | 0x4F<<7 | 0x11, + 38586 - 19968: jis0212<<14 | 0x45<<7 | 0x50, + 38587 - 19968: jis0208<<14 | 0x1F<<7 | 0x28, + 38588 - 19968: jis0208<<14 | 0x27<<7 | 0x1A, + 38592 - 19968: jis0208<<14 | 0x1E<<7 | 0x5C, + 38593 - 19968: jis0208<<14 | 0x13<<7 | 0x46, + 38596 - 19968: jis0208<<14 | 0x2C<<7 | 0x19, + 38597 - 19968: jis0208<<14 | 0x11<<7 | 0x4C, + 38598 - 19968: jis0208<<14 | 0x1C<<7 | 0x17, + 38599 - 19968: jis0208<<14 | 0x17<<7 | 0x3A, + 38601 - 19968: jis0208<<14 | 0x4F<<7 | 0x14, + 38602 - 19968: jis0212<<14 | 0x45<<7 | 0x51, + 38603 - 19968: jis0208<<14 | 0x4F<<7 | 0x13, + 38604 - 19968: jis0208<<14 | 0x1A<<7 | 0x52, + 38605 - 19968: jis0208<<14 | 0x4F<<7 | 0x15, + 38606 - 19968: jis0208<<14 | 0x4F<<7 | 0x12, + 38609 - 19968: jis0208<<14 | 0x1A<<7 | 0x07, + 38610 - 19968: jis0212<<14 | 0x45<<7 | 0x52, + 38613 - 19968: jis0208<<14 | 0x4F<<7 | 0x19, + 38614 - 19968: jis0208<<14 | 0x49<<7 | 0x0C, + 38616 - 19968: jis0212<<14 | 0x45<<7 | 0x54, + 38617 - 19968: jis0208<<14 | 0x31<<7 | 0x35, + 38618 - 19968: jis0212<<14 | 0x45<<7 | 0x55, + 38619 - 19968: jis0208<<14 | 0x1E<<7 | 0x56, + 38620 - 19968: jis0208<<14 | 0x4F<<7 | 0x17, + 38621 - 19968: jis0212<<14 | 0x45<<7 | 0x56, + 38622 - 19968: jis0212<<14 | 0x45<<7 | 0x57, + 38623 - 19968: jis0212<<14 | 0x45<<7 | 0x58, + 38626 - 19968: jis0208<<14 | 0x2D<<7 | 0x04, + 38627 - 19968: jis0208<<14 | 0x25<<7 | 0x50, + 38632 - 19968: jis0208<<14 | 0x10<<7 | 0x0A, + 38633 - 19968: jis0212<<14 | 0x45<<7 | 0x59, + 38634 - 19968: jis0208<<14 | 0x1F<<7 | 0x42, + 38635 - 19968: jis0208<<14 | 0x1B<<7 | 0x15, + 38639 - 19968: jis0212<<14 | 0x45<<7 | 0x5A, + 38640 - 19968: jis0208<<14 | 0x29<<7 | 0x16, + 38641 - 19968: jis0212<<14 | 0x45<<7 | 0x5B, + 38642 - 19968: jis0208<<14 | 0x10<<7 | 0x1F, + 38646 - 19968: jis0208<<14 | 0x2D<<7 | 0x4C, + 38647 - 19968: jis0208<<14 | 0x2C<<7 | 0x4A, + 38649 - 19968: jis0208<<14 | 0x4F<<7 | 0x1A, + 38650 - 19968: jis0212<<14 | 0x45<<7 | 0x5C, + 38651 - 19968: jis0208<<14 | 0x24<<7 | 0x24, + 38656 - 19968: jis0208<<14 | 0x1B<<7 | 0x5A, + 38658 - 19968: jis0212<<14 | 0x45<<7 | 0x5D, + 38659 - 19968: jis0212<<14 | 0x46<<7 | 0x00, + 38660 - 19968: jis0208<<14 | 0x4F<<7 | 0x1B, + 38661 - 19968: jis0212<<14 | 0x46<<7 | 0x01, + 38662 - 19968: jis0208<<14 | 0x4F<<7 | 0x1C, + 38663 - 19968: jis0208<<14 | 0x1E<<7 | 0x2B, + 38664 - 19968: jis0208<<14 | 0x4F<<7 | 0x1D, + 38665 - 19968: jis0212<<14 | 0x46<<7 | 0x02, + 38666 - 19968: jis0208<<14 | 0x2D<<7 | 0x4D, + 38669 - 19968: jis0208<<14 | 0x4F<<7 | 0x18, + 38670 - 19968: jis0208<<14 | 0x4F<<7 | 0x1F, + 38671 - 19968: jis0208<<14 | 0x4F<<7 | 0x21, + 38673 - 19968: jis0208<<14 | 0x4F<<7 | 0x20, + 38675 - 19968: jis0208<<14 | 0x4F<<7 | 0x1E, + 38678 - 19968: jis0208<<14 | 0x4F<<7 | 0x22, + 38681 - 19968: jis0208<<14 | 0x4F<<7 | 0x23, + 38682 - 19968: jis0212<<14 | 0x46<<7 | 0x03, + 38683 - 19968: jis0212<<14 | 0x46<<7 | 0x04, + 38684 - 19968: jis0208<<14 | 0x20<<7 | 0x59, + 38685 - 19968: jis0212<<14 | 0x46<<7 | 0x05, + 38686 - 19968: jis0208<<14 | 0x11<<7 | 0x41, + 38689 - 19968: jis0212<<14 | 0x46<<7 | 0x06, + 38690 - 19968: jis0212<<14 | 0x46<<7 | 0x07, + 38691 - 19968: jis0212<<14 | 0x46<<7 | 0x08, + 38692 - 19968: jis0208<<14 | 0x4F<<7 | 0x24, + 38695 - 19968: jis0208<<14 | 0x2B<<7 | 0x17, + 38696 - 19968: jis0212<<14 | 0x46<<7 | 0x09, + 38698 - 19968: jis0208<<14 | 0x4F<<7 | 0x25, + 38704 - 19968: jis0208<<14 | 0x4F<<7 | 0x26, + 38705 - 19968: jis0212<<14 | 0x46<<7 | 0x0A, + 38706 - 19968: jis0208<<14 | 0x2E<<7 | 0x09, + 38707 - 19968: jis0208<<14 | 0x5B<<7 | 0x32, + 38712 - 19968: jis0208<<14 | 0x3A<<7 | 0x10, + 38713 - 19968: jis0208<<14 | 0x4F<<7 | 0x27, + 38715 - 19968: jis0208<<14 | 0x5B<<7 | 0x33, + 38717 - 19968: jis0208<<14 | 0x4F<<7 | 0x28, + 38718 - 19968: jis0208<<14 | 0x4F<<7 | 0x29, + 38721 - 19968: jis0212<<14 | 0x46<<7 | 0x0C, + 38722 - 19968: jis0208<<14 | 0x4F<<7 | 0x2D, + 38723 - 19968: jis0208<<14 | 0x5B<<7 | 0x34, + 38724 - 19968: jis0208<<14 | 0x4F<<7 | 0x2A, + 38726 - 19968: jis0208<<14 | 0x4F<<7 | 0x2B, + 38728 - 19968: jis0208<<14 | 0x4F<<7 | 0x2C, + 38729 - 19968: jis0208<<14 | 0x4F<<7 | 0x2E, + 38730 - 19968: jis0212<<14 | 0x46<<7 | 0x0E, + 38733 - 19968: jis0208<<14 | 0x5B<<7 | 0x35, + 38734 - 19968: jis0212<<14 | 0x46<<7 | 0x0F, + 38735 - 19968: jis0208<<14 | 0x5B<<7 | 0x36, + 38737 - 19968: jis0208<<14 | 0x5B<<7 | 0x37, + 38738 - 19968: jis0208<<14 | 0x1F<<7 | 0x23, + 38741 - 19968: jis0208<<14 | 0x5B<<7 | 0x38, + 38742 - 19968: jis0208<<14 | 0x2B<<7 | 0x56, + 38743 - 19968: jis0212<<14 | 0x46<<7 | 0x12, + 38744 - 19968: jis0212<<14 | 0x46<<7 | 0x13, + 38745 - 19968: jis0208<<14 | 0x1F<<7 | 0x24, + 38746 - 19968: jis0212<<14 | 0x46<<7 | 0x14, + 38747 - 19968: jis0212<<14 | 0x46<<7 | 0x15, + 38748 - 19968: jis0208<<14 | 0x4F<<7 | 0x2F, + 38750 - 19968: jis0208<<14 | 0x27<<7 | 0x52, + 38752 - 19968: jis0208<<14 | 0x4F<<7 | 0x30, + 38753 - 19968: jis0208<<14 | 0x52<<7 | 0x32, + 38754 - 19968: jis0208<<14 | 0x2B<<7 | 0x2B, + 38755 - 19968: jis0212<<14 | 0x46<<7 | 0x16, + 38756 - 19968: jis0208<<14 | 0x4F<<7 | 0x31, + 38758 - 19968: jis0208<<14 | 0x4F<<7 | 0x32, + 38759 - 19968: jis0212<<14 | 0x46<<7 | 0x17, + 38760 - 19968: jis0208<<14 | 0x4F<<7 | 0x33, + 38761 - 19968: jis0208<<14 | 0x12<<7 | 0x36, + 38762 - 19968: jis0212<<14 | 0x46<<7 | 0x18, + 38763 - 19968: jis0208<<14 | 0x4F<<7 | 0x35, + 38765 - 19968: jis0208<<14 | 0x1E<<7 | 0x38, + 38766 - 19968: jis0212<<14 | 0x46<<7 | 0x19, + 38769 - 19968: jis0208<<14 | 0x4F<<7 | 0x36, + 38771 - 19968: jis0212<<14 | 0x46<<7 | 0x1A, + 38772 - 19968: jis0208<<14 | 0x16<<7 | 0x03, + 38774 - 19968: jis0212<<14 | 0x46<<7 | 0x1B, + 38775 - 19968: jis0212<<14 | 0x46<<7 | 0x1C, + 38776 - 19968: jis0212<<14 | 0x46<<7 | 0x1D, + 38777 - 19968: jis0208<<14 | 0x4F<<7 | 0x37, + 38778 - 19968: jis0208<<14 | 0x4F<<7 | 0x3B, + 38779 - 19968: jis0212<<14 | 0x46<<7 | 0x1E, + 38780 - 19968: jis0208<<14 | 0x4F<<7 | 0x39, + 38781 - 19968: jis0212<<14 | 0x46<<7 | 0x1F, + 38783 - 19968: jis0212<<14 | 0x46<<7 | 0x20, + 38784 - 19968: jis0212<<14 | 0x46<<7 | 0x21, + 38785 - 19968: jis0208<<14 | 0x4F<<7 | 0x3A, + 38788 - 19968: jis0208<<14 | 0x12<<7 | 0x52, + 38789 - 19968: jis0208<<14 | 0x4F<<7 | 0x38, + 38790 - 19968: jis0208<<14 | 0x4F<<7 | 0x3C, + 38793 - 19968: jis0212<<14 | 0x46<<7 | 0x22, + 38795 - 19968: jis0208<<14 | 0x4F<<7 | 0x3D, + 38797 - 19968: jis0208<<14 | 0x0F<<7 | 0x27, + 38799 - 19968: jis0208<<14 | 0x4F<<7 | 0x3E, + 38800 - 19968: jis0208<<14 | 0x4F<<7 | 0x3F, + 38805 - 19968: jis0212<<14 | 0x46<<7 | 0x23, + 38806 - 19968: jis0212<<14 | 0x46<<7 | 0x24, + 38807 - 19968: jis0212<<14 | 0x46<<7 | 0x25, + 38808 - 19968: jis0208<<14 | 0x1D<<7 | 0x43, + 38809 - 19968: jis0212<<14 | 0x46<<7 | 0x26, + 38810 - 19968: jis0212<<14 | 0x46<<7 | 0x27, + 38812 - 19968: jis0208<<14 | 0x4F<<7 | 0x40, + 38814 - 19968: jis0212<<14 | 0x46<<7 | 0x28, + 38815 - 19968: jis0212<<14 | 0x46<<7 | 0x29, + 38816 - 19968: jis0208<<14 | 0x14<<7 | 0x26, + 38818 - 19968: jis0212<<14 | 0x46<<7 | 0x2A, + 38819 - 19968: jis0208<<14 | 0x4F<<7 | 0x43, + 38822 - 19968: jis0208<<14 | 0x4F<<7 | 0x42, + 38824 - 19968: jis0208<<14 | 0x4F<<7 | 0x41, + 38827 - 19968: jis0208<<14 | 0x4A<<7 | 0x50, + 38828 - 19968: jis0212<<14 | 0x46<<7 | 0x2B, + 38829 - 19968: jis0208<<14 | 0x29<<7 | 0x3B, + 38830 - 19968: jis0212<<14 | 0x46<<7 | 0x2C, + 38833 - 19968: jis0212<<14 | 0x46<<7 | 0x2D, + 38834 - 19968: jis0212<<14 | 0x46<<7 | 0x2E, + 38835 - 19968: jis0208<<14 | 0x4F<<7 | 0x44, + 38836 - 19968: jis0208<<14 | 0x4F<<7 | 0x45, + 38837 - 19968: jis0212<<14 | 0x46<<7 | 0x2F, + 38838 - 19968: jis0212<<14 | 0x46<<7 | 0x30, + 38840 - 19968: jis0212<<14 | 0x46<<7 | 0x31, + 38841 - 19968: jis0212<<14 | 0x46<<7 | 0x32, + 38842 - 19968: jis0212<<14 | 0x46<<7 | 0x33, + 38844 - 19968: jis0212<<14 | 0x46<<7 | 0x34, + 38846 - 19968: jis0212<<14 | 0x46<<7 | 0x35, + 38847 - 19968: jis0212<<14 | 0x46<<7 | 0x36, + 38849 - 19968: jis0212<<14 | 0x46<<7 | 0x37, + 38851 - 19968: jis0208<<14 | 0x4F<<7 | 0x46, + 38852 - 19968: jis0212<<14 | 0x46<<7 | 0x38, + 38853 - 19968: jis0212<<14 | 0x46<<7 | 0x39, + 38854 - 19968: jis0208<<14 | 0x4F<<7 | 0x47, + 38855 - 19968: jis0212<<14 | 0x46<<7 | 0x3A, + 38856 - 19968: jis0208<<14 | 0x4F<<7 | 0x48, + 38857 - 19968: jis0212<<14 | 0x46<<7 | 0x3B, + 38858 - 19968: jis0212<<14 | 0x46<<7 | 0x3C, + 38859 - 19968: jis0208<<14 | 0x4F<<7 | 0x49, + 38860 - 19968: jis0212<<14 | 0x46<<7 | 0x3D, + 38861 - 19968: jis0212<<14 | 0x46<<7 | 0x3E, + 38862 - 19968: jis0212<<14 | 0x46<<7 | 0x3F, + 38864 - 19968: jis0212<<14 | 0x46<<7 | 0x40, + 38865 - 19968: jis0212<<14 | 0x46<<7 | 0x41, + 38867 - 19968: jis0208<<14 | 0x13<<7 | 0x39, + 38868 - 19968: jis0212<<14 | 0x46<<7 | 0x42, + 38871 - 19968: jis0212<<14 | 0x46<<7 | 0x43, + 38872 - 19968: jis0212<<14 | 0x46<<7 | 0x44, + 38873 - 19968: jis0212<<14 | 0x46<<7 | 0x45, + 38875 - 19968: jis0212<<14 | 0x46<<7 | 0x49, + 38876 - 19968: jis0208<<14 | 0x4F<<7 | 0x4A, + 38877 - 19968: jis0212<<14 | 0x46<<7 | 0x46, + 38878 - 19968: jis0212<<14 | 0x46<<7 | 0x47, + 38880 - 19968: jis0212<<14 | 0x46<<7 | 0x48, + 38881 - 19968: jis0212<<14 | 0x46<<7 | 0x4A, + 38884 - 19968: jis0212<<14 | 0x46<<7 | 0x4B, + 38893 - 19968: jis0208<<14 | 0x4F<<7 | 0x4B, + 38894 - 19968: jis0208<<14 | 0x26<<7 | 0x02, + 38895 - 19968: jis0212<<14 | 0x46<<7 | 0x4C, + 38897 - 19968: jis0212<<14 | 0x46<<7 | 0x4D, + 38898 - 19968: jis0208<<14 | 0x4F<<7 | 0x4D, + 38899 - 19968: jis0208<<14 | 0x11<<7 | 0x1A, + 38900 - 19968: jis0212<<14 | 0x46<<7 | 0x4E, + 38901 - 19968: jis0208<<14 | 0x4F<<7 | 0x50, + 38902 - 19968: jis0208<<14 | 0x4F<<7 | 0x4F, + 38903 - 19968: jis0212<<14 | 0x46<<7 | 0x4F, + 38904 - 19968: jis0212<<14 | 0x46<<7 | 0x50, + 38906 - 19968: jis0212<<14 | 0x46<<7 | 0x51, + 38907 - 19968: jis0208<<14 | 0x10<<7 | 0x03, + 38911 - 19968: jis0208<<14 | 0x15<<7 | 0x20, + 38913 - 19968: jis0208<<14 | 0x29<<7 | 0x26, + 38914 - 19968: jis0208<<14 | 0x23<<7 | 0x19, + 38915 - 19968: jis0208<<14 | 0x19<<7 | 0x01, + 38917 - 19968: jis0208<<14 | 0x18<<7 | 0x3F, + 38918 - 19968: jis0208<<14 | 0x1C<<7 | 0x46, + 38919 - 19968: jis0212<<14 | 0x46<<7 | 0x52, + 38920 - 19968: jis0208<<14 | 0x1E<<7 | 0x3B, + 38922 - 19968: jis0212<<14 | 0x46<<7 | 0x53, + 38924 - 19968: jis0208<<14 | 0x4F<<7 | 0x52, + 38925 - 19968: jis0212<<14 | 0x46<<7 | 0x55, + 38926 - 19968: jis0212<<14 | 0x46<<7 | 0x56, + 38927 - 19968: jis0208<<14 | 0x4F<<7 | 0x51, + 38928 - 19968: jis0208<<14 | 0x2C<<7 | 0x21, + 38929 - 19968: jis0208<<14 | 0x13<<7 | 0x47, + 38930 - 19968: jis0208<<14 | 0x27<<7 | 0x31, + 38931 - 19968: jis0208<<14 | 0x25<<7 | 0x3B, + 38932 - 19968: jis0212<<14 | 0x46<<7 | 0x57, + 38934 - 19968: jis0212<<14 | 0x46<<7 | 0x58, + 38935 - 19968: jis0208<<14 | 0x1E<<7 | 0x5B, + 38936 - 19968: jis0208<<14 | 0x2D<<7 | 0x2D, + 38937 - 19968: jis0212<<14 | 0x46<<7 | 0x54, + 38938 - 19968: jis0208<<14 | 0x16<<7 | 0x3A, + 38940 - 19968: jis0212<<14 | 0x46<<7 | 0x59, + 38942 - 19968: jis0212<<14 | 0x46<<7 | 0x5A, + 38944 - 19968: jis0212<<14 | 0x46<<7 | 0x5B, + 38945 - 19968: jis0208<<14 | 0x4F<<7 | 0x55, + 38947 - 19968: jis0212<<14 | 0x46<<7 | 0x5C, + 38948 - 19968: jis0208<<14 | 0x4F<<7 | 0x54, + 38949 - 19968: jis0212<<14 | 0x47<<7 | 0x07, + 38950 - 19968: jis0212<<14 | 0x46<<7 | 0x5D, + 38955 - 19968: jis0212<<14 | 0x47<<7 | 0x00, + 38956 - 19968: jis0208<<14 | 0x2A<<7 | 0x2A, + 38957 - 19968: jis0208<<14 | 0x25<<7 | 0x0B, + 38958 - 19968: jis0212<<14 | 0x47<<7 | 0x01, + 38959 - 19968: jis0212<<14 | 0x47<<7 | 0x02, + 38960 - 19968: jis0212<<14 | 0x47<<7 | 0x03, + 38962 - 19968: jis0212<<14 | 0x47<<7 | 0x04, + 38963 - 19968: jis0212<<14 | 0x47<<7 | 0x05, + 38964 - 19968: jis0208<<14 | 0x10<<7 | 0x2F, + 38965 - 19968: jis0212<<14 | 0x47<<7 | 0x06, + 38967 - 19968: jis0208<<14 | 0x4F<<7 | 0x56, + 38968 - 19968: jis0208<<14 | 0x4F<<7 | 0x53, + 38971 - 19968: jis0208<<14 | 0x28<<7 | 0x30, + 38972 - 19968: jis0208<<14 | 0x2C<<7 | 0x49, + 38973 - 19968: jis0208<<14 | 0x4F<<7 | 0x57, + 38974 - 19968: jis0212<<14 | 0x47<<7 | 0x08, + 38980 - 19968: jis0212<<14 | 0x47<<7 | 0x09, + 38982 - 19968: jis0208<<14 | 0x4F<<7 | 0x58, + 38983 - 19968: jis0212<<14 | 0x47<<7 | 0x0A, + 38986 - 19968: jis0212<<14 | 0x47<<7 | 0x0B, + 38987 - 19968: jis0208<<14 | 0x4F<<7 | 0x5A, + 38988 - 19968: jis0208<<14 | 0x21<<7 | 0x49, + 38989 - 19968: jis0208<<14 | 0x12<<7 | 0x3A, + 38990 - 19968: jis0208<<14 | 0x12<<7 | 0x3B, + 38991 - 19968: jis0208<<14 | 0x4F<<7 | 0x59, + 38993 - 19968: jis0212<<14 | 0x47<<7 | 0x0C, + 38994 - 19968: jis0212<<14 | 0x47<<7 | 0x0D, + 38995 - 19968: jis0212<<14 | 0x47<<7 | 0x0E, + 38996 - 19968: jis0208<<14 | 0x13<<7 | 0x48, + 38997 - 19968: jis0208<<14 | 0x17<<7 | 0x11, + 38998 - 19968: jis0212<<14 | 0x47<<7 | 0x0F, + 38999 - 19968: jis0208<<14 | 0x5B<<7 | 0x39, + 39000 - 19968: jis0208<<14 | 0x13<<7 | 0x49, + 39001 - 19968: jis0212<<14 | 0x47<<7 | 0x11, + 39002 - 19968: jis0212<<14 | 0x47<<7 | 0x12, + 39003 - 19968: jis0208<<14 | 0x24<<7 | 0x1E, + 39006 - 19968: jis0208<<14 | 0x2D<<7 | 0x3F, + 39010 - 19968: jis0212<<14 | 0x47<<7 | 0x13, + 39011 - 19968: jis0212<<14 | 0x47<<7 | 0x14, + 39013 - 19968: jis0208<<14 | 0x5B<<7 | 0x3A, + 39014 - 19968: jis0212<<14 | 0x47<<7 | 0x16, + 39015 - 19968: jis0208<<14 | 0x17<<7 | 0x3B, + 39018 - 19968: jis0212<<14 | 0x47<<7 | 0x17, + 39019 - 19968: jis0208<<14 | 0x4F<<7 | 0x5B, + 39020 - 19968: jis0212<<14 | 0x47<<7 | 0x18, + 39023 - 19968: jis0208<<14 | 0x4F<<7 | 0x5C, + 39024 - 19968: jis0208<<14 | 0x4F<<7 | 0x5D, + 39025 - 19968: jis0208<<14 | 0x50<<7 | 0x00, + 39027 - 19968: jis0208<<14 | 0x50<<7 | 0x02, + 39028 - 19968: jis0208<<14 | 0x50<<7 | 0x01, + 39080 - 19968: jis0208<<14 | 0x28<<7 | 0x56, + 39082 - 19968: jis0208<<14 | 0x50<<7 | 0x03, + 39083 - 19968: jis0212<<14 | 0x47<<7 | 0x19, + 39085 - 19968: jis0212<<14 | 0x47<<7 | 0x1A, + 39086 - 19968: jis0212<<14 | 0x47<<7 | 0x1B, + 39087 - 19968: jis0208<<14 | 0x50<<7 | 0x04, + 39088 - 19968: jis0212<<14 | 0x47<<7 | 0x1C, + 39089 - 19968: jis0208<<14 | 0x50<<7 | 0x05, + 39092 - 19968: jis0212<<14 | 0x47<<7 | 0x1D, + 39094 - 19968: jis0208<<14 | 0x50<<7 | 0x06, + 39095 - 19968: jis0212<<14 | 0x47<<7 | 0x1E, + 39096 - 19968: jis0212<<14 | 0x47<<7 | 0x1F, + 39098 - 19968: jis0212<<14 | 0x47<<7 | 0x20, + 39099 - 19968: jis0212<<14 | 0x47<<7 | 0x21, + 39103 - 19968: jis0212<<14 | 0x47<<7 | 0x22, + 39106 - 19968: jis0212<<14 | 0x47<<7 | 0x23, + 39107 - 19968: jis0208<<14 | 0x50<<7 | 0x08, + 39108 - 19968: jis0208<<14 | 0x50<<7 | 0x07, + 39109 - 19968: jis0212<<14 | 0x47<<7 | 0x24, + 39110 - 19968: jis0208<<14 | 0x50<<7 | 0x09, + 39112 - 19968: jis0212<<14 | 0x47<<7 | 0x25, + 39116 - 19968: jis0212<<14 | 0x47<<7 | 0x26, + 39131 - 19968: jis0208<<14 | 0x27<<7 | 0x53, + 39132 - 19968: jis0208<<14 | 0x45<<7 | 0x2B, + 39135 - 19968: jis0208<<14 | 0x1E<<7 | 0x08, + 39137 - 19968: jis0212<<14 | 0x47<<7 | 0x27, + 39138 - 19968: jis0208<<14 | 0x14<<7 | 0x11, + 39139 - 19968: jis0212<<14 | 0x47<<7 | 0x28, + 39141 - 19968: jis0212<<14 | 0x47<<7 | 0x29, + 39142 - 19968: jis0212<<14 | 0x47<<7 | 0x2A, + 39143 - 19968: jis0212<<14 | 0x47<<7 | 0x2B, + 39145 - 19968: jis0208<<14 | 0x50<<7 | 0x0A, + 39146 - 19968: jis0212<<14 | 0x47<<7 | 0x2C, + 39147 - 19968: jis0208<<14 | 0x50<<7 | 0x0B, + 39149 - 19968: jis0208<<14 | 0x31<<7 | 0x0B, + 39150 - 19968: jis0208<<14 | 0x3C<<7 | 0x1A, + 39151 - 19968: jis0208<<14 | 0x27<<7 | 0x32, + 39154 - 19968: jis0208<<14 | 0x0F<<7 | 0x5A, + 39155 - 19968: jis0212<<14 | 0x47<<7 | 0x2D, + 39156 - 19968: jis0208<<14 | 0x0F<<7 | 0x1A, + 39158 - 19968: jis0212<<14 | 0x47<<7 | 0x2E, + 39164 - 19968: jis0208<<14 | 0x1A<<7 | 0x53, + 39165 - 19968: jis0208<<14 | 0x2A<<7 | 0x0F, + 39166 - 19968: jis0208<<14 | 0x1D<<7 | 0x5D, + 39170 - 19968: jis0212<<14 | 0x47<<7 | 0x2F, + 39171 - 19968: jis0208<<14 | 0x50<<7 | 0x0C, + 39173 - 19968: jis0208<<14 | 0x2B<<7 | 0x3E, + 39175 - 19968: jis0212<<14 | 0x47<<7 | 0x30, + 39176 - 19968: jis0212<<14 | 0x47<<7 | 0x31, + 39177 - 19968: jis0208<<14 | 0x50<<7 | 0x0D, + 39178 - 19968: jis0208<<14 | 0x2C<<7 | 0x3B, + 39180 - 19968: jis0208<<14 | 0x10<<7 | 0x21, + 39184 - 19968: jis0208<<14 | 0x1A<<7 | 0x20, + 39185 - 19968: jis0212<<14 | 0x47<<7 | 0x32, + 39186 - 19968: jis0208<<14 | 0x50<<7 | 0x0E, + 39187 - 19968: jis0208<<14 | 0x11<<7 | 0x4D, + 39188 - 19968: jis0208<<14 | 0x50<<7 | 0x0F, + 39189 - 19968: jis0212<<14 | 0x47<<7 | 0x33, + 39190 - 19968: jis0212<<14 | 0x47<<7 | 0x34, + 39191 - 19968: jis0212<<14 | 0x47<<7 | 0x35, + 39192 - 19968: jis0208<<14 | 0x50<<7 | 0x10, + 39194 - 19968: jis0212<<14 | 0x47<<7 | 0x36, + 39195 - 19968: jis0212<<14 | 0x47<<7 | 0x37, + 39196 - 19968: jis0212<<14 | 0x47<<7 | 0x38, + 39197 - 19968: jis0208<<14 | 0x50<<7 | 0x12, + 39198 - 19968: jis0208<<14 | 0x50<<7 | 0x13, + 39199 - 19968: jis0212<<14 | 0x47<<7 | 0x39, + 39200 - 19968: jis0208<<14 | 0x50<<7 | 0x15, + 39201 - 19968: jis0208<<14 | 0x50<<7 | 0x11, + 39202 - 19968: jis0212<<14 | 0x47<<7 | 0x3A, + 39204 - 19968: jis0208<<14 | 0x50<<7 | 0x14, + 39206 - 19968: jis0212<<14 | 0x47<<7 | 0x3B, + 39207 - 19968: jis0208<<14 | 0x5B<<7 | 0x3D, + 39208 - 19968: jis0208<<14 | 0x13<<7 | 0x3A, + 39211 - 19968: jis0212<<14 | 0x47<<7 | 0x3D, + 39212 - 19968: jis0208<<14 | 0x50<<7 | 0x16, + 39214 - 19968: jis0208<<14 | 0x50<<7 | 0x17, + 39217 - 19968: jis0212<<14 | 0x47<<7 | 0x3E, + 39218 - 19968: jis0212<<14 | 0x47<<7 | 0x3F, + 39219 - 19968: jis0212<<14 | 0x47<<7 | 0x40, + 39220 - 19968: jis0212<<14 | 0x47<<7 | 0x41, + 39221 - 19968: jis0212<<14 | 0x47<<7 | 0x42, + 39225 - 19968: jis0212<<14 | 0x47<<7 | 0x43, + 39226 - 19968: jis0212<<14 | 0x47<<7 | 0x44, + 39227 - 19968: jis0212<<14 | 0x47<<7 | 0x45, + 39228 - 19968: jis0212<<14 | 0x47<<7 | 0x46, + 39229 - 19968: jis0208<<14 | 0x50<<7 | 0x18, + 39230 - 19968: jis0208<<14 | 0x50<<7 | 0x19, + 39232 - 19968: jis0212<<14 | 0x47<<7 | 0x47, + 39233 - 19968: jis0212<<14 | 0x47<<7 | 0x48, + 39234 - 19968: jis0208<<14 | 0x50<<7 | 0x1A, + 39237 - 19968: jis0208<<14 | 0x50<<7 | 0x1C, + 39238 - 19968: jis0212<<14 | 0x47<<7 | 0x49, + 39239 - 19968: jis0212<<14 | 0x47<<7 | 0x4A, + 39240 - 19968: jis0212<<14 | 0x47<<7 | 0x4B, + 39241 - 19968: jis0208<<14 | 0x50<<7 | 0x1B, + 39243 - 19968: jis0208<<14 | 0x50<<7 | 0x1E, + 39244 - 19968: jis0208<<14 | 0x50<<7 | 0x21, + 39245 - 19968: jis0212<<14 | 0x47<<7 | 0x4C, + 39246 - 19968: jis0212<<14 | 0x47<<7 | 0x4D, + 39248 - 19968: jis0208<<14 | 0x50<<7 | 0x1D, + 39249 - 19968: jis0208<<14 | 0x50<<7 | 0x1F, + 39250 - 19968: jis0208<<14 | 0x50<<7 | 0x20, + 39252 - 19968: jis0212<<14 | 0x47<<7 | 0x4E, + 39253 - 19968: jis0208<<14 | 0x50<<7 | 0x22, + 39255 - 19968: jis0208<<14 | 0x15<<7 | 0x21, + 39256 - 19968: jis0212<<14 | 0x47<<7 | 0x4F, + 39257 - 19968: jis0212<<14 | 0x47<<7 | 0x50, + 39259 - 19968: jis0212<<14 | 0x47<<7 | 0x51, + 39260 - 19968: jis0212<<14 | 0x47<<7 | 0x52, + 39262 - 19968: jis0212<<14 | 0x47<<7 | 0x53, + 39263 - 19968: jis0212<<14 | 0x47<<7 | 0x54, + 39264 - 19968: jis0212<<14 | 0x47<<7 | 0x55, + 39318 - 19968: jis0208<<14 | 0x1B<<7 | 0x52, + 39319 - 19968: jis0208<<14 | 0x50<<7 | 0x23, + 39320 - 19968: jis0208<<14 | 0x50<<7 | 0x24, + 39321 - 19968: jis0208<<14 | 0x18<<7 | 0x40, + 39323 - 19968: jis0212<<14 | 0x47<<7 | 0x56, + 39325 - 19968: jis0212<<14 | 0x47<<7 | 0x57, + 39326 - 19968: jis0208<<14 | 0x5B<<7 | 0x3F, + 39327 - 19968: jis0212<<14 | 0x47<<7 | 0x58, + 39333 - 19968: jis0208<<14 | 0x50<<7 | 0x25, + 39334 - 19968: jis0212<<14 | 0x47<<7 | 0x59, + 39336 - 19968: jis0208<<14 | 0x12<<7 | 0x1D, + 39340 - 19968: jis0208<<14 | 0x26<<7 | 0x2E, + 39341 - 19968: jis0208<<14 | 0x50<<7 | 0x26, + 39342 - 19968: jis0208<<14 | 0x50<<7 | 0x27, + 39344 - 19968: jis0212<<14 | 0x47<<7 | 0x5A, + 39345 - 19968: jis0212<<14 | 0x47<<7 | 0x5B, + 39346 - 19968: jis0212<<14 | 0x47<<7 | 0x5C, + 39347 - 19968: jis0208<<14 | 0x22<<7 | 0x39, + 39348 - 19968: jis0208<<14 | 0x25<<7 | 0x4A, + 39349 - 19968: jis0212<<14 | 0x47<<7 | 0x5D, + 39353 - 19968: jis0212<<14 | 0x48<<7 | 0x00, + 39354 - 19968: jis0212<<14 | 0x48<<7 | 0x01, + 39356 - 19968: jis0208<<14 | 0x50<<7 | 0x28, + 39357 - 19968: jis0212<<14 | 0x48<<7 | 0x02, + 39359 - 19968: jis0212<<14 | 0x48<<7 | 0x03, + 39361 - 19968: jis0208<<14 | 0x26<<7 | 0x5C, + 39363 - 19968: jis0212<<14 | 0x48<<7 | 0x04, + 39364 - 19968: jis0208<<14 | 0x21<<7 | 0x2B, + 39365 - 19968: jis0208<<14 | 0x10<<7 | 0x37, + 39366 - 19968: jis0208<<14 | 0x15<<7 | 0x4D, + 39368 - 19968: jis0208<<14 | 0x15<<7 | 0x4E, + 39369 - 19968: jis0212<<14 | 0x48<<7 | 0x05, + 39376 - 19968: jis0208<<14 | 0x22<<7 | 0x52, + 39377 - 19968: jis0208<<14 | 0x50<<7 | 0x2D, + 39378 - 19968: jis0208<<14 | 0x15<<7 | 0x4F, + 39379 - 19968: jis0212<<14 | 0x48<<7 | 0x06, + 39380 - 19968: jis0212<<14 | 0x48<<7 | 0x07, + 39381 - 19968: jis0208<<14 | 0x11<<7 | 0x4E, + 39384 - 19968: jis0208<<14 | 0x50<<7 | 0x2C, + 39385 - 19968: jis0212<<14 | 0x48<<7 | 0x08, + 39386 - 19968: jis0212<<14 | 0x48<<7 | 0x09, + 39387 - 19968: jis0208<<14 | 0x50<<7 | 0x2A, + 39388 - 19968: jis0212<<14 | 0x48<<7 | 0x0A, + 39389 - 19968: jis0208<<14 | 0x50<<7 | 0x2B, + 39390 - 19968: jis0212<<14 | 0x48<<7 | 0x0B, + 39391 - 19968: jis0208<<14 | 0x50<<7 | 0x29, + 39394 - 19968: jis0208<<14 | 0x50<<7 | 0x37, + 39399 - 19968: jis0212<<14 | 0x48<<7 | 0x0C, + 39402 - 19968: jis0212<<14 | 0x48<<7 | 0x0D, + 39403 - 19968: jis0212<<14 | 0x48<<7 | 0x0E, + 39404 - 19968: jis0212<<14 | 0x48<<7 | 0x0F, + 39405 - 19968: jis0208<<14 | 0x50<<7 | 0x2E, + 39406 - 19968: jis0208<<14 | 0x50<<7 | 0x2F, + 39408 - 19968: jis0212<<14 | 0x48<<7 | 0x10, + 39409 - 19968: jis0208<<14 | 0x50<<7 | 0x30, + 39410 - 19968: jis0208<<14 | 0x50<<7 | 0x31, + 39412 - 19968: jis0212<<14 | 0x48<<7 | 0x11, + 39413 - 19968: jis0212<<14 | 0x48<<7 | 0x12, + 39416 - 19968: jis0208<<14 | 0x50<<7 | 0x33, + 39417 - 19968: jis0212<<14 | 0x48<<7 | 0x13, + 39419 - 19968: jis0208<<14 | 0x50<<7 | 0x32, + 39421 - 19968: jis0212<<14 | 0x48<<7 | 0x14, + 39422 - 19968: jis0212<<14 | 0x48<<7 | 0x15, + 39423 - 19968: jis0208<<14 | 0x1C<<7 | 0x38, + 39425 - 19968: jis0208<<14 | 0x50<<7 | 0x34, + 39426 - 19968: jis0212<<14 | 0x48<<7 | 0x16, + 39427 - 19968: jis0212<<14 | 0x48<<7 | 0x17, + 39428 - 19968: jis0212<<14 | 0x48<<7 | 0x18, + 39429 - 19968: jis0208<<14 | 0x50<<7 | 0x36, + 39435 - 19968: jis0212<<14 | 0x48<<7 | 0x19, + 39436 - 19968: jis0212<<14 | 0x48<<7 | 0x1A, + 39438 - 19968: jis0208<<14 | 0x14<<7 | 0x12, + 39439 - 19968: jis0208<<14 | 0x50<<7 | 0x35, + 39440 - 19968: jis0212<<14 | 0x48<<7 | 0x1B, + 39441 - 19968: jis0212<<14 | 0x48<<7 | 0x1C, + 39442 - 19968: jis0208<<14 | 0x20<<7 | 0x5A, + 39443 - 19968: jis0208<<14 | 0x17<<7 | 0x12, + 39446 - 19968: jis0212<<14 | 0x48<<7 | 0x1D, + 39449 - 19968: jis0208<<14 | 0x50<<7 | 0x38, + 39454 - 19968: jis0212<<14 | 0x48<<7 | 0x1E, + 39456 - 19968: jis0212<<14 | 0x48<<7 | 0x1F, + 39458 - 19968: jis0212<<14 | 0x48<<7 | 0x20, + 39459 - 19968: jis0212<<14 | 0x48<<7 | 0x21, + 39460 - 19968: jis0212<<14 | 0x48<<7 | 0x22, + 39463 - 19968: jis0212<<14 | 0x48<<7 | 0x23, + 39464 - 19968: jis0208<<14 | 0x21<<7 | 0x2C, + 39467 - 19968: jis0208<<14 | 0x50<<7 | 0x39, + 39469 - 19968: jis0212<<14 | 0x48<<7 | 0x24, + 39470 - 19968: jis0212<<14 | 0x48<<7 | 0x25, + 39472 - 19968: jis0208<<14 | 0x25<<7 | 0x0C, + 39475 - 19968: jis0212<<14 | 0x48<<7 | 0x26, + 39477 - 19968: jis0212<<14 | 0x48<<7 | 0x27, + 39478 - 19968: jis0212<<14 | 0x48<<7 | 0x28, + 39479 - 19968: jis0208<<14 | 0x50<<7 | 0x3A, + 39480 - 19968: jis0212<<14 | 0x48<<7 | 0x29, + 39486 - 19968: jis0208<<14 | 0x50<<7 | 0x3F, + 39488 - 19968: jis0208<<14 | 0x50<<7 | 0x3D, + 39489 - 19968: jis0212<<14 | 0x48<<7 | 0x2B, + 39490 - 19968: jis0208<<14 | 0x50<<7 | 0x3C, + 39491 - 19968: jis0208<<14 | 0x50<<7 | 0x3E, + 39492 - 19968: jis0212<<14 | 0x48<<7 | 0x2C, + 39493 - 19968: jis0208<<14 | 0x50<<7 | 0x3B, + 39495 - 19968: jis0212<<14 | 0x48<<7 | 0x2A, + 39498 - 19968: jis0212<<14 | 0x48<<7 | 0x2D, + 39499 - 19968: jis0212<<14 | 0x48<<7 | 0x2E, + 39500 - 19968: jis0212<<14 | 0x48<<7 | 0x2F, + 39501 - 19968: jis0208<<14 | 0x50<<7 | 0x41, + 39502 - 19968: jis0208<<14 | 0x5B<<7 | 0x40, + 39505 - 19968: jis0212<<14 | 0x48<<7 | 0x31, + 39508 - 19968: jis0212<<14 | 0x48<<7 | 0x32, + 39509 - 19968: jis0208<<14 | 0x50<<7 | 0x40, + 39510 - 19968: jis0212<<14 | 0x48<<7 | 0x33, + 39511 - 19968: jis0208<<14 | 0x50<<7 | 0x43, + 39514 - 19968: jis0208<<14 | 0x15<<7 | 0x22, + 39515 - 19968: jis0208<<14 | 0x50<<7 | 0x42, + 39517 - 19968: jis0212<<14 | 0x48<<7 | 0x34, + 39519 - 19968: jis0208<<14 | 0x50<<7 | 0x44, + 39522 - 19968: jis0208<<14 | 0x50<<7 | 0x45, + 39524 - 19968: jis0208<<14 | 0x50<<7 | 0x47, + 39525 - 19968: jis0208<<14 | 0x50<<7 | 0x46, + 39529 - 19968: jis0208<<14 | 0x50<<7 | 0x48, + 39530 - 19968: jis0208<<14 | 0x50<<7 | 0x4A, + 39531 - 19968: jis0208<<14 | 0x50<<7 | 0x49, + 39592 - 19968: jis0208<<14 | 0x18<<7 | 0x5B, + 39594 - 19968: jis0212<<14 | 0x48<<7 | 0x35, + 39596 - 19968: jis0212<<14 | 0x48<<7 | 0x36, + 39597 - 19968: jis0208<<14 | 0x50<<7 | 0x4B, + 39598 - 19968: jis0212<<14 | 0x48<<7 | 0x37, + 39599 - 19968: jis0212<<14 | 0x48<<7 | 0x38, + 39600 - 19968: jis0208<<14 | 0x50<<7 | 0x4C, + 39602 - 19968: jis0212<<14 | 0x48<<7 | 0x39, + 39604 - 19968: jis0212<<14 | 0x48<<7 | 0x3A, + 39605 - 19968: jis0212<<14 | 0x48<<7 | 0x3B, + 39606 - 19968: jis0212<<14 | 0x48<<7 | 0x3C, + 39608 - 19968: jis0208<<14 | 0x12<<7 | 0x1B, + 39609 - 19968: jis0212<<14 | 0x48<<7 | 0x3D, + 39611 - 19968: jis0212<<14 | 0x48<<7 | 0x3E, + 39612 - 19968: jis0208<<14 | 0x50<<7 | 0x4D, + 39614 - 19968: jis0212<<14 | 0x48<<7 | 0x3F, + 39615 - 19968: jis0212<<14 | 0x48<<7 | 0x40, + 39616 - 19968: jis0208<<14 | 0x50<<7 | 0x4E, + 39617 - 19968: jis0212<<14 | 0x48<<7 | 0x41, + 39619 - 19968: jis0212<<14 | 0x48<<7 | 0x42, + 39620 - 19968: jis0208<<14 | 0x1E<<7 | 0x50, + 39622 - 19968: jis0212<<14 | 0x48<<7 | 0x43, + 39624 - 19968: jis0212<<14 | 0x48<<7 | 0x44, + 39630 - 19968: jis0212<<14 | 0x48<<7 | 0x45, + 39631 - 19968: jis0208<<14 | 0x50<<7 | 0x4F, + 39632 - 19968: jis0212<<14 | 0x48<<7 | 0x46, + 39633 - 19968: jis0208<<14 | 0x50<<7 | 0x50, + 39634 - 19968: jis0212<<14 | 0x48<<7 | 0x47, + 39635 - 19968: jis0208<<14 | 0x50<<7 | 0x51, + 39636 - 19968: jis0208<<14 | 0x50<<7 | 0x52, + 39637 - 19968: jis0212<<14 | 0x48<<7 | 0x48, + 39638 - 19968: jis0212<<14 | 0x48<<7 | 0x49, + 39639 - 19968: jis0212<<14 | 0x48<<7 | 0x4A, + 39640 - 19968: jis0208<<14 | 0x18<<7 | 0x41, + 39641 - 19968: jis0208<<14 | 0x5B<<7 | 0x41, + 39643 - 19968: jis0212<<14 | 0x48<<7 | 0x4B, + 39644 - 19968: jis0208<<14 | 0x5B<<7 | 0x42, + 39646 - 19968: jis0208<<14 | 0x50<<7 | 0x53, + 39647 - 19968: jis0208<<14 | 0x50<<7 | 0x54, + 39648 - 19968: jis0212<<14 | 0x48<<7 | 0x4D, + 39650 - 19968: jis0208<<14 | 0x50<<7 | 0x55, + 39651 - 19968: jis0208<<14 | 0x50<<7 | 0x56, + 39652 - 19968: jis0212<<14 | 0x48<<7 | 0x4E, + 39653 - 19968: jis0212<<14 | 0x48<<7 | 0x4F, + 39654 - 19968: jis0208<<14 | 0x50<<7 | 0x57, + 39655 - 19968: jis0212<<14 | 0x48<<7 | 0x50, + 39657 - 19968: jis0212<<14 | 0x48<<7 | 0x51, + 39658 - 19968: jis0208<<14 | 0x27<<7 | 0x10, + 39659 - 19968: jis0208<<14 | 0x50<<7 | 0x59, + 39660 - 19968: jis0212<<14 | 0x48<<7 | 0x52, + 39661 - 19968: jis0208<<14 | 0x28<<7 | 0x05, + 39662 - 19968: jis0208<<14 | 0x50<<7 | 0x5A, + 39663 - 19968: jis0208<<14 | 0x50<<7 | 0x58, + 39665 - 19968: jis0208<<14 | 0x50<<7 | 0x5C, + 39666 - 19968: jis0212<<14 | 0x48<<7 | 0x53, + 39667 - 19968: jis0212<<14 | 0x48<<7 | 0x54, + 39668 - 19968: jis0208<<14 | 0x50<<7 | 0x5B, + 39669 - 19968: jis0212<<14 | 0x48<<7 | 0x55, + 39671 - 19968: jis0208<<14 | 0x50<<7 | 0x5D, + 39673 - 19968: jis0212<<14 | 0x48<<7 | 0x56, + 39674 - 19968: jis0212<<14 | 0x48<<7 | 0x57, + 39675 - 19968: jis0208<<14 | 0x51<<7 | 0x00, + 39677 - 19968: jis0212<<14 | 0x48<<7 | 0x58, + 39679 - 19968: jis0212<<14 | 0x48<<7 | 0x59, + 39680 - 19968: jis0212<<14 | 0x48<<7 | 0x5A, + 39681 - 19968: jis0212<<14 | 0x48<<7 | 0x5B, + 39682 - 19968: jis0212<<14 | 0x48<<7 | 0x5C, + 39683 - 19968: jis0212<<14 | 0x48<<7 | 0x5D, + 39684 - 19968: jis0212<<14 | 0x49<<7 | 0x00, + 39685 - 19968: jis0212<<14 | 0x49<<7 | 0x01, + 39686 - 19968: jis0208<<14 | 0x51<<7 | 0x01, + 39688 - 19968: jis0212<<14 | 0x49<<7 | 0x02, + 39689 - 19968: jis0212<<14 | 0x49<<7 | 0x03, + 39691 - 19968: jis0212<<14 | 0x49<<7 | 0x04, + 39692 - 19968: jis0212<<14 | 0x49<<7 | 0x05, + 39693 - 19968: jis0212<<14 | 0x49<<7 | 0x06, + 39694 - 19968: jis0212<<14 | 0x49<<7 | 0x07, + 39696 - 19968: jis0212<<14 | 0x49<<7 | 0x08, + 39698 - 19968: jis0212<<14 | 0x49<<7 | 0x09, + 39702 - 19968: jis0212<<14 | 0x49<<7 | 0x0A, + 39704 - 19968: jis0208<<14 | 0x51<<7 | 0x02, + 39705 - 19968: jis0212<<14 | 0x49<<7 | 0x0B, + 39706 - 19968: jis0208<<14 | 0x51<<7 | 0x03, + 39707 - 19968: jis0212<<14 | 0x49<<7 | 0x0C, + 39708 - 19968: jis0212<<14 | 0x49<<7 | 0x0D, + 39711 - 19968: jis0208<<14 | 0x51<<7 | 0x04, + 39712 - 19968: jis0212<<14 | 0x49<<7 | 0x0E, + 39714 - 19968: jis0208<<14 | 0x51<<7 | 0x05, + 39715 - 19968: jis0208<<14 | 0x51<<7 | 0x06, + 39717 - 19968: jis0208<<14 | 0x51<<7 | 0x07, + 39718 - 19968: jis0212<<14 | 0x49<<7 | 0x0F, + 39719 - 19968: jis0208<<14 | 0x51<<7 | 0x08, + 39720 - 19968: jis0208<<14 | 0x51<<7 | 0x09, + 39721 - 19968: jis0208<<14 | 0x51<<7 | 0x0A, + 39722 - 19968: jis0208<<14 | 0x51<<7 | 0x0B, + 39723 - 19968: jis0212<<14 | 0x49<<7 | 0x10, + 39725 - 19968: jis0212<<14 | 0x49<<7 | 0x11, + 39726 - 19968: jis0208<<14 | 0x51<<7 | 0x0C, + 39727 - 19968: jis0208<<14 | 0x51<<7 | 0x0D, + 39729 - 19968: jis0208<<14 | 0x3C<<7 | 0x14, + 39730 - 19968: jis0208<<14 | 0x51<<7 | 0x0E, + 39731 - 19968: jis0212<<14 | 0x49<<7 | 0x12, + 39732 - 19968: jis0212<<14 | 0x49<<7 | 0x13, + 39733 - 19968: jis0212<<14 | 0x49<<7 | 0x14, + 39735 - 19968: jis0212<<14 | 0x49<<7 | 0x15, + 39737 - 19968: jis0212<<14 | 0x49<<7 | 0x16, + 39738 - 19968: jis0212<<14 | 0x49<<7 | 0x17, + 39739 - 19968: jis0208<<14 | 0x43<<7 | 0x57, + 39740 - 19968: jis0208<<14 | 0x14<<7 | 0x13, + 39741 - 19968: jis0212<<14 | 0x49<<7 | 0x18, + 39745 - 19968: jis0208<<14 | 0x12<<7 | 0x00, + 39746 - 19968: jis0208<<14 | 0x19<<7 | 0x11, + 39747 - 19968: jis0208<<14 | 0x51<<7 | 0x10, + 39748 - 19968: jis0208<<14 | 0x51<<7 | 0x0F, + 39749 - 19968: jis0208<<14 | 0x2B<<7 | 0x04, + 39752 - 19968: jis0212<<14 | 0x49<<7 | 0x19, + 39755 - 19968: jis0212<<14 | 0x49<<7 | 0x1A, + 39756 - 19968: jis0212<<14 | 0x49<<7 | 0x1B, + 39757 - 19968: jis0208<<14 | 0x51<<7 | 0x12, + 39758 - 19968: jis0208<<14 | 0x51<<7 | 0x13, + 39759 - 19968: jis0208<<14 | 0x51<<7 | 0x11, + 39761 - 19968: jis0208<<14 | 0x51<<7 | 0x14, + 39764 - 19968: jis0208<<14 | 0x2A<<7 | 0x41, + 39765 - 19968: jis0212<<14 | 0x49<<7 | 0x1C, + 39766 - 19968: jis0212<<14 | 0x49<<7 | 0x1D, + 39767 - 19968: jis0212<<14 | 0x49<<7 | 0x1E, + 39768 - 19968: jis0208<<14 | 0x51<<7 | 0x15, + 39770 - 19968: jis0208<<14 | 0x14<<7 | 0x5A, + 39771 - 19968: jis0212<<14 | 0x49<<7 | 0x1F, + 39774 - 19968: jis0212<<14 | 0x49<<7 | 0x20, + 39777 - 19968: jis0212<<14 | 0x49<<7 | 0x21, + 39779 - 19968: jis0212<<14 | 0x49<<7 | 0x22, + 39781 - 19968: jis0212<<14 | 0x49<<7 | 0x23, + 39782 - 19968: jis0212<<14 | 0x49<<7 | 0x24, + 39784 - 19968: jis0212<<14 | 0x49<<7 | 0x25, + 39786 - 19968: jis0212<<14 | 0x49<<7 | 0x26, + 39787 - 19968: jis0212<<14 | 0x49<<7 | 0x27, + 39788 - 19968: jis0212<<14 | 0x49<<7 | 0x28, + 39789 - 19968: jis0212<<14 | 0x49<<7 | 0x29, + 39790 - 19968: jis0212<<14 | 0x49<<7 | 0x2A, + 39791 - 19968: jis0208<<14 | 0x2E<<7 | 0x04, + 39794 - 19968: jis0208<<14 | 0x5B<<7 | 0x44, + 39795 - 19968: jis0212<<14 | 0x49<<7 | 0x2B, + 39796 - 19968: jis0208<<14 | 0x51<<7 | 0x16, + 39797 - 19968: jis0208<<14 | 0x5B<<7 | 0x43, + 39799 - 19968: jis0212<<14 | 0x49<<7 | 0x2D, + 39800 - 19968: jis0212<<14 | 0x49<<7 | 0x2E, + 39801 - 19968: jis0212<<14 | 0x49<<7 | 0x2F, + 39807 - 19968: jis0212<<14 | 0x49<<7 | 0x30, + 39808 - 19968: jis0212<<14 | 0x49<<7 | 0x31, + 39811 - 19968: jis0208<<14 | 0x51<<7 | 0x18, + 39812 - 19968: jis0212<<14 | 0x49<<7 | 0x32, + 39813 - 19968: jis0212<<14 | 0x49<<7 | 0x33, + 39814 - 19968: jis0212<<14 | 0x49<<7 | 0x34, + 39815 - 19968: jis0212<<14 | 0x49<<7 | 0x35, + 39817 - 19968: jis0212<<14 | 0x49<<7 | 0x36, + 39818 - 19968: jis0212<<14 | 0x49<<7 | 0x37, + 39819 - 19968: jis0212<<14 | 0x49<<7 | 0x38, + 39821 - 19968: jis0212<<14 | 0x49<<7 | 0x39, + 39822 - 19968: jis0208<<14 | 0x0F<<7 | 0x1D, + 39823 - 19968: jis0208<<14 | 0x5B<<7 | 0x45, + 39824 - 19968: jis0212<<14 | 0x49<<7 | 0x3B, + 39825 - 19968: jis0208<<14 | 0x51<<7 | 0x19, + 39826 - 19968: jis0208<<14 | 0x29<<7 | 0x0A, + 39827 - 19968: jis0208<<14 | 0x51<<7 | 0x17, + 39828 - 19968: jis0212<<14 | 0x49<<7 | 0x3C, + 39830 - 19968: jis0208<<14 | 0x51<<7 | 0x1A, + 39831 - 19968: jis0208<<14 | 0x51<<7 | 0x1B, + 39834 - 19968: jis0212<<14 | 0x49<<7 | 0x3D, + 39837 - 19968: jis0212<<14 | 0x49<<7 | 0x3E, + 39838 - 19968: jis0212<<14 | 0x49<<7 | 0x3F, + 39839 - 19968: jis0208<<14 | 0x51<<7 | 0x1C, + 39840 - 19968: jis0208<<14 | 0x51<<7 | 0x1D, + 39846 - 19968: jis0212<<14 | 0x49<<7 | 0x40, + 39847 - 19968: jis0212<<14 | 0x49<<7 | 0x41, + 39848 - 19968: jis0208<<14 | 0x51<<7 | 0x1E, + 39849 - 19968: jis0212<<14 | 0x49<<7 | 0x42, + 39850 - 19968: jis0208<<14 | 0x2A<<7 | 0x4D, + 39851 - 19968: jis0208<<14 | 0x1A<<7 | 0x0C, + 39852 - 19968: jis0212<<14 | 0x49<<7 | 0x43, + 39853 - 19968: jis0208<<14 | 0x19<<7 | 0x59, + 39854 - 19968: jis0208<<14 | 0x20<<7 | 0x0E, + 39856 - 19968: jis0212<<14 | 0x49<<7 | 0x44, + 39857 - 19968: jis0208<<14 | 0x5B<<7 | 0x46, + 39858 - 19968: jis0212<<14 | 0x49<<7 | 0x46, + 39860 - 19968: jis0208<<14 | 0x51<<7 | 0x1F, + 39863 - 19968: jis0212<<14 | 0x49<<7 | 0x47, + 39864 - 19968: jis0212<<14 | 0x49<<7 | 0x48, + 39865 - 19968: jis0208<<14 | 0x51<<7 | 0x22, + 39867 - 19968: jis0208<<14 | 0x5B<<7 | 0x47, + 39868 - 19968: jis0212<<14 | 0x49<<7 | 0x4A, + 39870 - 19968: jis0212<<14 | 0x49<<7 | 0x4B, + 39871 - 19968: jis0212<<14 | 0x49<<7 | 0x4C, + 39872 - 19968: jis0208<<14 | 0x51<<7 | 0x20, + 39873 - 19968: jis0212<<14 | 0x49<<7 | 0x4D, + 39878 - 19968: jis0208<<14 | 0x51<<7 | 0x23, + 39879 - 19968: jis0212<<14 | 0x49<<7 | 0x4E, + 39880 - 19968: jis0212<<14 | 0x49<<7 | 0x4F, + 39881 - 19968: jis0208<<14 | 0x17<<7 | 0x50, + 39882 - 19968: jis0208<<14 | 0x51<<7 | 0x21, + 39886 - 19968: jis0212<<14 | 0x49<<7 | 0x50, + 39887 - 19968: jis0208<<14 | 0x51<<7 | 0x24, + 39888 - 19968: jis0212<<14 | 0x49<<7 | 0x51, + 39889 - 19968: jis0208<<14 | 0x51<<7 | 0x25, + 39890 - 19968: jis0208<<14 | 0x51<<7 | 0x26, + 39892 - 19968: jis0208<<14 | 0x51<<7 | 0x2A, + 39894 - 19968: jis0208<<14 | 0x1A<<7 | 0x09, + 39895 - 19968: jis0212<<14 | 0x49<<7 | 0x52, + 39896 - 19968: jis0212<<14 | 0x49<<7 | 0x53, + 39899 - 19968: jis0208<<14 | 0x21<<7 | 0x43, + 39901 - 19968: jis0212<<14 | 0x49<<7 | 0x54, + 39903 - 19968: jis0212<<14 | 0x49<<7 | 0x55, + 39905 - 19968: jis0208<<14 | 0x51<<7 | 0x2B, + 39906 - 19968: jis0208<<14 | 0x51<<7 | 0x28, + 39907 - 19968: jis0208<<14 | 0x51<<7 | 0x27, + 39908 - 19968: jis0208<<14 | 0x51<<7 | 0x29, + 39909 - 19968: jis0212<<14 | 0x49<<7 | 0x56, + 39911 - 19968: jis0212<<14 | 0x49<<7 | 0x57, + 39912 - 19968: jis0208<<14 | 0x16<<7 | 0x3E, + 39914 - 19968: jis0212<<14 | 0x49<<7 | 0x58, + 39915 - 19968: jis0212<<14 | 0x49<<7 | 0x59, + 39919 - 19968: jis0212<<14 | 0x49<<7 | 0x5A, + 39920 - 19968: jis0208<<14 | 0x51<<7 | 0x2F, + 39921 - 19968: jis0208<<14 | 0x51<<7 | 0x2E, + 39922 - 19968: jis0208<<14 | 0x51<<7 | 0x2D, + 39923 - 19968: jis0212<<14 | 0x49<<7 | 0x5B, + 39925 - 19968: jis0208<<14 | 0x0F<<7 | 0x12, + 39927 - 19968: jis0212<<14 | 0x49<<7 | 0x5C, + 39928 - 19968: jis0212<<14 | 0x49<<7 | 0x5D, + 39929 - 19968: jis0212<<14 | 0x4A<<7 | 0x00, + 39930 - 19968: jis0212<<14 | 0x4A<<7 | 0x01, + 39933 - 19968: jis0212<<14 | 0x4A<<7 | 0x02, + 39935 - 19968: jis0212<<14 | 0x4A<<7 | 0x03, + 39936 - 19968: jis0208<<14 | 0x5B<<7 | 0x48, + 39938 - 19968: jis0212<<14 | 0x4A<<7 | 0x05, + 39940 - 19968: jis0208<<14 | 0x51<<7 | 0x39, + 39942 - 19968: jis0208<<14 | 0x51<<7 | 0x35, + 39944 - 19968: jis0208<<14 | 0x51<<7 | 0x36, + 39945 - 19968: jis0208<<14 | 0x51<<7 | 0x32, + 39946 - 19968: jis0208<<14 | 0x51<<7 | 0x38, + 39947 - 19968: jis0212<<14 | 0x4A<<7 | 0x06, + 39948 - 19968: jis0208<<14 | 0x51<<7 | 0x34, + 39949 - 19968: jis0208<<14 | 0x12<<7 | 0x41, + 39951 - 19968: jis0212<<14 | 0x4A<<7 | 0x07, + 39952 - 19968: jis0208<<14 | 0x2E<<7 | 0x2B, + 39953 - 19968: jis0212<<14 | 0x4A<<7 | 0x08, + 39954 - 19968: jis0208<<14 | 0x51<<7 | 0x37, + 39955 - 19968: jis0208<<14 | 0x51<<7 | 0x33, + 39956 - 19968: jis0208<<14 | 0x51<<7 | 0x31, + 39957 - 19968: jis0208<<14 | 0x51<<7 | 0x30, + 39958 - 19968: jis0212<<14 | 0x4A<<7 | 0x09, + 39960 - 19968: jis0212<<14 | 0x4A<<7 | 0x0A, + 39961 - 19968: jis0212<<14 | 0x4A<<7 | 0x0B, + 39962 - 19968: jis0212<<14 | 0x4A<<7 | 0x0C, + 39963 - 19968: jis0208<<14 | 0x51<<7 | 0x3B, + 39964 - 19968: jis0212<<14 | 0x4A<<7 | 0x0D, + 39966 - 19968: jis0212<<14 | 0x4A<<7 | 0x0E, + 39969 - 19968: jis0208<<14 | 0x51<<7 | 0x3E, + 39970 - 19968: jis0212<<14 | 0x4A<<7 | 0x0F, + 39971 - 19968: jis0212<<14 | 0x4A<<7 | 0x10, + 39972 - 19968: jis0208<<14 | 0x51<<7 | 0x3D, + 39973 - 19968: jis0208<<14 | 0x51<<7 | 0x3C, + 39974 - 19968: jis0212<<14 | 0x4A<<7 | 0x11, + 39975 - 19968: jis0212<<14 | 0x4A<<7 | 0x12, + 39976 - 19968: jis0212<<14 | 0x4A<<7 | 0x13, + 39977 - 19968: jis0212<<14 | 0x4A<<7 | 0x14, + 39978 - 19968: jis0212<<14 | 0x4A<<7 | 0x15, + 39981 - 19968: jis0208<<14 | 0x28<<7 | 0x28, + 39982 - 19968: jis0208<<14 | 0x51<<7 | 0x3A, + 39983 - 19968: jis0208<<14 | 0x0F<<7 | 0x52, + 39984 - 19968: jis0208<<14 | 0x51<<7 | 0x3F, + 39985 - 19968: jis0212<<14 | 0x4A<<7 | 0x16, + 39986 - 19968: jis0208<<14 | 0x51<<7 | 0x41, + 39989 - 19968: jis0212<<14 | 0x4A<<7 | 0x17, + 39990 - 19968: jis0212<<14 | 0x4A<<7 | 0x18, + 39991 - 19968: jis0212<<14 | 0x4A<<7 | 0x19, + 39993 - 19968: jis0208<<14 | 0x12<<7 | 0x4E, + 39994 - 19968: jis0208<<14 | 0x51<<7 | 0x2C, + 39995 - 19968: jis0208<<14 | 0x10<<7 | 0x16, + 39997 - 19968: jis0212<<14 | 0x4A<<7 | 0x1A, + 39998 - 19968: jis0208<<14 | 0x51<<7 | 0x43, + 40001 - 19968: jis0212<<14 | 0x4A<<7 | 0x1B, + 40003 - 19968: jis0212<<14 | 0x4A<<7 | 0x1C, + 40004 - 19968: jis0212<<14 | 0x4A<<7 | 0x1D, + 40005 - 19968: jis0212<<14 | 0x4A<<7 | 0x1E, + 40006 - 19968: jis0208<<14 | 0x51<<7 | 0x42, + 40007 - 19968: jis0208<<14 | 0x51<<7 | 0x40, + 40008 - 19968: jis0208<<14 | 0x22<<7 | 0x0C, + 40009 - 19968: jis0212<<14 | 0x4A<<7 | 0x1F, + 40010 - 19968: jis0212<<14 | 0x4A<<7 | 0x20, + 40014 - 19968: jis0212<<14 | 0x4A<<7 | 0x21, + 40015 - 19968: jis0212<<14 | 0x4A<<7 | 0x22, + 40016 - 19968: jis0212<<14 | 0x4A<<7 | 0x23, + 40018 - 19968: jis0208<<14 | 0x2A<<7 | 0x4F, + 40019 - 19968: jis0212<<14 | 0x4A<<7 | 0x24, + 40020 - 19968: jis0212<<14 | 0x4A<<7 | 0x25, + 40022 - 19968: jis0212<<14 | 0x4A<<7 | 0x26, + 40023 - 19968: jis0208<<14 | 0x2D<<7 | 0x39, + 40024 - 19968: jis0212<<14 | 0x4A<<7 | 0x27, + 40026 - 19968: jis0208<<14 | 0x51<<7 | 0x44, + 40027 - 19968: jis0212<<14 | 0x4A<<7 | 0x28, + 40028 - 19968: jis0212<<14 | 0x4A<<7 | 0x2F, + 40029 - 19968: jis0212<<14 | 0x4A<<7 | 0x29, + 40030 - 19968: jis0212<<14 | 0x4A<<7 | 0x2A, + 40031 - 19968: jis0212<<14 | 0x4A<<7 | 0x2B, + 40032 - 19968: jis0208<<14 | 0x51<<7 | 0x45, + 40035 - 19968: jis0212<<14 | 0x4A<<7 | 0x2C, + 40039 - 19968: jis0208<<14 | 0x51<<7 | 0x46, + 40040 - 19968: jis0212<<14 | 0x4A<<7 | 0x31, + 40041 - 19968: jis0212<<14 | 0x4A<<7 | 0x2D, + 40042 - 19968: jis0212<<14 | 0x4A<<7 | 0x2E, + 40043 - 19968: jis0212<<14 | 0x4A<<7 | 0x30, + 40046 - 19968: jis0212<<14 | 0x4A<<7 | 0x32, + 40048 - 19968: jis0212<<14 | 0x4A<<7 | 0x33, + 40050 - 19968: jis0212<<14 | 0x4A<<7 | 0x34, + 40053 - 19968: jis0212<<14 | 0x4A<<7 | 0x35, + 40054 - 19968: jis0208<<14 | 0x51<<7 | 0x47, + 40055 - 19968: jis0212<<14 | 0x4A<<7 | 0x36, + 40056 - 19968: jis0208<<14 | 0x51<<7 | 0x48, + 40059 - 19968: jis0212<<14 | 0x4A<<7 | 0x37, + 40165 - 19968: jis0208<<14 | 0x23<<7 | 0x1A, + 40166 - 19968: jis0212<<14 | 0x4A<<7 | 0x38, + 40167 - 19968: jis0208<<14 | 0x51<<7 | 0x49, + 40169 - 19968: jis0208<<14 | 0x27<<7 | 0x16, + 40171 - 19968: jis0208<<14 | 0x51<<7 | 0x4E, + 40172 - 19968: jis0208<<14 | 0x51<<7 | 0x4A, + 40176 - 19968: jis0208<<14 | 0x51<<7 | 0x4B, + 40178 - 19968: jis0212<<14 | 0x4A<<7 | 0x39, + 40179 - 19968: jis0208<<14 | 0x2A<<7 | 0x10, + 40180 - 19968: jis0208<<14 | 0x2B<<7 | 0x23, + 40182 - 19968: jis0208<<14 | 0x25<<7 | 0x2F, + 40183 - 19968: jis0212<<14 | 0x4A<<7 | 0x3A, + 40185 - 19968: jis0212<<14 | 0x4A<<7 | 0x3B, + 40194 - 19968: jis0212<<14 | 0x4A<<7 | 0x3D, + 40195 - 19968: jis0208<<14 | 0x51<<7 | 0x4F, + 40198 - 19968: jis0208<<14 | 0x51<<7 | 0x50, + 40199 - 19968: jis0208<<14 | 0x25<<7 | 0x1D, + 40200 - 19968: jis0208<<14 | 0x51<<7 | 0x4D, + 40201 - 19968: jis0208<<14 | 0x51<<7 | 0x4C, + 40203 - 19968: jis0212<<14 | 0x4A<<7 | 0x3C, + 40206 - 19968: jis0208<<14 | 0x11<<7 | 0x09, + 40209 - 19968: jis0212<<14 | 0x4A<<7 | 0x3E, + 40210 - 19968: jis0208<<14 | 0x51<<7 | 0x58, + 40213 - 19968: jis0208<<14 | 0x51<<7 | 0x57, + 40215 - 19968: jis0212<<14 | 0x4A<<7 | 0x3F, + 40216 - 19968: jis0212<<14 | 0x4A<<7 | 0x40, + 40219 - 19968: jis0208<<14 | 0x10<<7 | 0x54, + 40220 - 19968: jis0212<<14 | 0x4A<<7 | 0x41, + 40221 - 19968: jis0212<<14 | 0x4A<<7 | 0x42, + 40222 - 19968: jis0212<<14 | 0x4A<<7 | 0x43, + 40223 - 19968: jis0208<<14 | 0x51<<7 | 0x55, + 40227 - 19968: jis0208<<14 | 0x51<<7 | 0x54, + 40230 - 19968: jis0208<<14 | 0x51<<7 | 0x52, + 40232 - 19968: jis0208<<14 | 0x12<<7 | 0x5A, + 40234 - 19968: jis0208<<14 | 0x51<<7 | 0x51, + 40235 - 19968: jis0208<<14 | 0x1B<<7 | 0x11, + 40236 - 19968: jis0208<<14 | 0x11<<7 | 0x08, + 40239 - 19968: jis0212<<14 | 0x4A<<7 | 0x44, + 40240 - 19968: jis0212<<14 | 0x4A<<7 | 0x45, + 40242 - 19968: jis0212<<14 | 0x4A<<7 | 0x46, + 40243 - 19968: jis0212<<14 | 0x4A<<7 | 0x47, + 40244 - 19968: jis0212<<14 | 0x4A<<7 | 0x48, + 40250 - 19968: jis0212<<14 | 0x4A<<7 | 0x49, + 40251 - 19968: jis0208<<14 | 0x18<<7 | 0x42, + 40252 - 19968: jis0212<<14 | 0x4A<<7 | 0x4A, + 40253 - 19968: jis0212<<14 | 0x4A<<7 | 0x4C, + 40254 - 19968: jis0208<<14 | 0x51<<7 | 0x5B, + 40255 - 19968: jis0208<<14 | 0x51<<7 | 0x5A, + 40257 - 19968: jis0208<<14 | 0x51<<7 | 0x59, + 40258 - 19968: jis0212<<14 | 0x4A<<7 | 0x4D, + 40259 - 19968: jis0212<<14 | 0x4A<<7 | 0x4E, + 40260 - 19968: jis0208<<14 | 0x51<<7 | 0x56, + 40261 - 19968: jis0212<<14 | 0x4A<<7 | 0x4B, + 40262 - 19968: jis0208<<14 | 0x51<<7 | 0x5C, + 40263 - 19968: jis0212<<14 | 0x4A<<7 | 0x4F, + 40264 - 19968: jis0208<<14 | 0x51<<7 | 0x5D, + 40266 - 19968: jis0212<<14 | 0x4A<<7 | 0x50, + 40272 - 19968: jis0208<<14 | 0x52<<7 | 0x04, + 40273 - 19968: jis0208<<14 | 0x52<<7 | 0x03, + 40275 - 19968: jis0212<<14 | 0x4A<<7 | 0x51, + 40276 - 19968: jis0212<<14 | 0x4A<<7 | 0x52, + 40281 - 19968: jis0208<<14 | 0x52<<7 | 0x05, + 40284 - 19968: jis0208<<14 | 0x10<<7 | 0x0C, + 40285 - 19968: jis0208<<14 | 0x52<<7 | 0x00, + 40286 - 19968: jis0208<<14 | 0x52<<7 | 0x01, + 40287 - 19968: jis0212<<14 | 0x4A<<7 | 0x53, + 40288 - 19968: jis0208<<14 | 0x18<<7 | 0x53, + 40289 - 19968: jis0208<<14 | 0x2B<<7 | 0x18, + 40290 - 19968: jis0212<<14 | 0x4A<<7 | 0x55, + 40291 - 19968: jis0212<<14 | 0x4A<<7 | 0x54, + 40292 - 19968: jis0208<<14 | 0x52<<7 | 0x02, + 40293 - 19968: jis0212<<14 | 0x4A<<7 | 0x56, + 40297 - 19968: jis0212<<14 | 0x4A<<7 | 0x57, + 40298 - 19968: jis0212<<14 | 0x4A<<7 | 0x58, + 40299 - 19968: jis0208<<14 | 0x5B<<7 | 0x4A, + 40300 - 19968: jis0208<<14 | 0x2A<<7 | 0x11, + 40303 - 19968: jis0208<<14 | 0x52<<7 | 0x0A, + 40304 - 19968: jis0208<<14 | 0x5B<<7 | 0x49, + 40306 - 19968: jis0208<<14 | 0x52<<7 | 0x06, + 40310 - 19968: jis0212<<14 | 0x4A<<7 | 0x5B, + 40311 - 19968: jis0212<<14 | 0x4A<<7 | 0x5C, + 40314 - 19968: jis0208<<14 | 0x52<<7 | 0x0B, + 40315 - 19968: jis0212<<14 | 0x4A<<7 | 0x5D, + 40316 - 19968: jis0212<<14 | 0x4B<<7 | 0x00, + 40318 - 19968: jis0212<<14 | 0x4B<<7 | 0x01, + 40323 - 19968: jis0212<<14 | 0x4B<<7 | 0x02, + 40324 - 19968: jis0212<<14 | 0x4B<<7 | 0x03, + 40326 - 19968: jis0212<<14 | 0x4B<<7 | 0x04, + 40327 - 19968: jis0208<<14 | 0x52<<7 | 0x08, + 40329 - 19968: jis0208<<14 | 0x52<<7 | 0x07, + 40330 - 19968: jis0212<<14 | 0x4B<<7 | 0x05, + 40333 - 19968: jis0212<<14 | 0x4B<<7 | 0x06, + 40334 - 19968: jis0212<<14 | 0x4B<<7 | 0x07, + 40335 - 19968: jis0208<<14 | 0x16<<7 | 0x3B, + 40338 - 19968: jis0212<<14 | 0x4B<<7 | 0x08, + 40339 - 19968: jis0212<<14 | 0x4B<<7 | 0x09, + 40341 - 19968: jis0212<<14 | 0x4B<<7 | 0x0A, + 40342 - 19968: jis0212<<14 | 0x4B<<7 | 0x0B, + 40343 - 19968: jis0212<<14 | 0x4B<<7 | 0x0C, + 40344 - 19968: jis0212<<14 | 0x4B<<7 | 0x0D, + 40346 - 19968: jis0208<<14 | 0x52<<7 | 0x0C, + 40353 - 19968: jis0212<<14 | 0x4B<<7 | 0x0E, + 40356 - 19968: jis0208<<14 | 0x52<<7 | 0x0D, + 40361 - 19968: jis0208<<14 | 0x52<<7 | 0x0E, + 40362 - 19968: jis0212<<14 | 0x4B<<7 | 0x0F, + 40363 - 19968: jis0208<<14 | 0x52<<7 | 0x09, + 40364 - 19968: jis0212<<14 | 0x4B<<7 | 0x10, + 40366 - 19968: jis0212<<14 | 0x4B<<7 | 0x11, + 40367 - 19968: jis0208<<14 | 0x51<<7 | 0x53, + 40369 - 19968: jis0212<<14 | 0x4B<<7 | 0x12, + 40370 - 19968: jis0208<<14 | 0x52<<7 | 0x0F, + 40372 - 19968: jis0208<<14 | 0x23<<7 | 0x40, + 40373 - 19968: jis0212<<14 | 0x4B<<7 | 0x13, + 40376 - 19968: jis0208<<14 | 0x52<<7 | 0x13, + 40377 - 19968: jis0212<<14 | 0x4B<<7 | 0x14, + 40378 - 19968: jis0208<<14 | 0x52<<7 | 0x14, + 40379 - 19968: jis0208<<14 | 0x52<<7 | 0x12, + 40380 - 19968: jis0212<<14 | 0x4B<<7 | 0x15, + 40383 - 19968: jis0212<<14 | 0x4B<<7 | 0x16, + 40385 - 19968: jis0208<<14 | 0x52<<7 | 0x11, + 40386 - 19968: jis0208<<14 | 0x52<<7 | 0x17, + 40387 - 19968: jis0212<<14 | 0x4B<<7 | 0x17, + 40388 - 19968: jis0208<<14 | 0x52<<7 | 0x10, + 40390 - 19968: jis0208<<14 | 0x52<<7 | 0x15, + 40391 - 19968: jis0212<<14 | 0x4B<<7 | 0x18, + 40393 - 19968: jis0212<<14 | 0x4B<<7 | 0x19, + 40394 - 19968: jis0212<<14 | 0x4B<<7 | 0x1A, + 40399 - 19968: jis0208<<14 | 0x52<<7 | 0x16, + 40403 - 19968: jis0208<<14 | 0x52<<7 | 0x19, + 40404 - 19968: jis0212<<14 | 0x4B<<7 | 0x1B, + 40405 - 19968: jis0212<<14 | 0x4B<<7 | 0x1C, + 40406 - 19968: jis0212<<14 | 0x4B<<7 | 0x1D, + 40407 - 19968: jis0212<<14 | 0x4B<<7 | 0x1E, + 40409 - 19968: jis0208<<14 | 0x52<<7 | 0x18, + 40410 - 19968: jis0212<<14 | 0x4B<<7 | 0x1F, + 40414 - 19968: jis0212<<14 | 0x4B<<7 | 0x20, + 40415 - 19968: jis0212<<14 | 0x4B<<7 | 0x21, + 40416 - 19968: jis0212<<14 | 0x4B<<7 | 0x22, + 40421 - 19968: jis0212<<14 | 0x4B<<7 | 0x23, + 40422 - 19968: jis0208<<14 | 0x52<<7 | 0x1B, + 40423 - 19968: jis0212<<14 | 0x4B<<7 | 0x24, + 40425 - 19968: jis0212<<14 | 0x4B<<7 | 0x25, + 40427 - 19968: jis0212<<14 | 0x4B<<7 | 0x26, + 40429 - 19968: jis0208<<14 | 0x52<<7 | 0x1C, + 40430 - 19968: jis0212<<14 | 0x4B<<7 | 0x27, + 40431 - 19968: jis0208<<14 | 0x52<<7 | 0x1D, + 40432 - 19968: jis0212<<14 | 0x4B<<7 | 0x28, + 40434 - 19968: jis0208<<14 | 0x2E<<7 | 0x28, + 40435 - 19968: jis0212<<14 | 0x4B<<7 | 0x29, + 40436 - 19968: jis0212<<14 | 0x4B<<7 | 0x2A, + 40440 - 19968: jis0208<<14 | 0x52<<7 | 0x1A, + 40441 - 19968: jis0208<<14 | 0x21<<7 | 0x4A, + 40442 - 19968: jis0208<<14 | 0x19<<7 | 0x4C, + 40445 - 19968: jis0208<<14 | 0x52<<7 | 0x1E, + 40446 - 19968: jis0212<<14 | 0x4B<<7 | 0x2B, + 40450 - 19968: jis0212<<14 | 0x4B<<7 | 0x2D, + 40455 - 19968: jis0212<<14 | 0x4B<<7 | 0x2E, + 40458 - 19968: jis0212<<14 | 0x4B<<7 | 0x2C, + 40462 - 19968: jis0212<<14 | 0x4B<<7 | 0x2F, + 40464 - 19968: jis0212<<14 | 0x4B<<7 | 0x30, + 40465 - 19968: jis0212<<14 | 0x4B<<7 | 0x31, + 40466 - 19968: jis0212<<14 | 0x4B<<7 | 0x32, + 40469 - 19968: jis0212<<14 | 0x4B<<7 | 0x33, + 40470 - 19968: jis0212<<14 | 0x4B<<7 | 0x34, + 40473 - 19968: jis0208<<14 | 0x5B<<7 | 0x4C, + 40474 - 19968: jis0208<<14 | 0x52<<7 | 0x1F, + 40475 - 19968: jis0208<<14 | 0x52<<7 | 0x20, + 40476 - 19968: jis0212<<14 | 0x4B<<7 | 0x36, + 40477 - 19968: jis0212<<14 | 0x4B<<7 | 0x37, + 40478 - 19968: jis0208<<14 | 0x52<<7 | 0x21, + 40565 - 19968: jis0208<<14 | 0x52<<7 | 0x22, + 40568 - 19968: jis0208<<14 | 0x17<<7 | 0x13, + 40569 - 19968: jis0208<<14 | 0x52<<7 | 0x23, + 40570 - 19968: jis0212<<14 | 0x4B<<7 | 0x38, + 40571 - 19968: jis0212<<14 | 0x4B<<7 | 0x39, + 40572 - 19968: jis0212<<14 | 0x4B<<7 | 0x3A, + 40573 - 19968: jis0208<<14 | 0x52<<7 | 0x24, + 40575 - 19968: jis0208<<14 | 0x1B<<7 | 0x0E, + 40576 - 19968: jis0212<<14 | 0x4B<<7 | 0x3B, + 40577 - 19968: jis0208<<14 | 0x52<<7 | 0x25, + 40578 - 19968: jis0212<<14 | 0x4B<<7 | 0x3C, + 40579 - 19968: jis0212<<14 | 0x4B<<7 | 0x3D, + 40580 - 19968: jis0212<<14 | 0x4B<<7 | 0x3E, + 40581 - 19968: jis0212<<14 | 0x4B<<7 | 0x3F, + 40583 - 19968: jis0212<<14 | 0x4B<<7 | 0x40, + 40584 - 19968: jis0208<<14 | 0x52<<7 | 0x26, + 40587 - 19968: jis0208<<14 | 0x52<<7 | 0x27, + 40588 - 19968: jis0208<<14 | 0x52<<7 | 0x28, + 40590 - 19968: jis0212<<14 | 0x4B<<7 | 0x41, + 40591 - 19968: jis0212<<14 | 0x4B<<7 | 0x42, + 40593 - 19968: jis0208<<14 | 0x52<<7 | 0x2B, + 40594 - 19968: jis0208<<14 | 0x52<<7 | 0x29, + 40595 - 19968: jis0208<<14 | 0x2E<<7 | 0x1B, + 40597 - 19968: jis0208<<14 | 0x52<<7 | 0x2A, + 40598 - 19968: jis0212<<14 | 0x4B<<7 | 0x43, + 40599 - 19968: jis0208<<14 | 0x2D<<7 | 0x4E, + 40600 - 19968: jis0212<<14 | 0x4B<<7 | 0x44, + 40603 - 19968: jis0212<<14 | 0x4B<<7 | 0x45, + 40605 - 19968: jis0208<<14 | 0x52<<7 | 0x2C, + 40606 - 19968: jis0212<<14 | 0x4B<<7 | 0x46, + 40607 - 19968: jis0208<<14 | 0x2D<<7 | 0x3A, + 40612 - 19968: jis0212<<14 | 0x4B<<7 | 0x47, + 40613 - 19968: jis0208<<14 | 0x52<<7 | 0x2D, + 40614 - 19968: jis0208<<14 | 0x26<<7 | 0x5D, + 40616 - 19968: jis0212<<14 | 0x4B<<7 | 0x48, + 40617 - 19968: jis0208<<14 | 0x52<<7 | 0x2E, + 40618 - 19968: jis0208<<14 | 0x52<<7 | 0x30, + 40620 - 19968: jis0212<<14 | 0x4B<<7 | 0x49, + 40621 - 19968: jis0208<<14 | 0x52<<7 | 0x31, + 40622 - 19968: jis0212<<14 | 0x4B<<7 | 0x4A, + 40623 - 19968: jis0212<<14 | 0x4B<<7 | 0x4B, + 40624 - 19968: jis0212<<14 | 0x4B<<7 | 0x4C, + 40627 - 19968: jis0212<<14 | 0x4B<<7 | 0x4D, + 40628 - 19968: jis0212<<14 | 0x4B<<7 | 0x4E, + 40629 - 19968: jis0212<<14 | 0x4B<<7 | 0x4F, + 40632 - 19968: jis0208<<14 | 0x52<<7 | 0x2F, + 40633 - 19968: jis0208<<14 | 0x18<<7 | 0x4C, + 40634 - 19968: jis0208<<14 | 0x2B<<7 | 0x2C, + 40635 - 19968: jis0208<<14 | 0x2A<<7 | 0x42, + 40636 - 19968: jis0208<<14 | 0x35<<7 | 0x56, + 40638 - 19968: jis0208<<14 | 0x3C<<7 | 0x3F, + 40639 - 19968: jis0208<<14 | 0x2A<<7 | 0x5A, + 40644 - 19968: jis0208<<14 | 0x11<<7 | 0x0A, + 40646 - 19968: jis0212<<14 | 0x4B<<7 | 0x50, + 40648 - 19968: jis0212<<14 | 0x4B<<7 | 0x51, + 40651 - 19968: jis0212<<14 | 0x4B<<7 | 0x52, + 40652 - 19968: jis0208<<14 | 0x52<<7 | 0x33, + 40653 - 19968: jis0208<<14 | 0x14<<7 | 0x2F, + 40654 - 19968: jis0208<<14 | 0x52<<7 | 0x34, + 40655 - 19968: jis0208<<14 | 0x52<<7 | 0x35, + 40656 - 19968: jis0208<<14 | 0x52<<7 | 0x36, + 40657 - 19968: jis0208<<14 | 0x5B<<7 | 0x4D, + 40658 - 19968: jis0208<<14 | 0x18<<7 | 0x54, + 40660 - 19968: jis0208<<14 | 0x52<<7 | 0x37, + 40661 - 19968: jis0212<<14 | 0x4B<<7 | 0x53, + 40664 - 19968: jis0208<<14 | 0x3F<<7 | 0x33, + 40665 - 19968: jis0208<<14 | 0x2B<<7 | 0x3A, + 40667 - 19968: jis0208<<14 | 0x21<<7 | 0x42, + 40668 - 19968: jis0208<<14 | 0x52<<7 | 0x38, + 40669 - 19968: jis0208<<14 | 0x52<<7 | 0x3A, + 40670 - 19968: jis0208<<14 | 0x52<<7 | 0x39, + 40671 - 19968: jis0212<<14 | 0x4B<<7 | 0x54, + 40672 - 19968: jis0208<<14 | 0x52<<7 | 0x3B, + 40676 - 19968: jis0212<<14 | 0x4B<<7 | 0x55, + 40677 - 19968: jis0208<<14 | 0x52<<7 | 0x3C, + 40679 - 19968: jis0212<<14 | 0x4B<<7 | 0x56, + 40680 - 19968: jis0208<<14 | 0x52<<7 | 0x3D, + 40684 - 19968: jis0212<<14 | 0x4B<<7 | 0x57, + 40685 - 19968: jis0212<<14 | 0x4B<<7 | 0x58, + 40686 - 19968: jis0212<<14 | 0x4B<<7 | 0x59, + 40687 - 19968: jis0208<<14 | 0x52<<7 | 0x3E, + 40688 - 19968: jis0212<<14 | 0x4B<<7 | 0x5A, + 40689 - 19968: jis0212<<14 | 0x4B<<7 | 0x5B, + 40690 - 19968: jis0212<<14 | 0x4B<<7 | 0x5C, + 40692 - 19968: jis0208<<14 | 0x52<<7 | 0x3F, + 40693 - 19968: jis0212<<14 | 0x4B<<7 | 0x5D, + 40694 - 19968: jis0208<<14 | 0x52<<7 | 0x40, + 40695 - 19968: jis0208<<14 | 0x52<<7 | 0x41, + 40696 - 19968: jis0212<<14 | 0x4C<<7 | 0x00, + 40697 - 19968: jis0208<<14 | 0x52<<7 | 0x42, + 40699 - 19968: jis0208<<14 | 0x52<<7 | 0x43, + 40700 - 19968: jis0208<<14 | 0x52<<7 | 0x44, + 40701 - 19968: jis0208<<14 | 0x52<<7 | 0x45, + 40703 - 19968: jis0212<<14 | 0x4C<<7 | 0x01, + 40706 - 19968: jis0212<<14 | 0x4C<<7 | 0x02, + 40707 - 19968: jis0212<<14 | 0x4C<<7 | 0x03, + 40711 - 19968: jis0208<<14 | 0x52<<7 | 0x46, + 40712 - 19968: jis0208<<14 | 0x52<<7 | 0x47, + 40713 - 19968: jis0212<<14 | 0x4C<<7 | 0x04, + 40718 - 19968: jis0208<<14 | 0x24<<7 | 0x03, + 40719 - 19968: jis0212<<14 | 0x4C<<7 | 0x05, + 40720 - 19968: jis0212<<14 | 0x4C<<7 | 0x06, + 40721 - 19968: jis0212<<14 | 0x4C<<7 | 0x07, + 40722 - 19968: jis0212<<14 | 0x4C<<7 | 0x08, + 40723 - 19968: jis0208<<14 | 0x17<<7 | 0x3C, + 40724 - 19968: jis0212<<14 | 0x4C<<7 | 0x09, + 40725 - 19968: jis0208<<14 | 0x52<<7 | 0x49, + 40726 - 19968: jis0212<<14 | 0x4C<<7 | 0x0A, + 40727 - 19968: jis0212<<14 | 0x4C<<7 | 0x0B, + 40729 - 19968: jis0212<<14 | 0x4C<<7 | 0x0C, + 40730 - 19968: jis0212<<14 | 0x4C<<7 | 0x0D, + 40731 - 19968: jis0212<<14 | 0x4C<<7 | 0x0E, + 40735 - 19968: jis0212<<14 | 0x4C<<7 | 0x0F, + 40736 - 19968: jis0208<<14 | 0x20<<7 | 0x2C, + 40737 - 19968: jis0208<<14 | 0x52<<7 | 0x4A, + 40738 - 19968: jis0212<<14 | 0x4C<<7 | 0x10, + 40742 - 19968: jis0212<<14 | 0x4C<<7 | 0x11, + 40746 - 19968: jis0212<<14 | 0x4C<<7 | 0x12, + 40747 - 19968: jis0212<<14 | 0x4C<<7 | 0x13, + 40748 - 19968: jis0208<<14 | 0x52<<7 | 0x4B, + 40751 - 19968: jis0212<<14 | 0x4C<<7 | 0x14, + 40753 - 19968: jis0212<<14 | 0x4C<<7 | 0x15, + 40754 - 19968: jis0212<<14 | 0x4C<<7 | 0x16, + 40756 - 19968: jis0212<<14 | 0x4C<<7 | 0x17, + 40759 - 19968: jis0212<<14 | 0x4C<<7 | 0x18, + 40761 - 19968: jis0212<<14 | 0x4C<<7 | 0x19, + 40762 - 19968: jis0212<<14 | 0x4C<<7 | 0x1A, + 40763 - 19968: jis0208<<14 | 0x28<<7 | 0x00, + 40764 - 19968: jis0212<<14 | 0x4C<<7 | 0x1B, + 40765 - 19968: jis0212<<14 | 0x4C<<7 | 0x1C, + 40766 - 19968: jis0208<<14 | 0x52<<7 | 0x4C, + 40767 - 19968: jis0212<<14 | 0x4C<<7 | 0x1D, + 40769 - 19968: jis0212<<14 | 0x4C<<7 | 0x1E, + 40771 - 19968: jis0212<<14 | 0x4C<<7 | 0x1F, + 40772 - 19968: jis0212<<14 | 0x4C<<7 | 0x20, + 40773 - 19968: jis0212<<14 | 0x4C<<7 | 0x21, + 40774 - 19968: jis0212<<14 | 0x4C<<7 | 0x22, + 40775 - 19968: jis0212<<14 | 0x4C<<7 | 0x23, + 40778 - 19968: jis0208<<14 | 0x52<<7 | 0x4D, + 40779 - 19968: jis0208<<14 | 0x42<<7 | 0x16, + 40782 - 19968: jis0208<<14 | 0x4B<<7 | 0x39, + 40783 - 19968: jis0208<<14 | 0x4F<<7 | 0x4C, + 40786 - 19968: jis0208<<14 | 0x52<<7 | 0x4E, + 40787 - 19968: jis0212<<14 | 0x4C<<7 | 0x24, + 40788 - 19968: jis0208<<14 | 0x52<<7 | 0x4F, + 40789 - 19968: jis0212<<14 | 0x4C<<7 | 0x25, + 40790 - 19968: jis0212<<14 | 0x4C<<7 | 0x26, + 40791 - 19968: jis0212<<14 | 0x4C<<7 | 0x27, + 40792 - 19968: jis0212<<14 | 0x4C<<7 | 0x28, + 40794 - 19968: jis0212<<14 | 0x4C<<7 | 0x29, + 40797 - 19968: jis0212<<14 | 0x4C<<7 | 0x2A, + 40798 - 19968: jis0212<<14 | 0x4C<<7 | 0x2B, + 40799 - 19968: jis0208<<14 | 0x52<<7 | 0x51, + 40800 - 19968: jis0208<<14 | 0x52<<7 | 0x52, + 40801 - 19968: jis0208<<14 | 0x52<<7 | 0x53, + 40802 - 19968: jis0208<<14 | 0x2D<<7 | 0x4F, + 40803 - 19968: jis0208<<14 | 0x52<<7 | 0x50, + 40806 - 19968: jis0208<<14 | 0x52<<7 | 0x54, + 40807 - 19968: jis0208<<14 | 0x52<<7 | 0x55, + 40808 - 19968: jis0212<<14 | 0x4C<<7 | 0x2C, + 40809 - 19968: jis0212<<14 | 0x4C<<7 | 0x2D, + 40810 - 19968: jis0208<<14 | 0x52<<7 | 0x57, + 40812 - 19968: jis0208<<14 | 0x52<<7 | 0x56, + 40813 - 19968: jis0212<<14 | 0x4C<<7 | 0x2E, + 40814 - 19968: jis0212<<14 | 0x4C<<7 | 0x2F, + 40815 - 19968: jis0212<<14 | 0x4C<<7 | 0x30, + 40816 - 19968: jis0212<<14 | 0x4C<<7 | 0x31, + 40817 - 19968: jis0212<<14 | 0x4C<<7 | 0x32, + 40818 - 19968: jis0208<<14 | 0x52<<7 | 0x59, + 40819 - 19968: jis0212<<14 | 0x4C<<7 | 0x33, + 40821 - 19968: jis0212<<14 | 0x4C<<7 | 0x34, + 40822 - 19968: jis0208<<14 | 0x52<<7 | 0x5A, + 40823 - 19968: jis0208<<14 | 0x52<<7 | 0x58, + 40826 - 19968: jis0212<<14 | 0x4C<<7 | 0x35, + 40829 - 19968: jis0212<<14 | 0x4C<<7 | 0x36, + 40845 - 19968: jis0208<<14 | 0x2D<<7 | 0x15, + 40847 - 19968: jis0212<<14 | 0x4C<<7 | 0x37, + 40848 - 19968: jis0212<<14 | 0x4C<<7 | 0x38, + 40849 - 19968: jis0212<<14 | 0x4C<<7 | 0x39, + 40850 - 19968: jis0212<<14 | 0x4C<<7 | 0x3A, + 40852 - 19968: jis0212<<14 | 0x4C<<7 | 0x3B, + 40853 - 19968: jis0208<<14 | 0x52<<7 | 0x5B, + 40854 - 19968: jis0212<<14 | 0x4C<<7 | 0x3C, + 40855 - 19968: jis0212<<14 | 0x4C<<7 | 0x3D, + 40860 - 19968: jis0208<<14 | 0x52<<7 | 0x5C, + 40861 - 19968: jis0208<<14 | 0x42<<7 | 0x33, + 40862 - 19968: jis0212<<14 | 0x4C<<7 | 0x3E, + 40864 - 19968: jis0208<<14 | 0x52<<7 | 0x5D, + 40865 - 19968: jis0212<<14 | 0x4C<<7 | 0x3F, + 40866 - 19968: jis0212<<14 | 0x4C<<7 | 0x40, + 40867 - 19968: jis0212<<14 | 0x4C<<7 | 0x41, + 40869 - 19968: jis0212<<14 | 0x4C<<7 | 0x42, +} + +const encode1Low, encode1High = 8208, 9840 + +var encode1 = [...]uint16{ + 8208 - 8208: jis0208<<14 | 0x00<<7 | 0x1D, + 8213 - 8208: jis0208<<14 | 0x00<<7 | 0x1C, + 8216 - 8208: jis0208<<14 | 0x00<<7 | 0x25, + 8217 - 8208: jis0208<<14 | 0x00<<7 | 0x26, + 8220 - 8208: jis0208<<14 | 0x00<<7 | 0x27, + 8221 - 8208: jis0208<<14 | 0x00<<7 | 0x28, + 8224 - 8208: jis0208<<14 | 0x01<<7 | 0x56, + 8225 - 8208: jis0208<<14 | 0x01<<7 | 0x57, + 8229 - 8208: jis0208<<14 | 0x00<<7 | 0x24, + 8230 - 8208: jis0208<<14 | 0x00<<7 | 0x23, + 8240 - 8208: jis0208<<14 | 0x01<<7 | 0x52, + 8242 - 8208: jis0208<<14 | 0x00<<7 | 0x4B, + 8243 - 8208: jis0208<<14 | 0x00<<7 | 0x4C, + 8251 - 8208: jis0208<<14 | 0x01<<7 | 0x07, + 8451 - 8208: jis0208<<14 | 0x00<<7 | 0x4D, + 8470 - 8208: jis0208<<14 | 0x0C<<7 | 0x41, + 8481 - 8208: jis0208<<14 | 0x0C<<7 | 0x43, + 8482 - 8208: jis0212<<14 | 0x01<<7 | 0x4E, + 8491 - 8208: jis0208<<14 | 0x01<<7 | 0x51, + 8544 - 8208: jis0208<<14 | 0x0C<<7 | 0x14, + 8545 - 8208: jis0208<<14 | 0x0C<<7 | 0x15, + 8546 - 8208: jis0208<<14 | 0x0C<<7 | 0x16, + 8547 - 8208: jis0208<<14 | 0x0C<<7 | 0x17, + 8548 - 8208: jis0208<<14 | 0x0C<<7 | 0x18, + 8549 - 8208: jis0208<<14 | 0x0C<<7 | 0x19, + 8550 - 8208: jis0208<<14 | 0x0C<<7 | 0x1A, + 8551 - 8208: jis0208<<14 | 0x0C<<7 | 0x1B, + 8552 - 8208: jis0208<<14 | 0x0C<<7 | 0x1C, + 8553 - 8208: jis0208<<14 | 0x0C<<7 | 0x1D, + 8560 - 8208: jis0208<<14 | 0x5B<<7 | 0x50, + 8561 - 8208: jis0208<<14 | 0x5B<<7 | 0x51, + 8562 - 8208: jis0208<<14 | 0x5B<<7 | 0x52, + 8563 - 8208: jis0208<<14 | 0x5B<<7 | 0x53, + 8564 - 8208: jis0208<<14 | 0x5B<<7 | 0x54, + 8565 - 8208: jis0208<<14 | 0x5B<<7 | 0x55, + 8566 - 8208: jis0208<<14 | 0x5B<<7 | 0x56, + 8567 - 8208: jis0208<<14 | 0x5B<<7 | 0x57, + 8568 - 8208: jis0208<<14 | 0x5B<<7 | 0x58, + 8569 - 8208: jis0208<<14 | 0x5B<<7 | 0x59, + 8592 - 8208: jis0208<<14 | 0x01<<7 | 0x0A, + 8593 - 8208: jis0208<<14 | 0x01<<7 | 0x0B, + 8594 - 8208: jis0208<<14 | 0x01<<7 | 0x09, + 8595 - 8208: jis0208<<14 | 0x01<<7 | 0x0C, + 8658 - 8208: jis0208<<14 | 0x01<<7 | 0x2C, + 8660 - 8208: jis0208<<14 | 0x01<<7 | 0x2D, + 8704 - 8208: jis0208<<14 | 0x01<<7 | 0x2E, + 8706 - 8208: jis0208<<14 | 0x01<<7 | 0x3E, + 8707 - 8208: jis0208<<14 | 0x01<<7 | 0x2F, + 8711 - 8208: jis0208<<14 | 0x01<<7 | 0x3F, + 8712 - 8208: jis0208<<14 | 0x01<<7 | 0x19, + 8715 - 8208: jis0208<<14 | 0x01<<7 | 0x1A, + 8721 - 8208: jis0208<<14 | 0x0C<<7 | 0x53, + 8730 - 8208: jis0208<<14 | 0x01<<7 | 0x44, + 8733 - 8208: jis0208<<14 | 0x01<<7 | 0x46, + 8734 - 8208: jis0208<<14 | 0x00<<7 | 0x46, + 8735 - 8208: jis0208<<14 | 0x0C<<7 | 0x57, + 8736 - 8208: jis0208<<14 | 0x01<<7 | 0x3B, + 8741 - 8208: jis0208<<14 | 0x00<<7 | 0x21, + 8743 - 8208: jis0208<<14 | 0x01<<7 | 0x29, + 8744 - 8208: jis0208<<14 | 0x01<<7 | 0x2A, + 8745 - 8208: jis0208<<14 | 0x01<<7 | 0x20, + 8746 - 8208: jis0208<<14 | 0x01<<7 | 0x1F, + 8747 - 8208: jis0208<<14 | 0x01<<7 | 0x48, + 8748 - 8208: jis0208<<14 | 0x01<<7 | 0x49, + 8750 - 8208: jis0208<<14 | 0x0C<<7 | 0x52, + 8756 - 8208: jis0208<<14 | 0x00<<7 | 0x47, + 8757 - 8208: jis0208<<14 | 0x01<<7 | 0x47, + 8765 - 8208: jis0208<<14 | 0x01<<7 | 0x45, + 8786 - 8208: jis0208<<14 | 0x01<<7 | 0x41, + 8800 - 8208: jis0208<<14 | 0x00<<7 | 0x41, + 8801 - 8208: jis0208<<14 | 0x01<<7 | 0x40, + 8806 - 8208: jis0208<<14 | 0x00<<7 | 0x44, + 8807 - 8208: jis0208<<14 | 0x00<<7 | 0x45, + 8810 - 8208: jis0208<<14 | 0x01<<7 | 0x42, + 8811 - 8208: jis0208<<14 | 0x01<<7 | 0x43, + 8834 - 8208: jis0208<<14 | 0x01<<7 | 0x1D, + 8835 - 8208: jis0208<<14 | 0x01<<7 | 0x1E, + 8838 - 8208: jis0208<<14 | 0x01<<7 | 0x1B, + 8839 - 8208: jis0208<<14 | 0x01<<7 | 0x1C, + 8869 - 8208: jis0208<<14 | 0x01<<7 | 0x3C, + 8895 - 8208: jis0208<<14 | 0x0C<<7 | 0x58, + 8978 - 8208: jis0208<<14 | 0x01<<7 | 0x3D, + 9312 - 8208: jis0208<<14 | 0x0C<<7 | 0x00, + 9313 - 8208: jis0208<<14 | 0x0C<<7 | 0x01, + 9314 - 8208: jis0208<<14 | 0x0C<<7 | 0x02, + 9315 - 8208: jis0208<<14 | 0x0C<<7 | 0x03, + 9316 - 8208: jis0208<<14 | 0x0C<<7 | 0x04, + 9317 - 8208: jis0208<<14 | 0x0C<<7 | 0x05, + 9318 - 8208: jis0208<<14 | 0x0C<<7 | 0x06, + 9319 - 8208: jis0208<<14 | 0x0C<<7 | 0x07, + 9320 - 8208: jis0208<<14 | 0x0C<<7 | 0x08, + 9321 - 8208: jis0208<<14 | 0x0C<<7 | 0x09, + 9322 - 8208: jis0208<<14 | 0x0C<<7 | 0x0A, + 9323 - 8208: jis0208<<14 | 0x0C<<7 | 0x0B, + 9324 - 8208: jis0208<<14 | 0x0C<<7 | 0x0C, + 9325 - 8208: jis0208<<14 | 0x0C<<7 | 0x0D, + 9326 - 8208: jis0208<<14 | 0x0C<<7 | 0x0E, + 9327 - 8208: jis0208<<14 | 0x0C<<7 | 0x0F, + 9328 - 8208: jis0208<<14 | 0x0C<<7 | 0x10, + 9329 - 8208: jis0208<<14 | 0x0C<<7 | 0x11, + 9330 - 8208: jis0208<<14 | 0x0C<<7 | 0x12, + 9331 - 8208: jis0208<<14 | 0x0C<<7 | 0x13, + 9472 - 8208: jis0208<<14 | 0x07<<7 | 0x00, + 9473 - 8208: jis0208<<14 | 0x07<<7 | 0x0B, + 9474 - 8208: jis0208<<14 | 0x07<<7 | 0x01, + 9475 - 8208: jis0208<<14 | 0x07<<7 | 0x0C, + 9484 - 8208: jis0208<<14 | 0x07<<7 | 0x02, + 9487 - 8208: jis0208<<14 | 0x07<<7 | 0x0D, + 9488 - 8208: jis0208<<14 | 0x07<<7 | 0x03, + 9491 - 8208: jis0208<<14 | 0x07<<7 | 0x0E, + 9492 - 8208: jis0208<<14 | 0x07<<7 | 0x05, + 9495 - 8208: jis0208<<14 | 0x07<<7 | 0x10, + 9496 - 8208: jis0208<<14 | 0x07<<7 | 0x04, + 9499 - 8208: jis0208<<14 | 0x07<<7 | 0x0F, + 9500 - 8208: jis0208<<14 | 0x07<<7 | 0x06, + 9501 - 8208: jis0208<<14 | 0x07<<7 | 0x1B, + 9504 - 8208: jis0208<<14 | 0x07<<7 | 0x16, + 9507 - 8208: jis0208<<14 | 0x07<<7 | 0x11, + 9508 - 8208: jis0208<<14 | 0x07<<7 | 0x08, + 9509 - 8208: jis0208<<14 | 0x07<<7 | 0x1D, + 9512 - 8208: jis0208<<14 | 0x07<<7 | 0x18, + 9515 - 8208: jis0208<<14 | 0x07<<7 | 0x13, + 9516 - 8208: jis0208<<14 | 0x07<<7 | 0x07, + 9519 - 8208: jis0208<<14 | 0x07<<7 | 0x17, + 9520 - 8208: jis0208<<14 | 0x07<<7 | 0x1C, + 9523 - 8208: jis0208<<14 | 0x07<<7 | 0x12, + 9524 - 8208: jis0208<<14 | 0x07<<7 | 0x09, + 9527 - 8208: jis0208<<14 | 0x07<<7 | 0x19, + 9528 - 8208: jis0208<<14 | 0x07<<7 | 0x1E, + 9531 - 8208: jis0208<<14 | 0x07<<7 | 0x14, + 9532 - 8208: jis0208<<14 | 0x07<<7 | 0x0A, + 9535 - 8208: jis0208<<14 | 0x07<<7 | 0x1A, + 9538 - 8208: jis0208<<14 | 0x07<<7 | 0x1F, + 9547 - 8208: jis0208<<14 | 0x07<<7 | 0x15, + 9632 - 8208: jis0208<<14 | 0x01<<7 | 0x02, + 9633 - 8208: jis0208<<14 | 0x01<<7 | 0x01, + 9650 - 8208: jis0208<<14 | 0x01<<7 | 0x04, + 9651 - 8208: jis0208<<14 | 0x01<<7 | 0x03, + 9660 - 8208: jis0208<<14 | 0x01<<7 | 0x06, + 9661 - 8208: jis0208<<14 | 0x01<<7 | 0x05, + 9670 - 8208: jis0208<<14 | 0x01<<7 | 0x00, + 9671 - 8208: jis0208<<14 | 0x00<<7 | 0x5D, + 9675 - 8208: jis0208<<14 | 0x00<<7 | 0x5A, + 9678 - 8208: jis0208<<14 | 0x00<<7 | 0x5C, + 9679 - 8208: jis0208<<14 | 0x00<<7 | 0x5B, + 9711 - 8208: jis0208<<14 | 0x01<<7 | 0x5D, + 9733 - 8208: jis0208<<14 | 0x00<<7 | 0x59, + 9734 - 8208: jis0208<<14 | 0x00<<7 | 0x58, + 9792 - 8208: jis0208<<14 | 0x00<<7 | 0x49, + 9794 - 8208: jis0208<<14 | 0x00<<7 | 0x48, + 9834 - 8208: jis0208<<14 | 0x01<<7 | 0x55, + 9837 - 8208: jis0208<<14 | 0x01<<7 | 0x54, + 9839 - 8208: jis0208<<14 | 0x01<<7 | 0x53, +} + +const encode2Low, encode2High = 12288, 13262 + +var encode2 = [...]uint16{ + 12288 - 12288: jis0208<<14 | 0x00<<7 | 0x00, + 12289 - 12288: jis0208<<14 | 0x00<<7 | 0x01, + 12290 - 12288: jis0208<<14 | 0x00<<7 | 0x02, + 12291 - 12288: jis0208<<14 | 0x00<<7 | 0x16, + 12293 - 12288: jis0208<<14 | 0x00<<7 | 0x18, + 12294 - 12288: jis0208<<14 | 0x00<<7 | 0x19, + 12295 - 12288: jis0208<<14 | 0x00<<7 | 0x1A, + 12296 - 12288: jis0208<<14 | 0x00<<7 | 0x31, + 12297 - 12288: jis0208<<14 | 0x00<<7 | 0x32, + 12298 - 12288: jis0208<<14 | 0x00<<7 | 0x33, + 12299 - 12288: jis0208<<14 | 0x00<<7 | 0x34, + 12300 - 12288: jis0208<<14 | 0x00<<7 | 0x35, + 12301 - 12288: jis0208<<14 | 0x00<<7 | 0x36, + 12302 - 12288: jis0208<<14 | 0x00<<7 | 0x37, + 12303 - 12288: jis0208<<14 | 0x00<<7 | 0x38, + 12304 - 12288: jis0208<<14 | 0x00<<7 | 0x39, + 12305 - 12288: jis0208<<14 | 0x00<<7 | 0x3A, + 12306 - 12288: jis0208<<14 | 0x01<<7 | 0x08, + 12307 - 12288: jis0208<<14 | 0x01<<7 | 0x0D, + 12308 - 12288: jis0208<<14 | 0x00<<7 | 0x2B, + 12309 - 12288: jis0208<<14 | 0x00<<7 | 0x2C, + 12317 - 12288: jis0208<<14 | 0x0C<<7 | 0x3F, + 12319 - 12288: jis0208<<14 | 0x0C<<7 | 0x40, + 12353 - 12288: jis0208<<14 | 0x03<<7 | 0x00, + 12354 - 12288: jis0208<<14 | 0x03<<7 | 0x01, + 12355 - 12288: jis0208<<14 | 0x03<<7 | 0x02, + 12356 - 12288: jis0208<<14 | 0x03<<7 | 0x03, + 12357 - 12288: jis0208<<14 | 0x03<<7 | 0x04, + 12358 - 12288: jis0208<<14 | 0x03<<7 | 0x05, + 12359 - 12288: jis0208<<14 | 0x03<<7 | 0x06, + 12360 - 12288: jis0208<<14 | 0x03<<7 | 0x07, + 12361 - 12288: jis0208<<14 | 0x03<<7 | 0x08, + 12362 - 12288: jis0208<<14 | 0x03<<7 | 0x09, + 12363 - 12288: jis0208<<14 | 0x03<<7 | 0x0A, + 12364 - 12288: jis0208<<14 | 0x03<<7 | 0x0B, + 12365 - 12288: jis0208<<14 | 0x03<<7 | 0x0C, + 12366 - 12288: jis0208<<14 | 0x03<<7 | 0x0D, + 12367 - 12288: jis0208<<14 | 0x03<<7 | 0x0E, + 12368 - 12288: jis0208<<14 | 0x03<<7 | 0x0F, + 12369 - 12288: jis0208<<14 | 0x03<<7 | 0x10, + 12370 - 12288: jis0208<<14 | 0x03<<7 | 0x11, + 12371 - 12288: jis0208<<14 | 0x03<<7 | 0x12, + 12372 - 12288: jis0208<<14 | 0x03<<7 | 0x13, + 12373 - 12288: jis0208<<14 | 0x03<<7 | 0x14, + 12374 - 12288: jis0208<<14 | 0x03<<7 | 0x15, + 12375 - 12288: jis0208<<14 | 0x03<<7 | 0x16, + 12376 - 12288: jis0208<<14 | 0x03<<7 | 0x17, + 12377 - 12288: jis0208<<14 | 0x03<<7 | 0x18, + 12378 - 12288: jis0208<<14 | 0x03<<7 | 0x19, + 12379 - 12288: jis0208<<14 | 0x03<<7 | 0x1A, + 12380 - 12288: jis0208<<14 | 0x03<<7 | 0x1B, + 12381 - 12288: jis0208<<14 | 0x03<<7 | 0x1C, + 12382 - 12288: jis0208<<14 | 0x03<<7 | 0x1D, + 12383 - 12288: jis0208<<14 | 0x03<<7 | 0x1E, + 12384 - 12288: jis0208<<14 | 0x03<<7 | 0x1F, + 12385 - 12288: jis0208<<14 | 0x03<<7 | 0x20, + 12386 - 12288: jis0208<<14 | 0x03<<7 | 0x21, + 12387 - 12288: jis0208<<14 | 0x03<<7 | 0x22, + 12388 - 12288: jis0208<<14 | 0x03<<7 | 0x23, + 12389 - 12288: jis0208<<14 | 0x03<<7 | 0x24, + 12390 - 12288: jis0208<<14 | 0x03<<7 | 0x25, + 12391 - 12288: jis0208<<14 | 0x03<<7 | 0x26, + 12392 - 12288: jis0208<<14 | 0x03<<7 | 0x27, + 12393 - 12288: jis0208<<14 | 0x03<<7 | 0x28, + 12394 - 12288: jis0208<<14 | 0x03<<7 | 0x29, + 12395 - 12288: jis0208<<14 | 0x03<<7 | 0x2A, + 12396 - 12288: jis0208<<14 | 0x03<<7 | 0x2B, + 12397 - 12288: jis0208<<14 | 0x03<<7 | 0x2C, + 12398 - 12288: jis0208<<14 | 0x03<<7 | 0x2D, + 12399 - 12288: jis0208<<14 | 0x03<<7 | 0x2E, + 12400 - 12288: jis0208<<14 | 0x03<<7 | 0x2F, + 12401 - 12288: jis0208<<14 | 0x03<<7 | 0x30, + 12402 - 12288: jis0208<<14 | 0x03<<7 | 0x31, + 12403 - 12288: jis0208<<14 | 0x03<<7 | 0x32, + 12404 - 12288: jis0208<<14 | 0x03<<7 | 0x33, + 12405 - 12288: jis0208<<14 | 0x03<<7 | 0x34, + 12406 - 12288: jis0208<<14 | 0x03<<7 | 0x35, + 12407 - 12288: jis0208<<14 | 0x03<<7 | 0x36, + 12408 - 12288: jis0208<<14 | 0x03<<7 | 0x37, + 12409 - 12288: jis0208<<14 | 0x03<<7 | 0x38, + 12410 - 12288: jis0208<<14 | 0x03<<7 | 0x39, + 12411 - 12288: jis0208<<14 | 0x03<<7 | 0x3A, + 12412 - 12288: jis0208<<14 | 0x03<<7 | 0x3B, + 12413 - 12288: jis0208<<14 | 0x03<<7 | 0x3C, + 12414 - 12288: jis0208<<14 | 0x03<<7 | 0x3D, + 12415 - 12288: jis0208<<14 | 0x03<<7 | 0x3E, + 12416 - 12288: jis0208<<14 | 0x03<<7 | 0x3F, + 12417 - 12288: jis0208<<14 | 0x03<<7 | 0x40, + 12418 - 12288: jis0208<<14 | 0x03<<7 | 0x41, + 12419 - 12288: jis0208<<14 | 0x03<<7 | 0x42, + 12420 - 12288: jis0208<<14 | 0x03<<7 | 0x43, + 12421 - 12288: jis0208<<14 | 0x03<<7 | 0x44, + 12422 - 12288: jis0208<<14 | 0x03<<7 | 0x45, + 12423 - 12288: jis0208<<14 | 0x03<<7 | 0x46, + 12424 - 12288: jis0208<<14 | 0x03<<7 | 0x47, + 12425 - 12288: jis0208<<14 | 0x03<<7 | 0x48, + 12426 - 12288: jis0208<<14 | 0x03<<7 | 0x49, + 12427 - 12288: jis0208<<14 | 0x03<<7 | 0x4A, + 12428 - 12288: jis0208<<14 | 0x03<<7 | 0x4B, + 12429 - 12288: jis0208<<14 | 0x03<<7 | 0x4C, + 12430 - 12288: jis0208<<14 | 0x03<<7 | 0x4D, + 12431 - 12288: jis0208<<14 | 0x03<<7 | 0x4E, + 12432 - 12288: jis0208<<14 | 0x03<<7 | 0x4F, + 12433 - 12288: jis0208<<14 | 0x03<<7 | 0x50, + 12434 - 12288: jis0208<<14 | 0x03<<7 | 0x51, + 12435 - 12288: jis0208<<14 | 0x03<<7 | 0x52, + 12443 - 12288: jis0208<<14 | 0x00<<7 | 0x0A, + 12444 - 12288: jis0208<<14 | 0x00<<7 | 0x0B, + 12445 - 12288: jis0208<<14 | 0x00<<7 | 0x14, + 12446 - 12288: jis0208<<14 | 0x00<<7 | 0x15, + 12449 - 12288: jis0208<<14 | 0x04<<7 | 0x00, + 12450 - 12288: jis0208<<14 | 0x04<<7 | 0x01, + 12451 - 12288: jis0208<<14 | 0x04<<7 | 0x02, + 12452 - 12288: jis0208<<14 | 0x04<<7 | 0x03, + 12453 - 12288: jis0208<<14 | 0x04<<7 | 0x04, + 12454 - 12288: jis0208<<14 | 0x04<<7 | 0x05, + 12455 - 12288: jis0208<<14 | 0x04<<7 | 0x06, + 12456 - 12288: jis0208<<14 | 0x04<<7 | 0x07, + 12457 - 12288: jis0208<<14 | 0x04<<7 | 0x08, + 12458 - 12288: jis0208<<14 | 0x04<<7 | 0x09, + 12459 - 12288: jis0208<<14 | 0x04<<7 | 0x0A, + 12460 - 12288: jis0208<<14 | 0x04<<7 | 0x0B, + 12461 - 12288: jis0208<<14 | 0x04<<7 | 0x0C, + 12462 - 12288: jis0208<<14 | 0x04<<7 | 0x0D, + 12463 - 12288: jis0208<<14 | 0x04<<7 | 0x0E, + 12464 - 12288: jis0208<<14 | 0x04<<7 | 0x0F, + 12465 - 12288: jis0208<<14 | 0x04<<7 | 0x10, + 12466 - 12288: jis0208<<14 | 0x04<<7 | 0x11, + 12467 - 12288: jis0208<<14 | 0x04<<7 | 0x12, + 12468 - 12288: jis0208<<14 | 0x04<<7 | 0x13, + 12469 - 12288: jis0208<<14 | 0x04<<7 | 0x14, + 12470 - 12288: jis0208<<14 | 0x04<<7 | 0x15, + 12471 - 12288: jis0208<<14 | 0x04<<7 | 0x16, + 12472 - 12288: jis0208<<14 | 0x04<<7 | 0x17, + 12473 - 12288: jis0208<<14 | 0x04<<7 | 0x18, + 12474 - 12288: jis0208<<14 | 0x04<<7 | 0x19, + 12475 - 12288: jis0208<<14 | 0x04<<7 | 0x1A, + 12476 - 12288: jis0208<<14 | 0x04<<7 | 0x1B, + 12477 - 12288: jis0208<<14 | 0x04<<7 | 0x1C, + 12478 - 12288: jis0208<<14 | 0x04<<7 | 0x1D, + 12479 - 12288: jis0208<<14 | 0x04<<7 | 0x1E, + 12480 - 12288: jis0208<<14 | 0x04<<7 | 0x1F, + 12481 - 12288: jis0208<<14 | 0x04<<7 | 0x20, + 12482 - 12288: jis0208<<14 | 0x04<<7 | 0x21, + 12483 - 12288: jis0208<<14 | 0x04<<7 | 0x22, + 12484 - 12288: jis0208<<14 | 0x04<<7 | 0x23, + 12485 - 12288: jis0208<<14 | 0x04<<7 | 0x24, + 12486 - 12288: jis0208<<14 | 0x04<<7 | 0x25, + 12487 - 12288: jis0208<<14 | 0x04<<7 | 0x26, + 12488 - 12288: jis0208<<14 | 0x04<<7 | 0x27, + 12489 - 12288: jis0208<<14 | 0x04<<7 | 0x28, + 12490 - 12288: jis0208<<14 | 0x04<<7 | 0x29, + 12491 - 12288: jis0208<<14 | 0x04<<7 | 0x2A, + 12492 - 12288: jis0208<<14 | 0x04<<7 | 0x2B, + 12493 - 12288: jis0208<<14 | 0x04<<7 | 0x2C, + 12494 - 12288: jis0208<<14 | 0x04<<7 | 0x2D, + 12495 - 12288: jis0208<<14 | 0x04<<7 | 0x2E, + 12496 - 12288: jis0208<<14 | 0x04<<7 | 0x2F, + 12497 - 12288: jis0208<<14 | 0x04<<7 | 0x30, + 12498 - 12288: jis0208<<14 | 0x04<<7 | 0x31, + 12499 - 12288: jis0208<<14 | 0x04<<7 | 0x32, + 12500 - 12288: jis0208<<14 | 0x04<<7 | 0x33, + 12501 - 12288: jis0208<<14 | 0x04<<7 | 0x34, + 12502 - 12288: jis0208<<14 | 0x04<<7 | 0x35, + 12503 - 12288: jis0208<<14 | 0x04<<7 | 0x36, + 12504 - 12288: jis0208<<14 | 0x04<<7 | 0x37, + 12505 - 12288: jis0208<<14 | 0x04<<7 | 0x38, + 12506 - 12288: jis0208<<14 | 0x04<<7 | 0x39, + 12507 - 12288: jis0208<<14 | 0x04<<7 | 0x3A, + 12508 - 12288: jis0208<<14 | 0x04<<7 | 0x3B, + 12509 - 12288: jis0208<<14 | 0x04<<7 | 0x3C, + 12510 - 12288: jis0208<<14 | 0x04<<7 | 0x3D, + 12511 - 12288: jis0208<<14 | 0x04<<7 | 0x3E, + 12512 - 12288: jis0208<<14 | 0x04<<7 | 0x3F, + 12513 - 12288: jis0208<<14 | 0x04<<7 | 0x40, + 12514 - 12288: jis0208<<14 | 0x04<<7 | 0x41, + 12515 - 12288: jis0208<<14 | 0x04<<7 | 0x42, + 12516 - 12288: jis0208<<14 | 0x04<<7 | 0x43, + 12517 - 12288: jis0208<<14 | 0x04<<7 | 0x44, + 12518 - 12288: jis0208<<14 | 0x04<<7 | 0x45, + 12519 - 12288: jis0208<<14 | 0x04<<7 | 0x46, + 12520 - 12288: jis0208<<14 | 0x04<<7 | 0x47, + 12521 - 12288: jis0208<<14 | 0x04<<7 | 0x48, + 12522 - 12288: jis0208<<14 | 0x04<<7 | 0x49, + 12523 - 12288: jis0208<<14 | 0x04<<7 | 0x4A, + 12524 - 12288: jis0208<<14 | 0x04<<7 | 0x4B, + 12525 - 12288: jis0208<<14 | 0x04<<7 | 0x4C, + 12526 - 12288: jis0208<<14 | 0x04<<7 | 0x4D, + 12527 - 12288: jis0208<<14 | 0x04<<7 | 0x4E, + 12528 - 12288: jis0208<<14 | 0x04<<7 | 0x4F, + 12529 - 12288: jis0208<<14 | 0x04<<7 | 0x50, + 12530 - 12288: jis0208<<14 | 0x04<<7 | 0x51, + 12531 - 12288: jis0208<<14 | 0x04<<7 | 0x52, + 12532 - 12288: jis0208<<14 | 0x04<<7 | 0x53, + 12533 - 12288: jis0208<<14 | 0x04<<7 | 0x54, + 12534 - 12288: jis0208<<14 | 0x04<<7 | 0x55, + 12539 - 12288: jis0208<<14 | 0x00<<7 | 0x05, + 12540 - 12288: jis0208<<14 | 0x00<<7 | 0x1B, + 12541 - 12288: jis0208<<14 | 0x00<<7 | 0x12, + 12542 - 12288: jis0208<<14 | 0x00<<7 | 0x13, + 12849 - 12288: jis0208<<14 | 0x0C<<7 | 0x49, + 12850 - 12288: jis0208<<14 | 0x0C<<7 | 0x4A, + 12857 - 12288: jis0208<<14 | 0x0C<<7 | 0x4B, + 12964 - 12288: jis0208<<14 | 0x0C<<7 | 0x44, + 12965 - 12288: jis0208<<14 | 0x0C<<7 | 0x45, + 12966 - 12288: jis0208<<14 | 0x0C<<7 | 0x46, + 12967 - 12288: jis0208<<14 | 0x0C<<7 | 0x47, + 12968 - 12288: jis0208<<14 | 0x0C<<7 | 0x48, + 13059 - 12288: jis0208<<14 | 0x0C<<7 | 0x25, + 13069 - 12288: jis0208<<14 | 0x0C<<7 | 0x29, + 13076 - 12288: jis0208<<14 | 0x0C<<7 | 0x20, + 13080 - 12288: jis0208<<14 | 0x0C<<7 | 0x23, + 13090 - 12288: jis0208<<14 | 0x0C<<7 | 0x21, + 13091 - 12288: jis0208<<14 | 0x0C<<7 | 0x2B, + 13094 - 12288: jis0208<<14 | 0x0C<<7 | 0x2A, + 13095 - 12288: jis0208<<14 | 0x0C<<7 | 0x24, + 13099 - 12288: jis0208<<14 | 0x0C<<7 | 0x2C, + 13110 - 12288: jis0208<<14 | 0x0C<<7 | 0x26, + 13115 - 12288: jis0208<<14 | 0x0C<<7 | 0x2E, + 13129 - 12288: jis0208<<14 | 0x0C<<7 | 0x1F, + 13130 - 12288: jis0208<<14 | 0x0C<<7 | 0x2D, + 13133 - 12288: jis0208<<14 | 0x0C<<7 | 0x22, + 13137 - 12288: jis0208<<14 | 0x0C<<7 | 0x27, + 13143 - 12288: jis0208<<14 | 0x0C<<7 | 0x28, + 13179 - 12288: jis0208<<14 | 0x0C<<7 | 0x3E, + 13180 - 12288: jis0208<<14 | 0x0C<<7 | 0x4E, + 13181 - 12288: jis0208<<14 | 0x0C<<7 | 0x4D, + 13182 - 12288: jis0208<<14 | 0x0C<<7 | 0x4C, + 13198 - 12288: jis0208<<14 | 0x0C<<7 | 0x32, + 13199 - 12288: jis0208<<14 | 0x0C<<7 | 0x33, + 13212 - 12288: jis0208<<14 | 0x0C<<7 | 0x2F, + 13213 - 12288: jis0208<<14 | 0x0C<<7 | 0x30, + 13214 - 12288: jis0208<<14 | 0x0C<<7 | 0x31, + 13217 - 12288: jis0208<<14 | 0x0C<<7 | 0x35, + 13252 - 12288: jis0208<<14 | 0x0C<<7 | 0x34, + 13261 - 12288: jis0208<<14 | 0x0C<<7 | 0x42, +} + +const encode3Low, encode3High = 161, 1120 + +var encode3 = [...]uint16{ + 161 - 161: jis0212<<14 | 0x01<<7 | 0x21, + 164 - 161: jis0212<<14 | 0x01<<7 | 0x4F, + 166 - 161: jis0212<<14 | 0x01<<7 | 0x22, + 167 - 161: jis0208<<14 | 0x00<<7 | 0x57, + 168 - 161: jis0208<<14 | 0x00<<7 | 0x0E, + 169 - 161: jis0212<<14 | 0x01<<7 | 0x4C, + 170 - 161: jis0212<<14 | 0x01<<7 | 0x4B, + 174 - 161: jis0212<<14 | 0x01<<7 | 0x4D, + 175 - 161: jis0212<<14 | 0x01<<7 | 0x13, + 176 - 161: jis0208<<14 | 0x00<<7 | 0x4A, + 177 - 161: jis0208<<14 | 0x00<<7 | 0x3D, + 180 - 161: jis0208<<14 | 0x00<<7 | 0x0C, + 182 - 161: jis0208<<14 | 0x01<<7 | 0x58, + 184 - 161: jis0212<<14 | 0x01<<7 | 0x10, + 186 - 161: jis0212<<14 | 0x01<<7 | 0x4A, + 191 - 161: jis0212<<14 | 0x01<<7 | 0x23, + 192 - 161: jis0212<<14 | 0x09<<7 | 0x01, + 193 - 161: jis0212<<14 | 0x09<<7 | 0x00, + 194 - 161: jis0212<<14 | 0x09<<7 | 0x03, + 195 - 161: jis0212<<14 | 0x09<<7 | 0x09, + 196 - 161: jis0212<<14 | 0x09<<7 | 0x02, + 197 - 161: jis0212<<14 | 0x09<<7 | 0x08, + 198 - 161: jis0212<<14 | 0x08<<7 | 0x00, + 199 - 161: jis0212<<14 | 0x09<<7 | 0x0D, + 200 - 161: jis0212<<14 | 0x09<<7 | 0x11, + 201 - 161: jis0212<<14 | 0x09<<7 | 0x10, + 202 - 161: jis0212<<14 | 0x09<<7 | 0x13, + 203 - 161: jis0212<<14 | 0x09<<7 | 0x12, + 204 - 161: jis0212<<14 | 0x09<<7 | 0x1F, + 205 - 161: jis0212<<14 | 0x09<<7 | 0x1E, + 206 - 161: jis0212<<14 | 0x09<<7 | 0x21, + 207 - 161: jis0212<<14 | 0x09<<7 | 0x20, + 209 - 161: jis0212<<14 | 0x09<<7 | 0x2F, + 210 - 161: jis0212<<14 | 0x09<<7 | 0x31, + 211 - 161: jis0212<<14 | 0x09<<7 | 0x30, + 212 - 161: jis0212<<14 | 0x09<<7 | 0x33, + 213 - 161: jis0212<<14 | 0x09<<7 | 0x37, + 214 - 161: jis0212<<14 | 0x09<<7 | 0x32, + 215 - 161: jis0208<<14 | 0x00<<7 | 0x3E, + 216 - 161: jis0212<<14 | 0x08<<7 | 0x0B, + 217 - 161: jis0212<<14 | 0x09<<7 | 0x42, + 218 - 161: jis0212<<14 | 0x09<<7 | 0x41, + 219 - 161: jis0212<<14 | 0x09<<7 | 0x44, + 220 - 161: jis0212<<14 | 0x09<<7 | 0x43, + 221 - 161: jis0212<<14 | 0x09<<7 | 0x51, + 222 - 161: jis0212<<14 | 0x08<<7 | 0x0F, + 223 - 161: jis0212<<14 | 0x08<<7 | 0x2D, + 224 - 161: jis0212<<14 | 0x0A<<7 | 0x01, + 225 - 161: jis0212<<14 | 0x0A<<7 | 0x00, + 226 - 161: jis0212<<14 | 0x0A<<7 | 0x03, + 227 - 161: jis0212<<14 | 0x0A<<7 | 0x09, + 228 - 161: jis0212<<14 | 0x0A<<7 | 0x02, + 229 - 161: jis0212<<14 | 0x0A<<7 | 0x08, + 230 - 161: jis0212<<14 | 0x08<<7 | 0x20, + 231 - 161: jis0212<<14 | 0x0A<<7 | 0x0D, + 232 - 161: jis0212<<14 | 0x0A<<7 | 0x11, + 233 - 161: jis0212<<14 | 0x0A<<7 | 0x10, + 234 - 161: jis0212<<14 | 0x0A<<7 | 0x13, + 235 - 161: jis0212<<14 | 0x0A<<7 | 0x12, + 236 - 161: jis0212<<14 | 0x0A<<7 | 0x1F, + 237 - 161: jis0212<<14 | 0x0A<<7 | 0x1E, + 238 - 161: jis0212<<14 | 0x0A<<7 | 0x21, + 239 - 161: jis0212<<14 | 0x0A<<7 | 0x20, + 240 - 161: jis0212<<14 | 0x08<<7 | 0x22, + 241 - 161: jis0212<<14 | 0x0A<<7 | 0x2F, + 242 - 161: jis0212<<14 | 0x0A<<7 | 0x31, + 243 - 161: jis0212<<14 | 0x0A<<7 | 0x30, + 244 - 161: jis0212<<14 | 0x0A<<7 | 0x33, + 245 - 161: jis0212<<14 | 0x0A<<7 | 0x37, + 246 - 161: jis0212<<14 | 0x0A<<7 | 0x32, + 247 - 161: jis0208<<14 | 0x00<<7 | 0x3F, + 248 - 161: jis0212<<14 | 0x08<<7 | 0x2B, + 249 - 161: jis0212<<14 | 0x0A<<7 | 0x42, + 250 - 161: jis0212<<14 | 0x0A<<7 | 0x41, + 251 - 161: jis0212<<14 | 0x0A<<7 | 0x44, + 252 - 161: jis0212<<14 | 0x0A<<7 | 0x43, + 253 - 161: jis0212<<14 | 0x0A<<7 | 0x51, + 254 - 161: jis0212<<14 | 0x08<<7 | 0x2F, + 255 - 161: jis0212<<14 | 0x0A<<7 | 0x52, + 256 - 161: jis0212<<14 | 0x09<<7 | 0x06, + 257 - 161: jis0212<<14 | 0x0A<<7 | 0x06, + 258 - 161: jis0212<<14 | 0x09<<7 | 0x04, + 259 - 161: jis0212<<14 | 0x0A<<7 | 0x04, + 260 - 161: jis0212<<14 | 0x09<<7 | 0x07, + 261 - 161: jis0212<<14 | 0x0A<<7 | 0x07, + 262 - 161: jis0212<<14 | 0x09<<7 | 0x0A, + 263 - 161: jis0212<<14 | 0x0A<<7 | 0x0A, + 264 - 161: jis0212<<14 | 0x09<<7 | 0x0B, + 265 - 161: jis0212<<14 | 0x0A<<7 | 0x0B, + 266 - 161: jis0212<<14 | 0x09<<7 | 0x0E, + 267 - 161: jis0212<<14 | 0x0A<<7 | 0x0E, + 268 - 161: jis0212<<14 | 0x09<<7 | 0x0C, + 269 - 161: jis0212<<14 | 0x0A<<7 | 0x0C, + 270 - 161: jis0212<<14 | 0x09<<7 | 0x0F, + 271 - 161: jis0212<<14 | 0x0A<<7 | 0x0F, + 272 - 161: jis0212<<14 | 0x08<<7 | 0x01, + 273 - 161: jis0212<<14 | 0x08<<7 | 0x21, + 274 - 161: jis0212<<14 | 0x09<<7 | 0x16, + 275 - 161: jis0212<<14 | 0x0A<<7 | 0x16, + 278 - 161: jis0212<<14 | 0x09<<7 | 0x15, + 279 - 161: jis0212<<14 | 0x0A<<7 | 0x15, + 280 - 161: jis0212<<14 | 0x09<<7 | 0x17, + 281 - 161: jis0212<<14 | 0x0A<<7 | 0x17, + 282 - 161: jis0212<<14 | 0x09<<7 | 0x14, + 283 - 161: jis0212<<14 | 0x0A<<7 | 0x14, + 284 - 161: jis0212<<14 | 0x09<<7 | 0x19, + 285 - 161: jis0212<<14 | 0x0A<<7 | 0x19, + 286 - 161: jis0212<<14 | 0x09<<7 | 0x1A, + 287 - 161: jis0212<<14 | 0x0A<<7 | 0x1A, + 288 - 161: jis0212<<14 | 0x09<<7 | 0x1C, + 289 - 161: jis0212<<14 | 0x0A<<7 | 0x1C, + 290 - 161: jis0212<<14 | 0x09<<7 | 0x1B, + 292 - 161: jis0212<<14 | 0x09<<7 | 0x1D, + 293 - 161: jis0212<<14 | 0x0A<<7 | 0x1D, + 294 - 161: jis0212<<14 | 0x08<<7 | 0x03, + 295 - 161: jis0212<<14 | 0x08<<7 | 0x23, + 296 - 161: jis0212<<14 | 0x09<<7 | 0x26, + 297 - 161: jis0212<<14 | 0x0A<<7 | 0x26, + 298 - 161: jis0212<<14 | 0x09<<7 | 0x24, + 299 - 161: jis0212<<14 | 0x0A<<7 | 0x24, + 302 - 161: jis0212<<14 | 0x09<<7 | 0x25, + 303 - 161: jis0212<<14 | 0x0A<<7 | 0x25, + 304 - 161: jis0212<<14 | 0x09<<7 | 0x23, + 305 - 161: jis0212<<14 | 0x08<<7 | 0x24, + 306 - 161: jis0212<<14 | 0x08<<7 | 0x05, + 307 - 161: jis0212<<14 | 0x08<<7 | 0x25, + 308 - 161: jis0212<<14 | 0x09<<7 | 0x27, + 309 - 161: jis0212<<14 | 0x0A<<7 | 0x27, + 310 - 161: jis0212<<14 | 0x09<<7 | 0x28, + 311 - 161: jis0212<<14 | 0x0A<<7 | 0x28, + 312 - 161: jis0212<<14 | 0x08<<7 | 0x26, + 313 - 161: jis0212<<14 | 0x09<<7 | 0x29, + 314 - 161: jis0212<<14 | 0x0A<<7 | 0x29, + 315 - 161: jis0212<<14 | 0x09<<7 | 0x2B, + 316 - 161: jis0212<<14 | 0x0A<<7 | 0x2B, + 317 - 161: jis0212<<14 | 0x09<<7 | 0x2A, + 318 - 161: jis0212<<14 | 0x0A<<7 | 0x2A, + 319 - 161: jis0212<<14 | 0x08<<7 | 0x08, + 320 - 161: jis0212<<14 | 0x08<<7 | 0x28, + 321 - 161: jis0212<<14 | 0x08<<7 | 0x07, + 322 - 161: jis0212<<14 | 0x08<<7 | 0x27, + 323 - 161: jis0212<<14 | 0x09<<7 | 0x2C, + 324 - 161: jis0212<<14 | 0x0A<<7 | 0x2C, + 325 - 161: jis0212<<14 | 0x09<<7 | 0x2E, + 326 - 161: jis0212<<14 | 0x0A<<7 | 0x2E, + 327 - 161: jis0212<<14 | 0x09<<7 | 0x2D, + 328 - 161: jis0212<<14 | 0x0A<<7 | 0x2D, + 329 - 161: jis0212<<14 | 0x08<<7 | 0x29, + 330 - 161: jis0212<<14 | 0x08<<7 | 0x0A, + 331 - 161: jis0212<<14 | 0x08<<7 | 0x2A, + 332 - 161: jis0212<<14 | 0x09<<7 | 0x36, + 333 - 161: jis0212<<14 | 0x0A<<7 | 0x36, + 336 - 161: jis0212<<14 | 0x09<<7 | 0x35, + 337 - 161: jis0212<<14 | 0x0A<<7 | 0x35, + 338 - 161: jis0212<<14 | 0x08<<7 | 0x0C, + 339 - 161: jis0212<<14 | 0x08<<7 | 0x2C, + 340 - 161: jis0212<<14 | 0x09<<7 | 0x38, + 341 - 161: jis0212<<14 | 0x0A<<7 | 0x38, + 342 - 161: jis0212<<14 | 0x09<<7 | 0x3A, + 343 - 161: jis0212<<14 | 0x0A<<7 | 0x3A, + 344 - 161: jis0212<<14 | 0x09<<7 | 0x39, + 345 - 161: jis0212<<14 | 0x0A<<7 | 0x39, + 346 - 161: jis0212<<14 | 0x09<<7 | 0x3B, + 347 - 161: jis0212<<14 | 0x0A<<7 | 0x3B, + 348 - 161: jis0212<<14 | 0x09<<7 | 0x3C, + 349 - 161: jis0212<<14 | 0x0A<<7 | 0x3C, + 350 - 161: jis0212<<14 | 0x09<<7 | 0x3E, + 351 - 161: jis0212<<14 | 0x0A<<7 | 0x3E, + 352 - 161: jis0212<<14 | 0x09<<7 | 0x3D, + 353 - 161: jis0212<<14 | 0x0A<<7 | 0x3D, + 354 - 161: jis0212<<14 | 0x09<<7 | 0x40, + 355 - 161: jis0212<<14 | 0x0A<<7 | 0x40, + 356 - 161: jis0212<<14 | 0x09<<7 | 0x3F, + 357 - 161: jis0212<<14 | 0x0A<<7 | 0x3F, + 358 - 161: jis0212<<14 | 0x08<<7 | 0x0E, + 359 - 161: jis0212<<14 | 0x08<<7 | 0x2E, + 360 - 161: jis0212<<14 | 0x09<<7 | 0x4B, + 361 - 161: jis0212<<14 | 0x0A<<7 | 0x4B, + 362 - 161: jis0212<<14 | 0x09<<7 | 0x48, + 363 - 161: jis0212<<14 | 0x0A<<7 | 0x48, + 364 - 161: jis0212<<14 | 0x09<<7 | 0x45, + 365 - 161: jis0212<<14 | 0x0A<<7 | 0x45, + 366 - 161: jis0212<<14 | 0x09<<7 | 0x4A, + 367 - 161: jis0212<<14 | 0x0A<<7 | 0x4A, + 368 - 161: jis0212<<14 | 0x09<<7 | 0x47, + 369 - 161: jis0212<<14 | 0x0A<<7 | 0x47, + 370 - 161: jis0212<<14 | 0x09<<7 | 0x49, + 371 - 161: jis0212<<14 | 0x0A<<7 | 0x49, + 372 - 161: jis0212<<14 | 0x09<<7 | 0x50, + 373 - 161: jis0212<<14 | 0x0A<<7 | 0x50, + 374 - 161: jis0212<<14 | 0x09<<7 | 0x53, + 375 - 161: jis0212<<14 | 0x0A<<7 | 0x53, + 376 - 161: jis0212<<14 | 0x09<<7 | 0x52, + 377 - 161: jis0212<<14 | 0x09<<7 | 0x54, + 378 - 161: jis0212<<14 | 0x0A<<7 | 0x54, + 379 - 161: jis0212<<14 | 0x09<<7 | 0x56, + 380 - 161: jis0212<<14 | 0x0A<<7 | 0x56, + 381 - 161: jis0212<<14 | 0x09<<7 | 0x55, + 382 - 161: jis0212<<14 | 0x0A<<7 | 0x55, + 461 - 161: jis0212<<14 | 0x09<<7 | 0x05, + 462 - 161: jis0212<<14 | 0x0A<<7 | 0x05, + 463 - 161: jis0212<<14 | 0x09<<7 | 0x22, + 464 - 161: jis0212<<14 | 0x0A<<7 | 0x22, + 465 - 161: jis0212<<14 | 0x09<<7 | 0x34, + 466 - 161: jis0212<<14 | 0x0A<<7 | 0x34, + 467 - 161: jis0212<<14 | 0x09<<7 | 0x46, + 468 - 161: jis0212<<14 | 0x0A<<7 | 0x46, + 469 - 161: jis0212<<14 | 0x09<<7 | 0x4F, + 470 - 161: jis0212<<14 | 0x0A<<7 | 0x4F, + 471 - 161: jis0212<<14 | 0x09<<7 | 0x4C, + 472 - 161: jis0212<<14 | 0x0A<<7 | 0x4C, + 473 - 161: jis0212<<14 | 0x09<<7 | 0x4E, + 474 - 161: jis0212<<14 | 0x0A<<7 | 0x4E, + 475 - 161: jis0212<<14 | 0x09<<7 | 0x4D, + 476 - 161: jis0212<<14 | 0x0A<<7 | 0x4D, + 501 - 161: jis0212<<14 | 0x0A<<7 | 0x18, + 711 - 161: jis0212<<14 | 0x01<<7 | 0x0F, + 728 - 161: jis0212<<14 | 0x01<<7 | 0x0E, + 729 - 161: jis0212<<14 | 0x01<<7 | 0x11, + 730 - 161: jis0212<<14 | 0x01<<7 | 0x15, + 731 - 161: jis0212<<14 | 0x01<<7 | 0x14, + 733 - 161: jis0212<<14 | 0x01<<7 | 0x12, + 900 - 161: jis0212<<14 | 0x01<<7 | 0x17, + 901 - 161: jis0212<<14 | 0x01<<7 | 0x18, + 902 - 161: jis0212<<14 | 0x05<<7 | 0x40, + 904 - 161: jis0212<<14 | 0x05<<7 | 0x41, + 905 - 161: jis0212<<14 | 0x05<<7 | 0x42, + 906 - 161: jis0212<<14 | 0x05<<7 | 0x43, + 908 - 161: jis0212<<14 | 0x05<<7 | 0x46, + 910 - 161: jis0212<<14 | 0x05<<7 | 0x48, + 911 - 161: jis0212<<14 | 0x05<<7 | 0x4B, + 912 - 161: jis0212<<14 | 0x05<<7 | 0x55, + 913 - 161: jis0208<<14 | 0x05<<7 | 0x00, + 914 - 161: jis0208<<14 | 0x05<<7 | 0x01, + 915 - 161: jis0208<<14 | 0x05<<7 | 0x02, + 916 - 161: jis0208<<14 | 0x05<<7 | 0x03, + 917 - 161: jis0208<<14 | 0x05<<7 | 0x04, + 918 - 161: jis0208<<14 | 0x05<<7 | 0x05, + 919 - 161: jis0208<<14 | 0x05<<7 | 0x06, + 920 - 161: jis0208<<14 | 0x05<<7 | 0x07, + 921 - 161: jis0208<<14 | 0x05<<7 | 0x08, + 922 - 161: jis0208<<14 | 0x05<<7 | 0x09, + 923 - 161: jis0208<<14 | 0x05<<7 | 0x0A, + 924 - 161: jis0208<<14 | 0x05<<7 | 0x0B, + 925 - 161: jis0208<<14 | 0x05<<7 | 0x0C, + 926 - 161: jis0208<<14 | 0x05<<7 | 0x0D, + 927 - 161: jis0208<<14 | 0x05<<7 | 0x0E, + 928 - 161: jis0208<<14 | 0x05<<7 | 0x0F, + 929 - 161: jis0208<<14 | 0x05<<7 | 0x10, + 931 - 161: jis0208<<14 | 0x05<<7 | 0x11, + 932 - 161: jis0208<<14 | 0x05<<7 | 0x12, + 933 - 161: jis0208<<14 | 0x05<<7 | 0x13, + 934 - 161: jis0208<<14 | 0x05<<7 | 0x14, + 935 - 161: jis0208<<14 | 0x05<<7 | 0x15, + 936 - 161: jis0208<<14 | 0x05<<7 | 0x16, + 937 - 161: jis0208<<14 | 0x05<<7 | 0x17, + 938 - 161: jis0212<<14 | 0x05<<7 | 0x44, + 939 - 161: jis0212<<14 | 0x05<<7 | 0x49, + 940 - 161: jis0212<<14 | 0x05<<7 | 0x50, + 941 - 161: jis0212<<14 | 0x05<<7 | 0x51, + 942 - 161: jis0212<<14 | 0x05<<7 | 0x52, + 943 - 161: jis0212<<14 | 0x05<<7 | 0x53, + 944 - 161: jis0212<<14 | 0x05<<7 | 0x5A, + 945 - 161: jis0208<<14 | 0x05<<7 | 0x20, + 946 - 161: jis0208<<14 | 0x05<<7 | 0x21, + 947 - 161: jis0208<<14 | 0x05<<7 | 0x22, + 948 - 161: jis0208<<14 | 0x05<<7 | 0x23, + 949 - 161: jis0208<<14 | 0x05<<7 | 0x24, + 950 - 161: jis0208<<14 | 0x05<<7 | 0x25, + 951 - 161: jis0208<<14 | 0x05<<7 | 0x26, + 952 - 161: jis0208<<14 | 0x05<<7 | 0x27, + 953 - 161: jis0208<<14 | 0x05<<7 | 0x28, + 954 - 161: jis0208<<14 | 0x05<<7 | 0x29, + 955 - 161: jis0208<<14 | 0x05<<7 | 0x2A, + 956 - 161: jis0208<<14 | 0x05<<7 | 0x2B, + 957 - 161: jis0208<<14 | 0x05<<7 | 0x2C, + 958 - 161: jis0208<<14 | 0x05<<7 | 0x2D, + 959 - 161: jis0208<<14 | 0x05<<7 | 0x2E, + 960 - 161: jis0208<<14 | 0x05<<7 | 0x2F, + 961 - 161: jis0208<<14 | 0x05<<7 | 0x30, + 962 - 161: jis0212<<14 | 0x05<<7 | 0x57, + 963 - 161: jis0208<<14 | 0x05<<7 | 0x31, + 964 - 161: jis0208<<14 | 0x05<<7 | 0x32, + 965 - 161: jis0208<<14 | 0x05<<7 | 0x33, + 966 - 161: jis0208<<14 | 0x05<<7 | 0x34, + 967 - 161: jis0208<<14 | 0x05<<7 | 0x35, + 968 - 161: jis0208<<14 | 0x05<<7 | 0x36, + 969 - 161: jis0208<<14 | 0x05<<7 | 0x37, + 970 - 161: jis0212<<14 | 0x05<<7 | 0x54, + 971 - 161: jis0212<<14 | 0x05<<7 | 0x59, + 972 - 161: jis0212<<14 | 0x05<<7 | 0x56, + 973 - 161: jis0212<<14 | 0x05<<7 | 0x58, + 974 - 161: jis0212<<14 | 0x05<<7 | 0x5B, + 1025 - 161: jis0208<<14 | 0x06<<7 | 0x06, + 1026 - 161: jis0212<<14 | 0x06<<7 | 0x21, + 1027 - 161: jis0212<<14 | 0x06<<7 | 0x22, + 1028 - 161: jis0212<<14 | 0x06<<7 | 0x23, + 1029 - 161: jis0212<<14 | 0x06<<7 | 0x24, + 1030 - 161: jis0212<<14 | 0x06<<7 | 0x25, + 1031 - 161: jis0212<<14 | 0x06<<7 | 0x26, + 1032 - 161: jis0212<<14 | 0x06<<7 | 0x27, + 1033 - 161: jis0212<<14 | 0x06<<7 | 0x28, + 1034 - 161: jis0212<<14 | 0x06<<7 | 0x29, + 1035 - 161: jis0212<<14 | 0x06<<7 | 0x2A, + 1036 - 161: jis0212<<14 | 0x06<<7 | 0x2B, + 1038 - 161: jis0212<<14 | 0x06<<7 | 0x2C, + 1039 - 161: jis0212<<14 | 0x06<<7 | 0x2D, + 1040 - 161: jis0208<<14 | 0x06<<7 | 0x00, + 1041 - 161: jis0208<<14 | 0x06<<7 | 0x01, + 1042 - 161: jis0208<<14 | 0x06<<7 | 0x02, + 1043 - 161: jis0208<<14 | 0x06<<7 | 0x03, + 1044 - 161: jis0208<<14 | 0x06<<7 | 0x04, + 1045 - 161: jis0208<<14 | 0x06<<7 | 0x05, + 1046 - 161: jis0208<<14 | 0x06<<7 | 0x07, + 1047 - 161: jis0208<<14 | 0x06<<7 | 0x08, + 1048 - 161: jis0208<<14 | 0x06<<7 | 0x09, + 1049 - 161: jis0208<<14 | 0x06<<7 | 0x0A, + 1050 - 161: jis0208<<14 | 0x06<<7 | 0x0B, + 1051 - 161: jis0208<<14 | 0x06<<7 | 0x0C, + 1052 - 161: jis0208<<14 | 0x06<<7 | 0x0D, + 1053 - 161: jis0208<<14 | 0x06<<7 | 0x0E, + 1054 - 161: jis0208<<14 | 0x06<<7 | 0x0F, + 1055 - 161: jis0208<<14 | 0x06<<7 | 0x10, + 1056 - 161: jis0208<<14 | 0x06<<7 | 0x11, + 1057 - 161: jis0208<<14 | 0x06<<7 | 0x12, + 1058 - 161: jis0208<<14 | 0x06<<7 | 0x13, + 1059 - 161: jis0208<<14 | 0x06<<7 | 0x14, + 1060 - 161: jis0208<<14 | 0x06<<7 | 0x15, + 1061 - 161: jis0208<<14 | 0x06<<7 | 0x16, + 1062 - 161: jis0208<<14 | 0x06<<7 | 0x17, + 1063 - 161: jis0208<<14 | 0x06<<7 | 0x18, + 1064 - 161: jis0208<<14 | 0x06<<7 | 0x19, + 1065 - 161: jis0208<<14 | 0x06<<7 | 0x1A, + 1066 - 161: jis0208<<14 | 0x06<<7 | 0x1B, + 1067 - 161: jis0208<<14 | 0x06<<7 | 0x1C, + 1068 - 161: jis0208<<14 | 0x06<<7 | 0x1D, + 1069 - 161: jis0208<<14 | 0x06<<7 | 0x1E, + 1070 - 161: jis0208<<14 | 0x06<<7 | 0x1F, + 1071 - 161: jis0208<<14 | 0x06<<7 | 0x20, + 1072 - 161: jis0208<<14 | 0x06<<7 | 0x30, + 1073 - 161: jis0208<<14 | 0x06<<7 | 0x31, + 1074 - 161: jis0208<<14 | 0x06<<7 | 0x32, + 1075 - 161: jis0208<<14 | 0x06<<7 | 0x33, + 1076 - 161: jis0208<<14 | 0x06<<7 | 0x34, + 1077 - 161: jis0208<<14 | 0x06<<7 | 0x35, + 1078 - 161: jis0208<<14 | 0x06<<7 | 0x37, + 1079 - 161: jis0208<<14 | 0x06<<7 | 0x38, + 1080 - 161: jis0208<<14 | 0x06<<7 | 0x39, + 1081 - 161: jis0208<<14 | 0x06<<7 | 0x3A, + 1082 - 161: jis0208<<14 | 0x06<<7 | 0x3B, + 1083 - 161: jis0208<<14 | 0x06<<7 | 0x3C, + 1084 - 161: jis0208<<14 | 0x06<<7 | 0x3D, + 1085 - 161: jis0208<<14 | 0x06<<7 | 0x3E, + 1086 - 161: jis0208<<14 | 0x06<<7 | 0x3F, + 1087 - 161: jis0208<<14 | 0x06<<7 | 0x40, + 1088 - 161: jis0208<<14 | 0x06<<7 | 0x41, + 1089 - 161: jis0208<<14 | 0x06<<7 | 0x42, + 1090 - 161: jis0208<<14 | 0x06<<7 | 0x43, + 1091 - 161: jis0208<<14 | 0x06<<7 | 0x44, + 1092 - 161: jis0208<<14 | 0x06<<7 | 0x45, + 1093 - 161: jis0208<<14 | 0x06<<7 | 0x46, + 1094 - 161: jis0208<<14 | 0x06<<7 | 0x47, + 1095 - 161: jis0208<<14 | 0x06<<7 | 0x48, + 1096 - 161: jis0208<<14 | 0x06<<7 | 0x49, + 1097 - 161: jis0208<<14 | 0x06<<7 | 0x4A, + 1098 - 161: jis0208<<14 | 0x06<<7 | 0x4B, + 1099 - 161: jis0208<<14 | 0x06<<7 | 0x4C, + 1100 - 161: jis0208<<14 | 0x06<<7 | 0x4D, + 1101 - 161: jis0208<<14 | 0x06<<7 | 0x4E, + 1102 - 161: jis0208<<14 | 0x06<<7 | 0x4F, + 1103 - 161: jis0208<<14 | 0x06<<7 | 0x50, + 1105 - 161: jis0208<<14 | 0x06<<7 | 0x36, + 1106 - 161: jis0212<<14 | 0x06<<7 | 0x51, + 1107 - 161: jis0212<<14 | 0x06<<7 | 0x52, + 1108 - 161: jis0212<<14 | 0x06<<7 | 0x53, + 1109 - 161: jis0212<<14 | 0x06<<7 | 0x54, + 1110 - 161: jis0212<<14 | 0x06<<7 | 0x55, + 1111 - 161: jis0212<<14 | 0x06<<7 | 0x56, + 1112 - 161: jis0212<<14 | 0x06<<7 | 0x57, + 1113 - 161: jis0212<<14 | 0x06<<7 | 0x58, + 1114 - 161: jis0212<<14 | 0x06<<7 | 0x59, + 1115 - 161: jis0212<<14 | 0x06<<7 | 0x5A, + 1116 - 161: jis0212<<14 | 0x06<<7 | 0x5B, + 1118 - 161: jis0212<<14 | 0x06<<7 | 0x5C, + 1119 - 161: jis0212<<14 | 0x06<<7 | 0x5D, +} + +const encode4Low, encode4High = 63785, 64046 + +var encode4 = [...]uint16{ + 63785 - 63785: jis0208<<14 | 0x59<<7 | 0x25, + 63964 - 63785: jis0208<<14 | 0x5B<<7 | 0x2E, + 64014 - 63785: jis0208<<14 | 0x58<<7 | 0x33, + 64015 - 63785: jis0208<<14 | 0x58<<7 | 0x3E, + 64016 - 63785: jis0208<<14 | 0x58<<7 | 0x3F, + 64017 - 63785: jis0208<<14 | 0x58<<7 | 0x54, + 64018 - 63785: jis0208<<14 | 0x59<<7 | 0x1D, + 64019 - 63785: jis0208<<14 | 0x59<<7 | 0x2D, + 64020 - 63785: jis0208<<14 | 0x59<<7 | 0x2F, + 64021 - 63785: jis0208<<14 | 0x59<<7 | 0x5A, + 64022 - 63785: jis0208<<14 | 0x5A<<7 | 0x02, + 64023 - 63785: jis0208<<14 | 0x5A<<7 | 0x19, + 64024 - 63785: jis0208<<14 | 0x5A<<7 | 0x21, + 64025 - 63785: jis0208<<14 | 0x5A<<7 | 0x22, + 64026 - 63785: jis0208<<14 | 0x5A<<7 | 0x23, + 64027 - 63785: jis0208<<14 | 0x5A<<7 | 0x25, + 64028 - 63785: jis0208<<14 | 0x5A<<7 | 0x29, + 64029 - 63785: jis0208<<14 | 0x5A<<7 | 0x2C, + 64030 - 63785: jis0208<<14 | 0x5A<<7 | 0x35, + 64031 - 63785: jis0208<<14 | 0x5A<<7 | 0x40, + 64032 - 63785: jis0208<<14 | 0x5A<<7 | 0x42, + 64033 - 63785: jis0208<<14 | 0x5A<<7 | 0x43, + 64034 - 63785: jis0208<<14 | 0x5A<<7 | 0x4C, + 64035 - 63785: jis0208<<14 | 0x5A<<7 | 0x54, + 64036 - 63785: jis0208<<14 | 0x5A<<7 | 0x56, + 64037 - 63785: jis0208<<14 | 0x5A<<7 | 0x57, + 64038 - 63785: jis0208<<14 | 0x5A<<7 | 0x5A, + 64039 - 63785: jis0208<<14 | 0x5B<<7 | 0x18, + 64040 - 63785: jis0208<<14 | 0x5B<<7 | 0x1F, + 64041 - 63785: jis0208<<14 | 0x5B<<7 | 0x2F, + 64042 - 63785: jis0208<<14 | 0x5B<<7 | 0x3B, + 64043 - 63785: jis0208<<14 | 0x5B<<7 | 0x3C, + 64044 - 63785: jis0208<<14 | 0x5B<<7 | 0x3E, + 64045 - 63785: jis0208<<14 | 0x5B<<7 | 0x4B, +} + +const encode5Low, encode5High = 65281, 65510 + +var encode5 = [...]uint16{ + 65281 - 65281: jis0208<<14 | 0x00<<7 | 0x09, + 65282 - 65281: jis0208<<14 | 0x5B<<7 | 0x5D, + 65283 - 65281: jis0208<<14 | 0x00<<7 | 0x53, + 65284 - 65281: jis0208<<14 | 0x00<<7 | 0x4F, + 65285 - 65281: jis0208<<14 | 0x00<<7 | 0x52, + 65286 - 65281: jis0208<<14 | 0x00<<7 | 0x54, + 65287 - 65281: jis0208<<14 | 0x5B<<7 | 0x5C, + 65288 - 65281: jis0208<<14 | 0x00<<7 | 0x29, + 65289 - 65281: jis0208<<14 | 0x00<<7 | 0x2A, + 65290 - 65281: jis0208<<14 | 0x00<<7 | 0x55, + 65291 - 65281: jis0208<<14 | 0x00<<7 | 0x3B, + 65292 - 65281: jis0208<<14 | 0x00<<7 | 0x03, + 65293 - 65281: jis0208<<14 | 0x00<<7 | 0x3C, + 65294 - 65281: jis0208<<14 | 0x00<<7 | 0x04, + 65295 - 65281: jis0208<<14 | 0x00<<7 | 0x1E, + 65296 - 65281: jis0208<<14 | 0x02<<7 | 0x0F, + 65297 - 65281: jis0208<<14 | 0x02<<7 | 0x10, + 65298 - 65281: jis0208<<14 | 0x02<<7 | 0x11, + 65299 - 65281: jis0208<<14 | 0x02<<7 | 0x12, + 65300 - 65281: jis0208<<14 | 0x02<<7 | 0x13, + 65301 - 65281: jis0208<<14 | 0x02<<7 | 0x14, + 65302 - 65281: jis0208<<14 | 0x02<<7 | 0x15, + 65303 - 65281: jis0208<<14 | 0x02<<7 | 0x16, + 65304 - 65281: jis0208<<14 | 0x02<<7 | 0x17, + 65305 - 65281: jis0208<<14 | 0x02<<7 | 0x18, + 65306 - 65281: jis0208<<14 | 0x00<<7 | 0x06, + 65307 - 65281: jis0208<<14 | 0x00<<7 | 0x07, + 65308 - 65281: jis0208<<14 | 0x00<<7 | 0x42, + 65309 - 65281: jis0208<<14 | 0x00<<7 | 0x40, + 65310 - 65281: jis0208<<14 | 0x00<<7 | 0x43, + 65311 - 65281: jis0208<<14 | 0x00<<7 | 0x08, + 65312 - 65281: jis0208<<14 | 0x00<<7 | 0x56, + 65313 - 65281: jis0208<<14 | 0x02<<7 | 0x20, + 65314 - 65281: jis0208<<14 | 0x02<<7 | 0x21, + 65315 - 65281: jis0208<<14 | 0x02<<7 | 0x22, + 65316 - 65281: jis0208<<14 | 0x02<<7 | 0x23, + 65317 - 65281: jis0208<<14 | 0x02<<7 | 0x24, + 65318 - 65281: jis0208<<14 | 0x02<<7 | 0x25, + 65319 - 65281: jis0208<<14 | 0x02<<7 | 0x26, + 65320 - 65281: jis0208<<14 | 0x02<<7 | 0x27, + 65321 - 65281: jis0208<<14 | 0x02<<7 | 0x28, + 65322 - 65281: jis0208<<14 | 0x02<<7 | 0x29, + 65323 - 65281: jis0208<<14 | 0x02<<7 | 0x2A, + 65324 - 65281: jis0208<<14 | 0x02<<7 | 0x2B, + 65325 - 65281: jis0208<<14 | 0x02<<7 | 0x2C, + 65326 - 65281: jis0208<<14 | 0x02<<7 | 0x2D, + 65327 - 65281: jis0208<<14 | 0x02<<7 | 0x2E, + 65328 - 65281: jis0208<<14 | 0x02<<7 | 0x2F, + 65329 - 65281: jis0208<<14 | 0x02<<7 | 0x30, + 65330 - 65281: jis0208<<14 | 0x02<<7 | 0x31, + 65331 - 65281: jis0208<<14 | 0x02<<7 | 0x32, + 65332 - 65281: jis0208<<14 | 0x02<<7 | 0x33, + 65333 - 65281: jis0208<<14 | 0x02<<7 | 0x34, + 65334 - 65281: jis0208<<14 | 0x02<<7 | 0x35, + 65335 - 65281: jis0208<<14 | 0x02<<7 | 0x36, + 65336 - 65281: jis0208<<14 | 0x02<<7 | 0x37, + 65337 - 65281: jis0208<<14 | 0x02<<7 | 0x38, + 65338 - 65281: jis0208<<14 | 0x02<<7 | 0x39, + 65339 - 65281: jis0208<<14 | 0x00<<7 | 0x2D, + 65340 - 65281: jis0208<<14 | 0x00<<7 | 0x1F, + 65341 - 65281: jis0208<<14 | 0x00<<7 | 0x2E, + 65342 - 65281: jis0208<<14 | 0x00<<7 | 0x0F, + 65343 - 65281: jis0208<<14 | 0x00<<7 | 0x11, + 65344 - 65281: jis0208<<14 | 0x00<<7 | 0x0D, + 65345 - 65281: jis0208<<14 | 0x02<<7 | 0x40, + 65346 - 65281: jis0208<<14 | 0x02<<7 | 0x41, + 65347 - 65281: jis0208<<14 | 0x02<<7 | 0x42, + 65348 - 65281: jis0208<<14 | 0x02<<7 | 0x43, + 65349 - 65281: jis0208<<14 | 0x02<<7 | 0x44, + 65350 - 65281: jis0208<<14 | 0x02<<7 | 0x45, + 65351 - 65281: jis0208<<14 | 0x02<<7 | 0x46, + 65352 - 65281: jis0208<<14 | 0x02<<7 | 0x47, + 65353 - 65281: jis0208<<14 | 0x02<<7 | 0x48, + 65354 - 65281: jis0208<<14 | 0x02<<7 | 0x49, + 65355 - 65281: jis0208<<14 | 0x02<<7 | 0x4A, + 65356 - 65281: jis0208<<14 | 0x02<<7 | 0x4B, + 65357 - 65281: jis0208<<14 | 0x02<<7 | 0x4C, + 65358 - 65281: jis0208<<14 | 0x02<<7 | 0x4D, + 65359 - 65281: jis0208<<14 | 0x02<<7 | 0x4E, + 65360 - 65281: jis0208<<14 | 0x02<<7 | 0x4F, + 65361 - 65281: jis0208<<14 | 0x02<<7 | 0x50, + 65362 - 65281: jis0208<<14 | 0x02<<7 | 0x51, + 65363 - 65281: jis0208<<14 | 0x02<<7 | 0x52, + 65364 - 65281: jis0208<<14 | 0x02<<7 | 0x53, + 65365 - 65281: jis0208<<14 | 0x02<<7 | 0x54, + 65366 - 65281: jis0208<<14 | 0x02<<7 | 0x55, + 65367 - 65281: jis0208<<14 | 0x02<<7 | 0x56, + 65368 - 65281: jis0208<<14 | 0x02<<7 | 0x57, + 65369 - 65281: jis0208<<14 | 0x02<<7 | 0x58, + 65370 - 65281: jis0208<<14 | 0x02<<7 | 0x59, + 65371 - 65281: jis0208<<14 | 0x00<<7 | 0x2F, + 65372 - 65281: jis0208<<14 | 0x00<<7 | 0x22, + 65373 - 65281: jis0208<<14 | 0x00<<7 | 0x30, + 65374 - 65281: jis0208<<14 | 0x00<<7 | 0x20, + 65504 - 65281: jis0208<<14 | 0x00<<7 | 0x50, + 65505 - 65281: jis0208<<14 | 0x00<<7 | 0x51, + 65506 - 65281: jis0208<<14 | 0x01<<7 | 0x2B, + 65507 - 65281: jis0208<<14 | 0x00<<7 | 0x10, + 65508 - 65281: jis0208<<14 | 0x5B<<7 | 0x5B, + 65509 - 65281: jis0208<<14 | 0x00<<7 | 0x4E, +} diff --git a/vendor/golang.org/x/text/encoding/korean/euckr.go b/vendor/golang.org/x/text/encoding/korean/euckr.go new file mode 100644 index 000000000..034337f5d --- /dev/null +++ b/vendor/golang.org/x/text/encoding/korean/euckr.go @@ -0,0 +1,177 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package korean + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// All is a list of all defined encodings in this package. +var All = []encoding.Encoding{EUCKR} + +// EUCKR is the EUC-KR encoding, also known as Code Page 949. +var EUCKR encoding.Encoding = &eucKR + +var eucKR = internal.Encoding{ + &internal.SimpleEncoding{eucKRDecoder{}, eucKREncoder{}}, + "EUC-KR", + identifier.EUCKR, +} + +type eucKRDecoder struct{ transform.NopResetter } + +func (eucKRDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for ; nSrc < len(src); nSrc += size { + switch c0 := src[nSrc]; { + case c0 < utf8.RuneSelf: + r, size = rune(c0), 1 + + case 0x81 <= c0 && c0 < 0xff: + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + break + } + c1 := src[nSrc+1] + size = 2 + if c0 < 0xc7 { + r = 178 * rune(c0-0x81) + switch { + case 0x41 <= c1 && c1 < 0x5b: + r += rune(c1) - (0x41 - 0*26) + case 0x61 <= c1 && c1 < 0x7b: + r += rune(c1) - (0x61 - 1*26) + case 0x81 <= c1 && c1 < 0xff: + r += rune(c1) - (0x81 - 2*26) + default: + goto decError + } + } else if 0xa1 <= c1 && c1 < 0xff { + r = 178*(0xc7-0x81) + rune(c0-0xc7)*94 + rune(c1-0xa1) + } else { + goto decError + } + if int(r) < len(decode) { + r = rune(decode[r]) + if r != 0 { + break + } + } + decError: + r = utf8.RuneError + if c1 < utf8.RuneSelf { + size = 1 + } + + default: + r, size = utf8.RuneError, 1 + break + } + + if nDst+utf8.RuneLen(r) > len(dst) { + err = transform.ErrShortDst + break + } + nDst += utf8.EncodeRune(dst[nDst:], r) + } + return nDst, nSrc, err +} + +type eucKREncoder struct{ transform.NopResetter } + +func (eucKREncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst++ + continue + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break + } + } + + // func init checks that the switch covers all tables. + switch { + case encode0Low <= r && r < encode0High: + if r = rune(encode0[r-encode0Low]); r != 0 { + goto write2 + } + case encode1Low <= r && r < encode1High: + if r = rune(encode1[r-encode1Low]); r != 0 { + goto write2 + } + case encode2Low <= r && r < encode2High: + if r = rune(encode2[r-encode2Low]); r != 0 { + goto write2 + } + case encode3Low <= r && r < encode3High: + if r = rune(encode3[r-encode3Low]); r != 0 { + goto write2 + } + case encode4Low <= r && r < encode4High: + if r = rune(encode4[r-encode4Low]); r != 0 { + goto write2 + } + case encode5Low <= r && r < encode5High: + if r = rune(encode5[r-encode5Low]); r != 0 { + goto write2 + } + case encode6Low <= r && r < encode6High: + if r = rune(encode6[r-encode6Low]); r != 0 { + goto write2 + } + } + err = internal.ErrASCIIReplacement + break + } + + write2: + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = uint8(r >> 8) + dst[nDst+1] = uint8(r) + nDst += 2 + continue + } + return nDst, nSrc, err +} + +func init() { + // Check that the hard-coded encode switch covers all tables. + if numEncodeTables != 7 { + panic("bad numEncodeTables") + } +} diff --git a/vendor/golang.org/x/text/encoding/korean/tables.go b/vendor/golang.org/x/text/encoding/korean/tables.go new file mode 100644 index 000000000..0480e85c4 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/korean/tables.go @@ -0,0 +1,34152 @@ +// generated by go run maketables.go; DO NOT EDIT + +// Package korean provides Korean encodings such as EUC-KR. +package korean // import "golang.org/x/text/encoding/korean" + +// decode is the decoding table from EUC-KR code to Unicode. +// It is defined at http://encoding.spec.whatwg.org/index-euc-kr.txt +var decode = [...]uint16{ + 0: 0xAC02, + 1: 0xAC03, + 2: 0xAC05, + 3: 0xAC06, + 4: 0xAC0B, + 5: 0xAC0C, + 6: 0xAC0D, + 7: 0xAC0E, + 8: 0xAC0F, + 9: 0xAC18, + 10: 0xAC1E, + 11: 0xAC1F, + 12: 0xAC21, + 13: 0xAC22, + 14: 0xAC23, + 15: 0xAC25, + 16: 0xAC26, + 17: 0xAC27, + 18: 0xAC28, + 19: 0xAC29, + 20: 0xAC2A, + 21: 0xAC2B, + 22: 0xAC2E, + 23: 0xAC32, + 24: 0xAC33, + 25: 0xAC34, + 26: 0xAC35, + 27: 0xAC36, + 28: 0xAC37, + 29: 0xAC3A, + 30: 0xAC3B, + 31: 0xAC3D, + 32: 0xAC3E, + 33: 0xAC3F, + 34: 0xAC41, + 35: 0xAC42, + 36: 0xAC43, + 37: 0xAC44, + 38: 0xAC45, + 39: 0xAC46, + 40: 0xAC47, + 41: 0xAC48, + 42: 0xAC49, + 43: 0xAC4A, + 44: 0xAC4C, + 45: 0xAC4E, + 46: 0xAC4F, + 47: 0xAC50, + 48: 0xAC51, + 49: 0xAC52, + 50: 0xAC53, + 51: 0xAC55, + 52: 0xAC56, + 53: 0xAC57, + 54: 0xAC59, + 55: 0xAC5A, + 56: 0xAC5B, + 57: 0xAC5D, + 58: 0xAC5E, + 59: 0xAC5F, + 60: 0xAC60, + 61: 0xAC61, + 62: 0xAC62, + 63: 0xAC63, + 64: 0xAC64, + 65: 0xAC65, + 66: 0xAC66, + 67: 0xAC67, + 68: 0xAC68, + 69: 0xAC69, + 70: 0xAC6A, + 71: 0xAC6B, + 72: 0xAC6C, + 73: 0xAC6D, + 74: 0xAC6E, + 75: 0xAC6F, + 76: 0xAC72, + 77: 0xAC73, + 78: 0xAC75, + 79: 0xAC76, + 80: 0xAC79, + 81: 0xAC7B, + 82: 0xAC7C, + 83: 0xAC7D, + 84: 0xAC7E, + 85: 0xAC7F, + 86: 0xAC82, + 87: 0xAC87, + 88: 0xAC88, + 89: 0xAC8D, + 90: 0xAC8E, + 91: 0xAC8F, + 92: 0xAC91, + 93: 0xAC92, + 94: 0xAC93, + 95: 0xAC95, + 96: 0xAC96, + 97: 0xAC97, + 98: 0xAC98, + 99: 0xAC99, + 100: 0xAC9A, + 101: 0xAC9B, + 102: 0xAC9E, + 103: 0xACA2, + 104: 0xACA3, + 105: 0xACA4, + 106: 0xACA5, + 107: 0xACA6, + 108: 0xACA7, + 109: 0xACAB, + 110: 0xACAD, + 111: 0xACAE, + 112: 0xACB1, + 113: 0xACB2, + 114: 0xACB3, + 115: 0xACB4, + 116: 0xACB5, + 117: 0xACB6, + 118: 0xACB7, + 119: 0xACBA, + 120: 0xACBE, + 121: 0xACBF, + 122: 0xACC0, + 123: 0xACC2, + 124: 0xACC3, + 125: 0xACC5, + 126: 0xACC6, + 127: 0xACC7, + 128: 0xACC9, + 129: 0xACCA, + 130: 0xACCB, + 131: 0xACCD, + 132: 0xACCE, + 133: 0xACCF, + 134: 0xACD0, + 135: 0xACD1, + 136: 0xACD2, + 137: 0xACD3, + 138: 0xACD4, + 139: 0xACD6, + 140: 0xACD8, + 141: 0xACD9, + 142: 0xACDA, + 143: 0xACDB, + 144: 0xACDC, + 145: 0xACDD, + 146: 0xACDE, + 147: 0xACDF, + 148: 0xACE2, + 149: 0xACE3, + 150: 0xACE5, + 151: 0xACE6, + 152: 0xACE9, + 153: 0xACEB, + 154: 0xACED, + 155: 0xACEE, + 156: 0xACF2, + 157: 0xACF4, + 158: 0xACF7, + 159: 0xACF8, + 160: 0xACF9, + 161: 0xACFA, + 162: 0xACFB, + 163: 0xACFE, + 164: 0xACFF, + 165: 0xAD01, + 166: 0xAD02, + 167: 0xAD03, + 168: 0xAD05, + 169: 0xAD07, + 170: 0xAD08, + 171: 0xAD09, + 172: 0xAD0A, + 173: 0xAD0B, + 174: 0xAD0E, + 175: 0xAD10, + 176: 0xAD12, + 177: 0xAD13, + 178: 0xAD14, + 179: 0xAD15, + 180: 0xAD16, + 181: 0xAD17, + 182: 0xAD19, + 183: 0xAD1A, + 184: 0xAD1B, + 185: 0xAD1D, + 186: 0xAD1E, + 187: 0xAD1F, + 188: 0xAD21, + 189: 0xAD22, + 190: 0xAD23, + 191: 0xAD24, + 192: 0xAD25, + 193: 0xAD26, + 194: 0xAD27, + 195: 0xAD28, + 196: 0xAD2A, + 197: 0xAD2B, + 198: 0xAD2E, + 199: 0xAD2F, + 200: 0xAD30, + 201: 0xAD31, + 202: 0xAD32, + 203: 0xAD33, + 204: 0xAD36, + 205: 0xAD37, + 206: 0xAD39, + 207: 0xAD3A, + 208: 0xAD3B, + 209: 0xAD3D, + 210: 0xAD3E, + 211: 0xAD3F, + 212: 0xAD40, + 213: 0xAD41, + 214: 0xAD42, + 215: 0xAD43, + 216: 0xAD46, + 217: 0xAD48, + 218: 0xAD4A, + 219: 0xAD4B, + 220: 0xAD4C, + 221: 0xAD4D, + 222: 0xAD4E, + 223: 0xAD4F, + 224: 0xAD51, + 225: 0xAD52, + 226: 0xAD53, + 227: 0xAD55, + 228: 0xAD56, + 229: 0xAD57, + 230: 0xAD59, + 231: 0xAD5A, + 232: 0xAD5B, + 233: 0xAD5C, + 234: 0xAD5D, + 235: 0xAD5E, + 236: 0xAD5F, + 237: 0xAD60, + 238: 0xAD62, + 239: 0xAD64, + 240: 0xAD65, + 241: 0xAD66, + 242: 0xAD67, + 243: 0xAD68, + 244: 0xAD69, + 245: 0xAD6A, + 246: 0xAD6B, + 247: 0xAD6E, + 248: 0xAD6F, + 249: 0xAD71, + 250: 0xAD72, + 251: 0xAD77, + 252: 0xAD78, + 253: 0xAD79, + 254: 0xAD7A, + 255: 0xAD7E, + 256: 0xAD80, + 257: 0xAD83, + 258: 0xAD84, + 259: 0xAD85, + 260: 0xAD86, + 261: 0xAD87, + 262: 0xAD8A, + 263: 0xAD8B, + 264: 0xAD8D, + 265: 0xAD8E, + 266: 0xAD8F, + 267: 0xAD91, + 268: 0xAD92, + 269: 0xAD93, + 270: 0xAD94, + 271: 0xAD95, + 272: 0xAD96, + 273: 0xAD97, + 274: 0xAD98, + 275: 0xAD99, + 276: 0xAD9A, + 277: 0xAD9B, + 278: 0xAD9E, + 279: 0xAD9F, + 280: 0xADA0, + 281: 0xADA1, + 282: 0xADA2, + 283: 0xADA3, + 284: 0xADA5, + 285: 0xADA6, + 286: 0xADA7, + 287: 0xADA8, + 288: 0xADA9, + 289: 0xADAA, + 290: 0xADAB, + 291: 0xADAC, + 292: 0xADAD, + 293: 0xADAE, + 294: 0xADAF, + 295: 0xADB0, + 296: 0xADB1, + 297: 0xADB2, + 298: 0xADB3, + 299: 0xADB4, + 300: 0xADB5, + 301: 0xADB6, + 302: 0xADB8, + 303: 0xADB9, + 304: 0xADBA, + 305: 0xADBB, + 306: 0xADBC, + 307: 0xADBD, + 308: 0xADBE, + 309: 0xADBF, + 310: 0xADC2, + 311: 0xADC3, + 312: 0xADC5, + 313: 0xADC6, + 314: 0xADC7, + 315: 0xADC9, + 316: 0xADCA, + 317: 0xADCB, + 318: 0xADCC, + 319: 0xADCD, + 320: 0xADCE, + 321: 0xADCF, + 322: 0xADD2, + 323: 0xADD4, + 324: 0xADD5, + 325: 0xADD6, + 326: 0xADD7, + 327: 0xADD8, + 328: 0xADD9, + 329: 0xADDA, + 330: 0xADDB, + 331: 0xADDD, + 332: 0xADDE, + 333: 0xADDF, + 334: 0xADE1, + 335: 0xADE2, + 336: 0xADE3, + 337: 0xADE5, + 338: 0xADE6, + 339: 0xADE7, + 340: 0xADE8, + 341: 0xADE9, + 342: 0xADEA, + 343: 0xADEB, + 344: 0xADEC, + 345: 0xADED, + 346: 0xADEE, + 347: 0xADEF, + 348: 0xADF0, + 349: 0xADF1, + 350: 0xADF2, + 351: 0xADF3, + 352: 0xADF4, + 353: 0xADF5, + 354: 0xADF6, + 355: 0xADF7, + 356: 0xADFA, + 357: 0xADFB, + 358: 0xADFD, + 359: 0xADFE, + 360: 0xAE02, + 361: 0xAE03, + 362: 0xAE04, + 363: 0xAE05, + 364: 0xAE06, + 365: 0xAE07, + 366: 0xAE0A, + 367: 0xAE0C, + 368: 0xAE0E, + 369: 0xAE0F, + 370: 0xAE10, + 371: 0xAE11, + 372: 0xAE12, + 373: 0xAE13, + 374: 0xAE15, + 375: 0xAE16, + 376: 0xAE17, + 377: 0xAE18, + 378: 0xAE19, + 379: 0xAE1A, + 380: 0xAE1B, + 381: 0xAE1C, + 382: 0xAE1D, + 383: 0xAE1E, + 384: 0xAE1F, + 385: 0xAE20, + 386: 0xAE21, + 387: 0xAE22, + 388: 0xAE23, + 389: 0xAE24, + 390: 0xAE25, + 391: 0xAE26, + 392: 0xAE27, + 393: 0xAE28, + 394: 0xAE29, + 395: 0xAE2A, + 396: 0xAE2B, + 397: 0xAE2C, + 398: 0xAE2D, + 399: 0xAE2E, + 400: 0xAE2F, + 401: 0xAE32, + 402: 0xAE33, + 403: 0xAE35, + 404: 0xAE36, + 405: 0xAE39, + 406: 0xAE3B, + 407: 0xAE3C, + 408: 0xAE3D, + 409: 0xAE3E, + 410: 0xAE3F, + 411: 0xAE42, + 412: 0xAE44, + 413: 0xAE47, + 414: 0xAE48, + 415: 0xAE49, + 416: 0xAE4B, + 417: 0xAE4F, + 418: 0xAE51, + 419: 0xAE52, + 420: 0xAE53, + 421: 0xAE55, + 422: 0xAE57, + 423: 0xAE58, + 424: 0xAE59, + 425: 0xAE5A, + 426: 0xAE5B, + 427: 0xAE5E, + 428: 0xAE62, + 429: 0xAE63, + 430: 0xAE64, + 431: 0xAE66, + 432: 0xAE67, + 433: 0xAE6A, + 434: 0xAE6B, + 435: 0xAE6D, + 436: 0xAE6E, + 437: 0xAE6F, + 438: 0xAE71, + 439: 0xAE72, + 440: 0xAE73, + 441: 0xAE74, + 442: 0xAE75, + 443: 0xAE76, + 444: 0xAE77, + 445: 0xAE7A, + 446: 0xAE7E, + 447: 0xAE7F, + 448: 0xAE80, + 449: 0xAE81, + 450: 0xAE82, + 451: 0xAE83, + 452: 0xAE86, + 453: 0xAE87, + 454: 0xAE88, + 455: 0xAE89, + 456: 0xAE8A, + 457: 0xAE8B, + 458: 0xAE8D, + 459: 0xAE8E, + 460: 0xAE8F, + 461: 0xAE90, + 462: 0xAE91, + 463: 0xAE92, + 464: 0xAE93, + 465: 0xAE94, + 466: 0xAE95, + 467: 0xAE96, + 468: 0xAE97, + 469: 0xAE98, + 470: 0xAE99, + 471: 0xAE9A, + 472: 0xAE9B, + 473: 0xAE9C, + 474: 0xAE9D, + 475: 0xAE9E, + 476: 0xAE9F, + 477: 0xAEA0, + 478: 0xAEA1, + 479: 0xAEA2, + 480: 0xAEA3, + 481: 0xAEA4, + 482: 0xAEA5, + 483: 0xAEA6, + 484: 0xAEA7, + 485: 0xAEA8, + 486: 0xAEA9, + 487: 0xAEAA, + 488: 0xAEAB, + 489: 0xAEAC, + 490: 0xAEAD, + 491: 0xAEAE, + 492: 0xAEAF, + 493: 0xAEB0, + 494: 0xAEB1, + 495: 0xAEB2, + 496: 0xAEB3, + 497: 0xAEB4, + 498: 0xAEB5, + 499: 0xAEB6, + 500: 0xAEB7, + 501: 0xAEB8, + 502: 0xAEB9, + 503: 0xAEBA, + 504: 0xAEBB, + 505: 0xAEBF, + 506: 0xAEC1, + 507: 0xAEC2, + 508: 0xAEC3, + 509: 0xAEC5, + 510: 0xAEC6, + 511: 0xAEC7, + 512: 0xAEC8, + 513: 0xAEC9, + 514: 0xAECA, + 515: 0xAECB, + 516: 0xAECE, + 517: 0xAED2, + 518: 0xAED3, + 519: 0xAED4, + 520: 0xAED5, + 521: 0xAED6, + 522: 0xAED7, + 523: 0xAEDA, + 524: 0xAEDB, + 525: 0xAEDD, + 526: 0xAEDE, + 527: 0xAEDF, + 528: 0xAEE0, + 529: 0xAEE1, + 530: 0xAEE2, + 531: 0xAEE3, + 532: 0xAEE4, + 533: 0xAEE5, + 534: 0xAEE6, + 535: 0xAEE7, + 536: 0xAEE9, + 537: 0xAEEA, + 538: 0xAEEC, + 539: 0xAEEE, + 540: 0xAEEF, + 541: 0xAEF0, + 542: 0xAEF1, + 543: 0xAEF2, + 544: 0xAEF3, + 545: 0xAEF5, + 546: 0xAEF6, + 547: 0xAEF7, + 548: 0xAEF9, + 549: 0xAEFA, + 550: 0xAEFB, + 551: 0xAEFD, + 552: 0xAEFE, + 553: 0xAEFF, + 554: 0xAF00, + 555: 0xAF01, + 556: 0xAF02, + 557: 0xAF03, + 558: 0xAF04, + 559: 0xAF05, + 560: 0xAF06, + 561: 0xAF09, + 562: 0xAF0A, + 563: 0xAF0B, + 564: 0xAF0C, + 565: 0xAF0E, + 566: 0xAF0F, + 567: 0xAF11, + 568: 0xAF12, + 569: 0xAF13, + 570: 0xAF14, + 571: 0xAF15, + 572: 0xAF16, + 573: 0xAF17, + 574: 0xAF18, + 575: 0xAF19, + 576: 0xAF1A, + 577: 0xAF1B, + 578: 0xAF1C, + 579: 0xAF1D, + 580: 0xAF1E, + 581: 0xAF1F, + 582: 0xAF20, + 583: 0xAF21, + 584: 0xAF22, + 585: 0xAF23, + 586: 0xAF24, + 587: 0xAF25, + 588: 0xAF26, + 589: 0xAF27, + 590: 0xAF28, + 591: 0xAF29, + 592: 0xAF2A, + 593: 0xAF2B, + 594: 0xAF2E, + 595: 0xAF2F, + 596: 0xAF31, + 597: 0xAF33, + 598: 0xAF35, + 599: 0xAF36, + 600: 0xAF37, + 601: 0xAF38, + 602: 0xAF39, + 603: 0xAF3A, + 604: 0xAF3B, + 605: 0xAF3E, + 606: 0xAF40, + 607: 0xAF44, + 608: 0xAF45, + 609: 0xAF46, + 610: 0xAF47, + 611: 0xAF4A, + 612: 0xAF4B, + 613: 0xAF4C, + 614: 0xAF4D, + 615: 0xAF4E, + 616: 0xAF4F, + 617: 0xAF51, + 618: 0xAF52, + 619: 0xAF53, + 620: 0xAF54, + 621: 0xAF55, + 622: 0xAF56, + 623: 0xAF57, + 624: 0xAF58, + 625: 0xAF59, + 626: 0xAF5A, + 627: 0xAF5B, + 628: 0xAF5E, + 629: 0xAF5F, + 630: 0xAF60, + 631: 0xAF61, + 632: 0xAF62, + 633: 0xAF63, + 634: 0xAF66, + 635: 0xAF67, + 636: 0xAF68, + 637: 0xAF69, + 638: 0xAF6A, + 639: 0xAF6B, + 640: 0xAF6C, + 641: 0xAF6D, + 642: 0xAF6E, + 643: 0xAF6F, + 644: 0xAF70, + 645: 0xAF71, + 646: 0xAF72, + 647: 0xAF73, + 648: 0xAF74, + 649: 0xAF75, + 650: 0xAF76, + 651: 0xAF77, + 652: 0xAF78, + 653: 0xAF7A, + 654: 0xAF7B, + 655: 0xAF7C, + 656: 0xAF7D, + 657: 0xAF7E, + 658: 0xAF7F, + 659: 0xAF81, + 660: 0xAF82, + 661: 0xAF83, + 662: 0xAF85, + 663: 0xAF86, + 664: 0xAF87, + 665: 0xAF89, + 666: 0xAF8A, + 667: 0xAF8B, + 668: 0xAF8C, + 669: 0xAF8D, + 670: 0xAF8E, + 671: 0xAF8F, + 672: 0xAF92, + 673: 0xAF93, + 674: 0xAF94, + 675: 0xAF96, + 676: 0xAF97, + 677: 0xAF98, + 678: 0xAF99, + 679: 0xAF9A, + 680: 0xAF9B, + 681: 0xAF9D, + 682: 0xAF9E, + 683: 0xAF9F, + 684: 0xAFA0, + 685: 0xAFA1, + 686: 0xAFA2, + 687: 0xAFA3, + 688: 0xAFA4, + 689: 0xAFA5, + 690: 0xAFA6, + 691: 0xAFA7, + 692: 0xAFA8, + 693: 0xAFA9, + 694: 0xAFAA, + 695: 0xAFAB, + 696: 0xAFAC, + 697: 0xAFAD, + 698: 0xAFAE, + 699: 0xAFAF, + 700: 0xAFB0, + 701: 0xAFB1, + 702: 0xAFB2, + 703: 0xAFB3, + 704: 0xAFB4, + 705: 0xAFB5, + 706: 0xAFB6, + 707: 0xAFB7, + 708: 0xAFBA, + 709: 0xAFBB, + 710: 0xAFBD, + 711: 0xAFBE, + 712: 0xAFBF, + 713: 0xAFC1, + 714: 0xAFC2, + 715: 0xAFC3, + 716: 0xAFC4, + 717: 0xAFC5, + 718: 0xAFC6, + 719: 0xAFCA, + 720: 0xAFCC, + 721: 0xAFCF, + 722: 0xAFD0, + 723: 0xAFD1, + 724: 0xAFD2, + 725: 0xAFD3, + 726: 0xAFD5, + 727: 0xAFD6, + 728: 0xAFD7, + 729: 0xAFD8, + 730: 0xAFD9, + 731: 0xAFDA, + 732: 0xAFDB, + 733: 0xAFDD, + 734: 0xAFDE, + 735: 0xAFDF, + 736: 0xAFE0, + 737: 0xAFE1, + 738: 0xAFE2, + 739: 0xAFE3, + 740: 0xAFE4, + 741: 0xAFE5, + 742: 0xAFE6, + 743: 0xAFE7, + 744: 0xAFEA, + 745: 0xAFEB, + 746: 0xAFEC, + 747: 0xAFED, + 748: 0xAFEE, + 749: 0xAFEF, + 750: 0xAFF2, + 751: 0xAFF3, + 752: 0xAFF5, + 753: 0xAFF6, + 754: 0xAFF7, + 755: 0xAFF9, + 756: 0xAFFA, + 757: 0xAFFB, + 758: 0xAFFC, + 759: 0xAFFD, + 760: 0xAFFE, + 761: 0xAFFF, + 762: 0xB002, + 763: 0xB003, + 764: 0xB005, + 765: 0xB006, + 766: 0xB007, + 767: 0xB008, + 768: 0xB009, + 769: 0xB00A, + 770: 0xB00B, + 771: 0xB00D, + 772: 0xB00E, + 773: 0xB00F, + 774: 0xB011, + 775: 0xB012, + 776: 0xB013, + 777: 0xB015, + 778: 0xB016, + 779: 0xB017, + 780: 0xB018, + 781: 0xB019, + 782: 0xB01A, + 783: 0xB01B, + 784: 0xB01E, + 785: 0xB01F, + 786: 0xB020, + 787: 0xB021, + 788: 0xB022, + 789: 0xB023, + 790: 0xB024, + 791: 0xB025, + 792: 0xB026, + 793: 0xB027, + 794: 0xB029, + 795: 0xB02A, + 796: 0xB02B, + 797: 0xB02C, + 798: 0xB02D, + 799: 0xB02E, + 800: 0xB02F, + 801: 0xB030, + 802: 0xB031, + 803: 0xB032, + 804: 0xB033, + 805: 0xB034, + 806: 0xB035, + 807: 0xB036, + 808: 0xB037, + 809: 0xB038, + 810: 0xB039, + 811: 0xB03A, + 812: 0xB03B, + 813: 0xB03C, + 814: 0xB03D, + 815: 0xB03E, + 816: 0xB03F, + 817: 0xB040, + 818: 0xB041, + 819: 0xB042, + 820: 0xB043, + 821: 0xB046, + 822: 0xB047, + 823: 0xB049, + 824: 0xB04B, + 825: 0xB04D, + 826: 0xB04F, + 827: 0xB050, + 828: 0xB051, + 829: 0xB052, + 830: 0xB056, + 831: 0xB058, + 832: 0xB05A, + 833: 0xB05B, + 834: 0xB05C, + 835: 0xB05E, + 836: 0xB05F, + 837: 0xB060, + 838: 0xB061, + 839: 0xB062, + 840: 0xB063, + 841: 0xB064, + 842: 0xB065, + 843: 0xB066, + 844: 0xB067, + 845: 0xB068, + 846: 0xB069, + 847: 0xB06A, + 848: 0xB06B, + 849: 0xB06C, + 850: 0xB06D, + 851: 0xB06E, + 852: 0xB06F, + 853: 0xB070, + 854: 0xB071, + 855: 0xB072, + 856: 0xB073, + 857: 0xB074, + 858: 0xB075, + 859: 0xB076, + 860: 0xB077, + 861: 0xB078, + 862: 0xB079, + 863: 0xB07A, + 864: 0xB07B, + 865: 0xB07E, + 866: 0xB07F, + 867: 0xB081, + 868: 0xB082, + 869: 0xB083, + 870: 0xB085, + 871: 0xB086, + 872: 0xB087, + 873: 0xB088, + 874: 0xB089, + 875: 0xB08A, + 876: 0xB08B, + 877: 0xB08E, + 878: 0xB090, + 879: 0xB092, + 880: 0xB093, + 881: 0xB094, + 882: 0xB095, + 883: 0xB096, + 884: 0xB097, + 885: 0xB09B, + 886: 0xB09D, + 887: 0xB09E, + 888: 0xB0A3, + 889: 0xB0A4, + 890: 0xB0A5, + 891: 0xB0A6, + 892: 0xB0A7, + 893: 0xB0AA, + 894: 0xB0B0, + 895: 0xB0B2, + 896: 0xB0B6, + 897: 0xB0B7, + 898: 0xB0B9, + 899: 0xB0BA, + 900: 0xB0BB, + 901: 0xB0BD, + 902: 0xB0BE, + 903: 0xB0BF, + 904: 0xB0C0, + 905: 0xB0C1, + 906: 0xB0C2, + 907: 0xB0C3, + 908: 0xB0C6, + 909: 0xB0CA, + 910: 0xB0CB, + 911: 0xB0CC, + 912: 0xB0CD, + 913: 0xB0CE, + 914: 0xB0CF, + 915: 0xB0D2, + 916: 0xB0D3, + 917: 0xB0D5, + 918: 0xB0D6, + 919: 0xB0D7, + 920: 0xB0D9, + 921: 0xB0DA, + 922: 0xB0DB, + 923: 0xB0DC, + 924: 0xB0DD, + 925: 0xB0DE, + 926: 0xB0DF, + 927: 0xB0E1, + 928: 0xB0E2, + 929: 0xB0E3, + 930: 0xB0E4, + 931: 0xB0E6, + 932: 0xB0E7, + 933: 0xB0E8, + 934: 0xB0E9, + 935: 0xB0EA, + 936: 0xB0EB, + 937: 0xB0EC, + 938: 0xB0ED, + 939: 0xB0EE, + 940: 0xB0EF, + 941: 0xB0F0, + 942: 0xB0F1, + 943: 0xB0F2, + 944: 0xB0F3, + 945: 0xB0F4, + 946: 0xB0F5, + 947: 0xB0F6, + 948: 0xB0F7, + 949: 0xB0F8, + 950: 0xB0F9, + 951: 0xB0FA, + 952: 0xB0FB, + 953: 0xB0FC, + 954: 0xB0FD, + 955: 0xB0FE, + 956: 0xB0FF, + 957: 0xB100, + 958: 0xB101, + 959: 0xB102, + 960: 0xB103, + 961: 0xB104, + 962: 0xB105, + 963: 0xB106, + 964: 0xB107, + 965: 0xB10A, + 966: 0xB10D, + 967: 0xB10E, + 968: 0xB10F, + 969: 0xB111, + 970: 0xB114, + 971: 0xB115, + 972: 0xB116, + 973: 0xB117, + 974: 0xB11A, + 975: 0xB11E, + 976: 0xB11F, + 977: 0xB120, + 978: 0xB121, + 979: 0xB122, + 980: 0xB126, + 981: 0xB127, + 982: 0xB129, + 983: 0xB12A, + 984: 0xB12B, + 985: 0xB12D, + 986: 0xB12E, + 987: 0xB12F, + 988: 0xB130, + 989: 0xB131, + 990: 0xB132, + 991: 0xB133, + 992: 0xB136, + 993: 0xB13A, + 994: 0xB13B, + 995: 0xB13C, + 996: 0xB13D, + 997: 0xB13E, + 998: 0xB13F, + 999: 0xB142, + 1000: 0xB143, + 1001: 0xB145, + 1002: 0xB146, + 1003: 0xB147, + 1004: 0xB149, + 1005: 0xB14A, + 1006: 0xB14B, + 1007: 0xB14C, + 1008: 0xB14D, + 1009: 0xB14E, + 1010: 0xB14F, + 1011: 0xB152, + 1012: 0xB153, + 1013: 0xB156, + 1014: 0xB157, + 1015: 0xB159, + 1016: 0xB15A, + 1017: 0xB15B, + 1018: 0xB15D, + 1019: 0xB15E, + 1020: 0xB15F, + 1021: 0xB161, + 1022: 0xB162, + 1023: 0xB163, + 1024: 0xB164, + 1025: 0xB165, + 1026: 0xB166, + 1027: 0xB167, + 1028: 0xB168, + 1029: 0xB169, + 1030: 0xB16A, + 1031: 0xB16B, + 1032: 0xB16C, + 1033: 0xB16D, + 1034: 0xB16E, + 1035: 0xB16F, + 1036: 0xB170, + 1037: 0xB171, + 1038: 0xB172, + 1039: 0xB173, + 1040: 0xB174, + 1041: 0xB175, + 1042: 0xB176, + 1043: 0xB177, + 1044: 0xB17A, + 1045: 0xB17B, + 1046: 0xB17D, + 1047: 0xB17E, + 1048: 0xB17F, + 1049: 0xB181, + 1050: 0xB183, + 1051: 0xB184, + 1052: 0xB185, + 1053: 0xB186, + 1054: 0xB187, + 1055: 0xB18A, + 1056: 0xB18C, + 1057: 0xB18E, + 1058: 0xB18F, + 1059: 0xB190, + 1060: 0xB191, + 1061: 0xB195, + 1062: 0xB196, + 1063: 0xB197, + 1064: 0xB199, + 1065: 0xB19A, + 1066: 0xB19B, + 1067: 0xB19D, + 1068: 0xB19E, + 1069: 0xB19F, + 1070: 0xB1A0, + 1071: 0xB1A1, + 1072: 0xB1A2, + 1073: 0xB1A3, + 1074: 0xB1A4, + 1075: 0xB1A5, + 1076: 0xB1A6, + 1077: 0xB1A7, + 1078: 0xB1A9, + 1079: 0xB1AA, + 1080: 0xB1AB, + 1081: 0xB1AC, + 1082: 0xB1AD, + 1083: 0xB1AE, + 1084: 0xB1AF, + 1085: 0xB1B0, + 1086: 0xB1B1, + 1087: 0xB1B2, + 1088: 0xB1B3, + 1089: 0xB1B4, + 1090: 0xB1B5, + 1091: 0xB1B6, + 1092: 0xB1B7, + 1093: 0xB1B8, + 1094: 0xB1B9, + 1095: 0xB1BA, + 1096: 0xB1BB, + 1097: 0xB1BC, + 1098: 0xB1BD, + 1099: 0xB1BE, + 1100: 0xB1BF, + 1101: 0xB1C0, + 1102: 0xB1C1, + 1103: 0xB1C2, + 1104: 0xB1C3, + 1105: 0xB1C4, + 1106: 0xB1C5, + 1107: 0xB1C6, + 1108: 0xB1C7, + 1109: 0xB1C8, + 1110: 0xB1C9, + 1111: 0xB1CA, + 1112: 0xB1CB, + 1113: 0xB1CD, + 1114: 0xB1CE, + 1115: 0xB1CF, + 1116: 0xB1D1, + 1117: 0xB1D2, + 1118: 0xB1D3, + 1119: 0xB1D5, + 1120: 0xB1D6, + 1121: 0xB1D7, + 1122: 0xB1D8, + 1123: 0xB1D9, + 1124: 0xB1DA, + 1125: 0xB1DB, + 1126: 0xB1DE, + 1127: 0xB1E0, + 1128: 0xB1E1, + 1129: 0xB1E2, + 1130: 0xB1E3, + 1131: 0xB1E4, + 1132: 0xB1E5, + 1133: 0xB1E6, + 1134: 0xB1E7, + 1135: 0xB1EA, + 1136: 0xB1EB, + 1137: 0xB1ED, + 1138: 0xB1EE, + 1139: 0xB1EF, + 1140: 0xB1F1, + 1141: 0xB1F2, + 1142: 0xB1F3, + 1143: 0xB1F4, + 1144: 0xB1F5, + 1145: 0xB1F6, + 1146: 0xB1F7, + 1147: 0xB1F8, + 1148: 0xB1FA, + 1149: 0xB1FC, + 1150: 0xB1FE, + 1151: 0xB1FF, + 1152: 0xB200, + 1153: 0xB201, + 1154: 0xB202, + 1155: 0xB203, + 1156: 0xB206, + 1157: 0xB207, + 1158: 0xB209, + 1159: 0xB20A, + 1160: 0xB20D, + 1161: 0xB20E, + 1162: 0xB20F, + 1163: 0xB210, + 1164: 0xB211, + 1165: 0xB212, + 1166: 0xB213, + 1167: 0xB216, + 1168: 0xB218, + 1169: 0xB21A, + 1170: 0xB21B, + 1171: 0xB21C, + 1172: 0xB21D, + 1173: 0xB21E, + 1174: 0xB21F, + 1175: 0xB221, + 1176: 0xB222, + 1177: 0xB223, + 1178: 0xB224, + 1179: 0xB225, + 1180: 0xB226, + 1181: 0xB227, + 1182: 0xB228, + 1183: 0xB229, + 1184: 0xB22A, + 1185: 0xB22B, + 1186: 0xB22C, + 1187: 0xB22D, + 1188: 0xB22E, + 1189: 0xB22F, + 1190: 0xB230, + 1191: 0xB231, + 1192: 0xB232, + 1193: 0xB233, + 1194: 0xB235, + 1195: 0xB236, + 1196: 0xB237, + 1197: 0xB238, + 1198: 0xB239, + 1199: 0xB23A, + 1200: 0xB23B, + 1201: 0xB23D, + 1202: 0xB23E, + 1203: 0xB23F, + 1204: 0xB240, + 1205: 0xB241, + 1206: 0xB242, + 1207: 0xB243, + 1208: 0xB244, + 1209: 0xB245, + 1210: 0xB246, + 1211: 0xB247, + 1212: 0xB248, + 1213: 0xB249, + 1214: 0xB24A, + 1215: 0xB24B, + 1216: 0xB24C, + 1217: 0xB24D, + 1218: 0xB24E, + 1219: 0xB24F, + 1220: 0xB250, + 1221: 0xB251, + 1222: 0xB252, + 1223: 0xB253, + 1224: 0xB254, + 1225: 0xB255, + 1226: 0xB256, + 1227: 0xB257, + 1228: 0xB259, + 1229: 0xB25A, + 1230: 0xB25B, + 1231: 0xB25D, + 1232: 0xB25E, + 1233: 0xB25F, + 1234: 0xB261, + 1235: 0xB262, + 1236: 0xB263, + 1237: 0xB264, + 1238: 0xB265, + 1239: 0xB266, + 1240: 0xB267, + 1241: 0xB26A, + 1242: 0xB26B, + 1243: 0xB26C, + 1244: 0xB26D, + 1245: 0xB26E, + 1246: 0xB26F, + 1247: 0xB270, + 1248: 0xB271, + 1249: 0xB272, + 1250: 0xB273, + 1251: 0xB276, + 1252: 0xB277, + 1253: 0xB278, + 1254: 0xB279, + 1255: 0xB27A, + 1256: 0xB27B, + 1257: 0xB27D, + 1258: 0xB27E, + 1259: 0xB27F, + 1260: 0xB280, + 1261: 0xB281, + 1262: 0xB282, + 1263: 0xB283, + 1264: 0xB286, + 1265: 0xB287, + 1266: 0xB288, + 1267: 0xB28A, + 1268: 0xB28B, + 1269: 0xB28C, + 1270: 0xB28D, + 1271: 0xB28E, + 1272: 0xB28F, + 1273: 0xB292, + 1274: 0xB293, + 1275: 0xB295, + 1276: 0xB296, + 1277: 0xB297, + 1278: 0xB29B, + 1279: 0xB29C, + 1280: 0xB29D, + 1281: 0xB29E, + 1282: 0xB29F, + 1283: 0xB2A2, + 1284: 0xB2A4, + 1285: 0xB2A7, + 1286: 0xB2A8, + 1287: 0xB2A9, + 1288: 0xB2AB, + 1289: 0xB2AD, + 1290: 0xB2AE, + 1291: 0xB2AF, + 1292: 0xB2B1, + 1293: 0xB2B2, + 1294: 0xB2B3, + 1295: 0xB2B5, + 1296: 0xB2B6, + 1297: 0xB2B7, + 1298: 0xB2B8, + 1299: 0xB2B9, + 1300: 0xB2BA, + 1301: 0xB2BB, + 1302: 0xB2BC, + 1303: 0xB2BD, + 1304: 0xB2BE, + 1305: 0xB2BF, + 1306: 0xB2C0, + 1307: 0xB2C1, + 1308: 0xB2C2, + 1309: 0xB2C3, + 1310: 0xB2C4, + 1311: 0xB2C5, + 1312: 0xB2C6, + 1313: 0xB2C7, + 1314: 0xB2CA, + 1315: 0xB2CB, + 1316: 0xB2CD, + 1317: 0xB2CE, + 1318: 0xB2CF, + 1319: 0xB2D1, + 1320: 0xB2D3, + 1321: 0xB2D4, + 1322: 0xB2D5, + 1323: 0xB2D6, + 1324: 0xB2D7, + 1325: 0xB2DA, + 1326: 0xB2DC, + 1327: 0xB2DE, + 1328: 0xB2DF, + 1329: 0xB2E0, + 1330: 0xB2E1, + 1331: 0xB2E3, + 1332: 0xB2E7, + 1333: 0xB2E9, + 1334: 0xB2EA, + 1335: 0xB2F0, + 1336: 0xB2F1, + 1337: 0xB2F2, + 1338: 0xB2F6, + 1339: 0xB2FC, + 1340: 0xB2FD, + 1341: 0xB2FE, + 1342: 0xB302, + 1343: 0xB303, + 1344: 0xB305, + 1345: 0xB306, + 1346: 0xB307, + 1347: 0xB309, + 1348: 0xB30A, + 1349: 0xB30B, + 1350: 0xB30C, + 1351: 0xB30D, + 1352: 0xB30E, + 1353: 0xB30F, + 1354: 0xB312, + 1355: 0xB316, + 1356: 0xB317, + 1357: 0xB318, + 1358: 0xB319, + 1359: 0xB31A, + 1360: 0xB31B, + 1361: 0xB31D, + 1362: 0xB31E, + 1363: 0xB31F, + 1364: 0xB320, + 1365: 0xB321, + 1366: 0xB322, + 1367: 0xB323, + 1368: 0xB324, + 1369: 0xB325, + 1370: 0xB326, + 1371: 0xB327, + 1372: 0xB328, + 1373: 0xB329, + 1374: 0xB32A, + 1375: 0xB32B, + 1376: 0xB32C, + 1377: 0xB32D, + 1378: 0xB32E, + 1379: 0xB32F, + 1380: 0xB330, + 1381: 0xB331, + 1382: 0xB332, + 1383: 0xB333, + 1384: 0xB334, + 1385: 0xB335, + 1386: 0xB336, + 1387: 0xB337, + 1388: 0xB338, + 1389: 0xB339, + 1390: 0xB33A, + 1391: 0xB33B, + 1392: 0xB33C, + 1393: 0xB33D, + 1394: 0xB33E, + 1395: 0xB33F, + 1396: 0xB340, + 1397: 0xB341, + 1398: 0xB342, + 1399: 0xB343, + 1400: 0xB344, + 1401: 0xB345, + 1402: 0xB346, + 1403: 0xB347, + 1404: 0xB348, + 1405: 0xB349, + 1406: 0xB34A, + 1407: 0xB34B, + 1408: 0xB34C, + 1409: 0xB34D, + 1410: 0xB34E, + 1411: 0xB34F, + 1412: 0xB350, + 1413: 0xB351, + 1414: 0xB352, + 1415: 0xB353, + 1416: 0xB357, + 1417: 0xB359, + 1418: 0xB35A, + 1419: 0xB35D, + 1420: 0xB360, + 1421: 0xB361, + 1422: 0xB362, + 1423: 0xB363, + 1424: 0xB366, + 1425: 0xB368, + 1426: 0xB36A, + 1427: 0xB36C, + 1428: 0xB36D, + 1429: 0xB36F, + 1430: 0xB372, + 1431: 0xB373, + 1432: 0xB375, + 1433: 0xB376, + 1434: 0xB377, + 1435: 0xB379, + 1436: 0xB37A, + 1437: 0xB37B, + 1438: 0xB37C, + 1439: 0xB37D, + 1440: 0xB37E, + 1441: 0xB37F, + 1442: 0xB382, + 1443: 0xB386, + 1444: 0xB387, + 1445: 0xB388, + 1446: 0xB389, + 1447: 0xB38A, + 1448: 0xB38B, + 1449: 0xB38D, + 1450: 0xB38E, + 1451: 0xB38F, + 1452: 0xB391, + 1453: 0xB392, + 1454: 0xB393, + 1455: 0xB395, + 1456: 0xB396, + 1457: 0xB397, + 1458: 0xB398, + 1459: 0xB399, + 1460: 0xB39A, + 1461: 0xB39B, + 1462: 0xB39C, + 1463: 0xB39D, + 1464: 0xB39E, + 1465: 0xB39F, + 1466: 0xB3A2, + 1467: 0xB3A3, + 1468: 0xB3A4, + 1469: 0xB3A5, + 1470: 0xB3A6, + 1471: 0xB3A7, + 1472: 0xB3A9, + 1473: 0xB3AA, + 1474: 0xB3AB, + 1475: 0xB3AD, + 1476: 0xB3AE, + 1477: 0xB3AF, + 1478: 0xB3B0, + 1479: 0xB3B1, + 1480: 0xB3B2, + 1481: 0xB3B3, + 1482: 0xB3B4, + 1483: 0xB3B5, + 1484: 0xB3B6, + 1485: 0xB3B7, + 1486: 0xB3B8, + 1487: 0xB3B9, + 1488: 0xB3BA, + 1489: 0xB3BB, + 1490: 0xB3BC, + 1491: 0xB3BD, + 1492: 0xB3BE, + 1493: 0xB3BF, + 1494: 0xB3C0, + 1495: 0xB3C1, + 1496: 0xB3C2, + 1497: 0xB3C3, + 1498: 0xB3C6, + 1499: 0xB3C7, + 1500: 0xB3C9, + 1501: 0xB3CA, + 1502: 0xB3CD, + 1503: 0xB3CF, + 1504: 0xB3D1, + 1505: 0xB3D2, + 1506: 0xB3D3, + 1507: 0xB3D6, + 1508: 0xB3D8, + 1509: 0xB3DA, + 1510: 0xB3DC, + 1511: 0xB3DE, + 1512: 0xB3DF, + 1513: 0xB3E1, + 1514: 0xB3E2, + 1515: 0xB3E3, + 1516: 0xB3E5, + 1517: 0xB3E6, + 1518: 0xB3E7, + 1519: 0xB3E9, + 1520: 0xB3EA, + 1521: 0xB3EB, + 1522: 0xB3EC, + 1523: 0xB3ED, + 1524: 0xB3EE, + 1525: 0xB3EF, + 1526: 0xB3F0, + 1527: 0xB3F1, + 1528: 0xB3F2, + 1529: 0xB3F3, + 1530: 0xB3F4, + 1531: 0xB3F5, + 1532: 0xB3F6, + 1533: 0xB3F7, + 1534: 0xB3F8, + 1535: 0xB3F9, + 1536: 0xB3FA, + 1537: 0xB3FB, + 1538: 0xB3FD, + 1539: 0xB3FE, + 1540: 0xB3FF, + 1541: 0xB400, + 1542: 0xB401, + 1543: 0xB402, + 1544: 0xB403, + 1545: 0xB404, + 1546: 0xB405, + 1547: 0xB406, + 1548: 0xB407, + 1549: 0xB408, + 1550: 0xB409, + 1551: 0xB40A, + 1552: 0xB40B, + 1553: 0xB40C, + 1554: 0xB40D, + 1555: 0xB40E, + 1556: 0xB40F, + 1557: 0xB411, + 1558: 0xB412, + 1559: 0xB413, + 1560: 0xB414, + 1561: 0xB415, + 1562: 0xB416, + 1563: 0xB417, + 1564: 0xB419, + 1565: 0xB41A, + 1566: 0xB41B, + 1567: 0xB41D, + 1568: 0xB41E, + 1569: 0xB41F, + 1570: 0xB421, + 1571: 0xB422, + 1572: 0xB423, + 1573: 0xB424, + 1574: 0xB425, + 1575: 0xB426, + 1576: 0xB427, + 1577: 0xB42A, + 1578: 0xB42C, + 1579: 0xB42D, + 1580: 0xB42E, + 1581: 0xB42F, + 1582: 0xB430, + 1583: 0xB431, + 1584: 0xB432, + 1585: 0xB433, + 1586: 0xB435, + 1587: 0xB436, + 1588: 0xB437, + 1589: 0xB438, + 1590: 0xB439, + 1591: 0xB43A, + 1592: 0xB43B, + 1593: 0xB43C, + 1594: 0xB43D, + 1595: 0xB43E, + 1596: 0xB43F, + 1597: 0xB440, + 1598: 0xB441, + 1599: 0xB442, + 1600: 0xB443, + 1601: 0xB444, + 1602: 0xB445, + 1603: 0xB446, + 1604: 0xB447, + 1605: 0xB448, + 1606: 0xB449, + 1607: 0xB44A, + 1608: 0xB44B, + 1609: 0xB44C, + 1610: 0xB44D, + 1611: 0xB44E, + 1612: 0xB44F, + 1613: 0xB452, + 1614: 0xB453, + 1615: 0xB455, + 1616: 0xB456, + 1617: 0xB457, + 1618: 0xB459, + 1619: 0xB45A, + 1620: 0xB45B, + 1621: 0xB45C, + 1622: 0xB45D, + 1623: 0xB45E, + 1624: 0xB45F, + 1625: 0xB462, + 1626: 0xB464, + 1627: 0xB466, + 1628: 0xB467, + 1629: 0xB468, + 1630: 0xB469, + 1631: 0xB46A, + 1632: 0xB46B, + 1633: 0xB46D, + 1634: 0xB46E, + 1635: 0xB46F, + 1636: 0xB470, + 1637: 0xB471, + 1638: 0xB472, + 1639: 0xB473, + 1640: 0xB474, + 1641: 0xB475, + 1642: 0xB476, + 1643: 0xB477, + 1644: 0xB478, + 1645: 0xB479, + 1646: 0xB47A, + 1647: 0xB47B, + 1648: 0xB47C, + 1649: 0xB47D, + 1650: 0xB47E, + 1651: 0xB47F, + 1652: 0xB481, + 1653: 0xB482, + 1654: 0xB483, + 1655: 0xB484, + 1656: 0xB485, + 1657: 0xB486, + 1658: 0xB487, + 1659: 0xB489, + 1660: 0xB48A, + 1661: 0xB48B, + 1662: 0xB48C, + 1663: 0xB48D, + 1664: 0xB48E, + 1665: 0xB48F, + 1666: 0xB490, + 1667: 0xB491, + 1668: 0xB492, + 1669: 0xB493, + 1670: 0xB494, + 1671: 0xB495, + 1672: 0xB496, + 1673: 0xB497, + 1674: 0xB498, + 1675: 0xB499, + 1676: 0xB49A, + 1677: 0xB49B, + 1678: 0xB49C, + 1679: 0xB49E, + 1680: 0xB49F, + 1681: 0xB4A0, + 1682: 0xB4A1, + 1683: 0xB4A2, + 1684: 0xB4A3, + 1685: 0xB4A5, + 1686: 0xB4A6, + 1687: 0xB4A7, + 1688: 0xB4A9, + 1689: 0xB4AA, + 1690: 0xB4AB, + 1691: 0xB4AD, + 1692: 0xB4AE, + 1693: 0xB4AF, + 1694: 0xB4B0, + 1695: 0xB4B1, + 1696: 0xB4B2, + 1697: 0xB4B3, + 1698: 0xB4B4, + 1699: 0xB4B6, + 1700: 0xB4B8, + 1701: 0xB4BA, + 1702: 0xB4BB, + 1703: 0xB4BC, + 1704: 0xB4BD, + 1705: 0xB4BE, + 1706: 0xB4BF, + 1707: 0xB4C1, + 1708: 0xB4C2, + 1709: 0xB4C3, + 1710: 0xB4C5, + 1711: 0xB4C6, + 1712: 0xB4C7, + 1713: 0xB4C9, + 1714: 0xB4CA, + 1715: 0xB4CB, + 1716: 0xB4CC, + 1717: 0xB4CD, + 1718: 0xB4CE, + 1719: 0xB4CF, + 1720: 0xB4D1, + 1721: 0xB4D2, + 1722: 0xB4D3, + 1723: 0xB4D4, + 1724: 0xB4D6, + 1725: 0xB4D7, + 1726: 0xB4D8, + 1727: 0xB4D9, + 1728: 0xB4DA, + 1729: 0xB4DB, + 1730: 0xB4DE, + 1731: 0xB4DF, + 1732: 0xB4E1, + 1733: 0xB4E2, + 1734: 0xB4E5, + 1735: 0xB4E7, + 1736: 0xB4E8, + 1737: 0xB4E9, + 1738: 0xB4EA, + 1739: 0xB4EB, + 1740: 0xB4EE, + 1741: 0xB4F0, + 1742: 0xB4F2, + 1743: 0xB4F3, + 1744: 0xB4F4, + 1745: 0xB4F5, + 1746: 0xB4F6, + 1747: 0xB4F7, + 1748: 0xB4F9, + 1749: 0xB4FA, + 1750: 0xB4FB, + 1751: 0xB4FC, + 1752: 0xB4FD, + 1753: 0xB4FE, + 1754: 0xB4FF, + 1755: 0xB500, + 1756: 0xB501, + 1757: 0xB502, + 1758: 0xB503, + 1759: 0xB504, + 1760: 0xB505, + 1761: 0xB506, + 1762: 0xB507, + 1763: 0xB508, + 1764: 0xB509, + 1765: 0xB50A, + 1766: 0xB50B, + 1767: 0xB50C, + 1768: 0xB50D, + 1769: 0xB50E, + 1770: 0xB50F, + 1771: 0xB510, + 1772: 0xB511, + 1773: 0xB512, + 1774: 0xB513, + 1775: 0xB516, + 1776: 0xB517, + 1777: 0xB519, + 1778: 0xB51A, + 1779: 0xB51D, + 1780: 0xB51E, + 1781: 0xB51F, + 1782: 0xB520, + 1783: 0xB521, + 1784: 0xB522, + 1785: 0xB523, + 1786: 0xB526, + 1787: 0xB52B, + 1788: 0xB52C, + 1789: 0xB52D, + 1790: 0xB52E, + 1791: 0xB52F, + 1792: 0xB532, + 1793: 0xB533, + 1794: 0xB535, + 1795: 0xB536, + 1796: 0xB537, + 1797: 0xB539, + 1798: 0xB53A, + 1799: 0xB53B, + 1800: 0xB53C, + 1801: 0xB53D, + 1802: 0xB53E, + 1803: 0xB53F, + 1804: 0xB542, + 1805: 0xB546, + 1806: 0xB547, + 1807: 0xB548, + 1808: 0xB549, + 1809: 0xB54A, + 1810: 0xB54E, + 1811: 0xB54F, + 1812: 0xB551, + 1813: 0xB552, + 1814: 0xB553, + 1815: 0xB555, + 1816: 0xB556, + 1817: 0xB557, + 1818: 0xB558, + 1819: 0xB559, + 1820: 0xB55A, + 1821: 0xB55B, + 1822: 0xB55E, + 1823: 0xB562, + 1824: 0xB563, + 1825: 0xB564, + 1826: 0xB565, + 1827: 0xB566, + 1828: 0xB567, + 1829: 0xB568, + 1830: 0xB569, + 1831: 0xB56A, + 1832: 0xB56B, + 1833: 0xB56C, + 1834: 0xB56D, + 1835: 0xB56E, + 1836: 0xB56F, + 1837: 0xB570, + 1838: 0xB571, + 1839: 0xB572, + 1840: 0xB573, + 1841: 0xB574, + 1842: 0xB575, + 1843: 0xB576, + 1844: 0xB577, + 1845: 0xB578, + 1846: 0xB579, + 1847: 0xB57A, + 1848: 0xB57B, + 1849: 0xB57C, + 1850: 0xB57D, + 1851: 0xB57E, + 1852: 0xB57F, + 1853: 0xB580, + 1854: 0xB581, + 1855: 0xB582, + 1856: 0xB583, + 1857: 0xB584, + 1858: 0xB585, + 1859: 0xB586, + 1860: 0xB587, + 1861: 0xB588, + 1862: 0xB589, + 1863: 0xB58A, + 1864: 0xB58B, + 1865: 0xB58C, + 1866: 0xB58D, + 1867: 0xB58E, + 1868: 0xB58F, + 1869: 0xB590, + 1870: 0xB591, + 1871: 0xB592, + 1872: 0xB593, + 1873: 0xB594, + 1874: 0xB595, + 1875: 0xB596, + 1876: 0xB597, + 1877: 0xB598, + 1878: 0xB599, + 1879: 0xB59A, + 1880: 0xB59B, + 1881: 0xB59C, + 1882: 0xB59D, + 1883: 0xB59E, + 1884: 0xB59F, + 1885: 0xB5A2, + 1886: 0xB5A3, + 1887: 0xB5A5, + 1888: 0xB5A6, + 1889: 0xB5A7, + 1890: 0xB5A9, + 1891: 0xB5AC, + 1892: 0xB5AD, + 1893: 0xB5AE, + 1894: 0xB5AF, + 1895: 0xB5B2, + 1896: 0xB5B6, + 1897: 0xB5B7, + 1898: 0xB5B8, + 1899: 0xB5B9, + 1900: 0xB5BA, + 1901: 0xB5BE, + 1902: 0xB5BF, + 1903: 0xB5C1, + 1904: 0xB5C2, + 1905: 0xB5C3, + 1906: 0xB5C5, + 1907: 0xB5C6, + 1908: 0xB5C7, + 1909: 0xB5C8, + 1910: 0xB5C9, + 1911: 0xB5CA, + 1912: 0xB5CB, + 1913: 0xB5CE, + 1914: 0xB5D2, + 1915: 0xB5D3, + 1916: 0xB5D4, + 1917: 0xB5D5, + 1918: 0xB5D6, + 1919: 0xB5D7, + 1920: 0xB5D9, + 1921: 0xB5DA, + 1922: 0xB5DB, + 1923: 0xB5DC, + 1924: 0xB5DD, + 1925: 0xB5DE, + 1926: 0xB5DF, + 1927: 0xB5E0, + 1928: 0xB5E1, + 1929: 0xB5E2, + 1930: 0xB5E3, + 1931: 0xB5E4, + 1932: 0xB5E5, + 1933: 0xB5E6, + 1934: 0xB5E7, + 1935: 0xB5E8, + 1936: 0xB5E9, + 1937: 0xB5EA, + 1938: 0xB5EB, + 1939: 0xB5ED, + 1940: 0xB5EE, + 1941: 0xB5EF, + 1942: 0xB5F0, + 1943: 0xB5F1, + 1944: 0xB5F2, + 1945: 0xB5F3, + 1946: 0xB5F4, + 1947: 0xB5F5, + 1948: 0xB5F6, + 1949: 0xB5F7, + 1950: 0xB5F8, + 1951: 0xB5F9, + 1952: 0xB5FA, + 1953: 0xB5FB, + 1954: 0xB5FC, + 1955: 0xB5FD, + 1956: 0xB5FE, + 1957: 0xB5FF, + 1958: 0xB600, + 1959: 0xB601, + 1960: 0xB602, + 1961: 0xB603, + 1962: 0xB604, + 1963: 0xB605, + 1964: 0xB606, + 1965: 0xB607, + 1966: 0xB608, + 1967: 0xB609, + 1968: 0xB60A, + 1969: 0xB60B, + 1970: 0xB60C, + 1971: 0xB60D, + 1972: 0xB60E, + 1973: 0xB60F, + 1974: 0xB612, + 1975: 0xB613, + 1976: 0xB615, + 1977: 0xB616, + 1978: 0xB617, + 1979: 0xB619, + 1980: 0xB61A, + 1981: 0xB61B, + 1982: 0xB61C, + 1983: 0xB61D, + 1984: 0xB61E, + 1985: 0xB61F, + 1986: 0xB620, + 1987: 0xB621, + 1988: 0xB622, + 1989: 0xB623, + 1990: 0xB624, + 1991: 0xB626, + 1992: 0xB627, + 1993: 0xB628, + 1994: 0xB629, + 1995: 0xB62A, + 1996: 0xB62B, + 1997: 0xB62D, + 1998: 0xB62E, + 1999: 0xB62F, + 2000: 0xB630, + 2001: 0xB631, + 2002: 0xB632, + 2003: 0xB633, + 2004: 0xB635, + 2005: 0xB636, + 2006: 0xB637, + 2007: 0xB638, + 2008: 0xB639, + 2009: 0xB63A, + 2010: 0xB63B, + 2011: 0xB63C, + 2012: 0xB63D, + 2013: 0xB63E, + 2014: 0xB63F, + 2015: 0xB640, + 2016: 0xB641, + 2017: 0xB642, + 2018: 0xB643, + 2019: 0xB644, + 2020: 0xB645, + 2021: 0xB646, + 2022: 0xB647, + 2023: 0xB649, + 2024: 0xB64A, + 2025: 0xB64B, + 2026: 0xB64C, + 2027: 0xB64D, + 2028: 0xB64E, + 2029: 0xB64F, + 2030: 0xB650, + 2031: 0xB651, + 2032: 0xB652, + 2033: 0xB653, + 2034: 0xB654, + 2035: 0xB655, + 2036: 0xB656, + 2037: 0xB657, + 2038: 0xB658, + 2039: 0xB659, + 2040: 0xB65A, + 2041: 0xB65B, + 2042: 0xB65C, + 2043: 0xB65D, + 2044: 0xB65E, + 2045: 0xB65F, + 2046: 0xB660, + 2047: 0xB661, + 2048: 0xB662, + 2049: 0xB663, + 2050: 0xB665, + 2051: 0xB666, + 2052: 0xB667, + 2053: 0xB669, + 2054: 0xB66A, + 2055: 0xB66B, + 2056: 0xB66C, + 2057: 0xB66D, + 2058: 0xB66E, + 2059: 0xB66F, + 2060: 0xB670, + 2061: 0xB671, + 2062: 0xB672, + 2063: 0xB673, + 2064: 0xB674, + 2065: 0xB675, + 2066: 0xB676, + 2067: 0xB677, + 2068: 0xB678, + 2069: 0xB679, + 2070: 0xB67A, + 2071: 0xB67B, + 2072: 0xB67C, + 2073: 0xB67D, + 2074: 0xB67E, + 2075: 0xB67F, + 2076: 0xB680, + 2077: 0xB681, + 2078: 0xB682, + 2079: 0xB683, + 2080: 0xB684, + 2081: 0xB685, + 2082: 0xB686, + 2083: 0xB687, + 2084: 0xB688, + 2085: 0xB689, + 2086: 0xB68A, + 2087: 0xB68B, + 2088: 0xB68C, + 2089: 0xB68D, + 2090: 0xB68E, + 2091: 0xB68F, + 2092: 0xB690, + 2093: 0xB691, + 2094: 0xB692, + 2095: 0xB693, + 2096: 0xB694, + 2097: 0xB695, + 2098: 0xB696, + 2099: 0xB697, + 2100: 0xB698, + 2101: 0xB699, + 2102: 0xB69A, + 2103: 0xB69B, + 2104: 0xB69E, + 2105: 0xB69F, + 2106: 0xB6A1, + 2107: 0xB6A2, + 2108: 0xB6A3, + 2109: 0xB6A5, + 2110: 0xB6A6, + 2111: 0xB6A7, + 2112: 0xB6A8, + 2113: 0xB6A9, + 2114: 0xB6AA, + 2115: 0xB6AD, + 2116: 0xB6AE, + 2117: 0xB6AF, + 2118: 0xB6B0, + 2119: 0xB6B2, + 2120: 0xB6B3, + 2121: 0xB6B4, + 2122: 0xB6B5, + 2123: 0xB6B6, + 2124: 0xB6B7, + 2125: 0xB6B8, + 2126: 0xB6B9, + 2127: 0xB6BA, + 2128: 0xB6BB, + 2129: 0xB6BC, + 2130: 0xB6BD, + 2131: 0xB6BE, + 2132: 0xB6BF, + 2133: 0xB6C0, + 2134: 0xB6C1, + 2135: 0xB6C2, + 2136: 0xB6C3, + 2137: 0xB6C4, + 2138: 0xB6C5, + 2139: 0xB6C6, + 2140: 0xB6C7, + 2141: 0xB6C8, + 2142: 0xB6C9, + 2143: 0xB6CA, + 2144: 0xB6CB, + 2145: 0xB6CC, + 2146: 0xB6CD, + 2147: 0xB6CE, + 2148: 0xB6CF, + 2149: 0xB6D0, + 2150: 0xB6D1, + 2151: 0xB6D2, + 2152: 0xB6D3, + 2153: 0xB6D5, + 2154: 0xB6D6, + 2155: 0xB6D7, + 2156: 0xB6D8, + 2157: 0xB6D9, + 2158: 0xB6DA, + 2159: 0xB6DB, + 2160: 0xB6DC, + 2161: 0xB6DD, + 2162: 0xB6DE, + 2163: 0xB6DF, + 2164: 0xB6E0, + 2165: 0xB6E1, + 2166: 0xB6E2, + 2167: 0xB6E3, + 2168: 0xB6E4, + 2169: 0xB6E5, + 2170: 0xB6E6, + 2171: 0xB6E7, + 2172: 0xB6E8, + 2173: 0xB6E9, + 2174: 0xB6EA, + 2175: 0xB6EB, + 2176: 0xB6EC, + 2177: 0xB6ED, + 2178: 0xB6EE, + 2179: 0xB6EF, + 2180: 0xB6F1, + 2181: 0xB6F2, + 2182: 0xB6F3, + 2183: 0xB6F5, + 2184: 0xB6F6, + 2185: 0xB6F7, + 2186: 0xB6F9, + 2187: 0xB6FA, + 2188: 0xB6FB, + 2189: 0xB6FC, + 2190: 0xB6FD, + 2191: 0xB6FE, + 2192: 0xB6FF, + 2193: 0xB702, + 2194: 0xB703, + 2195: 0xB704, + 2196: 0xB706, + 2197: 0xB707, + 2198: 0xB708, + 2199: 0xB709, + 2200: 0xB70A, + 2201: 0xB70B, + 2202: 0xB70C, + 2203: 0xB70D, + 2204: 0xB70E, + 2205: 0xB70F, + 2206: 0xB710, + 2207: 0xB711, + 2208: 0xB712, + 2209: 0xB713, + 2210: 0xB714, + 2211: 0xB715, + 2212: 0xB716, + 2213: 0xB717, + 2214: 0xB718, + 2215: 0xB719, + 2216: 0xB71A, + 2217: 0xB71B, + 2218: 0xB71C, + 2219: 0xB71D, + 2220: 0xB71E, + 2221: 0xB71F, + 2222: 0xB720, + 2223: 0xB721, + 2224: 0xB722, + 2225: 0xB723, + 2226: 0xB724, + 2227: 0xB725, + 2228: 0xB726, + 2229: 0xB727, + 2230: 0xB72A, + 2231: 0xB72B, + 2232: 0xB72D, + 2233: 0xB72E, + 2234: 0xB731, + 2235: 0xB732, + 2236: 0xB733, + 2237: 0xB734, + 2238: 0xB735, + 2239: 0xB736, + 2240: 0xB737, + 2241: 0xB73A, + 2242: 0xB73C, + 2243: 0xB73D, + 2244: 0xB73E, + 2245: 0xB73F, + 2246: 0xB740, + 2247: 0xB741, + 2248: 0xB742, + 2249: 0xB743, + 2250: 0xB745, + 2251: 0xB746, + 2252: 0xB747, + 2253: 0xB749, + 2254: 0xB74A, + 2255: 0xB74B, + 2256: 0xB74D, + 2257: 0xB74E, + 2258: 0xB74F, + 2259: 0xB750, + 2260: 0xB751, + 2261: 0xB752, + 2262: 0xB753, + 2263: 0xB756, + 2264: 0xB757, + 2265: 0xB758, + 2266: 0xB759, + 2267: 0xB75A, + 2268: 0xB75B, + 2269: 0xB75C, + 2270: 0xB75D, + 2271: 0xB75E, + 2272: 0xB75F, + 2273: 0xB761, + 2274: 0xB762, + 2275: 0xB763, + 2276: 0xB765, + 2277: 0xB766, + 2278: 0xB767, + 2279: 0xB769, + 2280: 0xB76A, + 2281: 0xB76B, + 2282: 0xB76C, + 2283: 0xB76D, + 2284: 0xB76E, + 2285: 0xB76F, + 2286: 0xB772, + 2287: 0xB774, + 2288: 0xB776, + 2289: 0xB777, + 2290: 0xB778, + 2291: 0xB779, + 2292: 0xB77A, + 2293: 0xB77B, + 2294: 0xB77E, + 2295: 0xB77F, + 2296: 0xB781, + 2297: 0xB782, + 2298: 0xB783, + 2299: 0xB785, + 2300: 0xB786, + 2301: 0xB787, + 2302: 0xB788, + 2303: 0xB789, + 2304: 0xB78A, + 2305: 0xB78B, + 2306: 0xB78E, + 2307: 0xB793, + 2308: 0xB794, + 2309: 0xB795, + 2310: 0xB79A, + 2311: 0xB79B, + 2312: 0xB79D, + 2313: 0xB79E, + 2314: 0xB79F, + 2315: 0xB7A1, + 2316: 0xB7A2, + 2317: 0xB7A3, + 2318: 0xB7A4, + 2319: 0xB7A5, + 2320: 0xB7A6, + 2321: 0xB7A7, + 2322: 0xB7AA, + 2323: 0xB7AE, + 2324: 0xB7AF, + 2325: 0xB7B0, + 2326: 0xB7B1, + 2327: 0xB7B2, + 2328: 0xB7B3, + 2329: 0xB7B6, + 2330: 0xB7B7, + 2331: 0xB7B9, + 2332: 0xB7BA, + 2333: 0xB7BB, + 2334: 0xB7BC, + 2335: 0xB7BD, + 2336: 0xB7BE, + 2337: 0xB7BF, + 2338: 0xB7C0, + 2339: 0xB7C1, + 2340: 0xB7C2, + 2341: 0xB7C3, + 2342: 0xB7C4, + 2343: 0xB7C5, + 2344: 0xB7C6, + 2345: 0xB7C8, + 2346: 0xB7CA, + 2347: 0xB7CB, + 2348: 0xB7CC, + 2349: 0xB7CD, + 2350: 0xB7CE, + 2351: 0xB7CF, + 2352: 0xB7D0, + 2353: 0xB7D1, + 2354: 0xB7D2, + 2355: 0xB7D3, + 2356: 0xB7D4, + 2357: 0xB7D5, + 2358: 0xB7D6, + 2359: 0xB7D7, + 2360: 0xB7D8, + 2361: 0xB7D9, + 2362: 0xB7DA, + 2363: 0xB7DB, + 2364: 0xB7DC, + 2365: 0xB7DD, + 2366: 0xB7DE, + 2367: 0xB7DF, + 2368: 0xB7E0, + 2369: 0xB7E1, + 2370: 0xB7E2, + 2371: 0xB7E3, + 2372: 0xB7E4, + 2373: 0xB7E5, + 2374: 0xB7E6, + 2375: 0xB7E7, + 2376: 0xB7E8, + 2377: 0xB7E9, + 2378: 0xB7EA, + 2379: 0xB7EB, + 2380: 0xB7EE, + 2381: 0xB7EF, + 2382: 0xB7F1, + 2383: 0xB7F2, + 2384: 0xB7F3, + 2385: 0xB7F5, + 2386: 0xB7F6, + 2387: 0xB7F7, + 2388: 0xB7F8, + 2389: 0xB7F9, + 2390: 0xB7FA, + 2391: 0xB7FB, + 2392: 0xB7FE, + 2393: 0xB802, + 2394: 0xB803, + 2395: 0xB804, + 2396: 0xB805, + 2397: 0xB806, + 2398: 0xB80A, + 2399: 0xB80B, + 2400: 0xB80D, + 2401: 0xB80E, + 2402: 0xB80F, + 2403: 0xB811, + 2404: 0xB812, + 2405: 0xB813, + 2406: 0xB814, + 2407: 0xB815, + 2408: 0xB816, + 2409: 0xB817, + 2410: 0xB81A, + 2411: 0xB81C, + 2412: 0xB81E, + 2413: 0xB81F, + 2414: 0xB820, + 2415: 0xB821, + 2416: 0xB822, + 2417: 0xB823, + 2418: 0xB826, + 2419: 0xB827, + 2420: 0xB829, + 2421: 0xB82A, + 2422: 0xB82B, + 2423: 0xB82D, + 2424: 0xB82E, + 2425: 0xB82F, + 2426: 0xB830, + 2427: 0xB831, + 2428: 0xB832, + 2429: 0xB833, + 2430: 0xB836, + 2431: 0xB83A, + 2432: 0xB83B, + 2433: 0xB83C, + 2434: 0xB83D, + 2435: 0xB83E, + 2436: 0xB83F, + 2437: 0xB841, + 2438: 0xB842, + 2439: 0xB843, + 2440: 0xB845, + 2441: 0xB846, + 2442: 0xB847, + 2443: 0xB848, + 2444: 0xB849, + 2445: 0xB84A, + 2446: 0xB84B, + 2447: 0xB84C, + 2448: 0xB84D, + 2449: 0xB84E, + 2450: 0xB84F, + 2451: 0xB850, + 2452: 0xB852, + 2453: 0xB854, + 2454: 0xB855, + 2455: 0xB856, + 2456: 0xB857, + 2457: 0xB858, + 2458: 0xB859, + 2459: 0xB85A, + 2460: 0xB85B, + 2461: 0xB85E, + 2462: 0xB85F, + 2463: 0xB861, + 2464: 0xB862, + 2465: 0xB863, + 2466: 0xB865, + 2467: 0xB866, + 2468: 0xB867, + 2469: 0xB868, + 2470: 0xB869, + 2471: 0xB86A, + 2472: 0xB86B, + 2473: 0xB86E, + 2474: 0xB870, + 2475: 0xB872, + 2476: 0xB873, + 2477: 0xB874, + 2478: 0xB875, + 2479: 0xB876, + 2480: 0xB877, + 2481: 0xB879, + 2482: 0xB87A, + 2483: 0xB87B, + 2484: 0xB87D, + 2485: 0xB87E, + 2486: 0xB87F, + 2487: 0xB880, + 2488: 0xB881, + 2489: 0xB882, + 2490: 0xB883, + 2491: 0xB884, + 2492: 0xB885, + 2493: 0xB886, + 2494: 0xB887, + 2495: 0xB888, + 2496: 0xB889, + 2497: 0xB88A, + 2498: 0xB88B, + 2499: 0xB88C, + 2500: 0xB88E, + 2501: 0xB88F, + 2502: 0xB890, + 2503: 0xB891, + 2504: 0xB892, + 2505: 0xB893, + 2506: 0xB894, + 2507: 0xB895, + 2508: 0xB896, + 2509: 0xB897, + 2510: 0xB898, + 2511: 0xB899, + 2512: 0xB89A, + 2513: 0xB89B, + 2514: 0xB89C, + 2515: 0xB89D, + 2516: 0xB89E, + 2517: 0xB89F, + 2518: 0xB8A0, + 2519: 0xB8A1, + 2520: 0xB8A2, + 2521: 0xB8A3, + 2522: 0xB8A4, + 2523: 0xB8A5, + 2524: 0xB8A6, + 2525: 0xB8A7, + 2526: 0xB8A9, + 2527: 0xB8AA, + 2528: 0xB8AB, + 2529: 0xB8AC, + 2530: 0xB8AD, + 2531: 0xB8AE, + 2532: 0xB8AF, + 2533: 0xB8B1, + 2534: 0xB8B2, + 2535: 0xB8B3, + 2536: 0xB8B5, + 2537: 0xB8B6, + 2538: 0xB8B7, + 2539: 0xB8B9, + 2540: 0xB8BA, + 2541: 0xB8BB, + 2542: 0xB8BC, + 2543: 0xB8BD, + 2544: 0xB8BE, + 2545: 0xB8BF, + 2546: 0xB8C2, + 2547: 0xB8C4, + 2548: 0xB8C6, + 2549: 0xB8C7, + 2550: 0xB8C8, + 2551: 0xB8C9, + 2552: 0xB8CA, + 2553: 0xB8CB, + 2554: 0xB8CD, + 2555: 0xB8CE, + 2556: 0xB8CF, + 2557: 0xB8D1, + 2558: 0xB8D2, + 2559: 0xB8D3, + 2560: 0xB8D5, + 2561: 0xB8D6, + 2562: 0xB8D7, + 2563: 0xB8D8, + 2564: 0xB8D9, + 2565: 0xB8DA, + 2566: 0xB8DB, + 2567: 0xB8DC, + 2568: 0xB8DE, + 2569: 0xB8E0, + 2570: 0xB8E2, + 2571: 0xB8E3, + 2572: 0xB8E4, + 2573: 0xB8E5, + 2574: 0xB8E6, + 2575: 0xB8E7, + 2576: 0xB8EA, + 2577: 0xB8EB, + 2578: 0xB8ED, + 2579: 0xB8EE, + 2580: 0xB8EF, + 2581: 0xB8F1, + 2582: 0xB8F2, + 2583: 0xB8F3, + 2584: 0xB8F4, + 2585: 0xB8F5, + 2586: 0xB8F6, + 2587: 0xB8F7, + 2588: 0xB8FA, + 2589: 0xB8FC, + 2590: 0xB8FE, + 2591: 0xB8FF, + 2592: 0xB900, + 2593: 0xB901, + 2594: 0xB902, + 2595: 0xB903, + 2596: 0xB905, + 2597: 0xB906, + 2598: 0xB907, + 2599: 0xB908, + 2600: 0xB909, + 2601: 0xB90A, + 2602: 0xB90B, + 2603: 0xB90C, + 2604: 0xB90D, + 2605: 0xB90E, + 2606: 0xB90F, + 2607: 0xB910, + 2608: 0xB911, + 2609: 0xB912, + 2610: 0xB913, + 2611: 0xB914, + 2612: 0xB915, + 2613: 0xB916, + 2614: 0xB917, + 2615: 0xB919, + 2616: 0xB91A, + 2617: 0xB91B, + 2618: 0xB91C, + 2619: 0xB91D, + 2620: 0xB91E, + 2621: 0xB91F, + 2622: 0xB921, + 2623: 0xB922, + 2624: 0xB923, + 2625: 0xB924, + 2626: 0xB925, + 2627: 0xB926, + 2628: 0xB927, + 2629: 0xB928, + 2630: 0xB929, + 2631: 0xB92A, + 2632: 0xB92B, + 2633: 0xB92C, + 2634: 0xB92D, + 2635: 0xB92E, + 2636: 0xB92F, + 2637: 0xB930, + 2638: 0xB931, + 2639: 0xB932, + 2640: 0xB933, + 2641: 0xB934, + 2642: 0xB935, + 2643: 0xB936, + 2644: 0xB937, + 2645: 0xB938, + 2646: 0xB939, + 2647: 0xB93A, + 2648: 0xB93B, + 2649: 0xB93E, + 2650: 0xB93F, + 2651: 0xB941, + 2652: 0xB942, + 2653: 0xB943, + 2654: 0xB945, + 2655: 0xB946, + 2656: 0xB947, + 2657: 0xB948, + 2658: 0xB949, + 2659: 0xB94A, + 2660: 0xB94B, + 2661: 0xB94D, + 2662: 0xB94E, + 2663: 0xB950, + 2664: 0xB952, + 2665: 0xB953, + 2666: 0xB954, + 2667: 0xB955, + 2668: 0xB956, + 2669: 0xB957, + 2670: 0xB95A, + 2671: 0xB95B, + 2672: 0xB95D, + 2673: 0xB95E, + 2674: 0xB95F, + 2675: 0xB961, + 2676: 0xB962, + 2677: 0xB963, + 2678: 0xB964, + 2679: 0xB965, + 2680: 0xB966, + 2681: 0xB967, + 2682: 0xB96A, + 2683: 0xB96C, + 2684: 0xB96E, + 2685: 0xB96F, + 2686: 0xB970, + 2687: 0xB971, + 2688: 0xB972, + 2689: 0xB973, + 2690: 0xB976, + 2691: 0xB977, + 2692: 0xB979, + 2693: 0xB97A, + 2694: 0xB97B, + 2695: 0xB97D, + 2696: 0xB97E, + 2697: 0xB97F, + 2698: 0xB980, + 2699: 0xB981, + 2700: 0xB982, + 2701: 0xB983, + 2702: 0xB986, + 2703: 0xB988, + 2704: 0xB98B, + 2705: 0xB98C, + 2706: 0xB98F, + 2707: 0xB990, + 2708: 0xB991, + 2709: 0xB992, + 2710: 0xB993, + 2711: 0xB994, + 2712: 0xB995, + 2713: 0xB996, + 2714: 0xB997, + 2715: 0xB998, + 2716: 0xB999, + 2717: 0xB99A, + 2718: 0xB99B, + 2719: 0xB99C, + 2720: 0xB99D, + 2721: 0xB99E, + 2722: 0xB99F, + 2723: 0xB9A0, + 2724: 0xB9A1, + 2725: 0xB9A2, + 2726: 0xB9A3, + 2727: 0xB9A4, + 2728: 0xB9A5, + 2729: 0xB9A6, + 2730: 0xB9A7, + 2731: 0xB9A8, + 2732: 0xB9A9, + 2733: 0xB9AA, + 2734: 0xB9AB, + 2735: 0xB9AE, + 2736: 0xB9AF, + 2737: 0xB9B1, + 2738: 0xB9B2, + 2739: 0xB9B3, + 2740: 0xB9B5, + 2741: 0xB9B6, + 2742: 0xB9B7, + 2743: 0xB9B8, + 2744: 0xB9B9, + 2745: 0xB9BA, + 2746: 0xB9BB, + 2747: 0xB9BE, + 2748: 0xB9C0, + 2749: 0xB9C2, + 2750: 0xB9C3, + 2751: 0xB9C4, + 2752: 0xB9C5, + 2753: 0xB9C6, + 2754: 0xB9C7, + 2755: 0xB9CA, + 2756: 0xB9CB, + 2757: 0xB9CD, + 2758: 0xB9D3, + 2759: 0xB9D4, + 2760: 0xB9D5, + 2761: 0xB9D6, + 2762: 0xB9D7, + 2763: 0xB9DA, + 2764: 0xB9DC, + 2765: 0xB9DF, + 2766: 0xB9E0, + 2767: 0xB9E2, + 2768: 0xB9E6, + 2769: 0xB9E7, + 2770: 0xB9E9, + 2771: 0xB9EA, + 2772: 0xB9EB, + 2773: 0xB9ED, + 2774: 0xB9EE, + 2775: 0xB9EF, + 2776: 0xB9F0, + 2777: 0xB9F1, + 2778: 0xB9F2, + 2779: 0xB9F3, + 2780: 0xB9F6, + 2781: 0xB9FB, + 2782: 0xB9FC, + 2783: 0xB9FD, + 2784: 0xB9FE, + 2785: 0xB9FF, + 2786: 0xBA02, + 2787: 0xBA03, + 2788: 0xBA04, + 2789: 0xBA05, + 2790: 0xBA06, + 2791: 0xBA07, + 2792: 0xBA09, + 2793: 0xBA0A, + 2794: 0xBA0B, + 2795: 0xBA0C, + 2796: 0xBA0D, + 2797: 0xBA0E, + 2798: 0xBA0F, + 2799: 0xBA10, + 2800: 0xBA11, + 2801: 0xBA12, + 2802: 0xBA13, + 2803: 0xBA14, + 2804: 0xBA16, + 2805: 0xBA17, + 2806: 0xBA18, + 2807: 0xBA19, + 2808: 0xBA1A, + 2809: 0xBA1B, + 2810: 0xBA1C, + 2811: 0xBA1D, + 2812: 0xBA1E, + 2813: 0xBA1F, + 2814: 0xBA20, + 2815: 0xBA21, + 2816: 0xBA22, + 2817: 0xBA23, + 2818: 0xBA24, + 2819: 0xBA25, + 2820: 0xBA26, + 2821: 0xBA27, + 2822: 0xBA28, + 2823: 0xBA29, + 2824: 0xBA2A, + 2825: 0xBA2B, + 2826: 0xBA2C, + 2827: 0xBA2D, + 2828: 0xBA2E, + 2829: 0xBA2F, + 2830: 0xBA30, + 2831: 0xBA31, + 2832: 0xBA32, + 2833: 0xBA33, + 2834: 0xBA34, + 2835: 0xBA35, + 2836: 0xBA36, + 2837: 0xBA37, + 2838: 0xBA3A, + 2839: 0xBA3B, + 2840: 0xBA3D, + 2841: 0xBA3E, + 2842: 0xBA3F, + 2843: 0xBA41, + 2844: 0xBA43, + 2845: 0xBA44, + 2846: 0xBA45, + 2847: 0xBA46, + 2848: 0xBA47, + 2849: 0xBA4A, + 2850: 0xBA4C, + 2851: 0xBA4F, + 2852: 0xBA50, + 2853: 0xBA51, + 2854: 0xBA52, + 2855: 0xBA56, + 2856: 0xBA57, + 2857: 0xBA59, + 2858: 0xBA5A, + 2859: 0xBA5B, + 2860: 0xBA5D, + 2861: 0xBA5E, + 2862: 0xBA5F, + 2863: 0xBA60, + 2864: 0xBA61, + 2865: 0xBA62, + 2866: 0xBA63, + 2867: 0xBA66, + 2868: 0xBA6A, + 2869: 0xBA6B, + 2870: 0xBA6C, + 2871: 0xBA6D, + 2872: 0xBA6E, + 2873: 0xBA6F, + 2874: 0xBA72, + 2875: 0xBA73, + 2876: 0xBA75, + 2877: 0xBA76, + 2878: 0xBA77, + 2879: 0xBA79, + 2880: 0xBA7A, + 2881: 0xBA7B, + 2882: 0xBA7C, + 2883: 0xBA7D, + 2884: 0xBA7E, + 2885: 0xBA7F, + 2886: 0xBA80, + 2887: 0xBA81, + 2888: 0xBA82, + 2889: 0xBA86, + 2890: 0xBA88, + 2891: 0xBA89, + 2892: 0xBA8A, + 2893: 0xBA8B, + 2894: 0xBA8D, + 2895: 0xBA8E, + 2896: 0xBA8F, + 2897: 0xBA90, + 2898: 0xBA91, + 2899: 0xBA92, + 2900: 0xBA93, + 2901: 0xBA94, + 2902: 0xBA95, + 2903: 0xBA96, + 2904: 0xBA97, + 2905: 0xBA98, + 2906: 0xBA99, + 2907: 0xBA9A, + 2908: 0xBA9B, + 2909: 0xBA9C, + 2910: 0xBA9D, + 2911: 0xBA9E, + 2912: 0xBA9F, + 2913: 0xBAA0, + 2914: 0xBAA1, + 2915: 0xBAA2, + 2916: 0xBAA3, + 2917: 0xBAA4, + 2918: 0xBAA5, + 2919: 0xBAA6, + 2920: 0xBAA7, + 2921: 0xBAAA, + 2922: 0xBAAD, + 2923: 0xBAAE, + 2924: 0xBAAF, + 2925: 0xBAB1, + 2926: 0xBAB3, + 2927: 0xBAB4, + 2928: 0xBAB5, + 2929: 0xBAB6, + 2930: 0xBAB7, + 2931: 0xBABA, + 2932: 0xBABC, + 2933: 0xBABE, + 2934: 0xBABF, + 2935: 0xBAC0, + 2936: 0xBAC1, + 2937: 0xBAC2, + 2938: 0xBAC3, + 2939: 0xBAC5, + 2940: 0xBAC6, + 2941: 0xBAC7, + 2942: 0xBAC9, + 2943: 0xBACA, + 2944: 0xBACB, + 2945: 0xBACC, + 2946: 0xBACD, + 2947: 0xBACE, + 2948: 0xBACF, + 2949: 0xBAD0, + 2950: 0xBAD1, + 2951: 0xBAD2, + 2952: 0xBAD3, + 2953: 0xBAD4, + 2954: 0xBAD5, + 2955: 0xBAD6, + 2956: 0xBAD7, + 2957: 0xBADA, + 2958: 0xBADB, + 2959: 0xBADC, + 2960: 0xBADD, + 2961: 0xBADE, + 2962: 0xBADF, + 2963: 0xBAE0, + 2964: 0xBAE1, + 2965: 0xBAE2, + 2966: 0xBAE3, + 2967: 0xBAE4, + 2968: 0xBAE5, + 2969: 0xBAE6, + 2970: 0xBAE7, + 2971: 0xBAE8, + 2972: 0xBAE9, + 2973: 0xBAEA, + 2974: 0xBAEB, + 2975: 0xBAEC, + 2976: 0xBAED, + 2977: 0xBAEE, + 2978: 0xBAEF, + 2979: 0xBAF0, + 2980: 0xBAF1, + 2981: 0xBAF2, + 2982: 0xBAF3, + 2983: 0xBAF4, + 2984: 0xBAF5, + 2985: 0xBAF6, + 2986: 0xBAF7, + 2987: 0xBAF8, + 2988: 0xBAF9, + 2989: 0xBAFA, + 2990: 0xBAFB, + 2991: 0xBAFD, + 2992: 0xBAFE, + 2993: 0xBAFF, + 2994: 0xBB01, + 2995: 0xBB02, + 2996: 0xBB03, + 2997: 0xBB05, + 2998: 0xBB06, + 2999: 0xBB07, + 3000: 0xBB08, + 3001: 0xBB09, + 3002: 0xBB0A, + 3003: 0xBB0B, + 3004: 0xBB0C, + 3005: 0xBB0E, + 3006: 0xBB10, + 3007: 0xBB12, + 3008: 0xBB13, + 3009: 0xBB14, + 3010: 0xBB15, + 3011: 0xBB16, + 3012: 0xBB17, + 3013: 0xBB19, + 3014: 0xBB1A, + 3015: 0xBB1B, + 3016: 0xBB1D, + 3017: 0xBB1E, + 3018: 0xBB1F, + 3019: 0xBB21, + 3020: 0xBB22, + 3021: 0xBB23, + 3022: 0xBB24, + 3023: 0xBB25, + 3024: 0xBB26, + 3025: 0xBB27, + 3026: 0xBB28, + 3027: 0xBB2A, + 3028: 0xBB2C, + 3029: 0xBB2D, + 3030: 0xBB2E, + 3031: 0xBB2F, + 3032: 0xBB30, + 3033: 0xBB31, + 3034: 0xBB32, + 3035: 0xBB33, + 3036: 0xBB37, + 3037: 0xBB39, + 3038: 0xBB3A, + 3039: 0xBB3F, + 3040: 0xBB40, + 3041: 0xBB41, + 3042: 0xBB42, + 3043: 0xBB43, + 3044: 0xBB46, + 3045: 0xBB48, + 3046: 0xBB4A, + 3047: 0xBB4B, + 3048: 0xBB4C, + 3049: 0xBB4E, + 3050: 0xBB51, + 3051: 0xBB52, + 3052: 0xBB53, + 3053: 0xBB55, + 3054: 0xBB56, + 3055: 0xBB57, + 3056: 0xBB59, + 3057: 0xBB5A, + 3058: 0xBB5B, + 3059: 0xBB5C, + 3060: 0xBB5D, + 3061: 0xBB5E, + 3062: 0xBB5F, + 3063: 0xBB60, + 3064: 0xBB62, + 3065: 0xBB64, + 3066: 0xBB65, + 3067: 0xBB66, + 3068: 0xBB67, + 3069: 0xBB68, + 3070: 0xBB69, + 3071: 0xBB6A, + 3072: 0xBB6B, + 3073: 0xBB6D, + 3074: 0xBB6E, + 3075: 0xBB6F, + 3076: 0xBB70, + 3077: 0xBB71, + 3078: 0xBB72, + 3079: 0xBB73, + 3080: 0xBB74, + 3081: 0xBB75, + 3082: 0xBB76, + 3083: 0xBB77, + 3084: 0xBB78, + 3085: 0xBB79, + 3086: 0xBB7A, + 3087: 0xBB7B, + 3088: 0xBB7C, + 3089: 0xBB7D, + 3090: 0xBB7E, + 3091: 0xBB7F, + 3092: 0xBB80, + 3093: 0xBB81, + 3094: 0xBB82, + 3095: 0xBB83, + 3096: 0xBB84, + 3097: 0xBB85, + 3098: 0xBB86, + 3099: 0xBB87, + 3100: 0xBB89, + 3101: 0xBB8A, + 3102: 0xBB8B, + 3103: 0xBB8D, + 3104: 0xBB8E, + 3105: 0xBB8F, + 3106: 0xBB91, + 3107: 0xBB92, + 3108: 0xBB93, + 3109: 0xBB94, + 3110: 0xBB95, + 3111: 0xBB96, + 3112: 0xBB97, + 3113: 0xBB98, + 3114: 0xBB99, + 3115: 0xBB9A, + 3116: 0xBB9B, + 3117: 0xBB9C, + 3118: 0xBB9D, + 3119: 0xBB9E, + 3120: 0xBB9F, + 3121: 0xBBA0, + 3122: 0xBBA1, + 3123: 0xBBA2, + 3124: 0xBBA3, + 3125: 0xBBA5, + 3126: 0xBBA6, + 3127: 0xBBA7, + 3128: 0xBBA9, + 3129: 0xBBAA, + 3130: 0xBBAB, + 3131: 0xBBAD, + 3132: 0xBBAE, + 3133: 0xBBAF, + 3134: 0xBBB0, + 3135: 0xBBB1, + 3136: 0xBBB2, + 3137: 0xBBB3, + 3138: 0xBBB5, + 3139: 0xBBB6, + 3140: 0xBBB8, + 3141: 0xBBB9, + 3142: 0xBBBA, + 3143: 0xBBBB, + 3144: 0xBBBC, + 3145: 0xBBBD, + 3146: 0xBBBE, + 3147: 0xBBBF, + 3148: 0xBBC1, + 3149: 0xBBC2, + 3150: 0xBBC3, + 3151: 0xBBC5, + 3152: 0xBBC6, + 3153: 0xBBC7, + 3154: 0xBBC9, + 3155: 0xBBCA, + 3156: 0xBBCB, + 3157: 0xBBCC, + 3158: 0xBBCD, + 3159: 0xBBCE, + 3160: 0xBBCF, + 3161: 0xBBD1, + 3162: 0xBBD2, + 3163: 0xBBD4, + 3164: 0xBBD5, + 3165: 0xBBD6, + 3166: 0xBBD7, + 3167: 0xBBD8, + 3168: 0xBBD9, + 3169: 0xBBDA, + 3170: 0xBBDB, + 3171: 0xBBDC, + 3172: 0xBBDD, + 3173: 0xBBDE, + 3174: 0xBBDF, + 3175: 0xBBE0, + 3176: 0xBBE1, + 3177: 0xBBE2, + 3178: 0xBBE3, + 3179: 0xBBE4, + 3180: 0xBBE5, + 3181: 0xBBE6, + 3182: 0xBBE7, + 3183: 0xBBE8, + 3184: 0xBBE9, + 3185: 0xBBEA, + 3186: 0xBBEB, + 3187: 0xBBEC, + 3188: 0xBBED, + 3189: 0xBBEE, + 3190: 0xBBEF, + 3191: 0xBBF0, + 3192: 0xBBF1, + 3193: 0xBBF2, + 3194: 0xBBF3, + 3195: 0xBBF4, + 3196: 0xBBF5, + 3197: 0xBBF6, + 3198: 0xBBF7, + 3199: 0xBBFA, + 3200: 0xBBFB, + 3201: 0xBBFD, + 3202: 0xBBFE, + 3203: 0xBC01, + 3204: 0xBC03, + 3205: 0xBC04, + 3206: 0xBC05, + 3207: 0xBC06, + 3208: 0xBC07, + 3209: 0xBC0A, + 3210: 0xBC0E, + 3211: 0xBC10, + 3212: 0xBC12, + 3213: 0xBC13, + 3214: 0xBC19, + 3215: 0xBC1A, + 3216: 0xBC20, + 3217: 0xBC21, + 3218: 0xBC22, + 3219: 0xBC23, + 3220: 0xBC26, + 3221: 0xBC28, + 3222: 0xBC2A, + 3223: 0xBC2B, + 3224: 0xBC2C, + 3225: 0xBC2E, + 3226: 0xBC2F, + 3227: 0xBC32, + 3228: 0xBC33, + 3229: 0xBC35, + 3230: 0xBC36, + 3231: 0xBC37, + 3232: 0xBC39, + 3233: 0xBC3A, + 3234: 0xBC3B, + 3235: 0xBC3C, + 3236: 0xBC3D, + 3237: 0xBC3E, + 3238: 0xBC3F, + 3239: 0xBC42, + 3240: 0xBC46, + 3241: 0xBC47, + 3242: 0xBC48, + 3243: 0xBC4A, + 3244: 0xBC4B, + 3245: 0xBC4E, + 3246: 0xBC4F, + 3247: 0xBC51, + 3248: 0xBC52, + 3249: 0xBC53, + 3250: 0xBC54, + 3251: 0xBC55, + 3252: 0xBC56, + 3253: 0xBC57, + 3254: 0xBC58, + 3255: 0xBC59, + 3256: 0xBC5A, + 3257: 0xBC5B, + 3258: 0xBC5C, + 3259: 0xBC5E, + 3260: 0xBC5F, + 3261: 0xBC60, + 3262: 0xBC61, + 3263: 0xBC62, + 3264: 0xBC63, + 3265: 0xBC64, + 3266: 0xBC65, + 3267: 0xBC66, + 3268: 0xBC67, + 3269: 0xBC68, + 3270: 0xBC69, + 3271: 0xBC6A, + 3272: 0xBC6B, + 3273: 0xBC6C, + 3274: 0xBC6D, + 3275: 0xBC6E, + 3276: 0xBC6F, + 3277: 0xBC70, + 3278: 0xBC71, + 3279: 0xBC72, + 3280: 0xBC73, + 3281: 0xBC74, + 3282: 0xBC75, + 3283: 0xBC76, + 3284: 0xBC77, + 3285: 0xBC78, + 3286: 0xBC79, + 3287: 0xBC7A, + 3288: 0xBC7B, + 3289: 0xBC7C, + 3290: 0xBC7D, + 3291: 0xBC7E, + 3292: 0xBC7F, + 3293: 0xBC80, + 3294: 0xBC81, + 3295: 0xBC82, + 3296: 0xBC83, + 3297: 0xBC86, + 3298: 0xBC87, + 3299: 0xBC89, + 3300: 0xBC8A, + 3301: 0xBC8D, + 3302: 0xBC8F, + 3303: 0xBC90, + 3304: 0xBC91, + 3305: 0xBC92, + 3306: 0xBC93, + 3307: 0xBC96, + 3308: 0xBC98, + 3309: 0xBC9B, + 3310: 0xBC9C, + 3311: 0xBC9D, + 3312: 0xBC9E, + 3313: 0xBC9F, + 3314: 0xBCA2, + 3315: 0xBCA3, + 3316: 0xBCA5, + 3317: 0xBCA6, + 3318: 0xBCA9, + 3319: 0xBCAA, + 3320: 0xBCAB, + 3321: 0xBCAC, + 3322: 0xBCAD, + 3323: 0xBCAE, + 3324: 0xBCAF, + 3325: 0xBCB2, + 3326: 0xBCB6, + 3327: 0xBCB7, + 3328: 0xBCB8, + 3329: 0xBCB9, + 3330: 0xBCBA, + 3331: 0xBCBB, + 3332: 0xBCBE, + 3333: 0xBCBF, + 3334: 0xBCC1, + 3335: 0xBCC2, + 3336: 0xBCC3, + 3337: 0xBCC5, + 3338: 0xBCC6, + 3339: 0xBCC7, + 3340: 0xBCC8, + 3341: 0xBCC9, + 3342: 0xBCCA, + 3343: 0xBCCB, + 3344: 0xBCCC, + 3345: 0xBCCE, + 3346: 0xBCD2, + 3347: 0xBCD3, + 3348: 0xBCD4, + 3349: 0xBCD6, + 3350: 0xBCD7, + 3351: 0xBCD9, + 3352: 0xBCDA, + 3353: 0xBCDB, + 3354: 0xBCDD, + 3355: 0xBCDE, + 3356: 0xBCDF, + 3357: 0xBCE0, + 3358: 0xBCE1, + 3359: 0xBCE2, + 3360: 0xBCE3, + 3361: 0xBCE4, + 3362: 0xBCE5, + 3363: 0xBCE6, + 3364: 0xBCE7, + 3365: 0xBCE8, + 3366: 0xBCE9, + 3367: 0xBCEA, + 3368: 0xBCEB, + 3369: 0xBCEC, + 3370: 0xBCED, + 3371: 0xBCEE, + 3372: 0xBCEF, + 3373: 0xBCF0, + 3374: 0xBCF1, + 3375: 0xBCF2, + 3376: 0xBCF3, + 3377: 0xBCF7, + 3378: 0xBCF9, + 3379: 0xBCFA, + 3380: 0xBCFB, + 3381: 0xBCFD, + 3382: 0xBCFE, + 3383: 0xBCFF, + 3384: 0xBD00, + 3385: 0xBD01, + 3386: 0xBD02, + 3387: 0xBD03, + 3388: 0xBD06, + 3389: 0xBD08, + 3390: 0xBD0A, + 3391: 0xBD0B, + 3392: 0xBD0C, + 3393: 0xBD0D, + 3394: 0xBD0E, + 3395: 0xBD0F, + 3396: 0xBD11, + 3397: 0xBD12, + 3398: 0xBD13, + 3399: 0xBD15, + 3400: 0xBD16, + 3401: 0xBD17, + 3402: 0xBD18, + 3403: 0xBD19, + 3404: 0xBD1A, + 3405: 0xBD1B, + 3406: 0xBD1C, + 3407: 0xBD1D, + 3408: 0xBD1E, + 3409: 0xBD1F, + 3410: 0xBD20, + 3411: 0xBD21, + 3412: 0xBD22, + 3413: 0xBD23, + 3414: 0xBD25, + 3415: 0xBD26, + 3416: 0xBD27, + 3417: 0xBD28, + 3418: 0xBD29, + 3419: 0xBD2A, + 3420: 0xBD2B, + 3421: 0xBD2D, + 3422: 0xBD2E, + 3423: 0xBD2F, + 3424: 0xBD30, + 3425: 0xBD31, + 3426: 0xBD32, + 3427: 0xBD33, + 3428: 0xBD34, + 3429: 0xBD35, + 3430: 0xBD36, + 3431: 0xBD37, + 3432: 0xBD38, + 3433: 0xBD39, + 3434: 0xBD3A, + 3435: 0xBD3B, + 3436: 0xBD3C, + 3437: 0xBD3D, + 3438: 0xBD3E, + 3439: 0xBD3F, + 3440: 0xBD41, + 3441: 0xBD42, + 3442: 0xBD43, + 3443: 0xBD44, + 3444: 0xBD45, + 3445: 0xBD46, + 3446: 0xBD47, + 3447: 0xBD4A, + 3448: 0xBD4B, + 3449: 0xBD4D, + 3450: 0xBD4E, + 3451: 0xBD4F, + 3452: 0xBD51, + 3453: 0xBD52, + 3454: 0xBD53, + 3455: 0xBD54, + 3456: 0xBD55, + 3457: 0xBD56, + 3458: 0xBD57, + 3459: 0xBD5A, + 3460: 0xBD5B, + 3461: 0xBD5C, + 3462: 0xBD5D, + 3463: 0xBD5E, + 3464: 0xBD5F, + 3465: 0xBD60, + 3466: 0xBD61, + 3467: 0xBD62, + 3468: 0xBD63, + 3469: 0xBD65, + 3470: 0xBD66, + 3471: 0xBD67, + 3472: 0xBD69, + 3473: 0xBD6A, + 3474: 0xBD6B, + 3475: 0xBD6C, + 3476: 0xBD6D, + 3477: 0xBD6E, + 3478: 0xBD6F, + 3479: 0xBD70, + 3480: 0xBD71, + 3481: 0xBD72, + 3482: 0xBD73, + 3483: 0xBD74, + 3484: 0xBD75, + 3485: 0xBD76, + 3486: 0xBD77, + 3487: 0xBD78, + 3488: 0xBD79, + 3489: 0xBD7A, + 3490: 0xBD7B, + 3491: 0xBD7C, + 3492: 0xBD7D, + 3493: 0xBD7E, + 3494: 0xBD7F, + 3495: 0xBD82, + 3496: 0xBD83, + 3497: 0xBD85, + 3498: 0xBD86, + 3499: 0xBD8B, + 3500: 0xBD8C, + 3501: 0xBD8D, + 3502: 0xBD8E, + 3503: 0xBD8F, + 3504: 0xBD92, + 3505: 0xBD94, + 3506: 0xBD96, + 3507: 0xBD97, + 3508: 0xBD98, + 3509: 0xBD9B, + 3510: 0xBD9D, + 3511: 0xBD9E, + 3512: 0xBD9F, + 3513: 0xBDA0, + 3514: 0xBDA1, + 3515: 0xBDA2, + 3516: 0xBDA3, + 3517: 0xBDA5, + 3518: 0xBDA6, + 3519: 0xBDA7, + 3520: 0xBDA8, + 3521: 0xBDA9, + 3522: 0xBDAA, + 3523: 0xBDAB, + 3524: 0xBDAC, + 3525: 0xBDAD, + 3526: 0xBDAE, + 3527: 0xBDAF, + 3528: 0xBDB1, + 3529: 0xBDB2, + 3530: 0xBDB3, + 3531: 0xBDB4, + 3532: 0xBDB5, + 3533: 0xBDB6, + 3534: 0xBDB7, + 3535: 0xBDB9, + 3536: 0xBDBA, + 3537: 0xBDBB, + 3538: 0xBDBC, + 3539: 0xBDBD, + 3540: 0xBDBE, + 3541: 0xBDBF, + 3542: 0xBDC0, + 3543: 0xBDC1, + 3544: 0xBDC2, + 3545: 0xBDC3, + 3546: 0xBDC4, + 3547: 0xBDC5, + 3548: 0xBDC6, + 3549: 0xBDC7, + 3550: 0xBDC8, + 3551: 0xBDC9, + 3552: 0xBDCA, + 3553: 0xBDCB, + 3554: 0xBDCC, + 3555: 0xBDCD, + 3556: 0xBDCE, + 3557: 0xBDCF, + 3558: 0xBDD0, + 3559: 0xBDD1, + 3560: 0xBDD2, + 3561: 0xBDD3, + 3562: 0xBDD6, + 3563: 0xBDD7, + 3564: 0xBDD9, + 3565: 0xBDDA, + 3566: 0xBDDB, + 3567: 0xBDDD, + 3568: 0xBDDE, + 3569: 0xBDDF, + 3570: 0xBDE0, + 3571: 0xBDE1, + 3572: 0xBDE2, + 3573: 0xBDE3, + 3574: 0xBDE4, + 3575: 0xBDE5, + 3576: 0xBDE6, + 3577: 0xBDE7, + 3578: 0xBDE8, + 3579: 0xBDEA, + 3580: 0xBDEB, + 3581: 0xBDEC, + 3582: 0xBDED, + 3583: 0xBDEE, + 3584: 0xBDEF, + 3585: 0xBDF1, + 3586: 0xBDF2, + 3587: 0xBDF3, + 3588: 0xBDF5, + 3589: 0xBDF6, + 3590: 0xBDF7, + 3591: 0xBDF9, + 3592: 0xBDFA, + 3593: 0xBDFB, + 3594: 0xBDFC, + 3595: 0xBDFD, + 3596: 0xBDFE, + 3597: 0xBDFF, + 3598: 0xBE01, + 3599: 0xBE02, + 3600: 0xBE04, + 3601: 0xBE06, + 3602: 0xBE07, + 3603: 0xBE08, + 3604: 0xBE09, + 3605: 0xBE0A, + 3606: 0xBE0B, + 3607: 0xBE0E, + 3608: 0xBE0F, + 3609: 0xBE11, + 3610: 0xBE12, + 3611: 0xBE13, + 3612: 0xBE15, + 3613: 0xBE16, + 3614: 0xBE17, + 3615: 0xBE18, + 3616: 0xBE19, + 3617: 0xBE1A, + 3618: 0xBE1B, + 3619: 0xBE1E, + 3620: 0xBE20, + 3621: 0xBE21, + 3622: 0xBE22, + 3623: 0xBE23, + 3624: 0xBE24, + 3625: 0xBE25, + 3626: 0xBE26, + 3627: 0xBE27, + 3628: 0xBE28, + 3629: 0xBE29, + 3630: 0xBE2A, + 3631: 0xBE2B, + 3632: 0xBE2C, + 3633: 0xBE2D, + 3634: 0xBE2E, + 3635: 0xBE2F, + 3636: 0xBE30, + 3637: 0xBE31, + 3638: 0xBE32, + 3639: 0xBE33, + 3640: 0xBE34, + 3641: 0xBE35, + 3642: 0xBE36, + 3643: 0xBE37, + 3644: 0xBE38, + 3645: 0xBE39, + 3646: 0xBE3A, + 3647: 0xBE3B, + 3648: 0xBE3C, + 3649: 0xBE3D, + 3650: 0xBE3E, + 3651: 0xBE3F, + 3652: 0xBE40, + 3653: 0xBE41, + 3654: 0xBE42, + 3655: 0xBE43, + 3656: 0xBE46, + 3657: 0xBE47, + 3658: 0xBE49, + 3659: 0xBE4A, + 3660: 0xBE4B, + 3661: 0xBE4D, + 3662: 0xBE4F, + 3663: 0xBE50, + 3664: 0xBE51, + 3665: 0xBE52, + 3666: 0xBE53, + 3667: 0xBE56, + 3668: 0xBE58, + 3669: 0xBE5C, + 3670: 0xBE5D, + 3671: 0xBE5E, + 3672: 0xBE5F, + 3673: 0xBE62, + 3674: 0xBE63, + 3675: 0xBE65, + 3676: 0xBE66, + 3677: 0xBE67, + 3678: 0xBE69, + 3679: 0xBE6B, + 3680: 0xBE6C, + 3681: 0xBE6D, + 3682: 0xBE6E, + 3683: 0xBE6F, + 3684: 0xBE72, + 3685: 0xBE76, + 3686: 0xBE77, + 3687: 0xBE78, + 3688: 0xBE79, + 3689: 0xBE7A, + 3690: 0xBE7E, + 3691: 0xBE7F, + 3692: 0xBE81, + 3693: 0xBE82, + 3694: 0xBE83, + 3695: 0xBE85, + 3696: 0xBE86, + 3697: 0xBE87, + 3698: 0xBE88, + 3699: 0xBE89, + 3700: 0xBE8A, + 3701: 0xBE8B, + 3702: 0xBE8E, + 3703: 0xBE92, + 3704: 0xBE93, + 3705: 0xBE94, + 3706: 0xBE95, + 3707: 0xBE96, + 3708: 0xBE97, + 3709: 0xBE9A, + 3710: 0xBE9B, + 3711: 0xBE9C, + 3712: 0xBE9D, + 3713: 0xBE9E, + 3714: 0xBE9F, + 3715: 0xBEA0, + 3716: 0xBEA1, + 3717: 0xBEA2, + 3718: 0xBEA3, + 3719: 0xBEA4, + 3720: 0xBEA5, + 3721: 0xBEA6, + 3722: 0xBEA7, + 3723: 0xBEA9, + 3724: 0xBEAA, + 3725: 0xBEAB, + 3726: 0xBEAC, + 3727: 0xBEAD, + 3728: 0xBEAE, + 3729: 0xBEAF, + 3730: 0xBEB0, + 3731: 0xBEB1, + 3732: 0xBEB2, + 3733: 0xBEB3, + 3734: 0xBEB4, + 3735: 0xBEB5, + 3736: 0xBEB6, + 3737: 0xBEB7, + 3738: 0xBEB8, + 3739: 0xBEB9, + 3740: 0xBEBA, + 3741: 0xBEBB, + 3742: 0xBEBC, + 3743: 0xBEBD, + 3744: 0xBEBE, + 3745: 0xBEBF, + 3746: 0xBEC0, + 3747: 0xBEC1, + 3748: 0xBEC2, + 3749: 0xBEC3, + 3750: 0xBEC4, + 3751: 0xBEC5, + 3752: 0xBEC6, + 3753: 0xBEC7, + 3754: 0xBEC8, + 3755: 0xBEC9, + 3756: 0xBECA, + 3757: 0xBECB, + 3758: 0xBECC, + 3759: 0xBECD, + 3760: 0xBECE, + 3761: 0xBECF, + 3762: 0xBED2, + 3763: 0xBED3, + 3764: 0xBED5, + 3765: 0xBED6, + 3766: 0xBED9, + 3767: 0xBEDA, + 3768: 0xBEDB, + 3769: 0xBEDC, + 3770: 0xBEDD, + 3771: 0xBEDE, + 3772: 0xBEDF, + 3773: 0xBEE1, + 3774: 0xBEE2, + 3775: 0xBEE6, + 3776: 0xBEE7, + 3777: 0xBEE8, + 3778: 0xBEE9, + 3779: 0xBEEA, + 3780: 0xBEEB, + 3781: 0xBEED, + 3782: 0xBEEE, + 3783: 0xBEEF, + 3784: 0xBEF0, + 3785: 0xBEF1, + 3786: 0xBEF2, + 3787: 0xBEF3, + 3788: 0xBEF4, + 3789: 0xBEF5, + 3790: 0xBEF6, + 3791: 0xBEF7, + 3792: 0xBEF8, + 3793: 0xBEF9, + 3794: 0xBEFA, + 3795: 0xBEFB, + 3796: 0xBEFC, + 3797: 0xBEFD, + 3798: 0xBEFE, + 3799: 0xBEFF, + 3800: 0xBF00, + 3801: 0xBF02, + 3802: 0xBF03, + 3803: 0xBF04, + 3804: 0xBF05, + 3805: 0xBF06, + 3806: 0xBF07, + 3807: 0xBF0A, + 3808: 0xBF0B, + 3809: 0xBF0C, + 3810: 0xBF0D, + 3811: 0xBF0E, + 3812: 0xBF0F, + 3813: 0xBF10, + 3814: 0xBF11, + 3815: 0xBF12, + 3816: 0xBF13, + 3817: 0xBF14, + 3818: 0xBF15, + 3819: 0xBF16, + 3820: 0xBF17, + 3821: 0xBF1A, + 3822: 0xBF1E, + 3823: 0xBF1F, + 3824: 0xBF20, + 3825: 0xBF21, + 3826: 0xBF22, + 3827: 0xBF23, + 3828: 0xBF24, + 3829: 0xBF25, + 3830: 0xBF26, + 3831: 0xBF27, + 3832: 0xBF28, + 3833: 0xBF29, + 3834: 0xBF2A, + 3835: 0xBF2B, + 3836: 0xBF2C, + 3837: 0xBF2D, + 3838: 0xBF2E, + 3839: 0xBF2F, + 3840: 0xBF30, + 3841: 0xBF31, + 3842: 0xBF32, + 3843: 0xBF33, + 3844: 0xBF34, + 3845: 0xBF35, + 3846: 0xBF36, + 3847: 0xBF37, + 3848: 0xBF38, + 3849: 0xBF39, + 3850: 0xBF3A, + 3851: 0xBF3B, + 3852: 0xBF3C, + 3853: 0xBF3D, + 3854: 0xBF3E, + 3855: 0xBF3F, + 3856: 0xBF42, + 3857: 0xBF43, + 3858: 0xBF45, + 3859: 0xBF46, + 3860: 0xBF47, + 3861: 0xBF49, + 3862: 0xBF4A, + 3863: 0xBF4B, + 3864: 0xBF4C, + 3865: 0xBF4D, + 3866: 0xBF4E, + 3867: 0xBF4F, + 3868: 0xBF52, + 3869: 0xBF53, + 3870: 0xBF54, + 3871: 0xBF56, + 3872: 0xBF57, + 3873: 0xBF58, + 3874: 0xBF59, + 3875: 0xBF5A, + 3876: 0xBF5B, + 3877: 0xBF5C, + 3878: 0xBF5D, + 3879: 0xBF5E, + 3880: 0xBF5F, + 3881: 0xBF60, + 3882: 0xBF61, + 3883: 0xBF62, + 3884: 0xBF63, + 3885: 0xBF64, + 3886: 0xBF65, + 3887: 0xBF66, + 3888: 0xBF67, + 3889: 0xBF68, + 3890: 0xBF69, + 3891: 0xBF6A, + 3892: 0xBF6B, + 3893: 0xBF6C, + 3894: 0xBF6D, + 3895: 0xBF6E, + 3896: 0xBF6F, + 3897: 0xBF70, + 3898: 0xBF71, + 3899: 0xBF72, + 3900: 0xBF73, + 3901: 0xBF74, + 3902: 0xBF75, + 3903: 0xBF76, + 3904: 0xBF77, + 3905: 0xBF78, + 3906: 0xBF79, + 3907: 0xBF7A, + 3908: 0xBF7B, + 3909: 0xBF7C, + 3910: 0xBF7D, + 3911: 0xBF7E, + 3912: 0xBF7F, + 3913: 0xBF80, + 3914: 0xBF81, + 3915: 0xBF82, + 3916: 0xBF83, + 3917: 0xBF84, + 3918: 0xBF85, + 3919: 0xBF86, + 3920: 0xBF87, + 3921: 0xBF88, + 3922: 0xBF89, + 3923: 0xBF8A, + 3924: 0xBF8B, + 3925: 0xBF8C, + 3926: 0xBF8D, + 3927: 0xBF8E, + 3928: 0xBF8F, + 3929: 0xBF90, + 3930: 0xBF91, + 3931: 0xBF92, + 3932: 0xBF93, + 3933: 0xBF95, + 3934: 0xBF96, + 3935: 0xBF97, + 3936: 0xBF98, + 3937: 0xBF99, + 3938: 0xBF9A, + 3939: 0xBF9B, + 3940: 0xBF9C, + 3941: 0xBF9D, + 3942: 0xBF9E, + 3943: 0xBF9F, + 3944: 0xBFA0, + 3945: 0xBFA1, + 3946: 0xBFA2, + 3947: 0xBFA3, + 3948: 0xBFA4, + 3949: 0xBFA5, + 3950: 0xBFA6, + 3951: 0xBFA7, + 3952: 0xBFA8, + 3953: 0xBFA9, + 3954: 0xBFAA, + 3955: 0xBFAB, + 3956: 0xBFAC, + 3957: 0xBFAD, + 3958: 0xBFAE, + 3959: 0xBFAF, + 3960: 0xBFB1, + 3961: 0xBFB2, + 3962: 0xBFB3, + 3963: 0xBFB4, + 3964: 0xBFB5, + 3965: 0xBFB6, + 3966: 0xBFB7, + 3967: 0xBFB8, + 3968: 0xBFB9, + 3969: 0xBFBA, + 3970: 0xBFBB, + 3971: 0xBFBC, + 3972: 0xBFBD, + 3973: 0xBFBE, + 3974: 0xBFBF, + 3975: 0xBFC0, + 3976: 0xBFC1, + 3977: 0xBFC2, + 3978: 0xBFC3, + 3979: 0xBFC4, + 3980: 0xBFC6, + 3981: 0xBFC7, + 3982: 0xBFC8, + 3983: 0xBFC9, + 3984: 0xBFCA, + 3985: 0xBFCB, + 3986: 0xBFCE, + 3987: 0xBFCF, + 3988: 0xBFD1, + 3989: 0xBFD2, + 3990: 0xBFD3, + 3991: 0xBFD5, + 3992: 0xBFD6, + 3993: 0xBFD7, + 3994: 0xBFD8, + 3995: 0xBFD9, + 3996: 0xBFDA, + 3997: 0xBFDB, + 3998: 0xBFDD, + 3999: 0xBFDE, + 4000: 0xBFE0, + 4001: 0xBFE2, + 4002: 0xBFE3, + 4003: 0xBFE4, + 4004: 0xBFE5, + 4005: 0xBFE6, + 4006: 0xBFE7, + 4007: 0xBFE8, + 4008: 0xBFE9, + 4009: 0xBFEA, + 4010: 0xBFEB, + 4011: 0xBFEC, + 4012: 0xBFED, + 4013: 0xBFEE, + 4014: 0xBFEF, + 4015: 0xBFF0, + 4016: 0xBFF1, + 4017: 0xBFF2, + 4018: 0xBFF3, + 4019: 0xBFF4, + 4020: 0xBFF5, + 4021: 0xBFF6, + 4022: 0xBFF7, + 4023: 0xBFF8, + 4024: 0xBFF9, + 4025: 0xBFFA, + 4026: 0xBFFB, + 4027: 0xBFFC, + 4028: 0xBFFD, + 4029: 0xBFFE, + 4030: 0xBFFF, + 4031: 0xC000, + 4032: 0xC001, + 4033: 0xC002, + 4034: 0xC003, + 4035: 0xC004, + 4036: 0xC005, + 4037: 0xC006, + 4038: 0xC007, + 4039: 0xC008, + 4040: 0xC009, + 4041: 0xC00A, + 4042: 0xC00B, + 4043: 0xC00C, + 4044: 0xC00D, + 4045: 0xC00E, + 4046: 0xC00F, + 4047: 0xC010, + 4048: 0xC011, + 4049: 0xC012, + 4050: 0xC013, + 4051: 0xC014, + 4052: 0xC015, + 4053: 0xC016, + 4054: 0xC017, + 4055: 0xC018, + 4056: 0xC019, + 4057: 0xC01A, + 4058: 0xC01B, + 4059: 0xC01C, + 4060: 0xC01D, + 4061: 0xC01E, + 4062: 0xC01F, + 4063: 0xC020, + 4064: 0xC021, + 4065: 0xC022, + 4066: 0xC023, + 4067: 0xC024, + 4068: 0xC025, + 4069: 0xC026, + 4070: 0xC027, + 4071: 0xC028, + 4072: 0xC029, + 4073: 0xC02A, + 4074: 0xC02B, + 4075: 0xC02C, + 4076: 0xC02D, + 4077: 0xC02E, + 4078: 0xC02F, + 4079: 0xC030, + 4080: 0xC031, + 4081: 0xC032, + 4082: 0xC033, + 4083: 0xC034, + 4084: 0xC035, + 4085: 0xC036, + 4086: 0xC037, + 4087: 0xC038, + 4088: 0xC039, + 4089: 0xC03A, + 4090: 0xC03B, + 4091: 0xC03D, + 4092: 0xC03E, + 4093: 0xC03F, + 4094: 0xC040, + 4095: 0xC041, + 4096: 0xC042, + 4097: 0xC043, + 4098: 0xC044, + 4099: 0xC045, + 4100: 0xC046, + 4101: 0xC047, + 4102: 0xC048, + 4103: 0xC049, + 4104: 0xC04A, + 4105: 0xC04B, + 4106: 0xC04C, + 4107: 0xC04D, + 4108: 0xC04E, + 4109: 0xC04F, + 4110: 0xC050, + 4111: 0xC052, + 4112: 0xC053, + 4113: 0xC054, + 4114: 0xC055, + 4115: 0xC056, + 4116: 0xC057, + 4117: 0xC059, + 4118: 0xC05A, + 4119: 0xC05B, + 4120: 0xC05D, + 4121: 0xC05E, + 4122: 0xC05F, + 4123: 0xC061, + 4124: 0xC062, + 4125: 0xC063, + 4126: 0xC064, + 4127: 0xC065, + 4128: 0xC066, + 4129: 0xC067, + 4130: 0xC06A, + 4131: 0xC06B, + 4132: 0xC06C, + 4133: 0xC06D, + 4134: 0xC06E, + 4135: 0xC06F, + 4136: 0xC070, + 4137: 0xC071, + 4138: 0xC072, + 4139: 0xC073, + 4140: 0xC074, + 4141: 0xC075, + 4142: 0xC076, + 4143: 0xC077, + 4144: 0xC078, + 4145: 0xC079, + 4146: 0xC07A, + 4147: 0xC07B, + 4148: 0xC07C, + 4149: 0xC07D, + 4150: 0xC07E, + 4151: 0xC07F, + 4152: 0xC080, + 4153: 0xC081, + 4154: 0xC082, + 4155: 0xC083, + 4156: 0xC084, + 4157: 0xC085, + 4158: 0xC086, + 4159: 0xC087, + 4160: 0xC088, + 4161: 0xC089, + 4162: 0xC08A, + 4163: 0xC08B, + 4164: 0xC08C, + 4165: 0xC08D, + 4166: 0xC08E, + 4167: 0xC08F, + 4168: 0xC092, + 4169: 0xC093, + 4170: 0xC095, + 4171: 0xC096, + 4172: 0xC097, + 4173: 0xC099, + 4174: 0xC09A, + 4175: 0xC09B, + 4176: 0xC09C, + 4177: 0xC09D, + 4178: 0xC09E, + 4179: 0xC09F, + 4180: 0xC0A2, + 4181: 0xC0A4, + 4182: 0xC0A6, + 4183: 0xC0A7, + 4184: 0xC0A8, + 4185: 0xC0A9, + 4186: 0xC0AA, + 4187: 0xC0AB, + 4188: 0xC0AE, + 4189: 0xC0B1, + 4190: 0xC0B2, + 4191: 0xC0B7, + 4192: 0xC0B8, + 4193: 0xC0B9, + 4194: 0xC0BA, + 4195: 0xC0BB, + 4196: 0xC0BE, + 4197: 0xC0C2, + 4198: 0xC0C3, + 4199: 0xC0C4, + 4200: 0xC0C6, + 4201: 0xC0C7, + 4202: 0xC0CA, + 4203: 0xC0CB, + 4204: 0xC0CD, + 4205: 0xC0CE, + 4206: 0xC0CF, + 4207: 0xC0D1, + 4208: 0xC0D2, + 4209: 0xC0D3, + 4210: 0xC0D4, + 4211: 0xC0D5, + 4212: 0xC0D6, + 4213: 0xC0D7, + 4214: 0xC0DA, + 4215: 0xC0DE, + 4216: 0xC0DF, + 4217: 0xC0E0, + 4218: 0xC0E1, + 4219: 0xC0E2, + 4220: 0xC0E3, + 4221: 0xC0E6, + 4222: 0xC0E7, + 4223: 0xC0E9, + 4224: 0xC0EA, + 4225: 0xC0EB, + 4226: 0xC0ED, + 4227: 0xC0EE, + 4228: 0xC0EF, + 4229: 0xC0F0, + 4230: 0xC0F1, + 4231: 0xC0F2, + 4232: 0xC0F3, + 4233: 0xC0F6, + 4234: 0xC0F8, + 4235: 0xC0FA, + 4236: 0xC0FB, + 4237: 0xC0FC, + 4238: 0xC0FD, + 4239: 0xC0FE, + 4240: 0xC0FF, + 4241: 0xC101, + 4242: 0xC102, + 4243: 0xC103, + 4244: 0xC105, + 4245: 0xC106, + 4246: 0xC107, + 4247: 0xC109, + 4248: 0xC10A, + 4249: 0xC10B, + 4250: 0xC10C, + 4251: 0xC10D, + 4252: 0xC10E, + 4253: 0xC10F, + 4254: 0xC111, + 4255: 0xC112, + 4256: 0xC113, + 4257: 0xC114, + 4258: 0xC116, + 4259: 0xC117, + 4260: 0xC118, + 4261: 0xC119, + 4262: 0xC11A, + 4263: 0xC11B, + 4264: 0xC121, + 4265: 0xC122, + 4266: 0xC125, + 4267: 0xC128, + 4268: 0xC129, + 4269: 0xC12A, + 4270: 0xC12B, + 4271: 0xC12E, + 4272: 0xC132, + 4273: 0xC133, + 4274: 0xC134, + 4275: 0xC135, + 4276: 0xC137, + 4277: 0xC13A, + 4278: 0xC13B, + 4279: 0xC13D, + 4280: 0xC13E, + 4281: 0xC13F, + 4282: 0xC141, + 4283: 0xC142, + 4284: 0xC143, + 4285: 0xC144, + 4286: 0xC145, + 4287: 0xC146, + 4288: 0xC147, + 4289: 0xC14A, + 4290: 0xC14E, + 4291: 0xC14F, + 4292: 0xC150, + 4293: 0xC151, + 4294: 0xC152, + 4295: 0xC153, + 4296: 0xC156, + 4297: 0xC157, + 4298: 0xC159, + 4299: 0xC15A, + 4300: 0xC15B, + 4301: 0xC15D, + 4302: 0xC15E, + 4303: 0xC15F, + 4304: 0xC160, + 4305: 0xC161, + 4306: 0xC162, + 4307: 0xC163, + 4308: 0xC166, + 4309: 0xC16A, + 4310: 0xC16B, + 4311: 0xC16C, + 4312: 0xC16D, + 4313: 0xC16E, + 4314: 0xC16F, + 4315: 0xC171, + 4316: 0xC172, + 4317: 0xC173, + 4318: 0xC175, + 4319: 0xC176, + 4320: 0xC177, + 4321: 0xC179, + 4322: 0xC17A, + 4323: 0xC17B, + 4324: 0xC17C, + 4325: 0xC17D, + 4326: 0xC17E, + 4327: 0xC17F, + 4328: 0xC180, + 4329: 0xC181, + 4330: 0xC182, + 4331: 0xC183, + 4332: 0xC184, + 4333: 0xC186, + 4334: 0xC187, + 4335: 0xC188, + 4336: 0xC189, + 4337: 0xC18A, + 4338: 0xC18B, + 4339: 0xC18F, + 4340: 0xC191, + 4341: 0xC192, + 4342: 0xC193, + 4343: 0xC195, + 4344: 0xC197, + 4345: 0xC198, + 4346: 0xC199, + 4347: 0xC19A, + 4348: 0xC19B, + 4349: 0xC19E, + 4350: 0xC1A0, + 4351: 0xC1A2, + 4352: 0xC1A3, + 4353: 0xC1A4, + 4354: 0xC1A6, + 4355: 0xC1A7, + 4356: 0xC1AA, + 4357: 0xC1AB, + 4358: 0xC1AD, + 4359: 0xC1AE, + 4360: 0xC1AF, + 4361: 0xC1B1, + 4362: 0xC1B2, + 4363: 0xC1B3, + 4364: 0xC1B4, + 4365: 0xC1B5, + 4366: 0xC1B6, + 4367: 0xC1B7, + 4368: 0xC1B8, + 4369: 0xC1B9, + 4370: 0xC1BA, + 4371: 0xC1BB, + 4372: 0xC1BC, + 4373: 0xC1BE, + 4374: 0xC1BF, + 4375: 0xC1C0, + 4376: 0xC1C1, + 4377: 0xC1C2, + 4378: 0xC1C3, + 4379: 0xC1C5, + 4380: 0xC1C6, + 4381: 0xC1C7, + 4382: 0xC1C9, + 4383: 0xC1CA, + 4384: 0xC1CB, + 4385: 0xC1CD, + 4386: 0xC1CE, + 4387: 0xC1CF, + 4388: 0xC1D0, + 4389: 0xC1D1, + 4390: 0xC1D2, + 4391: 0xC1D3, + 4392: 0xC1D5, + 4393: 0xC1D6, + 4394: 0xC1D9, + 4395: 0xC1DA, + 4396: 0xC1DB, + 4397: 0xC1DC, + 4398: 0xC1DD, + 4399: 0xC1DE, + 4400: 0xC1DF, + 4401: 0xC1E1, + 4402: 0xC1E2, + 4403: 0xC1E3, + 4404: 0xC1E5, + 4405: 0xC1E6, + 4406: 0xC1E7, + 4407: 0xC1E9, + 4408: 0xC1EA, + 4409: 0xC1EB, + 4410: 0xC1EC, + 4411: 0xC1ED, + 4412: 0xC1EE, + 4413: 0xC1EF, + 4414: 0xC1F2, + 4415: 0xC1F4, + 4416: 0xC1F5, + 4417: 0xC1F6, + 4418: 0xC1F7, + 4419: 0xC1F8, + 4420: 0xC1F9, + 4421: 0xC1FA, + 4422: 0xC1FB, + 4423: 0xC1FE, + 4424: 0xC1FF, + 4425: 0xC201, + 4426: 0xC202, + 4427: 0xC203, + 4428: 0xC205, + 4429: 0xC206, + 4430: 0xC207, + 4431: 0xC208, + 4432: 0xC209, + 4433: 0xC20A, + 4434: 0xC20B, + 4435: 0xC20E, + 4436: 0xC210, + 4437: 0xC212, + 4438: 0xC213, + 4439: 0xC214, + 4440: 0xC215, + 4441: 0xC216, + 4442: 0xC217, + 4443: 0xC21A, + 4444: 0xC21B, + 4445: 0xC21D, + 4446: 0xC21E, + 4447: 0xC221, + 4448: 0xC222, + 4449: 0xC223, + 4450: 0xC224, + 4451: 0xC225, + 4452: 0xC226, + 4453: 0xC227, + 4454: 0xC22A, + 4455: 0xC22C, + 4456: 0xC22E, + 4457: 0xC230, + 4458: 0xC233, + 4459: 0xC235, + 4460: 0xC236, + 4461: 0xC237, + 4462: 0xC238, + 4463: 0xC239, + 4464: 0xC23A, + 4465: 0xC23B, + 4466: 0xC23C, + 4467: 0xC23D, + 4468: 0xC23E, + 4469: 0xC23F, + 4470: 0xC240, + 4471: 0xC241, + 4472: 0xC242, + 4473: 0xC243, + 4474: 0xC244, + 4475: 0xC245, + 4476: 0xC246, + 4477: 0xC247, + 4478: 0xC249, + 4479: 0xC24A, + 4480: 0xC24B, + 4481: 0xC24C, + 4482: 0xC24D, + 4483: 0xC24E, + 4484: 0xC24F, + 4485: 0xC252, + 4486: 0xC253, + 4487: 0xC255, + 4488: 0xC256, + 4489: 0xC257, + 4490: 0xC259, + 4491: 0xC25A, + 4492: 0xC25B, + 4493: 0xC25C, + 4494: 0xC25D, + 4495: 0xC25E, + 4496: 0xC25F, + 4497: 0xC261, + 4498: 0xC262, + 4499: 0xC263, + 4500: 0xC264, + 4501: 0xC266, + 4502: 0xC267, + 4503: 0xC268, + 4504: 0xC269, + 4505: 0xC26A, + 4506: 0xC26B, + 4507: 0xC26E, + 4508: 0xC26F, + 4509: 0xC271, + 4510: 0xC272, + 4511: 0xC273, + 4512: 0xC275, + 4513: 0xC276, + 4514: 0xC277, + 4515: 0xC278, + 4516: 0xC279, + 4517: 0xC27A, + 4518: 0xC27B, + 4519: 0xC27E, + 4520: 0xC280, + 4521: 0xC282, + 4522: 0xC283, + 4523: 0xC284, + 4524: 0xC285, + 4525: 0xC286, + 4526: 0xC287, + 4527: 0xC28A, + 4528: 0xC28B, + 4529: 0xC28C, + 4530: 0xC28D, + 4531: 0xC28E, + 4532: 0xC28F, + 4533: 0xC291, + 4534: 0xC292, + 4535: 0xC293, + 4536: 0xC294, + 4537: 0xC295, + 4538: 0xC296, + 4539: 0xC297, + 4540: 0xC299, + 4541: 0xC29A, + 4542: 0xC29C, + 4543: 0xC29E, + 4544: 0xC29F, + 4545: 0xC2A0, + 4546: 0xC2A1, + 4547: 0xC2A2, + 4548: 0xC2A3, + 4549: 0xC2A6, + 4550: 0xC2A7, + 4551: 0xC2A9, + 4552: 0xC2AA, + 4553: 0xC2AB, + 4554: 0xC2AE, + 4555: 0xC2AF, + 4556: 0xC2B0, + 4557: 0xC2B1, + 4558: 0xC2B2, + 4559: 0xC2B3, + 4560: 0xC2B6, + 4561: 0xC2B8, + 4562: 0xC2BA, + 4563: 0xC2BB, + 4564: 0xC2BC, + 4565: 0xC2BD, + 4566: 0xC2BE, + 4567: 0xC2BF, + 4568: 0xC2C0, + 4569: 0xC2C1, + 4570: 0xC2C2, + 4571: 0xC2C3, + 4572: 0xC2C4, + 4573: 0xC2C5, + 4574: 0xC2C6, + 4575: 0xC2C7, + 4576: 0xC2C8, + 4577: 0xC2C9, + 4578: 0xC2CA, + 4579: 0xC2CB, + 4580: 0xC2CC, + 4581: 0xC2CD, + 4582: 0xC2CE, + 4583: 0xC2CF, + 4584: 0xC2D0, + 4585: 0xC2D1, + 4586: 0xC2D2, + 4587: 0xC2D3, + 4588: 0xC2D4, + 4589: 0xC2D5, + 4590: 0xC2D6, + 4591: 0xC2D7, + 4592: 0xC2D8, + 4593: 0xC2D9, + 4594: 0xC2DA, + 4595: 0xC2DB, + 4596: 0xC2DE, + 4597: 0xC2DF, + 4598: 0xC2E1, + 4599: 0xC2E2, + 4600: 0xC2E5, + 4601: 0xC2E6, + 4602: 0xC2E7, + 4603: 0xC2E8, + 4604: 0xC2E9, + 4605: 0xC2EA, + 4606: 0xC2EE, + 4607: 0xC2F0, + 4608: 0xC2F2, + 4609: 0xC2F3, + 4610: 0xC2F4, + 4611: 0xC2F5, + 4612: 0xC2F7, + 4613: 0xC2FA, + 4614: 0xC2FD, + 4615: 0xC2FE, + 4616: 0xC2FF, + 4617: 0xC301, + 4618: 0xC302, + 4619: 0xC303, + 4620: 0xC304, + 4621: 0xC305, + 4622: 0xC306, + 4623: 0xC307, + 4624: 0xC30A, + 4625: 0xC30B, + 4626: 0xC30E, + 4627: 0xC30F, + 4628: 0xC310, + 4629: 0xC311, + 4630: 0xC312, + 4631: 0xC316, + 4632: 0xC317, + 4633: 0xC319, + 4634: 0xC31A, + 4635: 0xC31B, + 4636: 0xC31D, + 4637: 0xC31E, + 4638: 0xC31F, + 4639: 0xC320, + 4640: 0xC321, + 4641: 0xC322, + 4642: 0xC323, + 4643: 0xC326, + 4644: 0xC327, + 4645: 0xC32A, + 4646: 0xC32B, + 4647: 0xC32C, + 4648: 0xC32D, + 4649: 0xC32E, + 4650: 0xC32F, + 4651: 0xC330, + 4652: 0xC331, + 4653: 0xC332, + 4654: 0xC333, + 4655: 0xC334, + 4656: 0xC335, + 4657: 0xC336, + 4658: 0xC337, + 4659: 0xC338, + 4660: 0xC339, + 4661: 0xC33A, + 4662: 0xC33B, + 4663: 0xC33C, + 4664: 0xC33D, + 4665: 0xC33E, + 4666: 0xC33F, + 4667: 0xC340, + 4668: 0xC341, + 4669: 0xC342, + 4670: 0xC343, + 4671: 0xC344, + 4672: 0xC346, + 4673: 0xC347, + 4674: 0xC348, + 4675: 0xC349, + 4676: 0xC34A, + 4677: 0xC34B, + 4678: 0xC34C, + 4679: 0xC34D, + 4680: 0xC34E, + 4681: 0xC34F, + 4682: 0xC350, + 4683: 0xC351, + 4684: 0xC352, + 4685: 0xC353, + 4686: 0xC354, + 4687: 0xC355, + 4688: 0xC356, + 4689: 0xC357, + 4690: 0xC358, + 4691: 0xC359, + 4692: 0xC35A, + 4693: 0xC35B, + 4694: 0xC35C, + 4695: 0xC35D, + 4696: 0xC35E, + 4697: 0xC35F, + 4698: 0xC360, + 4699: 0xC361, + 4700: 0xC362, + 4701: 0xC363, + 4702: 0xC364, + 4703: 0xC365, + 4704: 0xC366, + 4705: 0xC367, + 4706: 0xC36A, + 4707: 0xC36B, + 4708: 0xC36D, + 4709: 0xC36E, + 4710: 0xC36F, + 4711: 0xC371, + 4712: 0xC373, + 4713: 0xC374, + 4714: 0xC375, + 4715: 0xC376, + 4716: 0xC377, + 4717: 0xC37A, + 4718: 0xC37B, + 4719: 0xC37E, + 4720: 0xC37F, + 4721: 0xC380, + 4722: 0xC381, + 4723: 0xC382, + 4724: 0xC383, + 4725: 0xC385, + 4726: 0xC386, + 4727: 0xC387, + 4728: 0xC389, + 4729: 0xC38A, + 4730: 0xC38B, + 4731: 0xC38D, + 4732: 0xC38E, + 4733: 0xC38F, + 4734: 0xC390, + 4735: 0xC391, + 4736: 0xC392, + 4737: 0xC393, + 4738: 0xC394, + 4739: 0xC395, + 4740: 0xC396, + 4741: 0xC397, + 4742: 0xC398, + 4743: 0xC399, + 4744: 0xC39A, + 4745: 0xC39B, + 4746: 0xC39C, + 4747: 0xC39D, + 4748: 0xC39E, + 4749: 0xC39F, + 4750: 0xC3A0, + 4751: 0xC3A1, + 4752: 0xC3A2, + 4753: 0xC3A3, + 4754: 0xC3A4, + 4755: 0xC3A5, + 4756: 0xC3A6, + 4757: 0xC3A7, + 4758: 0xC3A8, + 4759: 0xC3A9, + 4760: 0xC3AA, + 4761: 0xC3AB, + 4762: 0xC3AC, + 4763: 0xC3AD, + 4764: 0xC3AE, + 4765: 0xC3AF, + 4766: 0xC3B0, + 4767: 0xC3B1, + 4768: 0xC3B2, + 4769: 0xC3B3, + 4770: 0xC3B4, + 4771: 0xC3B5, + 4772: 0xC3B6, + 4773: 0xC3B7, + 4774: 0xC3B8, + 4775: 0xC3B9, + 4776: 0xC3BA, + 4777: 0xC3BB, + 4778: 0xC3BC, + 4779: 0xC3BD, + 4780: 0xC3BE, + 4781: 0xC3BF, + 4782: 0xC3C1, + 4783: 0xC3C2, + 4784: 0xC3C3, + 4785: 0xC3C4, + 4786: 0xC3C5, + 4787: 0xC3C6, + 4788: 0xC3C7, + 4789: 0xC3C8, + 4790: 0xC3C9, + 4791: 0xC3CA, + 4792: 0xC3CB, + 4793: 0xC3CC, + 4794: 0xC3CD, + 4795: 0xC3CE, + 4796: 0xC3CF, + 4797: 0xC3D0, + 4798: 0xC3D1, + 4799: 0xC3D2, + 4800: 0xC3D3, + 4801: 0xC3D4, + 4802: 0xC3D5, + 4803: 0xC3D6, + 4804: 0xC3D7, + 4805: 0xC3DA, + 4806: 0xC3DB, + 4807: 0xC3DD, + 4808: 0xC3DE, + 4809: 0xC3E1, + 4810: 0xC3E3, + 4811: 0xC3E4, + 4812: 0xC3E5, + 4813: 0xC3E6, + 4814: 0xC3E7, + 4815: 0xC3EA, + 4816: 0xC3EB, + 4817: 0xC3EC, + 4818: 0xC3EE, + 4819: 0xC3EF, + 4820: 0xC3F0, + 4821: 0xC3F1, + 4822: 0xC3F2, + 4823: 0xC3F3, + 4824: 0xC3F6, + 4825: 0xC3F7, + 4826: 0xC3F9, + 4827: 0xC3FA, + 4828: 0xC3FB, + 4829: 0xC3FC, + 4830: 0xC3FD, + 4831: 0xC3FE, + 4832: 0xC3FF, + 4833: 0xC400, + 4834: 0xC401, + 4835: 0xC402, + 4836: 0xC403, + 4837: 0xC404, + 4838: 0xC405, + 4839: 0xC406, + 4840: 0xC407, + 4841: 0xC409, + 4842: 0xC40A, + 4843: 0xC40B, + 4844: 0xC40C, + 4845: 0xC40D, + 4846: 0xC40E, + 4847: 0xC40F, + 4848: 0xC411, + 4849: 0xC412, + 4850: 0xC413, + 4851: 0xC414, + 4852: 0xC415, + 4853: 0xC416, + 4854: 0xC417, + 4855: 0xC418, + 4856: 0xC419, + 4857: 0xC41A, + 4858: 0xC41B, + 4859: 0xC41C, + 4860: 0xC41D, + 4861: 0xC41E, + 4862: 0xC41F, + 4863: 0xC420, + 4864: 0xC421, + 4865: 0xC422, + 4866: 0xC423, + 4867: 0xC425, + 4868: 0xC426, + 4869: 0xC427, + 4870: 0xC428, + 4871: 0xC429, + 4872: 0xC42A, + 4873: 0xC42B, + 4874: 0xC42D, + 4875: 0xC42E, + 4876: 0xC42F, + 4877: 0xC431, + 4878: 0xC432, + 4879: 0xC433, + 4880: 0xC435, + 4881: 0xC436, + 4882: 0xC437, + 4883: 0xC438, + 4884: 0xC439, + 4885: 0xC43A, + 4886: 0xC43B, + 4887: 0xC43E, + 4888: 0xC43F, + 4889: 0xC440, + 4890: 0xC441, + 4891: 0xC442, + 4892: 0xC443, + 4893: 0xC444, + 4894: 0xC445, + 4895: 0xC446, + 4896: 0xC447, + 4897: 0xC449, + 4898: 0xC44A, + 4899: 0xC44B, + 4900: 0xC44C, + 4901: 0xC44D, + 4902: 0xC44E, + 4903: 0xC44F, + 4904: 0xC450, + 4905: 0xC451, + 4906: 0xC452, + 4907: 0xC453, + 4908: 0xC454, + 4909: 0xC455, + 4910: 0xC456, + 4911: 0xC457, + 4912: 0xC458, + 4913: 0xC459, + 4914: 0xC45A, + 4915: 0xC45B, + 4916: 0xC45C, + 4917: 0xC45D, + 4918: 0xC45E, + 4919: 0xC45F, + 4920: 0xC460, + 4921: 0xC461, + 4922: 0xC462, + 4923: 0xC463, + 4924: 0xC466, + 4925: 0xC467, + 4926: 0xC469, + 4927: 0xC46A, + 4928: 0xC46B, + 4929: 0xC46D, + 4930: 0xC46E, + 4931: 0xC46F, + 4932: 0xC470, + 4933: 0xC471, + 4934: 0xC472, + 4935: 0xC473, + 4936: 0xC476, + 4937: 0xC477, + 4938: 0xC478, + 4939: 0xC47A, + 4940: 0xC47B, + 4941: 0xC47C, + 4942: 0xC47D, + 4943: 0xC47E, + 4944: 0xC47F, + 4945: 0xC481, + 4946: 0xC482, + 4947: 0xC483, + 4948: 0xC484, + 4949: 0xC485, + 4950: 0xC486, + 4951: 0xC487, + 4952: 0xC488, + 4953: 0xC489, + 4954: 0xC48A, + 4955: 0xC48B, + 4956: 0xC48C, + 4957: 0xC48D, + 4958: 0xC48E, + 4959: 0xC48F, + 4960: 0xC490, + 4961: 0xC491, + 4962: 0xC492, + 4963: 0xC493, + 4964: 0xC495, + 4965: 0xC496, + 4966: 0xC497, + 4967: 0xC498, + 4968: 0xC499, + 4969: 0xC49A, + 4970: 0xC49B, + 4971: 0xC49D, + 4972: 0xC49E, + 4973: 0xC49F, + 4974: 0xC4A0, + 4975: 0xC4A1, + 4976: 0xC4A2, + 4977: 0xC4A3, + 4978: 0xC4A4, + 4979: 0xC4A5, + 4980: 0xC4A6, + 4981: 0xC4A7, + 4982: 0xC4A8, + 4983: 0xC4A9, + 4984: 0xC4AA, + 4985: 0xC4AB, + 4986: 0xC4AC, + 4987: 0xC4AD, + 4988: 0xC4AE, + 4989: 0xC4AF, + 4990: 0xC4B0, + 4991: 0xC4B1, + 4992: 0xC4B2, + 4993: 0xC4B3, + 4994: 0xC4B4, + 4995: 0xC4B5, + 4996: 0xC4B6, + 4997: 0xC4B7, + 4998: 0xC4B9, + 4999: 0xC4BA, + 5000: 0xC4BB, + 5001: 0xC4BD, + 5002: 0xC4BE, + 5003: 0xC4BF, + 5004: 0xC4C0, + 5005: 0xC4C1, + 5006: 0xC4C2, + 5007: 0xC4C3, + 5008: 0xC4C4, + 5009: 0xC4C5, + 5010: 0xC4C6, + 5011: 0xC4C7, + 5012: 0xC4C8, + 5013: 0xC4C9, + 5014: 0xC4CA, + 5015: 0xC4CB, + 5016: 0xC4CC, + 5017: 0xC4CD, + 5018: 0xC4CE, + 5019: 0xC4CF, + 5020: 0xC4D0, + 5021: 0xC4D1, + 5022: 0xC4D2, + 5023: 0xC4D3, + 5024: 0xC4D4, + 5025: 0xC4D5, + 5026: 0xC4D6, + 5027: 0xC4D7, + 5028: 0xC4D8, + 5029: 0xC4D9, + 5030: 0xC4DA, + 5031: 0xC4DB, + 5032: 0xC4DC, + 5033: 0xC4DD, + 5034: 0xC4DE, + 5035: 0xC4DF, + 5036: 0xC4E0, + 5037: 0xC4E1, + 5038: 0xC4E2, + 5039: 0xC4E3, + 5040: 0xC4E4, + 5041: 0xC4E5, + 5042: 0xC4E6, + 5043: 0xC4E7, + 5044: 0xC4E8, + 5045: 0xC4EA, + 5046: 0xC4EB, + 5047: 0xC4EC, + 5048: 0xC4ED, + 5049: 0xC4EE, + 5050: 0xC4EF, + 5051: 0xC4F2, + 5052: 0xC4F3, + 5053: 0xC4F5, + 5054: 0xC4F6, + 5055: 0xC4F7, + 5056: 0xC4F9, + 5057: 0xC4FB, + 5058: 0xC4FC, + 5059: 0xC4FD, + 5060: 0xC4FE, + 5061: 0xC502, + 5062: 0xC503, + 5063: 0xC504, + 5064: 0xC505, + 5065: 0xC506, + 5066: 0xC507, + 5067: 0xC508, + 5068: 0xC509, + 5069: 0xC50A, + 5070: 0xC50B, + 5071: 0xC50D, + 5072: 0xC50E, + 5073: 0xC50F, + 5074: 0xC511, + 5075: 0xC512, + 5076: 0xC513, + 5077: 0xC515, + 5078: 0xC516, + 5079: 0xC517, + 5080: 0xC518, + 5081: 0xC519, + 5082: 0xC51A, + 5083: 0xC51B, + 5084: 0xC51D, + 5085: 0xC51E, + 5086: 0xC51F, + 5087: 0xC520, + 5088: 0xC521, + 5089: 0xC522, + 5090: 0xC523, + 5091: 0xC524, + 5092: 0xC525, + 5093: 0xC526, + 5094: 0xC527, + 5095: 0xC52A, + 5096: 0xC52B, + 5097: 0xC52D, + 5098: 0xC52E, + 5099: 0xC52F, + 5100: 0xC531, + 5101: 0xC532, + 5102: 0xC533, + 5103: 0xC534, + 5104: 0xC535, + 5105: 0xC536, + 5106: 0xC537, + 5107: 0xC53A, + 5108: 0xC53C, + 5109: 0xC53E, + 5110: 0xC53F, + 5111: 0xC540, + 5112: 0xC541, + 5113: 0xC542, + 5114: 0xC543, + 5115: 0xC546, + 5116: 0xC547, + 5117: 0xC54B, + 5118: 0xC54F, + 5119: 0xC550, + 5120: 0xC551, + 5121: 0xC552, + 5122: 0xC556, + 5123: 0xC55A, + 5124: 0xC55B, + 5125: 0xC55C, + 5126: 0xC55F, + 5127: 0xC562, + 5128: 0xC563, + 5129: 0xC565, + 5130: 0xC566, + 5131: 0xC567, + 5132: 0xC569, + 5133: 0xC56A, + 5134: 0xC56B, + 5135: 0xC56C, + 5136: 0xC56D, + 5137: 0xC56E, + 5138: 0xC56F, + 5139: 0xC572, + 5140: 0xC576, + 5141: 0xC577, + 5142: 0xC578, + 5143: 0xC579, + 5144: 0xC57A, + 5145: 0xC57B, + 5146: 0xC57E, + 5147: 0xC57F, + 5148: 0xC581, + 5149: 0xC582, + 5150: 0xC583, + 5151: 0xC585, + 5152: 0xC586, + 5153: 0xC588, + 5154: 0xC589, + 5155: 0xC58A, + 5156: 0xC58B, + 5157: 0xC58E, + 5158: 0xC590, + 5159: 0xC592, + 5160: 0xC593, + 5161: 0xC594, + 5162: 0xC596, + 5163: 0xC599, + 5164: 0xC59A, + 5165: 0xC59B, + 5166: 0xC59D, + 5167: 0xC59E, + 5168: 0xC59F, + 5169: 0xC5A1, + 5170: 0xC5A2, + 5171: 0xC5A3, + 5172: 0xC5A4, + 5173: 0xC5A5, + 5174: 0xC5A6, + 5175: 0xC5A7, + 5176: 0xC5A8, + 5177: 0xC5AA, + 5178: 0xC5AB, + 5179: 0xC5AC, + 5180: 0xC5AD, + 5181: 0xC5AE, + 5182: 0xC5AF, + 5183: 0xC5B0, + 5184: 0xC5B1, + 5185: 0xC5B2, + 5186: 0xC5B3, + 5187: 0xC5B6, + 5188: 0xC5B7, + 5189: 0xC5BA, + 5190: 0xC5BF, + 5191: 0xC5C0, + 5192: 0xC5C1, + 5193: 0xC5C2, + 5194: 0xC5C3, + 5195: 0xC5CB, + 5196: 0xC5CD, + 5197: 0xC5CF, + 5198: 0xC5D2, + 5199: 0xC5D3, + 5200: 0xC5D5, + 5201: 0xC5D6, + 5202: 0xC5D7, + 5203: 0xC5D9, + 5204: 0xC5DA, + 5205: 0xC5DB, + 5206: 0xC5DC, + 5207: 0xC5DD, + 5208: 0xC5DE, + 5209: 0xC5DF, + 5210: 0xC5E2, + 5211: 0xC5E4, + 5212: 0xC5E6, + 5213: 0xC5E7, + 5214: 0xC5E8, + 5215: 0xC5E9, + 5216: 0xC5EA, + 5217: 0xC5EB, + 5218: 0xC5EF, + 5219: 0xC5F1, + 5220: 0xC5F2, + 5221: 0xC5F3, + 5222: 0xC5F5, + 5223: 0xC5F8, + 5224: 0xC5F9, + 5225: 0xC5FA, + 5226: 0xC5FB, + 5227: 0xC602, + 5228: 0xC603, + 5229: 0xC604, + 5230: 0xC609, + 5231: 0xC60A, + 5232: 0xC60B, + 5233: 0xC60D, + 5234: 0xC60E, + 5235: 0xC60F, + 5236: 0xC611, + 5237: 0xC612, + 5238: 0xC613, + 5239: 0xC614, + 5240: 0xC615, + 5241: 0xC616, + 5242: 0xC617, + 5243: 0xC61A, + 5244: 0xC61D, + 5245: 0xC61E, + 5246: 0xC61F, + 5247: 0xC620, + 5248: 0xC621, + 5249: 0xC622, + 5250: 0xC623, + 5251: 0xC626, + 5252: 0xC627, + 5253: 0xC629, + 5254: 0xC62A, + 5255: 0xC62B, + 5256: 0xC62F, + 5257: 0xC631, + 5258: 0xC632, + 5259: 0xC636, + 5260: 0xC638, + 5261: 0xC63A, + 5262: 0xC63C, + 5263: 0xC63D, + 5264: 0xC63E, + 5265: 0xC63F, + 5266: 0xC642, + 5267: 0xC643, + 5268: 0xC645, + 5269: 0xC646, + 5270: 0xC647, + 5271: 0xC649, + 5272: 0xC64A, + 5273: 0xC64B, + 5274: 0xC64C, + 5275: 0xC64D, + 5276: 0xC64E, + 5277: 0xC64F, + 5278: 0xC652, + 5279: 0xC656, + 5280: 0xC657, + 5281: 0xC658, + 5282: 0xC659, + 5283: 0xC65A, + 5284: 0xC65B, + 5285: 0xC65E, + 5286: 0xC65F, + 5287: 0xC661, + 5288: 0xC662, + 5289: 0xC663, + 5290: 0xC664, + 5291: 0xC665, + 5292: 0xC666, + 5293: 0xC667, + 5294: 0xC668, + 5295: 0xC669, + 5296: 0xC66A, + 5297: 0xC66B, + 5298: 0xC66D, + 5299: 0xC66E, + 5300: 0xC670, + 5301: 0xC672, + 5302: 0xC673, + 5303: 0xC674, + 5304: 0xC675, + 5305: 0xC676, + 5306: 0xC677, + 5307: 0xC67A, + 5308: 0xC67B, + 5309: 0xC67D, + 5310: 0xC67E, + 5311: 0xC67F, + 5312: 0xC681, + 5313: 0xC682, + 5314: 0xC683, + 5315: 0xC684, + 5316: 0xC685, + 5317: 0xC686, + 5318: 0xC687, + 5319: 0xC68A, + 5320: 0xC68C, + 5321: 0xC68E, + 5322: 0xC68F, + 5323: 0xC690, + 5324: 0xC691, + 5325: 0xC692, + 5326: 0xC693, + 5327: 0xC696, + 5328: 0xC697, + 5329: 0xC699, + 5330: 0xC69A, + 5331: 0xC69B, + 5332: 0xC69D, + 5333: 0xC69E, + 5334: 0xC69F, + 5335: 0xC6A0, + 5336: 0xC6A1, + 5337: 0xC6A2, + 5338: 0xC6A3, + 5339: 0xC6A6, + 5340: 0xC6A8, + 5341: 0xC6AA, + 5342: 0xC6AB, + 5343: 0xC6AC, + 5344: 0xC6AD, + 5345: 0xC6AE, + 5346: 0xC6AF, + 5347: 0xC6B2, + 5348: 0xC6B3, + 5349: 0xC6B5, + 5350: 0xC6B6, + 5351: 0xC6B7, + 5352: 0xC6BB, + 5353: 0xC6BC, + 5354: 0xC6BD, + 5355: 0xC6BE, + 5356: 0xC6BF, + 5357: 0xC6C2, + 5358: 0xC6C4, + 5359: 0xC6C6, + 5360: 0xC6C7, + 5361: 0xC6C8, + 5362: 0xC6C9, + 5363: 0xC6CA, + 5364: 0xC6CB, + 5365: 0xC6CE, + 5366: 0xC6CF, + 5367: 0xC6D1, + 5368: 0xC6D2, + 5369: 0xC6D3, + 5370: 0xC6D5, + 5371: 0xC6D6, + 5372: 0xC6D7, + 5373: 0xC6D8, + 5374: 0xC6D9, + 5375: 0xC6DA, + 5376: 0xC6DB, + 5377: 0xC6DE, + 5378: 0xC6DF, + 5379: 0xC6E2, + 5380: 0xC6E3, + 5381: 0xC6E4, + 5382: 0xC6E5, + 5383: 0xC6E6, + 5384: 0xC6E7, + 5385: 0xC6EA, + 5386: 0xC6EB, + 5387: 0xC6ED, + 5388: 0xC6EE, + 5389: 0xC6EF, + 5390: 0xC6F1, + 5391: 0xC6F2, + 5392: 0xC6F3, + 5393: 0xC6F4, + 5394: 0xC6F5, + 5395: 0xC6F6, + 5396: 0xC6F7, + 5397: 0xC6FA, + 5398: 0xC6FB, + 5399: 0xC6FC, + 5400: 0xC6FE, + 5401: 0xC6FF, + 5402: 0xC700, + 5403: 0xC701, + 5404: 0xC702, + 5405: 0xC703, + 5406: 0xC706, + 5407: 0xC707, + 5408: 0xC709, + 5409: 0xC70A, + 5410: 0xC70B, + 5411: 0xC70D, + 5412: 0xC70E, + 5413: 0xC70F, + 5414: 0xC710, + 5415: 0xC711, + 5416: 0xC712, + 5417: 0xC713, + 5418: 0xC716, + 5419: 0xC718, + 5420: 0xC71A, + 5421: 0xC71B, + 5422: 0xC71C, + 5423: 0xC71D, + 5424: 0xC71E, + 5425: 0xC71F, + 5426: 0xC722, + 5427: 0xC723, + 5428: 0xC725, + 5429: 0xC726, + 5430: 0xC727, + 5431: 0xC729, + 5432: 0xC72A, + 5433: 0xC72B, + 5434: 0xC72C, + 5435: 0xC72D, + 5436: 0xC72E, + 5437: 0xC72F, + 5438: 0xC732, + 5439: 0xC734, + 5440: 0xC736, + 5441: 0xC738, + 5442: 0xC739, + 5443: 0xC73A, + 5444: 0xC73B, + 5445: 0xC73E, + 5446: 0xC73F, + 5447: 0xC741, + 5448: 0xC742, + 5449: 0xC743, + 5450: 0xC745, + 5451: 0xC746, + 5452: 0xC747, + 5453: 0xC748, + 5454: 0xC749, + 5455: 0xC74B, + 5456: 0xC74E, + 5457: 0xC750, + 5458: 0xC759, + 5459: 0xC75A, + 5460: 0xC75B, + 5461: 0xC75D, + 5462: 0xC75E, + 5463: 0xC75F, + 5464: 0xC761, + 5465: 0xC762, + 5466: 0xC763, + 5467: 0xC764, + 5468: 0xC765, + 5469: 0xC766, + 5470: 0xC767, + 5471: 0xC769, + 5472: 0xC76A, + 5473: 0xC76C, + 5474: 0xC76D, + 5475: 0xC76E, + 5476: 0xC76F, + 5477: 0xC770, + 5478: 0xC771, + 5479: 0xC772, + 5480: 0xC773, + 5481: 0xC776, + 5482: 0xC777, + 5483: 0xC779, + 5484: 0xC77A, + 5485: 0xC77B, + 5486: 0xC77F, + 5487: 0xC780, + 5488: 0xC781, + 5489: 0xC782, + 5490: 0xC786, + 5491: 0xC78B, + 5492: 0xC78C, + 5493: 0xC78D, + 5494: 0xC78F, + 5495: 0xC792, + 5496: 0xC793, + 5497: 0xC795, + 5498: 0xC799, + 5499: 0xC79B, + 5500: 0xC79C, + 5501: 0xC79D, + 5502: 0xC79E, + 5503: 0xC79F, + 5504: 0xC7A2, + 5505: 0xC7A7, + 5506: 0xC7A8, + 5507: 0xC7A9, + 5508: 0xC7AA, + 5509: 0xC7AB, + 5510: 0xC7AE, + 5511: 0xC7AF, + 5512: 0xC7B1, + 5513: 0xC7B2, + 5514: 0xC7B3, + 5515: 0xC7B5, + 5516: 0xC7B6, + 5517: 0xC7B7, + 5518: 0xC7B8, + 5519: 0xC7B9, + 5520: 0xC7BA, + 5521: 0xC7BB, + 5522: 0xC7BE, + 5523: 0xC7C2, + 5524: 0xC7C3, + 5525: 0xC7C4, + 5526: 0xC7C5, + 5527: 0xC7C6, + 5528: 0xC7C7, + 5529: 0xC7CA, + 5530: 0xC7CB, + 5531: 0xC7CD, + 5532: 0xC7CF, + 5533: 0xC7D1, + 5534: 0xC7D2, + 5535: 0xC7D3, + 5536: 0xC7D4, + 5537: 0xC7D5, + 5538: 0xC7D6, + 5539: 0xC7D7, + 5540: 0xC7D9, + 5541: 0xC7DA, + 5542: 0xC7DB, + 5543: 0xC7DC, + 5544: 0xC7DE, + 5545: 0xC7DF, + 5546: 0xC7E0, + 5547: 0xC7E1, + 5548: 0xC7E2, + 5549: 0xC7E3, + 5550: 0xC7E5, + 5551: 0xC7E6, + 5552: 0xC7E7, + 5553: 0xC7E9, + 5554: 0xC7EA, + 5555: 0xC7EB, + 5556: 0xC7ED, + 5557: 0xC7EE, + 5558: 0xC7EF, + 5559: 0xC7F0, + 5560: 0xC7F1, + 5561: 0xC7F2, + 5562: 0xC7F3, + 5563: 0xC7F4, + 5564: 0xC7F5, + 5565: 0xC7F6, + 5566: 0xC7F7, + 5567: 0xC7F8, + 5568: 0xC7F9, + 5569: 0xC7FA, + 5570: 0xC7FB, + 5571: 0xC7FC, + 5572: 0xC7FD, + 5573: 0xC7FE, + 5574: 0xC7FF, + 5575: 0xC802, + 5576: 0xC803, + 5577: 0xC805, + 5578: 0xC806, + 5579: 0xC807, + 5580: 0xC809, + 5581: 0xC80B, + 5582: 0xC80C, + 5583: 0xC80D, + 5584: 0xC80E, + 5585: 0xC80F, + 5586: 0xC812, + 5587: 0xC814, + 5588: 0xC817, + 5589: 0xC818, + 5590: 0xC819, + 5591: 0xC81A, + 5592: 0xC81B, + 5593: 0xC81E, + 5594: 0xC81F, + 5595: 0xC821, + 5596: 0xC822, + 5597: 0xC823, + 5598: 0xC825, + 5599: 0xC826, + 5600: 0xC827, + 5601: 0xC828, + 5602: 0xC829, + 5603: 0xC82A, + 5604: 0xC82B, + 5605: 0xC82E, + 5606: 0xC830, + 5607: 0xC832, + 5608: 0xC833, + 5609: 0xC834, + 5610: 0xC835, + 5611: 0xC836, + 5612: 0xC837, + 5613: 0xC839, + 5614: 0xC83A, + 5615: 0xC83B, + 5616: 0xC83D, + 5617: 0xC83E, + 5618: 0xC83F, + 5619: 0xC841, + 5620: 0xC842, + 5621: 0xC843, + 5622: 0xC844, + 5623: 0xC845, + 5624: 0xC846, + 5625: 0xC847, + 5626: 0xC84A, + 5627: 0xC84B, + 5628: 0xC84E, + 5629: 0xC84F, + 5630: 0xC850, + 5631: 0xC851, + 5632: 0xC852, + 5633: 0xC853, + 5634: 0xC855, + 5635: 0xC856, + 5636: 0xC857, + 5637: 0xC858, + 5638: 0xC859, + 5639: 0xC85A, + 5640: 0xC85B, + 5641: 0xC85C, + 5642: 0xC85D, + 5643: 0xC85E, + 5644: 0xC85F, + 5645: 0xC860, + 5646: 0xC861, + 5647: 0xC862, + 5648: 0xC863, + 5649: 0xC864, + 5650: 0xC865, + 5651: 0xC866, + 5652: 0xC867, + 5653: 0xC868, + 5654: 0xC869, + 5655: 0xC86A, + 5656: 0xC86B, + 5657: 0xC86C, + 5658: 0xC86D, + 5659: 0xC86E, + 5660: 0xC86F, + 5661: 0xC872, + 5662: 0xC873, + 5663: 0xC875, + 5664: 0xC876, + 5665: 0xC877, + 5666: 0xC879, + 5667: 0xC87B, + 5668: 0xC87C, + 5669: 0xC87D, + 5670: 0xC87E, + 5671: 0xC87F, + 5672: 0xC882, + 5673: 0xC884, + 5674: 0xC888, + 5675: 0xC889, + 5676: 0xC88A, + 5677: 0xC88E, + 5678: 0xC88F, + 5679: 0xC890, + 5680: 0xC891, + 5681: 0xC892, + 5682: 0xC893, + 5683: 0xC895, + 5684: 0xC896, + 5685: 0xC897, + 5686: 0xC898, + 5687: 0xC899, + 5688: 0xC89A, + 5689: 0xC89B, + 5690: 0xC89C, + 5691: 0xC89E, + 5692: 0xC8A0, + 5693: 0xC8A2, + 5694: 0xC8A3, + 5695: 0xC8A4, + 5696: 0xC8A5, + 5697: 0xC8A6, + 5698: 0xC8A7, + 5699: 0xC8A9, + 5700: 0xC8AA, + 5701: 0xC8AB, + 5702: 0xC8AC, + 5703: 0xC8AD, + 5704: 0xC8AE, + 5705: 0xC8AF, + 5706: 0xC8B0, + 5707: 0xC8B1, + 5708: 0xC8B2, + 5709: 0xC8B3, + 5710: 0xC8B4, + 5711: 0xC8B5, + 5712: 0xC8B6, + 5713: 0xC8B7, + 5714: 0xC8B8, + 5715: 0xC8B9, + 5716: 0xC8BA, + 5717: 0xC8BB, + 5718: 0xC8BE, + 5719: 0xC8BF, + 5720: 0xC8C0, + 5721: 0xC8C1, + 5722: 0xC8C2, + 5723: 0xC8C3, + 5724: 0xC8C5, + 5725: 0xC8C6, + 5726: 0xC8C7, + 5727: 0xC8C9, + 5728: 0xC8CA, + 5729: 0xC8CB, + 5730: 0xC8CD, + 5731: 0xC8CE, + 5732: 0xC8CF, + 5733: 0xC8D0, + 5734: 0xC8D1, + 5735: 0xC8D2, + 5736: 0xC8D3, + 5737: 0xC8D6, + 5738: 0xC8D8, + 5739: 0xC8DA, + 5740: 0xC8DB, + 5741: 0xC8DC, + 5742: 0xC8DD, + 5743: 0xC8DE, + 5744: 0xC8DF, + 5745: 0xC8E2, + 5746: 0xC8E3, + 5747: 0xC8E5, + 5748: 0xC8E6, + 5749: 0xC8E7, + 5750: 0xC8E8, + 5751: 0xC8E9, + 5752: 0xC8EA, + 5753: 0xC8EB, + 5754: 0xC8EC, + 5755: 0xC8ED, + 5756: 0xC8EE, + 5757: 0xC8EF, + 5758: 0xC8F0, + 5759: 0xC8F1, + 5760: 0xC8F2, + 5761: 0xC8F3, + 5762: 0xC8F4, + 5763: 0xC8F6, + 5764: 0xC8F7, + 5765: 0xC8F8, + 5766: 0xC8F9, + 5767: 0xC8FA, + 5768: 0xC8FB, + 5769: 0xC8FE, + 5770: 0xC8FF, + 5771: 0xC901, + 5772: 0xC902, + 5773: 0xC903, + 5774: 0xC907, + 5775: 0xC908, + 5776: 0xC909, + 5777: 0xC90A, + 5778: 0xC90B, + 5779: 0xC90E, + 5780: 0x3000, + 5781: 0x3001, + 5782: 0x3002, + 5783: 0x00B7, + 5784: 0x2025, + 5785: 0x2026, + 5786: 0x00A8, + 5787: 0x3003, + 5788: 0x00AD, + 5789: 0x2015, + 5790: 0x2225, + 5791: 0xFF3C, + 5792: 0x223C, + 5793: 0x2018, + 5794: 0x2019, + 5795: 0x201C, + 5796: 0x201D, + 5797: 0x3014, + 5798: 0x3015, + 5799: 0x3008, + 5800: 0x3009, + 5801: 0x300A, + 5802: 0x300B, + 5803: 0x300C, + 5804: 0x300D, + 5805: 0x300E, + 5806: 0x300F, + 5807: 0x3010, + 5808: 0x3011, + 5809: 0x00B1, + 5810: 0x00D7, + 5811: 0x00F7, + 5812: 0x2260, + 5813: 0x2264, + 5814: 0x2265, + 5815: 0x221E, + 5816: 0x2234, + 5817: 0x00B0, + 5818: 0x2032, + 5819: 0x2033, + 5820: 0x2103, + 5821: 0x212B, + 5822: 0xFFE0, + 5823: 0xFFE1, + 5824: 0xFFE5, + 5825: 0x2642, + 5826: 0x2640, + 5827: 0x2220, + 5828: 0x22A5, + 5829: 0x2312, + 5830: 0x2202, + 5831: 0x2207, + 5832: 0x2261, + 5833: 0x2252, + 5834: 0x00A7, + 5835: 0x203B, + 5836: 0x2606, + 5837: 0x2605, + 5838: 0x25CB, + 5839: 0x25CF, + 5840: 0x25CE, + 5841: 0x25C7, + 5842: 0x25C6, + 5843: 0x25A1, + 5844: 0x25A0, + 5845: 0x25B3, + 5846: 0x25B2, + 5847: 0x25BD, + 5848: 0x25BC, + 5849: 0x2192, + 5850: 0x2190, + 5851: 0x2191, + 5852: 0x2193, + 5853: 0x2194, + 5854: 0x3013, + 5855: 0x226A, + 5856: 0x226B, + 5857: 0x221A, + 5858: 0x223D, + 5859: 0x221D, + 5860: 0x2235, + 5861: 0x222B, + 5862: 0x222C, + 5863: 0x2208, + 5864: 0x220B, + 5865: 0x2286, + 5866: 0x2287, + 5867: 0x2282, + 5868: 0x2283, + 5869: 0x222A, + 5870: 0x2229, + 5871: 0x2227, + 5872: 0x2228, + 5873: 0xFFE2, + 5874: 0xC910, + 5875: 0xC912, + 5876: 0xC913, + 5877: 0xC914, + 5878: 0xC915, + 5879: 0xC916, + 5880: 0xC917, + 5881: 0xC919, + 5882: 0xC91A, + 5883: 0xC91B, + 5884: 0xC91C, + 5885: 0xC91D, + 5886: 0xC91E, + 5887: 0xC91F, + 5888: 0xC920, + 5889: 0xC921, + 5890: 0xC922, + 5891: 0xC923, + 5892: 0xC924, + 5893: 0xC925, + 5894: 0xC926, + 5895: 0xC927, + 5896: 0xC928, + 5897: 0xC929, + 5898: 0xC92A, + 5899: 0xC92B, + 5900: 0xC92D, + 5901: 0xC92E, + 5902: 0xC92F, + 5903: 0xC930, + 5904: 0xC931, + 5905: 0xC932, + 5906: 0xC933, + 5907: 0xC935, + 5908: 0xC936, + 5909: 0xC937, + 5910: 0xC938, + 5911: 0xC939, + 5912: 0xC93A, + 5913: 0xC93B, + 5914: 0xC93C, + 5915: 0xC93D, + 5916: 0xC93E, + 5917: 0xC93F, + 5918: 0xC940, + 5919: 0xC941, + 5920: 0xC942, + 5921: 0xC943, + 5922: 0xC944, + 5923: 0xC945, + 5924: 0xC946, + 5925: 0xC947, + 5926: 0xC948, + 5927: 0xC949, + 5928: 0xC94A, + 5929: 0xC94B, + 5930: 0xC94C, + 5931: 0xC94D, + 5932: 0xC94E, + 5933: 0xC94F, + 5934: 0xC952, + 5935: 0xC953, + 5936: 0xC955, + 5937: 0xC956, + 5938: 0xC957, + 5939: 0xC959, + 5940: 0xC95A, + 5941: 0xC95B, + 5942: 0xC95C, + 5943: 0xC95D, + 5944: 0xC95E, + 5945: 0xC95F, + 5946: 0xC962, + 5947: 0xC964, + 5948: 0xC965, + 5949: 0xC966, + 5950: 0xC967, + 5951: 0xC968, + 5952: 0xC969, + 5953: 0xC96A, + 5954: 0xC96B, + 5955: 0xC96D, + 5956: 0xC96E, + 5957: 0xC96F, + 5958: 0x21D2, + 5959: 0x21D4, + 5960: 0x2200, + 5961: 0x2203, + 5962: 0x00B4, + 5963: 0xFF5E, + 5964: 0x02C7, + 5965: 0x02D8, + 5966: 0x02DD, + 5967: 0x02DA, + 5968: 0x02D9, + 5969: 0x00B8, + 5970: 0x02DB, + 5971: 0x00A1, + 5972: 0x00BF, + 5973: 0x02D0, + 5974: 0x222E, + 5975: 0x2211, + 5976: 0x220F, + 5977: 0x00A4, + 5978: 0x2109, + 5979: 0x2030, + 5980: 0x25C1, + 5981: 0x25C0, + 5982: 0x25B7, + 5983: 0x25B6, + 5984: 0x2664, + 5985: 0x2660, + 5986: 0x2661, + 5987: 0x2665, + 5988: 0x2667, + 5989: 0x2663, + 5990: 0x2299, + 5991: 0x25C8, + 5992: 0x25A3, + 5993: 0x25D0, + 5994: 0x25D1, + 5995: 0x2592, + 5996: 0x25A4, + 5997: 0x25A5, + 5998: 0x25A8, + 5999: 0x25A7, + 6000: 0x25A6, + 6001: 0x25A9, + 6002: 0x2668, + 6003: 0x260F, + 6004: 0x260E, + 6005: 0x261C, + 6006: 0x261E, + 6007: 0x00B6, + 6008: 0x2020, + 6009: 0x2021, + 6010: 0x2195, + 6011: 0x2197, + 6012: 0x2199, + 6013: 0x2196, + 6014: 0x2198, + 6015: 0x266D, + 6016: 0x2669, + 6017: 0x266A, + 6018: 0x266C, + 6019: 0x327F, + 6020: 0x321C, + 6021: 0x2116, + 6022: 0x33C7, + 6023: 0x2122, + 6024: 0x33C2, + 6025: 0x33D8, + 6026: 0x2121, + 6027: 0x20AC, + 6028: 0x00AE, + 6052: 0xC971, + 6053: 0xC972, + 6054: 0xC973, + 6055: 0xC975, + 6056: 0xC976, + 6057: 0xC977, + 6058: 0xC978, + 6059: 0xC979, + 6060: 0xC97A, + 6061: 0xC97B, + 6062: 0xC97D, + 6063: 0xC97E, + 6064: 0xC97F, + 6065: 0xC980, + 6066: 0xC981, + 6067: 0xC982, + 6068: 0xC983, + 6069: 0xC984, + 6070: 0xC985, + 6071: 0xC986, + 6072: 0xC987, + 6073: 0xC98A, + 6074: 0xC98B, + 6075: 0xC98D, + 6076: 0xC98E, + 6077: 0xC98F, + 6078: 0xC991, + 6079: 0xC992, + 6080: 0xC993, + 6081: 0xC994, + 6082: 0xC995, + 6083: 0xC996, + 6084: 0xC997, + 6085: 0xC99A, + 6086: 0xC99C, + 6087: 0xC99E, + 6088: 0xC99F, + 6089: 0xC9A0, + 6090: 0xC9A1, + 6091: 0xC9A2, + 6092: 0xC9A3, + 6093: 0xC9A4, + 6094: 0xC9A5, + 6095: 0xC9A6, + 6096: 0xC9A7, + 6097: 0xC9A8, + 6098: 0xC9A9, + 6099: 0xC9AA, + 6100: 0xC9AB, + 6101: 0xC9AC, + 6102: 0xC9AD, + 6103: 0xC9AE, + 6104: 0xC9AF, + 6105: 0xC9B0, + 6106: 0xC9B1, + 6107: 0xC9B2, + 6108: 0xC9B3, + 6109: 0xC9B4, + 6110: 0xC9B5, + 6111: 0xC9B6, + 6112: 0xC9B7, + 6113: 0xC9B8, + 6114: 0xC9B9, + 6115: 0xC9BA, + 6116: 0xC9BB, + 6117: 0xC9BC, + 6118: 0xC9BD, + 6119: 0xC9BE, + 6120: 0xC9BF, + 6121: 0xC9C2, + 6122: 0xC9C3, + 6123: 0xC9C5, + 6124: 0xC9C6, + 6125: 0xC9C9, + 6126: 0xC9CB, + 6127: 0xC9CC, + 6128: 0xC9CD, + 6129: 0xC9CE, + 6130: 0xC9CF, + 6131: 0xC9D2, + 6132: 0xC9D4, + 6133: 0xC9D7, + 6134: 0xC9D8, + 6135: 0xC9DB, + 6136: 0xFF01, + 6137: 0xFF02, + 6138: 0xFF03, + 6139: 0xFF04, + 6140: 0xFF05, + 6141: 0xFF06, + 6142: 0xFF07, + 6143: 0xFF08, + 6144: 0xFF09, + 6145: 0xFF0A, + 6146: 0xFF0B, + 6147: 0xFF0C, + 6148: 0xFF0D, + 6149: 0xFF0E, + 6150: 0xFF0F, + 6151: 0xFF10, + 6152: 0xFF11, + 6153: 0xFF12, + 6154: 0xFF13, + 6155: 0xFF14, + 6156: 0xFF15, + 6157: 0xFF16, + 6158: 0xFF17, + 6159: 0xFF18, + 6160: 0xFF19, + 6161: 0xFF1A, + 6162: 0xFF1B, + 6163: 0xFF1C, + 6164: 0xFF1D, + 6165: 0xFF1E, + 6166: 0xFF1F, + 6167: 0xFF20, + 6168: 0xFF21, + 6169: 0xFF22, + 6170: 0xFF23, + 6171: 0xFF24, + 6172: 0xFF25, + 6173: 0xFF26, + 6174: 0xFF27, + 6175: 0xFF28, + 6176: 0xFF29, + 6177: 0xFF2A, + 6178: 0xFF2B, + 6179: 0xFF2C, + 6180: 0xFF2D, + 6181: 0xFF2E, + 6182: 0xFF2F, + 6183: 0xFF30, + 6184: 0xFF31, + 6185: 0xFF32, + 6186: 0xFF33, + 6187: 0xFF34, + 6188: 0xFF35, + 6189: 0xFF36, + 6190: 0xFF37, + 6191: 0xFF38, + 6192: 0xFF39, + 6193: 0xFF3A, + 6194: 0xFF3B, + 6195: 0xFFE6, + 6196: 0xFF3D, + 6197: 0xFF3E, + 6198: 0xFF3F, + 6199: 0xFF40, + 6200: 0xFF41, + 6201: 0xFF42, + 6202: 0xFF43, + 6203: 0xFF44, + 6204: 0xFF45, + 6205: 0xFF46, + 6206: 0xFF47, + 6207: 0xFF48, + 6208: 0xFF49, + 6209: 0xFF4A, + 6210: 0xFF4B, + 6211: 0xFF4C, + 6212: 0xFF4D, + 6213: 0xFF4E, + 6214: 0xFF4F, + 6215: 0xFF50, + 6216: 0xFF51, + 6217: 0xFF52, + 6218: 0xFF53, + 6219: 0xFF54, + 6220: 0xFF55, + 6221: 0xFF56, + 6222: 0xFF57, + 6223: 0xFF58, + 6224: 0xFF59, + 6225: 0xFF5A, + 6226: 0xFF5B, + 6227: 0xFF5C, + 6228: 0xFF5D, + 6229: 0xFFE3, + 6230: 0xC9DE, + 6231: 0xC9DF, + 6232: 0xC9E1, + 6233: 0xC9E3, + 6234: 0xC9E5, + 6235: 0xC9E6, + 6236: 0xC9E8, + 6237: 0xC9E9, + 6238: 0xC9EA, + 6239: 0xC9EB, + 6240: 0xC9EE, + 6241: 0xC9F2, + 6242: 0xC9F3, + 6243: 0xC9F4, + 6244: 0xC9F5, + 6245: 0xC9F6, + 6246: 0xC9F7, + 6247: 0xC9FA, + 6248: 0xC9FB, + 6249: 0xC9FD, + 6250: 0xC9FE, + 6251: 0xC9FF, + 6252: 0xCA01, + 6253: 0xCA02, + 6254: 0xCA03, + 6255: 0xCA04, + 6256: 0xCA05, + 6257: 0xCA06, + 6258: 0xCA07, + 6259: 0xCA0A, + 6260: 0xCA0E, + 6261: 0xCA0F, + 6262: 0xCA10, + 6263: 0xCA11, + 6264: 0xCA12, + 6265: 0xCA13, + 6266: 0xCA15, + 6267: 0xCA16, + 6268: 0xCA17, + 6269: 0xCA19, + 6270: 0xCA1A, + 6271: 0xCA1B, + 6272: 0xCA1C, + 6273: 0xCA1D, + 6274: 0xCA1E, + 6275: 0xCA1F, + 6276: 0xCA20, + 6277: 0xCA21, + 6278: 0xCA22, + 6279: 0xCA23, + 6280: 0xCA24, + 6281: 0xCA25, + 6282: 0xCA26, + 6283: 0xCA27, + 6284: 0xCA28, + 6285: 0xCA2A, + 6286: 0xCA2B, + 6287: 0xCA2C, + 6288: 0xCA2D, + 6289: 0xCA2E, + 6290: 0xCA2F, + 6291: 0xCA30, + 6292: 0xCA31, + 6293: 0xCA32, + 6294: 0xCA33, + 6295: 0xCA34, + 6296: 0xCA35, + 6297: 0xCA36, + 6298: 0xCA37, + 6299: 0xCA38, + 6300: 0xCA39, + 6301: 0xCA3A, + 6302: 0xCA3B, + 6303: 0xCA3C, + 6304: 0xCA3D, + 6305: 0xCA3E, + 6306: 0xCA3F, + 6307: 0xCA40, + 6308: 0xCA41, + 6309: 0xCA42, + 6310: 0xCA43, + 6311: 0xCA44, + 6312: 0xCA45, + 6313: 0xCA46, + 6314: 0x3131, + 6315: 0x3132, + 6316: 0x3133, + 6317: 0x3134, + 6318: 0x3135, + 6319: 0x3136, + 6320: 0x3137, + 6321: 0x3138, + 6322: 0x3139, + 6323: 0x313A, + 6324: 0x313B, + 6325: 0x313C, + 6326: 0x313D, + 6327: 0x313E, + 6328: 0x313F, + 6329: 0x3140, + 6330: 0x3141, + 6331: 0x3142, + 6332: 0x3143, + 6333: 0x3144, + 6334: 0x3145, + 6335: 0x3146, + 6336: 0x3147, + 6337: 0x3148, + 6338: 0x3149, + 6339: 0x314A, + 6340: 0x314B, + 6341: 0x314C, + 6342: 0x314D, + 6343: 0x314E, + 6344: 0x314F, + 6345: 0x3150, + 6346: 0x3151, + 6347: 0x3152, + 6348: 0x3153, + 6349: 0x3154, + 6350: 0x3155, + 6351: 0x3156, + 6352: 0x3157, + 6353: 0x3158, + 6354: 0x3159, + 6355: 0x315A, + 6356: 0x315B, + 6357: 0x315C, + 6358: 0x315D, + 6359: 0x315E, + 6360: 0x315F, + 6361: 0x3160, + 6362: 0x3161, + 6363: 0x3162, + 6364: 0x3163, + 6365: 0x3164, + 6366: 0x3165, + 6367: 0x3166, + 6368: 0x3167, + 6369: 0x3168, + 6370: 0x3169, + 6371: 0x316A, + 6372: 0x316B, + 6373: 0x316C, + 6374: 0x316D, + 6375: 0x316E, + 6376: 0x316F, + 6377: 0x3170, + 6378: 0x3171, + 6379: 0x3172, + 6380: 0x3173, + 6381: 0x3174, + 6382: 0x3175, + 6383: 0x3176, + 6384: 0x3177, + 6385: 0x3178, + 6386: 0x3179, + 6387: 0x317A, + 6388: 0x317B, + 6389: 0x317C, + 6390: 0x317D, + 6391: 0x317E, + 6392: 0x317F, + 6393: 0x3180, + 6394: 0x3181, + 6395: 0x3182, + 6396: 0x3183, + 6397: 0x3184, + 6398: 0x3185, + 6399: 0x3186, + 6400: 0x3187, + 6401: 0x3188, + 6402: 0x3189, + 6403: 0x318A, + 6404: 0x318B, + 6405: 0x318C, + 6406: 0x318D, + 6407: 0x318E, + 6408: 0xCA47, + 6409: 0xCA48, + 6410: 0xCA49, + 6411: 0xCA4A, + 6412: 0xCA4B, + 6413: 0xCA4E, + 6414: 0xCA4F, + 6415: 0xCA51, + 6416: 0xCA52, + 6417: 0xCA53, + 6418: 0xCA55, + 6419: 0xCA56, + 6420: 0xCA57, + 6421: 0xCA58, + 6422: 0xCA59, + 6423: 0xCA5A, + 6424: 0xCA5B, + 6425: 0xCA5E, + 6426: 0xCA62, + 6427: 0xCA63, + 6428: 0xCA64, + 6429: 0xCA65, + 6430: 0xCA66, + 6431: 0xCA67, + 6432: 0xCA69, + 6433: 0xCA6A, + 6434: 0xCA6B, + 6435: 0xCA6C, + 6436: 0xCA6D, + 6437: 0xCA6E, + 6438: 0xCA6F, + 6439: 0xCA70, + 6440: 0xCA71, + 6441: 0xCA72, + 6442: 0xCA73, + 6443: 0xCA74, + 6444: 0xCA75, + 6445: 0xCA76, + 6446: 0xCA77, + 6447: 0xCA78, + 6448: 0xCA79, + 6449: 0xCA7A, + 6450: 0xCA7B, + 6451: 0xCA7C, + 6452: 0xCA7E, + 6453: 0xCA7F, + 6454: 0xCA80, + 6455: 0xCA81, + 6456: 0xCA82, + 6457: 0xCA83, + 6458: 0xCA85, + 6459: 0xCA86, + 6460: 0xCA87, + 6461: 0xCA88, + 6462: 0xCA89, + 6463: 0xCA8A, + 6464: 0xCA8B, + 6465: 0xCA8C, + 6466: 0xCA8D, + 6467: 0xCA8E, + 6468: 0xCA8F, + 6469: 0xCA90, + 6470: 0xCA91, + 6471: 0xCA92, + 6472: 0xCA93, + 6473: 0xCA94, + 6474: 0xCA95, + 6475: 0xCA96, + 6476: 0xCA97, + 6477: 0xCA99, + 6478: 0xCA9A, + 6479: 0xCA9B, + 6480: 0xCA9C, + 6481: 0xCA9D, + 6482: 0xCA9E, + 6483: 0xCA9F, + 6484: 0xCAA0, + 6485: 0xCAA1, + 6486: 0xCAA2, + 6487: 0xCAA3, + 6488: 0xCAA4, + 6489: 0xCAA5, + 6490: 0xCAA6, + 6491: 0xCAA7, + 6492: 0x2170, + 6493: 0x2171, + 6494: 0x2172, + 6495: 0x2173, + 6496: 0x2174, + 6497: 0x2175, + 6498: 0x2176, + 6499: 0x2177, + 6500: 0x2178, + 6501: 0x2179, + 6507: 0x2160, + 6508: 0x2161, + 6509: 0x2162, + 6510: 0x2163, + 6511: 0x2164, + 6512: 0x2165, + 6513: 0x2166, + 6514: 0x2167, + 6515: 0x2168, + 6516: 0x2169, + 6524: 0x0391, + 6525: 0x0392, + 6526: 0x0393, + 6527: 0x0394, + 6528: 0x0395, + 6529: 0x0396, + 6530: 0x0397, + 6531: 0x0398, + 6532: 0x0399, + 6533: 0x039A, + 6534: 0x039B, + 6535: 0x039C, + 6536: 0x039D, + 6537: 0x039E, + 6538: 0x039F, + 6539: 0x03A0, + 6540: 0x03A1, + 6541: 0x03A3, + 6542: 0x03A4, + 6543: 0x03A5, + 6544: 0x03A6, + 6545: 0x03A7, + 6546: 0x03A8, + 6547: 0x03A9, + 6556: 0x03B1, + 6557: 0x03B2, + 6558: 0x03B3, + 6559: 0x03B4, + 6560: 0x03B5, + 6561: 0x03B6, + 6562: 0x03B7, + 6563: 0x03B8, + 6564: 0x03B9, + 6565: 0x03BA, + 6566: 0x03BB, + 6567: 0x03BC, + 6568: 0x03BD, + 6569: 0x03BE, + 6570: 0x03BF, + 6571: 0x03C0, + 6572: 0x03C1, + 6573: 0x03C3, + 6574: 0x03C4, + 6575: 0x03C5, + 6576: 0x03C6, + 6577: 0x03C7, + 6578: 0x03C8, + 6579: 0x03C9, + 6586: 0xCAA8, + 6587: 0xCAA9, + 6588: 0xCAAA, + 6589: 0xCAAB, + 6590: 0xCAAC, + 6591: 0xCAAD, + 6592: 0xCAAE, + 6593: 0xCAAF, + 6594: 0xCAB0, + 6595: 0xCAB1, + 6596: 0xCAB2, + 6597: 0xCAB3, + 6598: 0xCAB4, + 6599: 0xCAB5, + 6600: 0xCAB6, + 6601: 0xCAB7, + 6602: 0xCAB8, + 6603: 0xCAB9, + 6604: 0xCABA, + 6605: 0xCABB, + 6606: 0xCABE, + 6607: 0xCABF, + 6608: 0xCAC1, + 6609: 0xCAC2, + 6610: 0xCAC3, + 6611: 0xCAC5, + 6612: 0xCAC6, + 6613: 0xCAC7, + 6614: 0xCAC8, + 6615: 0xCAC9, + 6616: 0xCACA, + 6617: 0xCACB, + 6618: 0xCACE, + 6619: 0xCAD0, + 6620: 0xCAD2, + 6621: 0xCAD4, + 6622: 0xCAD5, + 6623: 0xCAD6, + 6624: 0xCAD7, + 6625: 0xCADA, + 6626: 0xCADB, + 6627: 0xCADC, + 6628: 0xCADD, + 6629: 0xCADE, + 6630: 0xCADF, + 6631: 0xCAE1, + 6632: 0xCAE2, + 6633: 0xCAE3, + 6634: 0xCAE4, + 6635: 0xCAE5, + 6636: 0xCAE6, + 6637: 0xCAE7, + 6638: 0xCAE8, + 6639: 0xCAE9, + 6640: 0xCAEA, + 6641: 0xCAEB, + 6642: 0xCAED, + 6643: 0xCAEE, + 6644: 0xCAEF, + 6645: 0xCAF0, + 6646: 0xCAF1, + 6647: 0xCAF2, + 6648: 0xCAF3, + 6649: 0xCAF5, + 6650: 0xCAF6, + 6651: 0xCAF7, + 6652: 0xCAF8, + 6653: 0xCAF9, + 6654: 0xCAFA, + 6655: 0xCAFB, + 6656: 0xCAFC, + 6657: 0xCAFD, + 6658: 0xCAFE, + 6659: 0xCAFF, + 6660: 0xCB00, + 6661: 0xCB01, + 6662: 0xCB02, + 6663: 0xCB03, + 6664: 0xCB04, + 6665: 0xCB05, + 6666: 0xCB06, + 6667: 0xCB07, + 6668: 0xCB09, + 6669: 0xCB0A, + 6670: 0x2500, + 6671: 0x2502, + 6672: 0x250C, + 6673: 0x2510, + 6674: 0x2518, + 6675: 0x2514, + 6676: 0x251C, + 6677: 0x252C, + 6678: 0x2524, + 6679: 0x2534, + 6680: 0x253C, + 6681: 0x2501, + 6682: 0x2503, + 6683: 0x250F, + 6684: 0x2513, + 6685: 0x251B, + 6686: 0x2517, + 6687: 0x2523, + 6688: 0x2533, + 6689: 0x252B, + 6690: 0x253B, + 6691: 0x254B, + 6692: 0x2520, + 6693: 0x252F, + 6694: 0x2528, + 6695: 0x2537, + 6696: 0x253F, + 6697: 0x251D, + 6698: 0x2530, + 6699: 0x2525, + 6700: 0x2538, + 6701: 0x2542, + 6702: 0x2512, + 6703: 0x2511, + 6704: 0x251A, + 6705: 0x2519, + 6706: 0x2516, + 6707: 0x2515, + 6708: 0x250E, + 6709: 0x250D, + 6710: 0x251E, + 6711: 0x251F, + 6712: 0x2521, + 6713: 0x2522, + 6714: 0x2526, + 6715: 0x2527, + 6716: 0x2529, + 6717: 0x252A, + 6718: 0x252D, + 6719: 0x252E, + 6720: 0x2531, + 6721: 0x2532, + 6722: 0x2535, + 6723: 0x2536, + 6724: 0x2539, + 6725: 0x253A, + 6726: 0x253D, + 6727: 0x253E, + 6728: 0x2540, + 6729: 0x2541, + 6730: 0x2543, + 6731: 0x2544, + 6732: 0x2545, + 6733: 0x2546, + 6734: 0x2547, + 6735: 0x2548, + 6736: 0x2549, + 6737: 0x254A, + 6764: 0xCB0B, + 6765: 0xCB0C, + 6766: 0xCB0D, + 6767: 0xCB0E, + 6768: 0xCB0F, + 6769: 0xCB11, + 6770: 0xCB12, + 6771: 0xCB13, + 6772: 0xCB15, + 6773: 0xCB16, + 6774: 0xCB17, + 6775: 0xCB19, + 6776: 0xCB1A, + 6777: 0xCB1B, + 6778: 0xCB1C, + 6779: 0xCB1D, + 6780: 0xCB1E, + 6781: 0xCB1F, + 6782: 0xCB22, + 6783: 0xCB23, + 6784: 0xCB24, + 6785: 0xCB25, + 6786: 0xCB26, + 6787: 0xCB27, + 6788: 0xCB28, + 6789: 0xCB29, + 6790: 0xCB2A, + 6791: 0xCB2B, + 6792: 0xCB2C, + 6793: 0xCB2D, + 6794: 0xCB2E, + 6795: 0xCB2F, + 6796: 0xCB30, + 6797: 0xCB31, + 6798: 0xCB32, + 6799: 0xCB33, + 6800: 0xCB34, + 6801: 0xCB35, + 6802: 0xCB36, + 6803: 0xCB37, + 6804: 0xCB38, + 6805: 0xCB39, + 6806: 0xCB3A, + 6807: 0xCB3B, + 6808: 0xCB3C, + 6809: 0xCB3D, + 6810: 0xCB3E, + 6811: 0xCB3F, + 6812: 0xCB40, + 6813: 0xCB42, + 6814: 0xCB43, + 6815: 0xCB44, + 6816: 0xCB45, + 6817: 0xCB46, + 6818: 0xCB47, + 6819: 0xCB4A, + 6820: 0xCB4B, + 6821: 0xCB4D, + 6822: 0xCB4E, + 6823: 0xCB4F, + 6824: 0xCB51, + 6825: 0xCB52, + 6826: 0xCB53, + 6827: 0xCB54, + 6828: 0xCB55, + 6829: 0xCB56, + 6830: 0xCB57, + 6831: 0xCB5A, + 6832: 0xCB5B, + 6833: 0xCB5C, + 6834: 0xCB5E, + 6835: 0xCB5F, + 6836: 0xCB60, + 6837: 0xCB61, + 6838: 0xCB62, + 6839: 0xCB63, + 6840: 0xCB65, + 6841: 0xCB66, + 6842: 0xCB67, + 6843: 0xCB68, + 6844: 0xCB69, + 6845: 0xCB6A, + 6846: 0xCB6B, + 6847: 0xCB6C, + 6848: 0x3395, + 6849: 0x3396, + 6850: 0x3397, + 6851: 0x2113, + 6852: 0x3398, + 6853: 0x33C4, + 6854: 0x33A3, + 6855: 0x33A4, + 6856: 0x33A5, + 6857: 0x33A6, + 6858: 0x3399, + 6859: 0x339A, + 6860: 0x339B, + 6861: 0x339C, + 6862: 0x339D, + 6863: 0x339E, + 6864: 0x339F, + 6865: 0x33A0, + 6866: 0x33A1, + 6867: 0x33A2, + 6868: 0x33CA, + 6869: 0x338D, + 6870: 0x338E, + 6871: 0x338F, + 6872: 0x33CF, + 6873: 0x3388, + 6874: 0x3389, + 6875: 0x33C8, + 6876: 0x33A7, + 6877: 0x33A8, + 6878: 0x33B0, + 6879: 0x33B1, + 6880: 0x33B2, + 6881: 0x33B3, + 6882: 0x33B4, + 6883: 0x33B5, + 6884: 0x33B6, + 6885: 0x33B7, + 6886: 0x33B8, + 6887: 0x33B9, + 6888: 0x3380, + 6889: 0x3381, + 6890: 0x3382, + 6891: 0x3383, + 6892: 0x3384, + 6893: 0x33BA, + 6894: 0x33BB, + 6895: 0x33BC, + 6896: 0x33BD, + 6897: 0x33BE, + 6898: 0x33BF, + 6899: 0x3390, + 6900: 0x3391, + 6901: 0x3392, + 6902: 0x3393, + 6903: 0x3394, + 6904: 0x2126, + 6905: 0x33C0, + 6906: 0x33C1, + 6907: 0x338A, + 6908: 0x338B, + 6909: 0x338C, + 6910: 0x33D6, + 6911: 0x33C5, + 6912: 0x33AD, + 6913: 0x33AE, + 6914: 0x33AF, + 6915: 0x33DB, + 6916: 0x33A9, + 6917: 0x33AA, + 6918: 0x33AB, + 6919: 0x33AC, + 6920: 0x33DD, + 6921: 0x33D0, + 6922: 0x33D3, + 6923: 0x33C3, + 6924: 0x33C9, + 6925: 0x33DC, + 6926: 0x33C6, + 6942: 0xCB6D, + 6943: 0xCB6E, + 6944: 0xCB6F, + 6945: 0xCB70, + 6946: 0xCB71, + 6947: 0xCB72, + 6948: 0xCB73, + 6949: 0xCB74, + 6950: 0xCB75, + 6951: 0xCB76, + 6952: 0xCB77, + 6953: 0xCB7A, + 6954: 0xCB7B, + 6955: 0xCB7C, + 6956: 0xCB7D, + 6957: 0xCB7E, + 6958: 0xCB7F, + 6959: 0xCB80, + 6960: 0xCB81, + 6961: 0xCB82, + 6962: 0xCB83, + 6963: 0xCB84, + 6964: 0xCB85, + 6965: 0xCB86, + 6966: 0xCB87, + 6967: 0xCB88, + 6968: 0xCB89, + 6969: 0xCB8A, + 6970: 0xCB8B, + 6971: 0xCB8C, + 6972: 0xCB8D, + 6973: 0xCB8E, + 6974: 0xCB8F, + 6975: 0xCB90, + 6976: 0xCB91, + 6977: 0xCB92, + 6978: 0xCB93, + 6979: 0xCB94, + 6980: 0xCB95, + 6981: 0xCB96, + 6982: 0xCB97, + 6983: 0xCB98, + 6984: 0xCB99, + 6985: 0xCB9A, + 6986: 0xCB9B, + 6987: 0xCB9D, + 6988: 0xCB9E, + 6989: 0xCB9F, + 6990: 0xCBA0, + 6991: 0xCBA1, + 6992: 0xCBA2, + 6993: 0xCBA3, + 6994: 0xCBA4, + 6995: 0xCBA5, + 6996: 0xCBA6, + 6997: 0xCBA7, + 6998: 0xCBA8, + 6999: 0xCBA9, + 7000: 0xCBAA, + 7001: 0xCBAB, + 7002: 0xCBAC, + 7003: 0xCBAD, + 7004: 0xCBAE, + 7005: 0xCBAF, + 7006: 0xCBB0, + 7007: 0xCBB1, + 7008: 0xCBB2, + 7009: 0xCBB3, + 7010: 0xCBB4, + 7011: 0xCBB5, + 7012: 0xCBB6, + 7013: 0xCBB7, + 7014: 0xCBB9, + 7015: 0xCBBA, + 7016: 0xCBBB, + 7017: 0xCBBC, + 7018: 0xCBBD, + 7019: 0xCBBE, + 7020: 0xCBBF, + 7021: 0xCBC0, + 7022: 0xCBC1, + 7023: 0xCBC2, + 7024: 0xCBC3, + 7025: 0xCBC4, + 7026: 0x00C6, + 7027: 0x00D0, + 7028: 0x00AA, + 7029: 0x0126, + 7031: 0x0132, + 7033: 0x013F, + 7034: 0x0141, + 7035: 0x00D8, + 7036: 0x0152, + 7037: 0x00BA, + 7038: 0x00DE, + 7039: 0x0166, + 7040: 0x014A, + 7042: 0x3260, + 7043: 0x3261, + 7044: 0x3262, + 7045: 0x3263, + 7046: 0x3264, + 7047: 0x3265, + 7048: 0x3266, + 7049: 0x3267, + 7050: 0x3268, + 7051: 0x3269, + 7052: 0x326A, + 7053: 0x326B, + 7054: 0x326C, + 7055: 0x326D, + 7056: 0x326E, + 7057: 0x326F, + 7058: 0x3270, + 7059: 0x3271, + 7060: 0x3272, + 7061: 0x3273, + 7062: 0x3274, + 7063: 0x3275, + 7064: 0x3276, + 7065: 0x3277, + 7066: 0x3278, + 7067: 0x3279, + 7068: 0x327A, + 7069: 0x327B, + 7070: 0x24D0, + 7071: 0x24D1, + 7072: 0x24D2, + 7073: 0x24D3, + 7074: 0x24D4, + 7075: 0x24D5, + 7076: 0x24D6, + 7077: 0x24D7, + 7078: 0x24D8, + 7079: 0x24D9, + 7080: 0x24DA, + 7081: 0x24DB, + 7082: 0x24DC, + 7083: 0x24DD, + 7084: 0x24DE, + 7085: 0x24DF, + 7086: 0x24E0, + 7087: 0x24E1, + 7088: 0x24E2, + 7089: 0x24E3, + 7090: 0x24E4, + 7091: 0x24E5, + 7092: 0x24E6, + 7093: 0x24E7, + 7094: 0x24E8, + 7095: 0x24E9, + 7096: 0x2460, + 7097: 0x2461, + 7098: 0x2462, + 7099: 0x2463, + 7100: 0x2464, + 7101: 0x2465, + 7102: 0x2466, + 7103: 0x2467, + 7104: 0x2468, + 7105: 0x2469, + 7106: 0x246A, + 7107: 0x246B, + 7108: 0x246C, + 7109: 0x246D, + 7110: 0x246E, + 7111: 0x00BD, + 7112: 0x2153, + 7113: 0x2154, + 7114: 0x00BC, + 7115: 0x00BE, + 7116: 0x215B, + 7117: 0x215C, + 7118: 0x215D, + 7119: 0x215E, + 7120: 0xCBC5, + 7121: 0xCBC6, + 7122: 0xCBC7, + 7123: 0xCBC8, + 7124: 0xCBC9, + 7125: 0xCBCA, + 7126: 0xCBCB, + 7127: 0xCBCC, + 7128: 0xCBCD, + 7129: 0xCBCE, + 7130: 0xCBCF, + 7131: 0xCBD0, + 7132: 0xCBD1, + 7133: 0xCBD2, + 7134: 0xCBD3, + 7135: 0xCBD5, + 7136: 0xCBD6, + 7137: 0xCBD7, + 7138: 0xCBD8, + 7139: 0xCBD9, + 7140: 0xCBDA, + 7141: 0xCBDB, + 7142: 0xCBDC, + 7143: 0xCBDD, + 7144: 0xCBDE, + 7145: 0xCBDF, + 7146: 0xCBE0, + 7147: 0xCBE1, + 7148: 0xCBE2, + 7149: 0xCBE3, + 7150: 0xCBE5, + 7151: 0xCBE6, + 7152: 0xCBE8, + 7153: 0xCBEA, + 7154: 0xCBEB, + 7155: 0xCBEC, + 7156: 0xCBED, + 7157: 0xCBEE, + 7158: 0xCBEF, + 7159: 0xCBF0, + 7160: 0xCBF1, + 7161: 0xCBF2, + 7162: 0xCBF3, + 7163: 0xCBF4, + 7164: 0xCBF5, + 7165: 0xCBF6, + 7166: 0xCBF7, + 7167: 0xCBF8, + 7168: 0xCBF9, + 7169: 0xCBFA, + 7170: 0xCBFB, + 7171: 0xCBFC, + 7172: 0xCBFD, + 7173: 0xCBFE, + 7174: 0xCBFF, + 7175: 0xCC00, + 7176: 0xCC01, + 7177: 0xCC02, + 7178: 0xCC03, + 7179: 0xCC04, + 7180: 0xCC05, + 7181: 0xCC06, + 7182: 0xCC07, + 7183: 0xCC08, + 7184: 0xCC09, + 7185: 0xCC0A, + 7186: 0xCC0B, + 7187: 0xCC0E, + 7188: 0xCC0F, + 7189: 0xCC11, + 7190: 0xCC12, + 7191: 0xCC13, + 7192: 0xCC15, + 7193: 0xCC16, + 7194: 0xCC17, + 7195: 0xCC18, + 7196: 0xCC19, + 7197: 0xCC1A, + 7198: 0xCC1B, + 7199: 0xCC1E, + 7200: 0xCC1F, + 7201: 0xCC20, + 7202: 0xCC23, + 7203: 0xCC24, + 7204: 0x00E6, + 7205: 0x0111, + 7206: 0x00F0, + 7207: 0x0127, + 7208: 0x0131, + 7209: 0x0133, + 7210: 0x0138, + 7211: 0x0140, + 7212: 0x0142, + 7213: 0x00F8, + 7214: 0x0153, + 7215: 0x00DF, + 7216: 0x00FE, + 7217: 0x0167, + 7218: 0x014B, + 7219: 0x0149, + 7220: 0x3200, + 7221: 0x3201, + 7222: 0x3202, + 7223: 0x3203, + 7224: 0x3204, + 7225: 0x3205, + 7226: 0x3206, + 7227: 0x3207, + 7228: 0x3208, + 7229: 0x3209, + 7230: 0x320A, + 7231: 0x320B, + 7232: 0x320C, + 7233: 0x320D, + 7234: 0x320E, + 7235: 0x320F, + 7236: 0x3210, + 7237: 0x3211, + 7238: 0x3212, + 7239: 0x3213, + 7240: 0x3214, + 7241: 0x3215, + 7242: 0x3216, + 7243: 0x3217, + 7244: 0x3218, + 7245: 0x3219, + 7246: 0x321A, + 7247: 0x321B, + 7248: 0x249C, + 7249: 0x249D, + 7250: 0x249E, + 7251: 0x249F, + 7252: 0x24A0, + 7253: 0x24A1, + 7254: 0x24A2, + 7255: 0x24A3, + 7256: 0x24A4, + 7257: 0x24A5, + 7258: 0x24A6, + 7259: 0x24A7, + 7260: 0x24A8, + 7261: 0x24A9, + 7262: 0x24AA, + 7263: 0x24AB, + 7264: 0x24AC, + 7265: 0x24AD, + 7266: 0x24AE, + 7267: 0x24AF, + 7268: 0x24B0, + 7269: 0x24B1, + 7270: 0x24B2, + 7271: 0x24B3, + 7272: 0x24B4, + 7273: 0x24B5, + 7274: 0x2474, + 7275: 0x2475, + 7276: 0x2476, + 7277: 0x2477, + 7278: 0x2478, + 7279: 0x2479, + 7280: 0x247A, + 7281: 0x247B, + 7282: 0x247C, + 7283: 0x247D, + 7284: 0x247E, + 7285: 0x247F, + 7286: 0x2480, + 7287: 0x2481, + 7288: 0x2482, + 7289: 0x00B9, + 7290: 0x00B2, + 7291: 0x00B3, + 7292: 0x2074, + 7293: 0x207F, + 7294: 0x2081, + 7295: 0x2082, + 7296: 0x2083, + 7297: 0x2084, + 7298: 0xCC25, + 7299: 0xCC26, + 7300: 0xCC2A, + 7301: 0xCC2B, + 7302: 0xCC2D, + 7303: 0xCC2F, + 7304: 0xCC31, + 7305: 0xCC32, + 7306: 0xCC33, + 7307: 0xCC34, + 7308: 0xCC35, + 7309: 0xCC36, + 7310: 0xCC37, + 7311: 0xCC3A, + 7312: 0xCC3F, + 7313: 0xCC40, + 7314: 0xCC41, + 7315: 0xCC42, + 7316: 0xCC43, + 7317: 0xCC46, + 7318: 0xCC47, + 7319: 0xCC49, + 7320: 0xCC4A, + 7321: 0xCC4B, + 7322: 0xCC4D, + 7323: 0xCC4E, + 7324: 0xCC4F, + 7325: 0xCC50, + 7326: 0xCC51, + 7327: 0xCC52, + 7328: 0xCC53, + 7329: 0xCC56, + 7330: 0xCC5A, + 7331: 0xCC5B, + 7332: 0xCC5C, + 7333: 0xCC5D, + 7334: 0xCC5E, + 7335: 0xCC5F, + 7336: 0xCC61, + 7337: 0xCC62, + 7338: 0xCC63, + 7339: 0xCC65, + 7340: 0xCC67, + 7341: 0xCC69, + 7342: 0xCC6A, + 7343: 0xCC6B, + 7344: 0xCC6C, + 7345: 0xCC6D, + 7346: 0xCC6E, + 7347: 0xCC6F, + 7348: 0xCC71, + 7349: 0xCC72, + 7350: 0xCC73, + 7351: 0xCC74, + 7352: 0xCC76, + 7353: 0xCC77, + 7354: 0xCC78, + 7355: 0xCC79, + 7356: 0xCC7A, + 7357: 0xCC7B, + 7358: 0xCC7C, + 7359: 0xCC7D, + 7360: 0xCC7E, + 7361: 0xCC7F, + 7362: 0xCC80, + 7363: 0xCC81, + 7364: 0xCC82, + 7365: 0xCC83, + 7366: 0xCC84, + 7367: 0xCC85, + 7368: 0xCC86, + 7369: 0xCC87, + 7370: 0xCC88, + 7371: 0xCC89, + 7372: 0xCC8A, + 7373: 0xCC8B, + 7374: 0xCC8C, + 7375: 0xCC8D, + 7376: 0xCC8E, + 7377: 0xCC8F, + 7378: 0xCC90, + 7379: 0xCC91, + 7380: 0xCC92, + 7381: 0xCC93, + 7382: 0x3041, + 7383: 0x3042, + 7384: 0x3043, + 7385: 0x3044, + 7386: 0x3045, + 7387: 0x3046, + 7388: 0x3047, + 7389: 0x3048, + 7390: 0x3049, + 7391: 0x304A, + 7392: 0x304B, + 7393: 0x304C, + 7394: 0x304D, + 7395: 0x304E, + 7396: 0x304F, + 7397: 0x3050, + 7398: 0x3051, + 7399: 0x3052, + 7400: 0x3053, + 7401: 0x3054, + 7402: 0x3055, + 7403: 0x3056, + 7404: 0x3057, + 7405: 0x3058, + 7406: 0x3059, + 7407: 0x305A, + 7408: 0x305B, + 7409: 0x305C, + 7410: 0x305D, + 7411: 0x305E, + 7412: 0x305F, + 7413: 0x3060, + 7414: 0x3061, + 7415: 0x3062, + 7416: 0x3063, + 7417: 0x3064, + 7418: 0x3065, + 7419: 0x3066, + 7420: 0x3067, + 7421: 0x3068, + 7422: 0x3069, + 7423: 0x306A, + 7424: 0x306B, + 7425: 0x306C, + 7426: 0x306D, + 7427: 0x306E, + 7428: 0x306F, + 7429: 0x3070, + 7430: 0x3071, + 7431: 0x3072, + 7432: 0x3073, + 7433: 0x3074, + 7434: 0x3075, + 7435: 0x3076, + 7436: 0x3077, + 7437: 0x3078, + 7438: 0x3079, + 7439: 0x307A, + 7440: 0x307B, + 7441: 0x307C, + 7442: 0x307D, + 7443: 0x307E, + 7444: 0x307F, + 7445: 0x3080, + 7446: 0x3081, + 7447: 0x3082, + 7448: 0x3083, + 7449: 0x3084, + 7450: 0x3085, + 7451: 0x3086, + 7452: 0x3087, + 7453: 0x3088, + 7454: 0x3089, + 7455: 0x308A, + 7456: 0x308B, + 7457: 0x308C, + 7458: 0x308D, + 7459: 0x308E, + 7460: 0x308F, + 7461: 0x3090, + 7462: 0x3091, + 7463: 0x3092, + 7464: 0x3093, + 7476: 0xCC94, + 7477: 0xCC95, + 7478: 0xCC96, + 7479: 0xCC97, + 7480: 0xCC9A, + 7481: 0xCC9B, + 7482: 0xCC9D, + 7483: 0xCC9E, + 7484: 0xCC9F, + 7485: 0xCCA1, + 7486: 0xCCA2, + 7487: 0xCCA3, + 7488: 0xCCA4, + 7489: 0xCCA5, + 7490: 0xCCA6, + 7491: 0xCCA7, + 7492: 0xCCAA, + 7493: 0xCCAE, + 7494: 0xCCAF, + 7495: 0xCCB0, + 7496: 0xCCB1, + 7497: 0xCCB2, + 7498: 0xCCB3, + 7499: 0xCCB6, + 7500: 0xCCB7, + 7501: 0xCCB9, + 7502: 0xCCBA, + 7503: 0xCCBB, + 7504: 0xCCBD, + 7505: 0xCCBE, + 7506: 0xCCBF, + 7507: 0xCCC0, + 7508: 0xCCC1, + 7509: 0xCCC2, + 7510: 0xCCC3, + 7511: 0xCCC6, + 7512: 0xCCC8, + 7513: 0xCCCA, + 7514: 0xCCCB, + 7515: 0xCCCC, + 7516: 0xCCCD, + 7517: 0xCCCE, + 7518: 0xCCCF, + 7519: 0xCCD1, + 7520: 0xCCD2, + 7521: 0xCCD3, + 7522: 0xCCD5, + 7523: 0xCCD6, + 7524: 0xCCD7, + 7525: 0xCCD8, + 7526: 0xCCD9, + 7527: 0xCCDA, + 7528: 0xCCDB, + 7529: 0xCCDC, + 7530: 0xCCDD, + 7531: 0xCCDE, + 7532: 0xCCDF, + 7533: 0xCCE0, + 7534: 0xCCE1, + 7535: 0xCCE2, + 7536: 0xCCE3, + 7537: 0xCCE5, + 7538: 0xCCE6, + 7539: 0xCCE7, + 7540: 0xCCE8, + 7541: 0xCCE9, + 7542: 0xCCEA, + 7543: 0xCCEB, + 7544: 0xCCED, + 7545: 0xCCEE, + 7546: 0xCCEF, + 7547: 0xCCF1, + 7548: 0xCCF2, + 7549: 0xCCF3, + 7550: 0xCCF4, + 7551: 0xCCF5, + 7552: 0xCCF6, + 7553: 0xCCF7, + 7554: 0xCCF8, + 7555: 0xCCF9, + 7556: 0xCCFA, + 7557: 0xCCFB, + 7558: 0xCCFC, + 7559: 0xCCFD, + 7560: 0x30A1, + 7561: 0x30A2, + 7562: 0x30A3, + 7563: 0x30A4, + 7564: 0x30A5, + 7565: 0x30A6, + 7566: 0x30A7, + 7567: 0x30A8, + 7568: 0x30A9, + 7569: 0x30AA, + 7570: 0x30AB, + 7571: 0x30AC, + 7572: 0x30AD, + 7573: 0x30AE, + 7574: 0x30AF, + 7575: 0x30B0, + 7576: 0x30B1, + 7577: 0x30B2, + 7578: 0x30B3, + 7579: 0x30B4, + 7580: 0x30B5, + 7581: 0x30B6, + 7582: 0x30B7, + 7583: 0x30B8, + 7584: 0x30B9, + 7585: 0x30BA, + 7586: 0x30BB, + 7587: 0x30BC, + 7588: 0x30BD, + 7589: 0x30BE, + 7590: 0x30BF, + 7591: 0x30C0, + 7592: 0x30C1, + 7593: 0x30C2, + 7594: 0x30C3, + 7595: 0x30C4, + 7596: 0x30C5, + 7597: 0x30C6, + 7598: 0x30C7, + 7599: 0x30C8, + 7600: 0x30C9, + 7601: 0x30CA, + 7602: 0x30CB, + 7603: 0x30CC, + 7604: 0x30CD, + 7605: 0x30CE, + 7606: 0x30CF, + 7607: 0x30D0, + 7608: 0x30D1, + 7609: 0x30D2, + 7610: 0x30D3, + 7611: 0x30D4, + 7612: 0x30D5, + 7613: 0x30D6, + 7614: 0x30D7, + 7615: 0x30D8, + 7616: 0x30D9, + 7617: 0x30DA, + 7618: 0x30DB, + 7619: 0x30DC, + 7620: 0x30DD, + 7621: 0x30DE, + 7622: 0x30DF, + 7623: 0x30E0, + 7624: 0x30E1, + 7625: 0x30E2, + 7626: 0x30E3, + 7627: 0x30E4, + 7628: 0x30E5, + 7629: 0x30E6, + 7630: 0x30E7, + 7631: 0x30E8, + 7632: 0x30E9, + 7633: 0x30EA, + 7634: 0x30EB, + 7635: 0x30EC, + 7636: 0x30ED, + 7637: 0x30EE, + 7638: 0x30EF, + 7639: 0x30F0, + 7640: 0x30F1, + 7641: 0x30F2, + 7642: 0x30F3, + 7643: 0x30F4, + 7644: 0x30F5, + 7645: 0x30F6, + 7654: 0xCCFE, + 7655: 0xCCFF, + 7656: 0xCD00, + 7657: 0xCD02, + 7658: 0xCD03, + 7659: 0xCD04, + 7660: 0xCD05, + 7661: 0xCD06, + 7662: 0xCD07, + 7663: 0xCD0A, + 7664: 0xCD0B, + 7665: 0xCD0D, + 7666: 0xCD0E, + 7667: 0xCD0F, + 7668: 0xCD11, + 7669: 0xCD12, + 7670: 0xCD13, + 7671: 0xCD14, + 7672: 0xCD15, + 7673: 0xCD16, + 7674: 0xCD17, + 7675: 0xCD1A, + 7676: 0xCD1C, + 7677: 0xCD1E, + 7678: 0xCD1F, + 7679: 0xCD20, + 7680: 0xCD21, + 7681: 0xCD22, + 7682: 0xCD23, + 7683: 0xCD25, + 7684: 0xCD26, + 7685: 0xCD27, + 7686: 0xCD29, + 7687: 0xCD2A, + 7688: 0xCD2B, + 7689: 0xCD2D, + 7690: 0xCD2E, + 7691: 0xCD2F, + 7692: 0xCD30, + 7693: 0xCD31, + 7694: 0xCD32, + 7695: 0xCD33, + 7696: 0xCD34, + 7697: 0xCD35, + 7698: 0xCD36, + 7699: 0xCD37, + 7700: 0xCD38, + 7701: 0xCD3A, + 7702: 0xCD3B, + 7703: 0xCD3C, + 7704: 0xCD3D, + 7705: 0xCD3E, + 7706: 0xCD3F, + 7707: 0xCD40, + 7708: 0xCD41, + 7709: 0xCD42, + 7710: 0xCD43, + 7711: 0xCD44, + 7712: 0xCD45, + 7713: 0xCD46, + 7714: 0xCD47, + 7715: 0xCD48, + 7716: 0xCD49, + 7717: 0xCD4A, + 7718: 0xCD4B, + 7719: 0xCD4C, + 7720: 0xCD4D, + 7721: 0xCD4E, + 7722: 0xCD4F, + 7723: 0xCD50, + 7724: 0xCD51, + 7725: 0xCD52, + 7726: 0xCD53, + 7727: 0xCD54, + 7728: 0xCD55, + 7729: 0xCD56, + 7730: 0xCD57, + 7731: 0xCD58, + 7732: 0xCD59, + 7733: 0xCD5A, + 7734: 0xCD5B, + 7735: 0xCD5D, + 7736: 0xCD5E, + 7737: 0xCD5F, + 7738: 0x0410, + 7739: 0x0411, + 7740: 0x0412, + 7741: 0x0413, + 7742: 0x0414, + 7743: 0x0415, + 7744: 0x0401, + 7745: 0x0416, + 7746: 0x0417, + 7747: 0x0418, + 7748: 0x0419, + 7749: 0x041A, + 7750: 0x041B, + 7751: 0x041C, + 7752: 0x041D, + 7753: 0x041E, + 7754: 0x041F, + 7755: 0x0420, + 7756: 0x0421, + 7757: 0x0422, + 7758: 0x0423, + 7759: 0x0424, + 7760: 0x0425, + 7761: 0x0426, + 7762: 0x0427, + 7763: 0x0428, + 7764: 0x0429, + 7765: 0x042A, + 7766: 0x042B, + 7767: 0x042C, + 7768: 0x042D, + 7769: 0x042E, + 7770: 0x042F, + 7786: 0x0430, + 7787: 0x0431, + 7788: 0x0432, + 7789: 0x0433, + 7790: 0x0434, + 7791: 0x0435, + 7792: 0x0451, + 7793: 0x0436, + 7794: 0x0437, + 7795: 0x0438, + 7796: 0x0439, + 7797: 0x043A, + 7798: 0x043B, + 7799: 0x043C, + 7800: 0x043D, + 7801: 0x043E, + 7802: 0x043F, + 7803: 0x0440, + 7804: 0x0441, + 7805: 0x0442, + 7806: 0x0443, + 7807: 0x0444, + 7808: 0x0445, + 7809: 0x0446, + 7810: 0x0447, + 7811: 0x0448, + 7812: 0x0449, + 7813: 0x044A, + 7814: 0x044B, + 7815: 0x044C, + 7816: 0x044D, + 7817: 0x044E, + 7818: 0x044F, + 7832: 0xCD61, + 7833: 0xCD62, + 7834: 0xCD63, + 7835: 0xCD65, + 7836: 0xCD66, + 7837: 0xCD67, + 7838: 0xCD68, + 7839: 0xCD69, + 7840: 0xCD6A, + 7841: 0xCD6B, + 7842: 0xCD6E, + 7843: 0xCD70, + 7844: 0xCD72, + 7845: 0xCD73, + 7846: 0xCD74, + 7847: 0xCD75, + 7848: 0xCD76, + 7849: 0xCD77, + 7850: 0xCD79, + 7851: 0xCD7A, + 7852: 0xCD7B, + 7853: 0xCD7C, + 7854: 0xCD7D, + 7855: 0xCD7E, + 7856: 0xCD7F, + 7857: 0xCD80, + 7858: 0xCD81, + 7859: 0xCD82, + 7860: 0xCD83, + 7861: 0xCD84, + 7862: 0xCD85, + 7863: 0xCD86, + 7864: 0xCD87, + 7865: 0xCD89, + 7866: 0xCD8A, + 7867: 0xCD8B, + 7868: 0xCD8C, + 7869: 0xCD8D, + 7870: 0xCD8E, + 7871: 0xCD8F, + 7872: 0xCD90, + 7873: 0xCD91, + 7874: 0xCD92, + 7875: 0xCD93, + 7876: 0xCD96, + 7877: 0xCD97, + 7878: 0xCD99, + 7879: 0xCD9A, + 7880: 0xCD9B, + 7881: 0xCD9D, + 7882: 0xCD9E, + 7883: 0xCD9F, + 7884: 0xCDA0, + 7885: 0xCDA1, + 7886: 0xCDA2, + 7887: 0xCDA3, + 7888: 0xCDA6, + 7889: 0xCDA8, + 7890: 0xCDAA, + 7891: 0xCDAB, + 7892: 0xCDAC, + 7893: 0xCDAD, + 7894: 0xCDAE, + 7895: 0xCDAF, + 7896: 0xCDB1, + 7897: 0xCDB2, + 7898: 0xCDB3, + 7899: 0xCDB4, + 7900: 0xCDB5, + 7901: 0xCDB6, + 7902: 0xCDB7, + 7903: 0xCDB8, + 7904: 0xCDB9, + 7905: 0xCDBA, + 7906: 0xCDBB, + 7907: 0xCDBC, + 7908: 0xCDBD, + 7909: 0xCDBE, + 7910: 0xCDBF, + 7911: 0xCDC0, + 7912: 0xCDC1, + 7913: 0xCDC2, + 7914: 0xCDC3, + 7915: 0xCDC5, + 8010: 0xCDC6, + 8011: 0xCDC7, + 8012: 0xCDC8, + 8013: 0xCDC9, + 8014: 0xCDCA, + 8015: 0xCDCB, + 8016: 0xCDCD, + 8017: 0xCDCE, + 8018: 0xCDCF, + 8019: 0xCDD1, + 8020: 0xCDD2, + 8021: 0xCDD3, + 8022: 0xCDD4, + 8023: 0xCDD5, + 8024: 0xCDD6, + 8025: 0xCDD7, + 8026: 0xCDD8, + 8027: 0xCDD9, + 8028: 0xCDDA, + 8029: 0xCDDB, + 8030: 0xCDDC, + 8031: 0xCDDD, + 8032: 0xCDDE, + 8033: 0xCDDF, + 8034: 0xCDE0, + 8035: 0xCDE1, + 8036: 0xCDE2, + 8037: 0xCDE3, + 8038: 0xCDE4, + 8039: 0xCDE5, + 8040: 0xCDE6, + 8041: 0xCDE7, + 8042: 0xCDE9, + 8043: 0xCDEA, + 8044: 0xCDEB, + 8045: 0xCDED, + 8046: 0xCDEE, + 8047: 0xCDEF, + 8048: 0xCDF1, + 8049: 0xCDF2, + 8050: 0xCDF3, + 8051: 0xCDF4, + 8052: 0xCDF5, + 8053: 0xCDF6, + 8054: 0xCDF7, + 8055: 0xCDFA, + 8056: 0xCDFC, + 8057: 0xCDFE, + 8058: 0xCDFF, + 8059: 0xCE00, + 8060: 0xCE01, + 8061: 0xCE02, + 8062: 0xCE03, + 8063: 0xCE05, + 8064: 0xCE06, + 8065: 0xCE07, + 8066: 0xCE09, + 8067: 0xCE0A, + 8068: 0xCE0B, + 8069: 0xCE0D, + 8070: 0xCE0E, + 8071: 0xCE0F, + 8072: 0xCE10, + 8073: 0xCE11, + 8074: 0xCE12, + 8075: 0xCE13, + 8076: 0xCE15, + 8077: 0xCE16, + 8078: 0xCE17, + 8079: 0xCE18, + 8080: 0xCE1A, + 8081: 0xCE1B, + 8082: 0xCE1C, + 8083: 0xCE1D, + 8084: 0xCE1E, + 8085: 0xCE1F, + 8086: 0xCE22, + 8087: 0xCE23, + 8088: 0xCE25, + 8089: 0xCE26, + 8090: 0xCE27, + 8091: 0xCE29, + 8092: 0xCE2A, + 8093: 0xCE2B, + 8188: 0xCE2C, + 8189: 0xCE2D, + 8190: 0xCE2E, + 8191: 0xCE2F, + 8192: 0xCE32, + 8193: 0xCE34, + 8194: 0xCE36, + 8195: 0xCE37, + 8196: 0xCE38, + 8197: 0xCE39, + 8198: 0xCE3A, + 8199: 0xCE3B, + 8200: 0xCE3C, + 8201: 0xCE3D, + 8202: 0xCE3E, + 8203: 0xCE3F, + 8204: 0xCE40, + 8205: 0xCE41, + 8206: 0xCE42, + 8207: 0xCE43, + 8208: 0xCE44, + 8209: 0xCE45, + 8210: 0xCE46, + 8211: 0xCE47, + 8212: 0xCE48, + 8213: 0xCE49, + 8214: 0xCE4A, + 8215: 0xCE4B, + 8216: 0xCE4C, + 8217: 0xCE4D, + 8218: 0xCE4E, + 8219: 0xCE4F, + 8220: 0xCE50, + 8221: 0xCE51, + 8222: 0xCE52, + 8223: 0xCE53, + 8224: 0xCE54, + 8225: 0xCE55, + 8226: 0xCE56, + 8227: 0xCE57, + 8228: 0xCE5A, + 8229: 0xCE5B, + 8230: 0xCE5D, + 8231: 0xCE5E, + 8232: 0xCE62, + 8233: 0xCE63, + 8234: 0xCE64, + 8235: 0xCE65, + 8236: 0xCE66, + 8237: 0xCE67, + 8238: 0xCE6A, + 8239: 0xCE6C, + 8240: 0xCE6E, + 8241: 0xCE6F, + 8242: 0xCE70, + 8243: 0xCE71, + 8244: 0xCE72, + 8245: 0xCE73, + 8246: 0xCE76, + 8247: 0xCE77, + 8248: 0xCE79, + 8249: 0xCE7A, + 8250: 0xCE7B, + 8251: 0xCE7D, + 8252: 0xCE7E, + 8253: 0xCE7F, + 8254: 0xCE80, + 8255: 0xCE81, + 8256: 0xCE82, + 8257: 0xCE83, + 8258: 0xCE86, + 8259: 0xCE88, + 8260: 0xCE8A, + 8261: 0xCE8B, + 8262: 0xCE8C, + 8263: 0xCE8D, + 8264: 0xCE8E, + 8265: 0xCE8F, + 8266: 0xCE92, + 8267: 0xCE93, + 8268: 0xCE95, + 8269: 0xCE96, + 8270: 0xCE97, + 8271: 0xCE99, + 8366: 0xCE9A, + 8367: 0xCE9B, + 8368: 0xCE9C, + 8369: 0xCE9D, + 8370: 0xCE9E, + 8371: 0xCE9F, + 8372: 0xCEA2, + 8373: 0xCEA6, + 8374: 0xCEA7, + 8375: 0xCEA8, + 8376: 0xCEA9, + 8377: 0xCEAA, + 8378: 0xCEAB, + 8379: 0xCEAE, + 8380: 0xCEAF, + 8381: 0xCEB0, + 8382: 0xCEB1, + 8383: 0xCEB2, + 8384: 0xCEB3, + 8385: 0xCEB4, + 8386: 0xCEB5, + 8387: 0xCEB6, + 8388: 0xCEB7, + 8389: 0xCEB8, + 8390: 0xCEB9, + 8391: 0xCEBA, + 8392: 0xCEBB, + 8393: 0xCEBC, + 8394: 0xCEBD, + 8395: 0xCEBE, + 8396: 0xCEBF, + 8397: 0xCEC0, + 8398: 0xCEC2, + 8399: 0xCEC3, + 8400: 0xCEC4, + 8401: 0xCEC5, + 8402: 0xCEC6, + 8403: 0xCEC7, + 8404: 0xCEC8, + 8405: 0xCEC9, + 8406: 0xCECA, + 8407: 0xCECB, + 8408: 0xCECC, + 8409: 0xCECD, + 8410: 0xCECE, + 8411: 0xCECF, + 8412: 0xCED0, + 8413: 0xCED1, + 8414: 0xCED2, + 8415: 0xCED3, + 8416: 0xCED4, + 8417: 0xCED5, + 8418: 0xCED6, + 8419: 0xCED7, + 8420: 0xCED8, + 8421: 0xCED9, + 8422: 0xCEDA, + 8423: 0xCEDB, + 8424: 0xCEDC, + 8425: 0xCEDD, + 8426: 0xCEDE, + 8427: 0xCEDF, + 8428: 0xCEE0, + 8429: 0xCEE1, + 8430: 0xCEE2, + 8431: 0xCEE3, + 8432: 0xCEE6, + 8433: 0xCEE7, + 8434: 0xCEE9, + 8435: 0xCEEA, + 8436: 0xCEED, + 8437: 0xCEEE, + 8438: 0xCEEF, + 8439: 0xCEF0, + 8440: 0xCEF1, + 8441: 0xCEF2, + 8442: 0xCEF3, + 8443: 0xCEF6, + 8444: 0xCEFA, + 8445: 0xCEFB, + 8446: 0xCEFC, + 8447: 0xCEFD, + 8448: 0xCEFE, + 8449: 0xCEFF, + 8450: 0xAC00, + 8451: 0xAC01, + 8452: 0xAC04, + 8453: 0xAC07, + 8454: 0xAC08, + 8455: 0xAC09, + 8456: 0xAC0A, + 8457: 0xAC10, + 8458: 0xAC11, + 8459: 0xAC12, + 8460: 0xAC13, + 8461: 0xAC14, + 8462: 0xAC15, + 8463: 0xAC16, + 8464: 0xAC17, + 8465: 0xAC19, + 8466: 0xAC1A, + 8467: 0xAC1B, + 8468: 0xAC1C, + 8469: 0xAC1D, + 8470: 0xAC20, + 8471: 0xAC24, + 8472: 0xAC2C, + 8473: 0xAC2D, + 8474: 0xAC2F, + 8475: 0xAC30, + 8476: 0xAC31, + 8477: 0xAC38, + 8478: 0xAC39, + 8479: 0xAC3C, + 8480: 0xAC40, + 8481: 0xAC4B, + 8482: 0xAC4D, + 8483: 0xAC54, + 8484: 0xAC58, + 8485: 0xAC5C, + 8486: 0xAC70, + 8487: 0xAC71, + 8488: 0xAC74, + 8489: 0xAC77, + 8490: 0xAC78, + 8491: 0xAC7A, + 8492: 0xAC80, + 8493: 0xAC81, + 8494: 0xAC83, + 8495: 0xAC84, + 8496: 0xAC85, + 8497: 0xAC86, + 8498: 0xAC89, + 8499: 0xAC8A, + 8500: 0xAC8B, + 8501: 0xAC8C, + 8502: 0xAC90, + 8503: 0xAC94, + 8504: 0xAC9C, + 8505: 0xAC9D, + 8506: 0xAC9F, + 8507: 0xACA0, + 8508: 0xACA1, + 8509: 0xACA8, + 8510: 0xACA9, + 8511: 0xACAA, + 8512: 0xACAC, + 8513: 0xACAF, + 8514: 0xACB0, + 8515: 0xACB8, + 8516: 0xACB9, + 8517: 0xACBB, + 8518: 0xACBC, + 8519: 0xACBD, + 8520: 0xACC1, + 8521: 0xACC4, + 8522: 0xACC8, + 8523: 0xACCC, + 8524: 0xACD5, + 8525: 0xACD7, + 8526: 0xACE0, + 8527: 0xACE1, + 8528: 0xACE4, + 8529: 0xACE7, + 8530: 0xACE8, + 8531: 0xACEA, + 8532: 0xACEC, + 8533: 0xACEF, + 8534: 0xACF0, + 8535: 0xACF1, + 8536: 0xACF3, + 8537: 0xACF5, + 8538: 0xACF6, + 8539: 0xACFC, + 8540: 0xACFD, + 8541: 0xAD00, + 8542: 0xAD04, + 8543: 0xAD06, + 8544: 0xCF02, + 8545: 0xCF03, + 8546: 0xCF05, + 8547: 0xCF06, + 8548: 0xCF07, + 8549: 0xCF09, + 8550: 0xCF0A, + 8551: 0xCF0B, + 8552: 0xCF0C, + 8553: 0xCF0D, + 8554: 0xCF0E, + 8555: 0xCF0F, + 8556: 0xCF12, + 8557: 0xCF14, + 8558: 0xCF16, + 8559: 0xCF17, + 8560: 0xCF18, + 8561: 0xCF19, + 8562: 0xCF1A, + 8563: 0xCF1B, + 8564: 0xCF1D, + 8565: 0xCF1E, + 8566: 0xCF1F, + 8567: 0xCF21, + 8568: 0xCF22, + 8569: 0xCF23, + 8570: 0xCF25, + 8571: 0xCF26, + 8572: 0xCF27, + 8573: 0xCF28, + 8574: 0xCF29, + 8575: 0xCF2A, + 8576: 0xCF2B, + 8577: 0xCF2E, + 8578: 0xCF32, + 8579: 0xCF33, + 8580: 0xCF34, + 8581: 0xCF35, + 8582: 0xCF36, + 8583: 0xCF37, + 8584: 0xCF39, + 8585: 0xCF3A, + 8586: 0xCF3B, + 8587: 0xCF3C, + 8588: 0xCF3D, + 8589: 0xCF3E, + 8590: 0xCF3F, + 8591: 0xCF40, + 8592: 0xCF41, + 8593: 0xCF42, + 8594: 0xCF43, + 8595: 0xCF44, + 8596: 0xCF45, + 8597: 0xCF46, + 8598: 0xCF47, + 8599: 0xCF48, + 8600: 0xCF49, + 8601: 0xCF4A, + 8602: 0xCF4B, + 8603: 0xCF4C, + 8604: 0xCF4D, + 8605: 0xCF4E, + 8606: 0xCF4F, + 8607: 0xCF50, + 8608: 0xCF51, + 8609: 0xCF52, + 8610: 0xCF53, + 8611: 0xCF56, + 8612: 0xCF57, + 8613: 0xCF59, + 8614: 0xCF5A, + 8615: 0xCF5B, + 8616: 0xCF5D, + 8617: 0xCF5E, + 8618: 0xCF5F, + 8619: 0xCF60, + 8620: 0xCF61, + 8621: 0xCF62, + 8622: 0xCF63, + 8623: 0xCF66, + 8624: 0xCF68, + 8625: 0xCF6A, + 8626: 0xCF6B, + 8627: 0xCF6C, + 8628: 0xAD0C, + 8629: 0xAD0D, + 8630: 0xAD0F, + 8631: 0xAD11, + 8632: 0xAD18, + 8633: 0xAD1C, + 8634: 0xAD20, + 8635: 0xAD29, + 8636: 0xAD2C, + 8637: 0xAD2D, + 8638: 0xAD34, + 8639: 0xAD35, + 8640: 0xAD38, + 8641: 0xAD3C, + 8642: 0xAD44, + 8643: 0xAD45, + 8644: 0xAD47, + 8645: 0xAD49, + 8646: 0xAD50, + 8647: 0xAD54, + 8648: 0xAD58, + 8649: 0xAD61, + 8650: 0xAD63, + 8651: 0xAD6C, + 8652: 0xAD6D, + 8653: 0xAD70, + 8654: 0xAD73, + 8655: 0xAD74, + 8656: 0xAD75, + 8657: 0xAD76, + 8658: 0xAD7B, + 8659: 0xAD7C, + 8660: 0xAD7D, + 8661: 0xAD7F, + 8662: 0xAD81, + 8663: 0xAD82, + 8664: 0xAD88, + 8665: 0xAD89, + 8666: 0xAD8C, + 8667: 0xAD90, + 8668: 0xAD9C, + 8669: 0xAD9D, + 8670: 0xADA4, + 8671: 0xADB7, + 8672: 0xADC0, + 8673: 0xADC1, + 8674: 0xADC4, + 8675: 0xADC8, + 8676: 0xADD0, + 8677: 0xADD1, + 8678: 0xADD3, + 8679: 0xADDC, + 8680: 0xADE0, + 8681: 0xADE4, + 8682: 0xADF8, + 8683: 0xADF9, + 8684: 0xADFC, + 8685: 0xADFF, + 8686: 0xAE00, + 8687: 0xAE01, + 8688: 0xAE08, + 8689: 0xAE09, + 8690: 0xAE0B, + 8691: 0xAE0D, + 8692: 0xAE14, + 8693: 0xAE30, + 8694: 0xAE31, + 8695: 0xAE34, + 8696: 0xAE37, + 8697: 0xAE38, + 8698: 0xAE3A, + 8699: 0xAE40, + 8700: 0xAE41, + 8701: 0xAE43, + 8702: 0xAE45, + 8703: 0xAE46, + 8704: 0xAE4A, + 8705: 0xAE4C, + 8706: 0xAE4D, + 8707: 0xAE4E, + 8708: 0xAE50, + 8709: 0xAE54, + 8710: 0xAE56, + 8711: 0xAE5C, + 8712: 0xAE5D, + 8713: 0xAE5F, + 8714: 0xAE60, + 8715: 0xAE61, + 8716: 0xAE65, + 8717: 0xAE68, + 8718: 0xAE69, + 8719: 0xAE6C, + 8720: 0xAE70, + 8721: 0xAE78, + 8722: 0xCF6D, + 8723: 0xCF6E, + 8724: 0xCF6F, + 8725: 0xCF72, + 8726: 0xCF73, + 8727: 0xCF75, + 8728: 0xCF76, + 8729: 0xCF77, + 8730: 0xCF79, + 8731: 0xCF7A, + 8732: 0xCF7B, + 8733: 0xCF7C, + 8734: 0xCF7D, + 8735: 0xCF7E, + 8736: 0xCF7F, + 8737: 0xCF81, + 8738: 0xCF82, + 8739: 0xCF83, + 8740: 0xCF84, + 8741: 0xCF86, + 8742: 0xCF87, + 8743: 0xCF88, + 8744: 0xCF89, + 8745: 0xCF8A, + 8746: 0xCF8B, + 8747: 0xCF8D, + 8748: 0xCF8E, + 8749: 0xCF8F, + 8750: 0xCF90, + 8751: 0xCF91, + 8752: 0xCF92, + 8753: 0xCF93, + 8754: 0xCF94, + 8755: 0xCF95, + 8756: 0xCF96, + 8757: 0xCF97, + 8758: 0xCF98, + 8759: 0xCF99, + 8760: 0xCF9A, + 8761: 0xCF9B, + 8762: 0xCF9C, + 8763: 0xCF9D, + 8764: 0xCF9E, + 8765: 0xCF9F, + 8766: 0xCFA0, + 8767: 0xCFA2, + 8768: 0xCFA3, + 8769: 0xCFA4, + 8770: 0xCFA5, + 8771: 0xCFA6, + 8772: 0xCFA7, + 8773: 0xCFA9, + 8774: 0xCFAA, + 8775: 0xCFAB, + 8776: 0xCFAC, + 8777: 0xCFAD, + 8778: 0xCFAE, + 8779: 0xCFAF, + 8780: 0xCFB1, + 8781: 0xCFB2, + 8782: 0xCFB3, + 8783: 0xCFB4, + 8784: 0xCFB5, + 8785: 0xCFB6, + 8786: 0xCFB7, + 8787: 0xCFB8, + 8788: 0xCFB9, + 8789: 0xCFBA, + 8790: 0xCFBB, + 8791: 0xCFBC, + 8792: 0xCFBD, + 8793: 0xCFBE, + 8794: 0xCFBF, + 8795: 0xCFC0, + 8796: 0xCFC1, + 8797: 0xCFC2, + 8798: 0xCFC3, + 8799: 0xCFC5, + 8800: 0xCFC6, + 8801: 0xCFC7, + 8802: 0xCFC8, + 8803: 0xCFC9, + 8804: 0xCFCA, + 8805: 0xCFCB, + 8806: 0xAE79, + 8807: 0xAE7B, + 8808: 0xAE7C, + 8809: 0xAE7D, + 8810: 0xAE84, + 8811: 0xAE85, + 8812: 0xAE8C, + 8813: 0xAEBC, + 8814: 0xAEBD, + 8815: 0xAEBE, + 8816: 0xAEC0, + 8817: 0xAEC4, + 8818: 0xAECC, + 8819: 0xAECD, + 8820: 0xAECF, + 8821: 0xAED0, + 8822: 0xAED1, + 8823: 0xAED8, + 8824: 0xAED9, + 8825: 0xAEDC, + 8826: 0xAEE8, + 8827: 0xAEEB, + 8828: 0xAEED, + 8829: 0xAEF4, + 8830: 0xAEF8, + 8831: 0xAEFC, + 8832: 0xAF07, + 8833: 0xAF08, + 8834: 0xAF0D, + 8835: 0xAF10, + 8836: 0xAF2C, + 8837: 0xAF2D, + 8838: 0xAF30, + 8839: 0xAF32, + 8840: 0xAF34, + 8841: 0xAF3C, + 8842: 0xAF3D, + 8843: 0xAF3F, + 8844: 0xAF41, + 8845: 0xAF42, + 8846: 0xAF43, + 8847: 0xAF48, + 8848: 0xAF49, + 8849: 0xAF50, + 8850: 0xAF5C, + 8851: 0xAF5D, + 8852: 0xAF64, + 8853: 0xAF65, + 8854: 0xAF79, + 8855: 0xAF80, + 8856: 0xAF84, + 8857: 0xAF88, + 8858: 0xAF90, + 8859: 0xAF91, + 8860: 0xAF95, + 8861: 0xAF9C, + 8862: 0xAFB8, + 8863: 0xAFB9, + 8864: 0xAFBC, + 8865: 0xAFC0, + 8866: 0xAFC7, + 8867: 0xAFC8, + 8868: 0xAFC9, + 8869: 0xAFCB, + 8870: 0xAFCD, + 8871: 0xAFCE, + 8872: 0xAFD4, + 8873: 0xAFDC, + 8874: 0xAFE8, + 8875: 0xAFE9, + 8876: 0xAFF0, + 8877: 0xAFF1, + 8878: 0xAFF4, + 8879: 0xAFF8, + 8880: 0xB000, + 8881: 0xB001, + 8882: 0xB004, + 8883: 0xB00C, + 8884: 0xB010, + 8885: 0xB014, + 8886: 0xB01C, + 8887: 0xB01D, + 8888: 0xB028, + 8889: 0xB044, + 8890: 0xB045, + 8891: 0xB048, + 8892: 0xB04A, + 8893: 0xB04C, + 8894: 0xB04E, + 8895: 0xB053, + 8896: 0xB054, + 8897: 0xB055, + 8898: 0xB057, + 8899: 0xB059, + 8900: 0xCFCC, + 8901: 0xCFCD, + 8902: 0xCFCE, + 8903: 0xCFCF, + 8904: 0xCFD0, + 8905: 0xCFD1, + 8906: 0xCFD2, + 8907: 0xCFD3, + 8908: 0xCFD4, + 8909: 0xCFD5, + 8910: 0xCFD6, + 8911: 0xCFD7, + 8912: 0xCFD8, + 8913: 0xCFD9, + 8914: 0xCFDA, + 8915: 0xCFDB, + 8916: 0xCFDC, + 8917: 0xCFDD, + 8918: 0xCFDE, + 8919: 0xCFDF, + 8920: 0xCFE2, + 8921: 0xCFE3, + 8922: 0xCFE5, + 8923: 0xCFE6, + 8924: 0xCFE7, + 8925: 0xCFE9, + 8926: 0xCFEA, + 8927: 0xCFEB, + 8928: 0xCFEC, + 8929: 0xCFED, + 8930: 0xCFEE, + 8931: 0xCFEF, + 8932: 0xCFF2, + 8933: 0xCFF4, + 8934: 0xCFF6, + 8935: 0xCFF7, + 8936: 0xCFF8, + 8937: 0xCFF9, + 8938: 0xCFFA, + 8939: 0xCFFB, + 8940: 0xCFFD, + 8941: 0xCFFE, + 8942: 0xCFFF, + 8943: 0xD001, + 8944: 0xD002, + 8945: 0xD003, + 8946: 0xD005, + 8947: 0xD006, + 8948: 0xD007, + 8949: 0xD008, + 8950: 0xD009, + 8951: 0xD00A, + 8952: 0xD00B, + 8953: 0xD00C, + 8954: 0xD00D, + 8955: 0xD00E, + 8956: 0xD00F, + 8957: 0xD010, + 8958: 0xD012, + 8959: 0xD013, + 8960: 0xD014, + 8961: 0xD015, + 8962: 0xD016, + 8963: 0xD017, + 8964: 0xD019, + 8965: 0xD01A, + 8966: 0xD01B, + 8967: 0xD01C, + 8968: 0xD01D, + 8969: 0xD01E, + 8970: 0xD01F, + 8971: 0xD020, + 8972: 0xD021, + 8973: 0xD022, + 8974: 0xD023, + 8975: 0xD024, + 8976: 0xD025, + 8977: 0xD026, + 8978: 0xD027, + 8979: 0xD028, + 8980: 0xD029, + 8981: 0xD02A, + 8982: 0xD02B, + 8983: 0xD02C, + 8984: 0xB05D, + 8985: 0xB07C, + 8986: 0xB07D, + 8987: 0xB080, + 8988: 0xB084, + 8989: 0xB08C, + 8990: 0xB08D, + 8991: 0xB08F, + 8992: 0xB091, + 8993: 0xB098, + 8994: 0xB099, + 8995: 0xB09A, + 8996: 0xB09C, + 8997: 0xB09F, + 8998: 0xB0A0, + 8999: 0xB0A1, + 9000: 0xB0A2, + 9001: 0xB0A8, + 9002: 0xB0A9, + 9003: 0xB0AB, + 9004: 0xB0AC, + 9005: 0xB0AD, + 9006: 0xB0AE, + 9007: 0xB0AF, + 9008: 0xB0B1, + 9009: 0xB0B3, + 9010: 0xB0B4, + 9011: 0xB0B5, + 9012: 0xB0B8, + 9013: 0xB0BC, + 9014: 0xB0C4, + 9015: 0xB0C5, + 9016: 0xB0C7, + 9017: 0xB0C8, + 9018: 0xB0C9, + 9019: 0xB0D0, + 9020: 0xB0D1, + 9021: 0xB0D4, + 9022: 0xB0D8, + 9023: 0xB0E0, + 9024: 0xB0E5, + 9025: 0xB108, + 9026: 0xB109, + 9027: 0xB10B, + 9028: 0xB10C, + 9029: 0xB110, + 9030: 0xB112, + 9031: 0xB113, + 9032: 0xB118, + 9033: 0xB119, + 9034: 0xB11B, + 9035: 0xB11C, + 9036: 0xB11D, + 9037: 0xB123, + 9038: 0xB124, + 9039: 0xB125, + 9040: 0xB128, + 9041: 0xB12C, + 9042: 0xB134, + 9043: 0xB135, + 9044: 0xB137, + 9045: 0xB138, + 9046: 0xB139, + 9047: 0xB140, + 9048: 0xB141, + 9049: 0xB144, + 9050: 0xB148, + 9051: 0xB150, + 9052: 0xB151, + 9053: 0xB154, + 9054: 0xB155, + 9055: 0xB158, + 9056: 0xB15C, + 9057: 0xB160, + 9058: 0xB178, + 9059: 0xB179, + 9060: 0xB17C, + 9061: 0xB180, + 9062: 0xB182, + 9063: 0xB188, + 9064: 0xB189, + 9065: 0xB18B, + 9066: 0xB18D, + 9067: 0xB192, + 9068: 0xB193, + 9069: 0xB194, + 9070: 0xB198, + 9071: 0xB19C, + 9072: 0xB1A8, + 9073: 0xB1CC, + 9074: 0xB1D0, + 9075: 0xB1D4, + 9076: 0xB1DC, + 9077: 0xB1DD, + 9078: 0xD02E, + 9079: 0xD02F, + 9080: 0xD030, + 9081: 0xD031, + 9082: 0xD032, + 9083: 0xD033, + 9084: 0xD036, + 9085: 0xD037, + 9086: 0xD039, + 9087: 0xD03A, + 9088: 0xD03B, + 9089: 0xD03D, + 9090: 0xD03E, + 9091: 0xD03F, + 9092: 0xD040, + 9093: 0xD041, + 9094: 0xD042, + 9095: 0xD043, + 9096: 0xD046, + 9097: 0xD048, + 9098: 0xD04A, + 9099: 0xD04B, + 9100: 0xD04C, + 9101: 0xD04D, + 9102: 0xD04E, + 9103: 0xD04F, + 9104: 0xD051, + 9105: 0xD052, + 9106: 0xD053, + 9107: 0xD055, + 9108: 0xD056, + 9109: 0xD057, + 9110: 0xD059, + 9111: 0xD05A, + 9112: 0xD05B, + 9113: 0xD05C, + 9114: 0xD05D, + 9115: 0xD05E, + 9116: 0xD05F, + 9117: 0xD061, + 9118: 0xD062, + 9119: 0xD063, + 9120: 0xD064, + 9121: 0xD065, + 9122: 0xD066, + 9123: 0xD067, + 9124: 0xD068, + 9125: 0xD069, + 9126: 0xD06A, + 9127: 0xD06B, + 9128: 0xD06E, + 9129: 0xD06F, + 9130: 0xD071, + 9131: 0xD072, + 9132: 0xD073, + 9133: 0xD075, + 9134: 0xD076, + 9135: 0xD077, + 9136: 0xD078, + 9137: 0xD079, + 9138: 0xD07A, + 9139: 0xD07B, + 9140: 0xD07E, + 9141: 0xD07F, + 9142: 0xD080, + 9143: 0xD082, + 9144: 0xD083, + 9145: 0xD084, + 9146: 0xD085, + 9147: 0xD086, + 9148: 0xD087, + 9149: 0xD088, + 9150: 0xD089, + 9151: 0xD08A, + 9152: 0xD08B, + 9153: 0xD08C, + 9154: 0xD08D, + 9155: 0xD08E, + 9156: 0xD08F, + 9157: 0xD090, + 9158: 0xD091, + 9159: 0xD092, + 9160: 0xD093, + 9161: 0xD094, + 9162: 0xB1DF, + 9163: 0xB1E8, + 9164: 0xB1E9, + 9165: 0xB1EC, + 9166: 0xB1F0, + 9167: 0xB1F9, + 9168: 0xB1FB, + 9169: 0xB1FD, + 9170: 0xB204, + 9171: 0xB205, + 9172: 0xB208, + 9173: 0xB20B, + 9174: 0xB20C, + 9175: 0xB214, + 9176: 0xB215, + 9177: 0xB217, + 9178: 0xB219, + 9179: 0xB220, + 9180: 0xB234, + 9181: 0xB23C, + 9182: 0xB258, + 9183: 0xB25C, + 9184: 0xB260, + 9185: 0xB268, + 9186: 0xB269, + 9187: 0xB274, + 9188: 0xB275, + 9189: 0xB27C, + 9190: 0xB284, + 9191: 0xB285, + 9192: 0xB289, + 9193: 0xB290, + 9194: 0xB291, + 9195: 0xB294, + 9196: 0xB298, + 9197: 0xB299, + 9198: 0xB29A, + 9199: 0xB2A0, + 9200: 0xB2A1, + 9201: 0xB2A3, + 9202: 0xB2A5, + 9203: 0xB2A6, + 9204: 0xB2AA, + 9205: 0xB2AC, + 9206: 0xB2B0, + 9207: 0xB2B4, + 9208: 0xB2C8, + 9209: 0xB2C9, + 9210: 0xB2CC, + 9211: 0xB2D0, + 9212: 0xB2D2, + 9213: 0xB2D8, + 9214: 0xB2D9, + 9215: 0xB2DB, + 9216: 0xB2DD, + 9217: 0xB2E2, + 9218: 0xB2E4, + 9219: 0xB2E5, + 9220: 0xB2E6, + 9221: 0xB2E8, + 9222: 0xB2EB, + 9223: 0xB2EC, + 9224: 0xB2ED, + 9225: 0xB2EE, + 9226: 0xB2EF, + 9227: 0xB2F3, + 9228: 0xB2F4, + 9229: 0xB2F5, + 9230: 0xB2F7, + 9231: 0xB2F8, + 9232: 0xB2F9, + 9233: 0xB2FA, + 9234: 0xB2FB, + 9235: 0xB2FF, + 9236: 0xB300, + 9237: 0xB301, + 9238: 0xB304, + 9239: 0xB308, + 9240: 0xB310, + 9241: 0xB311, + 9242: 0xB313, + 9243: 0xB314, + 9244: 0xB315, + 9245: 0xB31C, + 9246: 0xB354, + 9247: 0xB355, + 9248: 0xB356, + 9249: 0xB358, + 9250: 0xB35B, + 9251: 0xB35C, + 9252: 0xB35E, + 9253: 0xB35F, + 9254: 0xB364, + 9255: 0xB365, + 9256: 0xD095, + 9257: 0xD096, + 9258: 0xD097, + 9259: 0xD098, + 9260: 0xD099, + 9261: 0xD09A, + 9262: 0xD09B, + 9263: 0xD09C, + 9264: 0xD09D, + 9265: 0xD09E, + 9266: 0xD09F, + 9267: 0xD0A0, + 9268: 0xD0A1, + 9269: 0xD0A2, + 9270: 0xD0A3, + 9271: 0xD0A6, + 9272: 0xD0A7, + 9273: 0xD0A9, + 9274: 0xD0AA, + 9275: 0xD0AB, + 9276: 0xD0AD, + 9277: 0xD0AE, + 9278: 0xD0AF, + 9279: 0xD0B0, + 9280: 0xD0B1, + 9281: 0xD0B2, + 9282: 0xD0B3, + 9283: 0xD0B6, + 9284: 0xD0B8, + 9285: 0xD0BA, + 9286: 0xD0BB, + 9287: 0xD0BC, + 9288: 0xD0BD, + 9289: 0xD0BE, + 9290: 0xD0BF, + 9291: 0xD0C2, + 9292: 0xD0C3, + 9293: 0xD0C5, + 9294: 0xD0C6, + 9295: 0xD0C7, + 9296: 0xD0CA, + 9297: 0xD0CB, + 9298: 0xD0CC, + 9299: 0xD0CD, + 9300: 0xD0CE, + 9301: 0xD0CF, + 9302: 0xD0D2, + 9303: 0xD0D6, + 9304: 0xD0D7, + 9305: 0xD0D8, + 9306: 0xD0D9, + 9307: 0xD0DA, + 9308: 0xD0DB, + 9309: 0xD0DE, + 9310: 0xD0DF, + 9311: 0xD0E1, + 9312: 0xD0E2, + 9313: 0xD0E3, + 9314: 0xD0E5, + 9315: 0xD0E6, + 9316: 0xD0E7, + 9317: 0xD0E8, + 9318: 0xD0E9, + 9319: 0xD0EA, + 9320: 0xD0EB, + 9321: 0xD0EE, + 9322: 0xD0F2, + 9323: 0xD0F3, + 9324: 0xD0F4, + 9325: 0xD0F5, + 9326: 0xD0F6, + 9327: 0xD0F7, + 9328: 0xD0F9, + 9329: 0xD0FA, + 9330: 0xD0FB, + 9331: 0xD0FC, + 9332: 0xD0FD, + 9333: 0xD0FE, + 9334: 0xD0FF, + 9335: 0xD100, + 9336: 0xD101, + 9337: 0xD102, + 9338: 0xD103, + 9339: 0xD104, + 9340: 0xB367, + 9341: 0xB369, + 9342: 0xB36B, + 9343: 0xB36E, + 9344: 0xB370, + 9345: 0xB371, + 9346: 0xB374, + 9347: 0xB378, + 9348: 0xB380, + 9349: 0xB381, + 9350: 0xB383, + 9351: 0xB384, + 9352: 0xB385, + 9353: 0xB38C, + 9354: 0xB390, + 9355: 0xB394, + 9356: 0xB3A0, + 9357: 0xB3A1, + 9358: 0xB3A8, + 9359: 0xB3AC, + 9360: 0xB3C4, + 9361: 0xB3C5, + 9362: 0xB3C8, + 9363: 0xB3CB, + 9364: 0xB3CC, + 9365: 0xB3CE, + 9366: 0xB3D0, + 9367: 0xB3D4, + 9368: 0xB3D5, + 9369: 0xB3D7, + 9370: 0xB3D9, + 9371: 0xB3DB, + 9372: 0xB3DD, + 9373: 0xB3E0, + 9374: 0xB3E4, + 9375: 0xB3E8, + 9376: 0xB3FC, + 9377: 0xB410, + 9378: 0xB418, + 9379: 0xB41C, + 9380: 0xB420, + 9381: 0xB428, + 9382: 0xB429, + 9383: 0xB42B, + 9384: 0xB434, + 9385: 0xB450, + 9386: 0xB451, + 9387: 0xB454, + 9388: 0xB458, + 9389: 0xB460, + 9390: 0xB461, + 9391: 0xB463, + 9392: 0xB465, + 9393: 0xB46C, + 9394: 0xB480, + 9395: 0xB488, + 9396: 0xB49D, + 9397: 0xB4A4, + 9398: 0xB4A8, + 9399: 0xB4AC, + 9400: 0xB4B5, + 9401: 0xB4B7, + 9402: 0xB4B9, + 9403: 0xB4C0, + 9404: 0xB4C4, + 9405: 0xB4C8, + 9406: 0xB4D0, + 9407: 0xB4D5, + 9408: 0xB4DC, + 9409: 0xB4DD, + 9410: 0xB4E0, + 9411: 0xB4E3, + 9412: 0xB4E4, + 9413: 0xB4E6, + 9414: 0xB4EC, + 9415: 0xB4ED, + 9416: 0xB4EF, + 9417: 0xB4F1, + 9418: 0xB4F8, + 9419: 0xB514, + 9420: 0xB515, + 9421: 0xB518, + 9422: 0xB51B, + 9423: 0xB51C, + 9424: 0xB524, + 9425: 0xB525, + 9426: 0xB527, + 9427: 0xB528, + 9428: 0xB529, + 9429: 0xB52A, + 9430: 0xB530, + 9431: 0xB531, + 9432: 0xB534, + 9433: 0xB538, + 9434: 0xD105, + 9435: 0xD106, + 9436: 0xD107, + 9437: 0xD108, + 9438: 0xD109, + 9439: 0xD10A, + 9440: 0xD10B, + 9441: 0xD10C, + 9442: 0xD10E, + 9443: 0xD10F, + 9444: 0xD110, + 9445: 0xD111, + 9446: 0xD112, + 9447: 0xD113, + 9448: 0xD114, + 9449: 0xD115, + 9450: 0xD116, + 9451: 0xD117, + 9452: 0xD118, + 9453: 0xD119, + 9454: 0xD11A, + 9455: 0xD11B, + 9456: 0xD11C, + 9457: 0xD11D, + 9458: 0xD11E, + 9459: 0xD11F, + 9460: 0xD120, + 9461: 0xD121, + 9462: 0xD122, + 9463: 0xD123, + 9464: 0xD124, + 9465: 0xD125, + 9466: 0xD126, + 9467: 0xD127, + 9468: 0xD128, + 9469: 0xD129, + 9470: 0xD12A, + 9471: 0xD12B, + 9472: 0xD12C, + 9473: 0xD12D, + 9474: 0xD12E, + 9475: 0xD12F, + 9476: 0xD132, + 9477: 0xD133, + 9478: 0xD135, + 9479: 0xD136, + 9480: 0xD137, + 9481: 0xD139, + 9482: 0xD13B, + 9483: 0xD13C, + 9484: 0xD13D, + 9485: 0xD13E, + 9486: 0xD13F, + 9487: 0xD142, + 9488: 0xD146, + 9489: 0xD147, + 9490: 0xD148, + 9491: 0xD149, + 9492: 0xD14A, + 9493: 0xD14B, + 9494: 0xD14E, + 9495: 0xD14F, + 9496: 0xD151, + 9497: 0xD152, + 9498: 0xD153, + 9499: 0xD155, + 9500: 0xD156, + 9501: 0xD157, + 9502: 0xD158, + 9503: 0xD159, + 9504: 0xD15A, + 9505: 0xD15B, + 9506: 0xD15E, + 9507: 0xD160, + 9508: 0xD162, + 9509: 0xD163, + 9510: 0xD164, + 9511: 0xD165, + 9512: 0xD166, + 9513: 0xD167, + 9514: 0xD169, + 9515: 0xD16A, + 9516: 0xD16B, + 9517: 0xD16D, + 9518: 0xB540, + 9519: 0xB541, + 9520: 0xB543, + 9521: 0xB544, + 9522: 0xB545, + 9523: 0xB54B, + 9524: 0xB54C, + 9525: 0xB54D, + 9526: 0xB550, + 9527: 0xB554, + 9528: 0xB55C, + 9529: 0xB55D, + 9530: 0xB55F, + 9531: 0xB560, + 9532: 0xB561, + 9533: 0xB5A0, + 9534: 0xB5A1, + 9535: 0xB5A4, + 9536: 0xB5A8, + 9537: 0xB5AA, + 9538: 0xB5AB, + 9539: 0xB5B0, + 9540: 0xB5B1, + 9541: 0xB5B3, + 9542: 0xB5B4, + 9543: 0xB5B5, + 9544: 0xB5BB, + 9545: 0xB5BC, + 9546: 0xB5BD, + 9547: 0xB5C0, + 9548: 0xB5C4, + 9549: 0xB5CC, + 9550: 0xB5CD, + 9551: 0xB5CF, + 9552: 0xB5D0, + 9553: 0xB5D1, + 9554: 0xB5D8, + 9555: 0xB5EC, + 9556: 0xB610, + 9557: 0xB611, + 9558: 0xB614, + 9559: 0xB618, + 9560: 0xB625, + 9561: 0xB62C, + 9562: 0xB634, + 9563: 0xB648, + 9564: 0xB664, + 9565: 0xB668, + 9566: 0xB69C, + 9567: 0xB69D, + 9568: 0xB6A0, + 9569: 0xB6A4, + 9570: 0xB6AB, + 9571: 0xB6AC, + 9572: 0xB6B1, + 9573: 0xB6D4, + 9574: 0xB6F0, + 9575: 0xB6F4, + 9576: 0xB6F8, + 9577: 0xB700, + 9578: 0xB701, + 9579: 0xB705, + 9580: 0xB728, + 9581: 0xB729, + 9582: 0xB72C, + 9583: 0xB72F, + 9584: 0xB730, + 9585: 0xB738, + 9586: 0xB739, + 9587: 0xB73B, + 9588: 0xB744, + 9589: 0xB748, + 9590: 0xB74C, + 9591: 0xB754, + 9592: 0xB755, + 9593: 0xB760, + 9594: 0xB764, + 9595: 0xB768, + 9596: 0xB770, + 9597: 0xB771, + 9598: 0xB773, + 9599: 0xB775, + 9600: 0xB77C, + 9601: 0xB77D, + 9602: 0xB780, + 9603: 0xB784, + 9604: 0xB78C, + 9605: 0xB78D, + 9606: 0xB78F, + 9607: 0xB790, + 9608: 0xB791, + 9609: 0xB792, + 9610: 0xB796, + 9611: 0xB797, + 9612: 0xD16E, + 9613: 0xD16F, + 9614: 0xD170, + 9615: 0xD171, + 9616: 0xD172, + 9617: 0xD173, + 9618: 0xD174, + 9619: 0xD175, + 9620: 0xD176, + 9621: 0xD177, + 9622: 0xD178, + 9623: 0xD179, + 9624: 0xD17A, + 9625: 0xD17B, + 9626: 0xD17D, + 9627: 0xD17E, + 9628: 0xD17F, + 9629: 0xD180, + 9630: 0xD181, + 9631: 0xD182, + 9632: 0xD183, + 9633: 0xD185, + 9634: 0xD186, + 9635: 0xD187, + 9636: 0xD189, + 9637: 0xD18A, + 9638: 0xD18B, + 9639: 0xD18C, + 9640: 0xD18D, + 9641: 0xD18E, + 9642: 0xD18F, + 9643: 0xD190, + 9644: 0xD191, + 9645: 0xD192, + 9646: 0xD193, + 9647: 0xD194, + 9648: 0xD195, + 9649: 0xD196, + 9650: 0xD197, + 9651: 0xD198, + 9652: 0xD199, + 9653: 0xD19A, + 9654: 0xD19B, + 9655: 0xD19C, + 9656: 0xD19D, + 9657: 0xD19E, + 9658: 0xD19F, + 9659: 0xD1A2, + 9660: 0xD1A3, + 9661: 0xD1A5, + 9662: 0xD1A6, + 9663: 0xD1A7, + 9664: 0xD1A9, + 9665: 0xD1AA, + 9666: 0xD1AB, + 9667: 0xD1AC, + 9668: 0xD1AD, + 9669: 0xD1AE, + 9670: 0xD1AF, + 9671: 0xD1B2, + 9672: 0xD1B4, + 9673: 0xD1B6, + 9674: 0xD1B7, + 9675: 0xD1B8, + 9676: 0xD1B9, + 9677: 0xD1BB, + 9678: 0xD1BD, + 9679: 0xD1BE, + 9680: 0xD1BF, + 9681: 0xD1C1, + 9682: 0xD1C2, + 9683: 0xD1C3, + 9684: 0xD1C4, + 9685: 0xD1C5, + 9686: 0xD1C6, + 9687: 0xD1C7, + 9688: 0xD1C8, + 9689: 0xD1C9, + 9690: 0xD1CA, + 9691: 0xD1CB, + 9692: 0xD1CC, + 9693: 0xD1CD, + 9694: 0xD1CE, + 9695: 0xD1CF, + 9696: 0xB798, + 9697: 0xB799, + 9698: 0xB79C, + 9699: 0xB7A0, + 9700: 0xB7A8, + 9701: 0xB7A9, + 9702: 0xB7AB, + 9703: 0xB7AC, + 9704: 0xB7AD, + 9705: 0xB7B4, + 9706: 0xB7B5, + 9707: 0xB7B8, + 9708: 0xB7C7, + 9709: 0xB7C9, + 9710: 0xB7EC, + 9711: 0xB7ED, + 9712: 0xB7F0, + 9713: 0xB7F4, + 9714: 0xB7FC, + 9715: 0xB7FD, + 9716: 0xB7FF, + 9717: 0xB800, + 9718: 0xB801, + 9719: 0xB807, + 9720: 0xB808, + 9721: 0xB809, + 9722: 0xB80C, + 9723: 0xB810, + 9724: 0xB818, + 9725: 0xB819, + 9726: 0xB81B, + 9727: 0xB81D, + 9728: 0xB824, + 9729: 0xB825, + 9730: 0xB828, + 9731: 0xB82C, + 9732: 0xB834, + 9733: 0xB835, + 9734: 0xB837, + 9735: 0xB838, + 9736: 0xB839, + 9737: 0xB840, + 9738: 0xB844, + 9739: 0xB851, + 9740: 0xB853, + 9741: 0xB85C, + 9742: 0xB85D, + 9743: 0xB860, + 9744: 0xB864, + 9745: 0xB86C, + 9746: 0xB86D, + 9747: 0xB86F, + 9748: 0xB871, + 9749: 0xB878, + 9750: 0xB87C, + 9751: 0xB88D, + 9752: 0xB8A8, + 9753: 0xB8B0, + 9754: 0xB8B4, + 9755: 0xB8B8, + 9756: 0xB8C0, + 9757: 0xB8C1, + 9758: 0xB8C3, + 9759: 0xB8C5, + 9760: 0xB8CC, + 9761: 0xB8D0, + 9762: 0xB8D4, + 9763: 0xB8DD, + 9764: 0xB8DF, + 9765: 0xB8E1, + 9766: 0xB8E8, + 9767: 0xB8E9, + 9768: 0xB8EC, + 9769: 0xB8F0, + 9770: 0xB8F8, + 9771: 0xB8F9, + 9772: 0xB8FB, + 9773: 0xB8FD, + 9774: 0xB904, + 9775: 0xB918, + 9776: 0xB920, + 9777: 0xB93C, + 9778: 0xB93D, + 9779: 0xB940, + 9780: 0xB944, + 9781: 0xB94C, + 9782: 0xB94F, + 9783: 0xB951, + 9784: 0xB958, + 9785: 0xB959, + 9786: 0xB95C, + 9787: 0xB960, + 9788: 0xB968, + 9789: 0xB969, + 9790: 0xD1D0, + 9791: 0xD1D1, + 9792: 0xD1D2, + 9793: 0xD1D3, + 9794: 0xD1D4, + 9795: 0xD1D5, + 9796: 0xD1D6, + 9797: 0xD1D7, + 9798: 0xD1D9, + 9799: 0xD1DA, + 9800: 0xD1DB, + 9801: 0xD1DC, + 9802: 0xD1DD, + 9803: 0xD1DE, + 9804: 0xD1DF, + 9805: 0xD1E0, + 9806: 0xD1E1, + 9807: 0xD1E2, + 9808: 0xD1E3, + 9809: 0xD1E4, + 9810: 0xD1E5, + 9811: 0xD1E6, + 9812: 0xD1E7, + 9813: 0xD1E8, + 9814: 0xD1E9, + 9815: 0xD1EA, + 9816: 0xD1EB, + 9817: 0xD1EC, + 9818: 0xD1ED, + 9819: 0xD1EE, + 9820: 0xD1EF, + 9821: 0xD1F0, + 9822: 0xD1F1, + 9823: 0xD1F2, + 9824: 0xD1F3, + 9825: 0xD1F5, + 9826: 0xD1F6, + 9827: 0xD1F7, + 9828: 0xD1F9, + 9829: 0xD1FA, + 9830: 0xD1FB, + 9831: 0xD1FC, + 9832: 0xD1FD, + 9833: 0xD1FE, + 9834: 0xD1FF, + 9835: 0xD200, + 9836: 0xD201, + 9837: 0xD202, + 9838: 0xD203, + 9839: 0xD204, + 9840: 0xD205, + 9841: 0xD206, + 9842: 0xD208, + 9843: 0xD20A, + 9844: 0xD20B, + 9845: 0xD20C, + 9846: 0xD20D, + 9847: 0xD20E, + 9848: 0xD20F, + 9849: 0xD211, + 9850: 0xD212, + 9851: 0xD213, + 9852: 0xD214, + 9853: 0xD215, + 9854: 0xD216, + 9855: 0xD217, + 9856: 0xD218, + 9857: 0xD219, + 9858: 0xD21A, + 9859: 0xD21B, + 9860: 0xD21C, + 9861: 0xD21D, + 9862: 0xD21E, + 9863: 0xD21F, + 9864: 0xD220, + 9865: 0xD221, + 9866: 0xD222, + 9867: 0xD223, + 9868: 0xD224, + 9869: 0xD225, + 9870: 0xD226, + 9871: 0xD227, + 9872: 0xD228, + 9873: 0xD229, + 9874: 0xB96B, + 9875: 0xB96D, + 9876: 0xB974, + 9877: 0xB975, + 9878: 0xB978, + 9879: 0xB97C, + 9880: 0xB984, + 9881: 0xB985, + 9882: 0xB987, + 9883: 0xB989, + 9884: 0xB98A, + 9885: 0xB98D, + 9886: 0xB98E, + 9887: 0xB9AC, + 9888: 0xB9AD, + 9889: 0xB9B0, + 9890: 0xB9B4, + 9891: 0xB9BC, + 9892: 0xB9BD, + 9893: 0xB9BF, + 9894: 0xB9C1, + 9895: 0xB9C8, + 9896: 0xB9C9, + 9897: 0xB9CC, + 9898: 0xB9CE, + 9899: 0xB9CF, + 9900: 0xB9D0, + 9901: 0xB9D1, + 9902: 0xB9D2, + 9903: 0xB9D8, + 9904: 0xB9D9, + 9905: 0xB9DB, + 9906: 0xB9DD, + 9907: 0xB9DE, + 9908: 0xB9E1, + 9909: 0xB9E3, + 9910: 0xB9E4, + 9911: 0xB9E5, + 9912: 0xB9E8, + 9913: 0xB9EC, + 9914: 0xB9F4, + 9915: 0xB9F5, + 9916: 0xB9F7, + 9917: 0xB9F8, + 9918: 0xB9F9, + 9919: 0xB9FA, + 9920: 0xBA00, + 9921: 0xBA01, + 9922: 0xBA08, + 9923: 0xBA15, + 9924: 0xBA38, + 9925: 0xBA39, + 9926: 0xBA3C, + 9927: 0xBA40, + 9928: 0xBA42, + 9929: 0xBA48, + 9930: 0xBA49, + 9931: 0xBA4B, + 9932: 0xBA4D, + 9933: 0xBA4E, + 9934: 0xBA53, + 9935: 0xBA54, + 9936: 0xBA55, + 9937: 0xBA58, + 9938: 0xBA5C, + 9939: 0xBA64, + 9940: 0xBA65, + 9941: 0xBA67, + 9942: 0xBA68, + 9943: 0xBA69, + 9944: 0xBA70, + 9945: 0xBA71, + 9946: 0xBA74, + 9947: 0xBA78, + 9948: 0xBA83, + 9949: 0xBA84, + 9950: 0xBA85, + 9951: 0xBA87, + 9952: 0xBA8C, + 9953: 0xBAA8, + 9954: 0xBAA9, + 9955: 0xBAAB, + 9956: 0xBAAC, + 9957: 0xBAB0, + 9958: 0xBAB2, + 9959: 0xBAB8, + 9960: 0xBAB9, + 9961: 0xBABB, + 9962: 0xBABD, + 9963: 0xBAC4, + 9964: 0xBAC8, + 9965: 0xBAD8, + 9966: 0xBAD9, + 9967: 0xBAFC, + 9968: 0xD22A, + 9969: 0xD22B, + 9970: 0xD22E, + 9971: 0xD22F, + 9972: 0xD231, + 9973: 0xD232, + 9974: 0xD233, + 9975: 0xD235, + 9976: 0xD236, + 9977: 0xD237, + 9978: 0xD238, + 9979: 0xD239, + 9980: 0xD23A, + 9981: 0xD23B, + 9982: 0xD23E, + 9983: 0xD240, + 9984: 0xD242, + 9985: 0xD243, + 9986: 0xD244, + 9987: 0xD245, + 9988: 0xD246, + 9989: 0xD247, + 9990: 0xD249, + 9991: 0xD24A, + 9992: 0xD24B, + 9993: 0xD24C, + 9994: 0xD24D, + 9995: 0xD24E, + 9996: 0xD24F, + 9997: 0xD250, + 9998: 0xD251, + 9999: 0xD252, + 10000: 0xD253, + 10001: 0xD254, + 10002: 0xD255, + 10003: 0xD256, + 10004: 0xD257, + 10005: 0xD258, + 10006: 0xD259, + 10007: 0xD25A, + 10008: 0xD25B, + 10009: 0xD25D, + 10010: 0xD25E, + 10011: 0xD25F, + 10012: 0xD260, + 10013: 0xD261, + 10014: 0xD262, + 10015: 0xD263, + 10016: 0xD265, + 10017: 0xD266, + 10018: 0xD267, + 10019: 0xD268, + 10020: 0xD269, + 10021: 0xD26A, + 10022: 0xD26B, + 10023: 0xD26C, + 10024: 0xD26D, + 10025: 0xD26E, + 10026: 0xD26F, + 10027: 0xD270, + 10028: 0xD271, + 10029: 0xD272, + 10030: 0xD273, + 10031: 0xD274, + 10032: 0xD275, + 10033: 0xD276, + 10034: 0xD277, + 10035: 0xD278, + 10036: 0xD279, + 10037: 0xD27A, + 10038: 0xD27B, + 10039: 0xD27C, + 10040: 0xD27D, + 10041: 0xD27E, + 10042: 0xD27F, + 10043: 0xD282, + 10044: 0xD283, + 10045: 0xD285, + 10046: 0xD286, + 10047: 0xD287, + 10048: 0xD289, + 10049: 0xD28A, + 10050: 0xD28B, + 10051: 0xD28C, + 10052: 0xBB00, + 10053: 0xBB04, + 10054: 0xBB0D, + 10055: 0xBB0F, + 10056: 0xBB11, + 10057: 0xBB18, + 10058: 0xBB1C, + 10059: 0xBB20, + 10060: 0xBB29, + 10061: 0xBB2B, + 10062: 0xBB34, + 10063: 0xBB35, + 10064: 0xBB36, + 10065: 0xBB38, + 10066: 0xBB3B, + 10067: 0xBB3C, + 10068: 0xBB3D, + 10069: 0xBB3E, + 10070: 0xBB44, + 10071: 0xBB45, + 10072: 0xBB47, + 10073: 0xBB49, + 10074: 0xBB4D, + 10075: 0xBB4F, + 10076: 0xBB50, + 10077: 0xBB54, + 10078: 0xBB58, + 10079: 0xBB61, + 10080: 0xBB63, + 10081: 0xBB6C, + 10082: 0xBB88, + 10083: 0xBB8C, + 10084: 0xBB90, + 10085: 0xBBA4, + 10086: 0xBBA8, + 10087: 0xBBAC, + 10088: 0xBBB4, + 10089: 0xBBB7, + 10090: 0xBBC0, + 10091: 0xBBC4, + 10092: 0xBBC8, + 10093: 0xBBD0, + 10094: 0xBBD3, + 10095: 0xBBF8, + 10096: 0xBBF9, + 10097: 0xBBFC, + 10098: 0xBBFF, + 10099: 0xBC00, + 10100: 0xBC02, + 10101: 0xBC08, + 10102: 0xBC09, + 10103: 0xBC0B, + 10104: 0xBC0C, + 10105: 0xBC0D, + 10106: 0xBC0F, + 10107: 0xBC11, + 10108: 0xBC14, + 10109: 0xBC15, + 10110: 0xBC16, + 10111: 0xBC17, + 10112: 0xBC18, + 10113: 0xBC1B, + 10114: 0xBC1C, + 10115: 0xBC1D, + 10116: 0xBC1E, + 10117: 0xBC1F, + 10118: 0xBC24, + 10119: 0xBC25, + 10120: 0xBC27, + 10121: 0xBC29, + 10122: 0xBC2D, + 10123: 0xBC30, + 10124: 0xBC31, + 10125: 0xBC34, + 10126: 0xBC38, + 10127: 0xBC40, + 10128: 0xBC41, + 10129: 0xBC43, + 10130: 0xBC44, + 10131: 0xBC45, + 10132: 0xBC49, + 10133: 0xBC4C, + 10134: 0xBC4D, + 10135: 0xBC50, + 10136: 0xBC5D, + 10137: 0xBC84, + 10138: 0xBC85, + 10139: 0xBC88, + 10140: 0xBC8B, + 10141: 0xBC8C, + 10142: 0xBC8E, + 10143: 0xBC94, + 10144: 0xBC95, + 10145: 0xBC97, + 10146: 0xD28D, + 10147: 0xD28E, + 10148: 0xD28F, + 10149: 0xD292, + 10150: 0xD293, + 10151: 0xD294, + 10152: 0xD296, + 10153: 0xD297, + 10154: 0xD298, + 10155: 0xD299, + 10156: 0xD29A, + 10157: 0xD29B, + 10158: 0xD29D, + 10159: 0xD29E, + 10160: 0xD29F, + 10161: 0xD2A1, + 10162: 0xD2A2, + 10163: 0xD2A3, + 10164: 0xD2A5, + 10165: 0xD2A6, + 10166: 0xD2A7, + 10167: 0xD2A8, + 10168: 0xD2A9, + 10169: 0xD2AA, + 10170: 0xD2AB, + 10171: 0xD2AD, + 10172: 0xD2AE, + 10173: 0xD2AF, + 10174: 0xD2B0, + 10175: 0xD2B2, + 10176: 0xD2B3, + 10177: 0xD2B4, + 10178: 0xD2B5, + 10179: 0xD2B6, + 10180: 0xD2B7, + 10181: 0xD2BA, + 10182: 0xD2BB, + 10183: 0xD2BD, + 10184: 0xD2BE, + 10185: 0xD2C1, + 10186: 0xD2C3, + 10187: 0xD2C4, + 10188: 0xD2C5, + 10189: 0xD2C6, + 10190: 0xD2C7, + 10191: 0xD2CA, + 10192: 0xD2CC, + 10193: 0xD2CD, + 10194: 0xD2CE, + 10195: 0xD2CF, + 10196: 0xD2D0, + 10197: 0xD2D1, + 10198: 0xD2D2, + 10199: 0xD2D3, + 10200: 0xD2D5, + 10201: 0xD2D6, + 10202: 0xD2D7, + 10203: 0xD2D9, + 10204: 0xD2DA, + 10205: 0xD2DB, + 10206: 0xD2DD, + 10207: 0xD2DE, + 10208: 0xD2DF, + 10209: 0xD2E0, + 10210: 0xD2E1, + 10211: 0xD2E2, + 10212: 0xD2E3, + 10213: 0xD2E6, + 10214: 0xD2E7, + 10215: 0xD2E8, + 10216: 0xD2E9, + 10217: 0xD2EA, + 10218: 0xD2EB, + 10219: 0xD2EC, + 10220: 0xD2ED, + 10221: 0xD2EE, + 10222: 0xD2EF, + 10223: 0xD2F2, + 10224: 0xD2F3, + 10225: 0xD2F5, + 10226: 0xD2F6, + 10227: 0xD2F7, + 10228: 0xD2F9, + 10229: 0xD2FA, + 10230: 0xBC99, + 10231: 0xBC9A, + 10232: 0xBCA0, + 10233: 0xBCA1, + 10234: 0xBCA4, + 10235: 0xBCA7, + 10236: 0xBCA8, + 10237: 0xBCB0, + 10238: 0xBCB1, + 10239: 0xBCB3, + 10240: 0xBCB4, + 10241: 0xBCB5, + 10242: 0xBCBC, + 10243: 0xBCBD, + 10244: 0xBCC0, + 10245: 0xBCC4, + 10246: 0xBCCD, + 10247: 0xBCCF, + 10248: 0xBCD0, + 10249: 0xBCD1, + 10250: 0xBCD5, + 10251: 0xBCD8, + 10252: 0xBCDC, + 10253: 0xBCF4, + 10254: 0xBCF5, + 10255: 0xBCF6, + 10256: 0xBCF8, + 10257: 0xBCFC, + 10258: 0xBD04, + 10259: 0xBD05, + 10260: 0xBD07, + 10261: 0xBD09, + 10262: 0xBD10, + 10263: 0xBD14, + 10264: 0xBD24, + 10265: 0xBD2C, + 10266: 0xBD40, + 10267: 0xBD48, + 10268: 0xBD49, + 10269: 0xBD4C, + 10270: 0xBD50, + 10271: 0xBD58, + 10272: 0xBD59, + 10273: 0xBD64, + 10274: 0xBD68, + 10275: 0xBD80, + 10276: 0xBD81, + 10277: 0xBD84, + 10278: 0xBD87, + 10279: 0xBD88, + 10280: 0xBD89, + 10281: 0xBD8A, + 10282: 0xBD90, + 10283: 0xBD91, + 10284: 0xBD93, + 10285: 0xBD95, + 10286: 0xBD99, + 10287: 0xBD9A, + 10288: 0xBD9C, + 10289: 0xBDA4, + 10290: 0xBDB0, + 10291: 0xBDB8, + 10292: 0xBDD4, + 10293: 0xBDD5, + 10294: 0xBDD8, + 10295: 0xBDDC, + 10296: 0xBDE9, + 10297: 0xBDF0, + 10298: 0xBDF4, + 10299: 0xBDF8, + 10300: 0xBE00, + 10301: 0xBE03, + 10302: 0xBE05, + 10303: 0xBE0C, + 10304: 0xBE0D, + 10305: 0xBE10, + 10306: 0xBE14, + 10307: 0xBE1C, + 10308: 0xBE1D, + 10309: 0xBE1F, + 10310: 0xBE44, + 10311: 0xBE45, + 10312: 0xBE48, + 10313: 0xBE4C, + 10314: 0xBE4E, + 10315: 0xBE54, + 10316: 0xBE55, + 10317: 0xBE57, + 10318: 0xBE59, + 10319: 0xBE5A, + 10320: 0xBE5B, + 10321: 0xBE60, + 10322: 0xBE61, + 10323: 0xBE64, + 10324: 0xD2FB, + 10325: 0xD2FC, + 10326: 0xD2FD, + 10327: 0xD2FE, + 10328: 0xD2FF, + 10329: 0xD302, + 10330: 0xD304, + 10331: 0xD306, + 10332: 0xD307, + 10333: 0xD308, + 10334: 0xD309, + 10335: 0xD30A, + 10336: 0xD30B, + 10337: 0xD30F, + 10338: 0xD311, + 10339: 0xD312, + 10340: 0xD313, + 10341: 0xD315, + 10342: 0xD317, + 10343: 0xD318, + 10344: 0xD319, + 10345: 0xD31A, + 10346: 0xD31B, + 10347: 0xD31E, + 10348: 0xD322, + 10349: 0xD323, + 10350: 0xD324, + 10351: 0xD326, + 10352: 0xD327, + 10353: 0xD32A, + 10354: 0xD32B, + 10355: 0xD32D, + 10356: 0xD32E, + 10357: 0xD32F, + 10358: 0xD331, + 10359: 0xD332, + 10360: 0xD333, + 10361: 0xD334, + 10362: 0xD335, + 10363: 0xD336, + 10364: 0xD337, + 10365: 0xD33A, + 10366: 0xD33E, + 10367: 0xD33F, + 10368: 0xD340, + 10369: 0xD341, + 10370: 0xD342, + 10371: 0xD343, + 10372: 0xD346, + 10373: 0xD347, + 10374: 0xD348, + 10375: 0xD349, + 10376: 0xD34A, + 10377: 0xD34B, + 10378: 0xD34C, + 10379: 0xD34D, + 10380: 0xD34E, + 10381: 0xD34F, + 10382: 0xD350, + 10383: 0xD351, + 10384: 0xD352, + 10385: 0xD353, + 10386: 0xD354, + 10387: 0xD355, + 10388: 0xD356, + 10389: 0xD357, + 10390: 0xD358, + 10391: 0xD359, + 10392: 0xD35A, + 10393: 0xD35B, + 10394: 0xD35C, + 10395: 0xD35D, + 10396: 0xD35E, + 10397: 0xD35F, + 10398: 0xD360, + 10399: 0xD361, + 10400: 0xD362, + 10401: 0xD363, + 10402: 0xD364, + 10403: 0xD365, + 10404: 0xD366, + 10405: 0xD367, + 10406: 0xD368, + 10407: 0xD369, + 10408: 0xBE68, + 10409: 0xBE6A, + 10410: 0xBE70, + 10411: 0xBE71, + 10412: 0xBE73, + 10413: 0xBE74, + 10414: 0xBE75, + 10415: 0xBE7B, + 10416: 0xBE7C, + 10417: 0xBE7D, + 10418: 0xBE80, + 10419: 0xBE84, + 10420: 0xBE8C, + 10421: 0xBE8D, + 10422: 0xBE8F, + 10423: 0xBE90, + 10424: 0xBE91, + 10425: 0xBE98, + 10426: 0xBE99, + 10427: 0xBEA8, + 10428: 0xBED0, + 10429: 0xBED1, + 10430: 0xBED4, + 10431: 0xBED7, + 10432: 0xBED8, + 10433: 0xBEE0, + 10434: 0xBEE3, + 10435: 0xBEE4, + 10436: 0xBEE5, + 10437: 0xBEEC, + 10438: 0xBF01, + 10439: 0xBF08, + 10440: 0xBF09, + 10441: 0xBF18, + 10442: 0xBF19, + 10443: 0xBF1B, + 10444: 0xBF1C, + 10445: 0xBF1D, + 10446: 0xBF40, + 10447: 0xBF41, + 10448: 0xBF44, + 10449: 0xBF48, + 10450: 0xBF50, + 10451: 0xBF51, + 10452: 0xBF55, + 10453: 0xBF94, + 10454: 0xBFB0, + 10455: 0xBFC5, + 10456: 0xBFCC, + 10457: 0xBFCD, + 10458: 0xBFD0, + 10459: 0xBFD4, + 10460: 0xBFDC, + 10461: 0xBFDF, + 10462: 0xBFE1, + 10463: 0xC03C, + 10464: 0xC051, + 10465: 0xC058, + 10466: 0xC05C, + 10467: 0xC060, + 10468: 0xC068, + 10469: 0xC069, + 10470: 0xC090, + 10471: 0xC091, + 10472: 0xC094, + 10473: 0xC098, + 10474: 0xC0A0, + 10475: 0xC0A1, + 10476: 0xC0A3, + 10477: 0xC0A5, + 10478: 0xC0AC, + 10479: 0xC0AD, + 10480: 0xC0AF, + 10481: 0xC0B0, + 10482: 0xC0B3, + 10483: 0xC0B4, + 10484: 0xC0B5, + 10485: 0xC0B6, + 10486: 0xC0BC, + 10487: 0xC0BD, + 10488: 0xC0BF, + 10489: 0xC0C0, + 10490: 0xC0C1, + 10491: 0xC0C5, + 10492: 0xC0C8, + 10493: 0xC0C9, + 10494: 0xC0CC, + 10495: 0xC0D0, + 10496: 0xC0D8, + 10497: 0xC0D9, + 10498: 0xC0DB, + 10499: 0xC0DC, + 10500: 0xC0DD, + 10501: 0xC0E4, + 10502: 0xD36A, + 10503: 0xD36B, + 10504: 0xD36C, + 10505: 0xD36D, + 10506: 0xD36E, + 10507: 0xD36F, + 10508: 0xD370, + 10509: 0xD371, + 10510: 0xD372, + 10511: 0xD373, + 10512: 0xD374, + 10513: 0xD375, + 10514: 0xD376, + 10515: 0xD377, + 10516: 0xD378, + 10517: 0xD379, + 10518: 0xD37A, + 10519: 0xD37B, + 10520: 0xD37E, + 10521: 0xD37F, + 10522: 0xD381, + 10523: 0xD382, + 10524: 0xD383, + 10525: 0xD385, + 10526: 0xD386, + 10527: 0xD387, + 10528: 0xD388, + 10529: 0xD389, + 10530: 0xD38A, + 10531: 0xD38B, + 10532: 0xD38E, + 10533: 0xD392, + 10534: 0xD393, + 10535: 0xD394, + 10536: 0xD395, + 10537: 0xD396, + 10538: 0xD397, + 10539: 0xD39A, + 10540: 0xD39B, + 10541: 0xD39D, + 10542: 0xD39E, + 10543: 0xD39F, + 10544: 0xD3A1, + 10545: 0xD3A2, + 10546: 0xD3A3, + 10547: 0xD3A4, + 10548: 0xD3A5, + 10549: 0xD3A6, + 10550: 0xD3A7, + 10551: 0xD3AA, + 10552: 0xD3AC, + 10553: 0xD3AE, + 10554: 0xD3AF, + 10555: 0xD3B0, + 10556: 0xD3B1, + 10557: 0xD3B2, + 10558: 0xD3B3, + 10559: 0xD3B5, + 10560: 0xD3B6, + 10561: 0xD3B7, + 10562: 0xD3B9, + 10563: 0xD3BA, + 10564: 0xD3BB, + 10565: 0xD3BD, + 10566: 0xD3BE, + 10567: 0xD3BF, + 10568: 0xD3C0, + 10569: 0xD3C1, + 10570: 0xD3C2, + 10571: 0xD3C3, + 10572: 0xD3C6, + 10573: 0xD3C7, + 10574: 0xD3CA, + 10575: 0xD3CB, + 10576: 0xD3CC, + 10577: 0xD3CD, + 10578: 0xD3CE, + 10579: 0xD3CF, + 10580: 0xD3D1, + 10581: 0xD3D2, + 10582: 0xD3D3, + 10583: 0xD3D4, + 10584: 0xD3D5, + 10585: 0xD3D6, + 10586: 0xC0E5, + 10587: 0xC0E8, + 10588: 0xC0EC, + 10589: 0xC0F4, + 10590: 0xC0F5, + 10591: 0xC0F7, + 10592: 0xC0F9, + 10593: 0xC100, + 10594: 0xC104, + 10595: 0xC108, + 10596: 0xC110, + 10597: 0xC115, + 10598: 0xC11C, + 10599: 0xC11D, + 10600: 0xC11E, + 10601: 0xC11F, + 10602: 0xC120, + 10603: 0xC123, + 10604: 0xC124, + 10605: 0xC126, + 10606: 0xC127, + 10607: 0xC12C, + 10608: 0xC12D, + 10609: 0xC12F, + 10610: 0xC130, + 10611: 0xC131, + 10612: 0xC136, + 10613: 0xC138, + 10614: 0xC139, + 10615: 0xC13C, + 10616: 0xC140, + 10617: 0xC148, + 10618: 0xC149, + 10619: 0xC14B, + 10620: 0xC14C, + 10621: 0xC14D, + 10622: 0xC154, + 10623: 0xC155, + 10624: 0xC158, + 10625: 0xC15C, + 10626: 0xC164, + 10627: 0xC165, + 10628: 0xC167, + 10629: 0xC168, + 10630: 0xC169, + 10631: 0xC170, + 10632: 0xC174, + 10633: 0xC178, + 10634: 0xC185, + 10635: 0xC18C, + 10636: 0xC18D, + 10637: 0xC18E, + 10638: 0xC190, + 10639: 0xC194, + 10640: 0xC196, + 10641: 0xC19C, + 10642: 0xC19D, + 10643: 0xC19F, + 10644: 0xC1A1, + 10645: 0xC1A5, + 10646: 0xC1A8, + 10647: 0xC1A9, + 10648: 0xC1AC, + 10649: 0xC1B0, + 10650: 0xC1BD, + 10651: 0xC1C4, + 10652: 0xC1C8, + 10653: 0xC1CC, + 10654: 0xC1D4, + 10655: 0xC1D7, + 10656: 0xC1D8, + 10657: 0xC1E0, + 10658: 0xC1E4, + 10659: 0xC1E8, + 10660: 0xC1F0, + 10661: 0xC1F1, + 10662: 0xC1F3, + 10663: 0xC1FC, + 10664: 0xC1FD, + 10665: 0xC200, + 10666: 0xC204, + 10667: 0xC20C, + 10668: 0xC20D, + 10669: 0xC20F, + 10670: 0xC211, + 10671: 0xC218, + 10672: 0xC219, + 10673: 0xC21C, + 10674: 0xC21F, + 10675: 0xC220, + 10676: 0xC228, + 10677: 0xC229, + 10678: 0xC22B, + 10679: 0xC22D, + 10680: 0xD3D7, + 10681: 0xD3D9, + 10682: 0xD3DA, + 10683: 0xD3DB, + 10684: 0xD3DC, + 10685: 0xD3DD, + 10686: 0xD3DE, + 10687: 0xD3DF, + 10688: 0xD3E0, + 10689: 0xD3E2, + 10690: 0xD3E4, + 10691: 0xD3E5, + 10692: 0xD3E6, + 10693: 0xD3E7, + 10694: 0xD3E8, + 10695: 0xD3E9, + 10696: 0xD3EA, + 10697: 0xD3EB, + 10698: 0xD3EE, + 10699: 0xD3EF, + 10700: 0xD3F1, + 10701: 0xD3F2, + 10702: 0xD3F3, + 10703: 0xD3F5, + 10704: 0xD3F6, + 10705: 0xD3F7, + 10706: 0xD3F8, + 10707: 0xD3F9, + 10708: 0xD3FA, + 10709: 0xD3FB, + 10710: 0xD3FE, + 10711: 0xD400, + 10712: 0xD402, + 10713: 0xD403, + 10714: 0xD404, + 10715: 0xD405, + 10716: 0xD406, + 10717: 0xD407, + 10718: 0xD409, + 10719: 0xD40A, + 10720: 0xD40B, + 10721: 0xD40C, + 10722: 0xD40D, + 10723: 0xD40E, + 10724: 0xD40F, + 10725: 0xD410, + 10726: 0xD411, + 10727: 0xD412, + 10728: 0xD413, + 10729: 0xD414, + 10730: 0xD415, + 10731: 0xD416, + 10732: 0xD417, + 10733: 0xD418, + 10734: 0xD419, + 10735: 0xD41A, + 10736: 0xD41B, + 10737: 0xD41C, + 10738: 0xD41E, + 10739: 0xD41F, + 10740: 0xD420, + 10741: 0xD421, + 10742: 0xD422, + 10743: 0xD423, + 10744: 0xD424, + 10745: 0xD425, + 10746: 0xD426, + 10747: 0xD427, + 10748: 0xD428, + 10749: 0xD429, + 10750: 0xD42A, + 10751: 0xD42B, + 10752: 0xD42C, + 10753: 0xD42D, + 10754: 0xD42E, + 10755: 0xD42F, + 10756: 0xD430, + 10757: 0xD431, + 10758: 0xD432, + 10759: 0xD433, + 10760: 0xD434, + 10761: 0xD435, + 10762: 0xD436, + 10763: 0xD437, + 10764: 0xC22F, + 10765: 0xC231, + 10766: 0xC232, + 10767: 0xC234, + 10768: 0xC248, + 10769: 0xC250, + 10770: 0xC251, + 10771: 0xC254, + 10772: 0xC258, + 10773: 0xC260, + 10774: 0xC265, + 10775: 0xC26C, + 10776: 0xC26D, + 10777: 0xC270, + 10778: 0xC274, + 10779: 0xC27C, + 10780: 0xC27D, + 10781: 0xC27F, + 10782: 0xC281, + 10783: 0xC288, + 10784: 0xC289, + 10785: 0xC290, + 10786: 0xC298, + 10787: 0xC29B, + 10788: 0xC29D, + 10789: 0xC2A4, + 10790: 0xC2A5, + 10791: 0xC2A8, + 10792: 0xC2AC, + 10793: 0xC2AD, + 10794: 0xC2B4, + 10795: 0xC2B5, + 10796: 0xC2B7, + 10797: 0xC2B9, + 10798: 0xC2DC, + 10799: 0xC2DD, + 10800: 0xC2E0, + 10801: 0xC2E3, + 10802: 0xC2E4, + 10803: 0xC2EB, + 10804: 0xC2EC, + 10805: 0xC2ED, + 10806: 0xC2EF, + 10807: 0xC2F1, + 10808: 0xC2F6, + 10809: 0xC2F8, + 10810: 0xC2F9, + 10811: 0xC2FB, + 10812: 0xC2FC, + 10813: 0xC300, + 10814: 0xC308, + 10815: 0xC309, + 10816: 0xC30C, + 10817: 0xC30D, + 10818: 0xC313, + 10819: 0xC314, + 10820: 0xC315, + 10821: 0xC318, + 10822: 0xC31C, + 10823: 0xC324, + 10824: 0xC325, + 10825: 0xC328, + 10826: 0xC329, + 10827: 0xC345, + 10828: 0xC368, + 10829: 0xC369, + 10830: 0xC36C, + 10831: 0xC370, + 10832: 0xC372, + 10833: 0xC378, + 10834: 0xC379, + 10835: 0xC37C, + 10836: 0xC37D, + 10837: 0xC384, + 10838: 0xC388, + 10839: 0xC38C, + 10840: 0xC3C0, + 10841: 0xC3D8, + 10842: 0xC3D9, + 10843: 0xC3DC, + 10844: 0xC3DF, + 10845: 0xC3E0, + 10846: 0xC3E2, + 10847: 0xC3E8, + 10848: 0xC3E9, + 10849: 0xC3ED, + 10850: 0xC3F4, + 10851: 0xC3F5, + 10852: 0xC3F8, + 10853: 0xC408, + 10854: 0xC410, + 10855: 0xC424, + 10856: 0xC42C, + 10857: 0xC430, + 10858: 0xD438, + 10859: 0xD439, + 10860: 0xD43A, + 10861: 0xD43B, + 10862: 0xD43C, + 10863: 0xD43D, + 10864: 0xD43E, + 10865: 0xD43F, + 10866: 0xD441, + 10867: 0xD442, + 10868: 0xD443, + 10869: 0xD445, + 10870: 0xD446, + 10871: 0xD447, + 10872: 0xD448, + 10873: 0xD449, + 10874: 0xD44A, + 10875: 0xD44B, + 10876: 0xD44C, + 10877: 0xD44D, + 10878: 0xD44E, + 10879: 0xD44F, + 10880: 0xD450, + 10881: 0xD451, + 10882: 0xD452, + 10883: 0xD453, + 10884: 0xD454, + 10885: 0xD455, + 10886: 0xD456, + 10887: 0xD457, + 10888: 0xD458, + 10889: 0xD459, + 10890: 0xD45A, + 10891: 0xD45B, + 10892: 0xD45D, + 10893: 0xD45E, + 10894: 0xD45F, + 10895: 0xD461, + 10896: 0xD462, + 10897: 0xD463, + 10898: 0xD465, + 10899: 0xD466, + 10900: 0xD467, + 10901: 0xD468, + 10902: 0xD469, + 10903: 0xD46A, + 10904: 0xD46B, + 10905: 0xD46C, + 10906: 0xD46E, + 10907: 0xD470, + 10908: 0xD471, + 10909: 0xD472, + 10910: 0xD473, + 10911: 0xD474, + 10912: 0xD475, + 10913: 0xD476, + 10914: 0xD477, + 10915: 0xD47A, + 10916: 0xD47B, + 10917: 0xD47D, + 10918: 0xD47E, + 10919: 0xD481, + 10920: 0xD483, + 10921: 0xD484, + 10922: 0xD485, + 10923: 0xD486, + 10924: 0xD487, + 10925: 0xD48A, + 10926: 0xD48C, + 10927: 0xD48E, + 10928: 0xD48F, + 10929: 0xD490, + 10930: 0xD491, + 10931: 0xD492, + 10932: 0xD493, + 10933: 0xD495, + 10934: 0xD496, + 10935: 0xD497, + 10936: 0xD498, + 10937: 0xD499, + 10938: 0xD49A, + 10939: 0xD49B, + 10940: 0xD49C, + 10941: 0xD49D, + 10942: 0xC434, + 10943: 0xC43C, + 10944: 0xC43D, + 10945: 0xC448, + 10946: 0xC464, + 10947: 0xC465, + 10948: 0xC468, + 10949: 0xC46C, + 10950: 0xC474, + 10951: 0xC475, + 10952: 0xC479, + 10953: 0xC480, + 10954: 0xC494, + 10955: 0xC49C, + 10956: 0xC4B8, + 10957: 0xC4BC, + 10958: 0xC4E9, + 10959: 0xC4F0, + 10960: 0xC4F1, + 10961: 0xC4F4, + 10962: 0xC4F8, + 10963: 0xC4FA, + 10964: 0xC4FF, + 10965: 0xC500, + 10966: 0xC501, + 10967: 0xC50C, + 10968: 0xC510, + 10969: 0xC514, + 10970: 0xC51C, + 10971: 0xC528, + 10972: 0xC529, + 10973: 0xC52C, + 10974: 0xC530, + 10975: 0xC538, + 10976: 0xC539, + 10977: 0xC53B, + 10978: 0xC53D, + 10979: 0xC544, + 10980: 0xC545, + 10981: 0xC548, + 10982: 0xC549, + 10983: 0xC54A, + 10984: 0xC54C, + 10985: 0xC54D, + 10986: 0xC54E, + 10987: 0xC553, + 10988: 0xC554, + 10989: 0xC555, + 10990: 0xC557, + 10991: 0xC558, + 10992: 0xC559, + 10993: 0xC55D, + 10994: 0xC55E, + 10995: 0xC560, + 10996: 0xC561, + 10997: 0xC564, + 10998: 0xC568, + 10999: 0xC570, + 11000: 0xC571, + 11001: 0xC573, + 11002: 0xC574, + 11003: 0xC575, + 11004: 0xC57C, + 11005: 0xC57D, + 11006: 0xC580, + 11007: 0xC584, + 11008: 0xC587, + 11009: 0xC58C, + 11010: 0xC58D, + 11011: 0xC58F, + 11012: 0xC591, + 11013: 0xC595, + 11014: 0xC597, + 11015: 0xC598, + 11016: 0xC59C, + 11017: 0xC5A0, + 11018: 0xC5A9, + 11019: 0xC5B4, + 11020: 0xC5B5, + 11021: 0xC5B8, + 11022: 0xC5B9, + 11023: 0xC5BB, + 11024: 0xC5BC, + 11025: 0xC5BD, + 11026: 0xC5BE, + 11027: 0xC5C4, + 11028: 0xC5C5, + 11029: 0xC5C6, + 11030: 0xC5C7, + 11031: 0xC5C8, + 11032: 0xC5C9, + 11033: 0xC5CA, + 11034: 0xC5CC, + 11035: 0xC5CE, + 11036: 0xD49E, + 11037: 0xD49F, + 11038: 0xD4A0, + 11039: 0xD4A1, + 11040: 0xD4A2, + 11041: 0xD4A3, + 11042: 0xD4A4, + 11043: 0xD4A5, + 11044: 0xD4A6, + 11045: 0xD4A7, + 11046: 0xD4A8, + 11047: 0xD4AA, + 11048: 0xD4AB, + 11049: 0xD4AC, + 11050: 0xD4AD, + 11051: 0xD4AE, + 11052: 0xD4AF, + 11053: 0xD4B0, + 11054: 0xD4B1, + 11055: 0xD4B2, + 11056: 0xD4B3, + 11057: 0xD4B4, + 11058: 0xD4B5, + 11059: 0xD4B6, + 11060: 0xD4B7, + 11061: 0xD4B8, + 11062: 0xD4B9, + 11063: 0xD4BA, + 11064: 0xD4BB, + 11065: 0xD4BC, + 11066: 0xD4BD, + 11067: 0xD4BE, + 11068: 0xD4BF, + 11069: 0xD4C0, + 11070: 0xD4C1, + 11071: 0xD4C2, + 11072: 0xD4C3, + 11073: 0xD4C4, + 11074: 0xD4C5, + 11075: 0xD4C6, + 11076: 0xD4C7, + 11077: 0xD4C8, + 11078: 0xD4C9, + 11079: 0xD4CA, + 11080: 0xD4CB, + 11081: 0xD4CD, + 11082: 0xD4CE, + 11083: 0xD4CF, + 11084: 0xD4D1, + 11085: 0xD4D2, + 11086: 0xD4D3, + 11087: 0xD4D5, + 11088: 0xD4D6, + 11089: 0xD4D7, + 11090: 0xD4D8, + 11091: 0xD4D9, + 11092: 0xD4DA, + 11093: 0xD4DB, + 11094: 0xD4DD, + 11095: 0xD4DE, + 11096: 0xD4E0, + 11097: 0xD4E1, + 11098: 0xD4E2, + 11099: 0xD4E3, + 11100: 0xD4E4, + 11101: 0xD4E5, + 11102: 0xD4E6, + 11103: 0xD4E7, + 11104: 0xD4E9, + 11105: 0xD4EA, + 11106: 0xD4EB, + 11107: 0xD4ED, + 11108: 0xD4EE, + 11109: 0xD4EF, + 11110: 0xD4F1, + 11111: 0xD4F2, + 11112: 0xD4F3, + 11113: 0xD4F4, + 11114: 0xD4F5, + 11115: 0xD4F6, + 11116: 0xD4F7, + 11117: 0xD4F9, + 11118: 0xD4FA, + 11119: 0xD4FC, + 11120: 0xC5D0, + 11121: 0xC5D1, + 11122: 0xC5D4, + 11123: 0xC5D8, + 11124: 0xC5E0, + 11125: 0xC5E1, + 11126: 0xC5E3, + 11127: 0xC5E5, + 11128: 0xC5EC, + 11129: 0xC5ED, + 11130: 0xC5EE, + 11131: 0xC5F0, + 11132: 0xC5F4, + 11133: 0xC5F6, + 11134: 0xC5F7, + 11135: 0xC5FC, + 11136: 0xC5FD, + 11137: 0xC5FE, + 11138: 0xC5FF, + 11139: 0xC600, + 11140: 0xC601, + 11141: 0xC605, + 11142: 0xC606, + 11143: 0xC607, + 11144: 0xC608, + 11145: 0xC60C, + 11146: 0xC610, + 11147: 0xC618, + 11148: 0xC619, + 11149: 0xC61B, + 11150: 0xC61C, + 11151: 0xC624, + 11152: 0xC625, + 11153: 0xC628, + 11154: 0xC62C, + 11155: 0xC62D, + 11156: 0xC62E, + 11157: 0xC630, + 11158: 0xC633, + 11159: 0xC634, + 11160: 0xC635, + 11161: 0xC637, + 11162: 0xC639, + 11163: 0xC63B, + 11164: 0xC640, + 11165: 0xC641, + 11166: 0xC644, + 11167: 0xC648, + 11168: 0xC650, + 11169: 0xC651, + 11170: 0xC653, + 11171: 0xC654, + 11172: 0xC655, + 11173: 0xC65C, + 11174: 0xC65D, + 11175: 0xC660, + 11176: 0xC66C, + 11177: 0xC66F, + 11178: 0xC671, + 11179: 0xC678, + 11180: 0xC679, + 11181: 0xC67C, + 11182: 0xC680, + 11183: 0xC688, + 11184: 0xC689, + 11185: 0xC68B, + 11186: 0xC68D, + 11187: 0xC694, + 11188: 0xC695, + 11189: 0xC698, + 11190: 0xC69C, + 11191: 0xC6A4, + 11192: 0xC6A5, + 11193: 0xC6A7, + 11194: 0xC6A9, + 11195: 0xC6B0, + 11196: 0xC6B1, + 11197: 0xC6B4, + 11198: 0xC6B8, + 11199: 0xC6B9, + 11200: 0xC6BA, + 11201: 0xC6C0, + 11202: 0xC6C1, + 11203: 0xC6C3, + 11204: 0xC6C5, + 11205: 0xC6CC, + 11206: 0xC6CD, + 11207: 0xC6D0, + 11208: 0xC6D4, + 11209: 0xC6DC, + 11210: 0xC6DD, + 11211: 0xC6E0, + 11212: 0xC6E1, + 11213: 0xC6E8, + 11214: 0xD4FE, + 11215: 0xD4FF, + 11216: 0xD500, + 11217: 0xD501, + 11218: 0xD502, + 11219: 0xD503, + 11220: 0xD505, + 11221: 0xD506, + 11222: 0xD507, + 11223: 0xD509, + 11224: 0xD50A, + 11225: 0xD50B, + 11226: 0xD50D, + 11227: 0xD50E, + 11228: 0xD50F, + 11229: 0xD510, + 11230: 0xD511, + 11231: 0xD512, + 11232: 0xD513, + 11233: 0xD516, + 11234: 0xD518, + 11235: 0xD519, + 11236: 0xD51A, + 11237: 0xD51B, + 11238: 0xD51C, + 11239: 0xD51D, + 11240: 0xD51E, + 11241: 0xD51F, + 11242: 0xD520, + 11243: 0xD521, + 11244: 0xD522, + 11245: 0xD523, + 11246: 0xD524, + 11247: 0xD525, + 11248: 0xD526, + 11249: 0xD527, + 11250: 0xD528, + 11251: 0xD529, + 11252: 0xD52A, + 11253: 0xD52B, + 11254: 0xD52C, + 11255: 0xD52D, + 11256: 0xD52E, + 11257: 0xD52F, + 11258: 0xD530, + 11259: 0xD531, + 11260: 0xD532, + 11261: 0xD533, + 11262: 0xD534, + 11263: 0xD535, + 11264: 0xD536, + 11265: 0xD537, + 11266: 0xD538, + 11267: 0xD539, + 11268: 0xD53A, + 11269: 0xD53B, + 11270: 0xD53E, + 11271: 0xD53F, + 11272: 0xD541, + 11273: 0xD542, + 11274: 0xD543, + 11275: 0xD545, + 11276: 0xD546, + 11277: 0xD547, + 11278: 0xD548, + 11279: 0xD549, + 11280: 0xD54A, + 11281: 0xD54B, + 11282: 0xD54E, + 11283: 0xD550, + 11284: 0xD552, + 11285: 0xD553, + 11286: 0xD554, + 11287: 0xD555, + 11288: 0xD556, + 11289: 0xD557, + 11290: 0xD55A, + 11291: 0xD55B, + 11292: 0xD55D, + 11293: 0xD55E, + 11294: 0xD55F, + 11295: 0xD561, + 11296: 0xD562, + 11297: 0xD563, + 11298: 0xC6E9, + 11299: 0xC6EC, + 11300: 0xC6F0, + 11301: 0xC6F8, + 11302: 0xC6F9, + 11303: 0xC6FD, + 11304: 0xC704, + 11305: 0xC705, + 11306: 0xC708, + 11307: 0xC70C, + 11308: 0xC714, + 11309: 0xC715, + 11310: 0xC717, + 11311: 0xC719, + 11312: 0xC720, + 11313: 0xC721, + 11314: 0xC724, + 11315: 0xC728, + 11316: 0xC730, + 11317: 0xC731, + 11318: 0xC733, + 11319: 0xC735, + 11320: 0xC737, + 11321: 0xC73C, + 11322: 0xC73D, + 11323: 0xC740, + 11324: 0xC744, + 11325: 0xC74A, + 11326: 0xC74C, + 11327: 0xC74D, + 11328: 0xC74F, + 11329: 0xC751, + 11330: 0xC752, + 11331: 0xC753, + 11332: 0xC754, + 11333: 0xC755, + 11334: 0xC756, + 11335: 0xC757, + 11336: 0xC758, + 11337: 0xC75C, + 11338: 0xC760, + 11339: 0xC768, + 11340: 0xC76B, + 11341: 0xC774, + 11342: 0xC775, + 11343: 0xC778, + 11344: 0xC77C, + 11345: 0xC77D, + 11346: 0xC77E, + 11347: 0xC783, + 11348: 0xC784, + 11349: 0xC785, + 11350: 0xC787, + 11351: 0xC788, + 11352: 0xC789, + 11353: 0xC78A, + 11354: 0xC78E, + 11355: 0xC790, + 11356: 0xC791, + 11357: 0xC794, + 11358: 0xC796, + 11359: 0xC797, + 11360: 0xC798, + 11361: 0xC79A, + 11362: 0xC7A0, + 11363: 0xC7A1, + 11364: 0xC7A3, + 11365: 0xC7A4, + 11366: 0xC7A5, + 11367: 0xC7A6, + 11368: 0xC7AC, + 11369: 0xC7AD, + 11370: 0xC7B0, + 11371: 0xC7B4, + 11372: 0xC7BC, + 11373: 0xC7BD, + 11374: 0xC7BF, + 11375: 0xC7C0, + 11376: 0xC7C1, + 11377: 0xC7C8, + 11378: 0xC7C9, + 11379: 0xC7CC, + 11380: 0xC7CE, + 11381: 0xC7D0, + 11382: 0xC7D8, + 11383: 0xC7DD, + 11384: 0xC7E4, + 11385: 0xC7E8, + 11386: 0xC7EC, + 11387: 0xC800, + 11388: 0xC801, + 11389: 0xC804, + 11390: 0xC808, + 11391: 0xC80A, + 11392: 0xD564, + 11393: 0xD566, + 11394: 0xD567, + 11395: 0xD56A, + 11396: 0xD56C, + 11397: 0xD56E, + 11398: 0xD56F, + 11399: 0xD570, + 11400: 0xD571, + 11401: 0xD572, + 11402: 0xD573, + 11403: 0xD576, + 11404: 0xD577, + 11405: 0xD579, + 11406: 0xD57A, + 11407: 0xD57B, + 11408: 0xD57D, + 11409: 0xD57E, + 11410: 0xD57F, + 11411: 0xD580, + 11412: 0xD581, + 11413: 0xD582, + 11414: 0xD583, + 11415: 0xD586, + 11416: 0xD58A, + 11417: 0xD58B, + 11418: 0xD58C, + 11419: 0xD58D, + 11420: 0xD58E, + 11421: 0xD58F, + 11422: 0xD591, + 11423: 0xD592, + 11424: 0xD593, + 11425: 0xD594, + 11426: 0xD595, + 11427: 0xD596, + 11428: 0xD597, + 11429: 0xD598, + 11430: 0xD599, + 11431: 0xD59A, + 11432: 0xD59B, + 11433: 0xD59C, + 11434: 0xD59D, + 11435: 0xD59E, + 11436: 0xD59F, + 11437: 0xD5A0, + 11438: 0xD5A1, + 11439: 0xD5A2, + 11440: 0xD5A3, + 11441: 0xD5A4, + 11442: 0xD5A6, + 11443: 0xD5A7, + 11444: 0xD5A8, + 11445: 0xD5A9, + 11446: 0xD5AA, + 11447: 0xD5AB, + 11448: 0xD5AC, + 11449: 0xD5AD, + 11450: 0xD5AE, + 11451: 0xD5AF, + 11452: 0xD5B0, + 11453: 0xD5B1, + 11454: 0xD5B2, + 11455: 0xD5B3, + 11456: 0xD5B4, + 11457: 0xD5B5, + 11458: 0xD5B6, + 11459: 0xD5B7, + 11460: 0xD5B8, + 11461: 0xD5B9, + 11462: 0xD5BA, + 11463: 0xD5BB, + 11464: 0xD5BC, + 11465: 0xD5BD, + 11466: 0xD5BE, + 11467: 0xD5BF, + 11468: 0xD5C0, + 11469: 0xD5C1, + 11470: 0xD5C2, + 11471: 0xD5C3, + 11472: 0xD5C4, + 11473: 0xD5C5, + 11474: 0xD5C6, + 11475: 0xD5C7, + 11476: 0xC810, + 11477: 0xC811, + 11478: 0xC813, + 11479: 0xC815, + 11480: 0xC816, + 11481: 0xC81C, + 11482: 0xC81D, + 11483: 0xC820, + 11484: 0xC824, + 11485: 0xC82C, + 11486: 0xC82D, + 11487: 0xC82F, + 11488: 0xC831, + 11489: 0xC838, + 11490: 0xC83C, + 11491: 0xC840, + 11492: 0xC848, + 11493: 0xC849, + 11494: 0xC84C, + 11495: 0xC84D, + 11496: 0xC854, + 11497: 0xC870, + 11498: 0xC871, + 11499: 0xC874, + 11500: 0xC878, + 11501: 0xC87A, + 11502: 0xC880, + 11503: 0xC881, + 11504: 0xC883, + 11505: 0xC885, + 11506: 0xC886, + 11507: 0xC887, + 11508: 0xC88B, + 11509: 0xC88C, + 11510: 0xC88D, + 11511: 0xC894, + 11512: 0xC89D, + 11513: 0xC89F, + 11514: 0xC8A1, + 11515: 0xC8A8, + 11516: 0xC8BC, + 11517: 0xC8BD, + 11518: 0xC8C4, + 11519: 0xC8C8, + 11520: 0xC8CC, + 11521: 0xC8D4, + 11522: 0xC8D5, + 11523: 0xC8D7, + 11524: 0xC8D9, + 11525: 0xC8E0, + 11526: 0xC8E1, + 11527: 0xC8E4, + 11528: 0xC8F5, + 11529: 0xC8FC, + 11530: 0xC8FD, + 11531: 0xC900, + 11532: 0xC904, + 11533: 0xC905, + 11534: 0xC906, + 11535: 0xC90C, + 11536: 0xC90D, + 11537: 0xC90F, + 11538: 0xC911, + 11539: 0xC918, + 11540: 0xC92C, + 11541: 0xC934, + 11542: 0xC950, + 11543: 0xC951, + 11544: 0xC954, + 11545: 0xC958, + 11546: 0xC960, + 11547: 0xC961, + 11548: 0xC963, + 11549: 0xC96C, + 11550: 0xC970, + 11551: 0xC974, + 11552: 0xC97C, + 11553: 0xC988, + 11554: 0xC989, + 11555: 0xC98C, + 11556: 0xC990, + 11557: 0xC998, + 11558: 0xC999, + 11559: 0xC99B, + 11560: 0xC99D, + 11561: 0xC9C0, + 11562: 0xC9C1, + 11563: 0xC9C4, + 11564: 0xC9C7, + 11565: 0xC9C8, + 11566: 0xC9CA, + 11567: 0xC9D0, + 11568: 0xC9D1, + 11569: 0xC9D3, + 11570: 0xD5CA, + 11571: 0xD5CB, + 11572: 0xD5CD, + 11573: 0xD5CE, + 11574: 0xD5CF, + 11575: 0xD5D1, + 11576: 0xD5D3, + 11577: 0xD5D4, + 11578: 0xD5D5, + 11579: 0xD5D6, + 11580: 0xD5D7, + 11581: 0xD5DA, + 11582: 0xD5DC, + 11583: 0xD5DE, + 11584: 0xD5DF, + 11585: 0xD5E0, + 11586: 0xD5E1, + 11587: 0xD5E2, + 11588: 0xD5E3, + 11589: 0xD5E6, + 11590: 0xD5E7, + 11591: 0xD5E9, + 11592: 0xD5EA, + 11593: 0xD5EB, + 11594: 0xD5ED, + 11595: 0xD5EE, + 11596: 0xD5EF, + 11597: 0xD5F0, + 11598: 0xD5F1, + 11599: 0xD5F2, + 11600: 0xD5F3, + 11601: 0xD5F6, + 11602: 0xD5F8, + 11603: 0xD5FA, + 11604: 0xD5FB, + 11605: 0xD5FC, + 11606: 0xD5FD, + 11607: 0xD5FE, + 11608: 0xD5FF, + 11609: 0xD602, + 11610: 0xD603, + 11611: 0xD605, + 11612: 0xD606, + 11613: 0xD607, + 11614: 0xD609, + 11615: 0xD60A, + 11616: 0xD60B, + 11617: 0xD60C, + 11618: 0xD60D, + 11619: 0xD60E, + 11620: 0xD60F, + 11621: 0xD612, + 11622: 0xD616, + 11623: 0xD617, + 11624: 0xD618, + 11625: 0xD619, + 11626: 0xD61A, + 11627: 0xD61B, + 11628: 0xD61D, + 11629: 0xD61E, + 11630: 0xD61F, + 11631: 0xD621, + 11632: 0xD622, + 11633: 0xD623, + 11634: 0xD625, + 11635: 0xD626, + 11636: 0xD627, + 11637: 0xD628, + 11638: 0xD629, + 11639: 0xD62A, + 11640: 0xD62B, + 11641: 0xD62C, + 11642: 0xD62E, + 11643: 0xD62F, + 11644: 0xD630, + 11645: 0xD631, + 11646: 0xD632, + 11647: 0xD633, + 11648: 0xD634, + 11649: 0xD635, + 11650: 0xD636, + 11651: 0xD637, + 11652: 0xD63A, + 11653: 0xD63B, + 11654: 0xC9D5, + 11655: 0xC9D6, + 11656: 0xC9D9, + 11657: 0xC9DA, + 11658: 0xC9DC, + 11659: 0xC9DD, + 11660: 0xC9E0, + 11661: 0xC9E2, + 11662: 0xC9E4, + 11663: 0xC9E7, + 11664: 0xC9EC, + 11665: 0xC9ED, + 11666: 0xC9EF, + 11667: 0xC9F0, + 11668: 0xC9F1, + 11669: 0xC9F8, + 11670: 0xC9F9, + 11671: 0xC9FC, + 11672: 0xCA00, + 11673: 0xCA08, + 11674: 0xCA09, + 11675: 0xCA0B, + 11676: 0xCA0C, + 11677: 0xCA0D, + 11678: 0xCA14, + 11679: 0xCA18, + 11680: 0xCA29, + 11681: 0xCA4C, + 11682: 0xCA4D, + 11683: 0xCA50, + 11684: 0xCA54, + 11685: 0xCA5C, + 11686: 0xCA5D, + 11687: 0xCA5F, + 11688: 0xCA60, + 11689: 0xCA61, + 11690: 0xCA68, + 11691: 0xCA7D, + 11692: 0xCA84, + 11693: 0xCA98, + 11694: 0xCABC, + 11695: 0xCABD, + 11696: 0xCAC0, + 11697: 0xCAC4, + 11698: 0xCACC, + 11699: 0xCACD, + 11700: 0xCACF, + 11701: 0xCAD1, + 11702: 0xCAD3, + 11703: 0xCAD8, + 11704: 0xCAD9, + 11705: 0xCAE0, + 11706: 0xCAEC, + 11707: 0xCAF4, + 11708: 0xCB08, + 11709: 0xCB10, + 11710: 0xCB14, + 11711: 0xCB18, + 11712: 0xCB20, + 11713: 0xCB21, + 11714: 0xCB41, + 11715: 0xCB48, + 11716: 0xCB49, + 11717: 0xCB4C, + 11718: 0xCB50, + 11719: 0xCB58, + 11720: 0xCB59, + 11721: 0xCB5D, + 11722: 0xCB64, + 11723: 0xCB78, + 11724: 0xCB79, + 11725: 0xCB9C, + 11726: 0xCBB8, + 11727: 0xCBD4, + 11728: 0xCBE4, + 11729: 0xCBE7, + 11730: 0xCBE9, + 11731: 0xCC0C, + 11732: 0xCC0D, + 11733: 0xCC10, + 11734: 0xCC14, + 11735: 0xCC1C, + 11736: 0xCC1D, + 11737: 0xCC21, + 11738: 0xCC22, + 11739: 0xCC27, + 11740: 0xCC28, + 11741: 0xCC29, + 11742: 0xCC2C, + 11743: 0xCC2E, + 11744: 0xCC30, + 11745: 0xCC38, + 11746: 0xCC39, + 11747: 0xCC3B, + 11748: 0xD63D, + 11749: 0xD63E, + 11750: 0xD63F, + 11751: 0xD641, + 11752: 0xD642, + 11753: 0xD643, + 11754: 0xD644, + 11755: 0xD646, + 11756: 0xD647, + 11757: 0xD64A, + 11758: 0xD64C, + 11759: 0xD64E, + 11760: 0xD64F, + 11761: 0xD650, + 11762: 0xD652, + 11763: 0xD653, + 11764: 0xD656, + 11765: 0xD657, + 11766: 0xD659, + 11767: 0xD65A, + 11768: 0xD65B, + 11769: 0xD65D, + 11770: 0xD65E, + 11771: 0xD65F, + 11772: 0xD660, + 11773: 0xD661, + 11774: 0xD662, + 11775: 0xD663, + 11776: 0xD664, + 11777: 0xD665, + 11778: 0xD666, + 11779: 0xD668, + 11780: 0xD66A, + 11781: 0xD66B, + 11782: 0xD66C, + 11783: 0xD66D, + 11784: 0xD66E, + 11785: 0xD66F, + 11786: 0xD672, + 11787: 0xD673, + 11788: 0xD675, + 11789: 0xD676, + 11790: 0xD677, + 11791: 0xD678, + 11792: 0xD679, + 11793: 0xD67A, + 11794: 0xD67B, + 11795: 0xD67C, + 11796: 0xD67D, + 11797: 0xD67E, + 11798: 0xD67F, + 11799: 0xD680, + 11800: 0xD681, + 11801: 0xD682, + 11802: 0xD684, + 11803: 0xD686, + 11804: 0xD687, + 11805: 0xD688, + 11806: 0xD689, + 11807: 0xD68A, + 11808: 0xD68B, + 11809: 0xD68E, + 11810: 0xD68F, + 11811: 0xD691, + 11812: 0xD692, + 11813: 0xD693, + 11814: 0xD695, + 11815: 0xD696, + 11816: 0xD697, + 11817: 0xD698, + 11818: 0xD699, + 11819: 0xD69A, + 11820: 0xD69B, + 11821: 0xD69C, + 11822: 0xD69E, + 11823: 0xD6A0, + 11824: 0xD6A2, + 11825: 0xD6A3, + 11826: 0xD6A4, + 11827: 0xD6A5, + 11828: 0xD6A6, + 11829: 0xD6A7, + 11830: 0xD6A9, + 11831: 0xD6AA, + 11832: 0xCC3C, + 11833: 0xCC3D, + 11834: 0xCC3E, + 11835: 0xCC44, + 11836: 0xCC45, + 11837: 0xCC48, + 11838: 0xCC4C, + 11839: 0xCC54, + 11840: 0xCC55, + 11841: 0xCC57, + 11842: 0xCC58, + 11843: 0xCC59, + 11844: 0xCC60, + 11845: 0xCC64, + 11846: 0xCC66, + 11847: 0xCC68, + 11848: 0xCC70, + 11849: 0xCC75, + 11850: 0xCC98, + 11851: 0xCC99, + 11852: 0xCC9C, + 11853: 0xCCA0, + 11854: 0xCCA8, + 11855: 0xCCA9, + 11856: 0xCCAB, + 11857: 0xCCAC, + 11858: 0xCCAD, + 11859: 0xCCB4, + 11860: 0xCCB5, + 11861: 0xCCB8, + 11862: 0xCCBC, + 11863: 0xCCC4, + 11864: 0xCCC5, + 11865: 0xCCC7, + 11866: 0xCCC9, + 11867: 0xCCD0, + 11868: 0xCCD4, + 11869: 0xCCE4, + 11870: 0xCCEC, + 11871: 0xCCF0, + 11872: 0xCD01, + 11873: 0xCD08, + 11874: 0xCD09, + 11875: 0xCD0C, + 11876: 0xCD10, + 11877: 0xCD18, + 11878: 0xCD19, + 11879: 0xCD1B, + 11880: 0xCD1D, + 11881: 0xCD24, + 11882: 0xCD28, + 11883: 0xCD2C, + 11884: 0xCD39, + 11885: 0xCD5C, + 11886: 0xCD60, + 11887: 0xCD64, + 11888: 0xCD6C, + 11889: 0xCD6D, + 11890: 0xCD6F, + 11891: 0xCD71, + 11892: 0xCD78, + 11893: 0xCD88, + 11894: 0xCD94, + 11895: 0xCD95, + 11896: 0xCD98, + 11897: 0xCD9C, + 11898: 0xCDA4, + 11899: 0xCDA5, + 11900: 0xCDA7, + 11901: 0xCDA9, + 11902: 0xCDB0, + 11903: 0xCDC4, + 11904: 0xCDCC, + 11905: 0xCDD0, + 11906: 0xCDE8, + 11907: 0xCDEC, + 11908: 0xCDF0, + 11909: 0xCDF8, + 11910: 0xCDF9, + 11911: 0xCDFB, + 11912: 0xCDFD, + 11913: 0xCE04, + 11914: 0xCE08, + 11915: 0xCE0C, + 11916: 0xCE14, + 11917: 0xCE19, + 11918: 0xCE20, + 11919: 0xCE21, + 11920: 0xCE24, + 11921: 0xCE28, + 11922: 0xCE30, + 11923: 0xCE31, + 11924: 0xCE33, + 11925: 0xCE35, + 11926: 0xD6AB, + 11927: 0xD6AD, + 11928: 0xD6AE, + 11929: 0xD6AF, + 11930: 0xD6B1, + 11931: 0xD6B2, + 11932: 0xD6B3, + 11933: 0xD6B4, + 11934: 0xD6B5, + 11935: 0xD6B6, + 11936: 0xD6B7, + 11937: 0xD6B8, + 11938: 0xD6BA, + 11939: 0xD6BC, + 11940: 0xD6BD, + 11941: 0xD6BE, + 11942: 0xD6BF, + 11943: 0xD6C0, + 11944: 0xD6C1, + 11945: 0xD6C2, + 11946: 0xD6C3, + 11947: 0xD6C6, + 11948: 0xD6C7, + 11949: 0xD6C9, + 11950: 0xD6CA, + 11951: 0xD6CB, + 11952: 0xD6CD, + 11953: 0xD6CE, + 11954: 0xD6CF, + 11955: 0xD6D0, + 11956: 0xD6D2, + 11957: 0xD6D3, + 11958: 0xD6D5, + 11959: 0xD6D6, + 11960: 0xD6D8, + 11961: 0xD6DA, + 11962: 0xD6DB, + 11963: 0xD6DC, + 11964: 0xD6DD, + 11965: 0xD6DE, + 11966: 0xD6DF, + 11967: 0xD6E1, + 11968: 0xD6E2, + 11969: 0xD6E3, + 11970: 0xD6E5, + 11971: 0xD6E6, + 11972: 0xD6E7, + 11973: 0xD6E9, + 11974: 0xD6EA, + 11975: 0xD6EB, + 11976: 0xD6EC, + 11977: 0xD6ED, + 11978: 0xD6EE, + 11979: 0xD6EF, + 11980: 0xD6F1, + 11981: 0xD6F2, + 11982: 0xD6F3, + 11983: 0xD6F4, + 11984: 0xD6F6, + 11985: 0xD6F7, + 11986: 0xD6F8, + 11987: 0xD6F9, + 11988: 0xD6FA, + 11989: 0xD6FB, + 11990: 0xD6FE, + 11991: 0xD6FF, + 11992: 0xD701, + 11993: 0xD702, + 11994: 0xD703, + 11995: 0xD705, + 11996: 0xD706, + 11997: 0xD707, + 11998: 0xD708, + 11999: 0xD709, + 12000: 0xD70A, + 12001: 0xD70B, + 12002: 0xD70C, + 12003: 0xD70D, + 12004: 0xD70E, + 12005: 0xD70F, + 12006: 0xD710, + 12007: 0xD712, + 12008: 0xD713, + 12009: 0xD714, + 12010: 0xCE58, + 12011: 0xCE59, + 12012: 0xCE5C, + 12013: 0xCE5F, + 12014: 0xCE60, + 12015: 0xCE61, + 12016: 0xCE68, + 12017: 0xCE69, + 12018: 0xCE6B, + 12019: 0xCE6D, + 12020: 0xCE74, + 12021: 0xCE75, + 12022: 0xCE78, + 12023: 0xCE7C, + 12024: 0xCE84, + 12025: 0xCE85, + 12026: 0xCE87, + 12027: 0xCE89, + 12028: 0xCE90, + 12029: 0xCE91, + 12030: 0xCE94, + 12031: 0xCE98, + 12032: 0xCEA0, + 12033: 0xCEA1, + 12034: 0xCEA3, + 12035: 0xCEA4, + 12036: 0xCEA5, + 12037: 0xCEAC, + 12038: 0xCEAD, + 12039: 0xCEC1, + 12040: 0xCEE4, + 12041: 0xCEE5, + 12042: 0xCEE8, + 12043: 0xCEEB, + 12044: 0xCEEC, + 12045: 0xCEF4, + 12046: 0xCEF5, + 12047: 0xCEF7, + 12048: 0xCEF8, + 12049: 0xCEF9, + 12050: 0xCF00, + 12051: 0xCF01, + 12052: 0xCF04, + 12053: 0xCF08, + 12054: 0xCF10, + 12055: 0xCF11, + 12056: 0xCF13, + 12057: 0xCF15, + 12058: 0xCF1C, + 12059: 0xCF20, + 12060: 0xCF24, + 12061: 0xCF2C, + 12062: 0xCF2D, + 12063: 0xCF2F, + 12064: 0xCF30, + 12065: 0xCF31, + 12066: 0xCF38, + 12067: 0xCF54, + 12068: 0xCF55, + 12069: 0xCF58, + 12070: 0xCF5C, + 12071: 0xCF64, + 12072: 0xCF65, + 12073: 0xCF67, + 12074: 0xCF69, + 12075: 0xCF70, + 12076: 0xCF71, + 12077: 0xCF74, + 12078: 0xCF78, + 12079: 0xCF80, + 12080: 0xCF85, + 12081: 0xCF8C, + 12082: 0xCFA1, + 12083: 0xCFA8, + 12084: 0xCFB0, + 12085: 0xCFC4, + 12086: 0xCFE0, + 12087: 0xCFE1, + 12088: 0xCFE4, + 12089: 0xCFE8, + 12090: 0xCFF0, + 12091: 0xCFF1, + 12092: 0xCFF3, + 12093: 0xCFF5, + 12094: 0xCFFC, + 12095: 0xD000, + 12096: 0xD004, + 12097: 0xD011, + 12098: 0xD018, + 12099: 0xD02D, + 12100: 0xD034, + 12101: 0xD035, + 12102: 0xD038, + 12103: 0xD03C, + 12104: 0xD715, + 12105: 0xD716, + 12106: 0xD717, + 12107: 0xD71A, + 12108: 0xD71B, + 12109: 0xD71D, + 12110: 0xD71E, + 12111: 0xD71F, + 12112: 0xD721, + 12113: 0xD722, + 12114: 0xD723, + 12115: 0xD724, + 12116: 0xD725, + 12117: 0xD726, + 12118: 0xD727, + 12119: 0xD72A, + 12120: 0xD72C, + 12121: 0xD72E, + 12122: 0xD72F, + 12123: 0xD730, + 12124: 0xD731, + 12125: 0xD732, + 12126: 0xD733, + 12127: 0xD736, + 12128: 0xD737, + 12129: 0xD739, + 12130: 0xD73A, + 12131: 0xD73B, + 12132: 0xD73D, + 12133: 0xD73E, + 12134: 0xD73F, + 12135: 0xD740, + 12136: 0xD741, + 12137: 0xD742, + 12138: 0xD743, + 12139: 0xD745, + 12140: 0xD746, + 12141: 0xD748, + 12142: 0xD74A, + 12143: 0xD74B, + 12144: 0xD74C, + 12145: 0xD74D, + 12146: 0xD74E, + 12147: 0xD74F, + 12148: 0xD752, + 12149: 0xD753, + 12150: 0xD755, + 12151: 0xD75A, + 12152: 0xD75B, + 12153: 0xD75C, + 12154: 0xD75D, + 12155: 0xD75E, + 12156: 0xD75F, + 12157: 0xD762, + 12158: 0xD764, + 12159: 0xD766, + 12160: 0xD767, + 12161: 0xD768, + 12162: 0xD76A, + 12163: 0xD76B, + 12164: 0xD76D, + 12165: 0xD76E, + 12166: 0xD76F, + 12167: 0xD771, + 12168: 0xD772, + 12169: 0xD773, + 12170: 0xD775, + 12171: 0xD776, + 12172: 0xD777, + 12173: 0xD778, + 12174: 0xD779, + 12175: 0xD77A, + 12176: 0xD77B, + 12177: 0xD77E, + 12178: 0xD77F, + 12179: 0xD780, + 12180: 0xD782, + 12181: 0xD783, + 12182: 0xD784, + 12183: 0xD785, + 12184: 0xD786, + 12185: 0xD787, + 12186: 0xD78A, + 12187: 0xD78B, + 12188: 0xD044, + 12189: 0xD045, + 12190: 0xD047, + 12191: 0xD049, + 12192: 0xD050, + 12193: 0xD054, + 12194: 0xD058, + 12195: 0xD060, + 12196: 0xD06C, + 12197: 0xD06D, + 12198: 0xD070, + 12199: 0xD074, + 12200: 0xD07C, + 12201: 0xD07D, + 12202: 0xD081, + 12203: 0xD0A4, + 12204: 0xD0A5, + 12205: 0xD0A8, + 12206: 0xD0AC, + 12207: 0xD0B4, + 12208: 0xD0B5, + 12209: 0xD0B7, + 12210: 0xD0B9, + 12211: 0xD0C0, + 12212: 0xD0C1, + 12213: 0xD0C4, + 12214: 0xD0C8, + 12215: 0xD0C9, + 12216: 0xD0D0, + 12217: 0xD0D1, + 12218: 0xD0D3, + 12219: 0xD0D4, + 12220: 0xD0D5, + 12221: 0xD0DC, + 12222: 0xD0DD, + 12223: 0xD0E0, + 12224: 0xD0E4, + 12225: 0xD0EC, + 12226: 0xD0ED, + 12227: 0xD0EF, + 12228: 0xD0F0, + 12229: 0xD0F1, + 12230: 0xD0F8, + 12231: 0xD10D, + 12232: 0xD130, + 12233: 0xD131, + 12234: 0xD134, + 12235: 0xD138, + 12236: 0xD13A, + 12237: 0xD140, + 12238: 0xD141, + 12239: 0xD143, + 12240: 0xD144, + 12241: 0xD145, + 12242: 0xD14C, + 12243: 0xD14D, + 12244: 0xD150, + 12245: 0xD154, + 12246: 0xD15C, + 12247: 0xD15D, + 12248: 0xD15F, + 12249: 0xD161, + 12250: 0xD168, + 12251: 0xD16C, + 12252: 0xD17C, + 12253: 0xD184, + 12254: 0xD188, + 12255: 0xD1A0, + 12256: 0xD1A1, + 12257: 0xD1A4, + 12258: 0xD1A8, + 12259: 0xD1B0, + 12260: 0xD1B1, + 12261: 0xD1B3, + 12262: 0xD1B5, + 12263: 0xD1BA, + 12264: 0xD1BC, + 12265: 0xD1C0, + 12266: 0xD1D8, + 12267: 0xD1F4, + 12268: 0xD1F8, + 12269: 0xD207, + 12270: 0xD209, + 12271: 0xD210, + 12272: 0xD22C, + 12273: 0xD22D, + 12274: 0xD230, + 12275: 0xD234, + 12276: 0xD23C, + 12277: 0xD23D, + 12278: 0xD23F, + 12279: 0xD241, + 12280: 0xD248, + 12281: 0xD25C, + 12282: 0xD78D, + 12283: 0xD78E, + 12284: 0xD78F, + 12285: 0xD791, + 12286: 0xD792, + 12287: 0xD793, + 12288: 0xD794, + 12289: 0xD795, + 12290: 0xD796, + 12291: 0xD797, + 12292: 0xD79A, + 12293: 0xD79C, + 12294: 0xD79E, + 12295: 0xD79F, + 12296: 0xD7A0, + 12297: 0xD7A1, + 12298: 0xD7A2, + 12299: 0xD7A3, + 12366: 0xD264, + 12367: 0xD280, + 12368: 0xD281, + 12369: 0xD284, + 12370: 0xD288, + 12371: 0xD290, + 12372: 0xD291, + 12373: 0xD295, + 12374: 0xD29C, + 12375: 0xD2A0, + 12376: 0xD2A4, + 12377: 0xD2AC, + 12378: 0xD2B1, + 12379: 0xD2B8, + 12380: 0xD2B9, + 12381: 0xD2BC, + 12382: 0xD2BF, + 12383: 0xD2C0, + 12384: 0xD2C2, + 12385: 0xD2C8, + 12386: 0xD2C9, + 12387: 0xD2CB, + 12388: 0xD2D4, + 12389: 0xD2D8, + 12390: 0xD2DC, + 12391: 0xD2E4, + 12392: 0xD2E5, + 12393: 0xD2F0, + 12394: 0xD2F1, + 12395: 0xD2F4, + 12396: 0xD2F8, + 12397: 0xD300, + 12398: 0xD301, + 12399: 0xD303, + 12400: 0xD305, + 12401: 0xD30C, + 12402: 0xD30D, + 12403: 0xD30E, + 12404: 0xD310, + 12405: 0xD314, + 12406: 0xD316, + 12407: 0xD31C, + 12408: 0xD31D, + 12409: 0xD31F, + 12410: 0xD320, + 12411: 0xD321, + 12412: 0xD325, + 12413: 0xD328, + 12414: 0xD329, + 12415: 0xD32C, + 12416: 0xD330, + 12417: 0xD338, + 12418: 0xD339, + 12419: 0xD33B, + 12420: 0xD33C, + 12421: 0xD33D, + 12422: 0xD344, + 12423: 0xD345, + 12424: 0xD37C, + 12425: 0xD37D, + 12426: 0xD380, + 12427: 0xD384, + 12428: 0xD38C, + 12429: 0xD38D, + 12430: 0xD38F, + 12431: 0xD390, + 12432: 0xD391, + 12433: 0xD398, + 12434: 0xD399, + 12435: 0xD39C, + 12436: 0xD3A0, + 12437: 0xD3A8, + 12438: 0xD3A9, + 12439: 0xD3AB, + 12440: 0xD3AD, + 12441: 0xD3B4, + 12442: 0xD3B8, + 12443: 0xD3BC, + 12444: 0xD3C4, + 12445: 0xD3C5, + 12446: 0xD3C8, + 12447: 0xD3C9, + 12448: 0xD3D0, + 12449: 0xD3D8, + 12450: 0xD3E1, + 12451: 0xD3E3, + 12452: 0xD3EC, + 12453: 0xD3ED, + 12454: 0xD3F0, + 12455: 0xD3F4, + 12456: 0xD3FC, + 12457: 0xD3FD, + 12458: 0xD3FF, + 12459: 0xD401, + 12460: 0xD408, + 12461: 0xD41D, + 12462: 0xD440, + 12463: 0xD444, + 12464: 0xD45C, + 12465: 0xD460, + 12466: 0xD464, + 12467: 0xD46D, + 12468: 0xD46F, + 12469: 0xD478, + 12470: 0xD479, + 12471: 0xD47C, + 12472: 0xD47F, + 12473: 0xD480, + 12474: 0xD482, + 12475: 0xD488, + 12476: 0xD489, + 12477: 0xD48B, + 12478: 0xD48D, + 12479: 0xD494, + 12480: 0xD4A9, + 12481: 0xD4CC, + 12482: 0xD4D0, + 12483: 0xD4D4, + 12484: 0xD4DC, + 12485: 0xD4DF, + 12486: 0xD4E8, + 12487: 0xD4EC, + 12488: 0xD4F0, + 12489: 0xD4F8, + 12490: 0xD4FB, + 12491: 0xD4FD, + 12492: 0xD504, + 12493: 0xD508, + 12494: 0xD50C, + 12495: 0xD514, + 12496: 0xD515, + 12497: 0xD517, + 12498: 0xD53C, + 12499: 0xD53D, + 12500: 0xD540, + 12501: 0xD544, + 12502: 0xD54C, + 12503: 0xD54D, + 12504: 0xD54F, + 12505: 0xD551, + 12506: 0xD558, + 12507: 0xD559, + 12508: 0xD55C, + 12509: 0xD560, + 12510: 0xD565, + 12511: 0xD568, + 12512: 0xD569, + 12513: 0xD56B, + 12514: 0xD56D, + 12515: 0xD574, + 12516: 0xD575, + 12517: 0xD578, + 12518: 0xD57C, + 12519: 0xD584, + 12520: 0xD585, + 12521: 0xD587, + 12522: 0xD588, + 12523: 0xD589, + 12524: 0xD590, + 12525: 0xD5A5, + 12526: 0xD5C8, + 12527: 0xD5C9, + 12528: 0xD5CC, + 12529: 0xD5D0, + 12530: 0xD5D2, + 12531: 0xD5D8, + 12532: 0xD5D9, + 12533: 0xD5DB, + 12534: 0xD5DD, + 12535: 0xD5E4, + 12536: 0xD5E5, + 12537: 0xD5E8, + 12538: 0xD5EC, + 12539: 0xD5F4, + 12540: 0xD5F5, + 12541: 0xD5F7, + 12542: 0xD5F9, + 12543: 0xD600, + 12544: 0xD601, + 12545: 0xD604, + 12546: 0xD608, + 12547: 0xD610, + 12548: 0xD611, + 12549: 0xD613, + 12550: 0xD614, + 12551: 0xD615, + 12552: 0xD61C, + 12553: 0xD620, + 12554: 0xD624, + 12555: 0xD62D, + 12556: 0xD638, + 12557: 0xD639, + 12558: 0xD63C, + 12559: 0xD640, + 12560: 0xD645, + 12561: 0xD648, + 12562: 0xD649, + 12563: 0xD64B, + 12564: 0xD64D, + 12565: 0xD651, + 12566: 0xD654, + 12567: 0xD655, + 12568: 0xD658, + 12569: 0xD65C, + 12570: 0xD667, + 12571: 0xD669, + 12572: 0xD670, + 12573: 0xD671, + 12574: 0xD674, + 12575: 0xD683, + 12576: 0xD685, + 12577: 0xD68C, + 12578: 0xD68D, + 12579: 0xD690, + 12580: 0xD694, + 12581: 0xD69D, + 12582: 0xD69F, + 12583: 0xD6A1, + 12584: 0xD6A8, + 12585: 0xD6AC, + 12586: 0xD6B0, + 12587: 0xD6B9, + 12588: 0xD6BB, + 12589: 0xD6C4, + 12590: 0xD6C5, + 12591: 0xD6C8, + 12592: 0xD6CC, + 12593: 0xD6D1, + 12594: 0xD6D4, + 12595: 0xD6D7, + 12596: 0xD6D9, + 12597: 0xD6E0, + 12598: 0xD6E4, + 12599: 0xD6E8, + 12600: 0xD6F0, + 12601: 0xD6F5, + 12602: 0xD6FC, + 12603: 0xD6FD, + 12604: 0xD700, + 12605: 0xD704, + 12606: 0xD711, + 12607: 0xD718, + 12608: 0xD719, + 12609: 0xD71C, + 12610: 0xD720, + 12611: 0xD728, + 12612: 0xD729, + 12613: 0xD72B, + 12614: 0xD72D, + 12615: 0xD734, + 12616: 0xD735, + 12617: 0xD738, + 12618: 0xD73C, + 12619: 0xD744, + 12620: 0xD747, + 12621: 0xD749, + 12622: 0xD750, + 12623: 0xD751, + 12624: 0xD754, + 12625: 0xD756, + 12626: 0xD757, + 12627: 0xD758, + 12628: 0xD759, + 12629: 0xD760, + 12630: 0xD761, + 12631: 0xD763, + 12632: 0xD765, + 12633: 0xD769, + 12634: 0xD76C, + 12635: 0xD770, + 12636: 0xD774, + 12637: 0xD77C, + 12638: 0xD77D, + 12639: 0xD781, + 12640: 0xD788, + 12641: 0xD789, + 12642: 0xD78C, + 12643: 0xD790, + 12644: 0xD798, + 12645: 0xD799, + 12646: 0xD79B, + 12647: 0xD79D, + 12742: 0x4F3D, + 12743: 0x4F73, + 12744: 0x5047, + 12745: 0x50F9, + 12746: 0x52A0, + 12747: 0x53EF, + 12748: 0x5475, + 12749: 0x54E5, + 12750: 0x5609, + 12751: 0x5AC1, + 12752: 0x5BB6, + 12753: 0x6687, + 12754: 0x67B6, + 12755: 0x67B7, + 12756: 0x67EF, + 12757: 0x6B4C, + 12758: 0x73C2, + 12759: 0x75C2, + 12760: 0x7A3C, + 12761: 0x82DB, + 12762: 0x8304, + 12763: 0x8857, + 12764: 0x8888, + 12765: 0x8A36, + 12766: 0x8CC8, + 12767: 0x8DCF, + 12768: 0x8EFB, + 12769: 0x8FE6, + 12770: 0x99D5, + 12771: 0x523B, + 12772: 0x5374, + 12773: 0x5404, + 12774: 0x606A, + 12775: 0x6164, + 12776: 0x6BBC, + 12777: 0x73CF, + 12778: 0x811A, + 12779: 0x89BA, + 12780: 0x89D2, + 12781: 0x95A3, + 12782: 0x4F83, + 12783: 0x520A, + 12784: 0x58BE, + 12785: 0x5978, + 12786: 0x59E6, + 12787: 0x5E72, + 12788: 0x5E79, + 12789: 0x61C7, + 12790: 0x63C0, + 12791: 0x6746, + 12792: 0x67EC, + 12793: 0x687F, + 12794: 0x6F97, + 12795: 0x764E, + 12796: 0x770B, + 12797: 0x78F5, + 12798: 0x7A08, + 12799: 0x7AFF, + 12800: 0x7C21, + 12801: 0x809D, + 12802: 0x826E, + 12803: 0x8271, + 12804: 0x8AEB, + 12805: 0x9593, + 12806: 0x4E6B, + 12807: 0x559D, + 12808: 0x66F7, + 12809: 0x6E34, + 12810: 0x78A3, + 12811: 0x7AED, + 12812: 0x845B, + 12813: 0x8910, + 12814: 0x874E, + 12815: 0x97A8, + 12816: 0x52D8, + 12817: 0x574E, + 12818: 0x582A, + 12819: 0x5D4C, + 12820: 0x611F, + 12821: 0x61BE, + 12822: 0x6221, + 12823: 0x6562, + 12824: 0x67D1, + 12825: 0x6A44, + 12826: 0x6E1B, + 12827: 0x7518, + 12828: 0x75B3, + 12829: 0x76E3, + 12830: 0x77B0, + 12831: 0x7D3A, + 12832: 0x90AF, + 12833: 0x9451, + 12834: 0x9452, + 12835: 0x9F95, + 12836: 0x5323, + 12837: 0x5CAC, + 12838: 0x7532, + 12839: 0x80DB, + 12840: 0x9240, + 12841: 0x9598, + 12842: 0x525B, + 12843: 0x5808, + 12844: 0x59DC, + 12845: 0x5CA1, + 12846: 0x5D17, + 12847: 0x5EB7, + 12848: 0x5F3A, + 12849: 0x5F4A, + 12850: 0x6177, + 12851: 0x6C5F, + 12852: 0x757A, + 12853: 0x7586, + 12854: 0x7CE0, + 12855: 0x7D73, + 12856: 0x7DB1, + 12857: 0x7F8C, + 12858: 0x8154, + 12859: 0x8221, + 12860: 0x8591, + 12861: 0x8941, + 12862: 0x8B1B, + 12863: 0x92FC, + 12864: 0x964D, + 12865: 0x9C47, + 12866: 0x4ECB, + 12867: 0x4EF7, + 12868: 0x500B, + 12869: 0x51F1, + 12870: 0x584F, + 12871: 0x6137, + 12872: 0x613E, + 12873: 0x6168, + 12874: 0x6539, + 12875: 0x69EA, + 12876: 0x6F11, + 12877: 0x75A5, + 12878: 0x7686, + 12879: 0x76D6, + 12880: 0x7B87, + 12881: 0x82A5, + 12882: 0x84CB, + 12883: 0xF900, + 12884: 0x93A7, + 12885: 0x958B, + 12886: 0x5580, + 12887: 0x5BA2, + 12888: 0x5751, + 12889: 0xF901, + 12890: 0x7CB3, + 12891: 0x7FB9, + 12892: 0x91B5, + 12893: 0x5028, + 12894: 0x53BB, + 12895: 0x5C45, + 12896: 0x5DE8, + 12897: 0x62D2, + 12898: 0x636E, + 12899: 0x64DA, + 12900: 0x64E7, + 12901: 0x6E20, + 12902: 0x70AC, + 12903: 0x795B, + 12904: 0x8DDD, + 12905: 0x8E1E, + 12906: 0xF902, + 12907: 0x907D, + 12908: 0x9245, + 12909: 0x92F8, + 12910: 0x4E7E, + 12911: 0x4EF6, + 12912: 0x5065, + 12913: 0x5DFE, + 12914: 0x5EFA, + 12915: 0x6106, + 12916: 0x6957, + 12917: 0x8171, + 12918: 0x8654, + 12919: 0x8E47, + 12920: 0x9375, + 12921: 0x9A2B, + 12922: 0x4E5E, + 12923: 0x5091, + 12924: 0x6770, + 12925: 0x6840, + 12926: 0x5109, + 12927: 0x528D, + 12928: 0x5292, + 12929: 0x6AA2, + 12930: 0x77BC, + 12931: 0x9210, + 12932: 0x9ED4, + 12933: 0x52AB, + 12934: 0x602F, + 12935: 0x8FF2, + 12936: 0x5048, + 12937: 0x61A9, + 12938: 0x63ED, + 12939: 0x64CA, + 12940: 0x683C, + 12941: 0x6A84, + 12942: 0x6FC0, + 12943: 0x8188, + 12944: 0x89A1, + 12945: 0x9694, + 12946: 0x5805, + 12947: 0x727D, + 12948: 0x72AC, + 12949: 0x7504, + 12950: 0x7D79, + 12951: 0x7E6D, + 12952: 0x80A9, + 12953: 0x898B, + 12954: 0x8B74, + 12955: 0x9063, + 12956: 0x9D51, + 12957: 0x6289, + 12958: 0x6C7A, + 12959: 0x6F54, + 12960: 0x7D50, + 12961: 0x7F3A, + 12962: 0x8A23, + 12963: 0x517C, + 12964: 0x614A, + 12965: 0x7B9D, + 12966: 0x8B19, + 12967: 0x9257, + 12968: 0x938C, + 12969: 0x4EAC, + 12970: 0x4FD3, + 12971: 0x501E, + 12972: 0x50BE, + 12973: 0x5106, + 12974: 0x52C1, + 12975: 0x52CD, + 12976: 0x537F, + 12977: 0x5770, + 12978: 0x5883, + 12979: 0x5E9A, + 12980: 0x5F91, + 12981: 0x6176, + 12982: 0x61AC, + 12983: 0x64CE, + 12984: 0x656C, + 12985: 0x666F, + 12986: 0x66BB, + 12987: 0x66F4, + 12988: 0x6897, + 12989: 0x6D87, + 12990: 0x7085, + 12991: 0x70F1, + 12992: 0x749F, + 12993: 0x74A5, + 12994: 0x74CA, + 12995: 0x75D9, + 12996: 0x786C, + 12997: 0x78EC, + 12998: 0x7ADF, + 12999: 0x7AF6, + 13000: 0x7D45, + 13001: 0x7D93, + 13002: 0x8015, + 13003: 0x803F, + 13004: 0x811B, + 13005: 0x8396, + 13006: 0x8B66, + 13007: 0x8F15, + 13008: 0x9015, + 13009: 0x93E1, + 13010: 0x9803, + 13011: 0x9838, + 13012: 0x9A5A, + 13013: 0x9BE8, + 13014: 0x4FC2, + 13015: 0x5553, + 13016: 0x583A, + 13017: 0x5951, + 13018: 0x5B63, + 13019: 0x5C46, + 13020: 0x60B8, + 13021: 0x6212, + 13022: 0x6842, + 13023: 0x68B0, + 13024: 0x68E8, + 13025: 0x6EAA, + 13026: 0x754C, + 13027: 0x7678, + 13028: 0x78CE, + 13029: 0x7A3D, + 13030: 0x7CFB, + 13031: 0x7E6B, + 13032: 0x7E7C, + 13033: 0x8A08, + 13034: 0x8AA1, + 13035: 0x8C3F, + 13036: 0x968E, + 13037: 0x9DC4, + 13038: 0x53E4, + 13039: 0x53E9, + 13040: 0x544A, + 13041: 0x5471, + 13042: 0x56FA, + 13043: 0x59D1, + 13044: 0x5B64, + 13045: 0x5C3B, + 13046: 0x5EAB, + 13047: 0x62F7, + 13048: 0x6537, + 13049: 0x6545, + 13050: 0x6572, + 13051: 0x66A0, + 13052: 0x67AF, + 13053: 0x69C1, + 13054: 0x6CBD, + 13055: 0x75FC, + 13056: 0x7690, + 13057: 0x777E, + 13058: 0x7A3F, + 13059: 0x7F94, + 13060: 0x8003, + 13061: 0x80A1, + 13062: 0x818F, + 13063: 0x82E6, + 13064: 0x82FD, + 13065: 0x83F0, + 13066: 0x85C1, + 13067: 0x8831, + 13068: 0x88B4, + 13069: 0x8AA5, + 13070: 0xF903, + 13071: 0x8F9C, + 13072: 0x932E, + 13073: 0x96C7, + 13074: 0x9867, + 13075: 0x9AD8, + 13076: 0x9F13, + 13077: 0x54ED, + 13078: 0x659B, + 13079: 0x66F2, + 13080: 0x688F, + 13081: 0x7A40, + 13082: 0x8C37, + 13083: 0x9D60, + 13084: 0x56F0, + 13085: 0x5764, + 13086: 0x5D11, + 13087: 0x6606, + 13088: 0x68B1, + 13089: 0x68CD, + 13090: 0x6EFE, + 13091: 0x7428, + 13092: 0x889E, + 13093: 0x9BE4, + 13094: 0x6C68, + 13095: 0xF904, + 13096: 0x9AA8, + 13097: 0x4F9B, + 13098: 0x516C, + 13099: 0x5171, + 13100: 0x529F, + 13101: 0x5B54, + 13102: 0x5DE5, + 13103: 0x6050, + 13104: 0x606D, + 13105: 0x62F1, + 13106: 0x63A7, + 13107: 0x653B, + 13108: 0x73D9, + 13109: 0x7A7A, + 13110: 0x86A3, + 13111: 0x8CA2, + 13112: 0x978F, + 13113: 0x4E32, + 13114: 0x5BE1, + 13115: 0x6208, + 13116: 0x679C, + 13117: 0x74DC, + 13118: 0x79D1, + 13119: 0x83D3, + 13120: 0x8A87, + 13121: 0x8AB2, + 13122: 0x8DE8, + 13123: 0x904E, + 13124: 0x934B, + 13125: 0x9846, + 13126: 0x5ED3, + 13127: 0x69E8, + 13128: 0x85FF, + 13129: 0x90ED, + 13130: 0xF905, + 13131: 0x51A0, + 13132: 0x5B98, + 13133: 0x5BEC, + 13134: 0x6163, + 13135: 0x68FA, + 13136: 0x6B3E, + 13137: 0x704C, + 13138: 0x742F, + 13139: 0x74D8, + 13140: 0x7BA1, + 13141: 0x7F50, + 13142: 0x83C5, + 13143: 0x89C0, + 13144: 0x8CAB, + 13145: 0x95DC, + 13146: 0x9928, + 13147: 0x522E, + 13148: 0x605D, + 13149: 0x62EC, + 13150: 0x9002, + 13151: 0x4F8A, + 13152: 0x5149, + 13153: 0x5321, + 13154: 0x58D9, + 13155: 0x5EE3, + 13156: 0x66E0, + 13157: 0x6D38, + 13158: 0x709A, + 13159: 0x72C2, + 13160: 0x73D6, + 13161: 0x7B50, + 13162: 0x80F1, + 13163: 0x945B, + 13164: 0x5366, + 13165: 0x639B, + 13166: 0x7F6B, + 13167: 0x4E56, + 13168: 0x5080, + 13169: 0x584A, + 13170: 0x58DE, + 13171: 0x602A, + 13172: 0x6127, + 13173: 0x62D0, + 13174: 0x69D0, + 13175: 0x9B41, + 13176: 0x5B8F, + 13177: 0x7D18, + 13178: 0x80B1, + 13179: 0x8F5F, + 13180: 0x4EA4, + 13181: 0x50D1, + 13182: 0x54AC, + 13183: 0x55AC, + 13184: 0x5B0C, + 13185: 0x5DA0, + 13186: 0x5DE7, + 13187: 0x652A, + 13188: 0x654E, + 13189: 0x6821, + 13190: 0x6A4B, + 13191: 0x72E1, + 13192: 0x768E, + 13193: 0x77EF, + 13194: 0x7D5E, + 13195: 0x7FF9, + 13196: 0x81A0, + 13197: 0x854E, + 13198: 0x86DF, + 13199: 0x8F03, + 13200: 0x8F4E, + 13201: 0x90CA, + 13202: 0x9903, + 13203: 0x9A55, + 13204: 0x9BAB, + 13205: 0x4E18, + 13206: 0x4E45, + 13207: 0x4E5D, + 13208: 0x4EC7, + 13209: 0x4FF1, + 13210: 0x5177, + 13211: 0x52FE, + 13212: 0x5340, + 13213: 0x53E3, + 13214: 0x53E5, + 13215: 0x548E, + 13216: 0x5614, + 13217: 0x5775, + 13218: 0x57A2, + 13219: 0x5BC7, + 13220: 0x5D87, + 13221: 0x5ED0, + 13222: 0x61FC, + 13223: 0x62D8, + 13224: 0x6551, + 13225: 0x67B8, + 13226: 0x67E9, + 13227: 0x69CB, + 13228: 0x6B50, + 13229: 0x6BC6, + 13230: 0x6BEC, + 13231: 0x6C42, + 13232: 0x6E9D, + 13233: 0x7078, + 13234: 0x72D7, + 13235: 0x7396, + 13236: 0x7403, + 13237: 0x77BF, + 13238: 0x77E9, + 13239: 0x7A76, + 13240: 0x7D7F, + 13241: 0x8009, + 13242: 0x81FC, + 13243: 0x8205, + 13244: 0x820A, + 13245: 0x82DF, + 13246: 0x8862, + 13247: 0x8B33, + 13248: 0x8CFC, + 13249: 0x8EC0, + 13250: 0x9011, + 13251: 0x90B1, + 13252: 0x9264, + 13253: 0x92B6, + 13254: 0x99D2, + 13255: 0x9A45, + 13256: 0x9CE9, + 13257: 0x9DD7, + 13258: 0x9F9C, + 13259: 0x570B, + 13260: 0x5C40, + 13261: 0x83CA, + 13262: 0x97A0, + 13263: 0x97AB, + 13264: 0x9EB4, + 13265: 0x541B, + 13266: 0x7A98, + 13267: 0x7FA4, + 13268: 0x88D9, + 13269: 0x8ECD, + 13270: 0x90E1, + 13271: 0x5800, + 13272: 0x5C48, + 13273: 0x6398, + 13274: 0x7A9F, + 13275: 0x5BAE, + 13276: 0x5F13, + 13277: 0x7A79, + 13278: 0x7AAE, + 13279: 0x828E, + 13280: 0x8EAC, + 13281: 0x5026, + 13282: 0x5238, + 13283: 0x52F8, + 13284: 0x5377, + 13285: 0x5708, + 13286: 0x62F3, + 13287: 0x6372, + 13288: 0x6B0A, + 13289: 0x6DC3, + 13290: 0x7737, + 13291: 0x53A5, + 13292: 0x7357, + 13293: 0x8568, + 13294: 0x8E76, + 13295: 0x95D5, + 13296: 0x673A, + 13297: 0x6AC3, + 13298: 0x6F70, + 13299: 0x8A6D, + 13300: 0x8ECC, + 13301: 0x994B, + 13302: 0xF906, + 13303: 0x6677, + 13304: 0x6B78, + 13305: 0x8CB4, + 13306: 0x9B3C, + 13307: 0xF907, + 13308: 0x53EB, + 13309: 0x572D, + 13310: 0x594E, + 13311: 0x63C6, + 13312: 0x69FB, + 13313: 0x73EA, + 13314: 0x7845, + 13315: 0x7ABA, + 13316: 0x7AC5, + 13317: 0x7CFE, + 13318: 0x8475, + 13319: 0x898F, + 13320: 0x8D73, + 13321: 0x9035, + 13322: 0x95A8, + 13323: 0x52FB, + 13324: 0x5747, + 13325: 0x7547, + 13326: 0x7B60, + 13327: 0x83CC, + 13328: 0x921E, + 13329: 0xF908, + 13330: 0x6A58, + 13331: 0x514B, + 13332: 0x524B, + 13333: 0x5287, + 13334: 0x621F, + 13335: 0x68D8, + 13336: 0x6975, + 13337: 0x9699, + 13338: 0x50C5, + 13339: 0x52A4, + 13340: 0x52E4, + 13341: 0x61C3, + 13342: 0x65A4, + 13343: 0x6839, + 13344: 0x69FF, + 13345: 0x747E, + 13346: 0x7B4B, + 13347: 0x82B9, + 13348: 0x83EB, + 13349: 0x89B2, + 13350: 0x8B39, + 13351: 0x8FD1, + 13352: 0x9949, + 13353: 0xF909, + 13354: 0x4ECA, + 13355: 0x5997, + 13356: 0x64D2, + 13357: 0x6611, + 13358: 0x6A8E, + 13359: 0x7434, + 13360: 0x7981, + 13361: 0x79BD, + 13362: 0x82A9, + 13363: 0x887E, + 13364: 0x887F, + 13365: 0x895F, + 13366: 0xF90A, + 13367: 0x9326, + 13368: 0x4F0B, + 13369: 0x53CA, + 13370: 0x6025, + 13371: 0x6271, + 13372: 0x6C72, + 13373: 0x7D1A, + 13374: 0x7D66, + 13375: 0x4E98, + 13376: 0x5162, + 13377: 0x77DC, + 13378: 0x80AF, + 13379: 0x4F01, + 13380: 0x4F0E, + 13381: 0x5176, + 13382: 0x5180, + 13383: 0x55DC, + 13384: 0x5668, + 13385: 0x573B, + 13386: 0x57FA, + 13387: 0x57FC, + 13388: 0x5914, + 13389: 0x5947, + 13390: 0x5993, + 13391: 0x5BC4, + 13392: 0x5C90, + 13393: 0x5D0E, + 13394: 0x5DF1, + 13395: 0x5E7E, + 13396: 0x5FCC, + 13397: 0x6280, + 13398: 0x65D7, + 13399: 0x65E3, + 13400: 0x671E, + 13401: 0x671F, + 13402: 0x675E, + 13403: 0x68CB, + 13404: 0x68C4, + 13405: 0x6A5F, + 13406: 0x6B3A, + 13407: 0x6C23, + 13408: 0x6C7D, + 13409: 0x6C82, + 13410: 0x6DC7, + 13411: 0x7398, + 13412: 0x7426, + 13413: 0x742A, + 13414: 0x7482, + 13415: 0x74A3, + 13416: 0x7578, + 13417: 0x757F, + 13418: 0x7881, + 13419: 0x78EF, + 13420: 0x7941, + 13421: 0x7947, + 13422: 0x7948, + 13423: 0x797A, + 13424: 0x7B95, + 13425: 0x7D00, + 13426: 0x7DBA, + 13427: 0x7F88, + 13428: 0x8006, + 13429: 0x802D, + 13430: 0x808C, + 13431: 0x8A18, + 13432: 0x8B4F, + 13433: 0x8C48, + 13434: 0x8D77, + 13435: 0x9321, + 13436: 0x9324, + 13437: 0x98E2, + 13438: 0x9951, + 13439: 0x9A0E, + 13440: 0x9A0F, + 13441: 0x9A65, + 13442: 0x9E92, + 13443: 0x7DCA, + 13444: 0x4F76, + 13445: 0x5409, + 13446: 0x62EE, + 13447: 0x6854, + 13448: 0x91D1, + 13449: 0x55AB, + 13450: 0x513A, + 13451: 0xF90B, + 13452: 0xF90C, + 13453: 0x5A1C, + 13454: 0x61E6, + 13455: 0xF90D, + 13456: 0x62CF, + 13457: 0x62FF, + 13458: 0xF90E, + 13459: 0xF90F, + 13460: 0xF910, + 13461: 0xF911, + 13462: 0xF912, + 13463: 0xF913, + 13464: 0x90A3, + 13465: 0xF914, + 13466: 0xF915, + 13467: 0xF916, + 13468: 0xF917, + 13469: 0xF918, + 13470: 0x8AFE, + 13471: 0xF919, + 13472: 0xF91A, + 13473: 0xF91B, + 13474: 0xF91C, + 13475: 0x6696, + 13476: 0xF91D, + 13477: 0x7156, + 13478: 0xF91E, + 13479: 0xF91F, + 13480: 0x96E3, + 13481: 0xF920, + 13482: 0x634F, + 13483: 0x637A, + 13484: 0x5357, + 13485: 0xF921, + 13486: 0x678F, + 13487: 0x6960, + 13488: 0x6E73, + 13489: 0xF922, + 13490: 0x7537, + 13491: 0xF923, + 13492: 0xF924, + 13493: 0xF925, + 13494: 0x7D0D, + 13495: 0xF926, + 13496: 0xF927, + 13497: 0x8872, + 13498: 0x56CA, + 13499: 0x5A18, + 13500: 0xF928, + 13501: 0xF929, + 13502: 0xF92A, + 13503: 0xF92B, + 13504: 0xF92C, + 13505: 0x4E43, + 13506: 0xF92D, + 13507: 0x5167, + 13508: 0x5948, + 13509: 0x67F0, + 13510: 0x8010, + 13511: 0xF92E, + 13512: 0x5973, + 13513: 0x5E74, + 13514: 0x649A, + 13515: 0x79CA, + 13516: 0x5FF5, + 13517: 0x606C, + 13518: 0x62C8, + 13519: 0x637B, + 13520: 0x5BE7, + 13521: 0x5BD7, + 13522: 0x52AA, + 13523: 0xF92F, + 13524: 0x5974, + 13525: 0x5F29, + 13526: 0x6012, + 13527: 0xF930, + 13528: 0xF931, + 13529: 0xF932, + 13530: 0x7459, + 13531: 0xF933, + 13532: 0xF934, + 13533: 0xF935, + 13534: 0xF936, + 13535: 0xF937, + 13536: 0xF938, + 13537: 0x99D1, + 13538: 0xF939, + 13539: 0xF93A, + 13540: 0xF93B, + 13541: 0xF93C, + 13542: 0xF93D, + 13543: 0xF93E, + 13544: 0xF93F, + 13545: 0xF940, + 13546: 0xF941, + 13547: 0xF942, + 13548: 0xF943, + 13549: 0x6FC3, + 13550: 0xF944, + 13551: 0xF945, + 13552: 0x81BF, + 13553: 0x8FB2, + 13554: 0x60F1, + 13555: 0xF946, + 13556: 0xF947, + 13557: 0x8166, + 13558: 0xF948, + 13559: 0xF949, + 13560: 0x5C3F, + 13561: 0xF94A, + 13562: 0xF94B, + 13563: 0xF94C, + 13564: 0xF94D, + 13565: 0xF94E, + 13566: 0xF94F, + 13567: 0xF950, + 13568: 0xF951, + 13569: 0x5AE9, + 13570: 0x8A25, + 13571: 0x677B, + 13572: 0x7D10, + 13573: 0xF952, + 13574: 0xF953, + 13575: 0xF954, + 13576: 0xF955, + 13577: 0xF956, + 13578: 0xF957, + 13579: 0x80FD, + 13580: 0xF958, + 13581: 0xF959, + 13582: 0x5C3C, + 13583: 0x6CE5, + 13584: 0x533F, + 13585: 0x6EBA, + 13586: 0x591A, + 13587: 0x8336, + 13588: 0x4E39, + 13589: 0x4EB6, + 13590: 0x4F46, + 13591: 0x55AE, + 13592: 0x5718, + 13593: 0x58C7, + 13594: 0x5F56, + 13595: 0x65B7, + 13596: 0x65E6, + 13597: 0x6A80, + 13598: 0x6BB5, + 13599: 0x6E4D, + 13600: 0x77ED, + 13601: 0x7AEF, + 13602: 0x7C1E, + 13603: 0x7DDE, + 13604: 0x86CB, + 13605: 0x8892, + 13606: 0x9132, + 13607: 0x935B, + 13608: 0x64BB, + 13609: 0x6FBE, + 13610: 0x737A, + 13611: 0x75B8, + 13612: 0x9054, + 13613: 0x5556, + 13614: 0x574D, + 13615: 0x61BA, + 13616: 0x64D4, + 13617: 0x66C7, + 13618: 0x6DE1, + 13619: 0x6E5B, + 13620: 0x6F6D, + 13621: 0x6FB9, + 13622: 0x75F0, + 13623: 0x8043, + 13624: 0x81BD, + 13625: 0x8541, + 13626: 0x8983, + 13627: 0x8AC7, + 13628: 0x8B5A, + 13629: 0x931F, + 13630: 0x6C93, + 13631: 0x7553, + 13632: 0x7B54, + 13633: 0x8E0F, + 13634: 0x905D, + 13635: 0x5510, + 13636: 0x5802, + 13637: 0x5858, + 13638: 0x5E62, + 13639: 0x6207, + 13640: 0x649E, + 13641: 0x68E0, + 13642: 0x7576, + 13643: 0x7CD6, + 13644: 0x87B3, + 13645: 0x9EE8, + 13646: 0x4EE3, + 13647: 0x5788, + 13648: 0x576E, + 13649: 0x5927, + 13650: 0x5C0D, + 13651: 0x5CB1, + 13652: 0x5E36, + 13653: 0x5F85, + 13654: 0x6234, + 13655: 0x64E1, + 13656: 0x73B3, + 13657: 0x81FA, + 13658: 0x888B, + 13659: 0x8CB8, + 13660: 0x968A, + 13661: 0x9EDB, + 13662: 0x5B85, + 13663: 0x5FB7, + 13664: 0x60B3, + 13665: 0x5012, + 13666: 0x5200, + 13667: 0x5230, + 13668: 0x5716, + 13669: 0x5835, + 13670: 0x5857, + 13671: 0x5C0E, + 13672: 0x5C60, + 13673: 0x5CF6, + 13674: 0x5D8B, + 13675: 0x5EA6, + 13676: 0x5F92, + 13677: 0x60BC, + 13678: 0x6311, + 13679: 0x6389, + 13680: 0x6417, + 13681: 0x6843, + 13682: 0x68F9, + 13683: 0x6AC2, + 13684: 0x6DD8, + 13685: 0x6E21, + 13686: 0x6ED4, + 13687: 0x6FE4, + 13688: 0x71FE, + 13689: 0x76DC, + 13690: 0x7779, + 13691: 0x79B1, + 13692: 0x7A3B, + 13693: 0x8404, + 13694: 0x89A9, + 13695: 0x8CED, + 13696: 0x8DF3, + 13697: 0x8E48, + 13698: 0x9003, + 13699: 0x9014, + 13700: 0x9053, + 13701: 0x90FD, + 13702: 0x934D, + 13703: 0x9676, + 13704: 0x97DC, + 13705: 0x6BD2, + 13706: 0x7006, + 13707: 0x7258, + 13708: 0x72A2, + 13709: 0x7368, + 13710: 0x7763, + 13711: 0x79BF, + 13712: 0x7BE4, + 13713: 0x7E9B, + 13714: 0x8B80, + 13715: 0x58A9, + 13716: 0x60C7, + 13717: 0x6566, + 13718: 0x65FD, + 13719: 0x66BE, + 13720: 0x6C8C, + 13721: 0x711E, + 13722: 0x71C9, + 13723: 0x8C5A, + 13724: 0x9813, + 13725: 0x4E6D, + 13726: 0x7A81, + 13727: 0x4EDD, + 13728: 0x51AC, + 13729: 0x51CD, + 13730: 0x52D5, + 13731: 0x540C, + 13732: 0x61A7, + 13733: 0x6771, + 13734: 0x6850, + 13735: 0x68DF, + 13736: 0x6D1E, + 13737: 0x6F7C, + 13738: 0x75BC, + 13739: 0x77B3, + 13740: 0x7AE5, + 13741: 0x80F4, + 13742: 0x8463, + 13743: 0x9285, + 13744: 0x515C, + 13745: 0x6597, + 13746: 0x675C, + 13747: 0x6793, + 13748: 0x75D8, + 13749: 0x7AC7, + 13750: 0x8373, + 13751: 0xF95A, + 13752: 0x8C46, + 13753: 0x9017, + 13754: 0x982D, + 13755: 0x5C6F, + 13756: 0x81C0, + 13757: 0x829A, + 13758: 0x9041, + 13759: 0x906F, + 13760: 0x920D, + 13761: 0x5F97, + 13762: 0x5D9D, + 13763: 0x6A59, + 13764: 0x71C8, + 13765: 0x767B, + 13766: 0x7B49, + 13767: 0x85E4, + 13768: 0x8B04, + 13769: 0x9127, + 13770: 0x9A30, + 13771: 0x5587, + 13772: 0x61F6, + 13773: 0xF95B, + 13774: 0x7669, + 13775: 0x7F85, + 13776: 0x863F, + 13777: 0x87BA, + 13778: 0x88F8, + 13779: 0x908F, + 13780: 0xF95C, + 13781: 0x6D1B, + 13782: 0x70D9, + 13783: 0x73DE, + 13784: 0x7D61, + 13785: 0x843D, + 13786: 0xF95D, + 13787: 0x916A, + 13788: 0x99F1, + 13789: 0xF95E, + 13790: 0x4E82, + 13791: 0x5375, + 13792: 0x6B04, + 13793: 0x6B12, + 13794: 0x703E, + 13795: 0x721B, + 13796: 0x862D, + 13797: 0x9E1E, + 13798: 0x524C, + 13799: 0x8FA3, + 13800: 0x5D50, + 13801: 0x64E5, + 13802: 0x652C, + 13803: 0x6B16, + 13804: 0x6FEB, + 13805: 0x7C43, + 13806: 0x7E9C, + 13807: 0x85CD, + 13808: 0x8964, + 13809: 0x89BD, + 13810: 0x62C9, + 13811: 0x81D8, + 13812: 0x881F, + 13813: 0x5ECA, + 13814: 0x6717, + 13815: 0x6D6A, + 13816: 0x72FC, + 13817: 0x7405, + 13818: 0x746F, + 13819: 0x8782, + 13820: 0x90DE, + 13821: 0x4F86, + 13822: 0x5D0D, + 13823: 0x5FA0, + 13824: 0x840A, + 13825: 0x51B7, + 13826: 0x63A0, + 13827: 0x7565, + 13828: 0x4EAE, + 13829: 0x5006, + 13830: 0x5169, + 13831: 0x51C9, + 13832: 0x6881, + 13833: 0x6A11, + 13834: 0x7CAE, + 13835: 0x7CB1, + 13836: 0x7CE7, + 13837: 0x826F, + 13838: 0x8AD2, + 13839: 0x8F1B, + 13840: 0x91CF, + 13841: 0x4FB6, + 13842: 0x5137, + 13843: 0x52F5, + 13844: 0x5442, + 13845: 0x5EEC, + 13846: 0x616E, + 13847: 0x623E, + 13848: 0x65C5, + 13849: 0x6ADA, + 13850: 0x6FFE, + 13851: 0x792A, + 13852: 0x85DC, + 13853: 0x8823, + 13854: 0x95AD, + 13855: 0x9A62, + 13856: 0x9A6A, + 13857: 0x9E97, + 13858: 0x9ECE, + 13859: 0x529B, + 13860: 0x66C6, + 13861: 0x6B77, + 13862: 0x701D, + 13863: 0x792B, + 13864: 0x8F62, + 13865: 0x9742, + 13866: 0x6190, + 13867: 0x6200, + 13868: 0x6523, + 13869: 0x6F23, + 13870: 0x7149, + 13871: 0x7489, + 13872: 0x7DF4, + 13873: 0x806F, + 13874: 0x84EE, + 13875: 0x8F26, + 13876: 0x9023, + 13877: 0x934A, + 13878: 0x51BD, + 13879: 0x5217, + 13880: 0x52A3, + 13881: 0x6D0C, + 13882: 0x70C8, + 13883: 0x88C2, + 13884: 0x5EC9, + 13885: 0x6582, + 13886: 0x6BAE, + 13887: 0x6FC2, + 13888: 0x7C3E, + 13889: 0x7375, + 13890: 0x4EE4, + 13891: 0x4F36, + 13892: 0x56F9, + 13893: 0xF95F, + 13894: 0x5CBA, + 13895: 0x5DBA, + 13896: 0x601C, + 13897: 0x73B2, + 13898: 0x7B2D, + 13899: 0x7F9A, + 13900: 0x7FCE, + 13901: 0x8046, + 13902: 0x901E, + 13903: 0x9234, + 13904: 0x96F6, + 13905: 0x9748, + 13906: 0x9818, + 13907: 0x9F61, + 13908: 0x4F8B, + 13909: 0x6FA7, + 13910: 0x79AE, + 13911: 0x91B4, + 13912: 0x96B7, + 13913: 0x52DE, + 13914: 0xF960, + 13915: 0x6488, + 13916: 0x64C4, + 13917: 0x6AD3, + 13918: 0x6F5E, + 13919: 0x7018, + 13920: 0x7210, + 13921: 0x76E7, + 13922: 0x8001, + 13923: 0x8606, + 13924: 0x865C, + 13925: 0x8DEF, + 13926: 0x8F05, + 13927: 0x9732, + 13928: 0x9B6F, + 13929: 0x9DFA, + 13930: 0x9E75, + 13931: 0x788C, + 13932: 0x797F, + 13933: 0x7DA0, + 13934: 0x83C9, + 13935: 0x9304, + 13936: 0x9E7F, + 13937: 0x9E93, + 13938: 0x8AD6, + 13939: 0x58DF, + 13940: 0x5F04, + 13941: 0x6727, + 13942: 0x7027, + 13943: 0x74CF, + 13944: 0x7C60, + 13945: 0x807E, + 13946: 0x5121, + 13947: 0x7028, + 13948: 0x7262, + 13949: 0x78CA, + 13950: 0x8CC2, + 13951: 0x8CDA, + 13952: 0x8CF4, + 13953: 0x96F7, + 13954: 0x4E86, + 13955: 0x50DA, + 13956: 0x5BEE, + 13957: 0x5ED6, + 13958: 0x6599, + 13959: 0x71CE, + 13960: 0x7642, + 13961: 0x77AD, + 13962: 0x804A, + 13963: 0x84FC, + 13964: 0x907C, + 13965: 0x9B27, + 13966: 0x9F8D, + 13967: 0x58D8, + 13968: 0x5A41, + 13969: 0x5C62, + 13970: 0x6A13, + 13971: 0x6DDA, + 13972: 0x6F0F, + 13973: 0x763B, + 13974: 0x7D2F, + 13975: 0x7E37, + 13976: 0x851E, + 13977: 0x8938, + 13978: 0x93E4, + 13979: 0x964B, + 13980: 0x5289, + 13981: 0x65D2, + 13982: 0x67F3, + 13983: 0x69B4, + 13984: 0x6D41, + 13985: 0x6E9C, + 13986: 0x700F, + 13987: 0x7409, + 13988: 0x7460, + 13989: 0x7559, + 13990: 0x7624, + 13991: 0x786B, + 13992: 0x8B2C, + 13993: 0x985E, + 13994: 0x516D, + 13995: 0x622E, + 13996: 0x9678, + 13997: 0x4F96, + 13998: 0x502B, + 13999: 0x5D19, + 14000: 0x6DEA, + 14001: 0x7DB8, + 14002: 0x8F2A, + 14003: 0x5F8B, + 14004: 0x6144, + 14005: 0x6817, + 14006: 0xF961, + 14007: 0x9686, + 14008: 0x52D2, + 14009: 0x808B, + 14010: 0x51DC, + 14011: 0x51CC, + 14012: 0x695E, + 14013: 0x7A1C, + 14014: 0x7DBE, + 14015: 0x83F1, + 14016: 0x9675, + 14017: 0x4FDA, + 14018: 0x5229, + 14019: 0x5398, + 14020: 0x540F, + 14021: 0x550E, + 14022: 0x5C65, + 14023: 0x60A7, + 14024: 0x674E, + 14025: 0x68A8, + 14026: 0x6D6C, + 14027: 0x7281, + 14028: 0x72F8, + 14029: 0x7406, + 14030: 0x7483, + 14031: 0xF962, + 14032: 0x75E2, + 14033: 0x7C6C, + 14034: 0x7F79, + 14035: 0x7FB8, + 14036: 0x8389, + 14037: 0x88CF, + 14038: 0x88E1, + 14039: 0x91CC, + 14040: 0x91D0, + 14041: 0x96E2, + 14042: 0x9BC9, + 14043: 0x541D, + 14044: 0x6F7E, + 14045: 0x71D0, + 14046: 0x7498, + 14047: 0x85FA, + 14048: 0x8EAA, + 14049: 0x96A3, + 14050: 0x9C57, + 14051: 0x9E9F, + 14052: 0x6797, + 14053: 0x6DCB, + 14054: 0x7433, + 14055: 0x81E8, + 14056: 0x9716, + 14057: 0x782C, + 14058: 0x7ACB, + 14059: 0x7B20, + 14060: 0x7C92, + 14061: 0x6469, + 14062: 0x746A, + 14063: 0x75F2, + 14064: 0x78BC, + 14065: 0x78E8, + 14066: 0x99AC, + 14067: 0x9B54, + 14068: 0x9EBB, + 14069: 0x5BDE, + 14070: 0x5E55, + 14071: 0x6F20, + 14072: 0x819C, + 14073: 0x83AB, + 14074: 0x9088, + 14075: 0x4E07, + 14076: 0x534D, + 14077: 0x5A29, + 14078: 0x5DD2, + 14079: 0x5F4E, + 14080: 0x6162, + 14081: 0x633D, + 14082: 0x6669, + 14083: 0x66FC, + 14084: 0x6EFF, + 14085: 0x6F2B, + 14086: 0x7063, + 14087: 0x779E, + 14088: 0x842C, + 14089: 0x8513, + 14090: 0x883B, + 14091: 0x8F13, + 14092: 0x9945, + 14093: 0x9C3B, + 14094: 0x551C, + 14095: 0x62B9, + 14096: 0x672B, + 14097: 0x6CAB, + 14098: 0x8309, + 14099: 0x896A, + 14100: 0x977A, + 14101: 0x4EA1, + 14102: 0x5984, + 14103: 0x5FD8, + 14104: 0x5FD9, + 14105: 0x671B, + 14106: 0x7DB2, + 14107: 0x7F54, + 14108: 0x8292, + 14109: 0x832B, + 14110: 0x83BD, + 14111: 0x8F1E, + 14112: 0x9099, + 14113: 0x57CB, + 14114: 0x59B9, + 14115: 0x5A92, + 14116: 0x5BD0, + 14117: 0x6627, + 14118: 0x679A, + 14119: 0x6885, + 14120: 0x6BCF, + 14121: 0x7164, + 14122: 0x7F75, + 14123: 0x8CB7, + 14124: 0x8CE3, + 14125: 0x9081, + 14126: 0x9B45, + 14127: 0x8108, + 14128: 0x8C8A, + 14129: 0x964C, + 14130: 0x9A40, + 14131: 0x9EA5, + 14132: 0x5B5F, + 14133: 0x6C13, + 14134: 0x731B, + 14135: 0x76F2, + 14136: 0x76DF, + 14137: 0x840C, + 14138: 0x51AA, + 14139: 0x8993, + 14140: 0x514D, + 14141: 0x5195, + 14142: 0x52C9, + 14143: 0x68C9, + 14144: 0x6C94, + 14145: 0x7704, + 14146: 0x7720, + 14147: 0x7DBF, + 14148: 0x7DEC, + 14149: 0x9762, + 14150: 0x9EB5, + 14151: 0x6EC5, + 14152: 0x8511, + 14153: 0x51A5, + 14154: 0x540D, + 14155: 0x547D, + 14156: 0x660E, + 14157: 0x669D, + 14158: 0x6927, + 14159: 0x6E9F, + 14160: 0x76BF, + 14161: 0x7791, + 14162: 0x8317, + 14163: 0x84C2, + 14164: 0x879F, + 14165: 0x9169, + 14166: 0x9298, + 14167: 0x9CF4, + 14168: 0x8882, + 14169: 0x4FAE, + 14170: 0x5192, + 14171: 0x52DF, + 14172: 0x59C6, + 14173: 0x5E3D, + 14174: 0x6155, + 14175: 0x6478, + 14176: 0x6479, + 14177: 0x66AE, + 14178: 0x67D0, + 14179: 0x6A21, + 14180: 0x6BCD, + 14181: 0x6BDB, + 14182: 0x725F, + 14183: 0x7261, + 14184: 0x7441, + 14185: 0x7738, + 14186: 0x77DB, + 14187: 0x8017, + 14188: 0x82BC, + 14189: 0x8305, + 14190: 0x8B00, + 14191: 0x8B28, + 14192: 0x8C8C, + 14193: 0x6728, + 14194: 0x6C90, + 14195: 0x7267, + 14196: 0x76EE, + 14197: 0x7766, + 14198: 0x7A46, + 14199: 0x9DA9, + 14200: 0x6B7F, + 14201: 0x6C92, + 14202: 0x5922, + 14203: 0x6726, + 14204: 0x8499, + 14205: 0x536F, + 14206: 0x5893, + 14207: 0x5999, + 14208: 0x5EDF, + 14209: 0x63CF, + 14210: 0x6634, + 14211: 0x6773, + 14212: 0x6E3A, + 14213: 0x732B, + 14214: 0x7AD7, + 14215: 0x82D7, + 14216: 0x9328, + 14217: 0x52D9, + 14218: 0x5DEB, + 14219: 0x61AE, + 14220: 0x61CB, + 14221: 0x620A, + 14222: 0x62C7, + 14223: 0x64AB, + 14224: 0x65E0, + 14225: 0x6959, + 14226: 0x6B66, + 14227: 0x6BCB, + 14228: 0x7121, + 14229: 0x73F7, + 14230: 0x755D, + 14231: 0x7E46, + 14232: 0x821E, + 14233: 0x8302, + 14234: 0x856A, + 14235: 0x8AA3, + 14236: 0x8CBF, + 14237: 0x9727, + 14238: 0x9D61, + 14239: 0x58A8, + 14240: 0x9ED8, + 14241: 0x5011, + 14242: 0x520E, + 14243: 0x543B, + 14244: 0x554F, + 14245: 0x6587, + 14246: 0x6C76, + 14247: 0x7D0A, + 14248: 0x7D0B, + 14249: 0x805E, + 14250: 0x868A, + 14251: 0x9580, + 14252: 0x96EF, + 14253: 0x52FF, + 14254: 0x6C95, + 14255: 0x7269, + 14256: 0x5473, + 14257: 0x5A9A, + 14258: 0x5C3E, + 14259: 0x5D4B, + 14260: 0x5F4C, + 14261: 0x5FAE, + 14262: 0x672A, + 14263: 0x68B6, + 14264: 0x6963, + 14265: 0x6E3C, + 14266: 0x6E44, + 14267: 0x7709, + 14268: 0x7C73, + 14269: 0x7F8E, + 14270: 0x8587, + 14271: 0x8B0E, + 14272: 0x8FF7, + 14273: 0x9761, + 14274: 0x9EF4, + 14275: 0x5CB7, + 14276: 0x60B6, + 14277: 0x610D, + 14278: 0x61AB, + 14279: 0x654F, + 14280: 0x65FB, + 14281: 0x65FC, + 14282: 0x6C11, + 14283: 0x6CEF, + 14284: 0x739F, + 14285: 0x73C9, + 14286: 0x7DE1, + 14287: 0x9594, + 14288: 0x5BC6, + 14289: 0x871C, + 14290: 0x8B10, + 14291: 0x525D, + 14292: 0x535A, + 14293: 0x62CD, + 14294: 0x640F, + 14295: 0x64B2, + 14296: 0x6734, + 14297: 0x6A38, + 14298: 0x6CCA, + 14299: 0x73C0, + 14300: 0x749E, + 14301: 0x7B94, + 14302: 0x7C95, + 14303: 0x7E1B, + 14304: 0x818A, + 14305: 0x8236, + 14306: 0x8584, + 14307: 0x8FEB, + 14308: 0x96F9, + 14309: 0x99C1, + 14310: 0x4F34, + 14311: 0x534A, + 14312: 0x53CD, + 14313: 0x53DB, + 14314: 0x62CC, + 14315: 0x642C, + 14316: 0x6500, + 14317: 0x6591, + 14318: 0x69C3, + 14319: 0x6CEE, + 14320: 0x6F58, + 14321: 0x73ED, + 14322: 0x7554, + 14323: 0x7622, + 14324: 0x76E4, + 14325: 0x76FC, + 14326: 0x78D0, + 14327: 0x78FB, + 14328: 0x792C, + 14329: 0x7D46, + 14330: 0x822C, + 14331: 0x87E0, + 14332: 0x8FD4, + 14333: 0x9812, + 14334: 0x98EF, + 14335: 0x52C3, + 14336: 0x62D4, + 14337: 0x64A5, + 14338: 0x6E24, + 14339: 0x6F51, + 14340: 0x767C, + 14341: 0x8DCB, + 14342: 0x91B1, + 14343: 0x9262, + 14344: 0x9AEE, + 14345: 0x9B43, + 14346: 0x5023, + 14347: 0x508D, + 14348: 0x574A, + 14349: 0x59A8, + 14350: 0x5C28, + 14351: 0x5E47, + 14352: 0x5F77, + 14353: 0x623F, + 14354: 0x653E, + 14355: 0x65B9, + 14356: 0x65C1, + 14357: 0x6609, + 14358: 0x678B, + 14359: 0x699C, + 14360: 0x6EC2, + 14361: 0x78C5, + 14362: 0x7D21, + 14363: 0x80AA, + 14364: 0x8180, + 14365: 0x822B, + 14366: 0x82B3, + 14367: 0x84A1, + 14368: 0x868C, + 14369: 0x8A2A, + 14370: 0x8B17, + 14371: 0x90A6, + 14372: 0x9632, + 14373: 0x9F90, + 14374: 0x500D, + 14375: 0x4FF3, + 14376: 0xF963, + 14377: 0x57F9, + 14378: 0x5F98, + 14379: 0x62DC, + 14380: 0x6392, + 14381: 0x676F, + 14382: 0x6E43, + 14383: 0x7119, + 14384: 0x76C3, + 14385: 0x80CC, + 14386: 0x80DA, + 14387: 0x88F4, + 14388: 0x88F5, + 14389: 0x8919, + 14390: 0x8CE0, + 14391: 0x8F29, + 14392: 0x914D, + 14393: 0x966A, + 14394: 0x4F2F, + 14395: 0x4F70, + 14396: 0x5E1B, + 14397: 0x67CF, + 14398: 0x6822, + 14399: 0x767D, + 14400: 0x767E, + 14401: 0x9B44, + 14402: 0x5E61, + 14403: 0x6A0A, + 14404: 0x7169, + 14405: 0x71D4, + 14406: 0x756A, + 14407: 0xF964, + 14408: 0x7E41, + 14409: 0x8543, + 14410: 0x85E9, + 14411: 0x98DC, + 14412: 0x4F10, + 14413: 0x7B4F, + 14414: 0x7F70, + 14415: 0x95A5, + 14416: 0x51E1, + 14417: 0x5E06, + 14418: 0x68B5, + 14419: 0x6C3E, + 14420: 0x6C4E, + 14421: 0x6CDB, + 14422: 0x72AF, + 14423: 0x7BC4, + 14424: 0x8303, + 14425: 0x6CD5, + 14426: 0x743A, + 14427: 0x50FB, + 14428: 0x5288, + 14429: 0x58C1, + 14430: 0x64D8, + 14431: 0x6A97, + 14432: 0x74A7, + 14433: 0x7656, + 14434: 0x78A7, + 14435: 0x8617, + 14436: 0x95E2, + 14437: 0x9739, + 14438: 0xF965, + 14439: 0x535E, + 14440: 0x5F01, + 14441: 0x8B8A, + 14442: 0x8FA8, + 14443: 0x8FAF, + 14444: 0x908A, + 14445: 0x5225, + 14446: 0x77A5, + 14447: 0x9C49, + 14448: 0x9F08, + 14449: 0x4E19, + 14450: 0x5002, + 14451: 0x5175, + 14452: 0x5C5B, + 14453: 0x5E77, + 14454: 0x661E, + 14455: 0x663A, + 14456: 0x67C4, + 14457: 0x68C5, + 14458: 0x70B3, + 14459: 0x7501, + 14460: 0x75C5, + 14461: 0x79C9, + 14462: 0x7ADD, + 14463: 0x8F27, + 14464: 0x9920, + 14465: 0x9A08, + 14466: 0x4FDD, + 14467: 0x5821, + 14468: 0x5831, + 14469: 0x5BF6, + 14470: 0x666E, + 14471: 0x6B65, + 14472: 0x6D11, + 14473: 0x6E7A, + 14474: 0x6F7D, + 14475: 0x73E4, + 14476: 0x752B, + 14477: 0x83E9, + 14478: 0x88DC, + 14479: 0x8913, + 14480: 0x8B5C, + 14481: 0x8F14, + 14482: 0x4F0F, + 14483: 0x50D5, + 14484: 0x5310, + 14485: 0x535C, + 14486: 0x5B93, + 14487: 0x5FA9, + 14488: 0x670D, + 14489: 0x798F, + 14490: 0x8179, + 14491: 0x832F, + 14492: 0x8514, + 14493: 0x8907, + 14494: 0x8986, + 14495: 0x8F39, + 14496: 0x8F3B, + 14497: 0x99A5, + 14498: 0x9C12, + 14499: 0x672C, + 14500: 0x4E76, + 14501: 0x4FF8, + 14502: 0x5949, + 14503: 0x5C01, + 14504: 0x5CEF, + 14505: 0x5CF0, + 14506: 0x6367, + 14507: 0x68D2, + 14508: 0x70FD, + 14509: 0x71A2, + 14510: 0x742B, + 14511: 0x7E2B, + 14512: 0x84EC, + 14513: 0x8702, + 14514: 0x9022, + 14515: 0x92D2, + 14516: 0x9CF3, + 14517: 0x4E0D, + 14518: 0x4ED8, + 14519: 0x4FEF, + 14520: 0x5085, + 14521: 0x5256, + 14522: 0x526F, + 14523: 0x5426, + 14524: 0x5490, + 14525: 0x57E0, + 14526: 0x592B, + 14527: 0x5A66, + 14528: 0x5B5A, + 14529: 0x5B75, + 14530: 0x5BCC, + 14531: 0x5E9C, + 14532: 0xF966, + 14533: 0x6276, + 14534: 0x6577, + 14535: 0x65A7, + 14536: 0x6D6E, + 14537: 0x6EA5, + 14538: 0x7236, + 14539: 0x7B26, + 14540: 0x7C3F, + 14541: 0x7F36, + 14542: 0x8150, + 14543: 0x8151, + 14544: 0x819A, + 14545: 0x8240, + 14546: 0x8299, + 14547: 0x83A9, + 14548: 0x8A03, + 14549: 0x8CA0, + 14550: 0x8CE6, + 14551: 0x8CFB, + 14552: 0x8D74, + 14553: 0x8DBA, + 14554: 0x90E8, + 14555: 0x91DC, + 14556: 0x961C, + 14557: 0x9644, + 14558: 0x99D9, + 14559: 0x9CE7, + 14560: 0x5317, + 14561: 0x5206, + 14562: 0x5429, + 14563: 0x5674, + 14564: 0x58B3, + 14565: 0x5954, + 14566: 0x596E, + 14567: 0x5FFF, + 14568: 0x61A4, + 14569: 0x626E, + 14570: 0x6610, + 14571: 0x6C7E, + 14572: 0x711A, + 14573: 0x76C6, + 14574: 0x7C89, + 14575: 0x7CDE, + 14576: 0x7D1B, + 14577: 0x82AC, + 14578: 0x8CC1, + 14579: 0x96F0, + 14580: 0xF967, + 14581: 0x4F5B, + 14582: 0x5F17, + 14583: 0x5F7F, + 14584: 0x62C2, + 14585: 0x5D29, + 14586: 0x670B, + 14587: 0x68DA, + 14588: 0x787C, + 14589: 0x7E43, + 14590: 0x9D6C, + 14591: 0x4E15, + 14592: 0x5099, + 14593: 0x5315, + 14594: 0x532A, + 14595: 0x5351, + 14596: 0x5983, + 14597: 0x5A62, + 14598: 0x5E87, + 14599: 0x60B2, + 14600: 0x618A, + 14601: 0x6249, + 14602: 0x6279, + 14603: 0x6590, + 14604: 0x6787, + 14605: 0x69A7, + 14606: 0x6BD4, + 14607: 0x6BD6, + 14608: 0x6BD7, + 14609: 0x6BD8, + 14610: 0x6CB8, + 14611: 0xF968, + 14612: 0x7435, + 14613: 0x75FA, + 14614: 0x7812, + 14615: 0x7891, + 14616: 0x79D5, + 14617: 0x79D8, + 14618: 0x7C83, + 14619: 0x7DCB, + 14620: 0x7FE1, + 14621: 0x80A5, + 14622: 0x813E, + 14623: 0x81C2, + 14624: 0x83F2, + 14625: 0x871A, + 14626: 0x88E8, + 14627: 0x8AB9, + 14628: 0x8B6C, + 14629: 0x8CBB, + 14630: 0x9119, + 14631: 0x975E, + 14632: 0x98DB, + 14633: 0x9F3B, + 14634: 0x56AC, + 14635: 0x5B2A, + 14636: 0x5F6C, + 14637: 0x658C, + 14638: 0x6AB3, + 14639: 0x6BAF, + 14640: 0x6D5C, + 14641: 0x6FF1, + 14642: 0x7015, + 14643: 0x725D, + 14644: 0x73AD, + 14645: 0x8CA7, + 14646: 0x8CD3, + 14647: 0x983B, + 14648: 0x6191, + 14649: 0x6C37, + 14650: 0x8058, + 14651: 0x9A01, + 14652: 0x4E4D, + 14653: 0x4E8B, + 14654: 0x4E9B, + 14655: 0x4ED5, + 14656: 0x4F3A, + 14657: 0x4F3C, + 14658: 0x4F7F, + 14659: 0x4FDF, + 14660: 0x50FF, + 14661: 0x53F2, + 14662: 0x53F8, + 14663: 0x5506, + 14664: 0x55E3, + 14665: 0x56DB, + 14666: 0x58EB, + 14667: 0x5962, + 14668: 0x5A11, + 14669: 0x5BEB, + 14670: 0x5BFA, + 14671: 0x5C04, + 14672: 0x5DF3, + 14673: 0x5E2B, + 14674: 0x5F99, + 14675: 0x601D, + 14676: 0x6368, + 14677: 0x659C, + 14678: 0x65AF, + 14679: 0x67F6, + 14680: 0x67FB, + 14681: 0x68AD, + 14682: 0x6B7B, + 14683: 0x6C99, + 14684: 0x6CD7, + 14685: 0x6E23, + 14686: 0x7009, + 14687: 0x7345, + 14688: 0x7802, + 14689: 0x793E, + 14690: 0x7940, + 14691: 0x7960, + 14692: 0x79C1, + 14693: 0x7BE9, + 14694: 0x7D17, + 14695: 0x7D72, + 14696: 0x8086, + 14697: 0x820D, + 14698: 0x838E, + 14699: 0x84D1, + 14700: 0x86C7, + 14701: 0x88DF, + 14702: 0x8A50, + 14703: 0x8A5E, + 14704: 0x8B1D, + 14705: 0x8CDC, + 14706: 0x8D66, + 14707: 0x8FAD, + 14708: 0x90AA, + 14709: 0x98FC, + 14710: 0x99DF, + 14711: 0x9E9D, + 14712: 0x524A, + 14713: 0xF969, + 14714: 0x6714, + 14715: 0xF96A, + 14716: 0x5098, + 14717: 0x522A, + 14718: 0x5C71, + 14719: 0x6563, + 14720: 0x6C55, + 14721: 0x73CA, + 14722: 0x7523, + 14723: 0x759D, + 14724: 0x7B97, + 14725: 0x849C, + 14726: 0x9178, + 14727: 0x9730, + 14728: 0x4E77, + 14729: 0x6492, + 14730: 0x6BBA, + 14731: 0x715E, + 14732: 0x85A9, + 14733: 0x4E09, + 14734: 0xF96B, + 14735: 0x6749, + 14736: 0x68EE, + 14737: 0x6E17, + 14738: 0x829F, + 14739: 0x8518, + 14740: 0x886B, + 14741: 0x63F7, + 14742: 0x6F81, + 14743: 0x9212, + 14744: 0x98AF, + 14745: 0x4E0A, + 14746: 0x50B7, + 14747: 0x50CF, + 14748: 0x511F, + 14749: 0x5546, + 14750: 0x55AA, + 14751: 0x5617, + 14752: 0x5B40, + 14753: 0x5C19, + 14754: 0x5CE0, + 14755: 0x5E38, + 14756: 0x5E8A, + 14757: 0x5EA0, + 14758: 0x5EC2, + 14759: 0x60F3, + 14760: 0x6851, + 14761: 0x6A61, + 14762: 0x6E58, + 14763: 0x723D, + 14764: 0x7240, + 14765: 0x72C0, + 14766: 0x76F8, + 14767: 0x7965, + 14768: 0x7BB1, + 14769: 0x7FD4, + 14770: 0x88F3, + 14771: 0x89F4, + 14772: 0x8A73, + 14773: 0x8C61, + 14774: 0x8CDE, + 14775: 0x971C, + 14776: 0x585E, + 14777: 0x74BD, + 14778: 0x8CFD, + 14779: 0x55C7, + 14780: 0xF96C, + 14781: 0x7A61, + 14782: 0x7D22, + 14783: 0x8272, + 14784: 0x7272, + 14785: 0x751F, + 14786: 0x7525, + 14787: 0xF96D, + 14788: 0x7B19, + 14789: 0x5885, + 14790: 0x58FB, + 14791: 0x5DBC, + 14792: 0x5E8F, + 14793: 0x5EB6, + 14794: 0x5F90, + 14795: 0x6055, + 14796: 0x6292, + 14797: 0x637F, + 14798: 0x654D, + 14799: 0x6691, + 14800: 0x66D9, + 14801: 0x66F8, + 14802: 0x6816, + 14803: 0x68F2, + 14804: 0x7280, + 14805: 0x745E, + 14806: 0x7B6E, + 14807: 0x7D6E, + 14808: 0x7DD6, + 14809: 0x7F72, + 14810: 0x80E5, + 14811: 0x8212, + 14812: 0x85AF, + 14813: 0x897F, + 14814: 0x8A93, + 14815: 0x901D, + 14816: 0x92E4, + 14817: 0x9ECD, + 14818: 0x9F20, + 14819: 0x5915, + 14820: 0x596D, + 14821: 0x5E2D, + 14822: 0x60DC, + 14823: 0x6614, + 14824: 0x6673, + 14825: 0x6790, + 14826: 0x6C50, + 14827: 0x6DC5, + 14828: 0x6F5F, + 14829: 0x77F3, + 14830: 0x78A9, + 14831: 0x84C6, + 14832: 0x91CB, + 14833: 0x932B, + 14834: 0x4ED9, + 14835: 0x50CA, + 14836: 0x5148, + 14837: 0x5584, + 14838: 0x5B0B, + 14839: 0x5BA3, + 14840: 0x6247, + 14841: 0x657E, + 14842: 0x65CB, + 14843: 0x6E32, + 14844: 0x717D, + 14845: 0x7401, + 14846: 0x7444, + 14847: 0x7487, + 14848: 0x74BF, + 14849: 0x766C, + 14850: 0x79AA, + 14851: 0x7DDA, + 14852: 0x7E55, + 14853: 0x7FA8, + 14854: 0x817A, + 14855: 0x81B3, + 14856: 0x8239, + 14857: 0x861A, + 14858: 0x87EC, + 14859: 0x8A75, + 14860: 0x8DE3, + 14861: 0x9078, + 14862: 0x9291, + 14863: 0x9425, + 14864: 0x994D, + 14865: 0x9BAE, + 14866: 0x5368, + 14867: 0x5C51, + 14868: 0x6954, + 14869: 0x6CC4, + 14870: 0x6D29, + 14871: 0x6E2B, + 14872: 0x820C, + 14873: 0x859B, + 14874: 0x893B, + 14875: 0x8A2D, + 14876: 0x8AAA, + 14877: 0x96EA, + 14878: 0x9F67, + 14879: 0x5261, + 14880: 0x66B9, + 14881: 0x6BB2, + 14882: 0x7E96, + 14883: 0x87FE, + 14884: 0x8D0D, + 14885: 0x9583, + 14886: 0x965D, + 14887: 0x651D, + 14888: 0x6D89, + 14889: 0x71EE, + 14890: 0xF96E, + 14891: 0x57CE, + 14892: 0x59D3, + 14893: 0x5BAC, + 14894: 0x6027, + 14895: 0x60FA, + 14896: 0x6210, + 14897: 0x661F, + 14898: 0x665F, + 14899: 0x7329, + 14900: 0x73F9, + 14901: 0x76DB, + 14902: 0x7701, + 14903: 0x7B6C, + 14904: 0x8056, + 14905: 0x8072, + 14906: 0x8165, + 14907: 0x8AA0, + 14908: 0x9192, + 14909: 0x4E16, + 14910: 0x52E2, + 14911: 0x6B72, + 14912: 0x6D17, + 14913: 0x7A05, + 14914: 0x7B39, + 14915: 0x7D30, + 14916: 0xF96F, + 14917: 0x8CB0, + 14918: 0x53EC, + 14919: 0x562F, + 14920: 0x5851, + 14921: 0x5BB5, + 14922: 0x5C0F, + 14923: 0x5C11, + 14924: 0x5DE2, + 14925: 0x6240, + 14926: 0x6383, + 14927: 0x6414, + 14928: 0x662D, + 14929: 0x68B3, + 14930: 0x6CBC, + 14931: 0x6D88, + 14932: 0x6EAF, + 14933: 0x701F, + 14934: 0x70A4, + 14935: 0x71D2, + 14936: 0x7526, + 14937: 0x758F, + 14938: 0x758E, + 14939: 0x7619, + 14940: 0x7B11, + 14941: 0x7BE0, + 14942: 0x7C2B, + 14943: 0x7D20, + 14944: 0x7D39, + 14945: 0x852C, + 14946: 0x856D, + 14947: 0x8607, + 14948: 0x8A34, + 14949: 0x900D, + 14950: 0x9061, + 14951: 0x90B5, + 14952: 0x92B7, + 14953: 0x97F6, + 14954: 0x9A37, + 14955: 0x4FD7, + 14956: 0x5C6C, + 14957: 0x675F, + 14958: 0x6D91, + 14959: 0x7C9F, + 14960: 0x7E8C, + 14961: 0x8B16, + 14962: 0x8D16, + 14963: 0x901F, + 14964: 0x5B6B, + 14965: 0x5DFD, + 14966: 0x640D, + 14967: 0x84C0, + 14968: 0x905C, + 14969: 0x98E1, + 14970: 0x7387, + 14971: 0x5B8B, + 14972: 0x609A, + 14973: 0x677E, + 14974: 0x6DDE, + 14975: 0x8A1F, + 14976: 0x8AA6, + 14977: 0x9001, + 14978: 0x980C, + 14979: 0x5237, + 14980: 0xF970, + 14981: 0x7051, + 14982: 0x788E, + 14983: 0x9396, + 14984: 0x8870, + 14985: 0x91D7, + 14986: 0x4FEE, + 14987: 0x53D7, + 14988: 0x55FD, + 14989: 0x56DA, + 14990: 0x5782, + 14991: 0x58FD, + 14992: 0x5AC2, + 14993: 0x5B88, + 14994: 0x5CAB, + 14995: 0x5CC0, + 14996: 0x5E25, + 14997: 0x6101, + 14998: 0x620D, + 14999: 0x624B, + 15000: 0x6388, + 15001: 0x641C, + 15002: 0x6536, + 15003: 0x6578, + 15004: 0x6A39, + 15005: 0x6B8A, + 15006: 0x6C34, + 15007: 0x6D19, + 15008: 0x6F31, + 15009: 0x71E7, + 15010: 0x72E9, + 15011: 0x7378, + 15012: 0x7407, + 15013: 0x74B2, + 15014: 0x7626, + 15015: 0x7761, + 15016: 0x79C0, + 15017: 0x7A57, + 15018: 0x7AEA, + 15019: 0x7CB9, + 15020: 0x7D8F, + 15021: 0x7DAC, + 15022: 0x7E61, + 15023: 0x7F9E, + 15024: 0x8129, + 15025: 0x8331, + 15026: 0x8490, + 15027: 0x84DA, + 15028: 0x85EA, + 15029: 0x8896, + 15030: 0x8AB0, + 15031: 0x8B90, + 15032: 0x8F38, + 15033: 0x9042, + 15034: 0x9083, + 15035: 0x916C, + 15036: 0x9296, + 15037: 0x92B9, + 15038: 0x968B, + 15039: 0x96A7, + 15040: 0x96A8, + 15041: 0x96D6, + 15042: 0x9700, + 15043: 0x9808, + 15044: 0x9996, + 15045: 0x9AD3, + 15046: 0x9B1A, + 15047: 0x53D4, + 15048: 0x587E, + 15049: 0x5919, + 15050: 0x5B70, + 15051: 0x5BBF, + 15052: 0x6DD1, + 15053: 0x6F5A, + 15054: 0x719F, + 15055: 0x7421, + 15056: 0x74B9, + 15057: 0x8085, + 15058: 0x83FD, + 15059: 0x5DE1, + 15060: 0x5F87, + 15061: 0x5FAA, + 15062: 0x6042, + 15063: 0x65EC, + 15064: 0x6812, + 15065: 0x696F, + 15066: 0x6A53, + 15067: 0x6B89, + 15068: 0x6D35, + 15069: 0x6DF3, + 15070: 0x73E3, + 15071: 0x76FE, + 15072: 0x77AC, + 15073: 0x7B4D, + 15074: 0x7D14, + 15075: 0x8123, + 15076: 0x821C, + 15077: 0x8340, + 15078: 0x84F4, + 15079: 0x8563, + 15080: 0x8A62, + 15081: 0x8AC4, + 15082: 0x9187, + 15083: 0x931E, + 15084: 0x9806, + 15085: 0x99B4, + 15086: 0x620C, + 15087: 0x8853, + 15088: 0x8FF0, + 15089: 0x9265, + 15090: 0x5D07, + 15091: 0x5D27, + 15092: 0x5D69, + 15093: 0x745F, + 15094: 0x819D, + 15095: 0x8768, + 15096: 0x6FD5, + 15097: 0x62FE, + 15098: 0x7FD2, + 15099: 0x8936, + 15100: 0x8972, + 15101: 0x4E1E, + 15102: 0x4E58, + 15103: 0x50E7, + 15104: 0x52DD, + 15105: 0x5347, + 15106: 0x627F, + 15107: 0x6607, + 15108: 0x7E69, + 15109: 0x8805, + 15110: 0x965E, + 15111: 0x4F8D, + 15112: 0x5319, + 15113: 0x5636, + 15114: 0x59CB, + 15115: 0x5AA4, + 15116: 0x5C38, + 15117: 0x5C4E, + 15118: 0x5C4D, + 15119: 0x5E02, + 15120: 0x5F11, + 15121: 0x6043, + 15122: 0x65BD, + 15123: 0x662F, + 15124: 0x6642, + 15125: 0x67BE, + 15126: 0x67F4, + 15127: 0x731C, + 15128: 0x77E2, + 15129: 0x793A, + 15130: 0x7FC5, + 15131: 0x8494, + 15132: 0x84CD, + 15133: 0x8996, + 15134: 0x8A66, + 15135: 0x8A69, + 15136: 0x8AE1, + 15137: 0x8C55, + 15138: 0x8C7A, + 15139: 0x57F4, + 15140: 0x5BD4, + 15141: 0x5F0F, + 15142: 0x606F, + 15143: 0x62ED, + 15144: 0x690D, + 15145: 0x6B96, + 15146: 0x6E5C, + 15147: 0x7184, + 15148: 0x7BD2, + 15149: 0x8755, + 15150: 0x8B58, + 15151: 0x8EFE, + 15152: 0x98DF, + 15153: 0x98FE, + 15154: 0x4F38, + 15155: 0x4F81, + 15156: 0x4FE1, + 15157: 0x547B, + 15158: 0x5A20, + 15159: 0x5BB8, + 15160: 0x613C, + 15161: 0x65B0, + 15162: 0x6668, + 15163: 0x71FC, + 15164: 0x7533, + 15165: 0x795E, + 15166: 0x7D33, + 15167: 0x814E, + 15168: 0x81E3, + 15169: 0x8398, + 15170: 0x85AA, + 15171: 0x85CE, + 15172: 0x8703, + 15173: 0x8A0A, + 15174: 0x8EAB, + 15175: 0x8F9B, + 15176: 0xF971, + 15177: 0x8FC5, + 15178: 0x5931, + 15179: 0x5BA4, + 15180: 0x5BE6, + 15181: 0x6089, + 15182: 0x5BE9, + 15183: 0x5C0B, + 15184: 0x5FC3, + 15185: 0x6C81, + 15186: 0xF972, + 15187: 0x6DF1, + 15188: 0x700B, + 15189: 0x751A, + 15190: 0x82AF, + 15191: 0x8AF6, + 15192: 0x4EC0, + 15193: 0x5341, + 15194: 0xF973, + 15195: 0x96D9, + 15196: 0x6C0F, + 15197: 0x4E9E, + 15198: 0x4FC4, + 15199: 0x5152, + 15200: 0x555E, + 15201: 0x5A25, + 15202: 0x5CE8, + 15203: 0x6211, + 15204: 0x7259, + 15205: 0x82BD, + 15206: 0x83AA, + 15207: 0x86FE, + 15208: 0x8859, + 15209: 0x8A1D, + 15210: 0x963F, + 15211: 0x96C5, + 15212: 0x9913, + 15213: 0x9D09, + 15214: 0x9D5D, + 15215: 0x580A, + 15216: 0x5CB3, + 15217: 0x5DBD, + 15218: 0x5E44, + 15219: 0x60E1, + 15220: 0x6115, + 15221: 0x63E1, + 15222: 0x6A02, + 15223: 0x6E25, + 15224: 0x9102, + 15225: 0x9354, + 15226: 0x984E, + 15227: 0x9C10, + 15228: 0x9F77, + 15229: 0x5B89, + 15230: 0x5CB8, + 15231: 0x6309, + 15232: 0x664F, + 15233: 0x6848, + 15234: 0x773C, + 15235: 0x96C1, + 15236: 0x978D, + 15237: 0x9854, + 15238: 0x9B9F, + 15239: 0x65A1, + 15240: 0x8B01, + 15241: 0x8ECB, + 15242: 0x95BC, + 15243: 0x5535, + 15244: 0x5CA9, + 15245: 0x5DD6, + 15246: 0x5EB5, + 15247: 0x6697, + 15248: 0x764C, + 15249: 0x83F4, + 15250: 0x95C7, + 15251: 0x58D3, + 15252: 0x62BC, + 15253: 0x72CE, + 15254: 0x9D28, + 15255: 0x4EF0, + 15256: 0x592E, + 15257: 0x600F, + 15258: 0x663B, + 15259: 0x6B83, + 15260: 0x79E7, + 15261: 0x9D26, + 15262: 0x5393, + 15263: 0x54C0, + 15264: 0x57C3, + 15265: 0x5D16, + 15266: 0x611B, + 15267: 0x66D6, + 15268: 0x6DAF, + 15269: 0x788D, + 15270: 0x827E, + 15271: 0x9698, + 15272: 0x9744, + 15273: 0x5384, + 15274: 0x627C, + 15275: 0x6396, + 15276: 0x6DB2, + 15277: 0x7E0A, + 15278: 0x814B, + 15279: 0x984D, + 15280: 0x6AFB, + 15281: 0x7F4C, + 15282: 0x9DAF, + 15283: 0x9E1A, + 15284: 0x4E5F, + 15285: 0x503B, + 15286: 0x51B6, + 15287: 0x591C, + 15288: 0x60F9, + 15289: 0x63F6, + 15290: 0x6930, + 15291: 0x723A, + 15292: 0x8036, + 15293: 0xF974, + 15294: 0x91CE, + 15295: 0x5F31, + 15296: 0xF975, + 15297: 0xF976, + 15298: 0x7D04, + 15299: 0x82E5, + 15300: 0x846F, + 15301: 0x84BB, + 15302: 0x85E5, + 15303: 0x8E8D, + 15304: 0xF977, + 15305: 0x4F6F, + 15306: 0xF978, + 15307: 0xF979, + 15308: 0x58E4, + 15309: 0x5B43, + 15310: 0x6059, + 15311: 0x63DA, + 15312: 0x6518, + 15313: 0x656D, + 15314: 0x6698, + 15315: 0xF97A, + 15316: 0x694A, + 15317: 0x6A23, + 15318: 0x6D0B, + 15319: 0x7001, + 15320: 0x716C, + 15321: 0x75D2, + 15322: 0x760D, + 15323: 0x79B3, + 15324: 0x7A70, + 15325: 0xF97B, + 15326: 0x7F8A, + 15327: 0xF97C, + 15328: 0x8944, + 15329: 0xF97D, + 15330: 0x8B93, + 15331: 0x91C0, + 15332: 0x967D, + 15333: 0xF97E, + 15334: 0x990A, + 15335: 0x5704, + 15336: 0x5FA1, + 15337: 0x65BC, + 15338: 0x6F01, + 15339: 0x7600, + 15340: 0x79A6, + 15341: 0x8A9E, + 15342: 0x99AD, + 15343: 0x9B5A, + 15344: 0x9F6C, + 15345: 0x5104, + 15346: 0x61B6, + 15347: 0x6291, + 15348: 0x6A8D, + 15349: 0x81C6, + 15350: 0x5043, + 15351: 0x5830, + 15352: 0x5F66, + 15353: 0x7109, + 15354: 0x8A00, + 15355: 0x8AFA, + 15356: 0x5B7C, + 15357: 0x8616, + 15358: 0x4FFA, + 15359: 0x513C, + 15360: 0x56B4, + 15361: 0x5944, + 15362: 0x63A9, + 15363: 0x6DF9, + 15364: 0x5DAA, + 15365: 0x696D, + 15366: 0x5186, + 15367: 0x4E88, + 15368: 0x4F59, + 15369: 0xF97F, + 15370: 0xF980, + 15371: 0xF981, + 15372: 0x5982, + 15373: 0xF982, + 15374: 0xF983, + 15375: 0x6B5F, + 15376: 0x6C5D, + 15377: 0xF984, + 15378: 0x74B5, + 15379: 0x7916, + 15380: 0xF985, + 15381: 0x8207, + 15382: 0x8245, + 15383: 0x8339, + 15384: 0x8F3F, + 15385: 0x8F5D, + 15386: 0xF986, + 15387: 0x9918, + 15388: 0xF987, + 15389: 0xF988, + 15390: 0xF989, + 15391: 0x4EA6, + 15392: 0xF98A, + 15393: 0x57DF, + 15394: 0x5F79, + 15395: 0x6613, + 15396: 0xF98B, + 15397: 0xF98C, + 15398: 0x75AB, + 15399: 0x7E79, + 15400: 0x8B6F, + 15401: 0xF98D, + 15402: 0x9006, + 15403: 0x9A5B, + 15404: 0x56A5, + 15405: 0x5827, + 15406: 0x59F8, + 15407: 0x5A1F, + 15408: 0x5BB4, + 15409: 0xF98E, + 15410: 0x5EF6, + 15411: 0xF98F, + 15412: 0xF990, + 15413: 0x6350, + 15414: 0x633B, + 15415: 0xF991, + 15416: 0x693D, + 15417: 0x6C87, + 15418: 0x6CBF, + 15419: 0x6D8E, + 15420: 0x6D93, + 15421: 0x6DF5, + 15422: 0x6F14, + 15423: 0xF992, + 15424: 0x70DF, + 15425: 0x7136, + 15426: 0x7159, + 15427: 0xF993, + 15428: 0x71C3, + 15429: 0x71D5, + 15430: 0xF994, + 15431: 0x784F, + 15432: 0x786F, + 15433: 0xF995, + 15434: 0x7B75, + 15435: 0x7DE3, + 15436: 0xF996, + 15437: 0x7E2F, + 15438: 0xF997, + 15439: 0x884D, + 15440: 0x8EDF, + 15441: 0xF998, + 15442: 0xF999, + 15443: 0xF99A, + 15444: 0x925B, + 15445: 0xF99B, + 15446: 0x9CF6, + 15447: 0xF99C, + 15448: 0xF99D, + 15449: 0xF99E, + 15450: 0x6085, + 15451: 0x6D85, + 15452: 0xF99F, + 15453: 0x71B1, + 15454: 0xF9A0, + 15455: 0xF9A1, + 15456: 0x95B1, + 15457: 0x53AD, + 15458: 0xF9A2, + 15459: 0xF9A3, + 15460: 0xF9A4, + 15461: 0x67D3, + 15462: 0xF9A5, + 15463: 0x708E, + 15464: 0x7130, + 15465: 0x7430, + 15466: 0x8276, + 15467: 0x82D2, + 15468: 0xF9A6, + 15469: 0x95BB, + 15470: 0x9AE5, + 15471: 0x9E7D, + 15472: 0x66C4, + 15473: 0xF9A7, + 15474: 0x71C1, + 15475: 0x8449, + 15476: 0xF9A8, + 15477: 0xF9A9, + 15478: 0x584B, + 15479: 0xF9AA, + 15480: 0xF9AB, + 15481: 0x5DB8, + 15482: 0x5F71, + 15483: 0xF9AC, + 15484: 0x6620, + 15485: 0x668E, + 15486: 0x6979, + 15487: 0x69AE, + 15488: 0x6C38, + 15489: 0x6CF3, + 15490: 0x6E36, + 15491: 0x6F41, + 15492: 0x6FDA, + 15493: 0x701B, + 15494: 0x702F, + 15495: 0x7150, + 15496: 0x71DF, + 15497: 0x7370, + 15498: 0xF9AD, + 15499: 0x745B, + 15500: 0xF9AE, + 15501: 0x74D4, + 15502: 0x76C8, + 15503: 0x7A4E, + 15504: 0x7E93, + 15505: 0xF9AF, + 15506: 0xF9B0, + 15507: 0x82F1, + 15508: 0x8A60, + 15509: 0x8FCE, + 15510: 0xF9B1, + 15511: 0x9348, + 15512: 0xF9B2, + 15513: 0x9719, + 15514: 0xF9B3, + 15515: 0xF9B4, + 15516: 0x4E42, + 15517: 0x502A, + 15518: 0xF9B5, + 15519: 0x5208, + 15520: 0x53E1, + 15521: 0x66F3, + 15522: 0x6C6D, + 15523: 0x6FCA, + 15524: 0x730A, + 15525: 0x777F, + 15526: 0x7A62, + 15527: 0x82AE, + 15528: 0x85DD, + 15529: 0x8602, + 15530: 0xF9B6, + 15531: 0x88D4, + 15532: 0x8A63, + 15533: 0x8B7D, + 15534: 0x8C6B, + 15535: 0xF9B7, + 15536: 0x92B3, + 15537: 0xF9B8, + 15538: 0x9713, + 15539: 0x9810, + 15540: 0x4E94, + 15541: 0x4F0D, + 15542: 0x4FC9, + 15543: 0x50B2, + 15544: 0x5348, + 15545: 0x543E, + 15546: 0x5433, + 15547: 0x55DA, + 15548: 0x5862, + 15549: 0x58BA, + 15550: 0x5967, + 15551: 0x5A1B, + 15552: 0x5BE4, + 15553: 0x609F, + 15554: 0xF9B9, + 15555: 0x61CA, + 15556: 0x6556, + 15557: 0x65FF, + 15558: 0x6664, + 15559: 0x68A7, + 15560: 0x6C5A, + 15561: 0x6FB3, + 15562: 0x70CF, + 15563: 0x71AC, + 15564: 0x7352, + 15565: 0x7B7D, + 15566: 0x8708, + 15567: 0x8AA4, + 15568: 0x9C32, + 15569: 0x9F07, + 15570: 0x5C4B, + 15571: 0x6C83, + 15572: 0x7344, + 15573: 0x7389, + 15574: 0x923A, + 15575: 0x6EAB, + 15576: 0x7465, + 15577: 0x761F, + 15578: 0x7A69, + 15579: 0x7E15, + 15580: 0x860A, + 15581: 0x5140, + 15582: 0x58C5, + 15583: 0x64C1, + 15584: 0x74EE, + 15585: 0x7515, + 15586: 0x7670, + 15587: 0x7FC1, + 15588: 0x9095, + 15589: 0x96CD, + 15590: 0x9954, + 15591: 0x6E26, + 15592: 0x74E6, + 15593: 0x7AA9, + 15594: 0x7AAA, + 15595: 0x81E5, + 15596: 0x86D9, + 15597: 0x8778, + 15598: 0x8A1B, + 15599: 0x5A49, + 15600: 0x5B8C, + 15601: 0x5B9B, + 15602: 0x68A1, + 15603: 0x6900, + 15604: 0x6D63, + 15605: 0x73A9, + 15606: 0x7413, + 15607: 0x742C, + 15608: 0x7897, + 15609: 0x7DE9, + 15610: 0x7FEB, + 15611: 0x8118, + 15612: 0x8155, + 15613: 0x839E, + 15614: 0x8C4C, + 15615: 0x962E, + 15616: 0x9811, + 15617: 0x66F0, + 15618: 0x5F80, + 15619: 0x65FA, + 15620: 0x6789, + 15621: 0x6C6A, + 15622: 0x738B, + 15623: 0x502D, + 15624: 0x5A03, + 15625: 0x6B6A, + 15626: 0x77EE, + 15627: 0x5916, + 15628: 0x5D6C, + 15629: 0x5DCD, + 15630: 0x7325, + 15631: 0x754F, + 15632: 0xF9BA, + 15633: 0xF9BB, + 15634: 0x50E5, + 15635: 0x51F9, + 15636: 0x582F, + 15637: 0x592D, + 15638: 0x5996, + 15639: 0x59DA, + 15640: 0x5BE5, + 15641: 0xF9BC, + 15642: 0xF9BD, + 15643: 0x5DA2, + 15644: 0x62D7, + 15645: 0x6416, + 15646: 0x6493, + 15647: 0x64FE, + 15648: 0xF9BE, + 15649: 0x66DC, + 15650: 0xF9BF, + 15651: 0x6A48, + 15652: 0xF9C0, + 15653: 0x71FF, + 15654: 0x7464, + 15655: 0xF9C1, + 15656: 0x7A88, + 15657: 0x7AAF, + 15658: 0x7E47, + 15659: 0x7E5E, + 15660: 0x8000, + 15661: 0x8170, + 15662: 0xF9C2, + 15663: 0x87EF, + 15664: 0x8981, + 15665: 0x8B20, + 15666: 0x9059, + 15667: 0xF9C3, + 15668: 0x9080, + 15669: 0x9952, + 15670: 0x617E, + 15671: 0x6B32, + 15672: 0x6D74, + 15673: 0x7E1F, + 15674: 0x8925, + 15675: 0x8FB1, + 15676: 0x4FD1, + 15677: 0x50AD, + 15678: 0x5197, + 15679: 0x52C7, + 15680: 0x57C7, + 15681: 0x5889, + 15682: 0x5BB9, + 15683: 0x5EB8, + 15684: 0x6142, + 15685: 0x6995, + 15686: 0x6D8C, + 15687: 0x6E67, + 15688: 0x6EB6, + 15689: 0x7194, + 15690: 0x7462, + 15691: 0x7528, + 15692: 0x752C, + 15693: 0x8073, + 15694: 0x8338, + 15695: 0x84C9, + 15696: 0x8E0A, + 15697: 0x9394, + 15698: 0x93DE, + 15699: 0xF9C4, + 15700: 0x4E8E, + 15701: 0x4F51, + 15702: 0x5076, + 15703: 0x512A, + 15704: 0x53C8, + 15705: 0x53CB, + 15706: 0x53F3, + 15707: 0x5B87, + 15708: 0x5BD3, + 15709: 0x5C24, + 15710: 0x611A, + 15711: 0x6182, + 15712: 0x65F4, + 15713: 0x725B, + 15714: 0x7397, + 15715: 0x7440, + 15716: 0x76C2, + 15717: 0x7950, + 15718: 0x7991, + 15719: 0x79B9, + 15720: 0x7D06, + 15721: 0x7FBD, + 15722: 0x828B, + 15723: 0x85D5, + 15724: 0x865E, + 15725: 0x8FC2, + 15726: 0x9047, + 15727: 0x90F5, + 15728: 0x91EA, + 15729: 0x9685, + 15730: 0x96E8, + 15731: 0x96E9, + 15732: 0x52D6, + 15733: 0x5F67, + 15734: 0x65ED, + 15735: 0x6631, + 15736: 0x682F, + 15737: 0x715C, + 15738: 0x7A36, + 15739: 0x90C1, + 15740: 0x980A, + 15741: 0x4E91, + 15742: 0xF9C5, + 15743: 0x6A52, + 15744: 0x6B9E, + 15745: 0x6F90, + 15746: 0x7189, + 15747: 0x8018, + 15748: 0x82B8, + 15749: 0x8553, + 15750: 0x904B, + 15751: 0x9695, + 15752: 0x96F2, + 15753: 0x97FB, + 15754: 0x851A, + 15755: 0x9B31, + 15756: 0x4E90, + 15757: 0x718A, + 15758: 0x96C4, + 15759: 0x5143, + 15760: 0x539F, + 15761: 0x54E1, + 15762: 0x5713, + 15763: 0x5712, + 15764: 0x57A3, + 15765: 0x5A9B, + 15766: 0x5AC4, + 15767: 0x5BC3, + 15768: 0x6028, + 15769: 0x613F, + 15770: 0x63F4, + 15771: 0x6C85, + 15772: 0x6D39, + 15773: 0x6E72, + 15774: 0x6E90, + 15775: 0x7230, + 15776: 0x733F, + 15777: 0x7457, + 15778: 0x82D1, + 15779: 0x8881, + 15780: 0x8F45, + 15781: 0x9060, + 15782: 0xF9C6, + 15783: 0x9662, + 15784: 0x9858, + 15785: 0x9D1B, + 15786: 0x6708, + 15787: 0x8D8A, + 15788: 0x925E, + 15789: 0x4F4D, + 15790: 0x5049, + 15791: 0x50DE, + 15792: 0x5371, + 15793: 0x570D, + 15794: 0x59D4, + 15795: 0x5A01, + 15796: 0x5C09, + 15797: 0x6170, + 15798: 0x6690, + 15799: 0x6E2D, + 15800: 0x7232, + 15801: 0x744B, + 15802: 0x7DEF, + 15803: 0x80C3, + 15804: 0x840E, + 15805: 0x8466, + 15806: 0x853F, + 15807: 0x875F, + 15808: 0x885B, + 15809: 0x8918, + 15810: 0x8B02, + 15811: 0x9055, + 15812: 0x97CB, + 15813: 0x9B4F, + 15814: 0x4E73, + 15815: 0x4F91, + 15816: 0x5112, + 15817: 0x516A, + 15818: 0xF9C7, + 15819: 0x552F, + 15820: 0x55A9, + 15821: 0x5B7A, + 15822: 0x5BA5, + 15823: 0x5E7C, + 15824: 0x5E7D, + 15825: 0x5EBE, + 15826: 0x60A0, + 15827: 0x60DF, + 15828: 0x6108, + 15829: 0x6109, + 15830: 0x63C4, + 15831: 0x6538, + 15832: 0x6709, + 15833: 0xF9C8, + 15834: 0x67D4, + 15835: 0x67DA, + 15836: 0xF9C9, + 15837: 0x6961, + 15838: 0x6962, + 15839: 0x6CB9, + 15840: 0x6D27, + 15841: 0xF9CA, + 15842: 0x6E38, + 15843: 0xF9CB, + 15844: 0x6FE1, + 15845: 0x7336, + 15846: 0x7337, + 15847: 0xF9CC, + 15848: 0x745C, + 15849: 0x7531, + 15850: 0xF9CD, + 15851: 0x7652, + 15852: 0xF9CE, + 15853: 0xF9CF, + 15854: 0x7DAD, + 15855: 0x81FE, + 15856: 0x8438, + 15857: 0x88D5, + 15858: 0x8A98, + 15859: 0x8ADB, + 15860: 0x8AED, + 15861: 0x8E30, + 15862: 0x8E42, + 15863: 0x904A, + 15864: 0x903E, + 15865: 0x907A, + 15866: 0x9149, + 15867: 0x91C9, + 15868: 0x936E, + 15869: 0xF9D0, + 15870: 0xF9D1, + 15871: 0x5809, + 15872: 0xF9D2, + 15873: 0x6BD3, + 15874: 0x8089, + 15875: 0x80B2, + 15876: 0xF9D3, + 15877: 0xF9D4, + 15878: 0x5141, + 15879: 0x596B, + 15880: 0x5C39, + 15881: 0xF9D5, + 15882: 0xF9D6, + 15883: 0x6F64, + 15884: 0x73A7, + 15885: 0x80E4, + 15886: 0x8D07, + 15887: 0xF9D7, + 15888: 0x9217, + 15889: 0x958F, + 15890: 0xF9D8, + 15891: 0xF9D9, + 15892: 0xF9DA, + 15893: 0xF9DB, + 15894: 0x807F, + 15895: 0x620E, + 15896: 0x701C, + 15897: 0x7D68, + 15898: 0x878D, + 15899: 0xF9DC, + 15900: 0x57A0, + 15901: 0x6069, + 15902: 0x6147, + 15903: 0x6BB7, + 15904: 0x8ABE, + 15905: 0x9280, + 15906: 0x96B1, + 15907: 0x4E59, + 15908: 0x541F, + 15909: 0x6DEB, + 15910: 0x852D, + 15911: 0x9670, + 15912: 0x97F3, + 15913: 0x98EE, + 15914: 0x63D6, + 15915: 0x6CE3, + 15916: 0x9091, + 15917: 0x51DD, + 15918: 0x61C9, + 15919: 0x81BA, + 15920: 0x9DF9, + 15921: 0x4F9D, + 15922: 0x501A, + 15923: 0x5100, + 15924: 0x5B9C, + 15925: 0x610F, + 15926: 0x61FF, + 15927: 0x64EC, + 15928: 0x6905, + 15929: 0x6BC5, + 15930: 0x7591, + 15931: 0x77E3, + 15932: 0x7FA9, + 15933: 0x8264, + 15934: 0x858F, + 15935: 0x87FB, + 15936: 0x8863, + 15937: 0x8ABC, + 15938: 0x8B70, + 15939: 0x91AB, + 15940: 0x4E8C, + 15941: 0x4EE5, + 15942: 0x4F0A, + 15943: 0xF9DD, + 15944: 0xF9DE, + 15945: 0x5937, + 15946: 0x59E8, + 15947: 0xF9DF, + 15948: 0x5DF2, + 15949: 0x5F1B, + 15950: 0x5F5B, + 15951: 0x6021, + 15952: 0xF9E0, + 15953: 0xF9E1, + 15954: 0xF9E2, + 15955: 0xF9E3, + 15956: 0x723E, + 15957: 0x73E5, + 15958: 0xF9E4, + 15959: 0x7570, + 15960: 0x75CD, + 15961: 0xF9E5, + 15962: 0x79FB, + 15963: 0xF9E6, + 15964: 0x800C, + 15965: 0x8033, + 15966: 0x8084, + 15967: 0x82E1, + 15968: 0x8351, + 15969: 0xF9E7, + 15970: 0xF9E8, + 15971: 0x8CBD, + 15972: 0x8CB3, + 15973: 0x9087, + 15974: 0xF9E9, + 15975: 0xF9EA, + 15976: 0x98F4, + 15977: 0x990C, + 15978: 0xF9EB, + 15979: 0xF9EC, + 15980: 0x7037, + 15981: 0x76CA, + 15982: 0x7FCA, + 15983: 0x7FCC, + 15984: 0x7FFC, + 15985: 0x8B1A, + 15986: 0x4EBA, + 15987: 0x4EC1, + 15988: 0x5203, + 15989: 0x5370, + 15990: 0xF9ED, + 15991: 0x54BD, + 15992: 0x56E0, + 15993: 0x59FB, + 15994: 0x5BC5, + 15995: 0x5F15, + 15996: 0x5FCD, + 15997: 0x6E6E, + 15998: 0xF9EE, + 15999: 0xF9EF, + 16000: 0x7D6A, + 16001: 0x8335, + 16002: 0xF9F0, + 16003: 0x8693, + 16004: 0x8A8D, + 16005: 0xF9F1, + 16006: 0x976D, + 16007: 0x9777, + 16008: 0xF9F2, + 16009: 0xF9F3, + 16010: 0x4E00, + 16011: 0x4F5A, + 16012: 0x4F7E, + 16013: 0x58F9, + 16014: 0x65E5, + 16015: 0x6EA2, + 16016: 0x9038, + 16017: 0x93B0, + 16018: 0x99B9, + 16019: 0x4EFB, + 16020: 0x58EC, + 16021: 0x598A, + 16022: 0x59D9, + 16023: 0x6041, + 16024: 0xF9F4, + 16025: 0xF9F5, + 16026: 0x7A14, + 16027: 0xF9F6, + 16028: 0x834F, + 16029: 0x8CC3, + 16030: 0x5165, + 16031: 0x5344, + 16032: 0xF9F7, + 16033: 0xF9F8, + 16034: 0xF9F9, + 16035: 0x4ECD, + 16036: 0x5269, + 16037: 0x5B55, + 16038: 0x82BF, + 16039: 0x4ED4, + 16040: 0x523A, + 16041: 0x54A8, + 16042: 0x59C9, + 16043: 0x59FF, + 16044: 0x5B50, + 16045: 0x5B57, + 16046: 0x5B5C, + 16047: 0x6063, + 16048: 0x6148, + 16049: 0x6ECB, + 16050: 0x7099, + 16051: 0x716E, + 16052: 0x7386, + 16053: 0x74F7, + 16054: 0x75B5, + 16055: 0x78C1, + 16056: 0x7D2B, + 16057: 0x8005, + 16058: 0x81EA, + 16059: 0x8328, + 16060: 0x8517, + 16061: 0x85C9, + 16062: 0x8AEE, + 16063: 0x8CC7, + 16064: 0x96CC, + 16065: 0x4F5C, + 16066: 0x52FA, + 16067: 0x56BC, + 16068: 0x65AB, + 16069: 0x6628, + 16070: 0x707C, + 16071: 0x70B8, + 16072: 0x7235, + 16073: 0x7DBD, + 16074: 0x828D, + 16075: 0x914C, + 16076: 0x96C0, + 16077: 0x9D72, + 16078: 0x5B71, + 16079: 0x68E7, + 16080: 0x6B98, + 16081: 0x6F7A, + 16082: 0x76DE, + 16083: 0x5C91, + 16084: 0x66AB, + 16085: 0x6F5B, + 16086: 0x7BB4, + 16087: 0x7C2A, + 16088: 0x8836, + 16089: 0x96DC, + 16090: 0x4E08, + 16091: 0x4ED7, + 16092: 0x5320, + 16093: 0x5834, + 16094: 0x58BB, + 16095: 0x58EF, + 16096: 0x596C, + 16097: 0x5C07, + 16098: 0x5E33, + 16099: 0x5E84, + 16100: 0x5F35, + 16101: 0x638C, + 16102: 0x66B2, + 16103: 0x6756, + 16104: 0x6A1F, + 16105: 0x6AA3, + 16106: 0x6B0C, + 16107: 0x6F3F, + 16108: 0x7246, + 16109: 0xF9FA, + 16110: 0x7350, + 16111: 0x748B, + 16112: 0x7AE0, + 16113: 0x7CA7, + 16114: 0x8178, + 16115: 0x81DF, + 16116: 0x81E7, + 16117: 0x838A, + 16118: 0x846C, + 16119: 0x8523, + 16120: 0x8594, + 16121: 0x85CF, + 16122: 0x88DD, + 16123: 0x8D13, + 16124: 0x91AC, + 16125: 0x9577, + 16126: 0x969C, + 16127: 0x518D, + 16128: 0x54C9, + 16129: 0x5728, + 16130: 0x5BB0, + 16131: 0x624D, + 16132: 0x6750, + 16133: 0x683D, + 16134: 0x6893, + 16135: 0x6E3D, + 16136: 0x6ED3, + 16137: 0x707D, + 16138: 0x7E21, + 16139: 0x88C1, + 16140: 0x8CA1, + 16141: 0x8F09, + 16142: 0x9F4B, + 16143: 0x9F4E, + 16144: 0x722D, + 16145: 0x7B8F, + 16146: 0x8ACD, + 16147: 0x931A, + 16148: 0x4F47, + 16149: 0x4F4E, + 16150: 0x5132, + 16151: 0x5480, + 16152: 0x59D0, + 16153: 0x5E95, + 16154: 0x62B5, + 16155: 0x6775, + 16156: 0x696E, + 16157: 0x6A17, + 16158: 0x6CAE, + 16159: 0x6E1A, + 16160: 0x72D9, + 16161: 0x732A, + 16162: 0x75BD, + 16163: 0x7BB8, + 16164: 0x7D35, + 16165: 0x82E7, + 16166: 0x83F9, + 16167: 0x8457, + 16168: 0x85F7, + 16169: 0x8A5B, + 16170: 0x8CAF, + 16171: 0x8E87, + 16172: 0x9019, + 16173: 0x90B8, + 16174: 0x96CE, + 16175: 0x9F5F, + 16176: 0x52E3, + 16177: 0x540A, + 16178: 0x5AE1, + 16179: 0x5BC2, + 16180: 0x6458, + 16181: 0x6575, + 16182: 0x6EF4, + 16183: 0x72C4, + 16184: 0xF9FB, + 16185: 0x7684, + 16186: 0x7A4D, + 16187: 0x7B1B, + 16188: 0x7C4D, + 16189: 0x7E3E, + 16190: 0x7FDF, + 16191: 0x837B, + 16192: 0x8B2B, + 16193: 0x8CCA, + 16194: 0x8D64, + 16195: 0x8DE1, + 16196: 0x8E5F, + 16197: 0x8FEA, + 16198: 0x8FF9, + 16199: 0x9069, + 16200: 0x93D1, + 16201: 0x4F43, + 16202: 0x4F7A, + 16203: 0x50B3, + 16204: 0x5168, + 16205: 0x5178, + 16206: 0x524D, + 16207: 0x526A, + 16208: 0x5861, + 16209: 0x587C, + 16210: 0x5960, + 16211: 0x5C08, + 16212: 0x5C55, + 16213: 0x5EDB, + 16214: 0x609B, + 16215: 0x6230, + 16216: 0x6813, + 16217: 0x6BBF, + 16218: 0x6C08, + 16219: 0x6FB1, + 16220: 0x714E, + 16221: 0x7420, + 16222: 0x7530, + 16223: 0x7538, + 16224: 0x7551, + 16225: 0x7672, + 16226: 0x7B4C, + 16227: 0x7B8B, + 16228: 0x7BAD, + 16229: 0x7BC6, + 16230: 0x7E8F, + 16231: 0x8A6E, + 16232: 0x8F3E, + 16233: 0x8F49, + 16234: 0x923F, + 16235: 0x9293, + 16236: 0x9322, + 16237: 0x942B, + 16238: 0x96FB, + 16239: 0x985A, + 16240: 0x986B, + 16241: 0x991E, + 16242: 0x5207, + 16243: 0x622A, + 16244: 0x6298, + 16245: 0x6D59, + 16246: 0x7664, + 16247: 0x7ACA, + 16248: 0x7BC0, + 16249: 0x7D76, + 16250: 0x5360, + 16251: 0x5CBE, + 16252: 0x5E97, + 16253: 0x6F38, + 16254: 0x70B9, + 16255: 0x7C98, + 16256: 0x9711, + 16257: 0x9B8E, + 16258: 0x9EDE, + 16259: 0x63A5, + 16260: 0x647A, + 16261: 0x8776, + 16262: 0x4E01, + 16263: 0x4E95, + 16264: 0x4EAD, + 16265: 0x505C, + 16266: 0x5075, + 16267: 0x5448, + 16268: 0x59C3, + 16269: 0x5B9A, + 16270: 0x5E40, + 16271: 0x5EAD, + 16272: 0x5EF7, + 16273: 0x5F81, + 16274: 0x60C5, + 16275: 0x633A, + 16276: 0x653F, + 16277: 0x6574, + 16278: 0x65CC, + 16279: 0x6676, + 16280: 0x6678, + 16281: 0x67FE, + 16282: 0x6968, + 16283: 0x6A89, + 16284: 0x6B63, + 16285: 0x6C40, + 16286: 0x6DC0, + 16287: 0x6DE8, + 16288: 0x6E1F, + 16289: 0x6E5E, + 16290: 0x701E, + 16291: 0x70A1, + 16292: 0x738E, + 16293: 0x73FD, + 16294: 0x753A, + 16295: 0x775B, + 16296: 0x7887, + 16297: 0x798E, + 16298: 0x7A0B, + 16299: 0x7A7D, + 16300: 0x7CBE, + 16301: 0x7D8E, + 16302: 0x8247, + 16303: 0x8A02, + 16304: 0x8AEA, + 16305: 0x8C9E, + 16306: 0x912D, + 16307: 0x914A, + 16308: 0x91D8, + 16309: 0x9266, + 16310: 0x92CC, + 16311: 0x9320, + 16312: 0x9706, + 16313: 0x9756, + 16314: 0x975C, + 16315: 0x9802, + 16316: 0x9F0E, + 16317: 0x5236, + 16318: 0x5291, + 16319: 0x557C, + 16320: 0x5824, + 16321: 0x5E1D, + 16322: 0x5F1F, + 16323: 0x608C, + 16324: 0x63D0, + 16325: 0x68AF, + 16326: 0x6FDF, + 16327: 0x796D, + 16328: 0x7B2C, + 16329: 0x81CD, + 16330: 0x85BA, + 16331: 0x88FD, + 16332: 0x8AF8, + 16333: 0x8E44, + 16334: 0x918D, + 16335: 0x9664, + 16336: 0x969B, + 16337: 0x973D, + 16338: 0x984C, + 16339: 0x9F4A, + 16340: 0x4FCE, + 16341: 0x5146, + 16342: 0x51CB, + 16343: 0x52A9, + 16344: 0x5632, + 16345: 0x5F14, + 16346: 0x5F6B, + 16347: 0x63AA, + 16348: 0x64CD, + 16349: 0x65E9, + 16350: 0x6641, + 16351: 0x66FA, + 16352: 0x66F9, + 16353: 0x671D, + 16354: 0x689D, + 16355: 0x68D7, + 16356: 0x69FD, + 16357: 0x6F15, + 16358: 0x6F6E, + 16359: 0x7167, + 16360: 0x71E5, + 16361: 0x722A, + 16362: 0x74AA, + 16363: 0x773A, + 16364: 0x7956, + 16365: 0x795A, + 16366: 0x79DF, + 16367: 0x7A20, + 16368: 0x7A95, + 16369: 0x7C97, + 16370: 0x7CDF, + 16371: 0x7D44, + 16372: 0x7E70, + 16373: 0x8087, + 16374: 0x85FB, + 16375: 0x86A4, + 16376: 0x8A54, + 16377: 0x8ABF, + 16378: 0x8D99, + 16379: 0x8E81, + 16380: 0x9020, + 16381: 0x906D, + 16382: 0x91E3, + 16383: 0x963B, + 16384: 0x96D5, + 16385: 0x9CE5, + 16386: 0x65CF, + 16387: 0x7C07, + 16388: 0x8DB3, + 16389: 0x93C3, + 16390: 0x5B58, + 16391: 0x5C0A, + 16392: 0x5352, + 16393: 0x62D9, + 16394: 0x731D, + 16395: 0x5027, + 16396: 0x5B97, + 16397: 0x5F9E, + 16398: 0x60B0, + 16399: 0x616B, + 16400: 0x68D5, + 16401: 0x6DD9, + 16402: 0x742E, + 16403: 0x7A2E, + 16404: 0x7D42, + 16405: 0x7D9C, + 16406: 0x7E31, + 16407: 0x816B, + 16408: 0x8E2A, + 16409: 0x8E35, + 16410: 0x937E, + 16411: 0x9418, + 16412: 0x4F50, + 16413: 0x5750, + 16414: 0x5DE6, + 16415: 0x5EA7, + 16416: 0x632B, + 16417: 0x7F6A, + 16418: 0x4E3B, + 16419: 0x4F4F, + 16420: 0x4F8F, + 16421: 0x505A, + 16422: 0x59DD, + 16423: 0x80C4, + 16424: 0x546A, + 16425: 0x5468, + 16426: 0x55FE, + 16427: 0x594F, + 16428: 0x5B99, + 16429: 0x5DDE, + 16430: 0x5EDA, + 16431: 0x665D, + 16432: 0x6731, + 16433: 0x67F1, + 16434: 0x682A, + 16435: 0x6CE8, + 16436: 0x6D32, + 16437: 0x6E4A, + 16438: 0x6F8D, + 16439: 0x70B7, + 16440: 0x73E0, + 16441: 0x7587, + 16442: 0x7C4C, + 16443: 0x7D02, + 16444: 0x7D2C, + 16445: 0x7DA2, + 16446: 0x821F, + 16447: 0x86DB, + 16448: 0x8A3B, + 16449: 0x8A85, + 16450: 0x8D70, + 16451: 0x8E8A, + 16452: 0x8F33, + 16453: 0x9031, + 16454: 0x914E, + 16455: 0x9152, + 16456: 0x9444, + 16457: 0x99D0, + 16458: 0x7AF9, + 16459: 0x7CA5, + 16460: 0x4FCA, + 16461: 0x5101, + 16462: 0x51C6, + 16463: 0x57C8, + 16464: 0x5BEF, + 16465: 0x5CFB, + 16466: 0x6659, + 16467: 0x6A3D, + 16468: 0x6D5A, + 16469: 0x6E96, + 16470: 0x6FEC, + 16471: 0x710C, + 16472: 0x756F, + 16473: 0x7AE3, + 16474: 0x8822, + 16475: 0x9021, + 16476: 0x9075, + 16477: 0x96CB, + 16478: 0x99FF, + 16479: 0x8301, + 16480: 0x4E2D, + 16481: 0x4EF2, + 16482: 0x8846, + 16483: 0x91CD, + 16484: 0x537D, + 16485: 0x6ADB, + 16486: 0x696B, + 16487: 0x6C41, + 16488: 0x847A, + 16489: 0x589E, + 16490: 0x618E, + 16491: 0x66FE, + 16492: 0x62EF, + 16493: 0x70DD, + 16494: 0x7511, + 16495: 0x75C7, + 16496: 0x7E52, + 16497: 0x84B8, + 16498: 0x8B49, + 16499: 0x8D08, + 16500: 0x4E4B, + 16501: 0x53EA, + 16502: 0x54AB, + 16503: 0x5730, + 16504: 0x5740, + 16505: 0x5FD7, + 16506: 0x6301, + 16507: 0x6307, + 16508: 0x646F, + 16509: 0x652F, + 16510: 0x65E8, + 16511: 0x667A, + 16512: 0x679D, + 16513: 0x67B3, + 16514: 0x6B62, + 16515: 0x6C60, + 16516: 0x6C9A, + 16517: 0x6F2C, + 16518: 0x77E5, + 16519: 0x7825, + 16520: 0x7949, + 16521: 0x7957, + 16522: 0x7D19, + 16523: 0x80A2, + 16524: 0x8102, + 16525: 0x81F3, + 16526: 0x829D, + 16527: 0x82B7, + 16528: 0x8718, + 16529: 0x8A8C, + 16530: 0xF9FC, + 16531: 0x8D04, + 16532: 0x8DBE, + 16533: 0x9072, + 16534: 0x76F4, + 16535: 0x7A19, + 16536: 0x7A37, + 16537: 0x7E54, + 16538: 0x8077, + 16539: 0x5507, + 16540: 0x55D4, + 16541: 0x5875, + 16542: 0x632F, + 16543: 0x6422, + 16544: 0x6649, + 16545: 0x664B, + 16546: 0x686D, + 16547: 0x699B, + 16548: 0x6B84, + 16549: 0x6D25, + 16550: 0x6EB1, + 16551: 0x73CD, + 16552: 0x7468, + 16553: 0x74A1, + 16554: 0x755B, + 16555: 0x75B9, + 16556: 0x76E1, + 16557: 0x771E, + 16558: 0x778B, + 16559: 0x79E6, + 16560: 0x7E09, + 16561: 0x7E1D, + 16562: 0x81FB, + 16563: 0x852F, + 16564: 0x8897, + 16565: 0x8A3A, + 16566: 0x8CD1, + 16567: 0x8EEB, + 16568: 0x8FB0, + 16569: 0x9032, + 16570: 0x93AD, + 16571: 0x9663, + 16572: 0x9673, + 16573: 0x9707, + 16574: 0x4F84, + 16575: 0x53F1, + 16576: 0x59EA, + 16577: 0x5AC9, + 16578: 0x5E19, + 16579: 0x684E, + 16580: 0x74C6, + 16581: 0x75BE, + 16582: 0x79E9, + 16583: 0x7A92, + 16584: 0x81A3, + 16585: 0x86ED, + 16586: 0x8CEA, + 16587: 0x8DCC, + 16588: 0x8FED, + 16589: 0x659F, + 16590: 0x6715, + 16591: 0xF9FD, + 16592: 0x57F7, + 16593: 0x6F57, + 16594: 0x7DDD, + 16595: 0x8F2F, + 16596: 0x93F6, + 16597: 0x96C6, + 16598: 0x5FB5, + 16599: 0x61F2, + 16600: 0x6F84, + 16601: 0x4E14, + 16602: 0x4F98, + 16603: 0x501F, + 16604: 0x53C9, + 16605: 0x55DF, + 16606: 0x5D6F, + 16607: 0x5DEE, + 16608: 0x6B21, + 16609: 0x6B64, + 16610: 0x78CB, + 16611: 0x7B9A, + 16612: 0xF9FE, + 16613: 0x8E49, + 16614: 0x8ECA, + 16615: 0x906E, + 16616: 0x6349, + 16617: 0x643E, + 16618: 0x7740, + 16619: 0x7A84, + 16620: 0x932F, + 16621: 0x947F, + 16622: 0x9F6A, + 16623: 0x64B0, + 16624: 0x6FAF, + 16625: 0x71E6, + 16626: 0x74A8, + 16627: 0x74DA, + 16628: 0x7AC4, + 16629: 0x7C12, + 16630: 0x7E82, + 16631: 0x7CB2, + 16632: 0x7E98, + 16633: 0x8B9A, + 16634: 0x8D0A, + 16635: 0x947D, + 16636: 0x9910, + 16637: 0x994C, + 16638: 0x5239, + 16639: 0x5BDF, + 16640: 0x64E6, + 16641: 0x672D, + 16642: 0x7D2E, + 16643: 0x50ED, + 16644: 0x53C3, + 16645: 0x5879, + 16646: 0x6158, + 16647: 0x6159, + 16648: 0x61FA, + 16649: 0x65AC, + 16650: 0x7AD9, + 16651: 0x8B92, + 16652: 0x8B96, + 16653: 0x5009, + 16654: 0x5021, + 16655: 0x5275, + 16656: 0x5531, + 16657: 0x5A3C, + 16658: 0x5EE0, + 16659: 0x5F70, + 16660: 0x6134, + 16661: 0x655E, + 16662: 0x660C, + 16663: 0x6636, + 16664: 0x66A2, + 16665: 0x69CD, + 16666: 0x6EC4, + 16667: 0x6F32, + 16668: 0x7316, + 16669: 0x7621, + 16670: 0x7A93, + 16671: 0x8139, + 16672: 0x8259, + 16673: 0x83D6, + 16674: 0x84BC, + 16675: 0x50B5, + 16676: 0x57F0, + 16677: 0x5BC0, + 16678: 0x5BE8, + 16679: 0x5F69, + 16680: 0x63A1, + 16681: 0x7826, + 16682: 0x7DB5, + 16683: 0x83DC, + 16684: 0x8521, + 16685: 0x91C7, + 16686: 0x91F5, + 16687: 0x518A, + 16688: 0x67F5, + 16689: 0x7B56, + 16690: 0x8CAC, + 16691: 0x51C4, + 16692: 0x59BB, + 16693: 0x60BD, + 16694: 0x8655, + 16695: 0x501C, + 16696: 0xF9FF, + 16697: 0x5254, + 16698: 0x5C3A, + 16699: 0x617D, + 16700: 0x621A, + 16701: 0x62D3, + 16702: 0x64F2, + 16703: 0x65A5, + 16704: 0x6ECC, + 16705: 0x7620, + 16706: 0x810A, + 16707: 0x8E60, + 16708: 0x965F, + 16709: 0x96BB, + 16710: 0x4EDF, + 16711: 0x5343, + 16712: 0x5598, + 16713: 0x5929, + 16714: 0x5DDD, + 16715: 0x64C5, + 16716: 0x6CC9, + 16717: 0x6DFA, + 16718: 0x7394, + 16719: 0x7A7F, + 16720: 0x821B, + 16721: 0x85A6, + 16722: 0x8CE4, + 16723: 0x8E10, + 16724: 0x9077, + 16725: 0x91E7, + 16726: 0x95E1, + 16727: 0x9621, + 16728: 0x97C6, + 16729: 0x51F8, + 16730: 0x54F2, + 16731: 0x5586, + 16732: 0x5FB9, + 16733: 0x64A4, + 16734: 0x6F88, + 16735: 0x7DB4, + 16736: 0x8F1F, + 16737: 0x8F4D, + 16738: 0x9435, + 16739: 0x50C9, + 16740: 0x5C16, + 16741: 0x6CBE, + 16742: 0x6DFB, + 16743: 0x751B, + 16744: 0x77BB, + 16745: 0x7C3D, + 16746: 0x7C64, + 16747: 0x8A79, + 16748: 0x8AC2, + 16749: 0x581E, + 16750: 0x59BE, + 16751: 0x5E16, + 16752: 0x6377, + 16753: 0x7252, + 16754: 0x758A, + 16755: 0x776B, + 16756: 0x8ADC, + 16757: 0x8CBC, + 16758: 0x8F12, + 16759: 0x5EF3, + 16760: 0x6674, + 16761: 0x6DF8, + 16762: 0x807D, + 16763: 0x83C1, + 16764: 0x8ACB, + 16765: 0x9751, + 16766: 0x9BD6, + 16767: 0xFA00, + 16768: 0x5243, + 16769: 0x66FF, + 16770: 0x6D95, + 16771: 0x6EEF, + 16772: 0x7DE0, + 16773: 0x8AE6, + 16774: 0x902E, + 16775: 0x905E, + 16776: 0x9AD4, + 16777: 0x521D, + 16778: 0x527F, + 16779: 0x54E8, + 16780: 0x6194, + 16781: 0x6284, + 16782: 0x62DB, + 16783: 0x68A2, + 16784: 0x6912, + 16785: 0x695A, + 16786: 0x6A35, + 16787: 0x7092, + 16788: 0x7126, + 16789: 0x785D, + 16790: 0x7901, + 16791: 0x790E, + 16792: 0x79D2, + 16793: 0x7A0D, + 16794: 0x8096, + 16795: 0x8278, + 16796: 0x82D5, + 16797: 0x8349, + 16798: 0x8549, + 16799: 0x8C82, + 16800: 0x8D85, + 16801: 0x9162, + 16802: 0x918B, + 16803: 0x91AE, + 16804: 0x4FC3, + 16805: 0x56D1, + 16806: 0x71ED, + 16807: 0x77D7, + 16808: 0x8700, + 16809: 0x89F8, + 16810: 0x5BF8, + 16811: 0x5FD6, + 16812: 0x6751, + 16813: 0x90A8, + 16814: 0x53E2, + 16815: 0x585A, + 16816: 0x5BF5, + 16817: 0x60A4, + 16818: 0x6181, + 16819: 0x6460, + 16820: 0x7E3D, + 16821: 0x8070, + 16822: 0x8525, + 16823: 0x9283, + 16824: 0x64AE, + 16825: 0x50AC, + 16826: 0x5D14, + 16827: 0x6700, + 16828: 0x589C, + 16829: 0x62BD, + 16830: 0x63A8, + 16831: 0x690E, + 16832: 0x6978, + 16833: 0x6A1E, + 16834: 0x6E6B, + 16835: 0x76BA, + 16836: 0x79CB, + 16837: 0x82BB, + 16838: 0x8429, + 16839: 0x8ACF, + 16840: 0x8DA8, + 16841: 0x8FFD, + 16842: 0x9112, + 16843: 0x914B, + 16844: 0x919C, + 16845: 0x9310, + 16846: 0x9318, + 16847: 0x939A, + 16848: 0x96DB, + 16849: 0x9A36, + 16850: 0x9C0D, + 16851: 0x4E11, + 16852: 0x755C, + 16853: 0x795D, + 16854: 0x7AFA, + 16855: 0x7B51, + 16856: 0x7BC9, + 16857: 0x7E2E, + 16858: 0x84C4, + 16859: 0x8E59, + 16860: 0x8E74, + 16861: 0x8EF8, + 16862: 0x9010, + 16863: 0x6625, + 16864: 0x693F, + 16865: 0x7443, + 16866: 0x51FA, + 16867: 0x672E, + 16868: 0x9EDC, + 16869: 0x5145, + 16870: 0x5FE0, + 16871: 0x6C96, + 16872: 0x87F2, + 16873: 0x885D, + 16874: 0x8877, + 16875: 0x60B4, + 16876: 0x81B5, + 16877: 0x8403, + 16878: 0x8D05, + 16879: 0x53D6, + 16880: 0x5439, + 16881: 0x5634, + 16882: 0x5A36, + 16883: 0x5C31, + 16884: 0x708A, + 16885: 0x7FE0, + 16886: 0x805A, + 16887: 0x8106, + 16888: 0x81ED, + 16889: 0x8DA3, + 16890: 0x9189, + 16891: 0x9A5F, + 16892: 0x9DF2, + 16893: 0x5074, + 16894: 0x4EC4, + 16895: 0x53A0, + 16896: 0x60FB, + 16897: 0x6E2C, + 16898: 0x5C64, + 16899: 0x4F88, + 16900: 0x5024, + 16901: 0x55E4, + 16902: 0x5CD9, + 16903: 0x5E5F, + 16904: 0x6065, + 16905: 0x6894, + 16906: 0x6CBB, + 16907: 0x6DC4, + 16908: 0x71BE, + 16909: 0x75D4, + 16910: 0x75F4, + 16911: 0x7661, + 16912: 0x7A1A, + 16913: 0x7A49, + 16914: 0x7DC7, + 16915: 0x7DFB, + 16916: 0x7F6E, + 16917: 0x81F4, + 16918: 0x86A9, + 16919: 0x8F1C, + 16920: 0x96C9, + 16921: 0x99B3, + 16922: 0x9F52, + 16923: 0x5247, + 16924: 0x52C5, + 16925: 0x98ED, + 16926: 0x89AA, + 16927: 0x4E03, + 16928: 0x67D2, + 16929: 0x6F06, + 16930: 0x4FB5, + 16931: 0x5BE2, + 16932: 0x6795, + 16933: 0x6C88, + 16934: 0x6D78, + 16935: 0x741B, + 16936: 0x7827, + 16937: 0x91DD, + 16938: 0x937C, + 16939: 0x87C4, + 16940: 0x79E4, + 16941: 0x7A31, + 16942: 0x5FEB, + 16943: 0x4ED6, + 16944: 0x54A4, + 16945: 0x553E, + 16946: 0x58AE, + 16947: 0x59A5, + 16948: 0x60F0, + 16949: 0x6253, + 16950: 0x62D6, + 16951: 0x6736, + 16952: 0x6955, + 16953: 0x8235, + 16954: 0x9640, + 16955: 0x99B1, + 16956: 0x99DD, + 16957: 0x502C, + 16958: 0x5353, + 16959: 0x5544, + 16960: 0x577C, + 16961: 0xFA01, + 16962: 0x6258, + 16963: 0xFA02, + 16964: 0x64E2, + 16965: 0x666B, + 16966: 0x67DD, + 16967: 0x6FC1, + 16968: 0x6FEF, + 16969: 0x7422, + 16970: 0x7438, + 16971: 0x8A17, + 16972: 0x9438, + 16973: 0x5451, + 16974: 0x5606, + 16975: 0x5766, + 16976: 0x5F48, + 16977: 0x619A, + 16978: 0x6B4E, + 16979: 0x7058, + 16980: 0x70AD, + 16981: 0x7DBB, + 16982: 0x8A95, + 16983: 0x596A, + 16984: 0x812B, + 16985: 0x63A2, + 16986: 0x7708, + 16987: 0x803D, + 16988: 0x8CAA, + 16989: 0x5854, + 16990: 0x642D, + 16991: 0x69BB, + 16992: 0x5B95, + 16993: 0x5E11, + 16994: 0x6E6F, + 16995: 0xFA03, + 16996: 0x8569, + 16997: 0x514C, + 16998: 0x53F0, + 16999: 0x592A, + 17000: 0x6020, + 17001: 0x614B, + 17002: 0x6B86, + 17003: 0x6C70, + 17004: 0x6CF0, + 17005: 0x7B1E, + 17006: 0x80CE, + 17007: 0x82D4, + 17008: 0x8DC6, + 17009: 0x90B0, + 17010: 0x98B1, + 17011: 0xFA04, + 17012: 0x64C7, + 17013: 0x6FA4, + 17014: 0x6491, + 17015: 0x6504, + 17016: 0x514E, + 17017: 0x5410, + 17018: 0x571F, + 17019: 0x8A0E, + 17020: 0x615F, + 17021: 0x6876, + 17022: 0xFA05, + 17023: 0x75DB, + 17024: 0x7B52, + 17025: 0x7D71, + 17026: 0x901A, + 17027: 0x5806, + 17028: 0x69CC, + 17029: 0x817F, + 17030: 0x892A, + 17031: 0x9000, + 17032: 0x9839, + 17033: 0x5078, + 17034: 0x5957, + 17035: 0x59AC, + 17036: 0x6295, + 17037: 0x900F, + 17038: 0x9B2A, + 17039: 0x615D, + 17040: 0x7279, + 17041: 0x95D6, + 17042: 0x5761, + 17043: 0x5A46, + 17044: 0x5DF4, + 17045: 0x628A, + 17046: 0x64AD, + 17047: 0x64FA, + 17048: 0x6777, + 17049: 0x6CE2, + 17050: 0x6D3E, + 17051: 0x722C, + 17052: 0x7436, + 17053: 0x7834, + 17054: 0x7F77, + 17055: 0x82AD, + 17056: 0x8DDB, + 17057: 0x9817, + 17058: 0x5224, + 17059: 0x5742, + 17060: 0x677F, + 17061: 0x7248, + 17062: 0x74E3, + 17063: 0x8CA9, + 17064: 0x8FA6, + 17065: 0x9211, + 17066: 0x962A, + 17067: 0x516B, + 17068: 0x53ED, + 17069: 0x634C, + 17070: 0x4F69, + 17071: 0x5504, + 17072: 0x6096, + 17073: 0x6557, + 17074: 0x6C9B, + 17075: 0x6D7F, + 17076: 0x724C, + 17077: 0x72FD, + 17078: 0x7A17, + 17079: 0x8987, + 17080: 0x8C9D, + 17081: 0x5F6D, + 17082: 0x6F8E, + 17083: 0x70F9, + 17084: 0x81A8, + 17085: 0x610E, + 17086: 0x4FBF, + 17087: 0x504F, + 17088: 0x6241, + 17089: 0x7247, + 17090: 0x7BC7, + 17091: 0x7DE8, + 17092: 0x7FE9, + 17093: 0x904D, + 17094: 0x97AD, + 17095: 0x9A19, + 17096: 0x8CB6, + 17097: 0x576A, + 17098: 0x5E73, + 17099: 0x67B0, + 17100: 0x840D, + 17101: 0x8A55, + 17102: 0x5420, + 17103: 0x5B16, + 17104: 0x5E63, + 17105: 0x5EE2, + 17106: 0x5F0A, + 17107: 0x6583, + 17108: 0x80BA, + 17109: 0x853D, + 17110: 0x9589, + 17111: 0x965B, + 17112: 0x4F48, + 17113: 0x5305, + 17114: 0x530D, + 17115: 0x530F, + 17116: 0x5486, + 17117: 0x54FA, + 17118: 0x5703, + 17119: 0x5E03, + 17120: 0x6016, + 17121: 0x629B, + 17122: 0x62B1, + 17123: 0x6355, + 17124: 0xFA06, + 17125: 0x6CE1, + 17126: 0x6D66, + 17127: 0x75B1, + 17128: 0x7832, + 17129: 0x80DE, + 17130: 0x812F, + 17131: 0x82DE, + 17132: 0x8461, + 17133: 0x84B2, + 17134: 0x888D, + 17135: 0x8912, + 17136: 0x900B, + 17137: 0x92EA, + 17138: 0x98FD, + 17139: 0x9B91, + 17140: 0x5E45, + 17141: 0x66B4, + 17142: 0x66DD, + 17143: 0x7011, + 17144: 0x7206, + 17145: 0xFA07, + 17146: 0x4FF5, + 17147: 0x527D, + 17148: 0x5F6A, + 17149: 0x6153, + 17150: 0x6753, + 17151: 0x6A19, + 17152: 0x6F02, + 17153: 0x74E2, + 17154: 0x7968, + 17155: 0x8868, + 17156: 0x8C79, + 17157: 0x98C7, + 17158: 0x98C4, + 17159: 0x9A43, + 17160: 0x54C1, + 17161: 0x7A1F, + 17162: 0x6953, + 17163: 0x8AF7, + 17164: 0x8C4A, + 17165: 0x98A8, + 17166: 0x99AE, + 17167: 0x5F7C, + 17168: 0x62AB, + 17169: 0x75B2, + 17170: 0x76AE, + 17171: 0x88AB, + 17172: 0x907F, + 17173: 0x9642, + 17174: 0x5339, + 17175: 0x5F3C, + 17176: 0x5FC5, + 17177: 0x6CCC, + 17178: 0x73CC, + 17179: 0x7562, + 17180: 0x758B, + 17181: 0x7B46, + 17182: 0x82FE, + 17183: 0x999D, + 17184: 0x4E4F, + 17185: 0x903C, + 17186: 0x4E0B, + 17187: 0x4F55, + 17188: 0x53A6, + 17189: 0x590F, + 17190: 0x5EC8, + 17191: 0x6630, + 17192: 0x6CB3, + 17193: 0x7455, + 17194: 0x8377, + 17195: 0x8766, + 17196: 0x8CC0, + 17197: 0x9050, + 17198: 0x971E, + 17199: 0x9C15, + 17200: 0x58D1, + 17201: 0x5B78, + 17202: 0x8650, + 17203: 0x8B14, + 17204: 0x9DB4, + 17205: 0x5BD2, + 17206: 0x6068, + 17207: 0x608D, + 17208: 0x65F1, + 17209: 0x6C57, + 17210: 0x6F22, + 17211: 0x6FA3, + 17212: 0x701A, + 17213: 0x7F55, + 17214: 0x7FF0, + 17215: 0x9591, + 17216: 0x9592, + 17217: 0x9650, + 17218: 0x97D3, + 17219: 0x5272, + 17220: 0x8F44, + 17221: 0x51FD, + 17222: 0x542B, + 17223: 0x54B8, + 17224: 0x5563, + 17225: 0x558A, + 17226: 0x6ABB, + 17227: 0x6DB5, + 17228: 0x7DD8, + 17229: 0x8266, + 17230: 0x929C, + 17231: 0x9677, + 17232: 0x9E79, + 17233: 0x5408, + 17234: 0x54C8, + 17235: 0x76D2, + 17236: 0x86E4, + 17237: 0x95A4, + 17238: 0x95D4, + 17239: 0x965C, + 17240: 0x4EA2, + 17241: 0x4F09, + 17242: 0x59EE, + 17243: 0x5AE6, + 17244: 0x5DF7, + 17245: 0x6052, + 17246: 0x6297, + 17247: 0x676D, + 17248: 0x6841, + 17249: 0x6C86, + 17250: 0x6E2F, + 17251: 0x7F38, + 17252: 0x809B, + 17253: 0x822A, + 17254: 0xFA08, + 17255: 0xFA09, + 17256: 0x9805, + 17257: 0x4EA5, + 17258: 0x5055, + 17259: 0x54B3, + 17260: 0x5793, + 17261: 0x595A, + 17262: 0x5B69, + 17263: 0x5BB3, + 17264: 0x61C8, + 17265: 0x6977, + 17266: 0x6D77, + 17267: 0x7023, + 17268: 0x87F9, + 17269: 0x89E3, + 17270: 0x8A72, + 17271: 0x8AE7, + 17272: 0x9082, + 17273: 0x99ED, + 17274: 0x9AB8, + 17275: 0x52BE, + 17276: 0x6838, + 17277: 0x5016, + 17278: 0x5E78, + 17279: 0x674F, + 17280: 0x8347, + 17281: 0x884C, + 17282: 0x4EAB, + 17283: 0x5411, + 17284: 0x56AE, + 17285: 0x73E6, + 17286: 0x9115, + 17287: 0x97FF, + 17288: 0x9909, + 17289: 0x9957, + 17290: 0x9999, + 17291: 0x5653, + 17292: 0x589F, + 17293: 0x865B, + 17294: 0x8A31, + 17295: 0x61B2, + 17296: 0x6AF6, + 17297: 0x737B, + 17298: 0x8ED2, + 17299: 0x6B47, + 17300: 0x96AA, + 17301: 0x9A57, + 17302: 0x5955, + 17303: 0x7200, + 17304: 0x8D6B, + 17305: 0x9769, + 17306: 0x4FD4, + 17307: 0x5CF4, + 17308: 0x5F26, + 17309: 0x61F8, + 17310: 0x665B, + 17311: 0x6CEB, + 17312: 0x70AB, + 17313: 0x7384, + 17314: 0x73B9, + 17315: 0x73FE, + 17316: 0x7729, + 17317: 0x774D, + 17318: 0x7D43, + 17319: 0x7D62, + 17320: 0x7E23, + 17321: 0x8237, + 17322: 0x8852, + 17323: 0xFA0A, + 17324: 0x8CE2, + 17325: 0x9249, + 17326: 0x986F, + 17327: 0x5B51, + 17328: 0x7A74, + 17329: 0x8840, + 17330: 0x9801, + 17331: 0x5ACC, + 17332: 0x4FE0, + 17333: 0x5354, + 17334: 0x593E, + 17335: 0x5CFD, + 17336: 0x633E, + 17337: 0x6D79, + 17338: 0x72F9, + 17339: 0x8105, + 17340: 0x8107, + 17341: 0x83A2, + 17342: 0x92CF, + 17343: 0x9830, + 17344: 0x4EA8, + 17345: 0x5144, + 17346: 0x5211, + 17347: 0x578B, + 17348: 0x5F62, + 17349: 0x6CC2, + 17350: 0x6ECE, + 17351: 0x7005, + 17352: 0x7050, + 17353: 0x70AF, + 17354: 0x7192, + 17355: 0x73E9, + 17356: 0x7469, + 17357: 0x834A, + 17358: 0x87A2, + 17359: 0x8861, + 17360: 0x9008, + 17361: 0x90A2, + 17362: 0x93A3, + 17363: 0x99A8, + 17364: 0x516E, + 17365: 0x5F57, + 17366: 0x60E0, + 17367: 0x6167, + 17368: 0x66B3, + 17369: 0x8559, + 17370: 0x8E4A, + 17371: 0x91AF, + 17372: 0x978B, + 17373: 0x4E4E, + 17374: 0x4E92, + 17375: 0x547C, + 17376: 0x58D5, + 17377: 0x58FA, + 17378: 0x597D, + 17379: 0x5CB5, + 17380: 0x5F27, + 17381: 0x6236, + 17382: 0x6248, + 17383: 0x660A, + 17384: 0x6667, + 17385: 0x6BEB, + 17386: 0x6D69, + 17387: 0x6DCF, + 17388: 0x6E56, + 17389: 0x6EF8, + 17390: 0x6F94, + 17391: 0x6FE0, + 17392: 0x6FE9, + 17393: 0x705D, + 17394: 0x72D0, + 17395: 0x7425, + 17396: 0x745A, + 17397: 0x74E0, + 17398: 0x7693, + 17399: 0x795C, + 17400: 0x7CCA, + 17401: 0x7E1E, + 17402: 0x80E1, + 17403: 0x82A6, + 17404: 0x846B, + 17405: 0x84BF, + 17406: 0x864E, + 17407: 0x865F, + 17408: 0x8774, + 17409: 0x8B77, + 17410: 0x8C6A, + 17411: 0x93AC, + 17412: 0x9800, + 17413: 0x9865, + 17414: 0x60D1, + 17415: 0x6216, + 17416: 0x9177, + 17417: 0x5A5A, + 17418: 0x660F, + 17419: 0x6DF7, + 17420: 0x6E3E, + 17421: 0x743F, + 17422: 0x9B42, + 17423: 0x5FFD, + 17424: 0x60DA, + 17425: 0x7B0F, + 17426: 0x54C4, + 17427: 0x5F18, + 17428: 0x6C5E, + 17429: 0x6CD3, + 17430: 0x6D2A, + 17431: 0x70D8, + 17432: 0x7D05, + 17433: 0x8679, + 17434: 0x8A0C, + 17435: 0x9D3B, + 17436: 0x5316, + 17437: 0x548C, + 17438: 0x5B05, + 17439: 0x6A3A, + 17440: 0x706B, + 17441: 0x7575, + 17442: 0x798D, + 17443: 0x79BE, + 17444: 0x82B1, + 17445: 0x83EF, + 17446: 0x8A71, + 17447: 0x8B41, + 17448: 0x8CA8, + 17449: 0x9774, + 17450: 0xFA0B, + 17451: 0x64F4, + 17452: 0x652B, + 17453: 0x78BA, + 17454: 0x78BB, + 17455: 0x7A6B, + 17456: 0x4E38, + 17457: 0x559A, + 17458: 0x5950, + 17459: 0x5BA6, + 17460: 0x5E7B, + 17461: 0x60A3, + 17462: 0x63DB, + 17463: 0x6B61, + 17464: 0x6665, + 17465: 0x6853, + 17466: 0x6E19, + 17467: 0x7165, + 17468: 0x74B0, + 17469: 0x7D08, + 17470: 0x9084, + 17471: 0x9A69, + 17472: 0x9C25, + 17473: 0x6D3B, + 17474: 0x6ED1, + 17475: 0x733E, + 17476: 0x8C41, + 17477: 0x95CA, + 17478: 0x51F0, + 17479: 0x5E4C, + 17480: 0x5FA8, + 17481: 0x604D, + 17482: 0x60F6, + 17483: 0x6130, + 17484: 0x614C, + 17485: 0x6643, + 17486: 0x6644, + 17487: 0x69A5, + 17488: 0x6CC1, + 17489: 0x6E5F, + 17490: 0x6EC9, + 17491: 0x6F62, + 17492: 0x714C, + 17493: 0x749C, + 17494: 0x7687, + 17495: 0x7BC1, + 17496: 0x7C27, + 17497: 0x8352, + 17498: 0x8757, + 17499: 0x9051, + 17500: 0x968D, + 17501: 0x9EC3, + 17502: 0x532F, + 17503: 0x56DE, + 17504: 0x5EFB, + 17505: 0x5F8A, + 17506: 0x6062, + 17507: 0x6094, + 17508: 0x61F7, + 17509: 0x6666, + 17510: 0x6703, + 17511: 0x6A9C, + 17512: 0x6DEE, + 17513: 0x6FAE, + 17514: 0x7070, + 17515: 0x736A, + 17516: 0x7E6A, + 17517: 0x81BE, + 17518: 0x8334, + 17519: 0x86D4, + 17520: 0x8AA8, + 17521: 0x8CC4, + 17522: 0x5283, + 17523: 0x7372, + 17524: 0x5B96, + 17525: 0x6A6B, + 17526: 0x9404, + 17527: 0x54EE, + 17528: 0x5686, + 17529: 0x5B5D, + 17530: 0x6548, + 17531: 0x6585, + 17532: 0x66C9, + 17533: 0x689F, + 17534: 0x6D8D, + 17535: 0x6DC6, + 17536: 0x723B, + 17537: 0x80B4, + 17538: 0x9175, + 17539: 0x9A4D, + 17540: 0x4FAF, + 17541: 0x5019, + 17542: 0x539A, + 17543: 0x540E, + 17544: 0x543C, + 17545: 0x5589, + 17546: 0x55C5, + 17547: 0x5E3F, + 17548: 0x5F8C, + 17549: 0x673D, + 17550: 0x7166, + 17551: 0x73DD, + 17552: 0x9005, + 17553: 0x52DB, + 17554: 0x52F3, + 17555: 0x5864, + 17556: 0x58CE, + 17557: 0x7104, + 17558: 0x718F, + 17559: 0x71FB, + 17560: 0x85B0, + 17561: 0x8A13, + 17562: 0x6688, + 17563: 0x85A8, + 17564: 0x55A7, + 17565: 0x6684, + 17566: 0x714A, + 17567: 0x8431, + 17568: 0x5349, + 17569: 0x5599, + 17570: 0x6BC1, + 17571: 0x5F59, + 17572: 0x5FBD, + 17573: 0x63EE, + 17574: 0x6689, + 17575: 0x7147, + 17576: 0x8AF1, + 17577: 0x8F1D, + 17578: 0x9EBE, + 17579: 0x4F11, + 17580: 0x643A, + 17581: 0x70CB, + 17582: 0x7566, + 17583: 0x8667, + 17584: 0x6064, + 17585: 0x8B4E, + 17586: 0x9DF8, + 17587: 0x5147, + 17588: 0x51F6, + 17589: 0x5308, + 17590: 0x6D36, + 17591: 0x80F8, + 17592: 0x9ED1, + 17593: 0x6615, + 17594: 0x6B23, + 17595: 0x7098, + 17596: 0x75D5, + 17597: 0x5403, + 17598: 0x5C79, + 17599: 0x7D07, + 17600: 0x8A16, + 17601: 0x6B20, + 17602: 0x6B3D, + 17603: 0x6B46, + 17604: 0x5438, + 17605: 0x6070, + 17606: 0x6D3D, + 17607: 0x7FD5, + 17608: 0x8208, + 17609: 0x50D6, + 17610: 0x51DE, + 17611: 0x559C, + 17612: 0x566B, + 17613: 0x56CD, + 17614: 0x59EC, + 17615: 0x5B09, + 17616: 0x5E0C, + 17617: 0x6199, + 17618: 0x6198, + 17619: 0x6231, + 17620: 0x665E, + 17621: 0x66E6, + 17622: 0x7199, + 17623: 0x71B9, + 17624: 0x71BA, + 17625: 0x72A7, + 17626: 0x79A7, + 17627: 0x7A00, + 17628: 0x7FB2, + 17629: 0x8A70, +} + +const numEncodeTables = 7 + +// encodeX are the encoding tables from Unicode to EUC-KR code, +// sorted by decreasing length. +// encode0: 20893 entries for runes in [19968, 40861). +// encode1: 11172 entries for runes in [44032, 55204). +// encode2: 1625 entries for runes in [ 8213, 9838). +// encode3: 990 entries for runes in [12288, 13278). +// encode4: 945 entries for runes in [ 161, 1106). +// encode5: 268 entries for runes in [63744, 64012). +// encode6: 230 entries for runes in [65281, 65511). + +const encode0Low, encode0High = 19968, 40861 + +var encode0 = [...]uint16{ + 19968 - 19968: 0xECE9, + 19969 - 19968: 0xEFCB, + 19971 - 19968: 0xF6D2, + 19975 - 19968: 0xD8B2, + 19976 - 19968: 0xEDDB, + 19977 - 19968: 0xDFB2, + 19978 - 19968: 0xDFBE, + 19979 - 19968: 0xF9BB, + 19981 - 19968: 0xDCF4, + 19985 - 19968: 0xF5E4, + 19988 - 19968: 0xF3A6, + 19989 - 19968: 0xDDE0, + 19990 - 19968: 0xE1A6, + 19992 - 19968: 0xCEF8, + 19993 - 19968: 0xDCB0, + 19998 - 19968: 0xE3AA, + 20013 - 19968: 0xF1E9, + 20018 - 19968: 0xCDFA, + 20024 - 19968: 0xFCAF, + 20025 - 19968: 0xD3A1, + 20027 - 19968: 0xF1AB, + 20034 - 19968: 0xE7D1, + 20035 - 19968: 0xD2AC, + 20037 - 19968: 0xCEF9, + 20043 - 19968: 0xF1FD, + 20045 - 19968: 0xDEBF, + 20046 - 19968: 0xFBBA, + 20047 - 19968: 0xF9B9, + 20054 - 19968: 0xCED2, + 20056 - 19968: 0xE3AB, + 20057 - 19968: 0xEBE0, + 20061 - 19968: 0xCEFA, + 20062 - 19968: 0xCBF7, + 20063 - 19968: 0xE5A5, + 20075 - 19968: 0xCAE1, + 20077 - 19968: 0xD4CC, + 20083 - 19968: 0xEAE1, + 20086 - 19968: 0xDCE3, + 20087 - 19968: 0xDFAD, + 20094 - 19968: 0xCBEB, + 20098 - 19968: 0xD5AF, + 20102 - 19968: 0xD6F5, + 20104 - 19968: 0xE5F8, + 20107 - 19968: 0xDEC0, + 20108 - 19968: 0xECA3, + 20110 - 19968: 0xE9CD, + 20112 - 19968: 0xEAA7, + 20113 - 19968: 0xE9F6, + 20114 - 19968: 0xFBBB, + 20116 - 19968: 0xE7E9, + 20117 - 19968: 0xEFCC, + 20120 - 19968: 0xD0E6, + 20123 - 19968: 0xDEC1, + 20126 - 19968: 0xE4AC, + 20129 - 19968: 0xD8CC, + 20130 - 19968: 0xF9F1, + 20132 - 19968: 0xCEDF, + 20133 - 19968: 0xFAA4, + 20134 - 19968: 0xE6B2, + 20136 - 19968: 0xFAFB, + 20139 - 19968: 0xFABD, + 20140 - 19968: 0xCCC8, + 20141 - 19968: 0xEFCD, + 20142 - 19968: 0xD5D5, + 20150 - 19968: 0xD3A2, + 20154 - 19968: 0xECD1, + 20160 - 19968: 0xE4A7, + 20161 - 19968: 0xECD2, + 20164 - 19968: 0xF6B1, + 20167 - 19968: 0xCEFB, + 20170 - 19968: 0xD0D1, + 20171 - 19968: 0xCBBF, + 20173 - 19968: 0xEDA4, + 20180 - 19968: 0xEDA8, + 20181 - 19968: 0xDEC2, + 20182 - 19968: 0xF6E2, + 20183 - 19968: 0xEDDC, + 20184 - 19968: 0xDCF5, + 20185 - 19968: 0xE0B9, + 20189 - 19968: 0xD4CE, + 20191 - 19968: 0xF4B5, + 20195 - 19968: 0xD3DB, + 20196 - 19968: 0xD6B5, + 20197 - 19968: 0xECA4, + 20208 - 19968: 0xE4E6, + 20210 - 19968: 0xF1EA, + 20214 - 19968: 0xCBEC, + 20215 - 19968: 0xCBC0, + 20219 - 19968: 0xECF2, + 20225 - 19968: 0xD0EA, + 20233 - 19968: 0xF9F2, + 20234 - 19968: 0xECA5, + 20235 - 19968: 0xD0DF, + 20237 - 19968: 0xE7EA, + 20238 - 19968: 0xD0EB, + 20239 - 19968: 0xDCD1, + 20240 - 19968: 0xDBE9, + 20241 - 19968: 0xFDCC, + 20271 - 19968: 0xDBD7, + 20276 - 19968: 0xDAE1, + 20278 - 19968: 0xD6B6, + 20280 - 19968: 0xE3DF, + 20282 - 19968: 0xDEC3, + 20284 - 19968: 0xDEC4, + 20285 - 19968: 0xCAA1, + 20291 - 19968: 0xEEEC, + 20294 - 19968: 0xD3A3, + 20295 - 19968: 0xEEB7, + 20296 - 19968: 0xF8CF, + 20301 - 19968: 0xEAC8, + 20302 - 19968: 0xEEB8, + 20303 - 19968: 0xF1AC, + 20304 - 19968: 0xF1A5, + 20305 - 19968: 0xE9CE, + 20309 - 19968: 0xF9BC, + 20313 - 19968: 0xE5F9, + 20314 - 19968: 0xECEA, + 20315 - 19968: 0xDDD6, + 20316 - 19968: 0xEDC2, + 20329 - 19968: 0xF8A5, + 20335 - 19968: 0xE5BA, + 20336 - 19968: 0xDBD8, + 20339 - 19968: 0xCAA2, + 20342 - 19968: 0xD1CD, + 20346 - 19968: 0xEEED, + 20350 - 19968: 0xECEB, + 20351 - 19968: 0xDEC5, + 20353 - 19968: 0xE3E0, + 20355 - 19968: 0xCAC9, + 20356 - 19968: 0xF2E9, + 20358 - 19968: 0xD5CE, + 20360 - 19968: 0xF6B6, + 20362 - 19968: 0xCEC2, + 20363 - 19968: 0xD6C7, + 20365 - 19968: 0xE3B4, + 20367 - 19968: 0xF1AD, + 20369 - 19968: 0xEAE2, + 20374 - 19968: 0xD7C2, + 20376 - 19968: 0xF3A7, + 20379 - 19968: 0xCDEA, + 20381 - 19968: 0xEBEE, + 20398 - 19968: 0xD9B2, + 20399 - 19968: 0xFDA5, + 20405 - 19968: 0xF6D5, + 20406 - 19968: 0xD5E2, + 20415 - 19968: 0xF8B5, + 20418 - 19968: 0xCCF5, + 20419 - 19968: 0xF5B5, + 20420 - 19968: 0xE4AD, + 20425 - 19968: 0xE7EB, + 20426 - 19968: 0xF1D5, + 20430 - 19968: 0xF0BB, + 20433 - 19968: 0xE9B5, + 20435 - 19968: 0xCCC9, + 20436 - 19968: 0xFAD5, + 20439 - 19968: 0xE1D4, + 20442 - 19968: 0xD7D6, + 20445 - 19968: 0xDCC1, + 20447 - 19968: 0xDEC6, + 20448 - 19968: 0xFAEF, + 20449 - 19968: 0xE3E1, + 20462 - 19968: 0xE1F3, + 20463 - 19968: 0xDCF6, + 20465 - 19968: 0xCEFC, + 20467 - 19968: 0xDBC4, + 20469 - 19968: 0xF8F1, + 20472 - 19968: 0xDCE4, + 20474 - 19968: 0xE5EF, + 20482 - 19968: 0xDCB1, + 20486 - 19968: 0xD5D6, + 20489 - 19968: 0xF3DA, + 20491 - 19968: 0xCBC1, + 20493 - 19968: 0xDBC3, + 20497 - 19968: 0xD9FA, + 20498 - 19968: 0xD3EE, + 20502 - 19968: 0xFAB8, + 20505 - 19968: 0xFDA6, + 20506 - 19968: 0xEBEF, + 20508 - 19968: 0xF4A6, + 20510 - 19968: 0xCCCA, + 20511 - 19968: 0xF3A8, + 20513 - 19968: 0xF3DB, + 20515 - 19968: 0xDBA7, + 20516 - 19968: 0xF6B7, + 20518 - 19968: 0xCFE6, + 20519 - 19968: 0xF0F2, + 20520 - 19968: 0xCBDA, + 20522 - 19968: 0xE7D2, + 20523 - 19968: 0xD7C3, + 20524 - 19968: 0xF6F0, + 20525 - 19968: 0xE8DE, + 20539 - 19968: 0xE5A6, + 20547 - 19968: 0xE5E7, + 20551 - 19968: 0xCAA3, + 20552 - 19968: 0xCCA7, + 20553 - 19968: 0xEAC9, + 20559 - 19968: 0xF8B6, + 20565 - 19968: 0xFAA5, + 20570 - 19968: 0xF1AE, + 20572 - 19968: 0xEFCE, + 20581 - 19968: 0xCBED, + 20596 - 19968: 0xF6B0, + 20597 - 19968: 0xEFCF, + 20598 - 19968: 0xE9CF, + 20600 - 19968: 0xF7DE, + 20608 - 19968: 0xCED3, + 20613 - 19968: 0xDCF7, + 20621 - 19968: 0xDBA8, + 20625 - 19968: 0xCBF8, + 20632 - 19968: 0xDFA1, + 20633 - 19968: 0xDDE1, + 20652 - 19968: 0xF5CA, + 20653 - 19968: 0xE9B6, + 20658 - 19968: 0xE7EC, + 20659 - 19968: 0xEEEE, + 20661 - 19968: 0xF3F0, + 20663 - 19968: 0xDFBF, + 20670 - 19968: 0xCCCB, + 20677 - 19968: 0xD0C1, + 20681 - 19968: 0xF4D2, + 20682 - 19968: 0xE0BA, + 20687 - 19968: 0xDFC0, + 20689 - 19968: 0xCEE0, + 20693 - 19968: 0xDCD2, + 20694 - 19968: 0xFDEA, + 20698 - 19968: 0xD6F6, + 20702 - 19968: 0xEACA, + 20709 - 19968: 0xE8E9, + 20711 - 19968: 0xE3AC, + 20717 - 19968: 0xF3D0, + 20729 - 19968: 0xCAA4, + 20731 - 19968: 0xDBF8, + 20735 - 19968: 0xDEC7, + 20736 - 19968: 0xEBF0, + 20737 - 19968: 0xF1D6, + 20740 - 19968: 0xE5E2, + 20742 - 19968: 0xCCCC, + 20745 - 19968: 0xCBFB, + 20754 - 19968: 0xEAE3, + 20767 - 19968: 0xDFC1, + 20769 - 19968: 0xD6ED, + 20778 - 19968: 0xE9D0, + 20786 - 19968: 0xEEB9, + 20791 - 19968: 0xD5E3, + 20794 - 19968: 0xD1D3, + 20796 - 19968: 0xE5F0, + 20800 - 19968: 0xE8B4, + 20801 - 19968: 0xEBC3, + 20803 - 19968: 0xEAAA, + 20804 - 19968: 0xFAFC, + 20805 - 19968: 0xF5F6, + 20806 - 19968: 0xF0BC, + 20807 - 19968: 0xFDD4, + 20808 - 19968: 0xE0BB, + 20809 - 19968: 0xCEC3, + 20811 - 19968: 0xD0BA, + 20812 - 19968: 0xF7BA, + 20813 - 19968: 0xD8F3, + 20814 - 19968: 0xF7CD, + 20818 - 19968: 0xE4AE, + 20828 - 19968: 0xD4DF, + 20834 - 19968: 0xD0E7, + 20837 - 19968: 0xECFD, + 20839 - 19968: 0xD2AE, + 20840 - 19968: 0xEEEF, + 20841 - 19968: 0xD5D7, + 20842 - 19968: 0xEAE4, + 20843 - 19968: 0xF8A2, + 20844 - 19968: 0xCDEB, + 20845 - 19968: 0xD7BF, + 20846 - 19968: 0xFBB1, + 20849 - 19968: 0xCDEC, + 20853 - 19968: 0xDCB2, + 20854 - 19968: 0xD0EC, + 20855 - 19968: 0xCEFD, + 20856 - 19968: 0xEEF0, + 20860 - 19968: 0xCCC2, + 20864 - 19968: 0xD0ED, + 20870 - 19968: 0xE5F7, + 20874 - 19968: 0xF3FC, + 20877 - 19968: 0xEEA2, + 20882 - 19968: 0xD9B3, + 20885 - 19968: 0xD8F4, + 20887 - 19968: 0xE9B7, + 20896 - 19968: 0xCEAE, + 20901 - 19968: 0xD9A2, + 20906 - 19968: 0xD8F1, + 20908 - 19968: 0xD4CF, + 20918 - 19968: 0xE5A7, + 20919 - 19968: 0xD5D2, + 20925 - 19968: 0xD6A9, + 20932 - 19968: 0xF4A2, + 20934 - 19968: 0xF1D7, + 20937 - 19968: 0xD5D8, + 20939 - 19968: 0xF0BD, + 20940 - 19968: 0xD7D0, + 20941 - 19968: 0xD4D0, + 20956 - 19968: 0xD7CF, + 20957 - 19968: 0xEBEA, + 20958 - 19968: 0xFDEB, + 20961 - 19968: 0xDBED, + 20976 - 19968: 0xFCC5, + 20977 - 19968: 0xCBC2, + 20982 - 19968: 0xFDD5, + 20984 - 19968: 0xF4C8, + 20985 - 19968: 0xE8EA, + 20986 - 19968: 0xF5F3, + 20989 - 19968: 0xF9DE, + 20992 - 19968: 0xD3EF, + 20995 - 19968: 0xECD3, + 20998 - 19968: 0xDDC2, + 20999 - 19968: 0xEFB7, + 21000 - 19968: 0xE7D4, + 21002 - 19968: 0xCACA, + 21006 - 19968: 0xD9FB, + 21009 - 19968: 0xFAFD, + 21015 - 19968: 0xD6AA, + 21021 - 19968: 0xF4F8, + 21028 - 19968: 0xF7F7, + 21029 - 19968: 0xDCAC, + 21033 - 19968: 0xD7D7, + 21034 - 19968: 0xDFA2, + 21038 - 19968: 0xCEBE, + 21040 - 19968: 0xD3F0, + 21046 - 19968: 0xF0A4, + 21047 - 19968: 0xE1EC, + 21048 - 19968: 0xCFE7, + 21049 - 19968: 0xF3CB, + 21050 - 19968: 0xEDA9, + 21051 - 19968: 0xCABE, + 21059 - 19968: 0xF4EF, + 21063 - 19968: 0xF6CE, + 21066 - 19968: 0xDEFB, + 21067 - 19968: 0xD0BB, + 21068 - 19968: 0xD5B7, + 21069 - 19968: 0xEEF1, + 21076 - 19968: 0xF4A8, + 21078 - 19968: 0xDCF8, + 21083 - 19968: 0xCBA7, + 21085 - 19968: 0xDACE, + 21089 - 19968: 0xE0E6, + 21097 - 19968: 0xEDA5, + 21098 - 19968: 0xEEF2, + 21103 - 19968: 0xDCF9, + 21106 - 19968: 0xF9DC, + 21109 - 19968: 0xF3DC, + 21117 - 19968: 0xF8F2, + 21119 - 19968: 0xF4F9, + 21123 - 19968: 0xFCF1, + 21127 - 19968: 0xD0BC, + 21128 - 19968: 0xDBF9, + 21129 - 19968: 0xD7B1, + 21133 - 19968: 0xCBFC, + 21137 - 19968: 0xF0A5, + 21138 - 19968: 0xCBFD, + 21147 - 19968: 0xD5F4, + 21151 - 19968: 0xCDED, + 21152 - 19968: 0xCAA5, + 21155 - 19968: 0xD6AB, + 21156 - 19968: 0xD0C2, + 21161 - 19968: 0xF0BE, + 21162 - 19968: 0xD2BD, + 21163 - 19968: 0xCCA4, + 21182 - 19968: 0xFAB6, + 21185 - 19968: 0xCCCD, + 21187 - 19968: 0xDAFA, + 21189 - 19968: 0xF6CF, + 21191 - 19968: 0xE9B8, + 21193 - 19968: 0xD8F5, + 21197 - 19968: 0xCCCE, + 21202 - 19968: 0xD7CD, + 21205 - 19968: 0xD4D1, + 21206 - 19968: 0xE9ED, + 21208 - 19968: 0xCAEB, + 21209 - 19968: 0xD9E2, + 21211 - 19968: 0xFDB2, + 21213 - 19968: 0xE3AD, + 21214 - 19968: 0xD6CC, + 21215 - 19968: 0xD9B4, + 21218 - 19968: 0xE1A7, + 21219 - 19968: 0xEED3, + 21220 - 19968: 0xD0C3, + 21235 - 19968: 0xFDB3, + 21237 - 19968: 0xD5E4, + 21240 - 19968: 0xCFE8, + 21242 - 19968: 0xEDC3, + 21243 - 19968: 0xD0B2, + 21246 - 19968: 0xCEFE, + 21247 - 19968: 0xDAA8, + 21253 - 19968: 0xF8D0, + 21256 - 19968: 0xFDD6, + 21261 - 19968: 0xF8D1, + 21263 - 19968: 0xF8D2, + 21264 - 19968: 0xDCD3, + 21269 - 19968: 0xDDE2, + 21270 - 19968: 0xFBF9, + 21271 - 19968: 0xDDC1, + 21273 - 19968: 0xE3B5, + 21280 - 19968: 0xEDDD, + 21281 - 19968: 0xCEC4, + 21283 - 19968: 0xCBA1, + 21290 - 19968: 0xDDE3, + 21295 - 19968: 0xFCDD, + 21305 - 19968: 0xF9AF, + 21311 - 19968: 0xD2FB, + 21312 - 19968: 0xCFA1, + 21313 - 19968: 0xE4A8, + 21315 - 19968: 0xF4B6, + 21316 - 19968: 0xECFE, + 21319 - 19968: 0xE3AE, + 21320 - 19968: 0xE7ED, + 21321 - 19968: 0xFDC1, + 21322 - 19968: 0xDAE2, + 21325 - 19968: 0xD8B3, + 21329 - 19968: 0xDDE4, + 21330 - 19968: 0xF0EF, + 21331 - 19968: 0xF6F1, + 21332 - 19968: 0xFAF0, + 21335 - 19968: 0xD1F5, + 21338 - 19968: 0xDACF, + 21340 - 19968: 0xDCD4, + 21342 - 19968: 0xDCA6, + 21344 - 19968: 0xEFBF, + 21350 - 19968: 0xCECF, + 21352 - 19968: 0xE0D9, + 21359 - 19968: 0xD9D6, + 21360 - 19968: 0xECD4, + 21361 - 19968: 0xEACB, + 21364 - 19968: 0xCABF, + 21365 - 19968: 0xD5B0, + 21367 - 19968: 0xCFE9, + 21373 - 19968: 0xF1ED, + 21375 - 19968: 0xCCCF, + 21380 - 19968: 0xE4F8, + 21395 - 19968: 0xE4ED, + 21400 - 19968: 0xD7D8, + 21402 - 19968: 0xFDA7, + 21407 - 19968: 0xEAAB, + 21408 - 19968: 0xF6B2, + 21413 - 19968: 0xCFF0, + 21414 - 19968: 0xF9BD, + 21421 - 19968: 0xE6F4, + 21435 - 19968: 0xCBDB, + 21443 - 19968: 0xF3D1, + 21448 - 19968: 0xE9D1, + 21449 - 19968: 0xF3A9, + 21450 - 19968: 0xD0E0, + 21451 - 19968: 0xE9D2, + 21453 - 19968: 0xDAE3, + 21460 - 19968: 0xE2D2, + 21462 - 19968: 0xF6A2, + 21463 - 19968: 0xE1F4, + 21467 - 19968: 0xDAE4, + 21473 - 19968: 0xE7D5, + 21474 - 19968: 0xF5BF, + 21475 - 19968: 0xCFA2, + 21476 - 19968: 0xCDAF, + 21477 - 19968: 0xCFA3, + 21481 - 19968: 0xCDB0, + 21482 - 19968: 0xF1FE, + 21483 - 19968: 0xD0A3, + 21484 - 19968: 0xE1AF, + 21485 - 19968: 0xF8A3, + 21487 - 19968: 0xCAA6, + 21488 - 19968: 0xF7BB, + 21489 - 19968: 0xF2EA, + 21490 - 19968: 0xDEC8, + 21491 - 19968: 0xE9D3, + 21496 - 19968: 0xDEC9, + 21507 - 19968: 0xFDDE, + 21508 - 19968: 0xCAC0, + 21512 - 19968: 0xF9EA, + 21513 - 19968: 0xD1CE, + 21514 - 19968: 0xEED4, + 21516 - 19968: 0xD4D2, + 21517 - 19968: 0xD9A3, + 21518 - 19968: 0xFDA8, + 21519 - 19968: 0xD7D9, + 21520 - 19968: 0xF7CE, + 21521 - 19968: 0xFABE, + 21531 - 19968: 0xCFD6, + 21533 - 19968: 0xD7F0, + 21535 - 19968: 0xEBE1, + 21536 - 19968: 0xF8C5, + 21542 - 19968: 0xDCFA, + 21545 - 19968: 0xDDC3, + 21547 - 19968: 0xF9DF, + 21555 - 19968: 0xE7EF, + 21560 - 19968: 0xFDE5, + 21561 - 19968: 0xF6A3, + 21563 - 19968: 0xD9FC, + 21564 - 19968: 0xFDA9, + 21566 - 19968: 0xE7EE, + 21570 - 19968: 0xD5E5, + 21576 - 19968: 0xEFD0, + 21578 - 19968: 0xCDB1, + 21585 - 19968: 0xF7A2, + 21608 - 19968: 0xF1B2, + 21610 - 19968: 0xF1B1, + 21617 - 19968: 0xCDB2, + 21619 - 19968: 0xDAAB, + 21621 - 19968: 0xCAA7, + 21627 - 19968: 0xE3E2, + 21628 - 19968: 0xFBBC, + 21629 - 19968: 0xD9A4, + 21632 - 19968: 0xEEBA, + 21638 - 19968: 0xF8D3, + 21644 - 19968: 0xFBFA, + 21646 - 19968: 0xCFA4, + 21648 - 19968: 0xDCFB, + 21668 - 19968: 0xF6E3, + 21672 - 19968: 0xEDAA, + 21675 - 19968: 0xF2A1, + 21676 - 19968: 0xCEE1, + 21683 - 19968: 0xFAA6, + 21688 - 19968: 0xF9E0, + 21693 - 19968: 0xECD6, + 21696 - 19968: 0xE4EE, + 21697 - 19968: 0xF9A1, + 21700 - 19968: 0xFBEF, + 21704 - 19968: 0xF9EB, + 21705 - 19968: 0xEEA3, + 21729 - 19968: 0xEAAC, + 21733 - 19968: 0xCAA8, + 21736 - 19968: 0xF4FA, + 21741 - 19968: 0xCDD6, + 21742 - 19968: 0xFCF6, + 21746 - 19968: 0xF4C9, + 21754 - 19968: 0xF8D4, + 21764 - 19968: 0xF8A6, + 21766 - 19968: 0xDECA, + 21767 - 19968: 0xF2C6, + 21774 - 19968: 0xD7DA, + 21776 - 19968: 0xD3D0, + 21788 - 19968: 0xD8C5, + 21807 - 19968: 0xEAE6, + 21809 - 19968: 0xF3DD, + 21813 - 19968: 0xE4DA, + 21822 - 19968: 0xF6E4, + 21828 - 19968: 0xF6F2, + 21830 - 19968: 0xDFC2, + 21839 - 19968: 0xD9FD, + 21843 - 19968: 0xCCF6, + 21846 - 19968: 0xD3BA, + 21854 - 19968: 0xE4AF, + 21859 - 19968: 0xF9E1, + 21884 - 19968: 0xF0A6, + 21888 - 19968: 0xCBD3, + 21892 - 19968: 0xE0BC, + 21894 - 19968: 0xF4CA, + 21895 - 19968: 0xD4FA, + 21897 - 19968: 0xFDAA, + 21898 - 19968: 0xF9E2, + 21912 - 19968: 0xF4B7, + 21913 - 19968: 0xFDC2, + 21914 - 19968: 0xFCB0, + 21916 - 19968: 0xFDEC, + 21917 - 19968: 0xCAE2, + 21927 - 19968: 0xFDBD, + 21929 - 19968: 0xEAE7, + 21930 - 19968: 0xDFC3, + 21931 - 19968: 0xD1D2, + 21932 - 19968: 0xCEE2, + 21934 - 19968: 0xD3A4, + 21957 - 19968: 0xFDAB, + 21959 - 19968: 0xDFE0, + 21972 - 19968: 0xF2C7, + 21978 - 19968: 0xE7F0, + 21980 - 19968: 0xD0EE, + 21983 - 19968: 0xF3AA, + 21987 - 19968: 0xDECB, + 21988 - 19968: 0xF6B8, + 22013 - 19968: 0xE1F5, + 22014 - 19968: 0xF1B3, + 22022 - 19968: 0xF7A3, + 22025 - 19968: 0xCAA9, + 22036 - 19968: 0xCFA5, + 22039 - 19968: 0xDFC4, + 22063 - 19968: 0xE1B0, + 22066 - 19968: 0xF0BF, + 22068 - 19968: 0xF6A4, + 22070 - 19968: 0xE3B6, + 22099 - 19968: 0xFAC6, + 22120 - 19968: 0xD0EF, + 22123 - 19968: 0xFDED, + 22132 - 19968: 0xDDC4, + 22150 - 19968: 0xFCF7, + 22181 - 19968: 0xE6BF, + 22188 - 19968: 0xDEAD, + 22190 - 19968: 0xFABF, + 22196 - 19968: 0xE5F1, + 22204 - 19968: 0xEDC4, + 22218 - 19968: 0xD2A5, + 22221 - 19968: 0xFDEE, + 22225 - 19968: 0xF5B6, + 22234 - 19968: 0xE1F6, + 22235 - 19968: 0xDECC, + 22238 - 19968: 0xFCDE, + 22240 - 19968: 0xECD7, + 22256 - 19968: 0xCDDD, + 22265 - 19968: 0xD6B7, + 22266 - 19968: 0xCDB3, + 22275 - 19968: 0xF8D5, + 22276 - 19968: 0xE5D8, + 22280 - 19968: 0xCFEA, + 22283 - 19968: 0xCFD0, + 22285 - 19968: 0xEACC, + 22290 - 19968: 0xEAAE, + 22291 - 19968: 0xEAAD, + 22294 - 19968: 0xD3F1, + 22296 - 19968: 0xD3A5, + 22303 - 19968: 0xF7CF, + 22312 - 19968: 0xEEA4, + 22317 - 19968: 0xD0A4, + 22320 - 19968: 0xF2A2, + 22331 - 19968: 0xD0F0, + 22336 - 19968: 0xF2A3, + 22338 - 19968: 0xF7F8, + 22343 - 19968: 0xD0B3, + 22346 - 19968: 0xDBA9, + 22349 - 19968: 0xD3BB, + 22350 - 19968: 0xCAEC, + 22352 - 19968: 0xF1A6, + 22353 - 19968: 0xCBD5, + 22369 - 19968: 0xF7E7, + 22372 - 19968: 0xCDDE, + 22374 - 19968: 0xF7A4, + 22378 - 19968: 0xF8C0, + 22382 - 19968: 0xD3DD, + 22384 - 19968: 0xCCD0, + 22389 - 19968: 0xCFA6, + 22396 - 19968: 0xF6F3, + 22402 - 19968: 0xE1F7, + 22408 - 19968: 0xD3DC, + 22411 - 19968: 0xFAFE, + 22419 - 19968: 0xFAA7, + 22432 - 19968: 0xEBD9, + 22434 - 19968: 0xCFA7, + 22435 - 19968: 0xEAAF, + 22467 - 19968: 0xE4EF, + 22471 - 19968: 0xE9B9, + 22472 - 19968: 0xF1D8, + 22475 - 19968: 0xD8D8, + 22478 - 19968: 0xE0F2, + 22495 - 19968: 0xE6B4, + 22496 - 19968: 0xDCFC, + 22512 - 19968: 0xF3F1, + 22516 - 19968: 0xE3D0, + 22519 - 19968: 0xF2FB, + 22521 - 19968: 0xDBC6, + 22522 - 19968: 0xD0F1, + 22524 - 19968: 0xD0F2, + 22528 - 19968: 0xCFDC, + 22530 - 19968: 0xD3D1, + 22533 - 19968: 0xCCB1, + 22534 - 19968: 0xF7D8, + 22536 - 19968: 0xCBA8, + 22537 - 19968: 0xEBBC, + 22538 - 19968: 0xE4BE, + 22558 - 19968: 0xF4DC, + 22561 - 19968: 0xDCC2, + 22564 - 19968: 0xF0A7, + 22567 - 19968: 0xE6C0, + 22570 - 19968: 0xCAED, + 22575 - 19968: 0xE8EB, + 22576 - 19968: 0xE5E8, + 22577 - 19968: 0xDCC3, + 22580 - 19968: 0xEDDE, + 22581 - 19968: 0xD3F2, + 22586 - 19968: 0xCCF7, + 22602 - 19968: 0xCED4, + 22603 - 19968: 0xE7AB, + 22607 - 19968: 0xCBC3, + 22609 - 19968: 0xE1B1, + 22612 - 19968: 0xF7B2, + 22615 - 19968: 0xD3F3, + 22616 - 19968: 0xD3D2, + 22618 - 19968: 0xF5C0, + 22622 - 19968: 0xDFDD, + 22625 - 19968: 0xEEF3, + 22626 - 19968: 0xE7F1, + 22628 - 19968: 0xFDB4, + 22645 - 19968: 0xF2C8, + 22649 - 19968: 0xF3D2, + 22652 - 19968: 0xEEF4, + 22654 - 19968: 0xE2D3, + 22659 - 19968: 0xCCD1, + 22661 - 19968: 0xDFEA, + 22665 - 19968: 0xE9BA, + 22675 - 19968: 0xD9D7, + 22684 - 19968: 0xF5CD, + 22686 - 19968: 0xF1F2, + 22687 - 19968: 0xFAC7, + 22696 - 19968: 0xD9F8, + 22697 - 19968: 0xD4C2, + 22702 - 19968: 0xF6E5, + 22707 - 19968: 0xDDC5, + 22714 - 19968: 0xE7F2, + 22715 - 19968: 0xEDDF, + 22718 - 19968: 0xCACB, + 22721 - 19968: 0xDBFA, + 22725 - 19968: 0xE8B5, + 22727 - 19968: 0xD3A6, + 22734 - 19968: 0xFDB5, + 22737 - 19968: 0xF9C9, + 22739 - 19968: 0xE4E2, + 22741 - 19968: 0xFBBD, + 22744 - 19968: 0xD7A4, + 22745 - 19968: 0xCEC5, + 22750 - 19968: 0xCED5, + 22751 - 19968: 0xD6E6, + 22756 - 19968: 0xE5BD, + 22763 - 19968: 0xDECD, + 22764 - 19968: 0xECF3, + 22767 - 19968: 0xEDE0, + 22777 - 19968: 0xECEC, + 22778 - 19968: 0xFBBE, + 22779 - 19968: 0xDFEB, + 22781 - 19968: 0xE1F8, + 22799 - 19968: 0xF9BE, + 22804 - 19968: 0xD0F3, + 22805 - 19968: 0xE0AA, + 22806 - 19968: 0xE8E2, + 22809 - 19968: 0xE2D4, + 22810 - 19968: 0xD2FD, + 22812 - 19968: 0xE5A8, + 22818 - 19968: 0xD9D3, + 22823 - 19968: 0xD3DE, + 22825 - 19968: 0xF4B8, + 22826 - 19968: 0xF7BC, + 22827 - 19968: 0xDCFD, + 22829 - 19968: 0xE8EC, + 22830 - 19968: 0xE4E7, + 22833 - 19968: 0xE3F7, + 22839 - 19968: 0xECA8, + 22846 - 19968: 0xFAF1, + 22852 - 19968: 0xE5F2, + 22855 - 19968: 0xD0F4, + 22856 - 19968: 0xD2AF, + 22857 - 19968: 0xDCE5, + 22862 - 19968: 0xD0A5, + 22863 - 19968: 0xF1B4, + 22864 - 19968: 0xFCB1, + 22865 - 19968: 0xCCF8, + 22868 - 19968: 0xDDC6, + 22869 - 19968: 0xFAD1, + 22871 - 19968: 0xF7DF, + 22874 - 19968: 0xFAA8, + 22880 - 19968: 0xEEF5, + 22882 - 19968: 0xDECE, + 22887 - 19968: 0xE7F3, + 22890 - 19968: 0xF7AC, + 22891 - 19968: 0xEBC4, + 22892 - 19968: 0xEDE1, + 22893 - 19968: 0xE0AB, + 22894 - 19968: 0xDDC7, + 22899 - 19968: 0xD2B3, + 22900 - 19968: 0xD2BF, + 22904 - 19968: 0xCACC, + 22909 - 19968: 0xFBBF, + 22914 - 19968: 0xE5FD, + 22915 - 19968: 0xDDE5, + 22916 - 19968: 0xD8CD, + 22922 - 19968: 0xECF4, + 22931 - 19968: 0xD0F5, + 22934 - 19968: 0xE8ED, + 22935 - 19968: 0xD0D2, + 22937 - 19968: 0xD9D8, + 22949 - 19968: 0xF6E6, + 22952 - 19968: 0xDBAA, + 22956 - 19968: 0xF7E0, + 22969 - 19968: 0xD8D9, + 22971 - 19968: 0xF4A3, + 22974 - 19968: 0xF4DD, + 22979 - 19968: 0xEFD1, + 22982 - 19968: 0xD9B5, + 22985 - 19968: 0xEDAB, + 22987 - 19968: 0xE3B7, + 22992 - 19968: 0xEEBB, + 22993 - 19968: 0xCDB4, + 22995 - 19968: 0xE0F3, + 22996 - 19968: 0xEACD, + 23001 - 19968: 0xECF5, + 23002 - 19968: 0xE8EE, + 23004 - 19968: 0xCBA9, + 23005 - 19968: 0xF1AF, + 23014 - 19968: 0xCACD, + 23016 - 19968: 0xECA9, + 23018 - 19968: 0xF2EB, + 23020 - 19968: 0xFDEF, + 23022 - 19968: 0xF9F3, + 23032 - 19968: 0xE6C1, + 23035 - 19968: 0xECD8, + 23039 - 19968: 0xEDAC, + 23041 - 19968: 0xEACE, + 23043 - 19968: 0xE8DF, + 23057 - 19968: 0xDECF, + 23064 - 19968: 0xD2A6, + 23067 - 19968: 0xE7F4, + 23068 - 19968: 0xD1D6, + 23071 - 19968: 0xE6C2, + 23072 - 19968: 0xE3E3, + 23077 - 19968: 0xE4B0, + 23081 - 19968: 0xD8B4, + 23094 - 19968: 0xF6A5, + 23100 - 19968: 0xF3DE, + 23105 - 19968: 0xD7A5, + 23110 - 19968: 0xF7E8, + 23113 - 19968: 0xE8C6, + 23130 - 19968: 0xFBE6, + 23138 - 19968: 0xDDE6, + 23142 - 19968: 0xDCFE, + 23186 - 19968: 0xD8DA, + 23194 - 19968: 0xDAAC, + 23195 - 19968: 0xEAB0, + 23204 - 19968: 0xE3B8, + 23233 - 19968: 0xCAAA, + 23234 - 19968: 0xE1F9, + 23236 - 19968: 0xEAB1, + 23241 - 19968: 0xF2EC, + 23244 - 19968: 0xFAEE, + 23265 - 19968: 0xEED5, + 23270 - 19968: 0xF9F4, + 23273 - 19968: 0xD2EC, + 23301 - 19968: 0xFBFB, + 23305 - 19968: 0xFDF0, + 23307 - 19968: 0xE0BD, + 23308 - 19968: 0xCEE3, + 23318 - 19968: 0xF8C6, + 23338 - 19968: 0xDEAE, + 23360 - 19968: 0xDFC5, + 23363 - 19968: 0xE5BE, + 23376 - 19968: 0xEDAD, + 23377 - 19968: 0xFAEA, + 23380 - 19968: 0xCDEE, + 23381 - 19968: 0xEDA6, + 23383 - 19968: 0xEDAE, + 23384 - 19968: 0xF0ED, + 23386 - 19968: 0xDDA1, + 23388 - 19968: 0xEDAF, + 23389 - 19968: 0xFCF8, + 23391 - 19968: 0xD8EB, + 23395 - 19968: 0xCCF9, + 23396 - 19968: 0xCDB5, + 23401 - 19968: 0xFAA9, + 23403 - 19968: 0xE1DD, + 23408 - 19968: 0xE2D5, + 23409 - 19968: 0xEDCF, + 23413 - 19968: 0xDDA2, + 23416 - 19968: 0xF9CA, + 23418 - 19968: 0xEAE8, + 23420 - 19968: 0xE5ED, + 23429 - 19968: 0xD3EB, + 23431 - 19968: 0xE9D4, + 23432 - 19968: 0xE1FA, + 23433 - 19968: 0xE4CC, + 23435 - 19968: 0xE1E4, + 23436 - 19968: 0xE8C7, + 23439 - 19968: 0xCEDB, + 23443 - 19968: 0xDCD5, + 23445 - 19968: 0xF7B5, + 23446 - 19968: 0xFCF3, + 23447 - 19968: 0xF0F3, + 23448 - 19968: 0xCEAF, + 23449 - 19968: 0xF1B5, + 23450 - 19968: 0xEFD2, + 23451 - 19968: 0xE8C8, + 23452 - 19968: 0xEBF1, + 23458 - 19968: 0xCBD4, + 23459 - 19968: 0xE0BE, + 23460 - 19968: 0xE3F8, + 23461 - 19968: 0xEAE9, + 23462 - 19968: 0xFCB2, + 23468 - 19968: 0xE0F4, + 23470 - 19968: 0xCFE0, + 23472 - 19968: 0xEEA5, + 23475 - 19968: 0xFAAA, + 23476 - 19968: 0xE6C3, + 23477 - 19968: 0xE1B2, + 23478 - 19968: 0xCAAB, + 23480 - 19968: 0xE3E4, + 23481 - 19968: 0xE9BB, + 23487 - 19968: 0xE2D6, + 23488 - 19968: 0xF3F2, + 23490 - 19968: 0xEED6, + 23491 - 19968: 0xEAB2, + 23492 - 19968: 0xD0F6, + 23493 - 19968: 0xECD9, + 23494 - 19968: 0xDACB, + 23495 - 19968: 0xCFA8, + 23500 - 19968: 0xDDA3, + 23504 - 19968: 0xD8DB, + 23506 - 19968: 0xF9CE, + 23507 - 19968: 0xE9D5, + 23508 - 19968: 0xE3D1, + 23511 - 19968: 0xD2BC, + 23518 - 19968: 0xD8AC, + 23519 - 19968: 0xF3CC, + 23521 - 19968: 0xCDFB, + 23522 - 19968: 0xF6D6, + 23524 - 19968: 0xE7F5, + 23525 - 19968: 0xE8EF, + 23526 - 19968: 0xE3F9, + 23527 - 19968: 0xD2BB, + 23528 - 19968: 0xF3F3, + 23529 - 19968: 0xE3FB, + 23531 - 19968: 0xDED0, + 23532 - 19968: 0xCEB0, + 23534 - 19968: 0xD6F7, + 23535 - 19968: 0xF1D9, + 23541 - 19968: 0xF5C1, + 23542 - 19968: 0xDCC4, + 23544 - 19968: 0xF5BB, + 23546 - 19968: 0xDED1, + 23553 - 19968: 0xDCE6, + 23556 - 19968: 0xDED2, + 23559 - 19968: 0xEDE2, + 23560 - 19968: 0xEEF6, + 23561 - 19968: 0xEACF, + 23562 - 19968: 0xF0EE, + 23563 - 19968: 0xE3FC, + 23565 - 19968: 0xD3DF, + 23566 - 19968: 0xD3F4, + 23567 - 19968: 0xE1B3, + 23569 - 19968: 0xE1B4, + 23574 - 19968: 0xF4D3, + 23577 - 19968: 0xDFC6, + 23588 - 19968: 0xE9D6, + 23592 - 19968: 0xDBAB, + 23601 - 19968: 0xF6A6, + 23608 - 19968: 0xE3B9, + 23609 - 19968: 0xEBC5, + 23610 - 19968: 0xF4A9, + 23611 - 19968: 0xCDB6, + 23612 - 19968: 0xD2F9, + 23614 - 19968: 0xDAAD, + 23615 - 19968: 0xD2E3, + 23616 - 19968: 0xCFD1, + 23621 - 19968: 0xCBDC, + 23622 - 19968: 0xCCFA, + 23624 - 19968: 0xCFDD, + 23627 - 19968: 0xE8A9, + 23629 - 19968: 0xE3BB, + 23630 - 19968: 0xE3BA, + 23633 - 19968: 0xE0DA, + 23637 - 19968: 0xEEF7, + 23643 - 19968: 0xDCB3, + 23648 - 19968: 0xD3F5, + 23650 - 19968: 0xD7A6, + 23652 - 19968: 0xF6B5, + 23653 - 19968: 0xD7DB, + 23660 - 19968: 0xE1D5, + 23663 - 19968: 0xD4EA, + 23665 - 19968: 0xDFA3, + 23673 - 19968: 0xFDDF, + 23696 - 19968: 0xD0F7, + 23697 - 19968: 0xEDD4, + 23713 - 19968: 0xCBAA, + 23721 - 19968: 0xE4DB, + 23723 - 19968: 0xE1FB, + 23724 - 19968: 0xCBA2, + 23729 - 19968: 0xD3E0, + 23731 - 19968: 0xE4BF, + 23733 - 19968: 0xFBC0, + 23735 - 19968: 0xDABE, + 23736 - 19968: 0xE4CD, + 23738 - 19968: 0xD6B9, + 23742 - 19968: 0xEFC0, + 23744 - 19968: 0xE1FC, + 23769 - 19968: 0xF6B9, + 23776 - 19968: 0xDFC7, + 23784 - 19968: 0xE4B1, + 23791 - 19968: 0xDCE7, + 23792 - 19968: 0xDCE8, + 23796 - 19968: 0xFAD6, + 23798 - 19968: 0xD3F6, + 23803 - 19968: 0xF1DA, + 23805 - 19968: 0xFAF2, + 23815 - 19968: 0xE2FD, + 23821 - 19968: 0xD5CF, + 23822 - 19968: 0xD0F8, + 23825 - 19968: 0xCDDF, + 23828 - 19968: 0xF5CB, + 23830 - 19968: 0xE4F0, + 23831 - 19968: 0xCBAB, + 23833 - 19968: 0xD7C4, + 23847 - 19968: 0xE2FE, + 23849 - 19968: 0xDDDA, + 23883 - 19968: 0xDAAE, + 23884 - 19968: 0xCAEE, + 23888 - 19968: 0xD5B9, + 23913 - 19968: 0xE3A1, + 23916 - 19968: 0xE8E3, + 23919 - 19968: 0xF3AB, + 23943 - 19968: 0xCFA9, + 23947 - 19968: 0xD3F7, + 23965 - 19968: 0xD4F1, + 23968 - 19968: 0xCEE4, + 23970 - 19968: 0xE8F2, + 23978 - 19968: 0xE5F5, + 23992 - 19968: 0xE7AE, + 23994 - 19968: 0xD6BA, + 23996 - 19968: 0xDFEC, + 23997 - 19968: 0xE4C0, + 24013 - 19968: 0xE8E4, + 24018 - 19968: 0xD8B5, + 24022 - 19968: 0xE4DC, + 24029 - 19968: 0xF4B9, + 24030 - 19968: 0xF1B6, + 24033 - 19968: 0xE2DE, + 24034 - 19968: 0xE1B5, + 24037 - 19968: 0xCDEF, + 24038 - 19968: 0xF1A7, + 24039 - 19968: 0xCEE5, + 24040 - 19968: 0xCBDD, + 24043 - 19968: 0xD9E3, + 24046 - 19968: 0xF3AC, + 24049 - 19968: 0xD0F9, + 24050 - 19968: 0xECAB, + 24051 - 19968: 0xDED3, + 24052 - 19968: 0xF7E9, + 24055 - 19968: 0xF9F5, + 24061 - 19968: 0xE1DE, + 24062 - 19968: 0xCBEE, + 24066 - 19968: 0xE3BC, + 24067 - 19968: 0xF8D6, + 24070 - 19968: 0xDBEE, + 24076 - 19968: 0xFDF1, + 24081 - 19968: 0xF7B6, + 24086 - 19968: 0xF4DE, + 24089 - 19968: 0xF2ED, + 24091 - 19968: 0xDBD9, + 24093 - 19968: 0xF0A8, + 24101 - 19968: 0xE1FD, + 24107 - 19968: 0xDED4, + 24109 - 19968: 0xE0AC, + 24115 - 19968: 0xEDE3, + 24118 - 19968: 0xD3E1, + 24120 - 19968: 0xDFC8, + 24125 - 19968: 0xD9B6, + 24127 - 19968: 0xFDAC, + 24128 - 19968: 0xEFD3, + 24132 - 19968: 0xE4C1, + 24133 - 19968: 0xF8EB, + 24135 - 19968: 0xDBAC, + 24140 - 19968: 0xFCC6, + 24149 - 19968: 0xD8AD, + 24159 - 19968: 0xF6BA, + 24161 - 19968: 0xDBDF, + 24162 - 19968: 0xD3D3, + 24163 - 19968: 0xF8C7, + 24178 - 19968: 0xCACE, + 24179 - 19968: 0xF8C1, + 24180 - 19968: 0xD2B4, + 24183 - 19968: 0xDCB4, + 24184 - 19968: 0xFAB9, + 24185 - 19968: 0xCACF, + 24187 - 19968: 0xFCB3, + 24188 - 19968: 0xEAEA, + 24189 - 19968: 0xEAEB, + 24190 - 19968: 0xD0FA, + 24196 - 19968: 0xEDE4, + 24199 - 19968: 0xDDE7, + 24202 - 19968: 0xDFC9, + 24207 - 19968: 0xDFED, + 24213 - 19968: 0xEEBC, + 24215 - 19968: 0xEFC1, + 24218 - 19968: 0xCCD2, + 24220 - 19968: 0xDDA4, + 24224 - 19968: 0xDFCA, + 24230 - 19968: 0xD3F8, + 24231 - 19968: 0xF1A8, + 24235 - 19968: 0xCDB7, + 24237 - 19968: 0xEFD4, + 24245 - 19968: 0xE4DD, + 24246 - 19968: 0xDFEE, + 24247 - 19968: 0xCBAC, + 24248 - 19968: 0xE9BC, + 24254 - 19968: 0xEAEC, + 24258 - 19968: 0xDFCB, + 24264 - 19968: 0xF9BF, + 24265 - 19968: 0xD6AF, + 24266 - 19968: 0xD5C6, + 24272 - 19968: 0xCFAA, + 24275 - 19968: 0xCEA9, + 24278 - 19968: 0xD6F8, + 24282 - 19968: 0xF1B7, + 24283 - 19968: 0xEEF8, + 24287 - 19968: 0xD9D9, + 24288 - 19968: 0xF3DF, + 24290 - 19968: 0xF8C8, + 24291 - 19968: 0xCEC6, + 24300 - 19968: 0xD5E6, + 24307 - 19968: 0xF4E6, + 24310 - 19968: 0xE6C5, + 24311 - 19968: 0xEFD5, + 24314 - 19968: 0xCBEF, + 24315 - 19968: 0xFCDF, + 24321 - 19968: 0xDCA7, + 24324 - 19968: 0xD6E7, + 24330 - 19968: 0xF8C9, + 24335 - 19968: 0xE3D2, + 24337 - 19968: 0xE3BD, + 24339 - 19968: 0xCFE1, + 24340 - 19968: 0xF0C0, + 24341 - 19968: 0xECDA, + 24343 - 19968: 0xDDD7, + 24344 - 19968: 0xFBF0, + 24347 - 19968: 0xECAC, + 24351 - 19968: 0xF0A9, + 24358 - 19968: 0xFAD7, + 24359 - 19968: 0xFBC1, + 24361 - 19968: 0xD2C0, + 24369 - 19968: 0xE5B0, + 24373 - 19968: 0xEDE5, + 24378 - 19968: 0xCBAD, + 24380 - 19968: 0xF9B0, + 24392 - 19968: 0xF7A5, + 24394 - 19968: 0xCBAE, + 24396 - 19968: 0xDAAF, + 24398 - 19968: 0xD8B6, + 24406 - 19968: 0xD3A7, + 24407 - 19968: 0xFBB2, + 24409 - 19968: 0xFDC4, + 24411 - 19968: 0xECAD, + 24418 - 19968: 0xFBA1, + 24422 - 19968: 0xE5E9, + 24423 - 19968: 0xE9EE, + 24425 - 19968: 0xF3F4, + 24426 - 19968: 0xF8F3, + 24427 - 19968: 0xF0C1, + 24428 - 19968: 0xDEAF, + 24429 - 19968: 0xF8B0, + 24432 - 19968: 0xF3E0, + 24433 - 19968: 0xE7AF, + 24439 - 19968: 0xDBAD, + 24441 - 19968: 0xE6B5, + 24444 - 19968: 0xF9A8, + 24447 - 19968: 0xDDD8, + 24448 - 19968: 0xE8D9, + 24449 - 19968: 0xEFD6, + 24453 - 19968: 0xD3E2, + 24455 - 19968: 0xE2DF, + 24458 - 19968: 0xFCE0, + 24459 - 19968: 0xD7C8, + 24460 - 19968: 0xFDAD, + 24464 - 19968: 0xDFEF, + 24465 - 19968: 0xCCD3, + 24466 - 19968: 0xD3F9, + 24471 - 19968: 0xD4F0, + 24472 - 19968: 0xDBC7, + 24473 - 19968: 0xDED5, + 24478 - 19968: 0xF0F4, + 24480 - 19968: 0xD5D0, + 24481 - 19968: 0xE5D9, + 24488 - 19968: 0xFCC7, + 24489 - 19968: 0xDCD6, + 24490 - 19968: 0xE2E0, + 24494 - 19968: 0xDAB0, + 24501 - 19968: 0xF3A3, + 24503 - 19968: 0xD3EC, + 24505 - 19968: 0xF4CB, + 24509 - 19968: 0xFDC5, + 24515 - 19968: 0xE3FD, + 24517 - 19968: 0xF9B1, + 24524 - 19968: 0xD0FB, + 24525 - 19968: 0xECDB, + 24534 - 19968: 0xF5BC, + 24535 - 19968: 0xF2A4, + 24536 - 19968: 0xD8CE, + 24537 - 19968: 0xD8CF, + 24544 - 19968: 0xF5F7, + 24555 - 19968: 0xF6E1, + 24565 - 19968: 0xD2B7, + 24573 - 19968: 0xFBEC, + 24575 - 19968: 0xDDC8, + 24591 - 19968: 0xE4E8, + 24594 - 19968: 0xD2C1, + 24598 - 19968: 0xF8D7, + 24604 - 19968: 0xD6BB, + 24605 - 19968: 0xDED6, + 24608 - 19968: 0xF7BD, + 24609 - 19968: 0xECAE, + 24613 - 19968: 0xD0E1, + 24615 - 19968: 0xE0F5, + 24616 - 19968: 0xEAB3, + 24618 - 19968: 0xCED6, + 24623 - 19968: 0xCCA5, + 24641 - 19968: 0xECF6, + 24642 - 19968: 0xE2E1, + 24643 - 19968: 0xE3BE, + 24653 - 19968: 0xFCC8, + 24656 - 19968: 0xCDF0, + 24658 - 19968: 0xF9F6, + 24661 - 19968: 0xDFF0, + 24665 - 19968: 0xE5BF, + 24669 - 19968: 0xCEBF, + 24674 - 19968: 0xFCE1, + 24675 - 19968: 0xEDB0, + 24676 - 19968: 0xFDD1, + 24677 - 19968: 0xF6BB, + 24680 - 19968: 0xF9CF, + 24681 - 19968: 0xEBDA, + 24682 - 19968: 0xCAC1, + 24684 - 19968: 0xD2B8, + 24685 - 19968: 0xCDF1, + 24687 - 19968: 0xE3D3, + 24688 - 19968: 0xFDE6, + 24709 - 19968: 0xE6ED, + 24713 - 19968: 0xE3FA, + 24716 - 19968: 0xF0AA, + 24717 - 19968: 0xF9D0, + 24724 - 19968: 0xFCE2, + 24726 - 19968: 0xF8A7, + 24730 - 19968: 0xE1E5, + 24731 - 19968: 0xEEF9, + 24735 - 19968: 0xE7F6, + 24736 - 19968: 0xEAED, + 24739 - 19968: 0xFCB4, + 24740 - 19968: 0xF5C2, + 24743 - 19968: 0xD7DC, + 24752 - 19968: 0xF0F5, + 24754 - 19968: 0xDDE8, + 24755 - 19968: 0xD3ED, + 24756 - 19968: 0xF5FC, + 24758 - 19968: 0xDABF, + 24760 - 19968: 0xCCFB, + 24764 - 19968: 0xD3FA, + 24765 - 19968: 0xF4A4, + 24773 - 19968: 0xEFD7, + 24775 - 19968: 0xD4C3, + 24785 - 19968: 0xFBE3, + 24794 - 19968: 0xFBED, + 24796 - 19968: 0xE0AD, + 24799 - 19968: 0xEAEE, + 24800 - 19968: 0xFBB3, + 24801 - 19968: 0xE4C2, + 24816 - 19968: 0xF6E7, + 24817 - 19968: 0xD2DD, + 24819 - 19968: 0xDFCC, + 24822 - 19968: 0xFCC9, + 24825 - 19968: 0xE5A9, + 24826 - 19968: 0xE0F6, + 24827 - 19968: 0xF6B3, + 24833 - 19968: 0xE1FE, + 24838 - 19968: 0xCBF0, + 24840 - 19968: 0xEAEF, + 24841 - 19968: 0xEAF0, + 24845 - 19968: 0xDAC0, + 24846 - 19968: 0xF8B4, + 24847 - 19968: 0xEBF2, + 24853 - 19968: 0xE4C3, + 24858 - 19968: 0xE9D7, + 24859 - 19968: 0xE4F1, + 24863 - 19968: 0xCAEF, + 24871 - 19968: 0xCED7, + 24880 - 19968: 0xFCCA, + 24884 - 19968: 0xF3E1, + 24887 - 19968: 0xCBC4, + 24892 - 19968: 0xE3E5, + 24894 - 19968: 0xCBC5, + 24895 - 19968: 0xEAB4, + 24898 - 19968: 0xE9BD, + 24900 - 19968: 0xD7C9, + 24903 - 19968: 0xEBDB, + 24904 - 19968: 0xEDB1, + 24906 - 19968: 0xCCC3, + 24907 - 19968: 0xF7BE, + 24908 - 19968: 0xFCCB, + 24915 - 19968: 0xF8F4, + 24917 - 19968: 0xD9B7, + 24920 - 19968: 0xF3D3, + 24921 - 19968: 0xF3D4, + 24925 - 19968: 0xF7E4, + 24927 - 19968: 0xF7D1, + 24930 - 19968: 0xD8B7, + 24931 - 19968: 0xCEB1, + 24932 - 19968: 0xCAC2, + 24935 - 19968: 0xFBB4, + 24936 - 19968: 0xCBC6, + 24939 - 19968: 0xF0F6, + 24942 - 19968: 0xD5E7, + 24944 - 19968: 0xEAD0, + 24950 - 19968: 0xCCD4, + 24951 - 19968: 0xCBAF, + 24957 - 19968: 0xF4AA, + 24958 - 19968: 0xE9AF, + 24961 - 19968: 0xF5C3, + 24962 - 19968: 0xE9D8, + 24970 - 19968: 0xDDE9, + 24974 - 19968: 0xF1F3, + 24976 - 19968: 0xD5FB, + 24977 - 19968: 0xDEBB, + 24980 - 19968: 0xF4FB, + 24984 - 19968: 0xFDF3, + 24985 - 19968: 0xFDF2, + 24986 - 19968: 0xF7A6, + 24996 - 19968: 0xDDC9, + 24999 - 19968: 0xD4D3, + 25001 - 19968: 0xCCA8, + 25003 - 19968: 0xDAC1, + 25004 - 19968: 0xCCD5, + 25006 - 19968: 0xD9E4, + 25010 - 19968: 0xFACA, + 25014 - 19968: 0xE5E3, + 25018 - 19968: 0xD3BC, + 25022 - 19968: 0xCAF0, + 25027 - 19968: 0xD0C4, + 25031 - 19968: 0xCAD0, + 25032 - 19968: 0xFAAB, + 25033 - 19968: 0xEBEB, + 25034 - 19968: 0xE7F8, + 25035 - 19968: 0xD9E5, + 25062 - 19968: 0xD1D7, + 25074 - 19968: 0xF3A4, + 25078 - 19968: 0xD4FB, + 25079 - 19968: 0xFCE3, + 25080 - 19968: 0xFAD8, + 25082 - 19968: 0xF3D5, + 25084 - 19968: 0xCFAB, + 25087 - 19968: 0xEBF3, + 25088 - 19968: 0xD5FC, + 25095 - 19968: 0xD3D4, + 25096 - 19968: 0xCDFC, + 25098 - 19968: 0xD9E6, + 25100 - 19968: 0xE2F9, + 25101 - 19968: 0xE2A1, + 25102 - 19968: 0xEBD4, + 25104 - 19968: 0xE0F7, + 25105 - 19968: 0xE4B2, + 25106 - 19968: 0xCCFC, + 25110 - 19968: 0xFBE4, + 25114 - 19968: 0xF4AB, + 25119 - 19968: 0xD0BD, + 25121 - 19968: 0xCAF1, + 25130 - 19968: 0xEFB8, + 25134 - 19968: 0xD7C0, + 25136 - 19968: 0xEEFA, + 25137 - 19968: 0xFDF4, + 25140 - 19968: 0xD3E3, + 25142 - 19968: 0xFBC2, + 25150 - 19968: 0xD5E8, + 25151 - 19968: 0xDBAE, + 25152 - 19968: 0xE1B6, + 25153 - 19968: 0xF8B7, + 25159 - 19968: 0xE0BF, + 25160 - 19968: 0xFBC3, + 25161 - 19968: 0xDDEA, + 25163 - 19968: 0xE2A2, + 25165 - 19968: 0xEEA6, + 25171 - 19968: 0xF6E8, + 25176 - 19968: 0xF6F5, + 25198 - 19968: 0xDDCA, + 25201 - 19968: 0xD0E2, + 25206 - 19968: 0xDDA6, + 25209 - 19968: 0xDDEB, + 25212 - 19968: 0xE4F9, + 25215 - 19968: 0xE3AF, + 25216 - 19968: 0xD0FC, + 25220 - 19968: 0xF4FC, + 25225 - 19968: 0xCCBC, + 25226 - 19968: 0xF7EA, + 25233 - 19968: 0xE5E4, + 25234 - 19968: 0xDFF1, + 25237 - 19968: 0xF7E1, + 25239 - 19968: 0xF9F7, + 25240 - 19968: 0xEFB9, + 25243 - 19968: 0xF8D8, + 25259 - 19968: 0xF9A9, + 25265 - 19968: 0xF8D9, + 25269 - 19968: 0xEEBD, + 25273 - 19968: 0xD8C6, + 25276 - 19968: 0xE4E3, + 25277 - 19968: 0xF5CE, + 25282 - 19968: 0xDDD9, + 25287 - 19968: 0xD9E7, + 25288 - 19968: 0xD2B9, + 25289 - 19968: 0xD5C3, + 25292 - 19968: 0xDAE5, + 25293 - 19968: 0xDAD0, + 25295 - 19968: 0xD1D9, + 25296 - 19968: 0xCED8, + 25298 - 19968: 0xCBDE, + 25299 - 19968: 0xF4AC, + 25300 - 19968: 0xDAFB, + 25302 - 19968: 0xF6E9, + 25303 - 19968: 0xE8F3, + 25304 - 19968: 0xCFAC, + 25305 - 19968: 0xF0F0, + 25307 - 19968: 0xF4FD, + 25308 - 19968: 0xDBC8, + 25324 - 19968: 0xCEC0, + 25325 - 19968: 0xE3D4, + 25326 - 19968: 0xD1CF, + 25327 - 19968: 0xF1F5, + 25329 - 19968: 0xCDF2, + 25331 - 19968: 0xCFEB, + 25335 - 19968: 0xCDB8, + 25342 - 19968: 0xE3A6, + 25343 - 19968: 0xD1DA, + 25345 - 19968: 0xF2A5, + 25351 - 19968: 0xF2A6, + 25353 - 19968: 0xE4CE, + 25361 - 19968: 0xD3FB, + 25387 - 19968: 0xF1A9, + 25391 - 19968: 0xF2C9, + 25402 - 19968: 0xEFD8, + 25403 - 19968: 0xE6C9, + 25405 - 19968: 0xD8B8, + 25406 - 19968: 0xFAF3, + 25417 - 19968: 0xF3B5, + 25420 - 19968: 0xF8A4, + 25423 - 19968: 0xD1F3, + 25424 - 19968: 0xE6C8, + 25429 - 19968: 0xF8DA, + 25447 - 19968: 0xDCE9, + 25448 - 19968: 0xDED7, + 25454 - 19968: 0xCBDF, + 25458 - 19968: 0xCFEC, + 25463 - 19968: 0xF4DF, + 25466 - 19968: 0xD1F4, + 25467 - 19968: 0xD2BA, + 25471 - 19968: 0xDFF2, + 25475 - 19968: 0xE1B7, + 25480 - 19968: 0xE2A3, + 25481 - 19968: 0xD3FC, + 25484 - 19968: 0xEDE6, + 25490 - 19968: 0xDBC9, + 25494 - 19968: 0xE4FA, + 25496 - 19968: 0xCFDE, + 25499 - 19968: 0xCED0, + 25504 - 19968: 0xD5D3, + 25505 - 19968: 0xF3F5, + 25506 - 19968: 0xF7AE, + 25509 - 19968: 0xEFC8, + 25511 - 19968: 0xCDF3, + 25512 - 19968: 0xF5CF, + 25513 - 19968: 0xE5F3, + 25514 - 19968: 0xF0C2, + 25536 - 19968: 0xCAD1, + 25540 - 19968: 0xEAF1, + 25542 - 19968: 0xD0A6, + 25551 - 19968: 0xD9DA, + 25552 - 19968: 0xF0AB, + 25558 - 19968: 0xEBE7, + 25562 - 19968: 0xE5C0, + 25563 - 19968: 0xFCB5, + 25569 - 19968: 0xE4C4, + 25581 - 19968: 0xCCA9, + 25582 - 19968: 0xFDC6, + 25588 - 19968: 0xEAB5, + 25590 - 19968: 0xE5AA, + 25591 - 19968: 0xDFBA, + 25613 - 19968: 0xE1DF, + 25615 - 19968: 0xDAD1, + 25620 - 19968: 0xE1B8, + 25622 - 19968: 0xE8F4, + 25623 - 19968: 0xD3FD, + 25628 - 19968: 0xE2A4, + 25634 - 19968: 0xF2CA, + 25644 - 19968: 0xDAE6, + 25645 - 19968: 0xF7B3, + 25658 - 19968: 0xFDCD, + 25662 - 19968: 0xF3B6, + 25688 - 19968: 0xEED7, + 25696 - 19968: 0xF5C4, + 25705 - 19968: 0xD8A4, + 25711 - 19968: 0xF2A7, + 25720 - 19968: 0xD9B8, + 25721 - 19968: 0xD9B9, + 25722 - 19968: 0xEFC9, + 25736 - 19968: 0xD6CE, + 25745 - 19968: 0xF7CB, + 25746 - 19968: 0xDFAE, + 25747 - 19968: 0xE8F5, + 25754 - 19968: 0xD2B5, + 25758 - 19968: 0xD3D5, + 25764 - 19968: 0xF4CC, + 25765 - 19968: 0xDAFC, + 25771 - 19968: 0xD9E8, + 25773 - 19968: 0xF7EB, + 25774 - 19968: 0xF5C9, + 25776 - 19968: 0xF3BC, + 25778 - 19968: 0xDAD2, + 25787 - 19968: 0xD3B5, + 25793 - 19968: 0xE8B6, + 25796 - 19968: 0xD6CF, + 25797 - 19968: 0xF4BA, + 25799 - 19968: 0xF7C9, + 25802 - 19968: 0xCCAA, + 25805 - 19968: 0xF0C3, + 25806 - 19968: 0xCCD6, + 25810 - 19968: 0xD0D3, + 25812 - 19968: 0xD3BD, + 25816 - 19968: 0xDBFB, + 25818 - 19968: 0xCBE0, + 25825 - 19968: 0xD3E4, + 25826 - 19968: 0xF6F7, + 25829 - 19968: 0xD5BA, + 25830 - 19968: 0xF3CD, + 25831 - 19968: 0xCBE1, + 25836 - 19968: 0xEBF4, + 25842 - 19968: 0xF4AD, + 25844 - 19968: 0xFCAA, + 25850 - 19968: 0xF7EC, + 25854 - 19968: 0xE8F6, + 25856 - 19968: 0xDAE7, + 25860 - 19968: 0xF7CC, + 25880 - 19968: 0xE5C1, + 25885 - 19968: 0xE0EE, + 25891 - 19968: 0xD5FD, + 25898 - 19968: 0xCEE6, + 25899 - 19968: 0xFCAB, + 25900 - 19968: 0xD5BB, + 25903 - 19968: 0xF2A8, + 25910 - 19968: 0xE2A5, + 25911 - 19968: 0xCDB9, + 25912 - 19968: 0xEAF2, + 25913 - 19968: 0xCBC7, + 25915 - 19968: 0xCDF4, + 25918 - 19968: 0xDBAF, + 25919 - 19968: 0xEFD9, + 25925 - 19968: 0xCDBA, + 25928 - 19968: 0xFCF9, + 25933 - 19968: 0xDFF3, + 25934 - 19968: 0xCEE7, + 25935 - 19968: 0xDAC2, + 25937 - 19968: 0xCFAD, + 25942 - 19968: 0xE7F9, + 25943 - 19968: 0xF8A8, + 25950 - 19968: 0xF3E2, + 25954 - 19968: 0xCAF2, + 25955 - 19968: 0xDFA4, + 25958 - 19968: 0xD4C4, + 25964 - 19968: 0xCCD7, + 25965 - 19968: 0xE5C2, + 25970 - 19968: 0xCDBB, + 25972 - 19968: 0xEFDA, + 25973 - 19968: 0xEED8, + 25975 - 19968: 0xDDA7, + 25976 - 19968: 0xE2A6, + 25982 - 19968: 0xE0C0, + 25986 - 19968: 0xD6B0, + 25987 - 19968: 0xF8CA, + 25989 - 19968: 0xFCFA, + 25991 - 19968: 0xD9FE, + 25996 - 19968: 0xDEB0, + 26000 - 19968: 0xDDEC, + 26001 - 19968: 0xDAE8, + 26007 - 19968: 0xD4E0, + 26009 - 19968: 0xD6F9, + 26011 - 19968: 0xCDD7, + 26012 - 19968: 0xDED8, + 26015 - 19968: 0xF2F8, + 26017 - 19968: 0xE4D6, + 26020 - 19968: 0xD0C5, + 26021 - 19968: 0xF4AE, + 26023 - 19968: 0xDDA8, + 26027 - 19968: 0xEDC5, + 26028 - 19968: 0xF3D6, + 26031 - 19968: 0xDED9, + 26032 - 19968: 0xE3E6, + 26039 - 19968: 0xD3A8, + 26041 - 19968: 0xDBB0, + 26044 - 19968: 0xE5DA, + 26045 - 19968: 0xE3BF, + 26049 - 19968: 0xDBB1, + 26053 - 19968: 0xD5E9, + 26059 - 19968: 0xE0C1, + 26060 - 19968: 0xEFDB, + 26063 - 19968: 0xF0E9, + 26066 - 19968: 0xD7B2, + 26071 - 19968: 0xD0FD, + 26080 - 19968: 0xD9E9, + 26083 - 19968: 0xD0FE, + 26085 - 19968: 0xECED, + 26086 - 19968: 0xD3A9, + 26088 - 19968: 0xF2A9, + 26089 - 19968: 0xF0C4, + 26092 - 19968: 0xE2E2, + 26093 - 19968: 0xE9EF, + 26097 - 19968: 0xF9D1, + 26100 - 19968: 0xE9D9, + 26106 - 19968: 0xE8DA, + 26107 - 19968: 0xDAC3, + 26108 - 19968: 0xDAC4, + 26109 - 19968: 0xD4C5, + 26111 - 19968: 0xE7FA, + 26118 - 19968: 0xCDE0, + 26119 - 19968: 0xE3B0, + 26121 - 19968: 0xDBB2, + 26122 - 19968: 0xFBC4, + 26124 - 19968: 0xF3E3, + 26126 - 19968: 0xD9A5, + 26127 - 19968: 0xFBE7, + 26128 - 19968: 0xDDCB, + 26129 - 19968: 0xD0D4, + 26131 - 19968: 0xE6B6, + 26132 - 19968: 0xE0AE, + 26133 - 19968: 0xFDDA, + 26142 - 19968: 0xDCB5, + 26143 - 19968: 0xE0F8, + 26144 - 19968: 0xE7B1, + 26149 - 19968: 0xF5F0, + 26151 - 19968: 0xD8DC, + 26152 - 19968: 0xEDC6, + 26157 - 19968: 0xE1B9, + 26159 - 19968: 0xE3C0, + 26160 - 19968: 0xF9C0, + 26161 - 19968: 0xE9F0, + 26164 - 19968: 0xD9DB, + 26166 - 19968: 0xF3E4, + 26170 - 19968: 0xDCB6, + 26171 - 19968: 0xE4E9, + 26177 - 19968: 0xF0C5, + 26178 - 19968: 0xE3C1, + 26179 - 19968: 0xFCCC, + 26180 - 19968: 0xFCCD, + 26185 - 19968: 0xF2CB, + 26187 - 19968: 0xF2CC, + 26191 - 19968: 0xE4CF, + 26201 - 19968: 0xF1DB, + 26203 - 19968: 0xFAD9, + 26205 - 19968: 0xF1B8, + 26206 - 19968: 0xFDF5, + 26207 - 19968: 0xE0F9, + 26212 - 19968: 0xE7FB, + 26213 - 19968: 0xFCB7, + 26214 - 19968: 0xFCE4, + 26215 - 19968: 0xFBC5, + 26216 - 19968: 0xE3E7, + 26217 - 19968: 0xD8B9, + 26219 - 19968: 0xF6F8, + 26222 - 19968: 0xDCC5, + 26223 - 19968: 0xCCD8, + 26227 - 19968: 0xE0AF, + 26228 - 19968: 0xF4E7, + 26230 - 19968: 0xEFDC, + 26231 - 19968: 0xCFFC, + 26232 - 19968: 0xEFDD, + 26234 - 19968: 0xF2AA, + 26244 - 19968: 0xFDBE, + 26247 - 19968: 0xCAAC, + 26248 - 19968: 0xFDBB, + 26249 - 19968: 0xFDC7, + 26254 - 19968: 0xE7B2, + 26256 - 19968: 0xEAD1, + 26257 - 19968: 0xDFF4, + 26262 - 19968: 0xD1EC, + 26263 - 19968: 0xE4DE, + 26264 - 19968: 0xE5C3, + 26269 - 19968: 0xD9A6, + 26272 - 19968: 0xCDBC, + 26274 - 19968: 0xF3E5, + 26283 - 19968: 0xEDD5, + 26286 - 19968: 0xD9BA, + 26290 - 19968: 0xEDE7, + 26291 - 19968: 0xFBB5, + 26292 - 19968: 0xF8EC, + 26297 - 19968: 0xE0E7, + 26299 - 19968: 0xCCD9, + 26302 - 19968: 0xD4C6, + 26308 - 19968: 0xE7A5, + 26310 - 19968: 0xD5F5, + 26311 - 19968: 0xD3BE, + 26313 - 19968: 0xFCFB, + 26326 - 19968: 0xE4F2, + 26329 - 19968: 0xDFF5, + 26332 - 19968: 0xE8F8, + 26333 - 19968: 0xF8ED, + 26336 - 19968: 0xCEC7, + 26342 - 19968: 0xFDF6, + 26352 - 19968: 0xE8D8, + 26354 - 19968: 0xCDD8, + 26355 - 19968: 0xE7D6, + 26356 - 19968: 0xCCDA, + 26359 - 19968: 0xCAE3, + 26360 - 19968: 0xDFF6, + 26361 - 19968: 0xF0C7, + 26362 - 19968: 0xF0C6, + 26364 - 19968: 0xD8BA, + 26366 - 19968: 0xF1F4, + 26367 - 19968: 0xF4F0, + 26368 - 19968: 0xF5CC, + 26371 - 19968: 0xFCE5, + 26376 - 19968: 0xEAC5, + 26377 - 19968: 0xEAF3, + 26379 - 19968: 0xDDDB, + 26381 - 19968: 0xDCD7, + 26388 - 19968: 0xDEFD, + 26389 - 19968: 0xF2F9, + 26391 - 19968: 0xD5C7, + 26395 - 19968: 0xD8D0, + 26397 - 19968: 0xF0C8, + 26398 - 19968: 0xD1A1, + 26399 - 19968: 0xD1A2, + 26406 - 19968: 0xD9D4, + 26407 - 19968: 0xD6E8, + 26408 - 19968: 0xD9CA, + 26410 - 19968: 0xDAB1, + 26411 - 19968: 0xD8C7, + 26412 - 19968: 0xDCE2, + 26413 - 19968: 0xF3CE, + 26414 - 19968: 0xF5F4, + 26417 - 19968: 0xF1B9, + 26420 - 19968: 0xDAD3, + 26422 - 19968: 0xF6EA, + 26426 - 19968: 0xCFF5, + 26429 - 19968: 0xFDAE, + 26438 - 19968: 0xCAD2, + 26441 - 19968: 0xDFB4, + 26446 - 19968: 0xD7DD, + 26447 - 19968: 0xFABA, + 26448 - 19968: 0xEEA7, + 26449 - 19968: 0xF5BD, + 26451 - 19968: 0xF8F5, + 26454 - 19968: 0xEDE8, + 26460 - 19968: 0xD4E1, + 26462 - 19968: 0xD1A3, + 26463 - 19968: 0xE1D6, + 26477 - 19968: 0xF9F8, + 26479 - 19968: 0xDBCA, + 26480 - 19968: 0xCBF9, + 26481 - 19968: 0xD4D4, + 26483 - 19968: 0xD9DC, + 26485 - 19968: 0xEEBE, + 26487 - 19968: 0xF7ED, + 26491 - 19968: 0xD2EE, + 26494 - 19968: 0xE1E6, + 26495 - 19968: 0xF7F9, + 26503 - 19968: 0xDDED, + 26505 - 19968: 0xE8DB, + 26507 - 19968: 0xDBB3, + 26511 - 19968: 0xD1F7, + 26512 - 19968: 0xE0B0, + 26515 - 19968: 0xD4E2, + 26517 - 19968: 0xF6D7, + 26519 - 19968: 0xD7F9, + 26522 - 19968: 0xD8DD, + 26524 - 19968: 0xCDFD, + 26525 - 19968: 0xF2AB, + 26543 - 19968: 0xCDBD, + 26544 - 19968: 0xF8C2, + 26547 - 19968: 0xF2AC, + 26550 - 19968: 0xCAAD, + 26551 - 19968: 0xCAAE, + 26552 - 19968: 0xCFAE, + 26558 - 19968: 0xE3C2, + 26564 - 19968: 0xDCB7, + 26575 - 19968: 0xDBDA, + 26576 - 19968: 0xD9BB, + 26577 - 19968: 0xCAF3, + 26578 - 19968: 0xF6D3, + 26579 - 19968: 0xE6F8, + 26580 - 19968: 0xEAF5, + 26586 - 19968: 0xEAF6, + 26589 - 19968: 0xF6F9, + 26601 - 19968: 0xCFAF, + 26604 - 19968: 0xCAD3, + 26607 - 19968: 0xCAAF, + 26608 - 19968: 0xD2B0, + 26609 - 19968: 0xF1BA, + 26611 - 19968: 0xD7B3, + 26612 - 19968: 0xE3C3, + 26613 - 19968: 0xF3FD, + 26614 - 19968: 0xDEDA, + 26619 - 19968: 0xDEDB, + 26622 - 19968: 0xEFDE, + 26642 - 19968: 0xE2E3, + 26643 - 19968: 0xEEFB, + 26646 - 19968: 0xDFF7, + 26647 - 19968: 0xD7CA, + 26657 - 19968: 0xCEE8, + 26658 - 19968: 0xDBDB, + 26666 - 19968: 0xF1BB, + 26671 - 19968: 0xE9F1, + 26680 - 19968: 0xFAB7, + 26681 - 19968: 0xD0C6, + 26684 - 19968: 0xCCAB, + 26685 - 19968: 0xEEA8, + 26688 - 19968: 0xCBFA, + 26689 - 19968: 0xF9F9, + 26690 - 19968: 0xCCFD, + 26691 - 19968: 0xD3FE, + 26696 - 19968: 0xE4D0, + 26702 - 19968: 0xF2EE, + 26704 - 19968: 0xD4D5, + 26705 - 19968: 0xDFCD, + 26707 - 19968: 0xFCB8, + 26708 - 19968: 0xD1D0, + 26733 - 19968: 0xF2CD, + 26742 - 19968: 0xF7D2, + 26751 - 19968: 0xCAD4, + 26753 - 19968: 0xD5D9, + 26757 - 19968: 0xD8DE, + 26767 - 19968: 0xCDD9, + 26771 - 19968: 0xEEA9, + 26772 - 19968: 0xF6BC, + 26775 - 19968: 0xCCDB, + 26781 - 19968: 0xF0C9, + 26783 - 19968: 0xFCFC, + 26785 - 19968: 0xE8C9, + 26786 - 19968: 0xF4FE, + 26791 - 19968: 0xE7FC, + 26792 - 19968: 0xD7DE, + 26797 - 19968: 0xDEDC, + 26799 - 19968: 0xF0AC, + 26800 - 19968: 0xCCFE, + 26801 - 19968: 0xCDE1, + 26803 - 19968: 0xE1BA, + 26805 - 19968: 0xDBEF, + 26806 - 19968: 0xDAB2, + 26820 - 19968: 0xD1A5, + 26821 - 19968: 0xDCB8, + 26825 - 19968: 0xD8F6, + 26827 - 19968: 0xD1A4, + 26829 - 19968: 0xCDE2, + 26834 - 19968: 0xDCEA, + 26837 - 19968: 0xF0F7, + 26839 - 19968: 0xF0CA, + 26840 - 19968: 0xD0BE, + 26842 - 19968: 0xDDDC, + 26847 - 19968: 0xD4D6, + 26848 - 19968: 0xD3D6, + 26855 - 19968: 0xEDD0, + 26856 - 19968: 0xCDA1, + 26862 - 19968: 0xDFB5, + 26866 - 19968: 0xDFF8, + 26873 - 19968: 0xD4A1, + 26874 - 19968: 0xCEB2, + 26880 - 19968: 0xE8CA, + 26885 - 19968: 0xEBF5, + 26893 - 19968: 0xE3D5, + 26894 - 19968: 0xF5D0, + 26898 - 19968: 0xF5A1, + 26919 - 19968: 0xD9A7, + 26928 - 19968: 0xE5AB, + 26941 - 19968: 0xE6CB, + 26943 - 19968: 0xF5F1, + 26954 - 19968: 0xE5C5, + 26963 - 19968: 0xF9A3, + 26964 - 19968: 0xE0DB, + 26965 - 19968: 0xF6EB, + 26967 - 19968: 0xCBF1, + 26969 - 19968: 0xD9EA, + 26970 - 19968: 0xF5A2, + 26974 - 19968: 0xD7D1, + 26976 - 19968: 0xD1F8, + 26977 - 19968: 0xEAF8, + 26978 - 19968: 0xEAF9, + 26979 - 19968: 0xDAB3, + 26984 - 19968: 0xEFDF, + 26987 - 19968: 0xF1EF, + 26989 - 19968: 0xE5F6, + 26990 - 19968: 0xEEBF, + 26991 - 19968: 0xE2E4, + 26997 - 19968: 0xD0BF, + 26999 - 19968: 0xFAAC, + 27000 - 19968: 0xF5D1, + 27001 - 19968: 0xE7B3, + 27029 - 19968: 0xE9BE, + 27035 - 19968: 0xF2CE, + 27036 - 19968: 0xDBB4, + 27045 - 19968: 0xFCCE, + 27047 - 19968: 0xDDEE, + 27054 - 19968: 0xE7B4, + 27060 - 19968: 0xD7B4, + 27067 - 19968: 0xF7B4, + 27073 - 19968: 0xCDBE, + 27075 - 19968: 0xDAE9, + 27083 - 19968: 0xCFB0, + 27084 - 19968: 0xF7D9, + 27085 - 19968: 0xF3E6, + 27088 - 19968: 0xCED9, + 27112 - 19968: 0xCEAA, + 27114 - 19968: 0xCBC8, + 27131 - 19968: 0xD0A7, + 27133 - 19968: 0xF0CB, + 27135 - 19968: 0xD0C7, + 27138 - 19968: 0xE4C5, + 27146 - 19968: 0xDBE0, + 27153 - 19968: 0xD5DA, + 27155 - 19968: 0xD7A7, + 27159 - 19968: 0xEEC0, + 27161 - 19968: 0xF8F6, + 27166 - 19968: 0xF5D2, + 27167 - 19968: 0xEDE9, + 27169 - 19968: 0xD9BC, + 27171 - 19968: 0xE5C6, + 27189 - 19968: 0xF5A3, + 27192 - 19968: 0xDAD4, + 27193 - 19968: 0xE2A7, + 27194 - 19968: 0xFBFC, + 27197 - 19968: 0xF1DC, + 27204 - 19968: 0xCAF4, + 27208 - 19968: 0xE8FA, + 27211 - 19968: 0xCEE9, + 27218 - 19968: 0xE9F8, + 27219 - 19968: 0xE2E5, + 27224 - 19968: 0xD0B9, + 27225 - 19968: 0xD4F2, + 27231 - 19968: 0xD1A6, + 27233 - 19968: 0xDFCE, + 27243 - 19968: 0xFCF4, + 27264 - 19968: 0xD3AA, + 27268 - 19968: 0xCCAC, + 27273 - 19968: 0xEFE0, + 27277 - 19968: 0xE5E5, + 27278 - 19968: 0xD0D5, + 27287 - 19968: 0xDBFC, + 27292 - 19968: 0xFCE6, + 27298 - 19968: 0xCBFE, + 27299 - 19968: 0xEDEA, + 27315 - 19968: 0xDEB1, + 27323 - 19968: 0xF9E3, + 27330 - 19968: 0xD4A2, + 27331 - 19968: 0xCFF6, + 27347 - 19968: 0xD6D0, + 27354 - 19968: 0xD5EA, + 27355 - 19968: 0xF1EE, + 27382 - 19968: 0xFACB, + 27387 - 19968: 0xE5A1, + 27396 - 19968: 0xD5B1, + 27402 - 19968: 0xCFED, + 27404 - 19968: 0xEDEB, + 27410 - 19968: 0xD5B2, + 27414 - 19968: 0xD5BC, + 27424 - 19968: 0xFDE2, + 27425 - 19968: 0xF3AD, + 27427 - 19968: 0xFDDB, + 27442 - 19968: 0xE9B0, + 27450 - 19968: 0xD1A7, + 27453 - 19968: 0xFDE3, + 27454 - 19968: 0xCEB3, + 27462 - 19968: 0xFDE4, + 27463 - 19968: 0xFACE, + 27468 - 19968: 0xCAB0, + 27470 - 19968: 0xF7A7, + 27472 - 19968: 0xCFB1, + 27487 - 19968: 0xE6A2, + 27489 - 19968: 0xFCB6, + 27490 - 19968: 0xF2AD, + 27491 - 19968: 0xEFE1, + 27492 - 19968: 0xF3AE, + 27493 - 19968: 0xDCC6, + 27494 - 19968: 0xD9EB, + 27498 - 19968: 0xE8E0, + 27506 - 19968: 0xE1A8, + 27511 - 19968: 0xD5F6, + 27512 - 19968: 0xCFFD, + 27515 - 19968: 0xDEDD, + 27519 - 19968: 0xD9D1, + 27523 - 19968: 0xE4EA, + 27524 - 19968: 0xF2CF, + 27526 - 19968: 0xF7BF, + 27529 - 19968: 0xE2E6, + 27530 - 19968: 0xE2A8, + 27542 - 19968: 0xE3D6, + 27544 - 19968: 0xEDD1, + 27550 - 19968: 0xE9F9, + 27566 - 19968: 0xD6B1, + 27567 - 19968: 0xDEB2, + 27570 - 19968: 0xE0E8, + 27573 - 19968: 0xD3AB, + 27575 - 19968: 0xEBDC, + 27578 - 19968: 0xDFAF, + 27580 - 19968: 0xCAC3, + 27583 - 19968: 0xEEFC, + 27585 - 19968: 0xFDC3, + 27589 - 19968: 0xEBF6, + 27590 - 19968: 0xCFB2, + 27595 - 19968: 0xD9EC, + 27597 - 19968: 0xD9BD, + 27599 - 19968: 0xD8DF, + 27602 - 19968: 0xD4B8, + 27603 - 19968: 0xEBBE, + 27604 - 19968: 0xDDEF, + 27606 - 19968: 0xDDF0, + 27607 - 19968: 0xDDF1, + 27608 - 19968: 0xDDF2, + 27611 - 19968: 0xD9BE, + 27627 - 19968: 0xFBC6, + 27628 - 19968: 0xCFB3, + 27656 - 19968: 0xEEFD, + 27663 - 19968: 0xE4AB, + 27665 - 19968: 0xDAC5, + 27667 - 19968: 0xD8EC, + 27683 - 19968: 0xD1A8, + 27700 - 19968: 0xE2A9, + 27703 - 19968: 0xDEBC, + 27704 - 19968: 0xE7B5, + 27710 - 19968: 0xDBF0, + 27712 - 19968: 0xEFE2, + 27713 - 19968: 0xF1F0, + 27714 - 19968: 0xCFB4, + 27726 - 19968: 0xDBF1, + 27728 - 19968: 0xE0B1, + 27733 - 19968: 0xDFA5, + 27735 - 19968: 0xF9D2, + 27738 - 19968: 0xE7FD, + 27741 - 19968: 0xE6A3, + 27742 - 19968: 0xFBF1, + 27743 - 19968: 0xCBB0, + 27744 - 19968: 0xF2AE, + 27752 - 19968: 0xCDE7, + 27754 - 19968: 0xE8DC, + 27757 - 19968: 0xE7D7, + 27760 - 19968: 0xF7C0, + 27762 - 19968: 0xD0E3, + 27766 - 19968: 0xDAA1, + 27770 - 19968: 0xCCBD, + 27773 - 19968: 0xD1A9, + 27774 - 19968: 0xDDCC, + 27777 - 19968: 0xE3FE, + 27778 - 19968: 0xD1AA, + 27779 - 19968: 0xE8AA, + 27781 - 19968: 0xEAB6, + 27782 - 19968: 0xF9FA, + 27783 - 19968: 0xE6CC, + 27784 - 19968: 0xF6D8, + 27788 - 19968: 0xD4C7, + 27792 - 19968: 0xD9CB, + 27794 - 19968: 0xD9D2, + 27795 - 19968: 0xD3CB, + 27796 - 19968: 0xD8F7, + 27797 - 19968: 0xDAA9, + 27798 - 19968: 0xF5F8, + 27801 - 19968: 0xDEDE, + 27802 - 19968: 0xF2AF, + 27803 - 19968: 0xF8A9, + 27819 - 19968: 0xD8C8, + 27822 - 19968: 0xEEC1, + 27827 - 19968: 0xF9C1, + 27832 - 19968: 0xDDF3, + 27833 - 19968: 0xEAFA, + 27835 - 19968: 0xF6BD, + 27836 - 19968: 0xE1BB, + 27837 - 19968: 0xCDBF, + 27838 - 19968: 0xF4D4, + 27839 - 19968: 0xE6CD, + 27841 - 19968: 0xFCCF, + 27842 - 19968: 0xFBA2, + 27844 - 19968: 0xE0DC, + 27849 - 19968: 0xF4BB, + 27850 - 19968: 0xDAD5, + 27852 - 19968: 0xF9B2, + 27859 - 19968: 0xFBF2, + 27861 - 19968: 0xDBF6, + 27863 - 19968: 0xDEDF, + 27867 - 19968: 0xDBF2, + 27873 - 19968: 0xF8DC, + 27874 - 19968: 0xF7EE, + 27875 - 19968: 0xEBE8, + 27877 - 19968: 0xD2FA, + 27880 - 19968: 0xF1BC, + 27883 - 19968: 0xFADA, + 27886 - 19968: 0xDAEA, + 27887 - 19968: 0xDAC6, + 27888 - 19968: 0xF7C1, + 27891 - 19968: 0xE7B6, + 27915 - 19968: 0xE5C7, + 27916 - 19968: 0xD6AC, + 27921 - 19968: 0xDCC7, + 27927 - 19968: 0xE1A9, + 27929 - 19968: 0xE2AA, + 27931 - 19968: 0xD5A6, + 27934 - 19968: 0xD4D7, + 27941 - 19968: 0xF2D0, + 27943 - 19968: 0xEAFB, + 27945 - 19968: 0xE0DD, + 27946 - 19968: 0xFBF3, + 27954 - 19968: 0xF1BD, + 27957 - 19968: 0xE2E7, + 27958 - 19968: 0xFDD7, + 27960 - 19968: 0xCEC8, + 27961 - 19968: 0xEAB7, + 27963 - 19968: 0xFCC0, + 27965 - 19968: 0xFDE7, + 27966 - 19968: 0xF7EF, + 27969 - 19968: 0xD7B5, + 27993 - 19968: 0xEFBA, + 27994 - 19968: 0xF1DD, + 27996 - 19968: 0xDEB3, + 28003 - 19968: 0xE8CB, + 28006 - 19968: 0xF8DD, + 28009 - 19968: 0xFBC7, + 28010 - 19968: 0xD5C8, + 28012 - 19968: 0xD7DF, + 28014 - 19968: 0xDDA9, + 28020 - 19968: 0xE9B1, + 28023 - 19968: 0xFAAD, + 28024 - 19968: 0xF6D9, + 28025 - 19968: 0xFAF4, + 28031 - 19968: 0xF8AA, + 28037 - 19968: 0xE6EE, + 28039 - 19968: 0xCCDC, + 28040 - 19968: 0xE1BC, + 28041 - 19968: 0xE0EF, + 28044 - 19968: 0xE9BF, + 28045 - 19968: 0xFCFD, + 28046 - 19968: 0xE6CE, + 28049 - 19968: 0xE1D7, + 28051 - 19968: 0xE6CF, + 28053 - 19968: 0xF4F1, + 28079 - 19968: 0xE4F3, + 28082 - 19968: 0xE4FB, + 28085 - 19968: 0xF9E4, + 28096 - 19968: 0xEFE3, + 28099 - 19968: 0xCFEE, + 28100 - 19968: 0xF6BE, + 28101 - 19968: 0xE0B2, + 28102 - 19968: 0xFCFE, + 28103 - 19968: 0xD1AB, + 28107 - 19968: 0xD7FA, + 28111 - 19968: 0xFBC8, + 28113 - 19968: 0xE2D7, + 28120 - 19968: 0xD4A3, + 28121 - 19968: 0xF0F8, + 28122 - 19968: 0xD7A8, + 28126 - 19968: 0xE1E7, + 28129 - 19968: 0xD3BF, + 28136 - 19968: 0xEFE4, + 28138 - 19968: 0xD7C5, + 28139 - 19968: 0xEBE2, + 28142 - 19968: 0xFCE7, + 28145 - 19968: 0xE4A2, + 28147 - 19968: 0xE2E8, + 28149 - 19968: 0xE6D0, + 28151 - 19968: 0xFBE8, + 28152 - 19968: 0xF4E8, + 28153 - 19968: 0xE5F4, + 28154 - 19968: 0xF4BC, + 28155 - 19968: 0xF4D5, + 28183 - 19968: 0xDFB6, + 28185 - 19968: 0xFCB9, + 28186 - 19968: 0xEEC2, + 28187 - 19968: 0xCAF5, + 28191 - 19968: 0xEFE5, + 28192 - 19968: 0xCBE2, + 28193 - 19968: 0xD4A4, + 28195 - 19968: 0xDEE0, + 28196 - 19968: 0xDAFD, + 28197 - 19968: 0xE4C6, + 28198 - 19968: 0xE8BE, + 28203 - 19968: 0xE0DE, + 28204 - 19968: 0xF6B4, + 28205 - 19968: 0xEAD2, + 28207 - 19968: 0xF9FB, + 28210 - 19968: 0xE0C2, + 28212 - 19968: 0xCAE4, + 28214 - 19968: 0xE7B7, + 28216 - 19968: 0xEAFD, + 28218 - 19968: 0xD9DD, + 28220 - 19968: 0xDAB4, + 28221 - 19968: 0xEEAA, + 28222 - 19968: 0xFBE9, + 28227 - 19968: 0xDBCB, + 28228 - 19968: 0xDAB5, + 28234 - 19968: 0xF1BE, + 28237 - 19968: 0xD3AC, + 28246 - 19968: 0xFBC9, + 28248 - 19968: 0xDFCF, + 28251 - 19968: 0xD3C0, + 28252 - 19968: 0xE3D7, + 28254 - 19968: 0xEFE6, + 28255 - 19968: 0xFCD0, + 28263 - 19968: 0xE9C0, + 28267 - 19968: 0xF5D3, + 28270 - 19968: 0xECDC, + 28271 - 19968: 0xF7B7, + 28274 - 19968: 0xEAB8, + 28275 - 19968: 0xD1F9, + 28282 - 19968: 0xDCC8, + 28304 - 19968: 0xEAB9, + 28310 - 19968: 0xF1DE, + 28316 - 19968: 0xD7B6, + 28317 - 19968: 0xCFB5, + 28319 - 19968: 0xD9A8, + 28322 - 19968: 0xECEE, + 28325 - 19968: 0xDDAA, + 28330 - 19968: 0xCDA2, + 28331 - 19968: 0xE8AE, + 28335 - 19968: 0xE1BD, + 28337 - 19968: 0xF2D1, + 28342 - 19968: 0xE9C1, + 28346 - 19968: 0xD2FC, + 28354 - 19968: 0xDBB5, + 28356 - 19968: 0xF3E7, + 28357 - 19968: 0xD8FE, + 28361 - 19968: 0xFCD1, + 28363 - 19968: 0xEDB2, + 28364 - 19968: 0xF4AF, + 28366 - 19968: 0xFBA3, + 28369 - 19968: 0xFCC1, + 28371 - 19968: 0xEEAB, + 28372 - 19968: 0xD4A5, + 28399 - 19968: 0xF4F2, + 28404 - 19968: 0xEED9, + 28408 - 19968: 0xFBCA, + 28414 - 19968: 0xCDE3, + 28415 - 19968: 0xD8BB, + 28417 - 19968: 0xE5DB, + 28418 - 19968: 0xF8F7, + 28422 - 19968: 0xF6D4, + 28431 - 19968: 0xD7A9, + 28433 - 19968: 0xCBC9, + 28436 - 19968: 0xE6D1, + 28437 - 19968: 0xF0CC, + 28448 - 19968: 0xD8AE, + 28450 - 19968: 0xF9D3, + 28451 - 19968: 0xD5FE, + 28459 - 19968: 0xD8BC, + 28460 - 19968: 0xF2B0, + 28465 - 19968: 0xE2AB, + 28466 - 19968: 0xF3E8, + 28472 - 19968: 0xEFC2, + 28479 - 19968: 0xEDEC, + 28481 - 19968: 0xE7B8, + 28497 - 19968: 0xDAFE, + 28500 - 19968: 0xCCBE, + 28503 - 19968: 0xF2FC, + 28504 - 19968: 0xDAEB, + 28506 - 19968: 0xE2D8, + 28507 - 19968: 0xEDD6, + 28510 - 19968: 0xD6D1, + 28511 - 19968: 0xE0B3, + 28514 - 19968: 0xFCD2, + 28516 - 19968: 0xEBC8, + 28525 - 19968: 0xD3C1, + 28526 - 19968: 0xF0CD, + 28528 - 19968: 0xCFF7, + 28538 - 19968: 0xEDD2, + 28540 - 19968: 0xD4D8, + 28541 - 19968: 0xDCC9, + 28542 - 19968: 0xD7F1, + 28545 - 19968: 0xDFBB, + 28548 - 19968: 0xF3A5, + 28552 - 19968: 0xF4CD, + 28557 - 19968: 0xF1BF, + 28558 - 19968: 0xF8B1, + 28560 - 19968: 0xE9FA, + 28564 - 19968: 0xFBCB, + 28567 - 19968: 0xCAD5, + 28579 - 19968: 0xF9D4, + 28580 - 19968: 0xF7CA, + 28583 - 19968: 0xD6C8, + 28590 - 19968: 0xFCE8, + 28591 - 19968: 0xF3BD, + 28593 - 19968: 0xEEFE, + 28595 - 19968: 0xE7FE, + 28601 - 19968: 0xD3C2, + 28606 - 19968: 0xD3B6, + 28608 - 19968: 0xCCAD, + 28609 - 19968: 0xF6FA, + 28610 - 19968: 0xD6B2, + 28611 - 19968: 0xD2D8, + 28618 - 19968: 0xE7D8, + 28629 - 19968: 0xE3A5, + 28634 - 19968: 0xE7B9, + 28639 - 19968: 0xF0AD, + 28640 - 19968: 0xFBCC, + 28641 - 19968: 0xEBA1, + 28644 - 19968: 0xD4A6, + 28649 - 19968: 0xFBCD, + 28651 - 19968: 0xD5BD, + 28652 - 19968: 0xF1DF, + 28655 - 19968: 0xF6FB, + 28657 - 19968: 0xDEB4, + 28670 - 19968: 0xD5EB, + 28673 - 19968: 0xE5C8, + 28677 - 19968: 0xFBA4, + 28678 - 19968: 0xD4B9, + 28681 - 19968: 0xDEE1, + 28683 - 19968: 0xE4A3, + 28687 - 19968: 0xD7B7, + 28689 - 19968: 0xF8EE, + 28693 - 19968: 0xDEB5, + 28696 - 19968: 0xD6D2, + 28698 - 19968: 0xF9D5, + 28699 - 19968: 0xE7BA, + 28700 - 19968: 0xEBD5, + 28701 - 19968: 0xD5F7, + 28702 - 19968: 0xEFE7, + 28703 - 19968: 0xE1BE, + 28707 - 19968: 0xFAAE, + 28711 - 19968: 0xD6E9, + 28712 - 19968: 0xD6EE, + 28719 - 19968: 0xE7BB, + 28727 - 19968: 0xECCB, + 28734 - 19968: 0xD5B3, + 28748 - 19968: 0xCEB4, + 28752 - 19968: 0xFBA5, + 28753 - 19968: 0xE1EE, + 28760 - 19968: 0xF7A8, + 28765 - 19968: 0xFBCE, + 28771 - 19968: 0xD8BD, + 28779 - 19968: 0xFBFD, + 28784 - 19968: 0xFCE9, + 28792 - 19968: 0xCFB6, + 28796 - 19968: 0xEDC7, + 28797 - 19968: 0xEEAC, + 28805 - 19968: 0xCCDD, + 28810 - 19968: 0xF6A7, + 28814 - 19968: 0xE6FA, + 28818 - 19968: 0xF5A4, + 28824 - 19968: 0xFDDC, + 28825 - 19968: 0xEDB3, + 28826 - 19968: 0xCEC9, + 28833 - 19968: 0xEFE8, + 28836 - 19968: 0xE1BF, + 28843 - 19968: 0xFADB, + 28844 - 19968: 0xCBE3, + 28845 - 19968: 0xF7A9, + 28847 - 19968: 0xFBA6, + 28851 - 19968: 0xDCB9, + 28855 - 19968: 0xF1C0, + 28856 - 19968: 0xEDC8, + 28857 - 19968: 0xEFC3, + 28872 - 19968: 0xD6AD, + 28875 - 19968: 0xFDCE, + 28879 - 19968: 0xE8A1, + 28888 - 19968: 0xFBF4, + 28889 - 19968: 0xD5A7, + 28893 - 19968: 0xF1F6, + 28895 - 19968: 0xE6D3, + 28913 - 19968: 0xCCDE, + 28921 - 19968: 0xF8B2, + 28925 - 19968: 0xDCEB, + 28932 - 19968: 0xFDB6, + 28937 - 19968: 0xE5EA, + 28940 - 19968: 0xF1E0, + 28953 - 19968: 0xDBCC, + 28954 - 19968: 0xDDCD, + 28958 - 19968: 0xD4C8, + 28961 - 19968: 0xD9ED, + 28966 - 19968: 0xF5A5, + 28976 - 19968: 0xE6FB, + 28982 - 19968: 0xE6D4, + 28999 - 19968: 0xFDC8, + 29001 - 19968: 0xD6A1, + 29002 - 19968: 0xFDBF, + 29004 - 19968: 0xFCD3, + 29006 - 19968: 0xEFA1, + 29008 - 19968: 0xE7BC, + 29014 - 19968: 0xD1EE, + 29017 - 19968: 0xE6D5, + 29020 - 19968: 0xE9F2, + 29022 - 19968: 0xDFB0, + 29028 - 19968: 0xD8E0, + 29029 - 19968: 0xFCBA, + 29030 - 19968: 0xFDAF, + 29031 - 19968: 0xF0CE, + 29033 - 19968: 0xDBE1, + 29036 - 19968: 0xE5C9, + 29038 - 19968: 0xEDB4, + 29053 - 19968: 0xE0C3, + 29060 - 19968: 0xE3D8, + 29065 - 19968: 0xE9FB, + 29066 - 19968: 0xEAA8, + 29071 - 19968: 0xFDB7, + 29074 - 19968: 0xFBA7, + 29076 - 19968: 0xE9C2, + 29081 - 19968: 0xFDF7, + 29087 - 19968: 0xE2D9, + 29090 - 19968: 0xDCEC, + 29100 - 19968: 0xE8A2, + 29105 - 19968: 0xE6F0, + 29113 - 19968: 0xFDF8, + 29114 - 19968: 0xFDF9, + 29118 - 19968: 0xF6BF, + 29121 - 19968: 0xE7A7, + 29123 - 19968: 0xE6D7, + 29128 - 19968: 0xD4F3, + 29129 - 19968: 0xD4C9, + 29134 - 19968: 0xD6FA, + 29136 - 19968: 0xD7F2, + 29138 - 19968: 0xE1C0, + 29140 - 19968: 0xDBE2, + 29141 - 19968: 0xE6D8, + 29151 - 19968: 0xE7BD, + 29157 - 19968: 0xF0CF, + 29158 - 19968: 0xF3BE, + 29159 - 19968: 0xE2AC, + 29165 - 19968: 0xF5B7, + 29166 - 19968: 0xE0F0, + 29179 - 19968: 0xFDB8, + 29180 - 19968: 0xE3E8, + 29182 - 19968: 0xD4A7, + 29183 - 19968: 0xE8FC, + 29184 - 19968: 0xFAD2, + 29190 - 19968: 0xF8EF, + 29200 - 19968: 0xD6D3, + 29211 - 19968: 0xD5B4, + 29226 - 19968: 0xF0D0, + 29228 - 19968: 0xF7F0, + 29229 - 19968: 0xEEB3, + 29232 - 19968: 0xEABA, + 29234 - 19968: 0xEAD3, + 29237 - 19968: 0xEDC9, + 29238 - 19968: 0xDDAB, + 29242 - 19968: 0xE5AC, + 29243 - 19968: 0xFDA1, + 29245 - 19968: 0xDFD0, + 29246 - 19968: 0xECB3, + 29248 - 19968: 0xDFD1, + 29254 - 19968: 0xEDED, + 29255 - 19968: 0xF8B8, + 29256 - 19968: 0xF7FA, + 29260 - 19968: 0xF8AB, + 29266 - 19968: 0xF4E0, + 29272 - 19968: 0xD4BA, + 29273 - 19968: 0xE4B3, + 29275 - 19968: 0xE9DA, + 29277 - 19968: 0xDEB6, + 29279 - 19968: 0xD9BF, + 29281 - 19968: 0xD9C0, + 29282 - 19968: 0xD6EF, + 29287 - 19968: 0xD9CC, + 29289 - 19968: 0xDAAA, + 29298 - 19968: 0xDFE5, + 29305 - 19968: 0xF7E5, + 29309 - 19968: 0xCCB2, + 29312 - 19968: 0xDFF9, + 29313 - 19968: 0xD7E0, + 29346 - 19968: 0xD4BB, + 29351 - 19968: 0xFDFA, + 29356 - 19968: 0xCCB3, + 29359 - 19968: 0xDBF3, + 29376 - 19968: 0xDFD2, + 29378 - 19968: 0xCECA, + 29380 - 19968: 0xEEDA, + 29390 - 19968: 0xE4E4, + 29392 - 19968: 0xFBCF, + 29399 - 19968: 0xCFB7, + 29401 - 19968: 0xEEC3, + 29409 - 19968: 0xCEEA, + 29417 - 19968: 0xE2AD, + 29432 - 19968: 0xD7E1, + 29433 - 19968: 0xFAF5, + 29436 - 19968: 0xD5C9, + 29437 - 19968: 0xF8AC, + 29450 - 19968: 0xE7D9, + 29462 - 19968: 0xF3E9, + 29467 - 19968: 0xD8ED, + 29468 - 19968: 0xE3C4, + 29469 - 19968: 0xF0F1, + 29477 - 19968: 0xE8E5, + 29481 - 19968: 0xE0FA, + 29482 - 19968: 0xEEC4, + 29483 - 19968: 0xD9DE, + 29494 - 19968: 0xEBA2, + 29495 - 19968: 0xEBA3, + 29502 - 19968: 0xFCC2, + 29503 - 19968: 0xEABB, + 29508 - 19968: 0xE8AB, + 29509 - 19968: 0xDEE2, + 29520 - 19968: 0xEDEF, + 29522 - 19968: 0xE8A3, + 29527 - 19968: 0xCFF1, + 29544 - 19968: 0xD4BC, + 29546 - 19968: 0xFCEA, + 29552 - 19968: 0xE7BE, + 29554 - 19968: 0xFCF2, + 29557 - 19968: 0xD6B4, + 29560 - 19968: 0xE2AE, + 29562 - 19968: 0xD3B7, + 29563 - 19968: 0xFACC, + 29572 - 19968: 0xFADC, + 29574 - 19968: 0xEDB5, + 29575 - 19968: 0xE1E3, + 29577 - 19968: 0xE8AC, + 29579 - 19968: 0xE8DD, + 29582 - 19968: 0xEFE9, + 29588 - 19968: 0xF4BD, + 29590 - 19968: 0xCFB8, + 29591 - 19968: 0xE9DB, + 29592 - 19968: 0xD1AC, + 29599 - 19968: 0xDAC7, + 29607 - 19968: 0xEBC9, + 29609 - 19968: 0xE8CC, + 29613 - 19968: 0xDEB7, + 29618 - 19968: 0xD6BC, + 29619 - 19968: 0xD3E5, + 29625 - 19968: 0xFADD, + 29632 - 19968: 0xDAD6, + 29634 - 19968: 0xCAB1, + 29641 - 19968: 0xDAC8, + 29642 - 19968: 0xDFA6, + 29644 - 19968: 0xF9B3, + 29645 - 19968: 0xF2D2, + 29647 - 19968: 0xCAC4, + 29654 - 19968: 0xCECB, + 29657 - 19968: 0xCDF5, + 29661 - 19968: 0xFDB0, + 29662 - 19968: 0xD5A8, + 29664 - 19968: 0xF1C1, + 29667 - 19968: 0xE2E9, + 29668 - 19968: 0xDCCA, + 29669 - 19968: 0xECB4, + 29670 - 19968: 0xFAC0, + 29673 - 19968: 0xFBA8, + 29674 - 19968: 0xD0A8, + 29677 - 19968: 0xDAEC, + 29687 - 19968: 0xD9EE, + 29689 - 19968: 0xE0FB, + 29693 - 19968: 0xEFEA, + 29694 - 19968: 0xFADE, + 29697 - 19968: 0xE0C4, + 29699 - 19968: 0xCFB9, + 29701 - 19968: 0xD5CA, + 29702 - 19968: 0xD7E2, + 29703 - 19968: 0xE2AF, + 29705 - 19968: 0xD7B8, + 29715 - 19968: 0xE8CD, + 29723 - 19968: 0xF6DA, + 29728 - 19968: 0xEFA2, + 29729 - 19968: 0xE2DA, + 29730 - 19968: 0xF6FC, + 29733 - 19968: 0xFBD0, + 29734 - 19968: 0xD1AD, + 29736 - 19968: 0xCDE4, + 29738 - 19968: 0xD1AE, + 29739 - 19968: 0xDCED, + 29740 - 19968: 0xE8CE, + 29742 - 19968: 0xF0F9, + 29743 - 19968: 0xCEB5, + 29744 - 19968: 0xE6FC, + 29747 - 19968: 0xD7FB, + 29748 - 19968: 0xD0D6, + 29749 - 19968: 0xDDF5, + 29750 - 19968: 0xF7F1, + 29752 - 19968: 0xF6FD, + 29754 - 19968: 0xDBF7, + 29759 - 19968: 0xFBEA, + 29760 - 19968: 0xE9DC, + 29761 - 19968: 0xD9C1, + 29763 - 19968: 0xF5F2, + 29764 - 19968: 0xE0C5, + 29771 - 19968: 0xEAD4, + 29781 - 19968: 0xF9C2, + 29783 - 19968: 0xEABC, + 29785 - 19968: 0xD2C5, + 29786 - 19968: 0xFBD1, + 29787 - 19968: 0xE7C0, + 29788 - 19968: 0xEBA5, + 29790 - 19968: 0xDFFA, + 29791 - 19968: 0xE3A2, + 29792 - 19968: 0xD7B9, + 29794 - 19968: 0xE9C3, + 29796 - 19968: 0xE8FD, + 29797 - 19968: 0xE8AF, + 29800 - 19968: 0xF2D3, + 29801 - 19968: 0xFBA9, + 29802 - 19968: 0xD8A5, + 29807 - 19968: 0xD5CB, + 29822 - 19968: 0xD0C8, + 29826 - 19968: 0xD1AF, + 29827 - 19968: 0xD7E3, + 29831 - 19968: 0xE0C6, + 29833 - 19968: 0xD6A2, + 29835 - 19968: 0xEDF0, + 29848 - 19968: 0xD7F3, + 29852 - 19968: 0xFCD4, + 29854 - 19968: 0xDAD7, + 29855 - 19968: 0xCCDF, + 29857 - 19968: 0xF2D4, + 29859 - 19968: 0xD1B0, + 29861 - 19968: 0xCCE0, + 29863 - 19968: 0xDBFD, + 29864 - 19968: 0xF3BF, + 29866 - 19968: 0xF0D1, + 29872 - 19968: 0xFCBB, + 29874 - 19968: 0xE2B0, + 29877 - 19968: 0xE6A5, + 29881 - 19968: 0xE2DB, + 29885 - 19968: 0xDFDE, + 29887 - 19968: 0xE0C7, + 29894 - 19968: 0xF2EF, + 29898 - 19968: 0xCCE1, + 29903 - 19968: 0xD6EA, + 29908 - 19968: 0xE7C2, + 29912 - 19968: 0xCEB6, + 29914 - 19968: 0xF3C0, + 29916 - 19968: 0xCDFE, + 29920 - 19968: 0xFBD2, + 29922 - 19968: 0xF8F8, + 29923 - 19968: 0xF7FB, + 29926 - 19968: 0xE8BF, + 29934 - 19968: 0xE8B7, + 29943 - 19968: 0xEDB6, + 29953 - 19968: 0xDCBA, + 29956 - 19968: 0xCCB4, + 29969 - 19968: 0xF1F7, + 29973 - 19968: 0xE8B8, + 29976 - 19968: 0xCAF6, + 29978 - 19968: 0xE4A4, + 29979 - 19968: 0xF4D6, + 29983 - 19968: 0xDFE6, + 29987 - 19968: 0xDFA7, + 29989 - 19968: 0xDFE7, + 29990 - 19968: 0xE1C1, + 29992 - 19968: 0xE9C4, + 29995 - 19968: 0xDCCB, + 29996 - 19968: 0xE9C5, + 30000 - 19968: 0xEFA3, + 30001 - 19968: 0xEBA6, + 30002 - 19968: 0xCBA3, + 30003 - 19968: 0xE3E9, + 30007 - 19968: 0xD1FB, + 30008 - 19968: 0xEFA4, + 30010 - 19968: 0xEFEB, + 30023 - 19968: 0xD0B4, + 30028 - 19968: 0xCDA3, + 30031 - 19968: 0xE8E6, + 30033 - 19968: 0xEFA5, + 30035 - 19968: 0xD3CC, + 30036 - 19968: 0xDAED, + 30041 - 19968: 0xD7BA, + 30043 - 19968: 0xF2D5, + 30044 - 19968: 0xF5E5, + 30045 - 19968: 0xD9EF, + 30050 - 19968: 0xF9B4, + 30053 - 19968: 0xD5D4, + 30054 - 19968: 0xFDCF, + 30058 - 19968: 0xDBE3, + 30063 - 19968: 0xF1E1, + 30064 - 19968: 0xECB6, + 30069 - 19968: 0xFBFE, + 30070 - 19968: 0xD3D7, + 30072 - 19968: 0xD1B1, + 30074 - 19968: 0xCBB1, + 30079 - 19968: 0xD1B2, + 30086 - 19968: 0xCBB2, + 30087 - 19968: 0xF1C2, + 30090 - 19968: 0xF4E1, + 30091 - 19968: 0xF9B5, + 30094 - 19968: 0xE1C3, + 30095 - 19968: 0xE1C2, + 30097 - 19968: 0xEBF7, + 30109 - 19968: 0xDFA8, + 30117 - 19968: 0xCBCA, + 30123 - 19968: 0xE6B9, + 30129 - 19968: 0xF8DE, + 30130 - 19968: 0xF9AA, + 30131 - 19968: 0xCAF7, + 30133 - 19968: 0xEDB7, + 30136 - 19968: 0xD3B8, + 30137 - 19968: 0xF2D6, + 30140 - 19968: 0xD4D9, + 30141 - 19968: 0xEEC5, + 30142 - 19968: 0xF2F0, + 30146 - 19968: 0xCAB2, + 30149 - 19968: 0xDCBB, + 30151 - 19968: 0xF1F8, + 30157 - 19968: 0xECB7, + 30162 - 19968: 0xE5CA, + 30164 - 19968: 0xF6C0, + 30165 - 19968: 0xFDDD, + 30168 - 19968: 0xD4E3, + 30169 - 19968: 0xCCE2, + 30171 - 19968: 0xF7D4, + 30178 - 19968: 0xD7E5, + 30192 - 19968: 0xD3C3, + 30194 - 19968: 0xD8A6, + 30196 - 19968: 0xF6C1, + 30202 - 19968: 0xDDF6, + 30204 - 19968: 0xCDC0, + 30208 - 19968: 0xE5DC, + 30221 - 19968: 0xE5CB, + 30233 - 19968: 0xE1C4, + 30239 - 19968: 0xE8B0, + 30240 - 19968: 0xF4B0, + 30241 - 19968: 0xF3EA, + 30242 - 19968: 0xDAEE, + 30244 - 19968: 0xD7BB, + 30246 - 19968: 0xE2B1, + 30267 - 19968: 0xD7AA, + 30274 - 19968: 0xD6FB, + 30284 - 19968: 0xE4DF, + 30286 - 19968: 0xCAD6, + 30290 - 19968: 0xEBA8, + 30294 - 19968: 0xDBFE, + 30305 - 19968: 0xF6C2, + 30308 - 19968: 0xEFBB, + 30313 - 19968: 0xD4FD, + 30316 - 19968: 0xE0C8, + 30320 - 19968: 0xE8B9, + 30322 - 19968: 0xEFA6, + 30328 - 19968: 0xCDA4, + 30331 - 19968: 0xD4F4, + 30332 - 19968: 0xDBA1, + 30333 - 19968: 0xDBDC, + 30334 - 19968: 0xDBDD, + 30340 - 19968: 0xEEDC, + 30342 - 19968: 0xCBCB, + 30343 - 19968: 0xFCD5, + 30350 - 19968: 0xCEEB, + 30352 - 19968: 0xCDC1, + 30355 - 19968: 0xFBD3, + 30382 - 19968: 0xF9AB, + 30394 - 19968: 0xF5D4, + 30399 - 19968: 0xD9A9, + 30402 - 19968: 0xE9DD, + 30403 - 19968: 0xDBCD, + 30406 - 19968: 0xDDCE, + 30408 - 19968: 0xE7C3, + 30410 - 19968: 0xECCC, + 30418 - 19968: 0xF9EC, + 30422 - 19968: 0xCBCC, + 30427 - 19968: 0xE0FC, + 30428 - 19968: 0xD4A8, + 30430 - 19968: 0xEDD3, + 30431 - 19968: 0xD8EF, + 30433 - 19968: 0xF2D7, + 30435 - 19968: 0xCAF8, + 30436 - 19968: 0xDAEF, + 30439 - 19968: 0xD6D4, + 30446 - 19968: 0xD9CD, + 30450 - 19968: 0xD8EE, + 30452 - 19968: 0xF2C1, + 30456 - 19968: 0xDFD3, + 30460 - 19968: 0xDAF0, + 30462 - 19968: 0xE2EA, + 30465 - 19968: 0xE0FD, + 30468 - 19968: 0xD8F8, + 30472 - 19968: 0xF7AF, + 30473 - 19968: 0xDAB6, + 30475 - 19968: 0xCAD7, + 30494 - 19968: 0xF2D8, + 30496 - 19968: 0xD8F9, + 30505 - 19968: 0xFADF, + 30519 - 19968: 0xCFEF, + 30520 - 19968: 0xD9C2, + 30522 - 19968: 0xF0D2, + 30524 - 19968: 0xE4D1, + 30528 - 19968: 0xF3B7, + 30541 - 19968: 0xFAE0, + 30555 - 19968: 0xEFEC, + 30561 - 19968: 0xE2B2, + 30563 - 19968: 0xD4BD, + 30566 - 19968: 0xD9CE, + 30571 - 19968: 0xF4E2, + 30585 - 19968: 0xD4A9, + 30590 - 19968: 0xCDC2, + 30591 - 19968: 0xE7DA, + 30603 - 19968: 0xF2D9, + 30609 - 19968: 0xD9AA, + 30622 - 19968: 0xD8BE, + 30629 - 19968: 0xDCAD, + 30636 - 19968: 0xE2EB, + 30637 - 19968: 0xD6FC, + 30640 - 19968: 0xCAF9, + 30643 - 19968: 0xD4DA, + 30651 - 19968: 0xF4D7, + 30652 - 19968: 0xCCA1, + 30655 - 19968: 0xCFBA, + 30679 - 19968: 0xF5B8, + 30683 - 19968: 0xD9C3, + 30684 - 19968: 0xD0E8, + 30690 - 19968: 0xE3C5, + 30691 - 19968: 0xEBF8, + 30693 - 19968: 0xF2B1, + 30697 - 19968: 0xCFBB, + 30701 - 19968: 0xD3AD, + 30702 - 19968: 0xE8E1, + 30703 - 19968: 0xCEEC, + 30707 - 19968: 0xE0B4, + 30722 - 19968: 0xDEE3, + 30738 - 19968: 0xDDF7, + 30757 - 19968: 0xF2B2, + 30758 - 19968: 0xF3F6, + 30759 - 19968: 0xF6DB, + 30764 - 19968: 0xD7FE, + 30770 - 19968: 0xF8DF, + 30772 - 19968: 0xF7F2, + 30789 - 19968: 0xD0A9, + 30799 - 19968: 0xE6DA, + 30813 - 19968: 0xF5A6, + 30827 - 19968: 0xD7BC, + 30828 - 19968: 0xCCE3, + 30831 - 19968: 0xE6DB, + 30844 - 19968: 0xDDDD, + 30849 - 19968: 0xD1B3, + 30855 - 19968: 0xEFED, + 30860 - 19968: 0xD6DE, + 30861 - 19968: 0xE4F4, + 30862 - 19968: 0xE1EF, + 30865 - 19968: 0xDDF8, + 30871 - 19968: 0xE8CF, + 30883 - 19968: 0xCAE5, + 30887 - 19968: 0xDCA1, + 30889 - 19968: 0xE0B5, + 30906 - 19968: 0xFCAC, + 30907 - 19968: 0xFCAD, + 30908 - 19968: 0xD8A7, + 30913 - 19968: 0xEDB8, + 30917 - 19968: 0xDBB6, + 30922 - 19968: 0xD6F0, + 30923 - 19968: 0xF3AF, + 30926 - 19968: 0xCDA5, + 30928 - 19968: 0xDAF1, + 30952 - 19968: 0xD8A8, + 30956 - 19968: 0xCCE4, + 30959 - 19968: 0xD1B4, + 30965 - 19968: 0xCAD8, + 30971 - 19968: 0xDAF2, + 30977 - 19968: 0xF5A7, + 30990 - 19968: 0xF5A8, + 30998 - 19968: 0xE6A6, + 31018 - 19968: 0xD5EC, + 31019 - 19968: 0xD5F8, + 31020 - 19968: 0xDAF3, + 31034 - 19968: 0xE3C6, + 31038 - 19968: 0xDEE4, + 31040 - 19968: 0xDEE5, + 31041 - 19968: 0xD1B5, + 31047 - 19968: 0xD1B6, + 31048 - 19968: 0xD1B7, + 31049 - 19968: 0xF2B3, + 31056 - 19968: 0xE9DE, + 31062 - 19968: 0xF0D3, + 31063 - 19968: 0xF2B4, + 31066 - 19968: 0xF0D4, + 31067 - 19968: 0xCBE4, + 31068 - 19968: 0xFBD4, + 31069 - 19968: 0xF5E6, + 31070 - 19968: 0xE3EA, + 31072 - 19968: 0xDEE6, + 31077 - 19968: 0xDFD4, + 31080 - 19968: 0xF8F9, + 31085 - 19968: 0xF0AE, + 31098 - 19968: 0xD1B8, + 31103 - 19968: 0xD6DF, + 31105 - 19968: 0xD0D7, + 31117 - 19968: 0xFCA1, + 31118 - 19968: 0xEFEE, + 31119 - 19968: 0xDCD8, + 31121 - 19968: 0xE9DF, + 31142 - 19968: 0xE5DD, + 31143 - 19968: 0xFDFB, + 31146 - 19968: 0xE0C9, + 31150 - 19968: 0xD6C9, + 31153 - 19968: 0xD4AA, + 31155 - 19968: 0xE5CC, + 31161 - 19968: 0xE9E0, + 31165 - 19968: 0xD0D8, + 31166 - 19968: 0xFCA2, + 31167 - 19968: 0xD4BE, + 31168 - 19968: 0xE2B3, + 31169 - 19968: 0xDEE7, + 31177 - 19968: 0xDCBC, + 31178 - 19968: 0xD2B6, + 31179 - 19968: 0xF5D5, + 31185 - 19968: 0xCEA1, + 31186 - 19968: 0xF5A9, + 31189 - 19968: 0xDDF9, + 31192 - 19968: 0xDDFA, + 31199 - 19968: 0xF0D5, + 31204 - 19968: 0xF6DF, + 31206 - 19968: 0xF2DA, + 31207 - 19968: 0xE4EB, + 31209 - 19968: 0xF2F1, + 31227 - 19968: 0xECB9, + 31232 - 19968: 0xFDFC, + 31237 - 19968: 0xE1AA, + 31240 - 19968: 0xCAD9, + 31243 - 19968: 0xEFEF, + 31245 - 19968: 0xF5AA, + 31252 - 19968: 0xECF9, + 31255 - 19968: 0xF8AD, + 31257 - 19968: 0xF2C2, + 31258 - 19968: 0xF6C3, + 31260 - 19968: 0xD7D2, + 31263 - 19968: 0xF9A2, + 31264 - 19968: 0xF0D6, + 31278 - 19968: 0xF0FA, + 31281 - 19968: 0xF6E0, + 31286 - 19968: 0xE9F3, + 31287 - 19968: 0xF2C3, + 31291 - 19968: 0xD4AB, + 31292 - 19968: 0xCAB3, + 31293 - 19968: 0xCDA6, + 31295 - 19968: 0xCDC3, + 31296 - 19968: 0xCDDA, + 31302 - 19968: 0xD9CF, + 31305 - 19968: 0xF6C4, + 31309 - 19968: 0xEEDD, + 31310 - 19968: 0xE7C4, + 31319 - 19968: 0xE2B4, + 31329 - 19968: 0xDFE2, + 31330 - 19968: 0xE7DB, + 31337 - 19968: 0xE8B1, + 31339 - 19968: 0xFCAE, + 31344 - 19968: 0xE5CD, + 31348 - 19968: 0xFAEB, + 31350 - 19968: 0xCFBC, + 31353 - 19968: 0xCFE2, + 31354 - 19968: 0xCDF6, + 31357 - 19968: 0xEFF0, + 31359 - 19968: 0xF4BE, + 31361 - 19968: 0xD4CD, + 31364 - 19968: 0xF3B8, + 31368 - 19968: 0xE9A1, + 31378 - 19968: 0xF2F2, + 31379 - 19968: 0xF3EB, + 31381 - 19968: 0xF0D7, + 31384 - 19968: 0xCFD7, + 31391 - 19968: 0xCFDF, + 31401 - 19968: 0xE8C0, + 31402 - 19968: 0xE8C1, + 31406 - 19968: 0xCFE3, + 31407 - 19968: 0xE9A2, + 31418 - 19968: 0xD0AA, + 31428 - 19968: 0xF3C1, + 31429 - 19968: 0xD0AB, + 31431 - 19968: 0xD4E4, + 31434 - 19968: 0xEFBC, + 31435 - 19968: 0xD8A1, + 31447 - 19968: 0xD9DF, + 31449 - 19968: 0xF3D7, + 31453 - 19968: 0xDCBD, + 31455 - 19968: 0xCCE5, + 31456 - 19968: 0xEDF1, + 31459 - 19968: 0xF1E2, + 31461 - 19968: 0xD4DB, + 31466 - 19968: 0xE2B5, + 31469 - 19968: 0xCAE6, + 31471 - 19968: 0xD3AE, + 31478 - 19968: 0xCCE6, + 31481 - 19968: 0xF1D3, + 31482 - 19968: 0xF5E7, + 31487 - 19968: 0xCADA, + 31503 - 19968: 0xFBEE, + 31505 - 19968: 0xE1C5, + 31513 - 19968: 0xDFE9, + 31515 - 19968: 0xEEDE, + 31518 - 19968: 0xF7C2, + 31520 - 19968: 0xD8A2, + 31526 - 19968: 0xDDAC, + 31532 - 19968: 0xF0AF, + 31533 - 19968: 0xD6BD, + 31545 - 19968: 0xE1AB, + 31558 - 19968: 0xF9B6, + 31561 - 19968: 0xD4F5, + 31563 - 19968: 0xD0C9, + 31564 - 19968: 0xEFA7, + 31565 - 19968: 0xE2EC, + 31567 - 19968: 0xDBEA, + 31568 - 19968: 0xCECC, + 31569 - 19968: 0xF5E8, + 31570 - 19968: 0xF7D5, + 31572 - 19968: 0xD3CD, + 31574 - 19968: 0xF3FE, + 31584 - 19968: 0xD0B5, + 31596 - 19968: 0xE0FE, + 31598 - 19968: 0xDFFB, + 31605 - 19968: 0xE6DD, + 31613 - 19968: 0xE8A4, + 31623 - 19968: 0xCBCD, + 31627 - 19968: 0xEFA8, + 31631 - 19968: 0xEEB4, + 31636 - 19968: 0xDAD8, + 31637 - 19968: 0xD1B9, + 31639 - 19968: 0xDFA9, + 31642 - 19968: 0xF3B0, + 31645 - 19968: 0xCCC4, + 31649 - 19968: 0xCEB7, + 31661 - 19968: 0xEFA9, + 31665 - 19968: 0xDFD5, + 31668 - 19968: 0xEDD7, + 31672 - 19968: 0xEEC6, + 31680 - 19968: 0xEFBD, + 31681 - 19968: 0xFCD6, + 31684 - 19968: 0xDBF4, + 31686 - 19968: 0xEFAA, + 31687 - 19968: 0xF8B9, + 31689 - 19968: 0xF5E9, + 31698 - 19968: 0xE3D9, + 31712 - 19968: 0xE1C6, + 31716 - 19968: 0xD4BF, + 31721 - 19968: 0xDEE8, + 31751 - 19968: 0xF0EA, + 31762 - 19968: 0xF3C2, + 31774 - 19968: 0xD3AF, + 31777 - 19968: 0xCADB, + 31783 - 19968: 0xFCD7, + 31786 - 19968: 0xEDD8, + 31787 - 19968: 0xE1C7, + 31805 - 19968: 0xF4D8, + 31806 - 19968: 0xD6B3, + 31807 - 19968: 0xDDAD, + 31811 - 19968: 0xD5BE, + 31820 - 19968: 0xF1C3, + 31821 - 19968: 0xEEDF, + 31840 - 19968: 0xD6EB, + 31844 - 19968: 0xF4D9, + 31852 - 19968: 0xD7E6, + 31859 - 19968: 0xDAB7, + 31875 - 19968: 0xDDFB, + 31881 - 19968: 0xDDCF, + 31890 - 19968: 0xD8A3, + 31893 - 19968: 0xDAD9, + 31895 - 19968: 0xF0D8, + 31896 - 19968: 0xEFC4, + 31903 - 19968: 0xE1D8, + 31909 - 19968: 0xF1D4, + 31911 - 19968: 0xEDF2, + 31918 - 19968: 0xD5DB, + 31921 - 19968: 0xD5DC, + 31922 - 19968: 0xF3C4, + 31923 - 19968: 0xCBD7, + 31929 - 19968: 0xE2B6, + 31934 - 19968: 0xEFF1, + 31946 - 19968: 0xFBD5, + 31958 - 19968: 0xD3D8, + 31966 - 19968: 0xDDD0, + 31967 - 19968: 0xF0D9, + 31968 - 19968: 0xCBB3, + 31975 - 19968: 0xD5DD, + 31995 - 19968: 0xCDA7, + 31998 - 19968: 0xD0AC, + 32000 - 19968: 0xD1BA, + 32002 - 19968: 0xF1C4, + 32004 - 19968: 0xE5B3, + 32005 - 19968: 0xFBF5, + 32006 - 19968: 0xE9E1, + 32007 - 19968: 0xFDE0, + 32008 - 19968: 0xFCBC, + 32010 - 19968: 0xDAA2, + 32011 - 19968: 0xDAA3, + 32013 - 19968: 0xD2A1, + 32016 - 19968: 0xD2EF, + 32020 - 19968: 0xE2ED, + 32023 - 19968: 0xDEE9, + 32024 - 19968: 0xCEDC, + 32025 - 19968: 0xF2B5, + 32026 - 19968: 0xD0E4, + 32027 - 19968: 0xDDD1, + 32032 - 19968: 0xE1C8, + 32033 - 19968: 0xDBB7, + 32034 - 19968: 0xDFE3, + 32043 - 19968: 0xEDB9, + 32044 - 19968: 0xF1C5, + 32046 - 19968: 0xF3CF, + 32047 - 19968: 0xD7AB, + 32048 - 19968: 0xE1AC, + 32051 - 19968: 0xE3EB, + 32053 - 19968: 0xEEC7, + 32057 - 19968: 0xE1C9, + 32058 - 19968: 0xCAFA, + 32066 - 19968: 0xF0FB, + 32067 - 19968: 0xFAE1, + 32068 - 19968: 0xF0DA, + 32069 - 19968: 0xCCE7, + 32070 - 19968: 0xDAF4, + 32080 - 19968: 0xCCBF, + 32094 - 19968: 0xCEED, + 32097 - 19968: 0xD5A9, + 32098 - 19968: 0xFAE2, + 32102 - 19968: 0xD0E5, + 32104 - 19968: 0xEBD6, + 32106 - 19968: 0xECDF, + 32110 - 19968: 0xDFFC, + 32113 - 19968: 0xF7D6, + 32114 - 19968: 0xDEEA, + 32115 - 19968: 0xCBB4, + 32118 - 19968: 0xEFBE, + 32121 - 19968: 0xCCB5, + 32127 - 19968: 0xCFBD, + 32142 - 19968: 0xEFF2, + 32143 - 19968: 0xE2B7, + 32147 - 19968: 0xCCE8, + 32156 - 19968: 0xF0FC, + 32160 - 19968: 0xD6E0, + 32162 - 19968: 0xF1C6, + 32172 - 19968: 0xE2B8, + 32173 - 19968: 0xEBAB, + 32177 - 19968: 0xCBB5, + 32178 - 19968: 0xD8D1, + 32180 - 19968: 0xF4CE, + 32181 - 19968: 0xF3F7, + 32184 - 19968: 0xD7C6, + 32186 - 19968: 0xD1BB, + 32187 - 19968: 0xF7AA, + 32189 - 19968: 0xEDCA, + 32190 - 19968: 0xD7D3, + 32191 - 19968: 0xD8FA, + 32199 - 19968: 0xF6C5, + 32202 - 19968: 0xD1CC, + 32203 - 19968: 0xDDFC, + 32214 - 19968: 0xDFFD, + 32216 - 19968: 0xF9E5, + 32218 - 19968: 0xE0CA, + 32221 - 19968: 0xF2FD, + 32222 - 19968: 0xD3B0, + 32224 - 19968: 0xF4F3, + 32225 - 19968: 0xDAC9, + 32227 - 19968: 0xE6DE, + 32232 - 19968: 0xF8BA, + 32233 - 19968: 0xE8D0, + 32236 - 19968: 0xD8FB, + 32239 - 19968: 0xEAD5, + 32244 - 19968: 0xD6A3, + 32251 - 19968: 0xF6C6, + 32265 - 19968: 0xF2DB, + 32266 - 19968: 0xE4FC, + 32277 - 19968: 0xE8B2, + 32283 - 19968: 0xDADA, + 32285 - 19968: 0xF2DC, + 32286 - 19968: 0xFBD6, + 32287 - 19968: 0xE9B2, + 32289 - 19968: 0xEEAD, + 32291 - 19968: 0xFAE3, + 32299 - 19968: 0xDCEE, + 32302 - 19968: 0xF5EA, + 32303 - 19968: 0xE6E0, + 32305 - 19968: 0xF0FD, + 32311 - 19968: 0xD7AC, + 32317 - 19968: 0xF5C5, + 32318 - 19968: 0xEEE0, + 32321 - 19968: 0xDBE5, + 32323 - 19968: 0xDDDE, + 32326 - 19968: 0xD9F0, + 32327 - 19968: 0xE9A3, + 32338 - 19968: 0xF1F9, + 32340 - 19968: 0xF2C4, + 32341 - 19968: 0xE0CB, + 32350 - 19968: 0xE9A4, + 32353 - 19968: 0xE2B9, + 32361 - 19968: 0xE3B1, + 32362 - 19968: 0xFCEB, + 32363 - 19968: 0xCDA8, + 32365 - 19968: 0xCCB6, + 32368 - 19968: 0xF0DB, + 32377 - 19968: 0xE6BA, + 32380 - 19968: 0xCDA9, + 32386 - 19968: 0xF3C3, + 32396 - 19968: 0xE1D9, + 32399 - 19968: 0xEFAB, + 32403 - 19968: 0xE7C5, + 32406 - 19968: 0xE0E9, + 32408 - 19968: 0xF3C5, + 32411 - 19968: 0xD4C0, + 32412 - 19968: 0xD5BF, + 32566 - 19968: 0xDDAE, + 32568 - 19968: 0xF9FC, + 32570 - 19968: 0xCCC0, + 32588 - 19968: 0xE5A2, + 32592 - 19968: 0xCEB8, + 32596 - 19968: 0xD8D2, + 32597 - 19968: 0xF9D6, + 32618 - 19968: 0xF1AA, + 32619 - 19968: 0xCED1, + 32622 - 19968: 0xF6C7, + 32624 - 19968: 0xDBEB, + 32626 - 19968: 0xDFFE, + 32629 - 19968: 0xD8E1, + 32631 - 19968: 0xF7F3, + 32633 - 19968: 0xD7E7, + 32645 - 19968: 0xD4FE, + 32648 - 19968: 0xD1BC, + 32650 - 19968: 0xE5CF, + 32652 - 19968: 0xCBB6, + 32654 - 19968: 0xDAB8, + 32660 - 19968: 0xCDC4, + 32666 - 19968: 0xD6BE, + 32670 - 19968: 0xE2BA, + 32676 - 19968: 0xCFD8, + 32680 - 19968: 0xE0CC, + 32681 - 19968: 0xEBF9, + 32690 - 19968: 0xFDFD, + 32696 - 19968: 0xD7E8, + 32697 - 19968: 0xCBD8, + 32701 - 19968: 0xE9E2, + 32705 - 19968: 0xE8BA, + 32709 - 19968: 0xE3C7, + 32714 - 19968: 0xECCD, + 32716 - 19968: 0xECCE, + 32718 - 19968: 0xD6BF, + 32722 - 19968: 0xE3A7, + 32724 - 19968: 0xDFD6, + 32725 - 19968: 0xFDE8, + 32735 - 19968: 0xEEE1, + 32736 - 19968: 0xF6A8, + 32737 - 19968: 0xDDFD, + 32745 - 19968: 0xF8BB, + 32747 - 19968: 0xE8D1, + 32752 - 19968: 0xF9D7, + 32761 - 19968: 0xCEEE, + 32764 - 19968: 0xECCF, + 32768 - 19968: 0xE9A5, + 32769 - 19968: 0xD6D5, + 32771 - 19968: 0xCDC5, + 32773 - 19968: 0xEDBA, + 32774 - 19968: 0xD1BD, + 32777 - 19968: 0xCFBE, + 32780 - 19968: 0xECBB, + 32784 - 19968: 0xD2B1, + 32789 - 19968: 0xCCE9, + 32791 - 19968: 0xD9C4, + 32792 - 19968: 0xE9FC, + 32813 - 19968: 0xD1BE, + 32819 - 19968: 0xECBC, + 32822 - 19968: 0xE5AD, + 32829 - 19968: 0xF7B0, + 32831 - 19968: 0xCCEA, + 32835 - 19968: 0xD3C4, + 32838 - 19968: 0xD6C0, + 32842 - 19968: 0xD6FD, + 32854 - 19968: 0xE1A1, + 32856 - 19968: 0xDEBD, + 32858 - 19968: 0xF6A9, + 32862 - 19968: 0xDAA4, + 32879 - 19968: 0xD6A4, + 32880 - 19968: 0xF5C6, + 32882 - 19968: 0xE1A2, + 32883 - 19968: 0xE9C6, + 32887 - 19968: 0xF2C5, + 32893 - 19968: 0xF4E9, + 32894 - 19968: 0xD6EC, + 32895 - 19968: 0xEBD3, + 32900 - 19968: 0xECBD, + 32901 - 19968: 0xE2DC, + 32902 - 19968: 0xDEEB, + 32903 - 19968: 0xF0DC, + 32905 - 19968: 0xEBBF, + 32907 - 19968: 0xD7CE, + 32908 - 19968: 0xD1BF, + 32918 - 19968: 0xF5AB, + 32923 - 19968: 0xF9FD, + 32925 - 19968: 0xCADC, + 32929 - 19968: 0xCDC6, + 32930 - 19968: 0xF2B6, + 32933 - 19968: 0xDDFE, + 32937 - 19968: 0xCCB7, + 32938 - 19968: 0xDBB8, + 32943 - 19968: 0xD0E9, + 32945 - 19968: 0xCEDD, + 32946 - 19968: 0xEBC0, + 32948 - 19968: 0xFDA2, + 32954 - 19968: 0xF8CB, + 32963 - 19968: 0xEAD6, + 32964 - 19968: 0xF1B0, + 32972 - 19968: 0xDBCE, + 32974 - 19968: 0xF7C3, + 32986 - 19968: 0xDBCF, + 32987 - 19968: 0xCBA4, + 32990 - 19968: 0xF8E0, + 32993 - 19968: 0xFBD7, + 32996 - 19968: 0xEBCA, + 32997 - 19968: 0xE0A1, + 33009 - 19968: 0xCECD, + 33012 - 19968: 0xD4DC, + 33016 - 19968: 0xFDD8, + 33021 - 19968: 0xD2F6, + 33026 - 19968: 0xF2B7, + 33029 - 19968: 0xFAF6, + 33030 - 19968: 0xF6AA, + 33031 - 19968: 0xFAF7, + 33032 - 19968: 0xD8E6, + 33034 - 19968: 0xF4B1, + 33048 - 19968: 0xE8D2, + 33050 - 19968: 0xCAC5, + 33051 - 19968: 0xCCEB, + 33059 - 19968: 0xE2EE, + 33065 - 19968: 0xE2BB, + 33067 - 19968: 0xF7AD, + 33071 - 19968: 0xF8E1, + 33081 - 19968: 0xF3EC, + 33086 - 19968: 0xDEA1, + 33099 - 19968: 0xE4FD, + 33102 - 19968: 0xE3EC, + 33104 - 19968: 0xDDAF, + 33105 - 19968: 0xDDB0, + 33108 - 19968: 0xCBB7, + 33109 - 19968: 0xE8D3, + 33125 - 19968: 0xE1A3, + 33126 - 19968: 0xD2E0, + 33131 - 19968: 0xF0FE, + 33136 - 19968: 0xE9A6, + 33137 - 19968: 0xCBF2, + 33144 - 19968: 0xEDF3, + 33145 - 19968: 0xDCD9, + 33146 - 19968: 0xE0CD, + 33151 - 19968: 0xF7DA, + 33152 - 19968: 0xDBB9, + 33160 - 19968: 0xCCAE, + 33162 - 19968: 0xDADB, + 33167 - 19968: 0xCDC7, + 33178 - 19968: 0xDDB1, + 33180 - 19968: 0xD8AF, + 33181 - 19968: 0xE3A3, + 33184 - 19968: 0xCEEF, + 33187 - 19968: 0xF2F3, + 33192 - 19968: 0xF8B3, + 33203 - 19968: 0xE0CE, + 33205 - 19968: 0xF5FD, + 33210 - 19968: 0xEBEC, + 33213 - 19968: 0xD3C5, + 33214 - 19968: 0xFCEC, + 33215 - 19968: 0xD2DB, + 33216 - 19968: 0xD4EB, + 33218 - 19968: 0xDEA2, + 33222 - 19968: 0xE5E6, + 33229 - 19968: 0xF0B0, + 33240 - 19968: 0xD5C4, + 33247 - 19968: 0xEDF4, + 33251 - 19968: 0xE3ED, + 33253 - 19968: 0xE8C2, + 33255 - 19968: 0xEDF5, + 33256 - 19968: 0xD7FC, + 33258 - 19968: 0xEDBB, + 33261 - 19968: 0xF6AB, + 33267 - 19968: 0xF2B8, + 33268 - 19968: 0xF6C8, + 33274 - 19968: 0xD3E6, + 33275 - 19968: 0xF2DD, + 33276 - 19968: 0xCFBF, + 33278 - 19968: 0xEBAC, + 33285 - 19968: 0xCFC0, + 33287 - 19968: 0xE6A8, + 33288 - 19968: 0xFDE9, + 33290 - 19968: 0xCFC1, + 33292 - 19968: 0xE0DF, + 33293 - 19968: 0xDEEC, + 33298 - 19968: 0xE0A2, + 33307 - 19968: 0xF4BF, + 33308 - 19968: 0xE2EF, + 33310 - 19968: 0xD9F1, + 33311 - 19968: 0xF1C7, + 33313 - 19968: 0xCBB8, + 33322 - 19968: 0xF9FE, + 33323 - 19968: 0xDBBA, + 33324 - 19968: 0xDAF5, + 33333 - 19968: 0xF6EC, + 33334 - 19968: 0xDADC, + 33335 - 19968: 0xFAE4, + 33337 - 19968: 0xE0CF, + 33344 - 19968: 0xDDB2, + 33349 - 19968: 0xE6A9, + 33351 - 19968: 0xEFF3, + 33369 - 19968: 0xF3ED, + 33380 - 19968: 0xEBFA, + 33382 - 19968: 0xF9E6, + 33390 - 19968: 0xCADD, + 33391 - 19968: 0xD5DE, + 33393 - 19968: 0xCADE, + 33394 - 19968: 0xDFE4, + 33398 - 19968: 0xE6FD, + 33400 - 19968: 0xF5AC, + 33406 - 19968: 0xE4F5, + 33419 - 19968: 0xE9E3, + 33421 - 19968: 0xEDCB, + 33422 - 19968: 0xCFE4, + 33426 - 19968: 0xD8D3, + 33433 - 19968: 0xDDB3, + 33434 - 19968: 0xD4EC, + 33437 - 19968: 0xF2B9, + 33439 - 19968: 0xDFB7, + 33445 - 19968: 0xCBCE, + 33446 - 19968: 0xFBD8, + 33449 - 19968: 0xD0D9, + 33452 - 19968: 0xDDD2, + 33453 - 19968: 0xF7F4, + 33454 - 19968: 0xE7DC, + 33455 - 19968: 0xE4A5, + 33457 - 19968: 0xFCA3, + 33459 - 19968: 0xDBBB, + 33463 - 19968: 0xF2BA, + 33464 - 19968: 0xE9FD, + 33465 - 19968: 0xD0CA, + 33467 - 19968: 0xF5D6, + 33468 - 19968: 0xD9C5, + 33469 - 19968: 0xE4B4, + 33471 - 19968: 0xEDA7, + 33489 - 19968: 0xEABD, + 33490 - 19968: 0xE6FE, + 33492 - 19968: 0xF7C4, + 33493 - 19968: 0xF5AD, + 33495 - 19968: 0xD9E0, + 33499 - 19968: 0xCAB4, + 33502 - 19968: 0xF8E2, + 33503 - 19968: 0xCFC2, + 33505 - 19968: 0xECBE, + 33509 - 19968: 0xE5B4, + 33510 - 19968: 0xCDC8, + 33511 - 19968: 0xEEC8, + 33521 - 19968: 0xE7C8, + 33533 - 19968: 0xCDC9, + 33534 - 19968: 0xF9B7, + 33537 - 19968: 0xF1E8, + 33538 - 19968: 0xD9F2, + 33539 - 19968: 0xDBF5, + 33540 - 19968: 0xCAB5, + 33541 - 19968: 0xD9C6, + 33545 - 19968: 0xD8C9, + 33559 - 19968: 0xD9AB, + 33576 - 19968: 0xEDBC, + 33579 - 19968: 0xD8D4, + 33583 - 19968: 0xDCDA, + 33585 - 19968: 0xE2BC, + 33588 - 19968: 0xFCED, + 33589 - 19968: 0xECE0, + 33590 - 19968: 0xD2FE, + 33592 - 19968: 0xE9C7, + 33593 - 19968: 0xE6AA, + 33600 - 19968: 0xE2F0, + 33607 - 19968: 0xFABB, + 33609 - 19968: 0xF5AE, + 33610 - 19968: 0xFBAA, + 33615 - 19968: 0xECFB, + 33617 - 19968: 0xECBF, + 33618 - 19968: 0xFCD8, + 33651 - 19968: 0xD4E5, + 33655 - 19968: 0xF9C3, + 33659 - 19968: 0xEEE2, + 33673 - 19968: 0xD7E9, + 33674 - 19968: 0xEDF6, + 33678 - 19968: 0xDEED, + 33686 - 19968: 0xCCEC, + 33688 - 19968: 0xE3EE, + 33694 - 19968: 0xE8D4, + 33698 - 19968: 0xFAF8, + 33705 - 19968: 0xDDB4, + 33706 - 19968: 0xE4B5, + 33707 - 19968: 0xD8B0, + 33725 - 19968: 0xD8D5, + 33729 - 19968: 0xF4EA, + 33733 - 19968: 0xCEB9, + 33737 - 19968: 0xD6E1, + 33738 - 19968: 0xCFD2, + 33740 - 19968: 0xD0B6, + 33747 - 19968: 0xCEA2, + 33750 - 19968: 0xF3EE, + 33756 - 19968: 0xF3F8, + 33769 - 19968: 0xDCCC, + 33771 - 19968: 0xD0CB, + 33775 - 19968: 0xFCA4, + 33776 - 19968: 0xCDCA, + 33777 - 19968: 0xD7D4, + 33778 - 19968: 0xDEA3, + 33780 - 19968: 0xE4E0, + 33785 - 19968: 0xEEC9, + 33789 - 19968: 0xE2DD, + 33795 - 19968: 0xF5FE, + 33796 - 19968: 0xD4AC, + 33802 - 19968: 0xD5D1, + 33804 - 19968: 0xD8F0, + 33805 - 19968: 0xF8C3, + 33806 - 19968: 0xEAD7, + 33833 - 19968: 0xF5D7, + 33836 - 19968: 0xD8BF, + 33841 - 19968: 0xFDC0, + 33848 - 19968: 0xEBAD, + 33853 - 19968: 0xD5AA, + 33865 - 19968: 0xE7A8, + 33879 - 19968: 0xEECA, + 33883 - 19968: 0xCAE7, + 33889 - 19968: 0xF8E3, + 33891 - 19968: 0xD4DD, + 33894 - 19968: 0xEAD8, + 33899 - 19968: 0xFBD9, + 33900 - 19968: 0xEDF7, + 33903 - 19968: 0xE5B5, + 33909 - 19968: 0xD0AD, + 33914 - 19968: 0xF1F1, + 33936 - 19968: 0xE2BD, + 33940 - 19968: 0xE3C8, + 33945 - 19968: 0xD9D5, + 33948 - 19968: 0xDFAA, + 33953 - 19968: 0xDBBC, + 33970 - 19968: 0xF8E4, + 33976 - 19968: 0xF1FA, + 33979 - 19968: 0xE5B6, + 33980 - 19968: 0xF3EF, + 33983 - 19968: 0xFBDA, + 33984 - 19968: 0xE1E0, + 33986 - 19968: 0xD9AC, + 33988 - 19968: 0xF5EB, + 33990 - 19968: 0xE0B6, + 33993 - 19968: 0xE9C8, + 33995 - 19968: 0xCBCF, + 33997 - 19968: 0xE3C9, + 34001 - 19968: 0xDEEE, + 34010 - 19968: 0xE2BE, + 34028 - 19968: 0xDCEF, + 34030 - 19968: 0xD6A5, + 34036 - 19968: 0xE2F1, + 34044 - 19968: 0xD6FE, + 34065 - 19968: 0xD9A1, + 34067 - 19968: 0xD8C0, + 34068 - 19968: 0xDCDB, + 34071 - 19968: 0xEDBD, + 34072 - 19968: 0xDFB8, + 34074 - 19968: 0xEAA5, + 34078 - 19968: 0xD7AD, + 34081 - 19968: 0xF3F9, + 34083 - 19968: 0xEDF8, + 34085 - 19968: 0xF5C7, + 34092 - 19968: 0xE1CA, + 34093 - 19968: 0xEBE3, + 34095 - 19968: 0xF2DE, + 34109 - 19968: 0xF8CC, + 34111 - 19968: 0xEAD9, + 34113 - 19968: 0xD3C6, + 34115 - 19968: 0xDBE6, + 34121 - 19968: 0xF5AF, + 34126 - 19968: 0xCEF0, + 34131 - 19968: 0xE9FE, + 34137 - 19968: 0xFBB6, + 34147 - 19968: 0xE2F2, + 34152 - 19968: 0xCFF2, + 34153 - 19968: 0xF7B9, + 34154 - 19968: 0xD9F3, + 34157 - 19968: 0xE1CB, + 34180 - 19968: 0xDADD, + 34183 - 19968: 0xDAB9, + 34191 - 19968: 0xEBFB, + 34193 - 19968: 0xCBB9, + 34196 - 19968: 0xEDF9, + 34203 - 19968: 0xE0E0, + 34214 - 19968: 0xF4C0, + 34216 - 19968: 0xFDBC, + 34217 - 19968: 0xDFB1, + 34218 - 19968: 0xE3EF, + 34223 - 19968: 0xE0A3, + 34224 - 19968: 0xFDB9, + 34234 - 19968: 0xF0B1, + 34241 - 19968: 0xCDCB, + 34249 - 19968: 0xEDBE, + 34253 - 19968: 0xD5C0, + 34254 - 19968: 0xE3F0, + 34255 - 19968: 0xEDFA, + 34261 - 19968: 0xE9E4, + 34268 - 19968: 0xD5ED, + 34269 - 19968: 0xE7DD, + 34276 - 19968: 0xD4F6, + 34277 - 19968: 0xE5B7, + 34281 - 19968: 0xDBE7, + 34282 - 19968: 0xE2BF, + 34295 - 19968: 0xEECB, + 34298 - 19968: 0xD7F4, + 34299 - 19968: 0xF0DD, + 34303 - 19968: 0xCEAB, + 34306 - 19968: 0xE7DE, + 34310 - 19968: 0xD6D6, + 34311 - 19968: 0xE1CC, + 34314 - 19968: 0xE8B3, + 34326 - 19968: 0xE5EE, + 34327 - 19968: 0xDCA2, + 34330 - 19968: 0xE0D0, + 34349 - 19968: 0xD5B5, + 34367 - 19968: 0xD5A1, + 34382 - 19968: 0xFBDB, + 34384 - 19968: 0xF9CB, + 34388 - 19968: 0xCBF3, + 34389 - 19968: 0xF4A5, + 34395 - 19968: 0xFAC8, + 34396 - 19968: 0xD6D7, + 34398 - 19968: 0xE9E5, + 34399 - 19968: 0xFBDC, + 34407 - 19968: 0xFDD0, + 34425 - 19968: 0xFBF6, + 34442 - 19968: 0xDAA5, + 34444 - 19968: 0xDBBD, + 34451 - 19968: 0xECE2, + 34467 - 19968: 0xCDF7, + 34468 - 19968: 0xF0DE, + 34473 - 19968: 0xF6C9, + 34503 - 19968: 0xDEEF, + 34507 - 19968: 0xD3B1, + 34516 - 19968: 0xFCEE, + 34521 - 19968: 0xE8C3, + 34523 - 19968: 0xF1C8, + 34527 - 19968: 0xCEF1, + 34532 - 19968: 0xF9ED, + 34541 - 19968: 0xF2F4, + 34558 - 19968: 0xE4B6, + 34560 - 19968: 0xF5B9, + 34562 - 19968: 0xDCF0, + 34563 - 19968: 0xE3F1, + 34568 - 19968: 0xE8A5, + 34584 - 19968: 0xF2BB, + 34586 - 19968: 0xDEA4, + 34588 - 19968: 0xDACC, + 34638 - 19968: 0xCAE9, + 34645 - 19968: 0xE3DA, + 34647 - 19968: 0xFCD9, + 34655 - 19968: 0xEADA, + 34662 - 19968: 0xF9C4, + 34664 - 19968: 0xE3A4, + 34676 - 19968: 0xFBDD, + 34678 - 19968: 0xEFCA, + 34680 - 19968: 0xE8C4, + 34690 - 19968: 0xD5CC, + 34701 - 19968: 0xEBD7, + 34719 - 19968: 0xD9AD, + 34722 - 19968: 0xFBAB, + 34739 - 19968: 0xD3D9, + 34746 - 19968: 0xD5A2, + 34756 - 19968: 0xF6DE, + 34784 - 19968: 0xDAF6, + 34796 - 19968: 0xE0D1, + 34799 - 19968: 0xE9A8, + 34802 - 19968: 0xF5F9, + 34809 - 19968: 0xFAAF, + 34811 - 19968: 0xEBFC, + 34814 - 19968: 0xE0EA, + 34821 - 19968: 0xE3B2, + 34847 - 19968: 0xD5C5, + 34850 - 19968: 0xF1E3, + 34851 - 19968: 0xD5EE, + 34865 - 19968: 0xCDCC, + 34870 - 19968: 0xEDD9, + 34875 - 19968: 0xD8C1, + 34880 - 19968: 0xFAEC, + 34886 - 19968: 0xF1EB, + 34892 - 19968: 0xFABC, + 34893 - 19968: 0xE6E2, + 34898 - 19968: 0xFAE5, + 34899 - 19968: 0xE2FA, + 34903 - 19968: 0xCAB6, + 34905 - 19968: 0xE4B7, + 34907 - 19968: 0xEADB, + 34909 - 19968: 0xF5FA, + 34913 - 19968: 0xFBAC, + 34914 - 19968: 0xCFC3, + 34915 - 19968: 0xEBFD, + 34920 - 19968: 0xF8FA, + 34923 - 19968: 0xDFB9, + 34928 - 19968: 0xE1F1, + 34930 - 19968: 0xD2A4, + 34935 - 19968: 0xF5FB, + 34942 - 19968: 0xD0DA, + 34943 - 19968: 0xD0DB, + 34945 - 19968: 0xEABE, + 34946 - 19968: 0xD9B1, + 34952 - 19968: 0xCAB7, + 34955 - 19968: 0xD3E7, + 34957 - 19968: 0xF8E5, + 34962 - 19968: 0xD3B2, + 34966 - 19968: 0xE2C0, + 34967 - 19968: 0xF2DF, + 34974 - 19968: 0xCDE5, + 34987 - 19968: 0xF9AC, + 34996 - 19968: 0xCDCD, + 35009 - 19968: 0xEEAE, + 35010 - 19968: 0xD6AE, + 35023 - 19968: 0xD7EA, + 35028 - 19968: 0xE7E0, + 35029 - 19968: 0xEBAE, + 35033 - 19968: 0xCFD9, + 35036 - 19968: 0xDCCD, + 35037 - 19968: 0xEDFB, + 35039 - 19968: 0xDEF0, + 35041 - 19968: 0xD7EB, + 35048 - 19968: 0xDEA5, + 35059 - 19968: 0xDFD7, + 35060 - 19968: 0xDBD0, + 35061 - 19968: 0xDBD1, + 35064 - 19968: 0xD5A3, + 35069 - 19968: 0xF0B2, + 35079 - 19968: 0xDCDC, + 35088 - 19968: 0xCAE8, + 35090 - 19968: 0xF8E6, + 35091 - 19968: 0xDCCE, + 35096 - 19968: 0xEADC, + 35097 - 19968: 0xDBD2, + 35109 - 19968: 0xE9B3, + 35114 - 19968: 0xF7DB, + 35126 - 19968: 0xE3A8, + 35128 - 19968: 0xD7AE, + 35131 - 19968: 0xE0E1, + 35137 - 19968: 0xCBBA, + 35140 - 19968: 0xE5D1, + 35167 - 19968: 0xD0DC, + 35172 - 19968: 0xD5C1, + 35178 - 19968: 0xD8CA, + 35186 - 19968: 0xE3A9, + 35199 - 19968: 0xE0A4, + 35201 - 19968: 0xE9A9, + 35203 - 19968: 0xD3C7, + 35206 - 19968: 0xDCDD, + 35207 - 19968: 0xF8AE, + 35211 - 19968: 0xCCB8, + 35215 - 19968: 0xD0AE, + 35219 - 19968: 0xD8F2, + 35222 - 19968: 0xE3CA, + 35233 - 19968: 0xCCAF, + 35241 - 19968: 0xD4AD, + 35242 - 19968: 0xF6D1, + 35250 - 19968: 0xD0CC, + 35258 - 19968: 0xCAC6, + 35261 - 19968: 0xD5C2, + 35264 - 19968: 0xCEBA, + 35282 - 19968: 0xCAC7, + 35299 - 19968: 0xFAB0, + 35316 - 19968: 0xDFD8, + 35320 - 19968: 0xF5BA, + 35328 - 19968: 0xE5EB, + 35330 - 19968: 0xEFF4, + 35331 - 19968: 0xDDB5, + 35336 - 19968: 0xCDAA, + 35338 - 19968: 0xE3F2, + 35340 - 19968: 0xFBF7, + 35342 - 19968: 0xF7D0, + 35347 - 19968: 0xFDBA, + 35350 - 19968: 0xFDE1, + 35351 - 19968: 0xF6FE, + 35352 - 19968: 0xD1C0, + 35355 - 19968: 0xE8C5, + 35357 - 19968: 0xE4B8, + 35359 - 19968: 0xE1E8, + 35363 - 19968: 0xCCC1, + 35365 - 19968: 0xD2ED, + 35370 - 19968: 0xDBBE, + 35373 - 19968: 0xE0E2, + 35377 - 19968: 0xFAC9, + 35380 - 19968: 0xE1CD, + 35382 - 19968: 0xCAB8, + 35386 - 19968: 0xF2E0, + 35387 - 19968: 0xF1C9, + 35408 - 19968: 0xDEF1, + 35412 - 19968: 0xF0DF, + 35413 - 19968: 0xF8C4, + 35419 - 19968: 0xEECC, + 35422 - 19968: 0xDEF2, + 35424 - 19968: 0xE7C9, + 35426 - 19968: 0xE2F3, + 35427 - 19968: 0xE7E1, + 35430 - 19968: 0xE3CB, + 35433 - 19968: 0xE3CC, + 35437 - 19968: 0xCFF8, + 35438 - 19968: 0xEFAC, + 35440 - 19968: 0xFDFE, + 35441 - 19968: 0xFCA5, + 35442 - 19968: 0xFAB1, + 35443 - 19968: 0xDFD9, + 35445 - 19968: 0xE0D2, + 35449 - 19968: 0xF4DA, + 35461 - 19968: 0xF1CA, + 35463 - 19968: 0xCEA3, + 35468 - 19968: 0xF2BC, + 35469 - 19968: 0xECE3, + 35475 - 19968: 0xE0A5, + 35477 - 19968: 0xF7AB, + 35480 - 19968: 0xEBAF, + 35486 - 19968: 0xE5DE, + 35488 - 19968: 0xE1A4, + 35489 - 19968: 0xCDAB, + 35491 - 19968: 0xD9F4, + 35492 - 19968: 0xE8A6, + 35493 - 19968: 0xCDCE, + 35494 - 19968: 0xE1E9, + 35496 - 19968: 0xFCEF, + 35498 - 19968: 0xE0E3, + 35504 - 19968: 0xE2C1, + 35506 - 19968: 0xCEA4, + 35513 - 19968: 0xDEA6, + 35516 - 19968: 0xEBFE, + 35518 - 19968: 0xEBDD, + 35519 - 19968: 0xF0E0, + 35522 - 19968: 0xF4DB, + 35524 - 19968: 0xE2F4, + 35527 - 19968: 0xD3C8, + 35531 - 19968: 0xF4EB, + 35533 - 19968: 0xEEB5, + 35535 - 19968: 0xF5D8, + 35538 - 19968: 0xD5DF, + 35542 - 19968: 0xD6E5, + 35547 - 19968: 0xEBB0, + 35548 - 19968: 0xF4E3, + 35553 - 19968: 0xE3CD, + 35558 - 19968: 0xF4F4, + 35559 - 19968: 0xFAB2, + 35562 - 19968: 0xEFF5, + 35563 - 19968: 0xCADF, + 35565 - 19968: 0xEBB1, + 35566 - 19968: 0xEDBF, + 35569 - 19968: 0xFDC9, + 35574 - 19968: 0xE4A6, + 35575 - 19968: 0xF9A4, + 35576 - 19968: 0xF0B3, + 35578 - 19968: 0xE5EC, + 35582 - 19968: 0xD1E7, + 35584 - 19968: 0xD9C7, + 35585 - 19968: 0xE4D7, + 35586 - 19968: 0xEADD, + 35588 - 19968: 0xD4F7, + 35598 - 19968: 0xDABA, + 35600 - 19968: 0xDACD, + 35604 - 19968: 0xF9CC, + 35606 - 19968: 0xE1DA, + 35607 - 19968: 0xDBBF, + 35609 - 19968: 0xCCC5, + 35610 - 19968: 0xECD0, + 35611 - 19968: 0xCBBB, + 35613 - 19968: 0xDEF3, + 35616 - 19968: 0xE9AA, + 35624 - 19968: 0xD9C8, + 35627 - 19968: 0xEEE3, + 35628 - 19968: 0xD7BD, + 35635 - 19968: 0xCFC4, + 35641 - 19968: 0xD0CD, + 35649 - 19968: 0xFCA6, + 35657 - 19968: 0xF1FB, + 35662 - 19968: 0xFDD2, + 35663 - 19968: 0xD1C1, + 35672 - 19968: 0xE3DB, + 35674 - 19968: 0xD3C9, + 35676 - 19968: 0xDCCF, + 35686 - 19968: 0xCCED, + 35692 - 19968: 0xDEA7, + 35695 - 19968: 0xE6BB, + 35696 - 19968: 0xECA1, + 35700 - 19968: 0xCCB9, + 35703 - 19968: 0xFBDE, + 35709 - 19968: 0xE7E2, + 35712 - 19968: 0xD4C1, + 35722 - 19968: 0xDCA8, + 35728 - 19968: 0xE2C2, + 35730 - 19968: 0xF3D8, + 35731 - 19968: 0xE5D3, + 35734 - 19968: 0xF3D9, + 35738 - 19968: 0xF3C6, + 35895 - 19968: 0xCDDB, + 35903 - 19968: 0xCDAC, + 35905 - 19968: 0xFCC3, + 35910 - 19968: 0xD4E7, + 35912 - 19968: 0xD1C2, + 35914 - 19968: 0xF9A5, + 35916 - 19968: 0xE8D5, + 35925 - 19968: 0xE3CE, + 35930 - 19968: 0xD4CA, + 35937 - 19968: 0xDFDA, + 35946 - 19968: 0xFBDF, + 35947 - 19968: 0xE7E3, + 35961 - 19968: 0xF8FB, + 35962 - 19968: 0xE3CF, + 35970 - 19968: 0xF5B0, + 35978 - 19968: 0xD8E7, + 35980 - 19968: 0xD9C9, + 35997 - 19968: 0xF8AF, + 35998 - 19968: 0xEFF6, + 36000 - 19968: 0xDDB6, + 36001 - 19968: 0xEEAF, + 36002 - 19968: 0xCDF8, + 36007 - 19968: 0xDEB8, + 36008 - 19968: 0xFCA7, + 36009 - 19968: 0xF7FC, + 36010 - 19968: 0xF7B1, + 36011 - 19968: 0xCEBB, + 36012 - 19968: 0xF4A1, + 36015 - 19968: 0xEECD, + 36016 - 19968: 0xE1AE, + 36019 - 19968: 0xECC3, + 36020 - 19968: 0xCFFE, + 36022 - 19968: 0xF8BF, + 36023 - 19968: 0xD8E2, + 36024 - 19968: 0xD3E8, + 36027 - 19968: 0xDEA8, + 36028 - 19968: 0xF4E4, + 36029 - 19968: 0xECC2, + 36031 - 19968: 0xD9F5, + 36032 - 19968: 0xF9C5, + 36033 - 19968: 0xDDD3, + 36034 - 19968: 0xD6F1, + 36035 - 19968: 0xECFC, + 36036 - 19968: 0xFCF0, + 36039 - 19968: 0xEDC0, + 36040 - 19968: 0xCAB9, + 36042 - 19968: 0xEEE4, + 36049 - 19968: 0xF2E1, + 36051 - 19968: 0xDEB9, + 36058 - 19968: 0xD6F2, + 36060 - 19968: 0xDEF4, + 36062 - 19968: 0xDFDB, + 36064 - 19968: 0xDBD3, + 36066 - 19968: 0xFAE7, + 36067 - 19968: 0xD8E3, + 36068 - 19968: 0xF4C1, + 36070 - 19968: 0xDDB7, + 36074 - 19968: 0xF2F5, + 36077 - 19968: 0xD4AE, + 36084 - 19968: 0xD6F3, + 36091 - 19968: 0xDDB8, + 36092 - 19968: 0xCFC5, + 36093 - 19968: 0xDFDF, + 36100 - 19968: 0xF2BE, + 36101 - 19968: 0xF6A1, + 36103 - 19968: 0xEBCB, + 36104 - 19968: 0xF1FC, + 36106 - 19968: 0xF3C7, + 36109 - 19968: 0xE0EB, + 36115 - 19968: 0xEDFC, + 36118 - 19968: 0xE1DB, + 36196 - 19968: 0xEEE5, + 36198 - 19968: 0xDEF5, + 36203 - 19968: 0xFAD3, + 36208 - 19968: 0xF1CB, + 36211 - 19968: 0xD0AF, + 36212 - 19968: 0xDDB9, + 36215 - 19968: 0xD1C3, + 36229 - 19968: 0xF5B1, + 36234 - 19968: 0xEAC6, + 36249 - 19968: 0xF0E1, + 36259 - 19968: 0xF6AC, + 36264 - 19968: 0xF5D9, + 36275 - 19968: 0xF0EB, + 36282 - 19968: 0xDDBA, + 36286 - 19968: 0xF2BF, + 36294 - 19968: 0xF7C5, + 36299 - 19968: 0xDBA2, + 36300 - 19968: 0xF2F6, + 36303 - 19968: 0xCABA, + 36315 - 19968: 0xF7F5, + 36317 - 19968: 0xCBE5, + 36321 - 19968: 0xEEE6, + 36323 - 19968: 0xE0D3, + 36328 - 19968: 0xCEA5, + 36335 - 19968: 0xD6D8, + 36339 - 19968: 0xD4AF, + 36362 - 19968: 0xE9C9, + 36367 - 19968: 0xD3CE, + 36368 - 19968: 0xF4C2, + 36382 - 19968: 0xCBE6, + 36394 - 19968: 0xF1A1, + 36400 - 19968: 0xEBB2, + 36405 - 19968: 0xF1A2, + 36418 - 19968: 0xEBB3, + 36420 - 19968: 0xF0B4, + 36423 - 19968: 0xCBF4, + 36424 - 19968: 0xD4B0, + 36425 - 19968: 0xF3B2, + 36426 - 19968: 0xFBB7, + 36441 - 19968: 0xF5EC, + 36447 - 19968: 0xEEE7, + 36448 - 19968: 0xF4B2, + 36468 - 19968: 0xF5ED, + 36470 - 19968: 0xCFF3, + 36481 - 19968: 0xF0E2, + 36487 - 19968: 0xEECE, + 36490 - 19968: 0xF1CC, + 36493 - 19968: 0xE5B8, + 36522 - 19968: 0xD7F5, + 36523 - 19968: 0xE3F3, + 36524 - 19968: 0xCFE5, + 36544 - 19968: 0xCFC6, + 36554 - 19968: 0xF3B3, + 36555 - 19968: 0xE4D8, + 36556 - 19968: 0xCFF9, + 36557 - 19968: 0xCFDA, + 36562 - 19968: 0xFACD, + 36575 - 19968: 0xE6E3, + 36587 - 19968: 0xF2E2, + 36600 - 19968: 0xF5EE, + 36603 - 19968: 0xCABB, + 36606 - 19968: 0xE3DC, + 36611 - 19968: 0xCEF2, + 36613 - 19968: 0xD6D9, + 36617 - 19968: 0xEEB0, + 36626 - 19968: 0xF4E5, + 36627 - 19968: 0xD8C2, + 36628 - 19968: 0xDCD0, + 36629 - 19968: 0xCCEE, + 36635 - 19968: 0xD5E0, + 36636 - 19968: 0xF6CA, + 36637 - 19968: 0xFDCA, + 36638 - 19968: 0xD8D6, + 36639 - 19968: 0xF4CF, + 36646 - 19968: 0xD6A6, + 36647 - 19968: 0xDCBE, + 36649 - 19968: 0xDBD4, + 36650 - 19968: 0xD7C7, + 36655 - 19968: 0xF2FE, + 36659 - 19968: 0xF1CD, + 36664 - 19968: 0xE2C3, + 36665 - 19968: 0xDCDE, + 36667 - 19968: 0xDCDF, + 36670 - 19968: 0xEFAD, + 36671 - 19968: 0xE6AB, + 36676 - 19968: 0xF9DD, + 36677 - 19968: 0xEABF, + 36681 - 19968: 0xEFAE, + 36685 - 19968: 0xF4D0, + 36686 - 19968: 0xCEF3, + 36701 - 19968: 0xE6AC, + 36703 - 19968: 0xCEDE, + 36706 - 19968: 0xD5F9, + 36763 - 19968: 0xE3F4, + 36764 - 19968: 0xCDD0, + 36771 - 19968: 0xD5B8, + 36774 - 19968: 0xF7FD, + 36776 - 19968: 0xDCA9, + 36781 - 19968: 0xDEF6, + 36783 - 19968: 0xDCAA, + 36784 - 19968: 0xF2E3, + 36785 - 19968: 0xE9B4, + 36786 - 19968: 0xD2DC, + 36802 - 19968: 0xE9E6, + 36805 - 19968: 0xE3F6, + 36814 - 19968: 0xE7CA, + 36817 - 19968: 0xD0CE, + 36820 - 19968: 0xDAF7, + 36838 - 19968: 0xCABC, + 36842 - 19968: 0xEEE8, + 36843 - 19968: 0xDADE, + 36845 - 19968: 0xF2F7, + 36848 - 19968: 0xE2FB, + 36850 - 19968: 0xCCA6, + 36855 - 19968: 0xDABB, + 36857 - 19968: 0xEEE9, + 36861 - 19968: 0xF5DA, + 36864 - 19968: 0xF7DC, + 36865 - 19968: 0xE1EA, + 36866 - 19968: 0xCEC1, + 36867 - 19968: 0xD4B1, + 36869 - 19968: 0xFDB1, + 36870 - 19968: 0xE6BD, + 36872 - 19968: 0xFBAD, + 36875 - 19968: 0xF8E7, + 36877 - 19968: 0xE1CE, + 36879 - 19968: 0xF7E2, + 36880 - 19968: 0xF5EF, + 36881 - 19968: 0xCFC7, + 36884 - 19968: 0xD4B2, + 36885 - 19968: 0xCCEF, + 36887 - 19968: 0xD4E8, + 36889 - 19968: 0xEECF, + 36890 - 19968: 0xF7D7, + 36893 - 19968: 0xE0A6, + 36894 - 19968: 0xD6C1, + 36895 - 19968: 0xE1DC, + 36896 - 19968: 0xF0E3, + 36897 - 19968: 0xF1E4, + 36898 - 19968: 0xDCF1, + 36899 - 19968: 0xD6A7, + 36910 - 19968: 0xF4F5, + 36913 - 19968: 0xF1CE, + 36914 - 19968: 0xF2E4, + 36917 - 19968: 0xD0B0, + 36920 - 19968: 0xECEF, + 36924 - 19968: 0xF9BA, + 36926 - 19968: 0xEBB5, + 36929 - 19968: 0xD4ED, + 36930 - 19968: 0xE2C4, + 36935 - 19968: 0xE9E7, + 36938 - 19968: 0xEBB4, + 36939 - 19968: 0xEAA1, + 36941 - 19968: 0xF8BC, + 36942 - 19968: 0xCEA6, + 36944 - 19968: 0xF9C6, + 36945 - 19968: 0xFCDA, + 36947 - 19968: 0xD4B3, + 36948 - 19968: 0xD3B9, + 36949 - 19968: 0xEADE, + 36953 - 19968: 0xE9AB, + 36956 - 19968: 0xE1E1, + 36957 - 19968: 0xD3CF, + 36958 - 19968: 0xF4F6, + 36960 - 19968: 0xEAC0, + 36961 - 19968: 0xE1CF, + 36963 - 19968: 0xCCBA, + 36969 - 19968: 0xEEEA, + 36973 - 19968: 0xF0E4, + 36974 - 19968: 0xF3B4, + 36975 - 19968: 0xD4EE, + 36978 - 19968: 0xF2C0, + 36981 - 19968: 0xF1E5, + 36983 - 19968: 0xF4C3, + 36984 - 19968: 0xE0D4, + 36986 - 19968: 0xEBB6, + 36988 - 19968: 0xD7A1, + 36989 - 19968: 0xCBE8, + 36991 - 19968: 0xF9AD, + 36992 - 19968: 0xE9AD, + 36993 - 19968: 0xD8E4, + 36994 - 19968: 0xFAB3, + 36995 - 19968: 0xE2C5, + 36996 - 19968: 0xFCBD, + 36999 - 19968: 0xECC4, + 37000 - 19968: 0xD8B1, + 37002 - 19968: 0xDCAB, + 37007 - 19968: 0xD5A4, + 37009 - 19968: 0xEBE9, + 37013 - 19968: 0xE8BB, + 37017 - 19968: 0xD8D7, + 37026 - 19968: 0xFBAE, + 37027 - 19968: 0xD1E1, + 37030 - 19968: 0xDBC0, + 37032 - 19968: 0xF5BE, + 37034 - 19968: 0xDEF7, + 37039 - 19968: 0xCAFB, + 37040 - 19968: 0xF7C6, + 37041 - 19968: 0xCFC8, + 37045 - 19968: 0xE1D0, + 37048 - 19968: 0xEED0, + 37057 - 19968: 0xE9F4, + 37066 - 19968: 0xCEF4, + 37086 - 19968: 0xD5CD, + 37089 - 19968: 0xCFDB, + 37096 - 19968: 0xDDBB, + 37101 - 19968: 0xCEAC, + 37109 - 19968: 0xE9E8, + 37117 - 19968: 0xD4B4, + 37122 - 19968: 0xE4C7, + 37138 - 19968: 0xF5DB, + 37141 - 19968: 0xFAC1, + 37145 - 19968: 0xDEA9, + 37159 - 19968: 0xD4F8, + 37165 - 19968: 0xEFF7, + 37170 - 19968: 0xD3B3, + 37193 - 19968: 0xEBB7, + 37194 - 19968: 0xEFF8, + 37195 - 19968: 0xF5DC, + 37196 - 19968: 0xEDCC, + 37197 - 19968: 0xDBD5, + 37198 - 19968: 0xF1CF, + 37202 - 19968: 0xF1D0, + 37218 - 19968: 0xF5B2, + 37225 - 19968: 0xD9AE, + 37226 - 19968: 0xD5AC, + 37228 - 19968: 0xE2C6, + 37237 - 19968: 0xFDA3, + 37239 - 19968: 0xFBE5, + 37240 - 19968: 0xDFAB, + 37255 - 19968: 0xE2F5, + 37257 - 19968: 0xF6AD, + 37259 - 19968: 0xF5B3, + 37261 - 19968: 0xF0B5, + 37266 - 19968: 0xE1A5, + 37276 - 19968: 0xF5DD, + 37291 - 19968: 0xECA2, + 37292 - 19968: 0xEDFD, + 37294 - 19968: 0xF5B4, + 37295 - 19968: 0xFBB8, + 37297 - 19968: 0xDBA3, + 37300 - 19968: 0xD6CA, + 37301 - 19968: 0xCBD9, + 37312 - 19968: 0xE5D4, + 37319 - 19968: 0xF3FA, + 37321 - 19968: 0xEBB8, + 37323 - 19968: 0xE0B7, + 37324 - 19968: 0xD7EC, + 37325 - 19968: 0xF1EC, + 37326 - 19968: 0xE5AF, + 37327 - 19968: 0xD5E1, + 37328 - 19968: 0xD7ED, + 37329 - 19968: 0xD1D1, + 37335 - 19968: 0xE1F2, + 37336 - 19968: 0xEFF9, + 37340 - 19968: 0xDDBC, + 37341 - 19968: 0xF6DC, + 37347 - 19968: 0xF0E5, + 37351 - 19968: 0xF4C4, + 37354 - 19968: 0xE9E9, + 37365 - 19968: 0xF3FB, + 37389 - 19968: 0xD4EF, + 37392 - 19968: 0xCCA2, + 37393 - 19968: 0xF7FE, + 37394 - 19968: 0xDFBC, + 37399 - 19968: 0xEBCD, + 37406 - 19968: 0xD0B7, + 37428 - 19968: 0xD6C2, + 37434 - 19968: 0xE8AD, + 37439 - 19968: 0xEFAF, + 37440 - 19968: 0xCBA5, + 37445 - 19968: 0xCBE9, + 37449 - 19968: 0xFAE8, + 37463 - 19968: 0xCCC6, + 37467 - 19968: 0xE6E7, + 37470 - 19968: 0xEAC7, + 37474 - 19968: 0xDBA4, + 37476 - 19968: 0xCFC9, + 37477 - 19968: 0xE2FC, + 37478 - 19968: 0xEFFA, + 37504 - 19968: 0xEBDE, + 37507 - 19968: 0xF5C8, + 37509 - 19968: 0xD4DE, + 37521 - 19968: 0xE0D5, + 37523 - 19968: 0xEFB0, + 37526 - 19968: 0xE2C7, + 37528 - 19968: 0xD9AF, + 37532 - 19968: 0xF9E7, + 37555 - 19968: 0xE7E5, + 37558 - 19968: 0xCFCA, + 37559 - 19968: 0xE1D1, + 37561 - 19968: 0xE2C8, + 37580 - 19968: 0xEFFB, + 37583 - 19968: 0xFAF9, + 37586 - 19968: 0xDCF2, + 37604 - 19968: 0xE0A7, + 37610 - 19968: 0xF8E8, + 37624 - 19968: 0xCBEA, + 37628 - 19968: 0xCBBC, + 37636 - 19968: 0xD6E2, + 37648 - 19968: 0xF5DE, + 37656 - 19968: 0xF5DF, + 37658 - 19968: 0xEEB6, + 37662 - 19968: 0xE2F6, + 37663 - 19968: 0xD3CA, + 37664 - 19968: 0xEFFC, + 37665 - 19968: 0xD1C4, + 37666 - 19968: 0xEFB1, + 37668 - 19968: 0xD1C5, + 37670 - 19968: 0xD0DE, + 37672 - 19968: 0xD9E1, + 37675 - 19968: 0xE0B8, + 37678 - 19968: 0xCDD1, + 37679 - 19968: 0xF3B9, + 37704 - 19968: 0xE7CC, + 37706 - 19968: 0xD6A8, + 37707 - 19968: 0xCEA7, + 37709 - 19968: 0xD4B5, + 37716 - 19968: 0xE4C8, + 37723 - 19968: 0xD3B4, + 37742 - 19968: 0xEBB9, + 37749 - 19968: 0xCBF5, + 37756 - 19968: 0xF6DD, + 37758 - 19968: 0xF1A3, + 37772 - 19968: 0xCCC7, + 37780 - 19968: 0xE9CA, + 37782 - 19968: 0xE1F0, + 37786 - 19968: 0xF5E0, + 37795 - 19968: 0xFBAF, + 37799 - 19968: 0xCBD1, + 37804 - 19968: 0xFBE0, + 37805 - 19968: 0xF2E5, + 37808 - 19968: 0xECF0, + 37827 - 19968: 0xF0EC, + 37841 - 19968: 0xEEEB, + 37854 - 19968: 0xE9CB, + 37857 - 19968: 0xCCF0, + 37860 - 19968: 0xD7AF, + 37878 - 19968: 0xF3A1, + 37892 - 19968: 0xFCF5, + 37912 - 19968: 0xF1A4, + 37925 - 19968: 0xE0D6, + 37931 - 19968: 0xEFB2, + 37941 - 19968: 0xF4D1, + 37944 - 19968: 0xF7A1, + 37956 - 19968: 0xF1D1, + 37969 - 19968: 0xCAFC, + 37970 - 19968: 0xCAFD, + 37979 - 19968: 0xCECE, + 38013 - 19968: 0xF3C8, + 38015 - 19968: 0xF3BA, + 38263 - 19968: 0xEDFE, + 38272 - 19968: 0xDAA6, + 38275 - 19968: 0xE0EC, + 38281 - 19968: 0xF8CD, + 38283 - 19968: 0xCBD2, + 38287 - 19968: 0xEBCE, + 38289 - 19968: 0xF9D8, + 38290 - 19968: 0xF9D9, + 38291 - 19968: 0xCAE0, + 38292 - 19968: 0xDACA, + 38296 - 19968: 0xCBA6, + 38307 - 19968: 0xCAC8, + 38308 - 19968: 0xF9EE, + 38309 - 19968: 0xDBEC, + 38312 - 19968: 0xD0B1, + 38317 - 19968: 0xD5EF, + 38321 - 19968: 0xE6F3, + 38331 - 19968: 0xE7A2, + 38332 - 19968: 0xE4D9, + 38343 - 19968: 0xE4E1, + 38346 - 19968: 0xFCC4, + 38356 - 19968: 0xF9EF, + 38357 - 19968: 0xCFF4, + 38358 - 19968: 0xF7E6, + 38364 - 19968: 0xCEBC, + 38369 - 19968: 0xF4C5, + 38370 - 19968: 0xDCA3, + 38428 - 19968: 0xDDBD, + 38433 - 19968: 0xF4C6, + 38442 - 19968: 0xF8A1, + 38446 - 19968: 0xE8D6, + 38450 - 19968: 0xDBC1, + 38459 - 19968: 0xF0E6, + 38463 - 19968: 0xE4B9, + 38464 - 19968: 0xF6ED, + 38466 - 19968: 0xF9AE, + 38468 - 19968: 0xDDBE, + 38475 - 19968: 0xD7B0, + 38476 - 19968: 0xD8E8, + 38477 - 19968: 0xCBBD, + 38480 - 19968: 0xF9DA, + 38491 - 19968: 0xF8CE, + 38492 - 19968: 0xF9F0, + 38493 - 19968: 0xE0ED, + 38494 - 19968: 0xE3B3, + 38495 - 19968: 0xF4B3, + 38498 - 19968: 0xEAC2, + 38499 - 19968: 0xF2E6, + 38500 - 19968: 0xF0B6, + 38506 - 19968: 0xDBD6, + 38512 - 19968: 0xEBE4, + 38515 - 19968: 0xF2E7, + 38517 - 19968: 0xD7D5, + 38518 - 19968: 0xD4B6, + 38519 - 19968: 0xF9E8, + 38520 - 19968: 0xD7C1, + 38525 - 19968: 0xE5D5, + 38533 - 19968: 0xE9EA, + 38534 - 19968: 0xD7CC, + 38538 - 19968: 0xD3E9, + 38539 - 19968: 0xE2C9, + 38541 - 19968: 0xFCDB, + 38542 - 19968: 0xCDAD, + 38548 - 19968: 0xCCB0, + 38549 - 19968: 0xEAA2, + 38552 - 19968: 0xE4F6, + 38553 - 19968: 0xD0C0, + 38555 - 19968: 0xF0B7, + 38556 - 19968: 0xEEA1, + 38563 - 19968: 0xD7F6, + 38567 - 19968: 0xE2CA, + 38568 - 19968: 0xE2CB, + 38570 - 19968: 0xFACF, + 38577 - 19968: 0xEBDF, + 38583 - 19968: 0xD6CB, + 38587 - 19968: 0xF4B4, + 38592 - 19968: 0xEDCD, + 38593 - 19968: 0xE4D2, + 38596 - 19968: 0xEAA9, + 38597 - 19968: 0xE4BA, + 38598 - 19968: 0xF3A2, + 38599 - 19968: 0xCDD2, + 38601 - 19968: 0xF6CB, + 38603 - 19968: 0xF1E6, + 38604 - 19968: 0xEDC1, + 38605 - 19968: 0xE8BC, + 38606 - 19968: 0xEED1, + 38613 - 19968: 0xF0E7, + 38614 - 19968: 0xE2CC, + 38617 - 19968: 0xE4AA, + 38619 - 19968: 0xF5E1, + 38620 - 19968: 0xEDDA, + 38626 - 19968: 0xD7EE, + 38627 - 19968: 0xD1F1, + 38632 - 19968: 0xE9EB, + 38633 - 19968: 0xE9EC, + 38634 - 19968: 0xE0E4, + 38639 - 19968: 0xDAA7, + 38640 - 19968: 0xDDD4, + 38642 - 19968: 0xEAA3, + 38646 - 19968: 0xD6C3, + 38647 - 19968: 0xD6F4, + 38649 - 19968: 0xDADF, + 38651 - 19968: 0xEFB3, + 38656 - 19968: 0xE2CD, + 38662 - 19968: 0xEFFD, + 38663 - 19968: 0xF2E8, + 38673 - 19968: 0xEFC5, + 38675 - 19968: 0xE7E7, + 38678 - 19968: 0xD7FD, + 38681 - 19968: 0xE7CE, + 38684 - 19968: 0xDFDC, + 38686 - 19968: 0xF9C7, + 38695 - 19968: 0xD9F6, + 38704 - 19968: 0xDFAC, + 38706 - 19968: 0xD6DA, + 38713 - 19968: 0xDCA4, + 38717 - 19968: 0xF0B8, + 38722 - 19968: 0xD5FA, + 38724 - 19968: 0xE4F7, + 38728 - 19968: 0xD6C4, + 38737 - 19968: 0xF4EC, + 38742 - 19968: 0xEFFE, + 38748 - 19968: 0xF0A1, + 38750 - 19968: 0xDEAA, + 38753 - 19968: 0xDABC, + 38754 - 19968: 0xD8FC, + 38761 - 19968: 0xFAD4, + 38765 - 19968: 0xECE5, + 38772 - 19968: 0xFCA8, + 38775 - 19968: 0xECE6, + 38778 - 19968: 0xD8CB, + 38795 - 19968: 0xFBB9, + 38797 - 19968: 0xE4D3, + 38799 - 19968: 0xCDF9, + 38816 - 19968: 0xCFD3, + 38824 - 19968: 0xCAEA, + 38827 - 19968: 0xCFD4, + 38829 - 19968: 0xF8BD, + 38854 - 19968: 0xF4C7, + 38859 - 19968: 0xEADF, + 38867 - 19968: 0xF9DB, + 38876 - 19968: 0xD4B7, + 38899 - 19968: 0xEBE5, + 38902 - 19968: 0xE1D2, + 38907 - 19968: 0xEAA4, + 38911 - 19968: 0xFAC2, + 38912 - 19968: 0xFBE1, + 38913 - 19968: 0xFAED, + 38914 - 19968: 0xF0A2, + 38915 - 19968: 0xCCF1, + 38917 - 19968: 0xFAA3, + 38918 - 19968: 0xE2F7, + 38920 - 19968: 0xE2CE, + 38922 - 19968: 0xE9F5, + 38924 - 19968: 0xE1EB, + 38928 - 19968: 0xE7E8, + 38929 - 19968: 0xE8D7, + 38930 - 19968: 0xDAF8, + 38931 - 19968: 0xD4CB, + 38935 - 19968: 0xF7F6, + 38936 - 19968: 0xD6C5, + 38957 - 19968: 0xD4E9, + 38960 - 19968: 0xFAFA, + 38968 - 19968: 0xCCF2, + 38969 - 19968: 0xF7DD, + 38971 - 19968: 0xDEBA, + 38982 - 19968: 0xCEA8, + 38988 - 19968: 0xF0B9, + 38989 - 19968: 0xE4FE, + 38990 - 19968: 0xE4C9, + 38996 - 19968: 0xE4D4, + 39000 - 19968: 0xEAC3, + 39002 - 19968: 0xEFB4, + 39006 - 19968: 0xD7BE, + 39013 - 19968: 0xFBE2, + 39015 - 19968: 0xCDD3, + 39019 - 19968: 0xEFB5, + 39023 - 19968: 0xFAE9, + 39080 - 19968: 0xF9A6, + 39087 - 19968: 0xDFBD, + 39089 - 19968: 0xF7C7, + 39108 - 19968: 0xF8FD, + 39111 - 19968: 0xF8FC, + 39131 - 19968: 0xDEAB, + 39132 - 19968: 0xDBE8, + 39135 - 19968: 0xE3DD, + 39137 - 19968: 0xE1E2, + 39138 - 19968: 0xD1C6, + 39149 - 19968: 0xF6D0, + 39150 - 19968: 0xEBE6, + 39151 - 19968: 0xDAF9, + 39156 - 19968: 0xECC7, + 39164 - 19968: 0xDEF8, + 39165 - 19968: 0xF8E9, + 39166 - 19968: 0xE3DE, + 39171 - 19968: 0xCEF5, + 39177 - 19968: 0xFAC3, + 39178 - 19968: 0xE5D7, + 39180 - 19968: 0xECC8, + 39184 - 19968: 0xF3C9, + 39187 - 19968: 0xE4BB, + 39192 - 19968: 0xE6AE, + 39198 - 19968: 0xEFB6, + 39200 - 19968: 0xDCBF, + 39208 - 19968: 0xCEBD, + 39237 - 19968: 0xD8C3, + 39241 - 19968: 0xD0CF, + 39243 - 19968: 0xCFFA, + 39244 - 19968: 0xF3CA, + 39245 - 19968: 0xE0D7, + 39249 - 19968: 0xD1C7, + 39250 - 19968: 0xE9AE, + 39252 - 19968: 0xE8BD, + 39255 - 19968: 0xFAC4, + 39318 - 19968: 0xE2CF, + 39321 - 19968: 0xFAC5, + 39325 - 19968: 0xF9B8, + 39333 - 19968: 0xDCE0, + 39336 - 19968: 0xFBB0, + 39340 - 19968: 0xD8A9, + 39341 - 19968: 0xE5DF, + 39342 - 19968: 0xF9A7, + 39345 - 19968: 0xF6EE, + 39347 - 19968: 0xF6CC, + 39348 - 19968: 0xE2F8, + 39353 - 19968: 0xECF1, + 39361 - 19968: 0xDAE0, + 39376 - 19968: 0xF1D2, + 39377 - 19968: 0xD2CC, + 39378 - 19968: 0xCFCB, + 39381 - 19968: 0xCABD, + 39385 - 19968: 0xDDBF, + 39389 - 19968: 0xF6EF, + 39391 - 19968: 0xDEF9, + 39405 - 19968: 0xFAB4, + 39409 - 19968: 0xD5AD, + 39423 - 19968: 0xF1E7, + 39425 - 19968: 0xDEBE, + 39432 - 19968: 0xDCC0, + 39438 - 19968: 0xD1C8, + 39439 - 19968: 0xD1C9, + 39449 - 19968: 0xF8BE, + 39467 - 19968: 0xCBF6, + 39472 - 19968: 0xD4F9, + 39478 - 19968: 0xF5E2, + 39479 - 19968: 0xE1D3, + 39488 - 19968: 0xD8E9, + 39491 - 19968: 0xF8FE, + 39493 - 19968: 0xCFCC, + 39501 - 19968: 0xFDA4, + 39509 - 19968: 0xCEF6, + 39511 - 19968: 0xFAD0, + 39514 - 19968: 0xCCF3, + 39515 - 19968: 0xE6BE, + 39519 - 19968: 0xF6AE, + 39522 - 19968: 0xD5F0, + 39525 - 19968: 0xD1CA, + 39529 - 19968: 0xFCBE, + 39530 - 19968: 0xD5F1, + 39592 - 19968: 0xCDE9, + 39608 - 19968: 0xFAB5, + 39635 - 19968: 0xE2D0, + 39636 - 19968: 0xF4F7, + 39640 - 19968: 0xCDD4, + 39653 - 19968: 0xE7A3, + 39662 - 19968: 0xDBA5, + 39706 - 19968: 0xE2D1, + 39719 - 19968: 0xD7A2, + 39722 - 19968: 0xF7E3, + 39729 - 19968: 0xEAA6, + 39740 - 19968: 0xD0A1, + 39745 - 19968: 0xCEDA, + 39746 - 19968: 0xFBEB, + 39747 - 19968: 0xDBA6, + 39748 - 19968: 0xDBDE, + 39749 - 19968: 0xD8E5, + 39759 - 19968: 0xEAE0, + 39764 - 19968: 0xD8AA, + 39770 - 19968: 0xE5E0, + 39791 - 19968: 0xD6DB, + 39822 - 19968: 0xEFC6, + 39825 - 19968: 0xF8EA, + 39839 - 19968: 0xE4D5, + 39851 - 19968: 0xCEF7, + 39854 - 19968: 0xE0D8, + 39881 - 19968: 0xD7EF, + 39894 - 19968: 0xF4ED, + 39908 - 19968: 0xCDE6, + 39912 - 19968: 0xCCF4, + 39949 - 19968: 0xF5E3, + 39952 - 19968: 0xE4CA, + 39954 - 19968: 0xDCE1, + 39957 - 19968: 0xF9C8, + 39973 - 19968: 0xFCBF, + 39986 - 19968: 0xE8A7, + 39995 - 19968: 0xD8C4, + 40007 - 19968: 0xCBBE, + 40009 - 19968: 0xDCAE, + 40023 - 19968: 0xD7F7, + 40165 - 19968: 0xF0E8, + 40167 - 19968: 0xDDC0, + 40169 - 19968: 0xCFCD, + 40179 - 19968: 0xDCF3, + 40180 - 19968: 0xD9B0, + 40182 - 19968: 0xE6E9, + 40201 - 19968: 0xE4BC, + 40219 - 19968: 0xEAC4, + 40230 - 19968: 0xE4EC, + 40232 - 19968: 0xE4E5, + 40251 - 19968: 0xFBF8, + 40273 - 19968: 0xCCBB, + 40285 - 19968: 0xE4BD, + 40288 - 19968: 0xCDDC, + 40289 - 19968: 0xD9F7, + 40300 - 19968: 0xDDDF, + 40306 - 19968: 0xEDCE, + 40361 - 19968: 0xD9D0, + 40367 - 19968: 0xE5A3, + 40372 - 19968: 0xF9CD, + 40388 - 19968: 0xCDAE, + 40407 - 19968: 0xCFCE, + 40434 - 19968: 0xF6AF, + 40440 - 19968: 0xFDD3, + 40441 - 19968: 0xEBED, + 40442 - 19968: 0xD6DC, + 40474 - 19968: 0xE5A4, + 40478 - 19968: 0xD5B6, + 40565 - 19968: 0xD6DD, + 40569 - 19968: 0xF9E9, + 40573 - 19968: 0xE7A4, + 40575 - 19968: 0xD6E3, + 40594 - 19968: 0xD1CB, + 40595 - 19968: 0xD6E4, + 40599 - 19968: 0xD5F2, + 40605 - 19968: 0xDEFA, + 40607 - 19968: 0xD7F8, + 40613 - 19968: 0xD8EA, + 40628 - 19968: 0xCFD5, + 40629 - 19968: 0xD8FD, + 40635 - 19968: 0xD8AB, + 40638 - 19968: 0xFDCB, + 40643 - 19968: 0xFCDC, + 40653 - 19968: 0xE0A8, + 40654 - 19968: 0xD5F3, + 40657 - 19968: 0xFDD9, + 40660 - 19968: 0xCCA3, + 40664 - 19968: 0xD9F9, + 40667 - 19968: 0xD3EA, + 40668 - 19968: 0xF5F5, + 40670 - 19968: 0xEFC7, + 40680 - 19968: 0xD3DA, + 40692 - 19968: 0xDABD, + 40711 - 19968: 0xE8A8, + 40712 - 19968: 0xDCAF, + 40718 - 19968: 0xF0A3, + 40723 - 19968: 0xCDD5, + 40736 - 19968: 0xE0A9, + 40763 - 19968: 0xDEAC, + 40778 - 19968: 0xF0BA, + 40779 - 19968: 0xEEB1, + 40782 - 19968: 0xEEB2, + 40786 - 19968: 0xF6CD, + 40799 - 19968: 0xEED2, + 40801 - 19968: 0xD6C6, + 40807 - 19968: 0xE0E5, + 40810 - 19968: 0xF3BB, + 40812 - 19968: 0xE5E1, + 40823 - 19968: 0xE4CB, + 40845 - 19968: 0xD7A3, + 40848 - 19968: 0xDBC2, + 40853 - 19968: 0xCAFE, + 40860 - 19968: 0xCFCF, +} + +const encode1Low, encode1High = 44032, 55204 + +var encode1 = [...]uint16{ + 44032 - 44032: 0xB0A1, + 44033 - 44032: 0xB0A2, + 44034 - 44032: 0x8141, + 44035 - 44032: 0x8142, + 44036 - 44032: 0xB0A3, + 44037 - 44032: 0x8143, + 44038 - 44032: 0x8144, + 44039 - 44032: 0xB0A4, + 44040 - 44032: 0xB0A5, + 44041 - 44032: 0xB0A6, + 44042 - 44032: 0xB0A7, + 44043 - 44032: 0x8145, + 44044 - 44032: 0x8146, + 44045 - 44032: 0x8147, + 44046 - 44032: 0x8148, + 44047 - 44032: 0x8149, + 44048 - 44032: 0xB0A8, + 44049 - 44032: 0xB0A9, + 44050 - 44032: 0xB0AA, + 44051 - 44032: 0xB0AB, + 44052 - 44032: 0xB0AC, + 44053 - 44032: 0xB0AD, + 44054 - 44032: 0xB0AE, + 44055 - 44032: 0xB0AF, + 44056 - 44032: 0x814A, + 44057 - 44032: 0xB0B0, + 44058 - 44032: 0xB0B1, + 44059 - 44032: 0xB0B2, + 44060 - 44032: 0xB0B3, + 44061 - 44032: 0xB0B4, + 44062 - 44032: 0x814B, + 44063 - 44032: 0x814C, + 44064 - 44032: 0xB0B5, + 44065 - 44032: 0x814D, + 44066 - 44032: 0x814E, + 44067 - 44032: 0x814F, + 44068 - 44032: 0xB0B6, + 44069 - 44032: 0x8150, + 44070 - 44032: 0x8151, + 44071 - 44032: 0x8152, + 44072 - 44032: 0x8153, + 44073 - 44032: 0x8154, + 44074 - 44032: 0x8155, + 44075 - 44032: 0x8156, + 44076 - 44032: 0xB0B7, + 44077 - 44032: 0xB0B8, + 44078 - 44032: 0x8157, + 44079 - 44032: 0xB0B9, + 44080 - 44032: 0xB0BA, + 44081 - 44032: 0xB0BB, + 44082 - 44032: 0x8158, + 44083 - 44032: 0x8159, + 44084 - 44032: 0x815A, + 44085 - 44032: 0x8161, + 44086 - 44032: 0x8162, + 44087 - 44032: 0x8163, + 44088 - 44032: 0xB0BC, + 44089 - 44032: 0xB0BD, + 44090 - 44032: 0x8164, + 44091 - 44032: 0x8165, + 44092 - 44032: 0xB0BE, + 44093 - 44032: 0x8166, + 44094 - 44032: 0x8167, + 44095 - 44032: 0x8168, + 44096 - 44032: 0xB0BF, + 44097 - 44032: 0x8169, + 44098 - 44032: 0x816A, + 44099 - 44032: 0x816B, + 44100 - 44032: 0x816C, + 44101 - 44032: 0x816D, + 44102 - 44032: 0x816E, + 44103 - 44032: 0x816F, + 44104 - 44032: 0x8170, + 44105 - 44032: 0x8171, + 44106 - 44032: 0x8172, + 44107 - 44032: 0xB0C0, + 44108 - 44032: 0x8173, + 44109 - 44032: 0xB0C1, + 44110 - 44032: 0x8174, + 44111 - 44032: 0x8175, + 44112 - 44032: 0x8176, + 44113 - 44032: 0x8177, + 44114 - 44032: 0x8178, + 44115 - 44032: 0x8179, + 44116 - 44032: 0xB0C2, + 44117 - 44032: 0x817A, + 44118 - 44032: 0x8181, + 44119 - 44032: 0x8182, + 44120 - 44032: 0xB0C3, + 44121 - 44032: 0x8183, + 44122 - 44032: 0x8184, + 44123 - 44032: 0x8185, + 44124 - 44032: 0xB0C4, + 44125 - 44032: 0x8186, + 44126 - 44032: 0x8187, + 44127 - 44032: 0x8188, + 44128 - 44032: 0x8189, + 44129 - 44032: 0x818A, + 44130 - 44032: 0x818B, + 44131 - 44032: 0x818C, + 44132 - 44032: 0x818D, + 44133 - 44032: 0x818E, + 44134 - 44032: 0x818F, + 44135 - 44032: 0x8190, + 44136 - 44032: 0x8191, + 44137 - 44032: 0x8192, + 44138 - 44032: 0x8193, + 44139 - 44032: 0x8194, + 44140 - 44032: 0x8195, + 44141 - 44032: 0x8196, + 44142 - 44032: 0x8197, + 44143 - 44032: 0x8198, + 44144 - 44032: 0xB0C5, + 44145 - 44032: 0xB0C6, + 44146 - 44032: 0x8199, + 44147 - 44032: 0x819A, + 44148 - 44032: 0xB0C7, + 44149 - 44032: 0x819B, + 44150 - 44032: 0x819C, + 44151 - 44032: 0xB0C8, + 44152 - 44032: 0xB0C9, + 44153 - 44032: 0x819D, + 44154 - 44032: 0xB0CA, + 44155 - 44032: 0x819E, + 44156 - 44032: 0x819F, + 44157 - 44032: 0x81A0, + 44158 - 44032: 0x81A1, + 44159 - 44032: 0x81A2, + 44160 - 44032: 0xB0CB, + 44161 - 44032: 0xB0CC, + 44162 - 44032: 0x81A3, + 44163 - 44032: 0xB0CD, + 44164 - 44032: 0xB0CE, + 44165 - 44032: 0xB0CF, + 44166 - 44032: 0xB0D0, + 44167 - 44032: 0x81A4, + 44168 - 44032: 0x81A5, + 44169 - 44032: 0xB0D1, + 44170 - 44032: 0xB0D2, + 44171 - 44032: 0xB0D3, + 44172 - 44032: 0xB0D4, + 44173 - 44032: 0x81A6, + 44174 - 44032: 0x81A7, + 44175 - 44032: 0x81A8, + 44176 - 44032: 0xB0D5, + 44177 - 44032: 0x81A9, + 44178 - 44032: 0x81AA, + 44179 - 44032: 0x81AB, + 44180 - 44032: 0xB0D6, + 44181 - 44032: 0x81AC, + 44182 - 44032: 0x81AD, + 44183 - 44032: 0x81AE, + 44184 - 44032: 0x81AF, + 44185 - 44032: 0x81B0, + 44186 - 44032: 0x81B1, + 44187 - 44032: 0x81B2, + 44188 - 44032: 0xB0D7, + 44189 - 44032: 0xB0D8, + 44190 - 44032: 0x81B3, + 44191 - 44032: 0xB0D9, + 44192 - 44032: 0xB0DA, + 44193 - 44032: 0xB0DB, + 44194 - 44032: 0x81B4, + 44195 - 44032: 0x81B5, + 44196 - 44032: 0x81B6, + 44197 - 44032: 0x81B7, + 44198 - 44032: 0x81B8, + 44199 - 44032: 0x81B9, + 44200 - 44032: 0xB0DC, + 44201 - 44032: 0xB0DD, + 44202 - 44032: 0xB0DE, + 44203 - 44032: 0x81BA, + 44204 - 44032: 0xB0DF, + 44205 - 44032: 0x81BB, + 44206 - 44032: 0x81BC, + 44207 - 44032: 0xB0E0, + 44208 - 44032: 0xB0E1, + 44209 - 44032: 0x81BD, + 44210 - 44032: 0x81BE, + 44211 - 44032: 0x81BF, + 44212 - 44032: 0x81C0, + 44213 - 44032: 0x81C1, + 44214 - 44032: 0x81C2, + 44215 - 44032: 0x81C3, + 44216 - 44032: 0xB0E2, + 44217 - 44032: 0xB0E3, + 44218 - 44032: 0x81C4, + 44219 - 44032: 0xB0E4, + 44220 - 44032: 0xB0E5, + 44221 - 44032: 0xB0E6, + 44222 - 44032: 0x81C5, + 44223 - 44032: 0x81C6, + 44224 - 44032: 0x81C7, + 44225 - 44032: 0xB0E7, + 44226 - 44032: 0x81C8, + 44227 - 44032: 0x81C9, + 44228 - 44032: 0xB0E8, + 44229 - 44032: 0x81CA, + 44230 - 44032: 0x81CB, + 44231 - 44032: 0x81CC, + 44232 - 44032: 0xB0E9, + 44233 - 44032: 0x81CD, + 44234 - 44032: 0x81CE, + 44235 - 44032: 0x81CF, + 44236 - 44032: 0xB0EA, + 44237 - 44032: 0x81D0, + 44238 - 44032: 0x81D1, + 44239 - 44032: 0x81D2, + 44240 - 44032: 0x81D3, + 44241 - 44032: 0x81D4, + 44242 - 44032: 0x81D5, + 44243 - 44032: 0x81D6, + 44244 - 44032: 0x81D7, + 44245 - 44032: 0xB0EB, + 44246 - 44032: 0x81D8, + 44247 - 44032: 0xB0EC, + 44248 - 44032: 0x81D9, + 44249 - 44032: 0x81DA, + 44250 - 44032: 0x81DB, + 44251 - 44032: 0x81DC, + 44252 - 44032: 0x81DD, + 44253 - 44032: 0x81DE, + 44254 - 44032: 0x81DF, + 44255 - 44032: 0x81E0, + 44256 - 44032: 0xB0ED, + 44257 - 44032: 0xB0EE, + 44258 - 44032: 0x81E1, + 44259 - 44032: 0x81E2, + 44260 - 44032: 0xB0EF, + 44261 - 44032: 0x81E3, + 44262 - 44032: 0x81E4, + 44263 - 44032: 0xB0F0, + 44264 - 44032: 0xB0F1, + 44265 - 44032: 0x81E5, + 44266 - 44032: 0xB0F2, + 44267 - 44032: 0x81E6, + 44268 - 44032: 0xB0F3, + 44269 - 44032: 0x81E7, + 44270 - 44032: 0x81E8, + 44271 - 44032: 0xB0F4, + 44272 - 44032: 0xB0F5, + 44273 - 44032: 0xB0F6, + 44274 - 44032: 0x81E9, + 44275 - 44032: 0xB0F7, + 44276 - 44032: 0x81EA, + 44277 - 44032: 0xB0F8, + 44278 - 44032: 0xB0F9, + 44279 - 44032: 0x81EB, + 44280 - 44032: 0x81EC, + 44281 - 44032: 0x81ED, + 44282 - 44032: 0x81EE, + 44283 - 44032: 0x81EF, + 44284 - 44032: 0xB0FA, + 44285 - 44032: 0xB0FB, + 44286 - 44032: 0x81F0, + 44287 - 44032: 0x81F1, + 44288 - 44032: 0xB0FC, + 44289 - 44032: 0x81F2, + 44290 - 44032: 0x81F3, + 44291 - 44032: 0x81F4, + 44292 - 44032: 0xB0FD, + 44293 - 44032: 0x81F5, + 44294 - 44032: 0xB0FE, + 44295 - 44032: 0x81F6, + 44296 - 44032: 0x81F7, + 44297 - 44032: 0x81F8, + 44298 - 44032: 0x81F9, + 44299 - 44032: 0x81FA, + 44300 - 44032: 0xB1A1, + 44301 - 44032: 0xB1A2, + 44302 - 44032: 0x81FB, + 44303 - 44032: 0xB1A3, + 44304 - 44032: 0x81FC, + 44305 - 44032: 0xB1A4, + 44306 - 44032: 0x81FD, + 44307 - 44032: 0x81FE, + 44308 - 44032: 0x8241, + 44309 - 44032: 0x8242, + 44310 - 44032: 0x8243, + 44311 - 44032: 0x8244, + 44312 - 44032: 0xB1A5, + 44313 - 44032: 0x8245, + 44314 - 44032: 0x8246, + 44315 - 44032: 0x8247, + 44316 - 44032: 0xB1A6, + 44317 - 44032: 0x8248, + 44318 - 44032: 0x8249, + 44319 - 44032: 0x824A, + 44320 - 44032: 0xB1A7, + 44321 - 44032: 0x824B, + 44322 - 44032: 0x824C, + 44323 - 44032: 0x824D, + 44324 - 44032: 0x824E, + 44325 - 44032: 0x824F, + 44326 - 44032: 0x8250, + 44327 - 44032: 0x8251, + 44328 - 44032: 0x8252, + 44329 - 44032: 0xB1A8, + 44330 - 44032: 0x8253, + 44331 - 44032: 0x8254, + 44332 - 44032: 0xB1A9, + 44333 - 44032: 0xB1AA, + 44334 - 44032: 0x8255, + 44335 - 44032: 0x8256, + 44336 - 44032: 0x8257, + 44337 - 44032: 0x8258, + 44338 - 44032: 0x8259, + 44339 - 44032: 0x825A, + 44340 - 44032: 0xB1AB, + 44341 - 44032: 0xB1AC, + 44342 - 44032: 0x8261, + 44343 - 44032: 0x8262, + 44344 - 44032: 0xB1AD, + 44345 - 44032: 0x8263, + 44346 - 44032: 0x8264, + 44347 - 44032: 0x8265, + 44348 - 44032: 0xB1AE, + 44349 - 44032: 0x8266, + 44350 - 44032: 0x8267, + 44351 - 44032: 0x8268, + 44352 - 44032: 0x8269, + 44353 - 44032: 0x826A, + 44354 - 44032: 0x826B, + 44355 - 44032: 0x826C, + 44356 - 44032: 0xB1AF, + 44357 - 44032: 0xB1B0, + 44358 - 44032: 0x826D, + 44359 - 44032: 0xB1B1, + 44360 - 44032: 0x826E, + 44361 - 44032: 0xB1B2, + 44362 - 44032: 0x826F, + 44363 - 44032: 0x8270, + 44364 - 44032: 0x8271, + 44365 - 44032: 0x8272, + 44366 - 44032: 0x8273, + 44367 - 44032: 0x8274, + 44368 - 44032: 0xB1B3, + 44369 - 44032: 0x8275, + 44370 - 44032: 0x8276, + 44371 - 44032: 0x8277, + 44372 - 44032: 0xB1B4, + 44373 - 44032: 0x8278, + 44374 - 44032: 0x8279, + 44375 - 44032: 0x827A, + 44376 - 44032: 0xB1B5, + 44377 - 44032: 0x8281, + 44378 - 44032: 0x8282, + 44379 - 44032: 0x8283, + 44380 - 44032: 0x8284, + 44381 - 44032: 0x8285, + 44382 - 44032: 0x8286, + 44383 - 44032: 0x8287, + 44384 - 44032: 0x8288, + 44385 - 44032: 0xB1B6, + 44386 - 44032: 0x8289, + 44387 - 44032: 0xB1B7, + 44388 - 44032: 0x828A, + 44389 - 44032: 0x828B, + 44390 - 44032: 0x828C, + 44391 - 44032: 0x828D, + 44392 - 44032: 0x828E, + 44393 - 44032: 0x828F, + 44394 - 44032: 0x8290, + 44395 - 44032: 0x8291, + 44396 - 44032: 0xB1B8, + 44397 - 44032: 0xB1B9, + 44398 - 44032: 0x8292, + 44399 - 44032: 0x8293, + 44400 - 44032: 0xB1BA, + 44401 - 44032: 0x8294, + 44402 - 44032: 0x8295, + 44403 - 44032: 0xB1BB, + 44404 - 44032: 0xB1BC, + 44405 - 44032: 0xB1BD, + 44406 - 44032: 0xB1BE, + 44407 - 44032: 0x8296, + 44408 - 44032: 0x8297, + 44409 - 44032: 0x8298, + 44410 - 44032: 0x8299, + 44411 - 44032: 0xB1BF, + 44412 - 44032: 0xB1C0, + 44413 - 44032: 0xB1C1, + 44414 - 44032: 0x829A, + 44415 - 44032: 0xB1C2, + 44416 - 44032: 0x829B, + 44417 - 44032: 0xB1C3, + 44418 - 44032: 0xB1C4, + 44419 - 44032: 0x829C, + 44420 - 44032: 0x829D, + 44421 - 44032: 0x829E, + 44422 - 44032: 0x829F, + 44423 - 44032: 0x82A0, + 44424 - 44032: 0xB1C5, + 44425 - 44032: 0xB1C6, + 44426 - 44032: 0x82A1, + 44427 - 44032: 0x82A2, + 44428 - 44032: 0xB1C7, + 44429 - 44032: 0x82A3, + 44430 - 44032: 0x82A4, + 44431 - 44032: 0x82A5, + 44432 - 44032: 0xB1C8, + 44433 - 44032: 0x82A6, + 44434 - 44032: 0x82A7, + 44435 - 44032: 0x82A8, + 44436 - 44032: 0x82A9, + 44437 - 44032: 0x82AA, + 44438 - 44032: 0x82AB, + 44439 - 44032: 0x82AC, + 44440 - 44032: 0x82AD, + 44441 - 44032: 0x82AE, + 44442 - 44032: 0x82AF, + 44443 - 44032: 0x82B0, + 44444 - 44032: 0xB1C9, + 44445 - 44032: 0xB1CA, + 44446 - 44032: 0x82B1, + 44447 - 44032: 0x82B2, + 44448 - 44032: 0x82B3, + 44449 - 44032: 0x82B4, + 44450 - 44032: 0x82B5, + 44451 - 44032: 0x82B6, + 44452 - 44032: 0xB1CB, + 44453 - 44032: 0x82B7, + 44454 - 44032: 0x82B8, + 44455 - 44032: 0x82B9, + 44456 - 44032: 0x82BA, + 44457 - 44032: 0x82BB, + 44458 - 44032: 0x82BC, + 44459 - 44032: 0x82BD, + 44460 - 44032: 0x82BE, + 44461 - 44032: 0x82BF, + 44462 - 44032: 0x82C0, + 44463 - 44032: 0x82C1, + 44464 - 44032: 0x82C2, + 44465 - 44032: 0x82C3, + 44466 - 44032: 0x82C4, + 44467 - 44032: 0x82C5, + 44468 - 44032: 0x82C6, + 44469 - 44032: 0x82C7, + 44470 - 44032: 0x82C8, + 44471 - 44032: 0xB1CC, + 44472 - 44032: 0x82C9, + 44473 - 44032: 0x82CA, + 44474 - 44032: 0x82CB, + 44475 - 44032: 0x82CC, + 44476 - 44032: 0x82CD, + 44477 - 44032: 0x82CE, + 44478 - 44032: 0x82CF, + 44479 - 44032: 0x82D0, + 44480 - 44032: 0xB1CD, + 44481 - 44032: 0xB1CE, + 44482 - 44032: 0x82D1, + 44483 - 44032: 0x82D2, + 44484 - 44032: 0xB1CF, + 44485 - 44032: 0x82D3, + 44486 - 44032: 0x82D4, + 44487 - 44032: 0x82D5, + 44488 - 44032: 0xB1D0, + 44489 - 44032: 0x82D6, + 44490 - 44032: 0x82D7, + 44491 - 44032: 0x82D8, + 44492 - 44032: 0x82D9, + 44493 - 44032: 0x82DA, + 44494 - 44032: 0x82DB, + 44495 - 44032: 0x82DC, + 44496 - 44032: 0xB1D1, + 44497 - 44032: 0xB1D2, + 44498 - 44032: 0x82DD, + 44499 - 44032: 0xB1D3, + 44500 - 44032: 0x82DE, + 44501 - 44032: 0x82DF, + 44502 - 44032: 0x82E0, + 44503 - 44032: 0x82E1, + 44504 - 44032: 0x82E2, + 44505 - 44032: 0x82E3, + 44506 - 44032: 0x82E4, + 44507 - 44032: 0x82E5, + 44508 - 44032: 0xB1D4, + 44509 - 44032: 0x82E6, + 44510 - 44032: 0x82E7, + 44511 - 44032: 0x82E8, + 44512 - 44032: 0xB1D5, + 44513 - 44032: 0x82E9, + 44514 - 44032: 0x82EA, + 44515 - 44032: 0x82EB, + 44516 - 44032: 0xB1D6, + 44517 - 44032: 0x82EC, + 44518 - 44032: 0x82ED, + 44519 - 44032: 0x82EE, + 44520 - 44032: 0x82EF, + 44521 - 44032: 0x82F0, + 44522 - 44032: 0x82F1, + 44523 - 44032: 0x82F2, + 44524 - 44032: 0x82F3, + 44525 - 44032: 0x82F4, + 44526 - 44032: 0x82F5, + 44527 - 44032: 0x82F6, + 44528 - 44032: 0x82F7, + 44529 - 44032: 0x82F8, + 44530 - 44032: 0x82F9, + 44531 - 44032: 0x82FA, + 44532 - 44032: 0x82FB, + 44533 - 44032: 0x82FC, + 44534 - 44032: 0x82FD, + 44535 - 44032: 0x82FE, + 44536 - 44032: 0xB1D7, + 44537 - 44032: 0xB1D8, + 44538 - 44032: 0x8341, + 44539 - 44032: 0x8342, + 44540 - 44032: 0xB1D9, + 44541 - 44032: 0x8343, + 44542 - 44032: 0x8344, + 44543 - 44032: 0xB1DA, + 44544 - 44032: 0xB1DB, + 44545 - 44032: 0xB1DC, + 44546 - 44032: 0x8345, + 44547 - 44032: 0x8346, + 44548 - 44032: 0x8347, + 44549 - 44032: 0x8348, + 44550 - 44032: 0x8349, + 44551 - 44032: 0x834A, + 44552 - 44032: 0xB1DD, + 44553 - 44032: 0xB1DE, + 44554 - 44032: 0x834B, + 44555 - 44032: 0xB1DF, + 44556 - 44032: 0x834C, + 44557 - 44032: 0xB1E0, + 44558 - 44032: 0x834D, + 44559 - 44032: 0x834E, + 44560 - 44032: 0x834F, + 44561 - 44032: 0x8350, + 44562 - 44032: 0x8351, + 44563 - 44032: 0x8352, + 44564 - 44032: 0xB1E1, + 44565 - 44032: 0x8353, + 44566 - 44032: 0x8354, + 44567 - 44032: 0x8355, + 44568 - 44032: 0x8356, + 44569 - 44032: 0x8357, + 44570 - 44032: 0x8358, + 44571 - 44032: 0x8359, + 44572 - 44032: 0x835A, + 44573 - 44032: 0x8361, + 44574 - 44032: 0x8362, + 44575 - 44032: 0x8363, + 44576 - 44032: 0x8364, + 44577 - 44032: 0x8365, + 44578 - 44032: 0x8366, + 44579 - 44032: 0x8367, + 44580 - 44032: 0x8368, + 44581 - 44032: 0x8369, + 44582 - 44032: 0x836A, + 44583 - 44032: 0x836B, + 44584 - 44032: 0x836C, + 44585 - 44032: 0x836D, + 44586 - 44032: 0x836E, + 44587 - 44032: 0x836F, + 44588 - 44032: 0x8370, + 44589 - 44032: 0x8371, + 44590 - 44032: 0x8372, + 44591 - 44032: 0x8373, + 44592 - 44032: 0xB1E2, + 44593 - 44032: 0xB1E3, + 44594 - 44032: 0x8374, + 44595 - 44032: 0x8375, + 44596 - 44032: 0xB1E4, + 44597 - 44032: 0x8376, + 44598 - 44032: 0x8377, + 44599 - 44032: 0xB1E5, + 44600 - 44032: 0xB1E6, + 44601 - 44032: 0x8378, + 44602 - 44032: 0xB1E7, + 44603 - 44032: 0x8379, + 44604 - 44032: 0x837A, + 44605 - 44032: 0x8381, + 44606 - 44032: 0x8382, + 44607 - 44032: 0x8383, + 44608 - 44032: 0xB1E8, + 44609 - 44032: 0xB1E9, + 44610 - 44032: 0x8384, + 44611 - 44032: 0xB1EA, + 44612 - 44032: 0x8385, + 44613 - 44032: 0xB1EB, + 44614 - 44032: 0xB1EC, + 44615 - 44032: 0x8386, + 44616 - 44032: 0x8387, + 44617 - 44032: 0x8388, + 44618 - 44032: 0xB1ED, + 44619 - 44032: 0x8389, + 44620 - 44032: 0xB1EE, + 44621 - 44032: 0xB1EF, + 44622 - 44032: 0xB1F0, + 44623 - 44032: 0x838A, + 44624 - 44032: 0xB1F1, + 44625 - 44032: 0x838B, + 44626 - 44032: 0x838C, + 44627 - 44032: 0x838D, + 44628 - 44032: 0xB1F2, + 44629 - 44032: 0x838E, + 44630 - 44032: 0xB1F3, + 44631 - 44032: 0x838F, + 44632 - 44032: 0x8390, + 44633 - 44032: 0x8391, + 44634 - 44032: 0x8392, + 44635 - 44032: 0x8393, + 44636 - 44032: 0xB1F4, + 44637 - 44032: 0xB1F5, + 44638 - 44032: 0x8394, + 44639 - 44032: 0xB1F6, + 44640 - 44032: 0xB1F7, + 44641 - 44032: 0xB1F8, + 44642 - 44032: 0x8395, + 44643 - 44032: 0x8396, + 44644 - 44032: 0x8397, + 44645 - 44032: 0xB1F9, + 44646 - 44032: 0x8398, + 44647 - 44032: 0x8399, + 44648 - 44032: 0xB1FA, + 44649 - 44032: 0xB1FB, + 44650 - 44032: 0x839A, + 44651 - 44032: 0x839B, + 44652 - 44032: 0xB1FC, + 44653 - 44032: 0x839C, + 44654 - 44032: 0x839D, + 44655 - 44032: 0x839E, + 44656 - 44032: 0xB1FD, + 44657 - 44032: 0x839F, + 44658 - 44032: 0x83A0, + 44659 - 44032: 0x83A1, + 44660 - 44032: 0x83A2, + 44661 - 44032: 0x83A3, + 44662 - 44032: 0x83A4, + 44663 - 44032: 0x83A5, + 44664 - 44032: 0xB1FE, + 44665 - 44032: 0xB2A1, + 44666 - 44032: 0x83A6, + 44667 - 44032: 0xB2A2, + 44668 - 44032: 0xB2A3, + 44669 - 44032: 0xB2A4, + 44670 - 44032: 0x83A7, + 44671 - 44032: 0x83A8, + 44672 - 44032: 0x83A9, + 44673 - 44032: 0x83AA, + 44674 - 44032: 0x83AB, + 44675 - 44032: 0x83AC, + 44676 - 44032: 0xB2A5, + 44677 - 44032: 0xB2A6, + 44678 - 44032: 0x83AD, + 44679 - 44032: 0x83AE, + 44680 - 44032: 0x83AF, + 44681 - 44032: 0x83B0, + 44682 - 44032: 0x83B1, + 44683 - 44032: 0x83B2, + 44684 - 44032: 0xB2A7, + 44685 - 44032: 0x83B3, + 44686 - 44032: 0x83B4, + 44687 - 44032: 0x83B5, + 44688 - 44032: 0x83B6, + 44689 - 44032: 0x83B7, + 44690 - 44032: 0x83B8, + 44691 - 44032: 0x83B9, + 44692 - 44032: 0x83BA, + 44693 - 44032: 0x83BB, + 44694 - 44032: 0x83BC, + 44695 - 44032: 0x83BD, + 44696 - 44032: 0x83BE, + 44697 - 44032: 0x83BF, + 44698 - 44032: 0x83C0, + 44699 - 44032: 0x83C1, + 44700 - 44032: 0x83C2, + 44701 - 44032: 0x83C3, + 44702 - 44032: 0x83C4, + 44703 - 44032: 0x83C5, + 44704 - 44032: 0x83C6, + 44705 - 44032: 0x83C7, + 44706 - 44032: 0x83C8, + 44707 - 44032: 0x83C9, + 44708 - 44032: 0x83CA, + 44709 - 44032: 0x83CB, + 44710 - 44032: 0x83CC, + 44711 - 44032: 0x83CD, + 44712 - 44032: 0x83CE, + 44713 - 44032: 0x83CF, + 44714 - 44032: 0x83D0, + 44715 - 44032: 0x83D1, + 44716 - 44032: 0x83D2, + 44717 - 44032: 0x83D3, + 44718 - 44032: 0x83D4, + 44719 - 44032: 0x83D5, + 44720 - 44032: 0x83D6, + 44721 - 44032: 0x83D7, + 44722 - 44032: 0x83D8, + 44723 - 44032: 0x83D9, + 44724 - 44032: 0x83DA, + 44725 - 44032: 0x83DB, + 44726 - 44032: 0x83DC, + 44727 - 44032: 0x83DD, + 44728 - 44032: 0x83DE, + 44729 - 44032: 0x83DF, + 44730 - 44032: 0x83E0, + 44731 - 44032: 0x83E1, + 44732 - 44032: 0xB2A8, + 44733 - 44032: 0xB2A9, + 44734 - 44032: 0xB2AA, + 44735 - 44032: 0x83E2, + 44736 - 44032: 0xB2AB, + 44737 - 44032: 0x83E3, + 44738 - 44032: 0x83E4, + 44739 - 44032: 0x83E5, + 44740 - 44032: 0xB2AC, + 44741 - 44032: 0x83E6, + 44742 - 44032: 0x83E7, + 44743 - 44032: 0x83E8, + 44744 - 44032: 0x83E9, + 44745 - 44032: 0x83EA, + 44746 - 44032: 0x83EB, + 44747 - 44032: 0x83EC, + 44748 - 44032: 0xB2AD, + 44749 - 44032: 0xB2AE, + 44750 - 44032: 0x83ED, + 44751 - 44032: 0xB2AF, + 44752 - 44032: 0xB2B0, + 44753 - 44032: 0xB2B1, + 44754 - 44032: 0x83EE, + 44755 - 44032: 0x83EF, + 44756 - 44032: 0x83F0, + 44757 - 44032: 0x83F1, + 44758 - 44032: 0x83F2, + 44759 - 44032: 0x83F3, + 44760 - 44032: 0xB2B2, + 44761 - 44032: 0xB2B3, + 44762 - 44032: 0x83F4, + 44763 - 44032: 0x83F5, + 44764 - 44032: 0xB2B4, + 44765 - 44032: 0x83F6, + 44766 - 44032: 0x83F7, + 44767 - 44032: 0x83F8, + 44768 - 44032: 0x83F9, + 44769 - 44032: 0x83FA, + 44770 - 44032: 0x83FB, + 44771 - 44032: 0x83FC, + 44772 - 44032: 0x83FD, + 44773 - 44032: 0x83FE, + 44774 - 44032: 0x8441, + 44775 - 44032: 0x8442, + 44776 - 44032: 0xB2B5, + 44777 - 44032: 0x8443, + 44778 - 44032: 0x8444, + 44779 - 44032: 0xB2B6, + 44780 - 44032: 0x8445, + 44781 - 44032: 0xB2B7, + 44782 - 44032: 0x8446, + 44783 - 44032: 0x8447, + 44784 - 44032: 0x8448, + 44785 - 44032: 0x8449, + 44786 - 44032: 0x844A, + 44787 - 44032: 0x844B, + 44788 - 44032: 0xB2B8, + 44789 - 44032: 0x844C, + 44790 - 44032: 0x844D, + 44791 - 44032: 0x844E, + 44792 - 44032: 0xB2B9, + 44793 - 44032: 0x844F, + 44794 - 44032: 0x8450, + 44795 - 44032: 0x8451, + 44796 - 44032: 0xB2BA, + 44797 - 44032: 0x8452, + 44798 - 44032: 0x8453, + 44799 - 44032: 0x8454, + 44800 - 44032: 0x8455, + 44801 - 44032: 0x8456, + 44802 - 44032: 0x8457, + 44803 - 44032: 0x8458, + 44804 - 44032: 0x8459, + 44805 - 44032: 0x845A, + 44806 - 44032: 0x8461, + 44807 - 44032: 0xB2BB, + 44808 - 44032: 0xB2BC, + 44809 - 44032: 0x8462, + 44810 - 44032: 0x8463, + 44811 - 44032: 0x8464, + 44812 - 44032: 0x8465, + 44813 - 44032: 0xB2BD, + 44814 - 44032: 0x8466, + 44815 - 44032: 0x8467, + 44816 - 44032: 0xB2BE, + 44817 - 44032: 0x8468, + 44818 - 44032: 0x8469, + 44819 - 44032: 0x846A, + 44820 - 44032: 0x846B, + 44821 - 44032: 0x846C, + 44822 - 44032: 0x846D, + 44823 - 44032: 0x846E, + 44824 - 44032: 0x846F, + 44825 - 44032: 0x8470, + 44826 - 44032: 0x8471, + 44827 - 44032: 0x8472, + 44828 - 44032: 0x8473, + 44829 - 44032: 0x8474, + 44830 - 44032: 0x8475, + 44831 - 44032: 0x8476, + 44832 - 44032: 0x8477, + 44833 - 44032: 0x8478, + 44834 - 44032: 0x8479, + 44835 - 44032: 0x847A, + 44836 - 44032: 0x8481, + 44837 - 44032: 0x8482, + 44838 - 44032: 0x8483, + 44839 - 44032: 0x8484, + 44840 - 44032: 0x8485, + 44841 - 44032: 0x8486, + 44842 - 44032: 0x8487, + 44843 - 44032: 0x8488, + 44844 - 44032: 0xB2BF, + 44845 - 44032: 0xB2C0, + 44846 - 44032: 0x8489, + 44847 - 44032: 0x848A, + 44848 - 44032: 0xB2C1, + 44849 - 44032: 0x848B, + 44850 - 44032: 0xB2C2, + 44851 - 44032: 0x848C, + 44852 - 44032: 0xB2C3, + 44853 - 44032: 0x848D, + 44854 - 44032: 0x848E, + 44855 - 44032: 0x848F, + 44856 - 44032: 0x8490, + 44857 - 44032: 0x8491, + 44858 - 44032: 0x8492, + 44859 - 44032: 0x8493, + 44860 - 44032: 0xB2C4, + 44861 - 44032: 0xB2C5, + 44862 - 44032: 0x8494, + 44863 - 44032: 0xB2C6, + 44864 - 44032: 0x8495, + 44865 - 44032: 0xB2C7, + 44866 - 44032: 0xB2C8, + 44867 - 44032: 0xB2C9, + 44868 - 44032: 0x8496, + 44869 - 44032: 0x8497, + 44870 - 44032: 0x8498, + 44871 - 44032: 0x8499, + 44872 - 44032: 0xB2CA, + 44873 - 44032: 0xB2CB, + 44874 - 44032: 0x849A, + 44875 - 44032: 0x849B, + 44876 - 44032: 0x849C, + 44877 - 44032: 0x849D, + 44878 - 44032: 0x849E, + 44879 - 44032: 0x849F, + 44880 - 44032: 0xB2CC, + 44881 - 44032: 0x84A0, + 44882 - 44032: 0x84A1, + 44883 - 44032: 0x84A2, + 44884 - 44032: 0x84A3, + 44885 - 44032: 0x84A4, + 44886 - 44032: 0x84A5, + 44887 - 44032: 0x84A6, + 44888 - 44032: 0x84A7, + 44889 - 44032: 0x84A8, + 44890 - 44032: 0x84A9, + 44891 - 44032: 0x84AA, + 44892 - 44032: 0xB2CD, + 44893 - 44032: 0xB2CE, + 44894 - 44032: 0x84AB, + 44895 - 44032: 0x84AC, + 44896 - 44032: 0x84AD, + 44897 - 44032: 0x84AE, + 44898 - 44032: 0x84AF, + 44899 - 44032: 0x84B0, + 44900 - 44032: 0xB2CF, + 44901 - 44032: 0xB2D0, + 44902 - 44032: 0x84B1, + 44903 - 44032: 0x84B2, + 44904 - 44032: 0x84B3, + 44905 - 44032: 0x84B4, + 44906 - 44032: 0x84B5, + 44907 - 44032: 0x84B6, + 44908 - 44032: 0x84B7, + 44909 - 44032: 0x84B8, + 44910 - 44032: 0x84B9, + 44911 - 44032: 0x84BA, + 44912 - 44032: 0x84BB, + 44913 - 44032: 0x84BC, + 44914 - 44032: 0x84BD, + 44915 - 44032: 0x84BE, + 44916 - 44032: 0x84BF, + 44917 - 44032: 0x84C0, + 44918 - 44032: 0x84C1, + 44919 - 44032: 0x84C2, + 44920 - 44032: 0x84C3, + 44921 - 44032: 0xB2D1, + 44922 - 44032: 0x84C4, + 44923 - 44032: 0x84C5, + 44924 - 44032: 0x84C6, + 44925 - 44032: 0x84C7, + 44926 - 44032: 0x84C8, + 44927 - 44032: 0x84C9, + 44928 - 44032: 0xB2D2, + 44929 - 44032: 0x84CA, + 44930 - 44032: 0x84CB, + 44931 - 44032: 0x84CC, + 44932 - 44032: 0xB2D3, + 44933 - 44032: 0x84CD, + 44934 - 44032: 0x84CE, + 44935 - 44032: 0x84CF, + 44936 - 44032: 0xB2D4, + 44937 - 44032: 0x84D0, + 44938 - 44032: 0x84D1, + 44939 - 44032: 0x84D2, + 44940 - 44032: 0x84D3, + 44941 - 44032: 0x84D4, + 44942 - 44032: 0x84D5, + 44943 - 44032: 0x84D6, + 44944 - 44032: 0xB2D5, + 44945 - 44032: 0xB2D6, + 44946 - 44032: 0x84D7, + 44947 - 44032: 0x84D8, + 44948 - 44032: 0x84D9, + 44949 - 44032: 0xB2D7, + 44950 - 44032: 0x84DA, + 44951 - 44032: 0x84DB, + 44952 - 44032: 0x84DC, + 44953 - 44032: 0x84DD, + 44954 - 44032: 0x84DE, + 44955 - 44032: 0x84DF, + 44956 - 44032: 0xB2D8, + 44957 - 44032: 0x84E0, + 44958 - 44032: 0x84E1, + 44959 - 44032: 0x84E2, + 44960 - 44032: 0x84E3, + 44961 - 44032: 0x84E4, + 44962 - 44032: 0x84E5, + 44963 - 44032: 0x84E6, + 44964 - 44032: 0x84E7, + 44965 - 44032: 0x84E8, + 44966 - 44032: 0x84E9, + 44967 - 44032: 0x84EA, + 44968 - 44032: 0x84EB, + 44969 - 44032: 0x84EC, + 44970 - 44032: 0x84ED, + 44971 - 44032: 0x84EE, + 44972 - 44032: 0x84EF, + 44973 - 44032: 0x84F0, + 44974 - 44032: 0x84F1, + 44975 - 44032: 0x84F2, + 44976 - 44032: 0x84F3, + 44977 - 44032: 0x84F4, + 44978 - 44032: 0x84F5, + 44979 - 44032: 0x84F6, + 44980 - 44032: 0x84F7, + 44981 - 44032: 0x84F8, + 44982 - 44032: 0x84F9, + 44983 - 44032: 0x84FA, + 44984 - 44032: 0xB2D9, + 44985 - 44032: 0xB2DA, + 44986 - 44032: 0x84FB, + 44987 - 44032: 0x84FC, + 44988 - 44032: 0xB2DB, + 44989 - 44032: 0x84FD, + 44990 - 44032: 0x84FE, + 44991 - 44032: 0x8541, + 44992 - 44032: 0xB2DC, + 44993 - 44032: 0x8542, + 44994 - 44032: 0x8543, + 44995 - 44032: 0x8544, + 44996 - 44032: 0x8545, + 44997 - 44032: 0x8546, + 44998 - 44032: 0x8547, + 44999 - 44032: 0xB2DD, + 45000 - 44032: 0xB2DE, + 45001 - 44032: 0xB2DF, + 45002 - 44032: 0x8548, + 45003 - 44032: 0xB2E0, + 45004 - 44032: 0x8549, + 45005 - 44032: 0xB2E1, + 45006 - 44032: 0xB2E2, + 45007 - 44032: 0x854A, + 45008 - 44032: 0x854B, + 45009 - 44032: 0x854C, + 45010 - 44032: 0x854D, + 45011 - 44032: 0x854E, + 45012 - 44032: 0xB2E3, + 45013 - 44032: 0x854F, + 45014 - 44032: 0x8550, + 45015 - 44032: 0x8551, + 45016 - 44032: 0x8552, + 45017 - 44032: 0x8553, + 45018 - 44032: 0x8554, + 45019 - 44032: 0x8555, + 45020 - 44032: 0xB2E4, + 45021 - 44032: 0x8556, + 45022 - 44032: 0x8557, + 45023 - 44032: 0x8558, + 45024 - 44032: 0x8559, + 45025 - 44032: 0x855A, + 45026 - 44032: 0x8561, + 45027 - 44032: 0x8562, + 45028 - 44032: 0x8563, + 45029 - 44032: 0x8564, + 45030 - 44032: 0x8565, + 45031 - 44032: 0x8566, + 45032 - 44032: 0xB2E5, + 45033 - 44032: 0xB2E6, + 45034 - 44032: 0x8567, + 45035 - 44032: 0x8568, + 45036 - 44032: 0x8569, + 45037 - 44032: 0x856A, + 45038 - 44032: 0x856B, + 45039 - 44032: 0x856C, + 45040 - 44032: 0xB2E7, + 45041 - 44032: 0xB2E8, + 45042 - 44032: 0x856D, + 45043 - 44032: 0x856E, + 45044 - 44032: 0xB2E9, + 45045 - 44032: 0x856F, + 45046 - 44032: 0x8570, + 45047 - 44032: 0x8571, + 45048 - 44032: 0xB2EA, + 45049 - 44032: 0x8572, + 45050 - 44032: 0x8573, + 45051 - 44032: 0x8574, + 45052 - 44032: 0x8575, + 45053 - 44032: 0x8576, + 45054 - 44032: 0x8577, + 45055 - 44032: 0x8578, + 45056 - 44032: 0xB2EB, + 45057 - 44032: 0xB2EC, + 45058 - 44032: 0x8579, + 45059 - 44032: 0x857A, + 45060 - 44032: 0xB2ED, + 45061 - 44032: 0x8581, + 45062 - 44032: 0x8582, + 45063 - 44032: 0x8583, + 45064 - 44032: 0x8584, + 45065 - 44032: 0x8585, + 45066 - 44032: 0x8586, + 45067 - 44032: 0x8587, + 45068 - 44032: 0xB2EE, + 45069 - 44032: 0x8588, + 45070 - 44032: 0x8589, + 45071 - 44032: 0x858A, + 45072 - 44032: 0xB2EF, + 45073 - 44032: 0x858B, + 45074 - 44032: 0x858C, + 45075 - 44032: 0x858D, + 45076 - 44032: 0xB2F0, + 45077 - 44032: 0x858E, + 45078 - 44032: 0x858F, + 45079 - 44032: 0x8590, + 45080 - 44032: 0x8591, + 45081 - 44032: 0x8592, + 45082 - 44032: 0x8593, + 45083 - 44032: 0x8594, + 45084 - 44032: 0xB2F1, + 45085 - 44032: 0xB2F2, + 45086 - 44032: 0x8595, + 45087 - 44032: 0x8596, + 45088 - 44032: 0x8597, + 45089 - 44032: 0x8598, + 45090 - 44032: 0x8599, + 45091 - 44032: 0x859A, + 45092 - 44032: 0x859B, + 45093 - 44032: 0x859C, + 45094 - 44032: 0x859D, + 45095 - 44032: 0x859E, + 45096 - 44032: 0xB2F3, + 45097 - 44032: 0x859F, + 45098 - 44032: 0x85A0, + 45099 - 44032: 0x85A1, + 45100 - 44032: 0x85A2, + 45101 - 44032: 0x85A3, + 45102 - 44032: 0x85A4, + 45103 - 44032: 0x85A5, + 45104 - 44032: 0x85A6, + 45105 - 44032: 0x85A7, + 45106 - 44032: 0x85A8, + 45107 - 44032: 0x85A9, + 45108 - 44032: 0x85AA, + 45109 - 44032: 0x85AB, + 45110 - 44032: 0x85AC, + 45111 - 44032: 0x85AD, + 45112 - 44032: 0x85AE, + 45113 - 44032: 0x85AF, + 45114 - 44032: 0x85B0, + 45115 - 44032: 0x85B1, + 45116 - 44032: 0x85B2, + 45117 - 44032: 0x85B3, + 45118 - 44032: 0x85B4, + 45119 - 44032: 0x85B5, + 45120 - 44032: 0x85B6, + 45121 - 44032: 0x85B7, + 45122 - 44032: 0x85B8, + 45123 - 44032: 0x85B9, + 45124 - 44032: 0xB2F4, + 45125 - 44032: 0xB2F5, + 45126 - 44032: 0x85BA, + 45127 - 44032: 0x85BB, + 45128 - 44032: 0xB2F6, + 45129 - 44032: 0x85BC, + 45130 - 44032: 0xB2F7, + 45131 - 44032: 0x85BD, + 45132 - 44032: 0xB2F8, + 45133 - 44032: 0x85BE, + 45134 - 44032: 0xB2F9, + 45135 - 44032: 0x85BF, + 45136 - 44032: 0x85C0, + 45137 - 44032: 0x85C1, + 45138 - 44032: 0x85C2, + 45139 - 44032: 0xB2FA, + 45140 - 44032: 0xB2FB, + 45141 - 44032: 0xB2FC, + 45142 - 44032: 0x85C3, + 45143 - 44032: 0xB2FD, + 45144 - 44032: 0x85C4, + 45145 - 44032: 0xB2FE, + 45146 - 44032: 0x85C5, + 45147 - 44032: 0x85C6, + 45148 - 44032: 0x85C7, + 45149 - 44032: 0xB3A1, + 45150 - 44032: 0x85C8, + 45151 - 44032: 0x85C9, + 45152 - 44032: 0x85CA, + 45153 - 44032: 0x85CB, + 45154 - 44032: 0x85CC, + 45155 - 44032: 0x85CD, + 45156 - 44032: 0x85CE, + 45157 - 44032: 0x85CF, + 45158 - 44032: 0x85D0, + 45159 - 44032: 0x85D1, + 45160 - 44032: 0x85D2, + 45161 - 44032: 0x85D3, + 45162 - 44032: 0x85D4, + 45163 - 44032: 0x85D5, + 45164 - 44032: 0x85D6, + 45165 - 44032: 0x85D7, + 45166 - 44032: 0x85D8, + 45167 - 44032: 0x85D9, + 45168 - 44032: 0x85DA, + 45169 - 44032: 0x85DB, + 45170 - 44032: 0x85DC, + 45171 - 44032: 0x85DD, + 45172 - 44032: 0x85DE, + 45173 - 44032: 0x85DF, + 45174 - 44032: 0x85E0, + 45175 - 44032: 0x85E1, + 45176 - 44032: 0x85E2, + 45177 - 44032: 0x85E3, + 45178 - 44032: 0x85E4, + 45179 - 44032: 0x85E5, + 45180 - 44032: 0xB3A2, + 45181 - 44032: 0xB3A3, + 45182 - 44032: 0x85E6, + 45183 - 44032: 0x85E7, + 45184 - 44032: 0xB3A4, + 45185 - 44032: 0x85E8, + 45186 - 44032: 0x85E9, + 45187 - 44032: 0x85EA, + 45188 - 44032: 0xB3A5, + 45189 - 44032: 0x85EB, + 45190 - 44032: 0x85EC, + 45191 - 44032: 0x85ED, + 45192 - 44032: 0x85EE, + 45193 - 44032: 0x85EF, + 45194 - 44032: 0x85F0, + 45195 - 44032: 0x85F1, + 45196 - 44032: 0xB3A6, + 45197 - 44032: 0xB3A7, + 45198 - 44032: 0x85F2, + 45199 - 44032: 0xB3A8, + 45200 - 44032: 0x85F3, + 45201 - 44032: 0xB3A9, + 45202 - 44032: 0x85F4, + 45203 - 44032: 0x85F5, + 45204 - 44032: 0x85F6, + 45205 - 44032: 0x85F7, + 45206 - 44032: 0x85F8, + 45207 - 44032: 0x85F9, + 45208 - 44032: 0xB3AA, + 45209 - 44032: 0xB3AB, + 45210 - 44032: 0xB3AC, + 45211 - 44032: 0x85FA, + 45212 - 44032: 0xB3AD, + 45213 - 44032: 0x85FB, + 45214 - 44032: 0x85FC, + 45215 - 44032: 0xB3AE, + 45216 - 44032: 0xB3AF, + 45217 - 44032: 0xB3B0, + 45218 - 44032: 0xB3B1, + 45219 - 44032: 0x85FD, + 45220 - 44032: 0x85FE, + 45221 - 44032: 0x8641, + 45222 - 44032: 0x8642, + 45223 - 44032: 0x8643, + 45224 - 44032: 0xB3B2, + 45225 - 44032: 0xB3B3, + 45226 - 44032: 0x8644, + 45227 - 44032: 0xB3B4, + 45228 - 44032: 0xB3B5, + 45229 - 44032: 0xB3B6, + 45230 - 44032: 0xB3B7, + 45231 - 44032: 0xB3B8, + 45232 - 44032: 0x8645, + 45233 - 44032: 0xB3B9, + 45234 - 44032: 0x8646, + 45235 - 44032: 0xB3BA, + 45236 - 44032: 0xB3BB, + 45237 - 44032: 0xB3BC, + 45238 - 44032: 0x8647, + 45239 - 44032: 0x8648, + 45240 - 44032: 0xB3BD, + 45241 - 44032: 0x8649, + 45242 - 44032: 0x864A, + 45243 - 44032: 0x864B, + 45244 - 44032: 0xB3BE, + 45245 - 44032: 0x864C, + 45246 - 44032: 0x864D, + 45247 - 44032: 0x864E, + 45248 - 44032: 0x864F, + 45249 - 44032: 0x8650, + 45250 - 44032: 0x8651, + 45251 - 44032: 0x8652, + 45252 - 44032: 0xB3BF, + 45253 - 44032: 0xB3C0, + 45254 - 44032: 0x8653, + 45255 - 44032: 0xB3C1, + 45256 - 44032: 0xB3C2, + 45257 - 44032: 0xB3C3, + 45258 - 44032: 0x8654, + 45259 - 44032: 0x8655, + 45260 - 44032: 0x8656, + 45261 - 44032: 0x8657, + 45262 - 44032: 0x8658, + 45263 - 44032: 0x8659, + 45264 - 44032: 0xB3C4, + 45265 - 44032: 0xB3C5, + 45266 - 44032: 0x865A, + 45267 - 44032: 0x8661, + 45268 - 44032: 0xB3C6, + 45269 - 44032: 0x8662, + 45270 - 44032: 0x8663, + 45271 - 44032: 0x8664, + 45272 - 44032: 0xB3C7, + 45273 - 44032: 0x8665, + 45274 - 44032: 0x8666, + 45275 - 44032: 0x8667, + 45276 - 44032: 0x8668, + 45277 - 44032: 0x8669, + 45278 - 44032: 0x866A, + 45279 - 44032: 0x866B, + 45280 - 44032: 0xB3C8, + 45281 - 44032: 0x866C, + 45282 - 44032: 0x866D, + 45283 - 44032: 0x866E, + 45284 - 44032: 0x866F, + 45285 - 44032: 0xB3C9, + 45286 - 44032: 0x8670, + 45287 - 44032: 0x8671, + 45288 - 44032: 0x8672, + 45289 - 44032: 0x8673, + 45290 - 44032: 0x8674, + 45291 - 44032: 0x8675, + 45292 - 44032: 0x8676, + 45293 - 44032: 0x8677, + 45294 - 44032: 0x8678, + 45295 - 44032: 0x8679, + 45296 - 44032: 0x867A, + 45297 - 44032: 0x8681, + 45298 - 44032: 0x8682, + 45299 - 44032: 0x8683, + 45300 - 44032: 0x8684, + 45301 - 44032: 0x8685, + 45302 - 44032: 0x8686, + 45303 - 44032: 0x8687, + 45304 - 44032: 0x8688, + 45305 - 44032: 0x8689, + 45306 - 44032: 0x868A, + 45307 - 44032: 0x868B, + 45308 - 44032: 0x868C, + 45309 - 44032: 0x868D, + 45310 - 44032: 0x868E, + 45311 - 44032: 0x868F, + 45312 - 44032: 0x8690, + 45313 - 44032: 0x8691, + 45314 - 44032: 0x8692, + 45315 - 44032: 0x8693, + 45316 - 44032: 0x8694, + 45317 - 44032: 0x8695, + 45318 - 44032: 0x8696, + 45319 - 44032: 0x8697, + 45320 - 44032: 0xB3CA, + 45321 - 44032: 0xB3CB, + 45322 - 44032: 0x8698, + 45323 - 44032: 0xB3CC, + 45324 - 44032: 0xB3CD, + 45325 - 44032: 0x8699, + 45326 - 44032: 0x869A, + 45327 - 44032: 0x869B, + 45328 - 44032: 0xB3CE, + 45329 - 44032: 0x869C, + 45330 - 44032: 0xB3CF, + 45331 - 44032: 0xB3D0, + 45332 - 44032: 0x869D, + 45333 - 44032: 0x869E, + 45334 - 44032: 0x869F, + 45335 - 44032: 0x86A0, + 45336 - 44032: 0xB3D1, + 45337 - 44032: 0xB3D2, + 45338 - 44032: 0x86A1, + 45339 - 44032: 0xB3D3, + 45340 - 44032: 0xB3D4, + 45341 - 44032: 0xB3D5, + 45342 - 44032: 0x86A2, + 45343 - 44032: 0x86A3, + 45344 - 44032: 0x86A4, + 45345 - 44032: 0x86A5, + 45346 - 44032: 0x86A6, + 45347 - 44032: 0xB3D6, + 45348 - 44032: 0xB3D7, + 45349 - 44032: 0xB3D8, + 45350 - 44032: 0x86A7, + 45351 - 44032: 0x86A8, + 45352 - 44032: 0xB3D9, + 45353 - 44032: 0x86A9, + 45354 - 44032: 0x86AA, + 45355 - 44032: 0x86AB, + 45356 - 44032: 0xB3DA, + 45357 - 44032: 0x86AC, + 45358 - 44032: 0x86AD, + 45359 - 44032: 0x86AE, + 45360 - 44032: 0x86AF, + 45361 - 44032: 0x86B0, + 45362 - 44032: 0x86B1, + 45363 - 44032: 0x86B2, + 45364 - 44032: 0xB3DB, + 45365 - 44032: 0xB3DC, + 45366 - 44032: 0x86B3, + 45367 - 44032: 0xB3DD, + 45368 - 44032: 0xB3DE, + 45369 - 44032: 0xB3DF, + 45370 - 44032: 0x86B4, + 45371 - 44032: 0x86B5, + 45372 - 44032: 0x86B6, + 45373 - 44032: 0x86B7, + 45374 - 44032: 0x86B8, + 45375 - 44032: 0x86B9, + 45376 - 44032: 0xB3E0, + 45377 - 44032: 0xB3E1, + 45378 - 44032: 0x86BA, + 45379 - 44032: 0x86BB, + 45380 - 44032: 0xB3E2, + 45381 - 44032: 0x86BC, + 45382 - 44032: 0x86BD, + 45383 - 44032: 0x86BE, + 45384 - 44032: 0xB3E3, + 45385 - 44032: 0x86BF, + 45386 - 44032: 0x86C0, + 45387 - 44032: 0x86C1, + 45388 - 44032: 0x86C2, + 45389 - 44032: 0x86C3, + 45390 - 44032: 0x86C4, + 45391 - 44032: 0x86C5, + 45392 - 44032: 0xB3E4, + 45393 - 44032: 0xB3E5, + 45394 - 44032: 0x86C6, + 45395 - 44032: 0x86C7, + 45396 - 44032: 0xB3E6, + 45397 - 44032: 0xB3E7, + 45398 - 44032: 0x86C8, + 45399 - 44032: 0x86C9, + 45400 - 44032: 0xB3E8, + 45401 - 44032: 0x86CA, + 45402 - 44032: 0x86CB, + 45403 - 44032: 0x86CC, + 45404 - 44032: 0xB3E9, + 45405 - 44032: 0x86CD, + 45406 - 44032: 0x86CE, + 45407 - 44032: 0x86CF, + 45408 - 44032: 0xB3EA, + 45409 - 44032: 0x86D0, + 45410 - 44032: 0x86D1, + 45411 - 44032: 0x86D2, + 45412 - 44032: 0x86D3, + 45413 - 44032: 0x86D4, + 45414 - 44032: 0x86D5, + 45415 - 44032: 0x86D6, + 45416 - 44032: 0x86D7, + 45417 - 44032: 0x86D8, + 45418 - 44032: 0x86D9, + 45419 - 44032: 0x86DA, + 45420 - 44032: 0x86DB, + 45421 - 44032: 0x86DC, + 45422 - 44032: 0x86DD, + 45423 - 44032: 0x86DE, + 45424 - 44032: 0x86DF, + 45425 - 44032: 0x86E0, + 45426 - 44032: 0x86E1, + 45427 - 44032: 0x86E2, + 45428 - 44032: 0x86E3, + 45429 - 44032: 0x86E4, + 45430 - 44032: 0x86E5, + 45431 - 44032: 0x86E6, + 45432 - 44032: 0xB3EB, + 45433 - 44032: 0xB3EC, + 45434 - 44032: 0x86E7, + 45435 - 44032: 0x86E8, + 45436 - 44032: 0xB3ED, + 45437 - 44032: 0x86E9, + 45438 - 44032: 0x86EA, + 45439 - 44032: 0x86EB, + 45440 - 44032: 0xB3EE, + 45441 - 44032: 0x86EC, + 45442 - 44032: 0xB3EF, + 45443 - 44032: 0x86ED, + 45444 - 44032: 0x86EE, + 45445 - 44032: 0x86EF, + 45446 - 44032: 0x86F0, + 45447 - 44032: 0x86F1, + 45448 - 44032: 0xB3F0, + 45449 - 44032: 0xB3F1, + 45450 - 44032: 0x86F2, + 45451 - 44032: 0xB3F2, + 45452 - 44032: 0x86F3, + 45453 - 44032: 0xB3F3, + 45454 - 44032: 0x86F4, + 45455 - 44032: 0x86F5, + 45456 - 44032: 0x86F6, + 45457 - 44032: 0x86F7, + 45458 - 44032: 0xB3F4, + 45459 - 44032: 0xB3F5, + 45460 - 44032: 0xB3F6, + 45461 - 44032: 0x86F8, + 45462 - 44032: 0x86F9, + 45463 - 44032: 0x86FA, + 45464 - 44032: 0xB3F7, + 45465 - 44032: 0x86FB, + 45466 - 44032: 0x86FC, + 45467 - 44032: 0x86FD, + 45468 - 44032: 0xB3F8, + 45469 - 44032: 0x86FE, + 45470 - 44032: 0x8741, + 45471 - 44032: 0x8742, + 45472 - 44032: 0x8743, + 45473 - 44032: 0x8744, + 45474 - 44032: 0x8745, + 45475 - 44032: 0x8746, + 45476 - 44032: 0x8747, + 45477 - 44032: 0x8748, + 45478 - 44032: 0x8749, + 45479 - 44032: 0x874A, + 45480 - 44032: 0xB3F9, + 45481 - 44032: 0x874B, + 45482 - 44032: 0x874C, + 45483 - 44032: 0x874D, + 45484 - 44032: 0x874E, + 45485 - 44032: 0x874F, + 45486 - 44032: 0x8750, + 45487 - 44032: 0x8751, + 45488 - 44032: 0x8752, + 45489 - 44032: 0x8753, + 45490 - 44032: 0x8754, + 45491 - 44032: 0x8755, + 45492 - 44032: 0x8756, + 45493 - 44032: 0x8757, + 45494 - 44032: 0x8758, + 45495 - 44032: 0x8759, + 45496 - 44032: 0x875A, + 45497 - 44032: 0x8761, + 45498 - 44032: 0x8762, + 45499 - 44032: 0x8763, + 45500 - 44032: 0x8764, + 45501 - 44032: 0x8765, + 45502 - 44032: 0x8766, + 45503 - 44032: 0x8767, + 45504 - 44032: 0x8768, + 45505 - 44032: 0x8769, + 45506 - 44032: 0x876A, + 45507 - 44032: 0x876B, + 45508 - 44032: 0x876C, + 45509 - 44032: 0x876D, + 45510 - 44032: 0x876E, + 45511 - 44032: 0x876F, + 45512 - 44032: 0x8770, + 45513 - 44032: 0x8771, + 45514 - 44032: 0x8772, + 45515 - 44032: 0x8773, + 45516 - 44032: 0xB3FA, + 45517 - 44032: 0x8774, + 45518 - 44032: 0x8775, + 45519 - 44032: 0x8776, + 45520 - 44032: 0xB3FB, + 45521 - 44032: 0x8777, + 45522 - 44032: 0x8778, + 45523 - 44032: 0x8779, + 45524 - 44032: 0xB3FC, + 45525 - 44032: 0x877A, + 45526 - 44032: 0x8781, + 45527 - 44032: 0x8782, + 45528 - 44032: 0x8783, + 45529 - 44032: 0x8784, + 45530 - 44032: 0x8785, + 45531 - 44032: 0x8786, + 45532 - 44032: 0xB3FD, + 45533 - 44032: 0xB3FE, + 45534 - 44032: 0x8787, + 45535 - 44032: 0xB4A1, + 45536 - 44032: 0x8788, + 45537 - 44032: 0x8789, + 45538 - 44032: 0x878A, + 45539 - 44032: 0x878B, + 45540 - 44032: 0x878C, + 45541 - 44032: 0x878D, + 45542 - 44032: 0x878E, + 45543 - 44032: 0x878F, + 45544 - 44032: 0xB4A2, + 45545 - 44032: 0xB4A3, + 45546 - 44032: 0x8790, + 45547 - 44032: 0x8791, + 45548 - 44032: 0xB4A4, + 45549 - 44032: 0x8792, + 45550 - 44032: 0x8793, + 45551 - 44032: 0x8794, + 45552 - 44032: 0xB4A5, + 45553 - 44032: 0x8795, + 45554 - 44032: 0x8796, + 45555 - 44032: 0x8797, + 45556 - 44032: 0x8798, + 45557 - 44032: 0x8799, + 45558 - 44032: 0x879A, + 45559 - 44032: 0x879B, + 45560 - 44032: 0x879C, + 45561 - 44032: 0xB4A6, + 45562 - 44032: 0x879D, + 45563 - 44032: 0xB4A7, + 45564 - 44032: 0x879E, + 45565 - 44032: 0xB4A8, + 45566 - 44032: 0x879F, + 45567 - 44032: 0x87A0, + 45568 - 44032: 0x87A1, + 45569 - 44032: 0x87A2, + 45570 - 44032: 0x87A3, + 45571 - 44032: 0x87A4, + 45572 - 44032: 0xB4A9, + 45573 - 44032: 0xB4AA, + 45574 - 44032: 0x87A5, + 45575 - 44032: 0x87A6, + 45576 - 44032: 0xB4AB, + 45577 - 44032: 0x87A7, + 45578 - 44032: 0x87A8, + 45579 - 44032: 0xB4AC, + 45580 - 44032: 0xB4AD, + 45581 - 44032: 0x87A9, + 45582 - 44032: 0x87AA, + 45583 - 44032: 0x87AB, + 45584 - 44032: 0x87AC, + 45585 - 44032: 0x87AD, + 45586 - 44032: 0x87AE, + 45587 - 44032: 0x87AF, + 45588 - 44032: 0xB4AE, + 45589 - 44032: 0xB4AF, + 45590 - 44032: 0x87B0, + 45591 - 44032: 0xB4B0, + 45592 - 44032: 0x87B1, + 45593 - 44032: 0xB4B1, + 45594 - 44032: 0x87B2, + 45595 - 44032: 0x87B3, + 45596 - 44032: 0x87B4, + 45597 - 44032: 0x87B5, + 45598 - 44032: 0x87B6, + 45599 - 44032: 0x87B7, + 45600 - 44032: 0xB4B2, + 45601 - 44032: 0x87B8, + 45602 - 44032: 0x87B9, + 45603 - 44032: 0x87BA, + 45604 - 44032: 0x87BB, + 45605 - 44032: 0x87BC, + 45606 - 44032: 0x87BD, + 45607 - 44032: 0x87BE, + 45608 - 44032: 0x87BF, + 45609 - 44032: 0x87C0, + 45610 - 44032: 0x87C1, + 45611 - 44032: 0x87C2, + 45612 - 44032: 0x87C3, + 45613 - 44032: 0x87C4, + 45614 - 44032: 0x87C5, + 45615 - 44032: 0x87C6, + 45616 - 44032: 0x87C7, + 45617 - 44032: 0x87C8, + 45618 - 44032: 0x87C9, + 45619 - 44032: 0x87CA, + 45620 - 44032: 0xB4B3, + 45621 - 44032: 0x87CB, + 45622 - 44032: 0x87CC, + 45623 - 44032: 0x87CD, + 45624 - 44032: 0x87CE, + 45625 - 44032: 0x87CF, + 45626 - 44032: 0x87D0, + 45627 - 44032: 0x87D1, + 45628 - 44032: 0xB4B4, + 45629 - 44032: 0x87D2, + 45630 - 44032: 0x87D3, + 45631 - 44032: 0x87D4, + 45632 - 44032: 0x87D5, + 45633 - 44032: 0x87D6, + 45634 - 44032: 0x87D7, + 45635 - 44032: 0x87D8, + 45636 - 44032: 0x87D9, + 45637 - 44032: 0x87DA, + 45638 - 44032: 0x87DB, + 45639 - 44032: 0x87DC, + 45640 - 44032: 0x87DD, + 45641 - 44032: 0x87DE, + 45642 - 44032: 0x87DF, + 45643 - 44032: 0x87E0, + 45644 - 44032: 0x87E1, + 45645 - 44032: 0x87E2, + 45646 - 44032: 0x87E3, + 45647 - 44032: 0x87E4, + 45648 - 44032: 0x87E5, + 45649 - 44032: 0x87E6, + 45650 - 44032: 0x87E7, + 45651 - 44032: 0x87E8, + 45652 - 44032: 0x87E9, + 45653 - 44032: 0x87EA, + 45654 - 44032: 0x87EB, + 45655 - 44032: 0x87EC, + 45656 - 44032: 0xB4B5, + 45657 - 44032: 0x87ED, + 45658 - 44032: 0x87EE, + 45659 - 44032: 0x87EF, + 45660 - 44032: 0xB4B6, + 45661 - 44032: 0x87F0, + 45662 - 44032: 0x87F1, + 45663 - 44032: 0x87F2, + 45664 - 44032: 0xB4B7, + 45665 - 44032: 0x87F3, + 45666 - 44032: 0x87F4, + 45667 - 44032: 0x87F5, + 45668 - 44032: 0x87F6, + 45669 - 44032: 0x87F7, + 45670 - 44032: 0x87F8, + 45671 - 44032: 0x87F9, + 45672 - 44032: 0xB4B8, + 45673 - 44032: 0xB4B9, + 45674 - 44032: 0x87FA, + 45675 - 44032: 0x87FB, + 45676 - 44032: 0x87FC, + 45677 - 44032: 0x87FD, + 45678 - 44032: 0x87FE, + 45679 - 44032: 0x8841, + 45680 - 44032: 0x8842, + 45681 - 44032: 0x8843, + 45682 - 44032: 0x8844, + 45683 - 44032: 0x8845, + 45684 - 44032: 0xB4BA, + 45685 - 44032: 0xB4BB, + 45686 - 44032: 0x8846, + 45687 - 44032: 0x8847, + 45688 - 44032: 0x8848, + 45689 - 44032: 0x8849, + 45690 - 44032: 0x884A, + 45691 - 44032: 0x884B, + 45692 - 44032: 0xB4BC, + 45693 - 44032: 0x884C, + 45694 - 44032: 0x884D, + 45695 - 44032: 0x884E, + 45696 - 44032: 0x884F, + 45697 - 44032: 0x8850, + 45698 - 44032: 0x8851, + 45699 - 44032: 0x8852, + 45700 - 44032: 0xB4BD, + 45701 - 44032: 0xB4BE, + 45702 - 44032: 0x8853, + 45703 - 44032: 0x8854, + 45704 - 44032: 0x8855, + 45705 - 44032: 0xB4BF, + 45706 - 44032: 0x8856, + 45707 - 44032: 0x8857, + 45708 - 44032: 0x8858, + 45709 - 44032: 0x8859, + 45710 - 44032: 0x885A, + 45711 - 44032: 0x8861, + 45712 - 44032: 0xB4C0, + 45713 - 44032: 0xB4C1, + 45714 - 44032: 0x8862, + 45715 - 44032: 0x8863, + 45716 - 44032: 0xB4C2, + 45717 - 44032: 0x8864, + 45718 - 44032: 0x8865, + 45719 - 44032: 0x8866, + 45720 - 44032: 0xB4C3, + 45721 - 44032: 0xB4C4, + 45722 - 44032: 0xB4C5, + 45723 - 44032: 0x8867, + 45724 - 44032: 0x8868, + 45725 - 44032: 0x8869, + 45726 - 44032: 0x886A, + 45727 - 44032: 0x886B, + 45728 - 44032: 0xB4C6, + 45729 - 44032: 0xB4C7, + 45730 - 44032: 0x886C, + 45731 - 44032: 0xB4C8, + 45732 - 44032: 0x886D, + 45733 - 44032: 0xB4C9, + 45734 - 44032: 0xB4CA, + 45735 - 44032: 0x886E, + 45736 - 44032: 0x886F, + 45737 - 44032: 0x8870, + 45738 - 44032: 0xB4CB, + 45739 - 44032: 0x8871, + 45740 - 44032: 0xB4CC, + 45741 - 44032: 0x8872, + 45742 - 44032: 0x8873, + 45743 - 44032: 0x8874, + 45744 - 44032: 0xB4CD, + 45745 - 44032: 0x8875, + 45746 - 44032: 0x8876, + 45747 - 44032: 0x8877, + 45748 - 44032: 0xB4CE, + 45749 - 44032: 0x8878, + 45750 - 44032: 0x8879, + 45751 - 44032: 0x887A, + 45752 - 44032: 0x8881, + 45753 - 44032: 0x8882, + 45754 - 44032: 0x8883, + 45755 - 44032: 0x8884, + 45756 - 44032: 0x8885, + 45757 - 44032: 0x8886, + 45758 - 44032: 0x8887, + 45759 - 44032: 0x8888, + 45760 - 44032: 0x8889, + 45761 - 44032: 0x888A, + 45762 - 44032: 0x888B, + 45763 - 44032: 0x888C, + 45764 - 44032: 0x888D, + 45765 - 44032: 0x888E, + 45766 - 44032: 0x888F, + 45767 - 44032: 0x8890, + 45768 - 44032: 0xB4CF, + 45769 - 44032: 0xB4D0, + 45770 - 44032: 0x8891, + 45771 - 44032: 0x8892, + 45772 - 44032: 0xB4D1, + 45773 - 44032: 0x8893, + 45774 - 44032: 0x8894, + 45775 - 44032: 0x8895, + 45776 - 44032: 0xB4D2, + 45777 - 44032: 0x8896, + 45778 - 44032: 0xB4D3, + 45779 - 44032: 0x8897, + 45780 - 44032: 0x8898, + 45781 - 44032: 0x8899, + 45782 - 44032: 0x889A, + 45783 - 44032: 0x889B, + 45784 - 44032: 0xB4D4, + 45785 - 44032: 0xB4D5, + 45786 - 44032: 0x889C, + 45787 - 44032: 0xB4D6, + 45788 - 44032: 0x889D, + 45789 - 44032: 0xB4D7, + 45790 - 44032: 0x889E, + 45791 - 44032: 0x889F, + 45792 - 44032: 0x88A0, + 45793 - 44032: 0x88A1, + 45794 - 44032: 0xB4D8, + 45795 - 44032: 0x88A2, + 45796 - 44032: 0xB4D9, + 45797 - 44032: 0xB4DA, + 45798 - 44032: 0xB4DB, + 45799 - 44032: 0x88A3, + 45800 - 44032: 0xB4DC, + 45801 - 44032: 0x88A4, + 45802 - 44032: 0x88A5, + 45803 - 44032: 0xB4DD, + 45804 - 44032: 0xB4DE, + 45805 - 44032: 0xB4DF, + 45806 - 44032: 0xB4E0, + 45807 - 44032: 0xB4E1, + 45808 - 44032: 0x88A6, + 45809 - 44032: 0x88A7, + 45810 - 44032: 0x88A8, + 45811 - 44032: 0xB4E2, + 45812 - 44032: 0xB4E3, + 45813 - 44032: 0xB4E4, + 45814 - 44032: 0x88A9, + 45815 - 44032: 0xB4E5, + 45816 - 44032: 0xB4E6, + 45817 - 44032: 0xB4E7, + 45818 - 44032: 0xB4E8, + 45819 - 44032: 0xB4E9, + 45820 - 44032: 0x88AA, + 45821 - 44032: 0x88AB, + 45822 - 44032: 0x88AC, + 45823 - 44032: 0xB4EA, + 45824 - 44032: 0xB4EB, + 45825 - 44032: 0xB4EC, + 45826 - 44032: 0x88AD, + 45827 - 44032: 0x88AE, + 45828 - 44032: 0xB4ED, + 45829 - 44032: 0x88AF, + 45830 - 44032: 0x88B0, + 45831 - 44032: 0x88B1, + 45832 - 44032: 0xB4EE, + 45833 - 44032: 0x88B2, + 45834 - 44032: 0x88B3, + 45835 - 44032: 0x88B4, + 45836 - 44032: 0x88B5, + 45837 - 44032: 0x88B6, + 45838 - 44032: 0x88B7, + 45839 - 44032: 0x88B8, + 45840 - 44032: 0xB4EF, + 45841 - 44032: 0xB4F0, + 45842 - 44032: 0x88B9, + 45843 - 44032: 0xB4F1, + 45844 - 44032: 0xB4F2, + 45845 - 44032: 0xB4F3, + 45846 - 44032: 0x88BA, + 45847 - 44032: 0x88BB, + 45848 - 44032: 0x88BC, + 45849 - 44032: 0x88BD, + 45850 - 44032: 0x88BE, + 45851 - 44032: 0x88BF, + 45852 - 44032: 0xB4F4, + 45853 - 44032: 0x88C0, + 45854 - 44032: 0x88C1, + 45855 - 44032: 0x88C2, + 45856 - 44032: 0x88C3, + 45857 - 44032: 0x88C4, + 45858 - 44032: 0x88C5, + 45859 - 44032: 0x88C6, + 45860 - 44032: 0x88C7, + 45861 - 44032: 0x88C8, + 45862 - 44032: 0x88C9, + 45863 - 44032: 0x88CA, + 45864 - 44032: 0x88CB, + 45865 - 44032: 0x88CC, + 45866 - 44032: 0x88CD, + 45867 - 44032: 0x88CE, + 45868 - 44032: 0x88CF, + 45869 - 44032: 0x88D0, + 45870 - 44032: 0x88D1, + 45871 - 44032: 0x88D2, + 45872 - 44032: 0x88D3, + 45873 - 44032: 0x88D4, + 45874 - 44032: 0x88D5, + 45875 - 44032: 0x88D6, + 45876 - 44032: 0x88D7, + 45877 - 44032: 0x88D8, + 45878 - 44032: 0x88D9, + 45879 - 44032: 0x88DA, + 45880 - 44032: 0x88DB, + 45881 - 44032: 0x88DC, + 45882 - 44032: 0x88DD, + 45883 - 44032: 0x88DE, + 45884 - 44032: 0x88DF, + 45885 - 44032: 0x88E0, + 45886 - 44032: 0x88E1, + 45887 - 44032: 0x88E2, + 45888 - 44032: 0x88E3, + 45889 - 44032: 0x88E4, + 45890 - 44032: 0x88E5, + 45891 - 44032: 0x88E6, + 45892 - 44032: 0x88E7, + 45893 - 44032: 0x88E8, + 45894 - 44032: 0x88E9, + 45895 - 44032: 0x88EA, + 45896 - 44032: 0x88EB, + 45897 - 44032: 0x88EC, + 45898 - 44032: 0x88ED, + 45899 - 44032: 0x88EE, + 45900 - 44032: 0x88EF, + 45901 - 44032: 0x88F0, + 45902 - 44032: 0x88F1, + 45903 - 44032: 0x88F2, + 45904 - 44032: 0x88F3, + 45905 - 44032: 0x88F4, + 45906 - 44032: 0x88F5, + 45907 - 44032: 0x88F6, + 45908 - 44032: 0xB4F5, + 45909 - 44032: 0xB4F6, + 45910 - 44032: 0xB4F7, + 45911 - 44032: 0x88F7, + 45912 - 44032: 0xB4F8, + 45913 - 44032: 0x88F8, + 45914 - 44032: 0x88F9, + 45915 - 44032: 0xB4F9, + 45916 - 44032: 0xB4FA, + 45917 - 44032: 0x88FA, + 45918 - 44032: 0xB4FB, + 45919 - 44032: 0xB4FC, + 45920 - 44032: 0x88FB, + 45921 - 44032: 0x88FC, + 45922 - 44032: 0x88FD, + 45923 - 44032: 0x88FE, + 45924 - 44032: 0xB4FD, + 45925 - 44032: 0xB4FE, + 45926 - 44032: 0x8941, + 45927 - 44032: 0xB5A1, + 45928 - 44032: 0x8942, + 45929 - 44032: 0xB5A2, + 45930 - 44032: 0x8943, + 45931 - 44032: 0xB5A3, + 45932 - 44032: 0x8944, + 45933 - 44032: 0x8945, + 45934 - 44032: 0xB5A4, + 45935 - 44032: 0x8946, + 45936 - 44032: 0xB5A5, + 45937 - 44032: 0xB5A6, + 45938 - 44032: 0x8947, + 45939 - 44032: 0x8948, + 45940 - 44032: 0xB5A7, + 45941 - 44032: 0x8949, + 45942 - 44032: 0x894A, + 45943 - 44032: 0x894B, + 45944 - 44032: 0xB5A8, + 45945 - 44032: 0x894C, + 45946 - 44032: 0x894D, + 45947 - 44032: 0x894E, + 45948 - 44032: 0x894F, + 45949 - 44032: 0x8950, + 45950 - 44032: 0x8951, + 45951 - 44032: 0x8952, + 45952 - 44032: 0xB5A9, + 45953 - 44032: 0xB5AA, + 45954 - 44032: 0x8953, + 45955 - 44032: 0xB5AB, + 45956 - 44032: 0xB5AC, + 45957 - 44032: 0xB5AD, + 45958 - 44032: 0x8954, + 45959 - 44032: 0x8955, + 45960 - 44032: 0x8956, + 45961 - 44032: 0x8957, + 45962 - 44032: 0x8958, + 45963 - 44032: 0x8959, + 45964 - 44032: 0xB5AE, + 45965 - 44032: 0x895A, + 45966 - 44032: 0x8961, + 45967 - 44032: 0x8962, + 45968 - 44032: 0xB5AF, + 45969 - 44032: 0x8963, + 45970 - 44032: 0x8964, + 45971 - 44032: 0x8965, + 45972 - 44032: 0xB5B0, + 45973 - 44032: 0x8966, + 45974 - 44032: 0x8967, + 45975 - 44032: 0x8968, + 45976 - 44032: 0x8969, + 45977 - 44032: 0x896A, + 45978 - 44032: 0x896B, + 45979 - 44032: 0x896C, + 45980 - 44032: 0x896D, + 45981 - 44032: 0x896E, + 45982 - 44032: 0x896F, + 45983 - 44032: 0x8970, + 45984 - 44032: 0xB5B1, + 45985 - 44032: 0xB5B2, + 45986 - 44032: 0x8971, + 45987 - 44032: 0x8972, + 45988 - 44032: 0x8973, + 45989 - 44032: 0x8974, + 45990 - 44032: 0x8975, + 45991 - 44032: 0x8976, + 45992 - 44032: 0xB5B3, + 45993 - 44032: 0x8977, + 45994 - 44032: 0x8978, + 45995 - 44032: 0x8979, + 45996 - 44032: 0xB5B4, + 45997 - 44032: 0x897A, + 45998 - 44032: 0x8981, + 45999 - 44032: 0x8982, + 46000 - 44032: 0x8983, + 46001 - 44032: 0x8984, + 46002 - 44032: 0x8985, + 46003 - 44032: 0x8986, + 46004 - 44032: 0x8987, + 46005 - 44032: 0x8988, + 46006 - 44032: 0x8989, + 46007 - 44032: 0x898A, + 46008 - 44032: 0x898B, + 46009 - 44032: 0x898C, + 46010 - 44032: 0x898D, + 46011 - 44032: 0x898E, + 46012 - 44032: 0x898F, + 46013 - 44032: 0x8990, + 46014 - 44032: 0x8991, + 46015 - 44032: 0x8992, + 46016 - 44032: 0x8993, + 46017 - 44032: 0x8994, + 46018 - 44032: 0x8995, + 46019 - 44032: 0x8996, + 46020 - 44032: 0xB5B5, + 46021 - 44032: 0xB5B6, + 46022 - 44032: 0x8997, + 46023 - 44032: 0x8998, + 46024 - 44032: 0xB5B7, + 46025 - 44032: 0x8999, + 46026 - 44032: 0x899A, + 46027 - 44032: 0xB5B8, + 46028 - 44032: 0xB5B9, + 46029 - 44032: 0x899B, + 46030 - 44032: 0xB5BA, + 46031 - 44032: 0x899C, + 46032 - 44032: 0xB5BB, + 46033 - 44032: 0x899D, + 46034 - 44032: 0x899E, + 46035 - 44032: 0x899F, + 46036 - 44032: 0xB5BC, + 46037 - 44032: 0xB5BD, + 46038 - 44032: 0x89A0, + 46039 - 44032: 0xB5BE, + 46040 - 44032: 0x89A1, + 46041 - 44032: 0xB5BF, + 46042 - 44032: 0x89A2, + 46043 - 44032: 0xB5C0, + 46044 - 44032: 0x89A3, + 46045 - 44032: 0xB5C1, + 46046 - 44032: 0x89A4, + 46047 - 44032: 0x89A5, + 46048 - 44032: 0xB5C2, + 46049 - 44032: 0x89A6, + 46050 - 44032: 0x89A7, + 46051 - 44032: 0x89A8, + 46052 - 44032: 0xB5C3, + 46053 - 44032: 0x89A9, + 46054 - 44032: 0x89AA, + 46055 - 44032: 0x89AB, + 46056 - 44032: 0xB5C4, + 46057 - 44032: 0x89AC, + 46058 - 44032: 0x89AD, + 46059 - 44032: 0x89AE, + 46060 - 44032: 0x89AF, + 46061 - 44032: 0x89B0, + 46062 - 44032: 0x89B1, + 46063 - 44032: 0x89B2, + 46064 - 44032: 0x89B3, + 46065 - 44032: 0x89B4, + 46066 - 44032: 0x89B5, + 46067 - 44032: 0x89B6, + 46068 - 44032: 0x89B7, + 46069 - 44032: 0x89B8, + 46070 - 44032: 0x89B9, + 46071 - 44032: 0x89BA, + 46072 - 44032: 0x89BB, + 46073 - 44032: 0x89BC, + 46074 - 44032: 0x89BD, + 46075 - 44032: 0x89BE, + 46076 - 44032: 0xB5C5, + 46077 - 44032: 0x89BF, + 46078 - 44032: 0x89C0, + 46079 - 44032: 0x89C1, + 46080 - 44032: 0x89C2, + 46081 - 44032: 0x89C3, + 46082 - 44032: 0x89C4, + 46083 - 44032: 0x89C5, + 46084 - 44032: 0x89C6, + 46085 - 44032: 0x89C7, + 46086 - 44032: 0x89C8, + 46087 - 44032: 0x89C9, + 46088 - 44032: 0x89CA, + 46089 - 44032: 0x89CB, + 46090 - 44032: 0x89CC, + 46091 - 44032: 0x89CD, + 46092 - 44032: 0x89CE, + 46093 - 44032: 0x89CF, + 46094 - 44032: 0x89D0, + 46095 - 44032: 0x89D1, + 46096 - 44032: 0xB5C6, + 46097 - 44032: 0x89D2, + 46098 - 44032: 0x89D3, + 46099 - 44032: 0x89D4, + 46100 - 44032: 0x89D5, + 46101 - 44032: 0x89D6, + 46102 - 44032: 0x89D7, + 46103 - 44032: 0x89D8, + 46104 - 44032: 0xB5C7, + 46105 - 44032: 0x89D9, + 46106 - 44032: 0x89DA, + 46107 - 44032: 0x89DB, + 46108 - 44032: 0xB5C8, + 46109 - 44032: 0x89DC, + 46110 - 44032: 0x89DD, + 46111 - 44032: 0x89DE, + 46112 - 44032: 0xB5C9, + 46113 - 44032: 0x89DF, + 46114 - 44032: 0x89E0, + 46115 - 44032: 0x89E1, + 46116 - 44032: 0x89E2, + 46117 - 44032: 0x89E3, + 46118 - 44032: 0x89E4, + 46119 - 44032: 0x89E5, + 46120 - 44032: 0xB5CA, + 46121 - 44032: 0xB5CB, + 46122 - 44032: 0x89E6, + 46123 - 44032: 0xB5CC, + 46124 - 44032: 0x89E7, + 46125 - 44032: 0x89E8, + 46126 - 44032: 0x89E9, + 46127 - 44032: 0x89EA, + 46128 - 44032: 0x89EB, + 46129 - 44032: 0x89EC, + 46130 - 44032: 0x89ED, + 46131 - 44032: 0x89EE, + 46132 - 44032: 0xB5CD, + 46133 - 44032: 0x89EF, + 46134 - 44032: 0x89F0, + 46135 - 44032: 0x89F1, + 46136 - 44032: 0x89F2, + 46137 - 44032: 0x89F3, + 46138 - 44032: 0x89F4, + 46139 - 44032: 0x89F5, + 46140 - 44032: 0x89F6, + 46141 - 44032: 0x89F7, + 46142 - 44032: 0x89F8, + 46143 - 44032: 0x89F9, + 46144 - 44032: 0x89FA, + 46145 - 44032: 0x89FB, + 46146 - 44032: 0x89FC, + 46147 - 44032: 0x89FD, + 46148 - 44032: 0x89FE, + 46149 - 44032: 0x8A41, + 46150 - 44032: 0x8A42, + 46151 - 44032: 0x8A43, + 46152 - 44032: 0x8A44, + 46153 - 44032: 0x8A45, + 46154 - 44032: 0x8A46, + 46155 - 44032: 0x8A47, + 46156 - 44032: 0x8A48, + 46157 - 44032: 0x8A49, + 46158 - 44032: 0x8A4A, + 46159 - 44032: 0x8A4B, + 46160 - 44032: 0xB5CE, + 46161 - 44032: 0xB5CF, + 46162 - 44032: 0x8A4C, + 46163 - 44032: 0x8A4D, + 46164 - 44032: 0xB5D0, + 46165 - 44032: 0x8A4E, + 46166 - 44032: 0x8A4F, + 46167 - 44032: 0x8A50, + 46168 - 44032: 0xB5D1, + 46169 - 44032: 0x8A51, + 46170 - 44032: 0x8A52, + 46171 - 44032: 0x8A53, + 46172 - 44032: 0x8A54, + 46173 - 44032: 0x8A55, + 46174 - 44032: 0x8A56, + 46175 - 44032: 0x8A57, + 46176 - 44032: 0xB5D2, + 46177 - 44032: 0xB5D3, + 46178 - 44032: 0x8A58, + 46179 - 44032: 0xB5D4, + 46180 - 44032: 0x8A59, + 46181 - 44032: 0xB5D5, + 46182 - 44032: 0x8A5A, + 46183 - 44032: 0x8A61, + 46184 - 44032: 0x8A62, + 46185 - 44032: 0x8A63, + 46186 - 44032: 0x8A64, + 46187 - 44032: 0x8A65, + 46188 - 44032: 0xB5D6, + 46189 - 44032: 0x8A66, + 46190 - 44032: 0x8A67, + 46191 - 44032: 0x8A68, + 46192 - 44032: 0x8A69, + 46193 - 44032: 0x8A6A, + 46194 - 44032: 0x8A6B, + 46195 - 44032: 0x8A6C, + 46196 - 44032: 0x8A6D, + 46197 - 44032: 0x8A6E, + 46198 - 44032: 0x8A6F, + 46199 - 44032: 0x8A70, + 46200 - 44032: 0x8A71, + 46201 - 44032: 0x8A72, + 46202 - 44032: 0x8A73, + 46203 - 44032: 0x8A74, + 46204 - 44032: 0x8A75, + 46205 - 44032: 0x8A76, + 46206 - 44032: 0x8A77, + 46207 - 44032: 0x8A78, + 46208 - 44032: 0xB5D7, + 46209 - 44032: 0x8A79, + 46210 - 44032: 0x8A7A, + 46211 - 44032: 0x8A81, + 46212 - 44032: 0x8A82, + 46213 - 44032: 0x8A83, + 46214 - 44032: 0x8A84, + 46215 - 44032: 0x8A85, + 46216 - 44032: 0xB5D8, + 46217 - 44032: 0x8A86, + 46218 - 44032: 0x8A87, + 46219 - 44032: 0x8A88, + 46220 - 44032: 0x8A89, + 46221 - 44032: 0x8A8A, + 46222 - 44032: 0x8A8B, + 46223 - 44032: 0x8A8C, + 46224 - 44032: 0x8A8D, + 46225 - 44032: 0x8A8E, + 46226 - 44032: 0x8A8F, + 46227 - 44032: 0x8A90, + 46228 - 44032: 0x8A91, + 46229 - 44032: 0x8A92, + 46230 - 44032: 0x8A93, + 46231 - 44032: 0x8A94, + 46232 - 44032: 0x8A95, + 46233 - 44032: 0x8A96, + 46234 - 44032: 0x8A97, + 46235 - 44032: 0x8A98, + 46236 - 44032: 0x8A99, + 46237 - 44032: 0xB5D9, + 46238 - 44032: 0x8A9A, + 46239 - 44032: 0x8A9B, + 46240 - 44032: 0x8A9C, + 46241 - 44032: 0x8A9D, + 46242 - 44032: 0x8A9E, + 46243 - 44032: 0x8A9F, + 46244 - 44032: 0xB5DA, + 46245 - 44032: 0x8AA0, + 46246 - 44032: 0x8AA1, + 46247 - 44032: 0x8AA2, + 46248 - 44032: 0xB5DB, + 46249 - 44032: 0x8AA3, + 46250 - 44032: 0x8AA4, + 46251 - 44032: 0x8AA5, + 46252 - 44032: 0xB5DC, + 46253 - 44032: 0x8AA6, + 46254 - 44032: 0x8AA7, + 46255 - 44032: 0x8AA8, + 46256 - 44032: 0x8AA9, + 46257 - 44032: 0x8AAA, + 46258 - 44032: 0x8AAB, + 46259 - 44032: 0x8AAC, + 46260 - 44032: 0x8AAD, + 46261 - 44032: 0xB5DD, + 46262 - 44032: 0x8AAE, + 46263 - 44032: 0xB5DE, + 46264 - 44032: 0x8AAF, + 46265 - 44032: 0xB5DF, + 46266 - 44032: 0x8AB0, + 46267 - 44032: 0x8AB1, + 46268 - 44032: 0x8AB2, + 46269 - 44032: 0x8AB3, + 46270 - 44032: 0x8AB4, + 46271 - 44032: 0x8AB5, + 46272 - 44032: 0xB5E0, + 46273 - 44032: 0x8AB6, + 46274 - 44032: 0x8AB7, + 46275 - 44032: 0x8AB8, + 46276 - 44032: 0xB5E1, + 46277 - 44032: 0x8AB9, + 46278 - 44032: 0x8ABA, + 46279 - 44032: 0x8ABB, + 46280 - 44032: 0xB5E2, + 46281 - 44032: 0x8ABC, + 46282 - 44032: 0x8ABD, + 46283 - 44032: 0x8ABE, + 46284 - 44032: 0x8ABF, + 46285 - 44032: 0x8AC0, + 46286 - 44032: 0x8AC1, + 46287 - 44032: 0x8AC2, + 46288 - 44032: 0xB5E3, + 46289 - 44032: 0x8AC3, + 46290 - 44032: 0x8AC4, + 46291 - 44032: 0x8AC5, + 46292 - 44032: 0x8AC6, + 46293 - 44032: 0xB5E4, + 46294 - 44032: 0x8AC7, + 46295 - 44032: 0x8AC8, + 46296 - 44032: 0x8AC9, + 46297 - 44032: 0x8ACA, + 46298 - 44032: 0x8ACB, + 46299 - 44032: 0x8ACC, + 46300 - 44032: 0xB5E5, + 46301 - 44032: 0xB5E6, + 46302 - 44032: 0x8ACD, + 46303 - 44032: 0x8ACE, + 46304 - 44032: 0xB5E7, + 46305 - 44032: 0x8ACF, + 46306 - 44032: 0x8AD0, + 46307 - 44032: 0xB5E8, + 46308 - 44032: 0xB5E9, + 46309 - 44032: 0x8AD1, + 46310 - 44032: 0xB5EA, + 46311 - 44032: 0x8AD2, + 46312 - 44032: 0x8AD3, + 46313 - 44032: 0x8AD4, + 46314 - 44032: 0x8AD5, + 46315 - 44032: 0x8AD6, + 46316 - 44032: 0xB5EB, + 46317 - 44032: 0xB5EC, + 46318 - 44032: 0x8AD7, + 46319 - 44032: 0xB5ED, + 46320 - 44032: 0x8AD8, + 46321 - 44032: 0xB5EE, + 46322 - 44032: 0x8AD9, + 46323 - 44032: 0x8ADA, + 46324 - 44032: 0x8ADB, + 46325 - 44032: 0x8ADC, + 46326 - 44032: 0x8ADD, + 46327 - 44032: 0x8ADE, + 46328 - 44032: 0xB5EF, + 46329 - 44032: 0x8ADF, + 46330 - 44032: 0x8AE0, + 46331 - 44032: 0x8AE1, + 46332 - 44032: 0x8AE2, + 46333 - 44032: 0x8AE3, + 46334 - 44032: 0x8AE4, + 46335 - 44032: 0x8AE5, + 46336 - 44032: 0x8AE6, + 46337 - 44032: 0x8AE7, + 46338 - 44032: 0x8AE8, + 46339 - 44032: 0x8AE9, + 46340 - 44032: 0x8AEA, + 46341 - 44032: 0x8AEB, + 46342 - 44032: 0x8AEC, + 46343 - 44032: 0x8AED, + 46344 - 44032: 0x8AEE, + 46345 - 44032: 0x8AEF, + 46346 - 44032: 0x8AF0, + 46347 - 44032: 0x8AF1, + 46348 - 44032: 0x8AF2, + 46349 - 44032: 0x8AF3, + 46350 - 44032: 0x8AF4, + 46351 - 44032: 0x8AF5, + 46352 - 44032: 0x8AF6, + 46353 - 44032: 0x8AF7, + 46354 - 44032: 0x8AF8, + 46355 - 44032: 0x8AF9, + 46356 - 44032: 0xB5F0, + 46357 - 44032: 0xB5F1, + 46358 - 44032: 0x8AFA, + 46359 - 44032: 0x8AFB, + 46360 - 44032: 0xB5F2, + 46361 - 44032: 0x8AFC, + 46362 - 44032: 0x8AFD, + 46363 - 44032: 0xB5F3, + 46364 - 44032: 0xB5F4, + 46365 - 44032: 0x8AFE, + 46366 - 44032: 0x8B41, + 46367 - 44032: 0x8B42, + 46368 - 44032: 0x8B43, + 46369 - 44032: 0x8B44, + 46370 - 44032: 0x8B45, + 46371 - 44032: 0x8B46, + 46372 - 44032: 0xB5F5, + 46373 - 44032: 0xB5F6, + 46374 - 44032: 0x8B47, + 46375 - 44032: 0xB5F7, + 46376 - 44032: 0xB5F8, + 46377 - 44032: 0xB5F9, + 46378 - 44032: 0xB5FA, + 46379 - 44032: 0x8B48, + 46380 - 44032: 0x8B49, + 46381 - 44032: 0x8B4A, + 46382 - 44032: 0x8B4B, + 46383 - 44032: 0x8B4C, + 46384 - 44032: 0xB5FB, + 46385 - 44032: 0xB5FC, + 46386 - 44032: 0x8B4D, + 46387 - 44032: 0x8B4E, + 46388 - 44032: 0xB5FD, + 46389 - 44032: 0x8B4F, + 46390 - 44032: 0x8B50, + 46391 - 44032: 0x8B51, + 46392 - 44032: 0xB5FE, + 46393 - 44032: 0x8B52, + 46394 - 44032: 0x8B53, + 46395 - 44032: 0x8B54, + 46396 - 44032: 0x8B55, + 46397 - 44032: 0x8B56, + 46398 - 44032: 0x8B57, + 46399 - 44032: 0x8B58, + 46400 - 44032: 0xB6A1, + 46401 - 44032: 0xB6A2, + 46402 - 44032: 0x8B59, + 46403 - 44032: 0xB6A3, + 46404 - 44032: 0xB6A4, + 46405 - 44032: 0xB6A5, + 46406 - 44032: 0x8B5A, + 46407 - 44032: 0x8B61, + 46408 - 44032: 0x8B62, + 46409 - 44032: 0x8B63, + 46410 - 44032: 0x8B64, + 46411 - 44032: 0xB6A6, + 46412 - 44032: 0xB6A7, + 46413 - 44032: 0xB6A8, + 46414 - 44032: 0x8B65, + 46415 - 44032: 0x8B66, + 46416 - 44032: 0xB6A9, + 46417 - 44032: 0x8B67, + 46418 - 44032: 0x8B68, + 46419 - 44032: 0x8B69, + 46420 - 44032: 0xB6AA, + 46421 - 44032: 0x8B6A, + 46422 - 44032: 0x8B6B, + 46423 - 44032: 0x8B6C, + 46424 - 44032: 0x8B6D, + 46425 - 44032: 0x8B6E, + 46426 - 44032: 0x8B6F, + 46427 - 44032: 0x8B70, + 46428 - 44032: 0xB6AB, + 46429 - 44032: 0xB6AC, + 46430 - 44032: 0x8B71, + 46431 - 44032: 0xB6AD, + 46432 - 44032: 0xB6AE, + 46433 - 44032: 0xB6AF, + 46434 - 44032: 0x8B72, + 46435 - 44032: 0x8B73, + 46436 - 44032: 0x8B74, + 46437 - 44032: 0x8B75, + 46438 - 44032: 0x8B76, + 46439 - 44032: 0x8B77, + 46440 - 44032: 0x8B78, + 46441 - 44032: 0x8B79, + 46442 - 44032: 0x8B7A, + 46443 - 44032: 0x8B81, + 46444 - 44032: 0x8B82, + 46445 - 44032: 0x8B83, + 46446 - 44032: 0x8B84, + 46447 - 44032: 0x8B85, + 46448 - 44032: 0x8B86, + 46449 - 44032: 0x8B87, + 46450 - 44032: 0x8B88, + 46451 - 44032: 0x8B89, + 46452 - 44032: 0x8B8A, + 46453 - 44032: 0x8B8B, + 46454 - 44032: 0x8B8C, + 46455 - 44032: 0x8B8D, + 46456 - 44032: 0x8B8E, + 46457 - 44032: 0x8B8F, + 46458 - 44032: 0x8B90, + 46459 - 44032: 0x8B91, + 46460 - 44032: 0x8B92, + 46461 - 44032: 0x8B93, + 46462 - 44032: 0x8B94, + 46463 - 44032: 0x8B95, + 46464 - 44032: 0x8B96, + 46465 - 44032: 0x8B97, + 46466 - 44032: 0x8B98, + 46467 - 44032: 0x8B99, + 46468 - 44032: 0x8B9A, + 46469 - 44032: 0x8B9B, + 46470 - 44032: 0x8B9C, + 46471 - 44032: 0x8B9D, + 46472 - 44032: 0x8B9E, + 46473 - 44032: 0x8B9F, + 46474 - 44032: 0x8BA0, + 46475 - 44032: 0x8BA1, + 46476 - 44032: 0x8BA2, + 46477 - 44032: 0x8BA3, + 46478 - 44032: 0x8BA4, + 46479 - 44032: 0x8BA5, + 46480 - 44032: 0x8BA6, + 46481 - 44032: 0x8BA7, + 46482 - 44032: 0x8BA8, + 46483 - 44032: 0x8BA9, + 46484 - 44032: 0x8BAA, + 46485 - 44032: 0x8BAB, + 46486 - 44032: 0x8BAC, + 46487 - 44032: 0x8BAD, + 46488 - 44032: 0x8BAE, + 46489 - 44032: 0x8BAF, + 46490 - 44032: 0x8BB0, + 46491 - 44032: 0x8BB1, + 46492 - 44032: 0x8BB2, + 46493 - 44032: 0x8BB3, + 46494 - 44032: 0x8BB4, + 46495 - 44032: 0x8BB5, + 46496 - 44032: 0xB6B0, + 46497 - 44032: 0xB6B1, + 46498 - 44032: 0x8BB6, + 46499 - 44032: 0x8BB7, + 46500 - 44032: 0xB6B2, + 46501 - 44032: 0x8BB8, + 46502 - 44032: 0x8BB9, + 46503 - 44032: 0x8BBA, + 46504 - 44032: 0xB6B3, + 46505 - 44032: 0x8BBB, + 46506 - 44032: 0xB6B4, + 46507 - 44032: 0xB6B5, + 46508 - 44032: 0x8BBC, + 46509 - 44032: 0x8BBD, + 46510 - 44032: 0x8BBE, + 46511 - 44032: 0x8BBF, + 46512 - 44032: 0xB6B6, + 46513 - 44032: 0xB6B7, + 46514 - 44032: 0x8BC0, + 46515 - 44032: 0xB6B8, + 46516 - 44032: 0xB6B9, + 46517 - 44032: 0xB6BA, + 46518 - 44032: 0x8BC1, + 46519 - 44032: 0x8BC2, + 46520 - 44032: 0x8BC3, + 46521 - 44032: 0x8BC4, + 46522 - 44032: 0x8BC5, + 46523 - 44032: 0xB6BB, + 46524 - 44032: 0xB6BC, + 46525 - 44032: 0xB6BD, + 46526 - 44032: 0x8BC6, + 46527 - 44032: 0x8BC7, + 46528 - 44032: 0xB6BE, + 46529 - 44032: 0x8BC8, + 46530 - 44032: 0x8BC9, + 46531 - 44032: 0x8BCA, + 46532 - 44032: 0xB6BF, + 46533 - 44032: 0x8BCB, + 46534 - 44032: 0x8BCC, + 46535 - 44032: 0x8BCD, + 46536 - 44032: 0x8BCE, + 46537 - 44032: 0x8BCF, + 46538 - 44032: 0x8BD0, + 46539 - 44032: 0x8BD1, + 46540 - 44032: 0xB6C0, + 46541 - 44032: 0xB6C1, + 46542 - 44032: 0x8BD2, + 46543 - 44032: 0xB6C2, + 46544 - 44032: 0xB6C3, + 46545 - 44032: 0xB6C4, + 46546 - 44032: 0x8BD3, + 46547 - 44032: 0x8BD4, + 46548 - 44032: 0x8BD5, + 46549 - 44032: 0x8BD6, + 46550 - 44032: 0x8BD7, + 46551 - 44032: 0x8BD8, + 46552 - 44032: 0xB6C5, + 46553 - 44032: 0x8BD9, + 46554 - 44032: 0x8BDA, + 46555 - 44032: 0x8BDB, + 46556 - 44032: 0x8BDC, + 46557 - 44032: 0x8BDD, + 46558 - 44032: 0x8BDE, + 46559 - 44032: 0x8BDF, + 46560 - 44032: 0x8BE0, + 46561 - 44032: 0x8BE1, + 46562 - 44032: 0x8BE2, + 46563 - 44032: 0x8BE3, + 46564 - 44032: 0x8BE4, + 46565 - 44032: 0x8BE5, + 46566 - 44032: 0x8BE6, + 46567 - 44032: 0x8BE7, + 46568 - 44032: 0x8BE8, + 46569 - 44032: 0x8BE9, + 46570 - 44032: 0x8BEA, + 46571 - 44032: 0x8BEB, + 46572 - 44032: 0xB6C6, + 46573 - 44032: 0x8BEC, + 46574 - 44032: 0x8BED, + 46575 - 44032: 0x8BEE, + 46576 - 44032: 0x8BEF, + 46577 - 44032: 0x8BF0, + 46578 - 44032: 0x8BF1, + 46579 - 44032: 0x8BF2, + 46580 - 44032: 0x8BF3, + 46581 - 44032: 0x8BF4, + 46582 - 44032: 0x8BF5, + 46583 - 44032: 0x8BF6, + 46584 - 44032: 0x8BF7, + 46585 - 44032: 0x8BF8, + 46586 - 44032: 0x8BF9, + 46587 - 44032: 0x8BFA, + 46588 - 44032: 0x8BFB, + 46589 - 44032: 0x8BFC, + 46590 - 44032: 0x8BFD, + 46591 - 44032: 0x8BFE, + 46592 - 44032: 0x8C41, + 46593 - 44032: 0x8C42, + 46594 - 44032: 0x8C43, + 46595 - 44032: 0x8C44, + 46596 - 44032: 0x8C45, + 46597 - 44032: 0x8C46, + 46598 - 44032: 0x8C47, + 46599 - 44032: 0x8C48, + 46600 - 44032: 0x8C49, + 46601 - 44032: 0x8C4A, + 46602 - 44032: 0x8C4B, + 46603 - 44032: 0x8C4C, + 46604 - 44032: 0x8C4D, + 46605 - 44032: 0x8C4E, + 46606 - 44032: 0x8C4F, + 46607 - 44032: 0x8C50, + 46608 - 44032: 0xB6C7, + 46609 - 44032: 0xB6C8, + 46610 - 44032: 0x8C51, + 46611 - 44032: 0x8C52, + 46612 - 44032: 0xB6C9, + 46613 - 44032: 0x8C53, + 46614 - 44032: 0x8C54, + 46615 - 44032: 0x8C55, + 46616 - 44032: 0xB6CA, + 46617 - 44032: 0x8C56, + 46618 - 44032: 0x8C57, + 46619 - 44032: 0x8C58, + 46620 - 44032: 0x8C59, + 46621 - 44032: 0x8C5A, + 46622 - 44032: 0x8C61, + 46623 - 44032: 0x8C62, + 46624 - 44032: 0x8C63, + 46625 - 44032: 0x8C64, + 46626 - 44032: 0x8C65, + 46627 - 44032: 0x8C66, + 46628 - 44032: 0x8C67, + 46629 - 44032: 0xB6CB, + 46630 - 44032: 0x8C68, + 46631 - 44032: 0x8C69, + 46632 - 44032: 0x8C6A, + 46633 - 44032: 0x8C6B, + 46634 - 44032: 0x8C6C, + 46635 - 44032: 0x8C6D, + 46636 - 44032: 0xB6CC, + 46637 - 44032: 0x8C6E, + 46638 - 44032: 0x8C6F, + 46639 - 44032: 0x8C70, + 46640 - 44032: 0x8C71, + 46641 - 44032: 0x8C72, + 46642 - 44032: 0x8C73, + 46643 - 44032: 0x8C74, + 46644 - 44032: 0xB6CD, + 46645 - 44032: 0x8C75, + 46646 - 44032: 0x8C76, + 46647 - 44032: 0x8C77, + 46648 - 44032: 0x8C78, + 46649 - 44032: 0x8C79, + 46650 - 44032: 0x8C7A, + 46651 - 44032: 0x8C81, + 46652 - 44032: 0x8C82, + 46653 - 44032: 0x8C83, + 46654 - 44032: 0x8C84, + 46655 - 44032: 0x8C85, + 46656 - 44032: 0x8C86, + 46657 - 44032: 0x8C87, + 46658 - 44032: 0x8C88, + 46659 - 44032: 0x8C89, + 46660 - 44032: 0x8C8A, + 46661 - 44032: 0x8C8B, + 46662 - 44032: 0x8C8C, + 46663 - 44032: 0x8C8D, + 46664 - 44032: 0xB6CE, + 46665 - 44032: 0x8C8E, + 46666 - 44032: 0x8C8F, + 46667 - 44032: 0x8C90, + 46668 - 44032: 0x8C91, + 46669 - 44032: 0x8C92, + 46670 - 44032: 0x8C93, + 46671 - 44032: 0x8C94, + 46672 - 44032: 0x8C95, + 46673 - 44032: 0x8C96, + 46674 - 44032: 0x8C97, + 46675 - 44032: 0x8C98, + 46676 - 44032: 0x8C99, + 46677 - 44032: 0x8C9A, + 46678 - 44032: 0x8C9B, + 46679 - 44032: 0x8C9C, + 46680 - 44032: 0x8C9D, + 46681 - 44032: 0x8C9E, + 46682 - 44032: 0x8C9F, + 46683 - 44032: 0x8CA0, + 46684 - 44032: 0x8CA1, + 46685 - 44032: 0x8CA2, + 46686 - 44032: 0x8CA3, + 46687 - 44032: 0x8CA4, + 46688 - 44032: 0x8CA5, + 46689 - 44032: 0x8CA6, + 46690 - 44032: 0x8CA7, + 46691 - 44032: 0x8CA8, + 46692 - 44032: 0xB6CF, + 46693 - 44032: 0x8CA9, + 46694 - 44032: 0x8CAA, + 46695 - 44032: 0x8CAB, + 46696 - 44032: 0xB6D0, + 46697 - 44032: 0x8CAC, + 46698 - 44032: 0x8CAD, + 46699 - 44032: 0x8CAE, + 46700 - 44032: 0x8CAF, + 46701 - 44032: 0x8CB0, + 46702 - 44032: 0x8CB1, + 46703 - 44032: 0x8CB2, + 46704 - 44032: 0x8CB3, + 46705 - 44032: 0x8CB4, + 46706 - 44032: 0x8CB5, + 46707 - 44032: 0x8CB6, + 46708 - 44032: 0x8CB7, + 46709 - 44032: 0x8CB8, + 46710 - 44032: 0x8CB9, + 46711 - 44032: 0x8CBA, + 46712 - 44032: 0x8CBB, + 46713 - 44032: 0x8CBC, + 46714 - 44032: 0x8CBD, + 46715 - 44032: 0x8CBE, + 46716 - 44032: 0x8CBF, + 46717 - 44032: 0x8CC0, + 46718 - 44032: 0x8CC1, + 46719 - 44032: 0x8CC2, + 46720 - 44032: 0x8CC3, + 46721 - 44032: 0x8CC4, + 46722 - 44032: 0x8CC5, + 46723 - 44032: 0x8CC6, + 46724 - 44032: 0x8CC7, + 46725 - 44032: 0x8CC8, + 46726 - 44032: 0x8CC9, + 46727 - 44032: 0x8CCA, + 46728 - 44032: 0x8CCB, + 46729 - 44032: 0x8CCC, + 46730 - 44032: 0x8CCD, + 46731 - 44032: 0x8CCE, + 46732 - 44032: 0x8CCF, + 46733 - 44032: 0x8CD0, + 46734 - 44032: 0x8CD1, + 46735 - 44032: 0x8CD2, + 46736 - 44032: 0x8CD3, + 46737 - 44032: 0x8CD4, + 46738 - 44032: 0x8CD5, + 46739 - 44032: 0x8CD6, + 46740 - 44032: 0x8CD7, + 46741 - 44032: 0x8CD8, + 46742 - 44032: 0x8CD9, + 46743 - 44032: 0x8CDA, + 46744 - 44032: 0x8CDB, + 46745 - 44032: 0x8CDC, + 46746 - 44032: 0x8CDD, + 46747 - 44032: 0x8CDE, + 46748 - 44032: 0xB6D1, + 46749 - 44032: 0xB6D2, + 46750 - 44032: 0x8CDF, + 46751 - 44032: 0x8CE0, + 46752 - 44032: 0xB6D3, + 46753 - 44032: 0x8CE1, + 46754 - 44032: 0x8CE2, + 46755 - 44032: 0x8CE3, + 46756 - 44032: 0xB6D4, + 46757 - 44032: 0x8CE4, + 46758 - 44032: 0x8CE5, + 46759 - 44032: 0x8CE6, + 46760 - 44032: 0x8CE7, + 46761 - 44032: 0x8CE8, + 46762 - 44032: 0x8CE9, + 46763 - 44032: 0xB6D5, + 46764 - 44032: 0xB6D6, + 46765 - 44032: 0x8CEA, + 46766 - 44032: 0x8CEB, + 46767 - 44032: 0x8CEC, + 46768 - 44032: 0x8CED, + 46769 - 44032: 0xB6D7, + 46770 - 44032: 0x8CEE, + 46771 - 44032: 0x8CEF, + 46772 - 44032: 0x8CF0, + 46773 - 44032: 0x8CF1, + 46774 - 44032: 0x8CF2, + 46775 - 44032: 0x8CF3, + 46776 - 44032: 0x8CF4, + 46777 - 44032: 0x8CF5, + 46778 - 44032: 0x8CF6, + 46779 - 44032: 0x8CF7, + 46780 - 44032: 0x8CF8, + 46781 - 44032: 0x8CF9, + 46782 - 44032: 0x8CFA, + 46783 - 44032: 0x8CFB, + 46784 - 44032: 0x8CFC, + 46785 - 44032: 0x8CFD, + 46786 - 44032: 0x8CFE, + 46787 - 44032: 0x8D41, + 46788 - 44032: 0x8D42, + 46789 - 44032: 0x8D43, + 46790 - 44032: 0x8D44, + 46791 - 44032: 0x8D45, + 46792 - 44032: 0x8D46, + 46793 - 44032: 0x8D47, + 46794 - 44032: 0x8D48, + 46795 - 44032: 0x8D49, + 46796 - 44032: 0x8D4A, + 46797 - 44032: 0x8D4B, + 46798 - 44032: 0x8D4C, + 46799 - 44032: 0x8D4D, + 46800 - 44032: 0x8D4E, + 46801 - 44032: 0x8D4F, + 46802 - 44032: 0x8D50, + 46803 - 44032: 0x8D51, + 46804 - 44032: 0xB6D8, + 46805 - 44032: 0x8D52, + 46806 - 44032: 0x8D53, + 46807 - 44032: 0x8D54, + 46808 - 44032: 0x8D55, + 46809 - 44032: 0x8D56, + 46810 - 44032: 0x8D57, + 46811 - 44032: 0x8D58, + 46812 - 44032: 0x8D59, + 46813 - 44032: 0x8D5A, + 46814 - 44032: 0x8D61, + 46815 - 44032: 0x8D62, + 46816 - 44032: 0x8D63, + 46817 - 44032: 0x8D64, + 46818 - 44032: 0x8D65, + 46819 - 44032: 0x8D66, + 46820 - 44032: 0x8D67, + 46821 - 44032: 0x8D68, + 46822 - 44032: 0x8D69, + 46823 - 44032: 0x8D6A, + 46824 - 44032: 0x8D6B, + 46825 - 44032: 0x8D6C, + 46826 - 44032: 0x8D6D, + 46827 - 44032: 0x8D6E, + 46828 - 44032: 0x8D6F, + 46829 - 44032: 0x8D70, + 46830 - 44032: 0x8D71, + 46831 - 44032: 0x8D72, + 46832 - 44032: 0xB6D9, + 46833 - 44032: 0x8D73, + 46834 - 44032: 0x8D74, + 46835 - 44032: 0x8D75, + 46836 - 44032: 0xB6DA, + 46837 - 44032: 0x8D76, + 46838 - 44032: 0x8D77, + 46839 - 44032: 0x8D78, + 46840 - 44032: 0xB6DB, + 46841 - 44032: 0x8D79, + 46842 - 44032: 0x8D7A, + 46843 - 44032: 0x8D81, + 46844 - 44032: 0x8D82, + 46845 - 44032: 0x8D83, + 46846 - 44032: 0x8D84, + 46847 - 44032: 0x8D85, + 46848 - 44032: 0xB6DC, + 46849 - 44032: 0xB6DD, + 46850 - 44032: 0x8D86, + 46851 - 44032: 0x8D87, + 46852 - 44032: 0x8D88, + 46853 - 44032: 0xB6DE, + 46854 - 44032: 0x8D89, + 46855 - 44032: 0x8D8A, + 46856 - 44032: 0x8D8B, + 46857 - 44032: 0x8D8C, + 46858 - 44032: 0x8D8D, + 46859 - 44032: 0x8D8E, + 46860 - 44032: 0x8D8F, + 46861 - 44032: 0x8D90, + 46862 - 44032: 0x8D91, + 46863 - 44032: 0x8D92, + 46864 - 44032: 0x8D93, + 46865 - 44032: 0x8D94, + 46866 - 44032: 0x8D95, + 46867 - 44032: 0x8D96, + 46868 - 44032: 0x8D97, + 46869 - 44032: 0x8D98, + 46870 - 44032: 0x8D99, + 46871 - 44032: 0x8D9A, + 46872 - 44032: 0x8D9B, + 46873 - 44032: 0x8D9C, + 46874 - 44032: 0x8D9D, + 46875 - 44032: 0x8D9E, + 46876 - 44032: 0x8D9F, + 46877 - 44032: 0x8DA0, + 46878 - 44032: 0x8DA1, + 46879 - 44032: 0x8DA2, + 46880 - 44032: 0x8DA3, + 46881 - 44032: 0x8DA4, + 46882 - 44032: 0x8DA5, + 46883 - 44032: 0x8DA6, + 46884 - 44032: 0x8DA7, + 46885 - 44032: 0x8DA8, + 46886 - 44032: 0x8DA9, + 46887 - 44032: 0x8DAA, + 46888 - 44032: 0xB6DF, + 46889 - 44032: 0xB6E0, + 46890 - 44032: 0x8DAB, + 46891 - 44032: 0x8DAC, + 46892 - 44032: 0xB6E1, + 46893 - 44032: 0x8DAD, + 46894 - 44032: 0x8DAE, + 46895 - 44032: 0xB6E2, + 46896 - 44032: 0xB6E3, + 46897 - 44032: 0x8DAF, + 46898 - 44032: 0x8DB0, + 46899 - 44032: 0x8DB1, + 46900 - 44032: 0x8DB2, + 46901 - 44032: 0x8DB3, + 46902 - 44032: 0x8DB4, + 46903 - 44032: 0x8DB5, + 46904 - 44032: 0xB6E4, + 46905 - 44032: 0xB6E5, + 46906 - 44032: 0x8DB6, + 46907 - 44032: 0xB6E6, + 46908 - 44032: 0x8DB7, + 46909 - 44032: 0x8DB8, + 46910 - 44032: 0x8DB9, + 46911 - 44032: 0x8DBA, + 46912 - 44032: 0x8DBB, + 46913 - 44032: 0x8DBC, + 46914 - 44032: 0x8DBD, + 46915 - 44032: 0x8DBE, + 46916 - 44032: 0xB6E7, + 46917 - 44032: 0x8DBF, + 46918 - 44032: 0x8DC0, + 46919 - 44032: 0x8DC1, + 46920 - 44032: 0xB6E8, + 46921 - 44032: 0x8DC2, + 46922 - 44032: 0x8DC3, + 46923 - 44032: 0x8DC4, + 46924 - 44032: 0xB6E9, + 46925 - 44032: 0x8DC5, + 46926 - 44032: 0x8DC6, + 46927 - 44032: 0x8DC7, + 46928 - 44032: 0x8DC8, + 46929 - 44032: 0x8DC9, + 46930 - 44032: 0x8DCA, + 46931 - 44032: 0x8DCB, + 46932 - 44032: 0xB6EA, + 46933 - 44032: 0xB6EB, + 46934 - 44032: 0x8DCC, + 46935 - 44032: 0x8DCD, + 46936 - 44032: 0x8DCE, + 46937 - 44032: 0x8DCF, + 46938 - 44032: 0x8DD0, + 46939 - 44032: 0x8DD1, + 46940 - 44032: 0x8DD2, + 46941 - 44032: 0x8DD3, + 46942 - 44032: 0x8DD4, + 46943 - 44032: 0x8DD5, + 46944 - 44032: 0xB6EC, + 46945 - 44032: 0x8DD6, + 46946 - 44032: 0x8DD7, + 46947 - 44032: 0x8DD8, + 46948 - 44032: 0xB6ED, + 46949 - 44032: 0x8DD9, + 46950 - 44032: 0x8DDA, + 46951 - 44032: 0x8DDB, + 46952 - 44032: 0xB6EE, + 46953 - 44032: 0x8DDC, + 46954 - 44032: 0x8DDD, + 46955 - 44032: 0x8DDE, + 46956 - 44032: 0x8DDF, + 46957 - 44032: 0x8DE0, + 46958 - 44032: 0x8DE1, + 46959 - 44032: 0x8DE2, + 46960 - 44032: 0xB6EF, + 46961 - 44032: 0xB6F0, + 46962 - 44032: 0x8DE3, + 46963 - 44032: 0xB6F1, + 46964 - 44032: 0x8DE4, + 46965 - 44032: 0xB6F2, + 46966 - 44032: 0x8DE5, + 46967 - 44032: 0x8DE6, + 46968 - 44032: 0x8DE7, + 46969 - 44032: 0x8DE8, + 46970 - 44032: 0x8DE9, + 46971 - 44032: 0x8DEA, + 46972 - 44032: 0xB6F3, + 46973 - 44032: 0xB6F4, + 46974 - 44032: 0x8DEB, + 46975 - 44032: 0x8DEC, + 46976 - 44032: 0xB6F5, + 46977 - 44032: 0x8DED, + 46978 - 44032: 0x8DEE, + 46979 - 44032: 0x8DEF, + 46980 - 44032: 0xB6F6, + 46981 - 44032: 0x8DF0, + 46982 - 44032: 0x8DF1, + 46983 - 44032: 0x8DF2, + 46984 - 44032: 0x8DF3, + 46985 - 44032: 0x8DF4, + 46986 - 44032: 0x8DF5, + 46987 - 44032: 0x8DF6, + 46988 - 44032: 0xB6F7, + 46989 - 44032: 0xB6F8, + 46990 - 44032: 0x8DF7, + 46991 - 44032: 0xB6F9, + 46992 - 44032: 0xB6FA, + 46993 - 44032: 0xB6FB, + 46994 - 44032: 0xB6FC, + 46995 - 44032: 0x8DF8, + 46996 - 44032: 0x8DF9, + 46997 - 44032: 0x8DFA, + 46998 - 44032: 0xB6FD, + 46999 - 44032: 0xB6FE, + 47000 - 44032: 0xB7A1, + 47001 - 44032: 0xB7A2, + 47002 - 44032: 0x8DFB, + 47003 - 44032: 0x8DFC, + 47004 - 44032: 0xB7A3, + 47005 - 44032: 0x8DFD, + 47006 - 44032: 0x8DFE, + 47007 - 44032: 0x8E41, + 47008 - 44032: 0xB7A4, + 47009 - 44032: 0x8E42, + 47010 - 44032: 0x8E43, + 47011 - 44032: 0x8E44, + 47012 - 44032: 0x8E45, + 47013 - 44032: 0x8E46, + 47014 - 44032: 0x8E47, + 47015 - 44032: 0x8E48, + 47016 - 44032: 0xB7A5, + 47017 - 44032: 0xB7A6, + 47018 - 44032: 0x8E49, + 47019 - 44032: 0xB7A7, + 47020 - 44032: 0xB7A8, + 47021 - 44032: 0xB7A9, + 47022 - 44032: 0x8E4A, + 47023 - 44032: 0x8E4B, + 47024 - 44032: 0x8E4C, + 47025 - 44032: 0x8E4D, + 47026 - 44032: 0x8E4E, + 47027 - 44032: 0x8E4F, + 47028 - 44032: 0xB7AA, + 47029 - 44032: 0xB7AB, + 47030 - 44032: 0x8E50, + 47031 - 44032: 0x8E51, + 47032 - 44032: 0xB7AC, + 47033 - 44032: 0x8E52, + 47034 - 44032: 0x8E53, + 47035 - 44032: 0x8E54, + 47036 - 44032: 0x8E55, + 47037 - 44032: 0x8E56, + 47038 - 44032: 0x8E57, + 47039 - 44032: 0x8E58, + 47040 - 44032: 0x8E59, + 47041 - 44032: 0x8E5A, + 47042 - 44032: 0x8E61, + 47043 - 44032: 0x8E62, + 47044 - 44032: 0x8E63, + 47045 - 44032: 0x8E64, + 47046 - 44032: 0x8E65, + 47047 - 44032: 0xB7AD, + 47048 - 44032: 0x8E66, + 47049 - 44032: 0xB7AE, + 47050 - 44032: 0x8E67, + 47051 - 44032: 0x8E68, + 47052 - 44032: 0x8E69, + 47053 - 44032: 0x8E6A, + 47054 - 44032: 0x8E6B, + 47055 - 44032: 0x8E6C, + 47056 - 44032: 0x8E6D, + 47057 - 44032: 0x8E6E, + 47058 - 44032: 0x8E6F, + 47059 - 44032: 0x8E70, + 47060 - 44032: 0x8E71, + 47061 - 44032: 0x8E72, + 47062 - 44032: 0x8E73, + 47063 - 44032: 0x8E74, + 47064 - 44032: 0x8E75, + 47065 - 44032: 0x8E76, + 47066 - 44032: 0x8E77, + 47067 - 44032: 0x8E78, + 47068 - 44032: 0x8E79, + 47069 - 44032: 0x8E7A, + 47070 - 44032: 0x8E81, + 47071 - 44032: 0x8E82, + 47072 - 44032: 0x8E83, + 47073 - 44032: 0x8E84, + 47074 - 44032: 0x8E85, + 47075 - 44032: 0x8E86, + 47076 - 44032: 0x8E87, + 47077 - 44032: 0x8E88, + 47078 - 44032: 0x8E89, + 47079 - 44032: 0x8E8A, + 47080 - 44032: 0x8E8B, + 47081 - 44032: 0x8E8C, + 47082 - 44032: 0x8E8D, + 47083 - 44032: 0x8E8E, + 47084 - 44032: 0xB7AF, + 47085 - 44032: 0xB7B0, + 47086 - 44032: 0x8E8F, + 47087 - 44032: 0x8E90, + 47088 - 44032: 0xB7B1, + 47089 - 44032: 0x8E91, + 47090 - 44032: 0x8E92, + 47091 - 44032: 0x8E93, + 47092 - 44032: 0xB7B2, + 47093 - 44032: 0x8E94, + 47094 - 44032: 0x8E95, + 47095 - 44032: 0x8E96, + 47096 - 44032: 0x8E97, + 47097 - 44032: 0x8E98, + 47098 - 44032: 0x8E99, + 47099 - 44032: 0x8E9A, + 47100 - 44032: 0xB7B3, + 47101 - 44032: 0xB7B4, + 47102 - 44032: 0x8E9B, + 47103 - 44032: 0xB7B5, + 47104 - 44032: 0xB7B6, + 47105 - 44032: 0xB7B7, + 47106 - 44032: 0x8E9C, + 47107 - 44032: 0x8E9D, + 47108 - 44032: 0x8E9E, + 47109 - 44032: 0x8E9F, + 47110 - 44032: 0x8EA0, + 47111 - 44032: 0xB7B8, + 47112 - 44032: 0xB7B9, + 47113 - 44032: 0xB7BA, + 47114 - 44032: 0x8EA1, + 47115 - 44032: 0x8EA2, + 47116 - 44032: 0xB7BB, + 47117 - 44032: 0x8EA3, + 47118 - 44032: 0x8EA4, + 47119 - 44032: 0x8EA5, + 47120 - 44032: 0xB7BC, + 47121 - 44032: 0x8EA6, + 47122 - 44032: 0x8EA7, + 47123 - 44032: 0x8EA8, + 47124 - 44032: 0x8EA9, + 47125 - 44032: 0x8EAA, + 47126 - 44032: 0x8EAB, + 47127 - 44032: 0x8EAC, + 47128 - 44032: 0xB7BD, + 47129 - 44032: 0xB7BE, + 47130 - 44032: 0x8EAD, + 47131 - 44032: 0xB7BF, + 47132 - 44032: 0x8EAE, + 47133 - 44032: 0xB7C0, + 47134 - 44032: 0x8EAF, + 47135 - 44032: 0x8EB0, + 47136 - 44032: 0x8EB1, + 47137 - 44032: 0x8EB2, + 47138 - 44032: 0x8EB3, + 47139 - 44032: 0x8EB4, + 47140 - 44032: 0xB7C1, + 47141 - 44032: 0xB7C2, + 47142 - 44032: 0x8EB5, + 47143 - 44032: 0x8EB6, + 47144 - 44032: 0xB7C3, + 47145 - 44032: 0x8EB7, + 47146 - 44032: 0x8EB8, + 47147 - 44032: 0x8EB9, + 47148 - 44032: 0xB7C4, + 47149 - 44032: 0x8EBA, + 47150 - 44032: 0x8EBB, + 47151 - 44032: 0x8EBC, + 47152 - 44032: 0x8EBD, + 47153 - 44032: 0x8EBE, + 47154 - 44032: 0x8EBF, + 47155 - 44032: 0x8EC0, + 47156 - 44032: 0xB7C5, + 47157 - 44032: 0xB7C6, + 47158 - 44032: 0x8EC1, + 47159 - 44032: 0xB7C7, + 47160 - 44032: 0xB7C8, + 47161 - 44032: 0xB7C9, + 47162 - 44032: 0x8EC2, + 47163 - 44032: 0x8EC3, + 47164 - 44032: 0x8EC4, + 47165 - 44032: 0x8EC5, + 47166 - 44032: 0x8EC6, + 47167 - 44032: 0x8EC7, + 47168 - 44032: 0xB7CA, + 47169 - 44032: 0x8EC8, + 47170 - 44032: 0x8EC9, + 47171 - 44032: 0x8ECA, + 47172 - 44032: 0xB7CB, + 47173 - 44032: 0x8ECB, + 47174 - 44032: 0x8ECC, + 47175 - 44032: 0x8ECD, + 47176 - 44032: 0x8ECE, + 47177 - 44032: 0x8ECF, + 47178 - 44032: 0x8ED0, + 47179 - 44032: 0x8ED1, + 47180 - 44032: 0x8ED2, + 47181 - 44032: 0x8ED3, + 47182 - 44032: 0x8ED4, + 47183 - 44032: 0x8ED5, + 47184 - 44032: 0x8ED6, + 47185 - 44032: 0xB7CC, + 47186 - 44032: 0x8ED7, + 47187 - 44032: 0xB7CD, + 47188 - 44032: 0x8ED8, + 47189 - 44032: 0x8ED9, + 47190 - 44032: 0x8EDA, + 47191 - 44032: 0x8EDB, + 47192 - 44032: 0x8EDC, + 47193 - 44032: 0x8EDD, + 47194 - 44032: 0x8EDE, + 47195 - 44032: 0x8EDF, + 47196 - 44032: 0xB7CE, + 47197 - 44032: 0xB7CF, + 47198 - 44032: 0x8EE0, + 47199 - 44032: 0x8EE1, + 47200 - 44032: 0xB7D0, + 47201 - 44032: 0x8EE2, + 47202 - 44032: 0x8EE3, + 47203 - 44032: 0x8EE4, + 47204 - 44032: 0xB7D1, + 47205 - 44032: 0x8EE5, + 47206 - 44032: 0x8EE6, + 47207 - 44032: 0x8EE7, + 47208 - 44032: 0x8EE8, + 47209 - 44032: 0x8EE9, + 47210 - 44032: 0x8EEA, + 47211 - 44032: 0x8EEB, + 47212 - 44032: 0xB7D2, + 47213 - 44032: 0xB7D3, + 47214 - 44032: 0x8EEC, + 47215 - 44032: 0xB7D4, + 47216 - 44032: 0x8EED, + 47217 - 44032: 0xB7D5, + 47218 - 44032: 0x8EEE, + 47219 - 44032: 0x8EEF, + 47220 - 44032: 0x8EF0, + 47221 - 44032: 0x8EF1, + 47222 - 44032: 0x8EF2, + 47223 - 44032: 0x8EF3, + 47224 - 44032: 0xB7D6, + 47225 - 44032: 0x8EF4, + 47226 - 44032: 0x8EF5, + 47227 - 44032: 0x8EF6, + 47228 - 44032: 0xB7D7, + 47229 - 44032: 0x8EF7, + 47230 - 44032: 0x8EF8, + 47231 - 44032: 0x8EF9, + 47232 - 44032: 0x8EFA, + 47233 - 44032: 0x8EFB, + 47234 - 44032: 0x8EFC, + 47235 - 44032: 0x8EFD, + 47236 - 44032: 0x8EFE, + 47237 - 44032: 0x8F41, + 47238 - 44032: 0x8F42, + 47239 - 44032: 0x8F43, + 47240 - 44032: 0x8F44, + 47241 - 44032: 0x8F45, + 47242 - 44032: 0x8F46, + 47243 - 44032: 0x8F47, + 47244 - 44032: 0x8F48, + 47245 - 44032: 0xB7D8, + 47246 - 44032: 0x8F49, + 47247 - 44032: 0x8F4A, + 47248 - 44032: 0x8F4B, + 47249 - 44032: 0x8F4C, + 47250 - 44032: 0x8F4D, + 47251 - 44032: 0x8F4E, + 47252 - 44032: 0x8F4F, + 47253 - 44032: 0x8F50, + 47254 - 44032: 0x8F51, + 47255 - 44032: 0x8F52, + 47256 - 44032: 0x8F53, + 47257 - 44032: 0x8F54, + 47258 - 44032: 0x8F55, + 47259 - 44032: 0x8F56, + 47260 - 44032: 0x8F57, + 47261 - 44032: 0x8F58, + 47262 - 44032: 0x8F59, + 47263 - 44032: 0x8F5A, + 47264 - 44032: 0x8F61, + 47265 - 44032: 0x8F62, + 47266 - 44032: 0x8F63, + 47267 - 44032: 0x8F64, + 47268 - 44032: 0x8F65, + 47269 - 44032: 0x8F66, + 47270 - 44032: 0x8F67, + 47271 - 44032: 0x8F68, + 47272 - 44032: 0xB7D9, + 47273 - 44032: 0x8F69, + 47274 - 44032: 0x8F6A, + 47275 - 44032: 0x8F6B, + 47276 - 44032: 0x8F6C, + 47277 - 44032: 0x8F6D, + 47278 - 44032: 0x8F6E, + 47279 - 44032: 0x8F6F, + 47280 - 44032: 0xB7DA, + 47281 - 44032: 0x8F70, + 47282 - 44032: 0x8F71, + 47283 - 44032: 0x8F72, + 47284 - 44032: 0xB7DB, + 47285 - 44032: 0x8F73, + 47286 - 44032: 0x8F74, + 47287 - 44032: 0x8F75, + 47288 - 44032: 0xB7DC, + 47289 - 44032: 0x8F76, + 47290 - 44032: 0x8F77, + 47291 - 44032: 0x8F78, + 47292 - 44032: 0x8F79, + 47293 - 44032: 0x8F7A, + 47294 - 44032: 0x8F81, + 47295 - 44032: 0x8F82, + 47296 - 44032: 0xB7DD, + 47297 - 44032: 0xB7DE, + 47298 - 44032: 0x8F83, + 47299 - 44032: 0xB7DF, + 47300 - 44032: 0x8F84, + 47301 - 44032: 0xB7E0, + 47302 - 44032: 0x8F85, + 47303 - 44032: 0x8F86, + 47304 - 44032: 0x8F87, + 47305 - 44032: 0x8F88, + 47306 - 44032: 0x8F89, + 47307 - 44032: 0x8F8A, + 47308 - 44032: 0xB7E1, + 47309 - 44032: 0x8F8B, + 47310 - 44032: 0x8F8C, + 47311 - 44032: 0x8F8D, + 47312 - 44032: 0xB7E2, + 47313 - 44032: 0x8F8E, + 47314 - 44032: 0x8F8F, + 47315 - 44032: 0x8F90, + 47316 - 44032: 0xB7E3, + 47317 - 44032: 0x8F91, + 47318 - 44032: 0x8F92, + 47319 - 44032: 0x8F93, + 47320 - 44032: 0x8F94, + 47321 - 44032: 0x8F95, + 47322 - 44032: 0x8F96, + 47323 - 44032: 0x8F97, + 47324 - 44032: 0x8F98, + 47325 - 44032: 0xB7E4, + 47326 - 44032: 0x8F99, + 47327 - 44032: 0xB7E5, + 47328 - 44032: 0x8F9A, + 47329 - 44032: 0xB7E6, + 47330 - 44032: 0x8F9B, + 47331 - 44032: 0x8F9C, + 47332 - 44032: 0x8F9D, + 47333 - 44032: 0x8F9E, + 47334 - 44032: 0x8F9F, + 47335 - 44032: 0x8FA0, + 47336 - 44032: 0xB7E7, + 47337 - 44032: 0xB7E8, + 47338 - 44032: 0x8FA1, + 47339 - 44032: 0x8FA2, + 47340 - 44032: 0xB7E9, + 47341 - 44032: 0x8FA3, + 47342 - 44032: 0x8FA4, + 47343 - 44032: 0x8FA5, + 47344 - 44032: 0xB7EA, + 47345 - 44032: 0x8FA6, + 47346 - 44032: 0x8FA7, + 47347 - 44032: 0x8FA8, + 47348 - 44032: 0x8FA9, + 47349 - 44032: 0x8FAA, + 47350 - 44032: 0x8FAB, + 47351 - 44032: 0x8FAC, + 47352 - 44032: 0xB7EB, + 47353 - 44032: 0xB7EC, + 47354 - 44032: 0x8FAD, + 47355 - 44032: 0xB7ED, + 47356 - 44032: 0x8FAE, + 47357 - 44032: 0xB7EE, + 47358 - 44032: 0x8FAF, + 47359 - 44032: 0x8FB0, + 47360 - 44032: 0x8FB1, + 47361 - 44032: 0x8FB2, + 47362 - 44032: 0x8FB3, + 47363 - 44032: 0x8FB4, + 47364 - 44032: 0xB7EF, + 47365 - 44032: 0x8FB5, + 47366 - 44032: 0x8FB6, + 47367 - 44032: 0x8FB7, + 47368 - 44032: 0x8FB8, + 47369 - 44032: 0x8FB9, + 47370 - 44032: 0x8FBA, + 47371 - 44032: 0x8FBB, + 47372 - 44032: 0x8FBC, + 47373 - 44032: 0x8FBD, + 47374 - 44032: 0x8FBE, + 47375 - 44032: 0x8FBF, + 47376 - 44032: 0x8FC0, + 47377 - 44032: 0x8FC1, + 47378 - 44032: 0x8FC2, + 47379 - 44032: 0x8FC3, + 47380 - 44032: 0x8FC4, + 47381 - 44032: 0x8FC5, + 47382 - 44032: 0x8FC6, + 47383 - 44032: 0x8FC7, + 47384 - 44032: 0xB7F0, + 47385 - 44032: 0x8FC8, + 47386 - 44032: 0x8FC9, + 47387 - 44032: 0x8FCA, + 47388 - 44032: 0x8FCB, + 47389 - 44032: 0x8FCC, + 47390 - 44032: 0x8FCD, + 47391 - 44032: 0x8FCE, + 47392 - 44032: 0xB7F1, + 47393 - 44032: 0x8FCF, + 47394 - 44032: 0x8FD0, + 47395 - 44032: 0x8FD1, + 47396 - 44032: 0x8FD2, + 47397 - 44032: 0x8FD3, + 47398 - 44032: 0x8FD4, + 47399 - 44032: 0x8FD5, + 47400 - 44032: 0x8FD6, + 47401 - 44032: 0x8FD7, + 47402 - 44032: 0x8FD8, + 47403 - 44032: 0x8FD9, + 47404 - 44032: 0x8FDA, + 47405 - 44032: 0x8FDB, + 47406 - 44032: 0x8FDC, + 47407 - 44032: 0x8FDD, + 47408 - 44032: 0x8FDE, + 47409 - 44032: 0x8FDF, + 47410 - 44032: 0x8FE0, + 47411 - 44032: 0x8FE1, + 47412 - 44032: 0x8FE2, + 47413 - 44032: 0x8FE3, + 47414 - 44032: 0x8FE4, + 47415 - 44032: 0x8FE5, + 47416 - 44032: 0x8FE6, + 47417 - 44032: 0x8FE7, + 47418 - 44032: 0x8FE8, + 47419 - 44032: 0x8FE9, + 47420 - 44032: 0xB7F2, + 47421 - 44032: 0xB7F3, + 47422 - 44032: 0x8FEA, + 47423 - 44032: 0x8FEB, + 47424 - 44032: 0xB7F4, + 47425 - 44032: 0x8FEC, + 47426 - 44032: 0x8FED, + 47427 - 44032: 0x8FEE, + 47428 - 44032: 0xB7F5, + 47429 - 44032: 0x8FEF, + 47430 - 44032: 0x8FF0, + 47431 - 44032: 0x8FF1, + 47432 - 44032: 0x8FF2, + 47433 - 44032: 0x8FF3, + 47434 - 44032: 0x8FF4, + 47435 - 44032: 0x8FF5, + 47436 - 44032: 0xB7F6, + 47437 - 44032: 0x8FF6, + 47438 - 44032: 0x8FF7, + 47439 - 44032: 0xB7F7, + 47440 - 44032: 0x8FF8, + 47441 - 44032: 0xB7F8, + 47442 - 44032: 0x8FF9, + 47443 - 44032: 0x8FFA, + 47444 - 44032: 0x8FFB, + 47445 - 44032: 0x8FFC, + 47446 - 44032: 0x8FFD, + 47447 - 44032: 0x8FFE, + 47448 - 44032: 0xB7F9, + 47449 - 44032: 0xB7FA, + 47450 - 44032: 0x9041, + 47451 - 44032: 0x9042, + 47452 - 44032: 0xB7FB, + 47453 - 44032: 0x9043, + 47454 - 44032: 0x9044, + 47455 - 44032: 0x9045, + 47456 - 44032: 0xB7FC, + 47457 - 44032: 0x9046, + 47458 - 44032: 0x9047, + 47459 - 44032: 0x9048, + 47460 - 44032: 0x9049, + 47461 - 44032: 0x904A, + 47462 - 44032: 0x904B, + 47463 - 44032: 0x904C, + 47464 - 44032: 0xB7FD, + 47465 - 44032: 0xB7FE, + 47466 - 44032: 0x904D, + 47467 - 44032: 0xB8A1, + 47468 - 44032: 0x904E, + 47469 - 44032: 0xB8A2, + 47470 - 44032: 0x904F, + 47471 - 44032: 0x9050, + 47472 - 44032: 0x9051, + 47473 - 44032: 0x9052, + 47474 - 44032: 0x9053, + 47475 - 44032: 0x9054, + 47476 - 44032: 0xB8A3, + 47477 - 44032: 0xB8A4, + 47478 - 44032: 0x9055, + 47479 - 44032: 0x9056, + 47480 - 44032: 0xB8A5, + 47481 - 44032: 0x9057, + 47482 - 44032: 0x9058, + 47483 - 44032: 0x9059, + 47484 - 44032: 0xB8A6, + 47485 - 44032: 0x905A, + 47486 - 44032: 0x9061, + 47487 - 44032: 0x9062, + 47488 - 44032: 0x9063, + 47489 - 44032: 0x9064, + 47490 - 44032: 0x9065, + 47491 - 44032: 0x9066, + 47492 - 44032: 0xB8A7, + 47493 - 44032: 0xB8A8, + 47494 - 44032: 0x9067, + 47495 - 44032: 0xB8A9, + 47496 - 44032: 0x9068, + 47497 - 44032: 0xB8AA, + 47498 - 44032: 0xB8AB, + 47499 - 44032: 0x9069, + 47500 - 44032: 0x906A, + 47501 - 44032: 0xB8AC, + 47502 - 44032: 0xB8AD, + 47503 - 44032: 0x906B, + 47504 - 44032: 0x906C, + 47505 - 44032: 0x906D, + 47506 - 44032: 0x906E, + 47507 - 44032: 0x906F, + 47508 - 44032: 0x9070, + 47509 - 44032: 0x9071, + 47510 - 44032: 0x9072, + 47511 - 44032: 0x9073, + 47512 - 44032: 0x9074, + 47513 - 44032: 0x9075, + 47514 - 44032: 0x9076, + 47515 - 44032: 0x9077, + 47516 - 44032: 0x9078, + 47517 - 44032: 0x9079, + 47518 - 44032: 0x907A, + 47519 - 44032: 0x9081, + 47520 - 44032: 0x9082, + 47521 - 44032: 0x9083, + 47522 - 44032: 0x9084, + 47523 - 44032: 0x9085, + 47524 - 44032: 0x9086, + 47525 - 44032: 0x9087, + 47526 - 44032: 0x9088, + 47527 - 44032: 0x9089, + 47528 - 44032: 0x908A, + 47529 - 44032: 0x908B, + 47530 - 44032: 0x908C, + 47531 - 44032: 0x908D, + 47532 - 44032: 0xB8AE, + 47533 - 44032: 0xB8AF, + 47534 - 44032: 0x908E, + 47535 - 44032: 0x908F, + 47536 - 44032: 0xB8B0, + 47537 - 44032: 0x9090, + 47538 - 44032: 0x9091, + 47539 - 44032: 0x9092, + 47540 - 44032: 0xB8B1, + 47541 - 44032: 0x9093, + 47542 - 44032: 0x9094, + 47543 - 44032: 0x9095, + 47544 - 44032: 0x9096, + 47545 - 44032: 0x9097, + 47546 - 44032: 0x9098, + 47547 - 44032: 0x9099, + 47548 - 44032: 0xB8B2, + 47549 - 44032: 0xB8B3, + 47550 - 44032: 0x909A, + 47551 - 44032: 0xB8B4, + 47552 - 44032: 0x909B, + 47553 - 44032: 0xB8B5, + 47554 - 44032: 0x909C, + 47555 - 44032: 0x909D, + 47556 - 44032: 0x909E, + 47557 - 44032: 0x909F, + 47558 - 44032: 0x90A0, + 47559 - 44032: 0x90A1, + 47560 - 44032: 0xB8B6, + 47561 - 44032: 0xB8B7, + 47562 - 44032: 0x90A2, + 47563 - 44032: 0x90A3, + 47564 - 44032: 0xB8B8, + 47565 - 44032: 0x90A4, + 47566 - 44032: 0xB8B9, + 47567 - 44032: 0xB8BA, + 47568 - 44032: 0xB8BB, + 47569 - 44032: 0xB8BC, + 47570 - 44032: 0xB8BD, + 47571 - 44032: 0x90A5, + 47572 - 44032: 0x90A6, + 47573 - 44032: 0x90A7, + 47574 - 44032: 0x90A8, + 47575 - 44032: 0x90A9, + 47576 - 44032: 0xB8BE, + 47577 - 44032: 0xB8BF, + 47578 - 44032: 0x90AA, + 47579 - 44032: 0xB8C0, + 47580 - 44032: 0x90AB, + 47581 - 44032: 0xB8C1, + 47582 - 44032: 0xB8C2, + 47583 - 44032: 0x90AC, + 47584 - 44032: 0x90AD, + 47585 - 44032: 0xB8C3, + 47586 - 44032: 0x90AE, + 47587 - 44032: 0xB8C4, + 47588 - 44032: 0xB8C5, + 47589 - 44032: 0xB8C6, + 47590 - 44032: 0x90AF, + 47591 - 44032: 0x90B0, + 47592 - 44032: 0xB8C7, + 47593 - 44032: 0x90B1, + 47594 - 44032: 0x90B2, + 47595 - 44032: 0x90B3, + 47596 - 44032: 0xB8C8, + 47597 - 44032: 0x90B4, + 47598 - 44032: 0x90B5, + 47599 - 44032: 0x90B6, + 47600 - 44032: 0x90B7, + 47601 - 44032: 0x90B8, + 47602 - 44032: 0x90B9, + 47603 - 44032: 0x90BA, + 47604 - 44032: 0xB8C9, + 47605 - 44032: 0xB8CA, + 47606 - 44032: 0x90BB, + 47607 - 44032: 0xB8CB, + 47608 - 44032: 0xB8CC, + 47609 - 44032: 0xB8CD, + 47610 - 44032: 0xB8CE, + 47611 - 44032: 0x90BC, + 47612 - 44032: 0x90BD, + 47613 - 44032: 0x90BE, + 47614 - 44032: 0x90BF, + 47615 - 44032: 0x90C0, + 47616 - 44032: 0xB8CF, + 47617 - 44032: 0xB8D0, + 47618 - 44032: 0x90C1, + 47619 - 44032: 0x90C2, + 47620 - 44032: 0x90C3, + 47621 - 44032: 0x90C4, + 47622 - 44032: 0x90C5, + 47623 - 44032: 0x90C6, + 47624 - 44032: 0xB8D1, + 47625 - 44032: 0x90C7, + 47626 - 44032: 0x90C8, + 47627 - 44032: 0x90C9, + 47628 - 44032: 0x90CA, + 47629 - 44032: 0x90CB, + 47630 - 44032: 0x90CC, + 47631 - 44032: 0x90CD, + 47632 - 44032: 0x90CE, + 47633 - 44032: 0x90CF, + 47634 - 44032: 0x90D0, + 47635 - 44032: 0x90D1, + 47636 - 44032: 0x90D2, + 47637 - 44032: 0xB8D2, + 47638 - 44032: 0x90D3, + 47639 - 44032: 0x90D4, + 47640 - 44032: 0x90D5, + 47641 - 44032: 0x90D6, + 47642 - 44032: 0x90D7, + 47643 - 44032: 0x90D8, + 47644 - 44032: 0x90D9, + 47645 - 44032: 0x90DA, + 47646 - 44032: 0x90DB, + 47647 - 44032: 0x90DC, + 47648 - 44032: 0x90DD, + 47649 - 44032: 0x90DE, + 47650 - 44032: 0x90DF, + 47651 - 44032: 0x90E0, + 47652 - 44032: 0x90E1, + 47653 - 44032: 0x90E2, + 47654 - 44032: 0x90E3, + 47655 - 44032: 0x90E4, + 47656 - 44032: 0x90E5, + 47657 - 44032: 0x90E6, + 47658 - 44032: 0x90E7, + 47659 - 44032: 0x90E8, + 47660 - 44032: 0x90E9, + 47661 - 44032: 0x90EA, + 47662 - 44032: 0x90EB, + 47663 - 44032: 0x90EC, + 47664 - 44032: 0x90ED, + 47665 - 44032: 0x90EE, + 47666 - 44032: 0x90EF, + 47667 - 44032: 0x90F0, + 47668 - 44032: 0x90F1, + 47669 - 44032: 0x90F2, + 47670 - 44032: 0x90F3, + 47671 - 44032: 0x90F4, + 47672 - 44032: 0xB8D3, + 47673 - 44032: 0xB8D4, + 47674 - 44032: 0x90F5, + 47675 - 44032: 0x90F6, + 47676 - 44032: 0xB8D5, + 47677 - 44032: 0x90F7, + 47678 - 44032: 0x90F8, + 47679 - 44032: 0x90F9, + 47680 - 44032: 0xB8D6, + 47681 - 44032: 0x90FA, + 47682 - 44032: 0xB8D7, + 47683 - 44032: 0x90FB, + 47684 - 44032: 0x90FC, + 47685 - 44032: 0x90FD, + 47686 - 44032: 0x90FE, + 47687 - 44032: 0x9141, + 47688 - 44032: 0xB8D8, + 47689 - 44032: 0xB8D9, + 47690 - 44032: 0x9142, + 47691 - 44032: 0xB8DA, + 47692 - 44032: 0x9143, + 47693 - 44032: 0xB8DB, + 47694 - 44032: 0xB8DC, + 47695 - 44032: 0x9144, + 47696 - 44032: 0x9145, + 47697 - 44032: 0x9146, + 47698 - 44032: 0x9147, + 47699 - 44032: 0xB8DD, + 47700 - 44032: 0xB8DE, + 47701 - 44032: 0xB8DF, + 47702 - 44032: 0x9148, + 47703 - 44032: 0x9149, + 47704 - 44032: 0xB8E0, + 47705 - 44032: 0x914A, + 47706 - 44032: 0x914B, + 47707 - 44032: 0x914C, + 47708 - 44032: 0xB8E1, + 47709 - 44032: 0x914D, + 47710 - 44032: 0x914E, + 47711 - 44032: 0x914F, + 47712 - 44032: 0x9150, + 47713 - 44032: 0x9151, + 47714 - 44032: 0x9152, + 47715 - 44032: 0x9153, + 47716 - 44032: 0xB8E2, + 47717 - 44032: 0xB8E3, + 47718 - 44032: 0x9154, + 47719 - 44032: 0xB8E4, + 47720 - 44032: 0xB8E5, + 47721 - 44032: 0xB8E6, + 47722 - 44032: 0x9155, + 47723 - 44032: 0x9156, + 47724 - 44032: 0x9157, + 47725 - 44032: 0x9158, + 47726 - 44032: 0x9159, + 47727 - 44032: 0x915A, + 47728 - 44032: 0xB8E7, + 47729 - 44032: 0xB8E8, + 47730 - 44032: 0x9161, + 47731 - 44032: 0x9162, + 47732 - 44032: 0xB8E9, + 47733 - 44032: 0x9163, + 47734 - 44032: 0x9164, + 47735 - 44032: 0x9165, + 47736 - 44032: 0xB8EA, + 47737 - 44032: 0x9166, + 47738 - 44032: 0x9167, + 47739 - 44032: 0x9168, + 47740 - 44032: 0x9169, + 47741 - 44032: 0x916A, + 47742 - 44032: 0x916B, + 47743 - 44032: 0x916C, + 47744 - 44032: 0x916D, + 47745 - 44032: 0x916E, + 47746 - 44032: 0x916F, + 47747 - 44032: 0xB8EB, + 47748 - 44032: 0xB8EC, + 47749 - 44032: 0xB8ED, + 47750 - 44032: 0x9170, + 47751 - 44032: 0xB8EE, + 47752 - 44032: 0x9171, + 47753 - 44032: 0x9172, + 47754 - 44032: 0x9173, + 47755 - 44032: 0x9174, + 47756 - 44032: 0xB8EF, + 47757 - 44032: 0x9175, + 47758 - 44032: 0x9176, + 47759 - 44032: 0x9177, + 47760 - 44032: 0x9178, + 47761 - 44032: 0x9179, + 47762 - 44032: 0x917A, + 47763 - 44032: 0x9181, + 47764 - 44032: 0x9182, + 47765 - 44032: 0x9183, + 47766 - 44032: 0x9184, + 47767 - 44032: 0x9185, + 47768 - 44032: 0x9186, + 47769 - 44032: 0x9187, + 47770 - 44032: 0x9188, + 47771 - 44032: 0x9189, + 47772 - 44032: 0x918A, + 47773 - 44032: 0x918B, + 47774 - 44032: 0x918C, + 47775 - 44032: 0x918D, + 47776 - 44032: 0x918E, + 47777 - 44032: 0x918F, + 47778 - 44032: 0x9190, + 47779 - 44032: 0x9191, + 47780 - 44032: 0x9192, + 47781 - 44032: 0x9193, + 47782 - 44032: 0x9194, + 47783 - 44032: 0x9195, + 47784 - 44032: 0xB8F0, + 47785 - 44032: 0xB8F1, + 47786 - 44032: 0x9196, + 47787 - 44032: 0xB8F2, + 47788 - 44032: 0xB8F3, + 47789 - 44032: 0x9197, + 47790 - 44032: 0x9198, + 47791 - 44032: 0x9199, + 47792 - 44032: 0xB8F4, + 47793 - 44032: 0x919A, + 47794 - 44032: 0xB8F5, + 47795 - 44032: 0x919B, + 47796 - 44032: 0x919C, + 47797 - 44032: 0x919D, + 47798 - 44032: 0x919E, + 47799 - 44032: 0x919F, + 47800 - 44032: 0xB8F6, + 47801 - 44032: 0xB8F7, + 47802 - 44032: 0x91A0, + 47803 - 44032: 0xB8F8, + 47804 - 44032: 0x91A1, + 47805 - 44032: 0xB8F9, + 47806 - 44032: 0x91A2, + 47807 - 44032: 0x91A3, + 47808 - 44032: 0x91A4, + 47809 - 44032: 0x91A5, + 47810 - 44032: 0x91A6, + 47811 - 44032: 0x91A7, + 47812 - 44032: 0xB8FA, + 47813 - 44032: 0x91A8, + 47814 - 44032: 0x91A9, + 47815 - 44032: 0x91AA, + 47816 - 44032: 0xB8FB, + 47817 - 44032: 0x91AB, + 47818 - 44032: 0x91AC, + 47819 - 44032: 0x91AD, + 47820 - 44032: 0x91AE, + 47821 - 44032: 0x91AF, + 47822 - 44032: 0x91B0, + 47823 - 44032: 0x91B1, + 47824 - 44032: 0x91B2, + 47825 - 44032: 0x91B3, + 47826 - 44032: 0x91B4, + 47827 - 44032: 0x91B5, + 47828 - 44032: 0x91B6, + 47829 - 44032: 0x91B7, + 47830 - 44032: 0x91B8, + 47831 - 44032: 0x91B9, + 47832 - 44032: 0xB8FC, + 47833 - 44032: 0xB8FD, + 47834 - 44032: 0x91BA, + 47835 - 44032: 0x91BB, + 47836 - 44032: 0x91BC, + 47837 - 44032: 0x91BD, + 47838 - 44032: 0x91BE, + 47839 - 44032: 0x91BF, + 47840 - 44032: 0x91C0, + 47841 - 44032: 0x91C1, + 47842 - 44032: 0x91C2, + 47843 - 44032: 0x91C3, + 47844 - 44032: 0x91C4, + 47845 - 44032: 0x91C5, + 47846 - 44032: 0x91C6, + 47847 - 44032: 0x91C7, + 47848 - 44032: 0x91C8, + 47849 - 44032: 0x91C9, + 47850 - 44032: 0x91CA, + 47851 - 44032: 0x91CB, + 47852 - 44032: 0x91CC, + 47853 - 44032: 0x91CD, + 47854 - 44032: 0x91CE, + 47855 - 44032: 0x91CF, + 47856 - 44032: 0x91D0, + 47857 - 44032: 0x91D1, + 47858 - 44032: 0x91D2, + 47859 - 44032: 0x91D3, + 47860 - 44032: 0x91D4, + 47861 - 44032: 0x91D5, + 47862 - 44032: 0x91D6, + 47863 - 44032: 0x91D7, + 47864 - 44032: 0x91D8, + 47865 - 44032: 0x91D9, + 47866 - 44032: 0x91DA, + 47867 - 44032: 0x91DB, + 47868 - 44032: 0xB8FE, + 47869 - 44032: 0x91DC, + 47870 - 44032: 0x91DD, + 47871 - 44032: 0x91DE, + 47872 - 44032: 0xB9A1, + 47873 - 44032: 0x91DF, + 47874 - 44032: 0x91E0, + 47875 - 44032: 0x91E1, + 47876 - 44032: 0xB9A2, + 47877 - 44032: 0x91E2, + 47878 - 44032: 0x91E3, + 47879 - 44032: 0x91E4, + 47880 - 44032: 0x91E5, + 47881 - 44032: 0x91E6, + 47882 - 44032: 0x91E7, + 47883 - 44032: 0x91E8, + 47884 - 44032: 0x91E9, + 47885 - 44032: 0xB9A3, + 47886 - 44032: 0x91EA, + 47887 - 44032: 0xB9A4, + 47888 - 44032: 0x91EB, + 47889 - 44032: 0xB9A5, + 47890 - 44032: 0x91EC, + 47891 - 44032: 0x91ED, + 47892 - 44032: 0x91EE, + 47893 - 44032: 0x91EF, + 47894 - 44032: 0x91F0, + 47895 - 44032: 0x91F1, + 47896 - 44032: 0xB9A6, + 47897 - 44032: 0x91F2, + 47898 - 44032: 0x91F3, + 47899 - 44032: 0x91F4, + 47900 - 44032: 0xB9A7, + 47901 - 44032: 0x91F5, + 47902 - 44032: 0x91F6, + 47903 - 44032: 0x91F7, + 47904 - 44032: 0xB9A8, + 47905 - 44032: 0x91F8, + 47906 - 44032: 0x91F9, + 47907 - 44032: 0x91FA, + 47908 - 44032: 0x91FB, + 47909 - 44032: 0x91FC, + 47910 - 44032: 0x91FD, + 47911 - 44032: 0x91FE, + 47912 - 44032: 0x9241, + 47913 - 44032: 0xB9A9, + 47914 - 44032: 0x9242, + 47915 - 44032: 0xB9AA, + 47916 - 44032: 0x9243, + 47917 - 44032: 0x9244, + 47918 - 44032: 0x9245, + 47919 - 44032: 0x9246, + 47920 - 44032: 0x9247, + 47921 - 44032: 0x9248, + 47922 - 44032: 0x9249, + 47923 - 44032: 0x924A, + 47924 - 44032: 0xB9AB, + 47925 - 44032: 0xB9AC, + 47926 - 44032: 0xB9AD, + 47927 - 44032: 0x924B, + 47928 - 44032: 0xB9AE, + 47929 - 44032: 0x924C, + 47930 - 44032: 0x924D, + 47931 - 44032: 0xB9AF, + 47932 - 44032: 0xB9B0, + 47933 - 44032: 0xB9B1, + 47934 - 44032: 0xB9B2, + 47935 - 44032: 0x924E, + 47936 - 44032: 0x924F, + 47937 - 44032: 0x9250, + 47938 - 44032: 0x9251, + 47939 - 44032: 0x9252, + 47940 - 44032: 0xB9B3, + 47941 - 44032: 0xB9B4, + 47942 - 44032: 0x9253, + 47943 - 44032: 0xB9B5, + 47944 - 44032: 0x9254, + 47945 - 44032: 0xB9B6, + 47946 - 44032: 0x9255, + 47947 - 44032: 0x9256, + 47948 - 44032: 0x9257, + 47949 - 44032: 0xB9B7, + 47950 - 44032: 0x9258, + 47951 - 44032: 0xB9B8, + 47952 - 44032: 0xB9B9, + 47953 - 44032: 0x9259, + 47954 - 44032: 0x925A, + 47955 - 44032: 0x9261, + 47956 - 44032: 0xB9BA, + 47957 - 44032: 0x9262, + 47958 - 44032: 0x9263, + 47959 - 44032: 0x9264, + 47960 - 44032: 0xB9BB, + 47961 - 44032: 0x9265, + 47962 - 44032: 0x9266, + 47963 - 44032: 0x9267, + 47964 - 44032: 0x9268, + 47965 - 44032: 0x9269, + 47966 - 44032: 0x926A, + 47967 - 44032: 0x926B, + 47968 - 44032: 0x926C, + 47969 - 44032: 0xB9BC, + 47970 - 44032: 0x926D, + 47971 - 44032: 0xB9BD, + 47972 - 44032: 0x926E, + 47973 - 44032: 0x926F, + 47974 - 44032: 0x9270, + 47975 - 44032: 0x9271, + 47976 - 44032: 0x9272, + 47977 - 44032: 0x9273, + 47978 - 44032: 0x9274, + 47979 - 44032: 0x9275, + 47980 - 44032: 0xB9BE, + 47981 - 44032: 0x9276, + 47982 - 44032: 0x9277, + 47983 - 44032: 0x9278, + 47984 - 44032: 0x9279, + 47985 - 44032: 0x927A, + 47986 - 44032: 0x9281, + 47987 - 44032: 0x9282, + 47988 - 44032: 0x9283, + 47989 - 44032: 0x9284, + 47990 - 44032: 0x9285, + 47991 - 44032: 0x9286, + 47992 - 44032: 0x9287, + 47993 - 44032: 0x9288, + 47994 - 44032: 0x9289, + 47995 - 44032: 0x928A, + 47996 - 44032: 0x928B, + 47997 - 44032: 0x928C, + 47998 - 44032: 0x928D, + 47999 - 44032: 0x928E, + 48000 - 44032: 0x928F, + 48001 - 44032: 0x9290, + 48002 - 44032: 0x9291, + 48003 - 44032: 0x9292, + 48004 - 44032: 0x9293, + 48005 - 44032: 0x9294, + 48006 - 44032: 0x9295, + 48007 - 44032: 0x9296, + 48008 - 44032: 0xB9BF, + 48009 - 44032: 0x9297, + 48010 - 44032: 0x9298, + 48011 - 44032: 0x9299, + 48012 - 44032: 0xB9C0, + 48013 - 44032: 0x929A, + 48014 - 44032: 0x929B, + 48015 - 44032: 0x929C, + 48016 - 44032: 0xB9C1, + 48017 - 44032: 0x929D, + 48018 - 44032: 0x929E, + 48019 - 44032: 0x929F, + 48020 - 44032: 0x92A0, + 48021 - 44032: 0x92A1, + 48022 - 44032: 0x92A2, + 48023 - 44032: 0x92A3, + 48024 - 44032: 0x92A4, + 48025 - 44032: 0x92A5, + 48026 - 44032: 0x92A6, + 48027 - 44032: 0x92A7, + 48028 - 44032: 0x92A8, + 48029 - 44032: 0x92A9, + 48030 - 44032: 0x92AA, + 48031 - 44032: 0x92AB, + 48032 - 44032: 0x92AC, + 48033 - 44032: 0x92AD, + 48034 - 44032: 0x92AE, + 48035 - 44032: 0x92AF, + 48036 - 44032: 0xB9C2, + 48037 - 44032: 0x92B0, + 48038 - 44032: 0x92B1, + 48039 - 44032: 0x92B2, + 48040 - 44032: 0xB9C3, + 48041 - 44032: 0x92B3, + 48042 - 44032: 0x92B4, + 48043 - 44032: 0x92B5, + 48044 - 44032: 0xB9C4, + 48045 - 44032: 0x92B6, + 48046 - 44032: 0x92B7, + 48047 - 44032: 0x92B8, + 48048 - 44032: 0x92B9, + 48049 - 44032: 0x92BA, + 48050 - 44032: 0x92BB, + 48051 - 44032: 0x92BC, + 48052 - 44032: 0xB9C5, + 48053 - 44032: 0x92BD, + 48054 - 44032: 0x92BE, + 48055 - 44032: 0xB9C6, + 48056 - 44032: 0x92BF, + 48057 - 44032: 0x92C0, + 48058 - 44032: 0x92C1, + 48059 - 44032: 0x92C2, + 48060 - 44032: 0x92C3, + 48061 - 44032: 0x92C4, + 48062 - 44032: 0x92C5, + 48063 - 44032: 0x92C6, + 48064 - 44032: 0xB9C7, + 48065 - 44032: 0x92C7, + 48066 - 44032: 0x92C8, + 48067 - 44032: 0x92C9, + 48068 - 44032: 0xB9C8, + 48069 - 44032: 0x92CA, + 48070 - 44032: 0x92CB, + 48071 - 44032: 0x92CC, + 48072 - 44032: 0xB9C9, + 48073 - 44032: 0x92CD, + 48074 - 44032: 0x92CE, + 48075 - 44032: 0x92CF, + 48076 - 44032: 0x92D0, + 48077 - 44032: 0x92D1, + 48078 - 44032: 0x92D2, + 48079 - 44032: 0x92D3, + 48080 - 44032: 0xB9CA, + 48081 - 44032: 0x92D4, + 48082 - 44032: 0x92D5, + 48083 - 44032: 0xB9CB, + 48084 - 44032: 0x92D6, + 48085 - 44032: 0x92D7, + 48086 - 44032: 0x92D8, + 48087 - 44032: 0x92D9, + 48088 - 44032: 0x92DA, + 48089 - 44032: 0x92DB, + 48090 - 44032: 0x92DC, + 48091 - 44032: 0x92DD, + 48092 - 44032: 0x92DE, + 48093 - 44032: 0x92DF, + 48094 - 44032: 0x92E0, + 48095 - 44032: 0x92E1, + 48096 - 44032: 0x92E2, + 48097 - 44032: 0x92E3, + 48098 - 44032: 0x92E4, + 48099 - 44032: 0x92E5, + 48100 - 44032: 0x92E6, + 48101 - 44032: 0x92E7, + 48102 - 44032: 0x92E8, + 48103 - 44032: 0x92E9, + 48104 - 44032: 0x92EA, + 48105 - 44032: 0x92EB, + 48106 - 44032: 0x92EC, + 48107 - 44032: 0x92ED, + 48108 - 44032: 0x92EE, + 48109 - 44032: 0x92EF, + 48110 - 44032: 0x92F0, + 48111 - 44032: 0x92F1, + 48112 - 44032: 0x92F2, + 48113 - 44032: 0x92F3, + 48114 - 44032: 0x92F4, + 48115 - 44032: 0x92F5, + 48116 - 44032: 0x92F6, + 48117 - 44032: 0x92F7, + 48118 - 44032: 0x92F8, + 48119 - 44032: 0x92F9, + 48120 - 44032: 0xB9CC, + 48121 - 44032: 0xB9CD, + 48122 - 44032: 0x92FA, + 48123 - 44032: 0x92FB, + 48124 - 44032: 0xB9CE, + 48125 - 44032: 0x92FC, + 48126 - 44032: 0x92FD, + 48127 - 44032: 0xB9CF, + 48128 - 44032: 0xB9D0, + 48129 - 44032: 0x92FE, + 48130 - 44032: 0xB9D1, + 48131 - 44032: 0x9341, + 48132 - 44032: 0x9342, + 48133 - 44032: 0x9343, + 48134 - 44032: 0x9344, + 48135 - 44032: 0x9345, + 48136 - 44032: 0xB9D2, + 48137 - 44032: 0xB9D3, + 48138 - 44032: 0x9346, + 48139 - 44032: 0xB9D4, + 48140 - 44032: 0xB9D5, + 48141 - 44032: 0xB9D6, + 48142 - 44032: 0x9347, + 48143 - 44032: 0xB9D7, + 48144 - 44032: 0x9348, + 48145 - 44032: 0xB9D8, + 48146 - 44032: 0x9349, + 48147 - 44032: 0x934A, + 48148 - 44032: 0xB9D9, + 48149 - 44032: 0xB9DA, + 48150 - 44032: 0xB9DB, + 48151 - 44032: 0xB9DC, + 48152 - 44032: 0xB9DD, + 48153 - 44032: 0x934B, + 48154 - 44032: 0x934C, + 48155 - 44032: 0xB9DE, + 48156 - 44032: 0xB9DF, + 48157 - 44032: 0xB9E0, + 48158 - 44032: 0xB9E1, + 48159 - 44032: 0xB9E2, + 48160 - 44032: 0x934D, + 48161 - 44032: 0x934E, + 48162 - 44032: 0x934F, + 48163 - 44032: 0x9350, + 48164 - 44032: 0xB9E3, + 48165 - 44032: 0xB9E4, + 48166 - 44032: 0x9351, + 48167 - 44032: 0xB9E5, + 48168 - 44032: 0x9352, + 48169 - 44032: 0xB9E6, + 48170 - 44032: 0x9353, + 48171 - 44032: 0x9354, + 48172 - 44032: 0x9355, + 48173 - 44032: 0xB9E7, + 48174 - 44032: 0x9356, + 48175 - 44032: 0x9357, + 48176 - 44032: 0xB9E8, + 48177 - 44032: 0xB9E9, + 48178 - 44032: 0x9358, + 48179 - 44032: 0x9359, + 48180 - 44032: 0xB9EA, + 48181 - 44032: 0x935A, + 48182 - 44032: 0x9361, + 48183 - 44032: 0x9362, + 48184 - 44032: 0xB9EB, + 48185 - 44032: 0x9363, + 48186 - 44032: 0x9364, + 48187 - 44032: 0x9365, + 48188 - 44032: 0x9366, + 48189 - 44032: 0x9367, + 48190 - 44032: 0x9368, + 48191 - 44032: 0x9369, + 48192 - 44032: 0xB9EC, + 48193 - 44032: 0xB9ED, + 48194 - 44032: 0x936A, + 48195 - 44032: 0xB9EE, + 48196 - 44032: 0xB9EF, + 48197 - 44032: 0xB9F0, + 48198 - 44032: 0x936B, + 48199 - 44032: 0x936C, + 48200 - 44032: 0x936D, + 48201 - 44032: 0xB9F1, + 48202 - 44032: 0x936E, + 48203 - 44032: 0x936F, + 48204 - 44032: 0xB9F2, + 48205 - 44032: 0xB9F3, + 48206 - 44032: 0x9370, + 48207 - 44032: 0x9371, + 48208 - 44032: 0xB9F4, + 48209 - 44032: 0x9372, + 48210 - 44032: 0x9373, + 48211 - 44032: 0x9374, + 48212 - 44032: 0x9375, + 48213 - 44032: 0x9376, + 48214 - 44032: 0x9377, + 48215 - 44032: 0x9378, + 48216 - 44032: 0x9379, + 48217 - 44032: 0x937A, + 48218 - 44032: 0x9381, + 48219 - 44032: 0x9382, + 48220 - 44032: 0x9383, + 48221 - 44032: 0xB9F5, + 48222 - 44032: 0x9384, + 48223 - 44032: 0x9385, + 48224 - 44032: 0x9386, + 48225 - 44032: 0x9387, + 48226 - 44032: 0x9388, + 48227 - 44032: 0x9389, + 48228 - 44032: 0x938A, + 48229 - 44032: 0x938B, + 48230 - 44032: 0x938C, + 48231 - 44032: 0x938D, + 48232 - 44032: 0x938E, + 48233 - 44032: 0x938F, + 48234 - 44032: 0x9390, + 48235 - 44032: 0x9391, + 48236 - 44032: 0x9392, + 48237 - 44032: 0x9393, + 48238 - 44032: 0x9394, + 48239 - 44032: 0x9395, + 48240 - 44032: 0x9396, + 48241 - 44032: 0x9397, + 48242 - 44032: 0x9398, + 48243 - 44032: 0x9399, + 48244 - 44032: 0x939A, + 48245 - 44032: 0x939B, + 48246 - 44032: 0x939C, + 48247 - 44032: 0x939D, + 48248 - 44032: 0x939E, + 48249 - 44032: 0x939F, + 48250 - 44032: 0x93A0, + 48251 - 44032: 0x93A1, + 48252 - 44032: 0x93A2, + 48253 - 44032: 0x93A3, + 48254 - 44032: 0x93A4, + 48255 - 44032: 0x93A5, + 48256 - 44032: 0x93A6, + 48257 - 44032: 0x93A7, + 48258 - 44032: 0x93A8, + 48259 - 44032: 0x93A9, + 48260 - 44032: 0xB9F6, + 48261 - 44032: 0xB9F7, + 48262 - 44032: 0x93AA, + 48263 - 44032: 0x93AB, + 48264 - 44032: 0xB9F8, + 48265 - 44032: 0x93AC, + 48266 - 44032: 0x93AD, + 48267 - 44032: 0xB9F9, + 48268 - 44032: 0xB9FA, + 48269 - 44032: 0x93AE, + 48270 - 44032: 0xB9FB, + 48271 - 44032: 0x93AF, + 48272 - 44032: 0x93B0, + 48273 - 44032: 0x93B1, + 48274 - 44032: 0x93B2, + 48275 - 44032: 0x93B3, + 48276 - 44032: 0xB9FC, + 48277 - 44032: 0xB9FD, + 48278 - 44032: 0x93B4, + 48279 - 44032: 0xB9FE, + 48280 - 44032: 0x93B5, + 48281 - 44032: 0xBAA1, + 48282 - 44032: 0xBAA2, + 48283 - 44032: 0x93B6, + 48284 - 44032: 0x93B7, + 48285 - 44032: 0x93B8, + 48286 - 44032: 0x93B9, + 48287 - 44032: 0x93BA, + 48288 - 44032: 0xBAA3, + 48289 - 44032: 0xBAA4, + 48290 - 44032: 0x93BB, + 48291 - 44032: 0x93BC, + 48292 - 44032: 0xBAA5, + 48293 - 44032: 0x93BD, + 48294 - 44032: 0x93BE, + 48295 - 44032: 0xBAA6, + 48296 - 44032: 0xBAA7, + 48297 - 44032: 0x93BF, + 48298 - 44032: 0x93C0, + 48299 - 44032: 0x93C1, + 48300 - 44032: 0x93C2, + 48301 - 44032: 0x93C3, + 48302 - 44032: 0x93C4, + 48303 - 44032: 0x93C5, + 48304 - 44032: 0xBAA8, + 48305 - 44032: 0xBAA9, + 48306 - 44032: 0x93C6, + 48307 - 44032: 0xBAAA, + 48308 - 44032: 0xBAAB, + 48309 - 44032: 0xBAAC, + 48310 - 44032: 0x93C7, + 48311 - 44032: 0x93C8, + 48312 - 44032: 0x93C9, + 48313 - 44032: 0x93CA, + 48314 - 44032: 0x93CB, + 48315 - 44032: 0x93CC, + 48316 - 44032: 0xBAAD, + 48317 - 44032: 0xBAAE, + 48318 - 44032: 0x93CD, + 48319 - 44032: 0x93CE, + 48320 - 44032: 0xBAAF, + 48321 - 44032: 0x93CF, + 48322 - 44032: 0x93D0, + 48323 - 44032: 0x93D1, + 48324 - 44032: 0xBAB0, + 48325 - 44032: 0x93D2, + 48326 - 44032: 0x93D3, + 48327 - 44032: 0x93D4, + 48328 - 44032: 0x93D5, + 48329 - 44032: 0x93D6, + 48330 - 44032: 0x93D7, + 48331 - 44032: 0x93D8, + 48332 - 44032: 0x93D9, + 48333 - 44032: 0xBAB1, + 48334 - 44032: 0x93DA, + 48335 - 44032: 0xBAB2, + 48336 - 44032: 0xBAB3, + 48337 - 44032: 0xBAB4, + 48338 - 44032: 0x93DB, + 48339 - 44032: 0x93DC, + 48340 - 44032: 0x93DD, + 48341 - 44032: 0xBAB5, + 48342 - 44032: 0x93DE, + 48343 - 44032: 0x93DF, + 48344 - 44032: 0xBAB6, + 48345 - 44032: 0x93E0, + 48346 - 44032: 0x93E1, + 48347 - 44032: 0x93E2, + 48348 - 44032: 0xBAB7, + 48349 - 44032: 0x93E3, + 48350 - 44032: 0x93E4, + 48351 - 44032: 0x93E5, + 48352 - 44032: 0x93E6, + 48353 - 44032: 0x93E7, + 48354 - 44032: 0x93E8, + 48355 - 44032: 0x93E9, + 48356 - 44032: 0x93EA, + 48357 - 44032: 0x93EB, + 48358 - 44032: 0x93EC, + 48359 - 44032: 0x93ED, + 48360 - 44032: 0x93EE, + 48361 - 44032: 0x93EF, + 48362 - 44032: 0x93F0, + 48363 - 44032: 0x93F1, + 48364 - 44032: 0x93F2, + 48365 - 44032: 0x93F3, + 48366 - 44032: 0x93F4, + 48367 - 44032: 0x93F5, + 48368 - 44032: 0x93F6, + 48369 - 44032: 0x93F7, + 48370 - 44032: 0x93F8, + 48371 - 44032: 0x93F9, + 48372 - 44032: 0xBAB8, + 48373 - 44032: 0xBAB9, + 48374 - 44032: 0xBABA, + 48375 - 44032: 0x93FA, + 48376 - 44032: 0xBABB, + 48377 - 44032: 0x93FB, + 48378 - 44032: 0x93FC, + 48379 - 44032: 0x93FD, + 48380 - 44032: 0xBABC, + 48381 - 44032: 0x93FE, + 48382 - 44032: 0x9441, + 48383 - 44032: 0x9442, + 48384 - 44032: 0x9443, + 48385 - 44032: 0x9444, + 48386 - 44032: 0x9445, + 48387 - 44032: 0x9446, + 48388 - 44032: 0xBABD, + 48389 - 44032: 0xBABE, + 48390 - 44032: 0x9447, + 48391 - 44032: 0xBABF, + 48392 - 44032: 0x9448, + 48393 - 44032: 0xBAC0, + 48394 - 44032: 0x9449, + 48395 - 44032: 0x944A, + 48396 - 44032: 0x944B, + 48397 - 44032: 0x944C, + 48398 - 44032: 0x944D, + 48399 - 44032: 0x944E, + 48400 - 44032: 0xBAC1, + 48401 - 44032: 0x944F, + 48402 - 44032: 0x9450, + 48403 - 44032: 0x9451, + 48404 - 44032: 0xBAC2, + 48405 - 44032: 0x9452, + 48406 - 44032: 0x9453, + 48407 - 44032: 0x9454, + 48408 - 44032: 0x9455, + 48409 - 44032: 0x9456, + 48410 - 44032: 0x9457, + 48411 - 44032: 0x9458, + 48412 - 44032: 0x9459, + 48413 - 44032: 0x945A, + 48414 - 44032: 0x9461, + 48415 - 44032: 0x9462, + 48416 - 44032: 0x9463, + 48417 - 44032: 0x9464, + 48418 - 44032: 0x9465, + 48419 - 44032: 0x9466, + 48420 - 44032: 0xBAC3, + 48421 - 44032: 0x9467, + 48422 - 44032: 0x9468, + 48423 - 44032: 0x9469, + 48424 - 44032: 0x946A, + 48425 - 44032: 0x946B, + 48426 - 44032: 0x946C, + 48427 - 44032: 0x946D, + 48428 - 44032: 0xBAC4, + 48429 - 44032: 0x946E, + 48430 - 44032: 0x946F, + 48431 - 44032: 0x9470, + 48432 - 44032: 0x9471, + 48433 - 44032: 0x9472, + 48434 - 44032: 0x9473, + 48435 - 44032: 0x9474, + 48436 - 44032: 0x9475, + 48437 - 44032: 0x9476, + 48438 - 44032: 0x9477, + 48439 - 44032: 0x9478, + 48440 - 44032: 0x9479, + 48441 - 44032: 0x947A, + 48442 - 44032: 0x9481, + 48443 - 44032: 0x9482, + 48444 - 44032: 0x9483, + 48445 - 44032: 0x9484, + 48446 - 44032: 0x9485, + 48447 - 44032: 0x9486, + 48448 - 44032: 0xBAC5, + 48449 - 44032: 0x9487, + 48450 - 44032: 0x9488, + 48451 - 44032: 0x9489, + 48452 - 44032: 0x948A, + 48453 - 44032: 0x948B, + 48454 - 44032: 0x948C, + 48455 - 44032: 0x948D, + 48456 - 44032: 0xBAC6, + 48457 - 44032: 0xBAC7, + 48458 - 44032: 0x948E, + 48459 - 44032: 0x948F, + 48460 - 44032: 0xBAC8, + 48461 - 44032: 0x9490, + 48462 - 44032: 0x9491, + 48463 - 44032: 0x9492, + 48464 - 44032: 0xBAC9, + 48465 - 44032: 0x9493, + 48466 - 44032: 0x9494, + 48467 - 44032: 0x9495, + 48468 - 44032: 0x9496, + 48469 - 44032: 0x9497, + 48470 - 44032: 0x9498, + 48471 - 44032: 0x9499, + 48472 - 44032: 0xBACA, + 48473 - 44032: 0xBACB, + 48474 - 44032: 0x949A, + 48475 - 44032: 0x949B, + 48476 - 44032: 0x949C, + 48477 - 44032: 0x949D, + 48478 - 44032: 0x949E, + 48479 - 44032: 0x949F, + 48480 - 44032: 0x94A0, + 48481 - 44032: 0x94A1, + 48482 - 44032: 0x94A2, + 48483 - 44032: 0x94A3, + 48484 - 44032: 0xBACC, + 48485 - 44032: 0x94A4, + 48486 - 44032: 0x94A5, + 48487 - 44032: 0x94A6, + 48488 - 44032: 0xBACD, + 48489 - 44032: 0x94A7, + 48490 - 44032: 0x94A8, + 48491 - 44032: 0x94A9, + 48492 - 44032: 0x94AA, + 48493 - 44032: 0x94AB, + 48494 - 44032: 0x94AC, + 48495 - 44032: 0x94AD, + 48496 - 44032: 0x94AE, + 48497 - 44032: 0x94AF, + 48498 - 44032: 0x94B0, + 48499 - 44032: 0x94B1, + 48500 - 44032: 0x94B2, + 48501 - 44032: 0x94B3, + 48502 - 44032: 0x94B4, + 48503 - 44032: 0x94B5, + 48504 - 44032: 0x94B6, + 48505 - 44032: 0x94B7, + 48506 - 44032: 0x94B8, + 48507 - 44032: 0x94B9, + 48508 - 44032: 0x94BA, + 48509 - 44032: 0x94BB, + 48510 - 44032: 0x94BC, + 48511 - 44032: 0x94BD, + 48512 - 44032: 0xBACE, + 48513 - 44032: 0xBACF, + 48514 - 44032: 0x94BE, + 48515 - 44032: 0x94BF, + 48516 - 44032: 0xBAD0, + 48517 - 44032: 0x94C0, + 48518 - 44032: 0x94C1, + 48519 - 44032: 0xBAD1, + 48520 - 44032: 0xBAD2, + 48521 - 44032: 0xBAD3, + 48522 - 44032: 0xBAD4, + 48523 - 44032: 0x94C2, + 48524 - 44032: 0x94C3, + 48525 - 44032: 0x94C4, + 48526 - 44032: 0x94C5, + 48527 - 44032: 0x94C6, + 48528 - 44032: 0xBAD5, + 48529 - 44032: 0xBAD6, + 48530 - 44032: 0x94C7, + 48531 - 44032: 0xBAD7, + 48532 - 44032: 0x94C8, + 48533 - 44032: 0xBAD8, + 48534 - 44032: 0x94C9, + 48535 - 44032: 0x94CA, + 48536 - 44032: 0x94CB, + 48537 - 44032: 0xBAD9, + 48538 - 44032: 0xBADA, + 48539 - 44032: 0x94CC, + 48540 - 44032: 0xBADB, + 48541 - 44032: 0x94CD, + 48542 - 44032: 0x94CE, + 48543 - 44032: 0x94CF, + 48544 - 44032: 0x94D0, + 48545 - 44032: 0x94D1, + 48546 - 44032: 0x94D2, + 48547 - 44032: 0x94D3, + 48548 - 44032: 0xBADC, + 48549 - 44032: 0x94D4, + 48550 - 44032: 0x94D5, + 48551 - 44032: 0x94D6, + 48552 - 44032: 0x94D7, + 48553 - 44032: 0x94D8, + 48554 - 44032: 0x94D9, + 48555 - 44032: 0x94DA, + 48556 - 44032: 0x94DB, + 48557 - 44032: 0x94DC, + 48558 - 44032: 0x94DD, + 48559 - 44032: 0x94DE, + 48560 - 44032: 0xBADD, + 48561 - 44032: 0x94DF, + 48562 - 44032: 0x94E0, + 48563 - 44032: 0x94E1, + 48564 - 44032: 0x94E2, + 48565 - 44032: 0x94E3, + 48566 - 44032: 0x94E4, + 48567 - 44032: 0x94E5, + 48568 - 44032: 0xBADE, + 48569 - 44032: 0x94E6, + 48570 - 44032: 0x94E7, + 48571 - 44032: 0x94E8, + 48572 - 44032: 0x94E9, + 48573 - 44032: 0x94EA, + 48574 - 44032: 0x94EB, + 48575 - 44032: 0x94EC, + 48576 - 44032: 0x94ED, + 48577 - 44032: 0x94EE, + 48578 - 44032: 0x94EF, + 48579 - 44032: 0x94F0, + 48580 - 44032: 0x94F1, + 48581 - 44032: 0x94F2, + 48582 - 44032: 0x94F3, + 48583 - 44032: 0x94F4, + 48584 - 44032: 0x94F5, + 48585 - 44032: 0x94F6, + 48586 - 44032: 0x94F7, + 48587 - 44032: 0x94F8, + 48588 - 44032: 0x94F9, + 48589 - 44032: 0x94FA, + 48590 - 44032: 0x94FB, + 48591 - 44032: 0x94FC, + 48592 - 44032: 0x94FD, + 48593 - 44032: 0x94FE, + 48594 - 44032: 0x9541, + 48595 - 44032: 0x9542, + 48596 - 44032: 0xBADF, + 48597 - 44032: 0xBAE0, + 48598 - 44032: 0x9543, + 48599 - 44032: 0x9544, + 48600 - 44032: 0xBAE1, + 48601 - 44032: 0x9545, + 48602 - 44032: 0x9546, + 48603 - 44032: 0x9547, + 48604 - 44032: 0xBAE2, + 48605 - 44032: 0x9548, + 48606 - 44032: 0x9549, + 48607 - 44032: 0x954A, + 48608 - 44032: 0x954B, + 48609 - 44032: 0x954C, + 48610 - 44032: 0x954D, + 48611 - 44032: 0x954E, + 48612 - 44032: 0x954F, + 48613 - 44032: 0x9550, + 48614 - 44032: 0x9551, + 48615 - 44032: 0x9552, + 48616 - 44032: 0x9553, + 48617 - 44032: 0xBAE3, + 48618 - 44032: 0x9554, + 48619 - 44032: 0x9555, + 48620 - 44032: 0x9556, + 48621 - 44032: 0x9557, + 48622 - 44032: 0x9558, + 48623 - 44032: 0x9559, + 48624 - 44032: 0xBAE4, + 48625 - 44032: 0x955A, + 48626 - 44032: 0x9561, + 48627 - 44032: 0x9562, + 48628 - 44032: 0xBAE5, + 48629 - 44032: 0x9563, + 48630 - 44032: 0x9564, + 48631 - 44032: 0x9565, + 48632 - 44032: 0xBAE6, + 48633 - 44032: 0x9566, + 48634 - 44032: 0x9567, + 48635 - 44032: 0x9568, + 48636 - 44032: 0x9569, + 48637 - 44032: 0x956A, + 48638 - 44032: 0x956B, + 48639 - 44032: 0x956C, + 48640 - 44032: 0xBAE7, + 48641 - 44032: 0x956D, + 48642 - 44032: 0x956E, + 48643 - 44032: 0xBAE8, + 48644 - 44032: 0x956F, + 48645 - 44032: 0xBAE9, + 48646 - 44032: 0x9570, + 48647 - 44032: 0x9571, + 48648 - 44032: 0x9572, + 48649 - 44032: 0x9573, + 48650 - 44032: 0x9574, + 48651 - 44032: 0x9575, + 48652 - 44032: 0xBAEA, + 48653 - 44032: 0xBAEB, + 48654 - 44032: 0x9576, + 48655 - 44032: 0x9577, + 48656 - 44032: 0xBAEC, + 48657 - 44032: 0x9578, + 48658 - 44032: 0x9579, + 48659 - 44032: 0x957A, + 48660 - 44032: 0xBAED, + 48661 - 44032: 0x9581, + 48662 - 44032: 0x9582, + 48663 - 44032: 0x9583, + 48664 - 44032: 0x9584, + 48665 - 44032: 0x9585, + 48666 - 44032: 0x9586, + 48667 - 44032: 0x9587, + 48668 - 44032: 0xBAEE, + 48669 - 44032: 0xBAEF, + 48670 - 44032: 0x9588, + 48671 - 44032: 0xBAF0, + 48672 - 44032: 0x9589, + 48673 - 44032: 0x958A, + 48674 - 44032: 0x958B, + 48675 - 44032: 0x958C, + 48676 - 44032: 0x958D, + 48677 - 44032: 0x958E, + 48678 - 44032: 0x958F, + 48679 - 44032: 0x9590, + 48680 - 44032: 0x9591, + 48681 - 44032: 0x9592, + 48682 - 44032: 0x9593, + 48683 - 44032: 0x9594, + 48684 - 44032: 0x9595, + 48685 - 44032: 0x9596, + 48686 - 44032: 0x9597, + 48687 - 44032: 0x9598, + 48688 - 44032: 0x9599, + 48689 - 44032: 0x959A, + 48690 - 44032: 0x959B, + 48691 - 44032: 0x959C, + 48692 - 44032: 0x959D, + 48693 - 44032: 0x959E, + 48694 - 44032: 0x959F, + 48695 - 44032: 0x95A0, + 48696 - 44032: 0x95A1, + 48697 - 44032: 0x95A2, + 48698 - 44032: 0x95A3, + 48699 - 44032: 0x95A4, + 48700 - 44032: 0x95A5, + 48701 - 44032: 0x95A6, + 48702 - 44032: 0x95A7, + 48703 - 44032: 0x95A8, + 48704 - 44032: 0x95A9, + 48705 - 44032: 0x95AA, + 48706 - 44032: 0x95AB, + 48707 - 44032: 0x95AC, + 48708 - 44032: 0xBAF1, + 48709 - 44032: 0xBAF2, + 48710 - 44032: 0x95AD, + 48711 - 44032: 0x95AE, + 48712 - 44032: 0xBAF3, + 48713 - 44032: 0x95AF, + 48714 - 44032: 0x95B0, + 48715 - 44032: 0x95B1, + 48716 - 44032: 0xBAF4, + 48717 - 44032: 0x95B2, + 48718 - 44032: 0xBAF5, + 48719 - 44032: 0x95B3, + 48720 - 44032: 0x95B4, + 48721 - 44032: 0x95B5, + 48722 - 44032: 0x95B6, + 48723 - 44032: 0x95B7, + 48724 - 44032: 0xBAF6, + 48725 - 44032: 0xBAF7, + 48726 - 44032: 0x95B8, + 48727 - 44032: 0xBAF8, + 48728 - 44032: 0x95B9, + 48729 - 44032: 0xBAF9, + 48730 - 44032: 0xBAFA, + 48731 - 44032: 0xBAFB, + 48732 - 44032: 0x95BA, + 48733 - 44032: 0x95BB, + 48734 - 44032: 0x95BC, + 48735 - 44032: 0x95BD, + 48736 - 44032: 0xBAFC, + 48737 - 44032: 0xBAFD, + 48738 - 44032: 0x95BE, + 48739 - 44032: 0x95BF, + 48740 - 44032: 0xBAFE, + 48741 - 44032: 0x95C0, + 48742 - 44032: 0x95C1, + 48743 - 44032: 0x95C2, + 48744 - 44032: 0xBBA1, + 48745 - 44032: 0x95C3, + 48746 - 44032: 0xBBA2, + 48747 - 44032: 0x95C4, + 48748 - 44032: 0x95C5, + 48749 - 44032: 0x95C6, + 48750 - 44032: 0x95C7, + 48751 - 44032: 0x95C8, + 48752 - 44032: 0xBBA3, + 48753 - 44032: 0xBBA4, + 48754 - 44032: 0x95C9, + 48755 - 44032: 0xBBA5, + 48756 - 44032: 0xBBA6, + 48757 - 44032: 0xBBA7, + 48758 - 44032: 0x95CA, + 48759 - 44032: 0x95CB, + 48760 - 44032: 0x95CC, + 48761 - 44032: 0x95CD, + 48762 - 44032: 0x95CE, + 48763 - 44032: 0xBBA8, + 48764 - 44032: 0xBBA9, + 48765 - 44032: 0xBBAA, + 48766 - 44032: 0x95CF, + 48767 - 44032: 0x95D0, + 48768 - 44032: 0xBBAB, + 48769 - 44032: 0x95D1, + 48770 - 44032: 0x95D2, + 48771 - 44032: 0x95D3, + 48772 - 44032: 0xBBAC, + 48773 - 44032: 0x95D4, + 48774 - 44032: 0x95D5, + 48775 - 44032: 0x95D6, + 48776 - 44032: 0x95D7, + 48777 - 44032: 0x95D8, + 48778 - 44032: 0x95D9, + 48779 - 44032: 0x95DA, + 48780 - 44032: 0xBBAD, + 48781 - 44032: 0xBBAE, + 48782 - 44032: 0x95DB, + 48783 - 44032: 0xBBAF, + 48784 - 44032: 0xBBB0, + 48785 - 44032: 0xBBB1, + 48786 - 44032: 0x95DC, + 48787 - 44032: 0x95DD, + 48788 - 44032: 0x95DE, + 48789 - 44032: 0x95DF, + 48790 - 44032: 0x95E0, + 48791 - 44032: 0x95E1, + 48792 - 44032: 0xBBB2, + 48793 - 44032: 0xBBB3, + 48794 - 44032: 0x95E2, + 48795 - 44032: 0x95E3, + 48796 - 44032: 0x95E4, + 48797 - 44032: 0x95E5, + 48798 - 44032: 0x95E6, + 48799 - 44032: 0x95E7, + 48800 - 44032: 0x95E8, + 48801 - 44032: 0x95E9, + 48802 - 44032: 0x95EA, + 48803 - 44032: 0x95EB, + 48804 - 44032: 0x95EC, + 48805 - 44032: 0x95ED, + 48806 - 44032: 0x95EE, + 48807 - 44032: 0x95EF, + 48808 - 44032: 0xBBB4, + 48809 - 44032: 0x95F0, + 48810 - 44032: 0x95F1, + 48811 - 44032: 0x95F2, + 48812 - 44032: 0x95F3, + 48813 - 44032: 0x95F4, + 48814 - 44032: 0x95F5, + 48815 - 44032: 0x95F6, + 48816 - 44032: 0x95F7, + 48817 - 44032: 0x95F8, + 48818 - 44032: 0x95F9, + 48819 - 44032: 0x95FA, + 48820 - 44032: 0x95FB, + 48821 - 44032: 0x95FC, + 48822 - 44032: 0x95FD, + 48823 - 44032: 0x95FE, + 48824 - 44032: 0x9641, + 48825 - 44032: 0x9642, + 48826 - 44032: 0x9643, + 48827 - 44032: 0x9644, + 48828 - 44032: 0x9645, + 48829 - 44032: 0x9646, + 48830 - 44032: 0x9647, + 48831 - 44032: 0x9648, + 48832 - 44032: 0x9649, + 48833 - 44032: 0x964A, + 48834 - 44032: 0x964B, + 48835 - 44032: 0x964C, + 48836 - 44032: 0x964D, + 48837 - 44032: 0x964E, + 48838 - 44032: 0x964F, + 48839 - 44032: 0x9650, + 48840 - 44032: 0x9651, + 48841 - 44032: 0x9652, + 48842 - 44032: 0x9653, + 48843 - 44032: 0x9654, + 48844 - 44032: 0x9655, + 48845 - 44032: 0x9656, + 48846 - 44032: 0x9657, + 48847 - 44032: 0x9658, + 48848 - 44032: 0xBBB5, + 48849 - 44032: 0xBBB6, + 48850 - 44032: 0x9659, + 48851 - 44032: 0x965A, + 48852 - 44032: 0xBBB7, + 48853 - 44032: 0x9661, + 48854 - 44032: 0x9662, + 48855 - 44032: 0xBBB8, + 48856 - 44032: 0xBBB9, + 48857 - 44032: 0x9663, + 48858 - 44032: 0x9664, + 48859 - 44032: 0x9665, + 48860 - 44032: 0x9666, + 48861 - 44032: 0x9667, + 48862 - 44032: 0x9668, + 48863 - 44032: 0x9669, + 48864 - 44032: 0xBBBA, + 48865 - 44032: 0x966A, + 48866 - 44032: 0x966B, + 48867 - 44032: 0xBBBB, + 48868 - 44032: 0xBBBC, + 48869 - 44032: 0xBBBD, + 48870 - 44032: 0x966C, + 48871 - 44032: 0x966D, + 48872 - 44032: 0x966E, + 48873 - 44032: 0x966F, + 48874 - 44032: 0x9670, + 48875 - 44032: 0x9671, + 48876 - 44032: 0xBBBE, + 48877 - 44032: 0x9672, + 48878 - 44032: 0x9673, + 48879 - 44032: 0x9674, + 48880 - 44032: 0x9675, + 48881 - 44032: 0x9676, + 48882 - 44032: 0x9677, + 48883 - 44032: 0x9678, + 48884 - 44032: 0x9679, + 48885 - 44032: 0x967A, + 48886 - 44032: 0x9681, + 48887 - 44032: 0x9682, + 48888 - 44032: 0x9683, + 48889 - 44032: 0x9684, + 48890 - 44032: 0x9685, + 48891 - 44032: 0x9686, + 48892 - 44032: 0x9687, + 48893 - 44032: 0x9688, + 48894 - 44032: 0x9689, + 48895 - 44032: 0x968A, + 48896 - 44032: 0x968B, + 48897 - 44032: 0xBBBF, + 48898 - 44032: 0x968C, + 48899 - 44032: 0x968D, + 48900 - 44032: 0x968E, + 48901 - 44032: 0x968F, + 48902 - 44032: 0x9690, + 48903 - 44032: 0x9691, + 48904 - 44032: 0xBBC0, + 48905 - 44032: 0xBBC1, + 48906 - 44032: 0x9692, + 48907 - 44032: 0x9693, + 48908 - 44032: 0x9694, + 48909 - 44032: 0x9695, + 48910 - 44032: 0x9696, + 48911 - 44032: 0x9697, + 48912 - 44032: 0x9698, + 48913 - 44032: 0x9699, + 48914 - 44032: 0x969A, + 48915 - 44032: 0x969B, + 48916 - 44032: 0x969C, + 48917 - 44032: 0x969D, + 48918 - 44032: 0x969E, + 48919 - 44032: 0x969F, + 48920 - 44032: 0xBBC2, + 48921 - 44032: 0xBBC3, + 48922 - 44032: 0x96A0, + 48923 - 44032: 0xBBC4, + 48924 - 44032: 0xBBC5, + 48925 - 44032: 0xBBC6, + 48926 - 44032: 0x96A1, + 48927 - 44032: 0x96A2, + 48928 - 44032: 0x96A3, + 48929 - 44032: 0x96A4, + 48930 - 44032: 0x96A5, + 48931 - 44032: 0x96A6, + 48932 - 44032: 0x96A7, + 48933 - 44032: 0x96A8, + 48934 - 44032: 0x96A9, + 48935 - 44032: 0x96AA, + 48936 - 44032: 0x96AB, + 48937 - 44032: 0x96AC, + 48938 - 44032: 0x96AD, + 48939 - 44032: 0x96AE, + 48940 - 44032: 0x96AF, + 48941 - 44032: 0x96B0, + 48942 - 44032: 0x96B1, + 48943 - 44032: 0x96B2, + 48944 - 44032: 0x96B3, + 48945 - 44032: 0x96B4, + 48946 - 44032: 0x96B5, + 48947 - 44032: 0x96B6, + 48948 - 44032: 0x96B7, + 48949 - 44032: 0x96B8, + 48950 - 44032: 0x96B9, + 48951 - 44032: 0x96BA, + 48952 - 44032: 0x96BB, + 48953 - 44032: 0x96BC, + 48954 - 44032: 0x96BD, + 48955 - 44032: 0x96BE, + 48956 - 44032: 0x96BF, + 48957 - 44032: 0x96C0, + 48958 - 44032: 0x96C1, + 48959 - 44032: 0x96C2, + 48960 - 44032: 0xBBC7, + 48961 - 44032: 0xBBC8, + 48962 - 44032: 0x96C3, + 48963 - 44032: 0x96C4, + 48964 - 44032: 0xBBC9, + 48965 - 44032: 0x96C5, + 48966 - 44032: 0x96C6, + 48967 - 44032: 0x96C7, + 48968 - 44032: 0xBBCA, + 48969 - 44032: 0x96C8, + 48970 - 44032: 0x96C9, + 48971 - 44032: 0x96CA, + 48972 - 44032: 0x96CB, + 48973 - 44032: 0x96CC, + 48974 - 44032: 0x96CD, + 48975 - 44032: 0x96CE, + 48976 - 44032: 0xBBCB, + 48977 - 44032: 0xBBCC, + 48978 - 44032: 0x96CF, + 48979 - 44032: 0x96D0, + 48980 - 44032: 0x96D1, + 48981 - 44032: 0xBBCD, + 48982 - 44032: 0x96D2, + 48983 - 44032: 0x96D3, + 48984 - 44032: 0x96D4, + 48985 - 44032: 0x96D5, + 48986 - 44032: 0x96D6, + 48987 - 44032: 0x96D7, + 48988 - 44032: 0x96D8, + 48989 - 44032: 0x96D9, + 48990 - 44032: 0x96DA, + 48991 - 44032: 0x96DB, + 48992 - 44032: 0x96DC, + 48993 - 44032: 0x96DD, + 48994 - 44032: 0x96DE, + 48995 - 44032: 0x96DF, + 48996 - 44032: 0x96E0, + 48997 - 44032: 0x96E1, + 48998 - 44032: 0x96E2, + 48999 - 44032: 0x96E3, + 49000 - 44032: 0x96E4, + 49001 - 44032: 0x96E5, + 49002 - 44032: 0x96E6, + 49003 - 44032: 0x96E7, + 49004 - 44032: 0x96E8, + 49005 - 44032: 0x96E9, + 49006 - 44032: 0x96EA, + 49007 - 44032: 0x96EB, + 49008 - 44032: 0x96EC, + 49009 - 44032: 0x96ED, + 49010 - 44032: 0x96EE, + 49011 - 44032: 0x96EF, + 49012 - 44032: 0x96F0, + 49013 - 44032: 0x96F1, + 49014 - 44032: 0x96F2, + 49015 - 44032: 0x96F3, + 49016 - 44032: 0x96F4, + 49017 - 44032: 0x96F5, + 49018 - 44032: 0x96F6, + 49019 - 44032: 0x96F7, + 49020 - 44032: 0x96F8, + 49021 - 44032: 0x96F9, + 49022 - 44032: 0x96FA, + 49023 - 44032: 0x96FB, + 49024 - 44032: 0x96FC, + 49025 - 44032: 0x96FD, + 49026 - 44032: 0x96FE, + 49027 - 44032: 0x9741, + 49028 - 44032: 0x9742, + 49029 - 44032: 0x9743, + 49030 - 44032: 0x9744, + 49031 - 44032: 0x9745, + 49032 - 44032: 0x9746, + 49033 - 44032: 0x9747, + 49034 - 44032: 0x9748, + 49035 - 44032: 0x9749, + 49036 - 44032: 0x974A, + 49037 - 44032: 0x974B, + 49038 - 44032: 0x974C, + 49039 - 44032: 0x974D, + 49040 - 44032: 0x974E, + 49041 - 44032: 0x974F, + 49042 - 44032: 0x9750, + 49043 - 44032: 0x9751, + 49044 - 44032: 0xBBCE, + 49045 - 44032: 0x9752, + 49046 - 44032: 0x9753, + 49047 - 44032: 0x9754, + 49048 - 44032: 0x9755, + 49049 - 44032: 0x9756, + 49050 - 44032: 0x9757, + 49051 - 44032: 0x9758, + 49052 - 44032: 0x9759, + 49053 - 44032: 0x975A, + 49054 - 44032: 0x9761, + 49055 - 44032: 0x9762, + 49056 - 44032: 0x9763, + 49057 - 44032: 0x9764, + 49058 - 44032: 0x9765, + 49059 - 44032: 0x9766, + 49060 - 44032: 0x9767, + 49061 - 44032: 0x9768, + 49062 - 44032: 0x9769, + 49063 - 44032: 0x976A, + 49064 - 44032: 0x976B, + 49065 - 44032: 0x976C, + 49066 - 44032: 0x976D, + 49067 - 44032: 0x976E, + 49068 - 44032: 0x976F, + 49069 - 44032: 0x9770, + 49070 - 44032: 0x9771, + 49071 - 44032: 0x9772, + 49072 - 44032: 0xBBCF, + 49073 - 44032: 0x9773, + 49074 - 44032: 0x9774, + 49075 - 44032: 0x9775, + 49076 - 44032: 0x9776, + 49077 - 44032: 0x9777, + 49078 - 44032: 0x9778, + 49079 - 44032: 0x9779, + 49080 - 44032: 0x977A, + 49081 - 44032: 0x9781, + 49082 - 44032: 0x9782, + 49083 - 44032: 0x9783, + 49084 - 44032: 0x9784, + 49085 - 44032: 0x9785, + 49086 - 44032: 0x9786, + 49087 - 44032: 0x9787, + 49088 - 44032: 0x9788, + 49089 - 44032: 0x9789, + 49090 - 44032: 0x978A, + 49091 - 44032: 0x978B, + 49092 - 44032: 0x978C, + 49093 - 44032: 0xBBD0, + 49094 - 44032: 0x978D, + 49095 - 44032: 0x978E, + 49096 - 44032: 0x978F, + 49097 - 44032: 0x9790, + 49098 - 44032: 0x9791, + 49099 - 44032: 0x9792, + 49100 - 44032: 0xBBD1, + 49101 - 44032: 0xBBD2, + 49102 - 44032: 0x9793, + 49103 - 44032: 0x9794, + 49104 - 44032: 0xBBD3, + 49105 - 44032: 0x9795, + 49106 - 44032: 0x9796, + 49107 - 44032: 0x9797, + 49108 - 44032: 0xBBD4, + 49109 - 44032: 0x9798, + 49110 - 44032: 0x9799, + 49111 - 44032: 0x979A, + 49112 - 44032: 0x979B, + 49113 - 44032: 0x979C, + 49114 - 44032: 0x979D, + 49115 - 44032: 0x979E, + 49116 - 44032: 0xBBD5, + 49117 - 44032: 0x979F, + 49118 - 44032: 0x97A0, + 49119 - 44032: 0xBBD6, + 49120 - 44032: 0x97A1, + 49121 - 44032: 0xBBD7, + 49122 - 44032: 0x97A2, + 49123 - 44032: 0x97A3, + 49124 - 44032: 0x97A4, + 49125 - 44032: 0x97A5, + 49126 - 44032: 0x97A6, + 49127 - 44032: 0x97A7, + 49128 - 44032: 0x97A8, + 49129 - 44032: 0x97A9, + 49130 - 44032: 0x97AA, + 49131 - 44032: 0x97AB, + 49132 - 44032: 0x97AC, + 49133 - 44032: 0x97AD, + 49134 - 44032: 0x97AE, + 49135 - 44032: 0x97AF, + 49136 - 44032: 0x97B0, + 49137 - 44032: 0x97B1, + 49138 - 44032: 0x97B2, + 49139 - 44032: 0x97B3, + 49140 - 44032: 0x97B4, + 49141 - 44032: 0x97B5, + 49142 - 44032: 0x97B6, + 49143 - 44032: 0x97B7, + 49144 - 44032: 0x97B8, + 49145 - 44032: 0x97B9, + 49146 - 44032: 0x97BA, + 49147 - 44032: 0x97BB, + 49148 - 44032: 0x97BC, + 49149 - 44032: 0x97BD, + 49150 - 44032: 0x97BE, + 49151 - 44032: 0x97BF, + 49152 - 44032: 0x97C0, + 49153 - 44032: 0x97C1, + 49154 - 44032: 0x97C2, + 49155 - 44032: 0x97C3, + 49156 - 44032: 0x97C4, + 49157 - 44032: 0x97C5, + 49158 - 44032: 0x97C6, + 49159 - 44032: 0x97C7, + 49160 - 44032: 0x97C8, + 49161 - 44032: 0x97C9, + 49162 - 44032: 0x97CA, + 49163 - 44032: 0x97CB, + 49164 - 44032: 0x97CC, + 49165 - 44032: 0x97CD, + 49166 - 44032: 0x97CE, + 49167 - 44032: 0x97CF, + 49168 - 44032: 0x97D0, + 49169 - 44032: 0x97D1, + 49170 - 44032: 0x97D2, + 49171 - 44032: 0x97D3, + 49172 - 44032: 0x97D4, + 49173 - 44032: 0x97D5, + 49174 - 44032: 0x97D6, + 49175 - 44032: 0x97D7, + 49176 - 44032: 0x97D8, + 49177 - 44032: 0x97D9, + 49178 - 44032: 0x97DA, + 49179 - 44032: 0x97DB, + 49180 - 44032: 0x97DC, + 49181 - 44032: 0x97DD, + 49182 - 44032: 0x97DE, + 49183 - 44032: 0x97DF, + 49184 - 44032: 0x97E0, + 49185 - 44032: 0x97E1, + 49186 - 44032: 0x97E2, + 49187 - 44032: 0x97E3, + 49188 - 44032: 0x97E4, + 49189 - 44032: 0x97E5, + 49190 - 44032: 0x97E6, + 49191 - 44032: 0x97E7, + 49192 - 44032: 0x97E8, + 49193 - 44032: 0x97E9, + 49194 - 44032: 0x97EA, + 49195 - 44032: 0x97EB, + 49196 - 44032: 0x97EC, + 49197 - 44032: 0x97ED, + 49198 - 44032: 0x97EE, + 49199 - 44032: 0x97EF, + 49200 - 44032: 0x97F0, + 49201 - 44032: 0x97F1, + 49202 - 44032: 0x97F2, + 49203 - 44032: 0x97F3, + 49204 - 44032: 0x97F4, + 49205 - 44032: 0x97F5, + 49206 - 44032: 0x97F6, + 49207 - 44032: 0x97F7, + 49208 - 44032: 0x97F8, + 49209 - 44032: 0x97F9, + 49210 - 44032: 0x97FA, + 49211 - 44032: 0x97FB, + 49212 - 44032: 0xBBD8, + 49213 - 44032: 0x97FC, + 49214 - 44032: 0x97FD, + 49215 - 44032: 0x97FE, + 49216 - 44032: 0x9841, + 49217 - 44032: 0x9842, + 49218 - 44032: 0x9843, + 49219 - 44032: 0x9844, + 49220 - 44032: 0x9845, + 49221 - 44032: 0x9846, + 49222 - 44032: 0x9847, + 49223 - 44032: 0x9848, + 49224 - 44032: 0x9849, + 49225 - 44032: 0x984A, + 49226 - 44032: 0x984B, + 49227 - 44032: 0x984C, + 49228 - 44032: 0x984D, + 49229 - 44032: 0x984E, + 49230 - 44032: 0x984F, + 49231 - 44032: 0x9850, + 49232 - 44032: 0x9851, + 49233 - 44032: 0xBBD9, + 49234 - 44032: 0x9852, + 49235 - 44032: 0x9853, + 49236 - 44032: 0x9854, + 49237 - 44032: 0x9855, + 49238 - 44032: 0x9856, + 49239 - 44032: 0x9857, + 49240 - 44032: 0xBBDA, + 49241 - 44032: 0x9858, + 49242 - 44032: 0x9859, + 49243 - 44032: 0x985A, + 49244 - 44032: 0xBBDB, + 49245 - 44032: 0x9861, + 49246 - 44032: 0x9862, + 49247 - 44032: 0x9863, + 49248 - 44032: 0xBBDC, + 49249 - 44032: 0x9864, + 49250 - 44032: 0x9865, + 49251 - 44032: 0x9866, + 49252 - 44032: 0x9867, + 49253 - 44032: 0x9868, + 49254 - 44032: 0x9869, + 49255 - 44032: 0x986A, + 49256 - 44032: 0xBBDD, + 49257 - 44032: 0xBBDE, + 49258 - 44032: 0x986B, + 49259 - 44032: 0x986C, + 49260 - 44032: 0x986D, + 49261 - 44032: 0x986E, + 49262 - 44032: 0x986F, + 49263 - 44032: 0x9870, + 49264 - 44032: 0x9871, + 49265 - 44032: 0x9872, + 49266 - 44032: 0x9873, + 49267 - 44032: 0x9874, + 49268 - 44032: 0x9875, + 49269 - 44032: 0x9876, + 49270 - 44032: 0x9877, + 49271 - 44032: 0x9878, + 49272 - 44032: 0x9879, + 49273 - 44032: 0x987A, + 49274 - 44032: 0x9881, + 49275 - 44032: 0x9882, + 49276 - 44032: 0x9883, + 49277 - 44032: 0x9884, + 49278 - 44032: 0x9885, + 49279 - 44032: 0x9886, + 49280 - 44032: 0x9887, + 49281 - 44032: 0x9888, + 49282 - 44032: 0x9889, + 49283 - 44032: 0x988A, + 49284 - 44032: 0x988B, + 49285 - 44032: 0x988C, + 49286 - 44032: 0x988D, + 49287 - 44032: 0x988E, + 49288 - 44032: 0x988F, + 49289 - 44032: 0x9890, + 49290 - 44032: 0x9891, + 49291 - 44032: 0x9892, + 49292 - 44032: 0x9893, + 49293 - 44032: 0x9894, + 49294 - 44032: 0x9895, + 49295 - 44032: 0x9896, + 49296 - 44032: 0xBBDF, + 49297 - 44032: 0xBBE0, + 49298 - 44032: 0x9897, + 49299 - 44032: 0x9898, + 49300 - 44032: 0xBBE1, + 49301 - 44032: 0x9899, + 49302 - 44032: 0x989A, + 49303 - 44032: 0x989B, + 49304 - 44032: 0xBBE2, + 49305 - 44032: 0x989C, + 49306 - 44032: 0x989D, + 49307 - 44032: 0x989E, + 49308 - 44032: 0x989F, + 49309 - 44032: 0x98A0, + 49310 - 44032: 0x98A1, + 49311 - 44032: 0x98A2, + 49312 - 44032: 0xBBE3, + 49313 - 44032: 0xBBE4, + 49314 - 44032: 0x98A3, + 49315 - 44032: 0xBBE5, + 49316 - 44032: 0x98A4, + 49317 - 44032: 0xBBE6, + 49318 - 44032: 0x98A5, + 49319 - 44032: 0x98A6, + 49320 - 44032: 0x98A7, + 49321 - 44032: 0x98A8, + 49322 - 44032: 0x98A9, + 49323 - 44032: 0x98AA, + 49324 - 44032: 0xBBE7, + 49325 - 44032: 0xBBE8, + 49326 - 44032: 0x98AB, + 49327 - 44032: 0xBBE9, + 49328 - 44032: 0xBBEA, + 49329 - 44032: 0x98AC, + 49330 - 44032: 0x98AD, + 49331 - 44032: 0xBBEB, + 49332 - 44032: 0xBBEC, + 49333 - 44032: 0xBBED, + 49334 - 44032: 0xBBEE, + 49335 - 44032: 0x98AE, + 49336 - 44032: 0x98AF, + 49337 - 44032: 0x98B0, + 49338 - 44032: 0x98B1, + 49339 - 44032: 0x98B2, + 49340 - 44032: 0xBBEF, + 49341 - 44032: 0xBBF0, + 49342 - 44032: 0x98B3, + 49343 - 44032: 0xBBF1, + 49344 - 44032: 0xBBF2, + 49345 - 44032: 0xBBF3, + 49346 - 44032: 0x98B4, + 49347 - 44032: 0x98B5, + 49348 - 44032: 0x98B6, + 49349 - 44032: 0xBBF4, + 49350 - 44032: 0x98B7, + 49351 - 44032: 0x98B8, + 49352 - 44032: 0xBBF5, + 49353 - 44032: 0xBBF6, + 49354 - 44032: 0x98B9, + 49355 - 44032: 0x98BA, + 49356 - 44032: 0xBBF7, + 49357 - 44032: 0x98BB, + 49358 - 44032: 0x98BC, + 49359 - 44032: 0x98BD, + 49360 - 44032: 0xBBF8, + 49361 - 44032: 0x98BE, + 49362 - 44032: 0x98BF, + 49363 - 44032: 0x98C0, + 49364 - 44032: 0x98C1, + 49365 - 44032: 0x98C2, + 49366 - 44032: 0x98C3, + 49367 - 44032: 0x98C4, + 49368 - 44032: 0xBBF9, + 49369 - 44032: 0xBBFA, + 49370 - 44032: 0x98C5, + 49371 - 44032: 0xBBFB, + 49372 - 44032: 0xBBFC, + 49373 - 44032: 0xBBFD, + 49374 - 44032: 0x98C6, + 49375 - 44032: 0x98C7, + 49376 - 44032: 0x98C8, + 49377 - 44032: 0x98C9, + 49378 - 44032: 0x98CA, + 49379 - 44032: 0x98CB, + 49380 - 44032: 0xBBFE, + 49381 - 44032: 0xBCA1, + 49382 - 44032: 0x98CC, + 49383 - 44032: 0x98CD, + 49384 - 44032: 0xBCA2, + 49385 - 44032: 0x98CE, + 49386 - 44032: 0x98CF, + 49387 - 44032: 0x98D0, + 49388 - 44032: 0xBCA3, + 49389 - 44032: 0x98D1, + 49390 - 44032: 0x98D2, + 49391 - 44032: 0x98D3, + 49392 - 44032: 0x98D4, + 49393 - 44032: 0x98D5, + 49394 - 44032: 0x98D6, + 49395 - 44032: 0x98D7, + 49396 - 44032: 0xBCA4, + 49397 - 44032: 0xBCA5, + 49398 - 44032: 0x98D8, + 49399 - 44032: 0xBCA6, + 49400 - 44032: 0x98D9, + 49401 - 44032: 0xBCA7, + 49402 - 44032: 0x98DA, + 49403 - 44032: 0x98DB, + 49404 - 44032: 0x98DC, + 49405 - 44032: 0x98DD, + 49406 - 44032: 0x98DE, + 49407 - 44032: 0x98DF, + 49408 - 44032: 0xBCA8, + 49409 - 44032: 0x98E0, + 49410 - 44032: 0x98E1, + 49411 - 44032: 0x98E2, + 49412 - 44032: 0xBCA9, + 49413 - 44032: 0x98E3, + 49414 - 44032: 0x98E4, + 49415 - 44032: 0x98E5, + 49416 - 44032: 0xBCAA, + 49417 - 44032: 0x98E6, + 49418 - 44032: 0x98E7, + 49419 - 44032: 0x98E8, + 49420 - 44032: 0x98E9, + 49421 - 44032: 0x98EA, + 49422 - 44032: 0x98EB, + 49423 - 44032: 0x98EC, + 49424 - 44032: 0xBCAB, + 49425 - 44032: 0x98ED, + 49426 - 44032: 0x98EE, + 49427 - 44032: 0x98EF, + 49428 - 44032: 0x98F0, + 49429 - 44032: 0xBCAC, + 49430 - 44032: 0x98F1, + 49431 - 44032: 0x98F2, + 49432 - 44032: 0x98F3, + 49433 - 44032: 0x98F4, + 49434 - 44032: 0x98F5, + 49435 - 44032: 0x98F6, + 49436 - 44032: 0xBCAD, + 49437 - 44032: 0xBCAE, + 49438 - 44032: 0xBCAF, + 49439 - 44032: 0xBCB0, + 49440 - 44032: 0xBCB1, + 49441 - 44032: 0x98F7, + 49442 - 44032: 0x98F8, + 49443 - 44032: 0xBCB2, + 49444 - 44032: 0xBCB3, + 49445 - 44032: 0x98F9, + 49446 - 44032: 0xBCB4, + 49447 - 44032: 0xBCB5, + 49448 - 44032: 0x98FA, + 49449 - 44032: 0x98FB, + 49450 - 44032: 0x98FC, + 49451 - 44032: 0x98FD, + 49452 - 44032: 0xBCB6, + 49453 - 44032: 0xBCB7, + 49454 - 44032: 0x98FE, + 49455 - 44032: 0xBCB8, + 49456 - 44032: 0xBCB9, + 49457 - 44032: 0xBCBA, + 49458 - 44032: 0x9941, + 49459 - 44032: 0x9942, + 49460 - 44032: 0x9943, + 49461 - 44032: 0x9944, + 49462 - 44032: 0xBCBB, + 49463 - 44032: 0x9945, + 49464 - 44032: 0xBCBC, + 49465 - 44032: 0xBCBD, + 49466 - 44032: 0x9946, + 49467 - 44032: 0x9947, + 49468 - 44032: 0xBCBE, + 49469 - 44032: 0x9948, + 49470 - 44032: 0x9949, + 49471 - 44032: 0x994A, + 49472 - 44032: 0xBCBF, + 49473 - 44032: 0x994B, + 49474 - 44032: 0x994C, + 49475 - 44032: 0x994D, + 49476 - 44032: 0x994E, + 49477 - 44032: 0x994F, + 49478 - 44032: 0x9950, + 49479 - 44032: 0x9951, + 49480 - 44032: 0xBCC0, + 49481 - 44032: 0xBCC1, + 49482 - 44032: 0x9952, + 49483 - 44032: 0xBCC2, + 49484 - 44032: 0xBCC3, + 49485 - 44032: 0xBCC4, + 49486 - 44032: 0x9953, + 49487 - 44032: 0x9954, + 49488 - 44032: 0x9955, + 49489 - 44032: 0x9956, + 49490 - 44032: 0x9957, + 49491 - 44032: 0x9958, + 49492 - 44032: 0xBCC5, + 49493 - 44032: 0xBCC6, + 49494 - 44032: 0x9959, + 49495 - 44032: 0x995A, + 49496 - 44032: 0xBCC7, + 49497 - 44032: 0x9961, + 49498 - 44032: 0x9962, + 49499 - 44032: 0x9963, + 49500 - 44032: 0xBCC8, + 49501 - 44032: 0x9964, + 49502 - 44032: 0x9965, + 49503 - 44032: 0x9966, + 49504 - 44032: 0x9967, + 49505 - 44032: 0x9968, + 49506 - 44032: 0x9969, + 49507 - 44032: 0x996A, + 49508 - 44032: 0xBCC9, + 49509 - 44032: 0xBCCA, + 49510 - 44032: 0x996B, + 49511 - 44032: 0xBCCB, + 49512 - 44032: 0xBCCC, + 49513 - 44032: 0xBCCD, + 49514 - 44032: 0x996C, + 49515 - 44032: 0x996D, + 49516 - 44032: 0x996E, + 49517 - 44032: 0x996F, + 49518 - 44032: 0x9970, + 49519 - 44032: 0x9971, + 49520 - 44032: 0xBCCE, + 49521 - 44032: 0x9972, + 49522 - 44032: 0x9973, + 49523 - 44032: 0x9974, + 49524 - 44032: 0xBCCF, + 49525 - 44032: 0x9975, + 49526 - 44032: 0x9976, + 49527 - 44032: 0x9977, + 49528 - 44032: 0xBCD0, + 49529 - 44032: 0x9978, + 49530 - 44032: 0x9979, + 49531 - 44032: 0x997A, + 49532 - 44032: 0x9981, + 49533 - 44032: 0x9982, + 49534 - 44032: 0x9983, + 49535 - 44032: 0x9984, + 49536 - 44032: 0x9985, + 49537 - 44032: 0x9986, + 49538 - 44032: 0x9987, + 49539 - 44032: 0x9988, + 49540 - 44032: 0x9989, + 49541 - 44032: 0xBCD1, + 49542 - 44032: 0x998A, + 49543 - 44032: 0x998B, + 49544 - 44032: 0x998C, + 49545 - 44032: 0x998D, + 49546 - 44032: 0x998E, + 49547 - 44032: 0x998F, + 49548 - 44032: 0xBCD2, + 49549 - 44032: 0xBCD3, + 49550 - 44032: 0xBCD4, + 49551 - 44032: 0x9990, + 49552 - 44032: 0xBCD5, + 49553 - 44032: 0x9991, + 49554 - 44032: 0x9992, + 49555 - 44032: 0x9993, + 49556 - 44032: 0xBCD6, + 49557 - 44032: 0x9994, + 49558 - 44032: 0xBCD7, + 49559 - 44032: 0x9995, + 49560 - 44032: 0x9996, + 49561 - 44032: 0x9997, + 49562 - 44032: 0x9998, + 49563 - 44032: 0x9999, + 49564 - 44032: 0xBCD8, + 49565 - 44032: 0xBCD9, + 49566 - 44032: 0x999A, + 49567 - 44032: 0xBCDA, + 49568 - 44032: 0x999B, + 49569 - 44032: 0xBCDB, + 49570 - 44032: 0x999C, + 49571 - 44032: 0x999D, + 49572 - 44032: 0x999E, + 49573 - 44032: 0xBCDC, + 49574 - 44032: 0x999F, + 49575 - 44032: 0x99A0, + 49576 - 44032: 0xBCDD, + 49577 - 44032: 0xBCDE, + 49578 - 44032: 0x99A1, + 49579 - 44032: 0x99A2, + 49580 - 44032: 0xBCDF, + 49581 - 44032: 0x99A3, + 49582 - 44032: 0x99A4, + 49583 - 44032: 0x99A5, + 49584 - 44032: 0xBCE0, + 49585 - 44032: 0x99A6, + 49586 - 44032: 0x99A7, + 49587 - 44032: 0x99A8, + 49588 - 44032: 0x99A9, + 49589 - 44032: 0x99AA, + 49590 - 44032: 0x99AB, + 49591 - 44032: 0x99AC, + 49592 - 44032: 0x99AD, + 49593 - 44032: 0x99AE, + 49594 - 44032: 0x99AF, + 49595 - 44032: 0x99B0, + 49596 - 44032: 0x99B1, + 49597 - 44032: 0xBCE1, + 49598 - 44032: 0x99B2, + 49599 - 44032: 0x99B3, + 49600 - 44032: 0x99B4, + 49601 - 44032: 0x99B5, + 49602 - 44032: 0x99B6, + 49603 - 44032: 0x99B7, + 49604 - 44032: 0xBCE2, + 49605 - 44032: 0x99B8, + 49606 - 44032: 0x99B9, + 49607 - 44032: 0x99BA, + 49608 - 44032: 0xBCE3, + 49609 - 44032: 0x99BB, + 49610 - 44032: 0x99BC, + 49611 - 44032: 0x99BD, + 49612 - 44032: 0xBCE4, + 49613 - 44032: 0x99BE, + 49614 - 44032: 0x99BF, + 49615 - 44032: 0x99C0, + 49616 - 44032: 0x99C1, + 49617 - 44032: 0x99C2, + 49618 - 44032: 0x99C3, + 49619 - 44032: 0x99C4, + 49620 - 44032: 0xBCE5, + 49621 - 44032: 0x99C5, + 49622 - 44032: 0x99C6, + 49623 - 44032: 0xBCE6, + 49624 - 44032: 0xBCE7, + 49625 - 44032: 0x99C7, + 49626 - 44032: 0x99C8, + 49627 - 44032: 0x99C9, + 49628 - 44032: 0x99CA, + 49629 - 44032: 0x99CB, + 49630 - 44032: 0x99CC, + 49631 - 44032: 0x99CD, + 49632 - 44032: 0xBCE8, + 49633 - 44032: 0x99CE, + 49634 - 44032: 0x99CF, + 49635 - 44032: 0x99D0, + 49636 - 44032: 0xBCE9, + 49637 - 44032: 0x99D1, + 49638 - 44032: 0x99D2, + 49639 - 44032: 0x99D3, + 49640 - 44032: 0xBCEA, + 49641 - 44032: 0x99D4, + 49642 - 44032: 0x99D5, + 49643 - 44032: 0x99D6, + 49644 - 44032: 0x99D7, + 49645 - 44032: 0x99D8, + 49646 - 44032: 0x99D9, + 49647 - 44032: 0x99DA, + 49648 - 44032: 0xBCEB, + 49649 - 44032: 0xBCEC, + 49650 - 44032: 0x99DB, + 49651 - 44032: 0xBCED, + 49652 - 44032: 0x99DC, + 49653 - 44032: 0x99DD, + 49654 - 44032: 0x99DE, + 49655 - 44032: 0x99DF, + 49656 - 44032: 0x99E0, + 49657 - 44032: 0x99E1, + 49658 - 44032: 0x99E2, + 49659 - 44032: 0x99E3, + 49660 - 44032: 0xBCEE, + 49661 - 44032: 0xBCEF, + 49662 - 44032: 0x99E4, + 49663 - 44032: 0x99E5, + 49664 - 44032: 0xBCF0, + 49665 - 44032: 0x99E6, + 49666 - 44032: 0x99E7, + 49667 - 44032: 0x99E8, + 49668 - 44032: 0xBCF1, + 49669 - 44032: 0x99E9, + 49670 - 44032: 0x99EA, + 49671 - 44032: 0x99EB, + 49672 - 44032: 0x99EC, + 49673 - 44032: 0x99ED, + 49674 - 44032: 0x99EE, + 49675 - 44032: 0x99EF, + 49676 - 44032: 0xBCF2, + 49677 - 44032: 0xBCF3, + 49678 - 44032: 0x99F0, + 49679 - 44032: 0xBCF4, + 49680 - 44032: 0x99F1, + 49681 - 44032: 0xBCF5, + 49682 - 44032: 0x99F2, + 49683 - 44032: 0x99F3, + 49684 - 44032: 0x99F4, + 49685 - 44032: 0x99F5, + 49686 - 44032: 0x99F6, + 49687 - 44032: 0x99F7, + 49688 - 44032: 0xBCF6, + 49689 - 44032: 0xBCF7, + 49690 - 44032: 0x99F8, + 49691 - 44032: 0x99F9, + 49692 - 44032: 0xBCF8, + 49693 - 44032: 0x99FA, + 49694 - 44032: 0x99FB, + 49695 - 44032: 0xBCF9, + 49696 - 44032: 0xBCFA, + 49697 - 44032: 0x99FC, + 49698 - 44032: 0x99FD, + 49699 - 44032: 0x99FE, + 49700 - 44032: 0x9A41, + 49701 - 44032: 0x9A42, + 49702 - 44032: 0x9A43, + 49703 - 44032: 0x9A44, + 49704 - 44032: 0xBCFB, + 49705 - 44032: 0xBCFC, + 49706 - 44032: 0x9A45, + 49707 - 44032: 0xBCFD, + 49708 - 44032: 0x9A46, + 49709 - 44032: 0xBCFE, + 49710 - 44032: 0x9A47, + 49711 - 44032: 0xBDA1, + 49712 - 44032: 0x9A48, + 49713 - 44032: 0xBDA2, + 49714 - 44032: 0xBDA3, + 49715 - 44032: 0x9A49, + 49716 - 44032: 0xBDA4, + 49717 - 44032: 0x9A4A, + 49718 - 44032: 0x9A4B, + 49719 - 44032: 0x9A4C, + 49720 - 44032: 0x9A4D, + 49721 - 44032: 0x9A4E, + 49722 - 44032: 0x9A4F, + 49723 - 44032: 0x9A50, + 49724 - 44032: 0x9A51, + 49725 - 44032: 0x9A52, + 49726 - 44032: 0x9A53, + 49727 - 44032: 0x9A54, + 49728 - 44032: 0x9A55, + 49729 - 44032: 0x9A56, + 49730 - 44032: 0x9A57, + 49731 - 44032: 0x9A58, + 49732 - 44032: 0x9A59, + 49733 - 44032: 0x9A5A, + 49734 - 44032: 0x9A61, + 49735 - 44032: 0x9A62, + 49736 - 44032: 0xBDA5, + 49737 - 44032: 0x9A63, + 49738 - 44032: 0x9A64, + 49739 - 44032: 0x9A65, + 49740 - 44032: 0x9A66, + 49741 - 44032: 0x9A67, + 49742 - 44032: 0x9A68, + 49743 - 44032: 0x9A69, + 49744 - 44032: 0xBDA6, + 49745 - 44032: 0xBDA7, + 49746 - 44032: 0x9A6A, + 49747 - 44032: 0x9A6B, + 49748 - 44032: 0xBDA8, + 49749 - 44032: 0x9A6C, + 49750 - 44032: 0x9A6D, + 49751 - 44032: 0x9A6E, + 49752 - 44032: 0xBDA9, + 49753 - 44032: 0x9A6F, + 49754 - 44032: 0x9A70, + 49755 - 44032: 0x9A71, + 49756 - 44032: 0x9A72, + 49757 - 44032: 0x9A73, + 49758 - 44032: 0x9A74, + 49759 - 44032: 0x9A75, + 49760 - 44032: 0xBDAA, + 49761 - 44032: 0x9A76, + 49762 - 44032: 0x9A77, + 49763 - 44032: 0x9A78, + 49764 - 44032: 0x9A79, + 49765 - 44032: 0xBDAB, + 49766 - 44032: 0x9A7A, + 49767 - 44032: 0x9A81, + 49768 - 44032: 0x9A82, + 49769 - 44032: 0x9A83, + 49770 - 44032: 0x9A84, + 49771 - 44032: 0x9A85, + 49772 - 44032: 0xBDAC, + 49773 - 44032: 0xBDAD, + 49774 - 44032: 0x9A86, + 49775 - 44032: 0x9A87, + 49776 - 44032: 0xBDAE, + 49777 - 44032: 0x9A88, + 49778 - 44032: 0x9A89, + 49779 - 44032: 0x9A8A, + 49780 - 44032: 0xBDAF, + 49781 - 44032: 0x9A8B, + 49782 - 44032: 0x9A8C, + 49783 - 44032: 0x9A8D, + 49784 - 44032: 0x9A8E, + 49785 - 44032: 0x9A8F, + 49786 - 44032: 0x9A90, + 49787 - 44032: 0x9A91, + 49788 - 44032: 0xBDB0, + 49789 - 44032: 0xBDB1, + 49790 - 44032: 0x9A92, + 49791 - 44032: 0xBDB2, + 49792 - 44032: 0x9A93, + 49793 - 44032: 0xBDB3, + 49794 - 44032: 0x9A94, + 49795 - 44032: 0x9A95, + 49796 - 44032: 0x9A96, + 49797 - 44032: 0x9A97, + 49798 - 44032: 0x9A98, + 49799 - 44032: 0x9A99, + 49800 - 44032: 0xBDB4, + 49801 - 44032: 0xBDB5, + 49802 - 44032: 0x9A9A, + 49803 - 44032: 0x9A9B, + 49804 - 44032: 0x9A9C, + 49805 - 44032: 0x9A9D, + 49806 - 44032: 0x9A9E, + 49807 - 44032: 0x9A9F, + 49808 - 44032: 0xBDB6, + 49809 - 44032: 0x9AA0, + 49810 - 44032: 0x9AA1, + 49811 - 44032: 0x9AA2, + 49812 - 44032: 0x9AA3, + 49813 - 44032: 0x9AA4, + 49814 - 44032: 0x9AA5, + 49815 - 44032: 0x9AA6, + 49816 - 44032: 0xBDB7, + 49817 - 44032: 0x9AA7, + 49818 - 44032: 0x9AA8, + 49819 - 44032: 0xBDB8, + 49820 - 44032: 0x9AA9, + 49821 - 44032: 0xBDB9, + 49822 - 44032: 0x9AAA, + 49823 - 44032: 0x9AAB, + 49824 - 44032: 0x9AAC, + 49825 - 44032: 0x9AAD, + 49826 - 44032: 0x9AAE, + 49827 - 44032: 0x9AAF, + 49828 - 44032: 0xBDBA, + 49829 - 44032: 0xBDBB, + 49830 - 44032: 0x9AB0, + 49831 - 44032: 0x9AB1, + 49832 - 44032: 0xBDBC, + 49833 - 44032: 0x9AB2, + 49834 - 44032: 0x9AB3, + 49835 - 44032: 0x9AB4, + 49836 - 44032: 0xBDBD, + 49837 - 44032: 0xBDBE, + 49838 - 44032: 0x9AB5, + 49839 - 44032: 0x9AB6, + 49840 - 44032: 0x9AB7, + 49841 - 44032: 0x9AB8, + 49842 - 44032: 0x9AB9, + 49843 - 44032: 0x9ABA, + 49844 - 44032: 0xBDBF, + 49845 - 44032: 0xBDC0, + 49846 - 44032: 0x9ABB, + 49847 - 44032: 0xBDC1, + 49848 - 44032: 0x9ABC, + 49849 - 44032: 0xBDC2, + 49850 - 44032: 0x9ABD, + 49851 - 44032: 0x9ABE, + 49852 - 44032: 0x9ABF, + 49853 - 44032: 0x9AC0, + 49854 - 44032: 0x9AC1, + 49855 - 44032: 0x9AC2, + 49856 - 44032: 0x9AC3, + 49857 - 44032: 0x9AC4, + 49858 - 44032: 0x9AC5, + 49859 - 44032: 0x9AC6, + 49860 - 44032: 0x9AC7, + 49861 - 44032: 0x9AC8, + 49862 - 44032: 0x9AC9, + 49863 - 44032: 0x9ACA, + 49864 - 44032: 0x9ACB, + 49865 - 44032: 0x9ACC, + 49866 - 44032: 0x9ACD, + 49867 - 44032: 0x9ACE, + 49868 - 44032: 0x9ACF, + 49869 - 44032: 0x9AD0, + 49870 - 44032: 0x9AD1, + 49871 - 44032: 0x9AD2, + 49872 - 44032: 0x9AD3, + 49873 - 44032: 0x9AD4, + 49874 - 44032: 0x9AD5, + 49875 - 44032: 0x9AD6, + 49876 - 44032: 0x9AD7, + 49877 - 44032: 0x9AD8, + 49878 - 44032: 0x9AD9, + 49879 - 44032: 0x9ADA, + 49880 - 44032: 0x9ADB, + 49881 - 44032: 0x9ADC, + 49882 - 44032: 0x9ADD, + 49883 - 44032: 0x9ADE, + 49884 - 44032: 0xBDC3, + 49885 - 44032: 0xBDC4, + 49886 - 44032: 0x9ADF, + 49887 - 44032: 0x9AE0, + 49888 - 44032: 0xBDC5, + 49889 - 44032: 0x9AE1, + 49890 - 44032: 0x9AE2, + 49891 - 44032: 0xBDC6, + 49892 - 44032: 0xBDC7, + 49893 - 44032: 0x9AE3, + 49894 - 44032: 0x9AE4, + 49895 - 44032: 0x9AE5, + 49896 - 44032: 0x9AE6, + 49897 - 44032: 0x9AE7, + 49898 - 44032: 0x9AE8, + 49899 - 44032: 0xBDC8, + 49900 - 44032: 0xBDC9, + 49901 - 44032: 0xBDCA, + 49902 - 44032: 0x9AE9, + 49903 - 44032: 0xBDCB, + 49904 - 44032: 0x9AEA, + 49905 - 44032: 0xBDCC, + 49906 - 44032: 0x9AEB, + 49907 - 44032: 0x9AEC, + 49908 - 44032: 0x9AED, + 49909 - 44032: 0x9AEE, + 49910 - 44032: 0xBDCD, + 49911 - 44032: 0x9AEF, + 49912 - 44032: 0xBDCE, + 49913 - 44032: 0xBDCF, + 49914 - 44032: 0x9AF0, + 49915 - 44032: 0xBDD0, + 49916 - 44032: 0xBDD1, + 49917 - 44032: 0x9AF1, + 49918 - 44032: 0x9AF2, + 49919 - 44032: 0x9AF3, + 49920 - 44032: 0xBDD2, + 49921 - 44032: 0x9AF4, + 49922 - 44032: 0x9AF5, + 49923 - 44032: 0x9AF6, + 49924 - 44032: 0x9AF7, + 49925 - 44032: 0x9AF8, + 49926 - 44032: 0x9AF9, + 49927 - 44032: 0x9AFA, + 49928 - 44032: 0xBDD3, + 49929 - 44032: 0xBDD4, + 49930 - 44032: 0x9AFB, + 49931 - 44032: 0x9AFC, + 49932 - 44032: 0xBDD5, + 49933 - 44032: 0xBDD6, + 49934 - 44032: 0x9AFD, + 49935 - 44032: 0x9AFE, + 49936 - 44032: 0x9B41, + 49937 - 44032: 0x9B42, + 49938 - 44032: 0x9B43, + 49939 - 44032: 0xBDD7, + 49940 - 44032: 0xBDD8, + 49941 - 44032: 0xBDD9, + 49942 - 44032: 0x9B44, + 49943 - 44032: 0x9B45, + 49944 - 44032: 0xBDDA, + 49945 - 44032: 0x9B46, + 49946 - 44032: 0x9B47, + 49947 - 44032: 0x9B48, + 49948 - 44032: 0xBDDB, + 49949 - 44032: 0x9B49, + 49950 - 44032: 0x9B4A, + 49951 - 44032: 0x9B4B, + 49952 - 44032: 0x9B4C, + 49953 - 44032: 0x9B4D, + 49954 - 44032: 0x9B4E, + 49955 - 44032: 0x9B4F, + 49956 - 44032: 0xBDDC, + 49957 - 44032: 0xBDDD, + 49958 - 44032: 0x9B50, + 49959 - 44032: 0x9B51, + 49960 - 44032: 0xBDDE, + 49961 - 44032: 0xBDDF, + 49962 - 44032: 0x9B52, + 49963 - 44032: 0x9B53, + 49964 - 44032: 0x9B54, + 49965 - 44032: 0x9B55, + 49966 - 44032: 0x9B56, + 49967 - 44032: 0x9B57, + 49968 - 44032: 0x9B58, + 49969 - 44032: 0x9B59, + 49970 - 44032: 0x9B5A, + 49971 - 44032: 0x9B61, + 49972 - 44032: 0x9B62, + 49973 - 44032: 0x9B63, + 49974 - 44032: 0x9B64, + 49975 - 44032: 0x9B65, + 49976 - 44032: 0x9B66, + 49977 - 44032: 0x9B67, + 49978 - 44032: 0x9B68, + 49979 - 44032: 0x9B69, + 49980 - 44032: 0x9B6A, + 49981 - 44032: 0x9B6B, + 49982 - 44032: 0x9B6C, + 49983 - 44032: 0x9B6D, + 49984 - 44032: 0x9B6E, + 49985 - 44032: 0x9B6F, + 49986 - 44032: 0x9B70, + 49987 - 44032: 0x9B71, + 49988 - 44032: 0x9B72, + 49989 - 44032: 0xBDE0, + 49990 - 44032: 0x9B73, + 49991 - 44032: 0x9B74, + 49992 - 44032: 0x9B75, + 49993 - 44032: 0x9B76, + 49994 - 44032: 0x9B77, + 49995 - 44032: 0x9B78, + 49996 - 44032: 0x9B79, + 49997 - 44032: 0x9B7A, + 49998 - 44032: 0x9B81, + 49999 - 44032: 0x9B82, + 50000 - 44032: 0x9B83, + 50001 - 44032: 0x9B84, + 50002 - 44032: 0x9B85, + 50003 - 44032: 0x9B86, + 50004 - 44032: 0x9B87, + 50005 - 44032: 0x9B88, + 50006 - 44032: 0x9B89, + 50007 - 44032: 0x9B8A, + 50008 - 44032: 0x9B8B, + 50009 - 44032: 0x9B8C, + 50010 - 44032: 0x9B8D, + 50011 - 44032: 0x9B8E, + 50012 - 44032: 0x9B8F, + 50013 - 44032: 0x9B90, + 50014 - 44032: 0x9B91, + 50015 - 44032: 0x9B92, + 50016 - 44032: 0x9B93, + 50017 - 44032: 0x9B94, + 50018 - 44032: 0x9B95, + 50019 - 44032: 0x9B96, + 50020 - 44032: 0x9B97, + 50021 - 44032: 0x9B98, + 50022 - 44032: 0x9B99, + 50023 - 44032: 0x9B9A, + 50024 - 44032: 0xBDE1, + 50025 - 44032: 0xBDE2, + 50026 - 44032: 0x9B9B, + 50027 - 44032: 0x9B9C, + 50028 - 44032: 0xBDE3, + 50029 - 44032: 0x9B9D, + 50030 - 44032: 0x9B9E, + 50031 - 44032: 0x9B9F, + 50032 - 44032: 0xBDE4, + 50033 - 44032: 0x9BA0, + 50034 - 44032: 0xBDE5, + 50035 - 44032: 0x9BA1, + 50036 - 44032: 0x9BA2, + 50037 - 44032: 0x9BA3, + 50038 - 44032: 0x9BA4, + 50039 - 44032: 0x9BA5, + 50040 - 44032: 0xBDE6, + 50041 - 44032: 0xBDE7, + 50042 - 44032: 0x9BA6, + 50043 - 44032: 0x9BA7, + 50044 - 44032: 0xBDE8, + 50045 - 44032: 0xBDE9, + 50046 - 44032: 0x9BA8, + 50047 - 44032: 0x9BA9, + 50048 - 44032: 0x9BAA, + 50049 - 44032: 0x9BAB, + 50050 - 44032: 0x9BAC, + 50051 - 44032: 0x9BAD, + 50052 - 44032: 0xBDEA, + 50053 - 44032: 0x9BAE, + 50054 - 44032: 0x9BAF, + 50055 - 44032: 0x9BB0, + 50056 - 44032: 0xBDEB, + 50057 - 44032: 0x9BB1, + 50058 - 44032: 0x9BB2, + 50059 - 44032: 0x9BB3, + 50060 - 44032: 0xBDEC, + 50061 - 44032: 0x9BB4, + 50062 - 44032: 0x9BB5, + 50063 - 44032: 0x9BB6, + 50064 - 44032: 0x9BB7, + 50065 - 44032: 0x9BB8, + 50066 - 44032: 0x9BB9, + 50067 - 44032: 0x9BBA, + 50068 - 44032: 0x9BBB, + 50069 - 44032: 0x9BBC, + 50070 - 44032: 0x9BBD, + 50071 - 44032: 0x9BBE, + 50072 - 44032: 0x9BBF, + 50073 - 44032: 0x9BC0, + 50074 - 44032: 0x9BC1, + 50075 - 44032: 0x9BC2, + 50076 - 44032: 0x9BC3, + 50077 - 44032: 0x9BC4, + 50078 - 44032: 0x9BC5, + 50079 - 44032: 0x9BC6, + 50080 - 44032: 0x9BC7, + 50081 - 44032: 0x9BC8, + 50082 - 44032: 0x9BC9, + 50083 - 44032: 0x9BCA, + 50084 - 44032: 0x9BCB, + 50085 - 44032: 0x9BCC, + 50086 - 44032: 0x9BCD, + 50087 - 44032: 0x9BCE, + 50088 - 44032: 0x9BCF, + 50089 - 44032: 0x9BD0, + 50090 - 44032: 0x9BD1, + 50091 - 44032: 0x9BD2, + 50092 - 44032: 0x9BD3, + 50093 - 44032: 0x9BD4, + 50094 - 44032: 0x9BD5, + 50095 - 44032: 0x9BD6, + 50096 - 44032: 0x9BD7, + 50097 - 44032: 0x9BD8, + 50098 - 44032: 0x9BD9, + 50099 - 44032: 0x9BDA, + 50100 - 44032: 0x9BDB, + 50101 - 44032: 0x9BDC, + 50102 - 44032: 0x9BDD, + 50103 - 44032: 0x9BDE, + 50104 - 44032: 0x9BDF, + 50105 - 44032: 0x9BE0, + 50106 - 44032: 0x9BE1, + 50107 - 44032: 0x9BE2, + 50108 - 44032: 0x9BE3, + 50109 - 44032: 0x9BE4, + 50110 - 44032: 0x9BE5, + 50111 - 44032: 0x9BE6, + 50112 - 44032: 0xBDED, + 50113 - 44032: 0x9BE7, + 50114 - 44032: 0x9BE8, + 50115 - 44032: 0x9BE9, + 50116 - 44032: 0x9BEA, + 50117 - 44032: 0x9BEB, + 50118 - 44032: 0x9BEC, + 50119 - 44032: 0x9BED, + 50120 - 44032: 0x9BEE, + 50121 - 44032: 0x9BEF, + 50122 - 44032: 0x9BF0, + 50123 - 44032: 0x9BF1, + 50124 - 44032: 0x9BF2, + 50125 - 44032: 0x9BF3, + 50126 - 44032: 0x9BF4, + 50127 - 44032: 0x9BF5, + 50128 - 44032: 0x9BF6, + 50129 - 44032: 0x9BF7, + 50130 - 44032: 0x9BF8, + 50131 - 44032: 0x9BF9, + 50132 - 44032: 0x9BFA, + 50133 - 44032: 0x9BFB, + 50134 - 44032: 0x9BFC, + 50135 - 44032: 0x9BFD, + 50136 - 44032: 0xBDEE, + 50137 - 44032: 0xBDEF, + 50138 - 44032: 0x9BFE, + 50139 - 44032: 0x9C41, + 50140 - 44032: 0xBDF0, + 50141 - 44032: 0x9C42, + 50142 - 44032: 0x9C43, + 50143 - 44032: 0xBDF1, + 50144 - 44032: 0xBDF2, + 50145 - 44032: 0x9C44, + 50146 - 44032: 0xBDF3, + 50147 - 44032: 0x9C45, + 50148 - 44032: 0x9C46, + 50149 - 44032: 0x9C47, + 50150 - 44032: 0x9C48, + 50151 - 44032: 0x9C49, + 50152 - 44032: 0xBDF4, + 50153 - 44032: 0xBDF5, + 50154 - 44032: 0x9C4A, + 50155 - 44032: 0x9C4B, + 50156 - 44032: 0x9C4C, + 50157 - 44032: 0xBDF6, + 50158 - 44032: 0x9C4D, + 50159 - 44032: 0x9C4E, + 50160 - 44032: 0x9C4F, + 50161 - 44032: 0x9C50, + 50162 - 44032: 0x9C51, + 50163 - 44032: 0x9C52, + 50164 - 44032: 0xBDF7, + 50165 - 44032: 0xBDF8, + 50166 - 44032: 0x9C53, + 50167 - 44032: 0x9C54, + 50168 - 44032: 0xBDF9, + 50169 - 44032: 0x9C55, + 50170 - 44032: 0x9C56, + 50171 - 44032: 0x9C57, + 50172 - 44032: 0x9C58, + 50173 - 44032: 0x9C59, + 50174 - 44032: 0x9C5A, + 50175 - 44032: 0x9C61, + 50176 - 44032: 0x9C62, + 50177 - 44032: 0x9C63, + 50178 - 44032: 0x9C64, + 50179 - 44032: 0x9C65, + 50180 - 44032: 0x9C66, + 50181 - 44032: 0x9C67, + 50182 - 44032: 0x9C68, + 50183 - 44032: 0x9C69, + 50184 - 44032: 0xBDFA, + 50185 - 44032: 0x9C6A, + 50186 - 44032: 0x9C6B, + 50187 - 44032: 0x9C6C, + 50188 - 44032: 0x9C6D, + 50189 - 44032: 0x9C6E, + 50190 - 44032: 0x9C6F, + 50191 - 44032: 0x9C70, + 50192 - 44032: 0xBDFB, + 50193 - 44032: 0x9C71, + 50194 - 44032: 0x9C72, + 50195 - 44032: 0x9C73, + 50196 - 44032: 0x9C74, + 50197 - 44032: 0x9C75, + 50198 - 44032: 0x9C76, + 50199 - 44032: 0x9C77, + 50200 - 44032: 0x9C78, + 50201 - 44032: 0x9C79, + 50202 - 44032: 0x9C7A, + 50203 - 44032: 0x9C81, + 50204 - 44032: 0x9C82, + 50205 - 44032: 0x9C83, + 50206 - 44032: 0x9C84, + 50207 - 44032: 0x9C85, + 50208 - 44032: 0x9C86, + 50209 - 44032: 0x9C87, + 50210 - 44032: 0x9C88, + 50211 - 44032: 0x9C89, + 50212 - 44032: 0xBDFC, + 50213 - 44032: 0x9C8A, + 50214 - 44032: 0x9C8B, + 50215 - 44032: 0x9C8C, + 50216 - 44032: 0x9C8D, + 50217 - 44032: 0x9C8E, + 50218 - 44032: 0x9C8F, + 50219 - 44032: 0x9C90, + 50220 - 44032: 0xBDFD, + 50221 - 44032: 0x9C91, + 50222 - 44032: 0x9C92, + 50223 - 44032: 0x9C93, + 50224 - 44032: 0xBDFE, + 50225 - 44032: 0x9C94, + 50226 - 44032: 0x9C95, + 50227 - 44032: 0x9C96, + 50228 - 44032: 0xBEA1, + 50229 - 44032: 0x9C97, + 50230 - 44032: 0x9C98, + 50231 - 44032: 0x9C99, + 50232 - 44032: 0x9C9A, + 50233 - 44032: 0x9C9B, + 50234 - 44032: 0x9C9C, + 50235 - 44032: 0x9C9D, + 50236 - 44032: 0xBEA2, + 50237 - 44032: 0xBEA3, + 50238 - 44032: 0x9C9E, + 50239 - 44032: 0x9C9F, + 50240 - 44032: 0x9CA0, + 50241 - 44032: 0x9CA1, + 50242 - 44032: 0x9CA2, + 50243 - 44032: 0x9CA3, + 50244 - 44032: 0x9CA4, + 50245 - 44032: 0x9CA5, + 50246 - 44032: 0x9CA6, + 50247 - 44032: 0x9CA7, + 50248 - 44032: 0xBEA4, + 50249 - 44032: 0x9CA8, + 50250 - 44032: 0x9CA9, + 50251 - 44032: 0x9CAA, + 50252 - 44032: 0x9CAB, + 50253 - 44032: 0x9CAC, + 50254 - 44032: 0x9CAD, + 50255 - 44032: 0x9CAE, + 50256 - 44032: 0x9CAF, + 50257 - 44032: 0x9CB0, + 50258 - 44032: 0x9CB1, + 50259 - 44032: 0x9CB2, + 50260 - 44032: 0x9CB3, + 50261 - 44032: 0x9CB4, + 50262 - 44032: 0x9CB5, + 50263 - 44032: 0x9CB6, + 50264 - 44032: 0x9CB7, + 50265 - 44032: 0x9CB8, + 50266 - 44032: 0x9CB9, + 50267 - 44032: 0x9CBA, + 50268 - 44032: 0x9CBB, + 50269 - 44032: 0x9CBC, + 50270 - 44032: 0x9CBD, + 50271 - 44032: 0x9CBE, + 50272 - 44032: 0x9CBF, + 50273 - 44032: 0x9CC0, + 50274 - 44032: 0x9CC1, + 50275 - 44032: 0x9CC2, + 50276 - 44032: 0xBEA5, + 50277 - 44032: 0xBEA6, + 50278 - 44032: 0x9CC3, + 50279 - 44032: 0x9CC4, + 50280 - 44032: 0xBEA7, + 50281 - 44032: 0x9CC5, + 50282 - 44032: 0x9CC6, + 50283 - 44032: 0x9CC7, + 50284 - 44032: 0xBEA8, + 50285 - 44032: 0x9CC8, + 50286 - 44032: 0x9CC9, + 50287 - 44032: 0x9CCA, + 50288 - 44032: 0x9CCB, + 50289 - 44032: 0x9CCC, + 50290 - 44032: 0x9CCD, + 50291 - 44032: 0x9CCE, + 50292 - 44032: 0xBEA9, + 50293 - 44032: 0xBEAA, + 50294 - 44032: 0x9CCF, + 50295 - 44032: 0x9CD0, + 50296 - 44032: 0x9CD1, + 50297 - 44032: 0xBEAB, + 50298 - 44032: 0x9CD2, + 50299 - 44032: 0x9CD3, + 50300 - 44032: 0x9CD4, + 50301 - 44032: 0x9CD5, + 50302 - 44032: 0x9CD6, + 50303 - 44032: 0x9CD7, + 50304 - 44032: 0xBEAC, + 50305 - 44032: 0x9CD8, + 50306 - 44032: 0x9CD9, + 50307 - 44032: 0x9CDA, + 50308 - 44032: 0x9CDB, + 50309 - 44032: 0x9CDC, + 50310 - 44032: 0x9CDD, + 50311 - 44032: 0x9CDE, + 50312 - 44032: 0x9CDF, + 50313 - 44032: 0x9CE0, + 50314 - 44032: 0x9CE1, + 50315 - 44032: 0x9CE2, + 50316 - 44032: 0x9CE3, + 50317 - 44032: 0x9CE4, + 50318 - 44032: 0x9CE5, + 50319 - 44032: 0x9CE6, + 50320 - 44032: 0x9CE7, + 50321 - 44032: 0x9CE8, + 50322 - 44032: 0x9CE9, + 50323 - 44032: 0x9CEA, + 50324 - 44032: 0xBEAD, + 50325 - 44032: 0x9CEB, + 50326 - 44032: 0x9CEC, + 50327 - 44032: 0x9CED, + 50328 - 44032: 0x9CEE, + 50329 - 44032: 0x9CEF, + 50330 - 44032: 0x9CF0, + 50331 - 44032: 0x9CF1, + 50332 - 44032: 0xBEAE, + 50333 - 44032: 0x9CF2, + 50334 - 44032: 0x9CF3, + 50335 - 44032: 0x9CF4, + 50336 - 44032: 0x9CF5, + 50337 - 44032: 0x9CF6, + 50338 - 44032: 0x9CF7, + 50339 - 44032: 0x9CF8, + 50340 - 44032: 0x9CF9, + 50341 - 44032: 0x9CFA, + 50342 - 44032: 0x9CFB, + 50343 - 44032: 0x9CFC, + 50344 - 44032: 0x9CFD, + 50345 - 44032: 0x9CFE, + 50346 - 44032: 0x9D41, + 50347 - 44032: 0x9D42, + 50348 - 44032: 0x9D43, + 50349 - 44032: 0x9D44, + 50350 - 44032: 0x9D45, + 50351 - 44032: 0x9D46, + 50352 - 44032: 0x9D47, + 50353 - 44032: 0x9D48, + 50354 - 44032: 0x9D49, + 50355 - 44032: 0x9D4A, + 50356 - 44032: 0x9D4B, + 50357 - 44032: 0x9D4C, + 50358 - 44032: 0x9D4D, + 50359 - 44032: 0x9D4E, + 50360 - 44032: 0xBEAF, + 50361 - 44032: 0x9D4F, + 50362 - 44032: 0x9D50, + 50363 - 44032: 0x9D51, + 50364 - 44032: 0xBEB0, + 50365 - 44032: 0x9D52, + 50366 - 44032: 0x9D53, + 50367 - 44032: 0x9D54, + 50368 - 44032: 0x9D55, + 50369 - 44032: 0x9D56, + 50370 - 44032: 0x9D57, + 50371 - 44032: 0x9D58, + 50372 - 44032: 0x9D59, + 50373 - 44032: 0x9D5A, + 50374 - 44032: 0x9D61, + 50375 - 44032: 0x9D62, + 50376 - 44032: 0x9D63, + 50377 - 44032: 0x9D64, + 50378 - 44032: 0x9D65, + 50379 - 44032: 0x9D66, + 50380 - 44032: 0x9D67, + 50381 - 44032: 0x9D68, + 50382 - 44032: 0x9D69, + 50383 - 44032: 0x9D6A, + 50384 - 44032: 0x9D6B, + 50385 - 44032: 0x9D6C, + 50386 - 44032: 0x9D6D, + 50387 - 44032: 0x9D6E, + 50388 - 44032: 0x9D6F, + 50389 - 44032: 0x9D70, + 50390 - 44032: 0x9D71, + 50391 - 44032: 0x9D72, + 50392 - 44032: 0x9D73, + 50393 - 44032: 0x9D74, + 50394 - 44032: 0x9D75, + 50395 - 44032: 0x9D76, + 50396 - 44032: 0x9D77, + 50397 - 44032: 0x9D78, + 50398 - 44032: 0x9D79, + 50399 - 44032: 0x9D7A, + 50400 - 44032: 0x9D81, + 50401 - 44032: 0x9D82, + 50402 - 44032: 0x9D83, + 50403 - 44032: 0x9D84, + 50404 - 44032: 0x9D85, + 50405 - 44032: 0x9D86, + 50406 - 44032: 0x9D87, + 50407 - 44032: 0x9D88, + 50408 - 44032: 0x9D89, + 50409 - 44032: 0xBEB1, + 50410 - 44032: 0x9D8A, + 50411 - 44032: 0x9D8B, + 50412 - 44032: 0x9D8C, + 50413 - 44032: 0x9D8D, + 50414 - 44032: 0x9D8E, + 50415 - 44032: 0x9D8F, + 50416 - 44032: 0xBEB2, + 50417 - 44032: 0xBEB3, + 50418 - 44032: 0x9D90, + 50419 - 44032: 0x9D91, + 50420 - 44032: 0xBEB4, + 50421 - 44032: 0x9D92, + 50422 - 44032: 0x9D93, + 50423 - 44032: 0x9D94, + 50424 - 44032: 0xBEB5, + 50425 - 44032: 0x9D95, + 50426 - 44032: 0xBEB6, + 50427 - 44032: 0x9D96, + 50428 - 44032: 0x9D97, + 50429 - 44032: 0x9D98, + 50430 - 44032: 0x9D99, + 50431 - 44032: 0xBEB7, + 50432 - 44032: 0xBEB8, + 50433 - 44032: 0xBEB9, + 50434 - 44032: 0x9D9A, + 50435 - 44032: 0x9D9B, + 50436 - 44032: 0x9D9C, + 50437 - 44032: 0x9D9D, + 50438 - 44032: 0x9D9E, + 50439 - 44032: 0x9D9F, + 50440 - 44032: 0x9DA0, + 50441 - 44032: 0x9DA1, + 50442 - 44032: 0x9DA2, + 50443 - 44032: 0x9DA3, + 50444 - 44032: 0xBEBA, + 50445 - 44032: 0x9DA4, + 50446 - 44032: 0x9DA5, + 50447 - 44032: 0x9DA6, + 50448 - 44032: 0xBEBB, + 50449 - 44032: 0x9DA7, + 50450 - 44032: 0x9DA8, + 50451 - 44032: 0x9DA9, + 50452 - 44032: 0xBEBC, + 50453 - 44032: 0x9DAA, + 50454 - 44032: 0x9DAB, + 50455 - 44032: 0x9DAC, + 50456 - 44032: 0x9DAD, + 50457 - 44032: 0x9DAE, + 50458 - 44032: 0x9DAF, + 50459 - 44032: 0x9DB0, + 50460 - 44032: 0xBEBD, + 50461 - 44032: 0x9DB1, + 50462 - 44032: 0x9DB2, + 50463 - 44032: 0x9DB3, + 50464 - 44032: 0x9DB4, + 50465 - 44032: 0x9DB5, + 50466 - 44032: 0x9DB6, + 50467 - 44032: 0x9DB7, + 50468 - 44032: 0x9DB8, + 50469 - 44032: 0x9DB9, + 50470 - 44032: 0x9DBA, + 50471 - 44032: 0x9DBB, + 50472 - 44032: 0xBEBE, + 50473 - 44032: 0xBEBF, + 50474 - 44032: 0x9DBC, + 50475 - 44032: 0x9DBD, + 50476 - 44032: 0xBEC0, + 50477 - 44032: 0x9DBE, + 50478 - 44032: 0x9DBF, + 50479 - 44032: 0x9DC0, + 50480 - 44032: 0xBEC1, + 50481 - 44032: 0x9DC1, + 50482 - 44032: 0x9DC2, + 50483 - 44032: 0x9DC3, + 50484 - 44032: 0x9DC4, + 50485 - 44032: 0x9DC5, + 50486 - 44032: 0x9DC6, + 50487 - 44032: 0x9DC7, + 50488 - 44032: 0xBEC2, + 50489 - 44032: 0xBEC3, + 50490 - 44032: 0x9DC8, + 50491 - 44032: 0xBEC4, + 50492 - 44032: 0x9DC9, + 50493 - 44032: 0xBEC5, + 50494 - 44032: 0x9DCA, + 50495 - 44032: 0x9DCB, + 50496 - 44032: 0x9DCC, + 50497 - 44032: 0x9DCD, + 50498 - 44032: 0x9DCE, + 50499 - 44032: 0x9DCF, + 50500 - 44032: 0xBEC6, + 50501 - 44032: 0xBEC7, + 50502 - 44032: 0x9DD0, + 50503 - 44032: 0x9DD1, + 50504 - 44032: 0xBEC8, + 50505 - 44032: 0xBEC9, + 50506 - 44032: 0xBECA, + 50507 - 44032: 0x9DD2, + 50508 - 44032: 0xBECB, + 50509 - 44032: 0xBECC, + 50510 - 44032: 0xBECD, + 50511 - 44032: 0x9DD3, + 50512 - 44032: 0x9DD4, + 50513 - 44032: 0x9DD5, + 50514 - 44032: 0x9DD6, + 50515 - 44032: 0xBECE, + 50516 - 44032: 0xBECF, + 50517 - 44032: 0xBED0, + 50518 - 44032: 0x9DD7, + 50519 - 44032: 0xBED1, + 50520 - 44032: 0xBED2, + 50521 - 44032: 0xBED3, + 50522 - 44032: 0x9DD8, + 50523 - 44032: 0x9DD9, + 50524 - 44032: 0x9DDA, + 50525 - 44032: 0xBED4, + 50526 - 44032: 0xBED5, + 50527 - 44032: 0x9DDB, + 50528 - 44032: 0xBED6, + 50529 - 44032: 0xBED7, + 50530 - 44032: 0x9DDC, + 50531 - 44032: 0x9DDD, + 50532 - 44032: 0xBED8, + 50533 - 44032: 0x9DDE, + 50534 - 44032: 0x9DDF, + 50535 - 44032: 0x9DE0, + 50536 - 44032: 0xBED9, + 50537 - 44032: 0x9DE1, + 50538 - 44032: 0x9DE2, + 50539 - 44032: 0x9DE3, + 50540 - 44032: 0x9DE4, + 50541 - 44032: 0x9DE5, + 50542 - 44032: 0x9DE6, + 50543 - 44032: 0x9DE7, + 50544 - 44032: 0xBEDA, + 50545 - 44032: 0xBEDB, + 50546 - 44032: 0x9DE8, + 50547 - 44032: 0xBEDC, + 50548 - 44032: 0xBEDD, + 50549 - 44032: 0xBEDE, + 50550 - 44032: 0x9DE9, + 50551 - 44032: 0x9DEA, + 50552 - 44032: 0x9DEB, + 50553 - 44032: 0x9DEC, + 50554 - 44032: 0x9DED, + 50555 - 44032: 0x9DEE, + 50556 - 44032: 0xBEDF, + 50557 - 44032: 0xBEE0, + 50558 - 44032: 0x9DEF, + 50559 - 44032: 0x9DF0, + 50560 - 44032: 0xBEE1, + 50561 - 44032: 0x9DF1, + 50562 - 44032: 0x9DF2, + 50563 - 44032: 0x9DF3, + 50564 - 44032: 0xBEE2, + 50565 - 44032: 0x9DF4, + 50566 - 44032: 0x9DF5, + 50567 - 44032: 0xBEE3, + 50568 - 44032: 0x9DF6, + 50569 - 44032: 0x9DF7, + 50570 - 44032: 0x9DF8, + 50571 - 44032: 0x9DF9, + 50572 - 44032: 0xBEE4, + 50573 - 44032: 0xBEE5, + 50574 - 44032: 0x9DFA, + 50575 - 44032: 0xBEE6, + 50576 - 44032: 0x9DFB, + 50577 - 44032: 0xBEE7, + 50578 - 44032: 0x9DFC, + 50579 - 44032: 0x9DFD, + 50580 - 44032: 0x9DFE, + 50581 - 44032: 0xBEE8, + 50582 - 44032: 0x9E41, + 50583 - 44032: 0xBEE9, + 50584 - 44032: 0xBEEA, + 50585 - 44032: 0x9E42, + 50586 - 44032: 0x9E43, + 50587 - 44032: 0x9E44, + 50588 - 44032: 0xBEEB, + 50589 - 44032: 0x9E45, + 50590 - 44032: 0x9E46, + 50591 - 44032: 0x9E47, + 50592 - 44032: 0xBEEC, + 50593 - 44032: 0x9E48, + 50594 - 44032: 0x9E49, + 50595 - 44032: 0x9E4A, + 50596 - 44032: 0x9E4B, + 50597 - 44032: 0x9E4C, + 50598 - 44032: 0x9E4D, + 50599 - 44032: 0x9E4E, + 50600 - 44032: 0x9E4F, + 50601 - 44032: 0xBEED, + 50602 - 44032: 0x9E50, + 50603 - 44032: 0x9E51, + 50604 - 44032: 0x9E52, + 50605 - 44032: 0x9E53, + 50606 - 44032: 0x9E54, + 50607 - 44032: 0x9E55, + 50608 - 44032: 0x9E56, + 50609 - 44032: 0x9E57, + 50610 - 44032: 0x9E58, + 50611 - 44032: 0x9E59, + 50612 - 44032: 0xBEEE, + 50613 - 44032: 0xBEEF, + 50614 - 44032: 0x9E5A, + 50615 - 44032: 0x9E61, + 50616 - 44032: 0xBEF0, + 50617 - 44032: 0xBEF1, + 50618 - 44032: 0x9E62, + 50619 - 44032: 0xBEF2, + 50620 - 44032: 0xBEF3, + 50621 - 44032: 0xBEF4, + 50622 - 44032: 0xBEF5, + 50623 - 44032: 0x9E63, + 50624 - 44032: 0x9E64, + 50625 - 44032: 0x9E65, + 50626 - 44032: 0x9E66, + 50627 - 44032: 0x9E67, + 50628 - 44032: 0xBEF6, + 50629 - 44032: 0xBEF7, + 50630 - 44032: 0xBEF8, + 50631 - 44032: 0xBEF9, + 50632 - 44032: 0xBEFA, + 50633 - 44032: 0xBEFB, + 50634 - 44032: 0xBEFC, + 50635 - 44032: 0x9E68, + 50636 - 44032: 0xBEFD, + 50637 - 44032: 0x9E69, + 50638 - 44032: 0xBEFE, + 50639 - 44032: 0x9E6A, + 50640 - 44032: 0xBFA1, + 50641 - 44032: 0xBFA2, + 50642 - 44032: 0x9E6B, + 50643 - 44032: 0x9E6C, + 50644 - 44032: 0xBFA3, + 50645 - 44032: 0x9E6D, + 50646 - 44032: 0x9E6E, + 50647 - 44032: 0x9E6F, + 50648 - 44032: 0xBFA4, + 50649 - 44032: 0x9E70, + 50650 - 44032: 0x9E71, + 50651 - 44032: 0x9E72, + 50652 - 44032: 0x9E73, + 50653 - 44032: 0x9E74, + 50654 - 44032: 0x9E75, + 50655 - 44032: 0x9E76, + 50656 - 44032: 0xBFA5, + 50657 - 44032: 0xBFA6, + 50658 - 44032: 0x9E77, + 50659 - 44032: 0xBFA7, + 50660 - 44032: 0x9E78, + 50661 - 44032: 0xBFA8, + 50662 - 44032: 0x9E79, + 50663 - 44032: 0x9E7A, + 50664 - 44032: 0x9E81, + 50665 - 44032: 0x9E82, + 50666 - 44032: 0x9E83, + 50667 - 44032: 0x9E84, + 50668 - 44032: 0xBFA9, + 50669 - 44032: 0xBFAA, + 50670 - 44032: 0xBFAB, + 50671 - 44032: 0x9E85, + 50672 - 44032: 0xBFAC, + 50673 - 44032: 0x9E86, + 50674 - 44032: 0x9E87, + 50675 - 44032: 0x9E88, + 50676 - 44032: 0xBFAD, + 50677 - 44032: 0x9E89, + 50678 - 44032: 0xBFAE, + 50679 - 44032: 0xBFAF, + 50680 - 44032: 0x9E8A, + 50681 - 44032: 0x9E8B, + 50682 - 44032: 0x9E8C, + 50683 - 44032: 0x9E8D, + 50684 - 44032: 0xBFB0, + 50685 - 44032: 0xBFB1, + 50686 - 44032: 0xBFB2, + 50687 - 44032: 0xBFB3, + 50688 - 44032: 0xBFB4, + 50689 - 44032: 0xBFB5, + 50690 - 44032: 0x9E8E, + 50691 - 44032: 0x9E8F, + 50692 - 44032: 0x9E90, + 50693 - 44032: 0xBFB6, + 50694 - 44032: 0xBFB7, + 50695 - 44032: 0xBFB8, + 50696 - 44032: 0xBFB9, + 50697 - 44032: 0x9E91, + 50698 - 44032: 0x9E92, + 50699 - 44032: 0x9E93, + 50700 - 44032: 0xBFBA, + 50701 - 44032: 0x9E94, + 50702 - 44032: 0x9E95, + 50703 - 44032: 0x9E96, + 50704 - 44032: 0xBFBB, + 50705 - 44032: 0x9E97, + 50706 - 44032: 0x9E98, + 50707 - 44032: 0x9E99, + 50708 - 44032: 0x9E9A, + 50709 - 44032: 0x9E9B, + 50710 - 44032: 0x9E9C, + 50711 - 44032: 0x9E9D, + 50712 - 44032: 0xBFBC, + 50713 - 44032: 0xBFBD, + 50714 - 44032: 0x9E9E, + 50715 - 44032: 0xBFBE, + 50716 - 44032: 0xBFBF, + 50717 - 44032: 0x9E9F, + 50718 - 44032: 0x9EA0, + 50719 - 44032: 0x9EA1, + 50720 - 44032: 0x9EA2, + 50721 - 44032: 0x9EA3, + 50722 - 44032: 0x9EA4, + 50723 - 44032: 0x9EA5, + 50724 - 44032: 0xBFC0, + 50725 - 44032: 0xBFC1, + 50726 - 44032: 0x9EA6, + 50727 - 44032: 0x9EA7, + 50728 - 44032: 0xBFC2, + 50729 - 44032: 0x9EA8, + 50730 - 44032: 0x9EA9, + 50731 - 44032: 0x9EAA, + 50732 - 44032: 0xBFC3, + 50733 - 44032: 0xBFC4, + 50734 - 44032: 0xBFC5, + 50735 - 44032: 0x9EAB, + 50736 - 44032: 0xBFC6, + 50737 - 44032: 0x9EAC, + 50738 - 44032: 0x9EAD, + 50739 - 44032: 0xBFC7, + 50740 - 44032: 0xBFC8, + 50741 - 44032: 0xBFC9, + 50742 - 44032: 0x9EAE, + 50743 - 44032: 0xBFCA, + 50744 - 44032: 0x9EAF, + 50745 - 44032: 0xBFCB, + 50746 - 44032: 0x9EB0, + 50747 - 44032: 0xBFCC, + 50748 - 44032: 0x9EB1, + 50749 - 44032: 0x9EB2, + 50750 - 44032: 0x9EB3, + 50751 - 44032: 0x9EB4, + 50752 - 44032: 0xBFCD, + 50753 - 44032: 0xBFCE, + 50754 - 44032: 0x9EB5, + 50755 - 44032: 0x9EB6, + 50756 - 44032: 0xBFCF, + 50757 - 44032: 0x9EB7, + 50758 - 44032: 0x9EB8, + 50759 - 44032: 0x9EB9, + 50760 - 44032: 0xBFD0, + 50761 - 44032: 0x9EBA, + 50762 - 44032: 0x9EBB, + 50763 - 44032: 0x9EBC, + 50764 - 44032: 0x9EBD, + 50765 - 44032: 0x9EBE, + 50766 - 44032: 0x9EBF, + 50767 - 44032: 0x9EC0, + 50768 - 44032: 0xBFD1, + 50769 - 44032: 0xBFD2, + 50770 - 44032: 0x9EC1, + 50771 - 44032: 0xBFD3, + 50772 - 44032: 0xBFD4, + 50773 - 44032: 0xBFD5, + 50774 - 44032: 0x9EC2, + 50775 - 44032: 0x9EC3, + 50776 - 44032: 0x9EC4, + 50777 - 44032: 0x9EC5, + 50778 - 44032: 0x9EC6, + 50779 - 44032: 0x9EC7, + 50780 - 44032: 0xBFD6, + 50781 - 44032: 0xBFD7, + 50782 - 44032: 0x9EC8, + 50783 - 44032: 0x9EC9, + 50784 - 44032: 0xBFD8, + 50785 - 44032: 0x9ECA, + 50786 - 44032: 0x9ECB, + 50787 - 44032: 0x9ECC, + 50788 - 44032: 0x9ECD, + 50789 - 44032: 0x9ECE, + 50790 - 44032: 0x9ECF, + 50791 - 44032: 0x9ED0, + 50792 - 44032: 0x9ED1, + 50793 - 44032: 0x9ED2, + 50794 - 44032: 0x9ED3, + 50795 - 44032: 0x9ED4, + 50796 - 44032: 0xBFD9, + 50797 - 44032: 0x9ED5, + 50798 - 44032: 0x9ED6, + 50799 - 44032: 0xBFDA, + 50800 - 44032: 0x9ED7, + 50801 - 44032: 0xBFDB, + 50802 - 44032: 0x9ED8, + 50803 - 44032: 0x9ED9, + 50804 - 44032: 0x9EDA, + 50805 - 44032: 0x9EDB, + 50806 - 44032: 0x9EDC, + 50807 - 44032: 0x9EDD, + 50808 - 44032: 0xBFDC, + 50809 - 44032: 0xBFDD, + 50810 - 44032: 0x9EDE, + 50811 - 44032: 0x9EDF, + 50812 - 44032: 0xBFDE, + 50813 - 44032: 0x9EE0, + 50814 - 44032: 0x9EE1, + 50815 - 44032: 0x9EE2, + 50816 - 44032: 0xBFDF, + 50817 - 44032: 0x9EE3, + 50818 - 44032: 0x9EE4, + 50819 - 44032: 0x9EE5, + 50820 - 44032: 0x9EE6, + 50821 - 44032: 0x9EE7, + 50822 - 44032: 0x9EE8, + 50823 - 44032: 0x9EE9, + 50824 - 44032: 0xBFE0, + 50825 - 44032: 0xBFE1, + 50826 - 44032: 0x9EEA, + 50827 - 44032: 0xBFE2, + 50828 - 44032: 0x9EEB, + 50829 - 44032: 0xBFE3, + 50830 - 44032: 0x9EEC, + 50831 - 44032: 0x9EED, + 50832 - 44032: 0x9EEE, + 50833 - 44032: 0x9EEF, + 50834 - 44032: 0x9EF0, + 50835 - 44032: 0x9EF1, + 50836 - 44032: 0xBFE4, + 50837 - 44032: 0xBFE5, + 50838 - 44032: 0x9EF2, + 50839 - 44032: 0x9EF3, + 50840 - 44032: 0xBFE6, + 50841 - 44032: 0x9EF4, + 50842 - 44032: 0x9EF5, + 50843 - 44032: 0x9EF6, + 50844 - 44032: 0xBFE7, + 50845 - 44032: 0x9EF7, + 50846 - 44032: 0x9EF8, + 50847 - 44032: 0x9EF9, + 50848 - 44032: 0x9EFA, + 50849 - 44032: 0x9EFB, + 50850 - 44032: 0x9EFC, + 50851 - 44032: 0x9EFD, + 50852 - 44032: 0xBFE8, + 50853 - 44032: 0xBFE9, + 50854 - 44032: 0x9EFE, + 50855 - 44032: 0xBFEA, + 50856 - 44032: 0x9F41, + 50857 - 44032: 0xBFEB, + 50858 - 44032: 0x9F42, + 50859 - 44032: 0x9F43, + 50860 - 44032: 0x9F44, + 50861 - 44032: 0x9F45, + 50862 - 44032: 0x9F46, + 50863 - 44032: 0x9F47, + 50864 - 44032: 0xBFEC, + 50865 - 44032: 0xBFED, + 50866 - 44032: 0x9F48, + 50867 - 44032: 0x9F49, + 50868 - 44032: 0xBFEE, + 50869 - 44032: 0x9F4A, + 50870 - 44032: 0x9F4B, + 50871 - 44032: 0x9F4C, + 50872 - 44032: 0xBFEF, + 50873 - 44032: 0xBFF0, + 50874 - 44032: 0xBFF1, + 50875 - 44032: 0x9F4D, + 50876 - 44032: 0x9F4E, + 50877 - 44032: 0x9F4F, + 50878 - 44032: 0x9F50, + 50879 - 44032: 0x9F51, + 50880 - 44032: 0xBFF2, + 50881 - 44032: 0xBFF3, + 50882 - 44032: 0x9F52, + 50883 - 44032: 0xBFF4, + 50884 - 44032: 0x9F53, + 50885 - 44032: 0xBFF5, + 50886 - 44032: 0x9F54, + 50887 - 44032: 0x9F55, + 50888 - 44032: 0x9F56, + 50889 - 44032: 0x9F57, + 50890 - 44032: 0x9F58, + 50891 - 44032: 0x9F59, + 50892 - 44032: 0xBFF6, + 50893 - 44032: 0xBFF7, + 50894 - 44032: 0x9F5A, + 50895 - 44032: 0x9F61, + 50896 - 44032: 0xBFF8, + 50897 - 44032: 0x9F62, + 50898 - 44032: 0x9F63, + 50899 - 44032: 0x9F64, + 50900 - 44032: 0xBFF9, + 50901 - 44032: 0x9F65, + 50902 - 44032: 0x9F66, + 50903 - 44032: 0x9F67, + 50904 - 44032: 0x9F68, + 50905 - 44032: 0x9F69, + 50906 - 44032: 0x9F6A, + 50907 - 44032: 0x9F6B, + 50908 - 44032: 0xBFFA, + 50909 - 44032: 0xBFFB, + 50910 - 44032: 0x9F6C, + 50911 - 44032: 0x9F6D, + 50912 - 44032: 0xBFFC, + 50913 - 44032: 0xBFFD, + 50914 - 44032: 0x9F6E, + 50915 - 44032: 0x9F6F, + 50916 - 44032: 0x9F70, + 50917 - 44032: 0x9F71, + 50918 - 44032: 0x9F72, + 50919 - 44032: 0x9F73, + 50920 - 44032: 0xBFFE, + 50921 - 44032: 0xC0A1, + 50922 - 44032: 0x9F74, + 50923 - 44032: 0x9F75, + 50924 - 44032: 0xC0A2, + 50925 - 44032: 0x9F76, + 50926 - 44032: 0x9F77, + 50927 - 44032: 0x9F78, + 50928 - 44032: 0xC0A3, + 50929 - 44032: 0x9F79, + 50930 - 44032: 0x9F7A, + 50931 - 44032: 0x9F81, + 50932 - 44032: 0x9F82, + 50933 - 44032: 0x9F83, + 50934 - 44032: 0x9F84, + 50935 - 44032: 0x9F85, + 50936 - 44032: 0xC0A4, + 50937 - 44032: 0xC0A5, + 50938 - 44032: 0x9F86, + 50939 - 44032: 0x9F87, + 50940 - 44032: 0x9F88, + 50941 - 44032: 0xC0A6, + 50942 - 44032: 0x9F89, + 50943 - 44032: 0x9F8A, + 50944 - 44032: 0x9F8B, + 50945 - 44032: 0x9F8C, + 50946 - 44032: 0x9F8D, + 50947 - 44032: 0x9F8E, + 50948 - 44032: 0xC0A7, + 50949 - 44032: 0xC0A8, + 50950 - 44032: 0x9F8F, + 50951 - 44032: 0x9F90, + 50952 - 44032: 0xC0A9, + 50953 - 44032: 0x9F91, + 50954 - 44032: 0x9F92, + 50955 - 44032: 0x9F93, + 50956 - 44032: 0xC0AA, + 50957 - 44032: 0x9F94, + 50958 - 44032: 0x9F95, + 50959 - 44032: 0x9F96, + 50960 - 44032: 0x9F97, + 50961 - 44032: 0x9F98, + 50962 - 44032: 0x9F99, + 50963 - 44032: 0x9F9A, + 50964 - 44032: 0xC0AB, + 50965 - 44032: 0xC0AC, + 50966 - 44032: 0x9F9B, + 50967 - 44032: 0xC0AD, + 50968 - 44032: 0x9F9C, + 50969 - 44032: 0xC0AE, + 50970 - 44032: 0x9F9D, + 50971 - 44032: 0x9F9E, + 50972 - 44032: 0x9F9F, + 50973 - 44032: 0x9FA0, + 50974 - 44032: 0x9FA1, + 50975 - 44032: 0x9FA2, + 50976 - 44032: 0xC0AF, + 50977 - 44032: 0xC0B0, + 50978 - 44032: 0x9FA3, + 50979 - 44032: 0x9FA4, + 50980 - 44032: 0xC0B1, + 50981 - 44032: 0x9FA5, + 50982 - 44032: 0x9FA6, + 50983 - 44032: 0x9FA7, + 50984 - 44032: 0xC0B2, + 50985 - 44032: 0x9FA8, + 50986 - 44032: 0x9FA9, + 50987 - 44032: 0x9FAA, + 50988 - 44032: 0x9FAB, + 50989 - 44032: 0x9FAC, + 50990 - 44032: 0x9FAD, + 50991 - 44032: 0x9FAE, + 50992 - 44032: 0xC0B3, + 50993 - 44032: 0xC0B4, + 50994 - 44032: 0x9FAF, + 50995 - 44032: 0xC0B5, + 50996 - 44032: 0x9FB0, + 50997 - 44032: 0xC0B6, + 50998 - 44032: 0x9FB1, + 50999 - 44032: 0xC0B7, + 51000 - 44032: 0x9FB2, + 51001 - 44032: 0x9FB3, + 51002 - 44032: 0x9FB4, + 51003 - 44032: 0x9FB5, + 51004 - 44032: 0xC0B8, + 51005 - 44032: 0xC0B9, + 51006 - 44032: 0x9FB6, + 51007 - 44032: 0x9FB7, + 51008 - 44032: 0xC0BA, + 51009 - 44032: 0x9FB8, + 51010 - 44032: 0x9FB9, + 51011 - 44032: 0x9FBA, + 51012 - 44032: 0xC0BB, + 51013 - 44032: 0x9FBB, + 51014 - 44032: 0x9FBC, + 51015 - 44032: 0x9FBD, + 51016 - 44032: 0x9FBE, + 51017 - 44032: 0x9FBF, + 51018 - 44032: 0xC0BC, + 51019 - 44032: 0x9FC0, + 51020 - 44032: 0xC0BD, + 51021 - 44032: 0xC0BE, + 51022 - 44032: 0x9FC1, + 51023 - 44032: 0xC0BF, + 51024 - 44032: 0x9FC2, + 51025 - 44032: 0xC0C0, + 51026 - 44032: 0xC0C1, + 51027 - 44032: 0xC0C2, + 51028 - 44032: 0xC0C3, + 51029 - 44032: 0xC0C4, + 51030 - 44032: 0xC0C5, + 51031 - 44032: 0xC0C6, + 51032 - 44032: 0xC0C7, + 51033 - 44032: 0x9FC3, + 51034 - 44032: 0x9FC4, + 51035 - 44032: 0x9FC5, + 51036 - 44032: 0xC0C8, + 51037 - 44032: 0x9FC6, + 51038 - 44032: 0x9FC7, + 51039 - 44032: 0x9FC8, + 51040 - 44032: 0xC0C9, + 51041 - 44032: 0x9FC9, + 51042 - 44032: 0x9FCA, + 51043 - 44032: 0x9FCB, + 51044 - 44032: 0x9FCC, + 51045 - 44032: 0x9FCD, + 51046 - 44032: 0x9FCE, + 51047 - 44032: 0x9FCF, + 51048 - 44032: 0xC0CA, + 51049 - 44032: 0x9FD0, + 51050 - 44032: 0x9FD1, + 51051 - 44032: 0xC0CB, + 51052 - 44032: 0x9FD2, + 51053 - 44032: 0x9FD3, + 51054 - 44032: 0x9FD4, + 51055 - 44032: 0x9FD5, + 51056 - 44032: 0x9FD6, + 51057 - 44032: 0x9FD7, + 51058 - 44032: 0x9FD8, + 51059 - 44032: 0x9FD9, + 51060 - 44032: 0xC0CC, + 51061 - 44032: 0xC0CD, + 51062 - 44032: 0x9FDA, + 51063 - 44032: 0x9FDB, + 51064 - 44032: 0xC0CE, + 51065 - 44032: 0x9FDC, + 51066 - 44032: 0x9FDD, + 51067 - 44032: 0x9FDE, + 51068 - 44032: 0xC0CF, + 51069 - 44032: 0xC0D0, + 51070 - 44032: 0xC0D1, + 51071 - 44032: 0x9FDF, + 51072 - 44032: 0x9FE0, + 51073 - 44032: 0x9FE1, + 51074 - 44032: 0x9FE2, + 51075 - 44032: 0xC0D2, + 51076 - 44032: 0xC0D3, + 51077 - 44032: 0xC0D4, + 51078 - 44032: 0x9FE3, + 51079 - 44032: 0xC0D5, + 51080 - 44032: 0xC0D6, + 51081 - 44032: 0xC0D7, + 51082 - 44032: 0xC0D8, + 51083 - 44032: 0x9FE4, + 51084 - 44032: 0x9FE5, + 51085 - 44032: 0x9FE6, + 51086 - 44032: 0xC0D9, + 51087 - 44032: 0x9FE7, + 51088 - 44032: 0xC0DA, + 51089 - 44032: 0xC0DB, + 51090 - 44032: 0x9FE8, + 51091 - 44032: 0x9FE9, + 51092 - 44032: 0xC0DC, + 51093 - 44032: 0x9FEA, + 51094 - 44032: 0xC0DD, + 51095 - 44032: 0xC0DE, + 51096 - 44032: 0xC0DF, + 51097 - 44032: 0x9FEB, + 51098 - 44032: 0xC0E0, + 51099 - 44032: 0x9FEC, + 51100 - 44032: 0x9FED, + 51101 - 44032: 0x9FEE, + 51102 - 44032: 0x9FEF, + 51103 - 44032: 0x9FF0, + 51104 - 44032: 0xC0E1, + 51105 - 44032: 0xC0E2, + 51106 - 44032: 0x9FF1, + 51107 - 44032: 0xC0E3, + 51108 - 44032: 0xC0E4, + 51109 - 44032: 0xC0E5, + 51110 - 44032: 0xC0E6, + 51111 - 44032: 0x9FF2, + 51112 - 44032: 0x9FF3, + 51113 - 44032: 0x9FF4, + 51114 - 44032: 0x9FF5, + 51115 - 44032: 0x9FF6, + 51116 - 44032: 0xC0E7, + 51117 - 44032: 0xC0E8, + 51118 - 44032: 0x9FF7, + 51119 - 44032: 0x9FF8, + 51120 - 44032: 0xC0E9, + 51121 - 44032: 0x9FF9, + 51122 - 44032: 0x9FFA, + 51123 - 44032: 0x9FFB, + 51124 - 44032: 0xC0EA, + 51125 - 44032: 0x9FFC, + 51126 - 44032: 0x9FFD, + 51127 - 44032: 0x9FFE, + 51128 - 44032: 0xA041, + 51129 - 44032: 0xA042, + 51130 - 44032: 0xA043, + 51131 - 44032: 0xA044, + 51132 - 44032: 0xC0EB, + 51133 - 44032: 0xC0EC, + 51134 - 44032: 0xA045, + 51135 - 44032: 0xC0ED, + 51136 - 44032: 0xC0EE, + 51137 - 44032: 0xC0EF, + 51138 - 44032: 0xA046, + 51139 - 44032: 0xA047, + 51140 - 44032: 0xA048, + 51141 - 44032: 0xA049, + 51142 - 44032: 0xA04A, + 51143 - 44032: 0xA04B, + 51144 - 44032: 0xC0F0, + 51145 - 44032: 0xC0F1, + 51146 - 44032: 0xA04C, + 51147 - 44032: 0xA04D, + 51148 - 44032: 0xC0F2, + 51149 - 44032: 0xA04E, + 51150 - 44032: 0xC0F3, + 51151 - 44032: 0xA04F, + 51152 - 44032: 0xC0F4, + 51153 - 44032: 0xA050, + 51154 - 44032: 0xA051, + 51155 - 44032: 0xA052, + 51156 - 44032: 0xA053, + 51157 - 44032: 0xA054, + 51158 - 44032: 0xA055, + 51159 - 44032: 0xA056, + 51160 - 44032: 0xC0F5, + 51161 - 44032: 0xA057, + 51162 - 44032: 0xA058, + 51163 - 44032: 0xA059, + 51164 - 44032: 0xA05A, + 51165 - 44032: 0xC0F6, + 51166 - 44032: 0xA061, + 51167 - 44032: 0xA062, + 51168 - 44032: 0xA063, + 51169 - 44032: 0xA064, + 51170 - 44032: 0xA065, + 51171 - 44032: 0xA066, + 51172 - 44032: 0xC0F7, + 51173 - 44032: 0xA067, + 51174 - 44032: 0xA068, + 51175 - 44032: 0xA069, + 51176 - 44032: 0xC0F8, + 51177 - 44032: 0xA06A, + 51178 - 44032: 0xA06B, + 51179 - 44032: 0xA06C, + 51180 - 44032: 0xC0F9, + 51181 - 44032: 0xA06D, + 51182 - 44032: 0xA06E, + 51183 - 44032: 0xA06F, + 51184 - 44032: 0xA070, + 51185 - 44032: 0xA071, + 51186 - 44032: 0xA072, + 51187 - 44032: 0xA073, + 51188 - 44032: 0xA074, + 51189 - 44032: 0xA075, + 51190 - 44032: 0xA076, + 51191 - 44032: 0xA077, + 51192 - 44032: 0xA078, + 51193 - 44032: 0xA079, + 51194 - 44032: 0xA07A, + 51195 - 44032: 0xA081, + 51196 - 44032: 0xA082, + 51197 - 44032: 0xA083, + 51198 - 44032: 0xA084, + 51199 - 44032: 0xA085, + 51200 - 44032: 0xC0FA, + 51201 - 44032: 0xC0FB, + 51202 - 44032: 0xA086, + 51203 - 44032: 0xA087, + 51204 - 44032: 0xC0FC, + 51205 - 44032: 0xA088, + 51206 - 44032: 0xA089, + 51207 - 44032: 0xA08A, + 51208 - 44032: 0xC0FD, + 51209 - 44032: 0xA08B, + 51210 - 44032: 0xC0FE, + 51211 - 44032: 0xA08C, + 51212 - 44032: 0xA08D, + 51213 - 44032: 0xA08E, + 51214 - 44032: 0xA08F, + 51215 - 44032: 0xA090, + 51216 - 44032: 0xC1A1, + 51217 - 44032: 0xC1A2, + 51218 - 44032: 0xA091, + 51219 - 44032: 0xC1A3, + 51220 - 44032: 0xA092, + 51221 - 44032: 0xC1A4, + 51222 - 44032: 0xC1A5, + 51223 - 44032: 0xA093, + 51224 - 44032: 0xA094, + 51225 - 44032: 0xA095, + 51226 - 44032: 0xA096, + 51227 - 44032: 0xA097, + 51228 - 44032: 0xC1A6, + 51229 - 44032: 0xC1A7, + 51230 - 44032: 0xA098, + 51231 - 44032: 0xA099, + 51232 - 44032: 0xC1A8, + 51233 - 44032: 0xA09A, + 51234 - 44032: 0xA09B, + 51235 - 44032: 0xA09C, + 51236 - 44032: 0xC1A9, + 51237 - 44032: 0xA09D, + 51238 - 44032: 0xA09E, + 51239 - 44032: 0xA09F, + 51240 - 44032: 0xA0A0, + 51241 - 44032: 0xA0A1, + 51242 - 44032: 0xA0A2, + 51243 - 44032: 0xA0A3, + 51244 - 44032: 0xC1AA, + 51245 - 44032: 0xC1AB, + 51246 - 44032: 0xA0A4, + 51247 - 44032: 0xC1AC, + 51248 - 44032: 0xA0A5, + 51249 - 44032: 0xC1AD, + 51250 - 44032: 0xA0A6, + 51251 - 44032: 0xA0A7, + 51252 - 44032: 0xA0A8, + 51253 - 44032: 0xA0A9, + 51254 - 44032: 0xA0AA, + 51255 - 44032: 0xA0AB, + 51256 - 44032: 0xC1AE, + 51257 - 44032: 0xA0AC, + 51258 - 44032: 0xA0AD, + 51259 - 44032: 0xA0AE, + 51260 - 44032: 0xC1AF, + 51261 - 44032: 0xA0AF, + 51262 - 44032: 0xA0B0, + 51263 - 44032: 0xA0B1, + 51264 - 44032: 0xC1B0, + 51265 - 44032: 0xA0B2, + 51266 - 44032: 0xA0B3, + 51267 - 44032: 0xA0B4, + 51268 - 44032: 0xA0B5, + 51269 - 44032: 0xA0B6, + 51270 - 44032: 0xA0B7, + 51271 - 44032: 0xA0B8, + 51272 - 44032: 0xC1B1, + 51273 - 44032: 0xC1B2, + 51274 - 44032: 0xA0B9, + 51275 - 44032: 0xA0BA, + 51276 - 44032: 0xC1B3, + 51277 - 44032: 0xC1B4, + 51278 - 44032: 0xA0BB, + 51279 - 44032: 0xA0BC, + 51280 - 44032: 0xA0BD, + 51281 - 44032: 0xA0BE, + 51282 - 44032: 0xA0BF, + 51283 - 44032: 0xA0C0, + 51284 - 44032: 0xC1B5, + 51285 - 44032: 0xA0C1, + 51286 - 44032: 0xA0C2, + 51287 - 44032: 0xA0C3, + 51288 - 44032: 0xA0C4, + 51289 - 44032: 0xA0C5, + 51290 - 44032: 0xA0C6, + 51291 - 44032: 0xA0C7, + 51292 - 44032: 0xA0C8, + 51293 - 44032: 0xA0C9, + 51294 - 44032: 0xA0CA, + 51295 - 44032: 0xA0CB, + 51296 - 44032: 0xA0CC, + 51297 - 44032: 0xA0CD, + 51298 - 44032: 0xA0CE, + 51299 - 44032: 0xA0CF, + 51300 - 44032: 0xA0D0, + 51301 - 44032: 0xA0D1, + 51302 - 44032: 0xA0D2, + 51303 - 44032: 0xA0D3, + 51304 - 44032: 0xA0D4, + 51305 - 44032: 0xA0D5, + 51306 - 44032: 0xA0D6, + 51307 - 44032: 0xA0D7, + 51308 - 44032: 0xA0D8, + 51309 - 44032: 0xA0D9, + 51310 - 44032: 0xA0DA, + 51311 - 44032: 0xA0DB, + 51312 - 44032: 0xC1B6, + 51313 - 44032: 0xC1B7, + 51314 - 44032: 0xA0DC, + 51315 - 44032: 0xA0DD, + 51316 - 44032: 0xC1B8, + 51317 - 44032: 0xA0DE, + 51318 - 44032: 0xA0DF, + 51319 - 44032: 0xA0E0, + 51320 - 44032: 0xC1B9, + 51321 - 44032: 0xA0E1, + 51322 - 44032: 0xC1BA, + 51323 - 44032: 0xA0E2, + 51324 - 44032: 0xA0E3, + 51325 - 44032: 0xA0E4, + 51326 - 44032: 0xA0E5, + 51327 - 44032: 0xA0E6, + 51328 - 44032: 0xC1BB, + 51329 - 44032: 0xC1BC, + 51330 - 44032: 0xA0E7, + 51331 - 44032: 0xC1BD, + 51332 - 44032: 0xA0E8, + 51333 - 44032: 0xC1BE, + 51334 - 44032: 0xC1BF, + 51335 - 44032: 0xC1C0, + 51336 - 44032: 0xA0E9, + 51337 - 44032: 0xA0EA, + 51338 - 44032: 0xA0EB, + 51339 - 44032: 0xC1C1, + 51340 - 44032: 0xC1C2, + 51341 - 44032: 0xC1C3, + 51342 - 44032: 0xA0EC, + 51343 - 44032: 0xA0ED, + 51344 - 44032: 0xA0EE, + 51345 - 44032: 0xA0EF, + 51346 - 44032: 0xA0F0, + 51347 - 44032: 0xA0F1, + 51348 - 44032: 0xC1C4, + 51349 - 44032: 0xA0F2, + 51350 - 44032: 0xA0F3, + 51351 - 44032: 0xA0F4, + 51352 - 44032: 0xA0F5, + 51353 - 44032: 0xA0F6, + 51354 - 44032: 0xA0F7, + 51355 - 44032: 0xA0F8, + 51356 - 44032: 0xA0F9, + 51357 - 44032: 0xC1C5, + 51358 - 44032: 0xA0FA, + 51359 - 44032: 0xC1C6, + 51360 - 44032: 0xA0FB, + 51361 - 44032: 0xC1C7, + 51362 - 44032: 0xA0FC, + 51363 - 44032: 0xA0FD, + 51364 - 44032: 0xA0FE, + 51365 - 44032: 0xA141, + 51366 - 44032: 0xA142, + 51367 - 44032: 0xA143, + 51368 - 44032: 0xC1C8, + 51369 - 44032: 0xA144, + 51370 - 44032: 0xA145, + 51371 - 44032: 0xA146, + 51372 - 44032: 0xA147, + 51373 - 44032: 0xA148, + 51374 - 44032: 0xA149, + 51375 - 44032: 0xA14A, + 51376 - 44032: 0xA14B, + 51377 - 44032: 0xA14C, + 51378 - 44032: 0xA14D, + 51379 - 44032: 0xA14E, + 51380 - 44032: 0xA14F, + 51381 - 44032: 0xA150, + 51382 - 44032: 0xA151, + 51383 - 44032: 0xA152, + 51384 - 44032: 0xA153, + 51385 - 44032: 0xA154, + 51386 - 44032: 0xA155, + 51387 - 44032: 0xA156, + 51388 - 44032: 0xC1C9, + 51389 - 44032: 0xC1CA, + 51390 - 44032: 0xA157, + 51391 - 44032: 0xA158, + 51392 - 44032: 0xA159, + 51393 - 44032: 0xA15A, + 51394 - 44032: 0xA161, + 51395 - 44032: 0xA162, + 51396 - 44032: 0xC1CB, + 51397 - 44032: 0xA163, + 51398 - 44032: 0xA164, + 51399 - 44032: 0xA165, + 51400 - 44032: 0xC1CC, + 51401 - 44032: 0xA166, + 51402 - 44032: 0xA167, + 51403 - 44032: 0xA168, + 51404 - 44032: 0xC1CD, + 51405 - 44032: 0xA169, + 51406 - 44032: 0xA16A, + 51407 - 44032: 0xA16B, + 51408 - 44032: 0xA16C, + 51409 - 44032: 0xA16D, + 51410 - 44032: 0xA16E, + 51411 - 44032: 0xA16F, + 51412 - 44032: 0xC1CE, + 51413 - 44032: 0xC1CF, + 51414 - 44032: 0xA170, + 51415 - 44032: 0xC1D0, + 51416 - 44032: 0xA171, + 51417 - 44032: 0xC1D1, + 51418 - 44032: 0xA172, + 51419 - 44032: 0xA173, + 51420 - 44032: 0xA174, + 51421 - 44032: 0xA175, + 51422 - 44032: 0xA176, + 51423 - 44032: 0xA177, + 51424 - 44032: 0xC1D2, + 51425 - 44032: 0xC1D3, + 51426 - 44032: 0xA178, + 51427 - 44032: 0xA179, + 51428 - 44032: 0xC1D4, + 51429 - 44032: 0xA17A, + 51430 - 44032: 0xA181, + 51431 - 44032: 0xA182, + 51432 - 44032: 0xA183, + 51433 - 44032: 0xA184, + 51434 - 44032: 0xA185, + 51435 - 44032: 0xA186, + 51436 - 44032: 0xA187, + 51437 - 44032: 0xA188, + 51438 - 44032: 0xA189, + 51439 - 44032: 0xA18A, + 51440 - 44032: 0xA18B, + 51441 - 44032: 0xA18C, + 51442 - 44032: 0xA18D, + 51443 - 44032: 0xA18E, + 51444 - 44032: 0xA18F, + 51445 - 44032: 0xC1D5, + 51446 - 44032: 0xA190, + 51447 - 44032: 0xA191, + 51448 - 44032: 0xA192, + 51449 - 44032: 0xA193, + 51450 - 44032: 0xA194, + 51451 - 44032: 0xA195, + 51452 - 44032: 0xC1D6, + 51453 - 44032: 0xC1D7, + 51454 - 44032: 0xA196, + 51455 - 44032: 0xA197, + 51456 - 44032: 0xC1D8, + 51457 - 44032: 0xA198, + 51458 - 44032: 0xA199, + 51459 - 44032: 0xA19A, + 51460 - 44032: 0xC1D9, + 51461 - 44032: 0xC1DA, + 51462 - 44032: 0xC1DB, + 51463 - 44032: 0xA19B, + 51464 - 44032: 0xA19C, + 51465 - 44032: 0xA19D, + 51466 - 44032: 0xA19E, + 51467 - 44032: 0xA19F, + 51468 - 44032: 0xC1DC, + 51469 - 44032: 0xC1DD, + 51470 - 44032: 0xA1A0, + 51471 - 44032: 0xC1DE, + 51472 - 44032: 0xA241, + 51473 - 44032: 0xC1DF, + 51474 - 44032: 0xA242, + 51475 - 44032: 0xA243, + 51476 - 44032: 0xA244, + 51477 - 44032: 0xA245, + 51478 - 44032: 0xA246, + 51479 - 44032: 0xA247, + 51480 - 44032: 0xC1E0, + 51481 - 44032: 0xA248, + 51482 - 44032: 0xA249, + 51483 - 44032: 0xA24A, + 51484 - 44032: 0xA24B, + 51485 - 44032: 0xA24C, + 51486 - 44032: 0xA24D, + 51487 - 44032: 0xA24E, + 51488 - 44032: 0xA24F, + 51489 - 44032: 0xA250, + 51490 - 44032: 0xA251, + 51491 - 44032: 0xA252, + 51492 - 44032: 0xA253, + 51493 - 44032: 0xA254, + 51494 - 44032: 0xA255, + 51495 - 44032: 0xA256, + 51496 - 44032: 0xA257, + 51497 - 44032: 0xA258, + 51498 - 44032: 0xA259, + 51499 - 44032: 0xA25A, + 51500 - 44032: 0xC1E1, + 51501 - 44032: 0xA261, + 51502 - 44032: 0xA262, + 51503 - 44032: 0xA263, + 51504 - 44032: 0xA264, + 51505 - 44032: 0xA265, + 51506 - 44032: 0xA266, + 51507 - 44032: 0xA267, + 51508 - 44032: 0xC1E2, + 51509 - 44032: 0xA268, + 51510 - 44032: 0xA269, + 51511 - 44032: 0xA26A, + 51512 - 44032: 0xA26B, + 51513 - 44032: 0xA26C, + 51514 - 44032: 0xA26D, + 51515 - 44032: 0xA26E, + 51516 - 44032: 0xA26F, + 51517 - 44032: 0xA270, + 51518 - 44032: 0xA271, + 51519 - 44032: 0xA272, + 51520 - 44032: 0xA273, + 51521 - 44032: 0xA274, + 51522 - 44032: 0xA275, + 51523 - 44032: 0xA276, + 51524 - 44032: 0xA277, + 51525 - 44032: 0xA278, + 51526 - 44032: 0xA279, + 51527 - 44032: 0xA27A, + 51528 - 44032: 0xA281, + 51529 - 44032: 0xA282, + 51530 - 44032: 0xA283, + 51531 - 44032: 0xA284, + 51532 - 44032: 0xA285, + 51533 - 44032: 0xA286, + 51534 - 44032: 0xA287, + 51535 - 44032: 0xA288, + 51536 - 44032: 0xC1E3, + 51537 - 44032: 0xC1E4, + 51538 - 44032: 0xA289, + 51539 - 44032: 0xA28A, + 51540 - 44032: 0xC1E5, + 51541 - 44032: 0xA28B, + 51542 - 44032: 0xA28C, + 51543 - 44032: 0xA28D, + 51544 - 44032: 0xC1E6, + 51545 - 44032: 0xA28E, + 51546 - 44032: 0xA28F, + 51547 - 44032: 0xA290, + 51548 - 44032: 0xA291, + 51549 - 44032: 0xA292, + 51550 - 44032: 0xA293, + 51551 - 44032: 0xA294, + 51552 - 44032: 0xC1E7, + 51553 - 44032: 0xC1E8, + 51554 - 44032: 0xA295, + 51555 - 44032: 0xC1E9, + 51556 - 44032: 0xA296, + 51557 - 44032: 0xA297, + 51558 - 44032: 0xA298, + 51559 - 44032: 0xA299, + 51560 - 44032: 0xA29A, + 51561 - 44032: 0xA29B, + 51562 - 44032: 0xA29C, + 51563 - 44032: 0xA29D, + 51564 - 44032: 0xC1EA, + 51565 - 44032: 0xA29E, + 51566 - 44032: 0xA29F, + 51567 - 44032: 0xA2A0, + 51568 - 44032: 0xC1EB, + 51569 - 44032: 0xA341, + 51570 - 44032: 0xA342, + 51571 - 44032: 0xA343, + 51572 - 44032: 0xC1EC, + 51573 - 44032: 0xA344, + 51574 - 44032: 0xA345, + 51575 - 44032: 0xA346, + 51576 - 44032: 0xA347, + 51577 - 44032: 0xA348, + 51578 - 44032: 0xA349, + 51579 - 44032: 0xA34A, + 51580 - 44032: 0xC1ED, + 51581 - 44032: 0xA34B, + 51582 - 44032: 0xA34C, + 51583 - 44032: 0xA34D, + 51584 - 44032: 0xA34E, + 51585 - 44032: 0xA34F, + 51586 - 44032: 0xA350, + 51587 - 44032: 0xA351, + 51588 - 44032: 0xA352, + 51589 - 44032: 0xA353, + 51590 - 44032: 0xA354, + 51591 - 44032: 0xA355, + 51592 - 44032: 0xC1EE, + 51593 - 44032: 0xC1EF, + 51594 - 44032: 0xA356, + 51595 - 44032: 0xA357, + 51596 - 44032: 0xC1F0, + 51597 - 44032: 0xA358, + 51598 - 44032: 0xA359, + 51599 - 44032: 0xA35A, + 51600 - 44032: 0xC1F1, + 51601 - 44032: 0xA361, + 51602 - 44032: 0xA362, + 51603 - 44032: 0xA363, + 51604 - 44032: 0xA364, + 51605 - 44032: 0xA365, + 51606 - 44032: 0xA366, + 51607 - 44032: 0xA367, + 51608 - 44032: 0xC1F2, + 51609 - 44032: 0xC1F3, + 51610 - 44032: 0xA368, + 51611 - 44032: 0xC1F4, + 51612 - 44032: 0xA369, + 51613 - 44032: 0xC1F5, + 51614 - 44032: 0xA36A, + 51615 - 44032: 0xA36B, + 51616 - 44032: 0xA36C, + 51617 - 44032: 0xA36D, + 51618 - 44032: 0xA36E, + 51619 - 44032: 0xA36F, + 51620 - 44032: 0xA370, + 51621 - 44032: 0xA371, + 51622 - 44032: 0xA372, + 51623 - 44032: 0xA373, + 51624 - 44032: 0xA374, + 51625 - 44032: 0xA375, + 51626 - 44032: 0xA376, + 51627 - 44032: 0xA377, + 51628 - 44032: 0xA378, + 51629 - 44032: 0xA379, + 51630 - 44032: 0xA37A, + 51631 - 44032: 0xA381, + 51632 - 44032: 0xA382, + 51633 - 44032: 0xA383, + 51634 - 44032: 0xA384, + 51635 - 44032: 0xA385, + 51636 - 44032: 0xA386, + 51637 - 44032: 0xA387, + 51638 - 44032: 0xA388, + 51639 - 44032: 0xA389, + 51640 - 44032: 0xA38A, + 51641 - 44032: 0xA38B, + 51642 - 44032: 0xA38C, + 51643 - 44032: 0xA38D, + 51644 - 44032: 0xA38E, + 51645 - 44032: 0xA38F, + 51646 - 44032: 0xA390, + 51647 - 44032: 0xA391, + 51648 - 44032: 0xC1F6, + 51649 - 44032: 0xC1F7, + 51650 - 44032: 0xA392, + 51651 - 44032: 0xA393, + 51652 - 44032: 0xC1F8, + 51653 - 44032: 0xA394, + 51654 - 44032: 0xA395, + 51655 - 44032: 0xC1F9, + 51656 - 44032: 0xC1FA, + 51657 - 44032: 0xA396, + 51658 - 44032: 0xC1FB, + 51659 - 44032: 0xA397, + 51660 - 44032: 0xA398, + 51661 - 44032: 0xA399, + 51662 - 44032: 0xA39A, + 51663 - 44032: 0xA39B, + 51664 - 44032: 0xC1FC, + 51665 - 44032: 0xC1FD, + 51666 - 44032: 0xA39C, + 51667 - 44032: 0xC1FE, + 51668 - 44032: 0xA39D, + 51669 - 44032: 0xC2A1, + 51670 - 44032: 0xC2A2, + 51671 - 44032: 0xA39E, + 51672 - 44032: 0xA39F, + 51673 - 44032: 0xC2A3, + 51674 - 44032: 0xC2A4, + 51675 - 44032: 0xA3A0, + 51676 - 44032: 0xC2A5, + 51677 - 44032: 0xC2A6, + 51678 - 44032: 0xA441, + 51679 - 44032: 0xA442, + 51680 - 44032: 0xC2A7, + 51681 - 44032: 0xA443, + 51682 - 44032: 0xC2A8, + 51683 - 44032: 0xA444, + 51684 - 44032: 0xC2A9, + 51685 - 44032: 0xA445, + 51686 - 44032: 0xA446, + 51687 - 44032: 0xC2AA, + 51688 - 44032: 0xA447, + 51689 - 44032: 0xA448, + 51690 - 44032: 0xA449, + 51691 - 44032: 0xA44A, + 51692 - 44032: 0xC2AB, + 51693 - 44032: 0xC2AC, + 51694 - 44032: 0xA44B, + 51695 - 44032: 0xC2AD, + 51696 - 44032: 0xC2AE, + 51697 - 44032: 0xC2AF, + 51698 - 44032: 0xA44C, + 51699 - 44032: 0xA44D, + 51700 - 44032: 0xA44E, + 51701 - 44032: 0xA44F, + 51702 - 44032: 0xA450, + 51703 - 44032: 0xA451, + 51704 - 44032: 0xC2B0, + 51705 - 44032: 0xC2B1, + 51706 - 44032: 0xA452, + 51707 - 44032: 0xA453, + 51708 - 44032: 0xC2B2, + 51709 - 44032: 0xA454, + 51710 - 44032: 0xA455, + 51711 - 44032: 0xA456, + 51712 - 44032: 0xC2B3, + 51713 - 44032: 0xA457, + 51714 - 44032: 0xA458, + 51715 - 44032: 0xA459, + 51716 - 44032: 0xA45A, + 51717 - 44032: 0xA461, + 51718 - 44032: 0xA462, + 51719 - 44032: 0xA463, + 51720 - 44032: 0xC2B4, + 51721 - 44032: 0xC2B5, + 51722 - 44032: 0xA464, + 51723 - 44032: 0xC2B6, + 51724 - 44032: 0xC2B7, + 51725 - 44032: 0xC2B8, + 51726 - 44032: 0xA465, + 51727 - 44032: 0xA466, + 51728 - 44032: 0xA467, + 51729 - 44032: 0xA468, + 51730 - 44032: 0xA469, + 51731 - 44032: 0xA46A, + 51732 - 44032: 0xC2B9, + 51733 - 44032: 0xA46B, + 51734 - 44032: 0xA46C, + 51735 - 44032: 0xA46D, + 51736 - 44032: 0xC2BA, + 51737 - 44032: 0xA46E, + 51738 - 44032: 0xA46F, + 51739 - 44032: 0xA470, + 51740 - 44032: 0xA471, + 51741 - 44032: 0xA472, + 51742 - 44032: 0xA473, + 51743 - 44032: 0xA474, + 51744 - 44032: 0xA475, + 51745 - 44032: 0xA476, + 51746 - 44032: 0xA477, + 51747 - 44032: 0xA478, + 51748 - 44032: 0xA479, + 51749 - 44032: 0xA47A, + 51750 - 44032: 0xA481, + 51751 - 44032: 0xA482, + 51752 - 44032: 0xA483, + 51753 - 44032: 0xC2BB, + 51754 - 44032: 0xA484, + 51755 - 44032: 0xA485, + 51756 - 44032: 0xA486, + 51757 - 44032: 0xA487, + 51758 - 44032: 0xA488, + 51759 - 44032: 0xA489, + 51760 - 44032: 0xA48A, + 51761 - 44032: 0xA48B, + 51762 - 44032: 0xA48C, + 51763 - 44032: 0xA48D, + 51764 - 44032: 0xA48E, + 51765 - 44032: 0xA48F, + 51766 - 44032: 0xA490, + 51767 - 44032: 0xA491, + 51768 - 44032: 0xA492, + 51769 - 44032: 0xA493, + 51770 - 44032: 0xA494, + 51771 - 44032: 0xA495, + 51772 - 44032: 0xA496, + 51773 - 44032: 0xA497, + 51774 - 44032: 0xA498, + 51775 - 44032: 0xA499, + 51776 - 44032: 0xA49A, + 51777 - 44032: 0xA49B, + 51778 - 44032: 0xA49C, + 51779 - 44032: 0xA49D, + 51780 - 44032: 0xA49E, + 51781 - 44032: 0xA49F, + 51782 - 44032: 0xA4A0, + 51783 - 44032: 0xA541, + 51784 - 44032: 0xA542, + 51785 - 44032: 0xA543, + 51786 - 44032: 0xA544, + 51787 - 44032: 0xA545, + 51788 - 44032: 0xC2BC, + 51789 - 44032: 0xC2BD, + 51790 - 44032: 0xA546, + 51791 - 44032: 0xA547, + 51792 - 44032: 0xC2BE, + 51793 - 44032: 0xA548, + 51794 - 44032: 0xA549, + 51795 - 44032: 0xA54A, + 51796 - 44032: 0xC2BF, + 51797 - 44032: 0xA54B, + 51798 - 44032: 0xA54C, + 51799 - 44032: 0xA54D, + 51800 - 44032: 0xA54E, + 51801 - 44032: 0xA54F, + 51802 - 44032: 0xA550, + 51803 - 44032: 0xA551, + 51804 - 44032: 0xC2C0, + 51805 - 44032: 0xC2C1, + 51806 - 44032: 0xA552, + 51807 - 44032: 0xC2C2, + 51808 - 44032: 0xC2C3, + 51809 - 44032: 0xC2C4, + 51810 - 44032: 0xA553, + 51811 - 44032: 0xA554, + 51812 - 44032: 0xA555, + 51813 - 44032: 0xA556, + 51814 - 44032: 0xA557, + 51815 - 44032: 0xA558, + 51816 - 44032: 0xC2C5, + 51817 - 44032: 0xA559, + 51818 - 44032: 0xA55A, + 51819 - 44032: 0xA561, + 51820 - 44032: 0xA562, + 51821 - 44032: 0xA563, + 51822 - 44032: 0xA564, + 51823 - 44032: 0xA565, + 51824 - 44032: 0xA566, + 51825 - 44032: 0xA567, + 51826 - 44032: 0xA568, + 51827 - 44032: 0xA569, + 51828 - 44032: 0xA56A, + 51829 - 44032: 0xA56B, + 51830 - 44032: 0xA56C, + 51831 - 44032: 0xA56D, + 51832 - 44032: 0xA56E, + 51833 - 44032: 0xA56F, + 51834 - 44032: 0xA570, + 51835 - 44032: 0xA571, + 51836 - 44032: 0xA572, + 51837 - 44032: 0xC2C6, + 51838 - 44032: 0xA573, + 51839 - 44032: 0xA574, + 51840 - 44032: 0xA575, + 51841 - 44032: 0xA576, + 51842 - 44032: 0xA577, + 51843 - 44032: 0xA578, + 51844 - 44032: 0xC2C7, + 51845 - 44032: 0xA579, + 51846 - 44032: 0xA57A, + 51847 - 44032: 0xA581, + 51848 - 44032: 0xA582, + 51849 - 44032: 0xA583, + 51850 - 44032: 0xA584, + 51851 - 44032: 0xA585, + 51852 - 44032: 0xA586, + 51853 - 44032: 0xA587, + 51854 - 44032: 0xA588, + 51855 - 44032: 0xA589, + 51856 - 44032: 0xA58A, + 51857 - 44032: 0xA58B, + 51858 - 44032: 0xA58C, + 51859 - 44032: 0xA58D, + 51860 - 44032: 0xA58E, + 51861 - 44032: 0xA58F, + 51862 - 44032: 0xA590, + 51863 - 44032: 0xA591, + 51864 - 44032: 0xC2C8, + 51865 - 44032: 0xA592, + 51866 - 44032: 0xA593, + 51867 - 44032: 0xA594, + 51868 - 44032: 0xA595, + 51869 - 44032: 0xA596, + 51870 - 44032: 0xA597, + 51871 - 44032: 0xA598, + 51872 - 44032: 0xA599, + 51873 - 44032: 0xA59A, + 51874 - 44032: 0xA59B, + 51875 - 44032: 0xA59C, + 51876 - 44032: 0xA59D, + 51877 - 44032: 0xA59E, + 51878 - 44032: 0xA59F, + 51879 - 44032: 0xA5A0, + 51880 - 44032: 0xA641, + 51881 - 44032: 0xA642, + 51882 - 44032: 0xA643, + 51883 - 44032: 0xA644, + 51884 - 44032: 0xA645, + 51885 - 44032: 0xA646, + 51886 - 44032: 0xA647, + 51887 - 44032: 0xA648, + 51888 - 44032: 0xA649, + 51889 - 44032: 0xA64A, + 51890 - 44032: 0xA64B, + 51891 - 44032: 0xA64C, + 51892 - 44032: 0xA64D, + 51893 - 44032: 0xA64E, + 51894 - 44032: 0xA64F, + 51895 - 44032: 0xA650, + 51896 - 44032: 0xA651, + 51897 - 44032: 0xA652, + 51898 - 44032: 0xA653, + 51899 - 44032: 0xA654, + 51900 - 44032: 0xC2C9, + 51901 - 44032: 0xC2CA, + 51902 - 44032: 0xA655, + 51903 - 44032: 0xA656, + 51904 - 44032: 0xC2CB, + 51905 - 44032: 0xA657, + 51906 - 44032: 0xA658, + 51907 - 44032: 0xA659, + 51908 - 44032: 0xC2CC, + 51909 - 44032: 0xA65A, + 51910 - 44032: 0xA661, + 51911 - 44032: 0xA662, + 51912 - 44032: 0xA663, + 51913 - 44032: 0xA664, + 51914 - 44032: 0xA665, + 51915 - 44032: 0xA666, + 51916 - 44032: 0xC2CD, + 51917 - 44032: 0xC2CE, + 51918 - 44032: 0xA667, + 51919 - 44032: 0xC2CF, + 51920 - 44032: 0xA668, + 51921 - 44032: 0xC2D0, + 51922 - 44032: 0xA669, + 51923 - 44032: 0xC2D1, + 51924 - 44032: 0xA66A, + 51925 - 44032: 0xA66B, + 51926 - 44032: 0xA66C, + 51927 - 44032: 0xA66D, + 51928 - 44032: 0xC2D2, + 51929 - 44032: 0xC2D3, + 51930 - 44032: 0xA66E, + 51931 - 44032: 0xA66F, + 51932 - 44032: 0xA670, + 51933 - 44032: 0xA671, + 51934 - 44032: 0xA672, + 51935 - 44032: 0xA673, + 51936 - 44032: 0xC2D4, + 51937 - 44032: 0xA674, + 51938 - 44032: 0xA675, + 51939 - 44032: 0xA676, + 51940 - 44032: 0xA677, + 51941 - 44032: 0xA678, + 51942 - 44032: 0xA679, + 51943 - 44032: 0xA67A, + 51944 - 44032: 0xA681, + 51945 - 44032: 0xA682, + 51946 - 44032: 0xA683, + 51947 - 44032: 0xA684, + 51948 - 44032: 0xC2D5, + 51949 - 44032: 0xA685, + 51950 - 44032: 0xA686, + 51951 - 44032: 0xA687, + 51952 - 44032: 0xA688, + 51953 - 44032: 0xA689, + 51954 - 44032: 0xA68A, + 51955 - 44032: 0xA68B, + 51956 - 44032: 0xC2D6, + 51957 - 44032: 0xA68C, + 51958 - 44032: 0xA68D, + 51959 - 44032: 0xA68E, + 51960 - 44032: 0xA68F, + 51961 - 44032: 0xA690, + 51962 - 44032: 0xA691, + 51963 - 44032: 0xA692, + 51964 - 44032: 0xA693, + 51965 - 44032: 0xA694, + 51966 - 44032: 0xA695, + 51967 - 44032: 0xA696, + 51968 - 44032: 0xA697, + 51969 - 44032: 0xA698, + 51970 - 44032: 0xA699, + 51971 - 44032: 0xA69A, + 51972 - 44032: 0xA69B, + 51973 - 44032: 0xA69C, + 51974 - 44032: 0xA69D, + 51975 - 44032: 0xA69E, + 51976 - 44032: 0xC2D7, + 51977 - 44032: 0xA69F, + 51978 - 44032: 0xA6A0, + 51979 - 44032: 0xA741, + 51980 - 44032: 0xA742, + 51981 - 44032: 0xA743, + 51982 - 44032: 0xA744, + 51983 - 44032: 0xA745, + 51984 - 44032: 0xC2D8, + 51985 - 44032: 0xA746, + 51986 - 44032: 0xA747, + 51987 - 44032: 0xA748, + 51988 - 44032: 0xC2D9, + 51989 - 44032: 0xA749, + 51990 - 44032: 0xA74A, + 51991 - 44032: 0xA74B, + 51992 - 44032: 0xC2DA, + 51993 - 44032: 0xA74C, + 51994 - 44032: 0xA74D, + 51995 - 44032: 0xA74E, + 51996 - 44032: 0xA74F, + 51997 - 44032: 0xA750, + 51998 - 44032: 0xA751, + 51999 - 44032: 0xA752, + 52000 - 44032: 0xC2DB, + 52001 - 44032: 0xC2DC, + 52002 - 44032: 0xA753, + 52003 - 44032: 0xA754, + 52004 - 44032: 0xA755, + 52005 - 44032: 0xA756, + 52006 - 44032: 0xA757, + 52007 - 44032: 0xA758, + 52008 - 44032: 0xA759, + 52009 - 44032: 0xA75A, + 52010 - 44032: 0xA761, + 52011 - 44032: 0xA762, + 52012 - 44032: 0xA763, + 52013 - 44032: 0xA764, + 52014 - 44032: 0xA765, + 52015 - 44032: 0xA766, + 52016 - 44032: 0xA767, + 52017 - 44032: 0xA768, + 52018 - 44032: 0xA769, + 52019 - 44032: 0xA76A, + 52020 - 44032: 0xA76B, + 52021 - 44032: 0xA76C, + 52022 - 44032: 0xA76D, + 52023 - 44032: 0xA76E, + 52024 - 44032: 0xA76F, + 52025 - 44032: 0xA770, + 52026 - 44032: 0xA771, + 52027 - 44032: 0xA772, + 52028 - 44032: 0xA773, + 52029 - 44032: 0xA774, + 52030 - 44032: 0xA775, + 52031 - 44032: 0xA776, + 52032 - 44032: 0xA777, + 52033 - 44032: 0xC2DD, + 52034 - 44032: 0xA778, + 52035 - 44032: 0xA779, + 52036 - 44032: 0xA77A, + 52037 - 44032: 0xA781, + 52038 - 44032: 0xA782, + 52039 - 44032: 0xA783, + 52040 - 44032: 0xC2DE, + 52041 - 44032: 0xC2DF, + 52042 - 44032: 0xA784, + 52043 - 44032: 0xA785, + 52044 - 44032: 0xC2E0, + 52045 - 44032: 0xA786, + 52046 - 44032: 0xA787, + 52047 - 44032: 0xA788, + 52048 - 44032: 0xC2E1, + 52049 - 44032: 0xA789, + 52050 - 44032: 0xA78A, + 52051 - 44032: 0xA78B, + 52052 - 44032: 0xA78C, + 52053 - 44032: 0xA78D, + 52054 - 44032: 0xA78E, + 52055 - 44032: 0xA78F, + 52056 - 44032: 0xC2E2, + 52057 - 44032: 0xC2E3, + 52058 - 44032: 0xA790, + 52059 - 44032: 0xA791, + 52060 - 44032: 0xA792, + 52061 - 44032: 0xC2E4, + 52062 - 44032: 0xA793, + 52063 - 44032: 0xA794, + 52064 - 44032: 0xA795, + 52065 - 44032: 0xA796, + 52066 - 44032: 0xA797, + 52067 - 44032: 0xA798, + 52068 - 44032: 0xC2E5, + 52069 - 44032: 0xA799, + 52070 - 44032: 0xA79A, + 52071 - 44032: 0xA79B, + 52072 - 44032: 0xA79C, + 52073 - 44032: 0xA79D, + 52074 - 44032: 0xA79E, + 52075 - 44032: 0xA79F, + 52076 - 44032: 0xA7A0, + 52077 - 44032: 0xA841, + 52078 - 44032: 0xA842, + 52079 - 44032: 0xA843, + 52080 - 44032: 0xA844, + 52081 - 44032: 0xA845, + 52082 - 44032: 0xA846, + 52083 - 44032: 0xA847, + 52084 - 44032: 0xA848, + 52085 - 44032: 0xA849, + 52086 - 44032: 0xA84A, + 52087 - 44032: 0xA84B, + 52088 - 44032: 0xC2E6, + 52089 - 44032: 0xC2E7, + 52090 - 44032: 0xA84C, + 52091 - 44032: 0xA84D, + 52092 - 44032: 0xA84E, + 52093 - 44032: 0xA84F, + 52094 - 44032: 0xA850, + 52095 - 44032: 0xA851, + 52096 - 44032: 0xA852, + 52097 - 44032: 0xA853, + 52098 - 44032: 0xA854, + 52099 - 44032: 0xA855, + 52100 - 44032: 0xA856, + 52101 - 44032: 0xA857, + 52102 - 44032: 0xA858, + 52103 - 44032: 0xA859, + 52104 - 44032: 0xA85A, + 52105 - 44032: 0xA861, + 52106 - 44032: 0xA862, + 52107 - 44032: 0xA863, + 52108 - 44032: 0xA864, + 52109 - 44032: 0xA865, + 52110 - 44032: 0xA866, + 52111 - 44032: 0xA867, + 52112 - 44032: 0xA868, + 52113 - 44032: 0xA869, + 52114 - 44032: 0xA86A, + 52115 - 44032: 0xA86B, + 52116 - 44032: 0xA86C, + 52117 - 44032: 0xA86D, + 52118 - 44032: 0xA86E, + 52119 - 44032: 0xA86F, + 52120 - 44032: 0xA870, + 52121 - 44032: 0xA871, + 52122 - 44032: 0xA872, + 52123 - 44032: 0xA873, + 52124 - 44032: 0xC2E8, + 52125 - 44032: 0xA874, + 52126 - 44032: 0xA875, + 52127 - 44032: 0xA876, + 52128 - 44032: 0xA877, + 52129 - 44032: 0xA878, + 52130 - 44032: 0xA879, + 52131 - 44032: 0xA87A, + 52132 - 44032: 0xA881, + 52133 - 44032: 0xA882, + 52134 - 44032: 0xA883, + 52135 - 44032: 0xA884, + 52136 - 44032: 0xA885, + 52137 - 44032: 0xA886, + 52138 - 44032: 0xA887, + 52139 - 44032: 0xA888, + 52140 - 44032: 0xA889, + 52141 - 44032: 0xA88A, + 52142 - 44032: 0xA88B, + 52143 - 44032: 0xA88C, + 52144 - 44032: 0xA88D, + 52145 - 44032: 0xA88E, + 52146 - 44032: 0xA88F, + 52147 - 44032: 0xA890, + 52148 - 44032: 0xA891, + 52149 - 44032: 0xA892, + 52150 - 44032: 0xA893, + 52151 - 44032: 0xA894, + 52152 - 44032: 0xC2E9, + 52153 - 44032: 0xA895, + 52154 - 44032: 0xA896, + 52155 - 44032: 0xA897, + 52156 - 44032: 0xA898, + 52157 - 44032: 0xA899, + 52158 - 44032: 0xA89A, + 52159 - 44032: 0xA89B, + 52160 - 44032: 0xA89C, + 52161 - 44032: 0xA89D, + 52162 - 44032: 0xA89E, + 52163 - 44032: 0xA89F, + 52164 - 44032: 0xA8A0, + 52165 - 44032: 0xA941, + 52166 - 44032: 0xA942, + 52167 - 44032: 0xA943, + 52168 - 44032: 0xA944, + 52169 - 44032: 0xA945, + 52170 - 44032: 0xA946, + 52171 - 44032: 0xA947, + 52172 - 44032: 0xA948, + 52173 - 44032: 0xA949, + 52174 - 44032: 0xA94A, + 52175 - 44032: 0xA94B, + 52176 - 44032: 0xA94C, + 52177 - 44032: 0xA94D, + 52178 - 44032: 0xA94E, + 52179 - 44032: 0xA94F, + 52180 - 44032: 0xC2EA, + 52181 - 44032: 0xA950, + 52182 - 44032: 0xA951, + 52183 - 44032: 0xA952, + 52184 - 44032: 0xA953, + 52185 - 44032: 0xA954, + 52186 - 44032: 0xA955, + 52187 - 44032: 0xA956, + 52188 - 44032: 0xA957, + 52189 - 44032: 0xA958, + 52190 - 44032: 0xA959, + 52191 - 44032: 0xA95A, + 52192 - 44032: 0xA961, + 52193 - 44032: 0xA962, + 52194 - 44032: 0xA963, + 52195 - 44032: 0xA964, + 52196 - 44032: 0xC2EB, + 52197 - 44032: 0xA965, + 52198 - 44032: 0xA966, + 52199 - 44032: 0xC2EC, + 52200 - 44032: 0xA967, + 52201 - 44032: 0xC2ED, + 52202 - 44032: 0xA968, + 52203 - 44032: 0xA969, + 52204 - 44032: 0xA96A, + 52205 - 44032: 0xA96B, + 52206 - 44032: 0xA96C, + 52207 - 44032: 0xA96D, + 52208 - 44032: 0xA96E, + 52209 - 44032: 0xA96F, + 52210 - 44032: 0xA970, + 52211 - 44032: 0xA971, + 52212 - 44032: 0xA972, + 52213 - 44032: 0xA973, + 52214 - 44032: 0xA974, + 52215 - 44032: 0xA975, + 52216 - 44032: 0xA976, + 52217 - 44032: 0xA977, + 52218 - 44032: 0xA978, + 52219 - 44032: 0xA979, + 52220 - 44032: 0xA97A, + 52221 - 44032: 0xA981, + 52222 - 44032: 0xA982, + 52223 - 44032: 0xA983, + 52224 - 44032: 0xA984, + 52225 - 44032: 0xA985, + 52226 - 44032: 0xA986, + 52227 - 44032: 0xA987, + 52228 - 44032: 0xA988, + 52229 - 44032: 0xA989, + 52230 - 44032: 0xA98A, + 52231 - 44032: 0xA98B, + 52232 - 44032: 0xA98C, + 52233 - 44032: 0xA98D, + 52234 - 44032: 0xA98E, + 52235 - 44032: 0xA98F, + 52236 - 44032: 0xC2EE, + 52237 - 44032: 0xC2EF, + 52238 - 44032: 0xA990, + 52239 - 44032: 0xA991, + 52240 - 44032: 0xC2F0, + 52241 - 44032: 0xA992, + 52242 - 44032: 0xA993, + 52243 - 44032: 0xA994, + 52244 - 44032: 0xC2F1, + 52245 - 44032: 0xA995, + 52246 - 44032: 0xA996, + 52247 - 44032: 0xA997, + 52248 - 44032: 0xA998, + 52249 - 44032: 0xA999, + 52250 - 44032: 0xA99A, + 52251 - 44032: 0xA99B, + 52252 - 44032: 0xC2F2, + 52253 - 44032: 0xC2F3, + 52254 - 44032: 0xA99C, + 52255 - 44032: 0xA99D, + 52256 - 44032: 0xA99E, + 52257 - 44032: 0xC2F4, + 52258 - 44032: 0xC2F5, + 52259 - 44032: 0xA99F, + 52260 - 44032: 0xA9A0, + 52261 - 44032: 0xAA41, + 52262 - 44032: 0xAA42, + 52263 - 44032: 0xC2F6, + 52264 - 44032: 0xC2F7, + 52265 - 44032: 0xC2F8, + 52266 - 44032: 0xAA43, + 52267 - 44032: 0xAA44, + 52268 - 44032: 0xC2F9, + 52269 - 44032: 0xAA45, + 52270 - 44032: 0xC2FA, + 52271 - 44032: 0xAA46, + 52272 - 44032: 0xC2FB, + 52273 - 44032: 0xAA47, + 52274 - 44032: 0xAA48, + 52275 - 44032: 0xAA49, + 52276 - 44032: 0xAA4A, + 52277 - 44032: 0xAA4B, + 52278 - 44032: 0xAA4C, + 52279 - 44032: 0xAA4D, + 52280 - 44032: 0xC2FC, + 52281 - 44032: 0xC2FD, + 52282 - 44032: 0xAA4E, + 52283 - 44032: 0xC2FE, + 52284 - 44032: 0xC3A1, + 52285 - 44032: 0xC3A2, + 52286 - 44032: 0xC3A3, + 52287 - 44032: 0xAA4F, + 52288 - 44032: 0xAA50, + 52289 - 44032: 0xAA51, + 52290 - 44032: 0xAA52, + 52291 - 44032: 0xAA53, + 52292 - 44032: 0xC3A4, + 52293 - 44032: 0xC3A5, + 52294 - 44032: 0xAA54, + 52295 - 44032: 0xAA55, + 52296 - 44032: 0xC3A6, + 52297 - 44032: 0xAA56, + 52298 - 44032: 0xAA57, + 52299 - 44032: 0xAA58, + 52300 - 44032: 0xC3A7, + 52301 - 44032: 0xAA59, + 52302 - 44032: 0xAA5A, + 52303 - 44032: 0xAA61, + 52304 - 44032: 0xAA62, + 52305 - 44032: 0xAA63, + 52306 - 44032: 0xAA64, + 52307 - 44032: 0xAA65, + 52308 - 44032: 0xC3A8, + 52309 - 44032: 0xC3A9, + 52310 - 44032: 0xAA66, + 52311 - 44032: 0xC3AA, + 52312 - 44032: 0xC3AB, + 52313 - 44032: 0xC3AC, + 52314 - 44032: 0xAA67, + 52315 - 44032: 0xAA68, + 52316 - 44032: 0xAA69, + 52317 - 44032: 0xAA6A, + 52318 - 44032: 0xAA6B, + 52319 - 44032: 0xAA6C, + 52320 - 44032: 0xC3AD, + 52321 - 44032: 0xAA6D, + 52322 - 44032: 0xAA6E, + 52323 - 44032: 0xAA6F, + 52324 - 44032: 0xC3AE, + 52325 - 44032: 0xAA70, + 52326 - 44032: 0xC3AF, + 52327 - 44032: 0xAA71, + 52328 - 44032: 0xC3B0, + 52329 - 44032: 0xAA72, + 52330 - 44032: 0xAA73, + 52331 - 44032: 0xAA74, + 52332 - 44032: 0xAA75, + 52333 - 44032: 0xAA76, + 52334 - 44032: 0xAA77, + 52335 - 44032: 0xAA78, + 52336 - 44032: 0xC3B1, + 52337 - 44032: 0xAA79, + 52338 - 44032: 0xAA7A, + 52339 - 44032: 0xAA81, + 52340 - 44032: 0xAA82, + 52341 - 44032: 0xC3B2, + 52342 - 44032: 0xAA83, + 52343 - 44032: 0xAA84, + 52344 - 44032: 0xAA85, + 52345 - 44032: 0xAA86, + 52346 - 44032: 0xAA87, + 52347 - 44032: 0xAA88, + 52348 - 44032: 0xAA89, + 52349 - 44032: 0xAA8A, + 52350 - 44032: 0xAA8B, + 52351 - 44032: 0xAA8C, + 52352 - 44032: 0xAA8D, + 52353 - 44032: 0xAA8E, + 52354 - 44032: 0xAA8F, + 52355 - 44032: 0xAA90, + 52356 - 44032: 0xAA91, + 52357 - 44032: 0xAA92, + 52358 - 44032: 0xAA93, + 52359 - 44032: 0xAA94, + 52360 - 44032: 0xAA95, + 52361 - 44032: 0xAA96, + 52362 - 44032: 0xAA97, + 52363 - 44032: 0xAA98, + 52364 - 44032: 0xAA99, + 52365 - 44032: 0xAA9A, + 52366 - 44032: 0xAA9B, + 52367 - 44032: 0xAA9C, + 52368 - 44032: 0xAA9D, + 52369 - 44032: 0xAA9E, + 52370 - 44032: 0xAA9F, + 52371 - 44032: 0xAAA0, + 52372 - 44032: 0xAB41, + 52373 - 44032: 0xAB42, + 52374 - 44032: 0xAB43, + 52375 - 44032: 0xAB44, + 52376 - 44032: 0xC3B3, + 52377 - 44032: 0xC3B4, + 52378 - 44032: 0xAB45, + 52379 - 44032: 0xAB46, + 52380 - 44032: 0xC3B5, + 52381 - 44032: 0xAB47, + 52382 - 44032: 0xAB48, + 52383 - 44032: 0xAB49, + 52384 - 44032: 0xC3B6, + 52385 - 44032: 0xAB4A, + 52386 - 44032: 0xAB4B, + 52387 - 44032: 0xAB4C, + 52388 - 44032: 0xAB4D, + 52389 - 44032: 0xAB4E, + 52390 - 44032: 0xAB4F, + 52391 - 44032: 0xAB50, + 52392 - 44032: 0xC3B7, + 52393 - 44032: 0xC3B8, + 52394 - 44032: 0xAB51, + 52395 - 44032: 0xC3B9, + 52396 - 44032: 0xC3BA, + 52397 - 44032: 0xC3BB, + 52398 - 44032: 0xAB52, + 52399 - 44032: 0xAB53, + 52400 - 44032: 0xAB54, + 52401 - 44032: 0xAB55, + 52402 - 44032: 0xAB56, + 52403 - 44032: 0xAB57, + 52404 - 44032: 0xC3BC, + 52405 - 44032: 0xC3BD, + 52406 - 44032: 0xAB58, + 52407 - 44032: 0xAB59, + 52408 - 44032: 0xC3BE, + 52409 - 44032: 0xAB5A, + 52410 - 44032: 0xAB61, + 52411 - 44032: 0xAB62, + 52412 - 44032: 0xC3BF, + 52413 - 44032: 0xAB63, + 52414 - 44032: 0xAB64, + 52415 - 44032: 0xAB65, + 52416 - 44032: 0xAB66, + 52417 - 44032: 0xAB67, + 52418 - 44032: 0xAB68, + 52419 - 44032: 0xAB69, + 52420 - 44032: 0xC3C0, + 52421 - 44032: 0xC3C1, + 52422 - 44032: 0xAB6A, + 52423 - 44032: 0xC3C2, + 52424 - 44032: 0xAB6B, + 52425 - 44032: 0xC3C3, + 52426 - 44032: 0xAB6C, + 52427 - 44032: 0xAB6D, + 52428 - 44032: 0xAB6E, + 52429 - 44032: 0xAB6F, + 52430 - 44032: 0xAB70, + 52431 - 44032: 0xAB71, + 52432 - 44032: 0xC3C4, + 52433 - 44032: 0xAB72, + 52434 - 44032: 0xAB73, + 52435 - 44032: 0xAB74, + 52436 - 44032: 0xC3C5, + 52437 - 44032: 0xAB75, + 52438 - 44032: 0xAB76, + 52439 - 44032: 0xAB77, + 52440 - 44032: 0xAB78, + 52441 - 44032: 0xAB79, + 52442 - 44032: 0xAB7A, + 52443 - 44032: 0xAB81, + 52444 - 44032: 0xAB82, + 52445 - 44032: 0xAB83, + 52446 - 44032: 0xAB84, + 52447 - 44032: 0xAB85, + 52448 - 44032: 0xAB86, + 52449 - 44032: 0xAB87, + 52450 - 44032: 0xAB88, + 52451 - 44032: 0xAB89, + 52452 - 44032: 0xC3C6, + 52453 - 44032: 0xAB8A, + 52454 - 44032: 0xAB8B, + 52455 - 44032: 0xAB8C, + 52456 - 44032: 0xAB8D, + 52457 - 44032: 0xAB8E, + 52458 - 44032: 0xAB8F, + 52459 - 44032: 0xAB90, + 52460 - 44032: 0xC3C7, + 52461 - 44032: 0xAB91, + 52462 - 44032: 0xAB92, + 52463 - 44032: 0xAB93, + 52464 - 44032: 0xC3C8, + 52465 - 44032: 0xAB94, + 52466 - 44032: 0xAB95, + 52467 - 44032: 0xAB96, + 52468 - 44032: 0xAB97, + 52469 - 44032: 0xAB98, + 52470 - 44032: 0xAB99, + 52471 - 44032: 0xAB9A, + 52472 - 44032: 0xAB9B, + 52473 - 44032: 0xAB9C, + 52474 - 44032: 0xAB9D, + 52475 - 44032: 0xAB9E, + 52476 - 44032: 0xAB9F, + 52477 - 44032: 0xABA0, + 52478 - 44032: 0xAC41, + 52479 - 44032: 0xAC42, + 52480 - 44032: 0xAC43, + 52481 - 44032: 0xC3C9, + 52482 - 44032: 0xAC44, + 52483 - 44032: 0xAC45, + 52484 - 44032: 0xAC46, + 52485 - 44032: 0xAC47, + 52486 - 44032: 0xAC48, + 52487 - 44032: 0xAC49, + 52488 - 44032: 0xC3CA, + 52489 - 44032: 0xC3CB, + 52490 - 44032: 0xAC4A, + 52491 - 44032: 0xAC4B, + 52492 - 44032: 0xC3CC, + 52493 - 44032: 0xAC4C, + 52494 - 44032: 0xAC4D, + 52495 - 44032: 0xAC4E, + 52496 - 44032: 0xC3CD, + 52497 - 44032: 0xAC4F, + 52498 - 44032: 0xAC50, + 52499 - 44032: 0xAC51, + 52500 - 44032: 0xAC52, + 52501 - 44032: 0xAC53, + 52502 - 44032: 0xAC54, + 52503 - 44032: 0xAC55, + 52504 - 44032: 0xC3CE, + 52505 - 44032: 0xC3CF, + 52506 - 44032: 0xAC56, + 52507 - 44032: 0xC3D0, + 52508 - 44032: 0xAC57, + 52509 - 44032: 0xC3D1, + 52510 - 44032: 0xAC58, + 52511 - 44032: 0xAC59, + 52512 - 44032: 0xAC5A, + 52513 - 44032: 0xAC61, + 52514 - 44032: 0xAC62, + 52515 - 44032: 0xAC63, + 52516 - 44032: 0xC3D2, + 52517 - 44032: 0xAC64, + 52518 - 44032: 0xAC65, + 52519 - 44032: 0xAC66, + 52520 - 44032: 0xC3D3, + 52521 - 44032: 0xAC67, + 52522 - 44032: 0xAC68, + 52523 - 44032: 0xAC69, + 52524 - 44032: 0xC3D4, + 52525 - 44032: 0xAC6A, + 52526 - 44032: 0xAC6B, + 52527 - 44032: 0xAC6C, + 52528 - 44032: 0xAC6D, + 52529 - 44032: 0xAC6E, + 52530 - 44032: 0xAC6F, + 52531 - 44032: 0xAC70, + 52532 - 44032: 0xAC71, + 52533 - 44032: 0xAC72, + 52534 - 44032: 0xAC73, + 52535 - 44032: 0xAC74, + 52536 - 44032: 0xAC75, + 52537 - 44032: 0xC3D5, + 52538 - 44032: 0xAC76, + 52539 - 44032: 0xAC77, + 52540 - 44032: 0xAC78, + 52541 - 44032: 0xAC79, + 52542 - 44032: 0xAC7A, + 52543 - 44032: 0xAC81, + 52544 - 44032: 0xAC82, + 52545 - 44032: 0xAC83, + 52546 - 44032: 0xAC84, + 52547 - 44032: 0xAC85, + 52548 - 44032: 0xAC86, + 52549 - 44032: 0xAC87, + 52550 - 44032: 0xAC88, + 52551 - 44032: 0xAC89, + 52552 - 44032: 0xAC8A, + 52553 - 44032: 0xAC8B, + 52554 - 44032: 0xAC8C, + 52555 - 44032: 0xAC8D, + 52556 - 44032: 0xAC8E, + 52557 - 44032: 0xAC8F, + 52558 - 44032: 0xAC90, + 52559 - 44032: 0xAC91, + 52560 - 44032: 0xAC92, + 52561 - 44032: 0xAC93, + 52562 - 44032: 0xAC94, + 52563 - 44032: 0xAC95, + 52564 - 44032: 0xAC96, + 52565 - 44032: 0xAC97, + 52566 - 44032: 0xAC98, + 52567 - 44032: 0xAC99, + 52568 - 44032: 0xAC9A, + 52569 - 44032: 0xAC9B, + 52570 - 44032: 0xAC9C, + 52571 - 44032: 0xAC9D, + 52572 - 44032: 0xC3D6, + 52573 - 44032: 0xAC9E, + 52574 - 44032: 0xAC9F, + 52575 - 44032: 0xACA0, + 52576 - 44032: 0xC3D7, + 52577 - 44032: 0xAD41, + 52578 - 44032: 0xAD42, + 52579 - 44032: 0xAD43, + 52580 - 44032: 0xC3D8, + 52581 - 44032: 0xAD44, + 52582 - 44032: 0xAD45, + 52583 - 44032: 0xAD46, + 52584 - 44032: 0xAD47, + 52585 - 44032: 0xAD48, + 52586 - 44032: 0xAD49, + 52587 - 44032: 0xAD4A, + 52588 - 44032: 0xC3D9, + 52589 - 44032: 0xC3DA, + 52590 - 44032: 0xAD4B, + 52591 - 44032: 0xC3DB, + 52592 - 44032: 0xAD4C, + 52593 - 44032: 0xC3DC, + 52594 - 44032: 0xAD4D, + 52595 - 44032: 0xAD4E, + 52596 - 44032: 0xAD4F, + 52597 - 44032: 0xAD50, + 52598 - 44032: 0xAD51, + 52599 - 44032: 0xAD52, + 52600 - 44032: 0xC3DD, + 52601 - 44032: 0xAD53, + 52602 - 44032: 0xAD54, + 52603 - 44032: 0xAD55, + 52604 - 44032: 0xAD56, + 52605 - 44032: 0xAD57, + 52606 - 44032: 0xAD58, + 52607 - 44032: 0xAD59, + 52608 - 44032: 0xAD5A, + 52609 - 44032: 0xAD61, + 52610 - 44032: 0xAD62, + 52611 - 44032: 0xAD63, + 52612 - 44032: 0xAD64, + 52613 - 44032: 0xAD65, + 52614 - 44032: 0xAD66, + 52615 - 44032: 0xAD67, + 52616 - 44032: 0xC3DE, + 52617 - 44032: 0xAD68, + 52618 - 44032: 0xAD69, + 52619 - 44032: 0xAD6A, + 52620 - 44032: 0xAD6B, + 52621 - 44032: 0xAD6C, + 52622 - 44032: 0xAD6D, + 52623 - 44032: 0xAD6E, + 52624 - 44032: 0xAD6F, + 52625 - 44032: 0xAD70, + 52626 - 44032: 0xAD71, + 52627 - 44032: 0xAD72, + 52628 - 44032: 0xC3DF, + 52629 - 44032: 0xC3E0, + 52630 - 44032: 0xAD73, + 52631 - 44032: 0xAD74, + 52632 - 44032: 0xC3E1, + 52633 - 44032: 0xAD75, + 52634 - 44032: 0xAD76, + 52635 - 44032: 0xAD77, + 52636 - 44032: 0xC3E2, + 52637 - 44032: 0xAD78, + 52638 - 44032: 0xAD79, + 52639 - 44032: 0xAD7A, + 52640 - 44032: 0xAD81, + 52641 - 44032: 0xAD82, + 52642 - 44032: 0xAD83, + 52643 - 44032: 0xAD84, + 52644 - 44032: 0xC3E3, + 52645 - 44032: 0xC3E4, + 52646 - 44032: 0xAD85, + 52647 - 44032: 0xC3E5, + 52648 - 44032: 0xAD86, + 52649 - 44032: 0xC3E6, + 52650 - 44032: 0xAD87, + 52651 - 44032: 0xAD88, + 52652 - 44032: 0xAD89, + 52653 - 44032: 0xAD8A, + 52654 - 44032: 0xAD8B, + 52655 - 44032: 0xAD8C, + 52656 - 44032: 0xC3E7, + 52657 - 44032: 0xAD8D, + 52658 - 44032: 0xAD8E, + 52659 - 44032: 0xAD8F, + 52660 - 44032: 0xAD90, + 52661 - 44032: 0xAD91, + 52662 - 44032: 0xAD92, + 52663 - 44032: 0xAD93, + 52664 - 44032: 0xAD94, + 52665 - 44032: 0xAD95, + 52666 - 44032: 0xAD96, + 52667 - 44032: 0xAD97, + 52668 - 44032: 0xAD98, + 52669 - 44032: 0xAD99, + 52670 - 44032: 0xAD9A, + 52671 - 44032: 0xAD9B, + 52672 - 44032: 0xAD9C, + 52673 - 44032: 0xAD9D, + 52674 - 44032: 0xAD9E, + 52675 - 44032: 0xAD9F, + 52676 - 44032: 0xC3E8, + 52677 - 44032: 0xADA0, + 52678 - 44032: 0xAE41, + 52679 - 44032: 0xAE42, + 52680 - 44032: 0xAE43, + 52681 - 44032: 0xAE44, + 52682 - 44032: 0xAE45, + 52683 - 44032: 0xAE46, + 52684 - 44032: 0xC3E9, + 52685 - 44032: 0xAE47, + 52686 - 44032: 0xAE48, + 52687 - 44032: 0xAE49, + 52688 - 44032: 0xC3EA, + 52689 - 44032: 0xAE4A, + 52690 - 44032: 0xAE4B, + 52691 - 44032: 0xAE4C, + 52692 - 44032: 0xAE4D, + 52693 - 44032: 0xAE4E, + 52694 - 44032: 0xAE4F, + 52695 - 44032: 0xAE50, + 52696 - 44032: 0xAE51, + 52697 - 44032: 0xAE52, + 52698 - 44032: 0xAE53, + 52699 - 44032: 0xAE54, + 52700 - 44032: 0xAE55, + 52701 - 44032: 0xAE56, + 52702 - 44032: 0xAE57, + 52703 - 44032: 0xAE58, + 52704 - 44032: 0xAE59, + 52705 - 44032: 0xAE5A, + 52706 - 44032: 0xAE61, + 52707 - 44032: 0xAE62, + 52708 - 44032: 0xAE63, + 52709 - 44032: 0xAE64, + 52710 - 44032: 0xAE65, + 52711 - 44032: 0xAE66, + 52712 - 44032: 0xC3EB, + 52713 - 44032: 0xAE67, + 52714 - 44032: 0xAE68, + 52715 - 44032: 0xAE69, + 52716 - 44032: 0xC3EC, + 52717 - 44032: 0xAE6A, + 52718 - 44032: 0xAE6B, + 52719 - 44032: 0xAE6C, + 52720 - 44032: 0xC3ED, + 52721 - 44032: 0xAE6D, + 52722 - 44032: 0xAE6E, + 52723 - 44032: 0xAE6F, + 52724 - 44032: 0xAE70, + 52725 - 44032: 0xAE71, + 52726 - 44032: 0xAE72, + 52727 - 44032: 0xAE73, + 52728 - 44032: 0xC3EE, + 52729 - 44032: 0xC3EF, + 52730 - 44032: 0xAE74, + 52731 - 44032: 0xC3F0, + 52732 - 44032: 0xAE75, + 52733 - 44032: 0xC3F1, + 52734 - 44032: 0xAE76, + 52735 - 44032: 0xAE77, + 52736 - 44032: 0xAE78, + 52737 - 44032: 0xAE79, + 52738 - 44032: 0xAE7A, + 52739 - 44032: 0xAE81, + 52740 - 44032: 0xC3F2, + 52741 - 44032: 0xAE82, + 52742 - 44032: 0xAE83, + 52743 - 44032: 0xAE84, + 52744 - 44032: 0xC3F3, + 52745 - 44032: 0xAE85, + 52746 - 44032: 0xAE86, + 52747 - 44032: 0xAE87, + 52748 - 44032: 0xC3F4, + 52749 - 44032: 0xAE88, + 52750 - 44032: 0xAE89, + 52751 - 44032: 0xAE8A, + 52752 - 44032: 0xAE8B, + 52753 - 44032: 0xAE8C, + 52754 - 44032: 0xAE8D, + 52755 - 44032: 0xAE8E, + 52756 - 44032: 0xC3F5, + 52757 - 44032: 0xAE8F, + 52758 - 44032: 0xAE90, + 52759 - 44032: 0xAE91, + 52760 - 44032: 0xAE92, + 52761 - 44032: 0xC3F6, + 52762 - 44032: 0xAE93, + 52763 - 44032: 0xAE94, + 52764 - 44032: 0xAE95, + 52765 - 44032: 0xAE96, + 52766 - 44032: 0xAE97, + 52767 - 44032: 0xAE98, + 52768 - 44032: 0xC3F7, + 52769 - 44032: 0xC3F8, + 52770 - 44032: 0xAE99, + 52771 - 44032: 0xAE9A, + 52772 - 44032: 0xC3F9, + 52773 - 44032: 0xAE9B, + 52774 - 44032: 0xAE9C, + 52775 - 44032: 0xAE9D, + 52776 - 44032: 0xC3FA, + 52777 - 44032: 0xAE9E, + 52778 - 44032: 0xAE9F, + 52779 - 44032: 0xAEA0, + 52780 - 44032: 0xAF41, + 52781 - 44032: 0xAF42, + 52782 - 44032: 0xAF43, + 52783 - 44032: 0xAF44, + 52784 - 44032: 0xC3FB, + 52785 - 44032: 0xC3FC, + 52786 - 44032: 0xAF45, + 52787 - 44032: 0xC3FD, + 52788 - 44032: 0xAF46, + 52789 - 44032: 0xC3FE, + 52790 - 44032: 0xAF47, + 52791 - 44032: 0xAF48, + 52792 - 44032: 0xAF49, + 52793 - 44032: 0xAF4A, + 52794 - 44032: 0xAF4B, + 52795 - 44032: 0xAF4C, + 52796 - 44032: 0xAF4D, + 52797 - 44032: 0xAF4E, + 52798 - 44032: 0xAF4F, + 52799 - 44032: 0xAF50, + 52800 - 44032: 0xAF51, + 52801 - 44032: 0xAF52, + 52802 - 44032: 0xAF53, + 52803 - 44032: 0xAF54, + 52804 - 44032: 0xAF55, + 52805 - 44032: 0xAF56, + 52806 - 44032: 0xAF57, + 52807 - 44032: 0xAF58, + 52808 - 44032: 0xAF59, + 52809 - 44032: 0xAF5A, + 52810 - 44032: 0xAF61, + 52811 - 44032: 0xAF62, + 52812 - 44032: 0xAF63, + 52813 - 44032: 0xAF64, + 52814 - 44032: 0xAF65, + 52815 - 44032: 0xAF66, + 52816 - 44032: 0xAF67, + 52817 - 44032: 0xAF68, + 52818 - 44032: 0xAF69, + 52819 - 44032: 0xAF6A, + 52820 - 44032: 0xAF6B, + 52821 - 44032: 0xAF6C, + 52822 - 44032: 0xAF6D, + 52823 - 44032: 0xAF6E, + 52824 - 44032: 0xC4A1, + 52825 - 44032: 0xC4A2, + 52826 - 44032: 0xAF6F, + 52827 - 44032: 0xAF70, + 52828 - 44032: 0xC4A3, + 52829 - 44032: 0xAF71, + 52830 - 44032: 0xAF72, + 52831 - 44032: 0xC4A4, + 52832 - 44032: 0xC4A5, + 52833 - 44032: 0xC4A6, + 52834 - 44032: 0xAF73, + 52835 - 44032: 0xAF74, + 52836 - 44032: 0xAF75, + 52837 - 44032: 0xAF76, + 52838 - 44032: 0xAF77, + 52839 - 44032: 0xAF78, + 52840 - 44032: 0xC4A7, + 52841 - 44032: 0xC4A8, + 52842 - 44032: 0xAF79, + 52843 - 44032: 0xC4A9, + 52844 - 44032: 0xAF7A, + 52845 - 44032: 0xC4AA, + 52846 - 44032: 0xAF81, + 52847 - 44032: 0xAF82, + 52848 - 44032: 0xAF83, + 52849 - 44032: 0xAF84, + 52850 - 44032: 0xAF85, + 52851 - 44032: 0xAF86, + 52852 - 44032: 0xC4AB, + 52853 - 44032: 0xC4AC, + 52854 - 44032: 0xAF87, + 52855 - 44032: 0xAF88, + 52856 - 44032: 0xC4AD, + 52857 - 44032: 0xAF89, + 52858 - 44032: 0xAF8A, + 52859 - 44032: 0xAF8B, + 52860 - 44032: 0xC4AE, + 52861 - 44032: 0xAF8C, + 52862 - 44032: 0xAF8D, + 52863 - 44032: 0xAF8E, + 52864 - 44032: 0xAF8F, + 52865 - 44032: 0xAF90, + 52866 - 44032: 0xAF91, + 52867 - 44032: 0xAF92, + 52868 - 44032: 0xC4AF, + 52869 - 44032: 0xC4B0, + 52870 - 44032: 0xAF93, + 52871 - 44032: 0xC4B1, + 52872 - 44032: 0xAF94, + 52873 - 44032: 0xC4B2, + 52874 - 44032: 0xAF95, + 52875 - 44032: 0xAF96, + 52876 - 44032: 0xAF97, + 52877 - 44032: 0xAF98, + 52878 - 44032: 0xAF99, + 52879 - 44032: 0xAF9A, + 52880 - 44032: 0xC4B3, + 52881 - 44032: 0xC4B4, + 52882 - 44032: 0xAF9B, + 52883 - 44032: 0xAF9C, + 52884 - 44032: 0xC4B5, + 52885 - 44032: 0xAF9D, + 52886 - 44032: 0xAF9E, + 52887 - 44032: 0xAF9F, + 52888 - 44032: 0xC4B6, + 52889 - 44032: 0xAFA0, + 52890 - 44032: 0xB041, + 52891 - 44032: 0xB042, + 52892 - 44032: 0xB043, + 52893 - 44032: 0xB044, + 52894 - 44032: 0xB045, + 52895 - 44032: 0xB046, + 52896 - 44032: 0xC4B7, + 52897 - 44032: 0xC4B8, + 52898 - 44032: 0xB047, + 52899 - 44032: 0xC4B9, + 52900 - 44032: 0xC4BA, + 52901 - 44032: 0xC4BB, + 52902 - 44032: 0xB048, + 52903 - 44032: 0xB049, + 52904 - 44032: 0xB04A, + 52905 - 44032: 0xB04B, + 52906 - 44032: 0xB04C, + 52907 - 44032: 0xB04D, + 52908 - 44032: 0xC4BC, + 52909 - 44032: 0xC4BD, + 52910 - 44032: 0xB04E, + 52911 - 44032: 0xB04F, + 52912 - 44032: 0xB050, + 52913 - 44032: 0xB051, + 52914 - 44032: 0xB052, + 52915 - 44032: 0xB053, + 52916 - 44032: 0xB054, + 52917 - 44032: 0xB055, + 52918 - 44032: 0xB056, + 52919 - 44032: 0xB057, + 52920 - 44032: 0xB058, + 52921 - 44032: 0xB059, + 52922 - 44032: 0xB05A, + 52923 - 44032: 0xB061, + 52924 - 44032: 0xB062, + 52925 - 44032: 0xB063, + 52926 - 44032: 0xB064, + 52927 - 44032: 0xB065, + 52928 - 44032: 0xB066, + 52929 - 44032: 0xC4BE, + 52930 - 44032: 0xB067, + 52931 - 44032: 0xB068, + 52932 - 44032: 0xB069, + 52933 - 44032: 0xB06A, + 52934 - 44032: 0xB06B, + 52935 - 44032: 0xB06C, + 52936 - 44032: 0xB06D, + 52937 - 44032: 0xB06E, + 52938 - 44032: 0xB06F, + 52939 - 44032: 0xB070, + 52940 - 44032: 0xB071, + 52941 - 44032: 0xB072, + 52942 - 44032: 0xB073, + 52943 - 44032: 0xB074, + 52944 - 44032: 0xB075, + 52945 - 44032: 0xB076, + 52946 - 44032: 0xB077, + 52947 - 44032: 0xB078, + 52948 - 44032: 0xB079, + 52949 - 44032: 0xB07A, + 52950 - 44032: 0xB081, + 52951 - 44032: 0xB082, + 52952 - 44032: 0xB083, + 52953 - 44032: 0xB084, + 52954 - 44032: 0xB085, + 52955 - 44032: 0xB086, + 52956 - 44032: 0xB087, + 52957 - 44032: 0xB088, + 52958 - 44032: 0xB089, + 52959 - 44032: 0xB08A, + 52960 - 44032: 0xB08B, + 52961 - 44032: 0xB08C, + 52962 - 44032: 0xB08D, + 52963 - 44032: 0xB08E, + 52964 - 44032: 0xC4BF, + 52965 - 44032: 0xC4C0, + 52966 - 44032: 0xB08F, + 52967 - 44032: 0xB090, + 52968 - 44032: 0xC4C1, + 52969 - 44032: 0xB091, + 52970 - 44032: 0xB092, + 52971 - 44032: 0xC4C2, + 52972 - 44032: 0xC4C3, + 52973 - 44032: 0xB093, + 52974 - 44032: 0xB094, + 52975 - 44032: 0xB095, + 52976 - 44032: 0xB096, + 52977 - 44032: 0xB097, + 52978 - 44032: 0xB098, + 52979 - 44032: 0xB099, + 52980 - 44032: 0xC4C4, + 52981 - 44032: 0xC4C5, + 52982 - 44032: 0xB09A, + 52983 - 44032: 0xC4C6, + 52984 - 44032: 0xC4C7, + 52985 - 44032: 0xC4C8, + 52986 - 44032: 0xB09B, + 52987 - 44032: 0xB09C, + 52988 - 44032: 0xB09D, + 52989 - 44032: 0xB09E, + 52990 - 44032: 0xB09F, + 52991 - 44032: 0xB0A0, + 52992 - 44032: 0xC4C9, + 52993 - 44032: 0xC4CA, + 52994 - 44032: 0xB141, + 52995 - 44032: 0xB142, + 52996 - 44032: 0xC4CB, + 52997 - 44032: 0xB143, + 52998 - 44032: 0xB144, + 52999 - 44032: 0xB145, + 53000 - 44032: 0xC4CC, + 53001 - 44032: 0xB146, + 53002 - 44032: 0xB147, + 53003 - 44032: 0xB148, + 53004 - 44032: 0xB149, + 53005 - 44032: 0xB14A, + 53006 - 44032: 0xB14B, + 53007 - 44032: 0xB14C, + 53008 - 44032: 0xC4CD, + 53009 - 44032: 0xC4CE, + 53010 - 44032: 0xB14D, + 53011 - 44032: 0xC4CF, + 53012 - 44032: 0xB14E, + 53013 - 44032: 0xC4D0, + 53014 - 44032: 0xB14F, + 53015 - 44032: 0xB150, + 53016 - 44032: 0xB151, + 53017 - 44032: 0xB152, + 53018 - 44032: 0xB153, + 53019 - 44032: 0xB154, + 53020 - 44032: 0xC4D1, + 53021 - 44032: 0xB155, + 53022 - 44032: 0xB156, + 53023 - 44032: 0xB157, + 53024 - 44032: 0xC4D2, + 53025 - 44032: 0xB158, + 53026 - 44032: 0xB159, + 53027 - 44032: 0xB15A, + 53028 - 44032: 0xC4D3, + 53029 - 44032: 0xB161, + 53030 - 44032: 0xB162, + 53031 - 44032: 0xB163, + 53032 - 44032: 0xB164, + 53033 - 44032: 0xB165, + 53034 - 44032: 0xB166, + 53035 - 44032: 0xB167, + 53036 - 44032: 0xC4D4, + 53037 - 44032: 0xC4D5, + 53038 - 44032: 0xB168, + 53039 - 44032: 0xC4D6, + 53040 - 44032: 0xC4D7, + 53041 - 44032: 0xC4D8, + 53042 - 44032: 0xB169, + 53043 - 44032: 0xB16A, + 53044 - 44032: 0xB16B, + 53045 - 44032: 0xB16C, + 53046 - 44032: 0xB16D, + 53047 - 44032: 0xB16E, + 53048 - 44032: 0xC4D9, + 53049 - 44032: 0xB16F, + 53050 - 44032: 0xB170, + 53051 - 44032: 0xB171, + 53052 - 44032: 0xB172, + 53053 - 44032: 0xB173, + 53054 - 44032: 0xB174, + 53055 - 44032: 0xB175, + 53056 - 44032: 0xB176, + 53057 - 44032: 0xB177, + 53058 - 44032: 0xB178, + 53059 - 44032: 0xB179, + 53060 - 44032: 0xB17A, + 53061 - 44032: 0xB181, + 53062 - 44032: 0xB182, + 53063 - 44032: 0xB183, + 53064 - 44032: 0xB184, + 53065 - 44032: 0xB185, + 53066 - 44032: 0xB186, + 53067 - 44032: 0xB187, + 53068 - 44032: 0xB188, + 53069 - 44032: 0xB189, + 53070 - 44032: 0xB18A, + 53071 - 44032: 0xB18B, + 53072 - 44032: 0xB18C, + 53073 - 44032: 0xB18D, + 53074 - 44032: 0xB18E, + 53075 - 44032: 0xB18F, + 53076 - 44032: 0xC4DA, + 53077 - 44032: 0xC4DB, + 53078 - 44032: 0xB190, + 53079 - 44032: 0xB191, + 53080 - 44032: 0xC4DC, + 53081 - 44032: 0xB192, + 53082 - 44032: 0xB193, + 53083 - 44032: 0xB194, + 53084 - 44032: 0xC4DD, + 53085 - 44032: 0xB195, + 53086 - 44032: 0xB196, + 53087 - 44032: 0xB197, + 53088 - 44032: 0xB198, + 53089 - 44032: 0xB199, + 53090 - 44032: 0xB19A, + 53091 - 44032: 0xB19B, + 53092 - 44032: 0xC4DE, + 53093 - 44032: 0xC4DF, + 53094 - 44032: 0xB19C, + 53095 - 44032: 0xC4E0, + 53096 - 44032: 0xB19D, + 53097 - 44032: 0xC4E1, + 53098 - 44032: 0xB19E, + 53099 - 44032: 0xB19F, + 53100 - 44032: 0xB1A0, + 53101 - 44032: 0xB241, + 53102 - 44032: 0xB242, + 53103 - 44032: 0xB243, + 53104 - 44032: 0xC4E2, + 53105 - 44032: 0xC4E3, + 53106 - 44032: 0xB244, + 53107 - 44032: 0xB245, + 53108 - 44032: 0xC4E4, + 53109 - 44032: 0xB246, + 53110 - 44032: 0xB247, + 53111 - 44032: 0xB248, + 53112 - 44032: 0xC4E5, + 53113 - 44032: 0xB249, + 53114 - 44032: 0xB24A, + 53115 - 44032: 0xB24B, + 53116 - 44032: 0xB24C, + 53117 - 44032: 0xB24D, + 53118 - 44032: 0xB24E, + 53119 - 44032: 0xB24F, + 53120 - 44032: 0xC4E6, + 53121 - 44032: 0xB250, + 53122 - 44032: 0xB251, + 53123 - 44032: 0xB252, + 53124 - 44032: 0xB253, + 53125 - 44032: 0xC4E7, + 53126 - 44032: 0xB254, + 53127 - 44032: 0xB255, + 53128 - 44032: 0xB256, + 53129 - 44032: 0xB257, + 53130 - 44032: 0xB258, + 53131 - 44032: 0xB259, + 53132 - 44032: 0xC4E8, + 53133 - 44032: 0xB25A, + 53134 - 44032: 0xB261, + 53135 - 44032: 0xB262, + 53136 - 44032: 0xB263, + 53137 - 44032: 0xB264, + 53138 - 44032: 0xB265, + 53139 - 44032: 0xB266, + 53140 - 44032: 0xB267, + 53141 - 44032: 0xB268, + 53142 - 44032: 0xB269, + 53143 - 44032: 0xB26A, + 53144 - 44032: 0xB26B, + 53145 - 44032: 0xB26C, + 53146 - 44032: 0xB26D, + 53147 - 44032: 0xB26E, + 53148 - 44032: 0xB26F, + 53149 - 44032: 0xB270, + 53150 - 44032: 0xB271, + 53151 - 44032: 0xB272, + 53152 - 44032: 0xB273, + 53153 - 44032: 0xC4E9, + 53154 - 44032: 0xB274, + 53155 - 44032: 0xB275, + 53156 - 44032: 0xB276, + 53157 - 44032: 0xB277, + 53158 - 44032: 0xB278, + 53159 - 44032: 0xB279, + 53160 - 44032: 0xC4EA, + 53161 - 44032: 0xB27A, + 53162 - 44032: 0xB281, + 53163 - 44032: 0xB282, + 53164 - 44032: 0xB283, + 53165 - 44032: 0xB284, + 53166 - 44032: 0xB285, + 53167 - 44032: 0xB286, + 53168 - 44032: 0xC4EB, + 53169 - 44032: 0xB287, + 53170 - 44032: 0xB288, + 53171 - 44032: 0xB289, + 53172 - 44032: 0xB28A, + 53173 - 44032: 0xB28B, + 53174 - 44032: 0xB28C, + 53175 - 44032: 0xB28D, + 53176 - 44032: 0xB28E, + 53177 - 44032: 0xB28F, + 53178 - 44032: 0xB290, + 53179 - 44032: 0xB291, + 53180 - 44032: 0xB292, + 53181 - 44032: 0xB293, + 53182 - 44032: 0xB294, + 53183 - 44032: 0xB295, + 53184 - 44032: 0xB296, + 53185 - 44032: 0xB297, + 53186 - 44032: 0xB298, + 53187 - 44032: 0xB299, + 53188 - 44032: 0xC4EC, + 53189 - 44032: 0xB29A, + 53190 - 44032: 0xB29B, + 53191 - 44032: 0xB29C, + 53192 - 44032: 0xB29D, + 53193 - 44032: 0xB29E, + 53194 - 44032: 0xB29F, + 53195 - 44032: 0xB2A0, + 53196 - 44032: 0xB341, + 53197 - 44032: 0xB342, + 53198 - 44032: 0xB343, + 53199 - 44032: 0xB344, + 53200 - 44032: 0xB345, + 53201 - 44032: 0xB346, + 53202 - 44032: 0xB347, + 53203 - 44032: 0xB348, + 53204 - 44032: 0xB349, + 53205 - 44032: 0xB34A, + 53206 - 44032: 0xB34B, + 53207 - 44032: 0xB34C, + 53208 - 44032: 0xB34D, + 53209 - 44032: 0xB34E, + 53210 - 44032: 0xB34F, + 53211 - 44032: 0xB350, + 53212 - 44032: 0xB351, + 53213 - 44032: 0xB352, + 53214 - 44032: 0xB353, + 53215 - 44032: 0xB354, + 53216 - 44032: 0xC4ED, + 53217 - 44032: 0xC4EE, + 53218 - 44032: 0xB355, + 53219 - 44032: 0xB356, + 53220 - 44032: 0xC4EF, + 53221 - 44032: 0xB357, + 53222 - 44032: 0xB358, + 53223 - 44032: 0xB359, + 53224 - 44032: 0xC4F0, + 53225 - 44032: 0xB35A, + 53226 - 44032: 0xB361, + 53227 - 44032: 0xB362, + 53228 - 44032: 0xB363, + 53229 - 44032: 0xB364, + 53230 - 44032: 0xB365, + 53231 - 44032: 0xB366, + 53232 - 44032: 0xC4F1, + 53233 - 44032: 0xC4F2, + 53234 - 44032: 0xB367, + 53235 - 44032: 0xC4F3, + 53236 - 44032: 0xB368, + 53237 - 44032: 0xC4F4, + 53238 - 44032: 0xB369, + 53239 - 44032: 0xB36A, + 53240 - 44032: 0xB36B, + 53241 - 44032: 0xB36C, + 53242 - 44032: 0xB36D, + 53243 - 44032: 0xB36E, + 53244 - 44032: 0xC4F5, + 53245 - 44032: 0xB36F, + 53246 - 44032: 0xB370, + 53247 - 44032: 0xB371, + 53248 - 44032: 0xC4F6, + 53249 - 44032: 0xB372, + 53250 - 44032: 0xB373, + 53251 - 44032: 0xB374, + 53252 - 44032: 0xC4F7, + 53253 - 44032: 0xB375, + 53254 - 44032: 0xB376, + 53255 - 44032: 0xB377, + 53256 - 44032: 0xB378, + 53257 - 44032: 0xB379, + 53258 - 44032: 0xB37A, + 53259 - 44032: 0xB381, + 53260 - 44032: 0xB382, + 53261 - 44032: 0xB383, + 53262 - 44032: 0xB384, + 53263 - 44032: 0xB385, + 53264 - 44032: 0xB386, + 53265 - 44032: 0xC4F8, + 53266 - 44032: 0xB387, + 53267 - 44032: 0xB388, + 53268 - 44032: 0xB389, + 53269 - 44032: 0xB38A, + 53270 - 44032: 0xB38B, + 53271 - 44032: 0xB38C, + 53272 - 44032: 0xC4F9, + 53273 - 44032: 0xB38D, + 53274 - 44032: 0xB38E, + 53275 - 44032: 0xB38F, + 53276 - 44032: 0xB390, + 53277 - 44032: 0xB391, + 53278 - 44032: 0xB392, + 53279 - 44032: 0xB393, + 53280 - 44032: 0xB394, + 53281 - 44032: 0xB395, + 53282 - 44032: 0xB396, + 53283 - 44032: 0xB397, + 53284 - 44032: 0xB398, + 53285 - 44032: 0xB399, + 53286 - 44032: 0xB39A, + 53287 - 44032: 0xB39B, + 53288 - 44032: 0xB39C, + 53289 - 44032: 0xB39D, + 53290 - 44032: 0xB39E, + 53291 - 44032: 0xB39F, + 53292 - 44032: 0xB3A0, + 53293 - 44032: 0xC4FA, + 53294 - 44032: 0xB441, + 53295 - 44032: 0xB442, + 53296 - 44032: 0xB443, + 53297 - 44032: 0xB444, + 53298 - 44032: 0xB445, + 53299 - 44032: 0xB446, + 53300 - 44032: 0xC4FB, + 53301 - 44032: 0xC4FC, + 53302 - 44032: 0xB447, + 53303 - 44032: 0xB448, + 53304 - 44032: 0xC4FD, + 53305 - 44032: 0xB449, + 53306 - 44032: 0xB44A, + 53307 - 44032: 0xB44B, + 53308 - 44032: 0xC4FE, + 53309 - 44032: 0xB44C, + 53310 - 44032: 0xB44D, + 53311 - 44032: 0xB44E, + 53312 - 44032: 0xB44F, + 53313 - 44032: 0xB450, + 53314 - 44032: 0xB451, + 53315 - 44032: 0xB452, + 53316 - 44032: 0xC5A1, + 53317 - 44032: 0xC5A2, + 53318 - 44032: 0xB453, + 53319 - 44032: 0xC5A3, + 53320 - 44032: 0xB454, + 53321 - 44032: 0xC5A4, + 53322 - 44032: 0xB455, + 53323 - 44032: 0xB456, + 53324 - 44032: 0xB457, + 53325 - 44032: 0xB458, + 53326 - 44032: 0xB459, + 53327 - 44032: 0xB45A, + 53328 - 44032: 0xC5A5, + 53329 - 44032: 0xB461, + 53330 - 44032: 0xB462, + 53331 - 44032: 0xB463, + 53332 - 44032: 0xC5A6, + 53333 - 44032: 0xB464, + 53334 - 44032: 0xB465, + 53335 - 44032: 0xB466, + 53336 - 44032: 0xC5A7, + 53337 - 44032: 0xB467, + 53338 - 44032: 0xB468, + 53339 - 44032: 0xB469, + 53340 - 44032: 0xB46A, + 53341 - 44032: 0xB46B, + 53342 - 44032: 0xB46C, + 53343 - 44032: 0xB46D, + 53344 - 44032: 0xC5A8, + 53345 - 44032: 0xB46E, + 53346 - 44032: 0xB46F, + 53347 - 44032: 0xB470, + 53348 - 44032: 0xB471, + 53349 - 44032: 0xB472, + 53350 - 44032: 0xB473, + 53351 - 44032: 0xB474, + 53352 - 44032: 0xB475, + 53353 - 44032: 0xB476, + 53354 - 44032: 0xB477, + 53355 - 44032: 0xB478, + 53356 - 44032: 0xC5A9, + 53357 - 44032: 0xC5AA, + 53358 - 44032: 0xB479, + 53359 - 44032: 0xB47A, + 53360 - 44032: 0xC5AB, + 53361 - 44032: 0xB481, + 53362 - 44032: 0xB482, + 53363 - 44032: 0xB483, + 53364 - 44032: 0xC5AC, + 53365 - 44032: 0xB484, + 53366 - 44032: 0xB485, + 53367 - 44032: 0xB486, + 53368 - 44032: 0xB487, + 53369 - 44032: 0xB488, + 53370 - 44032: 0xB489, + 53371 - 44032: 0xB48A, + 53372 - 44032: 0xC5AD, + 53373 - 44032: 0xC5AE, + 53374 - 44032: 0xB48B, + 53375 - 44032: 0xB48C, + 53376 - 44032: 0xB48D, + 53377 - 44032: 0xC5AF, + 53378 - 44032: 0xB48E, + 53379 - 44032: 0xB48F, + 53380 - 44032: 0xB490, + 53381 - 44032: 0xB491, + 53382 - 44032: 0xB492, + 53383 - 44032: 0xB493, + 53384 - 44032: 0xB494, + 53385 - 44032: 0xB495, + 53386 - 44032: 0xB496, + 53387 - 44032: 0xB497, + 53388 - 44032: 0xB498, + 53389 - 44032: 0xB499, + 53390 - 44032: 0xB49A, + 53391 - 44032: 0xB49B, + 53392 - 44032: 0xB49C, + 53393 - 44032: 0xB49D, + 53394 - 44032: 0xB49E, + 53395 - 44032: 0xB49F, + 53396 - 44032: 0xB4A0, + 53397 - 44032: 0xB541, + 53398 - 44032: 0xB542, + 53399 - 44032: 0xB543, + 53400 - 44032: 0xB544, + 53401 - 44032: 0xB545, + 53402 - 44032: 0xB546, + 53403 - 44032: 0xB547, + 53404 - 44032: 0xB548, + 53405 - 44032: 0xB549, + 53406 - 44032: 0xB54A, + 53407 - 44032: 0xB54B, + 53408 - 44032: 0xB54C, + 53409 - 44032: 0xB54D, + 53410 - 44032: 0xB54E, + 53411 - 44032: 0xB54F, + 53412 - 44032: 0xC5B0, + 53413 - 44032: 0xC5B1, + 53414 - 44032: 0xB550, + 53415 - 44032: 0xB551, + 53416 - 44032: 0xC5B2, + 53417 - 44032: 0xB552, + 53418 - 44032: 0xB553, + 53419 - 44032: 0xB554, + 53420 - 44032: 0xC5B3, + 53421 - 44032: 0xB555, + 53422 - 44032: 0xB556, + 53423 - 44032: 0xB557, + 53424 - 44032: 0xB558, + 53425 - 44032: 0xB559, + 53426 - 44032: 0xB55A, + 53427 - 44032: 0xB561, + 53428 - 44032: 0xC5B4, + 53429 - 44032: 0xC5B5, + 53430 - 44032: 0xB562, + 53431 - 44032: 0xC5B6, + 53432 - 44032: 0xB563, + 53433 - 44032: 0xC5B7, + 53434 - 44032: 0xB564, + 53435 - 44032: 0xB565, + 53436 - 44032: 0xB566, + 53437 - 44032: 0xB567, + 53438 - 44032: 0xB568, + 53439 - 44032: 0xB569, + 53440 - 44032: 0xC5B8, + 53441 - 44032: 0xC5B9, + 53442 - 44032: 0xB56A, + 53443 - 44032: 0xB56B, + 53444 - 44032: 0xC5BA, + 53445 - 44032: 0xB56C, + 53446 - 44032: 0xB56D, + 53447 - 44032: 0xB56E, + 53448 - 44032: 0xC5BB, + 53449 - 44032: 0xC5BC, + 53450 - 44032: 0xB56F, + 53451 - 44032: 0xB570, + 53452 - 44032: 0xB571, + 53453 - 44032: 0xB572, + 53454 - 44032: 0xB573, + 53455 - 44032: 0xB574, + 53456 - 44032: 0xC5BD, + 53457 - 44032: 0xC5BE, + 53458 - 44032: 0xB575, + 53459 - 44032: 0xC5BF, + 53460 - 44032: 0xC5C0, + 53461 - 44032: 0xC5C1, + 53462 - 44032: 0xB576, + 53463 - 44032: 0xB577, + 53464 - 44032: 0xB578, + 53465 - 44032: 0xB579, + 53466 - 44032: 0xB57A, + 53467 - 44032: 0xB581, + 53468 - 44032: 0xC5C2, + 53469 - 44032: 0xC5C3, + 53470 - 44032: 0xB582, + 53471 - 44032: 0xB583, + 53472 - 44032: 0xC5C4, + 53473 - 44032: 0xB584, + 53474 - 44032: 0xB585, + 53475 - 44032: 0xB586, + 53476 - 44032: 0xC5C5, + 53477 - 44032: 0xB587, + 53478 - 44032: 0xB588, + 53479 - 44032: 0xB589, + 53480 - 44032: 0xB58A, + 53481 - 44032: 0xB58B, + 53482 - 44032: 0xB58C, + 53483 - 44032: 0xB58D, + 53484 - 44032: 0xC5C6, + 53485 - 44032: 0xC5C7, + 53486 - 44032: 0xB58E, + 53487 - 44032: 0xC5C8, + 53488 - 44032: 0xC5C9, + 53489 - 44032: 0xC5CA, + 53490 - 44032: 0xB58F, + 53491 - 44032: 0xB590, + 53492 - 44032: 0xB591, + 53493 - 44032: 0xB592, + 53494 - 44032: 0xB593, + 53495 - 44032: 0xB594, + 53496 - 44032: 0xC5CB, + 53497 - 44032: 0xB595, + 53498 - 44032: 0xB596, + 53499 - 44032: 0xB597, + 53500 - 44032: 0xB598, + 53501 - 44032: 0xB599, + 53502 - 44032: 0xB59A, + 53503 - 44032: 0xB59B, + 53504 - 44032: 0xB59C, + 53505 - 44032: 0xB59D, + 53506 - 44032: 0xB59E, + 53507 - 44032: 0xB59F, + 53508 - 44032: 0xB5A0, + 53509 - 44032: 0xB641, + 53510 - 44032: 0xB642, + 53511 - 44032: 0xB643, + 53512 - 44032: 0xB644, + 53513 - 44032: 0xB645, + 53514 - 44032: 0xB646, + 53515 - 44032: 0xB647, + 53516 - 44032: 0xB648, + 53517 - 44032: 0xC5CC, + 53518 - 44032: 0xB649, + 53519 - 44032: 0xB64A, + 53520 - 44032: 0xB64B, + 53521 - 44032: 0xB64C, + 53522 - 44032: 0xB64D, + 53523 - 44032: 0xB64E, + 53524 - 44032: 0xB64F, + 53525 - 44032: 0xB650, + 53526 - 44032: 0xB651, + 53527 - 44032: 0xB652, + 53528 - 44032: 0xB653, + 53529 - 44032: 0xB654, + 53530 - 44032: 0xB655, + 53531 - 44032: 0xB656, + 53532 - 44032: 0xB657, + 53533 - 44032: 0xB658, + 53534 - 44032: 0xB659, + 53535 - 44032: 0xB65A, + 53536 - 44032: 0xB661, + 53537 - 44032: 0xB662, + 53538 - 44032: 0xB663, + 53539 - 44032: 0xB664, + 53540 - 44032: 0xB665, + 53541 - 44032: 0xB666, + 53542 - 44032: 0xB667, + 53543 - 44032: 0xB668, + 53544 - 44032: 0xB669, + 53545 - 44032: 0xB66A, + 53546 - 44032: 0xB66B, + 53547 - 44032: 0xB66C, + 53548 - 44032: 0xB66D, + 53549 - 44032: 0xB66E, + 53550 - 44032: 0xB66F, + 53551 - 44032: 0xB670, + 53552 - 44032: 0xC5CD, + 53553 - 44032: 0xC5CE, + 53554 - 44032: 0xB671, + 53555 - 44032: 0xB672, + 53556 - 44032: 0xC5CF, + 53557 - 44032: 0xB673, + 53558 - 44032: 0xB674, + 53559 - 44032: 0xB675, + 53560 - 44032: 0xC5D0, + 53561 - 44032: 0xB676, + 53562 - 44032: 0xC5D1, + 53563 - 44032: 0xB677, + 53564 - 44032: 0xB678, + 53565 - 44032: 0xB679, + 53566 - 44032: 0xB67A, + 53567 - 44032: 0xB681, + 53568 - 44032: 0xC5D2, + 53569 - 44032: 0xC5D3, + 53570 - 44032: 0xB682, + 53571 - 44032: 0xC5D4, + 53572 - 44032: 0xC5D5, + 53573 - 44032: 0xC5D6, + 53574 - 44032: 0xB683, + 53575 - 44032: 0xB684, + 53576 - 44032: 0xB685, + 53577 - 44032: 0xB686, + 53578 - 44032: 0xB687, + 53579 - 44032: 0xB688, + 53580 - 44032: 0xC5D7, + 53581 - 44032: 0xC5D8, + 53582 - 44032: 0xB689, + 53583 - 44032: 0xB68A, + 53584 - 44032: 0xC5D9, + 53585 - 44032: 0xB68B, + 53586 - 44032: 0xB68C, + 53587 - 44032: 0xB68D, + 53588 - 44032: 0xC5DA, + 53589 - 44032: 0xB68E, + 53590 - 44032: 0xB68F, + 53591 - 44032: 0xB690, + 53592 - 44032: 0xB691, + 53593 - 44032: 0xB692, + 53594 - 44032: 0xB693, + 53595 - 44032: 0xB694, + 53596 - 44032: 0xC5DB, + 53597 - 44032: 0xC5DC, + 53598 - 44032: 0xB695, + 53599 - 44032: 0xC5DD, + 53600 - 44032: 0xB696, + 53601 - 44032: 0xC5DE, + 53602 - 44032: 0xB697, + 53603 - 44032: 0xB698, + 53604 - 44032: 0xB699, + 53605 - 44032: 0xB69A, + 53606 - 44032: 0xB69B, + 53607 - 44032: 0xB69C, + 53608 - 44032: 0xC5DF, + 53609 - 44032: 0xB69D, + 53610 - 44032: 0xB69E, + 53611 - 44032: 0xB69F, + 53612 - 44032: 0xC5E0, + 53613 - 44032: 0xB6A0, + 53614 - 44032: 0xB741, + 53615 - 44032: 0xB742, + 53616 - 44032: 0xB743, + 53617 - 44032: 0xB744, + 53618 - 44032: 0xB745, + 53619 - 44032: 0xB746, + 53620 - 44032: 0xB747, + 53621 - 44032: 0xB748, + 53622 - 44032: 0xB749, + 53623 - 44032: 0xB74A, + 53624 - 44032: 0xB74B, + 53625 - 44032: 0xB74C, + 53626 - 44032: 0xB74D, + 53627 - 44032: 0xB74E, + 53628 - 44032: 0xC5E1, + 53629 - 44032: 0xB74F, + 53630 - 44032: 0xB750, + 53631 - 44032: 0xB751, + 53632 - 44032: 0xB752, + 53633 - 44032: 0xB753, + 53634 - 44032: 0xB754, + 53635 - 44032: 0xB755, + 53636 - 44032: 0xC5E2, + 53637 - 44032: 0xB756, + 53638 - 44032: 0xB757, + 53639 - 44032: 0xB758, + 53640 - 44032: 0xC5E3, + 53641 - 44032: 0xB759, + 53642 - 44032: 0xB75A, + 53643 - 44032: 0xB761, + 53644 - 44032: 0xB762, + 53645 - 44032: 0xB763, + 53646 - 44032: 0xB764, + 53647 - 44032: 0xB765, + 53648 - 44032: 0xB766, + 53649 - 44032: 0xB767, + 53650 - 44032: 0xB768, + 53651 - 44032: 0xB769, + 53652 - 44032: 0xB76A, + 53653 - 44032: 0xB76B, + 53654 - 44032: 0xB76C, + 53655 - 44032: 0xB76D, + 53656 - 44032: 0xB76E, + 53657 - 44032: 0xB76F, + 53658 - 44032: 0xB770, + 53659 - 44032: 0xB771, + 53660 - 44032: 0xB772, + 53661 - 44032: 0xB773, + 53662 - 44032: 0xB774, + 53663 - 44032: 0xB775, + 53664 - 44032: 0xC5E4, + 53665 - 44032: 0xC5E5, + 53666 - 44032: 0xB776, + 53667 - 44032: 0xB777, + 53668 - 44032: 0xC5E6, + 53669 - 44032: 0xB778, + 53670 - 44032: 0xB779, + 53671 - 44032: 0xB77A, + 53672 - 44032: 0xC5E7, + 53673 - 44032: 0xB781, + 53674 - 44032: 0xB782, + 53675 - 44032: 0xB783, + 53676 - 44032: 0xB784, + 53677 - 44032: 0xB785, + 53678 - 44032: 0xB786, + 53679 - 44032: 0xB787, + 53680 - 44032: 0xC5E8, + 53681 - 44032: 0xC5E9, + 53682 - 44032: 0xB788, + 53683 - 44032: 0xC5EA, + 53684 - 44032: 0xB789, + 53685 - 44032: 0xC5EB, + 53686 - 44032: 0xB78A, + 53687 - 44032: 0xB78B, + 53688 - 44032: 0xB78C, + 53689 - 44032: 0xB78D, + 53690 - 44032: 0xC5EC, + 53691 - 44032: 0xB78E, + 53692 - 44032: 0xC5ED, + 53693 - 44032: 0xB78F, + 53694 - 44032: 0xB790, + 53695 - 44032: 0xB791, + 53696 - 44032: 0xC5EE, + 53697 - 44032: 0xB792, + 53698 - 44032: 0xB793, + 53699 - 44032: 0xB794, + 53700 - 44032: 0xB795, + 53701 - 44032: 0xB796, + 53702 - 44032: 0xB797, + 53703 - 44032: 0xB798, + 53704 - 44032: 0xB799, + 53705 - 44032: 0xB79A, + 53706 - 44032: 0xB79B, + 53707 - 44032: 0xB79C, + 53708 - 44032: 0xB79D, + 53709 - 44032: 0xB79E, + 53710 - 44032: 0xB79F, + 53711 - 44032: 0xB7A0, + 53712 - 44032: 0xB841, + 53713 - 44032: 0xB842, + 53714 - 44032: 0xB843, + 53715 - 44032: 0xB844, + 53716 - 44032: 0xB845, + 53717 - 44032: 0xB846, + 53718 - 44032: 0xB847, + 53719 - 44032: 0xB848, + 53720 - 44032: 0xC5EF, + 53721 - 44032: 0xB849, + 53722 - 44032: 0xB84A, + 53723 - 44032: 0xB84B, + 53724 - 44032: 0xB84C, + 53725 - 44032: 0xB84D, + 53726 - 44032: 0xB84E, + 53727 - 44032: 0xB84F, + 53728 - 44032: 0xB850, + 53729 - 44032: 0xB851, + 53730 - 44032: 0xB852, + 53731 - 44032: 0xB853, + 53732 - 44032: 0xB854, + 53733 - 44032: 0xB855, + 53734 - 44032: 0xB856, + 53735 - 44032: 0xB857, + 53736 - 44032: 0xB858, + 53737 - 44032: 0xB859, + 53738 - 44032: 0xB85A, + 53739 - 44032: 0xB861, + 53740 - 44032: 0xB862, + 53741 - 44032: 0xB863, + 53742 - 44032: 0xB864, + 53743 - 44032: 0xB865, + 53744 - 44032: 0xB866, + 53745 - 44032: 0xB867, + 53746 - 44032: 0xB868, + 53747 - 44032: 0xB869, + 53748 - 44032: 0xC5F0, + 53749 - 44032: 0xB86A, + 53750 - 44032: 0xB86B, + 53751 - 44032: 0xB86C, + 53752 - 44032: 0xC5F1, + 53753 - 44032: 0xB86D, + 53754 - 44032: 0xB86E, + 53755 - 44032: 0xB86F, + 53756 - 44032: 0xB870, + 53757 - 44032: 0xB871, + 53758 - 44032: 0xB872, + 53759 - 44032: 0xB873, + 53760 - 44032: 0xB874, + 53761 - 44032: 0xB875, + 53762 - 44032: 0xB876, + 53763 - 44032: 0xB877, + 53764 - 44032: 0xB878, + 53765 - 44032: 0xB879, + 53766 - 44032: 0xB87A, + 53767 - 44032: 0xC5F2, + 53768 - 44032: 0xB881, + 53769 - 44032: 0xC5F3, + 53770 - 44032: 0xB882, + 53771 - 44032: 0xB883, + 53772 - 44032: 0xB884, + 53773 - 44032: 0xB885, + 53774 - 44032: 0xB886, + 53775 - 44032: 0xB887, + 53776 - 44032: 0xC5F4, + 53777 - 44032: 0xB888, + 53778 - 44032: 0xB889, + 53779 - 44032: 0xB88A, + 53780 - 44032: 0xB88B, + 53781 - 44032: 0xB88C, + 53782 - 44032: 0xB88D, + 53783 - 44032: 0xB88E, + 53784 - 44032: 0xB88F, + 53785 - 44032: 0xB890, + 53786 - 44032: 0xB891, + 53787 - 44032: 0xB892, + 53788 - 44032: 0xB893, + 53789 - 44032: 0xB894, + 53790 - 44032: 0xB895, + 53791 - 44032: 0xB896, + 53792 - 44032: 0xB897, + 53793 - 44032: 0xB898, + 53794 - 44032: 0xB899, + 53795 - 44032: 0xB89A, + 53796 - 44032: 0xB89B, + 53797 - 44032: 0xB89C, + 53798 - 44032: 0xB89D, + 53799 - 44032: 0xB89E, + 53800 - 44032: 0xB89F, + 53801 - 44032: 0xB8A0, + 53802 - 44032: 0xB941, + 53803 - 44032: 0xB942, + 53804 - 44032: 0xC5F5, + 53805 - 44032: 0xC5F6, + 53806 - 44032: 0xB943, + 53807 - 44032: 0xB944, + 53808 - 44032: 0xC5F7, + 53809 - 44032: 0xB945, + 53810 - 44032: 0xB946, + 53811 - 44032: 0xB947, + 53812 - 44032: 0xC5F8, + 53813 - 44032: 0xB948, + 53814 - 44032: 0xB949, + 53815 - 44032: 0xB94A, + 53816 - 44032: 0xB94B, + 53817 - 44032: 0xB94C, + 53818 - 44032: 0xB94D, + 53819 - 44032: 0xB94E, + 53820 - 44032: 0xC5F9, + 53821 - 44032: 0xC5FA, + 53822 - 44032: 0xB94F, + 53823 - 44032: 0xC5FB, + 53824 - 44032: 0xB950, + 53825 - 44032: 0xC5FC, + 53826 - 44032: 0xB951, + 53827 - 44032: 0xB952, + 53828 - 44032: 0xB953, + 53829 - 44032: 0xB954, + 53830 - 44032: 0xB955, + 53831 - 44032: 0xB956, + 53832 - 44032: 0xC5FD, + 53833 - 44032: 0xB957, + 53834 - 44032: 0xB958, + 53835 - 44032: 0xB959, + 53836 - 44032: 0xB95A, + 53837 - 44032: 0xB961, + 53838 - 44032: 0xB962, + 53839 - 44032: 0xB963, + 53840 - 44032: 0xB964, + 53841 - 44032: 0xB965, + 53842 - 44032: 0xB966, + 53843 - 44032: 0xB967, + 53844 - 44032: 0xB968, + 53845 - 44032: 0xB969, + 53846 - 44032: 0xB96A, + 53847 - 44032: 0xB96B, + 53848 - 44032: 0xB96C, + 53849 - 44032: 0xB96D, + 53850 - 44032: 0xB96E, + 53851 - 44032: 0xB96F, + 53852 - 44032: 0xC5FE, + 53853 - 44032: 0xB970, + 53854 - 44032: 0xB971, + 53855 - 44032: 0xB972, + 53856 - 44032: 0xB973, + 53857 - 44032: 0xB974, + 53858 - 44032: 0xB975, + 53859 - 44032: 0xB976, + 53860 - 44032: 0xC6A1, + 53861 - 44032: 0xB977, + 53862 - 44032: 0xB978, + 53863 - 44032: 0xB979, + 53864 - 44032: 0xB97A, + 53865 - 44032: 0xB981, + 53866 - 44032: 0xB982, + 53867 - 44032: 0xB983, + 53868 - 44032: 0xB984, + 53869 - 44032: 0xB985, + 53870 - 44032: 0xB986, + 53871 - 44032: 0xB987, + 53872 - 44032: 0xB988, + 53873 - 44032: 0xB989, + 53874 - 44032: 0xB98A, + 53875 - 44032: 0xB98B, + 53876 - 44032: 0xB98C, + 53877 - 44032: 0xB98D, + 53878 - 44032: 0xB98E, + 53879 - 44032: 0xB98F, + 53880 - 44032: 0xB990, + 53881 - 44032: 0xB991, + 53882 - 44032: 0xB992, + 53883 - 44032: 0xB993, + 53884 - 44032: 0xB994, + 53885 - 44032: 0xB995, + 53886 - 44032: 0xB996, + 53887 - 44032: 0xB997, + 53888 - 44032: 0xC6A2, + 53889 - 44032: 0xC6A3, + 53890 - 44032: 0xB998, + 53891 - 44032: 0xB999, + 53892 - 44032: 0xC6A4, + 53893 - 44032: 0xB99A, + 53894 - 44032: 0xB99B, + 53895 - 44032: 0xB99C, + 53896 - 44032: 0xC6A5, + 53897 - 44032: 0xB99D, + 53898 - 44032: 0xB99E, + 53899 - 44032: 0xB99F, + 53900 - 44032: 0xB9A0, + 53901 - 44032: 0xBA41, + 53902 - 44032: 0xBA42, + 53903 - 44032: 0xBA43, + 53904 - 44032: 0xC6A6, + 53905 - 44032: 0xC6A7, + 53906 - 44032: 0xBA44, + 53907 - 44032: 0xBA45, + 53908 - 44032: 0xBA46, + 53909 - 44032: 0xC6A8, + 53910 - 44032: 0xBA47, + 53911 - 44032: 0xBA48, + 53912 - 44032: 0xBA49, + 53913 - 44032: 0xBA4A, + 53914 - 44032: 0xBA4B, + 53915 - 44032: 0xBA4C, + 53916 - 44032: 0xC6A9, + 53917 - 44032: 0xBA4D, + 53918 - 44032: 0xBA4E, + 53919 - 44032: 0xBA4F, + 53920 - 44032: 0xC6AA, + 53921 - 44032: 0xBA50, + 53922 - 44032: 0xBA51, + 53923 - 44032: 0xBA52, + 53924 - 44032: 0xC6AB, + 53925 - 44032: 0xBA53, + 53926 - 44032: 0xBA54, + 53927 - 44032: 0xBA55, + 53928 - 44032: 0xBA56, + 53929 - 44032: 0xBA57, + 53930 - 44032: 0xBA58, + 53931 - 44032: 0xBA59, + 53932 - 44032: 0xC6AC, + 53933 - 44032: 0xBA5A, + 53934 - 44032: 0xBA61, + 53935 - 44032: 0xBA62, + 53936 - 44032: 0xBA63, + 53937 - 44032: 0xC6AD, + 53938 - 44032: 0xBA64, + 53939 - 44032: 0xBA65, + 53940 - 44032: 0xBA66, + 53941 - 44032: 0xBA67, + 53942 - 44032: 0xBA68, + 53943 - 44032: 0xBA69, + 53944 - 44032: 0xC6AE, + 53945 - 44032: 0xC6AF, + 53946 - 44032: 0xBA6A, + 53947 - 44032: 0xBA6B, + 53948 - 44032: 0xC6B0, + 53949 - 44032: 0xBA6C, + 53950 - 44032: 0xBA6D, + 53951 - 44032: 0xC6B1, + 53952 - 44032: 0xC6B2, + 53953 - 44032: 0xBA6E, + 53954 - 44032: 0xC6B3, + 53955 - 44032: 0xBA6F, + 53956 - 44032: 0xBA70, + 53957 - 44032: 0xBA71, + 53958 - 44032: 0xBA72, + 53959 - 44032: 0xBA73, + 53960 - 44032: 0xC6B4, + 53961 - 44032: 0xC6B5, + 53962 - 44032: 0xBA74, + 53963 - 44032: 0xC6B6, + 53964 - 44032: 0xBA75, + 53965 - 44032: 0xBA76, + 53966 - 44032: 0xBA77, + 53967 - 44032: 0xBA78, + 53968 - 44032: 0xBA79, + 53969 - 44032: 0xBA7A, + 53970 - 44032: 0xBA81, + 53971 - 44032: 0xBA82, + 53972 - 44032: 0xC6B7, + 53973 - 44032: 0xBA83, + 53974 - 44032: 0xBA84, + 53975 - 44032: 0xBA85, + 53976 - 44032: 0xC6B8, + 53977 - 44032: 0xBA86, + 53978 - 44032: 0xBA87, + 53979 - 44032: 0xBA88, + 53980 - 44032: 0xC6B9, + 53981 - 44032: 0xBA89, + 53982 - 44032: 0xBA8A, + 53983 - 44032: 0xBA8B, + 53984 - 44032: 0xBA8C, + 53985 - 44032: 0xBA8D, + 53986 - 44032: 0xBA8E, + 53987 - 44032: 0xBA8F, + 53988 - 44032: 0xC6BA, + 53989 - 44032: 0xC6BB, + 53990 - 44032: 0xBA90, + 53991 - 44032: 0xBA91, + 53992 - 44032: 0xBA92, + 53993 - 44032: 0xBA93, + 53994 - 44032: 0xBA94, + 53995 - 44032: 0xBA95, + 53996 - 44032: 0xBA96, + 53997 - 44032: 0xBA97, + 53998 - 44032: 0xBA98, + 53999 - 44032: 0xBA99, + 54000 - 44032: 0xC6BC, + 54001 - 44032: 0xC6BD, + 54002 - 44032: 0xBA9A, + 54003 - 44032: 0xBA9B, + 54004 - 44032: 0xC6BE, + 54005 - 44032: 0xBA9C, + 54006 - 44032: 0xBA9D, + 54007 - 44032: 0xBA9E, + 54008 - 44032: 0xC6BF, + 54009 - 44032: 0xBA9F, + 54010 - 44032: 0xBAA0, + 54011 - 44032: 0xBB41, + 54012 - 44032: 0xBB42, + 54013 - 44032: 0xBB43, + 54014 - 44032: 0xBB44, + 54015 - 44032: 0xBB45, + 54016 - 44032: 0xC6C0, + 54017 - 44032: 0xC6C1, + 54018 - 44032: 0xBB46, + 54019 - 44032: 0xC6C2, + 54020 - 44032: 0xBB47, + 54021 - 44032: 0xC6C3, + 54022 - 44032: 0xBB48, + 54023 - 44032: 0xBB49, + 54024 - 44032: 0xBB4A, + 54025 - 44032: 0xBB4B, + 54026 - 44032: 0xBB4C, + 54027 - 44032: 0xBB4D, + 54028 - 44032: 0xC6C4, + 54029 - 44032: 0xC6C5, + 54030 - 44032: 0xC6C6, + 54031 - 44032: 0xBB4E, + 54032 - 44032: 0xC6C7, + 54033 - 44032: 0xBB4F, + 54034 - 44032: 0xBB50, + 54035 - 44032: 0xBB51, + 54036 - 44032: 0xC6C8, + 54037 - 44032: 0xBB52, + 54038 - 44032: 0xC6C9, + 54039 - 44032: 0xBB53, + 54040 - 44032: 0xBB54, + 54041 - 44032: 0xBB55, + 54042 - 44032: 0xBB56, + 54043 - 44032: 0xBB57, + 54044 - 44032: 0xC6CA, + 54045 - 44032: 0xC6CB, + 54046 - 44032: 0xBB58, + 54047 - 44032: 0xC6CC, + 54048 - 44032: 0xC6CD, + 54049 - 44032: 0xC6CE, + 54050 - 44032: 0xBB59, + 54051 - 44032: 0xBB5A, + 54052 - 44032: 0xBB61, + 54053 - 44032: 0xC6CF, + 54054 - 44032: 0xBB62, + 54055 - 44032: 0xBB63, + 54056 - 44032: 0xC6D0, + 54057 - 44032: 0xC6D1, + 54058 - 44032: 0xBB64, + 54059 - 44032: 0xBB65, + 54060 - 44032: 0xC6D2, + 54061 - 44032: 0xBB66, + 54062 - 44032: 0xBB67, + 54063 - 44032: 0xBB68, + 54064 - 44032: 0xC6D3, + 54065 - 44032: 0xBB69, + 54066 - 44032: 0xBB6A, + 54067 - 44032: 0xBB6B, + 54068 - 44032: 0xBB6C, + 54069 - 44032: 0xBB6D, + 54070 - 44032: 0xBB6E, + 54071 - 44032: 0xBB6F, + 54072 - 44032: 0xC6D4, + 54073 - 44032: 0xC6D5, + 54074 - 44032: 0xBB70, + 54075 - 44032: 0xC6D6, + 54076 - 44032: 0xC6D7, + 54077 - 44032: 0xC6D8, + 54078 - 44032: 0xBB71, + 54079 - 44032: 0xBB72, + 54080 - 44032: 0xBB73, + 54081 - 44032: 0xBB74, + 54082 - 44032: 0xBB75, + 54083 - 44032: 0xBB76, + 54084 - 44032: 0xC6D9, + 54085 - 44032: 0xC6DA, + 54086 - 44032: 0xBB77, + 54087 - 44032: 0xBB78, + 54088 - 44032: 0xBB79, + 54089 - 44032: 0xBB7A, + 54090 - 44032: 0xBB81, + 54091 - 44032: 0xBB82, + 54092 - 44032: 0xBB83, + 54093 - 44032: 0xBB84, + 54094 - 44032: 0xBB85, + 54095 - 44032: 0xBB86, + 54096 - 44032: 0xBB87, + 54097 - 44032: 0xBB88, + 54098 - 44032: 0xBB89, + 54099 - 44032: 0xBB8A, + 54100 - 44032: 0xBB8B, + 54101 - 44032: 0xBB8C, + 54102 - 44032: 0xBB8D, + 54103 - 44032: 0xBB8E, + 54104 - 44032: 0xBB8F, + 54105 - 44032: 0xBB90, + 54106 - 44032: 0xBB91, + 54107 - 44032: 0xBB92, + 54108 - 44032: 0xBB93, + 54109 - 44032: 0xBB94, + 54110 - 44032: 0xBB95, + 54111 - 44032: 0xBB96, + 54112 - 44032: 0xBB97, + 54113 - 44032: 0xBB98, + 54114 - 44032: 0xBB99, + 54115 - 44032: 0xBB9A, + 54116 - 44032: 0xBB9B, + 54117 - 44032: 0xBB9C, + 54118 - 44032: 0xBB9D, + 54119 - 44032: 0xBB9E, + 54120 - 44032: 0xBB9F, + 54121 - 44032: 0xBBA0, + 54122 - 44032: 0xBC41, + 54123 - 44032: 0xBC42, + 54124 - 44032: 0xBC43, + 54125 - 44032: 0xBC44, + 54126 - 44032: 0xBC45, + 54127 - 44032: 0xBC46, + 54128 - 44032: 0xBC47, + 54129 - 44032: 0xBC48, + 54130 - 44032: 0xBC49, + 54131 - 44032: 0xBC4A, + 54132 - 44032: 0xBC4B, + 54133 - 44032: 0xBC4C, + 54134 - 44032: 0xBC4D, + 54135 - 44032: 0xBC4E, + 54136 - 44032: 0xBC4F, + 54137 - 44032: 0xBC50, + 54138 - 44032: 0xBC51, + 54139 - 44032: 0xBC52, + 54140 - 44032: 0xC6DB, + 54141 - 44032: 0xC6DC, + 54142 - 44032: 0xBC53, + 54143 - 44032: 0xBC54, + 54144 - 44032: 0xC6DD, + 54145 - 44032: 0xBC55, + 54146 - 44032: 0xBC56, + 54147 - 44032: 0xBC57, + 54148 - 44032: 0xC6DE, + 54149 - 44032: 0xBC58, + 54150 - 44032: 0xBC59, + 54151 - 44032: 0xBC5A, + 54152 - 44032: 0xBC61, + 54153 - 44032: 0xBC62, + 54154 - 44032: 0xBC63, + 54155 - 44032: 0xBC64, + 54156 - 44032: 0xC6DF, + 54157 - 44032: 0xC6E0, + 54158 - 44032: 0xBC65, + 54159 - 44032: 0xC6E1, + 54160 - 44032: 0xC6E2, + 54161 - 44032: 0xC6E3, + 54162 - 44032: 0xBC66, + 54163 - 44032: 0xBC67, + 54164 - 44032: 0xBC68, + 54165 - 44032: 0xBC69, + 54166 - 44032: 0xBC6A, + 54167 - 44032: 0xBC6B, + 54168 - 44032: 0xC6E4, + 54169 - 44032: 0xC6E5, + 54170 - 44032: 0xBC6C, + 54171 - 44032: 0xBC6D, + 54172 - 44032: 0xC6E6, + 54173 - 44032: 0xBC6E, + 54174 - 44032: 0xBC6F, + 54175 - 44032: 0xBC70, + 54176 - 44032: 0xC6E7, + 54177 - 44032: 0xBC71, + 54178 - 44032: 0xBC72, + 54179 - 44032: 0xBC73, + 54180 - 44032: 0xBC74, + 54181 - 44032: 0xBC75, + 54182 - 44032: 0xBC76, + 54183 - 44032: 0xBC77, + 54184 - 44032: 0xC6E8, + 54185 - 44032: 0xC6E9, + 54186 - 44032: 0xBC78, + 54187 - 44032: 0xC6EA, + 54188 - 44032: 0xBC79, + 54189 - 44032: 0xC6EB, + 54190 - 44032: 0xBC7A, + 54191 - 44032: 0xBC81, + 54192 - 44032: 0xBC82, + 54193 - 44032: 0xBC83, + 54194 - 44032: 0xBC84, + 54195 - 44032: 0xBC85, + 54196 - 44032: 0xC6EC, + 54197 - 44032: 0xBC86, + 54198 - 44032: 0xBC87, + 54199 - 44032: 0xBC88, + 54200 - 44032: 0xC6ED, + 54201 - 44032: 0xBC89, + 54202 - 44032: 0xBC8A, + 54203 - 44032: 0xBC8B, + 54204 - 44032: 0xC6EE, + 54205 - 44032: 0xBC8C, + 54206 - 44032: 0xBC8D, + 54207 - 44032: 0xBC8E, + 54208 - 44032: 0xBC8F, + 54209 - 44032: 0xBC90, + 54210 - 44032: 0xBC91, + 54211 - 44032: 0xBC92, + 54212 - 44032: 0xC6EF, + 54213 - 44032: 0xC6F0, + 54214 - 44032: 0xBC93, + 54215 - 44032: 0xBC94, + 54216 - 44032: 0xC6F1, + 54217 - 44032: 0xC6F2, + 54218 - 44032: 0xBC95, + 54219 - 44032: 0xBC96, + 54220 - 44032: 0xBC97, + 54221 - 44032: 0xBC98, + 54222 - 44032: 0xBC99, + 54223 - 44032: 0xBC9A, + 54224 - 44032: 0xC6F3, + 54225 - 44032: 0xBC9B, + 54226 - 44032: 0xBC9C, + 54227 - 44032: 0xBC9D, + 54228 - 44032: 0xBC9E, + 54229 - 44032: 0xBC9F, + 54230 - 44032: 0xBCA0, + 54231 - 44032: 0xBD41, + 54232 - 44032: 0xC6F4, + 54233 - 44032: 0xBD42, + 54234 - 44032: 0xBD43, + 54235 - 44032: 0xBD44, + 54236 - 44032: 0xBD45, + 54237 - 44032: 0xBD46, + 54238 - 44032: 0xBD47, + 54239 - 44032: 0xBD48, + 54240 - 44032: 0xBD49, + 54241 - 44032: 0xC6F5, + 54242 - 44032: 0xBD4A, + 54243 - 44032: 0xC6F6, + 54244 - 44032: 0xBD4B, + 54245 - 44032: 0xBD4C, + 54246 - 44032: 0xBD4D, + 54247 - 44032: 0xBD4E, + 54248 - 44032: 0xBD4F, + 54249 - 44032: 0xBD50, + 54250 - 44032: 0xBD51, + 54251 - 44032: 0xBD52, + 54252 - 44032: 0xC6F7, + 54253 - 44032: 0xC6F8, + 54254 - 44032: 0xBD53, + 54255 - 44032: 0xBD54, + 54256 - 44032: 0xC6F9, + 54257 - 44032: 0xBD55, + 54258 - 44032: 0xBD56, + 54259 - 44032: 0xBD57, + 54260 - 44032: 0xC6FA, + 54261 - 44032: 0xBD58, + 54262 - 44032: 0xBD59, + 54263 - 44032: 0xBD5A, + 54264 - 44032: 0xBD61, + 54265 - 44032: 0xBD62, + 54266 - 44032: 0xBD63, + 54267 - 44032: 0xBD64, + 54268 - 44032: 0xC6FB, + 54269 - 44032: 0xC6FC, + 54270 - 44032: 0xBD65, + 54271 - 44032: 0xC6FD, + 54272 - 44032: 0xBD66, + 54273 - 44032: 0xC6FE, + 54274 - 44032: 0xBD67, + 54275 - 44032: 0xBD68, + 54276 - 44032: 0xBD69, + 54277 - 44032: 0xBD6A, + 54278 - 44032: 0xBD6B, + 54279 - 44032: 0xBD6C, + 54280 - 44032: 0xC7A1, + 54281 - 44032: 0xBD6D, + 54282 - 44032: 0xBD6E, + 54283 - 44032: 0xBD6F, + 54284 - 44032: 0xBD70, + 54285 - 44032: 0xBD71, + 54286 - 44032: 0xBD72, + 54287 - 44032: 0xBD73, + 54288 - 44032: 0xBD74, + 54289 - 44032: 0xBD75, + 54290 - 44032: 0xBD76, + 54291 - 44032: 0xBD77, + 54292 - 44032: 0xBD78, + 54293 - 44032: 0xBD79, + 54294 - 44032: 0xBD7A, + 54295 - 44032: 0xBD81, + 54296 - 44032: 0xBD82, + 54297 - 44032: 0xBD83, + 54298 - 44032: 0xBD84, + 54299 - 44032: 0xBD85, + 54300 - 44032: 0xBD86, + 54301 - 44032: 0xC7A2, + 54302 - 44032: 0xBD87, + 54303 - 44032: 0xBD88, + 54304 - 44032: 0xBD89, + 54305 - 44032: 0xBD8A, + 54306 - 44032: 0xBD8B, + 54307 - 44032: 0xBD8C, + 54308 - 44032: 0xBD8D, + 54309 - 44032: 0xBD8E, + 54310 - 44032: 0xBD8F, + 54311 - 44032: 0xBD90, + 54312 - 44032: 0xBD91, + 54313 - 44032: 0xBD92, + 54314 - 44032: 0xBD93, + 54315 - 44032: 0xBD94, + 54316 - 44032: 0xBD95, + 54317 - 44032: 0xBD96, + 54318 - 44032: 0xBD97, + 54319 - 44032: 0xBD98, + 54320 - 44032: 0xBD99, + 54321 - 44032: 0xBD9A, + 54322 - 44032: 0xBD9B, + 54323 - 44032: 0xBD9C, + 54324 - 44032: 0xBD9D, + 54325 - 44032: 0xBD9E, + 54326 - 44032: 0xBD9F, + 54327 - 44032: 0xBDA0, + 54328 - 44032: 0xBE41, + 54329 - 44032: 0xBE42, + 54330 - 44032: 0xBE43, + 54331 - 44032: 0xBE44, + 54332 - 44032: 0xBE45, + 54333 - 44032: 0xBE46, + 54334 - 44032: 0xBE47, + 54335 - 44032: 0xBE48, + 54336 - 44032: 0xC7A3, + 54337 - 44032: 0xBE49, + 54338 - 44032: 0xBE4A, + 54339 - 44032: 0xBE4B, + 54340 - 44032: 0xC7A4, + 54341 - 44032: 0xBE4C, + 54342 - 44032: 0xBE4D, + 54343 - 44032: 0xBE4E, + 54344 - 44032: 0xBE4F, + 54345 - 44032: 0xBE50, + 54346 - 44032: 0xBE51, + 54347 - 44032: 0xBE52, + 54348 - 44032: 0xBE53, + 54349 - 44032: 0xBE54, + 54350 - 44032: 0xBE55, + 54351 - 44032: 0xBE56, + 54352 - 44032: 0xBE57, + 54353 - 44032: 0xBE58, + 54354 - 44032: 0xBE59, + 54355 - 44032: 0xBE5A, + 54356 - 44032: 0xBE61, + 54357 - 44032: 0xBE62, + 54358 - 44032: 0xBE63, + 54359 - 44032: 0xBE64, + 54360 - 44032: 0xBE65, + 54361 - 44032: 0xBE66, + 54362 - 44032: 0xBE67, + 54363 - 44032: 0xBE68, + 54364 - 44032: 0xC7A5, + 54365 - 44032: 0xBE69, + 54366 - 44032: 0xBE6A, + 54367 - 44032: 0xBE6B, + 54368 - 44032: 0xC7A6, + 54369 - 44032: 0xBE6C, + 54370 - 44032: 0xBE6D, + 54371 - 44032: 0xBE6E, + 54372 - 44032: 0xC7A7, + 54373 - 44032: 0xBE6F, + 54374 - 44032: 0xBE70, + 54375 - 44032: 0xBE71, + 54376 - 44032: 0xBE72, + 54377 - 44032: 0xBE73, + 54378 - 44032: 0xBE74, + 54379 - 44032: 0xBE75, + 54380 - 44032: 0xBE76, + 54381 - 44032: 0xC7A8, + 54382 - 44032: 0xBE77, + 54383 - 44032: 0xC7A9, + 54384 - 44032: 0xBE78, + 54385 - 44032: 0xBE79, + 54386 - 44032: 0xBE7A, + 54387 - 44032: 0xBE81, + 54388 - 44032: 0xBE82, + 54389 - 44032: 0xBE83, + 54390 - 44032: 0xBE84, + 54391 - 44032: 0xBE85, + 54392 - 44032: 0xC7AA, + 54393 - 44032: 0xC7AB, + 54394 - 44032: 0xBE86, + 54395 - 44032: 0xBE87, + 54396 - 44032: 0xC7AC, + 54397 - 44032: 0xBE88, + 54398 - 44032: 0xBE89, + 54399 - 44032: 0xC7AD, + 54400 - 44032: 0xC7AE, + 54401 - 44032: 0xBE8A, + 54402 - 44032: 0xC7AF, + 54403 - 44032: 0xBE8B, + 54404 - 44032: 0xBE8C, + 54405 - 44032: 0xBE8D, + 54406 - 44032: 0xBE8E, + 54407 - 44032: 0xBE8F, + 54408 - 44032: 0xC7B0, + 54409 - 44032: 0xC7B1, + 54410 - 44032: 0xBE90, + 54411 - 44032: 0xC7B2, + 54412 - 44032: 0xBE91, + 54413 - 44032: 0xC7B3, + 54414 - 44032: 0xBE92, + 54415 - 44032: 0xBE93, + 54416 - 44032: 0xBE94, + 54417 - 44032: 0xBE95, + 54418 - 44032: 0xBE96, + 54419 - 44032: 0xBE97, + 54420 - 44032: 0xC7B4, + 54421 - 44032: 0xBE98, + 54422 - 44032: 0xBE99, + 54423 - 44032: 0xBE9A, + 54424 - 44032: 0xBE9B, + 54425 - 44032: 0xBE9C, + 54426 - 44032: 0xBE9D, + 54427 - 44032: 0xBE9E, + 54428 - 44032: 0xBE9F, + 54429 - 44032: 0xBEA0, + 54430 - 44032: 0xBF41, + 54431 - 44032: 0xBF42, + 54432 - 44032: 0xBF43, + 54433 - 44032: 0xBF44, + 54434 - 44032: 0xBF45, + 54435 - 44032: 0xBF46, + 54436 - 44032: 0xBF47, + 54437 - 44032: 0xBF48, + 54438 - 44032: 0xBF49, + 54439 - 44032: 0xBF4A, + 54440 - 44032: 0xBF4B, + 54441 - 44032: 0xC7B5, + 54442 - 44032: 0xBF4C, + 54443 - 44032: 0xBF4D, + 54444 - 44032: 0xBF4E, + 54445 - 44032: 0xBF4F, + 54446 - 44032: 0xBF50, + 54447 - 44032: 0xBF51, + 54448 - 44032: 0xBF52, + 54449 - 44032: 0xBF53, + 54450 - 44032: 0xBF54, + 54451 - 44032: 0xBF55, + 54452 - 44032: 0xBF56, + 54453 - 44032: 0xBF57, + 54454 - 44032: 0xBF58, + 54455 - 44032: 0xBF59, + 54456 - 44032: 0xBF5A, + 54457 - 44032: 0xBF61, + 54458 - 44032: 0xBF62, + 54459 - 44032: 0xBF63, + 54460 - 44032: 0xBF64, + 54461 - 44032: 0xBF65, + 54462 - 44032: 0xBF66, + 54463 - 44032: 0xBF67, + 54464 - 44032: 0xBF68, + 54465 - 44032: 0xBF69, + 54466 - 44032: 0xBF6A, + 54467 - 44032: 0xBF6B, + 54468 - 44032: 0xBF6C, + 54469 - 44032: 0xBF6D, + 54470 - 44032: 0xBF6E, + 54471 - 44032: 0xBF6F, + 54472 - 44032: 0xBF70, + 54473 - 44032: 0xBF71, + 54474 - 44032: 0xBF72, + 54475 - 44032: 0xBF73, + 54476 - 44032: 0xC7B6, + 54477 - 44032: 0xBF74, + 54478 - 44032: 0xBF75, + 54479 - 44032: 0xBF76, + 54480 - 44032: 0xC7B7, + 54481 - 44032: 0xBF77, + 54482 - 44032: 0xBF78, + 54483 - 44032: 0xBF79, + 54484 - 44032: 0xC7B8, + 54485 - 44032: 0xBF7A, + 54486 - 44032: 0xBF81, + 54487 - 44032: 0xBF82, + 54488 - 44032: 0xBF83, + 54489 - 44032: 0xBF84, + 54490 - 44032: 0xBF85, + 54491 - 44032: 0xBF86, + 54492 - 44032: 0xC7B9, + 54493 - 44032: 0xBF87, + 54494 - 44032: 0xBF88, + 54495 - 44032: 0xC7BA, + 54496 - 44032: 0xBF89, + 54497 - 44032: 0xBF8A, + 54498 - 44032: 0xBF8B, + 54499 - 44032: 0xBF8C, + 54500 - 44032: 0xBF8D, + 54501 - 44032: 0xBF8E, + 54502 - 44032: 0xBF8F, + 54503 - 44032: 0xBF90, + 54504 - 44032: 0xC7BB, + 54505 - 44032: 0xBF91, + 54506 - 44032: 0xBF92, + 54507 - 44032: 0xBF93, + 54508 - 44032: 0xC7BC, + 54509 - 44032: 0xBF94, + 54510 - 44032: 0xBF95, + 54511 - 44032: 0xBF96, + 54512 - 44032: 0xC7BD, + 54513 - 44032: 0xBF97, + 54514 - 44032: 0xBF98, + 54515 - 44032: 0xBF99, + 54516 - 44032: 0xBF9A, + 54517 - 44032: 0xBF9B, + 54518 - 44032: 0xBF9C, + 54519 - 44032: 0xBF9D, + 54520 - 44032: 0xC7BE, + 54521 - 44032: 0xBF9E, + 54522 - 44032: 0xBF9F, + 54523 - 44032: 0xC7BF, + 54524 - 44032: 0xBFA0, + 54525 - 44032: 0xC7C0, + 54526 - 44032: 0xC041, + 54527 - 44032: 0xC042, + 54528 - 44032: 0xC043, + 54529 - 44032: 0xC044, + 54530 - 44032: 0xC045, + 54531 - 44032: 0xC046, + 54532 - 44032: 0xC7C1, + 54533 - 44032: 0xC047, + 54534 - 44032: 0xC048, + 54535 - 44032: 0xC049, + 54536 - 44032: 0xC7C2, + 54537 - 44032: 0xC04A, + 54538 - 44032: 0xC04B, + 54539 - 44032: 0xC04C, + 54540 - 44032: 0xC7C3, + 54541 - 44032: 0xC04D, + 54542 - 44032: 0xC04E, + 54543 - 44032: 0xC04F, + 54544 - 44032: 0xC050, + 54545 - 44032: 0xC051, + 54546 - 44032: 0xC052, + 54547 - 44032: 0xC053, + 54548 - 44032: 0xC7C4, + 54549 - 44032: 0xC7C5, + 54550 - 44032: 0xC054, + 54551 - 44032: 0xC7C6, + 54552 - 44032: 0xC055, + 54553 - 44032: 0xC056, + 54554 - 44032: 0xC057, + 54555 - 44032: 0xC058, + 54556 - 44032: 0xC059, + 54557 - 44032: 0xC05A, + 54558 - 44032: 0xC061, + 54559 - 44032: 0xC062, + 54560 - 44032: 0xC063, + 54561 - 44032: 0xC064, + 54562 - 44032: 0xC065, + 54563 - 44032: 0xC066, + 54564 - 44032: 0xC067, + 54565 - 44032: 0xC068, + 54566 - 44032: 0xC069, + 54567 - 44032: 0xC06A, + 54568 - 44032: 0xC06B, + 54569 - 44032: 0xC06C, + 54570 - 44032: 0xC06D, + 54571 - 44032: 0xC06E, + 54572 - 44032: 0xC06F, + 54573 - 44032: 0xC070, + 54574 - 44032: 0xC071, + 54575 - 44032: 0xC072, + 54576 - 44032: 0xC073, + 54577 - 44032: 0xC074, + 54578 - 44032: 0xC075, + 54579 - 44032: 0xC076, + 54580 - 44032: 0xC077, + 54581 - 44032: 0xC078, + 54582 - 44032: 0xC079, + 54583 - 44032: 0xC07A, + 54584 - 44032: 0xC081, + 54585 - 44032: 0xC082, + 54586 - 44032: 0xC083, + 54587 - 44032: 0xC084, + 54588 - 44032: 0xC7C7, + 54589 - 44032: 0xC7C8, + 54590 - 44032: 0xC085, + 54591 - 44032: 0xC086, + 54592 - 44032: 0xC7C9, + 54593 - 44032: 0xC087, + 54594 - 44032: 0xC088, + 54595 - 44032: 0xC089, + 54596 - 44032: 0xC7CA, + 54597 - 44032: 0xC08A, + 54598 - 44032: 0xC08B, + 54599 - 44032: 0xC08C, + 54600 - 44032: 0xC08D, + 54601 - 44032: 0xC08E, + 54602 - 44032: 0xC08F, + 54603 - 44032: 0xC090, + 54604 - 44032: 0xC7CB, + 54605 - 44032: 0xC7CC, + 54606 - 44032: 0xC091, + 54607 - 44032: 0xC7CD, + 54608 - 44032: 0xC092, + 54609 - 44032: 0xC7CE, + 54610 - 44032: 0xC093, + 54611 - 44032: 0xC094, + 54612 - 44032: 0xC095, + 54613 - 44032: 0xC096, + 54614 - 44032: 0xC097, + 54615 - 44032: 0xC098, + 54616 - 44032: 0xC7CF, + 54617 - 44032: 0xC7D0, + 54618 - 44032: 0xC099, + 54619 - 44032: 0xC09A, + 54620 - 44032: 0xC7D1, + 54621 - 44032: 0xC09B, + 54622 - 44032: 0xC09C, + 54623 - 44032: 0xC09D, + 54624 - 44032: 0xC7D2, + 54625 - 44032: 0xC09E, + 54626 - 44032: 0xC09F, + 54627 - 44032: 0xC0A0, + 54628 - 44032: 0xC141, + 54629 - 44032: 0xC7D3, + 54630 - 44032: 0xC142, + 54631 - 44032: 0xC143, + 54632 - 44032: 0xC7D4, + 54633 - 44032: 0xC7D5, + 54634 - 44032: 0xC144, + 54635 - 44032: 0xC7D6, + 54636 - 44032: 0xC145, + 54637 - 44032: 0xC7D7, + 54638 - 44032: 0xC146, + 54639 - 44032: 0xC147, + 54640 - 44032: 0xC148, + 54641 - 44032: 0xC149, + 54642 - 44032: 0xC14A, + 54643 - 44032: 0xC14B, + 54644 - 44032: 0xC7D8, + 54645 - 44032: 0xC7D9, + 54646 - 44032: 0xC14C, + 54647 - 44032: 0xC14D, + 54648 - 44032: 0xC7DA, + 54649 - 44032: 0xC14E, + 54650 - 44032: 0xC14F, + 54651 - 44032: 0xC150, + 54652 - 44032: 0xC7DB, + 54653 - 44032: 0xC151, + 54654 - 44032: 0xC152, + 54655 - 44032: 0xC153, + 54656 - 44032: 0xC154, + 54657 - 44032: 0xC155, + 54658 - 44032: 0xC156, + 54659 - 44032: 0xC157, + 54660 - 44032: 0xC7DC, + 54661 - 44032: 0xC7DD, + 54662 - 44032: 0xC158, + 54663 - 44032: 0xC7DE, + 54664 - 44032: 0xC7DF, + 54665 - 44032: 0xC7E0, + 54666 - 44032: 0xC159, + 54667 - 44032: 0xC15A, + 54668 - 44032: 0xC161, + 54669 - 44032: 0xC162, + 54670 - 44032: 0xC163, + 54671 - 44032: 0xC164, + 54672 - 44032: 0xC7E1, + 54673 - 44032: 0xC165, + 54674 - 44032: 0xC166, + 54675 - 44032: 0xC167, + 54676 - 44032: 0xC168, + 54677 - 44032: 0xC169, + 54678 - 44032: 0xC16A, + 54679 - 44032: 0xC16B, + 54680 - 44032: 0xC16C, + 54681 - 44032: 0xC16D, + 54682 - 44032: 0xC16E, + 54683 - 44032: 0xC16F, + 54684 - 44032: 0xC170, + 54685 - 44032: 0xC171, + 54686 - 44032: 0xC172, + 54687 - 44032: 0xC173, + 54688 - 44032: 0xC174, + 54689 - 44032: 0xC175, + 54690 - 44032: 0xC176, + 54691 - 44032: 0xC177, + 54692 - 44032: 0xC178, + 54693 - 44032: 0xC7E2, + 54694 - 44032: 0xC179, + 54695 - 44032: 0xC17A, + 54696 - 44032: 0xC181, + 54697 - 44032: 0xC182, + 54698 - 44032: 0xC183, + 54699 - 44032: 0xC184, + 54700 - 44032: 0xC185, + 54701 - 44032: 0xC186, + 54702 - 44032: 0xC187, + 54703 - 44032: 0xC188, + 54704 - 44032: 0xC189, + 54705 - 44032: 0xC18A, + 54706 - 44032: 0xC18B, + 54707 - 44032: 0xC18C, + 54708 - 44032: 0xC18D, + 54709 - 44032: 0xC18E, + 54710 - 44032: 0xC18F, + 54711 - 44032: 0xC190, + 54712 - 44032: 0xC191, + 54713 - 44032: 0xC192, + 54714 - 44032: 0xC193, + 54715 - 44032: 0xC194, + 54716 - 44032: 0xC195, + 54717 - 44032: 0xC196, + 54718 - 44032: 0xC197, + 54719 - 44032: 0xC198, + 54720 - 44032: 0xC199, + 54721 - 44032: 0xC19A, + 54722 - 44032: 0xC19B, + 54723 - 44032: 0xC19C, + 54724 - 44032: 0xC19D, + 54725 - 44032: 0xC19E, + 54726 - 44032: 0xC19F, + 54727 - 44032: 0xC1A0, + 54728 - 44032: 0xC7E3, + 54729 - 44032: 0xC7E4, + 54730 - 44032: 0xC241, + 54731 - 44032: 0xC242, + 54732 - 44032: 0xC7E5, + 54733 - 44032: 0xC243, + 54734 - 44032: 0xC244, + 54735 - 44032: 0xC245, + 54736 - 44032: 0xC7E6, + 54737 - 44032: 0xC246, + 54738 - 44032: 0xC7E7, + 54739 - 44032: 0xC247, + 54740 - 44032: 0xC248, + 54741 - 44032: 0xC249, + 54742 - 44032: 0xC24A, + 54743 - 44032: 0xC24B, + 54744 - 44032: 0xC7E8, + 54745 - 44032: 0xC7E9, + 54746 - 44032: 0xC24C, + 54747 - 44032: 0xC7EA, + 54748 - 44032: 0xC24D, + 54749 - 44032: 0xC7EB, + 54750 - 44032: 0xC24E, + 54751 - 44032: 0xC24F, + 54752 - 44032: 0xC250, + 54753 - 44032: 0xC251, + 54754 - 44032: 0xC252, + 54755 - 44032: 0xC253, + 54756 - 44032: 0xC7EC, + 54757 - 44032: 0xC7ED, + 54758 - 44032: 0xC254, + 54759 - 44032: 0xC255, + 54760 - 44032: 0xC7EE, + 54761 - 44032: 0xC256, + 54762 - 44032: 0xC257, + 54763 - 44032: 0xC258, + 54764 - 44032: 0xC7EF, + 54765 - 44032: 0xC259, + 54766 - 44032: 0xC25A, + 54767 - 44032: 0xC261, + 54768 - 44032: 0xC262, + 54769 - 44032: 0xC263, + 54770 - 44032: 0xC264, + 54771 - 44032: 0xC265, + 54772 - 44032: 0xC7F0, + 54773 - 44032: 0xC7F1, + 54774 - 44032: 0xC266, + 54775 - 44032: 0xC7F2, + 54776 - 44032: 0xC267, + 54777 - 44032: 0xC7F3, + 54778 - 44032: 0xC268, + 54779 - 44032: 0xC269, + 54780 - 44032: 0xC26A, + 54781 - 44032: 0xC26B, + 54782 - 44032: 0xC26C, + 54783 - 44032: 0xC26D, + 54784 - 44032: 0xC7F4, + 54785 - 44032: 0xC7F5, + 54786 - 44032: 0xC26E, + 54787 - 44032: 0xC26F, + 54788 - 44032: 0xC7F6, + 54789 - 44032: 0xC270, + 54790 - 44032: 0xC271, + 54791 - 44032: 0xC272, + 54792 - 44032: 0xC7F7, + 54793 - 44032: 0xC273, + 54794 - 44032: 0xC274, + 54795 - 44032: 0xC275, + 54796 - 44032: 0xC276, + 54797 - 44032: 0xC277, + 54798 - 44032: 0xC278, + 54799 - 44032: 0xC279, + 54800 - 44032: 0xC7F8, + 54801 - 44032: 0xC7F9, + 54802 - 44032: 0xC27A, + 54803 - 44032: 0xC7FA, + 54804 - 44032: 0xC7FB, + 54805 - 44032: 0xC7FC, + 54806 - 44032: 0xC281, + 54807 - 44032: 0xC282, + 54808 - 44032: 0xC283, + 54809 - 44032: 0xC284, + 54810 - 44032: 0xC285, + 54811 - 44032: 0xC286, + 54812 - 44032: 0xC7FD, + 54813 - 44032: 0xC287, + 54814 - 44032: 0xC288, + 54815 - 44032: 0xC289, + 54816 - 44032: 0xC7FE, + 54817 - 44032: 0xC28A, + 54818 - 44032: 0xC28B, + 54819 - 44032: 0xC28C, + 54820 - 44032: 0xC8A1, + 54821 - 44032: 0xC28D, + 54822 - 44032: 0xC28E, + 54823 - 44032: 0xC28F, + 54824 - 44032: 0xC290, + 54825 - 44032: 0xC291, + 54826 - 44032: 0xC292, + 54827 - 44032: 0xC293, + 54828 - 44032: 0xC294, + 54829 - 44032: 0xC8A2, + 54830 - 44032: 0xC295, + 54831 - 44032: 0xC296, + 54832 - 44032: 0xC297, + 54833 - 44032: 0xC298, + 54834 - 44032: 0xC299, + 54835 - 44032: 0xC29A, + 54836 - 44032: 0xC29B, + 54837 - 44032: 0xC29C, + 54838 - 44032: 0xC29D, + 54839 - 44032: 0xC29E, + 54840 - 44032: 0xC8A3, + 54841 - 44032: 0xC8A4, + 54842 - 44032: 0xC29F, + 54843 - 44032: 0xC2A0, + 54844 - 44032: 0xC8A5, + 54845 - 44032: 0xC341, + 54846 - 44032: 0xC342, + 54847 - 44032: 0xC343, + 54848 - 44032: 0xC8A6, + 54849 - 44032: 0xC344, + 54850 - 44032: 0xC345, + 54851 - 44032: 0xC346, + 54852 - 44032: 0xC347, + 54853 - 44032: 0xC8A7, + 54854 - 44032: 0xC348, + 54855 - 44032: 0xC349, + 54856 - 44032: 0xC8A8, + 54857 - 44032: 0xC8A9, + 54858 - 44032: 0xC34A, + 54859 - 44032: 0xC8AA, + 54860 - 44032: 0xC34B, + 54861 - 44032: 0xC8AB, + 54862 - 44032: 0xC34C, + 54863 - 44032: 0xC34D, + 54864 - 44032: 0xC34E, + 54865 - 44032: 0xC8AC, + 54866 - 44032: 0xC34F, + 54867 - 44032: 0xC350, + 54868 - 44032: 0xC8AD, + 54869 - 44032: 0xC8AE, + 54870 - 44032: 0xC351, + 54871 - 44032: 0xC352, + 54872 - 44032: 0xC8AF, + 54873 - 44032: 0xC353, + 54874 - 44032: 0xC354, + 54875 - 44032: 0xC355, + 54876 - 44032: 0xC8B0, + 54877 - 44032: 0xC356, + 54878 - 44032: 0xC357, + 54879 - 44032: 0xC358, + 54880 - 44032: 0xC359, + 54881 - 44032: 0xC35A, + 54882 - 44032: 0xC361, + 54883 - 44032: 0xC362, + 54884 - 44032: 0xC363, + 54885 - 44032: 0xC364, + 54886 - 44032: 0xC365, + 54887 - 44032: 0xC8B1, + 54888 - 44032: 0xC366, + 54889 - 44032: 0xC8B2, + 54890 - 44032: 0xC367, + 54891 - 44032: 0xC368, + 54892 - 44032: 0xC369, + 54893 - 44032: 0xC36A, + 54894 - 44032: 0xC36B, + 54895 - 44032: 0xC36C, + 54896 - 44032: 0xC8B3, + 54897 - 44032: 0xC8B4, + 54898 - 44032: 0xC36D, + 54899 - 44032: 0xC36E, + 54900 - 44032: 0xC8B5, + 54901 - 44032: 0xC36F, + 54902 - 44032: 0xC370, + 54903 - 44032: 0xC371, + 54904 - 44032: 0xC372, + 54905 - 44032: 0xC373, + 54906 - 44032: 0xC374, + 54907 - 44032: 0xC375, + 54908 - 44032: 0xC376, + 54909 - 44032: 0xC377, + 54910 - 44032: 0xC378, + 54911 - 44032: 0xC379, + 54912 - 44032: 0xC37A, + 54913 - 44032: 0xC381, + 54914 - 44032: 0xC382, + 54915 - 44032: 0xC8B6, + 54916 - 44032: 0xC383, + 54917 - 44032: 0xC8B7, + 54918 - 44032: 0xC384, + 54919 - 44032: 0xC385, + 54920 - 44032: 0xC386, + 54921 - 44032: 0xC387, + 54922 - 44032: 0xC388, + 54923 - 44032: 0xC389, + 54924 - 44032: 0xC8B8, + 54925 - 44032: 0xC8B9, + 54926 - 44032: 0xC38A, + 54927 - 44032: 0xC38B, + 54928 - 44032: 0xC8BA, + 54929 - 44032: 0xC38C, + 54930 - 44032: 0xC38D, + 54931 - 44032: 0xC38E, + 54932 - 44032: 0xC8BB, + 54933 - 44032: 0xC38F, + 54934 - 44032: 0xC390, + 54935 - 44032: 0xC391, + 54936 - 44032: 0xC392, + 54937 - 44032: 0xC393, + 54938 - 44032: 0xC394, + 54939 - 44032: 0xC395, + 54940 - 44032: 0xC396, + 54941 - 44032: 0xC8BC, + 54942 - 44032: 0xC397, + 54943 - 44032: 0xC8BD, + 54944 - 44032: 0xC398, + 54945 - 44032: 0xC8BE, + 54946 - 44032: 0xC399, + 54947 - 44032: 0xC39A, + 54948 - 44032: 0xC39B, + 54949 - 44032: 0xC39C, + 54950 - 44032: 0xC39D, + 54951 - 44032: 0xC39E, + 54952 - 44032: 0xC8BF, + 54953 - 44032: 0xC39F, + 54954 - 44032: 0xC3A0, + 54955 - 44032: 0xC441, + 54956 - 44032: 0xC8C0, + 54957 - 44032: 0xC442, + 54958 - 44032: 0xC443, + 54959 - 44032: 0xC444, + 54960 - 44032: 0xC8C1, + 54961 - 44032: 0xC445, + 54962 - 44032: 0xC446, + 54963 - 44032: 0xC447, + 54964 - 44032: 0xC448, + 54965 - 44032: 0xC449, + 54966 - 44032: 0xC44A, + 54967 - 44032: 0xC44B, + 54968 - 44032: 0xC44C, + 54969 - 44032: 0xC8C2, + 54970 - 44032: 0xC44D, + 54971 - 44032: 0xC8C3, + 54972 - 44032: 0xC44E, + 54973 - 44032: 0xC44F, + 54974 - 44032: 0xC450, + 54975 - 44032: 0xC451, + 54976 - 44032: 0xC452, + 54977 - 44032: 0xC453, + 54978 - 44032: 0xC454, + 54979 - 44032: 0xC455, + 54980 - 44032: 0xC8C4, + 54981 - 44032: 0xC8C5, + 54982 - 44032: 0xC456, + 54983 - 44032: 0xC457, + 54984 - 44032: 0xC8C6, + 54985 - 44032: 0xC458, + 54986 - 44032: 0xC459, + 54987 - 44032: 0xC45A, + 54988 - 44032: 0xC8C7, + 54989 - 44032: 0xC461, + 54990 - 44032: 0xC462, + 54991 - 44032: 0xC463, + 54992 - 44032: 0xC464, + 54993 - 44032: 0xC8C8, + 54994 - 44032: 0xC465, + 54995 - 44032: 0xC466, + 54996 - 44032: 0xC8C9, + 54997 - 44032: 0xC467, + 54998 - 44032: 0xC468, + 54999 - 44032: 0xC8CA, + 55000 - 44032: 0xC469, + 55001 - 44032: 0xC8CB, + 55002 - 44032: 0xC46A, + 55003 - 44032: 0xC46B, + 55004 - 44032: 0xC46C, + 55005 - 44032: 0xC46D, + 55006 - 44032: 0xC46E, + 55007 - 44032: 0xC46F, + 55008 - 44032: 0xC8CC, + 55009 - 44032: 0xC470, + 55010 - 44032: 0xC471, + 55011 - 44032: 0xC472, + 55012 - 44032: 0xC8CD, + 55013 - 44032: 0xC473, + 55014 - 44032: 0xC474, + 55015 - 44032: 0xC475, + 55016 - 44032: 0xC8CE, + 55017 - 44032: 0xC476, + 55018 - 44032: 0xC477, + 55019 - 44032: 0xC478, + 55020 - 44032: 0xC479, + 55021 - 44032: 0xC47A, + 55022 - 44032: 0xC481, + 55023 - 44032: 0xC482, + 55024 - 44032: 0xC8CF, + 55025 - 44032: 0xC483, + 55026 - 44032: 0xC484, + 55027 - 44032: 0xC485, + 55028 - 44032: 0xC486, + 55029 - 44032: 0xC8D0, + 55030 - 44032: 0xC487, + 55031 - 44032: 0xC488, + 55032 - 44032: 0xC489, + 55033 - 44032: 0xC48A, + 55034 - 44032: 0xC48B, + 55035 - 44032: 0xC48C, + 55036 - 44032: 0xC8D1, + 55037 - 44032: 0xC8D2, + 55038 - 44032: 0xC48D, + 55039 - 44032: 0xC48E, + 55040 - 44032: 0xC8D3, + 55041 - 44032: 0xC48F, + 55042 - 44032: 0xC490, + 55043 - 44032: 0xC491, + 55044 - 44032: 0xC8D4, + 55045 - 44032: 0xC492, + 55046 - 44032: 0xC493, + 55047 - 44032: 0xC494, + 55048 - 44032: 0xC495, + 55049 - 44032: 0xC496, + 55050 - 44032: 0xC497, + 55051 - 44032: 0xC498, + 55052 - 44032: 0xC499, + 55053 - 44032: 0xC49A, + 55054 - 44032: 0xC49B, + 55055 - 44032: 0xC49C, + 55056 - 44032: 0xC49D, + 55057 - 44032: 0xC8D5, + 55058 - 44032: 0xC49E, + 55059 - 44032: 0xC49F, + 55060 - 44032: 0xC4A0, + 55061 - 44032: 0xC541, + 55062 - 44032: 0xC542, + 55063 - 44032: 0xC543, + 55064 - 44032: 0xC8D6, + 55065 - 44032: 0xC8D7, + 55066 - 44032: 0xC544, + 55067 - 44032: 0xC545, + 55068 - 44032: 0xC8D8, + 55069 - 44032: 0xC546, + 55070 - 44032: 0xC547, + 55071 - 44032: 0xC548, + 55072 - 44032: 0xC8D9, + 55073 - 44032: 0xC549, + 55074 - 44032: 0xC54A, + 55075 - 44032: 0xC54B, + 55076 - 44032: 0xC54C, + 55077 - 44032: 0xC54D, + 55078 - 44032: 0xC54E, + 55079 - 44032: 0xC54F, + 55080 - 44032: 0xC8DA, + 55081 - 44032: 0xC8DB, + 55082 - 44032: 0xC550, + 55083 - 44032: 0xC8DC, + 55084 - 44032: 0xC551, + 55085 - 44032: 0xC8DD, + 55086 - 44032: 0xC552, + 55087 - 44032: 0xC553, + 55088 - 44032: 0xC554, + 55089 - 44032: 0xC555, + 55090 - 44032: 0xC556, + 55091 - 44032: 0xC557, + 55092 - 44032: 0xC8DE, + 55093 - 44032: 0xC8DF, + 55094 - 44032: 0xC558, + 55095 - 44032: 0xC559, + 55096 - 44032: 0xC8E0, + 55097 - 44032: 0xC55A, + 55098 - 44032: 0xC561, + 55099 - 44032: 0xC562, + 55100 - 44032: 0xC8E1, + 55101 - 44032: 0xC563, + 55102 - 44032: 0xC564, + 55103 - 44032: 0xC565, + 55104 - 44032: 0xC566, + 55105 - 44032: 0xC567, + 55106 - 44032: 0xC568, + 55107 - 44032: 0xC569, + 55108 - 44032: 0xC8E2, + 55109 - 44032: 0xC56A, + 55110 - 44032: 0xC56B, + 55111 - 44032: 0xC8E3, + 55112 - 44032: 0xC56C, + 55113 - 44032: 0xC8E4, + 55114 - 44032: 0xC56D, + 55115 - 44032: 0xC56E, + 55116 - 44032: 0xC56F, + 55117 - 44032: 0xC570, + 55118 - 44032: 0xC571, + 55119 - 44032: 0xC572, + 55120 - 44032: 0xC8E5, + 55121 - 44032: 0xC8E6, + 55122 - 44032: 0xC573, + 55123 - 44032: 0xC574, + 55124 - 44032: 0xC8E7, + 55125 - 44032: 0xC575, + 55126 - 44032: 0xC8E8, + 55127 - 44032: 0xC8E9, + 55128 - 44032: 0xC8EA, + 55129 - 44032: 0xC8EB, + 55130 - 44032: 0xC576, + 55131 - 44032: 0xC577, + 55132 - 44032: 0xC578, + 55133 - 44032: 0xC579, + 55134 - 44032: 0xC57A, + 55135 - 44032: 0xC581, + 55136 - 44032: 0xC8EC, + 55137 - 44032: 0xC8ED, + 55138 - 44032: 0xC582, + 55139 - 44032: 0xC8EE, + 55140 - 44032: 0xC583, + 55141 - 44032: 0xC8EF, + 55142 - 44032: 0xC584, + 55143 - 44032: 0xC585, + 55144 - 44032: 0xC586, + 55145 - 44032: 0xC8F0, + 55146 - 44032: 0xC587, + 55147 - 44032: 0xC588, + 55148 - 44032: 0xC8F1, + 55149 - 44032: 0xC589, + 55150 - 44032: 0xC58A, + 55151 - 44032: 0xC58B, + 55152 - 44032: 0xC8F2, + 55153 - 44032: 0xC58C, + 55154 - 44032: 0xC58D, + 55155 - 44032: 0xC58E, + 55156 - 44032: 0xC8F3, + 55157 - 44032: 0xC58F, + 55158 - 44032: 0xC590, + 55159 - 44032: 0xC591, + 55160 - 44032: 0xC592, + 55161 - 44032: 0xC593, + 55162 - 44032: 0xC594, + 55163 - 44032: 0xC595, + 55164 - 44032: 0xC8F4, + 55165 - 44032: 0xC8F5, + 55166 - 44032: 0xC596, + 55167 - 44032: 0xC597, + 55168 - 44032: 0xC598, + 55169 - 44032: 0xC8F6, + 55170 - 44032: 0xC599, + 55171 - 44032: 0xC59A, + 55172 - 44032: 0xC59B, + 55173 - 44032: 0xC59C, + 55174 - 44032: 0xC59D, + 55175 - 44032: 0xC59E, + 55176 - 44032: 0xC8F7, + 55177 - 44032: 0xC8F8, + 55178 - 44032: 0xC59F, + 55179 - 44032: 0xC5A0, + 55180 - 44032: 0xC8F9, + 55181 - 44032: 0xC641, + 55182 - 44032: 0xC642, + 55183 - 44032: 0xC643, + 55184 - 44032: 0xC8FA, + 55185 - 44032: 0xC644, + 55186 - 44032: 0xC645, + 55187 - 44032: 0xC646, + 55188 - 44032: 0xC647, + 55189 - 44032: 0xC648, + 55190 - 44032: 0xC649, + 55191 - 44032: 0xC64A, + 55192 - 44032: 0xC8FB, + 55193 - 44032: 0xC8FC, + 55194 - 44032: 0xC64B, + 55195 - 44032: 0xC8FD, + 55196 - 44032: 0xC64C, + 55197 - 44032: 0xC8FE, + 55198 - 44032: 0xC64D, + 55199 - 44032: 0xC64E, + 55200 - 44032: 0xC64F, + 55201 - 44032: 0xC650, + 55202 - 44032: 0xC651, + 55203 - 44032: 0xC652, +} + +const encode2Low, encode2High = 8213, 9838 + +var encode2 = [...]uint16{ + 8213 - 8213: 0xA1AA, + 8216 - 8213: 0xA1AE, + 8217 - 8213: 0xA1AF, + 8220 - 8213: 0xA1B0, + 8221 - 8213: 0xA1B1, + 8224 - 8213: 0xA2D3, + 8225 - 8213: 0xA2D4, + 8229 - 8213: 0xA1A5, + 8230 - 8213: 0xA1A6, + 8240 - 8213: 0xA2B6, + 8242 - 8213: 0xA1C7, + 8243 - 8213: 0xA1C8, + 8251 - 8213: 0xA1D8, + 8308 - 8213: 0xA9F9, + 8319 - 8213: 0xA9FA, + 8321 - 8213: 0xA9FB, + 8322 - 8213: 0xA9FC, + 8323 - 8213: 0xA9FD, + 8324 - 8213: 0xA9FE, + 8364 - 8213: 0xA2E6, + 8451 - 8213: 0xA1C9, + 8457 - 8213: 0xA2B5, + 8467 - 8213: 0xA7A4, + 8470 - 8213: 0xA2E0, + 8481 - 8213: 0xA2E5, + 8482 - 8213: 0xA2E2, + 8486 - 8213: 0xA7D9, + 8491 - 8213: 0xA1CA, + 8531 - 8213: 0xA8F7, + 8532 - 8213: 0xA8F8, + 8539 - 8213: 0xA8FB, + 8540 - 8213: 0xA8FC, + 8541 - 8213: 0xA8FD, + 8542 - 8213: 0xA8FE, + 8544 - 8213: 0xA5B0, + 8545 - 8213: 0xA5B1, + 8546 - 8213: 0xA5B2, + 8547 - 8213: 0xA5B3, + 8548 - 8213: 0xA5B4, + 8549 - 8213: 0xA5B5, + 8550 - 8213: 0xA5B6, + 8551 - 8213: 0xA5B7, + 8552 - 8213: 0xA5B8, + 8553 - 8213: 0xA5B9, + 8560 - 8213: 0xA5A1, + 8561 - 8213: 0xA5A2, + 8562 - 8213: 0xA5A3, + 8563 - 8213: 0xA5A4, + 8564 - 8213: 0xA5A5, + 8565 - 8213: 0xA5A6, + 8566 - 8213: 0xA5A7, + 8567 - 8213: 0xA5A8, + 8568 - 8213: 0xA5A9, + 8569 - 8213: 0xA5AA, + 8592 - 8213: 0xA1E7, + 8593 - 8213: 0xA1E8, + 8594 - 8213: 0xA1E6, + 8595 - 8213: 0xA1E9, + 8596 - 8213: 0xA1EA, + 8597 - 8213: 0xA2D5, + 8598 - 8213: 0xA2D8, + 8599 - 8213: 0xA2D6, + 8600 - 8213: 0xA2D9, + 8601 - 8213: 0xA2D7, + 8658 - 8213: 0xA2A1, + 8660 - 8213: 0xA2A2, + 8704 - 8213: 0xA2A3, + 8706 - 8213: 0xA1D3, + 8707 - 8213: 0xA2A4, + 8711 - 8213: 0xA1D4, + 8712 - 8213: 0xA1F4, + 8715 - 8213: 0xA1F5, + 8719 - 8213: 0xA2B3, + 8721 - 8213: 0xA2B2, + 8730 - 8213: 0xA1EE, + 8733 - 8213: 0xA1F0, + 8734 - 8213: 0xA1C4, + 8736 - 8213: 0xA1D0, + 8741 - 8213: 0xA1AB, + 8743 - 8213: 0xA1FC, + 8744 - 8213: 0xA1FD, + 8745 - 8213: 0xA1FB, + 8746 - 8213: 0xA1FA, + 8747 - 8213: 0xA1F2, + 8748 - 8213: 0xA1F3, + 8750 - 8213: 0xA2B1, + 8756 - 8213: 0xA1C5, + 8757 - 8213: 0xA1F1, + 8764 - 8213: 0xA1AD, + 8765 - 8213: 0xA1EF, + 8786 - 8213: 0xA1D6, + 8800 - 8213: 0xA1C1, + 8801 - 8213: 0xA1D5, + 8804 - 8213: 0xA1C2, + 8805 - 8213: 0xA1C3, + 8810 - 8213: 0xA1EC, + 8811 - 8213: 0xA1ED, + 8834 - 8213: 0xA1F8, + 8835 - 8213: 0xA1F9, + 8838 - 8213: 0xA1F6, + 8839 - 8213: 0xA1F7, + 8857 - 8213: 0xA2C1, + 8869 - 8213: 0xA1D1, + 8978 - 8213: 0xA1D2, + 9312 - 8213: 0xA8E7, + 9313 - 8213: 0xA8E8, + 9314 - 8213: 0xA8E9, + 9315 - 8213: 0xA8EA, + 9316 - 8213: 0xA8EB, + 9317 - 8213: 0xA8EC, + 9318 - 8213: 0xA8ED, + 9319 - 8213: 0xA8EE, + 9320 - 8213: 0xA8EF, + 9321 - 8213: 0xA8F0, + 9322 - 8213: 0xA8F1, + 9323 - 8213: 0xA8F2, + 9324 - 8213: 0xA8F3, + 9325 - 8213: 0xA8F4, + 9326 - 8213: 0xA8F5, + 9332 - 8213: 0xA9E7, + 9333 - 8213: 0xA9E8, + 9334 - 8213: 0xA9E9, + 9335 - 8213: 0xA9EA, + 9336 - 8213: 0xA9EB, + 9337 - 8213: 0xA9EC, + 9338 - 8213: 0xA9ED, + 9339 - 8213: 0xA9EE, + 9340 - 8213: 0xA9EF, + 9341 - 8213: 0xA9F0, + 9342 - 8213: 0xA9F1, + 9343 - 8213: 0xA9F2, + 9344 - 8213: 0xA9F3, + 9345 - 8213: 0xA9F4, + 9346 - 8213: 0xA9F5, + 9372 - 8213: 0xA9CD, + 9373 - 8213: 0xA9CE, + 9374 - 8213: 0xA9CF, + 9375 - 8213: 0xA9D0, + 9376 - 8213: 0xA9D1, + 9377 - 8213: 0xA9D2, + 9378 - 8213: 0xA9D3, + 9379 - 8213: 0xA9D4, + 9380 - 8213: 0xA9D5, + 9381 - 8213: 0xA9D6, + 9382 - 8213: 0xA9D7, + 9383 - 8213: 0xA9D8, + 9384 - 8213: 0xA9D9, + 9385 - 8213: 0xA9DA, + 9386 - 8213: 0xA9DB, + 9387 - 8213: 0xA9DC, + 9388 - 8213: 0xA9DD, + 9389 - 8213: 0xA9DE, + 9390 - 8213: 0xA9DF, + 9391 - 8213: 0xA9E0, + 9392 - 8213: 0xA9E1, + 9393 - 8213: 0xA9E2, + 9394 - 8213: 0xA9E3, + 9395 - 8213: 0xA9E4, + 9396 - 8213: 0xA9E5, + 9397 - 8213: 0xA9E6, + 9424 - 8213: 0xA8CD, + 9425 - 8213: 0xA8CE, + 9426 - 8213: 0xA8CF, + 9427 - 8213: 0xA8D0, + 9428 - 8213: 0xA8D1, + 9429 - 8213: 0xA8D2, + 9430 - 8213: 0xA8D3, + 9431 - 8213: 0xA8D4, + 9432 - 8213: 0xA8D5, + 9433 - 8213: 0xA8D6, + 9434 - 8213: 0xA8D7, + 9435 - 8213: 0xA8D8, + 9436 - 8213: 0xA8D9, + 9437 - 8213: 0xA8DA, + 9438 - 8213: 0xA8DB, + 9439 - 8213: 0xA8DC, + 9440 - 8213: 0xA8DD, + 9441 - 8213: 0xA8DE, + 9442 - 8213: 0xA8DF, + 9443 - 8213: 0xA8E0, + 9444 - 8213: 0xA8E1, + 9445 - 8213: 0xA8E2, + 9446 - 8213: 0xA8E3, + 9447 - 8213: 0xA8E4, + 9448 - 8213: 0xA8E5, + 9449 - 8213: 0xA8E6, + 9472 - 8213: 0xA6A1, + 9473 - 8213: 0xA6AC, + 9474 - 8213: 0xA6A2, + 9475 - 8213: 0xA6AD, + 9484 - 8213: 0xA6A3, + 9485 - 8213: 0xA6C8, + 9486 - 8213: 0xA6C7, + 9487 - 8213: 0xA6AE, + 9488 - 8213: 0xA6A4, + 9489 - 8213: 0xA6C2, + 9490 - 8213: 0xA6C1, + 9491 - 8213: 0xA6AF, + 9492 - 8213: 0xA6A6, + 9493 - 8213: 0xA6C6, + 9494 - 8213: 0xA6C5, + 9495 - 8213: 0xA6B1, + 9496 - 8213: 0xA6A5, + 9497 - 8213: 0xA6C4, + 9498 - 8213: 0xA6C3, + 9499 - 8213: 0xA6B0, + 9500 - 8213: 0xA6A7, + 9501 - 8213: 0xA6BC, + 9502 - 8213: 0xA6C9, + 9503 - 8213: 0xA6CA, + 9504 - 8213: 0xA6B7, + 9505 - 8213: 0xA6CB, + 9506 - 8213: 0xA6CC, + 9507 - 8213: 0xA6B2, + 9508 - 8213: 0xA6A9, + 9509 - 8213: 0xA6BE, + 9510 - 8213: 0xA6CD, + 9511 - 8213: 0xA6CE, + 9512 - 8213: 0xA6B9, + 9513 - 8213: 0xA6CF, + 9514 - 8213: 0xA6D0, + 9515 - 8213: 0xA6B4, + 9516 - 8213: 0xA6A8, + 9517 - 8213: 0xA6D1, + 9518 - 8213: 0xA6D2, + 9519 - 8213: 0xA6B8, + 9520 - 8213: 0xA6BD, + 9521 - 8213: 0xA6D3, + 9522 - 8213: 0xA6D4, + 9523 - 8213: 0xA6B3, + 9524 - 8213: 0xA6AA, + 9525 - 8213: 0xA6D5, + 9526 - 8213: 0xA6D6, + 9527 - 8213: 0xA6BA, + 9528 - 8213: 0xA6BF, + 9529 - 8213: 0xA6D7, + 9530 - 8213: 0xA6D8, + 9531 - 8213: 0xA6B5, + 9532 - 8213: 0xA6AB, + 9533 - 8213: 0xA6D9, + 9534 - 8213: 0xA6DA, + 9535 - 8213: 0xA6BB, + 9536 - 8213: 0xA6DB, + 9537 - 8213: 0xA6DC, + 9538 - 8213: 0xA6C0, + 9539 - 8213: 0xA6DD, + 9540 - 8213: 0xA6DE, + 9541 - 8213: 0xA6DF, + 9542 - 8213: 0xA6E0, + 9543 - 8213: 0xA6E1, + 9544 - 8213: 0xA6E2, + 9545 - 8213: 0xA6E3, + 9546 - 8213: 0xA6E4, + 9547 - 8213: 0xA6B6, + 9618 - 8213: 0xA2C6, + 9632 - 8213: 0xA1E1, + 9633 - 8213: 0xA1E0, + 9635 - 8213: 0xA2C3, + 9636 - 8213: 0xA2C7, + 9637 - 8213: 0xA2C8, + 9638 - 8213: 0xA2CB, + 9639 - 8213: 0xA2CA, + 9640 - 8213: 0xA2C9, + 9641 - 8213: 0xA2CC, + 9650 - 8213: 0xA1E3, + 9651 - 8213: 0xA1E2, + 9654 - 8213: 0xA2BA, + 9655 - 8213: 0xA2B9, + 9660 - 8213: 0xA1E5, + 9661 - 8213: 0xA1E4, + 9664 - 8213: 0xA2B8, + 9665 - 8213: 0xA2B7, + 9670 - 8213: 0xA1DF, + 9671 - 8213: 0xA1DE, + 9672 - 8213: 0xA2C2, + 9675 - 8213: 0xA1DB, + 9678 - 8213: 0xA1DD, + 9679 - 8213: 0xA1DC, + 9680 - 8213: 0xA2C4, + 9681 - 8213: 0xA2C5, + 9733 - 8213: 0xA1DA, + 9734 - 8213: 0xA1D9, + 9742 - 8213: 0xA2CF, + 9743 - 8213: 0xA2CE, + 9756 - 8213: 0xA2D0, + 9758 - 8213: 0xA2D1, + 9792 - 8213: 0xA1CF, + 9794 - 8213: 0xA1CE, + 9824 - 8213: 0xA2BC, + 9825 - 8213: 0xA2BD, + 9827 - 8213: 0xA2C0, + 9828 - 8213: 0xA2BB, + 9829 - 8213: 0xA2BE, + 9831 - 8213: 0xA2BF, + 9832 - 8213: 0xA2CD, + 9833 - 8213: 0xA2DB, + 9834 - 8213: 0xA2DC, + 9836 - 8213: 0xA2DD, + 9837 - 8213: 0xA2DA, +} + +const encode3Low, encode3High = 12288, 13278 + +var encode3 = [...]uint16{ + 12288 - 12288: 0xA1A1, + 12289 - 12288: 0xA1A2, + 12290 - 12288: 0xA1A3, + 12291 - 12288: 0xA1A8, + 12296 - 12288: 0xA1B4, + 12297 - 12288: 0xA1B5, + 12298 - 12288: 0xA1B6, + 12299 - 12288: 0xA1B7, + 12300 - 12288: 0xA1B8, + 12301 - 12288: 0xA1B9, + 12302 - 12288: 0xA1BA, + 12303 - 12288: 0xA1BB, + 12304 - 12288: 0xA1BC, + 12305 - 12288: 0xA1BD, + 12307 - 12288: 0xA1EB, + 12308 - 12288: 0xA1B2, + 12309 - 12288: 0xA1B3, + 12353 - 12288: 0xAAA1, + 12354 - 12288: 0xAAA2, + 12355 - 12288: 0xAAA3, + 12356 - 12288: 0xAAA4, + 12357 - 12288: 0xAAA5, + 12358 - 12288: 0xAAA6, + 12359 - 12288: 0xAAA7, + 12360 - 12288: 0xAAA8, + 12361 - 12288: 0xAAA9, + 12362 - 12288: 0xAAAA, + 12363 - 12288: 0xAAAB, + 12364 - 12288: 0xAAAC, + 12365 - 12288: 0xAAAD, + 12366 - 12288: 0xAAAE, + 12367 - 12288: 0xAAAF, + 12368 - 12288: 0xAAB0, + 12369 - 12288: 0xAAB1, + 12370 - 12288: 0xAAB2, + 12371 - 12288: 0xAAB3, + 12372 - 12288: 0xAAB4, + 12373 - 12288: 0xAAB5, + 12374 - 12288: 0xAAB6, + 12375 - 12288: 0xAAB7, + 12376 - 12288: 0xAAB8, + 12377 - 12288: 0xAAB9, + 12378 - 12288: 0xAABA, + 12379 - 12288: 0xAABB, + 12380 - 12288: 0xAABC, + 12381 - 12288: 0xAABD, + 12382 - 12288: 0xAABE, + 12383 - 12288: 0xAABF, + 12384 - 12288: 0xAAC0, + 12385 - 12288: 0xAAC1, + 12386 - 12288: 0xAAC2, + 12387 - 12288: 0xAAC3, + 12388 - 12288: 0xAAC4, + 12389 - 12288: 0xAAC5, + 12390 - 12288: 0xAAC6, + 12391 - 12288: 0xAAC7, + 12392 - 12288: 0xAAC8, + 12393 - 12288: 0xAAC9, + 12394 - 12288: 0xAACA, + 12395 - 12288: 0xAACB, + 12396 - 12288: 0xAACC, + 12397 - 12288: 0xAACD, + 12398 - 12288: 0xAACE, + 12399 - 12288: 0xAACF, + 12400 - 12288: 0xAAD0, + 12401 - 12288: 0xAAD1, + 12402 - 12288: 0xAAD2, + 12403 - 12288: 0xAAD3, + 12404 - 12288: 0xAAD4, + 12405 - 12288: 0xAAD5, + 12406 - 12288: 0xAAD6, + 12407 - 12288: 0xAAD7, + 12408 - 12288: 0xAAD8, + 12409 - 12288: 0xAAD9, + 12410 - 12288: 0xAADA, + 12411 - 12288: 0xAADB, + 12412 - 12288: 0xAADC, + 12413 - 12288: 0xAADD, + 12414 - 12288: 0xAADE, + 12415 - 12288: 0xAADF, + 12416 - 12288: 0xAAE0, + 12417 - 12288: 0xAAE1, + 12418 - 12288: 0xAAE2, + 12419 - 12288: 0xAAE3, + 12420 - 12288: 0xAAE4, + 12421 - 12288: 0xAAE5, + 12422 - 12288: 0xAAE6, + 12423 - 12288: 0xAAE7, + 12424 - 12288: 0xAAE8, + 12425 - 12288: 0xAAE9, + 12426 - 12288: 0xAAEA, + 12427 - 12288: 0xAAEB, + 12428 - 12288: 0xAAEC, + 12429 - 12288: 0xAAED, + 12430 - 12288: 0xAAEE, + 12431 - 12288: 0xAAEF, + 12432 - 12288: 0xAAF0, + 12433 - 12288: 0xAAF1, + 12434 - 12288: 0xAAF2, + 12435 - 12288: 0xAAF3, + 12449 - 12288: 0xABA1, + 12450 - 12288: 0xABA2, + 12451 - 12288: 0xABA3, + 12452 - 12288: 0xABA4, + 12453 - 12288: 0xABA5, + 12454 - 12288: 0xABA6, + 12455 - 12288: 0xABA7, + 12456 - 12288: 0xABA8, + 12457 - 12288: 0xABA9, + 12458 - 12288: 0xABAA, + 12459 - 12288: 0xABAB, + 12460 - 12288: 0xABAC, + 12461 - 12288: 0xABAD, + 12462 - 12288: 0xABAE, + 12463 - 12288: 0xABAF, + 12464 - 12288: 0xABB0, + 12465 - 12288: 0xABB1, + 12466 - 12288: 0xABB2, + 12467 - 12288: 0xABB3, + 12468 - 12288: 0xABB4, + 12469 - 12288: 0xABB5, + 12470 - 12288: 0xABB6, + 12471 - 12288: 0xABB7, + 12472 - 12288: 0xABB8, + 12473 - 12288: 0xABB9, + 12474 - 12288: 0xABBA, + 12475 - 12288: 0xABBB, + 12476 - 12288: 0xABBC, + 12477 - 12288: 0xABBD, + 12478 - 12288: 0xABBE, + 12479 - 12288: 0xABBF, + 12480 - 12288: 0xABC0, + 12481 - 12288: 0xABC1, + 12482 - 12288: 0xABC2, + 12483 - 12288: 0xABC3, + 12484 - 12288: 0xABC4, + 12485 - 12288: 0xABC5, + 12486 - 12288: 0xABC6, + 12487 - 12288: 0xABC7, + 12488 - 12288: 0xABC8, + 12489 - 12288: 0xABC9, + 12490 - 12288: 0xABCA, + 12491 - 12288: 0xABCB, + 12492 - 12288: 0xABCC, + 12493 - 12288: 0xABCD, + 12494 - 12288: 0xABCE, + 12495 - 12288: 0xABCF, + 12496 - 12288: 0xABD0, + 12497 - 12288: 0xABD1, + 12498 - 12288: 0xABD2, + 12499 - 12288: 0xABD3, + 12500 - 12288: 0xABD4, + 12501 - 12288: 0xABD5, + 12502 - 12288: 0xABD6, + 12503 - 12288: 0xABD7, + 12504 - 12288: 0xABD8, + 12505 - 12288: 0xABD9, + 12506 - 12288: 0xABDA, + 12507 - 12288: 0xABDB, + 12508 - 12288: 0xABDC, + 12509 - 12288: 0xABDD, + 12510 - 12288: 0xABDE, + 12511 - 12288: 0xABDF, + 12512 - 12288: 0xABE0, + 12513 - 12288: 0xABE1, + 12514 - 12288: 0xABE2, + 12515 - 12288: 0xABE3, + 12516 - 12288: 0xABE4, + 12517 - 12288: 0xABE5, + 12518 - 12288: 0xABE6, + 12519 - 12288: 0xABE7, + 12520 - 12288: 0xABE8, + 12521 - 12288: 0xABE9, + 12522 - 12288: 0xABEA, + 12523 - 12288: 0xABEB, + 12524 - 12288: 0xABEC, + 12525 - 12288: 0xABED, + 12526 - 12288: 0xABEE, + 12527 - 12288: 0xABEF, + 12528 - 12288: 0xABF0, + 12529 - 12288: 0xABF1, + 12530 - 12288: 0xABF2, + 12531 - 12288: 0xABF3, + 12532 - 12288: 0xABF4, + 12533 - 12288: 0xABF5, + 12534 - 12288: 0xABF6, + 12593 - 12288: 0xA4A1, + 12594 - 12288: 0xA4A2, + 12595 - 12288: 0xA4A3, + 12596 - 12288: 0xA4A4, + 12597 - 12288: 0xA4A5, + 12598 - 12288: 0xA4A6, + 12599 - 12288: 0xA4A7, + 12600 - 12288: 0xA4A8, + 12601 - 12288: 0xA4A9, + 12602 - 12288: 0xA4AA, + 12603 - 12288: 0xA4AB, + 12604 - 12288: 0xA4AC, + 12605 - 12288: 0xA4AD, + 12606 - 12288: 0xA4AE, + 12607 - 12288: 0xA4AF, + 12608 - 12288: 0xA4B0, + 12609 - 12288: 0xA4B1, + 12610 - 12288: 0xA4B2, + 12611 - 12288: 0xA4B3, + 12612 - 12288: 0xA4B4, + 12613 - 12288: 0xA4B5, + 12614 - 12288: 0xA4B6, + 12615 - 12288: 0xA4B7, + 12616 - 12288: 0xA4B8, + 12617 - 12288: 0xA4B9, + 12618 - 12288: 0xA4BA, + 12619 - 12288: 0xA4BB, + 12620 - 12288: 0xA4BC, + 12621 - 12288: 0xA4BD, + 12622 - 12288: 0xA4BE, + 12623 - 12288: 0xA4BF, + 12624 - 12288: 0xA4C0, + 12625 - 12288: 0xA4C1, + 12626 - 12288: 0xA4C2, + 12627 - 12288: 0xA4C3, + 12628 - 12288: 0xA4C4, + 12629 - 12288: 0xA4C5, + 12630 - 12288: 0xA4C6, + 12631 - 12288: 0xA4C7, + 12632 - 12288: 0xA4C8, + 12633 - 12288: 0xA4C9, + 12634 - 12288: 0xA4CA, + 12635 - 12288: 0xA4CB, + 12636 - 12288: 0xA4CC, + 12637 - 12288: 0xA4CD, + 12638 - 12288: 0xA4CE, + 12639 - 12288: 0xA4CF, + 12640 - 12288: 0xA4D0, + 12641 - 12288: 0xA4D1, + 12642 - 12288: 0xA4D2, + 12643 - 12288: 0xA4D3, + 12644 - 12288: 0xA4D4, + 12645 - 12288: 0xA4D5, + 12646 - 12288: 0xA4D6, + 12647 - 12288: 0xA4D7, + 12648 - 12288: 0xA4D8, + 12649 - 12288: 0xA4D9, + 12650 - 12288: 0xA4DA, + 12651 - 12288: 0xA4DB, + 12652 - 12288: 0xA4DC, + 12653 - 12288: 0xA4DD, + 12654 - 12288: 0xA4DE, + 12655 - 12288: 0xA4DF, + 12656 - 12288: 0xA4E0, + 12657 - 12288: 0xA4E1, + 12658 - 12288: 0xA4E2, + 12659 - 12288: 0xA4E3, + 12660 - 12288: 0xA4E4, + 12661 - 12288: 0xA4E5, + 12662 - 12288: 0xA4E6, + 12663 - 12288: 0xA4E7, + 12664 - 12288: 0xA4E8, + 12665 - 12288: 0xA4E9, + 12666 - 12288: 0xA4EA, + 12667 - 12288: 0xA4EB, + 12668 - 12288: 0xA4EC, + 12669 - 12288: 0xA4ED, + 12670 - 12288: 0xA4EE, + 12671 - 12288: 0xA4EF, + 12672 - 12288: 0xA4F0, + 12673 - 12288: 0xA4F1, + 12674 - 12288: 0xA4F2, + 12675 - 12288: 0xA4F3, + 12676 - 12288: 0xA4F4, + 12677 - 12288: 0xA4F5, + 12678 - 12288: 0xA4F6, + 12679 - 12288: 0xA4F7, + 12680 - 12288: 0xA4F8, + 12681 - 12288: 0xA4F9, + 12682 - 12288: 0xA4FA, + 12683 - 12288: 0xA4FB, + 12684 - 12288: 0xA4FC, + 12685 - 12288: 0xA4FD, + 12686 - 12288: 0xA4FE, + 12800 - 12288: 0xA9B1, + 12801 - 12288: 0xA9B2, + 12802 - 12288: 0xA9B3, + 12803 - 12288: 0xA9B4, + 12804 - 12288: 0xA9B5, + 12805 - 12288: 0xA9B6, + 12806 - 12288: 0xA9B7, + 12807 - 12288: 0xA9B8, + 12808 - 12288: 0xA9B9, + 12809 - 12288: 0xA9BA, + 12810 - 12288: 0xA9BB, + 12811 - 12288: 0xA9BC, + 12812 - 12288: 0xA9BD, + 12813 - 12288: 0xA9BE, + 12814 - 12288: 0xA9BF, + 12815 - 12288: 0xA9C0, + 12816 - 12288: 0xA9C1, + 12817 - 12288: 0xA9C2, + 12818 - 12288: 0xA9C3, + 12819 - 12288: 0xA9C4, + 12820 - 12288: 0xA9C5, + 12821 - 12288: 0xA9C6, + 12822 - 12288: 0xA9C7, + 12823 - 12288: 0xA9C8, + 12824 - 12288: 0xA9C9, + 12825 - 12288: 0xA9CA, + 12826 - 12288: 0xA9CB, + 12827 - 12288: 0xA9CC, + 12828 - 12288: 0xA2DF, + 12896 - 12288: 0xA8B1, + 12897 - 12288: 0xA8B2, + 12898 - 12288: 0xA8B3, + 12899 - 12288: 0xA8B4, + 12900 - 12288: 0xA8B5, + 12901 - 12288: 0xA8B6, + 12902 - 12288: 0xA8B7, + 12903 - 12288: 0xA8B8, + 12904 - 12288: 0xA8B9, + 12905 - 12288: 0xA8BA, + 12906 - 12288: 0xA8BB, + 12907 - 12288: 0xA8BC, + 12908 - 12288: 0xA8BD, + 12909 - 12288: 0xA8BE, + 12910 - 12288: 0xA8BF, + 12911 - 12288: 0xA8C0, + 12912 - 12288: 0xA8C1, + 12913 - 12288: 0xA8C2, + 12914 - 12288: 0xA8C3, + 12915 - 12288: 0xA8C4, + 12916 - 12288: 0xA8C5, + 12917 - 12288: 0xA8C6, + 12918 - 12288: 0xA8C7, + 12919 - 12288: 0xA8C8, + 12920 - 12288: 0xA8C9, + 12921 - 12288: 0xA8CA, + 12922 - 12288: 0xA8CB, + 12923 - 12288: 0xA8CC, + 12927 - 12288: 0xA2DE, + 13184 - 12288: 0xA7C9, + 13185 - 12288: 0xA7CA, + 13186 - 12288: 0xA7CB, + 13187 - 12288: 0xA7CC, + 13188 - 12288: 0xA7CD, + 13192 - 12288: 0xA7BA, + 13193 - 12288: 0xA7BB, + 13194 - 12288: 0xA7DC, + 13195 - 12288: 0xA7DD, + 13196 - 12288: 0xA7DE, + 13197 - 12288: 0xA7B6, + 13198 - 12288: 0xA7B7, + 13199 - 12288: 0xA7B8, + 13200 - 12288: 0xA7D4, + 13201 - 12288: 0xA7D5, + 13202 - 12288: 0xA7D6, + 13203 - 12288: 0xA7D7, + 13204 - 12288: 0xA7D8, + 13205 - 12288: 0xA7A1, + 13206 - 12288: 0xA7A2, + 13207 - 12288: 0xA7A3, + 13208 - 12288: 0xA7A5, + 13209 - 12288: 0xA7AB, + 13210 - 12288: 0xA7AC, + 13211 - 12288: 0xA7AD, + 13212 - 12288: 0xA7AE, + 13213 - 12288: 0xA7AF, + 13214 - 12288: 0xA7B0, + 13215 - 12288: 0xA7B1, + 13216 - 12288: 0xA7B2, + 13217 - 12288: 0xA7B3, + 13218 - 12288: 0xA7B4, + 13219 - 12288: 0xA7A7, + 13220 - 12288: 0xA7A8, + 13221 - 12288: 0xA7A9, + 13222 - 12288: 0xA7AA, + 13223 - 12288: 0xA7BD, + 13224 - 12288: 0xA7BE, + 13225 - 12288: 0xA7E5, + 13226 - 12288: 0xA7E6, + 13227 - 12288: 0xA7E7, + 13228 - 12288: 0xA7E8, + 13229 - 12288: 0xA7E1, + 13230 - 12288: 0xA7E2, + 13231 - 12288: 0xA7E3, + 13232 - 12288: 0xA7BF, + 13233 - 12288: 0xA7C0, + 13234 - 12288: 0xA7C1, + 13235 - 12288: 0xA7C2, + 13236 - 12288: 0xA7C3, + 13237 - 12288: 0xA7C4, + 13238 - 12288: 0xA7C5, + 13239 - 12288: 0xA7C6, + 13240 - 12288: 0xA7C7, + 13241 - 12288: 0xA7C8, + 13242 - 12288: 0xA7CE, + 13243 - 12288: 0xA7CF, + 13244 - 12288: 0xA7D0, + 13245 - 12288: 0xA7D1, + 13246 - 12288: 0xA7D2, + 13247 - 12288: 0xA7D3, + 13248 - 12288: 0xA7DA, + 13249 - 12288: 0xA7DB, + 13250 - 12288: 0xA2E3, + 13251 - 12288: 0xA7EC, + 13252 - 12288: 0xA7A6, + 13253 - 12288: 0xA7E0, + 13254 - 12288: 0xA7EF, + 13255 - 12288: 0xA2E1, + 13256 - 12288: 0xA7BC, + 13257 - 12288: 0xA7ED, + 13258 - 12288: 0xA7B5, + 13263 - 12288: 0xA7B9, + 13264 - 12288: 0xA7EA, + 13267 - 12288: 0xA7EB, + 13270 - 12288: 0xA7DF, + 13272 - 12288: 0xA2E4, + 13275 - 12288: 0xA7E4, + 13276 - 12288: 0xA7EE, + 13277 - 12288: 0xA7E9, +} + +const encode4Low, encode4High = 161, 1106 + +var encode4 = [...]uint16{ + 161 - 161: 0xA2AE, + 164 - 161: 0xA2B4, + 167 - 161: 0xA1D7, + 168 - 161: 0xA1A7, + 170 - 161: 0xA8A3, + 173 - 161: 0xA1A9, + 174 - 161: 0xA2E7, + 176 - 161: 0xA1C6, + 177 - 161: 0xA1BE, + 178 - 161: 0xA9F7, + 179 - 161: 0xA9F8, + 180 - 161: 0xA2A5, + 182 - 161: 0xA2D2, + 183 - 161: 0xA1A4, + 184 - 161: 0xA2AC, + 185 - 161: 0xA9F6, + 186 - 161: 0xA8AC, + 188 - 161: 0xA8F9, + 189 - 161: 0xA8F6, + 190 - 161: 0xA8FA, + 191 - 161: 0xA2AF, + 198 - 161: 0xA8A1, + 208 - 161: 0xA8A2, + 215 - 161: 0xA1BF, + 216 - 161: 0xA8AA, + 222 - 161: 0xA8AD, + 223 - 161: 0xA9AC, + 230 - 161: 0xA9A1, + 240 - 161: 0xA9A3, + 247 - 161: 0xA1C0, + 248 - 161: 0xA9AA, + 254 - 161: 0xA9AD, + 273 - 161: 0xA9A2, + 294 - 161: 0xA8A4, + 295 - 161: 0xA9A4, + 305 - 161: 0xA9A5, + 306 - 161: 0xA8A6, + 307 - 161: 0xA9A6, + 312 - 161: 0xA9A7, + 319 - 161: 0xA8A8, + 320 - 161: 0xA9A8, + 321 - 161: 0xA8A9, + 322 - 161: 0xA9A9, + 329 - 161: 0xA9B0, + 330 - 161: 0xA8AF, + 331 - 161: 0xA9AF, + 338 - 161: 0xA8AB, + 339 - 161: 0xA9AB, + 358 - 161: 0xA8AE, + 359 - 161: 0xA9AE, + 711 - 161: 0xA2A7, + 720 - 161: 0xA2B0, + 728 - 161: 0xA2A8, + 729 - 161: 0xA2AB, + 730 - 161: 0xA2AA, + 731 - 161: 0xA2AD, + 733 - 161: 0xA2A9, + 913 - 161: 0xA5C1, + 914 - 161: 0xA5C2, + 915 - 161: 0xA5C3, + 916 - 161: 0xA5C4, + 917 - 161: 0xA5C5, + 918 - 161: 0xA5C6, + 919 - 161: 0xA5C7, + 920 - 161: 0xA5C8, + 921 - 161: 0xA5C9, + 922 - 161: 0xA5CA, + 923 - 161: 0xA5CB, + 924 - 161: 0xA5CC, + 925 - 161: 0xA5CD, + 926 - 161: 0xA5CE, + 927 - 161: 0xA5CF, + 928 - 161: 0xA5D0, + 929 - 161: 0xA5D1, + 931 - 161: 0xA5D2, + 932 - 161: 0xA5D3, + 933 - 161: 0xA5D4, + 934 - 161: 0xA5D5, + 935 - 161: 0xA5D6, + 936 - 161: 0xA5D7, + 937 - 161: 0xA5D8, + 945 - 161: 0xA5E1, + 946 - 161: 0xA5E2, + 947 - 161: 0xA5E3, + 948 - 161: 0xA5E4, + 949 - 161: 0xA5E5, + 950 - 161: 0xA5E6, + 951 - 161: 0xA5E7, + 952 - 161: 0xA5E8, + 953 - 161: 0xA5E9, + 954 - 161: 0xA5EA, + 955 - 161: 0xA5EB, + 956 - 161: 0xA5EC, + 957 - 161: 0xA5ED, + 958 - 161: 0xA5EE, + 959 - 161: 0xA5EF, + 960 - 161: 0xA5F0, + 961 - 161: 0xA5F1, + 963 - 161: 0xA5F2, + 964 - 161: 0xA5F3, + 965 - 161: 0xA5F4, + 966 - 161: 0xA5F5, + 967 - 161: 0xA5F6, + 968 - 161: 0xA5F7, + 969 - 161: 0xA5F8, + 1025 - 161: 0xACA7, + 1040 - 161: 0xACA1, + 1041 - 161: 0xACA2, + 1042 - 161: 0xACA3, + 1043 - 161: 0xACA4, + 1044 - 161: 0xACA5, + 1045 - 161: 0xACA6, + 1046 - 161: 0xACA8, + 1047 - 161: 0xACA9, + 1048 - 161: 0xACAA, + 1049 - 161: 0xACAB, + 1050 - 161: 0xACAC, + 1051 - 161: 0xACAD, + 1052 - 161: 0xACAE, + 1053 - 161: 0xACAF, + 1054 - 161: 0xACB0, + 1055 - 161: 0xACB1, + 1056 - 161: 0xACB2, + 1057 - 161: 0xACB3, + 1058 - 161: 0xACB4, + 1059 - 161: 0xACB5, + 1060 - 161: 0xACB6, + 1061 - 161: 0xACB7, + 1062 - 161: 0xACB8, + 1063 - 161: 0xACB9, + 1064 - 161: 0xACBA, + 1065 - 161: 0xACBB, + 1066 - 161: 0xACBC, + 1067 - 161: 0xACBD, + 1068 - 161: 0xACBE, + 1069 - 161: 0xACBF, + 1070 - 161: 0xACC0, + 1071 - 161: 0xACC1, + 1072 - 161: 0xACD1, + 1073 - 161: 0xACD2, + 1074 - 161: 0xACD3, + 1075 - 161: 0xACD4, + 1076 - 161: 0xACD5, + 1077 - 161: 0xACD6, + 1078 - 161: 0xACD8, + 1079 - 161: 0xACD9, + 1080 - 161: 0xACDA, + 1081 - 161: 0xACDB, + 1082 - 161: 0xACDC, + 1083 - 161: 0xACDD, + 1084 - 161: 0xACDE, + 1085 - 161: 0xACDF, + 1086 - 161: 0xACE0, + 1087 - 161: 0xACE1, + 1088 - 161: 0xACE2, + 1089 - 161: 0xACE3, + 1090 - 161: 0xACE4, + 1091 - 161: 0xACE5, + 1092 - 161: 0xACE6, + 1093 - 161: 0xACE7, + 1094 - 161: 0xACE8, + 1095 - 161: 0xACE9, + 1096 - 161: 0xACEA, + 1097 - 161: 0xACEB, + 1098 - 161: 0xACEC, + 1099 - 161: 0xACED, + 1100 - 161: 0xACEE, + 1101 - 161: 0xACEF, + 1102 - 161: 0xACF0, + 1103 - 161: 0xACF1, + 1105 - 161: 0xACD7, +} + +const encode5Low, encode5High = 63744, 64012 + +var encode5 = [...]uint16{ + 63744 - 63744: 0xCBD0, + 63745 - 63744: 0xCBD6, + 63746 - 63744: 0xCBE7, + 63747 - 63744: 0xCDCF, + 63748 - 63744: 0xCDE8, + 63749 - 63744: 0xCEAD, + 63750 - 63744: 0xCFFB, + 63751 - 63744: 0xD0A2, + 63752 - 63744: 0xD0B8, + 63753 - 63744: 0xD0D0, + 63754 - 63744: 0xD0DD, + 63755 - 63744: 0xD1D4, + 63756 - 63744: 0xD1D5, + 63757 - 63744: 0xD1D8, + 63758 - 63744: 0xD1DB, + 63759 - 63744: 0xD1DC, + 63760 - 63744: 0xD1DD, + 63761 - 63744: 0xD1DE, + 63762 - 63744: 0xD1DF, + 63763 - 63744: 0xD1E0, + 63764 - 63744: 0xD1E2, + 63765 - 63744: 0xD1E3, + 63766 - 63744: 0xD1E4, + 63767 - 63744: 0xD1E5, + 63768 - 63744: 0xD1E6, + 63769 - 63744: 0xD1E8, + 63770 - 63744: 0xD1E9, + 63771 - 63744: 0xD1EA, + 63772 - 63744: 0xD1EB, + 63773 - 63744: 0xD1ED, + 63774 - 63744: 0xD1EF, + 63775 - 63744: 0xD1F0, + 63776 - 63744: 0xD1F2, + 63777 - 63744: 0xD1F6, + 63778 - 63744: 0xD1FA, + 63779 - 63744: 0xD1FC, + 63780 - 63744: 0xD1FD, + 63781 - 63744: 0xD1FE, + 63782 - 63744: 0xD2A2, + 63783 - 63744: 0xD2A3, + 63784 - 63744: 0xD2A7, + 63785 - 63744: 0xD2A8, + 63786 - 63744: 0xD2A9, + 63787 - 63744: 0xD2AA, + 63788 - 63744: 0xD2AB, + 63789 - 63744: 0xD2AD, + 63790 - 63744: 0xD2B2, + 63791 - 63744: 0xD2BE, + 63792 - 63744: 0xD2C2, + 63793 - 63744: 0xD2C3, + 63794 - 63744: 0xD2C4, + 63795 - 63744: 0xD2C6, + 63796 - 63744: 0xD2C7, + 63797 - 63744: 0xD2C8, + 63798 - 63744: 0xD2C9, + 63799 - 63744: 0xD2CA, + 63800 - 63744: 0xD2CB, + 63801 - 63744: 0xD2CD, + 63802 - 63744: 0xD2CE, + 63803 - 63744: 0xD2CF, + 63804 - 63744: 0xD2D0, + 63805 - 63744: 0xD2D1, + 63806 - 63744: 0xD2D2, + 63807 - 63744: 0xD2D3, + 63808 - 63744: 0xD2D4, + 63809 - 63744: 0xD2D5, + 63810 - 63744: 0xD2D6, + 63811 - 63744: 0xD2D7, + 63812 - 63744: 0xD2D9, + 63813 - 63744: 0xD2DA, + 63814 - 63744: 0xD2DE, + 63815 - 63744: 0xD2DF, + 63816 - 63744: 0xD2E1, + 63817 - 63744: 0xD2E2, + 63818 - 63744: 0xD2E4, + 63819 - 63744: 0xD2E5, + 63820 - 63744: 0xD2E6, + 63821 - 63744: 0xD2E7, + 63822 - 63744: 0xD2E8, + 63823 - 63744: 0xD2E9, + 63824 - 63744: 0xD2EA, + 63825 - 63744: 0xD2EB, + 63826 - 63744: 0xD2F0, + 63827 - 63744: 0xD2F1, + 63828 - 63744: 0xD2F2, + 63829 - 63744: 0xD2F3, + 63830 - 63744: 0xD2F4, + 63831 - 63744: 0xD2F5, + 63832 - 63744: 0xD2F7, + 63833 - 63744: 0xD2F8, + 63834 - 63744: 0xD4E6, + 63835 - 63744: 0xD4FC, + 63836 - 63744: 0xD5A5, + 63837 - 63744: 0xD5AB, + 63838 - 63744: 0xD5AE, + 63839 - 63744: 0xD6B8, + 63840 - 63744: 0xD6CD, + 63841 - 63744: 0xD7CB, + 63842 - 63744: 0xD7E4, + 63843 - 63744: 0xDBC5, + 63844 - 63744: 0xDBE4, + 63845 - 63744: 0xDCA5, + 63846 - 63744: 0xDDA5, + 63847 - 63744: 0xDDD5, + 63848 - 63744: 0xDDF4, + 63849 - 63744: 0xDEFC, + 63850 - 63744: 0xDEFE, + 63851 - 63744: 0xDFB3, + 63852 - 63744: 0xDFE1, + 63853 - 63744: 0xDFE8, + 63854 - 63744: 0xE0F1, + 63855 - 63744: 0xE1AD, + 63856 - 63744: 0xE1ED, + 63857 - 63744: 0xE3F5, + 63858 - 63744: 0xE4A1, + 63859 - 63744: 0xE4A9, + 63860 - 63744: 0xE5AE, + 63861 - 63744: 0xE5B1, + 63862 - 63744: 0xE5B2, + 63863 - 63744: 0xE5B9, + 63864 - 63744: 0xE5BB, + 63865 - 63744: 0xE5BC, + 63866 - 63744: 0xE5C4, + 63867 - 63744: 0xE5CE, + 63868 - 63744: 0xE5D0, + 63869 - 63744: 0xE5D2, + 63870 - 63744: 0xE5D6, + 63871 - 63744: 0xE5FA, + 63872 - 63744: 0xE5FB, + 63873 - 63744: 0xE5FC, + 63874 - 63744: 0xE5FE, + 63875 - 63744: 0xE6A1, + 63876 - 63744: 0xE6A4, + 63877 - 63744: 0xE6A7, + 63878 - 63744: 0xE6AD, + 63879 - 63744: 0xE6AF, + 63880 - 63744: 0xE6B0, + 63881 - 63744: 0xE6B1, + 63882 - 63744: 0xE6B3, + 63883 - 63744: 0xE6B7, + 63884 - 63744: 0xE6B8, + 63885 - 63744: 0xE6BC, + 63886 - 63744: 0xE6C4, + 63887 - 63744: 0xE6C6, + 63888 - 63744: 0xE6C7, + 63889 - 63744: 0xE6CA, + 63890 - 63744: 0xE6D2, + 63891 - 63744: 0xE6D6, + 63892 - 63744: 0xE6D9, + 63893 - 63744: 0xE6DC, + 63894 - 63744: 0xE6DF, + 63895 - 63744: 0xE6E1, + 63896 - 63744: 0xE6E4, + 63897 - 63744: 0xE6E5, + 63898 - 63744: 0xE6E6, + 63899 - 63744: 0xE6E8, + 63900 - 63744: 0xE6EA, + 63901 - 63744: 0xE6EB, + 63902 - 63744: 0xE6EC, + 63903 - 63744: 0xE6EF, + 63904 - 63744: 0xE6F1, + 63905 - 63744: 0xE6F2, + 63906 - 63744: 0xE6F5, + 63907 - 63744: 0xE6F6, + 63908 - 63744: 0xE6F7, + 63909 - 63744: 0xE6F9, + 63910 - 63744: 0xE7A1, + 63911 - 63744: 0xE7A6, + 63912 - 63744: 0xE7A9, + 63913 - 63744: 0xE7AA, + 63914 - 63744: 0xE7AC, + 63915 - 63744: 0xE7AD, + 63916 - 63744: 0xE7B0, + 63917 - 63744: 0xE7BF, + 63918 - 63744: 0xE7C1, + 63919 - 63744: 0xE7C6, + 63920 - 63744: 0xE7C7, + 63921 - 63744: 0xE7CB, + 63922 - 63744: 0xE7CD, + 63923 - 63744: 0xE7CF, + 63924 - 63744: 0xE7D0, + 63925 - 63744: 0xE7D3, + 63926 - 63744: 0xE7DF, + 63927 - 63744: 0xE7E4, + 63928 - 63744: 0xE7E6, + 63929 - 63744: 0xE7F7, + 63930 - 63744: 0xE8E7, + 63931 - 63744: 0xE8E8, + 63932 - 63744: 0xE8F0, + 63933 - 63744: 0xE8F1, + 63934 - 63744: 0xE8F7, + 63935 - 63744: 0xE8F9, + 63936 - 63744: 0xE8FB, + 63937 - 63744: 0xE8FE, + 63938 - 63744: 0xE9A7, + 63939 - 63744: 0xE9AC, + 63940 - 63744: 0xE9CC, + 63941 - 63744: 0xE9F7, + 63942 - 63744: 0xEAC1, + 63943 - 63744: 0xEAE5, + 63944 - 63744: 0xEAF4, + 63945 - 63744: 0xEAF7, + 63946 - 63744: 0xEAFC, + 63947 - 63744: 0xEAFE, + 63948 - 63744: 0xEBA4, + 63949 - 63744: 0xEBA7, + 63950 - 63744: 0xEBA9, + 63951 - 63744: 0xEBAA, + 63952 - 63744: 0xEBBA, + 63953 - 63744: 0xEBBB, + 63954 - 63744: 0xEBBD, + 63955 - 63744: 0xEBC1, + 63956 - 63744: 0xEBC2, + 63957 - 63744: 0xEBC6, + 63958 - 63744: 0xEBC7, + 63959 - 63744: 0xEBCC, + 63960 - 63744: 0xEBCF, + 63961 - 63744: 0xEBD0, + 63962 - 63744: 0xEBD1, + 63963 - 63744: 0xEBD2, + 63964 - 63744: 0xEBD8, + 63965 - 63744: 0xECA6, + 63966 - 63744: 0xECA7, + 63967 - 63744: 0xECAA, + 63968 - 63744: 0xECAF, + 63969 - 63744: 0xECB0, + 63970 - 63744: 0xECB1, + 63971 - 63744: 0xECB2, + 63972 - 63744: 0xECB5, + 63973 - 63744: 0xECB8, + 63974 - 63744: 0xECBA, + 63975 - 63744: 0xECC0, + 63976 - 63744: 0xECC1, + 63977 - 63744: 0xECC5, + 63978 - 63744: 0xECC6, + 63979 - 63744: 0xECC9, + 63980 - 63744: 0xECCA, + 63981 - 63744: 0xECD5, + 63982 - 63744: 0xECDD, + 63983 - 63744: 0xECDE, + 63984 - 63744: 0xECE1, + 63985 - 63744: 0xECE4, + 63986 - 63744: 0xECE7, + 63987 - 63744: 0xECE8, + 63988 - 63744: 0xECF7, + 63989 - 63744: 0xECF8, + 63990 - 63744: 0xECFA, + 63991 - 63744: 0xEDA1, + 63992 - 63744: 0xEDA2, + 63993 - 63744: 0xEDA3, + 63994 - 63744: 0xEDEE, + 63995 - 63744: 0xEEDB, + 63996 - 63744: 0xF2BD, + 63997 - 63744: 0xF2FA, + 63998 - 63744: 0xF3B1, + 63999 - 63744: 0xF4A7, + 64000 - 63744: 0xF4EE, + 64001 - 63744: 0xF6F4, + 64002 - 63744: 0xF6F6, + 64003 - 63744: 0xF7B8, + 64004 - 63744: 0xF7C8, + 64005 - 63744: 0xF7D3, + 64006 - 63744: 0xF8DB, + 64007 - 63744: 0xF8F0, + 64008 - 63744: 0xFAA1, + 64009 - 63744: 0xFAA2, + 64010 - 63744: 0xFAE6, + 64011 - 63744: 0xFCA9, +} + +const encode6Low, encode6High = 65281, 65511 + +var encode6 = [...]uint16{ + 65281 - 65281: 0xA3A1, + 65282 - 65281: 0xA3A2, + 65283 - 65281: 0xA3A3, + 65284 - 65281: 0xA3A4, + 65285 - 65281: 0xA3A5, + 65286 - 65281: 0xA3A6, + 65287 - 65281: 0xA3A7, + 65288 - 65281: 0xA3A8, + 65289 - 65281: 0xA3A9, + 65290 - 65281: 0xA3AA, + 65291 - 65281: 0xA3AB, + 65292 - 65281: 0xA3AC, + 65293 - 65281: 0xA3AD, + 65294 - 65281: 0xA3AE, + 65295 - 65281: 0xA3AF, + 65296 - 65281: 0xA3B0, + 65297 - 65281: 0xA3B1, + 65298 - 65281: 0xA3B2, + 65299 - 65281: 0xA3B3, + 65300 - 65281: 0xA3B4, + 65301 - 65281: 0xA3B5, + 65302 - 65281: 0xA3B6, + 65303 - 65281: 0xA3B7, + 65304 - 65281: 0xA3B8, + 65305 - 65281: 0xA3B9, + 65306 - 65281: 0xA3BA, + 65307 - 65281: 0xA3BB, + 65308 - 65281: 0xA3BC, + 65309 - 65281: 0xA3BD, + 65310 - 65281: 0xA3BE, + 65311 - 65281: 0xA3BF, + 65312 - 65281: 0xA3C0, + 65313 - 65281: 0xA3C1, + 65314 - 65281: 0xA3C2, + 65315 - 65281: 0xA3C3, + 65316 - 65281: 0xA3C4, + 65317 - 65281: 0xA3C5, + 65318 - 65281: 0xA3C6, + 65319 - 65281: 0xA3C7, + 65320 - 65281: 0xA3C8, + 65321 - 65281: 0xA3C9, + 65322 - 65281: 0xA3CA, + 65323 - 65281: 0xA3CB, + 65324 - 65281: 0xA3CC, + 65325 - 65281: 0xA3CD, + 65326 - 65281: 0xA3CE, + 65327 - 65281: 0xA3CF, + 65328 - 65281: 0xA3D0, + 65329 - 65281: 0xA3D1, + 65330 - 65281: 0xA3D2, + 65331 - 65281: 0xA3D3, + 65332 - 65281: 0xA3D4, + 65333 - 65281: 0xA3D5, + 65334 - 65281: 0xA3D6, + 65335 - 65281: 0xA3D7, + 65336 - 65281: 0xA3D8, + 65337 - 65281: 0xA3D9, + 65338 - 65281: 0xA3DA, + 65339 - 65281: 0xA3DB, + 65340 - 65281: 0xA1AC, + 65341 - 65281: 0xA3DD, + 65342 - 65281: 0xA3DE, + 65343 - 65281: 0xA3DF, + 65344 - 65281: 0xA3E0, + 65345 - 65281: 0xA3E1, + 65346 - 65281: 0xA3E2, + 65347 - 65281: 0xA3E3, + 65348 - 65281: 0xA3E4, + 65349 - 65281: 0xA3E5, + 65350 - 65281: 0xA3E6, + 65351 - 65281: 0xA3E7, + 65352 - 65281: 0xA3E8, + 65353 - 65281: 0xA3E9, + 65354 - 65281: 0xA3EA, + 65355 - 65281: 0xA3EB, + 65356 - 65281: 0xA3EC, + 65357 - 65281: 0xA3ED, + 65358 - 65281: 0xA3EE, + 65359 - 65281: 0xA3EF, + 65360 - 65281: 0xA3F0, + 65361 - 65281: 0xA3F1, + 65362 - 65281: 0xA3F2, + 65363 - 65281: 0xA3F3, + 65364 - 65281: 0xA3F4, + 65365 - 65281: 0xA3F5, + 65366 - 65281: 0xA3F6, + 65367 - 65281: 0xA3F7, + 65368 - 65281: 0xA3F8, + 65369 - 65281: 0xA3F9, + 65370 - 65281: 0xA3FA, + 65371 - 65281: 0xA3FB, + 65372 - 65281: 0xA3FC, + 65373 - 65281: 0xA3FD, + 65374 - 65281: 0xA2A6, + 65504 - 65281: 0xA1CB, + 65505 - 65281: 0xA1CC, + 65506 - 65281: 0xA1FE, + 65507 - 65281: 0xA3FE, + 65509 - 65281: 0xA1CD, + 65510 - 65281: 0xA3DC, +} diff --git a/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go new file mode 100644 index 000000000..5ecc526cf --- /dev/null +++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go @@ -0,0 +1,12 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package simplifiedchinese + +import ( + "golang.org/x/text/encoding" +) + +// All is a list of all defined encodings in this package. +var All = []encoding.Encoding{GB18030, GBK, HZGB2312} diff --git a/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go new file mode 100644 index 000000000..0e0fabfd6 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go @@ -0,0 +1,273 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package simplifiedchinese + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +var ( + // GB18030 is the GB18030 encoding. + GB18030 encoding.Encoding = &gbk18030 + // GBK is the GBK encoding. It encodes an extension of the GB2312 character set + // and is also known as Code Page 936. + GBK encoding.Encoding = &gbk +) + +var gbk = internal.Encoding{ + &internal.SimpleEncoding{ + gbkDecoder{gb18030: false}, + gbkEncoder{gb18030: false}, + }, + "GBK", + identifier.GBK, +} + +var gbk18030 = internal.Encoding{ + &internal.SimpleEncoding{ + gbkDecoder{gb18030: true}, + gbkEncoder{gb18030: true}, + }, + "GB18030", + identifier.GB18030, +} + +type gbkDecoder struct { + transform.NopResetter + gb18030 bool +} + +func (d gbkDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for ; nSrc < len(src); nSrc += size { + switch c0 := src[nSrc]; { + case c0 < utf8.RuneSelf: + r, size = rune(c0), 1 + + // Microsoft's Code Page 936 extends GBK 1.0 to encode the euro sign U+20AC + // as 0x80. The HTML5 specification at http://encoding.spec.whatwg.org/#gbk + // says to treat "gbk" as Code Page 936. + // GBK’s decoder is gb18030’s decoder. https://encoding.spec.whatwg.org/#gbk-decoder + // If byte is 0x80, return code point U+20AC. https://encoding.spec.whatwg.org/#gb18030-decoder + case c0 == 0x80: + r, size = '€', 1 + + case c0 < 0xff: + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + goto write + } + c1 := src[nSrc+1] + switch { + case 0x40 <= c1 && c1 < 0x7f: + c1 -= 0x40 + case 0x80 <= c1 && c1 < 0xff: + c1 -= 0x41 + case d.gb18030 && 0x30 <= c1 && c1 < 0x40: + if nSrc+3 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + // The second byte here is always ASCII, so we can set size + // to 1 in all cases. + r, size = utf8.RuneError, 1 + goto write + } + c2 := src[nSrc+2] + if c2 < 0x81 || 0xff <= c2 { + r, size = utf8.RuneError, 1 + goto write + } + c3 := src[nSrc+3] + if c3 < 0x30 || 0x3a <= c3 { + r, size = utf8.RuneError, 1 + goto write + } + size = 4 + r = ((rune(c0-0x81)*10+rune(c1-0x30))*126+rune(c2-0x81))*10 + rune(c3-0x30) + if r < 39420 { + i, j := 0, len(gb18030) + for i < j { + h := i + (j-i)/2 + if r >= rune(gb18030[h][0]) { + i = h + 1 + } else { + j = h + } + } + dec := &gb18030[i-1] + r += rune(dec[1]) - rune(dec[0]) + goto write + } + r -= 189000 + if 0 <= r && r < 0x100000 { + r += 0x10000 + } else { + r, size = utf8.RuneError, 1 + } + goto write + default: + r, size = utf8.RuneError, 1 + goto write + } + r, size = '\ufffd', 2 + if i := int(c0-0x81)*190 + int(c1); i < len(decode) { + r = rune(decode[i]) + if r == 0 { + r = '\ufffd' + } + } + + default: + r, size = utf8.RuneError, 1 + } + + write: + if nDst+utf8.RuneLen(r) > len(dst) { + err = transform.ErrShortDst + break loop + } + nDst += utf8.EncodeRune(dst[nDst:], r) + } + return nDst, nSrc, err +} + +type gbkEncoder struct { + transform.NopResetter + gb18030 bool +} + +func (e gbkEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, r2, size := rune(0), rune(0), 0 + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break + } + } + + // func init checks that the switch covers all tables. + switch { + case encode0Low <= r && r < encode0High: + if r2 = rune(encode0[r-encode0Low]); r2 != 0 { + goto write2 + } + case encode1Low <= r && r < encode1High: + // Microsoft's Code Page 936 extends GBK 1.0 to encode the euro sign U+20AC + // as 0x80. The HTML5 specification at http://encoding.spec.whatwg.org/#gbk + // says to treat "gbk" as Code Page 936. + // GBK’s encoder is gb18030’s encoder with its _is GBK_ set to true. https://encoding.spec.whatwg.org/#gbk-encoder + // If _is GBK_ is true and code point is U+20AC, return byte 0x80. https://encoding.spec.whatwg.org/#gb18030-encoder + if !e.gb18030 && r == '€' { + r = 0x80 + goto write1 + } + if r2 = rune(encode1[r-encode1Low]); r2 != 0 { + goto write2 + } + case encode2Low <= r && r < encode2High: + if r2 = rune(encode2[r-encode2Low]); r2 != 0 { + goto write2 + } + case encode3Low <= r && r < encode3High: + if r2 = rune(encode3[r-encode3Low]); r2 != 0 { + goto write2 + } + case encode4Low <= r && r < encode4High: + if r2 = rune(encode4[r-encode4Low]); r2 != 0 { + goto write2 + } + } + + if e.gb18030 { + if r < 0x10000 { + i, j := 0, len(gb18030) + for i < j { + h := i + (j-i)/2 + if r >= rune(gb18030[h][1]) { + i = h + 1 + } else { + j = h + } + } + dec := &gb18030[i-1] + r += rune(dec[0]) - rune(dec[1]) + goto write4 + } else if r < 0x110000 { + r += 189000 - 0x10000 + goto write4 + } + } + err = internal.ErrASCIIReplacement + break + } + + write1: + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst++ + continue + + write2: + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = uint8(r2 >> 8) + dst[nDst+1] = uint8(r2) + nDst += 2 + continue + + write4: + if nDst+4 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+3] = uint8(r%10 + 0x30) + r /= 10 + dst[nDst+2] = uint8(r%126 + 0x81) + r /= 126 + dst[nDst+1] = uint8(r%10 + 0x30) + r /= 10 + dst[nDst+0] = uint8(r + 0x81) + nDst += 4 + continue + } + return nDst, nSrc, err +} + +func init() { + // Check that the hard-coded encode switch covers all tables. + if numEncodeTables != 5 { + panic("bad numEncodeTables") + } +} diff --git a/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go new file mode 100644 index 000000000..e15b7bf6a --- /dev/null +++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go @@ -0,0 +1,245 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package simplifiedchinese + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// HZGB2312 is the HZ-GB2312 encoding. +var HZGB2312 encoding.Encoding = &hzGB2312 + +var hzGB2312 = internal.Encoding{ + internal.FuncEncoding{hzGB2312NewDecoder, hzGB2312NewEncoder}, + "HZ-GB2312", + identifier.HZGB2312, +} + +func hzGB2312NewDecoder() transform.Transformer { + return new(hzGB2312Decoder) +} + +func hzGB2312NewEncoder() transform.Transformer { + return new(hzGB2312Encoder) +} + +const ( + asciiState = iota + gbState +) + +type hzGB2312Decoder int + +func (d *hzGB2312Decoder) Reset() { + *d = asciiState +} + +func (d *hzGB2312Decoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 +loop: + for ; nSrc < len(src); nSrc += size { + c0 := src[nSrc] + if c0 >= utf8.RuneSelf { + r, size = utf8.RuneError, 1 + goto write + } + + if c0 == '~' { + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + goto write + } + size = 2 + switch src[nSrc+1] { + case '{': + *d = gbState + continue + case '}': + *d = asciiState + continue + case '~': + if nDst >= len(dst) { + err = transform.ErrShortDst + break loop + } + dst[nDst] = '~' + nDst++ + continue + case '\n': + continue + default: + r = utf8.RuneError + goto write + } + } + + if *d == asciiState { + r, size = rune(c0), 1 + } else { + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + goto write + } + size = 2 + c1 := src[nSrc+1] + if c0 < 0x21 || 0x7e <= c0 || c1 < 0x21 || 0x7f <= c1 { + // error + } else if i := int(c0-0x01)*190 + int(c1+0x3f); i < len(decode) { + r = rune(decode[i]) + if r != 0 { + goto write + } + } + if c1 > utf8.RuneSelf { + // Be consistent and always treat non-ASCII as a single error. + size = 1 + } + r = utf8.RuneError + } + + write: + if nDst+utf8.RuneLen(r) > len(dst) { + err = transform.ErrShortDst + break loop + } + nDst += utf8.EncodeRune(dst[nDst:], r) + } + return nDst, nSrc, err +} + +type hzGB2312Encoder int + +func (d *hzGB2312Encoder) Reset() { + *d = asciiState +} + +func (e *hzGB2312Encoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + if r == '~' { + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = '~' + dst[nDst+1] = '~' + nDst += 2 + continue + } else if *e != asciiState { + if nDst+3 > len(dst) { + err = transform.ErrShortDst + break + } + *e = asciiState + dst[nDst+0] = '~' + dst[nDst+1] = '}' + nDst += 2 + } else if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst += 1 + continue + + } + + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break + } + } + + // func init checks that the switch covers all tables. + switch { + case encode0Low <= r && r < encode0High: + if r = rune(encode0[r-encode0Low]); r != 0 { + goto writeGB + } + case encode1Low <= r && r < encode1High: + if r = rune(encode1[r-encode1Low]); r != 0 { + goto writeGB + } + case encode2Low <= r && r < encode2High: + if r = rune(encode2[r-encode2Low]); r != 0 { + goto writeGB + } + case encode3Low <= r && r < encode3High: + if r = rune(encode3[r-encode3Low]); r != 0 { + goto writeGB + } + case encode4Low <= r && r < encode4High: + if r = rune(encode4[r-encode4Low]); r != 0 { + goto writeGB + } + } + + terminateInASCIIState: + // Switch back to ASCII state in case of error so that an ASCII + // replacement character can be written in the correct state. + if *e != asciiState { + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = '~' + dst[nDst+1] = '}' + nDst += 2 + } + err = internal.ErrASCIIReplacement + break + + writeGB: + c0 := uint8(r>>8) - 0x80 + c1 := uint8(r) - 0x80 + if c0 < 0x21 || 0x7e <= c0 || c1 < 0x21 || 0x7f <= c1 { + goto terminateInASCIIState + } + if *e == asciiState { + if nDst+4 > len(dst) { + err = transform.ErrShortDst + break + } + *e = gbState + dst[nDst+0] = '~' + dst[nDst+1] = '{' + nDst += 2 + } else if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = c0 + dst[nDst+1] = c1 + nDst += 2 + continue + } + // TODO: should one always terminate in ASCII state to make it safe to + // concatenate two HZ-GB2312-encoded strings? + return nDst, nSrc, err +} diff --git a/vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go new file mode 100644 index 000000000..415f52a11 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go @@ -0,0 +1,43999 @@ +// generated by go run maketables.go; DO NOT EDIT + +// Package simplifiedchinese provides Simplified Chinese encodings such as GBK. +package simplifiedchinese // import "golang.org/x/text/encoding/simplifiedchinese" + +// gb18030 is the table from http://encoding.spec.whatwg.org/index-gb18030.txt +var gb18030 = [...][2]uint16{ + {0x0000, 0x0080}, + {0x0024, 0x00a5}, + {0x0026, 0x00a9}, + {0x002d, 0x00b2}, + {0x0032, 0x00b8}, + {0x0051, 0x00d8}, + {0x0059, 0x00e2}, + {0x005f, 0x00eb}, + {0x0060, 0x00ee}, + {0x0064, 0x00f4}, + {0x0067, 0x00f8}, + {0x0068, 0x00fb}, + {0x0069, 0x00fd}, + {0x006d, 0x0102}, + {0x007e, 0x0114}, + {0x0085, 0x011c}, + {0x0094, 0x012c}, + {0x00ac, 0x0145}, + {0x00af, 0x0149}, + {0x00b3, 0x014e}, + {0x00d0, 0x016c}, + {0x0132, 0x01cf}, + {0x0133, 0x01d1}, + {0x0134, 0x01d3}, + {0x0135, 0x01d5}, + {0x0136, 0x01d7}, + {0x0137, 0x01d9}, + {0x0138, 0x01db}, + {0x0139, 0x01dd}, + {0x0155, 0x01fa}, + {0x01ac, 0x0252}, + {0x01bb, 0x0262}, + {0x0220, 0x02c8}, + {0x0221, 0x02cc}, + {0x022e, 0x02da}, + {0x02e5, 0x03a2}, + {0x02e6, 0x03aa}, + {0x02ed, 0x03c2}, + {0x02ee, 0x03ca}, + {0x0325, 0x0402}, + {0x0333, 0x0450}, + {0x0334, 0x0452}, + {0x1ef2, 0x2011}, + {0x1ef4, 0x2017}, + {0x1ef5, 0x201a}, + {0x1ef7, 0x201e}, + {0x1efe, 0x2027}, + {0x1f07, 0x2031}, + {0x1f08, 0x2034}, + {0x1f09, 0x2036}, + {0x1f0e, 0x203c}, + {0x1f7e, 0x20ad}, + {0x1fd4, 0x2104}, + {0x1fd5, 0x2106}, + {0x1fd8, 0x210a}, + {0x1fe4, 0x2117}, + {0x1fee, 0x2122}, + {0x202c, 0x216c}, + {0x2030, 0x217a}, + {0x2046, 0x2194}, + {0x2048, 0x219a}, + {0x20b6, 0x2209}, + {0x20bc, 0x2210}, + {0x20bd, 0x2212}, + {0x20c0, 0x2216}, + {0x20c4, 0x221b}, + {0x20c6, 0x2221}, + {0x20c8, 0x2224}, + {0x20c9, 0x2226}, + {0x20ca, 0x222c}, + {0x20cc, 0x222f}, + {0x20d1, 0x2238}, + {0x20d6, 0x223e}, + {0x20e0, 0x2249}, + {0x20e3, 0x224d}, + {0x20e8, 0x2253}, + {0x20f5, 0x2262}, + {0x20f7, 0x2268}, + {0x20fd, 0x2270}, + {0x2122, 0x2296}, + {0x2125, 0x229a}, + {0x2130, 0x22a6}, + {0x2149, 0x22c0}, + {0x219b, 0x2313}, + {0x22e8, 0x246a}, + {0x22f2, 0x249c}, + {0x2356, 0x254c}, + {0x235a, 0x2574}, + {0x2367, 0x2590}, + {0x236a, 0x2596}, + {0x2374, 0x25a2}, + {0x2384, 0x25b4}, + {0x238c, 0x25be}, + {0x2394, 0x25c8}, + {0x2397, 0x25cc}, + {0x2399, 0x25d0}, + {0x23ab, 0x25e6}, + {0x23ca, 0x2607}, + {0x23cc, 0x260a}, + {0x2402, 0x2641}, + {0x2403, 0x2643}, + {0x2c41, 0x2e82}, + {0x2c43, 0x2e85}, + {0x2c46, 0x2e89}, + {0x2c48, 0x2e8d}, + {0x2c52, 0x2e98}, + {0x2c61, 0x2ea8}, + {0x2c63, 0x2eab}, + {0x2c66, 0x2eaf}, + {0x2c6a, 0x2eb4}, + {0x2c6c, 0x2eb8}, + {0x2c6f, 0x2ebc}, + {0x2c7d, 0x2ecb}, + {0x2da2, 0x2ffc}, + {0x2da6, 0x3004}, + {0x2da7, 0x3018}, + {0x2dac, 0x301f}, + {0x2dae, 0x302a}, + {0x2dc2, 0x303f}, + {0x2dc4, 0x3094}, + {0x2dcb, 0x309f}, + {0x2dcd, 0x30f7}, + {0x2dd2, 0x30ff}, + {0x2dd8, 0x312a}, + {0x2ece, 0x322a}, + {0x2ed5, 0x3232}, + {0x2f46, 0x32a4}, + {0x3030, 0x3390}, + {0x303c, 0x339f}, + {0x303e, 0x33a2}, + {0x3060, 0x33c5}, + {0x3069, 0x33cf}, + {0x306b, 0x33d3}, + {0x306d, 0x33d6}, + {0x30de, 0x3448}, + {0x3109, 0x3474}, + {0x3233, 0x359f}, + {0x32a2, 0x360f}, + {0x32ad, 0x361b}, + {0x35aa, 0x3919}, + {0x35ff, 0x396f}, + {0x365f, 0x39d1}, + {0x366d, 0x39e0}, + {0x3700, 0x3a74}, + {0x37da, 0x3b4f}, + {0x38f9, 0x3c6f}, + {0x396a, 0x3ce1}, + {0x3cdf, 0x4057}, + {0x3de7, 0x4160}, + {0x3fbe, 0x4338}, + {0x4032, 0x43ad}, + {0x4036, 0x43b2}, + {0x4061, 0x43de}, + {0x4159, 0x44d7}, + {0x42ce, 0x464d}, + {0x42e2, 0x4662}, + {0x43a3, 0x4724}, + {0x43a8, 0x472a}, + {0x43fa, 0x477d}, + {0x440a, 0x478e}, + {0x45c3, 0x4948}, + {0x45f5, 0x497b}, + {0x45f7, 0x497e}, + {0x45fb, 0x4984}, + {0x45fc, 0x4987}, + {0x4610, 0x499c}, + {0x4613, 0x49a0}, + {0x4629, 0x49b8}, + {0x48e8, 0x4c78}, + {0x490f, 0x4ca4}, + {0x497e, 0x4d1a}, + {0x4a12, 0x4daf}, + {0x4a63, 0x9fa6}, + {0x82bd, 0xe76c}, + {0x82be, 0xe7c8}, + {0x82bf, 0xe7e7}, + {0x82cc, 0xe815}, + {0x82cd, 0xe819}, + {0x82d2, 0xe81f}, + {0x82d9, 0xe827}, + {0x82dd, 0xe82d}, + {0x82e1, 0xe833}, + {0x82e9, 0xe83c}, + {0x82f0, 0xe844}, + {0x8300, 0xe856}, + {0x830e, 0xe865}, + {0x93d5, 0xf92d}, + {0x9421, 0xf97a}, + {0x943c, 0xf996}, + {0x948d, 0xf9e8}, + {0x9496, 0xf9f2}, + {0x94b0, 0xfa10}, + {0x94b1, 0xfa12}, + {0x94b2, 0xfa15}, + {0x94b5, 0xfa19}, + {0x94bb, 0xfa22}, + {0x94bc, 0xfa25}, + {0x94be, 0xfa2a}, + {0x98c4, 0xfe32}, + {0x98c5, 0xfe45}, + {0x98c9, 0xfe53}, + {0x98ca, 0xfe58}, + {0x98cb, 0xfe67}, + {0x98cc, 0xfe6c}, + {0x9961, 0xff5f}, + {0x99e2, 0xffe6}, +} + +// decode is the decoding table from GBK code to Unicode. +// It is defined at http://encoding.spec.whatwg.org/index-gbk.txt +var decode = [...]uint16{ + 0: 0x4E02, + 1: 0x4E04, + 2: 0x4E05, + 3: 0x4E06, + 4: 0x4E0F, + 5: 0x4E12, + 6: 0x4E17, + 7: 0x4E1F, + 8: 0x4E20, + 9: 0x4E21, + 10: 0x4E23, + 11: 0x4E26, + 12: 0x4E29, + 13: 0x4E2E, + 14: 0x4E2F, + 15: 0x4E31, + 16: 0x4E33, + 17: 0x4E35, + 18: 0x4E37, + 19: 0x4E3C, + 20: 0x4E40, + 21: 0x4E41, + 22: 0x4E42, + 23: 0x4E44, + 24: 0x4E46, + 25: 0x4E4A, + 26: 0x4E51, + 27: 0x4E55, + 28: 0x4E57, + 29: 0x4E5A, + 30: 0x4E5B, + 31: 0x4E62, + 32: 0x4E63, + 33: 0x4E64, + 34: 0x4E65, + 35: 0x4E67, + 36: 0x4E68, + 37: 0x4E6A, + 38: 0x4E6B, + 39: 0x4E6C, + 40: 0x4E6D, + 41: 0x4E6E, + 42: 0x4E6F, + 43: 0x4E72, + 44: 0x4E74, + 45: 0x4E75, + 46: 0x4E76, + 47: 0x4E77, + 48: 0x4E78, + 49: 0x4E79, + 50: 0x4E7A, + 51: 0x4E7B, + 52: 0x4E7C, + 53: 0x4E7D, + 54: 0x4E7F, + 55: 0x4E80, + 56: 0x4E81, + 57: 0x4E82, + 58: 0x4E83, + 59: 0x4E84, + 60: 0x4E85, + 61: 0x4E87, + 62: 0x4E8A, + 63: 0x4E90, + 64: 0x4E96, + 65: 0x4E97, + 66: 0x4E99, + 67: 0x4E9C, + 68: 0x4E9D, + 69: 0x4E9E, + 70: 0x4EA3, + 71: 0x4EAA, + 72: 0x4EAF, + 73: 0x4EB0, + 74: 0x4EB1, + 75: 0x4EB4, + 76: 0x4EB6, + 77: 0x4EB7, + 78: 0x4EB8, + 79: 0x4EB9, + 80: 0x4EBC, + 81: 0x4EBD, + 82: 0x4EBE, + 83: 0x4EC8, + 84: 0x4ECC, + 85: 0x4ECF, + 86: 0x4ED0, + 87: 0x4ED2, + 88: 0x4EDA, + 89: 0x4EDB, + 90: 0x4EDC, + 91: 0x4EE0, + 92: 0x4EE2, + 93: 0x4EE6, + 94: 0x4EE7, + 95: 0x4EE9, + 96: 0x4EED, + 97: 0x4EEE, + 98: 0x4EEF, + 99: 0x4EF1, + 100: 0x4EF4, + 101: 0x4EF8, + 102: 0x4EF9, + 103: 0x4EFA, + 104: 0x4EFC, + 105: 0x4EFE, + 106: 0x4F00, + 107: 0x4F02, + 108: 0x4F03, + 109: 0x4F04, + 110: 0x4F05, + 111: 0x4F06, + 112: 0x4F07, + 113: 0x4F08, + 114: 0x4F0B, + 115: 0x4F0C, + 116: 0x4F12, + 117: 0x4F13, + 118: 0x4F14, + 119: 0x4F15, + 120: 0x4F16, + 121: 0x4F1C, + 122: 0x4F1D, + 123: 0x4F21, + 124: 0x4F23, + 125: 0x4F28, + 126: 0x4F29, + 127: 0x4F2C, + 128: 0x4F2D, + 129: 0x4F2E, + 130: 0x4F31, + 131: 0x4F33, + 132: 0x4F35, + 133: 0x4F37, + 134: 0x4F39, + 135: 0x4F3B, + 136: 0x4F3E, + 137: 0x4F3F, + 138: 0x4F40, + 139: 0x4F41, + 140: 0x4F42, + 141: 0x4F44, + 142: 0x4F45, + 143: 0x4F47, + 144: 0x4F48, + 145: 0x4F49, + 146: 0x4F4A, + 147: 0x4F4B, + 148: 0x4F4C, + 149: 0x4F52, + 150: 0x4F54, + 151: 0x4F56, + 152: 0x4F61, + 153: 0x4F62, + 154: 0x4F66, + 155: 0x4F68, + 156: 0x4F6A, + 157: 0x4F6B, + 158: 0x4F6D, + 159: 0x4F6E, + 160: 0x4F71, + 161: 0x4F72, + 162: 0x4F75, + 163: 0x4F77, + 164: 0x4F78, + 165: 0x4F79, + 166: 0x4F7A, + 167: 0x4F7D, + 168: 0x4F80, + 169: 0x4F81, + 170: 0x4F82, + 171: 0x4F85, + 172: 0x4F86, + 173: 0x4F87, + 174: 0x4F8A, + 175: 0x4F8C, + 176: 0x4F8E, + 177: 0x4F90, + 178: 0x4F92, + 179: 0x4F93, + 180: 0x4F95, + 181: 0x4F96, + 182: 0x4F98, + 183: 0x4F99, + 184: 0x4F9A, + 185: 0x4F9C, + 186: 0x4F9E, + 187: 0x4F9F, + 188: 0x4FA1, + 189: 0x4FA2, + 190: 0x4FA4, + 191: 0x4FAB, + 192: 0x4FAD, + 193: 0x4FB0, + 194: 0x4FB1, + 195: 0x4FB2, + 196: 0x4FB3, + 197: 0x4FB4, + 198: 0x4FB6, + 199: 0x4FB7, + 200: 0x4FB8, + 201: 0x4FB9, + 202: 0x4FBA, + 203: 0x4FBB, + 204: 0x4FBC, + 205: 0x4FBD, + 206: 0x4FBE, + 207: 0x4FC0, + 208: 0x4FC1, + 209: 0x4FC2, + 210: 0x4FC6, + 211: 0x4FC7, + 212: 0x4FC8, + 213: 0x4FC9, + 214: 0x4FCB, + 215: 0x4FCC, + 216: 0x4FCD, + 217: 0x4FD2, + 218: 0x4FD3, + 219: 0x4FD4, + 220: 0x4FD5, + 221: 0x4FD6, + 222: 0x4FD9, + 223: 0x4FDB, + 224: 0x4FE0, + 225: 0x4FE2, + 226: 0x4FE4, + 227: 0x4FE5, + 228: 0x4FE7, + 229: 0x4FEB, + 230: 0x4FEC, + 231: 0x4FF0, + 232: 0x4FF2, + 233: 0x4FF4, + 234: 0x4FF5, + 235: 0x4FF6, + 236: 0x4FF7, + 237: 0x4FF9, + 238: 0x4FFB, + 239: 0x4FFC, + 240: 0x4FFD, + 241: 0x4FFF, + 242: 0x5000, + 243: 0x5001, + 244: 0x5002, + 245: 0x5003, + 246: 0x5004, + 247: 0x5005, + 248: 0x5006, + 249: 0x5007, + 250: 0x5008, + 251: 0x5009, + 252: 0x500A, + 253: 0x500B, + 254: 0x500E, + 255: 0x5010, + 256: 0x5011, + 257: 0x5013, + 258: 0x5015, + 259: 0x5016, + 260: 0x5017, + 261: 0x501B, + 262: 0x501D, + 263: 0x501E, + 264: 0x5020, + 265: 0x5022, + 266: 0x5023, + 267: 0x5024, + 268: 0x5027, + 269: 0x502B, + 270: 0x502F, + 271: 0x5030, + 272: 0x5031, + 273: 0x5032, + 274: 0x5033, + 275: 0x5034, + 276: 0x5035, + 277: 0x5036, + 278: 0x5037, + 279: 0x5038, + 280: 0x5039, + 281: 0x503B, + 282: 0x503D, + 283: 0x503F, + 284: 0x5040, + 285: 0x5041, + 286: 0x5042, + 287: 0x5044, + 288: 0x5045, + 289: 0x5046, + 290: 0x5049, + 291: 0x504A, + 292: 0x504B, + 293: 0x504D, + 294: 0x5050, + 295: 0x5051, + 296: 0x5052, + 297: 0x5053, + 298: 0x5054, + 299: 0x5056, + 300: 0x5057, + 301: 0x5058, + 302: 0x5059, + 303: 0x505B, + 304: 0x505D, + 305: 0x505E, + 306: 0x505F, + 307: 0x5060, + 308: 0x5061, + 309: 0x5062, + 310: 0x5063, + 311: 0x5064, + 312: 0x5066, + 313: 0x5067, + 314: 0x5068, + 315: 0x5069, + 316: 0x506A, + 317: 0x506B, + 318: 0x506D, + 319: 0x506E, + 320: 0x506F, + 321: 0x5070, + 322: 0x5071, + 323: 0x5072, + 324: 0x5073, + 325: 0x5074, + 326: 0x5075, + 327: 0x5078, + 328: 0x5079, + 329: 0x507A, + 330: 0x507C, + 331: 0x507D, + 332: 0x5081, + 333: 0x5082, + 334: 0x5083, + 335: 0x5084, + 336: 0x5086, + 337: 0x5087, + 338: 0x5089, + 339: 0x508A, + 340: 0x508B, + 341: 0x508C, + 342: 0x508E, + 343: 0x508F, + 344: 0x5090, + 345: 0x5091, + 346: 0x5092, + 347: 0x5093, + 348: 0x5094, + 349: 0x5095, + 350: 0x5096, + 351: 0x5097, + 352: 0x5098, + 353: 0x5099, + 354: 0x509A, + 355: 0x509B, + 356: 0x509C, + 357: 0x509D, + 358: 0x509E, + 359: 0x509F, + 360: 0x50A0, + 361: 0x50A1, + 362: 0x50A2, + 363: 0x50A4, + 364: 0x50A6, + 365: 0x50AA, + 366: 0x50AB, + 367: 0x50AD, + 368: 0x50AE, + 369: 0x50AF, + 370: 0x50B0, + 371: 0x50B1, + 372: 0x50B3, + 373: 0x50B4, + 374: 0x50B5, + 375: 0x50B6, + 376: 0x50B7, + 377: 0x50B8, + 378: 0x50B9, + 379: 0x50BC, + 380: 0x50BD, + 381: 0x50BE, + 382: 0x50BF, + 383: 0x50C0, + 384: 0x50C1, + 385: 0x50C2, + 386: 0x50C3, + 387: 0x50C4, + 388: 0x50C5, + 389: 0x50C6, + 390: 0x50C7, + 391: 0x50C8, + 392: 0x50C9, + 393: 0x50CA, + 394: 0x50CB, + 395: 0x50CC, + 396: 0x50CD, + 397: 0x50CE, + 398: 0x50D0, + 399: 0x50D1, + 400: 0x50D2, + 401: 0x50D3, + 402: 0x50D4, + 403: 0x50D5, + 404: 0x50D7, + 405: 0x50D8, + 406: 0x50D9, + 407: 0x50DB, + 408: 0x50DC, + 409: 0x50DD, + 410: 0x50DE, + 411: 0x50DF, + 412: 0x50E0, + 413: 0x50E1, + 414: 0x50E2, + 415: 0x50E3, + 416: 0x50E4, + 417: 0x50E5, + 418: 0x50E8, + 419: 0x50E9, + 420: 0x50EA, + 421: 0x50EB, + 422: 0x50EF, + 423: 0x50F0, + 424: 0x50F1, + 425: 0x50F2, + 426: 0x50F4, + 427: 0x50F6, + 428: 0x50F7, + 429: 0x50F8, + 430: 0x50F9, + 431: 0x50FA, + 432: 0x50FC, + 433: 0x50FD, + 434: 0x50FE, + 435: 0x50FF, + 436: 0x5100, + 437: 0x5101, + 438: 0x5102, + 439: 0x5103, + 440: 0x5104, + 441: 0x5105, + 442: 0x5108, + 443: 0x5109, + 444: 0x510A, + 445: 0x510C, + 446: 0x510D, + 447: 0x510E, + 448: 0x510F, + 449: 0x5110, + 450: 0x5111, + 451: 0x5113, + 452: 0x5114, + 453: 0x5115, + 454: 0x5116, + 455: 0x5117, + 456: 0x5118, + 457: 0x5119, + 458: 0x511A, + 459: 0x511B, + 460: 0x511C, + 461: 0x511D, + 462: 0x511E, + 463: 0x511F, + 464: 0x5120, + 465: 0x5122, + 466: 0x5123, + 467: 0x5124, + 468: 0x5125, + 469: 0x5126, + 470: 0x5127, + 471: 0x5128, + 472: 0x5129, + 473: 0x512A, + 474: 0x512B, + 475: 0x512C, + 476: 0x512D, + 477: 0x512E, + 478: 0x512F, + 479: 0x5130, + 480: 0x5131, + 481: 0x5132, + 482: 0x5133, + 483: 0x5134, + 484: 0x5135, + 485: 0x5136, + 486: 0x5137, + 487: 0x5138, + 488: 0x5139, + 489: 0x513A, + 490: 0x513B, + 491: 0x513C, + 492: 0x513D, + 493: 0x513E, + 494: 0x5142, + 495: 0x5147, + 496: 0x514A, + 497: 0x514C, + 498: 0x514E, + 499: 0x514F, + 500: 0x5150, + 501: 0x5152, + 502: 0x5153, + 503: 0x5157, + 504: 0x5158, + 505: 0x5159, + 506: 0x515B, + 507: 0x515D, + 508: 0x515E, + 509: 0x515F, + 510: 0x5160, + 511: 0x5161, + 512: 0x5163, + 513: 0x5164, + 514: 0x5166, + 515: 0x5167, + 516: 0x5169, + 517: 0x516A, + 518: 0x516F, + 519: 0x5172, + 520: 0x517A, + 521: 0x517E, + 522: 0x517F, + 523: 0x5183, + 524: 0x5184, + 525: 0x5186, + 526: 0x5187, + 527: 0x518A, + 528: 0x518B, + 529: 0x518E, + 530: 0x518F, + 531: 0x5190, + 532: 0x5191, + 533: 0x5193, + 534: 0x5194, + 535: 0x5198, + 536: 0x519A, + 537: 0x519D, + 538: 0x519E, + 539: 0x519F, + 540: 0x51A1, + 541: 0x51A3, + 542: 0x51A6, + 543: 0x51A7, + 544: 0x51A8, + 545: 0x51A9, + 546: 0x51AA, + 547: 0x51AD, + 548: 0x51AE, + 549: 0x51B4, + 550: 0x51B8, + 551: 0x51B9, + 552: 0x51BA, + 553: 0x51BE, + 554: 0x51BF, + 555: 0x51C1, + 556: 0x51C2, + 557: 0x51C3, + 558: 0x51C5, + 559: 0x51C8, + 560: 0x51CA, + 561: 0x51CD, + 562: 0x51CE, + 563: 0x51D0, + 564: 0x51D2, + 565: 0x51D3, + 566: 0x51D4, + 567: 0x51D5, + 568: 0x51D6, + 569: 0x51D7, + 570: 0x51D8, + 571: 0x51D9, + 572: 0x51DA, + 573: 0x51DC, + 574: 0x51DE, + 575: 0x51DF, + 576: 0x51E2, + 577: 0x51E3, + 578: 0x51E5, + 579: 0x51E6, + 580: 0x51E7, + 581: 0x51E8, + 582: 0x51E9, + 583: 0x51EA, + 584: 0x51EC, + 585: 0x51EE, + 586: 0x51F1, + 587: 0x51F2, + 588: 0x51F4, + 589: 0x51F7, + 590: 0x51FE, + 591: 0x5204, + 592: 0x5205, + 593: 0x5209, + 594: 0x520B, + 595: 0x520C, + 596: 0x520F, + 597: 0x5210, + 598: 0x5213, + 599: 0x5214, + 600: 0x5215, + 601: 0x521C, + 602: 0x521E, + 603: 0x521F, + 604: 0x5221, + 605: 0x5222, + 606: 0x5223, + 607: 0x5225, + 608: 0x5226, + 609: 0x5227, + 610: 0x522A, + 611: 0x522C, + 612: 0x522F, + 613: 0x5231, + 614: 0x5232, + 615: 0x5234, + 616: 0x5235, + 617: 0x523C, + 618: 0x523E, + 619: 0x5244, + 620: 0x5245, + 621: 0x5246, + 622: 0x5247, + 623: 0x5248, + 624: 0x5249, + 625: 0x524B, + 626: 0x524E, + 627: 0x524F, + 628: 0x5252, + 629: 0x5253, + 630: 0x5255, + 631: 0x5257, + 632: 0x5258, + 633: 0x5259, + 634: 0x525A, + 635: 0x525B, + 636: 0x525D, + 637: 0x525F, + 638: 0x5260, + 639: 0x5262, + 640: 0x5263, + 641: 0x5264, + 642: 0x5266, + 643: 0x5268, + 644: 0x526B, + 645: 0x526C, + 646: 0x526D, + 647: 0x526E, + 648: 0x5270, + 649: 0x5271, + 650: 0x5273, + 651: 0x5274, + 652: 0x5275, + 653: 0x5276, + 654: 0x5277, + 655: 0x5278, + 656: 0x5279, + 657: 0x527A, + 658: 0x527B, + 659: 0x527C, + 660: 0x527E, + 661: 0x5280, + 662: 0x5283, + 663: 0x5284, + 664: 0x5285, + 665: 0x5286, + 666: 0x5287, + 667: 0x5289, + 668: 0x528A, + 669: 0x528B, + 670: 0x528C, + 671: 0x528D, + 672: 0x528E, + 673: 0x528F, + 674: 0x5291, + 675: 0x5292, + 676: 0x5294, + 677: 0x5295, + 678: 0x5296, + 679: 0x5297, + 680: 0x5298, + 681: 0x5299, + 682: 0x529A, + 683: 0x529C, + 684: 0x52A4, + 685: 0x52A5, + 686: 0x52A6, + 687: 0x52A7, + 688: 0x52AE, + 689: 0x52AF, + 690: 0x52B0, + 691: 0x52B4, + 692: 0x52B5, + 693: 0x52B6, + 694: 0x52B7, + 695: 0x52B8, + 696: 0x52B9, + 697: 0x52BA, + 698: 0x52BB, + 699: 0x52BC, + 700: 0x52BD, + 701: 0x52C0, + 702: 0x52C1, + 703: 0x52C2, + 704: 0x52C4, + 705: 0x52C5, + 706: 0x52C6, + 707: 0x52C8, + 708: 0x52CA, + 709: 0x52CC, + 710: 0x52CD, + 711: 0x52CE, + 712: 0x52CF, + 713: 0x52D1, + 714: 0x52D3, + 715: 0x52D4, + 716: 0x52D5, + 717: 0x52D7, + 718: 0x52D9, + 719: 0x52DA, + 720: 0x52DB, + 721: 0x52DC, + 722: 0x52DD, + 723: 0x52DE, + 724: 0x52E0, + 725: 0x52E1, + 726: 0x52E2, + 727: 0x52E3, + 728: 0x52E5, + 729: 0x52E6, + 730: 0x52E7, + 731: 0x52E8, + 732: 0x52E9, + 733: 0x52EA, + 734: 0x52EB, + 735: 0x52EC, + 736: 0x52ED, + 737: 0x52EE, + 738: 0x52EF, + 739: 0x52F1, + 740: 0x52F2, + 741: 0x52F3, + 742: 0x52F4, + 743: 0x52F5, + 744: 0x52F6, + 745: 0x52F7, + 746: 0x52F8, + 747: 0x52FB, + 748: 0x52FC, + 749: 0x52FD, + 750: 0x5301, + 751: 0x5302, + 752: 0x5303, + 753: 0x5304, + 754: 0x5307, + 755: 0x5309, + 756: 0x530A, + 757: 0x530B, + 758: 0x530C, + 759: 0x530E, + 760: 0x5311, + 761: 0x5312, + 762: 0x5313, + 763: 0x5314, + 764: 0x5318, + 765: 0x531B, + 766: 0x531C, + 767: 0x531E, + 768: 0x531F, + 769: 0x5322, + 770: 0x5324, + 771: 0x5325, + 772: 0x5327, + 773: 0x5328, + 774: 0x5329, + 775: 0x532B, + 776: 0x532C, + 777: 0x532D, + 778: 0x532F, + 779: 0x5330, + 780: 0x5331, + 781: 0x5332, + 782: 0x5333, + 783: 0x5334, + 784: 0x5335, + 785: 0x5336, + 786: 0x5337, + 787: 0x5338, + 788: 0x533C, + 789: 0x533D, + 790: 0x5340, + 791: 0x5342, + 792: 0x5344, + 793: 0x5346, + 794: 0x534B, + 795: 0x534C, + 796: 0x534D, + 797: 0x5350, + 798: 0x5354, + 799: 0x5358, + 800: 0x5359, + 801: 0x535B, + 802: 0x535D, + 803: 0x5365, + 804: 0x5368, + 805: 0x536A, + 806: 0x536C, + 807: 0x536D, + 808: 0x5372, + 809: 0x5376, + 810: 0x5379, + 811: 0x537B, + 812: 0x537C, + 813: 0x537D, + 814: 0x537E, + 815: 0x5380, + 816: 0x5381, + 817: 0x5383, + 818: 0x5387, + 819: 0x5388, + 820: 0x538A, + 821: 0x538E, + 822: 0x538F, + 823: 0x5390, + 824: 0x5391, + 825: 0x5392, + 826: 0x5393, + 827: 0x5394, + 828: 0x5396, + 829: 0x5397, + 830: 0x5399, + 831: 0x539B, + 832: 0x539C, + 833: 0x539E, + 834: 0x53A0, + 835: 0x53A1, + 836: 0x53A4, + 837: 0x53A7, + 838: 0x53AA, + 839: 0x53AB, + 840: 0x53AC, + 841: 0x53AD, + 842: 0x53AF, + 843: 0x53B0, + 844: 0x53B1, + 845: 0x53B2, + 846: 0x53B3, + 847: 0x53B4, + 848: 0x53B5, + 849: 0x53B7, + 850: 0x53B8, + 851: 0x53B9, + 852: 0x53BA, + 853: 0x53BC, + 854: 0x53BD, + 855: 0x53BE, + 856: 0x53C0, + 857: 0x53C3, + 858: 0x53C4, + 859: 0x53C5, + 860: 0x53C6, + 861: 0x53C7, + 862: 0x53CE, + 863: 0x53CF, + 864: 0x53D0, + 865: 0x53D2, + 866: 0x53D3, + 867: 0x53D5, + 868: 0x53DA, + 869: 0x53DC, + 870: 0x53DD, + 871: 0x53DE, + 872: 0x53E1, + 873: 0x53E2, + 874: 0x53E7, + 875: 0x53F4, + 876: 0x53FA, + 877: 0x53FE, + 878: 0x53FF, + 879: 0x5400, + 880: 0x5402, + 881: 0x5405, + 882: 0x5407, + 883: 0x540B, + 884: 0x5414, + 885: 0x5418, + 886: 0x5419, + 887: 0x541A, + 888: 0x541C, + 889: 0x5422, + 890: 0x5424, + 891: 0x5425, + 892: 0x542A, + 893: 0x5430, + 894: 0x5433, + 895: 0x5436, + 896: 0x5437, + 897: 0x543A, + 898: 0x543D, + 899: 0x543F, + 900: 0x5441, + 901: 0x5442, + 902: 0x5444, + 903: 0x5445, + 904: 0x5447, + 905: 0x5449, + 906: 0x544C, + 907: 0x544D, + 908: 0x544E, + 909: 0x544F, + 910: 0x5451, + 911: 0x545A, + 912: 0x545D, + 913: 0x545E, + 914: 0x545F, + 915: 0x5460, + 916: 0x5461, + 917: 0x5463, + 918: 0x5465, + 919: 0x5467, + 920: 0x5469, + 921: 0x546A, + 922: 0x546B, + 923: 0x546C, + 924: 0x546D, + 925: 0x546E, + 926: 0x546F, + 927: 0x5470, + 928: 0x5474, + 929: 0x5479, + 930: 0x547A, + 931: 0x547E, + 932: 0x547F, + 933: 0x5481, + 934: 0x5483, + 935: 0x5485, + 936: 0x5487, + 937: 0x5488, + 938: 0x5489, + 939: 0x548A, + 940: 0x548D, + 941: 0x5491, + 942: 0x5493, + 943: 0x5497, + 944: 0x5498, + 945: 0x549C, + 946: 0x549E, + 947: 0x549F, + 948: 0x54A0, + 949: 0x54A1, + 950: 0x54A2, + 951: 0x54A5, + 952: 0x54AE, + 953: 0x54B0, + 954: 0x54B2, + 955: 0x54B5, + 956: 0x54B6, + 957: 0x54B7, + 958: 0x54B9, + 959: 0x54BA, + 960: 0x54BC, + 961: 0x54BE, + 962: 0x54C3, + 963: 0x54C5, + 964: 0x54CA, + 965: 0x54CB, + 966: 0x54D6, + 967: 0x54D8, + 968: 0x54DB, + 969: 0x54E0, + 970: 0x54E1, + 971: 0x54E2, + 972: 0x54E3, + 973: 0x54E4, + 974: 0x54EB, + 975: 0x54EC, + 976: 0x54EF, + 977: 0x54F0, + 978: 0x54F1, + 979: 0x54F4, + 980: 0x54F5, + 981: 0x54F6, + 982: 0x54F7, + 983: 0x54F8, + 984: 0x54F9, + 985: 0x54FB, + 986: 0x54FE, + 987: 0x5500, + 988: 0x5502, + 989: 0x5503, + 990: 0x5504, + 991: 0x5505, + 992: 0x5508, + 993: 0x550A, + 994: 0x550B, + 995: 0x550C, + 996: 0x550D, + 997: 0x550E, + 998: 0x5512, + 999: 0x5513, + 1000: 0x5515, + 1001: 0x5516, + 1002: 0x5517, + 1003: 0x5518, + 1004: 0x5519, + 1005: 0x551A, + 1006: 0x551C, + 1007: 0x551D, + 1008: 0x551E, + 1009: 0x551F, + 1010: 0x5521, + 1011: 0x5525, + 1012: 0x5526, + 1013: 0x5528, + 1014: 0x5529, + 1015: 0x552B, + 1016: 0x552D, + 1017: 0x5532, + 1018: 0x5534, + 1019: 0x5535, + 1020: 0x5536, + 1021: 0x5538, + 1022: 0x5539, + 1023: 0x553A, + 1024: 0x553B, + 1025: 0x553D, + 1026: 0x5540, + 1027: 0x5542, + 1028: 0x5545, + 1029: 0x5547, + 1030: 0x5548, + 1031: 0x554B, + 1032: 0x554C, + 1033: 0x554D, + 1034: 0x554E, + 1035: 0x554F, + 1036: 0x5551, + 1037: 0x5552, + 1038: 0x5553, + 1039: 0x5554, + 1040: 0x5557, + 1041: 0x5558, + 1042: 0x5559, + 1043: 0x555A, + 1044: 0x555B, + 1045: 0x555D, + 1046: 0x555E, + 1047: 0x555F, + 1048: 0x5560, + 1049: 0x5562, + 1050: 0x5563, + 1051: 0x5568, + 1052: 0x5569, + 1053: 0x556B, + 1054: 0x556F, + 1055: 0x5570, + 1056: 0x5571, + 1057: 0x5572, + 1058: 0x5573, + 1059: 0x5574, + 1060: 0x5579, + 1061: 0x557A, + 1062: 0x557D, + 1063: 0x557F, + 1064: 0x5585, + 1065: 0x5586, + 1066: 0x558C, + 1067: 0x558D, + 1068: 0x558E, + 1069: 0x5590, + 1070: 0x5592, + 1071: 0x5593, + 1072: 0x5595, + 1073: 0x5596, + 1074: 0x5597, + 1075: 0x559A, + 1076: 0x559B, + 1077: 0x559E, + 1078: 0x55A0, + 1079: 0x55A1, + 1080: 0x55A2, + 1081: 0x55A3, + 1082: 0x55A4, + 1083: 0x55A5, + 1084: 0x55A6, + 1085: 0x55A8, + 1086: 0x55A9, + 1087: 0x55AA, + 1088: 0x55AB, + 1089: 0x55AC, + 1090: 0x55AD, + 1091: 0x55AE, + 1092: 0x55AF, + 1093: 0x55B0, + 1094: 0x55B2, + 1095: 0x55B4, + 1096: 0x55B6, + 1097: 0x55B8, + 1098: 0x55BA, + 1099: 0x55BC, + 1100: 0x55BF, + 1101: 0x55C0, + 1102: 0x55C1, + 1103: 0x55C2, + 1104: 0x55C3, + 1105: 0x55C6, + 1106: 0x55C7, + 1107: 0x55C8, + 1108: 0x55CA, + 1109: 0x55CB, + 1110: 0x55CE, + 1111: 0x55CF, + 1112: 0x55D0, + 1113: 0x55D5, + 1114: 0x55D7, + 1115: 0x55D8, + 1116: 0x55D9, + 1117: 0x55DA, + 1118: 0x55DB, + 1119: 0x55DE, + 1120: 0x55E0, + 1121: 0x55E2, + 1122: 0x55E7, + 1123: 0x55E9, + 1124: 0x55ED, + 1125: 0x55EE, + 1126: 0x55F0, + 1127: 0x55F1, + 1128: 0x55F4, + 1129: 0x55F6, + 1130: 0x55F8, + 1131: 0x55F9, + 1132: 0x55FA, + 1133: 0x55FB, + 1134: 0x55FC, + 1135: 0x55FF, + 1136: 0x5602, + 1137: 0x5603, + 1138: 0x5604, + 1139: 0x5605, + 1140: 0x5606, + 1141: 0x5607, + 1142: 0x560A, + 1143: 0x560B, + 1144: 0x560D, + 1145: 0x5610, + 1146: 0x5611, + 1147: 0x5612, + 1148: 0x5613, + 1149: 0x5614, + 1150: 0x5615, + 1151: 0x5616, + 1152: 0x5617, + 1153: 0x5619, + 1154: 0x561A, + 1155: 0x561C, + 1156: 0x561D, + 1157: 0x5620, + 1158: 0x5621, + 1159: 0x5622, + 1160: 0x5625, + 1161: 0x5626, + 1162: 0x5628, + 1163: 0x5629, + 1164: 0x562A, + 1165: 0x562B, + 1166: 0x562E, + 1167: 0x562F, + 1168: 0x5630, + 1169: 0x5633, + 1170: 0x5635, + 1171: 0x5637, + 1172: 0x5638, + 1173: 0x563A, + 1174: 0x563C, + 1175: 0x563D, + 1176: 0x563E, + 1177: 0x5640, + 1178: 0x5641, + 1179: 0x5642, + 1180: 0x5643, + 1181: 0x5644, + 1182: 0x5645, + 1183: 0x5646, + 1184: 0x5647, + 1185: 0x5648, + 1186: 0x5649, + 1187: 0x564A, + 1188: 0x564B, + 1189: 0x564F, + 1190: 0x5650, + 1191: 0x5651, + 1192: 0x5652, + 1193: 0x5653, + 1194: 0x5655, + 1195: 0x5656, + 1196: 0x565A, + 1197: 0x565B, + 1198: 0x565D, + 1199: 0x565E, + 1200: 0x565F, + 1201: 0x5660, + 1202: 0x5661, + 1203: 0x5663, + 1204: 0x5665, + 1205: 0x5666, + 1206: 0x5667, + 1207: 0x566D, + 1208: 0x566E, + 1209: 0x566F, + 1210: 0x5670, + 1211: 0x5672, + 1212: 0x5673, + 1213: 0x5674, + 1214: 0x5675, + 1215: 0x5677, + 1216: 0x5678, + 1217: 0x5679, + 1218: 0x567A, + 1219: 0x567D, + 1220: 0x567E, + 1221: 0x567F, + 1222: 0x5680, + 1223: 0x5681, + 1224: 0x5682, + 1225: 0x5683, + 1226: 0x5684, + 1227: 0x5687, + 1228: 0x5688, + 1229: 0x5689, + 1230: 0x568A, + 1231: 0x568B, + 1232: 0x568C, + 1233: 0x568D, + 1234: 0x5690, + 1235: 0x5691, + 1236: 0x5692, + 1237: 0x5694, + 1238: 0x5695, + 1239: 0x5696, + 1240: 0x5697, + 1241: 0x5698, + 1242: 0x5699, + 1243: 0x569A, + 1244: 0x569B, + 1245: 0x569C, + 1246: 0x569D, + 1247: 0x569E, + 1248: 0x569F, + 1249: 0x56A0, + 1250: 0x56A1, + 1251: 0x56A2, + 1252: 0x56A4, + 1253: 0x56A5, + 1254: 0x56A6, + 1255: 0x56A7, + 1256: 0x56A8, + 1257: 0x56A9, + 1258: 0x56AA, + 1259: 0x56AB, + 1260: 0x56AC, + 1261: 0x56AD, + 1262: 0x56AE, + 1263: 0x56B0, + 1264: 0x56B1, + 1265: 0x56B2, + 1266: 0x56B3, + 1267: 0x56B4, + 1268: 0x56B5, + 1269: 0x56B6, + 1270: 0x56B8, + 1271: 0x56B9, + 1272: 0x56BA, + 1273: 0x56BB, + 1274: 0x56BD, + 1275: 0x56BE, + 1276: 0x56BF, + 1277: 0x56C0, + 1278: 0x56C1, + 1279: 0x56C2, + 1280: 0x56C3, + 1281: 0x56C4, + 1282: 0x56C5, + 1283: 0x56C6, + 1284: 0x56C7, + 1285: 0x56C8, + 1286: 0x56C9, + 1287: 0x56CB, + 1288: 0x56CC, + 1289: 0x56CD, + 1290: 0x56CE, + 1291: 0x56CF, + 1292: 0x56D0, + 1293: 0x56D1, + 1294: 0x56D2, + 1295: 0x56D3, + 1296: 0x56D5, + 1297: 0x56D6, + 1298: 0x56D8, + 1299: 0x56D9, + 1300: 0x56DC, + 1301: 0x56E3, + 1302: 0x56E5, + 1303: 0x56E6, + 1304: 0x56E7, + 1305: 0x56E8, + 1306: 0x56E9, + 1307: 0x56EA, + 1308: 0x56EC, + 1309: 0x56EE, + 1310: 0x56EF, + 1311: 0x56F2, + 1312: 0x56F3, + 1313: 0x56F6, + 1314: 0x56F7, + 1315: 0x56F8, + 1316: 0x56FB, + 1317: 0x56FC, + 1318: 0x5700, + 1319: 0x5701, + 1320: 0x5702, + 1321: 0x5705, + 1322: 0x5707, + 1323: 0x570B, + 1324: 0x570C, + 1325: 0x570D, + 1326: 0x570E, + 1327: 0x570F, + 1328: 0x5710, + 1329: 0x5711, + 1330: 0x5712, + 1331: 0x5713, + 1332: 0x5714, + 1333: 0x5715, + 1334: 0x5716, + 1335: 0x5717, + 1336: 0x5718, + 1337: 0x5719, + 1338: 0x571A, + 1339: 0x571B, + 1340: 0x571D, + 1341: 0x571E, + 1342: 0x5720, + 1343: 0x5721, + 1344: 0x5722, + 1345: 0x5724, + 1346: 0x5725, + 1347: 0x5726, + 1348: 0x5727, + 1349: 0x572B, + 1350: 0x5731, + 1351: 0x5732, + 1352: 0x5734, + 1353: 0x5735, + 1354: 0x5736, + 1355: 0x5737, + 1356: 0x5738, + 1357: 0x573C, + 1358: 0x573D, + 1359: 0x573F, + 1360: 0x5741, + 1361: 0x5743, + 1362: 0x5744, + 1363: 0x5745, + 1364: 0x5746, + 1365: 0x5748, + 1366: 0x5749, + 1367: 0x574B, + 1368: 0x5752, + 1369: 0x5753, + 1370: 0x5754, + 1371: 0x5755, + 1372: 0x5756, + 1373: 0x5758, + 1374: 0x5759, + 1375: 0x5762, + 1376: 0x5763, + 1377: 0x5765, + 1378: 0x5767, + 1379: 0x576C, + 1380: 0x576E, + 1381: 0x5770, + 1382: 0x5771, + 1383: 0x5772, + 1384: 0x5774, + 1385: 0x5775, + 1386: 0x5778, + 1387: 0x5779, + 1388: 0x577A, + 1389: 0x577D, + 1390: 0x577E, + 1391: 0x577F, + 1392: 0x5780, + 1393: 0x5781, + 1394: 0x5787, + 1395: 0x5788, + 1396: 0x5789, + 1397: 0x578A, + 1398: 0x578D, + 1399: 0x578E, + 1400: 0x578F, + 1401: 0x5790, + 1402: 0x5791, + 1403: 0x5794, + 1404: 0x5795, + 1405: 0x5796, + 1406: 0x5797, + 1407: 0x5798, + 1408: 0x5799, + 1409: 0x579A, + 1410: 0x579C, + 1411: 0x579D, + 1412: 0x579E, + 1413: 0x579F, + 1414: 0x57A5, + 1415: 0x57A8, + 1416: 0x57AA, + 1417: 0x57AC, + 1418: 0x57AF, + 1419: 0x57B0, + 1420: 0x57B1, + 1421: 0x57B3, + 1422: 0x57B5, + 1423: 0x57B6, + 1424: 0x57B7, + 1425: 0x57B9, + 1426: 0x57BA, + 1427: 0x57BB, + 1428: 0x57BC, + 1429: 0x57BD, + 1430: 0x57BE, + 1431: 0x57BF, + 1432: 0x57C0, + 1433: 0x57C1, + 1434: 0x57C4, + 1435: 0x57C5, + 1436: 0x57C6, + 1437: 0x57C7, + 1438: 0x57C8, + 1439: 0x57C9, + 1440: 0x57CA, + 1441: 0x57CC, + 1442: 0x57CD, + 1443: 0x57D0, + 1444: 0x57D1, + 1445: 0x57D3, + 1446: 0x57D6, + 1447: 0x57D7, + 1448: 0x57DB, + 1449: 0x57DC, + 1450: 0x57DE, + 1451: 0x57E1, + 1452: 0x57E2, + 1453: 0x57E3, + 1454: 0x57E5, + 1455: 0x57E6, + 1456: 0x57E7, + 1457: 0x57E8, + 1458: 0x57E9, + 1459: 0x57EA, + 1460: 0x57EB, + 1461: 0x57EC, + 1462: 0x57EE, + 1463: 0x57F0, + 1464: 0x57F1, + 1465: 0x57F2, + 1466: 0x57F3, + 1467: 0x57F5, + 1468: 0x57F6, + 1469: 0x57F7, + 1470: 0x57FB, + 1471: 0x57FC, + 1472: 0x57FE, + 1473: 0x57FF, + 1474: 0x5801, + 1475: 0x5803, + 1476: 0x5804, + 1477: 0x5805, + 1478: 0x5808, + 1479: 0x5809, + 1480: 0x580A, + 1481: 0x580C, + 1482: 0x580E, + 1483: 0x580F, + 1484: 0x5810, + 1485: 0x5812, + 1486: 0x5813, + 1487: 0x5814, + 1488: 0x5816, + 1489: 0x5817, + 1490: 0x5818, + 1491: 0x581A, + 1492: 0x581B, + 1493: 0x581C, + 1494: 0x581D, + 1495: 0x581F, + 1496: 0x5822, + 1497: 0x5823, + 1498: 0x5825, + 1499: 0x5826, + 1500: 0x5827, + 1501: 0x5828, + 1502: 0x5829, + 1503: 0x582B, + 1504: 0x582C, + 1505: 0x582D, + 1506: 0x582E, + 1507: 0x582F, + 1508: 0x5831, + 1509: 0x5832, + 1510: 0x5833, + 1511: 0x5834, + 1512: 0x5836, + 1513: 0x5837, + 1514: 0x5838, + 1515: 0x5839, + 1516: 0x583A, + 1517: 0x583B, + 1518: 0x583C, + 1519: 0x583D, + 1520: 0x583E, + 1521: 0x583F, + 1522: 0x5840, + 1523: 0x5841, + 1524: 0x5842, + 1525: 0x5843, + 1526: 0x5845, + 1527: 0x5846, + 1528: 0x5847, + 1529: 0x5848, + 1530: 0x5849, + 1531: 0x584A, + 1532: 0x584B, + 1533: 0x584E, + 1534: 0x584F, + 1535: 0x5850, + 1536: 0x5852, + 1537: 0x5853, + 1538: 0x5855, + 1539: 0x5856, + 1540: 0x5857, + 1541: 0x5859, + 1542: 0x585A, + 1543: 0x585B, + 1544: 0x585C, + 1545: 0x585D, + 1546: 0x585F, + 1547: 0x5860, + 1548: 0x5861, + 1549: 0x5862, + 1550: 0x5863, + 1551: 0x5864, + 1552: 0x5866, + 1553: 0x5867, + 1554: 0x5868, + 1555: 0x5869, + 1556: 0x586A, + 1557: 0x586D, + 1558: 0x586E, + 1559: 0x586F, + 1560: 0x5870, + 1561: 0x5871, + 1562: 0x5872, + 1563: 0x5873, + 1564: 0x5874, + 1565: 0x5875, + 1566: 0x5876, + 1567: 0x5877, + 1568: 0x5878, + 1569: 0x5879, + 1570: 0x587A, + 1571: 0x587B, + 1572: 0x587C, + 1573: 0x587D, + 1574: 0x587F, + 1575: 0x5882, + 1576: 0x5884, + 1577: 0x5886, + 1578: 0x5887, + 1579: 0x5888, + 1580: 0x588A, + 1581: 0x588B, + 1582: 0x588C, + 1583: 0x588D, + 1584: 0x588E, + 1585: 0x588F, + 1586: 0x5890, + 1587: 0x5891, + 1588: 0x5894, + 1589: 0x5895, + 1590: 0x5896, + 1591: 0x5897, + 1592: 0x5898, + 1593: 0x589B, + 1594: 0x589C, + 1595: 0x589D, + 1596: 0x58A0, + 1597: 0x58A1, + 1598: 0x58A2, + 1599: 0x58A3, + 1600: 0x58A4, + 1601: 0x58A5, + 1602: 0x58A6, + 1603: 0x58A7, + 1604: 0x58AA, + 1605: 0x58AB, + 1606: 0x58AC, + 1607: 0x58AD, + 1608: 0x58AE, + 1609: 0x58AF, + 1610: 0x58B0, + 1611: 0x58B1, + 1612: 0x58B2, + 1613: 0x58B3, + 1614: 0x58B4, + 1615: 0x58B5, + 1616: 0x58B6, + 1617: 0x58B7, + 1618: 0x58B8, + 1619: 0x58B9, + 1620: 0x58BA, + 1621: 0x58BB, + 1622: 0x58BD, + 1623: 0x58BE, + 1624: 0x58BF, + 1625: 0x58C0, + 1626: 0x58C2, + 1627: 0x58C3, + 1628: 0x58C4, + 1629: 0x58C6, + 1630: 0x58C7, + 1631: 0x58C8, + 1632: 0x58C9, + 1633: 0x58CA, + 1634: 0x58CB, + 1635: 0x58CC, + 1636: 0x58CD, + 1637: 0x58CE, + 1638: 0x58CF, + 1639: 0x58D0, + 1640: 0x58D2, + 1641: 0x58D3, + 1642: 0x58D4, + 1643: 0x58D6, + 1644: 0x58D7, + 1645: 0x58D8, + 1646: 0x58D9, + 1647: 0x58DA, + 1648: 0x58DB, + 1649: 0x58DC, + 1650: 0x58DD, + 1651: 0x58DE, + 1652: 0x58DF, + 1653: 0x58E0, + 1654: 0x58E1, + 1655: 0x58E2, + 1656: 0x58E3, + 1657: 0x58E5, + 1658: 0x58E6, + 1659: 0x58E7, + 1660: 0x58E8, + 1661: 0x58E9, + 1662: 0x58EA, + 1663: 0x58ED, + 1664: 0x58EF, + 1665: 0x58F1, + 1666: 0x58F2, + 1667: 0x58F4, + 1668: 0x58F5, + 1669: 0x58F7, + 1670: 0x58F8, + 1671: 0x58FA, + 1672: 0x58FB, + 1673: 0x58FC, + 1674: 0x58FD, + 1675: 0x58FE, + 1676: 0x58FF, + 1677: 0x5900, + 1678: 0x5901, + 1679: 0x5903, + 1680: 0x5905, + 1681: 0x5906, + 1682: 0x5908, + 1683: 0x5909, + 1684: 0x590A, + 1685: 0x590B, + 1686: 0x590C, + 1687: 0x590E, + 1688: 0x5910, + 1689: 0x5911, + 1690: 0x5912, + 1691: 0x5913, + 1692: 0x5917, + 1693: 0x5918, + 1694: 0x591B, + 1695: 0x591D, + 1696: 0x591E, + 1697: 0x5920, + 1698: 0x5921, + 1699: 0x5922, + 1700: 0x5923, + 1701: 0x5926, + 1702: 0x5928, + 1703: 0x592C, + 1704: 0x5930, + 1705: 0x5932, + 1706: 0x5933, + 1707: 0x5935, + 1708: 0x5936, + 1709: 0x593B, + 1710: 0x593D, + 1711: 0x593E, + 1712: 0x593F, + 1713: 0x5940, + 1714: 0x5943, + 1715: 0x5945, + 1716: 0x5946, + 1717: 0x594A, + 1718: 0x594C, + 1719: 0x594D, + 1720: 0x5950, + 1721: 0x5952, + 1722: 0x5953, + 1723: 0x5959, + 1724: 0x595B, + 1725: 0x595C, + 1726: 0x595D, + 1727: 0x595E, + 1728: 0x595F, + 1729: 0x5961, + 1730: 0x5963, + 1731: 0x5964, + 1732: 0x5966, + 1733: 0x5967, + 1734: 0x5968, + 1735: 0x5969, + 1736: 0x596A, + 1737: 0x596B, + 1738: 0x596C, + 1739: 0x596D, + 1740: 0x596E, + 1741: 0x596F, + 1742: 0x5970, + 1743: 0x5971, + 1744: 0x5972, + 1745: 0x5975, + 1746: 0x5977, + 1747: 0x597A, + 1748: 0x597B, + 1749: 0x597C, + 1750: 0x597E, + 1751: 0x597F, + 1752: 0x5980, + 1753: 0x5985, + 1754: 0x5989, + 1755: 0x598B, + 1756: 0x598C, + 1757: 0x598E, + 1758: 0x598F, + 1759: 0x5990, + 1760: 0x5991, + 1761: 0x5994, + 1762: 0x5995, + 1763: 0x5998, + 1764: 0x599A, + 1765: 0x599B, + 1766: 0x599C, + 1767: 0x599D, + 1768: 0x599F, + 1769: 0x59A0, + 1770: 0x59A1, + 1771: 0x59A2, + 1772: 0x59A6, + 1773: 0x59A7, + 1774: 0x59AC, + 1775: 0x59AD, + 1776: 0x59B0, + 1777: 0x59B1, + 1778: 0x59B3, + 1779: 0x59B4, + 1780: 0x59B5, + 1781: 0x59B6, + 1782: 0x59B7, + 1783: 0x59B8, + 1784: 0x59BA, + 1785: 0x59BC, + 1786: 0x59BD, + 1787: 0x59BF, + 1788: 0x59C0, + 1789: 0x59C1, + 1790: 0x59C2, + 1791: 0x59C3, + 1792: 0x59C4, + 1793: 0x59C5, + 1794: 0x59C7, + 1795: 0x59C8, + 1796: 0x59C9, + 1797: 0x59CC, + 1798: 0x59CD, + 1799: 0x59CE, + 1800: 0x59CF, + 1801: 0x59D5, + 1802: 0x59D6, + 1803: 0x59D9, + 1804: 0x59DB, + 1805: 0x59DE, + 1806: 0x59DF, + 1807: 0x59E0, + 1808: 0x59E1, + 1809: 0x59E2, + 1810: 0x59E4, + 1811: 0x59E6, + 1812: 0x59E7, + 1813: 0x59E9, + 1814: 0x59EA, + 1815: 0x59EB, + 1816: 0x59ED, + 1817: 0x59EE, + 1818: 0x59EF, + 1819: 0x59F0, + 1820: 0x59F1, + 1821: 0x59F2, + 1822: 0x59F3, + 1823: 0x59F4, + 1824: 0x59F5, + 1825: 0x59F6, + 1826: 0x59F7, + 1827: 0x59F8, + 1828: 0x59FA, + 1829: 0x59FC, + 1830: 0x59FD, + 1831: 0x59FE, + 1832: 0x5A00, + 1833: 0x5A02, + 1834: 0x5A0A, + 1835: 0x5A0B, + 1836: 0x5A0D, + 1837: 0x5A0E, + 1838: 0x5A0F, + 1839: 0x5A10, + 1840: 0x5A12, + 1841: 0x5A14, + 1842: 0x5A15, + 1843: 0x5A16, + 1844: 0x5A17, + 1845: 0x5A19, + 1846: 0x5A1A, + 1847: 0x5A1B, + 1848: 0x5A1D, + 1849: 0x5A1E, + 1850: 0x5A21, + 1851: 0x5A22, + 1852: 0x5A24, + 1853: 0x5A26, + 1854: 0x5A27, + 1855: 0x5A28, + 1856: 0x5A2A, + 1857: 0x5A2B, + 1858: 0x5A2C, + 1859: 0x5A2D, + 1860: 0x5A2E, + 1861: 0x5A2F, + 1862: 0x5A30, + 1863: 0x5A33, + 1864: 0x5A35, + 1865: 0x5A37, + 1866: 0x5A38, + 1867: 0x5A39, + 1868: 0x5A3A, + 1869: 0x5A3B, + 1870: 0x5A3D, + 1871: 0x5A3E, + 1872: 0x5A3F, + 1873: 0x5A41, + 1874: 0x5A42, + 1875: 0x5A43, + 1876: 0x5A44, + 1877: 0x5A45, + 1878: 0x5A47, + 1879: 0x5A48, + 1880: 0x5A4B, + 1881: 0x5A4C, + 1882: 0x5A4D, + 1883: 0x5A4E, + 1884: 0x5A4F, + 1885: 0x5A50, + 1886: 0x5A51, + 1887: 0x5A52, + 1888: 0x5A53, + 1889: 0x5A54, + 1890: 0x5A56, + 1891: 0x5A57, + 1892: 0x5A58, + 1893: 0x5A59, + 1894: 0x5A5B, + 1895: 0x5A5C, + 1896: 0x5A5D, + 1897: 0x5A5E, + 1898: 0x5A5F, + 1899: 0x5A60, + 1900: 0x5A61, + 1901: 0x5A63, + 1902: 0x5A64, + 1903: 0x5A65, + 1904: 0x5A66, + 1905: 0x5A68, + 1906: 0x5A69, + 1907: 0x5A6B, + 1908: 0x5A6C, + 1909: 0x5A6D, + 1910: 0x5A6E, + 1911: 0x5A6F, + 1912: 0x5A70, + 1913: 0x5A71, + 1914: 0x5A72, + 1915: 0x5A73, + 1916: 0x5A78, + 1917: 0x5A79, + 1918: 0x5A7B, + 1919: 0x5A7C, + 1920: 0x5A7D, + 1921: 0x5A7E, + 1922: 0x5A80, + 1923: 0x5A81, + 1924: 0x5A82, + 1925: 0x5A83, + 1926: 0x5A84, + 1927: 0x5A85, + 1928: 0x5A86, + 1929: 0x5A87, + 1930: 0x5A88, + 1931: 0x5A89, + 1932: 0x5A8A, + 1933: 0x5A8B, + 1934: 0x5A8C, + 1935: 0x5A8D, + 1936: 0x5A8E, + 1937: 0x5A8F, + 1938: 0x5A90, + 1939: 0x5A91, + 1940: 0x5A93, + 1941: 0x5A94, + 1942: 0x5A95, + 1943: 0x5A96, + 1944: 0x5A97, + 1945: 0x5A98, + 1946: 0x5A99, + 1947: 0x5A9C, + 1948: 0x5A9D, + 1949: 0x5A9E, + 1950: 0x5A9F, + 1951: 0x5AA0, + 1952: 0x5AA1, + 1953: 0x5AA2, + 1954: 0x5AA3, + 1955: 0x5AA4, + 1956: 0x5AA5, + 1957: 0x5AA6, + 1958: 0x5AA7, + 1959: 0x5AA8, + 1960: 0x5AA9, + 1961: 0x5AAB, + 1962: 0x5AAC, + 1963: 0x5AAD, + 1964: 0x5AAE, + 1965: 0x5AAF, + 1966: 0x5AB0, + 1967: 0x5AB1, + 1968: 0x5AB4, + 1969: 0x5AB6, + 1970: 0x5AB7, + 1971: 0x5AB9, + 1972: 0x5ABA, + 1973: 0x5ABB, + 1974: 0x5ABC, + 1975: 0x5ABD, + 1976: 0x5ABF, + 1977: 0x5AC0, + 1978: 0x5AC3, + 1979: 0x5AC4, + 1980: 0x5AC5, + 1981: 0x5AC6, + 1982: 0x5AC7, + 1983: 0x5AC8, + 1984: 0x5ACA, + 1985: 0x5ACB, + 1986: 0x5ACD, + 1987: 0x5ACE, + 1988: 0x5ACF, + 1989: 0x5AD0, + 1990: 0x5AD1, + 1991: 0x5AD3, + 1992: 0x5AD5, + 1993: 0x5AD7, + 1994: 0x5AD9, + 1995: 0x5ADA, + 1996: 0x5ADB, + 1997: 0x5ADD, + 1998: 0x5ADE, + 1999: 0x5ADF, + 2000: 0x5AE2, + 2001: 0x5AE4, + 2002: 0x5AE5, + 2003: 0x5AE7, + 2004: 0x5AE8, + 2005: 0x5AEA, + 2006: 0x5AEC, + 2007: 0x5AED, + 2008: 0x5AEE, + 2009: 0x5AEF, + 2010: 0x5AF0, + 2011: 0x5AF2, + 2012: 0x5AF3, + 2013: 0x5AF4, + 2014: 0x5AF5, + 2015: 0x5AF6, + 2016: 0x5AF7, + 2017: 0x5AF8, + 2018: 0x5AF9, + 2019: 0x5AFA, + 2020: 0x5AFB, + 2021: 0x5AFC, + 2022: 0x5AFD, + 2023: 0x5AFE, + 2024: 0x5AFF, + 2025: 0x5B00, + 2026: 0x5B01, + 2027: 0x5B02, + 2028: 0x5B03, + 2029: 0x5B04, + 2030: 0x5B05, + 2031: 0x5B06, + 2032: 0x5B07, + 2033: 0x5B08, + 2034: 0x5B0A, + 2035: 0x5B0B, + 2036: 0x5B0C, + 2037: 0x5B0D, + 2038: 0x5B0E, + 2039: 0x5B0F, + 2040: 0x5B10, + 2041: 0x5B11, + 2042: 0x5B12, + 2043: 0x5B13, + 2044: 0x5B14, + 2045: 0x5B15, + 2046: 0x5B18, + 2047: 0x5B19, + 2048: 0x5B1A, + 2049: 0x5B1B, + 2050: 0x5B1C, + 2051: 0x5B1D, + 2052: 0x5B1E, + 2053: 0x5B1F, + 2054: 0x5B20, + 2055: 0x5B21, + 2056: 0x5B22, + 2057: 0x5B23, + 2058: 0x5B24, + 2059: 0x5B25, + 2060: 0x5B26, + 2061: 0x5B27, + 2062: 0x5B28, + 2063: 0x5B29, + 2064: 0x5B2A, + 2065: 0x5B2B, + 2066: 0x5B2C, + 2067: 0x5B2D, + 2068: 0x5B2E, + 2069: 0x5B2F, + 2070: 0x5B30, + 2071: 0x5B31, + 2072: 0x5B33, + 2073: 0x5B35, + 2074: 0x5B36, + 2075: 0x5B38, + 2076: 0x5B39, + 2077: 0x5B3A, + 2078: 0x5B3B, + 2079: 0x5B3C, + 2080: 0x5B3D, + 2081: 0x5B3E, + 2082: 0x5B3F, + 2083: 0x5B41, + 2084: 0x5B42, + 2085: 0x5B43, + 2086: 0x5B44, + 2087: 0x5B45, + 2088: 0x5B46, + 2089: 0x5B47, + 2090: 0x5B48, + 2091: 0x5B49, + 2092: 0x5B4A, + 2093: 0x5B4B, + 2094: 0x5B4C, + 2095: 0x5B4D, + 2096: 0x5B4E, + 2097: 0x5B4F, + 2098: 0x5B52, + 2099: 0x5B56, + 2100: 0x5B5E, + 2101: 0x5B60, + 2102: 0x5B61, + 2103: 0x5B67, + 2104: 0x5B68, + 2105: 0x5B6B, + 2106: 0x5B6D, + 2107: 0x5B6E, + 2108: 0x5B6F, + 2109: 0x5B72, + 2110: 0x5B74, + 2111: 0x5B76, + 2112: 0x5B77, + 2113: 0x5B78, + 2114: 0x5B79, + 2115: 0x5B7B, + 2116: 0x5B7C, + 2117: 0x5B7E, + 2118: 0x5B7F, + 2119: 0x5B82, + 2120: 0x5B86, + 2121: 0x5B8A, + 2122: 0x5B8D, + 2123: 0x5B8E, + 2124: 0x5B90, + 2125: 0x5B91, + 2126: 0x5B92, + 2127: 0x5B94, + 2128: 0x5B96, + 2129: 0x5B9F, + 2130: 0x5BA7, + 2131: 0x5BA8, + 2132: 0x5BA9, + 2133: 0x5BAC, + 2134: 0x5BAD, + 2135: 0x5BAE, + 2136: 0x5BAF, + 2137: 0x5BB1, + 2138: 0x5BB2, + 2139: 0x5BB7, + 2140: 0x5BBA, + 2141: 0x5BBB, + 2142: 0x5BBC, + 2143: 0x5BC0, + 2144: 0x5BC1, + 2145: 0x5BC3, + 2146: 0x5BC8, + 2147: 0x5BC9, + 2148: 0x5BCA, + 2149: 0x5BCB, + 2150: 0x5BCD, + 2151: 0x5BCE, + 2152: 0x5BCF, + 2153: 0x5BD1, + 2154: 0x5BD4, + 2155: 0x5BD5, + 2156: 0x5BD6, + 2157: 0x5BD7, + 2158: 0x5BD8, + 2159: 0x5BD9, + 2160: 0x5BDA, + 2161: 0x5BDB, + 2162: 0x5BDC, + 2163: 0x5BE0, + 2164: 0x5BE2, + 2165: 0x5BE3, + 2166: 0x5BE6, + 2167: 0x5BE7, + 2168: 0x5BE9, + 2169: 0x5BEA, + 2170: 0x5BEB, + 2171: 0x5BEC, + 2172: 0x5BED, + 2173: 0x5BEF, + 2174: 0x5BF1, + 2175: 0x5BF2, + 2176: 0x5BF3, + 2177: 0x5BF4, + 2178: 0x5BF5, + 2179: 0x5BF6, + 2180: 0x5BF7, + 2181: 0x5BFD, + 2182: 0x5BFE, + 2183: 0x5C00, + 2184: 0x5C02, + 2185: 0x5C03, + 2186: 0x5C05, + 2187: 0x5C07, + 2188: 0x5C08, + 2189: 0x5C0B, + 2190: 0x5C0C, + 2191: 0x5C0D, + 2192: 0x5C0E, + 2193: 0x5C10, + 2194: 0x5C12, + 2195: 0x5C13, + 2196: 0x5C17, + 2197: 0x5C19, + 2198: 0x5C1B, + 2199: 0x5C1E, + 2200: 0x5C1F, + 2201: 0x5C20, + 2202: 0x5C21, + 2203: 0x5C23, + 2204: 0x5C26, + 2205: 0x5C28, + 2206: 0x5C29, + 2207: 0x5C2A, + 2208: 0x5C2B, + 2209: 0x5C2D, + 2210: 0x5C2E, + 2211: 0x5C2F, + 2212: 0x5C30, + 2213: 0x5C32, + 2214: 0x5C33, + 2215: 0x5C35, + 2216: 0x5C36, + 2217: 0x5C37, + 2218: 0x5C43, + 2219: 0x5C44, + 2220: 0x5C46, + 2221: 0x5C47, + 2222: 0x5C4C, + 2223: 0x5C4D, + 2224: 0x5C52, + 2225: 0x5C53, + 2226: 0x5C54, + 2227: 0x5C56, + 2228: 0x5C57, + 2229: 0x5C58, + 2230: 0x5C5A, + 2231: 0x5C5B, + 2232: 0x5C5C, + 2233: 0x5C5D, + 2234: 0x5C5F, + 2235: 0x5C62, + 2236: 0x5C64, + 2237: 0x5C67, + 2238: 0x5C68, + 2239: 0x5C69, + 2240: 0x5C6A, + 2241: 0x5C6B, + 2242: 0x5C6C, + 2243: 0x5C6D, + 2244: 0x5C70, + 2245: 0x5C72, + 2246: 0x5C73, + 2247: 0x5C74, + 2248: 0x5C75, + 2249: 0x5C76, + 2250: 0x5C77, + 2251: 0x5C78, + 2252: 0x5C7B, + 2253: 0x5C7C, + 2254: 0x5C7D, + 2255: 0x5C7E, + 2256: 0x5C80, + 2257: 0x5C83, + 2258: 0x5C84, + 2259: 0x5C85, + 2260: 0x5C86, + 2261: 0x5C87, + 2262: 0x5C89, + 2263: 0x5C8A, + 2264: 0x5C8B, + 2265: 0x5C8E, + 2266: 0x5C8F, + 2267: 0x5C92, + 2268: 0x5C93, + 2269: 0x5C95, + 2270: 0x5C9D, + 2271: 0x5C9E, + 2272: 0x5C9F, + 2273: 0x5CA0, + 2274: 0x5CA1, + 2275: 0x5CA4, + 2276: 0x5CA5, + 2277: 0x5CA6, + 2278: 0x5CA7, + 2279: 0x5CA8, + 2280: 0x5CAA, + 2281: 0x5CAE, + 2282: 0x5CAF, + 2283: 0x5CB0, + 2284: 0x5CB2, + 2285: 0x5CB4, + 2286: 0x5CB6, + 2287: 0x5CB9, + 2288: 0x5CBA, + 2289: 0x5CBB, + 2290: 0x5CBC, + 2291: 0x5CBE, + 2292: 0x5CC0, + 2293: 0x5CC2, + 2294: 0x5CC3, + 2295: 0x5CC5, + 2296: 0x5CC6, + 2297: 0x5CC7, + 2298: 0x5CC8, + 2299: 0x5CC9, + 2300: 0x5CCA, + 2301: 0x5CCC, + 2302: 0x5CCD, + 2303: 0x5CCE, + 2304: 0x5CCF, + 2305: 0x5CD0, + 2306: 0x5CD1, + 2307: 0x5CD3, + 2308: 0x5CD4, + 2309: 0x5CD5, + 2310: 0x5CD6, + 2311: 0x5CD7, + 2312: 0x5CD8, + 2313: 0x5CDA, + 2314: 0x5CDB, + 2315: 0x5CDC, + 2316: 0x5CDD, + 2317: 0x5CDE, + 2318: 0x5CDF, + 2319: 0x5CE0, + 2320: 0x5CE2, + 2321: 0x5CE3, + 2322: 0x5CE7, + 2323: 0x5CE9, + 2324: 0x5CEB, + 2325: 0x5CEC, + 2326: 0x5CEE, + 2327: 0x5CEF, + 2328: 0x5CF1, + 2329: 0x5CF2, + 2330: 0x5CF3, + 2331: 0x5CF4, + 2332: 0x5CF5, + 2333: 0x5CF6, + 2334: 0x5CF7, + 2335: 0x5CF8, + 2336: 0x5CF9, + 2337: 0x5CFA, + 2338: 0x5CFC, + 2339: 0x5CFD, + 2340: 0x5CFE, + 2341: 0x5CFF, + 2342: 0x5D00, + 2343: 0x5D01, + 2344: 0x5D04, + 2345: 0x5D05, + 2346: 0x5D08, + 2347: 0x5D09, + 2348: 0x5D0A, + 2349: 0x5D0B, + 2350: 0x5D0C, + 2351: 0x5D0D, + 2352: 0x5D0F, + 2353: 0x5D10, + 2354: 0x5D11, + 2355: 0x5D12, + 2356: 0x5D13, + 2357: 0x5D15, + 2358: 0x5D17, + 2359: 0x5D18, + 2360: 0x5D19, + 2361: 0x5D1A, + 2362: 0x5D1C, + 2363: 0x5D1D, + 2364: 0x5D1F, + 2365: 0x5D20, + 2366: 0x5D21, + 2367: 0x5D22, + 2368: 0x5D23, + 2369: 0x5D25, + 2370: 0x5D28, + 2371: 0x5D2A, + 2372: 0x5D2B, + 2373: 0x5D2C, + 2374: 0x5D2F, + 2375: 0x5D30, + 2376: 0x5D31, + 2377: 0x5D32, + 2378: 0x5D33, + 2379: 0x5D35, + 2380: 0x5D36, + 2381: 0x5D37, + 2382: 0x5D38, + 2383: 0x5D39, + 2384: 0x5D3A, + 2385: 0x5D3B, + 2386: 0x5D3C, + 2387: 0x5D3F, + 2388: 0x5D40, + 2389: 0x5D41, + 2390: 0x5D42, + 2391: 0x5D43, + 2392: 0x5D44, + 2393: 0x5D45, + 2394: 0x5D46, + 2395: 0x5D48, + 2396: 0x5D49, + 2397: 0x5D4D, + 2398: 0x5D4E, + 2399: 0x5D4F, + 2400: 0x5D50, + 2401: 0x5D51, + 2402: 0x5D52, + 2403: 0x5D53, + 2404: 0x5D54, + 2405: 0x5D55, + 2406: 0x5D56, + 2407: 0x5D57, + 2408: 0x5D59, + 2409: 0x5D5A, + 2410: 0x5D5C, + 2411: 0x5D5E, + 2412: 0x5D5F, + 2413: 0x5D60, + 2414: 0x5D61, + 2415: 0x5D62, + 2416: 0x5D63, + 2417: 0x5D64, + 2418: 0x5D65, + 2419: 0x5D66, + 2420: 0x5D67, + 2421: 0x5D68, + 2422: 0x5D6A, + 2423: 0x5D6D, + 2424: 0x5D6E, + 2425: 0x5D70, + 2426: 0x5D71, + 2427: 0x5D72, + 2428: 0x5D73, + 2429: 0x5D75, + 2430: 0x5D76, + 2431: 0x5D77, + 2432: 0x5D78, + 2433: 0x5D79, + 2434: 0x5D7A, + 2435: 0x5D7B, + 2436: 0x5D7C, + 2437: 0x5D7D, + 2438: 0x5D7E, + 2439: 0x5D7F, + 2440: 0x5D80, + 2441: 0x5D81, + 2442: 0x5D83, + 2443: 0x5D84, + 2444: 0x5D85, + 2445: 0x5D86, + 2446: 0x5D87, + 2447: 0x5D88, + 2448: 0x5D89, + 2449: 0x5D8A, + 2450: 0x5D8B, + 2451: 0x5D8C, + 2452: 0x5D8D, + 2453: 0x5D8E, + 2454: 0x5D8F, + 2455: 0x5D90, + 2456: 0x5D91, + 2457: 0x5D92, + 2458: 0x5D93, + 2459: 0x5D94, + 2460: 0x5D95, + 2461: 0x5D96, + 2462: 0x5D97, + 2463: 0x5D98, + 2464: 0x5D9A, + 2465: 0x5D9B, + 2466: 0x5D9C, + 2467: 0x5D9E, + 2468: 0x5D9F, + 2469: 0x5DA0, + 2470: 0x5DA1, + 2471: 0x5DA2, + 2472: 0x5DA3, + 2473: 0x5DA4, + 2474: 0x5DA5, + 2475: 0x5DA6, + 2476: 0x5DA7, + 2477: 0x5DA8, + 2478: 0x5DA9, + 2479: 0x5DAA, + 2480: 0x5DAB, + 2481: 0x5DAC, + 2482: 0x5DAD, + 2483: 0x5DAE, + 2484: 0x5DAF, + 2485: 0x5DB0, + 2486: 0x5DB1, + 2487: 0x5DB2, + 2488: 0x5DB3, + 2489: 0x5DB4, + 2490: 0x5DB5, + 2491: 0x5DB6, + 2492: 0x5DB8, + 2493: 0x5DB9, + 2494: 0x5DBA, + 2495: 0x5DBB, + 2496: 0x5DBC, + 2497: 0x5DBD, + 2498: 0x5DBE, + 2499: 0x5DBF, + 2500: 0x5DC0, + 2501: 0x5DC1, + 2502: 0x5DC2, + 2503: 0x5DC3, + 2504: 0x5DC4, + 2505: 0x5DC6, + 2506: 0x5DC7, + 2507: 0x5DC8, + 2508: 0x5DC9, + 2509: 0x5DCA, + 2510: 0x5DCB, + 2511: 0x5DCC, + 2512: 0x5DCE, + 2513: 0x5DCF, + 2514: 0x5DD0, + 2515: 0x5DD1, + 2516: 0x5DD2, + 2517: 0x5DD3, + 2518: 0x5DD4, + 2519: 0x5DD5, + 2520: 0x5DD6, + 2521: 0x5DD7, + 2522: 0x5DD8, + 2523: 0x5DD9, + 2524: 0x5DDA, + 2525: 0x5DDC, + 2526: 0x5DDF, + 2527: 0x5DE0, + 2528: 0x5DE3, + 2529: 0x5DE4, + 2530: 0x5DEA, + 2531: 0x5DEC, + 2532: 0x5DED, + 2533: 0x5DF0, + 2534: 0x5DF5, + 2535: 0x5DF6, + 2536: 0x5DF8, + 2537: 0x5DF9, + 2538: 0x5DFA, + 2539: 0x5DFB, + 2540: 0x5DFC, + 2541: 0x5DFF, + 2542: 0x5E00, + 2543: 0x5E04, + 2544: 0x5E07, + 2545: 0x5E09, + 2546: 0x5E0A, + 2547: 0x5E0B, + 2548: 0x5E0D, + 2549: 0x5E0E, + 2550: 0x5E12, + 2551: 0x5E13, + 2552: 0x5E17, + 2553: 0x5E1E, + 2554: 0x5E1F, + 2555: 0x5E20, + 2556: 0x5E21, + 2557: 0x5E22, + 2558: 0x5E23, + 2559: 0x5E24, + 2560: 0x5E25, + 2561: 0x5E28, + 2562: 0x5E29, + 2563: 0x5E2A, + 2564: 0x5E2B, + 2565: 0x5E2C, + 2566: 0x5E2F, + 2567: 0x5E30, + 2568: 0x5E32, + 2569: 0x5E33, + 2570: 0x5E34, + 2571: 0x5E35, + 2572: 0x5E36, + 2573: 0x5E39, + 2574: 0x5E3A, + 2575: 0x5E3E, + 2576: 0x5E3F, + 2577: 0x5E40, + 2578: 0x5E41, + 2579: 0x5E43, + 2580: 0x5E46, + 2581: 0x5E47, + 2582: 0x5E48, + 2583: 0x5E49, + 2584: 0x5E4A, + 2585: 0x5E4B, + 2586: 0x5E4D, + 2587: 0x5E4E, + 2588: 0x5E4F, + 2589: 0x5E50, + 2590: 0x5E51, + 2591: 0x5E52, + 2592: 0x5E53, + 2593: 0x5E56, + 2594: 0x5E57, + 2595: 0x5E58, + 2596: 0x5E59, + 2597: 0x5E5A, + 2598: 0x5E5C, + 2599: 0x5E5D, + 2600: 0x5E5F, + 2601: 0x5E60, + 2602: 0x5E63, + 2603: 0x5E64, + 2604: 0x5E65, + 2605: 0x5E66, + 2606: 0x5E67, + 2607: 0x5E68, + 2608: 0x5E69, + 2609: 0x5E6A, + 2610: 0x5E6B, + 2611: 0x5E6C, + 2612: 0x5E6D, + 2613: 0x5E6E, + 2614: 0x5E6F, + 2615: 0x5E70, + 2616: 0x5E71, + 2617: 0x5E75, + 2618: 0x5E77, + 2619: 0x5E79, + 2620: 0x5E7E, + 2621: 0x5E81, + 2622: 0x5E82, + 2623: 0x5E83, + 2624: 0x5E85, + 2625: 0x5E88, + 2626: 0x5E89, + 2627: 0x5E8C, + 2628: 0x5E8D, + 2629: 0x5E8E, + 2630: 0x5E92, + 2631: 0x5E98, + 2632: 0x5E9B, + 2633: 0x5E9D, + 2634: 0x5EA1, + 2635: 0x5EA2, + 2636: 0x5EA3, + 2637: 0x5EA4, + 2638: 0x5EA8, + 2639: 0x5EA9, + 2640: 0x5EAA, + 2641: 0x5EAB, + 2642: 0x5EAC, + 2643: 0x5EAE, + 2644: 0x5EAF, + 2645: 0x5EB0, + 2646: 0x5EB1, + 2647: 0x5EB2, + 2648: 0x5EB4, + 2649: 0x5EBA, + 2650: 0x5EBB, + 2651: 0x5EBC, + 2652: 0x5EBD, + 2653: 0x5EBF, + 2654: 0x5EC0, + 2655: 0x5EC1, + 2656: 0x5EC2, + 2657: 0x5EC3, + 2658: 0x5EC4, + 2659: 0x5EC5, + 2660: 0x5EC6, + 2661: 0x5EC7, + 2662: 0x5EC8, + 2663: 0x5ECB, + 2664: 0x5ECC, + 2665: 0x5ECD, + 2666: 0x5ECE, + 2667: 0x5ECF, + 2668: 0x5ED0, + 2669: 0x5ED4, + 2670: 0x5ED5, + 2671: 0x5ED7, + 2672: 0x5ED8, + 2673: 0x5ED9, + 2674: 0x5EDA, + 2675: 0x5EDC, + 2676: 0x5EDD, + 2677: 0x5EDE, + 2678: 0x5EDF, + 2679: 0x5EE0, + 2680: 0x5EE1, + 2681: 0x5EE2, + 2682: 0x5EE3, + 2683: 0x5EE4, + 2684: 0x5EE5, + 2685: 0x5EE6, + 2686: 0x5EE7, + 2687: 0x5EE9, + 2688: 0x5EEB, + 2689: 0x5EEC, + 2690: 0x5EED, + 2691: 0x5EEE, + 2692: 0x5EEF, + 2693: 0x5EF0, + 2694: 0x5EF1, + 2695: 0x5EF2, + 2696: 0x5EF3, + 2697: 0x5EF5, + 2698: 0x5EF8, + 2699: 0x5EF9, + 2700: 0x5EFB, + 2701: 0x5EFC, + 2702: 0x5EFD, + 2703: 0x5F05, + 2704: 0x5F06, + 2705: 0x5F07, + 2706: 0x5F09, + 2707: 0x5F0C, + 2708: 0x5F0D, + 2709: 0x5F0E, + 2710: 0x5F10, + 2711: 0x5F12, + 2712: 0x5F14, + 2713: 0x5F16, + 2714: 0x5F19, + 2715: 0x5F1A, + 2716: 0x5F1C, + 2717: 0x5F1D, + 2718: 0x5F1E, + 2719: 0x5F21, + 2720: 0x5F22, + 2721: 0x5F23, + 2722: 0x5F24, + 2723: 0x5F28, + 2724: 0x5F2B, + 2725: 0x5F2C, + 2726: 0x5F2E, + 2727: 0x5F30, + 2728: 0x5F32, + 2729: 0x5F33, + 2730: 0x5F34, + 2731: 0x5F35, + 2732: 0x5F36, + 2733: 0x5F37, + 2734: 0x5F38, + 2735: 0x5F3B, + 2736: 0x5F3D, + 2737: 0x5F3E, + 2738: 0x5F3F, + 2739: 0x5F41, + 2740: 0x5F42, + 2741: 0x5F43, + 2742: 0x5F44, + 2743: 0x5F45, + 2744: 0x5F46, + 2745: 0x5F47, + 2746: 0x5F48, + 2747: 0x5F49, + 2748: 0x5F4A, + 2749: 0x5F4B, + 2750: 0x5F4C, + 2751: 0x5F4D, + 2752: 0x5F4E, + 2753: 0x5F4F, + 2754: 0x5F51, + 2755: 0x5F54, + 2756: 0x5F59, + 2757: 0x5F5A, + 2758: 0x5F5B, + 2759: 0x5F5C, + 2760: 0x5F5E, + 2761: 0x5F5F, + 2762: 0x5F60, + 2763: 0x5F63, + 2764: 0x5F65, + 2765: 0x5F67, + 2766: 0x5F68, + 2767: 0x5F6B, + 2768: 0x5F6E, + 2769: 0x5F6F, + 2770: 0x5F72, + 2771: 0x5F74, + 2772: 0x5F75, + 2773: 0x5F76, + 2774: 0x5F78, + 2775: 0x5F7A, + 2776: 0x5F7D, + 2777: 0x5F7E, + 2778: 0x5F7F, + 2779: 0x5F83, + 2780: 0x5F86, + 2781: 0x5F8D, + 2782: 0x5F8E, + 2783: 0x5F8F, + 2784: 0x5F91, + 2785: 0x5F93, + 2786: 0x5F94, + 2787: 0x5F96, + 2788: 0x5F9A, + 2789: 0x5F9B, + 2790: 0x5F9D, + 2791: 0x5F9E, + 2792: 0x5F9F, + 2793: 0x5FA0, + 2794: 0x5FA2, + 2795: 0x5FA3, + 2796: 0x5FA4, + 2797: 0x5FA5, + 2798: 0x5FA6, + 2799: 0x5FA7, + 2800: 0x5FA9, + 2801: 0x5FAB, + 2802: 0x5FAC, + 2803: 0x5FAF, + 2804: 0x5FB0, + 2805: 0x5FB1, + 2806: 0x5FB2, + 2807: 0x5FB3, + 2808: 0x5FB4, + 2809: 0x5FB6, + 2810: 0x5FB8, + 2811: 0x5FB9, + 2812: 0x5FBA, + 2813: 0x5FBB, + 2814: 0x5FBE, + 2815: 0x5FBF, + 2816: 0x5FC0, + 2817: 0x5FC1, + 2818: 0x5FC2, + 2819: 0x5FC7, + 2820: 0x5FC8, + 2821: 0x5FCA, + 2822: 0x5FCB, + 2823: 0x5FCE, + 2824: 0x5FD3, + 2825: 0x5FD4, + 2826: 0x5FD5, + 2827: 0x5FDA, + 2828: 0x5FDB, + 2829: 0x5FDC, + 2830: 0x5FDE, + 2831: 0x5FDF, + 2832: 0x5FE2, + 2833: 0x5FE3, + 2834: 0x5FE5, + 2835: 0x5FE6, + 2836: 0x5FE8, + 2837: 0x5FE9, + 2838: 0x5FEC, + 2839: 0x5FEF, + 2840: 0x5FF0, + 2841: 0x5FF2, + 2842: 0x5FF3, + 2843: 0x5FF4, + 2844: 0x5FF6, + 2845: 0x5FF7, + 2846: 0x5FF9, + 2847: 0x5FFA, + 2848: 0x5FFC, + 2849: 0x6007, + 2850: 0x6008, + 2851: 0x6009, + 2852: 0x600B, + 2853: 0x600C, + 2854: 0x6010, + 2855: 0x6011, + 2856: 0x6013, + 2857: 0x6017, + 2858: 0x6018, + 2859: 0x601A, + 2860: 0x601E, + 2861: 0x601F, + 2862: 0x6022, + 2863: 0x6023, + 2864: 0x6024, + 2865: 0x602C, + 2866: 0x602D, + 2867: 0x602E, + 2868: 0x6030, + 2869: 0x6031, + 2870: 0x6032, + 2871: 0x6033, + 2872: 0x6034, + 2873: 0x6036, + 2874: 0x6037, + 2875: 0x6038, + 2876: 0x6039, + 2877: 0x603A, + 2878: 0x603D, + 2879: 0x603E, + 2880: 0x6040, + 2881: 0x6044, + 2882: 0x6045, + 2883: 0x6046, + 2884: 0x6047, + 2885: 0x6048, + 2886: 0x6049, + 2887: 0x604A, + 2888: 0x604C, + 2889: 0x604E, + 2890: 0x604F, + 2891: 0x6051, + 2892: 0x6053, + 2893: 0x6054, + 2894: 0x6056, + 2895: 0x6057, + 2896: 0x6058, + 2897: 0x605B, + 2898: 0x605C, + 2899: 0x605E, + 2900: 0x605F, + 2901: 0x6060, + 2902: 0x6061, + 2903: 0x6065, + 2904: 0x6066, + 2905: 0x606E, + 2906: 0x6071, + 2907: 0x6072, + 2908: 0x6074, + 2909: 0x6075, + 2910: 0x6077, + 2911: 0x607E, + 2912: 0x6080, + 2913: 0x6081, + 2914: 0x6082, + 2915: 0x6085, + 2916: 0x6086, + 2917: 0x6087, + 2918: 0x6088, + 2919: 0x608A, + 2920: 0x608B, + 2921: 0x608E, + 2922: 0x608F, + 2923: 0x6090, + 2924: 0x6091, + 2925: 0x6093, + 2926: 0x6095, + 2927: 0x6097, + 2928: 0x6098, + 2929: 0x6099, + 2930: 0x609C, + 2931: 0x609E, + 2932: 0x60A1, + 2933: 0x60A2, + 2934: 0x60A4, + 2935: 0x60A5, + 2936: 0x60A7, + 2937: 0x60A9, + 2938: 0x60AA, + 2939: 0x60AE, + 2940: 0x60B0, + 2941: 0x60B3, + 2942: 0x60B5, + 2943: 0x60B6, + 2944: 0x60B7, + 2945: 0x60B9, + 2946: 0x60BA, + 2947: 0x60BD, + 2948: 0x60BE, + 2949: 0x60BF, + 2950: 0x60C0, + 2951: 0x60C1, + 2952: 0x60C2, + 2953: 0x60C3, + 2954: 0x60C4, + 2955: 0x60C7, + 2956: 0x60C8, + 2957: 0x60C9, + 2958: 0x60CC, + 2959: 0x60CD, + 2960: 0x60CE, + 2961: 0x60CF, + 2962: 0x60D0, + 2963: 0x60D2, + 2964: 0x60D3, + 2965: 0x60D4, + 2966: 0x60D6, + 2967: 0x60D7, + 2968: 0x60D9, + 2969: 0x60DB, + 2970: 0x60DE, + 2971: 0x60E1, + 2972: 0x60E2, + 2973: 0x60E3, + 2974: 0x60E4, + 2975: 0x60E5, + 2976: 0x60EA, + 2977: 0x60F1, + 2978: 0x60F2, + 2979: 0x60F5, + 2980: 0x60F7, + 2981: 0x60F8, + 2982: 0x60FB, + 2983: 0x60FC, + 2984: 0x60FD, + 2985: 0x60FE, + 2986: 0x60FF, + 2987: 0x6102, + 2988: 0x6103, + 2989: 0x6104, + 2990: 0x6105, + 2991: 0x6107, + 2992: 0x610A, + 2993: 0x610B, + 2994: 0x610C, + 2995: 0x6110, + 2996: 0x6111, + 2997: 0x6112, + 2998: 0x6113, + 2999: 0x6114, + 3000: 0x6116, + 3001: 0x6117, + 3002: 0x6118, + 3003: 0x6119, + 3004: 0x611B, + 3005: 0x611C, + 3006: 0x611D, + 3007: 0x611E, + 3008: 0x6121, + 3009: 0x6122, + 3010: 0x6125, + 3011: 0x6128, + 3012: 0x6129, + 3013: 0x612A, + 3014: 0x612C, + 3015: 0x612D, + 3016: 0x612E, + 3017: 0x612F, + 3018: 0x6130, + 3019: 0x6131, + 3020: 0x6132, + 3021: 0x6133, + 3022: 0x6134, + 3023: 0x6135, + 3024: 0x6136, + 3025: 0x6137, + 3026: 0x6138, + 3027: 0x6139, + 3028: 0x613A, + 3029: 0x613B, + 3030: 0x613C, + 3031: 0x613D, + 3032: 0x613E, + 3033: 0x6140, + 3034: 0x6141, + 3035: 0x6142, + 3036: 0x6143, + 3037: 0x6144, + 3038: 0x6145, + 3039: 0x6146, + 3040: 0x6147, + 3041: 0x6149, + 3042: 0x614B, + 3043: 0x614D, + 3044: 0x614F, + 3045: 0x6150, + 3046: 0x6152, + 3047: 0x6153, + 3048: 0x6154, + 3049: 0x6156, + 3050: 0x6157, + 3051: 0x6158, + 3052: 0x6159, + 3053: 0x615A, + 3054: 0x615B, + 3055: 0x615C, + 3056: 0x615E, + 3057: 0x615F, + 3058: 0x6160, + 3059: 0x6161, + 3060: 0x6163, + 3061: 0x6164, + 3062: 0x6165, + 3063: 0x6166, + 3064: 0x6169, + 3065: 0x616A, + 3066: 0x616B, + 3067: 0x616C, + 3068: 0x616D, + 3069: 0x616E, + 3070: 0x616F, + 3071: 0x6171, + 3072: 0x6172, + 3073: 0x6173, + 3074: 0x6174, + 3075: 0x6176, + 3076: 0x6178, + 3077: 0x6179, + 3078: 0x617A, + 3079: 0x617B, + 3080: 0x617C, + 3081: 0x617D, + 3082: 0x617E, + 3083: 0x617F, + 3084: 0x6180, + 3085: 0x6181, + 3086: 0x6182, + 3087: 0x6183, + 3088: 0x6184, + 3089: 0x6185, + 3090: 0x6186, + 3091: 0x6187, + 3092: 0x6188, + 3093: 0x6189, + 3094: 0x618A, + 3095: 0x618C, + 3096: 0x618D, + 3097: 0x618F, + 3098: 0x6190, + 3099: 0x6191, + 3100: 0x6192, + 3101: 0x6193, + 3102: 0x6195, + 3103: 0x6196, + 3104: 0x6197, + 3105: 0x6198, + 3106: 0x6199, + 3107: 0x619A, + 3108: 0x619B, + 3109: 0x619C, + 3110: 0x619E, + 3111: 0x619F, + 3112: 0x61A0, + 3113: 0x61A1, + 3114: 0x61A2, + 3115: 0x61A3, + 3116: 0x61A4, + 3117: 0x61A5, + 3118: 0x61A6, + 3119: 0x61AA, + 3120: 0x61AB, + 3121: 0x61AD, + 3122: 0x61AE, + 3123: 0x61AF, + 3124: 0x61B0, + 3125: 0x61B1, + 3126: 0x61B2, + 3127: 0x61B3, + 3128: 0x61B4, + 3129: 0x61B5, + 3130: 0x61B6, + 3131: 0x61B8, + 3132: 0x61B9, + 3133: 0x61BA, + 3134: 0x61BB, + 3135: 0x61BC, + 3136: 0x61BD, + 3137: 0x61BF, + 3138: 0x61C0, + 3139: 0x61C1, + 3140: 0x61C3, + 3141: 0x61C4, + 3142: 0x61C5, + 3143: 0x61C6, + 3144: 0x61C7, + 3145: 0x61C9, + 3146: 0x61CC, + 3147: 0x61CD, + 3148: 0x61CE, + 3149: 0x61CF, + 3150: 0x61D0, + 3151: 0x61D3, + 3152: 0x61D5, + 3153: 0x61D6, + 3154: 0x61D7, + 3155: 0x61D8, + 3156: 0x61D9, + 3157: 0x61DA, + 3158: 0x61DB, + 3159: 0x61DC, + 3160: 0x61DD, + 3161: 0x61DE, + 3162: 0x61DF, + 3163: 0x61E0, + 3164: 0x61E1, + 3165: 0x61E2, + 3166: 0x61E3, + 3167: 0x61E4, + 3168: 0x61E5, + 3169: 0x61E7, + 3170: 0x61E8, + 3171: 0x61E9, + 3172: 0x61EA, + 3173: 0x61EB, + 3174: 0x61EC, + 3175: 0x61ED, + 3176: 0x61EE, + 3177: 0x61EF, + 3178: 0x61F0, + 3179: 0x61F1, + 3180: 0x61F2, + 3181: 0x61F3, + 3182: 0x61F4, + 3183: 0x61F6, + 3184: 0x61F7, + 3185: 0x61F8, + 3186: 0x61F9, + 3187: 0x61FA, + 3188: 0x61FB, + 3189: 0x61FC, + 3190: 0x61FD, + 3191: 0x61FE, + 3192: 0x6200, + 3193: 0x6201, + 3194: 0x6202, + 3195: 0x6203, + 3196: 0x6204, + 3197: 0x6205, + 3198: 0x6207, + 3199: 0x6209, + 3200: 0x6213, + 3201: 0x6214, + 3202: 0x6219, + 3203: 0x621C, + 3204: 0x621D, + 3205: 0x621E, + 3206: 0x6220, + 3207: 0x6223, + 3208: 0x6226, + 3209: 0x6227, + 3210: 0x6228, + 3211: 0x6229, + 3212: 0x622B, + 3213: 0x622D, + 3214: 0x622F, + 3215: 0x6230, + 3216: 0x6231, + 3217: 0x6232, + 3218: 0x6235, + 3219: 0x6236, + 3220: 0x6238, + 3221: 0x6239, + 3222: 0x623A, + 3223: 0x623B, + 3224: 0x623C, + 3225: 0x6242, + 3226: 0x6244, + 3227: 0x6245, + 3228: 0x6246, + 3229: 0x624A, + 3230: 0x624F, + 3231: 0x6250, + 3232: 0x6255, + 3233: 0x6256, + 3234: 0x6257, + 3235: 0x6259, + 3236: 0x625A, + 3237: 0x625C, + 3238: 0x625D, + 3239: 0x625E, + 3240: 0x625F, + 3241: 0x6260, + 3242: 0x6261, + 3243: 0x6262, + 3244: 0x6264, + 3245: 0x6265, + 3246: 0x6268, + 3247: 0x6271, + 3248: 0x6272, + 3249: 0x6274, + 3250: 0x6275, + 3251: 0x6277, + 3252: 0x6278, + 3253: 0x627A, + 3254: 0x627B, + 3255: 0x627D, + 3256: 0x6281, + 3257: 0x6282, + 3258: 0x6283, + 3259: 0x6285, + 3260: 0x6286, + 3261: 0x6287, + 3262: 0x6288, + 3263: 0x628B, + 3264: 0x628C, + 3265: 0x628D, + 3266: 0x628E, + 3267: 0x628F, + 3268: 0x6290, + 3269: 0x6294, + 3270: 0x6299, + 3271: 0x629C, + 3272: 0x629D, + 3273: 0x629E, + 3274: 0x62A3, + 3275: 0x62A6, + 3276: 0x62A7, + 3277: 0x62A9, + 3278: 0x62AA, + 3279: 0x62AD, + 3280: 0x62AE, + 3281: 0x62AF, + 3282: 0x62B0, + 3283: 0x62B2, + 3284: 0x62B3, + 3285: 0x62B4, + 3286: 0x62B6, + 3287: 0x62B7, + 3288: 0x62B8, + 3289: 0x62BA, + 3290: 0x62BE, + 3291: 0x62C0, + 3292: 0x62C1, + 3293: 0x62C3, + 3294: 0x62CB, + 3295: 0x62CF, + 3296: 0x62D1, + 3297: 0x62D5, + 3298: 0x62DD, + 3299: 0x62DE, + 3300: 0x62E0, + 3301: 0x62E1, + 3302: 0x62E4, + 3303: 0x62EA, + 3304: 0x62EB, + 3305: 0x62F0, + 3306: 0x62F2, + 3307: 0x62F5, + 3308: 0x62F8, + 3309: 0x62F9, + 3310: 0x62FA, + 3311: 0x62FB, + 3312: 0x6300, + 3313: 0x6303, + 3314: 0x6304, + 3315: 0x6305, + 3316: 0x6306, + 3317: 0x630A, + 3318: 0x630B, + 3319: 0x630C, + 3320: 0x630D, + 3321: 0x630F, + 3322: 0x6310, + 3323: 0x6312, + 3324: 0x6313, + 3325: 0x6314, + 3326: 0x6315, + 3327: 0x6317, + 3328: 0x6318, + 3329: 0x6319, + 3330: 0x631C, + 3331: 0x6326, + 3332: 0x6327, + 3333: 0x6329, + 3334: 0x632C, + 3335: 0x632D, + 3336: 0x632E, + 3337: 0x6330, + 3338: 0x6331, + 3339: 0x6333, + 3340: 0x6334, + 3341: 0x6335, + 3342: 0x6336, + 3343: 0x6337, + 3344: 0x6338, + 3345: 0x633B, + 3346: 0x633C, + 3347: 0x633E, + 3348: 0x633F, + 3349: 0x6340, + 3350: 0x6341, + 3351: 0x6344, + 3352: 0x6347, + 3353: 0x6348, + 3354: 0x634A, + 3355: 0x6351, + 3356: 0x6352, + 3357: 0x6353, + 3358: 0x6354, + 3359: 0x6356, + 3360: 0x6357, + 3361: 0x6358, + 3362: 0x6359, + 3363: 0x635A, + 3364: 0x635B, + 3365: 0x635C, + 3366: 0x635D, + 3367: 0x6360, + 3368: 0x6364, + 3369: 0x6365, + 3370: 0x6366, + 3371: 0x6368, + 3372: 0x636A, + 3373: 0x636B, + 3374: 0x636C, + 3375: 0x636F, + 3376: 0x6370, + 3377: 0x6372, + 3378: 0x6373, + 3379: 0x6374, + 3380: 0x6375, + 3381: 0x6378, + 3382: 0x6379, + 3383: 0x637C, + 3384: 0x637D, + 3385: 0x637E, + 3386: 0x637F, + 3387: 0x6381, + 3388: 0x6383, + 3389: 0x6384, + 3390: 0x6385, + 3391: 0x6386, + 3392: 0x638B, + 3393: 0x638D, + 3394: 0x6391, + 3395: 0x6393, + 3396: 0x6394, + 3397: 0x6395, + 3398: 0x6397, + 3399: 0x6399, + 3400: 0x639A, + 3401: 0x639B, + 3402: 0x639C, + 3403: 0x639D, + 3404: 0x639E, + 3405: 0x639F, + 3406: 0x63A1, + 3407: 0x63A4, + 3408: 0x63A6, + 3409: 0x63AB, + 3410: 0x63AF, + 3411: 0x63B1, + 3412: 0x63B2, + 3413: 0x63B5, + 3414: 0x63B6, + 3415: 0x63B9, + 3416: 0x63BB, + 3417: 0x63BD, + 3418: 0x63BF, + 3419: 0x63C0, + 3420: 0x63C1, + 3421: 0x63C2, + 3422: 0x63C3, + 3423: 0x63C5, + 3424: 0x63C7, + 3425: 0x63C8, + 3426: 0x63CA, + 3427: 0x63CB, + 3428: 0x63CC, + 3429: 0x63D1, + 3430: 0x63D3, + 3431: 0x63D4, + 3432: 0x63D5, + 3433: 0x63D7, + 3434: 0x63D8, + 3435: 0x63D9, + 3436: 0x63DA, + 3437: 0x63DB, + 3438: 0x63DC, + 3439: 0x63DD, + 3440: 0x63DF, + 3441: 0x63E2, + 3442: 0x63E4, + 3443: 0x63E5, + 3444: 0x63E6, + 3445: 0x63E7, + 3446: 0x63E8, + 3447: 0x63EB, + 3448: 0x63EC, + 3449: 0x63EE, + 3450: 0x63EF, + 3451: 0x63F0, + 3452: 0x63F1, + 3453: 0x63F3, + 3454: 0x63F5, + 3455: 0x63F7, + 3456: 0x63F9, + 3457: 0x63FA, + 3458: 0x63FB, + 3459: 0x63FC, + 3460: 0x63FE, + 3461: 0x6403, + 3462: 0x6404, + 3463: 0x6406, + 3464: 0x6407, + 3465: 0x6408, + 3466: 0x6409, + 3467: 0x640A, + 3468: 0x640D, + 3469: 0x640E, + 3470: 0x6411, + 3471: 0x6412, + 3472: 0x6415, + 3473: 0x6416, + 3474: 0x6417, + 3475: 0x6418, + 3476: 0x6419, + 3477: 0x641A, + 3478: 0x641D, + 3479: 0x641F, + 3480: 0x6422, + 3481: 0x6423, + 3482: 0x6424, + 3483: 0x6425, + 3484: 0x6427, + 3485: 0x6428, + 3486: 0x6429, + 3487: 0x642B, + 3488: 0x642E, + 3489: 0x642F, + 3490: 0x6430, + 3491: 0x6431, + 3492: 0x6432, + 3493: 0x6433, + 3494: 0x6435, + 3495: 0x6436, + 3496: 0x6437, + 3497: 0x6438, + 3498: 0x6439, + 3499: 0x643B, + 3500: 0x643C, + 3501: 0x643E, + 3502: 0x6440, + 3503: 0x6442, + 3504: 0x6443, + 3505: 0x6449, + 3506: 0x644B, + 3507: 0x644C, + 3508: 0x644D, + 3509: 0x644E, + 3510: 0x644F, + 3511: 0x6450, + 3512: 0x6451, + 3513: 0x6453, + 3514: 0x6455, + 3515: 0x6456, + 3516: 0x6457, + 3517: 0x6459, + 3518: 0x645A, + 3519: 0x645B, + 3520: 0x645C, + 3521: 0x645D, + 3522: 0x645F, + 3523: 0x6460, + 3524: 0x6461, + 3525: 0x6462, + 3526: 0x6463, + 3527: 0x6464, + 3528: 0x6465, + 3529: 0x6466, + 3530: 0x6468, + 3531: 0x646A, + 3532: 0x646B, + 3533: 0x646C, + 3534: 0x646E, + 3535: 0x646F, + 3536: 0x6470, + 3537: 0x6471, + 3538: 0x6472, + 3539: 0x6473, + 3540: 0x6474, + 3541: 0x6475, + 3542: 0x6476, + 3543: 0x6477, + 3544: 0x647B, + 3545: 0x647C, + 3546: 0x647D, + 3547: 0x647E, + 3548: 0x647F, + 3549: 0x6480, + 3550: 0x6481, + 3551: 0x6483, + 3552: 0x6486, + 3553: 0x6488, + 3554: 0x6489, + 3555: 0x648A, + 3556: 0x648B, + 3557: 0x648C, + 3558: 0x648D, + 3559: 0x648E, + 3560: 0x648F, + 3561: 0x6490, + 3562: 0x6493, + 3563: 0x6494, + 3564: 0x6497, + 3565: 0x6498, + 3566: 0x649A, + 3567: 0x649B, + 3568: 0x649C, + 3569: 0x649D, + 3570: 0x649F, + 3571: 0x64A0, + 3572: 0x64A1, + 3573: 0x64A2, + 3574: 0x64A3, + 3575: 0x64A5, + 3576: 0x64A6, + 3577: 0x64A7, + 3578: 0x64A8, + 3579: 0x64AA, + 3580: 0x64AB, + 3581: 0x64AF, + 3582: 0x64B1, + 3583: 0x64B2, + 3584: 0x64B3, + 3585: 0x64B4, + 3586: 0x64B6, + 3587: 0x64B9, + 3588: 0x64BB, + 3589: 0x64BD, + 3590: 0x64BE, + 3591: 0x64BF, + 3592: 0x64C1, + 3593: 0x64C3, + 3594: 0x64C4, + 3595: 0x64C6, + 3596: 0x64C7, + 3597: 0x64C8, + 3598: 0x64C9, + 3599: 0x64CA, + 3600: 0x64CB, + 3601: 0x64CC, + 3602: 0x64CF, + 3603: 0x64D1, + 3604: 0x64D3, + 3605: 0x64D4, + 3606: 0x64D5, + 3607: 0x64D6, + 3608: 0x64D9, + 3609: 0x64DA, + 3610: 0x64DB, + 3611: 0x64DC, + 3612: 0x64DD, + 3613: 0x64DF, + 3614: 0x64E0, + 3615: 0x64E1, + 3616: 0x64E3, + 3617: 0x64E5, + 3618: 0x64E7, + 3619: 0x64E8, + 3620: 0x64E9, + 3621: 0x64EA, + 3622: 0x64EB, + 3623: 0x64EC, + 3624: 0x64ED, + 3625: 0x64EE, + 3626: 0x64EF, + 3627: 0x64F0, + 3628: 0x64F1, + 3629: 0x64F2, + 3630: 0x64F3, + 3631: 0x64F4, + 3632: 0x64F5, + 3633: 0x64F6, + 3634: 0x64F7, + 3635: 0x64F8, + 3636: 0x64F9, + 3637: 0x64FA, + 3638: 0x64FB, + 3639: 0x64FC, + 3640: 0x64FD, + 3641: 0x64FE, + 3642: 0x64FF, + 3643: 0x6501, + 3644: 0x6502, + 3645: 0x6503, + 3646: 0x6504, + 3647: 0x6505, + 3648: 0x6506, + 3649: 0x6507, + 3650: 0x6508, + 3651: 0x650A, + 3652: 0x650B, + 3653: 0x650C, + 3654: 0x650D, + 3655: 0x650E, + 3656: 0x650F, + 3657: 0x6510, + 3658: 0x6511, + 3659: 0x6513, + 3660: 0x6514, + 3661: 0x6515, + 3662: 0x6516, + 3663: 0x6517, + 3664: 0x6519, + 3665: 0x651A, + 3666: 0x651B, + 3667: 0x651C, + 3668: 0x651D, + 3669: 0x651E, + 3670: 0x651F, + 3671: 0x6520, + 3672: 0x6521, + 3673: 0x6522, + 3674: 0x6523, + 3675: 0x6524, + 3676: 0x6526, + 3677: 0x6527, + 3678: 0x6528, + 3679: 0x6529, + 3680: 0x652A, + 3681: 0x652C, + 3682: 0x652D, + 3683: 0x6530, + 3684: 0x6531, + 3685: 0x6532, + 3686: 0x6533, + 3687: 0x6537, + 3688: 0x653A, + 3689: 0x653C, + 3690: 0x653D, + 3691: 0x6540, + 3692: 0x6541, + 3693: 0x6542, + 3694: 0x6543, + 3695: 0x6544, + 3696: 0x6546, + 3697: 0x6547, + 3698: 0x654A, + 3699: 0x654B, + 3700: 0x654D, + 3701: 0x654E, + 3702: 0x6550, + 3703: 0x6552, + 3704: 0x6553, + 3705: 0x6554, + 3706: 0x6557, + 3707: 0x6558, + 3708: 0x655A, + 3709: 0x655C, + 3710: 0x655F, + 3711: 0x6560, + 3712: 0x6561, + 3713: 0x6564, + 3714: 0x6565, + 3715: 0x6567, + 3716: 0x6568, + 3717: 0x6569, + 3718: 0x656A, + 3719: 0x656D, + 3720: 0x656E, + 3721: 0x656F, + 3722: 0x6571, + 3723: 0x6573, + 3724: 0x6575, + 3725: 0x6576, + 3726: 0x6578, + 3727: 0x6579, + 3728: 0x657A, + 3729: 0x657B, + 3730: 0x657C, + 3731: 0x657D, + 3732: 0x657E, + 3733: 0x657F, + 3734: 0x6580, + 3735: 0x6581, + 3736: 0x6582, + 3737: 0x6583, + 3738: 0x6584, + 3739: 0x6585, + 3740: 0x6586, + 3741: 0x6588, + 3742: 0x6589, + 3743: 0x658A, + 3744: 0x658D, + 3745: 0x658E, + 3746: 0x658F, + 3747: 0x6592, + 3748: 0x6594, + 3749: 0x6595, + 3750: 0x6596, + 3751: 0x6598, + 3752: 0x659A, + 3753: 0x659D, + 3754: 0x659E, + 3755: 0x65A0, + 3756: 0x65A2, + 3757: 0x65A3, + 3758: 0x65A6, + 3759: 0x65A8, + 3760: 0x65AA, + 3761: 0x65AC, + 3762: 0x65AE, + 3763: 0x65B1, + 3764: 0x65B2, + 3765: 0x65B3, + 3766: 0x65B4, + 3767: 0x65B5, + 3768: 0x65B6, + 3769: 0x65B7, + 3770: 0x65B8, + 3771: 0x65BA, + 3772: 0x65BB, + 3773: 0x65BE, + 3774: 0x65BF, + 3775: 0x65C0, + 3776: 0x65C2, + 3777: 0x65C7, + 3778: 0x65C8, + 3779: 0x65C9, + 3780: 0x65CA, + 3781: 0x65CD, + 3782: 0x65D0, + 3783: 0x65D1, + 3784: 0x65D3, + 3785: 0x65D4, + 3786: 0x65D5, + 3787: 0x65D8, + 3788: 0x65D9, + 3789: 0x65DA, + 3790: 0x65DB, + 3791: 0x65DC, + 3792: 0x65DD, + 3793: 0x65DE, + 3794: 0x65DF, + 3795: 0x65E1, + 3796: 0x65E3, + 3797: 0x65E4, + 3798: 0x65EA, + 3799: 0x65EB, + 3800: 0x65F2, + 3801: 0x65F3, + 3802: 0x65F4, + 3803: 0x65F5, + 3804: 0x65F8, + 3805: 0x65F9, + 3806: 0x65FB, + 3807: 0x65FC, + 3808: 0x65FD, + 3809: 0x65FE, + 3810: 0x65FF, + 3811: 0x6601, + 3812: 0x6604, + 3813: 0x6605, + 3814: 0x6607, + 3815: 0x6608, + 3816: 0x6609, + 3817: 0x660B, + 3818: 0x660D, + 3819: 0x6610, + 3820: 0x6611, + 3821: 0x6612, + 3822: 0x6616, + 3823: 0x6617, + 3824: 0x6618, + 3825: 0x661A, + 3826: 0x661B, + 3827: 0x661C, + 3828: 0x661E, + 3829: 0x6621, + 3830: 0x6622, + 3831: 0x6623, + 3832: 0x6624, + 3833: 0x6626, + 3834: 0x6629, + 3835: 0x662A, + 3836: 0x662B, + 3837: 0x662C, + 3838: 0x662E, + 3839: 0x6630, + 3840: 0x6632, + 3841: 0x6633, + 3842: 0x6637, + 3843: 0x6638, + 3844: 0x6639, + 3845: 0x663A, + 3846: 0x663B, + 3847: 0x663D, + 3848: 0x663F, + 3849: 0x6640, + 3850: 0x6642, + 3851: 0x6644, + 3852: 0x6645, + 3853: 0x6646, + 3854: 0x6647, + 3855: 0x6648, + 3856: 0x6649, + 3857: 0x664A, + 3858: 0x664D, + 3859: 0x664E, + 3860: 0x6650, + 3861: 0x6651, + 3862: 0x6658, + 3863: 0x6659, + 3864: 0x665B, + 3865: 0x665C, + 3866: 0x665D, + 3867: 0x665E, + 3868: 0x6660, + 3869: 0x6662, + 3870: 0x6663, + 3871: 0x6665, + 3872: 0x6667, + 3873: 0x6669, + 3874: 0x666A, + 3875: 0x666B, + 3876: 0x666C, + 3877: 0x666D, + 3878: 0x6671, + 3879: 0x6672, + 3880: 0x6673, + 3881: 0x6675, + 3882: 0x6678, + 3883: 0x6679, + 3884: 0x667B, + 3885: 0x667C, + 3886: 0x667D, + 3887: 0x667F, + 3888: 0x6680, + 3889: 0x6681, + 3890: 0x6683, + 3891: 0x6685, + 3892: 0x6686, + 3893: 0x6688, + 3894: 0x6689, + 3895: 0x668A, + 3896: 0x668B, + 3897: 0x668D, + 3898: 0x668E, + 3899: 0x668F, + 3900: 0x6690, + 3901: 0x6692, + 3902: 0x6693, + 3903: 0x6694, + 3904: 0x6695, + 3905: 0x6698, + 3906: 0x6699, + 3907: 0x669A, + 3908: 0x669B, + 3909: 0x669C, + 3910: 0x669E, + 3911: 0x669F, + 3912: 0x66A0, + 3913: 0x66A1, + 3914: 0x66A2, + 3915: 0x66A3, + 3916: 0x66A4, + 3917: 0x66A5, + 3918: 0x66A6, + 3919: 0x66A9, + 3920: 0x66AA, + 3921: 0x66AB, + 3922: 0x66AC, + 3923: 0x66AD, + 3924: 0x66AF, + 3925: 0x66B0, + 3926: 0x66B1, + 3927: 0x66B2, + 3928: 0x66B3, + 3929: 0x66B5, + 3930: 0x66B6, + 3931: 0x66B7, + 3932: 0x66B8, + 3933: 0x66BA, + 3934: 0x66BB, + 3935: 0x66BC, + 3936: 0x66BD, + 3937: 0x66BF, + 3938: 0x66C0, + 3939: 0x66C1, + 3940: 0x66C2, + 3941: 0x66C3, + 3942: 0x66C4, + 3943: 0x66C5, + 3944: 0x66C6, + 3945: 0x66C7, + 3946: 0x66C8, + 3947: 0x66C9, + 3948: 0x66CA, + 3949: 0x66CB, + 3950: 0x66CC, + 3951: 0x66CD, + 3952: 0x66CE, + 3953: 0x66CF, + 3954: 0x66D0, + 3955: 0x66D1, + 3956: 0x66D2, + 3957: 0x66D3, + 3958: 0x66D4, + 3959: 0x66D5, + 3960: 0x66D6, + 3961: 0x66D7, + 3962: 0x66D8, + 3963: 0x66DA, + 3964: 0x66DE, + 3965: 0x66DF, + 3966: 0x66E0, + 3967: 0x66E1, + 3968: 0x66E2, + 3969: 0x66E3, + 3970: 0x66E4, + 3971: 0x66E5, + 3972: 0x66E7, + 3973: 0x66E8, + 3974: 0x66EA, + 3975: 0x66EB, + 3976: 0x66EC, + 3977: 0x66ED, + 3978: 0x66EE, + 3979: 0x66EF, + 3980: 0x66F1, + 3981: 0x66F5, + 3982: 0x66F6, + 3983: 0x66F8, + 3984: 0x66FA, + 3985: 0x66FB, + 3986: 0x66FD, + 3987: 0x6701, + 3988: 0x6702, + 3989: 0x6703, + 3990: 0x6704, + 3991: 0x6705, + 3992: 0x6706, + 3993: 0x6707, + 3994: 0x670C, + 3995: 0x670E, + 3996: 0x670F, + 3997: 0x6711, + 3998: 0x6712, + 3999: 0x6713, + 4000: 0x6716, + 4001: 0x6718, + 4002: 0x6719, + 4003: 0x671A, + 4004: 0x671C, + 4005: 0x671E, + 4006: 0x6720, + 4007: 0x6721, + 4008: 0x6722, + 4009: 0x6723, + 4010: 0x6724, + 4011: 0x6725, + 4012: 0x6727, + 4013: 0x6729, + 4014: 0x672E, + 4015: 0x6730, + 4016: 0x6732, + 4017: 0x6733, + 4018: 0x6736, + 4019: 0x6737, + 4020: 0x6738, + 4021: 0x6739, + 4022: 0x673B, + 4023: 0x673C, + 4024: 0x673E, + 4025: 0x673F, + 4026: 0x6741, + 4027: 0x6744, + 4028: 0x6745, + 4029: 0x6747, + 4030: 0x674A, + 4031: 0x674B, + 4032: 0x674D, + 4033: 0x6752, + 4034: 0x6754, + 4035: 0x6755, + 4036: 0x6757, + 4037: 0x6758, + 4038: 0x6759, + 4039: 0x675A, + 4040: 0x675B, + 4041: 0x675D, + 4042: 0x6762, + 4043: 0x6763, + 4044: 0x6764, + 4045: 0x6766, + 4046: 0x6767, + 4047: 0x676B, + 4048: 0x676C, + 4049: 0x676E, + 4050: 0x6771, + 4051: 0x6774, + 4052: 0x6776, + 4053: 0x6778, + 4054: 0x6779, + 4055: 0x677A, + 4056: 0x677B, + 4057: 0x677D, + 4058: 0x6780, + 4059: 0x6782, + 4060: 0x6783, + 4061: 0x6785, + 4062: 0x6786, + 4063: 0x6788, + 4064: 0x678A, + 4065: 0x678C, + 4066: 0x678D, + 4067: 0x678E, + 4068: 0x678F, + 4069: 0x6791, + 4070: 0x6792, + 4071: 0x6793, + 4072: 0x6794, + 4073: 0x6796, + 4074: 0x6799, + 4075: 0x679B, + 4076: 0x679F, + 4077: 0x67A0, + 4078: 0x67A1, + 4079: 0x67A4, + 4080: 0x67A6, + 4081: 0x67A9, + 4082: 0x67AC, + 4083: 0x67AE, + 4084: 0x67B1, + 4085: 0x67B2, + 4086: 0x67B4, + 4087: 0x67B9, + 4088: 0x67BA, + 4089: 0x67BB, + 4090: 0x67BC, + 4091: 0x67BD, + 4092: 0x67BE, + 4093: 0x67BF, + 4094: 0x67C0, + 4095: 0x67C2, + 4096: 0x67C5, + 4097: 0x67C6, + 4098: 0x67C7, + 4099: 0x67C8, + 4100: 0x67C9, + 4101: 0x67CA, + 4102: 0x67CB, + 4103: 0x67CC, + 4104: 0x67CD, + 4105: 0x67CE, + 4106: 0x67D5, + 4107: 0x67D6, + 4108: 0x67D7, + 4109: 0x67DB, + 4110: 0x67DF, + 4111: 0x67E1, + 4112: 0x67E3, + 4113: 0x67E4, + 4114: 0x67E6, + 4115: 0x67E7, + 4116: 0x67E8, + 4117: 0x67EA, + 4118: 0x67EB, + 4119: 0x67ED, + 4120: 0x67EE, + 4121: 0x67F2, + 4122: 0x67F5, + 4123: 0x67F6, + 4124: 0x67F7, + 4125: 0x67F8, + 4126: 0x67F9, + 4127: 0x67FA, + 4128: 0x67FB, + 4129: 0x67FC, + 4130: 0x67FE, + 4131: 0x6801, + 4132: 0x6802, + 4133: 0x6803, + 4134: 0x6804, + 4135: 0x6806, + 4136: 0x680D, + 4137: 0x6810, + 4138: 0x6812, + 4139: 0x6814, + 4140: 0x6815, + 4141: 0x6818, + 4142: 0x6819, + 4143: 0x681A, + 4144: 0x681B, + 4145: 0x681C, + 4146: 0x681E, + 4147: 0x681F, + 4148: 0x6820, + 4149: 0x6822, + 4150: 0x6823, + 4151: 0x6824, + 4152: 0x6825, + 4153: 0x6826, + 4154: 0x6827, + 4155: 0x6828, + 4156: 0x682B, + 4157: 0x682C, + 4158: 0x682D, + 4159: 0x682E, + 4160: 0x682F, + 4161: 0x6830, + 4162: 0x6831, + 4163: 0x6834, + 4164: 0x6835, + 4165: 0x6836, + 4166: 0x683A, + 4167: 0x683B, + 4168: 0x683F, + 4169: 0x6847, + 4170: 0x684B, + 4171: 0x684D, + 4172: 0x684F, + 4173: 0x6852, + 4174: 0x6856, + 4175: 0x6857, + 4176: 0x6858, + 4177: 0x6859, + 4178: 0x685A, + 4179: 0x685B, + 4180: 0x685C, + 4181: 0x685D, + 4182: 0x685E, + 4183: 0x685F, + 4184: 0x686A, + 4185: 0x686C, + 4186: 0x686D, + 4187: 0x686E, + 4188: 0x686F, + 4189: 0x6870, + 4190: 0x6871, + 4191: 0x6872, + 4192: 0x6873, + 4193: 0x6875, + 4194: 0x6878, + 4195: 0x6879, + 4196: 0x687A, + 4197: 0x687B, + 4198: 0x687C, + 4199: 0x687D, + 4200: 0x687E, + 4201: 0x687F, + 4202: 0x6880, + 4203: 0x6882, + 4204: 0x6884, + 4205: 0x6887, + 4206: 0x6888, + 4207: 0x6889, + 4208: 0x688A, + 4209: 0x688B, + 4210: 0x688C, + 4211: 0x688D, + 4212: 0x688E, + 4213: 0x6890, + 4214: 0x6891, + 4215: 0x6892, + 4216: 0x6894, + 4217: 0x6895, + 4218: 0x6896, + 4219: 0x6898, + 4220: 0x6899, + 4221: 0x689A, + 4222: 0x689B, + 4223: 0x689C, + 4224: 0x689D, + 4225: 0x689E, + 4226: 0x689F, + 4227: 0x68A0, + 4228: 0x68A1, + 4229: 0x68A3, + 4230: 0x68A4, + 4231: 0x68A5, + 4232: 0x68A9, + 4233: 0x68AA, + 4234: 0x68AB, + 4235: 0x68AC, + 4236: 0x68AE, + 4237: 0x68B1, + 4238: 0x68B2, + 4239: 0x68B4, + 4240: 0x68B6, + 4241: 0x68B7, + 4242: 0x68B8, + 4243: 0x68B9, + 4244: 0x68BA, + 4245: 0x68BB, + 4246: 0x68BC, + 4247: 0x68BD, + 4248: 0x68BE, + 4249: 0x68BF, + 4250: 0x68C1, + 4251: 0x68C3, + 4252: 0x68C4, + 4253: 0x68C5, + 4254: 0x68C6, + 4255: 0x68C7, + 4256: 0x68C8, + 4257: 0x68CA, + 4258: 0x68CC, + 4259: 0x68CE, + 4260: 0x68CF, + 4261: 0x68D0, + 4262: 0x68D1, + 4263: 0x68D3, + 4264: 0x68D4, + 4265: 0x68D6, + 4266: 0x68D7, + 4267: 0x68D9, + 4268: 0x68DB, + 4269: 0x68DC, + 4270: 0x68DD, + 4271: 0x68DE, + 4272: 0x68DF, + 4273: 0x68E1, + 4274: 0x68E2, + 4275: 0x68E4, + 4276: 0x68E5, + 4277: 0x68E6, + 4278: 0x68E7, + 4279: 0x68E8, + 4280: 0x68E9, + 4281: 0x68EA, + 4282: 0x68EB, + 4283: 0x68EC, + 4284: 0x68ED, + 4285: 0x68EF, + 4286: 0x68F2, + 4287: 0x68F3, + 4288: 0x68F4, + 4289: 0x68F6, + 4290: 0x68F7, + 4291: 0x68F8, + 4292: 0x68FB, + 4293: 0x68FD, + 4294: 0x68FE, + 4295: 0x68FF, + 4296: 0x6900, + 4297: 0x6902, + 4298: 0x6903, + 4299: 0x6904, + 4300: 0x6906, + 4301: 0x6907, + 4302: 0x6908, + 4303: 0x6909, + 4304: 0x690A, + 4305: 0x690C, + 4306: 0x690F, + 4307: 0x6911, + 4308: 0x6913, + 4309: 0x6914, + 4310: 0x6915, + 4311: 0x6916, + 4312: 0x6917, + 4313: 0x6918, + 4314: 0x6919, + 4315: 0x691A, + 4316: 0x691B, + 4317: 0x691C, + 4318: 0x691D, + 4319: 0x691E, + 4320: 0x6921, + 4321: 0x6922, + 4322: 0x6923, + 4323: 0x6925, + 4324: 0x6926, + 4325: 0x6927, + 4326: 0x6928, + 4327: 0x6929, + 4328: 0x692A, + 4329: 0x692B, + 4330: 0x692C, + 4331: 0x692E, + 4332: 0x692F, + 4333: 0x6931, + 4334: 0x6932, + 4335: 0x6933, + 4336: 0x6935, + 4337: 0x6936, + 4338: 0x6937, + 4339: 0x6938, + 4340: 0x693A, + 4341: 0x693B, + 4342: 0x693C, + 4343: 0x693E, + 4344: 0x6940, + 4345: 0x6941, + 4346: 0x6943, + 4347: 0x6944, + 4348: 0x6945, + 4349: 0x6946, + 4350: 0x6947, + 4351: 0x6948, + 4352: 0x6949, + 4353: 0x694A, + 4354: 0x694B, + 4355: 0x694C, + 4356: 0x694D, + 4357: 0x694E, + 4358: 0x694F, + 4359: 0x6950, + 4360: 0x6951, + 4361: 0x6952, + 4362: 0x6953, + 4363: 0x6955, + 4364: 0x6956, + 4365: 0x6958, + 4366: 0x6959, + 4367: 0x695B, + 4368: 0x695C, + 4369: 0x695F, + 4370: 0x6961, + 4371: 0x6962, + 4372: 0x6964, + 4373: 0x6965, + 4374: 0x6967, + 4375: 0x6968, + 4376: 0x6969, + 4377: 0x696A, + 4378: 0x696C, + 4379: 0x696D, + 4380: 0x696F, + 4381: 0x6970, + 4382: 0x6972, + 4383: 0x6973, + 4384: 0x6974, + 4385: 0x6975, + 4386: 0x6976, + 4387: 0x697A, + 4388: 0x697B, + 4389: 0x697D, + 4390: 0x697E, + 4391: 0x697F, + 4392: 0x6981, + 4393: 0x6983, + 4394: 0x6985, + 4395: 0x698A, + 4396: 0x698B, + 4397: 0x698C, + 4398: 0x698E, + 4399: 0x698F, + 4400: 0x6990, + 4401: 0x6991, + 4402: 0x6992, + 4403: 0x6993, + 4404: 0x6996, + 4405: 0x6997, + 4406: 0x6999, + 4407: 0x699A, + 4408: 0x699D, + 4409: 0x699E, + 4410: 0x699F, + 4411: 0x69A0, + 4412: 0x69A1, + 4413: 0x69A2, + 4414: 0x69A3, + 4415: 0x69A4, + 4416: 0x69A5, + 4417: 0x69A6, + 4418: 0x69A9, + 4419: 0x69AA, + 4420: 0x69AC, + 4421: 0x69AE, + 4422: 0x69AF, + 4423: 0x69B0, + 4424: 0x69B2, + 4425: 0x69B3, + 4426: 0x69B5, + 4427: 0x69B6, + 4428: 0x69B8, + 4429: 0x69B9, + 4430: 0x69BA, + 4431: 0x69BC, + 4432: 0x69BD, + 4433: 0x69BE, + 4434: 0x69BF, + 4435: 0x69C0, + 4436: 0x69C2, + 4437: 0x69C3, + 4438: 0x69C4, + 4439: 0x69C5, + 4440: 0x69C6, + 4441: 0x69C7, + 4442: 0x69C8, + 4443: 0x69C9, + 4444: 0x69CB, + 4445: 0x69CD, + 4446: 0x69CF, + 4447: 0x69D1, + 4448: 0x69D2, + 4449: 0x69D3, + 4450: 0x69D5, + 4451: 0x69D6, + 4452: 0x69D7, + 4453: 0x69D8, + 4454: 0x69D9, + 4455: 0x69DA, + 4456: 0x69DC, + 4457: 0x69DD, + 4458: 0x69DE, + 4459: 0x69E1, + 4460: 0x69E2, + 4461: 0x69E3, + 4462: 0x69E4, + 4463: 0x69E5, + 4464: 0x69E6, + 4465: 0x69E7, + 4466: 0x69E8, + 4467: 0x69E9, + 4468: 0x69EA, + 4469: 0x69EB, + 4470: 0x69EC, + 4471: 0x69EE, + 4472: 0x69EF, + 4473: 0x69F0, + 4474: 0x69F1, + 4475: 0x69F3, + 4476: 0x69F4, + 4477: 0x69F5, + 4478: 0x69F6, + 4479: 0x69F7, + 4480: 0x69F8, + 4481: 0x69F9, + 4482: 0x69FA, + 4483: 0x69FB, + 4484: 0x69FC, + 4485: 0x69FE, + 4486: 0x6A00, + 4487: 0x6A01, + 4488: 0x6A02, + 4489: 0x6A03, + 4490: 0x6A04, + 4491: 0x6A05, + 4492: 0x6A06, + 4493: 0x6A07, + 4494: 0x6A08, + 4495: 0x6A09, + 4496: 0x6A0B, + 4497: 0x6A0C, + 4498: 0x6A0D, + 4499: 0x6A0E, + 4500: 0x6A0F, + 4501: 0x6A10, + 4502: 0x6A11, + 4503: 0x6A12, + 4504: 0x6A13, + 4505: 0x6A14, + 4506: 0x6A15, + 4507: 0x6A16, + 4508: 0x6A19, + 4509: 0x6A1A, + 4510: 0x6A1B, + 4511: 0x6A1C, + 4512: 0x6A1D, + 4513: 0x6A1E, + 4514: 0x6A20, + 4515: 0x6A22, + 4516: 0x6A23, + 4517: 0x6A24, + 4518: 0x6A25, + 4519: 0x6A26, + 4520: 0x6A27, + 4521: 0x6A29, + 4522: 0x6A2B, + 4523: 0x6A2C, + 4524: 0x6A2D, + 4525: 0x6A2E, + 4526: 0x6A30, + 4527: 0x6A32, + 4528: 0x6A33, + 4529: 0x6A34, + 4530: 0x6A36, + 4531: 0x6A37, + 4532: 0x6A38, + 4533: 0x6A39, + 4534: 0x6A3A, + 4535: 0x6A3B, + 4536: 0x6A3C, + 4537: 0x6A3F, + 4538: 0x6A40, + 4539: 0x6A41, + 4540: 0x6A42, + 4541: 0x6A43, + 4542: 0x6A45, + 4543: 0x6A46, + 4544: 0x6A48, + 4545: 0x6A49, + 4546: 0x6A4A, + 4547: 0x6A4B, + 4548: 0x6A4C, + 4549: 0x6A4D, + 4550: 0x6A4E, + 4551: 0x6A4F, + 4552: 0x6A51, + 4553: 0x6A52, + 4554: 0x6A53, + 4555: 0x6A54, + 4556: 0x6A55, + 4557: 0x6A56, + 4558: 0x6A57, + 4559: 0x6A5A, + 4560: 0x6A5C, + 4561: 0x6A5D, + 4562: 0x6A5E, + 4563: 0x6A5F, + 4564: 0x6A60, + 4565: 0x6A62, + 4566: 0x6A63, + 4567: 0x6A64, + 4568: 0x6A66, + 4569: 0x6A67, + 4570: 0x6A68, + 4571: 0x6A69, + 4572: 0x6A6A, + 4573: 0x6A6B, + 4574: 0x6A6C, + 4575: 0x6A6D, + 4576: 0x6A6E, + 4577: 0x6A6F, + 4578: 0x6A70, + 4579: 0x6A72, + 4580: 0x6A73, + 4581: 0x6A74, + 4582: 0x6A75, + 4583: 0x6A76, + 4584: 0x6A77, + 4585: 0x6A78, + 4586: 0x6A7A, + 4587: 0x6A7B, + 4588: 0x6A7D, + 4589: 0x6A7E, + 4590: 0x6A7F, + 4591: 0x6A81, + 4592: 0x6A82, + 4593: 0x6A83, + 4594: 0x6A85, + 4595: 0x6A86, + 4596: 0x6A87, + 4597: 0x6A88, + 4598: 0x6A89, + 4599: 0x6A8A, + 4600: 0x6A8B, + 4601: 0x6A8C, + 4602: 0x6A8D, + 4603: 0x6A8F, + 4604: 0x6A92, + 4605: 0x6A93, + 4606: 0x6A94, + 4607: 0x6A95, + 4608: 0x6A96, + 4609: 0x6A98, + 4610: 0x6A99, + 4611: 0x6A9A, + 4612: 0x6A9B, + 4613: 0x6A9C, + 4614: 0x6A9D, + 4615: 0x6A9E, + 4616: 0x6A9F, + 4617: 0x6AA1, + 4618: 0x6AA2, + 4619: 0x6AA3, + 4620: 0x6AA4, + 4621: 0x6AA5, + 4622: 0x6AA6, + 4623: 0x6AA7, + 4624: 0x6AA8, + 4625: 0x6AAA, + 4626: 0x6AAD, + 4627: 0x6AAE, + 4628: 0x6AAF, + 4629: 0x6AB0, + 4630: 0x6AB1, + 4631: 0x6AB2, + 4632: 0x6AB3, + 4633: 0x6AB4, + 4634: 0x6AB5, + 4635: 0x6AB6, + 4636: 0x6AB7, + 4637: 0x6AB8, + 4638: 0x6AB9, + 4639: 0x6ABA, + 4640: 0x6ABB, + 4641: 0x6ABC, + 4642: 0x6ABD, + 4643: 0x6ABE, + 4644: 0x6ABF, + 4645: 0x6AC0, + 4646: 0x6AC1, + 4647: 0x6AC2, + 4648: 0x6AC3, + 4649: 0x6AC4, + 4650: 0x6AC5, + 4651: 0x6AC6, + 4652: 0x6AC7, + 4653: 0x6AC8, + 4654: 0x6AC9, + 4655: 0x6ACA, + 4656: 0x6ACB, + 4657: 0x6ACC, + 4658: 0x6ACD, + 4659: 0x6ACE, + 4660: 0x6ACF, + 4661: 0x6AD0, + 4662: 0x6AD1, + 4663: 0x6AD2, + 4664: 0x6AD3, + 4665: 0x6AD4, + 4666: 0x6AD5, + 4667: 0x6AD6, + 4668: 0x6AD7, + 4669: 0x6AD8, + 4670: 0x6AD9, + 4671: 0x6ADA, + 4672: 0x6ADB, + 4673: 0x6ADC, + 4674: 0x6ADD, + 4675: 0x6ADE, + 4676: 0x6ADF, + 4677: 0x6AE0, + 4678: 0x6AE1, + 4679: 0x6AE2, + 4680: 0x6AE3, + 4681: 0x6AE4, + 4682: 0x6AE5, + 4683: 0x6AE6, + 4684: 0x6AE7, + 4685: 0x6AE8, + 4686: 0x6AE9, + 4687: 0x6AEA, + 4688: 0x6AEB, + 4689: 0x6AEC, + 4690: 0x6AED, + 4691: 0x6AEE, + 4692: 0x6AEF, + 4693: 0x6AF0, + 4694: 0x6AF1, + 4695: 0x6AF2, + 4696: 0x6AF3, + 4697: 0x6AF4, + 4698: 0x6AF5, + 4699: 0x6AF6, + 4700: 0x6AF7, + 4701: 0x6AF8, + 4702: 0x6AF9, + 4703: 0x6AFA, + 4704: 0x6AFB, + 4705: 0x6AFC, + 4706: 0x6AFD, + 4707: 0x6AFE, + 4708: 0x6AFF, + 4709: 0x6B00, + 4710: 0x6B01, + 4711: 0x6B02, + 4712: 0x6B03, + 4713: 0x6B04, + 4714: 0x6B05, + 4715: 0x6B06, + 4716: 0x6B07, + 4717: 0x6B08, + 4718: 0x6B09, + 4719: 0x6B0A, + 4720: 0x6B0B, + 4721: 0x6B0C, + 4722: 0x6B0D, + 4723: 0x6B0E, + 4724: 0x6B0F, + 4725: 0x6B10, + 4726: 0x6B11, + 4727: 0x6B12, + 4728: 0x6B13, + 4729: 0x6B14, + 4730: 0x6B15, + 4731: 0x6B16, + 4732: 0x6B17, + 4733: 0x6B18, + 4734: 0x6B19, + 4735: 0x6B1A, + 4736: 0x6B1B, + 4737: 0x6B1C, + 4738: 0x6B1D, + 4739: 0x6B1E, + 4740: 0x6B1F, + 4741: 0x6B25, + 4742: 0x6B26, + 4743: 0x6B28, + 4744: 0x6B29, + 4745: 0x6B2A, + 4746: 0x6B2B, + 4747: 0x6B2C, + 4748: 0x6B2D, + 4749: 0x6B2E, + 4750: 0x6B2F, + 4751: 0x6B30, + 4752: 0x6B31, + 4753: 0x6B33, + 4754: 0x6B34, + 4755: 0x6B35, + 4756: 0x6B36, + 4757: 0x6B38, + 4758: 0x6B3B, + 4759: 0x6B3C, + 4760: 0x6B3D, + 4761: 0x6B3F, + 4762: 0x6B40, + 4763: 0x6B41, + 4764: 0x6B42, + 4765: 0x6B44, + 4766: 0x6B45, + 4767: 0x6B48, + 4768: 0x6B4A, + 4769: 0x6B4B, + 4770: 0x6B4D, + 4771: 0x6B4E, + 4772: 0x6B4F, + 4773: 0x6B50, + 4774: 0x6B51, + 4775: 0x6B52, + 4776: 0x6B53, + 4777: 0x6B54, + 4778: 0x6B55, + 4779: 0x6B56, + 4780: 0x6B57, + 4781: 0x6B58, + 4782: 0x6B5A, + 4783: 0x6B5B, + 4784: 0x6B5C, + 4785: 0x6B5D, + 4786: 0x6B5E, + 4787: 0x6B5F, + 4788: 0x6B60, + 4789: 0x6B61, + 4790: 0x6B68, + 4791: 0x6B69, + 4792: 0x6B6B, + 4793: 0x6B6C, + 4794: 0x6B6D, + 4795: 0x6B6E, + 4796: 0x6B6F, + 4797: 0x6B70, + 4798: 0x6B71, + 4799: 0x6B72, + 4800: 0x6B73, + 4801: 0x6B74, + 4802: 0x6B75, + 4803: 0x6B76, + 4804: 0x6B77, + 4805: 0x6B78, + 4806: 0x6B7A, + 4807: 0x6B7D, + 4808: 0x6B7E, + 4809: 0x6B7F, + 4810: 0x6B80, + 4811: 0x6B85, + 4812: 0x6B88, + 4813: 0x6B8C, + 4814: 0x6B8E, + 4815: 0x6B8F, + 4816: 0x6B90, + 4817: 0x6B91, + 4818: 0x6B94, + 4819: 0x6B95, + 4820: 0x6B97, + 4821: 0x6B98, + 4822: 0x6B99, + 4823: 0x6B9C, + 4824: 0x6B9D, + 4825: 0x6B9E, + 4826: 0x6B9F, + 4827: 0x6BA0, + 4828: 0x6BA2, + 4829: 0x6BA3, + 4830: 0x6BA4, + 4831: 0x6BA5, + 4832: 0x6BA6, + 4833: 0x6BA7, + 4834: 0x6BA8, + 4835: 0x6BA9, + 4836: 0x6BAB, + 4837: 0x6BAC, + 4838: 0x6BAD, + 4839: 0x6BAE, + 4840: 0x6BAF, + 4841: 0x6BB0, + 4842: 0x6BB1, + 4843: 0x6BB2, + 4844: 0x6BB6, + 4845: 0x6BB8, + 4846: 0x6BB9, + 4847: 0x6BBA, + 4848: 0x6BBB, + 4849: 0x6BBC, + 4850: 0x6BBD, + 4851: 0x6BBE, + 4852: 0x6BC0, + 4853: 0x6BC3, + 4854: 0x6BC4, + 4855: 0x6BC6, + 4856: 0x6BC7, + 4857: 0x6BC8, + 4858: 0x6BC9, + 4859: 0x6BCA, + 4860: 0x6BCC, + 4861: 0x6BCE, + 4862: 0x6BD0, + 4863: 0x6BD1, + 4864: 0x6BD8, + 4865: 0x6BDA, + 4866: 0x6BDC, + 4867: 0x6BDD, + 4868: 0x6BDE, + 4869: 0x6BDF, + 4870: 0x6BE0, + 4871: 0x6BE2, + 4872: 0x6BE3, + 4873: 0x6BE4, + 4874: 0x6BE5, + 4875: 0x6BE6, + 4876: 0x6BE7, + 4877: 0x6BE8, + 4878: 0x6BE9, + 4879: 0x6BEC, + 4880: 0x6BED, + 4881: 0x6BEE, + 4882: 0x6BF0, + 4883: 0x6BF1, + 4884: 0x6BF2, + 4885: 0x6BF4, + 4886: 0x6BF6, + 4887: 0x6BF7, + 4888: 0x6BF8, + 4889: 0x6BFA, + 4890: 0x6BFB, + 4891: 0x6BFC, + 4892: 0x6BFE, + 4893: 0x6BFF, + 4894: 0x6C00, + 4895: 0x6C01, + 4896: 0x6C02, + 4897: 0x6C03, + 4898: 0x6C04, + 4899: 0x6C08, + 4900: 0x6C09, + 4901: 0x6C0A, + 4902: 0x6C0B, + 4903: 0x6C0C, + 4904: 0x6C0E, + 4905: 0x6C12, + 4906: 0x6C17, + 4907: 0x6C1C, + 4908: 0x6C1D, + 4909: 0x6C1E, + 4910: 0x6C20, + 4911: 0x6C23, + 4912: 0x6C25, + 4913: 0x6C2B, + 4914: 0x6C2C, + 4915: 0x6C2D, + 4916: 0x6C31, + 4917: 0x6C33, + 4918: 0x6C36, + 4919: 0x6C37, + 4920: 0x6C39, + 4921: 0x6C3A, + 4922: 0x6C3B, + 4923: 0x6C3C, + 4924: 0x6C3E, + 4925: 0x6C3F, + 4926: 0x6C43, + 4927: 0x6C44, + 4928: 0x6C45, + 4929: 0x6C48, + 4930: 0x6C4B, + 4931: 0x6C4C, + 4932: 0x6C4D, + 4933: 0x6C4E, + 4934: 0x6C4F, + 4935: 0x6C51, + 4936: 0x6C52, + 4937: 0x6C53, + 4938: 0x6C56, + 4939: 0x6C58, + 4940: 0x6C59, + 4941: 0x6C5A, + 4942: 0x6C62, + 4943: 0x6C63, + 4944: 0x6C65, + 4945: 0x6C66, + 4946: 0x6C67, + 4947: 0x6C6B, + 4948: 0x6C6C, + 4949: 0x6C6D, + 4950: 0x6C6E, + 4951: 0x6C6F, + 4952: 0x6C71, + 4953: 0x6C73, + 4954: 0x6C75, + 4955: 0x6C77, + 4956: 0x6C78, + 4957: 0x6C7A, + 4958: 0x6C7B, + 4959: 0x6C7C, + 4960: 0x6C7F, + 4961: 0x6C80, + 4962: 0x6C84, + 4963: 0x6C87, + 4964: 0x6C8A, + 4965: 0x6C8B, + 4966: 0x6C8D, + 4967: 0x6C8E, + 4968: 0x6C91, + 4969: 0x6C92, + 4970: 0x6C95, + 4971: 0x6C96, + 4972: 0x6C97, + 4973: 0x6C98, + 4974: 0x6C9A, + 4975: 0x6C9C, + 4976: 0x6C9D, + 4977: 0x6C9E, + 4978: 0x6CA0, + 4979: 0x6CA2, + 4980: 0x6CA8, + 4981: 0x6CAC, + 4982: 0x6CAF, + 4983: 0x6CB0, + 4984: 0x6CB4, + 4985: 0x6CB5, + 4986: 0x6CB6, + 4987: 0x6CB7, + 4988: 0x6CBA, + 4989: 0x6CC0, + 4990: 0x6CC1, + 4991: 0x6CC2, + 4992: 0x6CC3, + 4993: 0x6CC6, + 4994: 0x6CC7, + 4995: 0x6CC8, + 4996: 0x6CCB, + 4997: 0x6CCD, + 4998: 0x6CCE, + 4999: 0x6CCF, + 5000: 0x6CD1, + 5001: 0x6CD2, + 5002: 0x6CD8, + 5003: 0x6CD9, + 5004: 0x6CDA, + 5005: 0x6CDC, + 5006: 0x6CDD, + 5007: 0x6CDF, + 5008: 0x6CE4, + 5009: 0x6CE6, + 5010: 0x6CE7, + 5011: 0x6CE9, + 5012: 0x6CEC, + 5013: 0x6CED, + 5014: 0x6CF2, + 5015: 0x6CF4, + 5016: 0x6CF9, + 5017: 0x6CFF, + 5018: 0x6D00, + 5019: 0x6D02, + 5020: 0x6D03, + 5021: 0x6D05, + 5022: 0x6D06, + 5023: 0x6D08, + 5024: 0x6D09, + 5025: 0x6D0A, + 5026: 0x6D0D, + 5027: 0x6D0F, + 5028: 0x6D10, + 5029: 0x6D11, + 5030: 0x6D13, + 5031: 0x6D14, + 5032: 0x6D15, + 5033: 0x6D16, + 5034: 0x6D18, + 5035: 0x6D1C, + 5036: 0x6D1D, + 5037: 0x6D1F, + 5038: 0x6D20, + 5039: 0x6D21, + 5040: 0x6D22, + 5041: 0x6D23, + 5042: 0x6D24, + 5043: 0x6D26, + 5044: 0x6D28, + 5045: 0x6D29, + 5046: 0x6D2C, + 5047: 0x6D2D, + 5048: 0x6D2F, + 5049: 0x6D30, + 5050: 0x6D34, + 5051: 0x6D36, + 5052: 0x6D37, + 5053: 0x6D38, + 5054: 0x6D3A, + 5055: 0x6D3F, + 5056: 0x6D40, + 5057: 0x6D42, + 5058: 0x6D44, + 5059: 0x6D49, + 5060: 0x6D4C, + 5061: 0x6D50, + 5062: 0x6D55, + 5063: 0x6D56, + 5064: 0x6D57, + 5065: 0x6D58, + 5066: 0x6D5B, + 5067: 0x6D5D, + 5068: 0x6D5F, + 5069: 0x6D61, + 5070: 0x6D62, + 5071: 0x6D64, + 5072: 0x6D65, + 5073: 0x6D67, + 5074: 0x6D68, + 5075: 0x6D6B, + 5076: 0x6D6C, + 5077: 0x6D6D, + 5078: 0x6D70, + 5079: 0x6D71, + 5080: 0x6D72, + 5081: 0x6D73, + 5082: 0x6D75, + 5083: 0x6D76, + 5084: 0x6D79, + 5085: 0x6D7A, + 5086: 0x6D7B, + 5087: 0x6D7D, + 5088: 0x6D7E, + 5089: 0x6D7F, + 5090: 0x6D80, + 5091: 0x6D81, + 5092: 0x6D83, + 5093: 0x6D84, + 5094: 0x6D86, + 5095: 0x6D87, + 5096: 0x6D8A, + 5097: 0x6D8B, + 5098: 0x6D8D, + 5099: 0x6D8F, + 5100: 0x6D90, + 5101: 0x6D92, + 5102: 0x6D96, + 5103: 0x6D97, + 5104: 0x6D98, + 5105: 0x6D99, + 5106: 0x6D9A, + 5107: 0x6D9C, + 5108: 0x6DA2, + 5109: 0x6DA5, + 5110: 0x6DAC, + 5111: 0x6DAD, + 5112: 0x6DB0, + 5113: 0x6DB1, + 5114: 0x6DB3, + 5115: 0x6DB4, + 5116: 0x6DB6, + 5117: 0x6DB7, + 5118: 0x6DB9, + 5119: 0x6DBA, + 5120: 0x6DBB, + 5121: 0x6DBC, + 5122: 0x6DBD, + 5123: 0x6DBE, + 5124: 0x6DC1, + 5125: 0x6DC2, + 5126: 0x6DC3, + 5127: 0x6DC8, + 5128: 0x6DC9, + 5129: 0x6DCA, + 5130: 0x6DCD, + 5131: 0x6DCE, + 5132: 0x6DCF, + 5133: 0x6DD0, + 5134: 0x6DD2, + 5135: 0x6DD3, + 5136: 0x6DD4, + 5137: 0x6DD5, + 5138: 0x6DD7, + 5139: 0x6DDA, + 5140: 0x6DDB, + 5141: 0x6DDC, + 5142: 0x6DDF, + 5143: 0x6DE2, + 5144: 0x6DE3, + 5145: 0x6DE5, + 5146: 0x6DE7, + 5147: 0x6DE8, + 5148: 0x6DE9, + 5149: 0x6DEA, + 5150: 0x6DED, + 5151: 0x6DEF, + 5152: 0x6DF0, + 5153: 0x6DF2, + 5154: 0x6DF4, + 5155: 0x6DF5, + 5156: 0x6DF6, + 5157: 0x6DF8, + 5158: 0x6DFA, + 5159: 0x6DFD, + 5160: 0x6DFE, + 5161: 0x6DFF, + 5162: 0x6E00, + 5163: 0x6E01, + 5164: 0x6E02, + 5165: 0x6E03, + 5166: 0x6E04, + 5167: 0x6E06, + 5168: 0x6E07, + 5169: 0x6E08, + 5170: 0x6E09, + 5171: 0x6E0B, + 5172: 0x6E0F, + 5173: 0x6E12, + 5174: 0x6E13, + 5175: 0x6E15, + 5176: 0x6E18, + 5177: 0x6E19, + 5178: 0x6E1B, + 5179: 0x6E1C, + 5180: 0x6E1E, + 5181: 0x6E1F, + 5182: 0x6E22, + 5183: 0x6E26, + 5184: 0x6E27, + 5185: 0x6E28, + 5186: 0x6E2A, + 5187: 0x6E2C, + 5188: 0x6E2E, + 5189: 0x6E30, + 5190: 0x6E31, + 5191: 0x6E33, + 5192: 0x6E35, + 5193: 0x6E36, + 5194: 0x6E37, + 5195: 0x6E39, + 5196: 0x6E3B, + 5197: 0x6E3C, + 5198: 0x6E3D, + 5199: 0x6E3E, + 5200: 0x6E3F, + 5201: 0x6E40, + 5202: 0x6E41, + 5203: 0x6E42, + 5204: 0x6E45, + 5205: 0x6E46, + 5206: 0x6E47, + 5207: 0x6E48, + 5208: 0x6E49, + 5209: 0x6E4A, + 5210: 0x6E4B, + 5211: 0x6E4C, + 5212: 0x6E4F, + 5213: 0x6E50, + 5214: 0x6E51, + 5215: 0x6E52, + 5216: 0x6E55, + 5217: 0x6E57, + 5218: 0x6E59, + 5219: 0x6E5A, + 5220: 0x6E5C, + 5221: 0x6E5D, + 5222: 0x6E5E, + 5223: 0x6E60, + 5224: 0x6E61, + 5225: 0x6E62, + 5226: 0x6E63, + 5227: 0x6E64, + 5228: 0x6E65, + 5229: 0x6E66, + 5230: 0x6E67, + 5231: 0x6E68, + 5232: 0x6E69, + 5233: 0x6E6A, + 5234: 0x6E6C, + 5235: 0x6E6D, + 5236: 0x6E6F, + 5237: 0x6E70, + 5238: 0x6E71, + 5239: 0x6E72, + 5240: 0x6E73, + 5241: 0x6E74, + 5242: 0x6E75, + 5243: 0x6E76, + 5244: 0x6E77, + 5245: 0x6E78, + 5246: 0x6E79, + 5247: 0x6E7A, + 5248: 0x6E7B, + 5249: 0x6E7C, + 5250: 0x6E7D, + 5251: 0x6E80, + 5252: 0x6E81, + 5253: 0x6E82, + 5254: 0x6E84, + 5255: 0x6E87, + 5256: 0x6E88, + 5257: 0x6E8A, + 5258: 0x6E8B, + 5259: 0x6E8C, + 5260: 0x6E8D, + 5261: 0x6E8E, + 5262: 0x6E91, + 5263: 0x6E92, + 5264: 0x6E93, + 5265: 0x6E94, + 5266: 0x6E95, + 5267: 0x6E96, + 5268: 0x6E97, + 5269: 0x6E99, + 5270: 0x6E9A, + 5271: 0x6E9B, + 5272: 0x6E9D, + 5273: 0x6E9E, + 5274: 0x6EA0, + 5275: 0x6EA1, + 5276: 0x6EA3, + 5277: 0x6EA4, + 5278: 0x6EA6, + 5279: 0x6EA8, + 5280: 0x6EA9, + 5281: 0x6EAB, + 5282: 0x6EAC, + 5283: 0x6EAD, + 5284: 0x6EAE, + 5285: 0x6EB0, + 5286: 0x6EB3, + 5287: 0x6EB5, + 5288: 0x6EB8, + 5289: 0x6EB9, + 5290: 0x6EBC, + 5291: 0x6EBE, + 5292: 0x6EBF, + 5293: 0x6EC0, + 5294: 0x6EC3, + 5295: 0x6EC4, + 5296: 0x6EC5, + 5297: 0x6EC6, + 5298: 0x6EC8, + 5299: 0x6EC9, + 5300: 0x6ECA, + 5301: 0x6ECC, + 5302: 0x6ECD, + 5303: 0x6ECE, + 5304: 0x6ED0, + 5305: 0x6ED2, + 5306: 0x6ED6, + 5307: 0x6ED8, + 5308: 0x6ED9, + 5309: 0x6EDB, + 5310: 0x6EDC, + 5311: 0x6EDD, + 5312: 0x6EE3, + 5313: 0x6EE7, + 5314: 0x6EEA, + 5315: 0x6EEB, + 5316: 0x6EEC, + 5317: 0x6EED, + 5318: 0x6EEE, + 5319: 0x6EEF, + 5320: 0x6EF0, + 5321: 0x6EF1, + 5322: 0x6EF2, + 5323: 0x6EF3, + 5324: 0x6EF5, + 5325: 0x6EF6, + 5326: 0x6EF7, + 5327: 0x6EF8, + 5328: 0x6EFA, + 5329: 0x6EFB, + 5330: 0x6EFC, + 5331: 0x6EFD, + 5332: 0x6EFE, + 5333: 0x6EFF, + 5334: 0x6F00, + 5335: 0x6F01, + 5336: 0x6F03, + 5337: 0x6F04, + 5338: 0x6F05, + 5339: 0x6F07, + 5340: 0x6F08, + 5341: 0x6F0A, + 5342: 0x6F0B, + 5343: 0x6F0C, + 5344: 0x6F0D, + 5345: 0x6F0E, + 5346: 0x6F10, + 5347: 0x6F11, + 5348: 0x6F12, + 5349: 0x6F16, + 5350: 0x6F17, + 5351: 0x6F18, + 5352: 0x6F19, + 5353: 0x6F1A, + 5354: 0x6F1B, + 5355: 0x6F1C, + 5356: 0x6F1D, + 5357: 0x6F1E, + 5358: 0x6F1F, + 5359: 0x6F21, + 5360: 0x6F22, + 5361: 0x6F23, + 5362: 0x6F25, + 5363: 0x6F26, + 5364: 0x6F27, + 5365: 0x6F28, + 5366: 0x6F2C, + 5367: 0x6F2E, + 5368: 0x6F30, + 5369: 0x6F32, + 5370: 0x6F34, + 5371: 0x6F35, + 5372: 0x6F37, + 5373: 0x6F38, + 5374: 0x6F39, + 5375: 0x6F3A, + 5376: 0x6F3B, + 5377: 0x6F3C, + 5378: 0x6F3D, + 5379: 0x6F3F, + 5380: 0x6F40, + 5381: 0x6F41, + 5382: 0x6F42, + 5383: 0x6F43, + 5384: 0x6F44, + 5385: 0x6F45, + 5386: 0x6F48, + 5387: 0x6F49, + 5388: 0x6F4A, + 5389: 0x6F4C, + 5390: 0x6F4E, + 5391: 0x6F4F, + 5392: 0x6F50, + 5393: 0x6F51, + 5394: 0x6F52, + 5395: 0x6F53, + 5396: 0x6F54, + 5397: 0x6F55, + 5398: 0x6F56, + 5399: 0x6F57, + 5400: 0x6F59, + 5401: 0x6F5A, + 5402: 0x6F5B, + 5403: 0x6F5D, + 5404: 0x6F5F, + 5405: 0x6F60, + 5406: 0x6F61, + 5407: 0x6F63, + 5408: 0x6F64, + 5409: 0x6F65, + 5410: 0x6F67, + 5411: 0x6F68, + 5412: 0x6F69, + 5413: 0x6F6A, + 5414: 0x6F6B, + 5415: 0x6F6C, + 5416: 0x6F6F, + 5417: 0x6F70, + 5418: 0x6F71, + 5419: 0x6F73, + 5420: 0x6F75, + 5421: 0x6F76, + 5422: 0x6F77, + 5423: 0x6F79, + 5424: 0x6F7B, + 5425: 0x6F7D, + 5426: 0x6F7E, + 5427: 0x6F7F, + 5428: 0x6F80, + 5429: 0x6F81, + 5430: 0x6F82, + 5431: 0x6F83, + 5432: 0x6F85, + 5433: 0x6F86, + 5434: 0x6F87, + 5435: 0x6F8A, + 5436: 0x6F8B, + 5437: 0x6F8F, + 5438: 0x6F90, + 5439: 0x6F91, + 5440: 0x6F92, + 5441: 0x6F93, + 5442: 0x6F94, + 5443: 0x6F95, + 5444: 0x6F96, + 5445: 0x6F97, + 5446: 0x6F98, + 5447: 0x6F99, + 5448: 0x6F9A, + 5449: 0x6F9B, + 5450: 0x6F9D, + 5451: 0x6F9E, + 5452: 0x6F9F, + 5453: 0x6FA0, + 5454: 0x6FA2, + 5455: 0x6FA3, + 5456: 0x6FA4, + 5457: 0x6FA5, + 5458: 0x6FA6, + 5459: 0x6FA8, + 5460: 0x6FA9, + 5461: 0x6FAA, + 5462: 0x6FAB, + 5463: 0x6FAC, + 5464: 0x6FAD, + 5465: 0x6FAE, + 5466: 0x6FAF, + 5467: 0x6FB0, + 5468: 0x6FB1, + 5469: 0x6FB2, + 5470: 0x6FB4, + 5471: 0x6FB5, + 5472: 0x6FB7, + 5473: 0x6FB8, + 5474: 0x6FBA, + 5475: 0x6FBB, + 5476: 0x6FBC, + 5477: 0x6FBD, + 5478: 0x6FBE, + 5479: 0x6FBF, + 5480: 0x6FC1, + 5481: 0x6FC3, + 5482: 0x6FC4, + 5483: 0x6FC5, + 5484: 0x6FC6, + 5485: 0x6FC7, + 5486: 0x6FC8, + 5487: 0x6FCA, + 5488: 0x6FCB, + 5489: 0x6FCC, + 5490: 0x6FCD, + 5491: 0x6FCE, + 5492: 0x6FCF, + 5493: 0x6FD0, + 5494: 0x6FD3, + 5495: 0x6FD4, + 5496: 0x6FD5, + 5497: 0x6FD6, + 5498: 0x6FD7, + 5499: 0x6FD8, + 5500: 0x6FD9, + 5501: 0x6FDA, + 5502: 0x6FDB, + 5503: 0x6FDC, + 5504: 0x6FDD, + 5505: 0x6FDF, + 5506: 0x6FE2, + 5507: 0x6FE3, + 5508: 0x6FE4, + 5509: 0x6FE5, + 5510: 0x6FE6, + 5511: 0x6FE7, + 5512: 0x6FE8, + 5513: 0x6FE9, + 5514: 0x6FEA, + 5515: 0x6FEB, + 5516: 0x6FEC, + 5517: 0x6FED, + 5518: 0x6FF0, + 5519: 0x6FF1, + 5520: 0x6FF2, + 5521: 0x6FF3, + 5522: 0x6FF4, + 5523: 0x6FF5, + 5524: 0x6FF6, + 5525: 0x6FF7, + 5526: 0x6FF8, + 5527: 0x6FF9, + 5528: 0x6FFA, + 5529: 0x6FFB, + 5530: 0x6FFC, + 5531: 0x6FFD, + 5532: 0x6FFE, + 5533: 0x6FFF, + 5534: 0x7000, + 5535: 0x7001, + 5536: 0x7002, + 5537: 0x7003, + 5538: 0x7004, + 5539: 0x7005, + 5540: 0x7006, + 5541: 0x7007, + 5542: 0x7008, + 5543: 0x7009, + 5544: 0x700A, + 5545: 0x700B, + 5546: 0x700C, + 5547: 0x700D, + 5548: 0x700E, + 5549: 0x700F, + 5550: 0x7010, + 5551: 0x7012, + 5552: 0x7013, + 5553: 0x7014, + 5554: 0x7015, + 5555: 0x7016, + 5556: 0x7017, + 5557: 0x7018, + 5558: 0x7019, + 5559: 0x701C, + 5560: 0x701D, + 5561: 0x701E, + 5562: 0x701F, + 5563: 0x7020, + 5564: 0x7021, + 5565: 0x7022, + 5566: 0x7024, + 5567: 0x7025, + 5568: 0x7026, + 5569: 0x7027, + 5570: 0x7028, + 5571: 0x7029, + 5572: 0x702A, + 5573: 0x702B, + 5574: 0x702C, + 5575: 0x702D, + 5576: 0x702E, + 5577: 0x702F, + 5578: 0x7030, + 5579: 0x7031, + 5580: 0x7032, + 5581: 0x7033, + 5582: 0x7034, + 5583: 0x7036, + 5584: 0x7037, + 5585: 0x7038, + 5586: 0x703A, + 5587: 0x703B, + 5588: 0x703C, + 5589: 0x703D, + 5590: 0x703E, + 5591: 0x703F, + 5592: 0x7040, + 5593: 0x7041, + 5594: 0x7042, + 5595: 0x7043, + 5596: 0x7044, + 5597: 0x7045, + 5598: 0x7046, + 5599: 0x7047, + 5600: 0x7048, + 5601: 0x7049, + 5602: 0x704A, + 5603: 0x704B, + 5604: 0x704D, + 5605: 0x704E, + 5606: 0x7050, + 5607: 0x7051, + 5608: 0x7052, + 5609: 0x7053, + 5610: 0x7054, + 5611: 0x7055, + 5612: 0x7056, + 5613: 0x7057, + 5614: 0x7058, + 5615: 0x7059, + 5616: 0x705A, + 5617: 0x705B, + 5618: 0x705C, + 5619: 0x705D, + 5620: 0x705F, + 5621: 0x7060, + 5622: 0x7061, + 5623: 0x7062, + 5624: 0x7063, + 5625: 0x7064, + 5626: 0x7065, + 5627: 0x7066, + 5628: 0x7067, + 5629: 0x7068, + 5630: 0x7069, + 5631: 0x706A, + 5632: 0x706E, + 5633: 0x7071, + 5634: 0x7072, + 5635: 0x7073, + 5636: 0x7074, + 5637: 0x7077, + 5638: 0x7079, + 5639: 0x707A, + 5640: 0x707B, + 5641: 0x707D, + 5642: 0x7081, + 5643: 0x7082, + 5644: 0x7083, + 5645: 0x7084, + 5646: 0x7086, + 5647: 0x7087, + 5648: 0x7088, + 5649: 0x708B, + 5650: 0x708C, + 5651: 0x708D, + 5652: 0x708F, + 5653: 0x7090, + 5654: 0x7091, + 5655: 0x7093, + 5656: 0x7097, + 5657: 0x7098, + 5658: 0x709A, + 5659: 0x709B, + 5660: 0x709E, + 5661: 0x709F, + 5662: 0x70A0, + 5663: 0x70A1, + 5664: 0x70A2, + 5665: 0x70A3, + 5666: 0x70A4, + 5667: 0x70A5, + 5668: 0x70A6, + 5669: 0x70A7, + 5670: 0x70A8, + 5671: 0x70A9, + 5672: 0x70AA, + 5673: 0x70B0, + 5674: 0x70B2, + 5675: 0x70B4, + 5676: 0x70B5, + 5677: 0x70B6, + 5678: 0x70BA, + 5679: 0x70BE, + 5680: 0x70BF, + 5681: 0x70C4, + 5682: 0x70C5, + 5683: 0x70C6, + 5684: 0x70C7, + 5685: 0x70C9, + 5686: 0x70CB, + 5687: 0x70CC, + 5688: 0x70CD, + 5689: 0x70CE, + 5690: 0x70CF, + 5691: 0x70D0, + 5692: 0x70D1, + 5693: 0x70D2, + 5694: 0x70D3, + 5695: 0x70D4, + 5696: 0x70D5, + 5697: 0x70D6, + 5698: 0x70D7, + 5699: 0x70DA, + 5700: 0x70DC, + 5701: 0x70DD, + 5702: 0x70DE, + 5703: 0x70E0, + 5704: 0x70E1, + 5705: 0x70E2, + 5706: 0x70E3, + 5707: 0x70E5, + 5708: 0x70EA, + 5709: 0x70EE, + 5710: 0x70F0, + 5711: 0x70F1, + 5712: 0x70F2, + 5713: 0x70F3, + 5714: 0x70F4, + 5715: 0x70F5, + 5716: 0x70F6, + 5717: 0x70F8, + 5718: 0x70FA, + 5719: 0x70FB, + 5720: 0x70FC, + 5721: 0x70FE, + 5722: 0x70FF, + 5723: 0x7100, + 5724: 0x7101, + 5725: 0x7102, + 5726: 0x7103, + 5727: 0x7104, + 5728: 0x7105, + 5729: 0x7106, + 5730: 0x7107, + 5731: 0x7108, + 5732: 0x710B, + 5733: 0x710C, + 5734: 0x710D, + 5735: 0x710E, + 5736: 0x710F, + 5737: 0x7111, + 5738: 0x7112, + 5739: 0x7114, + 5740: 0x7117, + 5741: 0x711B, + 5742: 0x711C, + 5743: 0x711D, + 5744: 0x711E, + 5745: 0x711F, + 5746: 0x7120, + 5747: 0x7121, + 5748: 0x7122, + 5749: 0x7123, + 5750: 0x7124, + 5751: 0x7125, + 5752: 0x7127, + 5753: 0x7128, + 5754: 0x7129, + 5755: 0x712A, + 5756: 0x712B, + 5757: 0x712C, + 5758: 0x712D, + 5759: 0x712E, + 5760: 0x7132, + 5761: 0x7133, + 5762: 0x7134, + 5763: 0x7135, + 5764: 0x7137, + 5765: 0x7138, + 5766: 0x7139, + 5767: 0x713A, + 5768: 0x713B, + 5769: 0x713C, + 5770: 0x713D, + 5771: 0x713E, + 5772: 0x713F, + 5773: 0x7140, + 5774: 0x7141, + 5775: 0x7142, + 5776: 0x7143, + 5777: 0x7144, + 5778: 0x7146, + 5779: 0x7147, + 5780: 0x7148, + 5781: 0x7149, + 5782: 0x714B, + 5783: 0x714D, + 5784: 0x714F, + 5785: 0x7150, + 5786: 0x7151, + 5787: 0x7152, + 5788: 0x7153, + 5789: 0x7154, + 5790: 0x7155, + 5791: 0x7156, + 5792: 0x7157, + 5793: 0x7158, + 5794: 0x7159, + 5795: 0x715A, + 5796: 0x715B, + 5797: 0x715D, + 5798: 0x715F, + 5799: 0x7160, + 5800: 0x7161, + 5801: 0x7162, + 5802: 0x7163, + 5803: 0x7165, + 5804: 0x7169, + 5805: 0x716A, + 5806: 0x716B, + 5807: 0x716C, + 5808: 0x716D, + 5809: 0x716F, + 5810: 0x7170, + 5811: 0x7171, + 5812: 0x7174, + 5813: 0x7175, + 5814: 0x7176, + 5815: 0x7177, + 5816: 0x7179, + 5817: 0x717B, + 5818: 0x717C, + 5819: 0x717E, + 5820: 0x717F, + 5821: 0x7180, + 5822: 0x7181, + 5823: 0x7182, + 5824: 0x7183, + 5825: 0x7185, + 5826: 0x7186, + 5827: 0x7187, + 5828: 0x7188, + 5829: 0x7189, + 5830: 0x718B, + 5831: 0x718C, + 5832: 0x718D, + 5833: 0x718E, + 5834: 0x7190, + 5835: 0x7191, + 5836: 0x7192, + 5837: 0x7193, + 5838: 0x7195, + 5839: 0x7196, + 5840: 0x7197, + 5841: 0x719A, + 5842: 0x719B, + 5843: 0x719C, + 5844: 0x719D, + 5845: 0x719E, + 5846: 0x71A1, + 5847: 0x71A2, + 5848: 0x71A3, + 5849: 0x71A4, + 5850: 0x71A5, + 5851: 0x71A6, + 5852: 0x71A7, + 5853: 0x71A9, + 5854: 0x71AA, + 5855: 0x71AB, + 5856: 0x71AD, + 5857: 0x71AE, + 5858: 0x71AF, + 5859: 0x71B0, + 5860: 0x71B1, + 5861: 0x71B2, + 5862: 0x71B4, + 5863: 0x71B6, + 5864: 0x71B7, + 5865: 0x71B8, + 5866: 0x71BA, + 5867: 0x71BB, + 5868: 0x71BC, + 5869: 0x71BD, + 5870: 0x71BE, + 5871: 0x71BF, + 5872: 0x71C0, + 5873: 0x71C1, + 5874: 0x71C2, + 5875: 0x71C4, + 5876: 0x71C5, + 5877: 0x71C6, + 5878: 0x71C7, + 5879: 0x71C8, + 5880: 0x71C9, + 5881: 0x71CA, + 5882: 0x71CB, + 5883: 0x71CC, + 5884: 0x71CD, + 5885: 0x71CF, + 5886: 0x71D0, + 5887: 0x71D1, + 5888: 0x71D2, + 5889: 0x71D3, + 5890: 0x71D6, + 5891: 0x71D7, + 5892: 0x71D8, + 5893: 0x71D9, + 5894: 0x71DA, + 5895: 0x71DB, + 5896: 0x71DC, + 5897: 0x71DD, + 5898: 0x71DE, + 5899: 0x71DF, + 5900: 0x71E1, + 5901: 0x71E2, + 5902: 0x71E3, + 5903: 0x71E4, + 5904: 0x71E6, + 5905: 0x71E8, + 5906: 0x71E9, + 5907: 0x71EA, + 5908: 0x71EB, + 5909: 0x71EC, + 5910: 0x71ED, + 5911: 0x71EF, + 5912: 0x71F0, + 5913: 0x71F1, + 5914: 0x71F2, + 5915: 0x71F3, + 5916: 0x71F4, + 5917: 0x71F5, + 5918: 0x71F6, + 5919: 0x71F7, + 5920: 0x71F8, + 5921: 0x71FA, + 5922: 0x71FB, + 5923: 0x71FC, + 5924: 0x71FD, + 5925: 0x71FE, + 5926: 0x71FF, + 5927: 0x7200, + 5928: 0x7201, + 5929: 0x7202, + 5930: 0x7203, + 5931: 0x7204, + 5932: 0x7205, + 5933: 0x7207, + 5934: 0x7208, + 5935: 0x7209, + 5936: 0x720A, + 5937: 0x720B, + 5938: 0x720C, + 5939: 0x720D, + 5940: 0x720E, + 5941: 0x720F, + 5942: 0x7210, + 5943: 0x7211, + 5944: 0x7212, + 5945: 0x7213, + 5946: 0x7214, + 5947: 0x7215, + 5948: 0x7216, + 5949: 0x7217, + 5950: 0x7218, + 5951: 0x7219, + 5952: 0x721A, + 5953: 0x721B, + 5954: 0x721C, + 5955: 0x721E, + 5956: 0x721F, + 5957: 0x7220, + 5958: 0x7221, + 5959: 0x7222, + 5960: 0x7223, + 5961: 0x7224, + 5962: 0x7225, + 5963: 0x7226, + 5964: 0x7227, + 5965: 0x7229, + 5966: 0x722B, + 5967: 0x722D, + 5968: 0x722E, + 5969: 0x722F, + 5970: 0x7232, + 5971: 0x7233, + 5972: 0x7234, + 5973: 0x723A, + 5974: 0x723C, + 5975: 0x723E, + 5976: 0x7240, + 5977: 0x7241, + 5978: 0x7242, + 5979: 0x7243, + 5980: 0x7244, + 5981: 0x7245, + 5982: 0x7246, + 5983: 0x7249, + 5984: 0x724A, + 5985: 0x724B, + 5986: 0x724E, + 5987: 0x724F, + 5988: 0x7250, + 5989: 0x7251, + 5990: 0x7253, + 5991: 0x7254, + 5992: 0x7255, + 5993: 0x7257, + 5994: 0x7258, + 5995: 0x725A, + 5996: 0x725C, + 5997: 0x725E, + 5998: 0x7260, + 5999: 0x7263, + 6000: 0x7264, + 6001: 0x7265, + 6002: 0x7268, + 6003: 0x726A, + 6004: 0x726B, + 6005: 0x726C, + 6006: 0x726D, + 6007: 0x7270, + 6008: 0x7271, + 6009: 0x7273, + 6010: 0x7274, + 6011: 0x7276, + 6012: 0x7277, + 6013: 0x7278, + 6014: 0x727B, + 6015: 0x727C, + 6016: 0x727D, + 6017: 0x7282, + 6018: 0x7283, + 6019: 0x7285, + 6020: 0x7286, + 6021: 0x7287, + 6022: 0x7288, + 6023: 0x7289, + 6024: 0x728C, + 6025: 0x728E, + 6026: 0x7290, + 6027: 0x7291, + 6028: 0x7293, + 6029: 0x7294, + 6030: 0x7295, + 6031: 0x7296, + 6032: 0x7297, + 6033: 0x7298, + 6034: 0x7299, + 6035: 0x729A, + 6036: 0x729B, + 6037: 0x729C, + 6038: 0x729D, + 6039: 0x729E, + 6040: 0x72A0, + 6041: 0x72A1, + 6042: 0x72A2, + 6043: 0x72A3, + 6044: 0x72A4, + 6045: 0x72A5, + 6046: 0x72A6, + 6047: 0x72A7, + 6048: 0x72A8, + 6049: 0x72A9, + 6050: 0x72AA, + 6051: 0x72AB, + 6052: 0x72AE, + 6053: 0x72B1, + 6054: 0x72B2, + 6055: 0x72B3, + 6056: 0x72B5, + 6057: 0x72BA, + 6058: 0x72BB, + 6059: 0x72BC, + 6060: 0x72BD, + 6061: 0x72BE, + 6062: 0x72BF, + 6063: 0x72C0, + 6064: 0x72C5, + 6065: 0x72C6, + 6066: 0x72C7, + 6067: 0x72C9, + 6068: 0x72CA, + 6069: 0x72CB, + 6070: 0x72CC, + 6071: 0x72CF, + 6072: 0x72D1, + 6073: 0x72D3, + 6074: 0x72D4, + 6075: 0x72D5, + 6076: 0x72D6, + 6077: 0x72D8, + 6078: 0x72DA, + 6079: 0x72DB, + 6176: 0x3000, + 6177: 0x3001, + 6178: 0x3002, + 6179: 0x00B7, + 6180: 0x02C9, + 6181: 0x02C7, + 6182: 0x00A8, + 6183: 0x3003, + 6184: 0x3005, + 6185: 0x2014, + 6186: 0xFF5E, + 6187: 0x2016, + 6188: 0x2026, + 6189: 0x2018, + 6190: 0x2019, + 6191: 0x201C, + 6192: 0x201D, + 6193: 0x3014, + 6194: 0x3015, + 6195: 0x3008, + 6196: 0x3009, + 6197: 0x300A, + 6198: 0x300B, + 6199: 0x300C, + 6200: 0x300D, + 6201: 0x300E, + 6202: 0x300F, + 6203: 0x3016, + 6204: 0x3017, + 6205: 0x3010, + 6206: 0x3011, + 6207: 0x00B1, + 6208: 0x00D7, + 6209: 0x00F7, + 6210: 0x2236, + 6211: 0x2227, + 6212: 0x2228, + 6213: 0x2211, + 6214: 0x220F, + 6215: 0x222A, + 6216: 0x2229, + 6217: 0x2208, + 6218: 0x2237, + 6219: 0x221A, + 6220: 0x22A5, + 6221: 0x2225, + 6222: 0x2220, + 6223: 0x2312, + 6224: 0x2299, + 6225: 0x222B, + 6226: 0x222E, + 6227: 0x2261, + 6228: 0x224C, + 6229: 0x2248, + 6230: 0x223D, + 6231: 0x221D, + 6232: 0x2260, + 6233: 0x226E, + 6234: 0x226F, + 6235: 0x2264, + 6236: 0x2265, + 6237: 0x221E, + 6238: 0x2235, + 6239: 0x2234, + 6240: 0x2642, + 6241: 0x2640, + 6242: 0x00B0, + 6243: 0x2032, + 6244: 0x2033, + 6245: 0x2103, + 6246: 0xFF04, + 6247: 0x00A4, + 6248: 0xFFE0, + 6249: 0xFFE1, + 6250: 0x2030, + 6251: 0x00A7, + 6252: 0x2116, + 6253: 0x2606, + 6254: 0x2605, + 6255: 0x25CB, + 6256: 0x25CF, + 6257: 0x25CE, + 6258: 0x25C7, + 6259: 0x25C6, + 6260: 0x25A1, + 6261: 0x25A0, + 6262: 0x25B3, + 6263: 0x25B2, + 6264: 0x203B, + 6265: 0x2192, + 6266: 0x2190, + 6267: 0x2191, + 6268: 0x2193, + 6269: 0x3013, + 6366: 0x2170, + 6367: 0x2171, + 6368: 0x2172, + 6369: 0x2173, + 6370: 0x2174, + 6371: 0x2175, + 6372: 0x2176, + 6373: 0x2177, + 6374: 0x2178, + 6375: 0x2179, + 6382: 0x2488, + 6383: 0x2489, + 6384: 0x248A, + 6385: 0x248B, + 6386: 0x248C, + 6387: 0x248D, + 6388: 0x248E, + 6389: 0x248F, + 6390: 0x2490, + 6391: 0x2491, + 6392: 0x2492, + 6393: 0x2493, + 6394: 0x2494, + 6395: 0x2495, + 6396: 0x2496, + 6397: 0x2497, + 6398: 0x2498, + 6399: 0x2499, + 6400: 0x249A, + 6401: 0x249B, + 6402: 0x2474, + 6403: 0x2475, + 6404: 0x2476, + 6405: 0x2477, + 6406: 0x2478, + 6407: 0x2479, + 6408: 0x247A, + 6409: 0x247B, + 6410: 0x247C, + 6411: 0x247D, + 6412: 0x247E, + 6413: 0x247F, + 6414: 0x2480, + 6415: 0x2481, + 6416: 0x2482, + 6417: 0x2483, + 6418: 0x2484, + 6419: 0x2485, + 6420: 0x2486, + 6421: 0x2487, + 6422: 0x2460, + 6423: 0x2461, + 6424: 0x2462, + 6425: 0x2463, + 6426: 0x2464, + 6427: 0x2465, + 6428: 0x2466, + 6429: 0x2467, + 6430: 0x2468, + 6431: 0x2469, + 6432: 0x20AC, + 6434: 0x3220, + 6435: 0x3221, + 6436: 0x3222, + 6437: 0x3223, + 6438: 0x3224, + 6439: 0x3225, + 6440: 0x3226, + 6441: 0x3227, + 6442: 0x3228, + 6443: 0x3229, + 6446: 0x2160, + 6447: 0x2161, + 6448: 0x2162, + 6449: 0x2163, + 6450: 0x2164, + 6451: 0x2165, + 6452: 0x2166, + 6453: 0x2167, + 6454: 0x2168, + 6455: 0x2169, + 6456: 0x216A, + 6457: 0x216B, + 6555: 0x3000, + 6556: 0xFF01, + 6557: 0xFF02, + 6558: 0xFF03, + 6559: 0xFFE5, + 6560: 0xFF05, + 6561: 0xFF06, + 6562: 0xFF07, + 6563: 0xFF08, + 6564: 0xFF09, + 6565: 0xFF0A, + 6566: 0xFF0B, + 6567: 0xFF0C, + 6568: 0xFF0D, + 6569: 0xFF0E, + 6570: 0xFF0F, + 6571: 0xFF10, + 6572: 0xFF11, + 6573: 0xFF12, + 6574: 0xFF13, + 6575: 0xFF14, + 6576: 0xFF15, + 6577: 0xFF16, + 6578: 0xFF17, + 6579: 0xFF18, + 6580: 0xFF19, + 6581: 0xFF1A, + 6582: 0xFF1B, + 6583: 0xFF1C, + 6584: 0xFF1D, + 6585: 0xFF1E, + 6586: 0xFF1F, + 6587: 0xFF20, + 6588: 0xFF21, + 6589: 0xFF22, + 6590: 0xFF23, + 6591: 0xFF24, + 6592: 0xFF25, + 6593: 0xFF26, + 6594: 0xFF27, + 6595: 0xFF28, + 6596: 0xFF29, + 6597: 0xFF2A, + 6598: 0xFF2B, + 6599: 0xFF2C, + 6600: 0xFF2D, + 6601: 0xFF2E, + 6602: 0xFF2F, + 6603: 0xFF30, + 6604: 0xFF31, + 6605: 0xFF32, + 6606: 0xFF33, + 6607: 0xFF34, + 6608: 0xFF35, + 6609: 0xFF36, + 6610: 0xFF37, + 6611: 0xFF38, + 6612: 0xFF39, + 6613: 0xFF3A, + 6614: 0xFF3B, + 6615: 0xFF3C, + 6616: 0xFF3D, + 6617: 0xFF3E, + 6618: 0xFF3F, + 6619: 0xFF40, + 6620: 0xFF41, + 6621: 0xFF42, + 6622: 0xFF43, + 6623: 0xFF44, + 6624: 0xFF45, + 6625: 0xFF46, + 6626: 0xFF47, + 6627: 0xFF48, + 6628: 0xFF49, + 6629: 0xFF4A, + 6630: 0xFF4B, + 6631: 0xFF4C, + 6632: 0xFF4D, + 6633: 0xFF4E, + 6634: 0xFF4F, + 6635: 0xFF50, + 6636: 0xFF51, + 6637: 0xFF52, + 6638: 0xFF53, + 6639: 0xFF54, + 6640: 0xFF55, + 6641: 0xFF56, + 6642: 0xFF57, + 6643: 0xFF58, + 6644: 0xFF59, + 6645: 0xFF5A, + 6646: 0xFF5B, + 6647: 0xFF5C, + 6648: 0xFF5D, + 6649: 0xFFE3, + 6746: 0x3041, + 6747: 0x3042, + 6748: 0x3043, + 6749: 0x3044, + 6750: 0x3045, + 6751: 0x3046, + 6752: 0x3047, + 6753: 0x3048, + 6754: 0x3049, + 6755: 0x304A, + 6756: 0x304B, + 6757: 0x304C, + 6758: 0x304D, + 6759: 0x304E, + 6760: 0x304F, + 6761: 0x3050, + 6762: 0x3051, + 6763: 0x3052, + 6764: 0x3053, + 6765: 0x3054, + 6766: 0x3055, + 6767: 0x3056, + 6768: 0x3057, + 6769: 0x3058, + 6770: 0x3059, + 6771: 0x305A, + 6772: 0x305B, + 6773: 0x305C, + 6774: 0x305D, + 6775: 0x305E, + 6776: 0x305F, + 6777: 0x3060, + 6778: 0x3061, + 6779: 0x3062, + 6780: 0x3063, + 6781: 0x3064, + 6782: 0x3065, + 6783: 0x3066, + 6784: 0x3067, + 6785: 0x3068, + 6786: 0x3069, + 6787: 0x306A, + 6788: 0x306B, + 6789: 0x306C, + 6790: 0x306D, + 6791: 0x306E, + 6792: 0x306F, + 6793: 0x3070, + 6794: 0x3071, + 6795: 0x3072, + 6796: 0x3073, + 6797: 0x3074, + 6798: 0x3075, + 6799: 0x3076, + 6800: 0x3077, + 6801: 0x3078, + 6802: 0x3079, + 6803: 0x307A, + 6804: 0x307B, + 6805: 0x307C, + 6806: 0x307D, + 6807: 0x307E, + 6808: 0x307F, + 6809: 0x3080, + 6810: 0x3081, + 6811: 0x3082, + 6812: 0x3083, + 6813: 0x3084, + 6814: 0x3085, + 6815: 0x3086, + 6816: 0x3087, + 6817: 0x3088, + 6818: 0x3089, + 6819: 0x308A, + 6820: 0x308B, + 6821: 0x308C, + 6822: 0x308D, + 6823: 0x308E, + 6824: 0x308F, + 6825: 0x3090, + 6826: 0x3091, + 6827: 0x3092, + 6828: 0x3093, + 6936: 0x30A1, + 6937: 0x30A2, + 6938: 0x30A3, + 6939: 0x30A4, + 6940: 0x30A5, + 6941: 0x30A6, + 6942: 0x30A7, + 6943: 0x30A8, + 6944: 0x30A9, + 6945: 0x30AA, + 6946: 0x30AB, + 6947: 0x30AC, + 6948: 0x30AD, + 6949: 0x30AE, + 6950: 0x30AF, + 6951: 0x30B0, + 6952: 0x30B1, + 6953: 0x30B2, + 6954: 0x30B3, + 6955: 0x30B4, + 6956: 0x30B5, + 6957: 0x30B6, + 6958: 0x30B7, + 6959: 0x30B8, + 6960: 0x30B9, + 6961: 0x30BA, + 6962: 0x30BB, + 6963: 0x30BC, + 6964: 0x30BD, + 6965: 0x30BE, + 6966: 0x30BF, + 6967: 0x30C0, + 6968: 0x30C1, + 6969: 0x30C2, + 6970: 0x30C3, + 6971: 0x30C4, + 6972: 0x30C5, + 6973: 0x30C6, + 6974: 0x30C7, + 6975: 0x30C8, + 6976: 0x30C9, + 6977: 0x30CA, + 6978: 0x30CB, + 6979: 0x30CC, + 6980: 0x30CD, + 6981: 0x30CE, + 6982: 0x30CF, + 6983: 0x30D0, + 6984: 0x30D1, + 6985: 0x30D2, + 6986: 0x30D3, + 6987: 0x30D4, + 6988: 0x30D5, + 6989: 0x30D6, + 6990: 0x30D7, + 6991: 0x30D8, + 6992: 0x30D9, + 6993: 0x30DA, + 6994: 0x30DB, + 6995: 0x30DC, + 6996: 0x30DD, + 6997: 0x30DE, + 6998: 0x30DF, + 6999: 0x30E0, + 7000: 0x30E1, + 7001: 0x30E2, + 7002: 0x30E3, + 7003: 0x30E4, + 7004: 0x30E5, + 7005: 0x30E6, + 7006: 0x30E7, + 7007: 0x30E8, + 7008: 0x30E9, + 7009: 0x30EA, + 7010: 0x30EB, + 7011: 0x30EC, + 7012: 0x30ED, + 7013: 0x30EE, + 7014: 0x30EF, + 7015: 0x30F0, + 7016: 0x30F1, + 7017: 0x30F2, + 7018: 0x30F3, + 7019: 0x30F4, + 7020: 0x30F5, + 7021: 0x30F6, + 7126: 0x0391, + 7127: 0x0392, + 7128: 0x0393, + 7129: 0x0394, + 7130: 0x0395, + 7131: 0x0396, + 7132: 0x0397, + 7133: 0x0398, + 7134: 0x0399, + 7135: 0x039A, + 7136: 0x039B, + 7137: 0x039C, + 7138: 0x039D, + 7139: 0x039E, + 7140: 0x039F, + 7141: 0x03A0, + 7142: 0x03A1, + 7143: 0x03A3, + 7144: 0x03A4, + 7145: 0x03A5, + 7146: 0x03A6, + 7147: 0x03A7, + 7148: 0x03A8, + 7149: 0x03A9, + 7158: 0x03B1, + 7159: 0x03B2, + 7160: 0x03B3, + 7161: 0x03B4, + 7162: 0x03B5, + 7163: 0x03B6, + 7164: 0x03B7, + 7165: 0x03B8, + 7166: 0x03B9, + 7167: 0x03BA, + 7168: 0x03BB, + 7169: 0x03BC, + 7170: 0x03BD, + 7171: 0x03BE, + 7172: 0x03BF, + 7173: 0x03C0, + 7174: 0x03C1, + 7175: 0x03C3, + 7176: 0x03C4, + 7177: 0x03C5, + 7178: 0x03C6, + 7179: 0x03C7, + 7180: 0x03C8, + 7181: 0x03C9, + 7189: 0xFE35, + 7190: 0xFE36, + 7191: 0xFE39, + 7192: 0xFE3A, + 7193: 0xFE3F, + 7194: 0xFE40, + 7195: 0xFE3D, + 7196: 0xFE3E, + 7197: 0xFE41, + 7198: 0xFE42, + 7199: 0xFE43, + 7200: 0xFE44, + 7203: 0xFE3B, + 7204: 0xFE3C, + 7205: 0xFE37, + 7206: 0xFE38, + 7207: 0xFE31, + 7209: 0xFE33, + 7210: 0xFE34, + 7316: 0x0410, + 7317: 0x0411, + 7318: 0x0412, + 7319: 0x0413, + 7320: 0x0414, + 7321: 0x0415, + 7322: 0x0401, + 7323: 0x0416, + 7324: 0x0417, + 7325: 0x0418, + 7326: 0x0419, + 7327: 0x041A, + 7328: 0x041B, + 7329: 0x041C, + 7330: 0x041D, + 7331: 0x041E, + 7332: 0x041F, + 7333: 0x0420, + 7334: 0x0421, + 7335: 0x0422, + 7336: 0x0423, + 7337: 0x0424, + 7338: 0x0425, + 7339: 0x0426, + 7340: 0x0427, + 7341: 0x0428, + 7342: 0x0429, + 7343: 0x042A, + 7344: 0x042B, + 7345: 0x042C, + 7346: 0x042D, + 7347: 0x042E, + 7348: 0x042F, + 7364: 0x0430, + 7365: 0x0431, + 7366: 0x0432, + 7367: 0x0433, + 7368: 0x0434, + 7369: 0x0435, + 7370: 0x0451, + 7371: 0x0436, + 7372: 0x0437, + 7373: 0x0438, + 7374: 0x0439, + 7375: 0x043A, + 7376: 0x043B, + 7377: 0x043C, + 7378: 0x043D, + 7379: 0x043E, + 7380: 0x043F, + 7381: 0x0440, + 7382: 0x0441, + 7383: 0x0442, + 7384: 0x0443, + 7385: 0x0444, + 7386: 0x0445, + 7387: 0x0446, + 7388: 0x0447, + 7389: 0x0448, + 7390: 0x0449, + 7391: 0x044A, + 7392: 0x044B, + 7393: 0x044C, + 7394: 0x044D, + 7395: 0x044E, + 7396: 0x044F, + 7410: 0x02CA, + 7411: 0x02CB, + 7412: 0x02D9, + 7413: 0x2013, + 7414: 0x2015, + 7415: 0x2025, + 7416: 0x2035, + 7417: 0x2105, + 7418: 0x2109, + 7419: 0x2196, + 7420: 0x2197, + 7421: 0x2198, + 7422: 0x2199, + 7423: 0x2215, + 7424: 0x221F, + 7425: 0x2223, + 7426: 0x2252, + 7427: 0x2266, + 7428: 0x2267, + 7429: 0x22BF, + 7430: 0x2550, + 7431: 0x2551, + 7432: 0x2552, + 7433: 0x2553, + 7434: 0x2554, + 7435: 0x2555, + 7436: 0x2556, + 7437: 0x2557, + 7438: 0x2558, + 7439: 0x2559, + 7440: 0x255A, + 7441: 0x255B, + 7442: 0x255C, + 7443: 0x255D, + 7444: 0x255E, + 7445: 0x255F, + 7446: 0x2560, + 7447: 0x2561, + 7448: 0x2562, + 7449: 0x2563, + 7450: 0x2564, + 7451: 0x2565, + 7452: 0x2566, + 7453: 0x2567, + 7454: 0x2568, + 7455: 0x2569, + 7456: 0x256A, + 7457: 0x256B, + 7458: 0x256C, + 7459: 0x256D, + 7460: 0x256E, + 7461: 0x256F, + 7462: 0x2570, + 7463: 0x2571, + 7464: 0x2572, + 7465: 0x2573, + 7466: 0x2581, + 7467: 0x2582, + 7468: 0x2583, + 7469: 0x2584, + 7470: 0x2585, + 7471: 0x2586, + 7472: 0x2587, + 7473: 0x2588, + 7474: 0x2589, + 7475: 0x258A, + 7476: 0x258B, + 7477: 0x258C, + 7478: 0x258D, + 7479: 0x258E, + 7480: 0x258F, + 7481: 0x2593, + 7482: 0x2594, + 7483: 0x2595, + 7484: 0x25BC, + 7485: 0x25BD, + 7486: 0x25E2, + 7487: 0x25E3, + 7488: 0x25E4, + 7489: 0x25E5, + 7490: 0x2609, + 7491: 0x2295, + 7492: 0x3012, + 7493: 0x301D, + 7494: 0x301E, + 7506: 0x0101, + 7507: 0x00E1, + 7508: 0x01CE, + 7509: 0x00E0, + 7510: 0x0113, + 7511: 0x00E9, + 7512: 0x011B, + 7513: 0x00E8, + 7514: 0x012B, + 7515: 0x00ED, + 7516: 0x01D0, + 7517: 0x00EC, + 7518: 0x014D, + 7519: 0x00F3, + 7520: 0x01D2, + 7521: 0x00F2, + 7522: 0x016B, + 7523: 0x00FA, + 7524: 0x01D4, + 7525: 0x00F9, + 7526: 0x01D6, + 7527: 0x01D8, + 7528: 0x01DA, + 7529: 0x01DC, + 7530: 0x00FC, + 7531: 0x00EA, + 7532: 0x0251, + 7534: 0x0144, + 7535: 0x0148, + 7536: 0x01F9, + 7537: 0x0261, + 7542: 0x3105, + 7543: 0x3106, + 7544: 0x3107, + 7545: 0x3108, + 7546: 0x3109, + 7547: 0x310A, + 7548: 0x310B, + 7549: 0x310C, + 7550: 0x310D, + 7551: 0x310E, + 7552: 0x310F, + 7553: 0x3110, + 7554: 0x3111, + 7555: 0x3112, + 7556: 0x3113, + 7557: 0x3114, + 7558: 0x3115, + 7559: 0x3116, + 7560: 0x3117, + 7561: 0x3118, + 7562: 0x3119, + 7563: 0x311A, + 7564: 0x311B, + 7565: 0x311C, + 7566: 0x311D, + 7567: 0x311E, + 7568: 0x311F, + 7569: 0x3120, + 7570: 0x3121, + 7571: 0x3122, + 7572: 0x3123, + 7573: 0x3124, + 7574: 0x3125, + 7575: 0x3126, + 7576: 0x3127, + 7577: 0x3128, + 7578: 0x3129, + 7600: 0x3021, + 7601: 0x3022, + 7602: 0x3023, + 7603: 0x3024, + 7604: 0x3025, + 7605: 0x3026, + 7606: 0x3027, + 7607: 0x3028, + 7608: 0x3029, + 7609: 0x32A3, + 7610: 0x338E, + 7611: 0x338F, + 7612: 0x339C, + 7613: 0x339D, + 7614: 0x339E, + 7615: 0x33A1, + 7616: 0x33C4, + 7617: 0x33CE, + 7618: 0x33D1, + 7619: 0x33D2, + 7620: 0x33D5, + 7621: 0xFE30, + 7622: 0xFFE2, + 7623: 0xFFE4, + 7625: 0x2121, + 7626: 0x3231, + 7628: 0x2010, + 7632: 0x30FC, + 7633: 0x309B, + 7634: 0x309C, + 7635: 0x30FD, + 7636: 0x30FE, + 7637: 0x3006, + 7638: 0x309D, + 7639: 0x309E, + 7640: 0xFE49, + 7641: 0xFE4A, + 7642: 0xFE4B, + 7643: 0xFE4C, + 7644: 0xFE4D, + 7645: 0xFE4E, + 7646: 0xFE4F, + 7647: 0xFE50, + 7648: 0xFE51, + 7649: 0xFE52, + 7650: 0xFE54, + 7651: 0xFE55, + 7652: 0xFE56, + 7653: 0xFE57, + 7654: 0xFE59, + 7655: 0xFE5A, + 7656: 0xFE5B, + 7657: 0xFE5C, + 7658: 0xFE5D, + 7659: 0xFE5E, + 7660: 0xFE5F, + 7661: 0xFE60, + 7662: 0xFE61, + 7663: 0xFE62, + 7664: 0xFE63, + 7665: 0xFE64, + 7666: 0xFE65, + 7667: 0xFE66, + 7668: 0xFE68, + 7669: 0xFE69, + 7670: 0xFE6A, + 7671: 0xFE6B, + 7672: 0x303E, + 7673: 0x2FF0, + 7674: 0x2FF1, + 7675: 0x2FF2, + 7676: 0x2FF3, + 7677: 0x2FF4, + 7678: 0x2FF5, + 7679: 0x2FF6, + 7680: 0x2FF7, + 7681: 0x2FF8, + 7682: 0x2FF9, + 7683: 0x2FFA, + 7684: 0x2FFB, + 7685: 0x3007, + 7699: 0x2500, + 7700: 0x2501, + 7701: 0x2502, + 7702: 0x2503, + 7703: 0x2504, + 7704: 0x2505, + 7705: 0x2506, + 7706: 0x2507, + 7707: 0x2508, + 7708: 0x2509, + 7709: 0x250A, + 7710: 0x250B, + 7711: 0x250C, + 7712: 0x250D, + 7713: 0x250E, + 7714: 0x250F, + 7715: 0x2510, + 7716: 0x2511, + 7717: 0x2512, + 7718: 0x2513, + 7719: 0x2514, + 7720: 0x2515, + 7721: 0x2516, + 7722: 0x2517, + 7723: 0x2518, + 7724: 0x2519, + 7725: 0x251A, + 7726: 0x251B, + 7727: 0x251C, + 7728: 0x251D, + 7729: 0x251E, + 7730: 0x251F, + 7731: 0x2520, + 7732: 0x2521, + 7733: 0x2522, + 7734: 0x2523, + 7735: 0x2524, + 7736: 0x2525, + 7737: 0x2526, + 7738: 0x2527, + 7739: 0x2528, + 7740: 0x2529, + 7741: 0x252A, + 7742: 0x252B, + 7743: 0x252C, + 7744: 0x252D, + 7745: 0x252E, + 7746: 0x252F, + 7747: 0x2530, + 7748: 0x2531, + 7749: 0x2532, + 7750: 0x2533, + 7751: 0x2534, + 7752: 0x2535, + 7753: 0x2536, + 7754: 0x2537, + 7755: 0x2538, + 7756: 0x2539, + 7757: 0x253A, + 7758: 0x253B, + 7759: 0x253C, + 7760: 0x253D, + 7761: 0x253E, + 7762: 0x253F, + 7763: 0x2540, + 7764: 0x2541, + 7765: 0x2542, + 7766: 0x2543, + 7767: 0x2544, + 7768: 0x2545, + 7769: 0x2546, + 7770: 0x2547, + 7771: 0x2548, + 7772: 0x2549, + 7773: 0x254A, + 7774: 0x254B, + 7790: 0x72DC, + 7791: 0x72DD, + 7792: 0x72DF, + 7793: 0x72E2, + 7794: 0x72E3, + 7795: 0x72E4, + 7796: 0x72E5, + 7797: 0x72E6, + 7798: 0x72E7, + 7799: 0x72EA, + 7800: 0x72EB, + 7801: 0x72F5, + 7802: 0x72F6, + 7803: 0x72F9, + 7804: 0x72FD, + 7805: 0x72FE, + 7806: 0x72FF, + 7807: 0x7300, + 7808: 0x7302, + 7809: 0x7304, + 7810: 0x7305, + 7811: 0x7306, + 7812: 0x7307, + 7813: 0x7308, + 7814: 0x7309, + 7815: 0x730B, + 7816: 0x730C, + 7817: 0x730D, + 7818: 0x730F, + 7819: 0x7310, + 7820: 0x7311, + 7821: 0x7312, + 7822: 0x7314, + 7823: 0x7318, + 7824: 0x7319, + 7825: 0x731A, + 7826: 0x731F, + 7827: 0x7320, + 7828: 0x7323, + 7829: 0x7324, + 7830: 0x7326, + 7831: 0x7327, + 7832: 0x7328, + 7833: 0x732D, + 7834: 0x732F, + 7835: 0x7330, + 7836: 0x7332, + 7837: 0x7333, + 7838: 0x7335, + 7839: 0x7336, + 7840: 0x733A, + 7841: 0x733B, + 7842: 0x733C, + 7843: 0x733D, + 7844: 0x7340, + 7845: 0x7341, + 7846: 0x7342, + 7847: 0x7343, + 7848: 0x7344, + 7849: 0x7345, + 7850: 0x7346, + 7851: 0x7347, + 7852: 0x7348, + 7853: 0x7349, + 7854: 0x734A, + 7855: 0x734B, + 7856: 0x734C, + 7857: 0x734E, + 7858: 0x734F, + 7859: 0x7351, + 7860: 0x7353, + 7861: 0x7354, + 7862: 0x7355, + 7863: 0x7356, + 7864: 0x7358, + 7865: 0x7359, + 7866: 0x735A, + 7867: 0x735B, + 7868: 0x735C, + 7869: 0x735D, + 7870: 0x735E, + 7871: 0x735F, + 7872: 0x7361, + 7873: 0x7362, + 7874: 0x7363, + 7875: 0x7364, + 7876: 0x7365, + 7877: 0x7366, + 7878: 0x7367, + 7879: 0x7368, + 7880: 0x7369, + 7881: 0x736A, + 7882: 0x736B, + 7883: 0x736E, + 7884: 0x7370, + 7885: 0x7371, + 7980: 0x7372, + 7981: 0x7373, + 7982: 0x7374, + 7983: 0x7375, + 7984: 0x7376, + 7985: 0x7377, + 7986: 0x7378, + 7987: 0x7379, + 7988: 0x737A, + 7989: 0x737B, + 7990: 0x737C, + 7991: 0x737D, + 7992: 0x737F, + 7993: 0x7380, + 7994: 0x7381, + 7995: 0x7382, + 7996: 0x7383, + 7997: 0x7385, + 7998: 0x7386, + 7999: 0x7388, + 8000: 0x738A, + 8001: 0x738C, + 8002: 0x738D, + 8003: 0x738F, + 8004: 0x7390, + 8005: 0x7392, + 8006: 0x7393, + 8007: 0x7394, + 8008: 0x7395, + 8009: 0x7397, + 8010: 0x7398, + 8011: 0x7399, + 8012: 0x739A, + 8013: 0x739C, + 8014: 0x739D, + 8015: 0x739E, + 8016: 0x73A0, + 8017: 0x73A1, + 8018: 0x73A3, + 8019: 0x73A4, + 8020: 0x73A5, + 8021: 0x73A6, + 8022: 0x73A7, + 8023: 0x73A8, + 8024: 0x73AA, + 8025: 0x73AC, + 8026: 0x73AD, + 8027: 0x73B1, + 8028: 0x73B4, + 8029: 0x73B5, + 8030: 0x73B6, + 8031: 0x73B8, + 8032: 0x73B9, + 8033: 0x73BC, + 8034: 0x73BD, + 8035: 0x73BE, + 8036: 0x73BF, + 8037: 0x73C1, + 8038: 0x73C3, + 8039: 0x73C4, + 8040: 0x73C5, + 8041: 0x73C6, + 8042: 0x73C7, + 8043: 0x73CB, + 8044: 0x73CC, + 8045: 0x73CE, + 8046: 0x73D2, + 8047: 0x73D3, + 8048: 0x73D4, + 8049: 0x73D5, + 8050: 0x73D6, + 8051: 0x73D7, + 8052: 0x73D8, + 8053: 0x73DA, + 8054: 0x73DB, + 8055: 0x73DC, + 8056: 0x73DD, + 8057: 0x73DF, + 8058: 0x73E1, + 8059: 0x73E2, + 8060: 0x73E3, + 8061: 0x73E4, + 8062: 0x73E6, + 8063: 0x73E8, + 8064: 0x73EA, + 8065: 0x73EB, + 8066: 0x73EC, + 8067: 0x73EE, + 8068: 0x73EF, + 8069: 0x73F0, + 8070: 0x73F1, + 8071: 0x73F3, + 8072: 0x73F4, + 8073: 0x73F5, + 8074: 0x73F6, + 8075: 0x73F7, + 8170: 0x73F8, + 8171: 0x73F9, + 8172: 0x73FA, + 8173: 0x73FB, + 8174: 0x73FC, + 8175: 0x73FD, + 8176: 0x73FE, + 8177: 0x73FF, + 8178: 0x7400, + 8179: 0x7401, + 8180: 0x7402, + 8181: 0x7404, + 8182: 0x7407, + 8183: 0x7408, + 8184: 0x740B, + 8185: 0x740C, + 8186: 0x740D, + 8187: 0x740E, + 8188: 0x7411, + 8189: 0x7412, + 8190: 0x7413, + 8191: 0x7414, + 8192: 0x7415, + 8193: 0x7416, + 8194: 0x7417, + 8195: 0x7418, + 8196: 0x7419, + 8197: 0x741C, + 8198: 0x741D, + 8199: 0x741E, + 8200: 0x741F, + 8201: 0x7420, + 8202: 0x7421, + 8203: 0x7423, + 8204: 0x7424, + 8205: 0x7427, + 8206: 0x7429, + 8207: 0x742B, + 8208: 0x742D, + 8209: 0x742F, + 8210: 0x7431, + 8211: 0x7432, + 8212: 0x7437, + 8213: 0x7438, + 8214: 0x7439, + 8215: 0x743A, + 8216: 0x743B, + 8217: 0x743D, + 8218: 0x743E, + 8219: 0x743F, + 8220: 0x7440, + 8221: 0x7442, + 8222: 0x7443, + 8223: 0x7444, + 8224: 0x7445, + 8225: 0x7446, + 8226: 0x7447, + 8227: 0x7448, + 8228: 0x7449, + 8229: 0x744A, + 8230: 0x744B, + 8231: 0x744C, + 8232: 0x744D, + 8233: 0x744E, + 8234: 0x744F, + 8235: 0x7450, + 8236: 0x7451, + 8237: 0x7452, + 8238: 0x7453, + 8239: 0x7454, + 8240: 0x7456, + 8241: 0x7458, + 8242: 0x745D, + 8243: 0x7460, + 8244: 0x7461, + 8245: 0x7462, + 8246: 0x7463, + 8247: 0x7464, + 8248: 0x7465, + 8249: 0x7466, + 8250: 0x7467, + 8251: 0x7468, + 8252: 0x7469, + 8253: 0x746A, + 8254: 0x746B, + 8255: 0x746C, + 8256: 0x746E, + 8257: 0x746F, + 8258: 0x7471, + 8259: 0x7472, + 8260: 0x7473, + 8261: 0x7474, + 8262: 0x7475, + 8263: 0x7478, + 8264: 0x7479, + 8265: 0x747A, + 8360: 0x747B, + 8361: 0x747C, + 8362: 0x747D, + 8363: 0x747F, + 8364: 0x7482, + 8365: 0x7484, + 8366: 0x7485, + 8367: 0x7486, + 8368: 0x7488, + 8369: 0x7489, + 8370: 0x748A, + 8371: 0x748C, + 8372: 0x748D, + 8373: 0x748F, + 8374: 0x7491, + 8375: 0x7492, + 8376: 0x7493, + 8377: 0x7494, + 8378: 0x7495, + 8379: 0x7496, + 8380: 0x7497, + 8381: 0x7498, + 8382: 0x7499, + 8383: 0x749A, + 8384: 0x749B, + 8385: 0x749D, + 8386: 0x749F, + 8387: 0x74A0, + 8388: 0x74A1, + 8389: 0x74A2, + 8390: 0x74A3, + 8391: 0x74A4, + 8392: 0x74A5, + 8393: 0x74A6, + 8394: 0x74AA, + 8395: 0x74AB, + 8396: 0x74AC, + 8397: 0x74AD, + 8398: 0x74AE, + 8399: 0x74AF, + 8400: 0x74B0, + 8401: 0x74B1, + 8402: 0x74B2, + 8403: 0x74B3, + 8404: 0x74B4, + 8405: 0x74B5, + 8406: 0x74B6, + 8407: 0x74B7, + 8408: 0x74B8, + 8409: 0x74B9, + 8410: 0x74BB, + 8411: 0x74BC, + 8412: 0x74BD, + 8413: 0x74BE, + 8414: 0x74BF, + 8415: 0x74C0, + 8416: 0x74C1, + 8417: 0x74C2, + 8418: 0x74C3, + 8419: 0x74C4, + 8420: 0x74C5, + 8421: 0x74C6, + 8422: 0x74C7, + 8423: 0x74C8, + 8424: 0x74C9, + 8425: 0x74CA, + 8426: 0x74CB, + 8427: 0x74CC, + 8428: 0x74CD, + 8429: 0x74CE, + 8430: 0x74CF, + 8431: 0x74D0, + 8432: 0x74D1, + 8433: 0x74D3, + 8434: 0x74D4, + 8435: 0x74D5, + 8436: 0x74D6, + 8437: 0x74D7, + 8438: 0x74D8, + 8439: 0x74D9, + 8440: 0x74DA, + 8441: 0x74DB, + 8442: 0x74DD, + 8443: 0x74DF, + 8444: 0x74E1, + 8445: 0x74E5, + 8446: 0x74E7, + 8447: 0x74E8, + 8448: 0x74E9, + 8449: 0x74EA, + 8450: 0x74EB, + 8451: 0x74EC, + 8452: 0x74ED, + 8453: 0x74F0, + 8454: 0x74F1, + 8455: 0x74F2, + 8550: 0x74F3, + 8551: 0x74F5, + 8552: 0x74F8, + 8553: 0x74F9, + 8554: 0x74FA, + 8555: 0x74FB, + 8556: 0x74FC, + 8557: 0x74FD, + 8558: 0x74FE, + 8559: 0x7500, + 8560: 0x7501, + 8561: 0x7502, + 8562: 0x7503, + 8563: 0x7505, + 8564: 0x7506, + 8565: 0x7507, + 8566: 0x7508, + 8567: 0x7509, + 8568: 0x750A, + 8569: 0x750B, + 8570: 0x750C, + 8571: 0x750E, + 8572: 0x7510, + 8573: 0x7512, + 8574: 0x7514, + 8575: 0x7515, + 8576: 0x7516, + 8577: 0x7517, + 8578: 0x751B, + 8579: 0x751D, + 8580: 0x751E, + 8581: 0x7520, + 8582: 0x7521, + 8583: 0x7522, + 8584: 0x7523, + 8585: 0x7524, + 8586: 0x7526, + 8587: 0x7527, + 8588: 0x752A, + 8589: 0x752E, + 8590: 0x7534, + 8591: 0x7536, + 8592: 0x7539, + 8593: 0x753C, + 8594: 0x753D, + 8595: 0x753F, + 8596: 0x7541, + 8597: 0x7542, + 8598: 0x7543, + 8599: 0x7544, + 8600: 0x7546, + 8601: 0x7547, + 8602: 0x7549, + 8603: 0x754A, + 8604: 0x754D, + 8605: 0x7550, + 8606: 0x7551, + 8607: 0x7552, + 8608: 0x7553, + 8609: 0x7555, + 8610: 0x7556, + 8611: 0x7557, + 8612: 0x7558, + 8613: 0x755D, + 8614: 0x755E, + 8615: 0x755F, + 8616: 0x7560, + 8617: 0x7561, + 8618: 0x7562, + 8619: 0x7563, + 8620: 0x7564, + 8621: 0x7567, + 8622: 0x7568, + 8623: 0x7569, + 8624: 0x756B, + 8625: 0x756C, + 8626: 0x756D, + 8627: 0x756E, + 8628: 0x756F, + 8629: 0x7570, + 8630: 0x7571, + 8631: 0x7573, + 8632: 0x7575, + 8633: 0x7576, + 8634: 0x7577, + 8635: 0x757A, + 8636: 0x757B, + 8637: 0x757C, + 8638: 0x757D, + 8639: 0x757E, + 8640: 0x7580, + 8641: 0x7581, + 8642: 0x7582, + 8643: 0x7584, + 8644: 0x7585, + 8645: 0x7587, + 8740: 0x7588, + 8741: 0x7589, + 8742: 0x758A, + 8743: 0x758C, + 8744: 0x758D, + 8745: 0x758E, + 8746: 0x7590, + 8747: 0x7593, + 8748: 0x7595, + 8749: 0x7598, + 8750: 0x759B, + 8751: 0x759C, + 8752: 0x759E, + 8753: 0x75A2, + 8754: 0x75A6, + 8755: 0x75A7, + 8756: 0x75A8, + 8757: 0x75A9, + 8758: 0x75AA, + 8759: 0x75AD, + 8760: 0x75B6, + 8761: 0x75B7, + 8762: 0x75BA, + 8763: 0x75BB, + 8764: 0x75BF, + 8765: 0x75C0, + 8766: 0x75C1, + 8767: 0x75C6, + 8768: 0x75CB, + 8769: 0x75CC, + 8770: 0x75CE, + 8771: 0x75CF, + 8772: 0x75D0, + 8773: 0x75D1, + 8774: 0x75D3, + 8775: 0x75D7, + 8776: 0x75D9, + 8777: 0x75DA, + 8778: 0x75DC, + 8779: 0x75DD, + 8780: 0x75DF, + 8781: 0x75E0, + 8782: 0x75E1, + 8783: 0x75E5, + 8784: 0x75E9, + 8785: 0x75EC, + 8786: 0x75ED, + 8787: 0x75EE, + 8788: 0x75EF, + 8789: 0x75F2, + 8790: 0x75F3, + 8791: 0x75F5, + 8792: 0x75F6, + 8793: 0x75F7, + 8794: 0x75F8, + 8795: 0x75FA, + 8796: 0x75FB, + 8797: 0x75FD, + 8798: 0x75FE, + 8799: 0x7602, + 8800: 0x7604, + 8801: 0x7606, + 8802: 0x7607, + 8803: 0x7608, + 8804: 0x7609, + 8805: 0x760B, + 8806: 0x760D, + 8807: 0x760E, + 8808: 0x760F, + 8809: 0x7611, + 8810: 0x7612, + 8811: 0x7613, + 8812: 0x7614, + 8813: 0x7616, + 8814: 0x761A, + 8815: 0x761C, + 8816: 0x761D, + 8817: 0x761E, + 8818: 0x7621, + 8819: 0x7623, + 8820: 0x7627, + 8821: 0x7628, + 8822: 0x762C, + 8823: 0x762E, + 8824: 0x762F, + 8825: 0x7631, + 8826: 0x7632, + 8827: 0x7636, + 8828: 0x7637, + 8829: 0x7639, + 8830: 0x763A, + 8831: 0x763B, + 8832: 0x763D, + 8833: 0x7641, + 8834: 0x7642, + 8835: 0x7644, + 8930: 0x7645, + 8931: 0x7646, + 8932: 0x7647, + 8933: 0x7648, + 8934: 0x7649, + 8935: 0x764A, + 8936: 0x764B, + 8937: 0x764E, + 8938: 0x764F, + 8939: 0x7650, + 8940: 0x7651, + 8941: 0x7652, + 8942: 0x7653, + 8943: 0x7655, + 8944: 0x7657, + 8945: 0x7658, + 8946: 0x7659, + 8947: 0x765A, + 8948: 0x765B, + 8949: 0x765D, + 8950: 0x765F, + 8951: 0x7660, + 8952: 0x7661, + 8953: 0x7662, + 8954: 0x7664, + 8955: 0x7665, + 8956: 0x7666, + 8957: 0x7667, + 8958: 0x7668, + 8959: 0x7669, + 8960: 0x766A, + 8961: 0x766C, + 8962: 0x766D, + 8963: 0x766E, + 8964: 0x7670, + 8965: 0x7671, + 8966: 0x7672, + 8967: 0x7673, + 8968: 0x7674, + 8969: 0x7675, + 8970: 0x7676, + 8971: 0x7677, + 8972: 0x7679, + 8973: 0x767A, + 8974: 0x767C, + 8975: 0x767F, + 8976: 0x7680, + 8977: 0x7681, + 8978: 0x7683, + 8979: 0x7685, + 8980: 0x7689, + 8981: 0x768A, + 8982: 0x768C, + 8983: 0x768D, + 8984: 0x768F, + 8985: 0x7690, + 8986: 0x7692, + 8987: 0x7694, + 8988: 0x7695, + 8989: 0x7697, + 8990: 0x7698, + 8991: 0x769A, + 8992: 0x769B, + 8993: 0x769C, + 8994: 0x769D, + 8995: 0x769E, + 8996: 0x769F, + 8997: 0x76A0, + 8998: 0x76A1, + 8999: 0x76A2, + 9000: 0x76A3, + 9001: 0x76A5, + 9002: 0x76A6, + 9003: 0x76A7, + 9004: 0x76A8, + 9005: 0x76A9, + 9006: 0x76AA, + 9007: 0x76AB, + 9008: 0x76AC, + 9009: 0x76AD, + 9010: 0x76AF, + 9011: 0x76B0, + 9012: 0x76B3, + 9013: 0x76B5, + 9014: 0x76B6, + 9015: 0x76B7, + 9016: 0x76B8, + 9017: 0x76B9, + 9018: 0x76BA, + 9019: 0x76BB, + 9020: 0x76BC, + 9021: 0x76BD, + 9022: 0x76BE, + 9023: 0x76C0, + 9024: 0x76C1, + 9025: 0x76C3, + 9026: 0x554A, + 9027: 0x963F, + 9028: 0x57C3, + 9029: 0x6328, + 9030: 0x54CE, + 9031: 0x5509, + 9032: 0x54C0, + 9033: 0x7691, + 9034: 0x764C, + 9035: 0x853C, + 9036: 0x77EE, + 9037: 0x827E, + 9038: 0x788D, + 9039: 0x7231, + 9040: 0x9698, + 9041: 0x978D, + 9042: 0x6C28, + 9043: 0x5B89, + 9044: 0x4FFA, + 9045: 0x6309, + 9046: 0x6697, + 9047: 0x5CB8, + 9048: 0x80FA, + 9049: 0x6848, + 9050: 0x80AE, + 9051: 0x6602, + 9052: 0x76CE, + 9053: 0x51F9, + 9054: 0x6556, + 9055: 0x71AC, + 9056: 0x7FF1, + 9057: 0x8884, + 9058: 0x50B2, + 9059: 0x5965, + 9060: 0x61CA, + 9061: 0x6FB3, + 9062: 0x82AD, + 9063: 0x634C, + 9064: 0x6252, + 9065: 0x53ED, + 9066: 0x5427, + 9067: 0x7B06, + 9068: 0x516B, + 9069: 0x75A4, + 9070: 0x5DF4, + 9071: 0x62D4, + 9072: 0x8DCB, + 9073: 0x9776, + 9074: 0x628A, + 9075: 0x8019, + 9076: 0x575D, + 9077: 0x9738, + 9078: 0x7F62, + 9079: 0x7238, + 9080: 0x767D, + 9081: 0x67CF, + 9082: 0x767E, + 9083: 0x6446, + 9084: 0x4F70, + 9085: 0x8D25, + 9086: 0x62DC, + 9087: 0x7A17, + 9088: 0x6591, + 9089: 0x73ED, + 9090: 0x642C, + 9091: 0x6273, + 9092: 0x822C, + 9093: 0x9881, + 9094: 0x677F, + 9095: 0x7248, + 9096: 0x626E, + 9097: 0x62CC, + 9098: 0x4F34, + 9099: 0x74E3, + 9100: 0x534A, + 9101: 0x529E, + 9102: 0x7ECA, + 9103: 0x90A6, + 9104: 0x5E2E, + 9105: 0x6886, + 9106: 0x699C, + 9107: 0x8180, + 9108: 0x7ED1, + 9109: 0x68D2, + 9110: 0x78C5, + 9111: 0x868C, + 9112: 0x9551, + 9113: 0x508D, + 9114: 0x8C24, + 9115: 0x82DE, + 9116: 0x80DE, + 9117: 0x5305, + 9118: 0x8912, + 9119: 0x5265, + 9120: 0x76C4, + 9121: 0x76C7, + 9122: 0x76C9, + 9123: 0x76CB, + 9124: 0x76CC, + 9125: 0x76D3, + 9126: 0x76D5, + 9127: 0x76D9, + 9128: 0x76DA, + 9129: 0x76DC, + 9130: 0x76DD, + 9131: 0x76DE, + 9132: 0x76E0, + 9133: 0x76E1, + 9134: 0x76E2, + 9135: 0x76E3, + 9136: 0x76E4, + 9137: 0x76E6, + 9138: 0x76E7, + 9139: 0x76E8, + 9140: 0x76E9, + 9141: 0x76EA, + 9142: 0x76EB, + 9143: 0x76EC, + 9144: 0x76ED, + 9145: 0x76F0, + 9146: 0x76F3, + 9147: 0x76F5, + 9148: 0x76F6, + 9149: 0x76F7, + 9150: 0x76FA, + 9151: 0x76FB, + 9152: 0x76FD, + 9153: 0x76FF, + 9154: 0x7700, + 9155: 0x7702, + 9156: 0x7703, + 9157: 0x7705, + 9158: 0x7706, + 9159: 0x770A, + 9160: 0x770C, + 9161: 0x770E, + 9162: 0x770F, + 9163: 0x7710, + 9164: 0x7711, + 9165: 0x7712, + 9166: 0x7713, + 9167: 0x7714, + 9168: 0x7715, + 9169: 0x7716, + 9170: 0x7717, + 9171: 0x7718, + 9172: 0x771B, + 9173: 0x771C, + 9174: 0x771D, + 9175: 0x771E, + 9176: 0x7721, + 9177: 0x7723, + 9178: 0x7724, + 9179: 0x7725, + 9180: 0x7727, + 9181: 0x772A, + 9182: 0x772B, + 9183: 0x772C, + 9184: 0x772E, + 9185: 0x7730, + 9186: 0x7731, + 9187: 0x7732, + 9188: 0x7733, + 9189: 0x7734, + 9190: 0x7739, + 9191: 0x773B, + 9192: 0x773D, + 9193: 0x773E, + 9194: 0x773F, + 9195: 0x7742, + 9196: 0x7744, + 9197: 0x7745, + 9198: 0x7746, + 9199: 0x7748, + 9200: 0x7749, + 9201: 0x774A, + 9202: 0x774B, + 9203: 0x774C, + 9204: 0x774D, + 9205: 0x774E, + 9206: 0x774F, + 9207: 0x7752, + 9208: 0x7753, + 9209: 0x7754, + 9210: 0x7755, + 9211: 0x7756, + 9212: 0x7757, + 9213: 0x7758, + 9214: 0x7759, + 9215: 0x775C, + 9216: 0x8584, + 9217: 0x96F9, + 9218: 0x4FDD, + 9219: 0x5821, + 9220: 0x9971, + 9221: 0x5B9D, + 9222: 0x62B1, + 9223: 0x62A5, + 9224: 0x66B4, + 9225: 0x8C79, + 9226: 0x9C8D, + 9227: 0x7206, + 9228: 0x676F, + 9229: 0x7891, + 9230: 0x60B2, + 9231: 0x5351, + 9232: 0x5317, + 9233: 0x8F88, + 9234: 0x80CC, + 9235: 0x8D1D, + 9236: 0x94A1, + 9237: 0x500D, + 9238: 0x72C8, + 9239: 0x5907, + 9240: 0x60EB, + 9241: 0x7119, + 9242: 0x88AB, + 9243: 0x5954, + 9244: 0x82EF, + 9245: 0x672C, + 9246: 0x7B28, + 9247: 0x5D29, + 9248: 0x7EF7, + 9249: 0x752D, + 9250: 0x6CF5, + 9251: 0x8E66, + 9252: 0x8FF8, + 9253: 0x903C, + 9254: 0x9F3B, + 9255: 0x6BD4, + 9256: 0x9119, + 9257: 0x7B14, + 9258: 0x5F7C, + 9259: 0x78A7, + 9260: 0x84D6, + 9261: 0x853D, + 9262: 0x6BD5, + 9263: 0x6BD9, + 9264: 0x6BD6, + 9265: 0x5E01, + 9266: 0x5E87, + 9267: 0x75F9, + 9268: 0x95ED, + 9269: 0x655D, + 9270: 0x5F0A, + 9271: 0x5FC5, + 9272: 0x8F9F, + 9273: 0x58C1, + 9274: 0x81C2, + 9275: 0x907F, + 9276: 0x965B, + 9277: 0x97AD, + 9278: 0x8FB9, + 9279: 0x7F16, + 9280: 0x8D2C, + 9281: 0x6241, + 9282: 0x4FBF, + 9283: 0x53D8, + 9284: 0x535E, + 9285: 0x8FA8, + 9286: 0x8FA9, + 9287: 0x8FAB, + 9288: 0x904D, + 9289: 0x6807, + 9290: 0x5F6A, + 9291: 0x8198, + 9292: 0x8868, + 9293: 0x9CD6, + 9294: 0x618B, + 9295: 0x522B, + 9296: 0x762A, + 9297: 0x5F6C, + 9298: 0x658C, + 9299: 0x6FD2, + 9300: 0x6EE8, + 9301: 0x5BBE, + 9302: 0x6448, + 9303: 0x5175, + 9304: 0x51B0, + 9305: 0x67C4, + 9306: 0x4E19, + 9307: 0x79C9, + 9308: 0x997C, + 9309: 0x70B3, + 9310: 0x775D, + 9311: 0x775E, + 9312: 0x775F, + 9313: 0x7760, + 9314: 0x7764, + 9315: 0x7767, + 9316: 0x7769, + 9317: 0x776A, + 9318: 0x776D, + 9319: 0x776E, + 9320: 0x776F, + 9321: 0x7770, + 9322: 0x7771, + 9323: 0x7772, + 9324: 0x7773, + 9325: 0x7774, + 9326: 0x7775, + 9327: 0x7776, + 9328: 0x7777, + 9329: 0x7778, + 9330: 0x777A, + 9331: 0x777B, + 9332: 0x777C, + 9333: 0x7781, + 9334: 0x7782, + 9335: 0x7783, + 9336: 0x7786, + 9337: 0x7787, + 9338: 0x7788, + 9339: 0x7789, + 9340: 0x778A, + 9341: 0x778B, + 9342: 0x778F, + 9343: 0x7790, + 9344: 0x7793, + 9345: 0x7794, + 9346: 0x7795, + 9347: 0x7796, + 9348: 0x7797, + 9349: 0x7798, + 9350: 0x7799, + 9351: 0x779A, + 9352: 0x779B, + 9353: 0x779C, + 9354: 0x779D, + 9355: 0x779E, + 9356: 0x77A1, + 9357: 0x77A3, + 9358: 0x77A4, + 9359: 0x77A6, + 9360: 0x77A8, + 9361: 0x77AB, + 9362: 0x77AD, + 9363: 0x77AE, + 9364: 0x77AF, + 9365: 0x77B1, + 9366: 0x77B2, + 9367: 0x77B4, + 9368: 0x77B6, + 9369: 0x77B7, + 9370: 0x77B8, + 9371: 0x77B9, + 9372: 0x77BA, + 9373: 0x77BC, + 9374: 0x77BE, + 9375: 0x77C0, + 9376: 0x77C1, + 9377: 0x77C2, + 9378: 0x77C3, + 9379: 0x77C4, + 9380: 0x77C5, + 9381: 0x77C6, + 9382: 0x77C7, + 9383: 0x77C8, + 9384: 0x77C9, + 9385: 0x77CA, + 9386: 0x77CB, + 9387: 0x77CC, + 9388: 0x77CE, + 9389: 0x77CF, + 9390: 0x77D0, + 9391: 0x77D1, + 9392: 0x77D2, + 9393: 0x77D3, + 9394: 0x77D4, + 9395: 0x77D5, + 9396: 0x77D6, + 9397: 0x77D8, + 9398: 0x77D9, + 9399: 0x77DA, + 9400: 0x77DD, + 9401: 0x77DE, + 9402: 0x77DF, + 9403: 0x77E0, + 9404: 0x77E1, + 9405: 0x77E4, + 9406: 0x75C5, + 9407: 0x5E76, + 9408: 0x73BB, + 9409: 0x83E0, + 9410: 0x64AD, + 9411: 0x62E8, + 9412: 0x94B5, + 9413: 0x6CE2, + 9414: 0x535A, + 9415: 0x52C3, + 9416: 0x640F, + 9417: 0x94C2, + 9418: 0x7B94, + 9419: 0x4F2F, + 9420: 0x5E1B, + 9421: 0x8236, + 9422: 0x8116, + 9423: 0x818A, + 9424: 0x6E24, + 9425: 0x6CCA, + 9426: 0x9A73, + 9427: 0x6355, + 9428: 0x535C, + 9429: 0x54FA, + 9430: 0x8865, + 9431: 0x57E0, + 9432: 0x4E0D, + 9433: 0x5E03, + 9434: 0x6B65, + 9435: 0x7C3F, + 9436: 0x90E8, + 9437: 0x6016, + 9438: 0x64E6, + 9439: 0x731C, + 9440: 0x88C1, + 9441: 0x6750, + 9442: 0x624D, + 9443: 0x8D22, + 9444: 0x776C, + 9445: 0x8E29, + 9446: 0x91C7, + 9447: 0x5F69, + 9448: 0x83DC, + 9449: 0x8521, + 9450: 0x9910, + 9451: 0x53C2, + 9452: 0x8695, + 9453: 0x6B8B, + 9454: 0x60ED, + 9455: 0x60E8, + 9456: 0x707F, + 9457: 0x82CD, + 9458: 0x8231, + 9459: 0x4ED3, + 9460: 0x6CA7, + 9461: 0x85CF, + 9462: 0x64CD, + 9463: 0x7CD9, + 9464: 0x69FD, + 9465: 0x66F9, + 9466: 0x8349, + 9467: 0x5395, + 9468: 0x7B56, + 9469: 0x4FA7, + 9470: 0x518C, + 9471: 0x6D4B, + 9472: 0x5C42, + 9473: 0x8E6D, + 9474: 0x63D2, + 9475: 0x53C9, + 9476: 0x832C, + 9477: 0x8336, + 9478: 0x67E5, + 9479: 0x78B4, + 9480: 0x643D, + 9481: 0x5BDF, + 9482: 0x5C94, + 9483: 0x5DEE, + 9484: 0x8BE7, + 9485: 0x62C6, + 9486: 0x67F4, + 9487: 0x8C7A, + 9488: 0x6400, + 9489: 0x63BA, + 9490: 0x8749, + 9491: 0x998B, + 9492: 0x8C17, + 9493: 0x7F20, + 9494: 0x94F2, + 9495: 0x4EA7, + 9496: 0x9610, + 9497: 0x98A4, + 9498: 0x660C, + 9499: 0x7316, + 9500: 0x77E6, + 9501: 0x77E8, + 9502: 0x77EA, + 9503: 0x77EF, + 9504: 0x77F0, + 9505: 0x77F1, + 9506: 0x77F2, + 9507: 0x77F4, + 9508: 0x77F5, + 9509: 0x77F7, + 9510: 0x77F9, + 9511: 0x77FA, + 9512: 0x77FB, + 9513: 0x77FC, + 9514: 0x7803, + 9515: 0x7804, + 9516: 0x7805, + 9517: 0x7806, + 9518: 0x7807, + 9519: 0x7808, + 9520: 0x780A, + 9521: 0x780B, + 9522: 0x780E, + 9523: 0x780F, + 9524: 0x7810, + 9525: 0x7813, + 9526: 0x7815, + 9527: 0x7819, + 9528: 0x781B, + 9529: 0x781E, + 9530: 0x7820, + 9531: 0x7821, + 9532: 0x7822, + 9533: 0x7824, + 9534: 0x7828, + 9535: 0x782A, + 9536: 0x782B, + 9537: 0x782E, + 9538: 0x782F, + 9539: 0x7831, + 9540: 0x7832, + 9541: 0x7833, + 9542: 0x7835, + 9543: 0x7836, + 9544: 0x783D, + 9545: 0x783F, + 9546: 0x7841, + 9547: 0x7842, + 9548: 0x7843, + 9549: 0x7844, + 9550: 0x7846, + 9551: 0x7848, + 9552: 0x7849, + 9553: 0x784A, + 9554: 0x784B, + 9555: 0x784D, + 9556: 0x784F, + 9557: 0x7851, + 9558: 0x7853, + 9559: 0x7854, + 9560: 0x7858, + 9561: 0x7859, + 9562: 0x785A, + 9563: 0x785B, + 9564: 0x785C, + 9565: 0x785E, + 9566: 0x785F, + 9567: 0x7860, + 9568: 0x7861, + 9569: 0x7862, + 9570: 0x7863, + 9571: 0x7864, + 9572: 0x7865, + 9573: 0x7866, + 9574: 0x7867, + 9575: 0x7868, + 9576: 0x7869, + 9577: 0x786F, + 9578: 0x7870, + 9579: 0x7871, + 9580: 0x7872, + 9581: 0x7873, + 9582: 0x7874, + 9583: 0x7875, + 9584: 0x7876, + 9585: 0x7878, + 9586: 0x7879, + 9587: 0x787A, + 9588: 0x787B, + 9589: 0x787D, + 9590: 0x787E, + 9591: 0x787F, + 9592: 0x7880, + 9593: 0x7881, + 9594: 0x7882, + 9595: 0x7883, + 9596: 0x573A, + 9597: 0x5C1D, + 9598: 0x5E38, + 9599: 0x957F, + 9600: 0x507F, + 9601: 0x80A0, + 9602: 0x5382, + 9603: 0x655E, + 9604: 0x7545, + 9605: 0x5531, + 9606: 0x5021, + 9607: 0x8D85, + 9608: 0x6284, + 9609: 0x949E, + 9610: 0x671D, + 9611: 0x5632, + 9612: 0x6F6E, + 9613: 0x5DE2, + 9614: 0x5435, + 9615: 0x7092, + 9616: 0x8F66, + 9617: 0x626F, + 9618: 0x64A4, + 9619: 0x63A3, + 9620: 0x5F7B, + 9621: 0x6F88, + 9622: 0x90F4, + 9623: 0x81E3, + 9624: 0x8FB0, + 9625: 0x5C18, + 9626: 0x6668, + 9627: 0x5FF1, + 9628: 0x6C89, + 9629: 0x9648, + 9630: 0x8D81, + 9631: 0x886C, + 9632: 0x6491, + 9633: 0x79F0, + 9634: 0x57CE, + 9635: 0x6A59, + 9636: 0x6210, + 9637: 0x5448, + 9638: 0x4E58, + 9639: 0x7A0B, + 9640: 0x60E9, + 9641: 0x6F84, + 9642: 0x8BDA, + 9643: 0x627F, + 9644: 0x901E, + 9645: 0x9A8B, + 9646: 0x79E4, + 9647: 0x5403, + 9648: 0x75F4, + 9649: 0x6301, + 9650: 0x5319, + 9651: 0x6C60, + 9652: 0x8FDF, + 9653: 0x5F1B, + 9654: 0x9A70, + 9655: 0x803B, + 9656: 0x9F7F, + 9657: 0x4F88, + 9658: 0x5C3A, + 9659: 0x8D64, + 9660: 0x7FC5, + 9661: 0x65A5, + 9662: 0x70BD, + 9663: 0x5145, + 9664: 0x51B2, + 9665: 0x866B, + 9666: 0x5D07, + 9667: 0x5BA0, + 9668: 0x62BD, + 9669: 0x916C, + 9670: 0x7574, + 9671: 0x8E0C, + 9672: 0x7A20, + 9673: 0x6101, + 9674: 0x7B79, + 9675: 0x4EC7, + 9676: 0x7EF8, + 9677: 0x7785, + 9678: 0x4E11, + 9679: 0x81ED, + 9680: 0x521D, + 9681: 0x51FA, + 9682: 0x6A71, + 9683: 0x53A8, + 9684: 0x8E87, + 9685: 0x9504, + 9686: 0x96CF, + 9687: 0x6EC1, + 9688: 0x9664, + 9689: 0x695A, + 9690: 0x7884, + 9691: 0x7885, + 9692: 0x7886, + 9693: 0x7888, + 9694: 0x788A, + 9695: 0x788B, + 9696: 0x788F, + 9697: 0x7890, + 9698: 0x7892, + 9699: 0x7894, + 9700: 0x7895, + 9701: 0x7896, + 9702: 0x7899, + 9703: 0x789D, + 9704: 0x789E, + 9705: 0x78A0, + 9706: 0x78A2, + 9707: 0x78A4, + 9708: 0x78A6, + 9709: 0x78A8, + 9710: 0x78A9, + 9711: 0x78AA, + 9712: 0x78AB, + 9713: 0x78AC, + 9714: 0x78AD, + 9715: 0x78AE, + 9716: 0x78AF, + 9717: 0x78B5, + 9718: 0x78B6, + 9719: 0x78B7, + 9720: 0x78B8, + 9721: 0x78BA, + 9722: 0x78BB, + 9723: 0x78BC, + 9724: 0x78BD, + 9725: 0x78BF, + 9726: 0x78C0, + 9727: 0x78C2, + 9728: 0x78C3, + 9729: 0x78C4, + 9730: 0x78C6, + 9731: 0x78C7, + 9732: 0x78C8, + 9733: 0x78CC, + 9734: 0x78CD, + 9735: 0x78CE, + 9736: 0x78CF, + 9737: 0x78D1, + 9738: 0x78D2, + 9739: 0x78D3, + 9740: 0x78D6, + 9741: 0x78D7, + 9742: 0x78D8, + 9743: 0x78DA, + 9744: 0x78DB, + 9745: 0x78DC, + 9746: 0x78DD, + 9747: 0x78DE, + 9748: 0x78DF, + 9749: 0x78E0, + 9750: 0x78E1, + 9751: 0x78E2, + 9752: 0x78E3, + 9753: 0x78E4, + 9754: 0x78E5, + 9755: 0x78E6, + 9756: 0x78E7, + 9757: 0x78E9, + 9758: 0x78EA, + 9759: 0x78EB, + 9760: 0x78ED, + 9761: 0x78EE, + 9762: 0x78EF, + 9763: 0x78F0, + 9764: 0x78F1, + 9765: 0x78F3, + 9766: 0x78F5, + 9767: 0x78F6, + 9768: 0x78F8, + 9769: 0x78F9, + 9770: 0x78FB, + 9771: 0x78FC, + 9772: 0x78FD, + 9773: 0x78FE, + 9774: 0x78FF, + 9775: 0x7900, + 9776: 0x7902, + 9777: 0x7903, + 9778: 0x7904, + 9779: 0x7906, + 9780: 0x7907, + 9781: 0x7908, + 9782: 0x7909, + 9783: 0x790A, + 9784: 0x790B, + 9785: 0x790C, + 9786: 0x7840, + 9787: 0x50A8, + 9788: 0x77D7, + 9789: 0x6410, + 9790: 0x89E6, + 9791: 0x5904, + 9792: 0x63E3, + 9793: 0x5DDD, + 9794: 0x7A7F, + 9795: 0x693D, + 9796: 0x4F20, + 9797: 0x8239, + 9798: 0x5598, + 9799: 0x4E32, + 9800: 0x75AE, + 9801: 0x7A97, + 9802: 0x5E62, + 9803: 0x5E8A, + 9804: 0x95EF, + 9805: 0x521B, + 9806: 0x5439, + 9807: 0x708A, + 9808: 0x6376, + 9809: 0x9524, + 9810: 0x5782, + 9811: 0x6625, + 9812: 0x693F, + 9813: 0x9187, + 9814: 0x5507, + 9815: 0x6DF3, + 9816: 0x7EAF, + 9817: 0x8822, + 9818: 0x6233, + 9819: 0x7EF0, + 9820: 0x75B5, + 9821: 0x8328, + 9822: 0x78C1, + 9823: 0x96CC, + 9824: 0x8F9E, + 9825: 0x6148, + 9826: 0x74F7, + 9827: 0x8BCD, + 9828: 0x6B64, + 9829: 0x523A, + 9830: 0x8D50, + 9831: 0x6B21, + 9832: 0x806A, + 9833: 0x8471, + 9834: 0x56F1, + 9835: 0x5306, + 9836: 0x4ECE, + 9837: 0x4E1B, + 9838: 0x51D1, + 9839: 0x7C97, + 9840: 0x918B, + 9841: 0x7C07, + 9842: 0x4FC3, + 9843: 0x8E7F, + 9844: 0x7BE1, + 9845: 0x7A9C, + 9846: 0x6467, + 9847: 0x5D14, + 9848: 0x50AC, + 9849: 0x8106, + 9850: 0x7601, + 9851: 0x7CB9, + 9852: 0x6DEC, + 9853: 0x7FE0, + 9854: 0x6751, + 9855: 0x5B58, + 9856: 0x5BF8, + 9857: 0x78CB, + 9858: 0x64AE, + 9859: 0x6413, + 9860: 0x63AA, + 9861: 0x632B, + 9862: 0x9519, + 9863: 0x642D, + 9864: 0x8FBE, + 9865: 0x7B54, + 9866: 0x7629, + 9867: 0x6253, + 9868: 0x5927, + 9869: 0x5446, + 9870: 0x6B79, + 9871: 0x50A3, + 9872: 0x6234, + 9873: 0x5E26, + 9874: 0x6B86, + 9875: 0x4EE3, + 9876: 0x8D37, + 9877: 0x888B, + 9878: 0x5F85, + 9879: 0x902E, + 9880: 0x790D, + 9881: 0x790E, + 9882: 0x790F, + 9883: 0x7910, + 9884: 0x7911, + 9885: 0x7912, + 9886: 0x7914, + 9887: 0x7915, + 9888: 0x7916, + 9889: 0x7917, + 9890: 0x7918, + 9891: 0x7919, + 9892: 0x791A, + 9893: 0x791B, + 9894: 0x791C, + 9895: 0x791D, + 9896: 0x791F, + 9897: 0x7920, + 9898: 0x7921, + 9899: 0x7922, + 9900: 0x7923, + 9901: 0x7925, + 9902: 0x7926, + 9903: 0x7927, + 9904: 0x7928, + 9905: 0x7929, + 9906: 0x792A, + 9907: 0x792B, + 9908: 0x792C, + 9909: 0x792D, + 9910: 0x792E, + 9911: 0x792F, + 9912: 0x7930, + 9913: 0x7931, + 9914: 0x7932, + 9915: 0x7933, + 9916: 0x7935, + 9917: 0x7936, + 9918: 0x7937, + 9919: 0x7938, + 9920: 0x7939, + 9921: 0x793D, + 9922: 0x793F, + 9923: 0x7942, + 9924: 0x7943, + 9925: 0x7944, + 9926: 0x7945, + 9927: 0x7947, + 9928: 0x794A, + 9929: 0x794B, + 9930: 0x794C, + 9931: 0x794D, + 9932: 0x794E, + 9933: 0x794F, + 9934: 0x7950, + 9935: 0x7951, + 9936: 0x7952, + 9937: 0x7954, + 9938: 0x7955, + 9939: 0x7958, + 9940: 0x7959, + 9941: 0x7961, + 9942: 0x7963, + 9943: 0x7964, + 9944: 0x7966, + 9945: 0x7969, + 9946: 0x796A, + 9947: 0x796B, + 9948: 0x796C, + 9949: 0x796E, + 9950: 0x7970, + 9951: 0x7971, + 9952: 0x7972, + 9953: 0x7973, + 9954: 0x7974, + 9955: 0x7975, + 9956: 0x7976, + 9957: 0x7979, + 9958: 0x797B, + 9959: 0x797C, + 9960: 0x797D, + 9961: 0x797E, + 9962: 0x797F, + 9963: 0x7982, + 9964: 0x7983, + 9965: 0x7986, + 9966: 0x7987, + 9967: 0x7988, + 9968: 0x7989, + 9969: 0x798B, + 9970: 0x798C, + 9971: 0x798D, + 9972: 0x798E, + 9973: 0x7990, + 9974: 0x7991, + 9975: 0x7992, + 9976: 0x6020, + 9977: 0x803D, + 9978: 0x62C5, + 9979: 0x4E39, + 9980: 0x5355, + 9981: 0x90F8, + 9982: 0x63B8, + 9983: 0x80C6, + 9984: 0x65E6, + 9985: 0x6C2E, + 9986: 0x4F46, + 9987: 0x60EE, + 9988: 0x6DE1, + 9989: 0x8BDE, + 9990: 0x5F39, + 9991: 0x86CB, + 9992: 0x5F53, + 9993: 0x6321, + 9994: 0x515A, + 9995: 0x8361, + 9996: 0x6863, + 9997: 0x5200, + 9998: 0x6363, + 9999: 0x8E48, + 10000: 0x5012, + 10001: 0x5C9B, + 10002: 0x7977, + 10003: 0x5BFC, + 10004: 0x5230, + 10005: 0x7A3B, + 10006: 0x60BC, + 10007: 0x9053, + 10008: 0x76D7, + 10009: 0x5FB7, + 10010: 0x5F97, + 10011: 0x7684, + 10012: 0x8E6C, + 10013: 0x706F, + 10014: 0x767B, + 10015: 0x7B49, + 10016: 0x77AA, + 10017: 0x51F3, + 10018: 0x9093, + 10019: 0x5824, + 10020: 0x4F4E, + 10021: 0x6EF4, + 10022: 0x8FEA, + 10023: 0x654C, + 10024: 0x7B1B, + 10025: 0x72C4, + 10026: 0x6DA4, + 10027: 0x7FDF, + 10028: 0x5AE1, + 10029: 0x62B5, + 10030: 0x5E95, + 10031: 0x5730, + 10032: 0x8482, + 10033: 0x7B2C, + 10034: 0x5E1D, + 10035: 0x5F1F, + 10036: 0x9012, + 10037: 0x7F14, + 10038: 0x98A0, + 10039: 0x6382, + 10040: 0x6EC7, + 10041: 0x7898, + 10042: 0x70B9, + 10043: 0x5178, + 10044: 0x975B, + 10045: 0x57AB, + 10046: 0x7535, + 10047: 0x4F43, + 10048: 0x7538, + 10049: 0x5E97, + 10050: 0x60E6, + 10051: 0x5960, + 10052: 0x6DC0, + 10053: 0x6BBF, + 10054: 0x7889, + 10055: 0x53FC, + 10056: 0x96D5, + 10057: 0x51CB, + 10058: 0x5201, + 10059: 0x6389, + 10060: 0x540A, + 10061: 0x9493, + 10062: 0x8C03, + 10063: 0x8DCC, + 10064: 0x7239, + 10065: 0x789F, + 10066: 0x8776, + 10067: 0x8FED, + 10068: 0x8C0D, + 10069: 0x53E0, + 10070: 0x7993, + 10071: 0x7994, + 10072: 0x7995, + 10073: 0x7996, + 10074: 0x7997, + 10075: 0x7998, + 10076: 0x7999, + 10077: 0x799B, + 10078: 0x799C, + 10079: 0x799D, + 10080: 0x799E, + 10081: 0x799F, + 10082: 0x79A0, + 10083: 0x79A1, + 10084: 0x79A2, + 10085: 0x79A3, + 10086: 0x79A4, + 10087: 0x79A5, + 10088: 0x79A6, + 10089: 0x79A8, + 10090: 0x79A9, + 10091: 0x79AA, + 10092: 0x79AB, + 10093: 0x79AC, + 10094: 0x79AD, + 10095: 0x79AE, + 10096: 0x79AF, + 10097: 0x79B0, + 10098: 0x79B1, + 10099: 0x79B2, + 10100: 0x79B4, + 10101: 0x79B5, + 10102: 0x79B6, + 10103: 0x79B7, + 10104: 0x79B8, + 10105: 0x79BC, + 10106: 0x79BF, + 10107: 0x79C2, + 10108: 0x79C4, + 10109: 0x79C5, + 10110: 0x79C7, + 10111: 0x79C8, + 10112: 0x79CA, + 10113: 0x79CC, + 10114: 0x79CE, + 10115: 0x79CF, + 10116: 0x79D0, + 10117: 0x79D3, + 10118: 0x79D4, + 10119: 0x79D6, + 10120: 0x79D7, + 10121: 0x79D9, + 10122: 0x79DA, + 10123: 0x79DB, + 10124: 0x79DC, + 10125: 0x79DD, + 10126: 0x79DE, + 10127: 0x79E0, + 10128: 0x79E1, + 10129: 0x79E2, + 10130: 0x79E5, + 10131: 0x79E8, + 10132: 0x79EA, + 10133: 0x79EC, + 10134: 0x79EE, + 10135: 0x79F1, + 10136: 0x79F2, + 10137: 0x79F3, + 10138: 0x79F4, + 10139: 0x79F5, + 10140: 0x79F6, + 10141: 0x79F7, + 10142: 0x79F9, + 10143: 0x79FA, + 10144: 0x79FC, + 10145: 0x79FE, + 10146: 0x79FF, + 10147: 0x7A01, + 10148: 0x7A04, + 10149: 0x7A05, + 10150: 0x7A07, + 10151: 0x7A08, + 10152: 0x7A09, + 10153: 0x7A0A, + 10154: 0x7A0C, + 10155: 0x7A0F, + 10156: 0x7A10, + 10157: 0x7A11, + 10158: 0x7A12, + 10159: 0x7A13, + 10160: 0x7A15, + 10161: 0x7A16, + 10162: 0x7A18, + 10163: 0x7A19, + 10164: 0x7A1B, + 10165: 0x7A1C, + 10166: 0x4E01, + 10167: 0x76EF, + 10168: 0x53EE, + 10169: 0x9489, + 10170: 0x9876, + 10171: 0x9F0E, + 10172: 0x952D, + 10173: 0x5B9A, + 10174: 0x8BA2, + 10175: 0x4E22, + 10176: 0x4E1C, + 10177: 0x51AC, + 10178: 0x8463, + 10179: 0x61C2, + 10180: 0x52A8, + 10181: 0x680B, + 10182: 0x4F97, + 10183: 0x606B, + 10184: 0x51BB, + 10185: 0x6D1E, + 10186: 0x515C, + 10187: 0x6296, + 10188: 0x6597, + 10189: 0x9661, + 10190: 0x8C46, + 10191: 0x9017, + 10192: 0x75D8, + 10193: 0x90FD, + 10194: 0x7763, + 10195: 0x6BD2, + 10196: 0x728A, + 10197: 0x72EC, + 10198: 0x8BFB, + 10199: 0x5835, + 10200: 0x7779, + 10201: 0x8D4C, + 10202: 0x675C, + 10203: 0x9540, + 10204: 0x809A, + 10205: 0x5EA6, + 10206: 0x6E21, + 10207: 0x5992, + 10208: 0x7AEF, + 10209: 0x77ED, + 10210: 0x953B, + 10211: 0x6BB5, + 10212: 0x65AD, + 10213: 0x7F0E, + 10214: 0x5806, + 10215: 0x5151, + 10216: 0x961F, + 10217: 0x5BF9, + 10218: 0x58A9, + 10219: 0x5428, + 10220: 0x8E72, + 10221: 0x6566, + 10222: 0x987F, + 10223: 0x56E4, + 10224: 0x949D, + 10225: 0x76FE, + 10226: 0x9041, + 10227: 0x6387, + 10228: 0x54C6, + 10229: 0x591A, + 10230: 0x593A, + 10231: 0x579B, + 10232: 0x8EB2, + 10233: 0x6735, + 10234: 0x8DFA, + 10235: 0x8235, + 10236: 0x5241, + 10237: 0x60F0, + 10238: 0x5815, + 10239: 0x86FE, + 10240: 0x5CE8, + 10241: 0x9E45, + 10242: 0x4FC4, + 10243: 0x989D, + 10244: 0x8BB9, + 10245: 0x5A25, + 10246: 0x6076, + 10247: 0x5384, + 10248: 0x627C, + 10249: 0x904F, + 10250: 0x9102, + 10251: 0x997F, + 10252: 0x6069, + 10253: 0x800C, + 10254: 0x513F, + 10255: 0x8033, + 10256: 0x5C14, + 10257: 0x9975, + 10258: 0x6D31, + 10259: 0x4E8C, + 10260: 0x7A1D, + 10261: 0x7A1F, + 10262: 0x7A21, + 10263: 0x7A22, + 10264: 0x7A24, + 10265: 0x7A25, + 10266: 0x7A26, + 10267: 0x7A27, + 10268: 0x7A28, + 10269: 0x7A29, + 10270: 0x7A2A, + 10271: 0x7A2B, + 10272: 0x7A2C, + 10273: 0x7A2D, + 10274: 0x7A2E, + 10275: 0x7A2F, + 10276: 0x7A30, + 10277: 0x7A31, + 10278: 0x7A32, + 10279: 0x7A34, + 10280: 0x7A35, + 10281: 0x7A36, + 10282: 0x7A38, + 10283: 0x7A3A, + 10284: 0x7A3E, + 10285: 0x7A40, + 10286: 0x7A41, + 10287: 0x7A42, + 10288: 0x7A43, + 10289: 0x7A44, + 10290: 0x7A45, + 10291: 0x7A47, + 10292: 0x7A48, + 10293: 0x7A49, + 10294: 0x7A4A, + 10295: 0x7A4B, + 10296: 0x7A4C, + 10297: 0x7A4D, + 10298: 0x7A4E, + 10299: 0x7A4F, + 10300: 0x7A50, + 10301: 0x7A52, + 10302: 0x7A53, + 10303: 0x7A54, + 10304: 0x7A55, + 10305: 0x7A56, + 10306: 0x7A58, + 10307: 0x7A59, + 10308: 0x7A5A, + 10309: 0x7A5B, + 10310: 0x7A5C, + 10311: 0x7A5D, + 10312: 0x7A5E, + 10313: 0x7A5F, + 10314: 0x7A60, + 10315: 0x7A61, + 10316: 0x7A62, + 10317: 0x7A63, + 10318: 0x7A64, + 10319: 0x7A65, + 10320: 0x7A66, + 10321: 0x7A67, + 10322: 0x7A68, + 10323: 0x7A69, + 10324: 0x7A6A, + 10325: 0x7A6B, + 10326: 0x7A6C, + 10327: 0x7A6D, + 10328: 0x7A6E, + 10329: 0x7A6F, + 10330: 0x7A71, + 10331: 0x7A72, + 10332: 0x7A73, + 10333: 0x7A75, + 10334: 0x7A7B, + 10335: 0x7A7C, + 10336: 0x7A7D, + 10337: 0x7A7E, + 10338: 0x7A82, + 10339: 0x7A85, + 10340: 0x7A87, + 10341: 0x7A89, + 10342: 0x7A8A, + 10343: 0x7A8B, + 10344: 0x7A8C, + 10345: 0x7A8E, + 10346: 0x7A8F, + 10347: 0x7A90, + 10348: 0x7A93, + 10349: 0x7A94, + 10350: 0x7A99, + 10351: 0x7A9A, + 10352: 0x7A9B, + 10353: 0x7A9E, + 10354: 0x7AA1, + 10355: 0x7AA2, + 10356: 0x8D30, + 10357: 0x53D1, + 10358: 0x7F5A, + 10359: 0x7B4F, + 10360: 0x4F10, + 10361: 0x4E4F, + 10362: 0x9600, + 10363: 0x6CD5, + 10364: 0x73D0, + 10365: 0x85E9, + 10366: 0x5E06, + 10367: 0x756A, + 10368: 0x7FFB, + 10369: 0x6A0A, + 10370: 0x77FE, + 10371: 0x9492, + 10372: 0x7E41, + 10373: 0x51E1, + 10374: 0x70E6, + 10375: 0x53CD, + 10376: 0x8FD4, + 10377: 0x8303, + 10378: 0x8D29, + 10379: 0x72AF, + 10380: 0x996D, + 10381: 0x6CDB, + 10382: 0x574A, + 10383: 0x82B3, + 10384: 0x65B9, + 10385: 0x80AA, + 10386: 0x623F, + 10387: 0x9632, + 10388: 0x59A8, + 10389: 0x4EFF, + 10390: 0x8BBF, + 10391: 0x7EBA, + 10392: 0x653E, + 10393: 0x83F2, + 10394: 0x975E, + 10395: 0x5561, + 10396: 0x98DE, + 10397: 0x80A5, + 10398: 0x532A, + 10399: 0x8BFD, + 10400: 0x5420, + 10401: 0x80BA, + 10402: 0x5E9F, + 10403: 0x6CB8, + 10404: 0x8D39, + 10405: 0x82AC, + 10406: 0x915A, + 10407: 0x5429, + 10408: 0x6C1B, + 10409: 0x5206, + 10410: 0x7EB7, + 10411: 0x575F, + 10412: 0x711A, + 10413: 0x6C7E, + 10414: 0x7C89, + 10415: 0x594B, + 10416: 0x4EFD, + 10417: 0x5FFF, + 10418: 0x6124, + 10419: 0x7CAA, + 10420: 0x4E30, + 10421: 0x5C01, + 10422: 0x67AB, + 10423: 0x8702, + 10424: 0x5CF0, + 10425: 0x950B, + 10426: 0x98CE, + 10427: 0x75AF, + 10428: 0x70FD, + 10429: 0x9022, + 10430: 0x51AF, + 10431: 0x7F1D, + 10432: 0x8BBD, + 10433: 0x5949, + 10434: 0x51E4, + 10435: 0x4F5B, + 10436: 0x5426, + 10437: 0x592B, + 10438: 0x6577, + 10439: 0x80A4, + 10440: 0x5B75, + 10441: 0x6276, + 10442: 0x62C2, + 10443: 0x8F90, + 10444: 0x5E45, + 10445: 0x6C1F, + 10446: 0x7B26, + 10447: 0x4F0F, + 10448: 0x4FD8, + 10449: 0x670D, + 10450: 0x7AA3, + 10451: 0x7AA4, + 10452: 0x7AA7, + 10453: 0x7AA9, + 10454: 0x7AAA, + 10455: 0x7AAB, + 10456: 0x7AAE, + 10457: 0x7AAF, + 10458: 0x7AB0, + 10459: 0x7AB1, + 10460: 0x7AB2, + 10461: 0x7AB4, + 10462: 0x7AB5, + 10463: 0x7AB6, + 10464: 0x7AB7, + 10465: 0x7AB8, + 10466: 0x7AB9, + 10467: 0x7ABA, + 10468: 0x7ABB, + 10469: 0x7ABC, + 10470: 0x7ABD, + 10471: 0x7ABE, + 10472: 0x7AC0, + 10473: 0x7AC1, + 10474: 0x7AC2, + 10475: 0x7AC3, + 10476: 0x7AC4, + 10477: 0x7AC5, + 10478: 0x7AC6, + 10479: 0x7AC7, + 10480: 0x7AC8, + 10481: 0x7AC9, + 10482: 0x7ACA, + 10483: 0x7ACC, + 10484: 0x7ACD, + 10485: 0x7ACE, + 10486: 0x7ACF, + 10487: 0x7AD0, + 10488: 0x7AD1, + 10489: 0x7AD2, + 10490: 0x7AD3, + 10491: 0x7AD4, + 10492: 0x7AD5, + 10493: 0x7AD7, + 10494: 0x7AD8, + 10495: 0x7ADA, + 10496: 0x7ADB, + 10497: 0x7ADC, + 10498: 0x7ADD, + 10499: 0x7AE1, + 10500: 0x7AE2, + 10501: 0x7AE4, + 10502: 0x7AE7, + 10503: 0x7AE8, + 10504: 0x7AE9, + 10505: 0x7AEA, + 10506: 0x7AEB, + 10507: 0x7AEC, + 10508: 0x7AEE, + 10509: 0x7AF0, + 10510: 0x7AF1, + 10511: 0x7AF2, + 10512: 0x7AF3, + 10513: 0x7AF4, + 10514: 0x7AF5, + 10515: 0x7AF6, + 10516: 0x7AF7, + 10517: 0x7AF8, + 10518: 0x7AFB, + 10519: 0x7AFC, + 10520: 0x7AFE, + 10521: 0x7B00, + 10522: 0x7B01, + 10523: 0x7B02, + 10524: 0x7B05, + 10525: 0x7B07, + 10526: 0x7B09, + 10527: 0x7B0C, + 10528: 0x7B0D, + 10529: 0x7B0E, + 10530: 0x7B10, + 10531: 0x7B12, + 10532: 0x7B13, + 10533: 0x7B16, + 10534: 0x7B17, + 10535: 0x7B18, + 10536: 0x7B1A, + 10537: 0x7B1C, + 10538: 0x7B1D, + 10539: 0x7B1F, + 10540: 0x7B21, + 10541: 0x7B22, + 10542: 0x7B23, + 10543: 0x7B27, + 10544: 0x7B29, + 10545: 0x7B2D, + 10546: 0x6D6E, + 10547: 0x6DAA, + 10548: 0x798F, + 10549: 0x88B1, + 10550: 0x5F17, + 10551: 0x752B, + 10552: 0x629A, + 10553: 0x8F85, + 10554: 0x4FEF, + 10555: 0x91DC, + 10556: 0x65A7, + 10557: 0x812F, + 10558: 0x8151, + 10559: 0x5E9C, + 10560: 0x8150, + 10561: 0x8D74, + 10562: 0x526F, + 10563: 0x8986, + 10564: 0x8D4B, + 10565: 0x590D, + 10566: 0x5085, + 10567: 0x4ED8, + 10568: 0x961C, + 10569: 0x7236, + 10570: 0x8179, + 10571: 0x8D1F, + 10572: 0x5BCC, + 10573: 0x8BA3, + 10574: 0x9644, + 10575: 0x5987, + 10576: 0x7F1A, + 10577: 0x5490, + 10578: 0x5676, + 10579: 0x560E, + 10580: 0x8BE5, + 10581: 0x6539, + 10582: 0x6982, + 10583: 0x9499, + 10584: 0x76D6, + 10585: 0x6E89, + 10586: 0x5E72, + 10587: 0x7518, + 10588: 0x6746, + 10589: 0x67D1, + 10590: 0x7AFF, + 10591: 0x809D, + 10592: 0x8D76, + 10593: 0x611F, + 10594: 0x79C6, + 10595: 0x6562, + 10596: 0x8D63, + 10597: 0x5188, + 10598: 0x521A, + 10599: 0x94A2, + 10600: 0x7F38, + 10601: 0x809B, + 10602: 0x7EB2, + 10603: 0x5C97, + 10604: 0x6E2F, + 10605: 0x6760, + 10606: 0x7BD9, + 10607: 0x768B, + 10608: 0x9AD8, + 10609: 0x818F, + 10610: 0x7F94, + 10611: 0x7CD5, + 10612: 0x641E, + 10613: 0x9550, + 10614: 0x7A3F, + 10615: 0x544A, + 10616: 0x54E5, + 10617: 0x6B4C, + 10618: 0x6401, + 10619: 0x6208, + 10620: 0x9E3D, + 10621: 0x80F3, + 10622: 0x7599, + 10623: 0x5272, + 10624: 0x9769, + 10625: 0x845B, + 10626: 0x683C, + 10627: 0x86E4, + 10628: 0x9601, + 10629: 0x9694, + 10630: 0x94EC, + 10631: 0x4E2A, + 10632: 0x5404, + 10633: 0x7ED9, + 10634: 0x6839, + 10635: 0x8DDF, + 10636: 0x8015, + 10637: 0x66F4, + 10638: 0x5E9A, + 10639: 0x7FB9, + 10640: 0x7B2F, + 10641: 0x7B30, + 10642: 0x7B32, + 10643: 0x7B34, + 10644: 0x7B35, + 10645: 0x7B36, + 10646: 0x7B37, + 10647: 0x7B39, + 10648: 0x7B3B, + 10649: 0x7B3D, + 10650: 0x7B3F, + 10651: 0x7B40, + 10652: 0x7B41, + 10653: 0x7B42, + 10654: 0x7B43, + 10655: 0x7B44, + 10656: 0x7B46, + 10657: 0x7B48, + 10658: 0x7B4A, + 10659: 0x7B4D, + 10660: 0x7B4E, + 10661: 0x7B53, + 10662: 0x7B55, + 10663: 0x7B57, + 10664: 0x7B59, + 10665: 0x7B5C, + 10666: 0x7B5E, + 10667: 0x7B5F, + 10668: 0x7B61, + 10669: 0x7B63, + 10670: 0x7B64, + 10671: 0x7B65, + 10672: 0x7B66, + 10673: 0x7B67, + 10674: 0x7B68, + 10675: 0x7B69, + 10676: 0x7B6A, + 10677: 0x7B6B, + 10678: 0x7B6C, + 10679: 0x7B6D, + 10680: 0x7B6F, + 10681: 0x7B70, + 10682: 0x7B73, + 10683: 0x7B74, + 10684: 0x7B76, + 10685: 0x7B78, + 10686: 0x7B7A, + 10687: 0x7B7C, + 10688: 0x7B7D, + 10689: 0x7B7F, + 10690: 0x7B81, + 10691: 0x7B82, + 10692: 0x7B83, + 10693: 0x7B84, + 10694: 0x7B86, + 10695: 0x7B87, + 10696: 0x7B88, + 10697: 0x7B89, + 10698: 0x7B8A, + 10699: 0x7B8B, + 10700: 0x7B8C, + 10701: 0x7B8E, + 10702: 0x7B8F, + 10703: 0x7B91, + 10704: 0x7B92, + 10705: 0x7B93, + 10706: 0x7B96, + 10707: 0x7B98, + 10708: 0x7B99, + 10709: 0x7B9A, + 10710: 0x7B9B, + 10711: 0x7B9E, + 10712: 0x7B9F, + 10713: 0x7BA0, + 10714: 0x7BA3, + 10715: 0x7BA4, + 10716: 0x7BA5, + 10717: 0x7BAE, + 10718: 0x7BAF, + 10719: 0x7BB0, + 10720: 0x7BB2, + 10721: 0x7BB3, + 10722: 0x7BB5, + 10723: 0x7BB6, + 10724: 0x7BB7, + 10725: 0x7BB9, + 10726: 0x7BBA, + 10727: 0x7BBB, + 10728: 0x7BBC, + 10729: 0x7BBD, + 10730: 0x7BBE, + 10731: 0x7BBF, + 10732: 0x7BC0, + 10733: 0x7BC2, + 10734: 0x7BC3, + 10735: 0x7BC4, + 10736: 0x57C2, + 10737: 0x803F, + 10738: 0x6897, + 10739: 0x5DE5, + 10740: 0x653B, + 10741: 0x529F, + 10742: 0x606D, + 10743: 0x9F9A, + 10744: 0x4F9B, + 10745: 0x8EAC, + 10746: 0x516C, + 10747: 0x5BAB, + 10748: 0x5F13, + 10749: 0x5DE9, + 10750: 0x6C5E, + 10751: 0x62F1, + 10752: 0x8D21, + 10753: 0x5171, + 10754: 0x94A9, + 10755: 0x52FE, + 10756: 0x6C9F, + 10757: 0x82DF, + 10758: 0x72D7, + 10759: 0x57A2, + 10760: 0x6784, + 10761: 0x8D2D, + 10762: 0x591F, + 10763: 0x8F9C, + 10764: 0x83C7, + 10765: 0x5495, + 10766: 0x7B8D, + 10767: 0x4F30, + 10768: 0x6CBD, + 10769: 0x5B64, + 10770: 0x59D1, + 10771: 0x9F13, + 10772: 0x53E4, + 10773: 0x86CA, + 10774: 0x9AA8, + 10775: 0x8C37, + 10776: 0x80A1, + 10777: 0x6545, + 10778: 0x987E, + 10779: 0x56FA, + 10780: 0x96C7, + 10781: 0x522E, + 10782: 0x74DC, + 10783: 0x5250, + 10784: 0x5BE1, + 10785: 0x6302, + 10786: 0x8902, + 10787: 0x4E56, + 10788: 0x62D0, + 10789: 0x602A, + 10790: 0x68FA, + 10791: 0x5173, + 10792: 0x5B98, + 10793: 0x51A0, + 10794: 0x89C2, + 10795: 0x7BA1, + 10796: 0x9986, + 10797: 0x7F50, + 10798: 0x60EF, + 10799: 0x704C, + 10800: 0x8D2F, + 10801: 0x5149, + 10802: 0x5E7F, + 10803: 0x901B, + 10804: 0x7470, + 10805: 0x89C4, + 10806: 0x572D, + 10807: 0x7845, + 10808: 0x5F52, + 10809: 0x9F9F, + 10810: 0x95FA, + 10811: 0x8F68, + 10812: 0x9B3C, + 10813: 0x8BE1, + 10814: 0x7678, + 10815: 0x6842, + 10816: 0x67DC, + 10817: 0x8DEA, + 10818: 0x8D35, + 10819: 0x523D, + 10820: 0x8F8A, + 10821: 0x6EDA, + 10822: 0x68CD, + 10823: 0x9505, + 10824: 0x90ED, + 10825: 0x56FD, + 10826: 0x679C, + 10827: 0x88F9, + 10828: 0x8FC7, + 10829: 0x54C8, + 10830: 0x7BC5, + 10831: 0x7BC8, + 10832: 0x7BC9, + 10833: 0x7BCA, + 10834: 0x7BCB, + 10835: 0x7BCD, + 10836: 0x7BCE, + 10837: 0x7BCF, + 10838: 0x7BD0, + 10839: 0x7BD2, + 10840: 0x7BD4, + 10841: 0x7BD5, + 10842: 0x7BD6, + 10843: 0x7BD7, + 10844: 0x7BD8, + 10845: 0x7BDB, + 10846: 0x7BDC, + 10847: 0x7BDE, + 10848: 0x7BDF, + 10849: 0x7BE0, + 10850: 0x7BE2, + 10851: 0x7BE3, + 10852: 0x7BE4, + 10853: 0x7BE7, + 10854: 0x7BE8, + 10855: 0x7BE9, + 10856: 0x7BEB, + 10857: 0x7BEC, + 10858: 0x7BED, + 10859: 0x7BEF, + 10860: 0x7BF0, + 10861: 0x7BF2, + 10862: 0x7BF3, + 10863: 0x7BF4, + 10864: 0x7BF5, + 10865: 0x7BF6, + 10866: 0x7BF8, + 10867: 0x7BF9, + 10868: 0x7BFA, + 10869: 0x7BFB, + 10870: 0x7BFD, + 10871: 0x7BFF, + 10872: 0x7C00, + 10873: 0x7C01, + 10874: 0x7C02, + 10875: 0x7C03, + 10876: 0x7C04, + 10877: 0x7C05, + 10878: 0x7C06, + 10879: 0x7C08, + 10880: 0x7C09, + 10881: 0x7C0A, + 10882: 0x7C0D, + 10883: 0x7C0E, + 10884: 0x7C10, + 10885: 0x7C11, + 10886: 0x7C12, + 10887: 0x7C13, + 10888: 0x7C14, + 10889: 0x7C15, + 10890: 0x7C17, + 10891: 0x7C18, + 10892: 0x7C19, + 10893: 0x7C1A, + 10894: 0x7C1B, + 10895: 0x7C1C, + 10896: 0x7C1D, + 10897: 0x7C1E, + 10898: 0x7C20, + 10899: 0x7C21, + 10900: 0x7C22, + 10901: 0x7C23, + 10902: 0x7C24, + 10903: 0x7C25, + 10904: 0x7C28, + 10905: 0x7C29, + 10906: 0x7C2B, + 10907: 0x7C2C, + 10908: 0x7C2D, + 10909: 0x7C2E, + 10910: 0x7C2F, + 10911: 0x7C30, + 10912: 0x7C31, + 10913: 0x7C32, + 10914: 0x7C33, + 10915: 0x7C34, + 10916: 0x7C35, + 10917: 0x7C36, + 10918: 0x7C37, + 10919: 0x7C39, + 10920: 0x7C3A, + 10921: 0x7C3B, + 10922: 0x7C3C, + 10923: 0x7C3D, + 10924: 0x7C3E, + 10925: 0x7C42, + 10926: 0x9AB8, + 10927: 0x5B69, + 10928: 0x6D77, + 10929: 0x6C26, + 10930: 0x4EA5, + 10931: 0x5BB3, + 10932: 0x9A87, + 10933: 0x9163, + 10934: 0x61A8, + 10935: 0x90AF, + 10936: 0x97E9, + 10937: 0x542B, + 10938: 0x6DB5, + 10939: 0x5BD2, + 10940: 0x51FD, + 10941: 0x558A, + 10942: 0x7F55, + 10943: 0x7FF0, + 10944: 0x64BC, + 10945: 0x634D, + 10946: 0x65F1, + 10947: 0x61BE, + 10948: 0x608D, + 10949: 0x710A, + 10950: 0x6C57, + 10951: 0x6C49, + 10952: 0x592F, + 10953: 0x676D, + 10954: 0x822A, + 10955: 0x58D5, + 10956: 0x568E, + 10957: 0x8C6A, + 10958: 0x6BEB, + 10959: 0x90DD, + 10960: 0x597D, + 10961: 0x8017, + 10962: 0x53F7, + 10963: 0x6D69, + 10964: 0x5475, + 10965: 0x559D, + 10966: 0x8377, + 10967: 0x83CF, + 10968: 0x6838, + 10969: 0x79BE, + 10970: 0x548C, + 10971: 0x4F55, + 10972: 0x5408, + 10973: 0x76D2, + 10974: 0x8C89, + 10975: 0x9602, + 10976: 0x6CB3, + 10977: 0x6DB8, + 10978: 0x8D6B, + 10979: 0x8910, + 10980: 0x9E64, + 10981: 0x8D3A, + 10982: 0x563F, + 10983: 0x9ED1, + 10984: 0x75D5, + 10985: 0x5F88, + 10986: 0x72E0, + 10987: 0x6068, + 10988: 0x54FC, + 10989: 0x4EA8, + 10990: 0x6A2A, + 10991: 0x8861, + 10992: 0x6052, + 10993: 0x8F70, + 10994: 0x54C4, + 10995: 0x70D8, + 10996: 0x8679, + 10997: 0x9E3F, + 10998: 0x6D2A, + 10999: 0x5B8F, + 11000: 0x5F18, + 11001: 0x7EA2, + 11002: 0x5589, + 11003: 0x4FAF, + 11004: 0x7334, + 11005: 0x543C, + 11006: 0x539A, + 11007: 0x5019, + 11008: 0x540E, + 11009: 0x547C, + 11010: 0x4E4E, + 11011: 0x5FFD, + 11012: 0x745A, + 11013: 0x58F6, + 11014: 0x846B, + 11015: 0x80E1, + 11016: 0x8774, + 11017: 0x72D0, + 11018: 0x7CCA, + 11019: 0x6E56, + 11020: 0x7C43, + 11021: 0x7C44, + 11022: 0x7C45, + 11023: 0x7C46, + 11024: 0x7C47, + 11025: 0x7C48, + 11026: 0x7C49, + 11027: 0x7C4A, + 11028: 0x7C4B, + 11029: 0x7C4C, + 11030: 0x7C4E, + 11031: 0x7C4F, + 11032: 0x7C50, + 11033: 0x7C51, + 11034: 0x7C52, + 11035: 0x7C53, + 11036: 0x7C54, + 11037: 0x7C55, + 11038: 0x7C56, + 11039: 0x7C57, + 11040: 0x7C58, + 11041: 0x7C59, + 11042: 0x7C5A, + 11043: 0x7C5B, + 11044: 0x7C5C, + 11045: 0x7C5D, + 11046: 0x7C5E, + 11047: 0x7C5F, + 11048: 0x7C60, + 11049: 0x7C61, + 11050: 0x7C62, + 11051: 0x7C63, + 11052: 0x7C64, + 11053: 0x7C65, + 11054: 0x7C66, + 11055: 0x7C67, + 11056: 0x7C68, + 11057: 0x7C69, + 11058: 0x7C6A, + 11059: 0x7C6B, + 11060: 0x7C6C, + 11061: 0x7C6D, + 11062: 0x7C6E, + 11063: 0x7C6F, + 11064: 0x7C70, + 11065: 0x7C71, + 11066: 0x7C72, + 11067: 0x7C75, + 11068: 0x7C76, + 11069: 0x7C77, + 11070: 0x7C78, + 11071: 0x7C79, + 11072: 0x7C7A, + 11073: 0x7C7E, + 11074: 0x7C7F, + 11075: 0x7C80, + 11076: 0x7C81, + 11077: 0x7C82, + 11078: 0x7C83, + 11079: 0x7C84, + 11080: 0x7C85, + 11081: 0x7C86, + 11082: 0x7C87, + 11083: 0x7C88, + 11084: 0x7C8A, + 11085: 0x7C8B, + 11086: 0x7C8C, + 11087: 0x7C8D, + 11088: 0x7C8E, + 11089: 0x7C8F, + 11090: 0x7C90, + 11091: 0x7C93, + 11092: 0x7C94, + 11093: 0x7C96, + 11094: 0x7C99, + 11095: 0x7C9A, + 11096: 0x7C9B, + 11097: 0x7CA0, + 11098: 0x7CA1, + 11099: 0x7CA3, + 11100: 0x7CA6, + 11101: 0x7CA7, + 11102: 0x7CA8, + 11103: 0x7CA9, + 11104: 0x7CAB, + 11105: 0x7CAC, + 11106: 0x7CAD, + 11107: 0x7CAF, + 11108: 0x7CB0, + 11109: 0x7CB4, + 11110: 0x7CB5, + 11111: 0x7CB6, + 11112: 0x7CB7, + 11113: 0x7CB8, + 11114: 0x7CBA, + 11115: 0x7CBB, + 11116: 0x5F27, + 11117: 0x864E, + 11118: 0x552C, + 11119: 0x62A4, + 11120: 0x4E92, + 11121: 0x6CAA, + 11122: 0x6237, + 11123: 0x82B1, + 11124: 0x54D7, + 11125: 0x534E, + 11126: 0x733E, + 11127: 0x6ED1, + 11128: 0x753B, + 11129: 0x5212, + 11130: 0x5316, + 11131: 0x8BDD, + 11132: 0x69D0, + 11133: 0x5F8A, + 11134: 0x6000, + 11135: 0x6DEE, + 11136: 0x574F, + 11137: 0x6B22, + 11138: 0x73AF, + 11139: 0x6853, + 11140: 0x8FD8, + 11141: 0x7F13, + 11142: 0x6362, + 11143: 0x60A3, + 11144: 0x5524, + 11145: 0x75EA, + 11146: 0x8C62, + 11147: 0x7115, + 11148: 0x6DA3, + 11149: 0x5BA6, + 11150: 0x5E7B, + 11151: 0x8352, + 11152: 0x614C, + 11153: 0x9EC4, + 11154: 0x78FA, + 11155: 0x8757, + 11156: 0x7C27, + 11157: 0x7687, + 11158: 0x51F0, + 11159: 0x60F6, + 11160: 0x714C, + 11161: 0x6643, + 11162: 0x5E4C, + 11163: 0x604D, + 11164: 0x8C0E, + 11165: 0x7070, + 11166: 0x6325, + 11167: 0x8F89, + 11168: 0x5FBD, + 11169: 0x6062, + 11170: 0x86D4, + 11171: 0x56DE, + 11172: 0x6BC1, + 11173: 0x6094, + 11174: 0x6167, + 11175: 0x5349, + 11176: 0x60E0, + 11177: 0x6666, + 11178: 0x8D3F, + 11179: 0x79FD, + 11180: 0x4F1A, + 11181: 0x70E9, + 11182: 0x6C47, + 11183: 0x8BB3, + 11184: 0x8BF2, + 11185: 0x7ED8, + 11186: 0x8364, + 11187: 0x660F, + 11188: 0x5A5A, + 11189: 0x9B42, + 11190: 0x6D51, + 11191: 0x6DF7, + 11192: 0x8C41, + 11193: 0x6D3B, + 11194: 0x4F19, + 11195: 0x706B, + 11196: 0x83B7, + 11197: 0x6216, + 11198: 0x60D1, + 11199: 0x970D, + 11200: 0x8D27, + 11201: 0x7978, + 11202: 0x51FB, + 11203: 0x573E, + 11204: 0x57FA, + 11205: 0x673A, + 11206: 0x7578, + 11207: 0x7A3D, + 11208: 0x79EF, + 11209: 0x7B95, + 11210: 0x7CBF, + 11211: 0x7CC0, + 11212: 0x7CC2, + 11213: 0x7CC3, + 11214: 0x7CC4, + 11215: 0x7CC6, + 11216: 0x7CC9, + 11217: 0x7CCB, + 11218: 0x7CCE, + 11219: 0x7CCF, + 11220: 0x7CD0, + 11221: 0x7CD1, + 11222: 0x7CD2, + 11223: 0x7CD3, + 11224: 0x7CD4, + 11225: 0x7CD8, + 11226: 0x7CDA, + 11227: 0x7CDB, + 11228: 0x7CDD, + 11229: 0x7CDE, + 11230: 0x7CE1, + 11231: 0x7CE2, + 11232: 0x7CE3, + 11233: 0x7CE4, + 11234: 0x7CE5, + 11235: 0x7CE6, + 11236: 0x7CE7, + 11237: 0x7CE9, + 11238: 0x7CEA, + 11239: 0x7CEB, + 11240: 0x7CEC, + 11241: 0x7CED, + 11242: 0x7CEE, + 11243: 0x7CF0, + 11244: 0x7CF1, + 11245: 0x7CF2, + 11246: 0x7CF3, + 11247: 0x7CF4, + 11248: 0x7CF5, + 11249: 0x7CF6, + 11250: 0x7CF7, + 11251: 0x7CF9, + 11252: 0x7CFA, + 11253: 0x7CFC, + 11254: 0x7CFD, + 11255: 0x7CFE, + 11256: 0x7CFF, + 11257: 0x7D00, + 11258: 0x7D01, + 11259: 0x7D02, + 11260: 0x7D03, + 11261: 0x7D04, + 11262: 0x7D05, + 11263: 0x7D06, + 11264: 0x7D07, + 11265: 0x7D08, + 11266: 0x7D09, + 11267: 0x7D0B, + 11268: 0x7D0C, + 11269: 0x7D0D, + 11270: 0x7D0E, + 11271: 0x7D0F, + 11272: 0x7D10, + 11273: 0x7D11, + 11274: 0x7D12, + 11275: 0x7D13, + 11276: 0x7D14, + 11277: 0x7D15, + 11278: 0x7D16, + 11279: 0x7D17, + 11280: 0x7D18, + 11281: 0x7D19, + 11282: 0x7D1A, + 11283: 0x7D1B, + 11284: 0x7D1C, + 11285: 0x7D1D, + 11286: 0x7D1E, + 11287: 0x7D1F, + 11288: 0x7D21, + 11289: 0x7D23, + 11290: 0x7D24, + 11291: 0x7D25, + 11292: 0x7D26, + 11293: 0x7D28, + 11294: 0x7D29, + 11295: 0x7D2A, + 11296: 0x7D2C, + 11297: 0x7D2D, + 11298: 0x7D2E, + 11299: 0x7D30, + 11300: 0x7D31, + 11301: 0x7D32, + 11302: 0x7D33, + 11303: 0x7D34, + 11304: 0x7D35, + 11305: 0x7D36, + 11306: 0x808C, + 11307: 0x9965, + 11308: 0x8FF9, + 11309: 0x6FC0, + 11310: 0x8BA5, + 11311: 0x9E21, + 11312: 0x59EC, + 11313: 0x7EE9, + 11314: 0x7F09, + 11315: 0x5409, + 11316: 0x6781, + 11317: 0x68D8, + 11318: 0x8F91, + 11319: 0x7C4D, + 11320: 0x96C6, + 11321: 0x53CA, + 11322: 0x6025, + 11323: 0x75BE, + 11324: 0x6C72, + 11325: 0x5373, + 11326: 0x5AC9, + 11327: 0x7EA7, + 11328: 0x6324, + 11329: 0x51E0, + 11330: 0x810A, + 11331: 0x5DF1, + 11332: 0x84DF, + 11333: 0x6280, + 11334: 0x5180, + 11335: 0x5B63, + 11336: 0x4F0E, + 11337: 0x796D, + 11338: 0x5242, + 11339: 0x60B8, + 11340: 0x6D4E, + 11341: 0x5BC4, + 11342: 0x5BC2, + 11343: 0x8BA1, + 11344: 0x8BB0, + 11345: 0x65E2, + 11346: 0x5FCC, + 11347: 0x9645, + 11348: 0x5993, + 11349: 0x7EE7, + 11350: 0x7EAA, + 11351: 0x5609, + 11352: 0x67B7, + 11353: 0x5939, + 11354: 0x4F73, + 11355: 0x5BB6, + 11356: 0x52A0, + 11357: 0x835A, + 11358: 0x988A, + 11359: 0x8D3E, + 11360: 0x7532, + 11361: 0x94BE, + 11362: 0x5047, + 11363: 0x7A3C, + 11364: 0x4EF7, + 11365: 0x67B6, + 11366: 0x9A7E, + 11367: 0x5AC1, + 11368: 0x6B7C, + 11369: 0x76D1, + 11370: 0x575A, + 11371: 0x5C16, + 11372: 0x7B3A, + 11373: 0x95F4, + 11374: 0x714E, + 11375: 0x517C, + 11376: 0x80A9, + 11377: 0x8270, + 11378: 0x5978, + 11379: 0x7F04, + 11380: 0x8327, + 11381: 0x68C0, + 11382: 0x67EC, + 11383: 0x78B1, + 11384: 0x7877, + 11385: 0x62E3, + 11386: 0x6361, + 11387: 0x7B80, + 11388: 0x4FED, + 11389: 0x526A, + 11390: 0x51CF, + 11391: 0x8350, + 11392: 0x69DB, + 11393: 0x9274, + 11394: 0x8DF5, + 11395: 0x8D31, + 11396: 0x89C1, + 11397: 0x952E, + 11398: 0x7BAD, + 11399: 0x4EF6, + 11400: 0x7D37, + 11401: 0x7D38, + 11402: 0x7D39, + 11403: 0x7D3A, + 11404: 0x7D3B, + 11405: 0x7D3C, + 11406: 0x7D3D, + 11407: 0x7D3E, + 11408: 0x7D3F, + 11409: 0x7D40, + 11410: 0x7D41, + 11411: 0x7D42, + 11412: 0x7D43, + 11413: 0x7D44, + 11414: 0x7D45, + 11415: 0x7D46, + 11416: 0x7D47, + 11417: 0x7D48, + 11418: 0x7D49, + 11419: 0x7D4A, + 11420: 0x7D4B, + 11421: 0x7D4C, + 11422: 0x7D4D, + 11423: 0x7D4E, + 11424: 0x7D4F, + 11425: 0x7D50, + 11426: 0x7D51, + 11427: 0x7D52, + 11428: 0x7D53, + 11429: 0x7D54, + 11430: 0x7D55, + 11431: 0x7D56, + 11432: 0x7D57, + 11433: 0x7D58, + 11434: 0x7D59, + 11435: 0x7D5A, + 11436: 0x7D5B, + 11437: 0x7D5C, + 11438: 0x7D5D, + 11439: 0x7D5E, + 11440: 0x7D5F, + 11441: 0x7D60, + 11442: 0x7D61, + 11443: 0x7D62, + 11444: 0x7D63, + 11445: 0x7D64, + 11446: 0x7D65, + 11447: 0x7D66, + 11448: 0x7D67, + 11449: 0x7D68, + 11450: 0x7D69, + 11451: 0x7D6A, + 11452: 0x7D6B, + 11453: 0x7D6C, + 11454: 0x7D6D, + 11455: 0x7D6F, + 11456: 0x7D70, + 11457: 0x7D71, + 11458: 0x7D72, + 11459: 0x7D73, + 11460: 0x7D74, + 11461: 0x7D75, + 11462: 0x7D76, + 11463: 0x7D78, + 11464: 0x7D79, + 11465: 0x7D7A, + 11466: 0x7D7B, + 11467: 0x7D7C, + 11468: 0x7D7D, + 11469: 0x7D7E, + 11470: 0x7D7F, + 11471: 0x7D80, + 11472: 0x7D81, + 11473: 0x7D82, + 11474: 0x7D83, + 11475: 0x7D84, + 11476: 0x7D85, + 11477: 0x7D86, + 11478: 0x7D87, + 11479: 0x7D88, + 11480: 0x7D89, + 11481: 0x7D8A, + 11482: 0x7D8B, + 11483: 0x7D8C, + 11484: 0x7D8D, + 11485: 0x7D8E, + 11486: 0x7D8F, + 11487: 0x7D90, + 11488: 0x7D91, + 11489: 0x7D92, + 11490: 0x7D93, + 11491: 0x7D94, + 11492: 0x7D95, + 11493: 0x7D96, + 11494: 0x7D97, + 11495: 0x7D98, + 11496: 0x5065, + 11497: 0x8230, + 11498: 0x5251, + 11499: 0x996F, + 11500: 0x6E10, + 11501: 0x6E85, + 11502: 0x6DA7, + 11503: 0x5EFA, + 11504: 0x50F5, + 11505: 0x59DC, + 11506: 0x5C06, + 11507: 0x6D46, + 11508: 0x6C5F, + 11509: 0x7586, + 11510: 0x848B, + 11511: 0x6868, + 11512: 0x5956, + 11513: 0x8BB2, + 11514: 0x5320, + 11515: 0x9171, + 11516: 0x964D, + 11517: 0x8549, + 11518: 0x6912, + 11519: 0x7901, + 11520: 0x7126, + 11521: 0x80F6, + 11522: 0x4EA4, + 11523: 0x90CA, + 11524: 0x6D47, + 11525: 0x9A84, + 11526: 0x5A07, + 11527: 0x56BC, + 11528: 0x6405, + 11529: 0x94F0, + 11530: 0x77EB, + 11531: 0x4FA5, + 11532: 0x811A, + 11533: 0x72E1, + 11534: 0x89D2, + 11535: 0x997A, + 11536: 0x7F34, + 11537: 0x7EDE, + 11538: 0x527F, + 11539: 0x6559, + 11540: 0x9175, + 11541: 0x8F7F, + 11542: 0x8F83, + 11543: 0x53EB, + 11544: 0x7A96, + 11545: 0x63ED, + 11546: 0x63A5, + 11547: 0x7686, + 11548: 0x79F8, + 11549: 0x8857, + 11550: 0x9636, + 11551: 0x622A, + 11552: 0x52AB, + 11553: 0x8282, + 11554: 0x6854, + 11555: 0x6770, + 11556: 0x6377, + 11557: 0x776B, + 11558: 0x7AED, + 11559: 0x6D01, + 11560: 0x7ED3, + 11561: 0x89E3, + 11562: 0x59D0, + 11563: 0x6212, + 11564: 0x85C9, + 11565: 0x82A5, + 11566: 0x754C, + 11567: 0x501F, + 11568: 0x4ECB, + 11569: 0x75A5, + 11570: 0x8BEB, + 11571: 0x5C4A, + 11572: 0x5DFE, + 11573: 0x7B4B, + 11574: 0x65A4, + 11575: 0x91D1, + 11576: 0x4ECA, + 11577: 0x6D25, + 11578: 0x895F, + 11579: 0x7D27, + 11580: 0x9526, + 11581: 0x4EC5, + 11582: 0x8C28, + 11583: 0x8FDB, + 11584: 0x9773, + 11585: 0x664B, + 11586: 0x7981, + 11587: 0x8FD1, + 11588: 0x70EC, + 11589: 0x6D78, + 11590: 0x7D99, + 11591: 0x7D9A, + 11592: 0x7D9B, + 11593: 0x7D9C, + 11594: 0x7D9D, + 11595: 0x7D9E, + 11596: 0x7D9F, + 11597: 0x7DA0, + 11598: 0x7DA1, + 11599: 0x7DA2, + 11600: 0x7DA3, + 11601: 0x7DA4, + 11602: 0x7DA5, + 11603: 0x7DA7, + 11604: 0x7DA8, + 11605: 0x7DA9, + 11606: 0x7DAA, + 11607: 0x7DAB, + 11608: 0x7DAC, + 11609: 0x7DAD, + 11610: 0x7DAF, + 11611: 0x7DB0, + 11612: 0x7DB1, + 11613: 0x7DB2, + 11614: 0x7DB3, + 11615: 0x7DB4, + 11616: 0x7DB5, + 11617: 0x7DB6, + 11618: 0x7DB7, + 11619: 0x7DB8, + 11620: 0x7DB9, + 11621: 0x7DBA, + 11622: 0x7DBB, + 11623: 0x7DBC, + 11624: 0x7DBD, + 11625: 0x7DBE, + 11626: 0x7DBF, + 11627: 0x7DC0, + 11628: 0x7DC1, + 11629: 0x7DC2, + 11630: 0x7DC3, + 11631: 0x7DC4, + 11632: 0x7DC5, + 11633: 0x7DC6, + 11634: 0x7DC7, + 11635: 0x7DC8, + 11636: 0x7DC9, + 11637: 0x7DCA, + 11638: 0x7DCB, + 11639: 0x7DCC, + 11640: 0x7DCD, + 11641: 0x7DCE, + 11642: 0x7DCF, + 11643: 0x7DD0, + 11644: 0x7DD1, + 11645: 0x7DD2, + 11646: 0x7DD3, + 11647: 0x7DD4, + 11648: 0x7DD5, + 11649: 0x7DD6, + 11650: 0x7DD7, + 11651: 0x7DD8, + 11652: 0x7DD9, + 11653: 0x7DDA, + 11654: 0x7DDB, + 11655: 0x7DDC, + 11656: 0x7DDD, + 11657: 0x7DDE, + 11658: 0x7DDF, + 11659: 0x7DE0, + 11660: 0x7DE1, + 11661: 0x7DE2, + 11662: 0x7DE3, + 11663: 0x7DE4, + 11664: 0x7DE5, + 11665: 0x7DE6, + 11666: 0x7DE7, + 11667: 0x7DE8, + 11668: 0x7DE9, + 11669: 0x7DEA, + 11670: 0x7DEB, + 11671: 0x7DEC, + 11672: 0x7DED, + 11673: 0x7DEE, + 11674: 0x7DEF, + 11675: 0x7DF0, + 11676: 0x7DF1, + 11677: 0x7DF2, + 11678: 0x7DF3, + 11679: 0x7DF4, + 11680: 0x7DF5, + 11681: 0x7DF6, + 11682: 0x7DF7, + 11683: 0x7DF8, + 11684: 0x7DF9, + 11685: 0x7DFA, + 11686: 0x5C3D, + 11687: 0x52B2, + 11688: 0x8346, + 11689: 0x5162, + 11690: 0x830E, + 11691: 0x775B, + 11692: 0x6676, + 11693: 0x9CB8, + 11694: 0x4EAC, + 11695: 0x60CA, + 11696: 0x7CBE, + 11697: 0x7CB3, + 11698: 0x7ECF, + 11699: 0x4E95, + 11700: 0x8B66, + 11701: 0x666F, + 11702: 0x9888, + 11703: 0x9759, + 11704: 0x5883, + 11705: 0x656C, + 11706: 0x955C, + 11707: 0x5F84, + 11708: 0x75C9, + 11709: 0x9756, + 11710: 0x7ADF, + 11711: 0x7ADE, + 11712: 0x51C0, + 11713: 0x70AF, + 11714: 0x7A98, + 11715: 0x63EA, + 11716: 0x7A76, + 11717: 0x7EA0, + 11718: 0x7396, + 11719: 0x97ED, + 11720: 0x4E45, + 11721: 0x7078, + 11722: 0x4E5D, + 11723: 0x9152, + 11724: 0x53A9, + 11725: 0x6551, + 11726: 0x65E7, + 11727: 0x81FC, + 11728: 0x8205, + 11729: 0x548E, + 11730: 0x5C31, + 11731: 0x759A, + 11732: 0x97A0, + 11733: 0x62D8, + 11734: 0x72D9, + 11735: 0x75BD, + 11736: 0x5C45, + 11737: 0x9A79, + 11738: 0x83CA, + 11739: 0x5C40, + 11740: 0x5480, + 11741: 0x77E9, + 11742: 0x4E3E, + 11743: 0x6CAE, + 11744: 0x805A, + 11745: 0x62D2, + 11746: 0x636E, + 11747: 0x5DE8, + 11748: 0x5177, + 11749: 0x8DDD, + 11750: 0x8E1E, + 11751: 0x952F, + 11752: 0x4FF1, + 11753: 0x53E5, + 11754: 0x60E7, + 11755: 0x70AC, + 11756: 0x5267, + 11757: 0x6350, + 11758: 0x9E43, + 11759: 0x5A1F, + 11760: 0x5026, + 11761: 0x7737, + 11762: 0x5377, + 11763: 0x7EE2, + 11764: 0x6485, + 11765: 0x652B, + 11766: 0x6289, + 11767: 0x6398, + 11768: 0x5014, + 11769: 0x7235, + 11770: 0x89C9, + 11771: 0x51B3, + 11772: 0x8BC0, + 11773: 0x7EDD, + 11774: 0x5747, + 11775: 0x83CC, + 11776: 0x94A7, + 11777: 0x519B, + 11778: 0x541B, + 11779: 0x5CFB, + 11780: 0x7DFB, + 11781: 0x7DFC, + 11782: 0x7DFD, + 11783: 0x7DFE, + 11784: 0x7DFF, + 11785: 0x7E00, + 11786: 0x7E01, + 11787: 0x7E02, + 11788: 0x7E03, + 11789: 0x7E04, + 11790: 0x7E05, + 11791: 0x7E06, + 11792: 0x7E07, + 11793: 0x7E08, + 11794: 0x7E09, + 11795: 0x7E0A, + 11796: 0x7E0B, + 11797: 0x7E0C, + 11798: 0x7E0D, + 11799: 0x7E0E, + 11800: 0x7E0F, + 11801: 0x7E10, + 11802: 0x7E11, + 11803: 0x7E12, + 11804: 0x7E13, + 11805: 0x7E14, + 11806: 0x7E15, + 11807: 0x7E16, + 11808: 0x7E17, + 11809: 0x7E18, + 11810: 0x7E19, + 11811: 0x7E1A, + 11812: 0x7E1B, + 11813: 0x7E1C, + 11814: 0x7E1D, + 11815: 0x7E1E, + 11816: 0x7E1F, + 11817: 0x7E20, + 11818: 0x7E21, + 11819: 0x7E22, + 11820: 0x7E23, + 11821: 0x7E24, + 11822: 0x7E25, + 11823: 0x7E26, + 11824: 0x7E27, + 11825: 0x7E28, + 11826: 0x7E29, + 11827: 0x7E2A, + 11828: 0x7E2B, + 11829: 0x7E2C, + 11830: 0x7E2D, + 11831: 0x7E2E, + 11832: 0x7E2F, + 11833: 0x7E30, + 11834: 0x7E31, + 11835: 0x7E32, + 11836: 0x7E33, + 11837: 0x7E34, + 11838: 0x7E35, + 11839: 0x7E36, + 11840: 0x7E37, + 11841: 0x7E38, + 11842: 0x7E39, + 11843: 0x7E3A, + 11844: 0x7E3C, + 11845: 0x7E3D, + 11846: 0x7E3E, + 11847: 0x7E3F, + 11848: 0x7E40, + 11849: 0x7E42, + 11850: 0x7E43, + 11851: 0x7E44, + 11852: 0x7E45, + 11853: 0x7E46, + 11854: 0x7E48, + 11855: 0x7E49, + 11856: 0x7E4A, + 11857: 0x7E4B, + 11858: 0x7E4C, + 11859: 0x7E4D, + 11860: 0x7E4E, + 11861: 0x7E4F, + 11862: 0x7E50, + 11863: 0x7E51, + 11864: 0x7E52, + 11865: 0x7E53, + 11866: 0x7E54, + 11867: 0x7E55, + 11868: 0x7E56, + 11869: 0x7E57, + 11870: 0x7E58, + 11871: 0x7E59, + 11872: 0x7E5A, + 11873: 0x7E5B, + 11874: 0x7E5C, + 11875: 0x7E5D, + 11876: 0x4FCA, + 11877: 0x7AE3, + 11878: 0x6D5A, + 11879: 0x90E1, + 11880: 0x9A8F, + 11881: 0x5580, + 11882: 0x5496, + 11883: 0x5361, + 11884: 0x54AF, + 11885: 0x5F00, + 11886: 0x63E9, + 11887: 0x6977, + 11888: 0x51EF, + 11889: 0x6168, + 11890: 0x520A, + 11891: 0x582A, + 11892: 0x52D8, + 11893: 0x574E, + 11894: 0x780D, + 11895: 0x770B, + 11896: 0x5EB7, + 11897: 0x6177, + 11898: 0x7CE0, + 11899: 0x625B, + 11900: 0x6297, + 11901: 0x4EA2, + 11902: 0x7095, + 11903: 0x8003, + 11904: 0x62F7, + 11905: 0x70E4, + 11906: 0x9760, + 11907: 0x5777, + 11908: 0x82DB, + 11909: 0x67EF, + 11910: 0x68F5, + 11911: 0x78D5, + 11912: 0x9897, + 11913: 0x79D1, + 11914: 0x58F3, + 11915: 0x54B3, + 11916: 0x53EF, + 11917: 0x6E34, + 11918: 0x514B, + 11919: 0x523B, + 11920: 0x5BA2, + 11921: 0x8BFE, + 11922: 0x80AF, + 11923: 0x5543, + 11924: 0x57A6, + 11925: 0x6073, + 11926: 0x5751, + 11927: 0x542D, + 11928: 0x7A7A, + 11929: 0x6050, + 11930: 0x5B54, + 11931: 0x63A7, + 11932: 0x62A0, + 11933: 0x53E3, + 11934: 0x6263, + 11935: 0x5BC7, + 11936: 0x67AF, + 11937: 0x54ED, + 11938: 0x7A9F, + 11939: 0x82E6, + 11940: 0x9177, + 11941: 0x5E93, + 11942: 0x88E4, + 11943: 0x5938, + 11944: 0x57AE, + 11945: 0x630E, + 11946: 0x8DE8, + 11947: 0x80EF, + 11948: 0x5757, + 11949: 0x7B77, + 11950: 0x4FA9, + 11951: 0x5FEB, + 11952: 0x5BBD, + 11953: 0x6B3E, + 11954: 0x5321, + 11955: 0x7B50, + 11956: 0x72C2, + 11957: 0x6846, + 11958: 0x77FF, + 11959: 0x7736, + 11960: 0x65F7, + 11961: 0x51B5, + 11962: 0x4E8F, + 11963: 0x76D4, + 11964: 0x5CBF, + 11965: 0x7AA5, + 11966: 0x8475, + 11967: 0x594E, + 11968: 0x9B41, + 11969: 0x5080, + 11970: 0x7E5E, + 11971: 0x7E5F, + 11972: 0x7E60, + 11973: 0x7E61, + 11974: 0x7E62, + 11975: 0x7E63, + 11976: 0x7E64, + 11977: 0x7E65, + 11978: 0x7E66, + 11979: 0x7E67, + 11980: 0x7E68, + 11981: 0x7E69, + 11982: 0x7E6A, + 11983: 0x7E6B, + 11984: 0x7E6C, + 11985: 0x7E6D, + 11986: 0x7E6E, + 11987: 0x7E6F, + 11988: 0x7E70, + 11989: 0x7E71, + 11990: 0x7E72, + 11991: 0x7E73, + 11992: 0x7E74, + 11993: 0x7E75, + 11994: 0x7E76, + 11995: 0x7E77, + 11996: 0x7E78, + 11997: 0x7E79, + 11998: 0x7E7A, + 11999: 0x7E7B, + 12000: 0x7E7C, + 12001: 0x7E7D, + 12002: 0x7E7E, + 12003: 0x7E7F, + 12004: 0x7E80, + 12005: 0x7E81, + 12006: 0x7E83, + 12007: 0x7E84, + 12008: 0x7E85, + 12009: 0x7E86, + 12010: 0x7E87, + 12011: 0x7E88, + 12012: 0x7E89, + 12013: 0x7E8A, + 12014: 0x7E8B, + 12015: 0x7E8C, + 12016: 0x7E8D, + 12017: 0x7E8E, + 12018: 0x7E8F, + 12019: 0x7E90, + 12020: 0x7E91, + 12021: 0x7E92, + 12022: 0x7E93, + 12023: 0x7E94, + 12024: 0x7E95, + 12025: 0x7E96, + 12026: 0x7E97, + 12027: 0x7E98, + 12028: 0x7E99, + 12029: 0x7E9A, + 12030: 0x7E9C, + 12031: 0x7E9D, + 12032: 0x7E9E, + 12033: 0x7EAE, + 12034: 0x7EB4, + 12035: 0x7EBB, + 12036: 0x7EBC, + 12037: 0x7ED6, + 12038: 0x7EE4, + 12039: 0x7EEC, + 12040: 0x7EF9, + 12041: 0x7F0A, + 12042: 0x7F10, + 12043: 0x7F1E, + 12044: 0x7F37, + 12045: 0x7F39, + 12046: 0x7F3B, + 12047: 0x7F3C, + 12048: 0x7F3D, + 12049: 0x7F3E, + 12050: 0x7F3F, + 12051: 0x7F40, + 12052: 0x7F41, + 12053: 0x7F43, + 12054: 0x7F46, + 12055: 0x7F47, + 12056: 0x7F48, + 12057: 0x7F49, + 12058: 0x7F4A, + 12059: 0x7F4B, + 12060: 0x7F4C, + 12061: 0x7F4D, + 12062: 0x7F4E, + 12063: 0x7F4F, + 12064: 0x7F52, + 12065: 0x7F53, + 12066: 0x9988, + 12067: 0x6127, + 12068: 0x6E83, + 12069: 0x5764, + 12070: 0x6606, + 12071: 0x6346, + 12072: 0x56F0, + 12073: 0x62EC, + 12074: 0x6269, + 12075: 0x5ED3, + 12076: 0x9614, + 12077: 0x5783, + 12078: 0x62C9, + 12079: 0x5587, + 12080: 0x8721, + 12081: 0x814A, + 12082: 0x8FA3, + 12083: 0x5566, + 12084: 0x83B1, + 12085: 0x6765, + 12086: 0x8D56, + 12087: 0x84DD, + 12088: 0x5A6A, + 12089: 0x680F, + 12090: 0x62E6, + 12091: 0x7BEE, + 12092: 0x9611, + 12093: 0x5170, + 12094: 0x6F9C, + 12095: 0x8C30, + 12096: 0x63FD, + 12097: 0x89C8, + 12098: 0x61D2, + 12099: 0x7F06, + 12100: 0x70C2, + 12101: 0x6EE5, + 12102: 0x7405, + 12103: 0x6994, + 12104: 0x72FC, + 12105: 0x5ECA, + 12106: 0x90CE, + 12107: 0x6717, + 12108: 0x6D6A, + 12109: 0x635E, + 12110: 0x52B3, + 12111: 0x7262, + 12112: 0x8001, + 12113: 0x4F6C, + 12114: 0x59E5, + 12115: 0x916A, + 12116: 0x70D9, + 12117: 0x6D9D, + 12118: 0x52D2, + 12119: 0x4E50, + 12120: 0x96F7, + 12121: 0x956D, + 12122: 0x857E, + 12123: 0x78CA, + 12124: 0x7D2F, + 12125: 0x5121, + 12126: 0x5792, + 12127: 0x64C2, + 12128: 0x808B, + 12129: 0x7C7B, + 12130: 0x6CEA, + 12131: 0x68F1, + 12132: 0x695E, + 12133: 0x51B7, + 12134: 0x5398, + 12135: 0x68A8, + 12136: 0x7281, + 12137: 0x9ECE, + 12138: 0x7BF1, + 12139: 0x72F8, + 12140: 0x79BB, + 12141: 0x6F13, + 12142: 0x7406, + 12143: 0x674E, + 12144: 0x91CC, + 12145: 0x9CA4, + 12146: 0x793C, + 12147: 0x8389, + 12148: 0x8354, + 12149: 0x540F, + 12150: 0x6817, + 12151: 0x4E3D, + 12152: 0x5389, + 12153: 0x52B1, + 12154: 0x783E, + 12155: 0x5386, + 12156: 0x5229, + 12157: 0x5088, + 12158: 0x4F8B, + 12159: 0x4FD0, + 12160: 0x7F56, + 12161: 0x7F59, + 12162: 0x7F5B, + 12163: 0x7F5C, + 12164: 0x7F5D, + 12165: 0x7F5E, + 12166: 0x7F60, + 12167: 0x7F63, + 12168: 0x7F64, + 12169: 0x7F65, + 12170: 0x7F66, + 12171: 0x7F67, + 12172: 0x7F6B, + 12173: 0x7F6C, + 12174: 0x7F6D, + 12175: 0x7F6F, + 12176: 0x7F70, + 12177: 0x7F73, + 12178: 0x7F75, + 12179: 0x7F76, + 12180: 0x7F77, + 12181: 0x7F78, + 12182: 0x7F7A, + 12183: 0x7F7B, + 12184: 0x7F7C, + 12185: 0x7F7D, + 12186: 0x7F7F, + 12187: 0x7F80, + 12188: 0x7F82, + 12189: 0x7F83, + 12190: 0x7F84, + 12191: 0x7F85, + 12192: 0x7F86, + 12193: 0x7F87, + 12194: 0x7F88, + 12195: 0x7F89, + 12196: 0x7F8B, + 12197: 0x7F8D, + 12198: 0x7F8F, + 12199: 0x7F90, + 12200: 0x7F91, + 12201: 0x7F92, + 12202: 0x7F93, + 12203: 0x7F95, + 12204: 0x7F96, + 12205: 0x7F97, + 12206: 0x7F98, + 12207: 0x7F99, + 12208: 0x7F9B, + 12209: 0x7F9C, + 12210: 0x7FA0, + 12211: 0x7FA2, + 12212: 0x7FA3, + 12213: 0x7FA5, + 12214: 0x7FA6, + 12215: 0x7FA8, + 12216: 0x7FA9, + 12217: 0x7FAA, + 12218: 0x7FAB, + 12219: 0x7FAC, + 12220: 0x7FAD, + 12221: 0x7FAE, + 12222: 0x7FB1, + 12223: 0x7FB3, + 12224: 0x7FB4, + 12225: 0x7FB5, + 12226: 0x7FB6, + 12227: 0x7FB7, + 12228: 0x7FBA, + 12229: 0x7FBB, + 12230: 0x7FBE, + 12231: 0x7FC0, + 12232: 0x7FC2, + 12233: 0x7FC3, + 12234: 0x7FC4, + 12235: 0x7FC6, + 12236: 0x7FC7, + 12237: 0x7FC8, + 12238: 0x7FC9, + 12239: 0x7FCB, + 12240: 0x7FCD, + 12241: 0x7FCF, + 12242: 0x7FD0, + 12243: 0x7FD1, + 12244: 0x7FD2, + 12245: 0x7FD3, + 12246: 0x7FD6, + 12247: 0x7FD7, + 12248: 0x7FD9, + 12249: 0x7FDA, + 12250: 0x7FDB, + 12251: 0x7FDC, + 12252: 0x7FDD, + 12253: 0x7FDE, + 12254: 0x7FE2, + 12255: 0x7FE3, + 12256: 0x75E2, + 12257: 0x7ACB, + 12258: 0x7C92, + 12259: 0x6CA5, + 12260: 0x96B6, + 12261: 0x529B, + 12262: 0x7483, + 12263: 0x54E9, + 12264: 0x4FE9, + 12265: 0x8054, + 12266: 0x83B2, + 12267: 0x8FDE, + 12268: 0x9570, + 12269: 0x5EC9, + 12270: 0x601C, + 12271: 0x6D9F, + 12272: 0x5E18, + 12273: 0x655B, + 12274: 0x8138, + 12275: 0x94FE, + 12276: 0x604B, + 12277: 0x70BC, + 12278: 0x7EC3, + 12279: 0x7CAE, + 12280: 0x51C9, + 12281: 0x6881, + 12282: 0x7CB1, + 12283: 0x826F, + 12284: 0x4E24, + 12285: 0x8F86, + 12286: 0x91CF, + 12287: 0x667E, + 12288: 0x4EAE, + 12289: 0x8C05, + 12290: 0x64A9, + 12291: 0x804A, + 12292: 0x50DA, + 12293: 0x7597, + 12294: 0x71CE, + 12295: 0x5BE5, + 12296: 0x8FBD, + 12297: 0x6F66, + 12298: 0x4E86, + 12299: 0x6482, + 12300: 0x9563, + 12301: 0x5ED6, + 12302: 0x6599, + 12303: 0x5217, + 12304: 0x88C2, + 12305: 0x70C8, + 12306: 0x52A3, + 12307: 0x730E, + 12308: 0x7433, + 12309: 0x6797, + 12310: 0x78F7, + 12311: 0x9716, + 12312: 0x4E34, + 12313: 0x90BB, + 12314: 0x9CDE, + 12315: 0x6DCB, + 12316: 0x51DB, + 12317: 0x8D41, + 12318: 0x541D, + 12319: 0x62CE, + 12320: 0x73B2, + 12321: 0x83F1, + 12322: 0x96F6, + 12323: 0x9F84, + 12324: 0x94C3, + 12325: 0x4F36, + 12326: 0x7F9A, + 12327: 0x51CC, + 12328: 0x7075, + 12329: 0x9675, + 12330: 0x5CAD, + 12331: 0x9886, + 12332: 0x53E6, + 12333: 0x4EE4, + 12334: 0x6E9C, + 12335: 0x7409, + 12336: 0x69B4, + 12337: 0x786B, + 12338: 0x998F, + 12339: 0x7559, + 12340: 0x5218, + 12341: 0x7624, + 12342: 0x6D41, + 12343: 0x67F3, + 12344: 0x516D, + 12345: 0x9F99, + 12346: 0x804B, + 12347: 0x5499, + 12348: 0x7B3C, + 12349: 0x7ABF, + 12350: 0x7FE4, + 12351: 0x7FE7, + 12352: 0x7FE8, + 12353: 0x7FEA, + 12354: 0x7FEB, + 12355: 0x7FEC, + 12356: 0x7FED, + 12357: 0x7FEF, + 12358: 0x7FF2, + 12359: 0x7FF4, + 12360: 0x7FF5, + 12361: 0x7FF6, + 12362: 0x7FF7, + 12363: 0x7FF8, + 12364: 0x7FF9, + 12365: 0x7FFA, + 12366: 0x7FFD, + 12367: 0x7FFE, + 12368: 0x7FFF, + 12369: 0x8002, + 12370: 0x8007, + 12371: 0x8008, + 12372: 0x8009, + 12373: 0x800A, + 12374: 0x800E, + 12375: 0x800F, + 12376: 0x8011, + 12377: 0x8013, + 12378: 0x801A, + 12379: 0x801B, + 12380: 0x801D, + 12381: 0x801E, + 12382: 0x801F, + 12383: 0x8021, + 12384: 0x8023, + 12385: 0x8024, + 12386: 0x802B, + 12387: 0x802C, + 12388: 0x802D, + 12389: 0x802E, + 12390: 0x802F, + 12391: 0x8030, + 12392: 0x8032, + 12393: 0x8034, + 12394: 0x8039, + 12395: 0x803A, + 12396: 0x803C, + 12397: 0x803E, + 12398: 0x8040, + 12399: 0x8041, + 12400: 0x8044, + 12401: 0x8045, + 12402: 0x8047, + 12403: 0x8048, + 12404: 0x8049, + 12405: 0x804E, + 12406: 0x804F, + 12407: 0x8050, + 12408: 0x8051, + 12409: 0x8053, + 12410: 0x8055, + 12411: 0x8056, + 12412: 0x8057, + 12413: 0x8059, + 12414: 0x805B, + 12415: 0x805C, + 12416: 0x805D, + 12417: 0x805E, + 12418: 0x805F, + 12419: 0x8060, + 12420: 0x8061, + 12421: 0x8062, + 12422: 0x8063, + 12423: 0x8064, + 12424: 0x8065, + 12425: 0x8066, + 12426: 0x8067, + 12427: 0x8068, + 12428: 0x806B, + 12429: 0x806C, + 12430: 0x806D, + 12431: 0x806E, + 12432: 0x806F, + 12433: 0x8070, + 12434: 0x8072, + 12435: 0x8073, + 12436: 0x8074, + 12437: 0x8075, + 12438: 0x8076, + 12439: 0x8077, + 12440: 0x8078, + 12441: 0x8079, + 12442: 0x807A, + 12443: 0x807B, + 12444: 0x807C, + 12445: 0x807D, + 12446: 0x9686, + 12447: 0x5784, + 12448: 0x62E2, + 12449: 0x9647, + 12450: 0x697C, + 12451: 0x5A04, + 12452: 0x6402, + 12453: 0x7BD3, + 12454: 0x6F0F, + 12455: 0x964B, + 12456: 0x82A6, + 12457: 0x5362, + 12458: 0x9885, + 12459: 0x5E90, + 12460: 0x7089, + 12461: 0x63B3, + 12462: 0x5364, + 12463: 0x864F, + 12464: 0x9C81, + 12465: 0x9E93, + 12466: 0x788C, + 12467: 0x9732, + 12468: 0x8DEF, + 12469: 0x8D42, + 12470: 0x9E7F, + 12471: 0x6F5E, + 12472: 0x7984, + 12473: 0x5F55, + 12474: 0x9646, + 12475: 0x622E, + 12476: 0x9A74, + 12477: 0x5415, + 12478: 0x94DD, + 12479: 0x4FA3, + 12480: 0x65C5, + 12481: 0x5C65, + 12482: 0x5C61, + 12483: 0x7F15, + 12484: 0x8651, + 12485: 0x6C2F, + 12486: 0x5F8B, + 12487: 0x7387, + 12488: 0x6EE4, + 12489: 0x7EFF, + 12490: 0x5CE6, + 12491: 0x631B, + 12492: 0x5B6A, + 12493: 0x6EE6, + 12494: 0x5375, + 12495: 0x4E71, + 12496: 0x63A0, + 12497: 0x7565, + 12498: 0x62A1, + 12499: 0x8F6E, + 12500: 0x4F26, + 12501: 0x4ED1, + 12502: 0x6CA6, + 12503: 0x7EB6, + 12504: 0x8BBA, + 12505: 0x841D, + 12506: 0x87BA, + 12507: 0x7F57, + 12508: 0x903B, + 12509: 0x9523, + 12510: 0x7BA9, + 12511: 0x9AA1, + 12512: 0x88F8, + 12513: 0x843D, + 12514: 0x6D1B, + 12515: 0x9A86, + 12516: 0x7EDC, + 12517: 0x5988, + 12518: 0x9EBB, + 12519: 0x739B, + 12520: 0x7801, + 12521: 0x8682, + 12522: 0x9A6C, + 12523: 0x9A82, + 12524: 0x561B, + 12525: 0x5417, + 12526: 0x57CB, + 12527: 0x4E70, + 12528: 0x9EA6, + 12529: 0x5356, + 12530: 0x8FC8, + 12531: 0x8109, + 12532: 0x7792, + 12533: 0x9992, + 12534: 0x86EE, + 12535: 0x6EE1, + 12536: 0x8513, + 12537: 0x66FC, + 12538: 0x6162, + 12539: 0x6F2B, + 12540: 0x807E, + 12541: 0x8081, + 12542: 0x8082, + 12543: 0x8085, + 12544: 0x8088, + 12545: 0x808A, + 12546: 0x808D, + 12547: 0x808E, + 12548: 0x808F, + 12549: 0x8090, + 12550: 0x8091, + 12551: 0x8092, + 12552: 0x8094, + 12553: 0x8095, + 12554: 0x8097, + 12555: 0x8099, + 12556: 0x809E, + 12557: 0x80A3, + 12558: 0x80A6, + 12559: 0x80A7, + 12560: 0x80A8, + 12561: 0x80AC, + 12562: 0x80B0, + 12563: 0x80B3, + 12564: 0x80B5, + 12565: 0x80B6, + 12566: 0x80B8, + 12567: 0x80B9, + 12568: 0x80BB, + 12569: 0x80C5, + 12570: 0x80C7, + 12571: 0x80C8, + 12572: 0x80C9, + 12573: 0x80CA, + 12574: 0x80CB, + 12575: 0x80CF, + 12576: 0x80D0, + 12577: 0x80D1, + 12578: 0x80D2, + 12579: 0x80D3, + 12580: 0x80D4, + 12581: 0x80D5, + 12582: 0x80D8, + 12583: 0x80DF, + 12584: 0x80E0, + 12585: 0x80E2, + 12586: 0x80E3, + 12587: 0x80E6, + 12588: 0x80EE, + 12589: 0x80F5, + 12590: 0x80F7, + 12591: 0x80F9, + 12592: 0x80FB, + 12593: 0x80FE, + 12594: 0x80FF, + 12595: 0x8100, + 12596: 0x8101, + 12597: 0x8103, + 12598: 0x8104, + 12599: 0x8105, + 12600: 0x8107, + 12601: 0x8108, + 12602: 0x810B, + 12603: 0x810C, + 12604: 0x8115, + 12605: 0x8117, + 12606: 0x8119, + 12607: 0x811B, + 12608: 0x811C, + 12609: 0x811D, + 12610: 0x811F, + 12611: 0x8120, + 12612: 0x8121, + 12613: 0x8122, + 12614: 0x8123, + 12615: 0x8124, + 12616: 0x8125, + 12617: 0x8126, + 12618: 0x8127, + 12619: 0x8128, + 12620: 0x8129, + 12621: 0x812A, + 12622: 0x812B, + 12623: 0x812D, + 12624: 0x812E, + 12625: 0x8130, + 12626: 0x8133, + 12627: 0x8134, + 12628: 0x8135, + 12629: 0x8137, + 12630: 0x8139, + 12631: 0x813A, + 12632: 0x813B, + 12633: 0x813C, + 12634: 0x813D, + 12635: 0x813F, + 12636: 0x8C29, + 12637: 0x8292, + 12638: 0x832B, + 12639: 0x76F2, + 12640: 0x6C13, + 12641: 0x5FD9, + 12642: 0x83BD, + 12643: 0x732B, + 12644: 0x8305, + 12645: 0x951A, + 12646: 0x6BDB, + 12647: 0x77DB, + 12648: 0x94C6, + 12649: 0x536F, + 12650: 0x8302, + 12651: 0x5192, + 12652: 0x5E3D, + 12653: 0x8C8C, + 12654: 0x8D38, + 12655: 0x4E48, + 12656: 0x73AB, + 12657: 0x679A, + 12658: 0x6885, + 12659: 0x9176, + 12660: 0x9709, + 12661: 0x7164, + 12662: 0x6CA1, + 12663: 0x7709, + 12664: 0x5A92, + 12665: 0x9541, + 12666: 0x6BCF, + 12667: 0x7F8E, + 12668: 0x6627, + 12669: 0x5BD0, + 12670: 0x59B9, + 12671: 0x5A9A, + 12672: 0x95E8, + 12673: 0x95F7, + 12674: 0x4EEC, + 12675: 0x840C, + 12676: 0x8499, + 12677: 0x6AAC, + 12678: 0x76DF, + 12679: 0x9530, + 12680: 0x731B, + 12681: 0x68A6, + 12682: 0x5B5F, + 12683: 0x772F, + 12684: 0x919A, + 12685: 0x9761, + 12686: 0x7CDC, + 12687: 0x8FF7, + 12688: 0x8C1C, + 12689: 0x5F25, + 12690: 0x7C73, + 12691: 0x79D8, + 12692: 0x89C5, + 12693: 0x6CCC, + 12694: 0x871C, + 12695: 0x5BC6, + 12696: 0x5E42, + 12697: 0x68C9, + 12698: 0x7720, + 12699: 0x7EF5, + 12700: 0x5195, + 12701: 0x514D, + 12702: 0x52C9, + 12703: 0x5A29, + 12704: 0x7F05, + 12705: 0x9762, + 12706: 0x82D7, + 12707: 0x63CF, + 12708: 0x7784, + 12709: 0x85D0, + 12710: 0x79D2, + 12711: 0x6E3A, + 12712: 0x5E99, + 12713: 0x5999, + 12714: 0x8511, + 12715: 0x706D, + 12716: 0x6C11, + 12717: 0x62BF, + 12718: 0x76BF, + 12719: 0x654F, + 12720: 0x60AF, + 12721: 0x95FD, + 12722: 0x660E, + 12723: 0x879F, + 12724: 0x9E23, + 12725: 0x94ED, + 12726: 0x540D, + 12727: 0x547D, + 12728: 0x8C2C, + 12729: 0x6478, + 12730: 0x8140, + 12731: 0x8141, + 12732: 0x8142, + 12733: 0x8143, + 12734: 0x8144, + 12735: 0x8145, + 12736: 0x8147, + 12737: 0x8149, + 12738: 0x814D, + 12739: 0x814E, + 12740: 0x814F, + 12741: 0x8152, + 12742: 0x8156, + 12743: 0x8157, + 12744: 0x8158, + 12745: 0x815B, + 12746: 0x815C, + 12747: 0x815D, + 12748: 0x815E, + 12749: 0x815F, + 12750: 0x8161, + 12751: 0x8162, + 12752: 0x8163, + 12753: 0x8164, + 12754: 0x8166, + 12755: 0x8168, + 12756: 0x816A, + 12757: 0x816B, + 12758: 0x816C, + 12759: 0x816F, + 12760: 0x8172, + 12761: 0x8173, + 12762: 0x8175, + 12763: 0x8176, + 12764: 0x8177, + 12765: 0x8178, + 12766: 0x8181, + 12767: 0x8183, + 12768: 0x8184, + 12769: 0x8185, + 12770: 0x8186, + 12771: 0x8187, + 12772: 0x8189, + 12773: 0x818B, + 12774: 0x818C, + 12775: 0x818D, + 12776: 0x818E, + 12777: 0x8190, + 12778: 0x8192, + 12779: 0x8193, + 12780: 0x8194, + 12781: 0x8195, + 12782: 0x8196, + 12783: 0x8197, + 12784: 0x8199, + 12785: 0x819A, + 12786: 0x819E, + 12787: 0x819F, + 12788: 0x81A0, + 12789: 0x81A1, + 12790: 0x81A2, + 12791: 0x81A4, + 12792: 0x81A5, + 12793: 0x81A7, + 12794: 0x81A9, + 12795: 0x81AB, + 12796: 0x81AC, + 12797: 0x81AD, + 12798: 0x81AE, + 12799: 0x81AF, + 12800: 0x81B0, + 12801: 0x81B1, + 12802: 0x81B2, + 12803: 0x81B4, + 12804: 0x81B5, + 12805: 0x81B6, + 12806: 0x81B7, + 12807: 0x81B8, + 12808: 0x81B9, + 12809: 0x81BC, + 12810: 0x81BD, + 12811: 0x81BE, + 12812: 0x81BF, + 12813: 0x81C4, + 12814: 0x81C5, + 12815: 0x81C7, + 12816: 0x81C8, + 12817: 0x81C9, + 12818: 0x81CB, + 12819: 0x81CD, + 12820: 0x81CE, + 12821: 0x81CF, + 12822: 0x81D0, + 12823: 0x81D1, + 12824: 0x81D2, + 12825: 0x81D3, + 12826: 0x6479, + 12827: 0x8611, + 12828: 0x6A21, + 12829: 0x819C, + 12830: 0x78E8, + 12831: 0x6469, + 12832: 0x9B54, + 12833: 0x62B9, + 12834: 0x672B, + 12835: 0x83AB, + 12836: 0x58A8, + 12837: 0x9ED8, + 12838: 0x6CAB, + 12839: 0x6F20, + 12840: 0x5BDE, + 12841: 0x964C, + 12842: 0x8C0B, + 12843: 0x725F, + 12844: 0x67D0, + 12845: 0x62C7, + 12846: 0x7261, + 12847: 0x4EA9, + 12848: 0x59C6, + 12849: 0x6BCD, + 12850: 0x5893, + 12851: 0x66AE, + 12852: 0x5E55, + 12853: 0x52DF, + 12854: 0x6155, + 12855: 0x6728, + 12856: 0x76EE, + 12857: 0x7766, + 12858: 0x7267, + 12859: 0x7A46, + 12860: 0x62FF, + 12861: 0x54EA, + 12862: 0x5450, + 12863: 0x94A0, + 12864: 0x90A3, + 12865: 0x5A1C, + 12866: 0x7EB3, + 12867: 0x6C16, + 12868: 0x4E43, + 12869: 0x5976, + 12870: 0x8010, + 12871: 0x5948, + 12872: 0x5357, + 12873: 0x7537, + 12874: 0x96BE, + 12875: 0x56CA, + 12876: 0x6320, + 12877: 0x8111, + 12878: 0x607C, + 12879: 0x95F9, + 12880: 0x6DD6, + 12881: 0x5462, + 12882: 0x9981, + 12883: 0x5185, + 12884: 0x5AE9, + 12885: 0x80FD, + 12886: 0x59AE, + 12887: 0x9713, + 12888: 0x502A, + 12889: 0x6CE5, + 12890: 0x5C3C, + 12891: 0x62DF, + 12892: 0x4F60, + 12893: 0x533F, + 12894: 0x817B, + 12895: 0x9006, + 12896: 0x6EBA, + 12897: 0x852B, + 12898: 0x62C8, + 12899: 0x5E74, + 12900: 0x78BE, + 12901: 0x64B5, + 12902: 0x637B, + 12903: 0x5FF5, + 12904: 0x5A18, + 12905: 0x917F, + 12906: 0x9E1F, + 12907: 0x5C3F, + 12908: 0x634F, + 12909: 0x8042, + 12910: 0x5B7D, + 12911: 0x556E, + 12912: 0x954A, + 12913: 0x954D, + 12914: 0x6D85, + 12915: 0x60A8, + 12916: 0x67E0, + 12917: 0x72DE, + 12918: 0x51DD, + 12919: 0x5B81, + 12920: 0x81D4, + 12921: 0x81D5, + 12922: 0x81D6, + 12923: 0x81D7, + 12924: 0x81D8, + 12925: 0x81D9, + 12926: 0x81DA, + 12927: 0x81DB, + 12928: 0x81DC, + 12929: 0x81DD, + 12930: 0x81DE, + 12931: 0x81DF, + 12932: 0x81E0, + 12933: 0x81E1, + 12934: 0x81E2, + 12935: 0x81E4, + 12936: 0x81E5, + 12937: 0x81E6, + 12938: 0x81E8, + 12939: 0x81E9, + 12940: 0x81EB, + 12941: 0x81EE, + 12942: 0x81EF, + 12943: 0x81F0, + 12944: 0x81F1, + 12945: 0x81F2, + 12946: 0x81F5, + 12947: 0x81F6, + 12948: 0x81F7, + 12949: 0x81F8, + 12950: 0x81F9, + 12951: 0x81FA, + 12952: 0x81FD, + 12953: 0x81FF, + 12954: 0x8203, + 12955: 0x8207, + 12956: 0x8208, + 12957: 0x8209, + 12958: 0x820A, + 12959: 0x820B, + 12960: 0x820E, + 12961: 0x820F, + 12962: 0x8211, + 12963: 0x8213, + 12964: 0x8215, + 12965: 0x8216, + 12966: 0x8217, + 12967: 0x8218, + 12968: 0x8219, + 12969: 0x821A, + 12970: 0x821D, + 12971: 0x8220, + 12972: 0x8224, + 12973: 0x8225, + 12974: 0x8226, + 12975: 0x8227, + 12976: 0x8229, + 12977: 0x822E, + 12978: 0x8232, + 12979: 0x823A, + 12980: 0x823C, + 12981: 0x823D, + 12982: 0x823F, + 12983: 0x8240, + 12984: 0x8241, + 12985: 0x8242, + 12986: 0x8243, + 12987: 0x8245, + 12988: 0x8246, + 12989: 0x8248, + 12990: 0x824A, + 12991: 0x824C, + 12992: 0x824D, + 12993: 0x824E, + 12994: 0x8250, + 12995: 0x8251, + 12996: 0x8252, + 12997: 0x8253, + 12998: 0x8254, + 12999: 0x8255, + 13000: 0x8256, + 13001: 0x8257, + 13002: 0x8259, + 13003: 0x825B, + 13004: 0x825C, + 13005: 0x825D, + 13006: 0x825E, + 13007: 0x8260, + 13008: 0x8261, + 13009: 0x8262, + 13010: 0x8263, + 13011: 0x8264, + 13012: 0x8265, + 13013: 0x8266, + 13014: 0x8267, + 13015: 0x8269, + 13016: 0x62E7, + 13017: 0x6CDE, + 13018: 0x725B, + 13019: 0x626D, + 13020: 0x94AE, + 13021: 0x7EBD, + 13022: 0x8113, + 13023: 0x6D53, + 13024: 0x519C, + 13025: 0x5F04, + 13026: 0x5974, + 13027: 0x52AA, + 13028: 0x6012, + 13029: 0x5973, + 13030: 0x6696, + 13031: 0x8650, + 13032: 0x759F, + 13033: 0x632A, + 13034: 0x61E6, + 13035: 0x7CEF, + 13036: 0x8BFA, + 13037: 0x54E6, + 13038: 0x6B27, + 13039: 0x9E25, + 13040: 0x6BB4, + 13041: 0x85D5, + 13042: 0x5455, + 13043: 0x5076, + 13044: 0x6CA4, + 13045: 0x556A, + 13046: 0x8DB4, + 13047: 0x722C, + 13048: 0x5E15, + 13049: 0x6015, + 13050: 0x7436, + 13051: 0x62CD, + 13052: 0x6392, + 13053: 0x724C, + 13054: 0x5F98, + 13055: 0x6E43, + 13056: 0x6D3E, + 13057: 0x6500, + 13058: 0x6F58, + 13059: 0x76D8, + 13060: 0x78D0, + 13061: 0x76FC, + 13062: 0x7554, + 13063: 0x5224, + 13064: 0x53DB, + 13065: 0x4E53, + 13066: 0x5E9E, + 13067: 0x65C1, + 13068: 0x802A, + 13069: 0x80D6, + 13070: 0x629B, + 13071: 0x5486, + 13072: 0x5228, + 13073: 0x70AE, + 13074: 0x888D, + 13075: 0x8DD1, + 13076: 0x6CE1, + 13077: 0x5478, + 13078: 0x80DA, + 13079: 0x57F9, + 13080: 0x88F4, + 13081: 0x8D54, + 13082: 0x966A, + 13083: 0x914D, + 13084: 0x4F69, + 13085: 0x6C9B, + 13086: 0x55B7, + 13087: 0x76C6, + 13088: 0x7830, + 13089: 0x62A8, + 13090: 0x70F9, + 13091: 0x6F8E, + 13092: 0x5F6D, + 13093: 0x84EC, + 13094: 0x68DA, + 13095: 0x787C, + 13096: 0x7BF7, + 13097: 0x81A8, + 13098: 0x670B, + 13099: 0x9E4F, + 13100: 0x6367, + 13101: 0x78B0, + 13102: 0x576F, + 13103: 0x7812, + 13104: 0x9739, + 13105: 0x6279, + 13106: 0x62AB, + 13107: 0x5288, + 13108: 0x7435, + 13109: 0x6BD7, + 13110: 0x826A, + 13111: 0x826B, + 13112: 0x826C, + 13113: 0x826D, + 13114: 0x8271, + 13115: 0x8275, + 13116: 0x8276, + 13117: 0x8277, + 13118: 0x8278, + 13119: 0x827B, + 13120: 0x827C, + 13121: 0x8280, + 13122: 0x8281, + 13123: 0x8283, + 13124: 0x8285, + 13125: 0x8286, + 13126: 0x8287, + 13127: 0x8289, + 13128: 0x828C, + 13129: 0x8290, + 13130: 0x8293, + 13131: 0x8294, + 13132: 0x8295, + 13133: 0x8296, + 13134: 0x829A, + 13135: 0x829B, + 13136: 0x829E, + 13137: 0x82A0, + 13138: 0x82A2, + 13139: 0x82A3, + 13140: 0x82A7, + 13141: 0x82B2, + 13142: 0x82B5, + 13143: 0x82B6, + 13144: 0x82BA, + 13145: 0x82BB, + 13146: 0x82BC, + 13147: 0x82BF, + 13148: 0x82C0, + 13149: 0x82C2, + 13150: 0x82C3, + 13151: 0x82C5, + 13152: 0x82C6, + 13153: 0x82C9, + 13154: 0x82D0, + 13155: 0x82D6, + 13156: 0x82D9, + 13157: 0x82DA, + 13158: 0x82DD, + 13159: 0x82E2, + 13160: 0x82E7, + 13161: 0x82E8, + 13162: 0x82E9, + 13163: 0x82EA, + 13164: 0x82EC, + 13165: 0x82ED, + 13166: 0x82EE, + 13167: 0x82F0, + 13168: 0x82F2, + 13169: 0x82F3, + 13170: 0x82F5, + 13171: 0x82F6, + 13172: 0x82F8, + 13173: 0x82FA, + 13174: 0x82FC, + 13175: 0x82FD, + 13176: 0x82FE, + 13177: 0x82FF, + 13178: 0x8300, + 13179: 0x830A, + 13180: 0x830B, + 13181: 0x830D, + 13182: 0x8310, + 13183: 0x8312, + 13184: 0x8313, + 13185: 0x8316, + 13186: 0x8318, + 13187: 0x8319, + 13188: 0x831D, + 13189: 0x831E, + 13190: 0x831F, + 13191: 0x8320, + 13192: 0x8321, + 13193: 0x8322, + 13194: 0x8323, + 13195: 0x8324, + 13196: 0x8325, + 13197: 0x8326, + 13198: 0x8329, + 13199: 0x832A, + 13200: 0x832E, + 13201: 0x8330, + 13202: 0x8332, + 13203: 0x8337, + 13204: 0x833B, + 13205: 0x833D, + 13206: 0x5564, + 13207: 0x813E, + 13208: 0x75B2, + 13209: 0x76AE, + 13210: 0x5339, + 13211: 0x75DE, + 13212: 0x50FB, + 13213: 0x5C41, + 13214: 0x8B6C, + 13215: 0x7BC7, + 13216: 0x504F, + 13217: 0x7247, + 13218: 0x9A97, + 13219: 0x98D8, + 13220: 0x6F02, + 13221: 0x74E2, + 13222: 0x7968, + 13223: 0x6487, + 13224: 0x77A5, + 13225: 0x62FC, + 13226: 0x9891, + 13227: 0x8D2B, + 13228: 0x54C1, + 13229: 0x8058, + 13230: 0x4E52, + 13231: 0x576A, + 13232: 0x82F9, + 13233: 0x840D, + 13234: 0x5E73, + 13235: 0x51ED, + 13236: 0x74F6, + 13237: 0x8BC4, + 13238: 0x5C4F, + 13239: 0x5761, + 13240: 0x6CFC, + 13241: 0x9887, + 13242: 0x5A46, + 13243: 0x7834, + 13244: 0x9B44, + 13245: 0x8FEB, + 13246: 0x7C95, + 13247: 0x5256, + 13248: 0x6251, + 13249: 0x94FA, + 13250: 0x4EC6, + 13251: 0x8386, + 13252: 0x8461, + 13253: 0x83E9, + 13254: 0x84B2, + 13255: 0x57D4, + 13256: 0x6734, + 13257: 0x5703, + 13258: 0x666E, + 13259: 0x6D66, + 13260: 0x8C31, + 13261: 0x66DD, + 13262: 0x7011, + 13263: 0x671F, + 13264: 0x6B3A, + 13265: 0x6816, + 13266: 0x621A, + 13267: 0x59BB, + 13268: 0x4E03, + 13269: 0x51C4, + 13270: 0x6F06, + 13271: 0x67D2, + 13272: 0x6C8F, + 13273: 0x5176, + 13274: 0x68CB, + 13275: 0x5947, + 13276: 0x6B67, + 13277: 0x7566, + 13278: 0x5D0E, + 13279: 0x8110, + 13280: 0x9F50, + 13281: 0x65D7, + 13282: 0x7948, + 13283: 0x7941, + 13284: 0x9A91, + 13285: 0x8D77, + 13286: 0x5C82, + 13287: 0x4E5E, + 13288: 0x4F01, + 13289: 0x542F, + 13290: 0x5951, + 13291: 0x780C, + 13292: 0x5668, + 13293: 0x6C14, + 13294: 0x8FC4, + 13295: 0x5F03, + 13296: 0x6C7D, + 13297: 0x6CE3, + 13298: 0x8BAB, + 13299: 0x6390, + 13300: 0x833E, + 13301: 0x833F, + 13302: 0x8341, + 13303: 0x8342, + 13304: 0x8344, + 13305: 0x8345, + 13306: 0x8348, + 13307: 0x834A, + 13308: 0x834B, + 13309: 0x834C, + 13310: 0x834D, + 13311: 0x834E, + 13312: 0x8353, + 13313: 0x8355, + 13314: 0x8356, + 13315: 0x8357, + 13316: 0x8358, + 13317: 0x8359, + 13318: 0x835D, + 13319: 0x8362, + 13320: 0x8370, + 13321: 0x8371, + 13322: 0x8372, + 13323: 0x8373, + 13324: 0x8374, + 13325: 0x8375, + 13326: 0x8376, + 13327: 0x8379, + 13328: 0x837A, + 13329: 0x837E, + 13330: 0x837F, + 13331: 0x8380, + 13332: 0x8381, + 13333: 0x8382, + 13334: 0x8383, + 13335: 0x8384, + 13336: 0x8387, + 13337: 0x8388, + 13338: 0x838A, + 13339: 0x838B, + 13340: 0x838C, + 13341: 0x838D, + 13342: 0x838F, + 13343: 0x8390, + 13344: 0x8391, + 13345: 0x8394, + 13346: 0x8395, + 13347: 0x8396, + 13348: 0x8397, + 13349: 0x8399, + 13350: 0x839A, + 13351: 0x839D, + 13352: 0x839F, + 13353: 0x83A1, + 13354: 0x83A2, + 13355: 0x83A3, + 13356: 0x83A4, + 13357: 0x83A5, + 13358: 0x83A6, + 13359: 0x83A7, + 13360: 0x83AC, + 13361: 0x83AD, + 13362: 0x83AE, + 13363: 0x83AF, + 13364: 0x83B5, + 13365: 0x83BB, + 13366: 0x83BE, + 13367: 0x83BF, + 13368: 0x83C2, + 13369: 0x83C3, + 13370: 0x83C4, + 13371: 0x83C6, + 13372: 0x83C8, + 13373: 0x83C9, + 13374: 0x83CB, + 13375: 0x83CD, + 13376: 0x83CE, + 13377: 0x83D0, + 13378: 0x83D1, + 13379: 0x83D2, + 13380: 0x83D3, + 13381: 0x83D5, + 13382: 0x83D7, + 13383: 0x83D9, + 13384: 0x83DA, + 13385: 0x83DB, + 13386: 0x83DE, + 13387: 0x83E2, + 13388: 0x83E3, + 13389: 0x83E4, + 13390: 0x83E6, + 13391: 0x83E7, + 13392: 0x83E8, + 13393: 0x83EB, + 13394: 0x83EC, + 13395: 0x83ED, + 13396: 0x6070, + 13397: 0x6D3D, + 13398: 0x7275, + 13399: 0x6266, + 13400: 0x948E, + 13401: 0x94C5, + 13402: 0x5343, + 13403: 0x8FC1, + 13404: 0x7B7E, + 13405: 0x4EDF, + 13406: 0x8C26, + 13407: 0x4E7E, + 13408: 0x9ED4, + 13409: 0x94B1, + 13410: 0x94B3, + 13411: 0x524D, + 13412: 0x6F5C, + 13413: 0x9063, + 13414: 0x6D45, + 13415: 0x8C34, + 13416: 0x5811, + 13417: 0x5D4C, + 13418: 0x6B20, + 13419: 0x6B49, + 13420: 0x67AA, + 13421: 0x545B, + 13422: 0x8154, + 13423: 0x7F8C, + 13424: 0x5899, + 13425: 0x8537, + 13426: 0x5F3A, + 13427: 0x62A2, + 13428: 0x6A47, + 13429: 0x9539, + 13430: 0x6572, + 13431: 0x6084, + 13432: 0x6865, + 13433: 0x77A7, + 13434: 0x4E54, + 13435: 0x4FA8, + 13436: 0x5DE7, + 13437: 0x9798, + 13438: 0x64AC, + 13439: 0x7FD8, + 13440: 0x5CED, + 13441: 0x4FCF, + 13442: 0x7A8D, + 13443: 0x5207, + 13444: 0x8304, + 13445: 0x4E14, + 13446: 0x602F, + 13447: 0x7A83, + 13448: 0x94A6, + 13449: 0x4FB5, + 13450: 0x4EB2, + 13451: 0x79E6, + 13452: 0x7434, + 13453: 0x52E4, + 13454: 0x82B9, + 13455: 0x64D2, + 13456: 0x79BD, + 13457: 0x5BDD, + 13458: 0x6C81, + 13459: 0x9752, + 13460: 0x8F7B, + 13461: 0x6C22, + 13462: 0x503E, + 13463: 0x537F, + 13464: 0x6E05, + 13465: 0x64CE, + 13466: 0x6674, + 13467: 0x6C30, + 13468: 0x60C5, + 13469: 0x9877, + 13470: 0x8BF7, + 13471: 0x5E86, + 13472: 0x743C, + 13473: 0x7A77, + 13474: 0x79CB, + 13475: 0x4E18, + 13476: 0x90B1, + 13477: 0x7403, + 13478: 0x6C42, + 13479: 0x56DA, + 13480: 0x914B, + 13481: 0x6CC5, + 13482: 0x8D8B, + 13483: 0x533A, + 13484: 0x86C6, + 13485: 0x66F2, + 13486: 0x8EAF, + 13487: 0x5C48, + 13488: 0x9A71, + 13489: 0x6E20, + 13490: 0x83EE, + 13491: 0x83EF, + 13492: 0x83F3, + 13493: 0x83F4, + 13494: 0x83F5, + 13495: 0x83F6, + 13496: 0x83F7, + 13497: 0x83FA, + 13498: 0x83FB, + 13499: 0x83FC, + 13500: 0x83FE, + 13501: 0x83FF, + 13502: 0x8400, + 13503: 0x8402, + 13504: 0x8405, + 13505: 0x8407, + 13506: 0x8408, + 13507: 0x8409, + 13508: 0x840A, + 13509: 0x8410, + 13510: 0x8412, + 13511: 0x8413, + 13512: 0x8414, + 13513: 0x8415, + 13514: 0x8416, + 13515: 0x8417, + 13516: 0x8419, + 13517: 0x841A, + 13518: 0x841B, + 13519: 0x841E, + 13520: 0x841F, + 13521: 0x8420, + 13522: 0x8421, + 13523: 0x8422, + 13524: 0x8423, + 13525: 0x8429, + 13526: 0x842A, + 13527: 0x842B, + 13528: 0x842C, + 13529: 0x842D, + 13530: 0x842E, + 13531: 0x842F, + 13532: 0x8430, + 13533: 0x8432, + 13534: 0x8433, + 13535: 0x8434, + 13536: 0x8435, + 13537: 0x8436, + 13538: 0x8437, + 13539: 0x8439, + 13540: 0x843A, + 13541: 0x843B, + 13542: 0x843E, + 13543: 0x843F, + 13544: 0x8440, + 13545: 0x8441, + 13546: 0x8442, + 13547: 0x8443, + 13548: 0x8444, + 13549: 0x8445, + 13550: 0x8447, + 13551: 0x8448, + 13552: 0x8449, + 13553: 0x844A, + 13554: 0x844B, + 13555: 0x844C, + 13556: 0x844D, + 13557: 0x844E, + 13558: 0x844F, + 13559: 0x8450, + 13560: 0x8452, + 13561: 0x8453, + 13562: 0x8454, + 13563: 0x8455, + 13564: 0x8456, + 13565: 0x8458, + 13566: 0x845D, + 13567: 0x845E, + 13568: 0x845F, + 13569: 0x8460, + 13570: 0x8462, + 13571: 0x8464, + 13572: 0x8465, + 13573: 0x8466, + 13574: 0x8467, + 13575: 0x8468, + 13576: 0x846A, + 13577: 0x846E, + 13578: 0x846F, + 13579: 0x8470, + 13580: 0x8472, + 13581: 0x8474, + 13582: 0x8477, + 13583: 0x8479, + 13584: 0x847B, + 13585: 0x847C, + 13586: 0x53D6, + 13587: 0x5A36, + 13588: 0x9F8B, + 13589: 0x8DA3, + 13590: 0x53BB, + 13591: 0x5708, + 13592: 0x98A7, + 13593: 0x6743, + 13594: 0x919B, + 13595: 0x6CC9, + 13596: 0x5168, + 13597: 0x75CA, + 13598: 0x62F3, + 13599: 0x72AC, + 13600: 0x5238, + 13601: 0x529D, + 13602: 0x7F3A, + 13603: 0x7094, + 13604: 0x7638, + 13605: 0x5374, + 13606: 0x9E4A, + 13607: 0x69B7, + 13608: 0x786E, + 13609: 0x96C0, + 13610: 0x88D9, + 13611: 0x7FA4, + 13612: 0x7136, + 13613: 0x71C3, + 13614: 0x5189, + 13615: 0x67D3, + 13616: 0x74E4, + 13617: 0x58E4, + 13618: 0x6518, + 13619: 0x56B7, + 13620: 0x8BA9, + 13621: 0x9976, + 13622: 0x6270, + 13623: 0x7ED5, + 13624: 0x60F9, + 13625: 0x70ED, + 13626: 0x58EC, + 13627: 0x4EC1, + 13628: 0x4EBA, + 13629: 0x5FCD, + 13630: 0x97E7, + 13631: 0x4EFB, + 13632: 0x8BA4, + 13633: 0x5203, + 13634: 0x598A, + 13635: 0x7EAB, + 13636: 0x6254, + 13637: 0x4ECD, + 13638: 0x65E5, + 13639: 0x620E, + 13640: 0x8338, + 13641: 0x84C9, + 13642: 0x8363, + 13643: 0x878D, + 13644: 0x7194, + 13645: 0x6EB6, + 13646: 0x5BB9, + 13647: 0x7ED2, + 13648: 0x5197, + 13649: 0x63C9, + 13650: 0x67D4, + 13651: 0x8089, + 13652: 0x8339, + 13653: 0x8815, + 13654: 0x5112, + 13655: 0x5B7A, + 13656: 0x5982, + 13657: 0x8FB1, + 13658: 0x4E73, + 13659: 0x6C5D, + 13660: 0x5165, + 13661: 0x8925, + 13662: 0x8F6F, + 13663: 0x962E, + 13664: 0x854A, + 13665: 0x745E, + 13666: 0x9510, + 13667: 0x95F0, + 13668: 0x6DA6, + 13669: 0x82E5, + 13670: 0x5F31, + 13671: 0x6492, + 13672: 0x6D12, + 13673: 0x8428, + 13674: 0x816E, + 13675: 0x9CC3, + 13676: 0x585E, + 13677: 0x8D5B, + 13678: 0x4E09, + 13679: 0x53C1, + 13680: 0x847D, + 13681: 0x847E, + 13682: 0x847F, + 13683: 0x8480, + 13684: 0x8481, + 13685: 0x8483, + 13686: 0x8484, + 13687: 0x8485, + 13688: 0x8486, + 13689: 0x848A, + 13690: 0x848D, + 13691: 0x848F, + 13692: 0x8490, + 13693: 0x8491, + 13694: 0x8492, + 13695: 0x8493, + 13696: 0x8494, + 13697: 0x8495, + 13698: 0x8496, + 13699: 0x8498, + 13700: 0x849A, + 13701: 0x849B, + 13702: 0x849D, + 13703: 0x849E, + 13704: 0x849F, + 13705: 0x84A0, + 13706: 0x84A2, + 13707: 0x84A3, + 13708: 0x84A4, + 13709: 0x84A5, + 13710: 0x84A6, + 13711: 0x84A7, + 13712: 0x84A8, + 13713: 0x84A9, + 13714: 0x84AA, + 13715: 0x84AB, + 13716: 0x84AC, + 13717: 0x84AD, + 13718: 0x84AE, + 13719: 0x84B0, + 13720: 0x84B1, + 13721: 0x84B3, + 13722: 0x84B5, + 13723: 0x84B6, + 13724: 0x84B7, + 13725: 0x84BB, + 13726: 0x84BC, + 13727: 0x84BE, + 13728: 0x84C0, + 13729: 0x84C2, + 13730: 0x84C3, + 13731: 0x84C5, + 13732: 0x84C6, + 13733: 0x84C7, + 13734: 0x84C8, + 13735: 0x84CB, + 13736: 0x84CC, + 13737: 0x84CE, + 13738: 0x84CF, + 13739: 0x84D2, + 13740: 0x84D4, + 13741: 0x84D5, + 13742: 0x84D7, + 13743: 0x84D8, + 13744: 0x84D9, + 13745: 0x84DA, + 13746: 0x84DB, + 13747: 0x84DC, + 13748: 0x84DE, + 13749: 0x84E1, + 13750: 0x84E2, + 13751: 0x84E4, + 13752: 0x84E7, + 13753: 0x84E8, + 13754: 0x84E9, + 13755: 0x84EA, + 13756: 0x84EB, + 13757: 0x84ED, + 13758: 0x84EE, + 13759: 0x84EF, + 13760: 0x84F1, + 13761: 0x84F2, + 13762: 0x84F3, + 13763: 0x84F4, + 13764: 0x84F5, + 13765: 0x84F6, + 13766: 0x84F7, + 13767: 0x84F8, + 13768: 0x84F9, + 13769: 0x84FA, + 13770: 0x84FB, + 13771: 0x84FD, + 13772: 0x84FE, + 13773: 0x8500, + 13774: 0x8501, + 13775: 0x8502, + 13776: 0x4F1E, + 13777: 0x6563, + 13778: 0x6851, + 13779: 0x55D3, + 13780: 0x4E27, + 13781: 0x6414, + 13782: 0x9A9A, + 13783: 0x626B, + 13784: 0x5AC2, + 13785: 0x745F, + 13786: 0x8272, + 13787: 0x6DA9, + 13788: 0x68EE, + 13789: 0x50E7, + 13790: 0x838E, + 13791: 0x7802, + 13792: 0x6740, + 13793: 0x5239, + 13794: 0x6C99, + 13795: 0x7EB1, + 13796: 0x50BB, + 13797: 0x5565, + 13798: 0x715E, + 13799: 0x7B5B, + 13800: 0x6652, + 13801: 0x73CA, + 13802: 0x82EB, + 13803: 0x6749, + 13804: 0x5C71, + 13805: 0x5220, + 13806: 0x717D, + 13807: 0x886B, + 13808: 0x95EA, + 13809: 0x9655, + 13810: 0x64C5, + 13811: 0x8D61, + 13812: 0x81B3, + 13813: 0x5584, + 13814: 0x6C55, + 13815: 0x6247, + 13816: 0x7F2E, + 13817: 0x5892, + 13818: 0x4F24, + 13819: 0x5546, + 13820: 0x8D4F, + 13821: 0x664C, + 13822: 0x4E0A, + 13823: 0x5C1A, + 13824: 0x88F3, + 13825: 0x68A2, + 13826: 0x634E, + 13827: 0x7A0D, + 13828: 0x70E7, + 13829: 0x828D, + 13830: 0x52FA, + 13831: 0x97F6, + 13832: 0x5C11, + 13833: 0x54E8, + 13834: 0x90B5, + 13835: 0x7ECD, + 13836: 0x5962, + 13837: 0x8D4A, + 13838: 0x86C7, + 13839: 0x820C, + 13840: 0x820D, + 13841: 0x8D66, + 13842: 0x6444, + 13843: 0x5C04, + 13844: 0x6151, + 13845: 0x6D89, + 13846: 0x793E, + 13847: 0x8BBE, + 13848: 0x7837, + 13849: 0x7533, + 13850: 0x547B, + 13851: 0x4F38, + 13852: 0x8EAB, + 13853: 0x6DF1, + 13854: 0x5A20, + 13855: 0x7EC5, + 13856: 0x795E, + 13857: 0x6C88, + 13858: 0x5BA1, + 13859: 0x5A76, + 13860: 0x751A, + 13861: 0x80BE, + 13862: 0x614E, + 13863: 0x6E17, + 13864: 0x58F0, + 13865: 0x751F, + 13866: 0x7525, + 13867: 0x7272, + 13868: 0x5347, + 13869: 0x7EF3, + 13870: 0x8503, + 13871: 0x8504, + 13872: 0x8505, + 13873: 0x8506, + 13874: 0x8507, + 13875: 0x8508, + 13876: 0x8509, + 13877: 0x850A, + 13878: 0x850B, + 13879: 0x850D, + 13880: 0x850E, + 13881: 0x850F, + 13882: 0x8510, + 13883: 0x8512, + 13884: 0x8514, + 13885: 0x8515, + 13886: 0x8516, + 13887: 0x8518, + 13888: 0x8519, + 13889: 0x851B, + 13890: 0x851C, + 13891: 0x851D, + 13892: 0x851E, + 13893: 0x8520, + 13894: 0x8522, + 13895: 0x8523, + 13896: 0x8524, + 13897: 0x8525, + 13898: 0x8526, + 13899: 0x8527, + 13900: 0x8528, + 13901: 0x8529, + 13902: 0x852A, + 13903: 0x852D, + 13904: 0x852E, + 13905: 0x852F, + 13906: 0x8530, + 13907: 0x8531, + 13908: 0x8532, + 13909: 0x8533, + 13910: 0x8534, + 13911: 0x8535, + 13912: 0x8536, + 13913: 0x853E, + 13914: 0x853F, + 13915: 0x8540, + 13916: 0x8541, + 13917: 0x8542, + 13918: 0x8544, + 13919: 0x8545, + 13920: 0x8546, + 13921: 0x8547, + 13922: 0x854B, + 13923: 0x854C, + 13924: 0x854D, + 13925: 0x854E, + 13926: 0x854F, + 13927: 0x8550, + 13928: 0x8551, + 13929: 0x8552, + 13930: 0x8553, + 13931: 0x8554, + 13932: 0x8555, + 13933: 0x8557, + 13934: 0x8558, + 13935: 0x855A, + 13936: 0x855B, + 13937: 0x855C, + 13938: 0x855D, + 13939: 0x855F, + 13940: 0x8560, + 13941: 0x8561, + 13942: 0x8562, + 13943: 0x8563, + 13944: 0x8565, + 13945: 0x8566, + 13946: 0x8567, + 13947: 0x8569, + 13948: 0x856A, + 13949: 0x856B, + 13950: 0x856C, + 13951: 0x856D, + 13952: 0x856E, + 13953: 0x856F, + 13954: 0x8570, + 13955: 0x8571, + 13956: 0x8573, + 13957: 0x8575, + 13958: 0x8576, + 13959: 0x8577, + 13960: 0x8578, + 13961: 0x857C, + 13962: 0x857D, + 13963: 0x857F, + 13964: 0x8580, + 13965: 0x8581, + 13966: 0x7701, + 13967: 0x76DB, + 13968: 0x5269, + 13969: 0x80DC, + 13970: 0x5723, + 13971: 0x5E08, + 13972: 0x5931, + 13973: 0x72EE, + 13974: 0x65BD, + 13975: 0x6E7F, + 13976: 0x8BD7, + 13977: 0x5C38, + 13978: 0x8671, + 13979: 0x5341, + 13980: 0x77F3, + 13981: 0x62FE, + 13982: 0x65F6, + 13983: 0x4EC0, + 13984: 0x98DF, + 13985: 0x8680, + 13986: 0x5B9E, + 13987: 0x8BC6, + 13988: 0x53F2, + 13989: 0x77E2, + 13990: 0x4F7F, + 13991: 0x5C4E, + 13992: 0x9A76, + 13993: 0x59CB, + 13994: 0x5F0F, + 13995: 0x793A, + 13996: 0x58EB, + 13997: 0x4E16, + 13998: 0x67FF, + 13999: 0x4E8B, + 14000: 0x62ED, + 14001: 0x8A93, + 14002: 0x901D, + 14003: 0x52BF, + 14004: 0x662F, + 14005: 0x55DC, + 14006: 0x566C, + 14007: 0x9002, + 14008: 0x4ED5, + 14009: 0x4F8D, + 14010: 0x91CA, + 14011: 0x9970, + 14012: 0x6C0F, + 14013: 0x5E02, + 14014: 0x6043, + 14015: 0x5BA4, + 14016: 0x89C6, + 14017: 0x8BD5, + 14018: 0x6536, + 14019: 0x624B, + 14020: 0x9996, + 14021: 0x5B88, + 14022: 0x5BFF, + 14023: 0x6388, + 14024: 0x552E, + 14025: 0x53D7, + 14026: 0x7626, + 14027: 0x517D, + 14028: 0x852C, + 14029: 0x67A2, + 14030: 0x68B3, + 14031: 0x6B8A, + 14032: 0x6292, + 14033: 0x8F93, + 14034: 0x53D4, + 14035: 0x8212, + 14036: 0x6DD1, + 14037: 0x758F, + 14038: 0x4E66, + 14039: 0x8D4E, + 14040: 0x5B70, + 14041: 0x719F, + 14042: 0x85AF, + 14043: 0x6691, + 14044: 0x66D9, + 14045: 0x7F72, + 14046: 0x8700, + 14047: 0x9ECD, + 14048: 0x9F20, + 14049: 0x5C5E, + 14050: 0x672F, + 14051: 0x8FF0, + 14052: 0x6811, + 14053: 0x675F, + 14054: 0x620D, + 14055: 0x7AD6, + 14056: 0x5885, + 14057: 0x5EB6, + 14058: 0x6570, + 14059: 0x6F31, + 14060: 0x8582, + 14061: 0x8583, + 14062: 0x8586, + 14063: 0x8588, + 14064: 0x8589, + 14065: 0x858A, + 14066: 0x858B, + 14067: 0x858C, + 14068: 0x858D, + 14069: 0x858E, + 14070: 0x8590, + 14071: 0x8591, + 14072: 0x8592, + 14073: 0x8593, + 14074: 0x8594, + 14075: 0x8595, + 14076: 0x8596, + 14077: 0x8597, + 14078: 0x8598, + 14079: 0x8599, + 14080: 0x859A, + 14081: 0x859D, + 14082: 0x859E, + 14083: 0x859F, + 14084: 0x85A0, + 14085: 0x85A1, + 14086: 0x85A2, + 14087: 0x85A3, + 14088: 0x85A5, + 14089: 0x85A6, + 14090: 0x85A7, + 14091: 0x85A9, + 14092: 0x85AB, + 14093: 0x85AC, + 14094: 0x85AD, + 14095: 0x85B1, + 14096: 0x85B2, + 14097: 0x85B3, + 14098: 0x85B4, + 14099: 0x85B5, + 14100: 0x85B6, + 14101: 0x85B8, + 14102: 0x85BA, + 14103: 0x85BB, + 14104: 0x85BC, + 14105: 0x85BD, + 14106: 0x85BE, + 14107: 0x85BF, + 14108: 0x85C0, + 14109: 0x85C2, + 14110: 0x85C3, + 14111: 0x85C4, + 14112: 0x85C5, + 14113: 0x85C6, + 14114: 0x85C7, + 14115: 0x85C8, + 14116: 0x85CA, + 14117: 0x85CB, + 14118: 0x85CC, + 14119: 0x85CD, + 14120: 0x85CE, + 14121: 0x85D1, + 14122: 0x85D2, + 14123: 0x85D4, + 14124: 0x85D6, + 14125: 0x85D7, + 14126: 0x85D8, + 14127: 0x85D9, + 14128: 0x85DA, + 14129: 0x85DB, + 14130: 0x85DD, + 14131: 0x85DE, + 14132: 0x85DF, + 14133: 0x85E0, + 14134: 0x85E1, + 14135: 0x85E2, + 14136: 0x85E3, + 14137: 0x85E5, + 14138: 0x85E6, + 14139: 0x85E7, + 14140: 0x85E8, + 14141: 0x85EA, + 14142: 0x85EB, + 14143: 0x85EC, + 14144: 0x85ED, + 14145: 0x85EE, + 14146: 0x85EF, + 14147: 0x85F0, + 14148: 0x85F1, + 14149: 0x85F2, + 14150: 0x85F3, + 14151: 0x85F4, + 14152: 0x85F5, + 14153: 0x85F6, + 14154: 0x85F7, + 14155: 0x85F8, + 14156: 0x6055, + 14157: 0x5237, + 14158: 0x800D, + 14159: 0x6454, + 14160: 0x8870, + 14161: 0x7529, + 14162: 0x5E05, + 14163: 0x6813, + 14164: 0x62F4, + 14165: 0x971C, + 14166: 0x53CC, + 14167: 0x723D, + 14168: 0x8C01, + 14169: 0x6C34, + 14170: 0x7761, + 14171: 0x7A0E, + 14172: 0x542E, + 14173: 0x77AC, + 14174: 0x987A, + 14175: 0x821C, + 14176: 0x8BF4, + 14177: 0x7855, + 14178: 0x6714, + 14179: 0x70C1, + 14180: 0x65AF, + 14181: 0x6495, + 14182: 0x5636, + 14183: 0x601D, + 14184: 0x79C1, + 14185: 0x53F8, + 14186: 0x4E1D, + 14187: 0x6B7B, + 14188: 0x8086, + 14189: 0x5BFA, + 14190: 0x55E3, + 14191: 0x56DB, + 14192: 0x4F3A, + 14193: 0x4F3C, + 14194: 0x9972, + 14195: 0x5DF3, + 14196: 0x677E, + 14197: 0x8038, + 14198: 0x6002, + 14199: 0x9882, + 14200: 0x9001, + 14201: 0x5B8B, + 14202: 0x8BBC, + 14203: 0x8BF5, + 14204: 0x641C, + 14205: 0x8258, + 14206: 0x64DE, + 14207: 0x55FD, + 14208: 0x82CF, + 14209: 0x9165, + 14210: 0x4FD7, + 14211: 0x7D20, + 14212: 0x901F, + 14213: 0x7C9F, + 14214: 0x50F3, + 14215: 0x5851, + 14216: 0x6EAF, + 14217: 0x5BBF, + 14218: 0x8BC9, + 14219: 0x8083, + 14220: 0x9178, + 14221: 0x849C, + 14222: 0x7B97, + 14223: 0x867D, + 14224: 0x968B, + 14225: 0x968F, + 14226: 0x7EE5, + 14227: 0x9AD3, + 14228: 0x788E, + 14229: 0x5C81, + 14230: 0x7A57, + 14231: 0x9042, + 14232: 0x96A7, + 14233: 0x795F, + 14234: 0x5B59, + 14235: 0x635F, + 14236: 0x7B0B, + 14237: 0x84D1, + 14238: 0x68AD, + 14239: 0x5506, + 14240: 0x7F29, + 14241: 0x7410, + 14242: 0x7D22, + 14243: 0x9501, + 14244: 0x6240, + 14245: 0x584C, + 14246: 0x4ED6, + 14247: 0x5B83, + 14248: 0x5979, + 14249: 0x5854, + 14250: 0x85F9, + 14251: 0x85FA, + 14252: 0x85FC, + 14253: 0x85FD, + 14254: 0x85FE, + 14255: 0x8600, + 14256: 0x8601, + 14257: 0x8602, + 14258: 0x8603, + 14259: 0x8604, + 14260: 0x8606, + 14261: 0x8607, + 14262: 0x8608, + 14263: 0x8609, + 14264: 0x860A, + 14265: 0x860B, + 14266: 0x860C, + 14267: 0x860D, + 14268: 0x860E, + 14269: 0x860F, + 14270: 0x8610, + 14271: 0x8612, + 14272: 0x8613, + 14273: 0x8614, + 14274: 0x8615, + 14275: 0x8617, + 14276: 0x8618, + 14277: 0x8619, + 14278: 0x861A, + 14279: 0x861B, + 14280: 0x861C, + 14281: 0x861D, + 14282: 0x861E, + 14283: 0x861F, + 14284: 0x8620, + 14285: 0x8621, + 14286: 0x8622, + 14287: 0x8623, + 14288: 0x8624, + 14289: 0x8625, + 14290: 0x8626, + 14291: 0x8628, + 14292: 0x862A, + 14293: 0x862B, + 14294: 0x862C, + 14295: 0x862D, + 14296: 0x862E, + 14297: 0x862F, + 14298: 0x8630, + 14299: 0x8631, + 14300: 0x8632, + 14301: 0x8633, + 14302: 0x8634, + 14303: 0x8635, + 14304: 0x8636, + 14305: 0x8637, + 14306: 0x8639, + 14307: 0x863A, + 14308: 0x863B, + 14309: 0x863D, + 14310: 0x863E, + 14311: 0x863F, + 14312: 0x8640, + 14313: 0x8641, + 14314: 0x8642, + 14315: 0x8643, + 14316: 0x8644, + 14317: 0x8645, + 14318: 0x8646, + 14319: 0x8647, + 14320: 0x8648, + 14321: 0x8649, + 14322: 0x864A, + 14323: 0x864B, + 14324: 0x864C, + 14325: 0x8652, + 14326: 0x8653, + 14327: 0x8655, + 14328: 0x8656, + 14329: 0x8657, + 14330: 0x8658, + 14331: 0x8659, + 14332: 0x865B, + 14333: 0x865C, + 14334: 0x865D, + 14335: 0x865F, + 14336: 0x8660, + 14337: 0x8661, + 14338: 0x8663, + 14339: 0x8664, + 14340: 0x8665, + 14341: 0x8666, + 14342: 0x8667, + 14343: 0x8668, + 14344: 0x8669, + 14345: 0x866A, + 14346: 0x736D, + 14347: 0x631E, + 14348: 0x8E4B, + 14349: 0x8E0F, + 14350: 0x80CE, + 14351: 0x82D4, + 14352: 0x62AC, + 14353: 0x53F0, + 14354: 0x6CF0, + 14355: 0x915E, + 14356: 0x592A, + 14357: 0x6001, + 14358: 0x6C70, + 14359: 0x574D, + 14360: 0x644A, + 14361: 0x8D2A, + 14362: 0x762B, + 14363: 0x6EE9, + 14364: 0x575B, + 14365: 0x6A80, + 14366: 0x75F0, + 14367: 0x6F6D, + 14368: 0x8C2D, + 14369: 0x8C08, + 14370: 0x5766, + 14371: 0x6BEF, + 14372: 0x8892, + 14373: 0x78B3, + 14374: 0x63A2, + 14375: 0x53F9, + 14376: 0x70AD, + 14377: 0x6C64, + 14378: 0x5858, + 14379: 0x642A, + 14380: 0x5802, + 14381: 0x68E0, + 14382: 0x819B, + 14383: 0x5510, + 14384: 0x7CD6, + 14385: 0x5018, + 14386: 0x8EBA, + 14387: 0x6DCC, + 14388: 0x8D9F, + 14389: 0x70EB, + 14390: 0x638F, + 14391: 0x6D9B, + 14392: 0x6ED4, + 14393: 0x7EE6, + 14394: 0x8404, + 14395: 0x6843, + 14396: 0x9003, + 14397: 0x6DD8, + 14398: 0x9676, + 14399: 0x8BA8, + 14400: 0x5957, + 14401: 0x7279, + 14402: 0x85E4, + 14403: 0x817E, + 14404: 0x75BC, + 14405: 0x8A8A, + 14406: 0x68AF, + 14407: 0x5254, + 14408: 0x8E22, + 14409: 0x9511, + 14410: 0x63D0, + 14411: 0x9898, + 14412: 0x8E44, + 14413: 0x557C, + 14414: 0x4F53, + 14415: 0x66FF, + 14416: 0x568F, + 14417: 0x60D5, + 14418: 0x6D95, + 14419: 0x5243, + 14420: 0x5C49, + 14421: 0x5929, + 14422: 0x6DFB, + 14423: 0x586B, + 14424: 0x7530, + 14425: 0x751C, + 14426: 0x606C, + 14427: 0x8214, + 14428: 0x8146, + 14429: 0x6311, + 14430: 0x6761, + 14431: 0x8FE2, + 14432: 0x773A, + 14433: 0x8DF3, + 14434: 0x8D34, + 14435: 0x94C1, + 14436: 0x5E16, + 14437: 0x5385, + 14438: 0x542C, + 14439: 0x70C3, + 14440: 0x866D, + 14441: 0x866F, + 14442: 0x8670, + 14443: 0x8672, + 14444: 0x8673, + 14445: 0x8674, + 14446: 0x8675, + 14447: 0x8676, + 14448: 0x8677, + 14449: 0x8678, + 14450: 0x8683, + 14451: 0x8684, + 14452: 0x8685, + 14453: 0x8686, + 14454: 0x8687, + 14455: 0x8688, + 14456: 0x8689, + 14457: 0x868E, + 14458: 0x868F, + 14459: 0x8690, + 14460: 0x8691, + 14461: 0x8692, + 14462: 0x8694, + 14463: 0x8696, + 14464: 0x8697, + 14465: 0x8698, + 14466: 0x8699, + 14467: 0x869A, + 14468: 0x869B, + 14469: 0x869E, + 14470: 0x869F, + 14471: 0x86A0, + 14472: 0x86A1, + 14473: 0x86A2, + 14474: 0x86A5, + 14475: 0x86A6, + 14476: 0x86AB, + 14477: 0x86AD, + 14478: 0x86AE, + 14479: 0x86B2, + 14480: 0x86B3, + 14481: 0x86B7, + 14482: 0x86B8, + 14483: 0x86B9, + 14484: 0x86BB, + 14485: 0x86BC, + 14486: 0x86BD, + 14487: 0x86BE, + 14488: 0x86BF, + 14489: 0x86C1, + 14490: 0x86C2, + 14491: 0x86C3, + 14492: 0x86C5, + 14493: 0x86C8, + 14494: 0x86CC, + 14495: 0x86CD, + 14496: 0x86D2, + 14497: 0x86D3, + 14498: 0x86D5, + 14499: 0x86D6, + 14500: 0x86D7, + 14501: 0x86DA, + 14502: 0x86DC, + 14503: 0x86DD, + 14504: 0x86E0, + 14505: 0x86E1, + 14506: 0x86E2, + 14507: 0x86E3, + 14508: 0x86E5, + 14509: 0x86E6, + 14510: 0x86E7, + 14511: 0x86E8, + 14512: 0x86EA, + 14513: 0x86EB, + 14514: 0x86EC, + 14515: 0x86EF, + 14516: 0x86F5, + 14517: 0x86F6, + 14518: 0x86F7, + 14519: 0x86FA, + 14520: 0x86FB, + 14521: 0x86FC, + 14522: 0x86FD, + 14523: 0x86FF, + 14524: 0x8701, + 14525: 0x8704, + 14526: 0x8705, + 14527: 0x8706, + 14528: 0x870B, + 14529: 0x870C, + 14530: 0x870E, + 14531: 0x870F, + 14532: 0x8710, + 14533: 0x8711, + 14534: 0x8714, + 14535: 0x8716, + 14536: 0x6C40, + 14537: 0x5EF7, + 14538: 0x505C, + 14539: 0x4EAD, + 14540: 0x5EAD, + 14541: 0x633A, + 14542: 0x8247, + 14543: 0x901A, + 14544: 0x6850, + 14545: 0x916E, + 14546: 0x77B3, + 14547: 0x540C, + 14548: 0x94DC, + 14549: 0x5F64, + 14550: 0x7AE5, + 14551: 0x6876, + 14552: 0x6345, + 14553: 0x7B52, + 14554: 0x7EDF, + 14555: 0x75DB, + 14556: 0x5077, + 14557: 0x6295, + 14558: 0x5934, + 14559: 0x900F, + 14560: 0x51F8, + 14561: 0x79C3, + 14562: 0x7A81, + 14563: 0x56FE, + 14564: 0x5F92, + 14565: 0x9014, + 14566: 0x6D82, + 14567: 0x5C60, + 14568: 0x571F, + 14569: 0x5410, + 14570: 0x5154, + 14571: 0x6E4D, + 14572: 0x56E2, + 14573: 0x63A8, + 14574: 0x9893, + 14575: 0x817F, + 14576: 0x8715, + 14577: 0x892A, + 14578: 0x9000, + 14579: 0x541E, + 14580: 0x5C6F, + 14581: 0x81C0, + 14582: 0x62D6, + 14583: 0x6258, + 14584: 0x8131, + 14585: 0x9E35, + 14586: 0x9640, + 14587: 0x9A6E, + 14588: 0x9A7C, + 14589: 0x692D, + 14590: 0x59A5, + 14591: 0x62D3, + 14592: 0x553E, + 14593: 0x6316, + 14594: 0x54C7, + 14595: 0x86D9, + 14596: 0x6D3C, + 14597: 0x5A03, + 14598: 0x74E6, + 14599: 0x889C, + 14600: 0x6B6A, + 14601: 0x5916, + 14602: 0x8C4C, + 14603: 0x5F2F, + 14604: 0x6E7E, + 14605: 0x73A9, + 14606: 0x987D, + 14607: 0x4E38, + 14608: 0x70F7, + 14609: 0x5B8C, + 14610: 0x7897, + 14611: 0x633D, + 14612: 0x665A, + 14613: 0x7696, + 14614: 0x60CB, + 14615: 0x5B9B, + 14616: 0x5A49, + 14617: 0x4E07, + 14618: 0x8155, + 14619: 0x6C6A, + 14620: 0x738B, + 14621: 0x4EA1, + 14622: 0x6789, + 14623: 0x7F51, + 14624: 0x5F80, + 14625: 0x65FA, + 14626: 0x671B, + 14627: 0x5FD8, + 14628: 0x5984, + 14629: 0x5A01, + 14630: 0x8719, + 14631: 0x871B, + 14632: 0x871D, + 14633: 0x871F, + 14634: 0x8720, + 14635: 0x8724, + 14636: 0x8726, + 14637: 0x8727, + 14638: 0x8728, + 14639: 0x872A, + 14640: 0x872B, + 14641: 0x872C, + 14642: 0x872D, + 14643: 0x872F, + 14644: 0x8730, + 14645: 0x8732, + 14646: 0x8733, + 14647: 0x8735, + 14648: 0x8736, + 14649: 0x8738, + 14650: 0x8739, + 14651: 0x873A, + 14652: 0x873C, + 14653: 0x873D, + 14654: 0x8740, + 14655: 0x8741, + 14656: 0x8742, + 14657: 0x8743, + 14658: 0x8744, + 14659: 0x8745, + 14660: 0x8746, + 14661: 0x874A, + 14662: 0x874B, + 14663: 0x874D, + 14664: 0x874F, + 14665: 0x8750, + 14666: 0x8751, + 14667: 0x8752, + 14668: 0x8754, + 14669: 0x8755, + 14670: 0x8756, + 14671: 0x8758, + 14672: 0x875A, + 14673: 0x875B, + 14674: 0x875C, + 14675: 0x875D, + 14676: 0x875E, + 14677: 0x875F, + 14678: 0x8761, + 14679: 0x8762, + 14680: 0x8766, + 14681: 0x8767, + 14682: 0x8768, + 14683: 0x8769, + 14684: 0x876A, + 14685: 0x876B, + 14686: 0x876C, + 14687: 0x876D, + 14688: 0x876F, + 14689: 0x8771, + 14690: 0x8772, + 14691: 0x8773, + 14692: 0x8775, + 14693: 0x8777, + 14694: 0x8778, + 14695: 0x8779, + 14696: 0x877A, + 14697: 0x877F, + 14698: 0x8780, + 14699: 0x8781, + 14700: 0x8784, + 14701: 0x8786, + 14702: 0x8787, + 14703: 0x8789, + 14704: 0x878A, + 14705: 0x878C, + 14706: 0x878E, + 14707: 0x878F, + 14708: 0x8790, + 14709: 0x8791, + 14710: 0x8792, + 14711: 0x8794, + 14712: 0x8795, + 14713: 0x8796, + 14714: 0x8798, + 14715: 0x8799, + 14716: 0x879A, + 14717: 0x879B, + 14718: 0x879C, + 14719: 0x879D, + 14720: 0x879E, + 14721: 0x87A0, + 14722: 0x87A1, + 14723: 0x87A2, + 14724: 0x87A3, + 14725: 0x87A4, + 14726: 0x5DCD, + 14727: 0x5FAE, + 14728: 0x5371, + 14729: 0x97E6, + 14730: 0x8FDD, + 14731: 0x6845, + 14732: 0x56F4, + 14733: 0x552F, + 14734: 0x60DF, + 14735: 0x4E3A, + 14736: 0x6F4D, + 14737: 0x7EF4, + 14738: 0x82C7, + 14739: 0x840E, + 14740: 0x59D4, + 14741: 0x4F1F, + 14742: 0x4F2A, + 14743: 0x5C3E, + 14744: 0x7EAC, + 14745: 0x672A, + 14746: 0x851A, + 14747: 0x5473, + 14748: 0x754F, + 14749: 0x80C3, + 14750: 0x5582, + 14751: 0x9B4F, + 14752: 0x4F4D, + 14753: 0x6E2D, + 14754: 0x8C13, + 14755: 0x5C09, + 14756: 0x6170, + 14757: 0x536B, + 14758: 0x761F, + 14759: 0x6E29, + 14760: 0x868A, + 14761: 0x6587, + 14762: 0x95FB, + 14763: 0x7EB9, + 14764: 0x543B, + 14765: 0x7A33, + 14766: 0x7D0A, + 14767: 0x95EE, + 14768: 0x55E1, + 14769: 0x7FC1, + 14770: 0x74EE, + 14771: 0x631D, + 14772: 0x8717, + 14773: 0x6DA1, + 14774: 0x7A9D, + 14775: 0x6211, + 14776: 0x65A1, + 14777: 0x5367, + 14778: 0x63E1, + 14779: 0x6C83, + 14780: 0x5DEB, + 14781: 0x545C, + 14782: 0x94A8, + 14783: 0x4E4C, + 14784: 0x6C61, + 14785: 0x8BEC, + 14786: 0x5C4B, + 14787: 0x65E0, + 14788: 0x829C, + 14789: 0x68A7, + 14790: 0x543E, + 14791: 0x5434, + 14792: 0x6BCB, + 14793: 0x6B66, + 14794: 0x4E94, + 14795: 0x6342, + 14796: 0x5348, + 14797: 0x821E, + 14798: 0x4F0D, + 14799: 0x4FAE, + 14800: 0x575E, + 14801: 0x620A, + 14802: 0x96FE, + 14803: 0x6664, + 14804: 0x7269, + 14805: 0x52FF, + 14806: 0x52A1, + 14807: 0x609F, + 14808: 0x8BEF, + 14809: 0x6614, + 14810: 0x7199, + 14811: 0x6790, + 14812: 0x897F, + 14813: 0x7852, + 14814: 0x77FD, + 14815: 0x6670, + 14816: 0x563B, + 14817: 0x5438, + 14818: 0x9521, + 14819: 0x727A, + 14820: 0x87A5, + 14821: 0x87A6, + 14822: 0x87A7, + 14823: 0x87A9, + 14824: 0x87AA, + 14825: 0x87AE, + 14826: 0x87B0, + 14827: 0x87B1, + 14828: 0x87B2, + 14829: 0x87B4, + 14830: 0x87B6, + 14831: 0x87B7, + 14832: 0x87B8, + 14833: 0x87B9, + 14834: 0x87BB, + 14835: 0x87BC, + 14836: 0x87BE, + 14837: 0x87BF, + 14838: 0x87C1, + 14839: 0x87C2, + 14840: 0x87C3, + 14841: 0x87C4, + 14842: 0x87C5, + 14843: 0x87C7, + 14844: 0x87C8, + 14845: 0x87C9, + 14846: 0x87CC, + 14847: 0x87CD, + 14848: 0x87CE, + 14849: 0x87CF, + 14850: 0x87D0, + 14851: 0x87D4, + 14852: 0x87D5, + 14853: 0x87D6, + 14854: 0x87D7, + 14855: 0x87D8, + 14856: 0x87D9, + 14857: 0x87DA, + 14858: 0x87DC, + 14859: 0x87DD, + 14860: 0x87DE, + 14861: 0x87DF, + 14862: 0x87E1, + 14863: 0x87E2, + 14864: 0x87E3, + 14865: 0x87E4, + 14866: 0x87E6, + 14867: 0x87E7, + 14868: 0x87E8, + 14869: 0x87E9, + 14870: 0x87EB, + 14871: 0x87EC, + 14872: 0x87ED, + 14873: 0x87EF, + 14874: 0x87F0, + 14875: 0x87F1, + 14876: 0x87F2, + 14877: 0x87F3, + 14878: 0x87F4, + 14879: 0x87F5, + 14880: 0x87F6, + 14881: 0x87F7, + 14882: 0x87F8, + 14883: 0x87FA, + 14884: 0x87FB, + 14885: 0x87FC, + 14886: 0x87FD, + 14887: 0x87FF, + 14888: 0x8800, + 14889: 0x8801, + 14890: 0x8802, + 14891: 0x8804, + 14892: 0x8805, + 14893: 0x8806, + 14894: 0x8807, + 14895: 0x8808, + 14896: 0x8809, + 14897: 0x880B, + 14898: 0x880C, + 14899: 0x880D, + 14900: 0x880E, + 14901: 0x880F, + 14902: 0x8810, + 14903: 0x8811, + 14904: 0x8812, + 14905: 0x8814, + 14906: 0x8817, + 14907: 0x8818, + 14908: 0x8819, + 14909: 0x881A, + 14910: 0x881C, + 14911: 0x881D, + 14912: 0x881E, + 14913: 0x881F, + 14914: 0x8820, + 14915: 0x8823, + 14916: 0x7A00, + 14917: 0x606F, + 14918: 0x5E0C, + 14919: 0x6089, + 14920: 0x819D, + 14921: 0x5915, + 14922: 0x60DC, + 14923: 0x7184, + 14924: 0x70EF, + 14925: 0x6EAA, + 14926: 0x6C50, + 14927: 0x7280, + 14928: 0x6A84, + 14929: 0x88AD, + 14930: 0x5E2D, + 14931: 0x4E60, + 14932: 0x5AB3, + 14933: 0x559C, + 14934: 0x94E3, + 14935: 0x6D17, + 14936: 0x7CFB, + 14937: 0x9699, + 14938: 0x620F, + 14939: 0x7EC6, + 14940: 0x778E, + 14941: 0x867E, + 14942: 0x5323, + 14943: 0x971E, + 14944: 0x8F96, + 14945: 0x6687, + 14946: 0x5CE1, + 14947: 0x4FA0, + 14948: 0x72ED, + 14949: 0x4E0B, + 14950: 0x53A6, + 14951: 0x590F, + 14952: 0x5413, + 14953: 0x6380, + 14954: 0x9528, + 14955: 0x5148, + 14956: 0x4ED9, + 14957: 0x9C9C, + 14958: 0x7EA4, + 14959: 0x54B8, + 14960: 0x8D24, + 14961: 0x8854, + 14962: 0x8237, + 14963: 0x95F2, + 14964: 0x6D8E, + 14965: 0x5F26, + 14966: 0x5ACC, + 14967: 0x663E, + 14968: 0x9669, + 14969: 0x73B0, + 14970: 0x732E, + 14971: 0x53BF, + 14972: 0x817A, + 14973: 0x9985, + 14974: 0x7FA1, + 14975: 0x5BAA, + 14976: 0x9677, + 14977: 0x9650, + 14978: 0x7EBF, + 14979: 0x76F8, + 14980: 0x53A2, + 14981: 0x9576, + 14982: 0x9999, + 14983: 0x7BB1, + 14984: 0x8944, + 14985: 0x6E58, + 14986: 0x4E61, + 14987: 0x7FD4, + 14988: 0x7965, + 14989: 0x8BE6, + 14990: 0x60F3, + 14991: 0x54CD, + 14992: 0x4EAB, + 14993: 0x9879, + 14994: 0x5DF7, + 14995: 0x6A61, + 14996: 0x50CF, + 14997: 0x5411, + 14998: 0x8C61, + 14999: 0x8427, + 15000: 0x785D, + 15001: 0x9704, + 15002: 0x524A, + 15003: 0x54EE, + 15004: 0x56A3, + 15005: 0x9500, + 15006: 0x6D88, + 15007: 0x5BB5, + 15008: 0x6DC6, + 15009: 0x6653, + 15010: 0x8824, + 15011: 0x8825, + 15012: 0x8826, + 15013: 0x8827, + 15014: 0x8828, + 15015: 0x8829, + 15016: 0x882A, + 15017: 0x882B, + 15018: 0x882C, + 15019: 0x882D, + 15020: 0x882E, + 15021: 0x882F, + 15022: 0x8830, + 15023: 0x8831, + 15024: 0x8833, + 15025: 0x8834, + 15026: 0x8835, + 15027: 0x8836, + 15028: 0x8837, + 15029: 0x8838, + 15030: 0x883A, + 15031: 0x883B, + 15032: 0x883D, + 15033: 0x883E, + 15034: 0x883F, + 15035: 0x8841, + 15036: 0x8842, + 15037: 0x8843, + 15038: 0x8846, + 15039: 0x8847, + 15040: 0x8848, + 15041: 0x8849, + 15042: 0x884A, + 15043: 0x884B, + 15044: 0x884E, + 15045: 0x884F, + 15046: 0x8850, + 15047: 0x8851, + 15048: 0x8852, + 15049: 0x8853, + 15050: 0x8855, + 15051: 0x8856, + 15052: 0x8858, + 15053: 0x885A, + 15054: 0x885B, + 15055: 0x885C, + 15056: 0x885D, + 15057: 0x885E, + 15058: 0x885F, + 15059: 0x8860, + 15060: 0x8866, + 15061: 0x8867, + 15062: 0x886A, + 15063: 0x886D, + 15064: 0x886F, + 15065: 0x8871, + 15066: 0x8873, + 15067: 0x8874, + 15068: 0x8875, + 15069: 0x8876, + 15070: 0x8878, + 15071: 0x8879, + 15072: 0x887A, + 15073: 0x887B, + 15074: 0x887C, + 15075: 0x8880, + 15076: 0x8883, + 15077: 0x8886, + 15078: 0x8887, + 15079: 0x8889, + 15080: 0x888A, + 15081: 0x888C, + 15082: 0x888E, + 15083: 0x888F, + 15084: 0x8890, + 15085: 0x8891, + 15086: 0x8893, + 15087: 0x8894, + 15088: 0x8895, + 15089: 0x8897, + 15090: 0x8898, + 15091: 0x8899, + 15092: 0x889A, + 15093: 0x889B, + 15094: 0x889D, + 15095: 0x889E, + 15096: 0x889F, + 15097: 0x88A0, + 15098: 0x88A1, + 15099: 0x88A3, + 15100: 0x88A5, + 15101: 0x88A6, + 15102: 0x88A7, + 15103: 0x88A8, + 15104: 0x88A9, + 15105: 0x88AA, + 15106: 0x5C0F, + 15107: 0x5B5D, + 15108: 0x6821, + 15109: 0x8096, + 15110: 0x5578, + 15111: 0x7B11, + 15112: 0x6548, + 15113: 0x6954, + 15114: 0x4E9B, + 15115: 0x6B47, + 15116: 0x874E, + 15117: 0x978B, + 15118: 0x534F, + 15119: 0x631F, + 15120: 0x643A, + 15121: 0x90AA, + 15122: 0x659C, + 15123: 0x80C1, + 15124: 0x8C10, + 15125: 0x5199, + 15126: 0x68B0, + 15127: 0x5378, + 15128: 0x87F9, + 15129: 0x61C8, + 15130: 0x6CC4, + 15131: 0x6CFB, + 15132: 0x8C22, + 15133: 0x5C51, + 15134: 0x85AA, + 15135: 0x82AF, + 15136: 0x950C, + 15137: 0x6B23, + 15138: 0x8F9B, + 15139: 0x65B0, + 15140: 0x5FFB, + 15141: 0x5FC3, + 15142: 0x4FE1, + 15143: 0x8845, + 15144: 0x661F, + 15145: 0x8165, + 15146: 0x7329, + 15147: 0x60FA, + 15148: 0x5174, + 15149: 0x5211, + 15150: 0x578B, + 15151: 0x5F62, + 15152: 0x90A2, + 15153: 0x884C, + 15154: 0x9192, + 15155: 0x5E78, + 15156: 0x674F, + 15157: 0x6027, + 15158: 0x59D3, + 15159: 0x5144, + 15160: 0x51F6, + 15161: 0x80F8, + 15162: 0x5308, + 15163: 0x6C79, + 15164: 0x96C4, + 15165: 0x718A, + 15166: 0x4F11, + 15167: 0x4FEE, + 15168: 0x7F9E, + 15169: 0x673D, + 15170: 0x55C5, + 15171: 0x9508, + 15172: 0x79C0, + 15173: 0x8896, + 15174: 0x7EE3, + 15175: 0x589F, + 15176: 0x620C, + 15177: 0x9700, + 15178: 0x865A, + 15179: 0x5618, + 15180: 0x987B, + 15181: 0x5F90, + 15182: 0x8BB8, + 15183: 0x84C4, + 15184: 0x9157, + 15185: 0x53D9, + 15186: 0x65ED, + 15187: 0x5E8F, + 15188: 0x755C, + 15189: 0x6064, + 15190: 0x7D6E, + 15191: 0x5A7F, + 15192: 0x7EEA, + 15193: 0x7EED, + 15194: 0x8F69, + 15195: 0x55A7, + 15196: 0x5BA3, + 15197: 0x60AC, + 15198: 0x65CB, + 15199: 0x7384, + 15200: 0x88AC, + 15201: 0x88AE, + 15202: 0x88AF, + 15203: 0x88B0, + 15204: 0x88B2, + 15205: 0x88B3, + 15206: 0x88B4, + 15207: 0x88B5, + 15208: 0x88B6, + 15209: 0x88B8, + 15210: 0x88B9, + 15211: 0x88BA, + 15212: 0x88BB, + 15213: 0x88BD, + 15214: 0x88BE, + 15215: 0x88BF, + 15216: 0x88C0, + 15217: 0x88C3, + 15218: 0x88C4, + 15219: 0x88C7, + 15220: 0x88C8, + 15221: 0x88CA, + 15222: 0x88CB, + 15223: 0x88CC, + 15224: 0x88CD, + 15225: 0x88CF, + 15226: 0x88D0, + 15227: 0x88D1, + 15228: 0x88D3, + 15229: 0x88D6, + 15230: 0x88D7, + 15231: 0x88DA, + 15232: 0x88DB, + 15233: 0x88DC, + 15234: 0x88DD, + 15235: 0x88DE, + 15236: 0x88E0, + 15237: 0x88E1, + 15238: 0x88E6, + 15239: 0x88E7, + 15240: 0x88E9, + 15241: 0x88EA, + 15242: 0x88EB, + 15243: 0x88EC, + 15244: 0x88ED, + 15245: 0x88EE, + 15246: 0x88EF, + 15247: 0x88F2, + 15248: 0x88F5, + 15249: 0x88F6, + 15250: 0x88F7, + 15251: 0x88FA, + 15252: 0x88FB, + 15253: 0x88FD, + 15254: 0x88FF, + 15255: 0x8900, + 15256: 0x8901, + 15257: 0x8903, + 15258: 0x8904, + 15259: 0x8905, + 15260: 0x8906, + 15261: 0x8907, + 15262: 0x8908, + 15263: 0x8909, + 15264: 0x890B, + 15265: 0x890C, + 15266: 0x890D, + 15267: 0x890E, + 15268: 0x890F, + 15269: 0x8911, + 15270: 0x8914, + 15271: 0x8915, + 15272: 0x8916, + 15273: 0x8917, + 15274: 0x8918, + 15275: 0x891C, + 15276: 0x891D, + 15277: 0x891E, + 15278: 0x891F, + 15279: 0x8920, + 15280: 0x8922, + 15281: 0x8923, + 15282: 0x8924, + 15283: 0x8926, + 15284: 0x8927, + 15285: 0x8928, + 15286: 0x8929, + 15287: 0x892C, + 15288: 0x892D, + 15289: 0x892E, + 15290: 0x892F, + 15291: 0x8931, + 15292: 0x8932, + 15293: 0x8933, + 15294: 0x8935, + 15295: 0x8937, + 15296: 0x9009, + 15297: 0x7663, + 15298: 0x7729, + 15299: 0x7EDA, + 15300: 0x9774, + 15301: 0x859B, + 15302: 0x5B66, + 15303: 0x7A74, + 15304: 0x96EA, + 15305: 0x8840, + 15306: 0x52CB, + 15307: 0x718F, + 15308: 0x5FAA, + 15309: 0x65EC, + 15310: 0x8BE2, + 15311: 0x5BFB, + 15312: 0x9A6F, + 15313: 0x5DE1, + 15314: 0x6B89, + 15315: 0x6C5B, + 15316: 0x8BAD, + 15317: 0x8BAF, + 15318: 0x900A, + 15319: 0x8FC5, + 15320: 0x538B, + 15321: 0x62BC, + 15322: 0x9E26, + 15323: 0x9E2D, + 15324: 0x5440, + 15325: 0x4E2B, + 15326: 0x82BD, + 15327: 0x7259, + 15328: 0x869C, + 15329: 0x5D16, + 15330: 0x8859, + 15331: 0x6DAF, + 15332: 0x96C5, + 15333: 0x54D1, + 15334: 0x4E9A, + 15335: 0x8BB6, + 15336: 0x7109, + 15337: 0x54BD, + 15338: 0x9609, + 15339: 0x70DF, + 15340: 0x6DF9, + 15341: 0x76D0, + 15342: 0x4E25, + 15343: 0x7814, + 15344: 0x8712, + 15345: 0x5CA9, + 15346: 0x5EF6, + 15347: 0x8A00, + 15348: 0x989C, + 15349: 0x960E, + 15350: 0x708E, + 15351: 0x6CBF, + 15352: 0x5944, + 15353: 0x63A9, + 15354: 0x773C, + 15355: 0x884D, + 15356: 0x6F14, + 15357: 0x8273, + 15358: 0x5830, + 15359: 0x71D5, + 15360: 0x538C, + 15361: 0x781A, + 15362: 0x96C1, + 15363: 0x5501, + 15364: 0x5F66, + 15365: 0x7130, + 15366: 0x5BB4, + 15367: 0x8C1A, + 15368: 0x9A8C, + 15369: 0x6B83, + 15370: 0x592E, + 15371: 0x9E2F, + 15372: 0x79E7, + 15373: 0x6768, + 15374: 0x626C, + 15375: 0x4F6F, + 15376: 0x75A1, + 15377: 0x7F8A, + 15378: 0x6D0B, + 15379: 0x9633, + 15380: 0x6C27, + 15381: 0x4EF0, + 15382: 0x75D2, + 15383: 0x517B, + 15384: 0x6837, + 15385: 0x6F3E, + 15386: 0x9080, + 15387: 0x8170, + 15388: 0x5996, + 15389: 0x7476, + 15390: 0x8938, + 15391: 0x8939, + 15392: 0x893A, + 15393: 0x893B, + 15394: 0x893C, + 15395: 0x893D, + 15396: 0x893E, + 15397: 0x893F, + 15398: 0x8940, + 15399: 0x8942, + 15400: 0x8943, + 15401: 0x8945, + 15402: 0x8946, + 15403: 0x8947, + 15404: 0x8948, + 15405: 0x8949, + 15406: 0x894A, + 15407: 0x894B, + 15408: 0x894C, + 15409: 0x894D, + 15410: 0x894E, + 15411: 0x894F, + 15412: 0x8950, + 15413: 0x8951, + 15414: 0x8952, + 15415: 0x8953, + 15416: 0x8954, + 15417: 0x8955, + 15418: 0x8956, + 15419: 0x8957, + 15420: 0x8958, + 15421: 0x8959, + 15422: 0x895A, + 15423: 0x895B, + 15424: 0x895C, + 15425: 0x895D, + 15426: 0x8960, + 15427: 0x8961, + 15428: 0x8962, + 15429: 0x8963, + 15430: 0x8964, + 15431: 0x8965, + 15432: 0x8967, + 15433: 0x8968, + 15434: 0x8969, + 15435: 0x896A, + 15436: 0x896B, + 15437: 0x896C, + 15438: 0x896D, + 15439: 0x896E, + 15440: 0x896F, + 15441: 0x8970, + 15442: 0x8971, + 15443: 0x8972, + 15444: 0x8973, + 15445: 0x8974, + 15446: 0x8975, + 15447: 0x8976, + 15448: 0x8977, + 15449: 0x8978, + 15450: 0x8979, + 15451: 0x897A, + 15452: 0x897C, + 15453: 0x897D, + 15454: 0x897E, + 15455: 0x8980, + 15456: 0x8982, + 15457: 0x8984, + 15458: 0x8985, + 15459: 0x8987, + 15460: 0x8988, + 15461: 0x8989, + 15462: 0x898A, + 15463: 0x898B, + 15464: 0x898C, + 15465: 0x898D, + 15466: 0x898E, + 15467: 0x898F, + 15468: 0x8990, + 15469: 0x8991, + 15470: 0x8992, + 15471: 0x8993, + 15472: 0x8994, + 15473: 0x8995, + 15474: 0x8996, + 15475: 0x8997, + 15476: 0x8998, + 15477: 0x8999, + 15478: 0x899A, + 15479: 0x899B, + 15480: 0x899C, + 15481: 0x899D, + 15482: 0x899E, + 15483: 0x899F, + 15484: 0x89A0, + 15485: 0x89A1, + 15486: 0x6447, + 15487: 0x5C27, + 15488: 0x9065, + 15489: 0x7A91, + 15490: 0x8C23, + 15491: 0x59DA, + 15492: 0x54AC, + 15493: 0x8200, + 15494: 0x836F, + 15495: 0x8981, + 15496: 0x8000, + 15497: 0x6930, + 15498: 0x564E, + 15499: 0x8036, + 15500: 0x7237, + 15501: 0x91CE, + 15502: 0x51B6, + 15503: 0x4E5F, + 15504: 0x9875, + 15505: 0x6396, + 15506: 0x4E1A, + 15507: 0x53F6, + 15508: 0x66F3, + 15509: 0x814B, + 15510: 0x591C, + 15511: 0x6DB2, + 15512: 0x4E00, + 15513: 0x58F9, + 15514: 0x533B, + 15515: 0x63D6, + 15516: 0x94F1, + 15517: 0x4F9D, + 15518: 0x4F0A, + 15519: 0x8863, + 15520: 0x9890, + 15521: 0x5937, + 15522: 0x9057, + 15523: 0x79FB, + 15524: 0x4EEA, + 15525: 0x80F0, + 15526: 0x7591, + 15527: 0x6C82, + 15528: 0x5B9C, + 15529: 0x59E8, + 15530: 0x5F5D, + 15531: 0x6905, + 15532: 0x8681, + 15533: 0x501A, + 15534: 0x5DF2, + 15535: 0x4E59, + 15536: 0x77E3, + 15537: 0x4EE5, + 15538: 0x827A, + 15539: 0x6291, + 15540: 0x6613, + 15541: 0x9091, + 15542: 0x5C79, + 15543: 0x4EBF, + 15544: 0x5F79, + 15545: 0x81C6, + 15546: 0x9038, + 15547: 0x8084, + 15548: 0x75AB, + 15549: 0x4EA6, + 15550: 0x88D4, + 15551: 0x610F, + 15552: 0x6BC5, + 15553: 0x5FC6, + 15554: 0x4E49, + 15555: 0x76CA, + 15556: 0x6EA2, + 15557: 0x8BE3, + 15558: 0x8BAE, + 15559: 0x8C0A, + 15560: 0x8BD1, + 15561: 0x5F02, + 15562: 0x7FFC, + 15563: 0x7FCC, + 15564: 0x7ECE, + 15565: 0x8335, + 15566: 0x836B, + 15567: 0x56E0, + 15568: 0x6BB7, + 15569: 0x97F3, + 15570: 0x9634, + 15571: 0x59FB, + 15572: 0x541F, + 15573: 0x94F6, + 15574: 0x6DEB, + 15575: 0x5BC5, + 15576: 0x996E, + 15577: 0x5C39, + 15578: 0x5F15, + 15579: 0x9690, + 15580: 0x89A2, + 15581: 0x89A3, + 15582: 0x89A4, + 15583: 0x89A5, + 15584: 0x89A6, + 15585: 0x89A7, + 15586: 0x89A8, + 15587: 0x89A9, + 15588: 0x89AA, + 15589: 0x89AB, + 15590: 0x89AC, + 15591: 0x89AD, + 15592: 0x89AE, + 15593: 0x89AF, + 15594: 0x89B0, + 15595: 0x89B1, + 15596: 0x89B2, + 15597: 0x89B3, + 15598: 0x89B4, + 15599: 0x89B5, + 15600: 0x89B6, + 15601: 0x89B7, + 15602: 0x89B8, + 15603: 0x89B9, + 15604: 0x89BA, + 15605: 0x89BB, + 15606: 0x89BC, + 15607: 0x89BD, + 15608: 0x89BE, + 15609: 0x89BF, + 15610: 0x89C0, + 15611: 0x89C3, + 15612: 0x89CD, + 15613: 0x89D3, + 15614: 0x89D4, + 15615: 0x89D5, + 15616: 0x89D7, + 15617: 0x89D8, + 15618: 0x89D9, + 15619: 0x89DB, + 15620: 0x89DD, + 15621: 0x89DF, + 15622: 0x89E0, + 15623: 0x89E1, + 15624: 0x89E2, + 15625: 0x89E4, + 15626: 0x89E7, + 15627: 0x89E8, + 15628: 0x89E9, + 15629: 0x89EA, + 15630: 0x89EC, + 15631: 0x89ED, + 15632: 0x89EE, + 15633: 0x89F0, + 15634: 0x89F1, + 15635: 0x89F2, + 15636: 0x89F4, + 15637: 0x89F5, + 15638: 0x89F6, + 15639: 0x89F7, + 15640: 0x89F8, + 15641: 0x89F9, + 15642: 0x89FA, + 15643: 0x89FB, + 15644: 0x89FC, + 15645: 0x89FD, + 15646: 0x89FE, + 15647: 0x89FF, + 15648: 0x8A01, + 15649: 0x8A02, + 15650: 0x8A03, + 15651: 0x8A04, + 15652: 0x8A05, + 15653: 0x8A06, + 15654: 0x8A08, + 15655: 0x8A09, + 15656: 0x8A0A, + 15657: 0x8A0B, + 15658: 0x8A0C, + 15659: 0x8A0D, + 15660: 0x8A0E, + 15661: 0x8A0F, + 15662: 0x8A10, + 15663: 0x8A11, + 15664: 0x8A12, + 15665: 0x8A13, + 15666: 0x8A14, + 15667: 0x8A15, + 15668: 0x8A16, + 15669: 0x8A17, + 15670: 0x8A18, + 15671: 0x8A19, + 15672: 0x8A1A, + 15673: 0x8A1B, + 15674: 0x8A1C, + 15675: 0x8A1D, + 15676: 0x5370, + 15677: 0x82F1, + 15678: 0x6A31, + 15679: 0x5A74, + 15680: 0x9E70, + 15681: 0x5E94, + 15682: 0x7F28, + 15683: 0x83B9, + 15684: 0x8424, + 15685: 0x8425, + 15686: 0x8367, + 15687: 0x8747, + 15688: 0x8FCE, + 15689: 0x8D62, + 15690: 0x76C8, + 15691: 0x5F71, + 15692: 0x9896, + 15693: 0x786C, + 15694: 0x6620, + 15695: 0x54DF, + 15696: 0x62E5, + 15697: 0x4F63, + 15698: 0x81C3, + 15699: 0x75C8, + 15700: 0x5EB8, + 15701: 0x96CD, + 15702: 0x8E0A, + 15703: 0x86F9, + 15704: 0x548F, + 15705: 0x6CF3, + 15706: 0x6D8C, + 15707: 0x6C38, + 15708: 0x607F, + 15709: 0x52C7, + 15710: 0x7528, + 15711: 0x5E7D, + 15712: 0x4F18, + 15713: 0x60A0, + 15714: 0x5FE7, + 15715: 0x5C24, + 15716: 0x7531, + 15717: 0x90AE, + 15718: 0x94C0, + 15719: 0x72B9, + 15720: 0x6CB9, + 15721: 0x6E38, + 15722: 0x9149, + 15723: 0x6709, + 15724: 0x53CB, + 15725: 0x53F3, + 15726: 0x4F51, + 15727: 0x91C9, + 15728: 0x8BF1, + 15729: 0x53C8, + 15730: 0x5E7C, + 15731: 0x8FC2, + 15732: 0x6DE4, + 15733: 0x4E8E, + 15734: 0x76C2, + 15735: 0x6986, + 15736: 0x865E, + 15737: 0x611A, + 15738: 0x8206, + 15739: 0x4F59, + 15740: 0x4FDE, + 15741: 0x903E, + 15742: 0x9C7C, + 15743: 0x6109, + 15744: 0x6E1D, + 15745: 0x6E14, + 15746: 0x9685, + 15747: 0x4E88, + 15748: 0x5A31, + 15749: 0x96E8, + 15750: 0x4E0E, + 15751: 0x5C7F, + 15752: 0x79B9, + 15753: 0x5B87, + 15754: 0x8BED, + 15755: 0x7FBD, + 15756: 0x7389, + 15757: 0x57DF, + 15758: 0x828B, + 15759: 0x90C1, + 15760: 0x5401, + 15761: 0x9047, + 15762: 0x55BB, + 15763: 0x5CEA, + 15764: 0x5FA1, + 15765: 0x6108, + 15766: 0x6B32, + 15767: 0x72F1, + 15768: 0x80B2, + 15769: 0x8A89, + 15770: 0x8A1E, + 15771: 0x8A1F, + 15772: 0x8A20, + 15773: 0x8A21, + 15774: 0x8A22, + 15775: 0x8A23, + 15776: 0x8A24, + 15777: 0x8A25, + 15778: 0x8A26, + 15779: 0x8A27, + 15780: 0x8A28, + 15781: 0x8A29, + 15782: 0x8A2A, + 15783: 0x8A2B, + 15784: 0x8A2C, + 15785: 0x8A2D, + 15786: 0x8A2E, + 15787: 0x8A2F, + 15788: 0x8A30, + 15789: 0x8A31, + 15790: 0x8A32, + 15791: 0x8A33, + 15792: 0x8A34, + 15793: 0x8A35, + 15794: 0x8A36, + 15795: 0x8A37, + 15796: 0x8A38, + 15797: 0x8A39, + 15798: 0x8A3A, + 15799: 0x8A3B, + 15800: 0x8A3C, + 15801: 0x8A3D, + 15802: 0x8A3F, + 15803: 0x8A40, + 15804: 0x8A41, + 15805: 0x8A42, + 15806: 0x8A43, + 15807: 0x8A44, + 15808: 0x8A45, + 15809: 0x8A46, + 15810: 0x8A47, + 15811: 0x8A49, + 15812: 0x8A4A, + 15813: 0x8A4B, + 15814: 0x8A4C, + 15815: 0x8A4D, + 15816: 0x8A4E, + 15817: 0x8A4F, + 15818: 0x8A50, + 15819: 0x8A51, + 15820: 0x8A52, + 15821: 0x8A53, + 15822: 0x8A54, + 15823: 0x8A55, + 15824: 0x8A56, + 15825: 0x8A57, + 15826: 0x8A58, + 15827: 0x8A59, + 15828: 0x8A5A, + 15829: 0x8A5B, + 15830: 0x8A5C, + 15831: 0x8A5D, + 15832: 0x8A5E, + 15833: 0x8A5F, + 15834: 0x8A60, + 15835: 0x8A61, + 15836: 0x8A62, + 15837: 0x8A63, + 15838: 0x8A64, + 15839: 0x8A65, + 15840: 0x8A66, + 15841: 0x8A67, + 15842: 0x8A68, + 15843: 0x8A69, + 15844: 0x8A6A, + 15845: 0x8A6B, + 15846: 0x8A6C, + 15847: 0x8A6D, + 15848: 0x8A6E, + 15849: 0x8A6F, + 15850: 0x8A70, + 15851: 0x8A71, + 15852: 0x8A72, + 15853: 0x8A73, + 15854: 0x8A74, + 15855: 0x8A75, + 15856: 0x8A76, + 15857: 0x8A77, + 15858: 0x8A78, + 15859: 0x8A7A, + 15860: 0x8A7B, + 15861: 0x8A7C, + 15862: 0x8A7D, + 15863: 0x8A7E, + 15864: 0x8A7F, + 15865: 0x8A80, + 15866: 0x6D74, + 15867: 0x5BD3, + 15868: 0x88D5, + 15869: 0x9884, + 15870: 0x8C6B, + 15871: 0x9A6D, + 15872: 0x9E33, + 15873: 0x6E0A, + 15874: 0x51A4, + 15875: 0x5143, + 15876: 0x57A3, + 15877: 0x8881, + 15878: 0x539F, + 15879: 0x63F4, + 15880: 0x8F95, + 15881: 0x56ED, + 15882: 0x5458, + 15883: 0x5706, + 15884: 0x733F, + 15885: 0x6E90, + 15886: 0x7F18, + 15887: 0x8FDC, + 15888: 0x82D1, + 15889: 0x613F, + 15890: 0x6028, + 15891: 0x9662, + 15892: 0x66F0, + 15893: 0x7EA6, + 15894: 0x8D8A, + 15895: 0x8DC3, + 15896: 0x94A5, + 15897: 0x5CB3, + 15898: 0x7CA4, + 15899: 0x6708, + 15900: 0x60A6, + 15901: 0x9605, + 15902: 0x8018, + 15903: 0x4E91, + 15904: 0x90E7, + 15905: 0x5300, + 15906: 0x9668, + 15907: 0x5141, + 15908: 0x8FD0, + 15909: 0x8574, + 15910: 0x915D, + 15911: 0x6655, + 15912: 0x97F5, + 15913: 0x5B55, + 15914: 0x531D, + 15915: 0x7838, + 15916: 0x6742, + 15917: 0x683D, + 15918: 0x54C9, + 15919: 0x707E, + 15920: 0x5BB0, + 15921: 0x8F7D, + 15922: 0x518D, + 15923: 0x5728, + 15924: 0x54B1, + 15925: 0x6512, + 15926: 0x6682, + 15927: 0x8D5E, + 15928: 0x8D43, + 15929: 0x810F, + 15930: 0x846C, + 15931: 0x906D, + 15932: 0x7CDF, + 15933: 0x51FF, + 15934: 0x85FB, + 15935: 0x67A3, + 15936: 0x65E9, + 15937: 0x6FA1, + 15938: 0x86A4, + 15939: 0x8E81, + 15940: 0x566A, + 15941: 0x9020, + 15942: 0x7682, + 15943: 0x7076, + 15944: 0x71E5, + 15945: 0x8D23, + 15946: 0x62E9, + 15947: 0x5219, + 15948: 0x6CFD, + 15949: 0x8D3C, + 15950: 0x600E, + 15951: 0x589E, + 15952: 0x618E, + 15953: 0x66FE, + 15954: 0x8D60, + 15955: 0x624E, + 15956: 0x55B3, + 15957: 0x6E23, + 15958: 0x672D, + 15959: 0x8F67, + 15960: 0x8A81, + 15961: 0x8A82, + 15962: 0x8A83, + 15963: 0x8A84, + 15964: 0x8A85, + 15965: 0x8A86, + 15966: 0x8A87, + 15967: 0x8A88, + 15968: 0x8A8B, + 15969: 0x8A8C, + 15970: 0x8A8D, + 15971: 0x8A8E, + 15972: 0x8A8F, + 15973: 0x8A90, + 15974: 0x8A91, + 15975: 0x8A92, + 15976: 0x8A94, + 15977: 0x8A95, + 15978: 0x8A96, + 15979: 0x8A97, + 15980: 0x8A98, + 15981: 0x8A99, + 15982: 0x8A9A, + 15983: 0x8A9B, + 15984: 0x8A9C, + 15985: 0x8A9D, + 15986: 0x8A9E, + 15987: 0x8A9F, + 15988: 0x8AA0, + 15989: 0x8AA1, + 15990: 0x8AA2, + 15991: 0x8AA3, + 15992: 0x8AA4, + 15993: 0x8AA5, + 15994: 0x8AA6, + 15995: 0x8AA7, + 15996: 0x8AA8, + 15997: 0x8AA9, + 15998: 0x8AAA, + 15999: 0x8AAB, + 16000: 0x8AAC, + 16001: 0x8AAD, + 16002: 0x8AAE, + 16003: 0x8AAF, + 16004: 0x8AB0, + 16005: 0x8AB1, + 16006: 0x8AB2, + 16007: 0x8AB3, + 16008: 0x8AB4, + 16009: 0x8AB5, + 16010: 0x8AB6, + 16011: 0x8AB7, + 16012: 0x8AB8, + 16013: 0x8AB9, + 16014: 0x8ABA, + 16015: 0x8ABB, + 16016: 0x8ABC, + 16017: 0x8ABD, + 16018: 0x8ABE, + 16019: 0x8ABF, + 16020: 0x8AC0, + 16021: 0x8AC1, + 16022: 0x8AC2, + 16023: 0x8AC3, + 16024: 0x8AC4, + 16025: 0x8AC5, + 16026: 0x8AC6, + 16027: 0x8AC7, + 16028: 0x8AC8, + 16029: 0x8AC9, + 16030: 0x8ACA, + 16031: 0x8ACB, + 16032: 0x8ACC, + 16033: 0x8ACD, + 16034: 0x8ACE, + 16035: 0x8ACF, + 16036: 0x8AD0, + 16037: 0x8AD1, + 16038: 0x8AD2, + 16039: 0x8AD3, + 16040: 0x8AD4, + 16041: 0x8AD5, + 16042: 0x8AD6, + 16043: 0x8AD7, + 16044: 0x8AD8, + 16045: 0x8AD9, + 16046: 0x8ADA, + 16047: 0x8ADB, + 16048: 0x8ADC, + 16049: 0x8ADD, + 16050: 0x8ADE, + 16051: 0x8ADF, + 16052: 0x8AE0, + 16053: 0x8AE1, + 16054: 0x8AE2, + 16055: 0x8AE3, + 16056: 0x94E1, + 16057: 0x95F8, + 16058: 0x7728, + 16059: 0x6805, + 16060: 0x69A8, + 16061: 0x548B, + 16062: 0x4E4D, + 16063: 0x70B8, + 16064: 0x8BC8, + 16065: 0x6458, + 16066: 0x658B, + 16067: 0x5B85, + 16068: 0x7A84, + 16069: 0x503A, + 16070: 0x5BE8, + 16071: 0x77BB, + 16072: 0x6BE1, + 16073: 0x8A79, + 16074: 0x7C98, + 16075: 0x6CBE, + 16076: 0x76CF, + 16077: 0x65A9, + 16078: 0x8F97, + 16079: 0x5D2D, + 16080: 0x5C55, + 16081: 0x8638, + 16082: 0x6808, + 16083: 0x5360, + 16084: 0x6218, + 16085: 0x7AD9, + 16086: 0x6E5B, + 16087: 0x7EFD, + 16088: 0x6A1F, + 16089: 0x7AE0, + 16090: 0x5F70, + 16091: 0x6F33, + 16092: 0x5F20, + 16093: 0x638C, + 16094: 0x6DA8, + 16095: 0x6756, + 16096: 0x4E08, + 16097: 0x5E10, + 16098: 0x8D26, + 16099: 0x4ED7, + 16100: 0x80C0, + 16101: 0x7634, + 16102: 0x969C, + 16103: 0x62DB, + 16104: 0x662D, + 16105: 0x627E, + 16106: 0x6CBC, + 16107: 0x8D75, + 16108: 0x7167, + 16109: 0x7F69, + 16110: 0x5146, + 16111: 0x8087, + 16112: 0x53EC, + 16113: 0x906E, + 16114: 0x6298, + 16115: 0x54F2, + 16116: 0x86F0, + 16117: 0x8F99, + 16118: 0x8005, + 16119: 0x9517, + 16120: 0x8517, + 16121: 0x8FD9, + 16122: 0x6D59, + 16123: 0x73CD, + 16124: 0x659F, + 16125: 0x771F, + 16126: 0x7504, + 16127: 0x7827, + 16128: 0x81FB, + 16129: 0x8D1E, + 16130: 0x9488, + 16131: 0x4FA6, + 16132: 0x6795, + 16133: 0x75B9, + 16134: 0x8BCA, + 16135: 0x9707, + 16136: 0x632F, + 16137: 0x9547, + 16138: 0x9635, + 16139: 0x84B8, + 16140: 0x6323, + 16141: 0x7741, + 16142: 0x5F81, + 16143: 0x72F0, + 16144: 0x4E89, + 16145: 0x6014, + 16146: 0x6574, + 16147: 0x62EF, + 16148: 0x6B63, + 16149: 0x653F, + 16150: 0x8AE4, + 16151: 0x8AE5, + 16152: 0x8AE6, + 16153: 0x8AE7, + 16154: 0x8AE8, + 16155: 0x8AE9, + 16156: 0x8AEA, + 16157: 0x8AEB, + 16158: 0x8AEC, + 16159: 0x8AED, + 16160: 0x8AEE, + 16161: 0x8AEF, + 16162: 0x8AF0, + 16163: 0x8AF1, + 16164: 0x8AF2, + 16165: 0x8AF3, + 16166: 0x8AF4, + 16167: 0x8AF5, + 16168: 0x8AF6, + 16169: 0x8AF7, + 16170: 0x8AF8, + 16171: 0x8AF9, + 16172: 0x8AFA, + 16173: 0x8AFB, + 16174: 0x8AFC, + 16175: 0x8AFD, + 16176: 0x8AFE, + 16177: 0x8AFF, + 16178: 0x8B00, + 16179: 0x8B01, + 16180: 0x8B02, + 16181: 0x8B03, + 16182: 0x8B04, + 16183: 0x8B05, + 16184: 0x8B06, + 16185: 0x8B08, + 16186: 0x8B09, + 16187: 0x8B0A, + 16188: 0x8B0B, + 16189: 0x8B0C, + 16190: 0x8B0D, + 16191: 0x8B0E, + 16192: 0x8B0F, + 16193: 0x8B10, + 16194: 0x8B11, + 16195: 0x8B12, + 16196: 0x8B13, + 16197: 0x8B14, + 16198: 0x8B15, + 16199: 0x8B16, + 16200: 0x8B17, + 16201: 0x8B18, + 16202: 0x8B19, + 16203: 0x8B1A, + 16204: 0x8B1B, + 16205: 0x8B1C, + 16206: 0x8B1D, + 16207: 0x8B1E, + 16208: 0x8B1F, + 16209: 0x8B20, + 16210: 0x8B21, + 16211: 0x8B22, + 16212: 0x8B23, + 16213: 0x8B24, + 16214: 0x8B25, + 16215: 0x8B27, + 16216: 0x8B28, + 16217: 0x8B29, + 16218: 0x8B2A, + 16219: 0x8B2B, + 16220: 0x8B2C, + 16221: 0x8B2D, + 16222: 0x8B2E, + 16223: 0x8B2F, + 16224: 0x8B30, + 16225: 0x8B31, + 16226: 0x8B32, + 16227: 0x8B33, + 16228: 0x8B34, + 16229: 0x8B35, + 16230: 0x8B36, + 16231: 0x8B37, + 16232: 0x8B38, + 16233: 0x8B39, + 16234: 0x8B3A, + 16235: 0x8B3B, + 16236: 0x8B3C, + 16237: 0x8B3D, + 16238: 0x8B3E, + 16239: 0x8B3F, + 16240: 0x8B40, + 16241: 0x8B41, + 16242: 0x8B42, + 16243: 0x8B43, + 16244: 0x8B44, + 16245: 0x8B45, + 16246: 0x5E27, + 16247: 0x75C7, + 16248: 0x90D1, + 16249: 0x8BC1, + 16250: 0x829D, + 16251: 0x679D, + 16252: 0x652F, + 16253: 0x5431, + 16254: 0x8718, + 16255: 0x77E5, + 16256: 0x80A2, + 16257: 0x8102, + 16258: 0x6C41, + 16259: 0x4E4B, + 16260: 0x7EC7, + 16261: 0x804C, + 16262: 0x76F4, + 16263: 0x690D, + 16264: 0x6B96, + 16265: 0x6267, + 16266: 0x503C, + 16267: 0x4F84, + 16268: 0x5740, + 16269: 0x6307, + 16270: 0x6B62, + 16271: 0x8DBE, + 16272: 0x53EA, + 16273: 0x65E8, + 16274: 0x7EB8, + 16275: 0x5FD7, + 16276: 0x631A, + 16277: 0x63B7, + 16278: 0x81F3, + 16279: 0x81F4, + 16280: 0x7F6E, + 16281: 0x5E1C, + 16282: 0x5CD9, + 16283: 0x5236, + 16284: 0x667A, + 16285: 0x79E9, + 16286: 0x7A1A, + 16287: 0x8D28, + 16288: 0x7099, + 16289: 0x75D4, + 16290: 0x6EDE, + 16291: 0x6CBB, + 16292: 0x7A92, + 16293: 0x4E2D, + 16294: 0x76C5, + 16295: 0x5FE0, + 16296: 0x949F, + 16297: 0x8877, + 16298: 0x7EC8, + 16299: 0x79CD, + 16300: 0x80BF, + 16301: 0x91CD, + 16302: 0x4EF2, + 16303: 0x4F17, + 16304: 0x821F, + 16305: 0x5468, + 16306: 0x5DDE, + 16307: 0x6D32, + 16308: 0x8BCC, + 16309: 0x7CA5, + 16310: 0x8F74, + 16311: 0x8098, + 16312: 0x5E1A, + 16313: 0x5492, + 16314: 0x76B1, + 16315: 0x5B99, + 16316: 0x663C, + 16317: 0x9AA4, + 16318: 0x73E0, + 16319: 0x682A, + 16320: 0x86DB, + 16321: 0x6731, + 16322: 0x732A, + 16323: 0x8BF8, + 16324: 0x8BDB, + 16325: 0x9010, + 16326: 0x7AF9, + 16327: 0x70DB, + 16328: 0x716E, + 16329: 0x62C4, + 16330: 0x77A9, + 16331: 0x5631, + 16332: 0x4E3B, + 16333: 0x8457, + 16334: 0x67F1, + 16335: 0x52A9, + 16336: 0x86C0, + 16337: 0x8D2E, + 16338: 0x94F8, + 16339: 0x7B51, + 16340: 0x8B46, + 16341: 0x8B47, + 16342: 0x8B48, + 16343: 0x8B49, + 16344: 0x8B4A, + 16345: 0x8B4B, + 16346: 0x8B4C, + 16347: 0x8B4D, + 16348: 0x8B4E, + 16349: 0x8B4F, + 16350: 0x8B50, + 16351: 0x8B51, + 16352: 0x8B52, + 16353: 0x8B53, + 16354: 0x8B54, + 16355: 0x8B55, + 16356: 0x8B56, + 16357: 0x8B57, + 16358: 0x8B58, + 16359: 0x8B59, + 16360: 0x8B5A, + 16361: 0x8B5B, + 16362: 0x8B5C, + 16363: 0x8B5D, + 16364: 0x8B5E, + 16365: 0x8B5F, + 16366: 0x8B60, + 16367: 0x8B61, + 16368: 0x8B62, + 16369: 0x8B63, + 16370: 0x8B64, + 16371: 0x8B65, + 16372: 0x8B67, + 16373: 0x8B68, + 16374: 0x8B69, + 16375: 0x8B6A, + 16376: 0x8B6B, + 16377: 0x8B6D, + 16378: 0x8B6E, + 16379: 0x8B6F, + 16380: 0x8B70, + 16381: 0x8B71, + 16382: 0x8B72, + 16383: 0x8B73, + 16384: 0x8B74, + 16385: 0x8B75, + 16386: 0x8B76, + 16387: 0x8B77, + 16388: 0x8B78, + 16389: 0x8B79, + 16390: 0x8B7A, + 16391: 0x8B7B, + 16392: 0x8B7C, + 16393: 0x8B7D, + 16394: 0x8B7E, + 16395: 0x8B7F, + 16396: 0x8B80, + 16397: 0x8B81, + 16398: 0x8B82, + 16399: 0x8B83, + 16400: 0x8B84, + 16401: 0x8B85, + 16402: 0x8B86, + 16403: 0x8B87, + 16404: 0x8B88, + 16405: 0x8B89, + 16406: 0x8B8A, + 16407: 0x8B8B, + 16408: 0x8B8C, + 16409: 0x8B8D, + 16410: 0x8B8E, + 16411: 0x8B8F, + 16412: 0x8B90, + 16413: 0x8B91, + 16414: 0x8B92, + 16415: 0x8B93, + 16416: 0x8B94, + 16417: 0x8B95, + 16418: 0x8B96, + 16419: 0x8B97, + 16420: 0x8B98, + 16421: 0x8B99, + 16422: 0x8B9A, + 16423: 0x8B9B, + 16424: 0x8B9C, + 16425: 0x8B9D, + 16426: 0x8B9E, + 16427: 0x8B9F, + 16428: 0x8BAC, + 16429: 0x8BB1, + 16430: 0x8BBB, + 16431: 0x8BC7, + 16432: 0x8BD0, + 16433: 0x8BEA, + 16434: 0x8C09, + 16435: 0x8C1E, + 16436: 0x4F4F, + 16437: 0x6CE8, + 16438: 0x795D, + 16439: 0x9A7B, + 16440: 0x6293, + 16441: 0x722A, + 16442: 0x62FD, + 16443: 0x4E13, + 16444: 0x7816, + 16445: 0x8F6C, + 16446: 0x64B0, + 16447: 0x8D5A, + 16448: 0x7BC6, + 16449: 0x6869, + 16450: 0x5E84, + 16451: 0x88C5, + 16452: 0x5986, + 16453: 0x649E, + 16454: 0x58EE, + 16455: 0x72B6, + 16456: 0x690E, + 16457: 0x9525, + 16458: 0x8FFD, + 16459: 0x8D58, + 16460: 0x5760, + 16461: 0x7F00, + 16462: 0x8C06, + 16463: 0x51C6, + 16464: 0x6349, + 16465: 0x62D9, + 16466: 0x5353, + 16467: 0x684C, + 16468: 0x7422, + 16469: 0x8301, + 16470: 0x914C, + 16471: 0x5544, + 16472: 0x7740, + 16473: 0x707C, + 16474: 0x6D4A, + 16475: 0x5179, + 16476: 0x54A8, + 16477: 0x8D44, + 16478: 0x59FF, + 16479: 0x6ECB, + 16480: 0x6DC4, + 16481: 0x5B5C, + 16482: 0x7D2B, + 16483: 0x4ED4, + 16484: 0x7C7D, + 16485: 0x6ED3, + 16486: 0x5B50, + 16487: 0x81EA, + 16488: 0x6E0D, + 16489: 0x5B57, + 16490: 0x9B03, + 16491: 0x68D5, + 16492: 0x8E2A, + 16493: 0x5B97, + 16494: 0x7EFC, + 16495: 0x603B, + 16496: 0x7EB5, + 16497: 0x90B9, + 16498: 0x8D70, + 16499: 0x594F, + 16500: 0x63CD, + 16501: 0x79DF, + 16502: 0x8DB3, + 16503: 0x5352, + 16504: 0x65CF, + 16505: 0x7956, + 16506: 0x8BC5, + 16507: 0x963B, + 16508: 0x7EC4, + 16509: 0x94BB, + 16510: 0x7E82, + 16511: 0x5634, + 16512: 0x9189, + 16513: 0x6700, + 16514: 0x7F6A, + 16515: 0x5C0A, + 16516: 0x9075, + 16517: 0x6628, + 16518: 0x5DE6, + 16519: 0x4F50, + 16520: 0x67DE, + 16521: 0x505A, + 16522: 0x4F5C, + 16523: 0x5750, + 16524: 0x5EA7, + 16530: 0x8C38, + 16531: 0x8C39, + 16532: 0x8C3A, + 16533: 0x8C3B, + 16534: 0x8C3C, + 16535: 0x8C3D, + 16536: 0x8C3E, + 16537: 0x8C3F, + 16538: 0x8C40, + 16539: 0x8C42, + 16540: 0x8C43, + 16541: 0x8C44, + 16542: 0x8C45, + 16543: 0x8C48, + 16544: 0x8C4A, + 16545: 0x8C4B, + 16546: 0x8C4D, + 16547: 0x8C4E, + 16548: 0x8C4F, + 16549: 0x8C50, + 16550: 0x8C51, + 16551: 0x8C52, + 16552: 0x8C53, + 16553: 0x8C54, + 16554: 0x8C56, + 16555: 0x8C57, + 16556: 0x8C58, + 16557: 0x8C59, + 16558: 0x8C5B, + 16559: 0x8C5C, + 16560: 0x8C5D, + 16561: 0x8C5E, + 16562: 0x8C5F, + 16563: 0x8C60, + 16564: 0x8C63, + 16565: 0x8C64, + 16566: 0x8C65, + 16567: 0x8C66, + 16568: 0x8C67, + 16569: 0x8C68, + 16570: 0x8C69, + 16571: 0x8C6C, + 16572: 0x8C6D, + 16573: 0x8C6E, + 16574: 0x8C6F, + 16575: 0x8C70, + 16576: 0x8C71, + 16577: 0x8C72, + 16578: 0x8C74, + 16579: 0x8C75, + 16580: 0x8C76, + 16581: 0x8C77, + 16582: 0x8C7B, + 16583: 0x8C7C, + 16584: 0x8C7D, + 16585: 0x8C7E, + 16586: 0x8C7F, + 16587: 0x8C80, + 16588: 0x8C81, + 16589: 0x8C83, + 16590: 0x8C84, + 16591: 0x8C86, + 16592: 0x8C87, + 16593: 0x8C88, + 16594: 0x8C8B, + 16595: 0x8C8D, + 16596: 0x8C8E, + 16597: 0x8C8F, + 16598: 0x8C90, + 16599: 0x8C91, + 16600: 0x8C92, + 16601: 0x8C93, + 16602: 0x8C95, + 16603: 0x8C96, + 16604: 0x8C97, + 16605: 0x8C99, + 16606: 0x8C9A, + 16607: 0x8C9B, + 16608: 0x8C9C, + 16609: 0x8C9D, + 16610: 0x8C9E, + 16611: 0x8C9F, + 16612: 0x8CA0, + 16613: 0x8CA1, + 16614: 0x8CA2, + 16615: 0x8CA3, + 16616: 0x8CA4, + 16617: 0x8CA5, + 16618: 0x8CA6, + 16619: 0x8CA7, + 16620: 0x8CA8, + 16621: 0x8CA9, + 16622: 0x8CAA, + 16623: 0x8CAB, + 16624: 0x8CAC, + 16625: 0x8CAD, + 16626: 0x4E8D, + 16627: 0x4E0C, + 16628: 0x5140, + 16629: 0x4E10, + 16630: 0x5EFF, + 16631: 0x5345, + 16632: 0x4E15, + 16633: 0x4E98, + 16634: 0x4E1E, + 16635: 0x9B32, + 16636: 0x5B6C, + 16637: 0x5669, + 16638: 0x4E28, + 16639: 0x79BA, + 16640: 0x4E3F, + 16641: 0x5315, + 16642: 0x4E47, + 16643: 0x592D, + 16644: 0x723B, + 16645: 0x536E, + 16646: 0x6C10, + 16647: 0x56DF, + 16648: 0x80E4, + 16649: 0x9997, + 16650: 0x6BD3, + 16651: 0x777E, + 16652: 0x9F17, + 16653: 0x4E36, + 16654: 0x4E9F, + 16655: 0x9F10, + 16656: 0x4E5C, + 16657: 0x4E69, + 16658: 0x4E93, + 16659: 0x8288, + 16660: 0x5B5B, + 16661: 0x556C, + 16662: 0x560F, + 16663: 0x4EC4, + 16664: 0x538D, + 16665: 0x539D, + 16666: 0x53A3, + 16667: 0x53A5, + 16668: 0x53AE, + 16669: 0x9765, + 16670: 0x8D5D, + 16671: 0x531A, + 16672: 0x53F5, + 16673: 0x5326, + 16674: 0x532E, + 16675: 0x533E, + 16676: 0x8D5C, + 16677: 0x5366, + 16678: 0x5363, + 16679: 0x5202, + 16680: 0x5208, + 16681: 0x520E, + 16682: 0x522D, + 16683: 0x5233, + 16684: 0x523F, + 16685: 0x5240, + 16686: 0x524C, + 16687: 0x525E, + 16688: 0x5261, + 16689: 0x525C, + 16690: 0x84AF, + 16691: 0x527D, + 16692: 0x5282, + 16693: 0x5281, + 16694: 0x5290, + 16695: 0x5293, + 16696: 0x5182, + 16697: 0x7F54, + 16698: 0x4EBB, + 16699: 0x4EC3, + 16700: 0x4EC9, + 16701: 0x4EC2, + 16702: 0x4EE8, + 16703: 0x4EE1, + 16704: 0x4EEB, + 16705: 0x4EDE, + 16706: 0x4F1B, + 16707: 0x4EF3, + 16708: 0x4F22, + 16709: 0x4F64, + 16710: 0x4EF5, + 16711: 0x4F25, + 16712: 0x4F27, + 16713: 0x4F09, + 16714: 0x4F2B, + 16715: 0x4F5E, + 16716: 0x4F67, + 16717: 0x6538, + 16718: 0x4F5A, + 16719: 0x4F5D, + 16720: 0x8CAE, + 16721: 0x8CAF, + 16722: 0x8CB0, + 16723: 0x8CB1, + 16724: 0x8CB2, + 16725: 0x8CB3, + 16726: 0x8CB4, + 16727: 0x8CB5, + 16728: 0x8CB6, + 16729: 0x8CB7, + 16730: 0x8CB8, + 16731: 0x8CB9, + 16732: 0x8CBA, + 16733: 0x8CBB, + 16734: 0x8CBC, + 16735: 0x8CBD, + 16736: 0x8CBE, + 16737: 0x8CBF, + 16738: 0x8CC0, + 16739: 0x8CC1, + 16740: 0x8CC2, + 16741: 0x8CC3, + 16742: 0x8CC4, + 16743: 0x8CC5, + 16744: 0x8CC6, + 16745: 0x8CC7, + 16746: 0x8CC8, + 16747: 0x8CC9, + 16748: 0x8CCA, + 16749: 0x8CCB, + 16750: 0x8CCC, + 16751: 0x8CCD, + 16752: 0x8CCE, + 16753: 0x8CCF, + 16754: 0x8CD0, + 16755: 0x8CD1, + 16756: 0x8CD2, + 16757: 0x8CD3, + 16758: 0x8CD4, + 16759: 0x8CD5, + 16760: 0x8CD6, + 16761: 0x8CD7, + 16762: 0x8CD8, + 16763: 0x8CD9, + 16764: 0x8CDA, + 16765: 0x8CDB, + 16766: 0x8CDC, + 16767: 0x8CDD, + 16768: 0x8CDE, + 16769: 0x8CDF, + 16770: 0x8CE0, + 16771: 0x8CE1, + 16772: 0x8CE2, + 16773: 0x8CE3, + 16774: 0x8CE4, + 16775: 0x8CE5, + 16776: 0x8CE6, + 16777: 0x8CE7, + 16778: 0x8CE8, + 16779: 0x8CE9, + 16780: 0x8CEA, + 16781: 0x8CEB, + 16782: 0x8CEC, + 16783: 0x8CED, + 16784: 0x8CEE, + 16785: 0x8CEF, + 16786: 0x8CF0, + 16787: 0x8CF1, + 16788: 0x8CF2, + 16789: 0x8CF3, + 16790: 0x8CF4, + 16791: 0x8CF5, + 16792: 0x8CF6, + 16793: 0x8CF7, + 16794: 0x8CF8, + 16795: 0x8CF9, + 16796: 0x8CFA, + 16797: 0x8CFB, + 16798: 0x8CFC, + 16799: 0x8CFD, + 16800: 0x8CFE, + 16801: 0x8CFF, + 16802: 0x8D00, + 16803: 0x8D01, + 16804: 0x8D02, + 16805: 0x8D03, + 16806: 0x8D04, + 16807: 0x8D05, + 16808: 0x8D06, + 16809: 0x8D07, + 16810: 0x8D08, + 16811: 0x8D09, + 16812: 0x8D0A, + 16813: 0x8D0B, + 16814: 0x8D0C, + 16815: 0x8D0D, + 16816: 0x4F5F, + 16817: 0x4F57, + 16818: 0x4F32, + 16819: 0x4F3D, + 16820: 0x4F76, + 16821: 0x4F74, + 16822: 0x4F91, + 16823: 0x4F89, + 16824: 0x4F83, + 16825: 0x4F8F, + 16826: 0x4F7E, + 16827: 0x4F7B, + 16828: 0x4FAA, + 16829: 0x4F7C, + 16830: 0x4FAC, + 16831: 0x4F94, + 16832: 0x4FE6, + 16833: 0x4FE8, + 16834: 0x4FEA, + 16835: 0x4FC5, + 16836: 0x4FDA, + 16837: 0x4FE3, + 16838: 0x4FDC, + 16839: 0x4FD1, + 16840: 0x4FDF, + 16841: 0x4FF8, + 16842: 0x5029, + 16843: 0x504C, + 16844: 0x4FF3, + 16845: 0x502C, + 16846: 0x500F, + 16847: 0x502E, + 16848: 0x502D, + 16849: 0x4FFE, + 16850: 0x501C, + 16851: 0x500C, + 16852: 0x5025, + 16853: 0x5028, + 16854: 0x507E, + 16855: 0x5043, + 16856: 0x5055, + 16857: 0x5048, + 16858: 0x504E, + 16859: 0x506C, + 16860: 0x507B, + 16861: 0x50A5, + 16862: 0x50A7, + 16863: 0x50A9, + 16864: 0x50BA, + 16865: 0x50D6, + 16866: 0x5106, + 16867: 0x50ED, + 16868: 0x50EC, + 16869: 0x50E6, + 16870: 0x50EE, + 16871: 0x5107, + 16872: 0x510B, + 16873: 0x4EDD, + 16874: 0x6C3D, + 16875: 0x4F58, + 16876: 0x4F65, + 16877: 0x4FCE, + 16878: 0x9FA0, + 16879: 0x6C46, + 16880: 0x7C74, + 16881: 0x516E, + 16882: 0x5DFD, + 16883: 0x9EC9, + 16884: 0x9998, + 16885: 0x5181, + 16886: 0x5914, + 16887: 0x52F9, + 16888: 0x530D, + 16889: 0x8A07, + 16890: 0x5310, + 16891: 0x51EB, + 16892: 0x5919, + 16893: 0x5155, + 16894: 0x4EA0, + 16895: 0x5156, + 16896: 0x4EB3, + 16897: 0x886E, + 16898: 0x88A4, + 16899: 0x4EB5, + 16900: 0x8114, + 16901: 0x88D2, + 16902: 0x7980, + 16903: 0x5B34, + 16904: 0x8803, + 16905: 0x7FB8, + 16906: 0x51AB, + 16907: 0x51B1, + 16908: 0x51BD, + 16909: 0x51BC, + 16910: 0x8D0E, + 16911: 0x8D0F, + 16912: 0x8D10, + 16913: 0x8D11, + 16914: 0x8D12, + 16915: 0x8D13, + 16916: 0x8D14, + 16917: 0x8D15, + 16918: 0x8D16, + 16919: 0x8D17, + 16920: 0x8D18, + 16921: 0x8D19, + 16922: 0x8D1A, + 16923: 0x8D1B, + 16924: 0x8D1C, + 16925: 0x8D20, + 16926: 0x8D51, + 16927: 0x8D52, + 16928: 0x8D57, + 16929: 0x8D5F, + 16930: 0x8D65, + 16931: 0x8D68, + 16932: 0x8D69, + 16933: 0x8D6A, + 16934: 0x8D6C, + 16935: 0x8D6E, + 16936: 0x8D6F, + 16937: 0x8D71, + 16938: 0x8D72, + 16939: 0x8D78, + 16940: 0x8D79, + 16941: 0x8D7A, + 16942: 0x8D7B, + 16943: 0x8D7C, + 16944: 0x8D7D, + 16945: 0x8D7E, + 16946: 0x8D7F, + 16947: 0x8D80, + 16948: 0x8D82, + 16949: 0x8D83, + 16950: 0x8D86, + 16951: 0x8D87, + 16952: 0x8D88, + 16953: 0x8D89, + 16954: 0x8D8C, + 16955: 0x8D8D, + 16956: 0x8D8E, + 16957: 0x8D8F, + 16958: 0x8D90, + 16959: 0x8D92, + 16960: 0x8D93, + 16961: 0x8D95, + 16962: 0x8D96, + 16963: 0x8D97, + 16964: 0x8D98, + 16965: 0x8D99, + 16966: 0x8D9A, + 16967: 0x8D9B, + 16968: 0x8D9C, + 16969: 0x8D9D, + 16970: 0x8D9E, + 16971: 0x8DA0, + 16972: 0x8DA1, + 16973: 0x8DA2, + 16974: 0x8DA4, + 16975: 0x8DA5, + 16976: 0x8DA6, + 16977: 0x8DA7, + 16978: 0x8DA8, + 16979: 0x8DA9, + 16980: 0x8DAA, + 16981: 0x8DAB, + 16982: 0x8DAC, + 16983: 0x8DAD, + 16984: 0x8DAE, + 16985: 0x8DAF, + 16986: 0x8DB0, + 16987: 0x8DB2, + 16988: 0x8DB6, + 16989: 0x8DB7, + 16990: 0x8DB9, + 16991: 0x8DBB, + 16992: 0x8DBD, + 16993: 0x8DC0, + 16994: 0x8DC1, + 16995: 0x8DC2, + 16996: 0x8DC5, + 16997: 0x8DC7, + 16998: 0x8DC8, + 16999: 0x8DC9, + 17000: 0x8DCA, + 17001: 0x8DCD, + 17002: 0x8DD0, + 17003: 0x8DD2, + 17004: 0x8DD3, + 17005: 0x8DD4, + 17006: 0x51C7, + 17007: 0x5196, + 17008: 0x51A2, + 17009: 0x51A5, + 17010: 0x8BA0, + 17011: 0x8BA6, + 17012: 0x8BA7, + 17013: 0x8BAA, + 17014: 0x8BB4, + 17015: 0x8BB5, + 17016: 0x8BB7, + 17017: 0x8BC2, + 17018: 0x8BC3, + 17019: 0x8BCB, + 17020: 0x8BCF, + 17021: 0x8BCE, + 17022: 0x8BD2, + 17023: 0x8BD3, + 17024: 0x8BD4, + 17025: 0x8BD6, + 17026: 0x8BD8, + 17027: 0x8BD9, + 17028: 0x8BDC, + 17029: 0x8BDF, + 17030: 0x8BE0, + 17031: 0x8BE4, + 17032: 0x8BE8, + 17033: 0x8BE9, + 17034: 0x8BEE, + 17035: 0x8BF0, + 17036: 0x8BF3, + 17037: 0x8BF6, + 17038: 0x8BF9, + 17039: 0x8BFC, + 17040: 0x8BFF, + 17041: 0x8C00, + 17042: 0x8C02, + 17043: 0x8C04, + 17044: 0x8C07, + 17045: 0x8C0C, + 17046: 0x8C0F, + 17047: 0x8C11, + 17048: 0x8C12, + 17049: 0x8C14, + 17050: 0x8C15, + 17051: 0x8C16, + 17052: 0x8C19, + 17053: 0x8C1B, + 17054: 0x8C18, + 17055: 0x8C1D, + 17056: 0x8C1F, + 17057: 0x8C20, + 17058: 0x8C21, + 17059: 0x8C25, + 17060: 0x8C27, + 17061: 0x8C2A, + 17062: 0x8C2B, + 17063: 0x8C2E, + 17064: 0x8C2F, + 17065: 0x8C32, + 17066: 0x8C33, + 17067: 0x8C35, + 17068: 0x8C36, + 17069: 0x5369, + 17070: 0x537A, + 17071: 0x961D, + 17072: 0x9622, + 17073: 0x9621, + 17074: 0x9631, + 17075: 0x962A, + 17076: 0x963D, + 17077: 0x963C, + 17078: 0x9642, + 17079: 0x9649, + 17080: 0x9654, + 17081: 0x965F, + 17082: 0x9667, + 17083: 0x966C, + 17084: 0x9672, + 17085: 0x9674, + 17086: 0x9688, + 17087: 0x968D, + 17088: 0x9697, + 17089: 0x96B0, + 17090: 0x9097, + 17091: 0x909B, + 17092: 0x909D, + 17093: 0x9099, + 17094: 0x90AC, + 17095: 0x90A1, + 17096: 0x90B4, + 17097: 0x90B3, + 17098: 0x90B6, + 17099: 0x90BA, + 17100: 0x8DD5, + 17101: 0x8DD8, + 17102: 0x8DD9, + 17103: 0x8DDC, + 17104: 0x8DE0, + 17105: 0x8DE1, + 17106: 0x8DE2, + 17107: 0x8DE5, + 17108: 0x8DE6, + 17109: 0x8DE7, + 17110: 0x8DE9, + 17111: 0x8DED, + 17112: 0x8DEE, + 17113: 0x8DF0, + 17114: 0x8DF1, + 17115: 0x8DF2, + 17116: 0x8DF4, + 17117: 0x8DF6, + 17118: 0x8DFC, + 17119: 0x8DFE, + 17120: 0x8DFF, + 17121: 0x8E00, + 17122: 0x8E01, + 17123: 0x8E02, + 17124: 0x8E03, + 17125: 0x8E04, + 17126: 0x8E06, + 17127: 0x8E07, + 17128: 0x8E08, + 17129: 0x8E0B, + 17130: 0x8E0D, + 17131: 0x8E0E, + 17132: 0x8E10, + 17133: 0x8E11, + 17134: 0x8E12, + 17135: 0x8E13, + 17136: 0x8E15, + 17137: 0x8E16, + 17138: 0x8E17, + 17139: 0x8E18, + 17140: 0x8E19, + 17141: 0x8E1A, + 17142: 0x8E1B, + 17143: 0x8E1C, + 17144: 0x8E20, + 17145: 0x8E21, + 17146: 0x8E24, + 17147: 0x8E25, + 17148: 0x8E26, + 17149: 0x8E27, + 17150: 0x8E28, + 17151: 0x8E2B, + 17152: 0x8E2D, + 17153: 0x8E30, + 17154: 0x8E32, + 17155: 0x8E33, + 17156: 0x8E34, + 17157: 0x8E36, + 17158: 0x8E37, + 17159: 0x8E38, + 17160: 0x8E3B, + 17161: 0x8E3C, + 17162: 0x8E3E, + 17163: 0x8E3F, + 17164: 0x8E43, + 17165: 0x8E45, + 17166: 0x8E46, + 17167: 0x8E4C, + 17168: 0x8E4D, + 17169: 0x8E4E, + 17170: 0x8E4F, + 17171: 0x8E50, + 17172: 0x8E53, + 17173: 0x8E54, + 17174: 0x8E55, + 17175: 0x8E56, + 17176: 0x8E57, + 17177: 0x8E58, + 17178: 0x8E5A, + 17179: 0x8E5B, + 17180: 0x8E5C, + 17181: 0x8E5D, + 17182: 0x8E5E, + 17183: 0x8E5F, + 17184: 0x8E60, + 17185: 0x8E61, + 17186: 0x8E62, + 17187: 0x8E63, + 17188: 0x8E64, + 17189: 0x8E65, + 17190: 0x8E67, + 17191: 0x8E68, + 17192: 0x8E6A, + 17193: 0x8E6B, + 17194: 0x8E6E, + 17195: 0x8E71, + 17196: 0x90B8, + 17197: 0x90B0, + 17198: 0x90CF, + 17199: 0x90C5, + 17200: 0x90BE, + 17201: 0x90D0, + 17202: 0x90C4, + 17203: 0x90C7, + 17204: 0x90D3, + 17205: 0x90E6, + 17206: 0x90E2, + 17207: 0x90DC, + 17208: 0x90D7, + 17209: 0x90DB, + 17210: 0x90EB, + 17211: 0x90EF, + 17212: 0x90FE, + 17213: 0x9104, + 17214: 0x9122, + 17215: 0x911E, + 17216: 0x9123, + 17217: 0x9131, + 17218: 0x912F, + 17219: 0x9139, + 17220: 0x9143, + 17221: 0x9146, + 17222: 0x520D, + 17223: 0x5942, + 17224: 0x52A2, + 17225: 0x52AC, + 17226: 0x52AD, + 17227: 0x52BE, + 17228: 0x54FF, + 17229: 0x52D0, + 17230: 0x52D6, + 17231: 0x52F0, + 17232: 0x53DF, + 17233: 0x71EE, + 17234: 0x77CD, + 17235: 0x5EF4, + 17236: 0x51F5, + 17237: 0x51FC, + 17238: 0x9B2F, + 17239: 0x53B6, + 17240: 0x5F01, + 17241: 0x755A, + 17242: 0x5DEF, + 17243: 0x574C, + 17244: 0x57A9, + 17245: 0x57A1, + 17246: 0x587E, + 17247: 0x58BC, + 17248: 0x58C5, + 17249: 0x58D1, + 17250: 0x5729, + 17251: 0x572C, + 17252: 0x572A, + 17253: 0x5733, + 17254: 0x5739, + 17255: 0x572E, + 17256: 0x572F, + 17257: 0x575C, + 17258: 0x573B, + 17259: 0x5742, + 17260: 0x5769, + 17261: 0x5785, + 17262: 0x576B, + 17263: 0x5786, + 17264: 0x577C, + 17265: 0x577B, + 17266: 0x5768, + 17267: 0x576D, + 17268: 0x5776, + 17269: 0x5773, + 17270: 0x57AD, + 17271: 0x57A4, + 17272: 0x578C, + 17273: 0x57B2, + 17274: 0x57CF, + 17275: 0x57A7, + 17276: 0x57B4, + 17277: 0x5793, + 17278: 0x57A0, + 17279: 0x57D5, + 17280: 0x57D8, + 17281: 0x57DA, + 17282: 0x57D9, + 17283: 0x57D2, + 17284: 0x57B8, + 17285: 0x57F4, + 17286: 0x57EF, + 17287: 0x57F8, + 17288: 0x57E4, + 17289: 0x57DD, + 17290: 0x8E73, + 17291: 0x8E75, + 17292: 0x8E77, + 17293: 0x8E78, + 17294: 0x8E79, + 17295: 0x8E7A, + 17296: 0x8E7B, + 17297: 0x8E7D, + 17298: 0x8E7E, + 17299: 0x8E80, + 17300: 0x8E82, + 17301: 0x8E83, + 17302: 0x8E84, + 17303: 0x8E86, + 17304: 0x8E88, + 17305: 0x8E89, + 17306: 0x8E8A, + 17307: 0x8E8B, + 17308: 0x8E8C, + 17309: 0x8E8D, + 17310: 0x8E8E, + 17311: 0x8E91, + 17312: 0x8E92, + 17313: 0x8E93, + 17314: 0x8E95, + 17315: 0x8E96, + 17316: 0x8E97, + 17317: 0x8E98, + 17318: 0x8E99, + 17319: 0x8E9A, + 17320: 0x8E9B, + 17321: 0x8E9D, + 17322: 0x8E9F, + 17323: 0x8EA0, + 17324: 0x8EA1, + 17325: 0x8EA2, + 17326: 0x8EA3, + 17327: 0x8EA4, + 17328: 0x8EA5, + 17329: 0x8EA6, + 17330: 0x8EA7, + 17331: 0x8EA8, + 17332: 0x8EA9, + 17333: 0x8EAA, + 17334: 0x8EAD, + 17335: 0x8EAE, + 17336: 0x8EB0, + 17337: 0x8EB1, + 17338: 0x8EB3, + 17339: 0x8EB4, + 17340: 0x8EB5, + 17341: 0x8EB6, + 17342: 0x8EB7, + 17343: 0x8EB8, + 17344: 0x8EB9, + 17345: 0x8EBB, + 17346: 0x8EBC, + 17347: 0x8EBD, + 17348: 0x8EBE, + 17349: 0x8EBF, + 17350: 0x8EC0, + 17351: 0x8EC1, + 17352: 0x8EC2, + 17353: 0x8EC3, + 17354: 0x8EC4, + 17355: 0x8EC5, + 17356: 0x8EC6, + 17357: 0x8EC7, + 17358: 0x8EC8, + 17359: 0x8EC9, + 17360: 0x8ECA, + 17361: 0x8ECB, + 17362: 0x8ECC, + 17363: 0x8ECD, + 17364: 0x8ECF, + 17365: 0x8ED0, + 17366: 0x8ED1, + 17367: 0x8ED2, + 17368: 0x8ED3, + 17369: 0x8ED4, + 17370: 0x8ED5, + 17371: 0x8ED6, + 17372: 0x8ED7, + 17373: 0x8ED8, + 17374: 0x8ED9, + 17375: 0x8EDA, + 17376: 0x8EDB, + 17377: 0x8EDC, + 17378: 0x8EDD, + 17379: 0x8EDE, + 17380: 0x8EDF, + 17381: 0x8EE0, + 17382: 0x8EE1, + 17383: 0x8EE2, + 17384: 0x8EE3, + 17385: 0x8EE4, + 17386: 0x580B, + 17387: 0x580D, + 17388: 0x57FD, + 17389: 0x57ED, + 17390: 0x5800, + 17391: 0x581E, + 17392: 0x5819, + 17393: 0x5844, + 17394: 0x5820, + 17395: 0x5865, + 17396: 0x586C, + 17397: 0x5881, + 17398: 0x5889, + 17399: 0x589A, + 17400: 0x5880, + 17401: 0x99A8, + 17402: 0x9F19, + 17403: 0x61FF, + 17404: 0x8279, + 17405: 0x827D, + 17406: 0x827F, + 17407: 0x828F, + 17408: 0x828A, + 17409: 0x82A8, + 17410: 0x8284, + 17411: 0x828E, + 17412: 0x8291, + 17413: 0x8297, + 17414: 0x8299, + 17415: 0x82AB, + 17416: 0x82B8, + 17417: 0x82BE, + 17418: 0x82B0, + 17419: 0x82C8, + 17420: 0x82CA, + 17421: 0x82E3, + 17422: 0x8298, + 17423: 0x82B7, + 17424: 0x82AE, + 17425: 0x82CB, + 17426: 0x82CC, + 17427: 0x82C1, + 17428: 0x82A9, + 17429: 0x82B4, + 17430: 0x82A1, + 17431: 0x82AA, + 17432: 0x829F, + 17433: 0x82C4, + 17434: 0x82CE, + 17435: 0x82A4, + 17436: 0x82E1, + 17437: 0x8309, + 17438: 0x82F7, + 17439: 0x82E4, + 17440: 0x830F, + 17441: 0x8307, + 17442: 0x82DC, + 17443: 0x82F4, + 17444: 0x82D2, + 17445: 0x82D8, + 17446: 0x830C, + 17447: 0x82FB, + 17448: 0x82D3, + 17449: 0x8311, + 17450: 0x831A, + 17451: 0x8306, + 17452: 0x8314, + 17453: 0x8315, + 17454: 0x82E0, + 17455: 0x82D5, + 17456: 0x831C, + 17457: 0x8351, + 17458: 0x835B, + 17459: 0x835C, + 17460: 0x8308, + 17461: 0x8392, + 17462: 0x833C, + 17463: 0x8334, + 17464: 0x8331, + 17465: 0x839B, + 17466: 0x835E, + 17467: 0x832F, + 17468: 0x834F, + 17469: 0x8347, + 17470: 0x8343, + 17471: 0x835F, + 17472: 0x8340, + 17473: 0x8317, + 17474: 0x8360, + 17475: 0x832D, + 17476: 0x833A, + 17477: 0x8333, + 17478: 0x8366, + 17479: 0x8365, + 17480: 0x8EE5, + 17481: 0x8EE6, + 17482: 0x8EE7, + 17483: 0x8EE8, + 17484: 0x8EE9, + 17485: 0x8EEA, + 17486: 0x8EEB, + 17487: 0x8EEC, + 17488: 0x8EED, + 17489: 0x8EEE, + 17490: 0x8EEF, + 17491: 0x8EF0, + 17492: 0x8EF1, + 17493: 0x8EF2, + 17494: 0x8EF3, + 17495: 0x8EF4, + 17496: 0x8EF5, + 17497: 0x8EF6, + 17498: 0x8EF7, + 17499: 0x8EF8, + 17500: 0x8EF9, + 17501: 0x8EFA, + 17502: 0x8EFB, + 17503: 0x8EFC, + 17504: 0x8EFD, + 17505: 0x8EFE, + 17506: 0x8EFF, + 17507: 0x8F00, + 17508: 0x8F01, + 17509: 0x8F02, + 17510: 0x8F03, + 17511: 0x8F04, + 17512: 0x8F05, + 17513: 0x8F06, + 17514: 0x8F07, + 17515: 0x8F08, + 17516: 0x8F09, + 17517: 0x8F0A, + 17518: 0x8F0B, + 17519: 0x8F0C, + 17520: 0x8F0D, + 17521: 0x8F0E, + 17522: 0x8F0F, + 17523: 0x8F10, + 17524: 0x8F11, + 17525: 0x8F12, + 17526: 0x8F13, + 17527: 0x8F14, + 17528: 0x8F15, + 17529: 0x8F16, + 17530: 0x8F17, + 17531: 0x8F18, + 17532: 0x8F19, + 17533: 0x8F1A, + 17534: 0x8F1B, + 17535: 0x8F1C, + 17536: 0x8F1D, + 17537: 0x8F1E, + 17538: 0x8F1F, + 17539: 0x8F20, + 17540: 0x8F21, + 17541: 0x8F22, + 17542: 0x8F23, + 17543: 0x8F24, + 17544: 0x8F25, + 17545: 0x8F26, + 17546: 0x8F27, + 17547: 0x8F28, + 17548: 0x8F29, + 17549: 0x8F2A, + 17550: 0x8F2B, + 17551: 0x8F2C, + 17552: 0x8F2D, + 17553: 0x8F2E, + 17554: 0x8F2F, + 17555: 0x8F30, + 17556: 0x8F31, + 17557: 0x8F32, + 17558: 0x8F33, + 17559: 0x8F34, + 17560: 0x8F35, + 17561: 0x8F36, + 17562: 0x8F37, + 17563: 0x8F38, + 17564: 0x8F39, + 17565: 0x8F3A, + 17566: 0x8F3B, + 17567: 0x8F3C, + 17568: 0x8F3D, + 17569: 0x8F3E, + 17570: 0x8F3F, + 17571: 0x8F40, + 17572: 0x8F41, + 17573: 0x8F42, + 17574: 0x8F43, + 17575: 0x8F44, + 17576: 0x8368, + 17577: 0x831B, + 17578: 0x8369, + 17579: 0x836C, + 17580: 0x836A, + 17581: 0x836D, + 17582: 0x836E, + 17583: 0x83B0, + 17584: 0x8378, + 17585: 0x83B3, + 17586: 0x83B4, + 17587: 0x83A0, + 17588: 0x83AA, + 17589: 0x8393, + 17590: 0x839C, + 17591: 0x8385, + 17592: 0x837C, + 17593: 0x83B6, + 17594: 0x83A9, + 17595: 0x837D, + 17596: 0x83B8, + 17597: 0x837B, + 17598: 0x8398, + 17599: 0x839E, + 17600: 0x83A8, + 17601: 0x83BA, + 17602: 0x83BC, + 17603: 0x83C1, + 17604: 0x8401, + 17605: 0x83E5, + 17606: 0x83D8, + 17607: 0x5807, + 17608: 0x8418, + 17609: 0x840B, + 17610: 0x83DD, + 17611: 0x83FD, + 17612: 0x83D6, + 17613: 0x841C, + 17614: 0x8438, + 17615: 0x8411, + 17616: 0x8406, + 17617: 0x83D4, + 17618: 0x83DF, + 17619: 0x840F, + 17620: 0x8403, + 17621: 0x83F8, + 17622: 0x83F9, + 17623: 0x83EA, + 17624: 0x83C5, + 17625: 0x83C0, + 17626: 0x8426, + 17627: 0x83F0, + 17628: 0x83E1, + 17629: 0x845C, + 17630: 0x8451, + 17631: 0x845A, + 17632: 0x8459, + 17633: 0x8473, + 17634: 0x8487, + 17635: 0x8488, + 17636: 0x847A, + 17637: 0x8489, + 17638: 0x8478, + 17639: 0x843C, + 17640: 0x8446, + 17641: 0x8469, + 17642: 0x8476, + 17643: 0x848C, + 17644: 0x848E, + 17645: 0x8431, + 17646: 0x846D, + 17647: 0x84C1, + 17648: 0x84CD, + 17649: 0x84D0, + 17650: 0x84E6, + 17651: 0x84BD, + 17652: 0x84D3, + 17653: 0x84CA, + 17654: 0x84BF, + 17655: 0x84BA, + 17656: 0x84E0, + 17657: 0x84A1, + 17658: 0x84B9, + 17659: 0x84B4, + 17660: 0x8497, + 17661: 0x84E5, + 17662: 0x84E3, + 17663: 0x850C, + 17664: 0x750D, + 17665: 0x8538, + 17666: 0x84F0, + 17667: 0x8539, + 17668: 0x851F, + 17669: 0x853A, + 17670: 0x8F45, + 17671: 0x8F46, + 17672: 0x8F47, + 17673: 0x8F48, + 17674: 0x8F49, + 17675: 0x8F4A, + 17676: 0x8F4B, + 17677: 0x8F4C, + 17678: 0x8F4D, + 17679: 0x8F4E, + 17680: 0x8F4F, + 17681: 0x8F50, + 17682: 0x8F51, + 17683: 0x8F52, + 17684: 0x8F53, + 17685: 0x8F54, + 17686: 0x8F55, + 17687: 0x8F56, + 17688: 0x8F57, + 17689: 0x8F58, + 17690: 0x8F59, + 17691: 0x8F5A, + 17692: 0x8F5B, + 17693: 0x8F5C, + 17694: 0x8F5D, + 17695: 0x8F5E, + 17696: 0x8F5F, + 17697: 0x8F60, + 17698: 0x8F61, + 17699: 0x8F62, + 17700: 0x8F63, + 17701: 0x8F64, + 17702: 0x8F65, + 17703: 0x8F6A, + 17704: 0x8F80, + 17705: 0x8F8C, + 17706: 0x8F92, + 17707: 0x8F9D, + 17708: 0x8FA0, + 17709: 0x8FA1, + 17710: 0x8FA2, + 17711: 0x8FA4, + 17712: 0x8FA5, + 17713: 0x8FA6, + 17714: 0x8FA7, + 17715: 0x8FAA, + 17716: 0x8FAC, + 17717: 0x8FAD, + 17718: 0x8FAE, + 17719: 0x8FAF, + 17720: 0x8FB2, + 17721: 0x8FB3, + 17722: 0x8FB4, + 17723: 0x8FB5, + 17724: 0x8FB7, + 17725: 0x8FB8, + 17726: 0x8FBA, + 17727: 0x8FBB, + 17728: 0x8FBC, + 17729: 0x8FBF, + 17730: 0x8FC0, + 17731: 0x8FC3, + 17732: 0x8FC6, + 17733: 0x8FC9, + 17734: 0x8FCA, + 17735: 0x8FCB, + 17736: 0x8FCC, + 17737: 0x8FCD, + 17738: 0x8FCF, + 17739: 0x8FD2, + 17740: 0x8FD6, + 17741: 0x8FD7, + 17742: 0x8FDA, + 17743: 0x8FE0, + 17744: 0x8FE1, + 17745: 0x8FE3, + 17746: 0x8FE7, + 17747: 0x8FEC, + 17748: 0x8FEF, + 17749: 0x8FF1, + 17750: 0x8FF2, + 17751: 0x8FF4, + 17752: 0x8FF5, + 17753: 0x8FF6, + 17754: 0x8FFA, + 17755: 0x8FFB, + 17756: 0x8FFC, + 17757: 0x8FFE, + 17758: 0x8FFF, + 17759: 0x9007, + 17760: 0x9008, + 17761: 0x900C, + 17762: 0x900E, + 17763: 0x9013, + 17764: 0x9015, + 17765: 0x9018, + 17766: 0x8556, + 17767: 0x853B, + 17768: 0x84FF, + 17769: 0x84FC, + 17770: 0x8559, + 17771: 0x8548, + 17772: 0x8568, + 17773: 0x8564, + 17774: 0x855E, + 17775: 0x857A, + 17776: 0x77A2, + 17777: 0x8543, + 17778: 0x8572, + 17779: 0x857B, + 17780: 0x85A4, + 17781: 0x85A8, + 17782: 0x8587, + 17783: 0x858F, + 17784: 0x8579, + 17785: 0x85AE, + 17786: 0x859C, + 17787: 0x8585, + 17788: 0x85B9, + 17789: 0x85B7, + 17790: 0x85B0, + 17791: 0x85D3, + 17792: 0x85C1, + 17793: 0x85DC, + 17794: 0x85FF, + 17795: 0x8627, + 17796: 0x8605, + 17797: 0x8629, + 17798: 0x8616, + 17799: 0x863C, + 17800: 0x5EFE, + 17801: 0x5F08, + 17802: 0x593C, + 17803: 0x5941, + 17804: 0x8037, + 17805: 0x5955, + 17806: 0x595A, + 17807: 0x5958, + 17808: 0x530F, + 17809: 0x5C22, + 17810: 0x5C25, + 17811: 0x5C2C, + 17812: 0x5C34, + 17813: 0x624C, + 17814: 0x626A, + 17815: 0x629F, + 17816: 0x62BB, + 17817: 0x62CA, + 17818: 0x62DA, + 17819: 0x62D7, + 17820: 0x62EE, + 17821: 0x6322, + 17822: 0x62F6, + 17823: 0x6339, + 17824: 0x634B, + 17825: 0x6343, + 17826: 0x63AD, + 17827: 0x63F6, + 17828: 0x6371, + 17829: 0x637A, + 17830: 0x638E, + 17831: 0x63B4, + 17832: 0x636D, + 17833: 0x63AC, + 17834: 0x638A, + 17835: 0x6369, + 17836: 0x63AE, + 17837: 0x63BC, + 17838: 0x63F2, + 17839: 0x63F8, + 17840: 0x63E0, + 17841: 0x63FF, + 17842: 0x63C4, + 17843: 0x63DE, + 17844: 0x63CE, + 17845: 0x6452, + 17846: 0x63C6, + 17847: 0x63BE, + 17848: 0x6445, + 17849: 0x6441, + 17850: 0x640B, + 17851: 0x641B, + 17852: 0x6420, + 17853: 0x640C, + 17854: 0x6426, + 17855: 0x6421, + 17856: 0x645E, + 17857: 0x6484, + 17858: 0x646D, + 17859: 0x6496, + 17860: 0x9019, + 17861: 0x901C, + 17862: 0x9023, + 17863: 0x9024, + 17864: 0x9025, + 17865: 0x9027, + 17866: 0x9028, + 17867: 0x9029, + 17868: 0x902A, + 17869: 0x902B, + 17870: 0x902C, + 17871: 0x9030, + 17872: 0x9031, + 17873: 0x9032, + 17874: 0x9033, + 17875: 0x9034, + 17876: 0x9037, + 17877: 0x9039, + 17878: 0x903A, + 17879: 0x903D, + 17880: 0x903F, + 17881: 0x9040, + 17882: 0x9043, + 17883: 0x9045, + 17884: 0x9046, + 17885: 0x9048, + 17886: 0x9049, + 17887: 0x904A, + 17888: 0x904B, + 17889: 0x904C, + 17890: 0x904E, + 17891: 0x9054, + 17892: 0x9055, + 17893: 0x9056, + 17894: 0x9059, + 17895: 0x905A, + 17896: 0x905C, + 17897: 0x905D, + 17898: 0x905E, + 17899: 0x905F, + 17900: 0x9060, + 17901: 0x9061, + 17902: 0x9064, + 17903: 0x9066, + 17904: 0x9067, + 17905: 0x9069, + 17906: 0x906A, + 17907: 0x906B, + 17908: 0x906C, + 17909: 0x906F, + 17910: 0x9070, + 17911: 0x9071, + 17912: 0x9072, + 17913: 0x9073, + 17914: 0x9076, + 17915: 0x9077, + 17916: 0x9078, + 17917: 0x9079, + 17918: 0x907A, + 17919: 0x907B, + 17920: 0x907C, + 17921: 0x907E, + 17922: 0x9081, + 17923: 0x9084, + 17924: 0x9085, + 17925: 0x9086, + 17926: 0x9087, + 17927: 0x9089, + 17928: 0x908A, + 17929: 0x908C, + 17930: 0x908D, + 17931: 0x908E, + 17932: 0x908F, + 17933: 0x9090, + 17934: 0x9092, + 17935: 0x9094, + 17936: 0x9096, + 17937: 0x9098, + 17938: 0x909A, + 17939: 0x909C, + 17940: 0x909E, + 17941: 0x909F, + 17942: 0x90A0, + 17943: 0x90A4, + 17944: 0x90A5, + 17945: 0x90A7, + 17946: 0x90A8, + 17947: 0x90A9, + 17948: 0x90AB, + 17949: 0x90AD, + 17950: 0x90B2, + 17951: 0x90B7, + 17952: 0x90BC, + 17953: 0x90BD, + 17954: 0x90BF, + 17955: 0x90C0, + 17956: 0x647A, + 17957: 0x64B7, + 17958: 0x64B8, + 17959: 0x6499, + 17960: 0x64BA, + 17961: 0x64C0, + 17962: 0x64D0, + 17963: 0x64D7, + 17964: 0x64E4, + 17965: 0x64E2, + 17966: 0x6509, + 17967: 0x6525, + 17968: 0x652E, + 17969: 0x5F0B, + 17970: 0x5FD2, + 17971: 0x7519, + 17972: 0x5F11, + 17973: 0x535F, + 17974: 0x53F1, + 17975: 0x53FD, + 17976: 0x53E9, + 17977: 0x53E8, + 17978: 0x53FB, + 17979: 0x5412, + 17980: 0x5416, + 17981: 0x5406, + 17982: 0x544B, + 17983: 0x5452, + 17984: 0x5453, + 17985: 0x5454, + 17986: 0x5456, + 17987: 0x5443, + 17988: 0x5421, + 17989: 0x5457, + 17990: 0x5459, + 17991: 0x5423, + 17992: 0x5432, + 17993: 0x5482, + 17994: 0x5494, + 17995: 0x5477, + 17996: 0x5471, + 17997: 0x5464, + 17998: 0x549A, + 17999: 0x549B, + 18000: 0x5484, + 18001: 0x5476, + 18002: 0x5466, + 18003: 0x549D, + 18004: 0x54D0, + 18005: 0x54AD, + 18006: 0x54C2, + 18007: 0x54B4, + 18008: 0x54D2, + 18009: 0x54A7, + 18010: 0x54A6, + 18011: 0x54D3, + 18012: 0x54D4, + 18013: 0x5472, + 18014: 0x54A3, + 18015: 0x54D5, + 18016: 0x54BB, + 18017: 0x54BF, + 18018: 0x54CC, + 18019: 0x54D9, + 18020: 0x54DA, + 18021: 0x54DC, + 18022: 0x54A9, + 18023: 0x54AA, + 18024: 0x54A4, + 18025: 0x54DD, + 18026: 0x54CF, + 18027: 0x54DE, + 18028: 0x551B, + 18029: 0x54E7, + 18030: 0x5520, + 18031: 0x54FD, + 18032: 0x5514, + 18033: 0x54F3, + 18034: 0x5522, + 18035: 0x5523, + 18036: 0x550F, + 18037: 0x5511, + 18038: 0x5527, + 18039: 0x552A, + 18040: 0x5567, + 18041: 0x558F, + 18042: 0x55B5, + 18043: 0x5549, + 18044: 0x556D, + 18045: 0x5541, + 18046: 0x5555, + 18047: 0x553F, + 18048: 0x5550, + 18049: 0x553C, + 18050: 0x90C2, + 18051: 0x90C3, + 18052: 0x90C6, + 18053: 0x90C8, + 18054: 0x90C9, + 18055: 0x90CB, + 18056: 0x90CC, + 18057: 0x90CD, + 18058: 0x90D2, + 18059: 0x90D4, + 18060: 0x90D5, + 18061: 0x90D6, + 18062: 0x90D8, + 18063: 0x90D9, + 18064: 0x90DA, + 18065: 0x90DE, + 18066: 0x90DF, + 18067: 0x90E0, + 18068: 0x90E3, + 18069: 0x90E4, + 18070: 0x90E5, + 18071: 0x90E9, + 18072: 0x90EA, + 18073: 0x90EC, + 18074: 0x90EE, + 18075: 0x90F0, + 18076: 0x90F1, + 18077: 0x90F2, + 18078: 0x90F3, + 18079: 0x90F5, + 18080: 0x90F6, + 18081: 0x90F7, + 18082: 0x90F9, + 18083: 0x90FA, + 18084: 0x90FB, + 18085: 0x90FC, + 18086: 0x90FF, + 18087: 0x9100, + 18088: 0x9101, + 18089: 0x9103, + 18090: 0x9105, + 18091: 0x9106, + 18092: 0x9107, + 18093: 0x9108, + 18094: 0x9109, + 18095: 0x910A, + 18096: 0x910B, + 18097: 0x910C, + 18098: 0x910D, + 18099: 0x910E, + 18100: 0x910F, + 18101: 0x9110, + 18102: 0x9111, + 18103: 0x9112, + 18104: 0x9113, + 18105: 0x9114, + 18106: 0x9115, + 18107: 0x9116, + 18108: 0x9117, + 18109: 0x9118, + 18110: 0x911A, + 18111: 0x911B, + 18112: 0x911C, + 18113: 0x911D, + 18114: 0x911F, + 18115: 0x9120, + 18116: 0x9121, + 18117: 0x9124, + 18118: 0x9125, + 18119: 0x9126, + 18120: 0x9127, + 18121: 0x9128, + 18122: 0x9129, + 18123: 0x912A, + 18124: 0x912B, + 18125: 0x912C, + 18126: 0x912D, + 18127: 0x912E, + 18128: 0x9130, + 18129: 0x9132, + 18130: 0x9133, + 18131: 0x9134, + 18132: 0x9135, + 18133: 0x9136, + 18134: 0x9137, + 18135: 0x9138, + 18136: 0x913A, + 18137: 0x913B, + 18138: 0x913C, + 18139: 0x913D, + 18140: 0x913E, + 18141: 0x913F, + 18142: 0x9140, + 18143: 0x9141, + 18144: 0x9142, + 18145: 0x9144, + 18146: 0x5537, + 18147: 0x5556, + 18148: 0x5575, + 18149: 0x5576, + 18150: 0x5577, + 18151: 0x5533, + 18152: 0x5530, + 18153: 0x555C, + 18154: 0x558B, + 18155: 0x55D2, + 18156: 0x5583, + 18157: 0x55B1, + 18158: 0x55B9, + 18159: 0x5588, + 18160: 0x5581, + 18161: 0x559F, + 18162: 0x557E, + 18163: 0x55D6, + 18164: 0x5591, + 18165: 0x557B, + 18166: 0x55DF, + 18167: 0x55BD, + 18168: 0x55BE, + 18169: 0x5594, + 18170: 0x5599, + 18171: 0x55EA, + 18172: 0x55F7, + 18173: 0x55C9, + 18174: 0x561F, + 18175: 0x55D1, + 18176: 0x55EB, + 18177: 0x55EC, + 18178: 0x55D4, + 18179: 0x55E6, + 18180: 0x55DD, + 18181: 0x55C4, + 18182: 0x55EF, + 18183: 0x55E5, + 18184: 0x55F2, + 18185: 0x55F3, + 18186: 0x55CC, + 18187: 0x55CD, + 18188: 0x55E8, + 18189: 0x55F5, + 18190: 0x55E4, + 18191: 0x8F94, + 18192: 0x561E, + 18193: 0x5608, + 18194: 0x560C, + 18195: 0x5601, + 18196: 0x5624, + 18197: 0x5623, + 18198: 0x55FE, + 18199: 0x5600, + 18200: 0x5627, + 18201: 0x562D, + 18202: 0x5658, + 18203: 0x5639, + 18204: 0x5657, + 18205: 0x562C, + 18206: 0x564D, + 18207: 0x5662, + 18208: 0x5659, + 18209: 0x565C, + 18210: 0x564C, + 18211: 0x5654, + 18212: 0x5686, + 18213: 0x5664, + 18214: 0x5671, + 18215: 0x566B, + 18216: 0x567B, + 18217: 0x567C, + 18218: 0x5685, + 18219: 0x5693, + 18220: 0x56AF, + 18221: 0x56D4, + 18222: 0x56D7, + 18223: 0x56DD, + 18224: 0x56E1, + 18225: 0x56F5, + 18226: 0x56EB, + 18227: 0x56F9, + 18228: 0x56FF, + 18229: 0x5704, + 18230: 0x570A, + 18231: 0x5709, + 18232: 0x571C, + 18233: 0x5E0F, + 18234: 0x5E19, + 18235: 0x5E14, + 18236: 0x5E11, + 18237: 0x5E31, + 18238: 0x5E3B, + 18239: 0x5E3C, + 18240: 0x9145, + 18241: 0x9147, + 18242: 0x9148, + 18243: 0x9151, + 18244: 0x9153, + 18245: 0x9154, + 18246: 0x9155, + 18247: 0x9156, + 18248: 0x9158, + 18249: 0x9159, + 18250: 0x915B, + 18251: 0x915C, + 18252: 0x915F, + 18253: 0x9160, + 18254: 0x9166, + 18255: 0x9167, + 18256: 0x9168, + 18257: 0x916B, + 18258: 0x916D, + 18259: 0x9173, + 18260: 0x917A, + 18261: 0x917B, + 18262: 0x917C, + 18263: 0x9180, + 18264: 0x9181, + 18265: 0x9182, + 18266: 0x9183, + 18267: 0x9184, + 18268: 0x9186, + 18269: 0x9188, + 18270: 0x918A, + 18271: 0x918E, + 18272: 0x918F, + 18273: 0x9193, + 18274: 0x9194, + 18275: 0x9195, + 18276: 0x9196, + 18277: 0x9197, + 18278: 0x9198, + 18279: 0x9199, + 18280: 0x919C, + 18281: 0x919D, + 18282: 0x919E, + 18283: 0x919F, + 18284: 0x91A0, + 18285: 0x91A1, + 18286: 0x91A4, + 18287: 0x91A5, + 18288: 0x91A6, + 18289: 0x91A7, + 18290: 0x91A8, + 18291: 0x91A9, + 18292: 0x91AB, + 18293: 0x91AC, + 18294: 0x91B0, + 18295: 0x91B1, + 18296: 0x91B2, + 18297: 0x91B3, + 18298: 0x91B6, + 18299: 0x91B7, + 18300: 0x91B8, + 18301: 0x91B9, + 18302: 0x91BB, + 18303: 0x91BC, + 18304: 0x91BD, + 18305: 0x91BE, + 18306: 0x91BF, + 18307: 0x91C0, + 18308: 0x91C1, + 18309: 0x91C2, + 18310: 0x91C3, + 18311: 0x91C4, + 18312: 0x91C5, + 18313: 0x91C6, + 18314: 0x91C8, + 18315: 0x91CB, + 18316: 0x91D0, + 18317: 0x91D2, + 18318: 0x91D3, + 18319: 0x91D4, + 18320: 0x91D5, + 18321: 0x91D6, + 18322: 0x91D7, + 18323: 0x91D8, + 18324: 0x91D9, + 18325: 0x91DA, + 18326: 0x91DB, + 18327: 0x91DD, + 18328: 0x91DE, + 18329: 0x91DF, + 18330: 0x91E0, + 18331: 0x91E1, + 18332: 0x91E2, + 18333: 0x91E3, + 18334: 0x91E4, + 18335: 0x91E5, + 18336: 0x5E37, + 18337: 0x5E44, + 18338: 0x5E54, + 18339: 0x5E5B, + 18340: 0x5E5E, + 18341: 0x5E61, + 18342: 0x5C8C, + 18343: 0x5C7A, + 18344: 0x5C8D, + 18345: 0x5C90, + 18346: 0x5C96, + 18347: 0x5C88, + 18348: 0x5C98, + 18349: 0x5C99, + 18350: 0x5C91, + 18351: 0x5C9A, + 18352: 0x5C9C, + 18353: 0x5CB5, + 18354: 0x5CA2, + 18355: 0x5CBD, + 18356: 0x5CAC, + 18357: 0x5CAB, + 18358: 0x5CB1, + 18359: 0x5CA3, + 18360: 0x5CC1, + 18361: 0x5CB7, + 18362: 0x5CC4, + 18363: 0x5CD2, + 18364: 0x5CE4, + 18365: 0x5CCB, + 18366: 0x5CE5, + 18367: 0x5D02, + 18368: 0x5D03, + 18369: 0x5D27, + 18370: 0x5D26, + 18371: 0x5D2E, + 18372: 0x5D24, + 18373: 0x5D1E, + 18374: 0x5D06, + 18375: 0x5D1B, + 18376: 0x5D58, + 18377: 0x5D3E, + 18378: 0x5D34, + 18379: 0x5D3D, + 18380: 0x5D6C, + 18381: 0x5D5B, + 18382: 0x5D6F, + 18383: 0x5D5D, + 18384: 0x5D6B, + 18385: 0x5D4B, + 18386: 0x5D4A, + 18387: 0x5D69, + 18388: 0x5D74, + 18389: 0x5D82, + 18390: 0x5D99, + 18391: 0x5D9D, + 18392: 0x8C73, + 18393: 0x5DB7, + 18394: 0x5DC5, + 18395: 0x5F73, + 18396: 0x5F77, + 18397: 0x5F82, + 18398: 0x5F87, + 18399: 0x5F89, + 18400: 0x5F8C, + 18401: 0x5F95, + 18402: 0x5F99, + 18403: 0x5F9C, + 18404: 0x5FA8, + 18405: 0x5FAD, + 18406: 0x5FB5, + 18407: 0x5FBC, + 18408: 0x8862, + 18409: 0x5F61, + 18410: 0x72AD, + 18411: 0x72B0, + 18412: 0x72B4, + 18413: 0x72B7, + 18414: 0x72B8, + 18415: 0x72C3, + 18416: 0x72C1, + 18417: 0x72CE, + 18418: 0x72CD, + 18419: 0x72D2, + 18420: 0x72E8, + 18421: 0x72EF, + 18422: 0x72E9, + 18423: 0x72F2, + 18424: 0x72F4, + 18425: 0x72F7, + 18426: 0x7301, + 18427: 0x72F3, + 18428: 0x7303, + 18429: 0x72FA, + 18430: 0x91E6, + 18431: 0x91E7, + 18432: 0x91E8, + 18433: 0x91E9, + 18434: 0x91EA, + 18435: 0x91EB, + 18436: 0x91EC, + 18437: 0x91ED, + 18438: 0x91EE, + 18439: 0x91EF, + 18440: 0x91F0, + 18441: 0x91F1, + 18442: 0x91F2, + 18443: 0x91F3, + 18444: 0x91F4, + 18445: 0x91F5, + 18446: 0x91F6, + 18447: 0x91F7, + 18448: 0x91F8, + 18449: 0x91F9, + 18450: 0x91FA, + 18451: 0x91FB, + 18452: 0x91FC, + 18453: 0x91FD, + 18454: 0x91FE, + 18455: 0x91FF, + 18456: 0x9200, + 18457: 0x9201, + 18458: 0x9202, + 18459: 0x9203, + 18460: 0x9204, + 18461: 0x9205, + 18462: 0x9206, + 18463: 0x9207, + 18464: 0x9208, + 18465: 0x9209, + 18466: 0x920A, + 18467: 0x920B, + 18468: 0x920C, + 18469: 0x920D, + 18470: 0x920E, + 18471: 0x920F, + 18472: 0x9210, + 18473: 0x9211, + 18474: 0x9212, + 18475: 0x9213, + 18476: 0x9214, + 18477: 0x9215, + 18478: 0x9216, + 18479: 0x9217, + 18480: 0x9218, + 18481: 0x9219, + 18482: 0x921A, + 18483: 0x921B, + 18484: 0x921C, + 18485: 0x921D, + 18486: 0x921E, + 18487: 0x921F, + 18488: 0x9220, + 18489: 0x9221, + 18490: 0x9222, + 18491: 0x9223, + 18492: 0x9224, + 18493: 0x9225, + 18494: 0x9226, + 18495: 0x9227, + 18496: 0x9228, + 18497: 0x9229, + 18498: 0x922A, + 18499: 0x922B, + 18500: 0x922C, + 18501: 0x922D, + 18502: 0x922E, + 18503: 0x922F, + 18504: 0x9230, + 18505: 0x9231, + 18506: 0x9232, + 18507: 0x9233, + 18508: 0x9234, + 18509: 0x9235, + 18510: 0x9236, + 18511: 0x9237, + 18512: 0x9238, + 18513: 0x9239, + 18514: 0x923A, + 18515: 0x923B, + 18516: 0x923C, + 18517: 0x923D, + 18518: 0x923E, + 18519: 0x923F, + 18520: 0x9240, + 18521: 0x9241, + 18522: 0x9242, + 18523: 0x9243, + 18524: 0x9244, + 18525: 0x9245, + 18526: 0x72FB, + 18527: 0x7317, + 18528: 0x7313, + 18529: 0x7321, + 18530: 0x730A, + 18531: 0x731E, + 18532: 0x731D, + 18533: 0x7315, + 18534: 0x7322, + 18535: 0x7339, + 18536: 0x7325, + 18537: 0x732C, + 18538: 0x7338, + 18539: 0x7331, + 18540: 0x7350, + 18541: 0x734D, + 18542: 0x7357, + 18543: 0x7360, + 18544: 0x736C, + 18545: 0x736F, + 18546: 0x737E, + 18547: 0x821B, + 18548: 0x5925, + 18549: 0x98E7, + 18550: 0x5924, + 18551: 0x5902, + 18552: 0x9963, + 18553: 0x9967, + 18554: 0x9968, + 18555: 0x9969, + 18556: 0x996A, + 18557: 0x996B, + 18558: 0x996C, + 18559: 0x9974, + 18560: 0x9977, + 18561: 0x997D, + 18562: 0x9980, + 18563: 0x9984, + 18564: 0x9987, + 18565: 0x998A, + 18566: 0x998D, + 18567: 0x9990, + 18568: 0x9991, + 18569: 0x9993, + 18570: 0x9994, + 18571: 0x9995, + 18572: 0x5E80, + 18573: 0x5E91, + 18574: 0x5E8B, + 18575: 0x5E96, + 18576: 0x5EA5, + 18577: 0x5EA0, + 18578: 0x5EB9, + 18579: 0x5EB5, + 18580: 0x5EBE, + 18581: 0x5EB3, + 18582: 0x8D53, + 18583: 0x5ED2, + 18584: 0x5ED1, + 18585: 0x5EDB, + 18586: 0x5EE8, + 18587: 0x5EEA, + 18588: 0x81BA, + 18589: 0x5FC4, + 18590: 0x5FC9, + 18591: 0x5FD6, + 18592: 0x5FCF, + 18593: 0x6003, + 18594: 0x5FEE, + 18595: 0x6004, + 18596: 0x5FE1, + 18597: 0x5FE4, + 18598: 0x5FFE, + 18599: 0x6005, + 18600: 0x6006, + 18601: 0x5FEA, + 18602: 0x5FED, + 18603: 0x5FF8, + 18604: 0x6019, + 18605: 0x6035, + 18606: 0x6026, + 18607: 0x601B, + 18608: 0x600F, + 18609: 0x600D, + 18610: 0x6029, + 18611: 0x602B, + 18612: 0x600A, + 18613: 0x603F, + 18614: 0x6021, + 18615: 0x6078, + 18616: 0x6079, + 18617: 0x607B, + 18618: 0x607A, + 18619: 0x6042, + 18620: 0x9246, + 18621: 0x9247, + 18622: 0x9248, + 18623: 0x9249, + 18624: 0x924A, + 18625: 0x924B, + 18626: 0x924C, + 18627: 0x924D, + 18628: 0x924E, + 18629: 0x924F, + 18630: 0x9250, + 18631: 0x9251, + 18632: 0x9252, + 18633: 0x9253, + 18634: 0x9254, + 18635: 0x9255, + 18636: 0x9256, + 18637: 0x9257, + 18638: 0x9258, + 18639: 0x9259, + 18640: 0x925A, + 18641: 0x925B, + 18642: 0x925C, + 18643: 0x925D, + 18644: 0x925E, + 18645: 0x925F, + 18646: 0x9260, + 18647: 0x9261, + 18648: 0x9262, + 18649: 0x9263, + 18650: 0x9264, + 18651: 0x9265, + 18652: 0x9266, + 18653: 0x9267, + 18654: 0x9268, + 18655: 0x9269, + 18656: 0x926A, + 18657: 0x926B, + 18658: 0x926C, + 18659: 0x926D, + 18660: 0x926E, + 18661: 0x926F, + 18662: 0x9270, + 18663: 0x9271, + 18664: 0x9272, + 18665: 0x9273, + 18666: 0x9275, + 18667: 0x9276, + 18668: 0x9277, + 18669: 0x9278, + 18670: 0x9279, + 18671: 0x927A, + 18672: 0x927B, + 18673: 0x927C, + 18674: 0x927D, + 18675: 0x927E, + 18676: 0x927F, + 18677: 0x9280, + 18678: 0x9281, + 18679: 0x9282, + 18680: 0x9283, + 18681: 0x9284, + 18682: 0x9285, + 18683: 0x9286, + 18684: 0x9287, + 18685: 0x9288, + 18686: 0x9289, + 18687: 0x928A, + 18688: 0x928B, + 18689: 0x928C, + 18690: 0x928D, + 18691: 0x928F, + 18692: 0x9290, + 18693: 0x9291, + 18694: 0x9292, + 18695: 0x9293, + 18696: 0x9294, + 18697: 0x9295, + 18698: 0x9296, + 18699: 0x9297, + 18700: 0x9298, + 18701: 0x9299, + 18702: 0x929A, + 18703: 0x929B, + 18704: 0x929C, + 18705: 0x929D, + 18706: 0x929E, + 18707: 0x929F, + 18708: 0x92A0, + 18709: 0x92A1, + 18710: 0x92A2, + 18711: 0x92A3, + 18712: 0x92A4, + 18713: 0x92A5, + 18714: 0x92A6, + 18715: 0x92A7, + 18716: 0x606A, + 18717: 0x607D, + 18718: 0x6096, + 18719: 0x609A, + 18720: 0x60AD, + 18721: 0x609D, + 18722: 0x6083, + 18723: 0x6092, + 18724: 0x608C, + 18725: 0x609B, + 18726: 0x60EC, + 18727: 0x60BB, + 18728: 0x60B1, + 18729: 0x60DD, + 18730: 0x60D8, + 18731: 0x60C6, + 18732: 0x60DA, + 18733: 0x60B4, + 18734: 0x6120, + 18735: 0x6126, + 18736: 0x6115, + 18737: 0x6123, + 18738: 0x60F4, + 18739: 0x6100, + 18740: 0x610E, + 18741: 0x612B, + 18742: 0x614A, + 18743: 0x6175, + 18744: 0x61AC, + 18745: 0x6194, + 18746: 0x61A7, + 18747: 0x61B7, + 18748: 0x61D4, + 18749: 0x61F5, + 18750: 0x5FDD, + 18751: 0x96B3, + 18752: 0x95E9, + 18753: 0x95EB, + 18754: 0x95F1, + 18755: 0x95F3, + 18756: 0x95F5, + 18757: 0x95F6, + 18758: 0x95FC, + 18759: 0x95FE, + 18760: 0x9603, + 18761: 0x9604, + 18762: 0x9606, + 18763: 0x9608, + 18764: 0x960A, + 18765: 0x960B, + 18766: 0x960C, + 18767: 0x960D, + 18768: 0x960F, + 18769: 0x9612, + 18770: 0x9615, + 18771: 0x9616, + 18772: 0x9617, + 18773: 0x9619, + 18774: 0x961A, + 18775: 0x4E2C, + 18776: 0x723F, + 18777: 0x6215, + 18778: 0x6C35, + 18779: 0x6C54, + 18780: 0x6C5C, + 18781: 0x6C4A, + 18782: 0x6CA3, + 18783: 0x6C85, + 18784: 0x6C90, + 18785: 0x6C94, + 18786: 0x6C8C, + 18787: 0x6C68, + 18788: 0x6C69, + 18789: 0x6C74, + 18790: 0x6C76, + 18791: 0x6C86, + 18792: 0x6CA9, + 18793: 0x6CD0, + 18794: 0x6CD4, + 18795: 0x6CAD, + 18796: 0x6CF7, + 18797: 0x6CF8, + 18798: 0x6CF1, + 18799: 0x6CD7, + 18800: 0x6CB2, + 18801: 0x6CE0, + 18802: 0x6CD6, + 18803: 0x6CFA, + 18804: 0x6CEB, + 18805: 0x6CEE, + 18806: 0x6CB1, + 18807: 0x6CD3, + 18808: 0x6CEF, + 18809: 0x6CFE, + 18810: 0x92A8, + 18811: 0x92A9, + 18812: 0x92AA, + 18813: 0x92AB, + 18814: 0x92AC, + 18815: 0x92AD, + 18816: 0x92AF, + 18817: 0x92B0, + 18818: 0x92B1, + 18819: 0x92B2, + 18820: 0x92B3, + 18821: 0x92B4, + 18822: 0x92B5, + 18823: 0x92B6, + 18824: 0x92B7, + 18825: 0x92B8, + 18826: 0x92B9, + 18827: 0x92BA, + 18828: 0x92BB, + 18829: 0x92BC, + 18830: 0x92BD, + 18831: 0x92BE, + 18832: 0x92BF, + 18833: 0x92C0, + 18834: 0x92C1, + 18835: 0x92C2, + 18836: 0x92C3, + 18837: 0x92C4, + 18838: 0x92C5, + 18839: 0x92C6, + 18840: 0x92C7, + 18841: 0x92C9, + 18842: 0x92CA, + 18843: 0x92CB, + 18844: 0x92CC, + 18845: 0x92CD, + 18846: 0x92CE, + 18847: 0x92CF, + 18848: 0x92D0, + 18849: 0x92D1, + 18850: 0x92D2, + 18851: 0x92D3, + 18852: 0x92D4, + 18853: 0x92D5, + 18854: 0x92D6, + 18855: 0x92D7, + 18856: 0x92D8, + 18857: 0x92D9, + 18858: 0x92DA, + 18859: 0x92DB, + 18860: 0x92DC, + 18861: 0x92DD, + 18862: 0x92DE, + 18863: 0x92DF, + 18864: 0x92E0, + 18865: 0x92E1, + 18866: 0x92E2, + 18867: 0x92E3, + 18868: 0x92E4, + 18869: 0x92E5, + 18870: 0x92E6, + 18871: 0x92E7, + 18872: 0x92E8, + 18873: 0x92E9, + 18874: 0x92EA, + 18875: 0x92EB, + 18876: 0x92EC, + 18877: 0x92ED, + 18878: 0x92EE, + 18879: 0x92EF, + 18880: 0x92F0, + 18881: 0x92F1, + 18882: 0x92F2, + 18883: 0x92F3, + 18884: 0x92F4, + 18885: 0x92F5, + 18886: 0x92F6, + 18887: 0x92F7, + 18888: 0x92F8, + 18889: 0x92F9, + 18890: 0x92FA, + 18891: 0x92FB, + 18892: 0x92FC, + 18893: 0x92FD, + 18894: 0x92FE, + 18895: 0x92FF, + 18896: 0x9300, + 18897: 0x9301, + 18898: 0x9302, + 18899: 0x9303, + 18900: 0x9304, + 18901: 0x9305, + 18902: 0x9306, + 18903: 0x9307, + 18904: 0x9308, + 18905: 0x9309, + 18906: 0x6D39, + 18907: 0x6D27, + 18908: 0x6D0C, + 18909: 0x6D43, + 18910: 0x6D48, + 18911: 0x6D07, + 18912: 0x6D04, + 18913: 0x6D19, + 18914: 0x6D0E, + 18915: 0x6D2B, + 18916: 0x6D4D, + 18917: 0x6D2E, + 18918: 0x6D35, + 18919: 0x6D1A, + 18920: 0x6D4F, + 18921: 0x6D52, + 18922: 0x6D54, + 18923: 0x6D33, + 18924: 0x6D91, + 18925: 0x6D6F, + 18926: 0x6D9E, + 18927: 0x6DA0, + 18928: 0x6D5E, + 18929: 0x6D93, + 18930: 0x6D94, + 18931: 0x6D5C, + 18932: 0x6D60, + 18933: 0x6D7C, + 18934: 0x6D63, + 18935: 0x6E1A, + 18936: 0x6DC7, + 18937: 0x6DC5, + 18938: 0x6DDE, + 18939: 0x6E0E, + 18940: 0x6DBF, + 18941: 0x6DE0, + 18942: 0x6E11, + 18943: 0x6DE6, + 18944: 0x6DDD, + 18945: 0x6DD9, + 18946: 0x6E16, + 18947: 0x6DAB, + 18948: 0x6E0C, + 18949: 0x6DAE, + 18950: 0x6E2B, + 18951: 0x6E6E, + 18952: 0x6E4E, + 18953: 0x6E6B, + 18954: 0x6EB2, + 18955: 0x6E5F, + 18956: 0x6E86, + 18957: 0x6E53, + 18958: 0x6E54, + 18959: 0x6E32, + 18960: 0x6E25, + 18961: 0x6E44, + 18962: 0x6EDF, + 18963: 0x6EB1, + 18964: 0x6E98, + 18965: 0x6EE0, + 18966: 0x6F2D, + 18967: 0x6EE2, + 18968: 0x6EA5, + 18969: 0x6EA7, + 18970: 0x6EBD, + 18971: 0x6EBB, + 18972: 0x6EB7, + 18973: 0x6ED7, + 18974: 0x6EB4, + 18975: 0x6ECF, + 18976: 0x6E8F, + 18977: 0x6EC2, + 18978: 0x6E9F, + 18979: 0x6F62, + 18980: 0x6F46, + 18981: 0x6F47, + 18982: 0x6F24, + 18983: 0x6F15, + 18984: 0x6EF9, + 18985: 0x6F2F, + 18986: 0x6F36, + 18987: 0x6F4B, + 18988: 0x6F74, + 18989: 0x6F2A, + 18990: 0x6F09, + 18991: 0x6F29, + 18992: 0x6F89, + 18993: 0x6F8D, + 18994: 0x6F8C, + 18995: 0x6F78, + 18996: 0x6F72, + 18997: 0x6F7C, + 18998: 0x6F7A, + 18999: 0x6FD1, + 19000: 0x930A, + 19001: 0x930B, + 19002: 0x930C, + 19003: 0x930D, + 19004: 0x930E, + 19005: 0x930F, + 19006: 0x9310, + 19007: 0x9311, + 19008: 0x9312, + 19009: 0x9313, + 19010: 0x9314, + 19011: 0x9315, + 19012: 0x9316, + 19013: 0x9317, + 19014: 0x9318, + 19015: 0x9319, + 19016: 0x931A, + 19017: 0x931B, + 19018: 0x931C, + 19019: 0x931D, + 19020: 0x931E, + 19021: 0x931F, + 19022: 0x9320, + 19023: 0x9321, + 19024: 0x9322, + 19025: 0x9323, + 19026: 0x9324, + 19027: 0x9325, + 19028: 0x9326, + 19029: 0x9327, + 19030: 0x9328, + 19031: 0x9329, + 19032: 0x932A, + 19033: 0x932B, + 19034: 0x932C, + 19035: 0x932D, + 19036: 0x932E, + 19037: 0x932F, + 19038: 0x9330, + 19039: 0x9331, + 19040: 0x9332, + 19041: 0x9333, + 19042: 0x9334, + 19043: 0x9335, + 19044: 0x9336, + 19045: 0x9337, + 19046: 0x9338, + 19047: 0x9339, + 19048: 0x933A, + 19049: 0x933B, + 19050: 0x933C, + 19051: 0x933D, + 19052: 0x933F, + 19053: 0x9340, + 19054: 0x9341, + 19055: 0x9342, + 19056: 0x9343, + 19057: 0x9344, + 19058: 0x9345, + 19059: 0x9346, + 19060: 0x9347, + 19061: 0x9348, + 19062: 0x9349, + 19063: 0x934A, + 19064: 0x934B, + 19065: 0x934C, + 19066: 0x934D, + 19067: 0x934E, + 19068: 0x934F, + 19069: 0x9350, + 19070: 0x9351, + 19071: 0x9352, + 19072: 0x9353, + 19073: 0x9354, + 19074: 0x9355, + 19075: 0x9356, + 19076: 0x9357, + 19077: 0x9358, + 19078: 0x9359, + 19079: 0x935A, + 19080: 0x935B, + 19081: 0x935C, + 19082: 0x935D, + 19083: 0x935E, + 19084: 0x935F, + 19085: 0x9360, + 19086: 0x9361, + 19087: 0x9362, + 19088: 0x9363, + 19089: 0x9364, + 19090: 0x9365, + 19091: 0x9366, + 19092: 0x9367, + 19093: 0x9368, + 19094: 0x9369, + 19095: 0x936B, + 19096: 0x6FC9, + 19097: 0x6FA7, + 19098: 0x6FB9, + 19099: 0x6FB6, + 19100: 0x6FC2, + 19101: 0x6FE1, + 19102: 0x6FEE, + 19103: 0x6FDE, + 19104: 0x6FE0, + 19105: 0x6FEF, + 19106: 0x701A, + 19107: 0x7023, + 19108: 0x701B, + 19109: 0x7039, + 19110: 0x7035, + 19111: 0x704F, + 19112: 0x705E, + 19113: 0x5B80, + 19114: 0x5B84, + 19115: 0x5B95, + 19116: 0x5B93, + 19117: 0x5BA5, + 19118: 0x5BB8, + 19119: 0x752F, + 19120: 0x9A9E, + 19121: 0x6434, + 19122: 0x5BE4, + 19123: 0x5BEE, + 19124: 0x8930, + 19125: 0x5BF0, + 19126: 0x8E47, + 19127: 0x8B07, + 19128: 0x8FB6, + 19129: 0x8FD3, + 19130: 0x8FD5, + 19131: 0x8FE5, + 19132: 0x8FEE, + 19133: 0x8FE4, + 19134: 0x8FE9, + 19135: 0x8FE6, + 19136: 0x8FF3, + 19137: 0x8FE8, + 19138: 0x9005, + 19139: 0x9004, + 19140: 0x900B, + 19141: 0x9026, + 19142: 0x9011, + 19143: 0x900D, + 19144: 0x9016, + 19145: 0x9021, + 19146: 0x9035, + 19147: 0x9036, + 19148: 0x902D, + 19149: 0x902F, + 19150: 0x9044, + 19151: 0x9051, + 19152: 0x9052, + 19153: 0x9050, + 19154: 0x9068, + 19155: 0x9058, + 19156: 0x9062, + 19157: 0x905B, + 19158: 0x66B9, + 19159: 0x9074, + 19160: 0x907D, + 19161: 0x9082, + 19162: 0x9088, + 19163: 0x9083, + 19164: 0x908B, + 19165: 0x5F50, + 19166: 0x5F57, + 19167: 0x5F56, + 19168: 0x5F58, + 19169: 0x5C3B, + 19170: 0x54AB, + 19171: 0x5C50, + 19172: 0x5C59, + 19173: 0x5B71, + 19174: 0x5C63, + 19175: 0x5C66, + 19176: 0x7FBC, + 19177: 0x5F2A, + 19178: 0x5F29, + 19179: 0x5F2D, + 19180: 0x8274, + 19181: 0x5F3C, + 19182: 0x9B3B, + 19183: 0x5C6E, + 19184: 0x5981, + 19185: 0x5983, + 19186: 0x598D, + 19187: 0x59A9, + 19188: 0x59AA, + 19189: 0x59A3, + 19190: 0x936C, + 19191: 0x936D, + 19192: 0x936E, + 19193: 0x936F, + 19194: 0x9370, + 19195: 0x9371, + 19196: 0x9372, + 19197: 0x9373, + 19198: 0x9374, + 19199: 0x9375, + 19200: 0x9376, + 19201: 0x9377, + 19202: 0x9378, + 19203: 0x9379, + 19204: 0x937A, + 19205: 0x937B, + 19206: 0x937C, + 19207: 0x937D, + 19208: 0x937E, + 19209: 0x937F, + 19210: 0x9380, + 19211: 0x9381, + 19212: 0x9382, + 19213: 0x9383, + 19214: 0x9384, + 19215: 0x9385, + 19216: 0x9386, + 19217: 0x9387, + 19218: 0x9388, + 19219: 0x9389, + 19220: 0x938A, + 19221: 0x938B, + 19222: 0x938C, + 19223: 0x938D, + 19224: 0x938E, + 19225: 0x9390, + 19226: 0x9391, + 19227: 0x9392, + 19228: 0x9393, + 19229: 0x9394, + 19230: 0x9395, + 19231: 0x9396, + 19232: 0x9397, + 19233: 0x9398, + 19234: 0x9399, + 19235: 0x939A, + 19236: 0x939B, + 19237: 0x939C, + 19238: 0x939D, + 19239: 0x939E, + 19240: 0x939F, + 19241: 0x93A0, + 19242: 0x93A1, + 19243: 0x93A2, + 19244: 0x93A3, + 19245: 0x93A4, + 19246: 0x93A5, + 19247: 0x93A6, + 19248: 0x93A7, + 19249: 0x93A8, + 19250: 0x93A9, + 19251: 0x93AA, + 19252: 0x93AB, + 19253: 0x93AC, + 19254: 0x93AD, + 19255: 0x93AE, + 19256: 0x93AF, + 19257: 0x93B0, + 19258: 0x93B1, + 19259: 0x93B2, + 19260: 0x93B3, + 19261: 0x93B4, + 19262: 0x93B5, + 19263: 0x93B6, + 19264: 0x93B7, + 19265: 0x93B8, + 19266: 0x93B9, + 19267: 0x93BA, + 19268: 0x93BB, + 19269: 0x93BC, + 19270: 0x93BD, + 19271: 0x93BE, + 19272: 0x93BF, + 19273: 0x93C0, + 19274: 0x93C1, + 19275: 0x93C2, + 19276: 0x93C3, + 19277: 0x93C4, + 19278: 0x93C5, + 19279: 0x93C6, + 19280: 0x93C7, + 19281: 0x93C8, + 19282: 0x93C9, + 19283: 0x93CB, + 19284: 0x93CC, + 19285: 0x93CD, + 19286: 0x5997, + 19287: 0x59CA, + 19288: 0x59AB, + 19289: 0x599E, + 19290: 0x59A4, + 19291: 0x59D2, + 19292: 0x59B2, + 19293: 0x59AF, + 19294: 0x59D7, + 19295: 0x59BE, + 19296: 0x5A05, + 19297: 0x5A06, + 19298: 0x59DD, + 19299: 0x5A08, + 19300: 0x59E3, + 19301: 0x59D8, + 19302: 0x59F9, + 19303: 0x5A0C, + 19304: 0x5A09, + 19305: 0x5A32, + 19306: 0x5A34, + 19307: 0x5A11, + 19308: 0x5A23, + 19309: 0x5A13, + 19310: 0x5A40, + 19311: 0x5A67, + 19312: 0x5A4A, + 19313: 0x5A55, + 19314: 0x5A3C, + 19315: 0x5A62, + 19316: 0x5A75, + 19317: 0x80EC, + 19318: 0x5AAA, + 19319: 0x5A9B, + 19320: 0x5A77, + 19321: 0x5A7A, + 19322: 0x5ABE, + 19323: 0x5AEB, + 19324: 0x5AB2, + 19325: 0x5AD2, + 19326: 0x5AD4, + 19327: 0x5AB8, + 19328: 0x5AE0, + 19329: 0x5AE3, + 19330: 0x5AF1, + 19331: 0x5AD6, + 19332: 0x5AE6, + 19333: 0x5AD8, + 19334: 0x5ADC, + 19335: 0x5B09, + 19336: 0x5B17, + 19337: 0x5B16, + 19338: 0x5B32, + 19339: 0x5B37, + 19340: 0x5B40, + 19341: 0x5C15, + 19342: 0x5C1C, + 19343: 0x5B5A, + 19344: 0x5B65, + 19345: 0x5B73, + 19346: 0x5B51, + 19347: 0x5B53, + 19348: 0x5B62, + 19349: 0x9A75, + 19350: 0x9A77, + 19351: 0x9A78, + 19352: 0x9A7A, + 19353: 0x9A7F, + 19354: 0x9A7D, + 19355: 0x9A80, + 19356: 0x9A81, + 19357: 0x9A85, + 19358: 0x9A88, + 19359: 0x9A8A, + 19360: 0x9A90, + 19361: 0x9A92, + 19362: 0x9A93, + 19363: 0x9A96, + 19364: 0x9A98, + 19365: 0x9A9B, + 19366: 0x9A9C, + 19367: 0x9A9D, + 19368: 0x9A9F, + 19369: 0x9AA0, + 19370: 0x9AA2, + 19371: 0x9AA3, + 19372: 0x9AA5, + 19373: 0x9AA7, + 19374: 0x7E9F, + 19375: 0x7EA1, + 19376: 0x7EA3, + 19377: 0x7EA5, + 19378: 0x7EA8, + 19379: 0x7EA9, + 19380: 0x93CE, + 19381: 0x93CF, + 19382: 0x93D0, + 19383: 0x93D1, + 19384: 0x93D2, + 19385: 0x93D3, + 19386: 0x93D4, + 19387: 0x93D5, + 19388: 0x93D7, + 19389: 0x93D8, + 19390: 0x93D9, + 19391: 0x93DA, + 19392: 0x93DB, + 19393: 0x93DC, + 19394: 0x93DD, + 19395: 0x93DE, + 19396: 0x93DF, + 19397: 0x93E0, + 19398: 0x93E1, + 19399: 0x93E2, + 19400: 0x93E3, + 19401: 0x93E4, + 19402: 0x93E5, + 19403: 0x93E6, + 19404: 0x93E7, + 19405: 0x93E8, + 19406: 0x93E9, + 19407: 0x93EA, + 19408: 0x93EB, + 19409: 0x93EC, + 19410: 0x93ED, + 19411: 0x93EE, + 19412: 0x93EF, + 19413: 0x93F0, + 19414: 0x93F1, + 19415: 0x93F2, + 19416: 0x93F3, + 19417: 0x93F4, + 19418: 0x93F5, + 19419: 0x93F6, + 19420: 0x93F7, + 19421: 0x93F8, + 19422: 0x93F9, + 19423: 0x93FA, + 19424: 0x93FB, + 19425: 0x93FC, + 19426: 0x93FD, + 19427: 0x93FE, + 19428: 0x93FF, + 19429: 0x9400, + 19430: 0x9401, + 19431: 0x9402, + 19432: 0x9403, + 19433: 0x9404, + 19434: 0x9405, + 19435: 0x9406, + 19436: 0x9407, + 19437: 0x9408, + 19438: 0x9409, + 19439: 0x940A, + 19440: 0x940B, + 19441: 0x940C, + 19442: 0x940D, + 19443: 0x940E, + 19444: 0x940F, + 19445: 0x9410, + 19446: 0x9411, + 19447: 0x9412, + 19448: 0x9413, + 19449: 0x9414, + 19450: 0x9415, + 19451: 0x9416, + 19452: 0x9417, + 19453: 0x9418, + 19454: 0x9419, + 19455: 0x941A, + 19456: 0x941B, + 19457: 0x941C, + 19458: 0x941D, + 19459: 0x941E, + 19460: 0x941F, + 19461: 0x9420, + 19462: 0x9421, + 19463: 0x9422, + 19464: 0x9423, + 19465: 0x9424, + 19466: 0x9425, + 19467: 0x9426, + 19468: 0x9427, + 19469: 0x9428, + 19470: 0x9429, + 19471: 0x942A, + 19472: 0x942B, + 19473: 0x942C, + 19474: 0x942D, + 19475: 0x942E, + 19476: 0x7EAD, + 19477: 0x7EB0, + 19478: 0x7EBE, + 19479: 0x7EC0, + 19480: 0x7EC1, + 19481: 0x7EC2, + 19482: 0x7EC9, + 19483: 0x7ECB, + 19484: 0x7ECC, + 19485: 0x7ED0, + 19486: 0x7ED4, + 19487: 0x7ED7, + 19488: 0x7EDB, + 19489: 0x7EE0, + 19490: 0x7EE1, + 19491: 0x7EE8, + 19492: 0x7EEB, + 19493: 0x7EEE, + 19494: 0x7EEF, + 19495: 0x7EF1, + 19496: 0x7EF2, + 19497: 0x7F0D, + 19498: 0x7EF6, + 19499: 0x7EFA, + 19500: 0x7EFB, + 19501: 0x7EFE, + 19502: 0x7F01, + 19503: 0x7F02, + 19504: 0x7F03, + 19505: 0x7F07, + 19506: 0x7F08, + 19507: 0x7F0B, + 19508: 0x7F0C, + 19509: 0x7F0F, + 19510: 0x7F11, + 19511: 0x7F12, + 19512: 0x7F17, + 19513: 0x7F19, + 19514: 0x7F1C, + 19515: 0x7F1B, + 19516: 0x7F1F, + 19517: 0x7F21, + 19518: 0x7F22, + 19519: 0x7F23, + 19520: 0x7F24, + 19521: 0x7F25, + 19522: 0x7F26, + 19523: 0x7F27, + 19524: 0x7F2A, + 19525: 0x7F2B, + 19526: 0x7F2C, + 19527: 0x7F2D, + 19528: 0x7F2F, + 19529: 0x7F30, + 19530: 0x7F31, + 19531: 0x7F32, + 19532: 0x7F33, + 19533: 0x7F35, + 19534: 0x5E7A, + 19535: 0x757F, + 19536: 0x5DDB, + 19537: 0x753E, + 19538: 0x9095, + 19539: 0x738E, + 19540: 0x7391, + 19541: 0x73AE, + 19542: 0x73A2, + 19543: 0x739F, + 19544: 0x73CF, + 19545: 0x73C2, + 19546: 0x73D1, + 19547: 0x73B7, + 19548: 0x73B3, + 19549: 0x73C0, + 19550: 0x73C9, + 19551: 0x73C8, + 19552: 0x73E5, + 19553: 0x73D9, + 19554: 0x987C, + 19555: 0x740A, + 19556: 0x73E9, + 19557: 0x73E7, + 19558: 0x73DE, + 19559: 0x73BA, + 19560: 0x73F2, + 19561: 0x740F, + 19562: 0x742A, + 19563: 0x745B, + 19564: 0x7426, + 19565: 0x7425, + 19566: 0x7428, + 19567: 0x7430, + 19568: 0x742E, + 19569: 0x742C, + 19570: 0x942F, + 19571: 0x9430, + 19572: 0x9431, + 19573: 0x9432, + 19574: 0x9433, + 19575: 0x9434, + 19576: 0x9435, + 19577: 0x9436, + 19578: 0x9437, + 19579: 0x9438, + 19580: 0x9439, + 19581: 0x943A, + 19582: 0x943B, + 19583: 0x943C, + 19584: 0x943D, + 19585: 0x943F, + 19586: 0x9440, + 19587: 0x9441, + 19588: 0x9442, + 19589: 0x9443, + 19590: 0x9444, + 19591: 0x9445, + 19592: 0x9446, + 19593: 0x9447, + 19594: 0x9448, + 19595: 0x9449, + 19596: 0x944A, + 19597: 0x944B, + 19598: 0x944C, + 19599: 0x944D, + 19600: 0x944E, + 19601: 0x944F, + 19602: 0x9450, + 19603: 0x9451, + 19604: 0x9452, + 19605: 0x9453, + 19606: 0x9454, + 19607: 0x9455, + 19608: 0x9456, + 19609: 0x9457, + 19610: 0x9458, + 19611: 0x9459, + 19612: 0x945A, + 19613: 0x945B, + 19614: 0x945C, + 19615: 0x945D, + 19616: 0x945E, + 19617: 0x945F, + 19618: 0x9460, + 19619: 0x9461, + 19620: 0x9462, + 19621: 0x9463, + 19622: 0x9464, + 19623: 0x9465, + 19624: 0x9466, + 19625: 0x9467, + 19626: 0x9468, + 19627: 0x9469, + 19628: 0x946A, + 19629: 0x946C, + 19630: 0x946D, + 19631: 0x946E, + 19632: 0x946F, + 19633: 0x9470, + 19634: 0x9471, + 19635: 0x9472, + 19636: 0x9473, + 19637: 0x9474, + 19638: 0x9475, + 19639: 0x9476, + 19640: 0x9477, + 19641: 0x9478, + 19642: 0x9479, + 19643: 0x947A, + 19644: 0x947B, + 19645: 0x947C, + 19646: 0x947D, + 19647: 0x947E, + 19648: 0x947F, + 19649: 0x9480, + 19650: 0x9481, + 19651: 0x9482, + 19652: 0x9483, + 19653: 0x9484, + 19654: 0x9491, + 19655: 0x9496, + 19656: 0x9498, + 19657: 0x94C7, + 19658: 0x94CF, + 19659: 0x94D3, + 19660: 0x94D4, + 19661: 0x94DA, + 19662: 0x94E6, + 19663: 0x94FB, + 19664: 0x951C, + 19665: 0x9520, + 19666: 0x741B, + 19667: 0x741A, + 19668: 0x7441, + 19669: 0x745C, + 19670: 0x7457, + 19671: 0x7455, + 19672: 0x7459, + 19673: 0x7477, + 19674: 0x746D, + 19675: 0x747E, + 19676: 0x749C, + 19677: 0x748E, + 19678: 0x7480, + 19679: 0x7481, + 19680: 0x7487, + 19681: 0x748B, + 19682: 0x749E, + 19683: 0x74A8, + 19684: 0x74A9, + 19685: 0x7490, + 19686: 0x74A7, + 19687: 0x74D2, + 19688: 0x74BA, + 19689: 0x97EA, + 19690: 0x97EB, + 19691: 0x97EC, + 19692: 0x674C, + 19693: 0x6753, + 19694: 0x675E, + 19695: 0x6748, + 19696: 0x6769, + 19697: 0x67A5, + 19698: 0x6787, + 19699: 0x676A, + 19700: 0x6773, + 19701: 0x6798, + 19702: 0x67A7, + 19703: 0x6775, + 19704: 0x67A8, + 19705: 0x679E, + 19706: 0x67AD, + 19707: 0x678B, + 19708: 0x6777, + 19709: 0x677C, + 19710: 0x67F0, + 19711: 0x6809, + 19712: 0x67D8, + 19713: 0x680A, + 19714: 0x67E9, + 19715: 0x67B0, + 19716: 0x680C, + 19717: 0x67D9, + 19718: 0x67B5, + 19719: 0x67DA, + 19720: 0x67B3, + 19721: 0x67DD, + 19722: 0x6800, + 19723: 0x67C3, + 19724: 0x67B8, + 19725: 0x67E2, + 19726: 0x680E, + 19727: 0x67C1, + 19728: 0x67FD, + 19729: 0x6832, + 19730: 0x6833, + 19731: 0x6860, + 19732: 0x6861, + 19733: 0x684E, + 19734: 0x6862, + 19735: 0x6844, + 19736: 0x6864, + 19737: 0x6883, + 19738: 0x681D, + 19739: 0x6855, + 19740: 0x6866, + 19741: 0x6841, + 19742: 0x6867, + 19743: 0x6840, + 19744: 0x683E, + 19745: 0x684A, + 19746: 0x6849, + 19747: 0x6829, + 19748: 0x68B5, + 19749: 0x688F, + 19750: 0x6874, + 19751: 0x6877, + 19752: 0x6893, + 19753: 0x686B, + 19754: 0x68C2, + 19755: 0x696E, + 19756: 0x68FC, + 19757: 0x691F, + 19758: 0x6920, + 19759: 0x68F9, + 19760: 0x9527, + 19761: 0x9533, + 19762: 0x953D, + 19763: 0x9543, + 19764: 0x9548, + 19765: 0x954B, + 19766: 0x9555, + 19767: 0x955A, + 19768: 0x9560, + 19769: 0x956E, + 19770: 0x9574, + 19771: 0x9575, + 19772: 0x9577, + 19773: 0x9578, + 19774: 0x9579, + 19775: 0x957A, + 19776: 0x957B, + 19777: 0x957C, + 19778: 0x957D, + 19779: 0x957E, + 19780: 0x9580, + 19781: 0x9581, + 19782: 0x9582, + 19783: 0x9583, + 19784: 0x9584, + 19785: 0x9585, + 19786: 0x9586, + 19787: 0x9587, + 19788: 0x9588, + 19789: 0x9589, + 19790: 0x958A, + 19791: 0x958B, + 19792: 0x958C, + 19793: 0x958D, + 19794: 0x958E, + 19795: 0x958F, + 19796: 0x9590, + 19797: 0x9591, + 19798: 0x9592, + 19799: 0x9593, + 19800: 0x9594, + 19801: 0x9595, + 19802: 0x9596, + 19803: 0x9597, + 19804: 0x9598, + 19805: 0x9599, + 19806: 0x959A, + 19807: 0x959B, + 19808: 0x959C, + 19809: 0x959D, + 19810: 0x959E, + 19811: 0x959F, + 19812: 0x95A0, + 19813: 0x95A1, + 19814: 0x95A2, + 19815: 0x95A3, + 19816: 0x95A4, + 19817: 0x95A5, + 19818: 0x95A6, + 19819: 0x95A7, + 19820: 0x95A8, + 19821: 0x95A9, + 19822: 0x95AA, + 19823: 0x95AB, + 19824: 0x95AC, + 19825: 0x95AD, + 19826: 0x95AE, + 19827: 0x95AF, + 19828: 0x95B0, + 19829: 0x95B1, + 19830: 0x95B2, + 19831: 0x95B3, + 19832: 0x95B4, + 19833: 0x95B5, + 19834: 0x95B6, + 19835: 0x95B7, + 19836: 0x95B8, + 19837: 0x95B9, + 19838: 0x95BA, + 19839: 0x95BB, + 19840: 0x95BC, + 19841: 0x95BD, + 19842: 0x95BE, + 19843: 0x95BF, + 19844: 0x95C0, + 19845: 0x95C1, + 19846: 0x95C2, + 19847: 0x95C3, + 19848: 0x95C4, + 19849: 0x95C5, + 19850: 0x95C6, + 19851: 0x95C7, + 19852: 0x95C8, + 19853: 0x95C9, + 19854: 0x95CA, + 19855: 0x95CB, + 19856: 0x6924, + 19857: 0x68F0, + 19858: 0x690B, + 19859: 0x6901, + 19860: 0x6957, + 19861: 0x68E3, + 19862: 0x6910, + 19863: 0x6971, + 19864: 0x6939, + 19865: 0x6960, + 19866: 0x6942, + 19867: 0x695D, + 19868: 0x6984, + 19869: 0x696B, + 19870: 0x6980, + 19871: 0x6998, + 19872: 0x6978, + 19873: 0x6934, + 19874: 0x69CC, + 19875: 0x6987, + 19876: 0x6988, + 19877: 0x69CE, + 19878: 0x6989, + 19879: 0x6966, + 19880: 0x6963, + 19881: 0x6979, + 19882: 0x699B, + 19883: 0x69A7, + 19884: 0x69BB, + 19885: 0x69AB, + 19886: 0x69AD, + 19887: 0x69D4, + 19888: 0x69B1, + 19889: 0x69C1, + 19890: 0x69CA, + 19891: 0x69DF, + 19892: 0x6995, + 19893: 0x69E0, + 19894: 0x698D, + 19895: 0x69FF, + 19896: 0x6A2F, + 19897: 0x69ED, + 19898: 0x6A17, + 19899: 0x6A18, + 19900: 0x6A65, + 19901: 0x69F2, + 19902: 0x6A44, + 19903: 0x6A3E, + 19904: 0x6AA0, + 19905: 0x6A50, + 19906: 0x6A5B, + 19907: 0x6A35, + 19908: 0x6A8E, + 19909: 0x6A79, + 19910: 0x6A3D, + 19911: 0x6A28, + 19912: 0x6A58, + 19913: 0x6A7C, + 19914: 0x6A91, + 19915: 0x6A90, + 19916: 0x6AA9, + 19917: 0x6A97, + 19918: 0x6AAB, + 19919: 0x7337, + 19920: 0x7352, + 19921: 0x6B81, + 19922: 0x6B82, + 19923: 0x6B87, + 19924: 0x6B84, + 19925: 0x6B92, + 19926: 0x6B93, + 19927: 0x6B8D, + 19928: 0x6B9A, + 19929: 0x6B9B, + 19930: 0x6BA1, + 19931: 0x6BAA, + 19932: 0x8F6B, + 19933: 0x8F6D, + 19934: 0x8F71, + 19935: 0x8F72, + 19936: 0x8F73, + 19937: 0x8F75, + 19938: 0x8F76, + 19939: 0x8F78, + 19940: 0x8F77, + 19941: 0x8F79, + 19942: 0x8F7A, + 19943: 0x8F7C, + 19944: 0x8F7E, + 19945: 0x8F81, + 19946: 0x8F82, + 19947: 0x8F84, + 19948: 0x8F87, + 19949: 0x8F8B, + 19950: 0x95CC, + 19951: 0x95CD, + 19952: 0x95CE, + 19953: 0x95CF, + 19954: 0x95D0, + 19955: 0x95D1, + 19956: 0x95D2, + 19957: 0x95D3, + 19958: 0x95D4, + 19959: 0x95D5, + 19960: 0x95D6, + 19961: 0x95D7, + 19962: 0x95D8, + 19963: 0x95D9, + 19964: 0x95DA, + 19965: 0x95DB, + 19966: 0x95DC, + 19967: 0x95DD, + 19968: 0x95DE, + 19969: 0x95DF, + 19970: 0x95E0, + 19971: 0x95E1, + 19972: 0x95E2, + 19973: 0x95E3, + 19974: 0x95E4, + 19975: 0x95E5, + 19976: 0x95E6, + 19977: 0x95E7, + 19978: 0x95EC, + 19979: 0x95FF, + 19980: 0x9607, + 19981: 0x9613, + 19982: 0x9618, + 19983: 0x961B, + 19984: 0x961E, + 19985: 0x9620, + 19986: 0x9623, + 19987: 0x9624, + 19988: 0x9625, + 19989: 0x9626, + 19990: 0x9627, + 19991: 0x9628, + 19992: 0x9629, + 19993: 0x962B, + 19994: 0x962C, + 19995: 0x962D, + 19996: 0x962F, + 19997: 0x9630, + 19998: 0x9637, + 19999: 0x9638, + 20000: 0x9639, + 20001: 0x963A, + 20002: 0x963E, + 20003: 0x9641, + 20004: 0x9643, + 20005: 0x964A, + 20006: 0x964E, + 20007: 0x964F, + 20008: 0x9651, + 20009: 0x9652, + 20010: 0x9653, + 20011: 0x9656, + 20012: 0x9657, + 20013: 0x9658, + 20014: 0x9659, + 20015: 0x965A, + 20016: 0x965C, + 20017: 0x965D, + 20018: 0x965E, + 20019: 0x9660, + 20020: 0x9663, + 20021: 0x9665, + 20022: 0x9666, + 20023: 0x966B, + 20024: 0x966D, + 20025: 0x966E, + 20026: 0x966F, + 20027: 0x9670, + 20028: 0x9671, + 20029: 0x9673, + 20030: 0x9678, + 20031: 0x9679, + 20032: 0x967A, + 20033: 0x967B, + 20034: 0x967C, + 20035: 0x967D, + 20036: 0x967E, + 20037: 0x967F, + 20038: 0x9680, + 20039: 0x9681, + 20040: 0x9682, + 20041: 0x9683, + 20042: 0x9684, + 20043: 0x9687, + 20044: 0x9689, + 20045: 0x968A, + 20046: 0x8F8D, + 20047: 0x8F8E, + 20048: 0x8F8F, + 20049: 0x8F98, + 20050: 0x8F9A, + 20051: 0x8ECE, + 20052: 0x620B, + 20053: 0x6217, + 20054: 0x621B, + 20055: 0x621F, + 20056: 0x6222, + 20057: 0x6221, + 20058: 0x6225, + 20059: 0x6224, + 20060: 0x622C, + 20061: 0x81E7, + 20062: 0x74EF, + 20063: 0x74F4, + 20064: 0x74FF, + 20065: 0x750F, + 20066: 0x7511, + 20067: 0x7513, + 20068: 0x6534, + 20069: 0x65EE, + 20070: 0x65EF, + 20071: 0x65F0, + 20072: 0x660A, + 20073: 0x6619, + 20074: 0x6772, + 20075: 0x6603, + 20076: 0x6615, + 20077: 0x6600, + 20078: 0x7085, + 20079: 0x66F7, + 20080: 0x661D, + 20081: 0x6634, + 20082: 0x6631, + 20083: 0x6636, + 20084: 0x6635, + 20085: 0x8006, + 20086: 0x665F, + 20087: 0x6654, + 20088: 0x6641, + 20089: 0x664F, + 20090: 0x6656, + 20091: 0x6661, + 20092: 0x6657, + 20093: 0x6677, + 20094: 0x6684, + 20095: 0x668C, + 20096: 0x66A7, + 20097: 0x669D, + 20098: 0x66BE, + 20099: 0x66DB, + 20100: 0x66DC, + 20101: 0x66E6, + 20102: 0x66E9, + 20103: 0x8D32, + 20104: 0x8D33, + 20105: 0x8D36, + 20106: 0x8D3B, + 20107: 0x8D3D, + 20108: 0x8D40, + 20109: 0x8D45, + 20110: 0x8D46, + 20111: 0x8D48, + 20112: 0x8D49, + 20113: 0x8D47, + 20114: 0x8D4D, + 20115: 0x8D55, + 20116: 0x8D59, + 20117: 0x89C7, + 20118: 0x89CA, + 20119: 0x89CB, + 20120: 0x89CC, + 20121: 0x89CE, + 20122: 0x89CF, + 20123: 0x89D0, + 20124: 0x89D1, + 20125: 0x726E, + 20126: 0x729F, + 20127: 0x725D, + 20128: 0x7266, + 20129: 0x726F, + 20130: 0x727E, + 20131: 0x727F, + 20132: 0x7284, + 20133: 0x728B, + 20134: 0x728D, + 20135: 0x728F, + 20136: 0x7292, + 20137: 0x6308, + 20138: 0x6332, + 20139: 0x63B0, + 20140: 0x968C, + 20141: 0x968E, + 20142: 0x9691, + 20143: 0x9692, + 20144: 0x9693, + 20145: 0x9695, + 20146: 0x9696, + 20147: 0x969A, + 20148: 0x969B, + 20149: 0x969D, + 20150: 0x969E, + 20151: 0x969F, + 20152: 0x96A0, + 20153: 0x96A1, + 20154: 0x96A2, + 20155: 0x96A3, + 20156: 0x96A4, + 20157: 0x96A5, + 20158: 0x96A6, + 20159: 0x96A8, + 20160: 0x96A9, + 20161: 0x96AA, + 20162: 0x96AB, + 20163: 0x96AC, + 20164: 0x96AD, + 20165: 0x96AE, + 20166: 0x96AF, + 20167: 0x96B1, + 20168: 0x96B2, + 20169: 0x96B4, + 20170: 0x96B5, + 20171: 0x96B7, + 20172: 0x96B8, + 20173: 0x96BA, + 20174: 0x96BB, + 20175: 0x96BF, + 20176: 0x96C2, + 20177: 0x96C3, + 20178: 0x96C8, + 20179: 0x96CA, + 20180: 0x96CB, + 20181: 0x96D0, + 20182: 0x96D1, + 20183: 0x96D3, + 20184: 0x96D4, + 20185: 0x96D6, + 20186: 0x96D7, + 20187: 0x96D8, + 20188: 0x96D9, + 20189: 0x96DA, + 20190: 0x96DB, + 20191: 0x96DC, + 20192: 0x96DD, + 20193: 0x96DE, + 20194: 0x96DF, + 20195: 0x96E1, + 20196: 0x96E2, + 20197: 0x96E3, + 20198: 0x96E4, + 20199: 0x96E5, + 20200: 0x96E6, + 20201: 0x96E7, + 20202: 0x96EB, + 20203: 0x96EC, + 20204: 0x96ED, + 20205: 0x96EE, + 20206: 0x96F0, + 20207: 0x96F1, + 20208: 0x96F2, + 20209: 0x96F4, + 20210: 0x96F5, + 20211: 0x96F8, + 20212: 0x96FA, + 20213: 0x96FB, + 20214: 0x96FC, + 20215: 0x96FD, + 20216: 0x96FF, + 20217: 0x9702, + 20218: 0x9703, + 20219: 0x9705, + 20220: 0x970A, + 20221: 0x970B, + 20222: 0x970C, + 20223: 0x9710, + 20224: 0x9711, + 20225: 0x9712, + 20226: 0x9714, + 20227: 0x9715, + 20228: 0x9717, + 20229: 0x9718, + 20230: 0x9719, + 20231: 0x971A, + 20232: 0x971B, + 20233: 0x971D, + 20234: 0x971F, + 20235: 0x9720, + 20236: 0x643F, + 20237: 0x64D8, + 20238: 0x8004, + 20239: 0x6BEA, + 20240: 0x6BF3, + 20241: 0x6BFD, + 20242: 0x6BF5, + 20243: 0x6BF9, + 20244: 0x6C05, + 20245: 0x6C07, + 20246: 0x6C06, + 20247: 0x6C0D, + 20248: 0x6C15, + 20249: 0x6C18, + 20250: 0x6C19, + 20251: 0x6C1A, + 20252: 0x6C21, + 20253: 0x6C29, + 20254: 0x6C24, + 20255: 0x6C2A, + 20256: 0x6C32, + 20257: 0x6535, + 20258: 0x6555, + 20259: 0x656B, + 20260: 0x724D, + 20261: 0x7252, + 20262: 0x7256, + 20263: 0x7230, + 20264: 0x8662, + 20265: 0x5216, + 20266: 0x809F, + 20267: 0x809C, + 20268: 0x8093, + 20269: 0x80BC, + 20270: 0x670A, + 20271: 0x80BD, + 20272: 0x80B1, + 20273: 0x80AB, + 20274: 0x80AD, + 20275: 0x80B4, + 20276: 0x80B7, + 20277: 0x80E7, + 20278: 0x80E8, + 20279: 0x80E9, + 20280: 0x80EA, + 20281: 0x80DB, + 20282: 0x80C2, + 20283: 0x80C4, + 20284: 0x80D9, + 20285: 0x80CD, + 20286: 0x80D7, + 20287: 0x6710, + 20288: 0x80DD, + 20289: 0x80EB, + 20290: 0x80F1, + 20291: 0x80F4, + 20292: 0x80ED, + 20293: 0x810D, + 20294: 0x810E, + 20295: 0x80F2, + 20296: 0x80FC, + 20297: 0x6715, + 20298: 0x8112, + 20299: 0x8C5A, + 20300: 0x8136, + 20301: 0x811E, + 20302: 0x812C, + 20303: 0x8118, + 20304: 0x8132, + 20305: 0x8148, + 20306: 0x814C, + 20307: 0x8153, + 20308: 0x8174, + 20309: 0x8159, + 20310: 0x815A, + 20311: 0x8171, + 20312: 0x8160, + 20313: 0x8169, + 20314: 0x817C, + 20315: 0x817D, + 20316: 0x816D, + 20317: 0x8167, + 20318: 0x584D, + 20319: 0x5AB5, + 20320: 0x8188, + 20321: 0x8182, + 20322: 0x8191, + 20323: 0x6ED5, + 20324: 0x81A3, + 20325: 0x81AA, + 20326: 0x81CC, + 20327: 0x6726, + 20328: 0x81CA, + 20329: 0x81BB, + 20330: 0x9721, + 20331: 0x9722, + 20332: 0x9723, + 20333: 0x9724, + 20334: 0x9725, + 20335: 0x9726, + 20336: 0x9727, + 20337: 0x9728, + 20338: 0x9729, + 20339: 0x972B, + 20340: 0x972C, + 20341: 0x972E, + 20342: 0x972F, + 20343: 0x9731, + 20344: 0x9733, + 20345: 0x9734, + 20346: 0x9735, + 20347: 0x9736, + 20348: 0x9737, + 20349: 0x973A, + 20350: 0x973B, + 20351: 0x973C, + 20352: 0x973D, + 20353: 0x973F, + 20354: 0x9740, + 20355: 0x9741, + 20356: 0x9742, + 20357: 0x9743, + 20358: 0x9744, + 20359: 0x9745, + 20360: 0x9746, + 20361: 0x9747, + 20362: 0x9748, + 20363: 0x9749, + 20364: 0x974A, + 20365: 0x974B, + 20366: 0x974C, + 20367: 0x974D, + 20368: 0x974E, + 20369: 0x974F, + 20370: 0x9750, + 20371: 0x9751, + 20372: 0x9754, + 20373: 0x9755, + 20374: 0x9757, + 20375: 0x9758, + 20376: 0x975A, + 20377: 0x975C, + 20378: 0x975D, + 20379: 0x975F, + 20380: 0x9763, + 20381: 0x9764, + 20382: 0x9766, + 20383: 0x9767, + 20384: 0x9768, + 20385: 0x976A, + 20386: 0x976B, + 20387: 0x976C, + 20388: 0x976D, + 20389: 0x976E, + 20390: 0x976F, + 20391: 0x9770, + 20392: 0x9771, + 20393: 0x9772, + 20394: 0x9775, + 20395: 0x9777, + 20396: 0x9778, + 20397: 0x9779, + 20398: 0x977A, + 20399: 0x977B, + 20400: 0x977D, + 20401: 0x977E, + 20402: 0x977F, + 20403: 0x9780, + 20404: 0x9781, + 20405: 0x9782, + 20406: 0x9783, + 20407: 0x9784, + 20408: 0x9786, + 20409: 0x9787, + 20410: 0x9788, + 20411: 0x9789, + 20412: 0x978A, + 20413: 0x978C, + 20414: 0x978E, + 20415: 0x978F, + 20416: 0x9790, + 20417: 0x9793, + 20418: 0x9795, + 20419: 0x9796, + 20420: 0x9797, + 20421: 0x9799, + 20422: 0x979A, + 20423: 0x979B, + 20424: 0x979C, + 20425: 0x979D, + 20426: 0x81C1, + 20427: 0x81A6, + 20428: 0x6B24, + 20429: 0x6B37, + 20430: 0x6B39, + 20431: 0x6B43, + 20432: 0x6B46, + 20433: 0x6B59, + 20434: 0x98D1, + 20435: 0x98D2, + 20436: 0x98D3, + 20437: 0x98D5, + 20438: 0x98D9, + 20439: 0x98DA, + 20440: 0x6BB3, + 20441: 0x5F40, + 20442: 0x6BC2, + 20443: 0x89F3, + 20444: 0x6590, + 20445: 0x9F51, + 20446: 0x6593, + 20447: 0x65BC, + 20448: 0x65C6, + 20449: 0x65C4, + 20450: 0x65C3, + 20451: 0x65CC, + 20452: 0x65CE, + 20453: 0x65D2, + 20454: 0x65D6, + 20455: 0x7080, + 20456: 0x709C, + 20457: 0x7096, + 20458: 0x709D, + 20459: 0x70BB, + 20460: 0x70C0, + 20461: 0x70B7, + 20462: 0x70AB, + 20463: 0x70B1, + 20464: 0x70E8, + 20465: 0x70CA, + 20466: 0x7110, + 20467: 0x7113, + 20468: 0x7116, + 20469: 0x712F, + 20470: 0x7131, + 20471: 0x7173, + 20472: 0x715C, + 20473: 0x7168, + 20474: 0x7145, + 20475: 0x7172, + 20476: 0x714A, + 20477: 0x7178, + 20478: 0x717A, + 20479: 0x7198, + 20480: 0x71B3, + 20481: 0x71B5, + 20482: 0x71A8, + 20483: 0x71A0, + 20484: 0x71E0, + 20485: 0x71D4, + 20486: 0x71E7, + 20487: 0x71F9, + 20488: 0x721D, + 20489: 0x7228, + 20490: 0x706C, + 20491: 0x7118, + 20492: 0x7166, + 20493: 0x71B9, + 20494: 0x623E, + 20495: 0x623D, + 20496: 0x6243, + 20497: 0x6248, + 20498: 0x6249, + 20499: 0x793B, + 20500: 0x7940, + 20501: 0x7946, + 20502: 0x7949, + 20503: 0x795B, + 20504: 0x795C, + 20505: 0x7953, + 20506: 0x795A, + 20507: 0x7962, + 20508: 0x7957, + 20509: 0x7960, + 20510: 0x796F, + 20511: 0x7967, + 20512: 0x797A, + 20513: 0x7985, + 20514: 0x798A, + 20515: 0x799A, + 20516: 0x79A7, + 20517: 0x79B3, + 20518: 0x5FD1, + 20519: 0x5FD0, + 20520: 0x979E, + 20521: 0x979F, + 20522: 0x97A1, + 20523: 0x97A2, + 20524: 0x97A4, + 20525: 0x97A5, + 20526: 0x97A6, + 20527: 0x97A7, + 20528: 0x97A8, + 20529: 0x97A9, + 20530: 0x97AA, + 20531: 0x97AC, + 20532: 0x97AE, + 20533: 0x97B0, + 20534: 0x97B1, + 20535: 0x97B3, + 20536: 0x97B5, + 20537: 0x97B6, + 20538: 0x97B7, + 20539: 0x97B8, + 20540: 0x97B9, + 20541: 0x97BA, + 20542: 0x97BB, + 20543: 0x97BC, + 20544: 0x97BD, + 20545: 0x97BE, + 20546: 0x97BF, + 20547: 0x97C0, + 20548: 0x97C1, + 20549: 0x97C2, + 20550: 0x97C3, + 20551: 0x97C4, + 20552: 0x97C5, + 20553: 0x97C6, + 20554: 0x97C7, + 20555: 0x97C8, + 20556: 0x97C9, + 20557: 0x97CA, + 20558: 0x97CB, + 20559: 0x97CC, + 20560: 0x97CD, + 20561: 0x97CE, + 20562: 0x97CF, + 20563: 0x97D0, + 20564: 0x97D1, + 20565: 0x97D2, + 20566: 0x97D3, + 20567: 0x97D4, + 20568: 0x97D5, + 20569: 0x97D6, + 20570: 0x97D7, + 20571: 0x97D8, + 20572: 0x97D9, + 20573: 0x97DA, + 20574: 0x97DB, + 20575: 0x97DC, + 20576: 0x97DD, + 20577: 0x97DE, + 20578: 0x97DF, + 20579: 0x97E0, + 20580: 0x97E1, + 20581: 0x97E2, + 20582: 0x97E3, + 20583: 0x97E4, + 20584: 0x97E5, + 20585: 0x97E8, + 20586: 0x97EE, + 20587: 0x97EF, + 20588: 0x97F0, + 20589: 0x97F1, + 20590: 0x97F2, + 20591: 0x97F4, + 20592: 0x97F7, + 20593: 0x97F8, + 20594: 0x97F9, + 20595: 0x97FA, + 20596: 0x97FB, + 20597: 0x97FC, + 20598: 0x97FD, + 20599: 0x97FE, + 20600: 0x97FF, + 20601: 0x9800, + 20602: 0x9801, + 20603: 0x9802, + 20604: 0x9803, + 20605: 0x9804, + 20606: 0x9805, + 20607: 0x9806, + 20608: 0x9807, + 20609: 0x9808, + 20610: 0x9809, + 20611: 0x980A, + 20612: 0x980B, + 20613: 0x980C, + 20614: 0x980D, + 20615: 0x980E, + 20616: 0x603C, + 20617: 0x605D, + 20618: 0x605A, + 20619: 0x6067, + 20620: 0x6041, + 20621: 0x6059, + 20622: 0x6063, + 20623: 0x60AB, + 20624: 0x6106, + 20625: 0x610D, + 20626: 0x615D, + 20627: 0x61A9, + 20628: 0x619D, + 20629: 0x61CB, + 20630: 0x61D1, + 20631: 0x6206, + 20632: 0x8080, + 20633: 0x807F, + 20634: 0x6C93, + 20635: 0x6CF6, + 20636: 0x6DFC, + 20637: 0x77F6, + 20638: 0x77F8, + 20639: 0x7800, + 20640: 0x7809, + 20641: 0x7817, + 20642: 0x7818, + 20643: 0x7811, + 20644: 0x65AB, + 20645: 0x782D, + 20646: 0x781C, + 20647: 0x781D, + 20648: 0x7839, + 20649: 0x783A, + 20650: 0x783B, + 20651: 0x781F, + 20652: 0x783C, + 20653: 0x7825, + 20654: 0x782C, + 20655: 0x7823, + 20656: 0x7829, + 20657: 0x784E, + 20658: 0x786D, + 20659: 0x7856, + 20660: 0x7857, + 20661: 0x7826, + 20662: 0x7850, + 20663: 0x7847, + 20664: 0x784C, + 20665: 0x786A, + 20666: 0x789B, + 20667: 0x7893, + 20668: 0x789A, + 20669: 0x7887, + 20670: 0x789C, + 20671: 0x78A1, + 20672: 0x78A3, + 20673: 0x78B2, + 20674: 0x78B9, + 20675: 0x78A5, + 20676: 0x78D4, + 20677: 0x78D9, + 20678: 0x78C9, + 20679: 0x78EC, + 20680: 0x78F2, + 20681: 0x7905, + 20682: 0x78F4, + 20683: 0x7913, + 20684: 0x7924, + 20685: 0x791E, + 20686: 0x7934, + 20687: 0x9F9B, + 20688: 0x9EF9, + 20689: 0x9EFB, + 20690: 0x9EFC, + 20691: 0x76F1, + 20692: 0x7704, + 20693: 0x770D, + 20694: 0x76F9, + 20695: 0x7707, + 20696: 0x7708, + 20697: 0x771A, + 20698: 0x7722, + 20699: 0x7719, + 20700: 0x772D, + 20701: 0x7726, + 20702: 0x7735, + 20703: 0x7738, + 20704: 0x7750, + 20705: 0x7751, + 20706: 0x7747, + 20707: 0x7743, + 20708: 0x775A, + 20709: 0x7768, + 20710: 0x980F, + 20711: 0x9810, + 20712: 0x9811, + 20713: 0x9812, + 20714: 0x9813, + 20715: 0x9814, + 20716: 0x9815, + 20717: 0x9816, + 20718: 0x9817, + 20719: 0x9818, + 20720: 0x9819, + 20721: 0x981A, + 20722: 0x981B, + 20723: 0x981C, + 20724: 0x981D, + 20725: 0x981E, + 20726: 0x981F, + 20727: 0x9820, + 20728: 0x9821, + 20729: 0x9822, + 20730: 0x9823, + 20731: 0x9824, + 20732: 0x9825, + 20733: 0x9826, + 20734: 0x9827, + 20735: 0x9828, + 20736: 0x9829, + 20737: 0x982A, + 20738: 0x982B, + 20739: 0x982C, + 20740: 0x982D, + 20741: 0x982E, + 20742: 0x982F, + 20743: 0x9830, + 20744: 0x9831, + 20745: 0x9832, + 20746: 0x9833, + 20747: 0x9834, + 20748: 0x9835, + 20749: 0x9836, + 20750: 0x9837, + 20751: 0x9838, + 20752: 0x9839, + 20753: 0x983A, + 20754: 0x983B, + 20755: 0x983C, + 20756: 0x983D, + 20757: 0x983E, + 20758: 0x983F, + 20759: 0x9840, + 20760: 0x9841, + 20761: 0x9842, + 20762: 0x9843, + 20763: 0x9844, + 20764: 0x9845, + 20765: 0x9846, + 20766: 0x9847, + 20767: 0x9848, + 20768: 0x9849, + 20769: 0x984A, + 20770: 0x984B, + 20771: 0x984C, + 20772: 0x984D, + 20773: 0x984E, + 20774: 0x984F, + 20775: 0x9850, + 20776: 0x9851, + 20777: 0x9852, + 20778: 0x9853, + 20779: 0x9854, + 20780: 0x9855, + 20781: 0x9856, + 20782: 0x9857, + 20783: 0x9858, + 20784: 0x9859, + 20785: 0x985A, + 20786: 0x985B, + 20787: 0x985C, + 20788: 0x985D, + 20789: 0x985E, + 20790: 0x985F, + 20791: 0x9860, + 20792: 0x9861, + 20793: 0x9862, + 20794: 0x9863, + 20795: 0x9864, + 20796: 0x9865, + 20797: 0x9866, + 20798: 0x9867, + 20799: 0x9868, + 20800: 0x9869, + 20801: 0x986A, + 20802: 0x986B, + 20803: 0x986C, + 20804: 0x986D, + 20805: 0x986E, + 20806: 0x7762, + 20807: 0x7765, + 20808: 0x777F, + 20809: 0x778D, + 20810: 0x777D, + 20811: 0x7780, + 20812: 0x778C, + 20813: 0x7791, + 20814: 0x779F, + 20815: 0x77A0, + 20816: 0x77B0, + 20817: 0x77B5, + 20818: 0x77BD, + 20819: 0x753A, + 20820: 0x7540, + 20821: 0x754E, + 20822: 0x754B, + 20823: 0x7548, + 20824: 0x755B, + 20825: 0x7572, + 20826: 0x7579, + 20827: 0x7583, + 20828: 0x7F58, + 20829: 0x7F61, + 20830: 0x7F5F, + 20831: 0x8A48, + 20832: 0x7F68, + 20833: 0x7F74, + 20834: 0x7F71, + 20835: 0x7F79, + 20836: 0x7F81, + 20837: 0x7F7E, + 20838: 0x76CD, + 20839: 0x76E5, + 20840: 0x8832, + 20841: 0x9485, + 20842: 0x9486, + 20843: 0x9487, + 20844: 0x948B, + 20845: 0x948A, + 20846: 0x948C, + 20847: 0x948D, + 20848: 0x948F, + 20849: 0x9490, + 20850: 0x9494, + 20851: 0x9497, + 20852: 0x9495, + 20853: 0x949A, + 20854: 0x949B, + 20855: 0x949C, + 20856: 0x94A3, + 20857: 0x94A4, + 20858: 0x94AB, + 20859: 0x94AA, + 20860: 0x94AD, + 20861: 0x94AC, + 20862: 0x94AF, + 20863: 0x94B0, + 20864: 0x94B2, + 20865: 0x94B4, + 20866: 0x94B6, + 20867: 0x94B7, + 20868: 0x94B8, + 20869: 0x94B9, + 20870: 0x94BA, + 20871: 0x94BC, + 20872: 0x94BD, + 20873: 0x94BF, + 20874: 0x94C4, + 20875: 0x94C8, + 20876: 0x94C9, + 20877: 0x94CA, + 20878: 0x94CB, + 20879: 0x94CC, + 20880: 0x94CD, + 20881: 0x94CE, + 20882: 0x94D0, + 20883: 0x94D1, + 20884: 0x94D2, + 20885: 0x94D5, + 20886: 0x94D6, + 20887: 0x94D7, + 20888: 0x94D9, + 20889: 0x94D8, + 20890: 0x94DB, + 20891: 0x94DE, + 20892: 0x94DF, + 20893: 0x94E0, + 20894: 0x94E2, + 20895: 0x94E4, + 20896: 0x94E5, + 20897: 0x94E7, + 20898: 0x94E8, + 20899: 0x94EA, + 20900: 0x986F, + 20901: 0x9870, + 20902: 0x9871, + 20903: 0x9872, + 20904: 0x9873, + 20905: 0x9874, + 20906: 0x988B, + 20907: 0x988E, + 20908: 0x9892, + 20909: 0x9895, + 20910: 0x9899, + 20911: 0x98A3, + 20912: 0x98A8, + 20913: 0x98A9, + 20914: 0x98AA, + 20915: 0x98AB, + 20916: 0x98AC, + 20917: 0x98AD, + 20918: 0x98AE, + 20919: 0x98AF, + 20920: 0x98B0, + 20921: 0x98B1, + 20922: 0x98B2, + 20923: 0x98B3, + 20924: 0x98B4, + 20925: 0x98B5, + 20926: 0x98B6, + 20927: 0x98B7, + 20928: 0x98B8, + 20929: 0x98B9, + 20930: 0x98BA, + 20931: 0x98BB, + 20932: 0x98BC, + 20933: 0x98BD, + 20934: 0x98BE, + 20935: 0x98BF, + 20936: 0x98C0, + 20937: 0x98C1, + 20938: 0x98C2, + 20939: 0x98C3, + 20940: 0x98C4, + 20941: 0x98C5, + 20942: 0x98C6, + 20943: 0x98C7, + 20944: 0x98C8, + 20945: 0x98C9, + 20946: 0x98CA, + 20947: 0x98CB, + 20948: 0x98CC, + 20949: 0x98CD, + 20950: 0x98CF, + 20951: 0x98D0, + 20952: 0x98D4, + 20953: 0x98D6, + 20954: 0x98D7, + 20955: 0x98DB, + 20956: 0x98DC, + 20957: 0x98DD, + 20958: 0x98E0, + 20959: 0x98E1, + 20960: 0x98E2, + 20961: 0x98E3, + 20962: 0x98E4, + 20963: 0x98E5, + 20964: 0x98E6, + 20965: 0x98E9, + 20966: 0x98EA, + 20967: 0x98EB, + 20968: 0x98EC, + 20969: 0x98ED, + 20970: 0x98EE, + 20971: 0x98EF, + 20972: 0x98F0, + 20973: 0x98F1, + 20974: 0x98F2, + 20975: 0x98F3, + 20976: 0x98F4, + 20977: 0x98F5, + 20978: 0x98F6, + 20979: 0x98F7, + 20980: 0x98F8, + 20981: 0x98F9, + 20982: 0x98FA, + 20983: 0x98FB, + 20984: 0x98FC, + 20985: 0x98FD, + 20986: 0x98FE, + 20987: 0x98FF, + 20988: 0x9900, + 20989: 0x9901, + 20990: 0x9902, + 20991: 0x9903, + 20992: 0x9904, + 20993: 0x9905, + 20994: 0x9906, + 20995: 0x9907, + 20996: 0x94E9, + 20997: 0x94EB, + 20998: 0x94EE, + 20999: 0x94EF, + 21000: 0x94F3, + 21001: 0x94F4, + 21002: 0x94F5, + 21003: 0x94F7, + 21004: 0x94F9, + 21005: 0x94FC, + 21006: 0x94FD, + 21007: 0x94FF, + 21008: 0x9503, + 21009: 0x9502, + 21010: 0x9506, + 21011: 0x9507, + 21012: 0x9509, + 21013: 0x950A, + 21014: 0x950D, + 21015: 0x950E, + 21016: 0x950F, + 21017: 0x9512, + 21018: 0x9513, + 21019: 0x9514, + 21020: 0x9515, + 21021: 0x9516, + 21022: 0x9518, + 21023: 0x951B, + 21024: 0x951D, + 21025: 0x951E, + 21026: 0x951F, + 21027: 0x9522, + 21028: 0x952A, + 21029: 0x952B, + 21030: 0x9529, + 21031: 0x952C, + 21032: 0x9531, + 21033: 0x9532, + 21034: 0x9534, + 21035: 0x9536, + 21036: 0x9537, + 21037: 0x9538, + 21038: 0x953C, + 21039: 0x953E, + 21040: 0x953F, + 21041: 0x9542, + 21042: 0x9535, + 21043: 0x9544, + 21044: 0x9545, + 21045: 0x9546, + 21046: 0x9549, + 21047: 0x954C, + 21048: 0x954E, + 21049: 0x954F, + 21050: 0x9552, + 21051: 0x9553, + 21052: 0x9554, + 21053: 0x9556, + 21054: 0x9557, + 21055: 0x9558, + 21056: 0x9559, + 21057: 0x955B, + 21058: 0x955E, + 21059: 0x955F, + 21060: 0x955D, + 21061: 0x9561, + 21062: 0x9562, + 21063: 0x9564, + 21064: 0x9565, + 21065: 0x9566, + 21066: 0x9567, + 21067: 0x9568, + 21068: 0x9569, + 21069: 0x956A, + 21070: 0x956B, + 21071: 0x956C, + 21072: 0x956F, + 21073: 0x9571, + 21074: 0x9572, + 21075: 0x9573, + 21076: 0x953A, + 21077: 0x77E7, + 21078: 0x77EC, + 21079: 0x96C9, + 21080: 0x79D5, + 21081: 0x79ED, + 21082: 0x79E3, + 21083: 0x79EB, + 21084: 0x7A06, + 21085: 0x5D47, + 21086: 0x7A03, + 21087: 0x7A02, + 21088: 0x7A1E, + 21089: 0x7A14, + 21090: 0x9908, + 21091: 0x9909, + 21092: 0x990A, + 21093: 0x990B, + 21094: 0x990C, + 21095: 0x990E, + 21096: 0x990F, + 21097: 0x9911, + 21098: 0x9912, + 21099: 0x9913, + 21100: 0x9914, + 21101: 0x9915, + 21102: 0x9916, + 21103: 0x9917, + 21104: 0x9918, + 21105: 0x9919, + 21106: 0x991A, + 21107: 0x991B, + 21108: 0x991C, + 21109: 0x991D, + 21110: 0x991E, + 21111: 0x991F, + 21112: 0x9920, + 21113: 0x9921, + 21114: 0x9922, + 21115: 0x9923, + 21116: 0x9924, + 21117: 0x9925, + 21118: 0x9926, + 21119: 0x9927, + 21120: 0x9928, + 21121: 0x9929, + 21122: 0x992A, + 21123: 0x992B, + 21124: 0x992C, + 21125: 0x992D, + 21126: 0x992F, + 21127: 0x9930, + 21128: 0x9931, + 21129: 0x9932, + 21130: 0x9933, + 21131: 0x9934, + 21132: 0x9935, + 21133: 0x9936, + 21134: 0x9937, + 21135: 0x9938, + 21136: 0x9939, + 21137: 0x993A, + 21138: 0x993B, + 21139: 0x993C, + 21140: 0x993D, + 21141: 0x993E, + 21142: 0x993F, + 21143: 0x9940, + 21144: 0x9941, + 21145: 0x9942, + 21146: 0x9943, + 21147: 0x9944, + 21148: 0x9945, + 21149: 0x9946, + 21150: 0x9947, + 21151: 0x9948, + 21152: 0x9949, + 21153: 0x994A, + 21154: 0x994B, + 21155: 0x994C, + 21156: 0x994D, + 21157: 0x994E, + 21158: 0x994F, + 21159: 0x9950, + 21160: 0x9951, + 21161: 0x9952, + 21162: 0x9953, + 21163: 0x9956, + 21164: 0x9957, + 21165: 0x9958, + 21166: 0x9959, + 21167: 0x995A, + 21168: 0x995B, + 21169: 0x995C, + 21170: 0x995D, + 21171: 0x995E, + 21172: 0x995F, + 21173: 0x9960, + 21174: 0x9961, + 21175: 0x9962, + 21176: 0x9964, + 21177: 0x9966, + 21178: 0x9973, + 21179: 0x9978, + 21180: 0x9979, + 21181: 0x997B, + 21182: 0x997E, + 21183: 0x9982, + 21184: 0x9983, + 21185: 0x9989, + 21186: 0x7A39, + 21187: 0x7A37, + 21188: 0x7A51, + 21189: 0x9ECF, + 21190: 0x99A5, + 21191: 0x7A70, + 21192: 0x7688, + 21193: 0x768E, + 21194: 0x7693, + 21195: 0x7699, + 21196: 0x76A4, + 21197: 0x74DE, + 21198: 0x74E0, + 21199: 0x752C, + 21200: 0x9E20, + 21201: 0x9E22, + 21202: 0x9E28, + 21203: 0x9E29, + 21204: 0x9E2A, + 21205: 0x9E2B, + 21206: 0x9E2C, + 21207: 0x9E32, + 21208: 0x9E31, + 21209: 0x9E36, + 21210: 0x9E38, + 21211: 0x9E37, + 21212: 0x9E39, + 21213: 0x9E3A, + 21214: 0x9E3E, + 21215: 0x9E41, + 21216: 0x9E42, + 21217: 0x9E44, + 21218: 0x9E46, + 21219: 0x9E47, + 21220: 0x9E48, + 21221: 0x9E49, + 21222: 0x9E4B, + 21223: 0x9E4C, + 21224: 0x9E4E, + 21225: 0x9E51, + 21226: 0x9E55, + 21227: 0x9E57, + 21228: 0x9E5A, + 21229: 0x9E5B, + 21230: 0x9E5C, + 21231: 0x9E5E, + 21232: 0x9E63, + 21233: 0x9E66, + 21234: 0x9E67, + 21235: 0x9E68, + 21236: 0x9E69, + 21237: 0x9E6A, + 21238: 0x9E6B, + 21239: 0x9E6C, + 21240: 0x9E71, + 21241: 0x9E6D, + 21242: 0x9E73, + 21243: 0x7592, + 21244: 0x7594, + 21245: 0x7596, + 21246: 0x75A0, + 21247: 0x759D, + 21248: 0x75AC, + 21249: 0x75A3, + 21250: 0x75B3, + 21251: 0x75B4, + 21252: 0x75B8, + 21253: 0x75C4, + 21254: 0x75B1, + 21255: 0x75B0, + 21256: 0x75C3, + 21257: 0x75C2, + 21258: 0x75D6, + 21259: 0x75CD, + 21260: 0x75E3, + 21261: 0x75E8, + 21262: 0x75E6, + 21263: 0x75E4, + 21264: 0x75EB, + 21265: 0x75E7, + 21266: 0x7603, + 21267: 0x75F1, + 21268: 0x75FC, + 21269: 0x75FF, + 21270: 0x7610, + 21271: 0x7600, + 21272: 0x7605, + 21273: 0x760C, + 21274: 0x7617, + 21275: 0x760A, + 21276: 0x7625, + 21277: 0x7618, + 21278: 0x7615, + 21279: 0x7619, + 21280: 0x998C, + 21281: 0x998E, + 21282: 0x999A, + 21283: 0x999B, + 21284: 0x999C, + 21285: 0x999D, + 21286: 0x999E, + 21287: 0x999F, + 21288: 0x99A0, + 21289: 0x99A1, + 21290: 0x99A2, + 21291: 0x99A3, + 21292: 0x99A4, + 21293: 0x99A6, + 21294: 0x99A7, + 21295: 0x99A9, + 21296: 0x99AA, + 21297: 0x99AB, + 21298: 0x99AC, + 21299: 0x99AD, + 21300: 0x99AE, + 21301: 0x99AF, + 21302: 0x99B0, + 21303: 0x99B1, + 21304: 0x99B2, + 21305: 0x99B3, + 21306: 0x99B4, + 21307: 0x99B5, + 21308: 0x99B6, + 21309: 0x99B7, + 21310: 0x99B8, + 21311: 0x99B9, + 21312: 0x99BA, + 21313: 0x99BB, + 21314: 0x99BC, + 21315: 0x99BD, + 21316: 0x99BE, + 21317: 0x99BF, + 21318: 0x99C0, + 21319: 0x99C1, + 21320: 0x99C2, + 21321: 0x99C3, + 21322: 0x99C4, + 21323: 0x99C5, + 21324: 0x99C6, + 21325: 0x99C7, + 21326: 0x99C8, + 21327: 0x99C9, + 21328: 0x99CA, + 21329: 0x99CB, + 21330: 0x99CC, + 21331: 0x99CD, + 21332: 0x99CE, + 21333: 0x99CF, + 21334: 0x99D0, + 21335: 0x99D1, + 21336: 0x99D2, + 21337: 0x99D3, + 21338: 0x99D4, + 21339: 0x99D5, + 21340: 0x99D6, + 21341: 0x99D7, + 21342: 0x99D8, + 21343: 0x99D9, + 21344: 0x99DA, + 21345: 0x99DB, + 21346: 0x99DC, + 21347: 0x99DD, + 21348: 0x99DE, + 21349: 0x99DF, + 21350: 0x99E0, + 21351: 0x99E1, + 21352: 0x99E2, + 21353: 0x99E3, + 21354: 0x99E4, + 21355: 0x99E5, + 21356: 0x99E6, + 21357: 0x99E7, + 21358: 0x99E8, + 21359: 0x99E9, + 21360: 0x99EA, + 21361: 0x99EB, + 21362: 0x99EC, + 21363: 0x99ED, + 21364: 0x99EE, + 21365: 0x99EF, + 21366: 0x99F0, + 21367: 0x99F1, + 21368: 0x99F2, + 21369: 0x99F3, + 21370: 0x99F4, + 21371: 0x99F5, + 21372: 0x99F6, + 21373: 0x99F7, + 21374: 0x99F8, + 21375: 0x99F9, + 21376: 0x761B, + 21377: 0x763C, + 21378: 0x7622, + 21379: 0x7620, + 21380: 0x7640, + 21381: 0x762D, + 21382: 0x7630, + 21383: 0x763F, + 21384: 0x7635, + 21385: 0x7643, + 21386: 0x763E, + 21387: 0x7633, + 21388: 0x764D, + 21389: 0x765E, + 21390: 0x7654, + 21391: 0x765C, + 21392: 0x7656, + 21393: 0x766B, + 21394: 0x766F, + 21395: 0x7FCA, + 21396: 0x7AE6, + 21397: 0x7A78, + 21398: 0x7A79, + 21399: 0x7A80, + 21400: 0x7A86, + 21401: 0x7A88, + 21402: 0x7A95, + 21403: 0x7AA6, + 21404: 0x7AA0, + 21405: 0x7AAC, + 21406: 0x7AA8, + 21407: 0x7AAD, + 21408: 0x7AB3, + 21409: 0x8864, + 21410: 0x8869, + 21411: 0x8872, + 21412: 0x887D, + 21413: 0x887F, + 21414: 0x8882, + 21415: 0x88A2, + 21416: 0x88C6, + 21417: 0x88B7, + 21418: 0x88BC, + 21419: 0x88C9, + 21420: 0x88E2, + 21421: 0x88CE, + 21422: 0x88E3, + 21423: 0x88E5, + 21424: 0x88F1, + 21425: 0x891A, + 21426: 0x88FC, + 21427: 0x88E8, + 21428: 0x88FE, + 21429: 0x88F0, + 21430: 0x8921, + 21431: 0x8919, + 21432: 0x8913, + 21433: 0x891B, + 21434: 0x890A, + 21435: 0x8934, + 21436: 0x892B, + 21437: 0x8936, + 21438: 0x8941, + 21439: 0x8966, + 21440: 0x897B, + 21441: 0x758B, + 21442: 0x80E5, + 21443: 0x76B2, + 21444: 0x76B4, + 21445: 0x77DC, + 21446: 0x8012, + 21447: 0x8014, + 21448: 0x8016, + 21449: 0x801C, + 21450: 0x8020, + 21451: 0x8022, + 21452: 0x8025, + 21453: 0x8026, + 21454: 0x8027, + 21455: 0x8029, + 21456: 0x8028, + 21457: 0x8031, + 21458: 0x800B, + 21459: 0x8035, + 21460: 0x8043, + 21461: 0x8046, + 21462: 0x804D, + 21463: 0x8052, + 21464: 0x8069, + 21465: 0x8071, + 21466: 0x8983, + 21467: 0x9878, + 21468: 0x9880, + 21469: 0x9883, + 21470: 0x99FA, + 21471: 0x99FB, + 21472: 0x99FC, + 21473: 0x99FD, + 21474: 0x99FE, + 21475: 0x99FF, + 21476: 0x9A00, + 21477: 0x9A01, + 21478: 0x9A02, + 21479: 0x9A03, + 21480: 0x9A04, + 21481: 0x9A05, + 21482: 0x9A06, + 21483: 0x9A07, + 21484: 0x9A08, + 21485: 0x9A09, + 21486: 0x9A0A, + 21487: 0x9A0B, + 21488: 0x9A0C, + 21489: 0x9A0D, + 21490: 0x9A0E, + 21491: 0x9A0F, + 21492: 0x9A10, + 21493: 0x9A11, + 21494: 0x9A12, + 21495: 0x9A13, + 21496: 0x9A14, + 21497: 0x9A15, + 21498: 0x9A16, + 21499: 0x9A17, + 21500: 0x9A18, + 21501: 0x9A19, + 21502: 0x9A1A, + 21503: 0x9A1B, + 21504: 0x9A1C, + 21505: 0x9A1D, + 21506: 0x9A1E, + 21507: 0x9A1F, + 21508: 0x9A20, + 21509: 0x9A21, + 21510: 0x9A22, + 21511: 0x9A23, + 21512: 0x9A24, + 21513: 0x9A25, + 21514: 0x9A26, + 21515: 0x9A27, + 21516: 0x9A28, + 21517: 0x9A29, + 21518: 0x9A2A, + 21519: 0x9A2B, + 21520: 0x9A2C, + 21521: 0x9A2D, + 21522: 0x9A2E, + 21523: 0x9A2F, + 21524: 0x9A30, + 21525: 0x9A31, + 21526: 0x9A32, + 21527: 0x9A33, + 21528: 0x9A34, + 21529: 0x9A35, + 21530: 0x9A36, + 21531: 0x9A37, + 21532: 0x9A38, + 21533: 0x9A39, + 21534: 0x9A3A, + 21535: 0x9A3B, + 21536: 0x9A3C, + 21537: 0x9A3D, + 21538: 0x9A3E, + 21539: 0x9A3F, + 21540: 0x9A40, + 21541: 0x9A41, + 21542: 0x9A42, + 21543: 0x9A43, + 21544: 0x9A44, + 21545: 0x9A45, + 21546: 0x9A46, + 21547: 0x9A47, + 21548: 0x9A48, + 21549: 0x9A49, + 21550: 0x9A4A, + 21551: 0x9A4B, + 21552: 0x9A4C, + 21553: 0x9A4D, + 21554: 0x9A4E, + 21555: 0x9A4F, + 21556: 0x9A50, + 21557: 0x9A51, + 21558: 0x9A52, + 21559: 0x9A53, + 21560: 0x9A54, + 21561: 0x9A55, + 21562: 0x9A56, + 21563: 0x9A57, + 21564: 0x9A58, + 21565: 0x9A59, + 21566: 0x9889, + 21567: 0x988C, + 21568: 0x988D, + 21569: 0x988F, + 21570: 0x9894, + 21571: 0x989A, + 21572: 0x989B, + 21573: 0x989E, + 21574: 0x989F, + 21575: 0x98A1, + 21576: 0x98A2, + 21577: 0x98A5, + 21578: 0x98A6, + 21579: 0x864D, + 21580: 0x8654, + 21581: 0x866C, + 21582: 0x866E, + 21583: 0x867F, + 21584: 0x867A, + 21585: 0x867C, + 21586: 0x867B, + 21587: 0x86A8, + 21588: 0x868D, + 21589: 0x868B, + 21590: 0x86AC, + 21591: 0x869D, + 21592: 0x86A7, + 21593: 0x86A3, + 21594: 0x86AA, + 21595: 0x8693, + 21596: 0x86A9, + 21597: 0x86B6, + 21598: 0x86C4, + 21599: 0x86B5, + 21600: 0x86CE, + 21601: 0x86B0, + 21602: 0x86BA, + 21603: 0x86B1, + 21604: 0x86AF, + 21605: 0x86C9, + 21606: 0x86CF, + 21607: 0x86B4, + 21608: 0x86E9, + 21609: 0x86F1, + 21610: 0x86F2, + 21611: 0x86ED, + 21612: 0x86F3, + 21613: 0x86D0, + 21614: 0x8713, + 21615: 0x86DE, + 21616: 0x86F4, + 21617: 0x86DF, + 21618: 0x86D8, + 21619: 0x86D1, + 21620: 0x8703, + 21621: 0x8707, + 21622: 0x86F8, + 21623: 0x8708, + 21624: 0x870A, + 21625: 0x870D, + 21626: 0x8709, + 21627: 0x8723, + 21628: 0x873B, + 21629: 0x871E, + 21630: 0x8725, + 21631: 0x872E, + 21632: 0x871A, + 21633: 0x873E, + 21634: 0x8748, + 21635: 0x8734, + 21636: 0x8731, + 21637: 0x8729, + 21638: 0x8737, + 21639: 0x873F, + 21640: 0x8782, + 21641: 0x8722, + 21642: 0x877D, + 21643: 0x877E, + 21644: 0x877B, + 21645: 0x8760, + 21646: 0x8770, + 21647: 0x874C, + 21648: 0x876E, + 21649: 0x878B, + 21650: 0x8753, + 21651: 0x8763, + 21652: 0x877C, + 21653: 0x8764, + 21654: 0x8759, + 21655: 0x8765, + 21656: 0x8793, + 21657: 0x87AF, + 21658: 0x87A8, + 21659: 0x87D2, + 21660: 0x9A5A, + 21661: 0x9A5B, + 21662: 0x9A5C, + 21663: 0x9A5D, + 21664: 0x9A5E, + 21665: 0x9A5F, + 21666: 0x9A60, + 21667: 0x9A61, + 21668: 0x9A62, + 21669: 0x9A63, + 21670: 0x9A64, + 21671: 0x9A65, + 21672: 0x9A66, + 21673: 0x9A67, + 21674: 0x9A68, + 21675: 0x9A69, + 21676: 0x9A6A, + 21677: 0x9A6B, + 21678: 0x9A72, + 21679: 0x9A83, + 21680: 0x9A89, + 21681: 0x9A8D, + 21682: 0x9A8E, + 21683: 0x9A94, + 21684: 0x9A95, + 21685: 0x9A99, + 21686: 0x9AA6, + 21687: 0x9AA9, + 21688: 0x9AAA, + 21689: 0x9AAB, + 21690: 0x9AAC, + 21691: 0x9AAD, + 21692: 0x9AAE, + 21693: 0x9AAF, + 21694: 0x9AB2, + 21695: 0x9AB3, + 21696: 0x9AB4, + 21697: 0x9AB5, + 21698: 0x9AB9, + 21699: 0x9ABB, + 21700: 0x9ABD, + 21701: 0x9ABE, + 21702: 0x9ABF, + 21703: 0x9AC3, + 21704: 0x9AC4, + 21705: 0x9AC6, + 21706: 0x9AC7, + 21707: 0x9AC8, + 21708: 0x9AC9, + 21709: 0x9ACA, + 21710: 0x9ACD, + 21711: 0x9ACE, + 21712: 0x9ACF, + 21713: 0x9AD0, + 21714: 0x9AD2, + 21715: 0x9AD4, + 21716: 0x9AD5, + 21717: 0x9AD6, + 21718: 0x9AD7, + 21719: 0x9AD9, + 21720: 0x9ADA, + 21721: 0x9ADB, + 21722: 0x9ADC, + 21723: 0x9ADD, + 21724: 0x9ADE, + 21725: 0x9AE0, + 21726: 0x9AE2, + 21727: 0x9AE3, + 21728: 0x9AE4, + 21729: 0x9AE5, + 21730: 0x9AE7, + 21731: 0x9AE8, + 21732: 0x9AE9, + 21733: 0x9AEA, + 21734: 0x9AEC, + 21735: 0x9AEE, + 21736: 0x9AF0, + 21737: 0x9AF1, + 21738: 0x9AF2, + 21739: 0x9AF3, + 21740: 0x9AF4, + 21741: 0x9AF5, + 21742: 0x9AF6, + 21743: 0x9AF7, + 21744: 0x9AF8, + 21745: 0x9AFA, + 21746: 0x9AFC, + 21747: 0x9AFD, + 21748: 0x9AFE, + 21749: 0x9AFF, + 21750: 0x9B00, + 21751: 0x9B01, + 21752: 0x9B02, + 21753: 0x9B04, + 21754: 0x9B05, + 21755: 0x9B06, + 21756: 0x87C6, + 21757: 0x8788, + 21758: 0x8785, + 21759: 0x87AD, + 21760: 0x8797, + 21761: 0x8783, + 21762: 0x87AB, + 21763: 0x87E5, + 21764: 0x87AC, + 21765: 0x87B5, + 21766: 0x87B3, + 21767: 0x87CB, + 21768: 0x87D3, + 21769: 0x87BD, + 21770: 0x87D1, + 21771: 0x87C0, + 21772: 0x87CA, + 21773: 0x87DB, + 21774: 0x87EA, + 21775: 0x87E0, + 21776: 0x87EE, + 21777: 0x8816, + 21778: 0x8813, + 21779: 0x87FE, + 21780: 0x880A, + 21781: 0x881B, + 21782: 0x8821, + 21783: 0x8839, + 21784: 0x883C, + 21785: 0x7F36, + 21786: 0x7F42, + 21787: 0x7F44, + 21788: 0x7F45, + 21789: 0x8210, + 21790: 0x7AFA, + 21791: 0x7AFD, + 21792: 0x7B08, + 21793: 0x7B03, + 21794: 0x7B04, + 21795: 0x7B15, + 21796: 0x7B0A, + 21797: 0x7B2B, + 21798: 0x7B0F, + 21799: 0x7B47, + 21800: 0x7B38, + 21801: 0x7B2A, + 21802: 0x7B19, + 21803: 0x7B2E, + 21804: 0x7B31, + 21805: 0x7B20, + 21806: 0x7B25, + 21807: 0x7B24, + 21808: 0x7B33, + 21809: 0x7B3E, + 21810: 0x7B1E, + 21811: 0x7B58, + 21812: 0x7B5A, + 21813: 0x7B45, + 21814: 0x7B75, + 21815: 0x7B4C, + 21816: 0x7B5D, + 21817: 0x7B60, + 21818: 0x7B6E, + 21819: 0x7B7B, + 21820: 0x7B62, + 21821: 0x7B72, + 21822: 0x7B71, + 21823: 0x7B90, + 21824: 0x7BA6, + 21825: 0x7BA7, + 21826: 0x7BB8, + 21827: 0x7BAC, + 21828: 0x7B9D, + 21829: 0x7BA8, + 21830: 0x7B85, + 21831: 0x7BAA, + 21832: 0x7B9C, + 21833: 0x7BA2, + 21834: 0x7BAB, + 21835: 0x7BB4, + 21836: 0x7BD1, + 21837: 0x7BC1, + 21838: 0x7BCC, + 21839: 0x7BDD, + 21840: 0x7BDA, + 21841: 0x7BE5, + 21842: 0x7BE6, + 21843: 0x7BEA, + 21844: 0x7C0C, + 21845: 0x7BFE, + 21846: 0x7BFC, + 21847: 0x7C0F, + 21848: 0x7C16, + 21849: 0x7C0B, + 21850: 0x9B07, + 21851: 0x9B09, + 21852: 0x9B0A, + 21853: 0x9B0B, + 21854: 0x9B0C, + 21855: 0x9B0D, + 21856: 0x9B0E, + 21857: 0x9B10, + 21858: 0x9B11, + 21859: 0x9B12, + 21860: 0x9B14, + 21861: 0x9B15, + 21862: 0x9B16, + 21863: 0x9B17, + 21864: 0x9B18, + 21865: 0x9B19, + 21866: 0x9B1A, + 21867: 0x9B1B, + 21868: 0x9B1C, + 21869: 0x9B1D, + 21870: 0x9B1E, + 21871: 0x9B20, + 21872: 0x9B21, + 21873: 0x9B22, + 21874: 0x9B24, + 21875: 0x9B25, + 21876: 0x9B26, + 21877: 0x9B27, + 21878: 0x9B28, + 21879: 0x9B29, + 21880: 0x9B2A, + 21881: 0x9B2B, + 21882: 0x9B2C, + 21883: 0x9B2D, + 21884: 0x9B2E, + 21885: 0x9B30, + 21886: 0x9B31, + 21887: 0x9B33, + 21888: 0x9B34, + 21889: 0x9B35, + 21890: 0x9B36, + 21891: 0x9B37, + 21892: 0x9B38, + 21893: 0x9B39, + 21894: 0x9B3A, + 21895: 0x9B3D, + 21896: 0x9B3E, + 21897: 0x9B3F, + 21898: 0x9B40, + 21899: 0x9B46, + 21900: 0x9B4A, + 21901: 0x9B4B, + 21902: 0x9B4C, + 21903: 0x9B4E, + 21904: 0x9B50, + 21905: 0x9B52, + 21906: 0x9B53, + 21907: 0x9B55, + 21908: 0x9B56, + 21909: 0x9B57, + 21910: 0x9B58, + 21911: 0x9B59, + 21912: 0x9B5A, + 21913: 0x9B5B, + 21914: 0x9B5C, + 21915: 0x9B5D, + 21916: 0x9B5E, + 21917: 0x9B5F, + 21918: 0x9B60, + 21919: 0x9B61, + 21920: 0x9B62, + 21921: 0x9B63, + 21922: 0x9B64, + 21923: 0x9B65, + 21924: 0x9B66, + 21925: 0x9B67, + 21926: 0x9B68, + 21927: 0x9B69, + 21928: 0x9B6A, + 21929: 0x9B6B, + 21930: 0x9B6C, + 21931: 0x9B6D, + 21932: 0x9B6E, + 21933: 0x9B6F, + 21934: 0x9B70, + 21935: 0x9B71, + 21936: 0x9B72, + 21937: 0x9B73, + 21938: 0x9B74, + 21939: 0x9B75, + 21940: 0x9B76, + 21941: 0x9B77, + 21942: 0x9B78, + 21943: 0x9B79, + 21944: 0x9B7A, + 21945: 0x9B7B, + 21946: 0x7C1F, + 21947: 0x7C2A, + 21948: 0x7C26, + 21949: 0x7C38, + 21950: 0x7C41, + 21951: 0x7C40, + 21952: 0x81FE, + 21953: 0x8201, + 21954: 0x8202, + 21955: 0x8204, + 21956: 0x81EC, + 21957: 0x8844, + 21958: 0x8221, + 21959: 0x8222, + 21960: 0x8223, + 21961: 0x822D, + 21962: 0x822F, + 21963: 0x8228, + 21964: 0x822B, + 21965: 0x8238, + 21966: 0x823B, + 21967: 0x8233, + 21968: 0x8234, + 21969: 0x823E, + 21970: 0x8244, + 21971: 0x8249, + 21972: 0x824B, + 21973: 0x824F, + 21974: 0x825A, + 21975: 0x825F, + 21976: 0x8268, + 21977: 0x887E, + 21978: 0x8885, + 21979: 0x8888, + 21980: 0x88D8, + 21981: 0x88DF, + 21982: 0x895E, + 21983: 0x7F9D, + 21984: 0x7F9F, + 21985: 0x7FA7, + 21986: 0x7FAF, + 21987: 0x7FB0, + 21988: 0x7FB2, + 21989: 0x7C7C, + 21990: 0x6549, + 21991: 0x7C91, + 21992: 0x7C9D, + 21993: 0x7C9C, + 21994: 0x7C9E, + 21995: 0x7CA2, + 21996: 0x7CB2, + 21997: 0x7CBC, + 21998: 0x7CBD, + 21999: 0x7CC1, + 22000: 0x7CC7, + 22001: 0x7CCC, + 22002: 0x7CCD, + 22003: 0x7CC8, + 22004: 0x7CC5, + 22005: 0x7CD7, + 22006: 0x7CE8, + 22007: 0x826E, + 22008: 0x66A8, + 22009: 0x7FBF, + 22010: 0x7FCE, + 22011: 0x7FD5, + 22012: 0x7FE5, + 22013: 0x7FE1, + 22014: 0x7FE6, + 22015: 0x7FE9, + 22016: 0x7FEE, + 22017: 0x7FF3, + 22018: 0x7CF8, + 22019: 0x7D77, + 22020: 0x7DA6, + 22021: 0x7DAE, + 22022: 0x7E47, + 22023: 0x7E9B, + 22024: 0x9EB8, + 22025: 0x9EB4, + 22026: 0x8D73, + 22027: 0x8D84, + 22028: 0x8D94, + 22029: 0x8D91, + 22030: 0x8DB1, + 22031: 0x8D67, + 22032: 0x8D6D, + 22033: 0x8C47, + 22034: 0x8C49, + 22035: 0x914A, + 22036: 0x9150, + 22037: 0x914E, + 22038: 0x914F, + 22039: 0x9164, + 22040: 0x9B7C, + 22041: 0x9B7D, + 22042: 0x9B7E, + 22043: 0x9B7F, + 22044: 0x9B80, + 22045: 0x9B81, + 22046: 0x9B82, + 22047: 0x9B83, + 22048: 0x9B84, + 22049: 0x9B85, + 22050: 0x9B86, + 22051: 0x9B87, + 22052: 0x9B88, + 22053: 0x9B89, + 22054: 0x9B8A, + 22055: 0x9B8B, + 22056: 0x9B8C, + 22057: 0x9B8D, + 22058: 0x9B8E, + 22059: 0x9B8F, + 22060: 0x9B90, + 22061: 0x9B91, + 22062: 0x9B92, + 22063: 0x9B93, + 22064: 0x9B94, + 22065: 0x9B95, + 22066: 0x9B96, + 22067: 0x9B97, + 22068: 0x9B98, + 22069: 0x9B99, + 22070: 0x9B9A, + 22071: 0x9B9B, + 22072: 0x9B9C, + 22073: 0x9B9D, + 22074: 0x9B9E, + 22075: 0x9B9F, + 22076: 0x9BA0, + 22077: 0x9BA1, + 22078: 0x9BA2, + 22079: 0x9BA3, + 22080: 0x9BA4, + 22081: 0x9BA5, + 22082: 0x9BA6, + 22083: 0x9BA7, + 22084: 0x9BA8, + 22085: 0x9BA9, + 22086: 0x9BAA, + 22087: 0x9BAB, + 22088: 0x9BAC, + 22089: 0x9BAD, + 22090: 0x9BAE, + 22091: 0x9BAF, + 22092: 0x9BB0, + 22093: 0x9BB1, + 22094: 0x9BB2, + 22095: 0x9BB3, + 22096: 0x9BB4, + 22097: 0x9BB5, + 22098: 0x9BB6, + 22099: 0x9BB7, + 22100: 0x9BB8, + 22101: 0x9BB9, + 22102: 0x9BBA, + 22103: 0x9BBB, + 22104: 0x9BBC, + 22105: 0x9BBD, + 22106: 0x9BBE, + 22107: 0x9BBF, + 22108: 0x9BC0, + 22109: 0x9BC1, + 22110: 0x9BC2, + 22111: 0x9BC3, + 22112: 0x9BC4, + 22113: 0x9BC5, + 22114: 0x9BC6, + 22115: 0x9BC7, + 22116: 0x9BC8, + 22117: 0x9BC9, + 22118: 0x9BCA, + 22119: 0x9BCB, + 22120: 0x9BCC, + 22121: 0x9BCD, + 22122: 0x9BCE, + 22123: 0x9BCF, + 22124: 0x9BD0, + 22125: 0x9BD1, + 22126: 0x9BD2, + 22127: 0x9BD3, + 22128: 0x9BD4, + 22129: 0x9BD5, + 22130: 0x9BD6, + 22131: 0x9BD7, + 22132: 0x9BD8, + 22133: 0x9BD9, + 22134: 0x9BDA, + 22135: 0x9BDB, + 22136: 0x9162, + 22137: 0x9161, + 22138: 0x9170, + 22139: 0x9169, + 22140: 0x916F, + 22141: 0x917D, + 22142: 0x917E, + 22143: 0x9172, + 22144: 0x9174, + 22145: 0x9179, + 22146: 0x918C, + 22147: 0x9185, + 22148: 0x9190, + 22149: 0x918D, + 22150: 0x9191, + 22151: 0x91A2, + 22152: 0x91A3, + 22153: 0x91AA, + 22154: 0x91AD, + 22155: 0x91AE, + 22156: 0x91AF, + 22157: 0x91B5, + 22158: 0x91B4, + 22159: 0x91BA, + 22160: 0x8C55, + 22161: 0x9E7E, + 22162: 0x8DB8, + 22163: 0x8DEB, + 22164: 0x8E05, + 22165: 0x8E59, + 22166: 0x8E69, + 22167: 0x8DB5, + 22168: 0x8DBF, + 22169: 0x8DBC, + 22170: 0x8DBA, + 22171: 0x8DC4, + 22172: 0x8DD6, + 22173: 0x8DD7, + 22174: 0x8DDA, + 22175: 0x8DDE, + 22176: 0x8DCE, + 22177: 0x8DCF, + 22178: 0x8DDB, + 22179: 0x8DC6, + 22180: 0x8DEC, + 22181: 0x8DF7, + 22182: 0x8DF8, + 22183: 0x8DE3, + 22184: 0x8DF9, + 22185: 0x8DFB, + 22186: 0x8DE4, + 22187: 0x8E09, + 22188: 0x8DFD, + 22189: 0x8E14, + 22190: 0x8E1D, + 22191: 0x8E1F, + 22192: 0x8E2C, + 22193: 0x8E2E, + 22194: 0x8E23, + 22195: 0x8E2F, + 22196: 0x8E3A, + 22197: 0x8E40, + 22198: 0x8E39, + 22199: 0x8E35, + 22200: 0x8E3D, + 22201: 0x8E31, + 22202: 0x8E49, + 22203: 0x8E41, + 22204: 0x8E42, + 22205: 0x8E51, + 22206: 0x8E52, + 22207: 0x8E4A, + 22208: 0x8E70, + 22209: 0x8E76, + 22210: 0x8E7C, + 22211: 0x8E6F, + 22212: 0x8E74, + 22213: 0x8E85, + 22214: 0x8E8F, + 22215: 0x8E94, + 22216: 0x8E90, + 22217: 0x8E9C, + 22218: 0x8E9E, + 22219: 0x8C78, + 22220: 0x8C82, + 22221: 0x8C8A, + 22222: 0x8C85, + 22223: 0x8C98, + 22224: 0x8C94, + 22225: 0x659B, + 22226: 0x89D6, + 22227: 0x89DE, + 22228: 0x89DA, + 22229: 0x89DC, + 22230: 0x9BDC, + 22231: 0x9BDD, + 22232: 0x9BDE, + 22233: 0x9BDF, + 22234: 0x9BE0, + 22235: 0x9BE1, + 22236: 0x9BE2, + 22237: 0x9BE3, + 22238: 0x9BE4, + 22239: 0x9BE5, + 22240: 0x9BE6, + 22241: 0x9BE7, + 22242: 0x9BE8, + 22243: 0x9BE9, + 22244: 0x9BEA, + 22245: 0x9BEB, + 22246: 0x9BEC, + 22247: 0x9BED, + 22248: 0x9BEE, + 22249: 0x9BEF, + 22250: 0x9BF0, + 22251: 0x9BF1, + 22252: 0x9BF2, + 22253: 0x9BF3, + 22254: 0x9BF4, + 22255: 0x9BF5, + 22256: 0x9BF6, + 22257: 0x9BF7, + 22258: 0x9BF8, + 22259: 0x9BF9, + 22260: 0x9BFA, + 22261: 0x9BFB, + 22262: 0x9BFC, + 22263: 0x9BFD, + 22264: 0x9BFE, + 22265: 0x9BFF, + 22266: 0x9C00, + 22267: 0x9C01, + 22268: 0x9C02, + 22269: 0x9C03, + 22270: 0x9C04, + 22271: 0x9C05, + 22272: 0x9C06, + 22273: 0x9C07, + 22274: 0x9C08, + 22275: 0x9C09, + 22276: 0x9C0A, + 22277: 0x9C0B, + 22278: 0x9C0C, + 22279: 0x9C0D, + 22280: 0x9C0E, + 22281: 0x9C0F, + 22282: 0x9C10, + 22283: 0x9C11, + 22284: 0x9C12, + 22285: 0x9C13, + 22286: 0x9C14, + 22287: 0x9C15, + 22288: 0x9C16, + 22289: 0x9C17, + 22290: 0x9C18, + 22291: 0x9C19, + 22292: 0x9C1A, + 22293: 0x9C1B, + 22294: 0x9C1C, + 22295: 0x9C1D, + 22296: 0x9C1E, + 22297: 0x9C1F, + 22298: 0x9C20, + 22299: 0x9C21, + 22300: 0x9C22, + 22301: 0x9C23, + 22302: 0x9C24, + 22303: 0x9C25, + 22304: 0x9C26, + 22305: 0x9C27, + 22306: 0x9C28, + 22307: 0x9C29, + 22308: 0x9C2A, + 22309: 0x9C2B, + 22310: 0x9C2C, + 22311: 0x9C2D, + 22312: 0x9C2E, + 22313: 0x9C2F, + 22314: 0x9C30, + 22315: 0x9C31, + 22316: 0x9C32, + 22317: 0x9C33, + 22318: 0x9C34, + 22319: 0x9C35, + 22320: 0x9C36, + 22321: 0x9C37, + 22322: 0x9C38, + 22323: 0x9C39, + 22324: 0x9C3A, + 22325: 0x9C3B, + 22326: 0x89E5, + 22327: 0x89EB, + 22328: 0x89EF, + 22329: 0x8A3E, + 22330: 0x8B26, + 22331: 0x9753, + 22332: 0x96E9, + 22333: 0x96F3, + 22334: 0x96EF, + 22335: 0x9706, + 22336: 0x9701, + 22337: 0x9708, + 22338: 0x970F, + 22339: 0x970E, + 22340: 0x972A, + 22341: 0x972D, + 22342: 0x9730, + 22343: 0x973E, + 22344: 0x9F80, + 22345: 0x9F83, + 22346: 0x9F85, + 22347: 0x9F86, + 22348: 0x9F87, + 22349: 0x9F88, + 22350: 0x9F89, + 22351: 0x9F8A, + 22352: 0x9F8C, + 22353: 0x9EFE, + 22354: 0x9F0B, + 22355: 0x9F0D, + 22356: 0x96B9, + 22357: 0x96BC, + 22358: 0x96BD, + 22359: 0x96CE, + 22360: 0x96D2, + 22361: 0x77BF, + 22362: 0x96E0, + 22363: 0x928E, + 22364: 0x92AE, + 22365: 0x92C8, + 22366: 0x933E, + 22367: 0x936A, + 22368: 0x93CA, + 22369: 0x938F, + 22370: 0x943E, + 22371: 0x946B, + 22372: 0x9C7F, + 22373: 0x9C82, + 22374: 0x9C85, + 22375: 0x9C86, + 22376: 0x9C87, + 22377: 0x9C88, + 22378: 0x7A23, + 22379: 0x9C8B, + 22380: 0x9C8E, + 22381: 0x9C90, + 22382: 0x9C91, + 22383: 0x9C92, + 22384: 0x9C94, + 22385: 0x9C95, + 22386: 0x9C9A, + 22387: 0x9C9B, + 22388: 0x9C9E, + 22389: 0x9C9F, + 22390: 0x9CA0, + 22391: 0x9CA1, + 22392: 0x9CA2, + 22393: 0x9CA3, + 22394: 0x9CA5, + 22395: 0x9CA6, + 22396: 0x9CA7, + 22397: 0x9CA8, + 22398: 0x9CA9, + 22399: 0x9CAB, + 22400: 0x9CAD, + 22401: 0x9CAE, + 22402: 0x9CB0, + 22403: 0x9CB1, + 22404: 0x9CB2, + 22405: 0x9CB3, + 22406: 0x9CB4, + 22407: 0x9CB5, + 22408: 0x9CB6, + 22409: 0x9CB7, + 22410: 0x9CBA, + 22411: 0x9CBB, + 22412: 0x9CBC, + 22413: 0x9CBD, + 22414: 0x9CC4, + 22415: 0x9CC5, + 22416: 0x9CC6, + 22417: 0x9CC7, + 22418: 0x9CCA, + 22419: 0x9CCB, + 22420: 0x9C3C, + 22421: 0x9C3D, + 22422: 0x9C3E, + 22423: 0x9C3F, + 22424: 0x9C40, + 22425: 0x9C41, + 22426: 0x9C42, + 22427: 0x9C43, + 22428: 0x9C44, + 22429: 0x9C45, + 22430: 0x9C46, + 22431: 0x9C47, + 22432: 0x9C48, + 22433: 0x9C49, + 22434: 0x9C4A, + 22435: 0x9C4B, + 22436: 0x9C4C, + 22437: 0x9C4D, + 22438: 0x9C4E, + 22439: 0x9C4F, + 22440: 0x9C50, + 22441: 0x9C51, + 22442: 0x9C52, + 22443: 0x9C53, + 22444: 0x9C54, + 22445: 0x9C55, + 22446: 0x9C56, + 22447: 0x9C57, + 22448: 0x9C58, + 22449: 0x9C59, + 22450: 0x9C5A, + 22451: 0x9C5B, + 22452: 0x9C5C, + 22453: 0x9C5D, + 22454: 0x9C5E, + 22455: 0x9C5F, + 22456: 0x9C60, + 22457: 0x9C61, + 22458: 0x9C62, + 22459: 0x9C63, + 22460: 0x9C64, + 22461: 0x9C65, + 22462: 0x9C66, + 22463: 0x9C67, + 22464: 0x9C68, + 22465: 0x9C69, + 22466: 0x9C6A, + 22467: 0x9C6B, + 22468: 0x9C6C, + 22469: 0x9C6D, + 22470: 0x9C6E, + 22471: 0x9C6F, + 22472: 0x9C70, + 22473: 0x9C71, + 22474: 0x9C72, + 22475: 0x9C73, + 22476: 0x9C74, + 22477: 0x9C75, + 22478: 0x9C76, + 22479: 0x9C77, + 22480: 0x9C78, + 22481: 0x9C79, + 22482: 0x9C7A, + 22483: 0x9C7B, + 22484: 0x9C7D, + 22485: 0x9C7E, + 22486: 0x9C80, + 22487: 0x9C83, + 22488: 0x9C84, + 22489: 0x9C89, + 22490: 0x9C8A, + 22491: 0x9C8C, + 22492: 0x9C8F, + 22493: 0x9C93, + 22494: 0x9C96, + 22495: 0x9C97, + 22496: 0x9C98, + 22497: 0x9C99, + 22498: 0x9C9D, + 22499: 0x9CAA, + 22500: 0x9CAC, + 22501: 0x9CAF, + 22502: 0x9CB9, + 22503: 0x9CBE, + 22504: 0x9CBF, + 22505: 0x9CC0, + 22506: 0x9CC1, + 22507: 0x9CC2, + 22508: 0x9CC8, + 22509: 0x9CC9, + 22510: 0x9CD1, + 22511: 0x9CD2, + 22512: 0x9CDA, + 22513: 0x9CDB, + 22514: 0x9CE0, + 22515: 0x9CE1, + 22516: 0x9CCC, + 22517: 0x9CCD, + 22518: 0x9CCE, + 22519: 0x9CCF, + 22520: 0x9CD0, + 22521: 0x9CD3, + 22522: 0x9CD4, + 22523: 0x9CD5, + 22524: 0x9CD7, + 22525: 0x9CD8, + 22526: 0x9CD9, + 22527: 0x9CDC, + 22528: 0x9CDD, + 22529: 0x9CDF, + 22530: 0x9CE2, + 22531: 0x977C, + 22532: 0x9785, + 22533: 0x9791, + 22534: 0x9792, + 22535: 0x9794, + 22536: 0x97AF, + 22537: 0x97AB, + 22538: 0x97A3, + 22539: 0x97B2, + 22540: 0x97B4, + 22541: 0x9AB1, + 22542: 0x9AB0, + 22543: 0x9AB7, + 22544: 0x9E58, + 22545: 0x9AB6, + 22546: 0x9ABA, + 22547: 0x9ABC, + 22548: 0x9AC1, + 22549: 0x9AC0, + 22550: 0x9AC5, + 22551: 0x9AC2, + 22552: 0x9ACB, + 22553: 0x9ACC, + 22554: 0x9AD1, + 22555: 0x9B45, + 22556: 0x9B43, + 22557: 0x9B47, + 22558: 0x9B49, + 22559: 0x9B48, + 22560: 0x9B4D, + 22561: 0x9B51, + 22562: 0x98E8, + 22563: 0x990D, + 22564: 0x992E, + 22565: 0x9955, + 22566: 0x9954, + 22567: 0x9ADF, + 22568: 0x9AE1, + 22569: 0x9AE6, + 22570: 0x9AEF, + 22571: 0x9AEB, + 22572: 0x9AFB, + 22573: 0x9AED, + 22574: 0x9AF9, + 22575: 0x9B08, + 22576: 0x9B0F, + 22577: 0x9B13, + 22578: 0x9B1F, + 22579: 0x9B23, + 22580: 0x9EBD, + 22581: 0x9EBE, + 22582: 0x7E3B, + 22583: 0x9E82, + 22584: 0x9E87, + 22585: 0x9E88, + 22586: 0x9E8B, + 22587: 0x9E92, + 22588: 0x93D6, + 22589: 0x9E9D, + 22590: 0x9E9F, + 22591: 0x9EDB, + 22592: 0x9EDC, + 22593: 0x9EDD, + 22594: 0x9EE0, + 22595: 0x9EDF, + 22596: 0x9EE2, + 22597: 0x9EE9, + 22598: 0x9EE7, + 22599: 0x9EE5, + 22600: 0x9EEA, + 22601: 0x9EEF, + 22602: 0x9F22, + 22603: 0x9F2C, + 22604: 0x9F2F, + 22605: 0x9F39, + 22606: 0x9F37, + 22607: 0x9F3D, + 22608: 0x9F3E, + 22609: 0x9F44, + 22610: 0x9CE3, + 22611: 0x9CE4, + 22612: 0x9CE5, + 22613: 0x9CE6, + 22614: 0x9CE7, + 22615: 0x9CE8, + 22616: 0x9CE9, + 22617: 0x9CEA, + 22618: 0x9CEB, + 22619: 0x9CEC, + 22620: 0x9CED, + 22621: 0x9CEE, + 22622: 0x9CEF, + 22623: 0x9CF0, + 22624: 0x9CF1, + 22625: 0x9CF2, + 22626: 0x9CF3, + 22627: 0x9CF4, + 22628: 0x9CF5, + 22629: 0x9CF6, + 22630: 0x9CF7, + 22631: 0x9CF8, + 22632: 0x9CF9, + 22633: 0x9CFA, + 22634: 0x9CFB, + 22635: 0x9CFC, + 22636: 0x9CFD, + 22637: 0x9CFE, + 22638: 0x9CFF, + 22639: 0x9D00, + 22640: 0x9D01, + 22641: 0x9D02, + 22642: 0x9D03, + 22643: 0x9D04, + 22644: 0x9D05, + 22645: 0x9D06, + 22646: 0x9D07, + 22647: 0x9D08, + 22648: 0x9D09, + 22649: 0x9D0A, + 22650: 0x9D0B, + 22651: 0x9D0C, + 22652: 0x9D0D, + 22653: 0x9D0E, + 22654: 0x9D0F, + 22655: 0x9D10, + 22656: 0x9D11, + 22657: 0x9D12, + 22658: 0x9D13, + 22659: 0x9D14, + 22660: 0x9D15, + 22661: 0x9D16, + 22662: 0x9D17, + 22663: 0x9D18, + 22664: 0x9D19, + 22665: 0x9D1A, + 22666: 0x9D1B, + 22667: 0x9D1C, + 22668: 0x9D1D, + 22669: 0x9D1E, + 22670: 0x9D1F, + 22671: 0x9D20, + 22672: 0x9D21, + 22673: 0x9D22, + 22674: 0x9D23, + 22675: 0x9D24, + 22676: 0x9D25, + 22677: 0x9D26, + 22678: 0x9D27, + 22679: 0x9D28, + 22680: 0x9D29, + 22681: 0x9D2A, + 22682: 0x9D2B, + 22683: 0x9D2C, + 22684: 0x9D2D, + 22685: 0x9D2E, + 22686: 0x9D2F, + 22687: 0x9D30, + 22688: 0x9D31, + 22689: 0x9D32, + 22690: 0x9D33, + 22691: 0x9D34, + 22692: 0x9D35, + 22693: 0x9D36, + 22694: 0x9D37, + 22695: 0x9D38, + 22696: 0x9D39, + 22697: 0x9D3A, + 22698: 0x9D3B, + 22699: 0x9D3C, + 22700: 0x9D3D, + 22701: 0x9D3E, + 22702: 0x9D3F, + 22703: 0x9D40, + 22704: 0x9D41, + 22705: 0x9D42, + 22800: 0x9D43, + 22801: 0x9D44, + 22802: 0x9D45, + 22803: 0x9D46, + 22804: 0x9D47, + 22805: 0x9D48, + 22806: 0x9D49, + 22807: 0x9D4A, + 22808: 0x9D4B, + 22809: 0x9D4C, + 22810: 0x9D4D, + 22811: 0x9D4E, + 22812: 0x9D4F, + 22813: 0x9D50, + 22814: 0x9D51, + 22815: 0x9D52, + 22816: 0x9D53, + 22817: 0x9D54, + 22818: 0x9D55, + 22819: 0x9D56, + 22820: 0x9D57, + 22821: 0x9D58, + 22822: 0x9D59, + 22823: 0x9D5A, + 22824: 0x9D5B, + 22825: 0x9D5C, + 22826: 0x9D5D, + 22827: 0x9D5E, + 22828: 0x9D5F, + 22829: 0x9D60, + 22830: 0x9D61, + 22831: 0x9D62, + 22832: 0x9D63, + 22833: 0x9D64, + 22834: 0x9D65, + 22835: 0x9D66, + 22836: 0x9D67, + 22837: 0x9D68, + 22838: 0x9D69, + 22839: 0x9D6A, + 22840: 0x9D6B, + 22841: 0x9D6C, + 22842: 0x9D6D, + 22843: 0x9D6E, + 22844: 0x9D6F, + 22845: 0x9D70, + 22846: 0x9D71, + 22847: 0x9D72, + 22848: 0x9D73, + 22849: 0x9D74, + 22850: 0x9D75, + 22851: 0x9D76, + 22852: 0x9D77, + 22853: 0x9D78, + 22854: 0x9D79, + 22855: 0x9D7A, + 22856: 0x9D7B, + 22857: 0x9D7C, + 22858: 0x9D7D, + 22859: 0x9D7E, + 22860: 0x9D7F, + 22861: 0x9D80, + 22862: 0x9D81, + 22863: 0x9D82, + 22864: 0x9D83, + 22865: 0x9D84, + 22866: 0x9D85, + 22867: 0x9D86, + 22868: 0x9D87, + 22869: 0x9D88, + 22870: 0x9D89, + 22871: 0x9D8A, + 22872: 0x9D8B, + 22873: 0x9D8C, + 22874: 0x9D8D, + 22875: 0x9D8E, + 22876: 0x9D8F, + 22877: 0x9D90, + 22878: 0x9D91, + 22879: 0x9D92, + 22880: 0x9D93, + 22881: 0x9D94, + 22882: 0x9D95, + 22883: 0x9D96, + 22884: 0x9D97, + 22885: 0x9D98, + 22886: 0x9D99, + 22887: 0x9D9A, + 22888: 0x9D9B, + 22889: 0x9D9C, + 22890: 0x9D9D, + 22891: 0x9D9E, + 22892: 0x9D9F, + 22893: 0x9DA0, + 22894: 0x9DA1, + 22895: 0x9DA2, + 22990: 0x9DA3, + 22991: 0x9DA4, + 22992: 0x9DA5, + 22993: 0x9DA6, + 22994: 0x9DA7, + 22995: 0x9DA8, + 22996: 0x9DA9, + 22997: 0x9DAA, + 22998: 0x9DAB, + 22999: 0x9DAC, + 23000: 0x9DAD, + 23001: 0x9DAE, + 23002: 0x9DAF, + 23003: 0x9DB0, + 23004: 0x9DB1, + 23005: 0x9DB2, + 23006: 0x9DB3, + 23007: 0x9DB4, + 23008: 0x9DB5, + 23009: 0x9DB6, + 23010: 0x9DB7, + 23011: 0x9DB8, + 23012: 0x9DB9, + 23013: 0x9DBA, + 23014: 0x9DBB, + 23015: 0x9DBC, + 23016: 0x9DBD, + 23017: 0x9DBE, + 23018: 0x9DBF, + 23019: 0x9DC0, + 23020: 0x9DC1, + 23021: 0x9DC2, + 23022: 0x9DC3, + 23023: 0x9DC4, + 23024: 0x9DC5, + 23025: 0x9DC6, + 23026: 0x9DC7, + 23027: 0x9DC8, + 23028: 0x9DC9, + 23029: 0x9DCA, + 23030: 0x9DCB, + 23031: 0x9DCC, + 23032: 0x9DCD, + 23033: 0x9DCE, + 23034: 0x9DCF, + 23035: 0x9DD0, + 23036: 0x9DD1, + 23037: 0x9DD2, + 23038: 0x9DD3, + 23039: 0x9DD4, + 23040: 0x9DD5, + 23041: 0x9DD6, + 23042: 0x9DD7, + 23043: 0x9DD8, + 23044: 0x9DD9, + 23045: 0x9DDA, + 23046: 0x9DDB, + 23047: 0x9DDC, + 23048: 0x9DDD, + 23049: 0x9DDE, + 23050: 0x9DDF, + 23051: 0x9DE0, + 23052: 0x9DE1, + 23053: 0x9DE2, + 23054: 0x9DE3, + 23055: 0x9DE4, + 23056: 0x9DE5, + 23057: 0x9DE6, + 23058: 0x9DE7, + 23059: 0x9DE8, + 23060: 0x9DE9, + 23061: 0x9DEA, + 23062: 0x9DEB, + 23063: 0x9DEC, + 23064: 0x9DED, + 23065: 0x9DEE, + 23066: 0x9DEF, + 23067: 0x9DF0, + 23068: 0x9DF1, + 23069: 0x9DF2, + 23070: 0x9DF3, + 23071: 0x9DF4, + 23072: 0x9DF5, + 23073: 0x9DF6, + 23074: 0x9DF7, + 23075: 0x9DF8, + 23076: 0x9DF9, + 23077: 0x9DFA, + 23078: 0x9DFB, + 23079: 0x9DFC, + 23080: 0x9DFD, + 23081: 0x9DFE, + 23082: 0x9DFF, + 23083: 0x9E00, + 23084: 0x9E01, + 23085: 0x9E02, + 23180: 0x9E03, + 23181: 0x9E04, + 23182: 0x9E05, + 23183: 0x9E06, + 23184: 0x9E07, + 23185: 0x9E08, + 23186: 0x9E09, + 23187: 0x9E0A, + 23188: 0x9E0B, + 23189: 0x9E0C, + 23190: 0x9E0D, + 23191: 0x9E0E, + 23192: 0x9E0F, + 23193: 0x9E10, + 23194: 0x9E11, + 23195: 0x9E12, + 23196: 0x9E13, + 23197: 0x9E14, + 23198: 0x9E15, + 23199: 0x9E16, + 23200: 0x9E17, + 23201: 0x9E18, + 23202: 0x9E19, + 23203: 0x9E1A, + 23204: 0x9E1B, + 23205: 0x9E1C, + 23206: 0x9E1D, + 23207: 0x9E1E, + 23208: 0x9E24, + 23209: 0x9E27, + 23210: 0x9E2E, + 23211: 0x9E30, + 23212: 0x9E34, + 23213: 0x9E3B, + 23214: 0x9E3C, + 23215: 0x9E40, + 23216: 0x9E4D, + 23217: 0x9E50, + 23218: 0x9E52, + 23219: 0x9E53, + 23220: 0x9E54, + 23221: 0x9E56, + 23222: 0x9E59, + 23223: 0x9E5D, + 23224: 0x9E5F, + 23225: 0x9E60, + 23226: 0x9E61, + 23227: 0x9E62, + 23228: 0x9E65, + 23229: 0x9E6E, + 23230: 0x9E6F, + 23231: 0x9E72, + 23232: 0x9E74, + 23233: 0x9E75, + 23234: 0x9E76, + 23235: 0x9E77, + 23236: 0x9E78, + 23237: 0x9E79, + 23238: 0x9E7A, + 23239: 0x9E7B, + 23240: 0x9E7C, + 23241: 0x9E7D, + 23242: 0x9E80, + 23243: 0x9E81, + 23244: 0x9E83, + 23245: 0x9E84, + 23246: 0x9E85, + 23247: 0x9E86, + 23248: 0x9E89, + 23249: 0x9E8A, + 23250: 0x9E8C, + 23251: 0x9E8D, + 23252: 0x9E8E, + 23253: 0x9E8F, + 23254: 0x9E90, + 23255: 0x9E91, + 23256: 0x9E94, + 23257: 0x9E95, + 23258: 0x9E96, + 23259: 0x9E97, + 23260: 0x9E98, + 23261: 0x9E99, + 23262: 0x9E9A, + 23263: 0x9E9B, + 23264: 0x9E9C, + 23265: 0x9E9E, + 23266: 0x9EA0, + 23267: 0x9EA1, + 23268: 0x9EA2, + 23269: 0x9EA3, + 23270: 0x9EA4, + 23271: 0x9EA5, + 23272: 0x9EA7, + 23273: 0x9EA8, + 23274: 0x9EA9, + 23275: 0x9EAA, + 23370: 0x9EAB, + 23371: 0x9EAC, + 23372: 0x9EAD, + 23373: 0x9EAE, + 23374: 0x9EAF, + 23375: 0x9EB0, + 23376: 0x9EB1, + 23377: 0x9EB2, + 23378: 0x9EB3, + 23379: 0x9EB5, + 23380: 0x9EB6, + 23381: 0x9EB7, + 23382: 0x9EB9, + 23383: 0x9EBA, + 23384: 0x9EBC, + 23385: 0x9EBF, + 23386: 0x9EC0, + 23387: 0x9EC1, + 23388: 0x9EC2, + 23389: 0x9EC3, + 23390: 0x9EC5, + 23391: 0x9EC6, + 23392: 0x9EC7, + 23393: 0x9EC8, + 23394: 0x9ECA, + 23395: 0x9ECB, + 23396: 0x9ECC, + 23397: 0x9ED0, + 23398: 0x9ED2, + 23399: 0x9ED3, + 23400: 0x9ED5, + 23401: 0x9ED6, + 23402: 0x9ED7, + 23403: 0x9ED9, + 23404: 0x9EDA, + 23405: 0x9EDE, + 23406: 0x9EE1, + 23407: 0x9EE3, + 23408: 0x9EE4, + 23409: 0x9EE6, + 23410: 0x9EE8, + 23411: 0x9EEB, + 23412: 0x9EEC, + 23413: 0x9EED, + 23414: 0x9EEE, + 23415: 0x9EF0, + 23416: 0x9EF1, + 23417: 0x9EF2, + 23418: 0x9EF3, + 23419: 0x9EF4, + 23420: 0x9EF5, + 23421: 0x9EF6, + 23422: 0x9EF7, + 23423: 0x9EF8, + 23424: 0x9EFA, + 23425: 0x9EFD, + 23426: 0x9EFF, + 23427: 0x9F00, + 23428: 0x9F01, + 23429: 0x9F02, + 23430: 0x9F03, + 23431: 0x9F04, + 23432: 0x9F05, + 23433: 0x9F06, + 23434: 0x9F07, + 23435: 0x9F08, + 23436: 0x9F09, + 23437: 0x9F0A, + 23438: 0x9F0C, + 23439: 0x9F0F, + 23440: 0x9F11, + 23441: 0x9F12, + 23442: 0x9F14, + 23443: 0x9F15, + 23444: 0x9F16, + 23445: 0x9F18, + 23446: 0x9F1A, + 23447: 0x9F1B, + 23448: 0x9F1C, + 23449: 0x9F1D, + 23450: 0x9F1E, + 23451: 0x9F1F, + 23452: 0x9F21, + 23453: 0x9F23, + 23454: 0x9F24, + 23455: 0x9F25, + 23456: 0x9F26, + 23457: 0x9F27, + 23458: 0x9F28, + 23459: 0x9F29, + 23460: 0x9F2A, + 23461: 0x9F2B, + 23462: 0x9F2D, + 23463: 0x9F2E, + 23464: 0x9F30, + 23465: 0x9F31, + 23560: 0x9F32, + 23561: 0x9F33, + 23562: 0x9F34, + 23563: 0x9F35, + 23564: 0x9F36, + 23565: 0x9F38, + 23566: 0x9F3A, + 23567: 0x9F3C, + 23568: 0x9F3F, + 23569: 0x9F40, + 23570: 0x9F41, + 23571: 0x9F42, + 23572: 0x9F43, + 23573: 0x9F45, + 23574: 0x9F46, + 23575: 0x9F47, + 23576: 0x9F48, + 23577: 0x9F49, + 23578: 0x9F4A, + 23579: 0x9F4B, + 23580: 0x9F4C, + 23581: 0x9F4D, + 23582: 0x9F4E, + 23583: 0x9F4F, + 23584: 0x9F52, + 23585: 0x9F53, + 23586: 0x9F54, + 23587: 0x9F55, + 23588: 0x9F56, + 23589: 0x9F57, + 23590: 0x9F58, + 23591: 0x9F59, + 23592: 0x9F5A, + 23593: 0x9F5B, + 23594: 0x9F5C, + 23595: 0x9F5D, + 23596: 0x9F5E, + 23597: 0x9F5F, + 23598: 0x9F60, + 23599: 0x9F61, + 23600: 0x9F62, + 23601: 0x9F63, + 23602: 0x9F64, + 23603: 0x9F65, + 23604: 0x9F66, + 23605: 0x9F67, + 23606: 0x9F68, + 23607: 0x9F69, + 23608: 0x9F6A, + 23609: 0x9F6B, + 23610: 0x9F6C, + 23611: 0x9F6D, + 23612: 0x9F6E, + 23613: 0x9F6F, + 23614: 0x9F70, + 23615: 0x9F71, + 23616: 0x9F72, + 23617: 0x9F73, + 23618: 0x9F74, + 23619: 0x9F75, + 23620: 0x9F76, + 23621: 0x9F77, + 23622: 0x9F78, + 23623: 0x9F79, + 23624: 0x9F7A, + 23625: 0x9F7B, + 23626: 0x9F7C, + 23627: 0x9F7D, + 23628: 0x9F7E, + 23629: 0x9F81, + 23630: 0x9F82, + 23631: 0x9F8D, + 23632: 0x9F8E, + 23633: 0x9F8F, + 23634: 0x9F90, + 23635: 0x9F91, + 23636: 0x9F92, + 23637: 0x9F93, + 23638: 0x9F94, + 23639: 0x9F95, + 23640: 0x9F96, + 23641: 0x9F97, + 23642: 0x9F98, + 23643: 0x9F9C, + 23644: 0x9F9D, + 23645: 0x9F9E, + 23646: 0x9FA1, + 23647: 0x9FA2, + 23648: 0x9FA3, + 23649: 0x9FA4, + 23650: 0x9FA5, + 23651: 0xF92C, + 23652: 0xF979, + 23653: 0xF995, + 23654: 0xF9E7, + 23655: 0xF9F1, + 23750: 0xFA0C, + 23751: 0xFA0D, + 23752: 0xFA0E, + 23753: 0xFA0F, + 23754: 0xFA11, + 23755: 0xFA13, + 23756: 0xFA14, + 23757: 0xFA18, + 23758: 0xFA1F, + 23759: 0xFA20, + 23760: 0xFA21, + 23761: 0xFA23, + 23762: 0xFA24, + 23763: 0xFA27, + 23764: 0xFA28, + 23765: 0xFA29, + 23766: 0x2E81, + 23770: 0x2E84, + 23771: 0x3473, + 23772: 0x3447, + 23773: 0x2E88, + 23774: 0x2E8B, + 23776: 0x359E, + 23777: 0x361A, + 23778: 0x360E, + 23779: 0x2E8C, + 23780: 0x2E97, + 23781: 0x396E, + 23782: 0x3918, + 23784: 0x39CF, + 23785: 0x39DF, + 23786: 0x3A73, + 23787: 0x39D0, + 23790: 0x3B4E, + 23791: 0x3C6E, + 23792: 0x3CE0, + 23793: 0x2EA7, + 23796: 0x2EAA, + 23797: 0x4056, + 23798: 0x415F, + 23799: 0x2EAE, + 23800: 0x4337, + 23801: 0x2EB3, + 23802: 0x2EB6, + 23803: 0x2EB7, + 23805: 0x43B1, + 23806: 0x43AC, + 23807: 0x2EBB, + 23808: 0x43DD, + 23809: 0x44D6, + 23810: 0x4661, + 23811: 0x464C, + 23813: 0x4723, + 23814: 0x4729, + 23815: 0x477C, + 23816: 0x478D, + 23817: 0x2ECA, + 23818: 0x4947, + 23819: 0x497A, + 23820: 0x497D, + 23821: 0x4982, + 23822: 0x4983, + 23823: 0x4985, + 23824: 0x4986, + 23825: 0x499F, + 23826: 0x499B, + 23827: 0x49B7, + 23828: 0x49B6, + 23831: 0x4CA3, + 23832: 0x4C9F, + 23833: 0x4CA0, + 23834: 0x4CA1, + 23835: 0x4C77, + 23836: 0x4CA2, + 23837: 0x4D13, + 23838: 0x4D14, + 23839: 0x4D15, + 23840: 0x4D16, + 23841: 0x4D17, + 23842: 0x4D18, + 23843: 0x4D19, + 23844: 0x4DAE, +} + +const numEncodeTables = 5 + +// encodeX are the encoding tables from Unicode to GBK code, +// sorted by decreasing length. +// encode0: 28965 entries for runes in [11905, 40870). +// encode1: 1587 entries for runes in [ 8208, 9795). +// encode2: 942 entries for runes in [ 164, 1106). +// encode3: 438 entries for runes in [65072, 65510). +// encode4: 254 entries for runes in [63788, 64042). + +const encode0Low, encode0High = 11905, 40870 + +var encode0 = [...]uint16{ + 11905 - 11905: 0xFE50, + 11908 - 11905: 0xFE54, + 11912 - 11905: 0xFE57, + 11915 - 11905: 0xFE58, + 11916 - 11905: 0xFE5D, + 11927 - 11905: 0xFE5E, + 11943 - 11905: 0xFE6B, + 11946 - 11905: 0xFE6E, + 11950 - 11905: 0xFE71, + 11955 - 11905: 0xFE73, + 11958 - 11905: 0xFE74, + 11959 - 11905: 0xFE75, + 11963 - 11905: 0xFE79, + 11978 - 11905: 0xFE84, + 12272 - 11905: 0xA98A, + 12273 - 11905: 0xA98B, + 12274 - 11905: 0xA98C, + 12275 - 11905: 0xA98D, + 12276 - 11905: 0xA98E, + 12277 - 11905: 0xA98F, + 12278 - 11905: 0xA990, + 12279 - 11905: 0xA991, + 12280 - 11905: 0xA992, + 12281 - 11905: 0xA993, + 12282 - 11905: 0xA994, + 12283 - 11905: 0xA995, + 12288 - 11905: 0xA1A1, + 12289 - 11905: 0xA1A2, + 12290 - 11905: 0xA1A3, + 12291 - 11905: 0xA1A8, + 12293 - 11905: 0xA1A9, + 12294 - 11905: 0xA965, + 12295 - 11905: 0xA996, + 12296 - 11905: 0xA1B4, + 12297 - 11905: 0xA1B5, + 12298 - 11905: 0xA1B6, + 12299 - 11905: 0xA1B7, + 12300 - 11905: 0xA1B8, + 12301 - 11905: 0xA1B9, + 12302 - 11905: 0xA1BA, + 12303 - 11905: 0xA1BB, + 12304 - 11905: 0xA1BE, + 12305 - 11905: 0xA1BF, + 12306 - 11905: 0xA893, + 12307 - 11905: 0xA1FE, + 12308 - 11905: 0xA1B2, + 12309 - 11905: 0xA1B3, + 12310 - 11905: 0xA1BC, + 12311 - 11905: 0xA1BD, + 12317 - 11905: 0xA894, + 12318 - 11905: 0xA895, + 12321 - 11905: 0xA940, + 12322 - 11905: 0xA941, + 12323 - 11905: 0xA942, + 12324 - 11905: 0xA943, + 12325 - 11905: 0xA944, + 12326 - 11905: 0xA945, + 12327 - 11905: 0xA946, + 12328 - 11905: 0xA947, + 12329 - 11905: 0xA948, + 12350 - 11905: 0xA989, + 12353 - 11905: 0xA4A1, + 12354 - 11905: 0xA4A2, + 12355 - 11905: 0xA4A3, + 12356 - 11905: 0xA4A4, + 12357 - 11905: 0xA4A5, + 12358 - 11905: 0xA4A6, + 12359 - 11905: 0xA4A7, + 12360 - 11905: 0xA4A8, + 12361 - 11905: 0xA4A9, + 12362 - 11905: 0xA4AA, + 12363 - 11905: 0xA4AB, + 12364 - 11905: 0xA4AC, + 12365 - 11905: 0xA4AD, + 12366 - 11905: 0xA4AE, + 12367 - 11905: 0xA4AF, + 12368 - 11905: 0xA4B0, + 12369 - 11905: 0xA4B1, + 12370 - 11905: 0xA4B2, + 12371 - 11905: 0xA4B3, + 12372 - 11905: 0xA4B4, + 12373 - 11905: 0xA4B5, + 12374 - 11905: 0xA4B6, + 12375 - 11905: 0xA4B7, + 12376 - 11905: 0xA4B8, + 12377 - 11905: 0xA4B9, + 12378 - 11905: 0xA4BA, + 12379 - 11905: 0xA4BB, + 12380 - 11905: 0xA4BC, + 12381 - 11905: 0xA4BD, + 12382 - 11905: 0xA4BE, + 12383 - 11905: 0xA4BF, + 12384 - 11905: 0xA4C0, + 12385 - 11905: 0xA4C1, + 12386 - 11905: 0xA4C2, + 12387 - 11905: 0xA4C3, + 12388 - 11905: 0xA4C4, + 12389 - 11905: 0xA4C5, + 12390 - 11905: 0xA4C6, + 12391 - 11905: 0xA4C7, + 12392 - 11905: 0xA4C8, + 12393 - 11905: 0xA4C9, + 12394 - 11905: 0xA4CA, + 12395 - 11905: 0xA4CB, + 12396 - 11905: 0xA4CC, + 12397 - 11905: 0xA4CD, + 12398 - 11905: 0xA4CE, + 12399 - 11905: 0xA4CF, + 12400 - 11905: 0xA4D0, + 12401 - 11905: 0xA4D1, + 12402 - 11905: 0xA4D2, + 12403 - 11905: 0xA4D3, + 12404 - 11905: 0xA4D4, + 12405 - 11905: 0xA4D5, + 12406 - 11905: 0xA4D6, + 12407 - 11905: 0xA4D7, + 12408 - 11905: 0xA4D8, + 12409 - 11905: 0xA4D9, + 12410 - 11905: 0xA4DA, + 12411 - 11905: 0xA4DB, + 12412 - 11905: 0xA4DC, + 12413 - 11905: 0xA4DD, + 12414 - 11905: 0xA4DE, + 12415 - 11905: 0xA4DF, + 12416 - 11905: 0xA4E0, + 12417 - 11905: 0xA4E1, + 12418 - 11905: 0xA4E2, + 12419 - 11905: 0xA4E3, + 12420 - 11905: 0xA4E4, + 12421 - 11905: 0xA4E5, + 12422 - 11905: 0xA4E6, + 12423 - 11905: 0xA4E7, + 12424 - 11905: 0xA4E8, + 12425 - 11905: 0xA4E9, + 12426 - 11905: 0xA4EA, + 12427 - 11905: 0xA4EB, + 12428 - 11905: 0xA4EC, + 12429 - 11905: 0xA4ED, + 12430 - 11905: 0xA4EE, + 12431 - 11905: 0xA4EF, + 12432 - 11905: 0xA4F0, + 12433 - 11905: 0xA4F1, + 12434 - 11905: 0xA4F2, + 12435 - 11905: 0xA4F3, + 12443 - 11905: 0xA961, + 12444 - 11905: 0xA962, + 12445 - 11905: 0xA966, + 12446 - 11905: 0xA967, + 12449 - 11905: 0xA5A1, + 12450 - 11905: 0xA5A2, + 12451 - 11905: 0xA5A3, + 12452 - 11905: 0xA5A4, + 12453 - 11905: 0xA5A5, + 12454 - 11905: 0xA5A6, + 12455 - 11905: 0xA5A7, + 12456 - 11905: 0xA5A8, + 12457 - 11905: 0xA5A9, + 12458 - 11905: 0xA5AA, + 12459 - 11905: 0xA5AB, + 12460 - 11905: 0xA5AC, + 12461 - 11905: 0xA5AD, + 12462 - 11905: 0xA5AE, + 12463 - 11905: 0xA5AF, + 12464 - 11905: 0xA5B0, + 12465 - 11905: 0xA5B1, + 12466 - 11905: 0xA5B2, + 12467 - 11905: 0xA5B3, + 12468 - 11905: 0xA5B4, + 12469 - 11905: 0xA5B5, + 12470 - 11905: 0xA5B6, + 12471 - 11905: 0xA5B7, + 12472 - 11905: 0xA5B8, + 12473 - 11905: 0xA5B9, + 12474 - 11905: 0xA5BA, + 12475 - 11905: 0xA5BB, + 12476 - 11905: 0xA5BC, + 12477 - 11905: 0xA5BD, + 12478 - 11905: 0xA5BE, + 12479 - 11905: 0xA5BF, + 12480 - 11905: 0xA5C0, + 12481 - 11905: 0xA5C1, + 12482 - 11905: 0xA5C2, + 12483 - 11905: 0xA5C3, + 12484 - 11905: 0xA5C4, + 12485 - 11905: 0xA5C5, + 12486 - 11905: 0xA5C6, + 12487 - 11905: 0xA5C7, + 12488 - 11905: 0xA5C8, + 12489 - 11905: 0xA5C9, + 12490 - 11905: 0xA5CA, + 12491 - 11905: 0xA5CB, + 12492 - 11905: 0xA5CC, + 12493 - 11905: 0xA5CD, + 12494 - 11905: 0xA5CE, + 12495 - 11905: 0xA5CF, + 12496 - 11905: 0xA5D0, + 12497 - 11905: 0xA5D1, + 12498 - 11905: 0xA5D2, + 12499 - 11905: 0xA5D3, + 12500 - 11905: 0xA5D4, + 12501 - 11905: 0xA5D5, + 12502 - 11905: 0xA5D6, + 12503 - 11905: 0xA5D7, + 12504 - 11905: 0xA5D8, + 12505 - 11905: 0xA5D9, + 12506 - 11905: 0xA5DA, + 12507 - 11905: 0xA5DB, + 12508 - 11905: 0xA5DC, + 12509 - 11905: 0xA5DD, + 12510 - 11905: 0xA5DE, + 12511 - 11905: 0xA5DF, + 12512 - 11905: 0xA5E0, + 12513 - 11905: 0xA5E1, + 12514 - 11905: 0xA5E2, + 12515 - 11905: 0xA5E3, + 12516 - 11905: 0xA5E4, + 12517 - 11905: 0xA5E5, + 12518 - 11905: 0xA5E6, + 12519 - 11905: 0xA5E7, + 12520 - 11905: 0xA5E8, + 12521 - 11905: 0xA5E9, + 12522 - 11905: 0xA5EA, + 12523 - 11905: 0xA5EB, + 12524 - 11905: 0xA5EC, + 12525 - 11905: 0xA5ED, + 12526 - 11905: 0xA5EE, + 12527 - 11905: 0xA5EF, + 12528 - 11905: 0xA5F0, + 12529 - 11905: 0xA5F1, + 12530 - 11905: 0xA5F2, + 12531 - 11905: 0xA5F3, + 12532 - 11905: 0xA5F4, + 12533 - 11905: 0xA5F5, + 12534 - 11905: 0xA5F6, + 12540 - 11905: 0xA960, + 12541 - 11905: 0xA963, + 12542 - 11905: 0xA964, + 12549 - 11905: 0xA8C5, + 12550 - 11905: 0xA8C6, + 12551 - 11905: 0xA8C7, + 12552 - 11905: 0xA8C8, + 12553 - 11905: 0xA8C9, + 12554 - 11905: 0xA8CA, + 12555 - 11905: 0xA8CB, + 12556 - 11905: 0xA8CC, + 12557 - 11905: 0xA8CD, + 12558 - 11905: 0xA8CE, + 12559 - 11905: 0xA8CF, + 12560 - 11905: 0xA8D0, + 12561 - 11905: 0xA8D1, + 12562 - 11905: 0xA8D2, + 12563 - 11905: 0xA8D3, + 12564 - 11905: 0xA8D4, + 12565 - 11905: 0xA8D5, + 12566 - 11905: 0xA8D6, + 12567 - 11905: 0xA8D7, + 12568 - 11905: 0xA8D8, + 12569 - 11905: 0xA8D9, + 12570 - 11905: 0xA8DA, + 12571 - 11905: 0xA8DB, + 12572 - 11905: 0xA8DC, + 12573 - 11905: 0xA8DD, + 12574 - 11905: 0xA8DE, + 12575 - 11905: 0xA8DF, + 12576 - 11905: 0xA8E0, + 12577 - 11905: 0xA8E1, + 12578 - 11905: 0xA8E2, + 12579 - 11905: 0xA8E3, + 12580 - 11905: 0xA8E4, + 12581 - 11905: 0xA8E5, + 12582 - 11905: 0xA8E6, + 12583 - 11905: 0xA8E7, + 12584 - 11905: 0xA8E8, + 12585 - 11905: 0xA8E9, + 12832 - 11905: 0xA2E5, + 12833 - 11905: 0xA2E6, + 12834 - 11905: 0xA2E7, + 12835 - 11905: 0xA2E8, + 12836 - 11905: 0xA2E9, + 12837 - 11905: 0xA2EA, + 12838 - 11905: 0xA2EB, + 12839 - 11905: 0xA2EC, + 12840 - 11905: 0xA2ED, + 12841 - 11905: 0xA2EE, + 12849 - 11905: 0xA95A, + 12963 - 11905: 0xA949, + 13198 - 11905: 0xA94A, + 13199 - 11905: 0xA94B, + 13212 - 11905: 0xA94C, + 13213 - 11905: 0xA94D, + 13214 - 11905: 0xA94E, + 13217 - 11905: 0xA94F, + 13252 - 11905: 0xA950, + 13262 - 11905: 0xA951, + 13265 - 11905: 0xA952, + 13266 - 11905: 0xA953, + 13269 - 11905: 0xA954, + 13383 - 11905: 0xFE56, + 13427 - 11905: 0xFE55, + 13726 - 11905: 0xFE5A, + 13838 - 11905: 0xFE5C, + 13850 - 11905: 0xFE5B, + 14616 - 11905: 0xFE60, + 14702 - 11905: 0xFE5F, + 14799 - 11905: 0xFE62, + 14800 - 11905: 0xFE65, + 14815 - 11905: 0xFE63, + 14963 - 11905: 0xFE64, + 15182 - 11905: 0xFE68, + 15470 - 11905: 0xFE69, + 15584 - 11905: 0xFE6A, + 16470 - 11905: 0xFE6F, + 16735 - 11905: 0xFE70, + 17207 - 11905: 0xFE72, + 17324 - 11905: 0xFE78, + 17329 - 11905: 0xFE77, + 17373 - 11905: 0xFE7A, + 17622 - 11905: 0xFE7B, + 17996 - 11905: 0xFE7D, + 18017 - 11905: 0xFE7C, + 18211 - 11905: 0xFE80, + 18217 - 11905: 0xFE81, + 18300 - 11905: 0xFE82, + 18317 - 11905: 0xFE83, + 18759 - 11905: 0xFE85, + 18810 - 11905: 0xFE86, + 18813 - 11905: 0xFE87, + 18818 - 11905: 0xFE88, + 18819 - 11905: 0xFE89, + 18821 - 11905: 0xFE8A, + 18822 - 11905: 0xFE8B, + 18843 - 11905: 0xFE8D, + 18847 - 11905: 0xFE8C, + 18870 - 11905: 0xFE8F, + 18871 - 11905: 0xFE8E, + 19575 - 11905: 0xFE96, + 19615 - 11905: 0xFE93, + 19616 - 11905: 0xFE94, + 19617 - 11905: 0xFE95, + 19618 - 11905: 0xFE97, + 19619 - 11905: 0xFE92, + 19731 - 11905: 0xFE98, + 19732 - 11905: 0xFE99, + 19733 - 11905: 0xFE9A, + 19734 - 11905: 0xFE9B, + 19735 - 11905: 0xFE9C, + 19736 - 11905: 0xFE9D, + 19737 - 11905: 0xFE9E, + 19886 - 11905: 0xFE9F, + 19968 - 11905: 0xD2BB, + 19969 - 11905: 0xB6A1, + 19970 - 11905: 0x8140, + 19971 - 11905: 0xC6DF, + 19972 - 11905: 0x8141, + 19973 - 11905: 0x8142, + 19974 - 11905: 0x8143, + 19975 - 11905: 0xCDF2, + 19976 - 11905: 0xD5C9, + 19977 - 11905: 0xC8FD, + 19978 - 11905: 0xC9CF, + 19979 - 11905: 0xCFC2, + 19980 - 11905: 0xD8A2, + 19981 - 11905: 0xB2BB, + 19982 - 11905: 0xD3EB, + 19983 - 11905: 0x8144, + 19984 - 11905: 0xD8A4, + 19985 - 11905: 0xB3F3, + 19986 - 11905: 0x8145, + 19987 - 11905: 0xD7A8, + 19988 - 11905: 0xC7D2, + 19989 - 11905: 0xD8A7, + 19990 - 11905: 0xCAC0, + 19991 - 11905: 0x8146, + 19992 - 11905: 0xC7F0, + 19993 - 11905: 0xB1FB, + 19994 - 11905: 0xD2B5, + 19995 - 11905: 0xB4D4, + 19996 - 11905: 0xB6AB, + 19997 - 11905: 0xCBBF, + 19998 - 11905: 0xD8A9, + 19999 - 11905: 0x8147, + 20000 - 11905: 0x8148, + 20001 - 11905: 0x8149, + 20002 - 11905: 0xB6AA, + 20003 - 11905: 0x814A, + 20004 - 11905: 0xC1BD, + 20005 - 11905: 0xD1CF, + 20006 - 11905: 0x814B, + 20007 - 11905: 0xC9A5, + 20008 - 11905: 0xD8AD, + 20009 - 11905: 0x814C, + 20010 - 11905: 0xB8F6, + 20011 - 11905: 0xD1BE, + 20012 - 11905: 0xE3DC, + 20013 - 11905: 0xD6D0, + 20014 - 11905: 0x814D, + 20015 - 11905: 0x814E, + 20016 - 11905: 0xB7E1, + 20017 - 11905: 0x814F, + 20018 - 11905: 0xB4AE, + 20019 - 11905: 0x8150, + 20020 - 11905: 0xC1D9, + 20021 - 11905: 0x8151, + 20022 - 11905: 0xD8BC, + 20023 - 11905: 0x8152, + 20024 - 11905: 0xCDE8, + 20025 - 11905: 0xB5A4, + 20026 - 11905: 0xCEAA, + 20027 - 11905: 0xD6F7, + 20028 - 11905: 0x8153, + 20029 - 11905: 0xC0F6, + 20030 - 11905: 0xBED9, + 20031 - 11905: 0xD8AF, + 20032 - 11905: 0x8154, + 20033 - 11905: 0x8155, + 20034 - 11905: 0x8156, + 20035 - 11905: 0xC4CB, + 20036 - 11905: 0x8157, + 20037 - 11905: 0xBEC3, + 20038 - 11905: 0x8158, + 20039 - 11905: 0xD8B1, + 20040 - 11905: 0xC3B4, + 20041 - 11905: 0xD2E5, + 20042 - 11905: 0x8159, + 20043 - 11905: 0xD6AE, + 20044 - 11905: 0xCEDA, + 20045 - 11905: 0xD5A7, + 20046 - 11905: 0xBAF5, + 20047 - 11905: 0xB7A6, + 20048 - 11905: 0xC0D6, + 20049 - 11905: 0x815A, + 20050 - 11905: 0xC6B9, + 20051 - 11905: 0xC5D2, + 20052 - 11905: 0xC7C7, + 20053 - 11905: 0x815B, + 20054 - 11905: 0xB9D4, + 20055 - 11905: 0x815C, + 20056 - 11905: 0xB3CB, + 20057 - 11905: 0xD2D2, + 20058 - 11905: 0x815D, + 20059 - 11905: 0x815E, + 20060 - 11905: 0xD8BF, + 20061 - 11905: 0xBEC5, + 20062 - 11905: 0xC6F2, + 20063 - 11905: 0xD2B2, + 20064 - 11905: 0xCFB0, + 20065 - 11905: 0xCFE7, + 20066 - 11905: 0x815F, + 20067 - 11905: 0x8160, + 20068 - 11905: 0x8161, + 20069 - 11905: 0x8162, + 20070 - 11905: 0xCAE9, + 20071 - 11905: 0x8163, + 20072 - 11905: 0x8164, + 20073 - 11905: 0xD8C0, + 20074 - 11905: 0x8165, + 20075 - 11905: 0x8166, + 20076 - 11905: 0x8167, + 20077 - 11905: 0x8168, + 20078 - 11905: 0x8169, + 20079 - 11905: 0x816A, + 20080 - 11905: 0xC2F2, + 20081 - 11905: 0xC2D2, + 20082 - 11905: 0x816B, + 20083 - 11905: 0xC8E9, + 20084 - 11905: 0x816C, + 20085 - 11905: 0x816D, + 20086 - 11905: 0x816E, + 20087 - 11905: 0x816F, + 20088 - 11905: 0x8170, + 20089 - 11905: 0x8171, + 20090 - 11905: 0x8172, + 20091 - 11905: 0x8173, + 20092 - 11905: 0x8174, + 20093 - 11905: 0x8175, + 20094 - 11905: 0xC7AC, + 20095 - 11905: 0x8176, + 20096 - 11905: 0x8177, + 20097 - 11905: 0x8178, + 20098 - 11905: 0x8179, + 20099 - 11905: 0x817A, + 20100 - 11905: 0x817B, + 20101 - 11905: 0x817C, + 20102 - 11905: 0xC1CB, + 20103 - 11905: 0x817D, + 20104 - 11905: 0xD3E8, + 20105 - 11905: 0xD5F9, + 20106 - 11905: 0x817E, + 20107 - 11905: 0xCAC2, + 20108 - 11905: 0xB6FE, + 20109 - 11905: 0xD8A1, + 20110 - 11905: 0xD3DA, + 20111 - 11905: 0xBFF7, + 20112 - 11905: 0x8180, + 20113 - 11905: 0xD4C6, + 20114 - 11905: 0xBBA5, + 20115 - 11905: 0xD8C1, + 20116 - 11905: 0xCEE5, + 20117 - 11905: 0xBEAE, + 20118 - 11905: 0x8181, + 20119 - 11905: 0x8182, + 20120 - 11905: 0xD8A8, + 20121 - 11905: 0x8183, + 20122 - 11905: 0xD1C7, + 20123 - 11905: 0xD0A9, + 20124 - 11905: 0x8184, + 20125 - 11905: 0x8185, + 20126 - 11905: 0x8186, + 20127 - 11905: 0xD8BD, + 20128 - 11905: 0xD9EF, + 20129 - 11905: 0xCDF6, + 20130 - 11905: 0xBFBA, + 20131 - 11905: 0x8187, + 20132 - 11905: 0xBDBB, + 20133 - 11905: 0xBAA5, + 20134 - 11905: 0xD2E0, + 20135 - 11905: 0xB2FA, + 20136 - 11905: 0xBAE0, + 20137 - 11905: 0xC4B6, + 20138 - 11905: 0x8188, + 20139 - 11905: 0xCFED, + 20140 - 11905: 0xBEA9, + 20141 - 11905: 0xCDA4, + 20142 - 11905: 0xC1C1, + 20143 - 11905: 0x8189, + 20144 - 11905: 0x818A, + 20145 - 11905: 0x818B, + 20146 - 11905: 0xC7D7, + 20147 - 11905: 0xD9F1, + 20148 - 11905: 0x818C, + 20149 - 11905: 0xD9F4, + 20150 - 11905: 0x818D, + 20151 - 11905: 0x818E, + 20152 - 11905: 0x818F, + 20153 - 11905: 0x8190, + 20154 - 11905: 0xC8CB, + 20155 - 11905: 0xD8E9, + 20156 - 11905: 0x8191, + 20157 - 11905: 0x8192, + 20158 - 11905: 0x8193, + 20159 - 11905: 0xD2DA, + 20160 - 11905: 0xCAB2, + 20161 - 11905: 0xC8CA, + 20162 - 11905: 0xD8EC, + 20163 - 11905: 0xD8EA, + 20164 - 11905: 0xD8C6, + 20165 - 11905: 0xBDF6, + 20166 - 11905: 0xC6CD, + 20167 - 11905: 0xB3F0, + 20168 - 11905: 0x8194, + 20169 - 11905: 0xD8EB, + 20170 - 11905: 0xBDF1, + 20171 - 11905: 0xBDE9, + 20172 - 11905: 0x8195, + 20173 - 11905: 0xC8D4, + 20174 - 11905: 0xB4D3, + 20175 - 11905: 0x8196, + 20176 - 11905: 0x8197, + 20177 - 11905: 0xC2D8, + 20178 - 11905: 0x8198, + 20179 - 11905: 0xB2D6, + 20180 - 11905: 0xD7D0, + 20181 - 11905: 0xCACB, + 20182 - 11905: 0xCBFB, + 20183 - 11905: 0xD5CC, + 20184 - 11905: 0xB8B6, + 20185 - 11905: 0xCFC9, + 20186 - 11905: 0x8199, + 20187 - 11905: 0x819A, + 20188 - 11905: 0x819B, + 20189 - 11905: 0xD9DA, + 20190 - 11905: 0xD8F0, + 20191 - 11905: 0xC7AA, + 20192 - 11905: 0x819C, + 20193 - 11905: 0xD8EE, + 20194 - 11905: 0x819D, + 20195 - 11905: 0xB4FA, + 20196 - 11905: 0xC1EE, + 20197 - 11905: 0xD2D4, + 20198 - 11905: 0x819E, + 20199 - 11905: 0x819F, + 20200 - 11905: 0xD8ED, + 20201 - 11905: 0x81A0, + 20202 - 11905: 0xD2C7, + 20203 - 11905: 0xD8EF, + 20204 - 11905: 0xC3C7, + 20205 - 11905: 0x81A1, + 20206 - 11905: 0x81A2, + 20207 - 11905: 0x81A3, + 20208 - 11905: 0xD1F6, + 20209 - 11905: 0x81A4, + 20210 - 11905: 0xD6D9, + 20211 - 11905: 0xD8F2, + 20212 - 11905: 0x81A5, + 20213 - 11905: 0xD8F5, + 20214 - 11905: 0xBCFE, + 20215 - 11905: 0xBCDB, + 20216 - 11905: 0x81A6, + 20217 - 11905: 0x81A7, + 20218 - 11905: 0x81A8, + 20219 - 11905: 0xC8CE, + 20220 - 11905: 0x81A9, + 20221 - 11905: 0xB7DD, + 20222 - 11905: 0x81AA, + 20223 - 11905: 0xB7C2, + 20224 - 11905: 0x81AB, + 20225 - 11905: 0xC6F3, + 20226 - 11905: 0x81AC, + 20227 - 11905: 0x81AD, + 20228 - 11905: 0x81AE, + 20229 - 11905: 0x81AF, + 20230 - 11905: 0x81B0, + 20231 - 11905: 0x81B1, + 20232 - 11905: 0x81B2, + 20233 - 11905: 0xD8F8, + 20234 - 11905: 0xD2C1, + 20235 - 11905: 0x81B3, + 20236 - 11905: 0x81B4, + 20237 - 11905: 0xCEE9, + 20238 - 11905: 0xBCBF, + 20239 - 11905: 0xB7FC, + 20240 - 11905: 0xB7A5, + 20241 - 11905: 0xD0DD, + 20242 - 11905: 0x81B5, + 20243 - 11905: 0x81B6, + 20244 - 11905: 0x81B7, + 20245 - 11905: 0x81B8, + 20246 - 11905: 0x81B9, + 20247 - 11905: 0xD6DA, + 20248 - 11905: 0xD3C5, + 20249 - 11905: 0xBBEF, + 20250 - 11905: 0xBBE1, + 20251 - 11905: 0xD8F1, + 20252 - 11905: 0x81BA, + 20253 - 11905: 0x81BB, + 20254 - 11905: 0xC9A1, + 20255 - 11905: 0xCEB0, + 20256 - 11905: 0xB4AB, + 20257 - 11905: 0x81BC, + 20258 - 11905: 0xD8F3, + 20259 - 11905: 0x81BD, + 20260 - 11905: 0xC9CB, + 20261 - 11905: 0xD8F6, + 20262 - 11905: 0xC2D7, + 20263 - 11905: 0xD8F7, + 20264 - 11905: 0x81BE, + 20265 - 11905: 0x81BF, + 20266 - 11905: 0xCEB1, + 20267 - 11905: 0xD8F9, + 20268 - 11905: 0x81C0, + 20269 - 11905: 0x81C1, + 20270 - 11905: 0x81C2, + 20271 - 11905: 0xB2AE, + 20272 - 11905: 0xB9C0, + 20273 - 11905: 0x81C3, + 20274 - 11905: 0xD9A3, + 20275 - 11905: 0x81C4, + 20276 - 11905: 0xB0E9, + 20277 - 11905: 0x81C5, + 20278 - 11905: 0xC1E6, + 20279 - 11905: 0x81C6, + 20280 - 11905: 0xC9EC, + 20281 - 11905: 0x81C7, + 20282 - 11905: 0xCBC5, + 20283 - 11905: 0x81C8, + 20284 - 11905: 0xCBC6, + 20285 - 11905: 0xD9A4, + 20286 - 11905: 0x81C9, + 20287 - 11905: 0x81CA, + 20288 - 11905: 0x81CB, + 20289 - 11905: 0x81CC, + 20290 - 11905: 0x81CD, + 20291 - 11905: 0xB5E8, + 20292 - 11905: 0x81CE, + 20293 - 11905: 0x81CF, + 20294 - 11905: 0xB5AB, + 20295 - 11905: 0x81D0, + 20296 - 11905: 0x81D1, + 20297 - 11905: 0x81D2, + 20298 - 11905: 0x81D3, + 20299 - 11905: 0x81D4, + 20300 - 11905: 0x81D5, + 20301 - 11905: 0xCEBB, + 20302 - 11905: 0xB5CD, + 20303 - 11905: 0xD7A1, + 20304 - 11905: 0xD7F4, + 20305 - 11905: 0xD3D3, + 20306 - 11905: 0x81D6, + 20307 - 11905: 0xCCE5, + 20308 - 11905: 0x81D7, + 20309 - 11905: 0xBACE, + 20310 - 11905: 0x81D8, + 20311 - 11905: 0xD9A2, + 20312 - 11905: 0xD9DC, + 20313 - 11905: 0xD3E0, + 20314 - 11905: 0xD8FD, + 20315 - 11905: 0xB7F0, + 20316 - 11905: 0xD7F7, + 20317 - 11905: 0xD8FE, + 20318 - 11905: 0xD8FA, + 20319 - 11905: 0xD9A1, + 20320 - 11905: 0xC4E3, + 20321 - 11905: 0x81D9, + 20322 - 11905: 0x81DA, + 20323 - 11905: 0xD3B6, + 20324 - 11905: 0xD8F4, + 20325 - 11905: 0xD9DD, + 20326 - 11905: 0x81DB, + 20327 - 11905: 0xD8FB, + 20328 - 11905: 0x81DC, + 20329 - 11905: 0xC5E5, + 20330 - 11905: 0x81DD, + 20331 - 11905: 0x81DE, + 20332 - 11905: 0xC0D0, + 20333 - 11905: 0x81DF, + 20334 - 11905: 0x81E0, + 20335 - 11905: 0xD1F0, + 20336 - 11905: 0xB0DB, + 20337 - 11905: 0x81E1, + 20338 - 11905: 0x81E2, + 20339 - 11905: 0xBCD1, + 20340 - 11905: 0xD9A6, + 20341 - 11905: 0x81E3, + 20342 - 11905: 0xD9A5, + 20343 - 11905: 0x81E4, + 20344 - 11905: 0x81E5, + 20345 - 11905: 0x81E6, + 20346 - 11905: 0x81E7, + 20347 - 11905: 0xD9AC, + 20348 - 11905: 0xD9AE, + 20349 - 11905: 0x81E8, + 20350 - 11905: 0xD9AB, + 20351 - 11905: 0xCAB9, + 20352 - 11905: 0x81E9, + 20353 - 11905: 0x81EA, + 20354 - 11905: 0x81EB, + 20355 - 11905: 0xD9A9, + 20356 - 11905: 0xD6B6, + 20357 - 11905: 0x81EC, + 20358 - 11905: 0x81ED, + 20359 - 11905: 0x81EE, + 20360 - 11905: 0xB3DE, + 20361 - 11905: 0xD9A8, + 20362 - 11905: 0x81EF, + 20363 - 11905: 0xC0FD, + 20364 - 11905: 0x81F0, + 20365 - 11905: 0xCACC, + 20366 - 11905: 0x81F1, + 20367 - 11905: 0xD9AA, + 20368 - 11905: 0x81F2, + 20369 - 11905: 0xD9A7, + 20370 - 11905: 0x81F3, + 20371 - 11905: 0x81F4, + 20372 - 11905: 0xD9B0, + 20373 - 11905: 0x81F5, + 20374 - 11905: 0x81F6, + 20375 - 11905: 0xB6B1, + 20376 - 11905: 0x81F7, + 20377 - 11905: 0x81F8, + 20378 - 11905: 0x81F9, + 20379 - 11905: 0xB9A9, + 20380 - 11905: 0x81FA, + 20381 - 11905: 0xD2C0, + 20382 - 11905: 0x81FB, + 20383 - 11905: 0x81FC, + 20384 - 11905: 0xCFC0, + 20385 - 11905: 0x81FD, + 20386 - 11905: 0x81FE, + 20387 - 11905: 0xC2C2, + 20388 - 11905: 0x8240, + 20389 - 11905: 0xBDC4, + 20390 - 11905: 0xD5EC, + 20391 - 11905: 0xB2E0, + 20392 - 11905: 0xC7C8, + 20393 - 11905: 0xBFEB, + 20394 - 11905: 0xD9AD, + 20395 - 11905: 0x8241, + 20396 - 11905: 0xD9AF, + 20397 - 11905: 0x8242, + 20398 - 11905: 0xCEEA, + 20399 - 11905: 0xBAEE, + 20400 - 11905: 0x8243, + 20401 - 11905: 0x8244, + 20402 - 11905: 0x8245, + 20403 - 11905: 0x8246, + 20404 - 11905: 0x8247, + 20405 - 11905: 0xC7D6, + 20406 - 11905: 0x8248, + 20407 - 11905: 0x8249, + 20408 - 11905: 0x824A, + 20409 - 11905: 0x824B, + 20410 - 11905: 0x824C, + 20411 - 11905: 0x824D, + 20412 - 11905: 0x824E, + 20413 - 11905: 0x824F, + 20414 - 11905: 0x8250, + 20415 - 11905: 0xB1E3, + 20416 - 11905: 0x8251, + 20417 - 11905: 0x8252, + 20418 - 11905: 0x8253, + 20419 - 11905: 0xB4D9, + 20420 - 11905: 0xB6ED, + 20421 - 11905: 0xD9B4, + 20422 - 11905: 0x8254, + 20423 - 11905: 0x8255, + 20424 - 11905: 0x8256, + 20425 - 11905: 0x8257, + 20426 - 11905: 0xBFA1, + 20427 - 11905: 0x8258, + 20428 - 11905: 0x8259, + 20429 - 11905: 0x825A, + 20430 - 11905: 0xD9DE, + 20431 - 11905: 0xC7CE, + 20432 - 11905: 0xC0FE, + 20433 - 11905: 0xD9B8, + 20434 - 11905: 0x825B, + 20435 - 11905: 0x825C, + 20436 - 11905: 0x825D, + 20437 - 11905: 0x825E, + 20438 - 11905: 0x825F, + 20439 - 11905: 0xCBD7, + 20440 - 11905: 0xB7FD, + 20441 - 11905: 0x8260, + 20442 - 11905: 0xD9B5, + 20443 - 11905: 0x8261, + 20444 - 11905: 0xD9B7, + 20445 - 11905: 0xB1A3, + 20446 - 11905: 0xD3E1, + 20447 - 11905: 0xD9B9, + 20448 - 11905: 0x8262, + 20449 - 11905: 0xD0C5, + 20450 - 11905: 0x8263, + 20451 - 11905: 0xD9B6, + 20452 - 11905: 0x8264, + 20453 - 11905: 0x8265, + 20454 - 11905: 0xD9B1, + 20455 - 11905: 0x8266, + 20456 - 11905: 0xD9B2, + 20457 - 11905: 0xC1A9, + 20458 - 11905: 0xD9B3, + 20459 - 11905: 0x8267, + 20460 - 11905: 0x8268, + 20461 - 11905: 0xBCF3, + 20462 - 11905: 0xD0DE, + 20463 - 11905: 0xB8A9, + 20464 - 11905: 0x8269, + 20465 - 11905: 0xBEE3, + 20466 - 11905: 0x826A, + 20467 - 11905: 0xD9BD, + 20468 - 11905: 0x826B, + 20469 - 11905: 0x826C, + 20470 - 11905: 0x826D, + 20471 - 11905: 0x826E, + 20472 - 11905: 0xD9BA, + 20473 - 11905: 0x826F, + 20474 - 11905: 0xB0B3, + 20475 - 11905: 0x8270, + 20476 - 11905: 0x8271, + 20477 - 11905: 0x8272, + 20478 - 11905: 0xD9C2, + 20479 - 11905: 0x8273, + 20480 - 11905: 0x8274, + 20481 - 11905: 0x8275, + 20482 - 11905: 0x8276, + 20483 - 11905: 0x8277, + 20484 - 11905: 0x8278, + 20485 - 11905: 0x8279, + 20486 - 11905: 0x827A, + 20487 - 11905: 0x827B, + 20488 - 11905: 0x827C, + 20489 - 11905: 0x827D, + 20490 - 11905: 0x827E, + 20491 - 11905: 0x8280, + 20492 - 11905: 0xD9C4, + 20493 - 11905: 0xB1B6, + 20494 - 11905: 0x8281, + 20495 - 11905: 0xD9BF, + 20496 - 11905: 0x8282, + 20497 - 11905: 0x8283, + 20498 - 11905: 0xB5B9, + 20499 - 11905: 0x8284, + 20500 - 11905: 0xBEF3, + 20501 - 11905: 0x8285, + 20502 - 11905: 0x8286, + 20503 - 11905: 0x8287, + 20504 - 11905: 0xCCC8, + 20505 - 11905: 0xBAF2, + 20506 - 11905: 0xD2D0, + 20507 - 11905: 0x8288, + 20508 - 11905: 0xD9C3, + 20509 - 11905: 0x8289, + 20510 - 11905: 0x828A, + 20511 - 11905: 0xBDE8, + 20512 - 11905: 0x828B, + 20513 - 11905: 0xB3AB, + 20514 - 11905: 0x828C, + 20515 - 11905: 0x828D, + 20516 - 11905: 0x828E, + 20517 - 11905: 0xD9C5, + 20518 - 11905: 0xBEEB, + 20519 - 11905: 0x828F, + 20520 - 11905: 0xD9C6, + 20521 - 11905: 0xD9BB, + 20522 - 11905: 0xC4DF, + 20523 - 11905: 0x8290, + 20524 - 11905: 0xD9BE, + 20525 - 11905: 0xD9C1, + 20526 - 11905: 0xD9C0, + 20527 - 11905: 0x8291, + 20528 - 11905: 0x8292, + 20529 - 11905: 0x8293, + 20530 - 11905: 0x8294, + 20531 - 11905: 0x8295, + 20532 - 11905: 0x8296, + 20533 - 11905: 0x8297, + 20534 - 11905: 0x8298, + 20535 - 11905: 0x8299, + 20536 - 11905: 0x829A, + 20537 - 11905: 0x829B, + 20538 - 11905: 0xD5AE, + 20539 - 11905: 0x829C, + 20540 - 11905: 0xD6B5, + 20541 - 11905: 0x829D, + 20542 - 11905: 0xC7E3, + 20543 - 11905: 0x829E, + 20544 - 11905: 0x829F, + 20545 - 11905: 0x82A0, + 20546 - 11905: 0x82A1, + 20547 - 11905: 0xD9C8, + 20548 - 11905: 0x82A2, + 20549 - 11905: 0x82A3, + 20550 - 11905: 0x82A4, + 20551 - 11905: 0xBCD9, + 20552 - 11905: 0xD9CA, + 20553 - 11905: 0x82A5, + 20554 - 11905: 0x82A6, + 20555 - 11905: 0x82A7, + 20556 - 11905: 0xD9BC, + 20557 - 11905: 0x82A8, + 20558 - 11905: 0xD9CB, + 20559 - 11905: 0xC6AB, + 20560 - 11905: 0x82A9, + 20561 - 11905: 0x82AA, + 20562 - 11905: 0x82AB, + 20563 - 11905: 0x82AC, + 20564 - 11905: 0x82AD, + 20565 - 11905: 0xD9C9, + 20566 - 11905: 0x82AE, + 20567 - 11905: 0x82AF, + 20568 - 11905: 0x82B0, + 20569 - 11905: 0x82B1, + 20570 - 11905: 0xD7F6, + 20571 - 11905: 0x82B2, + 20572 - 11905: 0xCDA3, + 20573 - 11905: 0x82B3, + 20574 - 11905: 0x82B4, + 20575 - 11905: 0x82B5, + 20576 - 11905: 0x82B6, + 20577 - 11905: 0x82B7, + 20578 - 11905: 0x82B8, + 20579 - 11905: 0x82B9, + 20580 - 11905: 0x82BA, + 20581 - 11905: 0xBDA1, + 20582 - 11905: 0x82BB, + 20583 - 11905: 0x82BC, + 20584 - 11905: 0x82BD, + 20585 - 11905: 0x82BE, + 20586 - 11905: 0x82BF, + 20587 - 11905: 0x82C0, + 20588 - 11905: 0xD9CC, + 20589 - 11905: 0x82C1, + 20590 - 11905: 0x82C2, + 20591 - 11905: 0x82C3, + 20592 - 11905: 0x82C4, + 20593 - 11905: 0x82C5, + 20594 - 11905: 0x82C6, + 20595 - 11905: 0x82C7, + 20596 - 11905: 0x82C8, + 20597 - 11905: 0x82C9, + 20598 - 11905: 0xC5BC, + 20599 - 11905: 0xCDB5, + 20600 - 11905: 0x82CA, + 20601 - 11905: 0x82CB, + 20602 - 11905: 0x82CC, + 20603 - 11905: 0xD9CD, + 20604 - 11905: 0x82CD, + 20605 - 11905: 0x82CE, + 20606 - 11905: 0xD9C7, + 20607 - 11905: 0xB3A5, + 20608 - 11905: 0xBFFE, + 20609 - 11905: 0x82CF, + 20610 - 11905: 0x82D0, + 20611 - 11905: 0x82D1, + 20612 - 11905: 0x82D2, + 20613 - 11905: 0xB8B5, + 20614 - 11905: 0x82D3, + 20615 - 11905: 0x82D4, + 20616 - 11905: 0xC0FC, + 20617 - 11905: 0x82D5, + 20618 - 11905: 0x82D6, + 20619 - 11905: 0x82D7, + 20620 - 11905: 0x82D8, + 20621 - 11905: 0xB0F8, + 20622 - 11905: 0x82D9, + 20623 - 11905: 0x82DA, + 20624 - 11905: 0x82DB, + 20625 - 11905: 0x82DC, + 20626 - 11905: 0x82DD, + 20627 - 11905: 0x82DE, + 20628 - 11905: 0x82DF, + 20629 - 11905: 0x82E0, + 20630 - 11905: 0x82E1, + 20631 - 11905: 0x82E2, + 20632 - 11905: 0x82E3, + 20633 - 11905: 0x82E4, + 20634 - 11905: 0x82E5, + 20635 - 11905: 0x82E6, + 20636 - 11905: 0x82E7, + 20637 - 11905: 0x82E8, + 20638 - 11905: 0x82E9, + 20639 - 11905: 0x82EA, + 20640 - 11905: 0x82EB, + 20641 - 11905: 0x82EC, + 20642 - 11905: 0x82ED, + 20643 - 11905: 0xB4F6, + 20644 - 11905: 0x82EE, + 20645 - 11905: 0xD9CE, + 20646 - 11905: 0x82EF, + 20647 - 11905: 0xD9CF, + 20648 - 11905: 0xB4A2, + 20649 - 11905: 0xD9D0, + 20650 - 11905: 0x82F0, + 20651 - 11905: 0x82F1, + 20652 - 11905: 0xB4DF, + 20653 - 11905: 0x82F2, + 20654 - 11905: 0x82F3, + 20655 - 11905: 0x82F4, + 20656 - 11905: 0x82F5, + 20657 - 11905: 0x82F6, + 20658 - 11905: 0xB0C1, + 20659 - 11905: 0x82F7, + 20660 - 11905: 0x82F8, + 20661 - 11905: 0x82F9, + 20662 - 11905: 0x82FA, + 20663 - 11905: 0x82FB, + 20664 - 11905: 0x82FC, + 20665 - 11905: 0x82FD, + 20666 - 11905: 0xD9D1, + 20667 - 11905: 0xC9B5, + 20668 - 11905: 0x82FE, + 20669 - 11905: 0x8340, + 20670 - 11905: 0x8341, + 20671 - 11905: 0x8342, + 20672 - 11905: 0x8343, + 20673 - 11905: 0x8344, + 20674 - 11905: 0x8345, + 20675 - 11905: 0x8346, + 20676 - 11905: 0x8347, + 20677 - 11905: 0x8348, + 20678 - 11905: 0x8349, + 20679 - 11905: 0x834A, + 20680 - 11905: 0x834B, + 20681 - 11905: 0x834C, + 20682 - 11905: 0x834D, + 20683 - 11905: 0x834E, + 20684 - 11905: 0x834F, + 20685 - 11905: 0x8350, + 20686 - 11905: 0x8351, + 20687 - 11905: 0xCFF1, + 20688 - 11905: 0x8352, + 20689 - 11905: 0x8353, + 20690 - 11905: 0x8354, + 20691 - 11905: 0x8355, + 20692 - 11905: 0x8356, + 20693 - 11905: 0x8357, + 20694 - 11905: 0xD9D2, + 20695 - 11905: 0x8358, + 20696 - 11905: 0x8359, + 20697 - 11905: 0x835A, + 20698 - 11905: 0xC1C5, + 20699 - 11905: 0x835B, + 20700 - 11905: 0x835C, + 20701 - 11905: 0x835D, + 20702 - 11905: 0x835E, + 20703 - 11905: 0x835F, + 20704 - 11905: 0x8360, + 20705 - 11905: 0x8361, + 20706 - 11905: 0x8362, + 20707 - 11905: 0x8363, + 20708 - 11905: 0x8364, + 20709 - 11905: 0x8365, + 20710 - 11905: 0xD9D6, + 20711 - 11905: 0xC9AE, + 20712 - 11905: 0x8366, + 20713 - 11905: 0x8367, + 20714 - 11905: 0x8368, + 20715 - 11905: 0x8369, + 20716 - 11905: 0xD9D5, + 20717 - 11905: 0xD9D4, + 20718 - 11905: 0xD9D7, + 20719 - 11905: 0x836A, + 20720 - 11905: 0x836B, + 20721 - 11905: 0x836C, + 20722 - 11905: 0x836D, + 20723 - 11905: 0xCBDB, + 20724 - 11905: 0x836E, + 20725 - 11905: 0xBDA9, + 20726 - 11905: 0x836F, + 20727 - 11905: 0x8370, + 20728 - 11905: 0x8371, + 20729 - 11905: 0x8372, + 20730 - 11905: 0x8373, + 20731 - 11905: 0xC6A7, + 20732 - 11905: 0x8374, + 20733 - 11905: 0x8375, + 20734 - 11905: 0x8376, + 20735 - 11905: 0x8377, + 20736 - 11905: 0x8378, + 20737 - 11905: 0x8379, + 20738 - 11905: 0x837A, + 20739 - 11905: 0x837B, + 20740 - 11905: 0x837C, + 20741 - 11905: 0x837D, + 20742 - 11905: 0xD9D3, + 20743 - 11905: 0xD9D8, + 20744 - 11905: 0x837E, + 20745 - 11905: 0x8380, + 20746 - 11905: 0x8381, + 20747 - 11905: 0xD9D9, + 20748 - 11905: 0x8382, + 20749 - 11905: 0x8383, + 20750 - 11905: 0x8384, + 20751 - 11905: 0x8385, + 20752 - 11905: 0x8386, + 20753 - 11905: 0x8387, + 20754 - 11905: 0xC8E5, + 20755 - 11905: 0x8388, + 20756 - 11905: 0x8389, + 20757 - 11905: 0x838A, + 20758 - 11905: 0x838B, + 20759 - 11905: 0x838C, + 20760 - 11905: 0x838D, + 20761 - 11905: 0x838E, + 20762 - 11905: 0x838F, + 20763 - 11905: 0x8390, + 20764 - 11905: 0x8391, + 20765 - 11905: 0x8392, + 20766 - 11905: 0x8393, + 20767 - 11905: 0x8394, + 20768 - 11905: 0x8395, + 20769 - 11905: 0xC0DC, + 20770 - 11905: 0x8396, + 20771 - 11905: 0x8397, + 20772 - 11905: 0x8398, + 20773 - 11905: 0x8399, + 20774 - 11905: 0x839A, + 20775 - 11905: 0x839B, + 20776 - 11905: 0x839C, + 20777 - 11905: 0x839D, + 20778 - 11905: 0x839E, + 20779 - 11905: 0x839F, + 20780 - 11905: 0x83A0, + 20781 - 11905: 0x83A1, + 20782 - 11905: 0x83A2, + 20783 - 11905: 0x83A3, + 20784 - 11905: 0x83A4, + 20785 - 11905: 0x83A5, + 20786 - 11905: 0x83A6, + 20787 - 11905: 0x83A7, + 20788 - 11905: 0x83A8, + 20789 - 11905: 0x83A9, + 20790 - 11905: 0x83AA, + 20791 - 11905: 0x83AB, + 20792 - 11905: 0x83AC, + 20793 - 11905: 0x83AD, + 20794 - 11905: 0x83AE, + 20795 - 11905: 0x83AF, + 20796 - 11905: 0x83B0, + 20797 - 11905: 0x83B1, + 20798 - 11905: 0x83B2, + 20799 - 11905: 0xB6F9, + 20800 - 11905: 0xD8A3, + 20801 - 11905: 0xD4CA, + 20802 - 11905: 0x83B3, + 20803 - 11905: 0xD4AA, + 20804 - 11905: 0xD0D6, + 20805 - 11905: 0xB3E4, + 20806 - 11905: 0xD5D7, + 20807 - 11905: 0x83B4, + 20808 - 11905: 0xCFC8, + 20809 - 11905: 0xB9E2, + 20810 - 11905: 0x83B5, + 20811 - 11905: 0xBFCB, + 20812 - 11905: 0x83B6, + 20813 - 11905: 0xC3E2, + 20814 - 11905: 0x83B7, + 20815 - 11905: 0x83B8, + 20816 - 11905: 0x83B9, + 20817 - 11905: 0xB6D2, + 20818 - 11905: 0x83BA, + 20819 - 11905: 0x83BB, + 20820 - 11905: 0xCDC3, + 20821 - 11905: 0xD9EE, + 20822 - 11905: 0xD9F0, + 20823 - 11905: 0x83BC, + 20824 - 11905: 0x83BD, + 20825 - 11905: 0x83BE, + 20826 - 11905: 0xB5B3, + 20827 - 11905: 0x83BF, + 20828 - 11905: 0xB6B5, + 20829 - 11905: 0x83C0, + 20830 - 11905: 0x83C1, + 20831 - 11905: 0x83C2, + 20832 - 11905: 0x83C3, + 20833 - 11905: 0x83C4, + 20834 - 11905: 0xBEA4, + 20835 - 11905: 0x83C5, + 20836 - 11905: 0x83C6, + 20837 - 11905: 0xC8EB, + 20838 - 11905: 0x83C7, + 20839 - 11905: 0x83C8, + 20840 - 11905: 0xC8AB, + 20841 - 11905: 0x83C9, + 20842 - 11905: 0x83CA, + 20843 - 11905: 0xB0CB, + 20844 - 11905: 0xB9AB, + 20845 - 11905: 0xC1F9, + 20846 - 11905: 0xD9E2, + 20847 - 11905: 0x83CB, + 20848 - 11905: 0xC0BC, + 20849 - 11905: 0xB9B2, + 20850 - 11905: 0x83CC, + 20851 - 11905: 0xB9D8, + 20852 - 11905: 0xD0CB, + 20853 - 11905: 0xB1F8, + 20854 - 11905: 0xC6E4, + 20855 - 11905: 0xBEDF, + 20856 - 11905: 0xB5E4, + 20857 - 11905: 0xD7C8, + 20858 - 11905: 0x83CD, + 20859 - 11905: 0xD1F8, + 20860 - 11905: 0xBCE6, + 20861 - 11905: 0xCADE, + 20862 - 11905: 0x83CE, + 20863 - 11905: 0x83CF, + 20864 - 11905: 0xBCBD, + 20865 - 11905: 0xD9E6, + 20866 - 11905: 0xD8E7, + 20867 - 11905: 0x83D0, + 20868 - 11905: 0x83D1, + 20869 - 11905: 0xC4DA, + 20870 - 11905: 0x83D2, + 20871 - 11905: 0x83D3, + 20872 - 11905: 0xB8D4, + 20873 - 11905: 0xC8BD, + 20874 - 11905: 0x83D4, + 20875 - 11905: 0x83D5, + 20876 - 11905: 0xB2E1, + 20877 - 11905: 0xD4D9, + 20878 - 11905: 0x83D6, + 20879 - 11905: 0x83D7, + 20880 - 11905: 0x83D8, + 20881 - 11905: 0x83D9, + 20882 - 11905: 0xC3B0, + 20883 - 11905: 0x83DA, + 20884 - 11905: 0x83DB, + 20885 - 11905: 0xC3E1, + 20886 - 11905: 0xDAA2, + 20887 - 11905: 0xC8DF, + 20888 - 11905: 0x83DC, + 20889 - 11905: 0xD0B4, + 20890 - 11905: 0x83DD, + 20891 - 11905: 0xBEFC, + 20892 - 11905: 0xC5A9, + 20893 - 11905: 0x83DE, + 20894 - 11905: 0x83DF, + 20895 - 11905: 0x83E0, + 20896 - 11905: 0xB9DA, + 20897 - 11905: 0x83E1, + 20898 - 11905: 0xDAA3, + 20899 - 11905: 0x83E2, + 20900 - 11905: 0xD4A9, + 20901 - 11905: 0xDAA4, + 20902 - 11905: 0x83E3, + 20903 - 11905: 0x83E4, + 20904 - 11905: 0x83E5, + 20905 - 11905: 0x83E6, + 20906 - 11905: 0x83E7, + 20907 - 11905: 0xD9FB, + 20908 - 11905: 0xB6AC, + 20909 - 11905: 0x83E8, + 20910 - 11905: 0x83E9, + 20911 - 11905: 0xB7EB, + 20912 - 11905: 0xB1F9, + 20913 - 11905: 0xD9FC, + 20914 - 11905: 0xB3E5, + 20915 - 11905: 0xBEF6, + 20916 - 11905: 0x83EA, + 20917 - 11905: 0xBFF6, + 20918 - 11905: 0xD2B1, + 20919 - 11905: 0xC0E4, + 20920 - 11905: 0x83EB, + 20921 - 11905: 0x83EC, + 20922 - 11905: 0x83ED, + 20923 - 11905: 0xB6B3, + 20924 - 11905: 0xD9FE, + 20925 - 11905: 0xD9FD, + 20926 - 11905: 0x83EE, + 20927 - 11905: 0x83EF, + 20928 - 11905: 0xBEBB, + 20929 - 11905: 0x83F0, + 20930 - 11905: 0x83F1, + 20931 - 11905: 0x83F2, + 20932 - 11905: 0xC6E0, + 20933 - 11905: 0x83F3, + 20934 - 11905: 0xD7BC, + 20935 - 11905: 0xDAA1, + 20936 - 11905: 0x83F4, + 20937 - 11905: 0xC1B9, + 20938 - 11905: 0x83F5, + 20939 - 11905: 0xB5F2, + 20940 - 11905: 0xC1E8, + 20941 - 11905: 0x83F6, + 20942 - 11905: 0x83F7, + 20943 - 11905: 0xBCF5, + 20944 - 11905: 0x83F8, + 20945 - 11905: 0xB4D5, + 20946 - 11905: 0x83F9, + 20947 - 11905: 0x83FA, + 20948 - 11905: 0x83FB, + 20949 - 11905: 0x83FC, + 20950 - 11905: 0x83FD, + 20951 - 11905: 0x83FE, + 20952 - 11905: 0x8440, + 20953 - 11905: 0x8441, + 20954 - 11905: 0x8442, + 20955 - 11905: 0xC1DD, + 20956 - 11905: 0x8443, + 20957 - 11905: 0xC4FD, + 20958 - 11905: 0x8444, + 20959 - 11905: 0x8445, + 20960 - 11905: 0xBCB8, + 20961 - 11905: 0xB7B2, + 20962 - 11905: 0x8446, + 20963 - 11905: 0x8447, + 20964 - 11905: 0xB7EF, + 20965 - 11905: 0x8448, + 20966 - 11905: 0x8449, + 20967 - 11905: 0x844A, + 20968 - 11905: 0x844B, + 20969 - 11905: 0x844C, + 20970 - 11905: 0x844D, + 20971 - 11905: 0xD9EC, + 20972 - 11905: 0x844E, + 20973 - 11905: 0xC6BE, + 20974 - 11905: 0x844F, + 20975 - 11905: 0xBFAD, + 20976 - 11905: 0xBBCB, + 20977 - 11905: 0x8450, + 20978 - 11905: 0x8451, + 20979 - 11905: 0xB5CA, + 20980 - 11905: 0x8452, + 20981 - 11905: 0xDBC9, + 20982 - 11905: 0xD0D7, + 20983 - 11905: 0x8453, + 20984 - 11905: 0xCDB9, + 20985 - 11905: 0xB0BC, + 20986 - 11905: 0xB3F6, + 20987 - 11905: 0xBBF7, + 20988 - 11905: 0xDBCA, + 20989 - 11905: 0xBAAF, + 20990 - 11905: 0x8454, + 20991 - 11905: 0xD4E4, + 20992 - 11905: 0xB5B6, + 20993 - 11905: 0xB5F3, + 20994 - 11905: 0xD8D6, + 20995 - 11905: 0xC8D0, + 20996 - 11905: 0x8455, + 20997 - 11905: 0x8456, + 20998 - 11905: 0xB7D6, + 20999 - 11905: 0xC7D0, + 21000 - 11905: 0xD8D7, + 21001 - 11905: 0x8457, + 21002 - 11905: 0xBFAF, + 21003 - 11905: 0x8458, + 21004 - 11905: 0x8459, + 21005 - 11905: 0xDBBB, + 21006 - 11905: 0xD8D8, + 21007 - 11905: 0x845A, + 21008 - 11905: 0x845B, + 21009 - 11905: 0xD0CC, + 21010 - 11905: 0xBBAE, + 21011 - 11905: 0x845C, + 21012 - 11905: 0x845D, + 21013 - 11905: 0x845E, + 21014 - 11905: 0xEBBE, + 21015 - 11905: 0xC1D0, + 21016 - 11905: 0xC1F5, + 21017 - 11905: 0xD4F2, + 21018 - 11905: 0xB8D5, + 21019 - 11905: 0xB4B4, + 21020 - 11905: 0x845F, + 21021 - 11905: 0xB3F5, + 21022 - 11905: 0x8460, + 21023 - 11905: 0x8461, + 21024 - 11905: 0xC9BE, + 21025 - 11905: 0x8462, + 21026 - 11905: 0x8463, + 21027 - 11905: 0x8464, + 21028 - 11905: 0xC5D0, + 21029 - 11905: 0x8465, + 21030 - 11905: 0x8466, + 21031 - 11905: 0x8467, + 21032 - 11905: 0xC5D9, + 21033 - 11905: 0xC0FB, + 21034 - 11905: 0x8468, + 21035 - 11905: 0xB1F0, + 21036 - 11905: 0x8469, + 21037 - 11905: 0xD8D9, + 21038 - 11905: 0xB9CE, + 21039 - 11905: 0x846A, + 21040 - 11905: 0xB5BD, + 21041 - 11905: 0x846B, + 21042 - 11905: 0x846C, + 21043 - 11905: 0xD8DA, + 21044 - 11905: 0x846D, + 21045 - 11905: 0x846E, + 21046 - 11905: 0xD6C6, + 21047 - 11905: 0xCBA2, + 21048 - 11905: 0xC8AF, + 21049 - 11905: 0xC9B2, + 21050 - 11905: 0xB4CC, + 21051 - 11905: 0xBFCC, + 21052 - 11905: 0x846F, + 21053 - 11905: 0xB9F4, + 21054 - 11905: 0x8470, + 21055 - 11905: 0xD8DB, + 21056 - 11905: 0xD8DC, + 21057 - 11905: 0xB6E7, + 21058 - 11905: 0xBCC1, + 21059 - 11905: 0xCCEA, + 21060 - 11905: 0x8471, + 21061 - 11905: 0x8472, + 21062 - 11905: 0x8473, + 21063 - 11905: 0x8474, + 21064 - 11905: 0x8475, + 21065 - 11905: 0x8476, + 21066 - 11905: 0xCFF7, + 21067 - 11905: 0x8477, + 21068 - 11905: 0xD8DD, + 21069 - 11905: 0xC7B0, + 21070 - 11905: 0x8478, + 21071 - 11905: 0x8479, + 21072 - 11905: 0xB9D0, + 21073 - 11905: 0xBDA3, + 21074 - 11905: 0x847A, + 21075 - 11905: 0x847B, + 21076 - 11905: 0xCCDE, + 21077 - 11905: 0x847C, + 21078 - 11905: 0xC6CA, + 21079 - 11905: 0x847D, + 21080 - 11905: 0x847E, + 21081 - 11905: 0x8480, + 21082 - 11905: 0x8481, + 21083 - 11905: 0x8482, + 21084 - 11905: 0xD8E0, + 21085 - 11905: 0x8483, + 21086 - 11905: 0xD8DE, + 21087 - 11905: 0x8484, + 21088 - 11905: 0x8485, + 21089 - 11905: 0xD8DF, + 21090 - 11905: 0x8486, + 21091 - 11905: 0x8487, + 21092 - 11905: 0x8488, + 21093 - 11905: 0xB0FE, + 21094 - 11905: 0x8489, + 21095 - 11905: 0xBEE7, + 21096 - 11905: 0x848A, + 21097 - 11905: 0xCAA3, + 21098 - 11905: 0xBCF4, + 21099 - 11905: 0x848B, + 21100 - 11905: 0x848C, + 21101 - 11905: 0x848D, + 21102 - 11905: 0x848E, + 21103 - 11905: 0xB8B1, + 21104 - 11905: 0x848F, + 21105 - 11905: 0x8490, + 21106 - 11905: 0xB8EE, + 21107 - 11905: 0x8491, + 21108 - 11905: 0x8492, + 21109 - 11905: 0x8493, + 21110 - 11905: 0x8494, + 21111 - 11905: 0x8495, + 21112 - 11905: 0x8496, + 21113 - 11905: 0x8497, + 21114 - 11905: 0x8498, + 21115 - 11905: 0x8499, + 21116 - 11905: 0x849A, + 21117 - 11905: 0xD8E2, + 21118 - 11905: 0x849B, + 21119 - 11905: 0xBDCB, + 21120 - 11905: 0x849C, + 21121 - 11905: 0xD8E4, + 21122 - 11905: 0xD8E3, + 21123 - 11905: 0x849D, + 21124 - 11905: 0x849E, + 21125 - 11905: 0x849F, + 21126 - 11905: 0x84A0, + 21127 - 11905: 0x84A1, + 21128 - 11905: 0xC5FC, + 21129 - 11905: 0x84A2, + 21130 - 11905: 0x84A3, + 21131 - 11905: 0x84A4, + 21132 - 11905: 0x84A5, + 21133 - 11905: 0x84A6, + 21134 - 11905: 0x84A7, + 21135 - 11905: 0x84A8, + 21136 - 11905: 0xD8E5, + 21137 - 11905: 0x84A9, + 21138 - 11905: 0x84AA, + 21139 - 11905: 0xD8E6, + 21140 - 11905: 0x84AB, + 21141 - 11905: 0x84AC, + 21142 - 11905: 0x84AD, + 21143 - 11905: 0x84AE, + 21144 - 11905: 0x84AF, + 21145 - 11905: 0x84B0, + 21146 - 11905: 0x84B1, + 21147 - 11905: 0xC1A6, + 21148 - 11905: 0x84B2, + 21149 - 11905: 0xC8B0, + 21150 - 11905: 0xB0EC, + 21151 - 11905: 0xB9A6, + 21152 - 11905: 0xBCD3, + 21153 - 11905: 0xCEF1, + 21154 - 11905: 0xDBBD, + 21155 - 11905: 0xC1D3, + 21156 - 11905: 0x84B3, + 21157 - 11905: 0x84B4, + 21158 - 11905: 0x84B5, + 21159 - 11905: 0x84B6, + 21160 - 11905: 0xB6AF, + 21161 - 11905: 0xD6FA, + 21162 - 11905: 0xC5AC, + 21163 - 11905: 0xBDD9, + 21164 - 11905: 0xDBBE, + 21165 - 11905: 0xDBBF, + 21166 - 11905: 0x84B7, + 21167 - 11905: 0x84B8, + 21168 - 11905: 0x84B9, + 21169 - 11905: 0xC0F8, + 21170 - 11905: 0xBEA2, + 21171 - 11905: 0xC0CD, + 21172 - 11905: 0x84BA, + 21173 - 11905: 0x84BB, + 21174 - 11905: 0x84BC, + 21175 - 11905: 0x84BD, + 21176 - 11905: 0x84BE, + 21177 - 11905: 0x84BF, + 21178 - 11905: 0x84C0, + 21179 - 11905: 0x84C1, + 21180 - 11905: 0x84C2, + 21181 - 11905: 0x84C3, + 21182 - 11905: 0xDBC0, + 21183 - 11905: 0xCAC6, + 21184 - 11905: 0x84C4, + 21185 - 11905: 0x84C5, + 21186 - 11905: 0x84C6, + 21187 - 11905: 0xB2AA, + 21188 - 11905: 0x84C7, + 21189 - 11905: 0x84C8, + 21190 - 11905: 0x84C9, + 21191 - 11905: 0xD3C2, + 21192 - 11905: 0x84CA, + 21193 - 11905: 0xC3E3, + 21194 - 11905: 0x84CB, + 21195 - 11905: 0xD1AB, + 21196 - 11905: 0x84CC, + 21197 - 11905: 0x84CD, + 21198 - 11905: 0x84CE, + 21199 - 11905: 0x84CF, + 21200 - 11905: 0xDBC2, + 21201 - 11905: 0x84D0, + 21202 - 11905: 0xC0D5, + 21203 - 11905: 0x84D1, + 21204 - 11905: 0x84D2, + 21205 - 11905: 0x84D3, + 21206 - 11905: 0xDBC3, + 21207 - 11905: 0x84D4, + 21208 - 11905: 0xBFB1, + 21209 - 11905: 0x84D5, + 21210 - 11905: 0x84D6, + 21211 - 11905: 0x84D7, + 21212 - 11905: 0x84D8, + 21213 - 11905: 0x84D9, + 21214 - 11905: 0x84DA, + 21215 - 11905: 0xC4BC, + 21216 - 11905: 0x84DB, + 21217 - 11905: 0x84DC, + 21218 - 11905: 0x84DD, + 21219 - 11905: 0x84DE, + 21220 - 11905: 0xC7DA, + 21221 - 11905: 0x84DF, + 21222 - 11905: 0x84E0, + 21223 - 11905: 0x84E1, + 21224 - 11905: 0x84E2, + 21225 - 11905: 0x84E3, + 21226 - 11905: 0x84E4, + 21227 - 11905: 0x84E5, + 21228 - 11905: 0x84E6, + 21229 - 11905: 0x84E7, + 21230 - 11905: 0x84E8, + 21231 - 11905: 0x84E9, + 21232 - 11905: 0xDBC4, + 21233 - 11905: 0x84EA, + 21234 - 11905: 0x84EB, + 21235 - 11905: 0x84EC, + 21236 - 11905: 0x84ED, + 21237 - 11905: 0x84EE, + 21238 - 11905: 0x84EF, + 21239 - 11905: 0x84F0, + 21240 - 11905: 0x84F1, + 21241 - 11905: 0xD9E8, + 21242 - 11905: 0xC9D7, + 21243 - 11905: 0x84F2, + 21244 - 11905: 0x84F3, + 21245 - 11905: 0x84F4, + 21246 - 11905: 0xB9B4, + 21247 - 11905: 0xCEF0, + 21248 - 11905: 0xD4C8, + 21249 - 11905: 0x84F5, + 21250 - 11905: 0x84F6, + 21251 - 11905: 0x84F7, + 21252 - 11905: 0x84F8, + 21253 - 11905: 0xB0FC, + 21254 - 11905: 0xB4D2, + 21255 - 11905: 0x84F9, + 21256 - 11905: 0xD0D9, + 21257 - 11905: 0x84FA, + 21258 - 11905: 0x84FB, + 21259 - 11905: 0x84FC, + 21260 - 11905: 0x84FD, + 21261 - 11905: 0xD9E9, + 21262 - 11905: 0x84FE, + 21263 - 11905: 0xDECB, + 21264 - 11905: 0xD9EB, + 21265 - 11905: 0x8540, + 21266 - 11905: 0x8541, + 21267 - 11905: 0x8542, + 21268 - 11905: 0x8543, + 21269 - 11905: 0xD8B0, + 21270 - 11905: 0xBBAF, + 21271 - 11905: 0xB1B1, + 21272 - 11905: 0x8544, + 21273 - 11905: 0xB3D7, + 21274 - 11905: 0xD8CE, + 21275 - 11905: 0x8545, + 21276 - 11905: 0x8546, + 21277 - 11905: 0xD4D1, + 21278 - 11905: 0x8547, + 21279 - 11905: 0x8548, + 21280 - 11905: 0xBDB3, + 21281 - 11905: 0xBFEF, + 21282 - 11905: 0x8549, + 21283 - 11905: 0xCFBB, + 21284 - 11905: 0x854A, + 21285 - 11905: 0x854B, + 21286 - 11905: 0xD8D0, + 21287 - 11905: 0x854C, + 21288 - 11905: 0x854D, + 21289 - 11905: 0x854E, + 21290 - 11905: 0xB7CB, + 21291 - 11905: 0x854F, + 21292 - 11905: 0x8550, + 21293 - 11905: 0x8551, + 21294 - 11905: 0xD8D1, + 21295 - 11905: 0x8552, + 21296 - 11905: 0x8553, + 21297 - 11905: 0x8554, + 21298 - 11905: 0x8555, + 21299 - 11905: 0x8556, + 21300 - 11905: 0x8557, + 21301 - 11905: 0x8558, + 21302 - 11905: 0x8559, + 21303 - 11905: 0x855A, + 21304 - 11905: 0x855B, + 21305 - 11905: 0xC6A5, + 21306 - 11905: 0xC7F8, + 21307 - 11905: 0xD2BD, + 21308 - 11905: 0x855C, + 21309 - 11905: 0x855D, + 21310 - 11905: 0xD8D2, + 21311 - 11905: 0xC4E4, + 21312 - 11905: 0x855E, + 21313 - 11905: 0xCAAE, + 21314 - 11905: 0x855F, + 21315 - 11905: 0xC7A7, + 21316 - 11905: 0x8560, + 21317 - 11905: 0xD8A6, + 21318 - 11905: 0x8561, + 21319 - 11905: 0xC9FD, + 21320 - 11905: 0xCEE7, + 21321 - 11905: 0xBBDC, + 21322 - 11905: 0xB0EB, + 21323 - 11905: 0x8562, + 21324 - 11905: 0x8563, + 21325 - 11905: 0x8564, + 21326 - 11905: 0xBBAA, + 21327 - 11905: 0xD0AD, + 21328 - 11905: 0x8565, + 21329 - 11905: 0xB1B0, + 21330 - 11905: 0xD7E4, + 21331 - 11905: 0xD7BF, + 21332 - 11905: 0x8566, + 21333 - 11905: 0xB5A5, + 21334 - 11905: 0xC2F4, + 21335 - 11905: 0xC4CF, + 21336 - 11905: 0x8567, + 21337 - 11905: 0x8568, + 21338 - 11905: 0xB2A9, + 21339 - 11905: 0x8569, + 21340 - 11905: 0xB2B7, + 21341 - 11905: 0x856A, + 21342 - 11905: 0xB1E5, + 21343 - 11905: 0xDFB2, + 21344 - 11905: 0xD5BC, + 21345 - 11905: 0xBFA8, + 21346 - 11905: 0xC2AC, + 21347 - 11905: 0xD8D5, + 21348 - 11905: 0xC2B1, + 21349 - 11905: 0x856B, + 21350 - 11905: 0xD8D4, + 21351 - 11905: 0xCED4, + 21352 - 11905: 0x856C, + 21353 - 11905: 0xDAE0, + 21354 - 11905: 0x856D, + 21355 - 11905: 0xCEC0, + 21356 - 11905: 0x856E, + 21357 - 11905: 0x856F, + 21358 - 11905: 0xD8B4, + 21359 - 11905: 0xC3AE, + 21360 - 11905: 0xD3A1, + 21361 - 11905: 0xCEA3, + 21362 - 11905: 0x8570, + 21363 - 11905: 0xBCB4, + 21364 - 11905: 0xC8B4, + 21365 - 11905: 0xC2D1, + 21366 - 11905: 0x8571, + 21367 - 11905: 0xBEED, + 21368 - 11905: 0xD0B6, + 21369 - 11905: 0x8572, + 21370 - 11905: 0xDAE1, + 21371 - 11905: 0x8573, + 21372 - 11905: 0x8574, + 21373 - 11905: 0x8575, + 21374 - 11905: 0x8576, + 21375 - 11905: 0xC7E4, + 21376 - 11905: 0x8577, + 21377 - 11905: 0x8578, + 21378 - 11905: 0xB3A7, + 21379 - 11905: 0x8579, + 21380 - 11905: 0xB6F2, + 21381 - 11905: 0xCCFC, + 21382 - 11905: 0xC0FA, + 21383 - 11905: 0x857A, + 21384 - 11905: 0x857B, + 21385 - 11905: 0xC0F7, + 21386 - 11905: 0x857C, + 21387 - 11905: 0xD1B9, + 21388 - 11905: 0xD1E1, + 21389 - 11905: 0xD8C7, + 21390 - 11905: 0x857D, + 21391 - 11905: 0x857E, + 21392 - 11905: 0x8580, + 21393 - 11905: 0x8581, + 21394 - 11905: 0x8582, + 21395 - 11905: 0x8583, + 21396 - 11905: 0x8584, + 21397 - 11905: 0xB2DE, + 21398 - 11905: 0x8585, + 21399 - 11905: 0x8586, + 21400 - 11905: 0xC0E5, + 21401 - 11905: 0x8587, + 21402 - 11905: 0xBAF1, + 21403 - 11905: 0x8588, + 21404 - 11905: 0x8589, + 21405 - 11905: 0xD8C8, + 21406 - 11905: 0x858A, + 21407 - 11905: 0xD4AD, + 21408 - 11905: 0x858B, + 21409 - 11905: 0x858C, + 21410 - 11905: 0xCFE1, + 21411 - 11905: 0xD8C9, + 21412 - 11905: 0x858D, + 21413 - 11905: 0xD8CA, + 21414 - 11905: 0xCFC3, + 21415 - 11905: 0x858E, + 21416 - 11905: 0xB3F8, + 21417 - 11905: 0xBEC7, + 21418 - 11905: 0x858F, + 21419 - 11905: 0x8590, + 21420 - 11905: 0x8591, + 21421 - 11905: 0x8592, + 21422 - 11905: 0xD8CB, + 21423 - 11905: 0x8593, + 21424 - 11905: 0x8594, + 21425 - 11905: 0x8595, + 21426 - 11905: 0x8596, + 21427 - 11905: 0x8597, + 21428 - 11905: 0x8598, + 21429 - 11905: 0x8599, + 21430 - 11905: 0xDBCC, + 21431 - 11905: 0x859A, + 21432 - 11905: 0x859B, + 21433 - 11905: 0x859C, + 21434 - 11905: 0x859D, + 21435 - 11905: 0xC8A5, + 21436 - 11905: 0x859E, + 21437 - 11905: 0x859F, + 21438 - 11905: 0x85A0, + 21439 - 11905: 0xCFD8, + 21440 - 11905: 0x85A1, + 21441 - 11905: 0xC8FE, + 21442 - 11905: 0xB2CE, + 21443 - 11905: 0x85A2, + 21444 - 11905: 0x85A3, + 21445 - 11905: 0x85A4, + 21446 - 11905: 0x85A5, + 21447 - 11905: 0x85A6, + 21448 - 11905: 0xD3D6, + 21449 - 11905: 0xB2E6, + 21450 - 11905: 0xBCB0, + 21451 - 11905: 0xD3D1, + 21452 - 11905: 0xCBAB, + 21453 - 11905: 0xB7B4, + 21454 - 11905: 0x85A7, + 21455 - 11905: 0x85A8, + 21456 - 11905: 0x85A9, + 21457 - 11905: 0xB7A2, + 21458 - 11905: 0x85AA, + 21459 - 11905: 0x85AB, + 21460 - 11905: 0xCAE5, + 21461 - 11905: 0x85AC, + 21462 - 11905: 0xC8A1, + 21463 - 11905: 0xCADC, + 21464 - 11905: 0xB1E4, + 21465 - 11905: 0xD0F0, + 21466 - 11905: 0x85AD, + 21467 - 11905: 0xC5D1, + 21468 - 11905: 0x85AE, + 21469 - 11905: 0x85AF, + 21470 - 11905: 0x85B0, + 21471 - 11905: 0xDBC5, + 21472 - 11905: 0xB5FE, + 21473 - 11905: 0x85B1, + 21474 - 11905: 0x85B2, + 21475 - 11905: 0xBFDA, + 21476 - 11905: 0xB9C5, + 21477 - 11905: 0xBEE4, + 21478 - 11905: 0xC1ED, + 21479 - 11905: 0x85B3, + 21480 - 11905: 0xDFB6, + 21481 - 11905: 0xDFB5, + 21482 - 11905: 0xD6BB, + 21483 - 11905: 0xBDD0, + 21484 - 11905: 0xD5D9, + 21485 - 11905: 0xB0C8, + 21486 - 11905: 0xB6A3, + 21487 - 11905: 0xBFC9, + 21488 - 11905: 0xCCA8, + 21489 - 11905: 0xDFB3, + 21490 - 11905: 0xCAB7, + 21491 - 11905: 0xD3D2, + 21492 - 11905: 0x85B4, + 21493 - 11905: 0xD8CF, + 21494 - 11905: 0xD2B6, + 21495 - 11905: 0xBAC5, + 21496 - 11905: 0xCBBE, + 21497 - 11905: 0xCCBE, + 21498 - 11905: 0x85B5, + 21499 - 11905: 0xDFB7, + 21500 - 11905: 0xB5F0, + 21501 - 11905: 0xDFB4, + 21502 - 11905: 0x85B6, + 21503 - 11905: 0x85B7, + 21504 - 11905: 0x85B8, + 21505 - 11905: 0xD3F5, + 21506 - 11905: 0x85B9, + 21507 - 11905: 0xB3D4, + 21508 - 11905: 0xB8F7, + 21509 - 11905: 0x85BA, + 21510 - 11905: 0xDFBA, + 21511 - 11905: 0x85BB, + 21512 - 11905: 0xBACF, + 21513 - 11905: 0xBCAA, + 21514 - 11905: 0xB5F5, + 21515 - 11905: 0x85BC, + 21516 - 11905: 0xCDAC, + 21517 - 11905: 0xC3FB, + 21518 - 11905: 0xBAF3, + 21519 - 11905: 0xC0F4, + 21520 - 11905: 0xCDC2, + 21521 - 11905: 0xCFF2, + 21522 - 11905: 0xDFB8, + 21523 - 11905: 0xCFC5, + 21524 - 11905: 0x85BD, + 21525 - 11905: 0xC2C0, + 21526 - 11905: 0xDFB9, + 21527 - 11905: 0xC2F0, + 21528 - 11905: 0x85BE, + 21529 - 11905: 0x85BF, + 21530 - 11905: 0x85C0, + 21531 - 11905: 0xBEFD, + 21532 - 11905: 0x85C1, + 21533 - 11905: 0xC1DF, + 21534 - 11905: 0xCDCC, + 21535 - 11905: 0xD2F7, + 21536 - 11905: 0xB7CD, + 21537 - 11905: 0xDFC1, + 21538 - 11905: 0x85C2, + 21539 - 11905: 0xDFC4, + 21540 - 11905: 0x85C3, + 21541 - 11905: 0x85C4, + 21542 - 11905: 0xB7F1, + 21543 - 11905: 0xB0C9, + 21544 - 11905: 0xB6D6, + 21545 - 11905: 0xB7D4, + 21546 - 11905: 0x85C5, + 21547 - 11905: 0xBAAC, + 21548 - 11905: 0xCCFD, + 21549 - 11905: 0xBFD4, + 21550 - 11905: 0xCBB1, + 21551 - 11905: 0xC6F4, + 21552 - 11905: 0x85C6, + 21553 - 11905: 0xD6A8, + 21554 - 11905: 0xDFC5, + 21555 - 11905: 0x85C7, + 21556 - 11905: 0xCEE2, + 21557 - 11905: 0xB3B3, + 21558 - 11905: 0x85C8, + 21559 - 11905: 0x85C9, + 21560 - 11905: 0xCEFC, + 21561 - 11905: 0xB4B5, + 21562 - 11905: 0x85CA, + 21563 - 11905: 0xCEC7, + 21564 - 11905: 0xBAF0, + 21565 - 11905: 0x85CB, + 21566 - 11905: 0xCEE1, + 21567 - 11905: 0x85CC, + 21568 - 11905: 0xD1BD, + 21569 - 11905: 0x85CD, + 21570 - 11905: 0x85CE, + 21571 - 11905: 0xDFC0, + 21572 - 11905: 0x85CF, + 21573 - 11905: 0x85D0, + 21574 - 11905: 0xB4F4, + 21575 - 11905: 0x85D1, + 21576 - 11905: 0xB3CA, + 21577 - 11905: 0x85D2, + 21578 - 11905: 0xB8E6, + 21579 - 11905: 0xDFBB, + 21580 - 11905: 0x85D3, + 21581 - 11905: 0x85D4, + 21582 - 11905: 0x85D5, + 21583 - 11905: 0x85D6, + 21584 - 11905: 0xC4C5, + 21585 - 11905: 0x85D7, + 21586 - 11905: 0xDFBC, + 21587 - 11905: 0xDFBD, + 21588 - 11905: 0xDFBE, + 21589 - 11905: 0xC5BB, + 21590 - 11905: 0xDFBF, + 21591 - 11905: 0xDFC2, + 21592 - 11905: 0xD4B1, + 21593 - 11905: 0xDFC3, + 21594 - 11905: 0x85D8, + 21595 - 11905: 0xC7BA, + 21596 - 11905: 0xCED8, + 21597 - 11905: 0x85D9, + 21598 - 11905: 0x85DA, + 21599 - 11905: 0x85DB, + 21600 - 11905: 0x85DC, + 21601 - 11905: 0x85DD, + 21602 - 11905: 0xC4D8, + 21603 - 11905: 0x85DE, + 21604 - 11905: 0xDFCA, + 21605 - 11905: 0x85DF, + 21606 - 11905: 0xDFCF, + 21607 - 11905: 0x85E0, + 21608 - 11905: 0xD6DC, + 21609 - 11905: 0x85E1, + 21610 - 11905: 0x85E2, + 21611 - 11905: 0x85E3, + 21612 - 11905: 0x85E4, + 21613 - 11905: 0x85E5, + 21614 - 11905: 0x85E6, + 21615 - 11905: 0x85E7, + 21616 - 11905: 0x85E8, + 21617 - 11905: 0xDFC9, + 21618 - 11905: 0xDFDA, + 21619 - 11905: 0xCEB6, + 21620 - 11905: 0x85E9, + 21621 - 11905: 0xBAC7, + 21622 - 11905: 0xDFCE, + 21623 - 11905: 0xDFC8, + 21624 - 11905: 0xC5DE, + 21625 - 11905: 0x85EA, + 21626 - 11905: 0x85EB, + 21627 - 11905: 0xC9EB, + 21628 - 11905: 0xBAF4, + 21629 - 11905: 0xC3FC, + 21630 - 11905: 0x85EC, + 21631 - 11905: 0x85ED, + 21632 - 11905: 0xBED7, + 21633 - 11905: 0x85EE, + 21634 - 11905: 0xDFC6, + 21635 - 11905: 0x85EF, + 21636 - 11905: 0xDFCD, + 21637 - 11905: 0x85F0, + 21638 - 11905: 0xC5D8, + 21639 - 11905: 0x85F1, + 21640 - 11905: 0x85F2, + 21641 - 11905: 0x85F3, + 21642 - 11905: 0x85F4, + 21643 - 11905: 0xD5A6, + 21644 - 11905: 0xBACD, + 21645 - 11905: 0x85F5, + 21646 - 11905: 0xBECC, + 21647 - 11905: 0xD3BD, + 21648 - 11905: 0xB8C0, + 21649 - 11905: 0x85F6, + 21650 - 11905: 0xD6E4, + 21651 - 11905: 0x85F7, + 21652 - 11905: 0xDFC7, + 21653 - 11905: 0xB9BE, + 21654 - 11905: 0xBFA7, + 21655 - 11905: 0x85F8, + 21656 - 11905: 0x85F9, + 21657 - 11905: 0xC1FC, + 21658 - 11905: 0xDFCB, + 21659 - 11905: 0xDFCC, + 21660 - 11905: 0x85FA, + 21661 - 11905: 0xDFD0, + 21662 - 11905: 0x85FB, + 21663 - 11905: 0x85FC, + 21664 - 11905: 0x85FD, + 21665 - 11905: 0x85FE, + 21666 - 11905: 0x8640, + 21667 - 11905: 0xDFDB, + 21668 - 11905: 0xDFE5, + 21669 - 11905: 0x8641, + 21670 - 11905: 0xDFD7, + 21671 - 11905: 0xDFD6, + 21672 - 11905: 0xD7C9, + 21673 - 11905: 0xDFE3, + 21674 - 11905: 0xDFE4, + 21675 - 11905: 0xE5EB, + 21676 - 11905: 0xD2A7, + 21677 - 11905: 0xDFD2, + 21678 - 11905: 0x8642, + 21679 - 11905: 0xBFA9, + 21680 - 11905: 0x8643, + 21681 - 11905: 0xD4DB, + 21682 - 11905: 0x8644, + 21683 - 11905: 0xBFC8, + 21684 - 11905: 0xDFD4, + 21685 - 11905: 0x8645, + 21686 - 11905: 0x8646, + 21687 - 11905: 0x8647, + 21688 - 11905: 0xCFCC, + 21689 - 11905: 0x8648, + 21690 - 11905: 0x8649, + 21691 - 11905: 0xDFDD, + 21692 - 11905: 0x864A, + 21693 - 11905: 0xD1CA, + 21694 - 11905: 0x864B, + 21695 - 11905: 0xDFDE, + 21696 - 11905: 0xB0A7, + 21697 - 11905: 0xC6B7, + 21698 - 11905: 0xDFD3, + 21699 - 11905: 0x864C, + 21700 - 11905: 0xBAE5, + 21701 - 11905: 0x864D, + 21702 - 11905: 0xB6DF, + 21703 - 11905: 0xCDDB, + 21704 - 11905: 0xB9FE, + 21705 - 11905: 0xD4D5, + 21706 - 11905: 0x864E, + 21707 - 11905: 0x864F, + 21708 - 11905: 0xDFDF, + 21709 - 11905: 0xCFEC, + 21710 - 11905: 0xB0A5, + 21711 - 11905: 0xDFE7, + 21712 - 11905: 0xDFD1, + 21713 - 11905: 0xD1C6, + 21714 - 11905: 0xDFD5, + 21715 - 11905: 0xDFD8, + 21716 - 11905: 0xDFD9, + 21717 - 11905: 0xDFDC, + 21718 - 11905: 0x8650, + 21719 - 11905: 0xBBA9, + 21720 - 11905: 0x8651, + 21721 - 11905: 0xDFE0, + 21722 - 11905: 0xDFE1, + 21723 - 11905: 0x8652, + 21724 - 11905: 0xDFE2, + 21725 - 11905: 0xDFE6, + 21726 - 11905: 0xDFE8, + 21727 - 11905: 0xD3B4, + 21728 - 11905: 0x8653, + 21729 - 11905: 0x8654, + 21730 - 11905: 0x8655, + 21731 - 11905: 0x8656, + 21732 - 11905: 0x8657, + 21733 - 11905: 0xB8E7, + 21734 - 11905: 0xC5B6, + 21735 - 11905: 0xDFEA, + 21736 - 11905: 0xC9DA, + 21737 - 11905: 0xC1A8, + 21738 - 11905: 0xC4C4, + 21739 - 11905: 0x8658, + 21740 - 11905: 0x8659, + 21741 - 11905: 0xBFDE, + 21742 - 11905: 0xCFF8, + 21743 - 11905: 0x865A, + 21744 - 11905: 0x865B, + 21745 - 11905: 0x865C, + 21746 - 11905: 0xD5DC, + 21747 - 11905: 0xDFEE, + 21748 - 11905: 0x865D, + 21749 - 11905: 0x865E, + 21750 - 11905: 0x865F, + 21751 - 11905: 0x8660, + 21752 - 11905: 0x8661, + 21753 - 11905: 0x8662, + 21754 - 11905: 0xB2B8, + 21755 - 11905: 0x8663, + 21756 - 11905: 0xBADF, + 21757 - 11905: 0xDFEC, + 21758 - 11905: 0x8664, + 21759 - 11905: 0xDBC1, + 21760 - 11905: 0x8665, + 21761 - 11905: 0xD1E4, + 21762 - 11905: 0x8666, + 21763 - 11905: 0x8667, + 21764 - 11905: 0x8668, + 21765 - 11905: 0x8669, + 21766 - 11905: 0xCBF4, + 21767 - 11905: 0xB4BD, + 21768 - 11905: 0x866A, + 21769 - 11905: 0xB0A6, + 21770 - 11905: 0x866B, + 21771 - 11905: 0x866C, + 21772 - 11905: 0x866D, + 21773 - 11905: 0x866E, + 21774 - 11905: 0x866F, + 21775 - 11905: 0xDFF1, + 21776 - 11905: 0xCCC6, + 21777 - 11905: 0xDFF2, + 21778 - 11905: 0x8670, + 21779 - 11905: 0x8671, + 21780 - 11905: 0xDFED, + 21781 - 11905: 0x8672, + 21782 - 11905: 0x8673, + 21783 - 11905: 0x8674, + 21784 - 11905: 0x8675, + 21785 - 11905: 0x8676, + 21786 - 11905: 0x8677, + 21787 - 11905: 0xDFE9, + 21788 - 11905: 0x8678, + 21789 - 11905: 0x8679, + 21790 - 11905: 0x867A, + 21791 - 11905: 0x867B, + 21792 - 11905: 0xDFEB, + 21793 - 11905: 0x867C, + 21794 - 11905: 0xDFEF, + 21795 - 11905: 0xDFF0, + 21796 - 11905: 0xBBBD, + 21797 - 11905: 0x867D, + 21798 - 11905: 0x867E, + 21799 - 11905: 0xDFF3, + 21800 - 11905: 0x8680, + 21801 - 11905: 0x8681, + 21802 - 11905: 0xDFF4, + 21803 - 11905: 0x8682, + 21804 - 11905: 0xBBA3, + 21805 - 11905: 0x8683, + 21806 - 11905: 0xCADB, + 21807 - 11905: 0xCEA8, + 21808 - 11905: 0xE0A7, + 21809 - 11905: 0xB3AA, + 21810 - 11905: 0x8684, + 21811 - 11905: 0xE0A6, + 21812 - 11905: 0x8685, + 21813 - 11905: 0x8686, + 21814 - 11905: 0x8687, + 21815 - 11905: 0xE0A1, + 21816 - 11905: 0x8688, + 21817 - 11905: 0x8689, + 21818 - 11905: 0x868A, + 21819 - 11905: 0x868B, + 21820 - 11905: 0xDFFE, + 21821 - 11905: 0x868C, + 21822 - 11905: 0xCDD9, + 21823 - 11905: 0xDFFC, + 21824 - 11905: 0x868D, + 21825 - 11905: 0xDFFA, + 21826 - 11905: 0x868E, + 21827 - 11905: 0xBFD0, + 21828 - 11905: 0xD7C4, + 21829 - 11905: 0x868F, + 21830 - 11905: 0xC9CC, + 21831 - 11905: 0x8690, + 21832 - 11905: 0x8691, + 21833 - 11905: 0xDFF8, + 21834 - 11905: 0xB0A1, + 21835 - 11905: 0x8692, + 21836 - 11905: 0x8693, + 21837 - 11905: 0x8694, + 21838 - 11905: 0x8695, + 21839 - 11905: 0x8696, + 21840 - 11905: 0xDFFD, + 21841 - 11905: 0x8697, + 21842 - 11905: 0x8698, + 21843 - 11905: 0x8699, + 21844 - 11905: 0x869A, + 21845 - 11905: 0xDFFB, + 21846 - 11905: 0xE0A2, + 21847 - 11905: 0x869B, + 21848 - 11905: 0x869C, + 21849 - 11905: 0x869D, + 21850 - 11905: 0x869E, + 21851 - 11905: 0x869F, + 21852 - 11905: 0xE0A8, + 21853 - 11905: 0x86A0, + 21854 - 11905: 0x86A1, + 21855 - 11905: 0x86A2, + 21856 - 11905: 0x86A3, + 21857 - 11905: 0xB7C8, + 21858 - 11905: 0x86A4, + 21859 - 11905: 0x86A5, + 21860 - 11905: 0xC6A1, + 21861 - 11905: 0xC9B6, + 21862 - 11905: 0xC0B2, + 21863 - 11905: 0xDFF5, + 21864 - 11905: 0x86A6, + 21865 - 11905: 0x86A7, + 21866 - 11905: 0xC5BE, + 21867 - 11905: 0x86A8, + 21868 - 11905: 0xD8C4, + 21869 - 11905: 0xDFF9, + 21870 - 11905: 0xC4F6, + 21871 - 11905: 0x86A9, + 21872 - 11905: 0x86AA, + 21873 - 11905: 0x86AB, + 21874 - 11905: 0x86AC, + 21875 - 11905: 0x86AD, + 21876 - 11905: 0x86AE, + 21877 - 11905: 0xE0A3, + 21878 - 11905: 0xE0A4, + 21879 - 11905: 0xE0A5, + 21880 - 11905: 0xD0A5, + 21881 - 11905: 0x86AF, + 21882 - 11905: 0x86B0, + 21883 - 11905: 0xE0B4, + 21884 - 11905: 0xCCE4, + 21885 - 11905: 0x86B1, + 21886 - 11905: 0xE0B1, + 21887 - 11905: 0x86B2, + 21888 - 11905: 0xBFA6, + 21889 - 11905: 0xE0AF, + 21890 - 11905: 0xCEB9, + 21891 - 11905: 0xE0AB, + 21892 - 11905: 0xC9C6, + 21893 - 11905: 0x86B3, + 21894 - 11905: 0x86B4, + 21895 - 11905: 0xC0AE, + 21896 - 11905: 0xE0AE, + 21897 - 11905: 0xBAED, + 21898 - 11905: 0xBAB0, + 21899 - 11905: 0xE0A9, + 21900 - 11905: 0x86B5, + 21901 - 11905: 0x86B6, + 21902 - 11905: 0x86B7, + 21903 - 11905: 0xDFF6, + 21904 - 11905: 0x86B8, + 21905 - 11905: 0xE0B3, + 21906 - 11905: 0x86B9, + 21907 - 11905: 0x86BA, + 21908 - 11905: 0xE0B8, + 21909 - 11905: 0x86BB, + 21910 - 11905: 0x86BC, + 21911 - 11905: 0x86BD, + 21912 - 11905: 0xB4AD, + 21913 - 11905: 0xE0B9, + 21914 - 11905: 0x86BE, + 21915 - 11905: 0x86BF, + 21916 - 11905: 0xCFB2, + 21917 - 11905: 0xBAC8, + 21918 - 11905: 0x86C0, + 21919 - 11905: 0xE0B0, + 21920 - 11905: 0x86C1, + 21921 - 11905: 0x86C2, + 21922 - 11905: 0x86C3, + 21923 - 11905: 0x86C4, + 21924 - 11905: 0x86C5, + 21925 - 11905: 0x86C6, + 21926 - 11905: 0x86C7, + 21927 - 11905: 0xD0FA, + 21928 - 11905: 0x86C8, + 21929 - 11905: 0x86C9, + 21930 - 11905: 0x86CA, + 21931 - 11905: 0x86CB, + 21932 - 11905: 0x86CC, + 21933 - 11905: 0x86CD, + 21934 - 11905: 0x86CE, + 21935 - 11905: 0x86CF, + 21936 - 11905: 0x86D0, + 21937 - 11905: 0xE0AC, + 21938 - 11905: 0x86D1, + 21939 - 11905: 0xD4FB, + 21940 - 11905: 0x86D2, + 21941 - 11905: 0xDFF7, + 21942 - 11905: 0x86D3, + 21943 - 11905: 0xC5E7, + 21944 - 11905: 0x86D4, + 21945 - 11905: 0xE0AD, + 21946 - 11905: 0x86D5, + 21947 - 11905: 0xD3F7, + 21948 - 11905: 0x86D6, + 21949 - 11905: 0xE0B6, + 21950 - 11905: 0xE0B7, + 21951 - 11905: 0x86D7, + 21952 - 11905: 0x86D8, + 21953 - 11905: 0x86D9, + 21954 - 11905: 0x86DA, + 21955 - 11905: 0x86DB, + 21956 - 11905: 0xE0C4, + 21957 - 11905: 0xD0E1, + 21958 - 11905: 0x86DC, + 21959 - 11905: 0x86DD, + 21960 - 11905: 0x86DE, + 21961 - 11905: 0xE0BC, + 21962 - 11905: 0x86DF, + 21963 - 11905: 0x86E0, + 21964 - 11905: 0xE0C9, + 21965 - 11905: 0xE0CA, + 21966 - 11905: 0x86E1, + 21967 - 11905: 0x86E2, + 21968 - 11905: 0x86E3, + 21969 - 11905: 0xE0BE, + 21970 - 11905: 0xE0AA, + 21971 - 11905: 0xC9A4, + 21972 - 11905: 0xE0C1, + 21973 - 11905: 0x86E4, + 21974 - 11905: 0xE0B2, + 21975 - 11905: 0x86E5, + 21976 - 11905: 0x86E6, + 21977 - 11905: 0x86E7, + 21978 - 11905: 0x86E8, + 21979 - 11905: 0x86E9, + 21980 - 11905: 0xCAC8, + 21981 - 11905: 0xE0C3, + 21982 - 11905: 0x86EA, + 21983 - 11905: 0xE0B5, + 21984 - 11905: 0x86EB, + 21985 - 11905: 0xCECB, + 21986 - 11905: 0x86EC, + 21987 - 11905: 0xCBC3, + 21988 - 11905: 0xE0CD, + 21989 - 11905: 0xE0C6, + 21990 - 11905: 0xE0C2, + 21991 - 11905: 0x86ED, + 21992 - 11905: 0xE0CB, + 21993 - 11905: 0x86EE, + 21994 - 11905: 0xE0BA, + 21995 - 11905: 0xE0BF, + 21996 - 11905: 0xE0C0, + 21997 - 11905: 0x86EF, + 21998 - 11905: 0x86F0, + 21999 - 11905: 0xE0C5, + 22000 - 11905: 0x86F1, + 22001 - 11905: 0x86F2, + 22002 - 11905: 0xE0C7, + 22003 - 11905: 0xE0C8, + 22004 - 11905: 0x86F3, + 22005 - 11905: 0xE0CC, + 22006 - 11905: 0x86F4, + 22007 - 11905: 0xE0BB, + 22008 - 11905: 0x86F5, + 22009 - 11905: 0x86F6, + 22010 - 11905: 0x86F7, + 22011 - 11905: 0x86F8, + 22012 - 11905: 0x86F9, + 22013 - 11905: 0xCBD4, + 22014 - 11905: 0xE0D5, + 22015 - 11905: 0x86FA, + 22016 - 11905: 0xE0D6, + 22017 - 11905: 0xE0D2, + 22018 - 11905: 0x86FB, + 22019 - 11905: 0x86FC, + 22020 - 11905: 0x86FD, + 22021 - 11905: 0x86FE, + 22022 - 11905: 0x8740, + 22023 - 11905: 0x8741, + 22024 - 11905: 0xE0D0, + 22025 - 11905: 0xBCCE, + 22026 - 11905: 0x8742, + 22027 - 11905: 0x8743, + 22028 - 11905: 0xE0D1, + 22029 - 11905: 0x8744, + 22030 - 11905: 0xB8C2, + 22031 - 11905: 0xD8C5, + 22032 - 11905: 0x8745, + 22033 - 11905: 0x8746, + 22034 - 11905: 0x8747, + 22035 - 11905: 0x8748, + 22036 - 11905: 0x8749, + 22037 - 11905: 0x874A, + 22038 - 11905: 0x874B, + 22039 - 11905: 0x874C, + 22040 - 11905: 0xD0EA, + 22041 - 11905: 0x874D, + 22042 - 11905: 0x874E, + 22043 - 11905: 0xC2EF, + 22044 - 11905: 0x874F, + 22045 - 11905: 0x8750, + 22046 - 11905: 0xE0CF, + 22047 - 11905: 0xE0BD, + 22048 - 11905: 0x8751, + 22049 - 11905: 0x8752, + 22050 - 11905: 0x8753, + 22051 - 11905: 0xE0D4, + 22052 - 11905: 0xE0D3, + 22053 - 11905: 0x8754, + 22054 - 11905: 0x8755, + 22055 - 11905: 0xE0D7, + 22056 - 11905: 0x8756, + 22057 - 11905: 0x8757, + 22058 - 11905: 0x8758, + 22059 - 11905: 0x8759, + 22060 - 11905: 0xE0DC, + 22061 - 11905: 0xE0D8, + 22062 - 11905: 0x875A, + 22063 - 11905: 0x875B, + 22064 - 11905: 0x875C, + 22065 - 11905: 0xD6F6, + 22066 - 11905: 0xB3B0, + 22067 - 11905: 0x875D, + 22068 - 11905: 0xD7EC, + 22069 - 11905: 0x875E, + 22070 - 11905: 0xCBBB, + 22071 - 11905: 0x875F, + 22072 - 11905: 0x8760, + 22073 - 11905: 0xE0DA, + 22074 - 11905: 0x8761, + 22075 - 11905: 0xCEFB, + 22076 - 11905: 0x8762, + 22077 - 11905: 0x8763, + 22078 - 11905: 0x8764, + 22079 - 11905: 0xBAD9, + 22080 - 11905: 0x8765, + 22081 - 11905: 0x8766, + 22082 - 11905: 0x8767, + 22083 - 11905: 0x8768, + 22084 - 11905: 0x8769, + 22085 - 11905: 0x876A, + 22086 - 11905: 0x876B, + 22087 - 11905: 0x876C, + 22088 - 11905: 0x876D, + 22089 - 11905: 0x876E, + 22090 - 11905: 0x876F, + 22091 - 11905: 0x8770, + 22092 - 11905: 0xE0E1, + 22093 - 11905: 0xE0DD, + 22094 - 11905: 0xD2AD, + 22095 - 11905: 0x8771, + 22096 - 11905: 0x8772, + 22097 - 11905: 0x8773, + 22098 - 11905: 0x8774, + 22099 - 11905: 0x8775, + 22100 - 11905: 0xE0E2, + 22101 - 11905: 0x8776, + 22102 - 11905: 0x8777, + 22103 - 11905: 0xE0DB, + 22104 - 11905: 0xE0D9, + 22105 - 11905: 0xE0DF, + 22106 - 11905: 0x8778, + 22107 - 11905: 0x8779, + 22108 - 11905: 0xE0E0, + 22109 - 11905: 0x877A, + 22110 - 11905: 0x877B, + 22111 - 11905: 0x877C, + 22112 - 11905: 0x877D, + 22113 - 11905: 0x877E, + 22114 - 11905: 0xE0DE, + 22115 - 11905: 0x8780, + 22116 - 11905: 0xE0E4, + 22117 - 11905: 0x8781, + 22118 - 11905: 0x8782, + 22119 - 11905: 0x8783, + 22120 - 11905: 0xC6F7, + 22121 - 11905: 0xD8AC, + 22122 - 11905: 0xD4EB, + 22123 - 11905: 0xE0E6, + 22124 - 11905: 0xCAC9, + 22125 - 11905: 0x8784, + 22126 - 11905: 0x8785, + 22127 - 11905: 0x8786, + 22128 - 11905: 0x8787, + 22129 - 11905: 0xE0E5, + 22130 - 11905: 0x8788, + 22131 - 11905: 0x8789, + 22132 - 11905: 0x878A, + 22133 - 11905: 0x878B, + 22134 - 11905: 0xB8C1, + 22135 - 11905: 0x878C, + 22136 - 11905: 0x878D, + 22137 - 11905: 0x878E, + 22138 - 11905: 0x878F, + 22139 - 11905: 0xE0E7, + 22140 - 11905: 0xE0E8, + 22141 - 11905: 0x8790, + 22142 - 11905: 0x8791, + 22143 - 11905: 0x8792, + 22144 - 11905: 0x8793, + 22145 - 11905: 0x8794, + 22146 - 11905: 0x8795, + 22147 - 11905: 0x8796, + 22148 - 11905: 0x8797, + 22149 - 11905: 0xE0E9, + 22150 - 11905: 0xE0E3, + 22151 - 11905: 0x8798, + 22152 - 11905: 0x8799, + 22153 - 11905: 0x879A, + 22154 - 11905: 0x879B, + 22155 - 11905: 0x879C, + 22156 - 11905: 0x879D, + 22157 - 11905: 0x879E, + 22158 - 11905: 0xBABF, + 22159 - 11905: 0xCCE7, + 22160 - 11905: 0x879F, + 22161 - 11905: 0x87A0, + 22162 - 11905: 0x87A1, + 22163 - 11905: 0xE0EA, + 22164 - 11905: 0x87A2, + 22165 - 11905: 0x87A3, + 22166 - 11905: 0x87A4, + 22167 - 11905: 0x87A5, + 22168 - 11905: 0x87A6, + 22169 - 11905: 0x87A7, + 22170 - 11905: 0x87A8, + 22171 - 11905: 0x87A9, + 22172 - 11905: 0x87AA, + 22173 - 11905: 0x87AB, + 22174 - 11905: 0x87AC, + 22175 - 11905: 0x87AD, + 22176 - 11905: 0x87AE, + 22177 - 11905: 0x87AF, + 22178 - 11905: 0x87B0, + 22179 - 11905: 0xCFF9, + 22180 - 11905: 0x87B1, + 22181 - 11905: 0x87B2, + 22182 - 11905: 0x87B3, + 22183 - 11905: 0x87B4, + 22184 - 11905: 0x87B5, + 22185 - 11905: 0x87B6, + 22186 - 11905: 0x87B7, + 22187 - 11905: 0x87B8, + 22188 - 11905: 0x87B9, + 22189 - 11905: 0x87BA, + 22190 - 11905: 0x87BB, + 22191 - 11905: 0xE0EB, + 22192 - 11905: 0x87BC, + 22193 - 11905: 0x87BD, + 22194 - 11905: 0x87BE, + 22195 - 11905: 0x87BF, + 22196 - 11905: 0x87C0, + 22197 - 11905: 0x87C1, + 22198 - 11905: 0x87C2, + 22199 - 11905: 0xC8C2, + 22200 - 11905: 0x87C3, + 22201 - 11905: 0x87C4, + 22202 - 11905: 0x87C5, + 22203 - 11905: 0x87C6, + 22204 - 11905: 0xBDC0, + 22205 - 11905: 0x87C7, + 22206 - 11905: 0x87C8, + 22207 - 11905: 0x87C9, + 22208 - 11905: 0x87CA, + 22209 - 11905: 0x87CB, + 22210 - 11905: 0x87CC, + 22211 - 11905: 0x87CD, + 22212 - 11905: 0x87CE, + 22213 - 11905: 0x87CF, + 22214 - 11905: 0x87D0, + 22215 - 11905: 0x87D1, + 22216 - 11905: 0x87D2, + 22217 - 11905: 0x87D3, + 22218 - 11905: 0xC4D2, + 22219 - 11905: 0x87D4, + 22220 - 11905: 0x87D5, + 22221 - 11905: 0x87D6, + 22222 - 11905: 0x87D7, + 22223 - 11905: 0x87D8, + 22224 - 11905: 0x87D9, + 22225 - 11905: 0x87DA, + 22226 - 11905: 0x87DB, + 22227 - 11905: 0x87DC, + 22228 - 11905: 0xE0EC, + 22229 - 11905: 0x87DD, + 22230 - 11905: 0x87DE, + 22231 - 11905: 0xE0ED, + 22232 - 11905: 0x87DF, + 22233 - 11905: 0x87E0, + 22234 - 11905: 0xC7F4, + 22235 - 11905: 0xCBC4, + 22236 - 11905: 0x87E1, + 22237 - 11905: 0xE0EE, + 22238 - 11905: 0xBBD8, + 22239 - 11905: 0xD8B6, + 22240 - 11905: 0xD2F2, + 22241 - 11905: 0xE0EF, + 22242 - 11905: 0xCDC5, + 22243 - 11905: 0x87E2, + 22244 - 11905: 0xB6DA, + 22245 - 11905: 0x87E3, + 22246 - 11905: 0x87E4, + 22247 - 11905: 0x87E5, + 22248 - 11905: 0x87E6, + 22249 - 11905: 0x87E7, + 22250 - 11905: 0x87E8, + 22251 - 11905: 0xE0F1, + 22252 - 11905: 0x87E9, + 22253 - 11905: 0xD4B0, + 22254 - 11905: 0x87EA, + 22255 - 11905: 0x87EB, + 22256 - 11905: 0xC0A7, + 22257 - 11905: 0xB4D1, + 22258 - 11905: 0x87EC, + 22259 - 11905: 0x87ED, + 22260 - 11905: 0xCEA7, + 22261 - 11905: 0xE0F0, + 22262 - 11905: 0x87EE, + 22263 - 11905: 0x87EF, + 22264 - 11905: 0x87F0, + 22265 - 11905: 0xE0F2, + 22266 - 11905: 0xB9CC, + 22267 - 11905: 0x87F1, + 22268 - 11905: 0x87F2, + 22269 - 11905: 0xB9FA, + 22270 - 11905: 0xCDBC, + 22271 - 11905: 0xE0F3, + 22272 - 11905: 0x87F3, + 22273 - 11905: 0x87F4, + 22274 - 11905: 0x87F5, + 22275 - 11905: 0xC6D4, + 22276 - 11905: 0xE0F4, + 22277 - 11905: 0x87F6, + 22278 - 11905: 0xD4B2, + 22279 - 11905: 0x87F7, + 22280 - 11905: 0xC8A6, + 22281 - 11905: 0xE0F6, + 22282 - 11905: 0xE0F5, + 22283 - 11905: 0x87F8, + 22284 - 11905: 0x87F9, + 22285 - 11905: 0x87FA, + 22286 - 11905: 0x87FB, + 22287 - 11905: 0x87FC, + 22288 - 11905: 0x87FD, + 22289 - 11905: 0x87FE, + 22290 - 11905: 0x8840, + 22291 - 11905: 0x8841, + 22292 - 11905: 0x8842, + 22293 - 11905: 0x8843, + 22294 - 11905: 0x8844, + 22295 - 11905: 0x8845, + 22296 - 11905: 0x8846, + 22297 - 11905: 0x8847, + 22298 - 11905: 0x8848, + 22299 - 11905: 0x8849, + 22300 - 11905: 0xE0F7, + 22301 - 11905: 0x884A, + 22302 - 11905: 0x884B, + 22303 - 11905: 0xCDC1, + 22304 - 11905: 0x884C, + 22305 - 11905: 0x884D, + 22306 - 11905: 0x884E, + 22307 - 11905: 0xCAA5, + 22308 - 11905: 0x884F, + 22309 - 11905: 0x8850, + 22310 - 11905: 0x8851, + 22311 - 11905: 0x8852, + 22312 - 11905: 0xD4DA, + 22313 - 11905: 0xDBD7, + 22314 - 11905: 0xDBD9, + 22315 - 11905: 0x8853, + 22316 - 11905: 0xDBD8, + 22317 - 11905: 0xB9E7, + 22318 - 11905: 0xDBDC, + 22319 - 11905: 0xDBDD, + 22320 - 11905: 0xB5D8, + 22321 - 11905: 0x8854, + 22322 - 11905: 0x8855, + 22323 - 11905: 0xDBDA, + 22324 - 11905: 0x8856, + 22325 - 11905: 0x8857, + 22326 - 11905: 0x8858, + 22327 - 11905: 0x8859, + 22328 - 11905: 0x885A, + 22329 - 11905: 0xDBDB, + 22330 - 11905: 0xB3A1, + 22331 - 11905: 0xDBDF, + 22332 - 11905: 0x885B, + 22333 - 11905: 0x885C, + 22334 - 11905: 0xBBF8, + 22335 - 11905: 0x885D, + 22336 - 11905: 0xD6B7, + 22337 - 11905: 0x885E, + 22338 - 11905: 0xDBE0, + 22339 - 11905: 0x885F, + 22340 - 11905: 0x8860, + 22341 - 11905: 0x8861, + 22342 - 11905: 0x8862, + 22343 - 11905: 0xBEF9, + 22344 - 11905: 0x8863, + 22345 - 11905: 0x8864, + 22346 - 11905: 0xB7BB, + 22347 - 11905: 0x8865, + 22348 - 11905: 0xDBD0, + 22349 - 11905: 0xCCAE, + 22350 - 11905: 0xBFB2, + 22351 - 11905: 0xBBB5, + 22352 - 11905: 0xD7F8, + 22353 - 11905: 0xBFD3, + 22354 - 11905: 0x8866, + 22355 - 11905: 0x8867, + 22356 - 11905: 0x8868, + 22357 - 11905: 0x8869, + 22358 - 11905: 0x886A, + 22359 - 11905: 0xBFE9, + 22360 - 11905: 0x886B, + 22361 - 11905: 0x886C, + 22362 - 11905: 0xBCE1, + 22363 - 11905: 0xCCB3, + 22364 - 11905: 0xDBDE, + 22365 - 11905: 0xB0D3, + 22366 - 11905: 0xCEEB, + 22367 - 11905: 0xB7D8, + 22368 - 11905: 0xD7B9, + 22369 - 11905: 0xC6C2, + 22370 - 11905: 0x886D, + 22371 - 11905: 0x886E, + 22372 - 11905: 0xC0A4, + 22373 - 11905: 0x886F, + 22374 - 11905: 0xCCB9, + 22375 - 11905: 0x8870, + 22376 - 11905: 0xDBE7, + 22377 - 11905: 0xDBE1, + 22378 - 11905: 0xC6BA, + 22379 - 11905: 0xDBE3, + 22380 - 11905: 0x8871, + 22381 - 11905: 0xDBE8, + 22382 - 11905: 0x8872, + 22383 - 11905: 0xC5F7, + 22384 - 11905: 0x8873, + 22385 - 11905: 0x8874, + 22386 - 11905: 0x8875, + 22387 - 11905: 0xDBEA, + 22388 - 11905: 0x8876, + 22389 - 11905: 0x8877, + 22390 - 11905: 0xDBE9, + 22391 - 11905: 0xBFC0, + 22392 - 11905: 0x8878, + 22393 - 11905: 0x8879, + 22394 - 11905: 0x887A, + 22395 - 11905: 0xDBE6, + 22396 - 11905: 0xDBE5, + 22397 - 11905: 0x887B, + 22398 - 11905: 0x887C, + 22399 - 11905: 0x887D, + 22400 - 11905: 0x887E, + 22401 - 11905: 0x8880, + 22402 - 11905: 0xB4B9, + 22403 - 11905: 0xC0AC, + 22404 - 11905: 0xC2A2, + 22405 - 11905: 0xDBE2, + 22406 - 11905: 0xDBE4, + 22407 - 11905: 0x8881, + 22408 - 11905: 0x8882, + 22409 - 11905: 0x8883, + 22410 - 11905: 0x8884, + 22411 - 11905: 0xD0CD, + 22412 - 11905: 0xDBED, + 22413 - 11905: 0x8885, + 22414 - 11905: 0x8886, + 22415 - 11905: 0x8887, + 22416 - 11905: 0x8888, + 22417 - 11905: 0x8889, + 22418 - 11905: 0xC0DD, + 22419 - 11905: 0xDBF2, + 22420 - 11905: 0x888A, + 22421 - 11905: 0x888B, + 22422 - 11905: 0x888C, + 22423 - 11905: 0x888D, + 22424 - 11905: 0x888E, + 22425 - 11905: 0x888F, + 22426 - 11905: 0x8890, + 22427 - 11905: 0xB6E2, + 22428 - 11905: 0x8891, + 22429 - 11905: 0x8892, + 22430 - 11905: 0x8893, + 22431 - 11905: 0x8894, + 22432 - 11905: 0xDBF3, + 22433 - 11905: 0xDBD2, + 22434 - 11905: 0xB9B8, + 22435 - 11905: 0xD4AB, + 22436 - 11905: 0xDBEC, + 22437 - 11905: 0x8895, + 22438 - 11905: 0xBFD1, + 22439 - 11905: 0xDBF0, + 22440 - 11905: 0x8896, + 22441 - 11905: 0xDBD1, + 22442 - 11905: 0x8897, + 22443 - 11905: 0xB5E6, + 22444 - 11905: 0x8898, + 22445 - 11905: 0xDBEB, + 22446 - 11905: 0xBFE5, + 22447 - 11905: 0x8899, + 22448 - 11905: 0x889A, + 22449 - 11905: 0x889B, + 22450 - 11905: 0xDBEE, + 22451 - 11905: 0x889C, + 22452 - 11905: 0xDBF1, + 22453 - 11905: 0x889D, + 22454 - 11905: 0x889E, + 22455 - 11905: 0x889F, + 22456 - 11905: 0xDBF9, + 22457 - 11905: 0x88A0, + 22458 - 11905: 0x88A1, + 22459 - 11905: 0x88A2, + 22460 - 11905: 0x88A3, + 22461 - 11905: 0x88A4, + 22462 - 11905: 0x88A5, + 22463 - 11905: 0x88A6, + 22464 - 11905: 0x88A7, + 22465 - 11905: 0x88A8, + 22466 - 11905: 0xB9A1, + 22467 - 11905: 0xB0A3, + 22468 - 11905: 0x88A9, + 22469 - 11905: 0x88AA, + 22470 - 11905: 0x88AB, + 22471 - 11905: 0x88AC, + 22472 - 11905: 0x88AD, + 22473 - 11905: 0x88AE, + 22474 - 11905: 0x88AF, + 22475 - 11905: 0xC2F1, + 22476 - 11905: 0x88B0, + 22477 - 11905: 0x88B1, + 22478 - 11905: 0xB3C7, + 22479 - 11905: 0xDBEF, + 22480 - 11905: 0x88B2, + 22481 - 11905: 0x88B3, + 22482 - 11905: 0xDBF8, + 22483 - 11905: 0x88B4, + 22484 - 11905: 0xC6D2, + 22485 - 11905: 0xDBF4, + 22486 - 11905: 0x88B5, + 22487 - 11905: 0x88B6, + 22488 - 11905: 0xDBF5, + 22489 - 11905: 0xDBF7, + 22490 - 11905: 0xDBF6, + 22491 - 11905: 0x88B7, + 22492 - 11905: 0x88B8, + 22493 - 11905: 0xDBFE, + 22494 - 11905: 0x88B9, + 22495 - 11905: 0xD3F2, + 22496 - 11905: 0xB2BA, + 22497 - 11905: 0x88BA, + 22498 - 11905: 0x88BB, + 22499 - 11905: 0x88BC, + 22500 - 11905: 0xDBFD, + 22501 - 11905: 0x88BD, + 22502 - 11905: 0x88BE, + 22503 - 11905: 0x88BF, + 22504 - 11905: 0x88C0, + 22505 - 11905: 0x88C1, + 22506 - 11905: 0x88C2, + 22507 - 11905: 0x88C3, + 22508 - 11905: 0x88C4, + 22509 - 11905: 0xDCA4, + 22510 - 11905: 0x88C5, + 22511 - 11905: 0xDBFB, + 22512 - 11905: 0x88C6, + 22513 - 11905: 0x88C7, + 22514 - 11905: 0x88C8, + 22515 - 11905: 0x88C9, + 22516 - 11905: 0xDBFA, + 22517 - 11905: 0x88CA, + 22518 - 11905: 0x88CB, + 22519 - 11905: 0x88CC, + 22520 - 11905: 0xDBFC, + 22521 - 11905: 0xC5E0, + 22522 - 11905: 0xBBF9, + 22523 - 11905: 0x88CD, + 22524 - 11905: 0x88CE, + 22525 - 11905: 0xDCA3, + 22526 - 11905: 0x88CF, + 22527 - 11905: 0x88D0, + 22528 - 11905: 0xDCA5, + 22529 - 11905: 0x88D1, + 22530 - 11905: 0xCCC3, + 22531 - 11905: 0x88D2, + 22532 - 11905: 0x88D3, + 22533 - 11905: 0x88D4, + 22534 - 11905: 0xB6D1, + 22535 - 11905: 0xDDC0, + 22536 - 11905: 0x88D5, + 22537 - 11905: 0x88D6, + 22538 - 11905: 0x88D7, + 22539 - 11905: 0xDCA1, + 22540 - 11905: 0x88D8, + 22541 - 11905: 0xDCA2, + 22542 - 11905: 0x88D9, + 22543 - 11905: 0x88DA, + 22544 - 11905: 0x88DB, + 22545 - 11905: 0xC7B5, + 22546 - 11905: 0x88DC, + 22547 - 11905: 0x88DD, + 22548 - 11905: 0x88DE, + 22549 - 11905: 0xB6E9, + 22550 - 11905: 0x88DF, + 22551 - 11905: 0x88E0, + 22552 - 11905: 0x88E1, + 22553 - 11905: 0xDCA7, + 22554 - 11905: 0x88E2, + 22555 - 11905: 0x88E3, + 22556 - 11905: 0x88E4, + 22557 - 11905: 0x88E5, + 22558 - 11905: 0xDCA6, + 22559 - 11905: 0x88E6, + 22560 - 11905: 0xDCA9, + 22561 - 11905: 0xB1A4, + 22562 - 11905: 0x88E7, + 22563 - 11905: 0x88E8, + 22564 - 11905: 0xB5CC, + 22565 - 11905: 0x88E9, + 22566 - 11905: 0x88EA, + 22567 - 11905: 0x88EB, + 22568 - 11905: 0x88EC, + 22569 - 11905: 0x88ED, + 22570 - 11905: 0xBFB0, + 22571 - 11905: 0x88EE, + 22572 - 11905: 0x88EF, + 22573 - 11905: 0x88F0, + 22574 - 11905: 0x88F1, + 22575 - 11905: 0x88F2, + 22576 - 11905: 0xD1DF, + 22577 - 11905: 0x88F3, + 22578 - 11905: 0x88F4, + 22579 - 11905: 0x88F5, + 22580 - 11905: 0x88F6, + 22581 - 11905: 0xB6C2, + 22582 - 11905: 0x88F7, + 22583 - 11905: 0x88F8, + 22584 - 11905: 0x88F9, + 22585 - 11905: 0x88FA, + 22586 - 11905: 0x88FB, + 22587 - 11905: 0x88FC, + 22588 - 11905: 0x88FD, + 22589 - 11905: 0x88FE, + 22590 - 11905: 0x8940, + 22591 - 11905: 0x8941, + 22592 - 11905: 0x8942, + 22593 - 11905: 0x8943, + 22594 - 11905: 0x8944, + 22595 - 11905: 0x8945, + 22596 - 11905: 0xDCA8, + 22597 - 11905: 0x8946, + 22598 - 11905: 0x8947, + 22599 - 11905: 0x8948, + 22600 - 11905: 0x8949, + 22601 - 11905: 0x894A, + 22602 - 11905: 0x894B, + 22603 - 11905: 0x894C, + 22604 - 11905: 0xCBFA, + 22605 - 11905: 0xEBF3, + 22606 - 11905: 0x894D, + 22607 - 11905: 0x894E, + 22608 - 11905: 0x894F, + 22609 - 11905: 0xCBDC, + 22610 - 11905: 0x8950, + 22611 - 11905: 0x8951, + 22612 - 11905: 0xCBFE, + 22613 - 11905: 0x8952, + 22614 - 11905: 0x8953, + 22615 - 11905: 0x8954, + 22616 - 11905: 0xCCC1, + 22617 - 11905: 0x8955, + 22618 - 11905: 0x8956, + 22619 - 11905: 0x8957, + 22620 - 11905: 0x8958, + 22621 - 11905: 0x8959, + 22622 - 11905: 0xC8FB, + 22623 - 11905: 0x895A, + 22624 - 11905: 0x895B, + 22625 - 11905: 0x895C, + 22626 - 11905: 0x895D, + 22627 - 11905: 0x895E, + 22628 - 11905: 0x895F, + 22629 - 11905: 0xDCAA, + 22630 - 11905: 0x8960, + 22631 - 11905: 0x8961, + 22632 - 11905: 0x8962, + 22633 - 11905: 0x8963, + 22634 - 11905: 0x8964, + 22635 - 11905: 0xCCEE, + 22636 - 11905: 0xDCAB, + 22637 - 11905: 0x8965, + 22638 - 11905: 0x8966, + 22639 - 11905: 0x8967, + 22640 - 11905: 0x8968, + 22641 - 11905: 0x8969, + 22642 - 11905: 0x896A, + 22643 - 11905: 0x896B, + 22644 - 11905: 0x896C, + 22645 - 11905: 0x896D, + 22646 - 11905: 0x896E, + 22647 - 11905: 0x896F, + 22648 - 11905: 0x8970, + 22649 - 11905: 0x8971, + 22650 - 11905: 0x8972, + 22651 - 11905: 0x8973, + 22652 - 11905: 0x8974, + 22653 - 11905: 0x8975, + 22654 - 11905: 0xDBD3, + 22655 - 11905: 0x8976, + 22656 - 11905: 0xDCAF, + 22657 - 11905: 0xDCAC, + 22658 - 11905: 0x8977, + 22659 - 11905: 0xBEB3, + 22660 - 11905: 0x8978, + 22661 - 11905: 0xCAFB, + 22662 - 11905: 0x8979, + 22663 - 11905: 0x897A, + 22664 - 11905: 0x897B, + 22665 - 11905: 0xDCAD, + 22666 - 11905: 0x897C, + 22667 - 11905: 0x897D, + 22668 - 11905: 0x897E, + 22669 - 11905: 0x8980, + 22670 - 11905: 0x8981, + 22671 - 11905: 0x8982, + 22672 - 11905: 0x8983, + 22673 - 11905: 0x8984, + 22674 - 11905: 0xC9CA, + 22675 - 11905: 0xC4B9, + 22676 - 11905: 0x8985, + 22677 - 11905: 0x8986, + 22678 - 11905: 0x8987, + 22679 - 11905: 0x8988, + 22680 - 11905: 0x8989, + 22681 - 11905: 0xC7BD, + 22682 - 11905: 0xDCAE, + 22683 - 11905: 0x898A, + 22684 - 11905: 0x898B, + 22685 - 11905: 0x898C, + 22686 - 11905: 0xD4F6, + 22687 - 11905: 0xD0E6, + 22688 - 11905: 0x898D, + 22689 - 11905: 0x898E, + 22690 - 11905: 0x898F, + 22691 - 11905: 0x8990, + 22692 - 11905: 0x8991, + 22693 - 11905: 0x8992, + 22694 - 11905: 0x8993, + 22695 - 11905: 0x8994, + 22696 - 11905: 0xC4AB, + 22697 - 11905: 0xB6D5, + 22698 - 11905: 0x8995, + 22699 - 11905: 0x8996, + 22700 - 11905: 0x8997, + 22701 - 11905: 0x8998, + 22702 - 11905: 0x8999, + 22703 - 11905: 0x899A, + 22704 - 11905: 0x899B, + 22705 - 11905: 0x899C, + 22706 - 11905: 0x899D, + 22707 - 11905: 0x899E, + 22708 - 11905: 0x899F, + 22709 - 11905: 0x89A0, + 22710 - 11905: 0x89A1, + 22711 - 11905: 0x89A2, + 22712 - 11905: 0x89A3, + 22713 - 11905: 0x89A4, + 22714 - 11905: 0x89A5, + 22715 - 11905: 0x89A6, + 22716 - 11905: 0xDBD4, + 22717 - 11905: 0x89A7, + 22718 - 11905: 0x89A8, + 22719 - 11905: 0x89A9, + 22720 - 11905: 0x89AA, + 22721 - 11905: 0xB1DA, + 22722 - 11905: 0x89AB, + 22723 - 11905: 0x89AC, + 22724 - 11905: 0x89AD, + 22725 - 11905: 0xDBD5, + 22726 - 11905: 0x89AE, + 22727 - 11905: 0x89AF, + 22728 - 11905: 0x89B0, + 22729 - 11905: 0x89B1, + 22730 - 11905: 0x89B2, + 22731 - 11905: 0x89B3, + 22732 - 11905: 0x89B4, + 22733 - 11905: 0x89B5, + 22734 - 11905: 0x89B6, + 22735 - 11905: 0x89B7, + 22736 - 11905: 0x89B8, + 22737 - 11905: 0xDBD6, + 22738 - 11905: 0x89B9, + 22739 - 11905: 0x89BA, + 22740 - 11905: 0x89BB, + 22741 - 11905: 0xBABE, + 22742 - 11905: 0x89BC, + 22743 - 11905: 0x89BD, + 22744 - 11905: 0x89BE, + 22745 - 11905: 0x89BF, + 22746 - 11905: 0x89C0, + 22747 - 11905: 0x89C1, + 22748 - 11905: 0x89C2, + 22749 - 11905: 0x89C3, + 22750 - 11905: 0x89C4, + 22751 - 11905: 0x89C5, + 22752 - 11905: 0x89C6, + 22753 - 11905: 0x89C7, + 22754 - 11905: 0x89C8, + 22755 - 11905: 0x89C9, + 22756 - 11905: 0xC8C0, + 22757 - 11905: 0x89CA, + 22758 - 11905: 0x89CB, + 22759 - 11905: 0x89CC, + 22760 - 11905: 0x89CD, + 22761 - 11905: 0x89CE, + 22762 - 11905: 0x89CF, + 22763 - 11905: 0xCABF, + 22764 - 11905: 0xC8C9, + 22765 - 11905: 0x89D0, + 22766 - 11905: 0xD7B3, + 22767 - 11905: 0x89D1, + 22768 - 11905: 0xC9F9, + 22769 - 11905: 0x89D2, + 22770 - 11905: 0x89D3, + 22771 - 11905: 0xBFC7, + 22772 - 11905: 0x89D4, + 22773 - 11905: 0x89D5, + 22774 - 11905: 0xBAF8, + 22775 - 11905: 0x89D6, + 22776 - 11905: 0x89D7, + 22777 - 11905: 0xD2BC, + 22778 - 11905: 0x89D8, + 22779 - 11905: 0x89D9, + 22780 - 11905: 0x89DA, + 22781 - 11905: 0x89DB, + 22782 - 11905: 0x89DC, + 22783 - 11905: 0x89DD, + 22784 - 11905: 0x89DE, + 22785 - 11905: 0x89DF, + 22786 - 11905: 0xE2BA, + 22787 - 11905: 0x89E0, + 22788 - 11905: 0xB4A6, + 22789 - 11905: 0x89E1, + 22790 - 11905: 0x89E2, + 22791 - 11905: 0xB1B8, + 22792 - 11905: 0x89E3, + 22793 - 11905: 0x89E4, + 22794 - 11905: 0x89E5, + 22795 - 11905: 0x89E6, + 22796 - 11905: 0x89E7, + 22797 - 11905: 0xB8B4, + 22798 - 11905: 0x89E8, + 22799 - 11905: 0xCFC4, + 22800 - 11905: 0x89E9, + 22801 - 11905: 0x89EA, + 22802 - 11905: 0x89EB, + 22803 - 11905: 0x89EC, + 22804 - 11905: 0xD9E7, + 22805 - 11905: 0xCFA6, + 22806 - 11905: 0xCDE2, + 22807 - 11905: 0x89ED, + 22808 - 11905: 0x89EE, + 22809 - 11905: 0xD9ED, + 22810 - 11905: 0xB6E0, + 22811 - 11905: 0x89EF, + 22812 - 11905: 0xD2B9, + 22813 - 11905: 0x89F0, + 22814 - 11905: 0x89F1, + 22815 - 11905: 0xB9BB, + 22816 - 11905: 0x89F2, + 22817 - 11905: 0x89F3, + 22818 - 11905: 0x89F4, + 22819 - 11905: 0x89F5, + 22820 - 11905: 0xE2B9, + 22821 - 11905: 0xE2B7, + 22822 - 11905: 0x89F6, + 22823 - 11905: 0xB4F3, + 22824 - 11905: 0x89F7, + 22825 - 11905: 0xCCEC, + 22826 - 11905: 0xCCAB, + 22827 - 11905: 0xB7F2, + 22828 - 11905: 0x89F8, + 22829 - 11905: 0xD8B2, + 22830 - 11905: 0xD1EB, + 22831 - 11905: 0xBABB, + 22832 - 11905: 0x89F9, + 22833 - 11905: 0xCAA7, + 22834 - 11905: 0x89FA, + 22835 - 11905: 0x89FB, + 22836 - 11905: 0xCDB7, + 22837 - 11905: 0x89FC, + 22838 - 11905: 0x89FD, + 22839 - 11905: 0xD2C4, + 22840 - 11905: 0xBFE4, + 22841 - 11905: 0xBCD0, + 22842 - 11905: 0xB6E1, + 22843 - 11905: 0x89FE, + 22844 - 11905: 0xDEC5, + 22845 - 11905: 0x8A40, + 22846 - 11905: 0x8A41, + 22847 - 11905: 0x8A42, + 22848 - 11905: 0x8A43, + 22849 - 11905: 0xDEC6, + 22850 - 11905: 0xDBBC, + 22851 - 11905: 0x8A44, + 22852 - 11905: 0xD1D9, + 22853 - 11905: 0x8A45, + 22854 - 11905: 0x8A46, + 22855 - 11905: 0xC6E6, + 22856 - 11905: 0xC4CE, + 22857 - 11905: 0xB7EE, + 22858 - 11905: 0x8A47, + 22859 - 11905: 0xB7DC, + 22860 - 11905: 0x8A48, + 22861 - 11905: 0x8A49, + 22862 - 11905: 0xBFFC, + 22863 - 11905: 0xD7E0, + 22864 - 11905: 0x8A4A, + 22865 - 11905: 0xC6F5, + 22866 - 11905: 0x8A4B, + 22867 - 11905: 0x8A4C, + 22868 - 11905: 0xB1BC, + 22869 - 11905: 0xDEC8, + 22870 - 11905: 0xBDB1, + 22871 - 11905: 0xCCD7, + 22872 - 11905: 0xDECA, + 22873 - 11905: 0x8A4D, + 22874 - 11905: 0xDEC9, + 22875 - 11905: 0x8A4E, + 22876 - 11905: 0x8A4F, + 22877 - 11905: 0x8A50, + 22878 - 11905: 0x8A51, + 22879 - 11905: 0x8A52, + 22880 - 11905: 0xB5EC, + 22881 - 11905: 0x8A53, + 22882 - 11905: 0xC9DD, + 22883 - 11905: 0x8A54, + 22884 - 11905: 0x8A55, + 22885 - 11905: 0xB0C2, + 22886 - 11905: 0x8A56, + 22887 - 11905: 0x8A57, + 22888 - 11905: 0x8A58, + 22889 - 11905: 0x8A59, + 22890 - 11905: 0x8A5A, + 22891 - 11905: 0x8A5B, + 22892 - 11905: 0x8A5C, + 22893 - 11905: 0x8A5D, + 22894 - 11905: 0x8A5E, + 22895 - 11905: 0x8A5F, + 22896 - 11905: 0x8A60, + 22897 - 11905: 0x8A61, + 22898 - 11905: 0x8A62, + 22899 - 11905: 0xC5AE, + 22900 - 11905: 0xC5AB, + 22901 - 11905: 0x8A63, + 22902 - 11905: 0xC4CC, + 22903 - 11905: 0x8A64, + 22904 - 11905: 0xBCE9, + 22905 - 11905: 0xCBFD, + 22906 - 11905: 0x8A65, + 22907 - 11905: 0x8A66, + 22908 - 11905: 0x8A67, + 22909 - 11905: 0xBAC3, + 22910 - 11905: 0x8A68, + 22911 - 11905: 0x8A69, + 22912 - 11905: 0x8A6A, + 22913 - 11905: 0xE5F9, + 22914 - 11905: 0xC8E7, + 22915 - 11905: 0xE5FA, + 22916 - 11905: 0xCDFD, + 22917 - 11905: 0x8A6B, + 22918 - 11905: 0xD7B1, + 22919 - 11905: 0xB8BE, + 22920 - 11905: 0xC2E8, + 22921 - 11905: 0x8A6C, + 22922 - 11905: 0xC8D1, + 22923 - 11905: 0x8A6D, + 22924 - 11905: 0x8A6E, + 22925 - 11905: 0xE5FB, + 22926 - 11905: 0x8A6F, + 22927 - 11905: 0x8A70, + 22928 - 11905: 0x8A71, + 22929 - 11905: 0x8A72, + 22930 - 11905: 0xB6CA, + 22931 - 11905: 0xBCCB, + 22932 - 11905: 0x8A73, + 22933 - 11905: 0x8A74, + 22934 - 11905: 0xD1FD, + 22935 - 11905: 0xE6A1, + 22936 - 11905: 0x8A75, + 22937 - 11905: 0xC3EE, + 22938 - 11905: 0x8A76, + 22939 - 11905: 0x8A77, + 22940 - 11905: 0x8A78, + 22941 - 11905: 0x8A79, + 22942 - 11905: 0xE6A4, + 22943 - 11905: 0x8A7A, + 22944 - 11905: 0x8A7B, + 22945 - 11905: 0x8A7C, + 22946 - 11905: 0x8A7D, + 22947 - 11905: 0xE5FE, + 22948 - 11905: 0xE6A5, + 22949 - 11905: 0xCDD7, + 22950 - 11905: 0x8A7E, + 22951 - 11905: 0x8A80, + 22952 - 11905: 0xB7C1, + 22953 - 11905: 0xE5FC, + 22954 - 11905: 0xE5FD, + 22955 - 11905: 0xE6A3, + 22956 - 11905: 0x8A81, + 22957 - 11905: 0x8A82, + 22958 - 11905: 0xC4DD, + 22959 - 11905: 0xE6A8, + 22960 - 11905: 0x8A83, + 22961 - 11905: 0x8A84, + 22962 - 11905: 0xE6A7, + 22963 - 11905: 0x8A85, + 22964 - 11905: 0x8A86, + 22965 - 11905: 0x8A87, + 22966 - 11905: 0x8A88, + 22967 - 11905: 0x8A89, + 22968 - 11905: 0x8A8A, + 22969 - 11905: 0xC3C3, + 22970 - 11905: 0x8A8B, + 22971 - 11905: 0xC6DE, + 22972 - 11905: 0x8A8C, + 22973 - 11905: 0x8A8D, + 22974 - 11905: 0xE6AA, + 22975 - 11905: 0x8A8E, + 22976 - 11905: 0x8A8F, + 22977 - 11905: 0x8A90, + 22978 - 11905: 0x8A91, + 22979 - 11905: 0x8A92, + 22980 - 11905: 0x8A93, + 22981 - 11905: 0x8A94, + 22982 - 11905: 0xC4B7, + 22983 - 11905: 0x8A95, + 22984 - 11905: 0x8A96, + 22985 - 11905: 0x8A97, + 22986 - 11905: 0xE6A2, + 22987 - 11905: 0xCABC, + 22988 - 11905: 0x8A98, + 22989 - 11905: 0x8A99, + 22990 - 11905: 0x8A9A, + 22991 - 11905: 0x8A9B, + 22992 - 11905: 0xBDE3, + 22993 - 11905: 0xB9C3, + 22994 - 11905: 0xE6A6, + 22995 - 11905: 0xD0D5, + 22996 - 11905: 0xCEAF, + 22997 - 11905: 0x8A9C, + 22998 - 11905: 0x8A9D, + 22999 - 11905: 0xE6A9, + 23000 - 11905: 0xE6B0, + 23001 - 11905: 0x8A9E, + 23002 - 11905: 0xD2A6, + 23003 - 11905: 0x8A9F, + 23004 - 11905: 0xBDAA, + 23005 - 11905: 0xE6AD, + 23006 - 11905: 0x8AA0, + 23007 - 11905: 0x8AA1, + 23008 - 11905: 0x8AA2, + 23009 - 11905: 0x8AA3, + 23010 - 11905: 0x8AA4, + 23011 - 11905: 0xE6AF, + 23012 - 11905: 0x8AA5, + 23013 - 11905: 0xC0D1, + 23014 - 11905: 0x8AA6, + 23015 - 11905: 0x8AA7, + 23016 - 11905: 0xD2CC, + 23017 - 11905: 0x8AA8, + 23018 - 11905: 0x8AA9, + 23019 - 11905: 0x8AAA, + 23020 - 11905: 0xBCA7, + 23021 - 11905: 0x8AAB, + 23022 - 11905: 0x8AAC, + 23023 - 11905: 0x8AAD, + 23024 - 11905: 0x8AAE, + 23025 - 11905: 0x8AAF, + 23026 - 11905: 0x8AB0, + 23027 - 11905: 0x8AB1, + 23028 - 11905: 0x8AB2, + 23029 - 11905: 0x8AB3, + 23030 - 11905: 0x8AB4, + 23031 - 11905: 0x8AB5, + 23032 - 11905: 0x8AB6, + 23033 - 11905: 0xE6B1, + 23034 - 11905: 0x8AB7, + 23035 - 11905: 0xD2F6, + 23036 - 11905: 0x8AB8, + 23037 - 11905: 0x8AB9, + 23038 - 11905: 0x8ABA, + 23039 - 11905: 0xD7CB, + 23040 - 11905: 0x8ABB, + 23041 - 11905: 0xCDFE, + 23042 - 11905: 0x8ABC, + 23043 - 11905: 0xCDDE, + 23044 - 11905: 0xC2A6, + 23045 - 11905: 0xE6AB, + 23046 - 11905: 0xE6AC, + 23047 - 11905: 0xBDBF, + 23048 - 11905: 0xE6AE, + 23049 - 11905: 0xE6B3, + 23050 - 11905: 0x8ABD, + 23051 - 11905: 0x8ABE, + 23052 - 11905: 0xE6B2, + 23053 - 11905: 0x8ABF, + 23054 - 11905: 0x8AC0, + 23055 - 11905: 0x8AC1, + 23056 - 11905: 0x8AC2, + 23057 - 11905: 0xE6B6, + 23058 - 11905: 0x8AC3, + 23059 - 11905: 0xE6B8, + 23060 - 11905: 0x8AC4, + 23061 - 11905: 0x8AC5, + 23062 - 11905: 0x8AC6, + 23063 - 11905: 0x8AC7, + 23064 - 11905: 0xC4EF, + 23065 - 11905: 0x8AC8, + 23066 - 11905: 0x8AC9, + 23067 - 11905: 0x8ACA, + 23068 - 11905: 0xC4C8, + 23069 - 11905: 0x8ACB, + 23070 - 11905: 0x8ACC, + 23071 - 11905: 0xBEEA, + 23072 - 11905: 0xC9EF, + 23073 - 11905: 0x8ACD, + 23074 - 11905: 0x8ACE, + 23075 - 11905: 0xE6B7, + 23076 - 11905: 0x8ACF, + 23077 - 11905: 0xB6F0, + 23078 - 11905: 0x8AD0, + 23079 - 11905: 0x8AD1, + 23080 - 11905: 0x8AD2, + 23081 - 11905: 0xC3E4, + 23082 - 11905: 0x8AD3, + 23083 - 11905: 0x8AD4, + 23084 - 11905: 0x8AD5, + 23085 - 11905: 0x8AD6, + 23086 - 11905: 0x8AD7, + 23087 - 11905: 0x8AD8, + 23088 - 11905: 0x8AD9, + 23089 - 11905: 0xD3E9, + 23090 - 11905: 0xE6B4, + 23091 - 11905: 0x8ADA, + 23092 - 11905: 0xE6B5, + 23093 - 11905: 0x8ADB, + 23094 - 11905: 0xC8A2, + 23095 - 11905: 0x8ADC, + 23096 - 11905: 0x8ADD, + 23097 - 11905: 0x8ADE, + 23098 - 11905: 0x8ADF, + 23099 - 11905: 0x8AE0, + 23100 - 11905: 0xE6BD, + 23101 - 11905: 0x8AE1, + 23102 - 11905: 0x8AE2, + 23103 - 11905: 0x8AE3, + 23104 - 11905: 0xE6B9, + 23105 - 11905: 0x8AE4, + 23106 - 11905: 0x8AE5, + 23107 - 11905: 0x8AE6, + 23108 - 11905: 0x8AE7, + 23109 - 11905: 0x8AE8, + 23110 - 11905: 0xC6C5, + 23111 - 11905: 0x8AE9, + 23112 - 11905: 0x8AEA, + 23113 - 11905: 0xCDF1, + 23114 - 11905: 0xE6BB, + 23115 - 11905: 0x8AEB, + 23116 - 11905: 0x8AEC, + 23117 - 11905: 0x8AED, + 23118 - 11905: 0x8AEE, + 23119 - 11905: 0x8AEF, + 23120 - 11905: 0x8AF0, + 23121 - 11905: 0x8AF1, + 23122 - 11905: 0x8AF2, + 23123 - 11905: 0x8AF3, + 23124 - 11905: 0x8AF4, + 23125 - 11905: 0xE6BC, + 23126 - 11905: 0x8AF5, + 23127 - 11905: 0x8AF6, + 23128 - 11905: 0x8AF7, + 23129 - 11905: 0x8AF8, + 23130 - 11905: 0xBBE9, + 23131 - 11905: 0x8AF9, + 23132 - 11905: 0x8AFA, + 23133 - 11905: 0x8AFB, + 23134 - 11905: 0x8AFC, + 23135 - 11905: 0x8AFD, + 23136 - 11905: 0x8AFE, + 23137 - 11905: 0x8B40, + 23138 - 11905: 0xE6BE, + 23139 - 11905: 0x8B41, + 23140 - 11905: 0x8B42, + 23141 - 11905: 0x8B43, + 23142 - 11905: 0x8B44, + 23143 - 11905: 0xE6BA, + 23144 - 11905: 0x8B45, + 23145 - 11905: 0x8B46, + 23146 - 11905: 0xC0B7, + 23147 - 11905: 0x8B47, + 23148 - 11905: 0x8B48, + 23149 - 11905: 0x8B49, + 23150 - 11905: 0x8B4A, + 23151 - 11905: 0x8B4B, + 23152 - 11905: 0x8B4C, + 23153 - 11905: 0x8B4D, + 23154 - 11905: 0x8B4E, + 23155 - 11905: 0x8B4F, + 23156 - 11905: 0xD3A4, + 23157 - 11905: 0xE6BF, + 23158 - 11905: 0xC9F4, + 23159 - 11905: 0xE6C3, + 23160 - 11905: 0x8B50, + 23161 - 11905: 0x8B51, + 23162 - 11905: 0xE6C4, + 23163 - 11905: 0x8B52, + 23164 - 11905: 0x8B53, + 23165 - 11905: 0x8B54, + 23166 - 11905: 0x8B55, + 23167 - 11905: 0xD0F6, + 23168 - 11905: 0x8B56, + 23169 - 11905: 0x8B57, + 23170 - 11905: 0x8B58, + 23171 - 11905: 0x8B59, + 23172 - 11905: 0x8B5A, + 23173 - 11905: 0x8B5B, + 23174 - 11905: 0x8B5C, + 23175 - 11905: 0x8B5D, + 23176 - 11905: 0x8B5E, + 23177 - 11905: 0x8B5F, + 23178 - 11905: 0x8B60, + 23179 - 11905: 0x8B61, + 23180 - 11905: 0x8B62, + 23181 - 11905: 0x8B63, + 23182 - 11905: 0x8B64, + 23183 - 11905: 0x8B65, + 23184 - 11905: 0x8B66, + 23185 - 11905: 0x8B67, + 23186 - 11905: 0xC3BD, + 23187 - 11905: 0x8B68, + 23188 - 11905: 0x8B69, + 23189 - 11905: 0x8B6A, + 23190 - 11905: 0x8B6B, + 23191 - 11905: 0x8B6C, + 23192 - 11905: 0x8B6D, + 23193 - 11905: 0x8B6E, + 23194 - 11905: 0xC3C4, + 23195 - 11905: 0xE6C2, + 23196 - 11905: 0x8B6F, + 23197 - 11905: 0x8B70, + 23198 - 11905: 0x8B71, + 23199 - 11905: 0x8B72, + 23200 - 11905: 0x8B73, + 23201 - 11905: 0x8B74, + 23202 - 11905: 0x8B75, + 23203 - 11905: 0x8B76, + 23204 - 11905: 0x8B77, + 23205 - 11905: 0x8B78, + 23206 - 11905: 0x8B79, + 23207 - 11905: 0x8B7A, + 23208 - 11905: 0x8B7B, + 23209 - 11905: 0x8B7C, + 23210 - 11905: 0xE6C1, + 23211 - 11905: 0x8B7D, + 23212 - 11905: 0x8B7E, + 23213 - 11905: 0x8B80, + 23214 - 11905: 0x8B81, + 23215 - 11905: 0x8B82, + 23216 - 11905: 0x8B83, + 23217 - 11905: 0x8B84, + 23218 - 11905: 0xE6C7, + 23219 - 11905: 0xCFB1, + 23220 - 11905: 0x8B85, + 23221 - 11905: 0xEBF4, + 23222 - 11905: 0x8B86, + 23223 - 11905: 0x8B87, + 23224 - 11905: 0xE6CA, + 23225 - 11905: 0x8B88, + 23226 - 11905: 0x8B89, + 23227 - 11905: 0x8B8A, + 23228 - 11905: 0x8B8B, + 23229 - 11905: 0x8B8C, + 23230 - 11905: 0xE6C5, + 23231 - 11905: 0x8B8D, + 23232 - 11905: 0x8B8E, + 23233 - 11905: 0xBCDE, + 23234 - 11905: 0xC9A9, + 23235 - 11905: 0x8B8F, + 23236 - 11905: 0x8B90, + 23237 - 11905: 0x8B91, + 23238 - 11905: 0x8B92, + 23239 - 11905: 0x8B93, + 23240 - 11905: 0x8B94, + 23241 - 11905: 0xBCB5, + 23242 - 11905: 0x8B95, + 23243 - 11905: 0x8B96, + 23244 - 11905: 0xCFD3, + 23245 - 11905: 0x8B97, + 23246 - 11905: 0x8B98, + 23247 - 11905: 0x8B99, + 23248 - 11905: 0x8B9A, + 23249 - 11905: 0x8B9B, + 23250 - 11905: 0xE6C8, + 23251 - 11905: 0x8B9C, + 23252 - 11905: 0xE6C9, + 23253 - 11905: 0x8B9D, + 23254 - 11905: 0xE6CE, + 23255 - 11905: 0x8B9E, + 23256 - 11905: 0xE6D0, + 23257 - 11905: 0x8B9F, + 23258 - 11905: 0x8BA0, + 23259 - 11905: 0x8BA1, + 23260 - 11905: 0xE6D1, + 23261 - 11905: 0x8BA2, + 23262 - 11905: 0x8BA3, + 23263 - 11905: 0x8BA4, + 23264 - 11905: 0xE6CB, + 23265 - 11905: 0xB5D5, + 23266 - 11905: 0x8BA5, + 23267 - 11905: 0xE6CC, + 23268 - 11905: 0x8BA6, + 23269 - 11905: 0x8BA7, + 23270 - 11905: 0xE6CF, + 23271 - 11905: 0x8BA8, + 23272 - 11905: 0x8BA9, + 23273 - 11905: 0xC4DB, + 23274 - 11905: 0x8BAA, + 23275 - 11905: 0xE6C6, + 23276 - 11905: 0x8BAB, + 23277 - 11905: 0x8BAC, + 23278 - 11905: 0x8BAD, + 23279 - 11905: 0x8BAE, + 23280 - 11905: 0x8BAF, + 23281 - 11905: 0xE6CD, + 23282 - 11905: 0x8BB0, + 23283 - 11905: 0x8BB1, + 23284 - 11905: 0x8BB2, + 23285 - 11905: 0x8BB3, + 23286 - 11905: 0x8BB4, + 23287 - 11905: 0x8BB5, + 23288 - 11905: 0x8BB6, + 23289 - 11905: 0x8BB7, + 23290 - 11905: 0x8BB8, + 23291 - 11905: 0x8BB9, + 23292 - 11905: 0x8BBA, + 23293 - 11905: 0x8BBB, + 23294 - 11905: 0x8BBC, + 23295 - 11905: 0x8BBD, + 23296 - 11905: 0x8BBE, + 23297 - 11905: 0x8BBF, + 23298 - 11905: 0x8BC0, + 23299 - 11905: 0x8BC1, + 23300 - 11905: 0x8BC2, + 23301 - 11905: 0x8BC3, + 23302 - 11905: 0x8BC4, + 23303 - 11905: 0x8BC5, + 23304 - 11905: 0x8BC6, + 23305 - 11905: 0xE6D2, + 23306 - 11905: 0x8BC7, + 23307 - 11905: 0x8BC8, + 23308 - 11905: 0x8BC9, + 23309 - 11905: 0x8BCA, + 23310 - 11905: 0x8BCB, + 23311 - 11905: 0x8BCC, + 23312 - 11905: 0x8BCD, + 23313 - 11905: 0x8BCE, + 23314 - 11905: 0x8BCF, + 23315 - 11905: 0x8BD0, + 23316 - 11905: 0x8BD1, + 23317 - 11905: 0x8BD2, + 23318 - 11905: 0xE6D4, + 23319 - 11905: 0xE6D3, + 23320 - 11905: 0x8BD3, + 23321 - 11905: 0x8BD4, + 23322 - 11905: 0x8BD5, + 23323 - 11905: 0x8BD6, + 23324 - 11905: 0x8BD7, + 23325 - 11905: 0x8BD8, + 23326 - 11905: 0x8BD9, + 23327 - 11905: 0x8BDA, + 23328 - 11905: 0x8BDB, + 23329 - 11905: 0x8BDC, + 23330 - 11905: 0x8BDD, + 23331 - 11905: 0x8BDE, + 23332 - 11905: 0x8BDF, + 23333 - 11905: 0x8BE0, + 23334 - 11905: 0x8BE1, + 23335 - 11905: 0x8BE2, + 23336 - 11905: 0x8BE3, + 23337 - 11905: 0x8BE4, + 23338 - 11905: 0x8BE5, + 23339 - 11905: 0x8BE6, + 23340 - 11905: 0x8BE7, + 23341 - 11905: 0x8BE8, + 23342 - 11905: 0x8BE9, + 23343 - 11905: 0x8BEA, + 23344 - 11905: 0x8BEB, + 23345 - 11905: 0x8BEC, + 23346 - 11905: 0xE6D5, + 23347 - 11905: 0x8BED, + 23348 - 11905: 0xD9F8, + 23349 - 11905: 0x8BEE, + 23350 - 11905: 0x8BEF, + 23351 - 11905: 0xE6D6, + 23352 - 11905: 0x8BF0, + 23353 - 11905: 0x8BF1, + 23354 - 11905: 0x8BF2, + 23355 - 11905: 0x8BF3, + 23356 - 11905: 0x8BF4, + 23357 - 11905: 0x8BF5, + 23358 - 11905: 0x8BF6, + 23359 - 11905: 0x8BF7, + 23360 - 11905: 0xE6D7, + 23361 - 11905: 0x8BF8, + 23362 - 11905: 0x8BF9, + 23363 - 11905: 0x8BFA, + 23364 - 11905: 0x8BFB, + 23365 - 11905: 0x8BFC, + 23366 - 11905: 0x8BFD, + 23367 - 11905: 0x8BFE, + 23368 - 11905: 0x8C40, + 23369 - 11905: 0x8C41, + 23370 - 11905: 0x8C42, + 23371 - 11905: 0x8C43, + 23372 - 11905: 0x8C44, + 23373 - 11905: 0x8C45, + 23374 - 11905: 0x8C46, + 23375 - 11905: 0x8C47, + 23376 - 11905: 0xD7D3, + 23377 - 11905: 0xE6DD, + 23378 - 11905: 0x8C48, + 23379 - 11905: 0xE6DE, + 23380 - 11905: 0xBFD7, + 23381 - 11905: 0xD4D0, + 23382 - 11905: 0x8C49, + 23383 - 11905: 0xD7D6, + 23384 - 11905: 0xB4E6, + 23385 - 11905: 0xCBEF, + 23386 - 11905: 0xE6DA, + 23387 - 11905: 0xD8C3, + 23388 - 11905: 0xD7CE, + 23389 - 11905: 0xD0A2, + 23390 - 11905: 0x8C4A, + 23391 - 11905: 0xC3CF, + 23392 - 11905: 0x8C4B, + 23393 - 11905: 0x8C4C, + 23394 - 11905: 0xE6DF, + 23395 - 11905: 0xBCBE, + 23396 - 11905: 0xB9C2, + 23397 - 11905: 0xE6DB, + 23398 - 11905: 0xD1A7, + 23399 - 11905: 0x8C4D, + 23400 - 11905: 0x8C4E, + 23401 - 11905: 0xBAA2, + 23402 - 11905: 0xC2CF, + 23403 - 11905: 0x8C4F, + 23404 - 11905: 0xD8AB, + 23405 - 11905: 0x8C50, + 23406 - 11905: 0x8C51, + 23407 - 11905: 0x8C52, + 23408 - 11905: 0xCAEB, + 23409 - 11905: 0xE5EE, + 23410 - 11905: 0x8C53, + 23411 - 11905: 0xE6DC, + 23412 - 11905: 0x8C54, + 23413 - 11905: 0xB7F5, + 23414 - 11905: 0x8C55, + 23415 - 11905: 0x8C56, + 23416 - 11905: 0x8C57, + 23417 - 11905: 0x8C58, + 23418 - 11905: 0xC8E6, + 23419 - 11905: 0x8C59, + 23420 - 11905: 0x8C5A, + 23421 - 11905: 0xC4F5, + 23422 - 11905: 0x8C5B, + 23423 - 11905: 0x8C5C, + 23424 - 11905: 0xE5B2, + 23425 - 11905: 0xC4FE, + 23426 - 11905: 0x8C5D, + 23427 - 11905: 0xCBFC, + 23428 - 11905: 0xE5B3, + 23429 - 11905: 0xD5AC, + 23430 - 11905: 0x8C5E, + 23431 - 11905: 0xD3EE, + 23432 - 11905: 0xCAD8, + 23433 - 11905: 0xB0B2, + 23434 - 11905: 0x8C5F, + 23435 - 11905: 0xCBCE, + 23436 - 11905: 0xCDEA, + 23437 - 11905: 0x8C60, + 23438 - 11905: 0x8C61, + 23439 - 11905: 0xBAEA, + 23440 - 11905: 0x8C62, + 23441 - 11905: 0x8C63, + 23442 - 11905: 0x8C64, + 23443 - 11905: 0xE5B5, + 23444 - 11905: 0x8C65, + 23445 - 11905: 0xE5B4, + 23446 - 11905: 0x8C66, + 23447 - 11905: 0xD7DA, + 23448 - 11905: 0xB9D9, + 23449 - 11905: 0xD6E6, + 23450 - 11905: 0xB6A8, + 23451 - 11905: 0xCDF0, + 23452 - 11905: 0xD2CB, + 23453 - 11905: 0xB1A6, + 23454 - 11905: 0xCAB5, + 23455 - 11905: 0x8C67, + 23456 - 11905: 0xB3E8, + 23457 - 11905: 0xC9F3, + 23458 - 11905: 0xBFCD, + 23459 - 11905: 0xD0FB, + 23460 - 11905: 0xCAD2, + 23461 - 11905: 0xE5B6, + 23462 - 11905: 0xBBC2, + 23463 - 11905: 0x8C68, + 23464 - 11905: 0x8C69, + 23465 - 11905: 0x8C6A, + 23466 - 11905: 0xCFDC, + 23467 - 11905: 0xB9AC, + 23468 - 11905: 0x8C6B, + 23469 - 11905: 0x8C6C, + 23470 - 11905: 0x8C6D, + 23471 - 11905: 0x8C6E, + 23472 - 11905: 0xD4D7, + 23473 - 11905: 0x8C6F, + 23474 - 11905: 0x8C70, + 23475 - 11905: 0xBAA6, + 23476 - 11905: 0xD1E7, + 23477 - 11905: 0xCFFC, + 23478 - 11905: 0xBCD2, + 23479 - 11905: 0x8C71, + 23480 - 11905: 0xE5B7, + 23481 - 11905: 0xC8DD, + 23482 - 11905: 0x8C72, + 23483 - 11905: 0x8C73, + 23484 - 11905: 0x8C74, + 23485 - 11905: 0xBFED, + 23486 - 11905: 0xB1F6, + 23487 - 11905: 0xCBDE, + 23488 - 11905: 0x8C75, + 23489 - 11905: 0x8C76, + 23490 - 11905: 0xBCC5, + 23491 - 11905: 0x8C77, + 23492 - 11905: 0xBCC4, + 23493 - 11905: 0xD2FA, + 23494 - 11905: 0xC3DC, + 23495 - 11905: 0xBFDC, + 23496 - 11905: 0x8C78, + 23497 - 11905: 0x8C79, + 23498 - 11905: 0x8C7A, + 23499 - 11905: 0x8C7B, + 23500 - 11905: 0xB8BB, + 23501 - 11905: 0x8C7C, + 23502 - 11905: 0x8C7D, + 23503 - 11905: 0x8C7E, + 23504 - 11905: 0xC3C2, + 23505 - 11905: 0x8C80, + 23506 - 11905: 0xBAAE, + 23507 - 11905: 0xD4A2, + 23508 - 11905: 0x8C81, + 23509 - 11905: 0x8C82, + 23510 - 11905: 0x8C83, + 23511 - 11905: 0x8C84, + 23512 - 11905: 0x8C85, + 23513 - 11905: 0x8C86, + 23514 - 11905: 0x8C87, + 23515 - 11905: 0x8C88, + 23516 - 11905: 0x8C89, + 23517 - 11905: 0xC7DE, + 23518 - 11905: 0xC4AF, + 23519 - 11905: 0xB2EC, + 23520 - 11905: 0x8C8A, + 23521 - 11905: 0xB9D1, + 23522 - 11905: 0x8C8B, + 23523 - 11905: 0x8C8C, + 23524 - 11905: 0xE5BB, + 23525 - 11905: 0xC1C8, + 23526 - 11905: 0x8C8D, + 23527 - 11905: 0x8C8E, + 23528 - 11905: 0xD5AF, + 23529 - 11905: 0x8C8F, + 23530 - 11905: 0x8C90, + 23531 - 11905: 0x8C91, + 23532 - 11905: 0x8C92, + 23533 - 11905: 0x8C93, + 23534 - 11905: 0xE5BC, + 23535 - 11905: 0x8C94, + 23536 - 11905: 0xE5BE, + 23537 - 11905: 0x8C95, + 23538 - 11905: 0x8C96, + 23539 - 11905: 0x8C97, + 23540 - 11905: 0x8C98, + 23541 - 11905: 0x8C99, + 23542 - 11905: 0x8C9A, + 23543 - 11905: 0x8C9B, + 23544 - 11905: 0xB4E7, + 23545 - 11905: 0xB6D4, + 23546 - 11905: 0xCBC2, + 23547 - 11905: 0xD1B0, + 23548 - 11905: 0xB5BC, + 23549 - 11905: 0x8C9C, + 23550 - 11905: 0x8C9D, + 23551 - 11905: 0xCAD9, + 23552 - 11905: 0x8C9E, + 23553 - 11905: 0xB7E2, + 23554 - 11905: 0x8C9F, + 23555 - 11905: 0x8CA0, + 23556 - 11905: 0xC9E4, + 23557 - 11905: 0x8CA1, + 23558 - 11905: 0xBDAB, + 23559 - 11905: 0x8CA2, + 23560 - 11905: 0x8CA3, + 23561 - 11905: 0xCEBE, + 23562 - 11905: 0xD7F0, + 23563 - 11905: 0x8CA4, + 23564 - 11905: 0x8CA5, + 23565 - 11905: 0x8CA6, + 23566 - 11905: 0x8CA7, + 23567 - 11905: 0xD0A1, + 23568 - 11905: 0x8CA8, + 23569 - 11905: 0xC9D9, + 23570 - 11905: 0x8CA9, + 23571 - 11905: 0x8CAA, + 23572 - 11905: 0xB6FB, + 23573 - 11905: 0xE6D8, + 23574 - 11905: 0xBCE2, + 23575 - 11905: 0x8CAB, + 23576 - 11905: 0xB3BE, + 23577 - 11905: 0x8CAC, + 23578 - 11905: 0xC9D0, + 23579 - 11905: 0x8CAD, + 23580 - 11905: 0xE6D9, + 23581 - 11905: 0xB3A2, + 23582 - 11905: 0x8CAE, + 23583 - 11905: 0x8CAF, + 23584 - 11905: 0x8CB0, + 23585 - 11905: 0x8CB1, + 23586 - 11905: 0xDECC, + 23587 - 11905: 0x8CB2, + 23588 - 11905: 0xD3C8, + 23589 - 11905: 0xDECD, + 23590 - 11905: 0x8CB3, + 23591 - 11905: 0xD2A2, + 23592 - 11905: 0x8CB4, + 23593 - 11905: 0x8CB5, + 23594 - 11905: 0x8CB6, + 23595 - 11905: 0x8CB7, + 23596 - 11905: 0xDECE, + 23597 - 11905: 0x8CB8, + 23598 - 11905: 0x8CB9, + 23599 - 11905: 0x8CBA, + 23600 - 11905: 0x8CBB, + 23601 - 11905: 0xBECD, + 23602 - 11905: 0x8CBC, + 23603 - 11905: 0x8CBD, + 23604 - 11905: 0xDECF, + 23605 - 11905: 0x8CBE, + 23606 - 11905: 0x8CBF, + 23607 - 11905: 0x8CC0, + 23608 - 11905: 0xCAAC, + 23609 - 11905: 0xD2FC, + 23610 - 11905: 0xB3DF, + 23611 - 11905: 0xE5EA, + 23612 - 11905: 0xC4E1, + 23613 - 11905: 0xBEA1, + 23614 - 11905: 0xCEB2, + 23615 - 11905: 0xC4F2, + 23616 - 11905: 0xBED6, + 23617 - 11905: 0xC6A8, + 23618 - 11905: 0xB2E3, + 23619 - 11905: 0x8CC1, + 23620 - 11905: 0x8CC2, + 23621 - 11905: 0xBED3, + 23622 - 11905: 0x8CC3, + 23623 - 11905: 0x8CC4, + 23624 - 11905: 0xC7FC, + 23625 - 11905: 0xCCEB, + 23626 - 11905: 0xBDEC, + 23627 - 11905: 0xCEDD, + 23628 - 11905: 0x8CC5, + 23629 - 11905: 0x8CC6, + 23630 - 11905: 0xCABA, + 23631 - 11905: 0xC6C1, + 23632 - 11905: 0xE5EC, + 23633 - 11905: 0xD0BC, + 23634 - 11905: 0x8CC7, + 23635 - 11905: 0x8CC8, + 23636 - 11905: 0x8CC9, + 23637 - 11905: 0xD5B9, + 23638 - 11905: 0x8CCA, + 23639 - 11905: 0x8CCB, + 23640 - 11905: 0x8CCC, + 23641 - 11905: 0xE5ED, + 23642 - 11905: 0x8CCD, + 23643 - 11905: 0x8CCE, + 23644 - 11905: 0x8CCF, + 23645 - 11905: 0x8CD0, + 23646 - 11905: 0xCAF4, + 23647 - 11905: 0x8CD1, + 23648 - 11905: 0xCDC0, + 23649 - 11905: 0xC2C5, + 23650 - 11905: 0x8CD2, + 23651 - 11905: 0xE5EF, + 23652 - 11905: 0x8CD3, + 23653 - 11905: 0xC2C4, + 23654 - 11905: 0xE5F0, + 23655 - 11905: 0x8CD4, + 23656 - 11905: 0x8CD5, + 23657 - 11905: 0x8CD6, + 23658 - 11905: 0x8CD7, + 23659 - 11905: 0x8CD8, + 23660 - 11905: 0x8CD9, + 23661 - 11905: 0x8CDA, + 23662 - 11905: 0xE5F8, + 23663 - 11905: 0xCDCD, + 23664 - 11905: 0x8CDB, + 23665 - 11905: 0xC9BD, + 23666 - 11905: 0x8CDC, + 23667 - 11905: 0x8CDD, + 23668 - 11905: 0x8CDE, + 23669 - 11905: 0x8CDF, + 23670 - 11905: 0x8CE0, + 23671 - 11905: 0x8CE1, + 23672 - 11905: 0x8CE2, + 23673 - 11905: 0xD2D9, + 23674 - 11905: 0xE1A8, + 23675 - 11905: 0x8CE3, + 23676 - 11905: 0x8CE4, + 23677 - 11905: 0x8CE5, + 23678 - 11905: 0x8CE6, + 23679 - 11905: 0xD3EC, + 23680 - 11905: 0x8CE7, + 23681 - 11905: 0xCBEA, + 23682 - 11905: 0xC6F1, + 23683 - 11905: 0x8CE8, + 23684 - 11905: 0x8CE9, + 23685 - 11905: 0x8CEA, + 23686 - 11905: 0x8CEB, + 23687 - 11905: 0x8CEC, + 23688 - 11905: 0xE1AC, + 23689 - 11905: 0x8CED, + 23690 - 11905: 0x8CEE, + 23691 - 11905: 0x8CEF, + 23692 - 11905: 0xE1A7, + 23693 - 11905: 0xE1A9, + 23694 - 11905: 0x8CF0, + 23695 - 11905: 0x8CF1, + 23696 - 11905: 0xE1AA, + 23697 - 11905: 0xE1AF, + 23698 - 11905: 0x8CF2, + 23699 - 11905: 0x8CF3, + 23700 - 11905: 0xB2ED, + 23701 - 11905: 0x8CF4, + 23702 - 11905: 0xE1AB, + 23703 - 11905: 0xB8DA, + 23704 - 11905: 0xE1AD, + 23705 - 11905: 0xE1AE, + 23706 - 11905: 0xE1B0, + 23707 - 11905: 0xB5BA, + 23708 - 11905: 0xE1B1, + 23709 - 11905: 0x8CF5, + 23710 - 11905: 0x8CF6, + 23711 - 11905: 0x8CF7, + 23712 - 11905: 0x8CF8, + 23713 - 11905: 0x8CF9, + 23714 - 11905: 0xE1B3, + 23715 - 11905: 0xE1B8, + 23716 - 11905: 0x8CFA, + 23717 - 11905: 0x8CFB, + 23718 - 11905: 0x8CFC, + 23719 - 11905: 0x8CFD, + 23720 - 11905: 0x8CFE, + 23721 - 11905: 0xD1D2, + 23722 - 11905: 0x8D40, + 23723 - 11905: 0xE1B6, + 23724 - 11905: 0xE1B5, + 23725 - 11905: 0xC1EB, + 23726 - 11905: 0x8D41, + 23727 - 11905: 0x8D42, + 23728 - 11905: 0x8D43, + 23729 - 11905: 0xE1B7, + 23730 - 11905: 0x8D44, + 23731 - 11905: 0xD4C0, + 23732 - 11905: 0x8D45, + 23733 - 11905: 0xE1B2, + 23734 - 11905: 0x8D46, + 23735 - 11905: 0xE1BA, + 23736 - 11905: 0xB0B6, + 23737 - 11905: 0x8D47, + 23738 - 11905: 0x8D48, + 23739 - 11905: 0x8D49, + 23740 - 11905: 0x8D4A, + 23741 - 11905: 0xE1B4, + 23742 - 11905: 0x8D4B, + 23743 - 11905: 0xBFF9, + 23744 - 11905: 0x8D4C, + 23745 - 11905: 0xE1B9, + 23746 - 11905: 0x8D4D, + 23747 - 11905: 0x8D4E, + 23748 - 11905: 0xE1BB, + 23749 - 11905: 0x8D4F, + 23750 - 11905: 0x8D50, + 23751 - 11905: 0x8D51, + 23752 - 11905: 0x8D52, + 23753 - 11905: 0x8D53, + 23754 - 11905: 0x8D54, + 23755 - 11905: 0xE1BE, + 23756 - 11905: 0x8D55, + 23757 - 11905: 0x8D56, + 23758 - 11905: 0x8D57, + 23759 - 11905: 0x8D58, + 23760 - 11905: 0x8D59, + 23761 - 11905: 0x8D5A, + 23762 - 11905: 0xE1BC, + 23763 - 11905: 0x8D5B, + 23764 - 11905: 0x8D5C, + 23765 - 11905: 0x8D5D, + 23766 - 11905: 0x8D5E, + 23767 - 11905: 0x8D5F, + 23768 - 11905: 0x8D60, + 23769 - 11905: 0xD6C5, + 23770 - 11905: 0x8D61, + 23771 - 11905: 0x8D62, + 23772 - 11905: 0x8D63, + 23773 - 11905: 0x8D64, + 23774 - 11905: 0x8D65, + 23775 - 11905: 0x8D66, + 23776 - 11905: 0x8D67, + 23777 - 11905: 0xCFBF, + 23778 - 11905: 0x8D68, + 23779 - 11905: 0x8D69, + 23780 - 11905: 0xE1BD, + 23781 - 11905: 0xE1BF, + 23782 - 11905: 0xC2CD, + 23783 - 11905: 0x8D6A, + 23784 - 11905: 0xB6EB, + 23785 - 11905: 0x8D6B, + 23786 - 11905: 0xD3F8, + 23787 - 11905: 0x8D6C, + 23788 - 11905: 0x8D6D, + 23789 - 11905: 0xC7CD, + 23790 - 11905: 0x8D6E, + 23791 - 11905: 0x8D6F, + 23792 - 11905: 0xB7E5, + 23793 - 11905: 0x8D70, + 23794 - 11905: 0x8D71, + 23795 - 11905: 0x8D72, + 23796 - 11905: 0x8D73, + 23797 - 11905: 0x8D74, + 23798 - 11905: 0x8D75, + 23799 - 11905: 0x8D76, + 23800 - 11905: 0x8D77, + 23801 - 11905: 0x8D78, + 23802 - 11905: 0x8D79, + 23803 - 11905: 0xBEFE, + 23804 - 11905: 0x8D7A, + 23805 - 11905: 0x8D7B, + 23806 - 11905: 0x8D7C, + 23807 - 11905: 0x8D7D, + 23808 - 11905: 0x8D7E, + 23809 - 11905: 0x8D80, + 23810 - 11905: 0xE1C0, + 23811 - 11905: 0xE1C1, + 23812 - 11905: 0x8D81, + 23813 - 11905: 0x8D82, + 23814 - 11905: 0xE1C7, + 23815 - 11905: 0xB3E7, + 23816 - 11905: 0x8D83, + 23817 - 11905: 0x8D84, + 23818 - 11905: 0x8D85, + 23819 - 11905: 0x8D86, + 23820 - 11905: 0x8D87, + 23821 - 11905: 0x8D88, + 23822 - 11905: 0xC6E9, + 23823 - 11905: 0x8D89, + 23824 - 11905: 0x8D8A, + 23825 - 11905: 0x8D8B, + 23826 - 11905: 0x8D8C, + 23827 - 11905: 0x8D8D, + 23828 - 11905: 0xB4DE, + 23829 - 11905: 0x8D8E, + 23830 - 11905: 0xD1C2, + 23831 - 11905: 0x8D8F, + 23832 - 11905: 0x8D90, + 23833 - 11905: 0x8D91, + 23834 - 11905: 0x8D92, + 23835 - 11905: 0xE1C8, + 23836 - 11905: 0x8D93, + 23837 - 11905: 0x8D94, + 23838 - 11905: 0xE1C6, + 23839 - 11905: 0x8D95, + 23840 - 11905: 0x8D96, + 23841 - 11905: 0x8D97, + 23842 - 11905: 0x8D98, + 23843 - 11905: 0x8D99, + 23844 - 11905: 0xE1C5, + 23845 - 11905: 0x8D9A, + 23846 - 11905: 0xE1C3, + 23847 - 11905: 0xE1C2, + 23848 - 11905: 0x8D9B, + 23849 - 11905: 0xB1C0, + 23850 - 11905: 0x8D9C, + 23851 - 11905: 0x8D9D, + 23852 - 11905: 0x8D9E, + 23853 - 11905: 0xD5B8, + 23854 - 11905: 0xE1C4, + 23855 - 11905: 0x8D9F, + 23856 - 11905: 0x8DA0, + 23857 - 11905: 0x8DA1, + 23858 - 11905: 0x8DA2, + 23859 - 11905: 0x8DA3, + 23860 - 11905: 0xE1CB, + 23861 - 11905: 0x8DA4, + 23862 - 11905: 0x8DA5, + 23863 - 11905: 0x8DA6, + 23864 - 11905: 0x8DA7, + 23865 - 11905: 0x8DA8, + 23866 - 11905: 0x8DA9, + 23867 - 11905: 0x8DAA, + 23868 - 11905: 0x8DAB, + 23869 - 11905: 0xE1CC, + 23870 - 11905: 0xE1CA, + 23871 - 11905: 0x8DAC, + 23872 - 11905: 0x8DAD, + 23873 - 11905: 0x8DAE, + 23874 - 11905: 0x8DAF, + 23875 - 11905: 0x8DB0, + 23876 - 11905: 0x8DB1, + 23877 - 11905: 0x8DB2, + 23878 - 11905: 0x8DB3, + 23879 - 11905: 0xEFFA, + 23880 - 11905: 0x8DB4, + 23881 - 11905: 0x8DB5, + 23882 - 11905: 0xE1D3, + 23883 - 11905: 0xE1D2, + 23884 - 11905: 0xC7B6, + 23885 - 11905: 0x8DB6, + 23886 - 11905: 0x8DB7, + 23887 - 11905: 0x8DB8, + 23888 - 11905: 0x8DB9, + 23889 - 11905: 0x8DBA, + 23890 - 11905: 0x8DBB, + 23891 - 11905: 0x8DBC, + 23892 - 11905: 0x8DBD, + 23893 - 11905: 0x8DBE, + 23894 - 11905: 0x8DBF, + 23895 - 11905: 0x8DC0, + 23896 - 11905: 0xE1C9, + 23897 - 11905: 0x8DC1, + 23898 - 11905: 0x8DC2, + 23899 - 11905: 0xE1CE, + 23900 - 11905: 0x8DC3, + 23901 - 11905: 0xE1D0, + 23902 - 11905: 0x8DC4, + 23903 - 11905: 0x8DC5, + 23904 - 11905: 0x8DC6, + 23905 - 11905: 0x8DC7, + 23906 - 11905: 0x8DC8, + 23907 - 11905: 0x8DC9, + 23908 - 11905: 0x8DCA, + 23909 - 11905: 0x8DCB, + 23910 - 11905: 0x8DCC, + 23911 - 11905: 0x8DCD, + 23912 - 11905: 0x8DCE, + 23913 - 11905: 0xE1D4, + 23914 - 11905: 0x8DCF, + 23915 - 11905: 0xE1D1, + 23916 - 11905: 0xE1CD, + 23917 - 11905: 0x8DD0, + 23918 - 11905: 0x8DD1, + 23919 - 11905: 0xE1CF, + 23920 - 11905: 0x8DD2, + 23921 - 11905: 0x8DD3, + 23922 - 11905: 0x8DD4, + 23923 - 11905: 0x8DD5, + 23924 - 11905: 0xE1D5, + 23925 - 11905: 0x8DD6, + 23926 - 11905: 0x8DD7, + 23927 - 11905: 0x8DD8, + 23928 - 11905: 0x8DD9, + 23929 - 11905: 0x8DDA, + 23930 - 11905: 0x8DDB, + 23931 - 11905: 0x8DDC, + 23932 - 11905: 0x8DDD, + 23933 - 11905: 0x8DDE, + 23934 - 11905: 0x8DDF, + 23935 - 11905: 0x8DE0, + 23936 - 11905: 0x8DE1, + 23937 - 11905: 0x8DE2, + 23938 - 11905: 0xE1D6, + 23939 - 11905: 0x8DE3, + 23940 - 11905: 0x8DE4, + 23941 - 11905: 0x8DE5, + 23942 - 11905: 0x8DE6, + 23943 - 11905: 0x8DE7, + 23944 - 11905: 0x8DE8, + 23945 - 11905: 0x8DE9, + 23946 - 11905: 0x8DEA, + 23947 - 11905: 0x8DEB, + 23948 - 11905: 0x8DEC, + 23949 - 11905: 0x8DED, + 23950 - 11905: 0x8DEE, + 23951 - 11905: 0x8DEF, + 23952 - 11905: 0x8DF0, + 23953 - 11905: 0x8DF1, + 23954 - 11905: 0x8DF2, + 23955 - 11905: 0x8DF3, + 23956 - 11905: 0x8DF4, + 23957 - 11905: 0x8DF5, + 23958 - 11905: 0x8DF6, + 23959 - 11905: 0x8DF7, + 23960 - 11905: 0x8DF8, + 23961 - 11905: 0xE1D7, + 23962 - 11905: 0x8DF9, + 23963 - 11905: 0x8DFA, + 23964 - 11905: 0x8DFB, + 23965 - 11905: 0xE1D8, + 23966 - 11905: 0x8DFC, + 23967 - 11905: 0x8DFD, + 23968 - 11905: 0x8DFE, + 23969 - 11905: 0x8E40, + 23970 - 11905: 0x8E41, + 23971 - 11905: 0x8E42, + 23972 - 11905: 0x8E43, + 23973 - 11905: 0x8E44, + 23974 - 11905: 0x8E45, + 23975 - 11905: 0x8E46, + 23976 - 11905: 0x8E47, + 23977 - 11905: 0x8E48, + 23978 - 11905: 0x8E49, + 23979 - 11905: 0x8E4A, + 23980 - 11905: 0x8E4B, + 23981 - 11905: 0x8E4C, + 23982 - 11905: 0x8E4D, + 23983 - 11905: 0x8E4E, + 23984 - 11905: 0x8E4F, + 23985 - 11905: 0x8E50, + 23986 - 11905: 0x8E51, + 23987 - 11905: 0x8E52, + 23988 - 11905: 0x8E53, + 23989 - 11905: 0x8E54, + 23990 - 11905: 0x8E55, + 23991 - 11905: 0xE1DA, + 23992 - 11905: 0x8E56, + 23993 - 11905: 0x8E57, + 23994 - 11905: 0x8E58, + 23995 - 11905: 0x8E59, + 23996 - 11905: 0x8E5A, + 23997 - 11905: 0x8E5B, + 23998 - 11905: 0x8E5C, + 23999 - 11905: 0x8E5D, + 24000 - 11905: 0x8E5E, + 24001 - 11905: 0x8E5F, + 24002 - 11905: 0x8E60, + 24003 - 11905: 0x8E61, + 24004 - 11905: 0x8E62, + 24005 - 11905: 0xE1DB, + 24006 - 11905: 0x8E63, + 24007 - 11905: 0x8E64, + 24008 - 11905: 0x8E65, + 24009 - 11905: 0x8E66, + 24010 - 11905: 0x8E67, + 24011 - 11905: 0x8E68, + 24012 - 11905: 0x8E69, + 24013 - 11905: 0xCEA1, + 24014 - 11905: 0x8E6A, + 24015 - 11905: 0x8E6B, + 24016 - 11905: 0x8E6C, + 24017 - 11905: 0x8E6D, + 24018 - 11905: 0x8E6E, + 24019 - 11905: 0x8E6F, + 24020 - 11905: 0x8E70, + 24021 - 11905: 0x8E71, + 24022 - 11905: 0x8E72, + 24023 - 11905: 0x8E73, + 24024 - 11905: 0x8E74, + 24025 - 11905: 0x8E75, + 24026 - 11905: 0x8E76, + 24027 - 11905: 0xE7DD, + 24028 - 11905: 0x8E77, + 24029 - 11905: 0xB4A8, + 24030 - 11905: 0xD6DD, + 24031 - 11905: 0x8E78, + 24032 - 11905: 0x8E79, + 24033 - 11905: 0xD1B2, + 24034 - 11905: 0xB3B2, + 24035 - 11905: 0x8E7A, + 24036 - 11905: 0x8E7B, + 24037 - 11905: 0xB9A4, + 24038 - 11905: 0xD7F3, + 24039 - 11905: 0xC7C9, + 24040 - 11905: 0xBEDE, + 24041 - 11905: 0xB9AE, + 24042 - 11905: 0x8E7C, + 24043 - 11905: 0xCED7, + 24044 - 11905: 0x8E7D, + 24045 - 11905: 0x8E7E, + 24046 - 11905: 0xB2EE, + 24047 - 11905: 0xDBCF, + 24048 - 11905: 0x8E80, + 24049 - 11905: 0xBCBA, + 24050 - 11905: 0xD2D1, + 24051 - 11905: 0xCBC8, + 24052 - 11905: 0xB0CD, + 24053 - 11905: 0x8E81, + 24054 - 11905: 0x8E82, + 24055 - 11905: 0xCFEF, + 24056 - 11905: 0x8E83, + 24057 - 11905: 0x8E84, + 24058 - 11905: 0x8E85, + 24059 - 11905: 0x8E86, + 24060 - 11905: 0x8E87, + 24061 - 11905: 0xD9E3, + 24062 - 11905: 0xBDED, + 24063 - 11905: 0x8E88, + 24064 - 11905: 0x8E89, + 24065 - 11905: 0xB1D2, + 24066 - 11905: 0xCAD0, + 24067 - 11905: 0xB2BC, + 24068 - 11905: 0x8E8A, + 24069 - 11905: 0xCBA7, + 24070 - 11905: 0xB7AB, + 24071 - 11905: 0x8E8B, + 24072 - 11905: 0xCAA6, + 24073 - 11905: 0x8E8C, + 24074 - 11905: 0x8E8D, + 24075 - 11905: 0x8E8E, + 24076 - 11905: 0xCFA3, + 24077 - 11905: 0x8E8F, + 24078 - 11905: 0x8E90, + 24079 - 11905: 0xE0F8, + 24080 - 11905: 0xD5CA, + 24081 - 11905: 0xE0FB, + 24082 - 11905: 0x8E91, + 24083 - 11905: 0x8E92, + 24084 - 11905: 0xE0FA, + 24085 - 11905: 0xC5C1, + 24086 - 11905: 0xCCFB, + 24087 - 11905: 0x8E93, + 24088 - 11905: 0xC1B1, + 24089 - 11905: 0xE0F9, + 24090 - 11905: 0xD6E3, + 24091 - 11905: 0xB2AF, + 24092 - 11905: 0xD6C4, + 24093 - 11905: 0xB5DB, + 24094 - 11905: 0x8E94, + 24095 - 11905: 0x8E95, + 24096 - 11905: 0x8E96, + 24097 - 11905: 0x8E97, + 24098 - 11905: 0x8E98, + 24099 - 11905: 0x8E99, + 24100 - 11905: 0x8E9A, + 24101 - 11905: 0x8E9B, + 24102 - 11905: 0xB4F8, + 24103 - 11905: 0xD6A1, + 24104 - 11905: 0x8E9C, + 24105 - 11905: 0x8E9D, + 24106 - 11905: 0x8E9E, + 24107 - 11905: 0x8E9F, + 24108 - 11905: 0x8EA0, + 24109 - 11905: 0xCFAF, + 24110 - 11905: 0xB0EF, + 24111 - 11905: 0x8EA1, + 24112 - 11905: 0x8EA2, + 24113 - 11905: 0xE0FC, + 24114 - 11905: 0x8EA3, + 24115 - 11905: 0x8EA4, + 24116 - 11905: 0x8EA5, + 24117 - 11905: 0x8EA6, + 24118 - 11905: 0x8EA7, + 24119 - 11905: 0xE1A1, + 24120 - 11905: 0xB3A3, + 24121 - 11905: 0x8EA8, + 24122 - 11905: 0x8EA9, + 24123 - 11905: 0xE0FD, + 24124 - 11905: 0xE0FE, + 24125 - 11905: 0xC3B1, + 24126 - 11905: 0x8EAA, + 24127 - 11905: 0x8EAB, + 24128 - 11905: 0x8EAC, + 24129 - 11905: 0x8EAD, + 24130 - 11905: 0xC3DD, + 24131 - 11905: 0x8EAE, + 24132 - 11905: 0xE1A2, + 24133 - 11905: 0xB7F9, + 24134 - 11905: 0x8EAF, + 24135 - 11905: 0x8EB0, + 24136 - 11905: 0x8EB1, + 24137 - 11905: 0x8EB2, + 24138 - 11905: 0x8EB3, + 24139 - 11905: 0x8EB4, + 24140 - 11905: 0xBBCF, + 24141 - 11905: 0x8EB5, + 24142 - 11905: 0x8EB6, + 24143 - 11905: 0x8EB7, + 24144 - 11905: 0x8EB8, + 24145 - 11905: 0x8EB9, + 24146 - 11905: 0x8EBA, + 24147 - 11905: 0x8EBB, + 24148 - 11905: 0xE1A3, + 24149 - 11905: 0xC4BB, + 24150 - 11905: 0x8EBC, + 24151 - 11905: 0x8EBD, + 24152 - 11905: 0x8EBE, + 24153 - 11905: 0x8EBF, + 24154 - 11905: 0x8EC0, + 24155 - 11905: 0xE1A4, + 24156 - 11905: 0x8EC1, + 24157 - 11905: 0x8EC2, + 24158 - 11905: 0xE1A5, + 24159 - 11905: 0x8EC3, + 24160 - 11905: 0x8EC4, + 24161 - 11905: 0xE1A6, + 24162 - 11905: 0xB4B1, + 24163 - 11905: 0x8EC5, + 24164 - 11905: 0x8EC6, + 24165 - 11905: 0x8EC7, + 24166 - 11905: 0x8EC8, + 24167 - 11905: 0x8EC9, + 24168 - 11905: 0x8ECA, + 24169 - 11905: 0x8ECB, + 24170 - 11905: 0x8ECC, + 24171 - 11905: 0x8ECD, + 24172 - 11905: 0x8ECE, + 24173 - 11905: 0x8ECF, + 24174 - 11905: 0x8ED0, + 24175 - 11905: 0x8ED1, + 24176 - 11905: 0x8ED2, + 24177 - 11905: 0x8ED3, + 24178 - 11905: 0xB8C9, + 24179 - 11905: 0xC6BD, + 24180 - 11905: 0xC4EA, + 24181 - 11905: 0x8ED4, + 24182 - 11905: 0xB2A2, + 24183 - 11905: 0x8ED5, + 24184 - 11905: 0xD0D2, + 24185 - 11905: 0x8ED6, + 24186 - 11905: 0xE7DB, + 24187 - 11905: 0xBBC3, + 24188 - 11905: 0xD3D7, + 24189 - 11905: 0xD3C4, + 24190 - 11905: 0x8ED7, + 24191 - 11905: 0xB9E3, + 24192 - 11905: 0xE2CF, + 24193 - 11905: 0x8ED8, + 24194 - 11905: 0x8ED9, + 24195 - 11905: 0x8EDA, + 24196 - 11905: 0xD7AF, + 24197 - 11905: 0x8EDB, + 24198 - 11905: 0xC7EC, + 24199 - 11905: 0xB1D3, + 24200 - 11905: 0x8EDC, + 24201 - 11905: 0x8EDD, + 24202 - 11905: 0xB4B2, + 24203 - 11905: 0xE2D1, + 24204 - 11905: 0x8EDE, + 24205 - 11905: 0x8EDF, + 24206 - 11905: 0x8EE0, + 24207 - 11905: 0xD0F2, + 24208 - 11905: 0xC2AE, + 24209 - 11905: 0xE2D0, + 24210 - 11905: 0x8EE1, + 24211 - 11905: 0xBFE2, + 24212 - 11905: 0xD3A6, + 24213 - 11905: 0xB5D7, + 24214 - 11905: 0xE2D2, + 24215 - 11905: 0xB5EA, + 24216 - 11905: 0x8EE2, + 24217 - 11905: 0xC3ED, + 24218 - 11905: 0xB8FD, + 24219 - 11905: 0x8EE3, + 24220 - 11905: 0xB8AE, + 24221 - 11905: 0x8EE4, + 24222 - 11905: 0xC5D3, + 24223 - 11905: 0xB7CF, + 24224 - 11905: 0xE2D4, + 24225 - 11905: 0x8EE5, + 24226 - 11905: 0x8EE6, + 24227 - 11905: 0x8EE7, + 24228 - 11905: 0x8EE8, + 24229 - 11905: 0xE2D3, + 24230 - 11905: 0xB6C8, + 24231 - 11905: 0xD7F9, + 24232 - 11905: 0x8EE9, + 24233 - 11905: 0x8EEA, + 24234 - 11905: 0x8EEB, + 24235 - 11905: 0x8EEC, + 24236 - 11905: 0x8EED, + 24237 - 11905: 0xCDA5, + 24238 - 11905: 0x8EEE, + 24239 - 11905: 0x8EEF, + 24240 - 11905: 0x8EF0, + 24241 - 11905: 0x8EF1, + 24242 - 11905: 0x8EF2, + 24243 - 11905: 0xE2D8, + 24244 - 11905: 0x8EF3, + 24245 - 11905: 0xE2D6, + 24246 - 11905: 0xCAFC, + 24247 - 11905: 0xBFB5, + 24248 - 11905: 0xD3B9, + 24249 - 11905: 0xE2D5, + 24250 - 11905: 0x8EF4, + 24251 - 11905: 0x8EF5, + 24252 - 11905: 0x8EF6, + 24253 - 11905: 0x8EF7, + 24254 - 11905: 0xE2D7, + 24255 - 11905: 0x8EF8, + 24256 - 11905: 0x8EF9, + 24257 - 11905: 0x8EFA, + 24258 - 11905: 0x8EFB, + 24259 - 11905: 0x8EFC, + 24260 - 11905: 0x8EFD, + 24261 - 11905: 0x8EFE, + 24262 - 11905: 0x8F40, + 24263 - 11905: 0x8F41, + 24264 - 11905: 0x8F42, + 24265 - 11905: 0xC1AE, + 24266 - 11905: 0xC0C8, + 24267 - 11905: 0x8F43, + 24268 - 11905: 0x8F44, + 24269 - 11905: 0x8F45, + 24270 - 11905: 0x8F46, + 24271 - 11905: 0x8F47, + 24272 - 11905: 0x8F48, + 24273 - 11905: 0xE2DB, + 24274 - 11905: 0xE2DA, + 24275 - 11905: 0xC0AA, + 24276 - 11905: 0x8F49, + 24277 - 11905: 0x8F4A, + 24278 - 11905: 0xC1CE, + 24279 - 11905: 0x8F4B, + 24280 - 11905: 0x8F4C, + 24281 - 11905: 0x8F4D, + 24282 - 11905: 0x8F4E, + 24283 - 11905: 0xE2DC, + 24284 - 11905: 0x8F4F, + 24285 - 11905: 0x8F50, + 24286 - 11905: 0x8F51, + 24287 - 11905: 0x8F52, + 24288 - 11905: 0x8F53, + 24289 - 11905: 0x8F54, + 24290 - 11905: 0x8F55, + 24291 - 11905: 0x8F56, + 24292 - 11905: 0x8F57, + 24293 - 11905: 0x8F58, + 24294 - 11905: 0x8F59, + 24295 - 11905: 0x8F5A, + 24296 - 11905: 0xE2DD, + 24297 - 11905: 0x8F5B, + 24298 - 11905: 0xE2DE, + 24299 - 11905: 0x8F5C, + 24300 - 11905: 0x8F5D, + 24301 - 11905: 0x8F5E, + 24302 - 11905: 0x8F5F, + 24303 - 11905: 0x8F60, + 24304 - 11905: 0x8F61, + 24305 - 11905: 0x8F62, + 24306 - 11905: 0x8F63, + 24307 - 11905: 0x8F64, + 24308 - 11905: 0xDBC8, + 24309 - 11905: 0x8F65, + 24310 - 11905: 0xD1D3, + 24311 - 11905: 0xCDA2, + 24312 - 11905: 0x8F66, + 24313 - 11905: 0x8F67, + 24314 - 11905: 0xBDA8, + 24315 - 11905: 0x8F68, + 24316 - 11905: 0x8F69, + 24317 - 11905: 0x8F6A, + 24318 - 11905: 0xDEC3, + 24319 - 11905: 0xD8A5, + 24320 - 11905: 0xBFAA, + 24321 - 11905: 0xDBCD, + 24322 - 11905: 0xD2EC, + 24323 - 11905: 0xC6FA, + 24324 - 11905: 0xC5AA, + 24325 - 11905: 0x8F6B, + 24326 - 11905: 0x8F6C, + 24327 - 11905: 0x8F6D, + 24328 - 11905: 0xDEC4, + 24329 - 11905: 0x8F6E, + 24330 - 11905: 0xB1D7, + 24331 - 11905: 0xDFAE, + 24332 - 11905: 0x8F6F, + 24333 - 11905: 0x8F70, + 24334 - 11905: 0x8F71, + 24335 - 11905: 0xCABD, + 24336 - 11905: 0x8F72, + 24337 - 11905: 0xDFB1, + 24338 - 11905: 0x8F73, + 24339 - 11905: 0xB9AD, + 24340 - 11905: 0x8F74, + 24341 - 11905: 0xD2FD, + 24342 - 11905: 0x8F75, + 24343 - 11905: 0xB8A5, + 24344 - 11905: 0xBAEB, + 24345 - 11905: 0x8F76, + 24346 - 11905: 0x8F77, + 24347 - 11905: 0xB3DA, + 24348 - 11905: 0x8F78, + 24349 - 11905: 0x8F79, + 24350 - 11905: 0x8F7A, + 24351 - 11905: 0xB5DC, + 24352 - 11905: 0xD5C5, + 24353 - 11905: 0x8F7B, + 24354 - 11905: 0x8F7C, + 24355 - 11905: 0x8F7D, + 24356 - 11905: 0x8F7E, + 24357 - 11905: 0xC3D6, + 24358 - 11905: 0xCFD2, + 24359 - 11905: 0xBBA1, + 24360 - 11905: 0x8F80, + 24361 - 11905: 0xE5F3, + 24362 - 11905: 0xE5F2, + 24363 - 11905: 0x8F81, + 24364 - 11905: 0x8F82, + 24365 - 11905: 0xE5F4, + 24366 - 11905: 0x8F83, + 24367 - 11905: 0xCDE4, + 24368 - 11905: 0x8F84, + 24369 - 11905: 0xC8F5, + 24370 - 11905: 0x8F85, + 24371 - 11905: 0x8F86, + 24372 - 11905: 0x8F87, + 24373 - 11905: 0x8F88, + 24374 - 11905: 0x8F89, + 24375 - 11905: 0x8F8A, + 24376 - 11905: 0x8F8B, + 24377 - 11905: 0xB5AF, + 24378 - 11905: 0xC7BF, + 24379 - 11905: 0x8F8C, + 24380 - 11905: 0xE5F6, + 24381 - 11905: 0x8F8D, + 24382 - 11905: 0x8F8E, + 24383 - 11905: 0x8F8F, + 24384 - 11905: 0xECB0, + 24385 - 11905: 0x8F90, + 24386 - 11905: 0x8F91, + 24387 - 11905: 0x8F92, + 24388 - 11905: 0x8F93, + 24389 - 11905: 0x8F94, + 24390 - 11905: 0x8F95, + 24391 - 11905: 0x8F96, + 24392 - 11905: 0x8F97, + 24393 - 11905: 0x8F98, + 24394 - 11905: 0x8F99, + 24395 - 11905: 0x8F9A, + 24396 - 11905: 0x8F9B, + 24397 - 11905: 0x8F9C, + 24398 - 11905: 0x8F9D, + 24399 - 11905: 0x8F9E, + 24400 - 11905: 0xE5E6, + 24401 - 11905: 0x8F9F, + 24402 - 11905: 0xB9E9, + 24403 - 11905: 0xB5B1, + 24404 - 11905: 0x8FA0, + 24405 - 11905: 0xC2BC, + 24406 - 11905: 0xE5E8, + 24407 - 11905: 0xE5E7, + 24408 - 11905: 0xE5E9, + 24409 - 11905: 0x8FA1, + 24410 - 11905: 0x8FA2, + 24411 - 11905: 0x8FA3, + 24412 - 11905: 0x8FA4, + 24413 - 11905: 0xD2CD, + 24414 - 11905: 0x8FA5, + 24415 - 11905: 0x8FA6, + 24416 - 11905: 0x8FA7, + 24417 - 11905: 0xE1EA, + 24418 - 11905: 0xD0CE, + 24419 - 11905: 0x8FA8, + 24420 - 11905: 0xCDAE, + 24421 - 11905: 0x8FA9, + 24422 - 11905: 0xD1E5, + 24423 - 11905: 0x8FAA, + 24424 - 11905: 0x8FAB, + 24425 - 11905: 0xB2CA, + 24426 - 11905: 0xB1EB, + 24427 - 11905: 0x8FAC, + 24428 - 11905: 0xB1F2, + 24429 - 11905: 0xC5ED, + 24430 - 11905: 0x8FAD, + 24431 - 11905: 0x8FAE, + 24432 - 11905: 0xD5C3, + 24433 - 11905: 0xD3B0, + 24434 - 11905: 0x8FAF, + 24435 - 11905: 0xE1DC, + 24436 - 11905: 0x8FB0, + 24437 - 11905: 0x8FB1, + 24438 - 11905: 0x8FB2, + 24439 - 11905: 0xE1DD, + 24440 - 11905: 0x8FB3, + 24441 - 11905: 0xD2DB, + 24442 - 11905: 0x8FB4, + 24443 - 11905: 0xB3B9, + 24444 - 11905: 0xB1CB, + 24445 - 11905: 0x8FB5, + 24446 - 11905: 0x8FB6, + 24447 - 11905: 0x8FB7, + 24448 - 11905: 0xCDF9, + 24449 - 11905: 0xD5F7, + 24450 - 11905: 0xE1DE, + 24451 - 11905: 0x8FB8, + 24452 - 11905: 0xBEB6, + 24453 - 11905: 0xB4FD, + 24454 - 11905: 0x8FB9, + 24455 - 11905: 0xE1DF, + 24456 - 11905: 0xBADC, + 24457 - 11905: 0xE1E0, + 24458 - 11905: 0xBBB2, + 24459 - 11905: 0xC2C9, + 24460 - 11905: 0xE1E1, + 24461 - 11905: 0x8FBA, + 24462 - 11905: 0x8FBB, + 24463 - 11905: 0x8FBC, + 24464 - 11905: 0xD0EC, + 24465 - 11905: 0x8FBD, + 24466 - 11905: 0xCDBD, + 24467 - 11905: 0x8FBE, + 24468 - 11905: 0x8FBF, + 24469 - 11905: 0xE1E2, + 24470 - 11905: 0x8FC0, + 24471 - 11905: 0xB5C3, + 24472 - 11905: 0xC5C7, + 24473 - 11905: 0xE1E3, + 24474 - 11905: 0x8FC1, + 24475 - 11905: 0x8FC2, + 24476 - 11905: 0xE1E4, + 24477 - 11905: 0x8FC3, + 24478 - 11905: 0x8FC4, + 24479 - 11905: 0x8FC5, + 24480 - 11905: 0x8FC6, + 24481 - 11905: 0xD3F9, + 24482 - 11905: 0x8FC7, + 24483 - 11905: 0x8FC8, + 24484 - 11905: 0x8FC9, + 24485 - 11905: 0x8FCA, + 24486 - 11905: 0x8FCB, + 24487 - 11905: 0x8FCC, + 24488 - 11905: 0xE1E5, + 24489 - 11905: 0x8FCD, + 24490 - 11905: 0xD1AD, + 24491 - 11905: 0x8FCE, + 24492 - 11905: 0x8FCF, + 24493 - 11905: 0xE1E6, + 24494 - 11905: 0xCEA2, + 24495 - 11905: 0x8FD0, + 24496 - 11905: 0x8FD1, + 24497 - 11905: 0x8FD2, + 24498 - 11905: 0x8FD3, + 24499 - 11905: 0x8FD4, + 24500 - 11905: 0x8FD5, + 24501 - 11905: 0xE1E7, + 24502 - 11905: 0x8FD6, + 24503 - 11905: 0xB5C2, + 24504 - 11905: 0x8FD7, + 24505 - 11905: 0x8FD8, + 24506 - 11905: 0x8FD9, + 24507 - 11905: 0x8FDA, + 24508 - 11905: 0xE1E8, + 24509 - 11905: 0xBBD5, + 24510 - 11905: 0x8FDB, + 24511 - 11905: 0x8FDC, + 24512 - 11905: 0x8FDD, + 24513 - 11905: 0x8FDE, + 24514 - 11905: 0x8FDF, + 24515 - 11905: 0xD0C4, + 24516 - 11905: 0xE2E0, + 24517 - 11905: 0xB1D8, + 24518 - 11905: 0xD2E4, + 24519 - 11905: 0x8FE0, + 24520 - 11905: 0x8FE1, + 24521 - 11905: 0xE2E1, + 24522 - 11905: 0x8FE2, + 24523 - 11905: 0x8FE3, + 24524 - 11905: 0xBCC9, + 24525 - 11905: 0xC8CC, + 24526 - 11905: 0x8FE4, + 24527 - 11905: 0xE2E3, + 24528 - 11905: 0xECFE, + 24529 - 11905: 0xECFD, + 24530 - 11905: 0xDFAF, + 24531 - 11905: 0x8FE5, + 24532 - 11905: 0x8FE6, + 24533 - 11905: 0x8FE7, + 24534 - 11905: 0xE2E2, + 24535 - 11905: 0xD6BE, + 24536 - 11905: 0xCDFC, + 24537 - 11905: 0xC3A6, + 24538 - 11905: 0x8FE8, + 24539 - 11905: 0x8FE9, + 24540 - 11905: 0x8FEA, + 24541 - 11905: 0xE3C3, + 24542 - 11905: 0x8FEB, + 24543 - 11905: 0x8FEC, + 24544 - 11905: 0xD6D2, + 24545 - 11905: 0xE2E7, + 24546 - 11905: 0x8FED, + 24547 - 11905: 0x8FEE, + 24548 - 11905: 0xE2E8, + 24549 - 11905: 0x8FEF, + 24550 - 11905: 0x8FF0, + 24551 - 11905: 0xD3C7, + 24552 - 11905: 0x8FF1, + 24553 - 11905: 0x8FF2, + 24554 - 11905: 0xE2EC, + 24555 - 11905: 0xBFEC, + 24556 - 11905: 0x8FF3, + 24557 - 11905: 0xE2ED, + 24558 - 11905: 0xE2E5, + 24559 - 11905: 0x8FF4, + 24560 - 11905: 0x8FF5, + 24561 - 11905: 0xB3C0, + 24562 - 11905: 0x8FF6, + 24563 - 11905: 0x8FF7, + 24564 - 11905: 0x8FF8, + 24565 - 11905: 0xC4EE, + 24566 - 11905: 0x8FF9, + 24567 - 11905: 0x8FFA, + 24568 - 11905: 0xE2EE, + 24569 - 11905: 0x8FFB, + 24570 - 11905: 0x8FFC, + 24571 - 11905: 0xD0C3, + 24572 - 11905: 0x8FFD, + 24573 - 11905: 0xBAF6, + 24574 - 11905: 0xE2E9, + 24575 - 11905: 0xB7DE, + 24576 - 11905: 0xBBB3, + 24577 - 11905: 0xCCAC, + 24578 - 11905: 0xCBCB, + 24579 - 11905: 0xE2E4, + 24580 - 11905: 0xE2E6, + 24581 - 11905: 0xE2EA, + 24582 - 11905: 0xE2EB, + 24583 - 11905: 0x8FFE, + 24584 - 11905: 0x9040, + 24585 - 11905: 0x9041, + 24586 - 11905: 0xE2F7, + 24587 - 11905: 0x9042, + 24588 - 11905: 0x9043, + 24589 - 11905: 0xE2F4, + 24590 - 11905: 0xD4F5, + 24591 - 11905: 0xE2F3, + 24592 - 11905: 0x9044, + 24593 - 11905: 0x9045, + 24594 - 11905: 0xC5AD, + 24595 - 11905: 0x9046, + 24596 - 11905: 0xD5FA, + 24597 - 11905: 0xC5C2, + 24598 - 11905: 0xB2C0, + 24599 - 11905: 0x9047, + 24600 - 11905: 0x9048, + 24601 - 11905: 0xE2EF, + 24602 - 11905: 0x9049, + 24603 - 11905: 0xE2F2, + 24604 - 11905: 0xC1AF, + 24605 - 11905: 0xCBBC, + 24606 - 11905: 0x904A, + 24607 - 11905: 0x904B, + 24608 - 11905: 0xB5A1, + 24609 - 11905: 0xE2F9, + 24610 - 11905: 0x904C, + 24611 - 11905: 0x904D, + 24612 - 11905: 0x904E, + 24613 - 11905: 0xBCB1, + 24614 - 11905: 0xE2F1, + 24615 - 11905: 0xD0D4, + 24616 - 11905: 0xD4B9, + 24617 - 11905: 0xE2F5, + 24618 - 11905: 0xB9D6, + 24619 - 11905: 0xE2F6, + 24620 - 11905: 0x904F, + 24621 - 11905: 0x9050, + 24622 - 11905: 0x9051, + 24623 - 11905: 0xC7D3, + 24624 - 11905: 0x9052, + 24625 - 11905: 0x9053, + 24626 - 11905: 0x9054, + 24627 - 11905: 0x9055, + 24628 - 11905: 0x9056, + 24629 - 11905: 0xE2F0, + 24630 - 11905: 0x9057, + 24631 - 11905: 0x9058, + 24632 - 11905: 0x9059, + 24633 - 11905: 0x905A, + 24634 - 11905: 0x905B, + 24635 - 11905: 0xD7DC, + 24636 - 11905: 0xEDA1, + 24637 - 11905: 0x905C, + 24638 - 11905: 0x905D, + 24639 - 11905: 0xE2F8, + 24640 - 11905: 0x905E, + 24641 - 11905: 0xEDA5, + 24642 - 11905: 0xE2FE, + 24643 - 11905: 0xCAD1, + 24644 - 11905: 0x905F, + 24645 - 11905: 0x9060, + 24646 - 11905: 0x9061, + 24647 - 11905: 0x9062, + 24648 - 11905: 0x9063, + 24649 - 11905: 0x9064, + 24650 - 11905: 0x9065, + 24651 - 11905: 0xC1B5, + 24652 - 11905: 0x9066, + 24653 - 11905: 0xBBD0, + 24654 - 11905: 0x9067, + 24655 - 11905: 0x9068, + 24656 - 11905: 0xBFD6, + 24657 - 11905: 0x9069, + 24658 - 11905: 0xBAE3, + 24659 - 11905: 0x906A, + 24660 - 11905: 0x906B, + 24661 - 11905: 0xCBA1, + 24662 - 11905: 0x906C, + 24663 - 11905: 0x906D, + 24664 - 11905: 0x906E, + 24665 - 11905: 0xEDA6, + 24666 - 11905: 0xEDA3, + 24667 - 11905: 0x906F, + 24668 - 11905: 0x9070, + 24669 - 11905: 0xEDA2, + 24670 - 11905: 0x9071, + 24671 - 11905: 0x9072, + 24672 - 11905: 0x9073, + 24673 - 11905: 0x9074, + 24674 - 11905: 0xBBD6, + 24675 - 11905: 0xEDA7, + 24676 - 11905: 0xD0F4, + 24677 - 11905: 0x9075, + 24678 - 11905: 0x9076, + 24679 - 11905: 0xEDA4, + 24680 - 11905: 0xBADE, + 24681 - 11905: 0xB6F7, + 24682 - 11905: 0xE3A1, + 24683 - 11905: 0xB6B2, + 24684 - 11905: 0xCCF1, + 24685 - 11905: 0xB9A7, + 24686 - 11905: 0x9077, + 24687 - 11905: 0xCFA2, + 24688 - 11905: 0xC7A1, + 24689 - 11905: 0x9078, + 24690 - 11905: 0x9079, + 24691 - 11905: 0xBFD2, + 24692 - 11905: 0x907A, + 24693 - 11905: 0x907B, + 24694 - 11905: 0xB6F1, + 24695 - 11905: 0x907C, + 24696 - 11905: 0xE2FA, + 24697 - 11905: 0xE2FB, + 24698 - 11905: 0xE2FD, + 24699 - 11905: 0xE2FC, + 24700 - 11905: 0xC4D5, + 24701 - 11905: 0xE3A2, + 24702 - 11905: 0x907D, + 24703 - 11905: 0xD3C1, + 24704 - 11905: 0x907E, + 24705 - 11905: 0x9080, + 24706 - 11905: 0x9081, + 24707 - 11905: 0xE3A7, + 24708 - 11905: 0xC7C4, + 24709 - 11905: 0x9082, + 24710 - 11905: 0x9083, + 24711 - 11905: 0x9084, + 24712 - 11905: 0x9085, + 24713 - 11905: 0xCFA4, + 24714 - 11905: 0x9086, + 24715 - 11905: 0x9087, + 24716 - 11905: 0xE3A9, + 24717 - 11905: 0xBAB7, + 24718 - 11905: 0x9088, + 24719 - 11905: 0x9089, + 24720 - 11905: 0x908A, + 24721 - 11905: 0x908B, + 24722 - 11905: 0xE3A8, + 24723 - 11905: 0x908C, + 24724 - 11905: 0xBBDA, + 24725 - 11905: 0x908D, + 24726 - 11905: 0xE3A3, + 24727 - 11905: 0x908E, + 24728 - 11905: 0x908F, + 24729 - 11905: 0x9090, + 24730 - 11905: 0xE3A4, + 24731 - 11905: 0xE3AA, + 24732 - 11905: 0x9091, + 24733 - 11905: 0xE3A6, + 24734 - 11905: 0x9092, + 24735 - 11905: 0xCEF2, + 24736 - 11905: 0xD3C6, + 24737 - 11905: 0x9093, + 24738 - 11905: 0x9094, + 24739 - 11905: 0xBBBC, + 24740 - 11905: 0x9095, + 24741 - 11905: 0x9096, + 24742 - 11905: 0xD4C3, + 24743 - 11905: 0x9097, + 24744 - 11905: 0xC4FA, + 24745 - 11905: 0x9098, + 24746 - 11905: 0x9099, + 24747 - 11905: 0xEDA8, + 24748 - 11905: 0xD0FC, + 24749 - 11905: 0xE3A5, + 24750 - 11905: 0x909A, + 24751 - 11905: 0xC3F5, + 24752 - 11905: 0x909B, + 24753 - 11905: 0xE3AD, + 24754 - 11905: 0xB1AF, + 24755 - 11905: 0x909C, + 24756 - 11905: 0xE3B2, + 24757 - 11905: 0x909D, + 24758 - 11905: 0x909E, + 24759 - 11905: 0x909F, + 24760 - 11905: 0xBCC2, + 24761 - 11905: 0x90A0, + 24762 - 11905: 0x90A1, + 24763 - 11905: 0xE3AC, + 24764 - 11905: 0xB5BF, + 24765 - 11905: 0x90A2, + 24766 - 11905: 0x90A3, + 24767 - 11905: 0x90A4, + 24768 - 11905: 0x90A5, + 24769 - 11905: 0x90A6, + 24770 - 11905: 0x90A7, + 24771 - 11905: 0x90A8, + 24772 - 11905: 0x90A9, + 24773 - 11905: 0xC7E9, + 24774 - 11905: 0xE3B0, + 24775 - 11905: 0x90AA, + 24776 - 11905: 0x90AB, + 24777 - 11905: 0x90AC, + 24778 - 11905: 0xBEAA, + 24779 - 11905: 0xCDEF, + 24780 - 11905: 0x90AD, + 24781 - 11905: 0x90AE, + 24782 - 11905: 0x90AF, + 24783 - 11905: 0x90B0, + 24784 - 11905: 0x90B1, + 24785 - 11905: 0xBBF3, + 24786 - 11905: 0x90B2, + 24787 - 11905: 0x90B3, + 24788 - 11905: 0x90B4, + 24789 - 11905: 0xCCE8, + 24790 - 11905: 0x90B5, + 24791 - 11905: 0x90B6, + 24792 - 11905: 0xE3AF, + 24793 - 11905: 0x90B7, + 24794 - 11905: 0xE3B1, + 24795 - 11905: 0x90B8, + 24796 - 11905: 0xCFA7, + 24797 - 11905: 0xE3AE, + 24798 - 11905: 0x90B9, + 24799 - 11905: 0xCEA9, + 24800 - 11905: 0xBBDD, + 24801 - 11905: 0x90BA, + 24802 - 11905: 0x90BB, + 24803 - 11905: 0x90BC, + 24804 - 11905: 0x90BD, + 24805 - 11905: 0x90BE, + 24806 - 11905: 0xB5EB, + 24807 - 11905: 0xBEE5, + 24808 - 11905: 0xB2D2, + 24809 - 11905: 0xB3CD, + 24810 - 11905: 0x90BF, + 24811 - 11905: 0xB1B9, + 24812 - 11905: 0xE3AB, + 24813 - 11905: 0xB2D1, + 24814 - 11905: 0xB5AC, + 24815 - 11905: 0xB9DF, + 24816 - 11905: 0xB6E8, + 24817 - 11905: 0x90C0, + 24818 - 11905: 0x90C1, + 24819 - 11905: 0xCFEB, + 24820 - 11905: 0xE3B7, + 24821 - 11905: 0x90C2, + 24822 - 11905: 0xBBCC, + 24823 - 11905: 0x90C3, + 24824 - 11905: 0x90C4, + 24825 - 11905: 0xC8C7, + 24826 - 11905: 0xD0CA, + 24827 - 11905: 0x90C5, + 24828 - 11905: 0x90C6, + 24829 - 11905: 0x90C7, + 24830 - 11905: 0x90C8, + 24831 - 11905: 0x90C9, + 24832 - 11905: 0xE3B8, + 24833 - 11905: 0xB3EE, + 24834 - 11905: 0x90CA, + 24835 - 11905: 0x90CB, + 24836 - 11905: 0x90CC, + 24837 - 11905: 0x90CD, + 24838 - 11905: 0xEDA9, + 24839 - 11905: 0x90CE, + 24840 - 11905: 0xD3FA, + 24841 - 11905: 0xD3E4, + 24842 - 11905: 0x90CF, + 24843 - 11905: 0x90D0, + 24844 - 11905: 0x90D1, + 24845 - 11905: 0xEDAA, + 24846 - 11905: 0xE3B9, + 24847 - 11905: 0xD2E2, + 24848 - 11905: 0x90D2, + 24849 - 11905: 0x90D3, + 24850 - 11905: 0x90D4, + 24851 - 11905: 0x90D5, + 24852 - 11905: 0x90D6, + 24853 - 11905: 0xE3B5, + 24854 - 11905: 0x90D7, + 24855 - 11905: 0x90D8, + 24856 - 11905: 0x90D9, + 24857 - 11905: 0x90DA, + 24858 - 11905: 0xD3DE, + 24859 - 11905: 0x90DB, + 24860 - 11905: 0x90DC, + 24861 - 11905: 0x90DD, + 24862 - 11905: 0x90DE, + 24863 - 11905: 0xB8D0, + 24864 - 11905: 0xE3B3, + 24865 - 11905: 0x90DF, + 24866 - 11905: 0x90E0, + 24867 - 11905: 0xE3B6, + 24868 - 11905: 0xB7DF, + 24869 - 11905: 0x90E1, + 24870 - 11905: 0xE3B4, + 24871 - 11905: 0xC0A2, + 24872 - 11905: 0x90E2, + 24873 - 11905: 0x90E3, + 24874 - 11905: 0x90E4, + 24875 - 11905: 0xE3BA, + 24876 - 11905: 0x90E5, + 24877 - 11905: 0x90E6, + 24878 - 11905: 0x90E7, + 24879 - 11905: 0x90E8, + 24880 - 11905: 0x90E9, + 24881 - 11905: 0x90EA, + 24882 - 11905: 0x90EB, + 24883 - 11905: 0x90EC, + 24884 - 11905: 0x90ED, + 24885 - 11905: 0x90EE, + 24886 - 11905: 0x90EF, + 24887 - 11905: 0x90F0, + 24888 - 11905: 0x90F1, + 24889 - 11905: 0x90F2, + 24890 - 11905: 0x90F3, + 24891 - 11905: 0x90F4, + 24892 - 11905: 0x90F5, + 24893 - 11905: 0x90F6, + 24894 - 11905: 0x90F7, + 24895 - 11905: 0xD4B8, + 24896 - 11905: 0x90F8, + 24897 - 11905: 0x90F9, + 24898 - 11905: 0x90FA, + 24899 - 11905: 0x90FB, + 24900 - 11905: 0x90FC, + 24901 - 11905: 0x90FD, + 24902 - 11905: 0x90FE, + 24903 - 11905: 0x9140, + 24904 - 11905: 0xB4C8, + 24905 - 11905: 0x9141, + 24906 - 11905: 0xE3BB, + 24907 - 11905: 0x9142, + 24908 - 11905: 0xBBC5, + 24909 - 11905: 0x9143, + 24910 - 11905: 0xC9F7, + 24911 - 11905: 0x9144, + 24912 - 11905: 0x9145, + 24913 - 11905: 0xC9E5, + 24914 - 11905: 0x9146, + 24915 - 11905: 0x9147, + 24916 - 11905: 0x9148, + 24917 - 11905: 0xC4BD, + 24918 - 11905: 0x9149, + 24919 - 11905: 0x914A, + 24920 - 11905: 0x914B, + 24921 - 11905: 0x914C, + 24922 - 11905: 0x914D, + 24923 - 11905: 0x914E, + 24924 - 11905: 0x914F, + 24925 - 11905: 0xEDAB, + 24926 - 11905: 0x9150, + 24927 - 11905: 0x9151, + 24928 - 11905: 0x9152, + 24929 - 11905: 0x9153, + 24930 - 11905: 0xC2FD, + 24931 - 11905: 0x9154, + 24932 - 11905: 0x9155, + 24933 - 11905: 0x9156, + 24934 - 11905: 0x9157, + 24935 - 11905: 0xBBDB, + 24936 - 11905: 0xBFAE, + 24937 - 11905: 0x9158, + 24938 - 11905: 0x9159, + 24939 - 11905: 0x915A, + 24940 - 11905: 0x915B, + 24941 - 11905: 0x915C, + 24942 - 11905: 0x915D, + 24943 - 11905: 0x915E, + 24944 - 11905: 0xCEBF, + 24945 - 11905: 0x915F, + 24946 - 11905: 0x9160, + 24947 - 11905: 0x9161, + 24948 - 11905: 0x9162, + 24949 - 11905: 0xE3BC, + 24950 - 11905: 0x9163, + 24951 - 11905: 0xBFB6, + 24952 - 11905: 0x9164, + 24953 - 11905: 0x9165, + 24954 - 11905: 0x9166, + 24955 - 11905: 0x9167, + 24956 - 11905: 0x9168, + 24957 - 11905: 0x9169, + 24958 - 11905: 0x916A, + 24959 - 11905: 0x916B, + 24960 - 11905: 0x916C, + 24961 - 11905: 0x916D, + 24962 - 11905: 0x916E, + 24963 - 11905: 0x916F, + 24964 - 11905: 0x9170, + 24965 - 11905: 0x9171, + 24966 - 11905: 0x9172, + 24967 - 11905: 0x9173, + 24968 - 11905: 0x9174, + 24969 - 11905: 0x9175, + 24970 - 11905: 0x9176, + 24971 - 11905: 0xB1EF, + 24972 - 11905: 0x9177, + 24973 - 11905: 0x9178, + 24974 - 11905: 0xD4F7, + 24975 - 11905: 0x9179, + 24976 - 11905: 0x917A, + 24977 - 11905: 0x917B, + 24978 - 11905: 0x917C, + 24979 - 11905: 0x917D, + 24980 - 11905: 0xE3BE, + 24981 - 11905: 0x917E, + 24982 - 11905: 0x9180, + 24983 - 11905: 0x9181, + 24984 - 11905: 0x9182, + 24985 - 11905: 0x9183, + 24986 - 11905: 0x9184, + 24987 - 11905: 0x9185, + 24988 - 11905: 0x9186, + 24989 - 11905: 0xEDAD, + 24990 - 11905: 0x9187, + 24991 - 11905: 0x9188, + 24992 - 11905: 0x9189, + 24993 - 11905: 0x918A, + 24994 - 11905: 0x918B, + 24995 - 11905: 0x918C, + 24996 - 11905: 0x918D, + 24997 - 11905: 0x918E, + 24998 - 11905: 0x918F, + 24999 - 11905: 0xE3BF, + 25000 - 11905: 0xBAA9, + 25001 - 11905: 0xEDAC, + 25002 - 11905: 0x9190, + 25003 - 11905: 0x9191, + 25004 - 11905: 0xE3BD, + 25005 - 11905: 0x9192, + 25006 - 11905: 0x9193, + 25007 - 11905: 0x9194, + 25008 - 11905: 0x9195, + 25009 - 11905: 0x9196, + 25010 - 11905: 0x9197, + 25011 - 11905: 0x9198, + 25012 - 11905: 0x9199, + 25013 - 11905: 0x919A, + 25014 - 11905: 0x919B, + 25015 - 11905: 0xE3C0, + 25016 - 11905: 0x919C, + 25017 - 11905: 0x919D, + 25018 - 11905: 0x919E, + 25019 - 11905: 0x919F, + 25020 - 11905: 0x91A0, + 25021 - 11905: 0x91A1, + 25022 - 11905: 0xBAB6, + 25023 - 11905: 0x91A2, + 25024 - 11905: 0x91A3, + 25025 - 11905: 0x91A4, + 25026 - 11905: 0xB6AE, + 25027 - 11905: 0x91A5, + 25028 - 11905: 0x91A6, + 25029 - 11905: 0x91A7, + 25030 - 11905: 0x91A8, + 25031 - 11905: 0x91A9, + 25032 - 11905: 0xD0B8, + 25033 - 11905: 0x91AA, + 25034 - 11905: 0xB0C3, + 25035 - 11905: 0xEDAE, + 25036 - 11905: 0x91AB, + 25037 - 11905: 0x91AC, + 25038 - 11905: 0x91AD, + 25039 - 11905: 0x91AE, + 25040 - 11905: 0x91AF, + 25041 - 11905: 0xEDAF, + 25042 - 11905: 0xC0C1, + 25043 - 11905: 0x91B0, + 25044 - 11905: 0xE3C1, + 25045 - 11905: 0x91B1, + 25046 - 11905: 0x91B2, + 25047 - 11905: 0x91B3, + 25048 - 11905: 0x91B4, + 25049 - 11905: 0x91B5, + 25050 - 11905: 0x91B6, + 25051 - 11905: 0x91B7, + 25052 - 11905: 0x91B8, + 25053 - 11905: 0x91B9, + 25054 - 11905: 0x91BA, + 25055 - 11905: 0x91BB, + 25056 - 11905: 0x91BC, + 25057 - 11905: 0x91BD, + 25058 - 11905: 0x91BE, + 25059 - 11905: 0x91BF, + 25060 - 11905: 0x91C0, + 25061 - 11905: 0x91C1, + 25062 - 11905: 0xC5B3, + 25063 - 11905: 0x91C2, + 25064 - 11905: 0x91C3, + 25065 - 11905: 0x91C4, + 25066 - 11905: 0x91C5, + 25067 - 11905: 0x91C6, + 25068 - 11905: 0x91C7, + 25069 - 11905: 0x91C8, + 25070 - 11905: 0x91C9, + 25071 - 11905: 0x91CA, + 25072 - 11905: 0x91CB, + 25073 - 11905: 0x91CC, + 25074 - 11905: 0x91CD, + 25075 - 11905: 0x91CE, + 25076 - 11905: 0x91CF, + 25077 - 11905: 0xE3C2, + 25078 - 11905: 0x91D0, + 25079 - 11905: 0x91D1, + 25080 - 11905: 0x91D2, + 25081 - 11905: 0x91D3, + 25082 - 11905: 0x91D4, + 25083 - 11905: 0x91D5, + 25084 - 11905: 0x91D6, + 25085 - 11905: 0x91D7, + 25086 - 11905: 0x91D8, + 25087 - 11905: 0xDCB2, + 25088 - 11905: 0x91D9, + 25089 - 11905: 0x91DA, + 25090 - 11905: 0x91DB, + 25091 - 11905: 0x91DC, + 25092 - 11905: 0x91DD, + 25093 - 11905: 0x91DE, + 25094 - 11905: 0xEDB0, + 25095 - 11905: 0x91DF, + 25096 - 11905: 0xB8EA, + 25097 - 11905: 0x91E0, + 25098 - 11905: 0xCEEC, + 25099 - 11905: 0xEAA7, + 25100 - 11905: 0xD0E7, + 25101 - 11905: 0xCAF9, + 25102 - 11905: 0xC8D6, + 25103 - 11905: 0xCFB7, + 25104 - 11905: 0xB3C9, + 25105 - 11905: 0xCED2, + 25106 - 11905: 0xBDE4, + 25107 - 11905: 0x91E1, + 25108 - 11905: 0x91E2, + 25109 - 11905: 0xE3DE, + 25110 - 11905: 0xBBF2, + 25111 - 11905: 0xEAA8, + 25112 - 11905: 0xD5BD, + 25113 - 11905: 0x91E3, + 25114 - 11905: 0xC6DD, + 25115 - 11905: 0xEAA9, + 25116 - 11905: 0x91E4, + 25117 - 11905: 0x91E5, + 25118 - 11905: 0x91E6, + 25119 - 11905: 0xEAAA, + 25120 - 11905: 0x91E7, + 25121 - 11905: 0xEAAC, + 25122 - 11905: 0xEAAB, + 25123 - 11905: 0x91E8, + 25124 - 11905: 0xEAAE, + 25125 - 11905: 0xEAAD, + 25126 - 11905: 0x91E9, + 25127 - 11905: 0x91EA, + 25128 - 11905: 0x91EB, + 25129 - 11905: 0x91EC, + 25130 - 11905: 0xBDD8, + 25131 - 11905: 0x91ED, + 25132 - 11905: 0xEAAF, + 25133 - 11905: 0x91EE, + 25134 - 11905: 0xC2BE, + 25135 - 11905: 0x91EF, + 25136 - 11905: 0x91F0, + 25137 - 11905: 0x91F1, + 25138 - 11905: 0x91F2, + 25139 - 11905: 0xB4C1, + 25140 - 11905: 0xB4F7, + 25141 - 11905: 0x91F3, + 25142 - 11905: 0x91F4, + 25143 - 11905: 0xBBA7, + 25144 - 11905: 0x91F5, + 25145 - 11905: 0x91F6, + 25146 - 11905: 0x91F7, + 25147 - 11905: 0x91F8, + 25148 - 11905: 0x91F9, + 25149 - 11905: 0xECE6, + 25150 - 11905: 0xECE5, + 25151 - 11905: 0xB7BF, + 25152 - 11905: 0xCBF9, + 25153 - 11905: 0xB1E2, + 25154 - 11905: 0x91FA, + 25155 - 11905: 0xECE7, + 25156 - 11905: 0x91FB, + 25157 - 11905: 0x91FC, + 25158 - 11905: 0x91FD, + 25159 - 11905: 0xC9C8, + 25160 - 11905: 0xECE8, + 25161 - 11905: 0xECE9, + 25162 - 11905: 0x91FE, + 25163 - 11905: 0xCAD6, + 25164 - 11905: 0xDED0, + 25165 - 11905: 0xB2C5, + 25166 - 11905: 0xD4FA, + 25167 - 11905: 0x9240, + 25168 - 11905: 0x9241, + 25169 - 11905: 0xC6CB, + 25170 - 11905: 0xB0C7, + 25171 - 11905: 0xB4F2, + 25172 - 11905: 0xC8D3, + 25173 - 11905: 0x9242, + 25174 - 11905: 0x9243, + 25175 - 11905: 0x9244, + 25176 - 11905: 0xCDD0, + 25177 - 11905: 0x9245, + 25178 - 11905: 0x9246, + 25179 - 11905: 0xBFB8, + 25180 - 11905: 0x9247, + 25181 - 11905: 0x9248, + 25182 - 11905: 0x9249, + 25183 - 11905: 0x924A, + 25184 - 11905: 0x924B, + 25185 - 11905: 0x924C, + 25186 - 11905: 0x924D, + 25187 - 11905: 0xBFDB, + 25188 - 11905: 0x924E, + 25189 - 11905: 0x924F, + 25190 - 11905: 0xC7A4, + 25191 - 11905: 0xD6B4, + 25192 - 11905: 0x9250, + 25193 - 11905: 0xC0A9, + 25194 - 11905: 0xDED1, + 25195 - 11905: 0xC9A8, + 25196 - 11905: 0xD1EF, + 25197 - 11905: 0xC5A4, + 25198 - 11905: 0xB0E7, + 25199 - 11905: 0xB3B6, + 25200 - 11905: 0xC8C5, + 25201 - 11905: 0x9251, + 25202 - 11905: 0x9252, + 25203 - 11905: 0xB0E2, + 25204 - 11905: 0x9253, + 25205 - 11905: 0x9254, + 25206 - 11905: 0xB7F6, + 25207 - 11905: 0x9255, + 25208 - 11905: 0x9256, + 25209 - 11905: 0xC5FA, + 25210 - 11905: 0x9257, + 25211 - 11905: 0x9258, + 25212 - 11905: 0xB6F3, + 25213 - 11905: 0x9259, + 25214 - 11905: 0xD5D2, + 25215 - 11905: 0xB3D0, + 25216 - 11905: 0xBCBC, + 25217 - 11905: 0x925A, + 25218 - 11905: 0x925B, + 25219 - 11905: 0x925C, + 25220 - 11905: 0xB3AD, + 25221 - 11905: 0x925D, + 25222 - 11905: 0x925E, + 25223 - 11905: 0x925F, + 25224 - 11905: 0x9260, + 25225 - 11905: 0xBEF1, + 25226 - 11905: 0xB0D1, + 25227 - 11905: 0x9261, + 25228 - 11905: 0x9262, + 25229 - 11905: 0x9263, + 25230 - 11905: 0x9264, + 25231 - 11905: 0x9265, + 25232 - 11905: 0x9266, + 25233 - 11905: 0xD2D6, + 25234 - 11905: 0xCAE3, + 25235 - 11905: 0xD7A5, + 25236 - 11905: 0x9267, + 25237 - 11905: 0xCDB6, + 25238 - 11905: 0xB6B6, + 25239 - 11905: 0xBFB9, + 25240 - 11905: 0xD5DB, + 25241 - 11905: 0x9268, + 25242 - 11905: 0xB8A7, + 25243 - 11905: 0xC5D7, + 25244 - 11905: 0x9269, + 25245 - 11905: 0x926A, + 25246 - 11905: 0x926B, + 25247 - 11905: 0xDED2, + 25248 - 11905: 0xBFD9, + 25249 - 11905: 0xC2D5, + 25250 - 11905: 0xC7C0, + 25251 - 11905: 0x926C, + 25252 - 11905: 0xBBA4, + 25253 - 11905: 0xB1A8, + 25254 - 11905: 0x926D, + 25255 - 11905: 0x926E, + 25256 - 11905: 0xC5EA, + 25257 - 11905: 0x926F, + 25258 - 11905: 0x9270, + 25259 - 11905: 0xC5FB, + 25260 - 11905: 0xCCA7, + 25261 - 11905: 0x9271, + 25262 - 11905: 0x9272, + 25263 - 11905: 0x9273, + 25264 - 11905: 0x9274, + 25265 - 11905: 0xB1A7, + 25266 - 11905: 0x9275, + 25267 - 11905: 0x9276, + 25268 - 11905: 0x9277, + 25269 - 11905: 0xB5D6, + 25270 - 11905: 0x9278, + 25271 - 11905: 0x9279, + 25272 - 11905: 0x927A, + 25273 - 11905: 0xC4A8, + 25274 - 11905: 0x927B, + 25275 - 11905: 0xDED3, + 25276 - 11905: 0xD1BA, + 25277 - 11905: 0xB3E9, + 25278 - 11905: 0x927C, + 25279 - 11905: 0xC3F2, + 25280 - 11905: 0x927D, + 25281 - 11905: 0x927E, + 25282 - 11905: 0xB7F7, + 25283 - 11905: 0x9280, + 25284 - 11905: 0xD6F4, + 25285 - 11905: 0xB5A3, + 25286 - 11905: 0xB2F0, + 25287 - 11905: 0xC4B4, + 25288 - 11905: 0xC4E9, + 25289 - 11905: 0xC0AD, + 25290 - 11905: 0xDED4, + 25291 - 11905: 0x9281, + 25292 - 11905: 0xB0E8, + 25293 - 11905: 0xC5C4, + 25294 - 11905: 0xC1E0, + 25295 - 11905: 0x9282, + 25296 - 11905: 0xB9D5, + 25297 - 11905: 0x9283, + 25298 - 11905: 0xBEDC, + 25299 - 11905: 0xCDD8, + 25300 - 11905: 0xB0CE, + 25301 - 11905: 0x9284, + 25302 - 11905: 0xCDCF, + 25303 - 11905: 0xDED6, + 25304 - 11905: 0xBED0, + 25305 - 11905: 0xD7BE, + 25306 - 11905: 0xDED5, + 25307 - 11905: 0xD5D0, + 25308 - 11905: 0xB0DD, + 25309 - 11905: 0x9285, + 25310 - 11905: 0x9286, + 25311 - 11905: 0xC4E2, + 25312 - 11905: 0x9287, + 25313 - 11905: 0x9288, + 25314 - 11905: 0xC2A3, + 25315 - 11905: 0xBCF0, + 25316 - 11905: 0x9289, + 25317 - 11905: 0xD3B5, + 25318 - 11905: 0xC0B9, + 25319 - 11905: 0xC5A1, + 25320 - 11905: 0xB2A6, + 25321 - 11905: 0xD4F1, + 25322 - 11905: 0x928A, + 25323 - 11905: 0x928B, + 25324 - 11905: 0xC0A8, + 25325 - 11905: 0xCAC3, + 25326 - 11905: 0xDED7, + 25327 - 11905: 0xD5FC, + 25328 - 11905: 0x928C, + 25329 - 11905: 0xB9B0, + 25330 - 11905: 0x928D, + 25331 - 11905: 0xC8AD, + 25332 - 11905: 0xCBA9, + 25333 - 11905: 0x928E, + 25334 - 11905: 0xDED9, + 25335 - 11905: 0xBFBD, + 25336 - 11905: 0x928F, + 25337 - 11905: 0x9290, + 25338 - 11905: 0x9291, + 25339 - 11905: 0x9292, + 25340 - 11905: 0xC6B4, + 25341 - 11905: 0xD7A7, + 25342 - 11905: 0xCAB0, + 25343 - 11905: 0xC4C3, + 25344 - 11905: 0x9293, + 25345 - 11905: 0xB3D6, + 25346 - 11905: 0xB9D2, + 25347 - 11905: 0x9294, + 25348 - 11905: 0x9295, + 25349 - 11905: 0x9296, + 25350 - 11905: 0x9297, + 25351 - 11905: 0xD6B8, + 25352 - 11905: 0xEAFC, + 25353 - 11905: 0xB0B4, + 25354 - 11905: 0x9298, + 25355 - 11905: 0x9299, + 25356 - 11905: 0x929A, + 25357 - 11905: 0x929B, + 25358 - 11905: 0xBFE6, + 25359 - 11905: 0x929C, + 25360 - 11905: 0x929D, + 25361 - 11905: 0xCCF4, + 25362 - 11905: 0x929E, + 25363 - 11905: 0x929F, + 25364 - 11905: 0x92A0, + 25365 - 11905: 0x92A1, + 25366 - 11905: 0xCDDA, + 25367 - 11905: 0x92A2, + 25368 - 11905: 0x92A3, + 25369 - 11905: 0x92A4, + 25370 - 11905: 0xD6BF, + 25371 - 11905: 0xC2CE, + 25372 - 11905: 0x92A5, + 25373 - 11905: 0xCECE, + 25374 - 11905: 0xCCA2, + 25375 - 11905: 0xD0AE, + 25376 - 11905: 0xC4D3, + 25377 - 11905: 0xB5B2, + 25378 - 11905: 0xDED8, + 25379 - 11905: 0xD5F5, + 25380 - 11905: 0xBCB7, + 25381 - 11905: 0xBBD3, + 25382 - 11905: 0x92A6, + 25383 - 11905: 0x92A7, + 25384 - 11905: 0xB0A4, + 25385 - 11905: 0x92A8, + 25386 - 11905: 0xC5B2, + 25387 - 11905: 0xB4EC, + 25388 - 11905: 0x92A9, + 25389 - 11905: 0x92AA, + 25390 - 11905: 0x92AB, + 25391 - 11905: 0xD5F1, + 25392 - 11905: 0x92AC, + 25393 - 11905: 0x92AD, + 25394 - 11905: 0xEAFD, + 25395 - 11905: 0x92AE, + 25396 - 11905: 0x92AF, + 25397 - 11905: 0x92B0, + 25398 - 11905: 0x92B1, + 25399 - 11905: 0x92B2, + 25400 - 11905: 0x92B3, + 25401 - 11905: 0xDEDA, + 25402 - 11905: 0xCDA6, + 25403 - 11905: 0x92B4, + 25404 - 11905: 0x92B5, + 25405 - 11905: 0xCDEC, + 25406 - 11905: 0x92B6, + 25407 - 11905: 0x92B7, + 25408 - 11905: 0x92B8, + 25409 - 11905: 0x92B9, + 25410 - 11905: 0xCEE6, + 25411 - 11905: 0xDEDC, + 25412 - 11905: 0x92BA, + 25413 - 11905: 0xCDB1, + 25414 - 11905: 0xC0A6, + 25415 - 11905: 0x92BB, + 25416 - 11905: 0x92BC, + 25417 - 11905: 0xD7BD, + 25418 - 11905: 0x92BD, + 25419 - 11905: 0xDEDB, + 25420 - 11905: 0xB0C6, + 25421 - 11905: 0xBAB4, + 25422 - 11905: 0xC9D3, + 25423 - 11905: 0xC4F3, + 25424 - 11905: 0xBEE8, + 25425 - 11905: 0x92BE, + 25426 - 11905: 0x92BF, + 25427 - 11905: 0x92C0, + 25428 - 11905: 0x92C1, + 25429 - 11905: 0xB2B6, + 25430 - 11905: 0x92C2, + 25431 - 11905: 0x92C3, + 25432 - 11905: 0x92C4, + 25433 - 11905: 0x92C5, + 25434 - 11905: 0x92C6, + 25435 - 11905: 0x92C7, + 25436 - 11905: 0x92C8, + 25437 - 11905: 0x92C9, + 25438 - 11905: 0xC0CC, + 25439 - 11905: 0xCBF0, + 25440 - 11905: 0x92CA, + 25441 - 11905: 0xBCF1, + 25442 - 11905: 0xBBBB, + 25443 - 11905: 0xB5B7, + 25444 - 11905: 0x92CB, + 25445 - 11905: 0x92CC, + 25446 - 11905: 0x92CD, + 25447 - 11905: 0xC5F5, + 25448 - 11905: 0x92CE, + 25449 - 11905: 0xDEE6, + 25450 - 11905: 0x92CF, + 25451 - 11905: 0x92D0, + 25452 - 11905: 0x92D1, + 25453 - 11905: 0xDEE3, + 25454 - 11905: 0xBEDD, + 25455 - 11905: 0x92D2, + 25456 - 11905: 0x92D3, + 25457 - 11905: 0xDEDF, + 25458 - 11905: 0x92D4, + 25459 - 11905: 0x92D5, + 25460 - 11905: 0x92D6, + 25461 - 11905: 0x92D7, + 25462 - 11905: 0xB4B7, + 25463 - 11905: 0xBDDD, + 25464 - 11905: 0x92D8, + 25465 - 11905: 0x92D9, + 25466 - 11905: 0xDEE0, + 25467 - 11905: 0xC4ED, + 25468 - 11905: 0x92DA, + 25469 - 11905: 0x92DB, + 25470 - 11905: 0x92DC, + 25471 - 11905: 0x92DD, + 25472 - 11905: 0xCFC6, + 25473 - 11905: 0x92DE, + 25474 - 11905: 0xB5E0, + 25475 - 11905: 0x92DF, + 25476 - 11905: 0x92E0, + 25477 - 11905: 0x92E1, + 25478 - 11905: 0x92E2, + 25479 - 11905: 0xB6DE, + 25480 - 11905: 0xCADA, + 25481 - 11905: 0xB5F4, + 25482 - 11905: 0xDEE5, + 25483 - 11905: 0x92E3, + 25484 - 11905: 0xD5C6, + 25485 - 11905: 0x92E4, + 25486 - 11905: 0xDEE1, + 25487 - 11905: 0xCCCD, + 25488 - 11905: 0xC6FE, + 25489 - 11905: 0x92E5, + 25490 - 11905: 0xC5C5, + 25491 - 11905: 0x92E6, + 25492 - 11905: 0x92E7, + 25493 - 11905: 0x92E8, + 25494 - 11905: 0xD2B4, + 25495 - 11905: 0x92E9, + 25496 - 11905: 0xBEF2, + 25497 - 11905: 0x92EA, + 25498 - 11905: 0x92EB, + 25499 - 11905: 0x92EC, + 25500 - 11905: 0x92ED, + 25501 - 11905: 0x92EE, + 25502 - 11905: 0x92EF, + 25503 - 11905: 0x92F0, + 25504 - 11905: 0xC2D3, + 25505 - 11905: 0x92F1, + 25506 - 11905: 0xCCBD, + 25507 - 11905: 0xB3B8, + 25508 - 11905: 0x92F2, + 25509 - 11905: 0xBDD3, + 25510 - 11905: 0x92F3, + 25511 - 11905: 0xBFD8, + 25512 - 11905: 0xCDC6, + 25513 - 11905: 0xD1DA, + 25514 - 11905: 0xB4EB, + 25515 - 11905: 0x92F4, + 25516 - 11905: 0xDEE4, + 25517 - 11905: 0xDEDD, + 25518 - 11905: 0xDEE7, + 25519 - 11905: 0x92F5, + 25520 - 11905: 0xEAFE, + 25521 - 11905: 0x92F6, + 25522 - 11905: 0x92F7, + 25523 - 11905: 0xC2B0, + 25524 - 11905: 0xDEE2, + 25525 - 11905: 0x92F8, + 25526 - 11905: 0x92F9, + 25527 - 11905: 0xD6C0, + 25528 - 11905: 0xB5A7, + 25529 - 11905: 0x92FA, + 25530 - 11905: 0xB2F4, + 25531 - 11905: 0x92FB, + 25532 - 11905: 0xDEE8, + 25533 - 11905: 0x92FC, + 25534 - 11905: 0xDEF2, + 25535 - 11905: 0x92FD, + 25536 - 11905: 0x92FE, + 25537 - 11905: 0x9340, + 25538 - 11905: 0x9341, + 25539 - 11905: 0x9342, + 25540 - 11905: 0xDEED, + 25541 - 11905: 0x9343, + 25542 - 11905: 0xDEF1, + 25543 - 11905: 0x9344, + 25544 - 11905: 0x9345, + 25545 - 11905: 0xC8E0, + 25546 - 11905: 0x9346, + 25547 - 11905: 0x9347, + 25548 - 11905: 0x9348, + 25549 - 11905: 0xD7E1, + 25550 - 11905: 0xDEEF, + 25551 - 11905: 0xC3E8, + 25552 - 11905: 0xCCE1, + 25553 - 11905: 0x9349, + 25554 - 11905: 0xB2E5, + 25555 - 11905: 0x934A, + 25556 - 11905: 0x934B, + 25557 - 11905: 0x934C, + 25558 - 11905: 0xD2BE, + 25559 - 11905: 0x934D, + 25560 - 11905: 0x934E, + 25561 - 11905: 0x934F, + 25562 - 11905: 0x9350, + 25563 - 11905: 0x9351, + 25564 - 11905: 0x9352, + 25565 - 11905: 0x9353, + 25566 - 11905: 0xDEEE, + 25567 - 11905: 0x9354, + 25568 - 11905: 0xDEEB, + 25569 - 11905: 0xCED5, + 25570 - 11905: 0x9355, + 25571 - 11905: 0xB4A7, + 25572 - 11905: 0x9356, + 25573 - 11905: 0x9357, + 25574 - 11905: 0x9358, + 25575 - 11905: 0x9359, + 25576 - 11905: 0x935A, + 25577 - 11905: 0xBFAB, + 25578 - 11905: 0xBEBE, + 25579 - 11905: 0x935B, + 25580 - 11905: 0x935C, + 25581 - 11905: 0xBDD2, + 25582 - 11905: 0x935D, + 25583 - 11905: 0x935E, + 25584 - 11905: 0x935F, + 25585 - 11905: 0x9360, + 25586 - 11905: 0xDEE9, + 25587 - 11905: 0x9361, + 25588 - 11905: 0xD4AE, + 25589 - 11905: 0x9362, + 25590 - 11905: 0xDEDE, + 25591 - 11905: 0x9363, + 25592 - 11905: 0xDEEA, + 25593 - 11905: 0x9364, + 25594 - 11905: 0x9365, + 25595 - 11905: 0x9366, + 25596 - 11905: 0x9367, + 25597 - 11905: 0xC0BF, + 25598 - 11905: 0x9368, + 25599 - 11905: 0xDEEC, + 25600 - 11905: 0xB2F3, + 25601 - 11905: 0xB8E9, + 25602 - 11905: 0xC2A7, + 25603 - 11905: 0x9369, + 25604 - 11905: 0x936A, + 25605 - 11905: 0xBDC1, + 25606 - 11905: 0x936B, + 25607 - 11905: 0x936C, + 25608 - 11905: 0x936D, + 25609 - 11905: 0x936E, + 25610 - 11905: 0x936F, + 25611 - 11905: 0xDEF5, + 25612 - 11905: 0xDEF8, + 25613 - 11905: 0x9370, + 25614 - 11905: 0x9371, + 25615 - 11905: 0xB2AB, + 25616 - 11905: 0xB4A4, + 25617 - 11905: 0x9372, + 25618 - 11905: 0x9373, + 25619 - 11905: 0xB4EA, + 25620 - 11905: 0xC9A6, + 25621 - 11905: 0x9374, + 25622 - 11905: 0x9375, + 25623 - 11905: 0x9376, + 25624 - 11905: 0x9377, + 25625 - 11905: 0x9378, + 25626 - 11905: 0x9379, + 25627 - 11905: 0xDEF6, + 25628 - 11905: 0xCBD1, + 25629 - 11905: 0x937A, + 25630 - 11905: 0xB8E3, + 25631 - 11905: 0x937B, + 25632 - 11905: 0xDEF7, + 25633 - 11905: 0xDEFA, + 25634 - 11905: 0x937C, + 25635 - 11905: 0x937D, + 25636 - 11905: 0x937E, + 25637 - 11905: 0x9380, + 25638 - 11905: 0xDEF9, + 25639 - 11905: 0x9381, + 25640 - 11905: 0x9382, + 25641 - 11905: 0x9383, + 25642 - 11905: 0xCCC2, + 25643 - 11905: 0x9384, + 25644 - 11905: 0xB0E1, + 25645 - 11905: 0xB4EE, + 25646 - 11905: 0x9385, + 25647 - 11905: 0x9386, + 25648 - 11905: 0x9387, + 25649 - 11905: 0x9388, + 25650 - 11905: 0x9389, + 25651 - 11905: 0x938A, + 25652 - 11905: 0xE5BA, + 25653 - 11905: 0x938B, + 25654 - 11905: 0x938C, + 25655 - 11905: 0x938D, + 25656 - 11905: 0x938E, + 25657 - 11905: 0x938F, + 25658 - 11905: 0xD0AF, + 25659 - 11905: 0x9390, + 25660 - 11905: 0x9391, + 25661 - 11905: 0xB2EB, + 25662 - 11905: 0x9392, + 25663 - 11905: 0xEBA1, + 25664 - 11905: 0x9393, + 25665 - 11905: 0xDEF4, + 25666 - 11905: 0x9394, + 25667 - 11905: 0x9395, + 25668 - 11905: 0xC9E3, + 25669 - 11905: 0xDEF3, + 25670 - 11905: 0xB0DA, + 25671 - 11905: 0xD2A1, + 25672 - 11905: 0xB1F7, + 25673 - 11905: 0x9396, + 25674 - 11905: 0xCCAF, + 25675 - 11905: 0x9397, + 25676 - 11905: 0x9398, + 25677 - 11905: 0x9399, + 25678 - 11905: 0x939A, + 25679 - 11905: 0x939B, + 25680 - 11905: 0x939C, + 25681 - 11905: 0x939D, + 25682 - 11905: 0xDEF0, + 25683 - 11905: 0x939E, + 25684 - 11905: 0xCBA4, + 25685 - 11905: 0x939F, + 25686 - 11905: 0x93A0, + 25687 - 11905: 0x93A1, + 25688 - 11905: 0xD5AA, + 25689 - 11905: 0x93A2, + 25690 - 11905: 0x93A3, + 25691 - 11905: 0x93A4, + 25692 - 11905: 0x93A5, + 25693 - 11905: 0x93A6, + 25694 - 11905: 0xDEFB, + 25695 - 11905: 0x93A7, + 25696 - 11905: 0x93A8, + 25697 - 11905: 0x93A9, + 25698 - 11905: 0x93AA, + 25699 - 11905: 0x93AB, + 25700 - 11905: 0x93AC, + 25701 - 11905: 0x93AD, + 25702 - 11905: 0x93AE, + 25703 - 11905: 0xB4DD, + 25704 - 11905: 0x93AF, + 25705 - 11905: 0xC4A6, + 25706 - 11905: 0x93B0, + 25707 - 11905: 0x93B1, + 25708 - 11905: 0x93B2, + 25709 - 11905: 0xDEFD, + 25710 - 11905: 0x93B3, + 25711 - 11905: 0x93B4, + 25712 - 11905: 0x93B5, + 25713 - 11905: 0x93B6, + 25714 - 11905: 0x93B7, + 25715 - 11905: 0x93B8, + 25716 - 11905: 0x93B9, + 25717 - 11905: 0x93BA, + 25718 - 11905: 0x93BB, + 25719 - 11905: 0x93BC, + 25720 - 11905: 0xC3FE, + 25721 - 11905: 0xC4A1, + 25722 - 11905: 0xDFA1, + 25723 - 11905: 0x93BD, + 25724 - 11905: 0x93BE, + 25725 - 11905: 0x93BF, + 25726 - 11905: 0x93C0, + 25727 - 11905: 0x93C1, + 25728 - 11905: 0x93C2, + 25729 - 11905: 0x93C3, + 25730 - 11905: 0xC1CC, + 25731 - 11905: 0x93C4, + 25732 - 11905: 0xDEFC, + 25733 - 11905: 0xBEEF, + 25734 - 11905: 0x93C5, + 25735 - 11905: 0xC6B2, + 25736 - 11905: 0x93C6, + 25737 - 11905: 0x93C7, + 25738 - 11905: 0x93C8, + 25739 - 11905: 0x93C9, + 25740 - 11905: 0x93CA, + 25741 - 11905: 0x93CB, + 25742 - 11905: 0x93CC, + 25743 - 11905: 0x93CD, + 25744 - 11905: 0x93CE, + 25745 - 11905: 0xB3C5, + 25746 - 11905: 0xC8F6, + 25747 - 11905: 0x93CF, + 25748 - 11905: 0x93D0, + 25749 - 11905: 0xCBBA, + 25750 - 11905: 0xDEFE, + 25751 - 11905: 0x93D1, + 25752 - 11905: 0x93D2, + 25753 - 11905: 0xDFA4, + 25754 - 11905: 0x93D3, + 25755 - 11905: 0x93D4, + 25756 - 11905: 0x93D5, + 25757 - 11905: 0x93D6, + 25758 - 11905: 0xD7B2, + 25759 - 11905: 0x93D7, + 25760 - 11905: 0x93D8, + 25761 - 11905: 0x93D9, + 25762 - 11905: 0x93DA, + 25763 - 11905: 0x93DB, + 25764 - 11905: 0xB3B7, + 25765 - 11905: 0x93DC, + 25766 - 11905: 0x93DD, + 25767 - 11905: 0x93DE, + 25768 - 11905: 0x93DF, + 25769 - 11905: 0xC1C3, + 25770 - 11905: 0x93E0, + 25771 - 11905: 0x93E1, + 25772 - 11905: 0xC7CB, + 25773 - 11905: 0xB2A5, + 25774 - 11905: 0xB4E9, + 25775 - 11905: 0x93E2, + 25776 - 11905: 0xD7AB, + 25777 - 11905: 0x93E3, + 25778 - 11905: 0x93E4, + 25779 - 11905: 0x93E5, + 25780 - 11905: 0x93E6, + 25781 - 11905: 0xC4EC, + 25782 - 11905: 0x93E7, + 25783 - 11905: 0xDFA2, + 25784 - 11905: 0xDFA3, + 25785 - 11905: 0x93E8, + 25786 - 11905: 0xDFA5, + 25787 - 11905: 0x93E9, + 25788 - 11905: 0xBAB3, + 25789 - 11905: 0x93EA, + 25790 - 11905: 0x93EB, + 25791 - 11905: 0x93EC, + 25792 - 11905: 0xDFA6, + 25793 - 11905: 0x93ED, + 25794 - 11905: 0xC0DE, + 25795 - 11905: 0x93EE, + 25796 - 11905: 0x93EF, + 25797 - 11905: 0xC9C3, + 25798 - 11905: 0x93F0, + 25799 - 11905: 0x93F1, + 25800 - 11905: 0x93F2, + 25801 - 11905: 0x93F3, + 25802 - 11905: 0x93F4, + 25803 - 11905: 0x93F5, + 25804 - 11905: 0x93F6, + 25805 - 11905: 0xB2D9, + 25806 - 11905: 0xC7E6, + 25807 - 11905: 0x93F7, + 25808 - 11905: 0xDFA7, + 25809 - 11905: 0x93F8, + 25810 - 11905: 0xC7DC, + 25811 - 11905: 0x93F9, + 25812 - 11905: 0x93FA, + 25813 - 11905: 0x93FB, + 25814 - 11905: 0x93FC, + 25815 - 11905: 0xDFA8, + 25816 - 11905: 0xEBA2, + 25817 - 11905: 0x93FD, + 25818 - 11905: 0x93FE, + 25819 - 11905: 0x9440, + 25820 - 11905: 0x9441, + 25821 - 11905: 0x9442, + 25822 - 11905: 0xCBD3, + 25823 - 11905: 0x9443, + 25824 - 11905: 0x9444, + 25825 - 11905: 0x9445, + 25826 - 11905: 0xDFAA, + 25827 - 11905: 0x9446, + 25828 - 11905: 0xDFA9, + 25829 - 11905: 0x9447, + 25830 - 11905: 0xB2C1, + 25831 - 11905: 0x9448, + 25832 - 11905: 0x9449, + 25833 - 11905: 0x944A, + 25834 - 11905: 0x944B, + 25835 - 11905: 0x944C, + 25836 - 11905: 0x944D, + 25837 - 11905: 0x944E, + 25838 - 11905: 0x944F, + 25839 - 11905: 0x9450, + 25840 - 11905: 0x9451, + 25841 - 11905: 0x9452, + 25842 - 11905: 0x9453, + 25843 - 11905: 0x9454, + 25844 - 11905: 0x9455, + 25845 - 11905: 0x9456, + 25846 - 11905: 0x9457, + 25847 - 11905: 0x9458, + 25848 - 11905: 0x9459, + 25849 - 11905: 0x945A, + 25850 - 11905: 0x945B, + 25851 - 11905: 0x945C, + 25852 - 11905: 0x945D, + 25853 - 11905: 0x945E, + 25854 - 11905: 0x945F, + 25855 - 11905: 0x9460, + 25856 - 11905: 0xC5CA, + 25857 - 11905: 0x9461, + 25858 - 11905: 0x9462, + 25859 - 11905: 0x9463, + 25860 - 11905: 0x9464, + 25861 - 11905: 0x9465, + 25862 - 11905: 0x9466, + 25863 - 11905: 0x9467, + 25864 - 11905: 0x9468, + 25865 - 11905: 0xDFAB, + 25866 - 11905: 0x9469, + 25867 - 11905: 0x946A, + 25868 - 11905: 0x946B, + 25869 - 11905: 0x946C, + 25870 - 11905: 0x946D, + 25871 - 11905: 0x946E, + 25872 - 11905: 0x946F, + 25873 - 11905: 0x9470, + 25874 - 11905: 0xD4DC, + 25875 - 11905: 0x9471, + 25876 - 11905: 0x9472, + 25877 - 11905: 0x9473, + 25878 - 11905: 0x9474, + 25879 - 11905: 0x9475, + 25880 - 11905: 0xC8C1, + 25881 - 11905: 0x9476, + 25882 - 11905: 0x9477, + 25883 - 11905: 0x9478, + 25884 - 11905: 0x9479, + 25885 - 11905: 0x947A, + 25886 - 11905: 0x947B, + 25887 - 11905: 0x947C, + 25888 - 11905: 0x947D, + 25889 - 11905: 0x947E, + 25890 - 11905: 0x9480, + 25891 - 11905: 0x9481, + 25892 - 11905: 0x9482, + 25893 - 11905: 0xDFAC, + 25894 - 11905: 0x9483, + 25895 - 11905: 0x9484, + 25896 - 11905: 0x9485, + 25897 - 11905: 0x9486, + 25898 - 11905: 0x9487, + 25899 - 11905: 0xBEF0, + 25900 - 11905: 0x9488, + 25901 - 11905: 0x9489, + 25902 - 11905: 0xDFAD, + 25903 - 11905: 0xD6A7, + 25904 - 11905: 0x948A, + 25905 - 11905: 0x948B, + 25906 - 11905: 0x948C, + 25907 - 11905: 0x948D, + 25908 - 11905: 0xEAB7, + 25909 - 11905: 0xEBB6, + 25910 - 11905: 0xCAD5, + 25911 - 11905: 0x948E, + 25912 - 11905: 0xD8FC, + 25913 - 11905: 0xB8C4, + 25914 - 11905: 0x948F, + 25915 - 11905: 0xB9A5, + 25916 - 11905: 0x9490, + 25917 - 11905: 0x9491, + 25918 - 11905: 0xB7C5, + 25919 - 11905: 0xD5FE, + 25920 - 11905: 0x9492, + 25921 - 11905: 0x9493, + 25922 - 11905: 0x9494, + 25923 - 11905: 0x9495, + 25924 - 11905: 0x9496, + 25925 - 11905: 0xB9CA, + 25926 - 11905: 0x9497, + 25927 - 11905: 0x9498, + 25928 - 11905: 0xD0A7, + 25929 - 11905: 0xF4CD, + 25930 - 11905: 0x9499, + 25931 - 11905: 0x949A, + 25932 - 11905: 0xB5D0, + 25933 - 11905: 0x949B, + 25934 - 11905: 0x949C, + 25935 - 11905: 0xC3F4, + 25936 - 11905: 0x949D, + 25937 - 11905: 0xBEC8, + 25938 - 11905: 0x949E, + 25939 - 11905: 0x949F, + 25940 - 11905: 0x94A0, + 25941 - 11905: 0xEBB7, + 25942 - 11905: 0xB0BD, + 25943 - 11905: 0x94A1, + 25944 - 11905: 0x94A2, + 25945 - 11905: 0xBDCC, + 25946 - 11905: 0x94A3, + 25947 - 11905: 0xC1B2, + 25948 - 11905: 0x94A4, + 25949 - 11905: 0xB1D6, + 25950 - 11905: 0xB3A8, + 25951 - 11905: 0x94A5, + 25952 - 11905: 0x94A6, + 25953 - 11905: 0x94A7, + 25954 - 11905: 0xB8D2, + 25955 - 11905: 0xC9A2, + 25956 - 11905: 0x94A8, + 25957 - 11905: 0x94A9, + 25958 - 11905: 0xB6D8, + 25959 - 11905: 0x94AA, + 25960 - 11905: 0x94AB, + 25961 - 11905: 0x94AC, + 25962 - 11905: 0x94AD, + 25963 - 11905: 0xEBB8, + 25964 - 11905: 0xBEB4, + 25965 - 11905: 0x94AE, + 25966 - 11905: 0x94AF, + 25967 - 11905: 0x94B0, + 25968 - 11905: 0xCAFD, + 25969 - 11905: 0x94B1, + 25970 - 11905: 0xC7C3, + 25971 - 11905: 0x94B2, + 25972 - 11905: 0xD5FB, + 25973 - 11905: 0x94B3, + 25974 - 11905: 0x94B4, + 25975 - 11905: 0xB7F3, + 25976 - 11905: 0x94B5, + 25977 - 11905: 0x94B6, + 25978 - 11905: 0x94B7, + 25979 - 11905: 0x94B8, + 25980 - 11905: 0x94B9, + 25981 - 11905: 0x94BA, + 25982 - 11905: 0x94BB, + 25983 - 11905: 0x94BC, + 25984 - 11905: 0x94BD, + 25985 - 11905: 0x94BE, + 25986 - 11905: 0x94BF, + 25987 - 11905: 0x94C0, + 25988 - 11905: 0x94C1, + 25989 - 11905: 0x94C2, + 25990 - 11905: 0x94C3, + 25991 - 11905: 0xCEC4, + 25992 - 11905: 0x94C4, + 25993 - 11905: 0x94C5, + 25994 - 11905: 0x94C6, + 25995 - 11905: 0xD5AB, + 25996 - 11905: 0xB1F3, + 25997 - 11905: 0x94C7, + 25998 - 11905: 0x94C8, + 25999 - 11905: 0x94C9, + 26000 - 11905: 0xECB3, + 26001 - 11905: 0xB0DF, + 26002 - 11905: 0x94CA, + 26003 - 11905: 0xECB5, + 26004 - 11905: 0x94CB, + 26005 - 11905: 0x94CC, + 26006 - 11905: 0x94CD, + 26007 - 11905: 0xB6B7, + 26008 - 11905: 0x94CE, + 26009 - 11905: 0xC1CF, + 26010 - 11905: 0x94CF, + 26011 - 11905: 0xF5FA, + 26012 - 11905: 0xD0B1, + 26013 - 11905: 0x94D0, + 26014 - 11905: 0x94D1, + 26015 - 11905: 0xD5E5, + 26016 - 11905: 0x94D2, + 26017 - 11905: 0xCED3, + 26018 - 11905: 0x94D3, + 26019 - 11905: 0x94D4, + 26020 - 11905: 0xBDEF, + 26021 - 11905: 0xB3E2, + 26022 - 11905: 0x94D5, + 26023 - 11905: 0xB8AB, + 26024 - 11905: 0x94D6, + 26025 - 11905: 0xD5B6, + 26026 - 11905: 0x94D7, + 26027 - 11905: 0xEDBD, + 26028 - 11905: 0x94D8, + 26029 - 11905: 0xB6CF, + 26030 - 11905: 0x94D9, + 26031 - 11905: 0xCBB9, + 26032 - 11905: 0xD0C2, + 26033 - 11905: 0x94DA, + 26034 - 11905: 0x94DB, + 26035 - 11905: 0x94DC, + 26036 - 11905: 0x94DD, + 26037 - 11905: 0x94DE, + 26038 - 11905: 0x94DF, + 26039 - 11905: 0x94E0, + 26040 - 11905: 0x94E1, + 26041 - 11905: 0xB7BD, + 26042 - 11905: 0x94E2, + 26043 - 11905: 0x94E3, + 26044 - 11905: 0xECB6, + 26045 - 11905: 0xCAA9, + 26046 - 11905: 0x94E4, + 26047 - 11905: 0x94E5, + 26048 - 11905: 0x94E6, + 26049 - 11905: 0xC5D4, + 26050 - 11905: 0x94E7, + 26051 - 11905: 0xECB9, + 26052 - 11905: 0xECB8, + 26053 - 11905: 0xC2C3, + 26054 - 11905: 0xECB7, + 26055 - 11905: 0x94E8, + 26056 - 11905: 0x94E9, + 26057 - 11905: 0x94EA, + 26058 - 11905: 0x94EB, + 26059 - 11905: 0xD0FD, + 26060 - 11905: 0xECBA, + 26061 - 11905: 0x94EC, + 26062 - 11905: 0xECBB, + 26063 - 11905: 0xD7E5, + 26064 - 11905: 0x94ED, + 26065 - 11905: 0x94EE, + 26066 - 11905: 0xECBC, + 26067 - 11905: 0x94EF, + 26068 - 11905: 0x94F0, + 26069 - 11905: 0x94F1, + 26070 - 11905: 0xECBD, + 26071 - 11905: 0xC6EC, + 26072 - 11905: 0x94F2, + 26073 - 11905: 0x94F3, + 26074 - 11905: 0x94F4, + 26075 - 11905: 0x94F5, + 26076 - 11905: 0x94F6, + 26077 - 11905: 0x94F7, + 26078 - 11905: 0x94F8, + 26079 - 11905: 0x94F9, + 26080 - 11905: 0xCEDE, + 26081 - 11905: 0x94FA, + 26082 - 11905: 0xBCC8, + 26083 - 11905: 0x94FB, + 26084 - 11905: 0x94FC, + 26085 - 11905: 0xC8D5, + 26086 - 11905: 0xB5A9, + 26087 - 11905: 0xBEC9, + 26088 - 11905: 0xD6BC, + 26089 - 11905: 0xD4E7, + 26090 - 11905: 0x94FD, + 26091 - 11905: 0x94FE, + 26092 - 11905: 0xD1AE, + 26093 - 11905: 0xD0F1, + 26094 - 11905: 0xEAB8, + 26095 - 11905: 0xEAB9, + 26096 - 11905: 0xEABA, + 26097 - 11905: 0xBAB5, + 26098 - 11905: 0x9540, + 26099 - 11905: 0x9541, + 26100 - 11905: 0x9542, + 26101 - 11905: 0x9543, + 26102 - 11905: 0xCAB1, + 26103 - 11905: 0xBFF5, + 26104 - 11905: 0x9544, + 26105 - 11905: 0x9545, + 26106 - 11905: 0xCDFA, + 26107 - 11905: 0x9546, + 26108 - 11905: 0x9547, + 26109 - 11905: 0x9548, + 26110 - 11905: 0x9549, + 26111 - 11905: 0x954A, + 26112 - 11905: 0xEAC0, + 26113 - 11905: 0x954B, + 26114 - 11905: 0xB0BA, + 26115 - 11905: 0xEABE, + 26116 - 11905: 0x954C, + 26117 - 11905: 0x954D, + 26118 - 11905: 0xC0A5, + 26119 - 11905: 0x954E, + 26120 - 11905: 0x954F, + 26121 - 11905: 0x9550, + 26122 - 11905: 0xEABB, + 26123 - 11905: 0x9551, + 26124 - 11905: 0xB2FD, + 26125 - 11905: 0x9552, + 26126 - 11905: 0xC3F7, + 26127 - 11905: 0xBBE8, + 26128 - 11905: 0x9553, + 26129 - 11905: 0x9554, + 26130 - 11905: 0x9555, + 26131 - 11905: 0xD2D7, + 26132 - 11905: 0xCEF4, + 26133 - 11905: 0xEABF, + 26134 - 11905: 0x9556, + 26135 - 11905: 0x9557, + 26136 - 11905: 0x9558, + 26137 - 11905: 0xEABC, + 26138 - 11905: 0x9559, + 26139 - 11905: 0x955A, + 26140 - 11905: 0x955B, + 26141 - 11905: 0xEAC3, + 26142 - 11905: 0x955C, + 26143 - 11905: 0xD0C7, + 26144 - 11905: 0xD3B3, + 26145 - 11905: 0x955D, + 26146 - 11905: 0x955E, + 26147 - 11905: 0x955F, + 26148 - 11905: 0x9560, + 26149 - 11905: 0xB4BA, + 26150 - 11905: 0x9561, + 26151 - 11905: 0xC3C1, + 26152 - 11905: 0xD7F2, + 26153 - 11905: 0x9562, + 26154 - 11905: 0x9563, + 26155 - 11905: 0x9564, + 26156 - 11905: 0x9565, + 26157 - 11905: 0xD5D1, + 26158 - 11905: 0x9566, + 26159 - 11905: 0xCAC7, + 26160 - 11905: 0x9567, + 26161 - 11905: 0xEAC5, + 26162 - 11905: 0x9568, + 26163 - 11905: 0x9569, + 26164 - 11905: 0xEAC4, + 26165 - 11905: 0xEAC7, + 26166 - 11905: 0xEAC6, + 26167 - 11905: 0x956A, + 26168 - 11905: 0x956B, + 26169 - 11905: 0x956C, + 26170 - 11905: 0x956D, + 26171 - 11905: 0x956E, + 26172 - 11905: 0xD6E7, + 26173 - 11905: 0x956F, + 26174 - 11905: 0xCFD4, + 26175 - 11905: 0x9570, + 26176 - 11905: 0x9571, + 26177 - 11905: 0xEACB, + 26178 - 11905: 0x9572, + 26179 - 11905: 0xBBCE, + 26180 - 11905: 0x9573, + 26181 - 11905: 0x9574, + 26182 - 11905: 0x9575, + 26183 - 11905: 0x9576, + 26184 - 11905: 0x9577, + 26185 - 11905: 0x9578, + 26186 - 11905: 0x9579, + 26187 - 11905: 0xBDFA, + 26188 - 11905: 0xC9CE, + 26189 - 11905: 0x957A, + 26190 - 11905: 0x957B, + 26191 - 11905: 0xEACC, + 26192 - 11905: 0x957C, + 26193 - 11905: 0x957D, + 26194 - 11905: 0xC9B9, + 26195 - 11905: 0xCFFE, + 26196 - 11905: 0xEACA, + 26197 - 11905: 0xD4CE, + 26198 - 11905: 0xEACD, + 26199 - 11905: 0xEACF, + 26200 - 11905: 0x957E, + 26201 - 11905: 0x9580, + 26202 - 11905: 0xCDED, + 26203 - 11905: 0x9581, + 26204 - 11905: 0x9582, + 26205 - 11905: 0x9583, + 26206 - 11905: 0x9584, + 26207 - 11905: 0xEAC9, + 26208 - 11905: 0x9585, + 26209 - 11905: 0xEACE, + 26210 - 11905: 0x9586, + 26211 - 11905: 0x9587, + 26212 - 11905: 0xCEEE, + 26213 - 11905: 0x9588, + 26214 - 11905: 0xBBDE, + 26215 - 11905: 0x9589, + 26216 - 11905: 0xB3BF, + 26217 - 11905: 0x958A, + 26218 - 11905: 0x958B, + 26219 - 11905: 0x958C, + 26220 - 11905: 0x958D, + 26221 - 11905: 0x958E, + 26222 - 11905: 0xC6D5, + 26223 - 11905: 0xBEB0, + 26224 - 11905: 0xCEFA, + 26225 - 11905: 0x958F, + 26226 - 11905: 0x9590, + 26227 - 11905: 0x9591, + 26228 - 11905: 0xC7E7, + 26229 - 11905: 0x9592, + 26230 - 11905: 0xBEA7, + 26231 - 11905: 0xEAD0, + 26232 - 11905: 0x9593, + 26233 - 11905: 0x9594, + 26234 - 11905: 0xD6C7, + 26235 - 11905: 0x9595, + 26236 - 11905: 0x9596, + 26237 - 11905: 0x9597, + 26238 - 11905: 0xC1C0, + 26239 - 11905: 0x9598, + 26240 - 11905: 0x9599, + 26241 - 11905: 0x959A, + 26242 - 11905: 0xD4DD, + 26243 - 11905: 0x959B, + 26244 - 11905: 0xEAD1, + 26245 - 11905: 0x959C, + 26246 - 11905: 0x959D, + 26247 - 11905: 0xCFBE, + 26248 - 11905: 0x959E, + 26249 - 11905: 0x959F, + 26250 - 11905: 0x95A0, + 26251 - 11905: 0x95A1, + 26252 - 11905: 0xEAD2, + 26253 - 11905: 0x95A2, + 26254 - 11905: 0x95A3, + 26255 - 11905: 0x95A4, + 26256 - 11905: 0x95A5, + 26257 - 11905: 0xCAEE, + 26258 - 11905: 0x95A6, + 26259 - 11905: 0x95A7, + 26260 - 11905: 0x95A8, + 26261 - 11905: 0x95A9, + 26262 - 11905: 0xC5AF, + 26263 - 11905: 0xB0B5, + 26264 - 11905: 0x95AA, + 26265 - 11905: 0x95AB, + 26266 - 11905: 0x95AC, + 26267 - 11905: 0x95AD, + 26268 - 11905: 0x95AE, + 26269 - 11905: 0xEAD4, + 26270 - 11905: 0x95AF, + 26271 - 11905: 0x95B0, + 26272 - 11905: 0x95B1, + 26273 - 11905: 0x95B2, + 26274 - 11905: 0x95B3, + 26275 - 11905: 0x95B4, + 26276 - 11905: 0x95B5, + 26277 - 11905: 0x95B6, + 26278 - 11905: 0x95B7, + 26279 - 11905: 0xEAD3, + 26280 - 11905: 0xF4DF, + 26281 - 11905: 0x95B8, + 26282 - 11905: 0x95B9, + 26283 - 11905: 0x95BA, + 26284 - 11905: 0x95BB, + 26285 - 11905: 0x95BC, + 26286 - 11905: 0xC4BA, + 26287 - 11905: 0x95BD, + 26288 - 11905: 0x95BE, + 26289 - 11905: 0x95BF, + 26290 - 11905: 0x95C0, + 26291 - 11905: 0x95C1, + 26292 - 11905: 0xB1A9, + 26293 - 11905: 0x95C2, + 26294 - 11905: 0x95C3, + 26295 - 11905: 0x95C4, + 26296 - 11905: 0x95C5, + 26297 - 11905: 0xE5DF, + 26298 - 11905: 0x95C6, + 26299 - 11905: 0x95C7, + 26300 - 11905: 0x95C8, + 26301 - 11905: 0x95C9, + 26302 - 11905: 0xEAD5, + 26303 - 11905: 0x95CA, + 26304 - 11905: 0x95CB, + 26305 - 11905: 0x95CC, + 26306 - 11905: 0x95CD, + 26307 - 11905: 0x95CE, + 26308 - 11905: 0x95CF, + 26309 - 11905: 0x95D0, + 26310 - 11905: 0x95D1, + 26311 - 11905: 0x95D2, + 26312 - 11905: 0x95D3, + 26313 - 11905: 0x95D4, + 26314 - 11905: 0x95D5, + 26315 - 11905: 0x95D6, + 26316 - 11905: 0x95D7, + 26317 - 11905: 0x95D8, + 26318 - 11905: 0x95D9, + 26319 - 11905: 0x95DA, + 26320 - 11905: 0x95DB, + 26321 - 11905: 0x95DC, + 26322 - 11905: 0x95DD, + 26323 - 11905: 0x95DE, + 26324 - 11905: 0x95DF, + 26325 - 11905: 0x95E0, + 26326 - 11905: 0x95E1, + 26327 - 11905: 0x95E2, + 26328 - 11905: 0x95E3, + 26329 - 11905: 0xCAEF, + 26330 - 11905: 0x95E4, + 26331 - 11905: 0xEAD6, + 26332 - 11905: 0xEAD7, + 26333 - 11905: 0xC6D8, + 26334 - 11905: 0x95E5, + 26335 - 11905: 0x95E6, + 26336 - 11905: 0x95E7, + 26337 - 11905: 0x95E8, + 26338 - 11905: 0x95E9, + 26339 - 11905: 0x95EA, + 26340 - 11905: 0x95EB, + 26341 - 11905: 0x95EC, + 26342 - 11905: 0xEAD8, + 26343 - 11905: 0x95ED, + 26344 - 11905: 0x95EE, + 26345 - 11905: 0xEAD9, + 26346 - 11905: 0x95EF, + 26347 - 11905: 0x95F0, + 26348 - 11905: 0x95F1, + 26349 - 11905: 0x95F2, + 26350 - 11905: 0x95F3, + 26351 - 11905: 0x95F4, + 26352 - 11905: 0xD4BB, + 26353 - 11905: 0x95F5, + 26354 - 11905: 0xC7FA, + 26355 - 11905: 0xD2B7, + 26356 - 11905: 0xB8FC, + 26357 - 11905: 0x95F6, + 26358 - 11905: 0x95F7, + 26359 - 11905: 0xEAC2, + 26360 - 11905: 0x95F8, + 26361 - 11905: 0xB2DC, + 26362 - 11905: 0x95F9, + 26363 - 11905: 0x95FA, + 26364 - 11905: 0xC2FC, + 26365 - 11905: 0x95FB, + 26366 - 11905: 0xD4F8, + 26367 - 11905: 0xCCE6, + 26368 - 11905: 0xD7EE, + 26369 - 11905: 0x95FC, + 26370 - 11905: 0x95FD, + 26371 - 11905: 0x95FE, + 26372 - 11905: 0x9640, + 26373 - 11905: 0x9641, + 26374 - 11905: 0x9642, + 26375 - 11905: 0x9643, + 26376 - 11905: 0xD4C2, + 26377 - 11905: 0xD3D0, + 26378 - 11905: 0xEBC3, + 26379 - 11905: 0xC5F3, + 26380 - 11905: 0x9644, + 26381 - 11905: 0xB7FE, + 26382 - 11905: 0x9645, + 26383 - 11905: 0x9646, + 26384 - 11905: 0xEBD4, + 26385 - 11905: 0x9647, + 26386 - 11905: 0x9648, + 26387 - 11905: 0x9649, + 26388 - 11905: 0xCBB7, + 26389 - 11905: 0xEBDE, + 26390 - 11905: 0x964A, + 26391 - 11905: 0xC0CA, + 26392 - 11905: 0x964B, + 26393 - 11905: 0x964C, + 26394 - 11905: 0x964D, + 26395 - 11905: 0xCDFB, + 26396 - 11905: 0x964E, + 26397 - 11905: 0xB3AF, + 26398 - 11905: 0x964F, + 26399 - 11905: 0xC6DA, + 26400 - 11905: 0x9650, + 26401 - 11905: 0x9651, + 26402 - 11905: 0x9652, + 26403 - 11905: 0x9653, + 26404 - 11905: 0x9654, + 26405 - 11905: 0x9655, + 26406 - 11905: 0xEBFC, + 26407 - 11905: 0x9656, + 26408 - 11905: 0xC4BE, + 26409 - 11905: 0x9657, + 26410 - 11905: 0xCEB4, + 26411 - 11905: 0xC4A9, + 26412 - 11905: 0xB1BE, + 26413 - 11905: 0xD4FD, + 26414 - 11905: 0x9658, + 26415 - 11905: 0xCAF5, + 26416 - 11905: 0x9659, + 26417 - 11905: 0xD6EC, + 26418 - 11905: 0x965A, + 26419 - 11905: 0x965B, + 26420 - 11905: 0xC6D3, + 26421 - 11905: 0xB6E4, + 26422 - 11905: 0x965C, + 26423 - 11905: 0x965D, + 26424 - 11905: 0x965E, + 26425 - 11905: 0x965F, + 26426 - 11905: 0xBBFA, + 26427 - 11905: 0x9660, + 26428 - 11905: 0x9661, + 26429 - 11905: 0xD0E0, + 26430 - 11905: 0x9662, + 26431 - 11905: 0x9663, + 26432 - 11905: 0xC9B1, + 26433 - 11905: 0x9664, + 26434 - 11905: 0xD4D3, + 26435 - 11905: 0xC8A8, + 26436 - 11905: 0x9665, + 26437 - 11905: 0x9666, + 26438 - 11905: 0xB8CB, + 26439 - 11905: 0x9667, + 26440 - 11905: 0xE8BE, + 26441 - 11905: 0xC9BC, + 26442 - 11905: 0x9668, + 26443 - 11905: 0x9669, + 26444 - 11905: 0xE8BB, + 26445 - 11905: 0x966A, + 26446 - 11905: 0xC0EE, + 26447 - 11905: 0xD0D3, + 26448 - 11905: 0xB2C4, + 26449 - 11905: 0xB4E5, + 26450 - 11905: 0x966B, + 26451 - 11905: 0xE8BC, + 26452 - 11905: 0x966C, + 26453 - 11905: 0x966D, + 26454 - 11905: 0xD5C8, + 26455 - 11905: 0x966E, + 26456 - 11905: 0x966F, + 26457 - 11905: 0x9670, + 26458 - 11905: 0x9671, + 26459 - 11905: 0x9672, + 26460 - 11905: 0xB6C5, + 26461 - 11905: 0x9673, + 26462 - 11905: 0xE8BD, + 26463 - 11905: 0xCAF8, + 26464 - 11905: 0xB8DC, + 26465 - 11905: 0xCCF5, + 26466 - 11905: 0x9674, + 26467 - 11905: 0x9675, + 26468 - 11905: 0x9676, + 26469 - 11905: 0xC0B4, + 26470 - 11905: 0x9677, + 26471 - 11905: 0x9678, + 26472 - 11905: 0xD1EE, + 26473 - 11905: 0xE8BF, + 26474 - 11905: 0xE8C2, + 26475 - 11905: 0x9679, + 26476 - 11905: 0x967A, + 26477 - 11905: 0xBABC, + 26478 - 11905: 0x967B, + 26479 - 11905: 0xB1AD, + 26480 - 11905: 0xBDDC, + 26481 - 11905: 0x967C, + 26482 - 11905: 0xEABD, + 26483 - 11905: 0xE8C3, + 26484 - 11905: 0x967D, + 26485 - 11905: 0xE8C6, + 26486 - 11905: 0x967E, + 26487 - 11905: 0xE8CB, + 26488 - 11905: 0x9680, + 26489 - 11905: 0x9681, + 26490 - 11905: 0x9682, + 26491 - 11905: 0x9683, + 26492 - 11905: 0xE8CC, + 26493 - 11905: 0x9684, + 26494 - 11905: 0xCBC9, + 26495 - 11905: 0xB0E5, + 26496 - 11905: 0x9685, + 26497 - 11905: 0xBCAB, + 26498 - 11905: 0x9686, + 26499 - 11905: 0x9687, + 26500 - 11905: 0xB9B9, + 26501 - 11905: 0x9688, + 26502 - 11905: 0x9689, + 26503 - 11905: 0xE8C1, + 26504 - 11905: 0x968A, + 26505 - 11905: 0xCDF7, + 26506 - 11905: 0x968B, + 26507 - 11905: 0xE8CA, + 26508 - 11905: 0x968C, + 26509 - 11905: 0x968D, + 26510 - 11905: 0x968E, + 26511 - 11905: 0x968F, + 26512 - 11905: 0xCEF6, + 26513 - 11905: 0x9690, + 26514 - 11905: 0x9691, + 26515 - 11905: 0x9692, + 26516 - 11905: 0x9693, + 26517 - 11905: 0xD5ED, + 26518 - 11905: 0x9694, + 26519 - 11905: 0xC1D6, + 26520 - 11905: 0xE8C4, + 26521 - 11905: 0x9695, + 26522 - 11905: 0xC3B6, + 26523 - 11905: 0x9696, + 26524 - 11905: 0xB9FB, + 26525 - 11905: 0xD6A6, + 26526 - 11905: 0xE8C8, + 26527 - 11905: 0x9697, + 26528 - 11905: 0x9698, + 26529 - 11905: 0x9699, + 26530 - 11905: 0xCAE0, + 26531 - 11905: 0xD4E6, + 26532 - 11905: 0x969A, + 26533 - 11905: 0xE8C0, + 26534 - 11905: 0x969B, + 26535 - 11905: 0xE8C5, + 26536 - 11905: 0xE8C7, + 26537 - 11905: 0x969C, + 26538 - 11905: 0xC7B9, + 26539 - 11905: 0xB7E3, + 26540 - 11905: 0x969D, + 26541 - 11905: 0xE8C9, + 26542 - 11905: 0x969E, + 26543 - 11905: 0xBFDD, + 26544 - 11905: 0xE8D2, + 26545 - 11905: 0x969F, + 26546 - 11905: 0x96A0, + 26547 - 11905: 0xE8D7, + 26548 - 11905: 0x96A1, + 26549 - 11905: 0xE8D5, + 26550 - 11905: 0xBCDC, + 26551 - 11905: 0xBCCF, + 26552 - 11905: 0xE8DB, + 26553 - 11905: 0x96A2, + 26554 - 11905: 0x96A3, + 26555 - 11905: 0x96A4, + 26556 - 11905: 0x96A5, + 26557 - 11905: 0x96A6, + 26558 - 11905: 0x96A7, + 26559 - 11905: 0x96A8, + 26560 - 11905: 0x96A9, + 26561 - 11905: 0xE8DE, + 26562 - 11905: 0x96AA, + 26563 - 11905: 0xE8DA, + 26564 - 11905: 0xB1FA, + 26565 - 11905: 0x96AB, + 26566 - 11905: 0x96AC, + 26567 - 11905: 0x96AD, + 26568 - 11905: 0x96AE, + 26569 - 11905: 0x96AF, + 26570 - 11905: 0x96B0, + 26571 - 11905: 0x96B1, + 26572 - 11905: 0x96B2, + 26573 - 11905: 0x96B3, + 26574 - 11905: 0x96B4, + 26575 - 11905: 0xB0D8, + 26576 - 11905: 0xC4B3, + 26577 - 11905: 0xB8CC, + 26578 - 11905: 0xC6E2, + 26579 - 11905: 0xC8BE, + 26580 - 11905: 0xC8E1, + 26581 - 11905: 0x96B5, + 26582 - 11905: 0x96B6, + 26583 - 11905: 0x96B7, + 26584 - 11905: 0xE8CF, + 26585 - 11905: 0xE8D4, + 26586 - 11905: 0xE8D6, + 26587 - 11905: 0x96B8, + 26588 - 11905: 0xB9F1, + 26589 - 11905: 0xE8D8, + 26590 - 11905: 0xD7F5, + 26591 - 11905: 0x96B9, + 26592 - 11905: 0xC4FB, + 26593 - 11905: 0x96BA, + 26594 - 11905: 0xE8DC, + 26595 - 11905: 0x96BB, + 26596 - 11905: 0x96BC, + 26597 - 11905: 0xB2E9, + 26598 - 11905: 0x96BD, + 26599 - 11905: 0x96BE, + 26600 - 11905: 0x96BF, + 26601 - 11905: 0xE8D1, + 26602 - 11905: 0x96C0, + 26603 - 11905: 0x96C1, + 26604 - 11905: 0xBCED, + 26605 - 11905: 0x96C2, + 26606 - 11905: 0x96C3, + 26607 - 11905: 0xBFC2, + 26608 - 11905: 0xE8CD, + 26609 - 11905: 0xD6F9, + 26610 - 11905: 0x96C4, + 26611 - 11905: 0xC1F8, + 26612 - 11905: 0xB2F1, + 26613 - 11905: 0x96C5, + 26614 - 11905: 0x96C6, + 26615 - 11905: 0x96C7, + 26616 - 11905: 0x96C8, + 26617 - 11905: 0x96C9, + 26618 - 11905: 0x96CA, + 26619 - 11905: 0x96CB, + 26620 - 11905: 0x96CC, + 26621 - 11905: 0xE8DF, + 26622 - 11905: 0x96CD, + 26623 - 11905: 0xCAC1, + 26624 - 11905: 0xE8D9, + 26625 - 11905: 0x96CE, + 26626 - 11905: 0x96CF, + 26627 - 11905: 0x96D0, + 26628 - 11905: 0x96D1, + 26629 - 11905: 0xD5A4, + 26630 - 11905: 0x96D2, + 26631 - 11905: 0xB1EA, + 26632 - 11905: 0xD5BB, + 26633 - 11905: 0xE8CE, + 26634 - 11905: 0xE8D0, + 26635 - 11905: 0xB6B0, + 26636 - 11905: 0xE8D3, + 26637 - 11905: 0x96D3, + 26638 - 11905: 0xE8DD, + 26639 - 11905: 0xC0B8, + 26640 - 11905: 0x96D4, + 26641 - 11905: 0xCAF7, + 26642 - 11905: 0x96D5, + 26643 - 11905: 0xCBA8, + 26644 - 11905: 0x96D6, + 26645 - 11905: 0x96D7, + 26646 - 11905: 0xC6DC, + 26647 - 11905: 0xC0F5, + 26648 - 11905: 0x96D8, + 26649 - 11905: 0x96D9, + 26650 - 11905: 0x96DA, + 26651 - 11905: 0x96DB, + 26652 - 11905: 0x96DC, + 26653 - 11905: 0xE8E9, + 26654 - 11905: 0x96DD, + 26655 - 11905: 0x96DE, + 26656 - 11905: 0x96DF, + 26657 - 11905: 0xD0A3, + 26658 - 11905: 0x96E0, + 26659 - 11905: 0x96E1, + 26660 - 11905: 0x96E2, + 26661 - 11905: 0x96E3, + 26662 - 11905: 0x96E4, + 26663 - 11905: 0x96E5, + 26664 - 11905: 0x96E6, + 26665 - 11905: 0xE8F2, + 26666 - 11905: 0xD6EA, + 26667 - 11905: 0x96E7, + 26668 - 11905: 0x96E8, + 26669 - 11905: 0x96E9, + 26670 - 11905: 0x96EA, + 26671 - 11905: 0x96EB, + 26672 - 11905: 0x96EC, + 26673 - 11905: 0x96ED, + 26674 - 11905: 0xE8E0, + 26675 - 11905: 0xE8E1, + 26676 - 11905: 0x96EE, + 26677 - 11905: 0x96EF, + 26678 - 11905: 0x96F0, + 26679 - 11905: 0xD1F9, + 26680 - 11905: 0xBACB, + 26681 - 11905: 0xB8F9, + 26682 - 11905: 0x96F1, + 26683 - 11905: 0x96F2, + 26684 - 11905: 0xB8F1, + 26685 - 11905: 0xD4D4, + 26686 - 11905: 0xE8EF, + 26687 - 11905: 0x96F3, + 26688 - 11905: 0xE8EE, + 26689 - 11905: 0xE8EC, + 26690 - 11905: 0xB9F0, + 26691 - 11905: 0xCCD2, + 26692 - 11905: 0xE8E6, + 26693 - 11905: 0xCEA6, + 26694 - 11905: 0xBFF2, + 26695 - 11905: 0x96F4, + 26696 - 11905: 0xB0B8, + 26697 - 11905: 0xE8F1, + 26698 - 11905: 0xE8F0, + 26699 - 11905: 0x96F5, + 26700 - 11905: 0xD7C0, + 26701 - 11905: 0x96F6, + 26702 - 11905: 0xE8E4, + 26703 - 11905: 0x96F7, + 26704 - 11905: 0xCDA9, + 26705 - 11905: 0xC9A3, + 26706 - 11905: 0x96F8, + 26707 - 11905: 0xBBB8, + 26708 - 11905: 0xBDDB, + 26709 - 11905: 0xE8EA, + 26710 - 11905: 0x96F9, + 26711 - 11905: 0x96FA, + 26712 - 11905: 0x96FB, + 26713 - 11905: 0x96FC, + 26714 - 11905: 0x96FD, + 26715 - 11905: 0x96FE, + 26716 - 11905: 0x9740, + 26717 - 11905: 0x9741, + 26718 - 11905: 0x9742, + 26719 - 11905: 0x9743, + 26720 - 11905: 0xE8E2, + 26721 - 11905: 0xE8E3, + 26722 - 11905: 0xE8E5, + 26723 - 11905: 0xB5B5, + 26724 - 11905: 0xE8E7, + 26725 - 11905: 0xC7C5, + 26726 - 11905: 0xE8EB, + 26727 - 11905: 0xE8ED, + 26728 - 11905: 0xBDB0, + 26729 - 11905: 0xD7AE, + 26730 - 11905: 0x9744, + 26731 - 11905: 0xE8F8, + 26732 - 11905: 0x9745, + 26733 - 11905: 0x9746, + 26734 - 11905: 0x9747, + 26735 - 11905: 0x9748, + 26736 - 11905: 0x9749, + 26737 - 11905: 0x974A, + 26738 - 11905: 0x974B, + 26739 - 11905: 0x974C, + 26740 - 11905: 0xE8F5, + 26741 - 11905: 0x974D, + 26742 - 11905: 0xCDB0, + 26743 - 11905: 0xE8F6, + 26744 - 11905: 0x974E, + 26745 - 11905: 0x974F, + 26746 - 11905: 0x9750, + 26747 - 11905: 0x9751, + 26748 - 11905: 0x9752, + 26749 - 11905: 0x9753, + 26750 - 11905: 0x9754, + 26751 - 11905: 0x9755, + 26752 - 11905: 0x9756, + 26753 - 11905: 0xC1BA, + 26754 - 11905: 0x9757, + 26755 - 11905: 0xE8E8, + 26756 - 11905: 0x9758, + 26757 - 11905: 0xC3B7, + 26758 - 11905: 0xB0F0, + 26759 - 11905: 0x9759, + 26760 - 11905: 0x975A, + 26761 - 11905: 0x975B, + 26762 - 11905: 0x975C, + 26763 - 11905: 0x975D, + 26764 - 11905: 0x975E, + 26765 - 11905: 0x975F, + 26766 - 11905: 0x9760, + 26767 - 11905: 0xE8F4, + 26768 - 11905: 0x9761, + 26769 - 11905: 0x9762, + 26770 - 11905: 0x9763, + 26771 - 11905: 0xE8F7, + 26772 - 11905: 0x9764, + 26773 - 11905: 0x9765, + 26774 - 11905: 0x9766, + 26775 - 11905: 0xB9A3, + 26776 - 11905: 0x9767, + 26777 - 11905: 0x9768, + 26778 - 11905: 0x9769, + 26779 - 11905: 0x976A, + 26780 - 11905: 0x976B, + 26781 - 11905: 0x976C, + 26782 - 11905: 0x976D, + 26783 - 11905: 0x976E, + 26784 - 11905: 0x976F, + 26785 - 11905: 0x9770, + 26786 - 11905: 0xC9D2, + 26787 - 11905: 0x9771, + 26788 - 11905: 0x9772, + 26789 - 11905: 0x9773, + 26790 - 11905: 0xC3CE, + 26791 - 11905: 0xCEE0, + 26792 - 11905: 0xC0E6, + 26793 - 11905: 0x9774, + 26794 - 11905: 0x9775, + 26795 - 11905: 0x9776, + 26796 - 11905: 0x9777, + 26797 - 11905: 0xCBF3, + 26798 - 11905: 0x9778, + 26799 - 11905: 0xCCDD, + 26800 - 11905: 0xD0B5, + 26801 - 11905: 0x9779, + 26802 - 11905: 0x977A, + 26803 - 11905: 0xCAE1, + 26804 - 11905: 0x977B, + 26805 - 11905: 0xE8F3, + 26806 - 11905: 0x977C, + 26807 - 11905: 0x977D, + 26808 - 11905: 0x977E, + 26809 - 11905: 0x9780, + 26810 - 11905: 0x9781, + 26811 - 11905: 0x9782, + 26812 - 11905: 0x9783, + 26813 - 11905: 0x9784, + 26814 - 11905: 0x9785, + 26815 - 11905: 0x9786, + 26816 - 11905: 0xBCEC, + 26817 - 11905: 0x9787, + 26818 - 11905: 0xE8F9, + 26819 - 11905: 0x9788, + 26820 - 11905: 0x9789, + 26821 - 11905: 0x978A, + 26822 - 11905: 0x978B, + 26823 - 11905: 0x978C, + 26824 - 11905: 0x978D, + 26825 - 11905: 0xC3DE, + 26826 - 11905: 0x978E, + 26827 - 11905: 0xC6E5, + 26828 - 11905: 0x978F, + 26829 - 11905: 0xB9F7, + 26830 - 11905: 0x9790, + 26831 - 11905: 0x9791, + 26832 - 11905: 0x9792, + 26833 - 11905: 0x9793, + 26834 - 11905: 0xB0F4, + 26835 - 11905: 0x9794, + 26836 - 11905: 0x9795, + 26837 - 11905: 0xD7D8, + 26838 - 11905: 0x9796, + 26839 - 11905: 0x9797, + 26840 - 11905: 0xBCAC, + 26841 - 11905: 0x9798, + 26842 - 11905: 0xC5EF, + 26843 - 11905: 0x9799, + 26844 - 11905: 0x979A, + 26845 - 11905: 0x979B, + 26846 - 11905: 0x979C, + 26847 - 11905: 0x979D, + 26848 - 11905: 0xCCC4, + 26849 - 11905: 0x979E, + 26850 - 11905: 0x979F, + 26851 - 11905: 0xE9A6, + 26852 - 11905: 0x97A0, + 26853 - 11905: 0x97A1, + 26854 - 11905: 0x97A2, + 26855 - 11905: 0x97A3, + 26856 - 11905: 0x97A4, + 26857 - 11905: 0x97A5, + 26858 - 11905: 0x97A6, + 26859 - 11905: 0x97A7, + 26860 - 11905: 0x97A8, + 26861 - 11905: 0x97A9, + 26862 - 11905: 0xC9AD, + 26863 - 11905: 0x97AA, + 26864 - 11905: 0xE9A2, + 26865 - 11905: 0xC0E2, + 26866 - 11905: 0x97AB, + 26867 - 11905: 0x97AC, + 26868 - 11905: 0x97AD, + 26869 - 11905: 0xBFC3, + 26870 - 11905: 0x97AE, + 26871 - 11905: 0x97AF, + 26872 - 11905: 0x97B0, + 26873 - 11905: 0xE8FE, + 26874 - 11905: 0xB9D7, + 26875 - 11905: 0x97B1, + 26876 - 11905: 0xE8FB, + 26877 - 11905: 0x97B2, + 26878 - 11905: 0x97B3, + 26879 - 11905: 0x97B4, + 26880 - 11905: 0x97B5, + 26881 - 11905: 0xE9A4, + 26882 - 11905: 0x97B6, + 26883 - 11905: 0x97B7, + 26884 - 11905: 0x97B8, + 26885 - 11905: 0xD2CE, + 26886 - 11905: 0x97B9, + 26887 - 11905: 0x97BA, + 26888 - 11905: 0x97BB, + 26889 - 11905: 0x97BC, + 26890 - 11905: 0x97BD, + 26891 - 11905: 0xE9A3, + 26892 - 11905: 0x97BE, + 26893 - 11905: 0xD6B2, + 26894 - 11905: 0xD7B5, + 26895 - 11905: 0x97BF, + 26896 - 11905: 0xE9A7, + 26897 - 11905: 0x97C0, + 26898 - 11905: 0xBDB7, + 26899 - 11905: 0x97C1, + 26900 - 11905: 0x97C2, + 26901 - 11905: 0x97C3, + 26902 - 11905: 0x97C4, + 26903 - 11905: 0x97C5, + 26904 - 11905: 0x97C6, + 26905 - 11905: 0x97C7, + 26906 - 11905: 0x97C8, + 26907 - 11905: 0x97C9, + 26908 - 11905: 0x97CA, + 26909 - 11905: 0x97CB, + 26910 - 11905: 0x97CC, + 26911 - 11905: 0xE8FC, + 26912 - 11905: 0xE8FD, + 26913 - 11905: 0x97CD, + 26914 - 11905: 0x97CE, + 26915 - 11905: 0x97CF, + 26916 - 11905: 0xE9A1, + 26917 - 11905: 0x97D0, + 26918 - 11905: 0x97D1, + 26919 - 11905: 0x97D2, + 26920 - 11905: 0x97D3, + 26921 - 11905: 0x97D4, + 26922 - 11905: 0x97D5, + 26923 - 11905: 0x97D6, + 26924 - 11905: 0x97D7, + 26925 - 11905: 0xCDD6, + 26926 - 11905: 0x97D8, + 26927 - 11905: 0x97D9, + 26928 - 11905: 0xD2AC, + 26929 - 11905: 0x97DA, + 26930 - 11905: 0x97DB, + 26931 - 11905: 0x97DC, + 26932 - 11905: 0xE9B2, + 26933 - 11905: 0x97DD, + 26934 - 11905: 0x97DE, + 26935 - 11905: 0x97DF, + 26936 - 11905: 0x97E0, + 26937 - 11905: 0xE9A9, + 26938 - 11905: 0x97E1, + 26939 - 11905: 0x97E2, + 26940 - 11905: 0x97E3, + 26941 - 11905: 0xB4AA, + 26942 - 11905: 0x97E4, + 26943 - 11905: 0xB4BB, + 26944 - 11905: 0x97E5, + 26945 - 11905: 0x97E6, + 26946 - 11905: 0xE9AB, + 26947 - 11905: 0x97E7, + 26948 - 11905: 0x97E8, + 26949 - 11905: 0x97E9, + 26950 - 11905: 0x97EA, + 26951 - 11905: 0x97EB, + 26952 - 11905: 0x97EC, + 26953 - 11905: 0x97ED, + 26954 - 11905: 0x97EE, + 26955 - 11905: 0x97EF, + 26956 - 11905: 0x97F0, + 26957 - 11905: 0x97F1, + 26958 - 11905: 0x97F2, + 26959 - 11905: 0x97F3, + 26960 - 11905: 0x97F4, + 26961 - 11905: 0x97F5, + 26962 - 11905: 0x97F6, + 26963 - 11905: 0x97F7, + 26964 - 11905: 0xD0A8, + 26965 - 11905: 0x97F8, + 26966 - 11905: 0x97F9, + 26967 - 11905: 0xE9A5, + 26968 - 11905: 0x97FA, + 26969 - 11905: 0x97FB, + 26970 - 11905: 0xB3FE, + 26971 - 11905: 0x97FC, + 26972 - 11905: 0x97FD, + 26973 - 11905: 0xE9AC, + 26974 - 11905: 0xC0E3, + 26975 - 11905: 0x97FE, + 26976 - 11905: 0xE9AA, + 26977 - 11905: 0x9840, + 26978 - 11905: 0x9841, + 26979 - 11905: 0xE9B9, + 26980 - 11905: 0x9842, + 26981 - 11905: 0x9843, + 26982 - 11905: 0xE9B8, + 26983 - 11905: 0x9844, + 26984 - 11905: 0x9845, + 26985 - 11905: 0x9846, + 26986 - 11905: 0x9847, + 26987 - 11905: 0xE9AE, + 26988 - 11905: 0x9848, + 26989 - 11905: 0x9849, + 26990 - 11905: 0xE8FA, + 26991 - 11905: 0x984A, + 26992 - 11905: 0x984B, + 26993 - 11905: 0xE9A8, + 26994 - 11905: 0x984C, + 26995 - 11905: 0x984D, + 26996 - 11905: 0x984E, + 26997 - 11905: 0x984F, + 26998 - 11905: 0x9850, + 26999 - 11905: 0xBFAC, + 27000 - 11905: 0xE9B1, + 27001 - 11905: 0xE9BA, + 27002 - 11905: 0x9851, + 27003 - 11905: 0x9852, + 27004 - 11905: 0xC2A5, + 27005 - 11905: 0x9853, + 27006 - 11905: 0x9854, + 27007 - 11905: 0x9855, + 27008 - 11905: 0xE9AF, + 27009 - 11905: 0x9856, + 27010 - 11905: 0xB8C5, + 27011 - 11905: 0x9857, + 27012 - 11905: 0xE9AD, + 27013 - 11905: 0x9858, + 27014 - 11905: 0xD3DC, + 27015 - 11905: 0xE9B4, + 27016 - 11905: 0xE9B5, + 27017 - 11905: 0xE9B7, + 27018 - 11905: 0x9859, + 27019 - 11905: 0x985A, + 27020 - 11905: 0x985B, + 27021 - 11905: 0xE9C7, + 27022 - 11905: 0x985C, + 27023 - 11905: 0x985D, + 27024 - 11905: 0x985E, + 27025 - 11905: 0x985F, + 27026 - 11905: 0x9860, + 27027 - 11905: 0x9861, + 27028 - 11905: 0xC0C6, + 27029 - 11905: 0xE9C5, + 27030 - 11905: 0x9862, + 27031 - 11905: 0x9863, + 27032 - 11905: 0xE9B0, + 27033 - 11905: 0x9864, + 27034 - 11905: 0x9865, + 27035 - 11905: 0xE9BB, + 27036 - 11905: 0xB0F1, + 27037 - 11905: 0x9866, + 27038 - 11905: 0x9867, + 27039 - 11905: 0x9868, + 27040 - 11905: 0x9869, + 27041 - 11905: 0x986A, + 27042 - 11905: 0x986B, + 27043 - 11905: 0x986C, + 27044 - 11905: 0x986D, + 27045 - 11905: 0x986E, + 27046 - 11905: 0x986F, + 27047 - 11905: 0xE9BC, + 27048 - 11905: 0xD5A5, + 27049 - 11905: 0x9870, + 27050 - 11905: 0x9871, + 27051 - 11905: 0xE9BE, + 27052 - 11905: 0x9872, + 27053 - 11905: 0xE9BF, + 27054 - 11905: 0x9873, + 27055 - 11905: 0x9874, + 27056 - 11905: 0x9875, + 27057 - 11905: 0xE9C1, + 27058 - 11905: 0x9876, + 27059 - 11905: 0x9877, + 27060 - 11905: 0xC1F1, + 27061 - 11905: 0x9878, + 27062 - 11905: 0x9879, + 27063 - 11905: 0xC8B6, + 27064 - 11905: 0x987A, + 27065 - 11905: 0x987B, + 27066 - 11905: 0x987C, + 27067 - 11905: 0xE9BD, + 27068 - 11905: 0x987D, + 27069 - 11905: 0x987E, + 27070 - 11905: 0x9880, + 27071 - 11905: 0x9881, + 27072 - 11905: 0x9882, + 27073 - 11905: 0xE9C2, + 27074 - 11905: 0x9883, + 27075 - 11905: 0x9884, + 27076 - 11905: 0x9885, + 27077 - 11905: 0x9886, + 27078 - 11905: 0x9887, + 27079 - 11905: 0x9888, + 27080 - 11905: 0x9889, + 27081 - 11905: 0x988A, + 27082 - 11905: 0xE9C3, + 27083 - 11905: 0x988B, + 27084 - 11905: 0xE9B3, + 27085 - 11905: 0x988C, + 27086 - 11905: 0xE9B6, + 27087 - 11905: 0x988D, + 27088 - 11905: 0xBBB1, + 27089 - 11905: 0x988E, + 27090 - 11905: 0x988F, + 27091 - 11905: 0x9890, + 27092 - 11905: 0xE9C0, + 27093 - 11905: 0x9891, + 27094 - 11905: 0x9892, + 27095 - 11905: 0x9893, + 27096 - 11905: 0x9894, + 27097 - 11905: 0x9895, + 27098 - 11905: 0x9896, + 27099 - 11905: 0xBCF7, + 27100 - 11905: 0x9897, + 27101 - 11905: 0x9898, + 27102 - 11905: 0x9899, + 27103 - 11905: 0xE9C4, + 27104 - 11905: 0xE9C6, + 27105 - 11905: 0x989A, + 27106 - 11905: 0x989B, + 27107 - 11905: 0x989C, + 27108 - 11905: 0x989D, + 27109 - 11905: 0x989E, + 27110 - 11905: 0x989F, + 27111 - 11905: 0x98A0, + 27112 - 11905: 0x98A1, + 27113 - 11905: 0x98A2, + 27114 - 11905: 0x98A3, + 27115 - 11905: 0x98A4, + 27116 - 11905: 0x98A5, + 27117 - 11905: 0xE9CA, + 27118 - 11905: 0x98A6, + 27119 - 11905: 0x98A7, + 27120 - 11905: 0x98A8, + 27121 - 11905: 0x98A9, + 27122 - 11905: 0xE9CE, + 27123 - 11905: 0x98AA, + 27124 - 11905: 0x98AB, + 27125 - 11905: 0x98AC, + 27126 - 11905: 0x98AD, + 27127 - 11905: 0x98AE, + 27128 - 11905: 0x98AF, + 27129 - 11905: 0x98B0, + 27130 - 11905: 0x98B1, + 27131 - 11905: 0x98B2, + 27132 - 11905: 0x98B3, + 27133 - 11905: 0xB2DB, + 27134 - 11905: 0x98B4, + 27135 - 11905: 0xE9C8, + 27136 - 11905: 0x98B5, + 27137 - 11905: 0x98B6, + 27138 - 11905: 0x98B7, + 27139 - 11905: 0x98B8, + 27140 - 11905: 0x98B9, + 27141 - 11905: 0x98BA, + 27142 - 11905: 0x98BB, + 27143 - 11905: 0x98BC, + 27144 - 11905: 0x98BD, + 27145 - 11905: 0x98BE, + 27146 - 11905: 0xB7AE, + 27147 - 11905: 0x98BF, + 27148 - 11905: 0x98C0, + 27149 - 11905: 0x98C1, + 27150 - 11905: 0x98C2, + 27151 - 11905: 0x98C3, + 27152 - 11905: 0x98C4, + 27153 - 11905: 0x98C5, + 27154 - 11905: 0x98C6, + 27155 - 11905: 0x98C7, + 27156 - 11905: 0x98C8, + 27157 - 11905: 0x98C9, + 27158 - 11905: 0x98CA, + 27159 - 11905: 0xE9CB, + 27160 - 11905: 0xE9CC, + 27161 - 11905: 0x98CB, + 27162 - 11905: 0x98CC, + 27163 - 11905: 0x98CD, + 27164 - 11905: 0x98CE, + 27165 - 11905: 0x98CF, + 27166 - 11905: 0x98D0, + 27167 - 11905: 0xD5C1, + 27168 - 11905: 0x98D1, + 27169 - 11905: 0xC4A3, + 27170 - 11905: 0x98D2, + 27171 - 11905: 0x98D3, + 27172 - 11905: 0x98D4, + 27173 - 11905: 0x98D5, + 27174 - 11905: 0x98D6, + 27175 - 11905: 0x98D7, + 27176 - 11905: 0xE9D8, + 27177 - 11905: 0x98D8, + 27178 - 11905: 0xBAE1, + 27179 - 11905: 0x98D9, + 27180 - 11905: 0x98DA, + 27181 - 11905: 0x98DB, + 27182 - 11905: 0x98DC, + 27183 - 11905: 0xE9C9, + 27184 - 11905: 0x98DD, + 27185 - 11905: 0xD3A3, + 27186 - 11905: 0x98DE, + 27187 - 11905: 0x98DF, + 27188 - 11905: 0x98E0, + 27189 - 11905: 0xE9D4, + 27190 - 11905: 0x98E1, + 27191 - 11905: 0x98E2, + 27192 - 11905: 0x98E3, + 27193 - 11905: 0x98E4, + 27194 - 11905: 0x98E5, + 27195 - 11905: 0x98E6, + 27196 - 11905: 0x98E7, + 27197 - 11905: 0xE9D7, + 27198 - 11905: 0xE9D0, + 27199 - 11905: 0x98E8, + 27200 - 11905: 0x98E9, + 27201 - 11905: 0x98EA, + 27202 - 11905: 0x98EB, + 27203 - 11905: 0x98EC, + 27204 - 11905: 0xE9CF, + 27205 - 11905: 0x98ED, + 27206 - 11905: 0x98EE, + 27207 - 11905: 0xC7C1, + 27208 - 11905: 0x98EF, + 27209 - 11905: 0x98F0, + 27210 - 11905: 0x98F1, + 27211 - 11905: 0x98F2, + 27212 - 11905: 0x98F3, + 27213 - 11905: 0x98F4, + 27214 - 11905: 0x98F5, + 27215 - 11905: 0x98F6, + 27216 - 11905: 0xE9D2, + 27217 - 11905: 0x98F7, + 27218 - 11905: 0x98F8, + 27219 - 11905: 0x98F9, + 27220 - 11905: 0x98FA, + 27221 - 11905: 0x98FB, + 27222 - 11905: 0x98FC, + 27223 - 11905: 0x98FD, + 27224 - 11905: 0xE9D9, + 27225 - 11905: 0xB3C8, + 27226 - 11905: 0x98FE, + 27227 - 11905: 0xE9D3, + 27228 - 11905: 0x9940, + 27229 - 11905: 0x9941, + 27230 - 11905: 0x9942, + 27231 - 11905: 0x9943, + 27232 - 11905: 0x9944, + 27233 - 11905: 0xCFF0, + 27234 - 11905: 0x9945, + 27235 - 11905: 0x9946, + 27236 - 11905: 0x9947, + 27237 - 11905: 0xE9CD, + 27238 - 11905: 0x9948, + 27239 - 11905: 0x9949, + 27240 - 11905: 0x994A, + 27241 - 11905: 0x994B, + 27242 - 11905: 0x994C, + 27243 - 11905: 0x994D, + 27244 - 11905: 0x994E, + 27245 - 11905: 0x994F, + 27246 - 11905: 0x9950, + 27247 - 11905: 0x9951, + 27248 - 11905: 0x9952, + 27249 - 11905: 0xB3F7, + 27250 - 11905: 0x9953, + 27251 - 11905: 0x9954, + 27252 - 11905: 0x9955, + 27253 - 11905: 0x9956, + 27254 - 11905: 0x9957, + 27255 - 11905: 0x9958, + 27256 - 11905: 0x9959, + 27257 - 11905: 0xE9D6, + 27258 - 11905: 0x995A, + 27259 - 11905: 0x995B, + 27260 - 11905: 0xE9DA, + 27261 - 11905: 0x995C, + 27262 - 11905: 0x995D, + 27263 - 11905: 0x995E, + 27264 - 11905: 0xCCB4, + 27265 - 11905: 0x995F, + 27266 - 11905: 0x9960, + 27267 - 11905: 0x9961, + 27268 - 11905: 0xCFAD, + 27269 - 11905: 0x9962, + 27270 - 11905: 0x9963, + 27271 - 11905: 0x9964, + 27272 - 11905: 0x9965, + 27273 - 11905: 0x9966, + 27274 - 11905: 0x9967, + 27275 - 11905: 0x9968, + 27276 - 11905: 0x9969, + 27277 - 11905: 0x996A, + 27278 - 11905: 0xE9D5, + 27279 - 11905: 0x996B, + 27280 - 11905: 0xE9DC, + 27281 - 11905: 0xE9DB, + 27282 - 11905: 0x996C, + 27283 - 11905: 0x996D, + 27284 - 11905: 0x996E, + 27285 - 11905: 0x996F, + 27286 - 11905: 0x9970, + 27287 - 11905: 0xE9DE, + 27288 - 11905: 0x9971, + 27289 - 11905: 0x9972, + 27290 - 11905: 0x9973, + 27291 - 11905: 0x9974, + 27292 - 11905: 0x9975, + 27293 - 11905: 0x9976, + 27294 - 11905: 0x9977, + 27295 - 11905: 0x9978, + 27296 - 11905: 0xE9D1, + 27297 - 11905: 0x9979, + 27298 - 11905: 0x997A, + 27299 - 11905: 0x997B, + 27300 - 11905: 0x997C, + 27301 - 11905: 0x997D, + 27302 - 11905: 0x997E, + 27303 - 11905: 0x9980, + 27304 - 11905: 0x9981, + 27305 - 11905: 0xE9DD, + 27306 - 11905: 0x9982, + 27307 - 11905: 0xE9DF, + 27308 - 11905: 0xC3CA, + 27309 - 11905: 0x9983, + 27310 - 11905: 0x9984, + 27311 - 11905: 0x9985, + 27312 - 11905: 0x9986, + 27313 - 11905: 0x9987, + 27314 - 11905: 0x9988, + 27315 - 11905: 0x9989, + 27316 - 11905: 0x998A, + 27317 - 11905: 0x998B, + 27318 - 11905: 0x998C, + 27319 - 11905: 0x998D, + 27320 - 11905: 0x998E, + 27321 - 11905: 0x998F, + 27322 - 11905: 0x9990, + 27323 - 11905: 0x9991, + 27324 - 11905: 0x9992, + 27325 - 11905: 0x9993, + 27326 - 11905: 0x9994, + 27327 - 11905: 0x9995, + 27328 - 11905: 0x9996, + 27329 - 11905: 0x9997, + 27330 - 11905: 0x9998, + 27331 - 11905: 0x9999, + 27332 - 11905: 0x999A, + 27333 - 11905: 0x999B, + 27334 - 11905: 0x999C, + 27335 - 11905: 0x999D, + 27336 - 11905: 0x999E, + 27337 - 11905: 0x999F, + 27338 - 11905: 0x99A0, + 27339 - 11905: 0x99A1, + 27340 - 11905: 0x99A2, + 27341 - 11905: 0x99A3, + 27342 - 11905: 0x99A4, + 27343 - 11905: 0x99A5, + 27344 - 11905: 0x99A6, + 27345 - 11905: 0x99A7, + 27346 - 11905: 0x99A8, + 27347 - 11905: 0x99A9, + 27348 - 11905: 0x99AA, + 27349 - 11905: 0x99AB, + 27350 - 11905: 0x99AC, + 27351 - 11905: 0x99AD, + 27352 - 11905: 0x99AE, + 27353 - 11905: 0x99AF, + 27354 - 11905: 0x99B0, + 27355 - 11905: 0x99B1, + 27356 - 11905: 0x99B2, + 27357 - 11905: 0x99B3, + 27358 - 11905: 0x99B4, + 27359 - 11905: 0x99B5, + 27360 - 11905: 0x99B6, + 27361 - 11905: 0x99B7, + 27362 - 11905: 0x99B8, + 27363 - 11905: 0x99B9, + 27364 - 11905: 0x99BA, + 27365 - 11905: 0x99BB, + 27366 - 11905: 0x99BC, + 27367 - 11905: 0x99BD, + 27368 - 11905: 0x99BE, + 27369 - 11905: 0x99BF, + 27370 - 11905: 0x99C0, + 27371 - 11905: 0x99C1, + 27372 - 11905: 0x99C2, + 27373 - 11905: 0x99C3, + 27374 - 11905: 0x99C4, + 27375 - 11905: 0x99C5, + 27376 - 11905: 0x99C6, + 27377 - 11905: 0x99C7, + 27378 - 11905: 0x99C8, + 27379 - 11905: 0x99C9, + 27380 - 11905: 0x99CA, + 27381 - 11905: 0x99CB, + 27382 - 11905: 0x99CC, + 27383 - 11905: 0x99CD, + 27384 - 11905: 0x99CE, + 27385 - 11905: 0x99CF, + 27386 - 11905: 0x99D0, + 27387 - 11905: 0x99D1, + 27388 - 11905: 0x99D2, + 27389 - 11905: 0x99D3, + 27390 - 11905: 0x99D4, + 27391 - 11905: 0x99D5, + 27392 - 11905: 0x99D6, + 27393 - 11905: 0x99D7, + 27394 - 11905: 0x99D8, + 27395 - 11905: 0x99D9, + 27396 - 11905: 0x99DA, + 27397 - 11905: 0x99DB, + 27398 - 11905: 0x99DC, + 27399 - 11905: 0x99DD, + 27400 - 11905: 0x99DE, + 27401 - 11905: 0x99DF, + 27402 - 11905: 0x99E0, + 27403 - 11905: 0x99E1, + 27404 - 11905: 0x99E2, + 27405 - 11905: 0x99E3, + 27406 - 11905: 0x99E4, + 27407 - 11905: 0x99E5, + 27408 - 11905: 0x99E6, + 27409 - 11905: 0x99E7, + 27410 - 11905: 0x99E8, + 27411 - 11905: 0x99E9, + 27412 - 11905: 0x99EA, + 27413 - 11905: 0x99EB, + 27414 - 11905: 0x99EC, + 27415 - 11905: 0x99ED, + 27416 - 11905: 0x99EE, + 27417 - 11905: 0x99EF, + 27418 - 11905: 0x99F0, + 27419 - 11905: 0x99F1, + 27420 - 11905: 0x99F2, + 27421 - 11905: 0x99F3, + 27422 - 11905: 0x99F4, + 27423 - 11905: 0x99F5, + 27424 - 11905: 0xC7B7, + 27425 - 11905: 0xB4CE, + 27426 - 11905: 0xBBB6, + 27427 - 11905: 0xD0C0, + 27428 - 11905: 0xECA3, + 27429 - 11905: 0x99F6, + 27430 - 11905: 0x99F7, + 27431 - 11905: 0xC5B7, + 27432 - 11905: 0x99F8, + 27433 - 11905: 0x99F9, + 27434 - 11905: 0x99FA, + 27435 - 11905: 0x99FB, + 27436 - 11905: 0x99FC, + 27437 - 11905: 0x99FD, + 27438 - 11905: 0x99FE, + 27439 - 11905: 0x9A40, + 27440 - 11905: 0x9A41, + 27441 - 11905: 0x9A42, + 27442 - 11905: 0xD3FB, + 27443 - 11905: 0x9A43, + 27444 - 11905: 0x9A44, + 27445 - 11905: 0x9A45, + 27446 - 11905: 0x9A46, + 27447 - 11905: 0xECA4, + 27448 - 11905: 0x9A47, + 27449 - 11905: 0xECA5, + 27450 - 11905: 0xC6DB, + 27451 - 11905: 0x9A48, + 27452 - 11905: 0x9A49, + 27453 - 11905: 0x9A4A, + 27454 - 11905: 0xBFEE, + 27455 - 11905: 0x9A4B, + 27456 - 11905: 0x9A4C, + 27457 - 11905: 0x9A4D, + 27458 - 11905: 0x9A4E, + 27459 - 11905: 0xECA6, + 27460 - 11905: 0x9A4F, + 27461 - 11905: 0x9A50, + 27462 - 11905: 0xECA7, + 27463 - 11905: 0xD0AA, + 27464 - 11905: 0x9A51, + 27465 - 11905: 0xC7B8, + 27466 - 11905: 0x9A52, + 27467 - 11905: 0x9A53, + 27468 - 11905: 0xB8E8, + 27469 - 11905: 0x9A54, + 27470 - 11905: 0x9A55, + 27471 - 11905: 0x9A56, + 27472 - 11905: 0x9A57, + 27473 - 11905: 0x9A58, + 27474 - 11905: 0x9A59, + 27475 - 11905: 0x9A5A, + 27476 - 11905: 0x9A5B, + 27477 - 11905: 0x9A5C, + 27478 - 11905: 0x9A5D, + 27479 - 11905: 0x9A5E, + 27480 - 11905: 0x9A5F, + 27481 - 11905: 0xECA8, + 27482 - 11905: 0x9A60, + 27483 - 11905: 0x9A61, + 27484 - 11905: 0x9A62, + 27485 - 11905: 0x9A63, + 27486 - 11905: 0x9A64, + 27487 - 11905: 0x9A65, + 27488 - 11905: 0x9A66, + 27489 - 11905: 0x9A67, + 27490 - 11905: 0xD6B9, + 27491 - 11905: 0xD5FD, + 27492 - 11905: 0xB4CB, + 27493 - 11905: 0xB2BD, + 27494 - 11905: 0xCEE4, + 27495 - 11905: 0xC6E7, + 27496 - 11905: 0x9A68, + 27497 - 11905: 0x9A69, + 27498 - 11905: 0xCDE1, + 27499 - 11905: 0x9A6A, + 27500 - 11905: 0x9A6B, + 27501 - 11905: 0x9A6C, + 27502 - 11905: 0x9A6D, + 27503 - 11905: 0x9A6E, + 27504 - 11905: 0x9A6F, + 27505 - 11905: 0x9A70, + 27506 - 11905: 0x9A71, + 27507 - 11905: 0x9A72, + 27508 - 11905: 0x9A73, + 27509 - 11905: 0x9A74, + 27510 - 11905: 0x9A75, + 27511 - 11905: 0x9A76, + 27512 - 11905: 0x9A77, + 27513 - 11905: 0xB4F5, + 27514 - 11905: 0x9A78, + 27515 - 11905: 0xCBC0, + 27516 - 11905: 0xBCDF, + 27517 - 11905: 0x9A79, + 27518 - 11905: 0x9A7A, + 27519 - 11905: 0x9A7B, + 27520 - 11905: 0x9A7C, + 27521 - 11905: 0xE9E2, + 27522 - 11905: 0xE9E3, + 27523 - 11905: 0xD1EA, + 27524 - 11905: 0xE9E5, + 27525 - 11905: 0x9A7D, + 27526 - 11905: 0xB4F9, + 27527 - 11905: 0xE9E4, + 27528 - 11905: 0x9A7E, + 27529 - 11905: 0xD1B3, + 27530 - 11905: 0xCAE2, + 27531 - 11905: 0xB2D0, + 27532 - 11905: 0x9A80, + 27533 - 11905: 0xE9E8, + 27534 - 11905: 0x9A81, + 27535 - 11905: 0x9A82, + 27536 - 11905: 0x9A83, + 27537 - 11905: 0x9A84, + 27538 - 11905: 0xE9E6, + 27539 - 11905: 0xE9E7, + 27540 - 11905: 0x9A85, + 27541 - 11905: 0x9A86, + 27542 - 11905: 0xD6B3, + 27543 - 11905: 0x9A87, + 27544 - 11905: 0x9A88, + 27545 - 11905: 0x9A89, + 27546 - 11905: 0xE9E9, + 27547 - 11905: 0xE9EA, + 27548 - 11905: 0x9A8A, + 27549 - 11905: 0x9A8B, + 27550 - 11905: 0x9A8C, + 27551 - 11905: 0x9A8D, + 27552 - 11905: 0x9A8E, + 27553 - 11905: 0xE9EB, + 27554 - 11905: 0x9A8F, + 27555 - 11905: 0x9A90, + 27556 - 11905: 0x9A91, + 27557 - 11905: 0x9A92, + 27558 - 11905: 0x9A93, + 27559 - 11905: 0x9A94, + 27560 - 11905: 0x9A95, + 27561 - 11905: 0x9A96, + 27562 - 11905: 0xE9EC, + 27563 - 11905: 0x9A97, + 27564 - 11905: 0x9A98, + 27565 - 11905: 0x9A99, + 27566 - 11905: 0x9A9A, + 27567 - 11905: 0x9A9B, + 27568 - 11905: 0x9A9C, + 27569 - 11905: 0x9A9D, + 27570 - 11905: 0x9A9E, + 27571 - 11905: 0xECAF, + 27572 - 11905: 0xC5B9, + 27573 - 11905: 0xB6CE, + 27574 - 11905: 0x9A9F, + 27575 - 11905: 0xD2F3, + 27576 - 11905: 0x9AA0, + 27577 - 11905: 0x9AA1, + 27578 - 11905: 0x9AA2, + 27579 - 11905: 0x9AA3, + 27580 - 11905: 0x9AA4, + 27581 - 11905: 0x9AA5, + 27582 - 11905: 0x9AA6, + 27583 - 11905: 0xB5EE, + 27584 - 11905: 0x9AA7, + 27585 - 11905: 0xBBD9, + 27586 - 11905: 0xECB1, + 27587 - 11905: 0x9AA8, + 27588 - 11905: 0x9AA9, + 27589 - 11905: 0xD2E3, + 27590 - 11905: 0x9AAA, + 27591 - 11905: 0x9AAB, + 27592 - 11905: 0x9AAC, + 27593 - 11905: 0x9AAD, + 27594 - 11905: 0x9AAE, + 27595 - 11905: 0xCEE3, + 27596 - 11905: 0x9AAF, + 27597 - 11905: 0xC4B8, + 27598 - 11905: 0x9AB0, + 27599 - 11905: 0xC3BF, + 27600 - 11905: 0x9AB1, + 27601 - 11905: 0x9AB2, + 27602 - 11905: 0xB6BE, + 27603 - 11905: 0xD8B9, + 27604 - 11905: 0xB1C8, + 27605 - 11905: 0xB1CF, + 27606 - 11905: 0xB1D1, + 27607 - 11905: 0xC5FE, + 27608 - 11905: 0x9AB3, + 27609 - 11905: 0xB1D0, + 27610 - 11905: 0x9AB4, + 27611 - 11905: 0xC3AB, + 27612 - 11905: 0x9AB5, + 27613 - 11905: 0x9AB6, + 27614 - 11905: 0x9AB7, + 27615 - 11905: 0x9AB8, + 27616 - 11905: 0x9AB9, + 27617 - 11905: 0xD5B1, + 27618 - 11905: 0x9ABA, + 27619 - 11905: 0x9ABB, + 27620 - 11905: 0x9ABC, + 27621 - 11905: 0x9ABD, + 27622 - 11905: 0x9ABE, + 27623 - 11905: 0x9ABF, + 27624 - 11905: 0x9AC0, + 27625 - 11905: 0x9AC1, + 27626 - 11905: 0xEBA4, + 27627 - 11905: 0xBAC1, + 27628 - 11905: 0x9AC2, + 27629 - 11905: 0x9AC3, + 27630 - 11905: 0x9AC4, + 27631 - 11905: 0xCCBA, + 27632 - 11905: 0x9AC5, + 27633 - 11905: 0x9AC6, + 27634 - 11905: 0x9AC7, + 27635 - 11905: 0xEBA5, + 27636 - 11905: 0x9AC8, + 27637 - 11905: 0xEBA7, + 27638 - 11905: 0x9AC9, + 27639 - 11905: 0x9ACA, + 27640 - 11905: 0x9ACB, + 27641 - 11905: 0xEBA8, + 27642 - 11905: 0x9ACC, + 27643 - 11905: 0x9ACD, + 27644 - 11905: 0x9ACE, + 27645 - 11905: 0xEBA6, + 27646 - 11905: 0x9ACF, + 27647 - 11905: 0x9AD0, + 27648 - 11905: 0x9AD1, + 27649 - 11905: 0x9AD2, + 27650 - 11905: 0x9AD3, + 27651 - 11905: 0x9AD4, + 27652 - 11905: 0x9AD5, + 27653 - 11905: 0xEBA9, + 27654 - 11905: 0xEBAB, + 27655 - 11905: 0xEBAA, + 27656 - 11905: 0x9AD6, + 27657 - 11905: 0x9AD7, + 27658 - 11905: 0x9AD8, + 27659 - 11905: 0x9AD9, + 27660 - 11905: 0x9ADA, + 27661 - 11905: 0xEBAC, + 27662 - 11905: 0x9ADB, + 27663 - 11905: 0xCACF, + 27664 - 11905: 0xD8B5, + 27665 - 11905: 0xC3F1, + 27666 - 11905: 0x9ADC, + 27667 - 11905: 0xC3A5, + 27668 - 11905: 0xC6F8, + 27669 - 11905: 0xEBAD, + 27670 - 11905: 0xC4CA, + 27671 - 11905: 0x9ADD, + 27672 - 11905: 0xEBAE, + 27673 - 11905: 0xEBAF, + 27674 - 11905: 0xEBB0, + 27675 - 11905: 0xB7D5, + 27676 - 11905: 0x9ADE, + 27677 - 11905: 0x9ADF, + 27678 - 11905: 0x9AE0, + 27679 - 11905: 0xB7FA, + 27680 - 11905: 0x9AE1, + 27681 - 11905: 0xEBB1, + 27682 - 11905: 0xC7E2, + 27683 - 11905: 0x9AE2, + 27684 - 11905: 0xEBB3, + 27685 - 11905: 0x9AE3, + 27686 - 11905: 0xBAA4, + 27687 - 11905: 0xD1F5, + 27688 - 11905: 0xB0B1, + 27689 - 11905: 0xEBB2, + 27690 - 11905: 0xEBB4, + 27691 - 11905: 0x9AE4, + 27692 - 11905: 0x9AE5, + 27693 - 11905: 0x9AE6, + 27694 - 11905: 0xB5AA, + 27695 - 11905: 0xC2C8, + 27696 - 11905: 0xC7E8, + 27697 - 11905: 0x9AE7, + 27698 - 11905: 0xEBB5, + 27699 - 11905: 0x9AE8, + 27700 - 11905: 0xCBAE, + 27701 - 11905: 0xE3DF, + 27702 - 11905: 0x9AE9, + 27703 - 11905: 0x9AEA, + 27704 - 11905: 0xD3C0, + 27705 - 11905: 0x9AEB, + 27706 - 11905: 0x9AEC, + 27707 - 11905: 0x9AED, + 27708 - 11905: 0x9AEE, + 27709 - 11905: 0xD9DB, + 27710 - 11905: 0x9AEF, + 27711 - 11905: 0x9AF0, + 27712 - 11905: 0xCDA1, + 27713 - 11905: 0xD6AD, + 27714 - 11905: 0xC7F3, + 27715 - 11905: 0x9AF1, + 27716 - 11905: 0x9AF2, + 27717 - 11905: 0x9AF3, + 27718 - 11905: 0xD9E0, + 27719 - 11905: 0xBBE3, + 27720 - 11905: 0x9AF4, + 27721 - 11905: 0xBABA, + 27722 - 11905: 0xE3E2, + 27723 - 11905: 0x9AF5, + 27724 - 11905: 0x9AF6, + 27725 - 11905: 0x9AF7, + 27726 - 11905: 0x9AF8, + 27727 - 11905: 0x9AF9, + 27728 - 11905: 0xCFAB, + 27729 - 11905: 0x9AFA, + 27730 - 11905: 0x9AFB, + 27731 - 11905: 0x9AFC, + 27732 - 11905: 0xE3E0, + 27733 - 11905: 0xC9C7, + 27734 - 11905: 0x9AFD, + 27735 - 11905: 0xBAB9, + 27736 - 11905: 0x9AFE, + 27737 - 11905: 0x9B40, + 27738 - 11905: 0x9B41, + 27739 - 11905: 0xD1B4, + 27740 - 11905: 0xE3E1, + 27741 - 11905: 0xC8EA, + 27742 - 11905: 0xB9AF, + 27743 - 11905: 0xBDAD, + 27744 - 11905: 0xB3D8, + 27745 - 11905: 0xCEDB, + 27746 - 11905: 0x9B42, + 27747 - 11905: 0x9B43, + 27748 - 11905: 0xCCC0, + 27749 - 11905: 0x9B44, + 27750 - 11905: 0x9B45, + 27751 - 11905: 0x9B46, + 27752 - 11905: 0xE3E8, + 27753 - 11905: 0xE3E9, + 27754 - 11905: 0xCDF4, + 27755 - 11905: 0x9B47, + 27756 - 11905: 0x9B48, + 27757 - 11905: 0x9B49, + 27758 - 11905: 0x9B4A, + 27759 - 11905: 0x9B4B, + 27760 - 11905: 0xCCAD, + 27761 - 11905: 0x9B4C, + 27762 - 11905: 0xBCB3, + 27763 - 11905: 0x9B4D, + 27764 - 11905: 0xE3EA, + 27765 - 11905: 0x9B4E, + 27766 - 11905: 0xE3EB, + 27767 - 11905: 0x9B4F, + 27768 - 11905: 0x9B50, + 27769 - 11905: 0xD0DA, + 27770 - 11905: 0x9B51, + 27771 - 11905: 0x9B52, + 27772 - 11905: 0x9B53, + 27773 - 11905: 0xC6FB, + 27774 - 11905: 0xB7DA, + 27775 - 11905: 0x9B54, + 27776 - 11905: 0x9B55, + 27777 - 11905: 0xC7DF, + 27778 - 11905: 0xD2CA, + 27779 - 11905: 0xCED6, + 27780 - 11905: 0x9B56, + 27781 - 11905: 0xE3E4, + 27782 - 11905: 0xE3EC, + 27783 - 11905: 0x9B57, + 27784 - 11905: 0xC9F2, + 27785 - 11905: 0xB3C1, + 27786 - 11905: 0x9B58, + 27787 - 11905: 0x9B59, + 27788 - 11905: 0xE3E7, + 27789 - 11905: 0x9B5A, + 27790 - 11905: 0x9B5B, + 27791 - 11905: 0xC6E3, + 27792 - 11905: 0xE3E5, + 27793 - 11905: 0x9B5C, + 27794 - 11905: 0x9B5D, + 27795 - 11905: 0xEDB3, + 27796 - 11905: 0xE3E6, + 27797 - 11905: 0x9B5E, + 27798 - 11905: 0x9B5F, + 27799 - 11905: 0x9B60, + 27800 - 11905: 0x9B61, + 27801 - 11905: 0xC9B3, + 27802 - 11905: 0x9B62, + 27803 - 11905: 0xC5E6, + 27804 - 11905: 0x9B63, + 27805 - 11905: 0x9B64, + 27806 - 11905: 0x9B65, + 27807 - 11905: 0xB9B5, + 27808 - 11905: 0x9B66, + 27809 - 11905: 0xC3BB, + 27810 - 11905: 0x9B67, + 27811 - 11905: 0xE3E3, + 27812 - 11905: 0xC5BD, + 27813 - 11905: 0xC1A4, + 27814 - 11905: 0xC2D9, + 27815 - 11905: 0xB2D7, + 27816 - 11905: 0x9B68, + 27817 - 11905: 0xE3ED, + 27818 - 11905: 0xBBA6, + 27819 - 11905: 0xC4AD, + 27820 - 11905: 0x9B69, + 27821 - 11905: 0xE3F0, + 27822 - 11905: 0xBEDA, + 27823 - 11905: 0x9B6A, + 27824 - 11905: 0x9B6B, + 27825 - 11905: 0xE3FB, + 27826 - 11905: 0xE3F5, + 27827 - 11905: 0xBAD3, + 27828 - 11905: 0x9B6C, + 27829 - 11905: 0x9B6D, + 27830 - 11905: 0x9B6E, + 27831 - 11905: 0x9B6F, + 27832 - 11905: 0xB7D0, + 27833 - 11905: 0xD3CD, + 27834 - 11905: 0x9B70, + 27835 - 11905: 0xD6CE, + 27836 - 11905: 0xD5D3, + 27837 - 11905: 0xB9C1, + 27838 - 11905: 0xD5B4, + 27839 - 11905: 0xD1D8, + 27840 - 11905: 0x9B71, + 27841 - 11905: 0x9B72, + 27842 - 11905: 0x9B73, + 27843 - 11905: 0x9B74, + 27844 - 11905: 0xD0B9, + 27845 - 11905: 0xC7F6, + 27846 - 11905: 0x9B75, + 27847 - 11905: 0x9B76, + 27848 - 11905: 0x9B77, + 27849 - 11905: 0xC8AA, + 27850 - 11905: 0xB2B4, + 27851 - 11905: 0x9B78, + 27852 - 11905: 0xC3DA, + 27853 - 11905: 0x9B79, + 27854 - 11905: 0x9B7A, + 27855 - 11905: 0x9B7B, + 27856 - 11905: 0xE3EE, + 27857 - 11905: 0x9B7C, + 27858 - 11905: 0x9B7D, + 27859 - 11905: 0xE3FC, + 27860 - 11905: 0xE3EF, + 27861 - 11905: 0xB7A8, + 27862 - 11905: 0xE3F7, + 27863 - 11905: 0xE3F4, + 27864 - 11905: 0x9B7E, + 27865 - 11905: 0x9B80, + 27866 - 11905: 0x9B81, + 27867 - 11905: 0xB7BA, + 27868 - 11905: 0x9B82, + 27869 - 11905: 0x9B83, + 27870 - 11905: 0xC5A2, + 27871 - 11905: 0x9B84, + 27872 - 11905: 0xE3F6, + 27873 - 11905: 0xC5DD, + 27874 - 11905: 0xB2A8, + 27875 - 11905: 0xC6FC, + 27876 - 11905: 0x9B85, + 27877 - 11905: 0xC4E0, + 27878 - 11905: 0x9B86, + 27879 - 11905: 0x9B87, + 27880 - 11905: 0xD7A2, + 27881 - 11905: 0x9B88, + 27882 - 11905: 0xC0E1, + 27883 - 11905: 0xE3F9, + 27884 - 11905: 0x9B89, + 27885 - 11905: 0x9B8A, + 27886 - 11905: 0xE3FA, + 27887 - 11905: 0xE3FD, + 27888 - 11905: 0xCCA9, + 27889 - 11905: 0xE3F3, + 27890 - 11905: 0x9B8B, + 27891 - 11905: 0xD3BE, + 27892 - 11905: 0x9B8C, + 27893 - 11905: 0xB1C3, + 27894 - 11905: 0xEDB4, + 27895 - 11905: 0xE3F1, + 27896 - 11905: 0xE3F2, + 27897 - 11905: 0x9B8D, + 27898 - 11905: 0xE3F8, + 27899 - 11905: 0xD0BA, + 27900 - 11905: 0xC6C3, + 27901 - 11905: 0xD4F3, + 27902 - 11905: 0xE3FE, + 27903 - 11905: 0x9B8E, + 27904 - 11905: 0x9B8F, + 27905 - 11905: 0xBDE0, + 27906 - 11905: 0x9B90, + 27907 - 11905: 0x9B91, + 27908 - 11905: 0xE4A7, + 27909 - 11905: 0x9B92, + 27910 - 11905: 0x9B93, + 27911 - 11905: 0xE4A6, + 27912 - 11905: 0x9B94, + 27913 - 11905: 0x9B95, + 27914 - 11905: 0x9B96, + 27915 - 11905: 0xD1F3, + 27916 - 11905: 0xE4A3, + 27917 - 11905: 0x9B97, + 27918 - 11905: 0xE4A9, + 27919 - 11905: 0x9B98, + 27920 - 11905: 0x9B99, + 27921 - 11905: 0x9B9A, + 27922 - 11905: 0xC8F7, + 27923 - 11905: 0x9B9B, + 27924 - 11905: 0x9B9C, + 27925 - 11905: 0x9B9D, + 27926 - 11905: 0x9B9E, + 27927 - 11905: 0xCFB4, + 27928 - 11905: 0x9B9F, + 27929 - 11905: 0xE4A8, + 27930 - 11905: 0xE4AE, + 27931 - 11905: 0xC2E5, + 27932 - 11905: 0x9BA0, + 27933 - 11905: 0x9BA1, + 27934 - 11905: 0xB6B4, + 27935 - 11905: 0x9BA2, + 27936 - 11905: 0x9BA3, + 27937 - 11905: 0x9BA4, + 27938 - 11905: 0x9BA5, + 27939 - 11905: 0x9BA6, + 27940 - 11905: 0x9BA7, + 27941 - 11905: 0xBDF2, + 27942 - 11905: 0x9BA8, + 27943 - 11905: 0xE4A2, + 27944 - 11905: 0x9BA9, + 27945 - 11905: 0x9BAA, + 27946 - 11905: 0xBAE9, + 27947 - 11905: 0xE4AA, + 27948 - 11905: 0x9BAB, + 27949 - 11905: 0x9BAC, + 27950 - 11905: 0xE4AC, + 27951 - 11905: 0x9BAD, + 27952 - 11905: 0x9BAE, + 27953 - 11905: 0xB6FD, + 27954 - 11905: 0xD6DE, + 27955 - 11905: 0xE4B2, + 27956 - 11905: 0x9BAF, + 27957 - 11905: 0xE4AD, + 27958 - 11905: 0x9BB0, + 27959 - 11905: 0x9BB1, + 27960 - 11905: 0x9BB2, + 27961 - 11905: 0xE4A1, + 27962 - 11905: 0x9BB3, + 27963 - 11905: 0xBBEE, + 27964 - 11905: 0xCDDD, + 27965 - 11905: 0xC7A2, + 27966 - 11905: 0xC5C9, + 27967 - 11905: 0x9BB4, + 27968 - 11905: 0x9BB5, + 27969 - 11905: 0xC1F7, + 27970 - 11905: 0x9BB6, + 27971 - 11905: 0xE4A4, + 27972 - 11905: 0x9BB7, + 27973 - 11905: 0xC7B3, + 27974 - 11905: 0xBDAC, + 27975 - 11905: 0xBDBD, + 27976 - 11905: 0xE4A5, + 27977 - 11905: 0x9BB8, + 27978 - 11905: 0xD7C7, + 27979 - 11905: 0xB2E2, + 27980 - 11905: 0x9BB9, + 27981 - 11905: 0xE4AB, + 27982 - 11905: 0xBCC3, + 27983 - 11905: 0xE4AF, + 27984 - 11905: 0x9BBA, + 27985 - 11905: 0xBBEB, + 27986 - 11905: 0xE4B0, + 27987 - 11905: 0xC5A8, + 27988 - 11905: 0xE4B1, + 27989 - 11905: 0x9BBB, + 27990 - 11905: 0x9BBC, + 27991 - 11905: 0x9BBD, + 27992 - 11905: 0x9BBE, + 27993 - 11905: 0xD5E3, + 27994 - 11905: 0xBFA3, + 27995 - 11905: 0x9BBF, + 27996 - 11905: 0xE4BA, + 27997 - 11905: 0x9BC0, + 27998 - 11905: 0xE4B7, + 27999 - 11905: 0x9BC1, + 28000 - 11905: 0xE4BB, + 28001 - 11905: 0x9BC2, + 28002 - 11905: 0x9BC3, + 28003 - 11905: 0xE4BD, + 28004 - 11905: 0x9BC4, + 28005 - 11905: 0x9BC5, + 28006 - 11905: 0xC6D6, + 28007 - 11905: 0x9BC6, + 28008 - 11905: 0x9BC7, + 28009 - 11905: 0xBAC6, + 28010 - 11905: 0xC0CB, + 28011 - 11905: 0x9BC8, + 28012 - 11905: 0x9BC9, + 28013 - 11905: 0x9BCA, + 28014 - 11905: 0xB8A1, + 28015 - 11905: 0xE4B4, + 28016 - 11905: 0x9BCB, + 28017 - 11905: 0x9BCC, + 28018 - 11905: 0x9BCD, + 28019 - 11905: 0x9BCE, + 28020 - 11905: 0xD4A1, + 28021 - 11905: 0x9BCF, + 28022 - 11905: 0x9BD0, + 28023 - 11905: 0xBAA3, + 28024 - 11905: 0xBDFE, + 28025 - 11905: 0x9BD1, + 28026 - 11905: 0x9BD2, + 28027 - 11905: 0x9BD3, + 28028 - 11905: 0xE4BC, + 28029 - 11905: 0x9BD4, + 28030 - 11905: 0x9BD5, + 28031 - 11905: 0x9BD6, + 28032 - 11905: 0x9BD7, + 28033 - 11905: 0x9BD8, + 28034 - 11905: 0xCDBF, + 28035 - 11905: 0x9BD9, + 28036 - 11905: 0x9BDA, + 28037 - 11905: 0xC4F9, + 28038 - 11905: 0x9BDB, + 28039 - 11905: 0x9BDC, + 28040 - 11905: 0xCFFB, + 28041 - 11905: 0xC9E6, + 28042 - 11905: 0x9BDD, + 28043 - 11905: 0x9BDE, + 28044 - 11905: 0xD3BF, + 28045 - 11905: 0x9BDF, + 28046 - 11905: 0xCFD1, + 28047 - 11905: 0x9BE0, + 28048 - 11905: 0x9BE1, + 28049 - 11905: 0xE4B3, + 28050 - 11905: 0x9BE2, + 28051 - 11905: 0xE4B8, + 28052 - 11905: 0xE4B9, + 28053 - 11905: 0xCCE9, + 28054 - 11905: 0x9BE3, + 28055 - 11905: 0x9BE4, + 28056 - 11905: 0x9BE5, + 28057 - 11905: 0x9BE6, + 28058 - 11905: 0x9BE7, + 28059 - 11905: 0xCCCE, + 28060 - 11905: 0x9BE8, + 28061 - 11905: 0xC0D4, + 28062 - 11905: 0xE4B5, + 28063 - 11905: 0xC1B0, + 28064 - 11905: 0xE4B6, + 28065 - 11905: 0xCED0, + 28066 - 11905: 0x9BE9, + 28067 - 11905: 0xBBC1, + 28068 - 11905: 0xB5D3, + 28069 - 11905: 0x9BEA, + 28070 - 11905: 0xC8F3, + 28071 - 11905: 0xBDA7, + 28072 - 11905: 0xD5C7, + 28073 - 11905: 0xC9AC, + 28074 - 11905: 0xB8A2, + 28075 - 11905: 0xE4CA, + 28076 - 11905: 0x9BEB, + 28077 - 11905: 0x9BEC, + 28078 - 11905: 0xE4CC, + 28079 - 11905: 0xD1C4, + 28080 - 11905: 0x9BED, + 28081 - 11905: 0x9BEE, + 28082 - 11905: 0xD2BA, + 28083 - 11905: 0x9BEF, + 28084 - 11905: 0x9BF0, + 28085 - 11905: 0xBAAD, + 28086 - 11905: 0x9BF1, + 28087 - 11905: 0x9BF2, + 28088 - 11905: 0xBAD4, + 28089 - 11905: 0x9BF3, + 28090 - 11905: 0x9BF4, + 28091 - 11905: 0x9BF5, + 28092 - 11905: 0x9BF6, + 28093 - 11905: 0x9BF7, + 28094 - 11905: 0x9BF8, + 28095 - 11905: 0xE4C3, + 28096 - 11905: 0xB5ED, + 28097 - 11905: 0x9BF9, + 28098 - 11905: 0x9BFA, + 28099 - 11905: 0x9BFB, + 28100 - 11905: 0xD7CD, + 28101 - 11905: 0xE4C0, + 28102 - 11905: 0xCFFD, + 28103 - 11905: 0xE4BF, + 28104 - 11905: 0x9BFC, + 28105 - 11905: 0x9BFD, + 28106 - 11905: 0x9BFE, + 28107 - 11905: 0xC1DC, + 28108 - 11905: 0xCCCA, + 28109 - 11905: 0x9C40, + 28110 - 11905: 0x9C41, + 28111 - 11905: 0x9C42, + 28112 - 11905: 0x9C43, + 28113 - 11905: 0xCAE7, + 28114 - 11905: 0x9C44, + 28115 - 11905: 0x9C45, + 28116 - 11905: 0x9C46, + 28117 - 11905: 0x9C47, + 28118 - 11905: 0xC4D7, + 28119 - 11905: 0x9C48, + 28120 - 11905: 0xCCD4, + 28121 - 11905: 0xE4C8, + 28122 - 11905: 0x9C49, + 28123 - 11905: 0x9C4A, + 28124 - 11905: 0x9C4B, + 28125 - 11905: 0xE4C7, + 28126 - 11905: 0xE4C1, + 28127 - 11905: 0x9C4C, + 28128 - 11905: 0xE4C4, + 28129 - 11905: 0xB5AD, + 28130 - 11905: 0x9C4D, + 28131 - 11905: 0x9C4E, + 28132 - 11905: 0xD3D9, + 28133 - 11905: 0x9C4F, + 28134 - 11905: 0xE4C6, + 28135 - 11905: 0x9C50, + 28136 - 11905: 0x9C51, + 28137 - 11905: 0x9C52, + 28138 - 11905: 0x9C53, + 28139 - 11905: 0xD2F9, + 28140 - 11905: 0xB4E3, + 28141 - 11905: 0x9C54, + 28142 - 11905: 0xBBB4, + 28143 - 11905: 0x9C55, + 28144 - 11905: 0x9C56, + 28145 - 11905: 0xC9EE, + 28146 - 11905: 0x9C57, + 28147 - 11905: 0xB4BE, + 28148 - 11905: 0x9C58, + 28149 - 11905: 0x9C59, + 28150 - 11905: 0x9C5A, + 28151 - 11905: 0xBBEC, + 28152 - 11905: 0x9C5B, + 28153 - 11905: 0xD1CD, + 28154 - 11905: 0x9C5C, + 28155 - 11905: 0xCCED, + 28156 - 11905: 0xEDB5, + 28157 - 11905: 0x9C5D, + 28158 - 11905: 0x9C5E, + 28159 - 11905: 0x9C5F, + 28160 - 11905: 0x9C60, + 28161 - 11905: 0x9C61, + 28162 - 11905: 0x9C62, + 28163 - 11905: 0x9C63, + 28164 - 11905: 0x9C64, + 28165 - 11905: 0xC7E5, + 28166 - 11905: 0x9C65, + 28167 - 11905: 0x9C66, + 28168 - 11905: 0x9C67, + 28169 - 11905: 0x9C68, + 28170 - 11905: 0xD4A8, + 28171 - 11905: 0x9C69, + 28172 - 11905: 0xE4CB, + 28173 - 11905: 0xD7D5, + 28174 - 11905: 0xE4C2, + 28175 - 11905: 0x9C6A, + 28176 - 11905: 0xBDA5, + 28177 - 11905: 0xE4C5, + 28178 - 11905: 0x9C6B, + 28179 - 11905: 0x9C6C, + 28180 - 11905: 0xD3E6, + 28181 - 11905: 0x9C6D, + 28182 - 11905: 0xE4C9, + 28183 - 11905: 0xC9F8, + 28184 - 11905: 0x9C6E, + 28185 - 11905: 0x9C6F, + 28186 - 11905: 0xE4BE, + 28187 - 11905: 0x9C70, + 28188 - 11905: 0x9C71, + 28189 - 11905: 0xD3E5, + 28190 - 11905: 0x9C72, + 28191 - 11905: 0x9C73, + 28192 - 11905: 0xC7FE, + 28193 - 11905: 0xB6C9, + 28194 - 11905: 0x9C74, + 28195 - 11905: 0xD4FC, + 28196 - 11905: 0xB2B3, + 28197 - 11905: 0xE4D7, + 28198 - 11905: 0x9C75, + 28199 - 11905: 0x9C76, + 28200 - 11905: 0x9C77, + 28201 - 11905: 0xCEC2, + 28202 - 11905: 0x9C78, + 28203 - 11905: 0xE4CD, + 28204 - 11905: 0x9C79, + 28205 - 11905: 0xCEBC, + 28206 - 11905: 0x9C7A, + 28207 - 11905: 0xB8DB, + 28208 - 11905: 0x9C7B, + 28209 - 11905: 0x9C7C, + 28210 - 11905: 0xE4D6, + 28211 - 11905: 0x9C7D, + 28212 - 11905: 0xBFCA, + 28213 - 11905: 0x9C7E, + 28214 - 11905: 0x9C80, + 28215 - 11905: 0x9C81, + 28216 - 11905: 0xD3CE, + 28217 - 11905: 0x9C82, + 28218 - 11905: 0xC3EC, + 28219 - 11905: 0x9C83, + 28220 - 11905: 0x9C84, + 28221 - 11905: 0x9C85, + 28222 - 11905: 0x9C86, + 28223 - 11905: 0x9C87, + 28224 - 11905: 0x9C88, + 28225 - 11905: 0x9C89, + 28226 - 11905: 0x9C8A, + 28227 - 11905: 0xC5C8, + 28228 - 11905: 0xE4D8, + 28229 - 11905: 0x9C8B, + 28230 - 11905: 0x9C8C, + 28231 - 11905: 0x9C8D, + 28232 - 11905: 0x9C8E, + 28233 - 11905: 0x9C8F, + 28234 - 11905: 0x9C90, + 28235 - 11905: 0x9C91, + 28236 - 11905: 0x9C92, + 28237 - 11905: 0xCDC4, + 28238 - 11905: 0xE4CF, + 28239 - 11905: 0x9C93, + 28240 - 11905: 0x9C94, + 28241 - 11905: 0x9C95, + 28242 - 11905: 0x9C96, + 28243 - 11905: 0xE4D4, + 28244 - 11905: 0xE4D5, + 28245 - 11905: 0x9C97, + 28246 - 11905: 0xBAFE, + 28247 - 11905: 0x9C98, + 28248 - 11905: 0xCFE6, + 28249 - 11905: 0x9C99, + 28250 - 11905: 0x9C9A, + 28251 - 11905: 0xD5BF, + 28252 - 11905: 0x9C9B, + 28253 - 11905: 0x9C9C, + 28254 - 11905: 0x9C9D, + 28255 - 11905: 0xE4D2, + 28256 - 11905: 0x9C9E, + 28257 - 11905: 0x9C9F, + 28258 - 11905: 0x9CA0, + 28259 - 11905: 0x9CA1, + 28260 - 11905: 0x9CA2, + 28261 - 11905: 0x9CA3, + 28262 - 11905: 0x9CA4, + 28263 - 11905: 0x9CA5, + 28264 - 11905: 0x9CA6, + 28265 - 11905: 0x9CA7, + 28266 - 11905: 0x9CA8, + 28267 - 11905: 0xE4D0, + 28268 - 11905: 0x9CA9, + 28269 - 11905: 0x9CAA, + 28270 - 11905: 0xE4CE, + 28271 - 11905: 0x9CAB, + 28272 - 11905: 0x9CAC, + 28273 - 11905: 0x9CAD, + 28274 - 11905: 0x9CAE, + 28275 - 11905: 0x9CAF, + 28276 - 11905: 0x9CB0, + 28277 - 11905: 0x9CB1, + 28278 - 11905: 0x9CB2, + 28279 - 11905: 0x9CB3, + 28280 - 11905: 0x9CB4, + 28281 - 11905: 0x9CB5, + 28282 - 11905: 0x9CB6, + 28283 - 11905: 0x9CB7, + 28284 - 11905: 0x9CB8, + 28285 - 11905: 0x9CB9, + 28286 - 11905: 0xCDE5, + 28287 - 11905: 0xCAAA, + 28288 - 11905: 0x9CBA, + 28289 - 11905: 0x9CBB, + 28290 - 11905: 0x9CBC, + 28291 - 11905: 0xC0A3, + 28292 - 11905: 0x9CBD, + 28293 - 11905: 0xBDA6, + 28294 - 11905: 0xE4D3, + 28295 - 11905: 0x9CBE, + 28296 - 11905: 0x9CBF, + 28297 - 11905: 0xB8C8, + 28298 - 11905: 0x9CC0, + 28299 - 11905: 0x9CC1, + 28300 - 11905: 0x9CC2, + 28301 - 11905: 0x9CC3, + 28302 - 11905: 0x9CC4, + 28303 - 11905: 0xE4E7, + 28304 - 11905: 0xD4B4, + 28305 - 11905: 0x9CC5, + 28306 - 11905: 0x9CC6, + 28307 - 11905: 0x9CC7, + 28308 - 11905: 0x9CC8, + 28309 - 11905: 0x9CC9, + 28310 - 11905: 0x9CCA, + 28311 - 11905: 0x9CCB, + 28312 - 11905: 0xE4DB, + 28313 - 11905: 0x9CCC, + 28314 - 11905: 0x9CCD, + 28315 - 11905: 0x9CCE, + 28316 - 11905: 0xC1EF, + 28317 - 11905: 0x9CCF, + 28318 - 11905: 0x9CD0, + 28319 - 11905: 0xE4E9, + 28320 - 11905: 0x9CD1, + 28321 - 11905: 0x9CD2, + 28322 - 11905: 0xD2E7, + 28323 - 11905: 0x9CD3, + 28324 - 11905: 0x9CD4, + 28325 - 11905: 0xE4DF, + 28326 - 11905: 0x9CD5, + 28327 - 11905: 0xE4E0, + 28328 - 11905: 0x9CD6, + 28329 - 11905: 0x9CD7, + 28330 - 11905: 0xCFAA, + 28331 - 11905: 0x9CD8, + 28332 - 11905: 0x9CD9, + 28333 - 11905: 0x9CDA, + 28334 - 11905: 0x9CDB, + 28335 - 11905: 0xCBDD, + 28336 - 11905: 0x9CDC, + 28337 - 11905: 0xE4DA, + 28338 - 11905: 0xE4D1, + 28339 - 11905: 0x9CDD, + 28340 - 11905: 0xE4E5, + 28341 - 11905: 0x9CDE, + 28342 - 11905: 0xC8DC, + 28343 - 11905: 0xE4E3, + 28344 - 11905: 0x9CDF, + 28345 - 11905: 0x9CE0, + 28346 - 11905: 0xC4E7, + 28347 - 11905: 0xE4E2, + 28348 - 11905: 0x9CE1, + 28349 - 11905: 0xE4E1, + 28350 - 11905: 0x9CE2, + 28351 - 11905: 0x9CE3, + 28352 - 11905: 0x9CE4, + 28353 - 11905: 0xB3FC, + 28354 - 11905: 0xE4E8, + 28355 - 11905: 0x9CE5, + 28356 - 11905: 0x9CE6, + 28357 - 11905: 0x9CE7, + 28358 - 11905: 0x9CE8, + 28359 - 11905: 0xB5E1, + 28360 - 11905: 0x9CE9, + 28361 - 11905: 0x9CEA, + 28362 - 11905: 0x9CEB, + 28363 - 11905: 0xD7CC, + 28364 - 11905: 0x9CEC, + 28365 - 11905: 0x9CED, + 28366 - 11905: 0x9CEE, + 28367 - 11905: 0xE4E6, + 28368 - 11905: 0x9CEF, + 28369 - 11905: 0xBBAC, + 28370 - 11905: 0x9CF0, + 28371 - 11905: 0xD7D2, + 28372 - 11905: 0xCCCF, + 28373 - 11905: 0xEBF8, + 28374 - 11905: 0x9CF1, + 28375 - 11905: 0xE4E4, + 28376 - 11905: 0x9CF2, + 28377 - 11905: 0x9CF3, + 28378 - 11905: 0xB9F6, + 28379 - 11905: 0x9CF4, + 28380 - 11905: 0x9CF5, + 28381 - 11905: 0x9CF6, + 28382 - 11905: 0xD6CD, + 28383 - 11905: 0xE4D9, + 28384 - 11905: 0xE4DC, + 28385 - 11905: 0xC2FA, + 28386 - 11905: 0xE4DE, + 28387 - 11905: 0x9CF7, + 28388 - 11905: 0xC2CB, + 28389 - 11905: 0xC0C4, + 28390 - 11905: 0xC2D0, + 28391 - 11905: 0x9CF8, + 28392 - 11905: 0xB1F5, + 28393 - 11905: 0xCCB2, + 28394 - 11905: 0x9CF9, + 28395 - 11905: 0x9CFA, + 28396 - 11905: 0x9CFB, + 28397 - 11905: 0x9CFC, + 28398 - 11905: 0x9CFD, + 28399 - 11905: 0x9CFE, + 28400 - 11905: 0x9D40, + 28401 - 11905: 0x9D41, + 28402 - 11905: 0x9D42, + 28403 - 11905: 0x9D43, + 28404 - 11905: 0xB5CE, + 28405 - 11905: 0x9D44, + 28406 - 11905: 0x9D45, + 28407 - 11905: 0x9D46, + 28408 - 11905: 0x9D47, + 28409 - 11905: 0xE4EF, + 28410 - 11905: 0x9D48, + 28411 - 11905: 0x9D49, + 28412 - 11905: 0x9D4A, + 28413 - 11905: 0x9D4B, + 28414 - 11905: 0x9D4C, + 28415 - 11905: 0x9D4D, + 28416 - 11905: 0x9D4E, + 28417 - 11905: 0x9D4F, + 28418 - 11905: 0xC6AF, + 28419 - 11905: 0x9D50, + 28420 - 11905: 0x9D51, + 28421 - 11905: 0x9D52, + 28422 - 11905: 0xC6E1, + 28423 - 11905: 0x9D53, + 28424 - 11905: 0x9D54, + 28425 - 11905: 0xE4F5, + 28426 - 11905: 0x9D55, + 28427 - 11905: 0x9D56, + 28428 - 11905: 0x9D57, + 28429 - 11905: 0x9D58, + 28430 - 11905: 0x9D59, + 28431 - 11905: 0xC2A9, + 28432 - 11905: 0x9D5A, + 28433 - 11905: 0x9D5B, + 28434 - 11905: 0x9D5C, + 28435 - 11905: 0xC0EC, + 28436 - 11905: 0xD1DD, + 28437 - 11905: 0xE4EE, + 28438 - 11905: 0x9D5D, + 28439 - 11905: 0x9D5E, + 28440 - 11905: 0x9D5F, + 28441 - 11905: 0x9D60, + 28442 - 11905: 0x9D61, + 28443 - 11905: 0x9D62, + 28444 - 11905: 0x9D63, + 28445 - 11905: 0x9D64, + 28446 - 11905: 0x9D65, + 28447 - 11905: 0x9D66, + 28448 - 11905: 0xC4AE, + 28449 - 11905: 0x9D67, + 28450 - 11905: 0x9D68, + 28451 - 11905: 0x9D69, + 28452 - 11905: 0xE4ED, + 28453 - 11905: 0x9D6A, + 28454 - 11905: 0x9D6B, + 28455 - 11905: 0x9D6C, + 28456 - 11905: 0x9D6D, + 28457 - 11905: 0xE4F6, + 28458 - 11905: 0xE4F4, + 28459 - 11905: 0xC2FE, + 28460 - 11905: 0x9D6E, + 28461 - 11905: 0xE4DD, + 28462 - 11905: 0x9D6F, + 28463 - 11905: 0xE4F0, + 28464 - 11905: 0x9D70, + 28465 - 11905: 0xCAFE, + 28466 - 11905: 0x9D71, + 28467 - 11905: 0xD5C4, + 28468 - 11905: 0x9D72, + 28469 - 11905: 0x9D73, + 28470 - 11905: 0xE4F1, + 28471 - 11905: 0x9D74, + 28472 - 11905: 0x9D75, + 28473 - 11905: 0x9D76, + 28474 - 11905: 0x9D77, + 28475 - 11905: 0x9D78, + 28476 - 11905: 0x9D79, + 28477 - 11905: 0x9D7A, + 28478 - 11905: 0xD1FA, + 28479 - 11905: 0x9D7B, + 28480 - 11905: 0x9D7C, + 28481 - 11905: 0x9D7D, + 28482 - 11905: 0x9D7E, + 28483 - 11905: 0x9D80, + 28484 - 11905: 0x9D81, + 28485 - 11905: 0x9D82, + 28486 - 11905: 0xE4EB, + 28487 - 11905: 0xE4EC, + 28488 - 11905: 0x9D83, + 28489 - 11905: 0x9D84, + 28490 - 11905: 0x9D85, + 28491 - 11905: 0xE4F2, + 28492 - 11905: 0x9D86, + 28493 - 11905: 0xCEAB, + 28494 - 11905: 0x9D87, + 28495 - 11905: 0x9D88, + 28496 - 11905: 0x9D89, + 28497 - 11905: 0x9D8A, + 28498 - 11905: 0x9D8B, + 28499 - 11905: 0x9D8C, + 28500 - 11905: 0x9D8D, + 28501 - 11905: 0x9D8E, + 28502 - 11905: 0x9D8F, + 28503 - 11905: 0x9D90, + 28504 - 11905: 0xC5CB, + 28505 - 11905: 0x9D91, + 28506 - 11905: 0x9D92, + 28507 - 11905: 0x9D93, + 28508 - 11905: 0xC7B1, + 28509 - 11905: 0x9D94, + 28510 - 11905: 0xC2BA, + 28511 - 11905: 0x9D95, + 28512 - 11905: 0x9D96, + 28513 - 11905: 0x9D97, + 28514 - 11905: 0xE4EA, + 28515 - 11905: 0x9D98, + 28516 - 11905: 0x9D99, + 28517 - 11905: 0x9D9A, + 28518 - 11905: 0xC1CA, + 28519 - 11905: 0x9D9B, + 28520 - 11905: 0x9D9C, + 28521 - 11905: 0x9D9D, + 28522 - 11905: 0x9D9E, + 28523 - 11905: 0x9D9F, + 28524 - 11905: 0x9DA0, + 28525 - 11905: 0xCCB6, + 28526 - 11905: 0xB3B1, + 28527 - 11905: 0x9DA1, + 28528 - 11905: 0x9DA2, + 28529 - 11905: 0x9DA3, + 28530 - 11905: 0xE4FB, + 28531 - 11905: 0x9DA4, + 28532 - 11905: 0xE4F3, + 28533 - 11905: 0x9DA5, + 28534 - 11905: 0x9DA6, + 28535 - 11905: 0x9DA7, + 28536 - 11905: 0xE4FA, + 28537 - 11905: 0x9DA8, + 28538 - 11905: 0xE4FD, + 28539 - 11905: 0x9DA9, + 28540 - 11905: 0xE4FC, + 28541 - 11905: 0x9DAA, + 28542 - 11905: 0x9DAB, + 28543 - 11905: 0x9DAC, + 28544 - 11905: 0x9DAD, + 28545 - 11905: 0x9DAE, + 28546 - 11905: 0x9DAF, + 28547 - 11905: 0x9DB0, + 28548 - 11905: 0xB3CE, + 28549 - 11905: 0x9DB1, + 28550 - 11905: 0x9DB2, + 28551 - 11905: 0x9DB3, + 28552 - 11905: 0xB3BA, + 28553 - 11905: 0xE4F7, + 28554 - 11905: 0x9DB4, + 28555 - 11905: 0x9DB5, + 28556 - 11905: 0xE4F9, + 28557 - 11905: 0xE4F8, + 28558 - 11905: 0xC5EC, + 28559 - 11905: 0x9DB6, + 28560 - 11905: 0x9DB7, + 28561 - 11905: 0x9DB8, + 28562 - 11905: 0x9DB9, + 28563 - 11905: 0x9DBA, + 28564 - 11905: 0x9DBB, + 28565 - 11905: 0x9DBC, + 28566 - 11905: 0x9DBD, + 28567 - 11905: 0x9DBE, + 28568 - 11905: 0x9DBF, + 28569 - 11905: 0x9DC0, + 28570 - 11905: 0x9DC1, + 28571 - 11905: 0x9DC2, + 28572 - 11905: 0xC0BD, + 28573 - 11905: 0x9DC3, + 28574 - 11905: 0x9DC4, + 28575 - 11905: 0x9DC5, + 28576 - 11905: 0x9DC6, + 28577 - 11905: 0xD4E8, + 28578 - 11905: 0x9DC7, + 28579 - 11905: 0x9DC8, + 28580 - 11905: 0x9DC9, + 28581 - 11905: 0x9DCA, + 28582 - 11905: 0x9DCB, + 28583 - 11905: 0xE5A2, + 28584 - 11905: 0x9DCC, + 28585 - 11905: 0x9DCD, + 28586 - 11905: 0x9DCE, + 28587 - 11905: 0x9DCF, + 28588 - 11905: 0x9DD0, + 28589 - 11905: 0x9DD1, + 28590 - 11905: 0x9DD2, + 28591 - 11905: 0x9DD3, + 28592 - 11905: 0x9DD4, + 28593 - 11905: 0x9DD5, + 28594 - 11905: 0x9DD6, + 28595 - 11905: 0xB0C4, + 28596 - 11905: 0x9DD7, + 28597 - 11905: 0x9DD8, + 28598 - 11905: 0xE5A4, + 28599 - 11905: 0x9DD9, + 28600 - 11905: 0x9DDA, + 28601 - 11905: 0xE5A3, + 28602 - 11905: 0x9DDB, + 28603 - 11905: 0x9DDC, + 28604 - 11905: 0x9DDD, + 28605 - 11905: 0x9DDE, + 28606 - 11905: 0x9DDF, + 28607 - 11905: 0x9DE0, + 28608 - 11905: 0xBCA4, + 28609 - 11905: 0x9DE1, + 28610 - 11905: 0xE5A5, + 28611 - 11905: 0x9DE2, + 28612 - 11905: 0x9DE3, + 28613 - 11905: 0x9DE4, + 28614 - 11905: 0x9DE5, + 28615 - 11905: 0x9DE6, + 28616 - 11905: 0x9DE7, + 28617 - 11905: 0xE5A1, + 28618 - 11905: 0x9DE8, + 28619 - 11905: 0x9DE9, + 28620 - 11905: 0x9DEA, + 28621 - 11905: 0x9DEB, + 28622 - 11905: 0x9DEC, + 28623 - 11905: 0x9DED, + 28624 - 11905: 0x9DEE, + 28625 - 11905: 0xE4FE, + 28626 - 11905: 0xB1F4, + 28627 - 11905: 0x9DEF, + 28628 - 11905: 0x9DF0, + 28629 - 11905: 0x9DF1, + 28630 - 11905: 0x9DF2, + 28631 - 11905: 0x9DF3, + 28632 - 11905: 0x9DF4, + 28633 - 11905: 0x9DF5, + 28634 - 11905: 0x9DF6, + 28635 - 11905: 0x9DF7, + 28636 - 11905: 0x9DF8, + 28637 - 11905: 0x9DF9, + 28638 - 11905: 0xE5A8, + 28639 - 11905: 0x9DFA, + 28640 - 11905: 0xE5A9, + 28641 - 11905: 0xE5A6, + 28642 - 11905: 0x9DFB, + 28643 - 11905: 0x9DFC, + 28644 - 11905: 0x9DFD, + 28645 - 11905: 0x9DFE, + 28646 - 11905: 0x9E40, + 28647 - 11905: 0x9E41, + 28648 - 11905: 0x9E42, + 28649 - 11905: 0x9E43, + 28650 - 11905: 0x9E44, + 28651 - 11905: 0x9E45, + 28652 - 11905: 0x9E46, + 28653 - 11905: 0x9E47, + 28654 - 11905: 0xE5A7, + 28655 - 11905: 0xE5AA, + 28656 - 11905: 0x9E48, + 28657 - 11905: 0x9E49, + 28658 - 11905: 0x9E4A, + 28659 - 11905: 0x9E4B, + 28660 - 11905: 0x9E4C, + 28661 - 11905: 0x9E4D, + 28662 - 11905: 0x9E4E, + 28663 - 11905: 0x9E4F, + 28664 - 11905: 0x9E50, + 28665 - 11905: 0x9E51, + 28666 - 11905: 0x9E52, + 28667 - 11905: 0x9E53, + 28668 - 11905: 0x9E54, + 28669 - 11905: 0x9E55, + 28670 - 11905: 0x9E56, + 28671 - 11905: 0x9E57, + 28672 - 11905: 0x9E58, + 28673 - 11905: 0x9E59, + 28674 - 11905: 0x9E5A, + 28675 - 11905: 0x9E5B, + 28676 - 11905: 0x9E5C, + 28677 - 11905: 0x9E5D, + 28678 - 11905: 0x9E5E, + 28679 - 11905: 0x9E5F, + 28680 - 11905: 0x9E60, + 28681 - 11905: 0x9E61, + 28682 - 11905: 0x9E62, + 28683 - 11905: 0x9E63, + 28684 - 11905: 0x9E64, + 28685 - 11905: 0x9E65, + 28686 - 11905: 0x9E66, + 28687 - 11905: 0x9E67, + 28688 - 11905: 0x9E68, + 28689 - 11905: 0xC6D9, + 28690 - 11905: 0x9E69, + 28691 - 11905: 0x9E6A, + 28692 - 11905: 0x9E6B, + 28693 - 11905: 0x9E6C, + 28694 - 11905: 0x9E6D, + 28695 - 11905: 0x9E6E, + 28696 - 11905: 0x9E6F, + 28697 - 11905: 0x9E70, + 28698 - 11905: 0xE5AB, + 28699 - 11905: 0xE5AD, + 28700 - 11905: 0x9E71, + 28701 - 11905: 0x9E72, + 28702 - 11905: 0x9E73, + 28703 - 11905: 0x9E74, + 28704 - 11905: 0x9E75, + 28705 - 11905: 0x9E76, + 28706 - 11905: 0x9E77, + 28707 - 11905: 0xE5AC, + 28708 - 11905: 0x9E78, + 28709 - 11905: 0x9E79, + 28710 - 11905: 0x9E7A, + 28711 - 11905: 0x9E7B, + 28712 - 11905: 0x9E7C, + 28713 - 11905: 0x9E7D, + 28714 - 11905: 0x9E7E, + 28715 - 11905: 0x9E80, + 28716 - 11905: 0x9E81, + 28717 - 11905: 0x9E82, + 28718 - 11905: 0x9E83, + 28719 - 11905: 0x9E84, + 28720 - 11905: 0x9E85, + 28721 - 11905: 0x9E86, + 28722 - 11905: 0x9E87, + 28723 - 11905: 0x9E88, + 28724 - 11905: 0x9E89, + 28725 - 11905: 0xE5AF, + 28726 - 11905: 0x9E8A, + 28727 - 11905: 0x9E8B, + 28728 - 11905: 0x9E8C, + 28729 - 11905: 0xE5AE, + 28730 - 11905: 0x9E8D, + 28731 - 11905: 0x9E8E, + 28732 - 11905: 0x9E8F, + 28733 - 11905: 0x9E90, + 28734 - 11905: 0x9E91, + 28735 - 11905: 0x9E92, + 28736 - 11905: 0x9E93, + 28737 - 11905: 0x9E94, + 28738 - 11905: 0x9E95, + 28739 - 11905: 0x9E96, + 28740 - 11905: 0x9E97, + 28741 - 11905: 0x9E98, + 28742 - 11905: 0x9E99, + 28743 - 11905: 0x9E9A, + 28744 - 11905: 0x9E9B, + 28745 - 11905: 0x9E9C, + 28746 - 11905: 0x9E9D, + 28747 - 11905: 0x9E9E, + 28748 - 11905: 0xB9E0, + 28749 - 11905: 0x9E9F, + 28750 - 11905: 0x9EA0, + 28751 - 11905: 0xE5B0, + 28752 - 11905: 0x9EA1, + 28753 - 11905: 0x9EA2, + 28754 - 11905: 0x9EA3, + 28755 - 11905: 0x9EA4, + 28756 - 11905: 0x9EA5, + 28757 - 11905: 0x9EA6, + 28758 - 11905: 0x9EA7, + 28759 - 11905: 0x9EA8, + 28760 - 11905: 0x9EA9, + 28761 - 11905: 0x9EAA, + 28762 - 11905: 0x9EAB, + 28763 - 11905: 0x9EAC, + 28764 - 11905: 0x9EAD, + 28765 - 11905: 0x9EAE, + 28766 - 11905: 0xE5B1, + 28767 - 11905: 0x9EAF, + 28768 - 11905: 0x9EB0, + 28769 - 11905: 0x9EB1, + 28770 - 11905: 0x9EB2, + 28771 - 11905: 0x9EB3, + 28772 - 11905: 0x9EB4, + 28773 - 11905: 0x9EB5, + 28774 - 11905: 0x9EB6, + 28775 - 11905: 0x9EB7, + 28776 - 11905: 0x9EB8, + 28777 - 11905: 0x9EB9, + 28778 - 11905: 0x9EBA, + 28779 - 11905: 0xBBF0, + 28780 - 11905: 0xECE1, + 28781 - 11905: 0xC3F0, + 28782 - 11905: 0x9EBB, + 28783 - 11905: 0xB5C6, + 28784 - 11905: 0xBBD2, + 28785 - 11905: 0x9EBC, + 28786 - 11905: 0x9EBD, + 28787 - 11905: 0x9EBE, + 28788 - 11905: 0x9EBF, + 28789 - 11905: 0xC1E9, + 28790 - 11905: 0xD4EE, + 28791 - 11905: 0x9EC0, + 28792 - 11905: 0xBEC4, + 28793 - 11905: 0x9EC1, + 28794 - 11905: 0x9EC2, + 28795 - 11905: 0x9EC3, + 28796 - 11905: 0xD7C6, + 28797 - 11905: 0x9EC4, + 28798 - 11905: 0xD4D6, + 28799 - 11905: 0xB2D3, + 28800 - 11905: 0xECBE, + 28801 - 11905: 0x9EC5, + 28802 - 11905: 0x9EC6, + 28803 - 11905: 0x9EC7, + 28804 - 11905: 0x9EC8, + 28805 - 11905: 0xEAC1, + 28806 - 11905: 0x9EC9, + 28807 - 11905: 0x9ECA, + 28808 - 11905: 0x9ECB, + 28809 - 11905: 0xC2AF, + 28810 - 11905: 0xB4B6, + 28811 - 11905: 0x9ECC, + 28812 - 11905: 0x9ECD, + 28813 - 11905: 0x9ECE, + 28814 - 11905: 0xD1D7, + 28815 - 11905: 0x9ECF, + 28816 - 11905: 0x9ED0, + 28817 - 11905: 0x9ED1, + 28818 - 11905: 0xB3B4, + 28819 - 11905: 0x9ED2, + 28820 - 11905: 0xC8B2, + 28821 - 11905: 0xBFBB, + 28822 - 11905: 0xECC0, + 28823 - 11905: 0x9ED3, + 28824 - 11905: 0x9ED4, + 28825 - 11905: 0xD6CB, + 28826 - 11905: 0x9ED5, + 28827 - 11905: 0x9ED6, + 28828 - 11905: 0xECBF, + 28829 - 11905: 0xECC1, + 28830 - 11905: 0x9ED7, + 28831 - 11905: 0x9ED8, + 28832 - 11905: 0x9ED9, + 28833 - 11905: 0x9EDA, + 28834 - 11905: 0x9EDB, + 28835 - 11905: 0x9EDC, + 28836 - 11905: 0x9EDD, + 28837 - 11905: 0x9EDE, + 28838 - 11905: 0x9EDF, + 28839 - 11905: 0x9EE0, + 28840 - 11905: 0x9EE1, + 28841 - 11905: 0x9EE2, + 28842 - 11905: 0x9EE3, + 28843 - 11905: 0xECC5, + 28844 - 11905: 0xBEE6, + 28845 - 11905: 0xCCBF, + 28846 - 11905: 0xC5DA, + 28847 - 11905: 0xBEBC, + 28848 - 11905: 0x9EE4, + 28849 - 11905: 0xECC6, + 28850 - 11905: 0x9EE5, + 28851 - 11905: 0xB1FE, + 28852 - 11905: 0x9EE6, + 28853 - 11905: 0x9EE7, + 28854 - 11905: 0x9EE8, + 28855 - 11905: 0xECC4, + 28856 - 11905: 0xD5A8, + 28857 - 11905: 0xB5E3, + 28858 - 11905: 0x9EE9, + 28859 - 11905: 0xECC2, + 28860 - 11905: 0xC1B6, + 28861 - 11905: 0xB3E3, + 28862 - 11905: 0x9EEA, + 28863 - 11905: 0x9EEB, + 28864 - 11905: 0xECC3, + 28865 - 11905: 0xCBB8, + 28866 - 11905: 0xC0C3, + 28867 - 11905: 0xCCFE, + 28868 - 11905: 0x9EEC, + 28869 - 11905: 0x9EED, + 28870 - 11905: 0x9EEE, + 28871 - 11905: 0x9EEF, + 28872 - 11905: 0xC1D2, + 28873 - 11905: 0x9EF0, + 28874 - 11905: 0xECC8, + 28875 - 11905: 0x9EF1, + 28876 - 11905: 0x9EF2, + 28877 - 11905: 0x9EF3, + 28878 - 11905: 0x9EF4, + 28879 - 11905: 0x9EF5, + 28880 - 11905: 0x9EF6, + 28881 - 11905: 0x9EF7, + 28882 - 11905: 0x9EF8, + 28883 - 11905: 0x9EF9, + 28884 - 11905: 0x9EFA, + 28885 - 11905: 0x9EFB, + 28886 - 11905: 0x9EFC, + 28887 - 11905: 0x9EFD, + 28888 - 11905: 0xBAE6, + 28889 - 11905: 0xC0D3, + 28890 - 11905: 0x9EFE, + 28891 - 11905: 0xD6F2, + 28892 - 11905: 0x9F40, + 28893 - 11905: 0x9F41, + 28894 - 11905: 0x9F42, + 28895 - 11905: 0xD1CC, + 28896 - 11905: 0x9F43, + 28897 - 11905: 0x9F44, + 28898 - 11905: 0x9F45, + 28899 - 11905: 0x9F46, + 28900 - 11905: 0xBFBE, + 28901 - 11905: 0x9F47, + 28902 - 11905: 0xB7B3, + 28903 - 11905: 0xC9D5, + 28904 - 11905: 0xECC7, + 28905 - 11905: 0xBBE2, + 28906 - 11905: 0x9F48, + 28907 - 11905: 0xCCCC, + 28908 - 11905: 0xBDFD, + 28909 - 11905: 0xC8C8, + 28910 - 11905: 0x9F49, + 28911 - 11905: 0xCFA9, + 28912 - 11905: 0x9F4A, + 28913 - 11905: 0x9F4B, + 28914 - 11905: 0x9F4C, + 28915 - 11905: 0x9F4D, + 28916 - 11905: 0x9F4E, + 28917 - 11905: 0x9F4F, + 28918 - 11905: 0x9F50, + 28919 - 11905: 0xCDE9, + 28920 - 11905: 0x9F51, + 28921 - 11905: 0xC5EB, + 28922 - 11905: 0x9F52, + 28923 - 11905: 0x9F53, + 28924 - 11905: 0x9F54, + 28925 - 11905: 0xB7E9, + 28926 - 11905: 0x9F55, + 28927 - 11905: 0x9F56, + 28928 - 11905: 0x9F57, + 28929 - 11905: 0x9F58, + 28930 - 11905: 0x9F59, + 28931 - 11905: 0x9F5A, + 28932 - 11905: 0x9F5B, + 28933 - 11905: 0x9F5C, + 28934 - 11905: 0x9F5D, + 28935 - 11905: 0x9F5E, + 28936 - 11905: 0x9F5F, + 28937 - 11905: 0xD1C9, + 28938 - 11905: 0xBAB8, + 28939 - 11905: 0x9F60, + 28940 - 11905: 0x9F61, + 28941 - 11905: 0x9F62, + 28942 - 11905: 0x9F63, + 28943 - 11905: 0x9F64, + 28944 - 11905: 0xECC9, + 28945 - 11905: 0x9F65, + 28946 - 11905: 0x9F66, + 28947 - 11905: 0xECCA, + 28948 - 11905: 0x9F67, + 28949 - 11905: 0xBBC0, + 28950 - 11905: 0xECCB, + 28951 - 11905: 0x9F68, + 28952 - 11905: 0xECE2, + 28953 - 11905: 0xB1BA, + 28954 - 11905: 0xB7D9, + 28955 - 11905: 0x9F69, + 28956 - 11905: 0x9F6A, + 28957 - 11905: 0x9F6B, + 28958 - 11905: 0x9F6C, + 28959 - 11905: 0x9F6D, + 28960 - 11905: 0x9F6E, + 28961 - 11905: 0x9F6F, + 28962 - 11905: 0x9F70, + 28963 - 11905: 0x9F71, + 28964 - 11905: 0x9F72, + 28965 - 11905: 0x9F73, + 28966 - 11905: 0xBDB9, + 28967 - 11905: 0x9F74, + 28968 - 11905: 0x9F75, + 28969 - 11905: 0x9F76, + 28970 - 11905: 0x9F77, + 28971 - 11905: 0x9F78, + 28972 - 11905: 0x9F79, + 28973 - 11905: 0x9F7A, + 28974 - 11905: 0x9F7B, + 28975 - 11905: 0xECCC, + 28976 - 11905: 0xD1E6, + 28977 - 11905: 0xECCD, + 28978 - 11905: 0x9F7C, + 28979 - 11905: 0x9F7D, + 28980 - 11905: 0x9F7E, + 28981 - 11905: 0x9F80, + 28982 - 11905: 0xC8BB, + 28983 - 11905: 0x9F81, + 28984 - 11905: 0x9F82, + 28985 - 11905: 0x9F83, + 28986 - 11905: 0x9F84, + 28987 - 11905: 0x9F85, + 28988 - 11905: 0x9F86, + 28989 - 11905: 0x9F87, + 28990 - 11905: 0x9F88, + 28991 - 11905: 0x9F89, + 28992 - 11905: 0x9F8A, + 28993 - 11905: 0x9F8B, + 28994 - 11905: 0x9F8C, + 28995 - 11905: 0x9F8D, + 28996 - 11905: 0x9F8E, + 28997 - 11905: 0xECD1, + 28998 - 11905: 0x9F8F, + 28999 - 11905: 0x9F90, + 29000 - 11905: 0x9F91, + 29001 - 11905: 0x9F92, + 29002 - 11905: 0xECD3, + 29003 - 11905: 0x9F93, + 29004 - 11905: 0xBBCD, + 29005 - 11905: 0x9F94, + 29006 - 11905: 0xBCE5, + 29007 - 11905: 0x9F95, + 29008 - 11905: 0x9F96, + 29009 - 11905: 0x9F97, + 29010 - 11905: 0x9F98, + 29011 - 11905: 0x9F99, + 29012 - 11905: 0x9F9A, + 29013 - 11905: 0x9F9B, + 29014 - 11905: 0x9F9C, + 29015 - 11905: 0x9F9D, + 29016 - 11905: 0x9F9E, + 29017 - 11905: 0x9F9F, + 29018 - 11905: 0x9FA0, + 29019 - 11905: 0x9FA1, + 29020 - 11905: 0xECCF, + 29021 - 11905: 0x9FA2, + 29022 - 11905: 0xC9B7, + 29023 - 11905: 0x9FA3, + 29024 - 11905: 0x9FA4, + 29025 - 11905: 0x9FA5, + 29026 - 11905: 0x9FA6, + 29027 - 11905: 0x9FA7, + 29028 - 11905: 0xC3BA, + 29029 - 11905: 0x9FA8, + 29030 - 11905: 0xECE3, + 29031 - 11905: 0xD5D5, + 29032 - 11905: 0xECD0, + 29033 - 11905: 0x9FA9, + 29034 - 11905: 0x9FAA, + 29035 - 11905: 0x9FAB, + 29036 - 11905: 0x9FAC, + 29037 - 11905: 0x9FAD, + 29038 - 11905: 0xD6F3, + 29039 - 11905: 0x9FAE, + 29040 - 11905: 0x9FAF, + 29041 - 11905: 0x9FB0, + 29042 - 11905: 0xECD2, + 29043 - 11905: 0xECCE, + 29044 - 11905: 0x9FB1, + 29045 - 11905: 0x9FB2, + 29046 - 11905: 0x9FB3, + 29047 - 11905: 0x9FB4, + 29048 - 11905: 0xECD4, + 29049 - 11905: 0x9FB5, + 29050 - 11905: 0xECD5, + 29051 - 11905: 0x9FB6, + 29052 - 11905: 0x9FB7, + 29053 - 11905: 0xC9BF, + 29054 - 11905: 0x9FB8, + 29055 - 11905: 0x9FB9, + 29056 - 11905: 0x9FBA, + 29057 - 11905: 0x9FBB, + 29058 - 11905: 0x9FBC, + 29059 - 11905: 0x9FBD, + 29060 - 11905: 0xCFA8, + 29061 - 11905: 0x9FBE, + 29062 - 11905: 0x9FBF, + 29063 - 11905: 0x9FC0, + 29064 - 11905: 0x9FC1, + 29065 - 11905: 0x9FC2, + 29066 - 11905: 0xD0DC, + 29067 - 11905: 0x9FC3, + 29068 - 11905: 0x9FC4, + 29069 - 11905: 0x9FC5, + 29070 - 11905: 0x9FC6, + 29071 - 11905: 0xD1AC, + 29072 - 11905: 0x9FC7, + 29073 - 11905: 0x9FC8, + 29074 - 11905: 0x9FC9, + 29075 - 11905: 0x9FCA, + 29076 - 11905: 0xC8DB, + 29077 - 11905: 0x9FCB, + 29078 - 11905: 0x9FCC, + 29079 - 11905: 0x9FCD, + 29080 - 11905: 0xECD6, + 29081 - 11905: 0xCEF5, + 29082 - 11905: 0x9FCE, + 29083 - 11905: 0x9FCF, + 29084 - 11905: 0x9FD0, + 29085 - 11905: 0x9FD1, + 29086 - 11905: 0x9FD2, + 29087 - 11905: 0xCAEC, + 29088 - 11905: 0xECDA, + 29089 - 11905: 0x9FD3, + 29090 - 11905: 0x9FD4, + 29091 - 11905: 0x9FD5, + 29092 - 11905: 0x9FD6, + 29093 - 11905: 0x9FD7, + 29094 - 11905: 0x9FD8, + 29095 - 11905: 0x9FD9, + 29096 - 11905: 0xECD9, + 29097 - 11905: 0x9FDA, + 29098 - 11905: 0x9FDB, + 29099 - 11905: 0x9FDC, + 29100 - 11905: 0xB0BE, + 29101 - 11905: 0x9FDD, + 29102 - 11905: 0x9FDE, + 29103 - 11905: 0x9FDF, + 29104 - 11905: 0x9FE0, + 29105 - 11905: 0x9FE1, + 29106 - 11905: 0x9FE2, + 29107 - 11905: 0xECD7, + 29108 - 11905: 0x9FE3, + 29109 - 11905: 0xECD8, + 29110 - 11905: 0x9FE4, + 29111 - 11905: 0x9FE5, + 29112 - 11905: 0x9FE6, + 29113 - 11905: 0xECE4, + 29114 - 11905: 0x9FE7, + 29115 - 11905: 0x9FE8, + 29116 - 11905: 0x9FE9, + 29117 - 11905: 0x9FEA, + 29118 - 11905: 0x9FEB, + 29119 - 11905: 0x9FEC, + 29120 - 11905: 0x9FED, + 29121 - 11905: 0x9FEE, + 29122 - 11905: 0x9FEF, + 29123 - 11905: 0xC8BC, + 29124 - 11905: 0x9FF0, + 29125 - 11905: 0x9FF1, + 29126 - 11905: 0x9FF2, + 29127 - 11905: 0x9FF3, + 29128 - 11905: 0x9FF4, + 29129 - 11905: 0x9FF5, + 29130 - 11905: 0x9FF6, + 29131 - 11905: 0x9FF7, + 29132 - 11905: 0x9FF8, + 29133 - 11905: 0x9FF9, + 29134 - 11905: 0xC1C7, + 29135 - 11905: 0x9FFA, + 29136 - 11905: 0x9FFB, + 29137 - 11905: 0x9FFC, + 29138 - 11905: 0x9FFD, + 29139 - 11905: 0x9FFE, + 29140 - 11905: 0xECDC, + 29141 - 11905: 0xD1E0, + 29142 - 11905: 0xA040, + 29143 - 11905: 0xA041, + 29144 - 11905: 0xA042, + 29145 - 11905: 0xA043, + 29146 - 11905: 0xA044, + 29147 - 11905: 0xA045, + 29148 - 11905: 0xA046, + 29149 - 11905: 0xA047, + 29150 - 11905: 0xA048, + 29151 - 11905: 0xA049, + 29152 - 11905: 0xECDB, + 29153 - 11905: 0xA04A, + 29154 - 11905: 0xA04B, + 29155 - 11905: 0xA04C, + 29156 - 11905: 0xA04D, + 29157 - 11905: 0xD4EF, + 29158 - 11905: 0xA04E, + 29159 - 11905: 0xECDD, + 29160 - 11905: 0xA04F, + 29161 - 11905: 0xA050, + 29162 - 11905: 0xA051, + 29163 - 11905: 0xA052, + 29164 - 11905: 0xA053, + 29165 - 11905: 0xA054, + 29166 - 11905: 0xDBC6, + 29167 - 11905: 0xA055, + 29168 - 11905: 0xA056, + 29169 - 11905: 0xA057, + 29170 - 11905: 0xA058, + 29171 - 11905: 0xA059, + 29172 - 11905: 0xA05A, + 29173 - 11905: 0xA05B, + 29174 - 11905: 0xA05C, + 29175 - 11905: 0xA05D, + 29176 - 11905: 0xA05E, + 29177 - 11905: 0xECDE, + 29178 - 11905: 0xA05F, + 29179 - 11905: 0xA060, + 29180 - 11905: 0xA061, + 29181 - 11905: 0xA062, + 29182 - 11905: 0xA063, + 29183 - 11905: 0xA064, + 29184 - 11905: 0xA065, + 29185 - 11905: 0xA066, + 29186 - 11905: 0xA067, + 29187 - 11905: 0xA068, + 29188 - 11905: 0xA069, + 29189 - 11905: 0xA06A, + 29190 - 11905: 0xB1AC, + 29191 - 11905: 0xA06B, + 29192 - 11905: 0xA06C, + 29193 - 11905: 0xA06D, + 29194 - 11905: 0xA06E, + 29195 - 11905: 0xA06F, + 29196 - 11905: 0xA070, + 29197 - 11905: 0xA071, + 29198 - 11905: 0xA072, + 29199 - 11905: 0xA073, + 29200 - 11905: 0xA074, + 29201 - 11905: 0xA075, + 29202 - 11905: 0xA076, + 29203 - 11905: 0xA077, + 29204 - 11905: 0xA078, + 29205 - 11905: 0xA079, + 29206 - 11905: 0xA07A, + 29207 - 11905: 0xA07B, + 29208 - 11905: 0xA07C, + 29209 - 11905: 0xA07D, + 29210 - 11905: 0xA07E, + 29211 - 11905: 0xA080, + 29212 - 11905: 0xA081, + 29213 - 11905: 0xECDF, + 29214 - 11905: 0xA082, + 29215 - 11905: 0xA083, + 29216 - 11905: 0xA084, + 29217 - 11905: 0xA085, + 29218 - 11905: 0xA086, + 29219 - 11905: 0xA087, + 29220 - 11905: 0xA088, + 29221 - 11905: 0xA089, + 29222 - 11905: 0xA08A, + 29223 - 11905: 0xA08B, + 29224 - 11905: 0xECE0, + 29225 - 11905: 0xA08C, + 29226 - 11905: 0xD7A6, + 29227 - 11905: 0xA08D, + 29228 - 11905: 0xC5C0, + 29229 - 11905: 0xA08E, + 29230 - 11905: 0xA08F, + 29231 - 11905: 0xA090, + 29232 - 11905: 0xEBBC, + 29233 - 11905: 0xB0AE, + 29234 - 11905: 0xA091, + 29235 - 11905: 0xA092, + 29236 - 11905: 0xA093, + 29237 - 11905: 0xBEF4, + 29238 - 11905: 0xB8B8, + 29239 - 11905: 0xD2AF, + 29240 - 11905: 0xB0D6, + 29241 - 11905: 0xB5F9, + 29242 - 11905: 0xA094, + 29243 - 11905: 0xD8B3, + 29244 - 11905: 0xA095, + 29245 - 11905: 0xCBAC, + 29246 - 11905: 0xA096, + 29247 - 11905: 0xE3DD, + 29248 - 11905: 0xA097, + 29249 - 11905: 0xA098, + 29250 - 11905: 0xA099, + 29251 - 11905: 0xA09A, + 29252 - 11905: 0xA09B, + 29253 - 11905: 0xA09C, + 29254 - 11905: 0xA09D, + 29255 - 11905: 0xC6AC, + 29256 - 11905: 0xB0E6, + 29257 - 11905: 0xA09E, + 29258 - 11905: 0xA09F, + 29259 - 11905: 0xA0A0, + 29260 - 11905: 0xC5C6, + 29261 - 11905: 0xEBB9, + 29262 - 11905: 0xA0A1, + 29263 - 11905: 0xA0A2, + 29264 - 11905: 0xA0A3, + 29265 - 11905: 0xA0A4, + 29266 - 11905: 0xEBBA, + 29267 - 11905: 0xA0A5, + 29268 - 11905: 0xA0A6, + 29269 - 11905: 0xA0A7, + 29270 - 11905: 0xEBBB, + 29271 - 11905: 0xA0A8, + 29272 - 11905: 0xA0A9, + 29273 - 11905: 0xD1C0, + 29274 - 11905: 0xA0AA, + 29275 - 11905: 0xC5A3, + 29276 - 11905: 0xA0AB, + 29277 - 11905: 0xEAF2, + 29278 - 11905: 0xA0AC, + 29279 - 11905: 0xC4B2, + 29280 - 11905: 0xA0AD, + 29281 - 11905: 0xC4B5, + 29282 - 11905: 0xC0CE, + 29283 - 11905: 0xA0AE, + 29284 - 11905: 0xA0AF, + 29285 - 11905: 0xA0B0, + 29286 - 11905: 0xEAF3, + 29287 - 11905: 0xC4C1, + 29288 - 11905: 0xA0B1, + 29289 - 11905: 0xCEEF, + 29290 - 11905: 0xA0B2, + 29291 - 11905: 0xA0B3, + 29292 - 11905: 0xA0B4, + 29293 - 11905: 0xA0B5, + 29294 - 11905: 0xEAF0, + 29295 - 11905: 0xEAF4, + 29296 - 11905: 0xA0B6, + 29297 - 11905: 0xA0B7, + 29298 - 11905: 0xC9FC, + 29299 - 11905: 0xA0B8, + 29300 - 11905: 0xA0B9, + 29301 - 11905: 0xC7A3, + 29302 - 11905: 0xA0BA, + 29303 - 11905: 0xA0BB, + 29304 - 11905: 0xA0BC, + 29305 - 11905: 0xCCD8, + 29306 - 11905: 0xCEFE, + 29307 - 11905: 0xA0BD, + 29308 - 11905: 0xA0BE, + 29309 - 11905: 0xA0BF, + 29310 - 11905: 0xEAF5, + 29311 - 11905: 0xEAF6, + 29312 - 11905: 0xCFAC, + 29313 - 11905: 0xC0E7, + 29314 - 11905: 0xA0C0, + 29315 - 11905: 0xA0C1, + 29316 - 11905: 0xEAF7, + 29317 - 11905: 0xA0C2, + 29318 - 11905: 0xA0C3, + 29319 - 11905: 0xA0C4, + 29320 - 11905: 0xA0C5, + 29321 - 11905: 0xA0C6, + 29322 - 11905: 0xB6BF, + 29323 - 11905: 0xEAF8, + 29324 - 11905: 0xA0C7, + 29325 - 11905: 0xEAF9, + 29326 - 11905: 0xA0C8, + 29327 - 11905: 0xEAFA, + 29328 - 11905: 0xA0C9, + 29329 - 11905: 0xA0CA, + 29330 - 11905: 0xEAFB, + 29331 - 11905: 0xA0CB, + 29332 - 11905: 0xA0CC, + 29333 - 11905: 0xA0CD, + 29334 - 11905: 0xA0CE, + 29335 - 11905: 0xA0CF, + 29336 - 11905: 0xA0D0, + 29337 - 11905: 0xA0D1, + 29338 - 11905: 0xA0D2, + 29339 - 11905: 0xA0D3, + 29340 - 11905: 0xA0D4, + 29341 - 11905: 0xA0D5, + 29342 - 11905: 0xA0D6, + 29343 - 11905: 0xEAF1, + 29344 - 11905: 0xA0D7, + 29345 - 11905: 0xA0D8, + 29346 - 11905: 0xA0D9, + 29347 - 11905: 0xA0DA, + 29348 - 11905: 0xA0DB, + 29349 - 11905: 0xA0DC, + 29350 - 11905: 0xA0DD, + 29351 - 11905: 0xA0DE, + 29352 - 11905: 0xA0DF, + 29353 - 11905: 0xA0E0, + 29354 - 11905: 0xA0E1, + 29355 - 11905: 0xA0E2, + 29356 - 11905: 0xC8AE, + 29357 - 11905: 0xE1EB, + 29358 - 11905: 0xA0E3, + 29359 - 11905: 0xB7B8, + 29360 - 11905: 0xE1EC, + 29361 - 11905: 0xA0E4, + 29362 - 11905: 0xA0E5, + 29363 - 11905: 0xA0E6, + 29364 - 11905: 0xE1ED, + 29365 - 11905: 0xA0E7, + 29366 - 11905: 0xD7B4, + 29367 - 11905: 0xE1EE, + 29368 - 11905: 0xE1EF, + 29369 - 11905: 0xD3CC, + 29370 - 11905: 0xA0E8, + 29371 - 11905: 0xA0E9, + 29372 - 11905: 0xA0EA, + 29373 - 11905: 0xA0EB, + 29374 - 11905: 0xA0EC, + 29375 - 11905: 0xA0ED, + 29376 - 11905: 0xA0EE, + 29377 - 11905: 0xE1F1, + 29378 - 11905: 0xBFF1, + 29379 - 11905: 0xE1F0, + 29380 - 11905: 0xB5D2, + 29381 - 11905: 0xA0EF, + 29382 - 11905: 0xA0F0, + 29383 - 11905: 0xA0F1, + 29384 - 11905: 0xB1B7, + 29385 - 11905: 0xA0F2, + 29386 - 11905: 0xA0F3, + 29387 - 11905: 0xA0F4, + 29388 - 11905: 0xA0F5, + 29389 - 11905: 0xE1F3, + 29390 - 11905: 0xE1F2, + 29391 - 11905: 0xA0F6, + 29392 - 11905: 0xBAFC, + 29393 - 11905: 0xA0F7, + 29394 - 11905: 0xE1F4, + 29395 - 11905: 0xA0F8, + 29396 - 11905: 0xA0F9, + 29397 - 11905: 0xA0FA, + 29398 - 11905: 0xA0FB, + 29399 - 11905: 0xB9B7, + 29400 - 11905: 0xA0FC, + 29401 - 11905: 0xBED1, + 29402 - 11905: 0xA0FD, + 29403 - 11905: 0xA0FE, + 29404 - 11905: 0xAA40, + 29405 - 11905: 0xAA41, + 29406 - 11905: 0xC4FC, + 29407 - 11905: 0xAA42, + 29408 - 11905: 0xBADD, + 29409 - 11905: 0xBDC6, + 29410 - 11905: 0xAA43, + 29411 - 11905: 0xAA44, + 29412 - 11905: 0xAA45, + 29413 - 11905: 0xAA46, + 29414 - 11905: 0xAA47, + 29415 - 11905: 0xAA48, + 29416 - 11905: 0xE1F5, + 29417 - 11905: 0xE1F7, + 29418 - 11905: 0xAA49, + 29419 - 11905: 0xAA4A, + 29420 - 11905: 0xB6C0, + 29421 - 11905: 0xCFC1, + 29422 - 11905: 0xCAA8, + 29423 - 11905: 0xE1F6, + 29424 - 11905: 0xD5F8, + 29425 - 11905: 0xD3FC, + 29426 - 11905: 0xE1F8, + 29427 - 11905: 0xE1FC, + 29428 - 11905: 0xE1F9, + 29429 - 11905: 0xAA4B, + 29430 - 11905: 0xAA4C, + 29431 - 11905: 0xE1FA, + 29432 - 11905: 0xC0EA, + 29433 - 11905: 0xAA4D, + 29434 - 11905: 0xE1FE, + 29435 - 11905: 0xE2A1, + 29436 - 11905: 0xC0C7, + 29437 - 11905: 0xAA4E, + 29438 - 11905: 0xAA4F, + 29439 - 11905: 0xAA50, + 29440 - 11905: 0xAA51, + 29441 - 11905: 0xE1FB, + 29442 - 11905: 0xAA52, + 29443 - 11905: 0xE1FD, + 29444 - 11905: 0xAA53, + 29445 - 11905: 0xAA54, + 29446 - 11905: 0xAA55, + 29447 - 11905: 0xAA56, + 29448 - 11905: 0xAA57, + 29449 - 11905: 0xAA58, + 29450 - 11905: 0xE2A5, + 29451 - 11905: 0xAA59, + 29452 - 11905: 0xAA5A, + 29453 - 11905: 0xAA5B, + 29454 - 11905: 0xC1D4, + 29455 - 11905: 0xAA5C, + 29456 - 11905: 0xAA5D, + 29457 - 11905: 0xAA5E, + 29458 - 11905: 0xAA5F, + 29459 - 11905: 0xE2A3, + 29460 - 11905: 0xAA60, + 29461 - 11905: 0xE2A8, + 29462 - 11905: 0xB2FE, + 29463 - 11905: 0xE2A2, + 29464 - 11905: 0xAA61, + 29465 - 11905: 0xAA62, + 29466 - 11905: 0xAA63, + 29467 - 11905: 0xC3CD, + 29468 - 11905: 0xB2C2, + 29469 - 11905: 0xE2A7, + 29470 - 11905: 0xE2A6, + 29471 - 11905: 0xAA64, + 29472 - 11905: 0xAA65, + 29473 - 11905: 0xE2A4, + 29474 - 11905: 0xE2A9, + 29475 - 11905: 0xAA66, + 29476 - 11905: 0xAA67, + 29477 - 11905: 0xE2AB, + 29478 - 11905: 0xAA68, + 29479 - 11905: 0xAA69, + 29480 - 11905: 0xAA6A, + 29481 - 11905: 0xD0C9, + 29482 - 11905: 0xD6ED, + 29483 - 11905: 0xC3A8, + 29484 - 11905: 0xE2AC, + 29485 - 11905: 0xAA6B, + 29486 - 11905: 0xCFD7, + 29487 - 11905: 0xAA6C, + 29488 - 11905: 0xAA6D, + 29489 - 11905: 0xE2AE, + 29490 - 11905: 0xAA6E, + 29491 - 11905: 0xAA6F, + 29492 - 11905: 0xBAEF, + 29493 - 11905: 0xAA70, + 29494 - 11905: 0xAA71, + 29495 - 11905: 0xE9E0, + 29496 - 11905: 0xE2AD, + 29497 - 11905: 0xE2AA, + 29498 - 11905: 0xAA72, + 29499 - 11905: 0xAA73, + 29500 - 11905: 0xAA74, + 29501 - 11905: 0xAA75, + 29502 - 11905: 0xBBAB, + 29503 - 11905: 0xD4B3, + 29504 - 11905: 0xAA76, + 29505 - 11905: 0xAA77, + 29506 - 11905: 0xAA78, + 29507 - 11905: 0xAA79, + 29508 - 11905: 0xAA7A, + 29509 - 11905: 0xAA7B, + 29510 - 11905: 0xAA7C, + 29511 - 11905: 0xAA7D, + 29512 - 11905: 0xAA7E, + 29513 - 11905: 0xAA80, + 29514 - 11905: 0xAA81, + 29515 - 11905: 0xAA82, + 29516 - 11905: 0xAA83, + 29517 - 11905: 0xE2B0, + 29518 - 11905: 0xAA84, + 29519 - 11905: 0xAA85, + 29520 - 11905: 0xE2AF, + 29521 - 11905: 0xAA86, + 29522 - 11905: 0xE9E1, + 29523 - 11905: 0xAA87, + 29524 - 11905: 0xAA88, + 29525 - 11905: 0xAA89, + 29526 - 11905: 0xAA8A, + 29527 - 11905: 0xE2B1, + 29528 - 11905: 0xAA8B, + 29529 - 11905: 0xAA8C, + 29530 - 11905: 0xAA8D, + 29531 - 11905: 0xAA8E, + 29532 - 11905: 0xAA8F, + 29533 - 11905: 0xAA90, + 29534 - 11905: 0xAA91, + 29535 - 11905: 0xAA92, + 29536 - 11905: 0xE2B2, + 29537 - 11905: 0xAA93, + 29538 - 11905: 0xAA94, + 29539 - 11905: 0xAA95, + 29540 - 11905: 0xAA96, + 29541 - 11905: 0xAA97, + 29542 - 11905: 0xAA98, + 29543 - 11905: 0xAA99, + 29544 - 11905: 0xAA9A, + 29545 - 11905: 0xAA9B, + 29546 - 11905: 0xAA9C, + 29547 - 11905: 0xAA9D, + 29548 - 11905: 0xE2B3, + 29549 - 11905: 0xCCA1, + 29550 - 11905: 0xAA9E, + 29551 - 11905: 0xE2B4, + 29552 - 11905: 0xAA9F, + 29553 - 11905: 0xAAA0, + 29554 - 11905: 0xAB40, + 29555 - 11905: 0xAB41, + 29556 - 11905: 0xAB42, + 29557 - 11905: 0xAB43, + 29558 - 11905: 0xAB44, + 29559 - 11905: 0xAB45, + 29560 - 11905: 0xAB46, + 29561 - 11905: 0xAB47, + 29562 - 11905: 0xAB48, + 29563 - 11905: 0xAB49, + 29564 - 11905: 0xAB4A, + 29565 - 11905: 0xAB4B, + 29566 - 11905: 0xE2B5, + 29567 - 11905: 0xAB4C, + 29568 - 11905: 0xAB4D, + 29569 - 11905: 0xAB4E, + 29570 - 11905: 0xAB4F, + 29571 - 11905: 0xAB50, + 29572 - 11905: 0xD0FE, + 29573 - 11905: 0xAB51, + 29574 - 11905: 0xAB52, + 29575 - 11905: 0xC2CA, + 29576 - 11905: 0xAB53, + 29577 - 11905: 0xD3F1, + 29578 - 11905: 0xAB54, + 29579 - 11905: 0xCDF5, + 29580 - 11905: 0xAB55, + 29581 - 11905: 0xAB56, + 29582 - 11905: 0xE7E0, + 29583 - 11905: 0xAB57, + 29584 - 11905: 0xAB58, + 29585 - 11905: 0xE7E1, + 29586 - 11905: 0xAB59, + 29587 - 11905: 0xAB5A, + 29588 - 11905: 0xAB5B, + 29589 - 11905: 0xAB5C, + 29590 - 11905: 0xBEC1, + 29591 - 11905: 0xAB5D, + 29592 - 11905: 0xAB5E, + 29593 - 11905: 0xAB5F, + 29594 - 11905: 0xAB60, + 29595 - 11905: 0xC2EA, + 29596 - 11905: 0xAB61, + 29597 - 11905: 0xAB62, + 29598 - 11905: 0xAB63, + 29599 - 11905: 0xE7E4, + 29600 - 11905: 0xAB64, + 29601 - 11905: 0xAB65, + 29602 - 11905: 0xE7E3, + 29603 - 11905: 0xAB66, + 29604 - 11905: 0xAB67, + 29605 - 11905: 0xAB68, + 29606 - 11905: 0xAB69, + 29607 - 11905: 0xAB6A, + 29608 - 11905: 0xAB6B, + 29609 - 11905: 0xCDE6, + 29610 - 11905: 0xAB6C, + 29611 - 11905: 0xC3B5, + 29612 - 11905: 0xAB6D, + 29613 - 11905: 0xAB6E, + 29614 - 11905: 0xE7E2, + 29615 - 11905: 0xBBB7, + 29616 - 11905: 0xCFD6, + 29617 - 11905: 0xAB6F, + 29618 - 11905: 0xC1E1, + 29619 - 11905: 0xE7E9, + 29620 - 11905: 0xAB70, + 29621 - 11905: 0xAB71, + 29622 - 11905: 0xAB72, + 29623 - 11905: 0xE7E8, + 29624 - 11905: 0xAB73, + 29625 - 11905: 0xAB74, + 29626 - 11905: 0xE7F4, + 29627 - 11905: 0xB2A3, + 29628 - 11905: 0xAB75, + 29629 - 11905: 0xAB76, + 29630 - 11905: 0xAB77, + 29631 - 11905: 0xAB78, + 29632 - 11905: 0xE7EA, + 29633 - 11905: 0xAB79, + 29634 - 11905: 0xE7E6, + 29635 - 11905: 0xAB7A, + 29636 - 11905: 0xAB7B, + 29637 - 11905: 0xAB7C, + 29638 - 11905: 0xAB7D, + 29639 - 11905: 0xAB7E, + 29640 - 11905: 0xE7EC, + 29641 - 11905: 0xE7EB, + 29642 - 11905: 0xC9BA, + 29643 - 11905: 0xAB80, + 29644 - 11905: 0xAB81, + 29645 - 11905: 0xD5E4, + 29646 - 11905: 0xAB82, + 29647 - 11905: 0xE7E5, + 29648 - 11905: 0xB7A9, + 29649 - 11905: 0xE7E7, + 29650 - 11905: 0xAB83, + 29651 - 11905: 0xAB84, + 29652 - 11905: 0xAB85, + 29653 - 11905: 0xAB86, + 29654 - 11905: 0xAB87, + 29655 - 11905: 0xAB88, + 29656 - 11905: 0xAB89, + 29657 - 11905: 0xE7EE, + 29658 - 11905: 0xAB8A, + 29659 - 11905: 0xAB8B, + 29660 - 11905: 0xAB8C, + 29661 - 11905: 0xAB8D, + 29662 - 11905: 0xE7F3, + 29663 - 11905: 0xAB8E, + 29664 - 11905: 0xD6E9, + 29665 - 11905: 0xAB8F, + 29666 - 11905: 0xAB90, + 29667 - 11905: 0xAB91, + 29668 - 11905: 0xAB92, + 29669 - 11905: 0xE7ED, + 29670 - 11905: 0xAB93, + 29671 - 11905: 0xE7F2, + 29672 - 11905: 0xAB94, + 29673 - 11905: 0xE7F1, + 29674 - 11905: 0xAB95, + 29675 - 11905: 0xAB96, + 29676 - 11905: 0xAB97, + 29677 - 11905: 0xB0E0, + 29678 - 11905: 0xAB98, + 29679 - 11905: 0xAB99, + 29680 - 11905: 0xAB9A, + 29681 - 11905: 0xAB9B, + 29682 - 11905: 0xE7F5, + 29683 - 11905: 0xAB9C, + 29684 - 11905: 0xAB9D, + 29685 - 11905: 0xAB9E, + 29686 - 11905: 0xAB9F, + 29687 - 11905: 0xABA0, + 29688 - 11905: 0xAC40, + 29689 - 11905: 0xAC41, + 29690 - 11905: 0xAC42, + 29691 - 11905: 0xAC43, + 29692 - 11905: 0xAC44, + 29693 - 11905: 0xAC45, + 29694 - 11905: 0xAC46, + 29695 - 11905: 0xAC47, + 29696 - 11905: 0xAC48, + 29697 - 11905: 0xAC49, + 29698 - 11905: 0xAC4A, + 29699 - 11905: 0xC7F2, + 29700 - 11905: 0xAC4B, + 29701 - 11905: 0xC0C5, + 29702 - 11905: 0xC0ED, + 29703 - 11905: 0xAC4C, + 29704 - 11905: 0xAC4D, + 29705 - 11905: 0xC1F0, + 29706 - 11905: 0xE7F0, + 29707 - 11905: 0xAC4E, + 29708 - 11905: 0xAC4F, + 29709 - 11905: 0xAC50, + 29710 - 11905: 0xAC51, + 29711 - 11905: 0xE7F6, + 29712 - 11905: 0xCBF6, + 29713 - 11905: 0xAC52, + 29714 - 11905: 0xAC53, + 29715 - 11905: 0xAC54, + 29716 - 11905: 0xAC55, + 29717 - 11905: 0xAC56, + 29718 - 11905: 0xAC57, + 29719 - 11905: 0xAC58, + 29720 - 11905: 0xAC59, + 29721 - 11905: 0xAC5A, + 29722 - 11905: 0xE8A2, + 29723 - 11905: 0xE8A1, + 29724 - 11905: 0xAC5B, + 29725 - 11905: 0xAC5C, + 29726 - 11905: 0xAC5D, + 29727 - 11905: 0xAC5E, + 29728 - 11905: 0xAC5F, + 29729 - 11905: 0xAC60, + 29730 - 11905: 0xD7C1, + 29731 - 11905: 0xAC61, + 29732 - 11905: 0xAC62, + 29733 - 11905: 0xE7FA, + 29734 - 11905: 0xE7F9, + 29735 - 11905: 0xAC63, + 29736 - 11905: 0xE7FB, + 29737 - 11905: 0xAC64, + 29738 - 11905: 0xE7F7, + 29739 - 11905: 0xAC65, + 29740 - 11905: 0xE7FE, + 29741 - 11905: 0xAC66, + 29742 - 11905: 0xE7FD, + 29743 - 11905: 0xAC67, + 29744 - 11905: 0xE7FC, + 29745 - 11905: 0xAC68, + 29746 - 11905: 0xAC69, + 29747 - 11905: 0xC1D5, + 29748 - 11905: 0xC7D9, + 29749 - 11905: 0xC5FD, + 29750 - 11905: 0xC5C3, + 29751 - 11905: 0xAC6A, + 29752 - 11905: 0xAC6B, + 29753 - 11905: 0xAC6C, + 29754 - 11905: 0xAC6D, + 29755 - 11905: 0xAC6E, + 29756 - 11905: 0xC7ED, + 29757 - 11905: 0xAC6F, + 29758 - 11905: 0xAC70, + 29759 - 11905: 0xAC71, + 29760 - 11905: 0xAC72, + 29761 - 11905: 0xE8A3, + 29762 - 11905: 0xAC73, + 29763 - 11905: 0xAC74, + 29764 - 11905: 0xAC75, + 29765 - 11905: 0xAC76, + 29766 - 11905: 0xAC77, + 29767 - 11905: 0xAC78, + 29768 - 11905: 0xAC79, + 29769 - 11905: 0xAC7A, + 29770 - 11905: 0xAC7B, + 29771 - 11905: 0xAC7C, + 29772 - 11905: 0xAC7D, + 29773 - 11905: 0xAC7E, + 29774 - 11905: 0xAC80, + 29775 - 11905: 0xAC81, + 29776 - 11905: 0xAC82, + 29777 - 11905: 0xAC83, + 29778 - 11905: 0xAC84, + 29779 - 11905: 0xAC85, + 29780 - 11905: 0xAC86, + 29781 - 11905: 0xE8A6, + 29782 - 11905: 0xAC87, + 29783 - 11905: 0xE8A5, + 29784 - 11905: 0xAC88, + 29785 - 11905: 0xE8A7, + 29786 - 11905: 0xBAF7, + 29787 - 11905: 0xE7F8, + 29788 - 11905: 0xE8A4, + 29789 - 11905: 0xAC89, + 29790 - 11905: 0xC8F0, + 29791 - 11905: 0xC9AA, + 29792 - 11905: 0xAC8A, + 29793 - 11905: 0xAC8B, + 29794 - 11905: 0xAC8C, + 29795 - 11905: 0xAC8D, + 29796 - 11905: 0xAC8E, + 29797 - 11905: 0xAC8F, + 29798 - 11905: 0xAC90, + 29799 - 11905: 0xAC91, + 29800 - 11905: 0xAC92, + 29801 - 11905: 0xAC93, + 29802 - 11905: 0xAC94, + 29803 - 11905: 0xAC95, + 29804 - 11905: 0xAC96, + 29805 - 11905: 0xE8A9, + 29806 - 11905: 0xAC97, + 29807 - 11905: 0xAC98, + 29808 - 11905: 0xB9E5, + 29809 - 11905: 0xAC99, + 29810 - 11905: 0xAC9A, + 29811 - 11905: 0xAC9B, + 29812 - 11905: 0xAC9C, + 29813 - 11905: 0xAC9D, + 29814 - 11905: 0xD1FE, + 29815 - 11905: 0xE8A8, + 29816 - 11905: 0xAC9E, + 29817 - 11905: 0xAC9F, + 29818 - 11905: 0xACA0, + 29819 - 11905: 0xAD40, + 29820 - 11905: 0xAD41, + 29821 - 11905: 0xAD42, + 29822 - 11905: 0xE8AA, + 29823 - 11905: 0xAD43, + 29824 - 11905: 0xE8AD, + 29825 - 11905: 0xE8AE, + 29826 - 11905: 0xAD44, + 29827 - 11905: 0xC1A7, + 29828 - 11905: 0xAD45, + 29829 - 11905: 0xAD46, + 29830 - 11905: 0xAD47, + 29831 - 11905: 0xE8AF, + 29832 - 11905: 0xAD48, + 29833 - 11905: 0xAD49, + 29834 - 11905: 0xAD4A, + 29835 - 11905: 0xE8B0, + 29836 - 11905: 0xAD4B, + 29837 - 11905: 0xAD4C, + 29838 - 11905: 0xE8AC, + 29839 - 11905: 0xAD4D, + 29840 - 11905: 0xE8B4, + 29841 - 11905: 0xAD4E, + 29842 - 11905: 0xAD4F, + 29843 - 11905: 0xAD50, + 29844 - 11905: 0xAD51, + 29845 - 11905: 0xAD52, + 29846 - 11905: 0xAD53, + 29847 - 11905: 0xAD54, + 29848 - 11905: 0xAD55, + 29849 - 11905: 0xAD56, + 29850 - 11905: 0xAD57, + 29851 - 11905: 0xAD58, + 29852 - 11905: 0xE8AB, + 29853 - 11905: 0xAD59, + 29854 - 11905: 0xE8B1, + 29855 - 11905: 0xAD5A, + 29856 - 11905: 0xAD5B, + 29857 - 11905: 0xAD5C, + 29858 - 11905: 0xAD5D, + 29859 - 11905: 0xAD5E, + 29860 - 11905: 0xAD5F, + 29861 - 11905: 0xAD60, + 29862 - 11905: 0xAD61, + 29863 - 11905: 0xE8B5, + 29864 - 11905: 0xE8B2, + 29865 - 11905: 0xE8B3, + 29866 - 11905: 0xAD62, + 29867 - 11905: 0xAD63, + 29868 - 11905: 0xAD64, + 29869 - 11905: 0xAD65, + 29870 - 11905: 0xAD66, + 29871 - 11905: 0xAD67, + 29872 - 11905: 0xAD68, + 29873 - 11905: 0xAD69, + 29874 - 11905: 0xAD6A, + 29875 - 11905: 0xAD6B, + 29876 - 11905: 0xAD6C, + 29877 - 11905: 0xAD6D, + 29878 - 11905: 0xAD6E, + 29879 - 11905: 0xAD6F, + 29880 - 11905: 0xAD70, + 29881 - 11905: 0xAD71, + 29882 - 11905: 0xE8B7, + 29883 - 11905: 0xAD72, + 29884 - 11905: 0xAD73, + 29885 - 11905: 0xAD74, + 29886 - 11905: 0xAD75, + 29887 - 11905: 0xAD76, + 29888 - 11905: 0xAD77, + 29889 - 11905: 0xAD78, + 29890 - 11905: 0xAD79, + 29891 - 11905: 0xAD7A, + 29892 - 11905: 0xAD7B, + 29893 - 11905: 0xAD7C, + 29894 - 11905: 0xAD7D, + 29895 - 11905: 0xAD7E, + 29896 - 11905: 0xAD80, + 29897 - 11905: 0xAD81, + 29898 - 11905: 0xAD82, + 29899 - 11905: 0xAD83, + 29900 - 11905: 0xAD84, + 29901 - 11905: 0xAD85, + 29902 - 11905: 0xAD86, + 29903 - 11905: 0xAD87, + 29904 - 11905: 0xAD88, + 29905 - 11905: 0xAD89, + 29906 - 11905: 0xE8B6, + 29907 - 11905: 0xAD8A, + 29908 - 11905: 0xAD8B, + 29909 - 11905: 0xAD8C, + 29910 - 11905: 0xAD8D, + 29911 - 11905: 0xAD8E, + 29912 - 11905: 0xAD8F, + 29913 - 11905: 0xAD90, + 29914 - 11905: 0xAD91, + 29915 - 11905: 0xAD92, + 29916 - 11905: 0xB9CF, + 29917 - 11905: 0xAD93, + 29918 - 11905: 0xF0AC, + 29919 - 11905: 0xAD94, + 29920 - 11905: 0xF0AD, + 29921 - 11905: 0xAD95, + 29922 - 11905: 0xC6B0, + 29923 - 11905: 0xB0EA, + 29924 - 11905: 0xC8BF, + 29925 - 11905: 0xAD96, + 29926 - 11905: 0xCDDF, + 29927 - 11905: 0xAD97, + 29928 - 11905: 0xAD98, + 29929 - 11905: 0xAD99, + 29930 - 11905: 0xAD9A, + 29931 - 11905: 0xAD9B, + 29932 - 11905: 0xAD9C, + 29933 - 11905: 0xAD9D, + 29934 - 11905: 0xCECD, + 29935 - 11905: 0xEAB1, + 29936 - 11905: 0xAD9E, + 29937 - 11905: 0xAD9F, + 29938 - 11905: 0xADA0, + 29939 - 11905: 0xAE40, + 29940 - 11905: 0xEAB2, + 29941 - 11905: 0xAE41, + 29942 - 11905: 0xC6BF, + 29943 - 11905: 0xB4C9, + 29944 - 11905: 0xAE42, + 29945 - 11905: 0xAE43, + 29946 - 11905: 0xAE44, + 29947 - 11905: 0xAE45, + 29948 - 11905: 0xAE46, + 29949 - 11905: 0xAE47, + 29950 - 11905: 0xAE48, + 29951 - 11905: 0xEAB3, + 29952 - 11905: 0xAE49, + 29953 - 11905: 0xAE4A, + 29954 - 11905: 0xAE4B, + 29955 - 11905: 0xAE4C, + 29956 - 11905: 0xD5E7, + 29957 - 11905: 0xAE4D, + 29958 - 11905: 0xAE4E, + 29959 - 11905: 0xAE4F, + 29960 - 11905: 0xAE50, + 29961 - 11905: 0xAE51, + 29962 - 11905: 0xAE52, + 29963 - 11905: 0xAE53, + 29964 - 11905: 0xAE54, + 29965 - 11905: 0xDDF9, + 29966 - 11905: 0xAE55, + 29967 - 11905: 0xEAB4, + 29968 - 11905: 0xAE56, + 29969 - 11905: 0xEAB5, + 29970 - 11905: 0xAE57, + 29971 - 11905: 0xEAB6, + 29972 - 11905: 0xAE58, + 29973 - 11905: 0xAE59, + 29974 - 11905: 0xAE5A, + 29975 - 11905: 0xAE5B, + 29976 - 11905: 0xB8CA, + 29977 - 11905: 0xDFB0, + 29978 - 11905: 0xC9F5, + 29979 - 11905: 0xAE5C, + 29980 - 11905: 0xCCF0, + 29981 - 11905: 0xAE5D, + 29982 - 11905: 0xAE5E, + 29983 - 11905: 0xC9FA, + 29984 - 11905: 0xAE5F, + 29985 - 11905: 0xAE60, + 29986 - 11905: 0xAE61, + 29987 - 11905: 0xAE62, + 29988 - 11905: 0xAE63, + 29989 - 11905: 0xC9FB, + 29990 - 11905: 0xAE64, + 29991 - 11905: 0xAE65, + 29992 - 11905: 0xD3C3, + 29993 - 11905: 0xCBA6, + 29994 - 11905: 0xAE66, + 29995 - 11905: 0xB8A6, + 29996 - 11905: 0xF0AE, + 29997 - 11905: 0xB1C2, + 29998 - 11905: 0xAE67, + 29999 - 11905: 0xE5B8, + 30000 - 11905: 0xCCEF, + 30001 - 11905: 0xD3C9, + 30002 - 11905: 0xBCD7, + 30003 - 11905: 0xC9EA, + 30004 - 11905: 0xAE68, + 30005 - 11905: 0xB5E7, + 30006 - 11905: 0xAE69, + 30007 - 11905: 0xC4D0, + 30008 - 11905: 0xB5E9, + 30009 - 11905: 0xAE6A, + 30010 - 11905: 0xEEAE, + 30011 - 11905: 0xBBAD, + 30012 - 11905: 0xAE6B, + 30013 - 11905: 0xAE6C, + 30014 - 11905: 0xE7DE, + 30015 - 11905: 0xAE6D, + 30016 - 11905: 0xEEAF, + 30017 - 11905: 0xAE6E, + 30018 - 11905: 0xAE6F, + 30019 - 11905: 0xAE70, + 30020 - 11905: 0xAE71, + 30021 - 11905: 0xB3A9, + 30022 - 11905: 0xAE72, + 30023 - 11905: 0xAE73, + 30024 - 11905: 0xEEB2, + 30025 - 11905: 0xAE74, + 30026 - 11905: 0xAE75, + 30027 - 11905: 0xEEB1, + 30028 - 11905: 0xBDE7, + 30029 - 11905: 0xAE76, + 30030 - 11905: 0xEEB0, + 30031 - 11905: 0xCEB7, + 30032 - 11905: 0xAE77, + 30033 - 11905: 0xAE78, + 30034 - 11905: 0xAE79, + 30035 - 11905: 0xAE7A, + 30036 - 11905: 0xC5CF, + 30037 - 11905: 0xAE7B, + 30038 - 11905: 0xAE7C, + 30039 - 11905: 0xAE7D, + 30040 - 11905: 0xAE7E, + 30041 - 11905: 0xC1F4, + 30042 - 11905: 0xDBCE, + 30043 - 11905: 0xEEB3, + 30044 - 11905: 0xD0F3, + 30045 - 11905: 0xAE80, + 30046 - 11905: 0xAE81, + 30047 - 11905: 0xAE82, + 30048 - 11905: 0xAE83, + 30049 - 11905: 0xAE84, + 30050 - 11905: 0xAE85, + 30051 - 11905: 0xAE86, + 30052 - 11905: 0xAE87, + 30053 - 11905: 0xC2D4, + 30054 - 11905: 0xC6E8, + 30055 - 11905: 0xAE88, + 30056 - 11905: 0xAE89, + 30057 - 11905: 0xAE8A, + 30058 - 11905: 0xB7AC, + 30059 - 11905: 0xAE8B, + 30060 - 11905: 0xAE8C, + 30061 - 11905: 0xAE8D, + 30062 - 11905: 0xAE8E, + 30063 - 11905: 0xAE8F, + 30064 - 11905: 0xAE90, + 30065 - 11905: 0xAE91, + 30066 - 11905: 0xEEB4, + 30067 - 11905: 0xAE92, + 30068 - 11905: 0xB3EB, + 30069 - 11905: 0xAE93, + 30070 - 11905: 0xAE94, + 30071 - 11905: 0xAE95, + 30072 - 11905: 0xBBFB, + 30073 - 11905: 0xEEB5, + 30074 - 11905: 0xAE96, + 30075 - 11905: 0xAE97, + 30076 - 11905: 0xAE98, + 30077 - 11905: 0xAE99, + 30078 - 11905: 0xAE9A, + 30079 - 11905: 0xE7DC, + 30080 - 11905: 0xAE9B, + 30081 - 11905: 0xAE9C, + 30082 - 11905: 0xAE9D, + 30083 - 11905: 0xEEB6, + 30084 - 11905: 0xAE9E, + 30085 - 11905: 0xAE9F, + 30086 - 11905: 0xBDAE, + 30087 - 11905: 0xAEA0, + 30088 - 11905: 0xAF40, + 30089 - 11905: 0xAF41, + 30090 - 11905: 0xAF42, + 30091 - 11905: 0xF1E2, + 30092 - 11905: 0xAF43, + 30093 - 11905: 0xAF44, + 30094 - 11905: 0xAF45, + 30095 - 11905: 0xCAE8, + 30096 - 11905: 0xAF46, + 30097 - 11905: 0xD2C9, + 30098 - 11905: 0xF0DA, + 30099 - 11905: 0xAF47, + 30100 - 11905: 0xF0DB, + 30101 - 11905: 0xAF48, + 30102 - 11905: 0xF0DC, + 30103 - 11905: 0xC1C6, + 30104 - 11905: 0xAF49, + 30105 - 11905: 0xB8ED, + 30106 - 11905: 0xBECE, + 30107 - 11905: 0xAF4A, + 30108 - 11905: 0xAF4B, + 30109 - 11905: 0xF0DE, + 30110 - 11905: 0xAF4C, + 30111 - 11905: 0xC5B1, + 30112 - 11905: 0xF0DD, + 30113 - 11905: 0xD1F1, + 30114 - 11905: 0xAF4D, + 30115 - 11905: 0xF0E0, + 30116 - 11905: 0xB0CC, + 30117 - 11905: 0xBDEA, + 30118 - 11905: 0xAF4E, + 30119 - 11905: 0xAF4F, + 30120 - 11905: 0xAF50, + 30121 - 11905: 0xAF51, + 30122 - 11905: 0xAF52, + 30123 - 11905: 0xD2DF, + 30124 - 11905: 0xF0DF, + 30125 - 11905: 0xAF53, + 30126 - 11905: 0xB4AF, + 30127 - 11905: 0xB7E8, + 30128 - 11905: 0xF0E6, + 30129 - 11905: 0xF0E5, + 30130 - 11905: 0xC6A3, + 30131 - 11905: 0xF0E1, + 30132 - 11905: 0xF0E2, + 30133 - 11905: 0xB4C3, + 30134 - 11905: 0xAF54, + 30135 - 11905: 0xAF55, + 30136 - 11905: 0xF0E3, + 30137 - 11905: 0xD5EE, + 30138 - 11905: 0xAF56, + 30139 - 11905: 0xAF57, + 30140 - 11905: 0xCCDB, + 30141 - 11905: 0xBED2, + 30142 - 11905: 0xBCB2, + 30143 - 11905: 0xAF58, + 30144 - 11905: 0xAF59, + 30145 - 11905: 0xAF5A, + 30146 - 11905: 0xF0E8, + 30147 - 11905: 0xF0E7, + 30148 - 11905: 0xF0E4, + 30149 - 11905: 0xB2A1, + 30150 - 11905: 0xAF5B, + 30151 - 11905: 0xD6A2, + 30152 - 11905: 0xD3B8, + 30153 - 11905: 0xBEB7, + 30154 - 11905: 0xC8AC, + 30155 - 11905: 0xAF5C, + 30156 - 11905: 0xAF5D, + 30157 - 11905: 0xF0EA, + 30158 - 11905: 0xAF5E, + 30159 - 11905: 0xAF5F, + 30160 - 11905: 0xAF60, + 30161 - 11905: 0xAF61, + 30162 - 11905: 0xD1F7, + 30163 - 11905: 0xAF62, + 30164 - 11905: 0xD6CC, + 30165 - 11905: 0xBADB, + 30166 - 11905: 0xF0E9, + 30167 - 11905: 0xAF63, + 30168 - 11905: 0xB6BB, + 30169 - 11905: 0xAF64, + 30170 - 11905: 0xAF65, + 30171 - 11905: 0xCDB4, + 30172 - 11905: 0xAF66, + 30173 - 11905: 0xAF67, + 30174 - 11905: 0xC6A6, + 30175 - 11905: 0xAF68, + 30176 - 11905: 0xAF69, + 30177 - 11905: 0xAF6A, + 30178 - 11905: 0xC1A1, + 30179 - 11905: 0xF0EB, + 30180 - 11905: 0xF0EE, + 30181 - 11905: 0xAF6B, + 30182 - 11905: 0xF0ED, + 30183 - 11905: 0xF0F0, + 30184 - 11905: 0xF0EC, + 30185 - 11905: 0xAF6C, + 30186 - 11905: 0xBBBE, + 30187 - 11905: 0xF0EF, + 30188 - 11905: 0xAF6D, + 30189 - 11905: 0xAF6E, + 30190 - 11905: 0xAF6F, + 30191 - 11905: 0xAF70, + 30192 - 11905: 0xCCB5, + 30193 - 11905: 0xF0F2, + 30194 - 11905: 0xAF71, + 30195 - 11905: 0xAF72, + 30196 - 11905: 0xB3D5, + 30197 - 11905: 0xAF73, + 30198 - 11905: 0xAF74, + 30199 - 11905: 0xAF75, + 30200 - 11905: 0xAF76, + 30201 - 11905: 0xB1D4, + 30202 - 11905: 0xAF77, + 30203 - 11905: 0xAF78, + 30204 - 11905: 0xF0F3, + 30205 - 11905: 0xAF79, + 30206 - 11905: 0xAF7A, + 30207 - 11905: 0xF0F4, + 30208 - 11905: 0xF0F6, + 30209 - 11905: 0xB4E1, + 30210 - 11905: 0xAF7B, + 30211 - 11905: 0xF0F1, + 30212 - 11905: 0xAF7C, + 30213 - 11905: 0xF0F7, + 30214 - 11905: 0xAF7D, + 30215 - 11905: 0xAF7E, + 30216 - 11905: 0xAF80, + 30217 - 11905: 0xAF81, + 30218 - 11905: 0xF0FA, + 30219 - 11905: 0xAF82, + 30220 - 11905: 0xF0F8, + 30221 - 11905: 0xAF83, + 30222 - 11905: 0xAF84, + 30223 - 11905: 0xAF85, + 30224 - 11905: 0xF0F5, + 30225 - 11905: 0xAF86, + 30226 - 11905: 0xAF87, + 30227 - 11905: 0xAF88, + 30228 - 11905: 0xAF89, + 30229 - 11905: 0xF0FD, + 30230 - 11905: 0xAF8A, + 30231 - 11905: 0xF0F9, + 30232 - 11905: 0xF0FC, + 30233 - 11905: 0xF0FE, + 30234 - 11905: 0xAF8B, + 30235 - 11905: 0xF1A1, + 30236 - 11905: 0xAF8C, + 30237 - 11905: 0xAF8D, + 30238 - 11905: 0xAF8E, + 30239 - 11905: 0xCEC1, + 30240 - 11905: 0xF1A4, + 30241 - 11905: 0xAF8F, + 30242 - 11905: 0xF1A3, + 30243 - 11905: 0xAF90, + 30244 - 11905: 0xC1F6, + 30245 - 11905: 0xF0FB, + 30246 - 11905: 0xCADD, + 30247 - 11905: 0xAF91, + 30248 - 11905: 0xAF92, + 30249 - 11905: 0xB4F1, + 30250 - 11905: 0xB1F1, + 30251 - 11905: 0xCCB1, + 30252 - 11905: 0xAF93, + 30253 - 11905: 0xF1A6, + 30254 - 11905: 0xAF94, + 30255 - 11905: 0xAF95, + 30256 - 11905: 0xF1A7, + 30257 - 11905: 0xAF96, + 30258 - 11905: 0xAF97, + 30259 - 11905: 0xF1AC, + 30260 - 11905: 0xD5CE, + 30261 - 11905: 0xF1A9, + 30262 - 11905: 0xAF98, + 30263 - 11905: 0xAF99, + 30264 - 11905: 0xC8B3, + 30265 - 11905: 0xAF9A, + 30266 - 11905: 0xAF9B, + 30267 - 11905: 0xAF9C, + 30268 - 11905: 0xF1A2, + 30269 - 11905: 0xAF9D, + 30270 - 11905: 0xF1AB, + 30271 - 11905: 0xF1A8, + 30272 - 11905: 0xF1A5, + 30273 - 11905: 0xAF9E, + 30274 - 11905: 0xAF9F, + 30275 - 11905: 0xF1AA, + 30276 - 11905: 0xAFA0, + 30277 - 11905: 0xB040, + 30278 - 11905: 0xB041, + 30279 - 11905: 0xB042, + 30280 - 11905: 0xB043, + 30281 - 11905: 0xB044, + 30282 - 11905: 0xB045, + 30283 - 11905: 0xB046, + 30284 - 11905: 0xB0A9, + 30285 - 11905: 0xF1AD, + 30286 - 11905: 0xB047, + 30287 - 11905: 0xB048, + 30288 - 11905: 0xB049, + 30289 - 11905: 0xB04A, + 30290 - 11905: 0xB04B, + 30291 - 11905: 0xB04C, + 30292 - 11905: 0xF1AF, + 30293 - 11905: 0xB04D, + 30294 - 11905: 0xF1B1, + 30295 - 11905: 0xB04E, + 30296 - 11905: 0xB04F, + 30297 - 11905: 0xB050, + 30298 - 11905: 0xB051, + 30299 - 11905: 0xB052, + 30300 - 11905: 0xF1B0, + 30301 - 11905: 0xB053, + 30302 - 11905: 0xF1AE, + 30303 - 11905: 0xB054, + 30304 - 11905: 0xB055, + 30305 - 11905: 0xB056, + 30306 - 11905: 0xB057, + 30307 - 11905: 0xD1A2, + 30308 - 11905: 0xB058, + 30309 - 11905: 0xB059, + 30310 - 11905: 0xB05A, + 30311 - 11905: 0xB05B, + 30312 - 11905: 0xB05C, + 30313 - 11905: 0xB05D, + 30314 - 11905: 0xB05E, + 30315 - 11905: 0xF1B2, + 30316 - 11905: 0xB05F, + 30317 - 11905: 0xB060, + 30318 - 11905: 0xB061, + 30319 - 11905: 0xF1B3, + 30320 - 11905: 0xB062, + 30321 - 11905: 0xB063, + 30322 - 11905: 0xB064, + 30323 - 11905: 0xB065, + 30324 - 11905: 0xB066, + 30325 - 11905: 0xB067, + 30326 - 11905: 0xB068, + 30327 - 11905: 0xB069, + 30328 - 11905: 0xB9EF, + 30329 - 11905: 0xB06A, + 30330 - 11905: 0xB06B, + 30331 - 11905: 0xB5C7, + 30332 - 11905: 0xB06C, + 30333 - 11905: 0xB0D7, + 30334 - 11905: 0xB0D9, + 30335 - 11905: 0xB06D, + 30336 - 11905: 0xB06E, + 30337 - 11905: 0xB06F, + 30338 - 11905: 0xD4ED, + 30339 - 11905: 0xB070, + 30340 - 11905: 0xB5C4, + 30341 - 11905: 0xB071, + 30342 - 11905: 0xBDD4, + 30343 - 11905: 0xBBCA, + 30344 - 11905: 0xF0A7, + 30345 - 11905: 0xB072, + 30346 - 11905: 0xB073, + 30347 - 11905: 0xB8DE, + 30348 - 11905: 0xB074, + 30349 - 11905: 0xB075, + 30350 - 11905: 0xF0A8, + 30351 - 11905: 0xB076, + 30352 - 11905: 0xB077, + 30353 - 11905: 0xB0A8, + 30354 - 11905: 0xB078, + 30355 - 11905: 0xF0A9, + 30356 - 11905: 0xB079, + 30357 - 11905: 0xB07A, + 30358 - 11905: 0xCDEE, + 30359 - 11905: 0xB07B, + 30360 - 11905: 0xB07C, + 30361 - 11905: 0xF0AA, + 30362 - 11905: 0xB07D, + 30363 - 11905: 0xB07E, + 30364 - 11905: 0xB080, + 30365 - 11905: 0xB081, + 30366 - 11905: 0xB082, + 30367 - 11905: 0xB083, + 30368 - 11905: 0xB084, + 30369 - 11905: 0xB085, + 30370 - 11905: 0xB086, + 30371 - 11905: 0xB087, + 30372 - 11905: 0xF0AB, + 30373 - 11905: 0xB088, + 30374 - 11905: 0xB089, + 30375 - 11905: 0xB08A, + 30376 - 11905: 0xB08B, + 30377 - 11905: 0xB08C, + 30378 - 11905: 0xB08D, + 30379 - 11905: 0xB08E, + 30380 - 11905: 0xB08F, + 30381 - 11905: 0xB090, + 30382 - 11905: 0xC6A4, + 30383 - 11905: 0xB091, + 30384 - 11905: 0xB092, + 30385 - 11905: 0xD6E5, + 30386 - 11905: 0xF1E4, + 30387 - 11905: 0xB093, + 30388 - 11905: 0xF1E5, + 30389 - 11905: 0xB094, + 30390 - 11905: 0xB095, + 30391 - 11905: 0xB096, + 30392 - 11905: 0xB097, + 30393 - 11905: 0xB098, + 30394 - 11905: 0xB099, + 30395 - 11905: 0xB09A, + 30396 - 11905: 0xB09B, + 30397 - 11905: 0xB09C, + 30398 - 11905: 0xB09D, + 30399 - 11905: 0xC3F3, + 30400 - 11905: 0xB09E, + 30401 - 11905: 0xB09F, + 30402 - 11905: 0xD3DB, + 30403 - 11905: 0xB0A0, + 30404 - 11905: 0xB140, + 30405 - 11905: 0xD6D1, + 30406 - 11905: 0xC5E8, + 30407 - 11905: 0xB141, + 30408 - 11905: 0xD3AF, + 30409 - 11905: 0xB142, + 30410 - 11905: 0xD2E6, + 30411 - 11905: 0xB143, + 30412 - 11905: 0xB144, + 30413 - 11905: 0xEEC1, + 30414 - 11905: 0xB0BB, + 30415 - 11905: 0xD5B5, + 30416 - 11905: 0xD1CE, + 30417 - 11905: 0xBCE0, + 30418 - 11905: 0xBAD0, + 30419 - 11905: 0xB145, + 30420 - 11905: 0xBFF8, + 30421 - 11905: 0xB146, + 30422 - 11905: 0xB8C7, + 30423 - 11905: 0xB5C1, + 30424 - 11905: 0xC5CC, + 30425 - 11905: 0xB147, + 30426 - 11905: 0xB148, + 30427 - 11905: 0xCAA2, + 30428 - 11905: 0xB149, + 30429 - 11905: 0xB14A, + 30430 - 11905: 0xB14B, + 30431 - 11905: 0xC3CB, + 30432 - 11905: 0xB14C, + 30433 - 11905: 0xB14D, + 30434 - 11905: 0xB14E, + 30435 - 11905: 0xB14F, + 30436 - 11905: 0xB150, + 30437 - 11905: 0xEEC2, + 30438 - 11905: 0xB151, + 30439 - 11905: 0xB152, + 30440 - 11905: 0xB153, + 30441 - 11905: 0xB154, + 30442 - 11905: 0xB155, + 30443 - 11905: 0xB156, + 30444 - 11905: 0xB157, + 30445 - 11905: 0xB158, + 30446 - 11905: 0xC4BF, + 30447 - 11905: 0xB6A2, + 30448 - 11905: 0xB159, + 30449 - 11905: 0xEDEC, + 30450 - 11905: 0xC3A4, + 30451 - 11905: 0xB15A, + 30452 - 11905: 0xD6B1, + 30453 - 11905: 0xB15B, + 30454 - 11905: 0xB15C, + 30455 - 11905: 0xB15D, + 30456 - 11905: 0xCFE0, + 30457 - 11905: 0xEDEF, + 30458 - 11905: 0xB15E, + 30459 - 11905: 0xB15F, + 30460 - 11905: 0xC5CE, + 30461 - 11905: 0xB160, + 30462 - 11905: 0xB6DC, + 30463 - 11905: 0xB161, + 30464 - 11905: 0xB162, + 30465 - 11905: 0xCAA1, + 30466 - 11905: 0xB163, + 30467 - 11905: 0xB164, + 30468 - 11905: 0xEDED, + 30469 - 11905: 0xB165, + 30470 - 11905: 0xB166, + 30471 - 11905: 0xEDF0, + 30472 - 11905: 0xEDF1, + 30473 - 11905: 0xC3BC, + 30474 - 11905: 0xB167, + 30475 - 11905: 0xBFB4, + 30476 - 11905: 0xB168, + 30477 - 11905: 0xEDEE, + 30478 - 11905: 0xB169, + 30479 - 11905: 0xB16A, + 30480 - 11905: 0xB16B, + 30481 - 11905: 0xB16C, + 30482 - 11905: 0xB16D, + 30483 - 11905: 0xB16E, + 30484 - 11905: 0xB16F, + 30485 - 11905: 0xB170, + 30486 - 11905: 0xB171, + 30487 - 11905: 0xB172, + 30488 - 11905: 0xB173, + 30489 - 11905: 0xEDF4, + 30490 - 11905: 0xEDF2, + 30491 - 11905: 0xB174, + 30492 - 11905: 0xB175, + 30493 - 11905: 0xB176, + 30494 - 11905: 0xB177, + 30495 - 11905: 0xD5E6, + 30496 - 11905: 0xC3DF, + 30497 - 11905: 0xB178, + 30498 - 11905: 0xEDF3, + 30499 - 11905: 0xB179, + 30500 - 11905: 0xB17A, + 30501 - 11905: 0xB17B, + 30502 - 11905: 0xEDF6, + 30503 - 11905: 0xB17C, + 30504 - 11905: 0xD5A3, + 30505 - 11905: 0xD1A3, + 30506 - 11905: 0xB17D, + 30507 - 11905: 0xB17E, + 30508 - 11905: 0xB180, + 30509 - 11905: 0xEDF5, + 30510 - 11905: 0xB181, + 30511 - 11905: 0xC3D0, + 30512 - 11905: 0xB182, + 30513 - 11905: 0xB183, + 30514 - 11905: 0xB184, + 30515 - 11905: 0xB185, + 30516 - 11905: 0xB186, + 30517 - 11905: 0xEDF7, + 30518 - 11905: 0xBFF4, + 30519 - 11905: 0xBEEC, + 30520 - 11905: 0xEDF8, + 30521 - 11905: 0xB187, + 30522 - 11905: 0xCCF7, + 30523 - 11905: 0xB188, + 30524 - 11905: 0xD1DB, + 30525 - 11905: 0xB189, + 30526 - 11905: 0xB18A, + 30527 - 11905: 0xB18B, + 30528 - 11905: 0xD7C5, + 30529 - 11905: 0xD5F6, + 30530 - 11905: 0xB18C, + 30531 - 11905: 0xEDFC, + 30532 - 11905: 0xB18D, + 30533 - 11905: 0xB18E, + 30534 - 11905: 0xB18F, + 30535 - 11905: 0xEDFB, + 30536 - 11905: 0xB190, + 30537 - 11905: 0xB191, + 30538 - 11905: 0xB192, + 30539 - 11905: 0xB193, + 30540 - 11905: 0xB194, + 30541 - 11905: 0xB195, + 30542 - 11905: 0xB196, + 30543 - 11905: 0xB197, + 30544 - 11905: 0xEDF9, + 30545 - 11905: 0xEDFA, + 30546 - 11905: 0xB198, + 30547 - 11905: 0xB199, + 30548 - 11905: 0xB19A, + 30549 - 11905: 0xB19B, + 30550 - 11905: 0xB19C, + 30551 - 11905: 0xB19D, + 30552 - 11905: 0xB19E, + 30553 - 11905: 0xB19F, + 30554 - 11905: 0xEDFD, + 30555 - 11905: 0xBEA6, + 30556 - 11905: 0xB1A0, + 30557 - 11905: 0xB240, + 30558 - 11905: 0xB241, + 30559 - 11905: 0xB242, + 30560 - 11905: 0xB243, + 30561 - 11905: 0xCBAF, + 30562 - 11905: 0xEEA1, + 30563 - 11905: 0xB6BD, + 30564 - 11905: 0xB244, + 30565 - 11905: 0xEEA2, + 30566 - 11905: 0xC4C0, + 30567 - 11905: 0xB245, + 30568 - 11905: 0xEDFE, + 30569 - 11905: 0xB246, + 30570 - 11905: 0xB247, + 30571 - 11905: 0xBDDE, + 30572 - 11905: 0xB2C7, + 30573 - 11905: 0xB248, + 30574 - 11905: 0xB249, + 30575 - 11905: 0xB24A, + 30576 - 11905: 0xB24B, + 30577 - 11905: 0xB24C, + 30578 - 11905: 0xB24D, + 30579 - 11905: 0xB24E, + 30580 - 11905: 0xB24F, + 30581 - 11905: 0xB250, + 30582 - 11905: 0xB251, + 30583 - 11905: 0xB252, + 30584 - 11905: 0xB253, + 30585 - 11905: 0xB6C3, + 30586 - 11905: 0xB254, + 30587 - 11905: 0xB255, + 30588 - 11905: 0xB256, + 30589 - 11905: 0xEEA5, + 30590 - 11905: 0xD8BA, + 30591 - 11905: 0xEEA3, + 30592 - 11905: 0xEEA6, + 30593 - 11905: 0xB257, + 30594 - 11905: 0xB258, + 30595 - 11905: 0xB259, + 30596 - 11905: 0xC3E9, + 30597 - 11905: 0xB3F2, + 30598 - 11905: 0xB25A, + 30599 - 11905: 0xB25B, + 30600 - 11905: 0xB25C, + 30601 - 11905: 0xB25D, + 30602 - 11905: 0xB25E, + 30603 - 11905: 0xB25F, + 30604 - 11905: 0xEEA7, + 30605 - 11905: 0xEEA4, + 30606 - 11905: 0xCFB9, + 30607 - 11905: 0xB260, + 30608 - 11905: 0xB261, + 30609 - 11905: 0xEEA8, + 30610 - 11905: 0xC2F7, + 30611 - 11905: 0xB262, + 30612 - 11905: 0xB263, + 30613 - 11905: 0xB264, + 30614 - 11905: 0xB265, + 30615 - 11905: 0xB266, + 30616 - 11905: 0xB267, + 30617 - 11905: 0xB268, + 30618 - 11905: 0xB269, + 30619 - 11905: 0xB26A, + 30620 - 11905: 0xB26B, + 30621 - 11905: 0xB26C, + 30622 - 11905: 0xB26D, + 30623 - 11905: 0xEEA9, + 30624 - 11905: 0xEEAA, + 30625 - 11905: 0xB26E, + 30626 - 11905: 0xDEAB, + 30627 - 11905: 0xB26F, + 30628 - 11905: 0xB270, + 30629 - 11905: 0xC6B3, + 30630 - 11905: 0xB271, + 30631 - 11905: 0xC7C6, + 30632 - 11905: 0xB272, + 30633 - 11905: 0xD6F5, + 30634 - 11905: 0xB5C9, + 30635 - 11905: 0xB273, + 30636 - 11905: 0xCBB2, + 30637 - 11905: 0xB274, + 30638 - 11905: 0xB275, + 30639 - 11905: 0xB276, + 30640 - 11905: 0xEEAB, + 30641 - 11905: 0xB277, + 30642 - 11905: 0xB278, + 30643 - 11905: 0xCDAB, + 30644 - 11905: 0xB279, + 30645 - 11905: 0xEEAC, + 30646 - 11905: 0xB27A, + 30647 - 11905: 0xB27B, + 30648 - 11905: 0xB27C, + 30649 - 11905: 0xB27D, + 30650 - 11905: 0xB27E, + 30651 - 11905: 0xD5B0, + 30652 - 11905: 0xB280, + 30653 - 11905: 0xEEAD, + 30654 - 11905: 0xB281, + 30655 - 11905: 0xF6C4, + 30656 - 11905: 0xB282, + 30657 - 11905: 0xB283, + 30658 - 11905: 0xB284, + 30659 - 11905: 0xB285, + 30660 - 11905: 0xB286, + 30661 - 11905: 0xB287, + 30662 - 11905: 0xB288, + 30663 - 11905: 0xB289, + 30664 - 11905: 0xB28A, + 30665 - 11905: 0xB28B, + 30666 - 11905: 0xB28C, + 30667 - 11905: 0xB28D, + 30668 - 11905: 0xB28E, + 30669 - 11905: 0xDBC7, + 30670 - 11905: 0xB28F, + 30671 - 11905: 0xB290, + 30672 - 11905: 0xB291, + 30673 - 11905: 0xB292, + 30674 - 11905: 0xB293, + 30675 - 11905: 0xB294, + 30676 - 11905: 0xB295, + 30677 - 11905: 0xB296, + 30678 - 11905: 0xB297, + 30679 - 11905: 0xB4A3, + 30680 - 11905: 0xB298, + 30681 - 11905: 0xB299, + 30682 - 11905: 0xB29A, + 30683 - 11905: 0xC3AC, + 30684 - 11905: 0xF1E6, + 30685 - 11905: 0xB29B, + 30686 - 11905: 0xB29C, + 30687 - 11905: 0xB29D, + 30688 - 11905: 0xB29E, + 30689 - 11905: 0xB29F, + 30690 - 11905: 0xCAB8, + 30691 - 11905: 0xD2D3, + 30692 - 11905: 0xB2A0, + 30693 - 11905: 0xD6AA, + 30694 - 11905: 0xB340, + 30695 - 11905: 0xEFF2, + 30696 - 11905: 0xB341, + 30697 - 11905: 0xBED8, + 30698 - 11905: 0xB342, + 30699 - 11905: 0xBDC3, + 30700 - 11905: 0xEFF3, + 30701 - 11905: 0xB6CC, + 30702 - 11905: 0xB0AB, + 30703 - 11905: 0xB343, + 30704 - 11905: 0xB344, + 30705 - 11905: 0xB345, + 30706 - 11905: 0xB346, + 30707 - 11905: 0xCAAF, + 30708 - 11905: 0xB347, + 30709 - 11905: 0xB348, + 30710 - 11905: 0xEDB6, + 30711 - 11905: 0xB349, + 30712 - 11905: 0xEDB7, + 30713 - 11905: 0xB34A, + 30714 - 11905: 0xB34B, + 30715 - 11905: 0xB34C, + 30716 - 11905: 0xB34D, + 30717 - 11905: 0xCEF9, + 30718 - 11905: 0xB7AF, + 30719 - 11905: 0xBFF3, + 30720 - 11905: 0xEDB8, + 30721 - 11905: 0xC2EB, + 30722 - 11905: 0xC9B0, + 30723 - 11905: 0xB34E, + 30724 - 11905: 0xB34F, + 30725 - 11905: 0xB350, + 30726 - 11905: 0xB351, + 30727 - 11905: 0xB352, + 30728 - 11905: 0xB353, + 30729 - 11905: 0xEDB9, + 30730 - 11905: 0xB354, + 30731 - 11905: 0xB355, + 30732 - 11905: 0xC6F6, + 30733 - 11905: 0xBFB3, + 30734 - 11905: 0xB356, + 30735 - 11905: 0xB357, + 30736 - 11905: 0xB358, + 30737 - 11905: 0xEDBC, + 30738 - 11905: 0xC5F8, + 30739 - 11905: 0xB359, + 30740 - 11905: 0xD1D0, + 30741 - 11905: 0xB35A, + 30742 - 11905: 0xD7A9, + 30743 - 11905: 0xEDBA, + 30744 - 11905: 0xEDBB, + 30745 - 11905: 0xB35B, + 30746 - 11905: 0xD1E2, + 30747 - 11905: 0xB35C, + 30748 - 11905: 0xEDBF, + 30749 - 11905: 0xEDC0, + 30750 - 11905: 0xB35D, + 30751 - 11905: 0xEDC4, + 30752 - 11905: 0xB35E, + 30753 - 11905: 0xB35F, + 30754 - 11905: 0xB360, + 30755 - 11905: 0xEDC8, + 30756 - 11905: 0xB361, + 30757 - 11905: 0xEDC6, + 30758 - 11905: 0xEDCE, + 30759 - 11905: 0xD5E8, + 30760 - 11905: 0xB362, + 30761 - 11905: 0xEDC9, + 30762 - 11905: 0xB363, + 30763 - 11905: 0xB364, + 30764 - 11905: 0xEDC7, + 30765 - 11905: 0xEDBE, + 30766 - 11905: 0xB365, + 30767 - 11905: 0xB366, + 30768 - 11905: 0xC5E9, + 30769 - 11905: 0xB367, + 30770 - 11905: 0xB368, + 30771 - 11905: 0xB369, + 30772 - 11905: 0xC6C6, + 30773 - 11905: 0xB36A, + 30774 - 11905: 0xB36B, + 30775 - 11905: 0xC9E9, + 30776 - 11905: 0xD4D2, + 30777 - 11905: 0xEDC1, + 30778 - 11905: 0xEDC2, + 30779 - 11905: 0xEDC3, + 30780 - 11905: 0xEDC5, + 30781 - 11905: 0xB36C, + 30782 - 11905: 0xC0F9, + 30783 - 11905: 0xB36D, + 30784 - 11905: 0xB4A1, + 30785 - 11905: 0xB36E, + 30786 - 11905: 0xB36F, + 30787 - 11905: 0xB370, + 30788 - 11905: 0xB371, + 30789 - 11905: 0xB9E8, + 30790 - 11905: 0xB372, + 30791 - 11905: 0xEDD0, + 30792 - 11905: 0xB373, + 30793 - 11905: 0xB374, + 30794 - 11905: 0xB375, + 30795 - 11905: 0xB376, + 30796 - 11905: 0xEDD1, + 30797 - 11905: 0xB377, + 30798 - 11905: 0xEDCA, + 30799 - 11905: 0xB378, + 30800 - 11905: 0xEDCF, + 30801 - 11905: 0xB379, + 30802 - 11905: 0xCEF8, + 30803 - 11905: 0xB37A, + 30804 - 11905: 0xB37B, + 30805 - 11905: 0xCBB6, + 30806 - 11905: 0xEDCC, + 30807 - 11905: 0xEDCD, + 30808 - 11905: 0xB37C, + 30809 - 11905: 0xB37D, + 30810 - 11905: 0xB37E, + 30811 - 11905: 0xB380, + 30812 - 11905: 0xB381, + 30813 - 11905: 0xCFF5, + 30814 - 11905: 0xB382, + 30815 - 11905: 0xB383, + 30816 - 11905: 0xB384, + 30817 - 11905: 0xB385, + 30818 - 11905: 0xB386, + 30819 - 11905: 0xB387, + 30820 - 11905: 0xB388, + 30821 - 11905: 0xB389, + 30822 - 11905: 0xB38A, + 30823 - 11905: 0xB38B, + 30824 - 11905: 0xB38C, + 30825 - 11905: 0xB38D, + 30826 - 11905: 0xEDD2, + 30827 - 11905: 0xC1F2, + 30828 - 11905: 0xD3B2, + 30829 - 11905: 0xEDCB, + 30830 - 11905: 0xC8B7, + 30831 - 11905: 0xB38E, + 30832 - 11905: 0xB38F, + 30833 - 11905: 0xB390, + 30834 - 11905: 0xB391, + 30835 - 11905: 0xB392, + 30836 - 11905: 0xB393, + 30837 - 11905: 0xB394, + 30838 - 11905: 0xB395, + 30839 - 11905: 0xBCEF, + 30840 - 11905: 0xB396, + 30841 - 11905: 0xB397, + 30842 - 11905: 0xB398, + 30843 - 11905: 0xB399, + 30844 - 11905: 0xC5F0, + 30845 - 11905: 0xB39A, + 30846 - 11905: 0xB39B, + 30847 - 11905: 0xB39C, + 30848 - 11905: 0xB39D, + 30849 - 11905: 0xB39E, + 30850 - 11905: 0xB39F, + 30851 - 11905: 0xB3A0, + 30852 - 11905: 0xB440, + 30853 - 11905: 0xB441, + 30854 - 11905: 0xB442, + 30855 - 11905: 0xEDD6, + 30856 - 11905: 0xB443, + 30857 - 11905: 0xB5EF, + 30858 - 11905: 0xB444, + 30859 - 11905: 0xB445, + 30860 - 11905: 0xC2B5, + 30861 - 11905: 0xB0AD, + 30862 - 11905: 0xCBE9, + 30863 - 11905: 0xB446, + 30864 - 11905: 0xB447, + 30865 - 11905: 0xB1AE, + 30866 - 11905: 0xB448, + 30867 - 11905: 0xEDD4, + 30868 - 11905: 0xB449, + 30869 - 11905: 0xB44A, + 30870 - 11905: 0xB44B, + 30871 - 11905: 0xCDEB, + 30872 - 11905: 0xB5E2, + 30873 - 11905: 0xB44C, + 30874 - 11905: 0xEDD5, + 30875 - 11905: 0xEDD3, + 30876 - 11905: 0xEDD7, + 30877 - 11905: 0xB44D, + 30878 - 11905: 0xB44E, + 30879 - 11905: 0xB5FA, + 30880 - 11905: 0xB44F, + 30881 - 11905: 0xEDD8, + 30882 - 11905: 0xB450, + 30883 - 11905: 0xEDD9, + 30884 - 11905: 0xB451, + 30885 - 11905: 0xEDDC, + 30886 - 11905: 0xB452, + 30887 - 11905: 0xB1CC, + 30888 - 11905: 0xB453, + 30889 - 11905: 0xB454, + 30890 - 11905: 0xB455, + 30891 - 11905: 0xB456, + 30892 - 11905: 0xB457, + 30893 - 11905: 0xB458, + 30894 - 11905: 0xB459, + 30895 - 11905: 0xB45A, + 30896 - 11905: 0xC5F6, + 30897 - 11905: 0xBCEE, + 30898 - 11905: 0xEDDA, + 30899 - 11905: 0xCCBC, + 30900 - 11905: 0xB2EA, + 30901 - 11905: 0xB45B, + 30902 - 11905: 0xB45C, + 30903 - 11905: 0xB45D, + 30904 - 11905: 0xB45E, + 30905 - 11905: 0xEDDB, + 30906 - 11905: 0xB45F, + 30907 - 11905: 0xB460, + 30908 - 11905: 0xB461, + 30909 - 11905: 0xB462, + 30910 - 11905: 0xC4EB, + 30911 - 11905: 0xB463, + 30912 - 11905: 0xB464, + 30913 - 11905: 0xB4C5, + 30914 - 11905: 0xB465, + 30915 - 11905: 0xB466, + 30916 - 11905: 0xB467, + 30917 - 11905: 0xB0F5, + 30918 - 11905: 0xB468, + 30919 - 11905: 0xB469, + 30920 - 11905: 0xB46A, + 30921 - 11905: 0xEDDF, + 30922 - 11905: 0xC0DA, + 30923 - 11905: 0xB4E8, + 30924 - 11905: 0xB46B, + 30925 - 11905: 0xB46C, + 30926 - 11905: 0xB46D, + 30927 - 11905: 0xB46E, + 30928 - 11905: 0xC5CD, + 30929 - 11905: 0xB46F, + 30930 - 11905: 0xB470, + 30931 - 11905: 0xB471, + 30932 - 11905: 0xEDDD, + 30933 - 11905: 0xBFC4, + 30934 - 11905: 0xB472, + 30935 - 11905: 0xB473, + 30936 - 11905: 0xB474, + 30937 - 11905: 0xEDDE, + 30938 - 11905: 0xB475, + 30939 - 11905: 0xB476, + 30940 - 11905: 0xB477, + 30941 - 11905: 0xB478, + 30942 - 11905: 0xB479, + 30943 - 11905: 0xB47A, + 30944 - 11905: 0xB47B, + 30945 - 11905: 0xB47C, + 30946 - 11905: 0xB47D, + 30947 - 11905: 0xB47E, + 30948 - 11905: 0xB480, + 30949 - 11905: 0xB481, + 30950 - 11905: 0xB482, + 30951 - 11905: 0xB483, + 30952 - 11905: 0xC4A5, + 30953 - 11905: 0xB484, + 30954 - 11905: 0xB485, + 30955 - 11905: 0xB486, + 30956 - 11905: 0xEDE0, + 30957 - 11905: 0xB487, + 30958 - 11905: 0xB488, + 30959 - 11905: 0xB489, + 30960 - 11905: 0xB48A, + 30961 - 11905: 0xB48B, + 30962 - 11905: 0xEDE1, + 30963 - 11905: 0xB48C, + 30964 - 11905: 0xEDE3, + 30965 - 11905: 0xB48D, + 30966 - 11905: 0xB48E, + 30967 - 11905: 0xC1D7, + 30968 - 11905: 0xB48F, + 30969 - 11905: 0xB490, + 30970 - 11905: 0xBBC7, + 30971 - 11905: 0xB491, + 30972 - 11905: 0xB492, + 30973 - 11905: 0xB493, + 30974 - 11905: 0xB494, + 30975 - 11905: 0xB495, + 30976 - 11905: 0xB496, + 30977 - 11905: 0xBDB8, + 30978 - 11905: 0xB497, + 30979 - 11905: 0xB498, + 30980 - 11905: 0xB499, + 30981 - 11905: 0xEDE2, + 30982 - 11905: 0xB49A, + 30983 - 11905: 0xB49B, + 30984 - 11905: 0xB49C, + 30985 - 11905: 0xB49D, + 30986 - 11905: 0xB49E, + 30987 - 11905: 0xB49F, + 30988 - 11905: 0xB4A0, + 30989 - 11905: 0xB540, + 30990 - 11905: 0xB541, + 30991 - 11905: 0xB542, + 30992 - 11905: 0xB543, + 30993 - 11905: 0xB544, + 30994 - 11905: 0xB545, + 30995 - 11905: 0xEDE4, + 30996 - 11905: 0xB546, + 30997 - 11905: 0xB547, + 30998 - 11905: 0xB548, + 30999 - 11905: 0xB549, + 31000 - 11905: 0xB54A, + 31001 - 11905: 0xB54B, + 31002 - 11905: 0xB54C, + 31003 - 11905: 0xB54D, + 31004 - 11905: 0xB54E, + 31005 - 11905: 0xB54F, + 31006 - 11905: 0xEDE6, + 31007 - 11905: 0xB550, + 31008 - 11905: 0xB551, + 31009 - 11905: 0xB552, + 31010 - 11905: 0xB553, + 31011 - 11905: 0xB554, + 31012 - 11905: 0xEDE5, + 31013 - 11905: 0xB555, + 31014 - 11905: 0xB556, + 31015 - 11905: 0xB557, + 31016 - 11905: 0xB558, + 31017 - 11905: 0xB559, + 31018 - 11905: 0xB55A, + 31019 - 11905: 0xB55B, + 31020 - 11905: 0xB55C, + 31021 - 11905: 0xB55D, + 31022 - 11905: 0xB55E, + 31023 - 11905: 0xB55F, + 31024 - 11905: 0xB560, + 31025 - 11905: 0xB561, + 31026 - 11905: 0xB562, + 31027 - 11905: 0xB563, + 31028 - 11905: 0xEDE7, + 31029 - 11905: 0xB564, + 31030 - 11905: 0xB565, + 31031 - 11905: 0xB566, + 31032 - 11905: 0xB567, + 31033 - 11905: 0xB568, + 31034 - 11905: 0xCABE, + 31035 - 11905: 0xECEA, + 31036 - 11905: 0xC0F1, + 31037 - 11905: 0xB569, + 31038 - 11905: 0xC9E7, + 31039 - 11905: 0xB56A, + 31040 - 11905: 0xECEB, + 31041 - 11905: 0xC6EE, + 31042 - 11905: 0xB56B, + 31043 - 11905: 0xB56C, + 31044 - 11905: 0xB56D, + 31045 - 11905: 0xB56E, + 31046 - 11905: 0xECEC, + 31047 - 11905: 0xB56F, + 31048 - 11905: 0xC6ED, + 31049 - 11905: 0xECED, + 31050 - 11905: 0xB570, + 31051 - 11905: 0xB571, + 31052 - 11905: 0xB572, + 31053 - 11905: 0xB573, + 31054 - 11905: 0xB574, + 31055 - 11905: 0xB575, + 31056 - 11905: 0xB576, + 31057 - 11905: 0xB577, + 31058 - 11905: 0xB578, + 31059 - 11905: 0xECF0, + 31060 - 11905: 0xB579, + 31061 - 11905: 0xB57A, + 31062 - 11905: 0xD7E6, + 31063 - 11905: 0xECF3, + 31064 - 11905: 0xB57B, + 31065 - 11905: 0xB57C, + 31066 - 11905: 0xECF1, + 31067 - 11905: 0xECEE, + 31068 - 11905: 0xECEF, + 31069 - 11905: 0xD7A3, + 31070 - 11905: 0xC9F1, + 31071 - 11905: 0xCBEE, + 31072 - 11905: 0xECF4, + 31073 - 11905: 0xB57D, + 31074 - 11905: 0xECF2, + 31075 - 11905: 0xB57E, + 31076 - 11905: 0xB580, + 31077 - 11905: 0xCFE9, + 31078 - 11905: 0xB581, + 31079 - 11905: 0xECF6, + 31080 - 11905: 0xC6B1, + 31081 - 11905: 0xB582, + 31082 - 11905: 0xB583, + 31083 - 11905: 0xB584, + 31084 - 11905: 0xB585, + 31085 - 11905: 0xBCC0, + 31086 - 11905: 0xB586, + 31087 - 11905: 0xECF5, + 31088 - 11905: 0xB587, + 31089 - 11905: 0xB588, + 31090 - 11905: 0xB589, + 31091 - 11905: 0xB58A, + 31092 - 11905: 0xB58B, + 31093 - 11905: 0xB58C, + 31094 - 11905: 0xB58D, + 31095 - 11905: 0xB5BB, + 31096 - 11905: 0xBBF6, + 31097 - 11905: 0xB58E, + 31098 - 11905: 0xECF7, + 31099 - 11905: 0xB58F, + 31100 - 11905: 0xB590, + 31101 - 11905: 0xB591, + 31102 - 11905: 0xB592, + 31103 - 11905: 0xB593, + 31104 - 11905: 0xD9F7, + 31105 - 11905: 0xBDFB, + 31106 - 11905: 0xB594, + 31107 - 11905: 0xB595, + 31108 - 11905: 0xC2BB, + 31109 - 11905: 0xECF8, + 31110 - 11905: 0xB596, + 31111 - 11905: 0xB597, + 31112 - 11905: 0xB598, + 31113 - 11905: 0xB599, + 31114 - 11905: 0xECF9, + 31115 - 11905: 0xB59A, + 31116 - 11905: 0xB59B, + 31117 - 11905: 0xB59C, + 31118 - 11905: 0xB59D, + 31119 - 11905: 0xB8A3, + 31120 - 11905: 0xB59E, + 31121 - 11905: 0xB59F, + 31122 - 11905: 0xB5A0, + 31123 - 11905: 0xB640, + 31124 - 11905: 0xB641, + 31125 - 11905: 0xB642, + 31126 - 11905: 0xB643, + 31127 - 11905: 0xB644, + 31128 - 11905: 0xB645, + 31129 - 11905: 0xB646, + 31130 - 11905: 0xECFA, + 31131 - 11905: 0xB647, + 31132 - 11905: 0xB648, + 31133 - 11905: 0xB649, + 31134 - 11905: 0xB64A, + 31135 - 11905: 0xB64B, + 31136 - 11905: 0xB64C, + 31137 - 11905: 0xB64D, + 31138 - 11905: 0xB64E, + 31139 - 11905: 0xB64F, + 31140 - 11905: 0xB650, + 31141 - 11905: 0xB651, + 31142 - 11905: 0xB652, + 31143 - 11905: 0xECFB, + 31144 - 11905: 0xB653, + 31145 - 11905: 0xB654, + 31146 - 11905: 0xB655, + 31147 - 11905: 0xB656, + 31148 - 11905: 0xB657, + 31149 - 11905: 0xB658, + 31150 - 11905: 0xB659, + 31151 - 11905: 0xB65A, + 31152 - 11905: 0xB65B, + 31153 - 11905: 0xB65C, + 31154 - 11905: 0xB65D, + 31155 - 11905: 0xECFC, + 31156 - 11905: 0xB65E, + 31157 - 11905: 0xB65F, + 31158 - 11905: 0xB660, + 31159 - 11905: 0xB661, + 31160 - 11905: 0xB662, + 31161 - 11905: 0xD3ED, + 31162 - 11905: 0xD8AE, + 31163 - 11905: 0xC0EB, + 31164 - 11905: 0xB663, + 31165 - 11905: 0xC7DD, + 31166 - 11905: 0xBACC, + 31167 - 11905: 0xB664, + 31168 - 11905: 0xD0E3, + 31169 - 11905: 0xCBBD, + 31170 - 11905: 0xB665, + 31171 - 11905: 0xCDBA, + 31172 - 11905: 0xB666, + 31173 - 11905: 0xB667, + 31174 - 11905: 0xB8D1, + 31175 - 11905: 0xB668, + 31176 - 11905: 0xB669, + 31177 - 11905: 0xB1FC, + 31178 - 11905: 0xB66A, + 31179 - 11905: 0xC7EF, + 31180 - 11905: 0xB66B, + 31181 - 11905: 0xD6D6, + 31182 - 11905: 0xB66C, + 31183 - 11905: 0xB66D, + 31184 - 11905: 0xB66E, + 31185 - 11905: 0xBFC6, + 31186 - 11905: 0xC3EB, + 31187 - 11905: 0xB66F, + 31188 - 11905: 0xB670, + 31189 - 11905: 0xEFF5, + 31190 - 11905: 0xB671, + 31191 - 11905: 0xB672, + 31192 - 11905: 0xC3D8, + 31193 - 11905: 0xB673, + 31194 - 11905: 0xB674, + 31195 - 11905: 0xB675, + 31196 - 11905: 0xB676, + 31197 - 11905: 0xB677, + 31198 - 11905: 0xB678, + 31199 - 11905: 0xD7E2, + 31200 - 11905: 0xB679, + 31201 - 11905: 0xB67A, + 31202 - 11905: 0xB67B, + 31203 - 11905: 0xEFF7, + 31204 - 11905: 0xB3D3, + 31205 - 11905: 0xB67C, + 31206 - 11905: 0xC7D8, + 31207 - 11905: 0xD1ED, + 31208 - 11905: 0xB67D, + 31209 - 11905: 0xD6C8, + 31210 - 11905: 0xB67E, + 31211 - 11905: 0xEFF8, + 31212 - 11905: 0xB680, + 31213 - 11905: 0xEFF6, + 31214 - 11905: 0xB681, + 31215 - 11905: 0xBBFD, + 31216 - 11905: 0xB3C6, + 31217 - 11905: 0xB682, + 31218 - 11905: 0xB683, + 31219 - 11905: 0xB684, + 31220 - 11905: 0xB685, + 31221 - 11905: 0xB686, + 31222 - 11905: 0xB687, + 31223 - 11905: 0xB688, + 31224 - 11905: 0xBDD5, + 31225 - 11905: 0xB689, + 31226 - 11905: 0xB68A, + 31227 - 11905: 0xD2C6, + 31228 - 11905: 0xB68B, + 31229 - 11905: 0xBBE0, + 31230 - 11905: 0xB68C, + 31231 - 11905: 0xB68D, + 31232 - 11905: 0xCFA1, + 31233 - 11905: 0xB68E, + 31234 - 11905: 0xEFFC, + 31235 - 11905: 0xEFFB, + 31236 - 11905: 0xB68F, + 31237 - 11905: 0xB690, + 31238 - 11905: 0xEFF9, + 31239 - 11905: 0xB691, + 31240 - 11905: 0xB692, + 31241 - 11905: 0xB693, + 31242 - 11905: 0xB694, + 31243 - 11905: 0xB3CC, + 31244 - 11905: 0xB695, + 31245 - 11905: 0xC9D4, + 31246 - 11905: 0xCBB0, + 31247 - 11905: 0xB696, + 31248 - 11905: 0xB697, + 31249 - 11905: 0xB698, + 31250 - 11905: 0xB699, + 31251 - 11905: 0xB69A, + 31252 - 11905: 0xEFFE, + 31253 - 11905: 0xB69B, + 31254 - 11905: 0xB69C, + 31255 - 11905: 0xB0DE, + 31256 - 11905: 0xB69D, + 31257 - 11905: 0xB69E, + 31258 - 11905: 0xD6C9, + 31259 - 11905: 0xB69F, + 31260 - 11905: 0xB6A0, + 31261 - 11905: 0xB740, + 31262 - 11905: 0xEFFD, + 31263 - 11905: 0xB741, + 31264 - 11905: 0xB3ED, + 31265 - 11905: 0xB742, + 31266 - 11905: 0xB743, + 31267 - 11905: 0xF6D5, + 31268 - 11905: 0xB744, + 31269 - 11905: 0xB745, + 31270 - 11905: 0xB746, + 31271 - 11905: 0xB747, + 31272 - 11905: 0xB748, + 31273 - 11905: 0xB749, + 31274 - 11905: 0xB74A, + 31275 - 11905: 0xB74B, + 31276 - 11905: 0xB74C, + 31277 - 11905: 0xB74D, + 31278 - 11905: 0xB74E, + 31279 - 11905: 0xB74F, + 31280 - 11905: 0xB750, + 31281 - 11905: 0xB751, + 31282 - 11905: 0xB752, + 31283 - 11905: 0xCEC8, + 31284 - 11905: 0xB753, + 31285 - 11905: 0xB754, + 31286 - 11905: 0xB755, + 31287 - 11905: 0xF0A2, + 31288 - 11905: 0xB756, + 31289 - 11905: 0xF0A1, + 31290 - 11905: 0xB757, + 31291 - 11905: 0xB5BE, + 31292 - 11905: 0xBCDA, + 31293 - 11905: 0xBBFC, + 31294 - 11905: 0xB758, + 31295 - 11905: 0xB8E5, + 31296 - 11905: 0xB759, + 31297 - 11905: 0xB75A, + 31298 - 11905: 0xB75B, + 31299 - 11905: 0xB75C, + 31300 - 11905: 0xB75D, + 31301 - 11905: 0xB75E, + 31302 - 11905: 0xC4C2, + 31303 - 11905: 0xB75F, + 31304 - 11905: 0xB760, + 31305 - 11905: 0xB761, + 31306 - 11905: 0xB762, + 31307 - 11905: 0xB763, + 31308 - 11905: 0xB764, + 31309 - 11905: 0xB765, + 31310 - 11905: 0xB766, + 31311 - 11905: 0xB767, + 31312 - 11905: 0xB768, + 31313 - 11905: 0xF0A3, + 31314 - 11905: 0xB769, + 31315 - 11905: 0xB76A, + 31316 - 11905: 0xB76B, + 31317 - 11905: 0xB76C, + 31318 - 11905: 0xB76D, + 31319 - 11905: 0xCBEB, + 31320 - 11905: 0xB76E, + 31321 - 11905: 0xB76F, + 31322 - 11905: 0xB770, + 31323 - 11905: 0xB771, + 31324 - 11905: 0xB772, + 31325 - 11905: 0xB773, + 31326 - 11905: 0xB774, + 31327 - 11905: 0xB775, + 31328 - 11905: 0xB776, + 31329 - 11905: 0xB777, + 31330 - 11905: 0xB778, + 31331 - 11905: 0xB779, + 31332 - 11905: 0xB77A, + 31333 - 11905: 0xB77B, + 31334 - 11905: 0xB77C, + 31335 - 11905: 0xB77D, + 31336 - 11905: 0xB77E, + 31337 - 11905: 0xB780, + 31338 - 11905: 0xB781, + 31339 - 11905: 0xB782, + 31340 - 11905: 0xB783, + 31341 - 11905: 0xB784, + 31342 - 11905: 0xB785, + 31343 - 11905: 0xB786, + 31344 - 11905: 0xF0A6, + 31345 - 11905: 0xB787, + 31346 - 11905: 0xB788, + 31347 - 11905: 0xB789, + 31348 - 11905: 0xD1A8, + 31349 - 11905: 0xB78A, + 31350 - 11905: 0xBEBF, + 31351 - 11905: 0xC7EE, + 31352 - 11905: 0xF1B6, + 31353 - 11905: 0xF1B7, + 31354 - 11905: 0xBFD5, + 31355 - 11905: 0xB78B, + 31356 - 11905: 0xB78C, + 31357 - 11905: 0xB78D, + 31358 - 11905: 0xB78E, + 31359 - 11905: 0xB4A9, + 31360 - 11905: 0xF1B8, + 31361 - 11905: 0xCDBB, + 31362 - 11905: 0xB78F, + 31363 - 11905: 0xC7D4, + 31364 - 11905: 0xD5AD, + 31365 - 11905: 0xB790, + 31366 - 11905: 0xF1B9, + 31367 - 11905: 0xB791, + 31368 - 11905: 0xF1BA, + 31369 - 11905: 0xB792, + 31370 - 11905: 0xB793, + 31371 - 11905: 0xB794, + 31372 - 11905: 0xB795, + 31373 - 11905: 0xC7CF, + 31374 - 11905: 0xB796, + 31375 - 11905: 0xB797, + 31376 - 11905: 0xB798, + 31377 - 11905: 0xD2A4, + 31378 - 11905: 0xD6CF, + 31379 - 11905: 0xB799, + 31380 - 11905: 0xB79A, + 31381 - 11905: 0xF1BB, + 31382 - 11905: 0xBDD1, + 31383 - 11905: 0xB4B0, + 31384 - 11905: 0xBEBD, + 31385 - 11905: 0xB79B, + 31386 - 11905: 0xB79C, + 31387 - 11905: 0xB79D, + 31388 - 11905: 0xB4DC, + 31389 - 11905: 0xCED1, + 31390 - 11905: 0xB79E, + 31391 - 11905: 0xBFDF, + 31392 - 11905: 0xF1BD, + 31393 - 11905: 0xB79F, + 31394 - 11905: 0xB7A0, + 31395 - 11905: 0xB840, + 31396 - 11905: 0xB841, + 31397 - 11905: 0xBFFA, + 31398 - 11905: 0xF1BC, + 31399 - 11905: 0xB842, + 31400 - 11905: 0xF1BF, + 31401 - 11905: 0xB843, + 31402 - 11905: 0xB844, + 31403 - 11905: 0xB845, + 31404 - 11905: 0xF1BE, + 31405 - 11905: 0xF1C0, + 31406 - 11905: 0xB846, + 31407 - 11905: 0xB847, + 31408 - 11905: 0xB848, + 31409 - 11905: 0xB849, + 31410 - 11905: 0xB84A, + 31411 - 11905: 0xF1C1, + 31412 - 11905: 0xB84B, + 31413 - 11905: 0xB84C, + 31414 - 11905: 0xB84D, + 31415 - 11905: 0xB84E, + 31416 - 11905: 0xB84F, + 31417 - 11905: 0xB850, + 31418 - 11905: 0xB851, + 31419 - 11905: 0xB852, + 31420 - 11905: 0xB853, + 31421 - 11905: 0xB854, + 31422 - 11905: 0xB855, + 31423 - 11905: 0xC1FE, + 31424 - 11905: 0xB856, + 31425 - 11905: 0xB857, + 31426 - 11905: 0xB858, + 31427 - 11905: 0xB859, + 31428 - 11905: 0xB85A, + 31429 - 11905: 0xB85B, + 31430 - 11905: 0xB85C, + 31431 - 11905: 0xB85D, + 31432 - 11905: 0xB85E, + 31433 - 11905: 0xB85F, + 31434 - 11905: 0xB860, + 31435 - 11905: 0xC1A2, + 31436 - 11905: 0xB861, + 31437 - 11905: 0xB862, + 31438 - 11905: 0xB863, + 31439 - 11905: 0xB864, + 31440 - 11905: 0xB865, + 31441 - 11905: 0xB866, + 31442 - 11905: 0xB867, + 31443 - 11905: 0xB868, + 31444 - 11905: 0xB869, + 31445 - 11905: 0xB86A, + 31446 - 11905: 0xCAFA, + 31447 - 11905: 0xB86B, + 31448 - 11905: 0xB86C, + 31449 - 11905: 0xD5BE, + 31450 - 11905: 0xB86D, + 31451 - 11905: 0xB86E, + 31452 - 11905: 0xB86F, + 31453 - 11905: 0xB870, + 31454 - 11905: 0xBEBA, + 31455 - 11905: 0xBEB9, + 31456 - 11905: 0xD5C2, + 31457 - 11905: 0xB871, + 31458 - 11905: 0xB872, + 31459 - 11905: 0xBFA2, + 31460 - 11905: 0xB873, + 31461 - 11905: 0xCDAF, + 31462 - 11905: 0xF1B5, + 31463 - 11905: 0xB874, + 31464 - 11905: 0xB875, + 31465 - 11905: 0xB876, + 31466 - 11905: 0xB877, + 31467 - 11905: 0xB878, + 31468 - 11905: 0xB879, + 31469 - 11905: 0xBDDF, + 31470 - 11905: 0xB87A, + 31471 - 11905: 0xB6CB, + 31472 - 11905: 0xB87B, + 31473 - 11905: 0xB87C, + 31474 - 11905: 0xB87D, + 31475 - 11905: 0xB87E, + 31476 - 11905: 0xB880, + 31477 - 11905: 0xB881, + 31478 - 11905: 0xB882, + 31479 - 11905: 0xB883, + 31480 - 11905: 0xB884, + 31481 - 11905: 0xD6F1, + 31482 - 11905: 0xF3C3, + 31483 - 11905: 0xB885, + 31484 - 11905: 0xB886, + 31485 - 11905: 0xF3C4, + 31486 - 11905: 0xB887, + 31487 - 11905: 0xB8CD, + 31488 - 11905: 0xB888, + 31489 - 11905: 0xB889, + 31490 - 11905: 0xB88A, + 31491 - 11905: 0xF3C6, + 31492 - 11905: 0xF3C7, + 31493 - 11905: 0xB88B, + 31494 - 11905: 0xB0CA, + 31495 - 11905: 0xB88C, + 31496 - 11905: 0xF3C5, + 31497 - 11905: 0xB88D, + 31498 - 11905: 0xF3C9, + 31499 - 11905: 0xCBF1, + 31500 - 11905: 0xB88E, + 31501 - 11905: 0xB88F, + 31502 - 11905: 0xB890, + 31503 - 11905: 0xF3CB, + 31504 - 11905: 0xB891, + 31505 - 11905: 0xD0A6, + 31506 - 11905: 0xB892, + 31507 - 11905: 0xB893, + 31508 - 11905: 0xB1CA, + 31509 - 11905: 0xF3C8, + 31510 - 11905: 0xB894, + 31511 - 11905: 0xB895, + 31512 - 11905: 0xB896, + 31513 - 11905: 0xF3CF, + 31514 - 11905: 0xB897, + 31515 - 11905: 0xB5D1, + 31516 - 11905: 0xB898, + 31517 - 11905: 0xB899, + 31518 - 11905: 0xF3D7, + 31519 - 11905: 0xB89A, + 31520 - 11905: 0xF3D2, + 31521 - 11905: 0xB89B, + 31522 - 11905: 0xB89C, + 31523 - 11905: 0xB89D, + 31524 - 11905: 0xF3D4, + 31525 - 11905: 0xF3D3, + 31526 - 11905: 0xB7FB, + 31527 - 11905: 0xB89E, + 31528 - 11905: 0xB1BF, + 31529 - 11905: 0xB89F, + 31530 - 11905: 0xF3CE, + 31531 - 11905: 0xF3CA, + 31532 - 11905: 0xB5DA, + 31533 - 11905: 0xB8A0, + 31534 - 11905: 0xF3D0, + 31535 - 11905: 0xB940, + 31536 - 11905: 0xB941, + 31537 - 11905: 0xF3D1, + 31538 - 11905: 0xB942, + 31539 - 11905: 0xF3D5, + 31540 - 11905: 0xB943, + 31541 - 11905: 0xB944, + 31542 - 11905: 0xB945, + 31543 - 11905: 0xB946, + 31544 - 11905: 0xF3CD, + 31545 - 11905: 0xB947, + 31546 - 11905: 0xBCE3, + 31547 - 11905: 0xB948, + 31548 - 11905: 0xC1FD, + 31549 - 11905: 0xB949, + 31550 - 11905: 0xF3D6, + 31551 - 11905: 0xB94A, + 31552 - 11905: 0xB94B, + 31553 - 11905: 0xB94C, + 31554 - 11905: 0xB94D, + 31555 - 11905: 0xB94E, + 31556 - 11905: 0xB94F, + 31557 - 11905: 0xF3DA, + 31558 - 11905: 0xB950, + 31559 - 11905: 0xF3CC, + 31560 - 11905: 0xB951, + 31561 - 11905: 0xB5C8, + 31562 - 11905: 0xB952, + 31563 - 11905: 0xBDEE, + 31564 - 11905: 0xF3DC, + 31565 - 11905: 0xB953, + 31566 - 11905: 0xB954, + 31567 - 11905: 0xB7A4, + 31568 - 11905: 0xBFF0, + 31569 - 11905: 0xD6FE, + 31570 - 11905: 0xCDB2, + 31571 - 11905: 0xB955, + 31572 - 11905: 0xB4F0, + 31573 - 11905: 0xB956, + 31574 - 11905: 0xB2DF, + 31575 - 11905: 0xB957, + 31576 - 11905: 0xF3D8, + 31577 - 11905: 0xB958, + 31578 - 11905: 0xF3D9, + 31579 - 11905: 0xC9B8, + 31580 - 11905: 0xB959, + 31581 - 11905: 0xF3DD, + 31582 - 11905: 0xB95A, + 31583 - 11905: 0xB95B, + 31584 - 11905: 0xF3DE, + 31585 - 11905: 0xB95C, + 31586 - 11905: 0xF3E1, + 31587 - 11905: 0xB95D, + 31588 - 11905: 0xB95E, + 31589 - 11905: 0xB95F, + 31590 - 11905: 0xB960, + 31591 - 11905: 0xB961, + 31592 - 11905: 0xB962, + 31593 - 11905: 0xB963, + 31594 - 11905: 0xB964, + 31595 - 11905: 0xB965, + 31596 - 11905: 0xB966, + 31597 - 11905: 0xB967, + 31598 - 11905: 0xF3DF, + 31599 - 11905: 0xB968, + 31600 - 11905: 0xB969, + 31601 - 11905: 0xF3E3, + 31602 - 11905: 0xF3E2, + 31603 - 11905: 0xB96A, + 31604 - 11905: 0xB96B, + 31605 - 11905: 0xF3DB, + 31606 - 11905: 0xB96C, + 31607 - 11905: 0xBFEA, + 31608 - 11905: 0xB96D, + 31609 - 11905: 0xB3EF, + 31610 - 11905: 0xB96E, + 31611 - 11905: 0xF3E0, + 31612 - 11905: 0xB96F, + 31613 - 11905: 0xB970, + 31614 - 11905: 0xC7A9, + 31615 - 11905: 0xB971, + 31616 - 11905: 0xBCF2, + 31617 - 11905: 0xB972, + 31618 - 11905: 0xB973, + 31619 - 11905: 0xB974, + 31620 - 11905: 0xB975, + 31621 - 11905: 0xF3EB, + 31622 - 11905: 0xB976, + 31623 - 11905: 0xB977, + 31624 - 11905: 0xB978, + 31625 - 11905: 0xB979, + 31626 - 11905: 0xB97A, + 31627 - 11905: 0xB97B, + 31628 - 11905: 0xB97C, + 31629 - 11905: 0xB9BF, + 31630 - 11905: 0xB97D, + 31631 - 11905: 0xB97E, + 31632 - 11905: 0xF3E4, + 31633 - 11905: 0xB980, + 31634 - 11905: 0xB981, + 31635 - 11905: 0xB982, + 31636 - 11905: 0xB2AD, + 31637 - 11905: 0xBBFE, + 31638 - 11905: 0xB983, + 31639 - 11905: 0xCBE3, + 31640 - 11905: 0xB984, + 31641 - 11905: 0xB985, + 31642 - 11905: 0xB986, + 31643 - 11905: 0xB987, + 31644 - 11905: 0xF3ED, + 31645 - 11905: 0xF3E9, + 31646 - 11905: 0xB988, + 31647 - 11905: 0xB989, + 31648 - 11905: 0xB98A, + 31649 - 11905: 0xB9DC, + 31650 - 11905: 0xF3EE, + 31651 - 11905: 0xB98B, + 31652 - 11905: 0xB98C, + 31653 - 11905: 0xB98D, + 31654 - 11905: 0xF3E5, + 31655 - 11905: 0xF3E6, + 31656 - 11905: 0xF3EA, + 31657 - 11905: 0xC2E1, + 31658 - 11905: 0xF3EC, + 31659 - 11905: 0xF3EF, + 31660 - 11905: 0xF3E8, + 31661 - 11905: 0xBCFD, + 31662 - 11905: 0xB98E, + 31663 - 11905: 0xB98F, + 31664 - 11905: 0xB990, + 31665 - 11905: 0xCFE4, + 31666 - 11905: 0xB991, + 31667 - 11905: 0xB992, + 31668 - 11905: 0xF3F0, + 31669 - 11905: 0xB993, + 31670 - 11905: 0xB994, + 31671 - 11905: 0xB995, + 31672 - 11905: 0xF3E7, + 31673 - 11905: 0xB996, + 31674 - 11905: 0xB997, + 31675 - 11905: 0xB998, + 31676 - 11905: 0xB999, + 31677 - 11905: 0xB99A, + 31678 - 11905: 0xB99B, + 31679 - 11905: 0xB99C, + 31680 - 11905: 0xB99D, + 31681 - 11905: 0xF3F2, + 31682 - 11905: 0xB99E, + 31683 - 11905: 0xB99F, + 31684 - 11905: 0xB9A0, + 31685 - 11905: 0xBA40, + 31686 - 11905: 0xD7AD, + 31687 - 11905: 0xC6AA, + 31688 - 11905: 0xBA41, + 31689 - 11905: 0xBA42, + 31690 - 11905: 0xBA43, + 31691 - 11905: 0xBA44, + 31692 - 11905: 0xF3F3, + 31693 - 11905: 0xBA45, + 31694 - 11905: 0xBA46, + 31695 - 11905: 0xBA47, + 31696 - 11905: 0xBA48, + 31697 - 11905: 0xF3F1, + 31698 - 11905: 0xBA49, + 31699 - 11905: 0xC2A8, + 31700 - 11905: 0xBA4A, + 31701 - 11905: 0xBA4B, + 31702 - 11905: 0xBA4C, + 31703 - 11905: 0xBA4D, + 31704 - 11905: 0xBA4E, + 31705 - 11905: 0xB8DD, + 31706 - 11905: 0xF3F5, + 31707 - 11905: 0xBA4F, + 31708 - 11905: 0xBA50, + 31709 - 11905: 0xF3F4, + 31710 - 11905: 0xBA51, + 31711 - 11905: 0xBA52, + 31712 - 11905: 0xBA53, + 31713 - 11905: 0xB4DB, + 31714 - 11905: 0xBA54, + 31715 - 11905: 0xBA55, + 31716 - 11905: 0xBA56, + 31717 - 11905: 0xF3F6, + 31718 - 11905: 0xF3F7, + 31719 - 11905: 0xBA57, + 31720 - 11905: 0xBA58, + 31721 - 11905: 0xBA59, + 31722 - 11905: 0xF3F8, + 31723 - 11905: 0xBA5A, + 31724 - 11905: 0xBA5B, + 31725 - 11905: 0xBA5C, + 31726 - 11905: 0xC0BA, + 31727 - 11905: 0xBA5D, + 31728 - 11905: 0xBA5E, + 31729 - 11905: 0xC0E9, + 31730 - 11905: 0xBA5F, + 31731 - 11905: 0xBA60, + 31732 - 11905: 0xBA61, + 31733 - 11905: 0xBA62, + 31734 - 11905: 0xBA63, + 31735 - 11905: 0xC5F1, + 31736 - 11905: 0xBA64, + 31737 - 11905: 0xBA65, + 31738 - 11905: 0xBA66, + 31739 - 11905: 0xBA67, + 31740 - 11905: 0xF3FB, + 31741 - 11905: 0xBA68, + 31742 - 11905: 0xF3FA, + 31743 - 11905: 0xBA69, + 31744 - 11905: 0xBA6A, + 31745 - 11905: 0xBA6B, + 31746 - 11905: 0xBA6C, + 31747 - 11905: 0xBA6D, + 31748 - 11905: 0xBA6E, + 31749 - 11905: 0xBA6F, + 31750 - 11905: 0xBA70, + 31751 - 11905: 0xB4D8, + 31752 - 11905: 0xBA71, + 31753 - 11905: 0xBA72, + 31754 - 11905: 0xBA73, + 31755 - 11905: 0xF3FE, + 31756 - 11905: 0xF3F9, + 31757 - 11905: 0xBA74, + 31758 - 11905: 0xBA75, + 31759 - 11905: 0xF3FC, + 31760 - 11905: 0xBA76, + 31761 - 11905: 0xBA77, + 31762 - 11905: 0xBA78, + 31763 - 11905: 0xBA79, + 31764 - 11905: 0xBA7A, + 31765 - 11905: 0xBA7B, + 31766 - 11905: 0xF3FD, + 31767 - 11905: 0xBA7C, + 31768 - 11905: 0xBA7D, + 31769 - 11905: 0xBA7E, + 31770 - 11905: 0xBA80, + 31771 - 11905: 0xBA81, + 31772 - 11905: 0xBA82, + 31773 - 11905: 0xBA83, + 31774 - 11905: 0xBA84, + 31775 - 11905: 0xF4A1, + 31776 - 11905: 0xBA85, + 31777 - 11905: 0xBA86, + 31778 - 11905: 0xBA87, + 31779 - 11905: 0xBA88, + 31780 - 11905: 0xBA89, + 31781 - 11905: 0xBA8A, + 31782 - 11905: 0xF4A3, + 31783 - 11905: 0xBBC9, + 31784 - 11905: 0xBA8B, + 31785 - 11905: 0xBA8C, + 31786 - 11905: 0xF4A2, + 31787 - 11905: 0xBA8D, + 31788 - 11905: 0xBA8E, + 31789 - 11905: 0xBA8F, + 31790 - 11905: 0xBA90, + 31791 - 11905: 0xBA91, + 31792 - 11905: 0xBA92, + 31793 - 11905: 0xBA93, + 31794 - 11905: 0xBA94, + 31795 - 11905: 0xBA95, + 31796 - 11905: 0xBA96, + 31797 - 11905: 0xBA97, + 31798 - 11905: 0xBA98, + 31799 - 11905: 0xBA99, + 31800 - 11905: 0xF4A4, + 31801 - 11905: 0xBA9A, + 31802 - 11905: 0xBA9B, + 31803 - 11905: 0xBA9C, + 31804 - 11905: 0xBA9D, + 31805 - 11905: 0xBA9E, + 31806 - 11905: 0xBA9F, + 31807 - 11905: 0xB2BE, + 31808 - 11905: 0xF4A6, + 31809 - 11905: 0xF4A5, + 31810 - 11905: 0xBAA0, + 31811 - 11905: 0xBB40, + 31812 - 11905: 0xBB41, + 31813 - 11905: 0xBB42, + 31814 - 11905: 0xBB43, + 31815 - 11905: 0xBB44, + 31816 - 11905: 0xBB45, + 31817 - 11905: 0xBB46, + 31818 - 11905: 0xBB47, + 31819 - 11905: 0xBB48, + 31820 - 11905: 0xBB49, + 31821 - 11905: 0xBCAE, + 31822 - 11905: 0xBB4A, + 31823 - 11905: 0xBB4B, + 31824 - 11905: 0xBB4C, + 31825 - 11905: 0xBB4D, + 31826 - 11905: 0xBB4E, + 31827 - 11905: 0xBB4F, + 31828 - 11905: 0xBB50, + 31829 - 11905: 0xBB51, + 31830 - 11905: 0xBB52, + 31831 - 11905: 0xBB53, + 31832 - 11905: 0xBB54, + 31833 - 11905: 0xBB55, + 31834 - 11905: 0xBB56, + 31835 - 11905: 0xBB57, + 31836 - 11905: 0xBB58, + 31837 - 11905: 0xBB59, + 31838 - 11905: 0xBB5A, + 31839 - 11905: 0xBB5B, + 31840 - 11905: 0xBB5C, + 31841 - 11905: 0xBB5D, + 31842 - 11905: 0xBB5E, + 31843 - 11905: 0xBB5F, + 31844 - 11905: 0xBB60, + 31845 - 11905: 0xBB61, + 31846 - 11905: 0xBB62, + 31847 - 11905: 0xBB63, + 31848 - 11905: 0xBB64, + 31849 - 11905: 0xBB65, + 31850 - 11905: 0xBB66, + 31851 - 11905: 0xBB67, + 31852 - 11905: 0xBB68, + 31853 - 11905: 0xBB69, + 31854 - 11905: 0xBB6A, + 31855 - 11905: 0xBB6B, + 31856 - 11905: 0xBB6C, + 31857 - 11905: 0xBB6D, + 31858 - 11905: 0xBB6E, + 31859 - 11905: 0xC3D7, + 31860 - 11905: 0xD9E1, + 31861 - 11905: 0xBB6F, + 31862 - 11905: 0xBB70, + 31863 - 11905: 0xBB71, + 31864 - 11905: 0xBB72, + 31865 - 11905: 0xBB73, + 31866 - 11905: 0xBB74, + 31867 - 11905: 0xC0E0, + 31868 - 11905: 0xF4CC, + 31869 - 11905: 0xD7D1, + 31870 - 11905: 0xBB75, + 31871 - 11905: 0xBB76, + 31872 - 11905: 0xBB77, + 31873 - 11905: 0xBB78, + 31874 - 11905: 0xBB79, + 31875 - 11905: 0xBB7A, + 31876 - 11905: 0xBB7B, + 31877 - 11905: 0xBB7C, + 31878 - 11905: 0xBB7D, + 31879 - 11905: 0xBB7E, + 31880 - 11905: 0xBB80, + 31881 - 11905: 0xB7DB, + 31882 - 11905: 0xBB81, + 31883 - 11905: 0xBB82, + 31884 - 11905: 0xBB83, + 31885 - 11905: 0xBB84, + 31886 - 11905: 0xBB85, + 31887 - 11905: 0xBB86, + 31888 - 11905: 0xBB87, + 31889 - 11905: 0xF4CE, + 31890 - 11905: 0xC1A3, + 31891 - 11905: 0xBB88, + 31892 - 11905: 0xBB89, + 31893 - 11905: 0xC6C9, + 31894 - 11905: 0xBB8A, + 31895 - 11905: 0xB4D6, + 31896 - 11905: 0xD5B3, + 31897 - 11905: 0xBB8B, + 31898 - 11905: 0xBB8C, + 31899 - 11905: 0xBB8D, + 31900 - 11905: 0xF4D0, + 31901 - 11905: 0xF4CF, + 31902 - 11905: 0xF4D1, + 31903 - 11905: 0xCBDA, + 31904 - 11905: 0xBB8E, + 31905 - 11905: 0xBB8F, + 31906 - 11905: 0xF4D2, + 31907 - 11905: 0xBB90, + 31908 - 11905: 0xD4C1, + 31909 - 11905: 0xD6E0, + 31910 - 11905: 0xBB91, + 31911 - 11905: 0xBB92, + 31912 - 11905: 0xBB93, + 31913 - 11905: 0xBB94, + 31914 - 11905: 0xB7E0, + 31915 - 11905: 0xBB95, + 31916 - 11905: 0xBB96, + 31917 - 11905: 0xBB97, + 31918 - 11905: 0xC1B8, + 31919 - 11905: 0xBB98, + 31920 - 11905: 0xBB99, + 31921 - 11905: 0xC1BB, + 31922 - 11905: 0xF4D3, + 31923 - 11905: 0xBEAC, + 31924 - 11905: 0xBB9A, + 31925 - 11905: 0xBB9B, + 31926 - 11905: 0xBB9C, + 31927 - 11905: 0xBB9D, + 31928 - 11905: 0xBB9E, + 31929 - 11905: 0xB4E2, + 31930 - 11905: 0xBB9F, + 31931 - 11905: 0xBBA0, + 31932 - 11905: 0xF4D4, + 31933 - 11905: 0xF4D5, + 31934 - 11905: 0xBEAB, + 31935 - 11905: 0xBC40, + 31936 - 11905: 0xBC41, + 31937 - 11905: 0xF4D6, + 31938 - 11905: 0xBC42, + 31939 - 11905: 0xBC43, + 31940 - 11905: 0xBC44, + 31941 - 11905: 0xF4DB, + 31942 - 11905: 0xBC45, + 31943 - 11905: 0xF4D7, + 31944 - 11905: 0xF4DA, + 31945 - 11905: 0xBC46, + 31946 - 11905: 0xBAFD, + 31947 - 11905: 0xBC47, + 31948 - 11905: 0xF4D8, + 31949 - 11905: 0xF4D9, + 31950 - 11905: 0xBC48, + 31951 - 11905: 0xBC49, + 31952 - 11905: 0xBC4A, + 31953 - 11905: 0xBC4B, + 31954 - 11905: 0xBC4C, + 31955 - 11905: 0xBC4D, + 31956 - 11905: 0xBC4E, + 31957 - 11905: 0xB8E2, + 31958 - 11905: 0xCCC7, + 31959 - 11905: 0xF4DC, + 31960 - 11905: 0xBC4F, + 31961 - 11905: 0xB2DA, + 31962 - 11905: 0xBC50, + 31963 - 11905: 0xBC51, + 31964 - 11905: 0xC3D3, + 31965 - 11905: 0xBC52, + 31966 - 11905: 0xBC53, + 31967 - 11905: 0xD4E3, + 31968 - 11905: 0xBFB7, + 31969 - 11905: 0xBC54, + 31970 - 11905: 0xBC55, + 31971 - 11905: 0xBC56, + 31972 - 11905: 0xBC57, + 31973 - 11905: 0xBC58, + 31974 - 11905: 0xBC59, + 31975 - 11905: 0xBC5A, + 31976 - 11905: 0xF4DD, + 31977 - 11905: 0xBC5B, + 31978 - 11905: 0xBC5C, + 31979 - 11905: 0xBC5D, + 31980 - 11905: 0xBC5E, + 31981 - 11905: 0xBC5F, + 31982 - 11905: 0xBC60, + 31983 - 11905: 0xC5B4, + 31984 - 11905: 0xBC61, + 31985 - 11905: 0xBC62, + 31986 - 11905: 0xBC63, + 31987 - 11905: 0xBC64, + 31988 - 11905: 0xBC65, + 31989 - 11905: 0xBC66, + 31990 - 11905: 0xBC67, + 31991 - 11905: 0xBC68, + 31992 - 11905: 0xF4E9, + 31993 - 11905: 0xBC69, + 31994 - 11905: 0xBC6A, + 31995 - 11905: 0xCFB5, + 31996 - 11905: 0xBC6B, + 31997 - 11905: 0xBC6C, + 31998 - 11905: 0xBC6D, + 31999 - 11905: 0xBC6E, + 32000 - 11905: 0xBC6F, + 32001 - 11905: 0xBC70, + 32002 - 11905: 0xBC71, + 32003 - 11905: 0xBC72, + 32004 - 11905: 0xBC73, + 32005 - 11905: 0xBC74, + 32006 - 11905: 0xBC75, + 32007 - 11905: 0xBC76, + 32008 - 11905: 0xBC77, + 32009 - 11905: 0xBC78, + 32010 - 11905: 0xCEC9, + 32011 - 11905: 0xBC79, + 32012 - 11905: 0xBC7A, + 32013 - 11905: 0xBC7B, + 32014 - 11905: 0xBC7C, + 32015 - 11905: 0xBC7D, + 32016 - 11905: 0xBC7E, + 32017 - 11905: 0xBC80, + 32018 - 11905: 0xBC81, + 32019 - 11905: 0xBC82, + 32020 - 11905: 0xBC83, + 32021 - 11905: 0xBC84, + 32022 - 11905: 0xBC85, + 32023 - 11905: 0xBC86, + 32024 - 11905: 0xBC87, + 32025 - 11905: 0xBC88, + 32026 - 11905: 0xBC89, + 32027 - 11905: 0xBC8A, + 32028 - 11905: 0xBC8B, + 32029 - 11905: 0xBC8C, + 32030 - 11905: 0xBC8D, + 32031 - 11905: 0xBC8E, + 32032 - 11905: 0xCBD8, + 32033 - 11905: 0xBC8F, + 32034 - 11905: 0xCBF7, + 32035 - 11905: 0xBC90, + 32036 - 11905: 0xBC91, + 32037 - 11905: 0xBC92, + 32038 - 11905: 0xBC93, + 32039 - 11905: 0xBDF4, + 32040 - 11905: 0xBC94, + 32041 - 11905: 0xBC95, + 32042 - 11905: 0xBC96, + 32043 - 11905: 0xD7CF, + 32044 - 11905: 0xBC97, + 32045 - 11905: 0xBC98, + 32046 - 11905: 0xBC99, + 32047 - 11905: 0xC0DB, + 32048 - 11905: 0xBC9A, + 32049 - 11905: 0xBC9B, + 32050 - 11905: 0xBC9C, + 32051 - 11905: 0xBC9D, + 32052 - 11905: 0xBC9E, + 32053 - 11905: 0xBC9F, + 32054 - 11905: 0xBCA0, + 32055 - 11905: 0xBD40, + 32056 - 11905: 0xBD41, + 32057 - 11905: 0xBD42, + 32058 - 11905: 0xBD43, + 32059 - 11905: 0xBD44, + 32060 - 11905: 0xBD45, + 32061 - 11905: 0xBD46, + 32062 - 11905: 0xBD47, + 32063 - 11905: 0xBD48, + 32064 - 11905: 0xBD49, + 32065 - 11905: 0xBD4A, + 32066 - 11905: 0xBD4B, + 32067 - 11905: 0xBD4C, + 32068 - 11905: 0xBD4D, + 32069 - 11905: 0xBD4E, + 32070 - 11905: 0xBD4F, + 32071 - 11905: 0xBD50, + 32072 - 11905: 0xBD51, + 32073 - 11905: 0xBD52, + 32074 - 11905: 0xBD53, + 32075 - 11905: 0xBD54, + 32076 - 11905: 0xBD55, + 32077 - 11905: 0xBD56, + 32078 - 11905: 0xBD57, + 32079 - 11905: 0xBD58, + 32080 - 11905: 0xBD59, + 32081 - 11905: 0xBD5A, + 32082 - 11905: 0xBD5B, + 32083 - 11905: 0xBD5C, + 32084 - 11905: 0xBD5D, + 32085 - 11905: 0xBD5E, + 32086 - 11905: 0xBD5F, + 32087 - 11905: 0xBD60, + 32088 - 11905: 0xBD61, + 32089 - 11905: 0xBD62, + 32090 - 11905: 0xBD63, + 32091 - 11905: 0xBD64, + 32092 - 11905: 0xBD65, + 32093 - 11905: 0xBD66, + 32094 - 11905: 0xBD67, + 32095 - 11905: 0xBD68, + 32096 - 11905: 0xBD69, + 32097 - 11905: 0xBD6A, + 32098 - 11905: 0xBD6B, + 32099 - 11905: 0xBD6C, + 32100 - 11905: 0xBD6D, + 32101 - 11905: 0xBD6E, + 32102 - 11905: 0xBD6F, + 32103 - 11905: 0xBD70, + 32104 - 11905: 0xBD71, + 32105 - 11905: 0xBD72, + 32106 - 11905: 0xBD73, + 32107 - 11905: 0xBD74, + 32108 - 11905: 0xBD75, + 32109 - 11905: 0xBD76, + 32110 - 11905: 0xD0F5, + 32111 - 11905: 0xBD77, + 32112 - 11905: 0xBD78, + 32113 - 11905: 0xBD79, + 32114 - 11905: 0xBD7A, + 32115 - 11905: 0xBD7B, + 32116 - 11905: 0xBD7C, + 32117 - 11905: 0xBD7D, + 32118 - 11905: 0xBD7E, + 32119 - 11905: 0xF4EA, + 32120 - 11905: 0xBD80, + 32121 - 11905: 0xBD81, + 32122 - 11905: 0xBD82, + 32123 - 11905: 0xBD83, + 32124 - 11905: 0xBD84, + 32125 - 11905: 0xBD85, + 32126 - 11905: 0xBD86, + 32127 - 11905: 0xBD87, + 32128 - 11905: 0xBD88, + 32129 - 11905: 0xBD89, + 32130 - 11905: 0xBD8A, + 32131 - 11905: 0xBD8B, + 32132 - 11905: 0xBD8C, + 32133 - 11905: 0xBD8D, + 32134 - 11905: 0xBD8E, + 32135 - 11905: 0xBD8F, + 32136 - 11905: 0xBD90, + 32137 - 11905: 0xBD91, + 32138 - 11905: 0xBD92, + 32139 - 11905: 0xBD93, + 32140 - 11905: 0xBD94, + 32141 - 11905: 0xBD95, + 32142 - 11905: 0xBD96, + 32143 - 11905: 0xBD97, + 32144 - 11905: 0xBD98, + 32145 - 11905: 0xBD99, + 32146 - 11905: 0xBD9A, + 32147 - 11905: 0xBD9B, + 32148 - 11905: 0xBD9C, + 32149 - 11905: 0xBD9D, + 32150 - 11905: 0xBD9E, + 32151 - 11905: 0xBD9F, + 32152 - 11905: 0xBDA0, + 32153 - 11905: 0xBE40, + 32154 - 11905: 0xBE41, + 32155 - 11905: 0xBE42, + 32156 - 11905: 0xBE43, + 32157 - 11905: 0xBE44, + 32158 - 11905: 0xBE45, + 32159 - 11905: 0xBE46, + 32160 - 11905: 0xBE47, + 32161 - 11905: 0xBE48, + 32162 - 11905: 0xBE49, + 32163 - 11905: 0xBE4A, + 32164 - 11905: 0xBE4B, + 32165 - 11905: 0xBE4C, + 32166 - 11905: 0xF4EB, + 32167 - 11905: 0xBE4D, + 32168 - 11905: 0xBE4E, + 32169 - 11905: 0xBE4F, + 32170 - 11905: 0xBE50, + 32171 - 11905: 0xBE51, + 32172 - 11905: 0xBE52, + 32173 - 11905: 0xBE53, + 32174 - 11905: 0xF4EC, + 32175 - 11905: 0xBE54, + 32176 - 11905: 0xBE55, + 32177 - 11905: 0xBE56, + 32178 - 11905: 0xBE57, + 32179 - 11905: 0xBE58, + 32180 - 11905: 0xBE59, + 32181 - 11905: 0xBE5A, + 32182 - 11905: 0xBE5B, + 32183 - 11905: 0xBE5C, + 32184 - 11905: 0xBE5D, + 32185 - 11905: 0xBE5E, + 32186 - 11905: 0xBE5F, + 32187 - 11905: 0xBE60, + 32188 - 11905: 0xBE61, + 32189 - 11905: 0xBE62, + 32190 - 11905: 0xBE63, + 32191 - 11905: 0xBE64, + 32192 - 11905: 0xBE65, + 32193 - 11905: 0xBE66, + 32194 - 11905: 0xBE67, + 32195 - 11905: 0xBE68, + 32196 - 11905: 0xBE69, + 32197 - 11905: 0xBE6A, + 32198 - 11905: 0xBE6B, + 32199 - 11905: 0xBE6C, + 32200 - 11905: 0xBE6D, + 32201 - 11905: 0xBE6E, + 32202 - 11905: 0xBE6F, + 32203 - 11905: 0xBE70, + 32204 - 11905: 0xBE71, + 32205 - 11905: 0xBE72, + 32206 - 11905: 0xBE73, + 32207 - 11905: 0xBE74, + 32208 - 11905: 0xBE75, + 32209 - 11905: 0xBE76, + 32210 - 11905: 0xBE77, + 32211 - 11905: 0xBE78, + 32212 - 11905: 0xBE79, + 32213 - 11905: 0xBE7A, + 32214 - 11905: 0xBE7B, + 32215 - 11905: 0xBE7C, + 32216 - 11905: 0xBE7D, + 32217 - 11905: 0xBE7E, + 32218 - 11905: 0xBE80, + 32219 - 11905: 0xBE81, + 32220 - 11905: 0xBE82, + 32221 - 11905: 0xBE83, + 32222 - 11905: 0xBE84, + 32223 - 11905: 0xBE85, + 32224 - 11905: 0xBE86, + 32225 - 11905: 0xBE87, + 32226 - 11905: 0xBE88, + 32227 - 11905: 0xBE89, + 32228 - 11905: 0xBE8A, + 32229 - 11905: 0xBE8B, + 32230 - 11905: 0xBE8C, + 32231 - 11905: 0xBE8D, + 32232 - 11905: 0xBE8E, + 32233 - 11905: 0xBE8F, + 32234 - 11905: 0xBE90, + 32235 - 11905: 0xBE91, + 32236 - 11905: 0xBE92, + 32237 - 11905: 0xBE93, + 32238 - 11905: 0xBE94, + 32239 - 11905: 0xBE95, + 32240 - 11905: 0xBE96, + 32241 - 11905: 0xBE97, + 32242 - 11905: 0xBE98, + 32243 - 11905: 0xBE99, + 32244 - 11905: 0xBE9A, + 32245 - 11905: 0xBE9B, + 32246 - 11905: 0xBE9C, + 32247 - 11905: 0xBE9D, + 32248 - 11905: 0xBE9E, + 32249 - 11905: 0xBE9F, + 32250 - 11905: 0xBEA0, + 32251 - 11905: 0xBF40, + 32252 - 11905: 0xBF41, + 32253 - 11905: 0xBF42, + 32254 - 11905: 0xBF43, + 32255 - 11905: 0xBF44, + 32256 - 11905: 0xBF45, + 32257 - 11905: 0xBF46, + 32258 - 11905: 0xBF47, + 32259 - 11905: 0xBF48, + 32260 - 11905: 0xBF49, + 32261 - 11905: 0xBF4A, + 32262 - 11905: 0xBF4B, + 32263 - 11905: 0xBF4C, + 32264 - 11905: 0xBF4D, + 32265 - 11905: 0xBF4E, + 32266 - 11905: 0xBF4F, + 32267 - 11905: 0xBF50, + 32268 - 11905: 0xBF51, + 32269 - 11905: 0xBF52, + 32270 - 11905: 0xBF53, + 32271 - 11905: 0xBF54, + 32272 - 11905: 0xBF55, + 32273 - 11905: 0xBF56, + 32274 - 11905: 0xBF57, + 32275 - 11905: 0xBF58, + 32276 - 11905: 0xBF59, + 32277 - 11905: 0xBF5A, + 32278 - 11905: 0xBF5B, + 32279 - 11905: 0xBF5C, + 32280 - 11905: 0xBF5D, + 32281 - 11905: 0xBF5E, + 32282 - 11905: 0xBF5F, + 32283 - 11905: 0xBF60, + 32284 - 11905: 0xBF61, + 32285 - 11905: 0xBF62, + 32286 - 11905: 0xBF63, + 32287 - 11905: 0xBF64, + 32288 - 11905: 0xBF65, + 32289 - 11905: 0xBF66, + 32290 - 11905: 0xBF67, + 32291 - 11905: 0xBF68, + 32292 - 11905: 0xBF69, + 32293 - 11905: 0xBF6A, + 32294 - 11905: 0xBF6B, + 32295 - 11905: 0xBF6C, + 32296 - 11905: 0xBF6D, + 32297 - 11905: 0xBF6E, + 32298 - 11905: 0xBF6F, + 32299 - 11905: 0xBF70, + 32300 - 11905: 0xBF71, + 32301 - 11905: 0xBF72, + 32302 - 11905: 0xBF73, + 32303 - 11905: 0xBF74, + 32304 - 11905: 0xBF75, + 32305 - 11905: 0xBF76, + 32306 - 11905: 0xBF77, + 32307 - 11905: 0xBF78, + 32308 - 11905: 0xBF79, + 32309 - 11905: 0xBF7A, + 32310 - 11905: 0xBF7B, + 32311 - 11905: 0xBF7C, + 32312 - 11905: 0xBF7D, + 32313 - 11905: 0xBF7E, + 32314 - 11905: 0xBF80, + 32315 - 11905: 0xF7E3, + 32316 - 11905: 0xBF81, + 32317 - 11905: 0xBF82, + 32318 - 11905: 0xBF83, + 32319 - 11905: 0xBF84, + 32320 - 11905: 0xBF85, + 32321 - 11905: 0xB7B1, + 32322 - 11905: 0xBF86, + 32323 - 11905: 0xBF87, + 32324 - 11905: 0xBF88, + 32325 - 11905: 0xBF89, + 32326 - 11905: 0xBF8A, + 32327 - 11905: 0xF4ED, + 32328 - 11905: 0xBF8B, + 32329 - 11905: 0xBF8C, + 32330 - 11905: 0xBF8D, + 32331 - 11905: 0xBF8E, + 32332 - 11905: 0xBF8F, + 32333 - 11905: 0xBF90, + 32334 - 11905: 0xBF91, + 32335 - 11905: 0xBF92, + 32336 - 11905: 0xBF93, + 32337 - 11905: 0xBF94, + 32338 - 11905: 0xBF95, + 32339 - 11905: 0xBF96, + 32340 - 11905: 0xBF97, + 32341 - 11905: 0xBF98, + 32342 - 11905: 0xBF99, + 32343 - 11905: 0xBF9A, + 32344 - 11905: 0xBF9B, + 32345 - 11905: 0xBF9C, + 32346 - 11905: 0xBF9D, + 32347 - 11905: 0xBF9E, + 32348 - 11905: 0xBF9F, + 32349 - 11905: 0xBFA0, + 32350 - 11905: 0xC040, + 32351 - 11905: 0xC041, + 32352 - 11905: 0xC042, + 32353 - 11905: 0xC043, + 32354 - 11905: 0xC044, + 32355 - 11905: 0xC045, + 32356 - 11905: 0xC046, + 32357 - 11905: 0xC047, + 32358 - 11905: 0xC048, + 32359 - 11905: 0xC049, + 32360 - 11905: 0xC04A, + 32361 - 11905: 0xC04B, + 32362 - 11905: 0xC04C, + 32363 - 11905: 0xC04D, + 32364 - 11905: 0xC04E, + 32365 - 11905: 0xC04F, + 32366 - 11905: 0xC050, + 32367 - 11905: 0xC051, + 32368 - 11905: 0xC052, + 32369 - 11905: 0xC053, + 32370 - 11905: 0xC054, + 32371 - 11905: 0xC055, + 32372 - 11905: 0xC056, + 32373 - 11905: 0xC057, + 32374 - 11905: 0xC058, + 32375 - 11905: 0xC059, + 32376 - 11905: 0xC05A, + 32377 - 11905: 0xC05B, + 32378 - 11905: 0xC05C, + 32379 - 11905: 0xC05D, + 32380 - 11905: 0xC05E, + 32381 - 11905: 0xC05F, + 32382 - 11905: 0xC060, + 32383 - 11905: 0xC061, + 32384 - 11905: 0xC062, + 32385 - 11905: 0xC063, + 32386 - 11905: 0xD7EB, + 32387 - 11905: 0xC064, + 32388 - 11905: 0xC065, + 32389 - 11905: 0xC066, + 32390 - 11905: 0xC067, + 32391 - 11905: 0xC068, + 32392 - 11905: 0xC069, + 32393 - 11905: 0xC06A, + 32394 - 11905: 0xC06B, + 32395 - 11905: 0xC06C, + 32396 - 11905: 0xC06D, + 32397 - 11905: 0xC06E, + 32398 - 11905: 0xC06F, + 32399 - 11905: 0xC070, + 32400 - 11905: 0xC071, + 32401 - 11905: 0xC072, + 32402 - 11905: 0xC073, + 32403 - 11905: 0xC074, + 32404 - 11905: 0xC075, + 32405 - 11905: 0xC076, + 32406 - 11905: 0xC077, + 32407 - 11905: 0xC078, + 32408 - 11905: 0xC079, + 32409 - 11905: 0xC07A, + 32410 - 11905: 0xC07B, + 32411 - 11905: 0xF4EE, + 32412 - 11905: 0xC07C, + 32413 - 11905: 0xC07D, + 32414 - 11905: 0xC07E, + 32415 - 11905: 0xE6F9, + 32416 - 11905: 0xBEC0, + 32417 - 11905: 0xE6FA, + 32418 - 11905: 0xBAEC, + 32419 - 11905: 0xE6FB, + 32420 - 11905: 0xCFCB, + 32421 - 11905: 0xE6FC, + 32422 - 11905: 0xD4BC, + 32423 - 11905: 0xBCB6, + 32424 - 11905: 0xE6FD, + 32425 - 11905: 0xE6FE, + 32426 - 11905: 0xBCCD, + 32427 - 11905: 0xC8D2, + 32428 - 11905: 0xCEB3, + 32429 - 11905: 0xE7A1, + 32430 - 11905: 0xC080, + 32431 - 11905: 0xB4BF, + 32432 - 11905: 0xE7A2, + 32433 - 11905: 0xC9B4, + 32434 - 11905: 0xB8D9, + 32435 - 11905: 0xC4C9, + 32436 - 11905: 0xC081, + 32437 - 11905: 0xD7DD, + 32438 - 11905: 0xC2DA, + 32439 - 11905: 0xB7D7, + 32440 - 11905: 0xD6BD, + 32441 - 11905: 0xCEC6, + 32442 - 11905: 0xB7C4, + 32443 - 11905: 0xC082, + 32444 - 11905: 0xC083, + 32445 - 11905: 0xC5A6, + 32446 - 11905: 0xE7A3, + 32447 - 11905: 0xCFDF, + 32448 - 11905: 0xE7A4, + 32449 - 11905: 0xE7A5, + 32450 - 11905: 0xE7A6, + 32451 - 11905: 0xC1B7, + 32452 - 11905: 0xD7E9, + 32453 - 11905: 0xC9F0, + 32454 - 11905: 0xCFB8, + 32455 - 11905: 0xD6AF, + 32456 - 11905: 0xD6D5, + 32457 - 11905: 0xE7A7, + 32458 - 11905: 0xB0ED, + 32459 - 11905: 0xE7A8, + 32460 - 11905: 0xE7A9, + 32461 - 11905: 0xC9DC, + 32462 - 11905: 0xD2EF, + 32463 - 11905: 0xBEAD, + 32464 - 11905: 0xE7AA, + 32465 - 11905: 0xB0F3, + 32466 - 11905: 0xC8DE, + 32467 - 11905: 0xBDE1, + 32468 - 11905: 0xE7AB, + 32469 - 11905: 0xC8C6, + 32470 - 11905: 0xC084, + 32471 - 11905: 0xE7AC, + 32472 - 11905: 0xBBE6, + 32473 - 11905: 0xB8F8, + 32474 - 11905: 0xD1A4, + 32475 - 11905: 0xE7AD, + 32476 - 11905: 0xC2E7, + 32477 - 11905: 0xBEF8, + 32478 - 11905: 0xBDCA, + 32479 - 11905: 0xCDB3, + 32480 - 11905: 0xE7AE, + 32481 - 11905: 0xE7AF, + 32482 - 11905: 0xBEEE, + 32483 - 11905: 0xD0E5, + 32484 - 11905: 0xC085, + 32485 - 11905: 0xCBE7, + 32486 - 11905: 0xCCD0, + 32487 - 11905: 0xBCCC, + 32488 - 11905: 0xE7B0, + 32489 - 11905: 0xBCA8, + 32490 - 11905: 0xD0F7, + 32491 - 11905: 0xE7B1, + 32492 - 11905: 0xC086, + 32493 - 11905: 0xD0F8, + 32494 - 11905: 0xE7B2, + 32495 - 11905: 0xE7B3, + 32496 - 11905: 0xB4C2, + 32497 - 11905: 0xE7B4, + 32498 - 11905: 0xE7B5, + 32499 - 11905: 0xC9FE, + 32500 - 11905: 0xCEAC, + 32501 - 11905: 0xC3E0, + 32502 - 11905: 0xE7B7, + 32503 - 11905: 0xB1C1, + 32504 - 11905: 0xB3F1, + 32505 - 11905: 0xC087, + 32506 - 11905: 0xE7B8, + 32507 - 11905: 0xE7B9, + 32508 - 11905: 0xD7DB, + 32509 - 11905: 0xD5C0, + 32510 - 11905: 0xE7BA, + 32511 - 11905: 0xC2CC, + 32512 - 11905: 0xD7BA, + 32513 - 11905: 0xE7BB, + 32514 - 11905: 0xE7BC, + 32515 - 11905: 0xE7BD, + 32516 - 11905: 0xBCEA, + 32517 - 11905: 0xC3E5, + 32518 - 11905: 0xC0C2, + 32519 - 11905: 0xE7BE, + 32520 - 11905: 0xE7BF, + 32521 - 11905: 0xBCA9, + 32522 - 11905: 0xC088, + 32523 - 11905: 0xE7C0, + 32524 - 11905: 0xE7C1, + 32525 - 11905: 0xE7B6, + 32526 - 11905: 0xB6D0, + 32527 - 11905: 0xE7C2, + 32528 - 11905: 0xC089, + 32529 - 11905: 0xE7C3, + 32530 - 11905: 0xE7C4, + 32531 - 11905: 0xBBBA, + 32532 - 11905: 0xB5DE, + 32533 - 11905: 0xC2C6, + 32534 - 11905: 0xB1E0, + 32535 - 11905: 0xE7C5, + 32536 - 11905: 0xD4B5, + 32537 - 11905: 0xE7C6, + 32538 - 11905: 0xB8BF, + 32539 - 11905: 0xE7C8, + 32540 - 11905: 0xE7C7, + 32541 - 11905: 0xB7EC, + 32542 - 11905: 0xC08A, + 32543 - 11905: 0xE7C9, + 32544 - 11905: 0xB2F8, + 32545 - 11905: 0xE7CA, + 32546 - 11905: 0xE7CB, + 32547 - 11905: 0xE7CC, + 32548 - 11905: 0xE7CD, + 32549 - 11905: 0xE7CE, + 32550 - 11905: 0xE7CF, + 32551 - 11905: 0xE7D0, + 32552 - 11905: 0xD3A7, + 32553 - 11905: 0xCBF5, + 32554 - 11905: 0xE7D1, + 32555 - 11905: 0xE7D2, + 32556 - 11905: 0xE7D3, + 32557 - 11905: 0xE7D4, + 32558 - 11905: 0xC9C9, + 32559 - 11905: 0xE7D5, + 32560 - 11905: 0xE7D6, + 32561 - 11905: 0xE7D7, + 32562 - 11905: 0xE7D8, + 32563 - 11905: 0xE7D9, + 32564 - 11905: 0xBDC9, + 32565 - 11905: 0xE7DA, + 32566 - 11905: 0xF3BE, + 32567 - 11905: 0xC08B, + 32568 - 11905: 0xB8D7, + 32569 - 11905: 0xC08C, + 32570 - 11905: 0xC8B1, + 32571 - 11905: 0xC08D, + 32572 - 11905: 0xC08E, + 32573 - 11905: 0xC08F, + 32574 - 11905: 0xC090, + 32575 - 11905: 0xC091, + 32576 - 11905: 0xC092, + 32577 - 11905: 0xC093, + 32578 - 11905: 0xF3BF, + 32579 - 11905: 0xC094, + 32580 - 11905: 0xF3C0, + 32581 - 11905: 0xF3C1, + 32582 - 11905: 0xC095, + 32583 - 11905: 0xC096, + 32584 - 11905: 0xC097, + 32585 - 11905: 0xC098, + 32586 - 11905: 0xC099, + 32587 - 11905: 0xC09A, + 32588 - 11905: 0xC09B, + 32589 - 11905: 0xC09C, + 32590 - 11905: 0xC09D, + 32591 - 11905: 0xC09E, + 32592 - 11905: 0xB9DE, + 32593 - 11905: 0xCDF8, + 32594 - 11905: 0xC09F, + 32595 - 11905: 0xC0A0, + 32596 - 11905: 0xD8E8, + 32597 - 11905: 0xBAB1, + 32598 - 11905: 0xC140, + 32599 - 11905: 0xC2DE, + 32600 - 11905: 0xEEB7, + 32601 - 11905: 0xC141, + 32602 - 11905: 0xB7A3, + 32603 - 11905: 0xC142, + 32604 - 11905: 0xC143, + 32605 - 11905: 0xC144, + 32606 - 11905: 0xC145, + 32607 - 11905: 0xEEB9, + 32608 - 11905: 0xC146, + 32609 - 11905: 0xEEB8, + 32610 - 11905: 0xB0D5, + 32611 - 11905: 0xC147, + 32612 - 11905: 0xC148, + 32613 - 11905: 0xC149, + 32614 - 11905: 0xC14A, + 32615 - 11905: 0xC14B, + 32616 - 11905: 0xEEBB, + 32617 - 11905: 0xD5D6, + 32618 - 11905: 0xD7EF, + 32619 - 11905: 0xC14C, + 32620 - 11905: 0xC14D, + 32621 - 11905: 0xC14E, + 32622 - 11905: 0xD6C3, + 32623 - 11905: 0xC14F, + 32624 - 11905: 0xC150, + 32625 - 11905: 0xEEBD, + 32626 - 11905: 0xCAF0, + 32627 - 11905: 0xC151, + 32628 - 11905: 0xEEBC, + 32629 - 11905: 0xC152, + 32630 - 11905: 0xC153, + 32631 - 11905: 0xC154, + 32632 - 11905: 0xC155, + 32633 - 11905: 0xEEBE, + 32634 - 11905: 0xC156, + 32635 - 11905: 0xC157, + 32636 - 11905: 0xC158, + 32637 - 11905: 0xC159, + 32638 - 11905: 0xEEC0, + 32639 - 11905: 0xC15A, + 32640 - 11905: 0xC15B, + 32641 - 11905: 0xEEBF, + 32642 - 11905: 0xC15C, + 32643 - 11905: 0xC15D, + 32644 - 11905: 0xC15E, + 32645 - 11905: 0xC15F, + 32646 - 11905: 0xC160, + 32647 - 11905: 0xC161, + 32648 - 11905: 0xC162, + 32649 - 11905: 0xC163, + 32650 - 11905: 0xD1F2, + 32651 - 11905: 0xC164, + 32652 - 11905: 0xC7BC, + 32653 - 11905: 0xC165, + 32654 - 11905: 0xC3C0, + 32655 - 11905: 0xC166, + 32656 - 11905: 0xC167, + 32657 - 11905: 0xC168, + 32658 - 11905: 0xC169, + 32659 - 11905: 0xC16A, + 32660 - 11905: 0xB8E1, + 32661 - 11905: 0xC16B, + 32662 - 11905: 0xC16C, + 32663 - 11905: 0xC16D, + 32664 - 11905: 0xC16E, + 32665 - 11905: 0xC16F, + 32666 - 11905: 0xC1E7, + 32667 - 11905: 0xC170, + 32668 - 11905: 0xC171, + 32669 - 11905: 0xF4C6, + 32670 - 11905: 0xD0DF, + 32671 - 11905: 0xF4C7, + 32672 - 11905: 0xC172, + 32673 - 11905: 0xCFDB, + 32674 - 11905: 0xC173, + 32675 - 11905: 0xC174, + 32676 - 11905: 0xC8BA, + 32677 - 11905: 0xC175, + 32678 - 11905: 0xC176, + 32679 - 11905: 0xF4C8, + 32680 - 11905: 0xC177, + 32681 - 11905: 0xC178, + 32682 - 11905: 0xC179, + 32683 - 11905: 0xC17A, + 32684 - 11905: 0xC17B, + 32685 - 11905: 0xC17C, + 32686 - 11905: 0xC17D, + 32687 - 11905: 0xF4C9, + 32688 - 11905: 0xF4CA, + 32689 - 11905: 0xC17E, + 32690 - 11905: 0xF4CB, + 32691 - 11905: 0xC180, + 32692 - 11905: 0xC181, + 32693 - 11905: 0xC182, + 32694 - 11905: 0xC183, + 32695 - 11905: 0xC184, + 32696 - 11905: 0xD9FA, + 32697 - 11905: 0xB8FE, + 32698 - 11905: 0xC185, + 32699 - 11905: 0xC186, + 32700 - 11905: 0xE5F1, + 32701 - 11905: 0xD3F0, + 32702 - 11905: 0xC187, + 32703 - 11905: 0xF4E0, + 32704 - 11905: 0xC188, + 32705 - 11905: 0xCECC, + 32706 - 11905: 0xC189, + 32707 - 11905: 0xC18A, + 32708 - 11905: 0xC18B, + 32709 - 11905: 0xB3E1, + 32710 - 11905: 0xC18C, + 32711 - 11905: 0xC18D, + 32712 - 11905: 0xC18E, + 32713 - 11905: 0xC18F, + 32714 - 11905: 0xF1B4, + 32715 - 11905: 0xC190, + 32716 - 11905: 0xD2EE, + 32717 - 11905: 0xC191, + 32718 - 11905: 0xF4E1, + 32719 - 11905: 0xC192, + 32720 - 11905: 0xC193, + 32721 - 11905: 0xC194, + 32722 - 11905: 0xC195, + 32723 - 11905: 0xC196, + 32724 - 11905: 0xCFE8, + 32725 - 11905: 0xF4E2, + 32726 - 11905: 0xC197, + 32727 - 11905: 0xC198, + 32728 - 11905: 0xC7CC, + 32729 - 11905: 0xC199, + 32730 - 11905: 0xC19A, + 32731 - 11905: 0xC19B, + 32732 - 11905: 0xC19C, + 32733 - 11905: 0xC19D, + 32734 - 11905: 0xC19E, + 32735 - 11905: 0xB5D4, + 32736 - 11905: 0xB4E4, + 32737 - 11905: 0xF4E4, + 32738 - 11905: 0xC19F, + 32739 - 11905: 0xC1A0, + 32740 - 11905: 0xC240, + 32741 - 11905: 0xF4E3, + 32742 - 11905: 0xF4E5, + 32743 - 11905: 0xC241, + 32744 - 11905: 0xC242, + 32745 - 11905: 0xF4E6, + 32746 - 11905: 0xC243, + 32747 - 11905: 0xC244, + 32748 - 11905: 0xC245, + 32749 - 11905: 0xC246, + 32750 - 11905: 0xF4E7, + 32751 - 11905: 0xC247, + 32752 - 11905: 0xBAB2, + 32753 - 11905: 0xB0BF, + 32754 - 11905: 0xC248, + 32755 - 11905: 0xF4E8, + 32756 - 11905: 0xC249, + 32757 - 11905: 0xC24A, + 32758 - 11905: 0xC24B, + 32759 - 11905: 0xC24C, + 32760 - 11905: 0xC24D, + 32761 - 11905: 0xC24E, + 32762 - 11905: 0xC24F, + 32763 - 11905: 0xB7AD, + 32764 - 11905: 0xD2ED, + 32765 - 11905: 0xC250, + 32766 - 11905: 0xC251, + 32767 - 11905: 0xC252, + 32768 - 11905: 0xD2AB, + 32769 - 11905: 0xC0CF, + 32770 - 11905: 0xC253, + 32771 - 11905: 0xBFBC, + 32772 - 11905: 0xEBA3, + 32773 - 11905: 0xD5DF, + 32774 - 11905: 0xEAC8, + 32775 - 11905: 0xC254, + 32776 - 11905: 0xC255, + 32777 - 11905: 0xC256, + 32778 - 11905: 0xC257, + 32779 - 11905: 0xF1F3, + 32780 - 11905: 0xB6F8, + 32781 - 11905: 0xCBA3, + 32782 - 11905: 0xC258, + 32783 - 11905: 0xC259, + 32784 - 11905: 0xC4CD, + 32785 - 11905: 0xC25A, + 32786 - 11905: 0xF1E7, + 32787 - 11905: 0xC25B, + 32788 - 11905: 0xF1E8, + 32789 - 11905: 0xB8FB, + 32790 - 11905: 0xF1E9, + 32791 - 11905: 0xBAC4, + 32792 - 11905: 0xD4C5, + 32793 - 11905: 0xB0D2, + 32794 - 11905: 0xC25C, + 32795 - 11905: 0xC25D, + 32796 - 11905: 0xF1EA, + 32797 - 11905: 0xC25E, + 32798 - 11905: 0xC25F, + 32799 - 11905: 0xC260, + 32800 - 11905: 0xF1EB, + 32801 - 11905: 0xC261, + 32802 - 11905: 0xF1EC, + 32803 - 11905: 0xC262, + 32804 - 11905: 0xC263, + 32805 - 11905: 0xF1ED, + 32806 - 11905: 0xF1EE, + 32807 - 11905: 0xF1EF, + 32808 - 11905: 0xF1F1, + 32809 - 11905: 0xF1F0, + 32810 - 11905: 0xC5D5, + 32811 - 11905: 0xC264, + 32812 - 11905: 0xC265, + 32813 - 11905: 0xC266, + 32814 - 11905: 0xC267, + 32815 - 11905: 0xC268, + 32816 - 11905: 0xC269, + 32817 - 11905: 0xF1F2, + 32818 - 11905: 0xC26A, + 32819 - 11905: 0xB6FA, + 32820 - 11905: 0xC26B, + 32821 - 11905: 0xF1F4, + 32822 - 11905: 0xD2AE, + 32823 - 11905: 0xDEC7, + 32824 - 11905: 0xCBCA, + 32825 - 11905: 0xC26C, + 32826 - 11905: 0xC26D, + 32827 - 11905: 0xB3DC, + 32828 - 11905: 0xC26E, + 32829 - 11905: 0xB5A2, + 32830 - 11905: 0xC26F, + 32831 - 11905: 0xB9A2, + 32832 - 11905: 0xC270, + 32833 - 11905: 0xC271, + 32834 - 11905: 0xC4F4, + 32835 - 11905: 0xF1F5, + 32836 - 11905: 0xC272, + 32837 - 11905: 0xC273, + 32838 - 11905: 0xF1F6, + 32839 - 11905: 0xC274, + 32840 - 11905: 0xC275, + 32841 - 11905: 0xC276, + 32842 - 11905: 0xC1C4, + 32843 - 11905: 0xC1FB, + 32844 - 11905: 0xD6B0, + 32845 - 11905: 0xF1F7, + 32846 - 11905: 0xC277, + 32847 - 11905: 0xC278, + 32848 - 11905: 0xC279, + 32849 - 11905: 0xC27A, + 32850 - 11905: 0xF1F8, + 32851 - 11905: 0xC27B, + 32852 - 11905: 0xC1AA, + 32853 - 11905: 0xC27C, + 32854 - 11905: 0xC27D, + 32855 - 11905: 0xC27E, + 32856 - 11905: 0xC6B8, + 32857 - 11905: 0xC280, + 32858 - 11905: 0xBEDB, + 32859 - 11905: 0xC281, + 32860 - 11905: 0xC282, + 32861 - 11905: 0xC283, + 32862 - 11905: 0xC284, + 32863 - 11905: 0xC285, + 32864 - 11905: 0xC286, + 32865 - 11905: 0xC287, + 32866 - 11905: 0xC288, + 32867 - 11905: 0xC289, + 32868 - 11905: 0xC28A, + 32869 - 11905: 0xC28B, + 32870 - 11905: 0xC28C, + 32871 - 11905: 0xC28D, + 32872 - 11905: 0xC28E, + 32873 - 11905: 0xF1F9, + 32874 - 11905: 0xB4CF, + 32875 - 11905: 0xC28F, + 32876 - 11905: 0xC290, + 32877 - 11905: 0xC291, + 32878 - 11905: 0xC292, + 32879 - 11905: 0xC293, + 32880 - 11905: 0xC294, + 32881 - 11905: 0xF1FA, + 32882 - 11905: 0xC295, + 32883 - 11905: 0xC296, + 32884 - 11905: 0xC297, + 32885 - 11905: 0xC298, + 32886 - 11905: 0xC299, + 32887 - 11905: 0xC29A, + 32888 - 11905: 0xC29B, + 32889 - 11905: 0xC29C, + 32890 - 11905: 0xC29D, + 32891 - 11905: 0xC29E, + 32892 - 11905: 0xC29F, + 32893 - 11905: 0xC2A0, + 32894 - 11905: 0xC340, + 32895 - 11905: 0xEDB2, + 32896 - 11905: 0xEDB1, + 32897 - 11905: 0xC341, + 32898 - 11905: 0xC342, + 32899 - 11905: 0xCBE0, + 32900 - 11905: 0xD2DE, + 32901 - 11905: 0xC343, + 32902 - 11905: 0xCBC1, + 32903 - 11905: 0xD5D8, + 32904 - 11905: 0xC344, + 32905 - 11905: 0xC8E2, + 32906 - 11905: 0xC345, + 32907 - 11905: 0xC0DF, + 32908 - 11905: 0xBCA1, + 32909 - 11905: 0xC346, + 32910 - 11905: 0xC347, + 32911 - 11905: 0xC348, + 32912 - 11905: 0xC349, + 32913 - 11905: 0xC34A, + 32914 - 11905: 0xC34B, + 32915 - 11905: 0xEBC1, + 32916 - 11905: 0xC34C, + 32917 - 11905: 0xC34D, + 32918 - 11905: 0xD0A4, + 32919 - 11905: 0xC34E, + 32920 - 11905: 0xD6E2, + 32921 - 11905: 0xC34F, + 32922 - 11905: 0xB6C7, + 32923 - 11905: 0xB8D8, + 32924 - 11905: 0xEBC0, + 32925 - 11905: 0xB8CE, + 32926 - 11905: 0xC350, + 32927 - 11905: 0xEBBF, + 32928 - 11905: 0xB3A6, + 32929 - 11905: 0xB9C9, + 32930 - 11905: 0xD6AB, + 32931 - 11905: 0xC351, + 32932 - 11905: 0xB7F4, + 32933 - 11905: 0xB7CA, + 32934 - 11905: 0xC352, + 32935 - 11905: 0xC353, + 32936 - 11905: 0xC354, + 32937 - 11905: 0xBCE7, + 32938 - 11905: 0xB7BE, + 32939 - 11905: 0xEBC6, + 32940 - 11905: 0xC355, + 32941 - 11905: 0xEBC7, + 32942 - 11905: 0xB0B9, + 32943 - 11905: 0xBFCF, + 32944 - 11905: 0xC356, + 32945 - 11905: 0xEBC5, + 32946 - 11905: 0xD3FD, + 32947 - 11905: 0xC357, + 32948 - 11905: 0xEBC8, + 32949 - 11905: 0xC358, + 32950 - 11905: 0xC359, + 32951 - 11905: 0xEBC9, + 32952 - 11905: 0xC35A, + 32953 - 11905: 0xC35B, + 32954 - 11905: 0xB7CE, + 32955 - 11905: 0xC35C, + 32956 - 11905: 0xEBC2, + 32957 - 11905: 0xEBC4, + 32958 - 11905: 0xC9F6, + 32959 - 11905: 0xD6D7, + 32960 - 11905: 0xD5CD, + 32961 - 11905: 0xD0B2, + 32962 - 11905: 0xEBCF, + 32963 - 11905: 0xCEB8, + 32964 - 11905: 0xEBD0, + 32965 - 11905: 0xC35D, + 32966 - 11905: 0xB5A8, + 32967 - 11905: 0xC35E, + 32968 - 11905: 0xC35F, + 32969 - 11905: 0xC360, + 32970 - 11905: 0xC361, + 32971 - 11905: 0xC362, + 32972 - 11905: 0xB1B3, + 32973 - 11905: 0xEBD2, + 32974 - 11905: 0xCCA5, + 32975 - 11905: 0xC363, + 32976 - 11905: 0xC364, + 32977 - 11905: 0xC365, + 32978 - 11905: 0xC366, + 32979 - 11905: 0xC367, + 32980 - 11905: 0xC368, + 32981 - 11905: 0xC369, + 32982 - 11905: 0xC5D6, + 32983 - 11905: 0xEBD3, + 32984 - 11905: 0xC36A, + 32985 - 11905: 0xEBD1, + 32986 - 11905: 0xC5DF, + 32987 - 11905: 0xEBCE, + 32988 - 11905: 0xCAA4, + 32989 - 11905: 0xEBD5, + 32990 - 11905: 0xB0FB, + 32991 - 11905: 0xC36B, + 32992 - 11905: 0xC36C, + 32993 - 11905: 0xBAFA, + 32994 - 11905: 0xC36D, + 32995 - 11905: 0xC36E, + 32996 - 11905: 0xD8B7, + 32997 - 11905: 0xF1E3, + 32998 - 11905: 0xC36F, + 32999 - 11905: 0xEBCA, + 33000 - 11905: 0xEBCB, + 33001 - 11905: 0xEBCC, + 33002 - 11905: 0xEBCD, + 33003 - 11905: 0xEBD6, + 33004 - 11905: 0xE6C0, + 33005 - 11905: 0xEBD9, + 33006 - 11905: 0xC370, + 33007 - 11905: 0xBFE8, + 33008 - 11905: 0xD2C8, + 33009 - 11905: 0xEBD7, + 33010 - 11905: 0xEBDC, + 33011 - 11905: 0xB8EC, + 33012 - 11905: 0xEBD8, + 33013 - 11905: 0xC371, + 33014 - 11905: 0xBDBA, + 33015 - 11905: 0xC372, + 33016 - 11905: 0xD0D8, + 33017 - 11905: 0xC373, + 33018 - 11905: 0xB0B7, + 33019 - 11905: 0xC374, + 33020 - 11905: 0xEBDD, + 33021 - 11905: 0xC4DC, + 33022 - 11905: 0xC375, + 33023 - 11905: 0xC376, + 33024 - 11905: 0xC377, + 33025 - 11905: 0xC378, + 33026 - 11905: 0xD6AC, + 33027 - 11905: 0xC379, + 33028 - 11905: 0xC37A, + 33029 - 11905: 0xC37B, + 33030 - 11905: 0xB4E0, + 33031 - 11905: 0xC37C, + 33032 - 11905: 0xC37D, + 33033 - 11905: 0xC2F6, + 33034 - 11905: 0xBCB9, + 33035 - 11905: 0xC37E, + 33036 - 11905: 0xC380, + 33037 - 11905: 0xEBDA, + 33038 - 11905: 0xEBDB, + 33039 - 11905: 0xD4E0, + 33040 - 11905: 0xC6EA, + 33041 - 11905: 0xC4D4, + 33042 - 11905: 0xEBDF, + 33043 - 11905: 0xC5A7, + 33044 - 11905: 0xD9F5, + 33045 - 11905: 0xC381, + 33046 - 11905: 0xB2B1, + 33047 - 11905: 0xC382, + 33048 - 11905: 0xEBE4, + 33049 - 11905: 0xC383, + 33050 - 11905: 0xBDC5, + 33051 - 11905: 0xC384, + 33052 - 11905: 0xC385, + 33053 - 11905: 0xC386, + 33054 - 11905: 0xEBE2, + 33055 - 11905: 0xC387, + 33056 - 11905: 0xC388, + 33057 - 11905: 0xC389, + 33058 - 11905: 0xC38A, + 33059 - 11905: 0xC38B, + 33060 - 11905: 0xC38C, + 33061 - 11905: 0xC38D, + 33062 - 11905: 0xC38E, + 33063 - 11905: 0xC38F, + 33064 - 11905: 0xC390, + 33065 - 11905: 0xC391, + 33066 - 11905: 0xC392, + 33067 - 11905: 0xC393, + 33068 - 11905: 0xEBE3, + 33069 - 11905: 0xC394, + 33070 - 11905: 0xC395, + 33071 - 11905: 0xB8AC, + 33072 - 11905: 0xC396, + 33073 - 11905: 0xCDD1, + 33074 - 11905: 0xEBE5, + 33075 - 11905: 0xC397, + 33076 - 11905: 0xC398, + 33077 - 11905: 0xC399, + 33078 - 11905: 0xEBE1, + 33079 - 11905: 0xC39A, + 33080 - 11905: 0xC1B3, + 33081 - 11905: 0xC39B, + 33082 - 11905: 0xC39C, + 33083 - 11905: 0xC39D, + 33084 - 11905: 0xC39E, + 33085 - 11905: 0xC39F, + 33086 - 11905: 0xC6A2, + 33087 - 11905: 0xC3A0, + 33088 - 11905: 0xC440, + 33089 - 11905: 0xC441, + 33090 - 11905: 0xC442, + 33091 - 11905: 0xC443, + 33092 - 11905: 0xC444, + 33093 - 11905: 0xC445, + 33094 - 11905: 0xCCF3, + 33095 - 11905: 0xC446, + 33096 - 11905: 0xEBE6, + 33097 - 11905: 0xC447, + 33098 - 11905: 0xC0B0, + 33099 - 11905: 0xD2B8, + 33100 - 11905: 0xEBE7, + 33101 - 11905: 0xC448, + 33102 - 11905: 0xC449, + 33103 - 11905: 0xC44A, + 33104 - 11905: 0xB8AF, + 33105 - 11905: 0xB8AD, + 33106 - 11905: 0xC44B, + 33107 - 11905: 0xEBE8, + 33108 - 11905: 0xC7BB, + 33109 - 11905: 0xCDF3, + 33110 - 11905: 0xC44C, + 33111 - 11905: 0xC44D, + 33112 - 11905: 0xC44E, + 33113 - 11905: 0xEBEA, + 33114 - 11905: 0xEBEB, + 33115 - 11905: 0xC44F, + 33116 - 11905: 0xC450, + 33117 - 11905: 0xC451, + 33118 - 11905: 0xC452, + 33119 - 11905: 0xC453, + 33120 - 11905: 0xEBED, + 33121 - 11905: 0xC454, + 33122 - 11905: 0xC455, + 33123 - 11905: 0xC456, + 33124 - 11905: 0xC457, + 33125 - 11905: 0xD0C8, + 33126 - 11905: 0xC458, + 33127 - 11905: 0xEBF2, + 33128 - 11905: 0xC459, + 33129 - 11905: 0xEBEE, + 33130 - 11905: 0xC45A, + 33131 - 11905: 0xC45B, + 33132 - 11905: 0xC45C, + 33133 - 11905: 0xEBF1, + 33134 - 11905: 0xC8F9, + 33135 - 11905: 0xC45D, + 33136 - 11905: 0xD1FC, + 33137 - 11905: 0xEBEC, + 33138 - 11905: 0xC45E, + 33139 - 11905: 0xC45F, + 33140 - 11905: 0xEBE9, + 33141 - 11905: 0xC460, + 33142 - 11905: 0xC461, + 33143 - 11905: 0xC462, + 33144 - 11905: 0xC463, + 33145 - 11905: 0xB8B9, + 33146 - 11905: 0xCFD9, + 33147 - 11905: 0xC4E5, + 33148 - 11905: 0xEBEF, + 33149 - 11905: 0xEBF0, + 33150 - 11905: 0xCCDA, + 33151 - 11905: 0xCDC8, + 33152 - 11905: 0xB0F2, + 33153 - 11905: 0xC464, + 33154 - 11905: 0xEBF6, + 33155 - 11905: 0xC465, + 33156 - 11905: 0xC466, + 33157 - 11905: 0xC467, + 33158 - 11905: 0xC468, + 33159 - 11905: 0xC469, + 33160 - 11905: 0xEBF5, + 33161 - 11905: 0xC46A, + 33162 - 11905: 0xB2B2, + 33163 - 11905: 0xC46B, + 33164 - 11905: 0xC46C, + 33165 - 11905: 0xC46D, + 33166 - 11905: 0xC46E, + 33167 - 11905: 0xB8E0, + 33168 - 11905: 0xC46F, + 33169 - 11905: 0xEBF7, + 33170 - 11905: 0xC470, + 33171 - 11905: 0xC471, + 33172 - 11905: 0xC472, + 33173 - 11905: 0xC473, + 33174 - 11905: 0xC474, + 33175 - 11905: 0xC475, + 33176 - 11905: 0xB1EC, + 33177 - 11905: 0xC476, + 33178 - 11905: 0xC477, + 33179 - 11905: 0xCCC5, + 33180 - 11905: 0xC4A4, + 33181 - 11905: 0xCFA5, + 33182 - 11905: 0xC478, + 33183 - 11905: 0xC479, + 33184 - 11905: 0xC47A, + 33185 - 11905: 0xC47B, + 33186 - 11905: 0xC47C, + 33187 - 11905: 0xEBF9, + 33188 - 11905: 0xC47D, + 33189 - 11905: 0xC47E, + 33190 - 11905: 0xECA2, + 33191 - 11905: 0xC480, + 33192 - 11905: 0xC5F2, + 33193 - 11905: 0xC481, + 33194 - 11905: 0xEBFA, + 33195 - 11905: 0xC482, + 33196 - 11905: 0xC483, + 33197 - 11905: 0xC484, + 33198 - 11905: 0xC485, + 33199 - 11905: 0xC486, + 33200 - 11905: 0xC487, + 33201 - 11905: 0xC488, + 33202 - 11905: 0xC489, + 33203 - 11905: 0xC9C5, + 33204 - 11905: 0xC48A, + 33205 - 11905: 0xC48B, + 33206 - 11905: 0xC48C, + 33207 - 11905: 0xC48D, + 33208 - 11905: 0xC48E, + 33209 - 11905: 0xC48F, + 33210 - 11905: 0xE2DF, + 33211 - 11905: 0xEBFE, + 33212 - 11905: 0xC490, + 33213 - 11905: 0xC491, + 33214 - 11905: 0xC492, + 33215 - 11905: 0xC493, + 33216 - 11905: 0xCDCE, + 33217 - 11905: 0xECA1, + 33218 - 11905: 0xB1DB, + 33219 - 11905: 0xD3B7, + 33220 - 11905: 0xC494, + 33221 - 11905: 0xC495, + 33222 - 11905: 0xD2DC, + 33223 - 11905: 0xC496, + 33224 - 11905: 0xC497, + 33225 - 11905: 0xC498, + 33226 - 11905: 0xEBFD, + 33227 - 11905: 0xC499, + 33228 - 11905: 0xEBFB, + 33229 - 11905: 0xC49A, + 33230 - 11905: 0xC49B, + 33231 - 11905: 0xC49C, + 33232 - 11905: 0xC49D, + 33233 - 11905: 0xC49E, + 33234 - 11905: 0xC49F, + 33235 - 11905: 0xC4A0, + 33236 - 11905: 0xC540, + 33237 - 11905: 0xC541, + 33238 - 11905: 0xC542, + 33239 - 11905: 0xC543, + 33240 - 11905: 0xC544, + 33241 - 11905: 0xC545, + 33242 - 11905: 0xC546, + 33243 - 11905: 0xC547, + 33244 - 11905: 0xC548, + 33245 - 11905: 0xC549, + 33246 - 11905: 0xC54A, + 33247 - 11905: 0xC54B, + 33248 - 11905: 0xC54C, + 33249 - 11905: 0xC54D, + 33250 - 11905: 0xC54E, + 33251 - 11905: 0xB3BC, + 33252 - 11905: 0xC54F, + 33253 - 11905: 0xC550, + 33254 - 11905: 0xC551, + 33255 - 11905: 0xEAB0, + 33256 - 11905: 0xC552, + 33257 - 11905: 0xC553, + 33258 - 11905: 0xD7D4, + 33259 - 11905: 0xC554, + 33260 - 11905: 0xF4AB, + 33261 - 11905: 0xB3F4, + 33262 - 11905: 0xC555, + 33263 - 11905: 0xC556, + 33264 - 11905: 0xC557, + 33265 - 11905: 0xC558, + 33266 - 11905: 0xC559, + 33267 - 11905: 0xD6C1, + 33268 - 11905: 0xD6C2, + 33269 - 11905: 0xC55A, + 33270 - 11905: 0xC55B, + 33271 - 11905: 0xC55C, + 33272 - 11905: 0xC55D, + 33273 - 11905: 0xC55E, + 33274 - 11905: 0xC55F, + 33275 - 11905: 0xD5E9, + 33276 - 11905: 0xBECA, + 33277 - 11905: 0xC560, + 33278 - 11905: 0xF4A7, + 33279 - 11905: 0xC561, + 33280 - 11905: 0xD2A8, + 33281 - 11905: 0xF4A8, + 33282 - 11905: 0xF4A9, + 33283 - 11905: 0xC562, + 33284 - 11905: 0xF4AA, + 33285 - 11905: 0xBECB, + 33286 - 11905: 0xD3DF, + 33287 - 11905: 0xC563, + 33288 - 11905: 0xC564, + 33289 - 11905: 0xC565, + 33290 - 11905: 0xC566, + 33291 - 11905: 0xC567, + 33292 - 11905: 0xC9E0, + 33293 - 11905: 0xC9E1, + 33294 - 11905: 0xC568, + 33295 - 11905: 0xC569, + 33296 - 11905: 0xF3C2, + 33297 - 11905: 0xC56A, + 33298 - 11905: 0xCAE6, + 33299 - 11905: 0xC56B, + 33300 - 11905: 0xCCF2, + 33301 - 11905: 0xC56C, + 33302 - 11905: 0xC56D, + 33303 - 11905: 0xC56E, + 33304 - 11905: 0xC56F, + 33305 - 11905: 0xC570, + 33306 - 11905: 0xC571, + 33307 - 11905: 0xE2B6, + 33308 - 11905: 0xCBB4, + 33309 - 11905: 0xC572, + 33310 - 11905: 0xCEE8, + 33311 - 11905: 0xD6DB, + 33312 - 11905: 0xC573, + 33313 - 11905: 0xF4AD, + 33314 - 11905: 0xF4AE, + 33315 - 11905: 0xF4AF, + 33316 - 11905: 0xC574, + 33317 - 11905: 0xC575, + 33318 - 11905: 0xC576, + 33319 - 11905: 0xC577, + 33320 - 11905: 0xF4B2, + 33321 - 11905: 0xC578, + 33322 - 11905: 0xBABD, + 33323 - 11905: 0xF4B3, + 33324 - 11905: 0xB0E3, + 33325 - 11905: 0xF4B0, + 33326 - 11905: 0xC579, + 33327 - 11905: 0xF4B1, + 33328 - 11905: 0xBDA2, + 33329 - 11905: 0xB2D5, + 33330 - 11905: 0xC57A, + 33331 - 11905: 0xF4B6, + 33332 - 11905: 0xF4B7, + 33333 - 11905: 0xB6E6, + 33334 - 11905: 0xB2B0, + 33335 - 11905: 0xCFCF, + 33336 - 11905: 0xF4B4, + 33337 - 11905: 0xB4AC, + 33338 - 11905: 0xC57B, + 33339 - 11905: 0xF4B5, + 33340 - 11905: 0xC57C, + 33341 - 11905: 0xC57D, + 33342 - 11905: 0xF4B8, + 33343 - 11905: 0xC57E, + 33344 - 11905: 0xC580, + 33345 - 11905: 0xC581, + 33346 - 11905: 0xC582, + 33347 - 11905: 0xC583, + 33348 - 11905: 0xF4B9, + 33349 - 11905: 0xC584, + 33350 - 11905: 0xC585, + 33351 - 11905: 0xCDA7, + 33352 - 11905: 0xC586, + 33353 - 11905: 0xF4BA, + 33354 - 11905: 0xC587, + 33355 - 11905: 0xF4BB, + 33356 - 11905: 0xC588, + 33357 - 11905: 0xC589, + 33358 - 11905: 0xC58A, + 33359 - 11905: 0xF4BC, + 33360 - 11905: 0xC58B, + 33361 - 11905: 0xC58C, + 33362 - 11905: 0xC58D, + 33363 - 11905: 0xC58E, + 33364 - 11905: 0xC58F, + 33365 - 11905: 0xC590, + 33366 - 11905: 0xC591, + 33367 - 11905: 0xC592, + 33368 - 11905: 0xCBD2, + 33369 - 11905: 0xC593, + 33370 - 11905: 0xF4BD, + 33371 - 11905: 0xC594, + 33372 - 11905: 0xC595, + 33373 - 11905: 0xC596, + 33374 - 11905: 0xC597, + 33375 - 11905: 0xF4BE, + 33376 - 11905: 0xC598, + 33377 - 11905: 0xC599, + 33378 - 11905: 0xC59A, + 33379 - 11905: 0xC59B, + 33380 - 11905: 0xC59C, + 33381 - 11905: 0xC59D, + 33382 - 11905: 0xC59E, + 33383 - 11905: 0xC59F, + 33384 - 11905: 0xF4BF, + 33385 - 11905: 0xC5A0, + 33386 - 11905: 0xC640, + 33387 - 11905: 0xC641, + 33388 - 11905: 0xC642, + 33389 - 11905: 0xC643, + 33390 - 11905: 0xF4DE, + 33391 - 11905: 0xC1BC, + 33392 - 11905: 0xBCE8, + 33393 - 11905: 0xC644, + 33394 - 11905: 0xC9AB, + 33395 - 11905: 0xD1DE, + 33396 - 11905: 0xE5F5, + 33397 - 11905: 0xC645, + 33398 - 11905: 0xC646, + 33399 - 11905: 0xC647, + 33400 - 11905: 0xC648, + 33401 - 11905: 0xDCB3, + 33402 - 11905: 0xD2D5, + 33403 - 11905: 0xC649, + 33404 - 11905: 0xC64A, + 33405 - 11905: 0xDCB4, + 33406 - 11905: 0xB0AC, + 33407 - 11905: 0xDCB5, + 33408 - 11905: 0xC64B, + 33409 - 11905: 0xC64C, + 33410 - 11905: 0xBDDA, + 33411 - 11905: 0xC64D, + 33412 - 11905: 0xDCB9, + 33413 - 11905: 0xC64E, + 33414 - 11905: 0xC64F, + 33415 - 11905: 0xC650, + 33416 - 11905: 0xD8C2, + 33417 - 11905: 0xC651, + 33418 - 11905: 0xDCB7, + 33419 - 11905: 0xD3F3, + 33420 - 11905: 0xC652, + 33421 - 11905: 0xC9D6, + 33422 - 11905: 0xDCBA, + 33423 - 11905: 0xDCB6, + 33424 - 11905: 0xC653, + 33425 - 11905: 0xDCBB, + 33426 - 11905: 0xC3A2, + 33427 - 11905: 0xC654, + 33428 - 11905: 0xC655, + 33429 - 11905: 0xC656, + 33430 - 11905: 0xC657, + 33431 - 11905: 0xDCBC, + 33432 - 11905: 0xDCC5, + 33433 - 11905: 0xDCBD, + 33434 - 11905: 0xC658, + 33435 - 11905: 0xC659, + 33436 - 11905: 0xCEDF, + 33437 - 11905: 0xD6A5, + 33438 - 11905: 0xC65A, + 33439 - 11905: 0xDCCF, + 33440 - 11905: 0xC65B, + 33441 - 11905: 0xDCCD, + 33442 - 11905: 0xC65C, + 33443 - 11905: 0xC65D, + 33444 - 11905: 0xDCD2, + 33445 - 11905: 0xBDE6, + 33446 - 11905: 0xC2AB, + 33447 - 11905: 0xC65E, + 33448 - 11905: 0xDCB8, + 33449 - 11905: 0xDCCB, + 33450 - 11905: 0xDCCE, + 33451 - 11905: 0xDCBE, + 33452 - 11905: 0xB7D2, + 33453 - 11905: 0xB0C5, + 33454 - 11905: 0xDCC7, + 33455 - 11905: 0xD0BE, + 33456 - 11905: 0xDCC1, + 33457 - 11905: 0xBBA8, + 33458 - 11905: 0xC65F, + 33459 - 11905: 0xB7BC, + 33460 - 11905: 0xDCCC, + 33461 - 11905: 0xC660, + 33462 - 11905: 0xC661, + 33463 - 11905: 0xDCC6, + 33464 - 11905: 0xDCBF, + 33465 - 11905: 0xC7DB, + 33466 - 11905: 0xC662, + 33467 - 11905: 0xC663, + 33468 - 11905: 0xC664, + 33469 - 11905: 0xD1BF, + 33470 - 11905: 0xDCC0, + 33471 - 11905: 0xC665, + 33472 - 11905: 0xC666, + 33473 - 11905: 0xDCCA, + 33474 - 11905: 0xC667, + 33475 - 11905: 0xC668, + 33476 - 11905: 0xDCD0, + 33477 - 11905: 0xC669, + 33478 - 11905: 0xC66A, + 33479 - 11905: 0xCEAD, + 33480 - 11905: 0xDCC2, + 33481 - 11905: 0xC66B, + 33482 - 11905: 0xDCC3, + 33483 - 11905: 0xDCC8, + 33484 - 11905: 0xDCC9, + 33485 - 11905: 0xB2D4, + 33486 - 11905: 0xDCD1, + 33487 - 11905: 0xCBD5, + 33488 - 11905: 0xC66C, + 33489 - 11905: 0xD4B7, + 33490 - 11905: 0xDCDB, + 33491 - 11905: 0xDCDF, + 33492 - 11905: 0xCCA6, + 33493 - 11905: 0xDCE6, + 33494 - 11905: 0xC66D, + 33495 - 11905: 0xC3E7, + 33496 - 11905: 0xDCDC, + 33497 - 11905: 0xC66E, + 33498 - 11905: 0xC66F, + 33499 - 11905: 0xBFC1, + 33500 - 11905: 0xDCD9, + 33501 - 11905: 0xC670, + 33502 - 11905: 0xB0FA, + 33503 - 11905: 0xB9B6, + 33504 - 11905: 0xDCE5, + 33505 - 11905: 0xDCD3, + 33506 - 11905: 0xC671, + 33507 - 11905: 0xDCC4, + 33508 - 11905: 0xDCD6, + 33509 - 11905: 0xC8F4, + 33510 - 11905: 0xBFE0, + 33511 - 11905: 0xC672, + 33512 - 11905: 0xC673, + 33513 - 11905: 0xC674, + 33514 - 11905: 0xC675, + 33515 - 11905: 0xC9BB, + 33516 - 11905: 0xC676, + 33517 - 11905: 0xC677, + 33518 - 11905: 0xC678, + 33519 - 11905: 0xB1BD, + 33520 - 11905: 0xC679, + 33521 - 11905: 0xD3A2, + 33522 - 11905: 0xC67A, + 33523 - 11905: 0xC67B, + 33524 - 11905: 0xDCDA, + 33525 - 11905: 0xC67C, + 33526 - 11905: 0xC67D, + 33527 - 11905: 0xDCD5, + 33528 - 11905: 0xC67E, + 33529 - 11905: 0xC6BB, + 33530 - 11905: 0xC680, + 33531 - 11905: 0xDCDE, + 33532 - 11905: 0xC681, + 33533 - 11905: 0xC682, + 33534 - 11905: 0xC683, + 33535 - 11905: 0xC684, + 33536 - 11905: 0xC685, + 33537 - 11905: 0xD7C2, + 33538 - 11905: 0xC3AF, + 33539 - 11905: 0xB7B6, + 33540 - 11905: 0xC7D1, + 33541 - 11905: 0xC3A9, + 33542 - 11905: 0xDCE2, + 33543 - 11905: 0xDCD8, + 33544 - 11905: 0xDCEB, + 33545 - 11905: 0xDCD4, + 33546 - 11905: 0xC686, + 33547 - 11905: 0xC687, + 33548 - 11905: 0xDCDD, + 33549 - 11905: 0xC688, + 33550 - 11905: 0xBEA5, + 33551 - 11905: 0xDCD7, + 33552 - 11905: 0xC689, + 33553 - 11905: 0xDCE0, + 33554 - 11905: 0xC68A, + 33555 - 11905: 0xC68B, + 33556 - 11905: 0xDCE3, + 33557 - 11905: 0xDCE4, + 33558 - 11905: 0xC68C, + 33559 - 11905: 0xDCF8, + 33560 - 11905: 0xC68D, + 33561 - 11905: 0xC68E, + 33562 - 11905: 0xDCE1, + 33563 - 11905: 0xDDA2, + 33564 - 11905: 0xDCE7, + 33565 - 11905: 0xC68F, + 33566 - 11905: 0xC690, + 33567 - 11905: 0xC691, + 33568 - 11905: 0xC692, + 33569 - 11905: 0xC693, + 33570 - 11905: 0xC694, + 33571 - 11905: 0xC695, + 33572 - 11905: 0xC696, + 33573 - 11905: 0xC697, + 33574 - 11905: 0xC698, + 33575 - 11905: 0xBCEB, + 33576 - 11905: 0xB4C4, + 33577 - 11905: 0xC699, + 33578 - 11905: 0xC69A, + 33579 - 11905: 0xC3A3, + 33580 - 11905: 0xB2E7, + 33581 - 11905: 0xDCFA, + 33582 - 11905: 0xC69B, + 33583 - 11905: 0xDCF2, + 33584 - 11905: 0xC69C, + 33585 - 11905: 0xDCEF, + 33586 - 11905: 0xC69D, + 33587 - 11905: 0xDCFC, + 33588 - 11905: 0xDCEE, + 33589 - 11905: 0xD2F0, + 33590 - 11905: 0xB2E8, + 33591 - 11905: 0xC69E, + 33592 - 11905: 0xC8D7, + 33593 - 11905: 0xC8E3, + 33594 - 11905: 0xDCFB, + 33595 - 11905: 0xC69F, + 33596 - 11905: 0xDCED, + 33597 - 11905: 0xC6A0, + 33598 - 11905: 0xC740, + 33599 - 11905: 0xC741, + 33600 - 11905: 0xDCF7, + 33601 - 11905: 0xC742, + 33602 - 11905: 0xC743, + 33603 - 11905: 0xDCF5, + 33604 - 11905: 0xC744, + 33605 - 11905: 0xC745, + 33606 - 11905: 0xBEA3, + 33607 - 11905: 0xDCF4, + 33608 - 11905: 0xC746, + 33609 - 11905: 0xB2DD, + 33610 - 11905: 0xC747, + 33611 - 11905: 0xC748, + 33612 - 11905: 0xC749, + 33613 - 11905: 0xC74A, + 33614 - 11905: 0xC74B, + 33615 - 11905: 0xDCF3, + 33616 - 11905: 0xBCF6, + 33617 - 11905: 0xDCE8, + 33618 - 11905: 0xBBC4, + 33619 - 11905: 0xC74C, + 33620 - 11905: 0xC0F3, + 33621 - 11905: 0xC74D, + 33622 - 11905: 0xC74E, + 33623 - 11905: 0xC74F, + 33624 - 11905: 0xC750, + 33625 - 11905: 0xC751, + 33626 - 11905: 0xBCD4, + 33627 - 11905: 0xDCE9, + 33628 - 11905: 0xDCEA, + 33629 - 11905: 0xC752, + 33630 - 11905: 0xDCF1, + 33631 - 11905: 0xDCF6, + 33632 - 11905: 0xDCF9, + 33633 - 11905: 0xB5B4, + 33634 - 11905: 0xC753, + 33635 - 11905: 0xC8D9, + 33636 - 11905: 0xBBE7, + 33637 - 11905: 0xDCFE, + 33638 - 11905: 0xDCFD, + 33639 - 11905: 0xD3AB, + 33640 - 11905: 0xDDA1, + 33641 - 11905: 0xDDA3, + 33642 - 11905: 0xDDA5, + 33643 - 11905: 0xD2F1, + 33644 - 11905: 0xDDA4, + 33645 - 11905: 0xDDA6, + 33646 - 11905: 0xDDA7, + 33647 - 11905: 0xD2A9, + 33648 - 11905: 0xC754, + 33649 - 11905: 0xC755, + 33650 - 11905: 0xC756, + 33651 - 11905: 0xC757, + 33652 - 11905: 0xC758, + 33653 - 11905: 0xC759, + 33654 - 11905: 0xC75A, + 33655 - 11905: 0xBAC9, + 33656 - 11905: 0xDDA9, + 33657 - 11905: 0xC75B, + 33658 - 11905: 0xC75C, + 33659 - 11905: 0xDDB6, + 33660 - 11905: 0xDDB1, + 33661 - 11905: 0xDDB4, + 33662 - 11905: 0xC75D, + 33663 - 11905: 0xC75E, + 33664 - 11905: 0xC75F, + 33665 - 11905: 0xC760, + 33666 - 11905: 0xC761, + 33667 - 11905: 0xC762, + 33668 - 11905: 0xC763, + 33669 - 11905: 0xDDB0, + 33670 - 11905: 0xC6CE, + 33671 - 11905: 0xC764, + 33672 - 11905: 0xC765, + 33673 - 11905: 0xC0F2, + 33674 - 11905: 0xC766, + 33675 - 11905: 0xC767, + 33676 - 11905: 0xC768, + 33677 - 11905: 0xC769, + 33678 - 11905: 0xC9AF, + 33679 - 11905: 0xC76A, + 33680 - 11905: 0xC76B, + 33681 - 11905: 0xC76C, + 33682 - 11905: 0xDCEC, + 33683 - 11905: 0xDDAE, + 33684 - 11905: 0xC76D, + 33685 - 11905: 0xC76E, + 33686 - 11905: 0xC76F, + 33687 - 11905: 0xC770, + 33688 - 11905: 0xDDB7, + 33689 - 11905: 0xC771, + 33690 - 11905: 0xC772, + 33691 - 11905: 0xDCF0, + 33692 - 11905: 0xDDAF, + 33693 - 11905: 0xC773, + 33694 - 11905: 0xDDB8, + 33695 - 11905: 0xC774, + 33696 - 11905: 0xDDAC, + 33697 - 11905: 0xC775, + 33698 - 11905: 0xC776, + 33699 - 11905: 0xC777, + 33700 - 11905: 0xC778, + 33701 - 11905: 0xC779, + 33702 - 11905: 0xC77A, + 33703 - 11905: 0xC77B, + 33704 - 11905: 0xDDB9, + 33705 - 11905: 0xDDB3, + 33706 - 11905: 0xDDAD, + 33707 - 11905: 0xC4AA, + 33708 - 11905: 0xC77C, + 33709 - 11905: 0xC77D, + 33710 - 11905: 0xC77E, + 33711 - 11905: 0xC780, + 33712 - 11905: 0xDDA8, + 33713 - 11905: 0xC0B3, + 33714 - 11905: 0xC1AB, + 33715 - 11905: 0xDDAA, + 33716 - 11905: 0xDDAB, + 33717 - 11905: 0xC781, + 33718 - 11905: 0xDDB2, + 33719 - 11905: 0xBBF1, + 33720 - 11905: 0xDDB5, + 33721 - 11905: 0xD3A8, + 33722 - 11905: 0xDDBA, + 33723 - 11905: 0xC782, + 33724 - 11905: 0xDDBB, + 33725 - 11905: 0xC3A7, + 33726 - 11905: 0xC783, + 33727 - 11905: 0xC784, + 33728 - 11905: 0xDDD2, + 33729 - 11905: 0xDDBC, + 33730 - 11905: 0xC785, + 33731 - 11905: 0xC786, + 33732 - 11905: 0xC787, + 33733 - 11905: 0xDDD1, + 33734 - 11905: 0xC788, + 33735 - 11905: 0xB9BD, + 33736 - 11905: 0xC789, + 33737 - 11905: 0xC78A, + 33738 - 11905: 0xBED5, + 33739 - 11905: 0xC78B, + 33740 - 11905: 0xBEFA, + 33741 - 11905: 0xC78C, + 33742 - 11905: 0xC78D, + 33743 - 11905: 0xBACA, + 33744 - 11905: 0xC78E, + 33745 - 11905: 0xC78F, + 33746 - 11905: 0xC790, + 33747 - 11905: 0xC791, + 33748 - 11905: 0xDDCA, + 33749 - 11905: 0xC792, + 33750 - 11905: 0xDDC5, + 33751 - 11905: 0xC793, + 33752 - 11905: 0xDDBF, + 33753 - 11905: 0xC794, + 33754 - 11905: 0xC795, + 33755 - 11905: 0xC796, + 33756 - 11905: 0xB2CB, + 33757 - 11905: 0xDDC3, + 33758 - 11905: 0xC797, + 33759 - 11905: 0xDDCB, + 33760 - 11905: 0xB2A4, + 33761 - 11905: 0xDDD5, + 33762 - 11905: 0xC798, + 33763 - 11905: 0xC799, + 33764 - 11905: 0xC79A, + 33765 - 11905: 0xDDBE, + 33766 - 11905: 0xC79B, + 33767 - 11905: 0xC79C, + 33768 - 11905: 0xC79D, + 33769 - 11905: 0xC6D0, + 33770 - 11905: 0xDDD0, + 33771 - 11905: 0xC79E, + 33772 - 11905: 0xC79F, + 33773 - 11905: 0xC7A0, + 33774 - 11905: 0xC840, + 33775 - 11905: 0xC841, + 33776 - 11905: 0xDDD4, + 33777 - 11905: 0xC1E2, + 33778 - 11905: 0xB7C6, + 33779 - 11905: 0xC842, + 33780 - 11905: 0xC843, + 33781 - 11905: 0xC844, + 33782 - 11905: 0xC845, + 33783 - 11905: 0xC846, + 33784 - 11905: 0xDDCE, + 33785 - 11905: 0xDDCF, + 33786 - 11905: 0xC847, + 33787 - 11905: 0xC848, + 33788 - 11905: 0xC849, + 33789 - 11905: 0xDDC4, + 33790 - 11905: 0xC84A, + 33791 - 11905: 0xC84B, + 33792 - 11905: 0xC84C, + 33793 - 11905: 0xDDBD, + 33794 - 11905: 0xC84D, + 33795 - 11905: 0xDDCD, + 33796 - 11905: 0xCCD1, + 33797 - 11905: 0xC84E, + 33798 - 11905: 0xDDC9, + 33799 - 11905: 0xC84F, + 33800 - 11905: 0xC850, + 33801 - 11905: 0xC851, + 33802 - 11905: 0xC852, + 33803 - 11905: 0xDDC2, + 33804 - 11905: 0xC3C8, + 33805 - 11905: 0xC6BC, + 33806 - 11905: 0xCEAE, + 33807 - 11905: 0xDDCC, + 33808 - 11905: 0xC853, + 33809 - 11905: 0xDDC8, + 33810 - 11905: 0xC854, + 33811 - 11905: 0xC855, + 33812 - 11905: 0xC856, + 33813 - 11905: 0xC857, + 33814 - 11905: 0xC858, + 33815 - 11905: 0xC859, + 33816 - 11905: 0xDDC1, + 33817 - 11905: 0xC85A, + 33818 - 11905: 0xC85B, + 33819 - 11905: 0xC85C, + 33820 - 11905: 0xDDC6, + 33821 - 11905: 0xC2DC, + 33822 - 11905: 0xC85D, + 33823 - 11905: 0xC85E, + 33824 - 11905: 0xC85F, + 33825 - 11905: 0xC860, + 33826 - 11905: 0xC861, + 33827 - 11905: 0xC862, + 33828 - 11905: 0xD3A9, + 33829 - 11905: 0xD3AA, + 33830 - 11905: 0xDDD3, + 33831 - 11905: 0xCFF4, + 33832 - 11905: 0xC8F8, + 33833 - 11905: 0xC863, + 33834 - 11905: 0xC864, + 33835 - 11905: 0xC865, + 33836 - 11905: 0xC866, + 33837 - 11905: 0xC867, + 33838 - 11905: 0xC868, + 33839 - 11905: 0xC869, + 33840 - 11905: 0xC86A, + 33841 - 11905: 0xDDE6, + 33842 - 11905: 0xC86B, + 33843 - 11905: 0xC86C, + 33844 - 11905: 0xC86D, + 33845 - 11905: 0xC86E, + 33846 - 11905: 0xC86F, + 33847 - 11905: 0xC870, + 33848 - 11905: 0xDDC7, + 33849 - 11905: 0xC871, + 33850 - 11905: 0xC872, + 33851 - 11905: 0xC873, + 33852 - 11905: 0xDDE0, + 33853 - 11905: 0xC2E4, + 33854 - 11905: 0xC874, + 33855 - 11905: 0xC875, + 33856 - 11905: 0xC876, + 33857 - 11905: 0xC877, + 33858 - 11905: 0xC878, + 33859 - 11905: 0xC879, + 33860 - 11905: 0xC87A, + 33861 - 11905: 0xC87B, + 33862 - 11905: 0xDDE1, + 33863 - 11905: 0xC87C, + 33864 - 11905: 0xC87D, + 33865 - 11905: 0xC87E, + 33866 - 11905: 0xC880, + 33867 - 11905: 0xC881, + 33868 - 11905: 0xC882, + 33869 - 11905: 0xC883, + 33870 - 11905: 0xC884, + 33871 - 11905: 0xC885, + 33872 - 11905: 0xC886, + 33873 - 11905: 0xDDD7, + 33874 - 11905: 0xC887, + 33875 - 11905: 0xC888, + 33876 - 11905: 0xC889, + 33877 - 11905: 0xC88A, + 33878 - 11905: 0xC88B, + 33879 - 11905: 0xD6F8, + 33880 - 11905: 0xC88C, + 33881 - 11905: 0xDDD9, + 33882 - 11905: 0xDDD8, + 33883 - 11905: 0xB8F0, + 33884 - 11905: 0xDDD6, + 33885 - 11905: 0xC88D, + 33886 - 11905: 0xC88E, + 33887 - 11905: 0xC88F, + 33888 - 11905: 0xC890, + 33889 - 11905: 0xC6CF, + 33890 - 11905: 0xC891, + 33891 - 11905: 0xB6AD, + 33892 - 11905: 0xC892, + 33893 - 11905: 0xC893, + 33894 - 11905: 0xC894, + 33895 - 11905: 0xC895, + 33896 - 11905: 0xC896, + 33897 - 11905: 0xDDE2, + 33898 - 11905: 0xC897, + 33899 - 11905: 0xBAF9, + 33900 - 11905: 0xD4E1, + 33901 - 11905: 0xDDE7, + 33902 - 11905: 0xC898, + 33903 - 11905: 0xC899, + 33904 - 11905: 0xC89A, + 33905 - 11905: 0xB4D0, + 33906 - 11905: 0xC89B, + 33907 - 11905: 0xDDDA, + 33908 - 11905: 0xC89C, + 33909 - 11905: 0xBFFB, + 33910 - 11905: 0xDDE3, + 33911 - 11905: 0xC89D, + 33912 - 11905: 0xDDDF, + 33913 - 11905: 0xC89E, + 33914 - 11905: 0xDDDD, + 33915 - 11905: 0xC89F, + 33916 - 11905: 0xC8A0, + 33917 - 11905: 0xC940, + 33918 - 11905: 0xC941, + 33919 - 11905: 0xC942, + 33920 - 11905: 0xC943, + 33921 - 11905: 0xC944, + 33922 - 11905: 0xB5D9, + 33923 - 11905: 0xC945, + 33924 - 11905: 0xC946, + 33925 - 11905: 0xC947, + 33926 - 11905: 0xC948, + 33927 - 11905: 0xDDDB, + 33928 - 11905: 0xDDDC, + 33929 - 11905: 0xDDDE, + 33930 - 11905: 0xC949, + 33931 - 11905: 0xBDAF, + 33932 - 11905: 0xDDE4, + 33933 - 11905: 0xC94A, + 33934 - 11905: 0xDDE5, + 33935 - 11905: 0xC94B, + 33936 - 11905: 0xC94C, + 33937 - 11905: 0xC94D, + 33938 - 11905: 0xC94E, + 33939 - 11905: 0xC94F, + 33940 - 11905: 0xC950, + 33941 - 11905: 0xC951, + 33942 - 11905: 0xC952, + 33943 - 11905: 0xDDF5, + 33944 - 11905: 0xC953, + 33945 - 11905: 0xC3C9, + 33946 - 11905: 0xC954, + 33947 - 11905: 0xC955, + 33948 - 11905: 0xCBE2, + 33949 - 11905: 0xC956, + 33950 - 11905: 0xC957, + 33951 - 11905: 0xC958, + 33952 - 11905: 0xC959, + 33953 - 11905: 0xDDF2, + 33954 - 11905: 0xC95A, + 33955 - 11905: 0xC95B, + 33956 - 11905: 0xC95C, + 33957 - 11905: 0xC95D, + 33958 - 11905: 0xC95E, + 33959 - 11905: 0xC95F, + 33960 - 11905: 0xC960, + 33961 - 11905: 0xC961, + 33962 - 11905: 0xC962, + 33963 - 11905: 0xC963, + 33964 - 11905: 0xC964, + 33965 - 11905: 0xC965, + 33966 - 11905: 0xC966, + 33967 - 11905: 0xD8E1, + 33968 - 11905: 0xC967, + 33969 - 11905: 0xC968, + 33970 - 11905: 0xC6D1, + 33971 - 11905: 0xC969, + 33972 - 11905: 0xDDF4, + 33973 - 11905: 0xC96A, + 33974 - 11905: 0xC96B, + 33975 - 11905: 0xC96C, + 33976 - 11905: 0xD5F4, + 33977 - 11905: 0xDDF3, + 33978 - 11905: 0xDDF0, + 33979 - 11905: 0xC96D, + 33980 - 11905: 0xC96E, + 33981 - 11905: 0xDDEC, + 33982 - 11905: 0xC96F, + 33983 - 11905: 0xDDEF, + 33984 - 11905: 0xC970, + 33985 - 11905: 0xDDE8, + 33986 - 11905: 0xC971, + 33987 - 11905: 0xC972, + 33988 - 11905: 0xD0EE, + 33989 - 11905: 0xC973, + 33990 - 11905: 0xC974, + 33991 - 11905: 0xC975, + 33992 - 11905: 0xC976, + 33993 - 11905: 0xC8D8, + 33994 - 11905: 0xDDEE, + 33995 - 11905: 0xC977, + 33996 - 11905: 0xC978, + 33997 - 11905: 0xDDE9, + 33998 - 11905: 0xC979, + 33999 - 11905: 0xC97A, + 34000 - 11905: 0xDDEA, + 34001 - 11905: 0xCBF2, + 34002 - 11905: 0xC97B, + 34003 - 11905: 0xDDED, + 34004 - 11905: 0xC97C, + 34005 - 11905: 0xC97D, + 34006 - 11905: 0xB1CD, + 34007 - 11905: 0xC97E, + 34008 - 11905: 0xC980, + 34009 - 11905: 0xC981, + 34010 - 11905: 0xC982, + 34011 - 11905: 0xC983, + 34012 - 11905: 0xC984, + 34013 - 11905: 0xC0B6, + 34014 - 11905: 0xC985, + 34015 - 11905: 0xBCBB, + 34016 - 11905: 0xDDF1, + 34017 - 11905: 0xC986, + 34018 - 11905: 0xC987, + 34019 - 11905: 0xDDF7, + 34020 - 11905: 0xC988, + 34021 - 11905: 0xDDF6, + 34022 - 11905: 0xDDEB, + 34023 - 11905: 0xC989, + 34024 - 11905: 0xC98A, + 34025 - 11905: 0xC98B, + 34026 - 11905: 0xC98C, + 34027 - 11905: 0xC98D, + 34028 - 11905: 0xC5EE, + 34029 - 11905: 0xC98E, + 34030 - 11905: 0xC98F, + 34031 - 11905: 0xC990, + 34032 - 11905: 0xDDFB, + 34033 - 11905: 0xC991, + 34034 - 11905: 0xC992, + 34035 - 11905: 0xC993, + 34036 - 11905: 0xC994, + 34037 - 11905: 0xC995, + 34038 - 11905: 0xC996, + 34039 - 11905: 0xC997, + 34040 - 11905: 0xC998, + 34041 - 11905: 0xC999, + 34042 - 11905: 0xC99A, + 34043 - 11905: 0xC99B, + 34044 - 11905: 0xDEA4, + 34045 - 11905: 0xC99C, + 34046 - 11905: 0xC99D, + 34047 - 11905: 0xDEA3, + 34048 - 11905: 0xC99E, + 34049 - 11905: 0xC99F, + 34050 - 11905: 0xC9A0, + 34051 - 11905: 0xCA40, + 34052 - 11905: 0xCA41, + 34053 - 11905: 0xCA42, + 34054 - 11905: 0xCA43, + 34055 - 11905: 0xCA44, + 34056 - 11905: 0xCA45, + 34057 - 11905: 0xCA46, + 34058 - 11905: 0xCA47, + 34059 - 11905: 0xCA48, + 34060 - 11905: 0xDDF8, + 34061 - 11905: 0xCA49, + 34062 - 11905: 0xCA4A, + 34063 - 11905: 0xCA4B, + 34064 - 11905: 0xCA4C, + 34065 - 11905: 0xC3EF, + 34066 - 11905: 0xCA4D, + 34067 - 11905: 0xC2FB, + 34068 - 11905: 0xCA4E, + 34069 - 11905: 0xCA4F, + 34070 - 11905: 0xCA50, + 34071 - 11905: 0xD5E1, + 34072 - 11905: 0xCA51, + 34073 - 11905: 0xCA52, + 34074 - 11905: 0xCEB5, + 34075 - 11905: 0xCA53, + 34076 - 11905: 0xCA54, + 34077 - 11905: 0xCA55, + 34078 - 11905: 0xCA56, + 34079 - 11905: 0xDDFD, + 34080 - 11905: 0xCA57, + 34081 - 11905: 0xB2CC, + 34082 - 11905: 0xCA58, + 34083 - 11905: 0xCA59, + 34084 - 11905: 0xCA5A, + 34085 - 11905: 0xCA5B, + 34086 - 11905: 0xCA5C, + 34087 - 11905: 0xCA5D, + 34088 - 11905: 0xCA5E, + 34089 - 11905: 0xCA5F, + 34090 - 11905: 0xCA60, + 34091 - 11905: 0xC4E8, + 34092 - 11905: 0xCADF, + 34093 - 11905: 0xCA61, + 34094 - 11905: 0xCA62, + 34095 - 11905: 0xCA63, + 34096 - 11905: 0xCA64, + 34097 - 11905: 0xCA65, + 34098 - 11905: 0xCA66, + 34099 - 11905: 0xCA67, + 34100 - 11905: 0xCA68, + 34101 - 11905: 0xCA69, + 34102 - 11905: 0xCA6A, + 34103 - 11905: 0xC7BE, + 34104 - 11905: 0xDDFA, + 34105 - 11905: 0xDDFC, + 34106 - 11905: 0xDDFE, + 34107 - 11905: 0xDEA2, + 34108 - 11905: 0xB0AA, + 34109 - 11905: 0xB1CE, + 34110 - 11905: 0xCA6B, + 34111 - 11905: 0xCA6C, + 34112 - 11905: 0xCA6D, + 34113 - 11905: 0xCA6E, + 34114 - 11905: 0xCA6F, + 34115 - 11905: 0xDEAC, + 34116 - 11905: 0xCA70, + 34117 - 11905: 0xCA71, + 34118 - 11905: 0xCA72, + 34119 - 11905: 0xCA73, + 34120 - 11905: 0xDEA6, + 34121 - 11905: 0xBDB6, + 34122 - 11905: 0xC8EF, + 34123 - 11905: 0xCA74, + 34124 - 11905: 0xCA75, + 34125 - 11905: 0xCA76, + 34126 - 11905: 0xCA77, + 34127 - 11905: 0xCA78, + 34128 - 11905: 0xCA79, + 34129 - 11905: 0xCA7A, + 34130 - 11905: 0xCA7B, + 34131 - 11905: 0xCA7C, + 34132 - 11905: 0xCA7D, + 34133 - 11905: 0xCA7E, + 34134 - 11905: 0xDEA1, + 34135 - 11905: 0xCA80, + 34136 - 11905: 0xCA81, + 34137 - 11905: 0xDEA5, + 34138 - 11905: 0xCA82, + 34139 - 11905: 0xCA83, + 34140 - 11905: 0xCA84, + 34141 - 11905: 0xCA85, + 34142 - 11905: 0xDEA9, + 34143 - 11905: 0xCA86, + 34144 - 11905: 0xCA87, + 34145 - 11905: 0xCA88, + 34146 - 11905: 0xCA89, + 34147 - 11905: 0xCA8A, + 34148 - 11905: 0xDEA8, + 34149 - 11905: 0xCA8B, + 34150 - 11905: 0xCA8C, + 34151 - 11905: 0xCA8D, + 34152 - 11905: 0xDEA7, + 34153 - 11905: 0xCA8E, + 34154 - 11905: 0xCA8F, + 34155 - 11905: 0xCA90, + 34156 - 11905: 0xCA91, + 34157 - 11905: 0xCA92, + 34158 - 11905: 0xCA93, + 34159 - 11905: 0xCA94, + 34160 - 11905: 0xCA95, + 34161 - 11905: 0xCA96, + 34162 - 11905: 0xDEAD, + 34163 - 11905: 0xCA97, + 34164 - 11905: 0xD4CC, + 34165 - 11905: 0xCA98, + 34166 - 11905: 0xCA99, + 34167 - 11905: 0xCA9A, + 34168 - 11905: 0xCA9B, + 34169 - 11905: 0xDEB3, + 34170 - 11905: 0xDEAA, + 34171 - 11905: 0xDEAE, + 34172 - 11905: 0xCA9C, + 34173 - 11905: 0xCA9D, + 34174 - 11905: 0xC0D9, + 34175 - 11905: 0xCA9E, + 34176 - 11905: 0xCA9F, + 34177 - 11905: 0xCAA0, + 34178 - 11905: 0xCB40, + 34179 - 11905: 0xCB41, + 34180 - 11905: 0xB1A1, + 34181 - 11905: 0xDEB6, + 34182 - 11905: 0xCB42, + 34183 - 11905: 0xDEB1, + 34184 - 11905: 0xCB43, + 34185 - 11905: 0xCB44, + 34186 - 11905: 0xCB45, + 34187 - 11905: 0xCB46, + 34188 - 11905: 0xCB47, + 34189 - 11905: 0xCB48, + 34190 - 11905: 0xCB49, + 34191 - 11905: 0xDEB2, + 34192 - 11905: 0xCB4A, + 34193 - 11905: 0xCB4B, + 34194 - 11905: 0xCB4C, + 34195 - 11905: 0xCB4D, + 34196 - 11905: 0xCB4E, + 34197 - 11905: 0xCB4F, + 34198 - 11905: 0xCB50, + 34199 - 11905: 0xCB51, + 34200 - 11905: 0xCB52, + 34201 - 11905: 0xCB53, + 34202 - 11905: 0xCB54, + 34203 - 11905: 0xD1A6, + 34204 - 11905: 0xDEB5, + 34205 - 11905: 0xCB55, + 34206 - 11905: 0xCB56, + 34207 - 11905: 0xCB57, + 34208 - 11905: 0xCB58, + 34209 - 11905: 0xCB59, + 34210 - 11905: 0xCB5A, + 34211 - 11905: 0xCB5B, + 34212 - 11905: 0xDEAF, + 34213 - 11905: 0xCB5C, + 34214 - 11905: 0xCB5D, + 34215 - 11905: 0xCB5E, + 34216 - 11905: 0xDEB0, + 34217 - 11905: 0xCB5F, + 34218 - 11905: 0xD0BD, + 34219 - 11905: 0xCB60, + 34220 - 11905: 0xCB61, + 34221 - 11905: 0xCB62, + 34222 - 11905: 0xDEB4, + 34223 - 11905: 0xCAED, + 34224 - 11905: 0xDEB9, + 34225 - 11905: 0xCB63, + 34226 - 11905: 0xCB64, + 34227 - 11905: 0xCB65, + 34228 - 11905: 0xCB66, + 34229 - 11905: 0xCB67, + 34230 - 11905: 0xCB68, + 34231 - 11905: 0xDEB8, + 34232 - 11905: 0xCB69, + 34233 - 11905: 0xDEB7, + 34234 - 11905: 0xCB6A, + 34235 - 11905: 0xCB6B, + 34236 - 11905: 0xCB6C, + 34237 - 11905: 0xCB6D, + 34238 - 11905: 0xCB6E, + 34239 - 11905: 0xCB6F, + 34240 - 11905: 0xCB70, + 34241 - 11905: 0xDEBB, + 34242 - 11905: 0xCB71, + 34243 - 11905: 0xCB72, + 34244 - 11905: 0xCB73, + 34245 - 11905: 0xCB74, + 34246 - 11905: 0xCB75, + 34247 - 11905: 0xCB76, + 34248 - 11905: 0xCB77, + 34249 - 11905: 0xBDE5, + 34250 - 11905: 0xCB78, + 34251 - 11905: 0xCB79, + 34252 - 11905: 0xCB7A, + 34253 - 11905: 0xCB7B, + 34254 - 11905: 0xCB7C, + 34255 - 11905: 0xB2D8, + 34256 - 11905: 0xC3EA, + 34257 - 11905: 0xCB7D, + 34258 - 11905: 0xCB7E, + 34259 - 11905: 0xDEBA, + 34260 - 11905: 0xCB80, + 34261 - 11905: 0xC5BA, + 34262 - 11905: 0xCB81, + 34263 - 11905: 0xCB82, + 34264 - 11905: 0xCB83, + 34265 - 11905: 0xCB84, + 34266 - 11905: 0xCB85, + 34267 - 11905: 0xCB86, + 34268 - 11905: 0xDEBC, + 34269 - 11905: 0xCB87, + 34270 - 11905: 0xCB88, + 34271 - 11905: 0xCB89, + 34272 - 11905: 0xCB8A, + 34273 - 11905: 0xCB8B, + 34274 - 11905: 0xCB8C, + 34275 - 11905: 0xCB8D, + 34276 - 11905: 0xCCD9, + 34277 - 11905: 0xCB8E, + 34278 - 11905: 0xCB8F, + 34279 - 11905: 0xCB90, + 34280 - 11905: 0xCB91, + 34281 - 11905: 0xB7AA, + 34282 - 11905: 0xCB92, + 34283 - 11905: 0xCB93, + 34284 - 11905: 0xCB94, + 34285 - 11905: 0xCB95, + 34286 - 11905: 0xCB96, + 34287 - 11905: 0xCB97, + 34288 - 11905: 0xCB98, + 34289 - 11905: 0xCB99, + 34290 - 11905: 0xCB9A, + 34291 - 11905: 0xCB9B, + 34292 - 11905: 0xCB9C, + 34293 - 11905: 0xCB9D, + 34294 - 11905: 0xCB9E, + 34295 - 11905: 0xCB9F, + 34296 - 11905: 0xCBA0, + 34297 - 11905: 0xCC40, + 34298 - 11905: 0xCC41, + 34299 - 11905: 0xD4E5, + 34300 - 11905: 0xCC42, + 34301 - 11905: 0xCC43, + 34302 - 11905: 0xCC44, + 34303 - 11905: 0xDEBD, + 34304 - 11905: 0xCC45, + 34305 - 11905: 0xCC46, + 34306 - 11905: 0xCC47, + 34307 - 11905: 0xCC48, + 34308 - 11905: 0xCC49, + 34309 - 11905: 0xDEBF, + 34310 - 11905: 0xCC4A, + 34311 - 11905: 0xCC4B, + 34312 - 11905: 0xCC4C, + 34313 - 11905: 0xCC4D, + 34314 - 11905: 0xCC4E, + 34315 - 11905: 0xCC4F, + 34316 - 11905: 0xCC50, + 34317 - 11905: 0xCC51, + 34318 - 11905: 0xCC52, + 34319 - 11905: 0xCC53, + 34320 - 11905: 0xCC54, + 34321 - 11905: 0xC4A2, + 34322 - 11905: 0xCC55, + 34323 - 11905: 0xCC56, + 34324 - 11905: 0xCC57, + 34325 - 11905: 0xCC58, + 34326 - 11905: 0xDEC1, + 34327 - 11905: 0xCC59, + 34328 - 11905: 0xCC5A, + 34329 - 11905: 0xCC5B, + 34330 - 11905: 0xCC5C, + 34331 - 11905: 0xCC5D, + 34332 - 11905: 0xCC5E, + 34333 - 11905: 0xCC5F, + 34334 - 11905: 0xCC60, + 34335 - 11905: 0xCC61, + 34336 - 11905: 0xCC62, + 34337 - 11905: 0xCC63, + 34338 - 11905: 0xCC64, + 34339 - 11905: 0xCC65, + 34340 - 11905: 0xCC66, + 34341 - 11905: 0xCC67, + 34342 - 11905: 0xCC68, + 34343 - 11905: 0xDEBE, + 34344 - 11905: 0xCC69, + 34345 - 11905: 0xDEC0, + 34346 - 11905: 0xCC6A, + 34347 - 11905: 0xCC6B, + 34348 - 11905: 0xCC6C, + 34349 - 11905: 0xCC6D, + 34350 - 11905: 0xCC6E, + 34351 - 11905: 0xCC6F, + 34352 - 11905: 0xCC70, + 34353 - 11905: 0xCC71, + 34354 - 11905: 0xCC72, + 34355 - 11905: 0xCC73, + 34356 - 11905: 0xCC74, + 34357 - 11905: 0xCC75, + 34358 - 11905: 0xCC76, + 34359 - 11905: 0xCC77, + 34360 - 11905: 0xD5BA, + 34361 - 11905: 0xCC78, + 34362 - 11905: 0xCC79, + 34363 - 11905: 0xCC7A, + 34364 - 11905: 0xDEC2, + 34365 - 11905: 0xCC7B, + 34366 - 11905: 0xCC7C, + 34367 - 11905: 0xCC7D, + 34368 - 11905: 0xCC7E, + 34369 - 11905: 0xCC80, + 34370 - 11905: 0xCC81, + 34371 - 11905: 0xCC82, + 34372 - 11905: 0xCC83, + 34373 - 11905: 0xCC84, + 34374 - 11905: 0xCC85, + 34375 - 11905: 0xCC86, + 34376 - 11905: 0xCC87, + 34377 - 11905: 0xCC88, + 34378 - 11905: 0xCC89, + 34379 - 11905: 0xCC8A, + 34380 - 11905: 0xCC8B, + 34381 - 11905: 0xF2AE, + 34382 - 11905: 0xBBA2, + 34383 - 11905: 0xC2B2, + 34384 - 11905: 0xC5B0, + 34385 - 11905: 0xC2C7, + 34386 - 11905: 0xCC8C, + 34387 - 11905: 0xCC8D, + 34388 - 11905: 0xF2AF, + 34389 - 11905: 0xCC8E, + 34390 - 11905: 0xCC8F, + 34391 - 11905: 0xCC90, + 34392 - 11905: 0xCC91, + 34393 - 11905: 0xCC92, + 34394 - 11905: 0xD0E9, + 34395 - 11905: 0xCC93, + 34396 - 11905: 0xCC94, + 34397 - 11905: 0xCC95, + 34398 - 11905: 0xD3DD, + 34399 - 11905: 0xCC96, + 34400 - 11905: 0xCC97, + 34401 - 11905: 0xCC98, + 34402 - 11905: 0xEBBD, + 34403 - 11905: 0xCC99, + 34404 - 11905: 0xCC9A, + 34405 - 11905: 0xCC9B, + 34406 - 11905: 0xCC9C, + 34407 - 11905: 0xCC9D, + 34408 - 11905: 0xCC9E, + 34409 - 11905: 0xCC9F, + 34410 - 11905: 0xCCA0, + 34411 - 11905: 0xB3E6, + 34412 - 11905: 0xF2B0, + 34413 - 11905: 0xCD40, + 34414 - 11905: 0xF2B1, + 34415 - 11905: 0xCD41, + 34416 - 11905: 0xCD42, + 34417 - 11905: 0xCAAD, + 34418 - 11905: 0xCD43, + 34419 - 11905: 0xCD44, + 34420 - 11905: 0xCD45, + 34421 - 11905: 0xCD46, + 34422 - 11905: 0xCD47, + 34423 - 11905: 0xCD48, + 34424 - 11905: 0xCD49, + 34425 - 11905: 0xBAE7, + 34426 - 11905: 0xF2B3, + 34427 - 11905: 0xF2B5, + 34428 - 11905: 0xF2B4, + 34429 - 11905: 0xCBE4, + 34430 - 11905: 0xCFBA, + 34431 - 11905: 0xF2B2, + 34432 - 11905: 0xCAB4, + 34433 - 11905: 0xD2CF, + 34434 - 11905: 0xC2EC, + 34435 - 11905: 0xCD4A, + 34436 - 11905: 0xCD4B, + 34437 - 11905: 0xCD4C, + 34438 - 11905: 0xCD4D, + 34439 - 11905: 0xCD4E, + 34440 - 11905: 0xCD4F, + 34441 - 11905: 0xCD50, + 34442 - 11905: 0xCEC3, + 34443 - 11905: 0xF2B8, + 34444 - 11905: 0xB0F6, + 34445 - 11905: 0xF2B7, + 34446 - 11905: 0xCD51, + 34447 - 11905: 0xCD52, + 34448 - 11905: 0xCD53, + 34449 - 11905: 0xCD54, + 34450 - 11905: 0xCD55, + 34451 - 11905: 0xF2BE, + 34452 - 11905: 0xCD56, + 34453 - 11905: 0xB2CF, + 34454 - 11905: 0xCD57, + 34455 - 11905: 0xCD58, + 34456 - 11905: 0xCD59, + 34457 - 11905: 0xCD5A, + 34458 - 11905: 0xCD5B, + 34459 - 11905: 0xCD5C, + 34460 - 11905: 0xD1C1, + 34461 - 11905: 0xF2BA, + 34462 - 11905: 0xCD5D, + 34463 - 11905: 0xCD5E, + 34464 - 11905: 0xCD5F, + 34465 - 11905: 0xCD60, + 34466 - 11905: 0xCD61, + 34467 - 11905: 0xF2BC, + 34468 - 11905: 0xD4E9, + 34469 - 11905: 0xCD62, + 34470 - 11905: 0xCD63, + 34471 - 11905: 0xF2BB, + 34472 - 11905: 0xF2B6, + 34473 - 11905: 0xF2BF, + 34474 - 11905: 0xF2BD, + 34475 - 11905: 0xCD64, + 34476 - 11905: 0xF2B9, + 34477 - 11905: 0xCD65, + 34478 - 11905: 0xCD66, + 34479 - 11905: 0xF2C7, + 34480 - 11905: 0xF2C4, + 34481 - 11905: 0xF2C6, + 34482 - 11905: 0xCD67, + 34483 - 11905: 0xCD68, + 34484 - 11905: 0xF2CA, + 34485 - 11905: 0xF2C2, + 34486 - 11905: 0xF2C0, + 34487 - 11905: 0xCD69, + 34488 - 11905: 0xCD6A, + 34489 - 11905: 0xCD6B, + 34490 - 11905: 0xF2C5, + 34491 - 11905: 0xCD6C, + 34492 - 11905: 0xCD6D, + 34493 - 11905: 0xCD6E, + 34494 - 11905: 0xCD6F, + 34495 - 11905: 0xCD70, + 34496 - 11905: 0xD6FB, + 34497 - 11905: 0xCD71, + 34498 - 11905: 0xCD72, + 34499 - 11905: 0xCD73, + 34500 - 11905: 0xF2C1, + 34501 - 11905: 0xCD74, + 34502 - 11905: 0xC7F9, + 34503 - 11905: 0xC9DF, + 34504 - 11905: 0xCD75, + 34505 - 11905: 0xF2C8, + 34506 - 11905: 0xB9C6, + 34507 - 11905: 0xB5B0, + 34508 - 11905: 0xCD76, + 34509 - 11905: 0xCD77, + 34510 - 11905: 0xF2C3, + 34511 - 11905: 0xF2C9, + 34512 - 11905: 0xF2D0, + 34513 - 11905: 0xF2D6, + 34514 - 11905: 0xCD78, + 34515 - 11905: 0xCD79, + 34516 - 11905: 0xBBD7, + 34517 - 11905: 0xCD7A, + 34518 - 11905: 0xCD7B, + 34519 - 11905: 0xCD7C, + 34520 - 11905: 0xF2D5, + 34521 - 11905: 0xCDDC, + 34522 - 11905: 0xCD7D, + 34523 - 11905: 0xD6EB, + 34524 - 11905: 0xCD7E, + 34525 - 11905: 0xCD80, + 34526 - 11905: 0xF2D2, + 34527 - 11905: 0xF2D4, + 34528 - 11905: 0xCD81, + 34529 - 11905: 0xCD82, + 34530 - 11905: 0xCD83, + 34531 - 11905: 0xCD84, + 34532 - 11905: 0xB8F2, + 34533 - 11905: 0xCD85, + 34534 - 11905: 0xCD86, + 34535 - 11905: 0xCD87, + 34536 - 11905: 0xCD88, + 34537 - 11905: 0xF2CB, + 34538 - 11905: 0xCD89, + 34539 - 11905: 0xCD8A, + 34540 - 11905: 0xCD8B, + 34541 - 11905: 0xF2CE, + 34542 - 11905: 0xC2F9, + 34543 - 11905: 0xCD8C, + 34544 - 11905: 0xD5DD, + 34545 - 11905: 0xF2CC, + 34546 - 11905: 0xF2CD, + 34547 - 11905: 0xF2CF, + 34548 - 11905: 0xF2D3, + 34549 - 11905: 0xCD8D, + 34550 - 11905: 0xCD8E, + 34551 - 11905: 0xCD8F, + 34552 - 11905: 0xF2D9, + 34553 - 11905: 0xD3BC, + 34554 - 11905: 0xCD90, + 34555 - 11905: 0xCD91, + 34556 - 11905: 0xCD92, + 34557 - 11905: 0xCD93, + 34558 - 11905: 0xB6EA, + 34559 - 11905: 0xCD94, + 34560 - 11905: 0xCAF1, + 34561 - 11905: 0xCD95, + 34562 - 11905: 0xB7E4, + 34563 - 11905: 0xF2D7, + 34564 - 11905: 0xCD96, + 34565 - 11905: 0xCD97, + 34566 - 11905: 0xCD98, + 34567 - 11905: 0xF2D8, + 34568 - 11905: 0xF2DA, + 34569 - 11905: 0xF2DD, + 34570 - 11905: 0xF2DB, + 34571 - 11905: 0xCD99, + 34572 - 11905: 0xCD9A, + 34573 - 11905: 0xF2DC, + 34574 - 11905: 0xCD9B, + 34575 - 11905: 0xCD9C, + 34576 - 11905: 0xCD9D, + 34577 - 11905: 0xCD9E, + 34578 - 11905: 0xD1D1, + 34579 - 11905: 0xF2D1, + 34580 - 11905: 0xCD9F, + 34581 - 11905: 0xCDC9, + 34582 - 11905: 0xCDA0, + 34583 - 11905: 0xCECF, + 34584 - 11905: 0xD6A9, + 34585 - 11905: 0xCE40, + 34586 - 11905: 0xF2E3, + 34587 - 11905: 0xCE41, + 34588 - 11905: 0xC3DB, + 34589 - 11905: 0xCE42, + 34590 - 11905: 0xF2E0, + 34591 - 11905: 0xCE43, + 34592 - 11905: 0xCE44, + 34593 - 11905: 0xC0AF, + 34594 - 11905: 0xF2EC, + 34595 - 11905: 0xF2DE, + 34596 - 11905: 0xCE45, + 34597 - 11905: 0xF2E1, + 34598 - 11905: 0xCE46, + 34599 - 11905: 0xCE47, + 34600 - 11905: 0xCE48, + 34601 - 11905: 0xF2E8, + 34602 - 11905: 0xCE49, + 34603 - 11905: 0xCE4A, + 34604 - 11905: 0xCE4B, + 34605 - 11905: 0xCE4C, + 34606 - 11905: 0xF2E2, + 34607 - 11905: 0xCE4D, + 34608 - 11905: 0xCE4E, + 34609 - 11905: 0xF2E7, + 34610 - 11905: 0xCE4F, + 34611 - 11905: 0xCE50, + 34612 - 11905: 0xF2E6, + 34613 - 11905: 0xCE51, + 34614 - 11905: 0xCE52, + 34615 - 11905: 0xF2E9, + 34616 - 11905: 0xCE53, + 34617 - 11905: 0xCE54, + 34618 - 11905: 0xCE55, + 34619 - 11905: 0xF2DF, + 34620 - 11905: 0xCE56, + 34621 - 11905: 0xCE57, + 34622 - 11905: 0xF2E4, + 34623 - 11905: 0xF2EA, + 34624 - 11905: 0xCE58, + 34625 - 11905: 0xCE59, + 34626 - 11905: 0xCE5A, + 34627 - 11905: 0xCE5B, + 34628 - 11905: 0xCE5C, + 34629 - 11905: 0xCE5D, + 34630 - 11905: 0xCE5E, + 34631 - 11905: 0xD3AC, + 34632 - 11905: 0xF2E5, + 34633 - 11905: 0xB2F5, + 34634 - 11905: 0xCE5F, + 34635 - 11905: 0xCE60, + 34636 - 11905: 0xF2F2, + 34637 - 11905: 0xCE61, + 34638 - 11905: 0xD0AB, + 34639 - 11905: 0xCE62, + 34640 - 11905: 0xCE63, + 34641 - 11905: 0xCE64, + 34642 - 11905: 0xCE65, + 34643 - 11905: 0xF2F5, + 34644 - 11905: 0xCE66, + 34645 - 11905: 0xCE67, + 34646 - 11905: 0xCE68, + 34647 - 11905: 0xBBC8, + 34648 - 11905: 0xCE69, + 34649 - 11905: 0xF2F9, + 34650 - 11905: 0xCE6A, + 34651 - 11905: 0xCE6B, + 34652 - 11905: 0xCE6C, + 34653 - 11905: 0xCE6D, + 34654 - 11905: 0xCE6E, + 34655 - 11905: 0xCE6F, + 34656 - 11905: 0xF2F0, + 34657 - 11905: 0xCE70, + 34658 - 11905: 0xCE71, + 34659 - 11905: 0xF2F6, + 34660 - 11905: 0xF2F8, + 34661 - 11905: 0xF2FA, + 34662 - 11905: 0xCE72, + 34663 - 11905: 0xCE73, + 34664 - 11905: 0xCE74, + 34665 - 11905: 0xCE75, + 34666 - 11905: 0xCE76, + 34667 - 11905: 0xCE77, + 34668 - 11905: 0xCE78, + 34669 - 11905: 0xCE79, + 34670 - 11905: 0xF2F3, + 34671 - 11905: 0xCE7A, + 34672 - 11905: 0xF2F1, + 34673 - 11905: 0xCE7B, + 34674 - 11905: 0xCE7C, + 34675 - 11905: 0xCE7D, + 34676 - 11905: 0xBAFB, + 34677 - 11905: 0xCE7E, + 34678 - 11905: 0xB5FB, + 34679 - 11905: 0xCE80, + 34680 - 11905: 0xCE81, + 34681 - 11905: 0xCE82, + 34682 - 11905: 0xCE83, + 34683 - 11905: 0xF2EF, + 34684 - 11905: 0xF2F7, + 34685 - 11905: 0xF2ED, + 34686 - 11905: 0xF2EE, + 34687 - 11905: 0xCE84, + 34688 - 11905: 0xCE85, + 34689 - 11905: 0xCE86, + 34690 - 11905: 0xF2EB, + 34691 - 11905: 0xF3A6, + 34692 - 11905: 0xCE87, + 34693 - 11905: 0xF3A3, + 34694 - 11905: 0xCE88, + 34695 - 11905: 0xCE89, + 34696 - 11905: 0xF3A2, + 34697 - 11905: 0xCE8A, + 34698 - 11905: 0xCE8B, + 34699 - 11905: 0xF2F4, + 34700 - 11905: 0xCE8C, + 34701 - 11905: 0xC8DA, + 34702 - 11905: 0xCE8D, + 34703 - 11905: 0xCE8E, + 34704 - 11905: 0xCE8F, + 34705 - 11905: 0xCE90, + 34706 - 11905: 0xCE91, + 34707 - 11905: 0xF2FB, + 34708 - 11905: 0xCE92, + 34709 - 11905: 0xCE93, + 34710 - 11905: 0xCE94, + 34711 - 11905: 0xF3A5, + 34712 - 11905: 0xCE95, + 34713 - 11905: 0xCE96, + 34714 - 11905: 0xCE97, + 34715 - 11905: 0xCE98, + 34716 - 11905: 0xCE99, + 34717 - 11905: 0xCE9A, + 34718 - 11905: 0xCE9B, + 34719 - 11905: 0xC3F8, + 34720 - 11905: 0xCE9C, + 34721 - 11905: 0xCE9D, + 34722 - 11905: 0xCE9E, + 34723 - 11905: 0xCE9F, + 34724 - 11905: 0xCEA0, + 34725 - 11905: 0xCF40, + 34726 - 11905: 0xCF41, + 34727 - 11905: 0xCF42, + 34728 - 11905: 0xF2FD, + 34729 - 11905: 0xCF43, + 34730 - 11905: 0xCF44, + 34731 - 11905: 0xF3A7, + 34732 - 11905: 0xF3A9, + 34733 - 11905: 0xF3A4, + 34734 - 11905: 0xCF45, + 34735 - 11905: 0xF2FC, + 34736 - 11905: 0xCF46, + 34737 - 11905: 0xCF47, + 34738 - 11905: 0xCF48, + 34739 - 11905: 0xF3AB, + 34740 - 11905: 0xCF49, + 34741 - 11905: 0xF3AA, + 34742 - 11905: 0xCF4A, + 34743 - 11905: 0xCF4B, + 34744 - 11905: 0xCF4C, + 34745 - 11905: 0xCF4D, + 34746 - 11905: 0xC2DD, + 34747 - 11905: 0xCF4E, + 34748 - 11905: 0xCF4F, + 34749 - 11905: 0xF3AE, + 34750 - 11905: 0xCF50, + 34751 - 11905: 0xCF51, + 34752 - 11905: 0xF3B0, + 34753 - 11905: 0xCF52, + 34754 - 11905: 0xCF53, + 34755 - 11905: 0xCF54, + 34756 - 11905: 0xCF55, + 34757 - 11905: 0xCF56, + 34758 - 11905: 0xF3A1, + 34759 - 11905: 0xCF57, + 34760 - 11905: 0xCF58, + 34761 - 11905: 0xCF59, + 34762 - 11905: 0xF3B1, + 34763 - 11905: 0xF3AC, + 34764 - 11905: 0xCF5A, + 34765 - 11905: 0xCF5B, + 34766 - 11905: 0xCF5C, + 34767 - 11905: 0xCF5D, + 34768 - 11905: 0xCF5E, + 34769 - 11905: 0xF3AF, + 34770 - 11905: 0xF2FE, + 34771 - 11905: 0xF3AD, + 34772 - 11905: 0xCF5F, + 34773 - 11905: 0xCF60, + 34774 - 11905: 0xCF61, + 34775 - 11905: 0xCF62, + 34776 - 11905: 0xCF63, + 34777 - 11905: 0xCF64, + 34778 - 11905: 0xCF65, + 34779 - 11905: 0xF3B2, + 34780 - 11905: 0xCF66, + 34781 - 11905: 0xCF67, + 34782 - 11905: 0xCF68, + 34783 - 11905: 0xCF69, + 34784 - 11905: 0xF3B4, + 34785 - 11905: 0xCF6A, + 34786 - 11905: 0xCF6B, + 34787 - 11905: 0xCF6C, + 34788 - 11905: 0xCF6D, + 34789 - 11905: 0xF3A8, + 34790 - 11905: 0xCF6E, + 34791 - 11905: 0xCF6F, + 34792 - 11905: 0xCF70, + 34793 - 11905: 0xCF71, + 34794 - 11905: 0xF3B3, + 34795 - 11905: 0xCF72, + 34796 - 11905: 0xCF73, + 34797 - 11905: 0xCF74, + 34798 - 11905: 0xF3B5, + 34799 - 11905: 0xCF75, + 34800 - 11905: 0xCF76, + 34801 - 11905: 0xCF77, + 34802 - 11905: 0xCF78, + 34803 - 11905: 0xCF79, + 34804 - 11905: 0xCF7A, + 34805 - 11905: 0xCF7B, + 34806 - 11905: 0xCF7C, + 34807 - 11905: 0xCF7D, + 34808 - 11905: 0xCF7E, + 34809 - 11905: 0xD0B7, + 34810 - 11905: 0xCF80, + 34811 - 11905: 0xCF81, + 34812 - 11905: 0xCF82, + 34813 - 11905: 0xCF83, + 34814 - 11905: 0xF3B8, + 34815 - 11905: 0xCF84, + 34816 - 11905: 0xCF85, + 34817 - 11905: 0xCF86, + 34818 - 11905: 0xCF87, + 34819 - 11905: 0xD9F9, + 34820 - 11905: 0xCF88, + 34821 - 11905: 0xCF89, + 34822 - 11905: 0xCF8A, + 34823 - 11905: 0xCF8B, + 34824 - 11905: 0xCF8C, + 34825 - 11905: 0xCF8D, + 34826 - 11905: 0xF3B9, + 34827 - 11905: 0xCF8E, + 34828 - 11905: 0xCF8F, + 34829 - 11905: 0xCF90, + 34830 - 11905: 0xCF91, + 34831 - 11905: 0xCF92, + 34832 - 11905: 0xCF93, + 34833 - 11905: 0xCF94, + 34834 - 11905: 0xCF95, + 34835 - 11905: 0xF3B7, + 34836 - 11905: 0xCF96, + 34837 - 11905: 0xC8E4, + 34838 - 11905: 0xF3B6, + 34839 - 11905: 0xCF97, + 34840 - 11905: 0xCF98, + 34841 - 11905: 0xCF99, + 34842 - 11905: 0xCF9A, + 34843 - 11905: 0xF3BA, + 34844 - 11905: 0xCF9B, + 34845 - 11905: 0xCF9C, + 34846 - 11905: 0xCF9D, + 34847 - 11905: 0xCF9E, + 34848 - 11905: 0xCF9F, + 34849 - 11905: 0xF3BB, + 34850 - 11905: 0xB4C0, + 34851 - 11905: 0xCFA0, + 34852 - 11905: 0xD040, + 34853 - 11905: 0xD041, + 34854 - 11905: 0xD042, + 34855 - 11905: 0xD043, + 34856 - 11905: 0xD044, + 34857 - 11905: 0xD045, + 34858 - 11905: 0xD046, + 34859 - 11905: 0xD047, + 34860 - 11905: 0xD048, + 34861 - 11905: 0xD049, + 34862 - 11905: 0xD04A, + 34863 - 11905: 0xD04B, + 34864 - 11905: 0xD04C, + 34865 - 11905: 0xD04D, + 34866 - 11905: 0xEEC3, + 34867 - 11905: 0xD04E, + 34868 - 11905: 0xD04F, + 34869 - 11905: 0xD050, + 34870 - 11905: 0xD051, + 34871 - 11905: 0xD052, + 34872 - 11905: 0xD053, + 34873 - 11905: 0xF3BC, + 34874 - 11905: 0xD054, + 34875 - 11905: 0xD055, + 34876 - 11905: 0xF3BD, + 34877 - 11905: 0xD056, + 34878 - 11905: 0xD057, + 34879 - 11905: 0xD058, + 34880 - 11905: 0xD1AA, + 34881 - 11905: 0xD059, + 34882 - 11905: 0xD05A, + 34883 - 11905: 0xD05B, + 34884 - 11905: 0xF4AC, + 34885 - 11905: 0xD0C6, + 34886 - 11905: 0xD05C, + 34887 - 11905: 0xD05D, + 34888 - 11905: 0xD05E, + 34889 - 11905: 0xD05F, + 34890 - 11905: 0xD060, + 34891 - 11905: 0xD061, + 34892 - 11905: 0xD0D0, + 34893 - 11905: 0xD1DC, + 34894 - 11905: 0xD062, + 34895 - 11905: 0xD063, + 34896 - 11905: 0xD064, + 34897 - 11905: 0xD065, + 34898 - 11905: 0xD066, + 34899 - 11905: 0xD067, + 34900 - 11905: 0xCFCE, + 34901 - 11905: 0xD068, + 34902 - 11905: 0xD069, + 34903 - 11905: 0xBDD6, + 34904 - 11905: 0xD06A, + 34905 - 11905: 0xD1C3, + 34906 - 11905: 0xD06B, + 34907 - 11905: 0xD06C, + 34908 - 11905: 0xD06D, + 34909 - 11905: 0xD06E, + 34910 - 11905: 0xD06F, + 34911 - 11905: 0xD070, + 34912 - 11905: 0xD071, + 34913 - 11905: 0xBAE2, + 34914 - 11905: 0xE1E9, + 34915 - 11905: 0xD2C2, + 34916 - 11905: 0xF1C2, + 34917 - 11905: 0xB2B9, + 34918 - 11905: 0xD072, + 34919 - 11905: 0xD073, + 34920 - 11905: 0xB1ED, + 34921 - 11905: 0xF1C3, + 34922 - 11905: 0xD074, + 34923 - 11905: 0xC9C0, + 34924 - 11905: 0xB3C4, + 34925 - 11905: 0xD075, + 34926 - 11905: 0xD9F2, + 34927 - 11905: 0xD076, + 34928 - 11905: 0xCBA5, + 34929 - 11905: 0xD077, + 34930 - 11905: 0xF1C4, + 34931 - 11905: 0xD078, + 34932 - 11905: 0xD079, + 34933 - 11905: 0xD07A, + 34934 - 11905: 0xD07B, + 34935 - 11905: 0xD6D4, + 34936 - 11905: 0xD07C, + 34937 - 11905: 0xD07D, + 34938 - 11905: 0xD07E, + 34939 - 11905: 0xD080, + 34940 - 11905: 0xD081, + 34941 - 11905: 0xF1C5, + 34942 - 11905: 0xF4C0, + 34943 - 11905: 0xF1C6, + 34944 - 11905: 0xD082, + 34945 - 11905: 0xD4AC, + 34946 - 11905: 0xF1C7, + 34947 - 11905: 0xD083, + 34948 - 11905: 0xB0C0, + 34949 - 11905: 0xF4C1, + 34950 - 11905: 0xD084, + 34951 - 11905: 0xD085, + 34952 - 11905: 0xF4C2, + 34953 - 11905: 0xD086, + 34954 - 11905: 0xD087, + 34955 - 11905: 0xB4FC, + 34956 - 11905: 0xD088, + 34957 - 11905: 0xC5DB, + 34958 - 11905: 0xD089, + 34959 - 11905: 0xD08A, + 34960 - 11905: 0xD08B, + 34961 - 11905: 0xD08C, + 34962 - 11905: 0xCCBB, + 34963 - 11905: 0xD08D, + 34964 - 11905: 0xD08E, + 34965 - 11905: 0xD08F, + 34966 - 11905: 0xD0E4, + 34967 - 11905: 0xD090, + 34968 - 11905: 0xD091, + 34969 - 11905: 0xD092, + 34970 - 11905: 0xD093, + 34971 - 11905: 0xD094, + 34972 - 11905: 0xCDE0, + 34973 - 11905: 0xD095, + 34974 - 11905: 0xD096, + 34975 - 11905: 0xD097, + 34976 - 11905: 0xD098, + 34977 - 11905: 0xD099, + 34978 - 11905: 0xF1C8, + 34979 - 11905: 0xD09A, + 34980 - 11905: 0xD9F3, + 34981 - 11905: 0xD09B, + 34982 - 11905: 0xD09C, + 34983 - 11905: 0xD09D, + 34984 - 11905: 0xD09E, + 34985 - 11905: 0xD09F, + 34986 - 11905: 0xD0A0, + 34987 - 11905: 0xB1BB, + 34988 - 11905: 0xD140, + 34989 - 11905: 0xCFAE, + 34990 - 11905: 0xD141, + 34991 - 11905: 0xD142, + 34992 - 11905: 0xD143, + 34993 - 11905: 0xB8A4, + 34994 - 11905: 0xD144, + 34995 - 11905: 0xD145, + 34996 - 11905: 0xD146, + 34997 - 11905: 0xD147, + 34998 - 11905: 0xD148, + 34999 - 11905: 0xF1CA, + 35000 - 11905: 0xD149, + 35001 - 11905: 0xD14A, + 35002 - 11905: 0xD14B, + 35003 - 11905: 0xD14C, + 35004 - 11905: 0xF1CB, + 35005 - 11905: 0xD14D, + 35006 - 11905: 0xD14E, + 35007 - 11905: 0xD14F, + 35008 - 11905: 0xD150, + 35009 - 11905: 0xB2C3, + 35010 - 11905: 0xC1D1, + 35011 - 11905: 0xD151, + 35012 - 11905: 0xD152, + 35013 - 11905: 0xD7B0, + 35014 - 11905: 0xF1C9, + 35015 - 11905: 0xD153, + 35016 - 11905: 0xD154, + 35017 - 11905: 0xF1CC, + 35018 - 11905: 0xD155, + 35019 - 11905: 0xD156, + 35020 - 11905: 0xD157, + 35021 - 11905: 0xD158, + 35022 - 11905: 0xF1CE, + 35023 - 11905: 0xD159, + 35024 - 11905: 0xD15A, + 35025 - 11905: 0xD15B, + 35026 - 11905: 0xD9F6, + 35027 - 11905: 0xD15C, + 35028 - 11905: 0xD2E1, + 35029 - 11905: 0xD4A3, + 35030 - 11905: 0xD15D, + 35031 - 11905: 0xD15E, + 35032 - 11905: 0xF4C3, + 35033 - 11905: 0xC8B9, + 35034 - 11905: 0xD15F, + 35035 - 11905: 0xD160, + 35036 - 11905: 0xD161, + 35037 - 11905: 0xD162, + 35038 - 11905: 0xD163, + 35039 - 11905: 0xF4C4, + 35040 - 11905: 0xD164, + 35041 - 11905: 0xD165, + 35042 - 11905: 0xF1CD, + 35043 - 11905: 0xF1CF, + 35044 - 11905: 0xBFE3, + 35045 - 11905: 0xF1D0, + 35046 - 11905: 0xD166, + 35047 - 11905: 0xD167, + 35048 - 11905: 0xF1D4, + 35049 - 11905: 0xD168, + 35050 - 11905: 0xD169, + 35051 - 11905: 0xD16A, + 35052 - 11905: 0xD16B, + 35053 - 11905: 0xD16C, + 35054 - 11905: 0xD16D, + 35055 - 11905: 0xD16E, + 35056 - 11905: 0xF1D6, + 35057 - 11905: 0xF1D1, + 35058 - 11905: 0xD16F, + 35059 - 11905: 0xC9D1, + 35060 - 11905: 0xC5E1, + 35061 - 11905: 0xD170, + 35062 - 11905: 0xD171, + 35063 - 11905: 0xD172, + 35064 - 11905: 0xC2E3, + 35065 - 11905: 0xB9FC, + 35066 - 11905: 0xD173, + 35067 - 11905: 0xD174, + 35068 - 11905: 0xF1D3, + 35069 - 11905: 0xD175, + 35070 - 11905: 0xF1D5, + 35071 - 11905: 0xD176, + 35072 - 11905: 0xD177, + 35073 - 11905: 0xD178, + 35074 - 11905: 0xB9D3, + 35075 - 11905: 0xD179, + 35076 - 11905: 0xD17A, + 35077 - 11905: 0xD17B, + 35078 - 11905: 0xD17C, + 35079 - 11905: 0xD17D, + 35080 - 11905: 0xD17E, + 35081 - 11905: 0xD180, + 35082 - 11905: 0xF1DB, + 35083 - 11905: 0xD181, + 35084 - 11905: 0xD182, + 35085 - 11905: 0xD183, + 35086 - 11905: 0xD184, + 35087 - 11905: 0xD185, + 35088 - 11905: 0xBAD6, + 35089 - 11905: 0xD186, + 35090 - 11905: 0xB0FD, + 35091 - 11905: 0xF1D9, + 35092 - 11905: 0xD187, + 35093 - 11905: 0xD188, + 35094 - 11905: 0xD189, + 35095 - 11905: 0xD18A, + 35096 - 11905: 0xD18B, + 35097 - 11905: 0xF1D8, + 35098 - 11905: 0xF1D2, + 35099 - 11905: 0xF1DA, + 35100 - 11905: 0xD18C, + 35101 - 11905: 0xD18D, + 35102 - 11905: 0xD18E, + 35103 - 11905: 0xD18F, + 35104 - 11905: 0xD190, + 35105 - 11905: 0xF1D7, + 35106 - 11905: 0xD191, + 35107 - 11905: 0xD192, + 35108 - 11905: 0xD193, + 35109 - 11905: 0xC8EC, + 35110 - 11905: 0xD194, + 35111 - 11905: 0xD195, + 35112 - 11905: 0xD196, + 35113 - 11905: 0xD197, + 35114 - 11905: 0xCDCA, + 35115 - 11905: 0xF1DD, + 35116 - 11905: 0xD198, + 35117 - 11905: 0xD199, + 35118 - 11905: 0xD19A, + 35119 - 11905: 0xD19B, + 35120 - 11905: 0xE5BD, + 35121 - 11905: 0xD19C, + 35122 - 11905: 0xD19D, + 35123 - 11905: 0xD19E, + 35124 - 11905: 0xF1DC, + 35125 - 11905: 0xD19F, + 35126 - 11905: 0xF1DE, + 35127 - 11905: 0xD1A0, + 35128 - 11905: 0xD240, + 35129 - 11905: 0xD241, + 35130 - 11905: 0xD242, + 35131 - 11905: 0xD243, + 35132 - 11905: 0xD244, + 35133 - 11905: 0xD245, + 35134 - 11905: 0xD246, + 35135 - 11905: 0xD247, + 35136 - 11905: 0xD248, + 35137 - 11905: 0xF1DF, + 35138 - 11905: 0xD249, + 35139 - 11905: 0xD24A, + 35140 - 11905: 0xCFE5, + 35141 - 11905: 0xD24B, + 35142 - 11905: 0xD24C, + 35143 - 11905: 0xD24D, + 35144 - 11905: 0xD24E, + 35145 - 11905: 0xD24F, + 35146 - 11905: 0xD250, + 35147 - 11905: 0xD251, + 35148 - 11905: 0xD252, + 35149 - 11905: 0xD253, + 35150 - 11905: 0xD254, + 35151 - 11905: 0xD255, + 35152 - 11905: 0xD256, + 35153 - 11905: 0xD257, + 35154 - 11905: 0xD258, + 35155 - 11905: 0xD259, + 35156 - 11905: 0xD25A, + 35157 - 11905: 0xD25B, + 35158 - 11905: 0xD25C, + 35159 - 11905: 0xD25D, + 35160 - 11905: 0xD25E, + 35161 - 11905: 0xD25F, + 35162 - 11905: 0xD260, + 35163 - 11905: 0xD261, + 35164 - 11905: 0xD262, + 35165 - 11905: 0xD263, + 35166 - 11905: 0xF4C5, + 35167 - 11905: 0xBDF3, + 35168 - 11905: 0xD264, + 35169 - 11905: 0xD265, + 35170 - 11905: 0xD266, + 35171 - 11905: 0xD267, + 35172 - 11905: 0xD268, + 35173 - 11905: 0xD269, + 35174 - 11905: 0xF1E0, + 35175 - 11905: 0xD26A, + 35176 - 11905: 0xD26B, + 35177 - 11905: 0xD26C, + 35178 - 11905: 0xD26D, + 35179 - 11905: 0xD26E, + 35180 - 11905: 0xD26F, + 35181 - 11905: 0xD270, + 35182 - 11905: 0xD271, + 35183 - 11905: 0xD272, + 35184 - 11905: 0xD273, + 35185 - 11905: 0xD274, + 35186 - 11905: 0xD275, + 35187 - 11905: 0xD276, + 35188 - 11905: 0xD277, + 35189 - 11905: 0xD278, + 35190 - 11905: 0xD279, + 35191 - 11905: 0xD27A, + 35192 - 11905: 0xD27B, + 35193 - 11905: 0xD27C, + 35194 - 11905: 0xD27D, + 35195 - 11905: 0xF1E1, + 35196 - 11905: 0xD27E, + 35197 - 11905: 0xD280, + 35198 - 11905: 0xD281, + 35199 - 11905: 0xCEF7, + 35200 - 11905: 0xD282, + 35201 - 11905: 0xD2AA, + 35202 - 11905: 0xD283, + 35203 - 11905: 0xF1FB, + 35204 - 11905: 0xD284, + 35205 - 11905: 0xD285, + 35206 - 11905: 0xB8B2, + 35207 - 11905: 0xD286, + 35208 - 11905: 0xD287, + 35209 - 11905: 0xD288, + 35210 - 11905: 0xD289, + 35211 - 11905: 0xD28A, + 35212 - 11905: 0xD28B, + 35213 - 11905: 0xD28C, + 35214 - 11905: 0xD28D, + 35215 - 11905: 0xD28E, + 35216 - 11905: 0xD28F, + 35217 - 11905: 0xD290, + 35218 - 11905: 0xD291, + 35219 - 11905: 0xD292, + 35220 - 11905: 0xD293, + 35221 - 11905: 0xD294, + 35222 - 11905: 0xD295, + 35223 - 11905: 0xD296, + 35224 - 11905: 0xD297, + 35225 - 11905: 0xD298, + 35226 - 11905: 0xD299, + 35227 - 11905: 0xD29A, + 35228 - 11905: 0xD29B, + 35229 - 11905: 0xD29C, + 35230 - 11905: 0xD29D, + 35231 - 11905: 0xD29E, + 35232 - 11905: 0xD29F, + 35233 - 11905: 0xD2A0, + 35234 - 11905: 0xD340, + 35235 - 11905: 0xD341, + 35236 - 11905: 0xD342, + 35237 - 11905: 0xD343, + 35238 - 11905: 0xD344, + 35239 - 11905: 0xD345, + 35240 - 11905: 0xD346, + 35241 - 11905: 0xD347, + 35242 - 11905: 0xD348, + 35243 - 11905: 0xD349, + 35244 - 11905: 0xD34A, + 35245 - 11905: 0xD34B, + 35246 - 11905: 0xD34C, + 35247 - 11905: 0xD34D, + 35248 - 11905: 0xD34E, + 35249 - 11905: 0xD34F, + 35250 - 11905: 0xD350, + 35251 - 11905: 0xD351, + 35252 - 11905: 0xD352, + 35253 - 11905: 0xD353, + 35254 - 11905: 0xD354, + 35255 - 11905: 0xD355, + 35256 - 11905: 0xD356, + 35257 - 11905: 0xD357, + 35258 - 11905: 0xD358, + 35259 - 11905: 0xD359, + 35260 - 11905: 0xD35A, + 35261 - 11905: 0xD35B, + 35262 - 11905: 0xD35C, + 35263 - 11905: 0xD35D, + 35264 - 11905: 0xD35E, + 35265 - 11905: 0xBCFB, + 35266 - 11905: 0xB9DB, + 35267 - 11905: 0xD35F, + 35268 - 11905: 0xB9E6, + 35269 - 11905: 0xC3D9, + 35270 - 11905: 0xCAD3, + 35271 - 11905: 0xEAE8, + 35272 - 11905: 0xC0C0, + 35273 - 11905: 0xBEF5, + 35274 - 11905: 0xEAE9, + 35275 - 11905: 0xEAEA, + 35276 - 11905: 0xEAEB, + 35277 - 11905: 0xD360, + 35278 - 11905: 0xEAEC, + 35279 - 11905: 0xEAED, + 35280 - 11905: 0xEAEE, + 35281 - 11905: 0xEAEF, + 35282 - 11905: 0xBDC7, + 35283 - 11905: 0xD361, + 35284 - 11905: 0xD362, + 35285 - 11905: 0xD363, + 35286 - 11905: 0xF5FB, + 35287 - 11905: 0xD364, + 35288 - 11905: 0xD365, + 35289 - 11905: 0xD366, + 35290 - 11905: 0xF5FD, + 35291 - 11905: 0xD367, + 35292 - 11905: 0xF5FE, + 35293 - 11905: 0xD368, + 35294 - 11905: 0xF5FC, + 35295 - 11905: 0xD369, + 35296 - 11905: 0xD36A, + 35297 - 11905: 0xD36B, + 35298 - 11905: 0xD36C, + 35299 - 11905: 0xBDE2, + 35300 - 11905: 0xD36D, + 35301 - 11905: 0xF6A1, + 35302 - 11905: 0xB4A5, + 35303 - 11905: 0xD36E, + 35304 - 11905: 0xD36F, + 35305 - 11905: 0xD370, + 35306 - 11905: 0xD371, + 35307 - 11905: 0xF6A2, + 35308 - 11905: 0xD372, + 35309 - 11905: 0xD373, + 35310 - 11905: 0xD374, + 35311 - 11905: 0xF6A3, + 35312 - 11905: 0xD375, + 35313 - 11905: 0xD376, + 35314 - 11905: 0xD377, + 35315 - 11905: 0xECB2, + 35316 - 11905: 0xD378, + 35317 - 11905: 0xD379, + 35318 - 11905: 0xD37A, + 35319 - 11905: 0xD37B, + 35320 - 11905: 0xD37C, + 35321 - 11905: 0xD37D, + 35322 - 11905: 0xD37E, + 35323 - 11905: 0xD380, + 35324 - 11905: 0xD381, + 35325 - 11905: 0xD382, + 35326 - 11905: 0xD383, + 35327 - 11905: 0xD384, + 35328 - 11905: 0xD1D4, + 35329 - 11905: 0xD385, + 35330 - 11905: 0xD386, + 35331 - 11905: 0xD387, + 35332 - 11905: 0xD388, + 35333 - 11905: 0xD389, + 35334 - 11905: 0xD38A, + 35335 - 11905: 0xD9EA, + 35336 - 11905: 0xD38B, + 35337 - 11905: 0xD38C, + 35338 - 11905: 0xD38D, + 35339 - 11905: 0xD38E, + 35340 - 11905: 0xD38F, + 35341 - 11905: 0xD390, + 35342 - 11905: 0xD391, + 35343 - 11905: 0xD392, + 35344 - 11905: 0xD393, + 35345 - 11905: 0xD394, + 35346 - 11905: 0xD395, + 35347 - 11905: 0xD396, + 35348 - 11905: 0xD397, + 35349 - 11905: 0xD398, + 35350 - 11905: 0xD399, + 35351 - 11905: 0xD39A, + 35352 - 11905: 0xD39B, + 35353 - 11905: 0xD39C, + 35354 - 11905: 0xD39D, + 35355 - 11905: 0xD39E, + 35356 - 11905: 0xD39F, + 35357 - 11905: 0xD3A0, + 35358 - 11905: 0xD440, + 35359 - 11905: 0xD441, + 35360 - 11905: 0xD442, + 35361 - 11905: 0xD443, + 35362 - 11905: 0xD444, + 35363 - 11905: 0xD445, + 35364 - 11905: 0xD446, + 35365 - 11905: 0xD447, + 35366 - 11905: 0xD448, + 35367 - 11905: 0xD449, + 35368 - 11905: 0xD44A, + 35369 - 11905: 0xD44B, + 35370 - 11905: 0xD44C, + 35371 - 11905: 0xD44D, + 35372 - 11905: 0xD44E, + 35373 - 11905: 0xD44F, + 35374 - 11905: 0xD450, + 35375 - 11905: 0xD451, + 35376 - 11905: 0xD452, + 35377 - 11905: 0xD453, + 35378 - 11905: 0xD454, + 35379 - 11905: 0xD455, + 35380 - 11905: 0xD456, + 35381 - 11905: 0xD457, + 35382 - 11905: 0xD458, + 35383 - 11905: 0xD459, + 35384 - 11905: 0xD45A, + 35385 - 11905: 0xD45B, + 35386 - 11905: 0xD45C, + 35387 - 11905: 0xD45D, + 35388 - 11905: 0xD45E, + 35389 - 11905: 0xD45F, + 35390 - 11905: 0xF6A4, + 35391 - 11905: 0xD460, + 35392 - 11905: 0xD461, + 35393 - 11905: 0xD462, + 35394 - 11905: 0xD463, + 35395 - 11905: 0xD464, + 35396 - 11905: 0xD465, + 35397 - 11905: 0xD466, + 35398 - 11905: 0xD467, + 35399 - 11905: 0xD468, + 35400 - 11905: 0xEEBA, + 35401 - 11905: 0xD469, + 35402 - 11905: 0xD46A, + 35403 - 11905: 0xD46B, + 35404 - 11905: 0xD46C, + 35405 - 11905: 0xD46D, + 35406 - 11905: 0xD46E, + 35407 - 11905: 0xD46F, + 35408 - 11905: 0xD470, + 35409 - 11905: 0xD471, + 35410 - 11905: 0xD472, + 35411 - 11905: 0xD473, + 35412 - 11905: 0xD474, + 35413 - 11905: 0xD475, + 35414 - 11905: 0xD476, + 35415 - 11905: 0xD477, + 35416 - 11905: 0xD478, + 35417 - 11905: 0xD479, + 35418 - 11905: 0xD47A, + 35419 - 11905: 0xD47B, + 35420 - 11905: 0xD47C, + 35421 - 11905: 0xD47D, + 35422 - 11905: 0xD47E, + 35423 - 11905: 0xD480, + 35424 - 11905: 0xD481, + 35425 - 11905: 0xD482, + 35426 - 11905: 0xD483, + 35427 - 11905: 0xD484, + 35428 - 11905: 0xD485, + 35429 - 11905: 0xD486, + 35430 - 11905: 0xD487, + 35431 - 11905: 0xD488, + 35432 - 11905: 0xD489, + 35433 - 11905: 0xD48A, + 35434 - 11905: 0xD48B, + 35435 - 11905: 0xD48C, + 35436 - 11905: 0xD48D, + 35437 - 11905: 0xD48E, + 35438 - 11905: 0xD48F, + 35439 - 11905: 0xD490, + 35440 - 11905: 0xD491, + 35441 - 11905: 0xD492, + 35442 - 11905: 0xD493, + 35443 - 11905: 0xD494, + 35444 - 11905: 0xD495, + 35445 - 11905: 0xD496, + 35446 - 11905: 0xD497, + 35447 - 11905: 0xD498, + 35448 - 11905: 0xD499, + 35449 - 11905: 0xD5B2, + 35450 - 11905: 0xD49A, + 35451 - 11905: 0xD49B, + 35452 - 11905: 0xD49C, + 35453 - 11905: 0xD49D, + 35454 - 11905: 0xD49E, + 35455 - 11905: 0xD49F, + 35456 - 11905: 0xD4A0, + 35457 - 11905: 0xD540, + 35458 - 11905: 0xD541, + 35459 - 11905: 0xD542, + 35460 - 11905: 0xD543, + 35461 - 11905: 0xD544, + 35462 - 11905: 0xD545, + 35463 - 11905: 0xD546, + 35464 - 11905: 0xD547, + 35465 - 11905: 0xD3FE, + 35466 - 11905: 0xCCDC, + 35467 - 11905: 0xD548, + 35468 - 11905: 0xD549, + 35469 - 11905: 0xD54A, + 35470 - 11905: 0xD54B, + 35471 - 11905: 0xD54C, + 35472 - 11905: 0xD54D, + 35473 - 11905: 0xD54E, + 35474 - 11905: 0xD54F, + 35475 - 11905: 0xCAC4, + 35476 - 11905: 0xD550, + 35477 - 11905: 0xD551, + 35478 - 11905: 0xD552, + 35479 - 11905: 0xD553, + 35480 - 11905: 0xD554, + 35481 - 11905: 0xD555, + 35482 - 11905: 0xD556, + 35483 - 11905: 0xD557, + 35484 - 11905: 0xD558, + 35485 - 11905: 0xD559, + 35486 - 11905: 0xD55A, + 35487 - 11905: 0xD55B, + 35488 - 11905: 0xD55C, + 35489 - 11905: 0xD55D, + 35490 - 11905: 0xD55E, + 35491 - 11905: 0xD55F, + 35492 - 11905: 0xD560, + 35493 - 11905: 0xD561, + 35494 - 11905: 0xD562, + 35495 - 11905: 0xD563, + 35496 - 11905: 0xD564, + 35497 - 11905: 0xD565, + 35498 - 11905: 0xD566, + 35499 - 11905: 0xD567, + 35500 - 11905: 0xD568, + 35501 - 11905: 0xD569, + 35502 - 11905: 0xD56A, + 35503 - 11905: 0xD56B, + 35504 - 11905: 0xD56C, + 35505 - 11905: 0xD56D, + 35506 - 11905: 0xD56E, + 35507 - 11905: 0xD56F, + 35508 - 11905: 0xD570, + 35509 - 11905: 0xD571, + 35510 - 11905: 0xD572, + 35511 - 11905: 0xD573, + 35512 - 11905: 0xD574, + 35513 - 11905: 0xD575, + 35514 - 11905: 0xD576, + 35515 - 11905: 0xD577, + 35516 - 11905: 0xD578, + 35517 - 11905: 0xD579, + 35518 - 11905: 0xD57A, + 35519 - 11905: 0xD57B, + 35520 - 11905: 0xD57C, + 35521 - 11905: 0xD57D, + 35522 - 11905: 0xD57E, + 35523 - 11905: 0xD580, + 35524 - 11905: 0xD581, + 35525 - 11905: 0xD582, + 35526 - 11905: 0xD583, + 35527 - 11905: 0xD584, + 35528 - 11905: 0xD585, + 35529 - 11905: 0xD586, + 35530 - 11905: 0xD587, + 35531 - 11905: 0xD588, + 35532 - 11905: 0xD589, + 35533 - 11905: 0xD58A, + 35534 - 11905: 0xD58B, + 35535 - 11905: 0xD58C, + 35536 - 11905: 0xD58D, + 35537 - 11905: 0xD58E, + 35538 - 11905: 0xD58F, + 35539 - 11905: 0xD590, + 35540 - 11905: 0xD591, + 35541 - 11905: 0xD592, + 35542 - 11905: 0xD593, + 35543 - 11905: 0xD594, + 35544 - 11905: 0xD595, + 35545 - 11905: 0xD596, + 35546 - 11905: 0xD597, + 35547 - 11905: 0xD598, + 35548 - 11905: 0xD599, + 35549 - 11905: 0xD59A, + 35550 - 11905: 0xD59B, + 35551 - 11905: 0xD59C, + 35552 - 11905: 0xD59D, + 35553 - 11905: 0xD59E, + 35554 - 11905: 0xD59F, + 35555 - 11905: 0xD5A0, + 35556 - 11905: 0xD640, + 35557 - 11905: 0xD641, + 35558 - 11905: 0xD642, + 35559 - 11905: 0xD643, + 35560 - 11905: 0xD644, + 35561 - 11905: 0xD645, + 35562 - 11905: 0xD646, + 35563 - 11905: 0xD647, + 35564 - 11905: 0xD648, + 35565 - 11905: 0xD649, + 35566 - 11905: 0xD64A, + 35567 - 11905: 0xD64B, + 35568 - 11905: 0xD64C, + 35569 - 11905: 0xD64D, + 35570 - 11905: 0xD64E, + 35571 - 11905: 0xD64F, + 35572 - 11905: 0xD650, + 35573 - 11905: 0xD651, + 35574 - 11905: 0xD652, + 35575 - 11905: 0xD653, + 35576 - 11905: 0xD654, + 35577 - 11905: 0xD655, + 35578 - 11905: 0xD656, + 35579 - 11905: 0xD657, + 35580 - 11905: 0xD658, + 35581 - 11905: 0xD659, + 35582 - 11905: 0xD65A, + 35583 - 11905: 0xD65B, + 35584 - 11905: 0xD65C, + 35585 - 11905: 0xD65D, + 35586 - 11905: 0xD65E, + 35587 - 11905: 0xD65F, + 35588 - 11905: 0xD660, + 35589 - 11905: 0xD661, + 35590 - 11905: 0xD662, + 35591 - 11905: 0xE5C0, + 35592 - 11905: 0xD663, + 35593 - 11905: 0xD664, + 35594 - 11905: 0xD665, + 35595 - 11905: 0xD666, + 35596 - 11905: 0xD667, + 35597 - 11905: 0xD668, + 35598 - 11905: 0xD669, + 35599 - 11905: 0xD66A, + 35600 - 11905: 0xD66B, + 35601 - 11905: 0xD66C, + 35602 - 11905: 0xD66D, + 35603 - 11905: 0xD66E, + 35604 - 11905: 0xD66F, + 35605 - 11905: 0xD670, + 35606 - 11905: 0xD671, + 35607 - 11905: 0xD672, + 35608 - 11905: 0xD673, + 35609 - 11905: 0xD674, + 35610 - 11905: 0xD675, + 35611 - 11905: 0xD676, + 35612 - 11905: 0xD677, + 35613 - 11905: 0xD678, + 35614 - 11905: 0xD679, + 35615 - 11905: 0xD67A, + 35616 - 11905: 0xD67B, + 35617 - 11905: 0xD67C, + 35618 - 11905: 0xD67D, + 35619 - 11905: 0xD67E, + 35620 - 11905: 0xD680, + 35621 - 11905: 0xD681, + 35622 - 11905: 0xF6A5, + 35623 - 11905: 0xD682, + 35624 - 11905: 0xD683, + 35625 - 11905: 0xD684, + 35626 - 11905: 0xD685, + 35627 - 11905: 0xD686, + 35628 - 11905: 0xD687, + 35629 - 11905: 0xD688, + 35630 - 11905: 0xD689, + 35631 - 11905: 0xD68A, + 35632 - 11905: 0xD68B, + 35633 - 11905: 0xD68C, + 35634 - 11905: 0xD68D, + 35635 - 11905: 0xD68E, + 35636 - 11905: 0xD68F, + 35637 - 11905: 0xD690, + 35638 - 11905: 0xD691, + 35639 - 11905: 0xD692, + 35640 - 11905: 0xD693, + 35641 - 11905: 0xD694, + 35642 - 11905: 0xD695, + 35643 - 11905: 0xD696, + 35644 - 11905: 0xD697, + 35645 - 11905: 0xD698, + 35646 - 11905: 0xD699, + 35647 - 11905: 0xD69A, + 35648 - 11905: 0xD69B, + 35649 - 11905: 0xD69C, + 35650 - 11905: 0xD69D, + 35651 - 11905: 0xD69E, + 35652 - 11905: 0xD69F, + 35653 - 11905: 0xD6A0, + 35654 - 11905: 0xD740, + 35655 - 11905: 0xD741, + 35656 - 11905: 0xD742, + 35657 - 11905: 0xD743, + 35658 - 11905: 0xD744, + 35659 - 11905: 0xD745, + 35660 - 11905: 0xD746, + 35661 - 11905: 0xD747, + 35662 - 11905: 0xD748, + 35663 - 11905: 0xD749, + 35664 - 11905: 0xD74A, + 35665 - 11905: 0xD74B, + 35666 - 11905: 0xD74C, + 35667 - 11905: 0xD74D, + 35668 - 11905: 0xD74E, + 35669 - 11905: 0xD74F, + 35670 - 11905: 0xD750, + 35671 - 11905: 0xD751, + 35672 - 11905: 0xD752, + 35673 - 11905: 0xD753, + 35674 - 11905: 0xD754, + 35675 - 11905: 0xD755, + 35676 - 11905: 0xD756, + 35677 - 11905: 0xD757, + 35678 - 11905: 0xD758, + 35679 - 11905: 0xD759, + 35680 - 11905: 0xD75A, + 35681 - 11905: 0xD75B, + 35682 - 11905: 0xD75C, + 35683 - 11905: 0xD75D, + 35684 - 11905: 0xD75E, + 35685 - 11905: 0xD75F, + 35686 - 11905: 0xBEAF, + 35687 - 11905: 0xD760, + 35688 - 11905: 0xD761, + 35689 - 11905: 0xD762, + 35690 - 11905: 0xD763, + 35691 - 11905: 0xD764, + 35692 - 11905: 0xC6A9, + 35693 - 11905: 0xD765, + 35694 - 11905: 0xD766, + 35695 - 11905: 0xD767, + 35696 - 11905: 0xD768, + 35697 - 11905: 0xD769, + 35698 - 11905: 0xD76A, + 35699 - 11905: 0xD76B, + 35700 - 11905: 0xD76C, + 35701 - 11905: 0xD76D, + 35702 - 11905: 0xD76E, + 35703 - 11905: 0xD76F, + 35704 - 11905: 0xD770, + 35705 - 11905: 0xD771, + 35706 - 11905: 0xD772, + 35707 - 11905: 0xD773, + 35708 - 11905: 0xD774, + 35709 - 11905: 0xD775, + 35710 - 11905: 0xD776, + 35711 - 11905: 0xD777, + 35712 - 11905: 0xD778, + 35713 - 11905: 0xD779, + 35714 - 11905: 0xD77A, + 35715 - 11905: 0xD77B, + 35716 - 11905: 0xD77C, + 35717 - 11905: 0xD77D, + 35718 - 11905: 0xD77E, + 35719 - 11905: 0xD780, + 35720 - 11905: 0xD781, + 35721 - 11905: 0xD782, + 35722 - 11905: 0xD783, + 35723 - 11905: 0xD784, + 35724 - 11905: 0xD785, + 35725 - 11905: 0xD786, + 35726 - 11905: 0xD787, + 35727 - 11905: 0xD788, + 35728 - 11905: 0xD789, + 35729 - 11905: 0xD78A, + 35730 - 11905: 0xD78B, + 35731 - 11905: 0xD78C, + 35732 - 11905: 0xD78D, + 35733 - 11905: 0xD78E, + 35734 - 11905: 0xD78F, + 35735 - 11905: 0xD790, + 35736 - 11905: 0xD791, + 35737 - 11905: 0xD792, + 35738 - 11905: 0xD793, + 35739 - 11905: 0xD794, + 35740 - 11905: 0xD795, + 35741 - 11905: 0xD796, + 35742 - 11905: 0xD797, + 35743 - 11905: 0xD798, + 35744 - 11905: 0xDAA5, + 35745 - 11905: 0xBCC6, + 35746 - 11905: 0xB6A9, + 35747 - 11905: 0xB8BC, + 35748 - 11905: 0xC8CF, + 35749 - 11905: 0xBCA5, + 35750 - 11905: 0xDAA6, + 35751 - 11905: 0xDAA7, + 35752 - 11905: 0xCCD6, + 35753 - 11905: 0xC8C3, + 35754 - 11905: 0xDAA8, + 35755 - 11905: 0xC6FD, + 35756 - 11905: 0xD799, + 35757 - 11905: 0xD1B5, + 35758 - 11905: 0xD2E9, + 35759 - 11905: 0xD1B6, + 35760 - 11905: 0xBCC7, + 35761 - 11905: 0xD79A, + 35762 - 11905: 0xBDB2, + 35763 - 11905: 0xBBE4, + 35764 - 11905: 0xDAA9, + 35765 - 11905: 0xDAAA, + 35766 - 11905: 0xD1C8, + 35767 - 11905: 0xDAAB, + 35768 - 11905: 0xD0ED, + 35769 - 11905: 0xB6EF, + 35770 - 11905: 0xC2DB, + 35771 - 11905: 0xD79B, + 35772 - 11905: 0xCBCF, + 35773 - 11905: 0xB7ED, + 35774 - 11905: 0xC9E8, + 35775 - 11905: 0xB7C3, + 35776 - 11905: 0xBEF7, + 35777 - 11905: 0xD6A4, + 35778 - 11905: 0xDAAC, + 35779 - 11905: 0xDAAD, + 35780 - 11905: 0xC6C0, + 35781 - 11905: 0xD7E7, + 35782 - 11905: 0xCAB6, + 35783 - 11905: 0xD79C, + 35784 - 11905: 0xD5A9, + 35785 - 11905: 0xCBDF, + 35786 - 11905: 0xD5EF, + 35787 - 11905: 0xDAAE, + 35788 - 11905: 0xD6DF, + 35789 - 11905: 0xB4CA, + 35790 - 11905: 0xDAB0, + 35791 - 11905: 0xDAAF, + 35792 - 11905: 0xD79D, + 35793 - 11905: 0xD2EB, + 35794 - 11905: 0xDAB1, + 35795 - 11905: 0xDAB2, + 35796 - 11905: 0xDAB3, + 35797 - 11905: 0xCAD4, + 35798 - 11905: 0xDAB4, + 35799 - 11905: 0xCAAB, + 35800 - 11905: 0xDAB5, + 35801 - 11905: 0xDAB6, + 35802 - 11905: 0xB3CF, + 35803 - 11905: 0xD6EF, + 35804 - 11905: 0xDAB7, + 35805 - 11905: 0xBBB0, + 35806 - 11905: 0xB5AE, + 35807 - 11905: 0xDAB8, + 35808 - 11905: 0xDAB9, + 35809 - 11905: 0xB9EE, + 35810 - 11905: 0xD1AF, + 35811 - 11905: 0xD2E8, + 35812 - 11905: 0xDABA, + 35813 - 11905: 0xB8C3, + 35814 - 11905: 0xCFEA, + 35815 - 11905: 0xB2EF, + 35816 - 11905: 0xDABB, + 35817 - 11905: 0xDABC, + 35818 - 11905: 0xD79E, + 35819 - 11905: 0xBDEB, + 35820 - 11905: 0xCEDC, + 35821 - 11905: 0xD3EF, + 35822 - 11905: 0xDABD, + 35823 - 11905: 0xCEF3, + 35824 - 11905: 0xDABE, + 35825 - 11905: 0xD3D5, + 35826 - 11905: 0xBBE5, + 35827 - 11905: 0xDABF, + 35828 - 11905: 0xCBB5, + 35829 - 11905: 0xCBD0, + 35830 - 11905: 0xDAC0, + 35831 - 11905: 0xC7EB, + 35832 - 11905: 0xD6EE, + 35833 - 11905: 0xDAC1, + 35834 - 11905: 0xC5B5, + 35835 - 11905: 0xB6C1, + 35836 - 11905: 0xDAC2, + 35837 - 11905: 0xB7CC, + 35838 - 11905: 0xBFCE, + 35839 - 11905: 0xDAC3, + 35840 - 11905: 0xDAC4, + 35841 - 11905: 0xCBAD, + 35842 - 11905: 0xDAC5, + 35843 - 11905: 0xB5F7, + 35844 - 11905: 0xDAC6, + 35845 - 11905: 0xC1C2, + 35846 - 11905: 0xD7BB, + 35847 - 11905: 0xDAC7, + 35848 - 11905: 0xCCB8, + 35849 - 11905: 0xD79F, + 35850 - 11905: 0xD2EA, + 35851 - 11905: 0xC4B1, + 35852 - 11905: 0xDAC8, + 35853 - 11905: 0xB5FD, + 35854 - 11905: 0xBBD1, + 35855 - 11905: 0xDAC9, + 35856 - 11905: 0xD0B3, + 35857 - 11905: 0xDACA, + 35858 - 11905: 0xDACB, + 35859 - 11905: 0xCEBD, + 35860 - 11905: 0xDACC, + 35861 - 11905: 0xDACD, + 35862 - 11905: 0xDACE, + 35863 - 11905: 0xB2F7, + 35864 - 11905: 0xDAD1, + 35865 - 11905: 0xDACF, + 35866 - 11905: 0xD1E8, + 35867 - 11905: 0xDAD0, + 35868 - 11905: 0xC3D5, + 35869 - 11905: 0xDAD2, + 35870 - 11905: 0xD7A0, + 35871 - 11905: 0xDAD3, + 35872 - 11905: 0xDAD4, + 35873 - 11905: 0xDAD5, + 35874 - 11905: 0xD0BB, + 35875 - 11905: 0xD2A5, + 35876 - 11905: 0xB0F9, + 35877 - 11905: 0xDAD6, + 35878 - 11905: 0xC7AB, + 35879 - 11905: 0xDAD7, + 35880 - 11905: 0xBDF7, + 35881 - 11905: 0xC3A1, + 35882 - 11905: 0xDAD8, + 35883 - 11905: 0xDAD9, + 35884 - 11905: 0xC3FD, + 35885 - 11905: 0xCCB7, + 35886 - 11905: 0xDADA, + 35887 - 11905: 0xDADB, + 35888 - 11905: 0xC0BE, + 35889 - 11905: 0xC6D7, + 35890 - 11905: 0xDADC, + 35891 - 11905: 0xDADD, + 35892 - 11905: 0xC7B4, + 35893 - 11905: 0xDADE, + 35894 - 11905: 0xDADF, + 35895 - 11905: 0xB9C8, + 35896 - 11905: 0xD840, + 35897 - 11905: 0xD841, + 35898 - 11905: 0xD842, + 35899 - 11905: 0xD843, + 35900 - 11905: 0xD844, + 35901 - 11905: 0xD845, + 35902 - 11905: 0xD846, + 35903 - 11905: 0xD847, + 35904 - 11905: 0xD848, + 35905 - 11905: 0xBBED, + 35906 - 11905: 0xD849, + 35907 - 11905: 0xD84A, + 35908 - 11905: 0xD84B, + 35909 - 11905: 0xD84C, + 35910 - 11905: 0xB6B9, + 35911 - 11905: 0xF4F8, + 35912 - 11905: 0xD84D, + 35913 - 11905: 0xF4F9, + 35914 - 11905: 0xD84E, + 35915 - 11905: 0xD84F, + 35916 - 11905: 0xCDE3, + 35917 - 11905: 0xD850, + 35918 - 11905: 0xD851, + 35919 - 11905: 0xD852, + 35920 - 11905: 0xD853, + 35921 - 11905: 0xD854, + 35922 - 11905: 0xD855, + 35923 - 11905: 0xD856, + 35924 - 11905: 0xD857, + 35925 - 11905: 0xF5B9, + 35926 - 11905: 0xD858, + 35927 - 11905: 0xD859, + 35928 - 11905: 0xD85A, + 35929 - 11905: 0xD85B, + 35930 - 11905: 0xEBE0, + 35931 - 11905: 0xD85C, + 35932 - 11905: 0xD85D, + 35933 - 11905: 0xD85E, + 35934 - 11905: 0xD85F, + 35935 - 11905: 0xD860, + 35936 - 11905: 0xD861, + 35937 - 11905: 0xCFF3, + 35938 - 11905: 0xBBBF, + 35939 - 11905: 0xD862, + 35940 - 11905: 0xD863, + 35941 - 11905: 0xD864, + 35942 - 11905: 0xD865, + 35943 - 11905: 0xD866, + 35944 - 11905: 0xD867, + 35945 - 11905: 0xD868, + 35946 - 11905: 0xBAC0, + 35947 - 11905: 0xD4A5, + 35948 - 11905: 0xD869, + 35949 - 11905: 0xD86A, + 35950 - 11905: 0xD86B, + 35951 - 11905: 0xD86C, + 35952 - 11905: 0xD86D, + 35953 - 11905: 0xD86E, + 35954 - 11905: 0xD86F, + 35955 - 11905: 0xE1D9, + 35956 - 11905: 0xD870, + 35957 - 11905: 0xD871, + 35958 - 11905: 0xD872, + 35959 - 11905: 0xD873, + 35960 - 11905: 0xF5F4, + 35961 - 11905: 0xB1AA, + 35962 - 11905: 0xB2F2, + 35963 - 11905: 0xD874, + 35964 - 11905: 0xD875, + 35965 - 11905: 0xD876, + 35966 - 11905: 0xD877, + 35967 - 11905: 0xD878, + 35968 - 11905: 0xD879, + 35969 - 11905: 0xD87A, + 35970 - 11905: 0xF5F5, + 35971 - 11905: 0xD87B, + 35972 - 11905: 0xD87C, + 35973 - 11905: 0xF5F7, + 35974 - 11905: 0xD87D, + 35975 - 11905: 0xD87E, + 35976 - 11905: 0xD880, + 35977 - 11905: 0xBAD1, + 35978 - 11905: 0xF5F6, + 35979 - 11905: 0xD881, + 35980 - 11905: 0xC3B2, + 35981 - 11905: 0xD882, + 35982 - 11905: 0xD883, + 35983 - 11905: 0xD884, + 35984 - 11905: 0xD885, + 35985 - 11905: 0xD886, + 35986 - 11905: 0xD887, + 35987 - 11905: 0xD888, + 35988 - 11905: 0xF5F9, + 35989 - 11905: 0xD889, + 35990 - 11905: 0xD88A, + 35991 - 11905: 0xD88B, + 35992 - 11905: 0xF5F8, + 35993 - 11905: 0xD88C, + 35994 - 11905: 0xD88D, + 35995 - 11905: 0xD88E, + 35996 - 11905: 0xD88F, + 35997 - 11905: 0xD890, + 35998 - 11905: 0xD891, + 35999 - 11905: 0xD892, + 36000 - 11905: 0xD893, + 36001 - 11905: 0xD894, + 36002 - 11905: 0xD895, + 36003 - 11905: 0xD896, + 36004 - 11905: 0xD897, + 36005 - 11905: 0xD898, + 36006 - 11905: 0xD899, + 36007 - 11905: 0xD89A, + 36008 - 11905: 0xD89B, + 36009 - 11905: 0xD89C, + 36010 - 11905: 0xD89D, + 36011 - 11905: 0xD89E, + 36012 - 11905: 0xD89F, + 36013 - 11905: 0xD8A0, + 36014 - 11905: 0xD940, + 36015 - 11905: 0xD941, + 36016 - 11905: 0xD942, + 36017 - 11905: 0xD943, + 36018 - 11905: 0xD944, + 36019 - 11905: 0xD945, + 36020 - 11905: 0xD946, + 36021 - 11905: 0xD947, + 36022 - 11905: 0xD948, + 36023 - 11905: 0xD949, + 36024 - 11905: 0xD94A, + 36025 - 11905: 0xD94B, + 36026 - 11905: 0xD94C, + 36027 - 11905: 0xD94D, + 36028 - 11905: 0xD94E, + 36029 - 11905: 0xD94F, + 36030 - 11905: 0xD950, + 36031 - 11905: 0xD951, + 36032 - 11905: 0xD952, + 36033 - 11905: 0xD953, + 36034 - 11905: 0xD954, + 36035 - 11905: 0xD955, + 36036 - 11905: 0xD956, + 36037 - 11905: 0xD957, + 36038 - 11905: 0xD958, + 36039 - 11905: 0xD959, + 36040 - 11905: 0xD95A, + 36041 - 11905: 0xD95B, + 36042 - 11905: 0xD95C, + 36043 - 11905: 0xD95D, + 36044 - 11905: 0xD95E, + 36045 - 11905: 0xD95F, + 36046 - 11905: 0xD960, + 36047 - 11905: 0xD961, + 36048 - 11905: 0xD962, + 36049 - 11905: 0xD963, + 36050 - 11905: 0xD964, + 36051 - 11905: 0xD965, + 36052 - 11905: 0xD966, + 36053 - 11905: 0xD967, + 36054 - 11905: 0xD968, + 36055 - 11905: 0xD969, + 36056 - 11905: 0xD96A, + 36057 - 11905: 0xD96B, + 36058 - 11905: 0xD96C, + 36059 - 11905: 0xD96D, + 36060 - 11905: 0xD96E, + 36061 - 11905: 0xD96F, + 36062 - 11905: 0xD970, + 36063 - 11905: 0xD971, + 36064 - 11905: 0xD972, + 36065 - 11905: 0xD973, + 36066 - 11905: 0xD974, + 36067 - 11905: 0xD975, + 36068 - 11905: 0xD976, + 36069 - 11905: 0xD977, + 36070 - 11905: 0xD978, + 36071 - 11905: 0xD979, + 36072 - 11905: 0xD97A, + 36073 - 11905: 0xD97B, + 36074 - 11905: 0xD97C, + 36075 - 11905: 0xD97D, + 36076 - 11905: 0xD97E, + 36077 - 11905: 0xD980, + 36078 - 11905: 0xD981, + 36079 - 11905: 0xD982, + 36080 - 11905: 0xD983, + 36081 - 11905: 0xD984, + 36082 - 11905: 0xD985, + 36083 - 11905: 0xD986, + 36084 - 11905: 0xD987, + 36085 - 11905: 0xD988, + 36086 - 11905: 0xD989, + 36087 - 11905: 0xD98A, + 36088 - 11905: 0xD98B, + 36089 - 11905: 0xD98C, + 36090 - 11905: 0xD98D, + 36091 - 11905: 0xD98E, + 36092 - 11905: 0xD98F, + 36093 - 11905: 0xD990, + 36094 - 11905: 0xD991, + 36095 - 11905: 0xD992, + 36096 - 11905: 0xD993, + 36097 - 11905: 0xD994, + 36098 - 11905: 0xD995, + 36099 - 11905: 0xD996, + 36100 - 11905: 0xD997, + 36101 - 11905: 0xD998, + 36102 - 11905: 0xD999, + 36103 - 11905: 0xD99A, + 36104 - 11905: 0xD99B, + 36105 - 11905: 0xD99C, + 36106 - 11905: 0xD99D, + 36107 - 11905: 0xD99E, + 36108 - 11905: 0xD99F, + 36109 - 11905: 0xD9A0, + 36110 - 11905: 0xDA40, + 36111 - 11905: 0xDA41, + 36112 - 11905: 0xDA42, + 36113 - 11905: 0xDA43, + 36114 - 11905: 0xDA44, + 36115 - 11905: 0xDA45, + 36116 - 11905: 0xDA46, + 36117 - 11905: 0xDA47, + 36118 - 11905: 0xDA48, + 36119 - 11905: 0xDA49, + 36120 - 11905: 0xDA4A, + 36121 - 11905: 0xDA4B, + 36122 - 11905: 0xDA4C, + 36123 - 11905: 0xDA4D, + 36124 - 11905: 0xDA4E, + 36125 - 11905: 0xB1B4, + 36126 - 11905: 0xD5EA, + 36127 - 11905: 0xB8BA, + 36128 - 11905: 0xDA4F, + 36129 - 11905: 0xB9B1, + 36130 - 11905: 0xB2C6, + 36131 - 11905: 0xD4F0, + 36132 - 11905: 0xCFCD, + 36133 - 11905: 0xB0DC, + 36134 - 11905: 0xD5CB, + 36135 - 11905: 0xBBF5, + 36136 - 11905: 0xD6CA, + 36137 - 11905: 0xB7B7, + 36138 - 11905: 0xCCB0, + 36139 - 11905: 0xC6B6, + 36140 - 11905: 0xB1E1, + 36141 - 11905: 0xB9BA, + 36142 - 11905: 0xD6FC, + 36143 - 11905: 0xB9E1, + 36144 - 11905: 0xB7A1, + 36145 - 11905: 0xBCFA, + 36146 - 11905: 0xEADA, + 36147 - 11905: 0xEADB, + 36148 - 11905: 0xCCF9, + 36149 - 11905: 0xB9F3, + 36150 - 11905: 0xEADC, + 36151 - 11905: 0xB4FB, + 36152 - 11905: 0xC3B3, + 36153 - 11905: 0xB7D1, + 36154 - 11905: 0xBAD8, + 36155 - 11905: 0xEADD, + 36156 - 11905: 0xD4F4, + 36157 - 11905: 0xEADE, + 36158 - 11905: 0xBCD6, + 36159 - 11905: 0xBBDF, + 36160 - 11905: 0xEADF, + 36161 - 11905: 0xC1DE, + 36162 - 11905: 0xC2B8, + 36163 - 11905: 0xD4DF, + 36164 - 11905: 0xD7CA, + 36165 - 11905: 0xEAE0, + 36166 - 11905: 0xEAE1, + 36167 - 11905: 0xEAE4, + 36168 - 11905: 0xEAE2, + 36169 - 11905: 0xEAE3, + 36170 - 11905: 0xC9DE, + 36171 - 11905: 0xB8B3, + 36172 - 11905: 0xB6C4, + 36173 - 11905: 0xEAE5, + 36174 - 11905: 0xCAEA, + 36175 - 11905: 0xC9CD, + 36176 - 11905: 0xB4CD, + 36177 - 11905: 0xDA50, + 36178 - 11905: 0xDA51, + 36179 - 11905: 0xE2D9, + 36180 - 11905: 0xC5E2, + 36181 - 11905: 0xEAE6, + 36182 - 11905: 0xC0B5, + 36183 - 11905: 0xDA52, + 36184 - 11905: 0xD7B8, + 36185 - 11905: 0xEAE7, + 36186 - 11905: 0xD7AC, + 36187 - 11905: 0xC8FC, + 36188 - 11905: 0xD8D3, + 36189 - 11905: 0xD8CD, + 36190 - 11905: 0xD4DE, + 36191 - 11905: 0xDA53, + 36192 - 11905: 0xD4F9, + 36193 - 11905: 0xC9C4, + 36194 - 11905: 0xD3AE, + 36195 - 11905: 0xB8D3, + 36196 - 11905: 0xB3E0, + 36197 - 11905: 0xDA54, + 36198 - 11905: 0xC9E2, + 36199 - 11905: 0xF4F6, + 36200 - 11905: 0xDA55, + 36201 - 11905: 0xDA56, + 36202 - 11905: 0xDA57, + 36203 - 11905: 0xBAD5, + 36204 - 11905: 0xDA58, + 36205 - 11905: 0xF4F7, + 36206 - 11905: 0xDA59, + 36207 - 11905: 0xDA5A, + 36208 - 11905: 0xD7DF, + 36209 - 11905: 0xDA5B, + 36210 - 11905: 0xDA5C, + 36211 - 11905: 0xF4F1, + 36212 - 11905: 0xB8B0, + 36213 - 11905: 0xD5D4, + 36214 - 11905: 0xB8CF, + 36215 - 11905: 0xC6F0, + 36216 - 11905: 0xDA5D, + 36217 - 11905: 0xDA5E, + 36218 - 11905: 0xDA5F, + 36219 - 11905: 0xDA60, + 36220 - 11905: 0xDA61, + 36221 - 11905: 0xDA62, + 36222 - 11905: 0xDA63, + 36223 - 11905: 0xDA64, + 36224 - 11905: 0xDA65, + 36225 - 11905: 0xB3C3, + 36226 - 11905: 0xDA66, + 36227 - 11905: 0xDA67, + 36228 - 11905: 0xF4F2, + 36229 - 11905: 0xB3AC, + 36230 - 11905: 0xDA68, + 36231 - 11905: 0xDA69, + 36232 - 11905: 0xDA6A, + 36233 - 11905: 0xDA6B, + 36234 - 11905: 0xD4BD, + 36235 - 11905: 0xC7F7, + 36236 - 11905: 0xDA6C, + 36237 - 11905: 0xDA6D, + 36238 - 11905: 0xDA6E, + 36239 - 11905: 0xDA6F, + 36240 - 11905: 0xDA70, + 36241 - 11905: 0xF4F4, + 36242 - 11905: 0xDA71, + 36243 - 11905: 0xDA72, + 36244 - 11905: 0xF4F3, + 36245 - 11905: 0xDA73, + 36246 - 11905: 0xDA74, + 36247 - 11905: 0xDA75, + 36248 - 11905: 0xDA76, + 36249 - 11905: 0xDA77, + 36250 - 11905: 0xDA78, + 36251 - 11905: 0xDA79, + 36252 - 11905: 0xDA7A, + 36253 - 11905: 0xDA7B, + 36254 - 11905: 0xDA7C, + 36255 - 11905: 0xCCCB, + 36256 - 11905: 0xDA7D, + 36257 - 11905: 0xDA7E, + 36258 - 11905: 0xDA80, + 36259 - 11905: 0xC8A4, + 36260 - 11905: 0xDA81, + 36261 - 11905: 0xDA82, + 36262 - 11905: 0xDA83, + 36263 - 11905: 0xDA84, + 36264 - 11905: 0xDA85, + 36265 - 11905: 0xDA86, + 36266 - 11905: 0xDA87, + 36267 - 11905: 0xDA88, + 36268 - 11905: 0xDA89, + 36269 - 11905: 0xDA8A, + 36270 - 11905: 0xDA8B, + 36271 - 11905: 0xDA8C, + 36272 - 11905: 0xDA8D, + 36273 - 11905: 0xF4F5, + 36274 - 11905: 0xDA8E, + 36275 - 11905: 0xD7E3, + 36276 - 11905: 0xC5BF, + 36277 - 11905: 0xF5C0, + 36278 - 11905: 0xDA8F, + 36279 - 11905: 0xDA90, + 36280 - 11905: 0xF5BB, + 36281 - 11905: 0xDA91, + 36282 - 11905: 0xF5C3, + 36283 - 11905: 0xDA92, + 36284 - 11905: 0xF5C2, + 36285 - 11905: 0xDA93, + 36286 - 11905: 0xD6BA, + 36287 - 11905: 0xF5C1, + 36288 - 11905: 0xDA94, + 36289 - 11905: 0xDA95, + 36290 - 11905: 0xDA96, + 36291 - 11905: 0xD4BE, + 36292 - 11905: 0xF5C4, + 36293 - 11905: 0xDA97, + 36294 - 11905: 0xF5CC, + 36295 - 11905: 0xDA98, + 36296 - 11905: 0xDA99, + 36297 - 11905: 0xDA9A, + 36298 - 11905: 0xDA9B, + 36299 - 11905: 0xB0CF, + 36300 - 11905: 0xB5F8, + 36301 - 11905: 0xDA9C, + 36302 - 11905: 0xF5C9, + 36303 - 11905: 0xF5CA, + 36304 - 11905: 0xDA9D, + 36305 - 11905: 0xC5DC, + 36306 - 11905: 0xDA9E, + 36307 - 11905: 0xDA9F, + 36308 - 11905: 0xDAA0, + 36309 - 11905: 0xDB40, + 36310 - 11905: 0xF5C5, + 36311 - 11905: 0xF5C6, + 36312 - 11905: 0xDB41, + 36313 - 11905: 0xDB42, + 36314 - 11905: 0xF5C7, + 36315 - 11905: 0xF5CB, + 36316 - 11905: 0xDB43, + 36317 - 11905: 0xBEE0, + 36318 - 11905: 0xF5C8, + 36319 - 11905: 0xB8FA, + 36320 - 11905: 0xDB44, + 36321 - 11905: 0xDB45, + 36322 - 11905: 0xDB46, + 36323 - 11905: 0xF5D0, + 36324 - 11905: 0xF5D3, + 36325 - 11905: 0xDB47, + 36326 - 11905: 0xDB48, + 36327 - 11905: 0xDB49, + 36328 - 11905: 0xBFE7, + 36329 - 11905: 0xDB4A, + 36330 - 11905: 0xB9F2, + 36331 - 11905: 0xF5BC, + 36332 - 11905: 0xF5CD, + 36333 - 11905: 0xDB4B, + 36334 - 11905: 0xDB4C, + 36335 - 11905: 0xC2B7, + 36336 - 11905: 0xDB4D, + 36337 - 11905: 0xDB4E, + 36338 - 11905: 0xDB4F, + 36339 - 11905: 0xCCF8, + 36340 - 11905: 0xDB50, + 36341 - 11905: 0xBCF9, + 36342 - 11905: 0xDB51, + 36343 - 11905: 0xF5CE, + 36344 - 11905: 0xF5CF, + 36345 - 11905: 0xF5D1, + 36346 - 11905: 0xB6E5, + 36347 - 11905: 0xF5D2, + 36348 - 11905: 0xDB52, + 36349 - 11905: 0xF5D5, + 36350 - 11905: 0xDB53, + 36351 - 11905: 0xDB54, + 36352 - 11905: 0xDB55, + 36353 - 11905: 0xDB56, + 36354 - 11905: 0xDB57, + 36355 - 11905: 0xDB58, + 36356 - 11905: 0xDB59, + 36357 - 11905: 0xF5BD, + 36358 - 11905: 0xDB5A, + 36359 - 11905: 0xDB5B, + 36360 - 11905: 0xDB5C, + 36361 - 11905: 0xF5D4, + 36362 - 11905: 0xD3BB, + 36363 - 11905: 0xDB5D, + 36364 - 11905: 0xB3EC, + 36365 - 11905: 0xDB5E, + 36366 - 11905: 0xDB5F, + 36367 - 11905: 0xCCA4, + 36368 - 11905: 0xDB60, + 36369 - 11905: 0xDB61, + 36370 - 11905: 0xDB62, + 36371 - 11905: 0xDB63, + 36372 - 11905: 0xF5D6, + 36373 - 11905: 0xDB64, + 36374 - 11905: 0xDB65, + 36375 - 11905: 0xDB66, + 36376 - 11905: 0xDB67, + 36377 - 11905: 0xDB68, + 36378 - 11905: 0xDB69, + 36379 - 11905: 0xDB6A, + 36380 - 11905: 0xDB6B, + 36381 - 11905: 0xF5D7, + 36382 - 11905: 0xBEE1, + 36383 - 11905: 0xF5D8, + 36384 - 11905: 0xDB6C, + 36385 - 11905: 0xDB6D, + 36386 - 11905: 0xCCDF, + 36387 - 11905: 0xF5DB, + 36388 - 11905: 0xDB6E, + 36389 - 11905: 0xDB6F, + 36390 - 11905: 0xDB70, + 36391 - 11905: 0xDB71, + 36392 - 11905: 0xDB72, + 36393 - 11905: 0xB2C8, + 36394 - 11905: 0xD7D9, + 36395 - 11905: 0xDB73, + 36396 - 11905: 0xF5D9, + 36397 - 11905: 0xDB74, + 36398 - 11905: 0xF5DA, + 36399 - 11905: 0xF5DC, + 36400 - 11905: 0xDB75, + 36401 - 11905: 0xF5E2, + 36402 - 11905: 0xDB76, + 36403 - 11905: 0xDB77, + 36404 - 11905: 0xDB78, + 36405 - 11905: 0xF5E0, + 36406 - 11905: 0xDB79, + 36407 - 11905: 0xDB7A, + 36408 - 11905: 0xDB7B, + 36409 - 11905: 0xF5DF, + 36410 - 11905: 0xF5DD, + 36411 - 11905: 0xDB7C, + 36412 - 11905: 0xDB7D, + 36413 - 11905: 0xF5E1, + 36414 - 11905: 0xDB7E, + 36415 - 11905: 0xDB80, + 36416 - 11905: 0xF5DE, + 36417 - 11905: 0xF5E4, + 36418 - 11905: 0xF5E5, + 36419 - 11905: 0xDB81, + 36420 - 11905: 0xCCE3, + 36421 - 11905: 0xDB82, + 36422 - 11905: 0xDB83, + 36423 - 11905: 0xE5BF, + 36424 - 11905: 0xB5B8, + 36425 - 11905: 0xF5E3, + 36426 - 11905: 0xF5E8, + 36427 - 11905: 0xCCA3, + 36428 - 11905: 0xDB84, + 36429 - 11905: 0xDB85, + 36430 - 11905: 0xDB86, + 36431 - 11905: 0xDB87, + 36432 - 11905: 0xDB88, + 36433 - 11905: 0xF5E6, + 36434 - 11905: 0xF5E7, + 36435 - 11905: 0xDB89, + 36436 - 11905: 0xDB8A, + 36437 - 11905: 0xDB8B, + 36438 - 11905: 0xDB8C, + 36439 - 11905: 0xDB8D, + 36440 - 11905: 0xDB8E, + 36441 - 11905: 0xF5BE, + 36442 - 11905: 0xDB8F, + 36443 - 11905: 0xDB90, + 36444 - 11905: 0xDB91, + 36445 - 11905: 0xDB92, + 36446 - 11905: 0xDB93, + 36447 - 11905: 0xDB94, + 36448 - 11905: 0xDB95, + 36449 - 11905: 0xDB96, + 36450 - 11905: 0xDB97, + 36451 - 11905: 0xDB98, + 36452 - 11905: 0xDB99, + 36453 - 11905: 0xDB9A, + 36454 - 11905: 0xB1C4, + 36455 - 11905: 0xDB9B, + 36456 - 11905: 0xDB9C, + 36457 - 11905: 0xF5BF, + 36458 - 11905: 0xDB9D, + 36459 - 11905: 0xDB9E, + 36460 - 11905: 0xB5C5, + 36461 - 11905: 0xB2E4, + 36462 - 11905: 0xDB9F, + 36463 - 11905: 0xF5EC, + 36464 - 11905: 0xF5E9, + 36465 - 11905: 0xDBA0, + 36466 - 11905: 0xB6D7, + 36467 - 11905: 0xDC40, + 36468 - 11905: 0xF5ED, + 36469 - 11905: 0xDC41, + 36470 - 11905: 0xF5EA, + 36471 - 11905: 0xDC42, + 36472 - 11905: 0xDC43, + 36473 - 11905: 0xDC44, + 36474 - 11905: 0xDC45, + 36475 - 11905: 0xDC46, + 36476 - 11905: 0xF5EB, + 36477 - 11905: 0xDC47, + 36478 - 11905: 0xDC48, + 36479 - 11905: 0xB4DA, + 36480 - 11905: 0xDC49, + 36481 - 11905: 0xD4EA, + 36482 - 11905: 0xDC4A, + 36483 - 11905: 0xDC4B, + 36484 - 11905: 0xDC4C, + 36485 - 11905: 0xF5EE, + 36486 - 11905: 0xDC4D, + 36487 - 11905: 0xB3F9, + 36488 - 11905: 0xDC4E, + 36489 - 11905: 0xDC4F, + 36490 - 11905: 0xDC50, + 36491 - 11905: 0xDC51, + 36492 - 11905: 0xDC52, + 36493 - 11905: 0xDC53, + 36494 - 11905: 0xDC54, + 36495 - 11905: 0xF5EF, + 36496 - 11905: 0xF5F1, + 36497 - 11905: 0xDC55, + 36498 - 11905: 0xDC56, + 36499 - 11905: 0xDC57, + 36500 - 11905: 0xF5F0, + 36501 - 11905: 0xDC58, + 36502 - 11905: 0xDC59, + 36503 - 11905: 0xDC5A, + 36504 - 11905: 0xDC5B, + 36505 - 11905: 0xDC5C, + 36506 - 11905: 0xDC5D, + 36507 - 11905: 0xDC5E, + 36508 - 11905: 0xF5F2, + 36509 - 11905: 0xDC5F, + 36510 - 11905: 0xF5F3, + 36511 - 11905: 0xDC60, + 36512 - 11905: 0xDC61, + 36513 - 11905: 0xDC62, + 36514 - 11905: 0xDC63, + 36515 - 11905: 0xDC64, + 36516 - 11905: 0xDC65, + 36517 - 11905: 0xDC66, + 36518 - 11905: 0xDC67, + 36519 - 11905: 0xDC68, + 36520 - 11905: 0xDC69, + 36521 - 11905: 0xDC6A, + 36522 - 11905: 0xDC6B, + 36523 - 11905: 0xC9ED, + 36524 - 11905: 0xB9AA, + 36525 - 11905: 0xDC6C, + 36526 - 11905: 0xDC6D, + 36527 - 11905: 0xC7FB, + 36528 - 11905: 0xDC6E, + 36529 - 11905: 0xDC6F, + 36530 - 11905: 0xB6E3, + 36531 - 11905: 0xDC70, + 36532 - 11905: 0xDC71, + 36533 - 11905: 0xDC72, + 36534 - 11905: 0xDC73, + 36535 - 11905: 0xDC74, + 36536 - 11905: 0xDC75, + 36537 - 11905: 0xDC76, + 36538 - 11905: 0xCCC9, + 36539 - 11905: 0xDC77, + 36540 - 11905: 0xDC78, + 36541 - 11905: 0xDC79, + 36542 - 11905: 0xDC7A, + 36543 - 11905: 0xDC7B, + 36544 - 11905: 0xDC7C, + 36545 - 11905: 0xDC7D, + 36546 - 11905: 0xDC7E, + 36547 - 11905: 0xDC80, + 36548 - 11905: 0xDC81, + 36549 - 11905: 0xDC82, + 36550 - 11905: 0xDC83, + 36551 - 11905: 0xDC84, + 36552 - 11905: 0xDC85, + 36553 - 11905: 0xDC86, + 36554 - 11905: 0xDC87, + 36555 - 11905: 0xDC88, + 36556 - 11905: 0xDC89, + 36557 - 11905: 0xDC8A, + 36558 - 11905: 0xEAA6, + 36559 - 11905: 0xDC8B, + 36560 - 11905: 0xDC8C, + 36561 - 11905: 0xDC8D, + 36562 - 11905: 0xDC8E, + 36563 - 11905: 0xDC8F, + 36564 - 11905: 0xDC90, + 36565 - 11905: 0xDC91, + 36566 - 11905: 0xDC92, + 36567 - 11905: 0xDC93, + 36568 - 11905: 0xDC94, + 36569 - 11905: 0xDC95, + 36570 - 11905: 0xDC96, + 36571 - 11905: 0xDC97, + 36572 - 11905: 0xDC98, + 36573 - 11905: 0xDC99, + 36574 - 11905: 0xDC9A, + 36575 - 11905: 0xDC9B, + 36576 - 11905: 0xDC9C, + 36577 - 11905: 0xDC9D, + 36578 - 11905: 0xDC9E, + 36579 - 11905: 0xDC9F, + 36580 - 11905: 0xDCA0, + 36581 - 11905: 0xDD40, + 36582 - 11905: 0xDD41, + 36583 - 11905: 0xDD42, + 36584 - 11905: 0xDD43, + 36585 - 11905: 0xDD44, + 36586 - 11905: 0xDD45, + 36587 - 11905: 0xDD46, + 36588 - 11905: 0xDD47, + 36589 - 11905: 0xDD48, + 36590 - 11905: 0xDD49, + 36591 - 11905: 0xDD4A, + 36592 - 11905: 0xDD4B, + 36593 - 11905: 0xDD4C, + 36594 - 11905: 0xDD4D, + 36595 - 11905: 0xDD4E, + 36596 - 11905: 0xDD4F, + 36597 - 11905: 0xDD50, + 36598 - 11905: 0xDD51, + 36599 - 11905: 0xDD52, + 36600 - 11905: 0xDD53, + 36601 - 11905: 0xDD54, + 36602 - 11905: 0xDD55, + 36603 - 11905: 0xDD56, + 36604 - 11905: 0xDD57, + 36605 - 11905: 0xDD58, + 36606 - 11905: 0xDD59, + 36607 - 11905: 0xDD5A, + 36608 - 11905: 0xDD5B, + 36609 - 11905: 0xDD5C, + 36610 - 11905: 0xDD5D, + 36611 - 11905: 0xDD5E, + 36612 - 11905: 0xDD5F, + 36613 - 11905: 0xDD60, + 36614 - 11905: 0xDD61, + 36615 - 11905: 0xDD62, + 36616 - 11905: 0xDD63, + 36617 - 11905: 0xDD64, + 36618 - 11905: 0xDD65, + 36619 - 11905: 0xDD66, + 36620 - 11905: 0xDD67, + 36621 - 11905: 0xDD68, + 36622 - 11905: 0xDD69, + 36623 - 11905: 0xDD6A, + 36624 - 11905: 0xDD6B, + 36625 - 11905: 0xDD6C, + 36626 - 11905: 0xDD6D, + 36627 - 11905: 0xDD6E, + 36628 - 11905: 0xDD6F, + 36629 - 11905: 0xDD70, + 36630 - 11905: 0xDD71, + 36631 - 11905: 0xDD72, + 36632 - 11905: 0xDD73, + 36633 - 11905: 0xDD74, + 36634 - 11905: 0xDD75, + 36635 - 11905: 0xDD76, + 36636 - 11905: 0xDD77, + 36637 - 11905: 0xDD78, + 36638 - 11905: 0xDD79, + 36639 - 11905: 0xDD7A, + 36640 - 11905: 0xDD7B, + 36641 - 11905: 0xDD7C, + 36642 - 11905: 0xDD7D, + 36643 - 11905: 0xDD7E, + 36644 - 11905: 0xDD80, + 36645 - 11905: 0xDD81, + 36646 - 11905: 0xDD82, + 36647 - 11905: 0xDD83, + 36648 - 11905: 0xDD84, + 36649 - 11905: 0xDD85, + 36650 - 11905: 0xDD86, + 36651 - 11905: 0xDD87, + 36652 - 11905: 0xDD88, + 36653 - 11905: 0xDD89, + 36654 - 11905: 0xDD8A, + 36655 - 11905: 0xDD8B, + 36656 - 11905: 0xDD8C, + 36657 - 11905: 0xDD8D, + 36658 - 11905: 0xDD8E, + 36659 - 11905: 0xDD8F, + 36660 - 11905: 0xDD90, + 36661 - 11905: 0xDD91, + 36662 - 11905: 0xDD92, + 36663 - 11905: 0xDD93, + 36664 - 11905: 0xDD94, + 36665 - 11905: 0xDD95, + 36666 - 11905: 0xDD96, + 36667 - 11905: 0xDD97, + 36668 - 11905: 0xDD98, + 36669 - 11905: 0xDD99, + 36670 - 11905: 0xDD9A, + 36671 - 11905: 0xDD9B, + 36672 - 11905: 0xDD9C, + 36673 - 11905: 0xDD9D, + 36674 - 11905: 0xDD9E, + 36675 - 11905: 0xDD9F, + 36676 - 11905: 0xDDA0, + 36677 - 11905: 0xDE40, + 36678 - 11905: 0xDE41, + 36679 - 11905: 0xDE42, + 36680 - 11905: 0xDE43, + 36681 - 11905: 0xDE44, + 36682 - 11905: 0xDE45, + 36683 - 11905: 0xDE46, + 36684 - 11905: 0xDE47, + 36685 - 11905: 0xDE48, + 36686 - 11905: 0xDE49, + 36687 - 11905: 0xDE4A, + 36688 - 11905: 0xDE4B, + 36689 - 11905: 0xDE4C, + 36690 - 11905: 0xDE4D, + 36691 - 11905: 0xDE4E, + 36692 - 11905: 0xDE4F, + 36693 - 11905: 0xDE50, + 36694 - 11905: 0xDE51, + 36695 - 11905: 0xDE52, + 36696 - 11905: 0xDE53, + 36697 - 11905: 0xDE54, + 36698 - 11905: 0xDE55, + 36699 - 11905: 0xDE56, + 36700 - 11905: 0xDE57, + 36701 - 11905: 0xDE58, + 36702 - 11905: 0xDE59, + 36703 - 11905: 0xDE5A, + 36704 - 11905: 0xDE5B, + 36705 - 11905: 0xDE5C, + 36706 - 11905: 0xDE5D, + 36707 - 11905: 0xDE5E, + 36708 - 11905: 0xDE5F, + 36709 - 11905: 0xDE60, + 36710 - 11905: 0xB3B5, + 36711 - 11905: 0xD4FE, + 36712 - 11905: 0xB9EC, + 36713 - 11905: 0xD0F9, + 36714 - 11905: 0xDE61, + 36715 - 11905: 0xE9ED, + 36716 - 11905: 0xD7AA, + 36717 - 11905: 0xE9EE, + 36718 - 11905: 0xC2D6, + 36719 - 11905: 0xC8ED, + 36720 - 11905: 0xBAE4, + 36721 - 11905: 0xE9EF, + 36722 - 11905: 0xE9F0, + 36723 - 11905: 0xE9F1, + 36724 - 11905: 0xD6E1, + 36725 - 11905: 0xE9F2, + 36726 - 11905: 0xE9F3, + 36727 - 11905: 0xE9F5, + 36728 - 11905: 0xE9F4, + 36729 - 11905: 0xE9F6, + 36730 - 11905: 0xE9F7, + 36731 - 11905: 0xC7E1, + 36732 - 11905: 0xE9F8, + 36733 - 11905: 0xD4D8, + 36734 - 11905: 0xE9F9, + 36735 - 11905: 0xBDCE, + 36736 - 11905: 0xDE62, + 36737 - 11905: 0xE9FA, + 36738 - 11905: 0xE9FB, + 36739 - 11905: 0xBDCF, + 36740 - 11905: 0xE9FC, + 36741 - 11905: 0xB8A8, + 36742 - 11905: 0xC1BE, + 36743 - 11905: 0xE9FD, + 36744 - 11905: 0xB1B2, + 36745 - 11905: 0xBBD4, + 36746 - 11905: 0xB9F5, + 36747 - 11905: 0xE9FE, + 36748 - 11905: 0xDE63, + 36749 - 11905: 0xEAA1, + 36750 - 11905: 0xEAA2, + 36751 - 11905: 0xEAA3, + 36752 - 11905: 0xB7F8, + 36753 - 11905: 0xBCAD, + 36754 - 11905: 0xDE64, + 36755 - 11905: 0xCAE4, + 36756 - 11905: 0xE0CE, + 36757 - 11905: 0xD4AF, + 36758 - 11905: 0xCFBD, + 36759 - 11905: 0xD5B7, + 36760 - 11905: 0xEAA4, + 36761 - 11905: 0xD5DE, + 36762 - 11905: 0xEAA5, + 36763 - 11905: 0xD0C1, + 36764 - 11905: 0xB9BC, + 36765 - 11905: 0xDE65, + 36766 - 11905: 0xB4C7, + 36767 - 11905: 0xB1D9, + 36768 - 11905: 0xDE66, + 36769 - 11905: 0xDE67, + 36770 - 11905: 0xDE68, + 36771 - 11905: 0xC0B1, + 36772 - 11905: 0xDE69, + 36773 - 11905: 0xDE6A, + 36774 - 11905: 0xDE6B, + 36775 - 11905: 0xDE6C, + 36776 - 11905: 0xB1E6, + 36777 - 11905: 0xB1E7, + 36778 - 11905: 0xDE6D, + 36779 - 11905: 0xB1E8, + 36780 - 11905: 0xDE6E, + 36781 - 11905: 0xDE6F, + 36782 - 11905: 0xDE70, + 36783 - 11905: 0xDE71, + 36784 - 11905: 0xB3BD, + 36785 - 11905: 0xC8E8, + 36786 - 11905: 0xDE72, + 36787 - 11905: 0xDE73, + 36788 - 11905: 0xDE74, + 36789 - 11905: 0xDE75, + 36790 - 11905: 0xE5C1, + 36791 - 11905: 0xDE76, + 36792 - 11905: 0xDE77, + 36793 - 11905: 0xB1DF, + 36794 - 11905: 0xDE78, + 36795 - 11905: 0xDE79, + 36796 - 11905: 0xDE7A, + 36797 - 11905: 0xC1C9, + 36798 - 11905: 0xB4EF, + 36799 - 11905: 0xDE7B, + 36800 - 11905: 0xDE7C, + 36801 - 11905: 0xC7A8, + 36802 - 11905: 0xD3D8, + 36803 - 11905: 0xDE7D, + 36804 - 11905: 0xC6F9, + 36805 - 11905: 0xD1B8, + 36806 - 11905: 0xDE7E, + 36807 - 11905: 0xB9FD, + 36808 - 11905: 0xC2F5, + 36809 - 11905: 0xDE80, + 36810 - 11905: 0xDE81, + 36811 - 11905: 0xDE82, + 36812 - 11905: 0xDE83, + 36813 - 11905: 0xDE84, + 36814 - 11905: 0xD3AD, + 36815 - 11905: 0xDE85, + 36816 - 11905: 0xD4CB, + 36817 - 11905: 0xBDFC, + 36818 - 11905: 0xDE86, + 36819 - 11905: 0xE5C2, + 36820 - 11905: 0xB7B5, + 36821 - 11905: 0xE5C3, + 36822 - 11905: 0xDE87, + 36823 - 11905: 0xDE88, + 36824 - 11905: 0xBBB9, + 36825 - 11905: 0xD5E2, + 36826 - 11905: 0xDE89, + 36827 - 11905: 0xBDF8, + 36828 - 11905: 0xD4B6, + 36829 - 11905: 0xCEA5, + 36830 - 11905: 0xC1AC, + 36831 - 11905: 0xB3D9, + 36832 - 11905: 0xDE8A, + 36833 - 11905: 0xDE8B, + 36834 - 11905: 0xCCF6, + 36835 - 11905: 0xDE8C, + 36836 - 11905: 0xE5C6, + 36837 - 11905: 0xE5C4, + 36838 - 11905: 0xE5C8, + 36839 - 11905: 0xDE8D, + 36840 - 11905: 0xE5CA, + 36841 - 11905: 0xE5C7, + 36842 - 11905: 0xB5CF, + 36843 - 11905: 0xC6C8, + 36844 - 11905: 0xDE8E, + 36845 - 11905: 0xB5FC, + 36846 - 11905: 0xE5C5, + 36847 - 11905: 0xDE8F, + 36848 - 11905: 0xCAF6, + 36849 - 11905: 0xDE90, + 36850 - 11905: 0xDE91, + 36851 - 11905: 0xE5C9, + 36852 - 11905: 0xDE92, + 36853 - 11905: 0xDE93, + 36854 - 11905: 0xDE94, + 36855 - 11905: 0xC3D4, + 36856 - 11905: 0xB1C5, + 36857 - 11905: 0xBCA3, + 36858 - 11905: 0xDE95, + 36859 - 11905: 0xDE96, + 36860 - 11905: 0xDE97, + 36861 - 11905: 0xD7B7, + 36862 - 11905: 0xDE98, + 36863 - 11905: 0xDE99, + 36864 - 11905: 0xCDCB, + 36865 - 11905: 0xCBCD, + 36866 - 11905: 0xCACA, + 36867 - 11905: 0xCCD3, + 36868 - 11905: 0xE5CC, + 36869 - 11905: 0xE5CB, + 36870 - 11905: 0xC4E6, + 36871 - 11905: 0xDE9A, + 36872 - 11905: 0xDE9B, + 36873 - 11905: 0xD1A1, + 36874 - 11905: 0xD1B7, + 36875 - 11905: 0xE5CD, + 36876 - 11905: 0xDE9C, + 36877 - 11905: 0xE5D0, + 36878 - 11905: 0xDE9D, + 36879 - 11905: 0xCDB8, + 36880 - 11905: 0xD6F0, + 36881 - 11905: 0xE5CF, + 36882 - 11905: 0xB5DD, + 36883 - 11905: 0xDE9E, + 36884 - 11905: 0xCDBE, + 36885 - 11905: 0xDE9F, + 36886 - 11905: 0xE5D1, + 36887 - 11905: 0xB6BA, + 36888 - 11905: 0xDEA0, + 36889 - 11905: 0xDF40, + 36890 - 11905: 0xCDA8, + 36891 - 11905: 0xB9E4, + 36892 - 11905: 0xDF41, + 36893 - 11905: 0xCAC5, + 36894 - 11905: 0xB3D1, + 36895 - 11905: 0xCBD9, + 36896 - 11905: 0xD4EC, + 36897 - 11905: 0xE5D2, + 36898 - 11905: 0xB7EA, + 36899 - 11905: 0xDF42, + 36900 - 11905: 0xDF43, + 36901 - 11905: 0xDF44, + 36902 - 11905: 0xE5CE, + 36903 - 11905: 0xDF45, + 36904 - 11905: 0xDF46, + 36905 - 11905: 0xDF47, + 36906 - 11905: 0xDF48, + 36907 - 11905: 0xDF49, + 36908 - 11905: 0xDF4A, + 36909 - 11905: 0xE5D5, + 36910 - 11905: 0xB4FE, + 36911 - 11905: 0xE5D6, + 36912 - 11905: 0xDF4B, + 36913 - 11905: 0xDF4C, + 36914 - 11905: 0xDF4D, + 36915 - 11905: 0xDF4E, + 36916 - 11905: 0xDF4F, + 36917 - 11905: 0xE5D3, + 36918 - 11905: 0xE5D4, + 36919 - 11905: 0xDF50, + 36920 - 11905: 0xD2DD, + 36921 - 11905: 0xDF51, + 36922 - 11905: 0xDF52, + 36923 - 11905: 0xC2DF, + 36924 - 11905: 0xB1C6, + 36925 - 11905: 0xDF53, + 36926 - 11905: 0xD3E2, + 36927 - 11905: 0xDF54, + 36928 - 11905: 0xDF55, + 36929 - 11905: 0xB6DD, + 36930 - 11905: 0xCBEC, + 36931 - 11905: 0xDF56, + 36932 - 11905: 0xE5D7, + 36933 - 11905: 0xDF57, + 36934 - 11905: 0xDF58, + 36935 - 11905: 0xD3F6, + 36936 - 11905: 0xDF59, + 36937 - 11905: 0xDF5A, + 36938 - 11905: 0xDF5B, + 36939 - 11905: 0xDF5C, + 36940 - 11905: 0xDF5D, + 36941 - 11905: 0xB1E9, + 36942 - 11905: 0xDF5E, + 36943 - 11905: 0xB6F4, + 36944 - 11905: 0xE5DA, + 36945 - 11905: 0xE5D8, + 36946 - 11905: 0xE5D9, + 36947 - 11905: 0xB5C0, + 36948 - 11905: 0xDF5F, + 36949 - 11905: 0xDF60, + 36950 - 11905: 0xDF61, + 36951 - 11905: 0xD2C5, + 36952 - 11905: 0xE5DC, + 36953 - 11905: 0xDF62, + 36954 - 11905: 0xDF63, + 36955 - 11905: 0xE5DE, + 36956 - 11905: 0xDF64, + 36957 - 11905: 0xDF65, + 36958 - 11905: 0xDF66, + 36959 - 11905: 0xDF67, + 36960 - 11905: 0xDF68, + 36961 - 11905: 0xDF69, + 36962 - 11905: 0xE5DD, + 36963 - 11905: 0xC7B2, + 36964 - 11905: 0xDF6A, + 36965 - 11905: 0xD2A3, + 36966 - 11905: 0xDF6B, + 36967 - 11905: 0xDF6C, + 36968 - 11905: 0xE5DB, + 36969 - 11905: 0xDF6D, + 36970 - 11905: 0xDF6E, + 36971 - 11905: 0xDF6F, + 36972 - 11905: 0xDF70, + 36973 - 11905: 0xD4E2, + 36974 - 11905: 0xD5DA, + 36975 - 11905: 0xDF71, + 36976 - 11905: 0xDF72, + 36977 - 11905: 0xDF73, + 36978 - 11905: 0xDF74, + 36979 - 11905: 0xDF75, + 36980 - 11905: 0xE5E0, + 36981 - 11905: 0xD7F1, + 36982 - 11905: 0xDF76, + 36983 - 11905: 0xDF77, + 36984 - 11905: 0xDF78, + 36985 - 11905: 0xDF79, + 36986 - 11905: 0xDF7A, + 36987 - 11905: 0xDF7B, + 36988 - 11905: 0xDF7C, + 36989 - 11905: 0xE5E1, + 36990 - 11905: 0xDF7D, + 36991 - 11905: 0xB1DC, + 36992 - 11905: 0xD1FB, + 36993 - 11905: 0xDF7E, + 36994 - 11905: 0xE5E2, + 36995 - 11905: 0xE5E4, + 36996 - 11905: 0xDF80, + 36997 - 11905: 0xDF81, + 36998 - 11905: 0xDF82, + 36999 - 11905: 0xDF83, + 37000 - 11905: 0xE5E3, + 37001 - 11905: 0xDF84, + 37002 - 11905: 0xDF85, + 37003 - 11905: 0xE5E5, + 37004 - 11905: 0xDF86, + 37005 - 11905: 0xDF87, + 37006 - 11905: 0xDF88, + 37007 - 11905: 0xDF89, + 37008 - 11905: 0xDF8A, + 37009 - 11905: 0xD2D8, + 37010 - 11905: 0xDF8B, + 37011 - 11905: 0xB5CB, + 37012 - 11905: 0xDF8C, + 37013 - 11905: 0xE7DF, + 37014 - 11905: 0xDF8D, + 37015 - 11905: 0xDAF5, + 37016 - 11905: 0xDF8E, + 37017 - 11905: 0xDAF8, + 37018 - 11905: 0xDF8F, + 37019 - 11905: 0xDAF6, + 37020 - 11905: 0xDF90, + 37021 - 11905: 0xDAF7, + 37022 - 11905: 0xDF91, + 37023 - 11905: 0xDF92, + 37024 - 11905: 0xDF93, + 37025 - 11905: 0xDAFA, + 37026 - 11905: 0xD0CF, + 37027 - 11905: 0xC4C7, + 37028 - 11905: 0xDF94, + 37029 - 11905: 0xDF95, + 37030 - 11905: 0xB0EE, + 37031 - 11905: 0xDF96, + 37032 - 11905: 0xDF97, + 37033 - 11905: 0xDF98, + 37034 - 11905: 0xD0B0, + 37035 - 11905: 0xDF99, + 37036 - 11905: 0xDAF9, + 37037 - 11905: 0xDF9A, + 37038 - 11905: 0xD3CA, + 37039 - 11905: 0xBAAA, + 37040 - 11905: 0xDBA2, + 37041 - 11905: 0xC7F1, + 37042 - 11905: 0xDF9B, + 37043 - 11905: 0xDAFC, + 37044 - 11905: 0xDAFB, + 37045 - 11905: 0xC9DB, + 37046 - 11905: 0xDAFD, + 37047 - 11905: 0xDF9C, + 37048 - 11905: 0xDBA1, + 37049 - 11905: 0xD7DE, + 37050 - 11905: 0xDAFE, + 37051 - 11905: 0xC1DA, + 37052 - 11905: 0xDF9D, + 37053 - 11905: 0xDF9E, + 37054 - 11905: 0xDBA5, + 37055 - 11905: 0xDF9F, + 37056 - 11905: 0xDFA0, + 37057 - 11905: 0xD3F4, + 37058 - 11905: 0xE040, + 37059 - 11905: 0xE041, + 37060 - 11905: 0xDBA7, + 37061 - 11905: 0xDBA4, + 37062 - 11905: 0xE042, + 37063 - 11905: 0xDBA8, + 37064 - 11905: 0xE043, + 37065 - 11905: 0xE044, + 37066 - 11905: 0xBDBC, + 37067 - 11905: 0xE045, + 37068 - 11905: 0xE046, + 37069 - 11905: 0xE047, + 37070 - 11905: 0xC0C9, + 37071 - 11905: 0xDBA3, + 37072 - 11905: 0xDBA6, + 37073 - 11905: 0xD6A3, + 37074 - 11905: 0xE048, + 37075 - 11905: 0xDBA9, + 37076 - 11905: 0xE049, + 37077 - 11905: 0xE04A, + 37078 - 11905: 0xE04B, + 37079 - 11905: 0xDBAD, + 37080 - 11905: 0xE04C, + 37081 - 11905: 0xE04D, + 37082 - 11905: 0xE04E, + 37083 - 11905: 0xDBAE, + 37084 - 11905: 0xDBAC, + 37085 - 11905: 0xBAC2, + 37086 - 11905: 0xE04F, + 37087 - 11905: 0xE050, + 37088 - 11905: 0xE051, + 37089 - 11905: 0xBFA4, + 37090 - 11905: 0xDBAB, + 37091 - 11905: 0xE052, + 37092 - 11905: 0xE053, + 37093 - 11905: 0xE054, + 37094 - 11905: 0xDBAA, + 37095 - 11905: 0xD4C7, + 37096 - 11905: 0xB2BF, + 37097 - 11905: 0xE055, + 37098 - 11905: 0xE056, + 37099 - 11905: 0xDBAF, + 37100 - 11905: 0xE057, + 37101 - 11905: 0xB9F9, + 37102 - 11905: 0xE058, + 37103 - 11905: 0xDBB0, + 37104 - 11905: 0xE059, + 37105 - 11905: 0xE05A, + 37106 - 11905: 0xE05B, + 37107 - 11905: 0xE05C, + 37108 - 11905: 0xB3BB, + 37109 - 11905: 0xE05D, + 37110 - 11905: 0xE05E, + 37111 - 11905: 0xE05F, + 37112 - 11905: 0xB5A6, + 37113 - 11905: 0xE060, + 37114 - 11905: 0xE061, + 37115 - 11905: 0xE062, + 37116 - 11905: 0xE063, + 37117 - 11905: 0xB6BC, + 37118 - 11905: 0xDBB1, + 37119 - 11905: 0xE064, + 37120 - 11905: 0xE065, + 37121 - 11905: 0xE066, + 37122 - 11905: 0xB6F5, + 37123 - 11905: 0xE067, + 37124 - 11905: 0xDBB2, + 37125 - 11905: 0xE068, + 37126 - 11905: 0xE069, + 37127 - 11905: 0xE06A, + 37128 - 11905: 0xE06B, + 37129 - 11905: 0xE06C, + 37130 - 11905: 0xE06D, + 37131 - 11905: 0xE06E, + 37132 - 11905: 0xE06F, + 37133 - 11905: 0xE070, + 37134 - 11905: 0xE071, + 37135 - 11905: 0xE072, + 37136 - 11905: 0xE073, + 37137 - 11905: 0xE074, + 37138 - 11905: 0xE075, + 37139 - 11905: 0xE076, + 37140 - 11905: 0xE077, + 37141 - 11905: 0xE078, + 37142 - 11905: 0xE079, + 37143 - 11905: 0xE07A, + 37144 - 11905: 0xE07B, + 37145 - 11905: 0xB1C9, + 37146 - 11905: 0xE07C, + 37147 - 11905: 0xE07D, + 37148 - 11905: 0xE07E, + 37149 - 11905: 0xE080, + 37150 - 11905: 0xDBB4, + 37151 - 11905: 0xE081, + 37152 - 11905: 0xE082, + 37153 - 11905: 0xE083, + 37154 - 11905: 0xDBB3, + 37155 - 11905: 0xDBB5, + 37156 - 11905: 0xE084, + 37157 - 11905: 0xE085, + 37158 - 11905: 0xE086, + 37159 - 11905: 0xE087, + 37160 - 11905: 0xE088, + 37161 - 11905: 0xE089, + 37162 - 11905: 0xE08A, + 37163 - 11905: 0xE08B, + 37164 - 11905: 0xE08C, + 37165 - 11905: 0xE08D, + 37166 - 11905: 0xE08E, + 37167 - 11905: 0xDBB7, + 37168 - 11905: 0xE08F, + 37169 - 11905: 0xDBB6, + 37170 - 11905: 0xE090, + 37171 - 11905: 0xE091, + 37172 - 11905: 0xE092, + 37173 - 11905: 0xE093, + 37174 - 11905: 0xE094, + 37175 - 11905: 0xE095, + 37176 - 11905: 0xE096, + 37177 - 11905: 0xDBB8, + 37178 - 11905: 0xE097, + 37179 - 11905: 0xE098, + 37180 - 11905: 0xE099, + 37181 - 11905: 0xE09A, + 37182 - 11905: 0xE09B, + 37183 - 11905: 0xE09C, + 37184 - 11905: 0xE09D, + 37185 - 11905: 0xE09E, + 37186 - 11905: 0xE09F, + 37187 - 11905: 0xDBB9, + 37188 - 11905: 0xE0A0, + 37189 - 11905: 0xE140, + 37190 - 11905: 0xDBBA, + 37191 - 11905: 0xE141, + 37192 - 11905: 0xE142, + 37193 - 11905: 0xD3CF, + 37194 - 11905: 0xF4FA, + 37195 - 11905: 0xC7F5, + 37196 - 11905: 0xD7C3, + 37197 - 11905: 0xC5E4, + 37198 - 11905: 0xF4FC, + 37199 - 11905: 0xF4FD, + 37200 - 11905: 0xF4FB, + 37201 - 11905: 0xE143, + 37202 - 11905: 0xBEC6, + 37203 - 11905: 0xE144, + 37204 - 11905: 0xE145, + 37205 - 11905: 0xE146, + 37206 - 11905: 0xE147, + 37207 - 11905: 0xD0EF, + 37208 - 11905: 0xE148, + 37209 - 11905: 0xE149, + 37210 - 11905: 0xB7D3, + 37211 - 11905: 0xE14A, + 37212 - 11905: 0xE14B, + 37213 - 11905: 0xD4CD, + 37214 - 11905: 0xCCAA, + 37215 - 11905: 0xE14C, + 37216 - 11905: 0xE14D, + 37217 - 11905: 0xF5A2, + 37218 - 11905: 0xF5A1, + 37219 - 11905: 0xBAA8, + 37220 - 11905: 0xF4FE, + 37221 - 11905: 0xCBD6, + 37222 - 11905: 0xE14E, + 37223 - 11905: 0xE14F, + 37224 - 11905: 0xE150, + 37225 - 11905: 0xF5A4, + 37226 - 11905: 0xC0D2, + 37227 - 11905: 0xE151, + 37228 - 11905: 0xB3EA, + 37229 - 11905: 0xE152, + 37230 - 11905: 0xCDAA, + 37231 - 11905: 0xF5A5, + 37232 - 11905: 0xF5A3, + 37233 - 11905: 0xBDB4, + 37234 - 11905: 0xF5A8, + 37235 - 11905: 0xE153, + 37236 - 11905: 0xF5A9, + 37237 - 11905: 0xBDCD, + 37238 - 11905: 0xC3B8, + 37239 - 11905: 0xBFE1, + 37240 - 11905: 0xCBE1, + 37241 - 11905: 0xF5AA, + 37242 - 11905: 0xE154, + 37243 - 11905: 0xE155, + 37244 - 11905: 0xE156, + 37245 - 11905: 0xF5A6, + 37246 - 11905: 0xF5A7, + 37247 - 11905: 0xC4F0, + 37248 - 11905: 0xE157, + 37249 - 11905: 0xE158, + 37250 - 11905: 0xE159, + 37251 - 11905: 0xE15A, + 37252 - 11905: 0xE15B, + 37253 - 11905: 0xF5AC, + 37254 - 11905: 0xE15C, + 37255 - 11905: 0xB4BC, + 37256 - 11905: 0xE15D, + 37257 - 11905: 0xD7ED, + 37258 - 11905: 0xE15E, + 37259 - 11905: 0xB4D7, + 37260 - 11905: 0xF5AB, + 37261 - 11905: 0xF5AE, + 37262 - 11905: 0xE15F, + 37263 - 11905: 0xE160, + 37264 - 11905: 0xF5AD, + 37265 - 11905: 0xF5AF, + 37266 - 11905: 0xD0D1, + 37267 - 11905: 0xE161, + 37268 - 11905: 0xE162, + 37269 - 11905: 0xE163, + 37270 - 11905: 0xE164, + 37271 - 11905: 0xE165, + 37272 - 11905: 0xE166, + 37273 - 11905: 0xE167, + 37274 - 11905: 0xC3D1, + 37275 - 11905: 0xC8A9, + 37276 - 11905: 0xE168, + 37277 - 11905: 0xE169, + 37278 - 11905: 0xE16A, + 37279 - 11905: 0xE16B, + 37280 - 11905: 0xE16C, + 37281 - 11905: 0xE16D, + 37282 - 11905: 0xF5B0, + 37283 - 11905: 0xF5B1, + 37284 - 11905: 0xE16E, + 37285 - 11905: 0xE16F, + 37286 - 11905: 0xE170, + 37287 - 11905: 0xE171, + 37288 - 11905: 0xE172, + 37289 - 11905: 0xE173, + 37290 - 11905: 0xF5B2, + 37291 - 11905: 0xE174, + 37292 - 11905: 0xE175, + 37293 - 11905: 0xF5B3, + 37294 - 11905: 0xF5B4, + 37295 - 11905: 0xF5B5, + 37296 - 11905: 0xE176, + 37297 - 11905: 0xE177, + 37298 - 11905: 0xE178, + 37299 - 11905: 0xE179, + 37300 - 11905: 0xF5B7, + 37301 - 11905: 0xF5B6, + 37302 - 11905: 0xE17A, + 37303 - 11905: 0xE17B, + 37304 - 11905: 0xE17C, + 37305 - 11905: 0xE17D, + 37306 - 11905: 0xF5B8, + 37307 - 11905: 0xE17E, + 37308 - 11905: 0xE180, + 37309 - 11905: 0xE181, + 37310 - 11905: 0xE182, + 37311 - 11905: 0xE183, + 37312 - 11905: 0xE184, + 37313 - 11905: 0xE185, + 37314 - 11905: 0xE186, + 37315 - 11905: 0xE187, + 37316 - 11905: 0xE188, + 37317 - 11905: 0xE189, + 37318 - 11905: 0xE18A, + 37319 - 11905: 0xB2C9, + 37320 - 11905: 0xE18B, + 37321 - 11905: 0xD3D4, + 37322 - 11905: 0xCACD, + 37323 - 11905: 0xE18C, + 37324 - 11905: 0xC0EF, + 37325 - 11905: 0xD6D8, + 37326 - 11905: 0xD2B0, + 37327 - 11905: 0xC1BF, + 37328 - 11905: 0xE18D, + 37329 - 11905: 0xBDF0, + 37330 - 11905: 0xE18E, + 37331 - 11905: 0xE18F, + 37332 - 11905: 0xE190, + 37333 - 11905: 0xE191, + 37334 - 11905: 0xE192, + 37335 - 11905: 0xE193, + 37336 - 11905: 0xE194, + 37337 - 11905: 0xE195, + 37338 - 11905: 0xE196, + 37339 - 11905: 0xE197, + 37340 - 11905: 0xB8AA, + 37341 - 11905: 0xE198, + 37342 - 11905: 0xE199, + 37343 - 11905: 0xE19A, + 37344 - 11905: 0xE19B, + 37345 - 11905: 0xE19C, + 37346 - 11905: 0xE19D, + 37347 - 11905: 0xE19E, + 37348 - 11905: 0xE19F, + 37349 - 11905: 0xE1A0, + 37350 - 11905: 0xE240, + 37351 - 11905: 0xE241, + 37352 - 11905: 0xE242, + 37353 - 11905: 0xE243, + 37354 - 11905: 0xE244, + 37355 - 11905: 0xE245, + 37356 - 11905: 0xE246, + 37357 - 11905: 0xE247, + 37358 - 11905: 0xE248, + 37359 - 11905: 0xE249, + 37360 - 11905: 0xE24A, + 37361 - 11905: 0xE24B, + 37362 - 11905: 0xE24C, + 37363 - 11905: 0xE24D, + 37364 - 11905: 0xE24E, + 37365 - 11905: 0xE24F, + 37366 - 11905: 0xE250, + 37367 - 11905: 0xE251, + 37368 - 11905: 0xE252, + 37369 - 11905: 0xE253, + 37370 - 11905: 0xE254, + 37371 - 11905: 0xE255, + 37372 - 11905: 0xE256, + 37373 - 11905: 0xE257, + 37374 - 11905: 0xE258, + 37375 - 11905: 0xE259, + 37376 - 11905: 0xE25A, + 37377 - 11905: 0xE25B, + 37378 - 11905: 0xE25C, + 37379 - 11905: 0xE25D, + 37380 - 11905: 0xE25E, + 37381 - 11905: 0xE25F, + 37382 - 11905: 0xE260, + 37383 - 11905: 0xE261, + 37384 - 11905: 0xE262, + 37385 - 11905: 0xE263, + 37386 - 11905: 0xE264, + 37387 - 11905: 0xE265, + 37388 - 11905: 0xE266, + 37389 - 11905: 0xE267, + 37390 - 11905: 0xE268, + 37391 - 11905: 0xE269, + 37392 - 11905: 0xE26A, + 37393 - 11905: 0xE26B, + 37394 - 11905: 0xE26C, + 37395 - 11905: 0xE26D, + 37396 - 11905: 0xE26E, + 37397 - 11905: 0xE26F, + 37398 - 11905: 0xE270, + 37399 - 11905: 0xE271, + 37400 - 11905: 0xE272, + 37401 - 11905: 0xE273, + 37402 - 11905: 0xE274, + 37403 - 11905: 0xE275, + 37404 - 11905: 0xE276, + 37405 - 11905: 0xE277, + 37406 - 11905: 0xE278, + 37407 - 11905: 0xE279, + 37408 - 11905: 0xE27A, + 37409 - 11905: 0xE27B, + 37410 - 11905: 0xE27C, + 37411 - 11905: 0xE27D, + 37412 - 11905: 0xE27E, + 37413 - 11905: 0xE280, + 37414 - 11905: 0xE281, + 37415 - 11905: 0xE282, + 37416 - 11905: 0xE283, + 37417 - 11905: 0xE284, + 37418 - 11905: 0xE285, + 37419 - 11905: 0xE286, + 37420 - 11905: 0xE287, + 37421 - 11905: 0xE288, + 37422 - 11905: 0xE289, + 37423 - 11905: 0xE28A, + 37424 - 11905: 0xE28B, + 37425 - 11905: 0xE28C, + 37426 - 11905: 0xE28D, + 37427 - 11905: 0xE28E, + 37428 - 11905: 0xE28F, + 37429 - 11905: 0xE290, + 37430 - 11905: 0xE291, + 37431 - 11905: 0xE292, + 37432 - 11905: 0xE293, + 37433 - 11905: 0xE294, + 37434 - 11905: 0xE295, + 37435 - 11905: 0xE296, + 37436 - 11905: 0xE297, + 37437 - 11905: 0xE298, + 37438 - 11905: 0xE299, + 37439 - 11905: 0xE29A, + 37440 - 11905: 0xE29B, + 37441 - 11905: 0xE29C, + 37442 - 11905: 0xE29D, + 37443 - 11905: 0xE29E, + 37444 - 11905: 0xE29F, + 37445 - 11905: 0xE2A0, + 37446 - 11905: 0xE340, + 37447 - 11905: 0xE341, + 37448 - 11905: 0xE342, + 37449 - 11905: 0xE343, + 37450 - 11905: 0xE344, + 37451 - 11905: 0xE345, + 37452 - 11905: 0xE346, + 37453 - 11905: 0xE347, + 37454 - 11905: 0xE348, + 37455 - 11905: 0xE349, + 37456 - 11905: 0xE34A, + 37457 - 11905: 0xE34B, + 37458 - 11905: 0xE34C, + 37459 - 11905: 0xE34D, + 37460 - 11905: 0xE34E, + 37461 - 11905: 0xE34F, + 37462 - 11905: 0xE350, + 37463 - 11905: 0xE351, + 37464 - 11905: 0xE352, + 37465 - 11905: 0xE353, + 37466 - 11905: 0xE354, + 37467 - 11905: 0xE355, + 37468 - 11905: 0xE356, + 37469 - 11905: 0xE357, + 37470 - 11905: 0xE358, + 37471 - 11905: 0xE359, + 37472 - 11905: 0xE35A, + 37473 - 11905: 0xE35B, + 37474 - 11905: 0xE35C, + 37475 - 11905: 0xE35D, + 37476 - 11905: 0xE35E, + 37477 - 11905: 0xE35F, + 37478 - 11905: 0xE360, + 37479 - 11905: 0xE361, + 37480 - 11905: 0xE362, + 37481 - 11905: 0xE363, + 37482 - 11905: 0xE364, + 37483 - 11905: 0xE365, + 37484 - 11905: 0xE366, + 37485 - 11905: 0xE367, + 37486 - 11905: 0xE368, + 37487 - 11905: 0xE369, + 37488 - 11905: 0xE36A, + 37489 - 11905: 0xE36B, + 37490 - 11905: 0xE36C, + 37491 - 11905: 0xE36D, + 37492 - 11905: 0xBCF8, + 37493 - 11905: 0xE36E, + 37494 - 11905: 0xE36F, + 37495 - 11905: 0xE370, + 37496 - 11905: 0xE371, + 37497 - 11905: 0xE372, + 37498 - 11905: 0xE373, + 37499 - 11905: 0xE374, + 37500 - 11905: 0xE375, + 37501 - 11905: 0xE376, + 37502 - 11905: 0xE377, + 37503 - 11905: 0xE378, + 37504 - 11905: 0xE379, + 37505 - 11905: 0xE37A, + 37506 - 11905: 0xE37B, + 37507 - 11905: 0xE37C, + 37508 - 11905: 0xE37D, + 37509 - 11905: 0xE37E, + 37510 - 11905: 0xE380, + 37511 - 11905: 0xE381, + 37512 - 11905: 0xE382, + 37513 - 11905: 0xE383, + 37514 - 11905: 0xE384, + 37515 - 11905: 0xE385, + 37516 - 11905: 0xE386, + 37517 - 11905: 0xE387, + 37518 - 11905: 0xF6C6, + 37519 - 11905: 0xE388, + 37520 - 11905: 0xE389, + 37521 - 11905: 0xE38A, + 37522 - 11905: 0xE38B, + 37523 - 11905: 0xE38C, + 37524 - 11905: 0xE38D, + 37525 - 11905: 0xE38E, + 37526 - 11905: 0xE38F, + 37527 - 11905: 0xE390, + 37528 - 11905: 0xE391, + 37529 - 11905: 0xE392, + 37530 - 11905: 0xE393, + 37531 - 11905: 0xE394, + 37532 - 11905: 0xE395, + 37533 - 11905: 0xE396, + 37534 - 11905: 0xE397, + 37535 - 11905: 0xE398, + 37536 - 11905: 0xE399, + 37537 - 11905: 0xE39A, + 37538 - 11905: 0xE39B, + 37539 - 11905: 0xE39C, + 37540 - 11905: 0xE39D, + 37541 - 11905: 0xE39E, + 37542 - 11905: 0xE39F, + 37543 - 11905: 0xE3A0, + 37544 - 11905: 0xE440, + 37545 - 11905: 0xE441, + 37546 - 11905: 0xE442, + 37547 - 11905: 0xE443, + 37548 - 11905: 0xE444, + 37549 - 11905: 0xE445, + 37550 - 11905: 0xF6C7, + 37551 - 11905: 0xE446, + 37552 - 11905: 0xE447, + 37553 - 11905: 0xE448, + 37554 - 11905: 0xE449, + 37555 - 11905: 0xE44A, + 37556 - 11905: 0xE44B, + 37557 - 11905: 0xE44C, + 37558 - 11905: 0xE44D, + 37559 - 11905: 0xE44E, + 37560 - 11905: 0xE44F, + 37561 - 11905: 0xE450, + 37562 - 11905: 0xE451, + 37563 - 11905: 0xE452, + 37564 - 11905: 0xE453, + 37565 - 11905: 0xE454, + 37566 - 11905: 0xE455, + 37567 - 11905: 0xE456, + 37568 - 11905: 0xE457, + 37569 - 11905: 0xE458, + 37570 - 11905: 0xE459, + 37571 - 11905: 0xE45A, + 37572 - 11905: 0xE45B, + 37573 - 11905: 0xE45C, + 37574 - 11905: 0xE45D, + 37575 - 11905: 0xE45E, + 37576 - 11905: 0xF6C8, + 37577 - 11905: 0xE45F, + 37578 - 11905: 0xE460, + 37579 - 11905: 0xE461, + 37580 - 11905: 0xE462, + 37581 - 11905: 0xE463, + 37582 - 11905: 0xE464, + 37583 - 11905: 0xE465, + 37584 - 11905: 0xE466, + 37585 - 11905: 0xE467, + 37586 - 11905: 0xE468, + 37587 - 11905: 0xE469, + 37588 - 11905: 0xE46A, + 37589 - 11905: 0xE46B, + 37590 - 11905: 0xE46C, + 37591 - 11905: 0xE46D, + 37592 - 11905: 0xE46E, + 37593 - 11905: 0xE46F, + 37594 - 11905: 0xE470, + 37595 - 11905: 0xE471, + 37596 - 11905: 0xE472, + 37597 - 11905: 0xE473, + 37598 - 11905: 0xE474, + 37599 - 11905: 0xE475, + 37600 - 11905: 0xE476, + 37601 - 11905: 0xE477, + 37602 - 11905: 0xE478, + 37603 - 11905: 0xE479, + 37604 - 11905: 0xE47A, + 37605 - 11905: 0xE47B, + 37606 - 11905: 0xE47C, + 37607 - 11905: 0xE47D, + 37608 - 11905: 0xE47E, + 37609 - 11905: 0xE480, + 37610 - 11905: 0xE481, + 37611 - 11905: 0xE482, + 37612 - 11905: 0xE483, + 37613 - 11905: 0xE484, + 37614 - 11905: 0xE485, + 37615 - 11905: 0xE486, + 37616 - 11905: 0xE487, + 37617 - 11905: 0xE488, + 37618 - 11905: 0xE489, + 37619 - 11905: 0xE48A, + 37620 - 11905: 0xE48B, + 37621 - 11905: 0xE48C, + 37622 - 11905: 0xE48D, + 37623 - 11905: 0xE48E, + 37624 - 11905: 0xE48F, + 37625 - 11905: 0xE490, + 37626 - 11905: 0xE491, + 37627 - 11905: 0xE492, + 37628 - 11905: 0xE493, + 37629 - 11905: 0xE494, + 37630 - 11905: 0xE495, + 37631 - 11905: 0xE496, + 37632 - 11905: 0xE497, + 37633 - 11905: 0xE498, + 37634 - 11905: 0xE499, + 37635 - 11905: 0xE49A, + 37636 - 11905: 0xE49B, + 37637 - 11905: 0xE49C, + 37638 - 11905: 0xE49D, + 37639 - 11905: 0xE49E, + 37640 - 11905: 0xE49F, + 37641 - 11905: 0xE4A0, + 37642 - 11905: 0xE540, + 37643 - 11905: 0xE541, + 37644 - 11905: 0xE542, + 37645 - 11905: 0xE543, + 37646 - 11905: 0xE544, + 37647 - 11905: 0xE545, + 37648 - 11905: 0xE546, + 37649 - 11905: 0xE547, + 37650 - 11905: 0xE548, + 37651 - 11905: 0xE549, + 37652 - 11905: 0xE54A, + 37653 - 11905: 0xE54B, + 37654 - 11905: 0xE54C, + 37655 - 11905: 0xE54D, + 37656 - 11905: 0xE54E, + 37657 - 11905: 0xE54F, + 37658 - 11905: 0xE550, + 37659 - 11905: 0xE551, + 37660 - 11905: 0xE552, + 37661 - 11905: 0xE553, + 37662 - 11905: 0xE554, + 37663 - 11905: 0xE555, + 37664 - 11905: 0xE556, + 37665 - 11905: 0xE557, + 37666 - 11905: 0xE558, + 37667 - 11905: 0xE559, + 37668 - 11905: 0xE55A, + 37669 - 11905: 0xE55B, + 37670 - 11905: 0xE55C, + 37671 - 11905: 0xE55D, + 37672 - 11905: 0xE55E, + 37673 - 11905: 0xE55F, + 37674 - 11905: 0xE560, + 37675 - 11905: 0xE561, + 37676 - 11905: 0xE562, + 37677 - 11905: 0xE563, + 37678 - 11905: 0xE564, + 37679 - 11905: 0xE565, + 37680 - 11905: 0xE566, + 37681 - 11905: 0xE567, + 37682 - 11905: 0xE568, + 37683 - 11905: 0xE569, + 37684 - 11905: 0xE56A, + 37685 - 11905: 0xE56B, + 37686 - 11905: 0xE56C, + 37687 - 11905: 0xE56D, + 37688 - 11905: 0xE56E, + 37689 - 11905: 0xE56F, + 37690 - 11905: 0xE570, + 37691 - 11905: 0xE571, + 37692 - 11905: 0xE572, + 37693 - 11905: 0xE573, + 37694 - 11905: 0xF6C9, + 37695 - 11905: 0xE574, + 37696 - 11905: 0xE575, + 37697 - 11905: 0xE576, + 37698 - 11905: 0xE577, + 37699 - 11905: 0xE578, + 37700 - 11905: 0xE579, + 37701 - 11905: 0xE57A, + 37702 - 11905: 0xE57B, + 37703 - 11905: 0xE57C, + 37704 - 11905: 0xE57D, + 37705 - 11905: 0xE57E, + 37706 - 11905: 0xE580, + 37707 - 11905: 0xE581, + 37708 - 11905: 0xE582, + 37709 - 11905: 0xE583, + 37710 - 11905: 0xE584, + 37711 - 11905: 0xE585, + 37712 - 11905: 0xE586, + 37713 - 11905: 0xE587, + 37714 - 11905: 0xE588, + 37715 - 11905: 0xE589, + 37716 - 11905: 0xE58A, + 37717 - 11905: 0xE58B, + 37718 - 11905: 0xE58C, + 37719 - 11905: 0xE58D, + 37720 - 11905: 0xE58E, + 37721 - 11905: 0xE58F, + 37722 - 11905: 0xE590, + 37723 - 11905: 0xE591, + 37724 - 11905: 0xE592, + 37725 - 11905: 0xE593, + 37726 - 11905: 0xE594, + 37727 - 11905: 0xE595, + 37728 - 11905: 0xE596, + 37729 - 11905: 0xE597, + 37730 - 11905: 0xE598, + 37731 - 11905: 0xE599, + 37732 - 11905: 0xE59A, + 37733 - 11905: 0xE59B, + 37734 - 11905: 0xE59C, + 37735 - 11905: 0xE59D, + 37736 - 11905: 0xE59E, + 37737 - 11905: 0xE59F, + 37738 - 11905: 0xF6CA, + 37739 - 11905: 0xE5A0, + 37740 - 11905: 0xE640, + 37741 - 11905: 0xE641, + 37742 - 11905: 0xE642, + 37743 - 11905: 0xE643, + 37744 - 11905: 0xE644, + 37745 - 11905: 0xE645, + 37746 - 11905: 0xE646, + 37747 - 11905: 0xE647, + 37748 - 11905: 0xE648, + 37749 - 11905: 0xE649, + 37750 - 11905: 0xE64A, + 37751 - 11905: 0xE64B, + 37752 - 11905: 0xE64C, + 37753 - 11905: 0xE64D, + 37754 - 11905: 0xE64E, + 37755 - 11905: 0xE64F, + 37756 - 11905: 0xE650, + 37757 - 11905: 0xE651, + 37758 - 11905: 0xE652, + 37759 - 11905: 0xE653, + 37760 - 11905: 0xE654, + 37761 - 11905: 0xE655, + 37762 - 11905: 0xE656, + 37763 - 11905: 0xE657, + 37764 - 11905: 0xE658, + 37765 - 11905: 0xE659, + 37766 - 11905: 0xE65A, + 37767 - 11905: 0xE65B, + 37768 - 11905: 0xE65C, + 37769 - 11905: 0xE65D, + 37770 - 11905: 0xE65E, + 37771 - 11905: 0xE65F, + 37772 - 11905: 0xE660, + 37773 - 11905: 0xE661, + 37774 - 11905: 0xE662, + 37775 - 11905: 0xF6CC, + 37776 - 11905: 0xE663, + 37777 - 11905: 0xE664, + 37778 - 11905: 0xE665, + 37779 - 11905: 0xE666, + 37780 - 11905: 0xE667, + 37781 - 11905: 0xE668, + 37782 - 11905: 0xE669, + 37783 - 11905: 0xE66A, + 37784 - 11905: 0xE66B, + 37785 - 11905: 0xE66C, + 37786 - 11905: 0xE66D, + 37787 - 11905: 0xE66E, + 37788 - 11905: 0xE66F, + 37789 - 11905: 0xE670, + 37790 - 11905: 0xE671, + 37791 - 11905: 0xE672, + 37792 - 11905: 0xE673, + 37793 - 11905: 0xE674, + 37794 - 11905: 0xE675, + 37795 - 11905: 0xE676, + 37796 - 11905: 0xE677, + 37797 - 11905: 0xE678, + 37798 - 11905: 0xE679, + 37799 - 11905: 0xE67A, + 37800 - 11905: 0xE67B, + 37801 - 11905: 0xE67C, + 37802 - 11905: 0xE67D, + 37803 - 11905: 0xE67E, + 37804 - 11905: 0xE680, + 37805 - 11905: 0xE681, + 37806 - 11905: 0xE682, + 37807 - 11905: 0xE683, + 37808 - 11905: 0xE684, + 37809 - 11905: 0xE685, + 37810 - 11905: 0xE686, + 37811 - 11905: 0xE687, + 37812 - 11905: 0xE688, + 37813 - 11905: 0xE689, + 37814 - 11905: 0xE68A, + 37815 - 11905: 0xE68B, + 37816 - 11905: 0xE68C, + 37817 - 11905: 0xE68D, + 37818 - 11905: 0xE68E, + 37819 - 11905: 0xE68F, + 37820 - 11905: 0xE690, + 37821 - 11905: 0xE691, + 37822 - 11905: 0xE692, + 37823 - 11905: 0xE693, + 37824 - 11905: 0xE694, + 37825 - 11905: 0xE695, + 37826 - 11905: 0xE696, + 37827 - 11905: 0xE697, + 37828 - 11905: 0xE698, + 37829 - 11905: 0xE699, + 37830 - 11905: 0xE69A, + 37831 - 11905: 0xE69B, + 37832 - 11905: 0xE69C, + 37833 - 11905: 0xE69D, + 37834 - 11905: 0xF6CB, + 37835 - 11905: 0xE69E, + 37836 - 11905: 0xE69F, + 37837 - 11905: 0xE6A0, + 37838 - 11905: 0xE740, + 37839 - 11905: 0xE741, + 37840 - 11905: 0xE742, + 37841 - 11905: 0xE743, + 37842 - 11905: 0xE744, + 37843 - 11905: 0xE745, + 37844 - 11905: 0xE746, + 37845 - 11905: 0xE747, + 37846 - 11905: 0xF7E9, + 37847 - 11905: 0xE748, + 37848 - 11905: 0xE749, + 37849 - 11905: 0xE74A, + 37850 - 11905: 0xE74B, + 37851 - 11905: 0xE74C, + 37852 - 11905: 0xE74D, + 37853 - 11905: 0xE74E, + 37854 - 11905: 0xE74F, + 37855 - 11905: 0xE750, + 37856 - 11905: 0xE751, + 37857 - 11905: 0xE752, + 37858 - 11905: 0xE753, + 37859 - 11905: 0xE754, + 37860 - 11905: 0xE755, + 37861 - 11905: 0xE756, + 37862 - 11905: 0xE757, + 37863 - 11905: 0xE758, + 37864 - 11905: 0xE759, + 37865 - 11905: 0xE75A, + 37866 - 11905: 0xE75B, + 37867 - 11905: 0xE75C, + 37868 - 11905: 0xE75D, + 37869 - 11905: 0xE75E, + 37870 - 11905: 0xE75F, + 37871 - 11905: 0xE760, + 37872 - 11905: 0xE761, + 37873 - 11905: 0xE762, + 37874 - 11905: 0xE763, + 37875 - 11905: 0xE764, + 37876 - 11905: 0xE765, + 37877 - 11905: 0xE766, + 37878 - 11905: 0xE767, + 37879 - 11905: 0xE768, + 37880 - 11905: 0xE769, + 37881 - 11905: 0xE76A, + 37882 - 11905: 0xE76B, + 37883 - 11905: 0xE76C, + 37884 - 11905: 0xE76D, + 37885 - 11905: 0xE76E, + 37886 - 11905: 0xE76F, + 37887 - 11905: 0xE770, + 37888 - 11905: 0xE771, + 37889 - 11905: 0xE772, + 37890 - 11905: 0xE773, + 37891 - 11905: 0xE774, + 37892 - 11905: 0xE775, + 37893 - 11905: 0xE776, + 37894 - 11905: 0xE777, + 37895 - 11905: 0xE778, + 37896 - 11905: 0xE779, + 37897 - 11905: 0xE77A, + 37898 - 11905: 0xE77B, + 37899 - 11905: 0xE77C, + 37900 - 11905: 0xE77D, + 37901 - 11905: 0xE77E, + 37902 - 11905: 0xE780, + 37903 - 11905: 0xE781, + 37904 - 11905: 0xE782, + 37905 - 11905: 0xE783, + 37906 - 11905: 0xE784, + 37907 - 11905: 0xE785, + 37908 - 11905: 0xE786, + 37909 - 11905: 0xE787, + 37910 - 11905: 0xE788, + 37911 - 11905: 0xE789, + 37912 - 11905: 0xE78A, + 37913 - 11905: 0xE78B, + 37914 - 11905: 0xE78C, + 37915 - 11905: 0xE78D, + 37916 - 11905: 0xE78E, + 37917 - 11905: 0xE78F, + 37918 - 11905: 0xE790, + 37919 - 11905: 0xE791, + 37920 - 11905: 0xE792, + 37921 - 11905: 0xE793, + 37922 - 11905: 0xE794, + 37923 - 11905: 0xE795, + 37924 - 11905: 0xE796, + 37925 - 11905: 0xE797, + 37926 - 11905: 0xE798, + 37927 - 11905: 0xE799, + 37928 - 11905: 0xE79A, + 37929 - 11905: 0xE79B, + 37930 - 11905: 0xE79C, + 37931 - 11905: 0xE79D, + 37932 - 11905: 0xE79E, + 37933 - 11905: 0xE79F, + 37934 - 11905: 0xE7A0, + 37935 - 11905: 0xE840, + 37936 - 11905: 0xE841, + 37937 - 11905: 0xE842, + 37938 - 11905: 0xE843, + 37939 - 11905: 0xE844, + 37940 - 11905: 0xE845, + 37941 - 11905: 0xE846, + 37942 - 11905: 0xE847, + 37943 - 11905: 0xE848, + 37944 - 11905: 0xE849, + 37945 - 11905: 0xE84A, + 37946 - 11905: 0xE84B, + 37947 - 11905: 0xE84C, + 37948 - 11905: 0xE84D, + 37949 - 11905: 0xE84E, + 37950 - 11905: 0xF6CD, + 37951 - 11905: 0xE84F, + 37952 - 11905: 0xE850, + 37953 - 11905: 0xE851, + 37954 - 11905: 0xE852, + 37955 - 11905: 0xE853, + 37956 - 11905: 0xE854, + 37957 - 11905: 0xE855, + 37958 - 11905: 0xE856, + 37959 - 11905: 0xE857, + 37960 - 11905: 0xE858, + 37961 - 11905: 0xE859, + 37962 - 11905: 0xE85A, + 37963 - 11905: 0xE85B, + 37964 - 11905: 0xE85C, + 37965 - 11905: 0xE85D, + 37966 - 11905: 0xE85E, + 37967 - 11905: 0xE85F, + 37968 - 11905: 0xE860, + 37969 - 11905: 0xE861, + 37970 - 11905: 0xE862, + 37971 - 11905: 0xE863, + 37972 - 11905: 0xE864, + 37973 - 11905: 0xE865, + 37974 - 11905: 0xE866, + 37975 - 11905: 0xE867, + 37976 - 11905: 0xE868, + 37977 - 11905: 0xE869, + 37978 - 11905: 0xE86A, + 37979 - 11905: 0xE86B, + 37980 - 11905: 0xE86C, + 37981 - 11905: 0xE86D, + 37982 - 11905: 0xE86E, + 37983 - 11905: 0xE86F, + 37984 - 11905: 0xE870, + 37985 - 11905: 0xE871, + 37986 - 11905: 0xE872, + 37987 - 11905: 0xE873, + 37988 - 11905: 0xE874, + 37989 - 11905: 0xE875, + 37990 - 11905: 0xE876, + 37991 - 11905: 0xE877, + 37992 - 11905: 0xE878, + 37993 - 11905: 0xE879, + 37994 - 11905: 0xE87A, + 37995 - 11905: 0xF6CE, + 37996 - 11905: 0xE87B, + 37997 - 11905: 0xE87C, + 37998 - 11905: 0xE87D, + 37999 - 11905: 0xE87E, + 38000 - 11905: 0xE880, + 38001 - 11905: 0xE881, + 38002 - 11905: 0xE882, + 38003 - 11905: 0xE883, + 38004 - 11905: 0xE884, + 38005 - 11905: 0xE885, + 38006 - 11905: 0xE886, + 38007 - 11905: 0xE887, + 38008 - 11905: 0xE888, + 38009 - 11905: 0xE889, + 38010 - 11905: 0xE88A, + 38011 - 11905: 0xE88B, + 38012 - 11905: 0xE88C, + 38013 - 11905: 0xE88D, + 38014 - 11905: 0xE88E, + 38015 - 11905: 0xE88F, + 38016 - 11905: 0xE890, + 38017 - 11905: 0xE891, + 38018 - 11905: 0xE892, + 38019 - 11905: 0xE893, + 38020 - 11905: 0xE894, + 38021 - 11905: 0xEEC4, + 38022 - 11905: 0xEEC5, + 38023 - 11905: 0xEEC6, + 38024 - 11905: 0xD5EB, + 38025 - 11905: 0xB6A4, + 38026 - 11905: 0xEEC8, + 38027 - 11905: 0xEEC7, + 38028 - 11905: 0xEEC9, + 38029 - 11905: 0xEECA, + 38030 - 11905: 0xC7A5, + 38031 - 11905: 0xEECB, + 38032 - 11905: 0xEECC, + 38033 - 11905: 0xE895, + 38034 - 11905: 0xB7B0, + 38035 - 11905: 0xB5F6, + 38036 - 11905: 0xEECD, + 38037 - 11905: 0xEECF, + 38038 - 11905: 0xE896, + 38039 - 11905: 0xEECE, + 38040 - 11905: 0xE897, + 38041 - 11905: 0xB8C6, + 38042 - 11905: 0xEED0, + 38043 - 11905: 0xEED1, + 38044 - 11905: 0xEED2, + 38045 - 11905: 0xB6DB, + 38046 - 11905: 0xB3AE, + 38047 - 11905: 0xD6D3, + 38048 - 11905: 0xC4C6, + 38049 - 11905: 0xB1B5, + 38050 - 11905: 0xB8D6, + 38051 - 11905: 0xEED3, + 38052 - 11905: 0xEED4, + 38053 - 11905: 0xD4BF, + 38054 - 11905: 0xC7D5, + 38055 - 11905: 0xBEFB, + 38056 - 11905: 0xCED9, + 38057 - 11905: 0xB9B3, + 38058 - 11905: 0xEED6, + 38059 - 11905: 0xEED5, + 38060 - 11905: 0xEED8, + 38061 - 11905: 0xEED7, + 38062 - 11905: 0xC5A5, + 38063 - 11905: 0xEED9, + 38064 - 11905: 0xEEDA, + 38065 - 11905: 0xC7AE, + 38066 - 11905: 0xEEDB, + 38067 - 11905: 0xC7AF, + 38068 - 11905: 0xEEDC, + 38069 - 11905: 0xB2A7, + 38070 - 11905: 0xEEDD, + 38071 - 11905: 0xEEDE, + 38072 - 11905: 0xEEDF, + 38073 - 11905: 0xEEE0, + 38074 - 11905: 0xEEE1, + 38075 - 11905: 0xD7EA, + 38076 - 11905: 0xEEE2, + 38077 - 11905: 0xEEE3, + 38078 - 11905: 0xBCD8, + 38079 - 11905: 0xEEE4, + 38080 - 11905: 0xD3CB, + 38081 - 11905: 0xCCFA, + 38082 - 11905: 0xB2AC, + 38083 - 11905: 0xC1E5, + 38084 - 11905: 0xEEE5, + 38085 - 11905: 0xC7A6, + 38086 - 11905: 0xC3AD, + 38087 - 11905: 0xE898, + 38088 - 11905: 0xEEE6, + 38089 - 11905: 0xEEE7, + 38090 - 11905: 0xEEE8, + 38091 - 11905: 0xEEE9, + 38092 - 11905: 0xEEEA, + 38093 - 11905: 0xEEEB, + 38094 - 11905: 0xEEEC, + 38095 - 11905: 0xE899, + 38096 - 11905: 0xEEED, + 38097 - 11905: 0xEEEE, + 38098 - 11905: 0xEEEF, + 38099 - 11905: 0xE89A, + 38100 - 11905: 0xE89B, + 38101 - 11905: 0xEEF0, + 38102 - 11905: 0xEEF1, + 38103 - 11905: 0xEEF2, + 38104 - 11905: 0xEEF4, + 38105 - 11905: 0xEEF3, + 38106 - 11905: 0xE89C, + 38107 - 11905: 0xEEF5, + 38108 - 11905: 0xCDAD, + 38109 - 11905: 0xC2C1, + 38110 - 11905: 0xEEF6, + 38111 - 11905: 0xEEF7, + 38112 - 11905: 0xEEF8, + 38113 - 11905: 0xD5A1, + 38114 - 11905: 0xEEF9, + 38115 - 11905: 0xCFB3, + 38116 - 11905: 0xEEFA, + 38117 - 11905: 0xEEFB, + 38118 - 11905: 0xE89D, + 38119 - 11905: 0xEEFC, + 38120 - 11905: 0xEEFD, + 38121 - 11905: 0xEFA1, + 38122 - 11905: 0xEEFE, + 38123 - 11905: 0xEFA2, + 38124 - 11905: 0xB8F5, + 38125 - 11905: 0xC3FA, + 38126 - 11905: 0xEFA3, + 38127 - 11905: 0xEFA4, + 38128 - 11905: 0xBDC2, + 38129 - 11905: 0xD2BF, + 38130 - 11905: 0xB2F9, + 38131 - 11905: 0xEFA5, + 38132 - 11905: 0xEFA6, + 38133 - 11905: 0xEFA7, + 38134 - 11905: 0xD2F8, + 38135 - 11905: 0xEFA8, + 38136 - 11905: 0xD6FD, + 38137 - 11905: 0xEFA9, + 38138 - 11905: 0xC6CC, + 38139 - 11905: 0xE89E, + 38140 - 11905: 0xEFAA, + 38141 - 11905: 0xEFAB, + 38142 - 11905: 0xC1B4, + 38143 - 11905: 0xEFAC, + 38144 - 11905: 0xCFFA, + 38145 - 11905: 0xCBF8, + 38146 - 11905: 0xEFAE, + 38147 - 11905: 0xEFAD, + 38148 - 11905: 0xB3FA, + 38149 - 11905: 0xB9F8, + 38150 - 11905: 0xEFAF, + 38151 - 11905: 0xEFB0, + 38152 - 11905: 0xD0E2, + 38153 - 11905: 0xEFB1, + 38154 - 11905: 0xEFB2, + 38155 - 11905: 0xB7E6, + 38156 - 11905: 0xD0BF, + 38157 - 11905: 0xEFB3, + 38158 - 11905: 0xEFB4, + 38159 - 11905: 0xEFB5, + 38160 - 11905: 0xC8F1, + 38161 - 11905: 0xCCE0, + 38162 - 11905: 0xEFB6, + 38163 - 11905: 0xEFB7, + 38164 - 11905: 0xEFB8, + 38165 - 11905: 0xEFB9, + 38166 - 11905: 0xEFBA, + 38167 - 11905: 0xD5E0, + 38168 - 11905: 0xEFBB, + 38169 - 11905: 0xB4ED, + 38170 - 11905: 0xC3AA, + 38171 - 11905: 0xEFBC, + 38172 - 11905: 0xE89F, + 38173 - 11905: 0xEFBD, + 38174 - 11905: 0xEFBE, + 38175 - 11905: 0xEFBF, + 38176 - 11905: 0xE8A0, + 38177 - 11905: 0xCEFD, + 38178 - 11905: 0xEFC0, + 38179 - 11905: 0xC2E0, + 38180 - 11905: 0xB4B8, + 38181 - 11905: 0xD7B6, + 38182 - 11905: 0xBDF5, + 38183 - 11905: 0xE940, + 38184 - 11905: 0xCFC7, + 38185 - 11905: 0xEFC3, + 38186 - 11905: 0xEFC1, + 38187 - 11905: 0xEFC2, + 38188 - 11905: 0xEFC4, + 38189 - 11905: 0xB6A7, + 38190 - 11905: 0xBCFC, + 38191 - 11905: 0xBEE2, + 38192 - 11905: 0xC3CC, + 38193 - 11905: 0xEFC5, + 38194 - 11905: 0xEFC6, + 38195 - 11905: 0xE941, + 38196 - 11905: 0xEFC7, + 38197 - 11905: 0xEFCF, + 38198 - 11905: 0xEFC8, + 38199 - 11905: 0xEFC9, + 38200 - 11905: 0xEFCA, + 38201 - 11905: 0xC7C2, + 38202 - 11905: 0xEFF1, + 38203 - 11905: 0xB6CD, + 38204 - 11905: 0xEFCB, + 38205 - 11905: 0xE942, + 38206 - 11905: 0xEFCC, + 38207 - 11905: 0xEFCD, + 38208 - 11905: 0xB6C6, + 38209 - 11905: 0xC3BE, + 38210 - 11905: 0xEFCE, + 38211 - 11905: 0xE943, + 38212 - 11905: 0xEFD0, + 38213 - 11905: 0xEFD1, + 38214 - 11905: 0xEFD2, + 38215 - 11905: 0xD5F2, + 38216 - 11905: 0xE944, + 38217 - 11905: 0xEFD3, + 38218 - 11905: 0xC4F7, + 38219 - 11905: 0xE945, + 38220 - 11905: 0xEFD4, + 38221 - 11905: 0xC4F8, + 38222 - 11905: 0xEFD5, + 38223 - 11905: 0xEFD6, + 38224 - 11905: 0xB8E4, + 38225 - 11905: 0xB0F7, + 38226 - 11905: 0xEFD7, + 38227 - 11905: 0xEFD8, + 38228 - 11905: 0xEFD9, + 38229 - 11905: 0xE946, + 38230 - 11905: 0xEFDA, + 38231 - 11905: 0xEFDB, + 38232 - 11905: 0xEFDC, + 38233 - 11905: 0xEFDD, + 38234 - 11905: 0xE947, + 38235 - 11905: 0xEFDE, + 38236 - 11905: 0xBEB5, + 38237 - 11905: 0xEFE1, + 38238 - 11905: 0xEFDF, + 38239 - 11905: 0xEFE0, + 38240 - 11905: 0xE948, + 38241 - 11905: 0xEFE2, + 38242 - 11905: 0xEFE3, + 38243 - 11905: 0xC1CD, + 38244 - 11905: 0xEFE4, + 38245 - 11905: 0xEFE5, + 38246 - 11905: 0xEFE6, + 38247 - 11905: 0xEFE7, + 38248 - 11905: 0xEFE8, + 38249 - 11905: 0xEFE9, + 38250 - 11905: 0xEFEA, + 38251 - 11905: 0xEFEB, + 38252 - 11905: 0xEFEC, + 38253 - 11905: 0xC0D8, + 38254 - 11905: 0xE949, + 38255 - 11905: 0xEFED, + 38256 - 11905: 0xC1AD, + 38257 - 11905: 0xEFEE, + 38258 - 11905: 0xEFEF, + 38259 - 11905: 0xEFF0, + 38260 - 11905: 0xE94A, + 38261 - 11905: 0xE94B, + 38262 - 11905: 0xCFE2, + 38263 - 11905: 0xE94C, + 38264 - 11905: 0xE94D, + 38265 - 11905: 0xE94E, + 38266 - 11905: 0xE94F, + 38267 - 11905: 0xE950, + 38268 - 11905: 0xE951, + 38269 - 11905: 0xE952, + 38270 - 11905: 0xE953, + 38271 - 11905: 0xB3A4, + 38272 - 11905: 0xE954, + 38273 - 11905: 0xE955, + 38274 - 11905: 0xE956, + 38275 - 11905: 0xE957, + 38276 - 11905: 0xE958, + 38277 - 11905: 0xE959, + 38278 - 11905: 0xE95A, + 38279 - 11905: 0xE95B, + 38280 - 11905: 0xE95C, + 38281 - 11905: 0xE95D, + 38282 - 11905: 0xE95E, + 38283 - 11905: 0xE95F, + 38284 - 11905: 0xE960, + 38285 - 11905: 0xE961, + 38286 - 11905: 0xE962, + 38287 - 11905: 0xE963, + 38288 - 11905: 0xE964, + 38289 - 11905: 0xE965, + 38290 - 11905: 0xE966, + 38291 - 11905: 0xE967, + 38292 - 11905: 0xE968, + 38293 - 11905: 0xE969, + 38294 - 11905: 0xE96A, + 38295 - 11905: 0xE96B, + 38296 - 11905: 0xE96C, + 38297 - 11905: 0xE96D, + 38298 - 11905: 0xE96E, + 38299 - 11905: 0xE96F, + 38300 - 11905: 0xE970, + 38301 - 11905: 0xE971, + 38302 - 11905: 0xE972, + 38303 - 11905: 0xE973, + 38304 - 11905: 0xE974, + 38305 - 11905: 0xE975, + 38306 - 11905: 0xE976, + 38307 - 11905: 0xE977, + 38308 - 11905: 0xE978, + 38309 - 11905: 0xE979, + 38310 - 11905: 0xE97A, + 38311 - 11905: 0xE97B, + 38312 - 11905: 0xE97C, + 38313 - 11905: 0xE97D, + 38314 - 11905: 0xE97E, + 38315 - 11905: 0xE980, + 38316 - 11905: 0xE981, + 38317 - 11905: 0xE982, + 38318 - 11905: 0xE983, + 38319 - 11905: 0xE984, + 38320 - 11905: 0xE985, + 38321 - 11905: 0xE986, + 38322 - 11905: 0xE987, + 38323 - 11905: 0xE988, + 38324 - 11905: 0xE989, + 38325 - 11905: 0xE98A, + 38326 - 11905: 0xE98B, + 38327 - 11905: 0xE98C, + 38328 - 11905: 0xE98D, + 38329 - 11905: 0xE98E, + 38330 - 11905: 0xE98F, + 38331 - 11905: 0xE990, + 38332 - 11905: 0xE991, + 38333 - 11905: 0xE992, + 38334 - 11905: 0xE993, + 38335 - 11905: 0xE994, + 38336 - 11905: 0xE995, + 38337 - 11905: 0xE996, + 38338 - 11905: 0xE997, + 38339 - 11905: 0xE998, + 38340 - 11905: 0xE999, + 38341 - 11905: 0xE99A, + 38342 - 11905: 0xE99B, + 38343 - 11905: 0xE99C, + 38344 - 11905: 0xE99D, + 38345 - 11905: 0xE99E, + 38346 - 11905: 0xE99F, + 38347 - 11905: 0xE9A0, + 38348 - 11905: 0xEA40, + 38349 - 11905: 0xEA41, + 38350 - 11905: 0xEA42, + 38351 - 11905: 0xEA43, + 38352 - 11905: 0xEA44, + 38353 - 11905: 0xEA45, + 38354 - 11905: 0xEA46, + 38355 - 11905: 0xEA47, + 38356 - 11905: 0xEA48, + 38357 - 11905: 0xEA49, + 38358 - 11905: 0xEA4A, + 38359 - 11905: 0xEA4B, + 38360 - 11905: 0xEA4C, + 38361 - 11905: 0xEA4D, + 38362 - 11905: 0xEA4E, + 38363 - 11905: 0xEA4F, + 38364 - 11905: 0xEA50, + 38365 - 11905: 0xEA51, + 38366 - 11905: 0xEA52, + 38367 - 11905: 0xEA53, + 38368 - 11905: 0xEA54, + 38369 - 11905: 0xEA55, + 38370 - 11905: 0xEA56, + 38371 - 11905: 0xEA57, + 38372 - 11905: 0xEA58, + 38373 - 11905: 0xEA59, + 38374 - 11905: 0xEA5A, + 38375 - 11905: 0xEA5B, + 38376 - 11905: 0xC3C5, + 38377 - 11905: 0xE3C5, + 38378 - 11905: 0xC9C1, + 38379 - 11905: 0xE3C6, + 38380 - 11905: 0xEA5C, + 38381 - 11905: 0xB1D5, + 38382 - 11905: 0xCECA, + 38383 - 11905: 0xB4B3, + 38384 - 11905: 0xC8F2, + 38385 - 11905: 0xE3C7, + 38386 - 11905: 0xCFD0, + 38387 - 11905: 0xE3C8, + 38388 - 11905: 0xBCE4, + 38389 - 11905: 0xE3C9, + 38390 - 11905: 0xE3CA, + 38391 - 11905: 0xC3C6, + 38392 - 11905: 0xD5A2, + 38393 - 11905: 0xC4D6, + 38394 - 11905: 0xB9EB, + 38395 - 11905: 0xCEC5, + 38396 - 11905: 0xE3CB, + 38397 - 11905: 0xC3F6, + 38398 - 11905: 0xE3CC, + 38399 - 11905: 0xEA5D, + 38400 - 11905: 0xB7A7, + 38401 - 11905: 0xB8F3, + 38402 - 11905: 0xBAD2, + 38403 - 11905: 0xE3CD, + 38404 - 11905: 0xE3CE, + 38405 - 11905: 0xD4C4, + 38406 - 11905: 0xE3CF, + 38407 - 11905: 0xEA5E, + 38408 - 11905: 0xE3D0, + 38409 - 11905: 0xD1CB, + 38410 - 11905: 0xE3D1, + 38411 - 11905: 0xE3D2, + 38412 - 11905: 0xE3D3, + 38413 - 11905: 0xE3D4, + 38414 - 11905: 0xD1D6, + 38415 - 11905: 0xE3D5, + 38416 - 11905: 0xB2FB, + 38417 - 11905: 0xC0BB, + 38418 - 11905: 0xE3D6, + 38419 - 11905: 0xEA5F, + 38420 - 11905: 0xC0AB, + 38421 - 11905: 0xE3D7, + 38422 - 11905: 0xE3D8, + 38423 - 11905: 0xE3D9, + 38424 - 11905: 0xEA60, + 38425 - 11905: 0xE3DA, + 38426 - 11905: 0xE3DB, + 38427 - 11905: 0xEA61, + 38428 - 11905: 0xB8B7, + 38429 - 11905: 0xDAE2, + 38430 - 11905: 0xEA62, + 38431 - 11905: 0xB6D3, + 38432 - 11905: 0xEA63, + 38433 - 11905: 0xDAE4, + 38434 - 11905: 0xDAE3, + 38435 - 11905: 0xEA64, + 38436 - 11905: 0xEA65, + 38437 - 11905: 0xEA66, + 38438 - 11905: 0xEA67, + 38439 - 11905: 0xEA68, + 38440 - 11905: 0xEA69, + 38441 - 11905: 0xEA6A, + 38442 - 11905: 0xDAE6, + 38443 - 11905: 0xEA6B, + 38444 - 11905: 0xEA6C, + 38445 - 11905: 0xEA6D, + 38446 - 11905: 0xC8EE, + 38447 - 11905: 0xEA6E, + 38448 - 11905: 0xEA6F, + 38449 - 11905: 0xDAE5, + 38450 - 11905: 0xB7C0, + 38451 - 11905: 0xD1F4, + 38452 - 11905: 0xD2F5, + 38453 - 11905: 0xD5F3, + 38454 - 11905: 0xBDD7, + 38455 - 11905: 0xEA70, + 38456 - 11905: 0xEA71, + 38457 - 11905: 0xEA72, + 38458 - 11905: 0xEA73, + 38459 - 11905: 0xD7E8, + 38460 - 11905: 0xDAE8, + 38461 - 11905: 0xDAE7, + 38462 - 11905: 0xEA74, + 38463 - 11905: 0xB0A2, + 38464 - 11905: 0xCDD3, + 38465 - 11905: 0xEA75, + 38466 - 11905: 0xDAE9, + 38467 - 11905: 0xEA76, + 38468 - 11905: 0xB8BD, + 38469 - 11905: 0xBCCA, + 38470 - 11905: 0xC2BD, + 38471 - 11905: 0xC2A4, + 38472 - 11905: 0xB3C2, + 38473 - 11905: 0xDAEA, + 38474 - 11905: 0xEA77, + 38475 - 11905: 0xC2AA, + 38476 - 11905: 0xC4B0, + 38477 - 11905: 0xBDB5, + 38478 - 11905: 0xEA78, + 38479 - 11905: 0xEA79, + 38480 - 11905: 0xCFDE, + 38481 - 11905: 0xEA7A, + 38482 - 11905: 0xEA7B, + 38483 - 11905: 0xEA7C, + 38484 - 11905: 0xDAEB, + 38485 - 11905: 0xC9C2, + 38486 - 11905: 0xEA7D, + 38487 - 11905: 0xEA7E, + 38488 - 11905: 0xEA80, + 38489 - 11905: 0xEA81, + 38490 - 11905: 0xEA82, + 38491 - 11905: 0xB1DD, + 38492 - 11905: 0xEA83, + 38493 - 11905: 0xEA84, + 38494 - 11905: 0xEA85, + 38495 - 11905: 0xDAEC, + 38496 - 11905: 0xEA86, + 38497 - 11905: 0xB6B8, + 38498 - 11905: 0xD4BA, + 38499 - 11905: 0xEA87, + 38500 - 11905: 0xB3FD, + 38501 - 11905: 0xEA88, + 38502 - 11905: 0xEA89, + 38503 - 11905: 0xDAED, + 38504 - 11905: 0xD4C9, + 38505 - 11905: 0xCFD5, + 38506 - 11905: 0xC5E3, + 38507 - 11905: 0xEA8A, + 38508 - 11905: 0xDAEE, + 38509 - 11905: 0xEA8B, + 38510 - 11905: 0xEA8C, + 38511 - 11905: 0xEA8D, + 38512 - 11905: 0xEA8E, + 38513 - 11905: 0xEA8F, + 38514 - 11905: 0xDAEF, + 38515 - 11905: 0xEA90, + 38516 - 11905: 0xDAF0, + 38517 - 11905: 0xC1EA, + 38518 - 11905: 0xCCD5, + 38519 - 11905: 0xCFDD, + 38520 - 11905: 0xEA91, + 38521 - 11905: 0xEA92, + 38522 - 11905: 0xEA93, + 38523 - 11905: 0xEA94, + 38524 - 11905: 0xEA95, + 38525 - 11905: 0xEA96, + 38526 - 11905: 0xEA97, + 38527 - 11905: 0xEA98, + 38528 - 11905: 0xEA99, + 38529 - 11905: 0xEA9A, + 38530 - 11905: 0xEA9B, + 38531 - 11905: 0xEA9C, + 38532 - 11905: 0xEA9D, + 38533 - 11905: 0xD3E7, + 38534 - 11905: 0xC2A1, + 38535 - 11905: 0xEA9E, + 38536 - 11905: 0xDAF1, + 38537 - 11905: 0xEA9F, + 38538 - 11905: 0xEAA0, + 38539 - 11905: 0xCBE5, + 38540 - 11905: 0xEB40, + 38541 - 11905: 0xDAF2, + 38542 - 11905: 0xEB41, + 38543 - 11905: 0xCBE6, + 38544 - 11905: 0xD2FE, + 38545 - 11905: 0xEB42, + 38546 - 11905: 0xEB43, + 38547 - 11905: 0xEB44, + 38548 - 11905: 0xB8F4, + 38549 - 11905: 0xEB45, + 38550 - 11905: 0xEB46, + 38551 - 11905: 0xDAF3, + 38552 - 11905: 0xB0AF, + 38553 - 11905: 0xCFB6, + 38554 - 11905: 0xEB47, + 38555 - 11905: 0xEB48, + 38556 - 11905: 0xD5CF, + 38557 - 11905: 0xEB49, + 38558 - 11905: 0xEB4A, + 38559 - 11905: 0xEB4B, + 38560 - 11905: 0xEB4C, + 38561 - 11905: 0xEB4D, + 38562 - 11905: 0xEB4E, + 38563 - 11905: 0xEB4F, + 38564 - 11905: 0xEB50, + 38565 - 11905: 0xEB51, + 38566 - 11905: 0xEB52, + 38567 - 11905: 0xCBED, + 38568 - 11905: 0xEB53, + 38569 - 11905: 0xEB54, + 38570 - 11905: 0xEB55, + 38571 - 11905: 0xEB56, + 38572 - 11905: 0xEB57, + 38573 - 11905: 0xEB58, + 38574 - 11905: 0xEB59, + 38575 - 11905: 0xEB5A, + 38576 - 11905: 0xDAF4, + 38577 - 11905: 0xEB5B, + 38578 - 11905: 0xEB5C, + 38579 - 11905: 0xE3C4, + 38580 - 11905: 0xEB5D, + 38581 - 11905: 0xEB5E, + 38582 - 11905: 0xC1A5, + 38583 - 11905: 0xEB5F, + 38584 - 11905: 0xEB60, + 38585 - 11905: 0xF6BF, + 38586 - 11905: 0xEB61, + 38587 - 11905: 0xEB62, + 38588 - 11905: 0xF6C0, + 38589 - 11905: 0xF6C1, + 38590 - 11905: 0xC4D1, + 38591 - 11905: 0xEB63, + 38592 - 11905: 0xC8B8, + 38593 - 11905: 0xD1E3, + 38594 - 11905: 0xEB64, + 38595 - 11905: 0xEB65, + 38596 - 11905: 0xD0DB, + 38597 - 11905: 0xD1C5, + 38598 - 11905: 0xBCAF, + 38599 - 11905: 0xB9CD, + 38600 - 11905: 0xEB66, + 38601 - 11905: 0xEFF4, + 38602 - 11905: 0xEB67, + 38603 - 11905: 0xEB68, + 38604 - 11905: 0xB4C6, + 38605 - 11905: 0xD3BA, + 38606 - 11905: 0xF6C2, + 38607 - 11905: 0xB3FB, + 38608 - 11905: 0xEB69, + 38609 - 11905: 0xEB6A, + 38610 - 11905: 0xF6C3, + 38611 - 11905: 0xEB6B, + 38612 - 11905: 0xEB6C, + 38613 - 11905: 0xB5F1, + 38614 - 11905: 0xEB6D, + 38615 - 11905: 0xEB6E, + 38616 - 11905: 0xEB6F, + 38617 - 11905: 0xEB70, + 38618 - 11905: 0xEB71, + 38619 - 11905: 0xEB72, + 38620 - 11905: 0xEB73, + 38621 - 11905: 0xEB74, + 38622 - 11905: 0xEB75, + 38623 - 11905: 0xEB76, + 38624 - 11905: 0xF6C5, + 38625 - 11905: 0xEB77, + 38626 - 11905: 0xEB78, + 38627 - 11905: 0xEB79, + 38628 - 11905: 0xEB7A, + 38629 - 11905: 0xEB7B, + 38630 - 11905: 0xEB7C, + 38631 - 11905: 0xEB7D, + 38632 - 11905: 0xD3EA, + 38633 - 11905: 0xF6A7, + 38634 - 11905: 0xD1A9, + 38635 - 11905: 0xEB7E, + 38636 - 11905: 0xEB80, + 38637 - 11905: 0xEB81, + 38638 - 11905: 0xEB82, + 38639 - 11905: 0xF6A9, + 38640 - 11905: 0xEB83, + 38641 - 11905: 0xEB84, + 38642 - 11905: 0xEB85, + 38643 - 11905: 0xF6A8, + 38644 - 11905: 0xEB86, + 38645 - 11905: 0xEB87, + 38646 - 11905: 0xC1E3, + 38647 - 11905: 0xC0D7, + 38648 - 11905: 0xEB88, + 38649 - 11905: 0xB1A2, + 38650 - 11905: 0xEB89, + 38651 - 11905: 0xEB8A, + 38652 - 11905: 0xEB8B, + 38653 - 11905: 0xEB8C, + 38654 - 11905: 0xCEED, + 38655 - 11905: 0xEB8D, + 38656 - 11905: 0xD0E8, + 38657 - 11905: 0xF6AB, + 38658 - 11905: 0xEB8E, + 38659 - 11905: 0xEB8F, + 38660 - 11905: 0xCFF6, + 38661 - 11905: 0xEB90, + 38662 - 11905: 0xF6AA, + 38663 - 11905: 0xD5F0, + 38664 - 11905: 0xF6AC, + 38665 - 11905: 0xC3B9, + 38666 - 11905: 0xEB91, + 38667 - 11905: 0xEB92, + 38668 - 11905: 0xEB93, + 38669 - 11905: 0xBBF4, + 38670 - 11905: 0xF6AE, + 38671 - 11905: 0xF6AD, + 38672 - 11905: 0xEB94, + 38673 - 11905: 0xEB95, + 38674 - 11905: 0xEB96, + 38675 - 11905: 0xC4DE, + 38676 - 11905: 0xEB97, + 38677 - 11905: 0xEB98, + 38678 - 11905: 0xC1D8, + 38679 - 11905: 0xEB99, + 38680 - 11905: 0xEB9A, + 38681 - 11905: 0xEB9B, + 38682 - 11905: 0xEB9C, + 38683 - 11905: 0xEB9D, + 38684 - 11905: 0xCBAA, + 38685 - 11905: 0xEB9E, + 38686 - 11905: 0xCFBC, + 38687 - 11905: 0xEB9F, + 38688 - 11905: 0xEBA0, + 38689 - 11905: 0xEC40, + 38690 - 11905: 0xEC41, + 38691 - 11905: 0xEC42, + 38692 - 11905: 0xEC43, + 38693 - 11905: 0xEC44, + 38694 - 11905: 0xEC45, + 38695 - 11905: 0xEC46, + 38696 - 11905: 0xEC47, + 38697 - 11905: 0xEC48, + 38698 - 11905: 0xF6AF, + 38699 - 11905: 0xEC49, + 38700 - 11905: 0xEC4A, + 38701 - 11905: 0xF6B0, + 38702 - 11905: 0xEC4B, + 38703 - 11905: 0xEC4C, + 38704 - 11905: 0xF6B1, + 38705 - 11905: 0xEC4D, + 38706 - 11905: 0xC2B6, + 38707 - 11905: 0xEC4E, + 38708 - 11905: 0xEC4F, + 38709 - 11905: 0xEC50, + 38710 - 11905: 0xEC51, + 38711 - 11905: 0xEC52, + 38712 - 11905: 0xB0D4, + 38713 - 11905: 0xC5F9, + 38714 - 11905: 0xEC53, + 38715 - 11905: 0xEC54, + 38716 - 11905: 0xEC55, + 38717 - 11905: 0xEC56, + 38718 - 11905: 0xF6B2, + 38719 - 11905: 0xEC57, + 38720 - 11905: 0xEC58, + 38721 - 11905: 0xEC59, + 38722 - 11905: 0xEC5A, + 38723 - 11905: 0xEC5B, + 38724 - 11905: 0xEC5C, + 38725 - 11905: 0xEC5D, + 38726 - 11905: 0xEC5E, + 38727 - 11905: 0xEC5F, + 38728 - 11905: 0xEC60, + 38729 - 11905: 0xEC61, + 38730 - 11905: 0xEC62, + 38731 - 11905: 0xEC63, + 38732 - 11905: 0xEC64, + 38733 - 11905: 0xEC65, + 38734 - 11905: 0xEC66, + 38735 - 11905: 0xEC67, + 38736 - 11905: 0xEC68, + 38737 - 11905: 0xEC69, + 38738 - 11905: 0xC7E0, + 38739 - 11905: 0xF6A6, + 38740 - 11905: 0xEC6A, + 38741 - 11905: 0xEC6B, + 38742 - 11905: 0xBEB8, + 38743 - 11905: 0xEC6C, + 38744 - 11905: 0xEC6D, + 38745 - 11905: 0xBEB2, + 38746 - 11905: 0xEC6E, + 38747 - 11905: 0xB5E5, + 38748 - 11905: 0xEC6F, + 38749 - 11905: 0xEC70, + 38750 - 11905: 0xB7C7, + 38751 - 11905: 0xEC71, + 38752 - 11905: 0xBFBF, + 38753 - 11905: 0xC3D2, + 38754 - 11905: 0xC3E6, + 38755 - 11905: 0xEC72, + 38756 - 11905: 0xEC73, + 38757 - 11905: 0xD8CC, + 38758 - 11905: 0xEC74, + 38759 - 11905: 0xEC75, + 38760 - 11905: 0xEC76, + 38761 - 11905: 0xB8EF, + 38762 - 11905: 0xEC77, + 38763 - 11905: 0xEC78, + 38764 - 11905: 0xEC79, + 38765 - 11905: 0xEC7A, + 38766 - 11905: 0xEC7B, + 38767 - 11905: 0xEC7C, + 38768 - 11905: 0xEC7D, + 38769 - 11905: 0xEC7E, + 38770 - 11905: 0xEC80, + 38771 - 11905: 0xBDF9, + 38772 - 11905: 0xD1A5, + 38773 - 11905: 0xEC81, + 38774 - 11905: 0xB0D0, + 38775 - 11905: 0xEC82, + 38776 - 11905: 0xEC83, + 38777 - 11905: 0xEC84, + 38778 - 11905: 0xEC85, + 38779 - 11905: 0xEC86, + 38780 - 11905: 0xF7B0, + 38781 - 11905: 0xEC87, + 38782 - 11905: 0xEC88, + 38783 - 11905: 0xEC89, + 38784 - 11905: 0xEC8A, + 38785 - 11905: 0xEC8B, + 38786 - 11905: 0xEC8C, + 38787 - 11905: 0xEC8D, + 38788 - 11905: 0xEC8E, + 38789 - 11905: 0xF7B1, + 38790 - 11905: 0xEC8F, + 38791 - 11905: 0xEC90, + 38792 - 11905: 0xEC91, + 38793 - 11905: 0xEC92, + 38794 - 11905: 0xEC93, + 38795 - 11905: 0xD0AC, + 38796 - 11905: 0xEC94, + 38797 - 11905: 0xB0B0, + 38798 - 11905: 0xEC95, + 38799 - 11905: 0xEC96, + 38800 - 11905: 0xEC97, + 38801 - 11905: 0xF7B2, + 38802 - 11905: 0xF7B3, + 38803 - 11905: 0xEC98, + 38804 - 11905: 0xF7B4, + 38805 - 11905: 0xEC99, + 38806 - 11905: 0xEC9A, + 38807 - 11905: 0xEC9B, + 38808 - 11905: 0xC7CA, + 38809 - 11905: 0xEC9C, + 38810 - 11905: 0xEC9D, + 38811 - 11905: 0xEC9E, + 38812 - 11905: 0xEC9F, + 38813 - 11905: 0xECA0, + 38814 - 11905: 0xED40, + 38815 - 11905: 0xED41, + 38816 - 11905: 0xBECF, + 38817 - 11905: 0xED42, + 38818 - 11905: 0xED43, + 38819 - 11905: 0xF7B7, + 38820 - 11905: 0xED44, + 38821 - 11905: 0xED45, + 38822 - 11905: 0xED46, + 38823 - 11905: 0xED47, + 38824 - 11905: 0xED48, + 38825 - 11905: 0xED49, + 38826 - 11905: 0xED4A, + 38827 - 11905: 0xF7B6, + 38828 - 11905: 0xED4B, + 38829 - 11905: 0xB1DE, + 38830 - 11905: 0xED4C, + 38831 - 11905: 0xF7B5, + 38832 - 11905: 0xED4D, + 38833 - 11905: 0xED4E, + 38834 - 11905: 0xF7B8, + 38835 - 11905: 0xED4F, + 38836 - 11905: 0xF7B9, + 38837 - 11905: 0xED50, + 38838 - 11905: 0xED51, + 38839 - 11905: 0xED52, + 38840 - 11905: 0xED53, + 38841 - 11905: 0xED54, + 38842 - 11905: 0xED55, + 38843 - 11905: 0xED56, + 38844 - 11905: 0xED57, + 38845 - 11905: 0xED58, + 38846 - 11905: 0xED59, + 38847 - 11905: 0xED5A, + 38848 - 11905: 0xED5B, + 38849 - 11905: 0xED5C, + 38850 - 11905: 0xED5D, + 38851 - 11905: 0xED5E, + 38852 - 11905: 0xED5F, + 38853 - 11905: 0xED60, + 38854 - 11905: 0xED61, + 38855 - 11905: 0xED62, + 38856 - 11905: 0xED63, + 38857 - 11905: 0xED64, + 38858 - 11905: 0xED65, + 38859 - 11905: 0xED66, + 38860 - 11905: 0xED67, + 38861 - 11905: 0xED68, + 38862 - 11905: 0xED69, + 38863 - 11905: 0xED6A, + 38864 - 11905: 0xED6B, + 38865 - 11905: 0xED6C, + 38866 - 11905: 0xED6D, + 38867 - 11905: 0xED6E, + 38868 - 11905: 0xED6F, + 38869 - 11905: 0xED70, + 38870 - 11905: 0xED71, + 38871 - 11905: 0xED72, + 38872 - 11905: 0xED73, + 38873 - 11905: 0xED74, + 38874 - 11905: 0xED75, + 38875 - 11905: 0xED76, + 38876 - 11905: 0xED77, + 38877 - 11905: 0xED78, + 38878 - 11905: 0xED79, + 38879 - 11905: 0xED7A, + 38880 - 11905: 0xED7B, + 38881 - 11905: 0xED7C, + 38882 - 11905: 0xED7D, + 38883 - 11905: 0xED7E, + 38884 - 11905: 0xED80, + 38885 - 11905: 0xED81, + 38886 - 11905: 0xCEA4, + 38887 - 11905: 0xC8CD, + 38888 - 11905: 0xED82, + 38889 - 11905: 0xBAAB, + 38890 - 11905: 0xE8B8, + 38891 - 11905: 0xE8B9, + 38892 - 11905: 0xE8BA, + 38893 - 11905: 0xBEC2, + 38894 - 11905: 0xED83, + 38895 - 11905: 0xED84, + 38896 - 11905: 0xED85, + 38897 - 11905: 0xED86, + 38898 - 11905: 0xED87, + 38899 - 11905: 0xD2F4, + 38900 - 11905: 0xED88, + 38901 - 11905: 0xD4CF, + 38902 - 11905: 0xC9D8, + 38903 - 11905: 0xED89, + 38904 - 11905: 0xED8A, + 38905 - 11905: 0xED8B, + 38906 - 11905: 0xED8C, + 38907 - 11905: 0xED8D, + 38908 - 11905: 0xED8E, + 38909 - 11905: 0xED8F, + 38910 - 11905: 0xED90, + 38911 - 11905: 0xED91, + 38912 - 11905: 0xED92, + 38913 - 11905: 0xED93, + 38914 - 11905: 0xED94, + 38915 - 11905: 0xED95, + 38916 - 11905: 0xED96, + 38917 - 11905: 0xED97, + 38918 - 11905: 0xED98, + 38919 - 11905: 0xED99, + 38920 - 11905: 0xED9A, + 38921 - 11905: 0xED9B, + 38922 - 11905: 0xED9C, + 38923 - 11905: 0xED9D, + 38924 - 11905: 0xED9E, + 38925 - 11905: 0xED9F, + 38926 - 11905: 0xEDA0, + 38927 - 11905: 0xEE40, + 38928 - 11905: 0xEE41, + 38929 - 11905: 0xEE42, + 38930 - 11905: 0xEE43, + 38931 - 11905: 0xEE44, + 38932 - 11905: 0xEE45, + 38933 - 11905: 0xEE46, + 38934 - 11905: 0xEE47, + 38935 - 11905: 0xEE48, + 38936 - 11905: 0xEE49, + 38937 - 11905: 0xEE4A, + 38938 - 11905: 0xEE4B, + 38939 - 11905: 0xEE4C, + 38940 - 11905: 0xEE4D, + 38941 - 11905: 0xEE4E, + 38942 - 11905: 0xEE4F, + 38943 - 11905: 0xEE50, + 38944 - 11905: 0xEE51, + 38945 - 11905: 0xEE52, + 38946 - 11905: 0xEE53, + 38947 - 11905: 0xEE54, + 38948 - 11905: 0xEE55, + 38949 - 11905: 0xEE56, + 38950 - 11905: 0xEE57, + 38951 - 11905: 0xEE58, + 38952 - 11905: 0xEE59, + 38953 - 11905: 0xEE5A, + 38954 - 11905: 0xEE5B, + 38955 - 11905: 0xEE5C, + 38956 - 11905: 0xEE5D, + 38957 - 11905: 0xEE5E, + 38958 - 11905: 0xEE5F, + 38959 - 11905: 0xEE60, + 38960 - 11905: 0xEE61, + 38961 - 11905: 0xEE62, + 38962 - 11905: 0xEE63, + 38963 - 11905: 0xEE64, + 38964 - 11905: 0xEE65, + 38965 - 11905: 0xEE66, + 38966 - 11905: 0xEE67, + 38967 - 11905: 0xEE68, + 38968 - 11905: 0xEE69, + 38969 - 11905: 0xEE6A, + 38970 - 11905: 0xEE6B, + 38971 - 11905: 0xEE6C, + 38972 - 11905: 0xEE6D, + 38973 - 11905: 0xEE6E, + 38974 - 11905: 0xEE6F, + 38975 - 11905: 0xEE70, + 38976 - 11905: 0xEE71, + 38977 - 11905: 0xEE72, + 38978 - 11905: 0xEE73, + 38979 - 11905: 0xEE74, + 38980 - 11905: 0xEE75, + 38981 - 11905: 0xEE76, + 38982 - 11905: 0xEE77, + 38983 - 11905: 0xEE78, + 38984 - 11905: 0xEE79, + 38985 - 11905: 0xEE7A, + 38986 - 11905: 0xEE7B, + 38987 - 11905: 0xEE7C, + 38988 - 11905: 0xEE7D, + 38989 - 11905: 0xEE7E, + 38990 - 11905: 0xEE80, + 38991 - 11905: 0xEE81, + 38992 - 11905: 0xEE82, + 38993 - 11905: 0xEE83, + 38994 - 11905: 0xEE84, + 38995 - 11905: 0xEE85, + 38996 - 11905: 0xEE86, + 38997 - 11905: 0xEE87, + 38998 - 11905: 0xEE88, + 38999 - 11905: 0xEE89, + 39000 - 11905: 0xEE8A, + 39001 - 11905: 0xEE8B, + 39002 - 11905: 0xEE8C, + 39003 - 11905: 0xEE8D, + 39004 - 11905: 0xEE8E, + 39005 - 11905: 0xEE8F, + 39006 - 11905: 0xEE90, + 39007 - 11905: 0xEE91, + 39008 - 11905: 0xEE92, + 39009 - 11905: 0xEE93, + 39010 - 11905: 0xEE94, + 39011 - 11905: 0xEE95, + 39012 - 11905: 0xEE96, + 39013 - 11905: 0xEE97, + 39014 - 11905: 0xEE98, + 39015 - 11905: 0xEE99, + 39016 - 11905: 0xEE9A, + 39017 - 11905: 0xEE9B, + 39018 - 11905: 0xEE9C, + 39019 - 11905: 0xEE9D, + 39020 - 11905: 0xEE9E, + 39021 - 11905: 0xEE9F, + 39022 - 11905: 0xEEA0, + 39023 - 11905: 0xEF40, + 39024 - 11905: 0xEF41, + 39025 - 11905: 0xEF42, + 39026 - 11905: 0xEF43, + 39027 - 11905: 0xEF44, + 39028 - 11905: 0xEF45, + 39029 - 11905: 0xD2B3, + 39030 - 11905: 0xB6A5, + 39031 - 11905: 0xC7EA, + 39032 - 11905: 0xF1FC, + 39033 - 11905: 0xCFEE, + 39034 - 11905: 0xCBB3, + 39035 - 11905: 0xD0EB, + 39036 - 11905: 0xE7EF, + 39037 - 11905: 0xCDE7, + 39038 - 11905: 0xB9CB, + 39039 - 11905: 0xB6D9, + 39040 - 11905: 0xF1FD, + 39041 - 11905: 0xB0E4, + 39042 - 11905: 0xCBCC, + 39043 - 11905: 0xF1FE, + 39044 - 11905: 0xD4A4, + 39045 - 11905: 0xC2AD, + 39046 - 11905: 0xC1EC, + 39047 - 11905: 0xC6C4, + 39048 - 11905: 0xBEB1, + 39049 - 11905: 0xF2A1, + 39050 - 11905: 0xBCD5, + 39051 - 11905: 0xEF46, + 39052 - 11905: 0xF2A2, + 39053 - 11905: 0xF2A3, + 39054 - 11905: 0xEF47, + 39055 - 11905: 0xF2A4, + 39056 - 11905: 0xD2C3, + 39057 - 11905: 0xC6B5, + 39058 - 11905: 0xEF48, + 39059 - 11905: 0xCDC7, + 39060 - 11905: 0xF2A5, + 39061 - 11905: 0xEF49, + 39062 - 11905: 0xD3B1, + 39063 - 11905: 0xBFC5, + 39064 - 11905: 0xCCE2, + 39065 - 11905: 0xEF4A, + 39066 - 11905: 0xF2A6, + 39067 - 11905: 0xF2A7, + 39068 - 11905: 0xD1D5, + 39069 - 11905: 0xB6EE, + 39070 - 11905: 0xF2A8, + 39071 - 11905: 0xF2A9, + 39072 - 11905: 0xB5DF, + 39073 - 11905: 0xF2AA, + 39074 - 11905: 0xF2AB, + 39075 - 11905: 0xEF4B, + 39076 - 11905: 0xB2FC, + 39077 - 11905: 0xF2AC, + 39078 - 11905: 0xF2AD, + 39079 - 11905: 0xC8A7, + 39080 - 11905: 0xEF4C, + 39081 - 11905: 0xEF4D, + 39082 - 11905: 0xEF4E, + 39083 - 11905: 0xEF4F, + 39084 - 11905: 0xEF50, + 39085 - 11905: 0xEF51, + 39086 - 11905: 0xEF52, + 39087 - 11905: 0xEF53, + 39088 - 11905: 0xEF54, + 39089 - 11905: 0xEF55, + 39090 - 11905: 0xEF56, + 39091 - 11905: 0xEF57, + 39092 - 11905: 0xEF58, + 39093 - 11905: 0xEF59, + 39094 - 11905: 0xEF5A, + 39095 - 11905: 0xEF5B, + 39096 - 11905: 0xEF5C, + 39097 - 11905: 0xEF5D, + 39098 - 11905: 0xEF5E, + 39099 - 11905: 0xEF5F, + 39100 - 11905: 0xEF60, + 39101 - 11905: 0xEF61, + 39102 - 11905: 0xEF62, + 39103 - 11905: 0xEF63, + 39104 - 11905: 0xEF64, + 39105 - 11905: 0xEF65, + 39106 - 11905: 0xEF66, + 39107 - 11905: 0xEF67, + 39108 - 11905: 0xEF68, + 39109 - 11905: 0xEF69, + 39110 - 11905: 0xEF6A, + 39111 - 11905: 0xEF6B, + 39112 - 11905: 0xEF6C, + 39113 - 11905: 0xEF6D, + 39114 - 11905: 0xEF6E, + 39115 - 11905: 0xEF6F, + 39116 - 11905: 0xEF70, + 39117 - 11905: 0xEF71, + 39118 - 11905: 0xB7E7, + 39119 - 11905: 0xEF72, + 39120 - 11905: 0xEF73, + 39121 - 11905: 0xECA9, + 39122 - 11905: 0xECAA, + 39123 - 11905: 0xECAB, + 39124 - 11905: 0xEF74, + 39125 - 11905: 0xECAC, + 39126 - 11905: 0xEF75, + 39127 - 11905: 0xEF76, + 39128 - 11905: 0xC6AE, + 39129 - 11905: 0xECAD, + 39130 - 11905: 0xECAE, + 39131 - 11905: 0xEF77, + 39132 - 11905: 0xEF78, + 39133 - 11905: 0xEF79, + 39134 - 11905: 0xB7C9, + 39135 - 11905: 0xCAB3, + 39136 - 11905: 0xEF7A, + 39137 - 11905: 0xEF7B, + 39138 - 11905: 0xEF7C, + 39139 - 11905: 0xEF7D, + 39140 - 11905: 0xEF7E, + 39141 - 11905: 0xEF80, + 39142 - 11905: 0xEF81, + 39143 - 11905: 0xE2B8, + 39144 - 11905: 0xF7CF, + 39145 - 11905: 0xEF82, + 39146 - 11905: 0xEF83, + 39147 - 11905: 0xEF84, + 39148 - 11905: 0xEF85, + 39149 - 11905: 0xEF86, + 39150 - 11905: 0xEF87, + 39151 - 11905: 0xEF88, + 39152 - 11905: 0xEF89, + 39153 - 11905: 0xEF8A, + 39154 - 11905: 0xEF8B, + 39155 - 11905: 0xEF8C, + 39156 - 11905: 0xEF8D, + 39157 - 11905: 0xEF8E, + 39158 - 11905: 0xEF8F, + 39159 - 11905: 0xEF90, + 39160 - 11905: 0xEF91, + 39161 - 11905: 0xEF92, + 39162 - 11905: 0xEF93, + 39163 - 11905: 0xEF94, + 39164 - 11905: 0xEF95, + 39165 - 11905: 0xEF96, + 39166 - 11905: 0xEF97, + 39167 - 11905: 0xEF98, + 39168 - 11905: 0xEF99, + 39169 - 11905: 0xEF9A, + 39170 - 11905: 0xEF9B, + 39171 - 11905: 0xEF9C, + 39172 - 11905: 0xEF9D, + 39173 - 11905: 0xEF9E, + 39174 - 11905: 0xEF9F, + 39175 - 11905: 0xEFA0, + 39176 - 11905: 0xF040, + 39177 - 11905: 0xF041, + 39178 - 11905: 0xF042, + 39179 - 11905: 0xF043, + 39180 - 11905: 0xF044, + 39181 - 11905: 0xF7D0, + 39182 - 11905: 0xF045, + 39183 - 11905: 0xF046, + 39184 - 11905: 0xB2CD, + 39185 - 11905: 0xF047, + 39186 - 11905: 0xF048, + 39187 - 11905: 0xF049, + 39188 - 11905: 0xF04A, + 39189 - 11905: 0xF04B, + 39190 - 11905: 0xF04C, + 39191 - 11905: 0xF04D, + 39192 - 11905: 0xF04E, + 39193 - 11905: 0xF04F, + 39194 - 11905: 0xF050, + 39195 - 11905: 0xF051, + 39196 - 11905: 0xF052, + 39197 - 11905: 0xF053, + 39198 - 11905: 0xF054, + 39199 - 11905: 0xF055, + 39200 - 11905: 0xF056, + 39201 - 11905: 0xF057, + 39202 - 11905: 0xF058, + 39203 - 11905: 0xF059, + 39204 - 11905: 0xF05A, + 39205 - 11905: 0xF05B, + 39206 - 11905: 0xF05C, + 39207 - 11905: 0xF05D, + 39208 - 11905: 0xF05E, + 39209 - 11905: 0xF05F, + 39210 - 11905: 0xF060, + 39211 - 11905: 0xF061, + 39212 - 11905: 0xF062, + 39213 - 11905: 0xF063, + 39214 - 11905: 0xF7D1, + 39215 - 11905: 0xF064, + 39216 - 11905: 0xF065, + 39217 - 11905: 0xF066, + 39218 - 11905: 0xF067, + 39219 - 11905: 0xF068, + 39220 - 11905: 0xF069, + 39221 - 11905: 0xF06A, + 39222 - 11905: 0xF06B, + 39223 - 11905: 0xF06C, + 39224 - 11905: 0xF06D, + 39225 - 11905: 0xF06E, + 39226 - 11905: 0xF06F, + 39227 - 11905: 0xF070, + 39228 - 11905: 0xF071, + 39229 - 11905: 0xF072, + 39230 - 11905: 0xF073, + 39231 - 11905: 0xF074, + 39232 - 11905: 0xF075, + 39233 - 11905: 0xF076, + 39234 - 11905: 0xF077, + 39235 - 11905: 0xF078, + 39236 - 11905: 0xF079, + 39237 - 11905: 0xF07A, + 39238 - 11905: 0xF07B, + 39239 - 11905: 0xF07C, + 39240 - 11905: 0xF07D, + 39241 - 11905: 0xF07E, + 39242 - 11905: 0xF080, + 39243 - 11905: 0xF081, + 39244 - 11905: 0xF082, + 39245 - 11905: 0xF083, + 39246 - 11905: 0xF084, + 39247 - 11905: 0xF085, + 39248 - 11905: 0xF086, + 39249 - 11905: 0xF087, + 39250 - 11905: 0xF088, + 39251 - 11905: 0xF089, + 39252 - 11905: 0xF7D3, + 39253 - 11905: 0xF7D2, + 39254 - 11905: 0xF08A, + 39255 - 11905: 0xF08B, + 39256 - 11905: 0xF08C, + 39257 - 11905: 0xF08D, + 39258 - 11905: 0xF08E, + 39259 - 11905: 0xF08F, + 39260 - 11905: 0xF090, + 39261 - 11905: 0xF091, + 39262 - 11905: 0xF092, + 39263 - 11905: 0xF093, + 39264 - 11905: 0xF094, + 39265 - 11905: 0xF095, + 39266 - 11905: 0xF096, + 39267 - 11905: 0xE2BB, + 39268 - 11905: 0xF097, + 39269 - 11905: 0xBCA2, + 39270 - 11905: 0xF098, + 39271 - 11905: 0xE2BC, + 39272 - 11905: 0xE2BD, + 39273 - 11905: 0xE2BE, + 39274 - 11905: 0xE2BF, + 39275 - 11905: 0xE2C0, + 39276 - 11905: 0xE2C1, + 39277 - 11905: 0xB7B9, + 39278 - 11905: 0xD2FB, + 39279 - 11905: 0xBDA4, + 39280 - 11905: 0xCACE, + 39281 - 11905: 0xB1A5, + 39282 - 11905: 0xCBC7, + 39283 - 11905: 0xF099, + 39284 - 11905: 0xE2C2, + 39285 - 11905: 0xB6FC, + 39286 - 11905: 0xC8C4, + 39287 - 11905: 0xE2C3, + 39288 - 11905: 0xF09A, + 39289 - 11905: 0xF09B, + 39290 - 11905: 0xBDC8, + 39291 - 11905: 0xF09C, + 39292 - 11905: 0xB1FD, + 39293 - 11905: 0xE2C4, + 39294 - 11905: 0xF09D, + 39295 - 11905: 0xB6F6, + 39296 - 11905: 0xE2C5, + 39297 - 11905: 0xC4D9, + 39298 - 11905: 0xF09E, + 39299 - 11905: 0xF09F, + 39300 - 11905: 0xE2C6, + 39301 - 11905: 0xCFDA, + 39302 - 11905: 0xB9DD, + 39303 - 11905: 0xE2C7, + 39304 - 11905: 0xC0A1, + 39305 - 11905: 0xF0A0, + 39306 - 11905: 0xE2C8, + 39307 - 11905: 0xB2F6, + 39308 - 11905: 0xF140, + 39309 - 11905: 0xE2C9, + 39310 - 11905: 0xF141, + 39311 - 11905: 0xC1F3, + 39312 - 11905: 0xE2CA, + 39313 - 11905: 0xE2CB, + 39314 - 11905: 0xC2F8, + 39315 - 11905: 0xE2CC, + 39316 - 11905: 0xE2CD, + 39317 - 11905: 0xE2CE, + 39318 - 11905: 0xCAD7, + 39319 - 11905: 0xD8B8, + 39320 - 11905: 0xD9E5, + 39321 - 11905: 0xCFE3, + 39322 - 11905: 0xF142, + 39323 - 11905: 0xF143, + 39324 - 11905: 0xF144, + 39325 - 11905: 0xF145, + 39326 - 11905: 0xF146, + 39327 - 11905: 0xF147, + 39328 - 11905: 0xF148, + 39329 - 11905: 0xF149, + 39330 - 11905: 0xF14A, + 39331 - 11905: 0xF14B, + 39332 - 11905: 0xF14C, + 39333 - 11905: 0xF0A5, + 39334 - 11905: 0xF14D, + 39335 - 11905: 0xF14E, + 39336 - 11905: 0xDCB0, + 39337 - 11905: 0xF14F, + 39338 - 11905: 0xF150, + 39339 - 11905: 0xF151, + 39340 - 11905: 0xF152, + 39341 - 11905: 0xF153, + 39342 - 11905: 0xF154, + 39343 - 11905: 0xF155, + 39344 - 11905: 0xF156, + 39345 - 11905: 0xF157, + 39346 - 11905: 0xF158, + 39347 - 11905: 0xF159, + 39348 - 11905: 0xF15A, + 39349 - 11905: 0xF15B, + 39350 - 11905: 0xF15C, + 39351 - 11905: 0xF15D, + 39352 - 11905: 0xF15E, + 39353 - 11905: 0xF15F, + 39354 - 11905: 0xF160, + 39355 - 11905: 0xF161, + 39356 - 11905: 0xF162, + 39357 - 11905: 0xF163, + 39358 - 11905: 0xF164, + 39359 - 11905: 0xF165, + 39360 - 11905: 0xF166, + 39361 - 11905: 0xF167, + 39362 - 11905: 0xF168, + 39363 - 11905: 0xF169, + 39364 - 11905: 0xF16A, + 39365 - 11905: 0xF16B, + 39366 - 11905: 0xF16C, + 39367 - 11905: 0xF16D, + 39368 - 11905: 0xF16E, + 39369 - 11905: 0xF16F, + 39370 - 11905: 0xF170, + 39371 - 11905: 0xF171, + 39372 - 11905: 0xF172, + 39373 - 11905: 0xF173, + 39374 - 11905: 0xF174, + 39375 - 11905: 0xF175, + 39376 - 11905: 0xF176, + 39377 - 11905: 0xF177, + 39378 - 11905: 0xF178, + 39379 - 11905: 0xF179, + 39380 - 11905: 0xF17A, + 39381 - 11905: 0xF17B, + 39382 - 11905: 0xF17C, + 39383 - 11905: 0xF17D, + 39384 - 11905: 0xF17E, + 39385 - 11905: 0xF180, + 39386 - 11905: 0xF181, + 39387 - 11905: 0xF182, + 39388 - 11905: 0xF183, + 39389 - 11905: 0xF184, + 39390 - 11905: 0xF185, + 39391 - 11905: 0xF186, + 39392 - 11905: 0xF187, + 39393 - 11905: 0xF188, + 39394 - 11905: 0xF189, + 39395 - 11905: 0xF18A, + 39396 - 11905: 0xF18B, + 39397 - 11905: 0xF18C, + 39398 - 11905: 0xF18D, + 39399 - 11905: 0xF18E, + 39400 - 11905: 0xF18F, + 39401 - 11905: 0xF190, + 39402 - 11905: 0xF191, + 39403 - 11905: 0xF192, + 39404 - 11905: 0xF193, + 39405 - 11905: 0xF194, + 39406 - 11905: 0xF195, + 39407 - 11905: 0xF196, + 39408 - 11905: 0xF197, + 39409 - 11905: 0xF198, + 39410 - 11905: 0xF199, + 39411 - 11905: 0xF19A, + 39412 - 11905: 0xF19B, + 39413 - 11905: 0xF19C, + 39414 - 11905: 0xF19D, + 39415 - 11905: 0xF19E, + 39416 - 11905: 0xF19F, + 39417 - 11905: 0xF1A0, + 39418 - 11905: 0xF240, + 39419 - 11905: 0xF241, + 39420 - 11905: 0xF242, + 39421 - 11905: 0xF243, + 39422 - 11905: 0xF244, + 39423 - 11905: 0xF245, + 39424 - 11905: 0xF246, + 39425 - 11905: 0xF247, + 39426 - 11905: 0xF248, + 39427 - 11905: 0xF249, + 39428 - 11905: 0xF24A, + 39429 - 11905: 0xF24B, + 39430 - 11905: 0xF24C, + 39431 - 11905: 0xF24D, + 39432 - 11905: 0xF24E, + 39433 - 11905: 0xF24F, + 39434 - 11905: 0xF250, + 39435 - 11905: 0xF251, + 39436 - 11905: 0xF252, + 39437 - 11905: 0xF253, + 39438 - 11905: 0xF254, + 39439 - 11905: 0xF255, + 39440 - 11905: 0xF256, + 39441 - 11905: 0xF257, + 39442 - 11905: 0xF258, + 39443 - 11905: 0xF259, + 39444 - 11905: 0xF25A, + 39445 - 11905: 0xF25B, + 39446 - 11905: 0xF25C, + 39447 - 11905: 0xF25D, + 39448 - 11905: 0xF25E, + 39449 - 11905: 0xF25F, + 39450 - 11905: 0xF260, + 39451 - 11905: 0xF261, + 39452 - 11905: 0xF262, + 39453 - 11905: 0xF263, + 39454 - 11905: 0xF264, + 39455 - 11905: 0xF265, + 39456 - 11905: 0xF266, + 39457 - 11905: 0xF267, + 39458 - 11905: 0xF268, + 39459 - 11905: 0xF269, + 39460 - 11905: 0xF26A, + 39461 - 11905: 0xF26B, + 39462 - 11905: 0xF26C, + 39463 - 11905: 0xF26D, + 39464 - 11905: 0xF26E, + 39465 - 11905: 0xF26F, + 39466 - 11905: 0xF270, + 39467 - 11905: 0xF271, + 39468 - 11905: 0xF272, + 39469 - 11905: 0xF273, + 39470 - 11905: 0xF274, + 39471 - 11905: 0xF275, + 39472 - 11905: 0xF276, + 39473 - 11905: 0xF277, + 39474 - 11905: 0xF278, + 39475 - 11905: 0xF279, + 39476 - 11905: 0xF27A, + 39477 - 11905: 0xF27B, + 39478 - 11905: 0xF27C, + 39479 - 11905: 0xF27D, + 39480 - 11905: 0xF27E, + 39481 - 11905: 0xF280, + 39482 - 11905: 0xF281, + 39483 - 11905: 0xF282, + 39484 - 11905: 0xF283, + 39485 - 11905: 0xF284, + 39486 - 11905: 0xF285, + 39487 - 11905: 0xF286, + 39488 - 11905: 0xF287, + 39489 - 11905: 0xF288, + 39490 - 11905: 0xF289, + 39491 - 11905: 0xF28A, + 39492 - 11905: 0xF28B, + 39493 - 11905: 0xF28C, + 39494 - 11905: 0xF28D, + 39495 - 11905: 0xF28E, + 39496 - 11905: 0xF28F, + 39497 - 11905: 0xF290, + 39498 - 11905: 0xF291, + 39499 - 11905: 0xF292, + 39500 - 11905: 0xF293, + 39501 - 11905: 0xF294, + 39502 - 11905: 0xF295, + 39503 - 11905: 0xF296, + 39504 - 11905: 0xF297, + 39505 - 11905: 0xF298, + 39506 - 11905: 0xF299, + 39507 - 11905: 0xF29A, + 39508 - 11905: 0xF29B, + 39509 - 11905: 0xF29C, + 39510 - 11905: 0xF29D, + 39511 - 11905: 0xF29E, + 39512 - 11905: 0xF29F, + 39513 - 11905: 0xF2A0, + 39514 - 11905: 0xF340, + 39515 - 11905: 0xF341, + 39516 - 11905: 0xF342, + 39517 - 11905: 0xF343, + 39518 - 11905: 0xF344, + 39519 - 11905: 0xF345, + 39520 - 11905: 0xF346, + 39521 - 11905: 0xF347, + 39522 - 11905: 0xF348, + 39523 - 11905: 0xF349, + 39524 - 11905: 0xF34A, + 39525 - 11905: 0xF34B, + 39526 - 11905: 0xF34C, + 39527 - 11905: 0xF34D, + 39528 - 11905: 0xF34E, + 39529 - 11905: 0xF34F, + 39530 - 11905: 0xF350, + 39531 - 11905: 0xF351, + 39532 - 11905: 0xC2ED, + 39533 - 11905: 0xD4A6, + 39534 - 11905: 0xCDD4, + 39535 - 11905: 0xD1B1, + 39536 - 11905: 0xB3DB, + 39537 - 11905: 0xC7FD, + 39538 - 11905: 0xF352, + 39539 - 11905: 0xB2B5, + 39540 - 11905: 0xC2BF, + 39541 - 11905: 0xE6E0, + 39542 - 11905: 0xCABB, + 39543 - 11905: 0xE6E1, + 39544 - 11905: 0xE6E2, + 39545 - 11905: 0xBED4, + 39546 - 11905: 0xE6E3, + 39547 - 11905: 0xD7A4, + 39548 - 11905: 0xCDD5, + 39549 - 11905: 0xE6E5, + 39550 - 11905: 0xBCDD, + 39551 - 11905: 0xE6E4, + 39552 - 11905: 0xE6E6, + 39553 - 11905: 0xE6E7, + 39554 - 11905: 0xC2EE, + 39555 - 11905: 0xF353, + 39556 - 11905: 0xBDBE, + 39557 - 11905: 0xE6E8, + 39558 - 11905: 0xC2E6, + 39559 - 11905: 0xBAA7, + 39560 - 11905: 0xE6E9, + 39561 - 11905: 0xF354, + 39562 - 11905: 0xE6EA, + 39563 - 11905: 0xB3D2, + 39564 - 11905: 0xD1E9, + 39565 - 11905: 0xF355, + 39566 - 11905: 0xF356, + 39567 - 11905: 0xBFA5, + 39568 - 11905: 0xE6EB, + 39569 - 11905: 0xC6EF, + 39570 - 11905: 0xE6EC, + 39571 - 11905: 0xE6ED, + 39572 - 11905: 0xF357, + 39573 - 11905: 0xF358, + 39574 - 11905: 0xE6EE, + 39575 - 11905: 0xC6AD, + 39576 - 11905: 0xE6EF, + 39577 - 11905: 0xF359, + 39578 - 11905: 0xC9A7, + 39579 - 11905: 0xE6F0, + 39580 - 11905: 0xE6F1, + 39581 - 11905: 0xE6F2, + 39582 - 11905: 0xE5B9, + 39583 - 11905: 0xE6F3, + 39584 - 11905: 0xE6F4, + 39585 - 11905: 0xC2E2, + 39586 - 11905: 0xE6F5, + 39587 - 11905: 0xE6F6, + 39588 - 11905: 0xD6E8, + 39589 - 11905: 0xE6F7, + 39590 - 11905: 0xF35A, + 39591 - 11905: 0xE6F8, + 39592 - 11905: 0xB9C7, + 39593 - 11905: 0xF35B, + 39594 - 11905: 0xF35C, + 39595 - 11905: 0xF35D, + 39596 - 11905: 0xF35E, + 39597 - 11905: 0xF35F, + 39598 - 11905: 0xF360, + 39599 - 11905: 0xF361, + 39600 - 11905: 0xF7BB, + 39601 - 11905: 0xF7BA, + 39602 - 11905: 0xF362, + 39603 - 11905: 0xF363, + 39604 - 11905: 0xF364, + 39605 - 11905: 0xF365, + 39606 - 11905: 0xF7BE, + 39607 - 11905: 0xF7BC, + 39608 - 11905: 0xBAA1, + 39609 - 11905: 0xF366, + 39610 - 11905: 0xF7BF, + 39611 - 11905: 0xF367, + 39612 - 11905: 0xF7C0, + 39613 - 11905: 0xF368, + 39614 - 11905: 0xF369, + 39615 - 11905: 0xF36A, + 39616 - 11905: 0xF7C2, + 39617 - 11905: 0xF7C1, + 39618 - 11905: 0xF7C4, + 39619 - 11905: 0xF36B, + 39620 - 11905: 0xF36C, + 39621 - 11905: 0xF7C3, + 39622 - 11905: 0xF36D, + 39623 - 11905: 0xF36E, + 39624 - 11905: 0xF36F, + 39625 - 11905: 0xF370, + 39626 - 11905: 0xF371, + 39627 - 11905: 0xF7C5, + 39628 - 11905: 0xF7C6, + 39629 - 11905: 0xF372, + 39630 - 11905: 0xF373, + 39631 - 11905: 0xF374, + 39632 - 11905: 0xF375, + 39633 - 11905: 0xF7C7, + 39634 - 11905: 0xF376, + 39635 - 11905: 0xCBE8, + 39636 - 11905: 0xF377, + 39637 - 11905: 0xF378, + 39638 - 11905: 0xF379, + 39639 - 11905: 0xF37A, + 39640 - 11905: 0xB8DF, + 39641 - 11905: 0xF37B, + 39642 - 11905: 0xF37C, + 39643 - 11905: 0xF37D, + 39644 - 11905: 0xF37E, + 39645 - 11905: 0xF380, + 39646 - 11905: 0xF381, + 39647 - 11905: 0xF7D4, + 39648 - 11905: 0xF382, + 39649 - 11905: 0xF7D5, + 39650 - 11905: 0xF383, + 39651 - 11905: 0xF384, + 39652 - 11905: 0xF385, + 39653 - 11905: 0xF386, + 39654 - 11905: 0xF7D6, + 39655 - 11905: 0xF387, + 39656 - 11905: 0xF388, + 39657 - 11905: 0xF389, + 39658 - 11905: 0xF38A, + 39659 - 11905: 0xF7D8, + 39660 - 11905: 0xF38B, + 39661 - 11905: 0xF7DA, + 39662 - 11905: 0xF38C, + 39663 - 11905: 0xF7D7, + 39664 - 11905: 0xF38D, + 39665 - 11905: 0xF38E, + 39666 - 11905: 0xF38F, + 39667 - 11905: 0xF390, + 39668 - 11905: 0xF391, + 39669 - 11905: 0xF392, + 39670 - 11905: 0xF393, + 39671 - 11905: 0xF394, + 39672 - 11905: 0xF395, + 39673 - 11905: 0xF7DB, + 39674 - 11905: 0xF396, + 39675 - 11905: 0xF7D9, + 39676 - 11905: 0xF397, + 39677 - 11905: 0xF398, + 39678 - 11905: 0xF399, + 39679 - 11905: 0xF39A, + 39680 - 11905: 0xF39B, + 39681 - 11905: 0xF39C, + 39682 - 11905: 0xF39D, + 39683 - 11905: 0xD7D7, + 39684 - 11905: 0xF39E, + 39685 - 11905: 0xF39F, + 39686 - 11905: 0xF3A0, + 39687 - 11905: 0xF440, + 39688 - 11905: 0xF7DC, + 39689 - 11905: 0xF441, + 39690 - 11905: 0xF442, + 39691 - 11905: 0xF443, + 39692 - 11905: 0xF444, + 39693 - 11905: 0xF445, + 39694 - 11905: 0xF446, + 39695 - 11905: 0xF7DD, + 39696 - 11905: 0xF447, + 39697 - 11905: 0xF448, + 39698 - 11905: 0xF449, + 39699 - 11905: 0xF7DE, + 39700 - 11905: 0xF44A, + 39701 - 11905: 0xF44B, + 39702 - 11905: 0xF44C, + 39703 - 11905: 0xF44D, + 39704 - 11905: 0xF44E, + 39705 - 11905: 0xF44F, + 39706 - 11905: 0xF450, + 39707 - 11905: 0xF451, + 39708 - 11905: 0xF452, + 39709 - 11905: 0xF453, + 39710 - 11905: 0xF454, + 39711 - 11905: 0xF7DF, + 39712 - 11905: 0xF455, + 39713 - 11905: 0xF456, + 39714 - 11905: 0xF457, + 39715 - 11905: 0xF7E0, + 39716 - 11905: 0xF458, + 39717 - 11905: 0xF459, + 39718 - 11905: 0xF45A, + 39719 - 11905: 0xF45B, + 39720 - 11905: 0xF45C, + 39721 - 11905: 0xF45D, + 39722 - 11905: 0xF45E, + 39723 - 11905: 0xF45F, + 39724 - 11905: 0xF460, + 39725 - 11905: 0xF461, + 39726 - 11905: 0xF462, + 39727 - 11905: 0xDBCB, + 39728 - 11905: 0xF463, + 39729 - 11905: 0xF464, + 39730 - 11905: 0xD8AA, + 39731 - 11905: 0xF465, + 39732 - 11905: 0xF466, + 39733 - 11905: 0xF467, + 39734 - 11905: 0xF468, + 39735 - 11905: 0xF469, + 39736 - 11905: 0xF46A, + 39737 - 11905: 0xF46B, + 39738 - 11905: 0xF46C, + 39739 - 11905: 0xE5F7, + 39740 - 11905: 0xB9ED, + 39741 - 11905: 0xF46D, + 39742 - 11905: 0xF46E, + 39743 - 11905: 0xF46F, + 39744 - 11905: 0xF470, + 39745 - 11905: 0xBFFD, + 39746 - 11905: 0xBBEA, + 39747 - 11905: 0xF7C9, + 39748 - 11905: 0xC6C7, + 39749 - 11905: 0xF7C8, + 39750 - 11905: 0xF471, + 39751 - 11905: 0xF7CA, + 39752 - 11905: 0xF7CC, + 39753 - 11905: 0xF7CB, + 39754 - 11905: 0xF472, + 39755 - 11905: 0xF473, + 39756 - 11905: 0xF474, + 39757 - 11905: 0xF7CD, + 39758 - 11905: 0xF475, + 39759 - 11905: 0xCEBA, + 39760 - 11905: 0xF476, + 39761 - 11905: 0xF7CE, + 39762 - 11905: 0xF477, + 39763 - 11905: 0xF478, + 39764 - 11905: 0xC4A7, + 39765 - 11905: 0xF479, + 39766 - 11905: 0xF47A, + 39767 - 11905: 0xF47B, + 39768 - 11905: 0xF47C, + 39769 - 11905: 0xF47D, + 39770 - 11905: 0xF47E, + 39771 - 11905: 0xF480, + 39772 - 11905: 0xF481, + 39773 - 11905: 0xF482, + 39774 - 11905: 0xF483, + 39775 - 11905: 0xF484, + 39776 - 11905: 0xF485, + 39777 - 11905: 0xF486, + 39778 - 11905: 0xF487, + 39779 - 11905: 0xF488, + 39780 - 11905: 0xF489, + 39781 - 11905: 0xF48A, + 39782 - 11905: 0xF48B, + 39783 - 11905: 0xF48C, + 39784 - 11905: 0xF48D, + 39785 - 11905: 0xF48E, + 39786 - 11905: 0xF48F, + 39787 - 11905: 0xF490, + 39788 - 11905: 0xF491, + 39789 - 11905: 0xF492, + 39790 - 11905: 0xF493, + 39791 - 11905: 0xF494, + 39792 - 11905: 0xF495, + 39793 - 11905: 0xF496, + 39794 - 11905: 0xF497, + 39795 - 11905: 0xF498, + 39796 - 11905: 0xF499, + 39797 - 11905: 0xF49A, + 39798 - 11905: 0xF49B, + 39799 - 11905: 0xF49C, + 39800 - 11905: 0xF49D, + 39801 - 11905: 0xF49E, + 39802 - 11905: 0xF49F, + 39803 - 11905: 0xF4A0, + 39804 - 11905: 0xF540, + 39805 - 11905: 0xF541, + 39806 - 11905: 0xF542, + 39807 - 11905: 0xF543, + 39808 - 11905: 0xF544, + 39809 - 11905: 0xF545, + 39810 - 11905: 0xF546, + 39811 - 11905: 0xF547, + 39812 - 11905: 0xF548, + 39813 - 11905: 0xF549, + 39814 - 11905: 0xF54A, + 39815 - 11905: 0xF54B, + 39816 - 11905: 0xF54C, + 39817 - 11905: 0xF54D, + 39818 - 11905: 0xF54E, + 39819 - 11905: 0xF54F, + 39820 - 11905: 0xF550, + 39821 - 11905: 0xF551, + 39822 - 11905: 0xF552, + 39823 - 11905: 0xF553, + 39824 - 11905: 0xF554, + 39825 - 11905: 0xF555, + 39826 - 11905: 0xF556, + 39827 - 11905: 0xF557, + 39828 - 11905: 0xF558, + 39829 - 11905: 0xF559, + 39830 - 11905: 0xF55A, + 39831 - 11905: 0xF55B, + 39832 - 11905: 0xF55C, + 39833 - 11905: 0xF55D, + 39834 - 11905: 0xF55E, + 39835 - 11905: 0xF55F, + 39836 - 11905: 0xF560, + 39837 - 11905: 0xF561, + 39838 - 11905: 0xF562, + 39839 - 11905: 0xF563, + 39840 - 11905: 0xF564, + 39841 - 11905: 0xF565, + 39842 - 11905: 0xF566, + 39843 - 11905: 0xF567, + 39844 - 11905: 0xF568, + 39845 - 11905: 0xF569, + 39846 - 11905: 0xF56A, + 39847 - 11905: 0xF56B, + 39848 - 11905: 0xF56C, + 39849 - 11905: 0xF56D, + 39850 - 11905: 0xF56E, + 39851 - 11905: 0xF56F, + 39852 - 11905: 0xF570, + 39853 - 11905: 0xF571, + 39854 - 11905: 0xF572, + 39855 - 11905: 0xF573, + 39856 - 11905: 0xF574, + 39857 - 11905: 0xF575, + 39858 - 11905: 0xF576, + 39859 - 11905: 0xF577, + 39860 - 11905: 0xF578, + 39861 - 11905: 0xF579, + 39862 - 11905: 0xF57A, + 39863 - 11905: 0xF57B, + 39864 - 11905: 0xF57C, + 39865 - 11905: 0xF57D, + 39866 - 11905: 0xF57E, + 39867 - 11905: 0xF580, + 39868 - 11905: 0xF581, + 39869 - 11905: 0xF582, + 39870 - 11905: 0xF583, + 39871 - 11905: 0xF584, + 39872 - 11905: 0xF585, + 39873 - 11905: 0xF586, + 39874 - 11905: 0xF587, + 39875 - 11905: 0xF588, + 39876 - 11905: 0xF589, + 39877 - 11905: 0xF58A, + 39878 - 11905: 0xF58B, + 39879 - 11905: 0xF58C, + 39880 - 11905: 0xF58D, + 39881 - 11905: 0xF58E, + 39882 - 11905: 0xF58F, + 39883 - 11905: 0xF590, + 39884 - 11905: 0xF591, + 39885 - 11905: 0xF592, + 39886 - 11905: 0xF593, + 39887 - 11905: 0xF594, + 39888 - 11905: 0xF595, + 39889 - 11905: 0xF596, + 39890 - 11905: 0xF597, + 39891 - 11905: 0xF598, + 39892 - 11905: 0xF599, + 39893 - 11905: 0xF59A, + 39894 - 11905: 0xF59B, + 39895 - 11905: 0xF59C, + 39896 - 11905: 0xF59D, + 39897 - 11905: 0xF59E, + 39898 - 11905: 0xF59F, + 39899 - 11905: 0xF5A0, + 39900 - 11905: 0xF640, + 39901 - 11905: 0xF641, + 39902 - 11905: 0xF642, + 39903 - 11905: 0xF643, + 39904 - 11905: 0xF644, + 39905 - 11905: 0xF645, + 39906 - 11905: 0xF646, + 39907 - 11905: 0xF647, + 39908 - 11905: 0xF648, + 39909 - 11905: 0xF649, + 39910 - 11905: 0xF64A, + 39911 - 11905: 0xF64B, + 39912 - 11905: 0xF64C, + 39913 - 11905: 0xF64D, + 39914 - 11905: 0xF64E, + 39915 - 11905: 0xF64F, + 39916 - 11905: 0xF650, + 39917 - 11905: 0xF651, + 39918 - 11905: 0xF652, + 39919 - 11905: 0xF653, + 39920 - 11905: 0xF654, + 39921 - 11905: 0xF655, + 39922 - 11905: 0xF656, + 39923 - 11905: 0xF657, + 39924 - 11905: 0xF658, + 39925 - 11905: 0xF659, + 39926 - 11905: 0xF65A, + 39927 - 11905: 0xF65B, + 39928 - 11905: 0xF65C, + 39929 - 11905: 0xF65D, + 39930 - 11905: 0xF65E, + 39931 - 11905: 0xF65F, + 39932 - 11905: 0xF660, + 39933 - 11905: 0xF661, + 39934 - 11905: 0xF662, + 39935 - 11905: 0xF663, + 39936 - 11905: 0xF664, + 39937 - 11905: 0xF665, + 39938 - 11905: 0xF666, + 39939 - 11905: 0xF667, + 39940 - 11905: 0xF668, + 39941 - 11905: 0xF669, + 39942 - 11905: 0xF66A, + 39943 - 11905: 0xF66B, + 39944 - 11905: 0xF66C, + 39945 - 11905: 0xF66D, + 39946 - 11905: 0xF66E, + 39947 - 11905: 0xF66F, + 39948 - 11905: 0xF670, + 39949 - 11905: 0xF671, + 39950 - 11905: 0xF672, + 39951 - 11905: 0xF673, + 39952 - 11905: 0xF674, + 39953 - 11905: 0xF675, + 39954 - 11905: 0xF676, + 39955 - 11905: 0xF677, + 39956 - 11905: 0xF678, + 39957 - 11905: 0xF679, + 39958 - 11905: 0xF67A, + 39959 - 11905: 0xF67B, + 39960 - 11905: 0xF67C, + 39961 - 11905: 0xF67D, + 39962 - 11905: 0xF67E, + 39963 - 11905: 0xF680, + 39964 - 11905: 0xF681, + 39965 - 11905: 0xF682, + 39966 - 11905: 0xF683, + 39967 - 11905: 0xF684, + 39968 - 11905: 0xF685, + 39969 - 11905: 0xF686, + 39970 - 11905: 0xF687, + 39971 - 11905: 0xF688, + 39972 - 11905: 0xF689, + 39973 - 11905: 0xF68A, + 39974 - 11905: 0xF68B, + 39975 - 11905: 0xF68C, + 39976 - 11905: 0xF68D, + 39977 - 11905: 0xF68E, + 39978 - 11905: 0xF68F, + 39979 - 11905: 0xF690, + 39980 - 11905: 0xF691, + 39981 - 11905: 0xF692, + 39982 - 11905: 0xF693, + 39983 - 11905: 0xF694, + 39984 - 11905: 0xF695, + 39985 - 11905: 0xF696, + 39986 - 11905: 0xF697, + 39987 - 11905: 0xF698, + 39988 - 11905: 0xF699, + 39989 - 11905: 0xF69A, + 39990 - 11905: 0xF69B, + 39991 - 11905: 0xF69C, + 39992 - 11905: 0xF69D, + 39993 - 11905: 0xF69E, + 39994 - 11905: 0xF69F, + 39995 - 11905: 0xF6A0, + 39996 - 11905: 0xF740, + 39997 - 11905: 0xF741, + 39998 - 11905: 0xF742, + 39999 - 11905: 0xF743, + 40000 - 11905: 0xF744, + 40001 - 11905: 0xF745, + 40002 - 11905: 0xF746, + 40003 - 11905: 0xF747, + 40004 - 11905: 0xF748, + 40005 - 11905: 0xF749, + 40006 - 11905: 0xF74A, + 40007 - 11905: 0xF74B, + 40008 - 11905: 0xF74C, + 40009 - 11905: 0xF74D, + 40010 - 11905: 0xF74E, + 40011 - 11905: 0xF74F, + 40012 - 11905: 0xF750, + 40013 - 11905: 0xF751, + 40014 - 11905: 0xF752, + 40015 - 11905: 0xF753, + 40016 - 11905: 0xF754, + 40017 - 11905: 0xF755, + 40018 - 11905: 0xF756, + 40019 - 11905: 0xF757, + 40020 - 11905: 0xF758, + 40021 - 11905: 0xF759, + 40022 - 11905: 0xF75A, + 40023 - 11905: 0xF75B, + 40024 - 11905: 0xF75C, + 40025 - 11905: 0xF75D, + 40026 - 11905: 0xF75E, + 40027 - 11905: 0xF75F, + 40028 - 11905: 0xF760, + 40029 - 11905: 0xF761, + 40030 - 11905: 0xF762, + 40031 - 11905: 0xF763, + 40032 - 11905: 0xF764, + 40033 - 11905: 0xF765, + 40034 - 11905: 0xF766, + 40035 - 11905: 0xF767, + 40036 - 11905: 0xF768, + 40037 - 11905: 0xF769, + 40038 - 11905: 0xF76A, + 40039 - 11905: 0xF76B, + 40040 - 11905: 0xF76C, + 40041 - 11905: 0xF76D, + 40042 - 11905: 0xF76E, + 40043 - 11905: 0xF76F, + 40044 - 11905: 0xF770, + 40045 - 11905: 0xF771, + 40046 - 11905: 0xF772, + 40047 - 11905: 0xF773, + 40048 - 11905: 0xF774, + 40049 - 11905: 0xF775, + 40050 - 11905: 0xF776, + 40051 - 11905: 0xF777, + 40052 - 11905: 0xF778, + 40053 - 11905: 0xF779, + 40054 - 11905: 0xF77A, + 40055 - 11905: 0xF77B, + 40056 - 11905: 0xF77C, + 40057 - 11905: 0xF77D, + 40058 - 11905: 0xF77E, + 40059 - 11905: 0xF780, + 40060 - 11905: 0xD3E3, + 40061 - 11905: 0xF781, + 40062 - 11905: 0xF782, + 40063 - 11905: 0xF6CF, + 40064 - 11905: 0xF783, + 40065 - 11905: 0xC2B3, + 40066 - 11905: 0xF6D0, + 40067 - 11905: 0xF784, + 40068 - 11905: 0xF785, + 40069 - 11905: 0xF6D1, + 40070 - 11905: 0xF6D2, + 40071 - 11905: 0xF6D3, + 40072 - 11905: 0xF6D4, + 40073 - 11905: 0xF786, + 40074 - 11905: 0xF787, + 40075 - 11905: 0xF6D6, + 40076 - 11905: 0xF788, + 40077 - 11905: 0xB1AB, + 40078 - 11905: 0xF6D7, + 40079 - 11905: 0xF789, + 40080 - 11905: 0xF6D8, + 40081 - 11905: 0xF6D9, + 40082 - 11905: 0xF6DA, + 40083 - 11905: 0xF78A, + 40084 - 11905: 0xF6DB, + 40085 - 11905: 0xF6DC, + 40086 - 11905: 0xF78B, + 40087 - 11905: 0xF78C, + 40088 - 11905: 0xF78D, + 40089 - 11905: 0xF78E, + 40090 - 11905: 0xF6DD, + 40091 - 11905: 0xF6DE, + 40092 - 11905: 0xCFCA, + 40093 - 11905: 0xF78F, + 40094 - 11905: 0xF6DF, + 40095 - 11905: 0xF6E0, + 40096 - 11905: 0xF6E1, + 40097 - 11905: 0xF6E2, + 40098 - 11905: 0xF6E3, + 40099 - 11905: 0xF6E4, + 40100 - 11905: 0xC0F0, + 40101 - 11905: 0xF6E5, + 40102 - 11905: 0xF6E6, + 40103 - 11905: 0xF6E7, + 40104 - 11905: 0xF6E8, + 40105 - 11905: 0xF6E9, + 40106 - 11905: 0xF790, + 40107 - 11905: 0xF6EA, + 40108 - 11905: 0xF791, + 40109 - 11905: 0xF6EB, + 40110 - 11905: 0xF6EC, + 40111 - 11905: 0xF792, + 40112 - 11905: 0xF6ED, + 40113 - 11905: 0xF6EE, + 40114 - 11905: 0xF6EF, + 40115 - 11905: 0xF6F0, + 40116 - 11905: 0xF6F1, + 40117 - 11905: 0xF6F2, + 40118 - 11905: 0xF6F3, + 40119 - 11905: 0xF6F4, + 40120 - 11905: 0xBEA8, + 40121 - 11905: 0xF793, + 40122 - 11905: 0xF6F5, + 40123 - 11905: 0xF6F6, + 40124 - 11905: 0xF6F7, + 40125 - 11905: 0xF6F8, + 40126 - 11905: 0xF794, + 40127 - 11905: 0xF795, + 40128 - 11905: 0xF796, + 40129 - 11905: 0xF797, + 40130 - 11905: 0xF798, + 40131 - 11905: 0xC8FA, + 40132 - 11905: 0xF6F9, + 40133 - 11905: 0xF6FA, + 40134 - 11905: 0xF6FB, + 40135 - 11905: 0xF6FC, + 40136 - 11905: 0xF799, + 40137 - 11905: 0xF79A, + 40138 - 11905: 0xF6FD, + 40139 - 11905: 0xF6FE, + 40140 - 11905: 0xF7A1, + 40141 - 11905: 0xF7A2, + 40142 - 11905: 0xF7A3, + 40143 - 11905: 0xF7A4, + 40144 - 11905: 0xF7A5, + 40145 - 11905: 0xF79B, + 40146 - 11905: 0xF79C, + 40147 - 11905: 0xF7A6, + 40148 - 11905: 0xF7A7, + 40149 - 11905: 0xF7A8, + 40150 - 11905: 0xB1EE, + 40151 - 11905: 0xF7A9, + 40152 - 11905: 0xF7AA, + 40153 - 11905: 0xF7AB, + 40154 - 11905: 0xF79D, + 40155 - 11905: 0xF79E, + 40156 - 11905: 0xF7AC, + 40157 - 11905: 0xF7AD, + 40158 - 11905: 0xC1DB, + 40159 - 11905: 0xF7AE, + 40160 - 11905: 0xF79F, + 40161 - 11905: 0xF7A0, + 40162 - 11905: 0xF7AF, + 40163 - 11905: 0xF840, + 40164 - 11905: 0xF841, + 40165 - 11905: 0xF842, + 40166 - 11905: 0xF843, + 40167 - 11905: 0xF844, + 40168 - 11905: 0xF845, + 40169 - 11905: 0xF846, + 40170 - 11905: 0xF847, + 40171 - 11905: 0xF848, + 40172 - 11905: 0xF849, + 40173 - 11905: 0xF84A, + 40174 - 11905: 0xF84B, + 40175 - 11905: 0xF84C, + 40176 - 11905: 0xF84D, + 40177 - 11905: 0xF84E, + 40178 - 11905: 0xF84F, + 40179 - 11905: 0xF850, + 40180 - 11905: 0xF851, + 40181 - 11905: 0xF852, + 40182 - 11905: 0xF853, + 40183 - 11905: 0xF854, + 40184 - 11905: 0xF855, + 40185 - 11905: 0xF856, + 40186 - 11905: 0xF857, + 40187 - 11905: 0xF858, + 40188 - 11905: 0xF859, + 40189 - 11905: 0xF85A, + 40190 - 11905: 0xF85B, + 40191 - 11905: 0xF85C, + 40192 - 11905: 0xF85D, + 40193 - 11905: 0xF85E, + 40194 - 11905: 0xF85F, + 40195 - 11905: 0xF860, + 40196 - 11905: 0xF861, + 40197 - 11905: 0xF862, + 40198 - 11905: 0xF863, + 40199 - 11905: 0xF864, + 40200 - 11905: 0xF865, + 40201 - 11905: 0xF866, + 40202 - 11905: 0xF867, + 40203 - 11905: 0xF868, + 40204 - 11905: 0xF869, + 40205 - 11905: 0xF86A, + 40206 - 11905: 0xF86B, + 40207 - 11905: 0xF86C, + 40208 - 11905: 0xF86D, + 40209 - 11905: 0xF86E, + 40210 - 11905: 0xF86F, + 40211 - 11905: 0xF870, + 40212 - 11905: 0xF871, + 40213 - 11905: 0xF872, + 40214 - 11905: 0xF873, + 40215 - 11905: 0xF874, + 40216 - 11905: 0xF875, + 40217 - 11905: 0xF876, + 40218 - 11905: 0xF877, + 40219 - 11905: 0xF878, + 40220 - 11905: 0xF879, + 40221 - 11905: 0xF87A, + 40222 - 11905: 0xF87B, + 40223 - 11905: 0xF87C, + 40224 - 11905: 0xF87D, + 40225 - 11905: 0xF87E, + 40226 - 11905: 0xF880, + 40227 - 11905: 0xF881, + 40228 - 11905: 0xF882, + 40229 - 11905: 0xF883, + 40230 - 11905: 0xF884, + 40231 - 11905: 0xF885, + 40232 - 11905: 0xF886, + 40233 - 11905: 0xF887, + 40234 - 11905: 0xF888, + 40235 - 11905: 0xF889, + 40236 - 11905: 0xF88A, + 40237 - 11905: 0xF88B, + 40238 - 11905: 0xF88C, + 40239 - 11905: 0xF88D, + 40240 - 11905: 0xF88E, + 40241 - 11905: 0xF88F, + 40242 - 11905: 0xF890, + 40243 - 11905: 0xF891, + 40244 - 11905: 0xF892, + 40245 - 11905: 0xF893, + 40246 - 11905: 0xF894, + 40247 - 11905: 0xF895, + 40248 - 11905: 0xF896, + 40249 - 11905: 0xF897, + 40250 - 11905: 0xF898, + 40251 - 11905: 0xF899, + 40252 - 11905: 0xF89A, + 40253 - 11905: 0xF89B, + 40254 - 11905: 0xF89C, + 40255 - 11905: 0xF89D, + 40256 - 11905: 0xF89E, + 40257 - 11905: 0xF89F, + 40258 - 11905: 0xF8A0, + 40259 - 11905: 0xF940, + 40260 - 11905: 0xF941, + 40261 - 11905: 0xF942, + 40262 - 11905: 0xF943, + 40263 - 11905: 0xF944, + 40264 - 11905: 0xF945, + 40265 - 11905: 0xF946, + 40266 - 11905: 0xF947, + 40267 - 11905: 0xF948, + 40268 - 11905: 0xF949, + 40269 - 11905: 0xF94A, + 40270 - 11905: 0xF94B, + 40271 - 11905: 0xF94C, + 40272 - 11905: 0xF94D, + 40273 - 11905: 0xF94E, + 40274 - 11905: 0xF94F, + 40275 - 11905: 0xF950, + 40276 - 11905: 0xF951, + 40277 - 11905: 0xF952, + 40278 - 11905: 0xF953, + 40279 - 11905: 0xF954, + 40280 - 11905: 0xF955, + 40281 - 11905: 0xF956, + 40282 - 11905: 0xF957, + 40283 - 11905: 0xF958, + 40284 - 11905: 0xF959, + 40285 - 11905: 0xF95A, + 40286 - 11905: 0xF95B, + 40287 - 11905: 0xF95C, + 40288 - 11905: 0xF95D, + 40289 - 11905: 0xF95E, + 40290 - 11905: 0xF95F, + 40291 - 11905: 0xF960, + 40292 - 11905: 0xF961, + 40293 - 11905: 0xF962, + 40294 - 11905: 0xF963, + 40295 - 11905: 0xF964, + 40296 - 11905: 0xF965, + 40297 - 11905: 0xF966, + 40298 - 11905: 0xF967, + 40299 - 11905: 0xF968, + 40300 - 11905: 0xF969, + 40301 - 11905: 0xF96A, + 40302 - 11905: 0xF96B, + 40303 - 11905: 0xF96C, + 40304 - 11905: 0xF96D, + 40305 - 11905: 0xF96E, + 40306 - 11905: 0xF96F, + 40307 - 11905: 0xF970, + 40308 - 11905: 0xF971, + 40309 - 11905: 0xF972, + 40310 - 11905: 0xF973, + 40311 - 11905: 0xF974, + 40312 - 11905: 0xF975, + 40313 - 11905: 0xF976, + 40314 - 11905: 0xF977, + 40315 - 11905: 0xF978, + 40316 - 11905: 0xF979, + 40317 - 11905: 0xF97A, + 40318 - 11905: 0xF97B, + 40319 - 11905: 0xF97C, + 40320 - 11905: 0xF97D, + 40321 - 11905: 0xF97E, + 40322 - 11905: 0xF980, + 40323 - 11905: 0xF981, + 40324 - 11905: 0xF982, + 40325 - 11905: 0xF983, + 40326 - 11905: 0xF984, + 40327 - 11905: 0xF985, + 40328 - 11905: 0xF986, + 40329 - 11905: 0xF987, + 40330 - 11905: 0xF988, + 40331 - 11905: 0xF989, + 40332 - 11905: 0xF98A, + 40333 - 11905: 0xF98B, + 40334 - 11905: 0xF98C, + 40335 - 11905: 0xF98D, + 40336 - 11905: 0xF98E, + 40337 - 11905: 0xF98F, + 40338 - 11905: 0xF990, + 40339 - 11905: 0xF991, + 40340 - 11905: 0xF992, + 40341 - 11905: 0xF993, + 40342 - 11905: 0xF994, + 40343 - 11905: 0xF995, + 40344 - 11905: 0xF996, + 40345 - 11905: 0xF997, + 40346 - 11905: 0xF998, + 40347 - 11905: 0xF999, + 40348 - 11905: 0xF99A, + 40349 - 11905: 0xF99B, + 40350 - 11905: 0xF99C, + 40351 - 11905: 0xF99D, + 40352 - 11905: 0xF99E, + 40353 - 11905: 0xF99F, + 40354 - 11905: 0xF9A0, + 40355 - 11905: 0xFA40, + 40356 - 11905: 0xFA41, + 40357 - 11905: 0xFA42, + 40358 - 11905: 0xFA43, + 40359 - 11905: 0xFA44, + 40360 - 11905: 0xFA45, + 40361 - 11905: 0xFA46, + 40362 - 11905: 0xFA47, + 40363 - 11905: 0xFA48, + 40364 - 11905: 0xFA49, + 40365 - 11905: 0xFA4A, + 40366 - 11905: 0xFA4B, + 40367 - 11905: 0xFA4C, + 40368 - 11905: 0xFA4D, + 40369 - 11905: 0xFA4E, + 40370 - 11905: 0xFA4F, + 40371 - 11905: 0xFA50, + 40372 - 11905: 0xFA51, + 40373 - 11905: 0xFA52, + 40374 - 11905: 0xFA53, + 40375 - 11905: 0xFA54, + 40376 - 11905: 0xFA55, + 40377 - 11905: 0xFA56, + 40378 - 11905: 0xFA57, + 40379 - 11905: 0xFA58, + 40380 - 11905: 0xFA59, + 40381 - 11905: 0xFA5A, + 40382 - 11905: 0xFA5B, + 40383 - 11905: 0xFA5C, + 40384 - 11905: 0xFA5D, + 40385 - 11905: 0xFA5E, + 40386 - 11905: 0xFA5F, + 40387 - 11905: 0xFA60, + 40388 - 11905: 0xFA61, + 40389 - 11905: 0xFA62, + 40390 - 11905: 0xFA63, + 40391 - 11905: 0xFA64, + 40392 - 11905: 0xFA65, + 40393 - 11905: 0xFA66, + 40394 - 11905: 0xFA67, + 40395 - 11905: 0xFA68, + 40396 - 11905: 0xFA69, + 40397 - 11905: 0xFA6A, + 40398 - 11905: 0xFA6B, + 40399 - 11905: 0xFA6C, + 40400 - 11905: 0xFA6D, + 40401 - 11905: 0xFA6E, + 40402 - 11905: 0xFA6F, + 40403 - 11905: 0xFA70, + 40404 - 11905: 0xFA71, + 40405 - 11905: 0xFA72, + 40406 - 11905: 0xFA73, + 40407 - 11905: 0xFA74, + 40408 - 11905: 0xFA75, + 40409 - 11905: 0xFA76, + 40410 - 11905: 0xFA77, + 40411 - 11905: 0xFA78, + 40412 - 11905: 0xFA79, + 40413 - 11905: 0xFA7A, + 40414 - 11905: 0xFA7B, + 40415 - 11905: 0xFA7C, + 40416 - 11905: 0xFA7D, + 40417 - 11905: 0xFA7E, + 40418 - 11905: 0xFA80, + 40419 - 11905: 0xFA81, + 40420 - 11905: 0xFA82, + 40421 - 11905: 0xFA83, + 40422 - 11905: 0xFA84, + 40423 - 11905: 0xFA85, + 40424 - 11905: 0xFA86, + 40425 - 11905: 0xFA87, + 40426 - 11905: 0xFA88, + 40427 - 11905: 0xFA89, + 40428 - 11905: 0xFA8A, + 40429 - 11905: 0xFA8B, + 40430 - 11905: 0xFA8C, + 40431 - 11905: 0xFA8D, + 40432 - 11905: 0xFA8E, + 40433 - 11905: 0xFA8F, + 40434 - 11905: 0xFA90, + 40435 - 11905: 0xFA91, + 40436 - 11905: 0xFA92, + 40437 - 11905: 0xFA93, + 40438 - 11905: 0xFA94, + 40439 - 11905: 0xFA95, + 40440 - 11905: 0xFA96, + 40441 - 11905: 0xFA97, + 40442 - 11905: 0xFA98, + 40443 - 11905: 0xFA99, + 40444 - 11905: 0xFA9A, + 40445 - 11905: 0xFA9B, + 40446 - 11905: 0xFA9C, + 40447 - 11905: 0xFA9D, + 40448 - 11905: 0xFA9E, + 40449 - 11905: 0xFA9F, + 40450 - 11905: 0xFAA0, + 40451 - 11905: 0xFB40, + 40452 - 11905: 0xFB41, + 40453 - 11905: 0xFB42, + 40454 - 11905: 0xFB43, + 40455 - 11905: 0xFB44, + 40456 - 11905: 0xFB45, + 40457 - 11905: 0xFB46, + 40458 - 11905: 0xFB47, + 40459 - 11905: 0xFB48, + 40460 - 11905: 0xFB49, + 40461 - 11905: 0xFB4A, + 40462 - 11905: 0xFB4B, + 40463 - 11905: 0xFB4C, + 40464 - 11905: 0xFB4D, + 40465 - 11905: 0xFB4E, + 40466 - 11905: 0xFB4F, + 40467 - 11905: 0xFB50, + 40468 - 11905: 0xFB51, + 40469 - 11905: 0xFB52, + 40470 - 11905: 0xFB53, + 40471 - 11905: 0xFB54, + 40472 - 11905: 0xFB55, + 40473 - 11905: 0xFB56, + 40474 - 11905: 0xFB57, + 40475 - 11905: 0xFB58, + 40476 - 11905: 0xFB59, + 40477 - 11905: 0xFB5A, + 40478 - 11905: 0xFB5B, + 40479 - 11905: 0xC4F1, + 40480 - 11905: 0xF0AF, + 40481 - 11905: 0xBCA6, + 40482 - 11905: 0xF0B0, + 40483 - 11905: 0xC3F9, + 40484 - 11905: 0xFB5C, + 40485 - 11905: 0xC5B8, + 40486 - 11905: 0xD1BB, + 40487 - 11905: 0xFB5D, + 40488 - 11905: 0xF0B1, + 40489 - 11905: 0xF0B2, + 40490 - 11905: 0xF0B3, + 40491 - 11905: 0xF0B4, + 40492 - 11905: 0xF0B5, + 40493 - 11905: 0xD1BC, + 40494 - 11905: 0xFB5E, + 40495 - 11905: 0xD1EC, + 40496 - 11905: 0xFB5F, + 40497 - 11905: 0xF0B7, + 40498 - 11905: 0xF0B6, + 40499 - 11905: 0xD4A7, + 40500 - 11905: 0xFB60, + 40501 - 11905: 0xCDD2, + 40502 - 11905: 0xF0B8, + 40503 - 11905: 0xF0BA, + 40504 - 11905: 0xF0B9, + 40505 - 11905: 0xF0BB, + 40506 - 11905: 0xF0BC, + 40507 - 11905: 0xFB61, + 40508 - 11905: 0xFB62, + 40509 - 11905: 0xB8EB, + 40510 - 11905: 0xF0BD, + 40511 - 11905: 0xBAE8, + 40512 - 11905: 0xFB63, + 40513 - 11905: 0xF0BE, + 40514 - 11905: 0xF0BF, + 40515 - 11905: 0xBEE9, + 40516 - 11905: 0xF0C0, + 40517 - 11905: 0xB6EC, + 40518 - 11905: 0xF0C1, + 40519 - 11905: 0xF0C2, + 40520 - 11905: 0xF0C3, + 40521 - 11905: 0xF0C4, + 40522 - 11905: 0xC8B5, + 40523 - 11905: 0xF0C5, + 40524 - 11905: 0xF0C6, + 40525 - 11905: 0xFB64, + 40526 - 11905: 0xF0C7, + 40527 - 11905: 0xC5F4, + 40528 - 11905: 0xFB65, + 40529 - 11905: 0xF0C8, + 40530 - 11905: 0xFB66, + 40531 - 11905: 0xFB67, + 40532 - 11905: 0xFB68, + 40533 - 11905: 0xF0C9, + 40534 - 11905: 0xFB69, + 40535 - 11905: 0xF0CA, + 40536 - 11905: 0xF7BD, + 40537 - 11905: 0xFB6A, + 40538 - 11905: 0xF0CB, + 40539 - 11905: 0xF0CC, + 40540 - 11905: 0xF0CD, + 40541 - 11905: 0xFB6B, + 40542 - 11905: 0xF0CE, + 40543 - 11905: 0xFB6C, + 40544 - 11905: 0xFB6D, + 40545 - 11905: 0xFB6E, + 40546 - 11905: 0xFB6F, + 40547 - 11905: 0xF0CF, + 40548 - 11905: 0xBAD7, + 40549 - 11905: 0xFB70, + 40550 - 11905: 0xF0D0, + 40551 - 11905: 0xF0D1, + 40552 - 11905: 0xF0D2, + 40553 - 11905: 0xF0D3, + 40554 - 11905: 0xF0D4, + 40555 - 11905: 0xF0D5, + 40556 - 11905: 0xF0D6, + 40557 - 11905: 0xF0D8, + 40558 - 11905: 0xFB71, + 40559 - 11905: 0xFB72, + 40560 - 11905: 0xD3A5, + 40561 - 11905: 0xF0D7, + 40562 - 11905: 0xFB73, + 40563 - 11905: 0xF0D9, + 40564 - 11905: 0xFB74, + 40565 - 11905: 0xFB75, + 40566 - 11905: 0xFB76, + 40567 - 11905: 0xFB77, + 40568 - 11905: 0xFB78, + 40569 - 11905: 0xFB79, + 40570 - 11905: 0xFB7A, + 40571 - 11905: 0xFB7B, + 40572 - 11905: 0xFB7C, + 40573 - 11905: 0xFB7D, + 40574 - 11905: 0xF5BA, + 40575 - 11905: 0xC2B9, + 40576 - 11905: 0xFB7E, + 40577 - 11905: 0xFB80, + 40578 - 11905: 0xF7E4, + 40579 - 11905: 0xFB81, + 40580 - 11905: 0xFB82, + 40581 - 11905: 0xFB83, + 40582 - 11905: 0xFB84, + 40583 - 11905: 0xF7E5, + 40584 - 11905: 0xF7E6, + 40585 - 11905: 0xFB85, + 40586 - 11905: 0xFB86, + 40587 - 11905: 0xF7E7, + 40588 - 11905: 0xFB87, + 40589 - 11905: 0xFB88, + 40590 - 11905: 0xFB89, + 40591 - 11905: 0xFB8A, + 40592 - 11905: 0xFB8B, + 40593 - 11905: 0xFB8C, + 40594 - 11905: 0xF7E8, + 40595 - 11905: 0xC2B4, + 40596 - 11905: 0xFB8D, + 40597 - 11905: 0xFB8E, + 40598 - 11905: 0xFB8F, + 40599 - 11905: 0xFB90, + 40600 - 11905: 0xFB91, + 40601 - 11905: 0xFB92, + 40602 - 11905: 0xFB93, + 40603 - 11905: 0xFB94, + 40604 - 11905: 0xFB95, + 40605 - 11905: 0xF7EA, + 40606 - 11905: 0xFB96, + 40607 - 11905: 0xF7EB, + 40608 - 11905: 0xFB97, + 40609 - 11905: 0xFB98, + 40610 - 11905: 0xFB99, + 40611 - 11905: 0xFB9A, + 40612 - 11905: 0xFB9B, + 40613 - 11905: 0xFB9C, + 40614 - 11905: 0xC2F3, + 40615 - 11905: 0xFB9D, + 40616 - 11905: 0xFB9E, + 40617 - 11905: 0xFB9F, + 40618 - 11905: 0xFBA0, + 40619 - 11905: 0xFC40, + 40620 - 11905: 0xFC41, + 40621 - 11905: 0xFC42, + 40622 - 11905: 0xFC43, + 40623 - 11905: 0xFC44, + 40624 - 11905: 0xFC45, + 40625 - 11905: 0xFC46, + 40626 - 11905: 0xFC47, + 40627 - 11905: 0xFC48, + 40628 - 11905: 0xF4F0, + 40629 - 11905: 0xFC49, + 40630 - 11905: 0xFC4A, + 40631 - 11905: 0xFC4B, + 40632 - 11905: 0xF4EF, + 40633 - 11905: 0xFC4C, + 40634 - 11905: 0xFC4D, + 40635 - 11905: 0xC2E9, + 40636 - 11905: 0xFC4E, + 40637 - 11905: 0xF7E1, + 40638 - 11905: 0xF7E2, + 40639 - 11905: 0xFC4F, + 40640 - 11905: 0xFC50, + 40641 - 11905: 0xFC51, + 40642 - 11905: 0xFC52, + 40643 - 11905: 0xFC53, + 40644 - 11905: 0xBBC6, + 40645 - 11905: 0xFC54, + 40646 - 11905: 0xFC55, + 40647 - 11905: 0xFC56, + 40648 - 11905: 0xFC57, + 40649 - 11905: 0xD9E4, + 40650 - 11905: 0xFC58, + 40651 - 11905: 0xFC59, + 40652 - 11905: 0xFC5A, + 40653 - 11905: 0xCAF2, + 40654 - 11905: 0xC0E8, + 40655 - 11905: 0xF0A4, + 40656 - 11905: 0xFC5B, + 40657 - 11905: 0xBADA, + 40658 - 11905: 0xFC5C, + 40659 - 11905: 0xFC5D, + 40660 - 11905: 0xC7AD, + 40661 - 11905: 0xFC5E, + 40662 - 11905: 0xFC5F, + 40663 - 11905: 0xFC60, + 40664 - 11905: 0xC4AC, + 40665 - 11905: 0xFC61, + 40666 - 11905: 0xFC62, + 40667 - 11905: 0xF7EC, + 40668 - 11905: 0xF7ED, + 40669 - 11905: 0xF7EE, + 40670 - 11905: 0xFC63, + 40671 - 11905: 0xF7F0, + 40672 - 11905: 0xF7EF, + 40673 - 11905: 0xFC64, + 40674 - 11905: 0xF7F1, + 40675 - 11905: 0xFC65, + 40676 - 11905: 0xFC66, + 40677 - 11905: 0xF7F4, + 40678 - 11905: 0xFC67, + 40679 - 11905: 0xF7F3, + 40680 - 11905: 0xFC68, + 40681 - 11905: 0xF7F2, + 40682 - 11905: 0xF7F5, + 40683 - 11905: 0xFC69, + 40684 - 11905: 0xFC6A, + 40685 - 11905: 0xFC6B, + 40686 - 11905: 0xFC6C, + 40687 - 11905: 0xF7F6, + 40688 - 11905: 0xFC6D, + 40689 - 11905: 0xFC6E, + 40690 - 11905: 0xFC6F, + 40691 - 11905: 0xFC70, + 40692 - 11905: 0xFC71, + 40693 - 11905: 0xFC72, + 40694 - 11905: 0xFC73, + 40695 - 11905: 0xFC74, + 40696 - 11905: 0xFC75, + 40697 - 11905: 0xEDE9, + 40698 - 11905: 0xFC76, + 40699 - 11905: 0xEDEA, + 40700 - 11905: 0xEDEB, + 40701 - 11905: 0xFC77, + 40702 - 11905: 0xF6BC, + 40703 - 11905: 0xFC78, + 40704 - 11905: 0xFC79, + 40705 - 11905: 0xFC7A, + 40706 - 11905: 0xFC7B, + 40707 - 11905: 0xFC7C, + 40708 - 11905: 0xFC7D, + 40709 - 11905: 0xFC7E, + 40710 - 11905: 0xFC80, + 40711 - 11905: 0xFC81, + 40712 - 11905: 0xFC82, + 40713 - 11905: 0xFC83, + 40714 - 11905: 0xFC84, + 40715 - 11905: 0xF6BD, + 40716 - 11905: 0xFC85, + 40717 - 11905: 0xF6BE, + 40718 - 11905: 0xB6A6, + 40719 - 11905: 0xFC86, + 40720 - 11905: 0xD8BE, + 40721 - 11905: 0xFC87, + 40722 - 11905: 0xFC88, + 40723 - 11905: 0xB9C4, + 40724 - 11905: 0xFC89, + 40725 - 11905: 0xFC8A, + 40726 - 11905: 0xFC8B, + 40727 - 11905: 0xD8BB, + 40728 - 11905: 0xFC8C, + 40729 - 11905: 0xDCB1, + 40730 - 11905: 0xFC8D, + 40731 - 11905: 0xFC8E, + 40732 - 11905: 0xFC8F, + 40733 - 11905: 0xFC90, + 40734 - 11905: 0xFC91, + 40735 - 11905: 0xFC92, + 40736 - 11905: 0xCAF3, + 40737 - 11905: 0xFC93, + 40738 - 11905: 0xF7F7, + 40739 - 11905: 0xFC94, + 40740 - 11905: 0xFC95, + 40741 - 11905: 0xFC96, + 40742 - 11905: 0xFC97, + 40743 - 11905: 0xFC98, + 40744 - 11905: 0xFC99, + 40745 - 11905: 0xFC9A, + 40746 - 11905: 0xFC9B, + 40747 - 11905: 0xFC9C, + 40748 - 11905: 0xF7F8, + 40749 - 11905: 0xFC9D, + 40750 - 11905: 0xFC9E, + 40751 - 11905: 0xF7F9, + 40752 - 11905: 0xFC9F, + 40753 - 11905: 0xFCA0, + 40754 - 11905: 0xFD40, + 40755 - 11905: 0xFD41, + 40756 - 11905: 0xFD42, + 40757 - 11905: 0xFD43, + 40758 - 11905: 0xFD44, + 40759 - 11905: 0xF7FB, + 40760 - 11905: 0xFD45, + 40761 - 11905: 0xF7FA, + 40762 - 11905: 0xFD46, + 40763 - 11905: 0xB1C7, + 40764 - 11905: 0xFD47, + 40765 - 11905: 0xF7FC, + 40766 - 11905: 0xF7FD, + 40767 - 11905: 0xFD48, + 40768 - 11905: 0xFD49, + 40769 - 11905: 0xFD4A, + 40770 - 11905: 0xFD4B, + 40771 - 11905: 0xFD4C, + 40772 - 11905: 0xF7FE, + 40773 - 11905: 0xFD4D, + 40774 - 11905: 0xFD4E, + 40775 - 11905: 0xFD4F, + 40776 - 11905: 0xFD50, + 40777 - 11905: 0xFD51, + 40778 - 11905: 0xFD52, + 40779 - 11905: 0xFD53, + 40780 - 11905: 0xFD54, + 40781 - 11905: 0xFD55, + 40782 - 11905: 0xFD56, + 40783 - 11905: 0xFD57, + 40784 - 11905: 0xC6EB, + 40785 - 11905: 0xECB4, + 40786 - 11905: 0xFD58, + 40787 - 11905: 0xFD59, + 40788 - 11905: 0xFD5A, + 40789 - 11905: 0xFD5B, + 40790 - 11905: 0xFD5C, + 40791 - 11905: 0xFD5D, + 40792 - 11905: 0xFD5E, + 40793 - 11905: 0xFD5F, + 40794 - 11905: 0xFD60, + 40795 - 11905: 0xFD61, + 40796 - 11905: 0xFD62, + 40797 - 11905: 0xFD63, + 40798 - 11905: 0xFD64, + 40799 - 11905: 0xFD65, + 40800 - 11905: 0xFD66, + 40801 - 11905: 0xFD67, + 40802 - 11905: 0xFD68, + 40803 - 11905: 0xFD69, + 40804 - 11905: 0xFD6A, + 40805 - 11905: 0xFD6B, + 40806 - 11905: 0xFD6C, + 40807 - 11905: 0xFD6D, + 40808 - 11905: 0xFD6E, + 40809 - 11905: 0xFD6F, + 40810 - 11905: 0xFD70, + 40811 - 11905: 0xFD71, + 40812 - 11905: 0xFD72, + 40813 - 11905: 0xFD73, + 40814 - 11905: 0xFD74, + 40815 - 11905: 0xFD75, + 40816 - 11905: 0xFD76, + 40817 - 11905: 0xFD77, + 40818 - 11905: 0xFD78, + 40819 - 11905: 0xFD79, + 40820 - 11905: 0xFD7A, + 40821 - 11905: 0xFD7B, + 40822 - 11905: 0xFD7C, + 40823 - 11905: 0xFD7D, + 40824 - 11905: 0xFD7E, + 40825 - 11905: 0xFD80, + 40826 - 11905: 0xFD81, + 40827 - 11905: 0xFD82, + 40828 - 11905: 0xFD83, + 40829 - 11905: 0xFD84, + 40830 - 11905: 0xFD85, + 40831 - 11905: 0xB3DD, + 40832 - 11905: 0xF6B3, + 40833 - 11905: 0xFD86, + 40834 - 11905: 0xFD87, + 40835 - 11905: 0xF6B4, + 40836 - 11905: 0xC1E4, + 40837 - 11905: 0xF6B5, + 40838 - 11905: 0xF6B6, + 40839 - 11905: 0xF6B7, + 40840 - 11905: 0xF6B8, + 40841 - 11905: 0xF6B9, + 40842 - 11905: 0xF6BA, + 40843 - 11905: 0xC8A3, + 40844 - 11905: 0xF6BB, + 40845 - 11905: 0xFD88, + 40846 - 11905: 0xFD89, + 40847 - 11905: 0xFD8A, + 40848 - 11905: 0xFD8B, + 40849 - 11905: 0xFD8C, + 40850 - 11905: 0xFD8D, + 40851 - 11905: 0xFD8E, + 40852 - 11905: 0xFD8F, + 40853 - 11905: 0xFD90, + 40854 - 11905: 0xFD91, + 40855 - 11905: 0xFD92, + 40856 - 11905: 0xFD93, + 40857 - 11905: 0xC1FA, + 40858 - 11905: 0xB9A8, + 40859 - 11905: 0xEDE8, + 40860 - 11905: 0xFD94, + 40861 - 11905: 0xFD95, + 40862 - 11905: 0xFD96, + 40863 - 11905: 0xB9EA, + 40864 - 11905: 0xD9DF, + 40865 - 11905: 0xFD97, + 40866 - 11905: 0xFD98, + 40867 - 11905: 0xFD99, + 40868 - 11905: 0xFD9A, + 40869 - 11905: 0xFD9B, +} + +const encode1Low, encode1High = 8208, 9795 + +var encode1 = [...]uint16{ + 8208 - 8208: 0xA95C, + 8211 - 8208: 0xA843, + 8212 - 8208: 0xA1AA, + 8213 - 8208: 0xA844, + 8214 - 8208: 0xA1AC, + 8216 - 8208: 0xA1AE, + 8217 - 8208: 0xA1AF, + 8220 - 8208: 0xA1B0, + 8221 - 8208: 0xA1B1, + 8229 - 8208: 0xA845, + 8230 - 8208: 0xA1AD, + 8240 - 8208: 0xA1EB, + 8242 - 8208: 0xA1E4, + 8243 - 8208: 0xA1E5, + 8245 - 8208: 0xA846, + 8251 - 8208: 0xA1F9, + 8364 - 8208: 0xA2E3, + 8451 - 8208: 0xA1E6, + 8453 - 8208: 0xA847, + 8457 - 8208: 0xA848, + 8470 - 8208: 0xA1ED, + 8481 - 8208: 0xA959, + 8544 - 8208: 0xA2F1, + 8545 - 8208: 0xA2F2, + 8546 - 8208: 0xA2F3, + 8547 - 8208: 0xA2F4, + 8548 - 8208: 0xA2F5, + 8549 - 8208: 0xA2F6, + 8550 - 8208: 0xA2F7, + 8551 - 8208: 0xA2F8, + 8552 - 8208: 0xA2F9, + 8553 - 8208: 0xA2FA, + 8554 - 8208: 0xA2FB, + 8555 - 8208: 0xA2FC, + 8560 - 8208: 0xA2A1, + 8561 - 8208: 0xA2A2, + 8562 - 8208: 0xA2A3, + 8563 - 8208: 0xA2A4, + 8564 - 8208: 0xA2A5, + 8565 - 8208: 0xA2A6, + 8566 - 8208: 0xA2A7, + 8567 - 8208: 0xA2A8, + 8568 - 8208: 0xA2A9, + 8569 - 8208: 0xA2AA, + 8592 - 8208: 0xA1FB, + 8593 - 8208: 0xA1FC, + 8594 - 8208: 0xA1FA, + 8595 - 8208: 0xA1FD, + 8598 - 8208: 0xA849, + 8599 - 8208: 0xA84A, + 8600 - 8208: 0xA84B, + 8601 - 8208: 0xA84C, + 8712 - 8208: 0xA1CA, + 8719 - 8208: 0xA1C7, + 8721 - 8208: 0xA1C6, + 8725 - 8208: 0xA84D, + 8730 - 8208: 0xA1CC, + 8733 - 8208: 0xA1D8, + 8734 - 8208: 0xA1DE, + 8735 - 8208: 0xA84E, + 8736 - 8208: 0xA1CF, + 8739 - 8208: 0xA84F, + 8741 - 8208: 0xA1CE, + 8743 - 8208: 0xA1C4, + 8744 - 8208: 0xA1C5, + 8745 - 8208: 0xA1C9, + 8746 - 8208: 0xA1C8, + 8747 - 8208: 0xA1D2, + 8750 - 8208: 0xA1D3, + 8756 - 8208: 0xA1E0, + 8757 - 8208: 0xA1DF, + 8758 - 8208: 0xA1C3, + 8759 - 8208: 0xA1CB, + 8765 - 8208: 0xA1D7, + 8776 - 8208: 0xA1D6, + 8780 - 8208: 0xA1D5, + 8786 - 8208: 0xA850, + 8800 - 8208: 0xA1D9, + 8801 - 8208: 0xA1D4, + 8804 - 8208: 0xA1DC, + 8805 - 8208: 0xA1DD, + 8806 - 8208: 0xA851, + 8807 - 8208: 0xA852, + 8814 - 8208: 0xA1DA, + 8815 - 8208: 0xA1DB, + 8853 - 8208: 0xA892, + 8857 - 8208: 0xA1D1, + 8869 - 8208: 0xA1CD, + 8895 - 8208: 0xA853, + 8978 - 8208: 0xA1D0, + 9312 - 8208: 0xA2D9, + 9313 - 8208: 0xA2DA, + 9314 - 8208: 0xA2DB, + 9315 - 8208: 0xA2DC, + 9316 - 8208: 0xA2DD, + 9317 - 8208: 0xA2DE, + 9318 - 8208: 0xA2DF, + 9319 - 8208: 0xA2E0, + 9320 - 8208: 0xA2E1, + 9321 - 8208: 0xA2E2, + 9332 - 8208: 0xA2C5, + 9333 - 8208: 0xA2C6, + 9334 - 8208: 0xA2C7, + 9335 - 8208: 0xA2C8, + 9336 - 8208: 0xA2C9, + 9337 - 8208: 0xA2CA, + 9338 - 8208: 0xA2CB, + 9339 - 8208: 0xA2CC, + 9340 - 8208: 0xA2CD, + 9341 - 8208: 0xA2CE, + 9342 - 8208: 0xA2CF, + 9343 - 8208: 0xA2D0, + 9344 - 8208: 0xA2D1, + 9345 - 8208: 0xA2D2, + 9346 - 8208: 0xA2D3, + 9347 - 8208: 0xA2D4, + 9348 - 8208: 0xA2D5, + 9349 - 8208: 0xA2D6, + 9350 - 8208: 0xA2D7, + 9351 - 8208: 0xA2D8, + 9352 - 8208: 0xA2B1, + 9353 - 8208: 0xA2B2, + 9354 - 8208: 0xA2B3, + 9355 - 8208: 0xA2B4, + 9356 - 8208: 0xA2B5, + 9357 - 8208: 0xA2B6, + 9358 - 8208: 0xA2B7, + 9359 - 8208: 0xA2B8, + 9360 - 8208: 0xA2B9, + 9361 - 8208: 0xA2BA, + 9362 - 8208: 0xA2BB, + 9363 - 8208: 0xA2BC, + 9364 - 8208: 0xA2BD, + 9365 - 8208: 0xA2BE, + 9366 - 8208: 0xA2BF, + 9367 - 8208: 0xA2C0, + 9368 - 8208: 0xA2C1, + 9369 - 8208: 0xA2C2, + 9370 - 8208: 0xA2C3, + 9371 - 8208: 0xA2C4, + 9472 - 8208: 0xA9A4, + 9473 - 8208: 0xA9A5, + 9474 - 8208: 0xA9A6, + 9475 - 8208: 0xA9A7, + 9476 - 8208: 0xA9A8, + 9477 - 8208: 0xA9A9, + 9478 - 8208: 0xA9AA, + 9479 - 8208: 0xA9AB, + 9480 - 8208: 0xA9AC, + 9481 - 8208: 0xA9AD, + 9482 - 8208: 0xA9AE, + 9483 - 8208: 0xA9AF, + 9484 - 8208: 0xA9B0, + 9485 - 8208: 0xA9B1, + 9486 - 8208: 0xA9B2, + 9487 - 8208: 0xA9B3, + 9488 - 8208: 0xA9B4, + 9489 - 8208: 0xA9B5, + 9490 - 8208: 0xA9B6, + 9491 - 8208: 0xA9B7, + 9492 - 8208: 0xA9B8, + 9493 - 8208: 0xA9B9, + 9494 - 8208: 0xA9BA, + 9495 - 8208: 0xA9BB, + 9496 - 8208: 0xA9BC, + 9497 - 8208: 0xA9BD, + 9498 - 8208: 0xA9BE, + 9499 - 8208: 0xA9BF, + 9500 - 8208: 0xA9C0, + 9501 - 8208: 0xA9C1, + 9502 - 8208: 0xA9C2, + 9503 - 8208: 0xA9C3, + 9504 - 8208: 0xA9C4, + 9505 - 8208: 0xA9C5, + 9506 - 8208: 0xA9C6, + 9507 - 8208: 0xA9C7, + 9508 - 8208: 0xA9C8, + 9509 - 8208: 0xA9C9, + 9510 - 8208: 0xA9CA, + 9511 - 8208: 0xA9CB, + 9512 - 8208: 0xA9CC, + 9513 - 8208: 0xA9CD, + 9514 - 8208: 0xA9CE, + 9515 - 8208: 0xA9CF, + 9516 - 8208: 0xA9D0, + 9517 - 8208: 0xA9D1, + 9518 - 8208: 0xA9D2, + 9519 - 8208: 0xA9D3, + 9520 - 8208: 0xA9D4, + 9521 - 8208: 0xA9D5, + 9522 - 8208: 0xA9D6, + 9523 - 8208: 0xA9D7, + 9524 - 8208: 0xA9D8, + 9525 - 8208: 0xA9D9, + 9526 - 8208: 0xA9DA, + 9527 - 8208: 0xA9DB, + 9528 - 8208: 0xA9DC, + 9529 - 8208: 0xA9DD, + 9530 - 8208: 0xA9DE, + 9531 - 8208: 0xA9DF, + 9532 - 8208: 0xA9E0, + 9533 - 8208: 0xA9E1, + 9534 - 8208: 0xA9E2, + 9535 - 8208: 0xA9E3, + 9536 - 8208: 0xA9E4, + 9537 - 8208: 0xA9E5, + 9538 - 8208: 0xA9E6, + 9539 - 8208: 0xA9E7, + 9540 - 8208: 0xA9E8, + 9541 - 8208: 0xA9E9, + 9542 - 8208: 0xA9EA, + 9543 - 8208: 0xA9EB, + 9544 - 8208: 0xA9EC, + 9545 - 8208: 0xA9ED, + 9546 - 8208: 0xA9EE, + 9547 - 8208: 0xA9EF, + 9552 - 8208: 0xA854, + 9553 - 8208: 0xA855, + 9554 - 8208: 0xA856, + 9555 - 8208: 0xA857, + 9556 - 8208: 0xA858, + 9557 - 8208: 0xA859, + 9558 - 8208: 0xA85A, + 9559 - 8208: 0xA85B, + 9560 - 8208: 0xA85C, + 9561 - 8208: 0xA85D, + 9562 - 8208: 0xA85E, + 9563 - 8208: 0xA85F, + 9564 - 8208: 0xA860, + 9565 - 8208: 0xA861, + 9566 - 8208: 0xA862, + 9567 - 8208: 0xA863, + 9568 - 8208: 0xA864, + 9569 - 8208: 0xA865, + 9570 - 8208: 0xA866, + 9571 - 8208: 0xA867, + 9572 - 8208: 0xA868, + 9573 - 8208: 0xA869, + 9574 - 8208: 0xA86A, + 9575 - 8208: 0xA86B, + 9576 - 8208: 0xA86C, + 9577 - 8208: 0xA86D, + 9578 - 8208: 0xA86E, + 9579 - 8208: 0xA86F, + 9580 - 8208: 0xA870, + 9581 - 8208: 0xA871, + 9582 - 8208: 0xA872, + 9583 - 8208: 0xA873, + 9584 - 8208: 0xA874, + 9585 - 8208: 0xA875, + 9586 - 8208: 0xA876, + 9587 - 8208: 0xA877, + 9601 - 8208: 0xA878, + 9602 - 8208: 0xA879, + 9603 - 8208: 0xA87A, + 9604 - 8208: 0xA87B, + 9605 - 8208: 0xA87C, + 9606 - 8208: 0xA87D, + 9607 - 8208: 0xA87E, + 9608 - 8208: 0xA880, + 9609 - 8208: 0xA881, + 9610 - 8208: 0xA882, + 9611 - 8208: 0xA883, + 9612 - 8208: 0xA884, + 9613 - 8208: 0xA885, + 9614 - 8208: 0xA886, + 9615 - 8208: 0xA887, + 9619 - 8208: 0xA888, + 9620 - 8208: 0xA889, + 9621 - 8208: 0xA88A, + 9632 - 8208: 0xA1F6, + 9633 - 8208: 0xA1F5, + 9650 - 8208: 0xA1F8, + 9651 - 8208: 0xA1F7, + 9660 - 8208: 0xA88B, + 9661 - 8208: 0xA88C, + 9670 - 8208: 0xA1F4, + 9671 - 8208: 0xA1F3, + 9675 - 8208: 0xA1F0, + 9678 - 8208: 0xA1F2, + 9679 - 8208: 0xA1F1, + 9698 - 8208: 0xA88D, + 9699 - 8208: 0xA88E, + 9700 - 8208: 0xA88F, + 9701 - 8208: 0xA890, + 9733 - 8208: 0xA1EF, + 9734 - 8208: 0xA1EE, + 9737 - 8208: 0xA891, + 9792 - 8208: 0xA1E2, + 9794 - 8208: 0xA1E1, +} + +const encode2Low, encode2High = 164, 1106 + +var encode2 = [...]uint16{ + 164 - 164: 0xA1E8, + 167 - 164: 0xA1EC, + 168 - 164: 0xA1A7, + 176 - 164: 0xA1E3, + 177 - 164: 0xA1C0, + 183 - 164: 0xA1A4, + 215 - 164: 0xA1C1, + 224 - 164: 0xA8A4, + 225 - 164: 0xA8A2, + 232 - 164: 0xA8A8, + 233 - 164: 0xA8A6, + 234 - 164: 0xA8BA, + 236 - 164: 0xA8AC, + 237 - 164: 0xA8AA, + 242 - 164: 0xA8B0, + 243 - 164: 0xA8AE, + 247 - 164: 0xA1C2, + 249 - 164: 0xA8B4, + 250 - 164: 0xA8B2, + 252 - 164: 0xA8B9, + 257 - 164: 0xA8A1, + 275 - 164: 0xA8A5, + 283 - 164: 0xA8A7, + 299 - 164: 0xA8A9, + 324 - 164: 0xA8BD, + 328 - 164: 0xA8BE, + 333 - 164: 0xA8AD, + 363 - 164: 0xA8B1, + 462 - 164: 0xA8A3, + 464 - 164: 0xA8AB, + 466 - 164: 0xA8AF, + 468 - 164: 0xA8B3, + 470 - 164: 0xA8B5, + 472 - 164: 0xA8B6, + 474 - 164: 0xA8B7, + 476 - 164: 0xA8B8, + 505 - 164: 0xA8BF, + 593 - 164: 0xA8BB, + 609 - 164: 0xA8C0, + 711 - 164: 0xA1A6, + 713 - 164: 0xA1A5, + 714 - 164: 0xA840, + 715 - 164: 0xA841, + 729 - 164: 0xA842, + 913 - 164: 0xA6A1, + 914 - 164: 0xA6A2, + 915 - 164: 0xA6A3, + 916 - 164: 0xA6A4, + 917 - 164: 0xA6A5, + 918 - 164: 0xA6A6, + 919 - 164: 0xA6A7, + 920 - 164: 0xA6A8, + 921 - 164: 0xA6A9, + 922 - 164: 0xA6AA, + 923 - 164: 0xA6AB, + 924 - 164: 0xA6AC, + 925 - 164: 0xA6AD, + 926 - 164: 0xA6AE, + 927 - 164: 0xA6AF, + 928 - 164: 0xA6B0, + 929 - 164: 0xA6B1, + 931 - 164: 0xA6B2, + 932 - 164: 0xA6B3, + 933 - 164: 0xA6B4, + 934 - 164: 0xA6B5, + 935 - 164: 0xA6B6, + 936 - 164: 0xA6B7, + 937 - 164: 0xA6B8, + 945 - 164: 0xA6C1, + 946 - 164: 0xA6C2, + 947 - 164: 0xA6C3, + 948 - 164: 0xA6C4, + 949 - 164: 0xA6C5, + 950 - 164: 0xA6C6, + 951 - 164: 0xA6C7, + 952 - 164: 0xA6C8, + 953 - 164: 0xA6C9, + 954 - 164: 0xA6CA, + 955 - 164: 0xA6CB, + 956 - 164: 0xA6CC, + 957 - 164: 0xA6CD, + 958 - 164: 0xA6CE, + 959 - 164: 0xA6CF, + 960 - 164: 0xA6D0, + 961 - 164: 0xA6D1, + 963 - 164: 0xA6D2, + 964 - 164: 0xA6D3, + 965 - 164: 0xA6D4, + 966 - 164: 0xA6D5, + 967 - 164: 0xA6D6, + 968 - 164: 0xA6D7, + 969 - 164: 0xA6D8, + 1025 - 164: 0xA7A7, + 1040 - 164: 0xA7A1, + 1041 - 164: 0xA7A2, + 1042 - 164: 0xA7A3, + 1043 - 164: 0xA7A4, + 1044 - 164: 0xA7A5, + 1045 - 164: 0xA7A6, + 1046 - 164: 0xA7A8, + 1047 - 164: 0xA7A9, + 1048 - 164: 0xA7AA, + 1049 - 164: 0xA7AB, + 1050 - 164: 0xA7AC, + 1051 - 164: 0xA7AD, + 1052 - 164: 0xA7AE, + 1053 - 164: 0xA7AF, + 1054 - 164: 0xA7B0, + 1055 - 164: 0xA7B1, + 1056 - 164: 0xA7B2, + 1057 - 164: 0xA7B3, + 1058 - 164: 0xA7B4, + 1059 - 164: 0xA7B5, + 1060 - 164: 0xA7B6, + 1061 - 164: 0xA7B7, + 1062 - 164: 0xA7B8, + 1063 - 164: 0xA7B9, + 1064 - 164: 0xA7BA, + 1065 - 164: 0xA7BB, + 1066 - 164: 0xA7BC, + 1067 - 164: 0xA7BD, + 1068 - 164: 0xA7BE, + 1069 - 164: 0xA7BF, + 1070 - 164: 0xA7C0, + 1071 - 164: 0xA7C1, + 1072 - 164: 0xA7D1, + 1073 - 164: 0xA7D2, + 1074 - 164: 0xA7D3, + 1075 - 164: 0xA7D4, + 1076 - 164: 0xA7D5, + 1077 - 164: 0xA7D6, + 1078 - 164: 0xA7D8, + 1079 - 164: 0xA7D9, + 1080 - 164: 0xA7DA, + 1081 - 164: 0xA7DB, + 1082 - 164: 0xA7DC, + 1083 - 164: 0xA7DD, + 1084 - 164: 0xA7DE, + 1085 - 164: 0xA7DF, + 1086 - 164: 0xA7E0, + 1087 - 164: 0xA7E1, + 1088 - 164: 0xA7E2, + 1089 - 164: 0xA7E3, + 1090 - 164: 0xA7E4, + 1091 - 164: 0xA7E5, + 1092 - 164: 0xA7E6, + 1093 - 164: 0xA7E7, + 1094 - 164: 0xA7E8, + 1095 - 164: 0xA7E9, + 1096 - 164: 0xA7EA, + 1097 - 164: 0xA7EB, + 1098 - 164: 0xA7EC, + 1099 - 164: 0xA7ED, + 1100 - 164: 0xA7EE, + 1101 - 164: 0xA7EF, + 1102 - 164: 0xA7F0, + 1103 - 164: 0xA7F1, + 1105 - 164: 0xA7D7, +} + +const encode3Low, encode3High = 65072, 65510 + +var encode3 = [...]uint16{ + 65072 - 65072: 0xA955, + 65073 - 65072: 0xA6F2, + 65075 - 65072: 0xA6F4, + 65076 - 65072: 0xA6F5, + 65077 - 65072: 0xA6E0, + 65078 - 65072: 0xA6E1, + 65079 - 65072: 0xA6F0, + 65080 - 65072: 0xA6F1, + 65081 - 65072: 0xA6E2, + 65082 - 65072: 0xA6E3, + 65083 - 65072: 0xA6EE, + 65084 - 65072: 0xA6EF, + 65085 - 65072: 0xA6E6, + 65086 - 65072: 0xA6E7, + 65087 - 65072: 0xA6E4, + 65088 - 65072: 0xA6E5, + 65089 - 65072: 0xA6E8, + 65090 - 65072: 0xA6E9, + 65091 - 65072: 0xA6EA, + 65092 - 65072: 0xA6EB, + 65097 - 65072: 0xA968, + 65098 - 65072: 0xA969, + 65099 - 65072: 0xA96A, + 65100 - 65072: 0xA96B, + 65101 - 65072: 0xA96C, + 65102 - 65072: 0xA96D, + 65103 - 65072: 0xA96E, + 65104 - 65072: 0xA96F, + 65105 - 65072: 0xA970, + 65106 - 65072: 0xA971, + 65108 - 65072: 0xA972, + 65109 - 65072: 0xA973, + 65110 - 65072: 0xA974, + 65111 - 65072: 0xA975, + 65113 - 65072: 0xA976, + 65114 - 65072: 0xA977, + 65115 - 65072: 0xA978, + 65116 - 65072: 0xA979, + 65117 - 65072: 0xA97A, + 65118 - 65072: 0xA97B, + 65119 - 65072: 0xA97C, + 65120 - 65072: 0xA97D, + 65121 - 65072: 0xA97E, + 65122 - 65072: 0xA980, + 65123 - 65072: 0xA981, + 65124 - 65072: 0xA982, + 65125 - 65072: 0xA983, + 65126 - 65072: 0xA984, + 65128 - 65072: 0xA985, + 65129 - 65072: 0xA986, + 65130 - 65072: 0xA987, + 65131 - 65072: 0xA988, + 65281 - 65072: 0xA3A1, + 65282 - 65072: 0xA3A2, + 65283 - 65072: 0xA3A3, + 65284 - 65072: 0xA1E7, + 65285 - 65072: 0xA3A5, + 65286 - 65072: 0xA3A6, + 65287 - 65072: 0xA3A7, + 65288 - 65072: 0xA3A8, + 65289 - 65072: 0xA3A9, + 65290 - 65072: 0xA3AA, + 65291 - 65072: 0xA3AB, + 65292 - 65072: 0xA3AC, + 65293 - 65072: 0xA3AD, + 65294 - 65072: 0xA3AE, + 65295 - 65072: 0xA3AF, + 65296 - 65072: 0xA3B0, + 65297 - 65072: 0xA3B1, + 65298 - 65072: 0xA3B2, + 65299 - 65072: 0xA3B3, + 65300 - 65072: 0xA3B4, + 65301 - 65072: 0xA3B5, + 65302 - 65072: 0xA3B6, + 65303 - 65072: 0xA3B7, + 65304 - 65072: 0xA3B8, + 65305 - 65072: 0xA3B9, + 65306 - 65072: 0xA3BA, + 65307 - 65072: 0xA3BB, + 65308 - 65072: 0xA3BC, + 65309 - 65072: 0xA3BD, + 65310 - 65072: 0xA3BE, + 65311 - 65072: 0xA3BF, + 65312 - 65072: 0xA3C0, + 65313 - 65072: 0xA3C1, + 65314 - 65072: 0xA3C2, + 65315 - 65072: 0xA3C3, + 65316 - 65072: 0xA3C4, + 65317 - 65072: 0xA3C5, + 65318 - 65072: 0xA3C6, + 65319 - 65072: 0xA3C7, + 65320 - 65072: 0xA3C8, + 65321 - 65072: 0xA3C9, + 65322 - 65072: 0xA3CA, + 65323 - 65072: 0xA3CB, + 65324 - 65072: 0xA3CC, + 65325 - 65072: 0xA3CD, + 65326 - 65072: 0xA3CE, + 65327 - 65072: 0xA3CF, + 65328 - 65072: 0xA3D0, + 65329 - 65072: 0xA3D1, + 65330 - 65072: 0xA3D2, + 65331 - 65072: 0xA3D3, + 65332 - 65072: 0xA3D4, + 65333 - 65072: 0xA3D5, + 65334 - 65072: 0xA3D6, + 65335 - 65072: 0xA3D7, + 65336 - 65072: 0xA3D8, + 65337 - 65072: 0xA3D9, + 65338 - 65072: 0xA3DA, + 65339 - 65072: 0xA3DB, + 65340 - 65072: 0xA3DC, + 65341 - 65072: 0xA3DD, + 65342 - 65072: 0xA3DE, + 65343 - 65072: 0xA3DF, + 65344 - 65072: 0xA3E0, + 65345 - 65072: 0xA3E1, + 65346 - 65072: 0xA3E2, + 65347 - 65072: 0xA3E3, + 65348 - 65072: 0xA3E4, + 65349 - 65072: 0xA3E5, + 65350 - 65072: 0xA3E6, + 65351 - 65072: 0xA3E7, + 65352 - 65072: 0xA3E8, + 65353 - 65072: 0xA3E9, + 65354 - 65072: 0xA3EA, + 65355 - 65072: 0xA3EB, + 65356 - 65072: 0xA3EC, + 65357 - 65072: 0xA3ED, + 65358 - 65072: 0xA3EE, + 65359 - 65072: 0xA3EF, + 65360 - 65072: 0xA3F0, + 65361 - 65072: 0xA3F1, + 65362 - 65072: 0xA3F2, + 65363 - 65072: 0xA3F3, + 65364 - 65072: 0xA3F4, + 65365 - 65072: 0xA3F5, + 65366 - 65072: 0xA3F6, + 65367 - 65072: 0xA3F7, + 65368 - 65072: 0xA3F8, + 65369 - 65072: 0xA3F9, + 65370 - 65072: 0xA3FA, + 65371 - 65072: 0xA3FB, + 65372 - 65072: 0xA3FC, + 65373 - 65072: 0xA3FD, + 65374 - 65072: 0xA1AB, + 65504 - 65072: 0xA1E9, + 65505 - 65072: 0xA1EA, + 65506 - 65072: 0xA956, + 65507 - 65072: 0xA3FE, + 65508 - 65072: 0xA957, + 65509 - 65072: 0xA3A4, +} + +const encode4Low, encode4High = 63788, 64042 + +var encode4 = [...]uint16{ + 63788 - 63788: 0xFD9C, + 63865 - 63788: 0xFD9D, + 63893 - 63788: 0xFD9E, + 63975 - 63788: 0xFD9F, + 63985 - 63788: 0xFDA0, + 64012 - 63788: 0xFE40, + 64013 - 63788: 0xFE41, + 64014 - 63788: 0xFE42, + 64015 - 63788: 0xFE43, + 64017 - 63788: 0xFE44, + 64019 - 63788: 0xFE45, + 64020 - 63788: 0xFE46, + 64024 - 63788: 0xFE47, + 64031 - 63788: 0xFE48, + 64032 - 63788: 0xFE49, + 64033 - 63788: 0xFE4A, + 64035 - 63788: 0xFE4B, + 64036 - 63788: 0xFE4C, + 64039 - 63788: 0xFE4D, + 64040 - 63788: 0xFE4E, + 64041 - 63788: 0xFE4F, +} diff --git a/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go b/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go new file mode 100644 index 000000000..1fcddde08 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go @@ -0,0 +1,199 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package traditionalchinese + +import ( + "unicode/utf8" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/internal" + "golang.org/x/text/encoding/internal/identifier" + "golang.org/x/text/transform" +) + +// All is a list of all defined encodings in this package. +var All = []encoding.Encoding{Big5} + +// Big5 is the Big5 encoding, also known as Code Page 950. +var Big5 encoding.Encoding = &big5 + +var big5 = internal.Encoding{ + &internal.SimpleEncoding{big5Decoder{}, big5Encoder{}}, + "Big5", + identifier.Big5, +} + +type big5Decoder struct{ transform.NopResetter } + +func (big5Decoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size, s := rune(0), 0, "" +loop: + for ; nSrc < len(src); nSrc += size { + switch c0 := src[nSrc]; { + case c0 < utf8.RuneSelf: + r, size = rune(c0), 1 + + case 0x81 <= c0 && c0 < 0xff: + if nSrc+1 >= len(src) { + if !atEOF { + err = transform.ErrShortSrc + break loop + } + r, size = utf8.RuneError, 1 + goto write + } + c1 := src[nSrc+1] + switch { + case 0x40 <= c1 && c1 < 0x7f: + c1 -= 0x40 + case 0xa1 <= c1 && c1 < 0xff: + c1 -= 0x62 + case c1 < 0x40: + r, size = utf8.RuneError, 1 + goto write + default: + r, size = utf8.RuneError, 2 + goto write + } + r, size = '\ufffd', 2 + if i := int(c0-0x81)*157 + int(c1); i < len(decode) { + if 1133 <= i && i < 1167 { + // The two-rune special cases for LATIN CAPITAL / SMALL E WITH CIRCUMFLEX + // AND MACRON / CARON are from http://encoding.spec.whatwg.org/#big5 + switch i { + case 1133: + s = "\u00CA\u0304" + goto writeStr + case 1135: + s = "\u00CA\u030C" + goto writeStr + case 1164: + s = "\u00EA\u0304" + goto writeStr + case 1166: + s = "\u00EA\u030C" + goto writeStr + } + } + r = rune(decode[i]) + if r == 0 { + r = '\ufffd' + } + } + + default: + r, size = utf8.RuneError, 1 + } + + write: + if nDst+utf8.RuneLen(r) > len(dst) { + err = transform.ErrShortDst + break loop + } + nDst += utf8.EncodeRune(dst[nDst:], r) + continue loop + + writeStr: + if nDst+len(s) > len(dst) { + err = transform.ErrShortDst + break loop + } + nDst += copy(dst[nDst:], s) + continue loop + } + return nDst, nSrc, err +} + +type big5Encoder struct{ transform.NopResetter } + +func (big5Encoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + r, size := rune(0), 0 + for ; nSrc < len(src); nSrc += size { + r = rune(src[nSrc]) + + // Decode a 1-byte rune. + if r < utf8.RuneSelf { + size = 1 + if nDst >= len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst] = uint8(r) + nDst++ + continue + + } else { + // Decode a multi-byte rune. + r, size = utf8.DecodeRune(src[nSrc:]) + if size == 1 { + // All valid runes of size 1 (those below utf8.RuneSelf) were + // handled above. We have invalid UTF-8 or we haven't seen the + // full character yet. + if !atEOF && !utf8.FullRune(src[nSrc:]) { + err = transform.ErrShortSrc + break + } + } + } + + if r >= utf8.RuneSelf { + // func init checks that the switch covers all tables. + switch { + case encode0Low <= r && r < encode0High: + if r = rune(encode0[r-encode0Low]); r != 0 { + goto write2 + } + case encode1Low <= r && r < encode1High: + if r = rune(encode1[r-encode1Low]); r != 0 { + goto write2 + } + case encode2Low <= r && r < encode2High: + if r = rune(encode2[r-encode2Low]); r != 0 { + goto write2 + } + case encode3Low <= r && r < encode3High: + if r = rune(encode3[r-encode3Low]); r != 0 { + goto write2 + } + case encode4Low <= r && r < encode4High: + if r = rune(encode4[r-encode4Low]); r != 0 { + goto write2 + } + case encode5Low <= r && r < encode5High: + if r = rune(encode5[r-encode5Low]); r != 0 { + goto write2 + } + case encode6Low <= r && r < encode6High: + if r = rune(encode6[r-encode6Low]); r != 0 { + goto write2 + } + case encode7Low <= r && r < encode7High: + if r = rune(encode7[r-encode7Low]); r != 0 { + goto write2 + } + } + err = internal.ErrASCIIReplacement + break + } + + write2: + if nDst+2 > len(dst) { + err = transform.ErrShortDst + break + } + dst[nDst+0] = uint8(r >> 8) + dst[nDst+1] = uint8(r) + nDst += 2 + continue + } + return nDst, nSrc, err +} + +func init() { + // Check that the hard-coded encode switch covers all tables. + if numEncodeTables != 8 { + panic("bad numEncodeTables") + } +} diff --git a/vendor/golang.org/x/text/encoding/traditionalchinese/tables.go b/vendor/golang.org/x/text/encoding/traditionalchinese/tables.go new file mode 100644 index 000000000..d909e38e5 --- /dev/null +++ b/vendor/golang.org/x/text/encoding/traditionalchinese/tables.go @@ -0,0 +1,37142 @@ +// generated by go run maketables.go; DO NOT EDIT + +// Package traditionalchinese provides Traditional Chinese encodings such as Big5. +package traditionalchinese // import "golang.org/x/text/encoding/traditionalchinese" + +// decode is the decoding table from Big5 code to Unicode. +// It is defined at http://encoding.spec.whatwg.org/index-big5.txt +var decode = [...]uint32{ + 942: 0x000043F0, + 943: 0x00004C32, + 944: 0x00004603, + 945: 0x000045A6, + 946: 0x00004578, + 947: 0x00027267, + 948: 0x00004D77, + 949: 0x000045B3, + 950: 0x00027CB1, + 951: 0x00004CE2, + 952: 0x00027CC5, + 953: 0x00003B95, + 954: 0x00004736, + 955: 0x00004744, + 956: 0x00004C47, + 957: 0x00004C40, + 958: 0x000242BF, + 959: 0x00023617, + 960: 0x00027352, + 961: 0x00026E8B, + 962: 0x000270D2, + 963: 0x00004C57, + 964: 0x0002A351, + 965: 0x0000474F, + 966: 0x000045DA, + 967: 0x00004C85, + 968: 0x00027C6C, + 969: 0x00004D07, + 970: 0x00004AA4, + 971: 0x000046A1, + 972: 0x00026B23, + 973: 0x00007225, + 974: 0x00025A54, + 975: 0x00021A63, + 976: 0x00023E06, + 977: 0x00023F61, + 978: 0x0000664D, + 979: 0x000056FB, + 981: 0x00007D95, + 982: 0x0000591D, + 983: 0x00028BB9, + 984: 0x00003DF4, + 985: 0x00009734, + 986: 0x00027BEF, + 987: 0x00005BDB, + 988: 0x00021D5E, + 989: 0x00005AA4, + 990: 0x00003625, + 991: 0x00029EB0, + 992: 0x00005AD1, + 993: 0x00005BB7, + 994: 0x00005CFC, + 995: 0x0000676E, + 996: 0x00008593, + 997: 0x00029945, + 998: 0x00007461, + 999: 0x0000749D, + 1000: 0x00003875, + 1001: 0x00021D53, + 1002: 0x0002369E, + 1003: 0x00026021, + 1004: 0x00003EEC, + 1005: 0x000258DE, + 1006: 0x00003AF5, + 1007: 0x00007AFC, + 1008: 0x00009F97, + 1009: 0x00024161, + 1010: 0x0002890D, + 1011: 0x000231EA, + 1012: 0x00020A8A, + 1013: 0x0002325E, + 1014: 0x0000430A, + 1015: 0x00008484, + 1016: 0x00009F96, + 1017: 0x0000942F, + 1018: 0x00004930, + 1019: 0x00008613, + 1020: 0x00005896, + 1021: 0x0000974A, + 1022: 0x00009218, + 1023: 0x000079D0, + 1024: 0x00007A32, + 1025: 0x00006660, + 1026: 0x00006A29, + 1027: 0x0000889D, + 1028: 0x0000744C, + 1029: 0x00007BC5, + 1030: 0x00006782, + 1031: 0x00007A2C, + 1032: 0x0000524F, + 1033: 0x00009046, + 1034: 0x000034E6, + 1035: 0x000073C4, + 1036: 0x00025DB9, + 1037: 0x000074C6, + 1038: 0x00009FC7, + 1039: 0x000057B3, + 1040: 0x0000492F, + 1041: 0x0000544C, + 1042: 0x00004131, + 1043: 0x0002368E, + 1044: 0x00005818, + 1045: 0x00007A72, + 1046: 0x00027B65, + 1047: 0x00008B8F, + 1048: 0x000046AE, + 1049: 0x00026E88, + 1050: 0x00004181, + 1051: 0x00025D99, + 1052: 0x00007BAE, + 1053: 0x000224BC, + 1054: 0x00009FC8, + 1055: 0x000224C1, + 1056: 0x000224C9, + 1057: 0x000224CC, + 1058: 0x00009FC9, + 1059: 0x00008504, + 1060: 0x000235BB, + 1061: 0x000040B4, + 1062: 0x00009FCA, + 1063: 0x000044E1, + 1064: 0x0002ADFF, + 1065: 0x000062C1, + 1066: 0x0000706E, + 1067: 0x00009FCB, + 1099: 0x000031C0, + 1100: 0x000031C1, + 1101: 0x000031C2, + 1102: 0x000031C3, + 1103: 0x000031C4, + 1104: 0x0002010C, + 1105: 0x000031C5, + 1106: 0x000200D1, + 1107: 0x000200CD, + 1108: 0x000031C6, + 1109: 0x000031C7, + 1110: 0x000200CB, + 1111: 0x00021FE8, + 1112: 0x000031C8, + 1113: 0x000200CA, + 1114: 0x000031C9, + 1115: 0x000031CA, + 1116: 0x000031CB, + 1117: 0x000031CC, + 1118: 0x0002010E, + 1119: 0x000031CD, + 1120: 0x000031CE, + 1121: 0x00000100, + 1122: 0x000000C1, + 1123: 0x000001CD, + 1124: 0x000000C0, + 1125: 0x00000112, + 1126: 0x000000C9, + 1127: 0x0000011A, + 1128: 0x000000C8, + 1129: 0x0000014C, + 1130: 0x000000D3, + 1131: 0x000001D1, + 1132: 0x000000D2, + 1134: 0x00001EBE, + 1136: 0x00001EC0, + 1137: 0x000000CA, + 1138: 0x00000101, + 1139: 0x000000E1, + 1140: 0x000001CE, + 1141: 0x000000E0, + 1142: 0x00000251, + 1143: 0x00000113, + 1144: 0x000000E9, + 1145: 0x0000011B, + 1146: 0x000000E8, + 1147: 0x0000012B, + 1148: 0x000000ED, + 1149: 0x000001D0, + 1150: 0x000000EC, + 1151: 0x0000014D, + 1152: 0x000000F3, + 1153: 0x000001D2, + 1154: 0x000000F2, + 1155: 0x0000016B, + 1156: 0x000000FA, + 1157: 0x000001D4, + 1158: 0x000000F9, + 1159: 0x000001D6, + 1160: 0x000001D8, + 1161: 0x000001DA, + 1162: 0x000001DC, + 1163: 0x000000FC, + 1165: 0x00001EBF, + 1167: 0x00001EC1, + 1168: 0x000000EA, + 1169: 0x00000261, + 1170: 0x000023DA, + 1171: 0x000023DB, + 1256: 0x0002A3A9, + 1257: 0x00021145, + 1259: 0x0000650A, + 1262: 0x00004E3D, + 1263: 0x00006EDD, + 1264: 0x00009D4E, + 1265: 0x000091DF, + 1268: 0x00027735, + 1269: 0x00006491, + 1270: 0x00004F1A, + 1271: 0x00004F28, + 1272: 0x00004FA8, + 1273: 0x00005156, + 1274: 0x00005174, + 1275: 0x0000519C, + 1276: 0x000051E4, + 1277: 0x000052A1, + 1278: 0x000052A8, + 1279: 0x0000533B, + 1280: 0x0000534E, + 1281: 0x000053D1, + 1282: 0x000053D8, + 1283: 0x000056E2, + 1284: 0x000058F0, + 1285: 0x00005904, + 1286: 0x00005907, + 1287: 0x00005932, + 1288: 0x00005934, + 1289: 0x00005B66, + 1290: 0x00005B9E, + 1291: 0x00005B9F, + 1292: 0x00005C9A, + 1293: 0x00005E86, + 1294: 0x0000603B, + 1295: 0x00006589, + 1296: 0x000067FE, + 1297: 0x00006804, + 1298: 0x00006865, + 1299: 0x00006D4E, + 1300: 0x000070BC, + 1301: 0x00007535, + 1302: 0x00007EA4, + 1303: 0x00007EAC, + 1304: 0x00007EBA, + 1305: 0x00007EC7, + 1306: 0x00007ECF, + 1307: 0x00007EDF, + 1308: 0x00007F06, + 1309: 0x00007F37, + 1310: 0x0000827A, + 1311: 0x000082CF, + 1312: 0x0000836F, + 1313: 0x000089C6, + 1314: 0x00008BBE, + 1315: 0x00008BE2, + 1316: 0x00008F66, + 1317: 0x00008F67, + 1318: 0x00008F6E, + 1319: 0x00007411, + 1320: 0x00007CFC, + 1321: 0x00007DCD, + 1322: 0x00006946, + 1323: 0x00007AC9, + 1324: 0x00005227, + 1329: 0x0000918C, + 1330: 0x000078B8, + 1331: 0x0000915E, + 1332: 0x000080BC, + 1334: 0x00008D0B, + 1335: 0x000080F6, + 1336: 0x000209E7, + 1339: 0x0000809F, + 1340: 0x00009EC7, + 1341: 0x00004CCD, + 1342: 0x00009DC9, + 1343: 0x00009E0C, + 1344: 0x00004C3E, + 1345: 0x00029DF6, + 1346: 0x0002700E, + 1347: 0x00009E0A, + 1348: 0x0002A133, + 1349: 0x000035C1, + 1351: 0x00006E9A, + 1352: 0x0000823E, + 1353: 0x00007519, + 1355: 0x00004911, + 1356: 0x00009A6C, + 1357: 0x00009A8F, + 1358: 0x00009F99, + 1359: 0x00007987, + 1360: 0x0002846C, + 1361: 0x00021DCA, + 1362: 0x000205D0, + 1363: 0x00022AE6, + 1364: 0x00004E24, + 1365: 0x00004E81, + 1366: 0x00004E80, + 1367: 0x00004E87, + 1368: 0x00004EBF, + 1369: 0x00004EEB, + 1370: 0x00004F37, + 1371: 0x0000344C, + 1372: 0x00004FBD, + 1373: 0x00003E48, + 1374: 0x00005003, + 1375: 0x00005088, + 1376: 0x0000347D, + 1377: 0x00003493, + 1378: 0x000034A5, + 1379: 0x00005186, + 1380: 0x00005905, + 1381: 0x000051DB, + 1382: 0x000051FC, + 1383: 0x00005205, + 1384: 0x00004E89, + 1385: 0x00005279, + 1386: 0x00005290, + 1387: 0x00005327, + 1388: 0x000035C7, + 1389: 0x000053A9, + 1390: 0x00003551, + 1391: 0x000053B0, + 1392: 0x00003553, + 1393: 0x000053C2, + 1394: 0x00005423, + 1395: 0x0000356D, + 1396: 0x00003572, + 1397: 0x00003681, + 1398: 0x00005493, + 1399: 0x000054A3, + 1400: 0x000054B4, + 1401: 0x000054B9, + 1402: 0x000054D0, + 1403: 0x000054EF, + 1404: 0x00005518, + 1405: 0x00005523, + 1406: 0x00005528, + 1407: 0x00003598, + 1408: 0x0000553F, + 1409: 0x000035A5, + 1410: 0x000035BF, + 1411: 0x000055D7, + 1412: 0x000035C5, + 1413: 0x00027D84, + 1414: 0x00005525, + 1416: 0x00020C42, + 1417: 0x00020D15, + 1418: 0x0002512B, + 1419: 0x00005590, + 1420: 0x00022CC6, + 1421: 0x000039EC, + 1422: 0x00020341, + 1423: 0x00008E46, + 1424: 0x00024DB8, + 1425: 0x000294E5, + 1426: 0x00004053, + 1427: 0x000280BE, + 1428: 0x0000777A, + 1429: 0x00022C38, + 1430: 0x00003A34, + 1431: 0x000047D5, + 1432: 0x0002815D, + 1433: 0x000269F2, + 1434: 0x00024DEA, + 1435: 0x000064DD, + 1436: 0x00020D7C, + 1437: 0x00020FB4, + 1438: 0x00020CD5, + 1439: 0x000210F4, + 1440: 0x0000648D, + 1441: 0x00008E7E, + 1442: 0x00020E96, + 1443: 0x00020C0B, + 1444: 0x00020F64, + 1445: 0x00022CA9, + 1446: 0x00028256, + 1447: 0x000244D3, + 1449: 0x00020D46, + 1450: 0x00029A4D, + 1451: 0x000280E9, + 1452: 0x000047F4, + 1453: 0x00024EA7, + 1454: 0x00022CC2, + 1455: 0x00009AB2, + 1456: 0x00003A67, + 1457: 0x000295F4, + 1458: 0x00003FED, + 1459: 0x00003506, + 1460: 0x000252C7, + 1461: 0x000297D4, + 1462: 0x000278C8, + 1463: 0x00022D44, + 1464: 0x00009D6E, + 1465: 0x00009815, + 1467: 0x000043D9, + 1468: 0x000260A5, + 1469: 0x000064B4, + 1470: 0x000054E3, + 1471: 0x00022D4C, + 1472: 0x00022BCA, + 1473: 0x00021077, + 1474: 0x000039FB, + 1475: 0x0002106F, + 1476: 0x000266DA, + 1477: 0x00026716, + 1478: 0x000279A0, + 1479: 0x000064EA, + 1480: 0x00025052, + 1481: 0x00020C43, + 1482: 0x00008E68, + 1483: 0x000221A1, + 1484: 0x00028B4C, + 1485: 0x00020731, + 1487: 0x0000480B, + 1488: 0x000201A9, + 1489: 0x00003FFA, + 1490: 0x00005873, + 1491: 0x00022D8D, + 1493: 0x000245C8, + 1494: 0x000204FC, + 1495: 0x00026097, + 1496: 0x00020F4C, + 1497: 0x00020D96, + 1498: 0x00005579, + 1499: 0x000040BB, + 1500: 0x000043BA, + 1502: 0x00004AB4, + 1503: 0x00022A66, + 1504: 0x0002109D, + 1505: 0x000081AA, + 1506: 0x000098F5, + 1507: 0x00020D9C, + 1508: 0x00006379, + 1509: 0x000039FE, + 1510: 0x00022775, + 1511: 0x00008DC0, + 1512: 0x000056A1, + 1513: 0x0000647C, + 1514: 0x00003E43, + 1516: 0x0002A601, + 1517: 0x00020E09, + 1518: 0x00022ACF, + 1519: 0x00022CC9, + 1521: 0x000210C8, + 1522: 0x000239C2, + 1523: 0x00003992, + 1524: 0x00003A06, + 1525: 0x0002829B, + 1526: 0x00003578, + 1527: 0x00025E49, + 1528: 0x000220C7, + 1529: 0x00005652, + 1530: 0x00020F31, + 1531: 0x00022CB2, + 1532: 0x00029720, + 1533: 0x000034BC, + 1534: 0x00006C3D, + 1535: 0x00024E3B, + 1538: 0x00027574, + 1539: 0x00022E8B, + 1540: 0x00022208, + 1541: 0x0002A65B, + 1542: 0x00028CCD, + 1543: 0x00020E7A, + 1544: 0x00020C34, + 1545: 0x0002681C, + 1546: 0x00007F93, + 1547: 0x000210CF, + 1548: 0x00022803, + 1549: 0x00022939, + 1550: 0x000035FB, + 1551: 0x000251E3, + 1552: 0x00020E8C, + 1553: 0x00020F8D, + 1554: 0x00020EAA, + 1555: 0x00003F93, + 1556: 0x00020F30, + 1557: 0x00020D47, + 1558: 0x0002114F, + 1559: 0x00020E4C, + 1561: 0x00020EAB, + 1562: 0x00020BA9, + 1563: 0x00020D48, + 1564: 0x000210C0, + 1565: 0x0002113D, + 1566: 0x00003FF9, + 1567: 0x00022696, + 1568: 0x00006432, + 1569: 0x00020FAD, + 1570: 0x000233F4, + 1571: 0x00027639, + 1572: 0x00022BCE, + 1573: 0x00020D7E, + 1574: 0x00020D7F, + 1575: 0x00022C51, + 1576: 0x00022C55, + 1577: 0x00003A18, + 1578: 0x00020E98, + 1579: 0x000210C7, + 1580: 0x00020F2E, + 1581: 0x0002A632, + 1582: 0x00026B50, + 1583: 0x00028CD2, + 1584: 0x00028D99, + 1585: 0x00028CCA, + 1586: 0x000095AA, + 1587: 0x000054CC, + 1588: 0x000082C4, + 1589: 0x000055B9, + 1591: 0x00029EC3, + 1592: 0x00009C26, + 1593: 0x00009AB6, + 1594: 0x0002775E, + 1595: 0x00022DEE, + 1596: 0x00007140, + 1597: 0x0000816D, + 1598: 0x000080EC, + 1599: 0x00005C1C, + 1600: 0x00026572, + 1601: 0x00008134, + 1602: 0x00003797, + 1603: 0x0000535F, + 1604: 0x000280BD, + 1605: 0x000091B6, + 1606: 0x00020EFA, + 1607: 0x00020E0F, + 1608: 0x00020E77, + 1609: 0x00020EFB, + 1610: 0x000035DD, + 1611: 0x00024DEB, + 1612: 0x00003609, + 1613: 0x00020CD6, + 1614: 0x000056AF, + 1615: 0x000227B5, + 1616: 0x000210C9, + 1617: 0x00020E10, + 1618: 0x00020E78, + 1619: 0x00021078, + 1620: 0x00021148, + 1621: 0x00028207, + 1622: 0x00021455, + 1623: 0x00020E79, + 1624: 0x00024E50, + 1625: 0x00022DA4, + 1626: 0x00005A54, + 1627: 0x0002101D, + 1628: 0x0002101E, + 1629: 0x000210F5, + 1630: 0x000210F6, + 1631: 0x0000579C, + 1632: 0x00020E11, + 1633: 0x00027694, + 1634: 0x000282CD, + 1635: 0x00020FB5, + 1636: 0x00020E7B, + 1637: 0x0002517E, + 1638: 0x00003703, + 1639: 0x00020FB6, + 1640: 0x00021180, + 1641: 0x000252D8, + 1642: 0x0002A2BD, + 1643: 0x000249DA, + 1644: 0x0002183A, + 1645: 0x00024177, + 1646: 0x0002827C, + 1647: 0x00005899, + 1648: 0x00005268, + 1649: 0x0000361A, + 1650: 0x0002573D, + 1651: 0x00007BB2, + 1652: 0x00005B68, + 1653: 0x00004800, + 1654: 0x00004B2C, + 1655: 0x00009F27, + 1656: 0x000049E7, + 1657: 0x00009C1F, + 1658: 0x00009B8D, + 1659: 0x00025B74, + 1660: 0x0002313D, + 1661: 0x000055FB, + 1662: 0x000035F2, + 1663: 0x00005689, + 1664: 0x00004E28, + 1665: 0x00005902, + 1666: 0x00021BC1, + 1667: 0x0002F878, + 1668: 0x00009751, + 1669: 0x00020086, + 1670: 0x00004E5B, + 1671: 0x00004EBB, + 1672: 0x0000353E, + 1673: 0x00005C23, + 1674: 0x00005F51, + 1675: 0x00005FC4, + 1676: 0x000038FA, + 1677: 0x0000624C, + 1678: 0x00006535, + 1679: 0x00006B7A, + 1680: 0x00006C35, + 1681: 0x00006C3A, + 1682: 0x0000706C, + 1683: 0x0000722B, + 1684: 0x00004E2C, + 1685: 0x000072AD, + 1686: 0x000248E9, + 1687: 0x00007F52, + 1688: 0x0000793B, + 1689: 0x00007CF9, + 1690: 0x00007F53, + 1691: 0x0002626A, + 1692: 0x000034C1, + 1694: 0x0002634B, + 1695: 0x00008002, + 1696: 0x00008080, + 1697: 0x00026612, + 1698: 0x00026951, + 1699: 0x0000535D, + 1700: 0x00008864, + 1701: 0x000089C1, + 1702: 0x000278B2, + 1703: 0x00008BA0, + 1704: 0x00008D1D, + 1705: 0x00009485, + 1706: 0x00009578, + 1707: 0x0000957F, + 1708: 0x000095E8, + 1709: 0x00028E0F, + 1710: 0x000097E6, + 1711: 0x00009875, + 1712: 0x000098CE, + 1713: 0x000098DE, + 1714: 0x00009963, + 1715: 0x00029810, + 1716: 0x00009C7C, + 1717: 0x00009E1F, + 1718: 0x00009EC4, + 1719: 0x00006B6F, + 1720: 0x0000F907, + 1721: 0x00004E37, + 1722: 0x00020087, + 1723: 0x0000961D, + 1724: 0x00006237, + 1725: 0x000094A2, + 1727: 0x0000503B, + 1728: 0x00006DFE, + 1729: 0x00029C73, + 1730: 0x00009FA6, + 1731: 0x00003DC9, + 1732: 0x0000888F, + 1733: 0x0002414E, + 1734: 0x00007077, + 1735: 0x00005CF5, + 1736: 0x00004B20, + 1737: 0x000251CD, + 1738: 0x00003559, + 1739: 0x00025D30, + 1740: 0x00006122, + 1741: 0x00028A32, + 1742: 0x00008FA7, + 1743: 0x000091F6, + 1744: 0x00007191, + 1745: 0x00006719, + 1746: 0x000073BA, + 1747: 0x00023281, + 1748: 0x0002A107, + 1749: 0x00003C8B, + 1750: 0x00021980, + 1751: 0x00004B10, + 1752: 0x000078E4, + 1753: 0x00007402, + 1754: 0x000051AE, + 1755: 0x0002870F, + 1756: 0x00004009, + 1757: 0x00006A63, + 1758: 0x0002A2BA, + 1759: 0x00004223, + 1760: 0x0000860F, + 1761: 0x00020A6F, + 1762: 0x00007A2A, + 1763: 0x00029947, + 1764: 0x00028AEA, + 1765: 0x00009755, + 1766: 0x0000704D, + 1767: 0x00005324, + 1768: 0x0002207E, + 1769: 0x000093F4, + 1770: 0x000076D9, + 1771: 0x000289E3, + 1772: 0x00009FA7, + 1773: 0x000077DD, + 1774: 0x00004EA3, + 1775: 0x00004FF0, + 1776: 0x000050BC, + 1777: 0x00004E2F, + 1778: 0x00004F17, + 1779: 0x00009FA8, + 1780: 0x00005434, + 1781: 0x00007D8B, + 1782: 0x00005892, + 1783: 0x000058D0, + 1784: 0x00021DB6, + 1785: 0x00005E92, + 1786: 0x00005E99, + 1787: 0x00005FC2, + 1788: 0x00022712, + 1789: 0x0000658B, + 1790: 0x000233F9, + 1791: 0x00006919, + 1792: 0x00006A43, + 1793: 0x00023C63, + 1794: 0x00006CFF, + 1796: 0x00007200, + 1797: 0x00024505, + 1798: 0x0000738C, + 1799: 0x00003EDB, + 1800: 0x00024A13, + 1801: 0x00005B15, + 1802: 0x000074B9, + 1803: 0x00008B83, + 1804: 0x00025CA4, + 1805: 0x00025695, + 1806: 0x00007A93, + 1807: 0x00007BEC, + 1808: 0x00007CC3, + 1809: 0x00007E6C, + 1810: 0x000082F8, + 1811: 0x00008597, + 1812: 0x00009FA9, + 1813: 0x00008890, + 1814: 0x00009FAA, + 1815: 0x00008EB9, + 1816: 0x00009FAB, + 1817: 0x00008FCF, + 1818: 0x0000855F, + 1819: 0x000099E0, + 1820: 0x00009221, + 1821: 0x00009FAC, + 1822: 0x00028DB9, + 1823: 0x0002143F, + 1824: 0x00004071, + 1825: 0x000042A2, + 1826: 0x00005A1A, + 1830: 0x00009868, + 1831: 0x0000676B, + 1832: 0x00004276, + 1833: 0x0000573D, + 1835: 0x000085D6, + 1836: 0x0002497B, + 1837: 0x000082BF, + 1838: 0x0002710D, + 1839: 0x00004C81, + 1840: 0x00026D74, + 1841: 0x00005D7B, + 1842: 0x00026B15, + 1843: 0x00026FBE, + 1844: 0x00009FAD, + 1845: 0x00009FAE, + 1846: 0x00005B96, + 1847: 0x00009FAF, + 1848: 0x000066E7, + 1849: 0x00007E5B, + 1850: 0x00006E57, + 1851: 0x000079CA, + 1852: 0x00003D88, + 1853: 0x000044C3, + 1854: 0x00023256, + 1855: 0x00022796, + 1856: 0x0000439A, + 1857: 0x00004536, + 1859: 0x00005CD5, + 1860: 0x00023B1A, + 1861: 0x00008AF9, + 1862: 0x00005C78, + 1863: 0x00003D12, + 1864: 0x00023551, + 1865: 0x00005D78, + 1866: 0x00009FB2, + 1867: 0x00007157, + 1868: 0x00004558, + 1869: 0x000240EC, + 1870: 0x00021E23, + 1871: 0x00004C77, + 1872: 0x00003978, + 1873: 0x0000344A, + 1874: 0x000201A4, + 1875: 0x00026C41, + 1876: 0x00008ACC, + 1877: 0x00004FB4, + 1878: 0x00020239, + 1879: 0x000059BF, + 1880: 0x0000816C, + 1881: 0x00009856, + 1882: 0x000298FA, + 1883: 0x00005F3B, + 1884: 0x00020B9F, + 1886: 0x000221C1, + 1887: 0x0002896D, + 1888: 0x00004102, + 1889: 0x000046BB, + 1890: 0x00029079, + 1891: 0x00003F07, + 1892: 0x00009FB3, + 1893: 0x0002A1B5, + 1894: 0x000040F8, + 1895: 0x000037D6, + 1896: 0x000046F7, + 1897: 0x00026C46, + 1898: 0x0000417C, + 1899: 0x000286B2, + 1900: 0x000273FF, + 1901: 0x0000456D, + 1902: 0x000038D4, + 1903: 0x0002549A, + 1904: 0x00004561, + 1905: 0x0000451B, + 1906: 0x00004D89, + 1907: 0x00004C7B, + 1908: 0x00004D76, + 1909: 0x000045EA, + 1910: 0x00003FC8, + 1911: 0x00024B0F, + 1912: 0x00003661, + 1913: 0x000044DE, + 1914: 0x000044BD, + 1915: 0x000041ED, + 1916: 0x00005D3E, + 1917: 0x00005D48, + 1918: 0x00005D56, + 1919: 0x00003DFC, + 1920: 0x0000380F, + 1921: 0x00005DA4, + 1922: 0x00005DB9, + 1923: 0x00003820, + 1924: 0x00003838, + 1925: 0x00005E42, + 1926: 0x00005EBD, + 1927: 0x00005F25, + 1928: 0x00005F83, + 1929: 0x00003908, + 1930: 0x00003914, + 1931: 0x0000393F, + 1932: 0x0000394D, + 1933: 0x000060D7, + 1934: 0x0000613D, + 1935: 0x00005CE5, + 1936: 0x00003989, + 1937: 0x000061B7, + 1938: 0x000061B9, + 1939: 0x000061CF, + 1940: 0x000039B8, + 1941: 0x0000622C, + 1942: 0x00006290, + 1943: 0x000062E5, + 1944: 0x00006318, + 1945: 0x000039F8, + 1946: 0x000056B1, + 1947: 0x00003A03, + 1948: 0x000063E2, + 1949: 0x000063FB, + 1950: 0x00006407, + 1951: 0x0000645A, + 1952: 0x00003A4B, + 1953: 0x000064C0, + 1954: 0x00005D15, + 1955: 0x00005621, + 1956: 0x00009F9F, + 1957: 0x00003A97, + 1958: 0x00006586, + 1959: 0x00003ABD, + 1960: 0x000065FF, + 1961: 0x00006653, + 1962: 0x00003AF2, + 1963: 0x00006692, + 1964: 0x00003B22, + 1965: 0x00006716, + 1966: 0x00003B42, + 1967: 0x000067A4, + 1968: 0x00006800, + 1969: 0x00003B58, + 1970: 0x0000684A, + 1971: 0x00006884, + 1972: 0x00003B72, + 1973: 0x00003B71, + 1974: 0x00003B7B, + 1975: 0x00006909, + 1976: 0x00006943, + 1977: 0x0000725C, + 1978: 0x00006964, + 1979: 0x0000699F, + 1980: 0x00006985, + 1981: 0x00003BBC, + 1982: 0x000069D6, + 1983: 0x00003BDD, + 1984: 0x00006A65, + 1985: 0x00006A74, + 1986: 0x00006A71, + 1987: 0x00006A82, + 1988: 0x00003BEC, + 1989: 0x00006A99, + 1990: 0x00003BF2, + 1991: 0x00006AAB, + 1992: 0x00006AB5, + 1993: 0x00006AD4, + 1994: 0x00006AF6, + 1995: 0x00006B81, + 1996: 0x00006BC1, + 1997: 0x00006BEA, + 1998: 0x00006C75, + 1999: 0x00006CAA, + 2000: 0x00003CCB, + 2001: 0x00006D02, + 2002: 0x00006D06, + 2003: 0x00006D26, + 2004: 0x00006D81, + 2005: 0x00003CEF, + 2006: 0x00006DA4, + 2007: 0x00006DB1, + 2008: 0x00006E15, + 2009: 0x00006E18, + 2010: 0x00006E29, + 2011: 0x00006E86, + 2012: 0x000289C0, + 2013: 0x00006EBB, + 2014: 0x00006EE2, + 2015: 0x00006EDA, + 2016: 0x00009F7F, + 2017: 0x00006EE8, + 2018: 0x00006EE9, + 2019: 0x00006F24, + 2020: 0x00006F34, + 2021: 0x00003D46, + 2022: 0x00023F41, + 2023: 0x00006F81, + 2024: 0x00006FBE, + 2025: 0x00003D6A, + 2026: 0x00003D75, + 2027: 0x000071B7, + 2028: 0x00005C99, + 2029: 0x00003D8A, + 2030: 0x0000702C, + 2031: 0x00003D91, + 2032: 0x00007050, + 2033: 0x00007054, + 2034: 0x0000706F, + 2035: 0x0000707F, + 2036: 0x00007089, + 2037: 0x00020325, + 2038: 0x000043C1, + 2039: 0x000035F1, + 2040: 0x00020ED8, + 2041: 0x00023ED7, + 2042: 0x000057BE, + 2043: 0x00026ED3, + 2044: 0x0000713E, + 2045: 0x000257E0, + 2046: 0x0000364E, + 2047: 0x000069A2, + 2048: 0x00028BE9, + 2049: 0x00005B74, + 2050: 0x00007A49, + 2051: 0x000258E1, + 2052: 0x000294D9, + 2053: 0x00007A65, + 2054: 0x00007A7D, + 2055: 0x000259AC, + 2056: 0x00007ABB, + 2057: 0x00007AB0, + 2058: 0x00007AC2, + 2059: 0x00007AC3, + 2060: 0x000071D1, + 2061: 0x0002648D, + 2062: 0x000041CA, + 2063: 0x00007ADA, + 2064: 0x00007ADD, + 2065: 0x00007AEA, + 2066: 0x000041EF, + 2067: 0x000054B2, + 2068: 0x00025C01, + 2069: 0x00007B0B, + 2070: 0x00007B55, + 2071: 0x00007B29, + 2072: 0x0002530E, + 2073: 0x00025CFE, + 2074: 0x00007BA2, + 2075: 0x00007B6F, + 2076: 0x0000839C, + 2077: 0x00025BB4, + 2078: 0x00026C7F, + 2079: 0x00007BD0, + 2080: 0x00008421, + 2081: 0x00007B92, + 2082: 0x00007BB8, + 2083: 0x00025D20, + 2084: 0x00003DAD, + 2085: 0x00025C65, + 2086: 0x00008492, + 2087: 0x00007BFA, + 2088: 0x00007C06, + 2089: 0x00007C35, + 2090: 0x00025CC1, + 2091: 0x00007C44, + 2092: 0x00007C83, + 2093: 0x00024882, + 2094: 0x00007CA6, + 2095: 0x0000667D, + 2096: 0x00024578, + 2097: 0x00007CC9, + 2098: 0x00007CC7, + 2099: 0x00007CE6, + 2100: 0x00007C74, + 2101: 0x00007CF3, + 2102: 0x00007CF5, + 2103: 0x00007CCE, + 2104: 0x00007E67, + 2105: 0x0000451D, + 2106: 0x00026E44, + 2107: 0x00007D5D, + 2108: 0x00026ED6, + 2109: 0x0000748D, + 2110: 0x00007D89, + 2111: 0x00007DAB, + 2112: 0x00007135, + 2113: 0x00007DB3, + 2114: 0x00007DD2, + 2115: 0x00024057, + 2116: 0x00026029, + 2117: 0x00007DE4, + 2118: 0x00003D13, + 2119: 0x00007DF5, + 2120: 0x000217F9, + 2121: 0x00007DE5, + 2122: 0x0002836D, + 2123: 0x00007E1D, + 2124: 0x00026121, + 2125: 0x0002615A, + 2126: 0x00007E6E, + 2127: 0x00007E92, + 2128: 0x0000432B, + 2129: 0x0000946C, + 2130: 0x00007E27, + 2131: 0x00007F40, + 2132: 0x00007F41, + 2133: 0x00007F47, + 2134: 0x00007936, + 2135: 0x000262D0, + 2136: 0x000099E1, + 2137: 0x00007F97, + 2138: 0x00026351, + 2139: 0x00007FA3, + 2140: 0x00021661, + 2141: 0x00020068, + 2142: 0x0000455C, + 2143: 0x00023766, + 2144: 0x00004503, + 2145: 0x0002833A, + 2146: 0x00007FFA, + 2147: 0x00026489, + 2148: 0x00008005, + 2149: 0x00008008, + 2150: 0x0000801D, + 2151: 0x00008028, + 2152: 0x0000802F, + 2153: 0x0002A087, + 2154: 0x00026CC3, + 2155: 0x0000803B, + 2156: 0x0000803C, + 2157: 0x00008061, + 2158: 0x00022714, + 2159: 0x00004989, + 2160: 0x00026626, + 2161: 0x00023DE3, + 2162: 0x000266E8, + 2163: 0x00006725, + 2164: 0x000080A7, + 2165: 0x00028A48, + 2166: 0x00008107, + 2167: 0x0000811A, + 2168: 0x000058B0, + 2169: 0x000226F6, + 2170: 0x00006C7F, + 2171: 0x00026498, + 2172: 0x00024FB8, + 2173: 0x000064E7, + 2174: 0x0002148A, + 2175: 0x00008218, + 2176: 0x0002185E, + 2177: 0x00006A53, + 2178: 0x00024A65, + 2179: 0x00024A95, + 2180: 0x0000447A, + 2181: 0x00008229, + 2182: 0x00020B0D, + 2183: 0x00026A52, + 2184: 0x00023D7E, + 2185: 0x00004FF9, + 2186: 0x000214FD, + 2187: 0x000084E2, + 2188: 0x00008362, + 2189: 0x00026B0A, + 2190: 0x000249A7, + 2191: 0x00023530, + 2192: 0x00021773, + 2193: 0x00023DF8, + 2194: 0x000082AA, + 2195: 0x0000691B, + 2196: 0x0002F994, + 2197: 0x000041DB, + 2198: 0x0000854B, + 2199: 0x000082D0, + 2200: 0x0000831A, + 2201: 0x00020E16, + 2202: 0x000217B4, + 2203: 0x000036C1, + 2204: 0x0002317D, + 2205: 0x0002355A, + 2206: 0x0000827B, + 2207: 0x000082E2, + 2208: 0x00008318, + 2209: 0x00023E8B, + 2210: 0x00026DA3, + 2211: 0x00026B05, + 2212: 0x00026B97, + 2213: 0x000235CE, + 2214: 0x00003DBF, + 2215: 0x0000831D, + 2216: 0x000055EC, + 2217: 0x00008385, + 2218: 0x0000450B, + 2219: 0x00026DA5, + 2220: 0x000083AC, + 2221: 0x000083C1, + 2222: 0x000083D3, + 2223: 0x0000347E, + 2224: 0x00026ED4, + 2225: 0x00006A57, + 2226: 0x0000855A, + 2227: 0x00003496, + 2228: 0x00026E42, + 2229: 0x00022EEF, + 2230: 0x00008458, + 2231: 0x00025BE4, + 2232: 0x00008471, + 2233: 0x00003DD3, + 2234: 0x000044E4, + 2235: 0x00006AA7, + 2236: 0x0000844A, + 2237: 0x00023CB5, + 2238: 0x00007958, + 2239: 0x000084A8, + 2240: 0x00026B96, + 2241: 0x00026E77, + 2242: 0x00026E43, + 2243: 0x000084DE, + 2244: 0x0000840F, + 2245: 0x00008391, + 2246: 0x000044A0, + 2247: 0x00008493, + 2248: 0x000084E4, + 2249: 0x00025C91, + 2250: 0x00004240, + 2251: 0x00025CC0, + 2252: 0x00004543, + 2253: 0x00008534, + 2254: 0x00005AF2, + 2255: 0x00026E99, + 2256: 0x00004527, + 2257: 0x00008573, + 2258: 0x00004516, + 2259: 0x000067BF, + 2260: 0x00008616, + 2261: 0x00028625, + 2262: 0x0002863B, + 2263: 0x000085C1, + 2264: 0x00027088, + 2265: 0x00008602, + 2266: 0x00021582, + 2267: 0x000270CD, + 2268: 0x0002F9B2, + 2269: 0x0000456A, + 2270: 0x00008628, + 2271: 0x00003648, + 2272: 0x000218A2, + 2273: 0x000053F7, + 2274: 0x0002739A, + 2275: 0x0000867E, + 2276: 0x00008771, + 2277: 0x0002A0F8, + 2278: 0x000087EE, + 2279: 0x00022C27, + 2280: 0x000087B1, + 2281: 0x000087DA, + 2282: 0x0000880F, + 2283: 0x00005661, + 2284: 0x0000866C, + 2285: 0x00006856, + 2286: 0x0000460F, + 2287: 0x00008845, + 2288: 0x00008846, + 2289: 0x000275E0, + 2290: 0x00023DB9, + 2291: 0x000275E4, + 2292: 0x0000885E, + 2293: 0x0000889C, + 2294: 0x0000465B, + 2295: 0x000088B4, + 2296: 0x000088B5, + 2297: 0x000063C1, + 2298: 0x000088C5, + 2299: 0x00007777, + 2300: 0x0002770F, + 2301: 0x00008987, + 2302: 0x0000898A, + 2303: 0x000089A6, + 2304: 0x000089A9, + 2305: 0x000089A7, + 2306: 0x000089BC, + 2307: 0x00028A25, + 2308: 0x000089E7, + 2309: 0x00027924, + 2310: 0x00027ABD, + 2311: 0x00008A9C, + 2312: 0x00007793, + 2313: 0x000091FE, + 2314: 0x00008A90, + 2315: 0x00027A59, + 2316: 0x00007AE9, + 2317: 0x00027B3A, + 2318: 0x00023F8F, + 2319: 0x00004713, + 2320: 0x00027B38, + 2321: 0x0000717C, + 2322: 0x00008B0C, + 2323: 0x00008B1F, + 2324: 0x00025430, + 2325: 0x00025565, + 2326: 0x00008B3F, + 2327: 0x00008B4C, + 2328: 0x00008B4D, + 2329: 0x00008AA9, + 2330: 0x00024A7A, + 2331: 0x00008B90, + 2332: 0x00008B9B, + 2333: 0x00008AAF, + 2334: 0x000216DF, + 2335: 0x00004615, + 2336: 0x0000884F, + 2337: 0x00008C9B, + 2338: 0x00027D54, + 2339: 0x00027D8F, + 2340: 0x0002F9D4, + 2341: 0x00003725, + 2342: 0x00027D53, + 2343: 0x00008CD6, + 2344: 0x00027D98, + 2345: 0x00027DBD, + 2346: 0x00008D12, + 2347: 0x00008D03, + 2348: 0x00021910, + 2349: 0x00008CDB, + 2350: 0x0000705C, + 2351: 0x00008D11, + 2352: 0x00024CC9, + 2353: 0x00003ED0, + 2354: 0x00008D77, + 2355: 0x00008DA9, + 2356: 0x00028002, + 2357: 0x00021014, + 2358: 0x0002498A, + 2359: 0x00003B7C, + 2360: 0x000281BC, + 2361: 0x0002710C, + 2362: 0x00007AE7, + 2363: 0x00008EAD, + 2364: 0x00008EB6, + 2365: 0x00008EC3, + 2366: 0x000092D4, + 2367: 0x00008F19, + 2368: 0x00008F2D, + 2369: 0x00028365, + 2370: 0x00028412, + 2371: 0x00008FA5, + 2372: 0x00009303, + 2373: 0x0002A29F, + 2374: 0x00020A50, + 2375: 0x00008FB3, + 2376: 0x0000492A, + 2377: 0x000289DE, + 2378: 0x0002853D, + 2379: 0x00023DBB, + 2380: 0x00005EF8, + 2381: 0x00023262, + 2382: 0x00008FF9, + 2383: 0x0002A014, + 2384: 0x000286BC, + 2385: 0x00028501, + 2386: 0x00022325, + 2387: 0x00003980, + 2388: 0x00026ED7, + 2389: 0x00009037, + 2390: 0x0002853C, + 2391: 0x00027ABE, + 2392: 0x00009061, + 2393: 0x0002856C, + 2394: 0x0002860B, + 2395: 0x000090A8, + 2396: 0x00028713, + 2397: 0x000090C4, + 2398: 0x000286E6, + 2399: 0x000090AE, + 2400: 0x000090FD, + 2401: 0x00009167, + 2402: 0x00003AF0, + 2403: 0x000091A9, + 2404: 0x000091C4, + 2405: 0x00007CAC, + 2406: 0x00028933, + 2407: 0x00021E89, + 2408: 0x0000920E, + 2409: 0x00006C9F, + 2410: 0x00009241, + 2411: 0x00009262, + 2412: 0x000255B9, + 2413: 0x000092B9, + 2414: 0x00028AC6, + 2415: 0x00023C9B, + 2416: 0x00028B0C, + 2417: 0x000255DB, + 2418: 0x00020D31, + 2419: 0x0000932C, + 2420: 0x0000936B, + 2421: 0x00028AE1, + 2422: 0x00028BEB, + 2423: 0x0000708F, + 2424: 0x00005AC3, + 2425: 0x00028AE2, + 2426: 0x00028AE5, + 2427: 0x00004965, + 2428: 0x00009244, + 2429: 0x00028BEC, + 2430: 0x00028C39, + 2431: 0x00028BFF, + 2432: 0x00009373, + 2433: 0x0000945B, + 2434: 0x00008EBC, + 2435: 0x00009585, + 2436: 0x000095A6, + 2437: 0x00009426, + 2438: 0x000095A0, + 2439: 0x00006FF6, + 2440: 0x000042B9, + 2441: 0x0002267A, + 2442: 0x000286D8, + 2443: 0x0002127C, + 2444: 0x00023E2E, + 2445: 0x000049DF, + 2446: 0x00006C1C, + 2447: 0x0000967B, + 2448: 0x00009696, + 2449: 0x0000416C, + 2450: 0x000096A3, + 2451: 0x00026ED5, + 2452: 0x000061DA, + 2453: 0x000096B6, + 2454: 0x000078F5, + 2455: 0x00028AE0, + 2456: 0x000096BD, + 2457: 0x000053CC, + 2458: 0x000049A1, + 2459: 0x00026CB8, + 2460: 0x00020274, + 2461: 0x00026410, + 2462: 0x000290AF, + 2463: 0x000290E5, + 2464: 0x00024AD1, + 2465: 0x00021915, + 2466: 0x0002330A, + 2467: 0x00009731, + 2468: 0x00008642, + 2469: 0x00009736, + 2470: 0x00004A0F, + 2471: 0x0000453D, + 2472: 0x00004585, + 2473: 0x00024AE9, + 2474: 0x00007075, + 2475: 0x00005B41, + 2476: 0x0000971B, + 2477: 0x0000975C, + 2478: 0x000291D5, + 2479: 0x00009757, + 2480: 0x00005B4A, + 2481: 0x000291EB, + 2482: 0x0000975F, + 2483: 0x00009425, + 2484: 0x000050D0, + 2485: 0x000230B7, + 2486: 0x000230BC, + 2487: 0x00009789, + 2488: 0x0000979F, + 2489: 0x000097B1, + 2490: 0x000097BE, + 2491: 0x000097C0, + 2492: 0x000097D2, + 2493: 0x000097E0, + 2494: 0x0002546C, + 2495: 0x000097EE, + 2496: 0x0000741C, + 2497: 0x00029433, + 2498: 0x000097FF, + 2499: 0x000097F5, + 2500: 0x0002941D, + 2501: 0x0002797A, + 2502: 0x00004AD1, + 2503: 0x00009834, + 2504: 0x00009833, + 2505: 0x0000984B, + 2506: 0x00009866, + 2507: 0x00003B0E, + 2508: 0x00027175, + 2509: 0x00003D51, + 2510: 0x00020630, + 2511: 0x0002415C, + 2512: 0x00025706, + 2513: 0x000098CA, + 2514: 0x000098B7, + 2515: 0x000098C8, + 2516: 0x000098C7, + 2517: 0x00004AFF, + 2518: 0x00026D27, + 2519: 0x000216D3, + 2520: 0x000055B0, + 2521: 0x000098E1, + 2522: 0x000098E6, + 2523: 0x000098EC, + 2524: 0x00009378, + 2525: 0x00009939, + 2526: 0x00024A29, + 2527: 0x00004B72, + 2528: 0x00029857, + 2529: 0x00029905, + 2530: 0x000099F5, + 2531: 0x00009A0C, + 2532: 0x00009A3B, + 2533: 0x00009A10, + 2534: 0x00009A58, + 2535: 0x00025725, + 2536: 0x000036C4, + 2537: 0x000290B1, + 2538: 0x00029BD5, + 2539: 0x00009AE0, + 2540: 0x00009AE2, + 2541: 0x00029B05, + 2542: 0x00009AF4, + 2543: 0x00004C0E, + 2544: 0x00009B14, + 2545: 0x00009B2D, + 2546: 0x00028600, + 2547: 0x00005034, + 2548: 0x00009B34, + 2549: 0x000269A8, + 2550: 0x000038C3, + 2551: 0x0002307D, + 2552: 0x00009B50, + 2553: 0x00009B40, + 2554: 0x00029D3E, + 2555: 0x00005A45, + 2556: 0x00021863, + 2557: 0x00009B8E, + 2558: 0x0002424B, + 2559: 0x00009C02, + 2560: 0x00009BFF, + 2561: 0x00009C0C, + 2562: 0x00029E68, + 2563: 0x00009DD4, + 2564: 0x00029FB7, + 2565: 0x0002A192, + 2566: 0x0002A1AB, + 2567: 0x0002A0E1, + 2568: 0x0002A123, + 2569: 0x0002A1DF, + 2570: 0x00009D7E, + 2571: 0x00009D83, + 2572: 0x0002A134, + 2573: 0x00009E0E, + 2574: 0x00006888, + 2575: 0x00009DC4, + 2576: 0x0002215B, + 2577: 0x0002A193, + 2578: 0x0002A220, + 2579: 0x0002193B, + 2580: 0x0002A233, + 2581: 0x00009D39, + 2582: 0x0002A0B9, + 2583: 0x0002A2B4, + 2584: 0x00009E90, + 2585: 0x00009E95, + 2586: 0x00009E9E, + 2587: 0x00009EA2, + 2588: 0x00004D34, + 2589: 0x00009EAA, + 2590: 0x00009EAF, + 2591: 0x00024364, + 2592: 0x00009EC1, + 2593: 0x00003B60, + 2594: 0x000039E5, + 2595: 0x00003D1D, + 2596: 0x00004F32, + 2597: 0x000037BE, + 2598: 0x00028C2B, + 2599: 0x00009F02, + 2600: 0x00009F08, + 2601: 0x00004B96, + 2602: 0x00009424, + 2603: 0x00026DA2, + 2604: 0x00009F17, + 2605: 0x00009F16, + 2606: 0x00009F39, + 2607: 0x0000569F, + 2608: 0x0000568A, + 2609: 0x00009F45, + 2610: 0x000099B8, + 2611: 0x0002908B, + 2612: 0x000097F2, + 2613: 0x0000847F, + 2614: 0x00009F62, + 2615: 0x00009F69, + 2616: 0x00007ADC, + 2617: 0x00009F8E, + 2618: 0x00007216, + 2619: 0x00004BBE, + 2620: 0x00024975, + 2621: 0x000249BB, + 2622: 0x00007177, + 2623: 0x000249F8, + 2624: 0x00024348, + 2625: 0x00024A51, + 2626: 0x0000739E, + 2627: 0x00028BDA, + 2628: 0x000218FA, + 2629: 0x0000799F, + 2630: 0x0002897E, + 2631: 0x00028E36, + 2632: 0x00009369, + 2633: 0x000093F3, + 2634: 0x00028A44, + 2635: 0x000092EC, + 2636: 0x00009381, + 2637: 0x000093CB, + 2638: 0x0002896C, + 2639: 0x000244B9, + 2640: 0x00007217, + 2641: 0x00003EEB, + 2642: 0x00007772, + 2643: 0x00007A43, + 2644: 0x000070D0, + 2645: 0x00024473, + 2646: 0x000243F8, + 2647: 0x0000717E, + 2648: 0x000217EF, + 2649: 0x000070A3, + 2650: 0x000218BE, + 2651: 0x00023599, + 2652: 0x00003EC7, + 2653: 0x00021885, + 2654: 0x0002542F, + 2655: 0x000217F8, + 2656: 0x00003722, + 2657: 0x000216FB, + 2658: 0x00021839, + 2659: 0x000036E1, + 2660: 0x00021774, + 2661: 0x000218D1, + 2662: 0x00025F4B, + 2663: 0x00003723, + 2664: 0x000216C0, + 2665: 0x0000575B, + 2666: 0x00024A25, + 2667: 0x000213FE, + 2668: 0x000212A8, + 2669: 0x000213C6, + 2670: 0x000214B6, + 2671: 0x00008503, + 2672: 0x000236A6, + 2673: 0x00008503, + 2674: 0x00008455, + 2675: 0x00024994, + 2676: 0x00027165, + 2677: 0x00023E31, + 2678: 0x0002555C, + 2679: 0x00023EFB, + 2680: 0x00027052, + 2681: 0x000044F4, + 2682: 0x000236EE, + 2683: 0x0002999D, + 2684: 0x00026F26, + 2685: 0x000067F9, + 2686: 0x00003733, + 2687: 0x00003C15, + 2688: 0x00003DE7, + 2689: 0x0000586C, + 2690: 0x00021922, + 2691: 0x00006810, + 2692: 0x00004057, + 2693: 0x0002373F, + 2694: 0x000240E1, + 2695: 0x0002408B, + 2696: 0x0002410F, + 2697: 0x00026C21, + 2698: 0x000054CB, + 2699: 0x0000569E, + 2700: 0x000266B1, + 2701: 0x00005692, + 2702: 0x00020FDF, + 2703: 0x00020BA8, + 2704: 0x00020E0D, + 2705: 0x000093C6, + 2706: 0x00028B13, + 2707: 0x0000939C, + 2708: 0x00004EF8, + 2709: 0x0000512B, + 2710: 0x00003819, + 2711: 0x00024436, + 2712: 0x00004EBC, + 2713: 0x00020465, + 2714: 0x0002037F, + 2715: 0x00004F4B, + 2716: 0x00004F8A, + 2717: 0x00025651, + 2718: 0x00005A68, + 2719: 0x000201AB, + 2720: 0x000203CB, + 2721: 0x00003999, + 2722: 0x0002030A, + 2723: 0x00020414, + 2724: 0x00003435, + 2725: 0x00004F29, + 2726: 0x000202C0, + 2727: 0x00028EB3, + 2728: 0x00020275, + 2729: 0x00008ADA, + 2730: 0x0002020C, + 2731: 0x00004E98, + 2732: 0x000050CD, + 2733: 0x0000510D, + 2734: 0x00004FA2, + 2735: 0x00004F03, + 2736: 0x00024A0E, + 2737: 0x00023E8A, + 2738: 0x00004F42, + 2739: 0x0000502E, + 2740: 0x0000506C, + 2741: 0x00005081, + 2742: 0x00004FCC, + 2743: 0x00004FE5, + 2744: 0x00005058, + 2745: 0x000050FC, + 2746: 0x00005159, + 2747: 0x0000515B, + 2748: 0x0000515D, + 2749: 0x0000515E, + 2750: 0x00006E76, + 2751: 0x00023595, + 2752: 0x00023E39, + 2753: 0x00023EBF, + 2754: 0x00006D72, + 2755: 0x00021884, + 2756: 0x00023E89, + 2757: 0x000051A8, + 2758: 0x000051C3, + 2759: 0x000205E0, + 2760: 0x000044DD, + 2761: 0x000204A3, + 2762: 0x00020492, + 2763: 0x00020491, + 2764: 0x00008D7A, + 2765: 0x00028A9C, + 2766: 0x0002070E, + 2767: 0x00005259, + 2768: 0x000052A4, + 2769: 0x00020873, + 2770: 0x000052E1, + 2771: 0x0000936E, + 2772: 0x0000467A, + 2773: 0x0000718C, + 2774: 0x0002438C, + 2775: 0x00020C20, + 2776: 0x000249AC, + 2777: 0x000210E4, + 2778: 0x000069D1, + 2779: 0x00020E1D, + 2780: 0x00007479, + 2781: 0x00003EDE, + 2782: 0x00007499, + 2783: 0x00007414, + 2784: 0x00007456, + 2785: 0x00007398, + 2786: 0x00004B8E, + 2787: 0x00024ABC, + 2788: 0x0002408D, + 2789: 0x000053D0, + 2790: 0x00003584, + 2791: 0x0000720F, + 2792: 0x000240C9, + 2793: 0x000055B4, + 2794: 0x00020345, + 2795: 0x000054CD, + 2796: 0x00020BC6, + 2797: 0x0000571D, + 2798: 0x0000925D, + 2799: 0x000096F4, + 2800: 0x00009366, + 2801: 0x000057DD, + 2802: 0x0000578D, + 2803: 0x0000577F, + 2804: 0x0000363E, + 2805: 0x000058CB, + 2806: 0x00005A99, + 2807: 0x00028A46, + 2808: 0x000216FA, + 2809: 0x0002176F, + 2810: 0x00021710, + 2811: 0x00005A2C, + 2812: 0x000059B8, + 2813: 0x0000928F, + 2814: 0x00005A7E, + 2815: 0x00005ACF, + 2816: 0x00005A12, + 2817: 0x00025946, + 2818: 0x000219F3, + 2819: 0x00021861, + 2820: 0x00024295, + 2821: 0x000036F5, + 2822: 0x00006D05, + 2823: 0x00007443, + 2824: 0x00005A21, + 2825: 0x00025E83, + 2826: 0x00005A81, + 2827: 0x00028BD7, + 2828: 0x00020413, + 2829: 0x000093E0, + 2830: 0x0000748C, + 2831: 0x00021303, + 2832: 0x00007105, + 2833: 0x00004972, + 2834: 0x00009408, + 2835: 0x000289FB, + 2836: 0x000093BD, + 2837: 0x000037A0, + 2838: 0x00005C1E, + 2839: 0x00005C9E, + 2840: 0x00005E5E, + 2841: 0x00005E48, + 2842: 0x00021996, + 2843: 0x0002197C, + 2844: 0x00023AEE, + 2845: 0x00005ECD, + 2846: 0x00005B4F, + 2847: 0x00021903, + 2848: 0x00021904, + 2849: 0x00003701, + 2850: 0x000218A0, + 2851: 0x000036DD, + 2852: 0x000216FE, + 2853: 0x000036D3, + 2854: 0x0000812A, + 2855: 0x00028A47, + 2856: 0x00021DBA, + 2857: 0x00023472, + 2858: 0x000289A8, + 2859: 0x00005F0C, + 2860: 0x00005F0E, + 2861: 0x00021927, + 2862: 0x000217AB, + 2863: 0x00005A6B, + 2864: 0x0002173B, + 2865: 0x00005B44, + 2866: 0x00008614, + 2867: 0x000275FD, + 2868: 0x00008860, + 2869: 0x0000607E, + 2870: 0x00022860, + 2871: 0x0002262B, + 2872: 0x00005FDB, + 2873: 0x00003EB8, + 2874: 0x000225AF, + 2875: 0x000225BE, + 2876: 0x00029088, + 2877: 0x00026F73, + 2878: 0x000061C0, + 2879: 0x0002003E, + 2880: 0x00020046, + 2881: 0x0002261B, + 2882: 0x00006199, + 2883: 0x00006198, + 2884: 0x00006075, + 2885: 0x00022C9B, + 2886: 0x00022D07, + 2887: 0x000246D4, + 2888: 0x0002914D, + 2889: 0x00006471, + 2890: 0x00024665, + 2891: 0x00022B6A, + 2892: 0x00003A29, + 2893: 0x00022B22, + 2894: 0x00023450, + 2895: 0x000298EA, + 2896: 0x00022E78, + 2897: 0x00006337, + 2898: 0x0002A45B, + 2899: 0x000064B6, + 2900: 0x00006331, + 2901: 0x000063D1, + 2902: 0x000249E3, + 2903: 0x00022D67, + 2904: 0x000062A4, + 2905: 0x00022CA1, + 2906: 0x0000643B, + 2907: 0x0000656B, + 2908: 0x00006972, + 2909: 0x00003BF4, + 2910: 0x0002308E, + 2911: 0x000232AD, + 2912: 0x00024989, + 2913: 0x000232AB, + 2914: 0x0000550D, + 2915: 0x000232E0, + 2916: 0x000218D9, + 2917: 0x0002943F, + 2918: 0x000066CE, + 2919: 0x00023289, + 2920: 0x000231B3, + 2921: 0x00003AE0, + 2922: 0x00004190, + 2923: 0x00025584, + 2924: 0x00028B22, + 2925: 0x0002558F, + 2926: 0x000216FC, + 2927: 0x0002555B, + 2928: 0x00025425, + 2929: 0x000078EE, + 2930: 0x00023103, + 2931: 0x0002182A, + 2932: 0x00023234, + 2933: 0x00003464, + 2934: 0x0002320F, + 2935: 0x00023182, + 2936: 0x000242C9, + 2937: 0x0000668E, + 2938: 0x00026D24, + 2939: 0x0000666B, + 2940: 0x00004B93, + 2941: 0x00006630, + 2942: 0x00027870, + 2943: 0x00021DEB, + 2944: 0x00006663, + 2945: 0x000232D2, + 2946: 0x000232E1, + 2947: 0x0000661E, + 2948: 0x00025872, + 2949: 0x000038D1, + 2950: 0x0002383A, + 2951: 0x000237BC, + 2952: 0x00003B99, + 2953: 0x000237A2, + 2954: 0x000233FE, + 2955: 0x000074D0, + 2956: 0x00003B96, + 2957: 0x0000678F, + 2958: 0x0002462A, + 2959: 0x000068B6, + 2960: 0x0000681E, + 2961: 0x00003BC4, + 2962: 0x00006ABE, + 2963: 0x00003863, + 2964: 0x000237D5, + 2965: 0x00024487, + 2966: 0x00006A33, + 2967: 0x00006A52, + 2968: 0x00006AC9, + 2969: 0x00006B05, + 2970: 0x00021912, + 2971: 0x00006511, + 2972: 0x00006898, + 2973: 0x00006A4C, + 2974: 0x00003BD7, + 2975: 0x00006A7A, + 2976: 0x00006B57, + 2977: 0x00023FC0, + 2978: 0x00023C9A, + 2979: 0x000093A0, + 2980: 0x000092F2, + 2981: 0x00028BEA, + 2982: 0x00028ACB, + 2983: 0x00009289, + 2984: 0x0002801E, + 2985: 0x000289DC, + 2986: 0x00009467, + 2987: 0x00006DA5, + 2988: 0x00006F0B, + 2989: 0x000249EC, + 2990: 0x00006D67, + 2991: 0x00023F7F, + 2992: 0x00003D8F, + 2993: 0x00006E04, + 2994: 0x0002403C, + 2995: 0x00005A3D, + 2996: 0x00006E0A, + 2997: 0x00005847, + 2998: 0x00006D24, + 2999: 0x00007842, + 3000: 0x0000713B, + 3001: 0x0002431A, + 3002: 0x00024276, + 3003: 0x000070F1, + 3004: 0x00007250, + 3005: 0x00007287, + 3006: 0x00007294, + 3007: 0x0002478F, + 3008: 0x00024725, + 3009: 0x00005179, + 3010: 0x00024AA4, + 3011: 0x000205EB, + 3012: 0x0000747A, + 3013: 0x00023EF8, + 3014: 0x0002365F, + 3015: 0x00024A4A, + 3016: 0x00024917, + 3017: 0x00025FE1, + 3018: 0x00003F06, + 3019: 0x00003EB1, + 3020: 0x00024ADF, + 3021: 0x00028C23, + 3022: 0x00023F35, + 3023: 0x000060A7, + 3024: 0x00003EF3, + 3025: 0x000074CC, + 3026: 0x0000743C, + 3027: 0x00009387, + 3028: 0x00007437, + 3029: 0x0000449F, + 3030: 0x00026DEA, + 3031: 0x00004551, + 3032: 0x00007583, + 3033: 0x00003F63, + 3034: 0x00024CD9, + 3035: 0x00024D06, + 3036: 0x00003F58, + 3037: 0x00007555, + 3038: 0x00007673, + 3039: 0x0002A5C6, + 3040: 0x00003B19, + 3041: 0x00007468, + 3042: 0x00028ACC, + 3043: 0x000249AB, + 3044: 0x0002498E, + 3045: 0x00003AFB, + 3046: 0x00003DCD, + 3047: 0x00024A4E, + 3048: 0x00003EFF, + 3049: 0x000249C5, + 3050: 0x000248F3, + 3051: 0x000091FA, + 3052: 0x00005732, + 3053: 0x00009342, + 3054: 0x00028AE3, + 3055: 0x00021864, + 3056: 0x000050DF, + 3057: 0x00025221, + 3058: 0x000251E7, + 3059: 0x00007778, + 3060: 0x00023232, + 3061: 0x0000770E, + 3062: 0x0000770F, + 3063: 0x0000777B, + 3064: 0x00024697, + 3065: 0x00023781, + 3066: 0x00003A5E, + 3067: 0x000248F0, + 3068: 0x00007438, + 3069: 0x0000749B, + 3070: 0x00003EBF, + 3071: 0x00024ABA, + 3072: 0x00024AC7, + 3073: 0x000040C8, + 3074: 0x00024A96, + 3075: 0x000261AE, + 3076: 0x00009307, + 3077: 0x00025581, + 3078: 0x0000781E, + 3079: 0x0000788D, + 3080: 0x00007888, + 3081: 0x000078D2, + 3082: 0x000073D0, + 3083: 0x00007959, + 3084: 0x00027741, + 3085: 0x000256E3, + 3086: 0x0000410E, + 3087: 0x0000799B, + 3088: 0x00008496, + 3089: 0x000079A5, + 3090: 0x00006A2D, + 3091: 0x00023EFA, + 3092: 0x00007A3A, + 3093: 0x000079F4, + 3094: 0x0000416E, + 3095: 0x000216E6, + 3096: 0x00004132, + 3097: 0x00009235, + 3098: 0x000079F1, + 3099: 0x00020D4C, + 3100: 0x0002498C, + 3101: 0x00020299, + 3102: 0x00023DBA, + 3103: 0x0002176E, + 3104: 0x00003597, + 3105: 0x0000556B, + 3106: 0x00003570, + 3107: 0x000036AA, + 3108: 0x000201D4, + 3109: 0x00020C0D, + 3110: 0x00007AE2, + 3111: 0x00005A59, + 3112: 0x000226F5, + 3113: 0x00025AAF, + 3114: 0x00025A9C, + 3115: 0x00005A0D, + 3116: 0x0002025B, + 3117: 0x000078F0, + 3118: 0x00005A2A, + 3119: 0x00025BC6, + 3120: 0x00007AFE, + 3121: 0x000041F9, + 3122: 0x00007C5D, + 3123: 0x00007C6D, + 3124: 0x00004211, + 3125: 0x00025BB3, + 3126: 0x00025EBC, + 3127: 0x00025EA6, + 3128: 0x00007CCD, + 3129: 0x000249F9, + 3130: 0x000217B0, + 3131: 0x00007C8E, + 3132: 0x00007C7C, + 3133: 0x00007CAE, + 3134: 0x00006AB2, + 3135: 0x00007DDC, + 3136: 0x00007E07, + 3137: 0x00007DD3, + 3138: 0x00007F4E, + 3139: 0x00026261, + 3140: 0x0002615C, + 3141: 0x00027B48, + 3142: 0x00007D97, + 3143: 0x00025E82, + 3144: 0x0000426A, + 3145: 0x00026B75, + 3146: 0x00020916, + 3147: 0x000067D6, + 3148: 0x0002004E, + 3149: 0x000235CF, + 3150: 0x000057C4, + 3151: 0x00026412, + 3152: 0x000263F8, + 3153: 0x00024962, + 3154: 0x00007FDD, + 3155: 0x00007B27, + 3156: 0x0002082C, + 3157: 0x00025AE9, + 3158: 0x00025D43, + 3159: 0x00007B0C, + 3160: 0x00025E0E, + 3161: 0x000099E6, + 3162: 0x00008645, + 3163: 0x00009A63, + 3164: 0x00006A1C, + 3165: 0x0002343F, + 3166: 0x000039E2, + 3167: 0x000249F7, + 3168: 0x000265AD, + 3169: 0x00009A1F, + 3170: 0x000265A0, + 3171: 0x00008480, + 3172: 0x00027127, + 3173: 0x00026CD1, + 3174: 0x000044EA, + 3175: 0x00008137, + 3176: 0x00004402, + 3177: 0x000080C6, + 3178: 0x00008109, + 3179: 0x00008142, + 3180: 0x000267B4, + 3181: 0x000098C3, + 3182: 0x00026A42, + 3183: 0x00008262, + 3184: 0x00008265, + 3185: 0x00026A51, + 3186: 0x00008453, + 3187: 0x00026DA7, + 3188: 0x00008610, + 3189: 0x0002721B, + 3190: 0x00005A86, + 3191: 0x0000417F, + 3192: 0x00021840, + 3193: 0x00005B2B, + 3194: 0x000218A1, + 3195: 0x00005AE4, + 3196: 0x000218D8, + 3197: 0x000086A0, + 3198: 0x0002F9BC, + 3199: 0x00023D8F, + 3200: 0x0000882D, + 3201: 0x00027422, + 3202: 0x00005A02, + 3203: 0x0000886E, + 3204: 0x00004F45, + 3205: 0x00008887, + 3206: 0x000088BF, + 3207: 0x000088E6, + 3208: 0x00008965, + 3209: 0x0000894D, + 3210: 0x00025683, + 3211: 0x00008954, + 3212: 0x00027785, + 3213: 0x00027784, + 3214: 0x00028BF5, + 3215: 0x00028BD9, + 3216: 0x00028B9C, + 3217: 0x000289F9, + 3218: 0x00003EAD, + 3219: 0x000084A3, + 3220: 0x000046F5, + 3221: 0x000046CF, + 3222: 0x000037F2, + 3223: 0x00008A3D, + 3224: 0x00008A1C, + 3225: 0x00029448, + 3226: 0x00005F4D, + 3227: 0x0000922B, + 3228: 0x00024284, + 3229: 0x000065D4, + 3230: 0x00007129, + 3231: 0x000070C4, + 3232: 0x00021845, + 3233: 0x00009D6D, + 3234: 0x00008C9F, + 3235: 0x00008CE9, + 3236: 0x00027DDC, + 3237: 0x0000599A, + 3238: 0x000077C3, + 3239: 0x000059F0, + 3240: 0x0000436E, + 3241: 0x000036D4, + 3242: 0x00008E2A, + 3243: 0x00008EA7, + 3244: 0x00024C09, + 3245: 0x00008F30, + 3246: 0x00008F4A, + 3247: 0x000042F4, + 3248: 0x00006C58, + 3249: 0x00006FBB, + 3250: 0x00022321, + 3251: 0x0000489B, + 3252: 0x00006F79, + 3253: 0x00006E8B, + 3254: 0x000217DA, + 3255: 0x00009BE9, + 3256: 0x000036B5, + 3257: 0x0002492F, + 3258: 0x000090BB, + 3259: 0x00009097, + 3260: 0x00005571, + 3261: 0x00004906, + 3262: 0x000091BB, + 3263: 0x00009404, + 3264: 0x00028A4B, + 3265: 0x00004062, + 3266: 0x00028AFC, + 3267: 0x00009427, + 3268: 0x00028C1D, + 3269: 0x00028C3B, + 3270: 0x000084E5, + 3271: 0x00008A2B, + 3272: 0x00009599, + 3273: 0x000095A7, + 3274: 0x00009597, + 3275: 0x00009596, + 3276: 0x00028D34, + 3277: 0x00007445, + 3278: 0x00003EC2, + 3279: 0x000248FF, + 3280: 0x00024A42, + 3281: 0x000243EA, + 3282: 0x00003EE7, + 3283: 0x00023225, + 3284: 0x0000968F, + 3285: 0x00028EE7, + 3286: 0x00028E66, + 3287: 0x00028E65, + 3288: 0x00003ECC, + 3289: 0x000249ED, + 3290: 0x00024A78, + 3291: 0x00023FEE, + 3292: 0x00007412, + 3293: 0x0000746B, + 3294: 0x00003EFC, + 3295: 0x00009741, + 3296: 0x000290B0, + 3297: 0x00006847, + 3298: 0x00004A1D, + 3299: 0x00029093, + 3300: 0x000257DF, + 3301: 0x0000975D, + 3302: 0x00009368, + 3303: 0x00028989, + 3304: 0x00028C26, + 3305: 0x00028B2F, + 3306: 0x000263BE, + 3307: 0x000092BA, + 3308: 0x00005B11, + 3309: 0x00008B69, + 3310: 0x0000493C, + 3311: 0x000073F9, + 3312: 0x0002421B, + 3313: 0x0000979B, + 3314: 0x00009771, + 3315: 0x00009938, + 3316: 0x00020F26, + 3317: 0x00005DC1, + 3318: 0x00028BC5, + 3319: 0x00024AB2, + 3320: 0x0000981F, + 3321: 0x000294DA, + 3322: 0x000092F6, + 3323: 0x000295D7, + 3324: 0x000091E5, + 3325: 0x000044C0, + 3326: 0x00028B50, + 3327: 0x00024A67, + 3328: 0x00028B64, + 3329: 0x000098DC, + 3330: 0x00028A45, + 3331: 0x00003F00, + 3332: 0x0000922A, + 3333: 0x00004925, + 3334: 0x00008414, + 3335: 0x0000993B, + 3336: 0x0000994D, + 3337: 0x00027B06, + 3338: 0x00003DFD, + 3339: 0x0000999B, + 3340: 0x00004B6F, + 3341: 0x000099AA, + 3342: 0x00009A5C, + 3343: 0x00028B65, + 3344: 0x000258C8, + 3345: 0x00006A8F, + 3346: 0x00009A21, + 3347: 0x00005AFE, + 3348: 0x00009A2F, + 3349: 0x000298F1, + 3350: 0x00004B90, + 3351: 0x00029948, + 3352: 0x000099BC, + 3353: 0x00004BBD, + 3354: 0x00004B97, + 3355: 0x0000937D, + 3356: 0x00005872, + 3357: 0x00021302, + 3358: 0x00005822, + 3359: 0x000249B8, + 3360: 0x000214E8, + 3361: 0x00007844, + 3362: 0x0002271F, + 3363: 0x00023DB8, + 3364: 0x000068C5, + 3365: 0x00003D7D, + 3366: 0x00009458, + 3367: 0x00003927, + 3368: 0x00006150, + 3369: 0x00022781, + 3370: 0x0002296B, + 3371: 0x00006107, + 3372: 0x00009C4F, + 3373: 0x00009C53, + 3374: 0x00009C7B, + 3375: 0x00009C35, + 3376: 0x00009C10, + 3377: 0x00009B7F, + 3378: 0x00009BCF, + 3379: 0x00029E2D, + 3380: 0x00009B9F, + 3381: 0x0002A1F5, + 3382: 0x0002A0FE, + 3383: 0x00009D21, + 3384: 0x00004CAE, + 3385: 0x00024104, + 3386: 0x00009E18, + 3387: 0x00004CB0, + 3388: 0x00009D0C, + 3389: 0x0002A1B4, + 3390: 0x0002A0ED, + 3391: 0x0002A0F3, + 3392: 0x0002992F, + 3393: 0x00009DA5, + 3394: 0x000084BD, + 3395: 0x00026E12, + 3396: 0x00026FDF, + 3397: 0x00026B82, + 3398: 0x000085FC, + 3399: 0x00004533, + 3400: 0x00026DA4, + 3401: 0x00026E84, + 3402: 0x00026DF0, + 3403: 0x00008420, + 3404: 0x000085EE, + 3405: 0x00026E00, + 3406: 0x000237D7, + 3407: 0x00026064, + 3408: 0x000079E2, + 3409: 0x0002359C, + 3410: 0x00023640, + 3411: 0x0000492D, + 3412: 0x000249DE, + 3413: 0x00003D62, + 3414: 0x000093DB, + 3415: 0x000092BE, + 3416: 0x00009348, + 3417: 0x000202BF, + 3418: 0x000078B9, + 3419: 0x00009277, + 3420: 0x0000944D, + 3421: 0x00004FE4, + 3422: 0x00003440, + 3423: 0x00009064, + 3424: 0x0002555D, + 3425: 0x0000783D, + 3426: 0x00007854, + 3427: 0x000078B6, + 3428: 0x0000784B, + 3429: 0x00021757, + 3430: 0x000231C9, + 3431: 0x00024941, + 3432: 0x0000369A, + 3433: 0x00004F72, + 3434: 0x00006FDA, + 3435: 0x00006FD9, + 3436: 0x0000701E, + 3437: 0x0000701E, + 3438: 0x00005414, + 3439: 0x000241B5, + 3440: 0x000057BB, + 3441: 0x000058F3, + 3442: 0x0000578A, + 3443: 0x00009D16, + 3444: 0x000057D7, + 3445: 0x00007134, + 3446: 0x000034AF, + 3447: 0x000241AC, + 3448: 0x000071EB, + 3449: 0x00026C40, + 3450: 0x00024F97, + 3451: 0x00005B28, + 3452: 0x000217B5, + 3453: 0x00028A49, + 3454: 0x0000610C, + 3455: 0x00005ACE, + 3456: 0x00005A0B, + 3457: 0x000042BC, + 3458: 0x00024488, + 3459: 0x0000372C, + 3460: 0x00004B7B, + 3461: 0x000289FC, + 3462: 0x000093BB, + 3463: 0x000093B8, + 3464: 0x000218D6, + 3465: 0x00020F1D, + 3466: 0x00008472, + 3467: 0x00026CC0, + 3468: 0x00021413, + 3469: 0x000242FA, + 3470: 0x00022C26, + 3471: 0x000243C1, + 3472: 0x00005994, + 3473: 0x00023DB7, + 3474: 0x00026741, + 3475: 0x00007DA8, + 3476: 0x0002615B, + 3477: 0x000260A4, + 3478: 0x000249B9, + 3479: 0x0002498B, + 3480: 0x000289FA, + 3481: 0x000092E5, + 3482: 0x000073E2, + 3483: 0x00003EE9, + 3484: 0x000074B4, + 3485: 0x00028B63, + 3486: 0x0002189F, + 3487: 0x00003EE1, + 3488: 0x00024AB3, + 3489: 0x00006AD8, + 3490: 0x000073F3, + 3491: 0x000073FB, + 3492: 0x00003ED6, + 3493: 0x00024A3E, + 3494: 0x00024A94, + 3495: 0x000217D9, + 3496: 0x00024A66, + 3497: 0x000203A7, + 3498: 0x00021424, + 3499: 0x000249E5, + 3500: 0x00007448, + 3501: 0x00024916, + 3502: 0x000070A5, + 3503: 0x00024976, + 3504: 0x00009284, + 3505: 0x000073E6, + 3506: 0x0000935F, + 3507: 0x000204FE, + 3508: 0x00009331, + 3509: 0x00028ACE, + 3510: 0x00028A16, + 3511: 0x00009386, + 3512: 0x00028BE7, + 3513: 0x000255D5, + 3514: 0x00004935, + 3515: 0x00028A82, + 3516: 0x0000716B, + 3517: 0x00024943, + 3518: 0x00020CFF, + 3519: 0x000056A4, + 3520: 0x0002061A, + 3521: 0x00020BEB, + 3522: 0x00020CB8, + 3523: 0x00005502, + 3524: 0x000079C4, + 3525: 0x000217FA, + 3526: 0x00007DFE, + 3527: 0x000216C2, + 3528: 0x00024A50, + 3529: 0x00021852, + 3530: 0x0000452E, + 3531: 0x00009401, + 3532: 0x0000370A, + 3533: 0x00028AC0, + 3534: 0x000249AD, + 3535: 0x000059B0, + 3536: 0x000218BF, + 3537: 0x00021883, + 3538: 0x00027484, + 3539: 0x00005AA1, + 3540: 0x000036E2, + 3541: 0x00023D5B, + 3542: 0x000036B0, + 3543: 0x0000925F, + 3544: 0x00005A79, + 3545: 0x00028A81, + 3546: 0x00021862, + 3547: 0x00009374, + 3548: 0x00003CCD, + 3549: 0x00020AB4, + 3550: 0x00004A96, + 3551: 0x0000398A, + 3552: 0x000050F4, + 3553: 0x00003D69, + 3554: 0x00003D4C, + 3555: 0x0002139C, + 3556: 0x00007175, + 3557: 0x000042FB, + 3558: 0x00028218, + 3559: 0x00006E0F, + 3560: 0x000290E4, + 3561: 0x000044EB, + 3562: 0x00006D57, + 3563: 0x00027E4F, + 3564: 0x00007067, + 3565: 0x00006CAF, + 3566: 0x00003CD6, + 3567: 0x00023FED, + 3568: 0x00023E2D, + 3569: 0x00006E02, + 3570: 0x00006F0C, + 3571: 0x00003D6F, + 3572: 0x000203F5, + 3573: 0x00007551, + 3574: 0x000036BC, + 3575: 0x000034C8, + 3576: 0x00004680, + 3577: 0x00003EDA, + 3578: 0x00004871, + 3579: 0x000059C4, + 3580: 0x0000926E, + 3581: 0x0000493E, + 3582: 0x00008F41, + 3583: 0x00028C1C, + 3584: 0x00026BC0, + 3585: 0x00005812, + 3586: 0x000057C8, + 3587: 0x000036D6, + 3588: 0x00021452, + 3589: 0x000070FE, + 3590: 0x00024362, + 3591: 0x00024A71, + 3592: 0x00022FE3, + 3593: 0x000212B0, + 3594: 0x000223BD, + 3595: 0x000068B9, + 3596: 0x00006967, + 3597: 0x00021398, + 3598: 0x000234E5, + 3599: 0x00027BF4, + 3600: 0x000236DF, + 3601: 0x00028A83, + 3602: 0x000237D6, + 3603: 0x000233FA, + 3604: 0x00024C9F, + 3605: 0x00006A1A, + 3606: 0x000236AD, + 3607: 0x00026CB7, + 3608: 0x0000843E, + 3609: 0x000044DF, + 3610: 0x000044CE, + 3611: 0x00026D26, + 3612: 0x00026D51, + 3613: 0x00026C82, + 3614: 0x00026FDE, + 3615: 0x00006F17, + 3616: 0x00027109, + 3617: 0x0000833D, + 3618: 0x0002173A, + 3619: 0x000083ED, + 3620: 0x00026C80, + 3621: 0x00027053, + 3622: 0x000217DB, + 3623: 0x00005989, + 3624: 0x00005A82, + 3625: 0x000217B3, + 3626: 0x00005A61, + 3627: 0x00005A71, + 3628: 0x00021905, + 3629: 0x000241FC, + 3630: 0x0000372D, + 3631: 0x000059EF, + 3632: 0x0002173C, + 3633: 0x000036C7, + 3634: 0x0000718E, + 3635: 0x00009390, + 3636: 0x0000669A, + 3637: 0x000242A5, + 3638: 0x00005A6E, + 3639: 0x00005A2B, + 3640: 0x00024293, + 3641: 0x00006A2B, + 3642: 0x00023EF9, + 3643: 0x00027736, + 3644: 0x0002445B, + 3645: 0x000242CA, + 3646: 0x0000711D, + 3647: 0x00024259, + 3648: 0x000289E1, + 3649: 0x00004FB0, + 3650: 0x00026D28, + 3651: 0x00005CC2, + 3652: 0x000244CE, + 3653: 0x00027E4D, + 3654: 0x000243BD, + 3655: 0x00006A0C, + 3656: 0x00024256, + 3657: 0x00021304, + 3658: 0x000070A6, + 3659: 0x00007133, + 3660: 0x000243E9, + 3661: 0x00003DA5, + 3662: 0x00006CDF, + 3663: 0x0002F825, + 3664: 0x00024A4F, + 3665: 0x00007E65, + 3666: 0x000059EB, + 3667: 0x00005D2F, + 3668: 0x00003DF3, + 3669: 0x00005F5C, + 3670: 0x00024A5D, + 3671: 0x000217DF, + 3672: 0x00007DA4, + 3673: 0x00008426, + 3674: 0x00005485, + 3675: 0x00023AFA, + 3676: 0x00023300, + 3677: 0x00020214, + 3678: 0x0000577E, + 3679: 0x000208D5, + 3680: 0x00020619, + 3681: 0x00003FE5, + 3682: 0x00021F9E, + 3683: 0x0002A2B6, + 3684: 0x00007003, + 3685: 0x0002915B, + 3686: 0x00005D70, + 3687: 0x0000738F, + 3688: 0x00007CD3, + 3689: 0x00028A59, + 3690: 0x00029420, + 3691: 0x00004FC8, + 3692: 0x00007FE7, + 3693: 0x000072CD, + 3694: 0x00007310, + 3695: 0x00027AF4, + 3696: 0x00007338, + 3697: 0x00007339, + 3698: 0x000256F6, + 3699: 0x00007341, + 3700: 0x00007348, + 3701: 0x00003EA9, + 3702: 0x00027B18, + 3703: 0x0000906C, + 3704: 0x000071F5, + 3705: 0x000248F2, + 3706: 0x000073E1, + 3707: 0x000081F6, + 3708: 0x00003ECA, + 3709: 0x0000770C, + 3710: 0x00003ED1, + 3711: 0x00006CA2, + 3712: 0x000056FD, + 3713: 0x00007419, + 3714: 0x0000741E, + 3715: 0x0000741F, + 3716: 0x00003EE2, + 3717: 0x00003EF0, + 3718: 0x00003EF4, + 3719: 0x00003EFA, + 3720: 0x000074D3, + 3721: 0x00003F0E, + 3722: 0x00003F53, + 3723: 0x00007542, + 3724: 0x0000756D, + 3725: 0x00007572, + 3726: 0x0000758D, + 3727: 0x00003F7C, + 3728: 0x000075C8, + 3729: 0x000075DC, + 3730: 0x00003FC0, + 3731: 0x0000764D, + 3732: 0x00003FD7, + 3733: 0x00007674, + 3734: 0x00003FDC, + 3735: 0x0000767A, + 3736: 0x00024F5C, + 3737: 0x00007188, + 3738: 0x00005623, + 3739: 0x00008980, + 3740: 0x00005869, + 3741: 0x0000401D, + 3742: 0x00007743, + 3743: 0x00004039, + 3744: 0x00006761, + 3745: 0x00004045, + 3746: 0x000035DB, + 3747: 0x00007798, + 3748: 0x0000406A, + 3749: 0x0000406F, + 3750: 0x00005C5E, + 3751: 0x000077BE, + 3752: 0x000077CB, + 3753: 0x000058F2, + 3754: 0x00007818, + 3755: 0x000070B9, + 3756: 0x0000781C, + 3757: 0x000040A8, + 3758: 0x00007839, + 3759: 0x00007847, + 3760: 0x00007851, + 3761: 0x00007866, + 3762: 0x00008448, + 3763: 0x00025535, + 3764: 0x00007933, + 3765: 0x00006803, + 3766: 0x00007932, + 3767: 0x00004103, + 3768: 0x00004109, + 3769: 0x00007991, + 3770: 0x00007999, + 3771: 0x00008FBB, + 3772: 0x00007A06, + 3773: 0x00008FBC, + 3774: 0x00004167, + 3775: 0x00007A91, + 3776: 0x000041B2, + 3777: 0x00007ABC, + 3778: 0x00008279, + 3779: 0x000041C4, + 3780: 0x00007ACF, + 3781: 0x00007ADB, + 3782: 0x000041CF, + 3783: 0x00004E21, + 3784: 0x00007B62, + 3785: 0x00007B6C, + 3786: 0x00007B7B, + 3787: 0x00007C12, + 3788: 0x00007C1B, + 3789: 0x00004260, + 3790: 0x0000427A, + 3791: 0x00007C7B, + 3792: 0x00007C9C, + 3793: 0x0000428C, + 3794: 0x00007CB8, + 3795: 0x00004294, + 3796: 0x00007CED, + 3797: 0x00008F93, + 3798: 0x000070C0, + 3799: 0x00020CCF, + 3800: 0x00007DCF, + 3801: 0x00007DD4, + 3802: 0x00007DD0, + 3803: 0x00007DFD, + 3804: 0x00007FAE, + 3805: 0x00007FB4, + 3806: 0x0000729F, + 3807: 0x00004397, + 3808: 0x00008020, + 3809: 0x00008025, + 3810: 0x00007B39, + 3811: 0x0000802E, + 3812: 0x00008031, + 3813: 0x00008054, + 3814: 0x00003DCC, + 3815: 0x000057B4, + 3816: 0x000070A0, + 3817: 0x000080B7, + 3818: 0x000080E9, + 3819: 0x000043ED, + 3820: 0x0000810C, + 3821: 0x0000732A, + 3822: 0x0000810E, + 3823: 0x00008112, + 3824: 0x00007560, + 3825: 0x00008114, + 3826: 0x00004401, + 3827: 0x00003B39, + 3828: 0x00008156, + 3829: 0x00008159, + 3830: 0x0000815A, + 3831: 0x00004413, + 3832: 0x0000583A, + 3833: 0x0000817C, + 3834: 0x00008184, + 3835: 0x00004425, + 3836: 0x00008193, + 3837: 0x0000442D, + 3838: 0x000081A5, + 3839: 0x000057EF, + 3840: 0x000081C1, + 3841: 0x000081E4, + 3842: 0x00008254, + 3843: 0x0000448F, + 3844: 0x000082A6, + 3845: 0x00008276, + 3846: 0x000082CA, + 3847: 0x000082D8, + 3848: 0x000082FF, + 3849: 0x000044B0, + 3850: 0x00008357, + 3851: 0x00009669, + 3852: 0x0000698A, + 3853: 0x00008405, + 3854: 0x000070F5, + 3855: 0x00008464, + 3856: 0x000060E3, + 3857: 0x00008488, + 3858: 0x00004504, + 3859: 0x000084BE, + 3860: 0x000084E1, + 3861: 0x000084F8, + 3862: 0x00008510, + 3863: 0x00008538, + 3864: 0x00008552, + 3865: 0x0000453B, + 3866: 0x0000856F, + 3867: 0x00008570, + 3868: 0x000085E0, + 3869: 0x00004577, + 3870: 0x00008672, + 3871: 0x00008692, + 3872: 0x000086B2, + 3873: 0x000086EF, + 3874: 0x00009645, + 3875: 0x0000878B, + 3876: 0x00004606, + 3877: 0x00004617, + 3878: 0x000088AE, + 3879: 0x000088FF, + 3880: 0x00008924, + 3881: 0x00008947, + 3882: 0x00008991, + 3883: 0x00027967, + 3884: 0x00008A29, + 3885: 0x00008A38, + 3886: 0x00008A94, + 3887: 0x00008AB4, + 3888: 0x00008C51, + 3889: 0x00008CD4, + 3890: 0x00008CF2, + 3891: 0x00008D1C, + 3892: 0x00004798, + 3893: 0x0000585F, + 3894: 0x00008DC3, + 3895: 0x000047ED, + 3896: 0x00004EEE, + 3897: 0x00008E3A, + 3898: 0x000055D8, + 3899: 0x00005754, + 3900: 0x00008E71, + 3901: 0x000055F5, + 3902: 0x00008EB0, + 3903: 0x00004837, + 3904: 0x00008ECE, + 3905: 0x00008EE2, + 3906: 0x00008EE4, + 3907: 0x00008EED, + 3908: 0x00008EF2, + 3909: 0x00008FB7, + 3910: 0x00008FC1, + 3911: 0x00008FCA, + 3912: 0x00008FCC, + 3913: 0x00009033, + 3914: 0x000099C4, + 3915: 0x000048AD, + 3916: 0x000098E0, + 3917: 0x00009213, + 3918: 0x0000491E, + 3919: 0x00009228, + 3920: 0x00009258, + 3921: 0x0000926B, + 3922: 0x000092B1, + 3923: 0x000092AE, + 3924: 0x000092BF, + 3925: 0x000092E3, + 3926: 0x000092EB, + 3927: 0x000092F3, + 3928: 0x000092F4, + 3929: 0x000092FD, + 3930: 0x00009343, + 3931: 0x00009384, + 3932: 0x000093AD, + 3933: 0x00004945, + 3934: 0x00004951, + 3935: 0x00009EBF, + 3936: 0x00009417, + 3937: 0x00005301, + 3938: 0x0000941D, + 3939: 0x0000942D, + 3940: 0x0000943E, + 3941: 0x0000496A, + 3942: 0x00009454, + 3943: 0x00009479, + 3944: 0x0000952D, + 3945: 0x000095A2, + 3946: 0x000049A7, + 3947: 0x000095F4, + 3948: 0x00009633, + 3949: 0x000049E5, + 3950: 0x000067A0, + 3951: 0x00004A24, + 3952: 0x00009740, + 3953: 0x00004A35, + 3954: 0x000097B2, + 3955: 0x000097C2, + 3956: 0x00005654, + 3957: 0x00004AE4, + 3958: 0x000060E8, + 3959: 0x000098B9, + 3960: 0x00004B19, + 3961: 0x000098F1, + 3962: 0x00005844, + 3963: 0x0000990E, + 3964: 0x00009919, + 3965: 0x000051B4, + 3966: 0x0000991C, + 3967: 0x00009937, + 3968: 0x00009942, + 3969: 0x0000995D, + 3970: 0x00009962, + 3971: 0x00004B70, + 3972: 0x000099C5, + 3973: 0x00004B9D, + 3974: 0x00009A3C, + 3975: 0x00009B0F, + 3976: 0x00007A83, + 3977: 0x00009B69, + 3978: 0x00009B81, + 3979: 0x00009BDD, + 3980: 0x00009BF1, + 3981: 0x00009BF4, + 3982: 0x00004C6D, + 3983: 0x00009C20, + 3984: 0x0000376F, + 3985: 0x00021BC2, + 3986: 0x00009D49, + 3987: 0x00009C3A, + 3988: 0x00009EFE, + 3989: 0x00005650, + 3990: 0x00009D93, + 3991: 0x00009DBD, + 3992: 0x00009DC0, + 3993: 0x00009DFC, + 3994: 0x000094F6, + 3995: 0x00008FB6, + 3996: 0x00009E7B, + 3997: 0x00009EAC, + 3998: 0x00009EB1, + 3999: 0x00009EBD, + 4000: 0x00009EC6, + 4001: 0x000094DC, + 4002: 0x00009EE2, + 4003: 0x00009EF1, + 4004: 0x00009EF8, + 4005: 0x00007AC8, + 4006: 0x00009F44, + 4007: 0x00020094, + 4008: 0x000202B7, + 4009: 0x000203A0, + 4010: 0x0000691A, + 4011: 0x000094C3, + 4012: 0x000059AC, + 4013: 0x000204D7, + 4014: 0x00005840, + 4015: 0x000094C1, + 4016: 0x000037B9, + 4017: 0x000205D5, + 4018: 0x00020615, + 4019: 0x00020676, + 4020: 0x000216BA, + 4021: 0x00005757, + 4022: 0x00007173, + 4023: 0x00020AC2, + 4024: 0x00020ACD, + 4025: 0x00020BBF, + 4026: 0x0000546A, + 4027: 0x0002F83B, + 4028: 0x00020BCB, + 4029: 0x0000549E, + 4030: 0x00020BFB, + 4031: 0x00020C3B, + 4032: 0x00020C53, + 4033: 0x00020C65, + 4034: 0x00020C7C, + 4035: 0x000060E7, + 4036: 0x00020C8D, + 4037: 0x0000567A, + 4038: 0x00020CB5, + 4039: 0x00020CDD, + 4040: 0x00020CED, + 4041: 0x00020D6F, + 4042: 0x00020DB2, + 4043: 0x00020DC8, + 4044: 0x00006955, + 4045: 0x00009C2F, + 4046: 0x000087A5, + 4047: 0x00020E04, + 4048: 0x00020E0E, + 4049: 0x00020ED7, + 4050: 0x00020F90, + 4051: 0x00020F2D, + 4052: 0x00020E73, + 4053: 0x00005C20, + 4054: 0x00020FBC, + 4055: 0x00005E0B, + 4056: 0x0002105C, + 4057: 0x0002104F, + 4058: 0x00021076, + 4059: 0x0000671E, + 4060: 0x0002107B, + 4061: 0x00021088, + 4062: 0x00021096, + 4063: 0x00003647, + 4064: 0x000210BF, + 4065: 0x000210D3, + 4066: 0x0002112F, + 4067: 0x0002113B, + 4068: 0x00005364, + 4069: 0x000084AD, + 4070: 0x000212E3, + 4071: 0x00021375, + 4072: 0x00021336, + 4073: 0x00008B81, + 4074: 0x00021577, + 4075: 0x00021619, + 4076: 0x000217C3, + 4077: 0x000217C7, + 4078: 0x00004E78, + 4079: 0x000070BB, + 4080: 0x0002182D, + 4081: 0x0002196A, + 4082: 0x00021A2D, + 4083: 0x00021A45, + 4084: 0x00021C2A, + 4085: 0x00021C70, + 4086: 0x00021CAC, + 4087: 0x00021EC8, + 4088: 0x000062C3, + 4089: 0x00021ED5, + 4090: 0x00021F15, + 4091: 0x00007198, + 4092: 0x00006855, + 4093: 0x00022045, + 4094: 0x000069E9, + 4095: 0x000036C8, + 4096: 0x0002227C, + 4097: 0x000223D7, + 4098: 0x000223FA, + 4099: 0x0002272A, + 4100: 0x00022871, + 4101: 0x0002294F, + 4102: 0x000082FD, + 4103: 0x00022967, + 4104: 0x00022993, + 4105: 0x00022AD5, + 4106: 0x000089A5, + 4107: 0x00022AE8, + 4108: 0x00008FA0, + 4109: 0x00022B0E, + 4110: 0x000097B8, + 4111: 0x00022B3F, + 4112: 0x00009847, + 4113: 0x00009ABD, + 4114: 0x00022C4C, + 4116: 0x00022C88, + 4117: 0x00022CB7, + 4118: 0x00025BE8, + 4119: 0x00022D08, + 4120: 0x00022D12, + 4121: 0x00022DB7, + 4122: 0x00022D95, + 4123: 0x00022E42, + 4124: 0x00022F74, + 4125: 0x00022FCC, + 4126: 0x00023033, + 4127: 0x00023066, + 4128: 0x0002331F, + 4129: 0x000233DE, + 4130: 0x00005FB1, + 4131: 0x00006648, + 4132: 0x000066BF, + 4133: 0x00027A79, + 4134: 0x00023567, + 4135: 0x000235F3, + 4136: 0x00007201, + 4137: 0x000249BA, + 4138: 0x000077D7, + 4139: 0x0002361A, + 4140: 0x00023716, + 4141: 0x00007E87, + 4142: 0x00020346, + 4143: 0x000058B5, + 4144: 0x0000670E, + 4145: 0x00006918, + 4146: 0x00023AA7, + 4147: 0x00027657, + 4148: 0x00025FE2, + 4149: 0x00023E11, + 4150: 0x00023EB9, + 4151: 0x000275FE, + 4152: 0x0002209A, + 4153: 0x000048D0, + 4154: 0x00004AB8, + 4155: 0x00024119, + 4156: 0x00028A9A, + 4157: 0x000242EE, + 4158: 0x0002430D, + 4159: 0x0002403B, + 4160: 0x00024334, + 4161: 0x00024396, + 4162: 0x00024A45, + 4163: 0x000205CA, + 4164: 0x000051D2, + 4165: 0x00020611, + 4166: 0x0000599F, + 4167: 0x00021EA8, + 4168: 0x00003BBE, + 4169: 0x00023CFF, + 4170: 0x00024404, + 4171: 0x000244D6, + 4172: 0x00005788, + 4173: 0x00024674, + 4174: 0x0000399B, + 4175: 0x0002472F, + 4176: 0x000285E8, + 4177: 0x000299C9, + 4178: 0x00003762, + 4179: 0x000221C3, + 4180: 0x00008B5E, + 4181: 0x00028B4E, + 4182: 0x000099D6, + 4183: 0x00024812, + 4184: 0x000248FB, + 4185: 0x00024A15, + 4186: 0x00007209, + 4187: 0x00024AC0, + 4188: 0x00020C78, + 4189: 0x00005965, + 4190: 0x00024EA5, + 4191: 0x00024F86, + 4192: 0x00020779, + 4193: 0x00008EDA, + 4194: 0x0002502C, + 4195: 0x0000528F, + 4196: 0x0000573F, + 4197: 0x00007171, + 4198: 0x00025299, + 4199: 0x00025419, + 4200: 0x00023F4A, + 4201: 0x00024AA7, + 4202: 0x000055BC, + 4203: 0x00025446, + 4204: 0x0002546E, + 4205: 0x00026B52, + 4206: 0x000091D4, + 4207: 0x00003473, + 4208: 0x0002553F, + 4209: 0x00027632, + 4210: 0x0002555E, + 4211: 0x00004718, + 4212: 0x00025562, + 4213: 0x00025566, + 4214: 0x000257C7, + 4215: 0x0002493F, + 4216: 0x0002585D, + 4217: 0x00005066, + 4218: 0x000034FB, + 4219: 0x000233CC, + 4220: 0x000060DE, + 4221: 0x00025903, + 4222: 0x0000477C, + 4223: 0x00028948, + 4224: 0x00025AAE, + 4225: 0x00025B89, + 4226: 0x00025C06, + 4227: 0x00021D90, + 4228: 0x000057A1, + 4229: 0x00007151, + 4230: 0x00006FB6, + 4231: 0x00026102, + 4232: 0x00027C12, + 4233: 0x00009056, + 4234: 0x000261B2, + 4235: 0x00024F9A, + 4236: 0x00008B62, + 4237: 0x00026402, + 4238: 0x0002644A, + 4239: 0x00005D5B, + 4240: 0x00026BF7, + 4241: 0x00008F36, + 4242: 0x00026484, + 4243: 0x0002191C, + 4244: 0x00008AEA, + 4245: 0x000249F6, + 4246: 0x00026488, + 4247: 0x00023FEF, + 4248: 0x00026512, + 4249: 0x00004BC0, + 4250: 0x000265BF, + 4251: 0x000266B5, + 4252: 0x0002271B, + 4253: 0x00009465, + 4254: 0x000257E1, + 4255: 0x00006195, + 4256: 0x00005A27, + 4257: 0x0002F8CD, + 4258: 0x00004FBB, + 4259: 0x000056B9, + 4260: 0x00024521, + 4261: 0x000266FC, + 4262: 0x00004E6A, + 4263: 0x00024934, + 4264: 0x00009656, + 4265: 0x00006D8F, + 4266: 0x00026CBD, + 4267: 0x00003618, + 4268: 0x00008977, + 4269: 0x00026799, + 4270: 0x0002686E, + 4271: 0x00026411, + 4272: 0x0002685E, + 4273: 0x000071DF, + 4274: 0x000268C7, + 4275: 0x00007B42, + 4276: 0x000290C0, + 4277: 0x00020A11, + 4278: 0x00026926, + 4279: 0x00009104, + 4280: 0x00026939, + 4281: 0x00007A45, + 4282: 0x00009DF0, + 4283: 0x000269FA, + 4284: 0x00009A26, + 4285: 0x00026A2D, + 4286: 0x0000365F, + 4287: 0x00026469, + 4288: 0x00020021, + 4289: 0x00007983, + 4290: 0x00026A34, + 4291: 0x00026B5B, + 4292: 0x00005D2C, + 4293: 0x00023519, + 4294: 0x000083CF, + 4295: 0x00026B9D, + 4296: 0x000046D0, + 4297: 0x00026CA4, + 4298: 0x0000753B, + 4299: 0x00008865, + 4300: 0x00026DAE, + 4301: 0x000058B6, + 4302: 0x0000371C, + 4303: 0x0002258D, + 4304: 0x0002704B, + 4305: 0x000271CD, + 4306: 0x00003C54, + 4307: 0x00027280, + 4308: 0x00027285, + 4309: 0x00009281, + 4310: 0x0002217A, + 4311: 0x0002728B, + 4312: 0x00009330, + 4313: 0x000272E6, + 4314: 0x000249D0, + 4315: 0x00006C39, + 4316: 0x0000949F, + 4317: 0x00027450, + 4318: 0x00020EF8, + 4319: 0x00008827, + 4320: 0x000088F5, + 4321: 0x00022926, + 4322: 0x00028473, + 4323: 0x000217B1, + 4324: 0x00006EB8, + 4325: 0x00024A2A, + 4326: 0x00021820, + 4327: 0x000039A4, + 4328: 0x000036B9, + 4329: 0x00005C10, + 4330: 0x000079E3, + 4331: 0x0000453F, + 4332: 0x000066B6, + 4333: 0x00029CAD, + 4334: 0x000298A4, + 4335: 0x00008943, + 4336: 0x000277CC, + 4337: 0x00027858, + 4338: 0x000056D6, + 4339: 0x000040DF, + 4340: 0x0002160A, + 4341: 0x000039A1, + 4342: 0x0002372F, + 4343: 0x000280E8, + 4344: 0x000213C5, + 4345: 0x000071AD, + 4346: 0x00008366, + 4347: 0x000279DD, + 4348: 0x000291A8, + 4349: 0x00005A67, + 4350: 0x00004CB7, + 4351: 0x000270AF, + 4352: 0x000289AB, + 4353: 0x000279FD, + 4354: 0x00027A0A, + 4355: 0x00027B0B, + 4356: 0x00027D66, + 4357: 0x0002417A, + 4358: 0x00007B43, + 4359: 0x0000797E, + 4360: 0x00028009, + 4361: 0x00006FB5, + 4362: 0x0002A2DF, + 4363: 0x00006A03, + 4364: 0x00028318, + 4365: 0x000053A2, + 4366: 0x00026E07, + 4367: 0x000093BF, + 4368: 0x00006836, + 4369: 0x0000975D, + 4370: 0x0002816F, + 4371: 0x00028023, + 4372: 0x000269B5, + 4373: 0x000213ED, + 4374: 0x0002322F, + 4375: 0x00028048, + 4376: 0x00005D85, + 4377: 0x00028C30, + 4378: 0x00028083, + 4379: 0x00005715, + 4380: 0x00009823, + 4381: 0x00028949, + 4382: 0x00005DAB, + 4383: 0x00024988, + 4384: 0x000065BE, + 4385: 0x000069D5, + 4386: 0x000053D2, + 4387: 0x00024AA5, + 4388: 0x00023F81, + 4389: 0x00003C11, + 4390: 0x00006736, + 4391: 0x00028090, + 4392: 0x000280F4, + 4393: 0x0002812E, + 4394: 0x00021FA1, + 4395: 0x0002814F, + 4396: 0x00028189, + 4397: 0x000281AF, + 4398: 0x0002821A, + 4399: 0x00028306, + 4400: 0x0002832F, + 4401: 0x0002838A, + 4402: 0x000035CA, + 4403: 0x00028468, + 4404: 0x000286AA, + 4405: 0x000048FA, + 4406: 0x000063E6, + 4407: 0x00028956, + 4408: 0x00007808, + 4409: 0x00009255, + 4410: 0x000289B8, + 4411: 0x000043F2, + 4412: 0x000289E7, + 4413: 0x000043DF, + 4414: 0x000289E8, + 4415: 0x00028B46, + 4416: 0x00028BD4, + 4417: 0x000059F8, + 4418: 0x00028C09, + 4419: 0x00008F0B, + 4420: 0x00028FC5, + 4421: 0x000290EC, + 4422: 0x00007B51, + 4423: 0x00029110, + 4424: 0x0002913C, + 4425: 0x00003DF7, + 4426: 0x0002915E, + 4427: 0x00024ACA, + 4428: 0x00008FD0, + 4429: 0x0000728F, + 4430: 0x0000568B, + 4431: 0x000294E7, + 4432: 0x000295E9, + 4433: 0x000295B0, + 4434: 0x000295B8, + 4435: 0x00029732, + 4436: 0x000298D1, + 4437: 0x00029949, + 4438: 0x0002996A, + 4439: 0x000299C3, + 4440: 0x00029A28, + 4441: 0x00029B0E, + 4442: 0x00029D5A, + 4443: 0x00029D9B, + 4444: 0x00007E9F, + 4445: 0x00029EF8, + 4446: 0x00029F23, + 4447: 0x00004CA4, + 4448: 0x00009547, + 4449: 0x0002A293, + 4450: 0x000071A2, + 4451: 0x0002A2FF, + 4452: 0x00004D91, + 4453: 0x00009012, + 4454: 0x0002A5CB, + 4455: 0x00004D9C, + 4456: 0x00020C9C, + 4457: 0x00008FBE, + 4458: 0x000055C1, + 4459: 0x00008FBA, + 4460: 0x000224B0, + 4461: 0x00008FB9, + 4462: 0x00024A93, + 4463: 0x00004509, + 4464: 0x00007E7F, + 4465: 0x00006F56, + 4466: 0x00006AB1, + 4467: 0x00004EEA, + 4468: 0x000034E4, + 4469: 0x00028B2C, + 4470: 0x0002789D, + 4471: 0x0000373A, + 4472: 0x00008E80, + 4473: 0x000217F5, + 4474: 0x00028024, + 4475: 0x00028B6C, + 4476: 0x00028B99, + 4477: 0x00027A3E, + 4478: 0x000266AF, + 4479: 0x00003DEB, + 4480: 0x00027655, + 4481: 0x00023CB7, + 4482: 0x00025635, + 4483: 0x00025956, + 4484: 0x00004E9A, + 4485: 0x00025E81, + 4486: 0x00026258, + 4487: 0x000056BF, + 4488: 0x00020E6D, + 4489: 0x00008E0E, + 4490: 0x00005B6D, + 4491: 0x00023E88, + 4492: 0x00024C9E, + 4493: 0x000063DE, + 4494: 0x000062D0, + 4495: 0x000217F6, + 4496: 0x0002187B, + 4497: 0x00006530, + 4498: 0x0000562D, + 4499: 0x00025C4A, + 4500: 0x0000541A, + 4501: 0x00025311, + 4502: 0x00003DC6, + 4503: 0x00029D98, + 4504: 0x00004C7D, + 4505: 0x00005622, + 4506: 0x0000561E, + 4507: 0x00007F49, + 4508: 0x00025ED8, + 4509: 0x00005975, + 4510: 0x00023D40, + 4511: 0x00008770, + 4512: 0x00004E1C, + 4513: 0x00020FEA, + 4514: 0x00020D49, + 4515: 0x000236BA, + 4516: 0x00008117, + 4517: 0x00009D5E, + 4518: 0x00008D18, + 4519: 0x0000763B, + 4520: 0x00009C45, + 4521: 0x0000764E, + 4522: 0x000077B9, + 4523: 0x00009345, + 4524: 0x00005432, + 4525: 0x00008148, + 4526: 0x000082F7, + 4527: 0x00005625, + 4528: 0x00008132, + 4529: 0x00008418, + 4530: 0x000080BD, + 4531: 0x000055EA, + 4532: 0x00007962, + 4533: 0x00005643, + 4534: 0x00005416, + 4535: 0x00020E9D, + 4536: 0x000035CE, + 4537: 0x00005605, + 4538: 0x000055F1, + 4539: 0x000066F1, + 4540: 0x000282E2, + 4541: 0x0000362D, + 4542: 0x00007534, + 4543: 0x000055F0, + 4544: 0x000055BA, + 4545: 0x00005497, + 4546: 0x00005572, + 4547: 0x00020C41, + 4548: 0x00020C96, + 4549: 0x00005ED0, + 4550: 0x00025148, + 4551: 0x00020E76, + 4552: 0x00022C62, + 4553: 0x00020EA2, + 4554: 0x00009EAB, + 4555: 0x00007D5A, + 4556: 0x000055DE, + 4557: 0x00021075, + 4558: 0x0000629D, + 4559: 0x0000976D, + 4560: 0x00005494, + 4561: 0x00008CCD, + 4562: 0x000071F6, + 4563: 0x00009176, + 4564: 0x000063FC, + 4565: 0x000063B9, + 4566: 0x000063FE, + 4567: 0x00005569, + 4568: 0x00022B43, + 4569: 0x00009C72, + 4570: 0x00022EB3, + 4571: 0x0000519A, + 4572: 0x000034DF, + 4573: 0x00020DA7, + 4574: 0x000051A7, + 4575: 0x0000544D, + 4576: 0x0000551E, + 4577: 0x00005513, + 4578: 0x00007666, + 4579: 0x00008E2D, + 4580: 0x0002688A, + 4581: 0x000075B1, + 4582: 0x000080B6, + 4583: 0x00008804, + 4584: 0x00008786, + 4585: 0x000088C7, + 4586: 0x000081B6, + 4587: 0x0000841C, + 4588: 0x000210C1, + 4589: 0x000044EC, + 4590: 0x00007304, + 4591: 0x00024706, + 4592: 0x00005B90, + 4593: 0x0000830B, + 4594: 0x00026893, + 4595: 0x0000567B, + 4596: 0x000226F4, + 4597: 0x00027D2F, + 4598: 0x000241A3, + 4599: 0x00027D73, + 4600: 0x00026ED0, + 4601: 0x000272B6, + 4602: 0x00009170, + 4603: 0x000211D9, + 4604: 0x00009208, + 4605: 0x00023CFC, + 4606: 0x0002A6A9, + 4607: 0x00020EAC, + 4608: 0x00020EF9, + 4609: 0x00007266, + 4610: 0x00021CA2, + 4611: 0x0000474E, + 4612: 0x00024FC2, + 4613: 0x00027FF9, + 4614: 0x00020FEB, + 4615: 0x000040FA, + 4616: 0x00009C5D, + 4617: 0x0000651F, + 4618: 0x00022DA0, + 4619: 0x000048F3, + 4620: 0x000247E0, + 4621: 0x00029D7C, + 4622: 0x00020FEC, + 4623: 0x00020E0A, + 4624: 0x00006062, + 4625: 0x000275A3, + 4626: 0x00020FED, + 4628: 0x00026048, + 4629: 0x00021187, + 4630: 0x000071A3, + 4631: 0x00007E8E, + 4632: 0x00009D50, + 4633: 0x00004E1A, + 4634: 0x00004E04, + 4635: 0x00003577, + 4636: 0x00005B0D, + 4637: 0x00006CB2, + 4638: 0x00005367, + 4639: 0x000036AC, + 4640: 0x000039DC, + 4641: 0x0000537D, + 4642: 0x000036A5, + 4643: 0x00024618, + 4644: 0x0000589A, + 4645: 0x00024B6E, + 4646: 0x0000822D, + 4647: 0x0000544B, + 4648: 0x000057AA, + 4649: 0x00025A95, + 4650: 0x00020979, + 4652: 0x00003A52, + 4653: 0x00022465, + 4654: 0x00007374, + 4655: 0x00029EAC, + 4656: 0x00004D09, + 4657: 0x00009BED, + 4658: 0x00023CFE, + 4659: 0x00029F30, + 4660: 0x00004C5B, + 4661: 0x00024FA9, + 4662: 0x0002959E, + 4663: 0x00029FDE, + 4664: 0x0000845C, + 4665: 0x00023DB6, + 4666: 0x000272B2, + 4667: 0x000267B3, + 4668: 0x00023720, + 4669: 0x0000632E, + 4670: 0x00007D25, + 4671: 0x00023EF7, + 4672: 0x00023E2C, + 4673: 0x00003A2A, + 4674: 0x00009008, + 4675: 0x000052CC, + 4676: 0x00003E74, + 4677: 0x0000367A, + 4678: 0x000045E9, + 4679: 0x0002048E, + 4680: 0x00007640, + 4681: 0x00005AF0, + 4682: 0x00020EB6, + 4683: 0x0000787A, + 4684: 0x00027F2E, + 4685: 0x000058A7, + 4686: 0x000040BF, + 4687: 0x0000567C, + 4688: 0x00009B8B, + 4689: 0x00005D74, + 4690: 0x00007654, + 4691: 0x0002A434, + 4692: 0x00009E85, + 4693: 0x00004CE1, + 4694: 0x000075F9, + 4695: 0x000037FB, + 4696: 0x00006119, + 4697: 0x000230DA, + 4698: 0x000243F2, + 4700: 0x0000565D, + 4701: 0x000212A9, + 4702: 0x000057A7, + 4703: 0x00024963, + 4704: 0x00029E06, + 4705: 0x00005234, + 4706: 0x000270AE, + 4707: 0x000035AD, + 4708: 0x00006C4A, + 4709: 0x00009D7C, + 4710: 0x00007C56, + 4711: 0x00009B39, + 4712: 0x000057DE, + 4713: 0x0002176C, + 4714: 0x00005C53, + 4715: 0x000064D3, + 4716: 0x000294D0, + 4717: 0x00026335, + 4718: 0x00027164, + 4719: 0x000086AD, + 4720: 0x00020D28, + 4721: 0x00026D22, + 4722: 0x00024AE2, + 4723: 0x00020D71, + 4725: 0x000051FE, + 4726: 0x00021F0F, + 4727: 0x00005D8E, + 4728: 0x00009703, + 4729: 0x00021DD1, + 4730: 0x00009E81, + 4731: 0x0000904C, + 4732: 0x00007B1F, + 4733: 0x00009B02, + 4734: 0x00005CD1, + 4735: 0x00007BA3, + 4736: 0x00006268, + 4737: 0x00006335, + 4738: 0x00009AFF, + 4739: 0x00007BCF, + 4740: 0x00009B2A, + 4741: 0x00007C7E, + 4742: 0x00009B2E, + 4743: 0x00007C42, + 4744: 0x00007C86, + 4745: 0x00009C15, + 4746: 0x00007BFC, + 4747: 0x00009B09, + 4748: 0x00009F17, + 4749: 0x00009C1B, + 4750: 0x0002493E, + 4751: 0x00009F5A, + 4752: 0x00005573, + 4753: 0x00005BC3, + 4754: 0x00004FFD, + 4755: 0x00009E98, + 4756: 0x00004FF2, + 4757: 0x00005260, + 4758: 0x00003E06, + 4759: 0x000052D1, + 4760: 0x00005767, + 4761: 0x00005056, + 4762: 0x000059B7, + 4763: 0x00005E12, + 4764: 0x000097C8, + 4765: 0x00009DAB, + 4766: 0x00008F5C, + 4767: 0x00005469, + 4768: 0x000097B4, + 4769: 0x00009940, + 4770: 0x000097BA, + 4771: 0x0000532C, + 4772: 0x00006130, + 4773: 0x0000692C, + 4774: 0x000053DA, + 4775: 0x00009C0A, + 4776: 0x00009D02, + 4777: 0x00004C3B, + 4778: 0x00009641, + 4779: 0x00006980, + 4780: 0x000050A6, + 4781: 0x00007546, + 4782: 0x0002176D, + 4783: 0x000099DA, + 4784: 0x00005273, + 4786: 0x00009159, + 4787: 0x00009681, + 4788: 0x0000915C, + 4790: 0x00009151, + 4791: 0x00028E97, + 4792: 0x0000637F, + 4793: 0x00026D23, + 4794: 0x00006ACA, + 4795: 0x00005611, + 4796: 0x0000918E, + 4797: 0x0000757A, + 4798: 0x00006285, + 4799: 0x000203FC, + 4800: 0x0000734F, + 4801: 0x00007C70, + 4802: 0x00025C21, + 4803: 0x00023CFD, + 4805: 0x00024919, + 4806: 0x000076D6, + 4807: 0x00009B9D, + 4808: 0x00004E2A, + 4809: 0x00020CD4, + 4810: 0x000083BE, + 4811: 0x00008842, + 4813: 0x00005C4A, + 4814: 0x000069C0, + 4815: 0x000050ED, + 4816: 0x0000577A, + 4817: 0x0000521F, + 4818: 0x00005DF5, + 4819: 0x00004ECE, + 4820: 0x00006C31, + 4821: 0x000201F2, + 4822: 0x00004F39, + 4823: 0x0000549C, + 4824: 0x000054DA, + 4825: 0x0000529A, + 4826: 0x00008D82, + 4827: 0x000035FE, + 4828: 0x00005F0C, + 4829: 0x000035F3, + 4831: 0x00006B52, + 4832: 0x0000917C, + 4833: 0x00009FA5, + 4834: 0x00009B97, + 4835: 0x0000982E, + 4836: 0x000098B4, + 4837: 0x00009ABA, + 4838: 0x00009EA8, + 4839: 0x00009E84, + 4840: 0x0000717A, + 4841: 0x00007B14, + 4843: 0x00006BFA, + 4844: 0x00008818, + 4845: 0x00007F78, + 4847: 0x00005620, + 4848: 0x0002A64A, + 4849: 0x00008E77, + 4850: 0x00009F53, + 4852: 0x00008DD4, + 4853: 0x00008E4F, + 4854: 0x00009E1C, + 4855: 0x00008E01, + 4856: 0x00006282, + 4857: 0x0002837D, + 4858: 0x00008E28, + 4859: 0x00008E75, + 4860: 0x00007AD3, + 4861: 0x00024A77, + 4862: 0x00007A3E, + 4863: 0x000078D8, + 4864: 0x00006CEA, + 4865: 0x00008A67, + 4866: 0x00007607, + 4867: 0x00028A5A, + 4868: 0x00009F26, + 4869: 0x00006CCE, + 4870: 0x000087D6, + 4871: 0x000075C3, + 4872: 0x0002A2B2, + 4873: 0x00007853, + 4874: 0x0002F840, + 4875: 0x00008D0C, + 4876: 0x000072E2, + 4877: 0x00007371, + 4878: 0x00008B2D, + 4879: 0x00007302, + 4880: 0x000074F1, + 4881: 0x00008CEB, + 4882: 0x00024ABB, + 4883: 0x0000862F, + 4884: 0x00005FBA, + 4885: 0x000088A0, + 4886: 0x000044B7, + 4888: 0x0002183B, + 4889: 0x00026E05, + 4891: 0x00008A7E, + 4892: 0x0002251B, + 4894: 0x000060FD, + 4895: 0x00007667, + 4896: 0x00009AD7, + 4897: 0x00009D44, + 4898: 0x0000936E, + 4899: 0x00009B8F, + 4900: 0x000087F5, + 4902: 0x0000880F, + 4903: 0x00008CF7, + 4904: 0x0000732C, + 4905: 0x00009721, + 4906: 0x00009BB0, + 4907: 0x000035D6, + 4908: 0x000072B2, + 4909: 0x00004C07, + 4910: 0x00007C51, + 4911: 0x0000994A, + 4912: 0x00026159, + 4913: 0x00006159, + 4914: 0x00004C04, + 4915: 0x00009E96, + 4916: 0x0000617D, + 4918: 0x0000575F, + 4919: 0x0000616F, + 4920: 0x000062A6, + 4921: 0x00006239, + 4922: 0x000062CE, + 4923: 0x00003A5C, + 4924: 0x000061E2, + 4925: 0x000053AA, + 4926: 0x000233F5, + 4927: 0x00006364, + 4928: 0x00006802, + 4929: 0x000035D2, + 4930: 0x00005D57, + 4931: 0x00028BC2, + 4932: 0x00008FDA, + 4933: 0x00028E39, + 4935: 0x000050D9, + 4936: 0x00021D46, + 4937: 0x00007906, + 4938: 0x00005332, + 4939: 0x00009638, + 4940: 0x00020F3B, + 4941: 0x00004065, + 4943: 0x000077FE, + 4945: 0x00007CC2, + 4946: 0x00025F1A, + 4947: 0x00007CDA, + 4948: 0x00007A2D, + 4949: 0x00008066, + 4950: 0x00008063, + 4951: 0x00007D4D, + 4952: 0x00007505, + 4953: 0x000074F2, + 4954: 0x00008994, + 4955: 0x0000821A, + 4956: 0x0000670C, + 4957: 0x00008062, + 4958: 0x00027486, + 4959: 0x0000805B, + 4960: 0x000074F0, + 4961: 0x00008103, + 4962: 0x00007724, + 4963: 0x00008989, + 4964: 0x000267CC, + 4965: 0x00007553, + 4966: 0x00026ED1, + 4967: 0x000087A9, + 4968: 0x000087CE, + 4969: 0x000081C8, + 4970: 0x0000878C, + 4971: 0x00008A49, + 4972: 0x00008CAD, + 4973: 0x00008B43, + 4974: 0x0000772B, + 4975: 0x000074F8, + 4976: 0x000084DA, + 4977: 0x00003635, + 4978: 0x000069B2, + 4979: 0x00008DA6, + 4981: 0x000089A9, + 4982: 0x00007468, + 4983: 0x00006DB9, + 4984: 0x000087C1, + 4985: 0x00024011, + 4986: 0x000074E7, + 4987: 0x00003DDB, + 4988: 0x00007176, + 4989: 0x000060A4, + 4990: 0x0000619C, + 4991: 0x00003CD1, + 4992: 0x00007162, + 4993: 0x00006077, + 4995: 0x00007F71, + 4996: 0x00028B2D, + 4997: 0x00007250, + 4998: 0x000060E9, + 4999: 0x00004B7E, + 5000: 0x00005220, + 5001: 0x00003C18, + 5002: 0x00023CC7, + 5003: 0x00025ED7, + 5004: 0x00027656, + 5005: 0x00025531, + 5006: 0x00021944, + 5007: 0x000212FE, + 5008: 0x00029903, + 5009: 0x00026DDC, + 5010: 0x000270AD, + 5011: 0x00005CC1, + 5012: 0x000261AD, + 5013: 0x00028A0F, + 5014: 0x00023677, + 5015: 0x000200EE, + 5016: 0x00026846, + 5017: 0x00024F0E, + 5018: 0x00004562, + 5019: 0x00005B1F, + 5020: 0x0002634C, + 5021: 0x00009F50, + 5022: 0x00009EA6, + 5023: 0x0002626B, + 5024: 0x00003000, + 5025: 0x0000FF0C, + 5026: 0x00003001, + 5027: 0x00003002, + 5028: 0x0000FF0E, + 5029: 0x00002027, + 5030: 0x0000FF1B, + 5031: 0x0000FF1A, + 5032: 0x0000FF1F, + 5033: 0x0000FF01, + 5034: 0x0000FE30, + 5035: 0x00002026, + 5036: 0x00002025, + 5037: 0x0000FE50, + 5038: 0x0000FE51, + 5039: 0x0000FE52, + 5040: 0x000000B7, + 5041: 0x0000FE54, + 5042: 0x0000FE55, + 5043: 0x0000FE56, + 5044: 0x0000FE57, + 5045: 0x0000FF5C, + 5046: 0x00002013, + 5047: 0x0000FE31, + 5048: 0x00002014, + 5049: 0x0000FE33, + 5050: 0x00002574, + 5051: 0x0000FE34, + 5052: 0x0000FE4F, + 5053: 0x0000FF08, + 5054: 0x0000FF09, + 5055: 0x0000FE35, + 5056: 0x0000FE36, + 5057: 0x0000FF5B, + 5058: 0x0000FF5D, + 5059: 0x0000FE37, + 5060: 0x0000FE38, + 5061: 0x00003014, + 5062: 0x00003015, + 5063: 0x0000FE39, + 5064: 0x0000FE3A, + 5065: 0x00003010, + 5066: 0x00003011, + 5067: 0x0000FE3B, + 5068: 0x0000FE3C, + 5069: 0x0000300A, + 5070: 0x0000300B, + 5071: 0x0000FE3D, + 5072: 0x0000FE3E, + 5073: 0x00003008, + 5074: 0x00003009, + 5075: 0x0000FE3F, + 5076: 0x0000FE40, + 5077: 0x0000300C, + 5078: 0x0000300D, + 5079: 0x0000FE41, + 5080: 0x0000FE42, + 5081: 0x0000300E, + 5082: 0x0000300F, + 5083: 0x0000FE43, + 5084: 0x0000FE44, + 5085: 0x0000FE59, + 5086: 0x0000FE5A, + 5087: 0x0000FE5B, + 5088: 0x0000FE5C, + 5089: 0x0000FE5D, + 5090: 0x0000FE5E, + 5091: 0x00002018, + 5092: 0x00002019, + 5093: 0x0000201C, + 5094: 0x0000201D, + 5095: 0x0000301D, + 5096: 0x0000301E, + 5097: 0x00002035, + 5098: 0x00002032, + 5099: 0x0000FF03, + 5100: 0x0000FF06, + 5101: 0x0000FF0A, + 5102: 0x0000203B, + 5103: 0x000000A7, + 5104: 0x00003003, + 5105: 0x000025CB, + 5106: 0x000025CF, + 5107: 0x000025B3, + 5108: 0x000025B2, + 5109: 0x000025CE, + 5110: 0x00002606, + 5111: 0x00002605, + 5112: 0x000025C7, + 5113: 0x000025C6, + 5114: 0x000025A1, + 5115: 0x000025A0, + 5116: 0x000025BD, + 5117: 0x000025BC, + 5118: 0x000032A3, + 5119: 0x00002105, + 5120: 0x000000AF, + 5121: 0x0000FFE3, + 5122: 0x0000FF3F, + 5123: 0x000002CD, + 5124: 0x0000FE49, + 5125: 0x0000FE4A, + 5126: 0x0000FE4D, + 5127: 0x0000FE4E, + 5128: 0x0000FE4B, + 5129: 0x0000FE4C, + 5130: 0x0000FE5F, + 5131: 0x0000FE60, + 5132: 0x0000FE61, + 5133: 0x0000FF0B, + 5134: 0x0000FF0D, + 5135: 0x000000D7, + 5136: 0x000000F7, + 5137: 0x000000B1, + 5138: 0x0000221A, + 5139: 0x0000FF1C, + 5140: 0x0000FF1E, + 5141: 0x0000FF1D, + 5142: 0x00002266, + 5143: 0x00002267, + 5144: 0x00002260, + 5145: 0x0000221E, + 5146: 0x00002252, + 5147: 0x00002261, + 5148: 0x0000FE62, + 5149: 0x0000FE63, + 5150: 0x0000FE64, + 5151: 0x0000FE65, + 5152: 0x0000FE66, + 5153: 0x0000FF5E, + 5154: 0x00002229, + 5155: 0x0000222A, + 5156: 0x000022A5, + 5157: 0x00002220, + 5158: 0x0000221F, + 5159: 0x000022BF, + 5160: 0x000033D2, + 5161: 0x000033D1, + 5162: 0x0000222B, + 5163: 0x0000222E, + 5164: 0x00002235, + 5165: 0x00002234, + 5166: 0x00002640, + 5167: 0x00002642, + 5168: 0x00002295, + 5169: 0x00002299, + 5170: 0x00002191, + 5171: 0x00002193, + 5172: 0x00002190, + 5173: 0x00002192, + 5174: 0x00002196, + 5175: 0x00002197, + 5176: 0x00002199, + 5177: 0x00002198, + 5178: 0x00002225, + 5179: 0x00002223, + 5180: 0x0000FF0F, + 5181: 0x0000FF3C, + 5182: 0x00002215, + 5183: 0x0000FE68, + 5184: 0x0000FF04, + 5185: 0x0000FFE5, + 5186: 0x00003012, + 5187: 0x0000FFE0, + 5188: 0x0000FFE1, + 5189: 0x0000FF05, + 5190: 0x0000FF20, + 5191: 0x00002103, + 5192: 0x00002109, + 5193: 0x0000FE69, + 5194: 0x0000FE6A, + 5195: 0x0000FE6B, + 5196: 0x000033D5, + 5197: 0x0000339C, + 5198: 0x0000339D, + 5199: 0x0000339E, + 5200: 0x000033CE, + 5201: 0x000033A1, + 5202: 0x0000338E, + 5203: 0x0000338F, + 5204: 0x000033C4, + 5205: 0x000000B0, + 5206: 0x00005159, + 5207: 0x0000515B, + 5208: 0x0000515E, + 5209: 0x0000515D, + 5210: 0x00005161, + 5211: 0x00005163, + 5212: 0x000055E7, + 5213: 0x000074E9, + 5214: 0x00007CCE, + 5215: 0x00002581, + 5216: 0x00002582, + 5217: 0x00002583, + 5218: 0x00002584, + 5219: 0x00002585, + 5220: 0x00002586, + 5221: 0x00002587, + 5222: 0x00002588, + 5223: 0x0000258F, + 5224: 0x0000258E, + 5225: 0x0000258D, + 5226: 0x0000258C, + 5227: 0x0000258B, + 5228: 0x0000258A, + 5229: 0x00002589, + 5230: 0x0000253C, + 5231: 0x00002534, + 5232: 0x0000252C, + 5233: 0x00002524, + 5234: 0x0000251C, + 5235: 0x00002594, + 5236: 0x00002500, + 5237: 0x00002502, + 5238: 0x00002595, + 5239: 0x0000250C, + 5240: 0x00002510, + 5241: 0x00002514, + 5242: 0x00002518, + 5243: 0x0000256D, + 5244: 0x0000256E, + 5245: 0x00002570, + 5246: 0x0000256F, + 5247: 0x00002550, + 5248: 0x0000255E, + 5249: 0x0000256A, + 5250: 0x00002561, + 5251: 0x000025E2, + 5252: 0x000025E3, + 5253: 0x000025E5, + 5254: 0x000025E4, + 5255: 0x00002571, + 5256: 0x00002572, + 5257: 0x00002573, + 5258: 0x0000FF10, + 5259: 0x0000FF11, + 5260: 0x0000FF12, + 5261: 0x0000FF13, + 5262: 0x0000FF14, + 5263: 0x0000FF15, + 5264: 0x0000FF16, + 5265: 0x0000FF17, + 5266: 0x0000FF18, + 5267: 0x0000FF19, + 5268: 0x00002160, + 5269: 0x00002161, + 5270: 0x00002162, + 5271: 0x00002163, + 5272: 0x00002164, + 5273: 0x00002165, + 5274: 0x00002166, + 5275: 0x00002167, + 5276: 0x00002168, + 5277: 0x00002169, + 5278: 0x00003021, + 5279: 0x00003022, + 5280: 0x00003023, + 5281: 0x00003024, + 5282: 0x00003025, + 5283: 0x00003026, + 5284: 0x00003027, + 5285: 0x00003028, + 5286: 0x00003029, + 5287: 0x00005341, + 5288: 0x00005344, + 5289: 0x00005345, + 5290: 0x0000FF21, + 5291: 0x0000FF22, + 5292: 0x0000FF23, + 5293: 0x0000FF24, + 5294: 0x0000FF25, + 5295: 0x0000FF26, + 5296: 0x0000FF27, + 5297: 0x0000FF28, + 5298: 0x0000FF29, + 5299: 0x0000FF2A, + 5300: 0x0000FF2B, + 5301: 0x0000FF2C, + 5302: 0x0000FF2D, + 5303: 0x0000FF2E, + 5304: 0x0000FF2F, + 5305: 0x0000FF30, + 5306: 0x0000FF31, + 5307: 0x0000FF32, + 5308: 0x0000FF33, + 5309: 0x0000FF34, + 5310: 0x0000FF35, + 5311: 0x0000FF36, + 5312: 0x0000FF37, + 5313: 0x0000FF38, + 5314: 0x0000FF39, + 5315: 0x0000FF3A, + 5316: 0x0000FF41, + 5317: 0x0000FF42, + 5318: 0x0000FF43, + 5319: 0x0000FF44, + 5320: 0x0000FF45, + 5321: 0x0000FF46, + 5322: 0x0000FF47, + 5323: 0x0000FF48, + 5324: 0x0000FF49, + 5325: 0x0000FF4A, + 5326: 0x0000FF4B, + 5327: 0x0000FF4C, + 5328: 0x0000FF4D, + 5329: 0x0000FF4E, + 5330: 0x0000FF4F, + 5331: 0x0000FF50, + 5332: 0x0000FF51, + 5333: 0x0000FF52, + 5334: 0x0000FF53, + 5335: 0x0000FF54, + 5336: 0x0000FF55, + 5337: 0x0000FF56, + 5338: 0x0000FF57, + 5339: 0x0000FF58, + 5340: 0x0000FF59, + 5341: 0x0000FF5A, + 5342: 0x00000391, + 5343: 0x00000392, + 5344: 0x00000393, + 5345: 0x00000394, + 5346: 0x00000395, + 5347: 0x00000396, + 5348: 0x00000397, + 5349: 0x00000398, + 5350: 0x00000399, + 5351: 0x0000039A, + 5352: 0x0000039B, + 5353: 0x0000039C, + 5354: 0x0000039D, + 5355: 0x0000039E, + 5356: 0x0000039F, + 5357: 0x000003A0, + 5358: 0x000003A1, + 5359: 0x000003A3, + 5360: 0x000003A4, + 5361: 0x000003A5, + 5362: 0x000003A6, + 5363: 0x000003A7, + 5364: 0x000003A8, + 5365: 0x000003A9, + 5366: 0x000003B1, + 5367: 0x000003B2, + 5368: 0x000003B3, + 5369: 0x000003B4, + 5370: 0x000003B5, + 5371: 0x000003B6, + 5372: 0x000003B7, + 5373: 0x000003B8, + 5374: 0x000003B9, + 5375: 0x000003BA, + 5376: 0x000003BB, + 5377: 0x000003BC, + 5378: 0x000003BD, + 5379: 0x000003BE, + 5380: 0x000003BF, + 5381: 0x000003C0, + 5382: 0x000003C1, + 5383: 0x000003C3, + 5384: 0x000003C4, + 5385: 0x000003C5, + 5386: 0x000003C6, + 5387: 0x000003C7, + 5388: 0x000003C8, + 5389: 0x000003C9, + 5390: 0x00003105, + 5391: 0x00003106, + 5392: 0x00003107, + 5393: 0x00003108, + 5394: 0x00003109, + 5395: 0x0000310A, + 5396: 0x0000310B, + 5397: 0x0000310C, + 5398: 0x0000310D, + 5399: 0x0000310E, + 5400: 0x0000310F, + 5401: 0x00003110, + 5402: 0x00003111, + 5403: 0x00003112, + 5404: 0x00003113, + 5405: 0x00003114, + 5406: 0x00003115, + 5407: 0x00003116, + 5408: 0x00003117, + 5409: 0x00003118, + 5410: 0x00003119, + 5411: 0x0000311A, + 5412: 0x0000311B, + 5413: 0x0000311C, + 5414: 0x0000311D, + 5415: 0x0000311E, + 5416: 0x0000311F, + 5417: 0x00003120, + 5418: 0x00003121, + 5419: 0x00003122, + 5420: 0x00003123, + 5421: 0x00003124, + 5422: 0x00003125, + 5423: 0x00003126, + 5424: 0x00003127, + 5425: 0x00003128, + 5426: 0x00003129, + 5427: 0x000002D9, + 5428: 0x000002C9, + 5429: 0x000002CA, + 5430: 0x000002C7, + 5431: 0x000002CB, + 5432: 0x00002400, + 5433: 0x00002401, + 5434: 0x00002402, + 5435: 0x00002403, + 5436: 0x00002404, + 5437: 0x00002405, + 5438: 0x00002406, + 5439: 0x00002407, + 5440: 0x00002408, + 5441: 0x00002409, + 5442: 0x0000240A, + 5443: 0x0000240B, + 5444: 0x0000240C, + 5445: 0x0000240D, + 5446: 0x0000240E, + 5447: 0x0000240F, + 5448: 0x00002410, + 5449: 0x00002411, + 5450: 0x00002412, + 5451: 0x00002413, + 5452: 0x00002414, + 5453: 0x00002415, + 5454: 0x00002416, + 5455: 0x00002417, + 5456: 0x00002418, + 5457: 0x00002419, + 5458: 0x0000241A, + 5459: 0x0000241B, + 5460: 0x0000241C, + 5461: 0x0000241D, + 5462: 0x0000241E, + 5463: 0x0000241F, + 5464: 0x00002421, + 5465: 0x000020AC, + 5495: 0x00004E00, + 5496: 0x00004E59, + 5497: 0x00004E01, + 5498: 0x00004E03, + 5499: 0x00004E43, + 5500: 0x00004E5D, + 5501: 0x00004E86, + 5502: 0x00004E8C, + 5503: 0x00004EBA, + 5504: 0x0000513F, + 5505: 0x00005165, + 5506: 0x0000516B, + 5507: 0x000051E0, + 5508: 0x00005200, + 5509: 0x00005201, + 5510: 0x0000529B, + 5511: 0x00005315, + 5512: 0x00005341, + 5513: 0x0000535C, + 5514: 0x000053C8, + 5515: 0x00004E09, + 5516: 0x00004E0B, + 5517: 0x00004E08, + 5518: 0x00004E0A, + 5519: 0x00004E2B, + 5520: 0x00004E38, + 5521: 0x000051E1, + 5522: 0x00004E45, + 5523: 0x00004E48, + 5524: 0x00004E5F, + 5525: 0x00004E5E, + 5526: 0x00004E8E, + 5527: 0x00004EA1, + 5528: 0x00005140, + 5529: 0x00005203, + 5530: 0x000052FA, + 5531: 0x00005343, + 5532: 0x000053C9, + 5533: 0x000053E3, + 5534: 0x0000571F, + 5535: 0x000058EB, + 5536: 0x00005915, + 5537: 0x00005927, + 5538: 0x00005973, + 5539: 0x00005B50, + 5540: 0x00005B51, + 5541: 0x00005B53, + 5542: 0x00005BF8, + 5543: 0x00005C0F, + 5544: 0x00005C22, + 5545: 0x00005C38, + 5546: 0x00005C71, + 5547: 0x00005DDD, + 5548: 0x00005DE5, + 5549: 0x00005DF1, + 5550: 0x00005DF2, + 5551: 0x00005DF3, + 5552: 0x00005DFE, + 5553: 0x00005E72, + 5554: 0x00005EFE, + 5555: 0x00005F0B, + 5556: 0x00005F13, + 5557: 0x0000624D, + 5558: 0x00004E11, + 5559: 0x00004E10, + 5560: 0x00004E0D, + 5561: 0x00004E2D, + 5562: 0x00004E30, + 5563: 0x00004E39, + 5564: 0x00004E4B, + 5565: 0x00005C39, + 5566: 0x00004E88, + 5567: 0x00004E91, + 5568: 0x00004E95, + 5569: 0x00004E92, + 5570: 0x00004E94, + 5571: 0x00004EA2, + 5572: 0x00004EC1, + 5573: 0x00004EC0, + 5574: 0x00004EC3, + 5575: 0x00004EC6, + 5576: 0x00004EC7, + 5577: 0x00004ECD, + 5578: 0x00004ECA, + 5579: 0x00004ECB, + 5580: 0x00004EC4, + 5581: 0x00005143, + 5582: 0x00005141, + 5583: 0x00005167, + 5584: 0x0000516D, + 5585: 0x0000516E, + 5586: 0x0000516C, + 5587: 0x00005197, + 5588: 0x000051F6, + 5589: 0x00005206, + 5590: 0x00005207, + 5591: 0x00005208, + 5592: 0x000052FB, + 5593: 0x000052FE, + 5594: 0x000052FF, + 5595: 0x00005316, + 5596: 0x00005339, + 5597: 0x00005348, + 5598: 0x00005347, + 5599: 0x00005345, + 5600: 0x0000535E, + 5601: 0x00005384, + 5602: 0x000053CB, + 5603: 0x000053CA, + 5604: 0x000053CD, + 5605: 0x000058EC, + 5606: 0x00005929, + 5607: 0x0000592B, + 5608: 0x0000592A, + 5609: 0x0000592D, + 5610: 0x00005B54, + 5611: 0x00005C11, + 5612: 0x00005C24, + 5613: 0x00005C3A, + 5614: 0x00005C6F, + 5615: 0x00005DF4, + 5616: 0x00005E7B, + 5617: 0x00005EFF, + 5618: 0x00005F14, + 5619: 0x00005F15, + 5620: 0x00005FC3, + 5621: 0x00006208, + 5622: 0x00006236, + 5623: 0x0000624B, + 5624: 0x0000624E, + 5625: 0x0000652F, + 5626: 0x00006587, + 5627: 0x00006597, + 5628: 0x000065A4, + 5629: 0x000065B9, + 5630: 0x000065E5, + 5631: 0x000066F0, + 5632: 0x00006708, + 5633: 0x00006728, + 5634: 0x00006B20, + 5635: 0x00006B62, + 5636: 0x00006B79, + 5637: 0x00006BCB, + 5638: 0x00006BD4, + 5639: 0x00006BDB, + 5640: 0x00006C0F, + 5641: 0x00006C34, + 5642: 0x0000706B, + 5643: 0x0000722A, + 5644: 0x00007236, + 5645: 0x0000723B, + 5646: 0x00007247, + 5647: 0x00007259, + 5648: 0x0000725B, + 5649: 0x000072AC, + 5650: 0x0000738B, + 5651: 0x00004E19, + 5652: 0x00004E16, + 5653: 0x00004E15, + 5654: 0x00004E14, + 5655: 0x00004E18, + 5656: 0x00004E3B, + 5657: 0x00004E4D, + 5658: 0x00004E4F, + 5659: 0x00004E4E, + 5660: 0x00004EE5, + 5661: 0x00004ED8, + 5662: 0x00004ED4, + 5663: 0x00004ED5, + 5664: 0x00004ED6, + 5665: 0x00004ED7, + 5666: 0x00004EE3, + 5667: 0x00004EE4, + 5668: 0x00004ED9, + 5669: 0x00004EDE, + 5670: 0x00005145, + 5671: 0x00005144, + 5672: 0x00005189, + 5673: 0x0000518A, + 5674: 0x000051AC, + 5675: 0x000051F9, + 5676: 0x000051FA, + 5677: 0x000051F8, + 5678: 0x0000520A, + 5679: 0x000052A0, + 5680: 0x0000529F, + 5681: 0x00005305, + 5682: 0x00005306, + 5683: 0x00005317, + 5684: 0x0000531D, + 5685: 0x00004EDF, + 5686: 0x0000534A, + 5687: 0x00005349, + 5688: 0x00005361, + 5689: 0x00005360, + 5690: 0x0000536F, + 5691: 0x0000536E, + 5692: 0x000053BB, + 5693: 0x000053EF, + 5694: 0x000053E4, + 5695: 0x000053F3, + 5696: 0x000053EC, + 5697: 0x000053EE, + 5698: 0x000053E9, + 5699: 0x000053E8, + 5700: 0x000053FC, + 5701: 0x000053F8, + 5702: 0x000053F5, + 5703: 0x000053EB, + 5704: 0x000053E6, + 5705: 0x000053EA, + 5706: 0x000053F2, + 5707: 0x000053F1, + 5708: 0x000053F0, + 5709: 0x000053E5, + 5710: 0x000053ED, + 5711: 0x000053FB, + 5712: 0x000056DB, + 5713: 0x000056DA, + 5714: 0x00005916, + 5715: 0x0000592E, + 5716: 0x00005931, + 5717: 0x00005974, + 5718: 0x00005976, + 5719: 0x00005B55, + 5720: 0x00005B83, + 5721: 0x00005C3C, + 5722: 0x00005DE8, + 5723: 0x00005DE7, + 5724: 0x00005DE6, + 5725: 0x00005E02, + 5726: 0x00005E03, + 5727: 0x00005E73, + 5728: 0x00005E7C, + 5729: 0x00005F01, + 5730: 0x00005F18, + 5731: 0x00005F17, + 5732: 0x00005FC5, + 5733: 0x0000620A, + 5734: 0x00006253, + 5735: 0x00006254, + 5736: 0x00006252, + 5737: 0x00006251, + 5738: 0x000065A5, + 5739: 0x000065E6, + 5740: 0x0000672E, + 5741: 0x0000672C, + 5742: 0x0000672A, + 5743: 0x0000672B, + 5744: 0x0000672D, + 5745: 0x00006B63, + 5746: 0x00006BCD, + 5747: 0x00006C11, + 5748: 0x00006C10, + 5749: 0x00006C38, + 5750: 0x00006C41, + 5751: 0x00006C40, + 5752: 0x00006C3E, + 5753: 0x000072AF, + 5754: 0x00007384, + 5755: 0x00007389, + 5756: 0x000074DC, + 5757: 0x000074E6, + 5758: 0x00007518, + 5759: 0x0000751F, + 5760: 0x00007528, + 5761: 0x00007529, + 5762: 0x00007530, + 5763: 0x00007531, + 5764: 0x00007532, + 5765: 0x00007533, + 5766: 0x0000758B, + 5767: 0x0000767D, + 5768: 0x000076AE, + 5769: 0x000076BF, + 5770: 0x000076EE, + 5771: 0x000077DB, + 5772: 0x000077E2, + 5773: 0x000077F3, + 5774: 0x0000793A, + 5775: 0x000079BE, + 5776: 0x00007A74, + 5777: 0x00007ACB, + 5778: 0x00004E1E, + 5779: 0x00004E1F, + 5780: 0x00004E52, + 5781: 0x00004E53, + 5782: 0x00004E69, + 5783: 0x00004E99, + 5784: 0x00004EA4, + 5785: 0x00004EA6, + 5786: 0x00004EA5, + 5787: 0x00004EFF, + 5788: 0x00004F09, + 5789: 0x00004F19, + 5790: 0x00004F0A, + 5791: 0x00004F15, + 5792: 0x00004F0D, + 5793: 0x00004F10, + 5794: 0x00004F11, + 5795: 0x00004F0F, + 5796: 0x00004EF2, + 5797: 0x00004EF6, + 5798: 0x00004EFB, + 5799: 0x00004EF0, + 5800: 0x00004EF3, + 5801: 0x00004EFD, + 5802: 0x00004F01, + 5803: 0x00004F0B, + 5804: 0x00005149, + 5805: 0x00005147, + 5806: 0x00005146, + 5807: 0x00005148, + 5808: 0x00005168, + 5809: 0x00005171, + 5810: 0x0000518D, + 5811: 0x000051B0, + 5812: 0x00005217, + 5813: 0x00005211, + 5814: 0x00005212, + 5815: 0x0000520E, + 5816: 0x00005216, + 5817: 0x000052A3, + 5818: 0x00005308, + 5819: 0x00005321, + 5820: 0x00005320, + 5821: 0x00005370, + 5822: 0x00005371, + 5823: 0x00005409, + 5824: 0x0000540F, + 5825: 0x0000540C, + 5826: 0x0000540A, + 5827: 0x00005410, + 5828: 0x00005401, + 5829: 0x0000540B, + 5830: 0x00005404, + 5831: 0x00005411, + 5832: 0x0000540D, + 5833: 0x00005408, + 5834: 0x00005403, + 5835: 0x0000540E, + 5836: 0x00005406, + 5837: 0x00005412, + 5838: 0x000056E0, + 5839: 0x000056DE, + 5840: 0x000056DD, + 5841: 0x00005733, + 5842: 0x00005730, + 5843: 0x00005728, + 5844: 0x0000572D, + 5845: 0x0000572C, + 5846: 0x0000572F, + 5847: 0x00005729, + 5848: 0x00005919, + 5849: 0x0000591A, + 5850: 0x00005937, + 5851: 0x00005938, + 5852: 0x00005984, + 5853: 0x00005978, + 5854: 0x00005983, + 5855: 0x0000597D, + 5856: 0x00005979, + 5857: 0x00005982, + 5858: 0x00005981, + 5859: 0x00005B57, + 5860: 0x00005B58, + 5861: 0x00005B87, + 5862: 0x00005B88, + 5863: 0x00005B85, + 5864: 0x00005B89, + 5865: 0x00005BFA, + 5866: 0x00005C16, + 5867: 0x00005C79, + 5868: 0x00005DDE, + 5869: 0x00005E06, + 5870: 0x00005E76, + 5871: 0x00005E74, + 5872: 0x00005F0F, + 5873: 0x00005F1B, + 5874: 0x00005FD9, + 5875: 0x00005FD6, + 5876: 0x0000620E, + 5877: 0x0000620C, + 5878: 0x0000620D, + 5879: 0x00006210, + 5880: 0x00006263, + 5881: 0x0000625B, + 5882: 0x00006258, + 5883: 0x00006536, + 5884: 0x000065E9, + 5885: 0x000065E8, + 5886: 0x000065EC, + 5887: 0x000065ED, + 5888: 0x000066F2, + 5889: 0x000066F3, + 5890: 0x00006709, + 5891: 0x0000673D, + 5892: 0x00006734, + 5893: 0x00006731, + 5894: 0x00006735, + 5895: 0x00006B21, + 5896: 0x00006B64, + 5897: 0x00006B7B, + 5898: 0x00006C16, + 5899: 0x00006C5D, + 5900: 0x00006C57, + 5901: 0x00006C59, + 5902: 0x00006C5F, + 5903: 0x00006C60, + 5904: 0x00006C50, + 5905: 0x00006C55, + 5906: 0x00006C61, + 5907: 0x00006C5B, + 5908: 0x00006C4D, + 5909: 0x00006C4E, + 5910: 0x00007070, + 5911: 0x0000725F, + 5912: 0x0000725D, + 5913: 0x0000767E, + 5914: 0x00007AF9, + 5915: 0x00007C73, + 5916: 0x00007CF8, + 5917: 0x00007F36, + 5918: 0x00007F8A, + 5919: 0x00007FBD, + 5920: 0x00008001, + 5921: 0x00008003, + 5922: 0x0000800C, + 5923: 0x00008012, + 5924: 0x00008033, + 5925: 0x0000807F, + 5926: 0x00008089, + 5927: 0x0000808B, + 5928: 0x0000808C, + 5929: 0x000081E3, + 5930: 0x000081EA, + 5931: 0x000081F3, + 5932: 0x000081FC, + 5933: 0x0000820C, + 5934: 0x0000821B, + 5935: 0x0000821F, + 5936: 0x0000826E, + 5937: 0x00008272, + 5938: 0x0000827E, + 5939: 0x0000866B, + 5940: 0x00008840, + 5941: 0x0000884C, + 5942: 0x00008863, + 5943: 0x0000897F, + 5944: 0x00009621, + 5945: 0x00004E32, + 5946: 0x00004EA8, + 5947: 0x00004F4D, + 5948: 0x00004F4F, + 5949: 0x00004F47, + 5950: 0x00004F57, + 5951: 0x00004F5E, + 5952: 0x00004F34, + 5953: 0x00004F5B, + 5954: 0x00004F55, + 5955: 0x00004F30, + 5956: 0x00004F50, + 5957: 0x00004F51, + 5958: 0x00004F3D, + 5959: 0x00004F3A, + 5960: 0x00004F38, + 5961: 0x00004F43, + 5962: 0x00004F54, + 5963: 0x00004F3C, + 5964: 0x00004F46, + 5965: 0x00004F63, + 5966: 0x00004F5C, + 5967: 0x00004F60, + 5968: 0x00004F2F, + 5969: 0x00004F4E, + 5970: 0x00004F36, + 5971: 0x00004F59, + 5972: 0x00004F5D, + 5973: 0x00004F48, + 5974: 0x00004F5A, + 5975: 0x0000514C, + 5976: 0x0000514B, + 5977: 0x0000514D, + 5978: 0x00005175, + 5979: 0x000051B6, + 5980: 0x000051B7, + 5981: 0x00005225, + 5982: 0x00005224, + 5983: 0x00005229, + 5984: 0x0000522A, + 5985: 0x00005228, + 5986: 0x000052AB, + 5987: 0x000052A9, + 5988: 0x000052AA, + 5989: 0x000052AC, + 5990: 0x00005323, + 5991: 0x00005373, + 5992: 0x00005375, + 5993: 0x0000541D, + 5994: 0x0000542D, + 5995: 0x0000541E, + 5996: 0x0000543E, + 5997: 0x00005426, + 5998: 0x0000544E, + 5999: 0x00005427, + 6000: 0x00005446, + 6001: 0x00005443, + 6002: 0x00005433, + 6003: 0x00005448, + 6004: 0x00005442, + 6005: 0x0000541B, + 6006: 0x00005429, + 6007: 0x0000544A, + 6008: 0x00005439, + 6009: 0x0000543B, + 6010: 0x00005438, + 6011: 0x0000542E, + 6012: 0x00005435, + 6013: 0x00005436, + 6014: 0x00005420, + 6015: 0x0000543C, + 6016: 0x00005440, + 6017: 0x00005431, + 6018: 0x0000542B, + 6019: 0x0000541F, + 6020: 0x0000542C, + 6021: 0x000056EA, + 6022: 0x000056F0, + 6023: 0x000056E4, + 6024: 0x000056EB, + 6025: 0x0000574A, + 6026: 0x00005751, + 6027: 0x00005740, + 6028: 0x0000574D, + 6029: 0x00005747, + 6030: 0x0000574E, + 6031: 0x0000573E, + 6032: 0x00005750, + 6033: 0x0000574F, + 6034: 0x0000573B, + 6035: 0x000058EF, + 6036: 0x0000593E, + 6037: 0x0000599D, + 6038: 0x00005992, + 6039: 0x000059A8, + 6040: 0x0000599E, + 6041: 0x000059A3, + 6042: 0x00005999, + 6043: 0x00005996, + 6044: 0x0000598D, + 6045: 0x000059A4, + 6046: 0x00005993, + 6047: 0x0000598A, + 6048: 0x000059A5, + 6049: 0x00005B5D, + 6050: 0x00005B5C, + 6051: 0x00005B5A, + 6052: 0x00005B5B, + 6053: 0x00005B8C, + 6054: 0x00005B8B, + 6055: 0x00005B8F, + 6056: 0x00005C2C, + 6057: 0x00005C40, + 6058: 0x00005C41, + 6059: 0x00005C3F, + 6060: 0x00005C3E, + 6061: 0x00005C90, + 6062: 0x00005C91, + 6063: 0x00005C94, + 6064: 0x00005C8C, + 6065: 0x00005DEB, + 6066: 0x00005E0C, + 6067: 0x00005E8F, + 6068: 0x00005E87, + 6069: 0x00005E8A, + 6070: 0x00005EF7, + 6071: 0x00005F04, + 6072: 0x00005F1F, + 6073: 0x00005F64, + 6074: 0x00005F62, + 6075: 0x00005F77, + 6076: 0x00005F79, + 6077: 0x00005FD8, + 6078: 0x00005FCC, + 6079: 0x00005FD7, + 6080: 0x00005FCD, + 6081: 0x00005FF1, + 6082: 0x00005FEB, + 6083: 0x00005FF8, + 6084: 0x00005FEA, + 6085: 0x00006212, + 6086: 0x00006211, + 6087: 0x00006284, + 6088: 0x00006297, + 6089: 0x00006296, + 6090: 0x00006280, + 6091: 0x00006276, + 6092: 0x00006289, + 6093: 0x0000626D, + 6094: 0x0000628A, + 6095: 0x0000627C, + 6096: 0x0000627E, + 6097: 0x00006279, + 6098: 0x00006273, + 6099: 0x00006292, + 6100: 0x0000626F, + 6101: 0x00006298, + 6102: 0x0000626E, + 6103: 0x00006295, + 6104: 0x00006293, + 6105: 0x00006291, + 6106: 0x00006286, + 6107: 0x00006539, + 6108: 0x0000653B, + 6109: 0x00006538, + 6110: 0x000065F1, + 6111: 0x000066F4, + 6112: 0x0000675F, + 6113: 0x0000674E, + 6114: 0x0000674F, + 6115: 0x00006750, + 6116: 0x00006751, + 6117: 0x0000675C, + 6118: 0x00006756, + 6119: 0x0000675E, + 6120: 0x00006749, + 6121: 0x00006746, + 6122: 0x00006760, + 6123: 0x00006753, + 6124: 0x00006757, + 6125: 0x00006B65, + 6126: 0x00006BCF, + 6127: 0x00006C42, + 6128: 0x00006C5E, + 6129: 0x00006C99, + 6130: 0x00006C81, + 6131: 0x00006C88, + 6132: 0x00006C89, + 6133: 0x00006C85, + 6134: 0x00006C9B, + 6135: 0x00006C6A, + 6136: 0x00006C7A, + 6137: 0x00006C90, + 6138: 0x00006C70, + 6139: 0x00006C8C, + 6140: 0x00006C68, + 6141: 0x00006C96, + 6142: 0x00006C92, + 6143: 0x00006C7D, + 6144: 0x00006C83, + 6145: 0x00006C72, + 6146: 0x00006C7E, + 6147: 0x00006C74, + 6148: 0x00006C86, + 6149: 0x00006C76, + 6150: 0x00006C8D, + 6151: 0x00006C94, + 6152: 0x00006C98, + 6153: 0x00006C82, + 6154: 0x00007076, + 6155: 0x0000707C, + 6156: 0x0000707D, + 6157: 0x00007078, + 6158: 0x00007262, + 6159: 0x00007261, + 6160: 0x00007260, + 6161: 0x000072C4, + 6162: 0x000072C2, + 6163: 0x00007396, + 6164: 0x0000752C, + 6165: 0x0000752B, + 6166: 0x00007537, + 6167: 0x00007538, + 6168: 0x00007682, + 6169: 0x000076EF, + 6170: 0x000077E3, + 6171: 0x000079C1, + 6172: 0x000079C0, + 6173: 0x000079BF, + 6174: 0x00007A76, + 6175: 0x00007CFB, + 6176: 0x00007F55, + 6177: 0x00008096, + 6178: 0x00008093, + 6179: 0x0000809D, + 6180: 0x00008098, + 6181: 0x0000809B, + 6182: 0x0000809A, + 6183: 0x000080B2, + 6184: 0x0000826F, + 6185: 0x00008292, + 6186: 0x0000828B, + 6187: 0x0000828D, + 6188: 0x0000898B, + 6189: 0x000089D2, + 6190: 0x00008A00, + 6191: 0x00008C37, + 6192: 0x00008C46, + 6193: 0x00008C55, + 6194: 0x00008C9D, + 6195: 0x00008D64, + 6196: 0x00008D70, + 6197: 0x00008DB3, + 6198: 0x00008EAB, + 6199: 0x00008ECA, + 6200: 0x00008F9B, + 6201: 0x00008FB0, + 6202: 0x00008FC2, + 6203: 0x00008FC6, + 6204: 0x00008FC5, + 6205: 0x00008FC4, + 6206: 0x00005DE1, + 6207: 0x00009091, + 6208: 0x000090A2, + 6209: 0x000090AA, + 6210: 0x000090A6, + 6211: 0x000090A3, + 6212: 0x00009149, + 6213: 0x000091C6, + 6214: 0x000091CC, + 6215: 0x00009632, + 6216: 0x0000962E, + 6217: 0x00009631, + 6218: 0x0000962A, + 6219: 0x0000962C, + 6220: 0x00004E26, + 6221: 0x00004E56, + 6222: 0x00004E73, + 6223: 0x00004E8B, + 6224: 0x00004E9B, + 6225: 0x00004E9E, + 6226: 0x00004EAB, + 6227: 0x00004EAC, + 6228: 0x00004F6F, + 6229: 0x00004F9D, + 6230: 0x00004F8D, + 6231: 0x00004F73, + 6232: 0x00004F7F, + 6233: 0x00004F6C, + 6234: 0x00004F9B, + 6235: 0x00004F8B, + 6236: 0x00004F86, + 6237: 0x00004F83, + 6238: 0x00004F70, + 6239: 0x00004F75, + 6240: 0x00004F88, + 6241: 0x00004F69, + 6242: 0x00004F7B, + 6243: 0x00004F96, + 6244: 0x00004F7E, + 6245: 0x00004F8F, + 6246: 0x00004F91, + 6247: 0x00004F7A, + 6248: 0x00005154, + 6249: 0x00005152, + 6250: 0x00005155, + 6251: 0x00005169, + 6252: 0x00005177, + 6253: 0x00005176, + 6254: 0x00005178, + 6255: 0x000051BD, + 6256: 0x000051FD, + 6257: 0x0000523B, + 6258: 0x00005238, + 6259: 0x00005237, + 6260: 0x0000523A, + 6261: 0x00005230, + 6262: 0x0000522E, + 6263: 0x00005236, + 6264: 0x00005241, + 6265: 0x000052BE, + 6266: 0x000052BB, + 6267: 0x00005352, + 6268: 0x00005354, + 6269: 0x00005353, + 6270: 0x00005351, + 6271: 0x00005366, + 6272: 0x00005377, + 6273: 0x00005378, + 6274: 0x00005379, + 6275: 0x000053D6, + 6276: 0x000053D4, + 6277: 0x000053D7, + 6278: 0x00005473, + 6279: 0x00005475, + 6280: 0x00005496, + 6281: 0x00005478, + 6282: 0x00005495, + 6283: 0x00005480, + 6284: 0x0000547B, + 6285: 0x00005477, + 6286: 0x00005484, + 6287: 0x00005492, + 6288: 0x00005486, + 6289: 0x0000547C, + 6290: 0x00005490, + 6291: 0x00005471, + 6292: 0x00005476, + 6293: 0x0000548C, + 6294: 0x0000549A, + 6295: 0x00005462, + 6296: 0x00005468, + 6297: 0x0000548B, + 6298: 0x0000547D, + 6299: 0x0000548E, + 6300: 0x000056FA, + 6301: 0x00005783, + 6302: 0x00005777, + 6303: 0x0000576A, + 6304: 0x00005769, + 6305: 0x00005761, + 6306: 0x00005766, + 6307: 0x00005764, + 6308: 0x0000577C, + 6309: 0x0000591C, + 6310: 0x00005949, + 6311: 0x00005947, + 6312: 0x00005948, + 6313: 0x00005944, + 6314: 0x00005954, + 6315: 0x000059BE, + 6316: 0x000059BB, + 6317: 0x000059D4, + 6318: 0x000059B9, + 6319: 0x000059AE, + 6320: 0x000059D1, + 6321: 0x000059C6, + 6322: 0x000059D0, + 6323: 0x000059CD, + 6324: 0x000059CB, + 6325: 0x000059D3, + 6326: 0x000059CA, + 6327: 0x000059AF, + 6328: 0x000059B3, + 6329: 0x000059D2, + 6330: 0x000059C5, + 6331: 0x00005B5F, + 6332: 0x00005B64, + 6333: 0x00005B63, + 6334: 0x00005B97, + 6335: 0x00005B9A, + 6336: 0x00005B98, + 6337: 0x00005B9C, + 6338: 0x00005B99, + 6339: 0x00005B9B, + 6340: 0x00005C1A, + 6341: 0x00005C48, + 6342: 0x00005C45, + 6343: 0x00005C46, + 6344: 0x00005CB7, + 6345: 0x00005CA1, + 6346: 0x00005CB8, + 6347: 0x00005CA9, + 6348: 0x00005CAB, + 6349: 0x00005CB1, + 6350: 0x00005CB3, + 6351: 0x00005E18, + 6352: 0x00005E1A, + 6353: 0x00005E16, + 6354: 0x00005E15, + 6355: 0x00005E1B, + 6356: 0x00005E11, + 6357: 0x00005E78, + 6358: 0x00005E9A, + 6359: 0x00005E97, + 6360: 0x00005E9C, + 6361: 0x00005E95, + 6362: 0x00005E96, + 6363: 0x00005EF6, + 6364: 0x00005F26, + 6365: 0x00005F27, + 6366: 0x00005F29, + 6367: 0x00005F80, + 6368: 0x00005F81, + 6369: 0x00005F7F, + 6370: 0x00005F7C, + 6371: 0x00005FDD, + 6372: 0x00005FE0, + 6373: 0x00005FFD, + 6374: 0x00005FF5, + 6375: 0x00005FFF, + 6376: 0x0000600F, + 6377: 0x00006014, + 6378: 0x0000602F, + 6379: 0x00006035, + 6380: 0x00006016, + 6381: 0x0000602A, + 6382: 0x00006015, + 6383: 0x00006021, + 6384: 0x00006027, + 6385: 0x00006029, + 6386: 0x0000602B, + 6387: 0x0000601B, + 6388: 0x00006216, + 6389: 0x00006215, + 6390: 0x0000623F, + 6391: 0x0000623E, + 6392: 0x00006240, + 6393: 0x0000627F, + 6394: 0x000062C9, + 6395: 0x000062CC, + 6396: 0x000062C4, + 6397: 0x000062BF, + 6398: 0x000062C2, + 6399: 0x000062B9, + 6400: 0x000062D2, + 6401: 0x000062DB, + 6402: 0x000062AB, + 6403: 0x000062D3, + 6404: 0x000062D4, + 6405: 0x000062CB, + 6406: 0x000062C8, + 6407: 0x000062A8, + 6408: 0x000062BD, + 6409: 0x000062BC, + 6410: 0x000062D0, + 6411: 0x000062D9, + 6412: 0x000062C7, + 6413: 0x000062CD, + 6414: 0x000062B5, + 6415: 0x000062DA, + 6416: 0x000062B1, + 6417: 0x000062D8, + 6418: 0x000062D6, + 6419: 0x000062D7, + 6420: 0x000062C6, + 6421: 0x000062AC, + 6422: 0x000062CE, + 6423: 0x0000653E, + 6424: 0x000065A7, + 6425: 0x000065BC, + 6426: 0x000065FA, + 6427: 0x00006614, + 6428: 0x00006613, + 6429: 0x0000660C, + 6430: 0x00006606, + 6431: 0x00006602, + 6432: 0x0000660E, + 6433: 0x00006600, + 6434: 0x0000660F, + 6435: 0x00006615, + 6436: 0x0000660A, + 6437: 0x00006607, + 6438: 0x0000670D, + 6439: 0x0000670B, + 6440: 0x0000676D, + 6441: 0x0000678B, + 6442: 0x00006795, + 6443: 0x00006771, + 6444: 0x0000679C, + 6445: 0x00006773, + 6446: 0x00006777, + 6447: 0x00006787, + 6448: 0x0000679D, + 6449: 0x00006797, + 6450: 0x0000676F, + 6451: 0x00006770, + 6452: 0x0000677F, + 6453: 0x00006789, + 6454: 0x0000677E, + 6455: 0x00006790, + 6456: 0x00006775, + 6457: 0x0000679A, + 6458: 0x00006793, + 6459: 0x0000677C, + 6460: 0x0000676A, + 6461: 0x00006772, + 6462: 0x00006B23, + 6463: 0x00006B66, + 6464: 0x00006B67, + 6465: 0x00006B7F, + 6466: 0x00006C13, + 6467: 0x00006C1B, + 6468: 0x00006CE3, + 6469: 0x00006CE8, + 6470: 0x00006CF3, + 6471: 0x00006CB1, + 6472: 0x00006CCC, + 6473: 0x00006CE5, + 6474: 0x00006CB3, + 6475: 0x00006CBD, + 6476: 0x00006CBE, + 6477: 0x00006CBC, + 6478: 0x00006CE2, + 6479: 0x00006CAB, + 6480: 0x00006CD5, + 6481: 0x00006CD3, + 6482: 0x00006CB8, + 6483: 0x00006CC4, + 6484: 0x00006CB9, + 6485: 0x00006CC1, + 6486: 0x00006CAE, + 6487: 0x00006CD7, + 6488: 0x00006CC5, + 6489: 0x00006CF1, + 6490: 0x00006CBF, + 6491: 0x00006CBB, + 6492: 0x00006CE1, + 6493: 0x00006CDB, + 6494: 0x00006CCA, + 6495: 0x00006CAC, + 6496: 0x00006CEF, + 6497: 0x00006CDC, + 6498: 0x00006CD6, + 6499: 0x00006CE0, + 6500: 0x00007095, + 6501: 0x0000708E, + 6502: 0x00007092, + 6503: 0x0000708A, + 6504: 0x00007099, + 6505: 0x0000722C, + 6506: 0x0000722D, + 6507: 0x00007238, + 6508: 0x00007248, + 6509: 0x00007267, + 6510: 0x00007269, + 6511: 0x000072C0, + 6512: 0x000072CE, + 6513: 0x000072D9, + 6514: 0x000072D7, + 6515: 0x000072D0, + 6516: 0x000073A9, + 6517: 0x000073A8, + 6518: 0x0000739F, + 6519: 0x000073AB, + 6520: 0x000073A5, + 6521: 0x0000753D, + 6522: 0x0000759D, + 6523: 0x00007599, + 6524: 0x0000759A, + 6525: 0x00007684, + 6526: 0x000076C2, + 6527: 0x000076F2, + 6528: 0x000076F4, + 6529: 0x000077E5, + 6530: 0x000077FD, + 6531: 0x0000793E, + 6532: 0x00007940, + 6533: 0x00007941, + 6534: 0x000079C9, + 6535: 0x000079C8, + 6536: 0x00007A7A, + 6537: 0x00007A79, + 6538: 0x00007AFA, + 6539: 0x00007CFE, + 6540: 0x00007F54, + 6541: 0x00007F8C, + 6542: 0x00007F8B, + 6543: 0x00008005, + 6544: 0x000080BA, + 6545: 0x000080A5, + 6546: 0x000080A2, + 6547: 0x000080B1, + 6548: 0x000080A1, + 6549: 0x000080AB, + 6550: 0x000080A9, + 6551: 0x000080B4, + 6552: 0x000080AA, + 6553: 0x000080AF, + 6554: 0x000081E5, + 6555: 0x000081FE, + 6556: 0x0000820D, + 6557: 0x000082B3, + 6558: 0x0000829D, + 6559: 0x00008299, + 6560: 0x000082AD, + 6561: 0x000082BD, + 6562: 0x0000829F, + 6563: 0x000082B9, + 6564: 0x000082B1, + 6565: 0x000082AC, + 6566: 0x000082A5, + 6567: 0x000082AF, + 6568: 0x000082B8, + 6569: 0x000082A3, + 6570: 0x000082B0, + 6571: 0x000082BE, + 6572: 0x000082B7, + 6573: 0x0000864E, + 6574: 0x00008671, + 6575: 0x0000521D, + 6576: 0x00008868, + 6577: 0x00008ECB, + 6578: 0x00008FCE, + 6579: 0x00008FD4, + 6580: 0x00008FD1, + 6581: 0x000090B5, + 6582: 0x000090B8, + 6583: 0x000090B1, + 6584: 0x000090B6, + 6585: 0x000091C7, + 6586: 0x000091D1, + 6587: 0x00009577, + 6588: 0x00009580, + 6589: 0x0000961C, + 6590: 0x00009640, + 6591: 0x0000963F, + 6592: 0x0000963B, + 6593: 0x00009644, + 6594: 0x00009642, + 6595: 0x000096B9, + 6596: 0x000096E8, + 6597: 0x00009752, + 6598: 0x0000975E, + 6599: 0x00004E9F, + 6600: 0x00004EAD, + 6601: 0x00004EAE, + 6602: 0x00004FE1, + 6603: 0x00004FB5, + 6604: 0x00004FAF, + 6605: 0x00004FBF, + 6606: 0x00004FE0, + 6607: 0x00004FD1, + 6608: 0x00004FCF, + 6609: 0x00004FDD, + 6610: 0x00004FC3, + 6611: 0x00004FB6, + 6612: 0x00004FD8, + 6613: 0x00004FDF, + 6614: 0x00004FCA, + 6615: 0x00004FD7, + 6616: 0x00004FAE, + 6617: 0x00004FD0, + 6618: 0x00004FC4, + 6619: 0x00004FC2, + 6620: 0x00004FDA, + 6621: 0x00004FCE, + 6622: 0x00004FDE, + 6623: 0x00004FB7, + 6624: 0x00005157, + 6625: 0x00005192, + 6626: 0x00005191, + 6627: 0x000051A0, + 6628: 0x0000524E, + 6629: 0x00005243, + 6630: 0x0000524A, + 6631: 0x0000524D, + 6632: 0x0000524C, + 6633: 0x0000524B, + 6634: 0x00005247, + 6635: 0x000052C7, + 6636: 0x000052C9, + 6637: 0x000052C3, + 6638: 0x000052C1, + 6639: 0x0000530D, + 6640: 0x00005357, + 6641: 0x0000537B, + 6642: 0x0000539A, + 6643: 0x000053DB, + 6644: 0x000054AC, + 6645: 0x000054C0, + 6646: 0x000054A8, + 6647: 0x000054CE, + 6648: 0x000054C9, + 6649: 0x000054B8, + 6650: 0x000054A6, + 6651: 0x000054B3, + 6652: 0x000054C7, + 6653: 0x000054C2, + 6654: 0x000054BD, + 6655: 0x000054AA, + 6656: 0x000054C1, + 6657: 0x000054C4, + 6658: 0x000054C8, + 6659: 0x000054AF, + 6660: 0x000054AB, + 6661: 0x000054B1, + 6662: 0x000054BB, + 6663: 0x000054A9, + 6664: 0x000054A7, + 6665: 0x000054BF, + 6666: 0x000056FF, + 6667: 0x00005782, + 6668: 0x0000578B, + 6669: 0x000057A0, + 6670: 0x000057A3, + 6671: 0x000057A2, + 6672: 0x000057CE, + 6673: 0x000057AE, + 6674: 0x00005793, + 6675: 0x00005955, + 6676: 0x00005951, + 6677: 0x0000594F, + 6678: 0x0000594E, + 6679: 0x00005950, + 6680: 0x000059DC, + 6681: 0x000059D8, + 6682: 0x000059FF, + 6683: 0x000059E3, + 6684: 0x000059E8, + 6685: 0x00005A03, + 6686: 0x000059E5, + 6687: 0x000059EA, + 6688: 0x000059DA, + 6689: 0x000059E6, + 6690: 0x00005A01, + 6691: 0x000059FB, + 6692: 0x00005B69, + 6693: 0x00005BA3, + 6694: 0x00005BA6, + 6695: 0x00005BA4, + 6696: 0x00005BA2, + 6697: 0x00005BA5, + 6698: 0x00005C01, + 6699: 0x00005C4E, + 6700: 0x00005C4F, + 6701: 0x00005C4D, + 6702: 0x00005C4B, + 6703: 0x00005CD9, + 6704: 0x00005CD2, + 6705: 0x00005DF7, + 6706: 0x00005E1D, + 6707: 0x00005E25, + 6708: 0x00005E1F, + 6709: 0x00005E7D, + 6710: 0x00005EA0, + 6711: 0x00005EA6, + 6712: 0x00005EFA, + 6713: 0x00005F08, + 6714: 0x00005F2D, + 6715: 0x00005F65, + 6716: 0x00005F88, + 6717: 0x00005F85, + 6718: 0x00005F8A, + 6719: 0x00005F8B, + 6720: 0x00005F87, + 6721: 0x00005F8C, + 6722: 0x00005F89, + 6723: 0x00006012, + 6724: 0x0000601D, + 6725: 0x00006020, + 6726: 0x00006025, + 6727: 0x0000600E, + 6728: 0x00006028, + 6729: 0x0000604D, + 6730: 0x00006070, + 6731: 0x00006068, + 6732: 0x00006062, + 6733: 0x00006046, + 6734: 0x00006043, + 6735: 0x0000606C, + 6736: 0x0000606B, + 6737: 0x0000606A, + 6738: 0x00006064, + 6739: 0x00006241, + 6740: 0x000062DC, + 6741: 0x00006316, + 6742: 0x00006309, + 6743: 0x000062FC, + 6744: 0x000062ED, + 6745: 0x00006301, + 6746: 0x000062EE, + 6747: 0x000062FD, + 6748: 0x00006307, + 6749: 0x000062F1, + 6750: 0x000062F7, + 6751: 0x000062EF, + 6752: 0x000062EC, + 6753: 0x000062FE, + 6754: 0x000062F4, + 6755: 0x00006311, + 6756: 0x00006302, + 6757: 0x0000653F, + 6758: 0x00006545, + 6759: 0x000065AB, + 6760: 0x000065BD, + 6761: 0x000065E2, + 6762: 0x00006625, + 6763: 0x0000662D, + 6764: 0x00006620, + 6765: 0x00006627, + 6766: 0x0000662F, + 6767: 0x0000661F, + 6768: 0x00006628, + 6769: 0x00006631, + 6770: 0x00006624, + 6771: 0x000066F7, + 6772: 0x000067FF, + 6773: 0x000067D3, + 6774: 0x000067F1, + 6775: 0x000067D4, + 6776: 0x000067D0, + 6777: 0x000067EC, + 6778: 0x000067B6, + 6779: 0x000067AF, + 6780: 0x000067F5, + 6781: 0x000067E9, + 6782: 0x000067EF, + 6783: 0x000067C4, + 6784: 0x000067D1, + 6785: 0x000067B4, + 6786: 0x000067DA, + 6787: 0x000067E5, + 6788: 0x000067B8, + 6789: 0x000067CF, + 6790: 0x000067DE, + 6791: 0x000067F3, + 6792: 0x000067B0, + 6793: 0x000067D9, + 6794: 0x000067E2, + 6795: 0x000067DD, + 6796: 0x000067D2, + 6797: 0x00006B6A, + 6798: 0x00006B83, + 6799: 0x00006B86, + 6800: 0x00006BB5, + 6801: 0x00006BD2, + 6802: 0x00006BD7, + 6803: 0x00006C1F, + 6804: 0x00006CC9, + 6805: 0x00006D0B, + 6806: 0x00006D32, + 6807: 0x00006D2A, + 6808: 0x00006D41, + 6809: 0x00006D25, + 6810: 0x00006D0C, + 6811: 0x00006D31, + 6812: 0x00006D1E, + 6813: 0x00006D17, + 6814: 0x00006D3B, + 6815: 0x00006D3D, + 6816: 0x00006D3E, + 6817: 0x00006D36, + 6818: 0x00006D1B, + 6819: 0x00006CF5, + 6820: 0x00006D39, + 6821: 0x00006D27, + 6822: 0x00006D38, + 6823: 0x00006D29, + 6824: 0x00006D2E, + 6825: 0x00006D35, + 6826: 0x00006D0E, + 6827: 0x00006D2B, + 6828: 0x000070AB, + 6829: 0x000070BA, + 6830: 0x000070B3, + 6831: 0x000070AC, + 6832: 0x000070AF, + 6833: 0x000070AD, + 6834: 0x000070B8, + 6835: 0x000070AE, + 6836: 0x000070A4, + 6837: 0x00007230, + 6838: 0x00007272, + 6839: 0x0000726F, + 6840: 0x00007274, + 6841: 0x000072E9, + 6842: 0x000072E0, + 6843: 0x000072E1, + 6844: 0x000073B7, + 6845: 0x000073CA, + 6846: 0x000073BB, + 6847: 0x000073B2, + 6848: 0x000073CD, + 6849: 0x000073C0, + 6850: 0x000073B3, + 6851: 0x0000751A, + 6852: 0x0000752D, + 6853: 0x0000754F, + 6854: 0x0000754C, + 6855: 0x0000754E, + 6856: 0x0000754B, + 6857: 0x000075AB, + 6858: 0x000075A4, + 6859: 0x000075A5, + 6860: 0x000075A2, + 6861: 0x000075A3, + 6862: 0x00007678, + 6863: 0x00007686, + 6864: 0x00007687, + 6865: 0x00007688, + 6866: 0x000076C8, + 6867: 0x000076C6, + 6868: 0x000076C3, + 6869: 0x000076C5, + 6870: 0x00007701, + 6871: 0x000076F9, + 6872: 0x000076F8, + 6873: 0x00007709, + 6874: 0x0000770B, + 6875: 0x000076FE, + 6876: 0x000076FC, + 6877: 0x00007707, + 6878: 0x000077DC, + 6879: 0x00007802, + 6880: 0x00007814, + 6881: 0x0000780C, + 6882: 0x0000780D, + 6883: 0x00007946, + 6884: 0x00007949, + 6885: 0x00007948, + 6886: 0x00007947, + 6887: 0x000079B9, + 6888: 0x000079BA, + 6889: 0x000079D1, + 6890: 0x000079D2, + 6891: 0x000079CB, + 6892: 0x00007A7F, + 6893: 0x00007A81, + 6894: 0x00007AFF, + 6895: 0x00007AFD, + 6896: 0x00007C7D, + 6897: 0x00007D02, + 6898: 0x00007D05, + 6899: 0x00007D00, + 6900: 0x00007D09, + 6901: 0x00007D07, + 6902: 0x00007D04, + 6903: 0x00007D06, + 6904: 0x00007F38, + 6905: 0x00007F8E, + 6906: 0x00007FBF, + 6907: 0x00008004, + 6908: 0x00008010, + 6909: 0x0000800D, + 6910: 0x00008011, + 6911: 0x00008036, + 6912: 0x000080D6, + 6913: 0x000080E5, + 6914: 0x000080DA, + 6915: 0x000080C3, + 6916: 0x000080C4, + 6917: 0x000080CC, + 6918: 0x000080E1, + 6919: 0x000080DB, + 6920: 0x000080CE, + 6921: 0x000080DE, + 6922: 0x000080E4, + 6923: 0x000080DD, + 6924: 0x000081F4, + 6925: 0x00008222, + 6926: 0x000082E7, + 6927: 0x00008303, + 6928: 0x00008305, + 6929: 0x000082E3, + 6930: 0x000082DB, + 6931: 0x000082E6, + 6932: 0x00008304, + 6933: 0x000082E5, + 6934: 0x00008302, + 6935: 0x00008309, + 6936: 0x000082D2, + 6937: 0x000082D7, + 6938: 0x000082F1, + 6939: 0x00008301, + 6940: 0x000082DC, + 6941: 0x000082D4, + 6942: 0x000082D1, + 6943: 0x000082DE, + 6944: 0x000082D3, + 6945: 0x000082DF, + 6946: 0x000082EF, + 6947: 0x00008306, + 6948: 0x00008650, + 6949: 0x00008679, + 6950: 0x0000867B, + 6951: 0x0000867A, + 6952: 0x0000884D, + 6953: 0x0000886B, + 6954: 0x00008981, + 6955: 0x000089D4, + 6956: 0x00008A08, + 6957: 0x00008A02, + 6958: 0x00008A03, + 6959: 0x00008C9E, + 6960: 0x00008CA0, + 6961: 0x00008D74, + 6962: 0x00008D73, + 6963: 0x00008DB4, + 6964: 0x00008ECD, + 6965: 0x00008ECC, + 6966: 0x00008FF0, + 6967: 0x00008FE6, + 6968: 0x00008FE2, + 6969: 0x00008FEA, + 6970: 0x00008FE5, + 6971: 0x00008FED, + 6972: 0x00008FEB, + 6973: 0x00008FE4, + 6974: 0x00008FE8, + 6975: 0x000090CA, + 6976: 0x000090CE, + 6977: 0x000090C1, + 6978: 0x000090C3, + 6979: 0x0000914B, + 6980: 0x0000914A, + 6981: 0x000091CD, + 6982: 0x00009582, + 6983: 0x00009650, + 6984: 0x0000964B, + 6985: 0x0000964C, + 6986: 0x0000964D, + 6987: 0x00009762, + 6988: 0x00009769, + 6989: 0x000097CB, + 6990: 0x000097ED, + 6991: 0x000097F3, + 6992: 0x00009801, + 6993: 0x000098A8, + 6994: 0x000098DB, + 6995: 0x000098DF, + 6996: 0x00009996, + 6997: 0x00009999, + 6998: 0x00004E58, + 6999: 0x00004EB3, + 7000: 0x0000500C, + 7001: 0x0000500D, + 7002: 0x00005023, + 7003: 0x00004FEF, + 7004: 0x00005026, + 7005: 0x00005025, + 7006: 0x00004FF8, + 7007: 0x00005029, + 7008: 0x00005016, + 7009: 0x00005006, + 7010: 0x0000503C, + 7011: 0x0000501F, + 7012: 0x0000501A, + 7013: 0x00005012, + 7014: 0x00005011, + 7015: 0x00004FFA, + 7016: 0x00005000, + 7017: 0x00005014, + 7018: 0x00005028, + 7019: 0x00004FF1, + 7020: 0x00005021, + 7021: 0x0000500B, + 7022: 0x00005019, + 7023: 0x00005018, + 7024: 0x00004FF3, + 7025: 0x00004FEE, + 7026: 0x0000502D, + 7027: 0x0000502A, + 7028: 0x00004FFE, + 7029: 0x0000502B, + 7030: 0x00005009, + 7031: 0x0000517C, + 7032: 0x000051A4, + 7033: 0x000051A5, + 7034: 0x000051A2, + 7035: 0x000051CD, + 7036: 0x000051CC, + 7037: 0x000051C6, + 7038: 0x000051CB, + 7039: 0x00005256, + 7040: 0x0000525C, + 7041: 0x00005254, + 7042: 0x0000525B, + 7043: 0x0000525D, + 7044: 0x0000532A, + 7045: 0x0000537F, + 7046: 0x0000539F, + 7047: 0x0000539D, + 7048: 0x000053DF, + 7049: 0x000054E8, + 7050: 0x00005510, + 7051: 0x00005501, + 7052: 0x00005537, + 7053: 0x000054FC, + 7054: 0x000054E5, + 7055: 0x000054F2, + 7056: 0x00005506, + 7057: 0x000054FA, + 7058: 0x00005514, + 7059: 0x000054E9, + 7060: 0x000054ED, + 7061: 0x000054E1, + 7062: 0x00005509, + 7063: 0x000054EE, + 7064: 0x000054EA, + 7065: 0x000054E6, + 7066: 0x00005527, + 7067: 0x00005507, + 7068: 0x000054FD, + 7069: 0x0000550F, + 7070: 0x00005703, + 7071: 0x00005704, + 7072: 0x000057C2, + 7073: 0x000057D4, + 7074: 0x000057CB, + 7075: 0x000057C3, + 7076: 0x00005809, + 7077: 0x0000590F, + 7078: 0x00005957, + 7079: 0x00005958, + 7080: 0x0000595A, + 7081: 0x00005A11, + 7082: 0x00005A18, + 7083: 0x00005A1C, + 7084: 0x00005A1F, + 7085: 0x00005A1B, + 7086: 0x00005A13, + 7087: 0x000059EC, + 7088: 0x00005A20, + 7089: 0x00005A23, + 7090: 0x00005A29, + 7091: 0x00005A25, + 7092: 0x00005A0C, + 7093: 0x00005A09, + 7094: 0x00005B6B, + 7095: 0x00005C58, + 7096: 0x00005BB0, + 7097: 0x00005BB3, + 7098: 0x00005BB6, + 7099: 0x00005BB4, + 7100: 0x00005BAE, + 7101: 0x00005BB5, + 7102: 0x00005BB9, + 7103: 0x00005BB8, + 7104: 0x00005C04, + 7105: 0x00005C51, + 7106: 0x00005C55, + 7107: 0x00005C50, + 7108: 0x00005CED, + 7109: 0x00005CFD, + 7110: 0x00005CFB, + 7111: 0x00005CEA, + 7112: 0x00005CE8, + 7113: 0x00005CF0, + 7114: 0x00005CF6, + 7115: 0x00005D01, + 7116: 0x00005CF4, + 7117: 0x00005DEE, + 7118: 0x00005E2D, + 7119: 0x00005E2B, + 7120: 0x00005EAB, + 7121: 0x00005EAD, + 7122: 0x00005EA7, + 7123: 0x00005F31, + 7124: 0x00005F92, + 7125: 0x00005F91, + 7126: 0x00005F90, + 7127: 0x00006059, + 7128: 0x00006063, + 7129: 0x00006065, + 7130: 0x00006050, + 7131: 0x00006055, + 7132: 0x0000606D, + 7133: 0x00006069, + 7134: 0x0000606F, + 7135: 0x00006084, + 7136: 0x0000609F, + 7137: 0x0000609A, + 7138: 0x0000608D, + 7139: 0x00006094, + 7140: 0x0000608C, + 7141: 0x00006085, + 7142: 0x00006096, + 7143: 0x00006247, + 7144: 0x000062F3, + 7145: 0x00006308, + 7146: 0x000062FF, + 7147: 0x0000634E, + 7148: 0x0000633E, + 7149: 0x0000632F, + 7150: 0x00006355, + 7151: 0x00006342, + 7152: 0x00006346, + 7153: 0x0000634F, + 7154: 0x00006349, + 7155: 0x0000633A, + 7156: 0x00006350, + 7157: 0x0000633D, + 7158: 0x0000632A, + 7159: 0x0000632B, + 7160: 0x00006328, + 7161: 0x0000634D, + 7162: 0x0000634C, + 7163: 0x00006548, + 7164: 0x00006549, + 7165: 0x00006599, + 7166: 0x000065C1, + 7167: 0x000065C5, + 7168: 0x00006642, + 7169: 0x00006649, + 7170: 0x0000664F, + 7171: 0x00006643, + 7172: 0x00006652, + 7173: 0x0000664C, + 7174: 0x00006645, + 7175: 0x00006641, + 7176: 0x000066F8, + 7177: 0x00006714, + 7178: 0x00006715, + 7179: 0x00006717, + 7180: 0x00006821, + 7181: 0x00006838, + 7182: 0x00006848, + 7183: 0x00006846, + 7184: 0x00006853, + 7185: 0x00006839, + 7186: 0x00006842, + 7187: 0x00006854, + 7188: 0x00006829, + 7189: 0x000068B3, + 7190: 0x00006817, + 7191: 0x0000684C, + 7192: 0x00006851, + 7193: 0x0000683D, + 7194: 0x000067F4, + 7195: 0x00006850, + 7196: 0x00006840, + 7197: 0x0000683C, + 7198: 0x00006843, + 7199: 0x0000682A, + 7200: 0x00006845, + 7201: 0x00006813, + 7202: 0x00006818, + 7203: 0x00006841, + 7204: 0x00006B8A, + 7205: 0x00006B89, + 7206: 0x00006BB7, + 7207: 0x00006C23, + 7208: 0x00006C27, + 7209: 0x00006C28, + 7210: 0x00006C26, + 7211: 0x00006C24, + 7212: 0x00006CF0, + 7213: 0x00006D6A, + 7214: 0x00006D95, + 7215: 0x00006D88, + 7216: 0x00006D87, + 7217: 0x00006D66, + 7218: 0x00006D78, + 7219: 0x00006D77, + 7220: 0x00006D59, + 7221: 0x00006D93, + 7222: 0x00006D6C, + 7223: 0x00006D89, + 7224: 0x00006D6E, + 7225: 0x00006D5A, + 7226: 0x00006D74, + 7227: 0x00006D69, + 7228: 0x00006D8C, + 7229: 0x00006D8A, + 7230: 0x00006D79, + 7231: 0x00006D85, + 7232: 0x00006D65, + 7233: 0x00006D94, + 7234: 0x000070CA, + 7235: 0x000070D8, + 7236: 0x000070E4, + 7237: 0x000070D9, + 7238: 0x000070C8, + 7239: 0x000070CF, + 7240: 0x00007239, + 7241: 0x00007279, + 7242: 0x000072FC, + 7243: 0x000072F9, + 7244: 0x000072FD, + 7245: 0x000072F8, + 7246: 0x000072F7, + 7247: 0x00007386, + 7248: 0x000073ED, + 7249: 0x00007409, + 7250: 0x000073EE, + 7251: 0x000073E0, + 7252: 0x000073EA, + 7253: 0x000073DE, + 7254: 0x00007554, + 7255: 0x0000755D, + 7256: 0x0000755C, + 7257: 0x0000755A, + 7258: 0x00007559, + 7259: 0x000075BE, + 7260: 0x000075C5, + 7261: 0x000075C7, + 7262: 0x000075B2, + 7263: 0x000075B3, + 7264: 0x000075BD, + 7265: 0x000075BC, + 7266: 0x000075B9, + 7267: 0x000075C2, + 7268: 0x000075B8, + 7269: 0x0000768B, + 7270: 0x000076B0, + 7271: 0x000076CA, + 7272: 0x000076CD, + 7273: 0x000076CE, + 7274: 0x00007729, + 7275: 0x0000771F, + 7276: 0x00007720, + 7277: 0x00007728, + 7278: 0x000077E9, + 7279: 0x00007830, + 7280: 0x00007827, + 7281: 0x00007838, + 7282: 0x0000781D, + 7283: 0x00007834, + 7284: 0x00007837, + 7285: 0x00007825, + 7286: 0x0000782D, + 7287: 0x00007820, + 7288: 0x0000781F, + 7289: 0x00007832, + 7290: 0x00007955, + 7291: 0x00007950, + 7292: 0x00007960, + 7293: 0x0000795F, + 7294: 0x00007956, + 7295: 0x0000795E, + 7296: 0x0000795D, + 7297: 0x00007957, + 7298: 0x0000795A, + 7299: 0x000079E4, + 7300: 0x000079E3, + 7301: 0x000079E7, + 7302: 0x000079DF, + 7303: 0x000079E6, + 7304: 0x000079E9, + 7305: 0x000079D8, + 7306: 0x00007A84, + 7307: 0x00007A88, + 7308: 0x00007AD9, + 7309: 0x00007B06, + 7310: 0x00007B11, + 7311: 0x00007C89, + 7312: 0x00007D21, + 7313: 0x00007D17, + 7314: 0x00007D0B, + 7315: 0x00007D0A, + 7316: 0x00007D20, + 7317: 0x00007D22, + 7318: 0x00007D14, + 7319: 0x00007D10, + 7320: 0x00007D15, + 7321: 0x00007D1A, + 7322: 0x00007D1C, + 7323: 0x00007D0D, + 7324: 0x00007D19, + 7325: 0x00007D1B, + 7326: 0x00007F3A, + 7327: 0x00007F5F, + 7328: 0x00007F94, + 7329: 0x00007FC5, + 7330: 0x00007FC1, + 7331: 0x00008006, + 7332: 0x00008018, + 7333: 0x00008015, + 7334: 0x00008019, + 7335: 0x00008017, + 7336: 0x0000803D, + 7337: 0x0000803F, + 7338: 0x000080F1, + 7339: 0x00008102, + 7340: 0x000080F0, + 7341: 0x00008105, + 7342: 0x000080ED, + 7343: 0x000080F4, + 7344: 0x00008106, + 7345: 0x000080F8, + 7346: 0x000080F3, + 7347: 0x00008108, + 7348: 0x000080FD, + 7349: 0x0000810A, + 7350: 0x000080FC, + 7351: 0x000080EF, + 7352: 0x000081ED, + 7353: 0x000081EC, + 7354: 0x00008200, + 7355: 0x00008210, + 7356: 0x0000822A, + 7357: 0x0000822B, + 7358: 0x00008228, + 7359: 0x0000822C, + 7360: 0x000082BB, + 7361: 0x0000832B, + 7362: 0x00008352, + 7363: 0x00008354, + 7364: 0x0000834A, + 7365: 0x00008338, + 7366: 0x00008350, + 7367: 0x00008349, + 7368: 0x00008335, + 7369: 0x00008334, + 7370: 0x0000834F, + 7371: 0x00008332, + 7372: 0x00008339, + 7373: 0x00008336, + 7374: 0x00008317, + 7375: 0x00008340, + 7376: 0x00008331, + 7377: 0x00008328, + 7378: 0x00008343, + 7379: 0x00008654, + 7380: 0x0000868A, + 7381: 0x000086AA, + 7382: 0x00008693, + 7383: 0x000086A4, + 7384: 0x000086A9, + 7385: 0x0000868C, + 7386: 0x000086A3, + 7387: 0x0000869C, + 7388: 0x00008870, + 7389: 0x00008877, + 7390: 0x00008881, + 7391: 0x00008882, + 7392: 0x0000887D, + 7393: 0x00008879, + 7394: 0x00008A18, + 7395: 0x00008A10, + 7396: 0x00008A0E, + 7397: 0x00008A0C, + 7398: 0x00008A15, + 7399: 0x00008A0A, + 7400: 0x00008A17, + 7401: 0x00008A13, + 7402: 0x00008A16, + 7403: 0x00008A0F, + 7404: 0x00008A11, + 7405: 0x00008C48, + 7406: 0x00008C7A, + 7407: 0x00008C79, + 7408: 0x00008CA1, + 7409: 0x00008CA2, + 7410: 0x00008D77, + 7411: 0x00008EAC, + 7412: 0x00008ED2, + 7413: 0x00008ED4, + 7414: 0x00008ECF, + 7415: 0x00008FB1, + 7416: 0x00009001, + 7417: 0x00009006, + 7418: 0x00008FF7, + 7419: 0x00009000, + 7420: 0x00008FFA, + 7421: 0x00008FF4, + 7422: 0x00009003, + 7423: 0x00008FFD, + 7424: 0x00009005, + 7425: 0x00008FF8, + 7426: 0x00009095, + 7427: 0x000090E1, + 7428: 0x000090DD, + 7429: 0x000090E2, + 7430: 0x00009152, + 7431: 0x0000914D, + 7432: 0x0000914C, + 7433: 0x000091D8, + 7434: 0x000091DD, + 7435: 0x000091D7, + 7436: 0x000091DC, + 7437: 0x000091D9, + 7438: 0x00009583, + 7439: 0x00009662, + 7440: 0x00009663, + 7441: 0x00009661, + 7442: 0x0000965B, + 7443: 0x0000965D, + 7444: 0x00009664, + 7445: 0x00009658, + 7446: 0x0000965E, + 7447: 0x000096BB, + 7448: 0x000098E2, + 7449: 0x000099AC, + 7450: 0x00009AA8, + 7451: 0x00009AD8, + 7452: 0x00009B25, + 7453: 0x00009B32, + 7454: 0x00009B3C, + 7455: 0x00004E7E, + 7456: 0x0000507A, + 7457: 0x0000507D, + 7458: 0x0000505C, + 7459: 0x00005047, + 7460: 0x00005043, + 7461: 0x0000504C, + 7462: 0x0000505A, + 7463: 0x00005049, + 7464: 0x00005065, + 7465: 0x00005076, + 7466: 0x0000504E, + 7467: 0x00005055, + 7468: 0x00005075, + 7469: 0x00005074, + 7470: 0x00005077, + 7471: 0x0000504F, + 7472: 0x0000500F, + 7473: 0x0000506F, + 7474: 0x0000506D, + 7475: 0x0000515C, + 7476: 0x00005195, + 7477: 0x000051F0, + 7478: 0x0000526A, + 7479: 0x0000526F, + 7480: 0x000052D2, + 7481: 0x000052D9, + 7482: 0x000052D8, + 7483: 0x000052D5, + 7484: 0x00005310, + 7485: 0x0000530F, + 7486: 0x00005319, + 7487: 0x0000533F, + 7488: 0x00005340, + 7489: 0x0000533E, + 7490: 0x000053C3, + 7491: 0x000066FC, + 7492: 0x00005546, + 7493: 0x0000556A, + 7494: 0x00005566, + 7495: 0x00005544, + 7496: 0x0000555E, + 7497: 0x00005561, + 7498: 0x00005543, + 7499: 0x0000554A, + 7500: 0x00005531, + 7501: 0x00005556, + 7502: 0x0000554F, + 7503: 0x00005555, + 7504: 0x0000552F, + 7505: 0x00005564, + 7506: 0x00005538, + 7507: 0x0000552E, + 7508: 0x0000555C, + 7509: 0x0000552C, + 7510: 0x00005563, + 7511: 0x00005533, + 7512: 0x00005541, + 7513: 0x00005557, + 7514: 0x00005708, + 7515: 0x0000570B, + 7516: 0x00005709, + 7517: 0x000057DF, + 7518: 0x00005805, + 7519: 0x0000580A, + 7520: 0x00005806, + 7521: 0x000057E0, + 7522: 0x000057E4, + 7523: 0x000057FA, + 7524: 0x00005802, + 7525: 0x00005835, + 7526: 0x000057F7, + 7527: 0x000057F9, + 7528: 0x00005920, + 7529: 0x00005962, + 7530: 0x00005A36, + 7531: 0x00005A41, + 7532: 0x00005A49, + 7533: 0x00005A66, + 7534: 0x00005A6A, + 7535: 0x00005A40, + 7536: 0x00005A3C, + 7537: 0x00005A62, + 7538: 0x00005A5A, + 7539: 0x00005A46, + 7540: 0x00005A4A, + 7541: 0x00005B70, + 7542: 0x00005BC7, + 7543: 0x00005BC5, + 7544: 0x00005BC4, + 7545: 0x00005BC2, + 7546: 0x00005BBF, + 7547: 0x00005BC6, + 7548: 0x00005C09, + 7549: 0x00005C08, + 7550: 0x00005C07, + 7551: 0x00005C60, + 7552: 0x00005C5C, + 7553: 0x00005C5D, + 7554: 0x00005D07, + 7555: 0x00005D06, + 7556: 0x00005D0E, + 7557: 0x00005D1B, + 7558: 0x00005D16, + 7559: 0x00005D22, + 7560: 0x00005D11, + 7561: 0x00005D29, + 7562: 0x00005D14, + 7563: 0x00005D19, + 7564: 0x00005D24, + 7565: 0x00005D27, + 7566: 0x00005D17, + 7567: 0x00005DE2, + 7568: 0x00005E38, + 7569: 0x00005E36, + 7570: 0x00005E33, + 7571: 0x00005E37, + 7572: 0x00005EB7, + 7573: 0x00005EB8, + 7574: 0x00005EB6, + 7575: 0x00005EB5, + 7576: 0x00005EBE, + 7577: 0x00005F35, + 7578: 0x00005F37, + 7579: 0x00005F57, + 7580: 0x00005F6C, + 7581: 0x00005F69, + 7582: 0x00005F6B, + 7583: 0x00005F97, + 7584: 0x00005F99, + 7585: 0x00005F9E, + 7586: 0x00005F98, + 7587: 0x00005FA1, + 7588: 0x00005FA0, + 7589: 0x00005F9C, + 7590: 0x0000607F, + 7591: 0x000060A3, + 7592: 0x00006089, + 7593: 0x000060A0, + 7594: 0x000060A8, + 7595: 0x000060CB, + 7596: 0x000060B4, + 7597: 0x000060E6, + 7598: 0x000060BD, + 7599: 0x000060C5, + 7600: 0x000060BB, + 7601: 0x000060B5, + 7602: 0x000060DC, + 7603: 0x000060BC, + 7604: 0x000060D8, + 7605: 0x000060D5, + 7606: 0x000060C6, + 7607: 0x000060DF, + 7608: 0x000060B8, + 7609: 0x000060DA, + 7610: 0x000060C7, + 7611: 0x0000621A, + 7612: 0x0000621B, + 7613: 0x00006248, + 7614: 0x000063A0, + 7615: 0x000063A7, + 7616: 0x00006372, + 7617: 0x00006396, + 7618: 0x000063A2, + 7619: 0x000063A5, + 7620: 0x00006377, + 7621: 0x00006367, + 7622: 0x00006398, + 7623: 0x000063AA, + 7624: 0x00006371, + 7625: 0x000063A9, + 7626: 0x00006389, + 7627: 0x00006383, + 7628: 0x0000639B, + 7629: 0x0000636B, + 7630: 0x000063A8, + 7631: 0x00006384, + 7632: 0x00006388, + 7633: 0x00006399, + 7634: 0x000063A1, + 7635: 0x000063AC, + 7636: 0x00006392, + 7637: 0x0000638F, + 7638: 0x00006380, + 7639: 0x0000637B, + 7640: 0x00006369, + 7641: 0x00006368, + 7642: 0x0000637A, + 7643: 0x0000655D, + 7644: 0x00006556, + 7645: 0x00006551, + 7646: 0x00006559, + 7647: 0x00006557, + 7648: 0x0000555F, + 7649: 0x0000654F, + 7650: 0x00006558, + 7651: 0x00006555, + 7652: 0x00006554, + 7653: 0x0000659C, + 7654: 0x0000659B, + 7655: 0x000065AC, + 7656: 0x000065CF, + 7657: 0x000065CB, + 7658: 0x000065CC, + 7659: 0x000065CE, + 7660: 0x0000665D, + 7661: 0x0000665A, + 7662: 0x00006664, + 7663: 0x00006668, + 7664: 0x00006666, + 7665: 0x0000665E, + 7666: 0x000066F9, + 7667: 0x000052D7, + 7668: 0x0000671B, + 7669: 0x00006881, + 7670: 0x000068AF, + 7671: 0x000068A2, + 7672: 0x00006893, + 7673: 0x000068B5, + 7674: 0x0000687F, + 7675: 0x00006876, + 7676: 0x000068B1, + 7677: 0x000068A7, + 7678: 0x00006897, + 7679: 0x000068B0, + 7680: 0x00006883, + 7681: 0x000068C4, + 7682: 0x000068AD, + 7683: 0x00006886, + 7684: 0x00006885, + 7685: 0x00006894, + 7686: 0x0000689D, + 7687: 0x000068A8, + 7688: 0x0000689F, + 7689: 0x000068A1, + 7690: 0x00006882, + 7691: 0x00006B32, + 7692: 0x00006BBA, + 7693: 0x00006BEB, + 7694: 0x00006BEC, + 7695: 0x00006C2B, + 7696: 0x00006D8E, + 7697: 0x00006DBC, + 7698: 0x00006DF3, + 7699: 0x00006DD9, + 7700: 0x00006DB2, + 7701: 0x00006DE1, + 7702: 0x00006DCC, + 7703: 0x00006DE4, + 7704: 0x00006DFB, + 7705: 0x00006DFA, + 7706: 0x00006E05, + 7707: 0x00006DC7, + 7708: 0x00006DCB, + 7709: 0x00006DAF, + 7710: 0x00006DD1, + 7711: 0x00006DAE, + 7712: 0x00006DDE, + 7713: 0x00006DF9, + 7714: 0x00006DB8, + 7715: 0x00006DF7, + 7716: 0x00006DF5, + 7717: 0x00006DC5, + 7718: 0x00006DD2, + 7719: 0x00006E1A, + 7720: 0x00006DB5, + 7721: 0x00006DDA, + 7722: 0x00006DEB, + 7723: 0x00006DD8, + 7724: 0x00006DEA, + 7725: 0x00006DF1, + 7726: 0x00006DEE, + 7727: 0x00006DE8, + 7728: 0x00006DC6, + 7729: 0x00006DC4, + 7730: 0x00006DAA, + 7731: 0x00006DEC, + 7732: 0x00006DBF, + 7733: 0x00006DE6, + 7734: 0x000070F9, + 7735: 0x00007109, + 7736: 0x0000710A, + 7737: 0x000070FD, + 7738: 0x000070EF, + 7739: 0x0000723D, + 7740: 0x0000727D, + 7741: 0x00007281, + 7742: 0x0000731C, + 7743: 0x0000731B, + 7744: 0x00007316, + 7745: 0x00007313, + 7746: 0x00007319, + 7747: 0x00007387, + 7748: 0x00007405, + 7749: 0x0000740A, + 7750: 0x00007403, + 7751: 0x00007406, + 7752: 0x000073FE, + 7753: 0x0000740D, + 7754: 0x000074E0, + 7755: 0x000074F6, + 7756: 0x000074F7, + 7757: 0x0000751C, + 7758: 0x00007522, + 7759: 0x00007565, + 7760: 0x00007566, + 7761: 0x00007562, + 7762: 0x00007570, + 7763: 0x0000758F, + 7764: 0x000075D4, + 7765: 0x000075D5, + 7766: 0x000075B5, + 7767: 0x000075CA, + 7768: 0x000075CD, + 7769: 0x0000768E, + 7770: 0x000076D4, + 7771: 0x000076D2, + 7772: 0x000076DB, + 7773: 0x00007737, + 7774: 0x0000773E, + 7775: 0x0000773C, + 7776: 0x00007736, + 7777: 0x00007738, + 7778: 0x0000773A, + 7779: 0x0000786B, + 7780: 0x00007843, + 7781: 0x0000784E, + 7782: 0x00007965, + 7783: 0x00007968, + 7784: 0x0000796D, + 7785: 0x000079FB, + 7786: 0x00007A92, + 7787: 0x00007A95, + 7788: 0x00007B20, + 7789: 0x00007B28, + 7790: 0x00007B1B, + 7791: 0x00007B2C, + 7792: 0x00007B26, + 7793: 0x00007B19, + 7794: 0x00007B1E, + 7795: 0x00007B2E, + 7796: 0x00007C92, + 7797: 0x00007C97, + 7798: 0x00007C95, + 7799: 0x00007D46, + 7800: 0x00007D43, + 7801: 0x00007D71, + 7802: 0x00007D2E, + 7803: 0x00007D39, + 7804: 0x00007D3C, + 7805: 0x00007D40, + 7806: 0x00007D30, + 7807: 0x00007D33, + 7808: 0x00007D44, + 7809: 0x00007D2F, + 7810: 0x00007D42, + 7811: 0x00007D32, + 7812: 0x00007D31, + 7813: 0x00007F3D, + 7814: 0x00007F9E, + 7815: 0x00007F9A, + 7816: 0x00007FCC, + 7817: 0x00007FCE, + 7818: 0x00007FD2, + 7819: 0x0000801C, + 7820: 0x0000804A, + 7821: 0x00008046, + 7822: 0x0000812F, + 7823: 0x00008116, + 7824: 0x00008123, + 7825: 0x0000812B, + 7826: 0x00008129, + 7827: 0x00008130, + 7828: 0x00008124, + 7829: 0x00008202, + 7830: 0x00008235, + 7831: 0x00008237, + 7832: 0x00008236, + 7833: 0x00008239, + 7834: 0x0000838E, + 7835: 0x0000839E, + 7836: 0x00008398, + 7837: 0x00008378, + 7838: 0x000083A2, + 7839: 0x00008396, + 7840: 0x000083BD, + 7841: 0x000083AB, + 7842: 0x00008392, + 7843: 0x0000838A, + 7844: 0x00008393, + 7845: 0x00008389, + 7846: 0x000083A0, + 7847: 0x00008377, + 7848: 0x0000837B, + 7849: 0x0000837C, + 7850: 0x00008386, + 7851: 0x000083A7, + 7852: 0x00008655, + 7853: 0x00005F6A, + 7854: 0x000086C7, + 7855: 0x000086C0, + 7856: 0x000086B6, + 7857: 0x000086C4, + 7858: 0x000086B5, + 7859: 0x000086C6, + 7860: 0x000086CB, + 7861: 0x000086B1, + 7862: 0x000086AF, + 7863: 0x000086C9, + 7864: 0x00008853, + 7865: 0x0000889E, + 7866: 0x00008888, + 7867: 0x000088AB, + 7868: 0x00008892, + 7869: 0x00008896, + 7870: 0x0000888D, + 7871: 0x0000888B, + 7872: 0x00008993, + 7873: 0x0000898F, + 7874: 0x00008A2A, + 7875: 0x00008A1D, + 7876: 0x00008A23, + 7877: 0x00008A25, + 7878: 0x00008A31, + 7879: 0x00008A2D, + 7880: 0x00008A1F, + 7881: 0x00008A1B, + 7882: 0x00008A22, + 7883: 0x00008C49, + 7884: 0x00008C5A, + 7885: 0x00008CA9, + 7886: 0x00008CAC, + 7887: 0x00008CAB, + 7888: 0x00008CA8, + 7889: 0x00008CAA, + 7890: 0x00008CA7, + 7891: 0x00008D67, + 7892: 0x00008D66, + 7893: 0x00008DBE, + 7894: 0x00008DBA, + 7895: 0x00008EDB, + 7896: 0x00008EDF, + 7897: 0x00009019, + 7898: 0x0000900D, + 7899: 0x0000901A, + 7900: 0x00009017, + 7901: 0x00009023, + 7902: 0x0000901F, + 7903: 0x0000901D, + 7904: 0x00009010, + 7905: 0x00009015, + 7906: 0x0000901E, + 7907: 0x00009020, + 7908: 0x0000900F, + 7909: 0x00009022, + 7910: 0x00009016, + 7911: 0x0000901B, + 7912: 0x00009014, + 7913: 0x000090E8, + 7914: 0x000090ED, + 7915: 0x000090FD, + 7916: 0x00009157, + 7917: 0x000091CE, + 7918: 0x000091F5, + 7919: 0x000091E6, + 7920: 0x000091E3, + 7921: 0x000091E7, + 7922: 0x000091ED, + 7923: 0x000091E9, + 7924: 0x00009589, + 7925: 0x0000966A, + 7926: 0x00009675, + 7927: 0x00009673, + 7928: 0x00009678, + 7929: 0x00009670, + 7930: 0x00009674, + 7931: 0x00009676, + 7932: 0x00009677, + 7933: 0x0000966C, + 7934: 0x000096C0, + 7935: 0x000096EA, + 7936: 0x000096E9, + 7937: 0x00007AE0, + 7938: 0x00007ADF, + 7939: 0x00009802, + 7940: 0x00009803, + 7941: 0x00009B5A, + 7942: 0x00009CE5, + 7943: 0x00009E75, + 7944: 0x00009E7F, + 7945: 0x00009EA5, + 7946: 0x00009EBB, + 7947: 0x000050A2, + 7948: 0x0000508D, + 7949: 0x00005085, + 7950: 0x00005099, + 7951: 0x00005091, + 7952: 0x00005080, + 7953: 0x00005096, + 7954: 0x00005098, + 7955: 0x0000509A, + 7956: 0x00006700, + 7957: 0x000051F1, + 7958: 0x00005272, + 7959: 0x00005274, + 7960: 0x00005275, + 7961: 0x00005269, + 7962: 0x000052DE, + 7963: 0x000052DD, + 7964: 0x000052DB, + 7965: 0x0000535A, + 7966: 0x000053A5, + 7967: 0x0000557B, + 7968: 0x00005580, + 7969: 0x000055A7, + 7970: 0x0000557C, + 7971: 0x0000558A, + 7972: 0x0000559D, + 7973: 0x00005598, + 7974: 0x00005582, + 7975: 0x0000559C, + 7976: 0x000055AA, + 7977: 0x00005594, + 7978: 0x00005587, + 7979: 0x0000558B, + 7980: 0x00005583, + 7981: 0x000055B3, + 7982: 0x000055AE, + 7983: 0x0000559F, + 7984: 0x0000553E, + 7985: 0x000055B2, + 7986: 0x0000559A, + 7987: 0x000055BB, + 7988: 0x000055AC, + 7989: 0x000055B1, + 7990: 0x0000557E, + 7991: 0x00005589, + 7992: 0x000055AB, + 7993: 0x00005599, + 7994: 0x0000570D, + 7995: 0x0000582F, + 7996: 0x0000582A, + 7997: 0x00005834, + 7998: 0x00005824, + 7999: 0x00005830, + 8000: 0x00005831, + 8001: 0x00005821, + 8002: 0x0000581D, + 8003: 0x00005820, + 8004: 0x000058F9, + 8005: 0x000058FA, + 8006: 0x00005960, + 8007: 0x00005A77, + 8008: 0x00005A9A, + 8009: 0x00005A7F, + 8010: 0x00005A92, + 8011: 0x00005A9B, + 8012: 0x00005AA7, + 8013: 0x00005B73, + 8014: 0x00005B71, + 8015: 0x00005BD2, + 8016: 0x00005BCC, + 8017: 0x00005BD3, + 8018: 0x00005BD0, + 8019: 0x00005C0A, + 8020: 0x00005C0B, + 8021: 0x00005C31, + 8022: 0x00005D4C, + 8023: 0x00005D50, + 8024: 0x00005D34, + 8025: 0x00005D47, + 8026: 0x00005DFD, + 8027: 0x00005E45, + 8028: 0x00005E3D, + 8029: 0x00005E40, + 8030: 0x00005E43, + 8031: 0x00005E7E, + 8032: 0x00005ECA, + 8033: 0x00005EC1, + 8034: 0x00005EC2, + 8035: 0x00005EC4, + 8036: 0x00005F3C, + 8037: 0x00005F6D, + 8038: 0x00005FA9, + 8039: 0x00005FAA, + 8040: 0x00005FA8, + 8041: 0x000060D1, + 8042: 0x000060E1, + 8043: 0x000060B2, + 8044: 0x000060B6, + 8045: 0x000060E0, + 8046: 0x0000611C, + 8047: 0x00006123, + 8048: 0x000060FA, + 8049: 0x00006115, + 8050: 0x000060F0, + 8051: 0x000060FB, + 8052: 0x000060F4, + 8053: 0x00006168, + 8054: 0x000060F1, + 8055: 0x0000610E, + 8056: 0x000060F6, + 8057: 0x00006109, + 8058: 0x00006100, + 8059: 0x00006112, + 8060: 0x0000621F, + 8061: 0x00006249, + 8062: 0x000063A3, + 8063: 0x0000638C, + 8064: 0x000063CF, + 8065: 0x000063C0, + 8066: 0x000063E9, + 8067: 0x000063C9, + 8068: 0x000063C6, + 8069: 0x000063CD, + 8070: 0x000063D2, + 8071: 0x000063E3, + 8072: 0x000063D0, + 8073: 0x000063E1, + 8074: 0x000063D6, + 8075: 0x000063ED, + 8076: 0x000063EE, + 8077: 0x00006376, + 8078: 0x000063F4, + 8079: 0x000063EA, + 8080: 0x000063DB, + 8081: 0x00006452, + 8082: 0x000063DA, + 8083: 0x000063F9, + 8084: 0x0000655E, + 8085: 0x00006566, + 8086: 0x00006562, + 8087: 0x00006563, + 8088: 0x00006591, + 8089: 0x00006590, + 8090: 0x000065AF, + 8091: 0x0000666E, + 8092: 0x00006670, + 8093: 0x00006674, + 8094: 0x00006676, + 8095: 0x0000666F, + 8096: 0x00006691, + 8097: 0x0000667A, + 8098: 0x0000667E, + 8099: 0x00006677, + 8100: 0x000066FE, + 8101: 0x000066FF, + 8102: 0x0000671F, + 8103: 0x0000671D, + 8104: 0x000068FA, + 8105: 0x000068D5, + 8106: 0x000068E0, + 8107: 0x000068D8, + 8108: 0x000068D7, + 8109: 0x00006905, + 8110: 0x000068DF, + 8111: 0x000068F5, + 8112: 0x000068EE, + 8113: 0x000068E7, + 8114: 0x000068F9, + 8115: 0x000068D2, + 8116: 0x000068F2, + 8117: 0x000068E3, + 8118: 0x000068CB, + 8119: 0x000068CD, + 8120: 0x0000690D, + 8121: 0x00006912, + 8122: 0x0000690E, + 8123: 0x000068C9, + 8124: 0x000068DA, + 8125: 0x0000696E, + 8126: 0x000068FB, + 8127: 0x00006B3E, + 8128: 0x00006B3A, + 8129: 0x00006B3D, + 8130: 0x00006B98, + 8131: 0x00006B96, + 8132: 0x00006BBC, + 8133: 0x00006BEF, + 8134: 0x00006C2E, + 8135: 0x00006C2F, + 8136: 0x00006C2C, + 8137: 0x00006E2F, + 8138: 0x00006E38, + 8139: 0x00006E54, + 8140: 0x00006E21, + 8141: 0x00006E32, + 8142: 0x00006E67, + 8143: 0x00006E4A, + 8144: 0x00006E20, + 8145: 0x00006E25, + 8146: 0x00006E23, + 8147: 0x00006E1B, + 8148: 0x00006E5B, + 8149: 0x00006E58, + 8150: 0x00006E24, + 8151: 0x00006E56, + 8152: 0x00006E6E, + 8153: 0x00006E2D, + 8154: 0x00006E26, + 8155: 0x00006E6F, + 8156: 0x00006E34, + 8157: 0x00006E4D, + 8158: 0x00006E3A, + 8159: 0x00006E2C, + 8160: 0x00006E43, + 8161: 0x00006E1D, + 8162: 0x00006E3E, + 8163: 0x00006ECB, + 8164: 0x00006E89, + 8165: 0x00006E19, + 8166: 0x00006E4E, + 8167: 0x00006E63, + 8168: 0x00006E44, + 8169: 0x00006E72, + 8170: 0x00006E69, + 8171: 0x00006E5F, + 8172: 0x00007119, + 8173: 0x0000711A, + 8174: 0x00007126, + 8175: 0x00007130, + 8176: 0x00007121, + 8177: 0x00007136, + 8178: 0x0000716E, + 8179: 0x0000711C, + 8180: 0x0000724C, + 8181: 0x00007284, + 8182: 0x00007280, + 8183: 0x00007336, + 8184: 0x00007325, + 8185: 0x00007334, + 8186: 0x00007329, + 8187: 0x0000743A, + 8188: 0x0000742A, + 8189: 0x00007433, + 8190: 0x00007422, + 8191: 0x00007425, + 8192: 0x00007435, + 8193: 0x00007436, + 8194: 0x00007434, + 8195: 0x0000742F, + 8196: 0x0000741B, + 8197: 0x00007426, + 8198: 0x00007428, + 8199: 0x00007525, + 8200: 0x00007526, + 8201: 0x0000756B, + 8202: 0x0000756A, + 8203: 0x000075E2, + 8204: 0x000075DB, + 8205: 0x000075E3, + 8206: 0x000075D9, + 8207: 0x000075D8, + 8208: 0x000075DE, + 8209: 0x000075E0, + 8210: 0x0000767B, + 8211: 0x0000767C, + 8212: 0x00007696, + 8213: 0x00007693, + 8214: 0x000076B4, + 8215: 0x000076DC, + 8216: 0x0000774F, + 8217: 0x000077ED, + 8218: 0x0000785D, + 8219: 0x0000786C, + 8220: 0x0000786F, + 8221: 0x00007A0D, + 8222: 0x00007A08, + 8223: 0x00007A0B, + 8224: 0x00007A05, + 8225: 0x00007A00, + 8226: 0x00007A98, + 8227: 0x00007A97, + 8228: 0x00007A96, + 8229: 0x00007AE5, + 8230: 0x00007AE3, + 8231: 0x00007B49, + 8232: 0x00007B56, + 8233: 0x00007B46, + 8234: 0x00007B50, + 8235: 0x00007B52, + 8236: 0x00007B54, + 8237: 0x00007B4D, + 8238: 0x00007B4B, + 8239: 0x00007B4F, + 8240: 0x00007B51, + 8241: 0x00007C9F, + 8242: 0x00007CA5, + 8243: 0x00007D5E, + 8244: 0x00007D50, + 8245: 0x00007D68, + 8246: 0x00007D55, + 8247: 0x00007D2B, + 8248: 0x00007D6E, + 8249: 0x00007D72, + 8250: 0x00007D61, + 8251: 0x00007D66, + 8252: 0x00007D62, + 8253: 0x00007D70, + 8254: 0x00007D73, + 8255: 0x00005584, + 8256: 0x00007FD4, + 8257: 0x00007FD5, + 8258: 0x0000800B, + 8259: 0x00008052, + 8260: 0x00008085, + 8261: 0x00008155, + 8262: 0x00008154, + 8263: 0x0000814B, + 8264: 0x00008151, + 8265: 0x0000814E, + 8266: 0x00008139, + 8267: 0x00008146, + 8268: 0x0000813E, + 8269: 0x0000814C, + 8270: 0x00008153, + 8271: 0x00008174, + 8272: 0x00008212, + 8273: 0x0000821C, + 8274: 0x000083E9, + 8275: 0x00008403, + 8276: 0x000083F8, + 8277: 0x0000840D, + 8278: 0x000083E0, + 8279: 0x000083C5, + 8280: 0x0000840B, + 8281: 0x000083C1, + 8282: 0x000083EF, + 8283: 0x000083F1, + 8284: 0x000083F4, + 8285: 0x00008457, + 8286: 0x0000840A, + 8287: 0x000083F0, + 8288: 0x0000840C, + 8289: 0x000083CC, + 8290: 0x000083FD, + 8291: 0x000083F2, + 8292: 0x000083CA, + 8293: 0x00008438, + 8294: 0x0000840E, + 8295: 0x00008404, + 8296: 0x000083DC, + 8297: 0x00008407, + 8298: 0x000083D4, + 8299: 0x000083DF, + 8300: 0x0000865B, + 8301: 0x000086DF, + 8302: 0x000086D9, + 8303: 0x000086ED, + 8304: 0x000086D4, + 8305: 0x000086DB, + 8306: 0x000086E4, + 8307: 0x000086D0, + 8308: 0x000086DE, + 8309: 0x00008857, + 8310: 0x000088C1, + 8311: 0x000088C2, + 8312: 0x000088B1, + 8313: 0x00008983, + 8314: 0x00008996, + 8315: 0x00008A3B, + 8316: 0x00008A60, + 8317: 0x00008A55, + 8318: 0x00008A5E, + 8319: 0x00008A3C, + 8320: 0x00008A41, + 8321: 0x00008A54, + 8322: 0x00008A5B, + 8323: 0x00008A50, + 8324: 0x00008A46, + 8325: 0x00008A34, + 8326: 0x00008A3A, + 8327: 0x00008A36, + 8328: 0x00008A56, + 8329: 0x00008C61, + 8330: 0x00008C82, + 8331: 0x00008CAF, + 8332: 0x00008CBC, + 8333: 0x00008CB3, + 8334: 0x00008CBD, + 8335: 0x00008CC1, + 8336: 0x00008CBB, + 8337: 0x00008CC0, + 8338: 0x00008CB4, + 8339: 0x00008CB7, + 8340: 0x00008CB6, + 8341: 0x00008CBF, + 8342: 0x00008CB8, + 8343: 0x00008D8A, + 8344: 0x00008D85, + 8345: 0x00008D81, + 8346: 0x00008DCE, + 8347: 0x00008DDD, + 8348: 0x00008DCB, + 8349: 0x00008DDA, + 8350: 0x00008DD1, + 8351: 0x00008DCC, + 8352: 0x00008DDB, + 8353: 0x00008DC6, + 8354: 0x00008EFB, + 8355: 0x00008EF8, + 8356: 0x00008EFC, + 8357: 0x00008F9C, + 8358: 0x0000902E, + 8359: 0x00009035, + 8360: 0x00009031, + 8361: 0x00009038, + 8362: 0x00009032, + 8363: 0x00009036, + 8364: 0x00009102, + 8365: 0x000090F5, + 8366: 0x00009109, + 8367: 0x000090FE, + 8368: 0x00009163, + 8369: 0x00009165, + 8370: 0x000091CF, + 8371: 0x00009214, + 8372: 0x00009215, + 8373: 0x00009223, + 8374: 0x00009209, + 8375: 0x0000921E, + 8376: 0x0000920D, + 8377: 0x00009210, + 8378: 0x00009207, + 8379: 0x00009211, + 8380: 0x00009594, + 8381: 0x0000958F, + 8382: 0x0000958B, + 8383: 0x00009591, + 8384: 0x00009593, + 8385: 0x00009592, + 8386: 0x0000958E, + 8387: 0x0000968A, + 8388: 0x0000968E, + 8389: 0x0000968B, + 8390: 0x0000967D, + 8391: 0x00009685, + 8392: 0x00009686, + 8393: 0x0000968D, + 8394: 0x00009672, + 8395: 0x00009684, + 8396: 0x000096C1, + 8397: 0x000096C5, + 8398: 0x000096C4, + 8399: 0x000096C6, + 8400: 0x000096C7, + 8401: 0x000096EF, + 8402: 0x000096F2, + 8403: 0x000097CC, + 8404: 0x00009805, + 8405: 0x00009806, + 8406: 0x00009808, + 8407: 0x000098E7, + 8408: 0x000098EA, + 8409: 0x000098EF, + 8410: 0x000098E9, + 8411: 0x000098F2, + 8412: 0x000098ED, + 8413: 0x000099AE, + 8414: 0x000099AD, + 8415: 0x00009EC3, + 8416: 0x00009ECD, + 8417: 0x00009ED1, + 8418: 0x00004E82, + 8419: 0x000050AD, + 8420: 0x000050B5, + 8421: 0x000050B2, + 8422: 0x000050B3, + 8423: 0x000050C5, + 8424: 0x000050BE, + 8425: 0x000050AC, + 8426: 0x000050B7, + 8427: 0x000050BB, + 8428: 0x000050AF, + 8429: 0x000050C7, + 8430: 0x0000527F, + 8431: 0x00005277, + 8432: 0x0000527D, + 8433: 0x000052DF, + 8434: 0x000052E6, + 8435: 0x000052E4, + 8436: 0x000052E2, + 8437: 0x000052E3, + 8438: 0x0000532F, + 8439: 0x000055DF, + 8440: 0x000055E8, + 8441: 0x000055D3, + 8442: 0x000055E6, + 8443: 0x000055CE, + 8444: 0x000055DC, + 8445: 0x000055C7, + 8446: 0x000055D1, + 8447: 0x000055E3, + 8448: 0x000055E4, + 8449: 0x000055EF, + 8450: 0x000055DA, + 8451: 0x000055E1, + 8452: 0x000055C5, + 8453: 0x000055C6, + 8454: 0x000055E5, + 8455: 0x000055C9, + 8456: 0x00005712, + 8457: 0x00005713, + 8458: 0x0000585E, + 8459: 0x00005851, + 8460: 0x00005858, + 8461: 0x00005857, + 8462: 0x0000585A, + 8463: 0x00005854, + 8464: 0x0000586B, + 8465: 0x0000584C, + 8466: 0x0000586D, + 8467: 0x0000584A, + 8468: 0x00005862, + 8469: 0x00005852, + 8470: 0x0000584B, + 8471: 0x00005967, + 8472: 0x00005AC1, + 8473: 0x00005AC9, + 8474: 0x00005ACC, + 8475: 0x00005ABE, + 8476: 0x00005ABD, + 8477: 0x00005ABC, + 8478: 0x00005AB3, + 8479: 0x00005AC2, + 8480: 0x00005AB2, + 8481: 0x00005D69, + 8482: 0x00005D6F, + 8483: 0x00005E4C, + 8484: 0x00005E79, + 8485: 0x00005EC9, + 8486: 0x00005EC8, + 8487: 0x00005F12, + 8488: 0x00005F59, + 8489: 0x00005FAC, + 8490: 0x00005FAE, + 8491: 0x0000611A, + 8492: 0x0000610F, + 8493: 0x00006148, + 8494: 0x0000611F, + 8495: 0x000060F3, + 8496: 0x0000611B, + 8497: 0x000060F9, + 8498: 0x00006101, + 8499: 0x00006108, + 8500: 0x0000614E, + 8501: 0x0000614C, + 8502: 0x00006144, + 8503: 0x0000614D, + 8504: 0x0000613E, + 8505: 0x00006134, + 8506: 0x00006127, + 8507: 0x0000610D, + 8508: 0x00006106, + 8509: 0x00006137, + 8510: 0x00006221, + 8511: 0x00006222, + 8512: 0x00006413, + 8513: 0x0000643E, + 8514: 0x0000641E, + 8515: 0x0000642A, + 8516: 0x0000642D, + 8517: 0x0000643D, + 8518: 0x0000642C, + 8519: 0x0000640F, + 8520: 0x0000641C, + 8521: 0x00006414, + 8522: 0x0000640D, + 8523: 0x00006436, + 8524: 0x00006416, + 8525: 0x00006417, + 8526: 0x00006406, + 8527: 0x0000656C, + 8528: 0x0000659F, + 8529: 0x000065B0, + 8530: 0x00006697, + 8531: 0x00006689, + 8532: 0x00006687, + 8533: 0x00006688, + 8534: 0x00006696, + 8535: 0x00006684, + 8536: 0x00006698, + 8537: 0x0000668D, + 8538: 0x00006703, + 8539: 0x00006994, + 8540: 0x0000696D, + 8541: 0x0000695A, + 8542: 0x00006977, + 8543: 0x00006960, + 8544: 0x00006954, + 8545: 0x00006975, + 8546: 0x00006930, + 8547: 0x00006982, + 8548: 0x0000694A, + 8549: 0x00006968, + 8550: 0x0000696B, + 8551: 0x0000695E, + 8552: 0x00006953, + 8553: 0x00006979, + 8554: 0x00006986, + 8555: 0x0000695D, + 8556: 0x00006963, + 8557: 0x0000695B, + 8558: 0x00006B47, + 8559: 0x00006B72, + 8560: 0x00006BC0, + 8561: 0x00006BBF, + 8562: 0x00006BD3, + 8563: 0x00006BFD, + 8564: 0x00006EA2, + 8565: 0x00006EAF, + 8566: 0x00006ED3, + 8567: 0x00006EB6, + 8568: 0x00006EC2, + 8569: 0x00006E90, + 8570: 0x00006E9D, + 8571: 0x00006EC7, + 8572: 0x00006EC5, + 8573: 0x00006EA5, + 8574: 0x00006E98, + 8575: 0x00006EBC, + 8576: 0x00006EBA, + 8577: 0x00006EAB, + 8578: 0x00006ED1, + 8579: 0x00006E96, + 8580: 0x00006E9C, + 8581: 0x00006EC4, + 8582: 0x00006ED4, + 8583: 0x00006EAA, + 8584: 0x00006EA7, + 8585: 0x00006EB4, + 8586: 0x0000714E, + 8587: 0x00007159, + 8588: 0x00007169, + 8589: 0x00007164, + 8590: 0x00007149, + 8591: 0x00007167, + 8592: 0x0000715C, + 8593: 0x0000716C, + 8594: 0x00007166, + 8595: 0x0000714C, + 8596: 0x00007165, + 8597: 0x0000715E, + 8598: 0x00007146, + 8599: 0x00007168, + 8600: 0x00007156, + 8601: 0x0000723A, + 8602: 0x00007252, + 8603: 0x00007337, + 8604: 0x00007345, + 8605: 0x0000733F, + 8606: 0x0000733E, + 8607: 0x0000746F, + 8608: 0x0000745A, + 8609: 0x00007455, + 8610: 0x0000745F, + 8611: 0x0000745E, + 8612: 0x00007441, + 8613: 0x0000743F, + 8614: 0x00007459, + 8615: 0x0000745B, + 8616: 0x0000745C, + 8617: 0x00007576, + 8618: 0x00007578, + 8619: 0x00007600, + 8620: 0x000075F0, + 8621: 0x00007601, + 8622: 0x000075F2, + 8623: 0x000075F1, + 8624: 0x000075FA, + 8625: 0x000075FF, + 8626: 0x000075F4, + 8627: 0x000075F3, + 8628: 0x000076DE, + 8629: 0x000076DF, + 8630: 0x0000775B, + 8631: 0x0000776B, + 8632: 0x00007766, + 8633: 0x0000775E, + 8634: 0x00007763, + 8635: 0x00007779, + 8636: 0x0000776A, + 8637: 0x0000776C, + 8638: 0x0000775C, + 8639: 0x00007765, + 8640: 0x00007768, + 8641: 0x00007762, + 8642: 0x000077EE, + 8643: 0x0000788E, + 8644: 0x000078B0, + 8645: 0x00007897, + 8646: 0x00007898, + 8647: 0x0000788C, + 8648: 0x00007889, + 8649: 0x0000787C, + 8650: 0x00007891, + 8651: 0x00007893, + 8652: 0x0000787F, + 8653: 0x0000797A, + 8654: 0x0000797F, + 8655: 0x00007981, + 8656: 0x0000842C, + 8657: 0x000079BD, + 8658: 0x00007A1C, + 8659: 0x00007A1A, + 8660: 0x00007A20, + 8661: 0x00007A14, + 8662: 0x00007A1F, + 8663: 0x00007A1E, + 8664: 0x00007A9F, + 8665: 0x00007AA0, + 8666: 0x00007B77, + 8667: 0x00007BC0, + 8668: 0x00007B60, + 8669: 0x00007B6E, + 8670: 0x00007B67, + 8671: 0x00007CB1, + 8672: 0x00007CB3, + 8673: 0x00007CB5, + 8674: 0x00007D93, + 8675: 0x00007D79, + 8676: 0x00007D91, + 8677: 0x00007D81, + 8678: 0x00007D8F, + 8679: 0x00007D5B, + 8680: 0x00007F6E, + 8681: 0x00007F69, + 8682: 0x00007F6A, + 8683: 0x00007F72, + 8684: 0x00007FA9, + 8685: 0x00007FA8, + 8686: 0x00007FA4, + 8687: 0x00008056, + 8688: 0x00008058, + 8689: 0x00008086, + 8690: 0x00008084, + 8691: 0x00008171, + 8692: 0x00008170, + 8693: 0x00008178, + 8694: 0x00008165, + 8695: 0x0000816E, + 8696: 0x00008173, + 8697: 0x0000816B, + 8698: 0x00008179, + 8699: 0x0000817A, + 8700: 0x00008166, + 8701: 0x00008205, + 8702: 0x00008247, + 8703: 0x00008482, + 8704: 0x00008477, + 8705: 0x0000843D, + 8706: 0x00008431, + 8707: 0x00008475, + 8708: 0x00008466, + 8709: 0x0000846B, + 8710: 0x00008449, + 8711: 0x0000846C, + 8712: 0x0000845B, + 8713: 0x0000843C, + 8714: 0x00008435, + 8715: 0x00008461, + 8716: 0x00008463, + 8717: 0x00008469, + 8718: 0x0000846D, + 8719: 0x00008446, + 8720: 0x0000865E, + 8721: 0x0000865C, + 8722: 0x0000865F, + 8723: 0x000086F9, + 8724: 0x00008713, + 8725: 0x00008708, + 8726: 0x00008707, + 8727: 0x00008700, + 8728: 0x000086FE, + 8729: 0x000086FB, + 8730: 0x00008702, + 8731: 0x00008703, + 8732: 0x00008706, + 8733: 0x0000870A, + 8734: 0x00008859, + 8735: 0x000088DF, + 8736: 0x000088D4, + 8737: 0x000088D9, + 8738: 0x000088DC, + 8739: 0x000088D8, + 8740: 0x000088DD, + 8741: 0x000088E1, + 8742: 0x000088CA, + 8743: 0x000088D5, + 8744: 0x000088D2, + 8745: 0x0000899C, + 8746: 0x000089E3, + 8747: 0x00008A6B, + 8748: 0x00008A72, + 8749: 0x00008A73, + 8750: 0x00008A66, + 8751: 0x00008A69, + 8752: 0x00008A70, + 8753: 0x00008A87, + 8754: 0x00008A7C, + 8755: 0x00008A63, + 8756: 0x00008AA0, + 8757: 0x00008A71, + 8758: 0x00008A85, + 8759: 0x00008A6D, + 8760: 0x00008A62, + 8761: 0x00008A6E, + 8762: 0x00008A6C, + 8763: 0x00008A79, + 8764: 0x00008A7B, + 8765: 0x00008A3E, + 8766: 0x00008A68, + 8767: 0x00008C62, + 8768: 0x00008C8A, + 8769: 0x00008C89, + 8770: 0x00008CCA, + 8771: 0x00008CC7, + 8772: 0x00008CC8, + 8773: 0x00008CC4, + 8774: 0x00008CB2, + 8775: 0x00008CC3, + 8776: 0x00008CC2, + 8777: 0x00008CC5, + 8778: 0x00008DE1, + 8779: 0x00008DDF, + 8780: 0x00008DE8, + 8781: 0x00008DEF, + 8782: 0x00008DF3, + 8783: 0x00008DFA, + 8784: 0x00008DEA, + 8785: 0x00008DE4, + 8786: 0x00008DE6, + 8787: 0x00008EB2, + 8788: 0x00008F03, + 8789: 0x00008F09, + 8790: 0x00008EFE, + 8791: 0x00008F0A, + 8792: 0x00008F9F, + 8793: 0x00008FB2, + 8794: 0x0000904B, + 8795: 0x0000904A, + 8796: 0x00009053, + 8797: 0x00009042, + 8798: 0x00009054, + 8799: 0x0000903C, + 8800: 0x00009055, + 8801: 0x00009050, + 8802: 0x00009047, + 8803: 0x0000904F, + 8804: 0x0000904E, + 8805: 0x0000904D, + 8806: 0x00009051, + 8807: 0x0000903E, + 8808: 0x00009041, + 8809: 0x00009112, + 8810: 0x00009117, + 8811: 0x0000916C, + 8812: 0x0000916A, + 8813: 0x00009169, + 8814: 0x000091C9, + 8815: 0x00009237, + 8816: 0x00009257, + 8817: 0x00009238, + 8818: 0x0000923D, + 8819: 0x00009240, + 8820: 0x0000923E, + 8821: 0x0000925B, + 8822: 0x0000924B, + 8823: 0x00009264, + 8824: 0x00009251, + 8825: 0x00009234, + 8826: 0x00009249, + 8827: 0x0000924D, + 8828: 0x00009245, + 8829: 0x00009239, + 8830: 0x0000923F, + 8831: 0x0000925A, + 8832: 0x00009598, + 8833: 0x00009698, + 8834: 0x00009694, + 8835: 0x00009695, + 8836: 0x000096CD, + 8837: 0x000096CB, + 8838: 0x000096C9, + 8839: 0x000096CA, + 8840: 0x000096F7, + 8841: 0x000096FB, + 8842: 0x000096F9, + 8843: 0x000096F6, + 8844: 0x00009756, + 8845: 0x00009774, + 8846: 0x00009776, + 8847: 0x00009810, + 8848: 0x00009811, + 8849: 0x00009813, + 8850: 0x0000980A, + 8851: 0x00009812, + 8852: 0x0000980C, + 8853: 0x000098FC, + 8854: 0x000098F4, + 8855: 0x000098FD, + 8856: 0x000098FE, + 8857: 0x000099B3, + 8858: 0x000099B1, + 8859: 0x000099B4, + 8860: 0x00009AE1, + 8861: 0x00009CE9, + 8862: 0x00009E82, + 8863: 0x00009F0E, + 8864: 0x00009F13, + 8865: 0x00009F20, + 8866: 0x000050E7, + 8867: 0x000050EE, + 8868: 0x000050E5, + 8869: 0x000050D6, + 8870: 0x000050ED, + 8871: 0x000050DA, + 8872: 0x000050D5, + 8873: 0x000050CF, + 8874: 0x000050D1, + 8875: 0x000050F1, + 8876: 0x000050CE, + 8877: 0x000050E9, + 8878: 0x00005162, + 8879: 0x000051F3, + 8880: 0x00005283, + 8881: 0x00005282, + 8882: 0x00005331, + 8883: 0x000053AD, + 8884: 0x000055FE, + 8885: 0x00005600, + 8886: 0x0000561B, + 8887: 0x00005617, + 8888: 0x000055FD, + 8889: 0x00005614, + 8890: 0x00005606, + 8891: 0x00005609, + 8892: 0x0000560D, + 8893: 0x0000560E, + 8894: 0x000055F7, + 8895: 0x00005616, + 8896: 0x0000561F, + 8897: 0x00005608, + 8898: 0x00005610, + 8899: 0x000055F6, + 8900: 0x00005718, + 8901: 0x00005716, + 8902: 0x00005875, + 8903: 0x0000587E, + 8904: 0x00005883, + 8905: 0x00005893, + 8906: 0x0000588A, + 8907: 0x00005879, + 8908: 0x00005885, + 8909: 0x0000587D, + 8910: 0x000058FD, + 8911: 0x00005925, + 8912: 0x00005922, + 8913: 0x00005924, + 8914: 0x0000596A, + 8915: 0x00005969, + 8916: 0x00005AE1, + 8917: 0x00005AE6, + 8918: 0x00005AE9, + 8919: 0x00005AD7, + 8920: 0x00005AD6, + 8921: 0x00005AD8, + 8922: 0x00005AE3, + 8923: 0x00005B75, + 8924: 0x00005BDE, + 8925: 0x00005BE7, + 8926: 0x00005BE1, + 8927: 0x00005BE5, + 8928: 0x00005BE6, + 8929: 0x00005BE8, + 8930: 0x00005BE2, + 8931: 0x00005BE4, + 8932: 0x00005BDF, + 8933: 0x00005C0D, + 8934: 0x00005C62, + 8935: 0x00005D84, + 8936: 0x00005D87, + 8937: 0x00005E5B, + 8938: 0x00005E63, + 8939: 0x00005E55, + 8940: 0x00005E57, + 8941: 0x00005E54, + 8942: 0x00005ED3, + 8943: 0x00005ED6, + 8944: 0x00005F0A, + 8945: 0x00005F46, + 8946: 0x00005F70, + 8947: 0x00005FB9, + 8948: 0x00006147, + 8949: 0x0000613F, + 8950: 0x0000614B, + 8951: 0x00006177, + 8952: 0x00006162, + 8953: 0x00006163, + 8954: 0x0000615F, + 8955: 0x0000615A, + 8956: 0x00006158, + 8957: 0x00006175, + 8958: 0x0000622A, + 8959: 0x00006487, + 8960: 0x00006458, + 8961: 0x00006454, + 8962: 0x000064A4, + 8963: 0x00006478, + 8964: 0x0000645F, + 8965: 0x0000647A, + 8966: 0x00006451, + 8967: 0x00006467, + 8968: 0x00006434, + 8969: 0x0000646D, + 8970: 0x0000647B, + 8971: 0x00006572, + 8972: 0x000065A1, + 8973: 0x000065D7, + 8974: 0x000065D6, + 8975: 0x000066A2, + 8976: 0x000066A8, + 8977: 0x0000669D, + 8978: 0x0000699C, + 8979: 0x000069A8, + 8980: 0x00006995, + 8981: 0x000069C1, + 8982: 0x000069AE, + 8983: 0x000069D3, + 8984: 0x000069CB, + 8985: 0x0000699B, + 8986: 0x000069B7, + 8987: 0x000069BB, + 8988: 0x000069AB, + 8989: 0x000069B4, + 8990: 0x000069D0, + 8991: 0x000069CD, + 8992: 0x000069AD, + 8993: 0x000069CC, + 8994: 0x000069A6, + 8995: 0x000069C3, + 8996: 0x000069A3, + 8997: 0x00006B49, + 8998: 0x00006B4C, + 8999: 0x00006C33, + 9000: 0x00006F33, + 9001: 0x00006F14, + 9002: 0x00006EFE, + 9003: 0x00006F13, + 9004: 0x00006EF4, + 9005: 0x00006F29, + 9006: 0x00006F3E, + 9007: 0x00006F20, + 9008: 0x00006F2C, + 9009: 0x00006F0F, + 9010: 0x00006F02, + 9011: 0x00006F22, + 9012: 0x00006EFF, + 9013: 0x00006EEF, + 9014: 0x00006F06, + 9015: 0x00006F31, + 9016: 0x00006F38, + 9017: 0x00006F32, + 9018: 0x00006F23, + 9019: 0x00006F15, + 9020: 0x00006F2B, + 9021: 0x00006F2F, + 9022: 0x00006F88, + 9023: 0x00006F2A, + 9024: 0x00006EEC, + 9025: 0x00006F01, + 9026: 0x00006EF2, + 9027: 0x00006ECC, + 9028: 0x00006EF7, + 9029: 0x00007194, + 9030: 0x00007199, + 9031: 0x0000717D, + 9032: 0x0000718A, + 9033: 0x00007184, + 9034: 0x00007192, + 9035: 0x0000723E, + 9036: 0x00007292, + 9037: 0x00007296, + 9038: 0x00007344, + 9039: 0x00007350, + 9040: 0x00007464, + 9041: 0x00007463, + 9042: 0x0000746A, + 9043: 0x00007470, + 9044: 0x0000746D, + 9045: 0x00007504, + 9046: 0x00007591, + 9047: 0x00007627, + 9048: 0x0000760D, + 9049: 0x0000760B, + 9050: 0x00007609, + 9051: 0x00007613, + 9052: 0x000076E1, + 9053: 0x000076E3, + 9054: 0x00007784, + 9055: 0x0000777D, + 9056: 0x0000777F, + 9057: 0x00007761, + 9058: 0x000078C1, + 9059: 0x0000789F, + 9060: 0x000078A7, + 9061: 0x000078B3, + 9062: 0x000078A9, + 9063: 0x000078A3, + 9064: 0x0000798E, + 9065: 0x0000798F, + 9066: 0x0000798D, + 9067: 0x00007A2E, + 9068: 0x00007A31, + 9069: 0x00007AAA, + 9070: 0x00007AA9, + 9071: 0x00007AED, + 9072: 0x00007AEF, + 9073: 0x00007BA1, + 9074: 0x00007B95, + 9075: 0x00007B8B, + 9076: 0x00007B75, + 9077: 0x00007B97, + 9078: 0x00007B9D, + 9079: 0x00007B94, + 9080: 0x00007B8F, + 9081: 0x00007BB8, + 9082: 0x00007B87, + 9083: 0x00007B84, + 9084: 0x00007CB9, + 9085: 0x00007CBD, + 9086: 0x00007CBE, + 9087: 0x00007DBB, + 9088: 0x00007DB0, + 9089: 0x00007D9C, + 9090: 0x00007DBD, + 9091: 0x00007DBE, + 9092: 0x00007DA0, + 9093: 0x00007DCA, + 9094: 0x00007DB4, + 9095: 0x00007DB2, + 9096: 0x00007DB1, + 9097: 0x00007DBA, + 9098: 0x00007DA2, + 9099: 0x00007DBF, + 9100: 0x00007DB5, + 9101: 0x00007DB8, + 9102: 0x00007DAD, + 9103: 0x00007DD2, + 9104: 0x00007DC7, + 9105: 0x00007DAC, + 9106: 0x00007F70, + 9107: 0x00007FE0, + 9108: 0x00007FE1, + 9109: 0x00007FDF, + 9110: 0x0000805E, + 9111: 0x0000805A, + 9112: 0x00008087, + 9113: 0x00008150, + 9114: 0x00008180, + 9115: 0x0000818F, + 9116: 0x00008188, + 9117: 0x0000818A, + 9118: 0x0000817F, + 9119: 0x00008182, + 9120: 0x000081E7, + 9121: 0x000081FA, + 9122: 0x00008207, + 9123: 0x00008214, + 9124: 0x0000821E, + 9125: 0x0000824B, + 9126: 0x000084C9, + 9127: 0x000084BF, + 9128: 0x000084C6, + 9129: 0x000084C4, + 9130: 0x00008499, + 9131: 0x0000849E, + 9132: 0x000084B2, + 9133: 0x0000849C, + 9134: 0x000084CB, + 9135: 0x000084B8, + 9136: 0x000084C0, + 9137: 0x000084D3, + 9138: 0x00008490, + 9139: 0x000084BC, + 9140: 0x000084D1, + 9141: 0x000084CA, + 9142: 0x0000873F, + 9143: 0x0000871C, + 9144: 0x0000873B, + 9145: 0x00008722, + 9146: 0x00008725, + 9147: 0x00008734, + 9148: 0x00008718, + 9149: 0x00008755, + 9150: 0x00008737, + 9151: 0x00008729, + 9152: 0x000088F3, + 9153: 0x00008902, + 9154: 0x000088F4, + 9155: 0x000088F9, + 9156: 0x000088F8, + 9157: 0x000088FD, + 9158: 0x000088E8, + 9159: 0x0000891A, + 9160: 0x000088EF, + 9161: 0x00008AA6, + 9162: 0x00008A8C, + 9163: 0x00008A9E, + 9164: 0x00008AA3, + 9165: 0x00008A8D, + 9166: 0x00008AA1, + 9167: 0x00008A93, + 9168: 0x00008AA4, + 9169: 0x00008AAA, + 9170: 0x00008AA5, + 9171: 0x00008AA8, + 9172: 0x00008A98, + 9173: 0x00008A91, + 9174: 0x00008A9A, + 9175: 0x00008AA7, + 9176: 0x00008C6A, + 9177: 0x00008C8D, + 9178: 0x00008C8C, + 9179: 0x00008CD3, + 9180: 0x00008CD1, + 9181: 0x00008CD2, + 9182: 0x00008D6B, + 9183: 0x00008D99, + 9184: 0x00008D95, + 9185: 0x00008DFC, + 9186: 0x00008F14, + 9187: 0x00008F12, + 9188: 0x00008F15, + 9189: 0x00008F13, + 9190: 0x00008FA3, + 9191: 0x00009060, + 9192: 0x00009058, + 9193: 0x0000905C, + 9194: 0x00009063, + 9195: 0x00009059, + 9196: 0x0000905E, + 9197: 0x00009062, + 9198: 0x0000905D, + 9199: 0x0000905B, + 9200: 0x00009119, + 9201: 0x00009118, + 9202: 0x0000911E, + 9203: 0x00009175, + 9204: 0x00009178, + 9205: 0x00009177, + 9206: 0x00009174, + 9207: 0x00009278, + 9208: 0x00009280, + 9209: 0x00009285, + 9210: 0x00009298, + 9211: 0x00009296, + 9212: 0x0000927B, + 9213: 0x00009293, + 9214: 0x0000929C, + 9215: 0x000092A8, + 9216: 0x0000927C, + 9217: 0x00009291, + 9218: 0x000095A1, + 9219: 0x000095A8, + 9220: 0x000095A9, + 9221: 0x000095A3, + 9222: 0x000095A5, + 9223: 0x000095A4, + 9224: 0x00009699, + 9225: 0x0000969C, + 9226: 0x0000969B, + 9227: 0x000096CC, + 9228: 0x000096D2, + 9229: 0x00009700, + 9230: 0x0000977C, + 9231: 0x00009785, + 9232: 0x000097F6, + 9233: 0x00009817, + 9234: 0x00009818, + 9235: 0x000098AF, + 9236: 0x000098B1, + 9237: 0x00009903, + 9238: 0x00009905, + 9239: 0x0000990C, + 9240: 0x00009909, + 9241: 0x000099C1, + 9242: 0x00009AAF, + 9243: 0x00009AB0, + 9244: 0x00009AE6, + 9245: 0x00009B41, + 9246: 0x00009B42, + 9247: 0x00009CF4, + 9248: 0x00009CF6, + 9249: 0x00009CF3, + 9250: 0x00009EBC, + 9251: 0x00009F3B, + 9252: 0x00009F4A, + 9253: 0x00005104, + 9254: 0x00005100, + 9255: 0x000050FB, + 9256: 0x000050F5, + 9257: 0x000050F9, + 9258: 0x00005102, + 9259: 0x00005108, + 9260: 0x00005109, + 9261: 0x00005105, + 9262: 0x000051DC, + 9263: 0x00005287, + 9264: 0x00005288, + 9265: 0x00005289, + 9266: 0x0000528D, + 9267: 0x0000528A, + 9268: 0x000052F0, + 9269: 0x000053B2, + 9270: 0x0000562E, + 9271: 0x0000563B, + 9272: 0x00005639, + 9273: 0x00005632, + 9274: 0x0000563F, + 9275: 0x00005634, + 9276: 0x00005629, + 9277: 0x00005653, + 9278: 0x0000564E, + 9279: 0x00005657, + 9280: 0x00005674, + 9281: 0x00005636, + 9282: 0x0000562F, + 9283: 0x00005630, + 9284: 0x00005880, + 9285: 0x0000589F, + 9286: 0x0000589E, + 9287: 0x000058B3, + 9288: 0x0000589C, + 9289: 0x000058AE, + 9290: 0x000058A9, + 9291: 0x000058A6, + 9292: 0x0000596D, + 9293: 0x00005B09, + 9294: 0x00005AFB, + 9295: 0x00005B0B, + 9296: 0x00005AF5, + 9297: 0x00005B0C, + 9298: 0x00005B08, + 9299: 0x00005BEE, + 9300: 0x00005BEC, + 9301: 0x00005BE9, + 9302: 0x00005BEB, + 9303: 0x00005C64, + 9304: 0x00005C65, + 9305: 0x00005D9D, + 9306: 0x00005D94, + 9307: 0x00005E62, + 9308: 0x00005E5F, + 9309: 0x00005E61, + 9310: 0x00005EE2, + 9311: 0x00005EDA, + 9312: 0x00005EDF, + 9313: 0x00005EDD, + 9314: 0x00005EE3, + 9315: 0x00005EE0, + 9316: 0x00005F48, + 9317: 0x00005F71, + 9318: 0x00005FB7, + 9319: 0x00005FB5, + 9320: 0x00006176, + 9321: 0x00006167, + 9322: 0x0000616E, + 9323: 0x0000615D, + 9324: 0x00006155, + 9325: 0x00006182, + 9326: 0x0000617C, + 9327: 0x00006170, + 9328: 0x0000616B, + 9329: 0x0000617E, + 9330: 0x000061A7, + 9331: 0x00006190, + 9332: 0x000061AB, + 9333: 0x0000618E, + 9334: 0x000061AC, + 9335: 0x0000619A, + 9336: 0x000061A4, + 9337: 0x00006194, + 9338: 0x000061AE, + 9339: 0x0000622E, + 9340: 0x00006469, + 9341: 0x0000646F, + 9342: 0x00006479, + 9343: 0x0000649E, + 9344: 0x000064B2, + 9345: 0x00006488, + 9346: 0x00006490, + 9347: 0x000064B0, + 9348: 0x000064A5, + 9349: 0x00006493, + 9350: 0x00006495, + 9351: 0x000064A9, + 9352: 0x00006492, + 9353: 0x000064AE, + 9354: 0x000064AD, + 9355: 0x000064AB, + 9356: 0x0000649A, + 9357: 0x000064AC, + 9358: 0x00006499, + 9359: 0x000064A2, + 9360: 0x000064B3, + 9361: 0x00006575, + 9362: 0x00006577, + 9363: 0x00006578, + 9364: 0x000066AE, + 9365: 0x000066AB, + 9366: 0x000066B4, + 9367: 0x000066B1, + 9368: 0x00006A23, + 9369: 0x00006A1F, + 9370: 0x000069E8, + 9371: 0x00006A01, + 9372: 0x00006A1E, + 9373: 0x00006A19, + 9374: 0x000069FD, + 9375: 0x00006A21, + 9376: 0x00006A13, + 9377: 0x00006A0A, + 9378: 0x000069F3, + 9379: 0x00006A02, + 9380: 0x00006A05, + 9381: 0x000069ED, + 9382: 0x00006A11, + 9383: 0x00006B50, + 9384: 0x00006B4E, + 9385: 0x00006BA4, + 9386: 0x00006BC5, + 9387: 0x00006BC6, + 9388: 0x00006F3F, + 9389: 0x00006F7C, + 9390: 0x00006F84, + 9391: 0x00006F51, + 9392: 0x00006F66, + 9393: 0x00006F54, + 9394: 0x00006F86, + 9395: 0x00006F6D, + 9396: 0x00006F5B, + 9397: 0x00006F78, + 9398: 0x00006F6E, + 9399: 0x00006F8E, + 9400: 0x00006F7A, + 9401: 0x00006F70, + 9402: 0x00006F64, + 9403: 0x00006F97, + 9404: 0x00006F58, + 9405: 0x00006ED5, + 9406: 0x00006F6F, + 9407: 0x00006F60, + 9408: 0x00006F5F, + 9409: 0x0000719F, + 9410: 0x000071AC, + 9411: 0x000071B1, + 9412: 0x000071A8, + 9413: 0x00007256, + 9414: 0x0000729B, + 9415: 0x0000734E, + 9416: 0x00007357, + 9417: 0x00007469, + 9418: 0x0000748B, + 9419: 0x00007483, + 9420: 0x0000747E, + 9421: 0x00007480, + 9422: 0x0000757F, + 9423: 0x00007620, + 9424: 0x00007629, + 9425: 0x0000761F, + 9426: 0x00007624, + 9427: 0x00007626, + 9428: 0x00007621, + 9429: 0x00007622, + 9430: 0x0000769A, + 9431: 0x000076BA, + 9432: 0x000076E4, + 9433: 0x0000778E, + 9434: 0x00007787, + 9435: 0x0000778C, + 9436: 0x00007791, + 9437: 0x0000778B, + 9438: 0x000078CB, + 9439: 0x000078C5, + 9440: 0x000078BA, + 9441: 0x000078CA, + 9442: 0x000078BE, + 9443: 0x000078D5, + 9444: 0x000078BC, + 9445: 0x000078D0, + 9446: 0x00007A3F, + 9447: 0x00007A3C, + 9448: 0x00007A40, + 9449: 0x00007A3D, + 9450: 0x00007A37, + 9451: 0x00007A3B, + 9452: 0x00007AAF, + 9453: 0x00007AAE, + 9454: 0x00007BAD, + 9455: 0x00007BB1, + 9456: 0x00007BC4, + 9457: 0x00007BB4, + 9458: 0x00007BC6, + 9459: 0x00007BC7, + 9460: 0x00007BC1, + 9461: 0x00007BA0, + 9462: 0x00007BCC, + 9463: 0x00007CCA, + 9464: 0x00007DE0, + 9465: 0x00007DF4, + 9466: 0x00007DEF, + 9467: 0x00007DFB, + 9468: 0x00007DD8, + 9469: 0x00007DEC, + 9470: 0x00007DDD, + 9471: 0x00007DE8, + 9472: 0x00007DE3, + 9473: 0x00007DDA, + 9474: 0x00007DDE, + 9475: 0x00007DE9, + 9476: 0x00007D9E, + 9477: 0x00007DD9, + 9478: 0x00007DF2, + 9479: 0x00007DF9, + 9480: 0x00007F75, + 9481: 0x00007F77, + 9482: 0x00007FAF, + 9483: 0x00007FE9, + 9484: 0x00008026, + 9485: 0x0000819B, + 9486: 0x0000819C, + 9487: 0x0000819D, + 9488: 0x000081A0, + 9489: 0x0000819A, + 9490: 0x00008198, + 9491: 0x00008517, + 9492: 0x0000853D, + 9493: 0x0000851A, + 9494: 0x000084EE, + 9495: 0x0000852C, + 9496: 0x0000852D, + 9497: 0x00008513, + 9498: 0x00008511, + 9499: 0x00008523, + 9500: 0x00008521, + 9501: 0x00008514, + 9502: 0x000084EC, + 9503: 0x00008525, + 9504: 0x000084FF, + 9505: 0x00008506, + 9506: 0x00008782, + 9507: 0x00008774, + 9508: 0x00008776, + 9509: 0x00008760, + 9510: 0x00008766, + 9511: 0x00008778, + 9512: 0x00008768, + 9513: 0x00008759, + 9514: 0x00008757, + 9515: 0x0000874C, + 9516: 0x00008753, + 9517: 0x0000885B, + 9518: 0x0000885D, + 9519: 0x00008910, + 9520: 0x00008907, + 9521: 0x00008912, + 9522: 0x00008913, + 9523: 0x00008915, + 9524: 0x0000890A, + 9525: 0x00008ABC, + 9526: 0x00008AD2, + 9527: 0x00008AC7, + 9528: 0x00008AC4, + 9529: 0x00008A95, + 9530: 0x00008ACB, + 9531: 0x00008AF8, + 9532: 0x00008AB2, + 9533: 0x00008AC9, + 9534: 0x00008AC2, + 9535: 0x00008ABF, + 9536: 0x00008AB0, + 9537: 0x00008AD6, + 9538: 0x00008ACD, + 9539: 0x00008AB6, + 9540: 0x00008AB9, + 9541: 0x00008ADB, + 9542: 0x00008C4C, + 9543: 0x00008C4E, + 9544: 0x00008C6C, + 9545: 0x00008CE0, + 9546: 0x00008CDE, + 9547: 0x00008CE6, + 9548: 0x00008CE4, + 9549: 0x00008CEC, + 9550: 0x00008CED, + 9551: 0x00008CE2, + 9552: 0x00008CE3, + 9553: 0x00008CDC, + 9554: 0x00008CEA, + 9555: 0x00008CE1, + 9556: 0x00008D6D, + 9557: 0x00008D9F, + 9558: 0x00008DA3, + 9559: 0x00008E2B, + 9560: 0x00008E10, + 9561: 0x00008E1D, + 9562: 0x00008E22, + 9563: 0x00008E0F, + 9564: 0x00008E29, + 9565: 0x00008E1F, + 9566: 0x00008E21, + 9567: 0x00008E1E, + 9568: 0x00008EBA, + 9569: 0x00008F1D, + 9570: 0x00008F1B, + 9571: 0x00008F1F, + 9572: 0x00008F29, + 9573: 0x00008F26, + 9574: 0x00008F2A, + 9575: 0x00008F1C, + 9576: 0x00008F1E, + 9577: 0x00008F25, + 9578: 0x00009069, + 9579: 0x0000906E, + 9580: 0x00009068, + 9581: 0x0000906D, + 9582: 0x00009077, + 9583: 0x00009130, + 9584: 0x0000912D, + 9585: 0x00009127, + 9586: 0x00009131, + 9587: 0x00009187, + 9588: 0x00009189, + 9589: 0x0000918B, + 9590: 0x00009183, + 9591: 0x000092C5, + 9592: 0x000092BB, + 9593: 0x000092B7, + 9594: 0x000092EA, + 9595: 0x000092AC, + 9596: 0x000092E4, + 9597: 0x000092C1, + 9598: 0x000092B3, + 9599: 0x000092BC, + 9600: 0x000092D2, + 9601: 0x000092C7, + 9602: 0x000092F0, + 9603: 0x000092B2, + 9604: 0x000095AD, + 9605: 0x000095B1, + 9606: 0x00009704, + 9607: 0x00009706, + 9608: 0x00009707, + 9609: 0x00009709, + 9610: 0x00009760, + 9611: 0x0000978D, + 9612: 0x0000978B, + 9613: 0x0000978F, + 9614: 0x00009821, + 9615: 0x0000982B, + 9616: 0x0000981C, + 9617: 0x000098B3, + 9618: 0x0000990A, + 9619: 0x00009913, + 9620: 0x00009912, + 9621: 0x00009918, + 9622: 0x000099DD, + 9623: 0x000099D0, + 9624: 0x000099DF, + 9625: 0x000099DB, + 9626: 0x000099D1, + 9627: 0x000099D5, + 9628: 0x000099D2, + 9629: 0x000099D9, + 9630: 0x00009AB7, + 9631: 0x00009AEE, + 9632: 0x00009AEF, + 9633: 0x00009B27, + 9634: 0x00009B45, + 9635: 0x00009B44, + 9636: 0x00009B77, + 9637: 0x00009B6F, + 9638: 0x00009D06, + 9639: 0x00009D09, + 9640: 0x00009D03, + 9641: 0x00009EA9, + 9642: 0x00009EBE, + 9643: 0x00009ECE, + 9644: 0x000058A8, + 9645: 0x00009F52, + 9646: 0x00005112, + 9647: 0x00005118, + 9648: 0x00005114, + 9649: 0x00005110, + 9650: 0x00005115, + 9651: 0x00005180, + 9652: 0x000051AA, + 9653: 0x000051DD, + 9654: 0x00005291, + 9655: 0x00005293, + 9656: 0x000052F3, + 9657: 0x00005659, + 9658: 0x0000566B, + 9659: 0x00005679, + 9660: 0x00005669, + 9661: 0x00005664, + 9662: 0x00005678, + 9663: 0x0000566A, + 9664: 0x00005668, + 9665: 0x00005665, + 9666: 0x00005671, + 9667: 0x0000566F, + 9668: 0x0000566C, + 9669: 0x00005662, + 9670: 0x00005676, + 9671: 0x000058C1, + 9672: 0x000058BE, + 9673: 0x000058C7, + 9674: 0x000058C5, + 9675: 0x0000596E, + 9676: 0x00005B1D, + 9677: 0x00005B34, + 9678: 0x00005B78, + 9679: 0x00005BF0, + 9680: 0x00005C0E, + 9681: 0x00005F4A, + 9682: 0x000061B2, + 9683: 0x00006191, + 9684: 0x000061A9, + 9685: 0x0000618A, + 9686: 0x000061CD, + 9687: 0x000061B6, + 9688: 0x000061BE, + 9689: 0x000061CA, + 9690: 0x000061C8, + 9691: 0x00006230, + 9692: 0x000064C5, + 9693: 0x000064C1, + 9694: 0x000064CB, + 9695: 0x000064BB, + 9696: 0x000064BC, + 9697: 0x000064DA, + 9698: 0x000064C4, + 9699: 0x000064C7, + 9700: 0x000064C2, + 9701: 0x000064CD, + 9702: 0x000064BF, + 9703: 0x000064D2, + 9704: 0x000064D4, + 9705: 0x000064BE, + 9706: 0x00006574, + 9707: 0x000066C6, + 9708: 0x000066C9, + 9709: 0x000066B9, + 9710: 0x000066C4, + 9711: 0x000066C7, + 9712: 0x000066B8, + 9713: 0x00006A3D, + 9714: 0x00006A38, + 9715: 0x00006A3A, + 9716: 0x00006A59, + 9717: 0x00006A6B, + 9718: 0x00006A58, + 9719: 0x00006A39, + 9720: 0x00006A44, + 9721: 0x00006A62, + 9722: 0x00006A61, + 9723: 0x00006A4B, + 9724: 0x00006A47, + 9725: 0x00006A35, + 9726: 0x00006A5F, + 9727: 0x00006A48, + 9728: 0x00006B59, + 9729: 0x00006B77, + 9730: 0x00006C05, + 9731: 0x00006FC2, + 9732: 0x00006FB1, + 9733: 0x00006FA1, + 9734: 0x00006FC3, + 9735: 0x00006FA4, + 9736: 0x00006FC1, + 9737: 0x00006FA7, + 9738: 0x00006FB3, + 9739: 0x00006FC0, + 9740: 0x00006FB9, + 9741: 0x00006FB6, + 9742: 0x00006FA6, + 9743: 0x00006FA0, + 9744: 0x00006FB4, + 9745: 0x000071BE, + 9746: 0x000071C9, + 9747: 0x000071D0, + 9748: 0x000071D2, + 9749: 0x000071C8, + 9750: 0x000071D5, + 9751: 0x000071B9, + 9752: 0x000071CE, + 9753: 0x000071D9, + 9754: 0x000071DC, + 9755: 0x000071C3, + 9756: 0x000071C4, + 9757: 0x00007368, + 9758: 0x0000749C, + 9759: 0x000074A3, + 9760: 0x00007498, + 9761: 0x0000749F, + 9762: 0x0000749E, + 9763: 0x000074E2, + 9764: 0x0000750C, + 9765: 0x0000750D, + 9766: 0x00007634, + 9767: 0x00007638, + 9768: 0x0000763A, + 9769: 0x000076E7, + 9770: 0x000076E5, + 9771: 0x000077A0, + 9772: 0x0000779E, + 9773: 0x0000779F, + 9774: 0x000077A5, + 9775: 0x000078E8, + 9776: 0x000078DA, + 9777: 0x000078EC, + 9778: 0x000078E7, + 9779: 0x000079A6, + 9780: 0x00007A4D, + 9781: 0x00007A4E, + 9782: 0x00007A46, + 9783: 0x00007A4C, + 9784: 0x00007A4B, + 9785: 0x00007ABA, + 9786: 0x00007BD9, + 9787: 0x00007C11, + 9788: 0x00007BC9, + 9789: 0x00007BE4, + 9790: 0x00007BDB, + 9791: 0x00007BE1, + 9792: 0x00007BE9, + 9793: 0x00007BE6, + 9794: 0x00007CD5, + 9795: 0x00007CD6, + 9796: 0x00007E0A, + 9797: 0x00007E11, + 9798: 0x00007E08, + 9799: 0x00007E1B, + 9800: 0x00007E23, + 9801: 0x00007E1E, + 9802: 0x00007E1D, + 9803: 0x00007E09, + 9804: 0x00007E10, + 9805: 0x00007F79, + 9806: 0x00007FB2, + 9807: 0x00007FF0, + 9808: 0x00007FF1, + 9809: 0x00007FEE, + 9810: 0x00008028, + 9811: 0x000081B3, + 9812: 0x000081A9, + 9813: 0x000081A8, + 9814: 0x000081FB, + 9815: 0x00008208, + 9816: 0x00008258, + 9817: 0x00008259, + 9818: 0x0000854A, + 9819: 0x00008559, + 9820: 0x00008548, + 9821: 0x00008568, + 9822: 0x00008569, + 9823: 0x00008543, + 9824: 0x00008549, + 9825: 0x0000856D, + 9826: 0x0000856A, + 9827: 0x0000855E, + 9828: 0x00008783, + 9829: 0x0000879F, + 9830: 0x0000879E, + 9831: 0x000087A2, + 9832: 0x0000878D, + 9833: 0x00008861, + 9834: 0x0000892A, + 9835: 0x00008932, + 9836: 0x00008925, + 9837: 0x0000892B, + 9838: 0x00008921, + 9839: 0x000089AA, + 9840: 0x000089A6, + 9841: 0x00008AE6, + 9842: 0x00008AFA, + 9843: 0x00008AEB, + 9844: 0x00008AF1, + 9845: 0x00008B00, + 9846: 0x00008ADC, + 9847: 0x00008AE7, + 9848: 0x00008AEE, + 9849: 0x00008AFE, + 9850: 0x00008B01, + 9851: 0x00008B02, + 9852: 0x00008AF7, + 9853: 0x00008AED, + 9854: 0x00008AF3, + 9855: 0x00008AF6, + 9856: 0x00008AFC, + 9857: 0x00008C6B, + 9858: 0x00008C6D, + 9859: 0x00008C93, + 9860: 0x00008CF4, + 9861: 0x00008E44, + 9862: 0x00008E31, + 9863: 0x00008E34, + 9864: 0x00008E42, + 9865: 0x00008E39, + 9866: 0x00008E35, + 9867: 0x00008F3B, + 9868: 0x00008F2F, + 9869: 0x00008F38, + 9870: 0x00008F33, + 9871: 0x00008FA8, + 9872: 0x00008FA6, + 9873: 0x00009075, + 9874: 0x00009074, + 9875: 0x00009078, + 9876: 0x00009072, + 9877: 0x0000907C, + 9878: 0x0000907A, + 9879: 0x00009134, + 9880: 0x00009192, + 9881: 0x00009320, + 9882: 0x00009336, + 9883: 0x000092F8, + 9884: 0x00009333, + 9885: 0x0000932F, + 9886: 0x00009322, + 9887: 0x000092FC, + 9888: 0x0000932B, + 9889: 0x00009304, + 9890: 0x0000931A, + 9891: 0x00009310, + 9892: 0x00009326, + 9893: 0x00009321, + 9894: 0x00009315, + 9895: 0x0000932E, + 9896: 0x00009319, + 9897: 0x000095BB, + 9898: 0x000096A7, + 9899: 0x000096A8, + 9900: 0x000096AA, + 9901: 0x000096D5, + 9902: 0x0000970E, + 9903: 0x00009711, + 9904: 0x00009716, + 9905: 0x0000970D, + 9906: 0x00009713, + 9907: 0x0000970F, + 9908: 0x0000975B, + 9909: 0x0000975C, + 9910: 0x00009766, + 9911: 0x00009798, + 9912: 0x00009830, + 9913: 0x00009838, + 9914: 0x0000983B, + 9915: 0x00009837, + 9916: 0x0000982D, + 9917: 0x00009839, + 9918: 0x00009824, + 9919: 0x00009910, + 9920: 0x00009928, + 9921: 0x0000991E, + 9922: 0x0000991B, + 9923: 0x00009921, + 9924: 0x0000991A, + 9925: 0x000099ED, + 9926: 0x000099E2, + 9927: 0x000099F1, + 9928: 0x00009AB8, + 9929: 0x00009ABC, + 9930: 0x00009AFB, + 9931: 0x00009AED, + 9932: 0x00009B28, + 9933: 0x00009B91, + 9934: 0x00009D15, + 9935: 0x00009D23, + 9936: 0x00009D26, + 9937: 0x00009D28, + 9938: 0x00009D12, + 9939: 0x00009D1B, + 9940: 0x00009ED8, + 9941: 0x00009ED4, + 9942: 0x00009F8D, + 9943: 0x00009F9C, + 9944: 0x0000512A, + 9945: 0x0000511F, + 9946: 0x00005121, + 9947: 0x00005132, + 9948: 0x000052F5, + 9949: 0x0000568E, + 9950: 0x00005680, + 9951: 0x00005690, + 9952: 0x00005685, + 9953: 0x00005687, + 9954: 0x0000568F, + 9955: 0x000058D5, + 9956: 0x000058D3, + 9957: 0x000058D1, + 9958: 0x000058CE, + 9959: 0x00005B30, + 9960: 0x00005B2A, + 9961: 0x00005B24, + 9962: 0x00005B7A, + 9963: 0x00005C37, + 9964: 0x00005C68, + 9965: 0x00005DBC, + 9966: 0x00005DBA, + 9967: 0x00005DBD, + 9968: 0x00005DB8, + 9969: 0x00005E6B, + 9970: 0x00005F4C, + 9971: 0x00005FBD, + 9972: 0x000061C9, + 9973: 0x000061C2, + 9974: 0x000061C7, + 9975: 0x000061E6, + 9976: 0x000061CB, + 9977: 0x00006232, + 9978: 0x00006234, + 9979: 0x000064CE, + 9980: 0x000064CA, + 9981: 0x000064D8, + 9982: 0x000064E0, + 9983: 0x000064F0, + 9984: 0x000064E6, + 9985: 0x000064EC, + 9986: 0x000064F1, + 9987: 0x000064E2, + 9988: 0x000064ED, + 9989: 0x00006582, + 9990: 0x00006583, + 9991: 0x000066D9, + 9992: 0x000066D6, + 9993: 0x00006A80, + 9994: 0x00006A94, + 9995: 0x00006A84, + 9996: 0x00006AA2, + 9997: 0x00006A9C, + 9998: 0x00006ADB, + 9999: 0x00006AA3, + 10000: 0x00006A7E, + 10001: 0x00006A97, + 10002: 0x00006A90, + 10003: 0x00006AA0, + 10004: 0x00006B5C, + 10005: 0x00006BAE, + 10006: 0x00006BDA, + 10007: 0x00006C08, + 10008: 0x00006FD8, + 10009: 0x00006FF1, + 10010: 0x00006FDF, + 10011: 0x00006FE0, + 10012: 0x00006FDB, + 10013: 0x00006FE4, + 10014: 0x00006FEB, + 10015: 0x00006FEF, + 10016: 0x00006F80, + 10017: 0x00006FEC, + 10018: 0x00006FE1, + 10019: 0x00006FE9, + 10020: 0x00006FD5, + 10021: 0x00006FEE, + 10022: 0x00006FF0, + 10023: 0x000071E7, + 10024: 0x000071DF, + 10025: 0x000071EE, + 10026: 0x000071E6, + 10027: 0x000071E5, + 10028: 0x000071ED, + 10029: 0x000071EC, + 10030: 0x000071F4, + 10031: 0x000071E0, + 10032: 0x00007235, + 10033: 0x00007246, + 10034: 0x00007370, + 10035: 0x00007372, + 10036: 0x000074A9, + 10037: 0x000074B0, + 10038: 0x000074A6, + 10039: 0x000074A8, + 10040: 0x00007646, + 10041: 0x00007642, + 10042: 0x0000764C, + 10043: 0x000076EA, + 10044: 0x000077B3, + 10045: 0x000077AA, + 10046: 0x000077B0, + 10047: 0x000077AC, + 10048: 0x000077A7, + 10049: 0x000077AD, + 10050: 0x000077EF, + 10051: 0x000078F7, + 10052: 0x000078FA, + 10053: 0x000078F4, + 10054: 0x000078EF, + 10055: 0x00007901, + 10056: 0x000079A7, + 10057: 0x000079AA, + 10058: 0x00007A57, + 10059: 0x00007ABF, + 10060: 0x00007C07, + 10061: 0x00007C0D, + 10062: 0x00007BFE, + 10063: 0x00007BF7, + 10064: 0x00007C0C, + 10065: 0x00007BE0, + 10066: 0x00007CE0, + 10067: 0x00007CDC, + 10068: 0x00007CDE, + 10069: 0x00007CE2, + 10070: 0x00007CDF, + 10071: 0x00007CD9, + 10072: 0x00007CDD, + 10073: 0x00007E2E, + 10074: 0x00007E3E, + 10075: 0x00007E46, + 10076: 0x00007E37, + 10077: 0x00007E32, + 10078: 0x00007E43, + 10079: 0x00007E2B, + 10080: 0x00007E3D, + 10081: 0x00007E31, + 10082: 0x00007E45, + 10083: 0x00007E41, + 10084: 0x00007E34, + 10085: 0x00007E39, + 10086: 0x00007E48, + 10087: 0x00007E35, + 10088: 0x00007E3F, + 10089: 0x00007E2F, + 10090: 0x00007F44, + 10091: 0x00007FF3, + 10092: 0x00007FFC, + 10093: 0x00008071, + 10094: 0x00008072, + 10095: 0x00008070, + 10096: 0x0000806F, + 10097: 0x00008073, + 10098: 0x000081C6, + 10099: 0x000081C3, + 10100: 0x000081BA, + 10101: 0x000081C2, + 10102: 0x000081C0, + 10103: 0x000081BF, + 10104: 0x000081BD, + 10105: 0x000081C9, + 10106: 0x000081BE, + 10107: 0x000081E8, + 10108: 0x00008209, + 10109: 0x00008271, + 10110: 0x000085AA, + 10111: 0x00008584, + 10112: 0x0000857E, + 10113: 0x0000859C, + 10114: 0x00008591, + 10115: 0x00008594, + 10116: 0x000085AF, + 10117: 0x0000859B, + 10118: 0x00008587, + 10119: 0x000085A8, + 10120: 0x0000858A, + 10121: 0x00008667, + 10122: 0x000087C0, + 10123: 0x000087D1, + 10124: 0x000087B3, + 10125: 0x000087D2, + 10126: 0x000087C6, + 10127: 0x000087AB, + 10128: 0x000087BB, + 10129: 0x000087BA, + 10130: 0x000087C8, + 10131: 0x000087CB, + 10132: 0x0000893B, + 10133: 0x00008936, + 10134: 0x00008944, + 10135: 0x00008938, + 10136: 0x0000893D, + 10137: 0x000089AC, + 10138: 0x00008B0E, + 10139: 0x00008B17, + 10140: 0x00008B19, + 10141: 0x00008B1B, + 10142: 0x00008B0A, + 10143: 0x00008B20, + 10144: 0x00008B1D, + 10145: 0x00008B04, + 10146: 0x00008B10, + 10147: 0x00008C41, + 10148: 0x00008C3F, + 10149: 0x00008C73, + 10150: 0x00008CFA, + 10151: 0x00008CFD, + 10152: 0x00008CFC, + 10153: 0x00008CF8, + 10154: 0x00008CFB, + 10155: 0x00008DA8, + 10156: 0x00008E49, + 10157: 0x00008E4B, + 10158: 0x00008E48, + 10159: 0x00008E4A, + 10160: 0x00008F44, + 10161: 0x00008F3E, + 10162: 0x00008F42, + 10163: 0x00008F45, + 10164: 0x00008F3F, + 10165: 0x0000907F, + 10166: 0x0000907D, + 10167: 0x00009084, + 10168: 0x00009081, + 10169: 0x00009082, + 10170: 0x00009080, + 10171: 0x00009139, + 10172: 0x000091A3, + 10173: 0x0000919E, + 10174: 0x0000919C, + 10175: 0x0000934D, + 10176: 0x00009382, + 10177: 0x00009328, + 10178: 0x00009375, + 10179: 0x0000934A, + 10180: 0x00009365, + 10181: 0x0000934B, + 10182: 0x00009318, + 10183: 0x0000937E, + 10184: 0x0000936C, + 10185: 0x0000935B, + 10186: 0x00009370, + 10187: 0x0000935A, + 10188: 0x00009354, + 10189: 0x000095CA, + 10190: 0x000095CB, + 10191: 0x000095CC, + 10192: 0x000095C8, + 10193: 0x000095C6, + 10194: 0x000096B1, + 10195: 0x000096B8, + 10196: 0x000096D6, + 10197: 0x0000971C, + 10198: 0x0000971E, + 10199: 0x000097A0, + 10200: 0x000097D3, + 10201: 0x00009846, + 10202: 0x000098B6, + 10203: 0x00009935, + 10204: 0x00009A01, + 10205: 0x000099FF, + 10206: 0x00009BAE, + 10207: 0x00009BAB, + 10208: 0x00009BAA, + 10209: 0x00009BAD, + 10210: 0x00009D3B, + 10211: 0x00009D3F, + 10212: 0x00009E8B, + 10213: 0x00009ECF, + 10214: 0x00009EDE, + 10215: 0x00009EDC, + 10216: 0x00009EDD, + 10217: 0x00009EDB, + 10218: 0x00009F3E, + 10219: 0x00009F4B, + 10220: 0x000053E2, + 10221: 0x00005695, + 10222: 0x000056AE, + 10223: 0x000058D9, + 10224: 0x000058D8, + 10225: 0x00005B38, + 10226: 0x00005F5D, + 10227: 0x000061E3, + 10228: 0x00006233, + 10229: 0x000064F4, + 10230: 0x000064F2, + 10231: 0x000064FE, + 10232: 0x00006506, + 10233: 0x000064FA, + 10234: 0x000064FB, + 10235: 0x000064F7, + 10236: 0x000065B7, + 10237: 0x000066DC, + 10238: 0x00006726, + 10239: 0x00006AB3, + 10240: 0x00006AAC, + 10241: 0x00006AC3, + 10242: 0x00006ABB, + 10243: 0x00006AB8, + 10244: 0x00006AC2, + 10245: 0x00006AAE, + 10246: 0x00006AAF, + 10247: 0x00006B5F, + 10248: 0x00006B78, + 10249: 0x00006BAF, + 10250: 0x00007009, + 10251: 0x0000700B, + 10252: 0x00006FFE, + 10253: 0x00007006, + 10254: 0x00006FFA, + 10255: 0x00007011, + 10256: 0x0000700F, + 10257: 0x000071FB, + 10258: 0x000071FC, + 10259: 0x000071FE, + 10260: 0x000071F8, + 10261: 0x00007377, + 10262: 0x00007375, + 10263: 0x000074A7, + 10264: 0x000074BF, + 10265: 0x00007515, + 10266: 0x00007656, + 10267: 0x00007658, + 10268: 0x00007652, + 10269: 0x000077BD, + 10270: 0x000077BF, + 10271: 0x000077BB, + 10272: 0x000077BC, + 10273: 0x0000790E, + 10274: 0x000079AE, + 10275: 0x00007A61, + 10276: 0x00007A62, + 10277: 0x00007A60, + 10278: 0x00007AC4, + 10279: 0x00007AC5, + 10280: 0x00007C2B, + 10281: 0x00007C27, + 10282: 0x00007C2A, + 10283: 0x00007C1E, + 10284: 0x00007C23, + 10285: 0x00007C21, + 10286: 0x00007CE7, + 10287: 0x00007E54, + 10288: 0x00007E55, + 10289: 0x00007E5E, + 10290: 0x00007E5A, + 10291: 0x00007E61, + 10292: 0x00007E52, + 10293: 0x00007E59, + 10294: 0x00007F48, + 10295: 0x00007FF9, + 10296: 0x00007FFB, + 10297: 0x00008077, + 10298: 0x00008076, + 10299: 0x000081CD, + 10300: 0x000081CF, + 10301: 0x0000820A, + 10302: 0x000085CF, + 10303: 0x000085A9, + 10304: 0x000085CD, + 10305: 0x000085D0, + 10306: 0x000085C9, + 10307: 0x000085B0, + 10308: 0x000085BA, + 10309: 0x000085B9, + 10310: 0x000085A6, + 10311: 0x000087EF, + 10312: 0x000087EC, + 10313: 0x000087F2, + 10314: 0x000087E0, + 10315: 0x00008986, + 10316: 0x000089B2, + 10317: 0x000089F4, + 10318: 0x00008B28, + 10319: 0x00008B39, + 10320: 0x00008B2C, + 10321: 0x00008B2B, + 10322: 0x00008C50, + 10323: 0x00008D05, + 10324: 0x00008E59, + 10325: 0x00008E63, + 10326: 0x00008E66, + 10327: 0x00008E64, + 10328: 0x00008E5F, + 10329: 0x00008E55, + 10330: 0x00008EC0, + 10331: 0x00008F49, + 10332: 0x00008F4D, + 10333: 0x00009087, + 10334: 0x00009083, + 10335: 0x00009088, + 10336: 0x000091AB, + 10337: 0x000091AC, + 10338: 0x000091D0, + 10339: 0x00009394, + 10340: 0x0000938A, + 10341: 0x00009396, + 10342: 0x000093A2, + 10343: 0x000093B3, + 10344: 0x000093AE, + 10345: 0x000093AC, + 10346: 0x000093B0, + 10347: 0x00009398, + 10348: 0x0000939A, + 10349: 0x00009397, + 10350: 0x000095D4, + 10351: 0x000095D6, + 10352: 0x000095D0, + 10353: 0x000095D5, + 10354: 0x000096E2, + 10355: 0x000096DC, + 10356: 0x000096D9, + 10357: 0x000096DB, + 10358: 0x000096DE, + 10359: 0x00009724, + 10360: 0x000097A3, + 10361: 0x000097A6, + 10362: 0x000097AD, + 10363: 0x000097F9, + 10364: 0x0000984D, + 10365: 0x0000984F, + 10366: 0x0000984C, + 10367: 0x0000984E, + 10368: 0x00009853, + 10369: 0x000098BA, + 10370: 0x0000993E, + 10371: 0x0000993F, + 10372: 0x0000993D, + 10373: 0x0000992E, + 10374: 0x000099A5, + 10375: 0x00009A0E, + 10376: 0x00009AC1, + 10377: 0x00009B03, + 10378: 0x00009B06, + 10379: 0x00009B4F, + 10380: 0x00009B4E, + 10381: 0x00009B4D, + 10382: 0x00009BCA, + 10383: 0x00009BC9, + 10384: 0x00009BFD, + 10385: 0x00009BC8, + 10386: 0x00009BC0, + 10387: 0x00009D51, + 10388: 0x00009D5D, + 10389: 0x00009D60, + 10390: 0x00009EE0, + 10391: 0x00009F15, + 10392: 0x00009F2C, + 10393: 0x00005133, + 10394: 0x000056A5, + 10395: 0x000058DE, + 10396: 0x000058DF, + 10397: 0x000058E2, + 10398: 0x00005BF5, + 10399: 0x00009F90, + 10400: 0x00005EEC, + 10401: 0x000061F2, + 10402: 0x000061F7, + 10403: 0x000061F6, + 10404: 0x000061F5, + 10405: 0x00006500, + 10406: 0x0000650F, + 10407: 0x000066E0, + 10408: 0x000066DD, + 10409: 0x00006AE5, + 10410: 0x00006ADD, + 10411: 0x00006ADA, + 10412: 0x00006AD3, + 10413: 0x0000701B, + 10414: 0x0000701F, + 10415: 0x00007028, + 10416: 0x0000701A, + 10417: 0x0000701D, + 10418: 0x00007015, + 10419: 0x00007018, + 10420: 0x00007206, + 10421: 0x0000720D, + 10422: 0x00007258, + 10423: 0x000072A2, + 10424: 0x00007378, + 10425: 0x0000737A, + 10426: 0x000074BD, + 10427: 0x000074CA, + 10428: 0x000074E3, + 10429: 0x00007587, + 10430: 0x00007586, + 10431: 0x0000765F, + 10432: 0x00007661, + 10433: 0x000077C7, + 10434: 0x00007919, + 10435: 0x000079B1, + 10436: 0x00007A6B, + 10437: 0x00007A69, + 10438: 0x00007C3E, + 10439: 0x00007C3F, + 10440: 0x00007C38, + 10441: 0x00007C3D, + 10442: 0x00007C37, + 10443: 0x00007C40, + 10444: 0x00007E6B, + 10445: 0x00007E6D, + 10446: 0x00007E79, + 10447: 0x00007E69, + 10448: 0x00007E6A, + 10449: 0x00007F85, + 10450: 0x00007E73, + 10451: 0x00007FB6, + 10452: 0x00007FB9, + 10453: 0x00007FB8, + 10454: 0x000081D8, + 10455: 0x000085E9, + 10456: 0x000085DD, + 10457: 0x000085EA, + 10458: 0x000085D5, + 10459: 0x000085E4, + 10460: 0x000085E5, + 10461: 0x000085F7, + 10462: 0x000087FB, + 10463: 0x00008805, + 10464: 0x0000880D, + 10465: 0x000087F9, + 10466: 0x000087FE, + 10467: 0x00008960, + 10468: 0x0000895F, + 10469: 0x00008956, + 10470: 0x0000895E, + 10471: 0x00008B41, + 10472: 0x00008B5C, + 10473: 0x00008B58, + 10474: 0x00008B49, + 10475: 0x00008B5A, + 10476: 0x00008B4E, + 10477: 0x00008B4F, + 10478: 0x00008B46, + 10479: 0x00008B59, + 10480: 0x00008D08, + 10481: 0x00008D0A, + 10482: 0x00008E7C, + 10483: 0x00008E72, + 10484: 0x00008E87, + 10485: 0x00008E76, + 10486: 0x00008E6C, + 10487: 0x00008E7A, + 10488: 0x00008E74, + 10489: 0x00008F54, + 10490: 0x00008F4E, + 10491: 0x00008FAD, + 10492: 0x0000908A, + 10493: 0x0000908B, + 10494: 0x000091B1, + 10495: 0x000091AE, + 10496: 0x000093E1, + 10497: 0x000093D1, + 10498: 0x000093DF, + 10499: 0x000093C3, + 10500: 0x000093C8, + 10501: 0x000093DC, + 10502: 0x000093DD, + 10503: 0x000093D6, + 10504: 0x000093E2, + 10505: 0x000093CD, + 10506: 0x000093D8, + 10507: 0x000093E4, + 10508: 0x000093D7, + 10509: 0x000093E8, + 10510: 0x000095DC, + 10511: 0x000096B4, + 10512: 0x000096E3, + 10513: 0x0000972A, + 10514: 0x00009727, + 10515: 0x00009761, + 10516: 0x000097DC, + 10517: 0x000097FB, + 10518: 0x0000985E, + 10519: 0x00009858, + 10520: 0x0000985B, + 10521: 0x000098BC, + 10522: 0x00009945, + 10523: 0x00009949, + 10524: 0x00009A16, + 10525: 0x00009A19, + 10526: 0x00009B0D, + 10527: 0x00009BE8, + 10528: 0x00009BE7, + 10529: 0x00009BD6, + 10530: 0x00009BDB, + 10531: 0x00009D89, + 10532: 0x00009D61, + 10533: 0x00009D72, + 10534: 0x00009D6A, + 10535: 0x00009D6C, + 10536: 0x00009E92, + 10537: 0x00009E97, + 10538: 0x00009E93, + 10539: 0x00009EB4, + 10540: 0x000052F8, + 10541: 0x000056A8, + 10542: 0x000056B7, + 10543: 0x000056B6, + 10544: 0x000056B4, + 10545: 0x000056BC, + 10546: 0x000058E4, + 10547: 0x00005B40, + 10548: 0x00005B43, + 10549: 0x00005B7D, + 10550: 0x00005BF6, + 10551: 0x00005DC9, + 10552: 0x000061F8, + 10553: 0x000061FA, + 10554: 0x00006518, + 10555: 0x00006514, + 10556: 0x00006519, + 10557: 0x000066E6, + 10558: 0x00006727, + 10559: 0x00006AEC, + 10560: 0x0000703E, + 10561: 0x00007030, + 10562: 0x00007032, + 10563: 0x00007210, + 10564: 0x0000737B, + 10565: 0x000074CF, + 10566: 0x00007662, + 10567: 0x00007665, + 10568: 0x00007926, + 10569: 0x0000792A, + 10570: 0x0000792C, + 10571: 0x0000792B, + 10572: 0x00007AC7, + 10573: 0x00007AF6, + 10574: 0x00007C4C, + 10575: 0x00007C43, + 10576: 0x00007C4D, + 10577: 0x00007CEF, + 10578: 0x00007CF0, + 10579: 0x00008FAE, + 10580: 0x00007E7D, + 10581: 0x00007E7C, + 10582: 0x00007E82, + 10583: 0x00007F4C, + 10584: 0x00008000, + 10585: 0x000081DA, + 10586: 0x00008266, + 10587: 0x000085FB, + 10588: 0x000085F9, + 10589: 0x00008611, + 10590: 0x000085FA, + 10591: 0x00008606, + 10592: 0x0000860B, + 10593: 0x00008607, + 10594: 0x0000860A, + 10595: 0x00008814, + 10596: 0x00008815, + 10597: 0x00008964, + 10598: 0x000089BA, + 10599: 0x000089F8, + 10600: 0x00008B70, + 10601: 0x00008B6C, + 10602: 0x00008B66, + 10603: 0x00008B6F, + 10604: 0x00008B5F, + 10605: 0x00008B6B, + 10606: 0x00008D0F, + 10607: 0x00008D0D, + 10608: 0x00008E89, + 10609: 0x00008E81, + 10610: 0x00008E85, + 10611: 0x00008E82, + 10612: 0x000091B4, + 10613: 0x000091CB, + 10614: 0x00009418, + 10615: 0x00009403, + 10616: 0x000093FD, + 10617: 0x000095E1, + 10618: 0x00009730, + 10619: 0x000098C4, + 10620: 0x00009952, + 10621: 0x00009951, + 10622: 0x000099A8, + 10623: 0x00009A2B, + 10624: 0x00009A30, + 10625: 0x00009A37, + 10626: 0x00009A35, + 10627: 0x00009C13, + 10628: 0x00009C0D, + 10629: 0x00009E79, + 10630: 0x00009EB5, + 10631: 0x00009EE8, + 10632: 0x00009F2F, + 10633: 0x00009F5F, + 10634: 0x00009F63, + 10635: 0x00009F61, + 10636: 0x00005137, + 10637: 0x00005138, + 10638: 0x000056C1, + 10639: 0x000056C0, + 10640: 0x000056C2, + 10641: 0x00005914, + 10642: 0x00005C6C, + 10643: 0x00005DCD, + 10644: 0x000061FC, + 10645: 0x000061FE, + 10646: 0x0000651D, + 10647: 0x0000651C, + 10648: 0x00006595, + 10649: 0x000066E9, + 10650: 0x00006AFB, + 10651: 0x00006B04, + 10652: 0x00006AFA, + 10653: 0x00006BB2, + 10654: 0x0000704C, + 10655: 0x0000721B, + 10656: 0x000072A7, + 10657: 0x000074D6, + 10658: 0x000074D4, + 10659: 0x00007669, + 10660: 0x000077D3, + 10661: 0x00007C50, + 10662: 0x00007E8F, + 10663: 0x00007E8C, + 10664: 0x00007FBC, + 10665: 0x00008617, + 10666: 0x0000862D, + 10667: 0x0000861A, + 10668: 0x00008823, + 10669: 0x00008822, + 10670: 0x00008821, + 10671: 0x0000881F, + 10672: 0x0000896A, + 10673: 0x0000896C, + 10674: 0x000089BD, + 10675: 0x00008B74, + 10676: 0x00008B77, + 10677: 0x00008B7D, + 10678: 0x00008D13, + 10679: 0x00008E8A, + 10680: 0x00008E8D, + 10681: 0x00008E8B, + 10682: 0x00008F5F, + 10683: 0x00008FAF, + 10684: 0x000091BA, + 10685: 0x0000942E, + 10686: 0x00009433, + 10687: 0x00009435, + 10688: 0x0000943A, + 10689: 0x00009438, + 10690: 0x00009432, + 10691: 0x0000942B, + 10692: 0x000095E2, + 10693: 0x00009738, + 10694: 0x00009739, + 10695: 0x00009732, + 10696: 0x000097FF, + 10697: 0x00009867, + 10698: 0x00009865, + 10699: 0x00009957, + 10700: 0x00009A45, + 10701: 0x00009A43, + 10702: 0x00009A40, + 10703: 0x00009A3E, + 10704: 0x00009ACF, + 10705: 0x00009B54, + 10706: 0x00009B51, + 10707: 0x00009C2D, + 10708: 0x00009C25, + 10709: 0x00009DAF, + 10710: 0x00009DB4, + 10711: 0x00009DC2, + 10712: 0x00009DB8, + 10713: 0x00009E9D, + 10714: 0x00009EEF, + 10715: 0x00009F19, + 10716: 0x00009F5C, + 10717: 0x00009F66, + 10718: 0x00009F67, + 10719: 0x0000513C, + 10720: 0x0000513B, + 10721: 0x000056C8, + 10722: 0x000056CA, + 10723: 0x000056C9, + 10724: 0x00005B7F, + 10725: 0x00005DD4, + 10726: 0x00005DD2, + 10727: 0x00005F4E, + 10728: 0x000061FF, + 10729: 0x00006524, + 10730: 0x00006B0A, + 10731: 0x00006B61, + 10732: 0x00007051, + 10733: 0x00007058, + 10734: 0x00007380, + 10735: 0x000074E4, + 10736: 0x0000758A, + 10737: 0x0000766E, + 10738: 0x0000766C, + 10739: 0x000079B3, + 10740: 0x00007C60, + 10741: 0x00007C5F, + 10742: 0x0000807E, + 10743: 0x0000807D, + 10744: 0x000081DF, + 10745: 0x00008972, + 10746: 0x0000896F, + 10747: 0x000089FC, + 10748: 0x00008B80, + 10749: 0x00008D16, + 10750: 0x00008D17, + 10751: 0x00008E91, + 10752: 0x00008E93, + 10753: 0x00008F61, + 10754: 0x00009148, + 10755: 0x00009444, + 10756: 0x00009451, + 10757: 0x00009452, + 10758: 0x0000973D, + 10759: 0x0000973E, + 10760: 0x000097C3, + 10761: 0x000097C1, + 10762: 0x0000986B, + 10763: 0x00009955, + 10764: 0x00009A55, + 10765: 0x00009A4D, + 10766: 0x00009AD2, + 10767: 0x00009B1A, + 10768: 0x00009C49, + 10769: 0x00009C31, + 10770: 0x00009C3E, + 10771: 0x00009C3B, + 10772: 0x00009DD3, + 10773: 0x00009DD7, + 10774: 0x00009F34, + 10775: 0x00009F6C, + 10776: 0x00009F6A, + 10777: 0x00009F94, + 10778: 0x000056CC, + 10779: 0x00005DD6, + 10780: 0x00006200, + 10781: 0x00006523, + 10782: 0x0000652B, + 10783: 0x0000652A, + 10784: 0x000066EC, + 10785: 0x00006B10, + 10786: 0x000074DA, + 10787: 0x00007ACA, + 10788: 0x00007C64, + 10789: 0x00007C63, + 10790: 0x00007C65, + 10791: 0x00007E93, + 10792: 0x00007E96, + 10793: 0x00007E94, + 10794: 0x000081E2, + 10795: 0x00008638, + 10796: 0x0000863F, + 10797: 0x00008831, + 10798: 0x00008B8A, + 10799: 0x00009090, + 10800: 0x0000908F, + 10801: 0x00009463, + 10802: 0x00009460, + 10803: 0x00009464, + 10804: 0x00009768, + 10805: 0x0000986F, + 10806: 0x0000995C, + 10807: 0x00009A5A, + 10808: 0x00009A5B, + 10809: 0x00009A57, + 10810: 0x00009AD3, + 10811: 0x00009AD4, + 10812: 0x00009AD1, + 10813: 0x00009C54, + 10814: 0x00009C57, + 10815: 0x00009C56, + 10816: 0x00009DE5, + 10817: 0x00009E9F, + 10818: 0x00009EF4, + 10819: 0x000056D1, + 10820: 0x000058E9, + 10821: 0x0000652C, + 10822: 0x0000705E, + 10823: 0x00007671, + 10824: 0x00007672, + 10825: 0x000077D7, + 10826: 0x00007F50, + 10827: 0x00007F88, + 10828: 0x00008836, + 10829: 0x00008839, + 10830: 0x00008862, + 10831: 0x00008B93, + 10832: 0x00008B92, + 10833: 0x00008B96, + 10834: 0x00008277, + 10835: 0x00008D1B, + 10836: 0x000091C0, + 10837: 0x0000946A, + 10838: 0x00009742, + 10839: 0x00009748, + 10840: 0x00009744, + 10841: 0x000097C6, + 10842: 0x00009870, + 10843: 0x00009A5F, + 10844: 0x00009B22, + 10845: 0x00009B58, + 10846: 0x00009C5F, + 10847: 0x00009DF9, + 10848: 0x00009DFA, + 10849: 0x00009E7C, + 10850: 0x00009E7D, + 10851: 0x00009F07, + 10852: 0x00009F77, + 10853: 0x00009F72, + 10854: 0x00005EF3, + 10855: 0x00006B16, + 10856: 0x00007063, + 10857: 0x00007C6C, + 10858: 0x00007C6E, + 10859: 0x0000883B, + 10860: 0x000089C0, + 10861: 0x00008EA1, + 10862: 0x000091C1, + 10863: 0x00009472, + 10864: 0x00009470, + 10865: 0x00009871, + 10866: 0x0000995E, + 10867: 0x00009AD6, + 10868: 0x00009B23, + 10869: 0x00009ECC, + 10870: 0x00007064, + 10871: 0x000077DA, + 10872: 0x00008B9A, + 10873: 0x00009477, + 10874: 0x000097C9, + 10875: 0x00009A62, + 10876: 0x00009A65, + 10877: 0x00007E9C, + 10878: 0x00008B9C, + 10879: 0x00008EAA, + 10880: 0x000091C5, + 10881: 0x0000947D, + 10882: 0x0000947E, + 10883: 0x0000947C, + 10884: 0x00009C77, + 10885: 0x00009C78, + 10886: 0x00009EF7, + 10887: 0x00008C54, + 10888: 0x0000947F, + 10889: 0x00009E1A, + 10890: 0x00007228, + 10891: 0x00009A6A, + 10892: 0x00009B31, + 10893: 0x00009E1B, + 10894: 0x00009E1E, + 10895: 0x00007C72, + 10896: 0x00002460, + 10897: 0x00002461, + 10898: 0x00002462, + 10899: 0x00002463, + 10900: 0x00002464, + 10901: 0x00002465, + 10902: 0x00002466, + 10903: 0x00002467, + 10904: 0x00002468, + 10905: 0x00002469, + 10906: 0x00002474, + 10907: 0x00002475, + 10908: 0x00002476, + 10909: 0x00002477, + 10910: 0x00002478, + 10911: 0x00002479, + 10912: 0x0000247A, + 10913: 0x0000247B, + 10914: 0x0000247C, + 10915: 0x0000247D, + 10916: 0x00002170, + 10917: 0x00002171, + 10918: 0x00002172, + 10919: 0x00002173, + 10920: 0x00002174, + 10921: 0x00002175, + 10922: 0x00002176, + 10923: 0x00002177, + 10924: 0x00002178, + 10925: 0x00002179, + 10926: 0x00004E36, + 10927: 0x00004E3F, + 10928: 0x00004E85, + 10929: 0x00004EA0, + 10930: 0x00005182, + 10931: 0x00005196, + 10932: 0x000051AB, + 10933: 0x000052F9, + 10934: 0x00005338, + 10935: 0x00005369, + 10936: 0x000053B6, + 10937: 0x0000590A, + 10938: 0x00005B80, + 10939: 0x00005DDB, + 10940: 0x00002F33, + 10941: 0x00005E7F, + 10942: 0x00005EF4, + 10943: 0x00005F50, + 10944: 0x00005F61, + 10945: 0x00006534, + 10946: 0x000065E0, + 10947: 0x00007592, + 10948: 0x00007676, + 10949: 0x00008FB5, + 10950: 0x000096B6, + 10951: 0x000000A8, + 10952: 0x000002C6, + 10953: 0x000030FD, + 10954: 0x000030FE, + 10955: 0x0000309D, + 10956: 0x0000309E, + 10957: 0x00003003, + 10958: 0x00004EDD, + 10959: 0x00003005, + 10960: 0x00003006, + 10961: 0x00003007, + 10962: 0x000030FC, + 10963: 0x0000FF3B, + 10964: 0x0000FF3D, + 10965: 0x0000273D, + 10966: 0x00003041, + 10967: 0x00003042, + 10968: 0x00003043, + 10969: 0x00003044, + 10970: 0x00003045, + 10971: 0x00003046, + 10972: 0x00003047, + 10973: 0x00003048, + 10974: 0x00003049, + 10975: 0x0000304A, + 10976: 0x0000304B, + 10977: 0x0000304C, + 10978: 0x0000304D, + 10979: 0x0000304E, + 10980: 0x0000304F, + 10981: 0x00003050, + 10982: 0x00003051, + 10983: 0x00003052, + 10984: 0x00003053, + 10985: 0x00003054, + 10986: 0x00003055, + 10987: 0x00003056, + 10988: 0x00003057, + 10989: 0x00003058, + 10990: 0x00003059, + 10991: 0x0000305A, + 10992: 0x0000305B, + 10993: 0x0000305C, + 10994: 0x0000305D, + 10995: 0x0000305E, + 10996: 0x0000305F, + 10997: 0x00003060, + 10998: 0x00003061, + 10999: 0x00003062, + 11000: 0x00003063, + 11001: 0x00003064, + 11002: 0x00003065, + 11003: 0x00003066, + 11004: 0x00003067, + 11005: 0x00003068, + 11006: 0x00003069, + 11007: 0x0000306A, + 11008: 0x0000306B, + 11009: 0x0000306C, + 11010: 0x0000306D, + 11011: 0x0000306E, + 11012: 0x0000306F, + 11013: 0x00003070, + 11014: 0x00003071, + 11015: 0x00003072, + 11016: 0x00003073, + 11017: 0x00003074, + 11018: 0x00003075, + 11019: 0x00003076, + 11020: 0x00003077, + 11021: 0x00003078, + 11022: 0x00003079, + 11023: 0x0000307A, + 11024: 0x0000307B, + 11025: 0x0000307C, + 11026: 0x0000307D, + 11027: 0x0000307E, + 11028: 0x0000307F, + 11029: 0x00003080, + 11030: 0x00003081, + 11031: 0x00003082, + 11032: 0x00003083, + 11033: 0x00003084, + 11034: 0x00003085, + 11035: 0x00003086, + 11036: 0x00003087, + 11037: 0x00003088, + 11038: 0x00003089, + 11039: 0x0000308A, + 11040: 0x0000308B, + 11041: 0x0000308C, + 11042: 0x0000308D, + 11043: 0x0000308E, + 11044: 0x0000308F, + 11045: 0x00003090, + 11046: 0x00003091, + 11047: 0x00003092, + 11048: 0x00003093, + 11049: 0x000030A1, + 11050: 0x000030A2, + 11051: 0x000030A3, + 11052: 0x000030A4, + 11053: 0x000030A5, + 11054: 0x000030A6, + 11055: 0x000030A7, + 11056: 0x000030A8, + 11057: 0x000030A9, + 11058: 0x000030AA, + 11059: 0x000030AB, + 11060: 0x000030AC, + 11061: 0x000030AD, + 11062: 0x000030AE, + 11063: 0x000030AF, + 11064: 0x000030B0, + 11065: 0x000030B1, + 11066: 0x000030B2, + 11067: 0x000030B3, + 11068: 0x000030B4, + 11069: 0x000030B5, + 11070: 0x000030B6, + 11071: 0x000030B7, + 11072: 0x000030B8, + 11073: 0x000030B9, + 11074: 0x000030BA, + 11075: 0x000030BB, + 11076: 0x000030BC, + 11077: 0x000030BD, + 11078: 0x000030BE, + 11079: 0x000030BF, + 11080: 0x000030C0, + 11081: 0x000030C1, + 11082: 0x000030C2, + 11083: 0x000030C3, + 11084: 0x000030C4, + 11085: 0x000030C5, + 11086: 0x000030C6, + 11087: 0x000030C7, + 11088: 0x000030C8, + 11089: 0x000030C9, + 11090: 0x000030CA, + 11091: 0x000030CB, + 11092: 0x000030CC, + 11093: 0x000030CD, + 11094: 0x000030CE, + 11095: 0x000030CF, + 11096: 0x000030D0, + 11097: 0x000030D1, + 11098: 0x000030D2, + 11099: 0x000030D3, + 11100: 0x000030D4, + 11101: 0x000030D5, + 11102: 0x000030D6, + 11103: 0x000030D7, + 11104: 0x000030D8, + 11105: 0x000030D9, + 11106: 0x000030DA, + 11107: 0x000030DB, + 11108: 0x000030DC, + 11109: 0x000030DD, + 11110: 0x000030DE, + 11111: 0x000030DF, + 11112: 0x000030E0, + 11113: 0x000030E1, + 11114: 0x000030E2, + 11115: 0x000030E3, + 11116: 0x000030E4, + 11117: 0x000030E5, + 11118: 0x000030E6, + 11119: 0x000030E7, + 11120: 0x000030E8, + 11121: 0x000030E9, + 11122: 0x000030EA, + 11123: 0x000030EB, + 11124: 0x000030EC, + 11125: 0x000030ED, + 11126: 0x000030EE, + 11127: 0x000030EF, + 11128: 0x000030F0, + 11129: 0x000030F1, + 11130: 0x000030F2, + 11131: 0x000030F3, + 11132: 0x000030F4, + 11133: 0x000030F5, + 11134: 0x000030F6, + 11135: 0x00000410, + 11136: 0x00000411, + 11137: 0x00000412, + 11138: 0x00000413, + 11139: 0x00000414, + 11140: 0x00000415, + 11141: 0x00000401, + 11142: 0x00000416, + 11143: 0x00000417, + 11144: 0x00000418, + 11145: 0x00000419, + 11146: 0x0000041A, + 11147: 0x0000041B, + 11148: 0x0000041C, + 11149: 0x0000041D, + 11150: 0x0000041E, + 11151: 0x0000041F, + 11152: 0x00000420, + 11153: 0x00000421, + 11154: 0x00000422, + 11155: 0x00000423, + 11156: 0x00000424, + 11157: 0x00000425, + 11158: 0x00000426, + 11159: 0x00000427, + 11160: 0x00000428, + 11161: 0x00000429, + 11162: 0x0000042A, + 11163: 0x0000042B, + 11164: 0x0000042C, + 11165: 0x0000042D, + 11166: 0x0000042E, + 11167: 0x0000042F, + 11168: 0x00000430, + 11169: 0x00000431, + 11170: 0x00000432, + 11171: 0x00000433, + 11172: 0x00000434, + 11173: 0x00000435, + 11174: 0x00000451, + 11175: 0x00000436, + 11176: 0x00000437, + 11177: 0x00000438, + 11178: 0x00000439, + 11179: 0x0000043A, + 11180: 0x0000043B, + 11181: 0x0000043C, + 11182: 0x0000043D, + 11183: 0x0000043E, + 11184: 0x0000043F, + 11185: 0x00000440, + 11186: 0x00000441, + 11187: 0x00000442, + 11188: 0x00000443, + 11189: 0x00000444, + 11190: 0x00000445, + 11191: 0x00000446, + 11192: 0x00000447, + 11193: 0x00000448, + 11194: 0x00000449, + 11195: 0x0000044A, + 11196: 0x0000044B, + 11197: 0x0000044C, + 11198: 0x0000044D, + 11199: 0x0000044E, + 11200: 0x0000044F, + 11201: 0x000021E7, + 11202: 0x000021B8, + 11203: 0x000021B9, + 11204: 0x000031CF, + 11205: 0x000200CC, + 11206: 0x00004E5A, + 11207: 0x0002008A, + 11208: 0x00005202, + 11209: 0x00004491, + 11210: 0x00009FB0, + 11211: 0x00005188, + 11212: 0x00009FB1, + 11213: 0x00027607, + 11254: 0x0000FFE2, + 11255: 0x0000FFE4, + 11256: 0x0000FF07, + 11257: 0x0000FF02, + 11258: 0x00003231, + 11259: 0x00002116, + 11260: 0x00002121, + 11261: 0x0000309B, + 11262: 0x0000309C, + 11263: 0x00002E80, + 11264: 0x00002E84, + 11265: 0x00002E86, + 11266: 0x00002E87, + 11267: 0x00002E88, + 11268: 0x00002E8A, + 11269: 0x00002E8C, + 11270: 0x00002E8D, + 11271: 0x00002E95, + 11272: 0x00002E9C, + 11273: 0x00002E9D, + 11274: 0x00002EA5, + 11275: 0x00002EA7, + 11276: 0x00002EAA, + 11277: 0x00002EAC, + 11278: 0x00002EAE, + 11279: 0x00002EB6, + 11280: 0x00002EBC, + 11281: 0x00002EBE, + 11282: 0x00002EC6, + 11283: 0x00002ECA, + 11284: 0x00002ECC, + 11285: 0x00002ECD, + 11286: 0x00002ECF, + 11287: 0x00002ED6, + 11288: 0x00002ED7, + 11289: 0x00002EDE, + 11290: 0x00002EE3, + 11294: 0x00000283, + 11295: 0x00000250, + 11296: 0x0000025B, + 11297: 0x00000254, + 11298: 0x00000275, + 11299: 0x00000153, + 11300: 0x000000F8, + 11301: 0x0000014B, + 11302: 0x0000028A, + 11303: 0x0000026A, + 11304: 0x00004E42, + 11305: 0x00004E5C, + 11306: 0x000051F5, + 11307: 0x0000531A, + 11308: 0x00005382, + 11309: 0x00004E07, + 11310: 0x00004E0C, + 11311: 0x00004E47, + 11312: 0x00004E8D, + 11313: 0x000056D7, + 11314: 0x0000FA0C, + 11315: 0x00005C6E, + 11316: 0x00005F73, + 11317: 0x00004E0F, + 11318: 0x00005187, + 11319: 0x00004E0E, + 11320: 0x00004E2E, + 11321: 0x00004E93, + 11322: 0x00004EC2, + 11323: 0x00004EC9, + 11324: 0x00004EC8, + 11325: 0x00005198, + 11326: 0x000052FC, + 11327: 0x0000536C, + 11328: 0x000053B9, + 11329: 0x00005720, + 11330: 0x00005903, + 11331: 0x0000592C, + 11332: 0x00005C10, + 11333: 0x00005DFF, + 11334: 0x000065E1, + 11335: 0x00006BB3, + 11336: 0x00006BCC, + 11337: 0x00006C14, + 11338: 0x0000723F, + 11339: 0x00004E31, + 11340: 0x00004E3C, + 11341: 0x00004EE8, + 11342: 0x00004EDC, + 11343: 0x00004EE9, + 11344: 0x00004EE1, + 11345: 0x00004EDD, + 11346: 0x00004EDA, + 11347: 0x0000520C, + 11348: 0x0000531C, + 11349: 0x0000534C, + 11350: 0x00005722, + 11351: 0x00005723, + 11352: 0x00005917, + 11353: 0x0000592F, + 11354: 0x00005B81, + 11355: 0x00005B84, + 11356: 0x00005C12, + 11357: 0x00005C3B, + 11358: 0x00005C74, + 11359: 0x00005C73, + 11360: 0x00005E04, + 11361: 0x00005E80, + 11362: 0x00005E82, + 11363: 0x00005FC9, + 11364: 0x00006209, + 11365: 0x00006250, + 11366: 0x00006C15, + 11367: 0x00006C36, + 11368: 0x00006C43, + 11369: 0x00006C3F, + 11370: 0x00006C3B, + 11371: 0x000072AE, + 11372: 0x000072B0, + 11373: 0x0000738A, + 11374: 0x000079B8, + 11375: 0x0000808A, + 11376: 0x0000961E, + 11377: 0x00004F0E, + 11378: 0x00004F18, + 11379: 0x00004F2C, + 11380: 0x00004EF5, + 11381: 0x00004F14, + 11382: 0x00004EF1, + 11383: 0x00004F00, + 11384: 0x00004EF7, + 11385: 0x00004F08, + 11386: 0x00004F1D, + 11387: 0x00004F02, + 11388: 0x00004F05, + 11389: 0x00004F22, + 11390: 0x00004F13, + 11391: 0x00004F04, + 11392: 0x00004EF4, + 11393: 0x00004F12, + 11394: 0x000051B1, + 11395: 0x00005213, + 11396: 0x00005209, + 11397: 0x00005210, + 11398: 0x000052A6, + 11399: 0x00005322, + 11400: 0x0000531F, + 11401: 0x0000534D, + 11402: 0x0000538A, + 11403: 0x00005407, + 11404: 0x000056E1, + 11405: 0x000056DF, + 11406: 0x0000572E, + 11407: 0x0000572A, + 11408: 0x00005734, + 11409: 0x0000593C, + 11410: 0x00005980, + 11411: 0x0000597C, + 11412: 0x00005985, + 11413: 0x0000597B, + 11414: 0x0000597E, + 11415: 0x00005977, + 11416: 0x0000597F, + 11417: 0x00005B56, + 11418: 0x00005C15, + 11419: 0x00005C25, + 11420: 0x00005C7C, + 11421: 0x00005C7A, + 11422: 0x00005C7B, + 11423: 0x00005C7E, + 11424: 0x00005DDF, + 11425: 0x00005E75, + 11426: 0x00005E84, + 11427: 0x00005F02, + 11428: 0x00005F1A, + 11429: 0x00005F74, + 11430: 0x00005FD5, + 11431: 0x00005FD4, + 11432: 0x00005FCF, + 11433: 0x0000625C, + 11434: 0x0000625E, + 11435: 0x00006264, + 11436: 0x00006261, + 11437: 0x00006266, + 11438: 0x00006262, + 11439: 0x00006259, + 11440: 0x00006260, + 11441: 0x0000625A, + 11442: 0x00006265, + 11443: 0x000065EF, + 11444: 0x000065EE, + 11445: 0x0000673E, + 11446: 0x00006739, + 11447: 0x00006738, + 11448: 0x0000673B, + 11449: 0x0000673A, + 11450: 0x0000673F, + 11451: 0x0000673C, + 11452: 0x00006733, + 11453: 0x00006C18, + 11454: 0x00006C46, + 11455: 0x00006C52, + 11456: 0x00006C5C, + 11457: 0x00006C4F, + 11458: 0x00006C4A, + 11459: 0x00006C54, + 11460: 0x00006C4B, + 11461: 0x00006C4C, + 11462: 0x00007071, + 11463: 0x0000725E, + 11464: 0x000072B4, + 11465: 0x000072B5, + 11466: 0x0000738E, + 11467: 0x0000752A, + 11468: 0x0000767F, + 11469: 0x00007A75, + 11470: 0x00007F51, + 11471: 0x00008278, + 11472: 0x0000827C, + 11473: 0x00008280, + 11474: 0x0000827D, + 11475: 0x0000827F, + 11476: 0x0000864D, + 11477: 0x0000897E, + 11478: 0x00009099, + 11479: 0x00009097, + 11480: 0x00009098, + 11481: 0x0000909B, + 11482: 0x00009094, + 11483: 0x00009622, + 11484: 0x00009624, + 11485: 0x00009620, + 11486: 0x00009623, + 11487: 0x00004F56, + 11488: 0x00004F3B, + 11489: 0x00004F62, + 11490: 0x00004F49, + 11491: 0x00004F53, + 11492: 0x00004F64, + 11493: 0x00004F3E, + 11494: 0x00004F67, + 11495: 0x00004F52, + 11496: 0x00004F5F, + 11497: 0x00004F41, + 11498: 0x00004F58, + 11499: 0x00004F2D, + 11500: 0x00004F33, + 11501: 0x00004F3F, + 11502: 0x00004F61, + 11503: 0x0000518F, + 11504: 0x000051B9, + 11505: 0x0000521C, + 11506: 0x0000521E, + 11507: 0x00005221, + 11508: 0x000052AD, + 11509: 0x000052AE, + 11510: 0x00005309, + 11511: 0x00005363, + 11512: 0x00005372, + 11513: 0x0000538E, + 11514: 0x0000538F, + 11515: 0x00005430, + 11516: 0x00005437, + 11517: 0x0000542A, + 11518: 0x00005454, + 11519: 0x00005445, + 11520: 0x00005419, + 11521: 0x0000541C, + 11522: 0x00005425, + 11523: 0x00005418, + 11524: 0x0000543D, + 11525: 0x0000544F, + 11526: 0x00005441, + 11527: 0x00005428, + 11528: 0x00005424, + 11529: 0x00005447, + 11530: 0x000056EE, + 11531: 0x000056E7, + 11532: 0x000056E5, + 11533: 0x00005741, + 11534: 0x00005745, + 11535: 0x0000574C, + 11536: 0x00005749, + 11537: 0x0000574B, + 11538: 0x00005752, + 11539: 0x00005906, + 11540: 0x00005940, + 11541: 0x000059A6, + 11542: 0x00005998, + 11543: 0x000059A0, + 11544: 0x00005997, + 11545: 0x0000598E, + 11546: 0x000059A2, + 11547: 0x00005990, + 11548: 0x0000598F, + 11549: 0x000059A7, + 11550: 0x000059A1, + 11551: 0x00005B8E, + 11552: 0x00005B92, + 11553: 0x00005C28, + 11554: 0x00005C2A, + 11555: 0x00005C8D, + 11556: 0x00005C8F, + 11557: 0x00005C88, + 11558: 0x00005C8B, + 11559: 0x00005C89, + 11560: 0x00005C92, + 11561: 0x00005C8A, + 11562: 0x00005C86, + 11563: 0x00005C93, + 11564: 0x00005C95, + 11565: 0x00005DE0, + 11566: 0x00005E0A, + 11567: 0x00005E0E, + 11568: 0x00005E8B, + 11569: 0x00005E89, + 11570: 0x00005E8C, + 11571: 0x00005E88, + 11572: 0x00005E8D, + 11573: 0x00005F05, + 11574: 0x00005F1D, + 11575: 0x00005F78, + 11576: 0x00005F76, + 11577: 0x00005FD2, + 11578: 0x00005FD1, + 11579: 0x00005FD0, + 11580: 0x00005FED, + 11581: 0x00005FE8, + 11582: 0x00005FEE, + 11583: 0x00005FF3, + 11584: 0x00005FE1, + 11585: 0x00005FE4, + 11586: 0x00005FE3, + 11587: 0x00005FFA, + 11588: 0x00005FEF, + 11589: 0x00005FF7, + 11590: 0x00005FFB, + 11591: 0x00006000, + 11592: 0x00005FF4, + 11593: 0x0000623A, + 11594: 0x00006283, + 11595: 0x0000628C, + 11596: 0x0000628E, + 11597: 0x0000628F, + 11598: 0x00006294, + 11599: 0x00006287, + 11600: 0x00006271, + 11601: 0x0000627B, + 11602: 0x0000627A, + 11603: 0x00006270, + 11604: 0x00006281, + 11605: 0x00006288, + 11606: 0x00006277, + 11607: 0x0000627D, + 11608: 0x00006272, + 11609: 0x00006274, + 11610: 0x00006537, + 11611: 0x000065F0, + 11612: 0x000065F4, + 11613: 0x000065F3, + 11614: 0x000065F2, + 11615: 0x000065F5, + 11616: 0x00006745, + 11617: 0x00006747, + 11618: 0x00006759, + 11619: 0x00006755, + 11620: 0x0000674C, + 11621: 0x00006748, + 11622: 0x0000675D, + 11623: 0x0000674D, + 11624: 0x0000675A, + 11625: 0x0000674B, + 11626: 0x00006BD0, + 11627: 0x00006C19, + 11628: 0x00006C1A, + 11629: 0x00006C78, + 11630: 0x00006C67, + 11631: 0x00006C6B, + 11632: 0x00006C84, + 11633: 0x00006C8B, + 11634: 0x00006C8F, + 11635: 0x00006C71, + 11636: 0x00006C6F, + 11637: 0x00006C69, + 11638: 0x00006C9A, + 11639: 0x00006C6D, + 11640: 0x00006C87, + 11641: 0x00006C95, + 11642: 0x00006C9C, + 11643: 0x00006C66, + 11644: 0x00006C73, + 11645: 0x00006C65, + 11646: 0x00006C7B, + 11647: 0x00006C8E, + 11648: 0x00007074, + 11649: 0x0000707A, + 11650: 0x00007263, + 11651: 0x000072BF, + 11652: 0x000072BD, + 11653: 0x000072C3, + 11654: 0x000072C6, + 11655: 0x000072C1, + 11656: 0x000072BA, + 11657: 0x000072C5, + 11658: 0x00007395, + 11659: 0x00007397, + 11660: 0x00007393, + 11661: 0x00007394, + 11662: 0x00007392, + 11663: 0x0000753A, + 11664: 0x00007539, + 11665: 0x00007594, + 11666: 0x00007595, + 11667: 0x00007681, + 11668: 0x0000793D, + 11669: 0x00008034, + 11670: 0x00008095, + 11671: 0x00008099, + 11672: 0x00008090, + 11673: 0x00008092, + 11674: 0x0000809C, + 11675: 0x00008290, + 11676: 0x0000828F, + 11677: 0x00008285, + 11678: 0x0000828E, + 11679: 0x00008291, + 11680: 0x00008293, + 11681: 0x0000828A, + 11682: 0x00008283, + 11683: 0x00008284, + 11684: 0x00008C78, + 11685: 0x00008FC9, + 11686: 0x00008FBF, + 11687: 0x0000909F, + 11688: 0x000090A1, + 11689: 0x000090A5, + 11690: 0x0000909E, + 11691: 0x000090A7, + 11692: 0x000090A0, + 11693: 0x00009630, + 11694: 0x00009628, + 11695: 0x0000962F, + 11696: 0x0000962D, + 11697: 0x00004E33, + 11698: 0x00004F98, + 11699: 0x00004F7C, + 11700: 0x00004F85, + 11701: 0x00004F7D, + 11702: 0x00004F80, + 11703: 0x00004F87, + 11704: 0x00004F76, + 11705: 0x00004F74, + 11706: 0x00004F89, + 11707: 0x00004F84, + 11708: 0x00004F77, + 11709: 0x00004F4C, + 11710: 0x00004F97, + 11711: 0x00004F6A, + 11712: 0x00004F9A, + 11713: 0x00004F79, + 11714: 0x00004F81, + 11715: 0x00004F78, + 11716: 0x00004F90, + 11717: 0x00004F9C, + 11718: 0x00004F94, + 11719: 0x00004F9E, + 11720: 0x00004F92, + 11721: 0x00004F82, + 11722: 0x00004F95, + 11723: 0x00004F6B, + 11724: 0x00004F6E, + 11725: 0x0000519E, + 11726: 0x000051BC, + 11727: 0x000051BE, + 11728: 0x00005235, + 11729: 0x00005232, + 11730: 0x00005233, + 11731: 0x00005246, + 11732: 0x00005231, + 11733: 0x000052BC, + 11734: 0x0000530A, + 11735: 0x0000530B, + 11736: 0x0000533C, + 11737: 0x00005392, + 11738: 0x00005394, + 11739: 0x00005487, + 11740: 0x0000547F, + 11741: 0x00005481, + 11742: 0x00005491, + 11743: 0x00005482, + 11744: 0x00005488, + 11745: 0x0000546B, + 11746: 0x0000547A, + 11747: 0x0000547E, + 11748: 0x00005465, + 11749: 0x0000546C, + 11750: 0x00005474, + 11751: 0x00005466, + 11752: 0x0000548D, + 11753: 0x0000546F, + 11754: 0x00005461, + 11755: 0x00005460, + 11756: 0x00005498, + 11757: 0x00005463, + 11758: 0x00005467, + 11759: 0x00005464, + 11760: 0x000056F7, + 11761: 0x000056F9, + 11762: 0x0000576F, + 11763: 0x00005772, + 11764: 0x0000576D, + 11765: 0x0000576B, + 11766: 0x00005771, + 11767: 0x00005770, + 11768: 0x00005776, + 11769: 0x00005780, + 11770: 0x00005775, + 11771: 0x0000577B, + 11772: 0x00005773, + 11773: 0x00005774, + 11774: 0x00005762, + 11775: 0x00005768, + 11776: 0x0000577D, + 11777: 0x0000590C, + 11778: 0x00005945, + 11779: 0x000059B5, + 11780: 0x000059BA, + 11781: 0x000059CF, + 11782: 0x000059CE, + 11783: 0x000059B2, + 11784: 0x000059CC, + 11785: 0x000059C1, + 11786: 0x000059B6, + 11787: 0x000059BC, + 11788: 0x000059C3, + 11789: 0x000059D6, + 11790: 0x000059B1, + 11791: 0x000059BD, + 11792: 0x000059C0, + 11793: 0x000059C8, + 11794: 0x000059B4, + 11795: 0x000059C7, + 11796: 0x00005B62, + 11797: 0x00005B65, + 11798: 0x00005B93, + 11799: 0x00005B95, + 11800: 0x00005C44, + 11801: 0x00005C47, + 11802: 0x00005CAE, + 11803: 0x00005CA4, + 11804: 0x00005CA0, + 11805: 0x00005CB5, + 11806: 0x00005CAF, + 11807: 0x00005CA8, + 11808: 0x00005CAC, + 11809: 0x00005C9F, + 11810: 0x00005CA3, + 11811: 0x00005CAD, + 11812: 0x00005CA2, + 11813: 0x00005CAA, + 11814: 0x00005CA7, + 11815: 0x00005C9D, + 11816: 0x00005CA5, + 11817: 0x00005CB6, + 11818: 0x00005CB0, + 11819: 0x00005CA6, + 11820: 0x00005E17, + 11821: 0x00005E14, + 11822: 0x00005E19, + 11823: 0x00005F28, + 11824: 0x00005F22, + 11825: 0x00005F23, + 11826: 0x00005F24, + 11827: 0x00005F54, + 11828: 0x00005F82, + 11829: 0x00005F7E, + 11830: 0x00005F7D, + 11831: 0x00005FDE, + 11832: 0x00005FE5, + 11833: 0x0000602D, + 11834: 0x00006026, + 11835: 0x00006019, + 11836: 0x00006032, + 11837: 0x0000600B, + 11838: 0x00006034, + 11839: 0x0000600A, + 11840: 0x00006017, + 11841: 0x00006033, + 11842: 0x0000601A, + 11843: 0x0000601E, + 11844: 0x0000602C, + 11845: 0x00006022, + 11846: 0x0000600D, + 11847: 0x00006010, + 11848: 0x0000602E, + 11849: 0x00006013, + 11850: 0x00006011, + 11851: 0x0000600C, + 11852: 0x00006009, + 11853: 0x0000601C, + 11854: 0x00006214, + 11855: 0x0000623D, + 11856: 0x000062AD, + 11857: 0x000062B4, + 11858: 0x000062D1, + 11859: 0x000062BE, + 11860: 0x000062AA, + 11861: 0x000062B6, + 11862: 0x000062CA, + 11863: 0x000062AE, + 11864: 0x000062B3, + 11865: 0x000062AF, + 11866: 0x000062BB, + 11867: 0x000062A9, + 11868: 0x000062B0, + 11869: 0x000062B8, + 11870: 0x0000653D, + 11871: 0x000065A8, + 11872: 0x000065BB, + 11873: 0x00006609, + 11874: 0x000065FC, + 11875: 0x00006604, + 11876: 0x00006612, + 11877: 0x00006608, + 11878: 0x000065FB, + 11879: 0x00006603, + 11880: 0x0000660B, + 11881: 0x0000660D, + 11882: 0x00006605, + 11883: 0x000065FD, + 11884: 0x00006611, + 11885: 0x00006610, + 11886: 0x000066F6, + 11887: 0x0000670A, + 11888: 0x00006785, + 11889: 0x0000676C, + 11890: 0x0000678E, + 11891: 0x00006792, + 11892: 0x00006776, + 11893: 0x0000677B, + 11894: 0x00006798, + 11895: 0x00006786, + 11896: 0x00006784, + 11897: 0x00006774, + 11898: 0x0000678D, + 11899: 0x0000678C, + 11900: 0x0000677A, + 11901: 0x0000679F, + 11902: 0x00006791, + 11903: 0x00006799, + 11904: 0x00006783, + 11905: 0x0000677D, + 11906: 0x00006781, + 11907: 0x00006778, + 11908: 0x00006779, + 11909: 0x00006794, + 11910: 0x00006B25, + 11911: 0x00006B80, + 11912: 0x00006B7E, + 11913: 0x00006BDE, + 11914: 0x00006C1D, + 11915: 0x00006C93, + 11916: 0x00006CEC, + 11917: 0x00006CEB, + 11918: 0x00006CEE, + 11919: 0x00006CD9, + 11920: 0x00006CB6, + 11921: 0x00006CD4, + 11922: 0x00006CAD, + 11923: 0x00006CE7, + 11924: 0x00006CB7, + 11925: 0x00006CD0, + 11926: 0x00006CC2, + 11927: 0x00006CBA, + 11928: 0x00006CC3, + 11929: 0x00006CC6, + 11930: 0x00006CED, + 11931: 0x00006CF2, + 11932: 0x00006CD2, + 11933: 0x00006CDD, + 11934: 0x00006CB4, + 11935: 0x00006C8A, + 11936: 0x00006C9D, + 11937: 0x00006C80, + 11938: 0x00006CDE, + 11939: 0x00006CC0, + 11940: 0x00006D30, + 11941: 0x00006CCD, + 11942: 0x00006CC7, + 11943: 0x00006CB0, + 11944: 0x00006CF9, + 11945: 0x00006CCF, + 11946: 0x00006CE9, + 11947: 0x00006CD1, + 11948: 0x00007094, + 11949: 0x00007098, + 11950: 0x00007085, + 11951: 0x00007093, + 11952: 0x00007086, + 11953: 0x00007084, + 11954: 0x00007091, + 11955: 0x00007096, + 11956: 0x00007082, + 11957: 0x0000709A, + 11958: 0x00007083, + 11959: 0x0000726A, + 11960: 0x000072D6, + 11961: 0x000072CB, + 11962: 0x000072D8, + 11963: 0x000072C9, + 11964: 0x000072DC, + 11965: 0x000072D2, + 11966: 0x000072D4, + 11967: 0x000072DA, + 11968: 0x000072CC, + 11969: 0x000072D1, + 11970: 0x000073A4, + 11971: 0x000073A1, + 11972: 0x000073AD, + 11973: 0x000073A6, + 11974: 0x000073A2, + 11975: 0x000073A0, + 11976: 0x000073AC, + 11977: 0x0000739D, + 11978: 0x000074DD, + 11979: 0x000074E8, + 11980: 0x0000753F, + 11981: 0x00007540, + 11982: 0x0000753E, + 11983: 0x0000758C, + 11984: 0x00007598, + 11985: 0x000076AF, + 11986: 0x000076F3, + 11987: 0x000076F1, + 11988: 0x000076F0, + 11989: 0x000076F5, + 11990: 0x000077F8, + 11991: 0x000077FC, + 11992: 0x000077F9, + 11993: 0x000077FB, + 11994: 0x000077FA, + 11995: 0x000077F7, + 11996: 0x00007942, + 11997: 0x0000793F, + 11998: 0x000079C5, + 11999: 0x00007A78, + 12000: 0x00007A7B, + 12001: 0x00007AFB, + 12002: 0x00007C75, + 12003: 0x00007CFD, + 12004: 0x00008035, + 12005: 0x0000808F, + 12006: 0x000080AE, + 12007: 0x000080A3, + 12008: 0x000080B8, + 12009: 0x000080B5, + 12010: 0x000080AD, + 12011: 0x00008220, + 12012: 0x000082A0, + 12013: 0x000082C0, + 12014: 0x000082AB, + 12015: 0x0000829A, + 12016: 0x00008298, + 12017: 0x0000829B, + 12018: 0x000082B5, + 12019: 0x000082A7, + 12020: 0x000082AE, + 12021: 0x000082BC, + 12022: 0x0000829E, + 12023: 0x000082BA, + 12024: 0x000082B4, + 12025: 0x000082A8, + 12026: 0x000082A1, + 12027: 0x000082A9, + 12028: 0x000082C2, + 12029: 0x000082A4, + 12030: 0x000082C3, + 12031: 0x000082B6, + 12032: 0x000082A2, + 12033: 0x00008670, + 12034: 0x0000866F, + 12035: 0x0000866D, + 12036: 0x0000866E, + 12037: 0x00008C56, + 12038: 0x00008FD2, + 12039: 0x00008FCB, + 12040: 0x00008FD3, + 12041: 0x00008FCD, + 12042: 0x00008FD6, + 12043: 0x00008FD5, + 12044: 0x00008FD7, + 12045: 0x000090B2, + 12046: 0x000090B4, + 12047: 0x000090AF, + 12048: 0x000090B3, + 12049: 0x000090B0, + 12050: 0x00009639, + 12051: 0x0000963D, + 12052: 0x0000963C, + 12053: 0x0000963A, + 12054: 0x00009643, + 12055: 0x00004FCD, + 12056: 0x00004FC5, + 12057: 0x00004FD3, + 12058: 0x00004FB2, + 12059: 0x00004FC9, + 12060: 0x00004FCB, + 12061: 0x00004FC1, + 12062: 0x00004FD4, + 12063: 0x00004FDC, + 12064: 0x00004FD9, + 12065: 0x00004FBB, + 12066: 0x00004FB3, + 12067: 0x00004FDB, + 12068: 0x00004FC7, + 12069: 0x00004FD6, + 12070: 0x00004FBA, + 12071: 0x00004FC0, + 12072: 0x00004FB9, + 12073: 0x00004FEC, + 12074: 0x00005244, + 12075: 0x00005249, + 12076: 0x000052C0, + 12077: 0x000052C2, + 12078: 0x0000533D, + 12079: 0x0000537C, + 12080: 0x00005397, + 12081: 0x00005396, + 12082: 0x00005399, + 12083: 0x00005398, + 12084: 0x000054BA, + 12085: 0x000054A1, + 12086: 0x000054AD, + 12087: 0x000054A5, + 12088: 0x000054CF, + 12089: 0x000054C3, + 12090: 0x0000830D, + 12091: 0x000054B7, + 12092: 0x000054AE, + 12093: 0x000054D6, + 12094: 0x000054B6, + 12095: 0x000054C5, + 12096: 0x000054C6, + 12097: 0x000054A0, + 12098: 0x00005470, + 12099: 0x000054BC, + 12100: 0x000054A2, + 12101: 0x000054BE, + 12102: 0x00005472, + 12103: 0x000054DE, + 12104: 0x000054B0, + 12105: 0x000057B5, + 12106: 0x0000579E, + 12107: 0x0000579F, + 12108: 0x000057A4, + 12109: 0x0000578C, + 12110: 0x00005797, + 12111: 0x0000579D, + 12112: 0x0000579B, + 12113: 0x00005794, + 12114: 0x00005798, + 12115: 0x0000578F, + 12116: 0x00005799, + 12117: 0x000057A5, + 12118: 0x0000579A, + 12119: 0x00005795, + 12120: 0x000058F4, + 12121: 0x0000590D, + 12122: 0x00005953, + 12123: 0x000059E1, + 12124: 0x000059DE, + 12125: 0x000059EE, + 12126: 0x00005A00, + 12127: 0x000059F1, + 12128: 0x000059DD, + 12129: 0x000059FA, + 12130: 0x000059FD, + 12131: 0x000059FC, + 12132: 0x000059F6, + 12133: 0x000059E4, + 12134: 0x000059F2, + 12135: 0x000059F7, + 12136: 0x000059DB, + 12137: 0x000059E9, + 12138: 0x000059F3, + 12139: 0x000059F5, + 12140: 0x000059E0, + 12141: 0x000059FE, + 12142: 0x000059F4, + 12143: 0x000059ED, + 12144: 0x00005BA8, + 12145: 0x00005C4C, + 12146: 0x00005CD0, + 12147: 0x00005CD8, + 12148: 0x00005CCC, + 12149: 0x00005CD7, + 12150: 0x00005CCB, + 12151: 0x00005CDB, + 12152: 0x00005CDE, + 12153: 0x00005CDA, + 12154: 0x00005CC9, + 12155: 0x00005CC7, + 12156: 0x00005CCA, + 12157: 0x00005CD6, + 12158: 0x00005CD3, + 12159: 0x00005CD4, + 12160: 0x00005CCF, + 12161: 0x00005CC8, + 12162: 0x00005CC6, + 12163: 0x00005CCE, + 12164: 0x00005CDF, + 12165: 0x00005CF8, + 12166: 0x00005DF9, + 12167: 0x00005E21, + 12168: 0x00005E22, + 12169: 0x00005E23, + 12170: 0x00005E20, + 12171: 0x00005E24, + 12172: 0x00005EB0, + 12173: 0x00005EA4, + 12174: 0x00005EA2, + 12175: 0x00005E9B, + 12176: 0x00005EA3, + 12177: 0x00005EA5, + 12178: 0x00005F07, + 12179: 0x00005F2E, + 12180: 0x00005F56, + 12181: 0x00005F86, + 12182: 0x00006037, + 12183: 0x00006039, + 12184: 0x00006054, + 12185: 0x00006072, + 12186: 0x0000605E, + 12187: 0x00006045, + 12188: 0x00006053, + 12189: 0x00006047, + 12190: 0x00006049, + 12191: 0x0000605B, + 12192: 0x0000604C, + 12193: 0x00006040, + 12194: 0x00006042, + 12195: 0x0000605F, + 12196: 0x00006024, + 12197: 0x00006044, + 12198: 0x00006058, + 12199: 0x00006066, + 12200: 0x0000606E, + 12201: 0x00006242, + 12202: 0x00006243, + 12203: 0x000062CF, + 12204: 0x0000630D, + 12205: 0x0000630B, + 12206: 0x000062F5, + 12207: 0x0000630E, + 12208: 0x00006303, + 12209: 0x000062EB, + 12210: 0x000062F9, + 12211: 0x0000630F, + 12212: 0x0000630C, + 12213: 0x000062F8, + 12214: 0x000062F6, + 12215: 0x00006300, + 12216: 0x00006313, + 12217: 0x00006314, + 12218: 0x000062FA, + 12219: 0x00006315, + 12220: 0x000062FB, + 12221: 0x000062F0, + 12222: 0x00006541, + 12223: 0x00006543, + 12224: 0x000065AA, + 12225: 0x000065BF, + 12226: 0x00006636, + 12227: 0x00006621, + 12228: 0x00006632, + 12229: 0x00006635, + 12230: 0x0000661C, + 12231: 0x00006626, + 12232: 0x00006622, + 12233: 0x00006633, + 12234: 0x0000662B, + 12235: 0x0000663A, + 12236: 0x0000661D, + 12237: 0x00006634, + 12238: 0x00006639, + 12239: 0x0000662E, + 12240: 0x0000670F, + 12241: 0x00006710, + 12242: 0x000067C1, + 12243: 0x000067F2, + 12244: 0x000067C8, + 12245: 0x000067BA, + 12246: 0x000067DC, + 12247: 0x000067BB, + 12248: 0x000067F8, + 12249: 0x000067D8, + 12250: 0x000067C0, + 12251: 0x000067B7, + 12252: 0x000067C5, + 12253: 0x000067EB, + 12254: 0x000067E4, + 12255: 0x000067DF, + 12256: 0x000067B5, + 12257: 0x000067CD, + 12258: 0x000067B3, + 12259: 0x000067F7, + 12260: 0x000067F6, + 12261: 0x000067EE, + 12262: 0x000067E3, + 12263: 0x000067C2, + 12264: 0x000067B9, + 12265: 0x000067CE, + 12266: 0x000067E7, + 12267: 0x000067F0, + 12268: 0x000067B2, + 12269: 0x000067FC, + 12270: 0x000067C6, + 12271: 0x000067ED, + 12272: 0x000067CC, + 12273: 0x000067AE, + 12274: 0x000067E6, + 12275: 0x000067DB, + 12276: 0x000067FA, + 12277: 0x000067C9, + 12278: 0x000067CA, + 12279: 0x000067C3, + 12280: 0x000067EA, + 12281: 0x000067CB, + 12282: 0x00006B28, + 12283: 0x00006B82, + 12284: 0x00006B84, + 12285: 0x00006BB6, + 12286: 0x00006BD6, + 12287: 0x00006BD8, + 12288: 0x00006BE0, + 12289: 0x00006C20, + 12290: 0x00006C21, + 12291: 0x00006D28, + 12292: 0x00006D34, + 12293: 0x00006D2D, + 12294: 0x00006D1F, + 12295: 0x00006D3C, + 12296: 0x00006D3F, + 12297: 0x00006D12, + 12298: 0x00006D0A, + 12299: 0x00006CDA, + 12300: 0x00006D33, + 12301: 0x00006D04, + 12302: 0x00006D19, + 12303: 0x00006D3A, + 12304: 0x00006D1A, + 12305: 0x00006D11, + 12306: 0x00006D00, + 12307: 0x00006D1D, + 12308: 0x00006D42, + 12309: 0x00006D01, + 12310: 0x00006D18, + 12311: 0x00006D37, + 12312: 0x00006D03, + 12313: 0x00006D0F, + 12314: 0x00006D40, + 12315: 0x00006D07, + 12316: 0x00006D20, + 12317: 0x00006D2C, + 12318: 0x00006D08, + 12319: 0x00006D22, + 12320: 0x00006D09, + 12321: 0x00006D10, + 12322: 0x000070B7, + 12323: 0x0000709F, + 12324: 0x000070BE, + 12325: 0x000070B1, + 12326: 0x000070B0, + 12327: 0x000070A1, + 12328: 0x000070B4, + 12329: 0x000070B5, + 12330: 0x000070A9, + 12331: 0x00007241, + 12332: 0x00007249, + 12333: 0x0000724A, + 12334: 0x0000726C, + 12335: 0x00007270, + 12336: 0x00007273, + 12337: 0x0000726E, + 12338: 0x000072CA, + 12339: 0x000072E4, + 12340: 0x000072E8, + 12341: 0x000072EB, + 12342: 0x000072DF, + 12343: 0x000072EA, + 12344: 0x000072E6, + 12345: 0x000072E3, + 12346: 0x00007385, + 12347: 0x000073CC, + 12348: 0x000073C2, + 12349: 0x000073C8, + 12350: 0x000073C5, + 12351: 0x000073B9, + 12352: 0x000073B6, + 12353: 0x000073B5, + 12354: 0x000073B4, + 12355: 0x000073EB, + 12356: 0x000073BF, + 12357: 0x000073C7, + 12358: 0x000073BE, + 12359: 0x000073C3, + 12360: 0x000073C6, + 12361: 0x000073B8, + 12362: 0x000073CB, + 12363: 0x000074EC, + 12364: 0x000074EE, + 12365: 0x0000752E, + 12366: 0x00007547, + 12367: 0x00007548, + 12368: 0x000075A7, + 12369: 0x000075AA, + 12370: 0x00007679, + 12371: 0x000076C4, + 12372: 0x00007708, + 12373: 0x00007703, + 12374: 0x00007704, + 12375: 0x00007705, + 12376: 0x0000770A, + 12377: 0x000076F7, + 12378: 0x000076FB, + 12379: 0x000076FA, + 12380: 0x000077E7, + 12381: 0x000077E8, + 12382: 0x00007806, + 12383: 0x00007811, + 12384: 0x00007812, + 12385: 0x00007805, + 12386: 0x00007810, + 12387: 0x0000780F, + 12388: 0x0000780E, + 12389: 0x00007809, + 12390: 0x00007803, + 12391: 0x00007813, + 12392: 0x0000794A, + 12393: 0x0000794C, + 12394: 0x0000794B, + 12395: 0x00007945, + 12396: 0x00007944, + 12397: 0x000079D5, + 12398: 0x000079CD, + 12399: 0x000079CF, + 12400: 0x000079D6, + 12401: 0x000079CE, + 12402: 0x00007A80, + 12403: 0x00007A7E, + 12404: 0x00007AD1, + 12405: 0x00007B00, + 12406: 0x00007B01, + 12407: 0x00007C7A, + 12408: 0x00007C78, + 12409: 0x00007C79, + 12410: 0x00007C7F, + 12411: 0x00007C80, + 12412: 0x00007C81, + 12413: 0x00007D03, + 12414: 0x00007D08, + 12415: 0x00007D01, + 12416: 0x00007F58, + 12417: 0x00007F91, + 12418: 0x00007F8D, + 12419: 0x00007FBE, + 12420: 0x00008007, + 12421: 0x0000800E, + 12422: 0x0000800F, + 12423: 0x00008014, + 12424: 0x00008037, + 12425: 0x000080D8, + 12426: 0x000080C7, + 12427: 0x000080E0, + 12428: 0x000080D1, + 12429: 0x000080C8, + 12430: 0x000080C2, + 12431: 0x000080D0, + 12432: 0x000080C5, + 12433: 0x000080E3, + 12434: 0x000080D9, + 12435: 0x000080DC, + 12436: 0x000080CA, + 12437: 0x000080D5, + 12438: 0x000080C9, + 12439: 0x000080CF, + 12440: 0x000080D7, + 12441: 0x000080E6, + 12442: 0x000080CD, + 12443: 0x000081FF, + 12444: 0x00008221, + 12445: 0x00008294, + 12446: 0x000082D9, + 12447: 0x000082FE, + 12448: 0x000082F9, + 12449: 0x00008307, + 12450: 0x000082E8, + 12451: 0x00008300, + 12452: 0x000082D5, + 12453: 0x0000833A, + 12454: 0x000082EB, + 12455: 0x000082D6, + 12456: 0x000082F4, + 12457: 0x000082EC, + 12458: 0x000082E1, + 12459: 0x000082F2, + 12460: 0x000082F5, + 12461: 0x0000830C, + 12462: 0x000082FB, + 12463: 0x000082F6, + 12464: 0x000082F0, + 12465: 0x000082EA, + 12466: 0x000082E4, + 12467: 0x000082E0, + 12468: 0x000082FA, + 12469: 0x000082F3, + 12470: 0x000082ED, + 12471: 0x00008677, + 12472: 0x00008674, + 12473: 0x0000867C, + 12474: 0x00008673, + 12475: 0x00008841, + 12476: 0x0000884E, + 12477: 0x00008867, + 12478: 0x0000886A, + 12479: 0x00008869, + 12480: 0x000089D3, + 12481: 0x00008A04, + 12482: 0x00008A07, + 12483: 0x00008D72, + 12484: 0x00008FE3, + 12485: 0x00008FE1, + 12486: 0x00008FEE, + 12487: 0x00008FE0, + 12488: 0x000090F1, + 12489: 0x000090BD, + 12490: 0x000090BF, + 12491: 0x000090D5, + 12492: 0x000090C5, + 12493: 0x000090BE, + 12494: 0x000090C7, + 12495: 0x000090CB, + 12496: 0x000090C8, + 12497: 0x000091D4, + 12498: 0x000091D3, + 12499: 0x00009654, + 12500: 0x0000964F, + 12501: 0x00009651, + 12502: 0x00009653, + 12503: 0x0000964A, + 12504: 0x0000964E, + 12505: 0x0000501E, + 12506: 0x00005005, + 12507: 0x00005007, + 12508: 0x00005013, + 12509: 0x00005022, + 12510: 0x00005030, + 12511: 0x0000501B, + 12512: 0x00004FF5, + 12513: 0x00004FF4, + 12514: 0x00005033, + 12515: 0x00005037, + 12516: 0x0000502C, + 12517: 0x00004FF6, + 12518: 0x00004FF7, + 12519: 0x00005017, + 12520: 0x0000501C, + 12521: 0x00005020, + 12522: 0x00005027, + 12523: 0x00005035, + 12524: 0x0000502F, + 12525: 0x00005031, + 12526: 0x0000500E, + 12527: 0x0000515A, + 12528: 0x00005194, + 12529: 0x00005193, + 12530: 0x000051CA, + 12531: 0x000051C4, + 12532: 0x000051C5, + 12533: 0x000051C8, + 12534: 0x000051CE, + 12535: 0x00005261, + 12536: 0x0000525A, + 12537: 0x00005252, + 12538: 0x0000525E, + 12539: 0x0000525F, + 12540: 0x00005255, + 12541: 0x00005262, + 12542: 0x000052CD, + 12543: 0x0000530E, + 12544: 0x0000539E, + 12545: 0x00005526, + 12546: 0x000054E2, + 12547: 0x00005517, + 12548: 0x00005512, + 12549: 0x000054E7, + 12550: 0x000054F3, + 12551: 0x000054E4, + 12552: 0x0000551A, + 12553: 0x000054FF, + 12554: 0x00005504, + 12555: 0x00005508, + 12556: 0x000054EB, + 12557: 0x00005511, + 12558: 0x00005505, + 12559: 0x000054F1, + 12560: 0x0000550A, + 12561: 0x000054FB, + 12562: 0x000054F7, + 12563: 0x000054F8, + 12564: 0x000054E0, + 12565: 0x0000550E, + 12566: 0x00005503, + 12567: 0x0000550B, + 12568: 0x00005701, + 12569: 0x00005702, + 12570: 0x000057CC, + 12571: 0x00005832, + 12572: 0x000057D5, + 12573: 0x000057D2, + 12574: 0x000057BA, + 12575: 0x000057C6, + 12576: 0x000057BD, + 12577: 0x000057BC, + 12578: 0x000057B8, + 12579: 0x000057B6, + 12580: 0x000057BF, + 12581: 0x000057C7, + 12582: 0x000057D0, + 12583: 0x000057B9, + 12584: 0x000057C1, + 12585: 0x0000590E, + 12586: 0x0000594A, + 12587: 0x00005A19, + 12588: 0x00005A16, + 12589: 0x00005A2D, + 12590: 0x00005A2E, + 12591: 0x00005A15, + 12592: 0x00005A0F, + 12593: 0x00005A17, + 12594: 0x00005A0A, + 12595: 0x00005A1E, + 12596: 0x00005A33, + 12597: 0x00005B6C, + 12598: 0x00005BA7, + 12599: 0x00005BAD, + 12600: 0x00005BAC, + 12601: 0x00005C03, + 12602: 0x00005C56, + 12603: 0x00005C54, + 12604: 0x00005CEC, + 12605: 0x00005CFF, + 12606: 0x00005CEE, + 12607: 0x00005CF1, + 12608: 0x00005CF7, + 12609: 0x00005D00, + 12610: 0x00005CF9, + 12611: 0x00005E29, + 12612: 0x00005E28, + 12613: 0x00005EA8, + 12614: 0x00005EAE, + 12615: 0x00005EAA, + 12616: 0x00005EAC, + 12617: 0x00005F33, + 12618: 0x00005F30, + 12619: 0x00005F67, + 12620: 0x0000605D, + 12621: 0x0000605A, + 12622: 0x00006067, + 12623: 0x00006041, + 12624: 0x000060A2, + 12625: 0x00006088, + 12626: 0x00006080, + 12627: 0x00006092, + 12628: 0x00006081, + 12629: 0x0000609D, + 12630: 0x00006083, + 12631: 0x00006095, + 12632: 0x0000609B, + 12633: 0x00006097, + 12634: 0x00006087, + 12635: 0x0000609C, + 12636: 0x0000608E, + 12637: 0x00006219, + 12638: 0x00006246, + 12639: 0x000062F2, + 12640: 0x00006310, + 12641: 0x00006356, + 12642: 0x0000632C, + 12643: 0x00006344, + 12644: 0x00006345, + 12645: 0x00006336, + 12646: 0x00006343, + 12647: 0x000063E4, + 12648: 0x00006339, + 12649: 0x0000634B, + 12650: 0x0000634A, + 12651: 0x0000633C, + 12652: 0x00006329, + 12653: 0x00006341, + 12654: 0x00006334, + 12655: 0x00006358, + 12656: 0x00006354, + 12657: 0x00006359, + 12658: 0x0000632D, + 12659: 0x00006347, + 12660: 0x00006333, + 12661: 0x0000635A, + 12662: 0x00006351, + 12663: 0x00006338, + 12664: 0x00006357, + 12665: 0x00006340, + 12666: 0x00006348, + 12667: 0x0000654A, + 12668: 0x00006546, + 12669: 0x000065C6, + 12670: 0x000065C3, + 12671: 0x000065C4, + 12672: 0x000065C2, + 12673: 0x0000664A, + 12674: 0x0000665F, + 12675: 0x00006647, + 12676: 0x00006651, + 12677: 0x00006712, + 12678: 0x00006713, + 12679: 0x0000681F, + 12680: 0x0000681A, + 12681: 0x00006849, + 12682: 0x00006832, + 12683: 0x00006833, + 12684: 0x0000683B, + 12685: 0x0000684B, + 12686: 0x0000684F, + 12687: 0x00006816, + 12688: 0x00006831, + 12689: 0x0000681C, + 12690: 0x00006835, + 12691: 0x0000682B, + 12692: 0x0000682D, + 12693: 0x0000682F, + 12694: 0x0000684E, + 12695: 0x00006844, + 12696: 0x00006834, + 12697: 0x0000681D, + 12698: 0x00006812, + 12699: 0x00006814, + 12700: 0x00006826, + 12701: 0x00006828, + 12702: 0x0000682E, + 12703: 0x0000684D, + 12704: 0x0000683A, + 12705: 0x00006825, + 12706: 0x00006820, + 12707: 0x00006B2C, + 12708: 0x00006B2F, + 12709: 0x00006B2D, + 12710: 0x00006B31, + 12711: 0x00006B34, + 12712: 0x00006B6D, + 12713: 0x00008082, + 12714: 0x00006B88, + 12715: 0x00006BE6, + 12716: 0x00006BE4, + 12717: 0x00006BE8, + 12718: 0x00006BE3, + 12719: 0x00006BE2, + 12720: 0x00006BE7, + 12721: 0x00006C25, + 12722: 0x00006D7A, + 12723: 0x00006D63, + 12724: 0x00006D64, + 12725: 0x00006D76, + 12726: 0x00006D0D, + 12727: 0x00006D61, + 12728: 0x00006D92, + 12729: 0x00006D58, + 12730: 0x00006D62, + 12731: 0x00006D6D, + 12732: 0x00006D6F, + 12733: 0x00006D91, + 12734: 0x00006D8D, + 12735: 0x00006DEF, + 12736: 0x00006D7F, + 12737: 0x00006D86, + 12738: 0x00006D5E, + 12739: 0x00006D67, + 12740: 0x00006D60, + 12741: 0x00006D97, + 12742: 0x00006D70, + 12743: 0x00006D7C, + 12744: 0x00006D5F, + 12745: 0x00006D82, + 12746: 0x00006D98, + 12747: 0x00006D2F, + 12748: 0x00006D68, + 12749: 0x00006D8B, + 12750: 0x00006D7E, + 12751: 0x00006D80, + 12752: 0x00006D84, + 12753: 0x00006D16, + 12754: 0x00006D83, + 12755: 0x00006D7B, + 12756: 0x00006D7D, + 12757: 0x00006D75, + 12758: 0x00006D90, + 12759: 0x000070DC, + 12760: 0x000070D3, + 12761: 0x000070D1, + 12762: 0x000070DD, + 12763: 0x000070CB, + 12764: 0x00007F39, + 12765: 0x000070E2, + 12766: 0x000070D7, + 12767: 0x000070D2, + 12768: 0x000070DE, + 12769: 0x000070E0, + 12770: 0x000070D4, + 12771: 0x000070CD, + 12772: 0x000070C5, + 12773: 0x000070C6, + 12774: 0x000070C7, + 12775: 0x000070DA, + 12776: 0x000070CE, + 12777: 0x000070E1, + 12778: 0x00007242, + 12779: 0x00007278, + 12780: 0x00007277, + 12781: 0x00007276, + 12782: 0x00007300, + 12783: 0x000072FA, + 12784: 0x000072F4, + 12785: 0x000072FE, + 12786: 0x000072F6, + 12787: 0x000072F3, + 12788: 0x000072FB, + 12789: 0x00007301, + 12790: 0x000073D3, + 12791: 0x000073D9, + 12792: 0x000073E5, + 12793: 0x000073D6, + 12794: 0x000073BC, + 12795: 0x000073E7, + 12796: 0x000073E3, + 12797: 0x000073E9, + 12798: 0x000073DC, + 12799: 0x000073D2, + 12800: 0x000073DB, + 12801: 0x000073D4, + 12802: 0x000073DD, + 12803: 0x000073DA, + 12804: 0x000073D7, + 12805: 0x000073D8, + 12806: 0x000073E8, + 12807: 0x000074DE, + 12808: 0x000074DF, + 12809: 0x000074F4, + 12810: 0x000074F5, + 12811: 0x00007521, + 12812: 0x0000755B, + 12813: 0x0000755F, + 12814: 0x000075B0, + 12815: 0x000075C1, + 12816: 0x000075BB, + 12817: 0x000075C4, + 12818: 0x000075C0, + 12819: 0x000075BF, + 12820: 0x000075B6, + 12821: 0x000075BA, + 12822: 0x0000768A, + 12823: 0x000076C9, + 12824: 0x0000771D, + 12825: 0x0000771B, + 12826: 0x00007710, + 12827: 0x00007713, + 12828: 0x00007712, + 12829: 0x00007723, + 12830: 0x00007711, + 12831: 0x00007715, + 12832: 0x00007719, + 12833: 0x0000771A, + 12834: 0x00007722, + 12835: 0x00007727, + 12836: 0x00007823, + 12837: 0x0000782C, + 12838: 0x00007822, + 12839: 0x00007835, + 12840: 0x0000782F, + 12841: 0x00007828, + 12842: 0x0000782E, + 12843: 0x0000782B, + 12844: 0x00007821, + 12845: 0x00007829, + 12846: 0x00007833, + 12847: 0x0000782A, + 12848: 0x00007831, + 12849: 0x00007954, + 12850: 0x0000795B, + 12851: 0x0000794F, + 12852: 0x0000795C, + 12853: 0x00007953, + 12854: 0x00007952, + 12855: 0x00007951, + 12856: 0x000079EB, + 12857: 0x000079EC, + 12858: 0x000079E0, + 12859: 0x000079EE, + 12860: 0x000079ED, + 12861: 0x000079EA, + 12862: 0x000079DC, + 12863: 0x000079DE, + 12864: 0x000079DD, + 12865: 0x00007A86, + 12866: 0x00007A89, + 12867: 0x00007A85, + 12868: 0x00007A8B, + 12869: 0x00007A8C, + 12870: 0x00007A8A, + 12871: 0x00007A87, + 12872: 0x00007AD8, + 12873: 0x00007B10, + 12874: 0x00007B04, + 12875: 0x00007B13, + 12876: 0x00007B05, + 12877: 0x00007B0F, + 12878: 0x00007B08, + 12879: 0x00007B0A, + 12880: 0x00007B0E, + 12881: 0x00007B09, + 12882: 0x00007B12, + 12883: 0x00007C84, + 12884: 0x00007C91, + 12885: 0x00007C8A, + 12886: 0x00007C8C, + 12887: 0x00007C88, + 12888: 0x00007C8D, + 12889: 0x00007C85, + 12890: 0x00007D1E, + 12891: 0x00007D1D, + 12892: 0x00007D11, + 12893: 0x00007D0E, + 12894: 0x00007D18, + 12895: 0x00007D16, + 12896: 0x00007D13, + 12897: 0x00007D1F, + 12898: 0x00007D12, + 12899: 0x00007D0F, + 12900: 0x00007D0C, + 12901: 0x00007F5C, + 12902: 0x00007F61, + 12903: 0x00007F5E, + 12904: 0x00007F60, + 12905: 0x00007F5D, + 12906: 0x00007F5B, + 12907: 0x00007F96, + 12908: 0x00007F92, + 12909: 0x00007FC3, + 12910: 0x00007FC2, + 12911: 0x00007FC0, + 12912: 0x00008016, + 12913: 0x0000803E, + 12914: 0x00008039, + 12915: 0x000080FA, + 12916: 0x000080F2, + 12917: 0x000080F9, + 12918: 0x000080F5, + 12919: 0x00008101, + 12920: 0x000080FB, + 12921: 0x00008100, + 12922: 0x00008201, + 12923: 0x0000822F, + 12924: 0x00008225, + 12925: 0x00008333, + 12926: 0x0000832D, + 12927: 0x00008344, + 12928: 0x00008319, + 12929: 0x00008351, + 12930: 0x00008325, + 12931: 0x00008356, + 12932: 0x0000833F, + 12933: 0x00008341, + 12934: 0x00008326, + 12935: 0x0000831C, + 12936: 0x00008322, + 12937: 0x00008342, + 12938: 0x0000834E, + 12939: 0x0000831B, + 12940: 0x0000832A, + 12941: 0x00008308, + 12942: 0x0000833C, + 12943: 0x0000834D, + 12944: 0x00008316, + 12945: 0x00008324, + 12946: 0x00008320, + 12947: 0x00008337, + 12948: 0x0000832F, + 12949: 0x00008329, + 12950: 0x00008347, + 12951: 0x00008345, + 12952: 0x0000834C, + 12953: 0x00008353, + 12954: 0x0000831E, + 12955: 0x0000832C, + 12956: 0x0000834B, + 12957: 0x00008327, + 12958: 0x00008348, + 12959: 0x00008653, + 12960: 0x00008652, + 12961: 0x000086A2, + 12962: 0x000086A8, + 12963: 0x00008696, + 12964: 0x0000868D, + 12965: 0x00008691, + 12966: 0x0000869E, + 12967: 0x00008687, + 12968: 0x00008697, + 12969: 0x00008686, + 12970: 0x0000868B, + 12971: 0x0000869A, + 12972: 0x00008685, + 12973: 0x000086A5, + 12974: 0x00008699, + 12975: 0x000086A1, + 12976: 0x000086A7, + 12977: 0x00008695, + 12978: 0x00008698, + 12979: 0x0000868E, + 12980: 0x0000869D, + 12981: 0x00008690, + 12982: 0x00008694, + 12983: 0x00008843, + 12984: 0x00008844, + 12985: 0x0000886D, + 12986: 0x00008875, + 12987: 0x00008876, + 12988: 0x00008872, + 12989: 0x00008880, + 12990: 0x00008871, + 12991: 0x0000887F, + 12992: 0x0000886F, + 12993: 0x00008883, + 12994: 0x0000887E, + 12995: 0x00008874, + 12996: 0x0000887C, + 12997: 0x00008A12, + 12998: 0x00008C47, + 12999: 0x00008C57, + 13000: 0x00008C7B, + 13001: 0x00008CA4, + 13002: 0x00008CA3, + 13003: 0x00008D76, + 13004: 0x00008D78, + 13005: 0x00008DB5, + 13006: 0x00008DB7, + 13007: 0x00008DB6, + 13008: 0x00008ED1, + 13009: 0x00008ED3, + 13010: 0x00008FFE, + 13011: 0x00008FF5, + 13012: 0x00009002, + 13013: 0x00008FFF, + 13014: 0x00008FFB, + 13015: 0x00009004, + 13016: 0x00008FFC, + 13017: 0x00008FF6, + 13018: 0x000090D6, + 13019: 0x000090E0, + 13020: 0x000090D9, + 13021: 0x000090DA, + 13022: 0x000090E3, + 13023: 0x000090DF, + 13024: 0x000090E5, + 13025: 0x000090D8, + 13026: 0x000090DB, + 13027: 0x000090D7, + 13028: 0x000090DC, + 13029: 0x000090E4, + 13030: 0x00009150, + 13031: 0x0000914E, + 13032: 0x0000914F, + 13033: 0x000091D5, + 13034: 0x000091E2, + 13035: 0x000091DA, + 13036: 0x0000965C, + 13037: 0x0000965F, + 13038: 0x000096BC, + 13039: 0x000098E3, + 13040: 0x00009ADF, + 13041: 0x00009B2F, + 13042: 0x00004E7F, + 13043: 0x00005070, + 13044: 0x0000506A, + 13045: 0x00005061, + 13046: 0x0000505E, + 13047: 0x00005060, + 13048: 0x00005053, + 13049: 0x0000504B, + 13050: 0x0000505D, + 13051: 0x00005072, + 13052: 0x00005048, + 13053: 0x0000504D, + 13054: 0x00005041, + 13055: 0x0000505B, + 13056: 0x0000504A, + 13057: 0x00005062, + 13058: 0x00005015, + 13059: 0x00005045, + 13060: 0x0000505F, + 13061: 0x00005069, + 13062: 0x0000506B, + 13063: 0x00005063, + 13064: 0x00005064, + 13065: 0x00005046, + 13066: 0x00005040, + 13067: 0x0000506E, + 13068: 0x00005073, + 13069: 0x00005057, + 13070: 0x00005051, + 13071: 0x000051D0, + 13072: 0x0000526B, + 13073: 0x0000526D, + 13074: 0x0000526C, + 13075: 0x0000526E, + 13076: 0x000052D6, + 13077: 0x000052D3, + 13078: 0x0000532D, + 13079: 0x0000539C, + 13080: 0x00005575, + 13081: 0x00005576, + 13082: 0x0000553C, + 13083: 0x0000554D, + 13084: 0x00005550, + 13085: 0x00005534, + 13086: 0x0000552A, + 13087: 0x00005551, + 13088: 0x00005562, + 13089: 0x00005536, + 13090: 0x00005535, + 13091: 0x00005530, + 13092: 0x00005552, + 13093: 0x00005545, + 13094: 0x0000550C, + 13095: 0x00005532, + 13096: 0x00005565, + 13097: 0x0000554E, + 13098: 0x00005539, + 13099: 0x00005548, + 13100: 0x0000552D, + 13101: 0x0000553B, + 13102: 0x00005540, + 13103: 0x0000554B, + 13104: 0x0000570A, + 13105: 0x00005707, + 13106: 0x000057FB, + 13107: 0x00005814, + 13108: 0x000057E2, + 13109: 0x000057F6, + 13110: 0x000057DC, + 13111: 0x000057F4, + 13112: 0x00005800, + 13113: 0x000057ED, + 13114: 0x000057FD, + 13115: 0x00005808, + 13116: 0x000057F8, + 13117: 0x0000580B, + 13118: 0x000057F3, + 13119: 0x000057CF, + 13120: 0x00005807, + 13121: 0x000057EE, + 13122: 0x000057E3, + 13123: 0x000057F2, + 13124: 0x000057E5, + 13125: 0x000057EC, + 13126: 0x000057E1, + 13127: 0x0000580E, + 13128: 0x000057FC, + 13129: 0x00005810, + 13130: 0x000057E7, + 13131: 0x00005801, + 13132: 0x0000580C, + 13133: 0x000057F1, + 13134: 0x000057E9, + 13135: 0x000057F0, + 13136: 0x0000580D, + 13137: 0x00005804, + 13138: 0x0000595C, + 13139: 0x00005A60, + 13140: 0x00005A58, + 13141: 0x00005A55, + 13142: 0x00005A67, + 13143: 0x00005A5E, + 13144: 0x00005A38, + 13145: 0x00005A35, + 13146: 0x00005A6D, + 13147: 0x00005A50, + 13148: 0x00005A5F, + 13149: 0x00005A65, + 13150: 0x00005A6C, + 13151: 0x00005A53, + 13152: 0x00005A64, + 13153: 0x00005A57, + 13154: 0x00005A43, + 13155: 0x00005A5D, + 13156: 0x00005A52, + 13157: 0x00005A44, + 13158: 0x00005A5B, + 13159: 0x00005A48, + 13160: 0x00005A8E, + 13161: 0x00005A3E, + 13162: 0x00005A4D, + 13163: 0x00005A39, + 13164: 0x00005A4C, + 13165: 0x00005A70, + 13166: 0x00005A69, + 13167: 0x00005A47, + 13168: 0x00005A51, + 13169: 0x00005A56, + 13170: 0x00005A42, + 13171: 0x00005A5C, + 13172: 0x00005B72, + 13173: 0x00005B6E, + 13174: 0x00005BC1, + 13175: 0x00005BC0, + 13176: 0x00005C59, + 13177: 0x00005D1E, + 13178: 0x00005D0B, + 13179: 0x00005D1D, + 13180: 0x00005D1A, + 13181: 0x00005D20, + 13182: 0x00005D0C, + 13183: 0x00005D28, + 13184: 0x00005D0D, + 13185: 0x00005D26, + 13186: 0x00005D25, + 13187: 0x00005D0F, + 13188: 0x00005D30, + 13189: 0x00005D12, + 13190: 0x00005D23, + 13191: 0x00005D1F, + 13192: 0x00005D2E, + 13193: 0x00005E3E, + 13194: 0x00005E34, + 13195: 0x00005EB1, + 13196: 0x00005EB4, + 13197: 0x00005EB9, + 13198: 0x00005EB2, + 13199: 0x00005EB3, + 13200: 0x00005F36, + 13201: 0x00005F38, + 13202: 0x00005F9B, + 13203: 0x00005F96, + 13204: 0x00005F9F, + 13205: 0x0000608A, + 13206: 0x00006090, + 13207: 0x00006086, + 13208: 0x000060BE, + 13209: 0x000060B0, + 13210: 0x000060BA, + 13211: 0x000060D3, + 13212: 0x000060D4, + 13213: 0x000060CF, + 13214: 0x000060E4, + 13215: 0x000060D9, + 13216: 0x000060DD, + 13217: 0x000060C8, + 13218: 0x000060B1, + 13219: 0x000060DB, + 13220: 0x000060B7, + 13221: 0x000060CA, + 13222: 0x000060BF, + 13223: 0x000060C3, + 13224: 0x000060CD, + 13225: 0x000060C0, + 13226: 0x00006332, + 13227: 0x00006365, + 13228: 0x0000638A, + 13229: 0x00006382, + 13230: 0x0000637D, + 13231: 0x000063BD, + 13232: 0x0000639E, + 13233: 0x000063AD, + 13234: 0x0000639D, + 13235: 0x00006397, + 13236: 0x000063AB, + 13237: 0x0000638E, + 13238: 0x0000636F, + 13239: 0x00006387, + 13240: 0x00006390, + 13241: 0x0000636E, + 13242: 0x000063AF, + 13243: 0x00006375, + 13244: 0x0000639C, + 13245: 0x0000636D, + 13246: 0x000063AE, + 13247: 0x0000637C, + 13248: 0x000063A4, + 13249: 0x0000633B, + 13250: 0x0000639F, + 13251: 0x00006378, + 13252: 0x00006385, + 13253: 0x00006381, + 13254: 0x00006391, + 13255: 0x0000638D, + 13256: 0x00006370, + 13257: 0x00006553, + 13258: 0x000065CD, + 13259: 0x00006665, + 13260: 0x00006661, + 13261: 0x0000665B, + 13262: 0x00006659, + 13263: 0x0000665C, + 13264: 0x00006662, + 13265: 0x00006718, + 13266: 0x00006879, + 13267: 0x00006887, + 13268: 0x00006890, + 13269: 0x0000689C, + 13270: 0x0000686D, + 13271: 0x0000686E, + 13272: 0x000068AE, + 13273: 0x000068AB, + 13274: 0x00006956, + 13275: 0x0000686F, + 13276: 0x000068A3, + 13277: 0x000068AC, + 13278: 0x000068A9, + 13279: 0x00006875, + 13280: 0x00006874, + 13281: 0x000068B2, + 13282: 0x0000688F, + 13283: 0x00006877, + 13284: 0x00006892, + 13285: 0x0000687C, + 13286: 0x0000686B, + 13287: 0x00006872, + 13288: 0x000068AA, + 13289: 0x00006880, + 13290: 0x00006871, + 13291: 0x0000687E, + 13292: 0x0000689B, + 13293: 0x00006896, + 13294: 0x0000688B, + 13295: 0x000068A0, + 13296: 0x00006889, + 13297: 0x000068A4, + 13298: 0x00006878, + 13299: 0x0000687B, + 13300: 0x00006891, + 13301: 0x0000688C, + 13302: 0x0000688A, + 13303: 0x0000687D, + 13304: 0x00006B36, + 13305: 0x00006B33, + 13306: 0x00006B37, + 13307: 0x00006B38, + 13308: 0x00006B91, + 13309: 0x00006B8F, + 13310: 0x00006B8D, + 13311: 0x00006B8E, + 13312: 0x00006B8C, + 13313: 0x00006C2A, + 13314: 0x00006DC0, + 13315: 0x00006DAB, + 13316: 0x00006DB4, + 13317: 0x00006DB3, + 13318: 0x00006E74, + 13319: 0x00006DAC, + 13320: 0x00006DE9, + 13321: 0x00006DE2, + 13322: 0x00006DB7, + 13323: 0x00006DF6, + 13324: 0x00006DD4, + 13325: 0x00006E00, + 13326: 0x00006DC8, + 13327: 0x00006DE0, + 13328: 0x00006DDF, + 13329: 0x00006DD6, + 13330: 0x00006DBE, + 13331: 0x00006DE5, + 13332: 0x00006DDC, + 13333: 0x00006DDD, + 13334: 0x00006DDB, + 13335: 0x00006DF4, + 13336: 0x00006DCA, + 13337: 0x00006DBD, + 13338: 0x00006DED, + 13339: 0x00006DF0, + 13340: 0x00006DBA, + 13341: 0x00006DD5, + 13342: 0x00006DC2, + 13343: 0x00006DCF, + 13344: 0x00006DC9, + 13345: 0x00006DD0, + 13346: 0x00006DF2, + 13347: 0x00006DD3, + 13348: 0x00006DFD, + 13349: 0x00006DD7, + 13350: 0x00006DCD, + 13351: 0x00006DE3, + 13352: 0x00006DBB, + 13353: 0x000070FA, + 13354: 0x0000710D, + 13355: 0x000070F7, + 13356: 0x00007117, + 13357: 0x000070F4, + 13358: 0x0000710C, + 13359: 0x000070F0, + 13360: 0x00007104, + 13361: 0x000070F3, + 13362: 0x00007110, + 13363: 0x000070FC, + 13364: 0x000070FF, + 13365: 0x00007106, + 13366: 0x00007113, + 13367: 0x00007100, + 13368: 0x000070F8, + 13369: 0x000070F6, + 13370: 0x0000710B, + 13371: 0x00007102, + 13372: 0x0000710E, + 13373: 0x0000727E, + 13374: 0x0000727B, + 13375: 0x0000727C, + 13376: 0x0000727F, + 13377: 0x0000731D, + 13378: 0x00007317, + 13379: 0x00007307, + 13380: 0x00007311, + 13381: 0x00007318, + 13382: 0x0000730A, + 13383: 0x00007308, + 13384: 0x000072FF, + 13385: 0x0000730F, + 13386: 0x0000731E, + 13387: 0x00007388, + 13388: 0x000073F6, + 13389: 0x000073F8, + 13390: 0x000073F5, + 13391: 0x00007404, + 13392: 0x00007401, + 13393: 0x000073FD, + 13394: 0x00007407, + 13395: 0x00007400, + 13396: 0x000073FA, + 13397: 0x000073FC, + 13398: 0x000073FF, + 13399: 0x0000740C, + 13400: 0x0000740B, + 13401: 0x000073F4, + 13402: 0x00007408, + 13403: 0x00007564, + 13404: 0x00007563, + 13405: 0x000075CE, + 13406: 0x000075D2, + 13407: 0x000075CF, + 13408: 0x000075CB, + 13409: 0x000075CC, + 13410: 0x000075D1, + 13411: 0x000075D0, + 13412: 0x0000768F, + 13413: 0x00007689, + 13414: 0x000076D3, + 13415: 0x00007739, + 13416: 0x0000772F, + 13417: 0x0000772D, + 13418: 0x00007731, + 13419: 0x00007732, + 13420: 0x00007734, + 13421: 0x00007733, + 13422: 0x0000773D, + 13423: 0x00007725, + 13424: 0x0000773B, + 13425: 0x00007735, + 13426: 0x00007848, + 13427: 0x00007852, + 13428: 0x00007849, + 13429: 0x0000784D, + 13430: 0x0000784A, + 13431: 0x0000784C, + 13432: 0x00007826, + 13433: 0x00007845, + 13434: 0x00007850, + 13435: 0x00007964, + 13436: 0x00007967, + 13437: 0x00007969, + 13438: 0x0000796A, + 13439: 0x00007963, + 13440: 0x0000796B, + 13441: 0x00007961, + 13442: 0x000079BB, + 13443: 0x000079FA, + 13444: 0x000079F8, + 13445: 0x000079F6, + 13446: 0x000079F7, + 13447: 0x00007A8F, + 13448: 0x00007A94, + 13449: 0x00007A90, + 13450: 0x00007B35, + 13451: 0x00007B47, + 13452: 0x00007B34, + 13453: 0x00007B25, + 13454: 0x00007B30, + 13455: 0x00007B22, + 13456: 0x00007B24, + 13457: 0x00007B33, + 13458: 0x00007B18, + 13459: 0x00007B2A, + 13460: 0x00007B1D, + 13461: 0x00007B31, + 13462: 0x00007B2B, + 13463: 0x00007B2D, + 13464: 0x00007B2F, + 13465: 0x00007B32, + 13466: 0x00007B38, + 13467: 0x00007B1A, + 13468: 0x00007B23, + 13469: 0x00007C94, + 13470: 0x00007C98, + 13471: 0x00007C96, + 13472: 0x00007CA3, + 13473: 0x00007D35, + 13474: 0x00007D3D, + 13475: 0x00007D38, + 13476: 0x00007D36, + 13477: 0x00007D3A, + 13478: 0x00007D45, + 13479: 0x00007D2C, + 13480: 0x00007D29, + 13481: 0x00007D41, + 13482: 0x00007D47, + 13483: 0x00007D3E, + 13484: 0x00007D3F, + 13485: 0x00007D4A, + 13486: 0x00007D3B, + 13487: 0x00007D28, + 13488: 0x00007F63, + 13489: 0x00007F95, + 13490: 0x00007F9C, + 13491: 0x00007F9D, + 13492: 0x00007F9B, + 13493: 0x00007FCA, + 13494: 0x00007FCB, + 13495: 0x00007FCD, + 13496: 0x00007FD0, + 13497: 0x00007FD1, + 13498: 0x00007FC7, + 13499: 0x00007FCF, + 13500: 0x00007FC9, + 13501: 0x0000801F, + 13502: 0x0000801E, + 13503: 0x0000801B, + 13504: 0x00008047, + 13505: 0x00008043, + 13506: 0x00008048, + 13507: 0x00008118, + 13508: 0x00008125, + 13509: 0x00008119, + 13510: 0x0000811B, + 13511: 0x0000812D, + 13512: 0x0000811F, + 13513: 0x0000812C, + 13514: 0x0000811E, + 13515: 0x00008121, + 13516: 0x00008115, + 13517: 0x00008127, + 13518: 0x0000811D, + 13519: 0x00008122, + 13520: 0x00008211, + 13521: 0x00008238, + 13522: 0x00008233, + 13523: 0x0000823A, + 13524: 0x00008234, + 13525: 0x00008232, + 13526: 0x00008274, + 13527: 0x00008390, + 13528: 0x000083A3, + 13529: 0x000083A8, + 13530: 0x0000838D, + 13531: 0x0000837A, + 13532: 0x00008373, + 13533: 0x000083A4, + 13534: 0x00008374, + 13535: 0x0000838F, + 13536: 0x00008381, + 13537: 0x00008395, + 13538: 0x00008399, + 13539: 0x00008375, + 13540: 0x00008394, + 13541: 0x000083A9, + 13542: 0x0000837D, + 13543: 0x00008383, + 13544: 0x0000838C, + 13545: 0x0000839D, + 13546: 0x0000839B, + 13547: 0x000083AA, + 13548: 0x0000838B, + 13549: 0x0000837E, + 13550: 0x000083A5, + 13551: 0x000083AF, + 13552: 0x00008388, + 13553: 0x00008397, + 13554: 0x000083B0, + 13555: 0x0000837F, + 13556: 0x000083A6, + 13557: 0x00008387, + 13558: 0x000083AE, + 13559: 0x00008376, + 13560: 0x0000839A, + 13561: 0x00008659, + 13562: 0x00008656, + 13563: 0x000086BF, + 13564: 0x000086B7, + 13565: 0x000086C2, + 13566: 0x000086C1, + 13567: 0x000086C5, + 13568: 0x000086BA, + 13569: 0x000086B0, + 13570: 0x000086C8, + 13571: 0x000086B9, + 13572: 0x000086B3, + 13573: 0x000086B8, + 13574: 0x000086CC, + 13575: 0x000086B4, + 13576: 0x000086BB, + 13577: 0x000086BC, + 13578: 0x000086C3, + 13579: 0x000086BD, + 13580: 0x000086BE, + 13581: 0x00008852, + 13582: 0x00008889, + 13583: 0x00008895, + 13584: 0x000088A8, + 13585: 0x000088A2, + 13586: 0x000088AA, + 13587: 0x0000889A, + 13588: 0x00008891, + 13589: 0x000088A1, + 13590: 0x0000889F, + 13591: 0x00008898, + 13592: 0x000088A7, + 13593: 0x00008899, + 13594: 0x0000889B, + 13595: 0x00008897, + 13596: 0x000088A4, + 13597: 0x000088AC, + 13598: 0x0000888C, + 13599: 0x00008893, + 13600: 0x0000888E, + 13601: 0x00008982, + 13602: 0x000089D6, + 13603: 0x000089D9, + 13604: 0x000089D5, + 13605: 0x00008A30, + 13606: 0x00008A27, + 13607: 0x00008A2C, + 13608: 0x00008A1E, + 13609: 0x00008C39, + 13610: 0x00008C3B, + 13611: 0x00008C5C, + 13612: 0x00008C5D, + 13613: 0x00008C7D, + 13614: 0x00008CA5, + 13615: 0x00008D7D, + 13616: 0x00008D7B, + 13617: 0x00008D79, + 13618: 0x00008DBC, + 13619: 0x00008DC2, + 13620: 0x00008DB9, + 13621: 0x00008DBF, + 13622: 0x00008DC1, + 13623: 0x00008ED8, + 13624: 0x00008EDE, + 13625: 0x00008EDD, + 13626: 0x00008EDC, + 13627: 0x00008ED7, + 13628: 0x00008EE0, + 13629: 0x00008EE1, + 13630: 0x00009024, + 13631: 0x0000900B, + 13632: 0x00009011, + 13633: 0x0000901C, + 13634: 0x0000900C, + 13635: 0x00009021, + 13636: 0x000090EF, + 13637: 0x000090EA, + 13638: 0x000090F0, + 13639: 0x000090F4, + 13640: 0x000090F2, + 13641: 0x000090F3, + 13642: 0x000090D4, + 13643: 0x000090EB, + 13644: 0x000090EC, + 13645: 0x000090E9, + 13646: 0x00009156, + 13647: 0x00009158, + 13648: 0x0000915A, + 13649: 0x00009153, + 13650: 0x00009155, + 13651: 0x000091EC, + 13652: 0x000091F4, + 13653: 0x000091F1, + 13654: 0x000091F3, + 13655: 0x000091F8, + 13656: 0x000091E4, + 13657: 0x000091F9, + 13658: 0x000091EA, + 13659: 0x000091EB, + 13660: 0x000091F7, + 13661: 0x000091E8, + 13662: 0x000091EE, + 13663: 0x0000957A, + 13664: 0x00009586, + 13665: 0x00009588, + 13666: 0x0000967C, + 13667: 0x0000966D, + 13668: 0x0000966B, + 13669: 0x00009671, + 13670: 0x0000966F, + 13671: 0x000096BF, + 13672: 0x0000976A, + 13673: 0x00009804, + 13674: 0x000098E5, + 13675: 0x00009997, + 13676: 0x0000509B, + 13677: 0x00005095, + 13678: 0x00005094, + 13679: 0x0000509E, + 13680: 0x0000508B, + 13681: 0x000050A3, + 13682: 0x00005083, + 13683: 0x0000508C, + 13684: 0x0000508E, + 13685: 0x0000509D, + 13686: 0x00005068, + 13687: 0x0000509C, + 13688: 0x00005092, + 13689: 0x00005082, + 13690: 0x00005087, + 13691: 0x0000515F, + 13692: 0x000051D4, + 13693: 0x00005312, + 13694: 0x00005311, + 13695: 0x000053A4, + 13696: 0x000053A7, + 13697: 0x00005591, + 13698: 0x000055A8, + 13699: 0x000055A5, + 13700: 0x000055AD, + 13701: 0x00005577, + 13702: 0x00005645, + 13703: 0x000055A2, + 13704: 0x00005593, + 13705: 0x00005588, + 13706: 0x0000558F, + 13707: 0x000055B5, + 13708: 0x00005581, + 13709: 0x000055A3, + 13710: 0x00005592, + 13711: 0x000055A4, + 13712: 0x0000557D, + 13713: 0x0000558C, + 13714: 0x000055A6, + 13715: 0x0000557F, + 13716: 0x00005595, + 13717: 0x000055A1, + 13718: 0x0000558E, + 13719: 0x0000570C, + 13720: 0x00005829, + 13721: 0x00005837, + 13722: 0x00005819, + 13723: 0x0000581E, + 13724: 0x00005827, + 13725: 0x00005823, + 13726: 0x00005828, + 13727: 0x000057F5, + 13728: 0x00005848, + 13729: 0x00005825, + 13730: 0x0000581C, + 13731: 0x0000581B, + 13732: 0x00005833, + 13733: 0x0000583F, + 13734: 0x00005836, + 13735: 0x0000582E, + 13736: 0x00005839, + 13737: 0x00005838, + 13738: 0x0000582D, + 13739: 0x0000582C, + 13740: 0x0000583B, + 13741: 0x00005961, + 13742: 0x00005AAF, + 13743: 0x00005A94, + 13744: 0x00005A9F, + 13745: 0x00005A7A, + 13746: 0x00005AA2, + 13747: 0x00005A9E, + 13748: 0x00005A78, + 13749: 0x00005AA6, + 13750: 0x00005A7C, + 13751: 0x00005AA5, + 13752: 0x00005AAC, + 13753: 0x00005A95, + 13754: 0x00005AAE, + 13755: 0x00005A37, + 13756: 0x00005A84, + 13757: 0x00005A8A, + 13758: 0x00005A97, + 13759: 0x00005A83, + 13760: 0x00005A8B, + 13761: 0x00005AA9, + 13762: 0x00005A7B, + 13763: 0x00005A7D, + 13764: 0x00005A8C, + 13765: 0x00005A9C, + 13766: 0x00005A8F, + 13767: 0x00005A93, + 13768: 0x00005A9D, + 13769: 0x00005BEA, + 13770: 0x00005BCD, + 13771: 0x00005BCB, + 13772: 0x00005BD4, + 13773: 0x00005BD1, + 13774: 0x00005BCA, + 13775: 0x00005BCE, + 13776: 0x00005C0C, + 13777: 0x00005C30, + 13778: 0x00005D37, + 13779: 0x00005D43, + 13780: 0x00005D6B, + 13781: 0x00005D41, + 13782: 0x00005D4B, + 13783: 0x00005D3F, + 13784: 0x00005D35, + 13785: 0x00005D51, + 13786: 0x00005D4E, + 13787: 0x00005D55, + 13788: 0x00005D33, + 13789: 0x00005D3A, + 13790: 0x00005D52, + 13791: 0x00005D3D, + 13792: 0x00005D31, + 13793: 0x00005D59, + 13794: 0x00005D42, + 13795: 0x00005D39, + 13796: 0x00005D49, + 13797: 0x00005D38, + 13798: 0x00005D3C, + 13799: 0x00005D32, + 13800: 0x00005D36, + 13801: 0x00005D40, + 13802: 0x00005D45, + 13803: 0x00005E44, + 13804: 0x00005E41, + 13805: 0x00005F58, + 13806: 0x00005FA6, + 13807: 0x00005FA5, + 13808: 0x00005FAB, + 13809: 0x000060C9, + 13810: 0x000060B9, + 13811: 0x000060CC, + 13812: 0x000060E2, + 13813: 0x000060CE, + 13814: 0x000060C4, + 13815: 0x00006114, + 13816: 0x000060F2, + 13817: 0x0000610A, + 13818: 0x00006116, + 13819: 0x00006105, + 13820: 0x000060F5, + 13821: 0x00006113, + 13822: 0x000060F8, + 13823: 0x000060FC, + 13824: 0x000060FE, + 13825: 0x000060C1, + 13826: 0x00006103, + 13827: 0x00006118, + 13828: 0x0000611D, + 13829: 0x00006110, + 13830: 0x000060FF, + 13831: 0x00006104, + 13832: 0x0000610B, + 13833: 0x0000624A, + 13834: 0x00006394, + 13835: 0x000063B1, + 13836: 0x000063B0, + 13837: 0x000063CE, + 13838: 0x000063E5, + 13839: 0x000063E8, + 13840: 0x000063EF, + 13841: 0x000063C3, + 13842: 0x0000649D, + 13843: 0x000063F3, + 13844: 0x000063CA, + 13845: 0x000063E0, + 13846: 0x000063F6, + 13847: 0x000063D5, + 13848: 0x000063F2, + 13849: 0x000063F5, + 13850: 0x00006461, + 13851: 0x000063DF, + 13852: 0x000063BE, + 13853: 0x000063DD, + 13854: 0x000063DC, + 13855: 0x000063C4, + 13856: 0x000063D8, + 13857: 0x000063D3, + 13858: 0x000063C2, + 13859: 0x000063C7, + 13860: 0x000063CC, + 13861: 0x000063CB, + 13862: 0x000063C8, + 13863: 0x000063F0, + 13864: 0x000063D7, + 13865: 0x000063D9, + 13866: 0x00006532, + 13867: 0x00006567, + 13868: 0x0000656A, + 13869: 0x00006564, + 13870: 0x0000655C, + 13871: 0x00006568, + 13872: 0x00006565, + 13873: 0x0000658C, + 13874: 0x0000659D, + 13875: 0x0000659E, + 13876: 0x000065AE, + 13877: 0x000065D0, + 13878: 0x000065D2, + 13879: 0x0000667C, + 13880: 0x0000666C, + 13881: 0x0000667B, + 13882: 0x00006680, + 13883: 0x00006671, + 13884: 0x00006679, + 13885: 0x0000666A, + 13886: 0x00006672, + 13887: 0x00006701, + 13888: 0x0000690C, + 13889: 0x000068D3, + 13890: 0x00006904, + 13891: 0x000068DC, + 13892: 0x0000692A, + 13893: 0x000068EC, + 13894: 0x000068EA, + 13895: 0x000068F1, + 13896: 0x0000690F, + 13897: 0x000068D6, + 13898: 0x000068F7, + 13899: 0x000068EB, + 13900: 0x000068E4, + 13901: 0x000068F6, + 13902: 0x00006913, + 13903: 0x00006910, + 13904: 0x000068F3, + 13905: 0x000068E1, + 13906: 0x00006907, + 13907: 0x000068CC, + 13908: 0x00006908, + 13909: 0x00006970, + 13910: 0x000068B4, + 13911: 0x00006911, + 13912: 0x000068EF, + 13913: 0x000068C6, + 13914: 0x00006914, + 13915: 0x000068F8, + 13916: 0x000068D0, + 13917: 0x000068FD, + 13918: 0x000068FC, + 13919: 0x000068E8, + 13920: 0x0000690B, + 13921: 0x0000690A, + 13922: 0x00006917, + 13923: 0x000068CE, + 13924: 0x000068C8, + 13925: 0x000068DD, + 13926: 0x000068DE, + 13927: 0x000068E6, + 13928: 0x000068F4, + 13929: 0x000068D1, + 13930: 0x00006906, + 13931: 0x000068D4, + 13932: 0x000068E9, + 13933: 0x00006915, + 13934: 0x00006925, + 13935: 0x000068C7, + 13936: 0x00006B39, + 13937: 0x00006B3B, + 13938: 0x00006B3F, + 13939: 0x00006B3C, + 13940: 0x00006B94, + 13941: 0x00006B97, + 13942: 0x00006B99, + 13943: 0x00006B95, + 13944: 0x00006BBD, + 13945: 0x00006BF0, + 13946: 0x00006BF2, + 13947: 0x00006BF3, + 13948: 0x00006C30, + 13949: 0x00006DFC, + 13950: 0x00006E46, + 13951: 0x00006E47, + 13952: 0x00006E1F, + 13953: 0x00006E49, + 13954: 0x00006E88, + 13955: 0x00006E3C, + 13956: 0x00006E3D, + 13957: 0x00006E45, + 13958: 0x00006E62, + 13959: 0x00006E2B, + 13960: 0x00006E3F, + 13961: 0x00006E41, + 13962: 0x00006E5D, + 13963: 0x00006E73, + 13964: 0x00006E1C, + 13965: 0x00006E33, + 13966: 0x00006E4B, + 13967: 0x00006E40, + 13968: 0x00006E51, + 13969: 0x00006E3B, + 13970: 0x00006E03, + 13971: 0x00006E2E, + 13972: 0x00006E5E, + 13973: 0x00006E68, + 13974: 0x00006E5C, + 13975: 0x00006E61, + 13976: 0x00006E31, + 13977: 0x00006E28, + 13978: 0x00006E60, + 13979: 0x00006E71, + 13980: 0x00006E6B, + 13981: 0x00006E39, + 13982: 0x00006E22, + 13983: 0x00006E30, + 13984: 0x00006E53, + 13985: 0x00006E65, + 13986: 0x00006E27, + 13987: 0x00006E78, + 13988: 0x00006E64, + 13989: 0x00006E77, + 13990: 0x00006E55, + 13991: 0x00006E79, + 13992: 0x00006E52, + 13993: 0x00006E66, + 13994: 0x00006E35, + 13995: 0x00006E36, + 13996: 0x00006E5A, + 13997: 0x00007120, + 13998: 0x0000711E, + 13999: 0x0000712F, + 14000: 0x000070FB, + 14001: 0x0000712E, + 14002: 0x00007131, + 14003: 0x00007123, + 14004: 0x00007125, + 14005: 0x00007122, + 14006: 0x00007132, + 14007: 0x0000711F, + 14008: 0x00007128, + 14009: 0x0000713A, + 14010: 0x0000711B, + 14011: 0x0000724B, + 14012: 0x0000725A, + 14013: 0x00007288, + 14014: 0x00007289, + 14015: 0x00007286, + 14016: 0x00007285, + 14017: 0x0000728B, + 14018: 0x00007312, + 14019: 0x0000730B, + 14020: 0x00007330, + 14021: 0x00007322, + 14022: 0x00007331, + 14023: 0x00007333, + 14024: 0x00007327, + 14025: 0x00007332, + 14026: 0x0000732D, + 14027: 0x00007326, + 14028: 0x00007323, + 14029: 0x00007335, + 14030: 0x0000730C, + 14031: 0x0000742E, + 14032: 0x0000742C, + 14033: 0x00007430, + 14034: 0x0000742B, + 14035: 0x00007416, + 14036: 0x0000741A, + 14037: 0x00007421, + 14038: 0x0000742D, + 14039: 0x00007431, + 14040: 0x00007424, + 14041: 0x00007423, + 14042: 0x0000741D, + 14043: 0x00007429, + 14044: 0x00007420, + 14045: 0x00007432, + 14046: 0x000074FB, + 14047: 0x0000752F, + 14048: 0x0000756F, + 14049: 0x0000756C, + 14050: 0x000075E7, + 14051: 0x000075DA, + 14052: 0x000075E1, + 14053: 0x000075E6, + 14054: 0x000075DD, + 14055: 0x000075DF, + 14056: 0x000075E4, + 14057: 0x000075D7, + 14058: 0x00007695, + 14059: 0x00007692, + 14060: 0x000076DA, + 14061: 0x00007746, + 14062: 0x00007747, + 14063: 0x00007744, + 14064: 0x0000774D, + 14065: 0x00007745, + 14066: 0x0000774A, + 14067: 0x0000774E, + 14068: 0x0000774B, + 14069: 0x0000774C, + 14070: 0x000077DE, + 14071: 0x000077EC, + 14072: 0x00007860, + 14073: 0x00007864, + 14074: 0x00007865, + 14075: 0x0000785C, + 14076: 0x0000786D, + 14077: 0x00007871, + 14078: 0x0000786A, + 14079: 0x0000786E, + 14080: 0x00007870, + 14081: 0x00007869, + 14082: 0x00007868, + 14083: 0x0000785E, + 14084: 0x00007862, + 14085: 0x00007974, + 14086: 0x00007973, + 14087: 0x00007972, + 14088: 0x00007970, + 14089: 0x00007A02, + 14090: 0x00007A0A, + 14091: 0x00007A03, + 14092: 0x00007A0C, + 14093: 0x00007A04, + 14094: 0x00007A99, + 14095: 0x00007AE6, + 14096: 0x00007AE4, + 14097: 0x00007B4A, + 14098: 0x00007B3B, + 14099: 0x00007B44, + 14100: 0x00007B48, + 14101: 0x00007B4C, + 14102: 0x00007B4E, + 14103: 0x00007B40, + 14104: 0x00007B58, + 14105: 0x00007B45, + 14106: 0x00007CA2, + 14107: 0x00007C9E, + 14108: 0x00007CA8, + 14109: 0x00007CA1, + 14110: 0x00007D58, + 14111: 0x00007D6F, + 14112: 0x00007D63, + 14113: 0x00007D53, + 14114: 0x00007D56, + 14115: 0x00007D67, + 14116: 0x00007D6A, + 14117: 0x00007D4F, + 14118: 0x00007D6D, + 14119: 0x00007D5C, + 14120: 0x00007D6B, + 14121: 0x00007D52, + 14122: 0x00007D54, + 14123: 0x00007D69, + 14124: 0x00007D51, + 14125: 0x00007D5F, + 14126: 0x00007D4E, + 14127: 0x00007F3E, + 14128: 0x00007F3F, + 14129: 0x00007F65, + 14130: 0x00007F66, + 14131: 0x00007FA2, + 14132: 0x00007FA0, + 14133: 0x00007FA1, + 14134: 0x00007FD7, + 14135: 0x00008051, + 14136: 0x0000804F, + 14137: 0x00008050, + 14138: 0x000080FE, + 14139: 0x000080D4, + 14140: 0x00008143, + 14141: 0x0000814A, + 14142: 0x00008152, + 14143: 0x0000814F, + 14144: 0x00008147, + 14145: 0x0000813D, + 14146: 0x0000814D, + 14147: 0x0000813A, + 14148: 0x000081E6, + 14149: 0x000081EE, + 14150: 0x000081F7, + 14151: 0x000081F8, + 14152: 0x000081F9, + 14153: 0x00008204, + 14154: 0x0000823C, + 14155: 0x0000823D, + 14156: 0x0000823F, + 14157: 0x00008275, + 14158: 0x0000833B, + 14159: 0x000083CF, + 14160: 0x000083F9, + 14161: 0x00008423, + 14162: 0x000083C0, + 14163: 0x000083E8, + 14164: 0x00008412, + 14165: 0x000083E7, + 14166: 0x000083E4, + 14167: 0x000083FC, + 14168: 0x000083F6, + 14169: 0x00008410, + 14170: 0x000083C6, + 14171: 0x000083C8, + 14172: 0x000083EB, + 14173: 0x000083E3, + 14174: 0x000083BF, + 14175: 0x00008401, + 14176: 0x000083DD, + 14177: 0x000083E5, + 14178: 0x000083D8, + 14179: 0x000083FF, + 14180: 0x000083E1, + 14181: 0x000083CB, + 14182: 0x000083CE, + 14183: 0x000083D6, + 14184: 0x000083F5, + 14185: 0x000083C9, + 14186: 0x00008409, + 14187: 0x0000840F, + 14188: 0x000083DE, + 14189: 0x00008411, + 14190: 0x00008406, + 14191: 0x000083C2, + 14192: 0x000083F3, + 14193: 0x000083D5, + 14194: 0x000083FA, + 14195: 0x000083C7, + 14196: 0x000083D1, + 14197: 0x000083EA, + 14198: 0x00008413, + 14199: 0x000083C3, + 14200: 0x000083EC, + 14201: 0x000083EE, + 14202: 0x000083C4, + 14203: 0x000083FB, + 14204: 0x000083D7, + 14205: 0x000083E2, + 14206: 0x0000841B, + 14207: 0x000083DB, + 14208: 0x000083FE, + 14209: 0x000086D8, + 14210: 0x000086E2, + 14211: 0x000086E6, + 14212: 0x000086D3, + 14213: 0x000086E3, + 14214: 0x000086DA, + 14215: 0x000086EA, + 14216: 0x000086DD, + 14217: 0x000086EB, + 14218: 0x000086DC, + 14219: 0x000086EC, + 14220: 0x000086E9, + 14221: 0x000086D7, + 14222: 0x000086E8, + 14223: 0x000086D1, + 14224: 0x00008848, + 14225: 0x00008856, + 14226: 0x00008855, + 14227: 0x000088BA, + 14228: 0x000088D7, + 14229: 0x000088B9, + 14230: 0x000088B8, + 14231: 0x000088C0, + 14232: 0x000088BE, + 14233: 0x000088B6, + 14234: 0x000088BC, + 14235: 0x000088B7, + 14236: 0x000088BD, + 14237: 0x000088B2, + 14238: 0x00008901, + 14239: 0x000088C9, + 14240: 0x00008995, + 14241: 0x00008998, + 14242: 0x00008997, + 14243: 0x000089DD, + 14244: 0x000089DA, + 14245: 0x000089DB, + 14246: 0x00008A4E, + 14247: 0x00008A4D, + 14248: 0x00008A39, + 14249: 0x00008A59, + 14250: 0x00008A40, + 14251: 0x00008A57, + 14252: 0x00008A58, + 14253: 0x00008A44, + 14254: 0x00008A45, + 14255: 0x00008A52, + 14256: 0x00008A48, + 14257: 0x00008A51, + 14258: 0x00008A4A, + 14259: 0x00008A4C, + 14260: 0x00008A4F, + 14261: 0x00008C5F, + 14262: 0x00008C81, + 14263: 0x00008C80, + 14264: 0x00008CBA, + 14265: 0x00008CBE, + 14266: 0x00008CB0, + 14267: 0x00008CB9, + 14268: 0x00008CB5, + 14269: 0x00008D84, + 14270: 0x00008D80, + 14271: 0x00008D89, + 14272: 0x00008DD8, + 14273: 0x00008DD3, + 14274: 0x00008DCD, + 14275: 0x00008DC7, + 14276: 0x00008DD6, + 14277: 0x00008DDC, + 14278: 0x00008DCF, + 14279: 0x00008DD5, + 14280: 0x00008DD9, + 14281: 0x00008DC8, + 14282: 0x00008DD7, + 14283: 0x00008DC5, + 14284: 0x00008EEF, + 14285: 0x00008EF7, + 14286: 0x00008EFA, + 14287: 0x00008EF9, + 14288: 0x00008EE6, + 14289: 0x00008EEE, + 14290: 0x00008EE5, + 14291: 0x00008EF5, + 14292: 0x00008EE7, + 14293: 0x00008EE8, + 14294: 0x00008EF6, + 14295: 0x00008EEB, + 14296: 0x00008EF1, + 14297: 0x00008EEC, + 14298: 0x00008EF4, + 14299: 0x00008EE9, + 14300: 0x0000902D, + 14301: 0x00009034, + 14302: 0x0000902F, + 14303: 0x00009106, + 14304: 0x0000912C, + 14305: 0x00009104, + 14306: 0x000090FF, + 14307: 0x000090FC, + 14308: 0x00009108, + 14309: 0x000090F9, + 14310: 0x000090FB, + 14311: 0x00009101, + 14312: 0x00009100, + 14313: 0x00009107, + 14314: 0x00009105, + 14315: 0x00009103, + 14316: 0x00009161, + 14317: 0x00009164, + 14318: 0x0000915F, + 14319: 0x00009162, + 14320: 0x00009160, + 14321: 0x00009201, + 14322: 0x0000920A, + 14323: 0x00009225, + 14324: 0x00009203, + 14325: 0x0000921A, + 14326: 0x00009226, + 14327: 0x0000920F, + 14328: 0x0000920C, + 14329: 0x00009200, + 14330: 0x00009212, + 14331: 0x000091FF, + 14332: 0x000091FD, + 14333: 0x00009206, + 14334: 0x00009204, + 14335: 0x00009227, + 14336: 0x00009202, + 14337: 0x0000921C, + 14338: 0x00009224, + 14339: 0x00009219, + 14340: 0x00009217, + 14341: 0x00009205, + 14342: 0x00009216, + 14343: 0x0000957B, + 14344: 0x0000958D, + 14345: 0x0000958C, + 14346: 0x00009590, + 14347: 0x00009687, + 14348: 0x0000967E, + 14349: 0x00009688, + 14350: 0x00009689, + 14351: 0x00009683, + 14352: 0x00009680, + 14353: 0x000096C2, + 14354: 0x000096C8, + 14355: 0x000096C3, + 14356: 0x000096F1, + 14357: 0x000096F0, + 14358: 0x0000976C, + 14359: 0x00009770, + 14360: 0x0000976E, + 14361: 0x00009807, + 14362: 0x000098A9, + 14363: 0x000098EB, + 14364: 0x00009CE6, + 14365: 0x00009EF9, + 14366: 0x00004E83, + 14367: 0x00004E84, + 14368: 0x00004EB6, + 14369: 0x000050BD, + 14370: 0x000050BF, + 14371: 0x000050C6, + 14372: 0x000050AE, + 14373: 0x000050C4, + 14374: 0x000050CA, + 14375: 0x000050B4, + 14376: 0x000050C8, + 14377: 0x000050C2, + 14378: 0x000050B0, + 14379: 0x000050C1, + 14380: 0x000050BA, + 14381: 0x000050B1, + 14382: 0x000050CB, + 14383: 0x000050C9, + 14384: 0x000050B6, + 14385: 0x000050B8, + 14386: 0x000051D7, + 14387: 0x0000527A, + 14388: 0x00005278, + 14389: 0x0000527B, + 14390: 0x0000527C, + 14391: 0x000055C3, + 14392: 0x000055DB, + 14393: 0x000055CC, + 14394: 0x000055D0, + 14395: 0x000055CB, + 14396: 0x000055CA, + 14397: 0x000055DD, + 14398: 0x000055C0, + 14399: 0x000055D4, + 14400: 0x000055C4, + 14401: 0x000055E9, + 14402: 0x000055BF, + 14403: 0x000055D2, + 14404: 0x0000558D, + 14405: 0x000055CF, + 14406: 0x000055D5, + 14407: 0x000055E2, + 14408: 0x000055D6, + 14409: 0x000055C8, + 14410: 0x000055F2, + 14411: 0x000055CD, + 14412: 0x000055D9, + 14413: 0x000055C2, + 14414: 0x00005714, + 14415: 0x00005853, + 14416: 0x00005868, + 14417: 0x00005864, + 14418: 0x0000584F, + 14419: 0x0000584D, + 14420: 0x00005849, + 14421: 0x0000586F, + 14422: 0x00005855, + 14423: 0x0000584E, + 14424: 0x0000585D, + 14425: 0x00005859, + 14426: 0x00005865, + 14427: 0x0000585B, + 14428: 0x0000583D, + 14429: 0x00005863, + 14430: 0x00005871, + 14431: 0x000058FC, + 14432: 0x00005AC7, + 14433: 0x00005AC4, + 14434: 0x00005ACB, + 14435: 0x00005ABA, + 14436: 0x00005AB8, + 14437: 0x00005AB1, + 14438: 0x00005AB5, + 14439: 0x00005AB0, + 14440: 0x00005ABF, + 14441: 0x00005AC8, + 14442: 0x00005ABB, + 14443: 0x00005AC6, + 14444: 0x00005AB7, + 14445: 0x00005AC0, + 14446: 0x00005ACA, + 14447: 0x00005AB4, + 14448: 0x00005AB6, + 14449: 0x00005ACD, + 14450: 0x00005AB9, + 14451: 0x00005A90, + 14452: 0x00005BD6, + 14453: 0x00005BD8, + 14454: 0x00005BD9, + 14455: 0x00005C1F, + 14456: 0x00005C33, + 14457: 0x00005D71, + 14458: 0x00005D63, + 14459: 0x00005D4A, + 14460: 0x00005D65, + 14461: 0x00005D72, + 14462: 0x00005D6C, + 14463: 0x00005D5E, + 14464: 0x00005D68, + 14465: 0x00005D67, + 14466: 0x00005D62, + 14467: 0x00005DF0, + 14468: 0x00005E4F, + 14469: 0x00005E4E, + 14470: 0x00005E4A, + 14471: 0x00005E4D, + 14472: 0x00005E4B, + 14473: 0x00005EC5, + 14474: 0x00005ECC, + 14475: 0x00005EC6, + 14476: 0x00005ECB, + 14477: 0x00005EC7, + 14478: 0x00005F40, + 14479: 0x00005FAF, + 14480: 0x00005FAD, + 14481: 0x000060F7, + 14482: 0x00006149, + 14483: 0x0000614A, + 14484: 0x0000612B, + 14485: 0x00006145, + 14486: 0x00006136, + 14487: 0x00006132, + 14488: 0x0000612E, + 14489: 0x00006146, + 14490: 0x0000612F, + 14491: 0x0000614F, + 14492: 0x00006129, + 14493: 0x00006140, + 14494: 0x00006220, + 14495: 0x00009168, + 14496: 0x00006223, + 14497: 0x00006225, + 14498: 0x00006224, + 14499: 0x000063C5, + 14500: 0x000063F1, + 14501: 0x000063EB, + 14502: 0x00006410, + 14503: 0x00006412, + 14504: 0x00006409, + 14505: 0x00006420, + 14506: 0x00006424, + 14507: 0x00006433, + 14508: 0x00006443, + 14509: 0x0000641F, + 14510: 0x00006415, + 14511: 0x00006418, + 14512: 0x00006439, + 14513: 0x00006437, + 14514: 0x00006422, + 14515: 0x00006423, + 14516: 0x0000640C, + 14517: 0x00006426, + 14518: 0x00006430, + 14519: 0x00006428, + 14520: 0x00006441, + 14521: 0x00006435, + 14522: 0x0000642F, + 14523: 0x0000640A, + 14524: 0x0000641A, + 14525: 0x00006440, + 14526: 0x00006425, + 14527: 0x00006427, + 14528: 0x0000640B, + 14529: 0x000063E7, + 14530: 0x0000641B, + 14531: 0x0000642E, + 14532: 0x00006421, + 14533: 0x0000640E, + 14534: 0x0000656F, + 14535: 0x00006592, + 14536: 0x000065D3, + 14537: 0x00006686, + 14538: 0x0000668C, + 14539: 0x00006695, + 14540: 0x00006690, + 14541: 0x0000668B, + 14542: 0x0000668A, + 14543: 0x00006699, + 14544: 0x00006694, + 14545: 0x00006678, + 14546: 0x00006720, + 14547: 0x00006966, + 14548: 0x0000695F, + 14549: 0x00006938, + 14550: 0x0000694E, + 14551: 0x00006962, + 14552: 0x00006971, + 14553: 0x0000693F, + 14554: 0x00006945, + 14555: 0x0000696A, + 14556: 0x00006939, + 14557: 0x00006942, + 14558: 0x00006957, + 14559: 0x00006959, + 14560: 0x0000697A, + 14561: 0x00006948, + 14562: 0x00006949, + 14563: 0x00006935, + 14564: 0x0000696C, + 14565: 0x00006933, + 14566: 0x0000693D, + 14567: 0x00006965, + 14568: 0x000068F0, + 14569: 0x00006978, + 14570: 0x00006934, + 14571: 0x00006969, + 14572: 0x00006940, + 14573: 0x0000696F, + 14574: 0x00006944, + 14575: 0x00006976, + 14576: 0x00006958, + 14577: 0x00006941, + 14578: 0x00006974, + 14579: 0x0000694C, + 14580: 0x0000693B, + 14581: 0x0000694B, + 14582: 0x00006937, + 14583: 0x0000695C, + 14584: 0x0000694F, + 14585: 0x00006951, + 14586: 0x00006932, + 14587: 0x00006952, + 14588: 0x0000692F, + 14589: 0x0000697B, + 14590: 0x0000693C, + 14591: 0x00006B46, + 14592: 0x00006B45, + 14593: 0x00006B43, + 14594: 0x00006B42, + 14595: 0x00006B48, + 14596: 0x00006B41, + 14597: 0x00006B9B, + 14598: 0x0000FA0D, + 14599: 0x00006BFB, + 14600: 0x00006BFC, + 14601: 0x00006BF9, + 14602: 0x00006BF7, + 14603: 0x00006BF8, + 14604: 0x00006E9B, + 14605: 0x00006ED6, + 14606: 0x00006EC8, + 14607: 0x00006E8F, + 14608: 0x00006EC0, + 14609: 0x00006E9F, + 14610: 0x00006E93, + 14611: 0x00006E94, + 14612: 0x00006EA0, + 14613: 0x00006EB1, + 14614: 0x00006EB9, + 14615: 0x00006EC6, + 14616: 0x00006ED2, + 14617: 0x00006EBD, + 14618: 0x00006EC1, + 14619: 0x00006E9E, + 14620: 0x00006EC9, + 14621: 0x00006EB7, + 14622: 0x00006EB0, + 14623: 0x00006ECD, + 14624: 0x00006EA6, + 14625: 0x00006ECF, + 14626: 0x00006EB2, + 14627: 0x00006EBE, + 14628: 0x00006EC3, + 14629: 0x00006EDC, + 14630: 0x00006ED8, + 14631: 0x00006E99, + 14632: 0x00006E92, + 14633: 0x00006E8E, + 14634: 0x00006E8D, + 14635: 0x00006EA4, + 14636: 0x00006EA1, + 14637: 0x00006EBF, + 14638: 0x00006EB3, + 14639: 0x00006ED0, + 14640: 0x00006ECA, + 14641: 0x00006E97, + 14642: 0x00006EAE, + 14643: 0x00006EA3, + 14644: 0x00007147, + 14645: 0x00007154, + 14646: 0x00007152, + 14647: 0x00007163, + 14648: 0x00007160, + 14649: 0x00007141, + 14650: 0x0000715D, + 14651: 0x00007162, + 14652: 0x00007172, + 14653: 0x00007178, + 14654: 0x0000716A, + 14655: 0x00007161, + 14656: 0x00007142, + 14657: 0x00007158, + 14658: 0x00007143, + 14659: 0x0000714B, + 14660: 0x00007170, + 14661: 0x0000715F, + 14662: 0x00007150, + 14663: 0x00007153, + 14664: 0x00007144, + 14665: 0x0000714D, + 14666: 0x0000715A, + 14667: 0x0000724F, + 14668: 0x0000728D, + 14669: 0x0000728C, + 14670: 0x00007291, + 14671: 0x00007290, + 14672: 0x0000728E, + 14673: 0x0000733C, + 14674: 0x00007342, + 14675: 0x0000733B, + 14676: 0x0000733A, + 14677: 0x00007340, + 14678: 0x0000734A, + 14679: 0x00007349, + 14680: 0x00007444, + 14681: 0x0000744A, + 14682: 0x0000744B, + 14683: 0x00007452, + 14684: 0x00007451, + 14685: 0x00007457, + 14686: 0x00007440, + 14687: 0x0000744F, + 14688: 0x00007450, + 14689: 0x0000744E, + 14690: 0x00007442, + 14691: 0x00007446, + 14692: 0x0000744D, + 14693: 0x00007454, + 14694: 0x000074E1, + 14695: 0x000074FF, + 14696: 0x000074FE, + 14697: 0x000074FD, + 14698: 0x0000751D, + 14699: 0x00007579, + 14700: 0x00007577, + 14701: 0x00006983, + 14702: 0x000075EF, + 14703: 0x0000760F, + 14704: 0x00007603, + 14705: 0x000075F7, + 14706: 0x000075FE, + 14707: 0x000075FC, + 14708: 0x000075F9, + 14709: 0x000075F8, + 14710: 0x00007610, + 14711: 0x000075FB, + 14712: 0x000075F6, + 14713: 0x000075ED, + 14714: 0x000075F5, + 14715: 0x000075FD, + 14716: 0x00007699, + 14717: 0x000076B5, + 14718: 0x000076DD, + 14719: 0x00007755, + 14720: 0x0000775F, + 14721: 0x00007760, + 14722: 0x00007752, + 14723: 0x00007756, + 14724: 0x0000775A, + 14725: 0x00007769, + 14726: 0x00007767, + 14727: 0x00007754, + 14728: 0x00007759, + 14729: 0x0000776D, + 14730: 0x000077E0, + 14731: 0x00007887, + 14732: 0x0000789A, + 14733: 0x00007894, + 14734: 0x0000788F, + 14735: 0x00007884, + 14736: 0x00007895, + 14737: 0x00007885, + 14738: 0x00007886, + 14739: 0x000078A1, + 14740: 0x00007883, + 14741: 0x00007879, + 14742: 0x00007899, + 14743: 0x00007880, + 14744: 0x00007896, + 14745: 0x0000787B, + 14746: 0x0000797C, + 14747: 0x00007982, + 14748: 0x0000797D, + 14749: 0x00007979, + 14750: 0x00007A11, + 14751: 0x00007A18, + 14752: 0x00007A19, + 14753: 0x00007A12, + 14754: 0x00007A17, + 14755: 0x00007A15, + 14756: 0x00007A22, + 14757: 0x00007A13, + 14758: 0x00007A1B, + 14759: 0x00007A10, + 14760: 0x00007AA3, + 14761: 0x00007AA2, + 14762: 0x00007A9E, + 14763: 0x00007AEB, + 14764: 0x00007B66, + 14765: 0x00007B64, + 14766: 0x00007B6D, + 14767: 0x00007B74, + 14768: 0x00007B69, + 14769: 0x00007B72, + 14770: 0x00007B65, + 14771: 0x00007B73, + 14772: 0x00007B71, + 14773: 0x00007B70, + 14774: 0x00007B61, + 14775: 0x00007B78, + 14776: 0x00007B76, + 14777: 0x00007B63, + 14778: 0x00007CB2, + 14779: 0x00007CB4, + 14780: 0x00007CAF, + 14781: 0x00007D88, + 14782: 0x00007D86, + 14783: 0x00007D80, + 14784: 0x00007D8D, + 14785: 0x00007D7F, + 14786: 0x00007D85, + 14787: 0x00007D7A, + 14788: 0x00007D8E, + 14789: 0x00007D7B, + 14790: 0x00007D83, + 14791: 0x00007D7C, + 14792: 0x00007D8C, + 14793: 0x00007D94, + 14794: 0x00007D84, + 14795: 0x00007D7D, + 14796: 0x00007D92, + 14797: 0x00007F6D, + 14798: 0x00007F6B, + 14799: 0x00007F67, + 14800: 0x00007F68, + 14801: 0x00007F6C, + 14802: 0x00007FA6, + 14803: 0x00007FA5, + 14804: 0x00007FA7, + 14805: 0x00007FDB, + 14806: 0x00007FDC, + 14807: 0x00008021, + 14808: 0x00008164, + 14809: 0x00008160, + 14810: 0x00008177, + 14811: 0x0000815C, + 14812: 0x00008169, + 14813: 0x0000815B, + 14814: 0x00008162, + 14815: 0x00008172, + 14816: 0x00006721, + 14817: 0x0000815E, + 14818: 0x00008176, + 14819: 0x00008167, + 14820: 0x0000816F, + 14821: 0x00008144, + 14822: 0x00008161, + 14823: 0x0000821D, + 14824: 0x00008249, + 14825: 0x00008244, + 14826: 0x00008240, + 14827: 0x00008242, + 14828: 0x00008245, + 14829: 0x000084F1, + 14830: 0x0000843F, + 14831: 0x00008456, + 14832: 0x00008476, + 14833: 0x00008479, + 14834: 0x0000848F, + 14835: 0x0000848D, + 14836: 0x00008465, + 14837: 0x00008451, + 14838: 0x00008440, + 14839: 0x00008486, + 14840: 0x00008467, + 14841: 0x00008430, + 14842: 0x0000844D, + 14843: 0x0000847D, + 14844: 0x0000845A, + 14845: 0x00008459, + 14846: 0x00008474, + 14847: 0x00008473, + 14848: 0x0000845D, + 14849: 0x00008507, + 14850: 0x0000845E, + 14851: 0x00008437, + 14852: 0x0000843A, + 14853: 0x00008434, + 14854: 0x0000847A, + 14855: 0x00008443, + 14856: 0x00008478, + 14857: 0x00008432, + 14858: 0x00008445, + 14859: 0x00008429, + 14860: 0x000083D9, + 14861: 0x0000844B, + 14862: 0x0000842F, + 14863: 0x00008442, + 14864: 0x0000842D, + 14865: 0x0000845F, + 14866: 0x00008470, + 14867: 0x00008439, + 14868: 0x0000844E, + 14869: 0x0000844C, + 14870: 0x00008452, + 14871: 0x0000846F, + 14872: 0x000084C5, + 14873: 0x0000848E, + 14874: 0x0000843B, + 14875: 0x00008447, + 14876: 0x00008436, + 14877: 0x00008433, + 14878: 0x00008468, + 14879: 0x0000847E, + 14880: 0x00008444, + 14881: 0x0000842B, + 14882: 0x00008460, + 14883: 0x00008454, + 14884: 0x0000846E, + 14885: 0x00008450, + 14886: 0x0000870B, + 14887: 0x00008704, + 14888: 0x000086F7, + 14889: 0x0000870C, + 14890: 0x000086FA, + 14891: 0x000086D6, + 14892: 0x000086F5, + 14893: 0x0000874D, + 14894: 0x000086F8, + 14895: 0x0000870E, + 14896: 0x00008709, + 14897: 0x00008701, + 14898: 0x000086F6, + 14899: 0x0000870D, + 14900: 0x00008705, + 14901: 0x000088D6, + 14902: 0x000088CB, + 14903: 0x000088CD, + 14904: 0x000088CE, + 14905: 0x000088DE, + 14906: 0x000088DB, + 14907: 0x000088DA, + 14908: 0x000088CC, + 14909: 0x000088D0, + 14910: 0x00008985, + 14911: 0x0000899B, + 14912: 0x000089DF, + 14913: 0x000089E5, + 14914: 0x000089E4, + 14915: 0x000089E1, + 14916: 0x000089E0, + 14917: 0x000089E2, + 14918: 0x000089DC, + 14919: 0x000089E6, + 14920: 0x00008A76, + 14921: 0x00008A86, + 14922: 0x00008A7F, + 14923: 0x00008A61, + 14924: 0x00008A3F, + 14925: 0x00008A77, + 14926: 0x00008A82, + 14927: 0x00008A84, + 14928: 0x00008A75, + 14929: 0x00008A83, + 14930: 0x00008A81, + 14931: 0x00008A74, + 14932: 0x00008A7A, + 14933: 0x00008C3C, + 14934: 0x00008C4B, + 14935: 0x00008C4A, + 14936: 0x00008C65, + 14937: 0x00008C64, + 14938: 0x00008C66, + 14939: 0x00008C86, + 14940: 0x00008C84, + 14941: 0x00008C85, + 14942: 0x00008CCC, + 14943: 0x00008D68, + 14944: 0x00008D69, + 14945: 0x00008D91, + 14946: 0x00008D8C, + 14947: 0x00008D8E, + 14948: 0x00008D8F, + 14949: 0x00008D8D, + 14950: 0x00008D93, + 14951: 0x00008D94, + 14952: 0x00008D90, + 14953: 0x00008D92, + 14954: 0x00008DF0, + 14955: 0x00008DE0, + 14956: 0x00008DEC, + 14957: 0x00008DF1, + 14958: 0x00008DEE, + 14959: 0x00008DD0, + 14960: 0x00008DE9, + 14961: 0x00008DE3, + 14962: 0x00008DE2, + 14963: 0x00008DE7, + 14964: 0x00008DF2, + 14965: 0x00008DEB, + 14966: 0x00008DF4, + 14967: 0x00008F06, + 14968: 0x00008EFF, + 14969: 0x00008F01, + 14970: 0x00008F00, + 14971: 0x00008F05, + 14972: 0x00008F07, + 14973: 0x00008F08, + 14974: 0x00008F02, + 14975: 0x00008F0B, + 14976: 0x00009052, + 14977: 0x0000903F, + 14978: 0x00009044, + 14979: 0x00009049, + 14980: 0x0000903D, + 14981: 0x00009110, + 14982: 0x0000910D, + 14983: 0x0000910F, + 14984: 0x00009111, + 14985: 0x00009116, + 14986: 0x00009114, + 14987: 0x0000910B, + 14988: 0x0000910E, + 14989: 0x0000916E, + 14990: 0x0000916F, + 14991: 0x00009248, + 14992: 0x00009252, + 14993: 0x00009230, + 14994: 0x0000923A, + 14995: 0x00009266, + 14996: 0x00009233, + 14997: 0x00009265, + 14998: 0x0000925E, + 14999: 0x00009283, + 15000: 0x0000922E, + 15001: 0x0000924A, + 15002: 0x00009246, + 15003: 0x0000926D, + 15004: 0x0000926C, + 15005: 0x0000924F, + 15006: 0x00009260, + 15007: 0x00009267, + 15008: 0x0000926F, + 15009: 0x00009236, + 15010: 0x00009261, + 15011: 0x00009270, + 15012: 0x00009231, + 15013: 0x00009254, + 15014: 0x00009263, + 15015: 0x00009250, + 15016: 0x00009272, + 15017: 0x0000924E, + 15018: 0x00009253, + 15019: 0x0000924C, + 15020: 0x00009256, + 15021: 0x00009232, + 15022: 0x0000959F, + 15023: 0x0000959C, + 15024: 0x0000959E, + 15025: 0x0000959B, + 15026: 0x00009692, + 15027: 0x00009693, + 15028: 0x00009691, + 15029: 0x00009697, + 15030: 0x000096CE, + 15031: 0x000096FA, + 15032: 0x000096FD, + 15033: 0x000096F8, + 15034: 0x000096F5, + 15035: 0x00009773, + 15036: 0x00009777, + 15037: 0x00009778, + 15038: 0x00009772, + 15039: 0x0000980F, + 15040: 0x0000980D, + 15041: 0x0000980E, + 15042: 0x000098AC, + 15043: 0x000098F6, + 15044: 0x000098F9, + 15045: 0x000099AF, + 15046: 0x000099B2, + 15047: 0x000099B0, + 15048: 0x000099B5, + 15049: 0x00009AAD, + 15050: 0x00009AAB, + 15051: 0x00009B5B, + 15052: 0x00009CEA, + 15053: 0x00009CED, + 15054: 0x00009CE7, + 15055: 0x00009E80, + 15056: 0x00009EFD, + 15057: 0x000050E6, + 15058: 0x000050D4, + 15059: 0x000050D7, + 15060: 0x000050E8, + 15061: 0x000050F3, + 15062: 0x000050DB, + 15063: 0x000050EA, + 15064: 0x000050DD, + 15065: 0x000050E4, + 15066: 0x000050D3, + 15067: 0x000050EC, + 15068: 0x000050F0, + 15069: 0x000050EF, + 15070: 0x000050E3, + 15071: 0x000050E0, + 15072: 0x000051D8, + 15073: 0x00005280, + 15074: 0x00005281, + 15075: 0x000052E9, + 15076: 0x000052EB, + 15077: 0x00005330, + 15078: 0x000053AC, + 15079: 0x00005627, + 15080: 0x00005615, + 15081: 0x0000560C, + 15082: 0x00005612, + 15083: 0x000055FC, + 15084: 0x0000560F, + 15085: 0x0000561C, + 15086: 0x00005601, + 15087: 0x00005613, + 15088: 0x00005602, + 15089: 0x000055FA, + 15090: 0x0000561D, + 15091: 0x00005604, + 15092: 0x000055FF, + 15093: 0x000055F9, + 15094: 0x00005889, + 15095: 0x0000587C, + 15096: 0x00005890, + 15097: 0x00005898, + 15098: 0x00005886, + 15099: 0x00005881, + 15100: 0x0000587F, + 15101: 0x00005874, + 15102: 0x0000588B, + 15103: 0x0000587A, + 15104: 0x00005887, + 15105: 0x00005891, + 15106: 0x0000588E, + 15107: 0x00005876, + 15108: 0x00005882, + 15109: 0x00005888, + 15110: 0x0000587B, + 15111: 0x00005894, + 15112: 0x0000588F, + 15113: 0x000058FE, + 15114: 0x0000596B, + 15115: 0x00005ADC, + 15116: 0x00005AEE, + 15117: 0x00005AE5, + 15118: 0x00005AD5, + 15119: 0x00005AEA, + 15120: 0x00005ADA, + 15121: 0x00005AED, + 15122: 0x00005AEB, + 15123: 0x00005AF3, + 15124: 0x00005AE2, + 15125: 0x00005AE0, + 15126: 0x00005ADB, + 15127: 0x00005AEC, + 15128: 0x00005ADE, + 15129: 0x00005ADD, + 15130: 0x00005AD9, + 15131: 0x00005AE8, + 15132: 0x00005ADF, + 15133: 0x00005B77, + 15134: 0x00005BE0, + 15135: 0x00005BE3, + 15136: 0x00005C63, + 15137: 0x00005D82, + 15138: 0x00005D80, + 15139: 0x00005D7D, + 15140: 0x00005D86, + 15141: 0x00005D7A, + 15142: 0x00005D81, + 15143: 0x00005D77, + 15144: 0x00005D8A, + 15145: 0x00005D89, + 15146: 0x00005D88, + 15147: 0x00005D7E, + 15148: 0x00005D7C, + 15149: 0x00005D8D, + 15150: 0x00005D79, + 15151: 0x00005D7F, + 15152: 0x00005E58, + 15153: 0x00005E59, + 15154: 0x00005E53, + 15155: 0x00005ED8, + 15156: 0x00005ED1, + 15157: 0x00005ED7, + 15158: 0x00005ECE, + 15159: 0x00005EDC, + 15160: 0x00005ED5, + 15161: 0x00005ED9, + 15162: 0x00005ED2, + 15163: 0x00005ED4, + 15164: 0x00005F44, + 15165: 0x00005F43, + 15166: 0x00005F6F, + 15167: 0x00005FB6, + 15168: 0x0000612C, + 15169: 0x00006128, + 15170: 0x00006141, + 15171: 0x0000615E, + 15172: 0x00006171, + 15173: 0x00006173, + 15174: 0x00006152, + 15175: 0x00006153, + 15176: 0x00006172, + 15177: 0x0000616C, + 15178: 0x00006180, + 15179: 0x00006174, + 15180: 0x00006154, + 15181: 0x0000617A, + 15182: 0x0000615B, + 15183: 0x00006165, + 15184: 0x0000613B, + 15185: 0x0000616A, + 15186: 0x00006161, + 15187: 0x00006156, + 15188: 0x00006229, + 15189: 0x00006227, + 15190: 0x0000622B, + 15191: 0x0000642B, + 15192: 0x0000644D, + 15193: 0x0000645B, + 15194: 0x0000645D, + 15195: 0x00006474, + 15196: 0x00006476, + 15197: 0x00006472, + 15198: 0x00006473, + 15199: 0x0000647D, + 15200: 0x00006475, + 15201: 0x00006466, + 15202: 0x000064A6, + 15203: 0x0000644E, + 15204: 0x00006482, + 15205: 0x0000645E, + 15206: 0x0000645C, + 15207: 0x0000644B, + 15208: 0x00006453, + 15209: 0x00006460, + 15210: 0x00006450, + 15211: 0x0000647F, + 15212: 0x0000643F, + 15213: 0x0000646C, + 15214: 0x0000646B, + 15215: 0x00006459, + 15216: 0x00006465, + 15217: 0x00006477, + 15218: 0x00006573, + 15219: 0x000065A0, + 15220: 0x000066A1, + 15221: 0x000066A0, + 15222: 0x0000669F, + 15223: 0x00006705, + 15224: 0x00006704, + 15225: 0x00006722, + 15226: 0x000069B1, + 15227: 0x000069B6, + 15228: 0x000069C9, + 15229: 0x000069A0, + 15230: 0x000069CE, + 15231: 0x00006996, + 15232: 0x000069B0, + 15233: 0x000069AC, + 15234: 0x000069BC, + 15235: 0x00006991, + 15236: 0x00006999, + 15237: 0x0000698E, + 15238: 0x000069A7, + 15239: 0x0000698D, + 15240: 0x000069A9, + 15241: 0x000069BE, + 15242: 0x000069AF, + 15243: 0x000069BF, + 15244: 0x000069C4, + 15245: 0x000069BD, + 15246: 0x000069A4, + 15247: 0x000069D4, + 15248: 0x000069B9, + 15249: 0x000069CA, + 15250: 0x0000699A, + 15251: 0x000069CF, + 15252: 0x000069B3, + 15253: 0x00006993, + 15254: 0x000069AA, + 15255: 0x000069A1, + 15256: 0x0000699E, + 15257: 0x000069D9, + 15258: 0x00006997, + 15259: 0x00006990, + 15260: 0x000069C2, + 15261: 0x000069B5, + 15262: 0x000069A5, + 15263: 0x000069C6, + 15264: 0x00006B4A, + 15265: 0x00006B4D, + 15266: 0x00006B4B, + 15267: 0x00006B9E, + 15268: 0x00006B9F, + 15269: 0x00006BA0, + 15270: 0x00006BC3, + 15271: 0x00006BC4, + 15272: 0x00006BFE, + 15273: 0x00006ECE, + 15274: 0x00006EF5, + 15275: 0x00006EF1, + 15276: 0x00006F03, + 15277: 0x00006F25, + 15278: 0x00006EF8, + 15279: 0x00006F37, + 15280: 0x00006EFB, + 15281: 0x00006F2E, + 15282: 0x00006F09, + 15283: 0x00006F4E, + 15284: 0x00006F19, + 15285: 0x00006F1A, + 15286: 0x00006F27, + 15287: 0x00006F18, + 15288: 0x00006F3B, + 15289: 0x00006F12, + 15290: 0x00006EED, + 15291: 0x00006F0A, + 15292: 0x00006F36, + 15293: 0x00006F73, + 15294: 0x00006EF9, + 15295: 0x00006EEE, + 15296: 0x00006F2D, + 15297: 0x00006F40, + 15298: 0x00006F30, + 15299: 0x00006F3C, + 15300: 0x00006F35, + 15301: 0x00006EEB, + 15302: 0x00006F07, + 15303: 0x00006F0E, + 15304: 0x00006F43, + 15305: 0x00006F05, + 15306: 0x00006EFD, + 15307: 0x00006EF6, + 15308: 0x00006F39, + 15309: 0x00006F1C, + 15310: 0x00006EFC, + 15311: 0x00006F3A, + 15312: 0x00006F1F, + 15313: 0x00006F0D, + 15314: 0x00006F1E, + 15315: 0x00006F08, + 15316: 0x00006F21, + 15317: 0x00007187, + 15318: 0x00007190, + 15319: 0x00007189, + 15320: 0x00007180, + 15321: 0x00007185, + 15322: 0x00007182, + 15323: 0x0000718F, + 15324: 0x0000717B, + 15325: 0x00007186, + 15326: 0x00007181, + 15327: 0x00007197, + 15328: 0x00007244, + 15329: 0x00007253, + 15330: 0x00007297, + 15331: 0x00007295, + 15332: 0x00007293, + 15333: 0x00007343, + 15334: 0x0000734D, + 15335: 0x00007351, + 15336: 0x0000734C, + 15337: 0x00007462, + 15338: 0x00007473, + 15339: 0x00007471, + 15340: 0x00007475, + 15341: 0x00007472, + 15342: 0x00007467, + 15343: 0x0000746E, + 15344: 0x00007500, + 15345: 0x00007502, + 15346: 0x00007503, + 15347: 0x0000757D, + 15348: 0x00007590, + 15349: 0x00007616, + 15350: 0x00007608, + 15351: 0x0000760C, + 15352: 0x00007615, + 15353: 0x00007611, + 15354: 0x0000760A, + 15355: 0x00007614, + 15356: 0x000076B8, + 15357: 0x00007781, + 15358: 0x0000777C, + 15359: 0x00007785, + 15360: 0x00007782, + 15361: 0x0000776E, + 15362: 0x00007780, + 15363: 0x0000776F, + 15364: 0x0000777E, + 15365: 0x00007783, + 15366: 0x000078B2, + 15367: 0x000078AA, + 15368: 0x000078B4, + 15369: 0x000078AD, + 15370: 0x000078A8, + 15371: 0x0000787E, + 15372: 0x000078AB, + 15373: 0x0000789E, + 15374: 0x000078A5, + 15375: 0x000078A0, + 15376: 0x000078AC, + 15377: 0x000078A2, + 15378: 0x000078A4, + 15379: 0x00007998, + 15380: 0x0000798A, + 15381: 0x0000798B, + 15382: 0x00007996, + 15383: 0x00007995, + 15384: 0x00007994, + 15385: 0x00007993, + 15386: 0x00007997, + 15387: 0x00007988, + 15388: 0x00007992, + 15389: 0x00007990, + 15390: 0x00007A2B, + 15391: 0x00007A4A, + 15392: 0x00007A30, + 15393: 0x00007A2F, + 15394: 0x00007A28, + 15395: 0x00007A26, + 15396: 0x00007AA8, + 15397: 0x00007AAB, + 15398: 0x00007AAC, + 15399: 0x00007AEE, + 15400: 0x00007B88, + 15401: 0x00007B9C, + 15402: 0x00007B8A, + 15403: 0x00007B91, + 15404: 0x00007B90, + 15405: 0x00007B96, + 15406: 0x00007B8D, + 15407: 0x00007B8C, + 15408: 0x00007B9B, + 15409: 0x00007B8E, + 15410: 0x00007B85, + 15411: 0x00007B98, + 15412: 0x00005284, + 15413: 0x00007B99, + 15414: 0x00007BA4, + 15415: 0x00007B82, + 15416: 0x00007CBB, + 15417: 0x00007CBF, + 15418: 0x00007CBC, + 15419: 0x00007CBA, + 15420: 0x00007DA7, + 15421: 0x00007DB7, + 15422: 0x00007DC2, + 15423: 0x00007DA3, + 15424: 0x00007DAA, + 15425: 0x00007DC1, + 15426: 0x00007DC0, + 15427: 0x00007DC5, + 15428: 0x00007D9D, + 15429: 0x00007DCE, + 15430: 0x00007DC4, + 15431: 0x00007DC6, + 15432: 0x00007DCB, + 15433: 0x00007DCC, + 15434: 0x00007DAF, + 15435: 0x00007DB9, + 15436: 0x00007D96, + 15437: 0x00007DBC, + 15438: 0x00007D9F, + 15439: 0x00007DA6, + 15440: 0x00007DAE, + 15441: 0x00007DA9, + 15442: 0x00007DA1, + 15443: 0x00007DC9, + 15444: 0x00007F73, + 15445: 0x00007FE2, + 15446: 0x00007FE3, + 15447: 0x00007FE5, + 15448: 0x00007FDE, + 15449: 0x00008024, + 15450: 0x0000805D, + 15451: 0x0000805C, + 15452: 0x00008189, + 15453: 0x00008186, + 15454: 0x00008183, + 15455: 0x00008187, + 15456: 0x0000818D, + 15457: 0x0000818C, + 15458: 0x0000818B, + 15459: 0x00008215, + 15460: 0x00008497, + 15461: 0x000084A4, + 15462: 0x000084A1, + 15463: 0x0000849F, + 15464: 0x000084BA, + 15465: 0x000084CE, + 15466: 0x000084C2, + 15467: 0x000084AC, + 15468: 0x000084AE, + 15469: 0x000084AB, + 15470: 0x000084B9, + 15471: 0x000084B4, + 15472: 0x000084C1, + 15473: 0x000084CD, + 15474: 0x000084AA, + 15475: 0x0000849A, + 15476: 0x000084B1, + 15477: 0x000084D0, + 15478: 0x0000849D, + 15479: 0x000084A7, + 15480: 0x000084BB, + 15481: 0x000084A2, + 15482: 0x00008494, + 15483: 0x000084C7, + 15484: 0x000084CC, + 15485: 0x0000849B, + 15486: 0x000084A9, + 15487: 0x000084AF, + 15488: 0x000084A8, + 15489: 0x000084D6, + 15490: 0x00008498, + 15491: 0x000084B6, + 15492: 0x000084CF, + 15493: 0x000084A0, + 15494: 0x000084D7, + 15495: 0x000084D4, + 15496: 0x000084D2, + 15497: 0x000084DB, + 15498: 0x000084B0, + 15499: 0x00008491, + 15500: 0x00008661, + 15501: 0x00008733, + 15502: 0x00008723, + 15503: 0x00008728, + 15504: 0x0000876B, + 15505: 0x00008740, + 15506: 0x0000872E, + 15507: 0x0000871E, + 15508: 0x00008721, + 15509: 0x00008719, + 15510: 0x0000871B, + 15511: 0x00008743, + 15512: 0x0000872C, + 15513: 0x00008741, + 15514: 0x0000873E, + 15515: 0x00008746, + 15516: 0x00008720, + 15517: 0x00008732, + 15518: 0x0000872A, + 15519: 0x0000872D, + 15520: 0x0000873C, + 15521: 0x00008712, + 15522: 0x0000873A, + 15523: 0x00008731, + 15524: 0x00008735, + 15525: 0x00008742, + 15526: 0x00008726, + 15527: 0x00008727, + 15528: 0x00008738, + 15529: 0x00008724, + 15530: 0x0000871A, + 15531: 0x00008730, + 15532: 0x00008711, + 15533: 0x000088F7, + 15534: 0x000088E7, + 15535: 0x000088F1, + 15536: 0x000088F2, + 15537: 0x000088FA, + 15538: 0x000088FE, + 15539: 0x000088EE, + 15540: 0x000088FC, + 15541: 0x000088F6, + 15542: 0x000088FB, + 15543: 0x000088F0, + 15544: 0x000088EC, + 15545: 0x000088EB, + 15546: 0x0000899D, + 15547: 0x000089A1, + 15548: 0x0000899F, + 15549: 0x0000899E, + 15550: 0x000089E9, + 15551: 0x000089EB, + 15552: 0x000089E8, + 15553: 0x00008AAB, + 15554: 0x00008A99, + 15555: 0x00008A8B, + 15556: 0x00008A92, + 15557: 0x00008A8F, + 15558: 0x00008A96, + 15559: 0x00008C3D, + 15560: 0x00008C68, + 15561: 0x00008C69, + 15562: 0x00008CD5, + 15563: 0x00008CCF, + 15564: 0x00008CD7, + 15565: 0x00008D96, + 15566: 0x00008E09, + 15567: 0x00008E02, + 15568: 0x00008DFF, + 15569: 0x00008E0D, + 15570: 0x00008DFD, + 15571: 0x00008E0A, + 15572: 0x00008E03, + 15573: 0x00008E07, + 15574: 0x00008E06, + 15575: 0x00008E05, + 15576: 0x00008DFE, + 15577: 0x00008E00, + 15578: 0x00008E04, + 15579: 0x00008F10, + 15580: 0x00008F11, + 15581: 0x00008F0E, + 15582: 0x00008F0D, + 15583: 0x00009123, + 15584: 0x0000911C, + 15585: 0x00009120, + 15586: 0x00009122, + 15587: 0x0000911F, + 15588: 0x0000911D, + 15589: 0x0000911A, + 15590: 0x00009124, + 15591: 0x00009121, + 15592: 0x0000911B, + 15593: 0x0000917A, + 15594: 0x00009172, + 15595: 0x00009179, + 15596: 0x00009173, + 15597: 0x000092A5, + 15598: 0x000092A4, + 15599: 0x00009276, + 15600: 0x0000929B, + 15601: 0x0000927A, + 15602: 0x000092A0, + 15603: 0x00009294, + 15604: 0x000092AA, + 15605: 0x0000928D, + 15606: 0x000092A6, + 15607: 0x0000929A, + 15608: 0x000092AB, + 15609: 0x00009279, + 15610: 0x00009297, + 15611: 0x0000927F, + 15612: 0x000092A3, + 15613: 0x000092EE, + 15614: 0x0000928E, + 15615: 0x00009282, + 15616: 0x00009295, + 15617: 0x000092A2, + 15618: 0x0000927D, + 15619: 0x00009288, + 15620: 0x000092A1, + 15621: 0x0000928A, + 15622: 0x00009286, + 15623: 0x0000928C, + 15624: 0x00009299, + 15625: 0x000092A7, + 15626: 0x0000927E, + 15627: 0x00009287, + 15628: 0x000092A9, + 15629: 0x0000929D, + 15630: 0x0000928B, + 15631: 0x0000922D, + 15632: 0x0000969E, + 15633: 0x000096A1, + 15634: 0x000096FF, + 15635: 0x00009758, + 15636: 0x0000977D, + 15637: 0x0000977A, + 15638: 0x0000977E, + 15639: 0x00009783, + 15640: 0x00009780, + 15641: 0x00009782, + 15642: 0x0000977B, + 15643: 0x00009784, + 15644: 0x00009781, + 15645: 0x0000977F, + 15646: 0x000097CE, + 15647: 0x000097CD, + 15648: 0x00009816, + 15649: 0x000098AD, + 15650: 0x000098AE, + 15651: 0x00009902, + 15652: 0x00009900, + 15653: 0x00009907, + 15654: 0x0000999D, + 15655: 0x0000999C, + 15656: 0x000099C3, + 15657: 0x000099B9, + 15658: 0x000099BB, + 15659: 0x000099BA, + 15660: 0x000099C2, + 15661: 0x000099BD, + 15662: 0x000099C7, + 15663: 0x00009AB1, + 15664: 0x00009AE3, + 15665: 0x00009AE7, + 15666: 0x00009B3E, + 15667: 0x00009B3F, + 15668: 0x00009B60, + 15669: 0x00009B61, + 15670: 0x00009B5F, + 15671: 0x00009CF1, + 15672: 0x00009CF2, + 15673: 0x00009CF5, + 15674: 0x00009EA7, + 15675: 0x000050FF, + 15676: 0x00005103, + 15677: 0x00005130, + 15678: 0x000050F8, + 15679: 0x00005106, + 15680: 0x00005107, + 15681: 0x000050F6, + 15682: 0x000050FE, + 15683: 0x0000510B, + 15684: 0x0000510C, + 15685: 0x000050FD, + 15686: 0x0000510A, + 15687: 0x0000528B, + 15688: 0x0000528C, + 15689: 0x000052F1, + 15690: 0x000052EF, + 15691: 0x00005648, + 15692: 0x00005642, + 15693: 0x0000564C, + 15694: 0x00005635, + 15695: 0x00005641, + 15696: 0x0000564A, + 15697: 0x00005649, + 15698: 0x00005646, + 15699: 0x00005658, + 15700: 0x0000565A, + 15701: 0x00005640, + 15702: 0x00005633, + 15703: 0x0000563D, + 15704: 0x0000562C, + 15705: 0x0000563E, + 15706: 0x00005638, + 15707: 0x0000562A, + 15708: 0x0000563A, + 15709: 0x0000571A, + 15710: 0x000058AB, + 15711: 0x0000589D, + 15712: 0x000058B1, + 15713: 0x000058A0, + 15714: 0x000058A3, + 15715: 0x000058AF, + 15716: 0x000058AC, + 15717: 0x000058A5, + 15718: 0x000058A1, + 15719: 0x000058FF, + 15720: 0x00005AFF, + 15721: 0x00005AF4, + 15722: 0x00005AFD, + 15723: 0x00005AF7, + 15724: 0x00005AF6, + 15725: 0x00005B03, + 15726: 0x00005AF8, + 15727: 0x00005B02, + 15728: 0x00005AF9, + 15729: 0x00005B01, + 15730: 0x00005B07, + 15731: 0x00005B05, + 15732: 0x00005B0F, + 15733: 0x00005C67, + 15734: 0x00005D99, + 15735: 0x00005D97, + 15736: 0x00005D9F, + 15737: 0x00005D92, + 15738: 0x00005DA2, + 15739: 0x00005D93, + 15740: 0x00005D95, + 15741: 0x00005DA0, + 15742: 0x00005D9C, + 15743: 0x00005DA1, + 15744: 0x00005D9A, + 15745: 0x00005D9E, + 15746: 0x00005E69, + 15747: 0x00005E5D, + 15748: 0x00005E60, + 15749: 0x00005E5C, + 15750: 0x00007DF3, + 15751: 0x00005EDB, + 15752: 0x00005EDE, + 15753: 0x00005EE1, + 15754: 0x00005F49, + 15755: 0x00005FB2, + 15756: 0x0000618B, + 15757: 0x00006183, + 15758: 0x00006179, + 15759: 0x000061B1, + 15760: 0x000061B0, + 15761: 0x000061A2, + 15762: 0x00006189, + 15763: 0x0000619B, + 15764: 0x00006193, + 15765: 0x000061AF, + 15766: 0x000061AD, + 15767: 0x0000619F, + 15768: 0x00006192, + 15769: 0x000061AA, + 15770: 0x000061A1, + 15771: 0x0000618D, + 15772: 0x00006166, + 15773: 0x000061B3, + 15774: 0x0000622D, + 15775: 0x0000646E, + 15776: 0x00006470, + 15777: 0x00006496, + 15778: 0x000064A0, + 15779: 0x00006485, + 15780: 0x00006497, + 15781: 0x0000649C, + 15782: 0x0000648F, + 15783: 0x0000648B, + 15784: 0x0000648A, + 15785: 0x0000648C, + 15786: 0x000064A3, + 15787: 0x0000649F, + 15788: 0x00006468, + 15789: 0x000064B1, + 15790: 0x00006498, + 15791: 0x00006576, + 15792: 0x0000657A, + 15793: 0x00006579, + 15794: 0x0000657B, + 15795: 0x000065B2, + 15796: 0x000065B3, + 15797: 0x000066B5, + 15798: 0x000066B0, + 15799: 0x000066A9, + 15800: 0x000066B2, + 15801: 0x000066B7, + 15802: 0x000066AA, + 15803: 0x000066AF, + 15804: 0x00006A00, + 15805: 0x00006A06, + 15806: 0x00006A17, + 15807: 0x000069E5, + 15808: 0x000069F8, + 15809: 0x00006A15, + 15810: 0x000069F1, + 15811: 0x000069E4, + 15812: 0x00006A20, + 15813: 0x000069FF, + 15814: 0x000069EC, + 15815: 0x000069E2, + 15816: 0x00006A1B, + 15817: 0x00006A1D, + 15818: 0x000069FE, + 15819: 0x00006A27, + 15820: 0x000069F2, + 15821: 0x000069EE, + 15822: 0x00006A14, + 15823: 0x000069F7, + 15824: 0x000069E7, + 15825: 0x00006A40, + 15826: 0x00006A08, + 15827: 0x000069E6, + 15828: 0x000069FB, + 15829: 0x00006A0D, + 15830: 0x000069FC, + 15831: 0x000069EB, + 15832: 0x00006A09, + 15833: 0x00006A04, + 15834: 0x00006A18, + 15835: 0x00006A25, + 15836: 0x00006A0F, + 15837: 0x000069F6, + 15838: 0x00006A26, + 15839: 0x00006A07, + 15840: 0x000069F4, + 15841: 0x00006A16, + 15842: 0x00006B51, + 15843: 0x00006BA5, + 15844: 0x00006BA3, + 15845: 0x00006BA2, + 15846: 0x00006BA6, + 15847: 0x00006C01, + 15848: 0x00006C00, + 15849: 0x00006BFF, + 15850: 0x00006C02, + 15851: 0x00006F41, + 15852: 0x00006F26, + 15853: 0x00006F7E, + 15854: 0x00006F87, + 15855: 0x00006FC6, + 15856: 0x00006F92, + 15857: 0x00006F8D, + 15858: 0x00006F89, + 15859: 0x00006F8C, + 15860: 0x00006F62, + 15861: 0x00006F4F, + 15862: 0x00006F85, + 15863: 0x00006F5A, + 15864: 0x00006F96, + 15865: 0x00006F76, + 15866: 0x00006F6C, + 15867: 0x00006F82, + 15868: 0x00006F55, + 15869: 0x00006F72, + 15870: 0x00006F52, + 15871: 0x00006F50, + 15872: 0x00006F57, + 15873: 0x00006F94, + 15874: 0x00006F93, + 15875: 0x00006F5D, + 15876: 0x00006F00, + 15877: 0x00006F61, + 15878: 0x00006F6B, + 15879: 0x00006F7D, + 15880: 0x00006F67, + 15881: 0x00006F90, + 15882: 0x00006F53, + 15883: 0x00006F8B, + 15884: 0x00006F69, + 15885: 0x00006F7F, + 15886: 0x00006F95, + 15887: 0x00006F63, + 15888: 0x00006F77, + 15889: 0x00006F6A, + 15890: 0x00006F7B, + 15891: 0x000071B2, + 15892: 0x000071AF, + 15893: 0x0000719B, + 15894: 0x000071B0, + 15895: 0x000071A0, + 15896: 0x0000719A, + 15897: 0x000071A9, + 15898: 0x000071B5, + 15899: 0x0000719D, + 15900: 0x000071A5, + 15901: 0x0000719E, + 15902: 0x000071A4, + 15903: 0x000071A1, + 15904: 0x000071AA, + 15905: 0x0000719C, + 15906: 0x000071A7, + 15907: 0x000071B3, + 15908: 0x00007298, + 15909: 0x0000729A, + 15910: 0x00007358, + 15911: 0x00007352, + 15912: 0x0000735E, + 15913: 0x0000735F, + 15914: 0x00007360, + 15915: 0x0000735D, + 15916: 0x0000735B, + 15917: 0x00007361, + 15918: 0x0000735A, + 15919: 0x00007359, + 15920: 0x00007362, + 15921: 0x00007487, + 15922: 0x00007489, + 15923: 0x0000748A, + 15924: 0x00007486, + 15925: 0x00007481, + 15926: 0x0000747D, + 15927: 0x00007485, + 15928: 0x00007488, + 15929: 0x0000747C, + 15930: 0x00007479, + 15931: 0x00007508, + 15932: 0x00007507, + 15933: 0x0000757E, + 15934: 0x00007625, + 15935: 0x0000761E, + 15936: 0x00007619, + 15937: 0x0000761D, + 15938: 0x0000761C, + 15939: 0x00007623, + 15940: 0x0000761A, + 15941: 0x00007628, + 15942: 0x0000761B, + 15943: 0x0000769C, + 15944: 0x0000769D, + 15945: 0x0000769E, + 15946: 0x0000769B, + 15947: 0x0000778D, + 15948: 0x0000778F, + 15949: 0x00007789, + 15950: 0x00007788, + 15951: 0x000078CD, + 15952: 0x000078BB, + 15953: 0x000078CF, + 15954: 0x000078CC, + 15955: 0x000078D1, + 15956: 0x000078CE, + 15957: 0x000078D4, + 15958: 0x000078C8, + 15959: 0x000078C3, + 15960: 0x000078C4, + 15961: 0x000078C9, + 15962: 0x0000799A, + 15963: 0x000079A1, + 15964: 0x000079A0, + 15965: 0x0000799C, + 15966: 0x000079A2, + 15967: 0x0000799B, + 15968: 0x00006B76, + 15969: 0x00007A39, + 15970: 0x00007AB2, + 15971: 0x00007AB4, + 15972: 0x00007AB3, + 15973: 0x00007BB7, + 15974: 0x00007BCB, + 15975: 0x00007BBE, + 15976: 0x00007BAC, + 15977: 0x00007BCE, + 15978: 0x00007BAF, + 15979: 0x00007BB9, + 15980: 0x00007BCA, + 15981: 0x00007BB5, + 15982: 0x00007CC5, + 15983: 0x00007CC8, + 15984: 0x00007CCC, + 15985: 0x00007CCB, + 15986: 0x00007DF7, + 15987: 0x00007DDB, + 15988: 0x00007DEA, + 15989: 0x00007DE7, + 15990: 0x00007DD7, + 15991: 0x00007DE1, + 15992: 0x00007E03, + 15993: 0x00007DFA, + 15994: 0x00007DE6, + 15995: 0x00007DF6, + 15996: 0x00007DF1, + 15997: 0x00007DF0, + 15998: 0x00007DEE, + 15999: 0x00007DDF, + 16000: 0x00007F76, + 16001: 0x00007FAC, + 16002: 0x00007FB0, + 16003: 0x00007FAD, + 16004: 0x00007FED, + 16005: 0x00007FEB, + 16006: 0x00007FEA, + 16007: 0x00007FEC, + 16008: 0x00007FE6, + 16009: 0x00007FE8, + 16010: 0x00008064, + 16011: 0x00008067, + 16012: 0x000081A3, + 16013: 0x0000819F, + 16014: 0x0000819E, + 16015: 0x00008195, + 16016: 0x000081A2, + 16017: 0x00008199, + 16018: 0x00008197, + 16019: 0x00008216, + 16020: 0x0000824F, + 16021: 0x00008253, + 16022: 0x00008252, + 16023: 0x00008250, + 16024: 0x0000824E, + 16025: 0x00008251, + 16026: 0x00008524, + 16027: 0x0000853B, + 16028: 0x0000850F, + 16029: 0x00008500, + 16030: 0x00008529, + 16031: 0x0000850E, + 16032: 0x00008509, + 16033: 0x0000850D, + 16034: 0x0000851F, + 16035: 0x0000850A, + 16036: 0x00008527, + 16037: 0x0000851C, + 16038: 0x000084FB, + 16039: 0x0000852B, + 16040: 0x000084FA, + 16041: 0x00008508, + 16042: 0x0000850C, + 16043: 0x000084F4, + 16044: 0x0000852A, + 16045: 0x000084F2, + 16046: 0x00008515, + 16047: 0x000084F7, + 16048: 0x000084EB, + 16049: 0x000084F3, + 16050: 0x000084FC, + 16051: 0x00008512, + 16052: 0x000084EA, + 16053: 0x000084E9, + 16054: 0x00008516, + 16055: 0x000084FE, + 16056: 0x00008528, + 16057: 0x0000851D, + 16058: 0x0000852E, + 16059: 0x00008502, + 16060: 0x000084FD, + 16061: 0x0000851E, + 16062: 0x000084F6, + 16063: 0x00008531, + 16064: 0x00008526, + 16065: 0x000084E7, + 16066: 0x000084E8, + 16067: 0x000084F0, + 16068: 0x000084EF, + 16069: 0x000084F9, + 16070: 0x00008518, + 16071: 0x00008520, + 16072: 0x00008530, + 16073: 0x0000850B, + 16074: 0x00008519, + 16075: 0x0000852F, + 16076: 0x00008662, + 16077: 0x00008756, + 16078: 0x00008763, + 16079: 0x00008764, + 16080: 0x00008777, + 16081: 0x000087E1, + 16082: 0x00008773, + 16083: 0x00008758, + 16084: 0x00008754, + 16085: 0x0000875B, + 16086: 0x00008752, + 16087: 0x00008761, + 16088: 0x0000875A, + 16089: 0x00008751, + 16090: 0x0000875E, + 16091: 0x0000876D, + 16092: 0x0000876A, + 16093: 0x00008750, + 16094: 0x0000874E, + 16095: 0x0000875F, + 16096: 0x0000875D, + 16097: 0x0000876F, + 16098: 0x0000876C, + 16099: 0x0000877A, + 16100: 0x0000876E, + 16101: 0x0000875C, + 16102: 0x00008765, + 16103: 0x0000874F, + 16104: 0x0000877B, + 16105: 0x00008775, + 16106: 0x00008762, + 16107: 0x00008767, + 16108: 0x00008769, + 16109: 0x0000885A, + 16110: 0x00008905, + 16111: 0x0000890C, + 16112: 0x00008914, + 16113: 0x0000890B, + 16114: 0x00008917, + 16115: 0x00008918, + 16116: 0x00008919, + 16117: 0x00008906, + 16118: 0x00008916, + 16119: 0x00008911, + 16120: 0x0000890E, + 16121: 0x00008909, + 16122: 0x000089A2, + 16123: 0x000089A4, + 16124: 0x000089A3, + 16125: 0x000089ED, + 16126: 0x000089F0, + 16127: 0x000089EC, + 16128: 0x00008ACF, + 16129: 0x00008AC6, + 16130: 0x00008AB8, + 16131: 0x00008AD3, + 16132: 0x00008AD1, + 16133: 0x00008AD4, + 16134: 0x00008AD5, + 16135: 0x00008ABB, + 16136: 0x00008AD7, + 16137: 0x00008ABE, + 16138: 0x00008AC0, + 16139: 0x00008AC5, + 16140: 0x00008AD8, + 16141: 0x00008AC3, + 16142: 0x00008ABA, + 16143: 0x00008ABD, + 16144: 0x00008AD9, + 16145: 0x00008C3E, + 16146: 0x00008C4D, + 16147: 0x00008C8F, + 16148: 0x00008CE5, + 16149: 0x00008CDF, + 16150: 0x00008CD9, + 16151: 0x00008CE8, + 16152: 0x00008CDA, + 16153: 0x00008CDD, + 16154: 0x00008CE7, + 16155: 0x00008DA0, + 16156: 0x00008D9C, + 16157: 0x00008DA1, + 16158: 0x00008D9B, + 16159: 0x00008E20, + 16160: 0x00008E23, + 16161: 0x00008E25, + 16162: 0x00008E24, + 16163: 0x00008E2E, + 16164: 0x00008E15, + 16165: 0x00008E1B, + 16166: 0x00008E16, + 16167: 0x00008E11, + 16168: 0x00008E19, + 16169: 0x00008E26, + 16170: 0x00008E27, + 16171: 0x00008E14, + 16172: 0x00008E12, + 16173: 0x00008E18, + 16174: 0x00008E13, + 16175: 0x00008E1C, + 16176: 0x00008E17, + 16177: 0x00008E1A, + 16178: 0x00008F2C, + 16179: 0x00008F24, + 16180: 0x00008F18, + 16181: 0x00008F1A, + 16182: 0x00008F20, + 16183: 0x00008F23, + 16184: 0x00008F16, + 16185: 0x00008F17, + 16186: 0x00009073, + 16187: 0x00009070, + 16188: 0x0000906F, + 16189: 0x00009067, + 16190: 0x0000906B, + 16191: 0x0000912F, + 16192: 0x0000912B, + 16193: 0x00009129, + 16194: 0x0000912A, + 16195: 0x00009132, + 16196: 0x00009126, + 16197: 0x0000912E, + 16198: 0x00009185, + 16199: 0x00009186, + 16200: 0x0000918A, + 16201: 0x00009181, + 16202: 0x00009182, + 16203: 0x00009184, + 16204: 0x00009180, + 16205: 0x000092D0, + 16206: 0x000092C3, + 16207: 0x000092C4, + 16208: 0x000092C0, + 16209: 0x000092D9, + 16210: 0x000092B6, + 16211: 0x000092CF, + 16212: 0x000092F1, + 16213: 0x000092DF, + 16214: 0x000092D8, + 16215: 0x000092E9, + 16216: 0x000092D7, + 16217: 0x000092DD, + 16218: 0x000092CC, + 16219: 0x000092EF, + 16220: 0x000092C2, + 16221: 0x000092E8, + 16222: 0x000092CA, + 16223: 0x000092C8, + 16224: 0x000092CE, + 16225: 0x000092E6, + 16226: 0x000092CD, + 16227: 0x000092D5, + 16228: 0x000092C9, + 16229: 0x000092E0, + 16230: 0x000092DE, + 16231: 0x000092E7, + 16232: 0x000092D1, + 16233: 0x000092D3, + 16234: 0x000092B5, + 16235: 0x000092E1, + 16236: 0x000092C6, + 16237: 0x000092B4, + 16238: 0x0000957C, + 16239: 0x000095AC, + 16240: 0x000095AB, + 16241: 0x000095AE, + 16242: 0x000095B0, + 16243: 0x000096A4, + 16244: 0x000096A2, + 16245: 0x000096D3, + 16246: 0x00009705, + 16247: 0x00009708, + 16248: 0x00009702, + 16249: 0x0000975A, + 16250: 0x0000978A, + 16251: 0x0000978E, + 16252: 0x00009788, + 16253: 0x000097D0, + 16254: 0x000097CF, + 16255: 0x0000981E, + 16256: 0x0000981D, + 16257: 0x00009826, + 16258: 0x00009829, + 16259: 0x00009828, + 16260: 0x00009820, + 16261: 0x0000981B, + 16262: 0x00009827, + 16263: 0x000098B2, + 16264: 0x00009908, + 16265: 0x000098FA, + 16266: 0x00009911, + 16267: 0x00009914, + 16268: 0x00009916, + 16269: 0x00009917, + 16270: 0x00009915, + 16271: 0x000099DC, + 16272: 0x000099CD, + 16273: 0x000099CF, + 16274: 0x000099D3, + 16275: 0x000099D4, + 16276: 0x000099CE, + 16277: 0x000099C9, + 16278: 0x000099D6, + 16279: 0x000099D8, + 16280: 0x000099CB, + 16281: 0x000099D7, + 16282: 0x000099CC, + 16283: 0x00009AB3, + 16284: 0x00009AEC, + 16285: 0x00009AEB, + 16286: 0x00009AF3, + 16287: 0x00009AF2, + 16288: 0x00009AF1, + 16289: 0x00009B46, + 16290: 0x00009B43, + 16291: 0x00009B67, + 16292: 0x00009B74, + 16293: 0x00009B71, + 16294: 0x00009B66, + 16295: 0x00009B76, + 16296: 0x00009B75, + 16297: 0x00009B70, + 16298: 0x00009B68, + 16299: 0x00009B64, + 16300: 0x00009B6C, + 16301: 0x00009CFC, + 16302: 0x00009CFA, + 16303: 0x00009CFD, + 16304: 0x00009CFF, + 16305: 0x00009CF7, + 16306: 0x00009D07, + 16307: 0x00009D00, + 16308: 0x00009CF9, + 16309: 0x00009CFB, + 16310: 0x00009D08, + 16311: 0x00009D05, + 16312: 0x00009D04, + 16313: 0x00009E83, + 16314: 0x00009ED3, + 16315: 0x00009F0F, + 16316: 0x00009F10, + 16317: 0x0000511C, + 16318: 0x00005113, + 16319: 0x00005117, + 16320: 0x0000511A, + 16321: 0x00005111, + 16322: 0x000051DE, + 16323: 0x00005334, + 16324: 0x000053E1, + 16325: 0x00005670, + 16326: 0x00005660, + 16327: 0x0000566E, + 16328: 0x00005673, + 16329: 0x00005666, + 16330: 0x00005663, + 16331: 0x0000566D, + 16332: 0x00005672, + 16333: 0x0000565E, + 16334: 0x00005677, + 16335: 0x0000571C, + 16336: 0x0000571B, + 16337: 0x000058C8, + 16338: 0x000058BD, + 16339: 0x000058C9, + 16340: 0x000058BF, + 16341: 0x000058BA, + 16342: 0x000058C2, + 16343: 0x000058BC, + 16344: 0x000058C6, + 16345: 0x00005B17, + 16346: 0x00005B19, + 16347: 0x00005B1B, + 16348: 0x00005B21, + 16349: 0x00005B14, + 16350: 0x00005B13, + 16351: 0x00005B10, + 16352: 0x00005B16, + 16353: 0x00005B28, + 16354: 0x00005B1A, + 16355: 0x00005B20, + 16356: 0x00005B1E, + 16357: 0x00005BEF, + 16358: 0x00005DAC, + 16359: 0x00005DB1, + 16360: 0x00005DA9, + 16361: 0x00005DA7, + 16362: 0x00005DB5, + 16363: 0x00005DB0, + 16364: 0x00005DAE, + 16365: 0x00005DAA, + 16366: 0x00005DA8, + 16367: 0x00005DB2, + 16368: 0x00005DAD, + 16369: 0x00005DAF, + 16370: 0x00005DB4, + 16371: 0x00005E67, + 16372: 0x00005E68, + 16373: 0x00005E66, + 16374: 0x00005E6F, + 16375: 0x00005EE9, + 16376: 0x00005EE7, + 16377: 0x00005EE6, + 16378: 0x00005EE8, + 16379: 0x00005EE5, + 16380: 0x00005F4B, + 16381: 0x00005FBC, + 16382: 0x0000619D, + 16383: 0x000061A8, + 16384: 0x00006196, + 16385: 0x000061C5, + 16386: 0x000061B4, + 16387: 0x000061C6, + 16388: 0x000061C1, + 16389: 0x000061CC, + 16390: 0x000061BA, + 16391: 0x000061BF, + 16392: 0x000061B8, + 16393: 0x0000618C, + 16394: 0x000064D7, + 16395: 0x000064D6, + 16396: 0x000064D0, + 16397: 0x000064CF, + 16398: 0x000064C9, + 16399: 0x000064BD, + 16400: 0x00006489, + 16401: 0x000064C3, + 16402: 0x000064DB, + 16403: 0x000064F3, + 16404: 0x000064D9, + 16405: 0x00006533, + 16406: 0x0000657F, + 16407: 0x0000657C, + 16408: 0x000065A2, + 16409: 0x000066C8, + 16410: 0x000066BE, + 16411: 0x000066C0, + 16412: 0x000066CA, + 16413: 0x000066CB, + 16414: 0x000066CF, + 16415: 0x000066BD, + 16416: 0x000066BB, + 16417: 0x000066BA, + 16418: 0x000066CC, + 16419: 0x00006723, + 16420: 0x00006A34, + 16421: 0x00006A66, + 16422: 0x00006A49, + 16423: 0x00006A67, + 16424: 0x00006A32, + 16425: 0x00006A68, + 16426: 0x00006A3E, + 16427: 0x00006A5D, + 16428: 0x00006A6D, + 16429: 0x00006A76, + 16430: 0x00006A5B, + 16431: 0x00006A51, + 16432: 0x00006A28, + 16433: 0x00006A5A, + 16434: 0x00006A3B, + 16435: 0x00006A3F, + 16436: 0x00006A41, + 16437: 0x00006A6A, + 16438: 0x00006A64, + 16439: 0x00006A50, + 16440: 0x00006A4F, + 16441: 0x00006A54, + 16442: 0x00006A6F, + 16443: 0x00006A69, + 16444: 0x00006A60, + 16445: 0x00006A3C, + 16446: 0x00006A5E, + 16447: 0x00006A56, + 16448: 0x00006A55, + 16449: 0x00006A4D, + 16450: 0x00006A4E, + 16451: 0x00006A46, + 16452: 0x00006B55, + 16453: 0x00006B54, + 16454: 0x00006B56, + 16455: 0x00006BA7, + 16456: 0x00006BAA, + 16457: 0x00006BAB, + 16458: 0x00006BC8, + 16459: 0x00006BC7, + 16460: 0x00006C04, + 16461: 0x00006C03, + 16462: 0x00006C06, + 16463: 0x00006FAD, + 16464: 0x00006FCB, + 16465: 0x00006FA3, + 16466: 0x00006FC7, + 16467: 0x00006FBC, + 16468: 0x00006FCE, + 16469: 0x00006FC8, + 16470: 0x00006F5E, + 16471: 0x00006FC4, + 16472: 0x00006FBD, + 16473: 0x00006F9E, + 16474: 0x00006FCA, + 16475: 0x00006FA8, + 16476: 0x00007004, + 16477: 0x00006FA5, + 16478: 0x00006FAE, + 16479: 0x00006FBA, + 16480: 0x00006FAC, + 16481: 0x00006FAA, + 16482: 0x00006FCF, + 16483: 0x00006FBF, + 16484: 0x00006FB8, + 16485: 0x00006FA2, + 16486: 0x00006FC9, + 16487: 0x00006FAB, + 16488: 0x00006FCD, + 16489: 0x00006FAF, + 16490: 0x00006FB2, + 16491: 0x00006FB0, + 16492: 0x000071C5, + 16493: 0x000071C2, + 16494: 0x000071BF, + 16495: 0x000071B8, + 16496: 0x000071D6, + 16497: 0x000071C0, + 16498: 0x000071C1, + 16499: 0x000071CB, + 16500: 0x000071D4, + 16501: 0x000071CA, + 16502: 0x000071C7, + 16503: 0x000071CF, + 16504: 0x000071BD, + 16505: 0x000071D8, + 16506: 0x000071BC, + 16507: 0x000071C6, + 16508: 0x000071DA, + 16509: 0x000071DB, + 16510: 0x0000729D, + 16511: 0x0000729E, + 16512: 0x00007369, + 16513: 0x00007366, + 16514: 0x00007367, + 16515: 0x0000736C, + 16516: 0x00007365, + 16517: 0x0000736B, + 16518: 0x0000736A, + 16519: 0x0000747F, + 16520: 0x0000749A, + 16521: 0x000074A0, + 16522: 0x00007494, + 16523: 0x00007492, + 16524: 0x00007495, + 16525: 0x000074A1, + 16526: 0x0000750B, + 16527: 0x00007580, + 16528: 0x0000762F, + 16529: 0x0000762D, + 16530: 0x00007631, + 16531: 0x0000763D, + 16532: 0x00007633, + 16533: 0x0000763C, + 16534: 0x00007635, + 16535: 0x00007632, + 16536: 0x00007630, + 16537: 0x000076BB, + 16538: 0x000076E6, + 16539: 0x0000779A, + 16540: 0x0000779D, + 16541: 0x000077A1, + 16542: 0x0000779C, + 16543: 0x0000779B, + 16544: 0x000077A2, + 16545: 0x000077A3, + 16546: 0x00007795, + 16547: 0x00007799, + 16548: 0x00007797, + 16549: 0x000078DD, + 16550: 0x000078E9, + 16551: 0x000078E5, + 16552: 0x000078EA, + 16553: 0x000078DE, + 16554: 0x000078E3, + 16555: 0x000078DB, + 16556: 0x000078E1, + 16557: 0x000078E2, + 16558: 0x000078ED, + 16559: 0x000078DF, + 16560: 0x000078E0, + 16561: 0x000079A4, + 16562: 0x00007A44, + 16563: 0x00007A48, + 16564: 0x00007A47, + 16565: 0x00007AB6, + 16566: 0x00007AB8, + 16567: 0x00007AB5, + 16568: 0x00007AB1, + 16569: 0x00007AB7, + 16570: 0x00007BDE, + 16571: 0x00007BE3, + 16572: 0x00007BE7, + 16573: 0x00007BDD, + 16574: 0x00007BD5, + 16575: 0x00007BE5, + 16576: 0x00007BDA, + 16577: 0x00007BE8, + 16578: 0x00007BF9, + 16579: 0x00007BD4, + 16580: 0x00007BEA, + 16581: 0x00007BE2, + 16582: 0x00007BDC, + 16583: 0x00007BEB, + 16584: 0x00007BD8, + 16585: 0x00007BDF, + 16586: 0x00007CD2, + 16587: 0x00007CD4, + 16588: 0x00007CD7, + 16589: 0x00007CD0, + 16590: 0x00007CD1, + 16591: 0x00007E12, + 16592: 0x00007E21, + 16593: 0x00007E17, + 16594: 0x00007E0C, + 16595: 0x00007E1F, + 16596: 0x00007E20, + 16597: 0x00007E13, + 16598: 0x00007E0E, + 16599: 0x00007E1C, + 16600: 0x00007E15, + 16601: 0x00007E1A, + 16602: 0x00007E22, + 16603: 0x00007E0B, + 16604: 0x00007E0F, + 16605: 0x00007E16, + 16606: 0x00007E0D, + 16607: 0x00007E14, + 16608: 0x00007E25, + 16609: 0x00007E24, + 16610: 0x00007F43, + 16611: 0x00007F7B, + 16612: 0x00007F7C, + 16613: 0x00007F7A, + 16614: 0x00007FB1, + 16615: 0x00007FEF, + 16616: 0x0000802A, + 16617: 0x00008029, + 16618: 0x0000806C, + 16619: 0x000081B1, + 16620: 0x000081A6, + 16621: 0x000081AE, + 16622: 0x000081B9, + 16623: 0x000081B5, + 16624: 0x000081AB, + 16625: 0x000081B0, + 16626: 0x000081AC, + 16627: 0x000081B4, + 16628: 0x000081B2, + 16629: 0x000081B7, + 16630: 0x000081A7, + 16631: 0x000081F2, + 16632: 0x00008255, + 16633: 0x00008256, + 16634: 0x00008257, + 16635: 0x00008556, + 16636: 0x00008545, + 16637: 0x0000856B, + 16638: 0x0000854D, + 16639: 0x00008553, + 16640: 0x00008561, + 16641: 0x00008558, + 16642: 0x00008540, + 16643: 0x00008546, + 16644: 0x00008564, + 16645: 0x00008541, + 16646: 0x00008562, + 16647: 0x00008544, + 16648: 0x00008551, + 16649: 0x00008547, + 16650: 0x00008563, + 16651: 0x0000853E, + 16652: 0x0000855B, + 16653: 0x00008571, + 16654: 0x0000854E, + 16655: 0x0000856E, + 16656: 0x00008575, + 16657: 0x00008555, + 16658: 0x00008567, + 16659: 0x00008560, + 16660: 0x0000858C, + 16661: 0x00008566, + 16662: 0x0000855D, + 16663: 0x00008554, + 16664: 0x00008565, + 16665: 0x0000856C, + 16666: 0x00008663, + 16667: 0x00008665, + 16668: 0x00008664, + 16669: 0x0000879B, + 16670: 0x0000878F, + 16671: 0x00008797, + 16672: 0x00008793, + 16673: 0x00008792, + 16674: 0x00008788, + 16675: 0x00008781, + 16676: 0x00008796, + 16677: 0x00008798, + 16678: 0x00008779, + 16679: 0x00008787, + 16680: 0x000087A3, + 16681: 0x00008785, + 16682: 0x00008790, + 16683: 0x00008791, + 16684: 0x0000879D, + 16685: 0x00008784, + 16686: 0x00008794, + 16687: 0x0000879C, + 16688: 0x0000879A, + 16689: 0x00008789, + 16690: 0x0000891E, + 16691: 0x00008926, + 16692: 0x00008930, + 16693: 0x0000892D, + 16694: 0x0000892E, + 16695: 0x00008927, + 16696: 0x00008931, + 16697: 0x00008922, + 16698: 0x00008929, + 16699: 0x00008923, + 16700: 0x0000892F, + 16701: 0x0000892C, + 16702: 0x0000891F, + 16703: 0x000089F1, + 16704: 0x00008AE0, + 16705: 0x00008AE2, + 16706: 0x00008AF2, + 16707: 0x00008AF4, + 16708: 0x00008AF5, + 16709: 0x00008ADD, + 16710: 0x00008B14, + 16711: 0x00008AE4, + 16712: 0x00008ADF, + 16713: 0x00008AF0, + 16714: 0x00008AC8, + 16715: 0x00008ADE, + 16716: 0x00008AE1, + 16717: 0x00008AE8, + 16718: 0x00008AFF, + 16719: 0x00008AEF, + 16720: 0x00008AFB, + 16721: 0x00008C91, + 16722: 0x00008C92, + 16723: 0x00008C90, + 16724: 0x00008CF5, + 16725: 0x00008CEE, + 16726: 0x00008CF1, + 16727: 0x00008CF0, + 16728: 0x00008CF3, + 16729: 0x00008D6C, + 16730: 0x00008D6E, + 16731: 0x00008DA5, + 16732: 0x00008DA7, + 16733: 0x00008E33, + 16734: 0x00008E3E, + 16735: 0x00008E38, + 16736: 0x00008E40, + 16737: 0x00008E45, + 16738: 0x00008E36, + 16739: 0x00008E3C, + 16740: 0x00008E3D, + 16741: 0x00008E41, + 16742: 0x00008E30, + 16743: 0x00008E3F, + 16744: 0x00008EBD, + 16745: 0x00008F36, + 16746: 0x00008F2E, + 16747: 0x00008F35, + 16748: 0x00008F32, + 16749: 0x00008F39, + 16750: 0x00008F37, + 16751: 0x00008F34, + 16752: 0x00009076, + 16753: 0x00009079, + 16754: 0x0000907B, + 16755: 0x00009086, + 16756: 0x000090FA, + 16757: 0x00009133, + 16758: 0x00009135, + 16759: 0x00009136, + 16760: 0x00009193, + 16761: 0x00009190, + 16762: 0x00009191, + 16763: 0x0000918D, + 16764: 0x0000918F, + 16765: 0x00009327, + 16766: 0x0000931E, + 16767: 0x00009308, + 16768: 0x0000931F, + 16769: 0x00009306, + 16770: 0x0000930F, + 16771: 0x0000937A, + 16772: 0x00009338, + 16773: 0x0000933C, + 16774: 0x0000931B, + 16775: 0x00009323, + 16776: 0x00009312, + 16777: 0x00009301, + 16778: 0x00009346, + 16779: 0x0000932D, + 16780: 0x0000930E, + 16781: 0x0000930D, + 16782: 0x000092CB, + 16783: 0x0000931D, + 16784: 0x000092FA, + 16785: 0x00009325, + 16786: 0x00009313, + 16787: 0x000092F9, + 16788: 0x000092F7, + 16789: 0x00009334, + 16790: 0x00009302, + 16791: 0x00009324, + 16792: 0x000092FF, + 16793: 0x00009329, + 16794: 0x00009339, + 16795: 0x00009335, + 16796: 0x0000932A, + 16797: 0x00009314, + 16798: 0x0000930C, + 16799: 0x0000930B, + 16800: 0x000092FE, + 16801: 0x00009309, + 16802: 0x00009300, + 16803: 0x000092FB, + 16804: 0x00009316, + 16805: 0x000095BC, + 16806: 0x000095CD, + 16807: 0x000095BE, + 16808: 0x000095B9, + 16809: 0x000095BA, + 16810: 0x000095B6, + 16811: 0x000095BF, + 16812: 0x000095B5, + 16813: 0x000095BD, + 16814: 0x000096A9, + 16815: 0x000096D4, + 16816: 0x0000970B, + 16817: 0x00009712, + 16818: 0x00009710, + 16819: 0x00009799, + 16820: 0x00009797, + 16821: 0x00009794, + 16822: 0x000097F0, + 16823: 0x000097F8, + 16824: 0x00009835, + 16825: 0x0000982F, + 16826: 0x00009832, + 16827: 0x00009924, + 16828: 0x0000991F, + 16829: 0x00009927, + 16830: 0x00009929, + 16831: 0x0000999E, + 16832: 0x000099EE, + 16833: 0x000099EC, + 16834: 0x000099E5, + 16835: 0x000099E4, + 16836: 0x000099F0, + 16837: 0x000099E3, + 16838: 0x000099EA, + 16839: 0x000099E9, + 16840: 0x000099E7, + 16841: 0x00009AB9, + 16842: 0x00009ABF, + 16843: 0x00009AB4, + 16844: 0x00009ABB, + 16845: 0x00009AF6, + 16846: 0x00009AFA, + 16847: 0x00009AF9, + 16848: 0x00009AF7, + 16849: 0x00009B33, + 16850: 0x00009B80, + 16851: 0x00009B85, + 16852: 0x00009B87, + 16853: 0x00009B7C, + 16854: 0x00009B7E, + 16855: 0x00009B7B, + 16856: 0x00009B82, + 16857: 0x00009B93, + 16858: 0x00009B92, + 16859: 0x00009B90, + 16860: 0x00009B7A, + 16861: 0x00009B95, + 16862: 0x00009B7D, + 16863: 0x00009B88, + 16864: 0x00009D25, + 16865: 0x00009D17, + 16866: 0x00009D20, + 16867: 0x00009D1E, + 16868: 0x00009D14, + 16869: 0x00009D29, + 16870: 0x00009D1D, + 16871: 0x00009D18, + 16872: 0x00009D22, + 16873: 0x00009D10, + 16874: 0x00009D19, + 16875: 0x00009D1F, + 16876: 0x00009E88, + 16877: 0x00009E86, + 16878: 0x00009E87, + 16879: 0x00009EAE, + 16880: 0x00009EAD, + 16881: 0x00009ED5, + 16882: 0x00009ED6, + 16883: 0x00009EFA, + 16884: 0x00009F12, + 16885: 0x00009F3D, + 16886: 0x00005126, + 16887: 0x00005125, + 16888: 0x00005122, + 16889: 0x00005124, + 16890: 0x00005120, + 16891: 0x00005129, + 16892: 0x000052F4, + 16893: 0x00005693, + 16894: 0x0000568C, + 16895: 0x0000568D, + 16896: 0x00005686, + 16897: 0x00005684, + 16898: 0x00005683, + 16899: 0x0000567E, + 16900: 0x00005682, + 16901: 0x0000567F, + 16902: 0x00005681, + 16903: 0x000058D6, + 16904: 0x000058D4, + 16905: 0x000058CF, + 16906: 0x000058D2, + 16907: 0x00005B2D, + 16908: 0x00005B25, + 16909: 0x00005B32, + 16910: 0x00005B23, + 16911: 0x00005B2C, + 16912: 0x00005B27, + 16913: 0x00005B26, + 16914: 0x00005B2F, + 16915: 0x00005B2E, + 16916: 0x00005B7B, + 16917: 0x00005BF1, + 16918: 0x00005BF2, + 16919: 0x00005DB7, + 16920: 0x00005E6C, + 16921: 0x00005E6A, + 16922: 0x00005FBE, + 16923: 0x00005FBB, + 16924: 0x000061C3, + 16925: 0x000061B5, + 16926: 0x000061BC, + 16927: 0x000061E7, + 16928: 0x000061E0, + 16929: 0x000061E5, + 16930: 0x000061E4, + 16931: 0x000061E8, + 16932: 0x000061DE, + 16933: 0x000064EF, + 16934: 0x000064E9, + 16935: 0x000064E3, + 16936: 0x000064EB, + 16937: 0x000064E4, + 16938: 0x000064E8, + 16939: 0x00006581, + 16940: 0x00006580, + 16941: 0x000065B6, + 16942: 0x000065DA, + 16943: 0x000066D2, + 16944: 0x00006A8D, + 16945: 0x00006A96, + 16946: 0x00006A81, + 16947: 0x00006AA5, + 16948: 0x00006A89, + 16949: 0x00006A9F, + 16950: 0x00006A9B, + 16951: 0x00006AA1, + 16952: 0x00006A9E, + 16953: 0x00006A87, + 16954: 0x00006A93, + 16955: 0x00006A8E, + 16956: 0x00006A95, + 16957: 0x00006A83, + 16958: 0x00006AA8, + 16959: 0x00006AA4, + 16960: 0x00006A91, + 16961: 0x00006A7F, + 16962: 0x00006AA6, + 16963: 0x00006A9A, + 16964: 0x00006A85, + 16965: 0x00006A8C, + 16966: 0x00006A92, + 16967: 0x00006B5B, + 16968: 0x00006BAD, + 16969: 0x00006C09, + 16970: 0x00006FCC, + 16971: 0x00006FA9, + 16972: 0x00006FF4, + 16973: 0x00006FD4, + 16974: 0x00006FE3, + 16975: 0x00006FDC, + 16976: 0x00006FED, + 16977: 0x00006FE7, + 16978: 0x00006FE6, + 16979: 0x00006FDE, + 16980: 0x00006FF2, + 16981: 0x00006FDD, + 16982: 0x00006FE2, + 16983: 0x00006FE8, + 16984: 0x000071E1, + 16985: 0x000071F1, + 16986: 0x000071E8, + 16987: 0x000071F2, + 16988: 0x000071E4, + 16989: 0x000071F0, + 16990: 0x000071E2, + 16991: 0x00007373, + 16992: 0x0000736E, + 16993: 0x0000736F, + 16994: 0x00007497, + 16995: 0x000074B2, + 16996: 0x000074AB, + 16997: 0x00007490, + 16998: 0x000074AA, + 16999: 0x000074AD, + 17000: 0x000074B1, + 17001: 0x000074A5, + 17002: 0x000074AF, + 17003: 0x00007510, + 17004: 0x00007511, + 17005: 0x00007512, + 17006: 0x0000750F, + 17007: 0x00007584, + 17008: 0x00007643, + 17009: 0x00007648, + 17010: 0x00007649, + 17011: 0x00007647, + 17012: 0x000076A4, + 17013: 0x000076E9, + 17014: 0x000077B5, + 17015: 0x000077AB, + 17016: 0x000077B2, + 17017: 0x000077B7, + 17018: 0x000077B6, + 17019: 0x000077B4, + 17020: 0x000077B1, + 17021: 0x000077A8, + 17022: 0x000077F0, + 17023: 0x000078F3, + 17024: 0x000078FD, + 17025: 0x00007902, + 17026: 0x000078FB, + 17027: 0x000078FC, + 17028: 0x000078F2, + 17029: 0x00007905, + 17030: 0x000078F9, + 17031: 0x000078FE, + 17032: 0x00007904, + 17033: 0x000079AB, + 17034: 0x000079A8, + 17035: 0x00007A5C, + 17036: 0x00007A5B, + 17037: 0x00007A56, + 17038: 0x00007A58, + 17039: 0x00007A54, + 17040: 0x00007A5A, + 17041: 0x00007ABE, + 17042: 0x00007AC0, + 17043: 0x00007AC1, + 17044: 0x00007C05, + 17045: 0x00007C0F, + 17046: 0x00007BF2, + 17047: 0x00007C00, + 17048: 0x00007BFF, + 17049: 0x00007BFB, + 17050: 0x00007C0E, + 17051: 0x00007BF4, + 17052: 0x00007C0B, + 17053: 0x00007BF3, + 17054: 0x00007C02, + 17055: 0x00007C09, + 17056: 0x00007C03, + 17057: 0x00007C01, + 17058: 0x00007BF8, + 17059: 0x00007BFD, + 17060: 0x00007C06, + 17061: 0x00007BF0, + 17062: 0x00007BF1, + 17063: 0x00007C10, + 17064: 0x00007C0A, + 17065: 0x00007CE8, + 17066: 0x00007E2D, + 17067: 0x00007E3C, + 17068: 0x00007E42, + 17069: 0x00007E33, + 17070: 0x00009848, + 17071: 0x00007E38, + 17072: 0x00007E2A, + 17073: 0x00007E49, + 17074: 0x00007E40, + 17075: 0x00007E47, + 17076: 0x00007E29, + 17077: 0x00007E4C, + 17078: 0x00007E30, + 17079: 0x00007E3B, + 17080: 0x00007E36, + 17081: 0x00007E44, + 17082: 0x00007E3A, + 17083: 0x00007F45, + 17084: 0x00007F7F, + 17085: 0x00007F7E, + 17086: 0x00007F7D, + 17087: 0x00007FF4, + 17088: 0x00007FF2, + 17089: 0x0000802C, + 17090: 0x000081BB, + 17091: 0x000081C4, + 17092: 0x000081CC, + 17093: 0x000081CA, + 17094: 0x000081C5, + 17095: 0x000081C7, + 17096: 0x000081BC, + 17097: 0x000081E9, + 17098: 0x0000825B, + 17099: 0x0000825A, + 17100: 0x0000825C, + 17101: 0x00008583, + 17102: 0x00008580, + 17103: 0x0000858F, + 17104: 0x000085A7, + 17105: 0x00008595, + 17106: 0x000085A0, + 17107: 0x0000858B, + 17108: 0x000085A3, + 17109: 0x0000857B, + 17110: 0x000085A4, + 17111: 0x0000859A, + 17112: 0x0000859E, + 17113: 0x00008577, + 17114: 0x0000857C, + 17115: 0x00008589, + 17116: 0x000085A1, + 17117: 0x0000857A, + 17118: 0x00008578, + 17119: 0x00008557, + 17120: 0x0000858E, + 17121: 0x00008596, + 17122: 0x00008586, + 17123: 0x0000858D, + 17124: 0x00008599, + 17125: 0x0000859D, + 17126: 0x00008581, + 17127: 0x000085A2, + 17128: 0x00008582, + 17129: 0x00008588, + 17130: 0x00008585, + 17131: 0x00008579, + 17132: 0x00008576, + 17133: 0x00008598, + 17134: 0x00008590, + 17135: 0x0000859F, + 17136: 0x00008668, + 17137: 0x000087BE, + 17138: 0x000087AA, + 17139: 0x000087AD, + 17140: 0x000087C5, + 17141: 0x000087B0, + 17142: 0x000087AC, + 17143: 0x000087B9, + 17144: 0x000087B5, + 17145: 0x000087BC, + 17146: 0x000087AE, + 17147: 0x000087C9, + 17148: 0x000087C3, + 17149: 0x000087C2, + 17150: 0x000087CC, + 17151: 0x000087B7, + 17152: 0x000087AF, + 17153: 0x000087C4, + 17154: 0x000087CA, + 17155: 0x000087B4, + 17156: 0x000087B6, + 17157: 0x000087BF, + 17158: 0x000087B8, + 17159: 0x000087BD, + 17160: 0x000087DE, + 17161: 0x000087B2, + 17162: 0x00008935, + 17163: 0x00008933, + 17164: 0x0000893C, + 17165: 0x0000893E, + 17166: 0x00008941, + 17167: 0x00008952, + 17168: 0x00008937, + 17169: 0x00008942, + 17170: 0x000089AD, + 17171: 0x000089AF, + 17172: 0x000089AE, + 17173: 0x000089F2, + 17174: 0x000089F3, + 17175: 0x00008B1E, + 17176: 0x00008B18, + 17177: 0x00008B16, + 17178: 0x00008B11, + 17179: 0x00008B05, + 17180: 0x00008B0B, + 17181: 0x00008B22, + 17182: 0x00008B0F, + 17183: 0x00008B12, + 17184: 0x00008B15, + 17185: 0x00008B07, + 17186: 0x00008B0D, + 17187: 0x00008B08, + 17188: 0x00008B06, + 17189: 0x00008B1C, + 17190: 0x00008B13, + 17191: 0x00008B1A, + 17192: 0x00008C4F, + 17193: 0x00008C70, + 17194: 0x00008C72, + 17195: 0x00008C71, + 17196: 0x00008C6F, + 17197: 0x00008C95, + 17198: 0x00008C94, + 17199: 0x00008CF9, + 17200: 0x00008D6F, + 17201: 0x00008E4E, + 17202: 0x00008E4D, + 17203: 0x00008E53, + 17204: 0x00008E50, + 17205: 0x00008E4C, + 17206: 0x00008E47, + 17207: 0x00008F43, + 17208: 0x00008F40, + 17209: 0x00009085, + 17210: 0x0000907E, + 17211: 0x00009138, + 17212: 0x0000919A, + 17213: 0x000091A2, + 17214: 0x0000919B, + 17215: 0x00009199, + 17216: 0x0000919F, + 17217: 0x000091A1, + 17218: 0x0000919D, + 17219: 0x000091A0, + 17220: 0x000093A1, + 17221: 0x00009383, + 17222: 0x000093AF, + 17223: 0x00009364, + 17224: 0x00009356, + 17225: 0x00009347, + 17226: 0x0000937C, + 17227: 0x00009358, + 17228: 0x0000935C, + 17229: 0x00009376, + 17230: 0x00009349, + 17231: 0x00009350, + 17232: 0x00009351, + 17233: 0x00009360, + 17234: 0x0000936D, + 17235: 0x0000938F, + 17236: 0x0000934C, + 17237: 0x0000936A, + 17238: 0x00009379, + 17239: 0x00009357, + 17240: 0x00009355, + 17241: 0x00009352, + 17242: 0x0000934F, + 17243: 0x00009371, + 17244: 0x00009377, + 17245: 0x0000937B, + 17246: 0x00009361, + 17247: 0x0000935E, + 17248: 0x00009363, + 17249: 0x00009367, + 17250: 0x00009380, + 17251: 0x0000934E, + 17252: 0x00009359, + 17253: 0x000095C7, + 17254: 0x000095C0, + 17255: 0x000095C9, + 17256: 0x000095C3, + 17257: 0x000095C5, + 17258: 0x000095B7, + 17259: 0x000096AE, + 17260: 0x000096B0, + 17261: 0x000096AC, + 17262: 0x00009720, + 17263: 0x0000971F, + 17264: 0x00009718, + 17265: 0x0000971D, + 17266: 0x00009719, + 17267: 0x0000979A, + 17268: 0x000097A1, + 17269: 0x0000979C, + 17270: 0x0000979E, + 17271: 0x0000979D, + 17272: 0x000097D5, + 17273: 0x000097D4, + 17274: 0x000097F1, + 17275: 0x00009841, + 17276: 0x00009844, + 17277: 0x0000984A, + 17278: 0x00009849, + 17279: 0x00009845, + 17280: 0x00009843, + 17281: 0x00009925, + 17282: 0x0000992B, + 17283: 0x0000992C, + 17284: 0x0000992A, + 17285: 0x00009933, + 17286: 0x00009932, + 17287: 0x0000992F, + 17288: 0x0000992D, + 17289: 0x00009931, + 17290: 0x00009930, + 17291: 0x00009998, + 17292: 0x000099A3, + 17293: 0x000099A1, + 17294: 0x00009A02, + 17295: 0x000099FA, + 17296: 0x000099F4, + 17297: 0x000099F7, + 17298: 0x000099F9, + 17299: 0x000099F8, + 17300: 0x000099F6, + 17301: 0x000099FB, + 17302: 0x000099FD, + 17303: 0x000099FE, + 17304: 0x000099FC, + 17305: 0x00009A03, + 17306: 0x00009ABE, + 17307: 0x00009AFE, + 17308: 0x00009AFD, + 17309: 0x00009B01, + 17310: 0x00009AFC, + 17311: 0x00009B48, + 17312: 0x00009B9A, + 17313: 0x00009BA8, + 17314: 0x00009B9E, + 17315: 0x00009B9B, + 17316: 0x00009BA6, + 17317: 0x00009BA1, + 17318: 0x00009BA5, + 17319: 0x00009BA4, + 17320: 0x00009B86, + 17321: 0x00009BA2, + 17322: 0x00009BA0, + 17323: 0x00009BAF, + 17324: 0x00009D33, + 17325: 0x00009D41, + 17326: 0x00009D67, + 17327: 0x00009D36, + 17328: 0x00009D2E, + 17329: 0x00009D2F, + 17330: 0x00009D31, + 17331: 0x00009D38, + 17332: 0x00009D30, + 17333: 0x00009D45, + 17334: 0x00009D42, + 17335: 0x00009D43, + 17336: 0x00009D3E, + 17337: 0x00009D37, + 17338: 0x00009D40, + 17339: 0x00009D3D, + 17340: 0x00007FF5, + 17341: 0x00009D2D, + 17342: 0x00009E8A, + 17343: 0x00009E89, + 17344: 0x00009E8D, + 17345: 0x00009EB0, + 17346: 0x00009EC8, + 17347: 0x00009EDA, + 17348: 0x00009EFB, + 17349: 0x00009EFF, + 17350: 0x00009F24, + 17351: 0x00009F23, + 17352: 0x00009F22, + 17353: 0x00009F54, + 17354: 0x00009FA0, + 17355: 0x00005131, + 17356: 0x0000512D, + 17357: 0x0000512E, + 17358: 0x00005698, + 17359: 0x0000569C, + 17360: 0x00005697, + 17361: 0x0000569A, + 17362: 0x0000569D, + 17363: 0x00005699, + 17364: 0x00005970, + 17365: 0x00005B3C, + 17366: 0x00005C69, + 17367: 0x00005C6A, + 17368: 0x00005DC0, + 17369: 0x00005E6D, + 17370: 0x00005E6E, + 17371: 0x000061D8, + 17372: 0x000061DF, + 17373: 0x000061ED, + 17374: 0x000061EE, + 17375: 0x000061F1, + 17376: 0x000061EA, + 17377: 0x000061F0, + 17378: 0x000061EB, + 17379: 0x000061D6, + 17380: 0x000061E9, + 17381: 0x000064FF, + 17382: 0x00006504, + 17383: 0x000064FD, + 17384: 0x000064F8, + 17385: 0x00006501, + 17386: 0x00006503, + 17387: 0x000064FC, + 17388: 0x00006594, + 17389: 0x000065DB, + 17390: 0x000066DA, + 17391: 0x000066DB, + 17392: 0x000066D8, + 17393: 0x00006AC5, + 17394: 0x00006AB9, + 17395: 0x00006ABD, + 17396: 0x00006AE1, + 17397: 0x00006AC6, + 17398: 0x00006ABA, + 17399: 0x00006AB6, + 17400: 0x00006AB7, + 17401: 0x00006AC7, + 17402: 0x00006AB4, + 17403: 0x00006AAD, + 17404: 0x00006B5E, + 17405: 0x00006BC9, + 17406: 0x00006C0B, + 17407: 0x00007007, + 17408: 0x0000700C, + 17409: 0x0000700D, + 17410: 0x00007001, + 17411: 0x00007005, + 17412: 0x00007014, + 17413: 0x0000700E, + 17414: 0x00006FFF, + 17415: 0x00007000, + 17416: 0x00006FFB, + 17417: 0x00007026, + 17418: 0x00006FFC, + 17419: 0x00006FF7, + 17420: 0x0000700A, + 17421: 0x00007201, + 17422: 0x000071FF, + 17423: 0x000071F9, + 17424: 0x00007203, + 17425: 0x000071FD, + 17426: 0x00007376, + 17427: 0x000074B8, + 17428: 0x000074C0, + 17429: 0x000074B5, + 17430: 0x000074C1, + 17431: 0x000074BE, + 17432: 0x000074B6, + 17433: 0x000074BB, + 17434: 0x000074C2, + 17435: 0x00007514, + 17436: 0x00007513, + 17437: 0x0000765C, + 17438: 0x00007664, + 17439: 0x00007659, + 17440: 0x00007650, + 17441: 0x00007653, + 17442: 0x00007657, + 17443: 0x0000765A, + 17444: 0x000076A6, + 17445: 0x000076BD, + 17446: 0x000076EC, + 17447: 0x000077C2, + 17448: 0x000077BA, + 17449: 0x000078FF, + 17450: 0x0000790C, + 17451: 0x00007913, + 17452: 0x00007914, + 17453: 0x00007909, + 17454: 0x00007910, + 17455: 0x00007912, + 17456: 0x00007911, + 17457: 0x000079AD, + 17458: 0x000079AC, + 17459: 0x00007A5F, + 17460: 0x00007C1C, + 17461: 0x00007C29, + 17462: 0x00007C19, + 17463: 0x00007C20, + 17464: 0x00007C1F, + 17465: 0x00007C2D, + 17466: 0x00007C1D, + 17467: 0x00007C26, + 17468: 0x00007C28, + 17469: 0x00007C22, + 17470: 0x00007C25, + 17471: 0x00007C30, + 17472: 0x00007E5C, + 17473: 0x00007E50, + 17474: 0x00007E56, + 17475: 0x00007E63, + 17476: 0x00007E58, + 17477: 0x00007E62, + 17478: 0x00007E5F, + 17479: 0x00007E51, + 17480: 0x00007E60, + 17481: 0x00007E57, + 17482: 0x00007E53, + 17483: 0x00007FB5, + 17484: 0x00007FB3, + 17485: 0x00007FF7, + 17486: 0x00007FF8, + 17487: 0x00008075, + 17488: 0x000081D1, + 17489: 0x000081D2, + 17490: 0x000081D0, + 17491: 0x0000825F, + 17492: 0x0000825E, + 17493: 0x000085B4, + 17494: 0x000085C6, + 17495: 0x000085C0, + 17496: 0x000085C3, + 17497: 0x000085C2, + 17498: 0x000085B3, + 17499: 0x000085B5, + 17500: 0x000085BD, + 17501: 0x000085C7, + 17502: 0x000085C4, + 17503: 0x000085BF, + 17504: 0x000085CB, + 17505: 0x000085CE, + 17506: 0x000085C8, + 17507: 0x000085C5, + 17508: 0x000085B1, + 17509: 0x000085B6, + 17510: 0x000085D2, + 17511: 0x00008624, + 17512: 0x000085B8, + 17513: 0x000085B7, + 17514: 0x000085BE, + 17515: 0x00008669, + 17516: 0x000087E7, + 17517: 0x000087E6, + 17518: 0x000087E2, + 17519: 0x000087DB, + 17520: 0x000087EB, + 17521: 0x000087EA, + 17522: 0x000087E5, + 17523: 0x000087DF, + 17524: 0x000087F3, + 17525: 0x000087E4, + 17526: 0x000087D4, + 17527: 0x000087DC, + 17528: 0x000087D3, + 17529: 0x000087ED, + 17530: 0x000087D8, + 17531: 0x000087E3, + 17532: 0x000087A4, + 17533: 0x000087D7, + 17534: 0x000087D9, + 17535: 0x00008801, + 17536: 0x000087F4, + 17537: 0x000087E8, + 17538: 0x000087DD, + 17539: 0x00008953, + 17540: 0x0000894B, + 17541: 0x0000894F, + 17542: 0x0000894C, + 17543: 0x00008946, + 17544: 0x00008950, + 17545: 0x00008951, + 17546: 0x00008949, + 17547: 0x00008B2A, + 17548: 0x00008B27, + 17549: 0x00008B23, + 17550: 0x00008B33, + 17551: 0x00008B30, + 17552: 0x00008B35, + 17553: 0x00008B47, + 17554: 0x00008B2F, + 17555: 0x00008B3C, + 17556: 0x00008B3E, + 17557: 0x00008B31, + 17558: 0x00008B25, + 17559: 0x00008B37, + 17560: 0x00008B26, + 17561: 0x00008B36, + 17562: 0x00008B2E, + 17563: 0x00008B24, + 17564: 0x00008B3B, + 17565: 0x00008B3D, + 17566: 0x00008B3A, + 17567: 0x00008C42, + 17568: 0x00008C75, + 17569: 0x00008C99, + 17570: 0x00008C98, + 17571: 0x00008C97, + 17572: 0x00008CFE, + 17573: 0x00008D04, + 17574: 0x00008D02, + 17575: 0x00008D00, + 17576: 0x00008E5C, + 17577: 0x00008E62, + 17578: 0x00008E60, + 17579: 0x00008E57, + 17580: 0x00008E56, + 17581: 0x00008E5E, + 17582: 0x00008E65, + 17583: 0x00008E67, + 17584: 0x00008E5B, + 17585: 0x00008E5A, + 17586: 0x00008E61, + 17587: 0x00008E5D, + 17588: 0x00008E69, + 17589: 0x00008E54, + 17590: 0x00008F46, + 17591: 0x00008F47, + 17592: 0x00008F48, + 17593: 0x00008F4B, + 17594: 0x00009128, + 17595: 0x0000913A, + 17596: 0x0000913B, + 17597: 0x0000913E, + 17598: 0x000091A8, + 17599: 0x000091A5, + 17600: 0x000091A7, + 17601: 0x000091AF, + 17602: 0x000091AA, + 17603: 0x000093B5, + 17604: 0x0000938C, + 17605: 0x00009392, + 17606: 0x000093B7, + 17607: 0x0000939B, + 17608: 0x0000939D, + 17609: 0x00009389, + 17610: 0x000093A7, + 17611: 0x0000938E, + 17612: 0x000093AA, + 17613: 0x0000939E, + 17614: 0x000093A6, + 17615: 0x00009395, + 17616: 0x00009388, + 17617: 0x00009399, + 17618: 0x0000939F, + 17619: 0x0000938D, + 17620: 0x000093B1, + 17621: 0x00009391, + 17622: 0x000093B2, + 17623: 0x000093A4, + 17624: 0x000093A8, + 17625: 0x000093B4, + 17626: 0x000093A3, + 17627: 0x000093A5, + 17628: 0x000095D2, + 17629: 0x000095D3, + 17630: 0x000095D1, + 17631: 0x000096B3, + 17632: 0x000096D7, + 17633: 0x000096DA, + 17634: 0x00005DC2, + 17635: 0x000096DF, + 17636: 0x000096D8, + 17637: 0x000096DD, + 17638: 0x00009723, + 17639: 0x00009722, + 17640: 0x00009725, + 17641: 0x000097AC, + 17642: 0x000097AE, + 17643: 0x000097A8, + 17644: 0x000097AB, + 17645: 0x000097A4, + 17646: 0x000097AA, + 17647: 0x000097A2, + 17648: 0x000097A5, + 17649: 0x000097D7, + 17650: 0x000097D9, + 17651: 0x000097D6, + 17652: 0x000097D8, + 17653: 0x000097FA, + 17654: 0x00009850, + 17655: 0x00009851, + 17656: 0x00009852, + 17657: 0x000098B8, + 17658: 0x00009941, + 17659: 0x0000993C, + 17660: 0x0000993A, + 17661: 0x00009A0F, + 17662: 0x00009A0B, + 17663: 0x00009A09, + 17664: 0x00009A0D, + 17665: 0x00009A04, + 17666: 0x00009A11, + 17667: 0x00009A0A, + 17668: 0x00009A05, + 17669: 0x00009A07, + 17670: 0x00009A06, + 17671: 0x00009AC0, + 17672: 0x00009ADC, + 17673: 0x00009B08, + 17674: 0x00009B04, + 17675: 0x00009B05, + 17676: 0x00009B29, + 17677: 0x00009B35, + 17678: 0x00009B4A, + 17679: 0x00009B4C, + 17680: 0x00009B4B, + 17681: 0x00009BC7, + 17682: 0x00009BC6, + 17683: 0x00009BC3, + 17684: 0x00009BBF, + 17685: 0x00009BC1, + 17686: 0x00009BB5, + 17687: 0x00009BB8, + 17688: 0x00009BD3, + 17689: 0x00009BB6, + 17690: 0x00009BC4, + 17691: 0x00009BB9, + 17692: 0x00009BBD, + 17693: 0x00009D5C, + 17694: 0x00009D53, + 17695: 0x00009D4F, + 17696: 0x00009D4A, + 17697: 0x00009D5B, + 17698: 0x00009D4B, + 17699: 0x00009D59, + 17700: 0x00009D56, + 17701: 0x00009D4C, + 17702: 0x00009D57, + 17703: 0x00009D52, + 17704: 0x00009D54, + 17705: 0x00009D5F, + 17706: 0x00009D58, + 17707: 0x00009D5A, + 17708: 0x00009E8E, + 17709: 0x00009E8C, + 17710: 0x00009EDF, + 17711: 0x00009F01, + 17712: 0x00009F00, + 17713: 0x00009F16, + 17714: 0x00009F25, + 17715: 0x00009F2B, + 17716: 0x00009F2A, + 17717: 0x00009F29, + 17718: 0x00009F28, + 17719: 0x00009F4C, + 17720: 0x00009F55, + 17721: 0x00005134, + 17722: 0x00005135, + 17723: 0x00005296, + 17724: 0x000052F7, + 17725: 0x000053B4, + 17726: 0x000056AB, + 17727: 0x000056AD, + 17728: 0x000056A6, + 17729: 0x000056A7, + 17730: 0x000056AA, + 17731: 0x000056AC, + 17732: 0x000058DA, + 17733: 0x000058DD, + 17734: 0x000058DB, + 17735: 0x00005912, + 17736: 0x00005B3D, + 17737: 0x00005B3E, + 17738: 0x00005B3F, + 17739: 0x00005DC3, + 17740: 0x00005E70, + 17741: 0x00005FBF, + 17742: 0x000061FB, + 17743: 0x00006507, + 17744: 0x00006510, + 17745: 0x0000650D, + 17746: 0x00006509, + 17747: 0x0000650C, + 17748: 0x0000650E, + 17749: 0x00006584, + 17750: 0x000065DE, + 17751: 0x000065DD, + 17752: 0x000066DE, + 17753: 0x00006AE7, + 17754: 0x00006AE0, + 17755: 0x00006ACC, + 17756: 0x00006AD1, + 17757: 0x00006AD9, + 17758: 0x00006ACB, + 17759: 0x00006ADF, + 17760: 0x00006ADC, + 17761: 0x00006AD0, + 17762: 0x00006AEB, + 17763: 0x00006ACF, + 17764: 0x00006ACD, + 17765: 0x00006ADE, + 17766: 0x00006B60, + 17767: 0x00006BB0, + 17768: 0x00006C0C, + 17769: 0x00007019, + 17770: 0x00007027, + 17771: 0x00007020, + 17772: 0x00007016, + 17773: 0x0000702B, + 17774: 0x00007021, + 17775: 0x00007022, + 17776: 0x00007023, + 17777: 0x00007029, + 17778: 0x00007017, + 17779: 0x00007024, + 17780: 0x0000701C, + 17781: 0x0000702A, + 17782: 0x0000720C, + 17783: 0x0000720A, + 17784: 0x00007207, + 17785: 0x00007202, + 17786: 0x00007205, + 17787: 0x000072A5, + 17788: 0x000072A6, + 17789: 0x000072A4, + 17790: 0x000072A3, + 17791: 0x000072A1, + 17792: 0x000074CB, + 17793: 0x000074C5, + 17794: 0x000074B7, + 17795: 0x000074C3, + 17796: 0x00007516, + 17797: 0x00007660, + 17798: 0x000077C9, + 17799: 0x000077CA, + 17800: 0x000077C4, + 17801: 0x000077F1, + 17802: 0x0000791D, + 17803: 0x0000791B, + 17804: 0x00007921, + 17805: 0x0000791C, + 17806: 0x00007917, + 17807: 0x0000791E, + 17808: 0x000079B0, + 17809: 0x00007A67, + 17810: 0x00007A68, + 17811: 0x00007C33, + 17812: 0x00007C3C, + 17813: 0x00007C39, + 17814: 0x00007C2C, + 17815: 0x00007C3B, + 17816: 0x00007CEC, + 17817: 0x00007CEA, + 17818: 0x00007E76, + 17819: 0x00007E75, + 17820: 0x00007E78, + 17821: 0x00007E70, + 17822: 0x00007E77, + 17823: 0x00007E6F, + 17824: 0x00007E7A, + 17825: 0x00007E72, + 17826: 0x00007E74, + 17827: 0x00007E68, + 17828: 0x00007F4B, + 17829: 0x00007F4A, + 17830: 0x00007F83, + 17831: 0x00007F86, + 17832: 0x00007FB7, + 17833: 0x00007FFD, + 17834: 0x00007FFE, + 17835: 0x00008078, + 17836: 0x000081D7, + 17837: 0x000081D5, + 17838: 0x00008264, + 17839: 0x00008261, + 17840: 0x00008263, + 17841: 0x000085EB, + 17842: 0x000085F1, + 17843: 0x000085ED, + 17844: 0x000085D9, + 17845: 0x000085E1, + 17846: 0x000085E8, + 17847: 0x000085DA, + 17848: 0x000085D7, + 17849: 0x000085EC, + 17850: 0x000085F2, + 17851: 0x000085F8, + 17852: 0x000085D8, + 17853: 0x000085DF, + 17854: 0x000085E3, + 17855: 0x000085DC, + 17856: 0x000085D1, + 17857: 0x000085F0, + 17858: 0x000085E6, + 17859: 0x000085EF, + 17860: 0x000085DE, + 17861: 0x000085E2, + 17862: 0x00008800, + 17863: 0x000087FA, + 17864: 0x00008803, + 17865: 0x000087F6, + 17866: 0x000087F7, + 17867: 0x00008809, + 17868: 0x0000880C, + 17869: 0x0000880B, + 17870: 0x00008806, + 17871: 0x000087FC, + 17872: 0x00008808, + 17873: 0x000087FF, + 17874: 0x0000880A, + 17875: 0x00008802, + 17876: 0x00008962, + 17877: 0x0000895A, + 17878: 0x0000895B, + 17879: 0x00008957, + 17880: 0x00008961, + 17881: 0x0000895C, + 17882: 0x00008958, + 17883: 0x0000895D, + 17884: 0x00008959, + 17885: 0x00008988, + 17886: 0x000089B7, + 17887: 0x000089B6, + 17888: 0x000089F6, + 17889: 0x00008B50, + 17890: 0x00008B48, + 17891: 0x00008B4A, + 17892: 0x00008B40, + 17893: 0x00008B53, + 17894: 0x00008B56, + 17895: 0x00008B54, + 17896: 0x00008B4B, + 17897: 0x00008B55, + 17898: 0x00008B51, + 17899: 0x00008B42, + 17900: 0x00008B52, + 17901: 0x00008B57, + 17902: 0x00008C43, + 17903: 0x00008C77, + 17904: 0x00008C76, + 17905: 0x00008C9A, + 17906: 0x00008D06, + 17907: 0x00008D07, + 17908: 0x00008D09, + 17909: 0x00008DAC, + 17910: 0x00008DAA, + 17911: 0x00008DAD, + 17912: 0x00008DAB, + 17913: 0x00008E6D, + 17914: 0x00008E78, + 17915: 0x00008E73, + 17916: 0x00008E6A, + 17917: 0x00008E6F, + 17918: 0x00008E7B, + 17919: 0x00008EC2, + 17920: 0x00008F52, + 17921: 0x00008F51, + 17922: 0x00008F4F, + 17923: 0x00008F50, + 17924: 0x00008F53, + 17925: 0x00008FB4, + 17926: 0x00009140, + 17927: 0x0000913F, + 17928: 0x000091B0, + 17929: 0x000091AD, + 17930: 0x000093DE, + 17931: 0x000093C7, + 17932: 0x000093CF, + 17933: 0x000093C2, + 17934: 0x000093DA, + 17935: 0x000093D0, + 17936: 0x000093F9, + 17937: 0x000093EC, + 17938: 0x000093CC, + 17939: 0x000093D9, + 17940: 0x000093A9, + 17941: 0x000093E6, + 17942: 0x000093CA, + 17943: 0x000093D4, + 17944: 0x000093EE, + 17945: 0x000093E3, + 17946: 0x000093D5, + 17947: 0x000093C4, + 17948: 0x000093CE, + 17949: 0x000093C0, + 17950: 0x000093D2, + 17951: 0x000093E7, + 17952: 0x0000957D, + 17953: 0x000095DA, + 17954: 0x000095DB, + 17955: 0x000096E1, + 17956: 0x00009729, + 17957: 0x0000972B, + 17958: 0x0000972C, + 17959: 0x00009728, + 17960: 0x00009726, + 17961: 0x000097B3, + 17962: 0x000097B7, + 17963: 0x000097B6, + 17964: 0x000097DD, + 17965: 0x000097DE, + 17966: 0x000097DF, + 17967: 0x0000985C, + 17968: 0x00009859, + 17969: 0x0000985D, + 17970: 0x00009857, + 17971: 0x000098BF, + 17972: 0x000098BD, + 17973: 0x000098BB, + 17974: 0x000098BE, + 17975: 0x00009948, + 17976: 0x00009947, + 17977: 0x00009943, + 17978: 0x000099A6, + 17979: 0x000099A7, + 17980: 0x00009A1A, + 17981: 0x00009A15, + 17982: 0x00009A25, + 17983: 0x00009A1D, + 17984: 0x00009A24, + 17985: 0x00009A1B, + 17986: 0x00009A22, + 17987: 0x00009A20, + 17988: 0x00009A27, + 17989: 0x00009A23, + 17990: 0x00009A1E, + 17991: 0x00009A1C, + 17992: 0x00009A14, + 17993: 0x00009AC2, + 17994: 0x00009B0B, + 17995: 0x00009B0A, + 17996: 0x00009B0E, + 17997: 0x00009B0C, + 17998: 0x00009B37, + 17999: 0x00009BEA, + 18000: 0x00009BEB, + 18001: 0x00009BE0, + 18002: 0x00009BDE, + 18003: 0x00009BE4, + 18004: 0x00009BE6, + 18005: 0x00009BE2, + 18006: 0x00009BF0, + 18007: 0x00009BD4, + 18008: 0x00009BD7, + 18009: 0x00009BEC, + 18010: 0x00009BDC, + 18011: 0x00009BD9, + 18012: 0x00009BE5, + 18013: 0x00009BD5, + 18014: 0x00009BE1, + 18015: 0x00009BDA, + 18016: 0x00009D77, + 18017: 0x00009D81, + 18018: 0x00009D8A, + 18019: 0x00009D84, + 18020: 0x00009D88, + 18021: 0x00009D71, + 18022: 0x00009D80, + 18023: 0x00009D78, + 18024: 0x00009D86, + 18025: 0x00009D8B, + 18026: 0x00009D8C, + 18027: 0x00009D7D, + 18028: 0x00009D6B, + 18029: 0x00009D74, + 18030: 0x00009D75, + 18031: 0x00009D70, + 18032: 0x00009D69, + 18033: 0x00009D85, + 18034: 0x00009D73, + 18035: 0x00009D7B, + 18036: 0x00009D82, + 18037: 0x00009D6F, + 18038: 0x00009D79, + 18039: 0x00009D7F, + 18040: 0x00009D87, + 18041: 0x00009D68, + 18042: 0x00009E94, + 18043: 0x00009E91, + 18044: 0x00009EC0, + 18045: 0x00009EFC, + 18046: 0x00009F2D, + 18047: 0x00009F40, + 18048: 0x00009F41, + 18049: 0x00009F4D, + 18050: 0x00009F56, + 18051: 0x00009F57, + 18052: 0x00009F58, + 18053: 0x00005337, + 18054: 0x000056B2, + 18055: 0x000056B5, + 18056: 0x000056B3, + 18057: 0x000058E3, + 18058: 0x00005B45, + 18059: 0x00005DC6, + 18060: 0x00005DC7, + 18061: 0x00005EEE, + 18062: 0x00005EEF, + 18063: 0x00005FC0, + 18064: 0x00005FC1, + 18065: 0x000061F9, + 18066: 0x00006517, + 18067: 0x00006516, + 18068: 0x00006515, + 18069: 0x00006513, + 18070: 0x000065DF, + 18071: 0x000066E8, + 18072: 0x000066E3, + 18073: 0x000066E4, + 18074: 0x00006AF3, + 18075: 0x00006AF0, + 18076: 0x00006AEA, + 18077: 0x00006AE8, + 18078: 0x00006AF9, + 18079: 0x00006AF1, + 18080: 0x00006AEE, + 18081: 0x00006AEF, + 18082: 0x0000703C, + 18083: 0x00007035, + 18084: 0x0000702F, + 18085: 0x00007037, + 18086: 0x00007034, + 18087: 0x00007031, + 18088: 0x00007042, + 18089: 0x00007038, + 18090: 0x0000703F, + 18091: 0x0000703A, + 18092: 0x00007039, + 18093: 0x00007040, + 18094: 0x0000703B, + 18095: 0x00007033, + 18096: 0x00007041, + 18097: 0x00007213, + 18098: 0x00007214, + 18099: 0x000072A8, + 18100: 0x0000737D, + 18101: 0x0000737C, + 18102: 0x000074BA, + 18103: 0x000076AB, + 18104: 0x000076AA, + 18105: 0x000076BE, + 18106: 0x000076ED, + 18107: 0x000077CC, + 18108: 0x000077CE, + 18109: 0x000077CF, + 18110: 0x000077CD, + 18111: 0x000077F2, + 18112: 0x00007925, + 18113: 0x00007923, + 18114: 0x00007927, + 18115: 0x00007928, + 18116: 0x00007924, + 18117: 0x00007929, + 18118: 0x000079B2, + 18119: 0x00007A6E, + 18120: 0x00007A6C, + 18121: 0x00007A6D, + 18122: 0x00007AF7, + 18123: 0x00007C49, + 18124: 0x00007C48, + 18125: 0x00007C4A, + 18126: 0x00007C47, + 18127: 0x00007C45, + 18128: 0x00007CEE, + 18129: 0x00007E7B, + 18130: 0x00007E7E, + 18131: 0x00007E81, + 18132: 0x00007E80, + 18133: 0x00007FBA, + 18134: 0x00007FFF, + 18135: 0x00008079, + 18136: 0x000081DB, + 18137: 0x000081D9, + 18138: 0x0000820B, + 18139: 0x00008268, + 18140: 0x00008269, + 18141: 0x00008622, + 18142: 0x000085FF, + 18143: 0x00008601, + 18144: 0x000085FE, + 18145: 0x0000861B, + 18146: 0x00008600, + 18147: 0x000085F6, + 18148: 0x00008604, + 18149: 0x00008609, + 18150: 0x00008605, + 18151: 0x0000860C, + 18152: 0x000085FD, + 18153: 0x00008819, + 18154: 0x00008810, + 18155: 0x00008811, + 18156: 0x00008817, + 18157: 0x00008813, + 18158: 0x00008816, + 18159: 0x00008963, + 18160: 0x00008966, + 18161: 0x000089B9, + 18162: 0x000089F7, + 18163: 0x00008B60, + 18164: 0x00008B6A, + 18165: 0x00008B5D, + 18166: 0x00008B68, + 18167: 0x00008B63, + 18168: 0x00008B65, + 18169: 0x00008B67, + 18170: 0x00008B6D, + 18171: 0x00008DAE, + 18172: 0x00008E86, + 18173: 0x00008E88, + 18174: 0x00008E84, + 18175: 0x00008F59, + 18176: 0x00008F56, + 18177: 0x00008F57, + 18178: 0x00008F55, + 18179: 0x00008F58, + 18180: 0x00008F5A, + 18181: 0x0000908D, + 18182: 0x00009143, + 18183: 0x00009141, + 18184: 0x000091B7, + 18185: 0x000091B5, + 18186: 0x000091B2, + 18187: 0x000091B3, + 18188: 0x0000940B, + 18189: 0x00009413, + 18190: 0x000093FB, + 18191: 0x00009420, + 18192: 0x0000940F, + 18193: 0x00009414, + 18194: 0x000093FE, + 18195: 0x00009415, + 18196: 0x00009410, + 18197: 0x00009428, + 18198: 0x00009419, + 18199: 0x0000940D, + 18200: 0x000093F5, + 18201: 0x00009400, + 18202: 0x000093F7, + 18203: 0x00009407, + 18204: 0x0000940E, + 18205: 0x00009416, + 18206: 0x00009412, + 18207: 0x000093FA, + 18208: 0x00009409, + 18209: 0x000093F8, + 18210: 0x0000940A, + 18211: 0x000093FF, + 18212: 0x000093FC, + 18213: 0x0000940C, + 18214: 0x000093F6, + 18215: 0x00009411, + 18216: 0x00009406, + 18217: 0x000095DE, + 18218: 0x000095E0, + 18219: 0x000095DF, + 18220: 0x0000972E, + 18221: 0x0000972F, + 18222: 0x000097B9, + 18223: 0x000097BB, + 18224: 0x000097FD, + 18225: 0x000097FE, + 18226: 0x00009860, + 18227: 0x00009862, + 18228: 0x00009863, + 18229: 0x0000985F, + 18230: 0x000098C1, + 18231: 0x000098C2, + 18232: 0x00009950, + 18233: 0x0000994E, + 18234: 0x00009959, + 18235: 0x0000994C, + 18236: 0x0000994B, + 18237: 0x00009953, + 18238: 0x00009A32, + 18239: 0x00009A34, + 18240: 0x00009A31, + 18241: 0x00009A2C, + 18242: 0x00009A2A, + 18243: 0x00009A36, + 18244: 0x00009A29, + 18245: 0x00009A2E, + 18246: 0x00009A38, + 18247: 0x00009A2D, + 18248: 0x00009AC7, + 18249: 0x00009ACA, + 18250: 0x00009AC6, + 18251: 0x00009B10, + 18252: 0x00009B12, + 18253: 0x00009B11, + 18254: 0x00009C0B, + 18255: 0x00009C08, + 18256: 0x00009BF7, + 18257: 0x00009C05, + 18258: 0x00009C12, + 18259: 0x00009BF8, + 18260: 0x00009C40, + 18261: 0x00009C07, + 18262: 0x00009C0E, + 18263: 0x00009C06, + 18264: 0x00009C17, + 18265: 0x00009C14, + 18266: 0x00009C09, + 18267: 0x00009D9F, + 18268: 0x00009D99, + 18269: 0x00009DA4, + 18270: 0x00009D9D, + 18271: 0x00009D92, + 18272: 0x00009D98, + 18273: 0x00009D90, + 18274: 0x00009D9B, + 18275: 0x00009DA0, + 18276: 0x00009D94, + 18277: 0x00009D9C, + 18278: 0x00009DAA, + 18279: 0x00009D97, + 18280: 0x00009DA1, + 18281: 0x00009D9A, + 18282: 0x00009DA2, + 18283: 0x00009DA8, + 18284: 0x00009D9E, + 18285: 0x00009DA3, + 18286: 0x00009DBF, + 18287: 0x00009DA9, + 18288: 0x00009D96, + 18289: 0x00009DA6, + 18290: 0x00009DA7, + 18291: 0x00009E99, + 18292: 0x00009E9B, + 18293: 0x00009E9A, + 18294: 0x00009EE5, + 18295: 0x00009EE4, + 18296: 0x00009EE7, + 18297: 0x00009EE6, + 18298: 0x00009F30, + 18299: 0x00009F2E, + 18300: 0x00009F5B, + 18301: 0x00009F60, + 18302: 0x00009F5E, + 18303: 0x00009F5D, + 18304: 0x00009F59, + 18305: 0x00009F91, + 18306: 0x0000513A, + 18307: 0x00005139, + 18308: 0x00005298, + 18309: 0x00005297, + 18310: 0x000056C3, + 18311: 0x000056BD, + 18312: 0x000056BE, + 18313: 0x00005B48, + 18314: 0x00005B47, + 18315: 0x00005DCB, + 18316: 0x00005DCF, + 18317: 0x00005EF1, + 18318: 0x000061FD, + 18319: 0x0000651B, + 18320: 0x00006B02, + 18321: 0x00006AFC, + 18322: 0x00006B03, + 18323: 0x00006AF8, + 18324: 0x00006B00, + 18325: 0x00007043, + 18326: 0x00007044, + 18327: 0x0000704A, + 18328: 0x00007048, + 18329: 0x00007049, + 18330: 0x00007045, + 18331: 0x00007046, + 18332: 0x0000721D, + 18333: 0x0000721A, + 18334: 0x00007219, + 18335: 0x0000737E, + 18336: 0x00007517, + 18337: 0x0000766A, + 18338: 0x000077D0, + 18339: 0x0000792D, + 18340: 0x00007931, + 18341: 0x0000792F, + 18342: 0x00007C54, + 18343: 0x00007C53, + 18344: 0x00007CF2, + 18345: 0x00007E8A, + 18346: 0x00007E87, + 18347: 0x00007E88, + 18348: 0x00007E8B, + 18349: 0x00007E86, + 18350: 0x00007E8D, + 18351: 0x00007F4D, + 18352: 0x00007FBB, + 18353: 0x00008030, + 18354: 0x000081DD, + 18355: 0x00008618, + 18356: 0x0000862A, + 18357: 0x00008626, + 18358: 0x0000861F, + 18359: 0x00008623, + 18360: 0x0000861C, + 18361: 0x00008619, + 18362: 0x00008627, + 18363: 0x0000862E, + 18364: 0x00008621, + 18365: 0x00008620, + 18366: 0x00008629, + 18367: 0x0000861E, + 18368: 0x00008625, + 18369: 0x00008829, + 18370: 0x0000881D, + 18371: 0x0000881B, + 18372: 0x00008820, + 18373: 0x00008824, + 18374: 0x0000881C, + 18375: 0x0000882B, + 18376: 0x0000884A, + 18377: 0x0000896D, + 18378: 0x00008969, + 18379: 0x0000896E, + 18380: 0x0000896B, + 18381: 0x000089FA, + 18382: 0x00008B79, + 18383: 0x00008B78, + 18384: 0x00008B45, + 18385: 0x00008B7A, + 18386: 0x00008B7B, + 18387: 0x00008D10, + 18388: 0x00008D14, + 18389: 0x00008DAF, + 18390: 0x00008E8E, + 18391: 0x00008E8C, + 18392: 0x00008F5E, + 18393: 0x00008F5B, + 18394: 0x00008F5D, + 18395: 0x00009146, + 18396: 0x00009144, + 18397: 0x00009145, + 18398: 0x000091B9, + 18399: 0x0000943F, + 18400: 0x0000943B, + 18401: 0x00009436, + 18402: 0x00009429, + 18403: 0x0000943D, + 18404: 0x0000943C, + 18405: 0x00009430, + 18406: 0x00009439, + 18407: 0x0000942A, + 18408: 0x00009437, + 18409: 0x0000942C, + 18410: 0x00009440, + 18411: 0x00009431, + 18412: 0x000095E5, + 18413: 0x000095E4, + 18414: 0x000095E3, + 18415: 0x00009735, + 18416: 0x0000973A, + 18417: 0x000097BF, + 18418: 0x000097E1, + 18419: 0x00009864, + 18420: 0x000098C9, + 18421: 0x000098C6, + 18422: 0x000098C0, + 18423: 0x00009958, + 18424: 0x00009956, + 18425: 0x00009A39, + 18426: 0x00009A3D, + 18427: 0x00009A46, + 18428: 0x00009A44, + 18429: 0x00009A42, + 18430: 0x00009A41, + 18431: 0x00009A3A, + 18432: 0x00009A3F, + 18433: 0x00009ACD, + 18434: 0x00009B15, + 18435: 0x00009B17, + 18436: 0x00009B18, + 18437: 0x00009B16, + 18438: 0x00009B3A, + 18439: 0x00009B52, + 18440: 0x00009C2B, + 18441: 0x00009C1D, + 18442: 0x00009C1C, + 18443: 0x00009C2C, + 18444: 0x00009C23, + 18445: 0x00009C28, + 18446: 0x00009C29, + 18447: 0x00009C24, + 18448: 0x00009C21, + 18449: 0x00009DB7, + 18450: 0x00009DB6, + 18451: 0x00009DBC, + 18452: 0x00009DC1, + 18453: 0x00009DC7, + 18454: 0x00009DCA, + 18455: 0x00009DCF, + 18456: 0x00009DBE, + 18457: 0x00009DC5, + 18458: 0x00009DC3, + 18459: 0x00009DBB, + 18460: 0x00009DB5, + 18461: 0x00009DCE, + 18462: 0x00009DB9, + 18463: 0x00009DBA, + 18464: 0x00009DAC, + 18465: 0x00009DC8, + 18466: 0x00009DB1, + 18467: 0x00009DAD, + 18468: 0x00009DCC, + 18469: 0x00009DB3, + 18470: 0x00009DCD, + 18471: 0x00009DB2, + 18472: 0x00009E7A, + 18473: 0x00009E9C, + 18474: 0x00009EEB, + 18475: 0x00009EEE, + 18476: 0x00009EED, + 18477: 0x00009F1B, + 18478: 0x00009F18, + 18479: 0x00009F1A, + 18480: 0x00009F31, + 18481: 0x00009F4E, + 18482: 0x00009F65, + 18483: 0x00009F64, + 18484: 0x00009F92, + 18485: 0x00004EB9, + 18486: 0x000056C6, + 18487: 0x000056C5, + 18488: 0x000056CB, + 18489: 0x00005971, + 18490: 0x00005B4B, + 18491: 0x00005B4C, + 18492: 0x00005DD5, + 18493: 0x00005DD1, + 18494: 0x00005EF2, + 18495: 0x00006521, + 18496: 0x00006520, + 18497: 0x00006526, + 18498: 0x00006522, + 18499: 0x00006B0B, + 18500: 0x00006B08, + 18501: 0x00006B09, + 18502: 0x00006C0D, + 18503: 0x00007055, + 18504: 0x00007056, + 18505: 0x00007057, + 18506: 0x00007052, + 18507: 0x0000721E, + 18508: 0x0000721F, + 18509: 0x000072A9, + 18510: 0x0000737F, + 18511: 0x000074D8, + 18512: 0x000074D5, + 18513: 0x000074D9, + 18514: 0x000074D7, + 18515: 0x0000766D, + 18516: 0x000076AD, + 18517: 0x00007935, + 18518: 0x000079B4, + 18519: 0x00007A70, + 18520: 0x00007A71, + 18521: 0x00007C57, + 18522: 0x00007C5C, + 18523: 0x00007C59, + 18524: 0x00007C5B, + 18525: 0x00007C5A, + 18526: 0x00007CF4, + 18527: 0x00007CF1, + 18528: 0x00007E91, + 18529: 0x00007F4F, + 18530: 0x00007F87, + 18531: 0x000081DE, + 18532: 0x0000826B, + 18533: 0x00008634, + 18534: 0x00008635, + 18535: 0x00008633, + 18536: 0x0000862C, + 18537: 0x00008632, + 18538: 0x00008636, + 18539: 0x0000882C, + 18540: 0x00008828, + 18541: 0x00008826, + 18542: 0x0000882A, + 18543: 0x00008825, + 18544: 0x00008971, + 18545: 0x000089BF, + 18546: 0x000089BE, + 18547: 0x000089FB, + 18548: 0x00008B7E, + 18549: 0x00008B84, + 18550: 0x00008B82, + 18551: 0x00008B86, + 18552: 0x00008B85, + 18553: 0x00008B7F, + 18554: 0x00008D15, + 18555: 0x00008E95, + 18556: 0x00008E94, + 18557: 0x00008E9A, + 18558: 0x00008E92, + 18559: 0x00008E90, + 18560: 0x00008E96, + 18561: 0x00008E97, + 18562: 0x00008F60, + 18563: 0x00008F62, + 18564: 0x00009147, + 18565: 0x0000944C, + 18566: 0x00009450, + 18567: 0x0000944A, + 18568: 0x0000944B, + 18569: 0x0000944F, + 18570: 0x00009447, + 18571: 0x00009445, + 18572: 0x00009448, + 18573: 0x00009449, + 18574: 0x00009446, + 18575: 0x0000973F, + 18576: 0x000097E3, + 18577: 0x0000986A, + 18578: 0x00009869, + 18579: 0x000098CB, + 18580: 0x00009954, + 18581: 0x0000995B, + 18582: 0x00009A4E, + 18583: 0x00009A53, + 18584: 0x00009A54, + 18585: 0x00009A4C, + 18586: 0x00009A4F, + 18587: 0x00009A48, + 18588: 0x00009A4A, + 18589: 0x00009A49, + 18590: 0x00009A52, + 18591: 0x00009A50, + 18592: 0x00009AD0, + 18593: 0x00009B19, + 18594: 0x00009B2B, + 18595: 0x00009B3B, + 18596: 0x00009B56, + 18597: 0x00009B55, + 18598: 0x00009C46, + 18599: 0x00009C48, + 18600: 0x00009C3F, + 18601: 0x00009C44, + 18602: 0x00009C39, + 18603: 0x00009C33, + 18604: 0x00009C41, + 18605: 0x00009C3C, + 18606: 0x00009C37, + 18607: 0x00009C34, + 18608: 0x00009C32, + 18609: 0x00009C3D, + 18610: 0x00009C36, + 18611: 0x00009DDB, + 18612: 0x00009DD2, + 18613: 0x00009DDE, + 18614: 0x00009DDA, + 18615: 0x00009DCB, + 18616: 0x00009DD0, + 18617: 0x00009DDC, + 18618: 0x00009DD1, + 18619: 0x00009DDF, + 18620: 0x00009DE9, + 18621: 0x00009DD9, + 18622: 0x00009DD8, + 18623: 0x00009DD6, + 18624: 0x00009DF5, + 18625: 0x00009DD5, + 18626: 0x00009DDD, + 18627: 0x00009EB6, + 18628: 0x00009EF0, + 18629: 0x00009F35, + 18630: 0x00009F33, + 18631: 0x00009F32, + 18632: 0x00009F42, + 18633: 0x00009F6B, + 18634: 0x00009F95, + 18635: 0x00009FA2, + 18636: 0x0000513D, + 18637: 0x00005299, + 18638: 0x000058E8, + 18639: 0x000058E7, + 18640: 0x00005972, + 18641: 0x00005B4D, + 18642: 0x00005DD8, + 18643: 0x0000882F, + 18644: 0x00005F4F, + 18645: 0x00006201, + 18646: 0x00006203, + 18647: 0x00006204, + 18648: 0x00006529, + 18649: 0x00006525, + 18650: 0x00006596, + 18651: 0x000066EB, + 18652: 0x00006B11, + 18653: 0x00006B12, + 18654: 0x00006B0F, + 18655: 0x00006BCA, + 18656: 0x0000705B, + 18657: 0x0000705A, + 18658: 0x00007222, + 18659: 0x00007382, + 18660: 0x00007381, + 18661: 0x00007383, + 18662: 0x00007670, + 18663: 0x000077D4, + 18664: 0x00007C67, + 18665: 0x00007C66, + 18666: 0x00007E95, + 18667: 0x0000826C, + 18668: 0x0000863A, + 18669: 0x00008640, + 18670: 0x00008639, + 18671: 0x0000863C, + 18672: 0x00008631, + 18673: 0x0000863B, + 18674: 0x0000863E, + 18675: 0x00008830, + 18676: 0x00008832, + 18677: 0x0000882E, + 18678: 0x00008833, + 18679: 0x00008976, + 18680: 0x00008974, + 18681: 0x00008973, + 18682: 0x000089FE, + 18683: 0x00008B8C, + 18684: 0x00008B8E, + 18685: 0x00008B8B, + 18686: 0x00008B88, + 18687: 0x00008C45, + 18688: 0x00008D19, + 18689: 0x00008E98, + 18690: 0x00008F64, + 18691: 0x00008F63, + 18692: 0x000091BC, + 18693: 0x00009462, + 18694: 0x00009455, + 18695: 0x0000945D, + 18696: 0x00009457, + 18697: 0x0000945E, + 18698: 0x000097C4, + 18699: 0x000097C5, + 18700: 0x00009800, + 18701: 0x00009A56, + 18702: 0x00009A59, + 18703: 0x00009B1E, + 18704: 0x00009B1F, + 18705: 0x00009B20, + 18706: 0x00009C52, + 18707: 0x00009C58, + 18708: 0x00009C50, + 18709: 0x00009C4A, + 18710: 0x00009C4D, + 18711: 0x00009C4B, + 18712: 0x00009C55, + 18713: 0x00009C59, + 18714: 0x00009C4C, + 18715: 0x00009C4E, + 18716: 0x00009DFB, + 18717: 0x00009DF7, + 18718: 0x00009DEF, + 18719: 0x00009DE3, + 18720: 0x00009DEB, + 18721: 0x00009DF8, + 18722: 0x00009DE4, + 18723: 0x00009DF6, + 18724: 0x00009DE1, + 18725: 0x00009DEE, + 18726: 0x00009DE6, + 18727: 0x00009DF2, + 18728: 0x00009DF0, + 18729: 0x00009DE2, + 18730: 0x00009DEC, + 18731: 0x00009DF4, + 18732: 0x00009DF3, + 18733: 0x00009DE8, + 18734: 0x00009DED, + 18735: 0x00009EC2, + 18736: 0x00009ED0, + 18737: 0x00009EF2, + 18738: 0x00009EF3, + 18739: 0x00009F06, + 18740: 0x00009F1C, + 18741: 0x00009F38, + 18742: 0x00009F37, + 18743: 0x00009F36, + 18744: 0x00009F43, + 18745: 0x00009F4F, + 18746: 0x00009F71, + 18747: 0x00009F70, + 18748: 0x00009F6E, + 18749: 0x00009F6F, + 18750: 0x000056D3, + 18751: 0x000056CD, + 18752: 0x00005B4E, + 18753: 0x00005C6D, + 18754: 0x0000652D, + 18755: 0x000066ED, + 18756: 0x000066EE, + 18757: 0x00006B13, + 18758: 0x0000705F, + 18759: 0x00007061, + 18760: 0x0000705D, + 18761: 0x00007060, + 18762: 0x00007223, + 18763: 0x000074DB, + 18764: 0x000074E5, + 18765: 0x000077D5, + 18766: 0x00007938, + 18767: 0x000079B7, + 18768: 0x000079B6, + 18769: 0x00007C6A, + 18770: 0x00007E97, + 18771: 0x00007F89, + 18772: 0x0000826D, + 18773: 0x00008643, + 18774: 0x00008838, + 18775: 0x00008837, + 18776: 0x00008835, + 18777: 0x0000884B, + 18778: 0x00008B94, + 18779: 0x00008B95, + 18780: 0x00008E9E, + 18781: 0x00008E9F, + 18782: 0x00008EA0, + 18783: 0x00008E9D, + 18784: 0x000091BE, + 18785: 0x000091BD, + 18786: 0x000091C2, + 18787: 0x0000946B, + 18788: 0x00009468, + 18789: 0x00009469, + 18790: 0x000096E5, + 18791: 0x00009746, + 18792: 0x00009743, + 18793: 0x00009747, + 18794: 0x000097C7, + 18795: 0x000097E5, + 18796: 0x00009A5E, + 18797: 0x00009AD5, + 18798: 0x00009B59, + 18799: 0x00009C63, + 18800: 0x00009C67, + 18801: 0x00009C66, + 18802: 0x00009C62, + 18803: 0x00009C5E, + 18804: 0x00009C60, + 18805: 0x00009E02, + 18806: 0x00009DFE, + 18807: 0x00009E07, + 18808: 0x00009E03, + 18809: 0x00009E06, + 18810: 0x00009E05, + 18811: 0x00009E00, + 18812: 0x00009E01, + 18813: 0x00009E09, + 18814: 0x00009DFF, + 18815: 0x00009DFD, + 18816: 0x00009E04, + 18817: 0x00009EA0, + 18818: 0x00009F1E, + 18819: 0x00009F46, + 18820: 0x00009F74, + 18821: 0x00009F75, + 18822: 0x00009F76, + 18823: 0x000056D4, + 18824: 0x0000652E, + 18825: 0x000065B8, + 18826: 0x00006B18, + 18827: 0x00006B19, + 18828: 0x00006B17, + 18829: 0x00006B1A, + 18830: 0x00007062, + 18831: 0x00007226, + 18832: 0x000072AA, + 18833: 0x000077D8, + 18834: 0x000077D9, + 18835: 0x00007939, + 18836: 0x00007C69, + 18837: 0x00007C6B, + 18838: 0x00007CF6, + 18839: 0x00007E9A, + 18840: 0x00007E98, + 18841: 0x00007E9B, + 18842: 0x00007E99, + 18843: 0x000081E0, + 18844: 0x000081E1, + 18845: 0x00008646, + 18846: 0x00008647, + 18847: 0x00008648, + 18848: 0x00008979, + 18849: 0x0000897A, + 18850: 0x0000897C, + 18851: 0x0000897B, + 18852: 0x000089FF, + 18853: 0x00008B98, + 18854: 0x00008B99, + 18855: 0x00008EA5, + 18856: 0x00008EA4, + 18857: 0x00008EA3, + 18858: 0x0000946E, + 18859: 0x0000946D, + 18860: 0x0000946F, + 18861: 0x00009471, + 18862: 0x00009473, + 18863: 0x00009749, + 18864: 0x00009872, + 18865: 0x0000995F, + 18866: 0x00009C68, + 18867: 0x00009C6E, + 18868: 0x00009C6D, + 18869: 0x00009E0B, + 18870: 0x00009E0D, + 18871: 0x00009E10, + 18872: 0x00009E0F, + 18873: 0x00009E12, + 18874: 0x00009E11, + 18875: 0x00009EA1, + 18876: 0x00009EF5, + 18877: 0x00009F09, + 18878: 0x00009F47, + 18879: 0x00009F78, + 18880: 0x00009F7B, + 18881: 0x00009F7A, + 18882: 0x00009F79, + 18883: 0x0000571E, + 18884: 0x00007066, + 18885: 0x00007C6F, + 18886: 0x0000883C, + 18887: 0x00008DB2, + 18888: 0x00008EA6, + 18889: 0x000091C3, + 18890: 0x00009474, + 18891: 0x00009478, + 18892: 0x00009476, + 18893: 0x00009475, + 18894: 0x00009A60, + 18895: 0x00009C74, + 18896: 0x00009C73, + 18897: 0x00009C71, + 18898: 0x00009C75, + 18899: 0x00009E14, + 18900: 0x00009E13, + 18901: 0x00009EF6, + 18902: 0x00009F0A, + 18903: 0x00009FA4, + 18904: 0x00007068, + 18905: 0x00007065, + 18906: 0x00007CF7, + 18907: 0x0000866A, + 18908: 0x0000883E, + 18909: 0x0000883D, + 18910: 0x0000883F, + 18911: 0x00008B9E, + 18912: 0x00008C9C, + 18913: 0x00008EA9, + 18914: 0x00008EC9, + 18915: 0x0000974B, + 18916: 0x00009873, + 18917: 0x00009874, + 18918: 0x000098CC, + 18919: 0x00009961, + 18920: 0x000099AB, + 18921: 0x00009A64, + 18922: 0x00009A66, + 18923: 0x00009A67, + 18924: 0x00009B24, + 18925: 0x00009E15, + 18926: 0x00009E17, + 18927: 0x00009F48, + 18928: 0x00006207, + 18929: 0x00006B1E, + 18930: 0x00007227, + 18931: 0x0000864C, + 18932: 0x00008EA8, + 18933: 0x00009482, + 18934: 0x00009480, + 18935: 0x00009481, + 18936: 0x00009A69, + 18937: 0x00009A68, + 18938: 0x00009B2E, + 18939: 0x00009E19, + 18940: 0x00007229, + 18941: 0x0000864B, + 18942: 0x00008B9F, + 18943: 0x00009483, + 18944: 0x00009C79, + 18945: 0x00009EB7, + 18946: 0x00007675, + 18947: 0x00009A6B, + 18948: 0x00009C7A, + 18949: 0x00009E1D, + 18950: 0x00007069, + 18951: 0x0000706A, + 18952: 0x00009EA4, + 18953: 0x00009F7E, + 18954: 0x00009F49, + 18955: 0x00009F98, + 18956: 0x00007881, + 18957: 0x000092B9, + 18958: 0x000088CF, + 18959: 0x000058BB, + 18960: 0x00006052, + 18961: 0x00007CA7, + 18962: 0x00005AFA, + 18963: 0x00002554, + 18964: 0x00002566, + 18965: 0x00002557, + 18966: 0x00002560, + 18967: 0x0000256C, + 18968: 0x00002563, + 18969: 0x0000255A, + 18970: 0x00002569, + 18971: 0x0000255D, + 18972: 0x00002552, + 18973: 0x00002564, + 18974: 0x00002555, + 18975: 0x0000255E, + 18976: 0x0000256A, + 18977: 0x00002561, + 18978: 0x00002558, + 18979: 0x00002567, + 18980: 0x0000255B, + 18981: 0x00002553, + 18982: 0x00002565, + 18983: 0x00002556, + 18984: 0x0000255F, + 18985: 0x0000256B, + 18986: 0x00002562, + 18987: 0x00002559, + 18988: 0x00002568, + 18989: 0x0000255C, + 18990: 0x00002551, + 18991: 0x00002550, + 18992: 0x0000256D, + 18993: 0x0000256E, + 18994: 0x00002570, + 18995: 0x0000256F, + 18996: 0x0000FFED, + 18997: 0x00020547, + 18998: 0x000092DB, + 18999: 0x000205DF, + 19000: 0x00023FC5, + 19001: 0x0000854C, + 19002: 0x000042B5, + 19003: 0x000073EF, + 19004: 0x000051B5, + 19005: 0x00003649, + 19006: 0x00024942, + 19007: 0x000289E4, + 19008: 0x00009344, + 19009: 0x000219DB, + 19010: 0x000082EE, + 19011: 0x00023CC8, + 19012: 0x0000783C, + 19013: 0x00006744, + 19014: 0x000062DF, + 19015: 0x00024933, + 19016: 0x000289AA, + 19017: 0x000202A0, + 19018: 0x00026BB3, + 19019: 0x00021305, + 19020: 0x00004FAB, + 19021: 0x000224ED, + 19022: 0x00005008, + 19023: 0x00026D29, + 19024: 0x00027A84, + 19025: 0x00023600, + 19026: 0x00024AB1, + 19027: 0x00022513, + 19028: 0x00005029, + 19029: 0x0002037E, + 19030: 0x00005FA4, + 19031: 0x00020380, + 19032: 0x00020347, + 19033: 0x00006EDB, + 19034: 0x0002041F, + 19035: 0x0000507D, + 19036: 0x00005101, + 19037: 0x0000347A, + 19038: 0x0000510E, + 19039: 0x0000986C, + 19040: 0x00003743, + 19041: 0x00008416, + 19042: 0x000249A4, + 19043: 0x00020487, + 19044: 0x00005160, + 19045: 0x000233B4, + 19046: 0x0000516A, + 19047: 0x00020BFF, + 19048: 0x000220FC, + 19049: 0x000202E5, + 19050: 0x00022530, + 19051: 0x0002058E, + 19052: 0x00023233, + 19053: 0x00021983, + 19054: 0x00005B82, + 19055: 0x0000877D, + 19056: 0x000205B3, + 19057: 0x00023C99, + 19058: 0x000051B2, + 19059: 0x000051B8, + 19060: 0x00009D34, + 19061: 0x000051C9, + 19062: 0x000051CF, + 19063: 0x000051D1, + 19064: 0x00003CDC, + 19065: 0x000051D3, + 19066: 0x00024AA6, + 19067: 0x000051B3, + 19068: 0x000051E2, + 19069: 0x00005342, + 19070: 0x000051ED, + 19071: 0x000083CD, + 19072: 0x0000693E, + 19073: 0x0002372D, + 19074: 0x00005F7B, + 19075: 0x0000520B, + 19076: 0x00005226, + 19077: 0x0000523C, + 19078: 0x000052B5, + 19079: 0x00005257, + 19080: 0x00005294, + 19081: 0x000052B9, + 19082: 0x000052C5, + 19083: 0x00007C15, + 19084: 0x00008542, + 19085: 0x000052E0, + 19086: 0x0000860D, + 19087: 0x00026B13, + 19088: 0x00005305, + 19089: 0x00028ADE, + 19090: 0x00005549, + 19091: 0x00006ED9, + 19092: 0x00023F80, + 19093: 0x00020954, + 19094: 0x00023FEC, + 19095: 0x00005333, + 19096: 0x00005344, + 19097: 0x00020BE2, + 19098: 0x00006CCB, + 19099: 0x00021726, + 19100: 0x0000681B, + 19101: 0x000073D5, + 19102: 0x0000604A, + 19103: 0x00003EAA, + 19104: 0x000038CC, + 19105: 0x000216E8, + 19106: 0x000071DD, + 19107: 0x000044A2, + 19108: 0x0000536D, + 19109: 0x00005374, + 19110: 0x000286AB, + 19111: 0x0000537E, + 19112: 0x0000537F, + 19113: 0x00021596, + 19114: 0x00021613, + 19115: 0x000077E6, + 19116: 0x00005393, + 19117: 0x00028A9B, + 19118: 0x000053A0, + 19119: 0x000053AB, + 19120: 0x000053AE, + 19121: 0x000073A7, + 19122: 0x00025772, + 19123: 0x00003F59, + 19124: 0x0000739C, + 19125: 0x000053C1, + 19126: 0x000053C5, + 19127: 0x00006C49, + 19128: 0x00004E49, + 19129: 0x000057FE, + 19130: 0x000053D9, + 19131: 0x00003AAB, + 19132: 0x00020B8F, + 19133: 0x000053E0, + 19134: 0x00023FEB, + 19135: 0x00022DA3, + 19136: 0x000053F6, + 19137: 0x00020C77, + 19138: 0x00005413, + 19139: 0x00007079, + 19140: 0x0000552B, + 19141: 0x00006657, + 19142: 0x00006D5B, + 19143: 0x0000546D, + 19144: 0x00026B53, + 19145: 0x00020D74, + 19146: 0x0000555D, + 19147: 0x0000548F, + 19148: 0x000054A4, + 19149: 0x000047A6, + 19150: 0x0002170D, + 19151: 0x00020EDD, + 19152: 0x00003DB4, + 19153: 0x00020D4D, + 19154: 0x000289BC, + 19155: 0x00022698, + 19156: 0x00005547, + 19157: 0x00004CED, + 19158: 0x0000542F, + 19159: 0x00007417, + 19160: 0x00005586, + 19161: 0x000055A9, + 19162: 0x00005605, + 19163: 0x000218D7, + 19164: 0x0002403A, + 19165: 0x00004552, + 19166: 0x00024435, + 19167: 0x000066B3, + 19168: 0x000210B4, + 19169: 0x00005637, + 19170: 0x000066CD, + 19171: 0x0002328A, + 19172: 0x000066A4, + 19173: 0x000066AD, + 19174: 0x0000564D, + 19175: 0x0000564F, + 19176: 0x000078F1, + 19177: 0x000056F1, + 19178: 0x00009787, + 19179: 0x000053FE, + 19180: 0x00005700, + 19181: 0x000056EF, + 19182: 0x000056ED, + 19183: 0x00028B66, + 19184: 0x00003623, + 19185: 0x0002124F, + 19186: 0x00005746, + 19187: 0x000241A5, + 19188: 0x00006C6E, + 19189: 0x0000708B, + 19190: 0x00005742, + 19191: 0x000036B1, + 19192: 0x00026C7E, + 19193: 0x000057E6, + 19194: 0x00021416, + 19195: 0x00005803, + 19196: 0x00021454, + 19197: 0x00024363, + 19198: 0x00005826, + 19199: 0x00024BF5, + 19200: 0x0000585C, + 19201: 0x000058AA, + 19202: 0x00003561, + 19203: 0x000058E0, + 19204: 0x000058DC, + 19205: 0x0002123C, + 19206: 0x000058FB, + 19207: 0x00005BFF, + 19208: 0x00005743, + 19209: 0x0002A150, + 19210: 0x00024278, + 19211: 0x000093D3, + 19212: 0x000035A1, + 19213: 0x0000591F, + 19214: 0x000068A6, + 19215: 0x000036C3, + 19216: 0x00006E59, + 19217: 0x0002163E, + 19218: 0x00005A24, + 19219: 0x00005553, + 19220: 0x00021692, + 19221: 0x00008505, + 19222: 0x000059C9, + 19223: 0x00020D4E, + 19224: 0x00026C81, + 19225: 0x00026D2A, + 19226: 0x000217DC, + 19227: 0x000059D9, + 19228: 0x000217FB, + 19229: 0x000217B2, + 19230: 0x00026DA6, + 19231: 0x00006D71, + 19232: 0x00021828, + 19233: 0x000216D5, + 19234: 0x000059F9, + 19235: 0x00026E45, + 19236: 0x00005AAB, + 19237: 0x00005A63, + 19238: 0x000036E6, + 19239: 0x000249A9, + 19240: 0x00005A77, + 19241: 0x00003708, + 19242: 0x00005A96, + 19243: 0x00007465, + 19244: 0x00005AD3, + 19245: 0x00026FA1, + 19246: 0x00022554, + 19247: 0x00003D85, + 19248: 0x00021911, + 19249: 0x00003732, + 19250: 0x000216B8, + 19251: 0x00005E83, + 19252: 0x000052D0, + 19253: 0x00005B76, + 19254: 0x00006588, + 19255: 0x00005B7C, + 19256: 0x00027A0E, + 19257: 0x00004004, + 19258: 0x0000485D, + 19259: 0x00020204, + 19260: 0x00005BD5, + 19261: 0x00006160, + 19262: 0x00021A34, + 19263: 0x000259CC, + 19264: 0x000205A5, + 19265: 0x00005BF3, + 19266: 0x00005B9D, + 19267: 0x00004D10, + 19268: 0x00005C05, + 19269: 0x00021B44, + 19270: 0x00005C13, + 19271: 0x000073CE, + 19272: 0x00005C14, + 19273: 0x00021CA5, + 19274: 0x00026B28, + 19275: 0x00005C49, + 19276: 0x000048DD, + 19277: 0x00005C85, + 19278: 0x00005CE9, + 19279: 0x00005CEF, + 19280: 0x00005D8B, + 19281: 0x00021DF9, + 19282: 0x00021E37, + 19283: 0x00005D10, + 19284: 0x00005D18, + 19285: 0x00005D46, + 19286: 0x00021EA4, + 19287: 0x00005CBA, + 19288: 0x00005DD7, + 19289: 0x000082FC, + 19290: 0x0000382D, + 19291: 0x00024901, + 19292: 0x00022049, + 19293: 0x00022173, + 19294: 0x00008287, + 19295: 0x00003836, + 19296: 0x00003BC2, + 19297: 0x00005E2E, + 19298: 0x00006A8A, + 19299: 0x00005E75, + 19300: 0x00005E7A, + 19301: 0x000244BC, + 19302: 0x00020CD3, + 19303: 0x000053A6, + 19304: 0x00004EB7, + 19305: 0x00005ED0, + 19306: 0x000053A8, + 19307: 0x00021771, + 19308: 0x00005E09, + 19309: 0x00005EF4, + 19310: 0x00028482, + 19311: 0x00005EF9, + 19312: 0x00005EFB, + 19313: 0x000038A0, + 19314: 0x00005EFC, + 19315: 0x0000683E, + 19316: 0x0000941B, + 19317: 0x00005F0D, + 19318: 0x000201C1, + 19319: 0x0002F894, + 19320: 0x00003ADE, + 19321: 0x000048AE, + 19322: 0x0002133A, + 19323: 0x00005F3A, + 19324: 0x00026888, + 19325: 0x000223D0, + 19326: 0x00005F58, + 19327: 0x00022471, + 19328: 0x00005F63, + 19329: 0x000097BD, + 19330: 0x00026E6E, + 19331: 0x00005F72, + 19332: 0x00009340, + 19333: 0x00028A36, + 19334: 0x00005FA7, + 19335: 0x00005DB6, + 19336: 0x00003D5F, + 19337: 0x00025250, + 19338: 0x00021F6A, + 19339: 0x000270F8, + 19340: 0x00022668, + 19341: 0x000091D6, + 19342: 0x0002029E, + 19343: 0x00028A29, + 19344: 0x00006031, + 19345: 0x00006685, + 19346: 0x00021877, + 19347: 0x00003963, + 19348: 0x00003DC7, + 19349: 0x00003639, + 19350: 0x00005790, + 19351: 0x000227B4, + 19352: 0x00007971, + 19353: 0x00003E40, + 19354: 0x0000609E, + 19355: 0x000060A4, + 19356: 0x000060B3, + 19357: 0x00024982, + 19358: 0x0002498F, + 19359: 0x00027A53, + 19360: 0x000074A4, + 19361: 0x000050E1, + 19362: 0x00005AA0, + 19363: 0x00006164, + 19364: 0x00008424, + 19365: 0x00006142, + 19366: 0x0002F8A6, + 19367: 0x00026ED2, + 19368: 0x00006181, + 19369: 0x000051F4, + 19370: 0x00020656, + 19371: 0x00006187, + 19372: 0x00005BAA, + 19373: 0x00023FB7, + 19374: 0x0002285F, + 19375: 0x000061D3, + 19376: 0x00028B9D, + 19377: 0x0002995D, + 19378: 0x000061D0, + 19379: 0x00003932, + 19380: 0x00022980, + 19381: 0x000228C1, + 19382: 0x00006023, + 19383: 0x0000615C, + 19384: 0x0000651E, + 19385: 0x0000638B, + 19386: 0x00020118, + 19387: 0x000062C5, + 19388: 0x00021770, + 19389: 0x000062D5, + 19390: 0x00022E0D, + 19391: 0x0000636C, + 19392: 0x000249DF, + 19393: 0x00003A17, + 19394: 0x00006438, + 19395: 0x000063F8, + 19396: 0x0002138E, + 19397: 0x000217FC, + 19398: 0x00006490, + 19399: 0x00006F8A, + 19400: 0x00022E36, + 19401: 0x00009814, + 19402: 0x0002408C, + 19403: 0x0002571D, + 19404: 0x000064E1, + 19405: 0x000064E5, + 19406: 0x0000947B, + 19407: 0x00003A66, + 19408: 0x0000643A, + 19409: 0x00003A57, + 19410: 0x0000654D, + 19411: 0x00006F16, + 19412: 0x00024A28, + 19413: 0x00024A23, + 19414: 0x00006585, + 19415: 0x0000656D, + 19416: 0x0000655F, + 19417: 0x0002307E, + 19418: 0x000065B5, + 19419: 0x00024940, + 19420: 0x00004B37, + 19421: 0x000065D1, + 19422: 0x000040D8, + 19423: 0x00021829, + 19424: 0x000065E0, + 19425: 0x000065E3, + 19426: 0x00005FDF, + 19427: 0x00023400, + 19428: 0x00006618, + 19429: 0x000231F7, + 19430: 0x000231F8, + 19431: 0x00006644, + 19432: 0x000231A4, + 19433: 0x000231A5, + 19434: 0x0000664B, + 19435: 0x00020E75, + 19436: 0x00006667, + 19437: 0x000251E6, + 19438: 0x00006673, + 19439: 0x00006674, + 19440: 0x00021E3D, + 19441: 0x00023231, + 19442: 0x000285F4, + 19443: 0x000231C8, + 19444: 0x00025313, + 19445: 0x000077C5, + 19446: 0x000228F7, + 19447: 0x000099A4, + 19448: 0x00006702, + 19449: 0x0002439C, + 19450: 0x00024A21, + 19451: 0x00003B2B, + 19452: 0x000069FA, + 19453: 0x000237C2, + 19454: 0x0000675E, + 19455: 0x00006767, + 19456: 0x00006762, + 19457: 0x000241CD, + 19458: 0x000290ED, + 19459: 0x000067D7, + 19460: 0x000044E9, + 19461: 0x00006822, + 19462: 0x00006E50, + 19463: 0x0000923C, + 19464: 0x00006801, + 19465: 0x000233E6, + 19466: 0x00026DA0, + 19467: 0x0000685D, + 19468: 0x0002346F, + 19469: 0x000069E1, + 19470: 0x00006A0B, + 19471: 0x00028ADF, + 19472: 0x00006973, + 19473: 0x000068C3, + 19474: 0x000235CD, + 19475: 0x00006901, + 19476: 0x00006900, + 19477: 0x00003D32, + 19478: 0x00003A01, + 19479: 0x0002363C, + 19480: 0x00003B80, + 19481: 0x000067AC, + 19482: 0x00006961, + 19483: 0x00028A4A, + 19484: 0x000042FC, + 19485: 0x00006936, + 19486: 0x00006998, + 19487: 0x00003BA1, + 19488: 0x000203C9, + 19489: 0x00008363, + 19490: 0x00005090, + 19491: 0x000069F9, + 19492: 0x00023659, + 19493: 0x0002212A, + 19494: 0x00006A45, + 19495: 0x00023703, + 19496: 0x00006A9D, + 19497: 0x00003BF3, + 19498: 0x000067B1, + 19499: 0x00006AC8, + 19500: 0x0002919C, + 19501: 0x00003C0D, + 19502: 0x00006B1D, + 19503: 0x00020923, + 19504: 0x000060DE, + 19505: 0x00006B35, + 19506: 0x00006B74, + 19507: 0x000227CD, + 19508: 0x00006EB5, + 19509: 0x00023ADB, + 19510: 0x000203B5, + 19511: 0x00021958, + 19512: 0x00003740, + 19513: 0x00005421, + 19514: 0x00023B5A, + 19515: 0x00006BE1, + 19516: 0x00023EFC, + 19517: 0x00006BDC, + 19518: 0x00006C37, + 19519: 0x0002248B, + 19520: 0x000248F1, + 19521: 0x00026B51, + 19522: 0x00006C5A, + 19523: 0x00008226, + 19524: 0x00006C79, + 19525: 0x00023DBC, + 19526: 0x000044C5, + 19527: 0x00023DBD, + 19528: 0x000241A4, + 19529: 0x0002490C, + 19530: 0x00024900, + 19531: 0x00023CC9, + 19532: 0x000036E5, + 19533: 0x00003CEB, + 19534: 0x00020D32, + 19535: 0x00009B83, + 19536: 0x000231F9, + 19537: 0x00022491, + 19538: 0x00007F8F, + 19539: 0x00006837, + 19540: 0x00026D25, + 19541: 0x00026DA1, + 19542: 0x00026DEB, + 19543: 0x00006D96, + 19544: 0x00006D5C, + 19545: 0x00006E7C, + 19546: 0x00006F04, + 19547: 0x0002497F, + 19548: 0x00024085, + 19549: 0x00026E72, + 19550: 0x00008533, + 19551: 0x00026F74, + 19552: 0x000051C7, + 19553: 0x00006C9C, + 19554: 0x00006E1D, + 19555: 0x0000842E, + 19556: 0x00028B21, + 19557: 0x00006E2F, + 19558: 0x00023E2F, + 19559: 0x00007453, + 19560: 0x00023F82, + 19561: 0x000079CC, + 19562: 0x00006E4F, + 19563: 0x00005A91, + 19564: 0x0002304B, + 19565: 0x00006FF8, + 19566: 0x0000370D, + 19567: 0x00006F9D, + 19568: 0x00023E30, + 19569: 0x00006EFA, + 19570: 0x00021497, + 19571: 0x0002403D, + 19572: 0x00004555, + 19573: 0x000093F0, + 19574: 0x00006F44, + 19575: 0x00006F5C, + 19576: 0x00003D4E, + 19577: 0x00006F74, + 19578: 0x00029170, + 19579: 0x00003D3B, + 19580: 0x00006F9F, + 19581: 0x00024144, + 19582: 0x00006FD3, + 19583: 0x00024091, + 19584: 0x00024155, + 19585: 0x00024039, + 19586: 0x00023FF0, + 19587: 0x00023FB4, + 19588: 0x0002413F, + 19589: 0x000051DF, + 19590: 0x00024156, + 19591: 0x00024157, + 19592: 0x00024140, + 19593: 0x000261DD, + 19594: 0x0000704B, + 19595: 0x0000707E, + 19596: 0x000070A7, + 19597: 0x00007081, + 19598: 0x000070CC, + 19599: 0x000070D5, + 19600: 0x000070D6, + 19601: 0x000070DF, + 19602: 0x00004104, + 19603: 0x00003DE8, + 19604: 0x000071B4, + 19605: 0x00007196, + 19606: 0x00024277, + 19607: 0x0000712B, + 19608: 0x00007145, + 19609: 0x00005A88, + 19610: 0x0000714A, + 19611: 0x0000716E, + 19612: 0x00005C9C, + 19613: 0x00024365, + 19614: 0x0000714F, + 19615: 0x00009362, + 19616: 0x000242C1, + 19617: 0x0000712C, + 19618: 0x0002445A, + 19619: 0x00024A27, + 19620: 0x00024A22, + 19621: 0x000071BA, + 19622: 0x00028BE8, + 19623: 0x000070BD, + 19624: 0x0000720E, + 19625: 0x00009442, + 19626: 0x00007215, + 19627: 0x00005911, + 19628: 0x00009443, + 19629: 0x00007224, + 19630: 0x00009341, + 19631: 0x00025605, + 19632: 0x0000722E, + 19633: 0x00007240, + 19634: 0x00024974, + 19635: 0x000068BD, + 19636: 0x00007255, + 19637: 0x00007257, + 19638: 0x00003E55, + 19639: 0x00023044, + 19640: 0x0000680D, + 19641: 0x00006F3D, + 19642: 0x00007282, + 19643: 0x0000732A, + 19644: 0x0000732B, + 19645: 0x00024823, + 19646: 0x0002882B, + 19647: 0x000048ED, + 19648: 0x00028804, + 19649: 0x00007328, + 19650: 0x0000732E, + 19651: 0x000073CF, + 19652: 0x000073AA, + 19653: 0x00020C3A, + 19654: 0x00026A2E, + 19655: 0x000073C9, + 19656: 0x00007449, + 19657: 0x000241E2, + 19658: 0x000216E7, + 19659: 0x00024A24, + 19660: 0x00006623, + 19661: 0x000036C5, + 19662: 0x000249B7, + 19663: 0x0002498D, + 19664: 0x000249FB, + 19665: 0x000073F7, + 19666: 0x00007415, + 19667: 0x00006903, + 19668: 0x00024A26, + 19669: 0x00007439, + 19670: 0x000205C3, + 19671: 0x00003ED7, + 19672: 0x0000745C, + 19673: 0x000228AD, + 19674: 0x00007460, + 19675: 0x00028EB2, + 19676: 0x00007447, + 19677: 0x000073E4, + 19678: 0x00007476, + 19679: 0x000083B9, + 19680: 0x0000746C, + 19681: 0x00003730, + 19682: 0x00007474, + 19683: 0x000093F1, + 19684: 0x00006A2C, + 19685: 0x00007482, + 19686: 0x00004953, + 19687: 0x00024A8C, + 19688: 0x0002415F, + 19689: 0x00024A79, + 19690: 0x00028B8F, + 19691: 0x00005B46, + 19692: 0x00028C03, + 19693: 0x0002189E, + 19694: 0x000074C8, + 19695: 0x00021988, + 19696: 0x0000750E, + 19697: 0x000074E9, + 19698: 0x0000751E, + 19699: 0x00028ED9, + 19700: 0x00021A4B, + 19701: 0x00005BD7, + 19702: 0x00028EAC, + 19703: 0x00009385, + 19704: 0x0000754D, + 19705: 0x0000754A, + 19706: 0x00007567, + 19707: 0x0000756E, + 19708: 0x00024F82, + 19709: 0x00003F04, + 19710: 0x00024D13, + 19711: 0x0000758E, + 19712: 0x0000745D, + 19713: 0x0000759E, + 19714: 0x000075B4, + 19715: 0x00007602, + 19716: 0x0000762C, + 19717: 0x00007651, + 19718: 0x0000764F, + 19719: 0x0000766F, + 19720: 0x00007676, + 19721: 0x000263F5, + 19722: 0x00007690, + 19723: 0x000081EF, + 19724: 0x000037F8, + 19725: 0x00026911, + 19726: 0x0002690E, + 19727: 0x000076A1, + 19728: 0x000076A5, + 19729: 0x000076B7, + 19730: 0x000076CC, + 19731: 0x00026F9F, + 19732: 0x00008462, + 19733: 0x0002509D, + 19734: 0x0002517D, + 19735: 0x00021E1C, + 19736: 0x0000771E, + 19737: 0x00007726, + 19738: 0x00007740, + 19739: 0x000064AF, + 19740: 0x00025220, + 19741: 0x00007758, + 19742: 0x000232AC, + 19743: 0x000077AF, + 19744: 0x00028964, + 19745: 0x00028968, + 19746: 0x000216C1, + 19747: 0x000077F4, + 19748: 0x00007809, + 19749: 0x00021376, + 19750: 0x00024A12, + 19751: 0x000068CA, + 19752: 0x000078AF, + 19753: 0x000078C7, + 19754: 0x000078D3, + 19755: 0x000096A5, + 19756: 0x0000792E, + 19757: 0x000255E0, + 19758: 0x000078D7, + 19759: 0x00007934, + 19760: 0x000078B1, + 19761: 0x0002760C, + 19762: 0x00008FB8, + 19763: 0x00008884, + 19764: 0x00028B2B, + 19765: 0x00026083, + 19766: 0x0002261C, + 19767: 0x00007986, + 19768: 0x00008900, + 19769: 0x00006902, + 19770: 0x00007980, + 19771: 0x00025857, + 19772: 0x0000799D, + 19773: 0x00027B39, + 19774: 0x0000793C, + 19775: 0x000079A9, + 19776: 0x00006E2A, + 19777: 0x00027126, + 19778: 0x00003EA8, + 19779: 0x000079C6, + 19780: 0x0002910D, + 19781: 0x000079D4, +} + +const numEncodeTables = 8 + +// encodeX are the encoding tables from Unicode to Big5 code, +// sorted by decreasing length. +// encode0: 42633 entries for runes in [131105, 173738). +// encode1: 29004 entries for runes in [ 11904, 40908). +// encode2: 2176 entries for runes in [ 7870, 10046). +// encode3: 939 entries for runes in [ 167, 1106). +// encode4: 446 entries for runes in [ 65072, 65518). +// encode5: 432 entries for runes in [194597, 195029). +// encode6: 263 entries for runes in [ 63751, 64014). +// encode7: 1 entries for runes in [175615, 175616). + +const encode0Low, encode0High = 131105, 173738 + +var encode0 = [...]uint16{ + 131105 - 131105: 0x9C71, + 131134 - 131105: 0x9375, + 131142 - 131105: 0x9376, + 131150 - 131105: 0x9548, + 131176 - 131105: 0x8EC6, + 131206 - 131105: 0x8BC5, + 131207 - 131105: 0x8BFA, + 131210 - 131105: 0xC87C, + 131220 - 131105: 0x9AB4, + 131274 - 131105: 0x884E, + 131275 - 131105: 0x884B, + 131276 - 131105: 0xC87A, + 131277 - 131105: 0x8848, + 131281 - 131105: 0x8847, + 131310 - 131105: 0xA0F6, + 131340 - 131105: 0x8845, + 131342 - 131105: 0x8853, + 131352 - 131105: 0xFCAD, + 131492 - 131105: 0x8CF5, + 131497 - 131105: 0x8AAD, + 131499 - 131105: 0x9272, + 131521 - 131105: 0xFC47, + 131540 - 131105: 0x94DF, + 131570 - 131105: 0x9FD1, + 131588 - 131105: 0xFBCB, + 131596 - 131105: 0x927D, + 131604 - 131105: 0x98A4, + 131641 - 131105: 0x8CF9, + 131675 - 131105: 0x94E7, + 131700 - 131105: 0x90CB, + 131701 - 131105: 0x927B, + 131737 - 131105: 0x94D8, + 131742 - 131105: 0xFC5F, + 131744 - 131105: 0xFA54, + 131767 - 131105: 0x9AB5, + 131775 - 131105: 0x96DA, + 131776 - 131105: 0x9279, + 131813 - 131105: 0xFA74, + 131850 - 131105: 0x9275, + 131877 - 131105: 0x8DFB, + 131905 - 131105: 0x8A49, + 131909 - 131105: 0x92DF, + 131910 - 131105: 0x9B7C, + 131911 - 131105: 0xFA63, + 131966 - 131105: 0xFA60, + 131967 - 131105: 0x926D, + 131968 - 131105: 0xFA62, + 132000 - 131105: 0x9AB6, + 132007 - 131105: 0x976B, + 132021 - 131105: 0xFD6A, + 132041 - 131105: 0xFD54, + 132043 - 131105: 0x9273, + 132085 - 131105: 0x97D8, + 132092 - 131105: 0x9FBB, + 132115 - 131105: 0x9342, + 132116 - 131105: 0x9276, + 132127 - 131105: 0xFA65, + 132197 - 131105: 0x926C, + 132231 - 131105: 0xFA6E, + 132238 - 131105: 0x9EE0, + 132241 - 131105: 0x92C0, + 132242 - 131105: 0x92BF, + 132259 - 131105: 0x92BE, + 132311 - 131105: 0x9ABA, + 132348 - 131105: 0x8AB3, + 132350 - 131105: 0x9775, + 132423 - 131105: 0xFA40, + 132494 - 131105: 0xFA76, + 132517 - 131105: 0xFBD0, + 132531 - 131105: 0xFA7B, + 132547 - 131105: 0xFE6D, + 132554 - 131105: 0x9BB3, + 132560 - 131105: 0x89CC, + 132565 - 131105: 0x9ABE, + 132575 - 131105: 0xFA42, + 132576 - 131105: 0x92BC, + 132587 - 131105: 0x945C, + 132625 - 131105: 0x9BB5, + 132629 - 131105: 0x9ABF, + 132633 - 131105: 0x98A7, + 132634 - 131105: 0x97A4, + 132656 - 131105: 0x90FD, + 132694 - 131105: 0xFC7B, + 132726 - 131105: 0x9AC0, + 132878 - 131105: 0x92C3, + 132913 - 131105: 0x8AAA, + 132985 - 131105: 0x9BD0, + 133164 - 131105: 0x9550, + 133235 - 131105: 0x92C6, + 133333 - 131105: 0x98A6, + 133398 - 131105: 0x9546, + 133411 - 131105: 0xFD63, + 133460 - 131105: 0xFAC2, + 133497 - 131105: 0x9EC3, + 133607 - 131105: 0x89B2, + 133649 - 131105: 0x9C66, + 133712 - 131105: 0x9053, + 133743 - 131105: 0x8C62, + 133770 - 131105: 0x87A8, + 133812 - 131105: 0x97C1, + 133826 - 131105: 0x9AC4, + 133837 - 131105: 0x9AC5, + 133901 - 131105: 0x8EEF, + 134031 - 131105: 0xFAE9, + 134047 - 131105: 0x8D40, + 134056 - 131105: 0x9262, + 134057 - 131105: 0x8AF7, + 134079 - 131105: 0x9AC6, + 134086 - 131105: 0x92E1, + 134091 - 131105: 0x9AC9, + 134114 - 131105: 0xFAC6, + 134123 - 131105: 0x97A5, + 134139 - 131105: 0x9ACB, + 134143 - 131105: 0xFA72, + 134155 - 131105: 0x8A5E, + 134157 - 131105: 0x94E0, + 134176 - 131105: 0x92CC, + 134196 - 131105: 0x8AE5, + 134202 - 131105: 0xFE5C, + 134203 - 131105: 0x9ACC, + 134209 - 131105: 0x9DF9, + 134210 - 131105: 0x8A43, + 134211 - 131105: 0x8AA6, + 134227 - 131105: 0x9ACD, + 134245 - 131105: 0x9ACE, + 134263 - 131105: 0xFAEE, + 134264 - 131105: 0x9BCC, + 134268 - 131105: 0x9ACF, + 134285 - 131105: 0x9AD1, + 134294 - 131105: 0x9DFA, + 134300 - 131105: 0x9D7C, + 134325 - 131105: 0x9AD3, + 134328 - 131105: 0x97A6, + 134351 - 131105: 0x995F, + 134355 - 131105: 0xFBF6, + 134356 - 131105: 0x9FC5, + 134357 - 131105: 0x8A59, + 134358 - 131105: 0x8B6B, + 134365 - 131105: 0x9AD4, + 134381 - 131105: 0x9AD5, + 134399 - 131105: 0x97A2, + 134421 - 131105: 0x8A44, + 134440 - 131105: 0x9F4A, + 134449 - 131105: 0x90A1, + 134450 - 131105: 0xFDA4, + 134470 - 131105: 0x8A64, + 134471 - 131105: 0x8AF2, + 134472 - 131105: 0x8AF8, + 134473 - 131105: 0x9DD8, + 134476 - 131105: 0x94D6, + 134477 - 131105: 0xFAFE, + 134478 - 131105: 0xFBA7, + 134511 - 131105: 0x9AD6, + 134513 - 131105: 0x9F4D, + 134516 - 131105: 0xFAF6, + 134524 - 131105: 0x8A57, + 134526 - 131105: 0x8B43, + 134527 - 131105: 0x8B44, + 134550 - 131105: 0x8AB6, + 134556 - 131105: 0x8AC0, + 134567 - 131105: 0x9E54, + 134578 - 131105: 0x9AD7, + 134600 - 131105: 0x9AD8, + 134660 - 131105: 0x9ADC, + 134665 - 131105: 0x8ACA, + 134666 - 131105: 0x9EA8, + 134669 - 131105: 0x9263, + 134670 - 131105: 0x9ADD, + 134671 - 131105: 0x8B65, + 134672 - 131105: 0x8B6F, + 134673 - 131105: 0x8B7E, + 134678 - 131105: 0x8F43, + 134685 - 131105: 0x92D0, + 134732 - 131105: 0x8AF4, + 134765 - 131105: 0x9DBE, + 134771 - 131105: 0x9AE1, + 134773 - 131105: 0xFCDE, + 134774 - 131105: 0x9DFD, + 134775 - 131105: 0x8B66, + 134776 - 131105: 0x8B70, + 134777 - 131105: 0x8B75, + 134778 - 131105: 0x8AE4, + 134779 - 131105: 0x8BA4, + 134796 - 131105: 0x8AED, + 134806 - 131105: 0x8A5D, + 134808 - 131105: 0x8B48, + 134813 - 131105: 0x9DED, + 134818 - 131105: 0x9E40, + 134826 - 131105: 0x8AEF, + 134827 - 131105: 0x8AF6, + 134828 - 131105: 0x9E76, + 134838 - 131105: 0x9EE3, + 134871 - 131105: 0x9ADE, + 134872 - 131105: 0x8DFE, + 134877 - 131105: 0xFAFC, + 134904 - 131105: 0x9CB1, + 134905 - 131105: 0x9E77, + 134906 - 131105: 0x8B64, + 134907 - 131105: 0x8B67, + 134941 - 131105: 0x974B, + 134950 - 131105: 0x9653, + 134957 - 131105: 0x9AE0, + 134958 - 131105: 0x8B4A, + 134960 - 131105: 0x8AF1, + 134961 - 131105: 0x8AD7, + 134971 - 131105: 0xA0AB, + 134988 - 131105: 0x8AB5, + 135012 - 131105: 0x8A5F, + 135053 - 131105: 0x8AEE, + 135056 - 131105: 0x9ADF, + 135085 - 131105: 0x8AFE, + 135092 - 131105: 0x8A58, + 135093 - 131105: 0x8BA3, + 135094 - 131105: 0x8BA7, + 135100 - 131105: 0x9AE3, + 135135 - 131105: 0x9261, + 135146 - 131105: 0x9DD7, + 135147 - 131105: 0x9E7D, + 135148 - 131105: 0x9EA7, + 135149 - 131105: 0x9EAB, + 135188 - 131105: 0x9042, + 135197 - 131105: 0x8B79, + 135198 - 131105: 0x8B7A, + 135247 - 131105: 0x9AE6, + 135260 - 131105: 0x9AE5, + 135279 - 131105: 0x8A7E, + 135285 - 131105: 0x9E44, + 135286 - 131105: 0x9AE7, + 135287 - 131105: 0x8A7C, + 135288 - 131105: 0x8B71, + 135291 - 131105: 0x9AE9, + 135304 - 131105: 0x9AEA, + 135318 - 131105: 0x9AEB, + 135325 - 131105: 0x8ABD, + 135348 - 131105: 0xFB4E, + 135359 - 131105: 0x9AED, + 135360 - 131105: 0x8AF9, + 135361 - 131105: 0x9E63, + 135367 - 131105: 0x8B49, + 135368 - 131105: 0x8ACE, + 135369 - 131105: 0x8B6E, + 135375 - 131105: 0x8AE8, + 135379 - 131105: 0x9AEE, + 135396 - 131105: 0x92CE, + 135412 - 131105: 0x8A5A, + 135413 - 131105: 0x8B7B, + 135414 - 131105: 0x8B7C, + 135471 - 131105: 0x9AEF, + 135483 - 131105: 0x9AF0, + 135485 - 131105: 0x8AFA, + 135493 - 131105: 0x8941, + 135496 - 131105: 0x8B72, + 135503 - 131105: 0x8AF3, + 135552 - 131105: 0x8BA8, + 135559 - 131105: 0x9EAE, + 135641 - 131105: 0x9E72, + 135740 - 131105: 0xFB73, + 135759 - 131105: 0xFB5F, + 135804 - 131105: 0x90BA, + 135848 - 131105: 0x91FE, + 135849 - 131105: 0x9EF6, + 135856 - 131105: 0x97ED, + 135907 - 131105: 0x9AF3, + 135934 - 131105: 0xA0EE, + 135938 - 131105: 0x967C, + 135939 - 131105: 0x9345, + 135940 - 131105: 0x986E, + 135941 - 131105: 0xFA56, + 135990 - 131105: 0x9AF5, + 135994 - 131105: 0xFC4B, + 136053 - 131105: 0x9AF4, + 136054 - 131105: 0xFEDE, + 136078 - 131105: 0xFCB7, + 136088 - 131105: 0x97F1, + 136092 - 131105: 0x97C7, + 136133 - 131105: 0x9CCB, + 136134 - 131105: 0x9240, + 136173 - 131105: 0x9CE8, + 136190 - 131105: 0x91FD, + 136211 - 131105: 0x974E, + 136214 - 131105: 0xFB68, + 136228 - 131105: 0x976C, + 136255 - 131105: 0x8CC2, + 136274 - 131105: 0x97E8, + 136276 - 131105: 0xFB6A, + 136277 - 131105: 0x8B74, + 136330 - 131105: 0x8EE7, + 136343 - 131105: 0xFDC8, + 136374 - 131105: 0x9241, + 136424 - 131105: 0x96A1, + 136445 - 131105: 0x8EF3, + 136567 - 131105: 0x9AF7, + 136578 - 131105: 0x8FA6, + 136598 - 131105: 0xFAD6, + 136714 - 131105: 0x9CC7, + 136723 - 131105: 0xFAD7, + 136729 - 131105: 0x9AF8, + 136766 - 131105: 0xFBA1, + 136801 - 131105: 0x8EC5, + 136850 - 131105: 0xFBA4, + 136888 - 131105: 0xFBC2, + 136890 - 131105: 0x9AC1, + 136896 - 131105: 0x91FA, + 136897 - 131105: 0xFEDB, + 136898 - 131105: 0x97AB, + 136915 - 131105: 0x9147, + 136917 - 131105: 0xFBB1, + 136927 - 131105: 0x8FEA, + 136934 - 131105: 0x94D2, + 136935 - 131105: 0xFE61, + 136936 - 131105: 0xFACE, + 136954 - 131105: 0x92ED, + 136955 - 131105: 0x91F3, + 136956 - 131105: 0x93C6, + 136958 - 131105: 0x935A, + 136973 - 131105: 0xFAFB, + 136976 - 131105: 0x92EF, + 136998 - 131105: 0xFAC8, + 137018 - 131105: 0x9847, + 137019 - 131105: 0x9366, + 137020 - 131105: 0x9855, + 137047 - 131105: 0x96E6, + 137068 - 131105: 0x9F43, + 137069 - 131105: 0x9FAA, + 137070 - 131105: 0x94DA, + 137071 - 131105: 0x92EE, + 137072 - 131105: 0xFCAF, + 137073 - 131105: 0xFBFB, + 137075 - 131105: 0x8EF9, + 137076 - 131105: 0x91F6, + 137131 - 131105: 0x9364, + 137136 - 131105: 0x94F5, + 137137 - 131105: 0x9CB6, + 137138 - 131105: 0xFBAD, + 137139 - 131105: 0x984E, + 137140 - 131105: 0x8F44, + 137141 - 131105: 0x96FD, + 137155 - 131105: 0x9AF9, + 137159 - 131105: 0x9AFA, + 137177 - 131105: 0x9769, + 137178 - 131105: 0x95D4, + 137179 - 131105: 0x984B, + 137180 - 131105: 0xFBAA, + 137183 - 131105: 0x987C, + 137199 - 131105: 0x91EA, + 137205 - 131105: 0x9DAF, + 137206 - 131105: 0x9DC5, + 137208 - 131105: 0x91F1, + 137209 - 131105: 0x8EB1, + 137210 - 131105: 0x97A9, + 137211 - 131105: 0xFBAC, + 137212 - 131105: 0xFCB8, + 137248 - 131105: 0x9CB9, + 137256 - 131105: 0xFBB0, + 137257 - 131105: 0xFCD2, + 137258 - 131105: 0x93CB, + 137261 - 131105: 0x9AFD, + 137273 - 131105: 0x91F4, + 137274 - 131105: 0x8BAC, + 137275 - 131105: 0xA055, + 137280 - 131105: 0x9574, + 137285 - 131105: 0x95BE, + 137298 - 131105: 0x97AD, + 137310 - 131105: 0x8EE9, + 137313 - 131105: 0x92F8, + 137314 - 131105: 0x97BE, + 137315 - 131105: 0x916C, + 137316 - 131105: 0x94AA, + 137335 - 131105: 0xFC63, + 137339 - 131105: 0x9DC6, + 137347 - 131105: 0x97B5, + 137348 - 131105: 0x92B8, + 137349 - 131105: 0x91EF, + 137374 - 131105: 0xFEA6, + 137375 - 131105: 0x9760, + 137376 - 131105: 0x9358, + 137377 - 131105: 0x9576, + 137378 - 131105: 0x8FAC, + 137406 - 131105: 0x91EC, + 137407 - 131105: 0x97B4, + 137425 - 131105: 0x91F7, + 137430 - 131105: 0x974A, + 137431 - 131105: 0xFB49, + 137432 - 131105: 0x9578, + 137433 - 131105: 0x93BC, + 137466 - 131105: 0x91D6, + 137475 - 131105: 0x9355, + 137476 - 131105: 0x9356, + 137477 - 131105: 0x9851, + 137488 - 131105: 0x8FF8, + 137489 - 131105: 0xFBC0, + 137490 - 131105: 0x93F2, + 137493 - 131105: 0x90D0, + 137500 - 131105: 0x9C44, + 137506 - 131105: 0x9255, + 137511 - 131105: 0x9363, + 137531 - 131105: 0x91A5, + 137540 - 131105: 0xA0ED, + 137560 - 131105: 0xFD6B, + 137578 - 131105: 0x9AFE, + 137596 - 131105: 0x9351, + 137600 - 131105: 0x8C57, + 137603 - 131105: 0xFA78, + 137608 - 131105: 0xFEA8, + 137622 - 131105: 0x9350, + 137691 - 131105: 0xFA4C, + 137715 - 131105: 0x92F7, + 137773 - 131105: 0x9B40, + 137780 - 131105: 0xFBCE, + 137797 - 131105: 0x9B41, + 137803 - 131105: 0xFEAD, + 137827 - 131105: 0x8761, + 138052 - 131105: 0xFBD5, + 138177 - 131105: 0x8BC2, + 138178 - 131105: 0x9A7C, + 138282 - 131105: 0x9B42, + 138352 - 131105: 0x9B43, + 138402 - 131105: 0x9E79, + 138405 - 131105: 0xFBD9, + 138412 - 131105: 0x9B44, + 138566 - 131105: 0xA0A7, + 138579 - 131105: 0x877B, + 138590 - 131105: 0x876E, + 138640 - 131105: 0x9BF3, + 138678 - 131105: 0x8C79, + 138682 - 131105: 0x935E, + 138698 - 131105: 0x89CB, + 138705 - 131105: 0x9F53, + 138731 - 131105: 0x93D7, + 138745 - 131105: 0xFBE1, + 138780 - 131105: 0xFED0, + 138787 - 131105: 0x8CF1, + 138807 - 131105: 0xFBE2, + 138813 - 131105: 0xFCE3, + 138889 - 131105: 0x9074, + 138916 - 131105: 0xFBE6, + 138920 - 131105: 0x9BB7, + 138952 - 131105: 0x9B45, + 138965 - 131105: 0x9B47, + 139023 - 131105: 0x9F50, + 139029 - 131105: 0x9B48, + 139114 - 131105: 0xFC5B, + 139166 - 131105: 0x98A9, + 139169 - 131105: 0x9CFD, + 139240 - 131105: 0x884C, + 139333 - 131105: 0x9B4B, + 139337 - 131105: 0xFBEC, + 139390 - 131105: 0x8C69, + 139418 - 131105: 0x9BA8, + 139463 - 131105: 0x8AD5, + 139516 - 131105: 0xFA73, + 139562 - 131105: 0xFD59, + 139611 - 131105: 0x91A2, + 139635 - 131105: 0xFBED, + 139642 - 131105: 0x9CA9, + 139681 - 131105: 0x8AA8, + 139713 - 131105: 0x8D42, + 139715 - 131105: 0x9BC3, + 139784 - 131105: 0x8AE1, + 139900 - 131105: 0x9B4E, + 140065 - 131105: 0x95D0, + 140069 - 131105: 0x905F, + 140221 - 131105: 0x97EE, + 140240 - 131105: 0xFC4E, + 140247 - 131105: 0x9B4F, + 140282 - 131105: 0x9B50, + 140389 - 131105: 0x9EC6, + 140401 - 131105: 0xFC50, + 140427 - 131105: 0xFD73, + 140433 - 131105: 0xFDA7, + 140464 - 131105: 0x9DA2, + 140476 - 131105: 0x87D1, + 140481 - 131105: 0x87D3, + 140489 - 131105: 0x87D4, + 140492 - 131105: 0x87D5, + 140525 - 131105: 0xFA58, + 140563 - 131105: 0xFA5E, + 140571 - 131105: 0xA059, + 140592 - 131105: 0xFA75, + 140628 - 131105: 0xFBBE, + 140685 - 131105: 0x9CA2, + 140719 - 131105: 0x9370, + 140734 - 131105: 0x9371, + 140827 - 131105: 0x9377, + 140828 - 131105: 0xFEEF, + 140843 - 131105: 0x936D, + 140904 - 131105: 0xFC5D, + 140922 - 131105: 0x90B8, + 140950 - 131105: 0x8AFC, + 140952 - 131105: 0xFB41, + 141044 - 131105: 0x9E6B, + 141045 - 131105: 0x94E3, + 141046 - 131105: 0x8EE2, + 141074 - 131105: 0x8C7D, + 141076 - 131105: 0x8ED7, + 141083 - 131105: 0x9C4D, + 141087 - 131105: 0x96A3, + 141098 - 131105: 0x9B51, + 141173 - 131105: 0x8AC3, + 141185 - 131105: 0x96AA, + 141206 - 131105: 0x8CE2, + 141236 - 131105: 0xFC68, + 141237 - 131105: 0x8B6D, + 141261 - 131105: 0xFD67, + 141315 - 131105: 0x8AE9, + 141407 - 131105: 0xFCA1, + 141408 - 131105: 0x936C, + 141425 - 131105: 0x9B52, + 141485 - 131105: 0xFE70, + 141505 - 131105: 0xFCA8, + 141559 - 131105: 0xFCE9, + 141606 - 131105: 0x9CB4, + 141625 - 131105: 0x8AEA, + 141647 - 131105: 0x9B53, + 141671 - 131105: 0x9B55, + 141675 - 131105: 0x96AB, + 141696 - 131105: 0xFCA7, + 141715 - 131105: 0x9B56, + 141926 - 131105: 0x8ABC, + 142031 - 131105: 0x8ACB, + 142037 - 131105: 0x9B57, + 142054 - 131105: 0x89CD, + 142056 - 131105: 0x9B59, + 142094 - 131105: 0x9B5B, + 142114 - 131105: 0x93A5, + 142143 - 131105: 0x9B5D, + 142147 - 131105: 0x9E4F, + 142186 - 131105: 0x93A3, + 142282 - 131105: 0x8A7B, + 142286 - 131105: 0x8B42, + 142374 - 131105: 0x9750, + 142375 - 131105: 0x8FB3, + 142392 - 131105: 0x8A50, + 142412 - 131105: 0x9B60, + 142417 - 131105: 0x8B45, + 142421 - 131105: 0x8B46, + 142434 - 131105: 0x9DFE, + 142472 - 131105: 0x9B62, + 142491 - 131105: 0x937B, + 142497 - 131105: 0x93B1, + 142505 - 131105: 0x8A60, + 142514 - 131105: 0x8AD8, + 142519 - 131105: 0x9B63, + 142530 - 131105: 0x8A69, + 142534 - 131105: 0x8A47, + 142537 - 131105: 0x8ACC, + 142599 - 131105: 0x937C, + 142600 - 131105: 0x9B65, + 142610 - 131105: 0x9B66, + 142660 - 131105: 0x8A72, + 142668 - 131105: 0x8A7A, + 142695 - 131105: 0x93AF, + 142733 - 131105: 0x8AB0, + 142741 - 131105: 0x9B68, + 142752 - 131105: 0x9EA3, + 142755 - 131105: 0xFAEC, + 142756 - 131105: 0x8B77, + 142775 - 131105: 0x9B67, + 142830 - 131105: 0x8B59, + 142861 - 131105: 0xFCB1, + 142902 - 131105: 0xFCBB, + 142914 - 131105: 0x9B69, + 142968 - 131105: 0x93A8, + 142987 - 131105: 0x8AE0, + 143027 - 131105: 0x9E51, + 143087 - 131105: 0x8F5F, + 143220 - 131105: 0x9B6A, + 143308 - 131105: 0x9B6B, + 143331 - 131105: 0x97EC, + 143411 - 131105: 0x9B6C, + 143428 - 131105: 0xFE4E, + 143435 - 131105: 0xFDC2, + 143462 - 131105: 0x9B6D, + 143485 - 131105: 0x9167, + 143486 - 131105: 0xFCCC, + 143502 - 131105: 0x93B6, + 143543 - 131105: 0x90E4, + 143548 - 131105: 0x90E5, + 143578 - 131105: 0x9EF2, + 143619 - 131105: 0x93CA, + 143677 - 131105: 0x8BBC, + 143741 - 131105: 0x8F46, + 143746 - 131105: 0x93CF, + 143780 - 131105: 0xFCDB, + 143781 - 131105: 0xFCDC, + 143795 - 131105: 0x93C0, + 143816 - 131105: 0xFCE6, + 143817 - 131105: 0x96E7, + 143850 - 131105: 0x87A7, + 143863 - 131105: 0xFCD8, + 143864 - 131105: 0xFCD9, + 143865 - 131105: 0xFDA6, + 143887 - 131105: 0x93CE, + 143909 - 131105: 0x95F1, + 143919 - 131105: 0x9CE9, + 143921 - 131105: 0xFCE4, + 143922 - 131105: 0x94AF, + 143923 - 131105: 0xFA77, + 143924 - 131105: 0x93CC, + 143958 - 131105: 0x8CE1, + 143966 - 131105: 0x87A9, + 143970 - 131105: 0x905A, + 144001 - 131105: 0x8C54, + 144009 - 131105: 0x93BF, + 144010 - 131105: 0xFB51, + 144043 - 131105: 0x93B9, + 144044 - 131105: 0xFED7, + 144045 - 131105: 0x93B7, + 144082 - 131105: 0x93D9, + 144096 - 131105: 0x93BB, + 144097 - 131105: 0x93DA, + 144128 - 131105: 0x98A3, + 144138 - 131105: 0x90D1, + 144159 - 131105: 0x9B6E, + 144308 - 131105: 0xFA70, + 144332 - 131105: 0x9BEB, + 144350 - 131105: 0x9B6F, + 144358 - 131105: 0xFCFC, + 144372 - 131105: 0x8B40, + 144373 - 131105: 0xA07B, + 144377 - 131105: 0x8CA1, + 144378 - 131105: 0x97F7, + 144382 - 131105: 0x93E2, + 144384 - 131105: 0xFCD6, + 144447 - 131105: 0x9559, + 144464 - 131105: 0x93A6, + 144495 - 131105: 0xFD40, + 144498 - 131105: 0x935F, + 144613 - 131105: 0x97F2, + 144665 - 131105: 0x9C76, + 144688 - 131105: 0x8EF8, + 144721 - 131105: 0x8CEB, + 144730 - 131105: 0x8F47, + 144743 - 131105: 0x9B74, + 144789 - 131105: 0x92B4, + 144793 - 131105: 0x91ED, + 144796 - 131105: 0x96D2, + 144827 - 131105: 0x87D8, + 144845 - 131105: 0xFD46, + 144846 - 131105: 0x8F4F, + 144847 - 131105: 0x9549, + 144883 - 131105: 0x9B75, + 144896 - 131105: 0xFA5C, + 144919 - 131105: 0x8751, + 144922 - 131105: 0x9B79, + 144956 - 131105: 0xFD4B, + 144960 - 131105: 0x96D3, + 144985 - 131105: 0xFD58, + 144991 - 131105: 0x945F, + 145015 - 131105: 0xA0F5, + 145038 - 131105: 0x87C7, + 145054 - 131105: 0x877C, + 145062 - 131105: 0x9243, + 145069 - 131105: 0x97FA, + 145082 - 131105: 0x9DD9, + 145119 - 131105: 0x97F4, + 145134 - 131105: 0x924D, + 145155 - 131105: 0xFD5B, + 145174 - 131105: 0x9B7A, + 145184 - 131105: 0x9ED5, + 145197 - 131105: 0xFAAE, + 145199 - 131105: 0x9CC9, + 145215 - 131105: 0x9258, + 145254 - 131105: 0x8EC8, + 145281 - 131105: 0x94B4, + 145314 - 131105: 0x93E1, + 145340 - 131105: 0x93DF, + 145346 - 131105: 0xFCF0, + 145365 - 131105: 0x93EC, + 145366 - 131105: 0x97F6, + 145367 - 131105: 0x96CF, + 145466 - 131105: 0x93DE, + 145858 - 131105: 0x8ACF, + 146087 - 131105: 0x9BA2, + 146139 - 131105: 0xFD69, + 146158 - 131105: 0x9352, + 146170 - 131105: 0x98A2, + 146202 - 131105: 0x8CE7, + 146266 - 131105: 0xFD6E, + 146531 - 131105: 0x8CA4, + 146585 - 131105: 0xFA7C, + 146586 - 131105: 0x93FA, + 146587 - 131105: 0x907C, + 146613 - 131105: 0x8F67, + 146615 - 131105: 0x9DB7, + 146631 - 131105: 0xA0E9, + 146632 - 131105: 0xFA4E, + 146633 - 131105: 0xFDA1, + 146684 - 131105: 0x9E74, + 146685 - 131105: 0x9FBF, + 146686 - 131105: 0x9ECB, + 146687 - 131105: 0x9BB9, + 146752 - 131105: 0x9DD4, + 146779 - 131105: 0x97B9, + 146814 - 131105: 0x8EF1, + 146831 - 131105: 0x957B, + 146870 - 131105: 0x9ED2, + 146871 - 131105: 0x9753, + 146872 - 131105: 0x96A4, + 146873 - 131105: 0x8FBE, + 146874 - 131105: 0x94D9, + 146875 - 131105: 0x9058, + 146876 - 131105: 0xFD79, + 146877 - 131105: 0xFD7B, + 146915 - 131105: 0x8EDA, + 146936 - 131105: 0x8EFA, + 146950 - 131105: 0x8762, + 146961 - 131105: 0x9BA5, + 146988 - 131105: 0x9ED9, + 146989 - 131105: 0x97D4, + 146990 - 131105: 0x90BB, + 146991 - 131105: 0xFDBC, + 146992 - 131105: 0xFDC6, + 146993 - 131105: 0x9248, + 147001 - 131105: 0x92B5, + 147080 - 131105: 0x9DC1, + 147081 - 131105: 0x92B9, + 147082 - 131105: 0x92A6, + 147083 - 131105: 0x8F4B, + 147129 - 131105: 0x9BA6, + 147135 - 131105: 0x92B6, + 147159 - 131105: 0x8E40, + 147191 - 131105: 0x9ED8, + 147192 - 131105: 0x945E, + 147193 - 131105: 0x985F, + 147194 - 131105: 0x94CE, + 147195 - 131105: 0x924A, + 147196 - 131105: 0xFD70, + 147253 - 131105: 0x9467, + 147265 - 131105: 0x8DEC, + 147274 - 131105: 0x9BD8, + 147297 - 131105: 0x8763, + 147327 - 131105: 0x9448, + 147328 - 131105: 0xFAC1, + 147329 - 131105: 0x9CF7, + 147330 - 131105: 0xFDBE, + 147343 - 131105: 0x8FDA, + 147380 - 131105: 0xFDD9, + 147383 - 131105: 0xFC7E, + 147392 - 131105: 0x93F9, + 147397 - 131105: 0xFA43, + 147435 - 131105: 0xFAEB, + 147436 - 131105: 0xFAC3, + 147437 - 131105: 0x97D3, + 147438 - 131105: 0x95F9, + 147439 - 131105: 0x9C48, + 147440 - 131105: 0xFDD8, + 147473 - 131105: 0xA0D8, + 147513 - 131105: 0xFDD7, + 147514 - 131105: 0xFB4A, + 147515 - 131105: 0x9BAF, + 147516 - 131105: 0x944B, + 147517 - 131105: 0xFDC9, + 147543 - 131105: 0x8EAC, + 147589 - 131105: 0xFDB2, + 147595 - 131105: 0x925A, + 147596 - 131105: 0xFCBD, + 147597 - 131105: 0x92D9, + 147601 - 131105: 0xFDD5, + 147657 - 131105: 0x92DD, + 147681 - 131105: 0x9259, + 147692 - 131105: 0x8CF0, + 147716 - 131105: 0x96BA, + 147727 - 131105: 0x925B, + 147737 - 131105: 0x9BAB, + 147775 - 131105: 0xFDDA, + 147776 - 131105: 0xFDDE, + 147780 - 131105: 0xFDD3, + 147790 - 131105: 0x8C46, + 147797 - 131105: 0xFDD6, + 147798 - 131105: 0xFDDC, + 147799 - 131105: 0xFDDD, + 147804 - 131105: 0x90FE, + 147807 - 131105: 0xFEA1, + 147809 - 131105: 0x87A5, + 147831 - 131105: 0x8BAD, + 147834 - 131105: 0x9CD8, + 147875 - 131105: 0x9E6D, + 147876 - 131105: 0xFD7C, + 147877 - 131105: 0xFB61, + 147884 - 131105: 0x96F8, + 147893 - 131105: 0x96F0, + 147917 - 131105: 0xFCF4, + 147938 - 131105: 0xFE60, + 147964 - 131105: 0x9852, + 147995 - 131105: 0x964F, + 148043 - 131105: 0x916E, + 148054 - 131105: 0x986D, + 148057 - 131105: 0x9864, + 148086 - 131105: 0x9453, + 148087 - 131105: 0xFDEC, + 148088 - 131105: 0xFB78, + 148100 - 131105: 0x95BA, + 148115 - 131105: 0x985D, + 148117 - 131105: 0x92F9, + 148133 - 131105: 0x985A, + 148159 - 131105: 0x8750, + 148161 - 131105: 0xFDF6, + 148169 - 131105: 0x93D0, + 148170 - 131105: 0x9862, + 148206 - 131105: 0x9BAD, + 148218 - 131105: 0x974F, + 148237 - 131105: 0x9BAE, + 148250 - 131105: 0x9452, + 148276 - 131105: 0x9BB0, + 148296 - 131105: 0x91D2, + 148322 - 131105: 0x97EA, + 148323 - 131105: 0xFB6B, + 148324 - 131105: 0x91B1, + 148325 - 131105: 0xFDF3, + 148364 - 131105: 0x92CB, + 148374 - 131105: 0x9BB1, + 148380 - 131105: 0xFCEC, + 148413 - 131105: 0x986B, + 148417 - 131105: 0x9751, + 148457 - 131105: 0x9871, + 148458 - 131105: 0x95EF, + 148466 - 131105: 0x9EF3, + 148472 - 131105: 0x91E8, + 148484 - 131105: 0x9BBA, + 148533 - 131105: 0xFB4C, + 148534 - 131105: 0x926A, + 148570 - 131105: 0xFDF8, + 148571 - 131105: 0x9861, + 148595 - 131105: 0x91E7, + 148615 - 131105: 0x93ED, + 148616 - 131105: 0x9744, + 148665 - 131105: 0x91E1, + 148668 - 131105: 0xFBF5, + 148686 - 131105: 0x9869, + 148691 - 131105: 0x8A62, + 148694 - 131105: 0x9BBB, + 148741 - 131105: 0x8CA8, + 148769 - 131105: 0x9C55, + 148856 - 131105: 0x8E77, + 148936 - 131105: 0x8AB2, + 149016 - 131105: 0x9EBC, + 149034 - 131105: 0x93E6, + 149093 - 131105: 0x93A2, + 149108 - 131105: 0x9BBD, + 149143 - 131105: 0x94B3, + 149204 - 131105: 0x937D, + 149254 - 131105: 0x9E66, + 149285 - 131105: 0x9459, + 149295 - 131105: 0x9BBF, + 149391 - 131105: 0x9458, + 149472 - 131105: 0x9EA5, + 149522 - 131105: 0x9BC7, + 149539 - 131105: 0xFE54, + 149634 - 131105: 0x8E74, + 149737 - 131105: 0x8BD6, + 149744 - 131105: 0x94B6, + 149745 - 131105: 0xFD74, + 149746 - 131105: 0x98C0, + 149747 - 131105: 0x94A5, + 149755 - 131105: 0x9BC8, + 149759 - 131105: 0x95ED, + 149760 - 131105: 0xFD7E, + 149761 - 131105: 0xFBEB, + 149772 - 131105: 0xFD7D, + 149782 - 131105: 0x976F, + 149783 - 131105: 0x9461, + 149785 - 131105: 0x9FC1, + 149807 - 131105: 0x95D7, + 149811 - 131105: 0xFA52, + 149812 - 131105: 0x9C58, + 149822 - 131105: 0x9F68, + 149823 - 131105: 0x9BE7, + 149824 - 131105: 0xFCCE, + 149825 - 131105: 0x96E8, + 149826 - 131105: 0xFA49, + 149827 - 131105: 0x97A1, + 149858 - 131105: 0x954D, + 149859 - 131105: 0x9EF8, + 149876 - 131105: 0xFE49, + 149877 - 131105: 0x91CE, + 149878 - 131105: 0x9771, + 149883 - 131105: 0x8CCF, + 149887 - 131105: 0xFDB1, + 149890 - 131105: 0xFC6E, + 149896 - 131105: 0x9CF2, + 149897 - 131105: 0x93B8, + 149898 - 131105: 0x9043, + 149899 - 131105: 0x9759, + 149900 - 131105: 0x94D7, + 149901 - 131105: 0xFE66, + 149902 - 131105: 0x947D, + 149903 - 131105: 0xFC6F, + 149908 - 131105: 0x9246, + 149924 - 131105: 0xFA6D, + 149927 - 131105: 0x8EF7, + 149929 - 131105: 0xFBB7, + 149931 - 131105: 0x947C, + 149932 - 131105: 0x92CD, + 149933 - 131105: 0x97B2, + 149943 - 131105: 0xFE65, + 149944 - 131105: 0x967E, + 149945 - 131105: 0x9758, + 149946 - 131105: 0x9B77, + 149947 - 131105: 0x91CF, + 149957 - 131105: 0x94A4, + 149968 - 131105: 0x9CAD, + 149978 - 131105: 0x8BAB, + 149982 - 131105: 0x96D5, + 149983 - 131105: 0xFCB3, + 149987 - 131105: 0x93AE, + 149989 - 131105: 0x976D, + 149996 - 131105: 0x9446, + 149997 - 131105: 0x95F7, + 150006 - 131105: 0x9C46, + 150007 - 131105: 0x955B, + 150008 - 131105: 0x91D1, + 150009 - 131105: 0x94F4, + 150011 - 131105: 0xFE67, + 150030 - 131105: 0x92A5, + 150034 - 131105: 0xFEDF, + 150035 - 131105: 0x8CAB, + 150037 - 131105: 0x9BC9, + 150049 - 131105: 0xFCED, + 150050 - 131105: 0xFDFA, + 150051 - 131105: 0xFCC8, + 150052 - 131105: 0xFE62, + 150053 - 131105: 0x91FC, + 150054 - 131105: 0xFE6B, + 150055 - 131105: 0xFDF9, + 150056 - 131105: 0xFCC7, + 150057 - 131105: 0x914E, + 150058 - 131105: 0x9CB8, + 150078 - 131105: 0x9767, + 150082 - 131105: 0x95EE, + 150085 - 131105: 0x9BB2, + 150090 - 131105: 0x9460, + 150094 - 131105: 0x94A2, + 150095 - 131105: 0x9875, + 150096 - 131105: 0x97AC, + 150097 - 131105: 0x91D3, + 150109 - 131105: 0x987B, + 150117 - 131105: 0x8EEB, + 150118 - 131105: 0x976A, + 150119 - 131105: 0x965E, + 150129 - 131105: 0x97EB, + 150135 - 131105: 0x9FF9, + 150136 - 131105: 0x95F8, + 150137 - 131105: 0xFEA2, + 150138 - 131105: 0x8FE6, + 150156 - 131105: 0xFE7E, + 150163 - 131105: 0x9DA4, + 150164 - 131105: 0x9768, + 150165 - 131105: 0x8EEC, + 150166 - 131105: 0x94BD, + 150180 - 131105: 0x945B, + 150181 - 131105: 0x9CF6, + 150182 - 131105: 0xFAA7, + 150183 - 131105: 0x9BD9, + 150193 - 131105: 0xFA5D, + 150194 - 131105: 0x9656, + 150195 - 131105: 0x9762, + 150202 - 131105: 0x94BA, + 150203 - 131105: 0xA04F, + 150204 - 131105: 0x92D8, + 150208 - 131105: 0x9BCB, + 150215 - 131105: 0x94BB, + 150218 - 131105: 0x9D5F, + 150225 - 131105: 0x90CF, + 150239 - 131105: 0x9465, + 150242 - 131105: 0x9F4C, + 150249 - 131105: 0x90D8, + 150287 - 131105: 0x8D5B, + 150382 - 131105: 0x9EBE, + 150517 - 131105: 0xFB6D, + 150537 - 131105: 0x95CA, + 150686 - 131105: 0x9DC2, + 150687 - 131105: 0x97F8, + 150729 - 131105: 0x8FFC, + 150745 - 131105: 0x9473, + 150790 - 131105: 0x9474, + 150803 - 131105: 0xFEB7, + 150968 - 131105: 0x8A4B, + 151018 - 131105: 0x8A55, + 151019 - 131105: 0x8B69, + 151099 - 131105: 0x8ADC, + 151120 - 131105: 0x8B76, + 151205 - 131105: 0x9BCE, + 151207 - 131105: 0x8A68, + 151310 - 131105: 0xA0F8, + 151388 - 131105: 0x98DF, + 151426 - 131105: 0xFEB5, + 151430 - 131105: 0x9BCF, + 151447 - 131105: 0x96FB, + 151450 - 131105: 0x9BFB, + 151465 - 131105: 0x9ECE, + 151480 - 131105: 0x8EE5, + 151490 - 131105: 0x9E7B, + 151596 - 131105: 0x9BD2, + 151634 - 131105: 0x8AA5, + 151709 - 131105: 0xFECE, + 151851 - 131105: 0x8A45, + 151880 - 131105: 0x9DFC, + 151933 - 131105: 0xFECF, + 151934 - 131105: 0x8BA5, + 152013 - 131105: 0x8C4A, + 152035 - 131105: 0x8AEC, + 152038 - 131105: 0xFCE0, + 152039 - 131105: 0x94AD, + 152096 - 131105: 0xFED5, + 152097 - 131105: 0x94AC, + 152144 - 131105: 0xFC5A, + 152217 - 131105: 0x9BD6, + 152263 - 131105: 0x8A6F, + 152280 - 131105: 0x8BA9, + 152334 - 131105: 0x8E5F, + 152337 - 131105: 0x9DCB, + 152339 - 131105: 0xFCE7, + 152601 - 131105: 0x9BD7, + 152613 - 131105: 0x93C8, + 152623 - 131105: 0x91F0, + 152624 - 131105: 0x8FE0, + 152646 - 131105: 0x9BDB, + 152684 - 131105: 0x90ED, + 152686 - 131105: 0x9BDC, + 152730 - 131105: 0x8D53, + 152881 - 131105: 0xA0EC, + 152885 - 131105: 0x98FA, + 152895 - 131105: 0x9BE0, + 152923 - 131105: 0x93C7, + 152924 - 131105: 0x9249, + 152925 - 131105: 0x96E1, + 152926 - 131105: 0x9BE2, + 152930 - 131105: 0x9BE4, + 152933 - 131105: 0x8FE1, + 152934 - 131105: 0x9BE5, + 152961 - 131105: 0x94C0, + 152964 - 131105: 0x93C3, + 152975 - 131105: 0x93C5, + 153017 - 131105: 0x9079, + 153045 - 131105: 0x977B, + 153051 - 131105: 0x907E, + 153056 - 131105: 0xFEE6, + 153093 - 131105: 0xFE46, + 153141 - 131105: 0x9DB8, + 153169 - 131105: 0x9270, + 153219 - 131105: 0x95A8, + 153237 - 131105: 0x8CB0, + 153315 - 131105: 0x94C8, + 153334 - 131105: 0x98B9, + 153350 - 131105: 0x9140, + 153373 - 131105: 0xFCBE, + 153381 - 131105: 0x9157, + 153405 - 131105: 0x8BB2, + 153458 - 131105: 0xFADF, + 153543 - 131105: 0x9BE6, + 153567 - 131105: 0x9643, + 153568 - 131105: 0x8E44, + 153569 - 131105: 0x9C4F, + 153687 - 131105: 0xFEF4, + 153693 - 131105: 0x9BE8, + 153714 - 131105: 0x93DC, + 153800 - 131105: 0x966F, + 153822 - 131105: 0x87A1, + 153825 - 131105: 0x8E4A, + 153859 - 131105: 0x9BED, + 153926 - 131105: 0x92F6, + 153942 - 131105: 0x9DB9, + 154028 - 131105: 0x8E4E, + 154060 - 131105: 0xFBCF, + 154196 - 131105: 0x8760, + 154261 - 131105: 0x9EC2, + 154268 - 131105: 0x94E5, + 154286 - 131105: 0x9BF0, + 154287 - 131105: 0x94E4, + 154345 - 131105: 0x9551, + 154484 - 131105: 0x8BBB, + 154505 - 131105: 0x9BF1, + 154547 - 131105: 0x94F0, + 154548 - 131105: 0x8E64, + 154566 - 131105: 0x94EA, + 154596 - 131105: 0x8F61, + 154600 - 131105: 0x9B64, + 154625 - 131105: 0x8E5B, + 154630 - 131105: 0x9BF2, + 154657 - 131105: 0x9FBE, + 154698 - 131105: 0x9DC9, + 154725 - 131105: 0x8E6C, + 154769 - 131105: 0x8F73, + 154788 - 131105: 0x8CAF, + 154816 - 131105: 0x8F75, + 154817 - 131105: 0x8E71, + 154878 - 131105: 0x8E60, + 154912 - 131105: 0x8E6A, + 154928 - 131105: 0x8C4C, + 154947 - 131105: 0x9552, + 155033 - 131105: 0x87CF, + 155065 - 131105: 0x87C0, + 155150 - 131105: 0x9554, + 155209 - 131105: 0x8AD4, + 155265 - 131105: 0x9DBB, + 155266 - 131105: 0x9543, + 155267 - 131105: 0x92FE, + 155302 - 131105: 0x94F2, + 155324 - 131105: 0x94F1, + 155351 - 131105: 0xA0EA, + 155352 - 131105: 0x9DD2, + 155418 - 131105: 0xA0B1, + 155467 - 131105: 0x91F8, + 155617 - 131105: 0x9462, + 155618 - 131105: 0x9BA4, + 155681 - 131105: 0x877D, + 155689 - 131105: 0x8EAD, + 155720 - 131105: 0x9EAD, + 155748 - 131105: 0x96D0, + 155779 - 131105: 0xFEEE, + 155799 - 131105: 0x8AB4, + 155812 - 131105: 0x9757, + 155813 - 131105: 0x8A77, + 155906 - 131105: 0x9BF7, + 155937 - 131105: 0x8EB5, + 155993 - 131105: 0xA06D, + 155994 - 131105: 0x8EB6, + 155995 - 131105: 0x9756, + 155996 - 131105: 0x9540, + 156077 - 131105: 0xA0F3, + 156078 - 131105: 0x94BE, + 156082 - 131105: 0x9BFA, + 156125 - 131105: 0xFDDF, + 156248 - 131105: 0x9DBC, + 156257 - 131105: 0x94FE, + 156266 - 131105: 0x8BDB, + 156267 - 131105: 0xA0FE, + 156368 - 131105: 0x8EC0, + 156469 - 131105: 0x9F47, + 156491 - 131105: 0x8BDE, + 156492 - 131105: 0xA0FB, + 156497 - 131105: 0x8EC3, + 156606 - 131105: 0x9649, + 156661 - 131105: 0xFEC2, + 156664 - 131105: 0x954C, + 156674 - 131105: 0x9BFD, + 156688 - 131105: 0x90CC, + 156689 - 131105: 0x9C60, + 156690 - 131105: 0x954B, + 156746 - 131105: 0x9BFE, + 156777 - 131105: 0x9C70, + 156804 - 131105: 0x9C43, + 156808 - 131105: 0x9C47, + 156809 - 131105: 0x8ECC, + 156813 - 131105: 0x8E54, + 156824 - 131105: 0x8EE4, + 156946 - 131105: 0x9C49, + 157042 - 131105: 0x8B5E, + 157088 - 131105: 0x955E, + 157101 - 131105: 0x955C, + 157119 - 131105: 0x9C4B, + 157202 - 131105: 0x8BE1, + 157222 - 131105: 0x8ED9, + 157359 - 131105: 0x9DB4, + 157361 - 131105: 0x925F, + 157365 - 131105: 0x9C4C, + 157402 - 131105: 0x8AA1, + 157416 - 131105: 0x8EDB, + 157436 - 131105: 0x9C56, + 157462 - 131105: 0x8AA2, + 157505 - 131105: 0x9754, + 157593 - 131105: 0x9C5E, + 157619 - 131105: 0x9ED4, + 157620 - 131105: 0x9568, + 157644 - 131105: 0xA0C3, + 157724 - 131105: 0x8AE6, + 157766 - 131105: 0xA0F7, + 157790 - 131105: 0x9C61, + 157806 - 131105: 0x9C5F, + 157832 - 131105: 0xFC4D, + 157834 - 131105: 0x9E5B, + 157843 - 131105: 0x9E69, + 157895 - 131105: 0x9C63, + 157966 - 131105: 0xFEC7, + 157969 - 131105: 0xFEC6, + 157990 - 131105: 0x9C67, + 158009 - 131105: 0x9C69, + 158033 - 131105: 0x8BE2, + 158120 - 131105: 0x9165, + 158133 - 131105: 0x9CE7, + 158194 - 131105: 0x8A54, + 158202 - 131105: 0x9C6C, + 158253 - 131105: 0x9C6E, + 158254 - 131105: 0xFE5D, + 158260 - 131105: 0x9C73, + 158274 - 131105: 0x956A, + 158289 - 131105: 0x956D, + 158290 - 131105: 0x8EF0, + 158469 - 131105: 0x8F4D, + 158474 - 131105: 0x8EF6, + 158483 - 131105: 0xFABC, + 158485 - 131105: 0x8CD5, + 158499 - 131105: 0x875E, + 158504 - 131105: 0xFBDA, + 158544 - 131105: 0x8B4C, + 158545 - 131105: 0xFD75, + 158546 - 131105: 0x9BDD, + 158547 - 131105: 0xFAF5, + 158555 - 131105: 0x9C74, + 158581 - 131105: 0x9545, + 158594 - 131105: 0x96C6, + 158614 - 131105: 0x8F6A, + 158615 - 131105: 0x8F4E, + 158621 - 131105: 0x9C78, + 158643 - 131105: 0xFA55, + 158656 - 131105: 0x97E4, + 158711 - 131105: 0x9C41, + 158753 - 131105: 0x925C, + 158784 - 131105: 0x96FA, + 158785 - 131105: 0x8CF6, + 158790 - 131105: 0x8D4D, + 158846 - 131105: 0xFB66, + 158847 - 131105: 0x8E65, + 158848 - 131105: 0x9849, + 158849 - 131105: 0xFBA8, + 158850 - 131105: 0x9842, + 158884 - 131105: 0x9C7A, + 158903 - 131105: 0x97FB, + 158904 - 131105: 0x90CA, + 158909 - 131105: 0x9C5B, + 158912 - 131105: 0x974D, + 158915 - 131105: 0x8ED3, + 158929 - 131105: 0x9561, + 159010 - 131105: 0x9F4B, + 159011 - 131105: 0x9FB5, + 159012 - 131105: 0x93D2, + 159013 - 131105: 0xFDAA, + 159014 - 131105: 0x9840, + 159015 - 131105: 0x9146, + 159016 - 131105: 0x9867, + 159017 - 131105: 0xFA5A, + 159018 - 131105: 0xFBA9, + 159057 - 131105: 0x9841, + 159092 - 131105: 0x8CD3, + 159136 - 131105: 0xFCFD, + 159137 - 131105: 0xFDAB, + 159138 - 131105: 0x91BD, + 159139 - 131105: 0x8F4C, + 159140 - 131105: 0x96C9, + 159141 - 131105: 0x8F55, + 159142 - 131105: 0xFBAE, + 159143 - 131105: 0x956F, + 159150 - 131105: 0x9C7D, + 159196 - 131105: 0xA0F0, + 159210 - 131105: 0x946F, + 159211 - 131105: 0xFDAC, + 159216 - 131105: 0x96CB, + 159232 - 131105: 0x96CE, + 159237 - 131105: 0xA056, + 159239 - 131105: 0x9CE1, + 159250 - 131105: 0x96C4, + 159298 - 131105: 0x8F5E, + 159299 - 131105: 0x8F6C, + 159300 - 131105: 0x8EA3, + 159301 - 131105: 0xFBB3, + 159342 - 131105: 0xFC53, + 159346 - 131105: 0xFDB3, + 159351 - 131105: 0x8F6B, + 159364 - 131105: 0x96CA, + 159368 - 131105: 0x87CD, + 159371 - 131105: 0x8753, + 159385 - 131105: 0x8F79, + 159440 - 131105: 0x9E6F, + 159441 - 131105: 0xA0C5, + 159442 - 131105: 0xFC78, + 159443 - 131105: 0x8E42, + 159444 - 131105: 0x8F5A, + 159445 - 131105: 0x90C2, + 159446 - 131105: 0x8EA5, + 159447 - 131105: 0x9061, + 159526 - 131105: 0x924F, + 159603 - 131105: 0x9373, + 159604 - 131105: 0xFDB5, + 159647 - 131105: 0xFECC, + 159649 - 131105: 0xFBBD, + 159678 - 131105: 0x8CD6, + 159710 - 131105: 0x9843, + 159711 - 131105: 0x96C5, + 159758 - 131105: 0x89BC, + 159819 - 131105: 0x9CA3, + 159826 - 131105: 0x924B, + 159827 - 131105: 0x984A, + 159880 - 131105: 0x8FA4, + 159917 - 131105: 0xA0F1, + 159918 - 131105: 0x9EFB, + 159919 - 131105: 0x9CD2, + 159949 - 131105: 0x8FA7, + 159954 - 131105: 0x8754, + 159992 - 131105: 0xFC5C, + 160009 - 131105: 0x9845, + 160012 - 131105: 0x9046, + 160013 - 131105: 0x8CD1, + 160038 - 131105: 0xFEFA, + 160039 - 131105: 0x9560, + 160100 - 131105: 0x9F48, + 160101 - 131105: 0x9247, + 160117 - 131105: 0x90FB, + 160205 - 131105: 0x9CA4, + 160283 - 131105: 0x9571, + 160359 - 131105: 0x8745, + 160384 - 131105: 0x9CA6, + 160389 - 131105: 0x9CA7, + 160395 - 131105: 0x9CAA, + 160434 - 131105: 0x9ED3, + 160438 - 131105: 0x9E70, + 160486 - 131105: 0x9CAC, + 160594 - 131105: 0x8752, + 160666 - 131105: 0x8FAE, + 160767 - 131105: 0x8D50, + 160802 - 131105: 0x957D, + 160848 - 131105: 0x9CB0, + 160900 - 131105: 0x97B6, + 160902 - 131105: 0xA0BD, + 161140 - 131105: 0x8ADF, + 161187 - 131105: 0x9EAA, + 161248 - 131105: 0x8FBD, + 161252 - 131105: 0x8FBF, + 161277 - 131105: 0x9369, + 161278 - 131105: 0x9BA7, + 161287 - 131105: 0xC8A4, + 161292 - 131105: 0xFEEA, + 161330 - 131105: 0x9BE1, + 161337 - 131105: 0x8B41, + 161365 - 131105: 0x9DB6, + 161366 - 131105: 0xA0EB, + 161367 - 131105: 0x9BA3, + 161428 - 131105: 0x8BA1, + 161551 - 131105: 0x8FC8, + 161589 - 131105: 0x894C, + 161590 - 131105: 0x9860, + 161601 - 131105: 0x94C7, + 161630 - 131105: 0x8B58, + 161668 - 131105: 0x95AB, + 161669 - 131105: 0x95AA, + 161740 - 131105: 0x9CC3, + 161880 - 131105: 0x9CC4, + 161904 - 131105: 0x93D6, + 161949 - 131105: 0x9DAC, + 161970 - 131105: 0x8BE6, + 161992 - 131105: 0x8A71, + 162084 - 131105: 0x8FD1, + 162151 - 131105: 0x99D5, + 162170 - 131105: 0x90F4, + 162208 - 131105: 0x8AA3, + 162269 - 131105: 0x9CCE, + 162301 - 131105: 0x9CD4, + 162314 - 131105: 0x9CD5, + 162318 - 131105: 0xFBC8, + 162366 - 131105: 0x9DB3, + 162387 - 131105: 0xFC70, + 162393 - 131105: 0x8FD7, + 162425 - 131105: 0x9B73, + 162436 - 131105: 0xFA5B, + 162493 - 131105: 0x8FD2, + 162494 - 131105: 0x9064, + 162548 - 131105: 0x98B6, + 162566 - 131105: 0x9668, + 162571 - 131105: 0x9CD6, + 162584 - 131105: 0x98BD, + 162616 - 131105: 0x8FDC, + 162617 - 131105: 0xFEF6, + 162618 - 131105: 0x8FD9, + 162632 - 131105: 0x9541, + 162661 - 131105: 0x87CA, + 162799 - 131105: 0x876C, + 162804 - 131105: 0x97F3, + 162834 - 131105: 0x9BF8, + 162924 - 131105: 0x875A, + 162993 - 131105: 0x8748, + 163013 - 131105: 0x874A, + 163119 - 131105: 0x9E6C, + 163155 - 131105: 0x8FF2, + 163156 - 131105: 0x8FEE, + 163174 - 131105: 0x9CD7, + 163187 - 131105: 0x9E6E, + 163204 - 131105: 0x8A40, + 163215 - 131105: 0x8FEF, + 163224 - 131105: 0x8FF4, + 163261 - 131105: 0x8FF5, + 163292 - 131105: 0x95C2, + 163405 - 131105: 0x986A, + 163407 - 131105: 0x97CF, + 163630 - 131105: 0x9EE5, + 163833 - 131105: 0x9E7C, + 163842 - 131105: 0x9041, + 163849 - 131105: 0x9CDB, + 163870 - 131105: 0x9441, + 163875 - 131105: 0x9CE6, + 163876 - 131105: 0x9DB0, + 163912 - 131105: 0x9CEA, + 163971 - 131105: 0x9CED, + 163984 - 131105: 0x9CFA, + 164029 - 131105: 0x8B62, + 164030 - 131105: 0x8A4E, + 164072 - 131105: 0x9CCA, + 164073 - 131105: 0x8A66, + 164084 - 131105: 0x9CFB, + 164142 - 131105: 0x9CFC, + 164175 - 131105: 0x9CFE, + 164189 - 131105: 0x8A53, + 164207 - 131105: 0x9CE5, + 164233 - 131105: 0x9D40, + 164271 - 131105: 0x9D41, + 164284 - 131105: 0x9045, + 164359 - 131105: 0x8B73, + 164376 - 131105: 0x97CA, + 164378 - 131105: 0x9D42, + 164438 - 131105: 0x8A61, + 164476 - 131105: 0x8BAE, + 164507 - 131105: 0x8AD2, + 164557 - 131105: 0x8BA2, + 164578 - 131105: 0x9DF2, + 164614 - 131105: 0x9D43, + 164632 - 131105: 0x9CDF, + 164655 - 131105: 0x9D44, + 164666 - 131105: 0x8ECA, + 164709 - 131105: 0x904E, + 164717 - 131105: 0x8EB3, + 164733 - 131105: 0x9FF5, + 164746 - 131105: 0x9D45, + 164882 - 131105: 0x904F, + 164968 - 131105: 0x9D47, + 164972 - 131105: 0x89CA, + 164979 - 131105: 0x9CB5, + 164994 - 131105: 0xFBFE, + 165121 - 131105: 0x905E, + 165180 - 131105: 0x9063, + 165181 - 131105: 0x9057, + 165228 - 131105: 0x9066, + 165352 - 131105: 0x9BC0, + 165364 - 131105: 0xFCE5, + 165376 - 131105: 0x9162, + 165387 - 131105: 0x9067, + 165413 - 131105: 0x8FA1, + 165435 - 131105: 0x8FA2, + 165546 - 131105: 0x9D48, + 165547 - 131105: 0xFAD3, + 165554 - 131105: 0x8D4F, + 165564 - 131105: 0x905D, + 165592 - 131105: 0x90B9, + 165606 - 131105: 0x906B, + 165647 - 131105: 0x8C5C, + 165651 - 131105: 0x9069, + 165892 - 131105: 0xFE57, + 165931 - 131105: 0xFE55, + 166157 - 131105: 0x87A6, + 166195 - 131105: 0x9073, + 166216 - 131105: 0x9BEF, + 166217 - 131105: 0x9CF0, + 166230 - 131105: 0x9D4B, + 166244 - 131105: 0xFED9, + 166248 - 131105: 0xFEDA, + 166252 - 131105: 0x91E0, + 166253 - 131105: 0x8D43, + 166270 - 131105: 0x91D8, + 166281 - 131105: 0x9646, + 166312 - 131105: 0x9360, + 166314 - 131105: 0xFA53, + 166315 - 131105: 0x9CD3, + 166328 - 131105: 0x9D4E, + 166332 - 131105: 0xFB40, + 166336 - 131105: 0x8DE2, + 166364 - 131105: 0x9442, + 166366 - 131105: 0x9056, + 166369 - 131105: 0x9865, + 166371 - 131105: 0x8C6C, + 166372 - 131105: 0xFA4A, + 166375 - 131105: 0x9D50, + 166376 - 131105: 0x9D52, + 166393 - 131105: 0x95AF, + 166394 - 131105: 0x975A, + 166395 - 131105: 0x9349, + 166396 - 131105: 0x9747, + 166415 - 131105: 0xA0F4, + 166422 - 131105: 0x9778, + 166437 - 131105: 0x8FCF, + 166441 - 131105: 0xFC60, + 166450 - 131105: 0x8C4E, + 166454 - 131105: 0xFC56, + 166468 - 131105: 0x91DC, + 166469 - 131105: 0x9661, + 166470 - 131105: 0x92EC, + 166471 - 131105: 0x935D, + 166472 - 131105: 0x8EDE, + 166473 - 131105: 0x96FE, + 166474 - 131105: 0xFD4F, + 166475 - 131105: 0x95DE, + 166489 - 131105: 0x98B0, + 166490 - 131105: 0xA040, + 166529 - 131105: 0x97BD, + 166530 - 131105: 0x977D, + 166531 - 131105: 0x97F5, + 166554 - 131105: 0x9BAC, + 166555 - 131105: 0xFADA, + 166556 - 131105: 0x92C2, + 166592 - 131105: 0x97B1, + 166598 - 131105: 0x907B, + 166603 - 131105: 0x93FE, + 166604 - 131105: 0x947B, + 166606 - 131105: 0x9777, + 166622 - 131105: 0xFABE, + 166623 - 131105: 0xFD43, + 166624 - 131105: 0x90C6, + 166625 - 131105: 0x90A4, + 166626 - 131105: 0x90A8, + 166627 - 131105: 0x94A9, + 166629 - 131105: 0x90A9, + 166634 - 131105: 0x8C65, + 166652 - 131105: 0x95E0, + 166668 - 131105: 0x907D, + 166675 - 131105: 0x9265, + 166689 - 131105: 0xFDBA, + 166690 - 131105: 0x93C4, + 166699 - 131105: 0xFEED, + 166700 - 131105: 0x9DAB, + 166701 - 131105: 0xA0E3, + 166703 - 131105: 0x9648, + 166726 - 131105: 0x9D53, + 166732 - 131105: 0x8AA9, + 166734 - 131105: 0x9BC5, + 166736 - 131105: 0x965D, + 166755 - 131105: 0x975F, + 166756 - 131105: 0x965F, + 166757 - 131105: 0x966E, + 166758 - 131105: 0xFB5D, + 166764 - 131105: 0x9DB1, + 166799 - 131105: 0xFEA3, + 166809 - 131105: 0x9DB2, + 166812 - 131105: 0x95AE, + 166813 - 131105: 0xFCA3, + 166841 - 131105: 0x8769, + 166850 - 131105: 0xA0A2, + 166853 - 131105: 0x9655, + 166868 - 131105: 0x9D54, + 166871 - 131105: 0x9341, + 166873 - 131105: 0x95AD, + 166874 - 131105: 0x91D5, + 166887 - 131105: 0x977A, + 166888 - 131105: 0xFDFC, + 166889 - 131105: 0x8E47, + 166890 - 131105: 0x93FD, + 166891 - 131105: 0x90A5, + 166892 - 131105: 0x90AC, + 166901 - 131105: 0x95AC, + 166911 - 131105: 0x90AE, + 166915 - 131105: 0xFEA5, + 166921 - 131105: 0x9D56, + 166940 - 131105: 0x97E3, + 166941 - 131105: 0x95E2, + 166947 - 131105: 0x9466, + 166950 - 131105: 0x9647, + 166955 - 131105: 0x91B8, + 166960 - 131105: 0x9CEC, + 166969 - 131105: 0x90AD, + 166971 - 131105: 0x95E3, + 167114 - 131105: 0x8B4F, + 167117 - 131105: 0x8AE3, + 167122 - 131105: 0x8B4D, + 167220 - 131105: 0x95EA, + 167321 - 131105: 0x8B4E, + 167353 - 131105: 0x8CC1, + 167439 - 131105: 0x8BED, + 167478 - 131105: 0x91D9, + 167481 - 131105: 0xA0A4, + 167525 - 131105: 0x95F5, + 167526 - 131105: 0x95F4, + 167575 - 131105: 0x9FB3, + 167596 - 131105: 0xFEAF, + 167602 - 131105: 0xFE72, + 167603 - 131105: 0x927A, + 167641 - 131105: 0xFEAC, + 167655 - 131105: 0x95F3, + 167877 - 131105: 0x9D58, + 168057 - 131105: 0x8D46, + 168072 - 131105: 0x9372, + 168075 - 131105: 0x91C5, + 168083 - 131105: 0x9642, + 168111 - 131105: 0x90CD, + 168112 - 131105: 0x95FE, + 168113 - 131105: 0x9159, + 168128 - 131105: 0x9C65, + 168164 - 131105: 0x97CC, + 168165 - 131105: 0x90CE, + 168172 - 131105: 0x9D59, + 168173 - 131105: 0xFCF5, + 168205 - 131105: 0xFEFD, + 168208 - 131105: 0x9D5B, + 168252 - 131105: 0x9D5C, + 168269 - 131105: 0x937E, + 168283 - 131105: 0x98AC, + 168286 - 131105: 0x9D5E, + 168304 - 131105: 0xFDD0, + 168348 - 131105: 0xFD60, + 168360 - 131105: 0x9CCF, + 168405 - 131105: 0x90DD, + 168427 - 131105: 0x90E0, + 168989 - 131105: 0x90F3, + 168992 - 131105: 0x98B1, + 169011 - 131105: 0x90F0, + 169023 - 131105: 0x93BD, + 169032 - 131105: 0x95B7, + 169168 - 131105: 0x9F46, + 169177 - 131105: 0x8E4B, + 169178 - 131105: 0x9658, + 169189 - 131105: 0x8A4C, + 169191 - 131105: 0x9D63, + 169374 - 131105: 0x9ECF, + 169392 - 131105: 0x9D65, + 169400 - 131105: 0x9D66, + 169431 - 131105: 0x965A, + 169449 - 131105: 0x9D64, + 169460 - 131105: 0x8A6C, + 169760 - 131105: 0x8AD9, + 169778 - 131105: 0x9D67, + 169940 - 131105: 0x8A70, + 170000 - 131105: 0x8BF3, + 170071 - 131105: 0x9150, + 170148 - 131105: 0x9CC1, + 170193 - 131105: 0x9D68, + 170218 - 131105: 0x93A7, + 170225 - 131105: 0x9674, + 170234 - 131105: 0x8CFD, + 170243 - 131105: 0xA0EF, + 170245 - 131105: 0x9151, + 170287 - 131105: 0x96C1, + 170309 - 131105: 0x8777, + 170311 - 131105: 0x8C64, + 170312 - 131105: 0x9676, + 170313 - 131105: 0x9D69, + 170333 - 131105: 0xFCA4, + 170346 - 131105: 0x9D6A, + 170397 - 131105: 0x924E, + 170435 - 131105: 0x9D6B, + 170441 - 131105: 0x9BC1, + 170536 - 131105: 0x9D6C, + 170573 - 131105: 0x8A65, + 170757 - 131105: 0x915D, + 170766 - 131105: 0x9D6D, + 170965 - 131105: 0x915A, + 171123 - 131105: 0x8C42, + 171181 - 131105: 0x9CC0, + 171326 - 131105: 0x916A, + 171354 - 131105: 0x9D6E, + 171388 - 131105: 0x9EA6, + 171416 - 131105: 0x9DCD, + 171419 - 131105: 0x9D6F, + 171510 - 131105: 0x89BB, + 171526 - 131105: 0x9EF9, + 171565 - 131105: 0x96B4, + 171624 - 131105: 0x9172, + 171692 - 131105: 0x9EC8, + 171696 - 131105: 0x8771, + 171715 - 131105: 0x8B55, + 171768 - 131105: 0x9D71, + 171811 - 131105: 0x9D72, + 171824 - 131105: 0x9ECC, + 171959 - 131105: 0x9174, + 171998 - 131105: 0x9ED0, + 172052 - 131105: 0x905C, + 172167 - 131105: 0x8ED2, + 172217 - 131105: 0x91A8, + 172257 - 131105: 0x9177, + 172269 - 131105: 0x96BF, + 172275 - 131105: 0x96C0, + 172280 - 131105: 0x8FB1, + 172286 - 131105: 0x96B7, + 172295 - 131105: 0x8C55, + 172323 - 131105: 0x9178, + 172339 - 131105: 0x89BE, + 172340 - 131105: 0x917C, + 172368 - 131105: 0xFB77, + 172434 - 131105: 0x9175, + 172435 - 131105: 0x91A3, + 172459 - 131105: 0x9176, + 172468 - 131105: 0x96BE, + 172469 - 131105: 0x8D49, + 172511 - 131105: 0x9179, + 172533 - 131105: 0x96B6, + 172576 - 131105: 0x91A4, + 172595 - 131105: 0x91A6, + 172691 - 131105: 0x9D75, + 172703 - 131105: 0x9052, + 172722 - 131105: 0xA045, + 172724 - 131105: 0x91A9, + 172726 - 131105: 0x98AA, + 172730 - 131105: 0x8C5F, + 172733 - 131105: 0x8BAA, + 172767 - 131105: 0x9CDD, + 172799 - 131105: 0x9D77, + 172881 - 131105: 0x8756, + 172969 - 131105: 0x8940, + 173108 - 131105: 0x9EEC, + 173147 - 131105: 0x93AA, + 173510 - 131105: 0x9478, + 173515 - 131105: 0x9D7A, + 173569 - 131105: 0x8AC9, + 173618 - 131105: 0x8B4B, + 173642 - 131105: 0x9FEC, + 173659 - 131105: 0x8AE2, + 173737 - 131105: 0x9E75, +} + +const encode1Low, encode1High = 11904, 40908 + +var encode1 = [...]uint16{ + 11904 - 11904: 0xC8D6, + 11908 - 11904: 0xC8D7, + 11910 - 11904: 0xC8D8, + 11911 - 11904: 0xC8D9, + 11912 - 11904: 0xC8DA, + 11914 - 11904: 0xC8DB, + 11916 - 11904: 0xC8DC, + 11917 - 11904: 0xC8DD, + 11925 - 11904: 0xC8DE, + 11932 - 11904: 0xC8DF, + 11933 - 11904: 0xC8E0, + 11941 - 11904: 0xC8E1, + 11943 - 11904: 0xC8E2, + 11946 - 11904: 0xC8E3, + 11948 - 11904: 0xC8E4, + 11950 - 11904: 0xC8E5, + 11958 - 11904: 0xC8E6, + 11964 - 11904: 0xC8E7, + 11966 - 11904: 0xC8E8, + 11974 - 11904: 0xC8E9, + 11978 - 11904: 0xC8EA, + 11980 - 11904: 0xC8EB, + 11981 - 11904: 0xC8EC, + 11983 - 11904: 0xC8ED, + 11990 - 11904: 0xC8EE, + 11991 - 11904: 0xC8EF, + 11998 - 11904: 0xC8F0, + 12003 - 11904: 0xC8F1, + 12083 - 11904: 0xC6CD, + 12288 - 11904: 0xA140, + 12289 - 11904: 0xA142, + 12290 - 11904: 0xA143, + 12291 - 11904: 0xC6DE, + 12293 - 11904: 0xC6E0, + 12294 - 11904: 0xC6E1, + 12295 - 11904: 0xC6E2, + 12296 - 11904: 0xA171, + 12297 - 11904: 0xA172, + 12298 - 11904: 0xA16D, + 12299 - 11904: 0xA16E, + 12300 - 11904: 0xA175, + 12301 - 11904: 0xA176, + 12302 - 11904: 0xA179, + 12303 - 11904: 0xA17A, + 12304 - 11904: 0xA169, + 12305 - 11904: 0xA16A, + 12306 - 11904: 0xA245, + 12308 - 11904: 0xA165, + 12309 - 11904: 0xA166, + 12317 - 11904: 0xA1A9, + 12318 - 11904: 0xA1AA, + 12321 - 11904: 0xA2C3, + 12322 - 11904: 0xA2C4, + 12323 - 11904: 0xA2C5, + 12324 - 11904: 0xA2C6, + 12325 - 11904: 0xA2C7, + 12326 - 11904: 0xA2C8, + 12327 - 11904: 0xA2C9, + 12328 - 11904: 0xA2CA, + 12329 - 11904: 0xA2CB, + 12353 - 11904: 0xC6E7, + 12354 - 11904: 0xC6E8, + 12355 - 11904: 0xC6E9, + 12356 - 11904: 0xC6EA, + 12357 - 11904: 0xC6EB, + 12358 - 11904: 0xC6EC, + 12359 - 11904: 0xC6ED, + 12360 - 11904: 0xC6EE, + 12361 - 11904: 0xC6EF, + 12362 - 11904: 0xC6F0, + 12363 - 11904: 0xC6F1, + 12364 - 11904: 0xC6F2, + 12365 - 11904: 0xC6F3, + 12366 - 11904: 0xC6F4, + 12367 - 11904: 0xC6F5, + 12368 - 11904: 0xC6F6, + 12369 - 11904: 0xC6F7, + 12370 - 11904: 0xC6F8, + 12371 - 11904: 0xC6F9, + 12372 - 11904: 0xC6FA, + 12373 - 11904: 0xC6FB, + 12374 - 11904: 0xC6FC, + 12375 - 11904: 0xC6FD, + 12376 - 11904: 0xC6FE, + 12377 - 11904: 0xC740, + 12378 - 11904: 0xC741, + 12379 - 11904: 0xC742, + 12380 - 11904: 0xC743, + 12381 - 11904: 0xC744, + 12382 - 11904: 0xC745, + 12383 - 11904: 0xC746, + 12384 - 11904: 0xC747, + 12385 - 11904: 0xC748, + 12386 - 11904: 0xC749, + 12387 - 11904: 0xC74A, + 12388 - 11904: 0xC74B, + 12389 - 11904: 0xC74C, + 12390 - 11904: 0xC74D, + 12391 - 11904: 0xC74E, + 12392 - 11904: 0xC74F, + 12393 - 11904: 0xC750, + 12394 - 11904: 0xC751, + 12395 - 11904: 0xC752, + 12396 - 11904: 0xC753, + 12397 - 11904: 0xC754, + 12398 - 11904: 0xC755, + 12399 - 11904: 0xC756, + 12400 - 11904: 0xC757, + 12401 - 11904: 0xC758, + 12402 - 11904: 0xC759, + 12403 - 11904: 0xC75A, + 12404 - 11904: 0xC75B, + 12405 - 11904: 0xC75C, + 12406 - 11904: 0xC75D, + 12407 - 11904: 0xC75E, + 12408 - 11904: 0xC75F, + 12409 - 11904: 0xC760, + 12410 - 11904: 0xC761, + 12411 - 11904: 0xC762, + 12412 - 11904: 0xC763, + 12413 - 11904: 0xC764, + 12414 - 11904: 0xC765, + 12415 - 11904: 0xC766, + 12416 - 11904: 0xC767, + 12417 - 11904: 0xC768, + 12418 - 11904: 0xC769, + 12419 - 11904: 0xC76A, + 12420 - 11904: 0xC76B, + 12421 - 11904: 0xC76C, + 12422 - 11904: 0xC76D, + 12423 - 11904: 0xC76E, + 12424 - 11904: 0xC76F, + 12425 - 11904: 0xC770, + 12426 - 11904: 0xC771, + 12427 - 11904: 0xC772, + 12428 - 11904: 0xC773, + 12429 - 11904: 0xC774, + 12430 - 11904: 0xC775, + 12431 - 11904: 0xC776, + 12432 - 11904: 0xC777, + 12433 - 11904: 0xC778, + 12434 - 11904: 0xC779, + 12435 - 11904: 0xC77A, + 12443 - 11904: 0xC8D4, + 12444 - 11904: 0xC8D5, + 12445 - 11904: 0xC6DC, + 12446 - 11904: 0xC6DD, + 12449 - 11904: 0xC77B, + 12450 - 11904: 0xC77C, + 12451 - 11904: 0xC77D, + 12452 - 11904: 0xC77E, + 12453 - 11904: 0xC7A1, + 12454 - 11904: 0xC7A2, + 12455 - 11904: 0xC7A3, + 12456 - 11904: 0xC7A4, + 12457 - 11904: 0xC7A5, + 12458 - 11904: 0xC7A6, + 12459 - 11904: 0xC7A7, + 12460 - 11904: 0xC7A8, + 12461 - 11904: 0xC7A9, + 12462 - 11904: 0xC7AA, + 12463 - 11904: 0xC7AB, + 12464 - 11904: 0xC7AC, + 12465 - 11904: 0xC7AD, + 12466 - 11904: 0xC7AE, + 12467 - 11904: 0xC7AF, + 12468 - 11904: 0xC7B0, + 12469 - 11904: 0xC7B1, + 12470 - 11904: 0xC7B2, + 12471 - 11904: 0xC7B3, + 12472 - 11904: 0xC7B4, + 12473 - 11904: 0xC7B5, + 12474 - 11904: 0xC7B6, + 12475 - 11904: 0xC7B7, + 12476 - 11904: 0xC7B8, + 12477 - 11904: 0xC7B9, + 12478 - 11904: 0xC7BA, + 12479 - 11904: 0xC7BB, + 12480 - 11904: 0xC7BC, + 12481 - 11904: 0xC7BD, + 12482 - 11904: 0xC7BE, + 12483 - 11904: 0xC7BF, + 12484 - 11904: 0xC7C0, + 12485 - 11904: 0xC7C1, + 12486 - 11904: 0xC7C2, + 12487 - 11904: 0xC7C3, + 12488 - 11904: 0xC7C4, + 12489 - 11904: 0xC7C5, + 12490 - 11904: 0xC7C6, + 12491 - 11904: 0xC7C7, + 12492 - 11904: 0xC7C8, + 12493 - 11904: 0xC7C9, + 12494 - 11904: 0xC7CA, + 12495 - 11904: 0xC7CB, + 12496 - 11904: 0xC7CC, + 12497 - 11904: 0xC7CD, + 12498 - 11904: 0xC7CE, + 12499 - 11904: 0xC7CF, + 12500 - 11904: 0xC7D0, + 12501 - 11904: 0xC7D1, + 12502 - 11904: 0xC7D2, + 12503 - 11904: 0xC7D3, + 12504 - 11904: 0xC7D4, + 12505 - 11904: 0xC7D5, + 12506 - 11904: 0xC7D6, + 12507 - 11904: 0xC7D7, + 12508 - 11904: 0xC7D8, + 12509 - 11904: 0xC7D9, + 12510 - 11904: 0xC7DA, + 12511 - 11904: 0xC7DB, + 12512 - 11904: 0xC7DC, + 12513 - 11904: 0xC7DD, + 12514 - 11904: 0xC7DE, + 12515 - 11904: 0xC7DF, + 12516 - 11904: 0xC7E0, + 12517 - 11904: 0xC7E1, + 12518 - 11904: 0xC7E2, + 12519 - 11904: 0xC7E3, + 12520 - 11904: 0xC7E4, + 12521 - 11904: 0xC7E5, + 12522 - 11904: 0xC7E6, + 12523 - 11904: 0xC7E7, + 12524 - 11904: 0xC7E8, + 12525 - 11904: 0xC7E9, + 12526 - 11904: 0xC7EA, + 12527 - 11904: 0xC7EB, + 12528 - 11904: 0xC7EC, + 12529 - 11904: 0xC7ED, + 12530 - 11904: 0xC7EE, + 12531 - 11904: 0xC7EF, + 12532 - 11904: 0xC7F0, + 12533 - 11904: 0xC7F1, + 12534 - 11904: 0xC7F2, + 12540 - 11904: 0xC6E3, + 12541 - 11904: 0xC6DA, + 12542 - 11904: 0xC6DB, + 12549 - 11904: 0xA374, + 12550 - 11904: 0xA375, + 12551 - 11904: 0xA376, + 12552 - 11904: 0xA377, + 12553 - 11904: 0xA378, + 12554 - 11904: 0xA379, + 12555 - 11904: 0xA37A, + 12556 - 11904: 0xA37B, + 12557 - 11904: 0xA37C, + 12558 - 11904: 0xA37D, + 12559 - 11904: 0xA37E, + 12560 - 11904: 0xA3A1, + 12561 - 11904: 0xA3A2, + 12562 - 11904: 0xA3A3, + 12563 - 11904: 0xA3A4, + 12564 - 11904: 0xA3A5, + 12565 - 11904: 0xA3A6, + 12566 - 11904: 0xA3A7, + 12567 - 11904: 0xA3A8, + 12568 - 11904: 0xA3A9, + 12569 - 11904: 0xA3AA, + 12570 - 11904: 0xA3AB, + 12571 - 11904: 0xA3AC, + 12572 - 11904: 0xA3AD, + 12573 - 11904: 0xA3AE, + 12574 - 11904: 0xA3AF, + 12575 - 11904: 0xA3B0, + 12576 - 11904: 0xA3B1, + 12577 - 11904: 0xA3B2, + 12578 - 11904: 0xA3B3, + 12579 - 11904: 0xA3B4, + 12580 - 11904: 0xA3B5, + 12581 - 11904: 0xA3B6, + 12582 - 11904: 0xA3B7, + 12583 - 11904: 0xA3B8, + 12584 - 11904: 0xA3B9, + 12585 - 11904: 0xA3BA, + 12736 - 11904: 0x8840, + 12737 - 11904: 0x8841, + 12738 - 11904: 0x8842, + 12739 - 11904: 0x8843, + 12740 - 11904: 0x8844, + 12741 - 11904: 0x8846, + 12742 - 11904: 0x8849, + 12743 - 11904: 0x884A, + 12744 - 11904: 0x884D, + 12745 - 11904: 0x884F, + 12746 - 11904: 0x8850, + 12747 - 11904: 0x8851, + 12748 - 11904: 0x8852, + 12749 - 11904: 0x8854, + 12750 - 11904: 0x8855, + 12751 - 11904: 0xC879, + 12849 - 11904: 0xC8D1, + 12963 - 11904: 0xA1C0, + 13198 - 11904: 0xA255, + 13199 - 11904: 0xA256, + 13212 - 11904: 0xA250, + 13213 - 11904: 0xA251, + 13214 - 11904: 0xA252, + 13217 - 11904: 0xA254, + 13252 - 11904: 0xA257, + 13262 - 11904: 0xA253, + 13265 - 11904: 0xA1EB, + 13266 - 11904: 0xA1EA, + 13269 - 11904: 0xA24F, + 13365 - 11904: 0x9277, + 13376 - 11904: 0x96DF, + 13386 - 11904: 0x8CF4, + 13388 - 11904: 0x89D5, + 13412 - 11904: 0x93CD, + 13427 - 11904: 0x9BDF, + 13434 - 11904: 0xFA68, + 13437 - 11904: 0x89DA, + 13438 - 11904: 0x8F59, + 13459 - 11904: 0x89DB, + 13462 - 11904: 0x8F5D, + 13477 - 11904: 0x89DC, + 13487 - 11904: 0x96F7, + 13500 - 11904: 0x8ADA, + 13505 - 11904: 0x8BDC, + 13512 - 11904: 0x97DB, + 13535 - 11904: 0x9E53, + 13540 - 11904: 0x9DAA, + 13542 - 11904: 0x87BE, + 13563 - 11904: 0x9BEA, + 13574 - 11904: 0x8A6E, + 13630 - 11904: 0x8BC8, + 13649 - 11904: 0x89E8, + 13651 - 11904: 0x89EA, + 13657 - 11904: 0x8C4B, + 13665 - 11904: 0xFB70, + 13677 - 11904: 0x89ED, + 13680 - 11904: 0x94DD, + 13682 - 11904: 0x89EE, + 13687 - 11904: 0x9EB4, + 13688 - 11904: 0x8AD3, + 13700 - 11904: 0x92DB, + 13719 - 11904: 0x94DB, + 13720 - 11904: 0x89F9, + 13729 - 11904: 0xFB7A, + 13733 - 11904: 0x89FB, + 13741 - 11904: 0x9EFC, + 13759 - 11904: 0x89FC, + 13761 - 11904: 0x89BF, + 13765 - 11904: 0x89FE, + 13767 - 11904: 0x89E6, + 13770 - 11904: 0x9D46, + 13774 - 11904: 0x9DEE, + 13778 - 11904: 0xA07E, + 13782 - 11904: 0xA068, + 13787 - 11904: 0x98E9, + 13789 - 11904: 0x8B68, + 13809 - 11904: 0x8DFD, + 13810 - 11904: 0x8BBE, + 13811 - 11904: 0x9FD9, + 13819 - 11904: 0x8AEB, + 13822 - 11904: 0x9FD7, + 13833 - 11904: 0x8B6A, + 13848 - 11904: 0x9C5C, + 13850 - 11904: 0x8BB1, + 13859 - 11904: 0xFB5E, + 13861 - 11904: 0x8770, + 13869 - 11904: 0x9DF3, + 13877 - 11904: 0xA0D0, + 13881 - 11904: 0xFC66, + 13886 - 11904: 0x92E9, + 13895 - 11904: 0x9AEC, + 13896 - 11904: 0x8FAB, + 13897 - 11904: 0xFA48, + 13902 - 11904: 0x8E45, + 13919 - 11904: 0x9C6F, + 13921 - 11904: 0x8D5C, + 13946 - 11904: 0x9EDE, + 13953 - 11904: 0x89EF, + 13978 - 11904: 0x96E9, + 13989 - 11904: 0x9EBB, + 13994 - 11904: 0x94DE, + 13996 - 11904: 0x9EB8, + 14000 - 11904: 0x97BA, + 14001 - 11904: 0xFB65, + 14005 - 11904: 0x95D6, + 14009 - 11904: 0x9CBB, + 14012 - 11904: 0x97DA, + 14017 - 11904: 0x8F45, + 14019 - 11904: 0xFB7D, + 14020 - 11904: 0x9158, + 14021 - 11904: 0xFE64, + 14023 - 11904: 0x9856, + 14024 - 11904: 0x9B4D, + 14035 - 11904: 0x935B, + 14036 - 11904: 0x95C7, + 14038 - 11904: 0x97E7, + 14045 - 11904: 0x9359, + 14049 - 11904: 0x91F5, + 14050 - 11904: 0x97B8, + 14053 - 11904: 0xFDA2, + 14054 - 11904: 0xFBB6, + 14069 - 11904: 0x92FA, + 14081 - 11904: 0x9357, + 14083 - 11904: 0x8BA6, + 14088 - 11904: 0xFBB9, + 14090 - 11904: 0x97B0, + 14093 - 11904: 0xFDC4, + 14108 - 11904: 0x9CA1, + 14114 - 11904: 0x91F2, + 14115 - 11904: 0x91F9, + 14117 - 11904: 0x8FF1, + 14124 - 11904: 0x9745, + 14125 - 11904: 0x9853, + 14128 - 11904: 0xFE78, + 14130 - 11904: 0xFBC1, + 14131 - 11904: 0x9251, + 14138 - 11904: 0x9DAD, + 14144 - 11904: 0xFD6C, + 14147 - 11904: 0xFA6B, + 14178 - 11904: 0x9BC2, + 14191 - 11904: 0x9A7B, + 14231 - 11904: 0x8B60, + 14240 - 11904: 0x934B, + 14265 - 11904: 0x9ABD, + 14270 - 11904: 0x91B7, + 14294 - 11904: 0x8D4B, + 14322 - 11904: 0x95B4, + 14328 - 11904: 0xFEC5, + 14331 - 11904: 0x9EF0, + 14351 - 11904: 0x8D64, + 14361 - 11904: 0x9269, + 14368 - 11904: 0x8D67, + 14381 - 11904: 0xFBEA, + 14390 - 11904: 0xFBEF, + 14392 - 11904: 0x8D68, + 14435 - 11904: 0x93EB, + 14453 - 11904: 0x877A, + 14496 - 11904: 0xFC42, + 14531 - 11904: 0x9166, + 14540 - 11904: 0xFACD, + 14545 - 11904: 0x93DD, + 14548 - 11904: 0x8D52, + 14586 - 11904: 0x8BCC, + 14600 - 11904: 0x8D6D, + 14612 - 11904: 0x8D6E, + 14631 - 11904: 0x96A8, + 14642 - 11904: 0xFCA6, + 14655 - 11904: 0x8D6F, + 14669 - 11904: 0x8D70, + 14691 - 11904: 0xFC64, + 14712 - 11904: 0x8CF3, + 14720 - 11904: 0x9060, + 14729 - 11904: 0x8D74, + 14730 - 11904: 0x97C3, + 14738 - 11904: 0x8AD0, + 14745 - 11904: 0x9274, + 14747 - 11904: 0x9BBE, + 14753 - 11904: 0x9CC8, + 14756 - 11904: 0x9CBA, + 14776 - 11904: 0x8D78, + 14812 - 11904: 0x9EB9, + 14818 - 11904: 0x955A, + 14821 - 11904: 0x91B4, + 14828 - 11904: 0x8A48, + 14840 - 11904: 0x8D7D, + 14843 - 11904: 0x8A7D, + 14846 - 11904: 0x8AC2, + 14849 - 11904: 0xFD4A, + 14851 - 11904: 0x8DA1, + 14854 - 11904: 0x8AD1, + 14871 - 11904: 0xFCB4, + 14872 - 11904: 0x8B47, + 14889 - 11904: 0x93A4, + 14890 - 11904: 0x9EDA, + 14900 - 11904: 0x8A51, + 14923 - 11904: 0x8DA6, + 14930 - 11904: 0x9EC5, + 14935 - 11904: 0xFCC4, + 14940 - 11904: 0xA078, + 14942 - 11904: 0x94B5, + 14950 - 11904: 0xFCC2, + 14951 - 11904: 0x8A6B, + 14999 - 11904: 0x8DAB, + 15019 - 11904: 0xFAE8, + 15037 - 11904: 0x8DAD, + 15070 - 11904: 0xFC49, + 15072 - 11904: 0x93C1, + 15088 - 11904: 0x906F, + 15090 - 11904: 0x8DB0, + 15093 - 11904: 0x87A2, + 15099 - 11904: 0x947E, + 15118 - 11904: 0x90FA, + 15129 - 11904: 0x9479, + 15138 - 11904: 0x8DB2, + 15147 - 11904: 0xFCEE, + 15161 - 11904: 0x997B, + 15170 - 11904: 0x8DB4, + 15192 - 11904: 0x8DB7, + 15200 - 11904: 0x91B3, + 15217 - 11904: 0x8DBB, + 15218 - 11904: 0x8DBA, + 15227 - 11904: 0x8DBC, + 15228 - 11904: 0x9044, + 15232 - 11904: 0xFD4C, + 15253 - 11904: 0x874B, + 15254 - 11904: 0x93E4, + 15257 - 11904: 0x93E0, + 15265 - 11904: 0xFD53, + 15292 - 11904: 0x8DC3, + 15294 - 11904: 0x9BB8, + 15298 - 11904: 0xFBF0, + 15300 - 11904: 0x93E9, + 15319 - 11904: 0x93F6, + 15325 - 11904: 0x8DC5, + 15340 - 11904: 0x8DCA, + 15346 - 11904: 0x8DCC, + 15347 - 11904: 0xFD5D, + 15348 - 11904: 0x93B5, + 15373 - 11904: 0xFD61, + 15377 - 11904: 0x9CF8, + 15381 - 11904: 0x9252, + 15384 - 11904: 0xA0E8, + 15444 - 11904: 0x9CA5, + 15499 - 11904: 0x8C56, + 15563 - 11904: 0x8DD6, + 15565 - 11904: 0x97C0, + 15569 - 11904: 0xA0DE, + 15574 - 11904: 0x97D2, + 15580 - 11904: 0xFAA5, + 15595 - 11904: 0xFDA3, + 15599 - 11904: 0x8DDB, + 15634 - 11904: 0x8CEA, + 15635 - 11904: 0x8EAF, + 15645 - 11904: 0x91B5, + 15666 - 11904: 0xFD49, + 15675 - 11904: 0xFDD1, + 15686 - 11904: 0x8DEB, + 15692 - 11904: 0x97C6, + 15694 - 11904: 0xFDCE, + 15697 - 11904: 0x90FC, + 15711 - 11904: 0xFC59, + 15714 - 11904: 0x96D6, + 15721 - 11904: 0x97C5, + 15722 - 11904: 0x8DEF, + 15727 - 11904: 0x97D7, + 15733 - 11904: 0x8DF0, + 15741 - 11904: 0x96A6, + 15749 - 11904: 0xFBBF, + 15752 - 11904: 0x8CDF, + 15754 - 11904: 0x8DF3, + 15759 - 11904: 0x9449, + 15761 - 11904: 0x8DF5, + 15781 - 11904: 0x9872, + 15789 - 11904: 0x8E6B, + 15796 - 11904: 0xFAFD, + 15807 - 11904: 0x8F50, + 15814 - 11904: 0x9DCC, + 15815 - 11904: 0xFC65, + 15817 - 11904: 0x8C44, + 15820 - 11904: 0x996E, + 15821 - 11904: 0x94A1, + 15827 - 11904: 0x8F63, + 15835 - 11904: 0xA0DA, + 15847 - 11904: 0x9253, + 15848 - 11904: 0xFDE9, + 15851 - 11904: 0x9DB5, + 15859 - 11904: 0x9879, + 15860 - 11904: 0x876A, + 15863 - 11904: 0x9D5D, + 15868 - 11904: 0x8D63, + 15869 - 11904: 0x9669, + 15878 - 11904: 0x9F70, + 15936 - 11904: 0xFC6A, + 15939 - 11904: 0x8AC7, + 15944 - 11904: 0x89D7, + 15957 - 11904: 0xFE4D, + 15988 - 11904: 0x9EDD, + 16040 - 11904: 0xFEFB, + 16041 - 11904: 0x98BC, + 16042 - 11904: 0xFACC, + 16045 - 11904: 0x95B0, + 16049 - 11904: 0x9464, + 16056 - 11904: 0x936F, + 16063 - 11904: 0x94B9, + 16066 - 11904: 0x95EC, + 16071 - 11904: 0x91EE, + 16074 - 11904: 0x98C3, + 16076 - 11904: 0x95F6, + 16080 - 11904: 0x8FFD, + 16081 - 11904: 0x98C5, + 16086 - 11904: 0x9766, + 16087 - 11904: 0xFE6E, + 16090 - 11904: 0x97DD, + 16091 - 11904: 0x8CAA, + 16094 - 11904: 0x92D2, + 16097 - 11904: 0x9761, + 16098 - 11904: 0x98CB, + 16103 - 11904: 0x95F0, + 16105 - 11904: 0x975D, + 16107 - 11904: 0x91E3, + 16108 - 11904: 0x877E, + 16112 - 11904: 0x98CC, + 16115 - 11904: 0x9469, + 16116 - 11904: 0x98CD, + 16122 - 11904: 0x98CE, + 16124 - 11904: 0x95FC, + 16127 - 11904: 0x94A3, + 16128 - 11904: 0x9662, + 16132 - 11904: 0xFEB6, + 16134 - 11904: 0x9463, + 16135 - 11904: 0x8D47, + 16142 - 11904: 0x98D0, + 16211 - 11904: 0x98D1, + 16216 - 11904: 0x9475, + 16217 - 11904: 0xFAE0, + 16227 - 11904: 0x9472, + 16252 - 11904: 0x98D6, + 16275 - 11904: 0x8AF0, + 16320 - 11904: 0x98D9, + 16328 - 11904: 0x8D5A, + 16343 - 11904: 0x98DB, + 16348 - 11904: 0x98DD, + 16357 - 11904: 0x98A8, + 16365 - 11904: 0x8A6D, + 16377 - 11904: 0x8AFB, + 16378 - 11904: 0x8AAE, + 16388 - 11904: 0xFBC9, + 16393 - 11904: 0x8C5D, + 16413 - 11904: 0x98E4, + 16441 - 11904: 0x98E6, + 16453 - 11904: 0x98E8, + 16467 - 11904: 0x8A4D, + 16471 - 11904: 0x9257, + 16482 - 11904: 0x95DF, + 16485 - 11904: 0xA0AC, + 16490 - 11904: 0x98EB, + 16495 - 11904: 0x98EC, + 16497 - 11904: 0x8CC3, + 16552 - 11904: 0x98F4, + 16564 - 11904: 0x87D9, + 16571 - 11904: 0x8AB8, + 16575 - 11904: 0x9EE7, + 16584 - 11904: 0x94BC, + 16600 - 11904: 0xFCD1, + 16607 - 11904: 0x9CC6, + 16632 - 11904: 0x8D4A, + 16634 - 11904: 0x9E7E, + 16642 - 11904: 0x8D44, + 16643 - 11904: 0x98FE, + 16644 - 11904: 0xFDE8, + 16649 - 11904: 0x9940, + 16654 - 11904: 0x94C9, + 16689 - 11904: 0x87C6, + 16690 - 11904: 0x94D3, + 16743 - 11904: 0x9946, + 16748 - 11904: 0x90C0, + 16750 - 11904: 0x94D1, + 16764 - 11904: 0x8D4E, + 16767 - 11904: 0x9573, + 16769 - 11904: 0x87CE, + 16784 - 11904: 0x93C2, + 16818 - 11904: 0x9948, + 16836 - 11904: 0x994B, + 16842 - 11904: 0x8E55, + 16847 - 11904: 0x994E, + 16859 - 11904: 0x8EFE, + 16877 - 11904: 0x8D5F, + 16879 - 11904: 0x8E59, + 16889 - 11904: 0x94EC, + 16913 - 11904: 0x94EF, + 16931 - 11904: 0x8C60, + 16960 - 11904: 0x8F74, + 16992 - 11904: 0x9955, + 17002 - 11904: 0x9544, + 17014 - 11904: 0x8CCB, + 17018 - 11904: 0x9956, + 17036 - 11904: 0x9959, + 17044 - 11904: 0x995B, + 17058 - 11904: 0x8CC4, + 17077 - 11904: 0xFA45, + 17081 - 11904: 0x90B7, + 17084 - 11904: 0x9743, + 17140 - 11904: 0x95CD, + 17147 - 11904: 0x97C9, + 17148 - 11904: 0xFD50, + 17162 - 11904: 0x87AA, + 17195 - 11904: 0x8EB9, + 17262 - 11904: 0x95C6, + 17303 - 11904: 0x9967, + 17306 - 11904: 0x8CE3, + 17338 - 11904: 0x8AB9, + 17345 - 11904: 0x8DFC, + 17369 - 11904: 0x8A76, + 17375 - 11904: 0x9D51, + 17389 - 11904: 0x9973, + 17392 - 11904: 0x8740, + 17394 - 11904: 0x9D4F, + 17409 - 11904: 0x997A, + 17410 - 11904: 0x9564, + 17427 - 11904: 0x99A1, + 17445 - 11904: 0x99A5, + 17453 - 11904: 0x99A7, + 17530 - 11904: 0x8EED, + 17551 - 11904: 0x99AD, + 17553 - 11904: 0xC87E, + 17567 - 11904: 0x946E, + 17568 - 11904: 0x8F70, + 17570 - 11904: 0xFAD0, + 17584 - 11904: 0x99B3, + 17591 - 11904: 0xA053, + 17597 - 11904: 0x8D5E, + 17600 - 11904: 0x965C, + 17603 - 11904: 0x8CE0, + 17605 - 11904: 0xFD7A, + 17614 - 11904: 0x97FE, + 17629 - 11904: 0x92BD, + 17630 - 11904: 0x8D5D, + 17631 - 11904: 0x97FD, + 17633 - 11904: 0x87DB, + 17636 - 11904: 0x8F64, + 17641 - 11904: 0xFCF7, + 17642 - 11904: 0x9562, + 17643 - 11904: 0x97CD, + 17644 - 11904: 0x9E64, + 17652 - 11904: 0x924C, + 17667 - 11904: 0x8EC9, + 17668 - 11904: 0x99BC, + 17673 - 11904: 0x9DA5, + 17675 - 11904: 0x8F54, + 17686 - 11904: 0x8F7C, + 17691 - 11904: 0x8D55, + 17693 - 11904: 0x8EA2, + 17703 - 11904: 0x8F7A, + 17710 - 11904: 0x97AE, + 17715 - 11904: 0x96C8, + 17718 - 11904: 0x8CE4, + 17723 - 11904: 0x99C3, + 17725 - 11904: 0x90D6, + 17727 - 11904: 0x9CBE, + 17731 - 11904: 0x8F76, + 17745 - 11904: 0x9470, + 17746 - 11904: 0xFB4B, + 17749 - 11904: 0xFDCA, + 17752 - 11904: 0x8CEF, + 17756 - 11904: 0x8EC7, + 17761 - 11904: 0x8D54, + 17762 - 11904: 0xA0F9, + 17770 - 11904: 0x8FA9, + 17773 - 11904: 0x8D51, + 17783 - 11904: 0x99C7, + 17784 - 11904: 0x8744, + 17797 - 11904: 0x90D7, + 17830 - 11904: 0x8743, + 17843 - 11904: 0x8747, + 17882 - 11904: 0x8758, + 17897 - 11904: 0x9EDF, + 17898 - 11904: 0x8D59, + 17923 - 11904: 0x8742, + 17926 - 11904: 0x99CE, + 17935 - 11904: 0x8FBA, + 17941 - 11904: 0x8FEB, + 17943 - 11904: 0x99CF, + 18011 - 11904: 0x8FC2, + 18042 - 11904: 0x92C9, + 18048 - 11904: 0x97DC, + 18081 - 11904: 0x875D, + 18094 - 11904: 0x87CC, + 18107 - 11904: 0x8D45, + 18127 - 11904: 0x95B3, + 18128 - 11904: 0x9C79, + 18165 - 11904: 0x95B2, + 18167 - 11904: 0x8D4C, + 18195 - 11904: 0x8FDB, + 18200 - 11904: 0x9BE3, + 18230 - 11904: 0x874C, + 18244 - 11904: 0x874D, + 18254 - 11904: 0x9E7A, + 18255 - 11904: 0x8757, + 18300 - 11904: 0x9BEE, + 18328 - 11904: 0x99DE, + 18342 - 11904: 0xFAFA, + 18389 - 11904: 0x8A52, + 18413 - 11904: 0x99E1, + 18420 - 11904: 0x8A67, + 18432 - 11904: 0x8BB5, + 18443 - 11904: 0x8AAC, + 18487 - 11904: 0x99E9, + 18525 - 11904: 0xFBCA, + 18545 - 11904: 0x97DE, + 18587 - 11904: 0x95D1, + 18605 - 11904: 0x99F5, + 18606 - 11904: 0xFC4A, + 18640 - 11904: 0x9BA9, + 18653 - 11904: 0xFBDC, + 18669 - 11904: 0xFE56, + 18675 - 11904: 0x9EA4, + 18682 - 11904: 0x9D49, + 18694 - 11904: 0x95DB, + 18705 - 11904: 0x89C5, + 18718 - 11904: 0x99F8, + 18725 - 11904: 0x9664, + 18730 - 11904: 0x9055, + 18733 - 11904: 0x96D4, + 18735 - 11904: 0x87C4, + 18736 - 11904: 0x87AE, + 18741 - 11904: 0x977C, + 18748 - 11904: 0x964D, + 18750 - 11904: 0x97E1, + 18757 - 11904: 0x9A48, + 18769 - 11904: 0x9A49, + 18771 - 11904: 0xFE7D, + 18789 - 11904: 0x90AA, + 18794 - 11904: 0x9A50, + 18802 - 11904: 0x9347, + 18825 - 11904: 0x8ED8, + 18849 - 11904: 0x90C9, + 18855 - 11904: 0x9A55, + 18911 - 11904: 0x90BC, + 18917 - 11904: 0x9A58, + 18919 - 11904: 0x8BB8, + 18959 - 11904: 0x90D5, + 18973 - 11904: 0x9641, + 18980 - 11904: 0x9A5A, + 18997 - 11904: 0x9A5C, + 19094 - 11904: 0x97C2, + 19108 - 11904: 0x875C, + 19124 - 11904: 0x8ABB, + 19128 - 11904: 0x9BAA, + 19153 - 11904: 0x90F5, + 19172 - 11904: 0x9A60, + 19199 - 11904: 0x9145, + 19216 - 11904: 0x8C58, + 19225 - 11904: 0x9A63, + 19232 - 11904: 0x8C49, + 19244 - 11904: 0x8BB6, + 19255 - 11904: 0xFCCF, + 19311 - 11904: 0x966B, + 19312 - 11904: 0x9A6E, + 19314 - 11904: 0x914F, + 19323 - 11904: 0x9746, + 19326 - 11904: 0xA0E6, + 19342 - 11904: 0x92D7, + 19344 - 11904: 0x9675, + 19347 - 11904: 0x93D4, + 19350 - 11904: 0x91BB, + 19351 - 11904: 0x9679, + 19357 - 11904: 0x9A70, + 19389 - 11904: 0x9678, + 19390 - 11904: 0x91CD, + 19392 - 11904: 0x9C4A, + 19460 - 11904: 0xA06F, + 19463 - 11904: 0xA06A, + 19470 - 11904: 0x915F, + 19506 - 11904: 0x8741, + 19515 - 11904: 0x9FA5, + 19518 - 11904: 0x89BA, + 19520 - 11904: 0x874F, + 19527 - 11904: 0x874E, + 19543 - 11904: 0x8755, + 19547 - 11904: 0x9ECD, + 19565 - 11904: 0x9A79, + 19575 - 11904: 0x8CF2, + 19579 - 11904: 0x8D57, + 19581 - 11904: 0x9DCE, + 19585 - 11904: 0x8CD2, + 19589 - 11904: 0x8759, + 19620 - 11904: 0x9D73, + 19630 - 11904: 0x96B9, + 19632 - 11904: 0x96BC, + 19639 - 11904: 0x9CD1, + 19661 - 11904: 0x89B7, + 19681 - 11904: 0x9EEE, + 19682 - 11904: 0x8749, + 19693 - 11904: 0xFB43, + 19719 - 11904: 0x875B, + 19721 - 11904: 0x9EC9, + 19728 - 11904: 0xFBD3, + 19764 - 11904: 0x91AE, + 19830 - 11904: 0x8D58, + 19831 - 11904: 0x8746, + 19849 - 11904: 0x8D56, + 19857 - 11904: 0x9D78, + 19868 - 11904: 0x9D7B, + 19968 - 11904: 0xA440, + 19969 - 11904: 0xA442, + 19971 - 11904: 0xA443, + 19972 - 11904: 0x9EB3, + 19975 - 11904: 0xC945, + 19976 - 11904: 0xA456, + 19977 - 11904: 0xA454, + 19978 - 11904: 0xA457, + 19979 - 11904: 0xA455, + 19980 - 11904: 0xC946, + 19981 - 11904: 0xA4A3, + 19982 - 11904: 0xC94F, + 19983 - 11904: 0xC94D, + 19984 - 11904: 0xA4A2, + 19985 - 11904: 0xA4A1, + 19988 - 11904: 0xA542, + 19989 - 11904: 0xA541, + 19990 - 11904: 0xA540, + 19992 - 11904: 0xA543, + 19993 - 11904: 0xA4FE, + 19994 - 11904: 0x9EB2, + 19996 - 11904: 0x9DD6, + 19998 - 11904: 0xA5E0, + 19999 - 11904: 0xA5E1, + 20001 - 11904: 0x994F, + 20004 - 11904: 0x89CE, + 20006 - 11904: 0xA8C3, + 20008 - 11904: 0x8BC0, + 20010 - 11904: 0x9FC4, + 20011 - 11904: 0xA458, + 20012 - 11904: 0x8BD4, + 20013 - 11904: 0xA4A4, + 20014 - 11904: 0xC950, + 20015 - 11904: 0x8C72, + 20016 - 11904: 0xA4A5, + 20017 - 11904: 0xC963, + 20018 - 11904: 0xA6EA, + 20019 - 11904: 0xCBB1, + 20022 - 11904: 0xC6BF, + 20023 - 11904: 0x8BF9, + 20024 - 11904: 0xA459, + 20025 - 11904: 0xA4A6, + 20027 - 11904: 0xA544, + 20028 - 11904: 0xC964, + 20029 - 11904: 0x8946, + 20031 - 11904: 0xC6C0, + 20034 - 11904: 0xC940, + 20035 - 11904: 0xA444, + 20037 - 11904: 0xA45B, + 20039 - 11904: 0xC947, + 20040 - 11904: 0xA45C, + 20041 - 11904: 0xFAE5, + 20043 - 11904: 0xA4A7, + 20045 - 11904: 0xA545, + 20046 - 11904: 0xA547, + 20047 - 11904: 0xA546, + 20050 - 11904: 0xA5E2, + 20051 - 11904: 0xA5E3, + 20054 - 11904: 0xA8C4, + 20056 - 11904: 0xADBC, + 20057 - 11904: 0xA441, + 20058 - 11904: 0xC87B, + 20059 - 11904: 0x8BC6, + 20060 - 11904: 0xC941, + 20061 - 11904: 0xA445, + 20062 - 11904: 0xA45E, + 20063 - 11904: 0xA45D, + 20073 - 11904: 0xA5E4, + 20074 - 11904: 0x9C57, + 20083 - 11904: 0xA8C5, + 20088 - 11904: 0x9AFB, + 20094 - 11904: 0xB0AE, + 20095 - 11904: 0xD44B, + 20096 - 11904: 0x89D0, + 20097 - 11904: 0x89CF, + 20098 - 11904: 0xB6C3, + 20099 - 11904: 0xDCB1, + 20100 - 11904: 0xDCB2, + 20101 - 11904: 0xC6C1, + 20102 - 11904: 0xA446, + 20103 - 11904: 0x89D1, + 20104 - 11904: 0xA4A9, + 20105 - 11904: 0x89E2, + 20107 - 11904: 0xA8C6, + 20108 - 11904: 0xA447, + 20109 - 11904: 0xC948, + 20110 - 11904: 0xA45F, + 20113 - 11904: 0xA4AA, + 20114 - 11904: 0xA4AC, + 20115 - 11904: 0xC951, + 20116 - 11904: 0xA4AD, + 20117 - 11904: 0xA4AB, + 20120 - 11904: 0x927E, + 20121 - 11904: 0xA5E5, + 20122 - 11904: 0x9DBA, + 20123 - 11904: 0xA8C7, + 20126 - 11904: 0xA8C8, + 20127 - 11904: 0xAB45, + 20128 - 11904: 0xC6C2, + 20129 - 11904: 0xA460, + 20130 - 11904: 0xA4AE, + 20131 - 11904: 0x8C6F, + 20132 - 11904: 0xA5E6, + 20133 - 11904: 0xA5E8, + 20134 - 11904: 0xA5E7, + 20136 - 11904: 0xA6EB, + 20139 - 11904: 0xA8C9, + 20140 - 11904: 0xA8CA, + 20141 - 11904: 0xAB46, + 20142 - 11904: 0xAB47, + 20147 - 11904: 0xADBD, + 20150 - 11904: 0xDCB3, + 20151 - 11904: 0xFBF8, + 20153 - 11904: 0xF6D6, + 20154 - 11904: 0xA448, + 20155 - 11904: 0x8BC7, + 20156 - 11904: 0x926B, + 20159 - 11904: 0x89D2, + 20160 - 11904: 0xA4B0, + 20161 - 11904: 0xA4AF, + 20162 - 11904: 0xC952, + 20163 - 11904: 0xA4B1, + 20164 - 11904: 0xA4B7, + 20166 - 11904: 0xA4B2, + 20167 - 11904: 0xA4B3, + 20168 - 11904: 0xC954, + 20169 - 11904: 0xC953, + 20170 - 11904: 0xA4B5, + 20171 - 11904: 0xA4B6, + 20173 - 11904: 0xA4B4, + 20174 - 11904: 0x9FCF, + 20180 - 11904: 0xA54A, + 20181 - 11904: 0xA54B, + 20182 - 11904: 0xA54C, + 20183 - 11904: 0xA54D, + 20184 - 11904: 0xA549, + 20185 - 11904: 0xA550, + 20186 - 11904: 0xC96A, + 20188 - 11904: 0xC966, + 20189 - 11904: 0xC969, + 20190 - 11904: 0xA551, + 20191 - 11904: 0xA561, + 20193 - 11904: 0xC968, + 20195 - 11904: 0xA54E, + 20196 - 11904: 0xA54F, + 20197 - 11904: 0xA548, + 20200 - 11904: 0xC965, + 20201 - 11904: 0xC967, + 20202 - 11904: 0x9DA9, + 20203 - 11904: 0x89D3, + 20206 - 11904: 0x99E2, + 20208 - 11904: 0xA5F5, + 20209 - 11904: 0xC9B0, + 20210 - 11904: 0xA5F2, + 20211 - 11904: 0xA5F6, + 20212 - 11904: 0xC9BA, + 20213 - 11904: 0xC9AE, + 20214 - 11904: 0xA5F3, + 20215 - 11904: 0xC9B2, + 20216 - 11904: 0x9267, + 20219 - 11904: 0xA5F4, + 20221 - 11904: 0xA5F7, + 20223 - 11904: 0xA5E9, + 20224 - 11904: 0xC9B1, + 20225 - 11904: 0xA5F8, + 20226 - 11904: 0xC9B5, + 20227 - 11904: 0x92A4, + 20228 - 11904: 0xC9B9, + 20229 - 11904: 0xC9B6, + 20232 - 11904: 0xC9B3, + 20233 - 11904: 0xA5EA, + 20234 - 11904: 0xA5EC, + 20235 - 11904: 0xA5F9, + 20237 - 11904: 0xA5EE, + 20238 - 11904: 0xC9AB, + 20239 - 11904: 0xA5F1, + 20240 - 11904: 0xA5EF, + 20241 - 11904: 0xA5F0, + 20242 - 11904: 0xC9BB, + 20243 - 11904: 0xC9B8, + 20244 - 11904: 0xC9AF, + 20245 - 11904: 0xA5ED, + 20247 - 11904: 0x8C73, + 20248 - 11904: 0xC9AC, + 20249 - 11904: 0xA5EB, + 20250 - 11904: 0x894E, + 20253 - 11904: 0xC9B4, + 20258 - 11904: 0xC9B7, + 20264 - 11904: 0x894F, + 20265 - 11904: 0x9278, + 20268 - 11904: 0xC9AD, + 20269 - 11904: 0xCA66, + 20271 - 11904: 0xA742, + 20272 - 11904: 0xA6F4, + 20274 - 11904: 0x91B6, + 20275 - 11904: 0xCA67, + 20276 - 11904: 0xA6F1, + 20278 - 11904: 0xA744, + 20279 - 11904: 0x89D4, + 20280 - 11904: 0xA6F9, + 20281 - 11904: 0x9FD2, + 20282 - 11904: 0xA6F8, + 20283 - 11904: 0xCA5B, + 20284 - 11904: 0xA6FC, + 20285 - 11904: 0xA6F7, + 20286 - 11904: 0xCA60, + 20287 - 11904: 0xCA68, + 20289 - 11904: 0xCA64, + 20290 - 11904: 0x92A7, + 20291 - 11904: 0xA6FA, + 20293 - 11904: 0x95A2, + 20294 - 11904: 0xA6FD, + 20295 - 11904: 0xA6EE, + 20296 - 11904: 0xA747, + 20297 - 11904: 0xCA5D, + 20299 - 11904: 0x926E, + 20300 - 11904: 0xCBBD, + 20301 - 11904: 0xA6EC, + 20302 - 11904: 0xA743, + 20303 - 11904: 0xA6ED, + 20304 - 11904: 0xA6F5, + 20305 - 11904: 0xA6F6, + 20306 - 11904: 0xCA62, + 20307 - 11904: 0xCA5E, + 20308 - 11904: 0xA6FB, + 20309 - 11904: 0xA6F3, + 20310 - 11904: 0xCA5A, + 20311 - 11904: 0xA6EF, + 20312 - 11904: 0xCA65, + 20313 - 11904: 0xA745, + 20314 - 11904: 0xA748, + 20315 - 11904: 0xA6F2, + 20316 - 11904: 0xA740, + 20317 - 11904: 0xA746, + 20318 - 11904: 0xA6F0, + 20319 - 11904: 0xCA63, + 20320 - 11904: 0xA741, + 20321 - 11904: 0xCA69, + 20322 - 11904: 0xCA5C, + 20323 - 11904: 0xA6FE, + 20324 - 11904: 0xCA5F, + 20327 - 11904: 0xCA61, + 20329 - 11904: 0xA8D8, + 20330 - 11904: 0xCBBF, + 20331 - 11904: 0xCBCB, + 20332 - 11904: 0xA8D0, + 20334 - 11904: 0xCBCC, + 20335 - 11904: 0xA8CB, + 20336 - 11904: 0xA8D5, + 20338 - 11904: 0x96EA, + 20339 - 11904: 0xA8CE, + 20340 - 11904: 0xCBB9, + 20341 - 11904: 0xA8D6, + 20342 - 11904: 0xCBB8, + 20343 - 11904: 0xCBBC, + 20344 - 11904: 0xCBC3, + 20345 - 11904: 0xCBC1, + 20346 - 11904: 0xA8DE, + 20347 - 11904: 0xA8D9, + 20348 - 11904: 0xCBB3, + 20349 - 11904: 0xCBB5, + 20350 - 11904: 0xA8DB, + 20351 - 11904: 0xA8CF, + 20352 - 11904: 0xCBB6, + 20353 - 11904: 0xCBC2, + 20354 - 11904: 0xCBC9, + 20355 - 11904: 0xA8D4, + 20356 - 11904: 0xCBBB, + 20357 - 11904: 0xCBB4, + 20358 - 11904: 0xA8D3, + 20359 - 11904: 0xCBB7, + 20360 - 11904: 0xA8D7, + 20361 - 11904: 0xCBBA, + 20362 - 11904: 0x926F, + 20363 - 11904: 0xA8D2, + 20365 - 11904: 0xA8CD, + 20367 - 11904: 0xA8DC, + 20368 - 11904: 0xCBC4, + 20369 - 11904: 0xA8DD, + 20370 - 11904: 0xCBC8, + 20372 - 11904: 0xCBC6, + 20373 - 11904: 0xCBCA, + 20374 - 11904: 0xA8DA, + 20375 - 11904: 0xCBBE, + 20376 - 11904: 0xCBB2, + 20378 - 11904: 0xCBC0, + 20379 - 11904: 0xA8D1, + 20380 - 11904: 0xCBC5, + 20381 - 11904: 0xA8CC, + 20382 - 11904: 0xCBC7, + 20386 - 11904: 0x92A3, + 20392 - 11904: 0x8950, + 20395 - 11904: 0xFA57, + 20398 - 11904: 0xAB56, + 20399 - 11904: 0xAB4A, + 20400 - 11904: 0x9866, + 20402 - 11904: 0xCDE0, + 20403 - 11904: 0xCDE8, + 20404 - 11904: 0x8CF8, + 20405 - 11904: 0xAB49, + 20406 - 11904: 0xAB51, + 20407 - 11904: 0xAB5D, + 20409 - 11904: 0xCDEE, + 20410 - 11904: 0xCDEC, + 20411 - 11904: 0xCDE7, + 20413 - 11904: 0x89D6, + 20415 - 11904: 0xAB4B, + 20416 - 11904: 0xCDED, + 20417 - 11904: 0xCDE3, + 20418 - 11904: 0xAB59, + 20419 - 11904: 0xAB50, + 20420 - 11904: 0xAB58, + 20421 - 11904: 0xCDDE, + 20423 - 11904: 0xCDEA, + 20424 - 11904: 0x98B2, + 20425 - 11904: 0xCDE1, + 20426 - 11904: 0xAB54, + 20427 - 11904: 0xCDE2, + 20428 - 11904: 0x92AB, + 20429 - 11904: 0xCDDD, + 20430 - 11904: 0xAB5B, + 20431 - 11904: 0xAB4E, + 20432 - 11904: 0xAB57, + 20433 - 11904: 0xAB4D, + 20435 - 11904: 0xCDDF, + 20436 - 11904: 0xCDE4, + 20438 - 11904: 0xCDEB, + 20439 - 11904: 0xAB55, + 20440 - 11904: 0xAB52, + 20441 - 11904: 0xCDE6, + 20442 - 11904: 0xAB5A, + 20443 - 11904: 0xCDE9, + 20444 - 11904: 0xCDE5, + 20445 - 11904: 0xAB4F, + 20446 - 11904: 0xAB5C, + 20447 - 11904: 0xAB53, + 20448 - 11904: 0xAB4C, + 20449 - 11904: 0xAB48, + 20452 - 11904: 0x96DE, + 20453 - 11904: 0x92AC, + 20460 - 11904: 0xCDEF, + 20462 - 11904: 0xADD7, + 20463 - 11904: 0xADC1, + 20464 - 11904: 0x8C70, + 20465 - 11904: 0xADD1, + 20466 - 11904: 0x9F6E, + 20467 - 11904: 0xADD6, + 20468 - 11904: 0xD0D0, + 20469 - 11904: 0xD0CF, + 20470 - 11904: 0xD0D4, + 20471 - 11904: 0xD0D5, + 20472 - 11904: 0xADC4, + 20473 - 11904: 0x8EF2, + 20474 - 11904: 0xADCD, + 20477 - 11904: 0x9F6C, + 20478 - 11904: 0xADDA, + 20480 - 11904: 0xADCE, + 20483 - 11904: 0x89D8, + 20485 - 11904: 0xD0C9, + 20486 - 11904: 0xADC7, + 20487 - 11904: 0xD0CA, + 20488 - 11904: 0xFA59, + 20489 - 11904: 0xADDC, + 20491 - 11904: 0xADD3, + 20492 - 11904: 0xADBE, + 20493 - 11904: 0xADBF, + 20494 - 11904: 0xD0DD, + 20495 - 11904: 0xB0BF, + 20497 - 11904: 0xADCC, + 20498 - 11904: 0xADCB, + 20499 - 11904: 0xD0CB, + 20500 - 11904: 0xADCF, + 20501 - 11904: 0xD45B, + 20502 - 11904: 0xADC6, + 20503 - 11904: 0xD0D6, + 20504 - 11904: 0xADD5, + 20505 - 11904: 0xADD4, + 20506 - 11904: 0xADCA, + 20507 - 11904: 0xD0CE, + 20508 - 11904: 0xD0D7, + 20510 - 11904: 0xD0C8, + 20511 - 11904: 0xADC9, + 20512 - 11904: 0xD0D8, + 20513 - 11904: 0xADD2, + 20514 - 11904: 0xD0CC, + 20515 - 11904: 0xADC0, + 20517 - 11904: 0xADC3, + 20518 - 11904: 0xADC2, + 20519 - 11904: 0xD0D9, + 20520 - 11904: 0xADD0, + 20521 - 11904: 0xFA5F, + 20522 - 11904: 0xADD9, + 20523 - 11904: 0xADDB, + 20524 - 11904: 0xD0D3, + 20525 - 11904: 0xADD8, + 20526 - 11904: 0x92A8, + 20527 - 11904: 0xD0DB, + 20528 - 11904: 0xD0CD, + 20529 - 11904: 0xD0DC, + 20531 - 11904: 0xD0D1, + 20532 - 11904: 0x9163, + 20533 - 11904: 0xD0DA, + 20535 - 11904: 0xD0D2, + 20539 - 11904: 0x8C40, + 20540 - 11904: 0xADC8, + 20544 - 11904: 0xD463, + 20545 - 11904: 0xD457, + 20547 - 11904: 0xB0B3, + 20549 - 11904: 0xD45C, + 20550 - 11904: 0xD462, + 20551 - 11904: 0xB0B2, + 20552 - 11904: 0xD455, + 20553 - 11904: 0xB0B6, + 20554 - 11904: 0xD459, + 20555 - 11904: 0xD452, + 20556 - 11904: 0xB0B4, + 20557 - 11904: 0xD456, + 20558 - 11904: 0xB0B9, + 20559 - 11904: 0xB0BE, + 20561 - 11904: 0xD467, + 20563 - 11904: 0xD451, + 20565 - 11904: 0xB0BA, + 20566 - 11904: 0x9F73, + 20567 - 11904: 0xD466, + 20568 - 11904: 0x92AD, + 20570 - 11904: 0xB0B5, + 20571 - 11904: 0xD458, + 20572 - 11904: 0xB0B1, + 20573 - 11904: 0xD453, + 20574 - 11904: 0xD44F, + 20575 - 11904: 0xD45D, + 20576 - 11904: 0xD450, + 20577 - 11904: 0xD44E, + 20578 - 11904: 0xD45A, + 20579 - 11904: 0xD460, + 20580 - 11904: 0xD461, + 20581 - 11904: 0xB0B7, + 20582 - 11904: 0x9BE9, + 20584 - 11904: 0xD85B, + 20585 - 11904: 0xD45E, + 20586 - 11904: 0xD44D, + 20587 - 11904: 0xD45F, + 20588 - 11904: 0x92A9, + 20589 - 11904: 0xB0C1, + 20590 - 11904: 0xD464, + 20591 - 11904: 0xB0C0, + 20592 - 11904: 0xD44C, + 20594 - 11904: 0xD454, + 20595 - 11904: 0xD465, + 20596 - 11904: 0xB0BC, + 20597 - 11904: 0xB0BB, + 20598 - 11904: 0xB0B8, + 20599 - 11904: 0xB0BD, + 20602 - 11904: 0xB0AF, + 20605 - 11904: 0xFA66, + 20608 - 11904: 0xB3C8, + 20609 - 11904: 0x92AA, + 20610 - 11904: 0xD85E, + 20611 - 11904: 0xD857, + 20613 - 11904: 0xB3C5, + 20615 - 11904: 0xD85F, + 20616 - 11904: 0x89D9, + 20619 - 11904: 0xD855, + 20620 - 11904: 0xD858, + 20621 - 11904: 0xB3C4, + 20622 - 11904: 0xD859, + 20624 - 11904: 0xFD56, + 20625 - 11904: 0xB3C7, + 20626 - 11904: 0xD85D, + 20628 - 11904: 0xD853, + 20629 - 11904: 0xD852, + 20630 - 11904: 0xB3C9, + 20632 - 11904: 0xB3CA, + 20633 - 11904: 0xB3C6, + 20634 - 11904: 0xB3CB, + 20635 - 11904: 0xD851, + 20636 - 11904: 0xD85C, + 20637 - 11904: 0xD85A, + 20638 - 11904: 0xD854, + 20642 - 11904: 0xB3C3, + 20643 - 11904: 0xD856, + 20646 - 11904: 0x9FA8, + 20652 - 11904: 0xB6CA, + 20653 - 11904: 0xB6C4, + 20654 - 11904: 0xDCB7, + 20655 - 11904: 0xB6CD, + 20656 - 11904: 0xDCBD, + 20657 - 11904: 0xDCC0, + 20658 - 11904: 0xB6C6, + 20659 - 11904: 0xB6C7, + 20660 - 11904: 0xDCBA, + 20661 - 11904: 0xB6C5, + 20662 - 11904: 0xDCC3, + 20663 - 11904: 0xB6CB, + 20664 - 11904: 0xDCC4, + 20666 - 11904: 0xDCBF, + 20667 - 11904: 0xB6CC, + 20668 - 11904: 0x8C71, + 20669 - 11904: 0xDCB4, + 20670 - 11904: 0xB6C9, + 20671 - 11904: 0xDCB5, + 20673 - 11904: 0xDCBE, + 20674 - 11904: 0xDCBC, + 20676 - 11904: 0xDCB8, + 20677 - 11904: 0xB6C8, + 20678 - 11904: 0xDCB6, + 20679 - 11904: 0xB6CE, + 20680 - 11904: 0xDCBB, + 20681 - 11904: 0xDCC2, + 20682 - 11904: 0xDCB9, + 20683 - 11904: 0xDCC1, + 20685 - 11904: 0x92A1, + 20686 - 11904: 0xB9B6, + 20687 - 11904: 0xB9B3, + 20688 - 11904: 0x90E3, + 20689 - 11904: 0xB9B4, + 20691 - 11904: 0xE0F9, + 20692 - 11904: 0xE0F1, + 20693 - 11904: 0xB9B2, + 20694 - 11904: 0xB9AF, + 20695 - 11904: 0xE0F2, + 20697 - 11904: 0xA0A6, + 20698 - 11904: 0xB9B1, + 20699 - 11904: 0xE0F5, + 20701 - 11904: 0xE0F7, + 20703 - 11904: 0x94AB, + 20704 - 11904: 0xE0FE, + 20705 - 11904: 0xFC72, + 20707 - 11904: 0xE0FD, + 20708 - 11904: 0xE0F8, + 20709 - 11904: 0xB9AE, + 20710 - 11904: 0xE0F0, + 20711 - 11904: 0xB9AC, + 20712 - 11904: 0xE0F3, + 20713 - 11904: 0xB9B7, + 20714 - 11904: 0xE0F6, + 20716 - 11904: 0xE0FA, + 20717 - 11904: 0xB9B0, + 20718 - 11904: 0xB9AD, + 20719 - 11904: 0xE0FC, + 20720 - 11904: 0xE0FB, + 20721 - 11904: 0xB9B5, + 20723 - 11904: 0xE0F4, + 20724 - 11904: 0x97C4, + 20725 - 11904: 0xBBF8, + 20726 - 11904: 0xE4EC, + 20728 - 11904: 0xE4E9, + 20729 - 11904: 0xBBF9, + 20731 - 11904: 0xBBF7, + 20732 - 11904: 0x92AE, + 20733 - 11904: 0xE4F0, + 20734 - 11904: 0xE4ED, + 20735 - 11904: 0xE4E6, + 20736 - 11904: 0xBBF6, + 20737 - 11904: 0xFA67, + 20738 - 11904: 0xBBFA, + 20739 - 11904: 0xE4E7, + 20740 - 11904: 0xBBF5, + 20741 - 11904: 0xBBFD, + 20742 - 11904: 0xE4EA, + 20743 - 11904: 0xE4EB, + 20744 - 11904: 0xBBFB, + 20745 - 11904: 0xBBFC, + 20746 - 11904: 0xE4F1, + 20747 - 11904: 0xE4EE, + 20748 - 11904: 0xE4EF, + 20749 - 11904: 0x92A2, + 20750 - 11904: 0xFA69, + 20752 - 11904: 0xBEAA, + 20753 - 11904: 0xE8F8, + 20754 - 11904: 0xBEA7, + 20755 - 11904: 0xE8F5, + 20756 - 11904: 0xBEA9, + 20757 - 11904: 0xBEAB, + 20759 - 11904: 0xE8F6, + 20760 - 11904: 0xBEA8, + 20762 - 11904: 0xE8F7, + 20764 - 11904: 0xE8F4, + 20767 - 11904: 0xC076, + 20768 - 11904: 0xECBD, + 20769 - 11904: 0xC077, + 20770 - 11904: 0xECBB, + 20772 - 11904: 0xECBC, + 20773 - 11904: 0xECBA, + 20774 - 11904: 0xECB9, + 20777 - 11904: 0xECBE, + 20778 - 11904: 0xC075, + 20779 - 11904: 0x9268, + 20781 - 11904: 0xEFB8, + 20782 - 11904: 0xEFB9, + 20784 - 11904: 0xE4E8, + 20785 - 11904: 0xEFB7, + 20786 - 11904: 0xC078, + 20787 - 11904: 0xC35F, + 20788 - 11904: 0xF1EB, + 20789 - 11904: 0xF1EC, + 20791 - 11904: 0xC4D7, + 20792 - 11904: 0xC4D8, + 20793 - 11904: 0xF5C1, + 20794 - 11904: 0xF5C0, + 20795 - 11904: 0xC56C, + 20796 - 11904: 0xC56B, + 20797 - 11904: 0xF7D0, + 20799 - 11904: 0xA449, + 20800 - 11904: 0xA461, + 20801 - 11904: 0xA4B9, + 20803 - 11904: 0xA4B8, + 20804 - 11904: 0xA553, + 20805 - 11904: 0xA552, + 20806 - 11904: 0xA5FC, + 20807 - 11904: 0xA5FB, + 20808 - 11904: 0xA5FD, + 20809 - 11904: 0xA5FA, + 20811 - 11904: 0xA74A, + 20812 - 11904: 0xA749, + 20813 - 11904: 0xA74B, + 20818 - 11904: 0xA8E0, + 20820 - 11904: 0xA8DF, + 20821 - 11904: 0xA8E1, + 20822 - 11904: 0x8951, + 20823 - 11904: 0xAB5E, + 20825 - 11904: 0xA259, + 20826 - 11904: 0xD0DE, + 20827 - 11904: 0xA25A, + 20828 - 11904: 0xB0C2, + 20829 - 11904: 0xA25C, + 20830 - 11904: 0xA25B, + 20831 - 11904: 0xD860, + 20832 - 11904: 0xFA6F, + 20833 - 11904: 0xA25D, + 20834 - 11904: 0xB9B8, + 20835 - 11904: 0xA25E, + 20837 - 11904: 0xA44A, + 20839 - 11904: 0xA4BA, + 20840 - 11904: 0xA5FE, + 20841 - 11904: 0xA8E2, + 20842 - 11904: 0xFA71, + 20843 - 11904: 0xA44B, + 20844 - 11904: 0xA4BD, + 20845 - 11904: 0xA4BB, + 20846 - 11904: 0xA4BC, + 20849 - 11904: 0xA640, + 20852 - 11904: 0x8952, + 20853 - 11904: 0xA74C, + 20854 - 11904: 0xA8E4, + 20855 - 11904: 0xA8E3, + 20856 - 11904: 0xA8E5, + 20857 - 11904: 0x945A, + 20860 - 11904: 0xADDD, + 20864 - 11904: 0xBEAC, + 20866 - 11904: 0xC6C3, + 20870 - 11904: 0x89DD, + 20871 - 11904: 0xC94E, + 20872 - 11904: 0xC8A2, + 20873 - 11904: 0xA554, + 20874 - 11904: 0xA555, + 20877 - 11904: 0xA641, + 20879 - 11904: 0xCA6A, + 20881 - 11904: 0xAB60, + 20882 - 11904: 0xAB5F, + 20883 - 11904: 0xD0E0, + 20884 - 11904: 0xD0DF, + 20885 - 11904: 0xB0C3, + 20886 - 11904: 0xC6C4, + 20887 - 11904: 0xA4BE, + 20888 - 11904: 0xC955, + 20890 - 11904: 0x9E52, + 20892 - 11904: 0x8953, + 20894 - 11904: 0xCBCD, + 20896 - 11904: 0xAB61, + 20898 - 11904: 0xADE0, + 20900 - 11904: 0xADDE, + 20901 - 11904: 0xADDF, + 20903 - 11904: 0x9E55, + 20904 - 11904: 0x92BA, + 20906 - 11904: 0xBEAD, + 20907 - 11904: 0xC6C5, + 20908 - 11904: 0xA556, + 20910 - 11904: 0x8C5B, + 20912 - 11904: 0xA642, + 20913 - 11904: 0xC9BC, + 20914 - 11904: 0xFA7D, + 20915 - 11904: 0xFAA8, + 20916 - 11904: 0x9A68, + 20917 - 11904: 0xFA47, + 20918 - 11904: 0xA74D, + 20919 - 11904: 0xA74E, + 20920 - 11904: 0xFA7E, + 20921 - 11904: 0xCA6B, + 20924 - 11904: 0xCBCE, + 20925 - 11904: 0xA8E6, + 20926 - 11904: 0xCBCF, + 20931 - 11904: 0x92BB, + 20932 - 11904: 0xD0E2, + 20933 - 11904: 0xD0E3, + 20934 - 11904: 0xADE3, + 20935 - 11904: 0xFDB6, + 20936 - 11904: 0xD0E4, + 20937 - 11904: 0xFAA2, + 20938 - 11904: 0xD0E1, + 20939 - 11904: 0xADE4, + 20940 - 11904: 0xADE2, + 20941 - 11904: 0xADE1, + 20942 - 11904: 0xD0E5, + 20943 - 11904: 0xFAA3, + 20944 - 11904: 0xD468, + 20945 - 11904: 0xFAA4, + 20946 - 11904: 0x9BB4, + 20947 - 11904: 0xFAA6, + 20948 - 11904: 0xD861, + 20951 - 11904: 0xDCC5, + 20952 - 11904: 0xE140, + 20955 - 11904: 0x89DF, + 20956 - 11904: 0xBBFE, + 20957 - 11904: 0xBEAE, + 20958 - 11904: 0xE8F9, + 20959 - 11904: 0xFDDB, + 20960 - 11904: 0xA44C, + 20961 - 11904: 0xA45A, + 20962 - 11904: 0xFAA9, + 20964 - 11904: 0x8954, + 20973 - 11904: 0xFAAB, + 20976 - 11904: 0xB0C4, + 20977 - 11904: 0xB3CD, + 20979 - 11904: 0xB9B9, + 20980 - 11904: 0xFC7A, + 20981 - 11904: 0xC942, + 20982 - 11904: 0xA4BF, + 20984 - 11904: 0xA559, + 20985 - 11904: 0xA557, + 20986 - 11904: 0xA558, + 20988 - 11904: 0x89E0, + 20989 - 11904: 0xA8E7, + 20990 - 11904: 0x9F4F, + 20992 - 11904: 0xA44D, + 20993 - 11904: 0xA44E, + 20994 - 11904: 0xC87D, + 20995 - 11904: 0xA462, + 20997 - 11904: 0x89E1, + 20998 - 11904: 0xA4C0, + 20999 - 11904: 0xA4C1, + 21000 - 11904: 0xA4C2, + 21001 - 11904: 0xC9BE, + 21002 - 11904: 0xA55A, + 21003 - 11904: 0xFAB0, + 21004 - 11904: 0xC96B, + 21006 - 11904: 0xA646, + 21008 - 11904: 0xC9BF, + 21009 - 11904: 0xA644, + 21010 - 11904: 0xA645, + 21011 - 11904: 0xC9BD, + 21014 - 11904: 0xA647, + 21015 - 11904: 0xA643, + 21020 - 11904: 0xCA6C, + 21021 - 11904: 0xAAEC, + 21022 - 11904: 0xCA6D, + 21023 - 11904: 0x9FCD, + 21024 - 11904: 0xA0E7, + 21025 - 11904: 0xCA6E, + 21028 - 11904: 0xA750, + 21029 - 11904: 0xA74F, + 21030 - 11904: 0xFAB1, + 21031 - 11904: 0x89A6, + 21032 - 11904: 0xA753, + 21033 - 11904: 0xA751, + 21034 - 11904: 0xA752, + 21038 - 11904: 0xA8ED, + 21040 - 11904: 0xA8EC, + 21041 - 11904: 0xCBD4, + 21042 - 11904: 0xCBD1, + 21043 - 11904: 0xCBD2, + 21044 - 11904: 0x9EFA, + 21045 - 11904: 0xCBD0, + 21046 - 11904: 0xA8EE, + 21047 - 11904: 0xA8EA, + 21048 - 11904: 0xA8E9, + 21050 - 11904: 0xA8EB, + 21051 - 11904: 0xA8E8, + 21052 - 11904: 0xFAB2, + 21057 - 11904: 0xA8EF, + 21059 - 11904: 0xAB63, + 21060 - 11904: 0xCDF0, + 21062 - 11904: 0xCBD3, + 21063 - 11904: 0xAB68, + 21065 - 11904: 0xCDF1, + 21066 - 11904: 0xAB64, + 21067 - 11904: 0xAB67, + 21068 - 11904: 0xAB66, + 21069 - 11904: 0xAB65, + 21070 - 11904: 0xAB62, + 21071 - 11904: 0x87BC, + 21074 - 11904: 0xD0E8, + 21076 - 11904: 0xADE7, + 21077 - 11904: 0xD0EB, + 21078 - 11904: 0xADE5, + 21079 - 11904: 0xFAB4, + 21081 - 11904: 0x92C4, + 21082 - 11904: 0xD0E7, + 21083 - 11904: 0xADE8, + 21084 - 11904: 0xADE6, + 21085 - 11904: 0xADE9, + 21086 - 11904: 0xD0E9, + 21087 - 11904: 0xD0EA, + 21088 - 11904: 0x9F6F, + 21089 - 11904: 0xD0E6, + 21090 - 11904: 0xD0EC, + 21096 - 11904: 0x8BB0, + 21097 - 11904: 0xB3D1, + 21098 - 11904: 0xB0C5, + 21099 - 11904: 0xD469, + 21100 - 11904: 0xD46B, + 21101 - 11904: 0xD46A, + 21102 - 11904: 0xD46C, + 21103 - 11904: 0xB0C6, + 21106 - 11904: 0xB3CE, + 21107 - 11904: 0x9FAC, + 21108 - 11904: 0xB3CF, + 21109 - 11904: 0xB3D0, + 21111 - 11904: 0xB6D0, + 21112 - 11904: 0xDCC7, + 21113 - 11904: 0x89E3, + 21114 - 11904: 0xDCC6, + 21115 - 11904: 0xDCC8, + 21116 - 11904: 0xDCC9, + 21117 - 11904: 0xB6D1, + 21119 - 11904: 0xB6CF, + 21120 - 11904: 0xE141, + 21121 - 11904: 0xE142, + 21122 - 11904: 0xB9BB, + 21123 - 11904: 0xB9BA, + 21124 - 11904: 0xE35A, + 21127 - 11904: 0xBC40, + 21128 - 11904: 0xBC41, + 21129 - 11904: 0xBC42, + 21130 - 11904: 0xBC44, + 21131 - 11904: 0xE4F2, + 21132 - 11904: 0xE4F3, + 21133 - 11904: 0xBC43, + 21135 - 11904: 0x9BD3, + 21136 - 11904: 0x89E4, + 21137 - 11904: 0xBEAF, + 21139 - 11904: 0xBEB0, + 21140 - 11904: 0xFAB5, + 21142 - 11904: 0xF1ED, + 21143 - 11904: 0xF5C3, + 21144 - 11904: 0xF5C2, + 21145 - 11904: 0xF7D1, + 21146 - 11904: 0x9FD5, + 21147 - 11904: 0xA44F, + 21151 - 11904: 0xA55C, + 21152 - 11904: 0xA55B, + 21153 - 11904: 0x8955, + 21155 - 11904: 0xA648, + 21156 - 11904: 0x92C5, + 21158 - 11904: 0xC9C0, + 21160 - 11904: 0x8956, + 21161 - 11904: 0xA755, + 21162 - 11904: 0xA756, + 21163 - 11904: 0xA754, + 21164 - 11904: 0xA757, + 21165 - 11904: 0xCA6F, + 21166 - 11904: 0xCA70, + 21173 - 11904: 0xFAB3, + 21177 - 11904: 0xFAB6, + 21179 - 11904: 0xA8F1, + 21180 - 11904: 0xCBD5, + 21182 - 11904: 0xA8F0, + 21184 - 11904: 0xCDF2, + 21185 - 11904: 0xAB6C, + 21186 - 11904: 0xCDF3, + 21187 - 11904: 0xAB6B, + 21189 - 11904: 0xFAB7, + 21191 - 11904: 0xAB69, + 21193 - 11904: 0xAB6A, + 21196 - 11904: 0x9EDC, + 21197 - 11904: 0xD0ED, + 21200 - 11904: 0xFBC4, + 21201 - 11904: 0x9F71, + 21202 - 11904: 0xB0C7, + 21203 - 11904: 0xD46E, + 21205 - 11904: 0xB0CA, + 21206 - 11904: 0xD46D, + 21207 - 11904: 0xB1E5, + 21208 - 11904: 0xB0C9, + 21209 - 11904: 0xB0C8, + 21211 - 11904: 0xB3D4, + 21213 - 11904: 0xB3D3, + 21214 - 11904: 0xB3D2, + 21215 - 11904: 0xB6D2, + 21216 - 11904: 0xFABA, + 21217 - 11904: 0x92C7, + 21218 - 11904: 0xB6D5, + 21219 - 11904: 0xB6D6, + 21220 - 11904: 0xB6D4, + 21222 - 11904: 0xB6D3, + 21225 - 11904: 0xE143, + 21227 - 11904: 0xE144, + 21231 - 11904: 0xE4F5, + 21232 - 11904: 0xBC45, + 21233 - 11904: 0xE4F4, + 21235 - 11904: 0xBEB1, + 21236 - 11904: 0xECBF, + 21237 - 11904: 0xC079, + 21239 - 11904: 0xF1EE, + 21240 - 11904: 0xC455, + 21241 - 11904: 0xC6C6, + 21242 - 11904: 0xA463, + 21243 - 11904: 0xA4C3, + 21244 - 11904: 0xC956, + 21246 - 11904: 0xA4C4, + 21247 - 11904: 0xA4C5, + 21249 - 11904: 0x9A4C, + 21253 - 11904: 0xFABD, + 21254 - 11904: 0xA55E, + 21256 - 11904: 0xA649, + 21257 - 11904: 0xCA71, + 21258 - 11904: 0xCBD6, + 21259 - 11904: 0xCBD7, + 21261 - 11904: 0xAB6D, + 21262 - 11904: 0xD0EE, + 21263 - 11904: 0xB0CC, + 21264 - 11904: 0xB0CB, + 21265 - 11904: 0xD863, + 21266 - 11904: 0xD862, + 21269 - 11904: 0xA450, + 21270 - 11904: 0xA4C6, + 21271 - 11904: 0xA55F, + 21273 - 11904: 0xB0CD, + 21274 - 11904: 0xC943, + 21276 - 11904: 0xC96C, + 21277 - 11904: 0xA560, + 21279 - 11904: 0xC9C2, + 21280 - 11904: 0xA64B, + 21281 - 11904: 0xA64A, + 21282 - 11904: 0xC9C1, + 21283 - 11904: 0xA758, + 21284 - 11904: 0x8C68, + 21287 - 11904: 0x89E5, + 21290 - 11904: 0xADEA, + 21292 - 11904: 0x9F7D, + 21293 - 11904: 0xD46F, + 21295 - 11904: 0xB6D7, + 21296 - 11904: 0xE145, + 21297 - 11904: 0xB9BC, + 21298 - 11904: 0xA0A9, + 21299 - 11904: 0xFAC4, + 21300 - 11904: 0xE8FA, + 21303 - 11904: 0xF3FD, + 21304 - 11904: 0xC6C7, + 21305 - 11904: 0xA4C7, + 21307 - 11904: 0x8957, + 21308 - 11904: 0xCBD8, + 21309 - 11904: 0xCDF4, + 21310 - 11904: 0xB0D0, + 21311 - 11904: 0xB0CE, + 21312 - 11904: 0xB0CF, + 21313 - 11904: 0xA451, + 21314 - 11904: 0xFAAA, + 21315 - 11904: 0xA464, + 21316 - 11904: 0xFAC5, + 21317 - 11904: 0xA4CA, + 21319 - 11904: 0xA4C9, + 21320 - 11904: 0xA4C8, + 21321 - 11904: 0xA563, + 21322 - 11904: 0xA562, + 21324 - 11904: 0xC96D, + 21325 - 11904: 0xC9C3, + 21326 - 11904: 0x8958, + 21329 - 11904: 0xA8F5, + 21330 - 11904: 0xA8F2, + 21331 - 11904: 0xA8F4, + 21332 - 11904: 0xA8F3, + 21335 - 11904: 0xAB6E, + 21338 - 11904: 0xB3D5, + 21340 - 11904: 0xA452, + 21341 - 11904: 0x8BE3, + 21342 - 11904: 0xA4CB, + 21343 - 11904: 0x8B61, + 21344 - 11904: 0xA565, + 21345 - 11904: 0xA564, + 21347 - 11904: 0xCA72, + 21348 - 11904: 0x9AF1, + 21350 - 11904: 0xA8F6, + 21351 - 11904: 0x9EB7, + 21353 - 11904: 0xC6C8, + 21356 - 11904: 0xC957, + 21357 - 11904: 0xFAD1, + 21358 - 11904: 0xA567, + 21359 - 11904: 0xA566, + 21360 - 11904: 0xA64C, + 21361 - 11904: 0xA64D, + 21362 - 11904: 0xCA73, + 21363 - 11904: 0xA759, + 21364 - 11904: 0xFAD2, + 21365 - 11904: 0xA75A, + 21367 - 11904: 0xA8F7, + 21368 - 11904: 0xA8F8, + 21369 - 11904: 0xA8F9, + 21371 - 11904: 0xAB6F, + 21372 - 11904: 0xCDF5, + 21373 - 11904: 0x9EBA, + 21374 - 11904: 0xFAD4, + 21375 - 11904: 0xFAD5, + 21378 - 11904: 0xC944, + 21380 - 11904: 0xA4CC, + 21386 - 11904: 0xC9C4, + 21390 - 11904: 0xCA74, + 21391 - 11904: 0xCA75, + 21394 - 11904: 0xCBD9, + 21395 - 11904: 0xFAD9, + 21396 - 11904: 0xCBDA, + 21398 - 11904: 0xCDF7, + 21399 - 11904: 0xCDF6, + 21400 - 11904: 0xCDF9, + 21401 - 11904: 0xCDF8, + 21402 - 11904: 0xAB70, + 21404 - 11904: 0xD470, + 21405 - 11904: 0xADED, + 21406 - 11904: 0xD0EF, + 21407 - 11904: 0xADEC, + 21408 - 11904: 0xFADB, + 21410 - 11904: 0x9CE0, + 21412 - 11904: 0xD864, + 21413 - 11904: 0xB3D6, + 21414 - 11904: 0xFBF7, + 21415 - 11904: 0xD865, + 21416 - 11904: 0xFBFA, + 21417 - 11904: 0x89E7, + 21418 - 11904: 0xA07A, + 21419 - 11904: 0xFADC, + 21420 - 11904: 0xE146, + 21421 - 11904: 0xB9BD, + 21422 - 11904: 0xFADD, + 21424 - 11904: 0x89E9, + 21426 - 11904: 0xBC46, + 21428 - 11904: 0xF1EF, + 21430 - 11904: 0xC6C9, + 21433 - 11904: 0xC958, + 21435 - 11904: 0xA568, + 21441 - 11904: 0xFAE2, + 21442 - 11904: 0x89EB, + 21443 - 11904: 0xB0D1, + 21445 - 11904: 0xFAE3, + 21448 - 11904: 0xA453, + 21449 - 11904: 0xA465, + 21450 - 11904: 0xA4CE, + 21451 - 11904: 0xA4CD, + 21452 - 11904: 0x90C8, + 21453 - 11904: 0xA4CF, + 21456 - 11904: 0x92DA, + 21457 - 11904: 0x8959, + 21458 - 11904: 0x9CF5, + 21460 - 11904: 0xA8FB, + 21462 - 11904: 0xA8FA, + 21463 - 11904: 0xA8FC, + 21464 - 11904: 0x895A, + 21465 - 11904: 0xFAE7, + 21466 - 11904: 0x9FA2, + 21467 - 11904: 0xAB71, + 21471 - 11904: 0xADEE, + 21472 - 11904: 0xFAEA, + 21473 - 11904: 0xE8FB, + 21474 - 11904: 0xC24F, + 21475 - 11904: 0xA466, + 21476 - 11904: 0xA56A, + 21477 - 11904: 0xA579, + 21478 - 11904: 0xA574, + 21480 - 11904: 0xA56F, + 21481 - 11904: 0xA56E, + 21482 - 11904: 0xA575, + 21483 - 11904: 0xA573, + 21484 - 11904: 0xA56C, + 21485 - 11904: 0xA57A, + 21486 - 11904: 0xA56D, + 21487 - 11904: 0xA569, + 21488 - 11904: 0xA578, + 21489 - 11904: 0xA577, + 21490 - 11904: 0xA576, + 21491 - 11904: 0xA56B, + 21493 - 11904: 0xA572, + 21494 - 11904: 0xFAED, + 21495 - 11904: 0x8FAD, + 21496 - 11904: 0xA571, + 21499 - 11904: 0xA57B, + 21500 - 11904: 0xA570, + 21502 - 11904: 0xFB59, + 21505 - 11904: 0xA653, + 21507 - 11904: 0xA659, + 21508 - 11904: 0xA655, + 21510 - 11904: 0xA65B, + 21511 - 11904: 0xC9C5, + 21512 - 11904: 0xA658, + 21513 - 11904: 0xA64E, + 21514 - 11904: 0xA651, + 21515 - 11904: 0xA654, + 21516 - 11904: 0xA650, + 21517 - 11904: 0xA657, + 21518 - 11904: 0xA65A, + 21519 - 11904: 0xA64F, + 21520 - 11904: 0xA652, + 21521 - 11904: 0xA656, + 21522 - 11904: 0xA65C, + 21523 - 11904: 0xFAEF, + 21524 - 11904: 0x96EF, + 21526 - 11904: 0x9DEC, + 21528 - 11904: 0xCA7E, + 21529 - 11904: 0xCA7B, + 21530 - 11904: 0x9DCA, + 21531 - 11904: 0xA767, + 21532 - 11904: 0xCA7C, + 21533 - 11904: 0xA75B, + 21534 - 11904: 0xA75D, + 21535 - 11904: 0xA775, + 21536 - 11904: 0xA770, + 21537 - 11904: 0xFD6D, + 21539 - 11904: 0x89EC, + 21540 - 11904: 0xCAA5, + 21541 - 11904: 0xCA7D, + 21542 - 11904: 0xA75F, + 21543 - 11904: 0xA761, + 21544 - 11904: 0xCAA4, + 21545 - 11904: 0xA768, + 21546 - 11904: 0xCA78, + 21547 - 11904: 0xA774, + 21548 - 11904: 0xA776, + 21549 - 11904: 0xA75C, + 21550 - 11904: 0xA76D, + 21551 - 11904: 0xFB44, + 21552 - 11904: 0xCA76, + 21553 - 11904: 0xA773, + 21554 - 11904: 0x9DE2, + 21555 - 11904: 0xA764, + 21556 - 11904: 0x8C75, + 21557 - 11904: 0xA76E, + 21558 - 11904: 0xA76F, + 21559 - 11904: 0xCA77, + 21560 - 11904: 0xA76C, + 21561 - 11904: 0xA76A, + 21563 - 11904: 0xA76B, + 21564 - 11904: 0xA771, + 21565 - 11904: 0xCAA1, + 21566 - 11904: 0xA75E, + 21568 - 11904: 0xA772, + 21569 - 11904: 0xCAA3, + 21570 - 11904: 0xA766, + 21571 - 11904: 0xA763, + 21573 - 11904: 0xCA7A, + 21574 - 11904: 0xA762, + 21575 - 11904: 0xCAA6, + 21576 - 11904: 0xA765, + 21578 - 11904: 0xA769, + 21579 - 11904: 0x9EC0, + 21580 - 11904: 0x87C5, + 21581 - 11904: 0x9E56, + 21582 - 11904: 0xA760, + 21583 - 11904: 0xCAA2, + 21588 - 11904: 0xCA79, + 21600 - 11904: 0xCBEB, + 21601 - 11904: 0xCBEA, + 21602 - 11904: 0xA94F, + 21603 - 11904: 0xCBED, + 21604 - 11904: 0xCBEF, + 21605 - 11904: 0xCBE4, + 21606 - 11904: 0xCBE7, + 21607 - 11904: 0xCBEE, + 21608 - 11904: 0xA950, + 21609 - 11904: 0x9F79, + 21610 - 11904: 0x9AC7, + 21611 - 11904: 0xCBE1, + 21612 - 11904: 0xCBE5, + 21613 - 11904: 0xFAF4, + 21615 - 11904: 0xCBE9, + 21616 - 11904: 0xCE49, + 21617 - 11904: 0xA94B, + 21618 - 11904: 0xCE4D, + 21619 - 11904: 0xA8FD, + 21620 - 11904: 0xCBE6, + 21621 - 11904: 0xA8FE, + 21622 - 11904: 0xA94C, + 21623 - 11904: 0xA945, + 21624 - 11904: 0xA941, + 21626 - 11904: 0xCBE2, + 21627 - 11904: 0xA944, + 21628 - 11904: 0xA949, + 21629 - 11904: 0xA952, + 21630 - 11904: 0xCBE3, + 21631 - 11904: 0xCBDC, + 21632 - 11904: 0xA943, + 21633 - 11904: 0xCBDD, + 21634 - 11904: 0xCBDF, + 21636 - 11904: 0xA946, + 21637 - 11904: 0x98A1, + 21638 - 11904: 0xA948, + 21639 - 11904: 0xCBDB, + 21640 - 11904: 0xCBE0, + 21643 - 11904: 0xA951, + 21644 - 11904: 0xA94D, + 21645 - 11904: 0xCBE8, + 21646 - 11904: 0xA953, + 21647 - 11904: 0xFAF8, + 21648 - 11904: 0xA94A, + 21649 - 11904: 0xCBDE, + 21650 - 11904: 0xA947, + 21651 - 11904: 0x89F0, + 21652 - 11904: 0x9E47, + 21653 - 11904: 0xA942, + 21654 - 11904: 0xA940, + 21655 - 11904: 0x9DF7, + 21656 - 11904: 0xCBEC, + 21658 - 11904: 0xA94E, + 21660 - 11904: 0x9FD3, + 21662 - 11904: 0x9ACA, + 21664 - 11904: 0xCE48, + 21665 - 11904: 0xCDFB, + 21666 - 11904: 0xCE4B, + 21667 - 11904: 0x89F1, + 21668 - 11904: 0xFAF9, + 21669 - 11904: 0xCDFD, + 21670 - 11904: 0xAB78, + 21671 - 11904: 0xABA8, + 21672 - 11904: 0xAB74, + 21673 - 11904: 0xABA7, + 21674 - 11904: 0xAB7D, + 21675 - 11904: 0xABA4, + 21676 - 11904: 0xAB72, + 21677 - 11904: 0xCDFC, + 21678 - 11904: 0xCE43, + 21679 - 11904: 0xABA3, + 21680 - 11904: 0xCE4F, + 21681 - 11904: 0xABA5, + 21682 - 11904: 0x8E5A, + 21683 - 11904: 0xAB79, + 21684 - 11904: 0x89F2, + 21686 - 11904: 0xCE45, + 21687 - 11904: 0xCE42, + 21688 - 11904: 0xAB77, + 21689 - 11904: 0x89F3, + 21690 - 11904: 0xCDFA, + 21691 - 11904: 0xABA6, + 21692 - 11904: 0xCE4A, + 21693 - 11904: 0xAB7C, + 21694 - 11904: 0xCE4C, + 21695 - 11904: 0xABA9, + 21696 - 11904: 0xAB73, + 21697 - 11904: 0xAB7E, + 21698 - 11904: 0xAB7B, + 21699 - 11904: 0xCE40, + 21700 - 11904: 0xABA1, + 21701 - 11904: 0xCE46, + 21702 - 11904: 0xCE47, + 21703 - 11904: 0xAB7A, + 21704 - 11904: 0xABA2, + 21705 - 11904: 0xAB76, + 21707 - 11904: 0x925D, + 21708 - 11904: 0x8B51, + 21709 - 11904: 0x92E0, + 21710 - 11904: 0xAB75, + 21711 - 11904: 0xCDFE, + 21712 - 11904: 0x89F4, + 21718 - 11904: 0xCE44, + 21722 - 11904: 0x9FD4, + 21726 - 11904: 0xCE4E, + 21728 - 11904: 0xD144, + 21729 - 11904: 0xADFB, + 21730 - 11904: 0xD0F1, + 21731 - 11904: 0x8A79, + 21732 - 11904: 0xD0F6, + 21733 - 11904: 0xADF4, + 21734 - 11904: 0xAE40, + 21735 - 11904: 0xD0F4, + 21736 - 11904: 0xADEF, + 21737 - 11904: 0xADF9, + 21738 - 11904: 0xADFE, + 21739 - 11904: 0xD0FB, + 21741 - 11904: 0xADFA, + 21742 - 11904: 0xADFD, + 21743 - 11904: 0x89F5, + 21745 - 11904: 0xD0FE, + 21746 - 11904: 0xADF5, + 21747 - 11904: 0xD0F5, + 21751 - 11904: 0xD142, + 21752 - 11904: 0xD143, + 21754 - 11904: 0xADF7, + 21755 - 11904: 0xD141, + 21756 - 11904: 0xADF3, + 21757 - 11904: 0xAE43, + 21759 - 11904: 0xD0F8, + 21761 - 11904: 0xADF1, + 21762 - 11904: 0x97A7, + 21763 - 11904: 0xD146, + 21764 - 11904: 0xD0F9, + 21765 - 11904: 0xD0FD, + 21766 - 11904: 0xADF6, + 21767 - 11904: 0xAE42, + 21768 - 11904: 0xD0FA, + 21769 - 11904: 0xADFC, + 21770 - 11904: 0xD140, + 21771 - 11904: 0xD147, + 21772 - 11904: 0xD4A1, + 21773 - 11904: 0x93BA, + 21774 - 11904: 0xD145, + 21775 - 11904: 0xAE44, + 21776 - 11904: 0xADF0, + 21777 - 11904: 0xD0FC, + 21778 - 11904: 0xD0F3, + 21779 - 11904: 0x9E58, + 21780 - 11904: 0xADF8, + 21783 - 11904: 0xD0F2, + 21784 - 11904: 0x89F6, + 21786 - 11904: 0xD0F7, + 21790 - 11904: 0x9E57, + 21795 - 11904: 0x89F7, + 21797 - 11904: 0x8A41, + 21798 - 11904: 0xD0F0, + 21799 - 11904: 0xAE41, + 21800 - 11904: 0x89F8, + 21802 - 11904: 0xD477, + 21803 - 11904: 0xFAF1, + 21804 - 11904: 0xB0E4, + 21805 - 11904: 0xD4A7, + 21806 - 11904: 0xB0E2, + 21807 - 11904: 0xB0DF, + 21808 - 11904: 0xD47C, + 21809 - 11904: 0xB0DB, + 21810 - 11904: 0xD4A2, + 21811 - 11904: 0xB0E6, + 21812 - 11904: 0xD476, + 21813 - 11904: 0xD47B, + 21814 - 11904: 0xD47A, + 21815 - 11904: 0xADF2, + 21816 - 11904: 0xB0E1, + 21817 - 11904: 0xD4A5, + 21819 - 11904: 0xD4A8, + 21820 - 11904: 0xD473, + 21822 - 11904: 0xB3E8, + 21823 - 11904: 0x89FA, + 21824 - 11904: 0xD4A9, + 21825 - 11904: 0xB0E7, + 21827 - 11904: 0xB0D9, + 21828 - 11904: 0xB0D6, + 21829 - 11904: 0xD47E, + 21830 - 11904: 0xB0D3, + 21831 - 11904: 0xFB42, + 21832 - 11904: 0xD4A6, + 21833 - 11904: 0xFABF, + 21834 - 11904: 0xB0DA, + 21835 - 11904: 0xD4AA, + 21837 - 11904: 0xD474, + 21838 - 11904: 0xD4A4, + 21839 - 11904: 0xB0DD, + 21840 - 11904: 0xD475, + 21841 - 11904: 0xD478, + 21842 - 11904: 0xD47D, + 21843 - 11904: 0xFBA3, + 21845 - 11904: 0xB0DE, + 21846 - 11904: 0xB0DC, + 21847 - 11904: 0xB0E8, + 21852 - 11904: 0xB0E3, + 21853 - 11904: 0xFAF7, + 21854 - 11904: 0xB0D7, + 21855 - 11904: 0xB1D2, + 21857 - 11904: 0xB0D8, + 21858 - 11904: 0xD479, + 21859 - 11904: 0xB0E5, + 21860 - 11904: 0xB0E0, + 21861 - 11904: 0xD4A3, + 21862 - 11904: 0xB0D5, + 21865 - 11904: 0x9E4E, + 21866 - 11904: 0xB0D4, + 21867 - 11904: 0x94DC, + 21873 - 11904: 0x95DA, + 21874 - 11904: 0x9DF8, + 21875 - 11904: 0x9F6A, + 21877 - 11904: 0xD471, + 21878 - 11904: 0xD472, + 21879 - 11904: 0xD86A, + 21881 - 11904: 0x8AB7, + 21883 - 11904: 0xB3D7, + 21884 - 11904: 0xB3DA, + 21885 - 11904: 0xD875, + 21886 - 11904: 0xB3EE, + 21887 - 11904: 0xD878, + 21888 - 11904: 0xB3D8, + 21889 - 11904: 0xD871, + 21890 - 11904: 0xB3DE, + 21891 - 11904: 0xB3E4, + 21892 - 11904: 0xB5BD, + 21894 - 11904: 0xFB46, + 21895 - 11904: 0xB3E2, + 21896 - 11904: 0xD86E, + 21897 - 11904: 0xB3EF, + 21898 - 11904: 0xB3DB, + 21899 - 11904: 0xB3E3, + 21900 - 11904: 0xD876, + 21901 - 11904: 0xDCD7, + 21902 - 11904: 0xD87B, + 21903 - 11904: 0xD86F, + 21904 - 11904: 0x8A46, + 21905 - 11904: 0xD866, + 21906 - 11904: 0xD873, + 21907 - 11904: 0xD86D, + 21908 - 11904: 0xB3E1, + 21909 - 11904: 0xD879, + 21912 - 11904: 0xB3DD, + 21913 - 11904: 0xB3F1, + 21914 - 11904: 0xB3EA, + 21916 - 11904: 0xB3DF, + 21917 - 11904: 0xB3DC, + 21919 - 11904: 0xB3E7, + 21921 - 11904: 0xD87A, + 21922 - 11904: 0xD86C, + 21923 - 11904: 0xD872, + 21924 - 11904: 0xD874, + 21925 - 11904: 0xD868, + 21926 - 11904: 0xD877, + 21927 - 11904: 0xB3D9, + 21928 - 11904: 0xD867, + 21929 - 11904: 0xFB47, + 21930 - 11904: 0xB3E0, + 21931 - 11904: 0xB3F0, + 21932 - 11904: 0xB3EC, + 21933 - 11904: 0xD869, + 21934 - 11904: 0xB3E6, + 21936 - 11904: 0x9148, + 21937 - 11904: 0xB3ED, + 21938 - 11904: 0xB3E9, + 21939 - 11904: 0xB3E5, + 21940 - 11904: 0x92DE, + 21941 - 11904: 0xD870, + 21945 - 11904: 0x8B53, + 21946 - 11904: 0x9DF6, + 21947 - 11904: 0xB3EB, + 21948 - 11904: 0x9BDA, + 21951 - 11904: 0xDCD5, + 21952 - 11904: 0xDCD1, + 21953 - 11904: 0x9D7E, + 21954 - 11904: 0xDCE0, + 21955 - 11904: 0xDCCA, + 21956 - 11904: 0xDCD3, + 21957 - 11904: 0xB6E5, + 21958 - 11904: 0xB6E6, + 21959 - 11904: 0xB6DE, + 21960 - 11904: 0xDCDC, + 21961 - 11904: 0xB6E8, + 21962 - 11904: 0xDCCF, + 21963 - 11904: 0xDCCE, + 21964 - 11904: 0xDCCC, + 21965 - 11904: 0xDCDE, + 21966 - 11904: 0xB6DC, + 21967 - 11904: 0xDCD8, + 21968 - 11904: 0xDCCD, + 21969 - 11904: 0xB6DF, + 21970 - 11904: 0xDCD6, + 21971 - 11904: 0xB6DA, + 21972 - 11904: 0xDCD2, + 21973 - 11904: 0xDCD9, + 21974 - 11904: 0xDCDB, + 21975 - 11904: 0x89FD, + 21976 - 11904: 0x99E4, + 21977 - 11904: 0xDCDF, + 21978 - 11904: 0xB6E3, + 21979 - 11904: 0xDCCB, + 21980 - 11904: 0xB6DD, + 21981 - 11904: 0xDCD0, + 21982 - 11904: 0x9E43, + 21983 - 11904: 0xB6D8, + 21985 - 11904: 0xB6E4, + 21986 - 11904: 0xDCDA, + 21987 - 11904: 0xB6E0, + 21988 - 11904: 0xB6E1, + 21989 - 11904: 0xB6E7, + 21990 - 11904: 0xB6DB, + 21991 - 11904: 0xA25F, + 21992 - 11904: 0xB6D9, + 21993 - 11904: 0xDCD4, + 21994 - 11904: 0x9DE9, + 21996 - 11904: 0x8F52, + 21999 - 11904: 0xB6E2, + 22000 - 11904: 0x9DF5, + 22001 - 11904: 0x9DF0, + 22002 - 11904: 0xDCDD, + 22005 - 11904: 0x99E7, + 22006 - 11904: 0xB9CD, + 22007 - 11904: 0xB9C8, + 22009 - 11904: 0xE155, + 22010 - 11904: 0xE151, + 22011 - 11904: 0x8BBD, + 22012 - 11904: 0xE14B, + 22013 - 11904: 0xB9C2, + 22014 - 11904: 0xB9BE, + 22015 - 11904: 0xE154, + 22016 - 11904: 0xB9BF, + 22017 - 11904: 0xE14E, + 22018 - 11904: 0xE150, + 22020 - 11904: 0xE153, + 22021 - 11904: 0xFB48, + 22022 - 11904: 0xB9C4, + 22024 - 11904: 0xB9CB, + 22025 - 11904: 0xB9C5, + 22028 - 11904: 0xE149, + 22029 - 11904: 0xB9C6, + 22030 - 11904: 0xB9C7, + 22031 - 11904: 0xE14C, + 22032 - 11904: 0xB9CC, + 22033 - 11904: 0x9FB7, + 22034 - 11904: 0xE14A, + 22035 - 11904: 0xE14F, + 22036 - 11904: 0xB9C3, + 22037 - 11904: 0xE148, + 22038 - 11904: 0xB9C9, + 22039 - 11904: 0xB9C1, + 22043 - 11904: 0xB9C0, + 22044 - 11904: 0xE14D, + 22045 - 11904: 0xE152, + 22046 - 11904: 0x9DD0, + 22047 - 11904: 0xB9CA, + 22048 - 11904: 0x9FEB, + 22049 - 11904: 0x8DA9, + 22050 - 11904: 0x9DCF, + 22051 - 11904: 0x98E1, + 22053 - 11904: 0x9DE5, + 22055 - 11904: 0xE147, + 22057 - 11904: 0xBC4D, + 22058 - 11904: 0xE547, + 22060 - 11904: 0xE544, + 22061 - 11904: 0x9DC8, + 22062 - 11904: 0xBC47, + 22063 - 11904: 0xBC53, + 22064 - 11904: 0xBC54, + 22066 - 11904: 0xBC4A, + 22067 - 11904: 0xE542, + 22068 - 11904: 0xBC4C, + 22069 - 11904: 0xE4F9, + 22070 - 11904: 0xBC52, + 22071 - 11904: 0xFB4F, + 22072 - 11904: 0xE546, + 22073 - 11904: 0xBC49, + 22074 - 11904: 0xE548, + 22075 - 11904: 0xBC48, + 22077 - 11904: 0xE543, + 22078 - 11904: 0xE545, + 22079 - 11904: 0xBC4B, + 22080 - 11904: 0xE541, + 22081 - 11904: 0xE4FA, + 22082 - 11904: 0xE4F7, + 22083 - 11904: 0x9DEB, + 22085 - 11904: 0xD86B, + 22086 - 11904: 0xE4FD, + 22088 - 11904: 0xE4F6, + 22089 - 11904: 0xE4FC, + 22090 - 11904: 0xE4FB, + 22092 - 11904: 0xE4F8, + 22093 - 11904: 0xFB54, + 22094 - 11904: 0xBC4F, + 22095 - 11904: 0xFB55, + 22096 - 11904: 0x9AA2, + 22098 - 11904: 0x8AD6, + 22099 - 11904: 0xBC4E, + 22100 - 11904: 0x9A5F, + 22103 - 11904: 0xBC50, + 22104 - 11904: 0xE4FE, + 22105 - 11904: 0xBEB2, + 22106 - 11904: 0xE540, + 22109 - 11904: 0x9EF5, + 22110 - 11904: 0xE945, + 22112 - 11904: 0xE8FD, + 22113 - 11904: 0x8FB7, + 22114 - 11904: 0xBEBE, + 22115 - 11904: 0xE942, + 22116 - 11904: 0xBEB6, + 22117 - 11904: 0xBEBA, + 22118 - 11904: 0xE941, + 22120 - 11904: 0xBEB9, + 22121 - 11904: 0xBEB5, + 22122 - 11904: 0xBEB8, + 22123 - 11904: 0xBEB3, + 22124 - 11904: 0xBEBD, + 22125 - 11904: 0xE943, + 22126 - 11904: 0xE8FE, + 22127 - 11904: 0xBEBC, + 22128 - 11904: 0xE8FC, + 22129 - 11904: 0xBEBB, + 22130 - 11904: 0xE944, + 22131 - 11904: 0xE940, + 22132 - 11904: 0xBC51, + 22134 - 11904: 0xBEBF, + 22135 - 11904: 0xE946, + 22136 - 11904: 0xBEB7, + 22137 - 11904: 0xBEB4, + 22138 - 11904: 0x9AD2, + 22139 - 11904: 0x9E6A, + 22140 - 11904: 0x9EE8, + 22142 - 11904: 0xECC6, + 22143 - 11904: 0xECC8, + 22144 - 11904: 0xC07B, + 22145 - 11904: 0xECC9, + 22146 - 11904: 0xECC7, + 22147 - 11904: 0xECC5, + 22148 - 11904: 0xECC4, + 22149 - 11904: 0xC07D, + 22150 - 11904: 0xECC3, + 22151 - 11904: 0xC07E, + 22153 - 11904: 0x8BBF, + 22154 - 11904: 0x91C2, + 22155 - 11904: 0x9D62, + 22156 - 11904: 0xECC1, + 22157 - 11904: 0xECC2, + 22158 - 11904: 0xC07A, + 22159 - 11904: 0xC0A1, + 22160 - 11904: 0xC07C, + 22162 - 11904: 0x9260, + 22163 - 11904: 0xECC0, + 22165 - 11904: 0xC250, + 22167 - 11904: 0xEFBC, + 22168 - 11904: 0xEFBA, + 22169 - 11904: 0xEFBF, + 22170 - 11904: 0xEFBD, + 22172 - 11904: 0xEFBB, + 22173 - 11904: 0xEFBE, + 22174 - 11904: 0x925E, + 22175 - 11904: 0x91C1, + 22177 - 11904: 0x8AC5, + 22180 - 11904: 0x97A3, + 22181 - 11904: 0xC360, + 22182 - 11904: 0xF1F2, + 22183 - 11904: 0xF1F3, + 22184 - 11904: 0xC456, + 22186 - 11904: 0xF1F4, + 22187 - 11904: 0xF1F0, + 22188 - 11904: 0xF1F5, + 22189 - 11904: 0xF1F1, + 22190 - 11904: 0xC251, + 22191 - 11904: 0x8B6C, + 22193 - 11904: 0x8D7E, + 22194 - 11904: 0xF3FE, + 22195 - 11904: 0xF441, + 22196 - 11904: 0xC459, + 22197 - 11904: 0xF440, + 22198 - 11904: 0xC458, + 22199 - 11904: 0xC457, + 22201 - 11904: 0x9C54, + 22204 - 11904: 0xC45A, + 22205 - 11904: 0xF5C5, + 22206 - 11904: 0xF5C6, + 22207 - 11904: 0x9DBD, + 22208 - 11904: 0xC4DA, + 22209 - 11904: 0xC4D9, + 22210 - 11904: 0xC4DB, + 22211 - 11904: 0xF5C4, + 22213 - 11904: 0xF6D8, + 22214 - 11904: 0xF6D7, + 22216 - 11904: 0xC56D, + 22217 - 11904: 0xC56F, + 22218 - 11904: 0xC56E, + 22219 - 11904: 0xF6D9, + 22220 - 11904: 0xC5C8, + 22221 - 11904: 0xF8A6, + 22225 - 11904: 0xC5F1, + 22227 - 11904: 0xF8A5, + 22228 - 11904: 0xF8EE, + 22230 - 11904: 0x9CC5, + 22231 - 11904: 0xC949, + 22234 - 11904: 0xA57D, + 22235 - 11904: 0xA57C, + 22237 - 11904: 0xA65F, + 22238 - 11904: 0xA65E, + 22239 - 11904: 0xC9C7, + 22240 - 11904: 0xA65D, + 22241 - 11904: 0xC9C6, + 22242 - 11904: 0x895B, + 22244 - 11904: 0xA779, + 22245 - 11904: 0xCAA9, + 22247 - 11904: 0xCAA8, + 22250 - 11904: 0xA777, + 22251 - 11904: 0xA77A, + 22253 - 11904: 0xFB5C, + 22254 - 11904: 0xCAA7, + 22255 - 11904: 0xFB5B, + 22256 - 11904: 0xA778, + 22257 - 11904: 0xFB57, + 22263 - 11904: 0xCBF0, + 22265 - 11904: 0xCBF1, + 22266 - 11904: 0xA954, + 22267 - 11904: 0x8765, + 22269 - 11904: 0x98C7, + 22271 - 11904: 0xABAA, + 22272 - 11904: 0xFB5A, + 22273 - 11904: 0xD148, + 22274 - 11904: 0xD149, + 22275 - 11904: 0xAE45, + 22276 - 11904: 0xAE46, + 22279 - 11904: 0xD4AC, + 22280 - 11904: 0xB0E9, + 22281 - 11904: 0xB0EB, + 22282 - 11904: 0xD4AB, + 22283 - 11904: 0xB0EA, + 22284 - 11904: 0xD87C, + 22285 - 11904: 0xB3F2, + 22290 - 11904: 0xB6E9, + 22291 - 11904: 0xB6EA, + 22292 - 11904: 0xDCE1, + 22293 - 11904: 0x9CEE, + 22294 - 11904: 0xB9CF, + 22296 - 11904: 0xB9CE, + 22298 - 11904: 0xE549, + 22299 - 11904: 0xE948, + 22300 - 11904: 0xE947, + 22301 - 11904: 0x92E2, + 22302 - 11904: 0xF96B, + 22303 - 11904: 0xA467, + 22304 - 11904: 0xC959, + 22306 - 11904: 0xC96E, + 22307 - 11904: 0xC96F, + 22312 - 11904: 0xA662, + 22313 - 11904: 0xA666, + 22314 - 11904: 0xC9C9, + 22316 - 11904: 0xA664, + 22317 - 11904: 0xA663, + 22318 - 11904: 0xC9C8, + 22319 - 11904: 0xA665, + 22320 - 11904: 0xA661, + 22322 - 11904: 0x94A7, + 22323 - 11904: 0xA660, + 22324 - 11904: 0xC9CA, + 22331 - 11904: 0xA7A6, + 22333 - 11904: 0x8CCC, + 22334 - 11904: 0xA7A3, + 22335 - 11904: 0x9BD4, + 22336 - 11904: 0xA77D, + 22337 - 11904: 0xCAAA, + 22338 - 11904: 0xFB64, + 22339 - 11904: 0xFB76, + 22341 - 11904: 0xCAAB, + 22342 - 11904: 0xFB60, + 22343 - 11904: 0xA7A1, + 22345 - 11904: 0xCAAD, + 22346 - 11904: 0xA77B, + 22347 - 11904: 0xCAAE, + 22348 - 11904: 0xCAAC, + 22349 - 11904: 0xA77E, + 22350 - 11904: 0xA7A2, + 22351 - 11904: 0xA7A5, + 22352 - 11904: 0xA7A4, + 22353 - 11904: 0xA77C, + 22354 - 11904: 0xCAAF, + 22356 - 11904: 0x99E5, + 22359 - 11904: 0x9AC2, + 22363 - 11904: 0x91FB, + 22367 - 11904: 0xA073, + 22369 - 11904: 0xA959, + 22370 - 11904: 0xCBFE, + 22372 - 11904: 0xA95B, + 22374 - 11904: 0xA95A, + 22375 - 11904: 0x9F72, + 22376 - 11904: 0xCC40, + 22377 - 11904: 0xA958, + 22378 - 11904: 0xA957, + 22379 - 11904: 0xCBF5, + 22381 - 11904: 0xCBF4, + 22383 - 11904: 0xCBF2, + 22384 - 11904: 0xCBF7, + 22385 - 11904: 0xCBF6, + 22386 - 11904: 0xCBF3, + 22387 - 11904: 0xCBFC, + 22388 - 11904: 0xCBFD, + 22389 - 11904: 0xCBFA, + 22390 - 11904: 0xCBF8, + 22391 - 11904: 0xA956, + 22394 - 11904: 0x9FCC, + 22395 - 11904: 0xCBFB, + 22396 - 11904: 0xA95C, + 22397 - 11904: 0xCC41, + 22398 - 11904: 0x98A5, + 22399 - 11904: 0x92E8, + 22400 - 11904: 0xCBF9, + 22402 - 11904: 0xABAB, + 22403 - 11904: 0xA955, + 22408 - 11904: 0x9BBC, + 22410 - 11904: 0x96F3, + 22411 - 11904: 0xABAC, + 22412 - 11904: 0xCE54, + 22413 - 11904: 0x92E7, + 22415 - 11904: 0xCE5A, + 22416 - 11904: 0xFC67, + 22419 - 11904: 0xABB2, + 22420 - 11904: 0xCE58, + 22421 - 11904: 0xCE5E, + 22423 - 11904: 0xCE55, + 22424 - 11904: 0xCE59, + 22425 - 11904: 0xCE5B, + 22426 - 11904: 0xCE5D, + 22427 - 11904: 0xCE57, + 22428 - 11904: 0x8B7D, + 22429 - 11904: 0xCE56, + 22430 - 11904: 0xCE51, + 22431 - 11904: 0xCE52, + 22432 - 11904: 0xABAD, + 22433 - 11904: 0x9BF4, + 22434 - 11904: 0xABAF, + 22435 - 11904: 0xABAE, + 22436 - 11904: 0xCE53, + 22437 - 11904: 0xCE5C, + 22439 - 11904: 0x9EF7, + 22442 - 11904: 0x9EC1, + 22446 - 11904: 0xABB1, + 22451 - 11904: 0x87C3, + 22452 - 11904: 0x996F, + 22453 - 11904: 0xCE50, + 22454 - 11904: 0xD153, + 22456 - 11904: 0xD152, + 22457 - 11904: 0xD157, + 22458 - 11904: 0xD14E, + 22459 - 11904: 0x96F1, + 22460 - 11904: 0xD151, + 22461 - 11904: 0xD150, + 22462 - 11904: 0x8E41, + 22463 - 11904: 0xD154, + 22465 - 11904: 0xD158, + 22466 - 11904: 0xAE47, + 22467 - 11904: 0xAE4A, + 22468 - 11904: 0x954A, + 22470 - 11904: 0xD14F, + 22471 - 11904: 0xD155, + 22472 - 11904: 0x97E6, + 22475 - 11904: 0xAE49, + 22476 - 11904: 0xD14A, + 22478 - 11904: 0xABB0, + 22479 - 11904: 0xD4BA, + 22480 - 11904: 0xD156, + 22482 - 11904: 0xD14D, + 22484 - 11904: 0xAE48, + 22485 - 11904: 0xD14C, + 22487 - 11904: 0x96F5, + 22492 - 11904: 0xD4B1, + 22493 - 11904: 0x92E6, + 22494 - 11904: 0x9F42, + 22495 - 11904: 0xB0EC, + 22496 - 11904: 0xB0F0, + 22497 - 11904: 0xD4C1, + 22498 - 11904: 0xD4AF, + 22499 - 11904: 0xD4BD, + 22500 - 11904: 0xB0F1, + 22501 - 11904: 0xD4BF, + 22502 - 11904: 0xFB67, + 22503 - 11904: 0xD4C5, + 22505 - 11904: 0xD4C9, + 22508 - 11904: 0xD4C0, + 22509 - 11904: 0xD4B4, + 22510 - 11904: 0xD4BC, + 22511 - 11904: 0x99A9, + 22512 - 11904: 0xD4CA, + 22513 - 11904: 0xD4C8, + 22514 - 11904: 0xD4BE, + 22515 - 11904: 0xD4B9, + 22516 - 11904: 0xD4B2, + 22517 - 11904: 0xD8A6, + 22518 - 11904: 0xD4B0, + 22519 - 11904: 0xB0F5, + 22520 - 11904: 0xD4B7, + 22521 - 11904: 0xB0F6, + 22522 - 11904: 0xB0F2, + 22523 - 11904: 0xD4AD, + 22524 - 11904: 0xD4C3, + 22525 - 11904: 0xD4B5, + 22526 - 11904: 0xFAE6, + 22528 - 11904: 0xD4B3, + 22529 - 11904: 0xD4C6, + 22530 - 11904: 0xB0F3, + 22531 - 11904: 0xFB69, + 22532 - 11904: 0xD4CC, + 22533 - 11904: 0xB0ED, + 22534 - 11904: 0xB0EF, + 22535 - 11904: 0xD4BB, + 22536 - 11904: 0xD4B6, + 22537 - 11904: 0xAE4B, + 22538 - 11904: 0xB0EE, + 22539 - 11904: 0xD4B8, + 22540 - 11904: 0xD4C7, + 22541 - 11904: 0xD4CB, + 22542 - 11904: 0xD4C2, + 22544 - 11904: 0xD4C4, + 22546 - 11904: 0x97E5, + 22548 - 11904: 0xD4AE, + 22552 - 11904: 0x87C8, + 22553 - 11904: 0xD8A1, + 22555 - 11904: 0xD8AA, + 22556 - 11904: 0xD8A9, + 22557 - 11904: 0xB3FA, + 22558 - 11904: 0xD8A2, + 22560 - 11904: 0xB3FB, + 22561 - 11904: 0xB3F9, + 22562 - 11904: 0x967D, + 22563 - 11904: 0xD8A4, + 22564 - 11904: 0xB3F6, + 22565 - 11904: 0xD8A8, + 22566 - 11904: 0xFB6C, + 22567 - 11904: 0xD8A3, + 22568 - 11904: 0xD8A5, + 22569 - 11904: 0xD87D, + 22570 - 11904: 0xB3F4, + 22572 - 11904: 0xD8B2, + 22573 - 11904: 0xD8B1, + 22574 - 11904: 0xD8AE, + 22575 - 11904: 0xB3F3, + 22576 - 11904: 0xB3F7, + 22577 - 11904: 0xB3F8, + 22578 - 11904: 0xD14B, + 22579 - 11904: 0xD8AB, + 22580 - 11904: 0xB3F5, + 22581 - 11904: 0xB0F4, + 22582 - 11904: 0xD8AD, + 22583 - 11904: 0xD87E, + 22584 - 11904: 0xD8B0, + 22585 - 11904: 0xD8AF, + 22586 - 11904: 0x99A2, + 22587 - 11904: 0xD8B3, + 22589 - 11904: 0xDCEF, + 22591 - 11904: 0xD8AC, + 22592 - 11904: 0x9ABB, + 22596 - 11904: 0x9A65, + 22599 - 11904: 0x944E, + 22600 - 11904: 0xD8A7, + 22601 - 11904: 0xDCE7, + 22602 - 11904: 0xB6F4, + 22603 - 11904: 0xB6F7, + 22604 - 11904: 0xB6F2, + 22605 - 11904: 0xDCE6, + 22606 - 11904: 0xDCEA, + 22607 - 11904: 0xDCE5, + 22609 - 11904: 0xB6EC, + 22610 - 11904: 0xB6F6, + 22611 - 11904: 0xDCE2, + 22612 - 11904: 0xB6F0, + 22613 - 11904: 0xDCE9, + 22615 - 11904: 0xB6EE, + 22616 - 11904: 0xB6ED, + 22617 - 11904: 0xDCEC, + 22618 - 11904: 0xB6EF, + 22619 - 11904: 0xDCEE, + 22620 - 11904: 0xFB6E, + 22621 - 11904: 0xDCEB, + 22622 - 11904: 0xB6EB, + 22623 - 11904: 0x99DF, + 22626 - 11904: 0xB6F5, + 22627 - 11904: 0xDCF0, + 22628 - 11904: 0xDCE4, + 22629 - 11904: 0xDCED, + 22632 - 11904: 0xDCE3, + 22633 - 11904: 0x98E3, + 22635 - 11904: 0xB6F1, + 22636 - 11904: 0x9254, + 22637 - 11904: 0xB6F3, + 22639 - 11904: 0xDCE8, + 22641 - 11904: 0xDCF1, + 22642 - 11904: 0x967B, + 22643 - 11904: 0x8AAF, + 22644 - 11904: 0xE15D, + 22645 - 11904: 0xB9D0, + 22646 - 11904: 0xE163, + 22649 - 11904: 0xB9D5, + 22650 - 11904: 0xE15F, + 22651 - 11904: 0xE166, + 22652 - 11904: 0xE157, + 22653 - 11904: 0xB9D7, + 22654 - 11904: 0xB9D1, + 22655 - 11904: 0xE15C, + 22656 - 11904: 0xBC55, + 22657 - 11904: 0xE15B, + 22658 - 11904: 0xE164, + 22659 - 11904: 0xB9D2, + 22661 - 11904: 0xB9D6, + 22662 - 11904: 0xE15A, + 22663 - 11904: 0xE160, + 22664 - 11904: 0xE165, + 22665 - 11904: 0xE156, + 22666 - 11904: 0xB9D4, + 22667 - 11904: 0xE15E, + 22670 - 11904: 0xE162, + 22671 - 11904: 0xE168, + 22672 - 11904: 0xE158, + 22673 - 11904: 0xE161, + 22674 - 11904: 0x8C77, + 22675 - 11904: 0xB9D3, + 22676 - 11904: 0xE167, + 22678 - 11904: 0x87B0, + 22680 - 11904: 0xE159, + 22681 - 11904: 0x8BAF, + 22682 - 11904: 0x9EBD, + 22684 - 11904: 0xBC59, + 22685 - 11904: 0xE54B, + 22686 - 11904: 0xBC57, + 22687 - 11904: 0xBC56, + 22688 - 11904: 0xE54D, + 22689 - 11904: 0xE552, + 22691 - 11904: 0xE54E, + 22693 - 11904: 0xE551, + 22694 - 11904: 0xBC5C, + 22695 - 11904: 0x9EE6, + 22696 - 11904: 0xBEA5, + 22697 - 11904: 0xBC5B, + 22698 - 11904: 0xFB6F, + 22699 - 11904: 0xE54A, + 22700 - 11904: 0xE550, + 22702 - 11904: 0xBC5A, + 22703 - 11904: 0xE54F, + 22704 - 11904: 0x8EE1, + 22705 - 11904: 0xE54C, + 22707 - 11904: 0xBC58, + 22709 - 11904: 0x9B7D, + 22710 - 11904: 0x9C7E, + 22714 - 11904: 0xE94D, + 22715 - 11904: 0xF9D9, + 22716 - 11904: 0xE94F, + 22717 - 11904: 0xE94A, + 22718 - 11904: 0xBEC1, + 22719 - 11904: 0xE94C, + 22721 - 11904: 0xBEC0, + 22722 - 11904: 0xE94E, + 22725 - 11904: 0xBEC3, + 22726 - 11904: 0xE950, + 22727 - 11904: 0xBEC2, + 22728 - 11904: 0xE949, + 22729 - 11904: 0xE94B, + 22731 - 11904: 0x92EA, + 22734 - 11904: 0xC0A5, + 22735 - 11904: 0xECCC, + 22736 - 11904: 0x8C78, + 22737 - 11904: 0xC0A4, + 22738 - 11904: 0xECCD, + 22739 - 11904: 0xC0A3, + 22740 - 11904: 0xECCB, + 22741 - 11904: 0xC0A2, + 22742 - 11904: 0xECCA, + 22744 - 11904: 0xC253, + 22745 - 11904: 0xC252, + 22746 - 11904: 0xF1F6, + 22747 - 11904: 0xF1F8, + 22748 - 11904: 0xFB72, + 22749 - 11904: 0xF1F7, + 22750 - 11904: 0xC361, + 22751 - 11904: 0xC362, + 22752 - 11904: 0xFB71, + 22754 - 11904: 0xC363, + 22755 - 11904: 0xF442, + 22756 - 11904: 0xC45B, + 22759 - 11904: 0xF7D3, + 22760 - 11904: 0xF7D2, + 22761 - 11904: 0xC5F2, + 22763 - 11904: 0xA468, + 22764 - 11904: 0xA4D0, + 22767 - 11904: 0xA7A7, + 22768 - 11904: 0x895C, + 22770 - 11904: 0x98F0, + 22771 - 11904: 0x96F2, + 22772 - 11904: 0xCE5F, + 22777 - 11904: 0xB3FC, + 22778 - 11904: 0xB3FD, + 22779 - 11904: 0xFB74, + 22780 - 11904: 0xDCF2, + 22781 - 11904: 0xB9D8, + 22782 - 11904: 0xE169, + 22783 - 11904: 0xE553, + 22786 - 11904: 0x8BC1, + 22787 - 11904: 0xC95A, + 22788 - 11904: 0x895D, + 22789 - 11904: 0x89DE, + 22790 - 11904: 0xCAB0, + 22791 - 11904: 0x895E, + 22794 - 11904: 0xC6CA, + 22796 - 11904: 0xCC42, + 22797 - 11904: 0xCE60, + 22798 - 11904: 0xD159, + 22799 - 11904: 0xAE4C, + 22801 - 11904: 0xFE42, + 22802 - 11904: 0xF1F9, + 22804 - 11904: 0xC4DC, + 22805 - 11904: 0xA469, + 22806 - 11904: 0xA57E, + 22807 - 11904: 0xC970, + 22809 - 11904: 0xA667, + 22810 - 11904: 0xA668, + 22812 - 11904: 0xA95D, + 22813 - 11904: 0x8768, + 22815 - 11904: 0xFB7B, + 22816 - 11904: 0xB0F7, + 22818 - 11904: 0xB9DA, + 22820 - 11904: 0xB9DB, + 22821 - 11904: 0xB9D9, + 22823 - 11904: 0xA46A, + 22825 - 11904: 0xA4D1, + 22826 - 11904: 0xA4D3, + 22827 - 11904: 0xA4D2, + 22828 - 11904: 0xC95B, + 22829 - 11904: 0xA4D4, + 22830 - 11904: 0xA5A1, + 22831 - 11904: 0xC971, + 22833 - 11904: 0xA5A2, + 22834 - 11904: 0x895F, + 22836 - 11904: 0x8960, + 22839 - 11904: 0xA669, + 22840 - 11904: 0xA66A, + 22844 - 11904: 0xC9CB, + 22846 - 11904: 0xA7A8, + 22848 - 11904: 0xCAB1, + 22852 - 11904: 0xA961, + 22853 - 11904: 0xCC43, + 22855 - 11904: 0xA95F, + 22856 - 11904: 0xA960, + 22857 - 11904: 0xA95E, + 22858 - 11904: 0xD15A, + 22862 - 11904: 0xABB6, + 22863 - 11904: 0xABB5, + 22864 - 11904: 0xABB7, + 22865 - 11904: 0xABB4, + 22867 - 11904: 0xCE61, + 22868 - 11904: 0xA962, + 22869 - 11904: 0xABB3, + 22871 - 11904: 0xAE4D, + 22872 - 11904: 0xAE4E, + 22874 - 11904: 0xAE4F, + 22876 - 11904: 0xD4CD, + 22880 - 11904: 0xB3FE, + 22881 - 11904: 0xD8B4, + 22882 - 11904: 0xB0F8, + 22885 - 11904: 0x9BCD, + 22887 - 11904: 0xB6F8, + 22889 - 11904: 0xB9DD, + 22890 - 11904: 0xB9DC, + 22891 - 11904: 0xE16A, + 22893 - 11904: 0xBC5D, + 22894 - 11904: 0xBEC4, + 22896 - 11904: 0xEFC0, + 22897 - 11904: 0xF6DA, + 22898 - 11904: 0xF7D4, + 22899 - 11904: 0xA46B, + 22900 - 11904: 0xA5A3, + 22901 - 11904: 0x9DD3, + 22902 - 11904: 0xA5A4, + 22903 - 11904: 0xC9D1, + 22904 - 11904: 0xA66C, + 22905 - 11904: 0xA66F, + 22907 - 11904: 0xC9CF, + 22908 - 11904: 0xC9CD, + 22909 - 11904: 0xA66E, + 22910 - 11904: 0xC9D0, + 22911 - 11904: 0xC9D2, + 22912 - 11904: 0xC9CC, + 22913 - 11904: 0xA671, + 22914 - 11904: 0xA670, + 22915 - 11904: 0xA66D, + 22916 - 11904: 0xA66B, + 22917 - 11904: 0xC9CE, + 22921 - 11904: 0x984C, + 22922 - 11904: 0xA7B3, + 22925 - 11904: 0xA7B0, + 22926 - 11904: 0xCAB6, + 22927 - 11904: 0xCAB9, + 22928 - 11904: 0xCAB8, + 22930 - 11904: 0xA7AA, + 22931 - 11904: 0xA7B2, + 22932 - 11904: 0x9752, + 22934 - 11904: 0xA7AF, + 22935 - 11904: 0xCAB5, + 22936 - 11904: 0xCAB3, + 22937 - 11904: 0xA7AE, + 22938 - 11904: 0x95C3, + 22941 - 11904: 0xA7A9, + 22942 - 11904: 0xA7AC, + 22943 - 11904: 0x9BB6, + 22944 - 11904: 0xCAB4, + 22945 - 11904: 0xCABB, + 22946 - 11904: 0xCAB7, + 22947 - 11904: 0xA7AD, + 22948 - 11904: 0xA7B1, + 22949 - 11904: 0xA7B4, + 22950 - 11904: 0xCAB2, + 22951 - 11904: 0xCABA, + 22952 - 11904: 0xA7AB, + 22956 - 11904: 0x9AB9, + 22958 - 11904: 0xA967, + 22959 - 11904: 0xA96F, + 22960 - 11904: 0x97B3, + 22961 - 11904: 0xCC4F, + 22962 - 11904: 0xCC48, + 22963 - 11904: 0xA970, + 22964 - 11904: 0xCC53, + 22965 - 11904: 0xCC44, + 22966 - 11904: 0xCC4B, + 22967 - 11904: 0x9F74, + 22968 - 11904: 0x92F1, + 22969 - 11904: 0xA966, + 22970 - 11904: 0xCC45, + 22971 - 11904: 0xA964, + 22972 - 11904: 0xCC4C, + 22973 - 11904: 0xCC50, + 22974 - 11904: 0xA963, + 22975 - 11904: 0x8CFA, + 22976 - 11904: 0xCC51, + 22977 - 11904: 0xCC4A, + 22979 - 11904: 0xCC4D, + 22980 - 11904: 0x97DF, + 22981 - 11904: 0xA972, + 22982 - 11904: 0xA969, + 22983 - 11904: 0xCC54, + 22984 - 11904: 0xCC52, + 22985 - 11904: 0xFBA6, + 22986 - 11904: 0xA96E, + 22987 - 11904: 0xA96C, + 22988 - 11904: 0xCC49, + 22989 - 11904: 0xA96B, + 22990 - 11904: 0xCC47, + 22991 - 11904: 0xCC46, + 22992 - 11904: 0xA96A, + 22993 - 11904: 0xA968, + 22994 - 11904: 0xA971, + 22995 - 11904: 0xA96D, + 22996 - 11904: 0xA965, + 22998 - 11904: 0xCC4E, + 23000 - 11904: 0xABB9, + 23001 - 11904: 0xFBAB, + 23002 - 11904: 0xABC0, + 23003 - 11904: 0xCE6F, + 23004 - 11904: 0xABB8, + 23005 - 11904: 0xCE67, + 23006 - 11904: 0xCE63, + 23008 - 11904: 0xCE73, + 23009 - 11904: 0xCE62, + 23011 - 11904: 0xABBB, + 23012 - 11904: 0xCE6C, + 23013 - 11904: 0xABBE, + 23014 - 11904: 0xABC1, + 23016 - 11904: 0xABBC, + 23017 - 11904: 0xCE70, + 23018 - 11904: 0xABBF, + 23019 - 11904: 0x9877, + 23020 - 11904: 0xAE56, + 23021 - 11904: 0xCE76, + 23022 - 11904: 0xCE64, + 23023 - 11904: 0x9854, + 23024 - 11904: 0x95C5, + 23025 - 11904: 0xCE66, + 23026 - 11904: 0xCE6D, + 23027 - 11904: 0xCE71, + 23028 - 11904: 0xCE75, + 23029 - 11904: 0xCE72, + 23030 - 11904: 0xCE6B, + 23031 - 11904: 0xCE6E, + 23032 - 11904: 0x9D55, + 23033 - 11904: 0xFBB2, + 23034 - 11904: 0xCE68, + 23035 - 11904: 0xABC3, + 23036 - 11904: 0xCE6A, + 23037 - 11904: 0xCE69, + 23038 - 11904: 0xCE74, + 23039 - 11904: 0xABBA, + 23040 - 11904: 0xCE65, + 23041 - 11904: 0xABC2, + 23042 - 11904: 0x957E, + 23043 - 11904: 0xABBD, + 23049 - 11904: 0xAE5C, + 23050 - 11904: 0xD162, + 23051 - 11904: 0x9742, + 23052 - 11904: 0xAE5B, + 23053 - 11904: 0x94E6, + 23055 - 11904: 0xD160, + 23057 - 11904: 0xAE50, + 23058 - 11904: 0x92F5, + 23059 - 11904: 0xAE55, + 23061 - 11904: 0xD15F, + 23062 - 11904: 0xD15C, + 23063 - 11904: 0xD161, + 23064 - 11904: 0xAE51, + 23065 - 11904: 0xD15B, + 23066 - 11904: 0x8CC5, + 23067 - 11904: 0xAE54, + 23068 - 11904: 0xAE52, + 23070 - 11904: 0xD163, + 23071 - 11904: 0xAE53, + 23072 - 11904: 0xAE57, + 23073 - 11904: 0x92FD, + 23075 - 11904: 0xAE58, + 23076 - 11904: 0xFBA2, + 23077 - 11904: 0xAE5A, + 23079 - 11904: 0x9C51, + 23081 - 11904: 0xAE59, + 23082 - 11904: 0x94E9, + 23083 - 11904: 0x985C, + 23084 - 11904: 0x92F0, + 23085 - 11904: 0xD15D, + 23086 - 11904: 0xD15E, + 23091 - 11904: 0xD164, + 23093 - 11904: 0xD4D4, + 23094 - 11904: 0xB0F9, + 23095 - 11904: 0xD8C2, + 23096 - 11904: 0xD4D3, + 23097 - 11904: 0xD4E6, + 23100 - 11904: 0xB140, + 23101 - 11904: 0x944C, + 23102 - 11904: 0xD4E4, + 23104 - 11904: 0xB0FE, + 23105 - 11904: 0xB0FA, + 23106 - 11904: 0xD4ED, + 23107 - 11904: 0xD4DD, + 23108 - 11904: 0xD4E0, + 23109 - 11904: 0x916B, + 23110 - 11904: 0xB143, + 23111 - 11904: 0xD4EA, + 23112 - 11904: 0xD4E2, + 23113 - 11904: 0xB0FB, + 23114 - 11904: 0xB144, + 23116 - 11904: 0xD4E7, + 23117 - 11904: 0xD4E5, + 23120 - 11904: 0xD4D6, + 23121 - 11904: 0xD4EB, + 23122 - 11904: 0xD4DF, + 23123 - 11904: 0xD4DA, + 23124 - 11904: 0x8B78, + 23125 - 11904: 0xD4D0, + 23126 - 11904: 0xD4EC, + 23127 - 11904: 0xD4DC, + 23128 - 11904: 0xD4CF, + 23129 - 11904: 0x94E2, + 23130 - 11904: 0xB142, + 23131 - 11904: 0xD4E1, + 23132 - 11904: 0xD4EE, + 23133 - 11904: 0xD4DE, + 23134 - 11904: 0xD4D2, + 23135 - 11904: 0xD4D7, + 23136 - 11904: 0xD4CE, + 23137 - 11904: 0x984F, + 23138 - 11904: 0xB141, + 23139 - 11904: 0xFBB5, + 23140 - 11904: 0xD4DB, + 23141 - 11904: 0xD4D8, + 23142 - 11904: 0xB0FC, + 23143 - 11904: 0xD4D1, + 23144 - 11904: 0x9271, + 23145 - 11904: 0xD4E9, + 23146 - 11904: 0xB0FD, + 23147 - 11904: 0x9365, + 23148 - 11904: 0xD4D9, + 23149 - 11904: 0xD4D5, + 23150 - 11904: 0x985B, + 23152 - 11904: 0xD4E8, + 23153 - 11904: 0x9850, + 23159 - 11904: 0xFBB8, + 23160 - 11904: 0xD8BB, + 23161 - 11904: 0x97BC, + 23162 - 11904: 0xD8B8, + 23163 - 11904: 0xD8C9, + 23164 - 11904: 0xD8BD, + 23165 - 11904: 0xD8CA, + 23166 - 11904: 0x92F3, + 23167 - 11904: 0xB442, + 23169 - 11904: 0x9340, + 23170 - 11904: 0x984D, + 23171 - 11904: 0xD8C6, + 23172 - 11904: 0xD8C3, + 23174 - 11904: 0x9572, + 23176 - 11904: 0xFDEF, + 23178 - 11904: 0xD8C4, + 23179 - 11904: 0xD8C7, + 23180 - 11904: 0xD8CB, + 23182 - 11904: 0xD4E3, + 23183 - 11904: 0xD8CD, + 23184 - 11904: 0xDD47, + 23185 - 11904: 0xFDC1, + 23186 - 11904: 0xB443, + 23187 - 11904: 0xD8CE, + 23188 - 11904: 0xD8B6, + 23189 - 11904: 0xD8C0, + 23190 - 11904: 0xFBBA, + 23191 - 11904: 0xD8C5, + 23193 - 11904: 0x92EB, + 23194 - 11904: 0xB441, + 23195 - 11904: 0xB444, + 23196 - 11904: 0xD8CC, + 23197 - 11904: 0xD8CF, + 23198 - 11904: 0xD8BA, + 23199 - 11904: 0xD8B7, + 23200 - 11904: 0xFC73, + 23201 - 11904: 0x97B7, + 23202 - 11904: 0xD8B9, + 23204 - 11904: 0x876F, + 23205 - 11904: 0xD8BE, + 23206 - 11904: 0xD8BC, + 23207 - 11904: 0xB445, + 23209 - 11904: 0xD8C8, + 23211 - 11904: 0xFBB4, + 23212 - 11904: 0xD8BF, + 23214 - 11904: 0xD8C1, + 23215 - 11904: 0xD8B5, + 23216 - 11904: 0xDCFA, + 23217 - 11904: 0xDCF8, + 23218 - 11904: 0xB742, + 23219 - 11904: 0xB740, + 23220 - 11904: 0xDD43, + 23221 - 11904: 0xDCF9, + 23222 - 11904: 0xDD44, + 23223 - 11904: 0xDD40, + 23224 - 11904: 0xDCF7, + 23225 - 11904: 0xDD46, + 23226 - 11904: 0xDCF6, + 23227 - 11904: 0xDCFD, + 23228 - 11904: 0xB6FE, + 23229 - 11904: 0xB6FD, + 23230 - 11904: 0xB6FC, + 23231 - 11904: 0xDCFB, + 23232 - 11904: 0xDD41, + 23233 - 11904: 0xB6F9, + 23234 - 11904: 0xB741, + 23235 - 11904: 0x90A7, + 23236 - 11904: 0xDCF4, + 23238 - 11904: 0xDCFE, + 23239 - 11904: 0xDCF3, + 23240 - 11904: 0xDCFC, + 23241 - 11904: 0xB6FA, + 23242 - 11904: 0xDD42, + 23243 - 11904: 0xDCF5, + 23244 - 11904: 0xB6FB, + 23245 - 11904: 0xDD45, + 23246 - 11904: 0x9741, + 23247 - 11904: 0x92F4, + 23249 - 11904: 0x8772, + 23251 - 11904: 0xFBBC, + 23253 - 11904: 0xE16E, + 23254 - 11904: 0xB9E2, + 23255 - 11904: 0xB9E1, + 23256 - 11904: 0xB9E3, + 23257 - 11904: 0xE17A, + 23258 - 11904: 0xE170, + 23259 - 11904: 0xE176, + 23260 - 11904: 0xE16B, + 23261 - 11904: 0xE179, + 23262 - 11904: 0xE178, + 23263 - 11904: 0xE17C, + 23264 - 11904: 0xE175, + 23265 - 11904: 0xB9DE, + 23266 - 11904: 0xE174, + 23267 - 11904: 0xB9E4, + 23268 - 11904: 0x9577, + 23269 - 11904: 0xE16D, + 23270 - 11904: 0xB9DF, + 23272 - 11904: 0xE17B, + 23273 - 11904: 0xB9E0, + 23274 - 11904: 0xE16F, + 23275 - 11904: 0xE172, + 23276 - 11904: 0xE177, + 23277 - 11904: 0xE171, + 23278 - 11904: 0xE16C, + 23280 - 11904: 0x9EE2, + 23282 - 11904: 0x8F78, + 23283 - 11904: 0xE173, + 23284 - 11904: 0xE555, + 23285 - 11904: 0xBC61, + 23286 - 11904: 0xE558, + 23287 - 11904: 0xE557, + 23288 - 11904: 0xE55A, + 23289 - 11904: 0xE55C, + 23290 - 11904: 0xF9DC, + 23291 - 11904: 0xBC5F, + 23293 - 11904: 0xE556, + 23294 - 11904: 0x9672, + 23295 - 11904: 0xE554, + 23297 - 11904: 0xE55D, + 23298 - 11904: 0xE55B, + 23299 - 11904: 0xE559, + 23301 - 11904: 0xE55F, + 23303 - 11904: 0xE55E, + 23304 - 11904: 0xBC63, + 23305 - 11904: 0xBC5E, + 23307 - 11904: 0xBC60, + 23308 - 11904: 0xBC62, + 23309 - 11904: 0x9EB5, + 23311 - 11904: 0xE560, + 23312 - 11904: 0xE957, + 23313 - 11904: 0x964B, + 23315 - 11904: 0xE956, + 23316 - 11904: 0xE955, + 23317 - 11904: 0x8CAC, + 23318 - 11904: 0xE958, + 23319 - 11904: 0xE951, + 23321 - 11904: 0xE952, + 23322 - 11904: 0xE95A, + 23323 - 11904: 0xE953, + 23325 - 11904: 0xBEC5, + 23326 - 11904: 0xE95C, + 23327 - 11904: 0xA0FA, + 23328 - 11904: 0xE95B, + 23329 - 11904: 0xE954, + 23331 - 11904: 0xECD1, + 23332 - 11904: 0xC0A8, + 23333 - 11904: 0xECCF, + 23334 - 11904: 0xECD4, + 23335 - 11904: 0xECD3, + 23336 - 11904: 0xE959, + 23338 - 11904: 0xC0A7, + 23339 - 11904: 0x9575, + 23340 - 11904: 0xECD2, + 23341 - 11904: 0xECCE, + 23342 - 11904: 0xECD6, + 23343 - 11904: 0xECD5, + 23344 - 11904: 0xC0A6, + 23346 - 11904: 0xECD0, + 23348 - 11904: 0xBEC6, + 23352 - 11904: 0xC254, + 23356 - 11904: 0xEFC1, + 23357 - 11904: 0xF1FA, + 23358 - 11904: 0xF1FB, + 23359 - 11904: 0xF1FC, + 23360 - 11904: 0xC45C, + 23361 - 11904: 0x90DA, + 23363 - 11904: 0xC45D, + 23364 - 11904: 0x9367, + 23365 - 11904: 0xF443, + 23366 - 11904: 0xFEA4, + 23367 - 11904: 0xF5C8, + 23368 - 11904: 0xF5C7, + 23370 - 11904: 0x90DF, + 23371 - 11904: 0xF6DB, + 23372 - 11904: 0xF6DC, + 23373 - 11904: 0xF7D5, + 23374 - 11904: 0xF8A7, + 23375 - 11904: 0x9354, + 23376 - 11904: 0xA46C, + 23377 - 11904: 0xA46D, + 23379 - 11904: 0xA46E, + 23380 - 11904: 0xA4D5, + 23381 - 11904: 0xA5A5, + 23382 - 11904: 0xC9D3, + 23383 - 11904: 0xA672, + 23384 - 11904: 0xA673, + 23386 - 11904: 0xA7B7, + 23387 - 11904: 0xA7B8, + 23388 - 11904: 0xA7B6, + 23389 - 11904: 0xA7B5, + 23391 - 11904: 0xA973, + 23394 - 11904: 0xCC55, + 23395 - 11904: 0xA975, + 23396 - 11904: 0xA974, + 23397 - 11904: 0xCC56, + 23398 - 11904: 0x8961, + 23400 - 11904: 0x8BB4, + 23401 - 11904: 0xABC4, + 23403 - 11904: 0xAE5D, + 23404 - 11904: 0xD165, + 23405 - 11904: 0x9DC0, + 23406 - 11904: 0xD4F0, + 23408 - 11904: 0xB145, + 23409 - 11904: 0xB447, + 23410 - 11904: 0xD4EF, + 23411 - 11904: 0xB446, + 23412 - 11904: 0x8E48, + 23413 - 11904: 0xB9E5, + 23414 - 11904: 0xFBC5, + 23415 - 11904: 0xE17D, + 23416 - 11904: 0xBEC7, + 23418 - 11904: 0xC0A9, + 23419 - 11904: 0xECD7, + 23420 - 11904: 0xFBC7, + 23421 - 11904: 0xC45E, + 23423 - 11904: 0xC570, + 23424 - 11904: 0xC6CB, + 23425 - 11904: 0xC972, + 23426 - 11904: 0xFA79, + 23427 - 11904: 0xA5A6, + 23428 - 11904: 0xC973, + 23429 - 11904: 0xA676, + 23431 - 11904: 0xA674, + 23432 - 11904: 0xA675, + 23433 - 11904: 0xA677, + 23435 - 11904: 0xA7BA, + 23436 - 11904: 0xA7B9, + 23438 - 11904: 0xCABC, + 23439 - 11904: 0xA7BB, + 23440 - 11904: 0x9E67, + 23442 - 11904: 0xCABD, + 23443 - 11904: 0xCC57, + 23445 - 11904: 0xCC58, + 23446 - 11904: 0x8CD9, + 23447 - 11904: 0xA976, + 23448 - 11904: 0xA978, + 23449 - 11904: 0xA97A, + 23450 - 11904: 0xA977, + 23451 - 11904: 0xA97B, + 23452 - 11904: 0xA979, + 23453 - 11904: 0xFBD2, + 23454 - 11904: 0x8962, + 23455 - 11904: 0x8963, + 23458 - 11904: 0xABC8, + 23459 - 11904: 0xABC5, + 23460 - 11904: 0xABC7, + 23461 - 11904: 0xABC9, + 23462 - 11904: 0xABC6, + 23463 - 11904: 0xD166, + 23464 - 11904: 0xCE77, + 23466 - 11904: 0xFC7D, + 23468 - 11904: 0xD168, + 23469 - 11904: 0xD167, + 23470 - 11904: 0xAE63, + 23472 - 11904: 0xAE5F, + 23475 - 11904: 0xAE60, + 23476 - 11904: 0xAE62, + 23477 - 11904: 0xAE64, + 23478 - 11904: 0xAE61, + 23479 - 11904: 0x8773, + 23480 - 11904: 0xAE66, + 23481 - 11904: 0xAE65, + 23487 - 11904: 0xB14A, + 23488 - 11904: 0xD4F2, + 23489 - 11904: 0xD4F1, + 23490 - 11904: 0xB149, + 23491 - 11904: 0x9F6B, + 23492 - 11904: 0xB148, + 23493 - 11904: 0xB147, + 23494 - 11904: 0xB14B, + 23495 - 11904: 0xB146, + 23498 - 11904: 0xD8D5, + 23499 - 11904: 0xD8D2, + 23500 - 11904: 0xB449, + 23501 - 11904: 0xD8D1, + 23502 - 11904: 0xD8D6, + 23504 - 11904: 0xB44B, + 23505 - 11904: 0xD8D4, + 23506 - 11904: 0xB448, + 23507 - 11904: 0xB44A, + 23508 - 11904: 0xD8D3, + 23509 - 11904: 0xFBCC, + 23510 - 11904: 0xDD48, + 23511 - 11904: 0xFEAE, + 23512 - 11904: 0xDD49, + 23513 - 11904: 0xDD4A, + 23515 - 11904: 0x876D, + 23518 - 11904: 0xB9E6, + 23519 - 11904: 0xB9EE, + 23520 - 11904: 0xE17E, + 23521 - 11904: 0xB9E8, + 23522 - 11904: 0xB9EC, + 23523 - 11904: 0xE1A1, + 23524 - 11904: 0xB9ED, + 23525 - 11904: 0xB9E9, + 23526 - 11904: 0xB9EA, + 23527 - 11904: 0xB9E7, + 23528 - 11904: 0xB9EB, + 23529 - 11904: 0xBC66, + 23530 - 11904: 0xD8D0, + 23531 - 11904: 0xBC67, + 23532 - 11904: 0xBC65, + 23534 - 11904: 0xBC64, + 23535 - 11904: 0xE95D, + 23536 - 11904: 0xBEC8, + 23537 - 11904: 0xECD8, + 23538 - 11904: 0xECD9, + 23539 - 11904: 0xFBD1, + 23541 - 11904: 0xC364, + 23542 - 11904: 0xC45F, + 23544 - 11904: 0xA46F, + 23546 - 11904: 0xA678, + 23551 - 11904: 0xFB75, + 23553 - 11904: 0xABCA, + 23555 - 11904: 0xD169, + 23556 - 11904: 0xAE67, + 23557 - 11904: 0xFBD4, + 23559 - 11904: 0xB14E, + 23560 - 11904: 0xB14D, + 23561 - 11904: 0xB14C, + 23562 - 11904: 0xB44C, + 23563 - 11904: 0xB44D, + 23564 - 11904: 0xD8D7, + 23565 - 11904: 0xB9EF, + 23566 - 11904: 0xBEC9, + 23567 - 11904: 0xA470, + 23568 - 11904: 0xC95C, + 23569 - 11904: 0xA4D6, + 23570 - 11904: 0xC974, + 23571 - 11904: 0xFBD6, + 23572 - 11904: 0xFBD8, + 23573 - 11904: 0xC9D4, + 23574 - 11904: 0xA679, + 23578 - 11904: 0xA97C, + 23580 - 11904: 0x8B5D, + 23582 - 11904: 0x934C, + 23583 - 11904: 0xDD4B, + 23584 - 11904: 0x9AE2, + 23586 - 11904: 0xA471, + 23587 - 11904: 0x8BC9, + 23588 - 11904: 0xA4D7, + 23589 - 11904: 0xC9D5, + 23592 - 11904: 0xCABE, + 23594 - 11904: 0xCABF, + 23596 - 11904: 0xA7BC, + 23600 - 11904: 0xD8D8, + 23601 - 11904: 0xB44E, + 23603 - 11904: 0xDD4C, + 23607 - 11904: 0xC0AA, + 23608 - 11904: 0xA472, + 23609 - 11904: 0xA4A8, + 23610 - 11904: 0xA4D8, + 23611 - 11904: 0xC975, + 23612 - 11904: 0xA5A7, + 23614 - 11904: 0xA7C0, + 23615 - 11904: 0xA7BF, + 23616 - 11904: 0xA7BD, + 23617 - 11904: 0xA7BE, + 23620 - 11904: 0xCC59, + 23621 - 11904: 0xA97E, + 23622 - 11904: 0xA9A1, + 23623 - 11904: 0xCC5A, + 23624 - 11904: 0xA97D, + 23625 - 11904: 0xFBDB, + 23626 - 11904: 0x9FC9, + 23627 - 11904: 0xABCE, + 23628 - 11904: 0xCE78, + 23629 - 11904: 0xABCD, + 23630 - 11904: 0xABCB, + 23631 - 11904: 0xABCC, + 23632 - 11904: 0xAE6A, + 23633 - 11904: 0xAE68, + 23635 - 11904: 0x9F44, + 23636 - 11904: 0xD16B, + 23637 - 11904: 0xAE69, + 23638 - 11904: 0xD16A, + 23640 - 11904: 0xAE5E, + 23641 - 11904: 0xD4F3, + 23644 - 11904: 0xB150, + 23645 - 11904: 0xB151, + 23646 - 11904: 0x98ED, + 23648 - 11904: 0xB14F, + 23650 - 11904: 0xB9F0, + 23651 - 11904: 0xE1A2, + 23652 - 11904: 0xBC68, + 23653 - 11904: 0xBC69, + 23655 - 11904: 0xE561, + 23656 - 11904: 0xC0AB, + 23657 - 11904: 0xEFC2, + 23658 - 11904: 0xEFC3, + 23660 - 11904: 0xC4DD, + 23661 - 11904: 0xF8A8, + 23662 - 11904: 0xC94B, + 23663 - 11904: 0xA4D9, + 23665 - 11904: 0xA473, + 23667 - 11904: 0xC977, + 23668 - 11904: 0xC976, + 23672 - 11904: 0x8CE9, + 23673 - 11904: 0xA67A, + 23674 - 11904: 0xC9D7, + 23675 - 11904: 0xC9D8, + 23676 - 11904: 0xC9D6, + 23678 - 11904: 0xC9D9, + 23685 - 11904: 0xFBDD, + 23686 - 11904: 0xCAC7, + 23688 - 11904: 0xCAC2, + 23689 - 11904: 0xCAC4, + 23690 - 11904: 0xCAC6, + 23691 - 11904: 0xCAC3, + 23692 - 11904: 0xA7C4, + 23693 - 11904: 0xCAC0, + 23695 - 11904: 0xCAC1, + 23696 - 11904: 0xA7C1, + 23697 - 11904: 0xA7C2, + 23698 - 11904: 0xCAC5, + 23699 - 11904: 0xCAC8, + 23700 - 11904: 0xA7C3, + 23701 - 11904: 0xCAC9, + 23705 - 11904: 0x8DF2, + 23706 - 11904: 0x8964, + 23708 - 11904: 0xFDF2, + 23709 - 11904: 0xCC68, + 23710 - 11904: 0x934D, + 23711 - 11904: 0xCC62, + 23712 - 11904: 0xCC5D, + 23713 - 11904: 0xA9A3, + 23714 - 11904: 0xCC65, + 23715 - 11904: 0xCC63, + 23716 - 11904: 0xCC5C, + 23717 - 11904: 0xCC69, + 23718 - 11904: 0xCC6C, + 23719 - 11904: 0xCC67, + 23720 - 11904: 0xCC60, + 23721 - 11904: 0xA9A5, + 23722 - 11904: 0xCC66, + 23723 - 11904: 0xA9A6, + 23724 - 11904: 0xCC61, + 23725 - 11904: 0xCC64, + 23726 - 11904: 0xCC5B, + 23727 - 11904: 0xCC5F, + 23728 - 11904: 0xCC6B, + 23729 - 11904: 0xA9A7, + 23731 - 11904: 0xA9A8, + 23733 - 11904: 0xCC5E, + 23734 - 11904: 0xCC6A, + 23735 - 11904: 0xA9A2, + 23736 - 11904: 0xA9A4, + 23738 - 11904: 0xFBE7, + 23745 - 11904: 0xA0F2, + 23746 - 11904: 0x9868, + 23750 - 11904: 0xCEAB, + 23751 - 11904: 0xCEA4, + 23752 - 11904: 0xCEAA, + 23753 - 11904: 0xCEA3, + 23754 - 11904: 0xCEA5, + 23755 - 11904: 0xCE7D, + 23756 - 11904: 0xCE7B, + 23758 - 11904: 0xCEAC, + 23759 - 11904: 0xCEA9, + 23760 - 11904: 0xCE79, + 23761 - 11904: 0x9F58, + 23762 - 11904: 0xABD0, + 23763 - 11904: 0xCEA7, + 23764 - 11904: 0xCEA8, + 23765 - 11904: 0x8CE6, + 23766 - 11904: 0xCEA6, + 23767 - 11904: 0xCE7C, + 23768 - 11904: 0xCE7A, + 23769 - 11904: 0xABCF, + 23770 - 11904: 0xCEA2, + 23771 - 11904: 0xCE7E, + 23774 - 11904: 0xCEA1, + 23775 - 11904: 0xCEAD, + 23781 - 11904: 0x8D73, + 23784 - 11904: 0xAE6F, + 23785 - 11904: 0xFBDE, + 23786 - 11904: 0xAE6E, + 23788 - 11904: 0xD16C, + 23789 - 11904: 0xAE6B, + 23790 - 11904: 0xD16E, + 23791 - 11904: 0xFBDF, + 23792 - 11904: 0xAE70, + 23793 - 11904: 0xD16F, + 23796 - 11904: 0xAE73, + 23797 - 11904: 0x8C48, + 23798 - 11904: 0xAE71, + 23799 - 11904: 0xD170, + 23800 - 11904: 0xCEAE, + 23801 - 11904: 0xD172, + 23803 - 11904: 0xAE6D, + 23804 - 11904: 0x8774, + 23805 - 11904: 0xAE6C, + 23807 - 11904: 0xD16D, + 23808 - 11904: 0xD171, + 23809 - 11904: 0xAE72, + 23814 - 11904: 0xB153, + 23815 - 11904: 0xB152, + 23819 - 11904: 0xD4F5, + 23820 - 11904: 0xD4F9, + 23821 - 11904: 0xD4FB, + 23822 - 11904: 0xB154, + 23823 - 11904: 0xD4FE, + 23824 - 11904: 0xFBE3, + 23825 - 11904: 0xB158, + 23826 - 11904: 0xD541, + 23828 - 11904: 0xB15A, + 23829 - 11904: 0x8DA8, + 23830 - 11904: 0xB156, + 23831 - 11904: 0xB15E, + 23832 - 11904: 0xFBE4, + 23833 - 11904: 0xB15B, + 23834 - 11904: 0xD4F7, + 23835 - 11904: 0xB155, + 23837 - 11904: 0xD4F6, + 23838 - 11904: 0xD4F4, + 23839 - 11904: 0xD543, + 23840 - 11904: 0xD4F8, + 23842 - 11904: 0xB157, + 23843 - 11904: 0xD542, + 23844 - 11904: 0xB15C, + 23845 - 11904: 0xD4FD, + 23846 - 11904: 0xD4FC, + 23847 - 11904: 0xB15D, + 23848 - 11904: 0xD4FA, + 23849 - 11904: 0xB159, + 23852 - 11904: 0x9C75, + 23854 - 11904: 0xD544, + 23855 - 11904: 0x9878, + 23856 - 11904: 0xD540, + 23857 - 11904: 0xD8E7, + 23858 - 11904: 0xD8EE, + 23859 - 11904: 0xD8E3, + 23860 - 11904: 0xB451, + 23861 - 11904: 0xD8DF, + 23862 - 11904: 0xD8EF, + 23863 - 11904: 0xD8D9, + 23864 - 11904: 0xD8EC, + 23865 - 11904: 0xD8EA, + 23866 - 11904: 0xD8E4, + 23868 - 11904: 0xD8ED, + 23869 - 11904: 0xD8E6, + 23870 - 11904: 0x8D60, + 23871 - 11904: 0xD8DE, + 23872 - 11904: 0xD8F0, + 23873 - 11904: 0xD8DC, + 23874 - 11904: 0xD8E9, + 23875 - 11904: 0xD8DA, + 23877 - 11904: 0xD8F1, + 23878 - 11904: 0xFBE5, + 23879 - 11904: 0xB452, + 23880 - 11904: 0x8D61, + 23881 - 11904: 0xD8EB, + 23882 - 11904: 0xDD4F, + 23883 - 11904: 0xD8DD, + 23884 - 11904: 0xB44F, + 23886 - 11904: 0xD8E1, + 23888 - 11904: 0xB450, + 23889 - 11904: 0xD8E0, + 23890 - 11904: 0xD8E5, + 23893 - 11904: 0xD8E2, + 23894 - 11904: 0x8D62, + 23895 - 11904: 0xA0A1, + 23897 - 11904: 0xD8E8, + 23899 - 11904: 0x9C40, + 23902 - 11904: 0xDD53, + 23906 - 11904: 0xDD56, + 23907 - 11904: 0xDD4E, + 23909 - 11904: 0xDD50, + 23911 - 11904: 0xDD55, + 23912 - 11904: 0xDD54, + 23913 - 11904: 0xB743, + 23915 - 11904: 0xD8DB, + 23916 - 11904: 0xDD52, + 23919 - 11904: 0xB744, + 23920 - 11904: 0x98AD, + 23921 - 11904: 0xDD4D, + 23922 - 11904: 0xDD51, + 23924 - 11904: 0x9EEA, + 23927 - 11904: 0xE1A9, + 23928 - 11904: 0x8CEC, + 23929 - 11904: 0xE1B0, + 23930 - 11904: 0xE1A7, + 23931 - 11904: 0x8CD4, + 23932 - 11904: 0xE1AE, + 23933 - 11904: 0xE1A5, + 23934 - 11904: 0xE1AD, + 23935 - 11904: 0xE1B1, + 23936 - 11904: 0xE1A4, + 23937 - 11904: 0xE1A8, + 23938 - 11904: 0xE1A3, + 23940 - 11904: 0xB9F1, + 23941 - 11904: 0x9CEB, + 23942 - 11904: 0xE1A6, + 23943 - 11904: 0xB9F2, + 23944 - 11904: 0xE1AC, + 23945 - 11904: 0xE1AB, + 23946 - 11904: 0xE1AA, + 23947 - 11904: 0xFBE0, + 23949 - 11904: 0xE1AF, + 23950 - 11904: 0x9F51, + 23954 - 11904: 0xE565, + 23955 - 11904: 0xE567, + 23956 - 11904: 0xBC6B, + 23957 - 11904: 0xE568, + 23959 - 11904: 0xE563, + 23961 - 11904: 0xE562, + 23962 - 11904: 0xE56C, + 23964 - 11904: 0xE56A, + 23965 - 11904: 0xBC6A, + 23966 - 11904: 0xE56D, + 23967 - 11904: 0xE564, + 23968 - 11904: 0xE569, + 23969 - 11904: 0xE56B, + 23970 - 11904: 0xE566, + 23972 - 11904: 0x8D65, + 23975 - 11904: 0xE961, + 23976 - 11904: 0xE966, + 23977 - 11904: 0xE960, + 23978 - 11904: 0xE965, + 23979 - 11904: 0x9CF1, + 23980 - 11904: 0xE95E, + 23981 - 11904: 0xE968, + 23982 - 11904: 0xE964, + 23983 - 11904: 0xE969, + 23984 - 11904: 0xE963, + 23985 - 11904: 0xE95F, + 23986 - 11904: 0xE967, + 23988 - 11904: 0xE96A, + 23989 - 11904: 0xE962, + 23990 - 11904: 0xFC58, + 23991 - 11904: 0xECDA, + 23992 - 11904: 0xC0AF, + 23993 - 11904: 0x8D66, + 23994 - 11904: 0xC0AD, + 23996 - 11904: 0xC0AC, + 23997 - 11904: 0xC0AE, + 24000 - 11904: 0xEFC4, + 24001 - 11904: 0x9654, + 24002 - 11904: 0xF172, + 24003 - 11904: 0xF1FD, + 24006 - 11904: 0xF444, + 24007 - 11904: 0xF445, + 24009 - 11904: 0xC460, + 24011 - 11904: 0xF5C9, + 24013 - 11904: 0xC4DE, + 24015 - 11904: 0xF5CA, + 24017 - 11904: 0xF6DE, + 24018 - 11904: 0xC572, + 24020 - 11904: 0xC571, + 24021 - 11904: 0xF6DD, + 24022 - 11904: 0xC5C9, + 24023 - 11904: 0xFBE8, + 24024 - 11904: 0xF7D6, + 24027 - 11904: 0xC6CC, + 24029 - 11904: 0xA474, + 24030 - 11904: 0xA67B, + 24031 - 11904: 0xC9DA, + 24032 - 11904: 0xCACA, + 24033 - 11904: 0xA8B5, + 24034 - 11904: 0xB15F, + 24037 - 11904: 0xA475, + 24038 - 11904: 0xA5AA, + 24039 - 11904: 0xA5A9, + 24040 - 11904: 0xA5A8, + 24043 - 11904: 0xA7C5, + 24046 - 11904: 0xAE74, + 24048 - 11904: 0xDD57, + 24049 - 11904: 0xA476, + 24050 - 11904: 0xA477, + 24051 - 11904: 0xA478, + 24052 - 11904: 0xA4DA, + 24053 - 11904: 0x9FCE, + 24055 - 11904: 0xABD1, + 24057 - 11904: 0xCEAF, + 24061 - 11904: 0xB453, + 24062 - 11904: 0xA479, + 24063 - 11904: 0xC95D, + 24066 - 11904: 0xA5AB, + 24067 - 11904: 0xA5AC, + 24068 - 11904: 0xC978, + 24070 - 11904: 0xA67C, + 24073 - 11904: 0xFBFC, + 24074 - 11904: 0xCACB, + 24075 - 11904: 0x9AE4, + 24076 - 11904: 0xA7C6, + 24078 - 11904: 0xCACC, + 24081 - 11904: 0xA9AE, + 24082 - 11904: 0x9F75, + 24084 - 11904: 0xCC6E, + 24085 - 11904: 0xA9AC, + 24086 - 11904: 0xA9AB, + 24087 - 11904: 0xCC6D, + 24088 - 11904: 0xA9A9, + 24089 - 11904: 0xCC6F, + 24090 - 11904: 0xA9AA, + 24091 - 11904: 0xA9AD, + 24093 - 11904: 0xABD2, + 24095 - 11904: 0xABD4, + 24096 - 11904: 0xCEB3, + 24097 - 11904: 0xCEB0, + 24098 - 11904: 0xCEB1, + 24099 - 11904: 0xCEB2, + 24100 - 11904: 0xCEB4, + 24101 - 11904: 0xABD3, + 24104 - 11904: 0xD174, + 24105 - 11904: 0xD173, + 24107 - 11904: 0xAE76, + 24109 - 11904: 0xAE75, + 24110 - 11904: 0xFBF1, + 24115 - 11904: 0xB162, + 24116 - 11904: 0xD546, + 24118 - 11904: 0xB161, + 24119 - 11904: 0xB163, + 24120 - 11904: 0xB160, + 24125 - 11904: 0xB455, + 24126 - 11904: 0xD545, + 24128 - 11904: 0xB456, + 24129 - 11904: 0xD8F3, + 24130 - 11904: 0x8D69, + 24131 - 11904: 0xB457, + 24132 - 11904: 0xD8F2, + 24133 - 11904: 0xB454, + 24136 - 11904: 0x934F, + 24138 - 11904: 0xDD5A, + 24139 - 11904: 0xDD5C, + 24140 - 11904: 0xB745, + 24141 - 11904: 0xDD5B, + 24142 - 11904: 0xDD59, + 24143 - 11904: 0xDD58, + 24147 - 11904: 0xE1B4, + 24148 - 11904: 0xB9F7, + 24149 - 11904: 0xB9F5, + 24151 - 11904: 0xB9F6, + 24152 - 11904: 0xE1B2, + 24153 - 11904: 0xE1B3, + 24155 - 11904: 0xB9F3, + 24156 - 11904: 0xE571, + 24157 - 11904: 0xE56F, + 24158 - 11904: 0x934E, + 24159 - 11904: 0xBC6D, + 24160 - 11904: 0xE570, + 24161 - 11904: 0xBC6E, + 24162 - 11904: 0xBC6C, + 24163 - 11904: 0xB9F4, + 24166 - 11904: 0xE96D, + 24167 - 11904: 0xE96B, + 24168 - 11904: 0xE96C, + 24169 - 11904: 0xE56E, + 24170 - 11904: 0xECDC, + 24171 - 11904: 0xC0B0, + 24172 - 11904: 0xECDB, + 24173 - 11904: 0xEFC5, + 24174 - 11904: 0xEFC6, + 24175 - 11904: 0xE96E, + 24176 - 11904: 0xF1FE, + 24178 - 11904: 0xA47A, + 24179 - 11904: 0xA5AD, + 24180 - 11904: 0xA67E, + 24181 - 11904: 0xFBF3, + 24182 - 11904: 0xA67D, + 24184 - 11904: 0xA9AF, + 24185 - 11904: 0xB746, + 24186 - 11904: 0xFBF4, + 24187 - 11904: 0xA4DB, + 24188 - 11904: 0xA5AE, + 24189 - 11904: 0xABD5, + 24190 - 11904: 0xB458, + 24191 - 11904: 0xC6CE, + 24192 - 11904: 0xC979, + 24194 - 11904: 0xC97A, + 24195 - 11904: 0xFBC3, + 24196 - 11904: 0xC9DC, + 24198 - 11904: 0x8965, + 24199 - 11904: 0xA7C8, + 24200 - 11904: 0xCAD0, + 24201 - 11904: 0xCACE, + 24202 - 11904: 0xA7C9, + 24203 - 11904: 0xCACD, + 24204 - 11904: 0xCACF, + 24205 - 11904: 0xCAD1, + 24207 - 11904: 0xA7C7, + 24210 - 11904: 0x8C7A, + 24213 - 11904: 0xA9B3, + 24214 - 11904: 0xA9B4, + 24215 - 11904: 0xA9B1, + 24217 - 11904: 0x8C7B, + 24218 - 11904: 0xA9B0, + 24219 - 11904: 0xCEB8, + 24220 - 11904: 0xA9B2, + 24224 - 11904: 0xABD6, + 24226 - 11904: 0xCEB7, + 24227 - 11904: 0xCEB9, + 24228 - 11904: 0xCEB6, + 24229 - 11904: 0xCEBA, + 24230 - 11904: 0xABD7, + 24231 - 11904: 0xAE79, + 24232 - 11904: 0xD175, + 24234 - 11904: 0xD177, + 24235 - 11904: 0xAE77, + 24236 - 11904: 0xD178, + 24237 - 11904: 0xAE78, + 24238 - 11904: 0xD176, + 24240 - 11904: 0xCEB5, + 24241 - 11904: 0xD547, + 24242 - 11904: 0xD54A, + 24243 - 11904: 0xD54B, + 24244 - 11904: 0xD548, + 24245 - 11904: 0xB167, + 24246 - 11904: 0xB166, + 24247 - 11904: 0xB164, + 24248 - 11904: 0xB165, + 24249 - 11904: 0xD549, + 24253 - 11904: 0x8D6A, + 24254 - 11904: 0xB168, + 24257 - 11904: 0xB45A, + 24258 - 11904: 0xB45B, + 24260 - 11904: 0xB45C, + 24261 - 11904: 0xDD5D, + 24262 - 11904: 0xDD5F, + 24263 - 11904: 0xDD61, + 24264 - 11904: 0xB748, + 24265 - 11904: 0xB747, + 24266 - 11904: 0xB459, + 24267 - 11904: 0xDD60, + 24268 - 11904: 0xDD5E, + 24269 - 11904: 0x9353, + 24270 - 11904: 0xE1B8, + 24272 - 11904: 0xFBF9, + 24273 - 11904: 0xE1B6, + 24274 - 11904: 0xE1BC, + 24275 - 11904: 0xB9F8, + 24276 - 11904: 0xE1BD, + 24277 - 11904: 0xE1BA, + 24278 - 11904: 0xB9F9, + 24279 - 11904: 0xE1B7, + 24280 - 11904: 0xE1B5, + 24281 - 11904: 0xE1BB, + 24282 - 11904: 0xBC70, + 24283 - 11904: 0xE573, + 24284 - 11904: 0xE1B9, + 24285 - 11904: 0xBC72, + 24286 - 11904: 0xE574, + 24287 - 11904: 0xBC71, + 24288 - 11904: 0xBC74, + 24289 - 11904: 0xE575, + 24290 - 11904: 0xBC6F, + 24291 - 11904: 0xBC73, + 24293 - 11904: 0xE973, + 24294 - 11904: 0xE971, + 24295 - 11904: 0xE970, + 24296 - 11904: 0xE972, + 24297 - 11904: 0xE96F, + 24300 - 11904: 0xC366, + 24302 - 11904: 0xF446, + 24303 - 11904: 0xF447, + 24305 - 11904: 0xF5CB, + 24306 - 11904: 0xF6DF, + 24307 - 11904: 0xC655, + 24308 - 11904: 0xFBFD, + 24310 - 11904: 0xA9B5, + 24311 - 11904: 0xA7CA, + 24312 - 11904: 0x9059, + 24313 - 11904: 0xFC40, + 24314 - 11904: 0xABD8, + 24315 - 11904: 0xFC41, + 24316 - 11904: 0xFC43, + 24318 - 11904: 0xA47B, + 24319 - 11904: 0xA4DC, + 24321 - 11904: 0xA5AF, + 24322 - 11904: 0xC9DD, + 24324 - 11904: 0xA7CB, + 24325 - 11904: 0xCAD2, + 24327 - 11904: 0xCEBB, + 24328 - 11904: 0xABD9, + 24330 - 11904: 0xB9FA, + 24331 - 11904: 0xA47C, + 24332 - 11904: 0x9FD8, + 24333 - 11904: 0xFC46, + 24334 - 11904: 0x9362, + 24335 - 11904: 0xA6A1, + 24338 - 11904: 0xB749, + 24339 - 11904: 0xA47D, + 24340 - 11904: 0xA4DD, + 24341 - 11904: 0xA4DE, + 24343 - 11904: 0xA5B1, + 24344 - 11904: 0xA5B0, + 24346 - 11904: 0xC9DE, + 24347 - 11904: 0xA6A2, + 24349 - 11904: 0xCAD3, + 24351 - 11904: 0xA7CC, + 24354 - 11904: 0xCC71, + 24355 - 11904: 0xCC72, + 24356 - 11904: 0xCC73, + 24357 - 11904: 0x8D6B, + 24358 - 11904: 0xA9B6, + 24359 - 11904: 0xA9B7, + 24360 - 11904: 0xCC70, + 24361 - 11904: 0xA9B8, + 24365 - 11904: 0xABDA, + 24366 - 11904: 0xCEBC, + 24368 - 11904: 0xD17A, + 24369 - 11904: 0xAE7A, + 24371 - 11904: 0xD179, + 24373 - 11904: 0xB169, + 24374 - 11904: 0xD54C, + 24375 - 11904: 0xB16A, + 24376 - 11904: 0xD54D, + 24378 - 11904: 0xFC4C, + 24379 - 11904: 0x8CFE, + 24380 - 11904: 0xB45D, + 24384 - 11904: 0xDD62, + 24387 - 11904: 0xE1BF, + 24388 - 11904: 0xE1BE, + 24390 - 11904: 0xB9FB, + 24392 - 11904: 0xBC75, + 24393 - 11904: 0xE576, + 24394 - 11904: 0xBECA, + 24395 - 11904: 0xE974, + 24396 - 11904: 0xC0B1, + 24397 - 11904: 0x95B8, + 24398 - 11904: 0xC573, + 24399 - 11904: 0xF7D8, + 24400 - 11904: 0xC6D0, + 24401 - 11904: 0x8BCA, + 24404 - 11904: 0xCC74, + 24406 - 11904: 0xCEBD, + 24407 - 11904: 0xB16B, + 24408 - 11904: 0xFC4F, + 24409 - 11904: 0xB74A, + 24412 - 11904: 0x987A, + 24413 - 11904: 0xC255, + 24417 - 11904: 0xC6D1, + 24418 - 11904: 0xA7CE, + 24419 - 11904: 0xFC51, + 24420 - 11904: 0xA7CD, + 24421 - 11904: 0xABDB, + 24423 - 11904: 0xD17B, + 24425 - 11904: 0xB16D, + 24426 - 11904: 0xB343, + 24427 - 11904: 0xB16E, + 24428 - 11904: 0xB16C, + 24429 - 11904: 0xB45E, + 24431 - 11904: 0xE1C0, + 24432 - 11904: 0xB9FC, + 24433 - 11904: 0xBC76, + 24434 - 11904: 0xFC54, + 24435 - 11904: 0xC94C, + 24436 - 11904: 0xC9DF, + 24438 - 11904: 0xCAD5, + 24439 - 11904: 0xA7CF, + 24440 - 11904: 0xCAD4, + 24441 - 11904: 0xA7D0, + 24443 - 11904: 0xFAAF, + 24444 - 11904: 0xA9BC, + 24445 - 11904: 0xCC77, + 24446 - 11904: 0xCC76, + 24447 - 11904: 0xA9BB, + 24448 - 11904: 0xA9B9, + 24449 - 11904: 0xA9BA, + 24450 - 11904: 0xCC75, + 24451 - 11904: 0x8D6C, + 24453 - 11904: 0xABDD, + 24454 - 11904: 0xCEBE, + 24455 - 11904: 0xABE0, + 24456 - 11904: 0xABDC, + 24457 - 11904: 0xABE2, + 24458 - 11904: 0xABDE, + 24459 - 11904: 0xABDF, + 24460 - 11904: 0xABE1, + 24464 - 11904: 0xAE7D, + 24465 - 11904: 0xAE7C, + 24466 - 11904: 0xAE7B, + 24470 - 11904: 0xD54F, + 24471 - 11904: 0xB16F, + 24472 - 11904: 0xB172, + 24473 - 11904: 0xB170, + 24475 - 11904: 0xD54E, + 24476 - 11904: 0xB175, + 24478 - 11904: 0xB171, + 24479 - 11904: 0xD550, + 24480 - 11904: 0xB174, + 24481 - 11904: 0xB173, + 24484 - 11904: 0xFA61, + 24485 - 11904: 0xD8F6, + 24486 - 11904: 0xD8F5, + 24487 - 11904: 0xFC57, + 24488 - 11904: 0xB461, + 24489 - 11904: 0xB45F, + 24490 - 11904: 0xB460, + 24491 - 11904: 0xD8F7, + 24492 - 11904: 0xB74B, + 24493 - 11904: 0xDD64, + 24494 - 11904: 0xB74C, + 24495 - 11904: 0xDD63, + 24497 - 11904: 0x9B70, + 24498 - 11904: 0xE577, + 24501 - 11904: 0xBC78, + 24502 - 11904: 0xE1C1, + 24503 - 11904: 0xBC77, + 24505 - 11904: 0xB9FD, + 24506 - 11904: 0xA051, + 24507 - 11904: 0xECDE, + 24508 - 11904: 0xE975, + 24509 - 11904: 0xC0B2, + 24510 - 11904: 0xECDD, + 24511 - 11904: 0xF240, + 24512 - 11904: 0xF448, + 24513 - 11904: 0xF449, + 24514 - 11904: 0x8C7C, + 24515 - 11904: 0xA4DF, + 24516 - 11904: 0x8BCB, + 24517 - 11904: 0xA5B2, + 24521 - 11904: 0xC97B, + 24524 - 11904: 0xA7D2, + 24525 - 11904: 0xA7D4, + 24527 - 11904: 0xC9E2, + 24528 - 11904: 0xCAD8, + 24529 - 11904: 0xCAD7, + 24530 - 11904: 0xCAD6, + 24532 - 11904: 0xC9E1, + 24533 - 11904: 0xC9E0, + 24534 - 11904: 0xA6A4, + 24535 - 11904: 0xA7D3, + 24536 - 11904: 0xA7D1, + 24537 - 11904: 0xA6A3, + 24539 - 11904: 0x936E, + 24541 - 11904: 0xA9BD, + 24542 - 11904: 0xCC78, + 24543 - 11904: 0xFCD5, + 24544 - 11904: 0xA9BE, + 24545 - 11904: 0xCADD, + 24547 - 11904: 0xCADF, + 24548 - 11904: 0xCADE, + 24549 - 11904: 0xCC79, + 24552 - 11904: 0xCADA, + 24554 - 11904: 0xA7D8, + 24555 - 11904: 0xA7D6, + 24557 - 11904: 0xCAD9, + 24558 - 11904: 0xCADB, + 24559 - 11904: 0xCAE1, + 24561 - 11904: 0xA7D5, + 24563 - 11904: 0xCADC, + 24564 - 11904: 0xCAE5, + 24565 - 11904: 0xA9C0, + 24567 - 11904: 0xCAE2, + 24568 - 11904: 0xA7D7, + 24570 - 11904: 0xCAE0, + 24571 - 11904: 0xCAE3, + 24573 - 11904: 0xA9BF, + 24575 - 11904: 0xA9C1, + 24576 - 11904: 0xCAE4, + 24585 - 11904: 0xCCAF, + 24586 - 11904: 0xCCA2, + 24587 - 11904: 0xCC7E, + 24588 - 11904: 0xCCAE, + 24589 - 11904: 0xCCA9, + 24590 - 11904: 0xABE7, + 24591 - 11904: 0xA9C2, + 24592 - 11904: 0xCCAA, + 24593 - 11904: 0xCCAD, + 24594 - 11904: 0xABE3, + 24595 - 11904: 0xCCAC, + 24596 - 11904: 0xA9C3, + 24597 - 11904: 0xA9C8, + 24598 - 11904: 0xA9C6, + 24599 - 11904: 0xCCA3, + 24601 - 11904: 0xCC7C, + 24602 - 11904: 0xCCA5, + 24603 - 11904: 0xA9CD, + 24604 - 11904: 0xCCB0, + 24605 - 11904: 0xABE4, + 24606 - 11904: 0xCCA6, + 24608 - 11904: 0xABE5, + 24609 - 11904: 0xA9C9, + 24610 - 11904: 0xCCA8, + 24611 - 11904: 0xFCA9, + 24612 - 11904: 0xCECD, + 24613 - 11904: 0xABE6, + 24614 - 11904: 0xCC7B, + 24615 - 11904: 0xA9CA, + 24616 - 11904: 0xABE8, + 24617 - 11904: 0xA9CB, + 24618 - 11904: 0xA9C7, + 24619 - 11904: 0xA9CC, + 24620 - 11904: 0xCCA7, + 24621 - 11904: 0xCC7A, + 24622 - 11904: 0xCCAB, + 24623 - 11904: 0xA9C4, + 24625 - 11904: 0xFC61, + 24626 - 11904: 0xCC7D, + 24627 - 11904: 0xCCA4, + 24628 - 11904: 0xCCA1, + 24629 - 11904: 0xA9C5, + 24631 - 11904: 0xCEBF, + 24633 - 11904: 0xCEC0, + 24635 - 11904: 0x8966, + 24640 - 11904: 0xCECA, + 24641 - 11904: 0xD1A1, + 24642 - 11904: 0xCECB, + 24643 - 11904: 0xABEE, + 24644 - 11904: 0xCECE, + 24645 - 11904: 0xCEC4, + 24646 - 11904: 0xABED, + 24647 - 11904: 0xCEC6, + 24649 - 11904: 0xCEC7, + 24650 - 11904: 0xFACB, + 24652 - 11904: 0xCEC9, + 24653 - 11904: 0xABE9, + 24656 - 11904: 0xAEA3, + 24658 - 11904: 0xF9DA, + 24659 - 11904: 0xCEC5, + 24660 - 11904: 0xCEC1, + 24661 - 11904: 0xAEA4, + 24664 - 11904: 0xCECF, + 24665 - 11904: 0xAE7E, + 24666 - 11904: 0xD17D, + 24667 - 11904: 0xCEC8, + 24669 - 11904: 0xD17C, + 24670 - 11904: 0xCEC3, + 24671 - 11904: 0xCECC, + 24674 - 11904: 0xABEC, + 24675 - 11904: 0xAEA1, + 24676 - 11904: 0xABF2, + 24677 - 11904: 0xAEA2, + 24678 - 11904: 0xCED0, + 24679 - 11904: 0xD17E, + 24680 - 11904: 0xABEB, + 24681 - 11904: 0xAEA6, + 24682 - 11904: 0xABF1, + 24683 - 11904: 0xABF0, + 24684 - 11904: 0xABEF, + 24685 - 11904: 0xAEA5, + 24686 - 11904: 0xCED1, + 24687 - 11904: 0xAEA7, + 24688 - 11904: 0xABEA, + 24690 - 11904: 0xCEC2, + 24693 - 11904: 0x937A, + 24695 - 11904: 0xA0E0, + 24702 - 11904: 0x936B, + 24703 - 11904: 0xB176, + 24704 - 11904: 0xD1A4, + 24705 - 11904: 0xD1A6, + 24707 - 11904: 0xD1A8, + 24708 - 11904: 0xAEA8, + 24709 - 11904: 0xAEAE, + 24710 - 11904: 0xD553, + 24711 - 11904: 0xD1AC, + 24712 - 11904: 0xD1A3, + 24713 - 11904: 0xB178, + 24714 - 11904: 0xD551, + 24716 - 11904: 0xAEAD, + 24717 - 11904: 0xAEAB, + 24718 - 11904: 0xD1AE, + 24720 - 11904: 0xD552, + 24722 - 11904: 0xD1A5, + 24724 - 11904: 0xAEAC, + 24725 - 11904: 0xD1A9, + 24726 - 11904: 0xAEAF, + 24727 - 11904: 0xD1AB, + 24730 - 11904: 0xAEAA, + 24731 - 11904: 0xD1AA, + 24732 - 11904: 0xD1AD, + 24733 - 11904: 0xD1A7, + 24734 - 11904: 0xFC6B, + 24735 - 11904: 0xAEA9, + 24736 - 11904: 0xB179, + 24738 - 11904: 0xD1A2, + 24739 - 11904: 0xB177, + 24740 - 11904: 0xFC6C, + 24743 - 11904: 0x9468, + 24744 - 11904: 0xB17A, + 24752 - 11904: 0xD555, + 24753 - 11904: 0xD55E, + 24754 - 11904: 0xB464, + 24755 - 11904: 0xFC6D, + 24756 - 11904: 0xB17C, + 24757 - 11904: 0xB1A3, + 24758 - 11904: 0xB465, + 24759 - 11904: 0xD560, + 24760 - 11904: 0xB1AA, + 24761 - 11904: 0xD8F9, + 24762 - 11904: 0xD556, + 24763 - 11904: 0xB1A2, + 24764 - 11904: 0xB1A5, + 24765 - 11904: 0xB17E, + 24766 - 11904: 0xD554, + 24767 - 11904: 0xD562, + 24768 - 11904: 0xD565, + 24769 - 11904: 0xD949, + 24771 - 11904: 0xD563, + 24772 - 11904: 0xD8FD, + 24773 - 11904: 0xB1A1, + 24774 - 11904: 0xB1A8, + 24775 - 11904: 0xB1AC, + 24776 - 11904: 0xD55D, + 24777 - 11904: 0xD8F8, + 24778 - 11904: 0xD561, + 24779 - 11904: 0xB17B, + 24780 - 11904: 0xD8FA, + 24781 - 11904: 0xD564, + 24782 - 11904: 0xD8FC, + 24783 - 11904: 0xD559, + 24785 - 11904: 0xB462, + 24787 - 11904: 0xD557, + 24788 - 11904: 0xD558, + 24789 - 11904: 0xB1A7, + 24791 - 11904: 0x8D71, + 24792 - 11904: 0xB1A6, + 24793 - 11904: 0xD55B, + 24794 - 11904: 0xB1AB, + 24795 - 11904: 0xD55F, + 24796 - 11904: 0xB1A4, + 24797 - 11904: 0xD55C, + 24798 - 11904: 0xFD64, + 24799 - 11904: 0xB1A9, + 24800 - 11904: 0xB466, + 24801 - 11904: 0xB463, + 24802 - 11904: 0xD8FB, + 24803 - 11904: 0x99BA, + 24804 - 11904: 0xD55A, + 24806 - 11904: 0xB17D, + 24807 - 11904: 0x9AD0, + 24808 - 11904: 0x9A61, + 24809 - 11904: 0xA0E5, + 24816 - 11904: 0xB46B, + 24817 - 11904: 0xB46F, + 24818 - 11904: 0xD940, + 24819 - 11904: 0xB751, + 24820 - 11904: 0xB46D, + 24821 - 11904: 0xD944, + 24822 - 11904: 0xB471, + 24823 - 11904: 0xDD65, + 24824 - 11904: 0xD946, + 24825 - 11904: 0xB753, + 24826 - 11904: 0xB469, + 24827 - 11904: 0xB46C, + 24828 - 11904: 0xD947, + 24829 - 11904: 0xA05B, + 24830 - 11904: 0xD948, + 24831 - 11904: 0xD94E, + 24832 - 11904: 0xB473, + 24833 - 11904: 0xB754, + 24835 - 11904: 0xD94A, + 24836 - 11904: 0xD94F, + 24837 - 11904: 0xD943, + 24838 - 11904: 0xB75E, + 24839 - 11904: 0x96AC, + 24840 - 11904: 0xB755, + 24841 - 11904: 0xB472, + 24842 - 11904: 0xD941, + 24843 - 11904: 0xD950, + 24844 - 11904: 0x9740, + 24845 - 11904: 0xB75D, + 24846 - 11904: 0xB470, + 24847 - 11904: 0xB74E, + 24848 - 11904: 0xD94D, + 24850 - 11904: 0xB474, + 24851 - 11904: 0xD945, + 24852 - 11904: 0xD8FE, + 24853 - 11904: 0xB46A, + 24854 - 11904: 0xD942, + 24856 - 11904: 0xD94B, + 24857 - 11904: 0x9EF1, + 24858 - 11904: 0xB74D, + 24859 - 11904: 0xB752, + 24860 - 11904: 0xB467, + 24861 - 11904: 0xD94C, + 24863 - 11904: 0xB750, + 24866 - 11904: 0x8C4D, + 24867 - 11904: 0xB468, + 24871 - 11904: 0xB75C, + 24872 - 11904: 0xE1C3, + 24873 - 11904: 0xDD70, + 24875 - 11904: 0xDD68, + 24876 - 11904: 0xE1C2, + 24878 - 11904: 0xDD6C, + 24879 - 11904: 0xDD6E, + 24880 - 11904: 0x9F7E, + 24882 - 11904: 0xDD6B, + 24884 - 11904: 0xB75B, + 24886 - 11904: 0xDD6A, + 24887 - 11904: 0xB75F, + 24891 - 11904: 0xE1D2, + 24893 - 11904: 0x8D72, + 24894 - 11904: 0xB75A, + 24895 - 11904: 0xBA40, + 24896 - 11904: 0xDD71, + 24897 - 11904: 0xE1C4, + 24898 - 11904: 0xFC76, + 24900 - 11904: 0xB758, + 24901 - 11904: 0xDD69, + 24902 - 11904: 0xDD6D, + 24903 - 11904: 0xB9FE, + 24904 - 11904: 0xB74F, + 24905 - 11904: 0xDD66, + 24906 - 11904: 0xDD67, + 24907 - 11904: 0xBA41, + 24908 - 11904: 0xB757, + 24909 - 11904: 0xB759, + 24910 - 11904: 0xB756, + 24911 - 11904: 0xDD6F, + 24912 - 11904: 0x96A9, + 24914 - 11904: 0xE1C8, + 24915 - 11904: 0xE1C9, + 24916 - 11904: 0xE1CE, + 24917 - 11904: 0xBC7D, + 24918 - 11904: 0xE1D5, + 24920 - 11904: 0xBA47, + 24921 - 11904: 0xA06E, + 24922 - 11904: 0xBA46, + 24923 - 11904: 0xE1D0, + 24924 - 11904: 0xFCAA, + 24925 - 11904: 0xBC7C, + 24926 - 11904: 0xE1C5, + 24927 - 11904: 0xBA45, + 24928 - 11904: 0xFBCD, + 24929 - 11904: 0xE1D4, + 24930 - 11904: 0xBA43, + 24931 - 11904: 0xBA44, + 24932 - 11904: 0xFC74, + 24933 - 11904: 0xE1D1, + 24934 - 11904: 0xE5AA, + 24935 - 11904: 0xBC7A, + 24936 - 11904: 0xB46E, + 24938 - 11904: 0xE1D3, + 24939 - 11904: 0xBCA3, + 24940 - 11904: 0xE1CB, + 24942 - 11904: 0xBC7B, + 24943 - 11904: 0xA074, + 24944 - 11904: 0xBCA2, + 24945 - 11904: 0xE1C6, + 24946 - 11904: 0xE1CA, + 24947 - 11904: 0xE1C7, + 24948 - 11904: 0xE1CD, + 24949 - 11904: 0xBA48, + 24950 - 11904: 0xBC79, + 24951 - 11904: 0xBA42, + 24953 - 11904: 0xE57A, + 24954 - 11904: 0xE1CF, + 24956 - 11904: 0xBCA1, + 24957 - 11904: 0xA071, + 24958 - 11904: 0xBCA4, + 24960 - 11904: 0xE1CC, + 24961 - 11904: 0xFC79, + 24962 - 11904: 0xBC7E, + 24963 - 11904: 0xE579, + 24967 - 11904: 0xFC7C, + 24969 - 11904: 0xE57E, + 24970 - 11904: 0xBECE, + 24971 - 11904: 0xE578, + 24972 - 11904: 0xE9A3, + 24973 - 11904: 0xE5A9, + 24974 - 11904: 0xBCA8, + 24976 - 11904: 0xBCA6, + 24977 - 11904: 0xBECC, + 24978 - 11904: 0xE5A6, + 24979 - 11904: 0xE5A2, + 24980 - 11904: 0xBCAC, + 24981 - 11904: 0x9C50, + 24982 - 11904: 0xE978, + 24984 - 11904: 0x9379, + 24985 - 11904: 0x9378, + 24986 - 11904: 0xBCAA, + 24987 - 11904: 0xE5A1, + 24988 - 11904: 0xA0DD, + 24989 - 11904: 0xE976, + 24991 - 11904: 0xE5A5, + 24993 - 11904: 0xE5A8, + 24994 - 11904: 0xE57D, + 24996 - 11904: 0xBCAB, + 24999 - 11904: 0xBCA5, + 25000 - 11904: 0xE977, + 25001 - 11904: 0xBECD, + 25002 - 11904: 0xE5A7, + 25003 - 11904: 0xBCA7, + 25004 - 11904: 0xBCA9, + 25005 - 11904: 0xE5A4, + 25006 - 11904: 0xBCAD, + 25007 - 11904: 0xE5A3, + 25008 - 11904: 0xE57C, + 25009 - 11904: 0xE57B, + 25010 - 11904: 0xBECB, + 25011 - 11904: 0xE5AB, + 25012 - 11904: 0xE97A, + 25013 - 11904: 0xECE0, + 25014 - 11904: 0xBED0, + 25015 - 11904: 0x8D75, + 25016 - 11904: 0xE9A2, + 25017 - 11904: 0x8D76, + 25018 - 11904: 0xE97E, + 25020 - 11904: 0xECE1, + 25022 - 11904: 0xBED1, + 25023 - 11904: 0xE9A1, + 25024 - 11904: 0x9374, + 25025 - 11904: 0xE97C, + 25026 - 11904: 0xC0B4, + 25027 - 11904: 0xECDF, + 25029 - 11904: 0xE979, + 25030 - 11904: 0xE97B, + 25031 - 11904: 0xC0B5, + 25032 - 11904: 0xBED3, + 25033 - 11904: 0xC0B3, + 25034 - 11904: 0xBED2, + 25035 - 11904: 0xC0B7, + 25036 - 11904: 0xE97D, + 25037 - 11904: 0xBECF, + 25039 - 11904: 0x8D77, + 25040 - 11904: 0xFCA5, + 25043 - 11904: 0xFCA2, + 25046 - 11904: 0xEFCF, + 25048 - 11904: 0xEFC7, + 25050 - 11904: 0x90C3, + 25054 - 11904: 0xECE7, + 25055 - 11904: 0xEFC8, + 25056 - 11904: 0xECE3, + 25058 - 11904: 0xA079, + 25059 - 11904: 0xC256, + 25060 - 11904: 0xECE5, + 25061 - 11904: 0xECE4, + 25062 - 11904: 0xC0B6, + 25063 - 11904: 0xECE2, + 25064 - 11904: 0xECE6, + 25065 - 11904: 0xEFD0, + 25066 - 11904: 0xEFCC, + 25067 - 11904: 0xEFCE, + 25069 - 11904: 0xEFC9, + 25070 - 11904: 0xEFCA, + 25072 - 11904: 0xEFCD, + 25073 - 11904: 0xEFCB, + 25074 - 11904: 0xC367, + 25077 - 11904: 0xC36A, + 25078 - 11904: 0xC369, + 25079 - 11904: 0xC368, + 25080 - 11904: 0xC461, + 25081 - 11904: 0xF44A, + 25082 - 11904: 0xC462, + 25083 - 11904: 0xF241, + 25084 - 11904: 0xC4DF, + 25085 - 11904: 0xF5CC, + 25086 - 11904: 0xC4E0, + 25087 - 11904: 0xC574, + 25088 - 11904: 0xC5CA, + 25089 - 11904: 0xF7D9, + 25091 - 11904: 0xF7DA, + 25092 - 11904: 0xF7DB, + 25095 - 11904: 0xF9BA, + 25096 - 11904: 0xA4E0, + 25097 - 11904: 0xC97C, + 25098 - 11904: 0xA5B3, + 25100 - 11904: 0xA6A6, + 25101 - 11904: 0xA6A7, + 25102 - 11904: 0xA6A5, + 25104 - 11904: 0xA6A8, + 25105 - 11904: 0xA7DA, + 25106 - 11904: 0xA7D9, + 25108 - 11904: 0xCCB1, + 25109 - 11904: 0xA9CF, + 25110 - 11904: 0xA9CE, + 25113 - 11904: 0xD1AF, + 25114 - 11904: 0xB1AD, + 25115 - 11904: 0xB1AE, + 25119 - 11904: 0xB475, + 25120 - 11904: 0xDD72, + 25121 - 11904: 0xB760, + 25122 - 11904: 0xB761, + 25123 - 11904: 0xDD74, + 25124 - 11904: 0xDD76, + 25125 - 11904: 0xDD75, + 25127 - 11904: 0xE1D7, + 25129 - 11904: 0xE1D6, + 25130 - 11904: 0xBA49, + 25131 - 11904: 0xE1D8, + 25132 - 11904: 0x8D79, + 25133 - 11904: 0xE5AC, + 25134 - 11904: 0xBCAE, + 25136 - 11904: 0xBED4, + 25138 - 11904: 0xC0B8, + 25139 - 11904: 0xC257, + 25140 - 11904: 0xC0B9, + 25142 - 11904: 0xA4E1, + 25143 - 11904: 0x8BFC, + 25145 - 11904: 0xA076, + 25146 - 11904: 0xCAE6, + 25149 - 11904: 0xCCB2, + 25150 - 11904: 0xA9D1, + 25151 - 11904: 0xA9D0, + 25152 - 11904: 0xA9D2, + 25153 - 11904: 0xABF3, + 25154 - 11904: 0xCED2, + 25155 - 11904: 0xCED3, + 25158 - 11904: 0xD1B0, + 25159 - 11904: 0xAEB0, + 25160 - 11904: 0xB1AF, + 25161 - 11904: 0xB476, + 25162 - 11904: 0xD951, + 25163 - 11904: 0xA4E2, + 25164 - 11904: 0x8BCD, + 25165 - 11904: 0xA47E, + 25166 - 11904: 0xA4E3, + 25168 - 11904: 0xC97D, + 25169 - 11904: 0xA5B7, + 25170 - 11904: 0xA5B6, + 25171 - 11904: 0xA5B4, + 25172 - 11904: 0xA5B5, + 25176 - 11904: 0xA6AB, + 25177 - 11904: 0xC9E9, + 25178 - 11904: 0xC9EB, + 25179 - 11904: 0xA6AA, + 25180 - 11904: 0xC9E3, + 25182 - 11904: 0xC9E4, + 25184 - 11904: 0xC9EA, + 25185 - 11904: 0xC9E6, + 25186 - 11904: 0xC9E8, + 25187 - 11904: 0xA6A9, + 25188 - 11904: 0xC9E5, + 25189 - 11904: 0xC9EC, + 25190 - 11904: 0xC9E7, + 25192 - 11904: 0x9F5A, + 25197 - 11904: 0xA7E1, + 25198 - 11904: 0xA7EA, + 25199 - 11904: 0xA7E8, + 25200 - 11904: 0xCAF0, + 25201 - 11904: 0xCAED, + 25202 - 11904: 0xCAF5, + 25203 - 11904: 0xA7E6, + 25204 - 11904: 0xCAF6, + 25206 - 11904: 0xA7DF, + 25207 - 11904: 0xCAF3, + 25209 - 11904: 0xA7E5, + 25210 - 11904: 0xCAEF, + 25211 - 11904: 0xCAEE, + 25212 - 11904: 0xA7E3, + 25213 - 11904: 0xCAF4, + 25214 - 11904: 0xA7E4, + 25215 - 11904: 0xA9D3, + 25216 - 11904: 0xA7DE, + 25217 - 11904: 0xCAF1, + 25218 - 11904: 0x9FF4, + 25219 - 11904: 0xCAE7, + 25220 - 11904: 0xA7DB, + 25221 - 11904: 0x9FBA, + 25222 - 11904: 0xA7EE, + 25223 - 11904: 0xCAEC, + 25224 - 11904: 0xCAF2, + 25225 - 11904: 0xA7E0, + 25226 - 11904: 0xA7E2, + 25228 - 11904: 0xCAE8, + 25230 - 11904: 0xCAE9, + 25231 - 11904: 0xCAEA, + 25232 - 11904: 0x8D7A, + 25233 - 11904: 0xA7ED, + 25234 - 11904: 0xA7E7, + 25235 - 11904: 0xA7EC, + 25236 - 11904: 0xCAEB, + 25237 - 11904: 0xA7EB, + 25238 - 11904: 0xA7DD, + 25239 - 11904: 0xA7DC, + 25240 - 11904: 0xA7E9, + 25245 - 11904: 0x9E45, + 25252 - 11904: 0x93B0, + 25254 - 11904: 0xA075, + 25256 - 11904: 0xA9E1, + 25257 - 11904: 0xCCBE, + 25258 - 11904: 0xCCB7, + 25259 - 11904: 0xA9DC, + 25260 - 11904: 0xA9EF, + 25261 - 11904: 0xCCB3, + 25262 - 11904: 0xCCBA, + 25263 - 11904: 0xCCBC, + 25264 - 11904: 0xCCBF, + 25265 - 11904: 0xA9EA, + 25267 - 11904: 0xCCBB, + 25268 - 11904: 0xCCB4, + 25269 - 11904: 0xA9E8, + 25270 - 11904: 0xCCB8, + 25272 - 11904: 0xCCC0, + 25273 - 11904: 0xA9D9, + 25275 - 11904: 0xCCBD, + 25276 - 11904: 0xA9E3, + 25277 - 11904: 0xA9E2, + 25278 - 11904: 0xCCB6, + 25279 - 11904: 0xA9D7, + 25281 - 11904: 0x87DD, + 25282 - 11904: 0xA9D8, + 25283 - 11904: 0x9B46, + 25284 - 11904: 0xA9D6, + 25285 - 11904: 0xFCAE, + 25286 - 11904: 0xA9EE, + 25287 - 11904: 0xA9E6, + 25288 - 11904: 0xA9E0, + 25289 - 11904: 0xA9D4, + 25290 - 11904: 0xCCB9, + 25291 - 11904: 0xA9DF, + 25292 - 11904: 0xA9D5, + 25293 - 11904: 0xA9E7, + 25294 - 11904: 0xA9F0, + 25295 - 11904: 0xCED4, + 25296 - 11904: 0xA9E4, + 25297 - 11904: 0xCCB5, + 25298 - 11904: 0xA9DA, + 25299 - 11904: 0xA9DD, + 25300 - 11904: 0xA9DE, + 25301 - 11904: 0xFCB0, + 25302 - 11904: 0xA9EC, + 25303 - 11904: 0xA9ED, + 25304 - 11904: 0xA9EB, + 25305 - 11904: 0xA9E5, + 25306 - 11904: 0xA9E9, + 25307 - 11904: 0xA9DB, + 25308 - 11904: 0xABF4, + 25311 - 11904: 0xFA51, + 25317 - 11904: 0x8D7B, + 25323 - 11904: 0xCEDA, + 25324 - 11904: 0xAC41, + 25325 - 11904: 0xABF8, + 25326 - 11904: 0xABFA, + 25327 - 11904: 0xAC40, + 25328 - 11904: 0xCEE6, + 25329 - 11904: 0xABFD, + 25330 - 11904: 0xD1B1, + 25331 - 11904: 0xAEB1, + 25332 - 11904: 0xAC43, + 25333 - 11904: 0xCED7, + 25334 - 11904: 0xCEDF, + 25335 - 11904: 0xABFE, + 25336 - 11904: 0xCEDE, + 25337 - 11904: 0xCEDB, + 25338 - 11904: 0xCEE3, + 25339 - 11904: 0xCEE5, + 25340 - 11904: 0xABF7, + 25341 - 11904: 0xABFB, + 25342 - 11904: 0xAC42, + 25343 - 11904: 0xAEB3, + 25344 - 11904: 0xCEE0, + 25345 - 11904: 0xABF9, + 25346 - 11904: 0xAC45, + 25347 - 11904: 0xCED9, + 25351 - 11904: 0xABFC, + 25352 - 11904: 0xAEB2, + 25353 - 11904: 0xABF6, + 25355 - 11904: 0xCED6, + 25356 - 11904: 0xCEDD, + 25357 - 11904: 0xCED5, + 25358 - 11904: 0xCED8, + 25359 - 11904: 0xCEDC, + 25360 - 11904: 0xD1B2, + 25361 - 11904: 0xAC44, + 25363 - 11904: 0xCEE1, + 25364 - 11904: 0xCEE2, + 25365 - 11904: 0xCEE4, + 25366 - 11904: 0xABF5, + 25368 - 11904: 0x8D7C, + 25384 - 11904: 0xAEC1, + 25385 - 11904: 0xD1BE, + 25386 - 11904: 0xAEBF, + 25387 - 11904: 0xAEC0, + 25388 - 11904: 0xD1B4, + 25389 - 11904: 0xD1C4, + 25390 - 11904: 0x9ED6, + 25391 - 11904: 0xAEB6, + 25393 - 11904: 0x93AC, + 25394 - 11904: 0xD566, + 25395 - 11904: 0xD1C6, + 25396 - 11904: 0xD1C0, + 25397 - 11904: 0x9F5B, + 25398 - 11904: 0xD1B7, + 25399 - 11904: 0x93A9, + 25400 - 11904: 0xD1C9, + 25401 - 11904: 0xD1BA, + 25402 - 11904: 0xAEBC, + 25403 - 11904: 0xD57D, + 25404 - 11904: 0xD1BD, + 25405 - 11904: 0xAEBE, + 25406 - 11904: 0xAEB5, + 25408 - 11904: 0xD1CB, + 25409 - 11904: 0xD1BF, + 25410 - 11904: 0xAEB8, + 25411 - 11904: 0xD1B8, + 25412 - 11904: 0xD1B5, + 25413 - 11904: 0xD1B6, + 25414 - 11904: 0xAEB9, + 25415 - 11904: 0xD1C5, + 25416 - 11904: 0xD1CC, + 25417 - 11904: 0xAEBB, + 25418 - 11904: 0xD1BC, + 25419 - 11904: 0xD1BB, + 25420 - 11904: 0xAEC3, + 25421 - 11904: 0xAEC2, + 25422 - 11904: 0xAEB4, + 25423 - 11904: 0xAEBA, + 25424 - 11904: 0xAEBD, + 25425 - 11904: 0xD1C8, + 25428 - 11904: 0xD1C2, + 25429 - 11904: 0xAEB7, + 25430 - 11904: 0xD1B3, + 25431 - 11904: 0xD1CA, + 25432 - 11904: 0xD1C1, + 25433 - 11904: 0xD1C3, + 25434 - 11904: 0xD1C7, + 25444 - 11904: 0xA07C, + 25445 - 11904: 0xD567, + 25447 - 11904: 0xB1B7, + 25448 - 11904: 0xB1CB, + 25449 - 11904: 0xB1CA, + 25451 - 11904: 0xB1BF, + 25452 - 11904: 0xFCB2, + 25453 - 11904: 0xD579, + 25454 - 11904: 0xD575, + 25455 - 11904: 0xD572, + 25456 - 11904: 0xD5A6, + 25457 - 11904: 0xB1BA, + 25458 - 11904: 0xB1B2, + 25461 - 11904: 0xD577, + 25462 - 11904: 0xB4A8, + 25463 - 11904: 0xB1B6, + 25464 - 11904: 0xD5A1, + 25465 - 11904: 0x8AC1, + 25466 - 11904: 0xB1CC, + 25467 - 11904: 0xB1C9, + 25468 - 11904: 0xD57B, + 25469 - 11904: 0xD56A, + 25471 - 11904: 0x9FB4, + 25472 - 11904: 0xB1C8, + 25473 - 11904: 0xD5A3, + 25474 - 11904: 0xD569, + 25475 - 11904: 0xB1BD, + 25476 - 11904: 0xB1C1, + 25477 - 11904: 0xD5A2, + 25479 - 11904: 0xD573, + 25480 - 11904: 0xB1C2, + 25481 - 11904: 0xB1BC, + 25482 - 11904: 0xD568, + 25483 - 11904: 0xFCAC, + 25484 - 11904: 0xB478, + 25485 - 11904: 0xD5A5, + 25486 - 11904: 0xD571, + 25487 - 11904: 0xB1C7, + 25488 - 11904: 0xD574, + 25489 - 11904: 0xD5A4, + 25490 - 11904: 0xB1C6, + 25492 - 11904: 0xD952, + 25494 - 11904: 0xB1B3, + 25495 - 11904: 0xD56F, + 25496 - 11904: 0xB1B8, + 25497 - 11904: 0xB1C3, + 25499 - 11904: 0xB1BE, + 25500 - 11904: 0xD578, + 25501 - 11904: 0xD56E, + 25502 - 11904: 0xD56C, + 25503 - 11904: 0xD57E, + 25504 - 11904: 0xB1B0, + 25505 - 11904: 0xB1C4, + 25506 - 11904: 0xB1B4, + 25507 - 11904: 0xB477, + 25508 - 11904: 0xD57C, + 25509 - 11904: 0xB1B5, + 25511 - 11904: 0xB1B1, + 25512 - 11904: 0xB1C0, + 25513 - 11904: 0xB1BB, + 25514 - 11904: 0xB1B9, + 25515 - 11904: 0xD570, + 25516 - 11904: 0xB1C5, + 25517 - 11904: 0xD56D, + 25518 - 11904: 0xD57A, + 25519 - 11904: 0xD576, + 25520 - 11904: 0xD954, + 25521 - 11904: 0xD953, + 25529 - 11904: 0x9E4C, + 25533 - 11904: 0xD56B, + 25534 - 11904: 0xD964, + 25536 - 11904: 0xB47A, + 25537 - 11904: 0x8FC5, + 25538 - 11904: 0xD96A, + 25539 - 11904: 0xD959, + 25540 - 11904: 0xD967, + 25541 - 11904: 0xDD77, + 25542 - 11904: 0xB47D, + 25543 - 11904: 0xD96B, + 25544 - 11904: 0xD96E, + 25545 - 11904: 0xB47C, + 25546 - 11904: 0xD95C, + 25547 - 11904: 0xD96D, + 25548 - 11904: 0xD96C, + 25549 - 11904: 0xB47E, + 25550 - 11904: 0xD955, + 25551 - 11904: 0xB479, + 25552 - 11904: 0xB4A3, + 25553 - 11904: 0x93AD, + 25554 - 11904: 0xB4A1, + 25555 - 11904: 0xD969, + 25557 - 11904: 0xD95F, + 25558 - 11904: 0xB4A5, + 25559 - 11904: 0xD970, + 25560 - 11904: 0xD968, + 25561 - 11904: 0xD971, + 25562 - 11904: 0xB4AD, + 25563 - 11904: 0xB4AB, + 25564 - 11904: 0xD966, + 25565 - 11904: 0xD965, + 25566 - 11904: 0x9DC3, + 25567 - 11904: 0xD963, + 25568 - 11904: 0xD95D, + 25569 - 11904: 0xB4A4, + 25570 - 11904: 0x8DA2, + 25571 - 11904: 0xB4A2, + 25572 - 11904: 0xD1B9, + 25573 - 11904: 0xD956, + 25574 - 11904: 0x9D4A, + 25575 - 11904: 0xDDB7, + 25576 - 11904: 0xD957, + 25577 - 11904: 0xB47B, + 25578 - 11904: 0xB4AA, + 25579 - 11904: 0xDD79, + 25581 - 11904: 0xB4A6, + 25582 - 11904: 0xB4A7, + 25583 - 11904: 0xD958, + 25584 - 11904: 0xD96F, + 25585 - 11904: 0xDD78, + 25586 - 11904: 0xD960, + 25587 - 11904: 0xD95B, + 25588 - 11904: 0xB4A9, + 25589 - 11904: 0xD961, + 25590 - 11904: 0xD95E, + 25592 - 11904: 0xFCB6, + 25593 - 11904: 0xB4AE, + 25595 - 11904: 0x8DA3, + 25596 - 11904: 0x9E4B, + 25598 - 11904: 0x9E4D, + 25606 - 11904: 0xB770, + 25607 - 11904: 0x8DA4, + 25609 - 11904: 0xDD7C, + 25610 - 11904: 0xDDB1, + 25611 - 11904: 0xDDB6, + 25612 - 11904: 0xDDAA, + 25613 - 11904: 0xB76C, + 25614 - 11904: 0xDDBB, + 25615 - 11904: 0xB769, + 25616 - 11904: 0xDD7A, + 25618 - 11904: 0xDD7B, + 25619 - 11904: 0xB762, + 25620 - 11904: 0xB76B, + 25621 - 11904: 0xDDA4, + 25622 - 11904: 0xB76E, + 25623 - 11904: 0xB76F, + 25624 - 11904: 0xDDA5, + 25626 - 11904: 0xDDB2, + 25627 - 11904: 0xDDB8, + 25628 - 11904: 0xB76A, + 25630 - 11904: 0xB764, + 25631 - 11904: 0xDDA3, + 25632 - 11904: 0xDD7D, + 25633 - 11904: 0xDDBA, + 25634 - 11904: 0xDDA8, + 25635 - 11904: 0xDDA9, + 25636 - 11904: 0xDD7E, + 25637 - 11904: 0xDDB4, + 25638 - 11904: 0xDDAB, + 25639 - 11904: 0xDDB5, + 25640 - 11904: 0xDDAD, + 25642 - 11904: 0xB765, + 25643 - 11904: 0xE1D9, + 25644 - 11904: 0xB768, + 25645 - 11904: 0xB766, + 25646 - 11904: 0xDDB9, + 25647 - 11904: 0xDDB0, + 25648 - 11904: 0xDDAC, + 25650 - 11904: 0x8AFD, + 25651 - 11904: 0xDDA1, + 25652 - 11904: 0xBA53, + 25653 - 11904: 0xDDAF, + 25654 - 11904: 0xB76D, + 25655 - 11904: 0xDDA7, + 25656 - 11904: 0xFCB5, + 25657 - 11904: 0xDDA6, + 25658 - 11904: 0xFCC3, + 25659 - 11904: 0x93B2, + 25661 - 11904: 0xB767, + 25662 - 11904: 0xB763, + 25663 - 11904: 0xE1EE, + 25664 - 11904: 0xDDB3, + 25665 - 11904: 0xDDAE, + 25667 - 11904: 0xDDA2, + 25675 - 11904: 0xE1E9, + 25677 - 11904: 0xE1DA, + 25678 - 11904: 0xE1E5, + 25680 - 11904: 0xE1EC, + 25681 - 11904: 0xBA51, + 25682 - 11904: 0xB4AC, + 25683 - 11904: 0xE1EA, + 25684 - 11904: 0xBA4C, + 25688 - 11904: 0xBA4B, + 25689 - 11904: 0xE1F1, + 25690 - 11904: 0x8DA5, + 25691 - 11904: 0xE1DB, + 25692 - 11904: 0xE1E8, + 25693 - 11904: 0xE1DC, + 25694 - 11904: 0xE1E7, + 25695 - 11904: 0xBA4F, + 25696 - 11904: 0xE1EB, + 25697 - 11904: 0xD962, + 25701 - 11904: 0xE1F2, + 25702 - 11904: 0xE1E3, + 25703 - 11904: 0xBA52, + 25704 - 11904: 0xE5BA, + 25705 - 11904: 0xBCAF, + 25707 - 11904: 0xE1F0, + 25708 - 11904: 0xE1EF, + 25709 - 11904: 0xBA54, + 25710 - 11904: 0xE5AD, + 25711 - 11904: 0xBCB0, + 25712 - 11904: 0xE5AE, + 25713 - 11904: 0x93A1, + 25714 - 11904: 0xE1DF, + 25715 - 11904: 0xE1E0, + 25716 - 11904: 0xE1DD, + 25717 - 11904: 0xE1E2, + 25718 - 11904: 0xE1DE, + 25719 - 11904: 0xE1F3, + 25720 - 11904: 0xBA4E, + 25721 - 11904: 0xBCB1, + 25722 - 11904: 0xBA50, + 25723 - 11904: 0xBA55, + 25724 - 11904: 0x8AC6, + 25725 - 11904: 0xE1E1, + 25727 - 11904: 0xE1ED, + 25730 - 11904: 0xE1E6, + 25733 - 11904: 0xE5B1, + 25735 - 11904: 0xBA4A, + 25736 - 11904: 0xBCB4, + 25737 - 11904: 0xE9AA, + 25738 - 11904: 0xE5B6, + 25739 - 11904: 0xE5B5, + 25740 - 11904: 0xE5B7, + 25741 - 11904: 0x8A5B, + 25743 - 11904: 0xE5B4, + 25744 - 11904: 0xFCB9, + 25745 - 11904: 0x894D, + 25746 - 11904: 0xBCBB, + 25747 - 11904: 0xBCB8, + 25749 - 11904: 0xBCB9, + 25750 - 11904: 0xE5AF, + 25751 - 11904: 0xE5B2, + 25752 - 11904: 0xE5BC, + 25753 - 11904: 0xBCC1, + 25754 - 11904: 0xBCBF, + 25756 - 11904: 0xE5B3, + 25757 - 11904: 0xD95A, + 25758 - 11904: 0xBCB2, + 25759 - 11904: 0xE5B9, + 25760 - 11904: 0xE5B0, + 25762 - 11904: 0xBCC2, + 25763 - 11904: 0xE5B8, + 25764 - 11904: 0xBA4D, + 25765 - 11904: 0xBCB7, + 25766 - 11904: 0xE1E4, + 25769 - 11904: 0xBCBA, + 25771 - 11904: 0xBCBE, + 25772 - 11904: 0xBCC0, + 25773 - 11904: 0xBCBD, + 25774 - 11904: 0xBCBC, + 25775 - 11904: 0xFED4, + 25776 - 11904: 0xBCB6, + 25777 - 11904: 0xE5BB, + 25778 - 11904: 0xBCB3, + 25779 - 11904: 0xBCC3, + 25780 - 11904: 0x8A78, + 25782 - 11904: 0x93AB, + 25787 - 11904: 0xBED8, + 25788 - 11904: 0xBED9, + 25789 - 11904: 0xE9A9, + 25790 - 11904: 0xBEE2, + 25791 - 11904: 0xBEDF, + 25792 - 11904: 0x8DA7, + 25793 - 11904: 0xBED6, + 25794 - 11904: 0xBEDD, + 25795 - 11904: 0xE9AB, + 25796 - 11904: 0xBEDB, + 25797 - 11904: 0xBED5, + 25799 - 11904: 0xBEDC, + 25801 - 11904: 0xE9A8, + 25802 - 11904: 0xC0BB, + 25803 - 11904: 0xBED7, + 25805 - 11904: 0xBEDE, + 25806 - 11904: 0xC0BA, + 25807 - 11904: 0xE9A7, + 25808 - 11904: 0xE9A6, + 25810 - 11904: 0xBEE0, + 25811 - 11904: 0x9F45, + 25812 - 11904: 0xBEE1, + 25814 - 11904: 0xE9A5, + 25815 - 11904: 0xE9A4, + 25816 - 11904: 0xC0BC, + 25817 - 11904: 0xE9AE, + 25818 - 11904: 0xBEDA, + 25819 - 11904: 0xE9AC, + 25821 - 11904: 0x8A56, + 25824 - 11904: 0xC0BD, + 25825 - 11904: 0xFCBF, + 25826 - 11904: 0xC0C2, + 25827 - 11904: 0xECEA, + 25828 - 11904: 0xECEC, + 25829 - 11904: 0xFCC0, + 25830 - 11904: 0xC0BF, + 25831 - 11904: 0x8EE6, + 25832 - 11904: 0xECED, + 25833 - 11904: 0xECE9, + 25834 - 11904: 0x8AA4, + 25835 - 11904: 0xECEB, + 25836 - 11904: 0xC0C0, + 25837 - 11904: 0xC0C3, + 25839 - 11904: 0xECE8, + 25840 - 11904: 0xC0BE, + 25841 - 11904: 0xC0C1, + 25842 - 11904: 0xC259, + 25843 - 11904: 0xE9AD, + 25844 - 11904: 0xC258, + 25847 - 11904: 0xC25E, + 25848 - 11904: 0xEFD4, + 25850 - 11904: 0xC25C, + 25851 - 11904: 0xC25D, + 25852 - 11904: 0xEFD7, + 25853 - 11904: 0xEFD3, + 25854 - 11904: 0xC25A, + 25855 - 11904: 0xEFD1, + 25856 - 11904: 0xC36B, + 25857 - 11904: 0xEFD5, + 25859 - 11904: 0xEFD6, + 25860 - 11904: 0xEFD2, + 25862 - 11904: 0xC25B, + 25863 - 11904: 0xF242, + 25865 - 11904: 0xF245, + 25866 - 11904: 0x8943, + 25868 - 11904: 0xF246, + 25869 - 11904: 0xF244, + 25870 - 11904: 0xF247, + 25871 - 11904: 0xC36C, + 25872 - 11904: 0xF243, + 25873 - 11904: 0x93F3, + 25875 - 11904: 0xF44E, + 25876 - 11904: 0xC464, + 25877 - 11904: 0xF44D, + 25878 - 11904: 0xF44C, + 25879 - 11904: 0xF44B, + 25880 - 11904: 0xC463, + 25881 - 11904: 0xC465, + 25883 - 11904: 0xF5CD, + 25884 - 11904: 0xC4E2, + 25885 - 11904: 0xC4E1, + 25886 - 11904: 0xFCAB, + 25887 - 11904: 0x9EA2, + 25888 - 11904: 0xF6E1, + 25889 - 11904: 0xF6E0, + 25890 - 11904: 0xF6E3, + 25891 - 11904: 0xC5CB, + 25892 - 11904: 0xC575, + 25893 - 11904: 0xF7DD, + 25894 - 11904: 0xF6E2, + 25897 - 11904: 0xF7DC, + 25898 - 11904: 0xC5CD, + 25899 - 11904: 0xC5CC, + 25900 - 11904: 0xC5F3, + 25901 - 11904: 0xF8A9, + 25902 - 11904: 0xF8EF, + 25903 - 11904: 0xA4E4, + 25904 - 11904: 0x9DC7, + 25906 - 11904: 0xD972, + 25907 - 11904: 0xE9AF, + 25908 - 11904: 0xC6D2, + 25909 - 11904: 0x8BCE, + 25910 - 11904: 0xA6AC, + 25911 - 11904: 0xCAF7, + 25912 - 11904: 0xA7F1, + 25913 - 11904: 0xA7EF, + 25915 - 11904: 0xA7F0, + 25917 - 11904: 0xCCC1, + 25918 - 11904: 0xA9F1, + 25919 - 11904: 0xAC46, + 25921 - 11904: 0xCEE7, + 25923 - 11904: 0xCEE8, + 25925 - 11904: 0xAC47, + 25926 - 11904: 0xD1CE, + 25928 - 11904: 0xAEC4, + 25929 - 11904: 0xAEC5, + 25930 - 11904: 0xD1CD, + 25933 - 11904: 0xFCC5, + 25935 - 11904: 0xB1D3, + 25937 - 11904: 0xB1CF, + 25939 - 11904: 0xD5A7, + 25940 - 11904: 0xB1D6, + 25941 - 11904: 0xB1D5, + 25942 - 11904: 0xB1CE, + 25943 - 11904: 0xB1D1, + 25944 - 11904: 0xB1D4, + 25945 - 11904: 0xB1D0, + 25948 - 11904: 0xD976, + 25949 - 11904: 0xB1CD, + 25950 - 11904: 0xB4AF, + 25951 - 11904: 0xFCCB, + 25954 - 11904: 0xB4B1, + 25955 - 11904: 0xB4B2, + 25956 - 11904: 0xD975, + 25957 - 11904: 0xD978, + 25958 - 11904: 0xB4B0, + 25959 - 11904: 0xD973, + 25960 - 11904: 0xD977, + 25962 - 11904: 0xD974, + 25963 - 11904: 0x93B3, + 25964 - 11904: 0xB771, + 25965 - 11904: 0xFCCA, + 25967 - 11904: 0xDDBC, + 25970 - 11904: 0xBA56, + 25971 - 11904: 0xE1F4, + 25972 - 11904: 0xBEE3, + 25973 - 11904: 0xBCC4, + 25974 - 11904: 0xE5BD, + 25975 - 11904: 0xBCC5, + 25976 - 11904: 0xBCC6, + 25977 - 11904: 0xE5BF, + 25978 - 11904: 0xE5BE, + 25979 - 11904: 0xE5C0, + 25980 - 11904: 0xE9B1, + 25983 - 11904: 0xE9B0, + 25984 - 11904: 0xECEF, + 25985 - 11904: 0xECEE, + 25986 - 11904: 0xC0C4, + 25987 - 11904: 0xC0C5, + 25988 - 11904: 0xF248, + 25989 - 11904: 0xFCC9, + 25990 - 11904: 0x8DAC, + 25991 - 11904: 0xA4E5, + 25992 - 11904: 0xFBC6, + 25993 - 11904: 0x8967, + 25995 - 11904: 0x8C7E, + 25996 - 11904: 0xD979, + 26000 - 11904: 0xB4B4, + 26001 - 11904: 0xB4B3, + 26002 - 11904: 0xDDBD, + 26004 - 11904: 0xEFD8, + 26005 - 11904: 0xC4E3, + 26006 - 11904: 0xF7DE, + 26007 - 11904: 0xA4E6, + 26009 - 11904: 0xAEC6, + 26011 - 11904: 0xB1D8, + 26012 - 11904: 0xB1D7, + 26013 - 11904: 0xD97A, + 26014 - 11904: 0xD97B, + 26015 - 11904: 0xB772, + 26016 - 11904: 0xE1F5, + 26017 - 11904: 0xBA57, + 26018 - 11904: 0xE9B2, + 26020 - 11904: 0xA4E7, + 26021 - 11904: 0xA5B8, + 26023 - 11904: 0xA9F2, + 26024 - 11904: 0xCCC2, + 26026 - 11904: 0xCEE9, + 26027 - 11904: 0xAC48, + 26028 - 11904: 0xB1D9, + 26030 - 11904: 0xD97C, + 26031 - 11904: 0xB4B5, + 26032 - 11904: 0xB773, + 26034 - 11904: 0xE5C1, + 26035 - 11904: 0xE5C2, + 26037 - 11904: 0xFCCD, + 26038 - 11904: 0xECF0, + 26039 - 11904: 0xC25F, + 26040 - 11904: 0xF8F0, + 26041 - 11904: 0xA4E8, + 26043 - 11904: 0xCCC3, + 26044 - 11904: 0xA9F3, + 26045 - 11904: 0xAC49, + 26046 - 11904: 0x9CF3, + 26047 - 11904: 0xCEEA, + 26049 - 11904: 0xAEC7, + 26050 - 11904: 0xD1D2, + 26051 - 11904: 0xD1D0, + 26052 - 11904: 0xD1D1, + 26053 - 11904: 0xAEC8, + 26054 - 11904: 0xD1CF, + 26059 - 11904: 0xB1DB, + 26060 - 11904: 0xB1DC, + 26061 - 11904: 0xD5A8, + 26062 - 11904: 0xB1DD, + 26063 - 11904: 0xB1DA, + 26064 - 11904: 0xD97D, + 26065 - 11904: 0xFCD0, + 26066 - 11904: 0xD97E, + 26067 - 11904: 0xDDBE, + 26068 - 11904: 0x95BB, + 26070 - 11904: 0xBA59, + 26071 - 11904: 0xBA58, + 26074 - 11904: 0xECF1, + 26075 - 11904: 0xEFD9, + 26077 - 11904: 0xF24A, + 26078 - 11904: 0xF249, + 26079 - 11904: 0xF44F, + 26080 - 11904: 0xFCD3, + 26081 - 11904: 0xC95E, + 26082 - 11904: 0xAC4A, + 26083 - 11904: 0xFCD4, + 26085 - 11904: 0xA4E9, + 26086 - 11904: 0xA5B9, + 26088 - 11904: 0xA6AE, + 26089 - 11904: 0xA6AD, + 26092 - 11904: 0xA6AF, + 26093 - 11904: 0xA6B0, + 26094 - 11904: 0xC9EE, + 26095 - 11904: 0xC9ED, + 26096 - 11904: 0xCAF8, + 26097 - 11904: 0xA7F2, + 26098 - 11904: 0xCAFB, + 26099 - 11904: 0xCAFA, + 26100 - 11904: 0xCAF9, + 26101 - 11904: 0xCAFC, + 26106 - 11904: 0xA9F4, + 26107 - 11904: 0xCCC9, + 26108 - 11904: 0xCCC5, + 26109 - 11904: 0xCCCE, + 26111 - 11904: 0x8DAE, + 26112 - 11904: 0xA9FB, + 26114 - 11904: 0xA9F9, + 26115 - 11904: 0xCCCA, + 26116 - 11904: 0xCCC6, + 26117 - 11904: 0xCCCD, + 26118 - 11904: 0xA9F8, + 26119 - 11904: 0xAA40, + 26120 - 11904: 0xCCC8, + 26121 - 11904: 0xCCC4, + 26122 - 11904: 0xA9FE, + 26123 - 11904: 0xCCCB, + 26124 - 11904: 0xA9F7, + 26125 - 11904: 0xCCCC, + 26126 - 11904: 0xA9FA, + 26127 - 11904: 0xA9FC, + 26128 - 11904: 0xCCD0, + 26129 - 11904: 0xCCCF, + 26130 - 11904: 0xCCC7, + 26131 - 11904: 0xA9F6, + 26132 - 11904: 0xA9F5, + 26133 - 11904: 0xA9FD, + 26136 - 11904: 0xFCD7, + 26140 - 11904: 0xCEEF, + 26141 - 11904: 0xCEF5, + 26142 - 11904: 0x93DB, + 26143 - 11904: 0xAC50, + 26144 - 11904: 0xAC4D, + 26145 - 11904: 0xCEEC, + 26146 - 11904: 0xCEF1, + 26147 - 11904: 0xFE63, + 26148 - 11904: 0xAC53, + 26149 - 11904: 0xAC4B, + 26150 - 11904: 0xCEF0, + 26151 - 11904: 0xAC4E, + 26152 - 11904: 0xAC51, + 26155 - 11904: 0xCEF3, + 26157 - 11904: 0xAC4C, + 26158 - 11904: 0xCEF8, + 26159 - 11904: 0xAC4F, + 26160 - 11904: 0x93D5, + 26161 - 11904: 0xAC52, + 26162 - 11904: 0xCEED, + 26163 - 11904: 0xCEF2, + 26164 - 11904: 0xCEF6, + 26165 - 11904: 0xCEEE, + 26166 - 11904: 0xCEEB, + 26169 - 11904: 0xCEF7, + 26170 - 11904: 0xCEF4, + 26177 - 11904: 0xAED0, + 26178 - 11904: 0xAEC9, + 26179 - 11904: 0xAECC, + 26180 - 11904: 0xFCDA, + 26181 - 11904: 0xAECF, + 26183 - 11904: 0xD1D5, + 26184 - 11904: 0x9B71, + 26185 - 11904: 0xAECA, + 26186 - 11904: 0xD1D3, + 26187 - 11904: 0xFCDD, + 26188 - 11904: 0xAECE, + 26189 - 11904: 0x8764, + 26191 - 11904: 0xAECB, + 26193 - 11904: 0xD1D6, + 26194 - 11904: 0xAECD, + 26195 - 11904: 0x8DAF, + 26199 - 11904: 0xFAF2, + 26201 - 11904: 0xD5AC, + 26202 - 11904: 0xB1DF, + 26203 - 11904: 0xD5AB, + 26204 - 11904: 0xD5AD, + 26205 - 11904: 0xB1DE, + 26206 - 11904: 0xB1E3, + 26207 - 11904: 0xD1D4, + 26208 - 11904: 0x87B5, + 26209 - 11904: 0xD5AA, + 26210 - 11904: 0xD5AE, + 26211 - 11904: 0x93D8, + 26212 - 11904: 0xB1E0, + 26213 - 11904: 0xD5A9, + 26214 - 11904: 0xB1E2, + 26215 - 11904: 0xFCDF, + 26216 - 11904: 0xB1E1, + 26218 - 11904: 0xD9A7, + 26219 - 11904: 0x93D3, + 26220 - 11904: 0xD9A2, + 26222 - 11904: 0xB4B6, + 26223 - 11904: 0xB4BA, + 26224 - 11904: 0xB4B7, + 26225 - 11904: 0xD9A5, + 26226 - 11904: 0xD9A8, + 26227 - 11904: 0xFCE1, + 26228 - 11904: 0xFCE2, + 26230 - 11904: 0xB4B9, + 26231 - 11904: 0xB4BE, + 26232 - 11904: 0xDDC7, + 26233 - 11904: 0xD9A6, + 26234 - 11904: 0xB4BC, + 26235 - 11904: 0xD9A3, + 26236 - 11904: 0xD9A1, + 26237 - 11904: 0x8E76, + 26238 - 11904: 0xB4BD, + 26240 - 11904: 0xD9A4, + 26244 - 11904: 0xB779, + 26245 - 11904: 0xFC62, + 26246 - 11904: 0xDDBF, + 26247 - 11904: 0xB776, + 26248 - 11904: 0xB777, + 26249 - 11904: 0xB775, + 26250 - 11904: 0xDDC4, + 26251 - 11904: 0xDDC3, + 26252 - 11904: 0xDDC0, + 26253 - 11904: 0xB77B, + 26254 - 11904: 0x93D1, + 26256 - 11904: 0xDDC2, + 26257 - 11904: 0xB4BB, + 26258 - 11904: 0x8DB1, + 26260 - 11904: 0xDDC6, + 26261 - 11904: 0xDDC1, + 26262 - 11904: 0xB778, + 26263 - 11904: 0xB774, + 26264 - 11904: 0xB77A, + 26265 - 11904: 0xDDC5, + 26266 - 11904: 0x9859, + 26269 - 11904: 0xBA5C, + 26271 - 11904: 0xE1F8, + 26272 - 11904: 0xE1F7, + 26273 - 11904: 0xE1F6, + 26274 - 11904: 0xBA5A, + 26276 - 11904: 0xFB52, + 26280 - 11904: 0xBA5B, + 26281 - 11904: 0xE5C5, + 26282 - 11904: 0xE5C8, + 26283 - 11904: 0xBCC8, + 26285 - 11904: 0xFB53, + 26286 - 11904: 0xBCC7, + 26287 - 11904: 0xE5C9, + 26288 - 11904: 0xE5C4, + 26289 - 11904: 0xBCCA, + 26290 - 11904: 0xE5C6, + 26291 - 11904: 0xFB4D, + 26292 - 11904: 0xBCC9, + 26293 - 11904: 0xE5C3, + 26294 - 11904: 0x9CBF, + 26295 - 11904: 0xE5C7, + 26296 - 11904: 0xBEE9, + 26297 - 11904: 0xBEE6, + 26298 - 11904: 0xE9BB, + 26299 - 11904: 0xE9BA, + 26301 - 11904: 0xE9B9, + 26302 - 11904: 0xE9B4, + 26303 - 11904: 0x9B72, + 26304 - 11904: 0xE9B5, + 26308 - 11904: 0xBEE7, + 26310 - 11904: 0xBEE4, + 26311 - 11904: 0xBEE8, + 26312 - 11904: 0xE9B3, + 26313 - 11904: 0xBEE5, + 26314 - 11904: 0xE9B6, + 26315 - 11904: 0xE9B7, + 26316 - 11904: 0xE9BC, + 26317 - 11904: 0xFB50, + 26318 - 11904: 0x93BE, + 26319 - 11904: 0xE9B8, + 26322 - 11904: 0xECF2, + 26326 - 11904: 0xC0C7, + 26328 - 11904: 0xEFDC, + 26329 - 11904: 0xC0C6, + 26330 - 11904: 0xEFDA, + 26331 - 11904: 0xEFDB, + 26332 - 11904: 0xC260, + 26333 - 11904: 0xC36E, + 26334 - 11904: 0xF24B, + 26336 - 11904: 0xC36D, + 26339 - 11904: 0xF451, + 26340 - 11904: 0xF452, + 26342 - 11904: 0xC466, + 26343 - 11904: 0x8CDB, + 26344 - 11904: 0xF450, + 26345 - 11904: 0xC4E4, + 26347 - 11904: 0xF7DF, + 26348 - 11904: 0xC5CE, + 26349 - 11904: 0xF8AA, + 26350 - 11904: 0xF8AB, + 26352 - 11904: 0xA4EA, + 26353 - 11904: 0x9DF1, + 26354 - 11904: 0xA6B1, + 26355 - 11904: 0xA6B2, + 26356 - 11904: 0xA7F3, + 26358 - 11904: 0xCCD1, + 26359 - 11904: 0xAC54, + 26360 - 11904: 0xAED1, + 26361 - 11904: 0xB1E4, + 26364 - 11904: 0xB0D2, + 26366 - 11904: 0xB4BF, + 26367 - 11904: 0xB4C0, + 26368 - 11904: 0xB3CC, + 26369 - 11904: 0xD9A9, + 26370 - 11904: 0xFCEB, + 26371 - 11904: 0xB77C, + 26372 - 11904: 0xE1FA, + 26373 - 11904: 0xE1F9, + 26376 - 11904: 0xA4EB, + 26377 - 11904: 0xA6B3, + 26378 - 11904: 0xCCD2, + 26379 - 11904: 0xAA42, + 26380 - 11904: 0xA0BB, + 26381 - 11904: 0xAA41, + 26382 - 11904: 0x9B7E, + 26383 - 11904: 0xCEF9, + 26384 - 11904: 0xCEFA, + 26386 - 11904: 0xD1D7, + 26387 - 11904: 0xD1D8, + 26388 - 11904: 0xAED2, + 26389 - 11904: 0xAED3, + 26390 - 11904: 0x8DB3, + 26391 - 11904: 0xAED4, + 26392 - 11904: 0xD5AF, + 26393 - 11904: 0x8C52, + 26395 - 11904: 0xB1E6, + 26397 - 11904: 0xB4C2, + 26398 - 11904: 0x9AE8, + 26399 - 11904: 0xB4C1, + 26400 - 11904: 0xDDC8, + 26401 - 11904: 0xDF7A, + 26402 - 11904: 0xE1FB, + 26403 - 11904: 0xE9BD, + 26405 - 11904: 0x8EDC, + 26406 - 11904: 0xC261, + 26407 - 11904: 0xC467, + 26408 - 11904: 0xA4EC, + 26410 - 11904: 0xA5BC, + 26411 - 11904: 0xA5BD, + 26412 - 11904: 0xA5BB, + 26413 - 11904: 0xA5BE, + 26414 - 11904: 0xA5BA, + 26417 - 11904: 0xA6B6, + 26419 - 11904: 0xC9F6, + 26420 - 11904: 0xA6B5, + 26421 - 11904: 0xA6B7, + 26422 - 11904: 0x9CF9, + 26424 - 11904: 0xC9F1, + 26425 - 11904: 0xC9F0, + 26426 - 11904: 0xC9F3, + 26427 - 11904: 0xC9F2, + 26428 - 11904: 0xC9F5, + 26429 - 11904: 0xA6B4, + 26430 - 11904: 0xC9EF, + 26431 - 11904: 0xC9F4, + 26436 - 11904: 0xFA50, + 26437 - 11904: 0xCAFD, + 26438 - 11904: 0xA7FD, + 26439 - 11904: 0xCAFE, + 26440 - 11904: 0xCB43, + 26441 - 11904: 0xA7FC, + 26443 - 11904: 0xCB47, + 26444 - 11904: 0xCB42, + 26445 - 11904: 0xCB45, + 26446 - 11904: 0xA7F5, + 26447 - 11904: 0xA7F6, + 26448 - 11904: 0xA7F7, + 26449 - 11904: 0xA7F8, + 26451 - 11904: 0xA840, + 26453 - 11904: 0xCB41, + 26454 - 11904: 0xA7FA, + 26455 - 11904: 0xA841, + 26457 - 11904: 0xCB40, + 26458 - 11904: 0xCB46, + 26460 - 11904: 0xA7F9, + 26461 - 11904: 0xCB44, + 26462 - 11904: 0xFCF1, + 26463 - 11904: 0xA7F4, + 26464 - 11904: 0xA7FE, + 26465 - 11904: 0x98E7, + 26466 - 11904: 0xFCF3, + 26471 - 11904: 0xFCF2, + 26474 - 11904: 0xAA57, + 26475 - 11904: 0x8CCA, + 26476 - 11904: 0xCCD4, + 26477 - 11904: 0xAA43, + 26478 - 11904: 0x8775, + 26479 - 11904: 0xAA4D, + 26480 - 11904: 0xAA4E, + 26481 - 11904: 0xAA46, + 26482 - 11904: 0xAA58, + 26483 - 11904: 0xAA48, + 26484 - 11904: 0xCCDC, + 26485 - 11904: 0xAA53, + 26486 - 11904: 0xCCD7, + 26487 - 11904: 0xAA49, + 26488 - 11904: 0xCCE6, + 26489 - 11904: 0xCCE7, + 26490 - 11904: 0xCCDF, + 26491 - 11904: 0xCCD8, + 26492 - 11904: 0xAA56, + 26493 - 11904: 0xCCE4, + 26494 - 11904: 0xAA51, + 26495 - 11904: 0xAA4F, + 26497 - 11904: 0xCCE5, + 26498 - 11904: 0x87BA, + 26499 - 11904: 0xCCE3, + 26500 - 11904: 0xCCDB, + 26501 - 11904: 0xCCD3, + 26502 - 11904: 0xCCDA, + 26503 - 11904: 0xAA4A, + 26505 - 11904: 0xAA50, + 26507 - 11904: 0xAA44, + 26508 - 11904: 0xCCDE, + 26509 - 11904: 0xCCDD, + 26510 - 11904: 0xCCD5, + 26511 - 11904: 0x93E5, + 26512 - 11904: 0xAA52, + 26513 - 11904: 0xCCE1, + 26514 - 11904: 0xCCD6, + 26515 - 11904: 0xAA55, + 26516 - 11904: 0xCCE8, + 26517 - 11904: 0xAA45, + 26519 - 11904: 0xAA4C, + 26520 - 11904: 0xCCD9, + 26521 - 11904: 0xCCE2, + 26522 - 11904: 0xAA54, + 26524 - 11904: 0xAA47, + 26525 - 11904: 0xAA4B, + 26527 - 11904: 0xCCE0, + 26528 - 11904: 0x9A59, + 26532 - 11904: 0x8DB5, + 26540 - 11904: 0xFD4D, + 26542 - 11904: 0xCF5B, + 26543 - 11904: 0xAC5C, + 26544 - 11904: 0xAC69, + 26545 - 11904: 0xFD5E, + 26546 - 11904: 0xCF56, + 26547 - 11904: 0xCF4C, + 26548 - 11904: 0xAC62, + 26549 - 11904: 0xCF4A, + 26550 - 11904: 0xAC5B, + 26551 - 11904: 0xCF45, + 26552 - 11904: 0xAC65, + 26553 - 11904: 0xCF52, + 26554 - 11904: 0xCEFE, + 26555 - 11904: 0xCF41, + 26559 - 11904: 0x8F7D, + 26560 - 11904: 0xCF44, + 26561 - 11904: 0xCEFB, + 26562 - 11904: 0xCF51, + 26563 - 11904: 0xCF61, + 26564 - 11904: 0xAC60, + 26565 - 11904: 0xCF46, + 26566 - 11904: 0xCF58, + 26568 - 11904: 0xCEFD, + 26569 - 11904: 0xCF5F, + 26570 - 11904: 0xCF60, + 26571 - 11904: 0xCF63, + 26572 - 11904: 0xCF5A, + 26573 - 11904: 0xCF4B, + 26574 - 11904: 0xCF53, + 26575 - 11904: 0xAC66, + 26576 - 11904: 0xAC59, + 26577 - 11904: 0xAC61, + 26578 - 11904: 0xAC6D, + 26579 - 11904: 0xAC56, + 26580 - 11904: 0xAC58, + 26582 - 11904: 0x9547, + 26583 - 11904: 0xFCF6, + 26584 - 11904: 0xCF43, + 26585 - 11904: 0xAC6A, + 26586 - 11904: 0xAC63, + 26587 - 11904: 0xCF5D, + 26588 - 11904: 0xCF40, + 26589 - 11904: 0xAC6C, + 26590 - 11904: 0xAC67, + 26591 - 11904: 0xCF49, + 26594 - 11904: 0xAC6B, + 26595 - 11904: 0xCF50, + 26596 - 11904: 0xCF48, + 26597 - 11904: 0xAC64, + 26598 - 11904: 0xCF5C, + 26599 - 11904: 0xCF54, + 26601 - 11904: 0xAC5E, + 26602 - 11904: 0xCF62, + 26603 - 11904: 0xCF47, + 26604 - 11904: 0xAC5A, + 26605 - 11904: 0xCF59, + 26606 - 11904: 0xCF4F, + 26607 - 11904: 0xAC5F, + 26608 - 11904: 0xCF55, + 26609 - 11904: 0xAC57, + 26610 - 11904: 0xCEFC, + 26611 - 11904: 0xAC68, + 26612 - 11904: 0xAEE3, + 26613 - 11904: 0xAC5D, + 26614 - 11904: 0xCF4E, + 26615 - 11904: 0xCF4D, + 26616 - 11904: 0xCF42, + 26617 - 11904: 0x9250, + 26618 - 11904: 0xCF5E, + 26620 - 11904: 0xCF57, + 26622 - 11904: 0x8968, + 26623 - 11904: 0xAC55, + 26624 - 11904: 0x8DB6, + 26625 - 11904: 0xFCFB, + 26626 - 11904: 0xA07D, + 26627 - 11904: 0x98FC, + 26628 - 11904: 0x8969, + 26637 - 11904: 0xFE4F, + 26640 - 11904: 0x9256, + 26642 - 11904: 0xD1EC, + 26643 - 11904: 0xAEEA, + 26644 - 11904: 0xD1ED, + 26646 - 11904: 0xD1E1, + 26647 - 11904: 0xAEDF, + 26648 - 11904: 0xAEEB, + 26650 - 11904: 0xD1DA, + 26651 - 11904: 0xFAC9, + 26652 - 11904: 0xD1E3, + 26653 - 11904: 0xD1EB, + 26654 - 11904: 0x93E8, + 26655 - 11904: 0xD1D9, + 26656 - 11904: 0xD1F4, + 26657 - 11904: 0xAED5, + 26658 - 11904: 0xFCF8, + 26661 - 11904: 0xD1F3, + 26662 - 11904: 0xD1EE, + 26664 - 11904: 0xD1EF, + 26665 - 11904: 0xAEDD, + 26666 - 11904: 0xAEE8, + 26667 - 11904: 0xD1E5, + 26669 - 11904: 0xD1E6, + 26670 - 11904: 0xD1F0, + 26671 - 11904: 0xD1E7, + 26673 - 11904: 0xD1E2, + 26674 - 11904: 0xD1DC, + 26675 - 11904: 0xD1DD, + 26676 - 11904: 0xD1EA, + 26677 - 11904: 0xD1E4, + 26678 - 11904: 0x9CE3, + 26679 - 11904: 0xFDA9, + 26680 - 11904: 0xAED6, + 26681 - 11904: 0xAEDA, + 26682 - 11904: 0xD1F2, + 26683 - 11904: 0xD1DE, + 26684 - 11904: 0xAEE6, + 26685 - 11904: 0xAEE2, + 26686 - 11904: 0xFC44, + 26688 - 11904: 0xAEE5, + 26689 - 11904: 0xAEEC, + 26690 - 11904: 0xAEDB, + 26691 - 11904: 0xAEE7, + 26692 - 11904: 0xD1E9, + 26693 - 11904: 0xAEE9, + 26694 - 11904: 0xAED8, + 26695 - 11904: 0x9640, + 26696 - 11904: 0xAED7, + 26697 - 11904: 0xD1DB, + 26698 - 11904: 0x8DB8, + 26699 - 11904: 0xD1DF, + 26700 - 11904: 0xAEE0, + 26701 - 11904: 0xD1F1, + 26702 - 11904: 0xD1E8, + 26703 - 11904: 0xD1E0, + 26704 - 11904: 0xAEE4, + 26705 - 11904: 0xAEE1, + 26707 - 11904: 0xAED9, + 26708 - 11904: 0xAEDC, + 26709 - 11904: 0x9B4A, + 26710 - 11904: 0x8FB9, + 26717 - 11904: 0xFCFE, + 26725 - 11904: 0x896A, + 26731 - 11904: 0xD5C4, + 26733 - 11904: 0xD5B4, + 26734 - 11904: 0xD5B5, + 26735 - 11904: 0xD5B9, + 26737 - 11904: 0xD5C8, + 26738 - 11904: 0xD5C5, + 26740 - 11904: 0xD5BE, + 26741 - 11904: 0xD5BD, + 26742 - 11904: 0xB1ED, + 26743 - 11904: 0xD5C1, + 26744 - 11904: 0xD5D0, + 26745 - 11904: 0xD5B0, + 26747 - 11904: 0xD5D1, + 26748 - 11904: 0xD5C3, + 26749 - 11904: 0xD5D5, + 26750 - 11904: 0xD5C9, + 26751 - 11904: 0xB1EC, + 26752 - 11904: 0xD5C7, + 26753 - 11904: 0xB1E7, + 26754 - 11904: 0xB1FC, + 26755 - 11904: 0xB1F2, + 26756 - 11904: 0x8DB9, + 26757 - 11904: 0xB1F6, + 26758 - 11904: 0xB1F5, + 26759 - 11904: 0xD5B1, + 26760 - 11904: 0x917E, + 26761 - 11904: 0xD5CE, + 26762 - 11904: 0xD5D4, + 26763 - 11904: 0xD5CC, + 26764 - 11904: 0xD5D3, + 26767 - 11904: 0xD5C0, + 26768 - 11904: 0xD5B2, + 26769 - 11904: 0xD5D2, + 26770 - 11904: 0xD5C2, + 26771 - 11904: 0xB1EA, + 26772 - 11904: 0xB1F7, + 26774 - 11904: 0xD5CB, + 26775 - 11904: 0xB1F0, + 26776 - 11904: 0x93F4, + 26779 - 11904: 0xD5CA, + 26780 - 11904: 0xD5B3, + 26781 - 11904: 0xB1F8, + 26783 - 11904: 0xB1FA, + 26784 - 11904: 0xD5CD, + 26785 - 11904: 0xB1FB, + 26786 - 11904: 0xB1E9, + 26787 - 11904: 0xD5BA, + 26788 - 11904: 0xD5CF, + 26790 - 11904: 0xFB7C, + 26791 - 11904: 0xB1EF, + 26792 - 11904: 0xB1F9, + 26793 - 11904: 0xD5BC, + 26794 - 11904: 0xD5C6, + 26795 - 11904: 0xD5B7, + 26796 - 11904: 0xD5BB, + 26797 - 11904: 0xB1F4, + 26798 - 11904: 0xD5B6, + 26799 - 11904: 0xB1E8, + 26800 - 11904: 0xB1F1, + 26801 - 11904: 0xB1EE, + 26802 - 11904: 0xD5BF, + 26803 - 11904: 0xAEDE, + 26804 - 11904: 0xD9C0, + 26805 - 11904: 0xB1EB, + 26806 - 11904: 0x93E7, + 26809 - 11904: 0x97EF, + 26813 - 11904: 0xFE4A, + 26819 - 11904: 0xFD45, + 26820 - 11904: 0xB1F3, + 26821 - 11904: 0x96A5, + 26822 - 11904: 0xD9C3, + 26823 - 11904: 0xD9D9, + 26824 - 11904: 0xD9CE, + 26825 - 11904: 0xB4D6, + 26826 - 11904: 0xFEE0, + 26827 - 11904: 0xB4D1, + 26828 - 11904: 0xD9BD, + 26829 - 11904: 0xB4D2, + 26830 - 11904: 0xD9CD, + 26832 - 11904: 0xD9C6, + 26833 - 11904: 0xD9D3, + 26834 - 11904: 0xB4CE, + 26835 - 11904: 0xD9AB, + 26836 - 11904: 0xD9D5, + 26837 - 11904: 0xB4C4, + 26838 - 11904: 0xD9B3, + 26839 - 11904: 0xB4C7, + 26840 - 11904: 0xB4C6, + 26842 - 11904: 0xB4D7, + 26844 - 11904: 0xD9AD, + 26845 - 11904: 0xD9CF, + 26846 - 11904: 0xD9D0, + 26847 - 11904: 0xB4C9, + 26848 - 11904: 0xB4C5, + 26849 - 11904: 0xD9BB, + 26851 - 11904: 0xB4D0, + 26852 - 11904: 0xD9B6, + 26854 - 11904: 0xD9D1, + 26855 - 11904: 0xB4CC, + 26856 - 11904: 0xD9C9, + 26857 - 11904: 0xD9D6, + 26858 - 11904: 0xD9B0, + 26859 - 11904: 0xD9B5, + 26860 - 11904: 0xD9AF, + 26862 - 11904: 0xB4CB, + 26863 - 11904: 0xD9C2, + 26864 - 11904: 0xDDDE, + 26865 - 11904: 0xD9B1, + 26866 - 11904: 0xB4CF, + 26867 - 11904: 0xD9BA, + 26868 - 11904: 0xD9D2, + 26869 - 11904: 0xB4CA, + 26870 - 11904: 0xD9B7, + 26871 - 11904: 0xD9B4, + 26872 - 11904: 0xD9C5, + 26873 - 11904: 0xB4CD, + 26874 - 11904: 0xB4C3, + 26875 - 11904: 0xB4D9, + 26876 - 11904: 0xD9C8, + 26877 - 11904: 0xD9C7, + 26880 - 11904: 0xFD48, + 26881 - 11904: 0xFD47, + 26882 - 11904: 0xFEF2, + 26883 - 11904: 0xFE6A, + 26884 - 11904: 0xD9AC, + 26885 - 11904: 0xB4C8, + 26886 - 11904: 0xD9D4, + 26887 - 11904: 0xD9BC, + 26888 - 11904: 0xD9BE, + 26889 - 11904: 0x8DBD, + 26890 - 11904: 0xD9CB, + 26891 - 11904: 0xD9CA, + 26892 - 11904: 0xD9AA, + 26893 - 11904: 0xB4D3, + 26894 - 11904: 0xB4D5, + 26895 - 11904: 0xD9B2, + 26896 - 11904: 0xD9B9, + 26897 - 11904: 0xD9C1, + 26898 - 11904: 0xB4D4, + 26899 - 11904: 0xD9B8, + 26900 - 11904: 0xD9C4, + 26901 - 11904: 0xD9D7, + 26903 - 11904: 0xD9CC, + 26904 - 11904: 0x9BA1, + 26905 - 11904: 0x8CA2, + 26906 - 11904: 0x9AB7, + 26907 - 11904: 0x8EFC, + 26917 - 11904: 0xD9D8, + 26922 - 11904: 0xD9AE, + 26924 - 11904: 0x9FA1, + 26927 - 11904: 0xDDF2, + 26928 - 11904: 0xB7A6, + 26930 - 11904: 0xDDF0, + 26931 - 11904: 0xDDDB, + 26932 - 11904: 0xDDE0, + 26933 - 11904: 0xDDD9, + 26934 - 11904: 0xFD51, + 26935 - 11904: 0xDDEC, + 26936 - 11904: 0xDDCB, + 26937 - 11904: 0xDDD2, + 26939 - 11904: 0xDDEA, + 26940 - 11904: 0xDDF4, + 26941 - 11904: 0xDDDC, + 26942 - 11904: 0xFAAD, + 26943 - 11904: 0xDDCF, + 26944 - 11904: 0xDDE2, + 26945 - 11904: 0xDDE7, + 26946 - 11904: 0xDDD3, + 26947 - 11904: 0x8DBE, + 26948 - 11904: 0xDDE4, + 26949 - 11904: 0xDDD0, + 26950 - 11904: 0x89A4, + 26952 - 11904: 0xDDD7, + 26953 - 11904: 0xDDD8, + 26954 - 11904: 0xB7A8, + 26955 - 11904: 0xDDEB, + 26956 - 11904: 0xDDE9, + 26958 - 11904: 0xDDCC, + 26959 - 11904: 0xDDEE, + 26961 - 11904: 0xDDEF, + 26962 - 11904: 0xDDF1, + 26963 - 11904: 0xB7AC, + 26964 - 11904: 0xB7A4, + 26965 - 11904: 0x9AD9, + 26966 - 11904: 0xD5B8, + 26967 - 11904: 0xDDD4, + 26968 - 11904: 0xDDE6, + 26969 - 11904: 0xDDD5, + 26970 - 11904: 0xB7A1, + 26971 - 11904: 0xB7B1, + 26972 - 11904: 0xDDED, + 26973 - 11904: 0xB7AF, + 26974 - 11904: 0xB7AB, + 26975 - 11904: 0xDDCA, + 26976 - 11904: 0xB7A3, + 26977 - 11904: 0xFD4E, + 26978 - 11904: 0xDDCD, + 26979 - 11904: 0xB7B0, + 26980 - 11904: 0x8DC0, + 26981 - 11904: 0xDDDD, + 26982 - 11904: 0xDDC9, + 26983 - 11904: 0x97F0, + 26984 - 11904: 0xB7A9, + 26985 - 11904: 0xDDE1, + 26986 - 11904: 0xDDD1, + 26987 - 11904: 0xB7AA, + 26988 - 11904: 0xDDDA, + 26989 - 11904: 0xB77E, + 26990 - 11904: 0xB4D8, + 26991 - 11904: 0xDDE3, + 26992 - 11904: 0xD9BF, + 26993 - 11904: 0xDDCE, + 26994 - 11904: 0x93B4, + 26995 - 11904: 0xFD44, + 26996 - 11904: 0xDDE8, + 26997 - 11904: 0xB7A5, + 26998 - 11904: 0xDDE5, + 26999 - 11904: 0xB7A2, + 27000 - 11904: 0xDDDF, + 27001 - 11904: 0xB7AD, + 27002 - 11904: 0xDDD6, + 27003 - 11904: 0xDDF3, + 27008 - 11904: 0x9FA7, + 27010 - 11904: 0xB7A7, + 27011 - 11904: 0xDEC6, + 27013 - 11904: 0x8DC2, + 27014 - 11904: 0xB7AE, + 27018 - 11904: 0x99B6, + 27021 - 11904: 0xE24A, + 27022 - 11904: 0xE248, + 27024 - 11904: 0xE25E, + 27025 - 11904: 0xE246, + 27027 - 11904: 0xE258, + 27028 - 11904: 0xB77D, + 27029 - 11904: 0xBA5F, + 27030 - 11904: 0xE242, + 27031 - 11904: 0xE25D, + 27032 - 11904: 0xFD52, + 27033 - 11904: 0xE247, + 27034 - 11904: 0xE255, + 27035 - 11904: 0xBA64, + 27036 - 11904: 0xBA5D, + 27038 - 11904: 0xE25B, + 27039 - 11904: 0x8DC1, + 27040 - 11904: 0xE240, + 27041 - 11904: 0xE25A, + 27042 - 11904: 0x8E46, + 27043 - 11904: 0xBA6F, + 27044 - 11904: 0xE251, + 27045 - 11904: 0xE261, + 27046 - 11904: 0xBA6D, + 27047 - 11904: 0xE249, + 27048 - 11904: 0xBA5E, + 27049 - 11904: 0xE24B, + 27050 - 11904: 0xE259, + 27051 - 11904: 0xBA67, + 27052 - 11904: 0xE244, + 27053 - 11904: 0xBA6B, + 27054 - 11904: 0xBA61, + 27055 - 11904: 0xE24D, + 27056 - 11904: 0xE243, + 27057 - 11904: 0xE1FC, + 27058 - 11904: 0xA0D1, + 27059 - 11904: 0xE257, + 27060 - 11904: 0xBA68, + 27061 - 11904: 0xE260, + 27062 - 11904: 0xE1FD, + 27063 - 11904: 0xBA65, + 27065 - 11904: 0xE253, + 27067 - 11904: 0xBA66, + 27068 - 11904: 0xE245, + 27069 - 11904: 0xE250, + 27070 - 11904: 0xE24C, + 27071 - 11904: 0xE24E, + 27072 - 11904: 0x9FCA, + 27073 - 11904: 0xBA60, + 27074 - 11904: 0xE25F, + 27075 - 11904: 0xBA6E, + 27076 - 11904: 0xE24F, + 27078 - 11904: 0xE262, + 27081 - 11904: 0xE1FE, + 27082 - 11904: 0xE254, + 27083 - 11904: 0xBA63, + 27084 - 11904: 0xBA6C, + 27085 - 11904: 0xBA6A, + 27086 - 11904: 0xE241, + 27087 - 11904: 0xE256, + 27088 - 11904: 0xBA69, + 27089 - 11904: 0x92CF, + 27091 - 11904: 0xBA62, + 27092 - 11904: 0xE252, + 27093 - 11904: 0x9CF4, + 27094 - 11904: 0x8DC4, + 27097 - 11904: 0xE25C, + 27105 - 11904: 0xFD41, + 27106 - 11904: 0xE5D5, + 27108 - 11904: 0xE5D1, + 27109 - 11904: 0xE5CD, + 27110 - 11904: 0xE5E1, + 27111 - 11904: 0xE5DE, + 27112 - 11904: 0xBCCD, + 27113 - 11904: 0x9B4C, + 27115 - 11904: 0xE5E5, + 27116 - 11904: 0xE5D4, + 27117 - 11904: 0xBCD8, + 27118 - 11904: 0xE5DB, + 27121 - 11904: 0xE5D0, + 27122 - 11904: 0xE5DA, + 27123 - 11904: 0xBCD5, + 27124 - 11904: 0xE5EE, + 27126 - 11904: 0xE5EB, + 27127 - 11904: 0xE5DD, + 27128 - 11904: 0xE5CE, + 27129 - 11904: 0xFD57, + 27130 - 11904: 0xFCEF, + 27131 - 11904: 0xE5E2, + 27132 - 11904: 0xE5E4, + 27133 - 11904: 0xBCD1, + 27134 - 11904: 0xE5D8, + 27135 - 11904: 0xE5D3, + 27136 - 11904: 0xE5CA, + 27137 - 11904: 0xBCCE, + 27138 - 11904: 0xBCD6, + 27139 - 11904: 0x9CDE, + 27140 - 11904: 0xE5E7, + 27141 - 11904: 0xBCD7, + 27142 - 11904: 0xE5CB, + 27143 - 11904: 0xE5ED, + 27144 - 11904: 0xE5E0, + 27145 - 11904: 0xE5E6, + 27146 - 11904: 0xBCD4, + 27147 - 11904: 0xFD42, + 27148 - 11904: 0x986C, + 27149 - 11904: 0xE5E3, + 27151 - 11904: 0xE5EA, + 27153 - 11904: 0xBCD9, + 27155 - 11904: 0xBCD3, + 27156 - 11904: 0xE5DC, + 27157 - 11904: 0xE5CF, + 27158 - 11904: 0xE5EF, + 27159 - 11904: 0xE5CC, + 27160 - 11904: 0xE5E8, + 27161 - 11904: 0xBCD0, + 27162 - 11904: 0x97F9, + 27163 - 11904: 0xE5D6, + 27164 - 11904: 0x9558, + 27165 - 11904: 0xE5D7, + 27166 - 11904: 0xBCCF, + 27167 - 11904: 0xBCCC, + 27168 - 11904: 0xE5D2, + 27169 - 11904: 0xBCD2, + 27171 - 11904: 0xBCCB, + 27173 - 11904: 0xE5E9, + 27174 - 11904: 0xE5EC, + 27175 - 11904: 0xE5D9, + 27176 - 11904: 0xE9CA, + 27177 - 11904: 0x87B6, + 27179 - 11904: 0x985E, + 27180 - 11904: 0xFE7B, + 27181 - 11904: 0x94CD, + 27186 - 11904: 0xE9C2, + 27187 - 11904: 0x93EE, + 27188 - 11904: 0xE9BE, + 27189 - 11904: 0xBEF6, + 27192 - 11904: 0xBEEB, + 27193 - 11904: 0xBEF0, + 27194 - 11904: 0xBEEC, + 27195 - 11904: 0xE9CC, + 27196 - 11904: 0xE9D7, + 27197 - 11904: 0xBEEA, + 27198 - 11904: 0xE9C4, + 27199 - 11904: 0xE9CD, + 27200 - 11904: 0xE5DF, + 27201 - 11904: 0xE9CE, + 27203 - 11904: 0x8CA3, + 27204 - 11904: 0xBEF1, + 27205 - 11904: 0xFD5A, + 27206 - 11904: 0xE9DD, + 27207 - 11904: 0xBEF5, + 27208 - 11904: 0xBEF8, + 27209 - 11904: 0xE9C0, + 27211 - 11904: 0xBEF4, + 27212 - 11904: 0x93F5, + 27213 - 11904: 0xE9DB, + 27214 - 11904: 0xE9DC, + 27215 - 11904: 0xE9D2, + 27216 - 11904: 0xE9D1, + 27217 - 11904: 0xE9C9, + 27218 - 11904: 0x93EF, + 27219 - 11904: 0x8EEA, + 27220 - 11904: 0xE9D3, + 27221 - 11904: 0xE9DA, + 27222 - 11904: 0xE9D9, + 27223 - 11904: 0x8F5B, + 27224 - 11904: 0xBEEF, + 27225 - 11904: 0xBEED, + 27226 - 11904: 0xE9CB, + 27227 - 11904: 0xE9C8, + 27229 - 11904: 0xE9C5, + 27230 - 11904: 0xE9D8, + 27231 - 11904: 0xBEF7, + 27232 - 11904: 0xE9D6, + 27233 - 11904: 0xBEF3, + 27234 - 11904: 0xBEF2, + 27235 - 11904: 0x8C5E, + 27236 - 11904: 0xE9D0, + 27237 - 11904: 0x8DC6, + 27238 - 11904: 0xE9BF, + 27239 - 11904: 0xE9C1, + 27240 - 11904: 0xE9C3, + 27241 - 11904: 0xE9D5, + 27242 - 11904: 0xE9CF, + 27243 - 11904: 0xBEEE, + 27245 - 11904: 0xE9C6, + 27247 - 11904: 0xE9D4, + 27249 - 11904: 0x8DC8, + 27252 - 11904: 0x8DC7, + 27254 - 11904: 0xE9C7, + 27258 - 11904: 0x93F7, + 27262 - 11904: 0xC0CF, + 27263 - 11904: 0xED45, + 27264 - 11904: 0xC0C8, + 27265 - 11904: 0xECF5, + 27266 - 11904: 0x8DC9, + 27267 - 11904: 0xED41, + 27268 - 11904: 0xC0CA, + 27269 - 11904: 0xED48, + 27271 - 11904: 0xECFC, + 27273 - 11904: 0xECF7, + 27274 - 11904: 0xFBF2, + 27276 - 11904: 0xED49, + 27277 - 11904: 0xECF3, + 27278 - 11904: 0xECFE, + 27279 - 11904: 0x9670, + 27280 - 11904: 0xC0D1, + 27281 - 11904: 0xED44, + 27282 - 11904: 0xED4A, + 27283 - 11904: 0xECFD, + 27284 - 11904: 0xC0C9, + 27285 - 11904: 0xED40, + 27286 - 11904: 0xECF4, + 27287 - 11904: 0xC0D0, + 27289 - 11904: 0x8DCB, + 27290 - 11904: 0xED47, + 27291 - 11904: 0xECF9, + 27292 - 11904: 0xC0CC, + 27293 - 11904: 0xFD5C, + 27294 - 11904: 0xECFB, + 27295 - 11904: 0xECF8, + 27296 - 11904: 0xC0D2, + 27297 - 11904: 0xECFA, + 27298 - 11904: 0xC0CB, + 27299 - 11904: 0xC0CE, + 27300 - 11904: 0xED43, + 27301 - 11904: 0xECF6, + 27302 - 11904: 0xED46, + 27303 - 11904: 0x8F65, + 27304 - 11904: 0xED42, + 27307 - 11904: 0x8DCD, + 27308 - 11904: 0xC263, + 27309 - 11904: 0xEFE7, + 27310 - 11904: 0xC268, + 27311 - 11904: 0xC269, + 27313 - 11904: 0x9DA8, + 27314 - 11904: 0x94F9, + 27315 - 11904: 0xC262, + 27316 - 11904: 0xEFE6, + 27317 - 11904: 0x8DCE, + 27318 - 11904: 0xEFE3, + 27319 - 11904: 0xEFE4, + 27320 - 11904: 0xC266, + 27321 - 11904: 0xEFDE, + 27322 - 11904: 0xEFE2, + 27323 - 11904: 0xC265, + 27325 - 11904: 0xEFDF, + 27326 - 11904: 0x93EA, + 27330 - 11904: 0xC267, + 27331 - 11904: 0xC264, + 27333 - 11904: 0xEFDD, + 27334 - 11904: 0xEFE1, + 27335 - 11904: 0xEFE5, + 27336 - 11904: 0xFD5F, + 27337 - 11904: 0x93F0, + 27338 - 11904: 0x9FB6, + 27339 - 11904: 0xF251, + 27340 - 11904: 0xF24E, + 27341 - 11904: 0xF257, + 27343 - 11904: 0xF256, + 27344 - 11904: 0xF254, + 27345 - 11904: 0xF24F, + 27347 - 11904: 0xC372, + 27348 - 11904: 0x8DCF, + 27352 - 11904: 0x9763, + 27353 - 11904: 0xF250, + 27354 - 11904: 0xC371, + 27355 - 11904: 0xC0CD, + 27356 - 11904: 0xF253, + 27357 - 11904: 0xC370, + 27358 - 11904: 0xF258, + 27359 - 11904: 0xF252, + 27360 - 11904: 0xF24D, + 27361 - 11904: 0xEFE0, + 27365 - 11904: 0xC36F, + 27367 - 11904: 0xF24C, + 27368 - 11904: 0xF456, + 27370 - 11904: 0xF455, + 27371 - 11904: 0xF255, + 27372 - 11904: 0xC468, + 27374 - 11904: 0xF459, + 27375 - 11904: 0xF45A, + 27376 - 11904: 0xF454, + 27377 - 11904: 0xF458, + 27379 - 11904: 0xF453, + 27382 - 11904: 0x8DD0, + 27384 - 11904: 0xF5D1, + 27385 - 11904: 0xF457, + 27386 - 11904: 0xC4E7, + 27387 - 11904: 0xC4E5, + 27388 - 11904: 0xF5CF, + 27392 - 11904: 0xF5D2, + 27394 - 11904: 0xF5CE, + 27395 - 11904: 0xF5D0, + 27396 - 11904: 0xC4E6, + 27397 - 11904: 0x93F1, + 27400 - 11904: 0xF6E5, + 27401 - 11904: 0xF6E6, + 27402 - 11904: 0xC576, + 27403 - 11904: 0xF6E4, + 27407 - 11904: 0xF7E2, + 27408 - 11904: 0xC5CF, + 27409 - 11904: 0xF7E0, + 27410 - 11904: 0xF7E1, + 27411 - 11904: 0xF8AC, + 27414 - 11904: 0xC656, + 27415 - 11904: 0xF8F3, + 27416 - 11904: 0xF8F1, + 27417 - 11904: 0xF8F2, + 27418 - 11904: 0xF8F4, + 27421 - 11904: 0xFD62, + 27422 - 11904: 0xF9BB, + 27424 - 11904: 0xA4ED, + 27425 - 11904: 0xA6B8, + 27427 - 11904: 0xAA59, + 27429 - 11904: 0xCCE9, + 27432 - 11904: 0xCF64, + 27436 - 11904: 0xD1F5, + 27437 - 11904: 0xD1F7, + 27439 - 11904: 0xD1F6, + 27441 - 11904: 0xD1F8, + 27442 - 11904: 0xB1FD, + 27443 - 11904: 0xD5D7, + 27444 - 11904: 0xD1F9, + 27445 - 11904: 0xFD65, + 27446 - 11904: 0xD5D6, + 27447 - 11904: 0xD5D8, + 27448 - 11904: 0xD5D9, + 27449 - 11904: 0xD9DA, + 27450 - 11904: 0xB4DB, + 27451 - 11904: 0xD9DB, + 27452 - 11904: 0xD9DD, + 27453 - 11904: 0xB4DC, + 27454 - 11904: 0xB4DA, + 27455 - 11904: 0xD9DC, + 27457 - 11904: 0xDDFA, + 27458 - 11904: 0xDDF8, + 27459 - 11904: 0xDDF7, + 27461 - 11904: 0xDDF6, + 27462 - 11904: 0xDDF5, + 27463 - 11904: 0xB7B2, + 27464 - 11904: 0xDDF9, + 27465 - 11904: 0xBA70, + 27466 - 11904: 0xE263, + 27467 - 11904: 0xE265, + 27468 - 11904: 0xBA71, + 27469 - 11904: 0xE264, + 27470 - 11904: 0xBCDB, + 27472 - 11904: 0xBCDA, + 27473 - 11904: 0xE5F0, + 27474 - 11904: 0x9FDB, + 27476 - 11904: 0xE9DF, + 27477 - 11904: 0xE9DE, + 27478 - 11904: 0xE9E0, + 27479 - 11904: 0x93F8, + 27481 - 11904: 0xBEF9, + 27483 - 11904: 0xED4B, + 27484 - 11904: 0xC0D3, + 27486 - 11904: 0xEFE8, + 27487 - 11904: 0xC26A, + 27488 - 11904: 0xF259, + 27489 - 11904: 0xC577, + 27490 - 11904: 0xA4EE, + 27491 - 11904: 0xA5BF, + 27492 - 11904: 0xA6B9, + 27493 - 11904: 0xA842, + 27494 - 11904: 0xAA5A, + 27495 - 11904: 0xAA5B, + 27498 - 11904: 0xAC6E, + 27501 - 11904: 0xD1FA, + 27503 - 11904: 0x8BF7, + 27506 - 11904: 0xB7B3, + 27508 - 11904: 0xFD66, + 27510 - 11904: 0xE6D1, + 27511 - 11904: 0xBEFA, + 27512 - 11904: 0xC26B, + 27513 - 11904: 0xA4EF, + 27514 - 11904: 0x8BCF, + 27515 - 11904: 0xA6BA, + 27518 - 11904: 0xCCEB, + 27519 - 11904: 0xAA5C, + 27520 - 11904: 0xCCEA, + 27521 - 11904: 0x8DD1, + 27522 - 11904: 0xCF65, + 27523 - 11904: 0xAC6F, + 27524 - 11904: 0xCF66, + 27526 - 11904: 0xAC70, + 27528 - 11904: 0xD1FC, + 27529 - 11904: 0xAEEE, + 27530 - 11904: 0xAEED, + 27532 - 11904: 0xD5DE, + 27533 - 11904: 0xD5DC, + 27534 - 11904: 0xD5DD, + 27535 - 11904: 0xD5DB, + 27537 - 11904: 0xD5DA, + 27540 - 11904: 0xD9DE, + 27541 - 11904: 0xD9E1, + 27542 - 11904: 0xB4DE, + 27543 - 11904: 0xD9DF, + 27544 - 11904: 0xB4DD, + 27545 - 11904: 0xD9E0, + 27547 - 11904: 0xDDFB, + 27550 - 11904: 0xE266, + 27551 - 11904: 0xE267, + 27552 - 11904: 0xE268, + 27554 - 11904: 0xE5F3, + 27555 - 11904: 0xE5F2, + 27556 - 11904: 0xBCDC, + 27557 - 11904: 0xE5F1, + 27558 - 11904: 0xE5F4, + 27559 - 11904: 0xE9E1, + 27562 - 11904: 0xE9E2, + 27563 - 11904: 0xE9E3, + 27565 - 11904: 0xED4C, + 27566 - 11904: 0xC0D4, + 27567 - 11904: 0xC26C, + 27568 - 11904: 0xF25A, + 27570 - 11904: 0xC4E8, + 27571 - 11904: 0xC95F, + 27573 - 11904: 0xAC71, + 27574 - 11904: 0xCF67, + 27575 - 11904: 0xAEEF, + 27578 - 11904: 0xB1FE, + 27580 - 11904: 0xB4DF, + 27581 - 11904: 0xD9E2, + 27583 - 11904: 0xB7B5, + 27584 - 11904: 0xB7B4, + 27585 - 11904: 0x8DD2, + 27587 - 11904: 0xE269, + 27588 - 11904: 0xE26A, + 27589 - 11904: 0xBCDD, + 27590 - 11904: 0xBCDE, + 27591 - 11904: 0xE9E5, + 27592 - 11904: 0xE9E4, + 27593 - 11904: 0xEFE9, + 27594 - 11904: 0xF7E3, + 27595 - 11904: 0xA4F0, + 27596 - 11904: 0xC960, + 27597 - 11904: 0xA5C0, + 27599 - 11904: 0xA843, + 27600 - 11904: 0xCB48, + 27602 - 11904: 0xAC72, + 27603 - 11904: 0xB7B6, + 27604 - 11904: 0xA4F1, + 27606 - 11904: 0xCF68, + 27607 - 11904: 0xAC73, + 27608 - 11904: 0xCF69, + 27610 - 11904: 0xC0D5, + 27611 - 11904: 0xA4F2, + 27612 - 11904: 0xFD71, + 27614 - 11904: 0xCCEC, + 27616 - 11904: 0xCF6A, + 27617 - 11904: 0xFD6F, + 27618 - 11904: 0xD242, + 27619 - 11904: 0xD241, + 27620 - 11904: 0xD1FE, + 27622 - 11904: 0xD1FD, + 27623 - 11904: 0xD243, + 27624 - 11904: 0xD240, + 27626 - 11904: 0x8DD3, + 27627 - 11904: 0xB240, + 27628 - 11904: 0xB241, + 27631 - 11904: 0xB4E0, + 27632 - 11904: 0xD9E3, + 27634 - 11904: 0xD9E4, + 27635 - 11904: 0xD9E5, + 27639 - 11904: 0xDE41, + 27640 - 11904: 0xDE42, + 27641 - 11904: 0xDE40, + 27642 - 11904: 0x9FE7, + 27643 - 11904: 0xDDFD, + 27644 - 11904: 0xDDFE, + 27645 - 11904: 0xB7B7, + 27646 - 11904: 0xE26B, + 27647 - 11904: 0xE5F7, + 27648 - 11904: 0xE5F6, + 27649 - 11904: 0xE5F5, + 27650 - 11904: 0xE5F8, + 27651 - 11904: 0xE9E7, + 27652 - 11904: 0xE9E6, + 27653 - 11904: 0xBEFB, + 27654 - 11904: 0xE9E8, + 27656 - 11904: 0xC0D6, + 27657 - 11904: 0xED4D, + 27659 - 11904: 0xEFEA, + 27660 - 11904: 0xF25B, + 27661 - 11904: 0xF6E7, + 27663 - 11904: 0xA4F3, + 27664 - 11904: 0xA5C2, + 27665 - 11904: 0xA5C1, + 27667 - 11904: 0xAA5D, + 27668 - 11904: 0xC961, + 27669 - 11904: 0xC97E, + 27670 - 11904: 0xA6BB, + 27672 - 11904: 0xC9F7, + 27673 - 11904: 0xCB49, + 27674 - 11904: 0xCB4A, + 27675 - 11904: 0xAA5E, + 27676 - 11904: 0x90BD, + 27677 - 11904: 0xCCED, + 27679 - 11904: 0xAC74, + 27680 - 11904: 0xCF6B, + 27681 - 11904: 0xCF6C, + 27683 - 11904: 0xAEF0, + 27684 - 11904: 0xAEF4, + 27685 - 11904: 0xD244, + 27686 - 11904: 0xAEF3, + 27687 - 11904: 0xAEF1, + 27688 - 11904: 0xAEF2, + 27690 - 11904: 0xD5DF, + 27691 - 11904: 0xB242, + 27692 - 11904: 0xB4E3, + 27694 - 11904: 0xB4E1, + 27695 - 11904: 0xB4E2, + 27696 - 11904: 0xD9E6, + 27697 - 11904: 0x9FD0, + 27699 - 11904: 0xBA72, + 27700 - 11904: 0xA4F4, + 27701 - 11904: 0x8BD0, + 27702 - 11904: 0xC9A1, + 27703 - 11904: 0xFD72, + 27704 - 11904: 0xA5C3, + 27705 - 11904: 0x9CAE, + 27706 - 11904: 0x8BD1, + 27707 - 11904: 0xC9A4, + 27709 - 11904: 0x8ADB, + 27710 - 11904: 0xA5C6, + 27711 - 11904: 0xC9A3, + 27712 - 11904: 0xA5C5, + 27713 - 11904: 0xA5C4, + 27714 - 11904: 0xA844, + 27715 - 11904: 0xC9A2, + 27718 - 11904: 0xC9F8, + 27721 - 11904: 0xFAE4, + 27722 - 11904: 0xC9FC, + 27723 - 11904: 0xC9FE, + 27724 - 11904: 0xCA40, + 27725 - 11904: 0xA6C5, + 27726 - 11904: 0xA6C6, + 27727 - 11904: 0xC9FB, + 27728 - 11904: 0xA6C1, + 27730 - 11904: 0xC9F9, + 27732 - 11904: 0xC9FD, + 27733 - 11904: 0xA6C2, + 27735 - 11904: 0xA6BD, + 27736 - 11904: 0x95CE, + 27737 - 11904: 0xA6BE, + 27738 - 11904: 0xFD76, + 27739 - 11904: 0xA6C4, + 27740 - 11904: 0xC9FA, + 27741 - 11904: 0xA6BC, + 27742 - 11904: 0xA845, + 27743 - 11904: 0xA6BF, + 27744 - 11904: 0xA6C0, + 27745 - 11904: 0xA6C3, + 27749 - 11904: 0xCB5B, + 27750 - 11904: 0xCB59, + 27751 - 11904: 0xCB4C, + 27752 - 11904: 0xA851, + 27753 - 11904: 0xCB53, + 27754 - 11904: 0xA84C, + 27755 - 11904: 0xCB4D, + 27757 - 11904: 0xCB55, + 27758 - 11904: 0xFB62, + 27759 - 11904: 0xCB52, + 27760 - 11904: 0xA84F, + 27761 - 11904: 0xCB51, + 27762 - 11904: 0xA856, + 27763 - 11904: 0xCB5A, + 27764 - 11904: 0xA858, + 27765 - 11904: 0x8DD4, + 27766 - 11904: 0xA85A, + 27768 - 11904: 0xCB4B, + 27769 - 11904: 0xFD78, + 27770 - 11904: 0xA84D, + 27771 - 11904: 0xCB5C, + 27773 - 11904: 0xA854, + 27774 - 11904: 0xA857, + 27775 - 11904: 0x8EE3, + 27776 - 11904: 0xCD45, + 27777 - 11904: 0xA847, + 27778 - 11904: 0xA85E, + 27779 - 11904: 0xA855, + 27780 - 11904: 0xCB4E, + 27781 - 11904: 0xA84A, + 27782 - 11904: 0xA859, + 27783 - 11904: 0xCB56, + 27784 - 11904: 0xA848, + 27785 - 11904: 0xA849, + 27786 - 11904: 0xCD43, + 27787 - 11904: 0xCB4F, + 27788 - 11904: 0xA850, + 27789 - 11904: 0xA85B, + 27790 - 11904: 0xCB5D, + 27791 - 11904: 0xCB50, + 27792 - 11904: 0xA84E, + 27794 - 11904: 0xA853, + 27795 - 11904: 0xCCEE, + 27796 - 11904: 0xA85C, + 27797 - 11904: 0xCB57, + 27798 - 11904: 0xA852, + 27800 - 11904: 0xA85D, + 27801 - 11904: 0xA846, + 27802 - 11904: 0xCB54, + 27803 - 11904: 0xA84B, + 27804 - 11904: 0xFDB7, + 27805 - 11904: 0xCD44, + 27807 - 11904: 0x9076, + 27810 - 11904: 0x98C6, + 27818 - 11904: 0x8DD5, + 27819 - 11904: 0xAA6A, + 27820 - 11904: 0xAA7A, + 27821 - 11904: 0xCCF5, + 27822 - 11904: 0xAA71, + 27823 - 11904: 0x97D1, + 27824 - 11904: 0xCD4B, + 27825 - 11904: 0xAA62, + 27826 - 11904: 0x9EB6, + 27827 - 11904: 0xAA65, + 27828 - 11904: 0xCD42, + 27830 - 11904: 0xCCF3, + 27831 - 11904: 0xCCF7, + 27832 - 11904: 0xAA6D, + 27833 - 11904: 0xAA6F, + 27834 - 11904: 0xCCFA, + 27835 - 11904: 0xAA76, + 27836 - 11904: 0xAA68, + 27837 - 11904: 0xAA66, + 27838 - 11904: 0xAA67, + 27839 - 11904: 0xAA75, + 27840 - 11904: 0xCD47, + 27841 - 11904: 0xAA70, + 27842 - 11904: 0xCCF9, + 27843 - 11904: 0xCCFB, + 27844 - 11904: 0xAA6E, + 27845 - 11904: 0xAA73, + 27846 - 11904: 0xCCFC, + 27847 - 11904: 0xCD4A, + 27849 - 11904: 0xAC75, + 27850 - 11904: 0xAA79, + 27851 - 11904: 0xFAC7, + 27852 - 11904: 0xAA63, + 27853 - 11904: 0xCD49, + 27854 - 11904: 0xA042, + 27855 - 11904: 0xCD4D, + 27856 - 11904: 0xCCF8, + 27857 - 11904: 0xCD4F, + 27858 - 11904: 0xCD40, + 27859 - 11904: 0xAA6C, + 27860 - 11904: 0xCCF4, + 27861 - 11904: 0xAA6B, + 27862 - 11904: 0xAA7D, + 27863 - 11904: 0xAA72, + 27865 - 11904: 0xCCF2, + 27866 - 11904: 0xCF75, + 27867 - 11904: 0xAA78, + 27868 - 11904: 0xAA7C, + 27869 - 11904: 0xCD41, + 27870 - 11904: 0xCD46, + 27871 - 11904: 0x9873, + 27872 - 11904: 0xAA7E, + 27873 - 11904: 0xAA77, + 27874 - 11904: 0xAA69, + 27875 - 11904: 0xAA5F, + 27877 - 11904: 0xAA64, + 27879 - 11904: 0xCCF6, + 27880 - 11904: 0xAA60, + 27881 - 11904: 0xCD4E, + 27882 - 11904: 0x9FFC, + 27883 - 11904: 0xCCF0, + 27884 - 11904: 0xCCEF, + 27885 - 11904: 0xCCFD, + 27886 - 11904: 0xCCF1, + 27887 - 11904: 0xAA7B, + 27888 - 11904: 0xAEF5, + 27889 - 11904: 0xAA74, + 27890 - 11904: 0xCCFE, + 27891 - 11904: 0xAA61, + 27893 - 11904: 0xACA6, + 27897 - 11904: 0xCD4C, + 27903 - 11904: 0x8CA5, + 27904 - 11904: 0xCF7C, + 27905 - 11904: 0xCFA1, + 27906 - 11904: 0x8DD7, + 27907 - 11904: 0xCFA4, + 27908 - 11904: 0xCF77, + 27909 - 11904: 0x92FB, + 27910 - 11904: 0x8DD8, + 27911 - 11904: 0xCFA7, + 27912 - 11904: 0xCFAA, + 27913 - 11904: 0xCFAC, + 27914 - 11904: 0xCF74, + 27915 - 11904: 0xAC76, + 27916 - 11904: 0xAC7B, + 27917 - 11904: 0xD249, + 27918 - 11904: 0xACAD, + 27919 - 11904: 0xCFA5, + 27920 - 11904: 0xCFAD, + 27921 - 11904: 0xCF7B, + 27922 - 11904: 0xCF73, + 27926 - 11904: 0xD264, + 27927 - 11904: 0xAC7E, + 27928 - 11904: 0xCFA2, + 27929 - 11904: 0xCF78, + 27930 - 11904: 0xCF7A, + 27931 - 11904: 0xACA5, + 27933 - 11904: 0xCF7D, + 27934 - 11904: 0xAC7D, + 27935 - 11904: 0xCF70, + 27936 - 11904: 0xCFA8, + 27938 - 11904: 0xCFAB, + 27940 - 11904: 0x944F, + 27941 - 11904: 0xAC7A, + 27942 - 11904: 0x8DD9, + 27943 - 11904: 0xACA8, + 27944 - 11904: 0xCF6D, + 27945 - 11904: 0xACAA, + 27946 - 11904: 0xAC78, + 27947 - 11904: 0xACAE, + 27948 - 11904: 0xCFA9, + 27949 - 11904: 0xCF6F, + 27950 - 11904: 0xACAB, + 27951 - 11904: 0xD25E, + 27952 - 11904: 0xCD48, + 27953 - 11904: 0xAC7C, + 27954 - 11904: 0xAC77, + 27955 - 11904: 0xCF76, + 27956 - 11904: 0xCF6E, + 27957 - 11904: 0xACAC, + 27958 - 11904: 0xACA4, + 27959 - 11904: 0xCFA3, + 27960 - 11904: 0xACA9, + 27961 - 11904: 0xACA7, + 27962 - 11904: 0xCF79, + 27963 - 11904: 0xACA1, + 27964 - 11904: 0xCF71, + 27965 - 11904: 0xACA2, + 27966 - 11904: 0xACA3, + 27967 - 11904: 0xCF72, + 27968 - 11904: 0xCFA6, + 27969 - 11904: 0xAC79, + 27970 - 11904: 0xCF7E, + 27982 - 11904: 0x896B, + 27991 - 11904: 0x97CE, + 27992 - 11904: 0xD24C, + 27993 - 11904: 0xAEFD, + 27994 - 11904: 0xAF43, + 27995 - 11904: 0xFAF3, + 27996 - 11904: 0xFDAE, + 27998 - 11904: 0xD255, + 27999 - 11904: 0xD25B, + 28000 - 11904: 0xD257, + 28001 - 11904: 0xD24A, + 28002 - 11904: 0xD24D, + 28003 - 11904: 0xD246, + 28004 - 11904: 0xD247, + 28005 - 11904: 0xAF4A, + 28006 - 11904: 0xAEFA, + 28007 - 11904: 0xD256, + 28008 - 11904: 0xD25F, + 28009 - 11904: 0xAF45, + 28010 - 11904: 0xAEF6, + 28012 - 11904: 0xAF40, + 28013 - 11904: 0xD24E, + 28014 - 11904: 0xAF42, + 28015 - 11904: 0xD24F, + 28016 - 11904: 0xD259, + 28017 - 11904: 0xFBAF, + 28018 - 11904: 0x92B7, + 28020 - 11904: 0xAF44, + 28021 - 11904: 0xD268, + 28022 - 11904: 0xD248, + 28023 - 11904: 0xAEFC, + 28024 - 11904: 0xAEFB, + 28025 - 11904: 0xAF48, + 28026 - 11904: 0xD245, + 28027 - 11904: 0xD266, + 28028 - 11904: 0xD25A, + 28029 - 11904: 0xD267, + 28030 - 11904: 0xD261, + 28031 - 11904: 0xD253, + 28032 - 11904: 0xD262, + 28033 - 11904: 0x8DDA, + 28034 - 11904: 0xD25C, + 28035 - 11904: 0xD265, + 28036 - 11904: 0xD263, + 28037 - 11904: 0xAF49, + 28038 - 11904: 0xD254, + 28039 - 11904: 0xAEF9, + 28040 - 11904: 0xAEF8, + 28041 - 11904: 0xAF41, + 28042 - 11904: 0xAF47, + 28043 - 11904: 0xD260, + 28044 - 11904: 0xAF46, + 28045 - 11904: 0xD251, + 28046 - 11904: 0xB243, + 28047 - 11904: 0x9C5A, + 28048 - 11904: 0xD269, + 28049 - 11904: 0xD250, + 28050 - 11904: 0xD24B, + 28051 - 11904: 0xAEFE, + 28052 - 11904: 0xAF4B, + 28053 - 11904: 0xAEF7, + 28054 - 11904: 0xFDAD, + 28055 - 11904: 0xD258, + 28056 - 11904: 0xD25D, + 28068 - 11904: 0x8DDC, + 28069 - 11904: 0x9444, + 28074 - 11904: 0xB265, + 28075 - 11904: 0xD5E1, + 28076 - 11904: 0xD5E5, + 28078 - 11904: 0xB252, + 28079 - 11904: 0xB250, + 28081 - 11904: 0x8DDD, + 28082 - 11904: 0xB247, + 28083 - 11904: 0xD5E3, + 28084 - 11904: 0xD5E2, + 28085 - 11904: 0xB25B, + 28087 - 11904: 0xD5E8, + 28088 - 11904: 0xB255, + 28089 - 11904: 0xA0D6, + 28090 - 11904: 0xD5FA, + 28091 - 11904: 0xD647, + 28092 - 11904: 0xB244, + 28093 - 11904: 0xD5F7, + 28094 - 11904: 0xD5F0, + 28095 - 11904: 0xB267, + 28096 - 11904: 0xD5E0, + 28098 - 11904: 0xD5FC, + 28100 - 11904: 0xB264, + 28101 - 11904: 0xB258, + 28102 - 11904: 0xB263, + 28103 - 11904: 0xB24E, + 28104 - 11904: 0xD5EC, + 28105 - 11904: 0xD5FE, + 28106 - 11904: 0xD5F6, + 28107 - 11904: 0xB24F, + 28108 - 11904: 0xB249, + 28109 - 11904: 0xD645, + 28111 - 11904: 0xD5FD, + 28112 - 11904: 0xD640, + 28113 - 11904: 0xB251, + 28114 - 11904: 0xB259, + 28115 - 11904: 0xD642, + 28116 - 11904: 0xD5EA, + 28117 - 11904: 0xD5FB, + 28118 - 11904: 0xD5EF, + 28119 - 11904: 0xD644, + 28120 - 11904: 0xB25E, + 28121 - 11904: 0xB246, + 28122 - 11904: 0xB25C, + 28123 - 11904: 0xD5F4, + 28124 - 11904: 0xD5F2, + 28125 - 11904: 0xD5F3, + 28126 - 11904: 0xB253, + 28127 - 11904: 0xD5EE, + 28128 - 11904: 0xD5ED, + 28129 - 11904: 0xB248, + 28130 - 11904: 0xD5E7, + 28131 - 11904: 0xD646, + 28132 - 11904: 0xB24A, + 28133 - 11904: 0xD5F1, + 28134 - 11904: 0xB268, + 28136 - 11904: 0xB262, + 28137 - 11904: 0xD5E6, + 28138 - 11904: 0xB25F, + 28139 - 11904: 0xB25D, + 28140 - 11904: 0xB266, + 28141 - 11904: 0xD5F8, + 28142 - 11904: 0xB261, + 28143 - 11904: 0xD252, + 28144 - 11904: 0xD5F9, + 28145 - 11904: 0xB260, + 28146 - 11904: 0xD641, + 28147 - 11904: 0xB245, + 28148 - 11904: 0xD5F5, + 28149 - 11904: 0xB257, + 28150 - 11904: 0xD5E9, + 28151 - 11904: 0xB256, + 28153 - 11904: 0xB254, + 28154 - 11904: 0xB24C, + 28155 - 11904: 0xB24B, + 28156 - 11904: 0xD9E7, + 28157 - 11904: 0xD643, + 28158 - 11904: 0x8C41, + 28160 - 11904: 0xD5EB, + 28162 - 11904: 0x97D5, + 28163 - 11904: 0xD9FC, + 28164 - 11904: 0x944A, + 28165 - 11904: 0xB24D, + 28170 - 11904: 0x944D, + 28175 - 11904: 0x97CB, + 28181 - 11904: 0x8DDE, + 28184 - 11904: 0x8DDF, + 28185 - 11904: 0xB541, + 28186 - 11904: 0xB25A, + 28187 - 11904: 0xB4EE, + 28188 - 11904: 0xD9F6, + 28189 - 11904: 0xFDB8, + 28191 - 11904: 0xD9EA, + 28192 - 11904: 0xB4EB, + 28193 - 11904: 0xB4E7, + 28194 - 11904: 0xDA49, + 28195 - 11904: 0xB4ED, + 28196 - 11904: 0xB4F1, + 28197 - 11904: 0xB4EC, + 28198 - 11904: 0xB4F5, + 28199 - 11904: 0xDA4D, + 28200 - 11904: 0xDA44, + 28201 - 11904: 0x8DE0, + 28202 - 11904: 0xFEF9, + 28203 - 11904: 0xD9F1, + 28204 - 11904: 0xB4FA, + 28205 - 11904: 0xB4F4, + 28206 - 11904: 0xD9FD, + 28207 - 11904: 0xFDBB, + 28208 - 11904: 0xDA4A, + 28209 - 11904: 0xDA43, + 28210 - 11904: 0xB4E8, + 28211 - 11904: 0xD9F7, + 28212 - 11904: 0xB4F7, + 28213 - 11904: 0xDA55, + 28214 - 11904: 0xDA56, + 28216 - 11904: 0xB4E5, + 28217 - 11904: 0xDA48, + 28218 - 11904: 0xB4F9, + 28219 - 11904: 0xD9FB, + 28220 - 11904: 0xD9ED, + 28221 - 11904: 0xD9EE, + 28222 - 11904: 0xB4FD, + 28223 - 11904: 0xD9F2, + 28224 - 11904: 0xD9F9, + 28225 - 11904: 0xD9F3, + 28227 - 11904: 0xB4FB, + 28228 - 11904: 0xB544, + 28229 - 11904: 0xD9EF, + 28230 - 11904: 0xD9E8, + 28231 - 11904: 0xD9E9, + 28233 - 11904: 0xD9EB, + 28234 - 11904: 0xB4EA, + 28235 - 11904: 0xD9F8, + 28237 - 11904: 0xB4F8, + 28238 - 11904: 0xB542, + 28239 - 11904: 0xFDC0, + 28240 - 11904: 0xFCF9, + 28241 - 11904: 0xD9FA, + 28242 - 11904: 0xDA53, + 28243 - 11904: 0xDA4B, + 28244 - 11904: 0xB4E6, + 28245 - 11904: 0xDA51, + 28246 - 11904: 0xB4F2, + 28247 - 11904: 0x8CDD, + 28248 - 11904: 0xB4F0, + 28249 - 11904: 0xFB7E, + 28250 - 11904: 0xDA57, + 28251 - 11904: 0xB4EF, + 28252 - 11904: 0xDA41, + 28253 - 11904: 0xD9F4, + 28254 - 11904: 0xD9FE, + 28255 - 11904: 0xB547, + 28256 - 11904: 0xDA45, + 28257 - 11904: 0xDA42, + 28258 - 11904: 0xD9F0, + 28259 - 11904: 0xB543, + 28260 - 11904: 0xDA4F, + 28261 - 11904: 0xDA4C, + 28262 - 11904: 0xDA54, + 28263 - 11904: 0xB4E9, + 28264 - 11904: 0xDA40, + 28265 - 11904: 0xB546, + 28267 - 11904: 0xDA47, + 28270 - 11904: 0xB4F3, + 28271 - 11904: 0xB4F6, + 28273 - 11904: 0xDA46, + 28274 - 11904: 0xB545, + 28275 - 11904: 0xD9F5, + 28276 - 11904: 0xD5E4, + 28278 - 11904: 0x92B3, + 28279 - 11904: 0xDA50, + 28280 - 11904: 0xDA4E, + 28281 - 11904: 0xDA52, + 28284 - 11904: 0xFDAF, + 28294 - 11904: 0x8DE1, + 28296 - 11904: 0xD9EC, + 28297 - 11904: 0xB540, + 28299 - 11904: 0x95D3, + 28301 - 11904: 0xDE61, + 28302 - 11904: 0xDE60, + 28303 - 11904: 0xDE46, + 28304 - 11904: 0xB7BD, + 28306 - 11904: 0xDE5F, + 28307 - 11904: 0xDE49, + 28308 - 11904: 0xDE4A, + 28310 - 11904: 0xB7C7, + 28311 - 11904: 0xDE68, + 28312 - 11904: 0xB7C2, + 28313 - 11904: 0xDE5E, + 28314 - 11904: 0x89C1, + 28315 - 11904: 0xDE43, + 28316 - 11904: 0xB7C8, + 28317 - 11904: 0xB7BE, + 28318 - 11904: 0xDE52, + 28319 - 11904: 0xDE48, + 28320 - 11904: 0xDE4B, + 28321 - 11904: 0xDE63, + 28322 - 11904: 0xB7B8, + 28323 - 11904: 0xDE6A, + 28324 - 11904: 0xDE62, + 28325 - 11904: 0xB7C1, + 28326 - 11904: 0xDE57, + 28327 - 11904: 0xB7CC, + 28330 - 11904: 0xB7CB, + 28331 - 11904: 0xB7C5, + 28334 - 11904: 0xDE69, + 28335 - 11904: 0xB7B9, + 28336 - 11904: 0xDE55, + 28337 - 11904: 0xDE4C, + 28338 - 11904: 0xDE59, + 28339 - 11904: 0xDE65, + 28340 - 11904: 0xB7CD, + 28341 - 11904: 0xFD68, + 28342 - 11904: 0xB7BB, + 28343 - 11904: 0xDE54, + 28344 - 11904: 0x9CB7, + 28345 - 11904: 0xDE4D, + 28346 - 11904: 0xB7C4, + 28347 - 11904: 0x8DE3, + 28348 - 11904: 0xB7C3, + 28349 - 11904: 0xDE50, + 28350 - 11904: 0xDE5A, + 28351 - 11904: 0xDE64, + 28352 - 11904: 0xDE47, + 28353 - 11904: 0xDE51, + 28354 - 11904: 0xB7BC, + 28355 - 11904: 0xDE5B, + 28356 - 11904: 0xB7C9, + 28357 - 11904: 0xB7C0, + 28358 - 11904: 0xDE4E, + 28359 - 11904: 0xB7BF, + 28360 - 11904: 0xDE45, + 28361 - 11904: 0xDE53, + 28362 - 11904: 0xDE67, + 28363 - 11904: 0xB4FE, + 28364 - 11904: 0xBAB0, + 28365 - 11904: 0xDE56, + 28366 - 11904: 0xE26C, + 28367 - 11904: 0xDE58, + 28368 - 11904: 0xDE66, + 28369 - 11904: 0xB7C6, + 28370 - 11904: 0xDE4F, + 28371 - 11904: 0xB7BA, + 28372 - 11904: 0xB7CA, + 28373 - 11904: 0xBCF0, + 28374 - 11904: 0xDE44, + 28376 - 11904: 0xDE5D, + 28377 - 11904: 0xFAC0, + 28378 - 11904: 0x8DE5, + 28379 - 11904: 0xFA64, + 28380 - 11904: 0xDE5C, + 28381 - 11904: 0x8947, + 28386 - 11904: 0x8DE4, + 28392 - 11904: 0x8DE7, + 28393 - 11904: 0x8DE8, + 28395 - 11904: 0xE2AA, + 28396 - 11904: 0xBAAD, + 28397 - 11904: 0xE27D, + 28398 - 11904: 0xE2A4, + 28399 - 11904: 0xBAA2, + 28401 - 11904: 0xE26E, + 28402 - 11904: 0xBAAF, + 28404 - 11904: 0xBA77, + 28405 - 11904: 0xE26D, + 28406 - 11904: 0xE2B0, + 28407 - 11904: 0xBAB1, + 28408 - 11904: 0xE271, + 28409 - 11904: 0xE2A3, + 28410 - 11904: 0xFDC7, + 28411 - 11904: 0xE273, + 28412 - 11904: 0xE2B3, + 28413 - 11904: 0xE2AF, + 28414 - 11904: 0xBA75, + 28415 - 11904: 0xBAA1, + 28416 - 11904: 0xE653, + 28417 - 11904: 0xBAAE, + 28418 - 11904: 0xBA7D, + 28419 - 11904: 0xE26F, + 28420 - 11904: 0xFDB0, + 28421 - 11904: 0xE2AE, + 28422 - 11904: 0xBAA3, + 28423 - 11904: 0xE2AB, + 28424 - 11904: 0xE2B8, + 28425 - 11904: 0xE275, + 28426 - 11904: 0xE27E, + 28427 - 11904: 0x9445, + 28428 - 11904: 0x97D6, + 28429 - 11904: 0xE2B6, + 28430 - 11904: 0xE2AC, + 28431 - 11904: 0xBA7C, + 28434 - 11904: 0xE27C, + 28435 - 11904: 0xBA76, + 28436 - 11904: 0xBA74, + 28437 - 11904: 0xBAA8, + 28438 - 11904: 0xFCC6, + 28439 - 11904: 0x9844, + 28440 - 11904: 0xE27A, + 28441 - 11904: 0xE277, + 28442 - 11904: 0xE278, + 28444 - 11904: 0xE2B2, + 28446 - 11904: 0xE2B7, + 28447 - 11904: 0xE2B5, + 28448 - 11904: 0xBA7A, + 28449 - 11904: 0xE2B9, + 28450 - 11904: 0xBA7E, + 28451 - 11904: 0xBAA7, + 28452 - 11904: 0x8DE9, + 28453 - 11904: 0xE270, + 28454 - 11904: 0xE5FA, + 28455 - 11904: 0xE279, + 28457 - 11904: 0xBA78, + 28458 - 11904: 0xBAAC, + 28459 - 11904: 0xBAA9, + 28460 - 11904: 0xBA7B, + 28461 - 11904: 0xE2A5, + 28462 - 11904: 0xE274, + 28463 - 11904: 0xBAAA, + 28464 - 11904: 0xE2A7, + 28465 - 11904: 0xBAA4, + 28466 - 11904: 0xBAA6, + 28467 - 11904: 0xBA73, + 28468 - 11904: 0x8DEA, + 28469 - 11904: 0xE2A9, + 28470 - 11904: 0xE2A1, + 28471 - 11904: 0xE272, + 28472 - 11904: 0xBAA5, + 28473 - 11904: 0xE2B1, + 28474 - 11904: 0xE2B4, + 28475 - 11904: 0xE27B, + 28476 - 11904: 0xE2A8, + 28477 - 11904: 0xFE50, + 28478 - 11904: 0xBA79, + 28479 - 11904: 0xBCDF, + 28480 - 11904: 0xE2A6, + 28481 - 11904: 0xE5F9, + 28483 - 11904: 0xE2AD, + 28484 - 11904: 0xFDCC, + 28494 - 11904: 0xE276, + 28495 - 11904: 0xE644, + 28496 - 11904: 0xE64E, + 28497 - 11904: 0xBCE2, + 28498 - 11904: 0xE64D, + 28499 - 11904: 0xE659, + 28500 - 11904: 0xBCE4, + 28501 - 11904: 0xE64B, + 28502 - 11904: 0x9DA7, + 28503 - 11904: 0xE64F, + 28504 - 11904: 0xBCEF, + 28506 - 11904: 0xE646, + 28507 - 11904: 0xBCE7, + 28508 - 11904: 0xFDCD, + 28509 - 11904: 0xE652, + 28510 - 11904: 0xE9F0, + 28511 - 11904: 0xBCF3, + 28512 - 11904: 0xBCF2, + 28513 - 11904: 0xE654, + 28514 - 11904: 0xE643, + 28515 - 11904: 0xE65E, + 28516 - 11904: 0xBCED, + 28518 - 11904: 0xBCE3, + 28519 - 11904: 0xE657, + 28521 - 11904: 0xE65B, + 28522 - 11904: 0xE660, + 28523 - 11904: 0xE655, + 28524 - 11904: 0xE649, + 28525 - 11904: 0xBCE6, + 28526 - 11904: 0xBCE9, + 28527 - 11904: 0xBCF1, + 28528 - 11904: 0xBCEC, + 28530 - 11904: 0xE64C, + 28531 - 11904: 0xE2A2, + 28532 - 11904: 0xFDCF, + 28534 - 11904: 0xE648, + 28535 - 11904: 0xE65F, + 28536 - 11904: 0xBCE8, + 28537 - 11904: 0x95D2, + 28538 - 11904: 0xBCEB, + 28539 - 11904: 0xE661, + 28540 - 11904: 0xBCE0, + 28541 - 11904: 0xE656, + 28542 - 11904: 0xE5FB, + 28543 - 11904: 0xE65C, + 28544 - 11904: 0xC0DF, + 28545 - 11904: 0x8DED, + 28546 - 11904: 0xE64A, + 28548 - 11904: 0xBCE1, + 28549 - 11904: 0xE645, + 28550 - 11904: 0xBCE5, + 28551 - 11904: 0xE5FC, + 28552 - 11904: 0xBAAB, + 28553 - 11904: 0xE641, + 28554 - 11904: 0xFCBA, + 28555 - 11904: 0xE65A, + 28556 - 11904: 0xE642, + 28557 - 11904: 0xE640, + 28558 - 11904: 0xBCEA, + 28560 - 11904: 0xE658, + 28562 - 11904: 0xE5FE, + 28563 - 11904: 0xE651, + 28564 - 11904: 0xE650, + 28565 - 11904: 0xE65D, + 28566 - 11904: 0xE647, + 28567 - 11904: 0xBCEE, + 28573 - 11904: 0xFDC5, + 28574 - 11904: 0xE9F3, + 28575 - 11904: 0xFDD2, + 28576 - 11904: 0xBF49, + 28577 - 11904: 0xBEFE, + 28578 - 11904: 0xEA40, + 28579 - 11904: 0xE9EB, + 28580 - 11904: 0xBF41, + 28581 - 11904: 0xE9F7, + 28582 - 11904: 0xBF48, + 28583 - 11904: 0xBF43, + 28584 - 11904: 0xE9F5, + 28585 - 11904: 0xED4F, + 28586 - 11904: 0xE9FB, + 28587 - 11904: 0xEA42, + 28588 - 11904: 0xE9FA, + 28589 - 11904: 0xE9E9, + 28590 - 11904: 0xE9F8, + 28591 - 11904: 0xEA44, + 28592 - 11904: 0xEA46, + 28593 - 11904: 0xBEFD, + 28594 - 11904: 0xEA45, + 28595 - 11904: 0xBF44, + 28596 - 11904: 0xBF4A, + 28597 - 11904: 0x9CDC, + 28598 - 11904: 0xBF47, + 28600 - 11904: 0xE9FE, + 28601 - 11904: 0xBF46, + 28602 - 11904: 0xE9F9, + 28603 - 11904: 0x95CF, + 28604 - 11904: 0xE9ED, + 28605 - 11904: 0xE9F2, + 28606 - 11904: 0x8DEE, + 28607 - 11904: 0xE9FD, + 28608 - 11904: 0xBF45, + 28609 - 11904: 0xBF42, + 28610 - 11904: 0xBEFC, + 28611 - 11904: 0xBF40, + 28612 - 11904: 0xE9F1, + 28614 - 11904: 0xE5FD, + 28615 - 11904: 0xE9EC, + 28616 - 11904: 0xE9EF, + 28617 - 11904: 0xEA41, + 28618 - 11904: 0xE9F4, + 28619 - 11904: 0xE9EA, + 28620 - 11904: 0xED4E, + 28621 - 11904: 0xEA43, + 28622 - 11904: 0xE9EE, + 28623 - 11904: 0xE9FC, + 28627 - 11904: 0xFDD4, + 28628 - 11904: 0xED51, + 28629 - 11904: 0xC0E3, + 28632 - 11904: 0xC0D7, + 28633 - 11904: 0x96EC, + 28634 - 11904: 0x96EB, + 28635 - 11904: 0xC0DB, + 28636 - 11904: 0xED53, + 28637 - 11904: 0xED59, + 28638 - 11904: 0xED57, + 28639 - 11904: 0xC0D9, + 28640 - 11904: 0xC0DA, + 28641 - 11904: 0xC0E1, + 28642 - 11904: 0xED5A, + 28643 - 11904: 0xED52, + 28644 - 11904: 0xC0DC, + 28646 - 11904: 0xED56, + 28647 - 11904: 0xED55, + 28648 - 11904: 0xED5B, + 28649 - 11904: 0xC0E2, + 28651 - 11904: 0xC0DD, + 28652 - 11904: 0xC0E0, + 28653 - 11904: 0xED54, + 28654 - 11904: 0xC0E4, + 28655 - 11904: 0xC0DE, + 28656 - 11904: 0xC0E5, + 28657 - 11904: 0xC0D8, + 28658 - 11904: 0xED58, + 28660 - 11904: 0xED50, + 28662 - 11904: 0x90B6, + 28663 - 11904: 0xEFF7, + 28664 - 11904: 0xFDC3, + 28666 - 11904: 0xC271, + 28667 - 11904: 0xEFF4, + 28668 - 11904: 0xEFF6, + 28670 - 11904: 0xC26F, + 28671 - 11904: 0xEFF2, + 28672 - 11904: 0xEFF3, + 28673 - 11904: 0xEFEE, + 28675 - 11904: 0x98AB, + 28676 - 11904: 0xE9F6, + 28677 - 11904: 0xEFEF, + 28678 - 11904: 0xC270, + 28679 - 11904: 0xEFEB, + 28681 - 11904: 0xC26D, + 28682 - 11904: 0xEFF8, + 28683 - 11904: 0xC26E, + 28684 - 11904: 0xEFEC, + 28685 - 11904: 0xEFED, + 28686 - 11904: 0xEFF1, + 28687 - 11904: 0xC273, + 28689 - 11904: 0xC272, + 28692 - 11904: 0xEFF0, + 28693 - 11904: 0xC378, + 28694 - 11904: 0xF25F, + 28695 - 11904: 0xF265, + 28696 - 11904: 0xC379, + 28697 - 11904: 0xF25C, + 28698 - 11904: 0xC376, + 28699 - 11904: 0xC373, + 28700 - 11904: 0xF267, + 28701 - 11904: 0xC377, + 28702 - 11904: 0x96EE, + 28703 - 11904: 0xC374, + 28704 - 11904: 0xF25E, + 28705 - 11904: 0xF261, + 28706 - 11904: 0xF262, + 28707 - 11904: 0xF263, + 28708 - 11904: 0xF266, + 28710 - 11904: 0xEFF5, + 28711 - 11904: 0xF25D, + 28712 - 11904: 0xC375, + 28713 - 11904: 0xF264, + 28714 - 11904: 0xF268, + 28715 - 11904: 0xF260, + 28716 - 11904: 0x8DF4, + 28719 - 11904: 0xF45D, + 28720 - 11904: 0xC46A, + 28721 - 11904: 0xF460, + 28722 - 11904: 0xC46B, + 28723 - 11904: 0xF468, + 28724 - 11904: 0xF45F, + 28725 - 11904: 0xF45C, + 28727 - 11904: 0xF45E, + 28728 - 11904: 0xF462, + 28729 - 11904: 0xF465, + 28730 - 11904: 0xF464, + 28731 - 11904: 0xF467, + 28732 - 11904: 0xF45B, + 28734 - 11904: 0xC469, + 28735 - 11904: 0xF463, + 28736 - 11904: 0xF466, + 28737 - 11904: 0xF469, + 28738 - 11904: 0xF461, + 28739 - 11904: 0xF5D3, + 28740 - 11904: 0xF5D4, + 28741 - 11904: 0xF5D8, + 28742 - 11904: 0xF5D9, + 28744 - 11904: 0xF5D6, + 28745 - 11904: 0xF5D7, + 28746 - 11904: 0xF5D5, + 28747 - 11904: 0xFDE0, + 28748 - 11904: 0xC4E9, + 28749 - 11904: 0x8C67, + 28752 - 11904: 0x8DF6, + 28753 - 11904: 0xC578, + 28754 - 11904: 0xF6EB, + 28756 - 11904: 0x8DF7, + 28757 - 11904: 0xF6E8, + 28758 - 11904: 0xF6E9, + 28759 - 11904: 0xF6EA, + 28760 - 11904: 0xC579, + 28762 - 11904: 0xF7E5, + 28763 - 11904: 0xF7E4, + 28764 - 11904: 0x8FFA, + 28765 - 11904: 0xF8AF, + 28766 - 11904: 0xC5F4, + 28767 - 11904: 0xF8AD, + 28768 - 11904: 0xF8B0, + 28769 - 11904: 0xF8AE, + 28770 - 11904: 0xF8F5, + 28771 - 11904: 0xC657, + 28772 - 11904: 0xC665, + 28773 - 11904: 0xF9A3, + 28774 - 11904: 0xF96C, + 28775 - 11904: 0x97D0, + 28776 - 11904: 0xF9A2, + 28777 - 11904: 0xF9D0, + 28778 - 11904: 0xF9D1, + 28779 - 11904: 0xA4F5, + 28780 - 11904: 0x8BD2, + 28782 - 11904: 0x87DE, + 28783 - 11904: 0x8DF8, + 28784 - 11904: 0xA6C7, + 28785 - 11904: 0xCA41, + 28788 - 11904: 0xCB5E, + 28789 - 11904: 0x90D9, + 28790 - 11904: 0xA85F, + 28791 - 11904: 0x8C47, + 28792 - 11904: 0xA862, + 28793 - 11904: 0xFAF0, + 28794 - 11904: 0xCB5F, + 28796 - 11904: 0xA860, + 28797 - 11904: 0xA861, + 28798 - 11904: 0xFDE1, + 28799 - 11904: 0x8DF9, + 28801 - 11904: 0xFDE3, + 28802 - 11904: 0xCD58, + 28803 - 11904: 0xCD5A, + 28804 - 11904: 0xCD55, + 28805 - 11904: 0xCD52, + 28806 - 11904: 0xCD54, + 28809 - 11904: 0x8DFA, + 28810 - 11904: 0xAAA4, + 28811 - 11904: 0xFB63, + 28814 - 11904: 0xAAA2, + 28815 - 11904: 0x90A6, + 28817 - 11904: 0xCD56, + 28818 - 11904: 0xAAA3, + 28819 - 11904: 0xCD53, + 28820 - 11904: 0xCD50, + 28821 - 11904: 0xAAA1, + 28822 - 11904: 0xCD57, + 28824 - 11904: 0xCD51, + 28825 - 11904: 0xAAA5, + 28826 - 11904: 0xCD59, + 28831 - 11904: 0xCFAF, + 28832 - 11904: 0x9970, + 28833 - 11904: 0xCFB3, + 28835 - 11904: 0x91EB, + 28836 - 11904: 0xACB7, + 28837 - 11904: 0x9770, + 28838 - 11904: 0x986F, + 28839 - 11904: 0xFDE2, + 28841 - 11904: 0xCFB6, + 28843 - 11904: 0xACAF, + 28844 - 11904: 0xACB2, + 28845 - 11904: 0xACB4, + 28846 - 11904: 0xACB6, + 28847 - 11904: 0xACB3, + 28848 - 11904: 0xCFB2, + 28849 - 11904: 0xCFB1, + 28851 - 11904: 0xACB1, + 28852 - 11904: 0xCFB4, + 28853 - 11904: 0xCFB5, + 28855 - 11904: 0xCFAE, + 28856 - 11904: 0xACB5, + 28857 - 11904: 0x98F2, + 28858 - 11904: 0xACB0, + 28859 - 11904: 0x9AFC, + 28860 - 11904: 0x896C, + 28861 - 11904: 0xFDFD, + 28862 - 11904: 0xCFB0, + 28864 - 11904: 0x995E, + 28868 - 11904: 0x95BD, + 28869 - 11904: 0xD277, + 28870 - 11904: 0xD278, + 28871 - 11904: 0xD279, + 28872 - 11904: 0xAF50, + 28874 - 11904: 0xAF4C, + 28875 - 11904: 0xD26E, + 28876 - 11904: 0xFDE4, + 28877 - 11904: 0xD276, + 28878 - 11904: 0xD27B, + 28879 - 11904: 0xAF51, + 28880 - 11904: 0x91E6, + 28881 - 11904: 0xD26C, + 28882 - 11904: 0xD272, + 28883 - 11904: 0xD26B, + 28884 - 11904: 0xD275, + 28885 - 11904: 0xFDE5, + 28886 - 11904: 0xFDE6, + 28887 - 11904: 0xD271, + 28888 - 11904: 0xAF4D, + 28889 - 11904: 0xAF4F, + 28890 - 11904: 0xD27A, + 28892 - 11904: 0xD26A, + 28893 - 11904: 0xD26D, + 28894 - 11904: 0xD273, + 28895 - 11904: 0xFDE7, + 28896 - 11904: 0xD274, + 28897 - 11904: 0xD27C, + 28898 - 11904: 0xD270, + 28900 - 11904: 0xAF4E, + 28911 - 11904: 0xB26D, + 28912 - 11904: 0xD64E, + 28913 - 11904: 0x9454, + 28915 - 11904: 0xD650, + 28916 - 11904: 0xD64C, + 28917 - 11904: 0x99B8, + 28918 - 11904: 0xD658, + 28919 - 11904: 0xD64A, + 28920 - 11904: 0xD657, + 28921 - 11904: 0xB269, + 28922 - 11904: 0xD648, + 28923 - 11904: 0xDA5B, + 28924 - 11904: 0xD652, + 28925 - 11904: 0xB26C, + 28926 - 11904: 0x97E9, + 28927 - 11904: 0xD653, + 28928 - 11904: 0xD656, + 28930 - 11904: 0xD65A, + 28932 - 11904: 0xD64F, + 28933 - 11904: 0x9346, + 28934 - 11904: 0xD654, + 28937 - 11904: 0xB26A, + 28938 - 11904: 0xB26B, + 28939 - 11904: 0xD659, + 28940 - 11904: 0xD64D, + 28941 - 11904: 0xD649, + 28942 - 11904: 0xD65B, + 28944 - 11904: 0xD651, + 28947 - 11904: 0xD655, + 28951 - 11904: 0xD64B, + 28953 - 11904: 0xB548, + 28954 - 11904: 0xB549, + 28955 - 11904: 0xDA65, + 28956 - 11904: 0xB54F, + 28957 - 11904: 0x9863, + 28958 - 11904: 0xDA59, + 28959 - 11904: 0xDA62, + 28960 - 11904: 0xDA58, + 28961 - 11904: 0xB54C, + 28962 - 11904: 0xDA60, + 28963 - 11904: 0xDA5E, + 28965 - 11904: 0xDA5F, + 28966 - 11904: 0xB54A, + 28968 - 11904: 0xDA63, + 28969 - 11904: 0x95BC, + 28971 - 11904: 0xFDED, + 28972 - 11904: 0xFDF7, + 28974 - 11904: 0xDA5C, + 28975 - 11904: 0xDA5A, + 28976 - 11904: 0xB54B, + 28977 - 11904: 0xDA5D, + 28978 - 11904: 0xDA61, + 28979 - 11904: 0x9870, + 28980 - 11904: 0x96F6, + 28981 - 11904: 0x8EA9, + 28982 - 11904: 0xB54D, + 28986 - 11904: 0xDA64, + 28987 - 11904: 0x9451, + 28990 - 11904: 0x8E43, + 28992 - 11904: 0x8B5A, + 28993 - 11904: 0xDE70, + 28994 - 11904: 0xDE77, + 28995 - 11904: 0xDE79, + 28996 - 11904: 0xDEA1, + 28997 - 11904: 0xFDEE, + 28998 - 11904: 0xB7DA, + 28999 - 11904: 0xDE6B, + 29001 - 11904: 0xB7D2, + 29002 - 11904: 0xFDF0, + 29003 - 11904: 0xDE7A, + 29004 - 11904: 0xB7D7, + 29005 - 11904: 0xDEA2, + 29006 - 11904: 0xB7CE, + 29007 - 11904: 0xFDF4, + 29008 - 11904: 0xDE7D, + 29009 - 11904: 0x9BF5, + 29010 - 11904: 0xDE6D, + 29011 - 11904: 0xDE7E, + 29012 - 11904: 0xDE6C, + 29014 - 11904: 0xB7DC, + 29015 - 11904: 0x8CEE, + 29016 - 11904: 0xDE78, + 29017 - 11904: 0xB7CF, + 29018 - 11904: 0xDEA3, + 29020 - 11904: 0xB7D4, + 29021 - 11904: 0xDE71, + 29022 - 11904: 0xB7D9, + 29023 - 11904: 0xDE7C, + 29024 - 11904: 0xDE6F, + 29025 - 11904: 0xDE76, + 29026 - 11904: 0xDE72, + 29027 - 11904: 0xDE6E, + 29028 - 11904: 0xB7D1, + 29029 - 11904: 0xB7D8, + 29030 - 11904: 0xB7D6, + 29031 - 11904: 0xB7D3, + 29032 - 11904: 0xB7DB, + 29033 - 11904: 0xB7D0, + 29034 - 11904: 0xDE75, + 29035 - 11904: 0x977E, + 29036 - 11904: 0xB7D5, + 29038 - 11904: 0xFDF1, + 29040 - 11904: 0xDE7B, + 29041 - 11904: 0x9BD5, + 29042 - 11904: 0xDE73, + 29043 - 11904: 0x9AC3, + 29045 - 11904: 0x97C8, + 29046 - 11904: 0xA0DB, + 29047 - 11904: 0x91D0, + 29048 - 11904: 0xDE74, + 29050 - 11904: 0x9FE4, + 29051 - 11904: 0xE2C1, + 29052 - 11904: 0x8FDD, + 29053 - 11904: 0xBAB4, + 29054 - 11904: 0x91E9, + 29056 - 11904: 0xE2BD, + 29057 - 11904: 0xE2C3, + 29058 - 11904: 0xE2BF, + 29060 - 11904: 0xBAB6, + 29061 - 11904: 0xE2BE, + 29062 - 11904: 0xE2C2, + 29063 - 11904: 0xE2BA, + 29064 - 11904: 0x98E0, + 29065 - 11904: 0xE2BC, + 29066 - 11904: 0xBAB5, + 29068 - 11904: 0x92CA, + 29070 - 11904: 0x9857, + 29071 - 11904: 0xE2C0, + 29072 - 11904: 0xE2BB, + 29073 - 11904: 0x8C51, + 29074 - 11904: 0xBAB7, + 29076 - 11904: 0xBAB2, + 29078 - 11904: 0xFDEB, + 29079 - 11904: 0xE2C4, + 29080 - 11904: 0x9B49, + 29081 - 11904: 0xBAB3, + 29082 - 11904: 0xE667, + 29083 - 11904: 0xE664, + 29084 - 11904: 0xE670, + 29085 - 11904: 0xE66A, + 29086 - 11904: 0xE66C, + 29087 - 11904: 0xBCF4, + 29088 - 11904: 0xE666, + 29089 - 11904: 0xE66E, + 29090 - 11904: 0x9D76, + 29091 - 11904: 0x9EAF, + 29092 - 11904: 0xE66D, + 29093 - 11904: 0xE66B, + 29095 - 11904: 0xE671, + 29096 - 11904: 0xBCF7, + 29097 - 11904: 0xE668, + 29098 - 11904: 0xE66F, + 29100 - 11904: 0xBCF5, + 29101 - 11904: 0x9CCC, + 29103 - 11904: 0xE663, + 29104 - 11904: 0xE665, + 29105 - 11904: 0xBCF6, + 29106 - 11904: 0xE662, + 29107 - 11904: 0xE672, + 29108 - 11904: 0xFDEA, + 29109 - 11904: 0xE669, + 29111 - 11904: 0x8DF1, + 29112 - 11904: 0xEA4A, + 29113 - 11904: 0xBF51, + 29114 - 11904: 0xFDFB, + 29116 - 11904: 0xEA55, + 29117 - 11904: 0xEA53, + 29118 - 11904: 0xBF4B, + 29119 - 11904: 0xEA49, + 29120 - 11904: 0xEA4C, + 29121 - 11904: 0xEA4D, + 29122 - 11904: 0xEA48, + 29123 - 11904: 0xBF55, + 29124 - 11904: 0xBF56, + 29125 - 11904: 0xEA47, + 29126 - 11904: 0xEA56, + 29127 - 11904: 0xEA51, + 29128 - 11904: 0xBF4F, + 29129 - 11904: 0xBF4C, + 29130 - 11904: 0xEA50, + 29131 - 11904: 0xEA4E, + 29134 - 11904: 0xBF52, + 29135 - 11904: 0xEA52, + 29136 - 11904: 0xBF4D, + 29137 - 11904: 0x8E53, + 29138 - 11904: 0xBF4E, + 29140 - 11904: 0xEA4F, + 29141 - 11904: 0xBF50, + 29142 - 11904: 0xEA4B, + 29144 - 11904: 0xEA54, + 29145 - 11904: 0xBF53, + 29146 - 11904: 0xEA57, + 29147 - 11904: 0xEA58, + 29148 - 11904: 0xBF54, + 29149 - 11904: 0xFACF, + 29151 - 11904: 0xC0E7, + 29152 - 11904: 0xC0EE, + 29153 - 11904: 0xED5C, + 29154 - 11904: 0xED62, + 29156 - 11904: 0xED60, + 29157 - 11904: 0xC0EA, + 29158 - 11904: 0xC0E9, + 29159 - 11904: 0xC0E6, + 29160 - 11904: 0xED5E, + 29163 - 11904: 0x96F9, + 29164 - 11904: 0xC0EC, + 29165 - 11904: 0xC0EB, + 29166 - 11904: 0xC0E8, + 29168 - 11904: 0xED61, + 29169 - 11904: 0xED5D, + 29170 - 11904: 0xED5F, + 29172 - 11904: 0xC0ED, + 29173 - 11904: 0x98BF, + 29174 - 11904: 0x9E49, + 29176 - 11904: 0xC277, + 29177 - 11904: 0xEFFB, + 29179 - 11904: 0xC274, + 29180 - 11904: 0xC275, + 29181 - 11904: 0xEFFD, + 29182 - 11904: 0xC276, + 29183 - 11904: 0xEFFA, + 29184 - 11904: 0x8CA7, + 29185 - 11904: 0xEFF9, + 29186 - 11904: 0xF26C, + 29187 - 11904: 0xEFFC, + 29189 - 11904: 0xF26D, + 29190 - 11904: 0xC37A, + 29191 - 11904: 0xF26B, + 29193 - 11904: 0x9BCA, + 29194 - 11904: 0xF26A, + 29196 - 11904: 0xF269, + 29197 - 11904: 0xC37B, + 29198 - 11904: 0xFDFE, + 29199 - 11904: 0x92DC, + 29200 - 11904: 0xC46C, + 29203 - 11904: 0xF46A, + 29204 - 11904: 0xF46B, + 29205 - 11904: 0xFE41, + 29206 - 11904: 0x91CC, + 29207 - 11904: 0x91E2, + 29209 - 11904: 0xF5DC, + 29210 - 11904: 0xF5DB, + 29211 - 11904: 0xC4EA, + 29213 - 11904: 0xF5DA, + 29214 - 11904: 0xF6EC, + 29215 - 11904: 0xF6ED, + 29218 - 11904: 0xF7E6, + 29219 - 11904: 0xF8B1, + 29220 - 11904: 0xFE44, + 29221 - 11904: 0x875F, + 29222 - 11904: 0xF8F6, + 29223 - 11904: 0xF9BC, + 29224 - 11904: 0xC679, + 29225 - 11904: 0xF9C6, + 29226 - 11904: 0xA4F6, + 29227 - 11904: 0x8BD3, + 29228 - 11904: 0xAAA6, + 29229 - 11904: 0xAAA7, + 29230 - 11904: 0xFE47, + 29232 - 11904: 0xACB8, + 29237 - 11904: 0xC0EF, + 29238 - 11904: 0xA4F7, + 29240 - 11904: 0xAAA8, + 29241 - 11904: 0xAF52, + 29242 - 11904: 0xB7DD, + 29243 - 11904: 0xA4F8, + 29245 - 11904: 0xB26E, + 29246 - 11904: 0xBAB8, + 29247 - 11904: 0xC962, + 29248 - 11904: 0xFE48, + 29249 - 11904: 0xCFB7, + 29250 - 11904: 0xD27D, + 29252 - 11904: 0xE2C5, + 29254 - 11904: 0xC0F0, + 29255 - 11904: 0xA4F9, + 29256 - 11904: 0xAAA9, + 29257 - 11904: 0xCFB8, + 29258 - 11904: 0xCFB9, + 29259 - 11904: 0xDA66, + 29260 - 11904: 0xB550, + 29263 - 11904: 0xDEA4, + 29264 - 11904: 0xA0E4, + 29266 - 11904: 0xB7DE, + 29267 - 11904: 0xE2C6, + 29269 - 11904: 0xFE4B, + 29270 - 11904: 0xBCF8, + 29271 - 11904: 0xFE4C, + 29272 - 11904: 0xC37C, + 29273 - 11904: 0xA4FA, + 29274 - 11904: 0xDA67, + 29275 - 11904: 0xA4FB, + 29276 - 11904: 0x8DBF, + 29277 - 11904: 0xA6C9, + 29278 - 11904: 0xCA42, + 29279 - 11904: 0xA6C8, + 29280 - 11904: 0xA865, + 29281 - 11904: 0xA864, + 29282 - 11904: 0xA863, + 29283 - 11904: 0xCB60, + 29286 - 11904: 0x9E78, + 29287 - 11904: 0xAAAA, + 29289 - 11904: 0xAAAB, + 29290 - 11904: 0xCD5B, + 29292 - 11904: 0xCFBA, + 29294 - 11904: 0xCFBD, + 29295 - 11904: 0xACBA, + 29296 - 11904: 0xCFBB, + 29298 - 11904: 0xACB9, + 29299 - 11904: 0xCFBC, + 29300 - 11904: 0xACBB, + 29302 - 11904: 0xD2A2, + 29303 - 11904: 0xD2A1, + 29304 - 11904: 0xD27E, + 29305 - 11904: 0xAF53, + 29307 - 11904: 0xD65D, + 29308 - 11904: 0xD65E, + 29309 - 11904: 0xB26F, + 29310 - 11904: 0xD65C, + 29311 - 11904: 0xD65F, + 29312 - 11904: 0xB552, + 29313 - 11904: 0xB270, + 29314 - 11904: 0xFE51, + 29316 - 11904: 0xB551, + 29317 - 11904: 0xDA6B, + 29318 - 11904: 0xDA6A, + 29319 - 11904: 0x9456, + 29320 - 11904: 0xDA68, + 29321 - 11904: 0xDA69, + 29323 - 11904: 0xDA6C, + 29324 - 11904: 0xDEA6, + 29325 - 11904: 0xDEA5, + 29326 - 11904: 0xDEA9, + 29327 - 11904: 0x9D61, + 29328 - 11904: 0xDEA8, + 29329 - 11904: 0xDEA7, + 29330 - 11904: 0xBAB9, + 29331 - 11904: 0xE2C9, + 29332 - 11904: 0x9457, + 29333 - 11904: 0xE2C8, + 29334 - 11904: 0xBABA, + 29335 - 11904: 0xE2C7, + 29336 - 11904: 0xE673, + 29338 - 11904: 0xE674, + 29339 - 11904: 0xBCF9, + 29341 - 11904: 0xEA59, + 29342 - 11904: 0xEA5A, + 29343 - 11904: 0x9966, + 29345 - 11904: 0xF272, + 29346 - 11904: 0xC37D, + 29347 - 11904: 0xF271, + 29348 - 11904: 0xF270, + 29349 - 11904: 0xF26E, + 29350 - 11904: 0xF26F, + 29351 - 11904: 0xC4EB, + 29352 - 11904: 0xF46C, + 29353 - 11904: 0xF6EE, + 29354 - 11904: 0xF8F7, + 29356 - 11904: 0xA4FC, + 29357 - 11904: 0x8BD5, + 29358 - 11904: 0xC9A5, + 29359 - 11904: 0xA5C7, + 29360 - 11904: 0xC9A6, + 29362 - 11904: 0xA069, + 29364 - 11904: 0xCA43, + 29365 - 11904: 0xCA44, + 29370 - 11904: 0xCB66, + 29373 - 11904: 0xCB62, + 29375 - 11904: 0xCB61, + 29376 - 11904: 0xAAAC, + 29377 - 11904: 0xCB65, + 29378 - 11904: 0xA867, + 29379 - 11904: 0xCB63, + 29380 - 11904: 0xA866, + 29381 - 11904: 0xCB67, + 29382 - 11904: 0xCB64, + 29385 - 11904: 0xCD5F, + 29386 - 11904: 0xCFBE, + 29387 - 11904: 0xCD5D, + 29388 - 11904: 0xCD64, + 29389 - 11904: 0x98B4, + 29390 - 11904: 0xAAAD, + 29392 - 11904: 0xAAB0, + 29393 - 11904: 0xCD65, + 29394 - 11904: 0xCD61, + 29396 - 11904: 0xCD62, + 29398 - 11904: 0xCD5C, + 29399 - 11904: 0xAAAF, + 29400 - 11904: 0xCD5E, + 29401 - 11904: 0xAAAE, + 29402 - 11904: 0xCD63, + 29404 - 11904: 0xCD60, + 29407 - 11904: 0xCFC2, + 29408 - 11904: 0xACBD, + 29409 - 11904: 0xACBE, + 29410 - 11904: 0xA049, + 29411 - 11904: 0xCFC5, + 29412 - 11904: 0xCFBF, + 29414 - 11904: 0xCFC4, + 29416 - 11904: 0xCFC0, + 29417 - 11904: 0xACBC, + 29418 - 11904: 0xCFC3, + 29419 - 11904: 0xCFC1, + 29427 - 11904: 0xD2A8, + 29428 - 11904: 0xD2A5, + 29430 - 11904: 0xD2A7, + 29431 - 11904: 0xAF58, + 29432 - 11904: 0xAF57, + 29433 - 11904: 0xAF55, + 29434 - 11904: 0xD2A4, + 29435 - 11904: 0xD2A9, + 29436 - 11904: 0xAF54, + 29437 - 11904: 0xAF56, + 29438 - 11904: 0xD2A6, + 29439 - 11904: 0xD667, + 29440 - 11904: 0xD2A3, + 29441 - 11904: 0xD2AA, + 29442 - 11904: 0xA04C, + 29444 - 11904: 0x9E65, + 29447 - 11904: 0xD662, + 29448 - 11904: 0xD666, + 29450 - 11904: 0xD665, + 29451 - 11904: 0xDA6E, + 29452 - 11904: 0xDA79, + 29455 - 11904: 0xD668, + 29456 - 11904: 0x98B5, + 29457 - 11904: 0xD663, + 29458 - 11904: 0xDA6D, + 29459 - 11904: 0xB274, + 29462 - 11904: 0xB273, + 29463 - 11904: 0xD661, + 29464 - 11904: 0xD664, + 29465 - 11904: 0xB275, + 29467 - 11904: 0xB272, + 29468 - 11904: 0xB271, + 29469 - 11904: 0xD660, + 29470 - 11904: 0xD669, + 29474 - 11904: 0xDA70, + 29475 - 11904: 0xDA77, + 29477 - 11904: 0xB554, + 29478 - 11904: 0xDA76, + 29479 - 11904: 0xDA73, + 29480 - 11904: 0xFE58, + 29481 - 11904: 0xB556, + 29482 - 11904: 0xFE52, + 29483 - 11904: 0xFE53, + 29484 - 11904: 0xA065, + 29485 - 11904: 0xDA75, + 29486 - 11904: 0xFE59, + 29488 - 11904: 0xDA6F, + 29489 - 11904: 0xDA71, + 29490 - 11904: 0xDA74, + 29491 - 11904: 0xDA72, + 29492 - 11904: 0xB555, + 29493 - 11904: 0xDA78, + 29494 - 11904: 0xB553, + 29495 - 11904: 0xB7DF, + 29496 - 11904: 0x98B7, + 29497 - 11904: 0x98B8, + 29498 - 11904: 0xDEAD, + 29499 - 11904: 0xDEAC, + 29500 - 11904: 0xDEAA, + 29502 - 11904: 0xB7E2, + 29503 - 11904: 0xB7E1, + 29504 - 11904: 0xDEAE, + 29505 - 11904: 0x98BA, + 29506 - 11904: 0xDEAB, + 29507 - 11904: 0xE2CA, + 29508 - 11904: 0xBABB, + 29509 - 11904: 0xB7E0, + 29512 - 11904: 0x98BB, + 29513 - 11904: 0xDEB0, + 29514 - 11904: 0xDEAF, + 29516 - 11904: 0xE2CD, + 29517 - 11904: 0xE2CB, + 29518 - 11904: 0xBCFA, + 29519 - 11904: 0x9FBC, + 29520 - 11904: 0xBABC, + 29521 - 11904: 0xE2CC, + 29522 - 11904: 0xE676, + 29527 - 11904: 0xBCFB, + 29528 - 11904: 0xE675, + 29529 - 11904: 0xE67E, + 29530 - 11904: 0xE67D, + 29531 - 11904: 0xE67B, + 29533 - 11904: 0xE67A, + 29534 - 11904: 0xE677, + 29535 - 11904: 0xE678, + 29536 - 11904: 0xE679, + 29537 - 11904: 0xE67C, + 29538 - 11904: 0xE6A1, + 29541 - 11904: 0xEA5F, + 29542 - 11904: 0xEA5C, + 29543 - 11904: 0xEA5D, + 29544 - 11904: 0xBF57, + 29545 - 11904: 0xEA5B, + 29546 - 11904: 0xEA61, + 29547 - 11904: 0xEA60, + 29548 - 11904: 0xEA5E, + 29550 - 11904: 0xED64, + 29551 - 11904: 0xED65, + 29552 - 11904: 0xC0F1, + 29553 - 11904: 0xA04A, + 29554 - 11904: 0xC0F2, + 29555 - 11904: 0xED63, + 29556 - 11904: 0x9EC7, + 29557 - 11904: 0xC279, + 29558 - 11904: 0xEFFE, + 29559 - 11904: 0xC278, + 29560 - 11904: 0xC37E, + 29562 - 11904: 0xC3A1, + 29563 - 11904: 0xC46D, + 29564 - 11904: 0xF46E, + 29565 - 11904: 0xF46D, + 29566 - 11904: 0xF5DD, + 29567 - 11904: 0xF6EF, + 29568 - 11904: 0xC57A, + 29569 - 11904: 0xF7E8, + 29570 - 11904: 0xF7E7, + 29571 - 11904: 0xF7E9, + 29572 - 11904: 0xA5C8, + 29573 - 11904: 0xCFC6, + 29574 - 11904: 0xAF59, + 29575 - 11904: 0xB276, + 29576 - 11904: 0xD66A, + 29577 - 11904: 0xA5C9, + 29578 - 11904: 0xC9A7, + 29579 - 11904: 0xA4FD, + 29580 - 11904: 0x8CA9, + 29582 - 11904: 0xCA45, + 29583 - 11904: 0x98AE, + 29586 - 11904: 0xCB6C, + 29587 - 11904: 0xCB6A, + 29588 - 11904: 0xCB6B, + 29589 - 11904: 0xCB68, + 29590 - 11904: 0xA868, + 29591 - 11904: 0xCB69, + 29592 - 11904: 0x92D6, + 29596 - 11904: 0xFAE1, + 29597 - 11904: 0xCD6D, + 29598 - 11904: 0x91D4, + 29599 - 11904: 0xAAB3, + 29600 - 11904: 0xCD6B, + 29601 - 11904: 0xCD67, + 29602 - 11904: 0xCD6A, + 29604 - 11904: 0xCD66, + 29605 - 11904: 0xAAB5, + 29606 - 11904: 0xCD69, + 29607 - 11904: 0xFADE, + 29608 - 11904: 0xAAB2, + 29609 - 11904: 0xAAB1, + 29610 - 11904: 0xFE5B, + 29611 - 11904: 0xAAB4, + 29612 - 11904: 0xCD6C, + 29613 - 11904: 0xCD68, + 29618 - 11904: 0xACC2, + 29619 - 11904: 0xACC5, + 29620 - 11904: 0xCFCE, + 29621 - 11904: 0xCFCD, + 29622 - 11904: 0xCFCC, + 29623 - 11904: 0xACBF, + 29624 - 11904: 0xCFD5, + 29625 - 11904: 0xCFCB, + 29626 - 11904: 0x8C53, + 29627 - 11904: 0xACC1, + 29628 - 11904: 0xD2AF, + 29630 - 11904: 0xCFD2, + 29631 - 11904: 0xCFD0, + 29632 - 11904: 0xACC4, + 29634 - 11904: 0xCFC8, + 29635 - 11904: 0xCFD3, + 29636 - 11904: 0x87BF, + 29637 - 11904: 0xCFCA, + 29638 - 11904: 0xCFD4, + 29639 - 11904: 0xCFD1, + 29640 - 11904: 0xCFC9, + 29641 - 11904: 0xFE5E, + 29642 - 11904: 0xACC0, + 29643 - 11904: 0xCFD6, + 29644 - 11904: 0xCFC7, + 29645 - 11904: 0xACC3, + 29646 - 11904: 0xFBD7, + 29647 - 11904: 0xFE5A, + 29648 - 11904: 0x94C5, + 29650 - 11904: 0xD2B4, + 29651 - 11904: 0xD2AB, + 29652 - 11904: 0xD2B6, + 29653 - 11904: 0xFACA, + 29654 - 11904: 0xD2AE, + 29655 - 11904: 0xD2B9, + 29656 - 11904: 0xD2BA, + 29657 - 11904: 0xD2AC, + 29658 - 11904: 0xD2B8, + 29659 - 11904: 0xD2B5, + 29660 - 11904: 0xD2B3, + 29661 - 11904: 0xD2B7, + 29662 - 11904: 0xAF5F, + 29664 - 11904: 0xAF5D, + 29665 - 11904: 0x98C1, + 29666 - 11904: 0x975C, + 29667 - 11904: 0xD2B1, + 29668 - 11904: 0xFE74, + 29669 - 11904: 0xD2AD, + 29670 - 11904: 0x9773, + 29671 - 11904: 0xD2B0, + 29672 - 11904: 0xD2BB, + 29673 - 11904: 0xD2B2, + 29674 - 11904: 0xAF5E, + 29675 - 11904: 0xCFCF, + 29677 - 11904: 0xAF5A, + 29678 - 11904: 0xAF5C, + 29679 - 11904: 0xFA46, + 29683 - 11904: 0x9764, + 29684 - 11904: 0xD678, + 29685 - 11904: 0xD66D, + 29686 - 11904: 0xD66B, + 29687 - 11904: 0xFE68, + 29688 - 11904: 0xD66C, + 29689 - 11904: 0x964E, + 29690 - 11904: 0xD673, + 29691 - 11904: 0x9765, + 29692 - 11904: 0xD674, + 29693 - 11904: 0xD670, + 29694 - 11904: 0xB27B, + 29695 - 11904: 0xD675, + 29696 - 11904: 0xD672, + 29697 - 11904: 0xD66F, + 29698 - 11904: 0x8C5A, + 29699 - 11904: 0xB279, + 29700 - 11904: 0xD66E, + 29701 - 11904: 0xB277, + 29702 - 11904: 0xB27A, + 29703 - 11904: 0xD671, + 29704 - 11904: 0xD679, + 29705 - 11904: 0xAF5B, + 29706 - 11904: 0xB278, + 29707 - 11904: 0xD677, + 29708 - 11904: 0xD676, + 29709 - 11904: 0xB27C, + 29713 - 11904: 0x89A1, + 29714 - 11904: 0x95FA, + 29716 - 11904: 0x92D4, + 29717 - 11904: 0xFE69, + 29718 - 11904: 0xDA7E, + 29719 - 11904: 0xFB45, + 29721 - 11904: 0x98C8, + 29722 - 11904: 0xDAA1, + 29723 - 11904: 0xB560, + 29724 - 11904: 0x90EF, + 29725 - 11904: 0xDAA7, + 29726 - 11904: 0x98C9, + 29727 - 11904: 0x98CA, + 29728 - 11904: 0xDAA9, + 29729 - 11904: 0xDAA2, + 29730 - 11904: 0xB55A, + 29731 - 11904: 0xDAA6, + 29732 - 11904: 0xDAA5, + 29733 - 11904: 0xB55B, + 29734 - 11904: 0xB561, + 29736 - 11904: 0xB562, + 29737 - 11904: 0xDAA8, + 29738 - 11904: 0xB558, + 29739 - 11904: 0xDA7D, + 29740 - 11904: 0xDA7B, + 29741 - 11904: 0xDAA3, + 29742 - 11904: 0xDA7A, + 29743 - 11904: 0xB55F, + 29744 - 11904: 0xDA7C, + 29745 - 11904: 0xDAA4, + 29746 - 11904: 0xDAAA, + 29747 - 11904: 0xB559, + 29748 - 11904: 0xB55E, + 29749 - 11904: 0xB55C, + 29750 - 11904: 0xB55D, + 29751 - 11904: 0x946D, + 29752 - 11904: 0x94B7, + 29753 - 11904: 0xFE6C, + 29754 - 11904: 0xB557, + 29756 - 11904: 0x946B, + 29759 - 11904: 0xB7E9, + 29760 - 11904: 0xDEB7, + 29761 - 11904: 0xB7E8, + 29762 - 11904: 0xDEBB, + 29763 - 11904: 0x92FC, + 29764 - 11904: 0xDEB1, + 29765 - 11904: 0x95EB, + 29766 - 11904: 0xDEBC, + 29767 - 11904: 0xFE73, + 29768 - 11904: 0x976E, + 29769 - 11904: 0xFE5F, + 29770 - 11904: 0xDEB2, + 29771 - 11904: 0xDEB3, + 29772 - 11904: 0x87B8, + 29773 - 11904: 0xDEBD, + 29774 - 11904: 0xDEBA, + 29775 - 11904: 0xDEB8, + 29776 - 11904: 0xDEB9, + 29777 - 11904: 0xDEB5, + 29778 - 11904: 0xDEB4, + 29779 - 11904: 0xFDBD, + 29780 - 11904: 0xDEBE, + 29781 - 11904: 0xB7E5, + 29782 - 11904: 0x92D5, + 29783 - 11904: 0xDEB6, + 29785 - 11904: 0xB7EA, + 29786 - 11904: 0xB7E4, + 29787 - 11904: 0xB7EB, + 29788 - 11904: 0xFE6F, + 29789 - 11904: 0xFEB9, + 29790 - 11904: 0xB7E7, + 29791 - 11904: 0xB7E6, + 29792 - 11904: 0xFE71, + 29793 - 11904: 0x8778, + 29794 - 11904: 0xE2CE, + 29795 - 11904: 0xBABE, + 29796 - 11904: 0xBABD, + 29797 - 11904: 0xFBBB, + 29799 - 11904: 0xE2D3, + 29800 - 11904: 0xA0D5, + 29801 - 11904: 0xBCFC, + 29802 - 11904: 0xBABF, + 29803 - 11904: 0x95FB, + 29804 - 11904: 0xFE77, + 29805 - 11904: 0xBAC1, + 29806 - 11904: 0xE2D4, + 29807 - 11904: 0xB7E3, + 29808 - 11904: 0xBAC0, + 29809 - 11904: 0xE2D0, + 29810 - 11904: 0xE2D2, + 29811 - 11904: 0xE2CF, + 29812 - 11904: 0xFE79, + 29813 - 11904: 0xE2D1, + 29814 - 11904: 0xFE75, + 29817 - 11904: 0xE6AB, + 29818 - 11904: 0x945D, + 29820 - 11904: 0xE6AA, + 29821 - 11904: 0xE6A7, + 29822 - 11904: 0xBD40, + 29823 - 11904: 0xEA62, + 29824 - 11904: 0xBD41, + 29825 - 11904: 0xE6A6, + 29826 - 11904: 0xFE7C, + 29827 - 11904: 0xBCFE, + 29829 - 11904: 0xE6A8, + 29830 - 11904: 0xE6A5, + 29831 - 11904: 0xE6A2, + 29832 - 11904: 0xE6A9, + 29833 - 11904: 0xE6A3, + 29834 - 11904: 0xE6A4, + 29835 - 11904: 0xBCFD, + 29836 - 11904: 0x9344, + 29837 - 11904: 0x8EA6, + 29840 - 11904: 0xED69, + 29842 - 11904: 0xEA66, + 29844 - 11904: 0xEA65, + 29845 - 11904: 0xEA67, + 29847 - 11904: 0xED66, + 29848 - 11904: 0xBF5A, + 29849 - 11904: 0x92D3, + 29850 - 11904: 0xEA63, + 29851 - 11904: 0x94B8, + 29852 - 11904: 0xBF58, + 29853 - 11904: 0x8779, + 29854 - 11904: 0xBF5C, + 29855 - 11904: 0xBF5B, + 29856 - 11904: 0xEA64, + 29857 - 11904: 0xEA68, + 29859 - 11904: 0xBF59, + 29860 - 11904: 0xFC71, + 29861 - 11904: 0xED6D, + 29862 - 11904: 0xC0F5, + 29863 - 11904: 0xC27A, + 29864 - 11904: 0xC0F6, + 29865 - 11904: 0xC0F3, + 29866 - 11904: 0xED6A, + 29867 - 11904: 0xED68, + 29869 - 11904: 0xED6B, + 29871 - 11904: 0xED6E, + 29872 - 11904: 0xC0F4, + 29873 - 11904: 0xED6C, + 29874 - 11904: 0xED67, + 29876 - 11904: 0x975E, + 29877 - 11904: 0xF042, + 29878 - 11904: 0xF045, + 29879 - 11904: 0xF275, + 29880 - 11904: 0xF040, + 29881 - 11904: 0x8CAD, + 29882 - 11904: 0xF46F, + 29883 - 11904: 0xF046, + 29885 - 11904: 0xC3A2, + 29886 - 11904: 0xF044, + 29887 - 11904: 0xC27B, + 29888 - 11904: 0xF041, + 29889 - 11904: 0xF043, + 29890 - 11904: 0xF047, + 29891 - 11904: 0xF276, + 29893 - 11904: 0xF274, + 29894 - 11904: 0x87C1, + 29896 - 11904: 0xFEA7, + 29898 - 11904: 0xC3A3, + 29899 - 11904: 0xF273, + 29900 - 11904: 0x946A, + 29903 - 11904: 0xC46E, + 29904 - 11904: 0x93E3, + 29907 - 11904: 0x98CF, + 29908 - 11904: 0xC4ED, + 29909 - 11904: 0xF6F1, + 29910 - 11904: 0xC4EC, + 29911 - 11904: 0xF6F3, + 29912 - 11904: 0xF6F0, + 29913 - 11904: 0xF6F2, + 29914 - 11904: 0xC5D0, + 29915 - 11904: 0xF8B2, + 29916 - 11904: 0xA5CA, + 29917 - 11904: 0xCD6E, + 29918 - 11904: 0xD2BC, + 29919 - 11904: 0xD2BD, + 29920 - 11904: 0xB27D, + 29921 - 11904: 0xDEBF, + 29922 - 11904: 0xBF5D, + 29923 - 11904: 0xC3A4, + 29924 - 11904: 0xC57B, + 29925 - 11904: 0xF8B3, + 29926 - 11904: 0xA5CB, + 29927 - 11904: 0xA0D9, + 29928 - 11904: 0xCD6F, + 29929 - 11904: 0xFEAA, + 29932 - 11904: 0xCFD7, + 29934 - 11904: 0xCFD8, + 29936 - 11904: 0xA0BF, + 29937 - 11904: 0xA04D, + 29938 - 11904: 0xA0B8, + 29940 - 11904: 0xD2BE, + 29941 - 11904: 0xD2BF, + 29942 - 11904: 0xB27E, + 29943 - 11904: 0xB2A1, + 29944 - 11904: 0xA0CE, + 29947 - 11904: 0xDAAB, + 29949 - 11904: 0xDEC2, + 29950 - 11904: 0xDEC1, + 29951 - 11904: 0xDEC0, + 29952 - 11904: 0xE2D5, + 29954 - 11904: 0xE2D6, + 29955 - 11904: 0xE2D7, + 29956 - 11904: 0xBAC2, + 29957 - 11904: 0xA0B7, + 29959 - 11904: 0xE6AD, + 29960 - 11904: 0xE6AC, + 29963 - 11904: 0xEA69, + 29964 - 11904: 0xBF5E, + 29965 - 11904: 0xBF5F, + 29966 - 11904: 0xFEA9, + 29967 - 11904: 0xED72, + 29968 - 11904: 0xED6F, + 29969 - 11904: 0xED70, + 29970 - 11904: 0xED71, + 29971 - 11904: 0xF049, + 29972 - 11904: 0xF048, + 29973 - 11904: 0xC27C, + 29974 - 11904: 0xF277, + 29975 - 11904: 0xF5DE, + 29976 - 11904: 0xA5CC, + 29977 - 11904: 0x89C3, + 29978 - 11904: 0xACC6, + 29980 - 11904: 0xB2A2, + 29981 - 11904: 0xDEC3, + 29982 - 11904: 0xFEAB, + 29983 - 11904: 0xA5CD, + 29985 - 11904: 0xD2C0, + 29986 - 11904: 0xB2A3, + 29989 - 11904: 0xB563, + 29990 - 11904: 0xB564, + 29992 - 11904: 0xA5CE, + 29993 - 11904: 0xA5CF, + 29994 - 11904: 0xCA46, + 29995 - 11904: 0xA86A, + 29996 - 11904: 0xA869, + 29997 - 11904: 0xACC7, + 29998 - 11904: 0xCFD9, + 29999 - 11904: 0xDAAC, + 30000 - 11904: 0xA5D0, + 30001 - 11904: 0xA5D1, + 30002 - 11904: 0xA5D2, + 30003 - 11904: 0xA5D3, + 30004 - 11904: 0x9DF4, + 30005 - 11904: 0x896D, + 30007 - 11904: 0xA86B, + 30008 - 11904: 0xA86C, + 30009 - 11904: 0xCB6E, + 30010 - 11904: 0xCB6D, + 30011 - 11904: 0x9C7B, + 30013 - 11904: 0xAAB6, + 30014 - 11904: 0xCD72, + 30015 - 11904: 0xCD70, + 30016 - 11904: 0xCD71, + 30018 - 11904: 0x98D2, + 30022 - 11904: 0x9FA9, + 30023 - 11904: 0xCFDA, + 30024 - 11904: 0xCFDB, + 30026 - 11904: 0xFEB2, + 30027 - 11904: 0xACCB, + 30028 - 11904: 0xACC9, + 30029 - 11904: 0xFEB1, + 30030 - 11904: 0xACCA, + 30031 - 11904: 0xACC8, + 30033 - 11904: 0x97D9, + 30035 - 11904: 0xA0C4, + 30036 - 11904: 0xAF60, + 30037 - 11904: 0x9476, + 30041 - 11904: 0xAF64, + 30042 - 11904: 0xAF63, + 30043 - 11904: 0xD2C1, + 30044 - 11904: 0xAF62, + 30045 - 11904: 0xAF61, + 30047 - 11904: 0xD2C2, + 30048 - 11904: 0x9978, + 30050 - 11904: 0xB2A6, + 30051 - 11904: 0xD67B, + 30052 - 11904: 0xD67A, + 30053 - 11904: 0xB2A4, + 30054 - 11904: 0xB2A5, + 30055 - 11904: 0xFEB3, + 30058 - 11904: 0xB566, + 30059 - 11904: 0xB565, + 30060 - 11904: 0xDAAE, + 30061 - 11904: 0x98D3, + 30062 - 11904: 0xFEB4, + 30063 - 11904: 0xDAAD, + 30064 - 11904: 0xB2A7, + 30066 - 11904: 0x98D4, + 30070 - 11904: 0xB7ED, + 30071 - 11904: 0xDEC5, + 30072 - 11904: 0xB7EE, + 30073 - 11904: 0xDEC4, + 30074 - 11904: 0x9FB9, + 30077 - 11904: 0xE2D8, + 30078 - 11904: 0xE6AE, + 30079 - 11904: 0xBD42, + 30080 - 11904: 0xEA6A, + 30083 - 11904: 0x9471, + 30084 - 11904: 0xED73, + 30086 - 11904: 0xC3A6, + 30087 - 11904: 0xC3A5, + 30090 - 11904: 0xC57C, + 30091 - 11904: 0xA5D4, + 30092 - 11904: 0xCD73, + 30093 - 11904: 0x98D5, + 30094 - 11904: 0xFEB8, + 30095 - 11904: 0xB2A8, + 30096 - 11904: 0xE2D9, + 30097 - 11904: 0xBAC3, + 30098 - 11904: 0xC6D4, + 30100 - 11904: 0xCB6F, + 30101 - 11904: 0xCB70, + 30104 - 11904: 0xCD74, + 30105 - 11904: 0xAAB8, + 30106 - 11904: 0xAAB9, + 30109 - 11904: 0xAAB7, + 30110 - 11904: 0xFEBA, + 30114 - 11904: 0xACCF, + 30115 - 11904: 0xACD0, + 30116 - 11904: 0xACCD, + 30117 - 11904: 0xACCE, + 30119 - 11904: 0xCFDC, + 30122 - 11904: 0xCFDD, + 30123 - 11904: 0xACCC, + 30128 - 11904: 0xD2C3, + 30129 - 11904: 0x9E5C, + 30130 - 11904: 0xAF68, + 30131 - 11904: 0xAF69, + 30132 - 11904: 0xFEBB, + 30133 - 11904: 0xB2AB, + 30134 - 11904: 0xD2C9, + 30136 - 11904: 0xAF6E, + 30137 - 11904: 0xAF6C, + 30138 - 11904: 0xD2CA, + 30139 - 11904: 0xD2C5, + 30140 - 11904: 0xAF6B, + 30141 - 11904: 0xAF6A, + 30142 - 11904: 0xAF65, + 30143 - 11904: 0xD2C8, + 30144 - 11904: 0xD2C7, + 30145 - 11904: 0xD2C4, + 30146 - 11904: 0xAF6D, + 30147 - 11904: 0xA044, + 30148 - 11904: 0xD2C6, + 30149 - 11904: 0xAF66, + 30151 - 11904: 0xAF67, + 30152 - 11904: 0x98D7, + 30154 - 11904: 0xB2AC, + 30155 - 11904: 0xD6A1, + 30156 - 11904: 0xD6A2, + 30157 - 11904: 0xB2AD, + 30158 - 11904: 0xD67C, + 30159 - 11904: 0xD67E, + 30160 - 11904: 0xD6A4, + 30161 - 11904: 0xD6A3, + 30162 - 11904: 0xD67D, + 30164 - 11904: 0xB2A9, + 30165 - 11904: 0xB2AA, + 30167 - 11904: 0xDAB6, + 30168 - 11904: 0xB56B, + 30169 - 11904: 0xB56A, + 30170 - 11904: 0xDAB0, + 30171 - 11904: 0xB568, + 30172 - 11904: 0x98D8, + 30173 - 11904: 0xDAB3, + 30174 - 11904: 0xB56C, + 30175 - 11904: 0xDAB4, + 30176 - 11904: 0xB56D, + 30177 - 11904: 0xDAB1, + 30178 - 11904: 0xB567, + 30179 - 11904: 0xB569, + 30180 - 11904: 0xDAB5, + 30182 - 11904: 0xDAB2, + 30183 - 11904: 0xDAAF, + 30189 - 11904: 0xDED2, + 30191 - 11904: 0xDEC7, + 30192 - 11904: 0xB7F0, + 30193 - 11904: 0xB7F3, + 30194 - 11904: 0xB7F2, + 30195 - 11904: 0xB7F7, + 30196 - 11904: 0xB7F6, + 30197 - 11904: 0xDED3, + 30198 - 11904: 0xDED1, + 30199 - 11904: 0xDECA, + 30200 - 11904: 0xDECE, + 30201 - 11904: 0xDECD, + 30202 - 11904: 0xB7F4, + 30203 - 11904: 0xDED0, + 30204 - 11904: 0xDECC, + 30205 - 11904: 0xDED4, + 30206 - 11904: 0xDECB, + 30207 - 11904: 0xB7F5, + 30208 - 11904: 0xB7EF, + 30209 - 11904: 0xB7F1, + 30210 - 11904: 0xFEBC, + 30211 - 11904: 0xDEC9, + 30215 - 11904: 0x9FFE, + 30216 - 11904: 0xE2DB, + 30217 - 11904: 0xBAC7, + 30218 - 11904: 0xE2DF, + 30219 - 11904: 0xBAC6, + 30220 - 11904: 0xE2DC, + 30221 - 11904: 0xBAC5, + 30223 - 11904: 0xDEC8, + 30224 - 11904: 0xDECF, + 30225 - 11904: 0xE2DE, + 30227 - 11904: 0xBAC8, + 30228 - 11904: 0xE2E0, + 30229 - 11904: 0xE2DD, + 30230 - 11904: 0xE2DA, + 30233 - 11904: 0xE6B1, + 30234 - 11904: 0xE6B5, + 30235 - 11904: 0xE6B7, + 30236 - 11904: 0xE6B3, + 30237 - 11904: 0xE6B2, + 30238 - 11904: 0xE6B0, + 30239 - 11904: 0xBD45, + 30240 - 11904: 0xBD43, + 30241 - 11904: 0xBD48, + 30242 - 11904: 0xBD49, + 30243 - 11904: 0xE6B4, + 30244 - 11904: 0xBD46, + 30245 - 11904: 0xE6AF, + 30246 - 11904: 0xBD47, + 30247 - 11904: 0xBAC4, + 30248 - 11904: 0xE6B6, + 30249 - 11904: 0xBD44, + 30252 - 11904: 0xFEBD, + 30253 - 11904: 0xEA6C, + 30255 - 11904: 0xEA6B, + 30256 - 11904: 0xEA73, + 30257 - 11904: 0xEA6D, + 30258 - 11904: 0xEA72, + 30259 - 11904: 0xEA6F, + 30260 - 11904: 0xBF60, + 30261 - 11904: 0xEA71, + 30264 - 11904: 0xBF61, + 30266 - 11904: 0xBF62, + 30267 - 11904: 0x9DDD, + 30268 - 11904: 0xEA70, + 30269 - 11904: 0xEA6E, + 30272 - 11904: 0x9EE1, + 30274 - 11904: 0xC0F8, + 30275 - 11904: 0xED74, + 30278 - 11904: 0xC0F7, + 30279 - 11904: 0xED77, + 30280 - 11904: 0xED75, + 30281 - 11904: 0xED76, + 30284 - 11904: 0xC0F9, + 30285 - 11904: 0x98DA, + 30286 - 11904: 0x9DDF, + 30287 - 11904: 0xFEBF, + 30288 - 11904: 0xF04D, + 30289 - 11904: 0xFEBE, + 30290 - 11904: 0xC2A1, + 30291 - 11904: 0xF04E, + 30292 - 11904: 0x9EEB, + 30294 - 11904: 0xC27D, + 30295 - 11904: 0xF04F, + 30296 - 11904: 0xC27E, + 30297 - 11904: 0xF04C, + 30298 - 11904: 0xF050, + 30300 - 11904: 0xF04A, + 30303 - 11904: 0xC3A7, + 30304 - 11904: 0xF278, + 30305 - 11904: 0xC3A8, + 30306 - 11904: 0xC46F, + 30308 - 11904: 0xF04B, + 30309 - 11904: 0xC470, + 30310 - 11904: 0x9E59, + 30311 - 11904: 0xA05C, + 30313 - 11904: 0xC4EE, + 30314 - 11904: 0xF5DF, + 30316 - 11904: 0xC57E, + 30317 - 11904: 0xF6F4, + 30318 - 11904: 0xC57D, + 30319 - 11904: 0xFEC0, + 30320 - 11904: 0xF7EA, + 30321 - 11904: 0xC5F5, + 30322 - 11904: 0xC5F6, + 30323 - 11904: 0x9477, + 30324 - 11904: 0x98DC, + 30325 - 11904: 0xF9CC, + 30326 - 11904: 0xFEC1, + 30328 - 11904: 0xACD1, + 30329 - 11904: 0xCFDE, + 30330 - 11904: 0x98DE, + 30331 - 11904: 0xB56E, + 30332 - 11904: 0xB56F, + 30333 - 11904: 0xA5D5, + 30334 - 11904: 0xA6CA, + 30335 - 11904: 0xCA47, + 30337 - 11904: 0xCB71, + 30338 - 11904: 0xA86D, + 30340 - 11904: 0xAABA, + 30342 - 11904: 0xACD2, + 30343 - 11904: 0xACD3, + 30344 - 11904: 0xACD4, + 30345 - 11904: 0xD6A6, + 30346 - 11904: 0xD2CB, + 30347 - 11904: 0xAF6F, + 30350 - 11904: 0xB2AE, + 30351 - 11904: 0xD6A5, + 30352 - 11904: 0xFEC3, + 30354 - 11904: 0xDAB8, + 30355 - 11904: 0xB571, + 30357 - 11904: 0xDAB7, + 30358 - 11904: 0xB570, + 30361 - 11904: 0xDED5, + 30362 - 11904: 0xBD4A, + 30363 - 11904: 0xE6BB, + 30364 - 11904: 0xE6B8, + 30365 - 11904: 0xE6B9, + 30366 - 11904: 0xE6BA, + 30369 - 11904: 0xFEC8, + 30372 - 11904: 0xED78, + 30373 - 11904: 0xFEC9, + 30374 - 11904: 0xF051, + 30378 - 11904: 0xF471, + 30379 - 11904: 0xF470, + 30381 - 11904: 0xF6F5, + 30382 - 11904: 0xA5D6, + 30383 - 11904: 0xCD75, + 30384 - 11904: 0xAF70, + 30388 - 11904: 0xB572, + 30389 - 11904: 0xDED6, + 30391 - 11904: 0xFECA, + 30392 - 11904: 0xE2E1, + 30394 - 11904: 0xBD4B, + 30395 - 11904: 0xEA74, + 30397 - 11904: 0xF052, + 30398 - 11904: 0xF472, + 30399 - 11904: 0xA5D7, + 30402 - 11904: 0xAABB, + 30403 - 11904: 0xACD7, + 30404 - 11904: 0xCFDF, + 30405 - 11904: 0xACD8, + 30406 - 11904: 0xACD6, + 30408 - 11904: 0xACD5, + 30409 - 11904: 0xD2CC, + 30410 - 11904: 0xAF71, + 30412 - 11904: 0xFECB, + 30413 - 11904: 0xAF72, + 30414 - 11904: 0xAF73, + 30418 - 11904: 0xB2B0, + 30419 - 11904: 0xD6A7, + 30420 - 11904: 0xB2AF, + 30422 - 11904: 0x9FC2, + 30425 - 11904: 0x8C6B, + 30426 - 11904: 0xDAB9, + 30427 - 11904: 0xB2B1, + 30428 - 11904: 0xB573, + 30429 - 11904: 0xDED7, + 30430 - 11904: 0xB7F8, + 30431 - 11904: 0xB7F9, + 30433 - 11904: 0xBAC9, + 30435 - 11904: 0xBACA, + 30436 - 11904: 0xBD4C, + 30437 - 11904: 0xBF64, + 30438 - 11904: 0xEA75, + 30439 - 11904: 0xBF63, + 30441 - 11904: 0xED79, + 30442 - 11904: 0xC0FA, + 30444 - 11904: 0xF053, + 30445 - 11904: 0xF473, + 30446 - 11904: 0xA5D8, + 30447 - 11904: 0xA86E, + 30448 - 11904: 0xCD78, + 30449 - 11904: 0xCD77, + 30450 - 11904: 0xAABC, + 30451 - 11904: 0xCD76, + 30452 - 11904: 0xAABD, + 30453 - 11904: 0xCD79, + 30455 - 11904: 0xCFE5, + 30456 - 11904: 0xACDB, + 30457 - 11904: 0xACDA, + 30458 - 11904: 0xCFE7, + 30459 - 11904: 0xCFE6, + 30460 - 11904: 0xACDF, + 30462 - 11904: 0xACDE, + 30465 - 11904: 0xACD9, + 30467 - 11904: 0xCFE1, + 30468 - 11904: 0xCFE2, + 30469 - 11904: 0xCFE3, + 30471 - 11904: 0xACE0, + 30472 - 11904: 0xCFE0, + 30473 - 11904: 0xACDC, + 30474 - 11904: 0xCFE4, + 30475 - 11904: 0xACDD, + 30476 - 11904: 0x98C4, + 30478 - 11904: 0x94B0, + 30479 - 11904: 0x94B1, + 30480 - 11904: 0xD2CF, + 30481 - 11904: 0xD2D3, + 30482 - 11904: 0xD2D1, + 30483 - 11904: 0xD2D0, + 30485 - 11904: 0xD2D4, + 30489 - 11904: 0xD2D5, + 30490 - 11904: 0xD2D6, + 30491 - 11904: 0xD2CE, + 30493 - 11904: 0xD2CD, + 30494 - 11904: 0xFED1, + 30495 - 11904: 0xAF75, + 30496 - 11904: 0xAF76, + 30498 - 11904: 0xD2D7, + 30499 - 11904: 0xD2D2, + 30500 - 11904: 0xA0C1, + 30501 - 11904: 0xD6B0, + 30502 - 11904: 0xFED2, + 30503 - 11904: 0xD2D8, + 30504 - 11904: 0xAF77, + 30505 - 11904: 0xAF74, + 30507 - 11904: 0xA0CD, + 30509 - 11904: 0xD6AA, + 30511 - 11904: 0xD6A9, + 30513 - 11904: 0xD6AB, + 30514 - 11904: 0xD6AC, + 30515 - 11904: 0xD6AE, + 30516 - 11904: 0xD6AD, + 30517 - 11904: 0xD6B2, + 30518 - 11904: 0xB2B5, + 30519 - 11904: 0xB2B2, + 30520 - 11904: 0xB2B6, + 30521 - 11904: 0xD6A8, + 30522 - 11904: 0xB2B7, + 30523 - 11904: 0xD6B1, + 30524 - 11904: 0xB2B4, + 30525 - 11904: 0xD6AF, + 30526 - 11904: 0xB2B3, + 30528 - 11904: 0xFED3, + 30531 - 11904: 0x98E5, + 30532 - 11904: 0xDABC, + 30533 - 11904: 0xDABE, + 30534 - 11904: 0xDABA, + 30535 - 11904: 0xDABB, + 30538 - 11904: 0xDABF, + 30539 - 11904: 0xDAC1, + 30540 - 11904: 0xDAC2, + 30541 - 11904: 0xDABD, + 30542 - 11904: 0xDAC0, + 30543 - 11904: 0xB574, + 30546 - 11904: 0xDEDB, + 30548 - 11904: 0xDEE0, + 30549 - 11904: 0xDED8, + 30550 - 11904: 0xDEDC, + 30552 - 11904: 0xFED6, + 30553 - 11904: 0xDEE1, + 30554 - 11904: 0xDEDD, + 30555 - 11904: 0xB7FA, + 30556 - 11904: 0xB843, + 30558 - 11904: 0xB7FD, + 30559 - 11904: 0xDED9, + 30560 - 11904: 0xDEDA, + 30561 - 11904: 0xBACE, + 30562 - 11904: 0xB846, + 30563 - 11904: 0xB7FE, + 30565 - 11904: 0xB844, + 30566 - 11904: 0xB7FC, + 30567 - 11904: 0xDEDF, + 30568 - 11904: 0xB845, + 30569 - 11904: 0xDEDE, + 30570 - 11904: 0xB841, + 30571 - 11904: 0xB7FB, + 30572 - 11904: 0xB842, + 30573 - 11904: 0xDEE2, + 30574 - 11904: 0xE2E6, + 30575 - 11904: 0xE2E8, + 30578 - 11904: 0x91E4, + 30583 - 11904: 0x8FC7, + 30584 - 11904: 0x94AE, + 30585 - 11904: 0xB840, + 30586 - 11904: 0x8A4F, + 30587 - 11904: 0x94B2, + 30588 - 11904: 0xE2E3, + 30589 - 11904: 0xBACC, + 30590 - 11904: 0xE2E9, + 30591 - 11904: 0xBACD, + 30592 - 11904: 0xE2E7, + 30593 - 11904: 0xE2E2, + 30594 - 11904: 0xE2E5, + 30595 - 11904: 0xE2EA, + 30596 - 11904: 0xBACB, + 30597 - 11904: 0xE2E4, + 30599 - 11904: 0xBD4E, + 30600 - 11904: 0xE6BF, + 30601 - 11904: 0xE6BE, + 30603 - 11904: 0xBD51, + 30604 - 11904: 0xBD4F, + 30605 - 11904: 0xE6BC, + 30606 - 11904: 0xBD4D, + 30607 - 11904: 0xE6BD, + 30609 - 11904: 0xBD50, + 30611 - 11904: 0x8FD4, + 30613 - 11904: 0xEA7D, + 30615 - 11904: 0xEAA1, + 30616 - 11904: 0x98EA, + 30617 - 11904: 0xEA7E, + 30618 - 11904: 0xEA76, + 30619 - 11904: 0xEA7A, + 30620 - 11904: 0xEA79, + 30621 - 11904: 0xEA77, + 30622 - 11904: 0xBF66, + 30623 - 11904: 0xBF67, + 30624 - 11904: 0xBF65, + 30625 - 11904: 0xEA78, + 30626 - 11904: 0xEA7B, + 30627 - 11904: 0xEA7C, + 30629 - 11904: 0xBF68, + 30631 - 11904: 0xC140, + 30632 - 11904: 0xEDA3, + 30634 - 11904: 0xC0FC, + 30635 - 11904: 0xED7B, + 30636 - 11904: 0xC0FE, + 30637 - 11904: 0xC141, + 30639 - 11904: 0xFED8, + 30640 - 11904: 0xC0FD, + 30641 - 11904: 0xEDA2, + 30642 - 11904: 0xED7C, + 30643 - 11904: 0xC0FB, + 30644 - 11904: 0xEDA1, + 30645 - 11904: 0xED7A, + 30646 - 11904: 0xED7E, + 30647 - 11904: 0xED7D, + 30649 - 11904: 0x9DE0, + 30650 - 11904: 0xF055, + 30651 - 11904: 0xC2A4, + 30652 - 11904: 0xC2A5, + 30653 - 11904: 0xC2A2, + 30654 - 11904: 0x98EE, + 30655 - 11904: 0xC2A3, + 30658 - 11904: 0xF054, + 30659 - 11904: 0x95C4, + 30660 - 11904: 0xF27B, + 30661 - 11904: 0xFCE8, + 30663 - 11904: 0xC3A9, + 30665 - 11904: 0xF279, + 30666 - 11904: 0xF27A, + 30667 - 11904: 0x98EF, + 30668 - 11904: 0xF474, + 30669 - 11904: 0xF477, + 30670 - 11904: 0xF475, + 30671 - 11904: 0xF476, + 30672 - 11904: 0xF5E0, + 30675 - 11904: 0xC4EF, + 30676 - 11904: 0xF7EB, + 30677 - 11904: 0xF8B4, + 30679 - 11904: 0xC5F7, + 30680 - 11904: 0xF8F8, + 30681 - 11904: 0xF8F9, + 30682 - 11904: 0xC666, + 30683 - 11904: 0xA5D9, + 30684 - 11904: 0xACE1, + 30685 - 11904: 0x8C6E, + 30686 - 11904: 0xDAC3, + 30688 - 11904: 0xDEE3, + 30690 - 11904: 0xA5DA, + 30691 - 11904: 0xA86F, + 30693 - 11904: 0xAABE, + 30694 - 11904: 0xFAD8, + 30695 - 11904: 0xCFE8, + 30696 - 11904: 0xCFE9, + 30697 - 11904: 0xAF78, + 30700 - 11904: 0xDAC4, + 30701 - 11904: 0xB575, + 30702 - 11904: 0xB847, + 30703 - 11904: 0xC142, + 30704 - 11904: 0xEDA4, + 30705 - 11904: 0xF27C, + 30706 - 11904: 0xF478, + 30707 - 11904: 0xA5DB, + 30708 - 11904: 0xFEDC, + 30711 - 11904: 0xCDA1, + 30712 - 11904: 0xCD7A, + 30713 - 11904: 0xCD7C, + 30714 - 11904: 0xCD7E, + 30715 - 11904: 0xCD7D, + 30716 - 11904: 0xCD7B, + 30717 - 11904: 0xAABF, + 30718 - 11904: 0xA0AE, + 30722 - 11904: 0xACE2, + 30723 - 11904: 0xCFF2, + 30725 - 11904: 0xCFED, + 30726 - 11904: 0xCFEA, + 30728 - 11904: 0x9D4C, + 30729 - 11904: 0xFEDD, + 30732 - 11904: 0xACE4, + 30733 - 11904: 0xACE5, + 30734 - 11904: 0xCFF0, + 30735 - 11904: 0xCFEF, + 30736 - 11904: 0xCFEE, + 30737 - 11904: 0xCFEB, + 30738 - 11904: 0xCFEC, + 30739 - 11904: 0xCFF3, + 30740 - 11904: 0xACE3, + 30744 - 11904: 0x98F1, + 30748 - 11904: 0x98F3, + 30749 - 11904: 0xAF7C, + 30750 - 11904: 0x94C1, + 30751 - 11904: 0xAFA4, + 30752 - 11904: 0xAFA3, + 30753 - 11904: 0xD2E1, + 30754 - 11904: 0xD2DB, + 30755 - 11904: 0xD2D9, + 30757 - 11904: 0xAFA1, + 30758 - 11904: 0xD6B9, + 30759 - 11904: 0xAF7A, + 30760 - 11904: 0xD2DE, + 30761 - 11904: 0xD2E2, + 30762 - 11904: 0xD2E4, + 30763 - 11904: 0xD2E0, + 30764 - 11904: 0xD2DA, + 30765 - 11904: 0xAFA2, + 30766 - 11904: 0xD2DF, + 30767 - 11904: 0xD2DD, + 30768 - 11904: 0xAF79, + 30769 - 11904: 0xD2E5, + 30770 - 11904: 0xAFA5, + 30771 - 11904: 0xD2E3, + 30772 - 11904: 0xAF7D, + 30773 - 11904: 0xD2DC, + 30775 - 11904: 0xAF7E, + 30776 - 11904: 0xAF7B, + 30777 - 11904: 0x98F5, + 30780 - 11904: 0xFA4F, + 30781 - 11904: 0x96E2, + 30786 - 11904: 0x9450, + 30787 - 11904: 0xB2B9, + 30788 - 11904: 0x96A2, + 30789 - 11904: 0xD6BA, + 30791 - 11904: 0x98F6, + 30792 - 11904: 0xD6B3, + 30793 - 11904: 0xD6B5, + 30794 - 11904: 0xD6B7, + 30795 - 11904: 0x96E5, + 30796 - 11904: 0xD6B8, + 30797 - 11904: 0xD6B6, + 30798 - 11904: 0xB2BA, + 30800 - 11904: 0xD6BB, + 30801 - 11904: 0x98F7, + 30802 - 11904: 0xD6B4, + 30803 - 11904: 0xA046, + 30804 - 11904: 0x96E3, + 30812 - 11904: 0xDAC8, + 30813 - 11904: 0xB576, + 30814 - 11904: 0xDAD0, + 30816 - 11904: 0xDAC5, + 30818 - 11904: 0xDAD1, + 30820 - 11904: 0xDAC6, + 30821 - 11904: 0xDAC7, + 30822 - 11904: 0x98F8, + 30824 - 11904: 0xDACF, + 30825 - 11904: 0xDACE, + 30826 - 11904: 0xDACB, + 30827 - 11904: 0xB2B8, + 30828 - 11904: 0xB577, + 30829 - 11904: 0xDAC9, + 30830 - 11904: 0xDACC, + 30831 - 11904: 0xB578, + 30832 - 11904: 0xDACD, + 30833 - 11904: 0xDACA, + 30841 - 11904: 0xDEEE, + 30842 - 11904: 0x9EE4, + 30843 - 11904: 0xDEF2, + 30844 - 11904: 0xB84E, + 30846 - 11904: 0xE2F0, + 30847 - 11904: 0xB851, + 30848 - 11904: 0xDEF0, + 30849 - 11904: 0xF9D6, + 30851 - 11904: 0xDEED, + 30852 - 11904: 0xDEE8, + 30853 - 11904: 0xDEEA, + 30854 - 11904: 0xDEEB, + 30855 - 11904: 0xDEE4, + 30856 - 11904: 0x94C3, + 30857 - 11904: 0xB84D, + 30860 - 11904: 0xB84C, + 30861 - 11904: 0x94C2, + 30862 - 11904: 0xB848, + 30863 - 11904: 0xDEE7, + 30865 - 11904: 0xB84F, + 30867 - 11904: 0xB850, + 30868 - 11904: 0xDEE6, + 30869 - 11904: 0xDEE9, + 30870 - 11904: 0xDEF1, + 30871 - 11904: 0xB84A, + 30872 - 11904: 0xB84B, + 30873 - 11904: 0xDEEF, + 30874 - 11904: 0xDEE5, + 30878 - 11904: 0xE2F2, + 30879 - 11904: 0xBAD0, + 30880 - 11904: 0xE2F4, + 30881 - 11904: 0xDEEC, + 30882 - 11904: 0xE2F6, + 30883 - 11904: 0xBAD4, + 30884 - 11904: 0xE2F7, + 30885 - 11904: 0xE2F3, + 30887 - 11904: 0xBAD1, + 30888 - 11904: 0xE2EF, + 30889 - 11904: 0xBAD3, + 30890 - 11904: 0xE2EC, + 30891 - 11904: 0xE2F1, + 30892 - 11904: 0xE2F5, + 30893 - 11904: 0xE2EE, + 30895 - 11904: 0xFEE1, + 30896 - 11904: 0xB849, + 30897 - 11904: 0xFEE9, + 30898 - 11904: 0xE2EB, + 30899 - 11904: 0xBAD2, + 30900 - 11904: 0xE2ED, + 30902 - 11904: 0x96E4, + 30904 - 11904: 0x89AC, + 30905 - 11904: 0x96DB, + 30906 - 11904: 0xBD54, + 30907 - 11904: 0xE6C1, + 30908 - 11904: 0xBD58, + 30910 - 11904: 0xBD56, + 30913 - 11904: 0xBACF, + 30915 - 11904: 0xE6C8, + 30916 - 11904: 0xE6C9, + 30917 - 11904: 0xBD53, + 30919 - 11904: 0xFEE2, + 30920 - 11904: 0xE6C7, + 30921 - 11904: 0xE6CA, + 30922 - 11904: 0xBD55, + 30923 - 11904: 0xBD52, + 30924 - 11904: 0xE6C3, + 30925 - 11904: 0xE6C0, + 30926 - 11904: 0xE6C5, + 30927 - 11904: 0xE6C2, + 30928 - 11904: 0xBD59, + 30929 - 11904: 0xE6C4, + 30930 - 11904: 0x94C4, + 30931 - 11904: 0xFEE3, + 30932 - 11904: 0xE6C6, + 30933 - 11904: 0xBD57, + 30935 - 11904: 0xFEE7, + 30936 - 11904: 0x9FFB, + 30938 - 11904: 0xBF6A, + 30939 - 11904: 0xEAA8, + 30941 - 11904: 0xEAA2, + 30942 - 11904: 0xEAA6, + 30943 - 11904: 0xEAAC, + 30944 - 11904: 0xEAAD, + 30945 - 11904: 0xEAA9, + 30946 - 11904: 0xEAAA, + 30947 - 11904: 0xEAA7, + 30948 - 11904: 0x8C59, + 30949 - 11904: 0xEAA4, + 30951 - 11904: 0xBF6C, + 30952 - 11904: 0xBF69, + 30953 - 11904: 0xEAA3, + 30954 - 11904: 0xEAA5, + 30956 - 11904: 0xBF6B, + 30957 - 11904: 0xEAAB, + 30958 - 11904: 0x93C9, + 30959 - 11904: 0xC146, + 30960 - 11904: 0x94E8, + 30961 - 11904: 0xFB56, + 30962 - 11904: 0xEDAA, + 30963 - 11904: 0xEDA5, + 30964 - 11904: 0xC145, + 30965 - 11904: 0x90C5, + 30967 - 11904: 0xC143, + 30969 - 11904: 0xEDAC, + 30970 - 11904: 0xC144, + 30971 - 11904: 0xEDA8, + 30972 - 11904: 0xEDA9, + 30973 - 11904: 0xEDA6, + 30974 - 11904: 0xEDAD, + 30975 - 11904: 0xF056, + 30977 - 11904: 0xC147, + 30978 - 11904: 0xEDA7, + 30980 - 11904: 0xEDAE, + 30981 - 11904: 0xEDAB, + 30982 - 11904: 0xA0A8, + 30985 - 11904: 0xF05A, + 30988 - 11904: 0xF057, + 30990 - 11904: 0xC2A6, + 30992 - 11904: 0xF05B, + 30993 - 11904: 0xF05D, + 30994 - 11904: 0xF05C, + 30995 - 11904: 0xF058, + 30996 - 11904: 0xF059, + 30999 - 11904: 0xF2A3, + 31001 - 11904: 0xC3AA, + 31003 - 11904: 0xF27E, + 31004 - 11904: 0xF2A2, + 31005 - 11904: 0xF27D, + 31006 - 11904: 0xF2A4, + 31009 - 11904: 0xF2A1, + 31011 - 11904: 0xF47A, + 31012 - 11904: 0xF47D, + 31013 - 11904: 0xF479, + 31014 - 11904: 0xC471, + 31015 - 11904: 0xF47B, + 31016 - 11904: 0xF47C, + 31017 - 11904: 0xF47E, + 31018 - 11904: 0xC472, + 31019 - 11904: 0xC474, + 31020 - 11904: 0xC473, + 31021 - 11904: 0xF5E1, + 31022 - 11904: 0xFEE5, + 31023 - 11904: 0xF5E3, + 31025 - 11904: 0xF5E2, + 31026 - 11904: 0x98FD, + 31027 - 11904: 0x98FB, + 31028 - 11904: 0xFEE8, + 31029 - 11904: 0xF6F6, + 31030 - 11904: 0x8EBF, + 31032 - 11904: 0xF8B5, + 31033 - 11904: 0xF8FA, + 31034 - 11904: 0xA5DC, + 31035 - 11904: 0x8BD8, + 31036 - 11904: 0xFEF7, + 31037 - 11904: 0xCB72, + 31038 - 11904: 0xAAC0, + 31039 - 11904: 0xCDA3, + 31040 - 11904: 0xAAC1, + 31041 - 11904: 0xAAC2, + 31042 - 11904: 0xCDA2, + 31044 - 11904: 0xCFF8, + 31045 - 11904: 0xCFF7, + 31046 - 11904: 0xACE6, + 31047 - 11904: 0xACE9, + 31048 - 11904: 0xACE8, + 31049 - 11904: 0xACE7, + 31050 - 11904: 0xCFF4, + 31051 - 11904: 0xCFF6, + 31052 - 11904: 0xCFF5, + 31055 - 11904: 0xD2E8, + 31056 - 11904: 0xAFA7, + 31057 - 11904: 0xD2EC, + 31058 - 11904: 0xD2EB, + 31059 - 11904: 0xD2EA, + 31060 - 11904: 0xD2E6, + 31061 - 11904: 0xAFA6, + 31062 - 11904: 0xAFAA, + 31063 - 11904: 0xAFAD, + 31064 - 11904: 0x8F68, + 31065 - 11904: 0x94C6, + 31066 - 11904: 0xAFAE, + 31067 - 11904: 0xD2E7, + 31068 - 11904: 0xD2E9, + 31069 - 11904: 0xAFAC, + 31070 - 11904: 0xAFAB, + 31071 - 11904: 0xAFA9, + 31072 - 11904: 0xAFA8, + 31073 - 11904: 0xD6C2, + 31074 - 11904: 0x9DEA, + 31075 - 11904: 0xD6C0, + 31076 - 11904: 0xD6BC, + 31077 - 11904: 0xB2BB, + 31079 - 11904: 0xD6BD, + 31080 - 11904: 0xB2BC, + 31081 - 11904: 0xD6BE, + 31082 - 11904: 0xD6BF, + 31083 - 11904: 0xD6C1, + 31085 - 11904: 0xB2BD, + 31088 - 11904: 0xDAD5, + 31089 - 11904: 0xFC69, + 31090 - 11904: 0xDAD4, + 31091 - 11904: 0xDAD3, + 31092 - 11904: 0xDAD2, + 31097 - 11904: 0xDEF6, + 31098 - 11904: 0xB852, + 31100 - 11904: 0xDEF3, + 31101 - 11904: 0xDEF5, + 31102 - 11904: 0x9CDA, + 31103 - 11904: 0xB853, + 31104 - 11904: 0xFEF3, + 31105 - 11904: 0xB854, + 31106 - 11904: 0xDEF4, + 31107 - 11904: 0x9C72, + 31110 - 11904: 0xFEF0, + 31111 - 11904: 0x89C9, + 31112 - 11904: 0xE341, + 31114 - 11904: 0xE2F9, + 31115 - 11904: 0xE2FA, + 31117 - 11904: 0xBAD7, + 31118 - 11904: 0xBAD5, + 31119 - 11904: 0xBAD6, + 31120 - 11904: 0xE343, + 31121 - 11904: 0x9941, + 31122 - 11904: 0xE342, + 31123 - 11904: 0xE2FE, + 31124 - 11904: 0xE2FD, + 31125 - 11904: 0xE2FC, + 31126 - 11904: 0xE2FB, + 31127 - 11904: 0xE340, + 31128 - 11904: 0xE2F8, + 31129 - 11904: 0x9942, + 31130 - 11904: 0xE6CB, + 31131 - 11904: 0xE6D0, + 31132 - 11904: 0xE6CE, + 31133 - 11904: 0xFEF5, + 31135 - 11904: 0x91D7, + 31136 - 11904: 0xE6CD, + 31137 - 11904: 0xE6CC, + 31138 - 11904: 0xE6CF, + 31140 - 11904: 0xEAAE, + 31141 - 11904: 0x94CC, + 31142 - 11904: 0xBF6D, + 31143 - 11904: 0xC148, + 31144 - 11904: 0xEDB0, + 31145 - 11904: 0xFEF8, + 31146 - 11904: 0xC149, + 31147 - 11904: 0xEDAF, + 31148 - 11904: 0xF05F, + 31149 - 11904: 0xF05E, + 31150 - 11904: 0xC2A7, + 31152 - 11904: 0xF2A5, + 31153 - 11904: 0xC3AB, + 31154 - 11904: 0xF4A1, + 31155 - 11904: 0xC5A1, + 31156 - 11904: 0xF6F7, + 31158 - 11904: 0xF8B7, + 31159 - 11904: 0xF8B6, + 31160 - 11904: 0xC9A8, + 31161 - 11904: 0xACEA, + 31162 - 11904: 0xACEB, + 31163 - 11904: 0xD6C3, + 31165 - 11904: 0xB856, + 31166 - 11904: 0xA5DD, + 31167 - 11904: 0xA872, + 31168 - 11904: 0xA871, + 31169 - 11904: 0xA870, + 31172 - 11904: 0x97A8, + 31173 - 11904: 0xCDA4, + 31174 - 11904: 0xFEFC, + 31176 - 11904: 0xAAC4, + 31177 - 11904: 0xAAC3, + 31178 - 11904: 0x8CDE, + 31179 - 11904: 0xACEE, + 31180 - 11904: 0xFDBF, + 31181 - 11904: 0xCFFA, + 31182 - 11904: 0xCFFD, + 31183 - 11904: 0xCFFB, + 31184 - 11904: 0x87B3, + 31185 - 11904: 0xACEC, + 31186 - 11904: 0xACED, + 31188 - 11904: 0xFEFE, + 31189 - 11904: 0xCFF9, + 31190 - 11904: 0xCFFC, + 31192 - 11904: 0xAFB5, + 31196 - 11904: 0xD2F3, + 31197 - 11904: 0xD2F5, + 31198 - 11904: 0xD2F4, + 31199 - 11904: 0xAFB2, + 31200 - 11904: 0xD2EF, + 31202 - 11904: 0x96D1, + 31203 - 11904: 0xAFB0, + 31204 - 11904: 0xAFAF, + 31206 - 11904: 0xAFB3, + 31207 - 11904: 0xAFB1, + 31209 - 11904: 0xAFB4, + 31210 - 11904: 0xD2F2, + 31211 - 11904: 0xD2ED, + 31212 - 11904: 0xD2EE, + 31213 - 11904: 0xD2F1, + 31214 - 11904: 0xD2F0, + 31217 - 11904: 0x94D5, + 31220 - 11904: 0x94D0, + 31222 - 11904: 0xD6C6, + 31223 - 11904: 0xD6C7, + 31224 - 11904: 0xD6C5, + 31226 - 11904: 0xD6C4, + 31227 - 11904: 0xB2BE, + 31232 - 11904: 0xB57D, + 31234 - 11904: 0xDAD6, + 31235 - 11904: 0xDAD8, + 31236 - 11904: 0xDADA, + 31237 - 11904: 0xB57C, + 31238 - 11904: 0x9944, + 31240 - 11904: 0xB57A, + 31242 - 11904: 0xDAD7, + 31243 - 11904: 0xB57B, + 31244 - 11904: 0xDAD9, + 31245 - 11904: 0xB579, + 31248 - 11904: 0xDF41, + 31249 - 11904: 0xDEF7, + 31250 - 11904: 0xDEFA, + 31251 - 11904: 0xDEFE, + 31252 - 11904: 0xB85A, + 31253 - 11904: 0xDEFC, + 31255 - 11904: 0xDEFB, + 31256 - 11904: 0xDEF8, + 31257 - 11904: 0xDEF9, + 31258 - 11904: 0xB858, + 31259 - 11904: 0xDF40, + 31260 - 11904: 0xB857, + 31262 - 11904: 0xB85C, + 31263 - 11904: 0xB85B, + 31264 - 11904: 0xB859, + 31266 - 11904: 0xDEFD, + 31270 - 11904: 0xE349, + 31272 - 11904: 0xE348, + 31274 - 11904: 0x8C63, + 31275 - 11904: 0xE344, + 31276 - 11904: 0x87BB, + 31277 - 11904: 0xA0B3, + 31278 - 11904: 0xBAD8, + 31279 - 11904: 0xE347, + 31280 - 11904: 0xE346, + 31281 - 11904: 0xBAD9, + 31282 - 11904: 0x87B4, + 31287 - 11904: 0xBD5E, + 31289 - 11904: 0xE6D2, + 31290 - 11904: 0x94CF, + 31291 - 11904: 0xBD5F, + 31292 - 11904: 0xBD5B, + 31293 - 11904: 0xBD5D, + 31294 - 11904: 0x9FFA, + 31295 - 11904: 0xBD5A, + 31296 - 11904: 0xBD5C, + 31299 - 11904: 0x91E5, + 31300 - 11904: 0xEAAF, + 31301 - 11904: 0x9C6A, + 31302 - 11904: 0xBF70, + 31303 - 11904: 0xEAB1, + 31304 - 11904: 0xEAB0, + 31305 - 11904: 0x8E49, + 31306 - 11904: 0xE345, + 31307 - 11904: 0xBF72, + 31308 - 11904: 0xBF71, + 31309 - 11904: 0xBF6E, + 31310 - 11904: 0xBF6F, + 31316 - 11904: 0xEDB5, + 31318 - 11904: 0xEDB3, + 31319 - 11904: 0xC14A, + 31320 - 11904: 0xEDB4, + 31322 - 11904: 0xEDB6, + 31323 - 11904: 0xEDB2, + 31324 - 11904: 0xEDB1, + 31327 - 11904: 0xF060, + 31328 - 11904: 0xC2AA, + 31329 - 11904: 0xC2A8, + 31330 - 11904: 0xC2A9, + 31333 - 11904: 0x8E4C, + 31335 - 11904: 0xF2A6, + 31336 - 11904: 0xF2A7, + 31337 - 11904: 0xC3AD, + 31339 - 11904: 0xC3AC, + 31340 - 11904: 0xF4A3, + 31341 - 11904: 0xF4A4, + 31342 - 11904: 0xF4A2, + 31344 - 11904: 0xF6F8, + 31345 - 11904: 0xF6F9, + 31346 - 11904: 0x87C9, + 31348 - 11904: 0xA5DE, + 31349 - 11904: 0xCA48, + 31350 - 11904: 0xA873, + 31352 - 11904: 0xCDA5, + 31353 - 11904: 0xAAC6, + 31354 - 11904: 0xAAC5, + 31355 - 11904: 0xCDA6, + 31357 - 11904: 0x8E4D, + 31358 - 11904: 0xD040, + 31359 - 11904: 0xACEF, + 31360 - 11904: 0xCFFE, + 31361 - 11904: 0xACF0, + 31363 - 11904: 0x9A73, + 31364 - 11904: 0xAFB6, + 31365 - 11904: 0xD2F8, + 31366 - 11904: 0xD2F6, + 31367 - 11904: 0xD2FC, + 31368 - 11904: 0xAFB7, + 31369 - 11904: 0xD2F7, + 31370 - 11904: 0xD2FB, + 31371 - 11904: 0xD2F9, + 31372 - 11904: 0xD2FA, + 31375 - 11904: 0xD6C8, + 31376 - 11904: 0xD6CA, + 31377 - 11904: 0x9947, + 31378 - 11904: 0xB2BF, + 31379 - 11904: 0x8CB1, + 31380 - 11904: 0xD6C9, + 31381 - 11904: 0xB2C0, + 31382 - 11904: 0xB5A2, + 31383 - 11904: 0xB5A1, + 31384 - 11904: 0xB57E, + 31385 - 11904: 0xDADB, + 31390 - 11904: 0xDF44, + 31391 - 11904: 0xB85D, + 31392 - 11904: 0xB85E, + 31394 - 11904: 0xDF43, + 31395 - 11904: 0xDF42, + 31400 - 11904: 0xE34A, + 31401 - 11904: 0xBADB, + 31402 - 11904: 0xBADA, + 31403 - 11904: 0xE34B, + 31404 - 11904: 0xE34C, + 31406 - 11904: 0xBD61, + 31407 - 11904: 0xBD60, + 31408 - 11904: 0x8E50, + 31409 - 11904: 0xEAB5, + 31410 - 11904: 0xE6D3, + 31411 - 11904: 0xE6D5, + 31412 - 11904: 0xE6D4, + 31413 - 11904: 0xEAB4, + 31414 - 11904: 0xEAB2, + 31415 - 11904: 0xEAB6, + 31416 - 11904: 0xEAB3, + 31418 - 11904: 0xBF73, + 31419 - 11904: 0x8E4F, + 31420 - 11904: 0x9949, + 31422 - 11904: 0xEDB7, + 31423 - 11904: 0xC14B, + 31424 - 11904: 0xEDB8, + 31425 - 11904: 0xEDB9, + 31426 - 11904: 0x8E51, + 31427 - 11904: 0x8E52, + 31428 - 11904: 0xC2AB, + 31429 - 11904: 0xC2AC, + 31431 - 11904: 0xC475, + 31432 - 11904: 0x9AB2, + 31433 - 11904: 0x89A5, + 31434 - 11904: 0xC5D1, + 31435 - 11904: 0xA5DF, + 31439 - 11904: 0x994C, + 31441 - 11904: 0xD041, + 31443 - 11904: 0x9FF8, + 31448 - 11904: 0xD2FD, + 31449 - 11904: 0xAFB8, + 31450 - 11904: 0x8E56, + 31451 - 11904: 0x994D, + 31452 - 11904: 0x91CA, + 31453 - 11904: 0x8E57, + 31455 - 11904: 0xB3BA, + 31456 - 11904: 0xB3B9, + 31458 - 11904: 0x94E1, + 31459 - 11904: 0xB5A4, + 31460 - 11904: 0xDADD, + 31461 - 11904: 0xB5A3, + 31462 - 11904: 0xDADC, + 31463 - 11904: 0x9047, + 31465 - 11904: 0x8FD8, + 31466 - 11904: 0x8E58, + 31467 - 11904: 0xDF45, + 31469 - 11904: 0xBADC, + 31470 - 11904: 0xE34D, + 31471 - 11904: 0xBADD, + 31478 - 11904: 0xC476, + 31479 - 11904: 0xF4A5, + 31481 - 11904: 0xA6CB, + 31482 - 11904: 0xAAC7, + 31483 - 11904: 0xCDA7, + 31484 - 11904: 0x87A3, + 31485 - 11904: 0xACF2, + 31486 - 11904: 0x94EB, + 31487 - 11904: 0xACF1, + 31488 - 11904: 0xD042, + 31489 - 11904: 0xD043, + 31492 - 11904: 0xD340, + 31493 - 11904: 0xD342, + 31494 - 11904: 0xAFB9, + 31496 - 11904: 0xD344, + 31497 - 11904: 0xD347, + 31498 - 11904: 0xD345, + 31499 - 11904: 0x8E5C, + 31500 - 11904: 0x9553, + 31502 - 11904: 0xD346, + 31503 - 11904: 0xD343, + 31504 - 11904: 0xD2FE, + 31505 - 11904: 0xAFBA, + 31506 - 11904: 0xD348, + 31507 - 11904: 0xD341, + 31508 - 11904: 0x9FE5, + 31512 - 11904: 0xD6D3, + 31513 - 11904: 0xB2C6, + 31514 - 11904: 0xD6DC, + 31515 - 11904: 0xB2C3, + 31517 - 11904: 0xD6D5, + 31518 - 11904: 0xB2C7, + 31519 - 11904: 0x9F56, + 31520 - 11904: 0xB2C1, + 31522 - 11904: 0xD6D0, + 31523 - 11904: 0xD6DD, + 31524 - 11904: 0xD6D1, + 31525 - 11904: 0xD6CE, + 31526 - 11904: 0xB2C5, + 31527 - 11904: 0x954F, + 31528 - 11904: 0xB2C2, + 31529 - 11904: 0x8E5E, + 31530 - 11904: 0xD6D4, + 31531 - 11904: 0xD6D7, + 31532 - 11904: 0xB2C4, + 31533 - 11904: 0xD6D8, + 31534 - 11904: 0xB2C8, + 31535 - 11904: 0xD6D9, + 31536 - 11904: 0xD6CF, + 31537 - 11904: 0xD6D6, + 31538 - 11904: 0xD6DA, + 31539 - 11904: 0xD6D2, + 31540 - 11904: 0xD6CD, + 31541 - 11904: 0xD6CB, + 31544 - 11904: 0xD6DB, + 31545 - 11904: 0x996A, + 31547 - 11904: 0xDADF, + 31552 - 11904: 0xDAE4, + 31554 - 11904: 0x9C64, + 31555 - 11904: 0x9CD9, + 31556 - 11904: 0xDAE0, + 31557 - 11904: 0xDAE6, + 31558 - 11904: 0xB5A7, + 31559 - 11904: 0xD6CC, + 31560 - 11904: 0xDAE1, + 31561 - 11904: 0xB5A5, + 31562 - 11904: 0xDADE, + 31563 - 11904: 0xB5AC, + 31564 - 11904: 0xDAE2, + 31565 - 11904: 0xB5AB, + 31566 - 11904: 0xDAE3, + 31567 - 11904: 0xB5AD, + 31568 - 11904: 0xB5A8, + 31569 - 11904: 0xB5AE, + 31570 - 11904: 0xB5A9, + 31572 - 11904: 0xB5AA, + 31573 - 11904: 0x8E5D, + 31574 - 11904: 0xB5A6, + 31576 - 11904: 0xDAE5, + 31584 - 11904: 0xB861, + 31585 - 11904: 0xDF50, + 31586 - 11904: 0x9950, + 31587 - 11904: 0xDF53, + 31588 - 11904: 0xDF47, + 31589 - 11904: 0xDF4C, + 31590 - 11904: 0xDF46, + 31591 - 11904: 0xB863, + 31593 - 11904: 0xDF4A, + 31596 - 11904: 0x9951, + 31597 - 11904: 0xDF48, + 31598 - 11904: 0xB862, + 31599 - 11904: 0x8E62, + 31600 - 11904: 0xDF4F, + 31601 - 11904: 0xDF4E, + 31602 - 11904: 0xDF4B, + 31603 - 11904: 0xDF4D, + 31604 - 11904: 0xDF49, + 31605 - 11904: 0xBAE1, + 31606 - 11904: 0xDF52, + 31607 - 11904: 0xB85F, + 31608 - 11904: 0xDF51, + 31611 - 11904: 0x9952, + 31618 - 11904: 0xE35D, + 31620 - 11904: 0xBAE8, + 31621 - 11904: 0xE358, + 31623 - 11904: 0xBAE7, + 31624 - 11904: 0xE34E, + 31626 - 11904: 0xE350, + 31627 - 11904: 0xBAE0, + 31628 - 11904: 0xE355, + 31629 - 11904: 0xE354, + 31630 - 11904: 0xE357, + 31631 - 11904: 0xBAE5, + 31632 - 11904: 0xE352, + 31633 - 11904: 0xE351, + 31634 - 11904: 0x8E68, + 31636 - 11904: 0xBAE4, + 31637 - 11904: 0xBADF, + 31638 - 11904: 0xE353, + 31639 - 11904: 0xBAE2, + 31640 - 11904: 0xE359, + 31641 - 11904: 0xE35B, + 31643 - 11904: 0xE356, + 31644 - 11904: 0xE34F, + 31645 - 11904: 0xBAE3, + 31648 - 11904: 0xBD69, + 31649 - 11904: 0xBADE, + 31650 - 11904: 0x8E61, + 31651 - 11904: 0x9F59, + 31652 - 11904: 0xE35C, + 31660 - 11904: 0xE6D9, + 31661 - 11904: 0xBD62, + 31662 - 11904: 0x87D0, + 31663 - 11904: 0xE6DB, + 31665 - 11904: 0xBD63, + 31666 - 11904: 0x8BB3, + 31668 - 11904: 0xBD65, + 31669 - 11904: 0xE6DE, + 31671 - 11904: 0xE6D6, + 31672 - 11904: 0xBAE6, + 31673 - 11904: 0xE6DC, + 31678 - 11904: 0xE6D8, + 31680 - 11904: 0xB860, + 31681 - 11904: 0xBD68, + 31684 - 11904: 0xBD64, + 31685 - 11904: 0x87B9, + 31686 - 11904: 0xBD66, + 31687 - 11904: 0xBD67, + 31689 - 11904: 0xBF76, + 31690 - 11904: 0xE6DD, + 31691 - 11904: 0xE6D7, + 31692 - 11904: 0xBD6A, + 31694 - 11904: 0xE6DA, + 31695 - 11904: 0x9F5D, + 31696 - 11904: 0x8E66, + 31700 - 11904: 0xEAC0, + 31701 - 11904: 0xEABB, + 31704 - 11904: 0xEAC5, + 31705 - 11904: 0xBF74, + 31706 - 11904: 0xEABD, + 31707 - 11904: 0xBF78, + 31708 - 11904: 0xEAC3, + 31709 - 11904: 0xEABA, + 31710 - 11904: 0xEAB7, + 31711 - 11904: 0xEAC6, + 31712 - 11904: 0xC151, + 31713 - 11904: 0xBF79, + 31714 - 11904: 0xEAC2, + 31715 - 11904: 0xEAB8, + 31716 - 11904: 0xBF77, + 31717 - 11904: 0xEABC, + 31718 - 11904: 0xBF7B, + 31719 - 11904: 0xEAB9, + 31720 - 11904: 0xEABE, + 31721 - 11904: 0xBF7A, + 31722 - 11904: 0xEAC1, + 31723 - 11904: 0xEAC4, + 31724 - 11904: 0x8CB2, + 31728 - 11904: 0xEDCB, + 31729 - 11904: 0xEDCC, + 31730 - 11904: 0xEDBC, + 31731 - 11904: 0xEDC3, + 31732 - 11904: 0xEDC1, + 31735 - 11904: 0xC14F, + 31736 - 11904: 0xEDC8, + 31737 - 11904: 0xEABF, + 31738 - 11904: 0x8E6E, + 31739 - 11904: 0xEDBF, + 31740 - 11904: 0x9F64, + 31741 - 11904: 0xEDC9, + 31742 - 11904: 0xC14E, + 31743 - 11904: 0xEDBE, + 31744 - 11904: 0xEDBD, + 31745 - 11904: 0xEDC7, + 31746 - 11904: 0xEDC4, + 31747 - 11904: 0xEDC6, + 31749 - 11904: 0xEDBA, + 31750 - 11904: 0xEDCA, + 31751 - 11904: 0xC14C, + 31753 - 11904: 0xEDC5, + 31754 - 11904: 0xEDCE, + 31755 - 11904: 0xEDC2, + 31756 - 11904: 0xC150, + 31757 - 11904: 0xC14D, + 31758 - 11904: 0xEDC0, + 31759 - 11904: 0xEDBB, + 31760 - 11904: 0xEDCD, + 31761 - 11904: 0xBF75, + 31762 - 11904: 0x9953, + 31765 - 11904: 0xFAB8, + 31769 - 11904: 0xF063, + 31771 - 11904: 0x9954, + 31772 - 11904: 0xF061, + 31773 - 11904: 0xF067, + 31774 - 11904: 0xC2B0, + 31775 - 11904: 0xF065, + 31776 - 11904: 0xF064, + 31777 - 11904: 0xC2B2, + 31778 - 11904: 0xF06A, + 31779 - 11904: 0xC2B1, + 31781 - 11904: 0xF06B, + 31782 - 11904: 0xF068, + 31783 - 11904: 0xC2AE, + 31784 - 11904: 0xF069, + 31785 - 11904: 0xF062, + 31786 - 11904: 0xC2AF, + 31787 - 11904: 0xC2AD, + 31788 - 11904: 0xF2AB, + 31789 - 11904: 0xF066, + 31792 - 11904: 0xF06C, + 31795 - 11904: 0xF2A8, + 31797 - 11904: 0x8E70, + 31799 - 11904: 0xC3B2, + 31800 - 11904: 0xC3B0, + 31801 - 11904: 0xF2AA, + 31803 - 11904: 0xF2AC, + 31804 - 11904: 0xF2A9, + 31805 - 11904: 0xC3B1, + 31806 - 11904: 0xC3AE, + 31807 - 11904: 0xC3AF, + 31808 - 11904: 0xC3B3, + 31810 - 11904: 0x9F61, + 31811 - 11904: 0xC478, + 31812 - 11904: 0x8E72, + 31813 - 11904: 0xF4AA, + 31815 - 11904: 0xF4A9, + 31816 - 11904: 0xF4A7, + 31817 - 11904: 0xF4A6, + 31818 - 11904: 0xF4A8, + 31820 - 11904: 0xC477, + 31821 - 11904: 0xC479, + 31824 - 11904: 0xC4F0, + 31825 - 11904: 0xA06B, + 31827 - 11904: 0xF5E5, + 31828 - 11904: 0xF5E4, + 31830 - 11904: 0x9F40, + 31831 - 11904: 0xF6FA, + 31833 - 11904: 0xF6FC, + 31834 - 11904: 0xF6FE, + 31835 - 11904: 0xF6FD, + 31836 - 11904: 0xF6FB, + 31837 - 11904: 0x94ED, + 31839 - 11904: 0xC5A3, + 31840 - 11904: 0xC5A2, + 31843 - 11904: 0xC5D3, + 31844 - 11904: 0xC5D2, + 31845 - 11904: 0xC5D4, + 31846 - 11904: 0xF7ED, + 31847 - 11904: 0xF7EC, + 31849 - 11904: 0xF8FB, + 31850 - 11904: 0xF8B8, + 31851 - 11904: 0xF8FC, + 31852 - 11904: 0xC658, + 31853 - 11904: 0x94EE, + 31854 - 11904: 0xC659, + 31855 - 11904: 0xF96D, + 31856 - 11904: 0x9FBD, + 31858 - 11904: 0xC67E, + 31859 - 11904: 0xA6CC, + 31860 - 11904: 0x8E7B, + 31861 - 11904: 0xCDA8, + 31864 - 11904: 0xD045, + 31865 - 11904: 0xD046, + 31866 - 11904: 0xD044, + 31867 - 11904: 0x9957, + 31868 - 11904: 0x94F7, + 31869 - 11904: 0xACF3, + 31870 - 11904: 0x9F5F, + 31871 - 11904: 0xD047, + 31872 - 11904: 0xD048, + 31873 - 11904: 0xD049, + 31875 - 11904: 0x8E73, + 31876 - 11904: 0xD349, + 31877 - 11904: 0xD34F, + 31878 - 11904: 0x9F62, + 31880 - 11904: 0xD34D, + 31881 - 11904: 0xAFBB, + 31882 - 11904: 0xD34B, + 31884 - 11904: 0xD34C, + 31885 - 11904: 0xD34E, + 31886 - 11904: 0x94F6, + 31889 - 11904: 0xD34A, + 31890 - 11904: 0xB2C9, + 31892 - 11904: 0xD6DE, + 31893 - 11904: 0xB2CB, + 31894 - 11904: 0xD6E0, + 31895 - 11904: 0xB2CA, + 31896 - 11904: 0xD6DF, + 31900 - 11904: 0x9958, + 31902 - 11904: 0xDAE8, + 31903 - 11904: 0xB5AF, + 31905 - 11904: 0xDAEA, + 31906 - 11904: 0xDAE7, + 31907 - 11904: 0xD6E1, + 31909 - 11904: 0xB5B0, + 31910 - 11904: 0x8E75, + 31911 - 11904: 0xF9DB, + 31912 - 11904: 0xDAE9, + 31916 - 11904: 0x9072, + 31918 - 11904: 0x94F8, + 31919 - 11904: 0xDF56, + 31921 - 11904: 0xB864, + 31922 - 11904: 0xDF54, + 31923 - 11904: 0xB865, + 31924 - 11904: 0xDF55, + 31925 - 11904: 0xB866, + 31928 - 11904: 0x995A, + 31929 - 11904: 0xBAE9, + 31930 - 11904: 0xE361, + 31931 - 11904: 0xE35E, + 31932 - 11904: 0xE360, + 31933 - 11904: 0xBAEA, + 31934 - 11904: 0xBAEB, + 31935 - 11904: 0xE35F, + 31938 - 11904: 0xA0B0, + 31939 - 11904: 0x8CB3, + 31941 - 11904: 0xE6DF, + 31943 - 11904: 0x8E79, + 31944 - 11904: 0xE6E0, + 31945 - 11904: 0x8E78, + 31946 - 11904: 0xBD6B, + 31947 - 11904: 0xE6E2, + 31948 - 11904: 0xE6E1, + 31949 - 11904: 0x94F3, + 31950 - 11904: 0xA261, + 31952 - 11904: 0xEACA, + 31953 - 11904: 0xEACB, + 31954 - 11904: 0xEAC7, + 31955 - 11904: 0x98AF, + 31956 - 11904: 0xEAC8, + 31957 - 11904: 0xBF7C, + 31958 - 11904: 0xBF7D, + 31959 - 11904: 0xEAC9, + 31961 - 11904: 0xC157, + 31962 - 11904: 0xA0B2, + 31964 - 11904: 0xC153, + 31965 - 11904: 0xC158, + 31966 - 11904: 0xC154, + 31967 - 11904: 0xC156, + 31968 - 11904: 0xC152, + 31970 - 11904: 0xC155, + 31974 - 11904: 0x8E7A, + 31975 - 11904: 0xC2B3, + 31976 - 11904: 0xEDCF, + 31978 - 11904: 0xF2AE, + 31980 - 11904: 0xF2AD, + 31981 - 11904: 0x995C, + 31982 - 11904: 0xF4AB, + 31983 - 11904: 0xC47A, + 31984 - 11904: 0xC47B, + 31985 - 11904: 0xF741, + 31986 - 11904: 0xF5E6, + 31987 - 11904: 0x8E7C, + 31988 - 11904: 0xF740, + 31989 - 11904: 0x8E7D, + 31990 - 11904: 0xF8FD, + 31991 - 11904: 0xF9A4, + 31992 - 11904: 0xA6CD, + 31993 - 11904: 0x8BD9, + 31995 - 11904: 0xA874, + 31996 - 11904: 0x89A2, + 31997 - 11904: 0xCDA9, + 31998 - 11904: 0xAAC8, + 32000 - 11904: 0xACF6, + 32001 - 11904: 0xD04C, + 32002 - 11904: 0xACF4, + 32003 - 11904: 0xD04A, + 32004 - 11904: 0xACF9, + 32005 - 11904: 0xACF5, + 32006 - 11904: 0xACFA, + 32007 - 11904: 0xACF8, + 32008 - 11904: 0xD04B, + 32009 - 11904: 0xACF7, + 32010 - 11904: 0xAFBF, + 32011 - 11904: 0xAFBE, + 32012 - 11904: 0xD35A, + 32013 - 11904: 0xAFC7, + 32014 - 11904: 0xD353, + 32015 - 11904: 0xD359, + 32016 - 11904: 0xAFC3, + 32017 - 11904: 0xD352, + 32018 - 11904: 0xD358, + 32019 - 11904: 0xD356, + 32020 - 11904: 0xAFC2, + 32021 - 11904: 0xAFC4, + 32022 - 11904: 0xD355, + 32023 - 11904: 0xAFBD, + 32024 - 11904: 0xD354, + 32025 - 11904: 0xAFC8, + 32026 - 11904: 0xAFC5, + 32027 - 11904: 0xAFC9, + 32028 - 11904: 0xAFC6, + 32029 - 11904: 0xD351, + 32030 - 11904: 0xD350, + 32031 - 11904: 0xD357, + 32032 - 11904: 0xAFC0, + 32033 - 11904: 0xAFBC, + 32034 - 11904: 0xAFC1, + 32037 - 11904: 0x9ED7, + 32040 - 11904: 0xD6F0, + 32041 - 11904: 0xD6E9, + 32043 - 11904: 0xB5B5, + 32044 - 11904: 0xD6E8, + 32046 - 11904: 0xB2CF, + 32047 - 11904: 0xB2D6, + 32048 - 11904: 0xB2D3, + 32049 - 11904: 0xB2D9, + 32050 - 11904: 0xB2D8, + 32051 - 11904: 0xB2D4, + 32053 - 11904: 0xD6E2, + 32054 - 11904: 0xD6E5, + 32056 - 11904: 0xD6E4, + 32057 - 11904: 0xB2D0, + 32058 - 11904: 0xD6E6, + 32059 - 11904: 0xD6EF, + 32060 - 11904: 0xB2D1, + 32061 - 11904: 0xD6E3, + 32062 - 11904: 0xD6EC, + 32063 - 11904: 0xD6ED, + 32064 - 11904: 0xB2D2, + 32065 - 11904: 0xD6EA, + 32066 - 11904: 0xB2D7, + 32067 - 11904: 0xB2CD, + 32068 - 11904: 0xB2D5, + 32069 - 11904: 0xD6E7, + 32070 - 11904: 0xB2CC, + 32071 - 11904: 0xD6EB, + 32074 - 11904: 0xD6EE, + 32077 - 11904: 0xA0B6, + 32078 - 11904: 0xDAFB, + 32079 - 11904: 0xDAF2, + 32080 - 11904: 0xB5B2, + 32081 - 11904: 0xDAF9, + 32082 - 11904: 0xDAF6, + 32083 - 11904: 0xDAEE, + 32084 - 11904: 0xDAF7, + 32085 - 11904: 0xB5B4, + 32086 - 11904: 0xDAEF, + 32088 - 11904: 0xDAEB, + 32090 - 11904: 0x9E42, + 32091 - 11904: 0xB86C, + 32092 - 11904: 0xDAF4, + 32093 - 11904: 0x8EA4, + 32094 - 11904: 0xB5B1, + 32095 - 11904: 0xDAFA, + 32097 - 11904: 0xB5B8, + 32098 - 11904: 0xB5BA, + 32099 - 11904: 0xDAED, + 32102 - 11904: 0xB5B9, + 32103 - 11904: 0xDAF0, + 32104 - 11904: 0xB5B3, + 32105 - 11904: 0xDAF8, + 32106 - 11904: 0xDAF1, + 32107 - 11904: 0xDAF5, + 32109 - 11904: 0xDAF3, + 32110 - 11904: 0xB5B6, + 32111 - 11904: 0xDAEC, + 32112 - 11904: 0xB5BB, + 32113 - 11904: 0xB2CE, + 32114 - 11904: 0xB5B7, + 32115 - 11904: 0xB5BC, + 32121 - 11904: 0xB868, + 32122 - 11904: 0xDF5D, + 32123 - 11904: 0xDF5F, + 32124 - 11904: 0xDF61, + 32125 - 11904: 0xDF65, + 32127 - 11904: 0xDF5B, + 32128 - 11904: 0xDF59, + 32129 - 11904: 0xB86A, + 32131 - 11904: 0xDF60, + 32132 - 11904: 0xDF64, + 32133 - 11904: 0xDF5C, + 32134 - 11904: 0xDF58, + 32136 - 11904: 0xDF57, + 32137 - 11904: 0x8EA7, + 32139 - 11904: 0x8C76, + 32140 - 11904: 0xDF62, + 32141 - 11904: 0xDF5A, + 32142 - 11904: 0xDF5E, + 32143 - 11904: 0xB86B, + 32145 - 11904: 0xB869, + 32146 - 11904: 0xDF66, + 32147 - 11904: 0xB867, + 32148 - 11904: 0xDF63, + 32149 - 11904: 0x8767, + 32150 - 11904: 0xE372, + 32151 - 11904: 0x9542, + 32156 - 11904: 0xBAEE, + 32157 - 11904: 0xE36A, + 32158 - 11904: 0xBD78, + 32159 - 11904: 0xE374, + 32160 - 11904: 0xBAF1, + 32161 - 11904: 0xE378, + 32162 - 11904: 0xBAF7, + 32163 - 11904: 0xE365, + 32164 - 11904: 0x987D, + 32166 - 11904: 0xE375, + 32167 - 11904: 0xE362, + 32168 - 11904: 0x9755, + 32169 - 11904: 0xE377, + 32170 - 11904: 0xE366, + 32171 - 11904: 0x8EA8, + 32172 - 11904: 0xBAFE, + 32173 - 11904: 0xBAFB, + 32174 - 11904: 0xE376, + 32175 - 11904: 0xE370, + 32176 - 11904: 0xBAED, + 32177 - 11904: 0xBAF5, + 32178 - 11904: 0xBAF4, + 32179 - 11904: 0x8EAA, + 32180 - 11904: 0xBAF3, + 32181 - 11904: 0xBAF9, + 32183 - 11904: 0xE363, + 32184 - 11904: 0xBAFA, + 32185 - 11904: 0xE371, + 32186 - 11904: 0xBAF6, + 32187 - 11904: 0xBAEC, + 32188 - 11904: 0xE373, + 32189 - 11904: 0xBAEF, + 32190 - 11904: 0xBAF0, + 32191 - 11904: 0xBAF8, + 32192 - 11904: 0xE368, + 32193 - 11904: 0xE367, + 32194 - 11904: 0xE364, + 32196 - 11904: 0xE36C, + 32197 - 11904: 0xE369, + 32198 - 11904: 0xE36D, + 32199 - 11904: 0xBAFD, + 32201 - 11904: 0xE379, + 32202 - 11904: 0xBAF2, + 32203 - 11904: 0xE36E, + 32204 - 11904: 0xE36F, + 32205 - 11904: 0x89A3, + 32206 - 11904: 0xE36B, + 32207 - 11904: 0x9960, + 32208 - 11904: 0x9962, + 32210 - 11904: 0xBAFC, + 32211 - 11904: 0x94FC, + 32212 - 11904: 0x9961, + 32215 - 11904: 0xE6E7, + 32216 - 11904: 0xBD70, + 32217 - 11904: 0xBD79, + 32218 - 11904: 0xBD75, + 32219 - 11904: 0xE6E4, + 32220 - 11904: 0x94FA, + 32221 - 11904: 0xBD72, + 32222 - 11904: 0xBD76, + 32223 - 11904: 0xE6F0, + 32224 - 11904: 0xBD6C, + 32225 - 11904: 0xE6E8, + 32227 - 11904: 0xBD74, + 32228 - 11904: 0x8EAE, + 32229 - 11904: 0x8EB2, + 32230 - 11904: 0xE6EB, + 32231 - 11904: 0xE6E6, + 32232 - 11904: 0xBD73, + 32233 - 11904: 0xBD77, + 32234 - 11904: 0xE6E5, + 32236 - 11904: 0xBD71, + 32238 - 11904: 0xE6EF, + 32239 - 11904: 0xBD6E, + 32240 - 11904: 0xE6EE, + 32241 - 11904: 0xE6ED, + 32242 - 11904: 0xBD7A, + 32243 - 11904: 0xE572, + 32244 - 11904: 0xBD6D, + 32245 - 11904: 0x8EB0, + 32246 - 11904: 0xE6EC, + 32247 - 11904: 0xE6E3, + 32249 - 11904: 0xBD7B, + 32250 - 11904: 0xE6EA, + 32251 - 11904: 0xBD6F, + 32253 - 11904: 0x9963, + 32254 - 11904: 0x97AA, + 32259 - 11904: 0xE6E9, + 32263 - 11904: 0x94FB, + 32264 - 11904: 0xBFA2, + 32265 - 11904: 0xBFA7, + 32266 - 11904: 0xBF7E, + 32267 - 11904: 0xEAD8, + 32268 - 11904: 0xEACF, + 32269 - 11904: 0xEADB, + 32270 - 11904: 0xEAD3, + 32271 - 11904: 0xEAD9, + 32272 - 11904: 0xBFA8, + 32273 - 11904: 0xBFA1, + 32274 - 11904: 0xEACC, + 32275 - 11904: 0xEAD2, + 32276 - 11904: 0xEADC, + 32277 - 11904: 0xEAD5, + 32278 - 11904: 0xEADA, + 32279 - 11904: 0xEACE, + 32282 - 11904: 0xEAD6, + 32283 - 11904: 0xBFA3, + 32284 - 11904: 0xEAD4, + 32285 - 11904: 0xBFA6, + 32286 - 11904: 0xBFA5, + 32287 - 11904: 0xEAD0, + 32288 - 11904: 0xEAD1, + 32289 - 11904: 0xEACD, + 32290 - 11904: 0xEAD7, + 32291 - 11904: 0xBFA4, + 32292 - 11904: 0xEADE, + 32293 - 11904: 0xEADD, + 32295 - 11904: 0x8EBB, + 32297 - 11904: 0xEDDA, + 32298 - 11904: 0xEDD6, + 32299 - 11904: 0xC15F, + 32301 - 11904: 0xEDD0, + 32302 - 11904: 0xC159, + 32303 - 11904: 0xC169, + 32304 - 11904: 0xEDDC, + 32305 - 11904: 0xC161, + 32306 - 11904: 0xC15D, + 32307 - 11904: 0xEDD3, + 32308 - 11904: 0xC164, + 32309 - 11904: 0xC167, + 32310 - 11904: 0xEDDE, + 32311 - 11904: 0xC15C, + 32312 - 11904: 0xEDD5, + 32313 - 11904: 0xC165, + 32314 - 11904: 0xEDE0, + 32315 - 11904: 0xEDDD, + 32316 - 11904: 0xEDD1, + 32317 - 11904: 0xC160, + 32318 - 11904: 0xC15A, + 32319 - 11904: 0xC168, + 32320 - 11904: 0xEDD8, + 32321 - 11904: 0xC163, + 32322 - 11904: 0xEDD2, + 32323 - 11904: 0xC15E, + 32324 - 11904: 0xEDDF, + 32325 - 11904: 0xC162, + 32326 - 11904: 0xC15B, + 32327 - 11904: 0xEDD9, + 32328 - 11904: 0xC166, + 32329 - 11904: 0xEDD7, + 32332 - 11904: 0xEDDB, + 32336 - 11904: 0xF06E, + 32337 - 11904: 0xF074, + 32338 - 11904: 0xC2B9, + 32339 - 11904: 0xF077, + 32340 - 11904: 0xC2B4, + 32341 - 11904: 0xC2B5, + 32342 - 11904: 0xF06F, + 32343 - 11904: 0xF076, + 32344 - 11904: 0xF071, + 32345 - 11904: 0xC2BA, + 32346 - 11904: 0xC2B7, + 32347 - 11904: 0x8CDC, + 32348 - 11904: 0xF06D, + 32350 - 11904: 0xC2B6, + 32351 - 11904: 0xF073, + 32352 - 11904: 0xF075, + 32353 - 11904: 0xC2B8, + 32354 - 11904: 0xF072, + 32355 - 11904: 0xF070, + 32357 - 11904: 0x9876, + 32359 - 11904: 0x8EA1, + 32360 - 11904: 0xF2B8, + 32361 - 11904: 0xC3B7, + 32362 - 11904: 0xC3B8, + 32363 - 11904: 0xC3B4, + 32364 - 11904: 0x8CB4, + 32365 - 11904: 0xC3B5, + 32366 - 11904: 0x8EB7, + 32367 - 11904: 0xF2B4, + 32368 - 11904: 0xF2B2, + 32370 - 11904: 0xF2B6, + 32371 - 11904: 0xC3BA, + 32372 - 11904: 0xF2B7, + 32373 - 11904: 0xF2B0, + 32374 - 11904: 0xF2AF, + 32375 - 11904: 0xF2B3, + 32376 - 11904: 0xF2B1, + 32377 - 11904: 0xC3B6, + 32378 - 11904: 0xF2B5, + 32379 - 11904: 0xF4AC, + 32380 - 11904: 0xC47E, + 32381 - 11904: 0xC47D, + 32382 - 11904: 0xF4AD, + 32383 - 11904: 0x9DA6, + 32384 - 11904: 0xF4AF, + 32385 - 11904: 0xF4AE, + 32386 - 11904: 0xC4A1, + 32390 - 11904: 0xF5EB, + 32391 - 11904: 0xF5E8, + 32392 - 11904: 0xF5E9, + 32394 - 11904: 0xF5E7, + 32395 - 11904: 0xF5EA, + 32396 - 11904: 0xC4F2, + 32397 - 11904: 0xF5EC, + 32398 - 11904: 0x9EB0, + 32399 - 11904: 0xC4F1, + 32401 - 11904: 0xF742, + 32402 - 11904: 0x8EB8, + 32403 - 11904: 0xC5D5, + 32404 - 11904: 0xC5D7, + 32405 - 11904: 0xF7EE, + 32406 - 11904: 0xC5D6, + 32407 - 11904: 0xF8B9, + 32408 - 11904: 0xF940, + 32409 - 11904: 0xF942, + 32410 - 11904: 0xF8FE, + 32411 - 11904: 0xF941, + 32412 - 11904: 0xC66C, + 32415 - 11904: 0x9D70, + 32420 - 11904: 0x896E, + 32428 - 11904: 0x896F, + 32442 - 11904: 0x8970, + 32455 - 11904: 0x8971, + 32463 - 11904: 0x8972, + 32479 - 11904: 0x8973, + 32518 - 11904: 0x8974, + 32566 - 11904: 0xA6CE, + 32567 - 11904: 0x8975, + 32568 - 11904: 0xACFB, + 32569 - 11904: 0xD26F, + 32570 - 11904: 0xAFCA, + 32573 - 11904: 0xB2DA, + 32574 - 11904: 0xDAFC, + 32575 - 11904: 0xDAFD, + 32576 - 11904: 0x8EBC, + 32577 - 11904: 0x8EBD, + 32579 - 11904: 0xEADF, + 32580 - 11904: 0xC16A, + 32581 - 11904: 0xEDE1, + 32583 - 11904: 0x8EBE, + 32584 - 11904: 0xC2BB, + 32585 - 11904: 0x9DD1, + 32586 - 11904: 0xF2BA, + 32587 - 11904: 0xF2B9, + 32588 - 11904: 0xC4A2, + 32589 - 11904: 0xF5ED, + 32590 - 11904: 0x94FD, + 32591 - 11904: 0xF743, + 32592 - 11904: 0xC5F8, + 32593 - 11904: 0xCA49, + 32594 - 11904: 0x8BD7, + 32595 - 11904: 0x8BDA, + 32596 - 11904: 0xAAC9, + 32597 - 11904: 0xA875, + 32600 - 11904: 0xD04D, + 32603 - 11904: 0xD360, + 32604 - 11904: 0xD35B, + 32605 - 11904: 0xD35F, + 32606 - 11904: 0xD35D, + 32607 - 11904: 0xAFCB, + 32608 - 11904: 0xD35E, + 32609 - 11904: 0xD35C, + 32611 - 11904: 0xD6F1, + 32613 - 11904: 0xDAFE, + 32614 - 11904: 0xDB40, + 32615 - 11904: 0xDF69, + 32616 - 11904: 0xDF6A, + 32617 - 11904: 0xB86E, + 32618 - 11904: 0xB86F, + 32619 - 11904: 0xDF68, + 32620 - 11904: 0xDF6B, + 32621 - 11904: 0xDF67, + 32622 - 11904: 0xB86D, + 32624 - 11904: 0xBB40, + 32625 - 11904: 0xA0E2, + 32626 - 11904: 0xB870, + 32627 - 11904: 0xE37A, + 32629 - 11904: 0xBD7C, + 32630 - 11904: 0xE6F1, + 32631 - 11904: 0xBD7D, + 32632 - 11904: 0x9FE9, + 32633 - 11904: 0xBFA9, + 32634 - 11904: 0xEAE2, + 32635 - 11904: 0xEAE0, + 32636 - 11904: 0xEAE1, + 32637 - 11904: 0xEDE4, + 32638 - 11904: 0xEDE3, + 32639 - 11904: 0xEDE2, + 32643 - 11904: 0xF2BB, + 32645 - 11904: 0xC3B9, + 32646 - 11904: 0xF2BC, + 32647 - 11904: 0xF744, + 32648 - 11904: 0xC5F9, + 32649 - 11904: 0xF8BA, + 32650 - 11904: 0xA6CF, + 32651 - 11904: 0xAACB, + 32652 - 11904: 0xAACA, + 32653 - 11904: 0xD04F, + 32654 - 11904: 0xACFC, + 32655 - 11904: 0xFDA8, + 32657 - 11904: 0xD04E, + 32658 - 11904: 0xD362, + 32659 - 11904: 0x8AE7, + 32660 - 11904: 0xAFCC, + 32661 - 11904: 0xD6F2, + 32662 - 11904: 0xD361, + 32663 - 11904: 0x8EC2, + 32666 - 11904: 0xB2DC, + 32667 - 11904: 0xD6F5, + 32668 - 11904: 0xD6F3, + 32669 - 11904: 0xD6F4, + 32670 - 11904: 0xB2DB, + 32672 - 11904: 0xDB42, + 32673 - 11904: 0xDB43, + 32674 - 11904: 0xDB41, + 32675 - 11904: 0x8EC4, + 32676 - 11904: 0xB873, + 32677 - 11904: 0xDF6D, + 32678 - 11904: 0xDF6C, + 32679 - 11904: 0xDF6E, + 32680 - 11904: 0xB872, + 32681 - 11904: 0xB871, + 32684 - 11904: 0xE6F2, + 32685 - 11904: 0xE6F4, + 32686 - 11904: 0x9964, + 32687 - 11904: 0xBD7E, + 32688 - 11904: 0xE6F3, + 32689 - 11904: 0xEAE3, + 32690 - 11904: 0xBFAA, + 32691 - 11904: 0xF079, + 32692 - 11904: 0x9965, + 32693 - 11904: 0xF078, + 32694 - 11904: 0xC3BB, + 32695 - 11904: 0xF2BD, + 32696 - 11904: 0xC3BD, + 32697 - 11904: 0xC3BC, + 32698 - 11904: 0xF4B0, + 32699 - 11904: 0xF5EE, + 32700 - 11904: 0xC4F3, + 32701 - 11904: 0xA6D0, + 32702 - 11904: 0xD050, + 32703 - 11904: 0xACFD, + 32704 - 11904: 0xD365, + 32705 - 11904: 0xAFCE, + 32706 - 11904: 0xD364, + 32707 - 11904: 0xD363, + 32709 - 11904: 0xAFCD, + 32711 - 11904: 0xD6FB, + 32713 - 11904: 0xD6FD, + 32714 - 11904: 0xD6F6, + 32715 - 11904: 0xD6F7, + 32716 - 11904: 0xB2DD, + 32717 - 11904: 0xD6F8, + 32718 - 11904: 0xB2DE, + 32719 - 11904: 0xD6FC, + 32720 - 11904: 0xD6F9, + 32721 - 11904: 0xD6FA, + 32722 - 11904: 0xB2DF, + 32724 - 11904: 0xB5BE, + 32725 - 11904: 0xB5BF, + 32727 - 11904: 0xDB44, + 32731 - 11904: 0xDF6F, + 32732 - 11904: 0xDF70, + 32733 - 11904: 0x954E, + 32734 - 11904: 0xE37E, + 32735 - 11904: 0xBB43, + 32736 - 11904: 0xBB41, + 32737 - 11904: 0xBB42, + 32738 - 11904: 0xE37B, + 32739 - 11904: 0xE37C, + 32741 - 11904: 0xE37D, + 32742 - 11904: 0xE6F9, + 32743 - 11904: 0x98B3, + 32744 - 11904: 0xE6FA, + 32745 - 11904: 0xBDA1, + 32746 - 11904: 0xE6F7, + 32747 - 11904: 0xE6F6, + 32748 - 11904: 0xE6F8, + 32749 - 11904: 0xE6F5, + 32750 - 11904: 0xBFAD, + 32751 - 11904: 0xEAE4, + 32752 - 11904: 0xBFAB, + 32753 - 11904: 0xBFAC, + 32754 - 11904: 0xEDE6, + 32755 - 11904: 0xC16B, + 32756 - 11904: 0xEDE5, + 32757 - 11904: 0xEFA8, + 32759 - 11904: 0xF07A, + 32760 - 11904: 0xF07B, + 32761 - 11904: 0xC2BC, + 32762 - 11904: 0x8ECB, + 32763 - 11904: 0xC2BD, + 32764 - 11904: 0xC16C, + 32765 - 11904: 0xF2BE, + 32766 - 11904: 0xF2BF, + 32767 - 11904: 0xF4B1, + 32768 - 11904: 0xC4A3, + 32769 - 11904: 0xA6D1, + 32770 - 11904: 0x8BDF, + 32771 - 11904: 0xA6D2, + 32772 - 11904: 0xACFE, + 32773 - 11904: 0xAACC, + 32774 - 11904: 0xAFCF, + 32775 - 11904: 0xD051, + 32776 - 11904: 0x8ECE, + 32779 - 11904: 0xB5C0, + 32780 - 11904: 0xA6D3, + 32781 - 11904: 0xAD41, + 32782 - 11904: 0xD052, + 32783 - 11904: 0xD053, + 32784 - 11904: 0xAD40, + 32785 - 11904: 0xAD42, + 32786 - 11904: 0xA6D4, + 32788 - 11904: 0xD054, + 32789 - 11904: 0xAFD1, + 32790 - 11904: 0xD366, + 32791 - 11904: 0xAFD3, + 32792 - 11904: 0xAFD0, + 32793 - 11904: 0xAFD2, + 32795 - 11904: 0xD741, + 32796 - 11904: 0xB2E0, + 32797 - 11904: 0x8ECF, + 32798 - 11904: 0xD740, + 32799 - 11904: 0xD6FE, + 32800 - 11904: 0x9968, + 32801 - 11904: 0xDF71, + 32804 - 11904: 0xE3A1, + 32805 - 11904: 0x9969, + 32806 - 11904: 0xBDA2, + 32808 - 11904: 0xBFAE, + 32809 - 11904: 0xEAE6, + 32810 - 11904: 0xEAE5, + 32812 - 11904: 0xEDE7, + 32814 - 11904: 0x996B, + 32815 - 11904: 0x8ED1, + 32816 - 11904: 0xF5EF, + 32817 - 11904: 0x996C, + 32819 - 11904: 0xA6D5, + 32820 - 11904: 0xCB73, + 32821 - 11904: 0xCDAA, + 32822 - 11904: 0xAD43, + 32823 - 11904: 0xD055, + 32825 - 11904: 0xD368, + 32827 - 11904: 0x8ED4, + 32828 - 11904: 0x8ED5, + 32829 - 11904: 0xAFD4, + 32830 - 11904: 0xD367, + 32831 - 11904: 0xAFD5, + 32835 - 11904: 0xD743, + 32838 - 11904: 0xB2E2, + 32839 - 11904: 0xD742, + 32840 - 11904: 0xD744, + 32842 - 11904: 0xB2E1, + 32847 - 11904: 0xDB46, + 32848 - 11904: 0xDB47, + 32849 - 11904: 0xDB45, + 32850 - 11904: 0xB5C1, + 32852 - 11904: 0x996D, + 32854 - 11904: 0xB874, + 32856 - 11904: 0xB875, + 32858 - 11904: 0xBB45, + 32859 - 11904: 0xA0BE, + 32860 - 11904: 0xE3A3, + 32861 - 11904: 0xE3A2, + 32862 - 11904: 0xBB44, + 32865 - 11904: 0x8ED6, + 32866 - 11904: 0xA0BC, + 32867 - 11904: 0xA0B5, + 32868 - 11904: 0xE6FB, + 32870 - 11904: 0xA0B4, + 32871 - 11904: 0xE6FC, + 32876 - 11904: 0xEAE7, + 32879 - 11904: 0xC170, + 32880 - 11904: 0xC16F, + 32881 - 11904: 0xC16D, + 32882 - 11904: 0xC16E, + 32883 - 11904: 0xC171, + 32885 - 11904: 0xF07C, + 32886 - 11904: 0xC2BF, + 32887 - 11904: 0xC2BE, + 32888 - 11904: 0xF2C0, + 32889 - 11904: 0xF4B2, + 32893 - 11904: 0xC5A5, + 32894 - 11904: 0xC5A4, + 32895 - 11904: 0xA6D6, + 32896 - 11904: 0x8BE0, + 32898 - 11904: 0xD1FB, + 32900 - 11904: 0xB877, + 32901 - 11904: 0xB5C2, + 32902 - 11904: 0xB876, + 32903 - 11904: 0xBB46, + 32905 - 11904: 0xA6D7, + 32906 - 11904: 0xC9A9, + 32907 - 11904: 0xA6D8, + 32908 - 11904: 0xA6D9, + 32911 - 11904: 0xCDAB, + 32912 - 11904: 0xCB76, + 32914 - 11904: 0xCB77, + 32915 - 11904: 0xA877, + 32917 - 11904: 0xCB74, + 32918 - 11904: 0xA876, + 32920 - 11904: 0xA879, + 32921 - 11904: 0xCB75, + 32922 - 11904: 0xA87B, + 32923 - 11904: 0xA87A, + 32924 - 11904: 0xCB78, + 32925 - 11904: 0xA878, + 32927 - 11904: 0x89B5, + 32929 - 11904: 0xAAD1, + 32930 - 11904: 0xAACF, + 32931 - 11904: 0xCDAD, + 32933 - 11904: 0xAACE, + 32935 - 11904: 0x8EDD, + 32937 - 11904: 0xAAD3, + 32938 - 11904: 0xAAD5, + 32939 - 11904: 0xAAD2, + 32941 - 11904: 0xCDB0, + 32942 - 11904: 0xCDAC, + 32943 - 11904: 0xAAD6, + 32945 - 11904: 0xAAD0, + 32946 - 11904: 0xA87C, + 32948 - 11904: 0xAAD4, + 32949 - 11904: 0xCDAF, + 32950 - 11904: 0x9E5D, + 32951 - 11904: 0x9971, + 32952 - 11904: 0xCDAE, + 32954 - 11904: 0xAACD, + 32956 - 11904: 0x89AE, + 32957 - 11904: 0x9DE8, + 32962 - 11904: 0xD05B, + 32963 - 11904: 0xAD47, + 32964 - 11904: 0xAD48, + 32965 - 11904: 0xD05D, + 32966 - 11904: 0x9565, + 32967 - 11904: 0xD057, + 32968 - 11904: 0xD05A, + 32969 - 11904: 0xD063, + 32970 - 11904: 0xD061, + 32972 - 11904: 0xAD49, + 32973 - 11904: 0xD067, + 32974 - 11904: 0xAD4C, + 32975 - 11904: 0xD064, + 32976 - 11904: 0xD05C, + 32977 - 11904: 0xD059, + 32980 - 11904: 0xDB49, + 32981 - 11904: 0xD062, + 32982 - 11904: 0xAD44, + 32983 - 11904: 0xD065, + 32984 - 11904: 0xD056, + 32985 - 11904: 0xD05F, + 32986 - 11904: 0xAD46, + 32987 - 11904: 0xAD4B, + 32988 - 11904: 0xD060, + 32989 - 11904: 0xAD4F, + 32990 - 11904: 0xAD4D, + 32992 - 11904: 0xD058, + 32993 - 11904: 0xAD4A, + 32995 - 11904: 0xD05E, + 32996 - 11904: 0xAD4E, + 32997 - 11904: 0xAD45, + 32998 - 11904: 0xD066, + 33001 - 11904: 0x9972, + 33004 - 11904: 0x8B5C, + 33005 - 11904: 0xAFDA, + 33007 - 11904: 0xAFE3, + 33008 - 11904: 0xAFD8, + 33009 - 11904: 0xAFD6, + 33010 - 11904: 0xD36A, + 33011 - 11904: 0xAFDE, + 33012 - 11904: 0xAFDB, + 33013 - 11904: 0xD36C, + 33014 - 11904: 0x89B1, + 33016 - 11904: 0xAFDD, + 33017 - 11904: 0xD36B, + 33018 - 11904: 0xD369, + 33019 - 11904: 0xD36E, + 33020 - 11904: 0xAFE2, + 33021 - 11904: 0xAFE0, + 33022 - 11904: 0xDB48, + 33024 - 11904: 0xD36F, + 33025 - 11904: 0xD36D, + 33026 - 11904: 0xAFD7, + 33027 - 11904: 0xA0C0, + 33029 - 11904: 0xAFD9, + 33030 - 11904: 0xAFDC, + 33031 - 11904: 0x8EDF, + 33032 - 11904: 0xAFDF, + 33033 - 11904: 0x9566, + 33034 - 11904: 0xAFE1, + 33036 - 11904: 0x9974, + 33038 - 11904: 0x9976, + 33042 - 11904: 0x9977, + 33044 - 11904: 0x9979, + 33045 - 11904: 0xD74E, + 33046 - 11904: 0xB2E4, + 33047 - 11904: 0x9DDA, + 33048 - 11904: 0xD745, + 33049 - 11904: 0xD747, + 33050 - 11904: 0x8EE0, + 33051 - 11904: 0xD748, + 33053 - 11904: 0xD750, + 33054 - 11904: 0xD74C, + 33055 - 11904: 0xD74A, + 33057 - 11904: 0xD74D, + 33058 - 11904: 0xD751, + 33059 - 11904: 0xB2E5, + 33060 - 11904: 0xB2E9, + 33061 - 11904: 0xD746, + 33063 - 11904: 0xD74F, + 33065 - 11904: 0xB2E7, + 33066 - 11904: 0x935C, + 33067 - 11904: 0xB2E6, + 33068 - 11904: 0xD74B, + 33069 - 11904: 0xD749, + 33071 - 11904: 0xB2E3, + 33072 - 11904: 0xB2E8, + 33074 - 11904: 0x9DE6, + 33076 - 11904: 0x8B5F, + 33079 - 11904: 0x9563, + 33081 - 11904: 0xB5C8, + 33082 - 11904: 0xDB51, + 33085 - 11904: 0xDB4F, + 33086 - 11904: 0xB5CA, + 33090 - 11904: 0x9567, + 33091 - 11904: 0xDB4A, + 33092 - 11904: 0xDFA1, + 33094 - 11904: 0xB5C9, + 33095 - 11904: 0xDB4E, + 33096 - 11904: 0x9DE3, + 33098 - 11904: 0xDB4B, + 33099 - 11904: 0xB5C5, + 33100 - 11904: 0xB5CB, + 33101 - 11904: 0xDB50, + 33102 - 11904: 0xB5C7, + 33103 - 11904: 0xDB4D, + 33104 - 11904: 0xBB47, + 33105 - 11904: 0xB5C6, + 33106 - 11904: 0xDB4C, + 33107 - 11904: 0xB5CC, + 33108 - 11904: 0xB5C4, + 33109 - 11904: 0xB5C3, + 33110 - 11904: 0x997C, + 33113 - 11904: 0x997D, + 33114 - 11904: 0x997E, + 33115 - 11904: 0xDF77, + 33116 - 11904: 0xDF75, + 33118 - 11904: 0xDF7B, + 33120 - 11904: 0xDF73, + 33121 - 11904: 0xDFA2, + 33122 - 11904: 0xDF78, + 33124 - 11904: 0xDF72, + 33125 - 11904: 0xB87B, + 33126 - 11904: 0xB8A3, + 33127 - 11904: 0xDF7D, + 33129 - 11904: 0xDF76, + 33131 - 11904: 0xB87E, + 33132 - 11904: 0x8CFB, + 33133 - 11904: 0x8B5B, + 33134 - 11904: 0xB87C, + 33135 - 11904: 0xDF7E, + 33136 - 11904: 0xB879, + 33137 - 11904: 0xB878, + 33138 - 11904: 0xDF79, + 33139 - 11904: 0xB87D, + 33140 - 11904: 0xB5CD, + 33142 - 11904: 0xDF7C, + 33143 - 11904: 0xDF74, + 33144 - 11904: 0xB87A, + 33145 - 11904: 0xB8A1, + 33146 - 11904: 0xB8A2, + 33148 - 11904: 0x99A3, + 33151 - 11904: 0xBB4C, + 33152 - 11904: 0xBB48, + 33154 - 11904: 0xBB4D, + 33155 - 11904: 0xE3A6, + 33156 - 11904: 0x99A4, + 33158 - 11904: 0xE3A5, + 33159 - 11904: 0xE3A7, + 33160 - 11904: 0xBB4A, + 33161 - 11904: 0xE3A4, + 33162 - 11904: 0xBB4B, + 33163 - 11904: 0xE3AA, + 33164 - 11904: 0xE3A9, + 33165 - 11904: 0xE3A8, + 33167 - 11904: 0xBB49, + 33171 - 11904: 0x99A6, + 33173 - 11904: 0xE741, + 33175 - 11904: 0xE744, + 33176 - 11904: 0xBDA8, + 33177 - 11904: 0xE743, + 33178 - 11904: 0xBDA7, + 33179 - 11904: 0xBDA3, + 33180 - 11904: 0xBDA4, + 33181 - 11904: 0xBDA5, + 33182 - 11904: 0xE740, + 33183 - 11904: 0xE6FE, + 33184 - 11904: 0xBDA6, + 33186 - 11904: 0xE742, + 33187 - 11904: 0xE6FD, + 33189 - 11904: 0x99A8, + 33190 - 11904: 0xEAE9, + 33191 - 11904: 0xEAF3, + 33192 - 11904: 0xBFB1, + 33193 - 11904: 0xBFB0, + 33194 - 11904: 0x8ABE, + 33195 - 11904: 0xEAED, + 33196 - 11904: 0xEAEF, + 33198 - 11904: 0xEAEA, + 33200 - 11904: 0xEAEE, + 33201 - 11904: 0xEAE8, + 33202 - 11904: 0xEAF1, + 33203 - 11904: 0xBFAF, + 33204 - 11904: 0xEAF0, + 33205 - 11904: 0xEAEC, + 33206 - 11904: 0x9E61, + 33207 - 11904: 0xEAF2, + 33209 - 11904: 0xEAEB, + 33210 - 11904: 0xC174, + 33211 - 11904: 0xEDE8, + 33212 - 11904: 0xEDEE, + 33213 - 11904: 0xC178, + 33214 - 11904: 0xC17A, + 33215 - 11904: 0xC177, + 33216 - 11904: 0xC176, + 33217 - 11904: 0x99AA, + 33218 - 11904: 0xC175, + 33219 - 11904: 0xC173, + 33220 - 11904: 0xEDE9, + 33221 - 11904: 0xEDEC, + 33222 - 11904: 0xC172, + 33223 - 11904: 0xEDED, + 33224 - 11904: 0xA0C8, + 33225 - 11904: 0xC179, + 33226 - 11904: 0xEDEB, + 33228 - 11904: 0xEDEA, + 33229 - 11904: 0xC2C0, + 33231 - 11904: 0xC2C1, + 33232 - 11904: 0xF0A1, + 33233 - 11904: 0xF07D, + 33234 - 11904: 0xF07E, + 33237 - 11904: 0xF2C2, + 33239 - 11904: 0xF2C1, + 33240 - 11904: 0xC3BE, + 33241 - 11904: 0xF4B4, + 33242 - 11904: 0xC4A4, + 33243 - 11904: 0xF4B3, + 33245 - 11904: 0xF5F0, + 33246 - 11904: 0xF745, + 33247 - 11904: 0xC5A6, + 33248 - 11904: 0xF943, + 33249 - 11904: 0xF944, + 33250 - 11904: 0xC5D8, + 33251 - 11904: 0xA6DA, + 33252 - 11904: 0x99AB, + 33253 - 11904: 0xAAD7, + 33254 - 11904: 0xDB52, + 33255 - 11904: 0xBB4E, + 33256 - 11904: 0xC17B, + 33257 - 11904: 0xEDEF, + 33258 - 11904: 0xA6DB, + 33260 - 11904: 0xAFE5, + 33261 - 11904: 0xAFE4, + 33262 - 11904: 0xDB53, + 33263 - 11904: 0xFEC4, + 33266 - 11904: 0xEAF4, + 33267 - 11904: 0xA6DC, + 33268 - 11904: 0xAD50, + 33270 - 11904: 0x98C2, + 33271 - 11904: 0xDB54, + 33272 - 11904: 0xDB55, + 33273 - 11904: 0xDB56, + 33274 - 11904: 0xBB4F, + 33275 - 11904: 0xBFB2, + 33276 - 11904: 0xA6DD, + 33278 - 11904: 0xAAD8, + 33279 - 11904: 0xD068, + 33280 - 11904: 0xAFE6, + 33281 - 11904: 0xD370, + 33282 - 11904: 0xB2EA, + 33284 - 11904: 0xDB57, + 33285 - 11904: 0xB8A4, + 33287 - 11904: 0xBB50, + 33288 - 11904: 0xBFB3, + 33289 - 11904: 0xC17C, + 33290 - 11904: 0xC2C2, + 33291 - 11904: 0xF4B5, + 33292 - 11904: 0xA6DE, + 33293 - 11904: 0xAAD9, + 33296 - 11904: 0xAFE7, + 33297 - 11904: 0xD752, + 33298 - 11904: 0xB5CE, + 33300 - 11904: 0xBB51, + 33301 - 11904: 0xE3AB, + 33302 - 11904: 0xE745, + 33304 - 11904: 0x8EE8, + 33306 - 11904: 0xA0BA, + 33307 - 11904: 0xA6DF, + 33308 - 11904: 0xB5CF, + 33309 - 11904: 0xDFA3, + 33310 - 11904: 0xBB52, + 33311 - 11904: 0xA6E0, + 33312 - 11904: 0xCDB1, + 33313 - 11904: 0xD069, + 33314 - 11904: 0xAD51, + 33317 - 11904: 0xD372, + 33318 - 11904: 0xFD77, + 33320 - 11904: 0xAFEA, + 33321 - 11904: 0x8EEE, + 33322 - 11904: 0xAFE8, + 33323 - 11904: 0xAFE9, + 33324 - 11904: 0xAFEB, + 33325 - 11904: 0x9EBF, + 33327 - 11904: 0xD371, + 33330 - 11904: 0xD757, + 33331 - 11904: 0xD754, + 33332 - 11904: 0xD756, + 33333 - 11904: 0xB2EB, + 33334 - 11904: 0xB2ED, + 33335 - 11904: 0xB2EC, + 33336 - 11904: 0xD753, + 33337 - 11904: 0xB2EE, + 33338 - 11904: 0xD755, + 33340 - 11904: 0xDB58, + 33341 - 11904: 0xDB59, + 33342 - 11904: 0x89C2, + 33343 - 11904: 0xDB5A, + 33344 - 11904: 0xDFA6, + 33346 - 11904: 0xDFA7, + 33348 - 11904: 0xDFA5, + 33349 - 11904: 0xDFA8, + 33351 - 11904: 0xB8A5, + 33353 - 11904: 0xDFA4, + 33355 - 11904: 0xBB53, + 33358 - 11904: 0xE74A, + 33359 - 11904: 0xE746, + 33360 - 11904: 0xE749, + 33361 - 11904: 0xE74B, + 33362 - 11904: 0xE748, + 33363 - 11904: 0xE747, + 33364 - 11904: 0x99AC, + 33365 - 11904: 0xEAF5, + 33366 - 11904: 0xEAF6, + 33367 - 11904: 0xEAF7, + 33368 - 11904: 0xBFB4, + 33369 - 11904: 0xBFB5, + 33370 - 11904: 0xEDF1, + 33371 - 11904: 0xEDF0, + 33372 - 11904: 0xEDF2, + 33374 - 11904: 0xF0A3, + 33375 - 11904: 0xF0A2, + 33377 - 11904: 0xF2C4, + 33378 - 11904: 0x956B, + 33379 - 11904: 0xF2C5, + 33380 - 11904: 0xF2C3, + 33381 - 11904: 0x956C, + 33382 - 11904: 0xC4A5, + 33384 - 11904: 0xF4B6, + 33385 - 11904: 0xF4B7, + 33387 - 11904: 0xF746, + 33388 - 11904: 0xF7EF, + 33389 - 11904: 0xF8BB, + 33390 - 11904: 0xA6E1, + 33391 - 11904: 0xA87D, + 33393 - 11904: 0xC17D, + 33394 - 11904: 0xA6E2, + 33396 - 11904: 0xD758, + 33397 - 11904: 0xDB5B, + 33398 - 11904: 0x99AF, + 33399 - 11904: 0xC641, + 33400 - 11904: 0xCA4A, + 33401 - 11904: 0x994A, + 33402 - 11904: 0x8976, + 33403 - 11904: 0x8F48, + 33404 - 11904: 0xCA4B, + 33405 - 11904: 0xCA4D, + 33406 - 11904: 0xA6E3, + 33407 - 11904: 0xCA4E, + 33408 - 11904: 0xCA4C, + 33411 - 11904: 0xCBA2, + 33412 - 11904: 0xCBA3, + 33413 - 11904: 0xCB7B, + 33415 - 11904: 0xFBEE, + 33418 - 11904: 0xCBA1, + 33419 - 11904: 0xA8A1, + 33421 - 11904: 0xA8A2, + 33422 - 11904: 0xCB7C, + 33423 - 11904: 0xCB7A, + 33424 - 11904: 0xCB79, + 33425 - 11904: 0xCB7D, + 33426 - 11904: 0xA87E, + 33427 - 11904: 0xCB7E, + 33428 - 11904: 0xD06A, + 33432 - 11904: 0xCDB6, + 33433 - 11904: 0xAADC, + 33434 - 11904: 0xCDB5, + 33435 - 11904: 0xCDB7, + 33437 - 11904: 0xAADB, + 33438 - 11904: 0xCDBC, + 33439 - 11904: 0xAADF, + 33440 - 11904: 0xCDB2, + 33441 - 11904: 0xCDC0, + 33442 - 11904: 0xCDC6, + 33443 - 11904: 0xAAE6, + 33444 - 11904: 0xCDC3, + 33445 - 11904: 0xAAE3, + 33446 - 11904: 0x99AE, + 33447 - 11904: 0xCDB9, + 33448 - 11904: 0xCDBF, + 33449 - 11904: 0xCDC1, + 33450 - 11904: 0x8EFB, + 33451 - 11904: 0xCDB4, + 33452 - 11904: 0xAAE2, + 33453 - 11904: 0xAADD, + 33454 - 11904: 0xCDBA, + 33455 - 11904: 0xAAE4, + 33456 - 11904: 0xAAE7, + 33457 - 11904: 0xAAE1, + 33459 - 11904: 0xAADA, + 33460 - 11904: 0xCDBE, + 33461 - 11904: 0xCDB8, + 33462 - 11904: 0xCDC5, + 33463 - 11904: 0xAAE9, + 33464 - 11904: 0xAAE5, + 33465 - 11904: 0xAAE0, + 33466 - 11904: 0xCDBD, + 33467 - 11904: 0xAFEC, + 33468 - 11904: 0xCDBB, + 33469 - 11904: 0xAADE, + 33470 - 11904: 0xAAE8, + 33471 - 11904: 0x8CD0, + 33472 - 11904: 0xCDB3, + 33474 - 11904: 0xCDC2, + 33475 - 11904: 0xCDC4, + 33476 - 11904: 0x8B52, + 33482 - 11904: 0x99B0, + 33487 - 11904: 0x8977, + 33488 - 11904: 0x8F41, + 33489 - 11904: 0xAD62, + 33490 - 11904: 0xAD5C, + 33491 - 11904: 0xAD64, + 33492 - 11904: 0xAD61, + 33493 - 11904: 0xD071, + 33494 - 11904: 0xD074, + 33495 - 11904: 0xAD5D, + 33496 - 11904: 0x99B1, + 33497 - 11904: 0xD06B, + 33499 - 11904: 0xAD56, + 33500 - 11904: 0xAD60, + 33502 - 11904: 0xAD63, + 33503 - 11904: 0xAD65, + 33504 - 11904: 0xD0A2, + 33505 - 11904: 0xD077, + 33506 - 11904: 0x8F49, + 33507 - 11904: 0xAD55, + 33508 - 11904: 0xD0A1, + 33509 - 11904: 0xAD59, + 33510 - 11904: 0xAD57, + 33511 - 11904: 0xAD52, + 33512 - 11904: 0xD06F, + 33514 - 11904: 0xD07E, + 33515 - 11904: 0xD073, + 33516 - 11904: 0xD076, + 33517 - 11904: 0xD0A5, + 33518 - 11904: 0xFA4D, + 33519 - 11904: 0xAD66, + 33520 - 11904: 0xD07D, + 33521 - 11904: 0xAD5E, + 33522 - 11904: 0xD078, + 33523 - 11904: 0xD0A4, + 33524 - 11904: 0xD075, + 33525 - 11904: 0xD079, + 33526 - 11904: 0xD07C, + 33527 - 11904: 0x9DE4, + 33528 - 11904: 0x8CB5, + 33529 - 11904: 0xD06D, + 33530 - 11904: 0xD0A3, + 33531 - 11904: 0xD07B, + 33532 - 11904: 0xFBE9, + 33533 - 11904: 0x9B54, + 33534 - 11904: 0xD06C, + 33535 - 11904: 0x99B2, + 33536 - 11904: 0xD070, + 33537 - 11904: 0xAD5F, + 33538 - 11904: 0xAD5A, + 33539 - 11904: 0xAD53, + 33540 - 11904: 0xAD58, + 33541 - 11904: 0xAD54, + 33542 - 11904: 0xAD67, + 33543 - 11904: 0xD06E, + 33544 - 11904: 0xD3A5, + 33545 - 11904: 0xAD5B, + 33547 - 11904: 0x9E68, + 33548 - 11904: 0xD07A, + 33549 - 11904: 0xCE41, + 33558 - 11904: 0xD3A8, + 33559 - 11904: 0xAFFA, + 33560 - 11904: 0x8F4A, + 33561 - 11904: 0xD376, + 33562 - 11904: 0x8F42, + 33563 - 11904: 0xD3A3, + 33564 - 11904: 0xD37D, + 33565 - 11904: 0x8F51, + 33566 - 11904: 0xD3B2, + 33568 - 11904: 0xD3AA, + 33570 - 11904: 0xD37E, + 33572 - 11904: 0xD3A9, + 33573 - 11904: 0xD378, + 33574 - 11904: 0xD37C, + 33575 - 11904: 0xD3B5, + 33576 - 11904: 0xAFFD, + 33577 - 11904: 0xD3AD, + 33578 - 11904: 0xD3A4, + 33579 - 11904: 0xAFED, + 33580 - 11904: 0xD3B3, + 33581 - 11904: 0xD374, + 33583 - 11904: 0xD3AC, + 33585 - 11904: 0xAFFC, + 33586 - 11904: 0xAFF7, + 33587 - 11904: 0xD373, + 33588 - 11904: 0xAFF5, + 33589 - 11904: 0xAFF4, + 33590 - 11904: 0xAFF9, + 33591 - 11904: 0xD3AB, + 33592 - 11904: 0xAFF1, + 33593 - 11904: 0xAFF8, + 33594 - 11904: 0xD072, + 33595 - 11904: 0xDB5C, + 33596 - 11904: 0xD3A6, + 33597 - 11904: 0x9846, + 33599 - 11904: 0xD37A, + 33600 - 11904: 0xAFFB, + 33601 - 11904: 0xD37B, + 33602 - 11904: 0xD3A1, + 33603 - 11904: 0xAFFE, + 33604 - 11904: 0xD375, + 33605 - 11904: 0xD3AF, + 33607 - 11904: 0xD3AE, + 33608 - 11904: 0xD3B6, + 33609 - 11904: 0xAFF3, + 33610 - 11904: 0xAFF0, + 33611 - 11904: 0xD3B4, + 33612 - 11904: 0xD3B0, + 33613 - 11904: 0xD3A7, + 33614 - 11904: 0xD3A2, + 33615 - 11904: 0xAFF6, + 33616 - 11904: 0xAFF2, + 33617 - 11904: 0xD377, + 33618 - 11904: 0xAFEE, + 33619 - 11904: 0xD3B1, + 33620 - 11904: 0xAFEF, + 33622 - 11904: 0xD379, + 33623 - 11904: 0x99B4, + 33634 - 11904: 0x8EF5, + 33635 - 11904: 0xFD55, + 33638 - 11904: 0x9CCD, + 33647 - 11904: 0x8978, + 33651 - 11904: 0xD75E, + 33652 - 11904: 0xD760, + 33653 - 11904: 0xD765, + 33654 - 11904: 0xD779, + 33655 - 11904: 0xB2FC, + 33656 - 11904: 0xB2F2, + 33658 - 11904: 0xD75D, + 33659 - 11904: 0xB2FD, + 33660 - 11904: 0xB2FE, + 33661 - 11904: 0xD768, + 33662 - 11904: 0xD76F, + 33663 - 11904: 0xD775, + 33665 - 11904: 0xD762, + 33667 - 11904: 0xD769, + 33669 - 11904: 0x8F53, + 33670 - 11904: 0xB340, + 33671 - 11904: 0xD777, + 33672 - 11904: 0xD772, + 33673 - 11904: 0xB2FA, + 33674 - 11904: 0xB2F8, + 33675 - 11904: 0xD76E, + 33676 - 11904: 0xD76A, + 33677 - 11904: 0xD75C, + 33678 - 11904: 0xB2EF, + 33679 - 11904: 0xD761, + 33680 - 11904: 0xD759, + 33681 - 11904: 0x8F6F, + 33682 - 11904: 0xB2F7, + 33683 - 11904: 0xB2F9, + 33684 - 11904: 0xD766, + 33685 - 11904: 0xD763, + 33686 - 11904: 0xB2F4, + 33687 - 11904: 0xD773, + 33688 - 11904: 0xB2F1, + 33689 - 11904: 0xD764, + 33690 - 11904: 0xD77A, + 33691 - 11904: 0xD76C, + 33692 - 11904: 0x8E63, + 33693 - 11904: 0xD76B, + 33694 - 11904: 0xB2F0, + 33696 - 11904: 0xB2FB, + 33698 - 11904: 0xB2F3, + 33699 - 11904: 0xD75A, + 33700 - 11904: 0xD75F, + 33701 - 11904: 0xD770, + 33702 - 11904: 0xD776, + 33703 - 11904: 0xB341, + 33704 - 11904: 0xD75B, + 33705 - 11904: 0xD767, + 33706 - 11904: 0xD76D, + 33707 - 11904: 0xB2F6, + 33708 - 11904: 0x8F56, + 33710 - 11904: 0xD778, + 33711 - 11904: 0xD771, + 33712 - 11904: 0xD774, + 33721 - 11904: 0xFE76, + 33725 - 11904: 0xB2F5, + 33726 - 11904: 0x9FC6, + 33727 - 11904: 0xDB6C, + 33728 - 11904: 0xDB60, + 33729 - 11904: 0xB5D7, + 33730 - 11904: 0xDB7D, + 33731 - 11904: 0xDBA7, + 33732 - 11904: 0xDBAA, + 33733 - 11904: 0xB5D5, + 33734 - 11904: 0xDB68, + 33735 - 11904: 0xDBA3, + 33736 - 11904: 0xDB69, + 33737 - 11904: 0xDB77, + 33738 - 11904: 0xB5E2, + 33739 - 11904: 0xDB73, + 33740 - 11904: 0xB5DF, + 33741 - 11904: 0xFAAC, + 33742 - 11904: 0xDB74, + 33743 - 11904: 0xDB5D, + 33745 - 11904: 0xDBA4, + 33747 - 11904: 0x8F58, + 33748 - 11904: 0xB5E8, + 33749 - 11904: 0xDBA1, + 33750 - 11904: 0xDB75, + 33751 - 11904: 0xDBAC, + 33752 - 11904: 0xDB70, + 33753 - 11904: 0xDFC8, + 33755 - 11904: 0xDBAF, + 33756 - 11904: 0xB5E6, + 33757 - 11904: 0xDB6E, + 33758 - 11904: 0xDB7A, + 33759 - 11904: 0xB5E9, + 33760 - 11904: 0xB5D4, + 33761 - 11904: 0xDB72, + 33762 - 11904: 0xDBAD, + 33763 - 11904: 0xDB6B, + 33764 - 11904: 0xDB64, + 33765 - 11904: 0xDB6F, + 33767 - 11904: 0xDB63, + 33768 - 11904: 0xDB61, + 33769 - 11904: 0xB5D0, + 33770 - 11904: 0xDBA5, + 33771 - 11904: 0xDB6A, + 33772 - 11904: 0xDBA8, + 33773 - 11904: 0x9848, + 33774 - 11904: 0xDBA9, + 33775 - 11904: 0xB5D8, + 33776 - 11904: 0xB5DD, + 33777 - 11904: 0xB5D9, + 33778 - 11904: 0xB5E1, + 33779 - 11904: 0xDB7E, + 33780 - 11904: 0xB5DA, + 33781 - 11904: 0xDB76, + 33782 - 11904: 0xDB66, + 33784 - 11904: 0xB5D2, + 33785 - 11904: 0xDB5E, + 33786 - 11904: 0xDBA2, + 33787 - 11904: 0xDBAB, + 33788 - 11904: 0xDB65, + 33789 - 11904: 0xB5E0, + 33790 - 11904: 0xDBB0, + 33791 - 11904: 0xDB71, + 33793 - 11904: 0xDB6D, + 33795 - 11904: 0xB5D1, + 33796 - 11904: 0xB5E5, + 33797 - 11904: 0x99B7, + 33798 - 11904: 0xDB7C, + 33799 - 11904: 0xB5E7, + 33801 - 11904: 0xDB78, + 33802 - 11904: 0xB5DC, + 33803 - 11904: 0xB5D6, + 33804 - 11904: 0xB5DE, + 33805 - 11904: 0xB5D3, + 33806 - 11904: 0xB5E4, + 33807 - 11904: 0xDB79, + 33808 - 11904: 0xDB67, + 33809 - 11904: 0xDB7B, + 33810 - 11904: 0xDB62, + 33811 - 11904: 0xDBA6, + 33812 - 11904: 0x9665, + 33814 - 11904: 0xFA6C, + 33816 - 11904: 0x9DE7, + 33819 - 11904: 0xDBAE, + 33820 - 11904: 0x9E62, + 33824 - 11904: 0x96CC, + 33825 - 11904: 0x8E67, + 33827 - 11904: 0xDB5F, + 33828 - 11904: 0xFC75, + 33830 - 11904: 0x987E, + 33833 - 11904: 0xDFC7, + 33835 - 11904: 0xDFDD, + 33836 - 11904: 0xB855, + 33837 - 11904: 0xDFCC, + 33838 - 11904: 0xFDB9, + 33839 - 11904: 0xDFCA, + 33840 - 11904: 0xDFB5, + 33841 - 11904: 0xB8A9, + 33842 - 11904: 0xDFC5, + 33843 - 11904: 0xDFD9, + 33844 - 11904: 0xDFC1, + 33845 - 11904: 0xB8B1, + 33846 - 11904: 0xDFD8, + 33847 - 11904: 0xDFBF, + 33848 - 11904: 0xB5E3, + 33849 - 11904: 0xDFCF, + 33850 - 11904: 0xDFC0, + 33851 - 11904: 0xDFD6, + 33852 - 11904: 0xB8B0, + 33853 - 11904: 0xB8A8, + 33854 - 11904: 0x97FC, + 33855 - 11904: 0xDFAA, + 33856 - 11904: 0xDFB2, + 33858 - 11904: 0xDFCB, + 33859 - 11904: 0xDFC3, + 33860 - 11904: 0xDFDC, + 33861 - 11904: 0xDFC6, + 33862 - 11904: 0xB8B6, + 33863 - 11904: 0xDFD7, + 33864 - 11904: 0x98F9, + 33865 - 11904: 0xB8AD, + 33866 - 11904: 0x8F66, + 33867 - 11904: 0xDFC9, + 33868 - 11904: 0xDFD1, + 33869 - 11904: 0xDFB6, + 33870 - 11904: 0xDFD0, + 33872 - 11904: 0xDFE1, + 33873 - 11904: 0xDFB1, + 33874 - 11904: 0xDFD2, + 33875 - 11904: 0x956E, + 33876 - 11904: 0xDFDF, + 33877 - 11904: 0x9245, + 33878 - 11904: 0xDFAB, + 33879 - 11904: 0xB5DB, + 33880 - 11904: 0x8F60, + 33881 - 11904: 0xDFB9, + 33882 - 11904: 0xDFB8, + 33883 - 11904: 0xB8AF, + 33884 - 11904: 0x9ED1, + 33885 - 11904: 0xDFBC, + 33886 - 11904: 0xDFBE, + 33887 - 11904: 0xDFCD, + 33888 - 11904: 0xDFDE, + 33889 - 11904: 0xB8B2, + 33890 - 11904: 0xFECD, + 33891 - 11904: 0xB8B3, + 33892 - 11904: 0x99B9, + 33893 - 11904: 0xDFB0, + 33894 - 11904: 0xB8AB, + 33895 - 11904: 0xDFB4, + 33896 - 11904: 0xDFDA, + 33897 - 11904: 0xB8B4, + 33899 - 11904: 0xB8AC, + 33900 - 11904: 0xB8AE, + 33901 - 11904: 0xB8B5, + 33902 - 11904: 0xDFE0, + 33903 - 11904: 0xDFD3, + 33904 - 11904: 0xDFCE, + 33905 - 11904: 0x8F62, + 33906 - 11904: 0x974C, + 33907 - 11904: 0xDFBB, + 33908 - 11904: 0xDFBA, + 33909 - 11904: 0xB8AA, + 33910 - 11904: 0xDFAC, + 33911 - 11904: 0xB8A7, + 33912 - 11904: 0xDFC4, + 33913 - 11904: 0xDFAD, + 33914 - 11904: 0xDFC2, + 33917 - 11904: 0xDFB7, + 33918 - 11904: 0xDFDB, + 33919 - 11904: 0x91C7, + 33920 - 11904: 0x955F, + 33922 - 11904: 0xB8A6, + 33924 - 11904: 0x87AB, + 33926 - 11904: 0xDFB3, + 33928 - 11904: 0x99BB, + 33933 - 11904: 0xDFAF, + 33934 - 11904: 0xDFD5, + 33935 - 11904: 0xDFAE, + 33936 - 11904: 0xBB60, + 33937 - 11904: 0xE3D3, + 33938 - 11904: 0x8E6D, + 33939 - 11904: 0x8F71, + 33940 - 11904: 0xE3C2, + 33942 - 11904: 0x94CB, + 33943 - 11904: 0xE3AC, + 33944 - 11904: 0xE3CA, + 33945 - 11904: 0xBB58, + 33946 - 11904: 0xE3BB, + 33947 - 11904: 0xE3C5, + 33948 - 11904: 0xBB5B, + 33949 - 11904: 0xE3BE, + 33950 - 11904: 0xBB59, + 33951 - 11904: 0xE3AF, + 33952 - 11904: 0xE3CD, + 33953 - 11904: 0xE3AE, + 33954 - 11904: 0xE3C1, + 33955 - 11904: 0x95B1, + 33956 - 11904: 0xE3AD, + 33959 - 11904: 0xE3BF, + 33960 - 11904: 0xE3C8, + 33961 - 11904: 0xE3C6, + 33962 - 11904: 0xE3BA, + 33963 - 11904: 0xE3B5, + 33964 - 11904: 0xE3B3, + 33965 - 11904: 0x9AF2, + 33966 - 11904: 0xE3B4, + 33967 - 11904: 0xE3C7, + 33968 - 11904: 0xE3D2, + 33969 - 11904: 0xE3BC, + 33970 - 11904: 0xBB5A, + 33972 - 11904: 0xE3B7, + 33974 - 11904: 0xE3CB, + 33976 - 11904: 0xBB5D, + 33977 - 11904: 0xE3B6, + 33978 - 11904: 0xE3B0, + 33979 - 11904: 0xE3C0, + 33980 - 11904: 0xBB61, + 33981 - 11904: 0x96C3, + 33982 - 11904: 0x99BD, + 33983 - 11904: 0xBB55, + 33984 - 11904: 0xBB5E, + 33985 - 11904: 0xE3B8, + 33986 - 11904: 0xE3B2, + 33988 - 11904: 0xBB57, + 33989 - 11904: 0xDFD4, + 33990 - 11904: 0xBB56, + 33991 - 11904: 0xE3C3, + 33993 - 11904: 0xBB54, + 33994 - 11904: 0xBB63, + 33995 - 11904: 0xBB5C, + 33996 - 11904: 0xE3C4, + 33997 - 11904: 0xE3B9, + 33998 - 11904: 0xE3B1, + 33999 - 11904: 0xE3CC, + 34000 - 11904: 0xE3BD, + 34001 - 11904: 0xBB62, + 34002 - 11904: 0xE3D0, + 34003 - 11904: 0xBB5F, + 34004 - 11904: 0xE3CF, + 34006 - 11904: 0xE3C9, + 34007 - 11904: 0xE3CE, + 34010 - 11904: 0xA0CF, + 34011 - 11904: 0xE3D1, + 34014 - 11904: 0x8F6D, + 34017 - 11904: 0x99BE, + 34018 - 11904: 0x8EF4, + 34020 - 11904: 0x8F72, + 34021 - 11904: 0x95E4, + 34023 - 11904: 0xE773, + 34024 - 11904: 0xE774, + 34025 - 11904: 0xE767, + 34026 - 11904: 0xE766, + 34027 - 11904: 0xE762, + 34028 - 11904: 0xBDB4, + 34030 - 11904: 0xBDAC, + 34031 - 11904: 0xE776, + 34032 - 11904: 0xE775, + 34033 - 11904: 0xDFA9, + 34034 - 11904: 0xE75F, + 34035 - 11904: 0xE763, + 34036 - 11904: 0xE75D, + 34038 - 11904: 0xE770, + 34039 - 11904: 0xE761, + 34040 - 11904: 0x99BF, + 34041 - 11904: 0xE777, + 34042 - 11904: 0xE75A, + 34043 - 11904: 0xE758, + 34044 - 11904: 0xE764, + 34045 - 11904: 0xE76E, + 34046 - 11904: 0xE769, + 34047 - 11904: 0xBDB6, + 34048 - 11904: 0xE74F, + 34050 - 11904: 0xE76D, + 34051 - 11904: 0x9244, + 34052 - 11904: 0x87D7, + 34053 - 11904: 0xFBA5, + 34054 - 11904: 0xBDB7, + 34055 - 11904: 0xDFBD, + 34056 - 11904: 0xE75B, + 34057 - 11904: 0xE752, + 34058 - 11904: 0xE755, + 34059 - 11904: 0xE77B, + 34060 - 11904: 0xE75C, + 34061 - 11904: 0xE753, + 34062 - 11904: 0xE751, + 34063 - 11904: 0xE74E, + 34064 - 11904: 0x99C0, + 34065 - 11904: 0xBDB0, + 34066 - 11904: 0xE765, + 34067 - 11904: 0xBDAF, + 34068 - 11904: 0xBDB3, + 34069 - 11904: 0xE760, + 34070 - 11904: 0xE768, + 34071 - 11904: 0xBDA9, + 34072 - 11904: 0xE778, + 34073 - 11904: 0xE77C, + 34074 - 11904: 0xBDAB, + 34076 - 11904: 0xE757, + 34077 - 11904: 0xE76B, + 34078 - 11904: 0xE76F, + 34079 - 11904: 0xE754, + 34080 - 11904: 0xE779, + 34081 - 11904: 0xBDB2, + 34083 - 11904: 0xBDB1, + 34084 - 11904: 0xE74C, + 34085 - 11904: 0xBDB5, + 34086 - 11904: 0xE772, + 34087 - 11904: 0xE756, + 34088 - 11904: 0xE76A, + 34089 - 11904: 0xE750, + 34090 - 11904: 0xE75E, + 34091 - 11904: 0xE759, + 34092 - 11904: 0xBDAD, + 34093 - 11904: 0xBDAE, + 34094 - 11904: 0xE76C, + 34095 - 11904: 0xE77D, + 34096 - 11904: 0xE77A, + 34097 - 11904: 0xE771, + 34099 - 11904: 0xFDB4, + 34100 - 11904: 0x8F77, + 34104 - 11904: 0x99C1, + 34107 - 11904: 0xE74D, + 34109 - 11904: 0xBDAA, + 34110 - 11904: 0xEB49, + 34112 - 11904: 0xEB40, + 34113 - 11904: 0xEB43, + 34114 - 11904: 0xFAB9, + 34115 - 11904: 0xBFBB, + 34116 - 11904: 0xEB45, + 34117 - 11904: 0xEAF9, + 34118 - 11904: 0xEB41, + 34119 - 11904: 0xEB47, + 34120 - 11904: 0xBFB8, + 34121 - 11904: 0xBFBC, + 34122 - 11904: 0xBFB6, + 34123 - 11904: 0x8F40, + 34124 - 11904: 0xFA44, + 34125 - 11904: 0xEAFB, + 34126 - 11904: 0xEB4C, + 34129 - 11904: 0xEB46, + 34130 - 11904: 0x99C2, + 34131 - 11904: 0xEAFC, + 34132 - 11904: 0xEB55, + 34133 - 11904: 0xEB4F, + 34134 - 11904: 0xEAF8, + 34135 - 11904: 0xEE46, + 34136 - 11904: 0xEAFE, + 34137 - 11904: 0xBFB7, + 34138 - 11904: 0x8F5C, + 34139 - 11904: 0xEB4A, + 34141 - 11904: 0xEB54, + 34142 - 11904: 0xBFBF, + 34143 - 11904: 0x8CBD, + 34144 - 11904: 0xEB51, + 34145 - 11904: 0xEAFD, + 34146 - 11904: 0xEB44, + 34147 - 11904: 0xEB48, + 34148 - 11904: 0xEB42, + 34149 - 11904: 0xEB56, + 34150 - 11904: 0xEB53, + 34151 - 11904: 0xEB50, + 34152 - 11904: 0xBFB9, + 34153 - 11904: 0xBFBA, + 34154 - 11904: 0xBFBE, + 34155 - 11904: 0xEAFA, + 34156 - 11904: 0xEB57, + 34157 - 11904: 0xBFBD, + 34158 - 11904: 0xEB4D, + 34159 - 11904: 0x99C4, + 34160 - 11904: 0x99C5, + 34161 - 11904: 0xEB4B, + 34163 - 11904: 0x8F7B, + 34165 - 11904: 0xEB4E, + 34166 - 11904: 0xEE53, + 34167 - 11904: 0xEE40, + 34168 - 11904: 0xEE45, + 34169 - 11904: 0xEE52, + 34170 - 11904: 0xEE44, + 34171 - 11904: 0xEDFB, + 34172 - 11904: 0xEE41, + 34174 - 11904: 0xC1A2, + 34176 - 11904: 0xEDF4, + 34177 - 11904: 0xEE4D, + 34178 - 11904: 0xEE4F, + 34179 - 11904: 0xEDF3, + 34180 - 11904: 0xC1A1, + 34181 - 11904: 0xEE51, + 34182 - 11904: 0xEE49, + 34183 - 11904: 0xC1A8, + 34184 - 11904: 0xEE50, + 34185 - 11904: 0xEE42, + 34186 - 11904: 0xC1AA, + 34187 - 11904: 0xEDF9, + 34188 - 11904: 0xEB52, + 34189 - 11904: 0xEE4A, + 34190 - 11904: 0xEE47, + 34191 - 11904: 0xEDF5, + 34192 - 11904: 0xEE55, + 34193 - 11904: 0xC1A4, + 34195 - 11904: 0x8776, + 34196 - 11904: 0xC1A5, + 34197 - 11904: 0xEDF7, + 34198 - 11904: 0xEE48, + 34199 - 11904: 0x8CB6, + 34200 - 11904: 0xEE54, + 34201 - 11904: 0xEE4B, + 34202 - 11904: 0xEDFD, + 34203 - 11904: 0xC1A7, + 34204 - 11904: 0xC1A3, + 34205 - 11904: 0xEE4C, + 34206 - 11904: 0xEDFE, + 34207 - 11904: 0xEE56, + 34208 - 11904: 0xEDF8, + 34209 - 11904: 0xEE43, + 34210 - 11904: 0xEE4E, + 34211 - 11904: 0xEDFA, + 34212 - 11904: 0xEDFC, + 34214 - 11904: 0xC2CB, + 34215 - 11904: 0xEDF6, + 34216 - 11904: 0xC1A9, + 34217 - 11904: 0xC2C4, + 34218 - 11904: 0xC17E, + 34223 - 11904: 0xC1A6, + 34224 - 11904: 0xC2C8, + 34225 - 11904: 0xF0B3, + 34227 - 11904: 0xF0A9, + 34228 - 11904: 0xF0A4, + 34229 - 11904: 0xF0AA, + 34230 - 11904: 0xF0B4, + 34231 - 11904: 0xF0B8, + 34232 - 11904: 0xF0B7, + 34233 - 11904: 0xC2CA, + 34234 - 11904: 0xC2C9, + 34237 - 11904: 0xF0AB, + 34238 - 11904: 0xF0B9, + 34239 - 11904: 0xF0AE, + 34240 - 11904: 0xF0A6, + 34241 - 11904: 0x8FA3, + 34242 - 11904: 0xF0A8, + 34243 - 11904: 0xF0A7, + 34244 - 11904: 0xF0AD, + 34245 - 11904: 0xF0B2, + 34246 - 11904: 0xF0A5, + 34247 - 11904: 0xF0AC, + 34248 - 11904: 0xF0B1, + 34249 - 11904: 0xC2C7, + 34251 - 11904: 0xF0AF, + 34253 - 11904: 0xC2C5, + 34254 - 11904: 0xF0B0, + 34255 - 11904: 0xC2C3, + 34256 - 11904: 0xC2C6, + 34257 - 11904: 0xF2D5, + 34258 - 11904: 0xF0B5, + 34261 - 11904: 0xC3C2, + 34262 - 11904: 0x8CCE, + 34263 - 11904: 0xF2CD, + 34264 - 11904: 0xF2D1, + 34265 - 11904: 0xF2C9, + 34266 - 11904: 0xF2CC, + 34268 - 11904: 0xF2D4, + 34269 - 11904: 0xC3C0, + 34270 - 11904: 0xF2D9, + 34271 - 11904: 0xF2D2, + 34272 - 11904: 0x99C6, + 34273 - 11904: 0xF2CA, + 34274 - 11904: 0xF2DA, + 34275 - 11904: 0xF2D3, + 34276 - 11904: 0xC3C3, + 34277 - 11904: 0xC3C4, + 34278 - 11904: 0xF2D7, + 34280 - 11904: 0xF2CB, + 34281 - 11904: 0xC3BF, + 34282 - 11904: 0xC3C1, + 34283 - 11904: 0xF2C6, + 34284 - 11904: 0xF2CE, + 34285 - 11904: 0xF2C8, + 34286 - 11904: 0x96CD, + 34287 - 11904: 0xF2D8, + 34288 - 11904: 0xF2D6, + 34289 - 11904: 0xF2C7, + 34290 - 11904: 0xF2CF, + 34294 - 11904: 0xF4BE, + 34295 - 11904: 0xC3C5, + 34296 - 11904: 0xF2D0, + 34297 - 11904: 0xC4A7, + 34298 - 11904: 0xC4A9, + 34299 - 11904: 0xC4A6, + 34300 - 11904: 0x96C7, + 34301 - 11904: 0xF4C3, + 34302 - 11904: 0xF4BB, + 34303 - 11904: 0xF4B9, + 34304 - 11904: 0xF4BD, + 34305 - 11904: 0xF4BA, + 34306 - 11904: 0x8FA5, + 34308 - 11904: 0xF4BF, + 34309 - 11904: 0xF4C1, + 34310 - 11904: 0xC4AA, + 34311 - 11904: 0xC4AC, + 34313 - 11904: 0xF4C0, + 34314 - 11904: 0xC4AD, + 34315 - 11904: 0xC4AB, + 34316 - 11904: 0xF4C2, + 34317 - 11904: 0xFABB, + 34319 - 11904: 0x8C61, + 34320 - 11904: 0x9570, + 34321 - 11904: 0xC4A8, + 34323 - 11904: 0x87AF, + 34324 - 11904: 0x9368, + 34326 - 11904: 0x8F7E, + 34327 - 11904: 0xC4F4, + 34328 - 11904: 0xF5F1, + 34329 - 11904: 0xF5F7, + 34330 - 11904: 0xC4F6, + 34331 - 11904: 0xF4BC, + 34332 - 11904: 0xF5F6, + 34334 - 11904: 0xF5FD, + 34335 - 11904: 0xF5F4, + 34336 - 11904: 0xF5FB, + 34337 - 11904: 0xF5FA, + 34338 - 11904: 0xF4B8, + 34339 - 11904: 0xF5F5, + 34340 - 11904: 0xF0B6, + 34341 - 11904: 0xF5FE, + 34342 - 11904: 0xF5F3, + 34343 - 11904: 0xF5F8, + 34344 - 11904: 0x8FAA, + 34345 - 11904: 0xF5FC, + 34346 - 11904: 0xF5F2, + 34348 - 11904: 0xF74A, + 34349 - 11904: 0xC4F5, + 34350 - 11904: 0xF5F9, + 34351 - 11904: 0xA050, + 34353 - 11904: 0xF7F4, + 34354 - 11904: 0xF74B, + 34355 - 11904: 0xF749, + 34356 - 11904: 0xF747, + 34357 - 11904: 0xF748, + 34358 - 11904: 0xF74C, + 34360 - 11904: 0xC5D9, + 34361 - 11904: 0xF7F2, + 34362 - 11904: 0xF7F0, + 34363 - 11904: 0xF7F5, + 34364 - 11904: 0xF7F3, + 34366 - 11904: 0xF7F6, + 34367 - 11904: 0xC5DA, + 34368 - 11904: 0xF7F1, + 34370 - 11904: 0x90D3, + 34371 - 11904: 0xF8BC, + 34373 - 11904: 0x9556, + 34374 - 11904: 0xF945, + 34375 - 11904: 0xF946, + 34376 - 11904: 0xF947, + 34379 - 11904: 0xF9C7, + 34380 - 11904: 0xF9BD, + 34381 - 11904: 0xCA4F, + 34382 - 11904: 0xAAEA, + 34384 - 11904: 0xAD68, + 34386 - 11904: 0xD3B8, + 34387 - 11904: 0xD3B7, + 34388 - 11904: 0xB040, + 34389 - 11904: 0xB342, + 34390 - 11904: 0xD77C, + 34393 - 11904: 0xD77B, + 34395 - 11904: 0xB5EA, + 34396 - 11904: 0xB8B8, + 34398 - 11904: 0xB8B7, + 34399 - 11904: 0xB8B9, + 34401 - 11904: 0xE3D4, + 34402 - 11904: 0xE77E, + 34403 - 11904: 0xEB58, + 34404 - 11904: 0xEB5A, + 34405 - 11904: 0xEB59, + 34407 - 11904: 0xC1AB, + 34408 - 11904: 0xEE57, + 34409 - 11904: 0xF0BA, + 34410 - 11904: 0xF9A5, + 34411 - 11904: 0xA6E4, + 34412 - 11904: 0x8FB8, + 34413 - 11904: 0xCDC9, + 34414 - 11904: 0xCDCA, + 34415 - 11904: 0xCDC8, + 34416 - 11904: 0xCDC7, + 34417 - 11904: 0xAAEB, + 34418 - 11904: 0x99C8, + 34419 - 11904: 0xD0A9, + 34420 - 11904: 0xD0A7, + 34423 - 11904: 0xD0A6, + 34425 - 11904: 0xAD69, + 34426 - 11904: 0xAD6B, + 34427 - 11904: 0xAD6A, + 34428 - 11904: 0xD0A8, + 34430 - 11904: 0x8FAF, + 34437 - 11904: 0xD3C4, + 34438 - 11904: 0xD3C1, + 34439 - 11904: 0xD3BF, + 34442 - 11904: 0xB041, + 34443 - 11904: 0xD3C2, + 34444 - 11904: 0xB046, + 34445 - 11904: 0xD3BC, + 34446 - 11904: 0xD3CB, + 34448 - 11904: 0xD3CD, + 34449 - 11904: 0xD3BD, + 34450 - 11904: 0x99C9, + 34451 - 11904: 0xB043, + 34452 - 11904: 0xD3CE, + 34453 - 11904: 0xD3C9, + 34454 - 11904: 0xD3BB, + 34455 - 11904: 0xD3C0, + 34456 - 11904: 0xD3CA, + 34457 - 11904: 0xD3C6, + 34458 - 11904: 0xD3C3, + 34460 - 11904: 0xB048, + 34461 - 11904: 0xD3CC, + 34462 - 11904: 0xD3BE, + 34464 - 11904: 0x9579, + 34465 - 11904: 0xD3C7, + 34466 - 11904: 0xD3B9, + 34467 - 11904: 0xB047, + 34468 - 11904: 0xB044, + 34469 - 11904: 0xD3C5, + 34471 - 11904: 0xD3C8, + 34472 - 11904: 0xD3BA, + 34473 - 11904: 0xB045, + 34474 - 11904: 0xB042, + 34477 - 11904: 0x9F49, + 34479 - 11904: 0xB34C, + 34480 - 11904: 0xD7A5, + 34481 - 11904: 0xB34B, + 34482 - 11904: 0x99CA, + 34483 - 11904: 0xD7A8, + 34484 - 11904: 0xD7AB, + 34485 - 11904: 0xB348, + 34486 - 11904: 0xB346, + 34487 - 11904: 0xD77E, + 34488 - 11904: 0xD7A9, + 34489 - 11904: 0xD7A7, + 34490 - 11904: 0xD7A4, + 34491 - 11904: 0xD7AC, + 34492 - 11904: 0xD7AD, + 34493 - 11904: 0xD7AF, + 34494 - 11904: 0xD7B0, + 34495 - 11904: 0xD77D, + 34496 - 11904: 0xB345, + 34497 - 11904: 0xD7A2, + 34498 - 11904: 0xD7A1, + 34499 - 11904: 0xD7AE, + 34500 - 11904: 0xB347, + 34501 - 11904: 0xD7A3, + 34502 - 11904: 0xB349, + 34503 - 11904: 0xB344, + 34504 - 11904: 0xD7A6, + 34505 - 11904: 0xB34D, + 34507 - 11904: 0xB34A, + 34508 - 11904: 0xD7AA, + 34512 - 11904: 0xB5F1, + 34513 - 11904: 0xDBBF, + 34515 - 11904: 0xDBB4, + 34516 - 11904: 0xB5EE, + 34518 - 11904: 0xDFE7, + 34519 - 11904: 0xDBBD, + 34520 - 11904: 0xDBB1, + 34521 - 11904: 0xB5EC, + 34522 - 11904: 0xDBB6, + 34523 - 11904: 0xB5EF, + 34524 - 11904: 0xDBBA, + 34525 - 11904: 0xDBB8, + 34526 - 11904: 0xB5F2, + 34527 - 11904: 0xB5EB, + 34530 - 11904: 0xDBB2, + 34531 - 11904: 0xDBB5, + 34532 - 11904: 0xB5F0, + 34534 - 11904: 0xDBB3, + 34536 - 11904: 0xDBBE, + 34537 - 11904: 0xDBBC, + 34538 - 11904: 0xDBB7, + 34539 - 11904: 0xDBB9, + 34540 - 11904: 0xDBBB, + 34541 - 11904: 0xB5ED, + 34543 - 11904: 0x99CB, + 34549 - 11904: 0xDFE8, + 34550 - 11904: 0xDFEE, + 34551 - 11904: 0xDFE4, + 34552 - 11904: 0xDFEA, + 34553 - 11904: 0xB8BA, + 34554 - 11904: 0xDFE6, + 34555 - 11904: 0xB8C0, + 34558 - 11904: 0xB8BF, + 34560 - 11904: 0xB8BE, + 34561 - 11904: 0xDFED, + 34562 - 11904: 0xB8C1, + 34563 - 11904: 0xB8C2, + 34564 - 11904: 0xDFE3, + 34565 - 11904: 0xDFF0, + 34566 - 11904: 0xB8C3, + 34567 - 11904: 0xB8BD, + 34568 - 11904: 0xB8BC, + 34569 - 11904: 0xDFEC, + 34570 - 11904: 0xB8C4, + 34571 - 11904: 0xDFE2, + 34572 - 11904: 0xDFE5, + 34573 - 11904: 0xDFEF, + 34574 - 11904: 0xDFEB, + 34577 - 11904: 0xE3F4, + 34578 - 11904: 0xE3E9, + 34579 - 11904: 0xB8BB, + 34584 - 11904: 0xBB6A, + 34585 - 11904: 0xE3DD, + 34586 - 11904: 0xE3F2, + 34587 - 11904: 0xE3DE, + 34588 - 11904: 0xBB65, + 34590 - 11904: 0xE3DB, + 34592 - 11904: 0xE3E4, + 34593 - 11904: 0xE3DC, + 34594 - 11904: 0xBB67, + 34595 - 11904: 0xE3D6, + 34596 - 11904: 0xE3F1, + 34597 - 11904: 0xBB68, + 34598 - 11904: 0xE3EE, + 34599 - 11904: 0xE3EF, + 34600 - 11904: 0xE3D7, + 34601 - 11904: 0xBB6D, + 34602 - 11904: 0xE3E6, + 34604 - 11904: 0xE3E0, + 34605 - 11904: 0xE3E7, + 34606 - 11904: 0xE3DA, + 34608 - 11904: 0xE3F3, + 34609 - 11904: 0xE3EB, + 34610 - 11904: 0xE3E5, + 34611 - 11904: 0xE3D5, + 34612 - 11904: 0xBB69, + 34613 - 11904: 0xE3EC, + 34615 - 11904: 0xBB6C, + 34616 - 11904: 0xE3F0, + 34618 - 11904: 0xE3EA, + 34619 - 11904: 0xBB66, + 34620 - 11904: 0xE3E8, + 34622 - 11904: 0xE3E2, + 34623 - 11904: 0xBB64, + 34624 - 11904: 0xE3D9, + 34625 - 11904: 0xE3E1, + 34626 - 11904: 0xE3ED, + 34627 - 11904: 0xE3DF, + 34630 - 11904: 0xE3E3, + 34636 - 11904: 0xBDC1, + 34637 - 11904: 0xDFE9, + 34638 - 11904: 0xE7B2, + 34639 - 11904: 0xE7BB, + 34640 - 11904: 0xE7B1, + 34641 - 11904: 0xE7AD, + 34642 - 11904: 0xE7AA, + 34643 - 11904: 0xBDC2, + 34644 - 11904: 0xE7A8, + 34645 - 11904: 0xBB6B, + 34646 - 11904: 0xE7A1, + 34647 - 11904: 0xBDC0, + 34648 - 11904: 0xE7A7, + 34649 - 11904: 0xBDBF, + 34650 - 11904: 0xE7AC, + 34651 - 11904: 0xE7A9, + 34652 - 11904: 0xE7B9, + 34653 - 11904: 0xE7B4, + 34654 - 11904: 0xE7AE, + 34655 - 11904: 0xE7B3, + 34656 - 11904: 0xBDBB, + 34657 - 11904: 0xE7AB, + 34658 - 11904: 0xE7BE, + 34659 - 11904: 0xE7A2, + 34660 - 11904: 0xE7A3, + 34661 - 11904: 0xE7BA, + 34662 - 11904: 0xBDBC, + 34663 - 11904: 0xE7BF, + 34664 - 11904: 0xBDBE, + 34665 - 11904: 0xE7C0, + 34666 - 11904: 0xE7B0, + 34667 - 11904: 0xE3D8, + 34668 - 11904: 0xE7B6, + 34669 - 11904: 0xE7AF, + 34670 - 11904: 0xE7B8, + 34671 - 11904: 0xE7B5, + 34672 - 11904: 0x9DD5, + 34673 - 11904: 0x8FB0, + 34675 - 11904: 0xE7A6, + 34676 - 11904: 0xBDB9, + 34677 - 11904: 0xE7BD, + 34678 - 11904: 0xBDBA, + 34679 - 11904: 0xE7A4, + 34680 - 11904: 0xBDBD, + 34681 - 11904: 0xEB64, + 34682 - 11904: 0xE7B7, + 34683 - 11904: 0xE7BC, + 34685 - 11904: 0xFA7A, + 34689 - 11904: 0xEB61, + 34690 - 11904: 0xBDB8, + 34691 - 11904: 0xBFC0, + 34692 - 11904: 0xEB6B, + 34693 - 11904: 0xEB67, + 34694 - 11904: 0x9E5F, + 34695 - 11904: 0xEB65, + 34696 - 11904: 0xEB60, + 34697 - 11904: 0xEB6F, + 34699 - 11904: 0x99CD, + 34700 - 11904: 0xA0C9, + 34701 - 11904: 0xBFC4, + 34703 - 11904: 0xEB5C, + 34704 - 11904: 0xEB68, + 34705 - 11904: 0xEB69, + 34706 - 11904: 0xEB5F, + 34707 - 11904: 0xEB5E, + 34708 - 11904: 0xEB6C, + 34710 - 11904: 0xEB62, + 34711 - 11904: 0xEB5D, + 34712 - 11904: 0xEB63, + 34714 - 11904: 0xEB6E, + 34715 - 11904: 0xEB5B, + 34716 - 11904: 0xEB6D, + 34717 - 11904: 0xEB6A, + 34718 - 11904: 0xBFC2, + 34719 - 11904: 0xBFC1, + 34722 - 11904: 0xBFC3, + 34723 - 11904: 0xEB66, + 34724 - 11904: 0xF0CB, + 34725 - 11904: 0x9ADB, + 34729 - 11904: 0xA0C6, + 34730 - 11904: 0xEE59, + 34731 - 11904: 0xC1B1, + 34732 - 11904: 0xEE5D, + 34733 - 11904: 0xEE5A, + 34734 - 11904: 0xEE61, + 34735 - 11904: 0xEE67, + 34736 - 11904: 0xEE5C, + 34737 - 11904: 0x8FB4, + 34738 - 11904: 0xEE70, + 34739 - 11904: 0xC1AE, + 34740 - 11904: 0xEE6A, + 34741 - 11904: 0xEE5F, + 34742 - 11904: 0xEE6B, + 34743 - 11904: 0xEE66, + 34744 - 11904: 0xEE6D, + 34745 - 11904: 0xEE5E, + 34746 - 11904: 0xC1B3, + 34747 - 11904: 0xC1B2, + 34748 - 11904: 0xEE60, + 34749 - 11904: 0xEE6E, + 34750 - 11904: 0xEE58, + 34751 - 11904: 0xEE6C, + 34752 - 11904: 0xC1AC, + 34753 - 11904: 0xA0D7, + 34754 - 11904: 0xEE64, + 34755 - 11904: 0xEE63, + 34756 - 11904: 0xEE68, + 34757 - 11904: 0xEE5B, + 34758 - 11904: 0xC1B0, + 34760 - 11904: 0xC1B4, + 34761 - 11904: 0xEE62, + 34762 - 11904: 0xEE69, + 34763 - 11904: 0xC1B5, + 34764 - 11904: 0xEE65, + 34766 - 11904: 0xA0C7, + 34769 - 11904: 0xC1AD, + 34770 - 11904: 0xC1AF, + 34771 - 11904: 0xF0C7, + 34772 - 11904: 0xF0C5, + 34774 - 11904: 0xA043, + 34775 - 11904: 0xF0CC, + 34776 - 11904: 0xF0C9, + 34777 - 11904: 0xF0CD, + 34778 - 11904: 0x8FB5, + 34779 - 11904: 0xF0BE, + 34780 - 11904: 0xF0C6, + 34781 - 11904: 0xF0D1, + 34782 - 11904: 0xEE6F, + 34783 - 11904: 0xF0C2, + 34784 - 11904: 0xC2CF, + 34785 - 11904: 0xE7A5, + 34786 - 11904: 0xF0BD, + 34787 - 11904: 0xF0CA, + 34788 - 11904: 0xF0C4, + 34789 - 11904: 0xF0C1, + 34790 - 11904: 0xF0BC, + 34791 - 11904: 0xF0BB, + 34792 - 11904: 0xF0D0, + 34794 - 11904: 0xF0C0, + 34795 - 11904: 0xF0BF, + 34796 - 11904: 0xC2CD, + 34797 - 11904: 0xF0C8, + 34798 - 11904: 0x8FB2, + 34799 - 11904: 0xC2CC, + 34802 - 11904: 0xC2CE, + 34803 - 11904: 0xF0C3, + 34804 - 11904: 0xF0CF, + 34805 - 11904: 0xA061, + 34806 - 11904: 0xF2DE, + 34807 - 11904: 0xF2DF, + 34809 - 11904: 0xC3C9, + 34810 - 11904: 0xF2DC, + 34811 - 11904: 0xC3C6, + 34812 - 11904: 0xF2E4, + 34814 - 11904: 0xC3CA, + 34815 - 11904: 0xF2E6, + 34816 - 11904: 0xF2DB, + 34817 - 11904: 0xF0CE, + 34818 - 11904: 0xF2E8, + 34819 - 11904: 0xF2DD, + 34820 - 11904: 0x9E5E, + 34821 - 11904: 0xC3C7, + 34822 - 11904: 0xF2E3, + 34824 - 11904: 0xF2E5, + 34825 - 11904: 0xF2E0, + 34826 - 11904: 0xF2E7, + 34827 - 11904: 0xF2E2, + 34828 - 11904: 0xF2E1, + 34829 - 11904: 0xC3C8, + 34831 - 11904: 0xA063, + 34832 - 11904: 0xF4C5, + 34833 - 11904: 0xF4C6, + 34835 - 11904: 0xF4C8, + 34836 - 11904: 0xC4AE, + 34837 - 11904: 0xC4AF, + 34838 - 11904: 0xF4C9, + 34839 - 11904: 0xF4C7, + 34840 - 11904: 0x9FE8, + 34841 - 11904: 0xF4C4, + 34843 - 11904: 0xF642, + 34844 - 11904: 0xF645, + 34845 - 11904: 0xF641, + 34847 - 11904: 0xC4FA, + 34848 - 11904: 0xF643, + 34849 - 11904: 0xC4F9, + 34850 - 11904: 0xC4F8, + 34851 - 11904: 0xC4F7, + 34852 - 11904: 0xF644, + 34853 - 11904: 0xF751, + 34854 - 11904: 0xF74F, + 34855 - 11904: 0x9CB2, + 34856 - 11904: 0xF74E, + 34857 - 11904: 0xF640, + 34858 - 11904: 0xF750, + 34859 - 11904: 0xF646, + 34860 - 11904: 0xF74D, + 34861 - 11904: 0x957C, + 34862 - 11904: 0xF7F9, + 34863 - 11904: 0xF7D7, + 34864 - 11904: 0xF7F7, + 34865 - 11904: 0xC5DB, + 34866 - 11904: 0xF7F8, + 34867 - 11904: 0xF7FA, + 34869 - 11904: 0xF8BF, + 34870 - 11904: 0xC5FA, + 34871 - 11904: 0xF8BE, + 34872 - 11904: 0xF8BD, + 34873 - 11904: 0xC5FB, + 34875 - 11904: 0xC65A, + 34876 - 11904: 0xF96E, + 34877 - 11904: 0xF9A7, + 34878 - 11904: 0xF9A6, + 34879 - 11904: 0xF9A8, + 34880 - 11904: 0xA6E5, + 34881 - 11904: 0xD0AA, + 34882 - 11904: 0x9FC7, + 34883 - 11904: 0xD3CF, + 34884 - 11904: 0xD3D0, + 34885 - 11904: 0x8FBB, + 34886 - 11904: 0x8FBC, + 34888 - 11904: 0xDBC0, + 34890 - 11904: 0xF647, + 34891 - 11904: 0xF8C0, + 34892 - 11904: 0xA6E6, + 34893 - 11904: 0xAD6C, + 34894 - 11904: 0xD0AB, + 34895 - 11904: 0x8FEC, + 34898 - 11904: 0xD7B1, + 34899 - 11904: 0xB34E, + 34901 - 11904: 0xDBC2, + 34902 - 11904: 0xDBC1, + 34903 - 11904: 0xB5F3, + 34905 - 11904: 0xB8C5, + 34906 - 11904: 0xE7C1, + 34907 - 11904: 0xBDC3, + 34909 - 11904: 0xBDC4, + 34910 - 11904: 0x8FC0, + 34912 - 11904: 0x936A, + 34913 - 11904: 0xBFC5, + 34914 - 11904: 0xC5FC, + 34915 - 11904: 0xA6E7, + 34916 - 11904: 0x8BE4, + 34917 - 11904: 0x9C7C, + 34919 - 11904: 0xD0AC, + 34920 - 11904: 0xAAED, + 34921 - 11904: 0xD0AE, + 34922 - 11904: 0xD0AD, + 34923 - 11904: 0xAD6D, + 34925 - 11904: 0xD3D1, + 34926 - 11904: 0x95A1, + 34927 - 11904: 0xD3D8, + 34928 - 11904: 0xB049, + 34929 - 11904: 0xD3D6, + 34930 - 11904: 0xD3D4, + 34932 - 11904: 0xD3DB, + 34933 - 11904: 0xD3D2, + 34934 - 11904: 0xD3D3, + 34935 - 11904: 0xB04A, + 34937 - 11904: 0xB04E, + 34940 - 11904: 0xD3DC, + 34941 - 11904: 0xB04D, + 34942 - 11904: 0xD3DA, + 34943 - 11904: 0xD3D7, + 34944 - 11904: 0xD3D5, + 34945 - 11904: 0xB04B, + 34946 - 11904: 0xB04C, + 34947 - 11904: 0xD3D9, + 34948 - 11904: 0xFEEC, + 34951 - 11904: 0x95A3, + 34952 - 11904: 0xB350, + 34953 - 11904: 0xD7B2, + 34955 - 11904: 0xB355, + 34956 - 11904: 0xD7C2, + 34957 - 11904: 0xB354, + 34958 - 11904: 0xD7C4, + 34959 - 11904: 0x8C45, + 34960 - 11904: 0x8CB8, + 34961 - 11904: 0xD7B8, + 34962 - 11904: 0xB352, + 34963 - 11904: 0xD7C3, + 34965 - 11904: 0xD7B3, + 34966 - 11904: 0xB353, + 34967 - 11904: 0xD7BF, + 34968 - 11904: 0xD7BB, + 34969 - 11904: 0xD7BD, + 34970 - 11904: 0xD7B7, + 34971 - 11904: 0xD7BE, + 34972 - 11904: 0x8FC1, + 34973 - 11904: 0x87B7, + 34974 - 11904: 0xB34F, + 34975 - 11904: 0xD7BA, + 34976 - 11904: 0xA052, + 34977 - 11904: 0xD7B9, + 34978 - 11904: 0xD7B5, + 34980 - 11904: 0xD7C0, + 34983 - 11904: 0xD7BC, + 34984 - 11904: 0xD7B4, + 34986 - 11904: 0xD7B6, + 34987 - 11904: 0xB351, + 34988 - 11904: 0xD7C1, + 34990 - 11904: 0x99D0, + 34993 - 11904: 0xB5F6, + 34994 - 11904: 0xDBCD, + 34996 - 11904: 0x8FC3, + 34997 - 11904: 0x8FC4, + 34998 - 11904: 0xDBC9, + 34999 - 11904: 0xDBCB, + 35000 - 11904: 0xDBC6, + 35001 - 11904: 0xDBC5, + 35002 - 11904: 0xDBC3, + 35004 - 11904: 0xDBCA, + 35005 - 11904: 0xDBCC, + 35006 - 11904: 0xDBC8, + 35007 - 11904: 0x95A4, + 35008 - 11904: 0xDBC7, + 35009 - 11904: 0xB5F4, + 35010 - 11904: 0xB5F5, + 35013 - 11904: 0x8FC6, + 35015 - 11904: 0x9E60, + 35017 - 11904: 0xDBCF, + 35018 - 11904: 0xB8CD, + 35019 - 11904: 0xDFF2, + 35020 - 11904: 0xDFF8, + 35021 - 11904: 0xDFF3, + 35022 - 11904: 0xDFF4, + 35023 - 11904: 0xF9D8, + 35024 - 11904: 0xDFF9, + 35026 - 11904: 0xB8CF, + 35028 - 11904: 0xB8C7, + 35029 - 11904: 0xB8CE, + 35030 - 11904: 0xDFF1, + 35031 - 11904: 0xDBC4, + 35032 - 11904: 0xB8CA, + 35033 - 11904: 0xB8C8, + 35034 - 11904: 0xDFF7, + 35035 - 11904: 0xDFF6, + 35036 - 11904: 0xB8C9, + 35037 - 11904: 0xB8CB, + 35038 - 11904: 0xDFF5, + 35039 - 11904: 0xB8C6, + 35041 - 11904: 0xB8CC, + 35046 - 11904: 0x95A5, + 35047 - 11904: 0xE3F6, + 35048 - 11904: 0xBB74, + 35051 - 11904: 0xE442, + 35052 - 11904: 0xE441, + 35054 - 11904: 0xE3FB, + 35055 - 11904: 0xBB76, + 35056 - 11904: 0xE440, + 35057 - 11904: 0xE3F7, + 35058 - 11904: 0xE3F8, + 35059 - 11904: 0xBB6E, + 35060 - 11904: 0xBB70, + 35061 - 11904: 0x9CB3, + 35062 - 11904: 0xE3FD, + 35063 - 11904: 0xE3F5, + 35064 - 11904: 0xBB72, + 35065 - 11904: 0xBB71, + 35066 - 11904: 0xE3F9, + 35067 - 11904: 0xE3FE, + 35068 - 11904: 0xE3FC, + 35069 - 11904: 0xBB73, + 35070 - 11904: 0xE3FA, + 35071 - 11904: 0x99D1, + 35072 - 11904: 0xFEF1, + 35073 - 11904: 0xDBCE, + 35074 - 11904: 0xBB6F, + 35077 - 11904: 0xE7C2, + 35078 - 11904: 0xE7C9, + 35079 - 11904: 0xBDC6, + 35081 - 11904: 0xE7CD, + 35082 - 11904: 0xBDCA, + 35083 - 11904: 0xE7C5, + 35084 - 11904: 0xE7C3, + 35086 - 11904: 0xE7CC, + 35088 - 11904: 0xBDC5, + 35089 - 11904: 0xE7CB, + 35090 - 11904: 0xBDC7, + 35091 - 11904: 0xBDC8, + 35092 - 11904: 0xE7C4, + 35093 - 11904: 0xBDC9, + 35094 - 11904: 0xE7CA, + 35095 - 11904: 0xE7C6, + 35096 - 11904: 0xE7C7, + 35097 - 11904: 0xE7C8, + 35098 - 11904: 0xBB75, + 35102 - 11904: 0xEB70, + 35103 - 11904: 0xEB7C, + 35105 - 11904: 0xBFCA, + 35106 - 11904: 0xEB77, + 35107 - 11904: 0xEB79, + 35108 - 11904: 0x99D2, + 35109 - 11904: 0xBFC8, + 35110 - 11904: 0xEB71, + 35111 - 11904: 0xEB75, + 35113 - 11904: 0xEB78, + 35114 - 11904: 0xBFC6, + 35115 - 11904: 0xBFC9, + 35116 - 11904: 0xEB7B, + 35117 - 11904: 0xEB73, + 35118 - 11904: 0xEB74, + 35119 - 11904: 0xEB7A, + 35120 - 11904: 0xEB72, + 35121 - 11904: 0xEB76, + 35122 - 11904: 0xBFC7, + 35123 - 11904: 0xEE72, + 35125 - 11904: 0xEE71, + 35126 - 11904: 0xC1B7, + 35127 - 11904: 0xEE77, + 35128 - 11904: 0xC1B9, + 35131 - 11904: 0xC1B6, + 35132 - 11904: 0xEE73, + 35133 - 11904: 0xC1BA, + 35134 - 11904: 0xEE74, + 35137 - 11904: 0xEE75, + 35138 - 11904: 0xEE78, + 35139 - 11904: 0x9CC2, + 35140 - 11904: 0xC1B8, + 35142 - 11904: 0xF0D6, + 35143 - 11904: 0x99D3, + 35145 - 11904: 0xF0D9, + 35147 - 11904: 0xF0D3, + 35148 - 11904: 0xF0D5, + 35149 - 11904: 0x95A7, + 35151 - 11904: 0xF0D4, + 35152 - 11904: 0xF0D7, + 35153 - 11904: 0xF0D8, + 35154 - 11904: 0xEE76, + 35155 - 11904: 0xF0D2, + 35156 - 11904: 0x95A9, + 35158 - 11904: 0xC3CD, + 35159 - 11904: 0xF2EC, + 35160 - 11904: 0xF2EF, + 35161 - 11904: 0xF2F1, + 35162 - 11904: 0xF2EA, + 35163 - 11904: 0xF2EB, + 35164 - 11904: 0xF2EE, + 35165 - 11904: 0xF2F0, + 35166 - 11904: 0xC3CE, + 35167 - 11904: 0xC3CC, + 35168 - 11904: 0xC3CB, + 35169 - 11904: 0xF2ED, + 35170 - 11904: 0xF2E9, + 35171 - 11904: 0xF4CA, + 35172 - 11904: 0xC4B0, + 35173 - 11904: 0x95A6, + 35174 - 11904: 0xF4CB, + 35177 - 11904: 0xF649, + 35178 - 11904: 0xC4FB, + 35179 - 11904: 0xF64B, + 35180 - 11904: 0xC4FC, + 35181 - 11904: 0xF648, + 35182 - 11904: 0xF64A, + 35183 - 11904: 0xC5A8, + 35185 - 11904: 0xF752, + 35186 - 11904: 0xC5A7, + 35187 - 11904: 0xF7FD, + 35188 - 11904: 0xF7FC, + 35190 - 11904: 0xF7FB, + 35191 - 11904: 0x9C5D, + 35193 - 11904: 0xF948, + 35194 - 11904: 0xF949, + 35195 - 11904: 0xF94B, + 35196 - 11904: 0xF94A, + 35198 - 11904: 0xCA50, + 35199 - 11904: 0xA6E8, + 35200 - 11904: 0x98E2, + 35201 - 11904: 0xAD6E, + 35202 - 11904: 0xD7C5, + 35203 - 11904: 0xB5F7, + 35205 - 11904: 0xDFFA, + 35206 - 11904: 0xC2D0, + 35207 - 11904: 0x8FC9, + 35208 - 11904: 0xF2F2, + 35209 - 11904: 0xA0C2, + 35210 - 11904: 0x8FCA, + 35211 - 11904: 0xA8A3, + 35215 - 11904: 0xB357, + 35217 - 11904: 0x99D4, + 35219 - 11904: 0xB356, + 35220 - 11904: 0xA0B9, + 35221 - 11904: 0xDBD0, + 35222 - 11904: 0xB5F8, + 35223 - 11904: 0xDBD2, + 35224 - 11904: 0xDBD1, + 35227 - 11904: 0xDFFB, + 35228 - 11904: 0xB8D0, + 35229 - 11904: 0xE443, + 35230 - 11904: 0xE446, + 35231 - 11904: 0xE445, + 35233 - 11904: 0xE444, + 35234 - 11904: 0xE7CE, + 35235 - 11904: 0xE7D0, + 35236 - 11904: 0xE7CF, + 35237 - 11904: 0x9B58, + 35238 - 11904: 0xBFCC, + 35239 - 11904: 0x8FCD, + 35241 - 11904: 0xA0D4, + 35242 - 11904: 0xBFCB, + 35244 - 11904: 0xC1BB, + 35245 - 11904: 0xEE79, + 35246 - 11904: 0xEE7B, + 35247 - 11904: 0xEE7A, + 35250 - 11904: 0xC2D1, + 35254 - 11904: 0xF2F4, + 35255 - 11904: 0xF2F3, + 35257 - 11904: 0xF4CC, + 35258 - 11904: 0xC4B1, + 35260 - 11904: 0x8FCE, + 35261 - 11904: 0xC4FD, + 35262 - 11904: 0xF754, + 35263 - 11904: 0xF753, + 35264 - 11904: 0xC65B, + 35265 - 11904: 0x8BE5, + 35270 - 11904: 0x8979, + 35282 - 11904: 0xA8A4, + 35283 - 11904: 0xD0AF, + 35284 - 11904: 0xAD6F, + 35285 - 11904: 0xD7C8, + 35286 - 11904: 0xD7C6, + 35289 - 11904: 0xD7C7, + 35290 - 11904: 0xDBD4, + 35291 - 11904: 0xDBD5, + 35292 - 11904: 0xE043, + 35293 - 11904: 0xDBD3, + 35295 - 11904: 0xDFFC, + 35296 - 11904: 0xE041, + 35297 - 11904: 0xE040, + 35298 - 11904: 0xE042, + 35299 - 11904: 0xB8D1, + 35300 - 11904: 0xDFFE, + 35301 - 11904: 0xDFFD, + 35302 - 11904: 0xE044, + 35303 - 11904: 0x8FD0, + 35304 - 11904: 0xE449, + 35305 - 11904: 0xE447, + 35307 - 11904: 0xE448, + 35308 - 11904: 0xE7D3, + 35309 - 11904: 0xE7D1, + 35312 - 11904: 0xE7D2, + 35313 - 11904: 0xEB7D, + 35314 - 11904: 0xEE7C, + 35315 - 11904: 0xEE7D, + 35316 - 11904: 0xC2D2, + 35318 - 11904: 0xF2F5, + 35319 - 11904: 0xF4CD, + 35320 - 11904: 0xC4B2, + 35322 - 11904: 0xF64C, + 35323 - 11904: 0xF755, + 35324 - 11904: 0xC5A9, + 35326 - 11904: 0xF7FE, + 35327 - 11904: 0xF94C, + 35328 - 11904: 0xA8A5, + 35330 - 11904: 0xAD71, + 35331 - 11904: 0xAD72, + 35332 - 11904: 0xD0B0, + 35335 - 11904: 0xD0B1, + 35336 - 11904: 0xAD70, + 35338 - 11904: 0xB054, + 35340 - 11904: 0xB052, + 35342 - 11904: 0xB051, + 35343 - 11904: 0xB058, + 35344 - 11904: 0xB050, + 35345 - 11904: 0xB059, + 35346 - 11904: 0xD3DD, + 35347 - 11904: 0xB056, + 35349 - 11904: 0xB053, + 35350 - 11904: 0xB057, + 35351 - 11904: 0xB055, + 35352 - 11904: 0xB04F, + 35355 - 11904: 0xB35F, + 35356 - 11904: 0x95B6, + 35357 - 11904: 0xB359, + 35358 - 11904: 0xD7CC, + 35359 - 11904: 0xB35E, + 35362 - 11904: 0xB360, + 35363 - 11904: 0xB35A, + 35365 - 11904: 0xB35B, + 35367 - 11904: 0xD7CA, + 35369 - 11904: 0x99D6, + 35370 - 11904: 0xB358, + 35371 - 11904: 0x95E5, + 35372 - 11904: 0xD7CB, + 35373 - 11904: 0xB35D, + 35376 - 11904: 0xD7C9, + 35377 - 11904: 0xB35C, + 35380 - 11904: 0xB644, + 35382 - 11904: 0xB646, + 35384 - 11904: 0x99D7, + 35385 - 11904: 0xDBD8, + 35386 - 11904: 0xB645, + 35387 - 11904: 0xB5F9, + 35388 - 11904: 0xB5FD, + 35389 - 11904: 0x95B5, + 35390 - 11904: 0xB8E4, + 35391 - 11904: 0xE049, + 35392 - 11904: 0xDBDA, + 35393 - 11904: 0xB5FE, + 35396 - 11904: 0xDBDD, + 35397 - 11904: 0xDBDE, + 35398 - 11904: 0xB643, + 35400 - 11904: 0xDBE0, + 35401 - 11904: 0xA0CA, + 35402 - 11904: 0xDBE2, + 35404 - 11904: 0xDBE3, + 35405 - 11904: 0xDBD7, + 35406 - 11904: 0xDBD6, + 35407 - 11904: 0xDBE4, + 35408 - 11904: 0xB642, + 35409 - 11904: 0xDBE1, + 35410 - 11904: 0xDBDF, + 35412 - 11904: 0xB640, + 35413 - 11904: 0xB5FB, + 35414 - 11904: 0xB647, + 35415 - 11904: 0xDBDB, + 35416 - 11904: 0xDBDC, + 35417 - 11904: 0xDBD9, + 35419 - 11904: 0xB641, + 35422 - 11904: 0xB5FC, + 35424 - 11904: 0xB5FA, + 35425 - 11904: 0xE048, + 35426 - 11904: 0xB8DF, + 35427 - 11904: 0xB8DA, + 35430 - 11904: 0xB8D5, + 35431 - 11904: 0x9FFD, + 35432 - 11904: 0xB8E5, + 35433 - 11904: 0xB8D6, + 35435 - 11904: 0xB8D2, + 35436 - 11904: 0xB8E1, + 35437 - 11904: 0xB8DE, + 35438 - 11904: 0xB8E0, + 35440 - 11904: 0xB8D7, + 35441 - 11904: 0xB8DC, + 35442 - 11904: 0xB8D3, + 35443 - 11904: 0xB8D4, + 35444 - 11904: 0xE050, + 35445 - 11904: 0xE04D, + 35446 - 11904: 0xE045, + 35447 - 11904: 0xE04A, + 35449 - 11904: 0xB8E2, + 35450 - 11904: 0xE051, + 35451 - 11904: 0xB8E3, + 35452 - 11904: 0xB8D9, + 35454 - 11904: 0xA058, + 35455 - 11904: 0xE047, + 35457 - 11904: 0xE04F, + 35458 - 11904: 0xE04B, + 35459 - 11904: 0xE04E, + 35460 - 11904: 0xE04C, + 35461 - 11904: 0xB8DD, + 35462 - 11904: 0xE046, + 35463 - 11904: 0xB8D8, + 35467 - 11904: 0xE44C, + 35468 - 11904: 0xBB78, + 35469 - 11904: 0xBB7B, + 35471 - 11904: 0xE44E, + 35472 - 11904: 0x8FD6, + 35473 - 11904: 0xBBA5, + 35474 - 11904: 0xE44D, + 35475 - 11904: 0xBB7D, + 35476 - 11904: 0x99D8, + 35477 - 11904: 0xBDCF, + 35478 - 11904: 0xE44F, + 35480 - 11904: 0xBBA4, + 35481 - 11904: 0xE44B, + 35482 - 11904: 0xBBA6, + 35484 - 11904: 0x8FD3, + 35486 - 11904: 0xBB79, + 35488 - 11904: 0xB8DB, + 35489 - 11904: 0xBB7C, + 35491 - 11904: 0xBB7A, + 35492 - 11904: 0xBB7E, + 35493 - 11904: 0xBBA2, + 35494 - 11904: 0xBB77, + 35495 - 11904: 0xBBA7, + 35496 - 11904: 0xBBA3, + 35497 - 11904: 0x8FE5, + 35498 - 11904: 0xBBA1, + 35499 - 11904: 0xE44A, + 35503 - 11904: 0x8FE9, + 35504 - 11904: 0xBDD6, + 35506 - 11904: 0xBDD2, + 35508 - 11904: 0x99D9, + 35510 - 11904: 0xBDD9, + 35512 - 11904: 0xE7D6, + 35513 - 11904: 0xBDDA, + 35514 - 11904: 0xE7E2, + 35515 - 11904: 0xE7DB, + 35516 - 11904: 0xBDCB, + 35517 - 11904: 0xE7E3, + 35518 - 11904: 0xE7DD, + 35519 - 11904: 0xBDD5, + 35520 - 11904: 0xE7DE, + 35522 - 11904: 0xBDD4, + 35523 - 11904: 0xE7E1, + 35524 - 11904: 0xBDCE, + 35525 - 11904: 0xE7DF, + 35526 - 11904: 0xE7D5, + 35527 - 11904: 0xBDCD, + 35528 - 11904: 0xEBAA, + 35529 - 11904: 0xBDD3, + 35531 - 11904: 0xBDD0, + 35532 - 11904: 0x8CF7, + 35533 - 11904: 0xBDD8, + 35535 - 11904: 0xE7D4, + 35537 - 11904: 0xE7D8, + 35538 - 11904: 0xBDCC, + 35539 - 11904: 0xE7D7, + 35540 - 11904: 0xE7D9, + 35541 - 11904: 0xE7DA, + 35542 - 11904: 0xBDD7, + 35543 - 11904: 0xE7DC, + 35544 - 11904: 0xE7E0, + 35545 - 11904: 0xE7E4, + 35546 - 11904: 0x927C, + 35547 - 11904: 0xBDDB, + 35548 - 11904: 0xBFD2, + 35549 - 11904: 0xEBA5, + 35550 - 11904: 0xEBAB, + 35551 - 11904: 0xEBA8, + 35552 - 11904: 0xEB7E, + 35553 - 11904: 0xEBAC, + 35554 - 11904: 0xEBA1, + 35556 - 11904: 0xEBA7, + 35558 - 11904: 0xBFCD, + 35559 - 11904: 0xBFD3, + 35560 - 11904: 0xEBAD, + 35562 - 11904: 0x9C45, + 35563 - 11904: 0xBFCF, + 35565 - 11904: 0xBFD9, + 35566 - 11904: 0xBFD4, + 35567 - 11904: 0xEBAF, + 35568 - 11904: 0xEBA9, + 35569 - 11904: 0xBFD0, + 35570 - 11904: 0xEBA2, + 35571 - 11904: 0xBFDA, + 35572 - 11904: 0xEBA3, + 35573 - 11904: 0xEBA4, + 35574 - 11904: 0xBFDB, + 35575 - 11904: 0xBFD8, + 35576 - 11904: 0xBDD1, + 35577 - 11904: 0x8CE8, + 35578 - 11904: 0xBFCE, + 35579 - 11904: 0xEBB0, + 35580 - 11904: 0xBFDC, + 35582 - 11904: 0xBFD5, + 35583 - 11904: 0xEBAE, + 35584 - 11904: 0xBFD1, + 35585 - 11904: 0xBFD6, + 35586 - 11904: 0xBFD7, + 35588 - 11904: 0xC1C3, + 35589 - 11904: 0xEEA4, + 35590 - 11904: 0xEEAD, + 35591 - 11904: 0xEEAA, + 35592 - 11904: 0xEEAC, + 35594 - 11904: 0xC1C0, + 35595 - 11904: 0xEEA5, + 35596 - 11904: 0x8FDE, + 35597 - 11904: 0xEEAB, + 35598 - 11904: 0xC1BC, + 35599 - 11904: 0xEEA7, + 35600 - 11904: 0xC1C4, + 35601 - 11904: 0xEEA3, + 35602 - 11904: 0xEEA8, + 35603 - 11904: 0xEEAF, + 35604 - 11904: 0xEBA6, + 35605 - 11904: 0xEEA9, + 35606 - 11904: 0xEEA2, + 35607 - 11904: 0xC1BD, + 35608 - 11904: 0xEEA1, + 35609 - 11904: 0xC1BE, + 35610 - 11904: 0xEEB0, + 35611 - 11904: 0xC1BF, + 35612 - 11904: 0xEEAE, + 35613 - 11904: 0xC1C2, + 35614 - 11904: 0xEE7E, + 35615 - 11904: 0x8FDF, + 35616 - 11904: 0xC1C1, + 35618 - 11904: 0xEEA6, + 35619 - 11904: 0xF0DC, + 35620 - 11904: 0xF0EA, + 35621 - 11904: 0xF0E5, + 35622 - 11904: 0xF0E7, + 35623 - 11904: 0xF0DB, + 35624 - 11904: 0xC2D3, + 35626 - 11904: 0xF0DA, + 35627 - 11904: 0xC2D6, + 35628 - 11904: 0xC2D5, + 35629 - 11904: 0xA04B, + 35630 - 11904: 0xF0E9, + 35631 - 11904: 0xF0E1, + 35632 - 11904: 0xF0DE, + 35633 - 11904: 0xF0E4, + 35635 - 11904: 0xF0DD, + 35637 - 11904: 0xF0DF, + 35638 - 11904: 0xF0E8, + 35639 - 11904: 0xF0E6, + 35641 - 11904: 0xC2D4, + 35642 - 11904: 0xF0ED, + 35643 - 11904: 0xF0EB, + 35644 - 11904: 0xF0E2, + 35645 - 11904: 0xF0EC, + 35646 - 11904: 0xF0E3, + 35647 - 11904: 0x8FE2, + 35648 - 11904: 0xF2F9, + 35649 - 11904: 0xC3CF, + 35650 - 11904: 0xF341, + 35651 - 11904: 0xA0CC, + 35653 - 11904: 0xF64F, + 35654 - 11904: 0xC3D6, + 35655 - 11904: 0xF0E0, + 35656 - 11904: 0xF2F7, + 35657 - 11904: 0xC3D2, + 35658 - 11904: 0xF2F8, + 35659 - 11904: 0xF2FD, + 35660 - 11904: 0x8FE3, + 35661 - 11904: 0x8FE4, + 35662 - 11904: 0xC3D4, + 35663 - 11904: 0xC3D5, + 35664 - 11904: 0xF2F6, + 35665 - 11904: 0xF340, + 35666 - 11904: 0xF342, + 35667 - 11904: 0xF2FA, + 35668 - 11904: 0xF2FC, + 35669 - 11904: 0xF2FE, + 35670 - 11904: 0xF2FB, + 35671 - 11904: 0xF343, + 35672 - 11904: 0xC3D1, + 35673 - 11904: 0xC3D7, + 35674 - 11904: 0xC3D3, + 35676 - 11904: 0xC3D0, + 35677 - 11904: 0xF4D0, + 35678 - 11904: 0x9BC4, + 35679 - 11904: 0xC4B7, + 35680 - 11904: 0xF4CE, + 35682 - 11904: 0x9BFC, + 35683 - 11904: 0xF4D2, + 35685 - 11904: 0xF4D3, + 35686 - 11904: 0xC4B5, + 35687 - 11904: 0xF4D4, + 35688 - 11904: 0xF4D1, + 35689 - 11904: 0x964C, + 35690 - 11904: 0xF4CF, + 35691 - 11904: 0xC4B8, + 35692 - 11904: 0xC4B4, + 35693 - 11904: 0xF4D5, + 35695 - 11904: 0xC4B6, + 35696 - 11904: 0xC4B3, + 35700 - 11904: 0xC4FE, + 35703 - 11904: 0xC540, + 35704 - 11904: 0xF64E, + 35705 - 11904: 0xF64D, + 35706 - 11904: 0xF650, + 35707 - 11904: 0xF651, + 35709 - 11904: 0xC541, + 35710 - 11904: 0xF756, + 35711 - 11904: 0xF75B, + 35712 - 11904: 0xC5AA, + 35713 - 11904: 0x9AF6, + 35714 - 11904: 0xF758, + 35715 - 11904: 0x8CAE, + 35716 - 11904: 0xF757, + 35717 - 11904: 0xF75A, + 35718 - 11904: 0xF759, + 35720 - 11904: 0xF843, + 35722 - 11904: 0xC5DC, + 35723 - 11904: 0xF842, + 35724 - 11904: 0xF840, + 35726 - 11904: 0xF841, + 35727 - 11904: 0x87CB, + 35728 - 11904: 0x8FE7, + 35730 - 11904: 0xC5FE, + 35731 - 11904: 0xC5FD, + 35732 - 11904: 0xF8C1, + 35733 - 11904: 0xF8C2, + 35734 - 11904: 0xC640, + 35736 - 11904: 0xF94D, + 35737 - 11904: 0xF94E, + 35738 - 11904: 0xC667, + 35739 - 11904: 0x8FE8, + 35740 - 11904: 0xC66D, + 35742 - 11904: 0xF9A9, + 35743 - 11904: 0xF9C8, + 35744 - 11904: 0x8BE7, + 35774 - 11904: 0x897A, + 35810 - 11904: 0x897B, + 35895 - 11904: 0xA8A6, + 35897 - 11904: 0xD7CD, + 35899 - 11904: 0xD7CE, + 35900 - 11904: 0xE052, + 35901 - 11904: 0xE450, + 35902 - 11904: 0xE7E5, + 35903 - 11904: 0xC1C6, + 35905 - 11904: 0xC1C5, + 35906 - 11904: 0xF0EE, + 35907 - 11904: 0xF344, + 35909 - 11904: 0xF844, + 35910 - 11904: 0xA8A7, + 35911 - 11904: 0xD3DE, + 35912 - 11904: 0xB05A, + 35913 - 11904: 0xB361, + 35914 - 11904: 0xE054, + 35915 - 11904: 0xE053, + 35916 - 11904: 0xBDDC, + 35917 - 11904: 0xE7E6, + 35918 - 11904: 0xBDDD, + 35919 - 11904: 0xEEB1, + 35920 - 11904: 0xC2D7, + 35921 - 11904: 0x99DA, + 35924 - 11904: 0xC676, + 35925 - 11904: 0xA8A8, + 35926 - 11904: 0xCDCB, + 35927 - 11904: 0xD3DF, + 35930 - 11904: 0xB362, + 35932 - 11904: 0xD7CF, + 35933 - 11904: 0xD7D0, + 35935 - 11904: 0xDBE5, + 35937 - 11904: 0xB648, + 35938 - 11904: 0xB8E6, + 35940 - 11904: 0xE056, + 35941 - 11904: 0xE055, + 35942 - 11904: 0xE057, + 35944 - 11904: 0xE451, + 35945 - 11904: 0xE452, + 35946 - 11904: 0xBBA8, + 35947 - 11904: 0xBFDD, + 35948 - 11904: 0xBDDE, + 35949 - 11904: 0xBFDE, + 35951 - 11904: 0xEEB5, + 35952 - 11904: 0xEEB2, + 35953 - 11904: 0xEEB4, + 35954 - 11904: 0xEEB3, + 35955 - 11904: 0xC1C7, + 35957 - 11904: 0xF0EF, + 35958 - 11904: 0xF346, + 35959 - 11904: 0xF345, + 35960 - 11904: 0xCBA4, + 35961 - 11904: 0xB05C, + 35962 - 11904: 0xB05B, + 35963 - 11904: 0xD3E0, + 35965 - 11904: 0xD7D1, + 35968 - 11904: 0xDBE7, + 35969 - 11904: 0xDBE6, + 35970 - 11904: 0xB649, + 35972 - 11904: 0xE059, + 35973 - 11904: 0xE05A, + 35974 - 11904: 0xE058, + 35977 - 11904: 0xB8E8, + 35978 - 11904: 0xB8E7, + 35980 - 11904: 0xBBAA, + 35981 - 11904: 0xBBA9, + 35983 - 11904: 0xE7E7, + 35984 - 11904: 0xEBB3, + 35985 - 11904: 0xEBB1, + 35986 - 11904: 0xEBB2, + 35987 - 11904: 0xBFDF, + 35988 - 11904: 0xEEB7, + 35989 - 11904: 0xEEB6, + 35991 - 11904: 0xF0F2, + 35992 - 11904: 0xF0F1, + 35993 - 11904: 0xF0F0, + 35994 - 11904: 0xF347, + 35995 - 11904: 0x8FED, + 35996 - 11904: 0xF9AA, + 35997 - 11904: 0xA8A9, + 35998 - 11904: 0xAD73, + 35999 - 11904: 0x95C0, + 36000 - 11904: 0xAD74, + 36001 - 11904: 0xB05D, + 36002 - 11904: 0xB05E, + 36003 - 11904: 0xD3E2, + 36004 - 11904: 0xD3E1, + 36005 - 11904: 0xD7D2, + 36007 - 11904: 0xB368, + 36008 - 11904: 0xB366, + 36009 - 11904: 0xB363, + 36010 - 11904: 0xB367, + 36011 - 11904: 0xB365, + 36012 - 11904: 0xB364, + 36013 - 11904: 0xA0CB, + 36015 - 11904: 0xB64A, + 36016 - 11904: 0xDBEA, + 36018 - 11904: 0xB8ED, + 36019 - 11904: 0xB64C, + 36020 - 11904: 0xB651, + 36021 - 11904: 0xDBEC, + 36022 - 11904: 0xB653, + 36023 - 11904: 0xB652, + 36024 - 11904: 0xB655, + 36025 - 11904: 0xDBEB, + 36026 - 11904: 0xDBE8, + 36027 - 11904: 0xB64F, + 36028 - 11904: 0xB64B, + 36029 - 11904: 0xB64D, + 36030 - 11904: 0xDBE9, + 36031 - 11904: 0xB654, + 36032 - 11904: 0xB650, + 36033 - 11904: 0xB64E, + 36034 - 11904: 0xB8EF, + 36035 - 11904: 0xB8EE, + 36036 - 11904: 0xB8EC, + 36037 - 11904: 0xB8F0, + 36039 - 11904: 0xB8EA, + 36040 - 11904: 0xB8EB, + 36042 - 11904: 0xB8E9, + 36044 - 11904: 0xE05B, + 36045 - 11904: 0x9E48, + 36047 - 11904: 0xE454, + 36049 - 11904: 0xBBAC, + 36050 - 11904: 0xBBAD, + 36051 - 11904: 0xBBAB, + 36052 - 11904: 0x99DB, + 36053 - 11904: 0xE453, + 36054 - 11904: 0x8FF3, + 36055 - 11904: 0xE455, + 36057 - 11904: 0xE7EA, + 36058 - 11904: 0xE7EC, + 36059 - 11904: 0x8FF9, + 36060 - 11904: 0xBDE7, + 36061 - 11904: 0xE7ED, + 36062 - 11904: 0xBDE0, + 36063 - 11904: 0xE7E9, + 36064 - 11904: 0xBDDF, + 36065 - 11904: 0xBDE9, + 36066 - 11904: 0xBDE5, + 36067 - 11904: 0xBDE6, + 36068 - 11904: 0xBDE2, + 36069 - 11904: 0xE7E8, + 36070 - 11904: 0xBDE1, + 36071 - 11904: 0xE7EE, + 36072 - 11904: 0xE7EB, + 36073 - 11904: 0x95C1, + 36074 - 11904: 0xBDE8, + 36075 - 11904: 0xA04E, + 36076 - 11904: 0xBDE3, + 36077 - 11904: 0xBDE4, + 36078 - 11904: 0xEBB5, + 36080 - 11904: 0xEBB7, + 36081 - 11904: 0xEBB6, + 36082 - 11904: 0x99DC, + 36083 - 11904: 0xEBB8, + 36084 - 11904: 0xBFE0, + 36085 - 11904: 0xEBB4, + 36087 - 11904: 0xA064, + 36088 - 11904: 0xC1CB, + 36089 - 11904: 0xEEB8, + 36090 - 11904: 0xC1C8, + 36091 - 11904: 0xC1CC, + 36092 - 11904: 0xC1CA, + 36093 - 11904: 0xC1C9, + 36094 - 11904: 0xF0F3, + 36096 - 11904: 0xF0F6, + 36098 - 11904: 0xF0F5, + 36099 - 11904: 0x8FF7, + 36100 - 11904: 0xF0F4, + 36101 - 11904: 0xC2D8, + 36102 - 11904: 0xF348, + 36103 - 11904: 0xF349, + 36104 - 11904: 0xC3D8, + 36105 - 11904: 0xF34A, + 36106 - 11904: 0xC3D9, + 36107 - 11904: 0x89B0, + 36108 - 11904: 0xA048, + 36109 - 11904: 0xC4BA, + 36111 - 11904: 0xC4B9, + 36112 - 11904: 0xF652, + 36113 - 11904: 0x8FFB, + 36114 - 11904: 0x8FF6, + 36115 - 11904: 0xC542, + 36116 - 11904: 0xF653, + 36117 - 11904: 0xF75C, + 36118 - 11904: 0xC5AB, + 36119 - 11904: 0xC5AC, + 36120 - 11904: 0x9DDC, + 36121 - 11904: 0xF845, + 36123 - 11904: 0xC642, + 36124 - 11904: 0x99DD, + 36125 - 11904: 0x8BE8, + 36196 - 11904: 0xA8AA, + 36198 - 11904: 0xB36A, + 36199 - 11904: 0xB369, + 36200 - 11904: 0xE05C, + 36201 - 11904: 0xE05D, + 36203 - 11904: 0xBBAE, + 36204 - 11904: 0xEBB9, + 36205 - 11904: 0xBDEA, + 36206 - 11904: 0xEBBA, + 36207 - 11904: 0xEEB9, + 36208 - 11904: 0xA8AB, + 36210 - 11904: 0xD0B2, + 36211 - 11904: 0xAD76, + 36212 - 11904: 0xAD75, + 36214 - 11904: 0xD3E3, + 36215 - 11904: 0xB05F, + 36216 - 11904: 0xD3E4, + 36217 - 11904: 0xD7D5, + 36218 - 11904: 0x92C1, + 36219 - 11904: 0xD7D4, + 36221 - 11904: 0xD7D3, + 36224 - 11904: 0xDBEE, + 36225 - 11904: 0xB658, + 36226 - 11904: 0x9FD6, + 36228 - 11904: 0xDBED, + 36229 - 11904: 0xB657, + 36233 - 11904: 0xDBEF, + 36234 - 11904: 0xB656, + 36236 - 11904: 0xE05F, + 36237 - 11904: 0xE062, + 36238 - 11904: 0xE060, + 36239 - 11904: 0xE061, + 36240 - 11904: 0xE065, + 36241 - 11904: 0xE05E, + 36242 - 11904: 0xE066, + 36243 - 11904: 0xE063, + 36244 - 11904: 0xE064, + 36245 - 11904: 0xBBB0, + 36246 - 11904: 0xE456, + 36249 - 11904: 0xBBAF, + 36251 - 11904: 0xE7F2, + 36252 - 11904: 0xE7F0, + 36255 - 11904: 0xBDEB, + 36256 - 11904: 0xE7EF, + 36257 - 11904: 0xE7F1, + 36259 - 11904: 0xBDEC, + 36261 - 11904: 0xEBBB, + 36262 - 11904: 0xA0D2, + 36263 - 11904: 0xEBBC, + 36264 - 11904: 0xC1CD, + 36265 - 11904: 0x9040, + 36266 - 11904: 0xF34C, + 36267 - 11904: 0xF34E, + 36268 - 11904: 0xF34B, + 36269 - 11904: 0xF34D, + 36270 - 11904: 0xF4D6, + 36271 - 11904: 0xF654, + 36274 - 11904: 0xF96F, + 36275 - 11904: 0xA8AC, + 36276 - 11904: 0xAD77, + 36277 - 11904: 0xD3E5, + 36278 - 11904: 0xD3E7, + 36279 - 11904: 0xD3E6, + 36281 - 11904: 0xD7D8, + 36282 - 11904: 0xB36C, + 36284 - 11904: 0xD7D6, + 36286 - 11904: 0xB36B, + 36287 - 11904: 0xD7D9, + 36288 - 11904: 0x8AC4, + 36289 - 11904: 0xD7DA, + 36290 - 11904: 0xD7D7, + 36291 - 11904: 0x99E0, + 36293 - 11904: 0xDBFB, + 36294 - 11904: 0xB660, + 36295 - 11904: 0xDBF3, + 36296 - 11904: 0xDBF9, + 36299 - 11904: 0xB65B, + 36300 - 11904: 0xB65E, + 36301 - 11904: 0xDBF2, + 36302 - 11904: 0xB659, + 36303 - 11904: 0xDBF6, + 36304 - 11904: 0xE06C, + 36305 - 11904: 0xB65D, + 36307 - 11904: 0xDBF1, + 36308 - 11904: 0x9FF0, + 36309 - 11904: 0xDBF7, + 36310 - 11904: 0xDBF4, + 36311 - 11904: 0xDBFA, + 36312 - 11904: 0xDBF0, + 36313 - 11904: 0xDBF8, + 36314 - 11904: 0xB65C, + 36315 - 11904: 0xB65F, + 36316 - 11904: 0xDBF5, + 36317 - 11904: 0xB65A, + 36319 - 11904: 0xB8F2, + 36320 - 11904: 0xE068, + 36321 - 11904: 0xB8F1, + 36322 - 11904: 0xE06F, + 36323 - 11904: 0xE06E, + 36324 - 11904: 0xB8F8, + 36326 - 11904: 0xB8F9, + 36327 - 11904: 0xE070, + 36328 - 11904: 0xB8F3, + 36329 - 11904: 0xE06D, + 36330 - 11904: 0xB8F7, + 36331 - 11904: 0xE072, + 36332 - 11904: 0xE069, + 36334 - 11904: 0xE06B, + 36335 - 11904: 0xB8F4, + 36336 - 11904: 0xE067, + 36337 - 11904: 0xE06A, + 36338 - 11904: 0xE071, + 36339 - 11904: 0xB8F5, + 36340 - 11904: 0xE073, + 36346 - 11904: 0xB8F6, + 36348 - 11904: 0xBBB1, + 36349 - 11904: 0xE45B, + 36350 - 11904: 0xE461, + 36351 - 11904: 0xE459, + 36352 - 11904: 0xE462, + 36353 - 11904: 0x9FF3, + 36354 - 11904: 0xE458, + 36355 - 11904: 0xE45D, + 36356 - 11904: 0xE463, + 36357 - 11904: 0xE460, + 36358 - 11904: 0xE45F, + 36359 - 11904: 0xE45E, + 36361 - 11904: 0xE457, + 36362 - 11904: 0xE45C, + 36365 - 11904: 0xE45A, + 36366 - 11904: 0x9DBF, + 36367 - 11904: 0xBDF1, + 36368 - 11904: 0xBDEE, + 36369 - 11904: 0xE7FB, + 36370 - 11904: 0xE841, + 36371 - 11904: 0xE843, + 36372 - 11904: 0xE840, + 36373 - 11904: 0xE7F8, + 36374 - 11904: 0xE7FA, + 36375 - 11904: 0xE845, + 36376 - 11904: 0xE842, + 36377 - 11904: 0xE7FC, + 36378 - 11904: 0xE846, + 36379 - 11904: 0xE7F9, + 36380 - 11904: 0xE844, + 36381 - 11904: 0xBDEF, + 36382 - 11904: 0xBDF5, + 36383 - 11904: 0xBDF3, + 36384 - 11904: 0xE7F3, + 36385 - 11904: 0xBDF4, + 36386 - 11904: 0xBDF0, + 36387 - 11904: 0xE7F4, + 36388 - 11904: 0xE7F6, + 36389 - 11904: 0xE7F5, + 36390 - 11904: 0xE7FD, + 36391 - 11904: 0xE7FE, + 36392 - 11904: 0x9FF6, + 36393 - 11904: 0xBDF2, + 36394 - 11904: 0x95C8, + 36395 - 11904: 0xBDED, + 36397 - 11904: 0x9E5A, + 36398 - 11904: 0xE7F7, + 36400 - 11904: 0xEBC6, + 36401 - 11904: 0xBFE2, + 36403 - 11904: 0xEBBD, + 36404 - 11904: 0xBFE3, + 36405 - 11904: 0xBFE6, + 36406 - 11904: 0xEBC2, + 36408 - 11904: 0xEBBF, + 36409 - 11904: 0xBFE5, + 36410 - 11904: 0x99E3, + 36412 - 11904: 0xEBC3, + 36413 - 11904: 0xEBC4, + 36414 - 11904: 0xEBBE, + 36415 - 11904: 0xEBC7, + 36416 - 11904: 0xEBC0, + 36417 - 11904: 0xEBC5, + 36418 - 11904: 0xBFE4, + 36420 - 11904: 0xBFE1, + 36421 - 11904: 0xEBC1, + 36422 - 11904: 0x8A4A, + 36423 - 11904: 0xEEBF, + 36424 - 11904: 0xC1D0, + 36425 - 11904: 0xC1CE, + 36426 - 11904: 0xC1D1, + 36427 - 11904: 0xC1CF, + 36428 - 11904: 0xEEBE, + 36429 - 11904: 0xEEBB, + 36430 - 11904: 0xEEBA, + 36431 - 11904: 0x9FF1, + 36432 - 11904: 0xEEBD, + 36435 - 11904: 0xEEBC, + 36436 - 11904: 0xF145, + 36437 - 11904: 0xC2DE, + 36438 - 11904: 0xF0FB, + 36439 - 11904: 0xF0FA, + 36441 - 11904: 0xC2D9, + 36442 - 11904: 0xF141, + 36443 - 11904: 0xF140, + 36444 - 11904: 0xF0F7, + 36445 - 11904: 0xF143, + 36446 - 11904: 0xF0FC, + 36447 - 11904: 0xC2DD, + 36448 - 11904: 0xF0F9, + 36449 - 11904: 0xF142, + 36450 - 11904: 0xF0F8, + 36451 - 11904: 0xC2DA, + 36452 - 11904: 0xC2DC, + 36453 - 11904: 0xF0FD, + 36454 - 11904: 0xC2DB, + 36455 - 11904: 0xF0FE, + 36456 - 11904: 0x8AA7, + 36457 - 11904: 0xF144, + 36458 - 11904: 0xF352, + 36460 - 11904: 0xC3DE, + 36461 - 11904: 0xF34F, + 36463 - 11904: 0xF353, + 36465 - 11904: 0x99E6, + 36466 - 11904: 0xC3DB, + 36467 - 11904: 0xF351, + 36468 - 11904: 0xC3E0, + 36469 - 11904: 0x9FF7, + 36470 - 11904: 0xC3DD, + 36471 - 11904: 0x9FED, + 36472 - 11904: 0xF350, + 36474 - 11904: 0xC3DF, + 36475 - 11904: 0xF354, + 36476 - 11904: 0xC3DA, + 36478 - 11904: 0x8A5C, + 36480 - 11904: 0x9DAE, + 36481 - 11904: 0xC4BC, + 36482 - 11904: 0xC4BE, + 36484 - 11904: 0xF4D9, + 36485 - 11904: 0xC4BD, + 36486 - 11904: 0xF4D7, + 36487 - 11904: 0xC3DC, + 36488 - 11904: 0xF4D8, + 36489 - 11904: 0xC4BB, + 36490 - 11904: 0xC543, + 36491 - 11904: 0xC545, + 36492 - 11904: 0xF656, + 36493 - 11904: 0xC544, + 36494 - 11904: 0xF655, + 36496 - 11904: 0xF761, + 36497 - 11904: 0xC5AD, + 36498 - 11904: 0xF760, + 36499 - 11904: 0xC5AE, + 36500 - 11904: 0xF75E, + 36501 - 11904: 0xF75D, + 36502 - 11904: 0xF762, + 36503 - 11904: 0xF763, + 36504 - 11904: 0xF846, + 36506 - 11904: 0xF75F, + 36509 - 11904: 0xF8C6, + 36510 - 11904: 0xF8C3, + 36511 - 11904: 0xF8C4, + 36512 - 11904: 0xF8C5, + 36513 - 11904: 0xC65C, + 36515 - 11904: 0xF951, + 36516 - 11904: 0xF950, + 36517 - 11904: 0xF94F, + 36518 - 11904: 0xF970, + 36519 - 11904: 0x95C9, + 36520 - 11904: 0xF9BE, + 36521 - 11904: 0xF9AB, + 36522 - 11904: 0xC66E, + 36523 - 11904: 0xA8AD, + 36524 - 11904: 0xB060, + 36525 - 11904: 0x9048, + 36528 - 11904: 0x99E8, + 36530 - 11904: 0xB8FA, + 36534 - 11904: 0x9049, + 36537 - 11904: 0x8CBA, + 36538 - 11904: 0xBDF6, + 36540 - 11904: 0x90B1, + 36541 - 11904: 0xEBC8, + 36544 - 11904: 0xC2DF, + 36546 - 11904: 0xF355, + 36547 - 11904: 0x904A, + 36553 - 11904: 0xF9AC, + 36554 - 11904: 0xA8AE, + 36555 - 11904: 0xAAEE, + 36556 - 11904: 0xAD79, + 36557 - 11904: 0xAD78, + 36558 - 11904: 0x99EA, + 36559 - 11904: 0xB063, + 36561 - 11904: 0xD3E8, + 36562 - 11904: 0xB061, + 36563 - 11904: 0xD3E9, + 36564 - 11904: 0xB062, + 36567 - 11904: 0xD7DF, + 36568 - 11904: 0xD7DB, + 36570 - 11904: 0x9BD1, + 36571 - 11904: 0xB36D, + 36572 - 11904: 0xD7DE, + 36573 - 11904: 0xD7DD, + 36574 - 11904: 0xD7DC, + 36575 - 11904: 0xB36E, + 36576 - 11904: 0xD7E0, + 36577 - 11904: 0xD7E1, + 36578 - 11904: 0x99EB, + 36580 - 11904: 0x99EC, + 36581 - 11904: 0xDC43, + 36582 - 11904: 0xDC41, + 36583 - 11904: 0xDC45, + 36584 - 11904: 0xDC46, + 36585 - 11904: 0xDC4C, + 36587 - 11904: 0xDC48, + 36588 - 11904: 0xDC4A, + 36589 - 11904: 0x99ED, + 36590 - 11904: 0xDC42, + 36591 - 11904: 0xDBFC, + 36593 - 11904: 0xDC49, + 36594 - 11904: 0x99EE, + 36596 - 11904: 0xDC4B, + 36597 - 11904: 0xDC44, + 36598 - 11904: 0xDC47, + 36599 - 11904: 0xDBFD, + 36600 - 11904: 0xB662, + 36601 - 11904: 0xDC40, + 36602 - 11904: 0xDBFE, + 36603 - 11904: 0xB661, + 36604 - 11904: 0xB663, + 36606 - 11904: 0xB8FD, + 36607 - 11904: 0xE075, + 36608 - 11904: 0xE077, + 36609 - 11904: 0xE076, + 36610 - 11904: 0xE07B, + 36611 - 11904: 0xB8FB, + 36613 - 11904: 0xE078, + 36614 - 11904: 0xE074, + 36615 - 11904: 0xE079, + 36616 - 11904: 0xE07A, + 36617 - 11904: 0xB8FC, + 36618 - 11904: 0xB8FE, + 36619 - 11904: 0xE07C, + 36621 - 11904: 0xE467, + 36622 - 11904: 0xE466, + 36624 - 11904: 0xE464, + 36625 - 11904: 0xE465, + 36626 - 11904: 0xBBB3, + 36627 - 11904: 0xBBB5, + 36628 - 11904: 0xBBB2, + 36629 - 11904: 0xBBB4, + 36630 - 11904: 0xE84D, + 36631 - 11904: 0xE84E, + 36632 - 11904: 0xE849, + 36633 - 11904: 0x904C, + 36634 - 11904: 0xE84A, + 36635 - 11904: 0xBDF8, + 36636 - 11904: 0xBDFD, + 36637 - 11904: 0xBDF7, + 36638 - 11904: 0xBDFE, + 36639 - 11904: 0xBDF9, + 36640 - 11904: 0xE84B, + 36643 - 11904: 0xE84C, + 36644 - 11904: 0xE848, + 36645 - 11904: 0xBE40, + 36646 - 11904: 0xBDFB, + 36649 - 11904: 0xBDFA, + 36650 - 11904: 0xBDFC, + 36652 - 11904: 0xE847, + 36653 - 11904: 0x904D, + 36654 - 11904: 0xEBCA, + 36655 - 11904: 0xBFE8, + 36656 - 11904: 0x95CB, + 36658 - 11904: 0xEBCC, + 36659 - 11904: 0xBFEA, + 36660 - 11904: 0xEBCF, + 36661 - 11904: 0xEBCB, + 36662 - 11904: 0xEBC9, + 36663 - 11904: 0xEBCE, + 36664 - 11904: 0xBFE9, + 36665 - 11904: 0xEBCD, + 36667 - 11904: 0xBFE7, + 36670 - 11904: 0xC1D3, + 36671 - 11904: 0xC1D6, + 36672 - 11904: 0xEEC1, + 36673 - 11904: 0x97E2, + 36674 - 11904: 0xC1D4, + 36675 - 11904: 0xEEC0, + 36676 - 11904: 0xC1D2, + 36677 - 11904: 0xC1D5, + 36678 - 11904: 0xF146, + 36679 - 11904: 0xF147, + 36680 - 11904: 0xF148, + 36681 - 11904: 0xC2E0, + 36682 - 11904: 0x95CC, + 36683 - 11904: 0xF149, + 36685 - 11904: 0xC2E1, + 36686 - 11904: 0xC3E2, + 36687 - 11904: 0xF358, + 36688 - 11904: 0xF359, + 36689 - 11904: 0xF357, + 36690 - 11904: 0xF356, + 36691 - 11904: 0xF35A, + 36692 - 11904: 0xC3E1, + 36693 - 11904: 0xF4DD, + 36694 - 11904: 0xF4DB, + 36695 - 11904: 0xF4DC, + 36696 - 11904: 0xF4DE, + 36697 - 11904: 0xF4DA, + 36698 - 11904: 0xF4DF, + 36699 - 11904: 0xF658, + 36700 - 11904: 0x9F78, + 36701 - 11904: 0xF659, + 36702 - 11904: 0xF657, + 36703 - 11904: 0xC546, + 36704 - 11904: 0xF764, + 36705 - 11904: 0xC5AF, + 36706 - 11904: 0xF765, + 36707 - 11904: 0xF848, + 36708 - 11904: 0xF847, + 36710 - 11904: 0x897C, + 36711 - 11904: 0x897D, + 36718 - 11904: 0x897E, + 36755 - 11904: 0x995D, + 36763 - 11904: 0xA8AF, + 36764 - 11904: 0xB664, + 36767 - 11904: 0xB940, + 36768 - 11904: 0x9B5A, + 36771 - 11904: 0xBBB6, + 36773 - 11904: 0x9050, + 36774 - 11904: 0xBFEC, + 36775 - 11904: 0x8C4F, + 36776 - 11904: 0xBFEB, + 36781 - 11904: 0xC3E3, + 36782 - 11904: 0xC47C, + 36783 - 11904: 0xC547, + 36784 - 11904: 0xA8B0, + 36785 - 11904: 0xB064, + 36786 - 11904: 0xB941, + 36787 - 11904: 0x9054, + 36788 - 11904: 0xF35B, + 36789 - 11904: 0xC6D6, + 36790 - 11904: 0x9AA8, + 36791 - 11904: 0x99EF, + 36792 - 11904: 0xFEEB, + 36793 - 11904: 0x9DA3, + 36794 - 11904: 0x9DA1, + 36795 - 11904: 0x9943, + 36796 - 11904: 0x9945, + 36798 - 11904: 0x9D7D, + 36799 - 11904: 0xCBA6, + 36801 - 11904: 0x99F0, + 36802 - 11904: 0xA8B1, + 36804 - 11904: 0xA8B4, + 36805 - 11904: 0xA8B3, + 36806 - 11904: 0xA8B2, + 36809 - 11904: 0xCBA5, + 36810 - 11904: 0x99F1, + 36811 - 11904: 0xCDCD, + 36812 - 11904: 0x99F2, + 36813 - 11904: 0xCDCF, + 36814 - 11904: 0xAAEF, + 36815 - 11904: 0x8CBC, + 36816 - 11904: 0x9D60, + 36817 - 11904: 0xAAF1, + 36818 - 11904: 0xCDCC, + 36819 - 11904: 0xCDCE, + 36820 - 11904: 0xAAF0, + 36821 - 11904: 0xCDD1, + 36822 - 11904: 0xCDD0, + 36823 - 11904: 0xCDD2, + 36826 - 11904: 0xA0A3, + 36832 - 11904: 0xD0B6, + 36833 - 11904: 0xD0B4, + 36834 - 11904: 0xAD7C, + 36835 - 11904: 0xD0B3, + 36836 - 11904: 0xADA3, + 36837 - 11904: 0xAD7E, + 36838 - 11904: 0xAD7B, + 36840 - 11904: 0xADA4, + 36842 - 11904: 0xAD7D, + 36843 - 11904: 0xADA2, + 36845 - 11904: 0xADA1, + 36846 - 11904: 0xD0B5, + 36848 - 11904: 0xAD7A, + 36852 - 11904: 0xB06A, + 36853 - 11904: 0xD3EB, + 36854 - 11904: 0xD3F1, + 36855 - 11904: 0xB067, + 36856 - 11904: 0xB06E, + 36857 - 11904: 0x905B, + 36858 - 11904: 0xB069, + 36859 - 11904: 0xD3EE, + 36860 - 11904: 0xD3F0, + 36861 - 11904: 0xB06C, + 36862 - 11904: 0xD3EA, + 36863 - 11904: 0xD3ED, + 36864 - 11904: 0xB068, + 36865 - 11904: 0xB065, + 36866 - 11904: 0xD3EC, + 36867 - 11904: 0xB06B, + 36868 - 11904: 0xD3EF, + 36869 - 11904: 0xB06D, + 36870 - 11904: 0xB066, + 36872 - 11904: 0x9EDB, + 36875 - 11904: 0xD7E3, + 36876 - 11904: 0xD7E6, + 36877 - 11904: 0xB370, + 36879 - 11904: 0xB37A, + 36880 - 11904: 0xB376, + 36881 - 11904: 0xD7E4, + 36882 - 11904: 0x9D79, + 36884 - 11904: 0xB37E, + 36885 - 11904: 0xB377, + 36886 - 11904: 0xB37C, + 36887 - 11904: 0xB372, + 36889 - 11904: 0xB36F, + 36890 - 11904: 0xB371, + 36891 - 11904: 0xB37D, + 36892 - 11904: 0xD7E5, + 36893 - 11904: 0xB375, + 36894 - 11904: 0xB378, + 36895 - 11904: 0xB374, + 36896 - 11904: 0xB379, + 36897 - 11904: 0xD7E7, + 36898 - 11904: 0xB37B, + 36899 - 11904: 0xB373, + 36900 - 11904: 0xD7E2, + 36909 - 11904: 0xDC4D, + 36910 - 11904: 0xB665, + 36911 - 11904: 0xDC4F, + 36913 - 11904: 0xB667, + 36914 - 11904: 0xB669, + 36915 - 11904: 0x99F3, + 36916 - 11904: 0xDC4E, + 36917 - 11904: 0xB666, + 36918 - 11904: 0xB66A, + 36919 - 11904: 0x9062, + 36920 - 11904: 0xB668, + 36924 - 11904: 0xB947, + 36925 - 11904: 0xE0A3, + 36926 - 11904: 0xB94F, + 36927 - 11904: 0xE07E, + 36929 - 11904: 0xB950, + 36930 - 11904: 0xB945, + 36932 - 11904: 0xE0A1, + 36934 - 11904: 0x87BD, + 36935 - 11904: 0xB94A, + 36937 - 11904: 0xE0A2, + 36938 - 11904: 0xB943, + 36939 - 11904: 0xB942, + 36940 - 11904: 0x9F55, + 36941 - 11904: 0xB94D, + 36942 - 11904: 0xB94C, + 36943 - 11904: 0xB94B, + 36944 - 11904: 0xB949, + 36945 - 11904: 0xB94E, + 36946 - 11904: 0xE07D, + 36947 - 11904: 0xB944, + 36948 - 11904: 0xB946, + 36949 - 11904: 0xB948, + 36950 - 11904: 0x9BF9, + 36952 - 11904: 0xBBB8, + 36953 - 11904: 0xBBBB, + 36955 - 11904: 0xBBBF, + 36956 - 11904: 0xBBB9, + 36957 - 11904: 0xBBBE, + 36958 - 11904: 0xBBBC, + 36960 - 11904: 0xBBB7, + 36961 - 11904: 0x9065, + 36962 - 11904: 0xBBBD, + 36963 - 11904: 0xBBBA, + 36964 - 11904: 0x96E0, + 36967 - 11904: 0xE852, + 36968 - 11904: 0xBE43, + 36969 - 11904: 0xBE41, + 36971 - 11904: 0xE853, + 36972 - 11904: 0x98BE, + 36973 - 11904: 0xBE44, + 36974 - 11904: 0xBE42, + 36975 - 11904: 0xE851, + 36976 - 11904: 0xE850, + 36978 - 11904: 0xBFF0, + 36979 - 11904: 0xE84F, + 36980 - 11904: 0xBFEE, + 36981 - 11904: 0xBFED, + 36982 - 11904: 0xEBD0, + 36983 - 11904: 0xBE45, + 36984 - 11904: 0xBFEF, + 36985 - 11904: 0xEBD1, + 36986 - 11904: 0xBFF2, + 36987 - 11904: 0xEBD2, + 36988 - 11904: 0xBFF1, + 36989 - 11904: 0xC1D8, + 36990 - 11904: 0xEEC3, + 36991 - 11904: 0xC1D7, + 36992 - 11904: 0xC1DC, + 36993 - 11904: 0xC1DA, + 36994 - 11904: 0xC1DB, + 36995 - 11904: 0xC2E3, + 36996 - 11904: 0xC1D9, + 36997 - 11904: 0xEEC2, + 36998 - 11904: 0xEBD3, + 36999 - 11904: 0xC2E2, + 37000 - 11904: 0xC2E4, + 37002 - 11904: 0xC3E4, + 37003 - 11904: 0xC3E5, + 37005 - 11904: 0xF4E0, + 37007 - 11904: 0xC5DE, + 37008 - 11904: 0xC5DD, + 37009 - 11904: 0xA8B6, + 37012 - 11904: 0xCA55, + 37013 - 11904: 0xB06F, + 37015 - 11904: 0xCA52, + 37016 - 11904: 0xCA53, + 37017 - 11904: 0xCA51, + 37019 - 11904: 0xCA54, + 37022 - 11904: 0xCBAA, + 37023 - 11904: 0xCBA7, + 37024 - 11904: 0xCBAC, + 37025 - 11904: 0xCBA8, + 37026 - 11904: 0xA8B7, + 37027 - 11904: 0xA8BA, + 37029 - 11904: 0xCBA9, + 37030 - 11904: 0xA8B9, + 37031 - 11904: 0xCBAB, + 37032 - 11904: 0x9068, + 37034 - 11904: 0xA8B8, + 37038 - 11904: 0x906C, + 37039 - 11904: 0xCDD5, + 37040 - 11904: 0xCDD7, + 37041 - 11904: 0xAAF4, + 37042 - 11904: 0xCDD3, + 37043 - 11904: 0xCDD6, + 37044 - 11904: 0xCDD4, + 37045 - 11904: 0xAAF2, + 37046 - 11904: 0xAAF5, + 37048 - 11904: 0xAAF3, + 37051 - 11904: 0x95D8, + 37053 - 11904: 0xD0B8, + 37054 - 11904: 0xD0BC, + 37055 - 11904: 0xD0B9, + 37057 - 11904: 0xADA7, + 37059 - 11904: 0xADA8, + 37060 - 11904: 0x906A, + 37061 - 11904: 0xD0BB, + 37063 - 11904: 0xD0BD, + 37064 - 11904: 0xD0BF, + 37066 - 11904: 0xADA5, + 37067 - 11904: 0xD0BE, + 37070 - 11904: 0xADA6, + 37076 - 11904: 0xD7EE, + 37077 - 11904: 0xD0BA, + 37078 - 11904: 0xD3F2, + 37079 - 11904: 0xD3FB, + 37080 - 11904: 0xD3F9, + 37081 - 11904: 0xD3F4, + 37082 - 11904: 0xD3F5, + 37083 - 11904: 0xD3FA, + 37084 - 11904: 0xD3FC, + 37085 - 11904: 0xB071, + 37087 - 11904: 0xD3F7, + 37088 - 11904: 0xD3F3, + 37089 - 11904: 0xB070, + 37090 - 11904: 0xB072, + 37091 - 11904: 0xD3F6, + 37092 - 11904: 0xD3FD, + 37093 - 11904: 0xD3F8, + 37096 - 11904: 0xB3A1, + 37097 - 11904: 0xD7F1, + 37098 - 11904: 0xD7E9, + 37099 - 11904: 0xD7EF, + 37100 - 11904: 0xD7F0, + 37101 - 11904: 0xB3A2, + 37103 - 11904: 0xD7E8, + 37104 - 11904: 0xD7EA, + 37105 - 11904: 0xD0B7, + 37106 - 11904: 0xD7EC, + 37107 - 11904: 0xD7ED, + 37108 - 11904: 0xD7EB, + 37109 - 11904: 0xB66C, + 37113 - 11904: 0xDC56, + 37114 - 11904: 0xEBD4, + 37115 - 11904: 0xDC57, + 37116 - 11904: 0xDC54, + 37117 - 11904: 0xB3A3, + 37118 - 11904: 0xB66E, + 37119 - 11904: 0xDC53, + 37120 - 11904: 0xDC59, + 37121 - 11904: 0xDC58, + 37122 - 11904: 0xB66B, + 37123 - 11904: 0xDC5C, + 37124 - 11904: 0xDC52, + 37125 - 11904: 0xDC5B, + 37126 - 11904: 0xDC50, + 37127 - 11904: 0xDC5A, + 37128 - 11904: 0xDC55, + 37129 - 11904: 0xB66D, + 37131 - 11904: 0xE0AA, + 37133 - 11904: 0xE0A5, + 37134 - 11904: 0xE0AB, + 37135 - 11904: 0xE0A6, + 37136 - 11904: 0xE0A4, + 37137 - 11904: 0xE0A7, + 37138 - 11904: 0xB951, + 37140 - 11904: 0xE0A9, + 37142 - 11904: 0xE0A8, + 37143 - 11904: 0xB952, + 37144 - 11904: 0xBBC1, + 37145 - 11904: 0xBBC0, + 37146 - 11904: 0xE46E, + 37147 - 11904: 0xE471, + 37148 - 11904: 0xE469, + 37149 - 11904: 0xE46D, + 37150 - 11904: 0xBBC2, + 37151 - 11904: 0xE46C, + 37152 - 11904: 0xE46A, + 37153 - 11904: 0xE470, + 37154 - 11904: 0xE46B, + 37155 - 11904: 0xE468, + 37156 - 11904: 0xE46F, + 37158 - 11904: 0xE859, + 37159 - 11904: 0xBE48, + 37160 - 11904: 0xF14A, + 37161 - 11904: 0xE856, + 37162 - 11904: 0xE857, + 37163 - 11904: 0xE855, + 37164 - 11904: 0xDC51, + 37165 - 11904: 0xBE47, + 37166 - 11904: 0xE85A, + 37167 - 11904: 0xE854, + 37168 - 11904: 0xBE46, + 37169 - 11904: 0xBE49, + 37170 - 11904: 0xE858, + 37171 - 11904: 0xEBD5, + 37172 - 11904: 0xBFF3, + 37173 - 11904: 0xEBD6, + 37174 - 11904: 0xEBD7, + 37176 - 11904: 0xEEC4, + 37177 - 11904: 0xC1DD, + 37178 - 11904: 0xF14B, + 37179 - 11904: 0xF14C, + 37182 - 11904: 0xF14D, + 37183 - 11904: 0xF35D, + 37184 - 11904: 0xF35C, + 37185 - 11904: 0xF4E2, + 37187 - 11904: 0xF4E1, + 37188 - 11904: 0xF65B, + 37189 - 11904: 0xF65C, + 37190 - 11904: 0xF65A, + 37191 - 11904: 0xF766, + 37192 - 11904: 0xC5B0, + 37193 - 11904: 0xA8BB, + 37194 - 11904: 0xADAA, + 37195 - 11904: 0xADA9, + 37196 - 11904: 0xB075, + 37197 - 11904: 0xB074, + 37198 - 11904: 0xD440, + 37199 - 11904: 0xD441, + 37200 - 11904: 0xD3FE, + 37201 - 11904: 0x9FB2, + 37202 - 11904: 0xB073, + 37203 - 11904: 0xD7F5, + 37205 - 11904: 0xD7F6, + 37206 - 11904: 0xD7F2, + 37207 - 11904: 0xB3A4, + 37208 - 11904: 0xD7F3, + 37209 - 11904: 0x9FAE, + 37210 - 11904: 0xD7F4, + 37212 - 11904: 0x9FB0, + 37214 - 11904: 0x89AD, + 37215 - 11904: 0xDC5F, + 37216 - 11904: 0xDC61, + 37217 - 11904: 0xDC5D, + 37218 - 11904: 0xDC60, + 37219 - 11904: 0xB66F, + 37220 - 11904: 0xDC5E, + 37221 - 11904: 0xB670, + 37223 - 11904: 0x906E, + 37224 - 11904: 0xDD73, + 37225 - 11904: 0xB955, + 37226 - 11904: 0xB954, + 37228 - 11904: 0xB953, + 37230 - 11904: 0xE0AC, + 37231 - 11904: 0xE0AD, + 37232 - 11904: 0x9E71, + 37234 - 11904: 0xE473, + 37235 - 11904: 0xE475, + 37236 - 11904: 0xBBC6, + 37237 - 11904: 0xBBC3, + 37238 - 11904: 0x9E4A, + 37239 - 11904: 0xBBC5, + 37240 - 11904: 0xBBC4, + 37241 - 11904: 0xE474, + 37242 - 11904: 0xE472, + 37244 - 11904: 0x9FDC, + 37248 - 11904: 0xE861, + 37249 - 11904: 0xE85E, + 37250 - 11904: 0xE85F, + 37251 - 11904: 0xBE4D, + 37252 - 11904: 0xE860, + 37253 - 11904: 0xE85B, + 37254 - 11904: 0xE85C, + 37255 - 11904: 0xBE4A, + 37257 - 11904: 0xBE4B, + 37258 - 11904: 0xE85D, + 37259 - 11904: 0xBE4C, + 37260 - 11904: 0x89AB, + 37261 - 11904: 0xEBDB, + 37262 - 11904: 0x9FB8, + 37263 - 11904: 0xEBDC, + 37264 - 11904: 0xEBD9, + 37265 - 11904: 0xEBDA, + 37266 - 11904: 0xBFF4, + 37267 - 11904: 0xEBD8, + 37273 - 11904: 0xEEC8, + 37274 - 11904: 0xEEC5, + 37275 - 11904: 0xEEC7, + 37276 - 11904: 0xC1E0, + 37277 - 11904: 0xEECB, + 37278 - 11904: 0xC1DF, + 37279 - 11904: 0xEEC9, + 37280 - 11904: 0xEECC, + 37281 - 11904: 0xEECA, + 37282 - 11904: 0xEEC6, + 37283 - 11904: 0xC1DE, + 37285 - 11904: 0xF14F, + 37287 - 11904: 0xF150, + 37288 - 11904: 0xF14E, + 37289 - 11904: 0x9070, + 37290 - 11904: 0xF152, + 37291 - 11904: 0xC2E5, + 37292 - 11904: 0xC2E6, + 37293 - 11904: 0xF35F, + 37294 - 11904: 0xC3E7, + 37295 - 11904: 0xF151, + 37296 - 11904: 0xF35E, + 37297 - 11904: 0xC3E6, + 37298 - 11904: 0xF4E5, + 37299 - 11904: 0xF4E6, + 37300 - 11904: 0xC4BF, + 37301 - 11904: 0xF4E4, + 37302 - 11904: 0x8B63, + 37303 - 11904: 0xF4E3, + 37305 - 11904: 0xF65D, + 37306 - 11904: 0xC548, + 37307 - 11904: 0x95DC, + 37308 - 11904: 0xF849, + 37309 - 11904: 0xF8C8, + 37310 - 11904: 0xF8C7, + 37312 - 11904: 0xC643, + 37313 - 11904: 0xC65D, + 37314 - 11904: 0xF8C9, + 37315 - 11904: 0xF971, + 37316 - 11904: 0x9071, + 37317 - 11904: 0xC66F, + 37318 - 11904: 0xA8BC, + 37319 - 11904: 0xAAF6, + 37321 - 11904: 0xB956, + 37323 - 11904: 0xC4C0, + 37324 - 11904: 0xA8BD, + 37325 - 11904: 0xADAB, + 37326 - 11904: 0xB3A5, + 37327 - 11904: 0xB671, + 37328 - 11904: 0xC2E7, + 37329 - 11904: 0xAAF7, + 37331 - 11904: 0xD0C1, + 37332 - 11904: 0xD0C0, + 37333 - 11904: 0xD442, + 37334 - 11904: 0xFC5E, + 37335 - 11904: 0xB078, + 37336 - 11904: 0xB076, + 37337 - 11904: 0xB07A, + 37338 - 11904: 0xD444, + 37340 - 11904: 0xB079, + 37341 - 11904: 0xB077, + 37343 - 11904: 0x8949, + 37346 - 11904: 0xD443, + 37347 - 11904: 0xB3A8, + 37348 - 11904: 0xD7FC, + 37349 - 11904: 0x965B, + 37350 - 11904: 0xB3A7, + 37351 - 11904: 0xB3A9, + 37352 - 11904: 0xD842, + 37353 - 11904: 0xB3AB, + 37354 - 11904: 0xD7FE, + 37355 - 11904: 0xD840, + 37356 - 11904: 0xD7F7, + 37357 - 11904: 0xB3AA, + 37358 - 11904: 0xD843, + 37361 - 11904: 0xD7F9, + 37363 - 11904: 0xD7FA, + 37364 - 11904: 0xD7F8, + 37365 - 11904: 0xB3A6, + 37366 - 11904: 0x8C50, + 37367 - 11904: 0xD841, + 37368 - 11904: 0xD7FB, + 37369 - 11904: 0xD7FD, + 37370 - 11904: 0x94A6, + 37373 - 11904: 0xDC6D, + 37374 - 11904: 0x8FD5, + 37375 - 11904: 0xDC6C, + 37376 - 11904: 0xDC6A, + 37377 - 11904: 0xDC62, + 37378 - 11904: 0xDC71, + 37379 - 11904: 0xDC65, + 37380 - 11904: 0xDC6F, + 37381 - 11904: 0xDC76, + 37382 - 11904: 0xDC6E, + 37383 - 11904: 0xB679, + 37384 - 11904: 0x9E73, + 37385 - 11904: 0xB675, + 37386 - 11904: 0xDC63, + 37388 - 11904: 0xDC69, + 37389 - 11904: 0xB677, + 37390 - 11904: 0x9075, + 37391 - 11904: 0xDC68, + 37392 - 11904: 0xB678, + 37393 - 11904: 0xB67A, + 37394 - 11904: 0xDC6B, + 37395 - 11904: 0x99F7, + 37396 - 11904: 0xB672, + 37397 - 11904: 0xB673, + 37398 - 11904: 0xDC77, + 37399 - 11904: 0xDC75, + 37400 - 11904: 0x87B2, + 37401 - 11904: 0xDC74, + 37402 - 11904: 0xDC66, + 37404 - 11904: 0xDC72, + 37406 - 11904: 0xB676, + 37409 - 11904: 0x8CBF, + 37411 - 11904: 0xB674, + 37412 - 11904: 0xDC73, + 37413 - 11904: 0xDC64, + 37414 - 11904: 0xDC67, + 37415 - 11904: 0xDC70, + 37416 - 11904: 0x99F9, + 37418 - 11904: 0x9663, + 37419 - 11904: 0x95B9, + 37421 - 11904: 0xE4BA, + 37422 - 11904: 0xE0B7, + 37424 - 11904: 0xE0B0, + 37425 - 11904: 0xE0C3, + 37426 - 11904: 0xE0CC, + 37427 - 11904: 0xE0B3, + 37428 - 11904: 0xB961, + 37429 - 11904: 0x94D4, + 37430 - 11904: 0xE0C0, + 37431 - 11904: 0xB957, + 37432 - 11904: 0xB959, + 37433 - 11904: 0xB965, + 37434 - 11904: 0xE0B1, + 37436 - 11904: 0xFCFA, + 37437 - 11904: 0xB95A, + 37438 - 11904: 0xB95C, + 37439 - 11904: 0xB966, + 37440 - 11904: 0xB95B, + 37441 - 11904: 0x9077, + 37444 - 11904: 0x90AB, + 37445 - 11904: 0xB964, + 37446 - 11904: 0xE0B9, + 37448 - 11904: 0xE0AE, + 37449 - 11904: 0xB962, + 37450 - 11904: 0xE0B8, + 37451 - 11904: 0xB95E, + 37452 - 11904: 0xE0CA, + 37453 - 11904: 0xB963, + 37454 - 11904: 0xE0C8, + 37455 - 11904: 0xE0BC, + 37456 - 11904: 0xE0C6, + 37457 - 11904: 0xB960, + 37458 - 11904: 0xE0AF, + 37459 - 11904: 0xE0C9, + 37460 - 11904: 0xE0C4, + 37461 - 11904: 0x9D4D, + 37462 - 11904: 0xE0CB, + 37463 - 11904: 0xB958, + 37464 - 11904: 0x99FA, + 37466 - 11904: 0xB967, + 37467 - 11904: 0xB95D, + 37469 - 11904: 0x92E3, + 37470 - 11904: 0xE0B5, + 37471 - 11904: 0x97BB, + 37472 - 11904: 0xE0BD, + 37473 - 11904: 0xE0C1, + 37474 - 11904: 0x9078, + 37475 - 11904: 0xE0C5, + 37476 - 11904: 0xB95F, + 37477 - 11904: 0xE0B4, + 37478 - 11904: 0xE0B2, + 37479 - 11904: 0xE0BE, + 37483 - 11904: 0x99FB, + 37484 - 11904: 0xE0BB, + 37485 - 11904: 0xE0BA, + 37486 - 11904: 0x97E0, + 37487 - 11904: 0xE0BF, + 37488 - 11904: 0xE0C2, + 37490 - 11904: 0xE0C7, + 37494 - 11904: 0xE478, + 37495 - 11904: 0x96DC, + 37496 - 11904: 0xBBC7, + 37497 - 11904: 0xE4A4, + 37498 - 11904: 0xE47A, + 37499 - 11904: 0xBBCC, + 37500 - 11904: 0xBBD0, + 37501 - 11904: 0xE4AD, + 37502 - 11904: 0xE4B5, + 37503 - 11904: 0xE4A6, + 37504 - 11904: 0xBBC8, + 37505 - 11904: 0x9CA8, + 37506 - 11904: 0xE4AA, + 37507 - 11904: 0xE0B6, + 37508 - 11904: 0x9772, + 37509 - 11904: 0xBBC9, + 37510 - 11904: 0xE4B1, + 37511 - 11904: 0xE4B6, + 37512 - 11904: 0xE4AE, + 37513 - 11904: 0x9440, + 37514 - 11904: 0xE4B0, + 37515 - 11904: 0xE4B9, + 37516 - 11904: 0xE4B2, + 37517 - 11904: 0xE47E, + 37518 - 11904: 0xE4A9, + 37519 - 11904: 0x92F2, + 37521 - 11904: 0xBBD1, + 37523 - 11904: 0xBBCD, + 37524 - 11904: 0xE47C, + 37525 - 11904: 0xE4AB, + 37526 - 11904: 0xBBCB, + 37527 - 11904: 0xE4A5, + 37528 - 11904: 0xBBCA, + 37529 - 11904: 0xE4B3, + 37530 - 11904: 0xE4A2, + 37531 - 11904: 0xE479, + 37532 - 11904: 0xBBCE, + 37533 - 11904: 0xE4B8, + 37536 - 11904: 0xE47B, + 37537 - 11904: 0xE4AF, + 37538 - 11904: 0xE4AC, + 37539 - 11904: 0xE4A7, + 37540 - 11904: 0xE477, + 37541 - 11904: 0xE476, + 37542 - 11904: 0xE4A1, + 37543 - 11904: 0xE4B4, + 37544 - 11904: 0xBBCF, + 37545 - 11904: 0xE4B7, + 37546 - 11904: 0xE47D, + 37547 - 11904: 0xE4A3, + 37548 - 11904: 0xBE52, + 37550 - 11904: 0x99FD, + 37553 - 11904: 0x99FC, + 37554 - 11904: 0xBE5A, + 37555 - 11904: 0xBE55, + 37556 - 11904: 0xE8A4, + 37557 - 11904: 0xE8A1, + 37558 - 11904: 0xE867, + 37559 - 11904: 0xBE50, + 37561 - 11904: 0xF9D7, + 37562 - 11904: 0x964A, + 37563 - 11904: 0xBE4F, + 37564 - 11904: 0xBE56, + 37566 - 11904: 0x96D8, + 37567 - 11904: 0x99FE, + 37568 - 11904: 0xE865, + 37569 - 11904: 0xBE54, + 37570 - 11904: 0xE871, + 37571 - 11904: 0xE863, + 37572 - 11904: 0xE864, + 37573 - 11904: 0xBE4E, + 37574 - 11904: 0xE8A3, + 37575 - 11904: 0xBE58, + 37576 - 11904: 0xE874, + 37577 - 11904: 0xE879, + 37578 - 11904: 0xE873, + 37579 - 11904: 0xEBEE, + 37580 - 11904: 0xE86F, + 37581 - 11904: 0xE877, + 37582 - 11904: 0xE875, + 37583 - 11904: 0xE868, + 37584 - 11904: 0xE862, + 37585 - 11904: 0xE87D, + 37586 - 11904: 0xBE57, + 37587 - 11904: 0xE87E, + 37588 - 11904: 0x904B, + 37589 - 11904: 0xE878, + 37591 - 11904: 0xE86D, + 37592 - 11904: 0xE86B, + 37593 - 11904: 0xE866, + 37595 - 11904: 0xFA41, + 37597 - 11904: 0xE86E, + 37598 - 11904: 0xE87B, + 37599 - 11904: 0xE86A, + 37600 - 11904: 0xE87A, + 37601 - 11904: 0xE8A2, + 37603 - 11904: 0x9A40, + 37604 - 11904: 0xBE53, + 37605 - 11904: 0x975B, + 37606 - 11904: 0xE876, + 37607 - 11904: 0xE87C, + 37608 - 11904: 0xE872, + 37609 - 11904: 0xE86C, + 37610 - 11904: 0xBE51, + 37611 - 11904: 0x9A41, + 37612 - 11904: 0x91DD, + 37614 - 11904: 0xE4A8, + 37615 - 11904: 0xE870, + 37616 - 11904: 0xBE59, + 37617 - 11904: 0xE869, + 37618 - 11904: 0x93FC, + 37619 - 11904: 0x9A42, + 37620 - 11904: 0x9A43, + 37622 - 11904: 0x9659, + 37623 - 11904: 0xEBF4, + 37624 - 11904: 0xBFF7, + 37625 - 11904: 0xEBF3, + 37626 - 11904: 0xEBF0, + 37627 - 11904: 0xEC44, + 37628 - 11904: 0xBFFB, + 37629 - 11904: 0x9A44, + 37630 - 11904: 0xEC41, + 37631 - 11904: 0xEBF8, + 37632 - 11904: 0xEC43, + 37633 - 11904: 0xEBE9, + 37634 - 11904: 0xEBF6, + 37635 - 11904: 0x9051, + 37636 - 11904: 0xBFFD, + 37638 - 11904: 0xEBE1, + 37639 - 11904: 0x94BF, + 37640 - 11904: 0xEBDF, + 37641 - 11904: 0xEC42, + 37643 - 11904: 0xEC40, + 37644 - 11904: 0xEBFE, + 37645 - 11904: 0xEBED, + 37646 - 11904: 0xEBEC, + 37647 - 11904: 0xEBE2, + 37648 - 11904: 0xC040, + 37650 - 11904: 0xEBE8, + 37651 - 11904: 0xEBF2, + 37652 - 11904: 0xEBFD, + 37653 - 11904: 0xC043, + 37654 - 11904: 0xEC45, + 37656 - 11904: 0xC1E8, + 37657 - 11904: 0xC045, + 37658 - 11904: 0xBFFE, + 37659 - 11904: 0xEBE6, + 37661 - 11904: 0xEBEF, + 37662 - 11904: 0xEBDE, + 37663 - 11904: 0xEBE0, + 37664 - 11904: 0xBFF5, + 37665 - 11904: 0xC042, + 37666 - 11904: 0xBFFA, + 37667 - 11904: 0xEBE7, + 37668 - 11904: 0xEBF7, + 37669 - 11904: 0xEBF1, + 37670 - 11904: 0xC041, + 37671 - 11904: 0xEBDD, + 37672 - 11904: 0xC1E3, + 37673 - 11904: 0xEBF9, + 37674 - 11904: 0xEBFC, + 37675 - 11904: 0xBFFC, + 37676 - 11904: 0x90A2, + 37677 - 11904: 0xEBEB, + 37678 - 11904: 0xC044, + 37679 - 11904: 0xBFF9, + 37680 - 11904: 0x9CAB, + 37681 - 11904: 0x9776, + 37683 - 11904: 0xBFF8, + 37684 - 11904: 0xEBF5, + 37685 - 11904: 0xEBFB, + 37686 - 11904: 0xBFF6, + 37688 - 11904: 0xEBE4, + 37689 - 11904: 0xEBFA, + 37692 - 11904: 0xEBE5, + 37696 - 11904: 0xFC55, + 37697 - 11904: 0xFE45, + 37698 - 11904: 0x94A8, + 37699 - 11904: 0x9A45, + 37700 - 11904: 0xFA4B, + 37701 - 11904: 0x9DE1, + 37702 - 11904: 0xEBEA, + 37703 - 11904: 0xEED2, + 37704 - 11904: 0x96D9, + 37705 - 11904: 0xEED7, + 37706 - 11904: 0xC1E5, + 37707 - 11904: 0xC1E7, + 37708 - 11904: 0xEEDD, + 37709 - 11904: 0xC1E1, + 37710 - 11904: 0xEEEC, + 37711 - 11904: 0xEEE3, + 37712 - 11904: 0xEED8, + 37713 - 11904: 0xEED9, + 37714 - 11904: 0xEEE2, + 37716 - 11904: 0xC1EE, + 37717 - 11904: 0xEEE1, + 37718 - 11904: 0xEED1, + 37719 - 11904: 0xEEE0, + 37720 - 11904: 0xEED4, + 37721 - 11904: 0xEEED, + 37722 - 11904: 0xC1ED, + 37723 - 11904: 0xC1EB, + 37724 - 11904: 0xEED5, + 37726 - 11904: 0xEEE8, + 37727 - 11904: 0x9774, + 37728 - 11904: 0xEEDA, + 37729 - 11904: 0xEEE7, + 37730 - 11904: 0xFDF5, + 37731 - 11904: 0xEEE9, + 37732 - 11904: 0xEED0, + 37733 - 11904: 0xC1E6, + 37734 - 11904: 0x92E5, + 37735 - 11904: 0xEEEA, + 37736 - 11904: 0x9645, + 37737 - 11904: 0x91DA, + 37738 - 11904: 0xEEDE, + 37739 - 11904: 0x90A3, + 37740 - 11904: 0xC1EA, + 37741 - 11904: 0xEEDB, + 37742 - 11904: 0xA05F, + 37744 - 11904: 0xC1EC, + 37745 - 11904: 0xEEE4, + 37747 - 11904: 0x90AF, + 37748 - 11904: 0x97BF, + 37749 - 11904: 0xC1E4, + 37750 - 11904: 0xEED6, + 37751 - 11904: 0xEEE5, + 37752 - 11904: 0x914C, + 37753 - 11904: 0xEEDF, + 37754 - 11904: 0xEBE3, + 37755 - 11904: 0xEEE6, + 37756 - 11904: 0xEED3, + 37757 - 11904: 0x967A, + 37758 - 11904: 0xC1E9, + 37760 - 11904: 0xEEEB, + 37761 - 11904: 0x91DE, + 37762 - 11904: 0xC1E2, + 37763 - 11904: 0xEECE, + 37764 - 11904: 0x9A46, + 37765 - 11904: 0xFEB0, + 37766 - 11904: 0x9779, + 37767 - 11904: 0x946C, + 37768 - 11904: 0xF160, + 37769 - 11904: 0xF159, + 37770 - 11904: 0xC2E9, + 37772 - 11904: 0xF154, + 37773 - 11904: 0xF163, + 37774 - 11904: 0xF15B, + 37775 - 11904: 0xEEDC, + 37776 - 11904: 0x9858, + 37777 - 11904: 0xF165, + 37778 - 11904: 0xF155, + 37780 - 11904: 0xC2E8, + 37781 - 11904: 0xF15F, + 37782 - 11904: 0xC2EA, + 37783 - 11904: 0xC2F2, + 37784 - 11904: 0xC2F0, + 37785 - 11904: 0xF161, + 37786 - 11904: 0xC2F1, + 37787 - 11904: 0xF157, + 37788 - 11904: 0x9266, + 37789 - 11904: 0xF158, + 37790 - 11904: 0xF15D, + 37791 - 11904: 0xF162, + 37792 - 11904: 0x93FB, + 37793 - 11904: 0xEECD, + 37794 - 11904: 0xC2EB, + 37795 - 11904: 0xF16A, + 37796 - 11904: 0xF167, + 37797 - 11904: 0xF16B, + 37798 - 11904: 0xF15E, + 37799 - 11904: 0xF15A, + 37800 - 11904: 0xF168, + 37801 - 11904: 0xF36A, + 37802 - 11904: 0xF15C, + 37804 - 11904: 0xC2EE, + 37805 - 11904: 0x9A47, + 37806 - 11904: 0xC2ED, + 37807 - 11904: 0xEECF, + 37808 - 11904: 0xC2EF, + 37809 - 11904: 0xF164, + 37810 - 11904: 0xF166, + 37811 - 11904: 0xC2EC, + 37812 - 11904: 0xF169, + 37813 - 11904: 0xF153, + 37815 - 11904: 0xF156, + 37816 - 11904: 0x9749, + 37819 - 11904: 0x9748, + 37821 - 11904: 0x934A, + 37823 - 11904: 0x9CE2, + 37824 - 11904: 0xF373, + 37826 - 11904: 0xF363, + 37827 - 11904: 0xC3EB, + 37828 - 11904: 0xF371, + 37830 - 11904: 0x9264, + 37831 - 11904: 0xF361, + 37832 - 11904: 0xC3EC, + 37834 - 11904: 0xF36C, + 37835 - 11904: 0x91DF, + 37836 - 11904: 0xF368, + 37837 - 11904: 0xC3F1, + 37838 - 11904: 0xF372, + 37839 - 11904: 0xF362, + 37840 - 11904: 0xF365, + 37841 - 11904: 0xC3E9, + 37842 - 11904: 0xF374, + 37843 - 11904: 0xFB79, + 37844 - 11904: 0xF36D, + 37845 - 11904: 0xF370, + 37846 - 11904: 0xC3EF, + 37847 - 11904: 0xC3F4, + 37848 - 11904: 0xC3F2, + 37849 - 11904: 0xF369, + 37850 - 11904: 0xF364, + 37851 - 11904: 0x96D7, + 37852 - 11904: 0xC3ED, + 37853 - 11904: 0xC3EE, + 37854 - 11904: 0xF360, + 37855 - 11904: 0xC3EA, + 37856 - 11904: 0x9343, + 37857 - 11904: 0xC3E8, + 37858 - 11904: 0xC3F0, + 37859 - 11904: 0xF36F, + 37860 - 11904: 0xC3F3, + 37862 - 11904: 0xF36B, + 37863 - 11904: 0xF375, + 37864 - 11904: 0xC3F5, + 37868 - 11904: 0xF367, + 37870 - 11904: 0xF36E, + 37872 - 11904: 0xFDCB, + 37873 - 11904: 0xFE7A, + 37875 - 11904: 0x91DB, + 37876 - 11904: 0x8C6A, + 37877 - 11904: 0xF4F3, + 37878 - 11904: 0xF542, + 37879 - 11904: 0xF4F5, + 37880 - 11904: 0xF4FC, + 37881 - 11904: 0xF366, + 37882 - 11904: 0xF4FA, + 37883 - 11904: 0xF4E9, + 37884 - 11904: 0xF540, + 37885 - 11904: 0xC4C3, + 37886 - 11904: 0xF4ED, + 37887 - 11904: 0xF4FE, + 37888 - 11904: 0xF4F4, + 37889 - 11904: 0x97AF, + 37891 - 11904: 0xC4C2, + 37892 - 11904: 0x95DD, + 37894 - 11904: 0xF544, + 37895 - 11904: 0xF4F6, + 37896 - 11904: 0x9348, + 37897 - 11904: 0xF4FB, + 37898 - 11904: 0xF4FD, + 37899 - 11904: 0xF4E7, + 37900 - 11904: 0xF541, + 37901 - 11904: 0xF4F2, + 37902 - 11904: 0xF4F7, + 37903 - 11904: 0xF4EB, + 37904 - 11904: 0xF4EF, + 37905 - 11904: 0xF543, + 37906 - 11904: 0xF4F9, + 37907 - 11904: 0xF4E8, + 37908 - 11904: 0xF4EC, + 37909 - 11904: 0xF4EE, + 37910 - 11904: 0xF4F8, + 37911 - 11904: 0x9A4B, + 37912 - 11904: 0xC4C1, + 37913 - 11904: 0xF4F1, + 37915 - 11904: 0xFC45, + 37917 - 11904: 0x9A4D, + 37920 - 11904: 0xF4EA, + 37924 - 11904: 0x91BC, + 37925 - 11904: 0x90E2, + 37926 - 11904: 0x90B4, + 37927 - 11904: 0x95E1, + 37928 - 11904: 0xF4F0, + 37929 - 11904: 0xF661, + 37930 - 11904: 0xF666, + 37931 - 11904: 0xC54F, + 37932 - 11904: 0xF668, + 37933 - 11904: 0x9A4E, + 37934 - 11904: 0xC549, + 37935 - 11904: 0x87AD, + 37936 - 11904: 0xF664, + 37937 - 11904: 0xF66A, + 37938 - 11904: 0xC54E, + 37939 - 11904: 0xC54A, + 37941 - 11904: 0xC54B, + 37942 - 11904: 0xF660, + 37943 - 11904: 0xF667, + 37944 - 11904: 0xC54D, + 37945 - 11904: 0xF665, + 37946 - 11904: 0xC54C, + 37947 - 11904: 0xF65F, + 37948 - 11904: 0xF663, + 37949 - 11904: 0xF662, + 37950 - 11904: 0x9A4F, + 37951 - 11904: 0xF65E, + 37952 - 11904: 0xF669, + 37954 - 11904: 0xFE40, + 37955 - 11904: 0xFE43, + 37956 - 11904: 0xC5B1, + 37957 - 11904: 0xF76D, + 37958 - 11904: 0xF770, + 37959 - 11904: 0xF76C, + 37960 - 11904: 0xF76E, + 37961 - 11904: 0xF76F, + 37962 - 11904: 0xF769, + 37963 - 11904: 0xF76A, + 37964 - 11904: 0xF767, + 37965 - 11904: 0x96DD, + 37967 - 11904: 0xF76B, + 37968 - 11904: 0xF768, + 37969 - 11904: 0xC5B2, + 37970 - 11904: 0xC5B3, + 37972 - 11904: 0x9A51, + 37973 - 11904: 0xF84B, + 37975 - 11904: 0xF84D, + 37976 - 11904: 0x96A7, + 37979 - 11904: 0x90B0, + 37981 - 11904: 0xF84C, + 37982 - 11904: 0xF84E, + 37984 - 11904: 0xC5E0, + 37986 - 11904: 0xF84A, + 37987 - 11904: 0xC5DF, + 37988 - 11904: 0xC5E1, + 37989 - 11904: 0x9C4E, + 37991 - 11904: 0x9443, + 37992 - 11904: 0xF8CB, + 37993 - 11904: 0xF8CC, + 37994 - 11904: 0xC644, + 37995 - 11904: 0xF8CA, + 37996 - 11904: 0x8EBA, + 37997 - 11904: 0xF953, + 37998 - 11904: 0xF952, + 37999 - 11904: 0xF954, + 38000 - 11904: 0xC65F, + 38001 - 11904: 0xF955, + 38002 - 11904: 0xC65E, + 38003 - 11904: 0xF956, + 38004 - 11904: 0xF972, + 38005 - 11904: 0xF975, + 38006 - 11904: 0xF974, + 38007 - 11904: 0xC668, + 38008 - 11904: 0xF973, + 38009 - 11904: 0x9A52, + 38011 - 11904: 0xFCC1, + 38012 - 11904: 0xC672, + 38013 - 11904: 0xC670, + 38014 - 11904: 0xC671, + 38015 - 11904: 0xC677, + 38016 - 11904: 0xF9C0, + 38017 - 11904: 0xF9C1, + 38018 - 11904: 0xF9BF, + 38019 - 11904: 0xF9C9, + 38021 - 11904: 0x8BE9, + 38047 - 11904: 0x9CAF, + 38050 - 11904: 0x8BFD, + 38081 - 11904: 0x9ABC, + 38083 - 11904: 0x9AB8, + 38108 - 11904: 0x9AAE, + 38134 - 11904: 0x9AA7, + 38189 - 11904: 0x9A53, + 38215 - 11904: 0x9D74, + 38263 - 11904: 0xAAF8, + 38264 - 11904: 0x8BEA, + 38266 - 11904: 0xD844, + 38267 - 11904: 0xDC78, + 38268 - 11904: 0xE8A5, + 38269 - 11904: 0xF376, + 38271 - 11904: 0x8BEB, + 38272 - 11904: 0xAAF9, + 38274 - 11904: 0xADAC, + 38275 - 11904: 0xB07B, + 38277 - 11904: 0x90B2, + 38278 - 11904: 0xD845, + 38280 - 11904: 0xD846, + 38281 - 11904: 0xB3AC, + 38283 - 11904: 0xB67D, + 38284 - 11904: 0xDC7A, + 38285 - 11904: 0xDC79, + 38286 - 11904: 0xB6A3, + 38287 - 11904: 0xB67C, + 38288 - 11904: 0xDC7B, + 38289 - 11904: 0xB67E, + 38290 - 11904: 0xB6A2, + 38291 - 11904: 0xB6A1, + 38292 - 11904: 0xB67B, + 38294 - 11904: 0x95E9, + 38295 - 11904: 0x95E8, + 38296 - 11904: 0xB968, + 38297 - 11904: 0x95E6, + 38299 - 11904: 0xE0D0, + 38300 - 11904: 0xE0CE, + 38302 - 11904: 0xE0CF, + 38303 - 11904: 0xE0CD, + 38304 - 11904: 0x90B5, + 38305 - 11904: 0xBBD2, + 38306 - 11904: 0x9A54, + 38307 - 11904: 0xBBD5, + 38308 - 11904: 0xBBD7, + 38309 - 11904: 0xBBD6, + 38310 - 11904: 0x90B3, + 38311 - 11904: 0x95E7, + 38312 - 11904: 0xBBD3, + 38313 - 11904: 0xBBD4, + 38314 - 11904: 0x8B50, + 38315 - 11904: 0xE8A7, + 38316 - 11904: 0xE8A6, + 38317 - 11904: 0xBE5B, + 38318 - 11904: 0xE8A8, + 38320 - 11904: 0xE8A9, + 38321 - 11904: 0xBE5C, + 38325 - 11904: 0xEC4D, + 38326 - 11904: 0xEC4B, + 38327 - 11904: 0xEEF3, + 38329 - 11904: 0xEC49, + 38330 - 11904: 0xEC4A, + 38331 - 11904: 0xC046, + 38332 - 11904: 0xEC46, + 38333 - 11904: 0xEC4E, + 38334 - 11904: 0xEC48, + 38335 - 11904: 0xEC4C, + 38336 - 11904: 0xEEEF, + 38339 - 11904: 0xEEF1, + 38341 - 11904: 0xEEF2, + 38342 - 11904: 0xC1F3, + 38343 - 11904: 0xEEEE, + 38344 - 11904: 0xC1F2, + 38345 - 11904: 0xEEF0, + 38346 - 11904: 0xC1EF, + 38347 - 11904: 0xC1F0, + 38348 - 11904: 0xC1F1, + 38349 - 11904: 0xEC47, + 38352 - 11904: 0xC2F5, + 38353 - 11904: 0xF16E, + 38354 - 11904: 0xF16C, + 38355 - 11904: 0xF16D, + 38356 - 11904: 0xC2F3, + 38357 - 11904: 0xC2F6, + 38358 - 11904: 0xC2F4, + 38362 - 11904: 0xF377, + 38363 - 11904: 0xF378, + 38364 - 11904: 0xC3F6, + 38366 - 11904: 0xF545, + 38367 - 11904: 0xF547, + 38368 - 11904: 0xF546, + 38369 - 11904: 0xC4C4, + 38370 - 11904: 0xC550, + 38371 - 11904: 0xF66D, + 38372 - 11904: 0xF66C, + 38373 - 11904: 0xF66B, + 38376 - 11904: 0x8BEC, + 38388 - 11904: 0x9A56, + 38428 - 11904: 0xAAFA, + 38429 - 11904: 0x8BFB, + 38430 - 11904: 0xC9AA, + 38432 - 11904: 0xCA58, + 38433 - 11904: 0xA6E9, + 38434 - 11904: 0xCA56, + 38435 - 11904: 0xCA59, + 38436 - 11904: 0xCA57, + 38440 - 11904: 0xCBAE, + 38442 - 11904: 0xA8C1, + 38444 - 11904: 0xA8C2, + 38445 - 11904: 0xCBB0, + 38446 - 11904: 0xA8BF, + 38447 - 11904: 0xCBAF, + 38448 - 11904: 0xCBAD, + 38449 - 11904: 0xA8C0, + 38450 - 11904: 0xA8BE, + 38451 - 11904: 0x9A57, + 38456 - 11904: 0xA0AA, + 38457 - 11904: 0xCDD8, + 38458 - 11904: 0xCDDB, + 38459 - 11904: 0xAAFD, + 38460 - 11904: 0xCDDA, + 38461 - 11904: 0xCDD9, + 38463 - 11904: 0xAAFC, + 38464 - 11904: 0xAAFB, + 38465 - 11904: 0x9FA6, + 38466 - 11904: 0xAB40, + 38467 - 11904: 0xCDDC, + 38468 - 11904: 0xAAFE, + 38469 - 11904: 0x99CC, + 38474 - 11904: 0xD0C6, + 38475 - 11904: 0xADAE, + 38476 - 11904: 0xADAF, + 38477 - 11904: 0xADB0, + 38478 - 11904: 0xD0C7, + 38479 - 11904: 0xD0C3, + 38480 - 11904: 0xADAD, + 38481 - 11904: 0xD0C4, + 38483 - 11904: 0xD0C5, + 38484 - 11904: 0xD0C2, + 38486 - 11904: 0x9C59, + 38488 - 11904: 0xB0A4, + 38491 - 11904: 0xB0A1, + 38492 - 11904: 0xD445, + 38493 - 11904: 0xB0A2, + 38494 - 11904: 0xB0A5, + 38495 - 11904: 0xD446, + 38497 - 11904: 0xB07E, + 38498 - 11904: 0xB07C, + 38499 - 11904: 0xB07D, + 38500 - 11904: 0xB0A3, + 38505 - 11904: 0x99B5, + 38506 - 11904: 0xB3AD, + 38507 - 11904: 0xD849, + 38508 - 11904: 0xB3B5, + 38509 - 11904: 0xD848, + 38511 - 11904: 0xD84B, + 38512 - 11904: 0xB3B1, + 38513 - 11904: 0xD84A, + 38514 - 11904: 0xB6AB, + 38515 - 11904: 0xB3AF, + 38516 - 11904: 0xB3B2, + 38517 - 11904: 0xB3AE, + 38518 - 11904: 0xB3B3, + 38519 - 11904: 0xB3B4, + 38520 - 11904: 0xB3B0, + 38523 - 11904: 0x90BE, + 38524 - 11904: 0xD847, + 38525 - 11904: 0xB6A7, + 38526 - 11904: 0xDC7D, + 38528 - 11904: 0xDCA3, + 38529 - 11904: 0x9FAF, + 38531 - 11904: 0xDCA2, + 38532 - 11904: 0xB6AC, + 38533 - 11904: 0xB6A8, + 38534 - 11904: 0xB6A9, + 38535 - 11904: 0xDC7C, + 38536 - 11904: 0xDC7E, + 38537 - 11904: 0xDCA1, + 38538 - 11904: 0xB6A4, + 38539 - 11904: 0xB6A6, + 38541 - 11904: 0xB6AA, + 38542 - 11904: 0xB6A5, + 38543 - 11904: 0x95F2, + 38545 - 11904: 0xE0D3, + 38546 - 11904: 0xE0D1, + 38547 - 11904: 0xE0D2, + 38548 - 11904: 0xB96A, + 38549 - 11904: 0xB96B, + 38550 - 11904: 0x90BF, + 38551 - 11904: 0xE0D4, + 38552 - 11904: 0xB969, + 38553 - 11904: 0xBBD8, + 38555 - 11904: 0xBBDA, + 38556 - 11904: 0xBBD9, + 38558 - 11904: 0xE4BB, + 38561 - 11904: 0xE4BC, + 38562 - 11904: 0xE8AB, + 38563 - 11904: 0x90C1, + 38564 - 11904: 0xE8AA, + 38565 - 11904: 0xFEE4, + 38567 - 11904: 0xC047, + 38568 - 11904: 0xC048, + 38569 - 11904: 0xEC4F, + 38570 - 11904: 0xC049, + 38572 - 11904: 0xEEF6, + 38574 - 11904: 0xEEF4, + 38576 - 11904: 0xEEF5, + 38577 - 11904: 0xC1F4, + 38579 - 11904: 0xF16F, + 38580 - 11904: 0xC3F7, + 38582 - 11904: 0xC6D7, + 38584 - 11904: 0xC1F5, + 38585 - 11904: 0xAB41, + 38587 - 11904: 0xB0A6, + 38588 - 11904: 0xD447, + 38589 - 11904: 0x90C7, + 38591 - 11904: 0xD84C, + 38592 - 11904: 0xB3B6, + 38593 - 11904: 0xB6AD, + 38594 - 11904: 0xDCA4, + 38595 - 11904: 0xDCA6, + 38596 - 11904: 0xB6AF, + 38597 - 11904: 0xB6AE, + 38598 - 11904: 0xB6B0, + 38599 - 11904: 0xB6B1, + 38600 - 11904: 0xDCA5, + 38601 - 11904: 0xB96E, + 38602 - 11904: 0xB96F, + 38603 - 11904: 0xB96D, + 38604 - 11904: 0xBBDB, + 38605 - 11904: 0xB96C, + 38606 - 11904: 0xE0D5, + 38610 - 11904: 0xBBDC, + 38611 - 11904: 0xE8AC, + 38612 - 11904: 0xEC50, + 38613 - 11904: 0xC04A, + 38614 - 11904: 0xC1F6, + 38615 - 11904: 0xF170, + 38616 - 11904: 0xF174, + 38617 - 11904: 0xC2F9, + 38618 - 11904: 0xF171, + 38619 - 11904: 0xC2FA, + 38620 - 11904: 0xC2F8, + 38621 - 11904: 0xF175, + 38622 - 11904: 0xC2FB, + 38623 - 11904: 0xF173, + 38625 - 11904: 0xF379, + 38626 - 11904: 0xC2F7, + 38627 - 11904: 0xC3F8, + 38629 - 11904: 0xF8CD, + 38632 - 11904: 0xAB42, + 38633 - 11904: 0xB3B8, + 38634 - 11904: 0xB3B7, + 38639 - 11904: 0xB6B2, + 38640 - 11904: 0xDCA8, + 38641 - 11904: 0xDCA7, + 38642 - 11904: 0xB6B3, + 38644 - 11904: 0x92E4, + 38645 - 11904: 0xE0D9, + 38646 - 11904: 0xB973, + 38647 - 11904: 0xB970, + 38648 - 11904: 0xE0D8, + 38649 - 11904: 0xB972, + 38650 - 11904: 0xE0D6, + 38651 - 11904: 0xB971, + 38653 - 11904: 0xE0D7, + 38655 - 11904: 0xE4BD, + 38656 - 11904: 0xBBDD, + 38658 - 11904: 0xE8AF, + 38659 - 11904: 0x9F52, + 38660 - 11904: 0xBE5D, + 38661 - 11904: 0xE8AD, + 38662 - 11904: 0xBE5E, + 38663 - 11904: 0xBE5F, + 38664 - 11904: 0xE8AE, + 38665 - 11904: 0xBE60, + 38667 - 11904: 0xEC51, + 38669 - 11904: 0xC04E, + 38670 - 11904: 0xC04B, + 38671 - 11904: 0xC050, + 38672 - 11904: 0xEC53, + 38673 - 11904: 0xC04C, + 38674 - 11904: 0xEC52, + 38675 - 11904: 0xC04F, + 38678 - 11904: 0xC04D, + 38680 - 11904: 0xEEF9, + 38681 - 11904: 0xEEFB, + 38683 - 11904: 0x90DB, + 38684 - 11904: 0xC1F7, + 38685 - 11904: 0xEEFA, + 38686 - 11904: 0xC1F8, + 38687 - 11904: 0xEEF8, + 38688 - 11904: 0xEEF7, + 38689 - 11904: 0xA066, + 38690 - 11904: 0xF177, + 38691 - 11904: 0xF176, + 38692 - 11904: 0xC2FC, + 38693 - 11904: 0xF178, + 38694 - 11904: 0xF37E, + 38695 - 11904: 0xC3FA, + 38696 - 11904: 0xF37D, + 38697 - 11904: 0xF37A, + 38698 - 11904: 0xC3F9, + 38699 - 11904: 0xF37B, + 38700 - 11904: 0xF37C, + 38702 - 11904: 0xF548, + 38703 - 11904: 0xF549, + 38704 - 11904: 0xC4C5, + 38705 - 11904: 0x90D2, + 38706 - 11904: 0xC553, + 38708 - 11904: 0x876B, + 38709 - 11904: 0xF66E, + 38710 - 11904: 0x90D4, + 38712 - 11904: 0xC551, + 38713 - 11904: 0xC552, + 38714 - 11904: 0xF66F, + 38717 - 11904: 0xC5B4, + 38718 - 11904: 0xC5B5, + 38719 - 11904: 0xF771, + 38720 - 11904: 0x9A5B, + 38721 - 11904: 0x95FD, + 38722 - 11904: 0xC645, + 38723 - 11904: 0xF8CF, + 38724 - 11904: 0xC647, + 38726 - 11904: 0xF8CE, + 38727 - 11904: 0xF8D0, + 38728 - 11904: 0xC646, + 38729 - 11904: 0xF957, + 38730 - 11904: 0x87B1, + 38731 - 11904: 0xF9AD, + 38737 - 11904: 0x8BC4, + 38738 - 11904: 0xAB43, + 38741 - 11904: 0x8C66, + 38742 - 11904: 0xB974, + 38743 - 11904: 0x90DE, + 38744 - 11904: 0xE4BE, + 38746 - 11904: 0xE8B0, + 38747 - 11904: 0xC051, + 38748 - 11904: 0xC052, + 38749 - 11904: 0x9CE4, + 38750 - 11904: 0xAB44, + 38751 - 11904: 0x90E1, + 38752 - 11904: 0xBE61, + 38753 - 11904: 0xC3FB, + 38754 - 11904: 0xADB1, + 38758 - 11904: 0xC053, + 38760 - 11904: 0xC5E2, + 38761 - 11904: 0xADB2, + 38762 - 11904: 0xD84D, + 38764 - 11904: 0xDCA9, + 38765 - 11904: 0x9E46, + 38766 - 11904: 0xDCAB, + 38768 - 11904: 0xDCAA, + 38769 - 11904: 0x9651, + 38770 - 11904: 0xE0DD, + 38771 - 11904: 0xE0DA, + 38772 - 11904: 0xB975, + 38774 - 11904: 0xB976, + 38775 - 11904: 0xE0DB, + 38776 - 11904: 0xE0DC, + 38778 - 11904: 0xE4C0, + 38779 - 11904: 0xE4C5, + 38780 - 11904: 0xBBDE, + 38781 - 11904: 0xE4BF, + 38782 - 11904: 0xE4C1, + 38783 - 11904: 0xE4C8, + 38784 - 11904: 0xE4C3, + 38785 - 11904: 0xE4C7, + 38786 - 11904: 0xE4C4, + 38787 - 11904: 0xE4C2, + 38788 - 11904: 0xE4C6, + 38789 - 11904: 0xBBDF, + 38791 - 11904: 0xFB58, + 38792 - 11904: 0xE8B3, + 38793 - 11904: 0x90E6, + 38794 - 11904: 0xE8B1, + 38795 - 11904: 0xBE63, + 38797 - 11904: 0xBE62, + 38798 - 11904: 0xE8B2, + 38799 - 11904: 0xBE64, + 38804 - 11904: 0xEC56, + 38807 - 11904: 0xEC55, + 38808 - 11904: 0xC054, + 38809 - 11904: 0xEC54, + 38810 - 11904: 0xEEFC, + 38811 - 11904: 0x9650, + 38812 - 11904: 0xEEFE, + 38813 - 11904: 0xEF41, + 38814 - 11904: 0xEF40, + 38815 - 11904: 0x90E7, + 38816 - 11904: 0xC1F9, + 38817 - 11904: 0xEEFD, + 38818 - 11904: 0xF1A1, + 38819 - 11904: 0xC2FD, + 38820 - 11904: 0xF17D, + 38821 - 11904: 0xF1A2, + 38822 - 11904: 0xC2FE, + 38824 - 11904: 0xF17B, + 38826 - 11904: 0xF17E, + 38827 - 11904: 0xF17C, + 38828 - 11904: 0xF179, + 38829 - 11904: 0xC340, + 38830 - 11904: 0xF17A, + 38833 - 11904: 0x90E8, + 38834 - 11904: 0x9A5D, + 38835 - 11904: 0xF3A1, + 38836 - 11904: 0x9F7A, + 38838 - 11904: 0xF3A3, + 38839 - 11904: 0xF3A2, + 38840 - 11904: 0x9B5C, + 38841 - 11904: 0xF54A, + 38842 - 11904: 0x9F7C, + 38843 - 11904: 0xF54B, + 38845 - 11904: 0xFC52, + 38846 - 11904: 0x90E9, + 38847 - 11904: 0xF670, + 38848 - 11904: 0x90EA, + 38849 - 11904: 0xC5B7, + 38850 - 11904: 0x9A5E, + 38851 - 11904: 0xC5B6, + 38852 - 11904: 0xF84F, + 38853 - 11904: 0xF850, + 38854 - 11904: 0xC648, + 38855 - 11904: 0xF8D1, + 38856 - 11904: 0x9F76, + 38857 - 11904: 0xC669, + 38859 - 11904: 0xADB3, + 38860 - 11904: 0xB6B4, + 38861 - 11904: 0xE4CA, + 38862 - 11904: 0xE4C9, + 38863 - 11904: 0xE8B5, + 38864 - 11904: 0xE8B4, + 38866 - 11904: 0x90EB, + 38867 - 11904: 0xC1FA, + 38868 - 11904: 0xEF43, + 38869 - 11904: 0xEF42, + 38870 - 11904: 0xF1A5, + 38871 - 11904: 0xF1A3, + 38872 - 11904: 0xF1A6, + 38873 - 11904: 0xF1A4, + 38876 - 11904: 0xC3FC, + 38877 - 11904: 0xF3A4, + 38878 - 11904: 0xF3A5, + 38879 - 11904: 0xF3A6, + 38880 - 11904: 0x90EC, + 38881 - 11904: 0xF671, + 38883 - 11904: 0xF772, + 38885 - 11904: 0xF8D2, + 38886 - 11904: 0x8BEE, + 38893 - 11904: 0xADB4, + 38894 - 11904: 0x90EE, + 38896 - 11904: 0xEC57, + 38897 - 11904: 0xEF44, + 38898 - 11904: 0x91C6, + 38899 - 11904: 0xADB5, + 38901 - 11904: 0x90F2, + 38902 - 11904: 0xBBE0, + 38904 - 11904: 0xEC58, + 38905 - 11904: 0xC341, + 38906 - 11904: 0xF1A7, + 38907 - 11904: 0xC3FD, + 38909 - 11904: 0xF54C, + 38910 - 11904: 0xF54D, + 38911 - 11904: 0xC554, + 38912 - 11904: 0xF851, + 38913 - 11904: 0xADB6, + 38914 - 11904: 0xB3BB, + 38915 - 11904: 0xB3BC, + 38916 - 11904: 0xD84E, + 38917 - 11904: 0xB6B5, + 38918 - 11904: 0xB6B6, + 38919 - 11904: 0xDCAC, + 38920 - 11904: 0xB6B7, + 38922 - 11904: 0xB97A, + 38924 - 11904: 0xB97C, + 38925 - 11904: 0xE0DF, + 38926 - 11904: 0xE0E0, + 38927 - 11904: 0xE0DE, + 38928 - 11904: 0xB977, + 38929 - 11904: 0xB978, + 38930 - 11904: 0xB97B, + 38931 - 11904: 0xB979, + 38932 - 11904: 0xFCBC, + 38933 - 11904: 0x8A74, + 38934 - 11904: 0xE4CB, + 38935 - 11904: 0xBBE1, + 38936 - 11904: 0xBBE2, + 38939 - 11904: 0xE8BC, + 38940 - 11904: 0xBE67, + 38941 - 11904: 0xE8B7, + 38942 - 11904: 0xE8B6, + 38943 - 11904: 0x9657, + 38944 - 11904: 0xE8BB, + 38945 - 11904: 0xBE65, + 38947 - 11904: 0x9CEF, + 38948 - 11904: 0xC05B, + 38950 - 11904: 0xE8B8, + 38951 - 11904: 0xE8BD, + 38952 - 11904: 0xE8BA, + 38953 - 11904: 0xE8B9, + 38955 - 11904: 0xBE66, + 38957 - 11904: 0xC059, + 38958 - 11904: 0x9FDF, + 38959 - 11904: 0xEC5A, + 38960 - 11904: 0xC055, + 38962 - 11904: 0xEC5B, + 38963 - 11904: 0x90F7, + 38964 - 11904: 0x90F6, + 38965 - 11904: 0xEC59, + 38967 - 11904: 0xC058, + 38968 - 11904: 0xC056, + 38969 - 11904: 0xC05A, + 38971 - 11904: 0xC057, + 38977 - 11904: 0xEF45, + 38979 - 11904: 0xEF4A, + 38980 - 11904: 0xEF46, + 38981 - 11904: 0xEF49, + 38982 - 11904: 0xC1FB, + 38983 - 11904: 0x9B5E, + 38984 - 11904: 0xEDD4, + 38985 - 11904: 0xEF48, + 38986 - 11904: 0xEF47, + 38987 - 11904: 0x90F8, + 38988 - 11904: 0xC344, + 38989 - 11904: 0xC342, + 38990 - 11904: 0xC345, + 38991 - 11904: 0xC343, + 38992 - 11904: 0xF1A8, + 38993 - 11904: 0xF1A9, + 38994 - 11904: 0xF1AA, + 38995 - 11904: 0xC346, + 38998 - 11904: 0x8CFC, + 38999 - 11904: 0xF3AA, + 39000 - 11904: 0xC440, + 39001 - 11904: 0xF3A8, + 39003 - 11904: 0xC441, + 39004 - 11904: 0xF3A7, + 39005 - 11904: 0xF3A9, + 39006 - 11904: 0xC3FE, + 39007 - 11904: 0xF551, + 39008 - 11904: 0xF54E, + 39010 - 11904: 0xF54F, + 39011 - 11904: 0xF550, + 39012 - 11904: 0xF672, + 39013 - 11904: 0xC556, + 39014 - 11904: 0x90F9, + 39015 - 11904: 0xC555, + 39016 - 11904: 0x8CC9, + 39017 - 11904: 0xF774, + 39018 - 11904: 0xF773, + 39019 - 11904: 0xC5B8, + 39020 - 11904: 0xFA6A, + 39023 - 11904: 0xC5E3, + 39024 - 11904: 0xC649, + 39025 - 11904: 0xC660, + 39026 - 11904: 0xF958, + 39027 - 11904: 0xF9AE, + 39028 - 11904: 0xF9AF, + 39029 - 11904: 0x8BEF, + 39080 - 11904: 0xADB7, + 39081 - 11904: 0xDCAD, + 39084 - 11904: 0xE0E1, + 39085 - 11904: 0xE4CC, + 39086 - 11904: 0xE4CD, + 39087 - 11904: 0xBBE3, + 39089 - 11904: 0xBBE4, + 39090 - 11904: 0xE8BE, + 39091 - 11904: 0xBE68, + 39092 - 11904: 0x9FE0, + 39094 - 11904: 0xC1FC, + 39095 - 11904: 0x9142, + 39096 - 11904: 0xF1AB, + 39097 - 11904: 0x9A62, + 39098 - 11904: 0xC347, + 39099 - 11904: 0xF3AD, + 39100 - 11904: 0xC442, + 39101 - 11904: 0xF3AC, + 39102 - 11904: 0xF3AE, + 39103 - 11904: 0xF3AB, + 39104 - 11904: 0xF675, + 39105 - 11904: 0xF552, + 39106 - 11904: 0xF553, + 39107 - 11904: 0x9569, + 39108 - 11904: 0xC4C6, + 39110 - 11904: 0xF674, + 39111 - 11904: 0x9144, + 39112 - 11904: 0x9143, + 39113 - 11904: 0xF673, + 39114 - 11904: 0x9141, + 39115 - 11904: 0xF775, + 39116 - 11904: 0xF9B0, + 39118 - 11904: 0x8BF0, + 39131 - 11904: 0xADB8, + 39132 - 11904: 0x9660, + 39134 - 11904: 0x8BF1, + 39135 - 11904: 0xADB9, + 39136 - 11904: 0x99F6, + 39137 - 11904: 0x9149, + 39138 - 11904: 0xB0A7, + 39139 - 11904: 0xD448, + 39141 - 11904: 0xD84F, + 39142 - 11904: 0x914A, + 39143 - 11904: 0xB6B8, + 39145 - 11904: 0xB6BB, + 39146 - 11904: 0xB6B9, + 39147 - 11904: 0xDCAE, + 39148 - 11904: 0x914B, + 39149 - 11904: 0xB6BD, + 39151 - 11904: 0xB6BA, + 39153 - 11904: 0x9A64, + 39154 - 11904: 0xB6BC, + 39156 - 11904: 0xB97E, + 39157 - 11904: 0x8ABF, + 39158 - 11904: 0xE0E2, + 39161 - 11904: 0xE0E3, + 39162 - 11904: 0xE8C0, + 39164 - 11904: 0xB97D, + 39165 - 11904: 0xB9A1, + 39166 - 11904: 0xB9A2, + 39168 - 11904: 0xE4CF, + 39170 - 11904: 0xE4CE, + 39171 - 11904: 0xBBE5, + 39173 - 11904: 0xBBE6, + 39175 - 11904: 0xE4D0, + 39176 - 11904: 0xE8BF, + 39177 - 11904: 0xBBE8, + 39178 - 11904: 0xBE69, + 39180 - 11904: 0xBBE7, + 39182 - 11904: 0x9A66, + 39184 - 11904: 0xC05C, + 39185 - 11904: 0xE8C1, + 39186 - 11904: 0xBE6B, + 39187 - 11904: 0xBE6A, + 39188 - 11904: 0xE8C2, + 39189 - 11904: 0xE8C5, + 39190 - 11904: 0xE8C3, + 39191 - 11904: 0xE8C4, + 39192 - 11904: 0xBE6C, + 39193 - 11904: 0x9A67, + 39194 - 11904: 0xC061, + 39195 - 11904: 0xC05F, + 39196 - 11904: 0x9A69, + 39198 - 11904: 0xC05E, + 39199 - 11904: 0xEC5D, + 39201 - 11904: 0xC060, + 39204 - 11904: 0xEC5C, + 39205 - 11904: 0xEF4B, + 39207 - 11904: 0xEC5E, + 39208 - 11904: 0xC05D, + 39209 - 11904: 0xEC5F, + 39210 - 11904: 0xEF4E, + 39211 - 11904: 0xEF4C, + 39212 - 11904: 0xEF4D, + 39213 - 11904: 0xEF52, + 39214 - 11904: 0xC34B, + 39215 - 11904: 0xEF51, + 39216 - 11904: 0xEF54, + 39217 - 11904: 0xEF53, + 39218 - 11904: 0xEF50, + 39219 - 11904: 0xEF4F, + 39221 - 11904: 0xC1FD, + 39223 - 11904: 0x9A6A, + 39224 - 11904: 0x9652, + 39225 - 11904: 0x914D, + 39226 - 11904: 0xF1AE, + 39227 - 11904: 0x9666, + 39228 - 11904: 0xF1AD, + 39229 - 11904: 0xC34A, + 39230 - 11904: 0xC348, + 39231 - 11904: 0xC349, + 39232 - 11904: 0x9F7B, + 39233 - 11904: 0xF1AC, + 39234 - 11904: 0x9A6B, + 39235 - 11904: 0xF3B1, + 39237 - 11904: 0xC443, + 39239 - 11904: 0xF3B0, + 39240 - 11904: 0xF3AF, + 39241 - 11904: 0xC444, + 39242 - 11904: 0xA06C, + 39243 - 11904: 0xF558, + 39244 - 11904: 0xF557, + 39245 - 11904: 0x9667, + 39246 - 11904: 0xF555, + 39248 - 11904: 0xF554, + 39249 - 11904: 0xC4C8, + 39250 - 11904: 0xC4C7, + 39251 - 11904: 0xF559, + 39252 - 11904: 0xF776, + 39253 - 11904: 0xC5B9, + 39254 - 11904: 0xF677, + 39255 - 11904: 0xC557, + 39256 - 11904: 0xF676, + 39257 - 11904: 0xF556, + 39259 - 11904: 0xF777, + 39260 - 11904: 0xC5E4, + 39261 - 11904: 0x9A6C, + 39262 - 11904: 0xC661, + 39263 - 11904: 0xF959, + 39265 - 11904: 0xF9B1, + 39266 - 11904: 0x9A6D, + 39267 - 11904: 0x8BF2, + 39318 - 11904: 0xADBA, + 39319 - 11904: 0xD850, + 39320 - 11904: 0xEF55, + 39321 - 11904: 0xADBB, + 39323 - 11904: 0x966A, + 39324 - 11904: 0xE4D2, + 39325 - 11904: 0xE4D1, + 39326 - 11904: 0xEC60, + 39329 - 11904: 0xEF57, + 39331 - 11904: 0xEF56, + 39332 - 11904: 0xFCEA, + 39333 - 11904: 0xC34C, + 39334 - 11904: 0xF3B2, + 39335 - 11904: 0xF3B3, + 39336 - 11904: 0xC4C9, + 39338 - 11904: 0x966C, + 39339 - 11904: 0xF9B2, + 39340 - 11904: 0xB0A8, + 39341 - 11904: 0xB6BF, + 39342 - 11904: 0xB6BE, + 39343 - 11904: 0xE0E4, + 39344 - 11904: 0xE0E6, + 39345 - 11904: 0xB9A4, + 39346 - 11904: 0xE0E5, + 39347 - 11904: 0xB9A3, + 39348 - 11904: 0xB9A5, + 39349 - 11904: 0xE0E7, + 39352 - 11904: 0x91C4, + 39353 - 11904: 0xE4D4, + 39354 - 11904: 0xE4D6, + 39355 - 11904: 0xE4D5, + 39356 - 11904: 0x9677, + 39357 - 11904: 0xE4D8, + 39361 - 11904: 0xBBE9, + 39362 - 11904: 0xE4D7, + 39363 - 11904: 0xE4D3, + 39364 - 11904: 0x99F4, + 39365 - 11904: 0x9A6F, + 39367 - 11904: 0xE4D9, + 39369 - 11904: 0xE8CC, + 39371 - 11904: 0xE8CF, + 39372 - 11904: 0xE8D1, + 39373 - 11904: 0xE8C7, + 39374 - 11904: 0xE8CB, + 39375 - 11904: 0xE8C8, + 39376 - 11904: 0xBE6E, + 39377 - 11904: 0xBE71, + 39378 - 11904: 0xBE73, + 39379 - 11904: 0xE8C9, + 39380 - 11904: 0xE8CA, + 39381 - 11904: 0xBE72, + 39382 - 11904: 0xE8CD, + 39383 - 11904: 0xE8D0, + 39384 - 11904: 0xE8CE, + 39385 - 11904: 0xBE74, + 39386 - 11904: 0x9FAB, + 39387 - 11904: 0xBE70, + 39388 - 11904: 0xE8C6, + 39389 - 11904: 0xBE6D, + 39391 - 11904: 0xBE6F, + 39392 - 11904: 0x8CBE, + 39393 - 11904: 0x8EC1, + 39394 - 11904: 0xC063, + 39395 - 11904: 0xEC66, + 39396 - 11904: 0xEC64, + 39397 - 11904: 0xEC63, + 39398 - 11904: 0x9555, + 39399 - 11904: 0xEC69, + 39401 - 11904: 0xEC68, + 39402 - 11904: 0xEC67, + 39404 - 11904: 0xEC62, + 39405 - 11904: 0xC062, + 39406 - 11904: 0xEC61, + 39408 - 11904: 0xEC65, + 39409 - 11904: 0xC064, + 39412 - 11904: 0xEF5A, + 39413 - 11904: 0x9152, + 39414 - 11904: 0xEF5E, + 39415 - 11904: 0xEF5B, + 39416 - 11904: 0xEF5D, + 39417 - 11904: 0xEF5C, + 39418 - 11904: 0xEF59, + 39419 - 11904: 0xEF5F, + 39420 - 11904: 0xEF62, + 39421 - 11904: 0xEF60, + 39422 - 11904: 0xEF61, + 39423 - 11904: 0xC240, + 39425 - 11904: 0xC1FE, + 39426 - 11904: 0xEF58, + 39427 - 11904: 0xEF63, + 39428 - 11904: 0xF1B3, + 39429 - 11904: 0xF1B6, + 39430 - 11904: 0xF1B8, + 39431 - 11904: 0xF1B7, + 39433 - 11904: 0xF1B1, + 39434 - 11904: 0xF1B5, + 39435 - 11904: 0xF1B0, + 39436 - 11904: 0x9153, + 39437 - 11904: 0xF1B2, + 39438 - 11904: 0xC34D, + 39439 - 11904: 0xF1AF, + 39440 - 11904: 0x9155, + 39441 - 11904: 0xF1B4, + 39444 - 11904: 0xF3C0, + 39445 - 11904: 0xF3B5, + 39446 - 11904: 0xC445, + 39449 - 11904: 0xC446, + 39450 - 11904: 0xF3B4, + 39451 - 11904: 0xF3B9, + 39452 - 11904: 0xF3BF, + 39453 - 11904: 0xF3B7, + 39454 - 11904: 0xF3BE, + 39455 - 11904: 0x955D, + 39456 - 11904: 0xF3BB, + 39457 - 11904: 0x9671, + 39458 - 11904: 0xF3BA, + 39459 - 11904: 0xF3BD, + 39460 - 11904: 0xF3B8, + 39461 - 11904: 0xF3B6, + 39462 - 11904: 0x9C6D, + 39463 - 11904: 0xF3BC, + 39465 - 11904: 0xF560, + 39466 - 11904: 0xF55E, + 39467 - 11904: 0xC4CA, + 39468 - 11904: 0xF55D, + 39469 - 11904: 0xF563, + 39470 - 11904: 0xF561, + 39471 - 11904: 0x9673, + 39472 - 11904: 0xC4CB, + 39473 - 11904: 0xF55C, + 39474 - 11904: 0xF55A, + 39476 - 11904: 0xF55B, + 39477 - 11904: 0xC4CD, + 39478 - 11904: 0xF55F, + 39479 - 11904: 0xC4CC, + 39480 - 11904: 0xF562, + 39481 - 11904: 0xF678, + 39482 - 11904: 0xF67E, + 39483 - 11904: 0x9154, + 39484 - 11904: 0x9A71, + 39485 - 11904: 0xF679, + 39486 - 11904: 0xC55B, + 39487 - 11904: 0xF6A1, + 39488 - 11904: 0xC55A, + 39489 - 11904: 0xF67D, + 39490 - 11904: 0xF67C, + 39491 - 11904: 0xC559, + 39492 - 11904: 0xF67B, + 39493 - 11904: 0xC558, + 39494 - 11904: 0xF67A, + 39496 - 11904: 0xF77D, + 39497 - 11904: 0xF7A1, + 39498 - 11904: 0xF77E, + 39500 - 11904: 0xF77B, + 39501 - 11904: 0xC5BB, + 39502 - 11904: 0xF778, + 39503 - 11904: 0xF77C, + 39504 - 11904: 0xF7A3, + 39506 - 11904: 0xF7A2, + 39507 - 11904: 0xF779, + 39508 - 11904: 0xF77A, + 39509 - 11904: 0xC5BA, + 39510 - 11904: 0xF852, + 39511 - 11904: 0xC5E7, + 39512 - 11904: 0x9156, + 39513 - 11904: 0xF853, + 39514 - 11904: 0xC5E5, + 39515 - 11904: 0xC5E6, + 39516 - 11904: 0x966D, + 39518 - 11904: 0xF8D3, + 39519 - 11904: 0xC64A, + 39520 - 11904: 0xF976, + 39522 - 11904: 0xC66A, + 39523 - 11904: 0x9557, + 39524 - 11904: 0xF9B3, + 39525 - 11904: 0xC66B, + 39526 - 11904: 0xF9B4, + 39527 - 11904: 0xF9B5, + 39528 - 11904: 0xF9C3, + 39529 - 11904: 0xF9C2, + 39530 - 11904: 0xC67A, + 39531 - 11904: 0xF9CD, + 39532 - 11904: 0x89C6, + 39567 - 11904: 0x89C7, + 39592 - 11904: 0xB0A9, + 39595 - 11904: 0xE0E9, + 39597 - 11904: 0xE0E8, + 39599 - 11904: 0xBBEA, + 39600 - 11904: 0xBBEB, + 39601 - 11904: 0xE4DA, + 39602 - 11904: 0x8A6A, + 39603 - 11904: 0xE8D2, + 39604 - 11904: 0xEC6C, + 39606 - 11904: 0x8B57, + 39607 - 11904: 0xBE75, + 39608 - 11904: 0xC065, + 39609 - 11904: 0xEC6A, + 39610 - 11904: 0x9FE1, + 39611 - 11904: 0xEC6D, + 39612 - 11904: 0xC066, + 39613 - 11904: 0x9B5F, + 39614 - 11904: 0xEF64, + 39615 - 11904: 0xEC6B, + 39616 - 11904: 0xF1B9, + 39617 - 11904: 0xC34E, + 39618 - 11904: 0xF3C1, + 39622 - 11904: 0xF566, + 39623 - 11904: 0xF564, + 39626 - 11904: 0xF565, + 39629 - 11904: 0xF6A2, + 39631 - 11904: 0xC55C, + 39632 - 11904: 0xF7A4, + 39633 - 11904: 0xC5EA, + 39634 - 11904: 0xC5BC, + 39635 - 11904: 0xC5E8, + 39636 - 11904: 0xC5E9, + 39637 - 11904: 0xF8D4, + 39638 - 11904: 0xC662, + 39639 - 11904: 0xA05D, + 39640 - 11904: 0xB0AA, + 39644 - 11904: 0xF1BA, + 39647 - 11904: 0xD449, + 39648 - 11904: 0x915B, + 39649 - 11904: 0xB9A6, + 39650 - 11904: 0x915C, + 39651 - 11904: 0xE4DB, + 39654 - 11904: 0xBBEC, + 39655 - 11904: 0xE4DC, + 39659 - 11904: 0xE8D4, + 39660 - 11904: 0xE8D3, + 39661 - 11904: 0xC068, + 39662 - 11904: 0xBE76, + 39663 - 11904: 0xBE77, + 39665 - 11904: 0xE8D7, + 39666 - 11904: 0xE8D6, + 39667 - 11904: 0xE8D5, + 39668 - 11904: 0x915E, + 39670 - 11904: 0xEC6E, + 39671 - 11904: 0xEC71, + 39673 - 11904: 0xEC70, + 39674 - 11904: 0xEC6F, + 39675 - 11904: 0xC067, + 39676 - 11904: 0xEF68, + 39677 - 11904: 0xEF66, + 39678 - 11904: 0xEF65, + 39679 - 11904: 0x9F5C, + 39681 - 11904: 0xEF67, + 39682 - 11904: 0x9F57, + 39683 - 11904: 0xC34F, + 39684 - 11904: 0xF1BC, + 39685 - 11904: 0xF1BD, + 39686 - 11904: 0xC350, + 39688 - 11904: 0xF1BB, + 39689 - 11904: 0x9F65, + 39690 - 11904: 0xF3C3, + 39691 - 11904: 0xF3C2, + 39692 - 11904: 0xF3C5, + 39693 - 11904: 0xC447, + 39694 - 11904: 0xF3C4, + 39695 - 11904: 0x9A72, + 39696 - 11904: 0xF567, + 39697 - 11904: 0xF569, + 39698 - 11904: 0xF568, + 39700 - 11904: 0x9160, + 39701 - 11904: 0xF6A3, + 39702 - 11904: 0xF6A6, + 39703 - 11904: 0xF6A4, + 39704 - 11904: 0xF6A5, + 39705 - 11904: 0xF7A5, + 39706 - 11904: 0xC5BD, + 39710 - 11904: 0xF854, + 39711 - 11904: 0xF855, + 39712 - 11904: 0xF856, + 39714 - 11904: 0xC64B, + 39715 - 11904: 0xC663, + 39716 - 11904: 0xF9B6, + 39717 - 11904: 0xB0AB, + 39719 - 11904: 0xBE78, + 39720 - 11904: 0xC069, + 39721 - 11904: 0xF1BE, + 39722 - 11904: 0x9F5E, + 39723 - 11904: 0xF7A6, + 39725 - 11904: 0x9161, + 39726 - 11904: 0xF9C4, + 39727 - 11904: 0xD44A, + 39729 - 11904: 0xC67B, + 39730 - 11904: 0xB0AC, + 39731 - 11904: 0xEC72, + 39732 - 11904: 0x9164, + 39733 - 11904: 0xF1BF, + 39735 - 11904: 0xF3C6, + 39737 - 11904: 0x9F41, + 39738 - 11904: 0xF6A7, + 39739 - 11904: 0xF7A7, + 39740 - 11904: 0xB0AD, + 39742 - 11904: 0xE4DD, + 39743 - 11904: 0xE4DE, + 39744 - 11904: 0x9169, + 39745 - 11904: 0xBBED, + 39746 - 11904: 0xBBEE, + 39747 - 11904: 0xE8D9, + 39748 - 11904: 0xBE7A, + 39749 - 11904: 0xBE79, + 39750 - 11904: 0xE8D8, + 39752 - 11904: 0xEF69, + 39754 - 11904: 0xF1C0, + 39755 - 11904: 0xF1C2, + 39756 - 11904: 0xF1C1, + 39757 - 11904: 0xC353, + 39758 - 11904: 0xC352, + 39759 - 11904: 0xC351, + 39760 - 11904: 0x9168, + 39761 - 11904: 0xC55E, + 39762 - 11904: 0xF6A8, + 39764 - 11904: 0xC55D, + 39765 - 11904: 0xF7A9, + 39766 - 11904: 0xF7A8, + 39768 - 11904: 0xC64C, + 39769 - 11904: 0xF8D5, + 39770 - 11904: 0xB3BD, + 39771 - 11904: 0xE0EA, + 39775 - 11904: 0xE4E1, + 39776 - 11904: 0xE4DF, + 39777 - 11904: 0xE4E0, + 39780 - 11904: 0xE8E2, + 39782 - 11904: 0xE8DD, + 39783 - 11904: 0xE8DA, + 39784 - 11904: 0xE8E1, + 39785 - 11904: 0x9A74, + 39788 - 11904: 0xE8E3, + 39791 - 11904: 0xBE7C, + 39792 - 11904: 0xE8E0, + 39793 - 11904: 0xE8DC, + 39796 - 11904: 0xE8DB, + 39797 - 11904: 0xE8DF, + 39798 - 11904: 0xE8DE, + 39799 - 11904: 0xBE7B, + 39802 - 11904: 0xEC7D, + 39803 - 11904: 0xEC78, + 39804 - 11904: 0xEC76, + 39805 - 11904: 0xECA1, + 39806 - 11904: 0xEC77, + 39807 - 11904: 0x96B2, + 39808 - 11904: 0xEC73, + 39809 - 11904: 0x9A75, + 39810 - 11904: 0xEC79, + 39811 - 11904: 0xFDA5, + 39813 - 11904: 0xEC74, + 39814 - 11904: 0xEF72, + 39815 - 11904: 0xEC75, + 39816 - 11904: 0xECA2, + 39819 - 11904: 0x9EE9, + 39821 - 11904: 0x8BBA, + 39822 - 11904: 0x916D, + 39823 - 11904: 0xA060, + 39824 - 11904: 0xEC7C, + 39825 - 11904: 0xC06A, + 39826 - 11904: 0xEC7B, + 39827 - 11904: 0xEC7A, + 39829 - 11904: 0xEC7E, + 39831 - 11904: 0x9FDE, + 39834 - 11904: 0xEF6A, + 39835 - 11904: 0xEF6D, + 39837 - 11904: 0x9FC3, + 39838 - 11904: 0xEF6C, + 39839 - 11904: 0x96B5, + 39840 - 11904: 0xEF74, + 39841 - 11904: 0xEF6F, + 39842 - 11904: 0xEF73, + 39844 - 11904: 0xEF71, + 39845 - 11904: 0xEF70, + 39846 - 11904: 0xEF6E, + 39848 - 11904: 0xEF6B, + 39850 - 11904: 0xC243, + 39851 - 11904: 0xC242, + 39853 - 11904: 0xC244, + 39854 - 11904: 0xC241, + 39855 - 11904: 0xEF75, + 39856 - 11904: 0xA067, + 39861 - 11904: 0xF1C8, + 39862 - 11904: 0xF1CB, + 39864 - 11904: 0xF1C9, + 39865 - 11904: 0xF1CD, + 39869 - 11904: 0xF1CE, + 39871 - 11904: 0xF1C6, + 39872 - 11904: 0xC358, + 39873 - 11904: 0xF1C7, + 39875 - 11904: 0xF1C5, + 39876 - 11904: 0xF1CC, + 39878 - 11904: 0xF1C4, + 39879 - 11904: 0xF1C3, + 39880 - 11904: 0xC357, + 39881 - 11904: 0xC355, + 39882 - 11904: 0xC354, + 39887 - 11904: 0x96B3, + 39891 - 11904: 0xF1CA, + 39892 - 11904: 0xF3CF, + 39893 - 11904: 0xF3D5, + 39894 - 11904: 0xC44A, + 39895 - 11904: 0xF3D0, + 39897 - 11904: 0xF3D3, + 39898 - 11904: 0xF3D7, + 39899 - 11904: 0xC44B, + 39900 - 11904: 0xF3D2, + 39901 - 11904: 0x9A76, + 39902 - 11904: 0xF3CA, + 39904 - 11904: 0xF3C9, + 39905 - 11904: 0xF3D6, + 39906 - 11904: 0xF3CD, + 39908 - 11904: 0xF3CB, + 39909 - 11904: 0xF3D4, + 39910 - 11904: 0xF3CC, + 39911 - 11904: 0xC449, + 39912 - 11904: 0xC448, + 39913 - 11904: 0x95D5, + 39914 - 11904: 0xF3C7, + 39915 - 11904: 0xF3C8, + 39916 - 11904: 0xF3D1, + 39917 - 11904: 0x9ECA, + 39920 - 11904: 0xF3CE, + 39921 - 11904: 0x9A77, + 39924 - 11904: 0x9A78, + 39927 - 11904: 0xF56C, + 39928 - 11904: 0xF56F, + 39933 - 11904: 0xC356, + 39935 - 11904: 0x9170, + 39938 - 11904: 0x916F, + 39941 - 11904: 0xF56D, + 39942 - 11904: 0xF573, + 39943 - 11904: 0xF571, + 39944 - 11904: 0xF56B, + 39945 - 11904: 0xF576, + 39946 - 11904: 0x9FA3, + 39947 - 11904: 0xF56A, + 39948 - 11904: 0x9171, + 39949 - 11904: 0xC4CF, + 39950 - 11904: 0xF572, + 39952 - 11904: 0x96B1, + 39954 - 11904: 0xF56E, + 39955 - 11904: 0xC4CE, + 39956 - 11904: 0xF575, + 39957 - 11904: 0x9F63, + 39959 - 11904: 0xF574, + 39963 - 11904: 0x9F67, + 39964 - 11904: 0xF6AB, + 39965 - 11904: 0xF6AA, + 39967 - 11904: 0x8BB9, + 39968 - 11904: 0x9A7A, + 39969 - 11904: 0xF6B1, + 39971 - 11904: 0xF6AD, + 39972 - 11904: 0xF6B0, + 39973 - 11904: 0xC560, + 39974 - 11904: 0x8B56, + 39976 - 11904: 0xF6AE, + 39977 - 11904: 0xF6AF, + 39979 - 11904: 0xF6A9, + 39980 - 11904: 0xF6AC, + 39981 - 11904: 0xC55F, + 39983 - 11904: 0x9ADA, + 39985 - 11904: 0xC5BF, + 39986 - 11904: 0xF7B4, + 39987 - 11904: 0xF7AF, + 39988 - 11904: 0xF7B3, + 39989 - 11904: 0x96B0, + 39990 - 11904: 0xF7B6, + 39991 - 11904: 0xF7B2, + 39993 - 11904: 0xF7AE, + 39994 - 11904: 0x9A7E, + 39995 - 11904: 0xC5C1, + 39996 - 11904: 0xF7B1, + 39997 - 11904: 0xF7B5, + 39998 - 11904: 0xC5C0, + 39999 - 11904: 0xF7AC, + 40000 - 11904: 0xF570, + 40001 - 11904: 0xF7B0, + 40004 - 11904: 0xF7AD, + 40005 - 11904: 0x9DDE, + 40006 - 11904: 0xF7AA, + 40008 - 11904: 0xF7AB, + 40009 - 11904: 0xC5BE, + 40010 - 11904: 0xF85A, + 40011 - 11904: 0xF85C, + 40012 - 11904: 0xF85F, + 40013 - 11904: 0xF85B, + 40014 - 11904: 0xF860, + 40015 - 11904: 0x96AD, + 40016 - 11904: 0xF859, + 40018 - 11904: 0xF857, + 40019 - 11904: 0x96AE, + 40020 - 11904: 0xC5EB, + 40021 - 11904: 0xF85D, + 40022 - 11904: 0xC5ED, + 40023 - 11904: 0xC5EC, + 40024 - 11904: 0xF858, + 40025 - 11904: 0xF85E, + 40029 - 11904: 0x9EA1, + 40030 - 11904: 0xF8DA, + 40031 - 11904: 0xC64D, + 40032 - 11904: 0xF8DB, + 40034 - 11904: 0xF8D9, + 40035 - 11904: 0xF8D6, + 40038 - 11904: 0xF8D8, + 40039 - 11904: 0xF8D7, + 40040 - 11904: 0xF95A, + 40045 - 11904: 0xF95C, + 40046 - 11904: 0xF95B, + 40049 - 11904: 0xF979, + 40050 - 11904: 0x9E50, + 40051 - 11904: 0xF978, + 40052 - 11904: 0xF977, + 40053 - 11904: 0xF97A, + 40055 - 11904: 0xC673, + 40056 - 11904: 0xC674, + 40057 - 11904: 0xF9CA, + 40058 - 11904: 0xF9CE, + 40059 - 11904: 0x96AF, + 40060 - 11904: 0x8BF4, + 40165 - 11904: 0xB3BE, + 40166 - 11904: 0xDCAF, + 40167 - 11904: 0xE0ED, + 40169 - 11904: 0xB9A7, + 40170 - 11904: 0xE0EB, + 40173 - 11904: 0xE0EC, + 40177 - 11904: 0xE4E2, + 40178 - 11904: 0xE4E3, + 40179 - 11904: 0xBBF1, + 40180 - 11904: 0xBBEF, + 40181 - 11904: 0xE4E4, + 40182 - 11904: 0xBBF0, + 40183 - 11904: 0xE8E8, + 40185 - 11904: 0xE8EB, + 40186 - 11904: 0xE8E5, + 40187 - 11904: 0xE8EC, + 40188 - 11904: 0xE8E4, + 40189 - 11904: 0xE8E6, + 40191 - 11904: 0xE8E7, + 40192 - 11904: 0xE8EA, + 40194 - 11904: 0x9FA4, + 40195 - 11904: 0xBEA1, + 40196 - 11904: 0xE8EF, + 40197 - 11904: 0xE8EE, + 40198 - 11904: 0xBE7D, + 40199 - 11904: 0xE8E9, + 40200 - 11904: 0xE8ED, + 40201 - 11904: 0xBE7E, + 40204 - 11904: 0x96BD, + 40208 - 11904: 0xECAC, + 40210 - 11904: 0xC06F, + 40212 - 11904: 0xECA7, + 40213 - 11904: 0xC06B, + 40214 - 11904: 0x96F4, + 40215 - 11904: 0xECA4, + 40216 - 11904: 0xECAA, + 40217 - 11904: 0xECAD, + 40219 - 11904: 0xC070, + 40221 - 11904: 0xECA9, + 40222 - 11904: 0xECA6, + 40223 - 11904: 0xECAE, + 40224 - 11904: 0xECA5, + 40225 - 11904: 0x96B8, + 40226 - 11904: 0xECAB, + 40227 - 11904: 0xC06C, + 40229 - 11904: 0xECA3, + 40230 - 11904: 0xC06D, + 40232 - 11904: 0xC06E, + 40233 - 11904: 0xECA8, + 40237 - 11904: 0xEFA9, + 40238 - 11904: 0xEF7A, + 40239 - 11904: 0xEF7B, + 40240 - 11904: 0xEF7E, + 40241 - 11904: 0xEF7C, + 40243 - 11904: 0xEF76, + 40244 - 11904: 0xFAA1, + 40246 - 11904: 0xEF79, + 40247 - 11904: 0xEFA5, + 40248 - 11904: 0xEF7D, + 40249 - 11904: 0x91A7, + 40251 - 11904: 0xC245, + 40253 - 11904: 0xEFA7, + 40254 - 11904: 0xEFA4, + 40255 - 11904: 0xC246, + 40256 - 11904: 0xEFA6, + 40257 - 11904: 0xEF77, + 40258 - 11904: 0xEFA2, + 40259 - 11904: 0xEFA3, + 40260 - 11904: 0xA05E, + 40261 - 11904: 0xEFA1, + 40265 - 11904: 0x9A7D, + 40266 - 11904: 0xF1D2, + 40267 - 11904: 0xF1D4, + 40268 - 11904: 0xF1D7, + 40270 - 11904: 0x8948, + 40271 - 11904: 0xF1D1, + 40272 - 11904: 0x9EB1, + 40273 - 11904: 0xC359, + 40274 - 11904: 0xF1D9, + 40275 - 11904: 0xF1D0, + 40276 - 11904: 0xF1DA, + 40278 - 11904: 0xF1D6, + 40279 - 11904: 0xF1D8, + 40280 - 11904: 0xF1DC, + 40281 - 11904: 0xF1D5, + 40282 - 11904: 0xF1DD, + 40283 - 11904: 0xF1D3, + 40284 - 11904: 0xF1CF, + 40285 - 11904: 0xC35A, + 40286 - 11904: 0x9DDB, + 40287 - 11904: 0xF1DB, + 40288 - 11904: 0xC35B, + 40289 - 11904: 0xC44D, + 40295 - 11904: 0xEF78, + 40296 - 11904: 0xF3F1, + 40297 - 11904: 0xF3E8, + 40298 - 11904: 0xC44F, + 40299 - 11904: 0xF3E4, + 40300 - 11904: 0xC450, + 40301 - 11904: 0x95BF, + 40302 - 11904: 0x8A73, + 40303 - 11904: 0xF3ED, + 40304 - 11904: 0xF3E7, + 40305 - 11904: 0xF3DD, + 40306 - 11904: 0xC44E, + 40307 - 11904: 0xF3EA, + 40308 - 11904: 0xF3E5, + 40309 - 11904: 0xF3E6, + 40311 - 11904: 0xF3D8, + 40312 - 11904: 0xF3DF, + 40313 - 11904: 0xF3EE, + 40315 - 11904: 0xF3EB, + 40316 - 11904: 0x9EFE, + 40317 - 11904: 0xF3E3, + 40318 - 11904: 0x917A, + 40319 - 11904: 0xF3EF, + 40320 - 11904: 0xF3DE, + 40321 - 11904: 0xF3D9, + 40322 - 11904: 0xF3EC, + 40323 - 11904: 0x917B, + 40324 - 11904: 0xF3DB, + 40325 - 11904: 0xF3E9, + 40326 - 11904: 0xF3E0, + 40327 - 11904: 0xF3F0, + 40328 - 11904: 0xF3DC, + 40329 - 11904: 0xC44C, + 40330 - 11904: 0xF3DA, + 40331 - 11904: 0xF3E1, + 40332 - 11904: 0xF3E2, + 40336 - 11904: 0xF57D, + 40338 - 11904: 0xF57B, + 40339 - 11904: 0x9AA3, + 40340 - 11904: 0xF5A2, + 40342 - 11904: 0xF5AE, + 40343 - 11904: 0xF5A5, + 40344 - 11904: 0xF57C, + 40345 - 11904: 0xF578, + 40346 - 11904: 0xF5A7, + 40347 - 11904: 0xF57E, + 40348 - 11904: 0xF5A3, + 40349 - 11904: 0xF57A, + 40350 - 11904: 0xF5AA, + 40351 - 11904: 0xF577, + 40352 - 11904: 0xF5A1, + 40353 - 11904: 0xF5A6, + 40354 - 11904: 0xF5A8, + 40355 - 11904: 0xF5AB, + 40356 - 11904: 0xF579, + 40357 - 11904: 0x96C2, + 40358 - 11904: 0xF5AF, + 40359 - 11904: 0xF5B0, + 40360 - 11904: 0xF5A9, + 40361 - 11904: 0xF5AD, + 40362 - 11904: 0xF5A4, + 40363 - 11904: 0x9F77, + 40364 - 11904: 0xF6C1, + 40365 - 11904: 0xF6C4, + 40367 - 11904: 0xC561, + 40369 - 11904: 0xF6C3, + 40370 - 11904: 0xF6C8, + 40371 - 11904: 0xF6C6, + 40372 - 11904: 0xC562, + 40373 - 11904: 0xF6BD, + 40374 - 11904: 0xF6B3, + 40375 - 11904: 0xF6B2, + 40376 - 11904: 0xC564, + 40377 - 11904: 0xF6BF, + 40378 - 11904: 0xF6C0, + 40379 - 11904: 0xF6BC, + 40380 - 11904: 0xF6B4, + 40381 - 11904: 0x9AA4, + 40382 - 11904: 0xF6B9, + 40383 - 11904: 0xF5AC, + 40384 - 11904: 0x9AA5, + 40385 - 11904: 0xF6B5, + 40386 - 11904: 0xC563, + 40387 - 11904: 0xF6BB, + 40388 - 11904: 0x91A1, + 40389 - 11904: 0xF6BA, + 40391 - 11904: 0xF6B6, + 40392 - 11904: 0xF6C2, + 40393 - 11904: 0x89B8, + 40394 - 11904: 0xF6B7, + 40395 - 11904: 0xF7BB, + 40396 - 11904: 0xF6C5, + 40397 - 11904: 0xF6C7, + 40398 - 11904: 0xF6BE, + 40399 - 11904: 0xF6B8, + 40400 - 11904: 0xF7BC, + 40401 - 11904: 0xF7BE, + 40402 - 11904: 0xF7B8, + 40403 - 11904: 0xC5C2, + 40404 - 11904: 0x9173, + 40405 - 11904: 0xF7C5, + 40406 - 11904: 0xF7C3, + 40407 - 11904: 0xC5C3, + 40408 - 11904: 0xF7C2, + 40409 - 11904: 0xF7C1, + 40410 - 11904: 0xF7BA, + 40411 - 11904: 0xF7B7, + 40412 - 11904: 0xF7BD, + 40413 - 11904: 0xF7C6, + 40414 - 11904: 0xF7B9, + 40415 - 11904: 0xF7BF, + 40417 - 11904: 0xF869, + 40418 - 11904: 0xF86E, + 40419 - 11904: 0xF864, + 40420 - 11904: 0xF867, + 40421 - 11904: 0xC5EE, + 40422 - 11904: 0xF86B, + 40424 - 11904: 0xF872, + 40425 - 11904: 0xF7C0, + 40427 - 11904: 0xF865, + 40428 - 11904: 0xF86F, + 40429 - 11904: 0xF873, + 40430 - 11904: 0xF86A, + 40431 - 11904: 0xF863, + 40432 - 11904: 0xF86D, + 40434 - 11904: 0xF86C, + 40435 - 11904: 0xF871, + 40436 - 11904: 0xF870, + 40437 - 11904: 0xF7C4, + 40438 - 11904: 0xF868, + 40439 - 11904: 0xF862, + 40440 - 11904: 0xF866, + 40441 - 11904: 0xC64E, + 40442 - 11904: 0xC64F, + 40443 - 11904: 0xF861, + 40444 - 11904: 0x9AA6, + 40445 - 11904: 0xF8E6, + 40446 - 11904: 0xF8DD, + 40447 - 11904: 0xF8E5, + 40448 - 11904: 0xF8E2, + 40449 - 11904: 0xF8E3, + 40450 - 11904: 0xF8DC, + 40451 - 11904: 0xF8DF, + 40452 - 11904: 0xF8E7, + 40453 - 11904: 0xF8E1, + 40454 - 11904: 0xF8E0, + 40455 - 11904: 0xF8DE, + 40457 - 11904: 0xF8E4, + 40458 - 11904: 0x89BD, + 40459 - 11904: 0xF95D, + 40460 - 11904: 0x89B9, + 40461 - 11904: 0xF95E, + 40462 - 11904: 0x917D, + 40463 - 11904: 0xF960, + 40464 - 11904: 0xF95F, + 40465 - 11904: 0xF962, + 40466 - 11904: 0xF961, + 40467 - 11904: 0xF97C, + 40468 - 11904: 0xF97B, + 40469 - 11904: 0xF9B7, + 40471 - 11904: 0xF9B8, + 40472 - 11904: 0x96BB, + 40473 - 11904: 0xF9C5, + 40474 - 11904: 0xC678, + 40475 - 11904: 0xC67C, + 40476 - 11904: 0x9FF2, + 40477 - 11904: 0xF9CF, + 40478 - 11904: 0xC67D, + 40479 - 11904: 0x8BF5, + 40565 - 11904: 0xB3BF, + 40569 - 11904: 0xC4D0, + 40570 - 11904: 0xF6C9, + 40571 - 11904: 0x9AA9, + 40572 - 11904: 0xC650, + 40573 - 11904: 0xC651, + 40575 - 11904: 0xB3C0, + 40576 - 11904: 0xE0EE, + 40577 - 11904: 0x9F54, + 40578 - 11904: 0xB9A8, + 40579 - 11904: 0xE8F0, + 40580 - 11904: 0x9FE3, + 40581 - 11904: 0x9EED, + 40582 - 11904: 0xECB0, + 40583 - 11904: 0xECB1, + 40584 - 11904: 0xECAF, + 40585 - 11904: 0xEFAB, + 40586 - 11904: 0xEFAA, + 40587 - 11904: 0xC247, + 40588 - 11904: 0xF1DF, + 40589 - 11904: 0xEFAC, + 40590 - 11904: 0xF1DE, + 40592 - 11904: 0x91AA, + 40593 - 11904: 0xF3F3, + 40594 - 11904: 0xC451, + 40595 - 11904: 0xC453, + 40596 - 11904: 0xF3F2, + 40597 - 11904: 0x91AB, + 40598 - 11904: 0xA070, + 40599 - 11904: 0xC452, + 40600 - 11904: 0x9F6D, + 40601 - 11904: 0xF5B1, + 40602 - 11904: 0xF5B3, + 40603 - 11904: 0xF5B2, + 40604 - 11904: 0xF6CA, + 40605 - 11904: 0xC565, + 40606 - 11904: 0x91AC, + 40607 - 11904: 0xC5EF, + 40608 - 11904: 0xF8E8, + 40609 - 11904: 0xF963, + 40610 - 11904: 0x91AD, + 40612 - 11904: 0xF9D2, + 40613 - 11904: 0xB3C1, + 40614 - 11904: 0xA0FD, + 40615 - 11904: 0xE4E5, + 40616 - 11904: 0x9FE2, + 40617 - 11904: 0xBEA2, + 40618 - 11904: 0x91AF, + 40619 - 11904: 0x9E41, + 40620 - 11904: 0x9AAA, + 40621 - 11904: 0xECB3, + 40622 - 11904: 0xECB2, + 40623 - 11904: 0x91B0, + 40624 - 11904: 0xEFAD, + 40625 - 11904: 0x9AAB, + 40628 - 11904: 0xC454, + 40629 - 11904: 0xC4D1, + 40630 - 11904: 0xF7C7, + 40631 - 11904: 0xF9CB, + 40635 - 11904: 0xB3C2, + 40636 - 11904: 0xBBF2, + 40637 - 11904: 0x9AAC, + 40638 - 11904: 0xBEA3, + 40639 - 11904: 0x9A4A, + 40640 - 11904: 0xF3F4, + 40641 - 11904: 0x91B2, + 40642 - 11904: 0xF874, + 40643 - 11904: 0xB6C0, + 40644 - 11904: 0x8BF6, + 40646 - 11904: 0x9AAD, + 40647 - 11904: 0x89B6, + 40648 - 11904: 0xEFAE, + 40652 - 11904: 0xC664, + 40653 - 11904: 0xB6C1, + 40654 - 11904: 0xBEA4, + 40655 - 11904: 0xC248, + 40656 - 11904: 0xF875, + 40657 - 11904: 0xB6C2, + 40659 - 11904: 0xE8F1, + 40660 - 11904: 0xC072, + 40661 - 11904: 0xECB4, + 40662 - 11904: 0xECB5, + 40664 - 11904: 0xC071, + 40666 - 11904: 0xEFAF, + 40667 - 11904: 0xC24C, + 40668 - 11904: 0xC24A, + 40669 - 11904: 0xC24B, + 40670 - 11904: 0xC249, + 40671 - 11904: 0xF1E0, + 40672 - 11904: 0xC35C, + 40674 - 11904: 0x9AAF, + 40676 - 11904: 0xF5B5, + 40677 - 11904: 0xF5B4, + 40678 - 11904: 0xF5B7, + 40679 - 11904: 0xF5B6, + 40680 - 11904: 0xC4D2, + 40683 - 11904: 0xF6CB, + 40685 - 11904: 0xF6CD, + 40686 - 11904: 0xF6CC, + 40687 - 11904: 0xC566, + 40688 - 11904: 0xF7C8, + 40689 - 11904: 0x9AB0, + 40690 - 11904: 0xF876, + 40691 - 11904: 0xF877, + 40692 - 11904: 0xC5F0, + 40693 - 11904: 0xF964, + 40694 - 11904: 0xF97D, + 40695 - 11904: 0xC675, + 40696 - 11904: 0x9AB1, + 40697 - 11904: 0xDCB0, + 40698 - 11904: 0xECB6, + 40699 - 11904: 0xEFB0, + 40700 - 11904: 0xF3F5, + 40701 - 11904: 0xE0EF, + 40702 - 11904: 0x9AA1, + 40703 - 11904: 0xEFB1, + 40704 - 11904: 0xF1E2, + 40705 - 11904: 0xF1E1, + 40706 - 11904: 0x91B9, + 40710 - 11904: 0xF878, + 40711 - 11904: 0xC652, + 40712 - 11904: 0x91BA, + 40713 - 11904: 0xF965, + 40714 - 11904: 0xF97E, + 40718 - 11904: 0xB9A9, + 40719 - 11904: 0xE8F2, + 40720 - 11904: 0xE8F3, + 40722 - 11904: 0xECB7, + 40723 - 11904: 0xB9AA, + 40725 - 11904: 0xC35D, + 40726 - 11904: 0xF1E3, + 40727 - 11904: 0x9F66, + 40728 - 11904: 0xF6CF, + 40729 - 11904: 0xC567, + 40730 - 11904: 0xF6D0, + 40731 - 11904: 0xF6CE, + 40732 - 11904: 0xF879, + 40734 - 11904: 0xF8E9, + 40736 - 11904: 0xB9AB, + 40738 - 11904: 0xEFB4, + 40739 - 11904: 0xEFB3, + 40740 - 11904: 0xEFB2, + 40741 - 11904: 0xF1E4, + 40742 - 11904: 0xA041, + 40743 - 11904: 0x8BB7, + 40744 - 11904: 0xF1E8, + 40745 - 11904: 0xF1E7, + 40746 - 11904: 0xF1E6, + 40747 - 11904: 0xF1E5, + 40748 - 11904: 0xC35E, + 40749 - 11904: 0xF3F6, + 40750 - 11904: 0xF5B9, + 40751 - 11904: 0xC4D3, + 40752 - 11904: 0xF5B8, + 40753 - 11904: 0xF6D1, + 40754 - 11904: 0xF7CB, + 40755 - 11904: 0xF7CA, + 40756 - 11904: 0xC5C4, + 40757 - 11904: 0xF7C9, + 40758 - 11904: 0xF87C, + 40759 - 11904: 0xF87B, + 40760 - 11904: 0xF87A, + 40761 - 11904: 0x91C0, + 40763 - 11904: 0xBBF3, + 40765 - 11904: 0xECB8, + 40766 - 11904: 0xC24D, + 40768 - 11904: 0xF3F7, + 40769 - 11904: 0xF3F8, + 40770 - 11904: 0xF7CC, + 40771 - 11904: 0xF87D, + 40772 - 11904: 0x9AB3, + 40773 - 11904: 0x91C3, + 40774 - 11904: 0xF8EA, + 40775 - 11904: 0xF966, + 40776 - 11904: 0xF9B9, + 40777 - 11904: 0xF9D4, + 40778 - 11904: 0xBBF4, + 40779 - 11904: 0xC24E, + 40780 - 11904: 0xF1E9, + 40781 - 11904: 0xF3F9, + 40782 - 11904: 0xF6D2, + 40783 - 11904: 0xF87E, + 40784 - 11904: 0xA0FC, + 40786 - 11904: 0xBEA6, + 40787 - 11904: 0x9FEE, + 40788 - 11904: 0xEFB5, + 40789 - 11904: 0xF1EA, + 40790 - 11904: 0xF3FA, + 40791 - 11904: 0xF3FB, + 40792 - 11904: 0xF3FC, + 40793 - 11904: 0xF5BE, + 40794 - 11904: 0x9F69, + 40795 - 11904: 0xF5BA, + 40796 - 11904: 0xC568, + 40797 - 11904: 0xF5BD, + 40798 - 11904: 0xF5BC, + 40799 - 11904: 0xC4D4, + 40800 - 11904: 0xF5BB, + 40801 - 11904: 0xC4D6, + 40802 - 11904: 0x91C8, + 40803 - 11904: 0xC4D5, + 40804 - 11904: 0xF6D4, + 40805 - 11904: 0xF6D3, + 40806 - 11904: 0xC569, + 40807 - 11904: 0xC56A, + 40809 - 11904: 0x91C9, + 40810 - 11904: 0xC5C6, + 40811 - 11904: 0xF7CD, + 40812 - 11904: 0xC5C5, + 40814 - 11904: 0xF8A3, + 40815 - 11904: 0xF8A4, + 40816 - 11904: 0xF8A2, + 40817 - 11904: 0xF8A1, + 40818 - 11904: 0xC654, + 40820 - 11904: 0xF8EB, + 40821 - 11904: 0xF8EC, + 40822 - 11904: 0xF8ED, + 40823 - 11904: 0xC653, + 40824 - 11904: 0xF967, + 40825 - 11904: 0xF96A, + 40826 - 11904: 0xF969, + 40827 - 11904: 0xF968, + 40830 - 11904: 0xF9D3, + 40831 - 11904: 0x8DE6, + 40845 - 11904: 0xC073, + 40846 - 11904: 0x91CB, + 40848 - 11904: 0xC365, + 40849 - 11904: 0xF5BF, + 40850 - 11904: 0xF6D5, + 40852 - 11904: 0xC5C7, + 40853 - 11904: 0xF7CE, + 40854 - 11904: 0x87AC, + 40855 - 11904: 0x87A4, + 40856 - 11904: 0xF9D5, + 40857 - 11904: 0x89C8, + 40860 - 11904: 0xC074, + 40863 - 11904: 0x8DAA, + 40864 - 11904: 0xEFB6, + 40866 - 11904: 0xF7CF, + 40868 - 11904: 0xF9A1, + 40869 - 11904: 0x9FDD, + 40870 - 11904: 0x8C43, + 40871 - 11904: 0x8C6D, + 40872 - 11904: 0x8C74, + 40873 - 11904: 0x8CB7, + 40874 - 11904: 0x8CB9, + 40875 - 11904: 0x8CBB, + 40876 - 11904: 0x8CC0, + 40877 - 11904: 0x8CD7, + 40878 - 11904: 0x8CD8, + 40879 - 11904: 0x8CDA, + 40880 - 11904: 0xC8A1, + 40881 - 11904: 0xC8A3, + 40882 - 11904: 0x8CED, + 40883 - 11904: 0x8D48, + 40903 - 11904: 0x87C2, + 40904 - 11904: 0x87D2, + 40905 - 11904: 0x87D6, + 40906 - 11904: 0x87DA, + 40907 - 11904: 0x87DF, +} + +const encode2Low, encode2High = 7870, 10046 + +var encode2 = [...]uint16{ + 7870 - 7870: 0x8863, + 7871 - 7870: 0x88A4, + 7872 - 7870: 0x8865, + 7873 - 7870: 0x88A6, + 8211 - 7870: 0xA156, + 8212 - 7870: 0xA158, + 8216 - 7870: 0xA1A5, + 8217 - 7870: 0xA1A6, + 8220 - 7870: 0xA1A7, + 8221 - 7870: 0xA1A8, + 8229 - 7870: 0xA14C, + 8230 - 7870: 0xA14B, + 8231 - 7870: 0xA145, + 8242 - 7870: 0xA1AC, + 8245 - 7870: 0xA1AB, + 8251 - 7870: 0xA1B0, + 8364 - 7870: 0xA3E1, + 8451 - 7870: 0xA24A, + 8453 - 7870: 0xA1C1, + 8457 - 7870: 0xA24B, + 8470 - 7870: 0xC8D2, + 8481 - 7870: 0xC8D3, + 8544 - 7870: 0xA2B9, + 8545 - 7870: 0xA2BA, + 8546 - 7870: 0xA2BB, + 8547 - 7870: 0xA2BC, + 8548 - 7870: 0xA2BD, + 8549 - 7870: 0xA2BE, + 8550 - 7870: 0xA2BF, + 8551 - 7870: 0xA2C0, + 8552 - 7870: 0xA2C1, + 8553 - 7870: 0xA2C2, + 8560 - 7870: 0xC6B5, + 8561 - 7870: 0xC6B6, + 8562 - 7870: 0xC6B7, + 8563 - 7870: 0xC6B8, + 8564 - 7870: 0xC6B9, + 8565 - 7870: 0xC6BA, + 8566 - 7870: 0xC6BB, + 8567 - 7870: 0xC6BC, + 8568 - 7870: 0xC6BD, + 8569 - 7870: 0xC6BE, + 8592 - 7870: 0xA1F6, + 8593 - 7870: 0xA1F4, + 8594 - 7870: 0xA1F7, + 8595 - 7870: 0xA1F5, + 8598 - 7870: 0xA1F8, + 8599 - 7870: 0xA1F9, + 8600 - 7870: 0xA1FB, + 8601 - 7870: 0xA1FA, + 8632 - 7870: 0xC877, + 8633 - 7870: 0xC878, + 8679 - 7870: 0xC876, + 8725 - 7870: 0xA241, + 8730 - 7870: 0xA1D4, + 8734 - 7870: 0xA1DB, + 8735 - 7870: 0xA1E8, + 8736 - 7870: 0xA1E7, + 8739 - 7870: 0xA1FD, + 8741 - 7870: 0xA1FC, + 8745 - 7870: 0xA1E4, + 8746 - 7870: 0xA1E5, + 8747 - 7870: 0xA1EC, + 8750 - 7870: 0xA1ED, + 8756 - 7870: 0xA1EF, + 8757 - 7870: 0xA1EE, + 8786 - 7870: 0xA1DC, + 8800 - 7870: 0xA1DA, + 8801 - 7870: 0xA1DD, + 8806 - 7870: 0xA1D8, + 8807 - 7870: 0xA1D9, + 8853 - 7870: 0xA1F2, + 8857 - 7870: 0xA1F3, + 8869 - 7870: 0xA1E6, + 8895 - 7870: 0xA1E9, + 9178 - 7870: 0x88A9, + 9179 - 7870: 0x88AA, + 9216 - 7870: 0xA3C0, + 9217 - 7870: 0xA3C1, + 9218 - 7870: 0xA3C2, + 9219 - 7870: 0xA3C3, + 9220 - 7870: 0xA3C4, + 9221 - 7870: 0xA3C5, + 9222 - 7870: 0xA3C6, + 9223 - 7870: 0xA3C7, + 9224 - 7870: 0xA3C8, + 9225 - 7870: 0xA3C9, + 9226 - 7870: 0xA3CA, + 9227 - 7870: 0xA3CB, + 9228 - 7870: 0xA3CC, + 9229 - 7870: 0xA3CD, + 9230 - 7870: 0xA3CE, + 9231 - 7870: 0xA3CF, + 9232 - 7870: 0xA3D0, + 9233 - 7870: 0xA3D1, + 9234 - 7870: 0xA3D2, + 9235 - 7870: 0xA3D3, + 9236 - 7870: 0xA3D4, + 9237 - 7870: 0xA3D5, + 9238 - 7870: 0xA3D6, + 9239 - 7870: 0xA3D7, + 9240 - 7870: 0xA3D8, + 9241 - 7870: 0xA3D9, + 9242 - 7870: 0xA3DA, + 9243 - 7870: 0xA3DB, + 9244 - 7870: 0xA3DC, + 9245 - 7870: 0xA3DD, + 9246 - 7870: 0xA3DE, + 9247 - 7870: 0xA3DF, + 9249 - 7870: 0xA3E0, + 9312 - 7870: 0xC6A1, + 9313 - 7870: 0xC6A2, + 9314 - 7870: 0xC6A3, + 9315 - 7870: 0xC6A4, + 9316 - 7870: 0xC6A5, + 9317 - 7870: 0xC6A6, + 9318 - 7870: 0xC6A7, + 9319 - 7870: 0xC6A8, + 9320 - 7870: 0xC6A9, + 9321 - 7870: 0xC6AA, + 9332 - 7870: 0xC6AB, + 9333 - 7870: 0xC6AC, + 9334 - 7870: 0xC6AD, + 9335 - 7870: 0xC6AE, + 9336 - 7870: 0xC6AF, + 9337 - 7870: 0xC6B0, + 9338 - 7870: 0xC6B1, + 9339 - 7870: 0xC6B2, + 9340 - 7870: 0xC6B3, + 9341 - 7870: 0xC6B4, + 9472 - 7870: 0xA277, + 9474 - 7870: 0xA278, + 9484 - 7870: 0xA27A, + 9488 - 7870: 0xA27B, + 9492 - 7870: 0xA27C, + 9496 - 7870: 0xA27D, + 9500 - 7870: 0xA275, + 9508 - 7870: 0xA274, + 9516 - 7870: 0xA273, + 9524 - 7870: 0xA272, + 9532 - 7870: 0xA271, + 9552 - 7870: 0xF9F9, + 9553 - 7870: 0xF9F8, + 9554 - 7870: 0xF9E6, + 9555 - 7870: 0xF9EF, + 9556 - 7870: 0xF9DD, + 9557 - 7870: 0xF9E8, + 9558 - 7870: 0xF9F1, + 9559 - 7870: 0xF9DF, + 9560 - 7870: 0xF9EC, + 9561 - 7870: 0xF9F5, + 9562 - 7870: 0xF9E3, + 9563 - 7870: 0xF9EE, + 9564 - 7870: 0xF9F7, + 9565 - 7870: 0xF9E5, + 9566 - 7870: 0xF9E9, + 9567 - 7870: 0xF9F2, + 9568 - 7870: 0xF9E0, + 9569 - 7870: 0xF9EB, + 9570 - 7870: 0xF9F4, + 9571 - 7870: 0xF9E2, + 9572 - 7870: 0xF9E7, + 9573 - 7870: 0xF9F0, + 9574 - 7870: 0xF9DE, + 9575 - 7870: 0xF9ED, + 9576 - 7870: 0xF9F6, + 9577 - 7870: 0xF9E4, + 9578 - 7870: 0xF9EA, + 9579 - 7870: 0xF9F3, + 9580 - 7870: 0xF9E1, + 9581 - 7870: 0xF9FA, + 9582 - 7870: 0xF9FB, + 9583 - 7870: 0xF9FD, + 9584 - 7870: 0xF9FC, + 9585 - 7870: 0xA2AC, + 9586 - 7870: 0xA2AD, + 9587 - 7870: 0xA2AE, + 9588 - 7870: 0xA15A, + 9601 - 7870: 0xA262, + 9602 - 7870: 0xA263, + 9603 - 7870: 0xA264, + 9604 - 7870: 0xA265, + 9605 - 7870: 0xA266, + 9606 - 7870: 0xA267, + 9607 - 7870: 0xA268, + 9608 - 7870: 0xA269, + 9609 - 7870: 0xA270, + 9610 - 7870: 0xA26F, + 9611 - 7870: 0xA26E, + 9612 - 7870: 0xA26D, + 9613 - 7870: 0xA26C, + 9614 - 7870: 0xA26B, + 9615 - 7870: 0xA26A, + 9620 - 7870: 0xA276, + 9621 - 7870: 0xA279, + 9632 - 7870: 0xA1BD, + 9633 - 7870: 0xA1BC, + 9650 - 7870: 0xA1B6, + 9651 - 7870: 0xA1B5, + 9660 - 7870: 0xA1BF, + 9661 - 7870: 0xA1BE, + 9670 - 7870: 0xA1BB, + 9671 - 7870: 0xA1BA, + 9675 - 7870: 0xA1B3, + 9678 - 7870: 0xA1B7, + 9679 - 7870: 0xA1B4, + 9698 - 7870: 0xA2A8, + 9699 - 7870: 0xA2A9, + 9700 - 7870: 0xA2AB, + 9701 - 7870: 0xA2AA, + 9733 - 7870: 0xA1B9, + 9734 - 7870: 0xA1B8, + 9792 - 7870: 0xA1F0, + 9794 - 7870: 0xA1F1, + 10045 - 7870: 0xC6E6, +} + +const encode3Low, encode3High = 167, 1106 + +var encode3 = [...]uint16{ + 167 - 167: 0xA1B1, + 168 - 167: 0xC6D8, + 175 - 167: 0xA1C2, + 176 - 167: 0xA258, + 177 - 167: 0xA1D3, + 183 - 167: 0xA150, + 192 - 167: 0x8859, + 193 - 167: 0x8857, + 200 - 167: 0x885D, + 201 - 167: 0x885B, + 202 - 167: 0x8866, + 210 - 167: 0x8861, + 211 - 167: 0x885F, + 215 - 167: 0xA1D1, + 224 - 167: 0x886A, + 225 - 167: 0x8868, + 232 - 167: 0x886F, + 233 - 167: 0x886D, + 234 - 167: 0x88A7, + 236 - 167: 0x8873, + 237 - 167: 0x8871, + 242 - 167: 0x8877, + 243 - 167: 0x8875, + 247 - 167: 0xA1D2, + 248 - 167: 0xC8FB, + 249 - 167: 0x887B, + 250 - 167: 0x8879, + 252 - 167: 0x88A2, + 256 - 167: 0x8856, + 257 - 167: 0x8867, + 274 - 167: 0x885A, + 275 - 167: 0x886C, + 282 - 167: 0x885C, + 283 - 167: 0x886E, + 299 - 167: 0x8870, + 331 - 167: 0xC8FC, + 332 - 167: 0x885E, + 333 - 167: 0x8874, + 339 - 167: 0xC8FA, + 363 - 167: 0x8878, + 461 - 167: 0x8858, + 462 - 167: 0x8869, + 464 - 167: 0x8872, + 465 - 167: 0x8860, + 466 - 167: 0x8876, + 468 - 167: 0x887A, + 470 - 167: 0x887C, + 472 - 167: 0x887D, + 474 - 167: 0x887E, + 476 - 167: 0x88A1, + 592 - 167: 0xC8F6, + 593 - 167: 0x886B, + 596 - 167: 0xC8F8, + 603 - 167: 0xC8F7, + 609 - 167: 0x88A8, + 618 - 167: 0xC8FE, + 629 - 167: 0xC8F9, + 643 - 167: 0xC8F5, + 650 - 167: 0xC8FD, + 710 - 167: 0xC6D9, + 711 - 167: 0xA3BE, + 713 - 167: 0xA3BC, + 714 - 167: 0xA3BD, + 715 - 167: 0xA3BF, + 717 - 167: 0xA1C5, + 729 - 167: 0xA3BB, + 913 - 167: 0xA344, + 914 - 167: 0xA345, + 915 - 167: 0xA346, + 916 - 167: 0xA347, + 917 - 167: 0xA348, + 918 - 167: 0xA349, + 919 - 167: 0xA34A, + 920 - 167: 0xA34B, + 921 - 167: 0xA34C, + 922 - 167: 0xA34D, + 923 - 167: 0xA34E, + 924 - 167: 0xA34F, + 925 - 167: 0xA350, + 926 - 167: 0xA351, + 927 - 167: 0xA352, + 928 - 167: 0xA353, + 929 - 167: 0xA354, + 931 - 167: 0xA355, + 932 - 167: 0xA356, + 933 - 167: 0xA357, + 934 - 167: 0xA358, + 935 - 167: 0xA359, + 936 - 167: 0xA35A, + 937 - 167: 0xA35B, + 945 - 167: 0xA35C, + 946 - 167: 0xA35D, + 947 - 167: 0xA35E, + 948 - 167: 0xA35F, + 949 - 167: 0xA360, + 950 - 167: 0xA361, + 951 - 167: 0xA362, + 952 - 167: 0xA363, + 953 - 167: 0xA364, + 954 - 167: 0xA365, + 955 - 167: 0xA366, + 956 - 167: 0xA367, + 957 - 167: 0xA368, + 958 - 167: 0xA369, + 959 - 167: 0xA36A, + 960 - 167: 0xA36B, + 961 - 167: 0xA36C, + 963 - 167: 0xA36D, + 964 - 167: 0xA36E, + 965 - 167: 0xA36F, + 966 - 167: 0xA370, + 967 - 167: 0xA371, + 968 - 167: 0xA372, + 969 - 167: 0xA373, + 1025 - 167: 0xC7F9, + 1040 - 167: 0xC7F3, + 1041 - 167: 0xC7F4, + 1042 - 167: 0xC7F5, + 1043 - 167: 0xC7F6, + 1044 - 167: 0xC7F7, + 1045 - 167: 0xC7F8, + 1046 - 167: 0xC7FA, + 1047 - 167: 0xC7FB, + 1048 - 167: 0xC7FC, + 1049 - 167: 0xC7FD, + 1050 - 167: 0xC7FE, + 1051 - 167: 0xC840, + 1052 - 167: 0xC841, + 1053 - 167: 0xC842, + 1054 - 167: 0xC843, + 1055 - 167: 0xC844, + 1056 - 167: 0xC845, + 1057 - 167: 0xC846, + 1058 - 167: 0xC847, + 1059 - 167: 0xC848, + 1060 - 167: 0xC849, + 1061 - 167: 0xC84A, + 1062 - 167: 0xC84B, + 1063 - 167: 0xC84C, + 1064 - 167: 0xC84D, + 1065 - 167: 0xC84E, + 1066 - 167: 0xC84F, + 1067 - 167: 0xC850, + 1068 - 167: 0xC851, + 1069 - 167: 0xC852, + 1070 - 167: 0xC853, + 1071 - 167: 0xC854, + 1072 - 167: 0xC855, + 1073 - 167: 0xC856, + 1074 - 167: 0xC857, + 1075 - 167: 0xC858, + 1076 - 167: 0xC859, + 1077 - 167: 0xC85A, + 1078 - 167: 0xC85C, + 1079 - 167: 0xC85D, + 1080 - 167: 0xC85E, + 1081 - 167: 0xC85F, + 1082 - 167: 0xC860, + 1083 - 167: 0xC861, + 1084 - 167: 0xC862, + 1085 - 167: 0xC863, + 1086 - 167: 0xC864, + 1087 - 167: 0xC865, + 1088 - 167: 0xC866, + 1089 - 167: 0xC867, + 1090 - 167: 0xC868, + 1091 - 167: 0xC869, + 1092 - 167: 0xC86A, + 1093 - 167: 0xC86B, + 1094 - 167: 0xC86C, + 1095 - 167: 0xC86D, + 1096 - 167: 0xC86E, + 1097 - 167: 0xC86F, + 1098 - 167: 0xC870, + 1099 - 167: 0xC871, + 1100 - 167: 0xC872, + 1101 - 167: 0xC873, + 1102 - 167: 0xC874, + 1103 - 167: 0xC875, + 1105 - 167: 0xC85B, +} + +const encode4Low, encode4High = 65072, 65518 + +var encode4 = [...]uint16{ + 65072 - 65072: 0xA14A, + 65073 - 65072: 0xA157, + 65075 - 65072: 0xA159, + 65076 - 65072: 0xA15B, + 65077 - 65072: 0xA15F, + 65078 - 65072: 0xA160, + 65079 - 65072: 0xA163, + 65080 - 65072: 0xA164, + 65081 - 65072: 0xA167, + 65082 - 65072: 0xA168, + 65083 - 65072: 0xA16B, + 65084 - 65072: 0xA16C, + 65085 - 65072: 0xA16F, + 65086 - 65072: 0xA170, + 65087 - 65072: 0xA173, + 65088 - 65072: 0xA174, + 65089 - 65072: 0xA177, + 65090 - 65072: 0xA178, + 65091 - 65072: 0xA17B, + 65092 - 65072: 0xA17C, + 65097 - 65072: 0xA1C6, + 65098 - 65072: 0xA1C7, + 65099 - 65072: 0xA1CA, + 65100 - 65072: 0xA1CB, + 65101 - 65072: 0xA1C8, + 65102 - 65072: 0xA1C9, + 65103 - 65072: 0xA15C, + 65104 - 65072: 0xA14D, + 65105 - 65072: 0xA14E, + 65106 - 65072: 0xA14F, + 65108 - 65072: 0xA151, + 65109 - 65072: 0xA152, + 65110 - 65072: 0xA153, + 65111 - 65072: 0xA154, + 65113 - 65072: 0xA17D, + 65114 - 65072: 0xA17E, + 65115 - 65072: 0xA1A1, + 65116 - 65072: 0xA1A2, + 65117 - 65072: 0xA1A3, + 65118 - 65072: 0xA1A4, + 65119 - 65072: 0xA1CC, + 65120 - 65072: 0xA1CD, + 65121 - 65072: 0xA1CE, + 65122 - 65072: 0xA1DE, + 65123 - 65072: 0xA1DF, + 65124 - 65072: 0xA1E0, + 65125 - 65072: 0xA1E1, + 65126 - 65072: 0xA1E2, + 65128 - 65072: 0xA242, + 65129 - 65072: 0xA24C, + 65130 - 65072: 0xA24D, + 65131 - 65072: 0xA24E, + 65281 - 65072: 0xA149, + 65282 - 65072: 0xC8D0, + 65283 - 65072: 0xA1AD, + 65284 - 65072: 0xA243, + 65285 - 65072: 0xA248, + 65286 - 65072: 0xA1AE, + 65287 - 65072: 0xC8CF, + 65288 - 65072: 0xA15D, + 65289 - 65072: 0xA15E, + 65290 - 65072: 0xA1AF, + 65291 - 65072: 0xA1CF, + 65292 - 65072: 0xA141, + 65293 - 65072: 0xA1D0, + 65294 - 65072: 0xA144, + 65295 - 65072: 0xA1FE, + 65296 - 65072: 0xA2AF, + 65297 - 65072: 0xA2B0, + 65298 - 65072: 0xA2B1, + 65299 - 65072: 0xA2B2, + 65300 - 65072: 0xA2B3, + 65301 - 65072: 0xA2B4, + 65302 - 65072: 0xA2B5, + 65303 - 65072: 0xA2B6, + 65304 - 65072: 0xA2B7, + 65305 - 65072: 0xA2B8, + 65306 - 65072: 0xA147, + 65307 - 65072: 0xA146, + 65308 - 65072: 0xA1D5, + 65309 - 65072: 0xA1D7, + 65310 - 65072: 0xA1D6, + 65311 - 65072: 0xA148, + 65312 - 65072: 0xA249, + 65313 - 65072: 0xA2CF, + 65314 - 65072: 0xA2D0, + 65315 - 65072: 0xA2D1, + 65316 - 65072: 0xA2D2, + 65317 - 65072: 0xA2D3, + 65318 - 65072: 0xA2D4, + 65319 - 65072: 0xA2D5, + 65320 - 65072: 0xA2D6, + 65321 - 65072: 0xA2D7, + 65322 - 65072: 0xA2D8, + 65323 - 65072: 0xA2D9, + 65324 - 65072: 0xA2DA, + 65325 - 65072: 0xA2DB, + 65326 - 65072: 0xA2DC, + 65327 - 65072: 0xA2DD, + 65328 - 65072: 0xA2DE, + 65329 - 65072: 0xA2DF, + 65330 - 65072: 0xA2E0, + 65331 - 65072: 0xA2E1, + 65332 - 65072: 0xA2E2, + 65333 - 65072: 0xA2E3, + 65334 - 65072: 0xA2E4, + 65335 - 65072: 0xA2E5, + 65336 - 65072: 0xA2E6, + 65337 - 65072: 0xA2E7, + 65338 - 65072: 0xA2E8, + 65339 - 65072: 0xC6E4, + 65340 - 65072: 0xA240, + 65341 - 65072: 0xC6E5, + 65343 - 65072: 0xA1C4, + 65345 - 65072: 0xA2E9, + 65346 - 65072: 0xA2EA, + 65347 - 65072: 0xA2EB, + 65348 - 65072: 0xA2EC, + 65349 - 65072: 0xA2ED, + 65350 - 65072: 0xA2EE, + 65351 - 65072: 0xA2EF, + 65352 - 65072: 0xA2F0, + 65353 - 65072: 0xA2F1, + 65354 - 65072: 0xA2F2, + 65355 - 65072: 0xA2F3, + 65356 - 65072: 0xA2F4, + 65357 - 65072: 0xA2F5, + 65358 - 65072: 0xA2F6, + 65359 - 65072: 0xA2F7, + 65360 - 65072: 0xA2F8, + 65361 - 65072: 0xA2F9, + 65362 - 65072: 0xA2FA, + 65363 - 65072: 0xA2FB, + 65364 - 65072: 0xA2FC, + 65365 - 65072: 0xA2FD, + 65366 - 65072: 0xA2FE, + 65367 - 65072: 0xA340, + 65368 - 65072: 0xA341, + 65369 - 65072: 0xA342, + 65370 - 65072: 0xA343, + 65371 - 65072: 0xA161, + 65372 - 65072: 0xA155, + 65373 - 65072: 0xA162, + 65374 - 65072: 0xA1E3, + 65504 - 65072: 0xA246, + 65505 - 65072: 0xA247, + 65506 - 65072: 0xC8CD, + 65507 - 65072: 0xA1C3, + 65508 - 65072: 0xC8CE, + 65509 - 65072: 0xA244, + 65517 - 65072: 0xF9FE, +} + +const encode5Low, encode5High = 194597, 195029 + +var encode5 = [...]uint16{ + 194597 - 194597: 0x9874, + 194619 - 194597: 0x9AC8, + 194624 - 194597: 0xA047, + 194680 - 194597: 0x8BC3, + 194708 - 194597: 0xFC48, + 194726 - 194597: 0xFC77, + 194765 - 194597: 0x9C52, + 194964 - 194597: 0x8EFD, + 194994 - 194597: 0x8FA8, + 195004 - 194597: 0x957A, + 195028 - 194597: 0x8FF0, +} + +const encode6Low, encode6High = 63751, 64014 + +var encode6 = [...]uint16{ + 63751 - 63751: 0x8BF8, + 64012 - 63751: 0xC94A, + 64013 - 63751: 0xDDFC, +} + +const encode7Low, encode7High = 175615, 175616 + +var encode7 = [...]uint16{ + 175615 - 175615: 0x87DC, +} diff --git a/vendor/golang.org/x/text/internal/language/common.go b/vendor/golang.org/x/text/internal/language/common.go new file mode 100644 index 000000000..cdfdb7497 --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/common.go @@ -0,0 +1,16 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package language + +// This file contains code common to the maketables.go and the package code. + +// AliasType is the type of an alias in AliasMap. +type AliasType int8 + +const ( + Deprecated AliasType = iota + Macro + Legacy + + AliasTypeUnknown AliasType = -1 +) diff --git a/vendor/golang.org/x/text/internal/language/compact.go b/vendor/golang.org/x/text/internal/language/compact.go new file mode 100644 index 000000000..46a001507 --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compact.go @@ -0,0 +1,29 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +// CompactCoreInfo is a compact integer with the three core tags encoded. +type CompactCoreInfo uint32 + +// GetCompactCore generates a uint32 value that is guaranteed to be unique for +// different language, region, and script values. +func GetCompactCore(t Tag) (cci CompactCoreInfo, ok bool) { + if t.LangID > langNoIndexOffset { + return 0, false + } + cci |= CompactCoreInfo(t.LangID) << (8 + 12) + cci |= CompactCoreInfo(t.ScriptID) << 12 + cci |= CompactCoreInfo(t.RegionID) + return cci, true +} + +// Tag generates a tag from c. +func (c CompactCoreInfo) Tag() Tag { + return Tag{ + LangID: Language(c >> 20), + RegionID: Region(c & 0x3ff), + ScriptID: Script(c>>12) & 0xff, + } +} diff --git a/vendor/golang.org/x/text/internal/language/compact/compact.go b/vendor/golang.org/x/text/internal/language/compact/compact.go new file mode 100644 index 000000000..1b36935ef --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compact/compact.go @@ -0,0 +1,61 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package compact defines a compact representation of language tags. +// +// Common language tags (at least all for which locale information is defined +// in CLDR) are assigned a unique index. Each Tag is associated with such an +// ID for selecting language-related resources (such as translations) as well +// as one for selecting regional defaults (currency, number formatting, etc.) +// +// It may want to export this functionality at some point, but at this point +// this is only available for use within x/text. +package compact // import "golang.org/x/text/internal/language/compact" + +import ( + "sort" + "strings" + + "golang.org/x/text/internal/language" +) + +// ID is an integer identifying a single tag. +type ID uint16 + +func getCoreIndex(t language.Tag) (id ID, ok bool) { + cci, ok := language.GetCompactCore(t) + if !ok { + return 0, false + } + i := sort.Search(len(coreTags), func(i int) bool { + return cci <= coreTags[i] + }) + if i == len(coreTags) || coreTags[i] != cci { + return 0, false + } + return ID(i), true +} + +// Parent returns the ID of the parent or the root ID if id is already the root. +func (id ID) Parent() ID { + return parents[id] +} + +// Tag converts id to an internal language Tag. +func (id ID) Tag() language.Tag { + if int(id) >= len(coreTags) { + return specialTags[int(id)-len(coreTags)] + } + return coreTags[id].Tag() +} + +var specialTags []language.Tag + +func init() { + tags := strings.Split(specialTagsStr, " ") + specialTags = make([]language.Tag, len(tags)) + for i, t := range tags { + specialTags[i] = language.MustParse(t) + } +} diff --git a/vendor/golang.org/x/text/internal/language/compact/language.go b/vendor/golang.org/x/text/internal/language/compact/language.go new file mode 100644 index 000000000..8c1b6666f --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compact/language.go @@ -0,0 +1,260 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go gen_index.go -output tables.go +//go:generate go run gen_parents.go + +package compact + +// TODO: Remove above NOTE after: +// - verifying that tables are dropped correctly (most notably matcher tables). + +import ( + "strings" + + "golang.org/x/text/internal/language" +) + +// Tag represents a BCP 47 language tag. It is used to specify an instance of a +// specific language or locale. All language tag values are guaranteed to be +// well-formed. +type Tag struct { + // NOTE: exported tags will become part of the public API. + language ID + locale ID + full fullTag // always a language.Tag for now. +} + +const _und = 0 + +type fullTag interface { + IsRoot() bool + Parent() language.Tag +} + +// Make a compact Tag from a fully specified internal language Tag. +func Make(t language.Tag) (tag Tag) { + if region := t.TypeForKey("rg"); len(region) == 6 && region[2:] == "zzzz" { + if r, err := language.ParseRegion(region[:2]); err == nil { + tFull := t + t, _ = t.SetTypeForKey("rg", "") + // TODO: should we not consider "va" for the language tag? + var exact1, exact2 bool + tag.language, exact1 = FromTag(t) + t.RegionID = r + tag.locale, exact2 = FromTag(t) + if !exact1 || !exact2 { + tag.full = tFull + } + return tag + } + } + lang, ok := FromTag(t) + tag.language = lang + tag.locale = lang + if !ok { + tag.full = t + } + return tag +} + +// Tag returns an internal language Tag version of this tag. +func (t Tag) Tag() language.Tag { + if t.full != nil { + return t.full.(language.Tag) + } + tag := t.language.Tag() + if t.language != t.locale { + loc := t.locale.Tag() + tag, _ = tag.SetTypeForKey("rg", strings.ToLower(loc.RegionID.String())+"zzzz") + } + return tag +} + +// IsCompact reports whether this tag is fully defined in terms of ID. +func (t *Tag) IsCompact() bool { + return t.full == nil +} + +// MayHaveVariants reports whether a tag may have variants. If it returns false +// it is guaranteed the tag does not have variants. +func (t Tag) MayHaveVariants() bool { + return t.full != nil || int(t.language) >= len(coreTags) +} + +// MayHaveExtensions reports whether a tag may have extensions. If it returns +// false it is guaranteed the tag does not have them. +func (t Tag) MayHaveExtensions() bool { + return t.full != nil || + int(t.language) >= len(coreTags) || + t.language != t.locale +} + +// IsRoot returns true if t is equal to language "und". +func (t Tag) IsRoot() bool { + if t.full != nil { + return t.full.IsRoot() + } + return t.language == _und +} + +// Parent returns the CLDR parent of t. In CLDR, missing fields in data for a +// specific language are substituted with fields from the parent language. +// The parent for a language may change for newer versions of CLDR. +func (t Tag) Parent() Tag { + if t.full != nil { + return Make(t.full.Parent()) + } + if t.language != t.locale { + // Simulate stripping -u-rg-xxxxxx + return Tag{language: t.language, locale: t.language} + } + // TODO: use parent lookup table once cycle from internal package is + // removed. Probably by internalizing the table and declaring this fast + // enough. + // lang := compactID(internal.Parent(uint16(t.language))) + lang, _ := FromTag(t.language.Tag().Parent()) + return Tag{language: lang, locale: lang} +} + +// nextToken returns token t and the rest of the string. +func nextToken(s string) (t, tail string) { + p := strings.Index(s[1:], "-") + if p == -1 { + return s[1:], "" + } + p++ + return s[1:p], s[p:] +} + +// LanguageID returns an index, where 0 <= index < NumCompactTags, for tags +// for which data exists in the text repository.The index will change over time +// and should not be stored in persistent storage. If t does not match a compact +// index, exact will be false and the compact index will be returned for the +// first match after repeatedly taking the Parent of t. +func LanguageID(t Tag) (id ID, exact bool) { + return t.language, t.full == nil +} + +// RegionalID returns the ID for the regional variant of this tag. This index is +// used to indicate region-specific overrides, such as default currency, default +// calendar and week data, default time cycle, and default measurement system +// and unit preferences. +// +// For instance, the tag en-GB-u-rg-uszzzz specifies British English with US +// settings for currency, number formatting, etc. The CompactIndex for this tag +// will be that for en-GB, while the RegionalID will be the one corresponding to +// en-US. +func RegionalID(t Tag) (id ID, exact bool) { + return t.locale, t.full == nil +} + +// LanguageTag returns t stripped of regional variant indicators. +// +// At the moment this means it is stripped of a regional and variant subtag "rg" +// and "va" in the "u" extension. +func (t Tag) LanguageTag() Tag { + if t.full == nil { + return Tag{language: t.language, locale: t.language} + } + tt := t.Tag() + tt.SetTypeForKey("rg", "") + tt.SetTypeForKey("va", "") + return Make(tt) +} + +// RegionalTag returns the regional variant of the tag. +// +// At the moment this means that the region is set from the regional subtag +// "rg" in the "u" extension. +func (t Tag) RegionalTag() Tag { + rt := Tag{language: t.locale, locale: t.locale} + if t.full == nil { + return rt + } + b := language.Builder{} + tag := t.Tag() + // tag, _ = tag.SetTypeForKey("rg", "") + b.SetTag(t.locale.Tag()) + if v := tag.Variants(); v != "" { + for _, v := range strings.Split(v, "-") { + b.AddVariant(v) + } + } + for _, e := range tag.Extensions() { + b.AddExt(e) + } + return t +} + +// FromTag reports closest matching ID for an internal language Tag. +func FromTag(t language.Tag) (id ID, exact bool) { + // TODO: perhaps give more frequent tags a lower index. + // TODO: we could make the indexes stable. This will excluded some + // possibilities for optimization, so don't do this quite yet. + exact = true + + b, s, r := t.Raw() + if t.HasString() { + if t.IsPrivateUse() { + // We have no entries for user-defined tags. + return 0, false + } + hasExtra := false + if t.HasVariants() { + if t.HasExtensions() { + build := language.Builder{} + build.SetTag(language.Tag{LangID: b, ScriptID: s, RegionID: r}) + build.AddVariant(t.Variants()) + exact = false + t = build.Make() + } + hasExtra = true + } else if _, ok := t.Extension('u'); ok { + // TODO: va may mean something else. Consider not considering it. + // Strip all but the 'va' entry. + old := t + variant := t.TypeForKey("va") + t = language.Tag{LangID: b, ScriptID: s, RegionID: r} + if variant != "" { + t, _ = t.SetTypeForKey("va", variant) + hasExtra = true + } + exact = old == t + } else { + exact = false + } + if hasExtra { + // We have some variants. + for i, s := range specialTags { + if s == t { + return ID(i + len(coreTags)), exact + } + } + exact = false + } + } + if x, ok := getCoreIndex(t); ok { + return x, exact + } + exact = false + if r != 0 && s == 0 { + // Deal with cases where an extra script is inserted for the region. + t, _ := t.Maximize() + if x, ok := getCoreIndex(t); ok { + return x, exact + } + } + for t = t.Parent(); t != root; t = t.Parent() { + // No variants specified: just compare core components. + // The key has the form lllssrrr, where l, s, and r are nibbles for + // respectively the langID, scriptID, and regionID. + if x, ok := getCoreIndex(t); ok { + return x, exact + } + } + return 0, exact +} + +var root = language.Tag{} diff --git a/vendor/golang.org/x/text/internal/language/compact/parents.go b/vendor/golang.org/x/text/internal/language/compact/parents.go new file mode 100644 index 000000000..8d810723c --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compact/parents.go @@ -0,0 +1,120 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package compact + +// parents maps a compact index of a tag to the compact index of the parent of +// this tag. +var parents = []ID{ // 775 elements + // Entry 0 - 3F + 0x0000, 0x0000, 0x0001, 0x0001, 0x0000, 0x0004, 0x0000, 0x0006, + 0x0000, 0x0008, 0x0000, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0000, + 0x0000, 0x0028, 0x0000, 0x002a, 0x0000, 0x002c, 0x0000, 0x0000, + 0x002f, 0x002e, 0x002e, 0x0000, 0x0033, 0x0000, 0x0035, 0x0000, + 0x0037, 0x0000, 0x0039, 0x0000, 0x003b, 0x0000, 0x0000, 0x003e, + // Entry 40 - 7F + 0x0000, 0x0040, 0x0040, 0x0000, 0x0043, 0x0043, 0x0000, 0x0046, + 0x0000, 0x0048, 0x0000, 0x0000, 0x004b, 0x004a, 0x004a, 0x0000, + 0x004f, 0x004f, 0x004f, 0x004f, 0x0000, 0x0054, 0x0054, 0x0000, + 0x0057, 0x0000, 0x0059, 0x0000, 0x005b, 0x0000, 0x005d, 0x005d, + 0x0000, 0x0060, 0x0000, 0x0062, 0x0000, 0x0064, 0x0000, 0x0066, + 0x0066, 0x0000, 0x0069, 0x0000, 0x006b, 0x006b, 0x006b, 0x006b, + 0x006b, 0x006b, 0x006b, 0x0000, 0x0073, 0x0000, 0x0075, 0x0000, + 0x0077, 0x0000, 0x0000, 0x007a, 0x0000, 0x007c, 0x0000, 0x007e, + // Entry 80 - BF + 0x0000, 0x0080, 0x0080, 0x0000, 0x0083, 0x0083, 0x0000, 0x0086, + 0x0087, 0x0087, 0x0087, 0x0086, 0x0088, 0x0087, 0x0087, 0x0087, + 0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0088, + 0x0087, 0x0087, 0x0087, 0x0087, 0x0088, 0x0087, 0x0088, 0x0087, + 0x0087, 0x0088, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, + 0x0087, 0x0087, 0x0087, 0x0086, 0x0087, 0x0087, 0x0087, 0x0087, + 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, + 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0086, 0x0087, 0x0086, + // Entry C0 - FF + 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, + 0x0088, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, + 0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0088, 0x0087, + 0x0087, 0x0088, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, + 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0086, 0x0086, 0x0087, + 0x0087, 0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0000, + 0x00ef, 0x0000, 0x00f1, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f2, + 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f1, 0x00f2, 0x00f1, 0x00f1, + // Entry 100 - 13F + 0x00f2, 0x00f2, 0x00f1, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f1, + 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x0000, 0x010e, + 0x0000, 0x0110, 0x0000, 0x0112, 0x0000, 0x0114, 0x0114, 0x0000, + 0x0117, 0x0117, 0x0117, 0x0117, 0x0000, 0x011c, 0x0000, 0x011e, + 0x0000, 0x0120, 0x0120, 0x0000, 0x0123, 0x0123, 0x0123, 0x0123, + 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, + 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, + 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, + // Entry 140 - 17F + 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, + 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, + 0x0123, 0x0123, 0x0000, 0x0152, 0x0000, 0x0154, 0x0000, 0x0156, + 0x0000, 0x0158, 0x0000, 0x015a, 0x0000, 0x015c, 0x015c, 0x015c, + 0x0000, 0x0160, 0x0000, 0x0000, 0x0163, 0x0000, 0x0165, 0x0000, + 0x0167, 0x0167, 0x0167, 0x0000, 0x016b, 0x0000, 0x016d, 0x0000, + 0x016f, 0x0000, 0x0171, 0x0171, 0x0000, 0x0174, 0x0000, 0x0176, + 0x0000, 0x0178, 0x0000, 0x017a, 0x0000, 0x017c, 0x0000, 0x017e, + // Entry 180 - 1BF + 0x0000, 0x0000, 0x0000, 0x0182, 0x0000, 0x0184, 0x0184, 0x0184, + 0x0184, 0x0000, 0x0000, 0x0000, 0x018b, 0x0000, 0x0000, 0x018e, + 0x0000, 0x0000, 0x0191, 0x0000, 0x0000, 0x0000, 0x0195, 0x0000, + 0x0197, 0x0000, 0x0000, 0x019a, 0x0000, 0x0000, 0x019d, 0x0000, + 0x019f, 0x0000, 0x01a1, 0x0000, 0x01a3, 0x0000, 0x01a5, 0x0000, + 0x01a7, 0x0000, 0x01a9, 0x0000, 0x01ab, 0x0000, 0x01ad, 0x0000, + 0x01af, 0x0000, 0x01b1, 0x01b1, 0x0000, 0x01b4, 0x0000, 0x01b6, + 0x0000, 0x01b8, 0x0000, 0x01ba, 0x0000, 0x01bc, 0x0000, 0x0000, + // Entry 1C0 - 1FF + 0x01bf, 0x0000, 0x01c1, 0x0000, 0x01c3, 0x0000, 0x01c5, 0x0000, + 0x01c7, 0x0000, 0x01c9, 0x0000, 0x01cb, 0x01cb, 0x01cb, 0x01cb, + 0x0000, 0x01d0, 0x0000, 0x01d2, 0x01d2, 0x0000, 0x01d5, 0x0000, + 0x01d7, 0x0000, 0x01d9, 0x0000, 0x01db, 0x0000, 0x01dd, 0x0000, + 0x01df, 0x01df, 0x0000, 0x01e2, 0x0000, 0x01e4, 0x0000, 0x01e6, + 0x0000, 0x01e8, 0x0000, 0x01ea, 0x0000, 0x01ec, 0x0000, 0x01ee, + 0x0000, 0x01f0, 0x0000, 0x0000, 0x01f3, 0x0000, 0x01f5, 0x01f5, + 0x01f5, 0x0000, 0x01f9, 0x0000, 0x01fb, 0x0000, 0x01fd, 0x0000, + // Entry 200 - 23F + 0x01ff, 0x0000, 0x0000, 0x0202, 0x0000, 0x0204, 0x0204, 0x0000, + 0x0207, 0x0000, 0x0209, 0x0209, 0x0000, 0x020c, 0x020c, 0x0000, + 0x020f, 0x020f, 0x020f, 0x020f, 0x020f, 0x020f, 0x020f, 0x0000, + 0x0217, 0x0000, 0x0219, 0x0000, 0x021b, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0221, 0x0000, 0x0000, 0x0224, 0x0000, 0x0226, + 0x0226, 0x0000, 0x0229, 0x0000, 0x022b, 0x022b, 0x0000, 0x0000, + 0x022f, 0x022e, 0x022e, 0x0000, 0x0000, 0x0234, 0x0000, 0x0236, + 0x0000, 0x0238, 0x0000, 0x0244, 0x023a, 0x0244, 0x0244, 0x0244, + // Entry 240 - 27F + 0x0244, 0x0244, 0x0244, 0x0244, 0x023a, 0x0244, 0x0244, 0x0000, + 0x0247, 0x0247, 0x0247, 0x0000, 0x024b, 0x0000, 0x024d, 0x0000, + 0x024f, 0x024f, 0x0000, 0x0252, 0x0000, 0x0254, 0x0254, 0x0254, + 0x0254, 0x0254, 0x0254, 0x0000, 0x025b, 0x0000, 0x025d, 0x0000, + 0x025f, 0x0000, 0x0261, 0x0000, 0x0263, 0x0000, 0x0265, 0x0000, + 0x0000, 0x0268, 0x0268, 0x0268, 0x0000, 0x026c, 0x0000, 0x026e, + 0x0000, 0x0270, 0x0000, 0x0000, 0x0000, 0x0274, 0x0273, 0x0273, + 0x0000, 0x0278, 0x0000, 0x027a, 0x0000, 0x027c, 0x0000, 0x0000, + // Entry 280 - 2BF + 0x0000, 0x0000, 0x0281, 0x0000, 0x0000, 0x0284, 0x0000, 0x0286, + 0x0286, 0x0286, 0x0286, 0x0000, 0x028b, 0x028b, 0x028b, 0x0000, + 0x028f, 0x028f, 0x028f, 0x028f, 0x028f, 0x0000, 0x0295, 0x0295, + 0x0295, 0x0295, 0x0000, 0x0000, 0x0000, 0x0000, 0x029d, 0x029d, + 0x029d, 0x0000, 0x02a1, 0x02a1, 0x02a1, 0x02a1, 0x0000, 0x0000, + 0x02a7, 0x02a7, 0x02a7, 0x02a7, 0x0000, 0x02ac, 0x0000, 0x02ae, + 0x02ae, 0x0000, 0x02b1, 0x0000, 0x02b3, 0x0000, 0x02b5, 0x02b5, + 0x0000, 0x0000, 0x02b9, 0x0000, 0x0000, 0x0000, 0x02bd, 0x0000, + // Entry 2C0 - 2FF + 0x02bf, 0x02bf, 0x0000, 0x0000, 0x02c3, 0x0000, 0x02c5, 0x0000, + 0x02c7, 0x0000, 0x02c9, 0x0000, 0x02cb, 0x0000, 0x02cd, 0x02cd, + 0x0000, 0x0000, 0x02d1, 0x0000, 0x02d3, 0x02d0, 0x02d0, 0x0000, + 0x0000, 0x02d8, 0x02d7, 0x02d7, 0x0000, 0x0000, 0x02dd, 0x0000, + 0x02df, 0x0000, 0x02e1, 0x0000, 0x0000, 0x02e4, 0x0000, 0x02e6, + 0x0000, 0x0000, 0x02e9, 0x0000, 0x02eb, 0x0000, 0x02ed, 0x0000, + 0x02ef, 0x02ef, 0x0000, 0x0000, 0x02f3, 0x02f2, 0x02f2, 0x0000, + 0x02f7, 0x0000, 0x02f9, 0x02f9, 0x02f9, 0x02f9, 0x02f9, 0x0000, + // Entry 300 - 33F + 0x02ff, 0x0300, 0x02ff, 0x0000, 0x0303, 0x0051, 0x00e6, +} // Size: 1574 bytes + +// Total table size 1574 bytes (1KiB); checksum: 895AAF0B diff --git a/vendor/golang.org/x/text/internal/language/compact/tables.go b/vendor/golang.org/x/text/internal/language/compact/tables.go new file mode 100644 index 000000000..a09ed198a --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compact/tables.go @@ -0,0 +1,1015 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package compact + +import "golang.org/x/text/internal/language" + +// CLDRVersion is the CLDR version from which the tables in this package are derived. +const CLDRVersion = "32" + +// NumCompactTags is the number of common tags. The maximum tag is +// NumCompactTags-1. +const NumCompactTags = 775 +const ( + undIndex ID = 0 + afIndex ID = 1 + afNAIndex ID = 2 + afZAIndex ID = 3 + agqIndex ID = 4 + agqCMIndex ID = 5 + akIndex ID = 6 + akGHIndex ID = 7 + amIndex ID = 8 + amETIndex ID = 9 + arIndex ID = 10 + ar001Index ID = 11 + arAEIndex ID = 12 + arBHIndex ID = 13 + arDJIndex ID = 14 + arDZIndex ID = 15 + arEGIndex ID = 16 + arEHIndex ID = 17 + arERIndex ID = 18 + arILIndex ID = 19 + arIQIndex ID = 20 + arJOIndex ID = 21 + arKMIndex ID = 22 + arKWIndex ID = 23 + arLBIndex ID = 24 + arLYIndex ID = 25 + arMAIndex ID = 26 + arMRIndex ID = 27 + arOMIndex ID = 28 + arPSIndex ID = 29 + arQAIndex ID = 30 + arSAIndex ID = 31 + arSDIndex ID = 32 + arSOIndex ID = 33 + arSSIndex ID = 34 + arSYIndex ID = 35 + arTDIndex ID = 36 + arTNIndex ID = 37 + arYEIndex ID = 38 + arsIndex ID = 39 + asIndex ID = 40 + asINIndex ID = 41 + asaIndex ID = 42 + asaTZIndex ID = 43 + astIndex ID = 44 + astESIndex ID = 45 + azIndex ID = 46 + azCyrlIndex ID = 47 + azCyrlAZIndex ID = 48 + azLatnIndex ID = 49 + azLatnAZIndex ID = 50 + basIndex ID = 51 + basCMIndex ID = 52 + beIndex ID = 53 + beBYIndex ID = 54 + bemIndex ID = 55 + bemZMIndex ID = 56 + bezIndex ID = 57 + bezTZIndex ID = 58 + bgIndex ID = 59 + bgBGIndex ID = 60 + bhIndex ID = 61 + bmIndex ID = 62 + bmMLIndex ID = 63 + bnIndex ID = 64 + bnBDIndex ID = 65 + bnINIndex ID = 66 + boIndex ID = 67 + boCNIndex ID = 68 + boINIndex ID = 69 + brIndex ID = 70 + brFRIndex ID = 71 + brxIndex ID = 72 + brxINIndex ID = 73 + bsIndex ID = 74 + bsCyrlIndex ID = 75 + bsCyrlBAIndex ID = 76 + bsLatnIndex ID = 77 + bsLatnBAIndex ID = 78 + caIndex ID = 79 + caADIndex ID = 80 + caESIndex ID = 81 + caFRIndex ID = 82 + caITIndex ID = 83 + ccpIndex ID = 84 + ccpBDIndex ID = 85 + ccpINIndex ID = 86 + ceIndex ID = 87 + ceRUIndex ID = 88 + cggIndex ID = 89 + cggUGIndex ID = 90 + chrIndex ID = 91 + chrUSIndex ID = 92 + ckbIndex ID = 93 + ckbIQIndex ID = 94 + ckbIRIndex ID = 95 + csIndex ID = 96 + csCZIndex ID = 97 + cuIndex ID = 98 + cuRUIndex ID = 99 + cyIndex ID = 100 + cyGBIndex ID = 101 + daIndex ID = 102 + daDKIndex ID = 103 + daGLIndex ID = 104 + davIndex ID = 105 + davKEIndex ID = 106 + deIndex ID = 107 + deATIndex ID = 108 + deBEIndex ID = 109 + deCHIndex ID = 110 + deDEIndex ID = 111 + deITIndex ID = 112 + deLIIndex ID = 113 + deLUIndex ID = 114 + djeIndex ID = 115 + djeNEIndex ID = 116 + dsbIndex ID = 117 + dsbDEIndex ID = 118 + duaIndex ID = 119 + duaCMIndex ID = 120 + dvIndex ID = 121 + dyoIndex ID = 122 + dyoSNIndex ID = 123 + dzIndex ID = 124 + dzBTIndex ID = 125 + ebuIndex ID = 126 + ebuKEIndex ID = 127 + eeIndex ID = 128 + eeGHIndex ID = 129 + eeTGIndex ID = 130 + elIndex ID = 131 + elCYIndex ID = 132 + elGRIndex ID = 133 + enIndex ID = 134 + en001Index ID = 135 + en150Index ID = 136 + enAGIndex ID = 137 + enAIIndex ID = 138 + enASIndex ID = 139 + enATIndex ID = 140 + enAUIndex ID = 141 + enBBIndex ID = 142 + enBEIndex ID = 143 + enBIIndex ID = 144 + enBMIndex ID = 145 + enBSIndex ID = 146 + enBWIndex ID = 147 + enBZIndex ID = 148 + enCAIndex ID = 149 + enCCIndex ID = 150 + enCHIndex ID = 151 + enCKIndex ID = 152 + enCMIndex ID = 153 + enCXIndex ID = 154 + enCYIndex ID = 155 + enDEIndex ID = 156 + enDGIndex ID = 157 + enDKIndex ID = 158 + enDMIndex ID = 159 + enERIndex ID = 160 + enFIIndex ID = 161 + enFJIndex ID = 162 + enFKIndex ID = 163 + enFMIndex ID = 164 + enGBIndex ID = 165 + enGDIndex ID = 166 + enGGIndex ID = 167 + enGHIndex ID = 168 + enGIIndex ID = 169 + enGMIndex ID = 170 + enGUIndex ID = 171 + enGYIndex ID = 172 + enHKIndex ID = 173 + enIEIndex ID = 174 + enILIndex ID = 175 + enIMIndex ID = 176 + enINIndex ID = 177 + enIOIndex ID = 178 + enJEIndex ID = 179 + enJMIndex ID = 180 + enKEIndex ID = 181 + enKIIndex ID = 182 + enKNIndex ID = 183 + enKYIndex ID = 184 + enLCIndex ID = 185 + enLRIndex ID = 186 + enLSIndex ID = 187 + enMGIndex ID = 188 + enMHIndex ID = 189 + enMOIndex ID = 190 + enMPIndex ID = 191 + enMSIndex ID = 192 + enMTIndex ID = 193 + enMUIndex ID = 194 + enMWIndex ID = 195 + enMYIndex ID = 196 + enNAIndex ID = 197 + enNFIndex ID = 198 + enNGIndex ID = 199 + enNLIndex ID = 200 + enNRIndex ID = 201 + enNUIndex ID = 202 + enNZIndex ID = 203 + enPGIndex ID = 204 + enPHIndex ID = 205 + enPKIndex ID = 206 + enPNIndex ID = 207 + enPRIndex ID = 208 + enPWIndex ID = 209 + enRWIndex ID = 210 + enSBIndex ID = 211 + enSCIndex ID = 212 + enSDIndex ID = 213 + enSEIndex ID = 214 + enSGIndex ID = 215 + enSHIndex ID = 216 + enSIIndex ID = 217 + enSLIndex ID = 218 + enSSIndex ID = 219 + enSXIndex ID = 220 + enSZIndex ID = 221 + enTCIndex ID = 222 + enTKIndex ID = 223 + enTOIndex ID = 224 + enTTIndex ID = 225 + enTVIndex ID = 226 + enTZIndex ID = 227 + enUGIndex ID = 228 + enUMIndex ID = 229 + enUSIndex ID = 230 + enVCIndex ID = 231 + enVGIndex ID = 232 + enVIIndex ID = 233 + enVUIndex ID = 234 + enWSIndex ID = 235 + enZAIndex ID = 236 + enZMIndex ID = 237 + enZWIndex ID = 238 + eoIndex ID = 239 + eo001Index ID = 240 + esIndex ID = 241 + es419Index ID = 242 + esARIndex ID = 243 + esBOIndex ID = 244 + esBRIndex ID = 245 + esBZIndex ID = 246 + esCLIndex ID = 247 + esCOIndex ID = 248 + esCRIndex ID = 249 + esCUIndex ID = 250 + esDOIndex ID = 251 + esEAIndex ID = 252 + esECIndex ID = 253 + esESIndex ID = 254 + esGQIndex ID = 255 + esGTIndex ID = 256 + esHNIndex ID = 257 + esICIndex ID = 258 + esMXIndex ID = 259 + esNIIndex ID = 260 + esPAIndex ID = 261 + esPEIndex ID = 262 + esPHIndex ID = 263 + esPRIndex ID = 264 + esPYIndex ID = 265 + esSVIndex ID = 266 + esUSIndex ID = 267 + esUYIndex ID = 268 + esVEIndex ID = 269 + etIndex ID = 270 + etEEIndex ID = 271 + euIndex ID = 272 + euESIndex ID = 273 + ewoIndex ID = 274 + ewoCMIndex ID = 275 + faIndex ID = 276 + faAFIndex ID = 277 + faIRIndex ID = 278 + ffIndex ID = 279 + ffCMIndex ID = 280 + ffGNIndex ID = 281 + ffMRIndex ID = 282 + ffSNIndex ID = 283 + fiIndex ID = 284 + fiFIIndex ID = 285 + filIndex ID = 286 + filPHIndex ID = 287 + foIndex ID = 288 + foDKIndex ID = 289 + foFOIndex ID = 290 + frIndex ID = 291 + frBEIndex ID = 292 + frBFIndex ID = 293 + frBIIndex ID = 294 + frBJIndex ID = 295 + frBLIndex ID = 296 + frCAIndex ID = 297 + frCDIndex ID = 298 + frCFIndex ID = 299 + frCGIndex ID = 300 + frCHIndex ID = 301 + frCIIndex ID = 302 + frCMIndex ID = 303 + frDJIndex ID = 304 + frDZIndex ID = 305 + frFRIndex ID = 306 + frGAIndex ID = 307 + frGFIndex ID = 308 + frGNIndex ID = 309 + frGPIndex ID = 310 + frGQIndex ID = 311 + frHTIndex ID = 312 + frKMIndex ID = 313 + frLUIndex ID = 314 + frMAIndex ID = 315 + frMCIndex ID = 316 + frMFIndex ID = 317 + frMGIndex ID = 318 + frMLIndex ID = 319 + frMQIndex ID = 320 + frMRIndex ID = 321 + frMUIndex ID = 322 + frNCIndex ID = 323 + frNEIndex ID = 324 + frPFIndex ID = 325 + frPMIndex ID = 326 + frREIndex ID = 327 + frRWIndex ID = 328 + frSCIndex ID = 329 + frSNIndex ID = 330 + frSYIndex ID = 331 + frTDIndex ID = 332 + frTGIndex ID = 333 + frTNIndex ID = 334 + frVUIndex ID = 335 + frWFIndex ID = 336 + frYTIndex ID = 337 + furIndex ID = 338 + furITIndex ID = 339 + fyIndex ID = 340 + fyNLIndex ID = 341 + gaIndex ID = 342 + gaIEIndex ID = 343 + gdIndex ID = 344 + gdGBIndex ID = 345 + glIndex ID = 346 + glESIndex ID = 347 + gswIndex ID = 348 + gswCHIndex ID = 349 + gswFRIndex ID = 350 + gswLIIndex ID = 351 + guIndex ID = 352 + guINIndex ID = 353 + guwIndex ID = 354 + guzIndex ID = 355 + guzKEIndex ID = 356 + gvIndex ID = 357 + gvIMIndex ID = 358 + haIndex ID = 359 + haGHIndex ID = 360 + haNEIndex ID = 361 + haNGIndex ID = 362 + hawIndex ID = 363 + hawUSIndex ID = 364 + heIndex ID = 365 + heILIndex ID = 366 + hiIndex ID = 367 + hiINIndex ID = 368 + hrIndex ID = 369 + hrBAIndex ID = 370 + hrHRIndex ID = 371 + hsbIndex ID = 372 + hsbDEIndex ID = 373 + huIndex ID = 374 + huHUIndex ID = 375 + hyIndex ID = 376 + hyAMIndex ID = 377 + idIndex ID = 378 + idIDIndex ID = 379 + igIndex ID = 380 + igNGIndex ID = 381 + iiIndex ID = 382 + iiCNIndex ID = 383 + inIndex ID = 384 + ioIndex ID = 385 + isIndex ID = 386 + isISIndex ID = 387 + itIndex ID = 388 + itCHIndex ID = 389 + itITIndex ID = 390 + itSMIndex ID = 391 + itVAIndex ID = 392 + iuIndex ID = 393 + iwIndex ID = 394 + jaIndex ID = 395 + jaJPIndex ID = 396 + jboIndex ID = 397 + jgoIndex ID = 398 + jgoCMIndex ID = 399 + jiIndex ID = 400 + jmcIndex ID = 401 + jmcTZIndex ID = 402 + jvIndex ID = 403 + jwIndex ID = 404 + kaIndex ID = 405 + kaGEIndex ID = 406 + kabIndex ID = 407 + kabDZIndex ID = 408 + kajIndex ID = 409 + kamIndex ID = 410 + kamKEIndex ID = 411 + kcgIndex ID = 412 + kdeIndex ID = 413 + kdeTZIndex ID = 414 + keaIndex ID = 415 + keaCVIndex ID = 416 + khqIndex ID = 417 + khqMLIndex ID = 418 + kiIndex ID = 419 + kiKEIndex ID = 420 + kkIndex ID = 421 + kkKZIndex ID = 422 + kkjIndex ID = 423 + kkjCMIndex ID = 424 + klIndex ID = 425 + klGLIndex ID = 426 + klnIndex ID = 427 + klnKEIndex ID = 428 + kmIndex ID = 429 + kmKHIndex ID = 430 + knIndex ID = 431 + knINIndex ID = 432 + koIndex ID = 433 + koKPIndex ID = 434 + koKRIndex ID = 435 + kokIndex ID = 436 + kokINIndex ID = 437 + ksIndex ID = 438 + ksINIndex ID = 439 + ksbIndex ID = 440 + ksbTZIndex ID = 441 + ksfIndex ID = 442 + ksfCMIndex ID = 443 + kshIndex ID = 444 + kshDEIndex ID = 445 + kuIndex ID = 446 + kwIndex ID = 447 + kwGBIndex ID = 448 + kyIndex ID = 449 + kyKGIndex ID = 450 + lagIndex ID = 451 + lagTZIndex ID = 452 + lbIndex ID = 453 + lbLUIndex ID = 454 + lgIndex ID = 455 + lgUGIndex ID = 456 + lktIndex ID = 457 + lktUSIndex ID = 458 + lnIndex ID = 459 + lnAOIndex ID = 460 + lnCDIndex ID = 461 + lnCFIndex ID = 462 + lnCGIndex ID = 463 + loIndex ID = 464 + loLAIndex ID = 465 + lrcIndex ID = 466 + lrcIQIndex ID = 467 + lrcIRIndex ID = 468 + ltIndex ID = 469 + ltLTIndex ID = 470 + luIndex ID = 471 + luCDIndex ID = 472 + luoIndex ID = 473 + luoKEIndex ID = 474 + luyIndex ID = 475 + luyKEIndex ID = 476 + lvIndex ID = 477 + lvLVIndex ID = 478 + masIndex ID = 479 + masKEIndex ID = 480 + masTZIndex ID = 481 + merIndex ID = 482 + merKEIndex ID = 483 + mfeIndex ID = 484 + mfeMUIndex ID = 485 + mgIndex ID = 486 + mgMGIndex ID = 487 + mghIndex ID = 488 + mghMZIndex ID = 489 + mgoIndex ID = 490 + mgoCMIndex ID = 491 + mkIndex ID = 492 + mkMKIndex ID = 493 + mlIndex ID = 494 + mlINIndex ID = 495 + mnIndex ID = 496 + mnMNIndex ID = 497 + moIndex ID = 498 + mrIndex ID = 499 + mrINIndex ID = 500 + msIndex ID = 501 + msBNIndex ID = 502 + msMYIndex ID = 503 + msSGIndex ID = 504 + mtIndex ID = 505 + mtMTIndex ID = 506 + muaIndex ID = 507 + muaCMIndex ID = 508 + myIndex ID = 509 + myMMIndex ID = 510 + mznIndex ID = 511 + mznIRIndex ID = 512 + nahIndex ID = 513 + naqIndex ID = 514 + naqNAIndex ID = 515 + nbIndex ID = 516 + nbNOIndex ID = 517 + nbSJIndex ID = 518 + ndIndex ID = 519 + ndZWIndex ID = 520 + ndsIndex ID = 521 + ndsDEIndex ID = 522 + ndsNLIndex ID = 523 + neIndex ID = 524 + neINIndex ID = 525 + neNPIndex ID = 526 + nlIndex ID = 527 + nlAWIndex ID = 528 + nlBEIndex ID = 529 + nlBQIndex ID = 530 + nlCWIndex ID = 531 + nlNLIndex ID = 532 + nlSRIndex ID = 533 + nlSXIndex ID = 534 + nmgIndex ID = 535 + nmgCMIndex ID = 536 + nnIndex ID = 537 + nnNOIndex ID = 538 + nnhIndex ID = 539 + nnhCMIndex ID = 540 + noIndex ID = 541 + nqoIndex ID = 542 + nrIndex ID = 543 + nsoIndex ID = 544 + nusIndex ID = 545 + nusSSIndex ID = 546 + nyIndex ID = 547 + nynIndex ID = 548 + nynUGIndex ID = 549 + omIndex ID = 550 + omETIndex ID = 551 + omKEIndex ID = 552 + orIndex ID = 553 + orINIndex ID = 554 + osIndex ID = 555 + osGEIndex ID = 556 + osRUIndex ID = 557 + paIndex ID = 558 + paArabIndex ID = 559 + paArabPKIndex ID = 560 + paGuruIndex ID = 561 + paGuruINIndex ID = 562 + papIndex ID = 563 + plIndex ID = 564 + plPLIndex ID = 565 + prgIndex ID = 566 + prg001Index ID = 567 + psIndex ID = 568 + psAFIndex ID = 569 + ptIndex ID = 570 + ptAOIndex ID = 571 + ptBRIndex ID = 572 + ptCHIndex ID = 573 + ptCVIndex ID = 574 + ptGQIndex ID = 575 + ptGWIndex ID = 576 + ptLUIndex ID = 577 + ptMOIndex ID = 578 + ptMZIndex ID = 579 + ptPTIndex ID = 580 + ptSTIndex ID = 581 + ptTLIndex ID = 582 + quIndex ID = 583 + quBOIndex ID = 584 + quECIndex ID = 585 + quPEIndex ID = 586 + rmIndex ID = 587 + rmCHIndex ID = 588 + rnIndex ID = 589 + rnBIIndex ID = 590 + roIndex ID = 591 + roMDIndex ID = 592 + roROIndex ID = 593 + rofIndex ID = 594 + rofTZIndex ID = 595 + ruIndex ID = 596 + ruBYIndex ID = 597 + ruKGIndex ID = 598 + ruKZIndex ID = 599 + ruMDIndex ID = 600 + ruRUIndex ID = 601 + ruUAIndex ID = 602 + rwIndex ID = 603 + rwRWIndex ID = 604 + rwkIndex ID = 605 + rwkTZIndex ID = 606 + sahIndex ID = 607 + sahRUIndex ID = 608 + saqIndex ID = 609 + saqKEIndex ID = 610 + sbpIndex ID = 611 + sbpTZIndex ID = 612 + sdIndex ID = 613 + sdPKIndex ID = 614 + sdhIndex ID = 615 + seIndex ID = 616 + seFIIndex ID = 617 + seNOIndex ID = 618 + seSEIndex ID = 619 + sehIndex ID = 620 + sehMZIndex ID = 621 + sesIndex ID = 622 + sesMLIndex ID = 623 + sgIndex ID = 624 + sgCFIndex ID = 625 + shIndex ID = 626 + shiIndex ID = 627 + shiLatnIndex ID = 628 + shiLatnMAIndex ID = 629 + shiTfngIndex ID = 630 + shiTfngMAIndex ID = 631 + siIndex ID = 632 + siLKIndex ID = 633 + skIndex ID = 634 + skSKIndex ID = 635 + slIndex ID = 636 + slSIIndex ID = 637 + smaIndex ID = 638 + smiIndex ID = 639 + smjIndex ID = 640 + smnIndex ID = 641 + smnFIIndex ID = 642 + smsIndex ID = 643 + snIndex ID = 644 + snZWIndex ID = 645 + soIndex ID = 646 + soDJIndex ID = 647 + soETIndex ID = 648 + soKEIndex ID = 649 + soSOIndex ID = 650 + sqIndex ID = 651 + sqALIndex ID = 652 + sqMKIndex ID = 653 + sqXKIndex ID = 654 + srIndex ID = 655 + srCyrlIndex ID = 656 + srCyrlBAIndex ID = 657 + srCyrlMEIndex ID = 658 + srCyrlRSIndex ID = 659 + srCyrlXKIndex ID = 660 + srLatnIndex ID = 661 + srLatnBAIndex ID = 662 + srLatnMEIndex ID = 663 + srLatnRSIndex ID = 664 + srLatnXKIndex ID = 665 + ssIndex ID = 666 + ssyIndex ID = 667 + stIndex ID = 668 + svIndex ID = 669 + svAXIndex ID = 670 + svFIIndex ID = 671 + svSEIndex ID = 672 + swIndex ID = 673 + swCDIndex ID = 674 + swKEIndex ID = 675 + swTZIndex ID = 676 + swUGIndex ID = 677 + syrIndex ID = 678 + taIndex ID = 679 + taINIndex ID = 680 + taLKIndex ID = 681 + taMYIndex ID = 682 + taSGIndex ID = 683 + teIndex ID = 684 + teINIndex ID = 685 + teoIndex ID = 686 + teoKEIndex ID = 687 + teoUGIndex ID = 688 + tgIndex ID = 689 + tgTJIndex ID = 690 + thIndex ID = 691 + thTHIndex ID = 692 + tiIndex ID = 693 + tiERIndex ID = 694 + tiETIndex ID = 695 + tigIndex ID = 696 + tkIndex ID = 697 + tkTMIndex ID = 698 + tlIndex ID = 699 + tnIndex ID = 700 + toIndex ID = 701 + toTOIndex ID = 702 + trIndex ID = 703 + trCYIndex ID = 704 + trTRIndex ID = 705 + tsIndex ID = 706 + ttIndex ID = 707 + ttRUIndex ID = 708 + twqIndex ID = 709 + twqNEIndex ID = 710 + tzmIndex ID = 711 + tzmMAIndex ID = 712 + ugIndex ID = 713 + ugCNIndex ID = 714 + ukIndex ID = 715 + ukUAIndex ID = 716 + urIndex ID = 717 + urINIndex ID = 718 + urPKIndex ID = 719 + uzIndex ID = 720 + uzArabIndex ID = 721 + uzArabAFIndex ID = 722 + uzCyrlIndex ID = 723 + uzCyrlUZIndex ID = 724 + uzLatnIndex ID = 725 + uzLatnUZIndex ID = 726 + vaiIndex ID = 727 + vaiLatnIndex ID = 728 + vaiLatnLRIndex ID = 729 + vaiVaiiIndex ID = 730 + vaiVaiiLRIndex ID = 731 + veIndex ID = 732 + viIndex ID = 733 + viVNIndex ID = 734 + voIndex ID = 735 + vo001Index ID = 736 + vunIndex ID = 737 + vunTZIndex ID = 738 + waIndex ID = 739 + waeIndex ID = 740 + waeCHIndex ID = 741 + woIndex ID = 742 + woSNIndex ID = 743 + xhIndex ID = 744 + xogIndex ID = 745 + xogUGIndex ID = 746 + yavIndex ID = 747 + yavCMIndex ID = 748 + yiIndex ID = 749 + yi001Index ID = 750 + yoIndex ID = 751 + yoBJIndex ID = 752 + yoNGIndex ID = 753 + yueIndex ID = 754 + yueHansIndex ID = 755 + yueHansCNIndex ID = 756 + yueHantIndex ID = 757 + yueHantHKIndex ID = 758 + zghIndex ID = 759 + zghMAIndex ID = 760 + zhIndex ID = 761 + zhHansIndex ID = 762 + zhHansCNIndex ID = 763 + zhHansHKIndex ID = 764 + zhHansMOIndex ID = 765 + zhHansSGIndex ID = 766 + zhHantIndex ID = 767 + zhHantHKIndex ID = 768 + zhHantMOIndex ID = 769 + zhHantTWIndex ID = 770 + zuIndex ID = 771 + zuZAIndex ID = 772 + caESvalenciaIndex ID = 773 + enUSuvaposixIndex ID = 774 +) + +var coreTags = []language.CompactCoreInfo{ // 773 elements + // Entry 0 - 1F + 0x00000000, 0x01600000, 0x016000d3, 0x01600162, + 0x01c00000, 0x01c00052, 0x02100000, 0x02100081, + 0x02700000, 0x02700070, 0x03a00000, 0x03a00001, + 0x03a00023, 0x03a00039, 0x03a00063, 0x03a00068, + 0x03a0006c, 0x03a0006d, 0x03a0006e, 0x03a00098, + 0x03a0009c, 0x03a000a2, 0x03a000a9, 0x03a000ad, + 0x03a000b1, 0x03a000ba, 0x03a000bb, 0x03a000ca, + 0x03a000e2, 0x03a000ee, 0x03a000f4, 0x03a00109, + // Entry 20 - 3F + 0x03a0010c, 0x03a00116, 0x03a00118, 0x03a0011d, + 0x03a00121, 0x03a00129, 0x03a0015f, 0x04000000, + 0x04300000, 0x0430009a, 0x04400000, 0x04400130, + 0x04800000, 0x0480006f, 0x05800000, 0x05820000, + 0x05820032, 0x0585b000, 0x0585b032, 0x05e00000, + 0x05e00052, 0x07100000, 0x07100047, 0x07500000, + 0x07500163, 0x07900000, 0x07900130, 0x07e00000, + 0x07e00038, 0x08200000, 0x0a000000, 0x0a0000c4, + // Entry 40 - 5F + 0x0a500000, 0x0a500035, 0x0a50009a, 0x0a900000, + 0x0a900053, 0x0a90009a, 0x0b200000, 0x0b200079, + 0x0b500000, 0x0b50009a, 0x0b700000, 0x0b720000, + 0x0b720033, 0x0b75b000, 0x0b75b033, 0x0d700000, + 0x0d700022, 0x0d70006f, 0x0d700079, 0x0d70009f, + 0x0db00000, 0x0db00035, 0x0db0009a, 0x0dc00000, + 0x0dc00107, 0x0df00000, 0x0df00132, 0x0e500000, + 0x0e500136, 0x0e900000, 0x0e90009c, 0x0e90009d, + // Entry 60 - 7F + 0x0fa00000, 0x0fa0005f, 0x0fe00000, 0x0fe00107, + 0x10000000, 0x1000007c, 0x10100000, 0x10100064, + 0x10100083, 0x10800000, 0x108000a5, 0x10d00000, + 0x10d0002e, 0x10d00036, 0x10d0004e, 0x10d00061, + 0x10d0009f, 0x10d000b3, 0x10d000b8, 0x11700000, + 0x117000d5, 0x11f00000, 0x11f00061, 0x12400000, + 0x12400052, 0x12800000, 0x12b00000, 0x12b00115, + 0x12d00000, 0x12d00043, 0x12f00000, 0x12f000a5, + // Entry 80 - 9F + 0x13000000, 0x13000081, 0x13000123, 0x13600000, + 0x1360005e, 0x13600088, 0x13900000, 0x13900001, + 0x1390001a, 0x13900025, 0x13900026, 0x1390002d, + 0x1390002e, 0x1390002f, 0x13900034, 0x13900036, + 0x1390003a, 0x1390003d, 0x13900042, 0x13900046, + 0x13900048, 0x13900049, 0x1390004a, 0x1390004e, + 0x13900050, 0x13900052, 0x1390005d, 0x1390005e, + 0x13900061, 0x13900062, 0x13900064, 0x13900065, + // Entry A0 - BF + 0x1390006e, 0x13900073, 0x13900074, 0x13900075, + 0x13900076, 0x1390007c, 0x1390007d, 0x13900080, + 0x13900081, 0x13900082, 0x13900084, 0x1390008b, + 0x1390008d, 0x1390008e, 0x13900097, 0x13900098, + 0x13900099, 0x1390009a, 0x1390009b, 0x139000a0, + 0x139000a1, 0x139000a5, 0x139000a8, 0x139000aa, + 0x139000ae, 0x139000b2, 0x139000b5, 0x139000b6, + 0x139000c0, 0x139000c1, 0x139000c7, 0x139000c8, + // Entry C0 - DF + 0x139000cb, 0x139000cc, 0x139000cd, 0x139000cf, + 0x139000d1, 0x139000d3, 0x139000d6, 0x139000d7, + 0x139000da, 0x139000de, 0x139000e0, 0x139000e1, + 0x139000e7, 0x139000e8, 0x139000e9, 0x139000ec, + 0x139000ed, 0x139000f1, 0x13900108, 0x1390010a, + 0x1390010b, 0x1390010c, 0x1390010d, 0x1390010e, + 0x1390010f, 0x13900110, 0x13900113, 0x13900118, + 0x1390011c, 0x1390011e, 0x13900120, 0x13900126, + // Entry E0 - FF + 0x1390012a, 0x1390012d, 0x1390012e, 0x13900130, + 0x13900132, 0x13900134, 0x13900136, 0x1390013a, + 0x1390013d, 0x1390013e, 0x13900140, 0x13900143, + 0x13900162, 0x13900163, 0x13900165, 0x13c00000, + 0x13c00001, 0x13e00000, 0x13e0001f, 0x13e0002c, + 0x13e0003f, 0x13e00041, 0x13e00048, 0x13e00051, + 0x13e00054, 0x13e00057, 0x13e0005a, 0x13e00066, + 0x13e00069, 0x13e0006a, 0x13e0006f, 0x13e00087, + // Entry 100 - 11F + 0x13e0008a, 0x13e00090, 0x13e00095, 0x13e000d0, + 0x13e000d9, 0x13e000e3, 0x13e000e5, 0x13e000e8, + 0x13e000ed, 0x13e000f2, 0x13e0011b, 0x13e00136, + 0x13e00137, 0x13e0013c, 0x14000000, 0x1400006b, + 0x14500000, 0x1450006f, 0x14600000, 0x14600052, + 0x14800000, 0x14800024, 0x1480009d, 0x14e00000, + 0x14e00052, 0x14e00085, 0x14e000ca, 0x14e00115, + 0x15100000, 0x15100073, 0x15300000, 0x153000e8, + // Entry 120 - 13F + 0x15800000, 0x15800064, 0x15800077, 0x15e00000, + 0x15e00036, 0x15e00037, 0x15e0003a, 0x15e0003b, + 0x15e0003c, 0x15e00049, 0x15e0004b, 0x15e0004c, + 0x15e0004d, 0x15e0004e, 0x15e0004f, 0x15e00052, + 0x15e00063, 0x15e00068, 0x15e00079, 0x15e0007b, + 0x15e0007f, 0x15e00085, 0x15e00086, 0x15e00087, + 0x15e00092, 0x15e000a9, 0x15e000b8, 0x15e000bb, + 0x15e000bc, 0x15e000bf, 0x15e000c0, 0x15e000c4, + // Entry 140 - 15F + 0x15e000c9, 0x15e000ca, 0x15e000cd, 0x15e000d4, + 0x15e000d5, 0x15e000e6, 0x15e000eb, 0x15e00103, + 0x15e00108, 0x15e0010b, 0x15e00115, 0x15e0011d, + 0x15e00121, 0x15e00123, 0x15e00129, 0x15e00140, + 0x15e00141, 0x15e00160, 0x16900000, 0x1690009f, + 0x16d00000, 0x16d000da, 0x16e00000, 0x16e00097, + 0x17e00000, 0x17e0007c, 0x19000000, 0x1900006f, + 0x1a300000, 0x1a30004e, 0x1a300079, 0x1a3000b3, + // Entry 160 - 17F + 0x1a400000, 0x1a40009a, 0x1a900000, 0x1ab00000, + 0x1ab000a5, 0x1ac00000, 0x1ac00099, 0x1b400000, + 0x1b400081, 0x1b4000d5, 0x1b4000d7, 0x1b800000, + 0x1b800136, 0x1bc00000, 0x1bc00098, 0x1be00000, + 0x1be0009a, 0x1d100000, 0x1d100033, 0x1d100091, + 0x1d200000, 0x1d200061, 0x1d500000, 0x1d500093, + 0x1d700000, 0x1d700028, 0x1e100000, 0x1e100096, + 0x1e700000, 0x1e7000d7, 0x1ea00000, 0x1ea00053, + // Entry 180 - 19F + 0x1f300000, 0x1f500000, 0x1f800000, 0x1f80009e, + 0x1f900000, 0x1f90004e, 0x1f90009f, 0x1f900114, + 0x1f900139, 0x1fa00000, 0x1fb00000, 0x20000000, + 0x200000a3, 0x20300000, 0x20700000, 0x20700052, + 0x20800000, 0x20a00000, 0x20a00130, 0x20e00000, + 0x20f00000, 0x21000000, 0x2100007e, 0x21200000, + 0x21200068, 0x21600000, 0x21700000, 0x217000a5, + 0x21f00000, 0x22300000, 0x22300130, 0x22700000, + // Entry 1A0 - 1BF + 0x2270005b, 0x23400000, 0x234000c4, 0x23900000, + 0x239000a5, 0x24200000, 0x242000af, 0x24400000, + 0x24400052, 0x24500000, 0x24500083, 0x24600000, + 0x246000a5, 0x24a00000, 0x24a000a7, 0x25100000, + 0x2510009a, 0x25400000, 0x254000ab, 0x254000ac, + 0x25600000, 0x2560009a, 0x26a00000, 0x26a0009a, + 0x26b00000, 0x26b00130, 0x26d00000, 0x26d00052, + 0x26e00000, 0x26e00061, 0x27400000, 0x28100000, + // Entry 1C0 - 1DF + 0x2810007c, 0x28a00000, 0x28a000a6, 0x29100000, + 0x29100130, 0x29500000, 0x295000b8, 0x2a300000, + 0x2a300132, 0x2af00000, 0x2af00136, 0x2b500000, + 0x2b50002a, 0x2b50004b, 0x2b50004c, 0x2b50004d, + 0x2b800000, 0x2b8000b0, 0x2bf00000, 0x2bf0009c, + 0x2bf0009d, 0x2c000000, 0x2c0000b7, 0x2c200000, + 0x2c20004b, 0x2c400000, 0x2c4000a5, 0x2c500000, + 0x2c5000a5, 0x2c700000, 0x2c7000b9, 0x2d100000, + // Entry 1E0 - 1FF + 0x2d1000a5, 0x2d100130, 0x2e900000, 0x2e9000a5, + 0x2ed00000, 0x2ed000cd, 0x2f100000, 0x2f1000c0, + 0x2f200000, 0x2f2000d2, 0x2f400000, 0x2f400052, + 0x2ff00000, 0x2ff000c3, 0x30400000, 0x3040009a, + 0x30b00000, 0x30b000c6, 0x31000000, 0x31b00000, + 0x31b0009a, 0x31f00000, 0x31f0003e, 0x31f000d1, + 0x31f0010e, 0x32000000, 0x320000cc, 0x32500000, + 0x32500052, 0x33100000, 0x331000c5, 0x33a00000, + // Entry 200 - 21F + 0x33a0009d, 0x34100000, 0x34500000, 0x345000d3, + 0x34700000, 0x347000db, 0x34700111, 0x34e00000, + 0x34e00165, 0x35000000, 0x35000061, 0x350000da, + 0x35100000, 0x3510009a, 0x351000dc, 0x36700000, + 0x36700030, 0x36700036, 0x36700040, 0x3670005c, + 0x367000da, 0x36700117, 0x3670011c, 0x36800000, + 0x36800052, 0x36a00000, 0x36a000db, 0x36c00000, + 0x36c00052, 0x36f00000, 0x37500000, 0x37600000, + // Entry 220 - 23F + 0x37a00000, 0x38000000, 0x38000118, 0x38700000, + 0x38900000, 0x38900132, 0x39000000, 0x39000070, + 0x390000a5, 0x39500000, 0x3950009a, 0x39800000, + 0x3980007e, 0x39800107, 0x39d00000, 0x39d05000, + 0x39d050e9, 0x39d36000, 0x39d3609a, 0x3a100000, + 0x3b300000, 0x3b3000ea, 0x3bd00000, 0x3bd00001, + 0x3be00000, 0x3be00024, 0x3c000000, 0x3c00002a, + 0x3c000041, 0x3c00004e, 0x3c00005b, 0x3c000087, + // Entry 240 - 25F + 0x3c00008c, 0x3c0000b8, 0x3c0000c7, 0x3c0000d2, + 0x3c0000ef, 0x3c000119, 0x3c000127, 0x3c400000, + 0x3c40003f, 0x3c40006a, 0x3c4000e5, 0x3d400000, + 0x3d40004e, 0x3d900000, 0x3d90003a, 0x3dc00000, + 0x3dc000bd, 0x3dc00105, 0x3de00000, 0x3de00130, + 0x3e200000, 0x3e200047, 0x3e2000a6, 0x3e2000af, + 0x3e2000bd, 0x3e200107, 0x3e200131, 0x3e500000, + 0x3e500108, 0x3e600000, 0x3e600130, 0x3eb00000, + // Entry 260 - 27F + 0x3eb00107, 0x3ec00000, 0x3ec000a5, 0x3f300000, + 0x3f300130, 0x3fa00000, 0x3fa000e9, 0x3fc00000, + 0x3fd00000, 0x3fd00073, 0x3fd000db, 0x3fd0010d, + 0x3ff00000, 0x3ff000d2, 0x40100000, 0x401000c4, + 0x40200000, 0x4020004c, 0x40700000, 0x40800000, + 0x4085b000, 0x4085b0bb, 0x408eb000, 0x408eb0bb, + 0x40c00000, 0x40c000b4, 0x41200000, 0x41200112, + 0x41600000, 0x41600110, 0x41c00000, 0x41d00000, + // Entry 280 - 29F + 0x41e00000, 0x41f00000, 0x41f00073, 0x42200000, + 0x42300000, 0x42300165, 0x42900000, 0x42900063, + 0x42900070, 0x429000a5, 0x42900116, 0x43100000, + 0x43100027, 0x431000c3, 0x4310014e, 0x43200000, + 0x43220000, 0x43220033, 0x432200be, 0x43220106, + 0x4322014e, 0x4325b000, 0x4325b033, 0x4325b0be, + 0x4325b106, 0x4325b14e, 0x43700000, 0x43a00000, + 0x43b00000, 0x44400000, 0x44400031, 0x44400073, + // Entry 2A0 - 2BF + 0x4440010d, 0x44500000, 0x4450004b, 0x445000a5, + 0x44500130, 0x44500132, 0x44e00000, 0x45000000, + 0x4500009a, 0x450000b4, 0x450000d1, 0x4500010e, + 0x46100000, 0x4610009a, 0x46400000, 0x464000a5, + 0x46400132, 0x46700000, 0x46700125, 0x46b00000, + 0x46b00124, 0x46f00000, 0x46f0006e, 0x46f00070, + 0x47100000, 0x47600000, 0x47600128, 0x47a00000, + 0x48000000, 0x48200000, 0x4820012a, 0x48a00000, + // Entry 2C0 - 2DF + 0x48a0005e, 0x48a0012c, 0x48e00000, 0x49400000, + 0x49400107, 0x4a400000, 0x4a4000d5, 0x4a900000, + 0x4a9000bb, 0x4ac00000, 0x4ac00053, 0x4ae00000, + 0x4ae00131, 0x4b400000, 0x4b40009a, 0x4b4000e9, + 0x4bc00000, 0x4bc05000, 0x4bc05024, 0x4bc20000, + 0x4bc20138, 0x4bc5b000, 0x4bc5b138, 0x4be00000, + 0x4be5b000, 0x4be5b0b5, 0x4bef4000, 0x4bef40b5, + 0x4c000000, 0x4c300000, 0x4c30013f, 0x4c900000, + // Entry 2E0 - 2FF + 0x4c900001, 0x4cc00000, 0x4cc00130, 0x4ce00000, + 0x4cf00000, 0x4cf0004e, 0x4e500000, 0x4e500115, + 0x4f200000, 0x4fb00000, 0x4fb00132, 0x50900000, + 0x50900052, 0x51200000, 0x51200001, 0x51800000, + 0x5180003b, 0x518000d7, 0x51f00000, 0x51f3b000, + 0x51f3b053, 0x51f3c000, 0x51f3c08e, 0x52800000, + 0x528000bb, 0x52900000, 0x5293b000, 0x5293b053, + 0x5293b08e, 0x5293b0c7, 0x5293b10e, 0x5293c000, + // Entry 300 - 31F + 0x5293c08e, 0x5293c0c7, 0x5293c12f, 0x52f00000, + 0x52f00162, +} // Size: 3116 bytes + +const specialTagsStr string = "ca-ES-valencia en-US-u-va-posix" + +// Total table size 3147 bytes (3KiB); checksum: 5A8FFFA5 diff --git a/vendor/golang.org/x/text/internal/language/compact/tags.go b/vendor/golang.org/x/text/internal/language/compact/tags.go new file mode 100644 index 000000000..ca135d295 --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compact/tags.go @@ -0,0 +1,91 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package compact + +var ( + und = Tag{} + + Und Tag = Tag{} + + Afrikaans Tag = Tag{language: afIndex, locale: afIndex} + Amharic Tag = Tag{language: amIndex, locale: amIndex} + Arabic Tag = Tag{language: arIndex, locale: arIndex} + ModernStandardArabic Tag = Tag{language: ar001Index, locale: ar001Index} + Azerbaijani Tag = Tag{language: azIndex, locale: azIndex} + Bulgarian Tag = Tag{language: bgIndex, locale: bgIndex} + Bengali Tag = Tag{language: bnIndex, locale: bnIndex} + Catalan Tag = Tag{language: caIndex, locale: caIndex} + Czech Tag = Tag{language: csIndex, locale: csIndex} + Danish Tag = Tag{language: daIndex, locale: daIndex} + German Tag = Tag{language: deIndex, locale: deIndex} + Greek Tag = Tag{language: elIndex, locale: elIndex} + English Tag = Tag{language: enIndex, locale: enIndex} + AmericanEnglish Tag = Tag{language: enUSIndex, locale: enUSIndex} + BritishEnglish Tag = Tag{language: enGBIndex, locale: enGBIndex} + Spanish Tag = Tag{language: esIndex, locale: esIndex} + EuropeanSpanish Tag = Tag{language: esESIndex, locale: esESIndex} + LatinAmericanSpanish Tag = Tag{language: es419Index, locale: es419Index} + Estonian Tag = Tag{language: etIndex, locale: etIndex} + Persian Tag = Tag{language: faIndex, locale: faIndex} + Finnish Tag = Tag{language: fiIndex, locale: fiIndex} + Filipino Tag = Tag{language: filIndex, locale: filIndex} + French Tag = Tag{language: frIndex, locale: frIndex} + CanadianFrench Tag = Tag{language: frCAIndex, locale: frCAIndex} + Gujarati Tag = Tag{language: guIndex, locale: guIndex} + Hebrew Tag = Tag{language: heIndex, locale: heIndex} + Hindi Tag = Tag{language: hiIndex, locale: hiIndex} + Croatian Tag = Tag{language: hrIndex, locale: hrIndex} + Hungarian Tag = Tag{language: huIndex, locale: huIndex} + Armenian Tag = Tag{language: hyIndex, locale: hyIndex} + Indonesian Tag = Tag{language: idIndex, locale: idIndex} + Icelandic Tag = Tag{language: isIndex, locale: isIndex} + Italian Tag = Tag{language: itIndex, locale: itIndex} + Japanese Tag = Tag{language: jaIndex, locale: jaIndex} + Georgian Tag = Tag{language: kaIndex, locale: kaIndex} + Kazakh Tag = Tag{language: kkIndex, locale: kkIndex} + Khmer Tag = Tag{language: kmIndex, locale: kmIndex} + Kannada Tag = Tag{language: knIndex, locale: knIndex} + Korean Tag = Tag{language: koIndex, locale: koIndex} + Kirghiz Tag = Tag{language: kyIndex, locale: kyIndex} + Lao Tag = Tag{language: loIndex, locale: loIndex} + Lithuanian Tag = Tag{language: ltIndex, locale: ltIndex} + Latvian Tag = Tag{language: lvIndex, locale: lvIndex} + Macedonian Tag = Tag{language: mkIndex, locale: mkIndex} + Malayalam Tag = Tag{language: mlIndex, locale: mlIndex} + Mongolian Tag = Tag{language: mnIndex, locale: mnIndex} + Marathi Tag = Tag{language: mrIndex, locale: mrIndex} + Malay Tag = Tag{language: msIndex, locale: msIndex} + Burmese Tag = Tag{language: myIndex, locale: myIndex} + Nepali Tag = Tag{language: neIndex, locale: neIndex} + Dutch Tag = Tag{language: nlIndex, locale: nlIndex} + Norwegian Tag = Tag{language: noIndex, locale: noIndex} + Punjabi Tag = Tag{language: paIndex, locale: paIndex} + Polish Tag = Tag{language: plIndex, locale: plIndex} + Portuguese Tag = Tag{language: ptIndex, locale: ptIndex} + BrazilianPortuguese Tag = Tag{language: ptBRIndex, locale: ptBRIndex} + EuropeanPortuguese Tag = Tag{language: ptPTIndex, locale: ptPTIndex} + Romanian Tag = Tag{language: roIndex, locale: roIndex} + Russian Tag = Tag{language: ruIndex, locale: ruIndex} + Sinhala Tag = Tag{language: siIndex, locale: siIndex} + Slovak Tag = Tag{language: skIndex, locale: skIndex} + Slovenian Tag = Tag{language: slIndex, locale: slIndex} + Albanian Tag = Tag{language: sqIndex, locale: sqIndex} + Serbian Tag = Tag{language: srIndex, locale: srIndex} + SerbianLatin Tag = Tag{language: srLatnIndex, locale: srLatnIndex} + Swedish Tag = Tag{language: svIndex, locale: svIndex} + Swahili Tag = Tag{language: swIndex, locale: swIndex} + Tamil Tag = Tag{language: taIndex, locale: taIndex} + Telugu Tag = Tag{language: teIndex, locale: teIndex} + Thai Tag = Tag{language: thIndex, locale: thIndex} + Turkish Tag = Tag{language: trIndex, locale: trIndex} + Ukrainian Tag = Tag{language: ukIndex, locale: ukIndex} + Urdu Tag = Tag{language: urIndex, locale: urIndex} + Uzbek Tag = Tag{language: uzIndex, locale: uzIndex} + Vietnamese Tag = Tag{language: viIndex, locale: viIndex} + Chinese Tag = Tag{language: zhIndex, locale: zhIndex} + SimplifiedChinese Tag = Tag{language: zhHansIndex, locale: zhHansIndex} + TraditionalChinese Tag = Tag{language: zhHantIndex, locale: zhHantIndex} + Zulu Tag = Tag{language: zuIndex, locale: zuIndex} +) diff --git a/vendor/golang.org/x/text/internal/language/compose.go b/vendor/golang.org/x/text/internal/language/compose.go new file mode 100644 index 000000000..4ae78e0fa --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/compose.go @@ -0,0 +1,167 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "sort" + "strings" +) + +// A Builder allows constructing a Tag from individual components. +// Its main user is Compose in the top-level language package. +type Builder struct { + Tag Tag + + private string // the x extension + variants []string + extensions []string +} + +// Make returns a new Tag from the current settings. +func (b *Builder) Make() Tag { + t := b.Tag + + if len(b.extensions) > 0 || len(b.variants) > 0 { + sort.Sort(sortVariants(b.variants)) + sort.Strings(b.extensions) + + if b.private != "" { + b.extensions = append(b.extensions, b.private) + } + n := maxCoreSize + tokenLen(b.variants...) + tokenLen(b.extensions...) + buf := make([]byte, n) + p := t.genCoreBytes(buf) + t.pVariant = byte(p) + p += appendTokens(buf[p:], b.variants...) + t.pExt = uint16(p) + p += appendTokens(buf[p:], b.extensions...) + t.str = string(buf[:p]) + // We may not always need to remake the string, but when or when not + // to do so is rather tricky. + scan := makeScanner(buf[:p]) + t, _ = parse(&scan, "") + return t + + } else if b.private != "" { + t.str = b.private + t.RemakeString() + } + return t +} + +// SetTag copies all the settings from a given Tag. Any previously set values +// are discarded. +func (b *Builder) SetTag(t Tag) { + b.Tag.LangID = t.LangID + b.Tag.RegionID = t.RegionID + b.Tag.ScriptID = t.ScriptID + // TODO: optimize + b.variants = b.variants[:0] + if variants := t.Variants(); variants != "" { + for _, vr := range strings.Split(variants[1:], "-") { + b.variants = append(b.variants, vr) + } + } + b.extensions, b.private = b.extensions[:0], "" + for _, e := range t.Extensions() { + b.AddExt(e) + } +} + +// AddExt adds extension e to the tag. e must be a valid extension as returned +// by Tag.Extension. If the extension already exists, it will be discarded, +// except for a -u extension, where non-existing key-type pairs will added. +func (b *Builder) AddExt(e string) { + if e[0] == 'x' { + if b.private == "" { + b.private = e + } + return + } + for i, s := range b.extensions { + if s[0] == e[0] { + if e[0] == 'u' { + b.extensions[i] += e[1:] + } + return + } + } + b.extensions = append(b.extensions, e) +} + +// SetExt sets the extension e to the tag. e must be a valid extension as +// returned by Tag.Extension. If the extension already exists, it will be +// overwritten, except for a -u extension, where the individual key-type pairs +// will be set. +func (b *Builder) SetExt(e string) { + if e[0] == 'x' { + b.private = e + return + } + for i, s := range b.extensions { + if s[0] == e[0] { + if e[0] == 'u' { + b.extensions[i] = e + s[1:] + } else { + b.extensions[i] = e + } + return + } + } + b.extensions = append(b.extensions, e) +} + +// AddVariant adds any number of variants. +func (b *Builder) AddVariant(v ...string) { + for _, v := range v { + if v != "" { + b.variants = append(b.variants, v) + } + } +} + +// ClearVariants removes any variants previously added, including those +// copied from a Tag in SetTag. +func (b *Builder) ClearVariants() { + b.variants = b.variants[:0] +} + +// ClearExtensions removes any extensions previously added, including those +// copied from a Tag in SetTag. +func (b *Builder) ClearExtensions() { + b.private = "" + b.extensions = b.extensions[:0] +} + +func tokenLen(token ...string) (n int) { + for _, t := range token { + n += len(t) + 1 + } + return +} + +func appendTokens(b []byte, token ...string) int { + p := 0 + for _, t := range token { + b[p] = '-' + copy(b[p+1:], t) + p += 1 + len(t) + } + return p +} + +type sortVariants []string + +func (s sortVariants) Len() int { + return len(s) +} + +func (s sortVariants) Swap(i, j int) { + s[j], s[i] = s[i], s[j] +} + +func (s sortVariants) Less(i, j int) bool { + return variantIndex[s[i]] < variantIndex[s[j]] +} diff --git a/vendor/golang.org/x/text/internal/language/coverage.go b/vendor/golang.org/x/text/internal/language/coverage.go new file mode 100644 index 000000000..9b20b88fe --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/coverage.go @@ -0,0 +1,28 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +// BaseLanguages returns the list of all supported base languages. It generates +// the list by traversing the internal structures. +func BaseLanguages() []Language { + base := make([]Language, 0, NumLanguages) + for i := 0; i < langNoIndexOffset; i++ { + // We included "und" already for the value 0. + if i != nonCanonicalUnd { + base = append(base, Language(i)) + } + } + i := langNoIndexOffset + for _, v := range langNoIndex { + for k := 0; k < 8; k++ { + if v&1 == 1 { + base = append(base, Language(i)) + } + v >>= 1 + i++ + } + } + return base +} diff --git a/vendor/golang.org/x/text/internal/language/language.go b/vendor/golang.org/x/text/internal/language/language.go new file mode 100644 index 000000000..09d41c736 --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/language.go @@ -0,0 +1,627 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go gen_common.go -output tables.go + +package language // import "golang.org/x/text/internal/language" + +// TODO: Remove above NOTE after: +// - verifying that tables are dropped correctly (most notably matcher tables). + +import ( + "errors" + "fmt" + "strings" +) + +const ( + // maxCoreSize is the maximum size of a BCP 47 tag without variants and + // extensions. Equals max lang (3) + script (4) + max reg (3) + 2 dashes. + maxCoreSize = 12 + + // max99thPercentileSize is a somewhat arbitrary buffer size that presumably + // is large enough to hold at least 99% of the BCP 47 tags. + max99thPercentileSize = 32 + + // maxSimpleUExtensionSize is the maximum size of a -u extension with one + // key-type pair. Equals len("-u-") + key (2) + dash + max value (8). + maxSimpleUExtensionSize = 14 +) + +// Tag represents a BCP 47 language tag. It is used to specify an instance of a +// specific language or locale. All language tag values are guaranteed to be +// well-formed. The zero value of Tag is Und. +type Tag struct { + // TODO: the following fields have the form TagTypeID. This name is chosen + // to allow refactoring the public package without conflicting with its + // Base, Script, and Region methods. Once the transition is fully completed + // the ID can be stripped from the name. + + LangID Language + RegionID Region + // TODO: we will soon run out of positions for ScriptID. Idea: instead of + // storing lang, region, and ScriptID codes, store only the compact index and + // have a lookup table from this code to its expansion. This greatly speeds + // up table lookup, speed up common variant cases. + // This will also immediately free up 3 extra bytes. Also, the pVariant + // field can now be moved to the lookup table, as the compact index uniquely + // determines the offset of a possible variant. + ScriptID Script + pVariant byte // offset in str, includes preceding '-' + pExt uint16 // offset of first extension, includes preceding '-' + + // str is the string representation of the Tag. It will only be used if the + // tag has variants or extensions. + str string +} + +// Make is a convenience wrapper for Parse that omits the error. +// In case of an error, a sensible default is returned. +func Make(s string) Tag { + t, _ := Parse(s) + return t +} + +// Raw returns the raw base language, script and region, without making an +// attempt to infer their values. +// TODO: consider removing +func (t Tag) Raw() (b Language, s Script, r Region) { + return t.LangID, t.ScriptID, t.RegionID +} + +// equalTags compares language, script and region subtags only. +func (t Tag) equalTags(a Tag) bool { + return t.LangID == a.LangID && t.ScriptID == a.ScriptID && t.RegionID == a.RegionID +} + +// IsRoot returns true if t is equal to language "und". +func (t Tag) IsRoot() bool { + if int(t.pVariant) < len(t.str) { + return false + } + return t.equalTags(Und) +} + +// IsPrivateUse reports whether the Tag consists solely of an IsPrivateUse use +// tag. +func (t Tag) IsPrivateUse() bool { + return t.str != "" && t.pVariant == 0 +} + +// RemakeString is used to update t.str in case lang, script or region changed. +// It is assumed that pExt and pVariant still point to the start of the +// respective parts. +func (t *Tag) RemakeString() { + if t.str == "" { + return + } + extra := t.str[t.pVariant:] + if t.pVariant > 0 { + extra = extra[1:] + } + if t.equalTags(Und) && strings.HasPrefix(extra, "x-") { + t.str = extra + t.pVariant = 0 + t.pExt = 0 + return + } + var buf [max99thPercentileSize]byte // avoid extra memory allocation in most cases. + b := buf[:t.genCoreBytes(buf[:])] + if extra != "" { + diff := len(b) - int(t.pVariant) + b = append(b, '-') + b = append(b, extra...) + t.pVariant = uint8(int(t.pVariant) + diff) + t.pExt = uint16(int(t.pExt) + diff) + } else { + t.pVariant = uint8(len(b)) + t.pExt = uint16(len(b)) + } + t.str = string(b) +} + +// genCoreBytes writes a string for the base languages, script and region tags +// to the given buffer and returns the number of bytes written. It will never +// write more than maxCoreSize bytes. +func (t *Tag) genCoreBytes(buf []byte) int { + n := t.LangID.StringToBuf(buf[:]) + if t.ScriptID != 0 { + n += copy(buf[n:], "-") + n += copy(buf[n:], t.ScriptID.String()) + } + if t.RegionID != 0 { + n += copy(buf[n:], "-") + n += copy(buf[n:], t.RegionID.String()) + } + return n +} + +// String returns the canonical string representation of the language tag. +func (t Tag) String() string { + if t.str != "" { + return t.str + } + if t.ScriptID == 0 && t.RegionID == 0 { + return t.LangID.String() + } + buf := [maxCoreSize]byte{} + return string(buf[:t.genCoreBytes(buf[:])]) +} + +// MarshalText implements encoding.TextMarshaler. +func (t Tag) MarshalText() (text []byte, err error) { + if t.str != "" { + text = append(text, t.str...) + } else if t.ScriptID == 0 && t.RegionID == 0 { + text = append(text, t.LangID.String()...) + } else { + buf := [maxCoreSize]byte{} + text = buf[:t.genCoreBytes(buf[:])] + } + return text, nil +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (t *Tag) UnmarshalText(text []byte) error { + tag, err := Parse(string(text)) + *t = tag + return err +} + +// Variants returns the part of the tag holding all variants or the empty string +// if there are no variants defined. +func (t Tag) Variants() string { + if t.pVariant == 0 { + return "" + } + return t.str[t.pVariant:t.pExt] +} + +// VariantOrPrivateUseTags returns variants or private use tags. +func (t Tag) VariantOrPrivateUseTags() string { + if t.pExt > 0 { + return t.str[t.pVariant:t.pExt] + } + return t.str[t.pVariant:] +} + +// HasString reports whether this tag defines more than just the raw +// components. +func (t Tag) HasString() bool { + return t.str != "" +} + +// Parent returns the CLDR parent of t. In CLDR, missing fields in data for a +// specific language are substituted with fields from the parent language. +// The parent for a language may change for newer versions of CLDR. +func (t Tag) Parent() Tag { + if t.str != "" { + // Strip the variants and extensions. + b, s, r := t.Raw() + t = Tag{LangID: b, ScriptID: s, RegionID: r} + if t.RegionID == 0 && t.ScriptID != 0 && t.LangID != 0 { + base, _ := addTags(Tag{LangID: t.LangID}) + if base.ScriptID == t.ScriptID { + return Tag{LangID: t.LangID} + } + } + return t + } + if t.LangID != 0 { + if t.RegionID != 0 { + maxScript := t.ScriptID + if maxScript == 0 { + max, _ := addTags(t) + maxScript = max.ScriptID + } + + for i := range parents { + if Language(parents[i].lang) == t.LangID && Script(parents[i].maxScript) == maxScript { + for _, r := range parents[i].fromRegion { + if Region(r) == t.RegionID { + return Tag{ + LangID: t.LangID, + ScriptID: Script(parents[i].script), + RegionID: Region(parents[i].toRegion), + } + } + } + } + } + + // Strip the script if it is the default one. + base, _ := addTags(Tag{LangID: t.LangID}) + if base.ScriptID != maxScript { + return Tag{LangID: t.LangID, ScriptID: maxScript} + } + return Tag{LangID: t.LangID} + } else if t.ScriptID != 0 { + // The parent for an base-script pair with a non-default script is + // "und" instead of the base language. + base, _ := addTags(Tag{LangID: t.LangID}) + if base.ScriptID != t.ScriptID { + return Und + } + return Tag{LangID: t.LangID} + } + } + return Und +} + +// ParseExtension parses s as an extension and returns it on success. +func ParseExtension(s string) (ext string, err error) { + defer func() { + if recover() != nil { + ext = "" + err = ErrSyntax + } + }() + + scan := makeScannerString(s) + var end int + if n := len(scan.token); n != 1 { + return "", ErrSyntax + } + scan.toLower(0, len(scan.b)) + end = parseExtension(&scan) + if end != len(s) { + return "", ErrSyntax + } + return string(scan.b), nil +} + +// HasVariants reports whether t has variants. +func (t Tag) HasVariants() bool { + return uint16(t.pVariant) < t.pExt +} + +// HasExtensions reports whether t has extensions. +func (t Tag) HasExtensions() bool { + return int(t.pExt) < len(t.str) +} + +// Extension returns the extension of type x for tag t. It will return +// false for ok if t does not have the requested extension. The returned +// extension will be invalid in this case. +func (t Tag) Extension(x byte) (ext string, ok bool) { + for i := int(t.pExt); i < len(t.str)-1; { + var ext string + i, ext = getExtension(t.str, i) + if ext[0] == x { + return ext, true + } + } + return "", false +} + +// Extensions returns all extensions of t. +func (t Tag) Extensions() []string { + e := []string{} + for i := int(t.pExt); i < len(t.str)-1; { + var ext string + i, ext = getExtension(t.str, i) + e = append(e, ext) + } + return e +} + +// TypeForKey returns the type associated with the given key, where key and type +// are of the allowed values defined for the Unicode locale extension ('u') in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +// TypeForKey will traverse the inheritance chain to get the correct value. +// +// If there are multiple types associated with a key, only the first will be +// returned. If there is no type associated with a key, it returns the empty +// string. +func (t Tag) TypeForKey(key string) string { + if _, start, end, _ := t.findTypeForKey(key); end != start { + s := t.str[start:end] + if p := strings.IndexByte(s, '-'); p >= 0 { + s = s[:p] + } + return s + } + return "" +} + +var ( + errPrivateUse = errors.New("cannot set a key on a private use tag") + errInvalidArguments = errors.New("invalid key or type") +) + +// SetTypeForKey returns a new Tag with the key set to type, where key and type +// are of the allowed values defined for the Unicode locale extension ('u') in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +// An empty value removes an existing pair with the same key. +func (t Tag) SetTypeForKey(key, value string) (Tag, error) { + if t.IsPrivateUse() { + return t, errPrivateUse + } + if len(key) != 2 { + return t, errInvalidArguments + } + + // Remove the setting if value is "". + if value == "" { + start, sep, end, _ := t.findTypeForKey(key) + if start != sep { + // Remove a possible empty extension. + switch { + case t.str[start-2] != '-': // has previous elements. + case end == len(t.str), // end of string + end+2 < len(t.str) && t.str[end+2] == '-': // end of extension + start -= 2 + } + if start == int(t.pVariant) && end == len(t.str) { + t.str = "" + t.pVariant, t.pExt = 0, 0 + } else { + t.str = fmt.Sprintf("%s%s", t.str[:start], t.str[end:]) + } + } + return t, nil + } + + if len(value) < 3 || len(value) > 8 { + return t, errInvalidArguments + } + + var ( + buf [maxCoreSize + maxSimpleUExtensionSize]byte + uStart int // start of the -u extension. + ) + + // Generate the tag string if needed. + if t.str == "" { + uStart = t.genCoreBytes(buf[:]) + buf[uStart] = '-' + uStart++ + } + + // Create new key-type pair and parse it to verify. + b := buf[uStart:] + copy(b, "u-") + copy(b[2:], key) + b[4] = '-' + b = b[:5+copy(b[5:], value)] + scan := makeScanner(b) + if parseExtensions(&scan); scan.err != nil { + return t, scan.err + } + + // Assemble the replacement string. + if t.str == "" { + t.pVariant, t.pExt = byte(uStart-1), uint16(uStart-1) + t.str = string(buf[:uStart+len(b)]) + } else { + s := t.str + start, sep, end, hasExt := t.findTypeForKey(key) + if start == sep { + if hasExt { + b = b[2:] + } + t.str = fmt.Sprintf("%s-%s%s", s[:sep], b, s[end:]) + } else { + t.str = fmt.Sprintf("%s-%s%s", s[:start+3], value, s[end:]) + } + } + return t, nil +} + +// findTypeForKey returns the start and end position for the type corresponding +// to key or the point at which to insert the key-value pair if the type +// wasn't found. The hasExt return value reports whether an -u extension was present. +// Note: the extensions are typically very small and are likely to contain +// only one key-type pair. +func (t Tag) findTypeForKey(key string) (start, sep, end int, hasExt bool) { + p := int(t.pExt) + if len(key) != 2 || p == len(t.str) || p == 0 { + return p, p, p, false + } + s := t.str + + // Find the correct extension. + for p++; s[p] != 'u'; p++ { + if s[p] > 'u' { + p-- + return p, p, p, false + } + if p = nextExtension(s, p); p == len(s) { + return len(s), len(s), len(s), false + } + } + // Proceed to the hyphen following the extension name. + p++ + + // curKey is the key currently being processed. + curKey := "" + + // Iterate over keys until we get the end of a section. + for { + end = p + for p++; p < len(s) && s[p] != '-'; p++ { + } + n := p - end - 1 + if n <= 2 && curKey == key { + if sep < end { + sep++ + } + return start, sep, end, true + } + switch n { + case 0, // invalid string + 1: // next extension + return end, end, end, true + case 2: + // next key + curKey = s[end+1 : p] + if curKey > key { + return end, end, end, true + } + start = end + sep = p + } + } +} + +// ParseBase parses a 2- or 3-letter ISO 639 code. +// It returns a ValueError if s is a well-formed but unknown language identifier +// or another error if another error occurred. +func ParseBase(s string) (l Language, err error) { + defer func() { + if recover() != nil { + l = 0 + err = ErrSyntax + } + }() + + if n := len(s); n < 2 || 3 < n { + return 0, ErrSyntax + } + var buf [3]byte + return getLangID(buf[:copy(buf[:], s)]) +} + +// ParseScript parses a 4-letter ISO 15924 code. +// It returns a ValueError if s is a well-formed but unknown script identifier +// or another error if another error occurred. +func ParseScript(s string) (scr Script, err error) { + defer func() { + if recover() != nil { + scr = 0 + err = ErrSyntax + } + }() + + if len(s) != 4 { + return 0, ErrSyntax + } + var buf [4]byte + return getScriptID(script, buf[:copy(buf[:], s)]) +} + +// EncodeM49 returns the Region for the given UN M.49 code. +// It returns an error if r is not a valid code. +func EncodeM49(r int) (Region, error) { + return getRegionM49(r) +} + +// ParseRegion parses a 2- or 3-letter ISO 3166-1 or a UN M.49 code. +// It returns a ValueError if s is a well-formed but unknown region identifier +// or another error if another error occurred. +func ParseRegion(s string) (r Region, err error) { + defer func() { + if recover() != nil { + r = 0 + err = ErrSyntax + } + }() + + if n := len(s); n < 2 || 3 < n { + return 0, ErrSyntax + } + var buf [3]byte + return getRegionID(buf[:copy(buf[:], s)]) +} + +// IsCountry returns whether this region is a country or autonomous area. This +// includes non-standard definitions from CLDR. +func (r Region) IsCountry() bool { + if r == 0 || r.IsGroup() || r.IsPrivateUse() && r != _XK { + return false + } + return true +} + +// IsGroup returns whether this region defines a collection of regions. This +// includes non-standard definitions from CLDR. +func (r Region) IsGroup() bool { + if r == 0 { + return false + } + return int(regionInclusion[r]) < len(regionContainment) +} + +// Contains returns whether Region c is contained by Region r. It returns true +// if c == r. +func (r Region) Contains(c Region) bool { + if r == c { + return true + } + g := regionInclusion[r] + if g >= nRegionGroups { + return false + } + m := regionContainment[g] + + d := regionInclusion[c] + b := regionInclusionBits[d] + + // A contained country may belong to multiple disjoint groups. Matching any + // of these indicates containment. If the contained region is a group, it + // must strictly be a subset. + if d >= nRegionGroups { + return b&m != 0 + } + return b&^m == 0 +} + +var errNoTLD = errors.New("language: region is not a valid ccTLD") + +// TLD returns the country code top-level domain (ccTLD). UK is returned for GB. +// In all other cases it returns either the region itself or an error. +// +// This method may return an error for a region for which there exists a +// canonical form with a ccTLD. To get that ccTLD canonicalize r first. The +// region will already be canonicalized it was obtained from a Tag that was +// obtained using any of the default methods. +func (r Region) TLD() (Region, error) { + // See http://en.wikipedia.org/wiki/Country_code_top-level_domain for the + // difference between ISO 3166-1 and IANA ccTLD. + if r == _GB { + r = _UK + } + if (r.typ() & ccTLD) == 0 { + return 0, errNoTLD + } + return r, nil +} + +// Canonicalize returns the region or a possible replacement if the region is +// deprecated. It will not return a replacement for deprecated regions that +// are split into multiple regions. +func (r Region) Canonicalize() Region { + if cr := normRegion(r); cr != 0 { + return cr + } + return r +} + +// Variant represents a registered variant of a language as defined by BCP 47. +type Variant struct { + ID uint8 + str string +} + +// ParseVariant parses and returns a Variant. An error is returned if s is not +// a valid variant. +func ParseVariant(s string) (v Variant, err error) { + defer func() { + if recover() != nil { + v = Variant{} + err = ErrSyntax + } + }() + + s = strings.ToLower(s) + if id, ok := variantIndex[s]; ok { + return Variant{id, s}, nil + } + return Variant{}, NewValueError([]byte(s)) +} + +// String returns the string representation of the variant. +func (v Variant) String() string { + return v.str +} diff --git a/vendor/golang.org/x/text/internal/language/lookup.go b/vendor/golang.org/x/text/internal/language/lookup.go new file mode 100644 index 000000000..231b4fbde --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/lookup.go @@ -0,0 +1,412 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "bytes" + "fmt" + "sort" + "strconv" + + "golang.org/x/text/internal/tag" +) + +// findIndex tries to find the given tag in idx and returns a standardized error +// if it could not be found. +func findIndex(idx tag.Index, key []byte, form string) (index int, err error) { + if !tag.FixCase(form, key) { + return 0, ErrSyntax + } + i := idx.Index(key) + if i == -1 { + return 0, NewValueError(key) + } + return i, nil +} + +func searchUint(imap []uint16, key uint16) int { + return sort.Search(len(imap), func(i int) bool { + return imap[i] >= key + }) +} + +type Language uint16 + +// getLangID returns the langID of s if s is a canonical subtag +// or langUnknown if s is not a canonical subtag. +func getLangID(s []byte) (Language, error) { + if len(s) == 2 { + return getLangISO2(s) + } + return getLangISO3(s) +} + +// TODO language normalization as well as the AliasMaps could be moved to the +// higher level package, but it is a bit tricky to separate the generation. + +func (id Language) Canonicalize() (Language, AliasType) { + return normLang(id) +} + +// normLang returns the mapped langID of id according to mapping m. +func normLang(id Language) (Language, AliasType) { + k := sort.Search(len(AliasMap), func(i int) bool { + return AliasMap[i].From >= uint16(id) + }) + if k < len(AliasMap) && AliasMap[k].From == uint16(id) { + return Language(AliasMap[k].To), AliasTypes[k] + } + return id, AliasTypeUnknown +} + +// getLangISO2 returns the langID for the given 2-letter ISO language code +// or unknownLang if this does not exist. +func getLangISO2(s []byte) (Language, error) { + if !tag.FixCase("zz", s) { + return 0, ErrSyntax + } + if i := lang.Index(s); i != -1 && lang.Elem(i)[3] != 0 { + return Language(i), nil + } + return 0, NewValueError(s) +} + +const base = 'z' - 'a' + 1 + +func strToInt(s []byte) uint { + v := uint(0) + for i := 0; i < len(s); i++ { + v *= base + v += uint(s[i] - 'a') + } + return v +} + +// converts the given integer to the original ASCII string passed to strToInt. +// len(s) must match the number of characters obtained. +func intToStr(v uint, s []byte) { + for i := len(s) - 1; i >= 0; i-- { + s[i] = byte(v%base) + 'a' + v /= base + } +} + +// getLangISO3 returns the langID for the given 3-letter ISO language code +// or unknownLang if this does not exist. +func getLangISO3(s []byte) (Language, error) { + if tag.FixCase("und", s) { + // first try to match canonical 3-letter entries + for i := lang.Index(s[:2]); i != -1; i = lang.Next(s[:2], i) { + if e := lang.Elem(i); e[3] == 0 && e[2] == s[2] { + // We treat "und" as special and always translate it to "unspecified". + // Note that ZZ and Zzzz are private use and are not treated as + // unspecified by default. + id := Language(i) + if id == nonCanonicalUnd { + return 0, nil + } + return id, nil + } + } + if i := altLangISO3.Index(s); i != -1 { + return Language(altLangIndex[altLangISO3.Elem(i)[3]]), nil + } + n := strToInt(s) + if langNoIndex[n/8]&(1<<(n%8)) != 0 { + return Language(n) + langNoIndexOffset, nil + } + // Check for non-canonical uses of ISO3. + for i := lang.Index(s[:1]); i != -1; i = lang.Next(s[:1], i) { + if e := lang.Elem(i); e[2] == s[1] && e[3] == s[2] { + return Language(i), nil + } + } + return 0, NewValueError(s) + } + return 0, ErrSyntax +} + +// StringToBuf writes the string to b and returns the number of bytes +// written. cap(b) must be >= 3. +func (id Language) StringToBuf(b []byte) int { + if id >= langNoIndexOffset { + intToStr(uint(id)-langNoIndexOffset, b[:3]) + return 3 + } else if id == 0 { + return copy(b, "und") + } + l := lang[id<<2:] + if l[3] == 0 { + return copy(b, l[:3]) + } + return copy(b, l[:2]) +} + +// String returns the BCP 47 representation of the langID. +// Use b as variable name, instead of id, to ensure the variable +// used is consistent with that of Base in which this type is embedded. +func (b Language) String() string { + if b == 0 { + return "und" + } else if b >= langNoIndexOffset { + b -= langNoIndexOffset + buf := [3]byte{} + intToStr(uint(b), buf[:]) + return string(buf[:]) + } + l := lang.Elem(int(b)) + if l[3] == 0 { + return l[:3] + } + return l[:2] +} + +// ISO3 returns the ISO 639-3 language code. +func (b Language) ISO3() string { + if b == 0 || b >= langNoIndexOffset { + return b.String() + } + l := lang.Elem(int(b)) + if l[3] == 0 { + return l[:3] + } else if l[2] == 0 { + return altLangISO3.Elem(int(l[3]))[:3] + } + // This allocation will only happen for 3-letter ISO codes + // that are non-canonical BCP 47 language identifiers. + return l[0:1] + l[2:4] +} + +// IsPrivateUse reports whether this language code is reserved for private use. +func (b Language) IsPrivateUse() bool { + return langPrivateStart <= b && b <= langPrivateEnd +} + +// SuppressScript returns the script marked as SuppressScript in the IANA +// language tag repository, or 0 if there is no such script. +func (b Language) SuppressScript() Script { + if b < langNoIndexOffset { + return Script(suppressScript[b]) + } + return 0 +} + +type Region uint16 + +// getRegionID returns the region id for s if s is a valid 2-letter region code +// or unknownRegion. +func getRegionID(s []byte) (Region, error) { + if len(s) == 3 { + if isAlpha(s[0]) { + return getRegionISO3(s) + } + if i, err := strconv.ParseUint(string(s), 10, 10); err == nil { + return getRegionM49(int(i)) + } + } + return getRegionISO2(s) +} + +// getRegionISO2 returns the regionID for the given 2-letter ISO country code +// or unknownRegion if this does not exist. +func getRegionISO2(s []byte) (Region, error) { + i, err := findIndex(regionISO, s, "ZZ") + if err != nil { + return 0, err + } + return Region(i) + isoRegionOffset, nil +} + +// getRegionISO3 returns the regionID for the given 3-letter ISO country code +// or unknownRegion if this does not exist. +func getRegionISO3(s []byte) (Region, error) { + if tag.FixCase("ZZZ", s) { + for i := regionISO.Index(s[:1]); i != -1; i = regionISO.Next(s[:1], i) { + if e := regionISO.Elem(i); e[2] == s[1] && e[3] == s[2] { + return Region(i) + isoRegionOffset, nil + } + } + for i := 0; i < len(altRegionISO3); i += 3 { + if tag.Compare(altRegionISO3[i:i+3], s) == 0 { + return Region(altRegionIDs[i/3]), nil + } + } + return 0, NewValueError(s) + } + return 0, ErrSyntax +} + +func getRegionM49(n int) (Region, error) { + if 0 < n && n <= 999 { + const ( + searchBits = 7 + regionBits = 9 + regionMask = 1<<regionBits - 1 + ) + idx := n >> searchBits + buf := fromM49[m49Index[idx]:m49Index[idx+1]] + val := uint16(n) << regionBits // we rely on bits shifting out + i := sort.Search(len(buf), func(i int) bool { + return buf[i] >= val + }) + if r := fromM49[int(m49Index[idx])+i]; r&^regionMask == val { + return Region(r & regionMask), nil + } + } + var e ValueError + fmt.Fprint(bytes.NewBuffer([]byte(e.v[:])), n) + return 0, e +} + +// normRegion returns a region if r is deprecated or 0 otherwise. +// TODO: consider supporting BYS (-> BLR), CSK (-> 200 or CZ), PHI (-> PHL) and AFI (-> DJ). +// TODO: consider mapping split up regions to new most populous one (like CLDR). +func normRegion(r Region) Region { + m := regionOldMap + k := sort.Search(len(m), func(i int) bool { + return m[i].From >= uint16(r) + }) + if k < len(m) && m[k].From == uint16(r) { + return Region(m[k].To) + } + return 0 +} + +const ( + iso3166UserAssigned = 1 << iota + ccTLD + bcp47Region +) + +func (r Region) typ() byte { + return regionTypes[r] +} + +// String returns the BCP 47 representation for the region. +// It returns "ZZ" for an unspecified region. +func (r Region) String() string { + if r < isoRegionOffset { + if r == 0 { + return "ZZ" + } + return fmt.Sprintf("%03d", r.M49()) + } + r -= isoRegionOffset + return regionISO.Elem(int(r))[:2] +} + +// ISO3 returns the 3-letter ISO code of r. +// Note that not all regions have a 3-letter ISO code. +// In such cases this method returns "ZZZ". +func (r Region) ISO3() string { + if r < isoRegionOffset { + return "ZZZ" + } + r -= isoRegionOffset + reg := regionISO.Elem(int(r)) + switch reg[2] { + case 0: + return altRegionISO3[reg[3]:][:3] + case ' ': + return "ZZZ" + } + return reg[0:1] + reg[2:4] +} + +// M49 returns the UN M.49 encoding of r, or 0 if this encoding +// is not defined for r. +func (r Region) M49() int { + return int(m49[r]) +} + +// IsPrivateUse reports whether r has the ISO 3166 User-assigned status. This +// may include private-use tags that are assigned by CLDR and used in this +// implementation. So IsPrivateUse and IsCountry can be simultaneously true. +func (r Region) IsPrivateUse() bool { + return r.typ()&iso3166UserAssigned != 0 +} + +type Script uint16 + +// getScriptID returns the script id for string s. It assumes that s +// is of the format [A-Z][a-z]{3}. +func getScriptID(idx tag.Index, s []byte) (Script, error) { + i, err := findIndex(idx, s, "Zzzz") + return Script(i), err +} + +// String returns the script code in title case. +// It returns "Zzzz" for an unspecified script. +func (s Script) String() string { + if s == 0 { + return "Zzzz" + } + return script.Elem(int(s)) +} + +// IsPrivateUse reports whether this script code is reserved for private use. +func (s Script) IsPrivateUse() bool { + return _Qaaa <= s && s <= _Qabx +} + +const ( + maxAltTaglen = len("en-US-POSIX") + maxLen = maxAltTaglen +) + +var ( + // grandfatheredMap holds a mapping from legacy and grandfathered tags to + // their base language or index to more elaborate tag. + grandfatheredMap = map[[maxLen]byte]int16{ + [maxLen]byte{'a', 'r', 't', '-', 'l', 'o', 'j', 'b', 'a', 'n'}: _jbo, // art-lojban + [maxLen]byte{'i', '-', 'a', 'm', 'i'}: _ami, // i-ami + [maxLen]byte{'i', '-', 'b', 'n', 'n'}: _bnn, // i-bnn + [maxLen]byte{'i', '-', 'h', 'a', 'k'}: _hak, // i-hak + [maxLen]byte{'i', '-', 'k', 'l', 'i', 'n', 'g', 'o', 'n'}: _tlh, // i-klingon + [maxLen]byte{'i', '-', 'l', 'u', 'x'}: _lb, // i-lux + [maxLen]byte{'i', '-', 'n', 'a', 'v', 'a', 'j', 'o'}: _nv, // i-navajo + [maxLen]byte{'i', '-', 'p', 'w', 'n'}: _pwn, // i-pwn + [maxLen]byte{'i', '-', 't', 'a', 'o'}: _tao, // i-tao + [maxLen]byte{'i', '-', 't', 'a', 'y'}: _tay, // i-tay + [maxLen]byte{'i', '-', 't', 's', 'u'}: _tsu, // i-tsu + [maxLen]byte{'n', 'o', '-', 'b', 'o', 'k'}: _nb, // no-bok + [maxLen]byte{'n', 'o', '-', 'n', 'y', 'n'}: _nn, // no-nyn + [maxLen]byte{'s', 'g', 'n', '-', 'b', 'e', '-', 'f', 'r'}: _sfb, // sgn-BE-FR + [maxLen]byte{'s', 'g', 'n', '-', 'b', 'e', '-', 'n', 'l'}: _vgt, // sgn-BE-NL + [maxLen]byte{'s', 'g', 'n', '-', 'c', 'h', '-', 'd', 'e'}: _sgg, // sgn-CH-DE + [maxLen]byte{'z', 'h', '-', 'g', 'u', 'o', 'y', 'u'}: _cmn, // zh-guoyu + [maxLen]byte{'z', 'h', '-', 'h', 'a', 'k', 'k', 'a'}: _hak, // zh-hakka + [maxLen]byte{'z', 'h', '-', 'm', 'i', 'n', '-', 'n', 'a', 'n'}: _nan, // zh-min-nan + [maxLen]byte{'z', 'h', '-', 'x', 'i', 'a', 'n', 'g'}: _hsn, // zh-xiang + + // Grandfathered tags with no modern replacement will be converted as + // follows: + [maxLen]byte{'c', 'e', 'l', '-', 'g', 'a', 'u', 'l', 'i', 's', 'h'}: -1, // cel-gaulish + [maxLen]byte{'e', 'n', '-', 'g', 'b', '-', 'o', 'e', 'd'}: -2, // en-GB-oed + [maxLen]byte{'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}: -3, // i-default + [maxLen]byte{'i', '-', 'e', 'n', 'o', 'c', 'h', 'i', 'a', 'n'}: -4, // i-enochian + [maxLen]byte{'i', '-', 'm', 'i', 'n', 'g', 'o'}: -5, // i-mingo + [maxLen]byte{'z', 'h', '-', 'm', 'i', 'n'}: -6, // zh-min + + // CLDR-specific tag. + [maxLen]byte{'r', 'o', 'o', 't'}: 0, // root + [maxLen]byte{'e', 'n', '-', 'u', 's', '-', 'p', 'o', 's', 'i', 'x'}: -7, // en_US_POSIX" + } + + altTagIndex = [...]uint8{0, 17, 31, 45, 61, 74, 86, 102} + + altTags = "xtg-x-cel-gaulishen-GB-oxendicten-x-i-defaultund-x-i-enochiansee-x-i-mingonan-x-zh-minen-US-u-va-posix" +) + +func grandfathered(s [maxAltTaglen]byte) (t Tag, ok bool) { + if v, ok := grandfatheredMap[s]; ok { + if v < 0 { + return Make(altTags[altTagIndex[-v-1]:altTagIndex[-v]]), true + } + t.LangID = Language(v) + return t, true + } + return t, false +} diff --git a/vendor/golang.org/x/text/internal/language/match.go b/vendor/golang.org/x/text/internal/language/match.go new file mode 100644 index 000000000..75a2dbca7 --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/match.go @@ -0,0 +1,226 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import "errors" + +type scriptRegionFlags uint8 + +const ( + isList = 1 << iota + scriptInFrom + regionInFrom +) + +func (t *Tag) setUndefinedLang(id Language) { + if t.LangID == 0 { + t.LangID = id + } +} + +func (t *Tag) setUndefinedScript(id Script) { + if t.ScriptID == 0 { + t.ScriptID = id + } +} + +func (t *Tag) setUndefinedRegion(id Region) { + if t.RegionID == 0 || t.RegionID.Contains(id) { + t.RegionID = id + } +} + +// ErrMissingLikelyTagsData indicates no information was available +// to compute likely values of missing tags. +var ErrMissingLikelyTagsData = errors.New("missing likely tags data") + +// addLikelySubtags sets subtags to their most likely value, given the locale. +// In most cases this means setting fields for unknown values, but in some +// cases it may alter a value. It returns an ErrMissingLikelyTagsData error +// if the given locale cannot be expanded. +func (t Tag) addLikelySubtags() (Tag, error) { + id, err := addTags(t) + if err != nil { + return t, err + } else if id.equalTags(t) { + return t, nil + } + id.RemakeString() + return id, nil +} + +// specializeRegion attempts to specialize a group region. +func specializeRegion(t *Tag) bool { + if i := regionInclusion[t.RegionID]; i < nRegionGroups { + x := likelyRegionGroup[i] + if Language(x.lang) == t.LangID && Script(x.script) == t.ScriptID { + t.RegionID = Region(x.region) + } + return true + } + return false +} + +// Maximize returns a new tag with missing tags filled in. +func (t Tag) Maximize() (Tag, error) { + return addTags(t) +} + +func addTags(t Tag) (Tag, error) { + // We leave private use identifiers alone. + if t.IsPrivateUse() { + return t, nil + } + if t.ScriptID != 0 && t.RegionID != 0 { + if t.LangID != 0 { + // already fully specified + specializeRegion(&t) + return t, nil + } + // Search matches for und-script-region. Note that for these cases + // region will never be a group so there is no need to check for this. + list := likelyRegion[t.RegionID : t.RegionID+1] + if x := list[0]; x.flags&isList != 0 { + list = likelyRegionList[x.lang : x.lang+uint16(x.script)] + } + for _, x := range list { + // Deviating from the spec. See match_test.go for details. + if Script(x.script) == t.ScriptID { + t.setUndefinedLang(Language(x.lang)) + return t, nil + } + } + } + if t.LangID != 0 { + // Search matches for lang-script and lang-region, where lang != und. + if t.LangID < langNoIndexOffset { + x := likelyLang[t.LangID] + if x.flags&isList != 0 { + list := likelyLangList[x.region : x.region+uint16(x.script)] + if t.ScriptID != 0 { + for _, x := range list { + if Script(x.script) == t.ScriptID && x.flags&scriptInFrom != 0 { + t.setUndefinedRegion(Region(x.region)) + return t, nil + } + } + } else if t.RegionID != 0 { + count := 0 + goodScript := true + tt := t + for _, x := range list { + // We visit all entries for which the script was not + // defined, including the ones where the region was not + // defined. This allows for proper disambiguation within + // regions. + if x.flags&scriptInFrom == 0 && t.RegionID.Contains(Region(x.region)) { + tt.RegionID = Region(x.region) + tt.setUndefinedScript(Script(x.script)) + goodScript = goodScript && tt.ScriptID == Script(x.script) + count++ + } + } + if count == 1 { + return tt, nil + } + // Even if we fail to find a unique Region, we might have + // an unambiguous script. + if goodScript { + t.ScriptID = tt.ScriptID + } + } + } + } + } else { + // Search matches for und-script. + if t.ScriptID != 0 { + x := likelyScript[t.ScriptID] + if x.region != 0 { + t.setUndefinedRegion(Region(x.region)) + t.setUndefinedLang(Language(x.lang)) + return t, nil + } + } + // Search matches for und-region. If und-script-region exists, it would + // have been found earlier. + if t.RegionID != 0 { + if i := regionInclusion[t.RegionID]; i < nRegionGroups { + x := likelyRegionGroup[i] + if x.region != 0 { + t.setUndefinedLang(Language(x.lang)) + t.setUndefinedScript(Script(x.script)) + t.RegionID = Region(x.region) + } + } else { + x := likelyRegion[t.RegionID] + if x.flags&isList != 0 { + x = likelyRegionList[x.lang] + } + if x.script != 0 && x.flags != scriptInFrom { + t.setUndefinedLang(Language(x.lang)) + t.setUndefinedScript(Script(x.script)) + return t, nil + } + } + } + } + + // Search matches for lang. + if t.LangID < langNoIndexOffset { + x := likelyLang[t.LangID] + if x.flags&isList != 0 { + x = likelyLangList[x.region] + } + if x.region != 0 { + t.setUndefinedScript(Script(x.script)) + t.setUndefinedRegion(Region(x.region)) + } + specializeRegion(&t) + if t.LangID == 0 { + t.LangID = _en // default language + } + return t, nil + } + return t, ErrMissingLikelyTagsData +} + +func (t *Tag) setTagsFrom(id Tag) { + t.LangID = id.LangID + t.ScriptID = id.ScriptID + t.RegionID = id.RegionID +} + +// minimize removes the region or script subtags from t such that +// t.addLikelySubtags() == t.minimize().addLikelySubtags(). +func (t Tag) minimize() (Tag, error) { + t, err := minimizeTags(t) + if err != nil { + return t, err + } + t.RemakeString() + return t, nil +} + +// minimizeTags mimics the behavior of the ICU 51 C implementation. +func minimizeTags(t Tag) (Tag, error) { + if t.equalTags(Und) { + return t, nil + } + max, err := addTags(t) + if err != nil { + return t, err + } + for _, id := range [...]Tag{ + {LangID: t.LangID}, + {LangID: t.LangID, RegionID: t.RegionID}, + {LangID: t.LangID, ScriptID: t.ScriptID}, + } { + if x, err := addTags(id); err == nil && max.equalTags(x) { + t.setTagsFrom(id) + break + } + } + return t, nil +} diff --git a/vendor/golang.org/x/text/internal/language/parse.go b/vendor/golang.org/x/text/internal/language/parse.go new file mode 100644 index 000000000..aad1e0acf --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/parse.go @@ -0,0 +1,608 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "bytes" + "errors" + "fmt" + "sort" + + "golang.org/x/text/internal/tag" +) + +// isAlpha returns true if the byte is not a digit. +// b must be an ASCII letter or digit. +func isAlpha(b byte) bool { + return b > '9' +} + +// isAlphaNum returns true if the string contains only ASCII letters or digits. +func isAlphaNum(s []byte) bool { + for _, c := range s { + if !('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9') { + return false + } + } + return true +} + +// ErrSyntax is returned by any of the parsing functions when the +// input is not well-formed, according to BCP 47. +// TODO: return the position at which the syntax error occurred? +var ErrSyntax = errors.New("language: tag is not well-formed") + +// ErrDuplicateKey is returned when a tag contains the same key twice with +// different values in the -u section. +var ErrDuplicateKey = errors.New("language: different values for same key in -u extension") + +// ValueError is returned by any of the parsing functions when the +// input is well-formed but the respective subtag is not recognized +// as a valid value. +type ValueError struct { + v [8]byte +} + +// NewValueError creates a new ValueError. +func NewValueError(tag []byte) ValueError { + var e ValueError + copy(e.v[:], tag) + return e +} + +func (e ValueError) tag() []byte { + n := bytes.IndexByte(e.v[:], 0) + if n == -1 { + n = 8 + } + return e.v[:n] +} + +// Error implements the error interface. +func (e ValueError) Error() string { + return fmt.Sprintf("language: subtag %q is well-formed but unknown", e.tag()) +} + +// Subtag returns the subtag for which the error occurred. +func (e ValueError) Subtag() string { + return string(e.tag()) +} + +// scanner is used to scan BCP 47 tokens, which are separated by _ or -. +type scanner struct { + b []byte + bytes [max99thPercentileSize]byte + token []byte + start int // start position of the current token + end int // end position of the current token + next int // next point for scan + err error + done bool +} + +func makeScannerString(s string) scanner { + scan := scanner{} + if len(s) <= len(scan.bytes) { + scan.b = scan.bytes[:copy(scan.bytes[:], s)] + } else { + scan.b = []byte(s) + } + scan.init() + return scan +} + +// makeScanner returns a scanner using b as the input buffer. +// b is not copied and may be modified by the scanner routines. +func makeScanner(b []byte) scanner { + scan := scanner{b: b} + scan.init() + return scan +} + +func (s *scanner) init() { + for i, c := range s.b { + if c == '_' { + s.b[i] = '-' + } + } + s.scan() +} + +// restToLower converts the string between start and end to lower case. +func (s *scanner) toLower(start, end int) { + for i := start; i < end; i++ { + c := s.b[i] + if 'A' <= c && c <= 'Z' { + s.b[i] += 'a' - 'A' + } + } +} + +func (s *scanner) setError(e error) { + if s.err == nil || (e == ErrSyntax && s.err != ErrSyntax) { + s.err = e + } +} + +// resizeRange shrinks or grows the array at position oldStart such that +// a new string of size newSize can fit between oldStart and oldEnd. +// Sets the scan point to after the resized range. +func (s *scanner) resizeRange(oldStart, oldEnd, newSize int) { + s.start = oldStart + if end := oldStart + newSize; end != oldEnd { + diff := end - oldEnd + var b []byte + if n := len(s.b) + diff; n > cap(s.b) { + b = make([]byte, n) + copy(b, s.b[:oldStart]) + } else { + b = s.b[:n] + } + copy(b[end:], s.b[oldEnd:]) + s.b = b + s.next = end + (s.next - s.end) + s.end = end + } +} + +// replace replaces the current token with repl. +func (s *scanner) replace(repl string) { + s.resizeRange(s.start, s.end, len(repl)) + copy(s.b[s.start:], repl) +} + +// gobble removes the current token from the input. +// Caller must call scan after calling gobble. +func (s *scanner) gobble(e error) { + s.setError(e) + if s.start == 0 { + s.b = s.b[:+copy(s.b, s.b[s.next:])] + s.end = 0 + } else { + s.b = s.b[:s.start-1+copy(s.b[s.start-1:], s.b[s.end:])] + s.end = s.start - 1 + } + s.next = s.start +} + +// deleteRange removes the given range from s.b before the current token. +func (s *scanner) deleteRange(start, end int) { + s.b = s.b[:start+copy(s.b[start:], s.b[end:])] + diff := end - start + s.next -= diff + s.start -= diff + s.end -= diff +} + +// scan parses the next token of a BCP 47 string. Tokens that are larger +// than 8 characters or include non-alphanumeric characters result in an error +// and are gobbled and removed from the output. +// It returns the end position of the last token consumed. +func (s *scanner) scan() (end int) { + end = s.end + s.token = nil + for s.start = s.next; s.next < len(s.b); { + i := bytes.IndexByte(s.b[s.next:], '-') + if i == -1 { + s.end = len(s.b) + s.next = len(s.b) + i = s.end - s.start + } else { + s.end = s.next + i + s.next = s.end + 1 + } + token := s.b[s.start:s.end] + if i < 1 || i > 8 || !isAlphaNum(token) { + s.gobble(ErrSyntax) + continue + } + s.token = token + return end + } + if n := len(s.b); n > 0 && s.b[n-1] == '-' { + s.setError(ErrSyntax) + s.b = s.b[:len(s.b)-1] + } + s.done = true + return end +} + +// acceptMinSize parses multiple tokens of the given size or greater. +// It returns the end position of the last token consumed. +func (s *scanner) acceptMinSize(min int) (end int) { + end = s.end + s.scan() + for ; len(s.token) >= min; s.scan() { + end = s.end + } + return end +} + +// Parse parses the given BCP 47 string and returns a valid Tag. If parsing +// failed it returns an error and any part of the tag that could be parsed. +// If parsing succeeded but an unknown value was found, it returns +// ValueError. The Tag returned in this case is just stripped of the unknown +// value. All other values are preserved. It accepts tags in the BCP 47 format +// and extensions to this standard defined in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +func Parse(s string) (t Tag, err error) { + // TODO: consider supporting old-style locale key-value pairs. + if s == "" { + return Und, ErrSyntax + } + defer func() { + if recover() != nil { + t = Und + err = ErrSyntax + return + } + }() + if len(s) <= maxAltTaglen { + b := [maxAltTaglen]byte{} + for i, c := range s { + // Generating invalid UTF-8 is okay as it won't match. + if 'A' <= c && c <= 'Z' { + c += 'a' - 'A' + } else if c == '_' { + c = '-' + } + b[i] = byte(c) + } + if t, ok := grandfathered(b); ok { + return t, nil + } + } + scan := makeScannerString(s) + return parse(&scan, s) +} + +func parse(scan *scanner, s string) (t Tag, err error) { + t = Und + var end int + if n := len(scan.token); n <= 1 { + scan.toLower(0, len(scan.b)) + if n == 0 || scan.token[0] != 'x' { + return t, ErrSyntax + } + end = parseExtensions(scan) + } else if n >= 4 { + return Und, ErrSyntax + } else { // the usual case + t, end = parseTag(scan, true) + if n := len(scan.token); n == 1 { + t.pExt = uint16(end) + end = parseExtensions(scan) + } else if end < len(scan.b) { + scan.setError(ErrSyntax) + scan.b = scan.b[:end] + } + } + if int(t.pVariant) < len(scan.b) { + if end < len(s) { + s = s[:end] + } + if len(s) > 0 && tag.Compare(s, scan.b) == 0 { + t.str = s + } else { + t.str = string(scan.b) + } + } else { + t.pVariant, t.pExt = 0, 0 + } + return t, scan.err +} + +// parseTag parses language, script, region and variants. +// It returns a Tag and the end position in the input that was parsed. +// If doNorm is true, then <lang>-<extlang> will be normalized to <extlang>. +func parseTag(scan *scanner, doNorm bool) (t Tag, end int) { + var e error + // TODO: set an error if an unknown lang, script or region is encountered. + t.LangID, e = getLangID(scan.token) + scan.setError(e) + scan.replace(t.LangID.String()) + langStart := scan.start + end = scan.scan() + for len(scan.token) == 3 && isAlpha(scan.token[0]) { + // From http://tools.ietf.org/html/bcp47, <lang>-<extlang> tags are equivalent + // to a tag of the form <extlang>. + if doNorm { + lang, e := getLangID(scan.token) + if lang != 0 { + t.LangID = lang + langStr := lang.String() + copy(scan.b[langStart:], langStr) + scan.b[langStart+len(langStr)] = '-' + scan.start = langStart + len(langStr) + 1 + } + scan.gobble(e) + } + end = scan.scan() + } + if len(scan.token) == 4 && isAlpha(scan.token[0]) { + t.ScriptID, e = getScriptID(script, scan.token) + if t.ScriptID == 0 { + scan.gobble(e) + } + end = scan.scan() + } + if n := len(scan.token); n >= 2 && n <= 3 { + t.RegionID, e = getRegionID(scan.token) + if t.RegionID == 0 { + scan.gobble(e) + } else { + scan.replace(t.RegionID.String()) + } + end = scan.scan() + } + scan.toLower(scan.start, len(scan.b)) + t.pVariant = byte(end) + end = parseVariants(scan, end, t) + t.pExt = uint16(end) + return t, end +} + +var separator = []byte{'-'} + +// parseVariants scans tokens as long as each token is a valid variant string. +// Duplicate variants are removed. +func parseVariants(scan *scanner, end int, t Tag) int { + start := scan.start + varIDBuf := [4]uint8{} + variantBuf := [4][]byte{} + varID := varIDBuf[:0] + variant := variantBuf[:0] + last := -1 + needSort := false + for ; len(scan.token) >= 4; scan.scan() { + // TODO: measure the impact of needing this conversion and redesign + // the data structure if there is an issue. + v, ok := variantIndex[string(scan.token)] + if !ok { + // unknown variant + // TODO: allow user-defined variants? + scan.gobble(NewValueError(scan.token)) + continue + } + varID = append(varID, v) + variant = append(variant, scan.token) + if !needSort { + if last < int(v) { + last = int(v) + } else { + needSort = true + // There is no legal combinations of more than 7 variants + // (and this is by no means a useful sequence). + const maxVariants = 8 + if len(varID) > maxVariants { + break + } + } + } + end = scan.end + } + if needSort { + sort.Sort(variantsSort{varID, variant}) + k, l := 0, -1 + for i, v := range varID { + w := int(v) + if l == w { + // Remove duplicates. + continue + } + varID[k] = varID[i] + variant[k] = variant[i] + k++ + l = w + } + if str := bytes.Join(variant[:k], separator); len(str) == 0 { + end = start - 1 + } else { + scan.resizeRange(start, end, len(str)) + copy(scan.b[scan.start:], str) + end = scan.end + } + } + return end +} + +type variantsSort struct { + i []uint8 + v [][]byte +} + +func (s variantsSort) Len() int { + return len(s.i) +} + +func (s variantsSort) Swap(i, j int) { + s.i[i], s.i[j] = s.i[j], s.i[i] + s.v[i], s.v[j] = s.v[j], s.v[i] +} + +func (s variantsSort) Less(i, j int) bool { + return s.i[i] < s.i[j] +} + +type bytesSort struct { + b [][]byte + n int // first n bytes to compare +} + +func (b bytesSort) Len() int { + return len(b.b) +} + +func (b bytesSort) Swap(i, j int) { + b.b[i], b.b[j] = b.b[j], b.b[i] +} + +func (b bytesSort) Less(i, j int) bool { + for k := 0; k < b.n; k++ { + if b.b[i][k] == b.b[j][k] { + continue + } + return b.b[i][k] < b.b[j][k] + } + return false +} + +// parseExtensions parses and normalizes the extensions in the buffer. +// It returns the last position of scan.b that is part of any extension. +// It also trims scan.b to remove excess parts accordingly. +func parseExtensions(scan *scanner) int { + start := scan.start + exts := [][]byte{} + private := []byte{} + end := scan.end + for len(scan.token) == 1 { + extStart := scan.start + ext := scan.token[0] + end = parseExtension(scan) + extension := scan.b[extStart:end] + if len(extension) < 3 || (ext != 'x' && len(extension) < 4) { + scan.setError(ErrSyntax) + end = extStart + continue + } else if start == extStart && (ext == 'x' || scan.start == len(scan.b)) { + scan.b = scan.b[:end] + return end + } else if ext == 'x' { + private = extension + break + } + exts = append(exts, extension) + } + sort.Sort(bytesSort{exts, 1}) + if len(private) > 0 { + exts = append(exts, private) + } + scan.b = scan.b[:start] + if len(exts) > 0 { + scan.b = append(scan.b, bytes.Join(exts, separator)...) + } else if start > 0 { + // Strip trailing '-'. + scan.b = scan.b[:start-1] + } + return end +} + +// parseExtension parses a single extension and returns the position of +// the extension end. +func parseExtension(scan *scanner) int { + start, end := scan.start, scan.end + switch scan.token[0] { + case 'u': // https://www.ietf.org/rfc/rfc6067.txt + attrStart := end + scan.scan() + for last := []byte{}; len(scan.token) > 2; scan.scan() { + if bytes.Compare(scan.token, last) != -1 { + // Attributes are unsorted. Start over from scratch. + p := attrStart + 1 + scan.next = p + attrs := [][]byte{} + for scan.scan(); len(scan.token) > 2; scan.scan() { + attrs = append(attrs, scan.token) + end = scan.end + } + sort.Sort(bytesSort{attrs, 3}) + copy(scan.b[p:], bytes.Join(attrs, separator)) + break + } + last = scan.token + end = scan.end + } + // Scan key-type sequences. A key is of length 2 and may be followed + // by 0 or more "type" subtags from 3 to the maximum of 8 letters. + var last, key []byte + for attrEnd := end; len(scan.token) == 2; last = key { + key = scan.token + end = scan.end + for scan.scan(); end < scan.end && len(scan.token) > 2; scan.scan() { + end = scan.end + } + // TODO: check key value validity + if bytes.Compare(key, last) != 1 || scan.err != nil { + // We have an invalid key or the keys are not sorted. + // Start scanning keys from scratch and reorder. + p := attrEnd + 1 + scan.next = p + keys := [][]byte{} + for scan.scan(); len(scan.token) == 2; { + keyStart := scan.start + end = scan.end + for scan.scan(); end < scan.end && len(scan.token) > 2; scan.scan() { + end = scan.end + } + keys = append(keys, scan.b[keyStart:end]) + } + sort.Stable(bytesSort{keys, 2}) + if n := len(keys); n > 0 { + k := 0 + for i := 1; i < n; i++ { + if !bytes.Equal(keys[k][:2], keys[i][:2]) { + k++ + keys[k] = keys[i] + } else if !bytes.Equal(keys[k], keys[i]) { + scan.setError(ErrDuplicateKey) + } + } + keys = keys[:k+1] + } + reordered := bytes.Join(keys, separator) + if e := p + len(reordered); e < end { + scan.deleteRange(e, end) + end = e + } + copy(scan.b[p:], reordered) + break + } + } + case 't': // https://www.ietf.org/rfc/rfc6497.txt + scan.scan() + if n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) { + _, end = parseTag(scan, false) + scan.toLower(start, end) + } + for len(scan.token) == 2 && !isAlpha(scan.token[1]) { + end = scan.acceptMinSize(3) + } + case 'x': + end = scan.acceptMinSize(1) + default: + end = scan.acceptMinSize(2) + } + return end +} + +// getExtension returns the name, body and end position of the extension. +func getExtension(s string, p int) (end int, ext string) { + if s[p] == '-' { + p++ + } + if s[p] == 'x' { + return len(s), s[p:] + } + end = nextExtension(s, p) + return end, s[p:end] +} + +// nextExtension finds the next extension within the string, searching +// for the -<char>- pattern from position p. +// In the fast majority of cases, language tags will have at most +// one extension and extensions tend to be small. +func nextExtension(s string, p int) int { + for n := len(s) - 3; p < n; { + if s[p] == '-' { + if s[p+2] == '-' { + return p + } + p += 3 + } else { + p++ + } + } + return len(s) +} diff --git a/vendor/golang.org/x/text/internal/language/tables.go b/vendor/golang.org/x/text/internal/language/tables.go new file mode 100644 index 000000000..14167e74e --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/tables.go @@ -0,0 +1,3494 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package language + +import "golang.org/x/text/internal/tag" + +// CLDRVersion is the CLDR version from which the tables in this package are derived. +const CLDRVersion = "32" + +const NumLanguages = 8798 + +const NumScripts = 261 + +const NumRegions = 358 + +type FromTo struct { + From uint16 + To uint16 +} + +const nonCanonicalUnd = 1201 +const ( + _af = 22 + _am = 39 + _ar = 58 + _az = 88 + _bg = 126 + _bn = 165 + _ca = 215 + _cs = 250 + _da = 257 + _de = 269 + _el = 310 + _en = 313 + _es = 318 + _et = 320 + _fa = 328 + _fi = 337 + _fil = 339 + _fr = 350 + _gu = 420 + _he = 444 + _hi = 446 + _hr = 465 + _hu = 469 + _hy = 471 + _id = 481 + _is = 504 + _it = 505 + _ja = 512 + _ka = 528 + _kk = 578 + _km = 586 + _kn = 593 + _ko = 596 + _ky = 650 + _lo = 696 + _lt = 704 + _lv = 711 + _mk = 767 + _ml = 772 + _mn = 779 + _mo = 784 + _mr = 795 + _ms = 799 + _mul = 806 + _my = 817 + _nb = 839 + _ne = 849 + _nl = 871 + _no = 879 + _pa = 925 + _pl = 947 + _pt = 960 + _ro = 988 + _ru = 994 + _sh = 1031 + _si = 1036 + _sk = 1042 + _sl = 1046 + _sq = 1073 + _sr = 1074 + _sv = 1092 + _sw = 1093 + _ta = 1104 + _te = 1121 + _th = 1131 + _tl = 1146 + _tn = 1152 + _tr = 1162 + _uk = 1198 + _ur = 1204 + _uz = 1212 + _vi = 1219 + _zh = 1321 + _zu = 1327 + _jbo = 515 + _ami = 1650 + _bnn = 2357 + _hak = 438 + _tlh = 14467 + _lb = 661 + _nv = 899 + _pwn = 12055 + _tao = 14188 + _tay = 14198 + _tsu = 14662 + _nn = 874 + _sfb = 13629 + _vgt = 15701 + _sgg = 13660 + _cmn = 3007 + _nan = 835 + _hsn = 467 +) + +const langPrivateStart = 0x2f72 + +const langPrivateEnd = 0x3179 + +// lang holds an alphabetically sorted list of ISO-639 language identifiers. +// All entries are 4 bytes. The index of the identifier (divided by 4) is the language tag. +// For 2-byte language identifiers, the two successive bytes have the following meaning: +// - if the first letter of the 2- and 3-letter ISO codes are the same: +// the second and third letter of the 3-letter ISO code. +// - otherwise: a 0 and a by 2 bits right-shifted index into altLangISO3. +// +// For 3-byte language identifiers the 4th byte is 0. +const lang tag.Index = "" + // Size: 5324 bytes + "---\x00aaaraai\x00aak\x00aau\x00abbkabi\x00abq\x00abr\x00abt\x00aby\x00a" + + "cd\x00ace\x00ach\x00ada\x00ade\x00adj\x00ady\x00adz\x00aeveaeb\x00aey" + + "\x00affragc\x00agd\x00agg\x00agm\x00ago\x00agq\x00aha\x00ahl\x00aho\x00a" + + "jg\x00akkaakk\x00ala\x00ali\x00aln\x00alt\x00ammhamm\x00amn\x00amo\x00am" + + "p\x00anrganc\x00ank\x00ann\x00any\x00aoj\x00aom\x00aoz\x00apc\x00apd\x00" + + "ape\x00apr\x00aps\x00apz\x00arraarc\x00arh\x00arn\x00aro\x00arq\x00ars" + + "\x00ary\x00arz\x00assmasa\x00ase\x00asg\x00aso\x00ast\x00ata\x00atg\x00a" + + "tj\x00auy\x00avvaavl\x00avn\x00avt\x00avu\x00awa\x00awb\x00awo\x00awx" + + "\x00ayymayb\x00azzebaakbal\x00ban\x00bap\x00bar\x00bas\x00bav\x00bax\x00" + + "bba\x00bbb\x00bbc\x00bbd\x00bbj\x00bbp\x00bbr\x00bcf\x00bch\x00bci\x00bc" + + "m\x00bcn\x00bco\x00bcq\x00bcu\x00bdd\x00beelbef\x00beh\x00bej\x00bem\x00" + + "bet\x00bew\x00bex\x00bez\x00bfd\x00bfq\x00bft\x00bfy\x00bgulbgc\x00bgn" + + "\x00bgx\x00bhihbhb\x00bhg\x00bhi\x00bhk\x00bhl\x00bho\x00bhy\x00biisbib" + + "\x00big\x00bik\x00bim\x00bin\x00bio\x00biq\x00bjh\x00bji\x00bjj\x00bjn" + + "\x00bjo\x00bjr\x00bjt\x00bjz\x00bkc\x00bkm\x00bkq\x00bku\x00bkv\x00blt" + + "\x00bmambmh\x00bmk\x00bmq\x00bmu\x00bnenbng\x00bnm\x00bnp\x00boodboj\x00" + + "bom\x00bon\x00bpy\x00bqc\x00bqi\x00bqp\x00bqv\x00brrebra\x00brh\x00brx" + + "\x00brz\x00bsosbsj\x00bsq\x00bss\x00bst\x00bto\x00btt\x00btv\x00bua\x00b" + + "uc\x00bud\x00bug\x00buk\x00bum\x00buo\x00bus\x00buu\x00bvb\x00bwd\x00bwr" + + "\x00bxh\x00bye\x00byn\x00byr\x00bys\x00byv\x00byx\x00bza\x00bze\x00bzf" + + "\x00bzh\x00bzw\x00caatcan\x00cbj\x00cch\x00ccp\x00ceheceb\x00cfa\x00cgg" + + "\x00chhachk\x00chm\x00cho\x00chp\x00chr\x00cja\x00cjm\x00cjv\x00ckb\x00c" + + "kl\x00cko\x00cky\x00cla\x00cme\x00cmg\x00cooscop\x00cps\x00crrecrh\x00cr" + + "j\x00crk\x00crl\x00crm\x00crs\x00csescsb\x00csw\x00ctd\x00cuhucvhvcyymda" + + "andad\x00daf\x00dag\x00dah\x00dak\x00dar\x00dav\x00dbd\x00dbq\x00dcc\x00" + + "ddn\x00deeuded\x00den\x00dga\x00dgh\x00dgi\x00dgl\x00dgr\x00dgz\x00dia" + + "\x00dje\x00dnj\x00dob\x00doi\x00dop\x00dow\x00dri\x00drs\x00dsb\x00dtm" + + "\x00dtp\x00dts\x00dty\x00dua\x00duc\x00dud\x00dug\x00dvivdva\x00dww\x00d" + + "yo\x00dyu\x00dzzodzg\x00ebu\x00eeweefi\x00egl\x00egy\x00eka\x00eky\x00el" + + "llema\x00emi\x00enngenn\x00enq\x00eopoeri\x00es\x00\x05esu\x00etstetr" + + "\x00ett\x00etu\x00etx\x00euusewo\x00ext\x00faasfaa\x00fab\x00fag\x00fai" + + "\x00fan\x00ffulffi\x00ffm\x00fiinfia\x00fil\x00fit\x00fjijflr\x00fmp\x00" + + "foaofod\x00fon\x00for\x00fpe\x00fqs\x00frrafrc\x00frp\x00frr\x00frs\x00f" + + "ub\x00fud\x00fue\x00fuf\x00fuh\x00fuq\x00fur\x00fuv\x00fuy\x00fvr\x00fyr" + + "ygalegaa\x00gaf\x00gag\x00gah\x00gaj\x00gam\x00gan\x00gaw\x00gay\x00gba" + + "\x00gbf\x00gbm\x00gby\x00gbz\x00gcr\x00gdlagde\x00gdn\x00gdr\x00geb\x00g" + + "ej\x00gel\x00gez\x00gfk\x00ggn\x00ghs\x00gil\x00gim\x00gjk\x00gjn\x00gju" + + "\x00gkn\x00gkp\x00gllgglk\x00gmm\x00gmv\x00gnrngnd\x00gng\x00god\x00gof" + + "\x00goi\x00gom\x00gon\x00gor\x00gos\x00got\x00grb\x00grc\x00grt\x00grw" + + "\x00gsw\x00guujgub\x00guc\x00gud\x00gur\x00guw\x00gux\x00guz\x00gvlvgvf" + + "\x00gvr\x00gvs\x00gwc\x00gwi\x00gwt\x00gyi\x00haauhag\x00hak\x00ham\x00h" + + "aw\x00haz\x00hbb\x00hdy\x00heebhhy\x00hiinhia\x00hif\x00hig\x00hih\x00hi" + + "l\x00hla\x00hlu\x00hmd\x00hmt\x00hnd\x00hne\x00hnj\x00hnn\x00hno\x00homo" + + "hoc\x00hoj\x00hot\x00hrrvhsb\x00hsn\x00htathuunhui\x00hyyehzerianaian" + + "\x00iar\x00iba\x00ibb\x00iby\x00ica\x00ich\x00idndidd\x00idi\x00idu\x00i" + + "eleife\x00igboigb\x00ige\x00iiiiijj\x00ikpkikk\x00ikt\x00ikw\x00ikx\x00i" + + "lo\x00imo\x00inndinh\x00iodoiou\x00iri\x00isslittaiukuiw\x00\x03iwm\x00i" + + "ws\x00izh\x00izi\x00japnjab\x00jam\x00jbo\x00jbu\x00jen\x00jgk\x00jgo" + + "\x00ji\x00\x06jib\x00jmc\x00jml\x00jra\x00jut\x00jvavjwavkaatkaa\x00kab" + + "\x00kac\x00kad\x00kai\x00kaj\x00kam\x00kao\x00kbd\x00kbm\x00kbp\x00kbq" + + "\x00kbx\x00kby\x00kcg\x00kck\x00kcl\x00kct\x00kde\x00kdh\x00kdl\x00kdt" + + "\x00kea\x00ken\x00kez\x00kfo\x00kfr\x00kfy\x00kgonkge\x00kgf\x00kgp\x00k" + + "ha\x00khb\x00khn\x00khq\x00khs\x00kht\x00khw\x00khz\x00kiikkij\x00kiu" + + "\x00kiw\x00kjuakjd\x00kjg\x00kjs\x00kjy\x00kkazkkc\x00kkj\x00klalkln\x00" + + "klq\x00klt\x00klx\x00kmhmkmb\x00kmh\x00kmo\x00kms\x00kmu\x00kmw\x00knank" + + "nf\x00knp\x00koorkoi\x00kok\x00kol\x00kos\x00koz\x00kpe\x00kpf\x00kpo" + + "\x00kpr\x00kpx\x00kqb\x00kqf\x00kqs\x00kqy\x00kraukrc\x00kri\x00krj\x00k" + + "rl\x00krs\x00kru\x00ksasksb\x00ksd\x00ksf\x00ksh\x00ksj\x00ksr\x00ktb" + + "\x00ktm\x00kto\x00kuurkub\x00kud\x00kue\x00kuj\x00kum\x00kun\x00kup\x00k" + + "us\x00kvomkvg\x00kvr\x00kvx\x00kw\x00\x01kwj\x00kwo\x00kxa\x00kxc\x00kxm" + + "\x00kxp\x00kxw\x00kxz\x00kyirkye\x00kyx\x00kzr\x00laatlab\x00lad\x00lag" + + "\x00lah\x00laj\x00las\x00lbtzlbe\x00lbu\x00lbw\x00lcm\x00lcp\x00ldb\x00l" + + "ed\x00lee\x00lem\x00lep\x00leq\x00leu\x00lez\x00lguglgg\x00liimlia\x00li" + + "d\x00lif\x00lig\x00lih\x00lij\x00lis\x00ljp\x00lki\x00lkt\x00lle\x00lln" + + "\x00lmn\x00lmo\x00lmp\x00lninlns\x00lnu\x00loaoloj\x00lok\x00lol\x00lor" + + "\x00los\x00loz\x00lrc\x00ltitltg\x00luublua\x00luo\x00luy\x00luz\x00lvav" + + "lwl\x00lzh\x00lzz\x00mad\x00maf\x00mag\x00mai\x00mak\x00man\x00mas\x00ma" + + "w\x00maz\x00mbh\x00mbo\x00mbq\x00mbu\x00mbw\x00mci\x00mcp\x00mcq\x00mcr" + + "\x00mcu\x00mda\x00mde\x00mdf\x00mdh\x00mdj\x00mdr\x00mdx\x00med\x00mee" + + "\x00mek\x00men\x00mer\x00met\x00meu\x00mfa\x00mfe\x00mfn\x00mfo\x00mfq" + + "\x00mglgmgh\x00mgl\x00mgo\x00mgp\x00mgy\x00mhahmhi\x00mhl\x00mirimif\x00" + + "min\x00mis\x00miw\x00mkkdmki\x00mkl\x00mkp\x00mkw\x00mlalmle\x00mlp\x00m" + + "ls\x00mmo\x00mmu\x00mmx\x00mnonmna\x00mnf\x00mni\x00mnw\x00moolmoa\x00mo" + + "e\x00moh\x00mos\x00mox\x00mpp\x00mps\x00mpt\x00mpx\x00mql\x00mrarmrd\x00" + + "mrj\x00mro\x00mssamtltmtc\x00mtf\x00mti\x00mtr\x00mua\x00mul\x00mur\x00m" + + "us\x00mva\x00mvn\x00mvy\x00mwk\x00mwr\x00mwv\x00mxc\x00mxm\x00myyamyk" + + "\x00mym\x00myv\x00myw\x00myx\x00myz\x00mzk\x00mzm\x00mzn\x00mzp\x00mzw" + + "\x00mzz\x00naaunac\x00naf\x00nah\x00nak\x00nan\x00nap\x00naq\x00nas\x00n" + + "bobnca\x00nce\x00ncf\x00nch\x00nco\x00ncu\x00nddendc\x00nds\x00neepneb" + + "\x00new\x00nex\x00nfr\x00ngdonga\x00ngb\x00ngl\x00nhb\x00nhe\x00nhw\x00n" + + "if\x00nii\x00nij\x00nin\x00niu\x00niy\x00niz\x00njo\x00nkg\x00nko\x00nll" + + "dnmg\x00nmz\x00nnnonnf\x00nnh\x00nnk\x00nnm\x00noornod\x00noe\x00non\x00" + + "nop\x00nou\x00nqo\x00nrblnrb\x00nsk\x00nsn\x00nso\x00nss\x00ntm\x00ntr" + + "\x00nui\x00nup\x00nus\x00nuv\x00nux\x00nvavnwb\x00nxq\x00nxr\x00nyyanym" + + "\x00nyn\x00nzi\x00occiogc\x00ojjiokr\x00okv\x00omrmong\x00onn\x00ons\x00" + + "opm\x00orrioro\x00oru\x00osssosa\x00ota\x00otk\x00ozm\x00paanpag\x00pal" + + "\x00pam\x00pap\x00pau\x00pbi\x00pcd\x00pcm\x00pdc\x00pdt\x00ped\x00peo" + + "\x00pex\x00pfl\x00phl\x00phn\x00pilipil\x00pip\x00pka\x00pko\x00plolpla" + + "\x00pms\x00png\x00pnn\x00pnt\x00pon\x00ppo\x00pra\x00prd\x00prg\x00psusp" + + "ss\x00ptorptp\x00puu\x00pwa\x00quuequc\x00qug\x00rai\x00raj\x00rao\x00rc" + + "f\x00rej\x00rel\x00res\x00rgn\x00rhg\x00ria\x00rif\x00rjs\x00rkt\x00rmoh" + + "rmf\x00rmo\x00rmt\x00rmu\x00rnunrna\x00rng\x00roonrob\x00rof\x00roo\x00r" + + "ro\x00rtm\x00ruusrue\x00rug\x00rw\x00\x04rwk\x00rwo\x00ryu\x00saansaf" + + "\x00sah\x00saq\x00sas\x00sat\x00sav\x00saz\x00sba\x00sbe\x00sbp\x00scrds" + + "ck\x00scl\x00scn\x00sco\x00scs\x00sdndsdc\x00sdh\x00semesef\x00seh\x00se" + + "i\x00ses\x00sgagsga\x00sgs\x00sgw\x00sgz\x00sh\x00\x02shi\x00shk\x00shn" + + "\x00shu\x00siinsid\x00sig\x00sil\x00sim\x00sjr\x00sklkskc\x00skr\x00sks" + + "\x00sllvsld\x00sli\x00sll\x00sly\x00smmosma\x00smi\x00smj\x00smn\x00smp" + + "\x00smq\x00sms\x00snnasnc\x00snk\x00snp\x00snx\x00sny\x00soomsok\x00soq" + + "\x00sou\x00soy\x00spd\x00spl\x00sps\x00sqqisrrpsrb\x00srn\x00srr\x00srx" + + "\x00ssswssd\x00ssg\x00ssy\x00stotstk\x00stq\x00suunsua\x00sue\x00suk\x00" + + "sur\x00sus\x00svweswwaswb\x00swc\x00swg\x00swp\x00swv\x00sxn\x00sxw\x00s" + + "yl\x00syr\x00szl\x00taamtaj\x00tal\x00tan\x00taq\x00tbc\x00tbd\x00tbf" + + "\x00tbg\x00tbo\x00tbw\x00tbz\x00tci\x00tcy\x00tdd\x00tdg\x00tdh\x00teelt" + + "ed\x00tem\x00teo\x00tet\x00tfi\x00tggktgc\x00tgo\x00tgu\x00thhathl\x00th" + + "q\x00thr\x00tiirtif\x00tig\x00tik\x00tim\x00tio\x00tiv\x00tkuktkl\x00tkr" + + "\x00tkt\x00tlgltlf\x00tlx\x00tly\x00tmh\x00tmy\x00tnsntnh\x00toontof\x00" + + "tog\x00toq\x00tpi\x00tpm\x00tpz\x00tqo\x00trurtru\x00trv\x00trw\x00tssot" + + "sd\x00tsf\x00tsg\x00tsj\x00tsw\x00ttatttd\x00tte\x00ttj\x00ttr\x00tts" + + "\x00ttt\x00tuh\x00tul\x00tum\x00tuq\x00tvd\x00tvl\x00tvu\x00twwitwh\x00t" + + "wq\x00txg\x00tyahtya\x00tyv\x00tzm\x00ubu\x00udm\x00ugiguga\x00ukkruli" + + "\x00umb\x00und\x00unr\x00unx\x00urrduri\x00urt\x00urw\x00usa\x00utr\x00u" + + "vh\x00uvl\x00uzzbvag\x00vai\x00van\x00veenvec\x00vep\x00viievic\x00viv" + + "\x00vls\x00vmf\x00vmw\x00voolvot\x00vro\x00vun\x00vut\x00walnwae\x00waj" + + "\x00wal\x00wan\x00war\x00wbp\x00wbq\x00wbr\x00wci\x00wer\x00wgi\x00whg" + + "\x00wib\x00wiu\x00wiv\x00wja\x00wji\x00wls\x00wmo\x00wnc\x00wni\x00wnu" + + "\x00woolwob\x00wos\x00wrs\x00wsk\x00wtm\x00wuu\x00wuv\x00wwa\x00xav\x00x" + + "bi\x00xcr\x00xes\x00xhhoxla\x00xlc\x00xld\x00xmf\x00xmn\x00xmr\x00xna" + + "\x00xnr\x00xog\x00xon\x00xpr\x00xrb\x00xsa\x00xsi\x00xsm\x00xsr\x00xwe" + + "\x00yam\x00yao\x00yap\x00yas\x00yat\x00yav\x00yay\x00yaz\x00yba\x00ybb" + + "\x00yby\x00yer\x00ygr\x00ygw\x00yiidyko\x00yle\x00ylg\x00yll\x00yml\x00y" + + "ooryon\x00yrb\x00yre\x00yrl\x00yss\x00yua\x00yue\x00yuj\x00yut\x00yuw" + + "\x00zahazag\x00zbl\x00zdj\x00zea\x00zgh\x00zhhozhx\x00zia\x00zlm\x00zmi" + + "\x00zne\x00zuulzxx\x00zza\x00\xff\xff\xff\xff" + +const langNoIndexOffset = 1330 + +// langNoIndex is a bit vector of all 3-letter language codes that are not used as an index +// in lookup tables. The language ids for these language codes are derived directly +// from the letters and are not consecutive. +// Size: 2197 bytes, 2197 elements +var langNoIndex = [2197]uint8{ + // Entry 0 - 3F + 0xff, 0xf8, 0xed, 0xfe, 0xeb, 0xd3, 0x3b, 0xd2, + 0xfb, 0xbf, 0x7a, 0xfa, 0x37, 0x1d, 0x3c, 0x57, + 0x6e, 0x97, 0x73, 0x38, 0xfb, 0xea, 0xbf, 0x70, + 0xad, 0x03, 0xff, 0xff, 0xcf, 0x05, 0x84, 0x72, + 0xe9, 0xbf, 0xfd, 0xbf, 0xbf, 0xf7, 0xfd, 0x77, + 0x0f, 0xff, 0xef, 0x6f, 0xff, 0xfb, 0xdf, 0xe2, + 0xc9, 0xf8, 0x7f, 0x7e, 0x4d, 0xbc, 0x0a, 0x6a, + 0x7c, 0xea, 0xe3, 0xfa, 0x7a, 0xbf, 0x67, 0xff, + // Entry 40 - 7F + 0xff, 0xff, 0xff, 0xdf, 0x2a, 0x54, 0x91, 0xc0, + 0x5d, 0xe3, 0x97, 0x14, 0x07, 0x20, 0xdd, 0xed, + 0x9f, 0x3f, 0xc9, 0x21, 0xf8, 0x3f, 0x94, 0x35, + 0x7c, 0x5f, 0xff, 0x5f, 0x8e, 0x6e, 0xdf, 0xff, + 0xff, 0xff, 0x55, 0x7c, 0xd3, 0xfd, 0xbf, 0xb5, + 0x7b, 0xdf, 0x7f, 0xf7, 0xca, 0xfe, 0xdb, 0xa3, + 0xa8, 0xff, 0x1f, 0x67, 0x7d, 0xeb, 0xef, 0xce, + 0xff, 0xff, 0x9f, 0xff, 0xb7, 0xef, 0xfe, 0xcf, + // Entry 80 - BF + 0xdb, 0xff, 0xf3, 0xcd, 0xfb, 0x7f, 0xff, 0xff, + 0xbb, 0xee, 0xf7, 0xbd, 0xdb, 0xff, 0x5f, 0xf7, + 0xfd, 0xf2, 0xfd, 0xff, 0x5e, 0x2f, 0x3b, 0xba, + 0x7e, 0xff, 0xff, 0xfe, 0xf7, 0xff, 0xdd, 0xff, + 0xfd, 0xdf, 0xfb, 0xfe, 0x9d, 0xb4, 0xd3, 0xff, + 0xef, 0xff, 0xdf, 0xf7, 0x7f, 0xb7, 0xfd, 0xd5, + 0xa5, 0x77, 0x40, 0xff, 0x9c, 0xc1, 0x41, 0x2c, + 0x08, 0x21, 0x41, 0x00, 0x50, 0x40, 0x00, 0x80, + // Entry C0 - FF + 0xfb, 0x4a, 0xf2, 0x9f, 0xb4, 0x42, 0x41, 0x96, + 0x1b, 0x14, 0x08, 0xf3, 0x2b, 0xe7, 0x17, 0x56, + 0x05, 0x7d, 0x0e, 0x1c, 0x37, 0x7f, 0xf3, 0xef, + 0x97, 0xff, 0x5d, 0x38, 0x64, 0x08, 0x00, 0x10, + 0xbc, 0x85, 0xaf, 0xdf, 0xff, 0xff, 0x7b, 0x35, + 0x3e, 0xc7, 0xc7, 0xdf, 0xff, 0x01, 0x81, 0x00, + 0xb0, 0x05, 0x80, 0x00, 0x20, 0x00, 0x00, 0x03, + 0x40, 0x00, 0x40, 0x92, 0x21, 0x50, 0xb1, 0x5d, + // Entry 100 - 13F + 0xfd, 0xdc, 0xbe, 0x5e, 0x00, 0x00, 0x02, 0x64, + 0x0d, 0x19, 0x41, 0xdf, 0x79, 0x22, 0x00, 0x00, + 0x00, 0x5e, 0x64, 0xdc, 0x24, 0xe5, 0xd9, 0xe3, + 0xfe, 0xff, 0xfd, 0xcb, 0x9f, 0x14, 0x41, 0x0c, + 0x86, 0x00, 0xd1, 0x00, 0xf0, 0xc7, 0x67, 0x5f, + 0x56, 0x99, 0x5e, 0xb5, 0x6c, 0xaf, 0x03, 0x00, + 0x02, 0x00, 0x00, 0x00, 0xc0, 0x37, 0xda, 0x56, + 0x90, 0x6d, 0x01, 0x2e, 0x96, 0x69, 0x20, 0xfb, + // Entry 140 - 17F + 0xff, 0x3f, 0x00, 0x00, 0x00, 0x01, 0x0c, 0x16, + 0x03, 0x00, 0x00, 0xb0, 0x14, 0x23, 0x50, 0x06, + 0x0a, 0x00, 0x01, 0x00, 0x00, 0x10, 0x11, 0x09, + 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x44, 0x00, 0x00, 0x10, 0x00, 0x05, + 0x08, 0x00, 0x00, 0x05, 0x00, 0x80, 0x28, 0x04, + 0x00, 0x00, 0x40, 0xd5, 0x2d, 0x00, 0x64, 0x35, + 0x24, 0x52, 0xf4, 0xd5, 0xbf, 0x62, 0xc9, 0x03, + // Entry 180 - 1BF + 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x13, 0x39, 0x01, 0xdd, 0x57, 0x98, + 0x21, 0x18, 0x81, 0x08, 0x00, 0x01, 0x40, 0x82, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x40, 0x00, 0x44, 0x00, 0x00, 0x80, 0xea, + 0xa9, 0x39, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + // Entry 1C0 - 1FF + 0x00, 0x03, 0x28, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x20, 0x04, 0xa6, 0x00, 0x04, 0x00, 0x00, + 0x81, 0x50, 0x00, 0x00, 0x00, 0x11, 0x84, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x55, + 0x02, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x40, + 0x30, 0x83, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1e, 0xcd, 0xbf, 0x7a, 0xbf, + // Entry 200 - 23F + 0xdf, 0xc3, 0x83, 0x82, 0xc0, 0xfb, 0x57, 0x27, + 0xed, 0x55, 0xe7, 0x01, 0x00, 0x20, 0xb2, 0xc5, + 0xa4, 0x45, 0x25, 0x9b, 0x02, 0xdf, 0xe1, 0xdf, + 0x03, 0x44, 0x08, 0x90, 0x01, 0x04, 0x81, 0xe3, + 0x92, 0x54, 0xdb, 0x28, 0xd3, 0x5f, 0xfe, 0x6d, + 0x79, 0xed, 0x1c, 0x7f, 0x04, 0x08, 0x00, 0x01, + 0x21, 0x12, 0x64, 0x5f, 0xdd, 0x0e, 0x85, 0x4f, + 0x40, 0x40, 0x00, 0x04, 0xf1, 0xfd, 0x3d, 0x54, + // Entry 240 - 27F + 0xe8, 0x03, 0xb4, 0x27, 0x23, 0x0d, 0x00, 0x00, + 0x20, 0x7b, 0x78, 0x02, 0x07, 0x84, 0x00, 0xf0, + 0xbb, 0x7e, 0x5a, 0x00, 0x18, 0x04, 0x81, 0x00, + 0x00, 0x00, 0x80, 0x10, 0x90, 0x1c, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x04, + 0x08, 0xa0, 0x70, 0xa5, 0x0c, 0x40, 0x00, 0x00, + 0x91, 0x24, 0x04, 0x68, 0x00, 0x20, 0x70, 0xff, + 0x7b, 0x7f, 0x70, 0x00, 0x05, 0x9b, 0xdd, 0x66, + // Entry 280 - 2BF + 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x40, 0x05, + 0xb5, 0xb6, 0x80, 0x08, 0x04, 0x00, 0x04, 0x51, + 0xe2, 0xef, 0xfd, 0x3f, 0x05, 0x09, 0x08, 0x05, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x60, + 0xe7, 0x48, 0x00, 0x81, 0x20, 0xc0, 0x05, 0x80, + 0x03, 0x00, 0x00, 0x00, 0x8c, 0x50, 0x40, 0x04, + 0x84, 0x47, 0x84, 0x40, 0x20, 0x10, 0x00, 0x20, + // Entry 2C0 - 2FF + 0x02, 0x50, 0x80, 0x11, 0x00, 0x99, 0x6c, 0xe2, + 0x50, 0x27, 0x1d, 0x11, 0x29, 0x0e, 0x59, 0xe9, + 0x33, 0x08, 0x00, 0x20, 0x04, 0x40, 0x10, 0x00, + 0x00, 0x00, 0x50, 0x44, 0x92, 0x49, 0xd6, 0x5d, + 0xa7, 0x81, 0x47, 0x97, 0xfb, 0x00, 0x10, 0x00, + 0x08, 0x00, 0x80, 0x00, 0x40, 0x04, 0x00, 0x01, + 0x02, 0x00, 0x01, 0x40, 0x80, 0x00, 0x40, 0x08, + 0xd8, 0xeb, 0xf6, 0x39, 0xc4, 0x8d, 0x12, 0x00, + // Entry 300 - 33F + 0x00, 0x0c, 0x04, 0x01, 0x20, 0x20, 0xdd, 0xa0, + 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x04, 0x10, 0xd0, 0x9d, 0x95, 0x13, 0x04, 0x80, + 0x00, 0x01, 0xd0, 0x16, 0x40, 0x00, 0x10, 0xb0, + 0x10, 0x62, 0x4c, 0xd2, 0x02, 0x01, 0x4a, 0x00, + 0x46, 0x04, 0x00, 0x08, 0x02, 0x00, 0x20, 0x80, + 0x00, 0x80, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0xd8, 0x6f, 0x15, 0x02, 0x08, 0x00, + // Entry 340 - 37F + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, + 0x00, 0x10, 0x00, 0x00, 0x00, 0xf0, 0x84, 0xe3, + 0xdd, 0xbf, 0xf9, 0xf9, 0x3b, 0x7f, 0x7f, 0xdb, + 0xfd, 0xfc, 0xfe, 0xdf, 0xff, 0xfd, 0xff, 0xf6, + 0xfb, 0xfc, 0xf7, 0x1f, 0xff, 0xb3, 0x6c, 0xff, + 0xd9, 0xad, 0xdf, 0xfe, 0xef, 0xba, 0xdf, 0xff, + 0xff, 0xff, 0xb7, 0xdd, 0x7d, 0xbf, 0xab, 0x7f, + 0xfd, 0xfd, 0xdf, 0x2f, 0x9c, 0xdf, 0xf3, 0x6f, + // Entry 380 - 3BF + 0xdf, 0xdd, 0xff, 0xfb, 0xee, 0xd2, 0xab, 0x5f, + 0xd5, 0xdf, 0x7f, 0xff, 0xeb, 0xff, 0xe4, 0x4d, + 0xf9, 0xff, 0xfe, 0xf7, 0xfd, 0xdf, 0xfb, 0xbf, + 0xee, 0xdb, 0x6f, 0xef, 0xff, 0x7f, 0xff, 0xff, + 0xf7, 0x5f, 0xd3, 0x3b, 0xfd, 0xd9, 0xdf, 0xeb, + 0xbc, 0x08, 0x05, 0x24, 0xff, 0x07, 0x70, 0xfe, + 0xe6, 0x5e, 0x00, 0x08, 0x00, 0x83, 0x7d, 0x1f, + 0x06, 0xe6, 0x72, 0x60, 0xd1, 0x3c, 0x7f, 0x44, + // Entry 3C0 - 3FF + 0x02, 0x30, 0x9f, 0x7a, 0x16, 0xbd, 0x7f, 0x57, + 0xf2, 0xff, 0x31, 0xff, 0xf2, 0x1e, 0x90, 0xf7, + 0xf1, 0xf9, 0x45, 0x80, 0x01, 0x02, 0x00, 0x20, + 0x40, 0x54, 0x9f, 0x8a, 0xdf, 0xf9, 0x6e, 0x11, + 0x86, 0x51, 0xc0, 0xf3, 0xfb, 0x47, 0x40, 0x03, + 0x05, 0xd1, 0x50, 0x5c, 0x00, 0x40, 0x00, 0x10, + 0x04, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x17, 0xd2, + 0xb9, 0xfd, 0xfc, 0xba, 0xfe, 0xef, 0xc7, 0xbe, + // Entry 400 - 43F + 0x53, 0x6f, 0xdf, 0xe7, 0xdb, 0x65, 0xbb, 0x7f, + 0xfa, 0xff, 0x77, 0xf3, 0xef, 0xbf, 0xfd, 0xf7, + 0xdf, 0xdf, 0x9b, 0x7f, 0xff, 0xff, 0x7f, 0x6f, + 0xf7, 0xfb, 0xeb, 0xdf, 0xbc, 0xff, 0xbf, 0x6b, + 0x7b, 0xfb, 0xff, 0xce, 0x76, 0xbd, 0xf7, 0xf7, + 0xdf, 0xdc, 0xf7, 0xf7, 0xff, 0xdf, 0xf3, 0xfe, + 0xef, 0xff, 0xff, 0xff, 0xb6, 0x7f, 0x7f, 0xde, + 0xf7, 0xb9, 0xeb, 0x77, 0xff, 0xfb, 0xbf, 0xdf, + // Entry 440 - 47F + 0xfd, 0xfe, 0xfb, 0xff, 0xfe, 0xeb, 0x1f, 0x7d, + 0x2f, 0xfd, 0xb6, 0xb5, 0xa5, 0xfc, 0xff, 0xfd, + 0x7f, 0x4e, 0xbf, 0x8f, 0xae, 0xff, 0xee, 0xdf, + 0x7f, 0xf7, 0x73, 0x02, 0x02, 0x04, 0xfc, 0xf7, + 0xff, 0xb7, 0xd7, 0xef, 0xfe, 0xcd, 0xf5, 0xce, + 0xe2, 0x8e, 0xe7, 0xbf, 0xb7, 0xff, 0x56, 0xfd, + 0xcd, 0xff, 0xfb, 0xff, 0xdf, 0xd7, 0xea, 0xff, + 0xe5, 0x5f, 0x6d, 0x0f, 0xa7, 0x51, 0x06, 0xc4, + // Entry 480 - 4BF + 0x93, 0x50, 0x5d, 0xaf, 0xa6, 0xff, 0x99, 0xfb, + 0x63, 0x1d, 0x53, 0xff, 0xef, 0xb7, 0x35, 0x20, + 0x14, 0x00, 0x55, 0x51, 0xc2, 0x65, 0xf5, 0x41, + 0xe2, 0xff, 0xfc, 0xdf, 0x02, 0x85, 0xc5, 0x05, + 0x00, 0x22, 0x00, 0x74, 0x69, 0x10, 0x08, 0x05, + 0x41, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x51, 0x20, 0x05, 0x04, 0x01, 0x00, 0x00, + 0x06, 0x11, 0x20, 0x00, 0x18, 0x01, 0x92, 0xf1, + // Entry 4C0 - 4FF + 0xfd, 0x47, 0x69, 0x06, 0x95, 0x06, 0x57, 0xed, + 0xfb, 0x4d, 0x1c, 0x6b, 0x83, 0x04, 0x62, 0x40, + 0x00, 0x11, 0x42, 0x00, 0x00, 0x00, 0x54, 0x83, + 0xb8, 0x4f, 0x10, 0x8e, 0x89, 0x46, 0xde, 0xf7, + 0x13, 0x31, 0x00, 0x20, 0x00, 0x00, 0x00, 0x90, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x00, + 0x01, 0x00, 0x00, 0xf0, 0x5b, 0xf4, 0xbe, 0x3d, + 0xbe, 0xcf, 0xf7, 0xaf, 0x42, 0x04, 0x84, 0x41, + // Entry 500 - 53F + 0x30, 0xff, 0x79, 0x72, 0x04, 0x00, 0x00, 0x49, + 0x2d, 0x14, 0x27, 0x5f, 0xed, 0xf1, 0x3f, 0xe7, + 0x3f, 0x00, 0x00, 0x02, 0xc6, 0xa0, 0x1e, 0xf8, + 0xbb, 0xff, 0xfd, 0xfb, 0xb7, 0xfd, 0xe7, 0xf7, + 0xfd, 0xfc, 0xd5, 0xed, 0x47, 0xf4, 0x7e, 0x10, + 0x01, 0x01, 0x84, 0x6d, 0xff, 0xf7, 0xdd, 0xf9, + 0x5b, 0x05, 0x86, 0xed, 0xf5, 0x77, 0xbd, 0x3c, + 0x00, 0x00, 0x00, 0x42, 0x71, 0x42, 0x00, 0x40, + // Entry 540 - 57F + 0x00, 0x00, 0x01, 0x43, 0x19, 0x24, 0x08, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + // Entry 580 - 5BF + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xab, 0xbd, 0xe7, 0x57, 0xee, 0x13, 0x5d, + 0x09, 0xc1, 0x40, 0x21, 0xfa, 0x17, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xce, 0xfb, 0xbf, + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x30, 0x15, 0xa3, 0x10, 0x00, 0x00, 0x00, + 0x11, 0x04, 0x16, 0x00, 0x00, 0x02, 0x20, 0x81, + 0xa3, 0x01, 0x50, 0x00, 0x00, 0x83, 0x11, 0x40, + // Entry 5C0 - 5FF + 0x00, 0x00, 0x00, 0xf0, 0xdd, 0x7b, 0xbe, 0x02, + 0xaa, 0x10, 0x5d, 0x98, 0x52, 0x00, 0x80, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x02, + 0x3d, 0x40, 0x10, 0x02, 0x10, 0x61, 0x5a, 0x9d, + 0x31, 0x00, 0x00, 0x00, 0x01, 0x18, 0x02, 0x20, + 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x20, 0x00, + 0x00, 0x1f, 0xdf, 0xd2, 0xb9, 0xff, 0xfd, 0x3f, + 0x1f, 0x98, 0xcf, 0x9c, 0xff, 0xaf, 0x5f, 0xfe, + // Entry 600 - 63F + 0x7b, 0x4b, 0x40, 0x10, 0xe1, 0xfd, 0xaf, 0xd9, + 0xb7, 0xf6, 0xfb, 0xb3, 0xc7, 0xff, 0x6f, 0xf1, + 0x73, 0xb1, 0x7f, 0x9f, 0x7f, 0xbd, 0xfc, 0xb7, + 0xee, 0x1c, 0xfa, 0xcb, 0xef, 0xdd, 0xf9, 0xbd, + 0x6e, 0xae, 0x55, 0xfd, 0x6e, 0x81, 0x76, 0x9f, + 0xd4, 0x77, 0xf5, 0x7d, 0xfb, 0xff, 0xeb, 0xfe, + 0xbe, 0x5f, 0x46, 0x5b, 0xe9, 0x5f, 0x50, 0x18, + 0x02, 0xfa, 0xf7, 0x9d, 0x15, 0x97, 0x05, 0x0f, + // Entry 640 - 67F + 0x75, 0xc4, 0x7d, 0x81, 0x92, 0xf5, 0x57, 0x6c, + 0xff, 0xe4, 0xef, 0x6f, 0xff, 0xfc, 0xdd, 0xde, + 0xfc, 0xfd, 0x76, 0x5f, 0x7a, 0x3f, 0x00, 0x98, + 0x02, 0xfb, 0xa3, 0xef, 0xf3, 0xd6, 0xf2, 0xff, + 0xb9, 0xda, 0x7d, 0xd0, 0x3e, 0x15, 0x7b, 0xb4, + 0xf5, 0x3e, 0xff, 0xff, 0xf1, 0xf7, 0xff, 0xe7, + 0x5f, 0xff, 0xff, 0x9e, 0xdf, 0xf6, 0xd7, 0xb9, + 0xef, 0x27, 0x80, 0xbb, 0xc5, 0xff, 0xff, 0xe3, + // Entry 680 - 6BF + 0x97, 0x9d, 0xbf, 0x9f, 0xf7, 0xc7, 0xfd, 0x37, + 0xce, 0x7f, 0x44, 0x1d, 0x73, 0x7f, 0xf8, 0xda, + 0x5d, 0xce, 0x7d, 0x06, 0xb9, 0xea, 0x79, 0xa0, + 0x1a, 0x20, 0x00, 0x30, 0x02, 0x04, 0x24, 0x08, + 0x04, 0x00, 0x00, 0x40, 0xd4, 0x02, 0x04, 0x00, + 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x09, 0x06, + 0x50, 0x00, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00, + 0x04, 0x00, 0x10, 0xdc, 0x58, 0xd7, 0x0d, 0x0f, + // Entry 6C0 - 6FF + 0x54, 0x4d, 0xf1, 0x16, 0x44, 0xd5, 0x42, 0x08, + 0x40, 0x02, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, + 0x00, 0xdc, 0xfb, 0xcb, 0x0e, 0x58, 0x48, 0x41, + 0x24, 0x20, 0x04, 0x00, 0x30, 0x12, 0x40, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x80, 0x10, 0x10, 0xab, + 0x6d, 0x93, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x25, 0x00, 0x00, + // Entry 700 - 73F + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x80, 0x86, 0xc2, 0x00, 0x00, 0x01, 0x00, 0x01, + 0xff, 0x18, 0x02, 0x00, 0x02, 0xf0, 0xfd, 0x79, + 0x3b, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x03, 0x00, 0x09, 0x20, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 740 - 77F + 0x00, 0x00, 0x00, 0xef, 0xd5, 0xfd, 0xcf, 0x7e, + 0xb0, 0x11, 0x00, 0x00, 0x00, 0x92, 0x01, 0x46, + 0xcd, 0xf9, 0x5c, 0x00, 0x01, 0x00, 0x30, 0x04, + 0x04, 0x55, 0x00, 0x01, 0x04, 0xf4, 0x3f, 0x4a, + 0x01, 0x00, 0x00, 0xb0, 0x80, 0x20, 0x55, 0x75, + 0x97, 0x7c, 0xdf, 0x31, 0xcc, 0x68, 0xd1, 0x03, + 0xd5, 0x57, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x2c, 0xf7, 0xcb, 0x1f, 0x14, 0x60, + // Entry 780 - 7BF + 0x83, 0x68, 0x01, 0x10, 0x8b, 0x38, 0x8a, 0x01, + 0x00, 0x00, 0x20, 0x00, 0x24, 0x44, 0x00, 0x00, + 0x10, 0x03, 0x31, 0x02, 0x01, 0x00, 0x00, 0xf0, + 0xf5, 0xff, 0xd5, 0x97, 0xbc, 0x70, 0xd6, 0x78, + 0x78, 0x15, 0x50, 0x05, 0xa4, 0x84, 0xa9, 0x41, + 0x00, 0x00, 0x00, 0x6b, 0x39, 0x52, 0x74, 0x40, + 0xe8, 0x30, 0x90, 0x6a, 0x92, 0x00, 0x00, 0x02, + 0xff, 0xef, 0xff, 0x4b, 0x85, 0x53, 0xf4, 0xed, + // Entry 7C0 - 7FF + 0xdd, 0xbf, 0xf2, 0x5d, 0xc7, 0x0c, 0xd5, 0x42, + 0xfc, 0xff, 0xf7, 0x1f, 0x00, 0x80, 0x40, 0x56, + 0xcc, 0x16, 0x9e, 0xea, 0x35, 0x7d, 0xef, 0xff, + 0xbd, 0xa4, 0xaf, 0x01, 0x44, 0x18, 0x01, 0x4d, + 0x4e, 0x4a, 0x08, 0x50, 0x28, 0x30, 0xe0, 0x80, + 0x10, 0x20, 0x24, 0x00, 0xff, 0x2f, 0xd3, 0x60, + 0xfe, 0x01, 0x02, 0x88, 0x2a, 0x40, 0x16, 0x01, + 0x01, 0x15, 0x2b, 0x3c, 0x01, 0x00, 0x00, 0x10, + // Entry 800 - 83F + 0x90, 0x49, 0x41, 0x02, 0x02, 0x01, 0xe1, 0xbf, + 0xbf, 0x03, 0x00, 0x00, 0x10, 0xdc, 0xa3, 0xd1, + 0x40, 0x9c, 0x44, 0xdf, 0xf5, 0x8f, 0x66, 0xb3, + 0x55, 0x20, 0xd4, 0xc1, 0xd8, 0x30, 0x3d, 0x80, + 0x00, 0x00, 0x00, 0x04, 0xd4, 0x11, 0xc5, 0x84, + 0x2f, 0x50, 0x00, 0x22, 0x50, 0x6e, 0xbd, 0x93, + 0x07, 0x00, 0x20, 0x10, 0x84, 0xb2, 0x45, 0x10, + 0x06, 0x44, 0x00, 0x00, 0x12, 0x02, 0x11, 0x00, + // Entry 840 - 87F + 0xf0, 0xfb, 0xfd, 0x7f, 0x05, 0x00, 0x16, 0x89, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x02, 0x28, + 0x84, 0x00, 0x21, 0xc0, 0x23, 0x24, 0x00, 0x00, + 0x00, 0xcb, 0xe4, 0x3a, 0x46, 0x88, 0x54, 0xf1, + 0xef, 0xff, 0x7f, 0x12, 0x01, 0x01, 0x84, 0x50, + 0x07, 0xfc, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x40, + 0x10, 0x38, 0x01, 0x01, 0x1c, 0x12, 0x40, 0xe1, + // Entry 880 - 8BF + 0x76, 0x16, 0x08, 0x03, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24, + 0x0a, 0x00, 0x80, 0x00, 0x00, +} + +// altLangISO3 holds an alphabetically sorted list of 3-letter language code alternatives +// to 2-letter language codes that cannot be derived using the method described above. +// Each 3-letter code is followed by its 1-byte langID. +const altLangISO3 tag.Index = "---\x00cor\x00hbs\x01heb\x02kin\x03spa\x04yid\x05\xff\xff\xff\xff" + +// altLangIndex is used to convert indexes in altLangISO3 to langIDs. +// Size: 12 bytes, 6 elements +var altLangIndex = [6]uint16{ + 0x0281, 0x0407, 0x01fb, 0x03e5, 0x013e, 0x0208, +} + +// AliasMap maps langIDs to their suggested replacements. +// Size: 772 bytes, 193 elements +var AliasMap = [193]FromTo{ + 0: {From: 0x82, To: 0x88}, + 1: {From: 0x187, To: 0x1ae}, + 2: {From: 0x1f3, To: 0x1e1}, + 3: {From: 0x1fb, To: 0x1bc}, + 4: {From: 0x208, To: 0x512}, + 5: {From: 0x20f, To: 0x20e}, + 6: {From: 0x310, To: 0x3dc}, + 7: {From: 0x347, To: 0x36f}, + 8: {From: 0x407, To: 0x432}, + 9: {From: 0x47a, To: 0x153}, + 10: {From: 0x490, To: 0x451}, + 11: {From: 0x4a2, To: 0x21}, + 12: {From: 0x53e, To: 0x544}, + 13: {From: 0x58f, To: 0x12d}, + 14: {From: 0x62b, To: 0x34}, + 15: {From: 0x62f, To: 0x14}, + 16: {From: 0x630, To: 0x1eb1}, + 17: {From: 0x651, To: 0x431}, + 18: {From: 0x662, To: 0x431}, + 19: {From: 0x6ed, To: 0x3a}, + 20: {From: 0x6f8, To: 0x1d7}, + 21: {From: 0x709, To: 0x3625}, + 22: {From: 0x73e, To: 0x21a1}, + 23: {From: 0x7b3, To: 0x56}, + 24: {From: 0x7b9, To: 0x299b}, + 25: {From: 0x7c5, To: 0x58}, + 26: {From: 0x7e6, To: 0x145}, + 27: {From: 0x80c, To: 0x5a}, + 28: {From: 0x815, To: 0x8d}, + 29: {From: 0x87e, To: 0x810}, + 30: {From: 0x8a8, To: 0x8b7}, + 31: {From: 0x8c3, To: 0xee3}, + 32: {From: 0x8fa, To: 0x1dc}, + 33: {From: 0x9ef, To: 0x331}, + 34: {From: 0xa36, To: 0x2c5}, + 35: {From: 0xa3d, To: 0xbf}, + 36: {From: 0xabe, To: 0x3322}, + 37: {From: 0xb38, To: 0x529}, + 38: {From: 0xb75, To: 0x265a}, + 39: {From: 0xb7e, To: 0xbc3}, + 40: {From: 0xb9b, To: 0x44e}, + 41: {From: 0xbbc, To: 0x4229}, + 42: {From: 0xbbf, To: 0x529}, + 43: {From: 0xbfe, To: 0x2da7}, + 44: {From: 0xc2e, To: 0x3181}, + 45: {From: 0xcb9, To: 0xf3}, + 46: {From: 0xd08, To: 0xfa}, + 47: {From: 0xdc8, To: 0x11a}, + 48: {From: 0xdd7, To: 0x32d}, + 49: {From: 0xdf8, To: 0xdfb}, + 50: {From: 0xdfe, To: 0x531}, + 51: {From: 0xe01, To: 0xdf3}, + 52: {From: 0xedf, To: 0x205a}, + 53: {From: 0xee9, To: 0x222e}, + 54: {From: 0xeee, To: 0x2e9a}, + 55: {From: 0xf39, To: 0x367}, + 56: {From: 0x10d0, To: 0x140}, + 57: {From: 0x1104, To: 0x2d0}, + 58: {From: 0x11a0, To: 0x1ec}, + 59: {From: 0x1279, To: 0x21}, + 60: {From: 0x1424, To: 0x15e}, + 61: {From: 0x1470, To: 0x14e}, + 62: {From: 0x151f, To: 0xd9b}, + 63: {From: 0x1523, To: 0x390}, + 64: {From: 0x1532, To: 0x19f}, + 65: {From: 0x1580, To: 0x210}, + 66: {From: 0x1583, To: 0x10d}, + 67: {From: 0x15a3, To: 0x3caf}, + 68: {From: 0x1630, To: 0x222e}, + 69: {From: 0x166a, To: 0x19b}, + 70: {From: 0x16c8, To: 0x136}, + 71: {From: 0x1700, To: 0x29f8}, + 72: {From: 0x1718, To: 0x194}, + 73: {From: 0x1727, To: 0xf3f}, + 74: {From: 0x177a, To: 0x178}, + 75: {From: 0x1809, To: 0x17b6}, + 76: {From: 0x1816, To: 0x18f3}, + 77: {From: 0x188a, To: 0x436}, + 78: {From: 0x1979, To: 0x1d01}, + 79: {From: 0x1a74, To: 0x2bb0}, + 80: {From: 0x1a8a, To: 0x1f8}, + 81: {From: 0x1b5a, To: 0x1fa}, + 82: {From: 0x1b86, To: 0x1515}, + 83: {From: 0x1d64, To: 0x2c9b}, + 84: {From: 0x2038, To: 0x37b1}, + 85: {From: 0x203d, To: 0x20dd}, + 86: {From: 0x2042, To: 0x2e00}, + 87: {From: 0x205a, To: 0x30b}, + 88: {From: 0x20e3, To: 0x274}, + 89: {From: 0x20ee, To: 0x263}, + 90: {From: 0x20f2, To: 0x22d}, + 91: {From: 0x20f9, To: 0x256}, + 92: {From: 0x210f, To: 0x21eb}, + 93: {From: 0x2135, To: 0x27d}, + 94: {From: 0x2160, To: 0x913}, + 95: {From: 0x2199, To: 0x121}, + 96: {From: 0x21ce, To: 0x1561}, + 97: {From: 0x21e6, To: 0x504}, + 98: {From: 0x21f4, To: 0x49f}, + 99: {From: 0x21fb, To: 0x269}, + 100: {From: 0x222d, To: 0x121}, + 101: {From: 0x2237, To: 0x121}, + 102: {From: 0x2248, To: 0x217d}, + 103: {From: 0x2262, To: 0x92a}, + 104: {From: 0x2316, To: 0x3226}, + 105: {From: 0x236a, To: 0x2835}, + 106: {From: 0x2382, To: 0x3365}, + 107: {From: 0x2472, To: 0x2c7}, + 108: {From: 0x24e4, To: 0x2ff}, + 109: {From: 0x24f0, To: 0x2fa}, + 110: {From: 0x24fa, To: 0x31f}, + 111: {From: 0x2550, To: 0xb5b}, + 112: {From: 0x25a9, To: 0xe2}, + 113: {From: 0x263e, To: 0x2d0}, + 114: {From: 0x26c9, To: 0x26b4}, + 115: {From: 0x26f9, To: 0x3c8}, + 116: {From: 0x2727, To: 0x3caf}, + 117: {From: 0x2755, To: 0x6a4}, + 118: {From: 0x2765, To: 0x26b4}, + 119: {From: 0x2789, To: 0x4358}, + 120: {From: 0x27c9, To: 0x2001}, + 121: {From: 0x28ea, To: 0x27b1}, + 122: {From: 0x28ef, To: 0x2837}, + 123: {From: 0x28fe, To: 0xaa5}, + 124: {From: 0x2914, To: 0x351}, + 125: {From: 0x2986, To: 0x2da7}, + 126: {From: 0x29f0, To: 0x96b}, + 127: {From: 0x2b1a, To: 0x38d}, + 128: {From: 0x2bfc, To: 0x395}, + 129: {From: 0x2c3f, To: 0x3caf}, + 130: {From: 0x2ce1, To: 0x2201}, + 131: {From: 0x2cfc, To: 0x3be}, + 132: {From: 0x2d13, To: 0x597}, + 133: {From: 0x2d47, To: 0x148}, + 134: {From: 0x2d48, To: 0x148}, + 135: {From: 0x2dff, To: 0x2f1}, + 136: {From: 0x2e08, To: 0x19cc}, + 137: {From: 0x2e10, To: 0xc45}, + 138: {From: 0x2e1a, To: 0x2d95}, + 139: {From: 0x2e21, To: 0x292}, + 140: {From: 0x2e54, To: 0x7d}, + 141: {From: 0x2e65, To: 0x2282}, + 142: {From: 0x2e97, To: 0x1a4}, + 143: {From: 0x2ea0, To: 0x2e9b}, + 144: {From: 0x2eef, To: 0x2ed7}, + 145: {From: 0x3193, To: 0x3c4}, + 146: {From: 0x3366, To: 0x338e}, + 147: {From: 0x342a, To: 0x3dc}, + 148: {From: 0x34ee, To: 0x18d0}, + 149: {From: 0x35c8, To: 0x2c9b}, + 150: {From: 0x35e6, To: 0x412}, + 151: {From: 0x35f5, To: 0x24b}, + 152: {From: 0x360d, To: 0x1dc}, + 153: {From: 0x3658, To: 0x246}, + 154: {From: 0x3676, To: 0x3f4}, + 155: {From: 0x36fd, To: 0x445}, + 156: {From: 0x3747, To: 0x3b42}, + 157: {From: 0x37c0, To: 0x121}, + 158: {From: 0x3816, To: 0x38f2}, + 159: {From: 0x382a, To: 0x2b48}, + 160: {From: 0x382b, To: 0x2c9b}, + 161: {From: 0x382f, To: 0xa9}, + 162: {From: 0x3832, To: 0x3228}, + 163: {From: 0x386c, To: 0x39a6}, + 164: {From: 0x3892, To: 0x3fc0}, + 165: {From: 0x38a0, To: 0x45f}, + 166: {From: 0x38a5, To: 0x39d7}, + 167: {From: 0x38b4, To: 0x1fa4}, + 168: {From: 0x38b5, To: 0x2e9a}, + 169: {From: 0x38fa, To: 0x38f1}, + 170: {From: 0x395c, To: 0x47e}, + 171: {From: 0x3b4e, To: 0xd91}, + 172: {From: 0x3b78, To: 0x137}, + 173: {From: 0x3c99, To: 0x4bc}, + 174: {From: 0x3fbd, To: 0x100}, + 175: {From: 0x4208, To: 0xa91}, + 176: {From: 0x42be, To: 0x573}, + 177: {From: 0x42f9, To: 0x3f60}, + 178: {From: 0x4378, To: 0x25a}, + 179: {From: 0x43b8, To: 0xe6c}, + 180: {From: 0x43cd, To: 0x10f}, + 181: {From: 0x43d4, To: 0x4848}, + 182: {From: 0x44af, To: 0x3322}, + 183: {From: 0x44e3, To: 0x512}, + 184: {From: 0x45ca, To: 0x2409}, + 185: {From: 0x45dd, To: 0x26dc}, + 186: {From: 0x4610, To: 0x48ae}, + 187: {From: 0x46ae, To: 0x46a0}, + 188: {From: 0x473e, To: 0x4745}, + 189: {From: 0x4817, To: 0x3503}, + 190: {From: 0x483b, To: 0x208b}, + 191: {From: 0x4916, To: 0x31f}, + 192: {From: 0x49a7, To: 0x523}, +} + +// Size: 193 bytes, 193 elements +var AliasTypes = [193]AliasType{ + // Entry 0 - 3F + 1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 1, 0, 0, 0, 0, + 1, 2, 1, 1, 2, 0, 0, 1, 0, 1, 2, 1, 1, 0, 0, 0, + 0, 2, 1, 1, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 2, 1, + 1, 1, 1, 0, 0, 0, 0, 2, 1, 1, 1, 1, 2, 1, 0, 1, + // Entry 40 - 7F + 1, 2, 2, 0, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0, + 2, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 0, + 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, + // Entry 80 - BF + 1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 1, 1, 2, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0, + 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, + // Entry C0 - FF + 1, +} + +const ( + _Latn = 91 + _Hani = 57 + _Hans = 59 + _Hant = 60 + _Qaaa = 149 + _Qaai = 157 + _Qabx = 198 + _Zinh = 255 + _Zyyy = 260 + _Zzzz = 261 +) + +// script is an alphabetically sorted list of ISO 15924 codes. The index +// of the script in the string, divided by 4, is the internal scriptID. +const script tag.Index = "" + // Size: 1052 bytes + "----AdlmAfakAghbAhomArabAranArmiArmnAvstBaliBamuBassBatkBengBhksBlisBopo" + + "BrahBraiBugiBuhdCakmCansCariChamCherChrsCirtCoptCpmnCprtCyrlCyrsDevaDiak" + + "DogrDsrtDuplEgydEgyhEgypElbaElymEthiGeokGeorGlagGongGonmGothGranGrekGujr" + + "GuruHanbHangHaniHanoHansHantHatrHebrHiraHluwHmngHmnpHrktHungIndsItalJamo" + + "JavaJpanJurcKaliKanaKawiKharKhmrKhojKitlKitsKndaKoreKpelKthiLanaLaooLatf" + + "LatgLatnLekeLepcLimbLinaLinbLisuLomaLyciLydiMahjMakaMandManiMarcMayaMedf" + + "MendMercMeroMlymModiMongMoonMrooMteiMultMymrNagmNandNarbNbatNewaNkdbNkgb" + + "NkooNshuOgamOlckOrkhOryaOsgeOsmaOugrPalmPaucPcunPelmPermPhagPhliPhlpPhlv" + + "PhnxPiqdPlrdPrtiPsinQaaaQaabQaacQaadQaaeQaafQaagQaahQaaiQaajQaakQaalQaam" + + "QaanQaaoQaapQaaqQaarQaasQaatQaauQaavQaawQaaxQaayQaazQabaQabbQabcQabdQabe" + + "QabfQabgQabhQabiQabjQabkQablQabmQabnQaboQabpQabqQabrQabsQabtQabuQabvQabw" + + "QabxRanjRjngRohgRoroRunrSamrSaraSarbSaurSgnwShawShrdShuiSiddSindSinhSogd" + + "SogoSoraSoyoSundSunuSyloSyrcSyreSyrjSyrnTagbTakrTaleTaluTamlTangTavtTelu" + + "TengTfngTglgThaaThaiTibtTirhTnsaTotoUgarVaiiVispVithWaraWchoWoleXpeoXsux" + + "YeziYiiiZanbZinhZmthZsyeZsymZxxxZyyyZzzz\xff\xff\xff\xff" + +// suppressScript is an index from langID to the dominant script for that language, +// if it exists. If a script is given, it should be suppressed from the language tag. +// Size: 1330 bytes, 1330 elements +var suppressScript = [1330]uint8{ + // Entry 0 - 3F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 40 - 7F + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, + // Entry 80 - BF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry C0 - FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 100 - 13F + 0x5b, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xed, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x5b, 0x00, 0x5b, 0x00, + // Entry 140 - 17F + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x5b, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 180 - 1BF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x5b, 0x35, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x22, 0x00, + // Entry 1C0 - 1FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x5b, 0x00, 0x5b, 0x5b, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x5b, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, + // Entry 200 - 23F + 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 240 - 27F + 0x00, 0x00, 0x20, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x53, 0x00, 0x00, 0x54, 0x00, 0x22, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 280 - 2BF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 2C0 - 2FF + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + // Entry 300 - 33F + 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x5b, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, + // Entry 340 - 37F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x5b, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5b, 0x00, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 380 - 3BF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, + // Entry 3C0 - 3FF + 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x00, 0x00, 0x5b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 400 - 43F + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, + // Entry 440 - 47F + 0x00, 0x00, 0x00, 0x00, 0x5b, 0x5b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe9, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0x2c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, + // Entry 480 - 4BF + 0x5b, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 4C0 - 4FF + 0x5b, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 500 - 53F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, +} + +const ( + _001 = 1 + _419 = 31 + _BR = 65 + _CA = 73 + _ES = 111 + _GB = 124 + _MD = 189 + _PT = 239 + _UK = 307 + _US = 310 + _ZZ = 358 + _XA = 324 + _XC = 326 + _XK = 334 +) + +// isoRegionOffset needs to be added to the index of regionISO to obtain the regionID +// for 2-letter ISO codes. (The first isoRegionOffset regionIDs are reserved for +// the UN.M49 codes used for groups.) +const isoRegionOffset = 32 + +// regionTypes defines the status of a region for various standards. +// Size: 359 bytes, 359 elements +var regionTypes = [359]uint8{ + // Entry 0 - 3F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + // Entry 40 - 7F + 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x04, 0x06, + 0x04, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x04, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x00, + 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x00, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, + // Entry 80 - BF + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x00, 0x04, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + // Entry C0 - FF + 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04, + 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x00, 0x06, 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + // Entry 100 - 13F + 0x05, 0x05, 0x05, 0x06, 0x00, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x02, 0x06, 0x04, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, + // Entry 140 - 17F + 0x06, 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x06, + 0x06, 0x04, 0x06, 0x06, 0x04, 0x06, 0x05, +} + +// regionISO holds a list of alphabetically sorted 2-letter ISO region codes. +// Each 2-letter codes is followed by two bytes with the following meaning: +// - [A-Z}{2}: the first letter of the 2-letter code plus these two +// letters form the 3-letter ISO code. +// - 0, n: index into altRegionISO3. +const regionISO tag.Index = "" + // Size: 1312 bytes + "AAAAACSCADNDAEREAFFGAGTGAIIAALLBAMRMANNTAOGOAQTAARRGASSMATUTAUUSAWBWAXLA" + + "AZZEBAIHBBRBBDGDBEELBFFABGGRBHHRBIDIBJENBLLMBMMUBNRNBOOLBQESBRRABSHSBTTN" + + "BUURBVVTBWWABYLRBZLZCAANCCCKCDODCFAFCGOGCHHECIIVCKOKCLHLCMMRCNHNCOOLCPPT" + + "CQ CRRICS\x00\x00CTTECUUBCVPVCWUWCXXRCYYPCZZEDDDRDEEUDGGADJJIDKNKDMMADO" + + "OMDYHYDZZAEA ECCUEESTEGGYEHSHERRIESSPETTHEU\x00\x03EZ FIINFJJIFKLKFMSM" + + "FOROFQ\x00\x18FRRAFXXXGAABGBBRGDRDGEEOGFUFGGGYGHHAGIIBGLRLGMMBGNINGPLPGQ" + + "NQGRRCGS\x00\x06GTTMGUUMGWNBGYUYHKKGHMMDHNNDHRRVHTTIHUUNHVVOIC IDDNIERL" + + "ILSRIMMNINNDIOOTIQRQIRRNISSLITTAJEEYJMAMJOORJPPNJTTNKEENKGGZKHHMKIIRKM" + + "\x00\x09KNNAKP\x00\x0cKRORKWWTKY\x00\x0fKZAZLAAOLBBNLCCALIIELKKALRBRLSSO" + + "LTTULUUXLVVALYBYMAARMCCOMDDAMENEMFAFMGDGMHHLMIIDMKKDMLLIMMMRMNNGMOACMPNP" + + "MQTQMRRTMSSRMTLTMUUSMVDVMWWIMXEXMYYSMZOZNAAMNCCLNEERNFFKNGGANHHBNIICNLLD" + + "NOORNPPLNQ\x00\x1eNRRUNTTZNUIUNZZLOMMNPAANPCCIPEERPFYFPGNGPHHLPKAKPLOLPM" + + "\x00\x12PNCNPRRIPSSEPTRTPUUSPWLWPYRYPZCZQAATQMMMQNNNQOOOQPPPQQQQQRRRQSSS" + + "QTTTQU\x00\x03QVVVQWWWQXXXQYYYQZZZREEURHHOROOURS\x00\x15RUUSRWWASAAUSBLB" + + "SCYCSDDNSEWESGGPSHHNSIVNSJJMSKVKSLLESMMRSNENSOOMSRURSSSDSTTPSUUNSVLVSXXM" + + "SYYRSZWZTAAATCCATDCDTF\x00\x18TGGOTHHATJJKTKKLTLLSTMKMTNUNTOONTPMPTRURTT" + + "TOTVUVTWWNTZZAUAKRUGGAUK UMMIUN USSAUYRYUZZBVAATVCCTVDDRVEENVGGBVIIRVN" + + "NMVUUTWFLFWKAKWSSMXAAAXBBBXCCCXDDDXEEEXFFFXGGGXHHHXIIIXJJJXKKKXLLLXMMMXN" + + "NNXOOOXPPPXQQQXRRRXSSSXTTTXUUUXVVVXWWWXXXXXYYYXZZZYDMDYEEMYT\x00\x1bYUUG" + + "ZAAFZMMBZRARZWWEZZZZ\xff\xff\xff\xff" + +// altRegionISO3 holds a list of 3-letter region codes that cannot be +// mapped to 2-letter codes using the default algorithm. This is a short list. +const altRegionISO3 string = "SCGQUUSGSCOMPRKCYMSPMSRBATFMYTATN" + +// altRegionIDs holds a list of regionIDs the positions of which match those +// of the 3-letter ISO codes in altRegionISO3. +// Size: 22 bytes, 11 elements +var altRegionIDs = [11]uint16{ + 0x0058, 0x0071, 0x0089, 0x00a9, 0x00ab, 0x00ae, 0x00eb, 0x0106, + 0x0122, 0x0160, 0x00dd, +} + +// Size: 80 bytes, 20 elements +var regionOldMap = [20]FromTo{ + 0: {From: 0x44, To: 0xc5}, + 1: {From: 0x59, To: 0xa8}, + 2: {From: 0x60, To: 0x61}, + 3: {From: 0x67, To: 0x3b}, + 4: {From: 0x7a, To: 0x79}, + 5: {From: 0x94, To: 0x37}, + 6: {From: 0xa4, To: 0x134}, + 7: {From: 0xc2, To: 0x134}, + 8: {From: 0xd8, To: 0x140}, + 9: {From: 0xdd, To: 0x2b}, + 10: {From: 0xf0, To: 0x134}, + 11: {From: 0xf3, To: 0xe3}, + 12: {From: 0xfd, To: 0x71}, + 13: {From: 0x104, To: 0x165}, + 14: {From: 0x12b, To: 0x127}, + 15: {From: 0x133, To: 0x7c}, + 16: {From: 0x13b, To: 0x13f}, + 17: {From: 0x142, To: 0x134}, + 18: {From: 0x15e, To: 0x15f}, + 19: {From: 0x164, To: 0x4b}, +} + +// m49 maps regionIDs to UN.M49 codes. The first isoRegionOffset entries are +// codes indicating collections of regions. +// Size: 718 bytes, 359 elements +var m49 = [359]int16{ + // Entry 0 - 3F + 0, 1, 2, 3, 5, 9, 11, 13, + 14, 15, 17, 18, 19, 21, 29, 30, + 34, 35, 39, 53, 54, 57, 61, 142, + 143, 145, 150, 151, 154, 155, 202, 419, + 958, 0, 20, 784, 4, 28, 660, 8, + 51, 530, 24, 10, 32, 16, 40, 36, + 533, 248, 31, 70, 52, 50, 56, 854, + 100, 48, 108, 204, 652, 60, 96, 68, + // Entry 40 - 7F + 535, 76, 44, 64, 104, 74, 72, 112, + 84, 124, 166, 180, 140, 178, 756, 384, + 184, 152, 120, 156, 170, 0, 0, 188, + 891, 296, 192, 132, 531, 162, 196, 203, + 278, 276, 0, 262, 208, 212, 214, 204, + 12, 0, 218, 233, 818, 732, 232, 724, + 231, 967, 0, 246, 242, 238, 583, 234, + 0, 250, 249, 266, 826, 308, 268, 254, + // Entry 80 - BF + 831, 288, 292, 304, 270, 324, 312, 226, + 300, 239, 320, 316, 624, 328, 344, 334, + 340, 191, 332, 348, 854, 0, 360, 372, + 376, 833, 356, 86, 368, 364, 352, 380, + 832, 388, 400, 392, 581, 404, 417, 116, + 296, 174, 659, 408, 410, 414, 136, 398, + 418, 422, 662, 438, 144, 430, 426, 440, + 442, 428, 434, 504, 492, 498, 499, 663, + // Entry C0 - FF + 450, 584, 581, 807, 466, 104, 496, 446, + 580, 474, 478, 500, 470, 480, 462, 454, + 484, 458, 508, 516, 540, 562, 574, 566, + 548, 558, 528, 578, 524, 10, 520, 536, + 570, 554, 512, 591, 0, 604, 258, 598, + 608, 586, 616, 666, 612, 630, 275, 620, + 581, 585, 600, 591, 634, 959, 960, 961, + 962, 963, 964, 965, 966, 967, 968, 969, + // Entry 100 - 13F + 970, 971, 972, 638, 716, 642, 688, 643, + 646, 682, 90, 690, 729, 752, 702, 654, + 705, 744, 703, 694, 674, 686, 706, 740, + 728, 678, 810, 222, 534, 760, 748, 0, + 796, 148, 260, 768, 764, 762, 772, 626, + 795, 788, 776, 626, 792, 780, 798, 158, + 834, 804, 800, 826, 581, 0, 840, 858, + 860, 336, 670, 704, 862, 92, 850, 704, + // Entry 140 - 17F + 548, 876, 581, 882, 973, 974, 975, 976, + 977, 978, 979, 980, 981, 982, 983, 984, + 985, 986, 987, 988, 989, 990, 991, 992, + 993, 994, 995, 996, 997, 998, 720, 887, + 175, 891, 710, 894, 180, 716, 999, +} + +// m49Index gives indexes into fromM49 based on the three most significant bits +// of a 10-bit UN.M49 code. To search an UN.M49 code in fromM49, search in +// +// fromM49[m49Index[msb39(code)]:m49Index[msb3(code)+1]] +// +// for an entry where the first 7 bits match the 7 lsb of the UN.M49 code. +// The region code is stored in the 9 lsb of the indexed value. +// Size: 18 bytes, 9 elements +var m49Index = [9]int16{ + 0, 59, 108, 143, 181, 220, 259, 291, + 333, +} + +// fromM49 contains entries to map UN.M49 codes to regions. See m49Index for details. +// Size: 666 bytes, 333 elements +var fromM49 = [333]uint16{ + // Entry 0 - 3F + 0x0201, 0x0402, 0x0603, 0x0824, 0x0a04, 0x1027, 0x1205, 0x142b, + 0x1606, 0x1868, 0x1a07, 0x1c08, 0x1e09, 0x202d, 0x220a, 0x240b, + 0x260c, 0x2822, 0x2a0d, 0x302a, 0x3825, 0x3a0e, 0x3c0f, 0x3e32, + 0x402c, 0x4410, 0x4611, 0x482f, 0x4e12, 0x502e, 0x5842, 0x6039, + 0x6435, 0x6628, 0x6834, 0x6a13, 0x6c14, 0x7036, 0x7215, 0x783d, + 0x7a16, 0x8043, 0x883f, 0x8c33, 0x9046, 0x9445, 0x9841, 0xa848, + 0xac9b, 0xb50a, 0xb93d, 0xc03e, 0xc838, 0xd0c5, 0xd83a, 0xe047, + 0xe8a7, 0xf052, 0xf849, 0x085b, 0x10ae, 0x184c, 0x1c17, 0x1e18, + // Entry 40 - 7F + 0x20b4, 0x2219, 0x2921, 0x2c1a, 0x2e1b, 0x3051, 0x341c, 0x361d, + 0x3853, 0x3d2f, 0x445d, 0x4c4a, 0x5454, 0x5ca9, 0x5f60, 0x644d, + 0x684b, 0x7050, 0x7857, 0x7e91, 0x805a, 0x885e, 0x941e, 0x965f, + 0x983b, 0xa064, 0xa865, 0xac66, 0xb46a, 0xbd1b, 0xc487, 0xcc70, + 0xce70, 0xd06e, 0xd26b, 0xd477, 0xdc75, 0xde89, 0xe474, 0xec73, + 0xf031, 0xf27a, 0xf479, 0xfc7f, 0x04e6, 0x0922, 0x0c63, 0x147b, + 0x187e, 0x1c84, 0x26ee, 0x2861, 0x2c60, 0x3061, 0x4081, 0x4882, + 0x50a8, 0x5888, 0x6083, 0x687d, 0x7086, 0x788b, 0x808a, 0x8885, + // Entry 80 - BF + 0x908d, 0x9892, 0x9c8f, 0xa139, 0xa890, 0xb08e, 0xb893, 0xc09e, + 0xc89a, 0xd096, 0xd89d, 0xe09c, 0xe897, 0xf098, 0xf89f, 0x004f, + 0x08a1, 0x10a3, 0x1caf, 0x20a2, 0x28a5, 0x30ab, 0x34ac, 0x3cad, + 0x42a6, 0x44b0, 0x461f, 0x4cb1, 0x54b6, 0x58b9, 0x5cb5, 0x64ba, + 0x6cb3, 0x70b7, 0x74b8, 0x7cc7, 0x84c0, 0x8ccf, 0x94d1, 0x9cce, + 0xa4c4, 0xaccc, 0xb4c9, 0xbcca, 0xc0cd, 0xc8d0, 0xd8bc, 0xe0c6, + 0xe4bd, 0xe6be, 0xe8cb, 0xf0bb, 0xf8d2, 0x00e2, 0x08d3, 0x10de, + 0x18dc, 0x20da, 0x2429, 0x265c, 0x2a30, 0x2d1c, 0x2e40, 0x30df, + // Entry C0 - FF + 0x38d4, 0x4940, 0x54e1, 0x5cd9, 0x64d5, 0x6cd7, 0x74e0, 0x7cd6, + 0x84db, 0x88c8, 0x8b34, 0x8e76, 0x90c1, 0x92f1, 0x94e9, 0x9ee3, + 0xace7, 0xb0f2, 0xb8e5, 0xc0e8, 0xc8ec, 0xd0ea, 0xd8ef, 0xe08c, + 0xe527, 0xeced, 0xf4f4, 0xfd03, 0x0505, 0x0707, 0x0d08, 0x183c, + 0x1d0f, 0x26aa, 0x2826, 0x2cb2, 0x2ebf, 0x34eb, 0x3d3a, 0x4514, + 0x4d19, 0x5509, 0x5d15, 0x6106, 0x650b, 0x6d13, 0x7d0e, 0x7f12, + 0x813f, 0x8310, 0x8516, 0x8d62, 0x9965, 0xa15e, 0xa86f, 0xb118, + 0xb30c, 0xb86d, 0xc10c, 0xc917, 0xd111, 0xd91e, 0xe10d, 0xe84e, + // Entry 100 - 13F + 0xf11d, 0xf525, 0xf924, 0x0123, 0x0926, 0x112a, 0x192d, 0x2023, + 0x2929, 0x312c, 0x3728, 0x3920, 0x3d2e, 0x4132, 0x4931, 0x4ec3, + 0x551a, 0x646c, 0x747c, 0x7e80, 0x80a0, 0x8299, 0x8530, 0x9136, + 0xa53e, 0xac37, 0xb537, 0xb938, 0xbd3c, 0xd941, 0xe543, 0xed5f, + 0xef5f, 0xf658, 0xfd63, 0x7c20, 0x7ef5, 0x80f6, 0x82f7, 0x84f8, + 0x86f9, 0x88fa, 0x8afb, 0x8cfc, 0x8e71, 0x90fe, 0x92ff, 0x9500, + 0x9701, 0x9902, 0x9b44, 0x9d45, 0x9f46, 0xa147, 0xa348, 0xa549, + 0xa74a, 0xa94b, 0xab4c, 0xad4d, 0xaf4e, 0xb14f, 0xb350, 0xb551, + // Entry 140 - 17F + 0xb752, 0xb953, 0xbb54, 0xbd55, 0xbf56, 0xc157, 0xc358, 0xc559, + 0xc75a, 0xc95b, 0xcb5c, 0xcd5d, 0xcf66, +} + +// Size: 2128 bytes +var variantIndex = map[string]uint8{ + "1606nict": 0x0, + "1694acad": 0x1, + "1901": 0x2, + "1959acad": 0x3, + "1994": 0x67, + "1996": 0x4, + "abl1943": 0x5, + "akuapem": 0x6, + "alalc97": 0x69, + "aluku": 0x7, + "ao1990": 0x8, + "aranes": 0x9, + "arevela": 0xa, + "arevmda": 0xb, + "arkaika": 0xc, + "asante": 0xd, + "auvern": 0xe, + "baku1926": 0xf, + "balanka": 0x10, + "barla": 0x11, + "basiceng": 0x12, + "bauddha": 0x13, + "bciav": 0x14, + "bcizbl": 0x15, + "biscayan": 0x16, + "biske": 0x62, + "bohoric": 0x17, + "boont": 0x18, + "bornholm": 0x19, + "cisaup": 0x1a, + "colb1945": 0x1b, + "cornu": 0x1c, + "creiss": 0x1d, + "dajnko": 0x1e, + "ekavsk": 0x1f, + "emodeng": 0x20, + "fonipa": 0x6a, + "fonkirsh": 0x6b, + "fonnapa": 0x6c, + "fonupa": 0x6d, + "fonxsamp": 0x6e, + "gallo": 0x21, + "gascon": 0x22, + "grclass": 0x23, + "grital": 0x24, + "grmistr": 0x25, + "hepburn": 0x26, + "heploc": 0x68, + "hognorsk": 0x27, + "hsistemo": 0x28, + "ijekavsk": 0x29, + "itihasa": 0x2a, + "ivanchov": 0x2b, + "jauer": 0x2c, + "jyutping": 0x2d, + "kkcor": 0x2e, + "kociewie": 0x2f, + "kscor": 0x30, + "laukika": 0x31, + "lemosin": 0x32, + "lengadoc": 0x33, + "lipaw": 0x63, + "ltg1929": 0x34, + "ltg2007": 0x35, + "luna1918": 0x36, + "metelko": 0x37, + "monoton": 0x38, + "ndyuka": 0x39, + "nedis": 0x3a, + "newfound": 0x3b, + "nicard": 0x3c, + "njiva": 0x64, + "nulik": 0x3d, + "osojs": 0x65, + "oxendict": 0x3e, + "pahawh2": 0x3f, + "pahawh3": 0x40, + "pahawh4": 0x41, + "pamaka": 0x42, + "peano": 0x43, + "petr1708": 0x44, + "pinyin": 0x45, + "polyton": 0x46, + "provenc": 0x47, + "puter": 0x48, + "rigik": 0x49, + "rozaj": 0x4a, + "rumgr": 0x4b, + "scotland": 0x4c, + "scouse": 0x4d, + "simple": 0x6f, + "solba": 0x66, + "sotav": 0x4e, + "spanglis": 0x4f, + "surmiran": 0x50, + "sursilv": 0x51, + "sutsilv": 0x52, + "synnejyl": 0x53, + "tarask": 0x54, + "tongyong": 0x55, + "tunumiit": 0x56, + "uccor": 0x57, + "ucrcor": 0x58, + "ulster": 0x59, + "unifon": 0x5a, + "vaidika": 0x5b, + "valencia": 0x5c, + "vallader": 0x5d, + "vecdruka": 0x5e, + "vivaraup": 0x5f, + "wadegile": 0x60, + "xsistemo": 0x61, +} + +// variantNumSpecialized is the number of specialized variants in variants. +const variantNumSpecialized = 105 + +// nRegionGroups is the number of region groups. +const nRegionGroups = 33 + +type likelyLangRegion struct { + lang uint16 + region uint16 +} + +// likelyScript is a lookup table, indexed by scriptID, for the most likely +// languages and regions given a script. +// Size: 1052 bytes, 263 elements +var likelyScript = [263]likelyLangRegion{ + 1: {lang: 0x14e, region: 0x85}, + 3: {lang: 0x2a2, region: 0x107}, + 4: {lang: 0x1f, region: 0x9a}, + 5: {lang: 0x3a, region: 0x6c}, + 7: {lang: 0x3b, region: 0x9d}, + 8: {lang: 0x1d7, region: 0x28}, + 9: {lang: 0x13, region: 0x9d}, + 10: {lang: 0x5b, region: 0x96}, + 11: {lang: 0x60, region: 0x52}, + 12: {lang: 0xb9, region: 0xb5}, + 13: {lang: 0x63, region: 0x96}, + 14: {lang: 0xa5, region: 0x35}, + 15: {lang: 0x3e9, region: 0x9a}, + 17: {lang: 0x529, region: 0x12f}, + 18: {lang: 0x3b1, region: 0x9a}, + 19: {lang: 0x15e, region: 0x79}, + 20: {lang: 0xc2, region: 0x96}, + 21: {lang: 0x9d, region: 0xe8}, + 22: {lang: 0xdb, region: 0x35}, + 23: {lang: 0xf3, region: 0x49}, + 24: {lang: 0x4f0, region: 0x12c}, + 25: {lang: 0xe7, region: 0x13f}, + 26: {lang: 0xe5, region: 0x136}, + 29: {lang: 0xf1, region: 0x6c}, + 31: {lang: 0x1a0, region: 0x5e}, + 32: {lang: 0x3e2, region: 0x107}, + 34: {lang: 0x1be, region: 0x9a}, + 38: {lang: 0x15e, region: 0x79}, + 41: {lang: 0x133, region: 0x6c}, + 42: {lang: 0x431, region: 0x27}, + 44: {lang: 0x27, region: 0x70}, + 46: {lang: 0x210, region: 0x7e}, + 47: {lang: 0xfe, region: 0x38}, + 49: {lang: 0x19b, region: 0x9a}, + 50: {lang: 0x19e, region: 0x131}, + 51: {lang: 0x3e9, region: 0x9a}, + 52: {lang: 0x136, region: 0x88}, + 53: {lang: 0x1a4, region: 0x9a}, + 54: {lang: 0x39d, region: 0x9a}, + 55: {lang: 0x529, region: 0x12f}, + 56: {lang: 0x254, region: 0xac}, + 57: {lang: 0x529, region: 0x53}, + 58: {lang: 0x1cb, region: 0xe8}, + 59: {lang: 0x529, region: 0x53}, + 60: {lang: 0x529, region: 0x12f}, + 61: {lang: 0x2fd, region: 0x9c}, + 62: {lang: 0x1bc, region: 0x98}, + 63: {lang: 0x200, region: 0xa3}, + 64: {lang: 0x1c5, region: 0x12c}, + 65: {lang: 0x1ca, region: 0xb0}, + 68: {lang: 0x1d5, region: 0x93}, + 70: {lang: 0x142, region: 0x9f}, + 71: {lang: 0x254, region: 0xac}, + 72: {lang: 0x20e, region: 0x96}, + 73: {lang: 0x200, region: 0xa3}, + 75: {lang: 0x135, region: 0xc5}, + 76: {lang: 0x200, region: 0xa3}, + 78: {lang: 0x3bb, region: 0xe9}, + 79: {lang: 0x24a, region: 0xa7}, + 80: {lang: 0x3fa, region: 0x9a}, + 83: {lang: 0x251, region: 0x9a}, + 84: {lang: 0x254, region: 0xac}, + 86: {lang: 0x88, region: 0x9a}, + 87: {lang: 0x370, region: 0x124}, + 88: {lang: 0x2b8, region: 0xb0}, + 93: {lang: 0x29f, region: 0x9a}, + 94: {lang: 0x2a8, region: 0x9a}, + 95: {lang: 0x28f, region: 0x88}, + 96: {lang: 0x1a0, region: 0x88}, + 97: {lang: 0x2ac, region: 0x53}, + 99: {lang: 0x4f4, region: 0x12c}, + 100: {lang: 0x4f5, region: 0x12c}, + 101: {lang: 0x1be, region: 0x9a}, + 103: {lang: 0x337, region: 0x9d}, + 104: {lang: 0x4f7, region: 0x53}, + 105: {lang: 0xa9, region: 0x53}, + 108: {lang: 0x2e8, region: 0x113}, + 109: {lang: 0x4f8, region: 0x10c}, + 110: {lang: 0x4f8, region: 0x10c}, + 111: {lang: 0x304, region: 0x9a}, + 112: {lang: 0x31b, region: 0x9a}, + 113: {lang: 0x30b, region: 0x53}, + 115: {lang: 0x31e, region: 0x35}, + 116: {lang: 0x30e, region: 0x9a}, + 117: {lang: 0x414, region: 0xe9}, + 118: {lang: 0x331, region: 0xc5}, + 121: {lang: 0x4f9, region: 0x109}, + 122: {lang: 0x3b, region: 0xa2}, + 123: {lang: 0x353, region: 0xdc}, + 126: {lang: 0x2d0, region: 0x85}, + 127: {lang: 0x52a, region: 0x53}, + 128: {lang: 0x403, region: 0x97}, + 129: {lang: 0x3ee, region: 0x9a}, + 130: {lang: 0x39b, region: 0xc6}, + 131: {lang: 0x395, region: 0x9a}, + 132: {lang: 0x399, region: 0x136}, + 133: {lang: 0x429, region: 0x116}, + 135: {lang: 0x3b, region: 0x11d}, + 136: {lang: 0xfd, region: 0xc5}, + 139: {lang: 0x27d, region: 0x107}, + 140: {lang: 0x2c9, region: 0x53}, + 141: {lang: 0x39f, region: 0x9d}, + 142: {lang: 0x39f, region: 0x53}, + 144: {lang: 0x3ad, region: 0xb1}, + 146: {lang: 0x1c6, region: 0x53}, + 147: {lang: 0x4fd, region: 0x9d}, + 200: {lang: 0x3cb, region: 0x96}, + 203: {lang: 0x372, region: 0x10d}, + 204: {lang: 0x420, region: 0x98}, + 206: {lang: 0x4ff, region: 0x15f}, + 207: {lang: 0x3f0, region: 0x9a}, + 208: {lang: 0x45, region: 0x136}, + 209: {lang: 0x139, region: 0x7c}, + 210: {lang: 0x3e9, region: 0x9a}, + 212: {lang: 0x3e9, region: 0x9a}, + 213: {lang: 0x3fa, region: 0x9a}, + 214: {lang: 0x40c, region: 0xb4}, + 217: {lang: 0x433, region: 0x9a}, + 218: {lang: 0xef, region: 0xc6}, + 219: {lang: 0x43e, region: 0x96}, + 221: {lang: 0x44d, region: 0x35}, + 222: {lang: 0x44e, region: 0x9c}, + 226: {lang: 0x45a, region: 0xe8}, + 227: {lang: 0x11a, region: 0x9a}, + 228: {lang: 0x45e, region: 0x53}, + 229: {lang: 0x232, region: 0x53}, + 230: {lang: 0x450, region: 0x9a}, + 231: {lang: 0x4a5, region: 0x53}, + 232: {lang: 0x9f, region: 0x13f}, + 233: {lang: 0x461, region: 0x9a}, + 235: {lang: 0x528, region: 0xbb}, + 236: {lang: 0x153, region: 0xe8}, + 237: {lang: 0x128, region: 0xce}, + 238: {lang: 0x46b, region: 0x124}, + 239: {lang: 0xa9, region: 0x53}, + 240: {lang: 0x2ce, region: 0x9a}, + 243: {lang: 0x4ad, region: 0x11d}, + 244: {lang: 0x4be, region: 0xb5}, + 247: {lang: 0x1ce, region: 0x9a}, + 250: {lang: 0x3a9, region: 0x9d}, + 251: {lang: 0x22, region: 0x9c}, + 253: {lang: 0x1ea, region: 0x53}, + 254: {lang: 0xef, region: 0xc6}, +} + +type likelyScriptRegion struct { + region uint16 + script uint16 + flags uint8 +} + +// likelyLang is a lookup table, indexed by langID, for the most likely +// scripts and regions given incomplete information. If more entries exist for a +// given language, region and script are the index and size respectively +// of the list in likelyLangList. +// Size: 7980 bytes, 1330 elements +var likelyLang = [1330]likelyScriptRegion{ + 0: {region: 0x136, script: 0x5b, flags: 0x0}, + 1: {region: 0x70, script: 0x5b, flags: 0x0}, + 2: {region: 0x166, script: 0x5b, flags: 0x0}, + 3: {region: 0x166, script: 0x5b, flags: 0x0}, + 4: {region: 0x166, script: 0x5b, flags: 0x0}, + 5: {region: 0x7e, script: 0x20, flags: 0x0}, + 6: {region: 0x166, script: 0x5b, flags: 0x0}, + 7: {region: 0x166, script: 0x20, flags: 0x0}, + 8: {region: 0x81, script: 0x5b, flags: 0x0}, + 9: {region: 0x166, script: 0x5b, flags: 0x0}, + 10: {region: 0x166, script: 0x5b, flags: 0x0}, + 11: {region: 0x166, script: 0x5b, flags: 0x0}, + 12: {region: 0x96, script: 0x5b, flags: 0x0}, + 13: {region: 0x132, script: 0x5b, flags: 0x0}, + 14: {region: 0x81, script: 0x5b, flags: 0x0}, + 15: {region: 0x166, script: 0x5b, flags: 0x0}, + 16: {region: 0x166, script: 0x5b, flags: 0x0}, + 17: {region: 0x107, script: 0x20, flags: 0x0}, + 18: {region: 0x166, script: 0x5b, flags: 0x0}, + 19: {region: 0x9d, script: 0x9, flags: 0x0}, + 20: {region: 0x129, script: 0x5, flags: 0x0}, + 21: {region: 0x166, script: 0x5b, flags: 0x0}, + 22: {region: 0x162, script: 0x5b, flags: 0x0}, + 23: {region: 0x166, script: 0x5b, flags: 0x0}, + 24: {region: 0x166, script: 0x5b, flags: 0x0}, + 25: {region: 0x166, script: 0x5b, flags: 0x0}, + 26: {region: 0x166, script: 0x5b, flags: 0x0}, + 27: {region: 0x166, script: 0x5b, flags: 0x0}, + 28: {region: 0x52, script: 0x5b, flags: 0x0}, + 29: {region: 0x166, script: 0x5b, flags: 0x0}, + 30: {region: 0x166, script: 0x5b, flags: 0x0}, + 31: {region: 0x9a, script: 0x4, flags: 0x0}, + 32: {region: 0x166, script: 0x5b, flags: 0x0}, + 33: {region: 0x81, script: 0x5b, flags: 0x0}, + 34: {region: 0x9c, script: 0xfb, flags: 0x0}, + 35: {region: 0x166, script: 0x5b, flags: 0x0}, + 36: {region: 0x166, script: 0x5b, flags: 0x0}, + 37: {region: 0x14e, script: 0x5b, flags: 0x0}, + 38: {region: 0x107, script: 0x20, flags: 0x0}, + 39: {region: 0x70, script: 0x2c, flags: 0x0}, + 40: {region: 0x166, script: 0x5b, flags: 0x0}, + 41: {region: 0x166, script: 0x5b, flags: 0x0}, + 42: {region: 0xd7, script: 0x5b, flags: 0x0}, + 43: {region: 0x166, script: 0x5b, flags: 0x0}, + 45: {region: 0x166, script: 0x5b, flags: 0x0}, + 46: {region: 0x166, script: 0x5b, flags: 0x0}, + 47: {region: 0x166, script: 0x5b, flags: 0x0}, + 48: {region: 0x166, script: 0x5b, flags: 0x0}, + 49: {region: 0x166, script: 0x5b, flags: 0x0}, + 50: {region: 0x166, script: 0x5b, flags: 0x0}, + 51: {region: 0x96, script: 0x5b, flags: 0x0}, + 52: {region: 0x166, script: 0x5, flags: 0x0}, + 53: {region: 0x123, script: 0x5, flags: 0x0}, + 54: {region: 0x166, script: 0x5b, flags: 0x0}, + 55: {region: 0x166, script: 0x5b, flags: 0x0}, + 56: {region: 0x166, script: 0x5b, flags: 0x0}, + 57: {region: 0x166, script: 0x5b, flags: 0x0}, + 58: {region: 0x6c, script: 0x5, flags: 0x0}, + 59: {region: 0x0, script: 0x3, flags: 0x1}, + 60: {region: 0x166, script: 0x5b, flags: 0x0}, + 61: {region: 0x51, script: 0x5b, flags: 0x0}, + 62: {region: 0x3f, script: 0x5b, flags: 0x0}, + 63: {region: 0x68, script: 0x5, flags: 0x0}, + 65: {region: 0xbb, script: 0x5, flags: 0x0}, + 66: {region: 0x6c, script: 0x5, flags: 0x0}, + 67: {region: 0x9a, script: 0xe, flags: 0x0}, + 68: {region: 0x130, script: 0x5b, flags: 0x0}, + 69: {region: 0x136, script: 0xd0, flags: 0x0}, + 70: {region: 0x166, script: 0x5b, flags: 0x0}, + 71: {region: 0x166, script: 0x5b, flags: 0x0}, + 72: {region: 0x6f, script: 0x5b, flags: 0x0}, + 73: {region: 0x166, script: 0x5b, flags: 0x0}, + 74: {region: 0x166, script: 0x5b, flags: 0x0}, + 75: {region: 0x49, script: 0x5b, flags: 0x0}, + 76: {region: 0x166, script: 0x5b, flags: 0x0}, + 77: {region: 0x107, script: 0x20, flags: 0x0}, + 78: {region: 0x166, script: 0x5, flags: 0x0}, + 79: {region: 0x166, script: 0x5b, flags: 0x0}, + 80: {region: 0x166, script: 0x5b, flags: 0x0}, + 81: {region: 0x166, script: 0x5b, flags: 0x0}, + 82: {region: 0x9a, script: 0x22, flags: 0x0}, + 83: {region: 0x166, script: 0x5b, flags: 0x0}, + 84: {region: 0x166, script: 0x5b, flags: 0x0}, + 85: {region: 0x166, script: 0x5b, flags: 0x0}, + 86: {region: 0x3f, script: 0x5b, flags: 0x0}, + 87: {region: 0x166, script: 0x5b, flags: 0x0}, + 88: {region: 0x3, script: 0x5, flags: 0x1}, + 89: {region: 0x107, script: 0x20, flags: 0x0}, + 90: {region: 0xe9, script: 0x5, flags: 0x0}, + 91: {region: 0x96, script: 0x5b, flags: 0x0}, + 92: {region: 0xdc, script: 0x22, flags: 0x0}, + 93: {region: 0x2e, script: 0x5b, flags: 0x0}, + 94: {region: 0x52, script: 0x5b, flags: 0x0}, + 95: {region: 0x166, script: 0x5b, flags: 0x0}, + 96: {region: 0x52, script: 0xb, flags: 0x0}, + 97: {region: 0x166, script: 0x5b, flags: 0x0}, + 98: {region: 0x166, script: 0x5b, flags: 0x0}, + 99: {region: 0x96, script: 0x5b, flags: 0x0}, + 100: {region: 0x166, script: 0x5b, flags: 0x0}, + 101: {region: 0x52, script: 0x5b, flags: 0x0}, + 102: {region: 0x166, script: 0x5b, flags: 0x0}, + 103: {region: 0x166, script: 0x5b, flags: 0x0}, + 104: {region: 0x166, script: 0x5b, flags: 0x0}, + 105: {region: 0x166, script: 0x5b, flags: 0x0}, + 106: {region: 0x4f, script: 0x5b, flags: 0x0}, + 107: {region: 0x166, script: 0x5b, flags: 0x0}, + 108: {region: 0x166, script: 0x5b, flags: 0x0}, + 109: {region: 0x166, script: 0x5b, flags: 0x0}, + 110: {region: 0x166, script: 0x2c, flags: 0x0}, + 111: {region: 0x166, script: 0x5b, flags: 0x0}, + 112: {region: 0x166, script: 0x5b, flags: 0x0}, + 113: {region: 0x47, script: 0x20, flags: 0x0}, + 114: {region: 0x166, script: 0x5b, flags: 0x0}, + 115: {region: 0x166, script: 0x5b, flags: 0x0}, + 116: {region: 0x10c, script: 0x5, flags: 0x0}, + 117: {region: 0x163, script: 0x5b, flags: 0x0}, + 118: {region: 0x166, script: 0x5b, flags: 0x0}, + 119: {region: 0x96, script: 0x5b, flags: 0x0}, + 120: {region: 0x166, script: 0x5b, flags: 0x0}, + 121: {region: 0x130, script: 0x5b, flags: 0x0}, + 122: {region: 0x52, script: 0x5b, flags: 0x0}, + 123: {region: 0x9a, script: 0xe6, flags: 0x0}, + 124: {region: 0xe9, script: 0x5, flags: 0x0}, + 125: {region: 0x9a, script: 0x22, flags: 0x0}, + 126: {region: 0x38, script: 0x20, flags: 0x0}, + 127: {region: 0x9a, script: 0x22, flags: 0x0}, + 128: {region: 0xe9, script: 0x5, flags: 0x0}, + 129: {region: 0x12c, script: 0x34, flags: 0x0}, + 131: {region: 0x9a, script: 0x22, flags: 0x0}, + 132: {region: 0x166, script: 0x5b, flags: 0x0}, + 133: {region: 0x9a, script: 0x22, flags: 0x0}, + 134: {region: 0xe8, script: 0x5b, flags: 0x0}, + 135: {region: 0x166, script: 0x5b, flags: 0x0}, + 136: {region: 0x9a, script: 0x22, flags: 0x0}, + 137: {region: 0x166, script: 0x5b, flags: 0x0}, + 138: {region: 0x140, script: 0x5b, flags: 0x0}, + 139: {region: 0x166, script: 0x5b, flags: 0x0}, + 140: {region: 0x166, script: 0x5b, flags: 0x0}, + 141: {region: 0xe8, script: 0x5b, flags: 0x0}, + 142: {region: 0x166, script: 0x5b, flags: 0x0}, + 143: {region: 0xd7, script: 0x5b, flags: 0x0}, + 144: {region: 0x166, script: 0x5b, flags: 0x0}, + 145: {region: 0x166, script: 0x5b, flags: 0x0}, + 146: {region: 0x166, script: 0x5b, flags: 0x0}, + 147: {region: 0x166, script: 0x2c, flags: 0x0}, + 148: {region: 0x9a, script: 0x22, flags: 0x0}, + 149: {region: 0x96, script: 0x5b, flags: 0x0}, + 150: {region: 0x166, script: 0x5b, flags: 0x0}, + 151: {region: 0x166, script: 0x5b, flags: 0x0}, + 152: {region: 0x115, script: 0x5b, flags: 0x0}, + 153: {region: 0x166, script: 0x5b, flags: 0x0}, + 154: {region: 0x166, script: 0x5b, flags: 0x0}, + 155: {region: 0x52, script: 0x5b, flags: 0x0}, + 156: {region: 0x166, script: 0x5b, flags: 0x0}, + 157: {region: 0xe8, script: 0x5b, flags: 0x0}, + 158: {region: 0x166, script: 0x5b, flags: 0x0}, + 159: {region: 0x13f, script: 0xe8, flags: 0x0}, + 160: {region: 0xc4, script: 0x5b, flags: 0x0}, + 161: {region: 0x166, script: 0x5b, flags: 0x0}, + 162: {region: 0x166, script: 0x5b, flags: 0x0}, + 163: {region: 0xc4, script: 0x5b, flags: 0x0}, + 164: {region: 0x166, script: 0x5b, flags: 0x0}, + 165: {region: 0x35, script: 0xe, flags: 0x0}, + 166: {region: 0x166, script: 0x5b, flags: 0x0}, + 167: {region: 0x166, script: 0x5b, flags: 0x0}, + 168: {region: 0x166, script: 0x5b, flags: 0x0}, + 169: {region: 0x53, script: 0xef, flags: 0x0}, + 170: {region: 0x166, script: 0x5b, flags: 0x0}, + 171: {region: 0x166, script: 0x5b, flags: 0x0}, + 172: {region: 0x166, script: 0x5b, flags: 0x0}, + 173: {region: 0x9a, script: 0xe, flags: 0x0}, + 174: {region: 0x166, script: 0x5b, flags: 0x0}, + 175: {region: 0x9d, script: 0x5, flags: 0x0}, + 176: {region: 0x166, script: 0x5b, flags: 0x0}, + 177: {region: 0x4f, script: 0x5b, flags: 0x0}, + 178: {region: 0x79, script: 0x5b, flags: 0x0}, + 179: {region: 0x9a, script: 0x22, flags: 0x0}, + 180: {region: 0xe9, script: 0x5, flags: 0x0}, + 181: {region: 0x9a, script: 0x22, flags: 0x0}, + 182: {region: 0x166, script: 0x5b, flags: 0x0}, + 183: {region: 0x33, script: 0x5b, flags: 0x0}, + 184: {region: 0x166, script: 0x5b, flags: 0x0}, + 185: {region: 0xb5, script: 0xc, flags: 0x0}, + 186: {region: 0x52, script: 0x5b, flags: 0x0}, + 187: {region: 0x166, script: 0x2c, flags: 0x0}, + 188: {region: 0xe8, script: 0x5b, flags: 0x0}, + 189: {region: 0x166, script: 0x5b, flags: 0x0}, + 190: {region: 0xe9, script: 0x22, flags: 0x0}, + 191: {region: 0x107, script: 0x20, flags: 0x0}, + 192: {region: 0x160, script: 0x5b, flags: 0x0}, + 193: {region: 0x166, script: 0x5b, flags: 0x0}, + 194: {region: 0x96, script: 0x5b, flags: 0x0}, + 195: {region: 0x166, script: 0x5b, flags: 0x0}, + 196: {region: 0x52, script: 0x5b, flags: 0x0}, + 197: {region: 0x166, script: 0x5b, flags: 0x0}, + 198: {region: 0x166, script: 0x5b, flags: 0x0}, + 199: {region: 0x166, script: 0x5b, flags: 0x0}, + 200: {region: 0x87, script: 0x5b, flags: 0x0}, + 201: {region: 0x166, script: 0x5b, flags: 0x0}, + 202: {region: 0x166, script: 0x5b, flags: 0x0}, + 203: {region: 0x166, script: 0x5b, flags: 0x0}, + 204: {region: 0x166, script: 0x5b, flags: 0x0}, + 205: {region: 0x6e, script: 0x2c, flags: 0x0}, + 206: {region: 0x166, script: 0x5b, flags: 0x0}, + 207: {region: 0x166, script: 0x5b, flags: 0x0}, + 208: {region: 0x52, script: 0x5b, flags: 0x0}, + 209: {region: 0x166, script: 0x5b, flags: 0x0}, + 210: {region: 0x166, script: 0x5b, flags: 0x0}, + 211: {region: 0xc4, script: 0x5b, flags: 0x0}, + 212: {region: 0x166, script: 0x5b, flags: 0x0}, + 213: {region: 0x166, script: 0x5b, flags: 0x0}, + 214: {region: 0x166, script: 0x5b, flags: 0x0}, + 215: {region: 0x6f, script: 0x5b, flags: 0x0}, + 216: {region: 0x166, script: 0x5b, flags: 0x0}, + 217: {region: 0x166, script: 0x5b, flags: 0x0}, + 218: {region: 0xd7, script: 0x5b, flags: 0x0}, + 219: {region: 0x35, script: 0x16, flags: 0x0}, + 220: {region: 0x107, script: 0x20, flags: 0x0}, + 221: {region: 0xe8, script: 0x5b, flags: 0x0}, + 222: {region: 0x166, script: 0x5b, flags: 0x0}, + 223: {region: 0x132, script: 0x5b, flags: 0x0}, + 224: {region: 0x8b, script: 0x5b, flags: 0x0}, + 225: {region: 0x76, script: 0x5b, flags: 0x0}, + 226: {region: 0x107, script: 0x20, flags: 0x0}, + 227: {region: 0x136, script: 0x5b, flags: 0x0}, + 228: {region: 0x49, script: 0x5b, flags: 0x0}, + 229: {region: 0x136, script: 0x1a, flags: 0x0}, + 230: {region: 0xa7, script: 0x5, flags: 0x0}, + 231: {region: 0x13f, script: 0x19, flags: 0x0}, + 232: {region: 0x166, script: 0x5b, flags: 0x0}, + 233: {region: 0x9c, script: 0x5, flags: 0x0}, + 234: {region: 0x166, script: 0x5b, flags: 0x0}, + 235: {region: 0x166, script: 0x5b, flags: 0x0}, + 236: {region: 0x166, script: 0x5b, flags: 0x0}, + 237: {region: 0x166, script: 0x5b, flags: 0x0}, + 238: {region: 0x166, script: 0x5b, flags: 0x0}, + 239: {region: 0xc6, script: 0xda, flags: 0x0}, + 240: {region: 0x79, script: 0x5b, flags: 0x0}, + 241: {region: 0x6c, script: 0x1d, flags: 0x0}, + 242: {region: 0xe8, script: 0x5b, flags: 0x0}, + 243: {region: 0x49, script: 0x17, flags: 0x0}, + 244: {region: 0x131, script: 0x20, flags: 0x0}, + 245: {region: 0x49, script: 0x17, flags: 0x0}, + 246: {region: 0x49, script: 0x17, flags: 0x0}, + 247: {region: 0x49, script: 0x17, flags: 0x0}, + 248: {region: 0x49, script: 0x17, flags: 0x0}, + 249: {region: 0x10b, script: 0x5b, flags: 0x0}, + 250: {region: 0x5f, script: 0x5b, flags: 0x0}, + 251: {region: 0xea, script: 0x5b, flags: 0x0}, + 252: {region: 0x49, script: 0x17, flags: 0x0}, + 253: {region: 0xc5, script: 0x88, flags: 0x0}, + 254: {region: 0x8, script: 0x2, flags: 0x1}, + 255: {region: 0x107, script: 0x20, flags: 0x0}, + 256: {region: 0x7c, script: 0x5b, flags: 0x0}, + 257: {region: 0x64, script: 0x5b, flags: 0x0}, + 258: {region: 0x166, script: 0x5b, flags: 0x0}, + 259: {region: 0x166, script: 0x5b, flags: 0x0}, + 260: {region: 0x166, script: 0x5b, flags: 0x0}, + 261: {region: 0x166, script: 0x5b, flags: 0x0}, + 262: {region: 0x136, script: 0x5b, flags: 0x0}, + 263: {region: 0x107, script: 0x20, flags: 0x0}, + 264: {region: 0xa5, script: 0x5b, flags: 0x0}, + 265: {region: 0x166, script: 0x5b, flags: 0x0}, + 266: {region: 0x166, script: 0x5b, flags: 0x0}, + 267: {region: 0x9a, script: 0x5, flags: 0x0}, + 268: {region: 0x166, script: 0x5b, flags: 0x0}, + 269: {region: 0x61, script: 0x5b, flags: 0x0}, + 270: {region: 0x166, script: 0x5b, flags: 0x0}, + 271: {region: 0x49, script: 0x5b, flags: 0x0}, + 272: {region: 0x166, script: 0x5b, flags: 0x0}, + 273: {region: 0x166, script: 0x5b, flags: 0x0}, + 274: {region: 0x166, script: 0x5b, flags: 0x0}, + 275: {region: 0x166, script: 0x5, flags: 0x0}, + 276: {region: 0x49, script: 0x5b, flags: 0x0}, + 277: {region: 0x166, script: 0x5b, flags: 0x0}, + 278: {region: 0x166, script: 0x5b, flags: 0x0}, + 279: {region: 0xd5, script: 0x5b, flags: 0x0}, + 280: {region: 0x4f, script: 0x5b, flags: 0x0}, + 281: {region: 0x166, script: 0x5b, flags: 0x0}, + 282: {region: 0x9a, script: 0x5, flags: 0x0}, + 283: {region: 0x166, script: 0x5b, flags: 0x0}, + 284: {region: 0x166, script: 0x5b, flags: 0x0}, + 285: {region: 0x166, script: 0x5b, flags: 0x0}, + 286: {region: 0x166, script: 0x2c, flags: 0x0}, + 287: {region: 0x61, script: 0x5b, flags: 0x0}, + 288: {region: 0xc4, script: 0x5b, flags: 0x0}, + 289: {region: 0xd1, script: 0x5b, flags: 0x0}, + 290: {region: 0x166, script: 0x5b, flags: 0x0}, + 291: {region: 0xdc, script: 0x22, flags: 0x0}, + 292: {region: 0x52, script: 0x5b, flags: 0x0}, + 293: {region: 0x166, script: 0x5b, flags: 0x0}, + 294: {region: 0x166, script: 0x5b, flags: 0x0}, + 295: {region: 0x166, script: 0x5b, flags: 0x0}, + 296: {region: 0xce, script: 0xed, flags: 0x0}, + 297: {region: 0x166, script: 0x5b, flags: 0x0}, + 298: {region: 0x166, script: 0x5b, flags: 0x0}, + 299: {region: 0x115, script: 0x5b, flags: 0x0}, + 300: {region: 0x37, script: 0x5b, flags: 0x0}, + 301: {region: 0x43, script: 0xef, flags: 0x0}, + 302: {region: 0x166, script: 0x5b, flags: 0x0}, + 303: {region: 0xa5, script: 0x5b, flags: 0x0}, + 304: {region: 0x81, script: 0x5b, flags: 0x0}, + 305: {region: 0xd7, script: 0x5b, flags: 0x0}, + 306: {region: 0x9f, script: 0x5b, flags: 0x0}, + 307: {region: 0x6c, script: 0x29, flags: 0x0}, + 308: {region: 0x166, script: 0x5b, flags: 0x0}, + 309: {region: 0xc5, script: 0x4b, flags: 0x0}, + 310: {region: 0x88, script: 0x34, flags: 0x0}, + 311: {region: 0x166, script: 0x5b, flags: 0x0}, + 312: {region: 0x166, script: 0x5b, flags: 0x0}, + 313: {region: 0xa, script: 0x2, flags: 0x1}, + 314: {region: 0x166, script: 0x5b, flags: 0x0}, + 315: {region: 0x166, script: 0x5b, flags: 0x0}, + 316: {region: 0x1, script: 0x5b, flags: 0x0}, + 317: {region: 0x166, script: 0x5b, flags: 0x0}, + 318: {region: 0x6f, script: 0x5b, flags: 0x0}, + 319: {region: 0x136, script: 0x5b, flags: 0x0}, + 320: {region: 0x6b, script: 0x5b, flags: 0x0}, + 321: {region: 0x166, script: 0x5b, flags: 0x0}, + 322: {region: 0x9f, script: 0x46, flags: 0x0}, + 323: {region: 0x166, script: 0x5b, flags: 0x0}, + 324: {region: 0x166, script: 0x5b, flags: 0x0}, + 325: {region: 0x6f, script: 0x5b, flags: 0x0}, + 326: {region: 0x52, script: 0x5b, flags: 0x0}, + 327: {region: 0x6f, script: 0x5b, flags: 0x0}, + 328: {region: 0x9d, script: 0x5, flags: 0x0}, + 329: {region: 0x166, script: 0x5b, flags: 0x0}, + 330: {region: 0x166, script: 0x5b, flags: 0x0}, + 331: {region: 0x166, script: 0x5b, flags: 0x0}, + 332: {region: 0x166, script: 0x5b, flags: 0x0}, + 333: {region: 0x87, script: 0x5b, flags: 0x0}, + 334: {region: 0xc, script: 0x2, flags: 0x1}, + 335: {region: 0x166, script: 0x5b, flags: 0x0}, + 336: {region: 0xc4, script: 0x5b, flags: 0x0}, + 337: {region: 0x73, script: 0x5b, flags: 0x0}, + 338: {region: 0x10c, script: 0x5, flags: 0x0}, + 339: {region: 0xe8, script: 0x5b, flags: 0x0}, + 340: {region: 0x10d, script: 0x5b, flags: 0x0}, + 341: {region: 0x74, script: 0x5b, flags: 0x0}, + 342: {region: 0x166, script: 0x5b, flags: 0x0}, + 343: {region: 0x166, script: 0x5b, flags: 0x0}, + 344: {region: 0x77, script: 0x5b, flags: 0x0}, + 345: {region: 0x166, script: 0x5b, flags: 0x0}, + 346: {region: 0x3b, script: 0x5b, flags: 0x0}, + 347: {region: 0x166, script: 0x5b, flags: 0x0}, + 348: {region: 0x166, script: 0x5b, flags: 0x0}, + 349: {region: 0x166, script: 0x5b, flags: 0x0}, + 350: {region: 0x79, script: 0x5b, flags: 0x0}, + 351: {region: 0x136, script: 0x5b, flags: 0x0}, + 352: {region: 0x79, script: 0x5b, flags: 0x0}, + 353: {region: 0x61, script: 0x5b, flags: 0x0}, + 354: {region: 0x61, script: 0x5b, flags: 0x0}, + 355: {region: 0x52, script: 0x5, flags: 0x0}, + 356: {region: 0x141, script: 0x5b, flags: 0x0}, + 357: {region: 0x166, script: 0x5b, flags: 0x0}, + 358: {region: 0x85, script: 0x5b, flags: 0x0}, + 359: {region: 0x166, script: 0x5b, flags: 0x0}, + 360: {region: 0xd5, script: 0x5b, flags: 0x0}, + 361: {region: 0x9f, script: 0x5b, flags: 0x0}, + 362: {region: 0xd7, script: 0x5b, flags: 0x0}, + 363: {region: 0x166, script: 0x5b, flags: 0x0}, + 364: {region: 0x10c, script: 0x5b, flags: 0x0}, + 365: {region: 0xda, script: 0x5b, flags: 0x0}, + 366: {region: 0x97, script: 0x5b, flags: 0x0}, + 367: {region: 0x81, script: 0x5b, flags: 0x0}, + 368: {region: 0x166, script: 0x5b, flags: 0x0}, + 369: {region: 0xbd, script: 0x5b, flags: 0x0}, + 370: {region: 0x166, script: 0x5b, flags: 0x0}, + 371: {region: 0x166, script: 0x5b, flags: 0x0}, + 372: {region: 0x166, script: 0x5b, flags: 0x0}, + 373: {region: 0x53, script: 0x3b, flags: 0x0}, + 374: {region: 0x166, script: 0x5b, flags: 0x0}, + 375: {region: 0x96, script: 0x5b, flags: 0x0}, + 376: {region: 0x166, script: 0x5b, flags: 0x0}, + 377: {region: 0x166, script: 0x5b, flags: 0x0}, + 378: {region: 0x9a, script: 0x22, flags: 0x0}, + 379: {region: 0x166, script: 0x5b, flags: 0x0}, + 380: {region: 0x9d, script: 0x5, flags: 0x0}, + 381: {region: 0x7f, script: 0x5b, flags: 0x0}, + 382: {region: 0x7c, script: 0x5b, flags: 0x0}, + 383: {region: 0x166, script: 0x5b, flags: 0x0}, + 384: {region: 0x166, script: 0x5b, flags: 0x0}, + 385: {region: 0x166, script: 0x5b, flags: 0x0}, + 386: {region: 0x166, script: 0x5b, flags: 0x0}, + 387: {region: 0x166, script: 0x5b, flags: 0x0}, + 388: {region: 0x166, script: 0x5b, flags: 0x0}, + 389: {region: 0x70, script: 0x2c, flags: 0x0}, + 390: {region: 0x166, script: 0x5b, flags: 0x0}, + 391: {region: 0xdc, script: 0x22, flags: 0x0}, + 392: {region: 0x166, script: 0x5b, flags: 0x0}, + 393: {region: 0xa8, script: 0x5b, flags: 0x0}, + 394: {region: 0x166, script: 0x5b, flags: 0x0}, + 395: {region: 0xe9, script: 0x5, flags: 0x0}, + 396: {region: 0x166, script: 0x5b, flags: 0x0}, + 397: {region: 0xe9, script: 0x5, flags: 0x0}, + 398: {region: 0x166, script: 0x5b, flags: 0x0}, + 399: {region: 0x166, script: 0x5b, flags: 0x0}, + 400: {region: 0x6f, script: 0x5b, flags: 0x0}, + 401: {region: 0x9d, script: 0x5, flags: 0x0}, + 402: {region: 0x166, script: 0x5b, flags: 0x0}, + 403: {region: 0x166, script: 0x2c, flags: 0x0}, + 404: {region: 0xf2, script: 0x5b, flags: 0x0}, + 405: {region: 0x166, script: 0x5b, flags: 0x0}, + 406: {region: 0x166, script: 0x5b, flags: 0x0}, + 407: {region: 0x166, script: 0x5b, flags: 0x0}, + 408: {region: 0x166, script: 0x2c, flags: 0x0}, + 409: {region: 0x166, script: 0x5b, flags: 0x0}, + 410: {region: 0x9a, script: 0x22, flags: 0x0}, + 411: {region: 0x9a, script: 0xe9, flags: 0x0}, + 412: {region: 0x96, script: 0x5b, flags: 0x0}, + 413: {region: 0xda, script: 0x5b, flags: 0x0}, + 414: {region: 0x131, script: 0x32, flags: 0x0}, + 415: {region: 0x166, script: 0x5b, flags: 0x0}, + 416: {region: 0xe, script: 0x2, flags: 0x1}, + 417: {region: 0x9a, script: 0xe, flags: 0x0}, + 418: {region: 0x166, script: 0x5b, flags: 0x0}, + 419: {region: 0x4e, script: 0x5b, flags: 0x0}, + 420: {region: 0x9a, script: 0x35, flags: 0x0}, + 421: {region: 0x41, script: 0x5b, flags: 0x0}, + 422: {region: 0x54, script: 0x5b, flags: 0x0}, + 423: {region: 0x166, script: 0x5b, flags: 0x0}, + 424: {region: 0x81, script: 0x5b, flags: 0x0}, + 425: {region: 0x166, script: 0x5b, flags: 0x0}, + 426: {region: 0x166, script: 0x5b, flags: 0x0}, + 427: {region: 0xa5, script: 0x5b, flags: 0x0}, + 428: {region: 0x99, script: 0x5b, flags: 0x0}, + 429: {region: 0x166, script: 0x5b, flags: 0x0}, + 430: {region: 0xdc, script: 0x22, flags: 0x0}, + 431: {region: 0x166, script: 0x5b, flags: 0x0}, + 432: {region: 0x166, script: 0x5, flags: 0x0}, + 433: {region: 0x49, script: 0x5b, flags: 0x0}, + 434: {region: 0x166, script: 0x5, flags: 0x0}, + 435: {region: 0x166, script: 0x5b, flags: 0x0}, + 436: {region: 0x10, script: 0x3, flags: 0x1}, + 437: {region: 0x166, script: 0x5b, flags: 0x0}, + 438: {region: 0x53, script: 0x3b, flags: 0x0}, + 439: {region: 0x166, script: 0x5b, flags: 0x0}, + 440: {region: 0x136, script: 0x5b, flags: 0x0}, + 441: {region: 0x24, script: 0x5, flags: 0x0}, + 442: {region: 0x166, script: 0x5b, flags: 0x0}, + 443: {region: 0x166, script: 0x2c, flags: 0x0}, + 444: {region: 0x98, script: 0x3e, flags: 0x0}, + 445: {region: 0x166, script: 0x5b, flags: 0x0}, + 446: {region: 0x9a, script: 0x22, flags: 0x0}, + 447: {region: 0x166, script: 0x5b, flags: 0x0}, + 448: {region: 0x74, script: 0x5b, flags: 0x0}, + 449: {region: 0x166, script: 0x5b, flags: 0x0}, + 450: {region: 0x166, script: 0x5b, flags: 0x0}, + 451: {region: 0xe8, script: 0x5b, flags: 0x0}, + 452: {region: 0x166, script: 0x5b, flags: 0x0}, + 453: {region: 0x12c, script: 0x40, flags: 0x0}, + 454: {region: 0x53, script: 0x92, flags: 0x0}, + 455: {region: 0x166, script: 0x5b, flags: 0x0}, + 456: {region: 0xe9, script: 0x5, flags: 0x0}, + 457: {region: 0x9a, script: 0x22, flags: 0x0}, + 458: {region: 0xb0, script: 0x41, flags: 0x0}, + 459: {region: 0xe8, script: 0x5b, flags: 0x0}, + 460: {region: 0xe9, script: 0x5, flags: 0x0}, + 461: {region: 0xe7, script: 0x5b, flags: 0x0}, + 462: {region: 0x9a, script: 0x22, flags: 0x0}, + 463: {region: 0x9a, script: 0x22, flags: 0x0}, + 464: {region: 0x166, script: 0x5b, flags: 0x0}, + 465: {region: 0x91, script: 0x5b, flags: 0x0}, + 466: {region: 0x61, script: 0x5b, flags: 0x0}, + 467: {region: 0x53, script: 0x3b, flags: 0x0}, + 468: {region: 0x92, script: 0x5b, flags: 0x0}, + 469: {region: 0x93, script: 0x5b, flags: 0x0}, + 470: {region: 0x166, script: 0x5b, flags: 0x0}, + 471: {region: 0x28, script: 0x8, flags: 0x0}, + 472: {region: 0xd3, script: 0x5b, flags: 0x0}, + 473: {region: 0x79, script: 0x5b, flags: 0x0}, + 474: {region: 0x166, script: 0x5b, flags: 0x0}, + 475: {region: 0x166, script: 0x5b, flags: 0x0}, + 476: {region: 0xd1, script: 0x5b, flags: 0x0}, + 477: {region: 0xd7, script: 0x5b, flags: 0x0}, + 478: {region: 0x166, script: 0x5b, flags: 0x0}, + 479: {region: 0x166, script: 0x5b, flags: 0x0}, + 480: {region: 0x166, script: 0x5b, flags: 0x0}, + 481: {region: 0x96, script: 0x5b, flags: 0x0}, + 482: {region: 0x166, script: 0x5b, flags: 0x0}, + 483: {region: 0x166, script: 0x5b, flags: 0x0}, + 484: {region: 0x166, script: 0x5b, flags: 0x0}, + 486: {region: 0x123, script: 0x5b, flags: 0x0}, + 487: {region: 0xd7, script: 0x5b, flags: 0x0}, + 488: {region: 0x166, script: 0x5b, flags: 0x0}, + 489: {region: 0x166, script: 0x5b, flags: 0x0}, + 490: {region: 0x53, script: 0xfd, flags: 0x0}, + 491: {region: 0x166, script: 0x5b, flags: 0x0}, + 492: {region: 0x136, script: 0x5b, flags: 0x0}, + 493: {region: 0x166, script: 0x5b, flags: 0x0}, + 494: {region: 0x49, script: 0x5b, flags: 0x0}, + 495: {region: 0x166, script: 0x5b, flags: 0x0}, + 496: {region: 0x166, script: 0x5b, flags: 0x0}, + 497: {region: 0xe8, script: 0x5b, flags: 0x0}, + 498: {region: 0x166, script: 0x5b, flags: 0x0}, + 499: {region: 0x96, script: 0x5b, flags: 0x0}, + 500: {region: 0x107, script: 0x20, flags: 0x0}, + 501: {region: 0x1, script: 0x5b, flags: 0x0}, + 502: {region: 0x166, script: 0x5b, flags: 0x0}, + 503: {region: 0x166, script: 0x5b, flags: 0x0}, + 504: {region: 0x9e, script: 0x5b, flags: 0x0}, + 505: {region: 0x9f, script: 0x5b, flags: 0x0}, + 506: {region: 0x49, script: 0x17, flags: 0x0}, + 507: {region: 0x98, script: 0x3e, flags: 0x0}, + 508: {region: 0x166, script: 0x5b, flags: 0x0}, + 509: {region: 0x166, script: 0x5b, flags: 0x0}, + 510: {region: 0x107, script: 0x5b, flags: 0x0}, + 511: {region: 0x166, script: 0x5b, flags: 0x0}, + 512: {region: 0xa3, script: 0x49, flags: 0x0}, + 513: {region: 0x166, script: 0x5b, flags: 0x0}, + 514: {region: 0xa1, script: 0x5b, flags: 0x0}, + 515: {region: 0x1, script: 0x5b, flags: 0x0}, + 516: {region: 0x166, script: 0x5b, flags: 0x0}, + 517: {region: 0x166, script: 0x5b, flags: 0x0}, + 518: {region: 0x166, script: 0x5b, flags: 0x0}, + 519: {region: 0x52, script: 0x5b, flags: 0x0}, + 520: {region: 0x131, script: 0x3e, flags: 0x0}, + 521: {region: 0x166, script: 0x5b, flags: 0x0}, + 522: {region: 0x130, script: 0x5b, flags: 0x0}, + 523: {region: 0xdc, script: 0x22, flags: 0x0}, + 524: {region: 0x166, script: 0x5b, flags: 0x0}, + 525: {region: 0x64, script: 0x5b, flags: 0x0}, + 526: {region: 0x96, script: 0x5b, flags: 0x0}, + 527: {region: 0x96, script: 0x5b, flags: 0x0}, + 528: {region: 0x7e, script: 0x2e, flags: 0x0}, + 529: {region: 0x138, script: 0x20, flags: 0x0}, + 530: {region: 0x68, script: 0x5b, flags: 0x0}, + 531: {region: 0xc5, script: 0x5b, flags: 0x0}, + 532: {region: 0x166, script: 0x5b, flags: 0x0}, + 533: {region: 0x166, script: 0x5b, flags: 0x0}, + 534: {region: 0xd7, script: 0x5b, flags: 0x0}, + 535: {region: 0xa5, script: 0x5b, flags: 0x0}, + 536: {region: 0xc4, script: 0x5b, flags: 0x0}, + 537: {region: 0x107, script: 0x20, flags: 0x0}, + 538: {region: 0x166, script: 0x5b, flags: 0x0}, + 539: {region: 0x166, script: 0x5b, flags: 0x0}, + 540: {region: 0x166, script: 0x5b, flags: 0x0}, + 541: {region: 0x166, script: 0x5b, flags: 0x0}, + 542: {region: 0xd5, script: 0x5, flags: 0x0}, + 543: {region: 0xd7, script: 0x5b, flags: 0x0}, + 544: {region: 0x165, script: 0x5b, flags: 0x0}, + 545: {region: 0x166, script: 0x5b, flags: 0x0}, + 546: {region: 0x166, script: 0x5b, flags: 0x0}, + 547: {region: 0x130, script: 0x5b, flags: 0x0}, + 548: {region: 0x123, script: 0x5, flags: 0x0}, + 549: {region: 0x166, script: 0x5b, flags: 0x0}, + 550: {region: 0x124, script: 0xee, flags: 0x0}, + 551: {region: 0x5b, script: 0x5b, flags: 0x0}, + 552: {region: 0x52, script: 0x5b, flags: 0x0}, + 553: {region: 0x166, script: 0x5b, flags: 0x0}, + 554: {region: 0x4f, script: 0x5b, flags: 0x0}, + 555: {region: 0x9a, script: 0x22, flags: 0x0}, + 556: {region: 0x9a, script: 0x22, flags: 0x0}, + 557: {region: 0x4b, script: 0x5b, flags: 0x0}, + 558: {region: 0x96, script: 0x5b, flags: 0x0}, + 559: {region: 0x166, script: 0x5b, flags: 0x0}, + 560: {region: 0x41, script: 0x5b, flags: 0x0}, + 561: {region: 0x9a, script: 0x5b, flags: 0x0}, + 562: {region: 0x53, script: 0xe5, flags: 0x0}, + 563: {region: 0x9a, script: 0x22, flags: 0x0}, + 564: {region: 0xc4, script: 0x5b, flags: 0x0}, + 565: {region: 0x166, script: 0x5b, flags: 0x0}, + 566: {region: 0x9a, script: 0x76, flags: 0x0}, + 567: {region: 0xe9, script: 0x5, flags: 0x0}, + 568: {region: 0x166, script: 0x5b, flags: 0x0}, + 569: {region: 0xa5, script: 0x5b, flags: 0x0}, + 570: {region: 0x166, script: 0x5b, flags: 0x0}, + 571: {region: 0x12c, script: 0x5b, flags: 0x0}, + 572: {region: 0x166, script: 0x5b, flags: 0x0}, + 573: {region: 0xd3, script: 0x5b, flags: 0x0}, + 574: {region: 0x166, script: 0x5b, flags: 0x0}, + 575: {region: 0xb0, script: 0x58, flags: 0x0}, + 576: {region: 0x166, script: 0x5b, flags: 0x0}, + 577: {region: 0x166, script: 0x5b, flags: 0x0}, + 578: {region: 0x13, script: 0x6, flags: 0x1}, + 579: {region: 0x166, script: 0x5b, flags: 0x0}, + 580: {region: 0x52, script: 0x5b, flags: 0x0}, + 581: {region: 0x83, script: 0x5b, flags: 0x0}, + 582: {region: 0xa5, script: 0x5b, flags: 0x0}, + 583: {region: 0x166, script: 0x5b, flags: 0x0}, + 584: {region: 0x166, script: 0x5b, flags: 0x0}, + 585: {region: 0x166, script: 0x5b, flags: 0x0}, + 586: {region: 0xa7, script: 0x4f, flags: 0x0}, + 587: {region: 0x2a, script: 0x5b, flags: 0x0}, + 588: {region: 0x166, script: 0x5b, flags: 0x0}, + 589: {region: 0x166, script: 0x5b, flags: 0x0}, + 590: {region: 0x166, script: 0x5b, flags: 0x0}, + 591: {region: 0x166, script: 0x5b, flags: 0x0}, + 592: {region: 0x166, script: 0x5b, flags: 0x0}, + 593: {region: 0x9a, script: 0x53, flags: 0x0}, + 594: {region: 0x8c, script: 0x5b, flags: 0x0}, + 595: {region: 0x166, script: 0x5b, flags: 0x0}, + 596: {region: 0xac, script: 0x54, flags: 0x0}, + 597: {region: 0x107, script: 0x20, flags: 0x0}, + 598: {region: 0x9a, script: 0x22, flags: 0x0}, + 599: {region: 0x166, script: 0x5b, flags: 0x0}, + 600: {region: 0x76, script: 0x5b, flags: 0x0}, + 601: {region: 0x166, script: 0x5b, flags: 0x0}, + 602: {region: 0xb5, script: 0x5b, flags: 0x0}, + 603: {region: 0x166, script: 0x5b, flags: 0x0}, + 604: {region: 0x166, script: 0x5b, flags: 0x0}, + 605: {region: 0x166, script: 0x5b, flags: 0x0}, + 606: {region: 0x166, script: 0x5b, flags: 0x0}, + 607: {region: 0x166, script: 0x5b, flags: 0x0}, + 608: {region: 0x166, script: 0x5b, flags: 0x0}, + 609: {region: 0x166, script: 0x5b, flags: 0x0}, + 610: {region: 0x166, script: 0x2c, flags: 0x0}, + 611: {region: 0x166, script: 0x5b, flags: 0x0}, + 612: {region: 0x107, script: 0x20, flags: 0x0}, + 613: {region: 0x113, script: 0x5b, flags: 0x0}, + 614: {region: 0xe8, script: 0x5b, flags: 0x0}, + 615: {region: 0x107, script: 0x5b, flags: 0x0}, + 616: {region: 0x166, script: 0x5b, flags: 0x0}, + 617: {region: 0x9a, script: 0x22, flags: 0x0}, + 618: {region: 0x9a, script: 0x5, flags: 0x0}, + 619: {region: 0x130, script: 0x5b, flags: 0x0}, + 620: {region: 0x166, script: 0x5b, flags: 0x0}, + 621: {region: 0x52, script: 0x5b, flags: 0x0}, + 622: {region: 0x61, script: 0x5b, flags: 0x0}, + 623: {region: 0x166, script: 0x5b, flags: 0x0}, + 624: {region: 0x166, script: 0x5b, flags: 0x0}, + 625: {region: 0x166, script: 0x2c, flags: 0x0}, + 626: {region: 0x166, script: 0x5b, flags: 0x0}, + 627: {region: 0x166, script: 0x5b, flags: 0x0}, + 628: {region: 0x19, script: 0x3, flags: 0x1}, + 629: {region: 0x166, script: 0x5b, flags: 0x0}, + 630: {region: 0x166, script: 0x5b, flags: 0x0}, + 631: {region: 0x166, script: 0x5b, flags: 0x0}, + 632: {region: 0x166, script: 0x5b, flags: 0x0}, + 633: {region: 0x107, script: 0x20, flags: 0x0}, + 634: {region: 0x166, script: 0x5b, flags: 0x0}, + 635: {region: 0x166, script: 0x5b, flags: 0x0}, + 636: {region: 0x166, script: 0x5b, flags: 0x0}, + 637: {region: 0x107, script: 0x20, flags: 0x0}, + 638: {region: 0x166, script: 0x5b, flags: 0x0}, + 639: {region: 0x96, script: 0x5b, flags: 0x0}, + 640: {region: 0xe9, script: 0x5, flags: 0x0}, + 641: {region: 0x7c, script: 0x5b, flags: 0x0}, + 642: {region: 0x166, script: 0x5b, flags: 0x0}, + 643: {region: 0x166, script: 0x5b, flags: 0x0}, + 644: {region: 0x166, script: 0x5b, flags: 0x0}, + 645: {region: 0x166, script: 0x2c, flags: 0x0}, + 646: {region: 0x124, script: 0xee, flags: 0x0}, + 647: {region: 0xe9, script: 0x5, flags: 0x0}, + 648: {region: 0x166, script: 0x5b, flags: 0x0}, + 649: {region: 0x166, script: 0x5b, flags: 0x0}, + 650: {region: 0x1c, script: 0x5, flags: 0x1}, + 651: {region: 0x166, script: 0x5b, flags: 0x0}, + 652: {region: 0x166, script: 0x5b, flags: 0x0}, + 653: {region: 0x166, script: 0x5b, flags: 0x0}, + 654: {region: 0x139, script: 0x5b, flags: 0x0}, + 655: {region: 0x88, script: 0x5f, flags: 0x0}, + 656: {region: 0x98, script: 0x3e, flags: 0x0}, + 657: {region: 0x130, script: 0x5b, flags: 0x0}, + 658: {region: 0xe9, script: 0x5, flags: 0x0}, + 659: {region: 0x132, script: 0x5b, flags: 0x0}, + 660: {region: 0x166, script: 0x5b, flags: 0x0}, + 661: {region: 0xb8, script: 0x5b, flags: 0x0}, + 662: {region: 0x107, script: 0x20, flags: 0x0}, + 663: {region: 0x166, script: 0x5b, flags: 0x0}, + 664: {region: 0x96, script: 0x5b, flags: 0x0}, + 665: {region: 0x166, script: 0x5b, flags: 0x0}, + 666: {region: 0x53, script: 0xee, flags: 0x0}, + 667: {region: 0x166, script: 0x5b, flags: 0x0}, + 668: {region: 0x166, script: 0x5b, flags: 0x0}, + 669: {region: 0x166, script: 0x5b, flags: 0x0}, + 670: {region: 0x166, script: 0x5b, flags: 0x0}, + 671: {region: 0x9a, script: 0x5d, flags: 0x0}, + 672: {region: 0x166, script: 0x5b, flags: 0x0}, + 673: {region: 0x166, script: 0x5b, flags: 0x0}, + 674: {region: 0x107, script: 0x20, flags: 0x0}, + 675: {region: 0x132, script: 0x5b, flags: 0x0}, + 676: {region: 0x166, script: 0x5b, flags: 0x0}, + 677: {region: 0xda, script: 0x5b, flags: 0x0}, + 678: {region: 0x166, script: 0x5b, flags: 0x0}, + 679: {region: 0x166, script: 0x5b, flags: 0x0}, + 680: {region: 0x21, script: 0x2, flags: 0x1}, + 681: {region: 0x166, script: 0x5b, flags: 0x0}, + 682: {region: 0x166, script: 0x5b, flags: 0x0}, + 683: {region: 0x9f, script: 0x5b, flags: 0x0}, + 684: {region: 0x53, script: 0x61, flags: 0x0}, + 685: {region: 0x96, script: 0x5b, flags: 0x0}, + 686: {region: 0x9d, script: 0x5, flags: 0x0}, + 687: {region: 0x136, script: 0x5b, flags: 0x0}, + 688: {region: 0x166, script: 0x5b, flags: 0x0}, + 689: {region: 0x166, script: 0x5b, flags: 0x0}, + 690: {region: 0x9a, script: 0xe9, flags: 0x0}, + 691: {region: 0x9f, script: 0x5b, flags: 0x0}, + 692: {region: 0x166, script: 0x5b, flags: 0x0}, + 693: {region: 0x4b, script: 0x5b, flags: 0x0}, + 694: {region: 0x166, script: 0x5b, flags: 0x0}, + 695: {region: 0x166, script: 0x5b, flags: 0x0}, + 696: {region: 0xb0, script: 0x58, flags: 0x0}, + 697: {region: 0x166, script: 0x5b, flags: 0x0}, + 698: {region: 0x166, script: 0x5b, flags: 0x0}, + 699: {region: 0x4b, script: 0x5b, flags: 0x0}, + 700: {region: 0x166, script: 0x5b, flags: 0x0}, + 701: {region: 0x166, script: 0x5b, flags: 0x0}, + 702: {region: 0x163, script: 0x5b, flags: 0x0}, + 703: {region: 0x9d, script: 0x5, flags: 0x0}, + 704: {region: 0xb7, script: 0x5b, flags: 0x0}, + 705: {region: 0xb9, script: 0x5b, flags: 0x0}, + 706: {region: 0x4b, script: 0x5b, flags: 0x0}, + 707: {region: 0x4b, script: 0x5b, flags: 0x0}, + 708: {region: 0xa5, script: 0x5b, flags: 0x0}, + 709: {region: 0xa5, script: 0x5b, flags: 0x0}, + 710: {region: 0x9d, script: 0x5, flags: 0x0}, + 711: {region: 0xb9, script: 0x5b, flags: 0x0}, + 712: {region: 0x124, script: 0xee, flags: 0x0}, + 713: {region: 0x53, script: 0x3b, flags: 0x0}, + 714: {region: 0x12c, script: 0x5b, flags: 0x0}, + 715: {region: 0x96, script: 0x5b, flags: 0x0}, + 716: {region: 0x52, script: 0x5b, flags: 0x0}, + 717: {region: 0x9a, script: 0x22, flags: 0x0}, + 718: {region: 0x9a, script: 0x22, flags: 0x0}, + 719: {region: 0x96, script: 0x5b, flags: 0x0}, + 720: {region: 0x23, script: 0x3, flags: 0x1}, + 721: {region: 0xa5, script: 0x5b, flags: 0x0}, + 722: {region: 0x166, script: 0x5b, flags: 0x0}, + 723: {region: 0xd0, script: 0x5b, flags: 0x0}, + 724: {region: 0x166, script: 0x5b, flags: 0x0}, + 725: {region: 0x166, script: 0x5b, flags: 0x0}, + 726: {region: 0x166, script: 0x5b, flags: 0x0}, + 727: {region: 0x166, script: 0x5b, flags: 0x0}, + 728: {region: 0x166, script: 0x5b, flags: 0x0}, + 729: {region: 0x166, script: 0x5b, flags: 0x0}, + 730: {region: 0x166, script: 0x5b, flags: 0x0}, + 731: {region: 0x166, script: 0x5b, flags: 0x0}, + 732: {region: 0x166, script: 0x5b, flags: 0x0}, + 733: {region: 0x166, script: 0x5b, flags: 0x0}, + 734: {region: 0x166, script: 0x5b, flags: 0x0}, + 735: {region: 0x166, script: 0x5, flags: 0x0}, + 736: {region: 0x107, script: 0x20, flags: 0x0}, + 737: {region: 0xe8, script: 0x5b, flags: 0x0}, + 738: {region: 0x166, script: 0x5b, flags: 0x0}, + 739: {region: 0x96, script: 0x5b, flags: 0x0}, + 740: {region: 0x166, script: 0x2c, flags: 0x0}, + 741: {region: 0x166, script: 0x5b, flags: 0x0}, + 742: {region: 0x166, script: 0x5b, flags: 0x0}, + 743: {region: 0x166, script: 0x5b, flags: 0x0}, + 744: {region: 0x113, script: 0x5b, flags: 0x0}, + 745: {region: 0xa5, script: 0x5b, flags: 0x0}, + 746: {region: 0x166, script: 0x5b, flags: 0x0}, + 747: {region: 0x166, script: 0x5b, flags: 0x0}, + 748: {region: 0x124, script: 0x5, flags: 0x0}, + 749: {region: 0xcd, script: 0x5b, flags: 0x0}, + 750: {region: 0x166, script: 0x5b, flags: 0x0}, + 751: {region: 0x166, script: 0x5b, flags: 0x0}, + 752: {region: 0x166, script: 0x5b, flags: 0x0}, + 753: {region: 0xc0, script: 0x5b, flags: 0x0}, + 754: {region: 0xd2, script: 0x5b, flags: 0x0}, + 755: {region: 0x166, script: 0x5b, flags: 0x0}, + 756: {region: 0x52, script: 0x5b, flags: 0x0}, + 757: {region: 0xdc, script: 0x22, flags: 0x0}, + 758: {region: 0x130, script: 0x5b, flags: 0x0}, + 759: {region: 0xc1, script: 0x5b, flags: 0x0}, + 760: {region: 0x166, script: 0x5b, flags: 0x0}, + 761: {region: 0x166, script: 0x5b, flags: 0x0}, + 762: {region: 0xe1, script: 0x5b, flags: 0x0}, + 763: {region: 0x166, script: 0x5b, flags: 0x0}, + 764: {region: 0x96, script: 0x5b, flags: 0x0}, + 765: {region: 0x9c, script: 0x3d, flags: 0x0}, + 766: {region: 0x166, script: 0x5b, flags: 0x0}, + 767: {region: 0xc3, script: 0x20, flags: 0x0}, + 768: {region: 0x166, script: 0x5, flags: 0x0}, + 769: {region: 0x166, script: 0x5b, flags: 0x0}, + 770: {region: 0x166, script: 0x5b, flags: 0x0}, + 771: {region: 0x166, script: 0x5b, flags: 0x0}, + 772: {region: 0x9a, script: 0x6f, flags: 0x0}, + 773: {region: 0x166, script: 0x5b, flags: 0x0}, + 774: {region: 0x166, script: 0x5b, flags: 0x0}, + 775: {region: 0x10c, script: 0x5b, flags: 0x0}, + 776: {region: 0x166, script: 0x5b, flags: 0x0}, + 777: {region: 0x166, script: 0x5b, flags: 0x0}, + 778: {region: 0x166, script: 0x5b, flags: 0x0}, + 779: {region: 0x26, script: 0x3, flags: 0x1}, + 780: {region: 0x166, script: 0x5b, flags: 0x0}, + 781: {region: 0x166, script: 0x5b, flags: 0x0}, + 782: {region: 0x9a, script: 0xe, flags: 0x0}, + 783: {region: 0xc5, script: 0x76, flags: 0x0}, + 785: {region: 0x166, script: 0x5b, flags: 0x0}, + 786: {region: 0x49, script: 0x5b, flags: 0x0}, + 787: {region: 0x49, script: 0x5b, flags: 0x0}, + 788: {region: 0x37, script: 0x5b, flags: 0x0}, + 789: {region: 0x166, script: 0x5b, flags: 0x0}, + 790: {region: 0x166, script: 0x5b, flags: 0x0}, + 791: {region: 0x166, script: 0x5b, flags: 0x0}, + 792: {region: 0x166, script: 0x5b, flags: 0x0}, + 793: {region: 0x166, script: 0x5b, flags: 0x0}, + 794: {region: 0x166, script: 0x5b, flags: 0x0}, + 795: {region: 0x9a, script: 0x22, flags: 0x0}, + 796: {region: 0xdc, script: 0x22, flags: 0x0}, + 797: {region: 0x107, script: 0x20, flags: 0x0}, + 798: {region: 0x35, script: 0x73, flags: 0x0}, + 799: {region: 0x29, script: 0x3, flags: 0x1}, + 800: {region: 0xcc, script: 0x5b, flags: 0x0}, + 801: {region: 0x166, script: 0x5b, flags: 0x0}, + 802: {region: 0x166, script: 0x5b, flags: 0x0}, + 803: {region: 0x166, script: 0x5b, flags: 0x0}, + 804: {region: 0x9a, script: 0x22, flags: 0x0}, + 805: {region: 0x52, script: 0x5b, flags: 0x0}, + 807: {region: 0x166, script: 0x5b, flags: 0x0}, + 808: {region: 0x136, script: 0x5b, flags: 0x0}, + 809: {region: 0x166, script: 0x5b, flags: 0x0}, + 810: {region: 0x166, script: 0x5b, flags: 0x0}, + 811: {region: 0xe9, script: 0x5, flags: 0x0}, + 812: {region: 0xc4, script: 0x5b, flags: 0x0}, + 813: {region: 0x9a, script: 0x22, flags: 0x0}, + 814: {region: 0x96, script: 0x5b, flags: 0x0}, + 815: {region: 0x165, script: 0x5b, flags: 0x0}, + 816: {region: 0x166, script: 0x5b, flags: 0x0}, + 817: {region: 0xc5, script: 0x76, flags: 0x0}, + 818: {region: 0x166, script: 0x5b, flags: 0x0}, + 819: {region: 0x166, script: 0x2c, flags: 0x0}, + 820: {region: 0x107, script: 0x20, flags: 0x0}, + 821: {region: 0x166, script: 0x5b, flags: 0x0}, + 822: {region: 0x132, script: 0x5b, flags: 0x0}, + 823: {region: 0x9d, script: 0x67, flags: 0x0}, + 824: {region: 0x166, script: 0x5b, flags: 0x0}, + 825: {region: 0x166, script: 0x5b, flags: 0x0}, + 826: {region: 0x9d, script: 0x5, flags: 0x0}, + 827: {region: 0x166, script: 0x5b, flags: 0x0}, + 828: {region: 0x166, script: 0x5b, flags: 0x0}, + 829: {region: 0x166, script: 0x5b, flags: 0x0}, + 830: {region: 0xde, script: 0x5b, flags: 0x0}, + 831: {region: 0x166, script: 0x5b, flags: 0x0}, + 832: {region: 0x166, script: 0x5b, flags: 0x0}, + 834: {region: 0x166, script: 0x5b, flags: 0x0}, + 835: {region: 0x53, script: 0x3b, flags: 0x0}, + 836: {region: 0x9f, script: 0x5b, flags: 0x0}, + 837: {region: 0xd3, script: 0x5b, flags: 0x0}, + 838: {region: 0x166, script: 0x5b, flags: 0x0}, + 839: {region: 0xdb, script: 0x5b, flags: 0x0}, + 840: {region: 0x166, script: 0x5b, flags: 0x0}, + 841: {region: 0x166, script: 0x5b, flags: 0x0}, + 842: {region: 0x166, script: 0x5b, flags: 0x0}, + 843: {region: 0xd0, script: 0x5b, flags: 0x0}, + 844: {region: 0x166, script: 0x5b, flags: 0x0}, + 845: {region: 0x166, script: 0x5b, flags: 0x0}, + 846: {region: 0x165, script: 0x5b, flags: 0x0}, + 847: {region: 0xd2, script: 0x5b, flags: 0x0}, + 848: {region: 0x61, script: 0x5b, flags: 0x0}, + 849: {region: 0xdc, script: 0x22, flags: 0x0}, + 850: {region: 0x166, script: 0x5b, flags: 0x0}, + 851: {region: 0xdc, script: 0x22, flags: 0x0}, + 852: {region: 0x166, script: 0x5b, flags: 0x0}, + 853: {region: 0x166, script: 0x5b, flags: 0x0}, + 854: {region: 0xd3, script: 0x5b, flags: 0x0}, + 855: {region: 0x166, script: 0x5b, flags: 0x0}, + 856: {region: 0x166, script: 0x5b, flags: 0x0}, + 857: {region: 0xd2, script: 0x5b, flags: 0x0}, + 858: {region: 0x166, script: 0x5b, flags: 0x0}, + 859: {region: 0xd0, script: 0x5b, flags: 0x0}, + 860: {region: 0xd0, script: 0x5b, flags: 0x0}, + 861: {region: 0x166, script: 0x5b, flags: 0x0}, + 862: {region: 0x166, script: 0x5b, flags: 0x0}, + 863: {region: 0x96, script: 0x5b, flags: 0x0}, + 864: {region: 0x166, script: 0x5b, flags: 0x0}, + 865: {region: 0xe0, script: 0x5b, flags: 0x0}, + 866: {region: 0x166, script: 0x5b, flags: 0x0}, + 867: {region: 0x166, script: 0x5b, flags: 0x0}, + 868: {region: 0x9a, script: 0x5b, flags: 0x0}, + 869: {region: 0x166, script: 0x5b, flags: 0x0}, + 870: {region: 0x166, script: 0x5b, flags: 0x0}, + 871: {region: 0xda, script: 0x5b, flags: 0x0}, + 872: {region: 0x52, script: 0x5b, flags: 0x0}, + 873: {region: 0x166, script: 0x5b, flags: 0x0}, + 874: {region: 0xdb, script: 0x5b, flags: 0x0}, + 875: {region: 0x166, script: 0x5b, flags: 0x0}, + 876: {region: 0x52, script: 0x5b, flags: 0x0}, + 877: {region: 0x166, script: 0x5b, flags: 0x0}, + 878: {region: 0x166, script: 0x5b, flags: 0x0}, + 879: {region: 0xdb, script: 0x5b, flags: 0x0}, + 880: {region: 0x124, script: 0x57, flags: 0x0}, + 881: {region: 0x9a, script: 0x22, flags: 0x0}, + 882: {region: 0x10d, script: 0xcb, flags: 0x0}, + 883: {region: 0x166, script: 0x5b, flags: 0x0}, + 884: {region: 0x166, script: 0x5b, flags: 0x0}, + 885: {region: 0x85, script: 0x7e, flags: 0x0}, + 886: {region: 0x162, script: 0x5b, flags: 0x0}, + 887: {region: 0x166, script: 0x5b, flags: 0x0}, + 888: {region: 0x49, script: 0x17, flags: 0x0}, + 889: {region: 0x166, script: 0x5b, flags: 0x0}, + 890: {region: 0x162, script: 0x5b, flags: 0x0}, + 891: {region: 0x166, script: 0x5b, flags: 0x0}, + 892: {region: 0x166, script: 0x5b, flags: 0x0}, + 893: {region: 0x166, script: 0x5b, flags: 0x0}, + 894: {region: 0x166, script: 0x5b, flags: 0x0}, + 895: {region: 0x166, script: 0x5b, flags: 0x0}, + 896: {region: 0x118, script: 0x5b, flags: 0x0}, + 897: {region: 0x166, script: 0x5b, flags: 0x0}, + 898: {region: 0x166, script: 0x5b, flags: 0x0}, + 899: {region: 0x136, script: 0x5b, flags: 0x0}, + 900: {region: 0x166, script: 0x5b, flags: 0x0}, + 901: {region: 0x53, script: 0x5b, flags: 0x0}, + 902: {region: 0x166, script: 0x5b, flags: 0x0}, + 903: {region: 0xcf, script: 0x5b, flags: 0x0}, + 904: {region: 0x130, script: 0x5b, flags: 0x0}, + 905: {region: 0x132, script: 0x5b, flags: 0x0}, + 906: {region: 0x81, script: 0x5b, flags: 0x0}, + 907: {region: 0x79, script: 0x5b, flags: 0x0}, + 908: {region: 0x166, script: 0x5b, flags: 0x0}, + 910: {region: 0x166, script: 0x5b, flags: 0x0}, + 911: {region: 0x166, script: 0x5b, flags: 0x0}, + 912: {region: 0x70, script: 0x5b, flags: 0x0}, + 913: {region: 0x166, script: 0x5b, flags: 0x0}, + 914: {region: 0x166, script: 0x5b, flags: 0x0}, + 915: {region: 0x166, script: 0x5b, flags: 0x0}, + 916: {region: 0x166, script: 0x5b, flags: 0x0}, + 917: {region: 0x9a, script: 0x83, flags: 0x0}, + 918: {region: 0x166, script: 0x5b, flags: 0x0}, + 919: {region: 0x166, script: 0x5, flags: 0x0}, + 920: {region: 0x7e, script: 0x20, flags: 0x0}, + 921: {region: 0x136, script: 0x84, flags: 0x0}, + 922: {region: 0x166, script: 0x5, flags: 0x0}, + 923: {region: 0xc6, script: 0x82, flags: 0x0}, + 924: {region: 0x166, script: 0x5b, flags: 0x0}, + 925: {region: 0x2c, script: 0x3, flags: 0x1}, + 926: {region: 0xe8, script: 0x5b, flags: 0x0}, + 927: {region: 0x2f, script: 0x2, flags: 0x1}, + 928: {region: 0xe8, script: 0x5b, flags: 0x0}, + 929: {region: 0x30, script: 0x5b, flags: 0x0}, + 930: {region: 0xf1, script: 0x5b, flags: 0x0}, + 931: {region: 0x166, script: 0x5b, flags: 0x0}, + 932: {region: 0x79, script: 0x5b, flags: 0x0}, + 933: {region: 0xd7, script: 0x5b, flags: 0x0}, + 934: {region: 0x136, script: 0x5b, flags: 0x0}, + 935: {region: 0x49, script: 0x5b, flags: 0x0}, + 936: {region: 0x166, script: 0x5b, flags: 0x0}, + 937: {region: 0x9d, script: 0xfa, flags: 0x0}, + 938: {region: 0x166, script: 0x5b, flags: 0x0}, + 939: {region: 0x61, script: 0x5b, flags: 0x0}, + 940: {region: 0x166, script: 0x5, flags: 0x0}, + 941: {region: 0xb1, script: 0x90, flags: 0x0}, + 943: {region: 0x166, script: 0x5b, flags: 0x0}, + 944: {region: 0x166, script: 0x5b, flags: 0x0}, + 945: {region: 0x9a, script: 0x12, flags: 0x0}, + 946: {region: 0xa5, script: 0x5b, flags: 0x0}, + 947: {region: 0xea, script: 0x5b, flags: 0x0}, + 948: {region: 0x166, script: 0x5b, flags: 0x0}, + 949: {region: 0x9f, script: 0x5b, flags: 0x0}, + 950: {region: 0x166, script: 0x5b, flags: 0x0}, + 951: {region: 0x166, script: 0x5b, flags: 0x0}, + 952: {region: 0x88, script: 0x34, flags: 0x0}, + 953: {region: 0x76, script: 0x5b, flags: 0x0}, + 954: {region: 0x166, script: 0x5b, flags: 0x0}, + 955: {region: 0xe9, script: 0x4e, flags: 0x0}, + 956: {region: 0x9d, script: 0x5, flags: 0x0}, + 957: {region: 0x1, script: 0x5b, flags: 0x0}, + 958: {region: 0x24, script: 0x5, flags: 0x0}, + 959: {region: 0x166, script: 0x5b, flags: 0x0}, + 960: {region: 0x41, script: 0x5b, flags: 0x0}, + 961: {region: 0x166, script: 0x5b, flags: 0x0}, + 962: {region: 0x7b, script: 0x5b, flags: 0x0}, + 963: {region: 0x166, script: 0x5b, flags: 0x0}, + 964: {region: 0xe5, script: 0x5b, flags: 0x0}, + 965: {region: 0x8a, script: 0x5b, flags: 0x0}, + 966: {region: 0x6a, script: 0x5b, flags: 0x0}, + 967: {region: 0x166, script: 0x5b, flags: 0x0}, + 968: {region: 0x9a, script: 0x22, flags: 0x0}, + 969: {region: 0x166, script: 0x5b, flags: 0x0}, + 970: {region: 0x103, script: 0x5b, flags: 0x0}, + 971: {region: 0x96, script: 0x5b, flags: 0x0}, + 972: {region: 0x166, script: 0x5b, flags: 0x0}, + 973: {region: 0x166, script: 0x5b, flags: 0x0}, + 974: {region: 0x9f, script: 0x5b, flags: 0x0}, + 975: {region: 0x166, script: 0x5, flags: 0x0}, + 976: {region: 0x9a, script: 0x5b, flags: 0x0}, + 977: {region: 0x31, script: 0x2, flags: 0x1}, + 978: {region: 0xdc, script: 0x22, flags: 0x0}, + 979: {region: 0x35, script: 0xe, flags: 0x0}, + 980: {region: 0x4e, script: 0x5b, flags: 0x0}, + 981: {region: 0x73, script: 0x5b, flags: 0x0}, + 982: {region: 0x4e, script: 0x5b, flags: 0x0}, + 983: {region: 0x9d, script: 0x5, flags: 0x0}, + 984: {region: 0x10d, script: 0x5b, flags: 0x0}, + 985: {region: 0x3a, script: 0x5b, flags: 0x0}, + 986: {region: 0x166, script: 0x5b, flags: 0x0}, + 987: {region: 0xd2, script: 0x5b, flags: 0x0}, + 988: {region: 0x105, script: 0x5b, flags: 0x0}, + 989: {region: 0x96, script: 0x5b, flags: 0x0}, + 990: {region: 0x130, script: 0x5b, flags: 0x0}, + 991: {region: 0x166, script: 0x5b, flags: 0x0}, + 992: {region: 0x166, script: 0x5b, flags: 0x0}, + 993: {region: 0x74, script: 0x5b, flags: 0x0}, + 994: {region: 0x107, script: 0x20, flags: 0x0}, + 995: {region: 0x131, script: 0x20, flags: 0x0}, + 996: {region: 0x10a, script: 0x5b, flags: 0x0}, + 997: {region: 0x108, script: 0x5b, flags: 0x0}, + 998: {region: 0x130, script: 0x5b, flags: 0x0}, + 999: {region: 0x166, script: 0x5b, flags: 0x0}, + 1000: {region: 0xa3, script: 0x4c, flags: 0x0}, + 1001: {region: 0x9a, script: 0x22, flags: 0x0}, + 1002: {region: 0x81, script: 0x5b, flags: 0x0}, + 1003: {region: 0x107, script: 0x20, flags: 0x0}, + 1004: {region: 0xa5, script: 0x5b, flags: 0x0}, + 1005: {region: 0x96, script: 0x5b, flags: 0x0}, + 1006: {region: 0x9a, script: 0x5b, flags: 0x0}, + 1007: {region: 0x115, script: 0x5b, flags: 0x0}, + 1008: {region: 0x9a, script: 0xcf, flags: 0x0}, + 1009: {region: 0x166, script: 0x5b, flags: 0x0}, + 1010: {region: 0x166, script: 0x5b, flags: 0x0}, + 1011: {region: 0x130, script: 0x5b, flags: 0x0}, + 1012: {region: 0x9f, script: 0x5b, flags: 0x0}, + 1013: {region: 0x9a, script: 0x22, flags: 0x0}, + 1014: {region: 0x166, script: 0x5, flags: 0x0}, + 1015: {region: 0x9f, script: 0x5b, flags: 0x0}, + 1016: {region: 0x7c, script: 0x5b, flags: 0x0}, + 1017: {region: 0x49, script: 0x5b, flags: 0x0}, + 1018: {region: 0x33, script: 0x4, flags: 0x1}, + 1019: {region: 0x9f, script: 0x5b, flags: 0x0}, + 1020: {region: 0x9d, script: 0x5, flags: 0x0}, + 1021: {region: 0xdb, script: 0x5b, flags: 0x0}, + 1022: {region: 0x4f, script: 0x5b, flags: 0x0}, + 1023: {region: 0xd2, script: 0x5b, flags: 0x0}, + 1024: {region: 0xd0, script: 0x5b, flags: 0x0}, + 1025: {region: 0xc4, script: 0x5b, flags: 0x0}, + 1026: {region: 0x4c, script: 0x5b, flags: 0x0}, + 1027: {region: 0x97, script: 0x80, flags: 0x0}, + 1028: {region: 0xb7, script: 0x5b, flags: 0x0}, + 1029: {region: 0x166, script: 0x2c, flags: 0x0}, + 1030: {region: 0x166, script: 0x5b, flags: 0x0}, + 1032: {region: 0xbb, script: 0xeb, flags: 0x0}, + 1033: {region: 0x166, script: 0x5b, flags: 0x0}, + 1034: {region: 0xc5, script: 0x76, flags: 0x0}, + 1035: {region: 0x166, script: 0x5, flags: 0x0}, + 1036: {region: 0xb4, script: 0xd6, flags: 0x0}, + 1037: {region: 0x70, script: 0x5b, flags: 0x0}, + 1038: {region: 0x166, script: 0x5b, flags: 0x0}, + 1039: {region: 0x166, script: 0x5b, flags: 0x0}, + 1040: {region: 0x166, script: 0x5b, flags: 0x0}, + 1041: {region: 0x166, script: 0x5b, flags: 0x0}, + 1042: {region: 0x112, script: 0x5b, flags: 0x0}, + 1043: {region: 0x166, script: 0x5b, flags: 0x0}, + 1044: {region: 0xe9, script: 0x5, flags: 0x0}, + 1045: {region: 0x166, script: 0x5b, flags: 0x0}, + 1046: {region: 0x110, script: 0x5b, flags: 0x0}, + 1047: {region: 0x166, script: 0x5b, flags: 0x0}, + 1048: {region: 0xea, script: 0x5b, flags: 0x0}, + 1049: {region: 0x166, script: 0x5b, flags: 0x0}, + 1050: {region: 0x96, script: 0x5b, flags: 0x0}, + 1051: {region: 0x143, script: 0x5b, flags: 0x0}, + 1052: {region: 0x10d, script: 0x5b, flags: 0x0}, + 1054: {region: 0x10d, script: 0x5b, flags: 0x0}, + 1055: {region: 0x73, script: 0x5b, flags: 0x0}, + 1056: {region: 0x98, script: 0xcc, flags: 0x0}, + 1057: {region: 0x166, script: 0x5b, flags: 0x0}, + 1058: {region: 0x73, script: 0x5b, flags: 0x0}, + 1059: {region: 0x165, script: 0x5b, flags: 0x0}, + 1060: {region: 0x166, script: 0x5b, flags: 0x0}, + 1061: {region: 0xc4, script: 0x5b, flags: 0x0}, + 1062: {region: 0x166, script: 0x5b, flags: 0x0}, + 1063: {region: 0x166, script: 0x5b, flags: 0x0}, + 1064: {region: 0x166, script: 0x5b, flags: 0x0}, + 1065: {region: 0x116, script: 0x5b, flags: 0x0}, + 1066: {region: 0x166, script: 0x5b, flags: 0x0}, + 1067: {region: 0x166, script: 0x5b, flags: 0x0}, + 1068: {region: 0x124, script: 0xee, flags: 0x0}, + 1069: {region: 0x166, script: 0x5b, flags: 0x0}, + 1070: {region: 0x166, script: 0x5b, flags: 0x0}, + 1071: {region: 0x166, script: 0x5b, flags: 0x0}, + 1072: {region: 0x166, script: 0x5b, flags: 0x0}, + 1073: {region: 0x27, script: 0x5b, flags: 0x0}, + 1074: {region: 0x37, script: 0x5, flags: 0x1}, + 1075: {region: 0x9a, script: 0xd9, flags: 0x0}, + 1076: {region: 0x117, script: 0x5b, flags: 0x0}, + 1077: {region: 0x115, script: 0x5b, flags: 0x0}, + 1078: {region: 0x9a, script: 0x22, flags: 0x0}, + 1079: {region: 0x162, script: 0x5b, flags: 0x0}, + 1080: {region: 0x166, script: 0x5b, flags: 0x0}, + 1081: {region: 0x166, script: 0x5b, flags: 0x0}, + 1082: {region: 0x6e, script: 0x5b, flags: 0x0}, + 1083: {region: 0x162, script: 0x5b, flags: 0x0}, + 1084: {region: 0x166, script: 0x5b, flags: 0x0}, + 1085: {region: 0x61, script: 0x5b, flags: 0x0}, + 1086: {region: 0x96, script: 0x5b, flags: 0x0}, + 1087: {region: 0x166, script: 0x5b, flags: 0x0}, + 1088: {region: 0x166, script: 0x5b, flags: 0x0}, + 1089: {region: 0x130, script: 0x5b, flags: 0x0}, + 1090: {region: 0x166, script: 0x5b, flags: 0x0}, + 1091: {region: 0x85, script: 0x5b, flags: 0x0}, + 1092: {region: 0x10d, script: 0x5b, flags: 0x0}, + 1093: {region: 0x130, script: 0x5b, flags: 0x0}, + 1094: {region: 0x160, script: 0x5, flags: 0x0}, + 1095: {region: 0x4b, script: 0x5b, flags: 0x0}, + 1096: {region: 0x61, script: 0x5b, flags: 0x0}, + 1097: {region: 0x166, script: 0x5b, flags: 0x0}, + 1098: {region: 0x9a, script: 0x22, flags: 0x0}, + 1099: {region: 0x96, script: 0x5b, flags: 0x0}, + 1100: {region: 0x166, script: 0x5b, flags: 0x0}, + 1101: {region: 0x35, script: 0xe, flags: 0x0}, + 1102: {region: 0x9c, script: 0xde, flags: 0x0}, + 1103: {region: 0xea, script: 0x5b, flags: 0x0}, + 1104: {region: 0x9a, script: 0xe6, flags: 0x0}, + 1105: {region: 0xdc, script: 0x22, flags: 0x0}, + 1106: {region: 0x166, script: 0x5b, flags: 0x0}, + 1107: {region: 0x166, script: 0x5b, flags: 0x0}, + 1108: {region: 0x166, script: 0x5b, flags: 0x0}, + 1109: {region: 0x166, script: 0x5b, flags: 0x0}, + 1110: {region: 0x166, script: 0x5b, flags: 0x0}, + 1111: {region: 0x166, script: 0x5b, flags: 0x0}, + 1112: {region: 0x166, script: 0x5b, flags: 0x0}, + 1113: {region: 0x166, script: 0x5b, flags: 0x0}, + 1114: {region: 0xe8, script: 0x5b, flags: 0x0}, + 1115: {region: 0x166, script: 0x5b, flags: 0x0}, + 1116: {region: 0x166, script: 0x5b, flags: 0x0}, + 1117: {region: 0x9a, script: 0x53, flags: 0x0}, + 1118: {region: 0x53, script: 0xe4, flags: 0x0}, + 1119: {region: 0xdc, script: 0x22, flags: 0x0}, + 1120: {region: 0xdc, script: 0x22, flags: 0x0}, + 1121: {region: 0x9a, script: 0xe9, flags: 0x0}, + 1122: {region: 0x166, script: 0x5b, flags: 0x0}, + 1123: {region: 0x113, script: 0x5b, flags: 0x0}, + 1124: {region: 0x132, script: 0x5b, flags: 0x0}, + 1125: {region: 0x127, script: 0x5b, flags: 0x0}, + 1126: {region: 0x166, script: 0x5b, flags: 0x0}, + 1127: {region: 0x3c, script: 0x3, flags: 0x1}, + 1128: {region: 0x166, script: 0x5b, flags: 0x0}, + 1129: {region: 0x166, script: 0x5b, flags: 0x0}, + 1130: {region: 0x166, script: 0x5b, flags: 0x0}, + 1131: {region: 0x124, script: 0xee, flags: 0x0}, + 1132: {region: 0xdc, script: 0x22, flags: 0x0}, + 1133: {region: 0xdc, script: 0x22, flags: 0x0}, + 1134: {region: 0xdc, script: 0x22, flags: 0x0}, + 1135: {region: 0x70, script: 0x2c, flags: 0x0}, + 1136: {region: 0x166, script: 0x5b, flags: 0x0}, + 1137: {region: 0x6e, script: 0x2c, flags: 0x0}, + 1138: {region: 0x166, script: 0x5b, flags: 0x0}, + 1139: {region: 0x166, script: 0x5b, flags: 0x0}, + 1140: {region: 0x166, script: 0x5b, flags: 0x0}, + 1141: {region: 0xd7, script: 0x5b, flags: 0x0}, + 1142: {region: 0x128, script: 0x5b, flags: 0x0}, + 1143: {region: 0x126, script: 0x5b, flags: 0x0}, + 1144: {region: 0x32, script: 0x5b, flags: 0x0}, + 1145: {region: 0xdc, script: 0x22, flags: 0x0}, + 1146: {region: 0xe8, script: 0x5b, flags: 0x0}, + 1147: {region: 0x166, script: 0x5b, flags: 0x0}, + 1148: {region: 0x166, script: 0x5b, flags: 0x0}, + 1149: {region: 0x32, script: 0x5b, flags: 0x0}, + 1150: {region: 0xd5, script: 0x5b, flags: 0x0}, + 1151: {region: 0x166, script: 0x5b, flags: 0x0}, + 1152: {region: 0x162, script: 0x5b, flags: 0x0}, + 1153: {region: 0x166, script: 0x5b, flags: 0x0}, + 1154: {region: 0x12a, script: 0x5b, flags: 0x0}, + 1155: {region: 0x166, script: 0x5b, flags: 0x0}, + 1156: {region: 0xcf, script: 0x5b, flags: 0x0}, + 1157: {region: 0x166, script: 0x5b, flags: 0x0}, + 1158: {region: 0xe7, script: 0x5b, flags: 0x0}, + 1159: {region: 0x166, script: 0x5b, flags: 0x0}, + 1160: {region: 0x166, script: 0x5b, flags: 0x0}, + 1161: {region: 0x166, script: 0x5b, flags: 0x0}, + 1162: {region: 0x12c, script: 0x5b, flags: 0x0}, + 1163: {region: 0x12c, script: 0x5b, flags: 0x0}, + 1164: {region: 0x12f, script: 0x5b, flags: 0x0}, + 1165: {region: 0x166, script: 0x5, flags: 0x0}, + 1166: {region: 0x162, script: 0x5b, flags: 0x0}, + 1167: {region: 0x88, script: 0x34, flags: 0x0}, + 1168: {region: 0xdc, script: 0x22, flags: 0x0}, + 1169: {region: 0xe8, script: 0x5b, flags: 0x0}, + 1170: {region: 0x43, script: 0xef, flags: 0x0}, + 1171: {region: 0x166, script: 0x5b, flags: 0x0}, + 1172: {region: 0x107, script: 0x20, flags: 0x0}, + 1173: {region: 0x166, script: 0x5b, flags: 0x0}, + 1174: {region: 0x166, script: 0x5b, flags: 0x0}, + 1175: {region: 0x132, script: 0x5b, flags: 0x0}, + 1176: {region: 0x166, script: 0x5b, flags: 0x0}, + 1177: {region: 0x124, script: 0xee, flags: 0x0}, + 1178: {region: 0x32, script: 0x5b, flags: 0x0}, + 1179: {region: 0x166, script: 0x5b, flags: 0x0}, + 1180: {region: 0x166, script: 0x5b, flags: 0x0}, + 1181: {region: 0xcf, script: 0x5b, flags: 0x0}, + 1182: {region: 0x166, script: 0x5b, flags: 0x0}, + 1183: {region: 0x166, script: 0x5b, flags: 0x0}, + 1184: {region: 0x12e, script: 0x5b, flags: 0x0}, + 1185: {region: 0x166, script: 0x5b, flags: 0x0}, + 1187: {region: 0x166, script: 0x5b, flags: 0x0}, + 1188: {region: 0xd5, script: 0x5b, flags: 0x0}, + 1189: {region: 0x53, script: 0xe7, flags: 0x0}, + 1190: {region: 0xe6, script: 0x5b, flags: 0x0}, + 1191: {region: 0x166, script: 0x5b, flags: 0x0}, + 1192: {region: 0x107, script: 0x20, flags: 0x0}, + 1193: {region: 0xbb, script: 0x5b, flags: 0x0}, + 1194: {region: 0x166, script: 0x5b, flags: 0x0}, + 1195: {region: 0x107, script: 0x20, flags: 0x0}, + 1196: {region: 0x3f, script: 0x4, flags: 0x1}, + 1197: {region: 0x11d, script: 0xf3, flags: 0x0}, + 1198: {region: 0x131, script: 0x20, flags: 0x0}, + 1199: {region: 0x76, script: 0x5b, flags: 0x0}, + 1200: {region: 0x2a, script: 0x5b, flags: 0x0}, + 1202: {region: 0x43, script: 0x3, flags: 0x1}, + 1203: {region: 0x9a, script: 0xe, flags: 0x0}, + 1204: {region: 0xe9, script: 0x5, flags: 0x0}, + 1205: {region: 0x166, script: 0x5b, flags: 0x0}, + 1206: {region: 0x166, script: 0x5b, flags: 0x0}, + 1207: {region: 0x166, script: 0x5b, flags: 0x0}, + 1208: {region: 0x166, script: 0x5b, flags: 0x0}, + 1209: {region: 0x166, script: 0x5b, flags: 0x0}, + 1210: {region: 0x166, script: 0x5b, flags: 0x0}, + 1211: {region: 0x166, script: 0x5b, flags: 0x0}, + 1212: {region: 0x46, script: 0x4, flags: 0x1}, + 1213: {region: 0x166, script: 0x5b, flags: 0x0}, + 1214: {region: 0xb5, script: 0xf4, flags: 0x0}, + 1215: {region: 0x166, script: 0x5b, flags: 0x0}, + 1216: {region: 0x162, script: 0x5b, flags: 0x0}, + 1217: {region: 0x9f, script: 0x5b, flags: 0x0}, + 1218: {region: 0x107, script: 0x5b, flags: 0x0}, + 1219: {region: 0x13f, script: 0x5b, flags: 0x0}, + 1220: {region: 0x11c, script: 0x5b, flags: 0x0}, + 1221: {region: 0x166, script: 0x5b, flags: 0x0}, + 1222: {region: 0x36, script: 0x5b, flags: 0x0}, + 1223: {region: 0x61, script: 0x5b, flags: 0x0}, + 1224: {region: 0xd2, script: 0x5b, flags: 0x0}, + 1225: {region: 0x1, script: 0x5b, flags: 0x0}, + 1226: {region: 0x107, script: 0x5b, flags: 0x0}, + 1227: {region: 0x6b, script: 0x5b, flags: 0x0}, + 1228: {region: 0x130, script: 0x5b, flags: 0x0}, + 1229: {region: 0x166, script: 0x5b, flags: 0x0}, + 1230: {region: 0x36, script: 0x5b, flags: 0x0}, + 1231: {region: 0x4e, script: 0x5b, flags: 0x0}, + 1232: {region: 0x166, script: 0x5b, flags: 0x0}, + 1233: {region: 0x70, script: 0x2c, flags: 0x0}, + 1234: {region: 0x166, script: 0x5b, flags: 0x0}, + 1235: {region: 0xe8, script: 0x5b, flags: 0x0}, + 1236: {region: 0x2f, script: 0x5b, flags: 0x0}, + 1237: {region: 0x9a, script: 0xe9, flags: 0x0}, + 1238: {region: 0x9a, script: 0x22, flags: 0x0}, + 1239: {region: 0x166, script: 0x5b, flags: 0x0}, + 1240: {region: 0x166, script: 0x5b, flags: 0x0}, + 1241: {region: 0x166, script: 0x5b, flags: 0x0}, + 1242: {region: 0x166, script: 0x5b, flags: 0x0}, + 1243: {region: 0x166, script: 0x5b, flags: 0x0}, + 1244: {region: 0x166, script: 0x5b, flags: 0x0}, + 1245: {region: 0x166, script: 0x5b, flags: 0x0}, + 1246: {region: 0x166, script: 0x5b, flags: 0x0}, + 1247: {region: 0x166, script: 0x5b, flags: 0x0}, + 1248: {region: 0x141, script: 0x5b, flags: 0x0}, + 1249: {region: 0x166, script: 0x5b, flags: 0x0}, + 1250: {region: 0x166, script: 0x5b, flags: 0x0}, + 1251: {region: 0xa9, script: 0x5, flags: 0x0}, + 1252: {region: 0x166, script: 0x5b, flags: 0x0}, + 1253: {region: 0x115, script: 0x5b, flags: 0x0}, + 1254: {region: 0x166, script: 0x5b, flags: 0x0}, + 1255: {region: 0x166, script: 0x5b, flags: 0x0}, + 1256: {region: 0x166, script: 0x5b, flags: 0x0}, + 1257: {region: 0x166, script: 0x5b, flags: 0x0}, + 1258: {region: 0x9a, script: 0x22, flags: 0x0}, + 1259: {region: 0x53, script: 0x3b, flags: 0x0}, + 1260: {region: 0x166, script: 0x5b, flags: 0x0}, + 1261: {region: 0x166, script: 0x5b, flags: 0x0}, + 1262: {region: 0x41, script: 0x5b, flags: 0x0}, + 1263: {region: 0x166, script: 0x5b, flags: 0x0}, + 1264: {region: 0x12c, script: 0x18, flags: 0x0}, + 1265: {region: 0x166, script: 0x5b, flags: 0x0}, + 1266: {region: 0x162, script: 0x5b, flags: 0x0}, + 1267: {region: 0x166, script: 0x5b, flags: 0x0}, + 1268: {region: 0x12c, script: 0x63, flags: 0x0}, + 1269: {region: 0x12c, script: 0x64, flags: 0x0}, + 1270: {region: 0x7e, script: 0x2e, flags: 0x0}, + 1271: {region: 0x53, script: 0x68, flags: 0x0}, + 1272: {region: 0x10c, script: 0x6d, flags: 0x0}, + 1273: {region: 0x109, script: 0x79, flags: 0x0}, + 1274: {region: 0x9a, script: 0x22, flags: 0x0}, + 1275: {region: 0x132, script: 0x5b, flags: 0x0}, + 1276: {region: 0x166, script: 0x5b, flags: 0x0}, + 1277: {region: 0x9d, script: 0x93, flags: 0x0}, + 1278: {region: 0x166, script: 0x5b, flags: 0x0}, + 1279: {region: 0x15f, script: 0xce, flags: 0x0}, + 1280: {region: 0x166, script: 0x5b, flags: 0x0}, + 1281: {region: 0x166, script: 0x5b, flags: 0x0}, + 1282: {region: 0xdc, script: 0x22, flags: 0x0}, + 1283: {region: 0x166, script: 0x5b, flags: 0x0}, + 1284: {region: 0x166, script: 0x5b, flags: 0x0}, + 1285: {region: 0xd2, script: 0x5b, flags: 0x0}, + 1286: {region: 0x76, script: 0x5b, flags: 0x0}, + 1287: {region: 0x166, script: 0x5b, flags: 0x0}, + 1288: {region: 0x166, script: 0x5b, flags: 0x0}, + 1289: {region: 0x52, script: 0x5b, flags: 0x0}, + 1290: {region: 0x166, script: 0x5b, flags: 0x0}, + 1291: {region: 0x166, script: 0x5b, flags: 0x0}, + 1292: {region: 0x166, script: 0x5b, flags: 0x0}, + 1293: {region: 0x52, script: 0x5b, flags: 0x0}, + 1294: {region: 0x166, script: 0x5b, flags: 0x0}, + 1295: {region: 0x166, script: 0x5b, flags: 0x0}, + 1296: {region: 0x166, script: 0x5b, flags: 0x0}, + 1297: {region: 0x166, script: 0x5b, flags: 0x0}, + 1298: {region: 0x1, script: 0x3e, flags: 0x0}, + 1299: {region: 0x166, script: 0x5b, flags: 0x0}, + 1300: {region: 0x166, script: 0x5b, flags: 0x0}, + 1301: {region: 0x166, script: 0x5b, flags: 0x0}, + 1302: {region: 0x166, script: 0x5b, flags: 0x0}, + 1303: {region: 0x166, script: 0x5b, flags: 0x0}, + 1304: {region: 0xd7, script: 0x5b, flags: 0x0}, + 1305: {region: 0x166, script: 0x5b, flags: 0x0}, + 1306: {region: 0x166, script: 0x5b, flags: 0x0}, + 1307: {region: 0x166, script: 0x5b, flags: 0x0}, + 1308: {region: 0x41, script: 0x5b, flags: 0x0}, + 1309: {region: 0x166, script: 0x5b, flags: 0x0}, + 1310: {region: 0xd0, script: 0x5b, flags: 0x0}, + 1311: {region: 0x4a, script: 0x3, flags: 0x1}, + 1312: {region: 0x166, script: 0x5b, flags: 0x0}, + 1313: {region: 0x166, script: 0x5b, flags: 0x0}, + 1314: {region: 0x166, script: 0x5b, flags: 0x0}, + 1315: {region: 0x53, script: 0x5b, flags: 0x0}, + 1316: {region: 0x10c, script: 0x5b, flags: 0x0}, + 1318: {region: 0xa9, script: 0x5, flags: 0x0}, + 1319: {region: 0xda, script: 0x5b, flags: 0x0}, + 1320: {region: 0xbb, script: 0xeb, flags: 0x0}, + 1321: {region: 0x4d, script: 0x14, flags: 0x1}, + 1322: {region: 0x53, script: 0x7f, flags: 0x0}, + 1323: {region: 0x166, script: 0x5b, flags: 0x0}, + 1324: {region: 0x123, script: 0x5b, flags: 0x0}, + 1325: {region: 0xd1, script: 0x5b, flags: 0x0}, + 1326: {region: 0x166, script: 0x5b, flags: 0x0}, + 1327: {region: 0x162, script: 0x5b, flags: 0x0}, + 1329: {region: 0x12c, script: 0x5b, flags: 0x0}, +} + +// likelyLangList holds lists info associated with likelyLang. +// Size: 582 bytes, 97 elements +var likelyLangList = [97]likelyScriptRegion{ + 0: {region: 0x9d, script: 0x7, flags: 0x0}, + 1: {region: 0xa2, script: 0x7a, flags: 0x2}, + 2: {region: 0x11d, script: 0x87, flags: 0x2}, + 3: {region: 0x32, script: 0x5b, flags: 0x0}, + 4: {region: 0x9c, script: 0x5, flags: 0x4}, + 5: {region: 0x9d, script: 0x5, flags: 0x4}, + 6: {region: 0x107, script: 0x20, flags: 0x4}, + 7: {region: 0x9d, script: 0x5, flags: 0x2}, + 8: {region: 0x107, script: 0x20, flags: 0x0}, + 9: {region: 0x38, script: 0x2f, flags: 0x2}, + 10: {region: 0x136, script: 0x5b, flags: 0x0}, + 11: {region: 0x7c, script: 0xd1, flags: 0x2}, + 12: {region: 0x115, script: 0x5b, flags: 0x0}, + 13: {region: 0x85, script: 0x1, flags: 0x2}, + 14: {region: 0x5e, script: 0x1f, flags: 0x0}, + 15: {region: 0x88, script: 0x60, flags: 0x2}, + 16: {region: 0xd7, script: 0x5b, flags: 0x0}, + 17: {region: 0x52, script: 0x5, flags: 0x4}, + 18: {region: 0x10c, script: 0x5, flags: 0x4}, + 19: {region: 0xaf, script: 0x20, flags: 0x0}, + 20: {region: 0x24, script: 0x5, flags: 0x4}, + 21: {region: 0x53, script: 0x5, flags: 0x4}, + 22: {region: 0x9d, script: 0x5, flags: 0x4}, + 23: {region: 0xc6, script: 0x5, flags: 0x4}, + 24: {region: 0x53, script: 0x5, flags: 0x2}, + 25: {region: 0x12c, script: 0x5b, flags: 0x0}, + 26: {region: 0xb1, script: 0x5, flags: 0x4}, + 27: {region: 0x9c, script: 0x5, flags: 0x2}, + 28: {region: 0xa6, script: 0x20, flags: 0x0}, + 29: {region: 0x53, script: 0x5, flags: 0x4}, + 30: {region: 0x12c, script: 0x5b, flags: 0x4}, + 31: {region: 0x53, script: 0x5, flags: 0x2}, + 32: {region: 0x12c, script: 0x5b, flags: 0x2}, + 33: {region: 0xdc, script: 0x22, flags: 0x0}, + 34: {region: 0x9a, script: 0x5e, flags: 0x2}, + 35: {region: 0x84, script: 0x5b, flags: 0x0}, + 36: {region: 0x85, script: 0x7e, flags: 0x4}, + 37: {region: 0x85, script: 0x7e, flags: 0x2}, + 38: {region: 0xc6, script: 0x20, flags: 0x0}, + 39: {region: 0x53, script: 0x71, flags: 0x4}, + 40: {region: 0x53, script: 0x71, flags: 0x2}, + 41: {region: 0xd1, script: 0x5b, flags: 0x0}, + 42: {region: 0x4a, script: 0x5, flags: 0x4}, + 43: {region: 0x96, script: 0x5, flags: 0x4}, + 44: {region: 0x9a, script: 0x36, flags: 0x0}, + 45: {region: 0xe9, script: 0x5, flags: 0x4}, + 46: {region: 0xe9, script: 0x5, flags: 0x2}, + 47: {region: 0x9d, script: 0x8d, flags: 0x0}, + 48: {region: 0x53, script: 0x8e, flags: 0x2}, + 49: {region: 0xbb, script: 0xeb, flags: 0x0}, + 50: {region: 0xda, script: 0x5b, flags: 0x4}, + 51: {region: 0xe9, script: 0x5, flags: 0x0}, + 52: {region: 0x9a, script: 0x22, flags: 0x2}, + 53: {region: 0x9a, script: 0x50, flags: 0x2}, + 54: {region: 0x9a, script: 0xd5, flags: 0x2}, + 55: {region: 0x106, script: 0x20, flags: 0x0}, + 56: {region: 0xbe, script: 0x5b, flags: 0x4}, + 57: {region: 0x105, script: 0x5b, flags: 0x4}, + 58: {region: 0x107, script: 0x5b, flags: 0x4}, + 59: {region: 0x12c, script: 0x5b, flags: 0x4}, + 60: {region: 0x125, script: 0x20, flags: 0x0}, + 61: {region: 0xe9, script: 0x5, flags: 0x4}, + 62: {region: 0xe9, script: 0x5, flags: 0x2}, + 63: {region: 0x53, script: 0x5, flags: 0x0}, + 64: {region: 0xaf, script: 0x20, flags: 0x4}, + 65: {region: 0xc6, script: 0x20, flags: 0x4}, + 66: {region: 0xaf, script: 0x20, flags: 0x2}, + 67: {region: 0x9a, script: 0xe, flags: 0x0}, + 68: {region: 0xdc, script: 0x22, flags: 0x4}, + 69: {region: 0xdc, script: 0x22, flags: 0x2}, + 70: {region: 0x138, script: 0x5b, flags: 0x0}, + 71: {region: 0x24, script: 0x5, flags: 0x4}, + 72: {region: 0x53, script: 0x20, flags: 0x4}, + 73: {region: 0x24, script: 0x5, flags: 0x2}, + 74: {region: 0x8e, script: 0x3c, flags: 0x0}, + 75: {region: 0x53, script: 0x3b, flags: 0x4}, + 76: {region: 0x53, script: 0x3b, flags: 0x2}, + 77: {region: 0x53, script: 0x3b, flags: 0x0}, + 78: {region: 0x2f, script: 0x3c, flags: 0x4}, + 79: {region: 0x3e, script: 0x3c, flags: 0x4}, + 80: {region: 0x7c, script: 0x3c, flags: 0x4}, + 81: {region: 0x7f, script: 0x3c, flags: 0x4}, + 82: {region: 0x8e, script: 0x3c, flags: 0x4}, + 83: {region: 0x96, script: 0x3c, flags: 0x4}, + 84: {region: 0xc7, script: 0x3c, flags: 0x4}, + 85: {region: 0xd1, script: 0x3c, flags: 0x4}, + 86: {region: 0xe3, script: 0x3c, flags: 0x4}, + 87: {region: 0xe6, script: 0x3c, flags: 0x4}, + 88: {region: 0xe8, script: 0x3c, flags: 0x4}, + 89: {region: 0x117, script: 0x3c, flags: 0x4}, + 90: {region: 0x124, script: 0x3c, flags: 0x4}, + 91: {region: 0x12f, script: 0x3c, flags: 0x4}, + 92: {region: 0x136, script: 0x3c, flags: 0x4}, + 93: {region: 0x13f, script: 0x3c, flags: 0x4}, + 94: {region: 0x12f, script: 0x11, flags: 0x2}, + 95: {region: 0x12f, script: 0x37, flags: 0x2}, + 96: {region: 0x12f, script: 0x3c, flags: 0x2}, +} + +type likelyLangScript struct { + lang uint16 + script uint16 + flags uint8 +} + +// likelyRegion is a lookup table, indexed by regionID, for the most likely +// languages and scripts given incomplete information. If more entries exist +// for a given regionID, lang and script are the index and size respectively +// of the list in likelyRegionList. +// TODO: exclude containers and user-definable regions from the list. +// Size: 2154 bytes, 359 elements +var likelyRegion = [359]likelyLangScript{ + 34: {lang: 0xd7, script: 0x5b, flags: 0x0}, + 35: {lang: 0x3a, script: 0x5, flags: 0x0}, + 36: {lang: 0x0, script: 0x2, flags: 0x1}, + 39: {lang: 0x2, script: 0x2, flags: 0x1}, + 40: {lang: 0x4, script: 0x2, flags: 0x1}, + 42: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 43: {lang: 0x0, script: 0x5b, flags: 0x0}, + 44: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 45: {lang: 0x41b, script: 0x5b, flags: 0x0}, + 46: {lang: 0x10d, script: 0x5b, flags: 0x0}, + 48: {lang: 0x367, script: 0x5b, flags: 0x0}, + 49: {lang: 0x444, script: 0x5b, flags: 0x0}, + 50: {lang: 0x58, script: 0x5b, flags: 0x0}, + 51: {lang: 0x6, script: 0x2, flags: 0x1}, + 53: {lang: 0xa5, script: 0xe, flags: 0x0}, + 54: {lang: 0x367, script: 0x5b, flags: 0x0}, + 55: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 56: {lang: 0x7e, script: 0x20, flags: 0x0}, + 57: {lang: 0x3a, script: 0x5, flags: 0x0}, + 58: {lang: 0x3d9, script: 0x5b, flags: 0x0}, + 59: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 60: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 62: {lang: 0x31f, script: 0x5b, flags: 0x0}, + 63: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 64: {lang: 0x3a1, script: 0x5b, flags: 0x0}, + 65: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 67: {lang: 0x8, script: 0x2, flags: 0x1}, + 69: {lang: 0x0, script: 0x5b, flags: 0x0}, + 71: {lang: 0x71, script: 0x20, flags: 0x0}, + 73: {lang: 0x512, script: 0x3e, flags: 0x2}, + 74: {lang: 0x31f, script: 0x5, flags: 0x2}, + 75: {lang: 0x445, script: 0x5b, flags: 0x0}, + 76: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 77: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 78: {lang: 0x10d, script: 0x5b, flags: 0x0}, + 79: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 81: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 82: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 83: {lang: 0xa, script: 0x4, flags: 0x1}, + 84: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 85: {lang: 0x0, script: 0x5b, flags: 0x0}, + 87: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 90: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 91: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 92: {lang: 0x3a1, script: 0x5b, flags: 0x0}, + 94: {lang: 0xe, script: 0x2, flags: 0x1}, + 95: {lang: 0xfa, script: 0x5b, flags: 0x0}, + 97: {lang: 0x10d, script: 0x5b, flags: 0x0}, + 99: {lang: 0x1, script: 0x5b, flags: 0x0}, + 100: {lang: 0x101, script: 0x5b, flags: 0x0}, + 102: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 104: {lang: 0x10, script: 0x2, flags: 0x1}, + 105: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 106: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 107: {lang: 0x140, script: 0x5b, flags: 0x0}, + 108: {lang: 0x3a, script: 0x5, flags: 0x0}, + 109: {lang: 0x3a, script: 0x5, flags: 0x0}, + 110: {lang: 0x46f, script: 0x2c, flags: 0x0}, + 111: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 112: {lang: 0x12, script: 0x2, flags: 0x1}, + 114: {lang: 0x10d, script: 0x5b, flags: 0x0}, + 115: {lang: 0x151, script: 0x5b, flags: 0x0}, + 116: {lang: 0x1c0, script: 0x22, flags: 0x2}, + 119: {lang: 0x158, script: 0x5b, flags: 0x0}, + 121: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 123: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 124: {lang: 0x14, script: 0x2, flags: 0x1}, + 126: {lang: 0x16, script: 0x3, flags: 0x1}, + 127: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 129: {lang: 0x21, script: 0x5b, flags: 0x0}, + 131: {lang: 0x245, script: 0x5b, flags: 0x0}, + 133: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 134: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 135: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 136: {lang: 0x19, script: 0x2, flags: 0x1}, + 137: {lang: 0x0, script: 0x5b, flags: 0x0}, + 138: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 140: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 142: {lang: 0x529, script: 0x3c, flags: 0x0}, + 143: {lang: 0x0, script: 0x5b, flags: 0x0}, + 144: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 145: {lang: 0x1d1, script: 0x5b, flags: 0x0}, + 146: {lang: 0x1d4, script: 0x5b, flags: 0x0}, + 147: {lang: 0x1d5, script: 0x5b, flags: 0x0}, + 149: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 150: {lang: 0x1b, script: 0x2, flags: 0x1}, + 152: {lang: 0x1bc, script: 0x3e, flags: 0x0}, + 154: {lang: 0x1d, script: 0x3, flags: 0x1}, + 156: {lang: 0x3a, script: 0x5, flags: 0x0}, + 157: {lang: 0x20, script: 0x2, flags: 0x1}, + 158: {lang: 0x1f8, script: 0x5b, flags: 0x0}, + 159: {lang: 0x1f9, script: 0x5b, flags: 0x0}, + 162: {lang: 0x3a, script: 0x5, flags: 0x0}, + 163: {lang: 0x200, script: 0x49, flags: 0x0}, + 165: {lang: 0x445, script: 0x5b, flags: 0x0}, + 166: {lang: 0x28a, script: 0x20, flags: 0x0}, + 167: {lang: 0x22, script: 0x3, flags: 0x1}, + 169: {lang: 0x25, script: 0x2, flags: 0x1}, + 171: {lang: 0x254, script: 0x54, flags: 0x0}, + 172: {lang: 0x254, script: 0x54, flags: 0x0}, + 173: {lang: 0x3a, script: 0x5, flags: 0x0}, + 175: {lang: 0x3e2, script: 0x20, flags: 0x0}, + 176: {lang: 0x27, script: 0x2, flags: 0x1}, + 177: {lang: 0x3a, script: 0x5, flags: 0x0}, + 179: {lang: 0x10d, script: 0x5b, flags: 0x0}, + 180: {lang: 0x40c, script: 0xd6, flags: 0x0}, + 182: {lang: 0x43b, script: 0x5b, flags: 0x0}, + 183: {lang: 0x2c0, script: 0x5b, flags: 0x0}, + 184: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 185: {lang: 0x2c7, script: 0x5b, flags: 0x0}, + 186: {lang: 0x3a, script: 0x5, flags: 0x0}, + 187: {lang: 0x29, script: 0x2, flags: 0x1}, + 188: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 189: {lang: 0x2b, script: 0x2, flags: 0x1}, + 190: {lang: 0x432, script: 0x5b, flags: 0x0}, + 191: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 192: {lang: 0x2f1, script: 0x5b, flags: 0x0}, + 195: {lang: 0x2d, script: 0x2, flags: 0x1}, + 196: {lang: 0xa0, script: 0x5b, flags: 0x0}, + 197: {lang: 0x2f, script: 0x2, flags: 0x1}, + 198: {lang: 0x31, script: 0x2, flags: 0x1}, + 199: {lang: 0x33, script: 0x2, flags: 0x1}, + 201: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 202: {lang: 0x35, script: 0x2, flags: 0x1}, + 204: {lang: 0x320, script: 0x5b, flags: 0x0}, + 205: {lang: 0x37, script: 0x3, flags: 0x1}, + 206: {lang: 0x128, script: 0xed, flags: 0x0}, + 208: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 209: {lang: 0x31f, script: 0x5b, flags: 0x0}, + 210: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 211: {lang: 0x16, script: 0x5b, flags: 0x0}, + 212: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 213: {lang: 0x1b4, script: 0x5b, flags: 0x0}, + 215: {lang: 0x1b4, script: 0x5, flags: 0x2}, + 217: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 218: {lang: 0x367, script: 0x5b, flags: 0x0}, + 219: {lang: 0x347, script: 0x5b, flags: 0x0}, + 220: {lang: 0x351, script: 0x22, flags: 0x0}, + 226: {lang: 0x3a, script: 0x5, flags: 0x0}, + 227: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 229: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 230: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 231: {lang: 0x486, script: 0x5b, flags: 0x0}, + 232: {lang: 0x153, script: 0x5b, flags: 0x0}, + 233: {lang: 0x3a, script: 0x3, flags: 0x1}, + 234: {lang: 0x3b3, script: 0x5b, flags: 0x0}, + 235: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 237: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 238: {lang: 0x3a, script: 0x5, flags: 0x0}, + 239: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 241: {lang: 0x3a2, script: 0x5b, flags: 0x0}, + 242: {lang: 0x194, script: 0x5b, flags: 0x0}, + 244: {lang: 0x3a, script: 0x5, flags: 0x0}, + 259: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 261: {lang: 0x3d, script: 0x2, flags: 0x1}, + 262: {lang: 0x432, script: 0x20, flags: 0x0}, + 263: {lang: 0x3f, script: 0x2, flags: 0x1}, + 264: {lang: 0x3e5, script: 0x5b, flags: 0x0}, + 265: {lang: 0x3a, script: 0x5, flags: 0x0}, + 267: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 268: {lang: 0x3a, script: 0x5, flags: 0x0}, + 269: {lang: 0x41, script: 0x2, flags: 0x1}, + 272: {lang: 0x416, script: 0x5b, flags: 0x0}, + 273: {lang: 0x347, script: 0x5b, flags: 0x0}, + 274: {lang: 0x43, script: 0x2, flags: 0x1}, + 276: {lang: 0x1f9, script: 0x5b, flags: 0x0}, + 277: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 278: {lang: 0x429, script: 0x5b, flags: 0x0}, + 279: {lang: 0x367, script: 0x5b, flags: 0x0}, + 281: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 283: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 285: {lang: 0x45, script: 0x2, flags: 0x1}, + 289: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 290: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 291: {lang: 0x47, script: 0x2, flags: 0x1}, + 292: {lang: 0x49, script: 0x3, flags: 0x1}, + 293: {lang: 0x4c, script: 0x2, flags: 0x1}, + 294: {lang: 0x477, script: 0x5b, flags: 0x0}, + 295: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 296: {lang: 0x476, script: 0x5b, flags: 0x0}, + 297: {lang: 0x4e, script: 0x2, flags: 0x1}, + 298: {lang: 0x482, script: 0x5b, flags: 0x0}, + 300: {lang: 0x50, script: 0x4, flags: 0x1}, + 302: {lang: 0x4a0, script: 0x5b, flags: 0x0}, + 303: {lang: 0x54, script: 0x2, flags: 0x1}, + 304: {lang: 0x445, script: 0x5b, flags: 0x0}, + 305: {lang: 0x56, script: 0x3, flags: 0x1}, + 306: {lang: 0x445, script: 0x5b, flags: 0x0}, + 310: {lang: 0x512, script: 0x3e, flags: 0x2}, + 311: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 312: {lang: 0x4bc, script: 0x5b, flags: 0x0}, + 313: {lang: 0x1f9, script: 0x5b, flags: 0x0}, + 316: {lang: 0x13e, script: 0x5b, flags: 0x0}, + 319: {lang: 0x4c3, script: 0x5b, flags: 0x0}, + 320: {lang: 0x8a, script: 0x5b, flags: 0x0}, + 321: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 323: {lang: 0x41b, script: 0x5b, flags: 0x0}, + 334: {lang: 0x59, script: 0x2, flags: 0x1}, + 351: {lang: 0x3a, script: 0x5, flags: 0x0}, + 352: {lang: 0x5b, script: 0x2, flags: 0x1}, + 357: {lang: 0x423, script: 0x5b, flags: 0x0}, +} + +// likelyRegionList holds lists info associated with likelyRegion. +// Size: 558 bytes, 93 elements +var likelyRegionList = [93]likelyLangScript{ + 0: {lang: 0x148, script: 0x5, flags: 0x0}, + 1: {lang: 0x476, script: 0x5b, flags: 0x0}, + 2: {lang: 0x431, script: 0x5b, flags: 0x0}, + 3: {lang: 0x2ff, script: 0x20, flags: 0x0}, + 4: {lang: 0x1d7, script: 0x8, flags: 0x0}, + 5: {lang: 0x274, script: 0x5b, flags: 0x0}, + 6: {lang: 0xb7, script: 0x5b, flags: 0x0}, + 7: {lang: 0x432, script: 0x20, flags: 0x0}, + 8: {lang: 0x12d, script: 0xef, flags: 0x0}, + 9: {lang: 0x351, script: 0x22, flags: 0x0}, + 10: {lang: 0x529, script: 0x3b, flags: 0x0}, + 11: {lang: 0x4ac, script: 0x5, flags: 0x0}, + 12: {lang: 0x523, script: 0x5b, flags: 0x0}, + 13: {lang: 0x29a, script: 0xee, flags: 0x0}, + 14: {lang: 0x136, script: 0x34, flags: 0x0}, + 15: {lang: 0x48a, script: 0x5b, flags: 0x0}, + 16: {lang: 0x3a, script: 0x5, flags: 0x0}, + 17: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 18: {lang: 0x27, script: 0x2c, flags: 0x0}, + 19: {lang: 0x139, script: 0x5b, flags: 0x0}, + 20: {lang: 0x26a, script: 0x5, flags: 0x2}, + 21: {lang: 0x512, script: 0x3e, flags: 0x2}, + 22: {lang: 0x210, script: 0x2e, flags: 0x0}, + 23: {lang: 0x5, script: 0x20, flags: 0x0}, + 24: {lang: 0x274, script: 0x5b, flags: 0x0}, + 25: {lang: 0x136, script: 0x34, flags: 0x0}, + 26: {lang: 0x2ff, script: 0x20, flags: 0x0}, + 27: {lang: 0x1e1, script: 0x5b, flags: 0x0}, + 28: {lang: 0x31f, script: 0x5, flags: 0x0}, + 29: {lang: 0x1be, script: 0x22, flags: 0x0}, + 30: {lang: 0x4b4, script: 0x5, flags: 0x0}, + 31: {lang: 0x236, script: 0x76, flags: 0x0}, + 32: {lang: 0x148, script: 0x5, flags: 0x0}, + 33: {lang: 0x476, script: 0x5b, flags: 0x0}, + 34: {lang: 0x24a, script: 0x4f, flags: 0x0}, + 35: {lang: 0xe6, script: 0x5, flags: 0x0}, + 36: {lang: 0x226, script: 0xee, flags: 0x0}, + 37: {lang: 0x3a, script: 0x5, flags: 0x0}, + 38: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 39: {lang: 0x2b8, script: 0x58, flags: 0x0}, + 40: {lang: 0x226, script: 0xee, flags: 0x0}, + 41: {lang: 0x3a, script: 0x5, flags: 0x0}, + 42: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 43: {lang: 0x3dc, script: 0x5b, flags: 0x0}, + 44: {lang: 0x4ae, script: 0x20, flags: 0x0}, + 45: {lang: 0x2ff, script: 0x20, flags: 0x0}, + 46: {lang: 0x431, script: 0x5b, flags: 0x0}, + 47: {lang: 0x331, script: 0x76, flags: 0x0}, + 48: {lang: 0x213, script: 0x5b, flags: 0x0}, + 49: {lang: 0x30b, script: 0x20, flags: 0x0}, + 50: {lang: 0x242, script: 0x5, flags: 0x0}, + 51: {lang: 0x529, script: 0x3c, flags: 0x0}, + 52: {lang: 0x3c0, script: 0x5b, flags: 0x0}, + 53: {lang: 0x3a, script: 0x5, flags: 0x0}, + 54: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 55: {lang: 0x2ed, script: 0x5b, flags: 0x0}, + 56: {lang: 0x4b4, script: 0x5, flags: 0x0}, + 57: {lang: 0x88, script: 0x22, flags: 0x0}, + 58: {lang: 0x4b4, script: 0x5, flags: 0x0}, + 59: {lang: 0x4b4, script: 0x5, flags: 0x0}, + 60: {lang: 0xbe, script: 0x22, flags: 0x0}, + 61: {lang: 0x3dc, script: 0x5b, flags: 0x0}, + 62: {lang: 0x7e, script: 0x20, flags: 0x0}, + 63: {lang: 0x3e2, script: 0x20, flags: 0x0}, + 64: {lang: 0x267, script: 0x5b, flags: 0x0}, + 65: {lang: 0x444, script: 0x5b, flags: 0x0}, + 66: {lang: 0x512, script: 0x3e, flags: 0x0}, + 67: {lang: 0x412, script: 0x5b, flags: 0x0}, + 68: {lang: 0x4ae, script: 0x20, flags: 0x0}, + 69: {lang: 0x3a, script: 0x5, flags: 0x0}, + 70: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 71: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 72: {lang: 0x35, script: 0x5, flags: 0x0}, + 73: {lang: 0x46b, script: 0xee, flags: 0x0}, + 74: {lang: 0x2ec, script: 0x5, flags: 0x0}, + 75: {lang: 0x30f, script: 0x76, flags: 0x0}, + 76: {lang: 0x467, script: 0x20, flags: 0x0}, + 77: {lang: 0x148, script: 0x5, flags: 0x0}, + 78: {lang: 0x3a, script: 0x5, flags: 0x0}, + 79: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 80: {lang: 0x48a, script: 0x5b, flags: 0x0}, + 81: {lang: 0x58, script: 0x5, flags: 0x0}, + 82: {lang: 0x219, script: 0x20, flags: 0x0}, + 83: {lang: 0x81, script: 0x34, flags: 0x0}, + 84: {lang: 0x529, script: 0x3c, flags: 0x0}, + 85: {lang: 0x48c, script: 0x5b, flags: 0x0}, + 86: {lang: 0x4ae, script: 0x20, flags: 0x0}, + 87: {lang: 0x512, script: 0x3e, flags: 0x0}, + 88: {lang: 0x3b3, script: 0x5b, flags: 0x0}, + 89: {lang: 0x431, script: 0x5b, flags: 0x0}, + 90: {lang: 0x432, script: 0x20, flags: 0x0}, + 91: {lang: 0x15e, script: 0x5b, flags: 0x0}, + 92: {lang: 0x446, script: 0x5, flags: 0x0}, +} + +type likelyTag struct { + lang uint16 + region uint16 + script uint16 +} + +// Size: 198 bytes, 33 elements +var likelyRegionGroup = [33]likelyTag{ + 1: {lang: 0x139, region: 0xd7, script: 0x5b}, + 2: {lang: 0x139, region: 0x136, script: 0x5b}, + 3: {lang: 0x3c0, region: 0x41, script: 0x5b}, + 4: {lang: 0x139, region: 0x2f, script: 0x5b}, + 5: {lang: 0x139, region: 0xd7, script: 0x5b}, + 6: {lang: 0x13e, region: 0xd0, script: 0x5b}, + 7: {lang: 0x445, region: 0x130, script: 0x5b}, + 8: {lang: 0x3a, region: 0x6c, script: 0x5}, + 9: {lang: 0x445, region: 0x4b, script: 0x5b}, + 10: {lang: 0x139, region: 0x162, script: 0x5b}, + 11: {lang: 0x139, region: 0x136, script: 0x5b}, + 12: {lang: 0x139, region: 0x136, script: 0x5b}, + 13: {lang: 0x13e, region: 0x5a, script: 0x5b}, + 14: {lang: 0x529, region: 0x53, script: 0x3b}, + 15: {lang: 0x1be, region: 0x9a, script: 0x22}, + 16: {lang: 0x1e1, region: 0x96, script: 0x5b}, + 17: {lang: 0x1f9, region: 0x9f, script: 0x5b}, + 18: {lang: 0x139, region: 0x2f, script: 0x5b}, + 19: {lang: 0x139, region: 0xe7, script: 0x5b}, + 20: {lang: 0x139, region: 0x8b, script: 0x5b}, + 21: {lang: 0x41b, region: 0x143, script: 0x5b}, + 22: {lang: 0x529, region: 0x53, script: 0x3b}, + 23: {lang: 0x4bc, region: 0x138, script: 0x5b}, + 24: {lang: 0x3a, region: 0x109, script: 0x5}, + 25: {lang: 0x3e2, region: 0x107, script: 0x20}, + 26: {lang: 0x3e2, region: 0x107, script: 0x20}, + 27: {lang: 0x139, region: 0x7c, script: 0x5b}, + 28: {lang: 0x10d, region: 0x61, script: 0x5b}, + 29: {lang: 0x139, region: 0xd7, script: 0x5b}, + 30: {lang: 0x13e, region: 0x1f, script: 0x5b}, + 31: {lang: 0x139, region: 0x9b, script: 0x5b}, + 32: {lang: 0x139, region: 0x7c, script: 0x5b}, +} + +// Size: 264 bytes, 33 elements +var regionContainment = [33]uint64{ + // Entry 0 - 1F + 0x00000001ffffffff, 0x00000000200007a2, 0x0000000000003044, 0x0000000000000008, + 0x00000000803c0010, 0x0000000000000020, 0x0000000000000040, 0x0000000000000080, + 0x0000000000000100, 0x0000000000000200, 0x0000000000000400, 0x000000004000384c, + 0x0000000000001000, 0x0000000000002000, 0x0000000000004000, 0x0000000000008000, + 0x0000000000010000, 0x0000000000020000, 0x0000000000040000, 0x0000000000080000, + 0x0000000000100000, 0x0000000000200000, 0x0000000001c1c000, 0x0000000000800000, + 0x0000000001000000, 0x000000001e020000, 0x0000000004000000, 0x0000000008000000, + 0x0000000010000000, 0x00000000200006a0, 0x0000000040002048, 0x0000000080000000, + // Entry 20 - 3F + 0x0000000100000000, +} + +// regionInclusion maps region identifiers to sets of regions in regionInclusionBits, +// where each set holds all groupings that are directly connected in a region +// containment graph. +// Size: 359 bytes, 359 elements +var regionInclusion = [359]uint8{ + // Entry 0 - 3F + 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, + 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x26, 0x23, + 0x24, 0x26, 0x27, 0x22, 0x28, 0x29, 0x2a, 0x2b, + 0x26, 0x2c, 0x24, 0x23, 0x26, 0x25, 0x2a, 0x2d, + 0x2e, 0x24, 0x2f, 0x2d, 0x26, 0x30, 0x31, 0x28, + // Entry 40 - 7F + 0x26, 0x28, 0x26, 0x25, 0x31, 0x22, 0x32, 0x33, + 0x34, 0x30, 0x22, 0x27, 0x27, 0x27, 0x35, 0x2d, + 0x29, 0x28, 0x27, 0x36, 0x28, 0x22, 0x21, 0x34, + 0x23, 0x21, 0x26, 0x2d, 0x26, 0x22, 0x37, 0x2e, + 0x35, 0x2a, 0x22, 0x2f, 0x38, 0x26, 0x26, 0x21, + 0x39, 0x39, 0x28, 0x38, 0x39, 0x39, 0x2f, 0x3a, + 0x2f, 0x20, 0x21, 0x38, 0x3b, 0x28, 0x3c, 0x2c, + 0x21, 0x2a, 0x35, 0x27, 0x38, 0x26, 0x24, 0x28, + // Entry 80 - BF + 0x2c, 0x2d, 0x23, 0x30, 0x2d, 0x2d, 0x26, 0x27, + 0x3a, 0x22, 0x34, 0x3c, 0x2d, 0x28, 0x36, 0x22, + 0x34, 0x3a, 0x26, 0x2e, 0x21, 0x39, 0x31, 0x38, + 0x24, 0x2c, 0x25, 0x22, 0x24, 0x25, 0x2c, 0x3a, + 0x2c, 0x26, 0x24, 0x36, 0x21, 0x2f, 0x3d, 0x31, + 0x3c, 0x2f, 0x26, 0x36, 0x36, 0x24, 0x26, 0x3d, + 0x31, 0x24, 0x26, 0x35, 0x25, 0x2d, 0x32, 0x38, + 0x2a, 0x38, 0x39, 0x39, 0x35, 0x33, 0x23, 0x26, + // Entry C0 - FF + 0x2f, 0x3c, 0x21, 0x23, 0x2d, 0x31, 0x36, 0x36, + 0x3c, 0x26, 0x2d, 0x26, 0x3a, 0x2f, 0x25, 0x2f, + 0x34, 0x31, 0x2f, 0x32, 0x3b, 0x2d, 0x2b, 0x2d, + 0x21, 0x34, 0x2a, 0x2c, 0x25, 0x21, 0x3c, 0x24, + 0x29, 0x2b, 0x24, 0x34, 0x21, 0x28, 0x29, 0x3b, + 0x31, 0x25, 0x2e, 0x30, 0x29, 0x26, 0x24, 0x3a, + 0x21, 0x3c, 0x28, 0x21, 0x24, 0x21, 0x21, 0x1f, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + // Entry 100 - 13F + 0x21, 0x21, 0x21, 0x2f, 0x21, 0x2e, 0x23, 0x33, + 0x2f, 0x24, 0x3b, 0x2f, 0x39, 0x38, 0x31, 0x2d, + 0x3a, 0x2c, 0x2e, 0x2d, 0x23, 0x2d, 0x2f, 0x28, + 0x2f, 0x27, 0x33, 0x34, 0x26, 0x24, 0x32, 0x22, + 0x26, 0x27, 0x22, 0x2d, 0x31, 0x3d, 0x29, 0x31, + 0x3d, 0x39, 0x29, 0x31, 0x24, 0x26, 0x29, 0x36, + 0x2f, 0x33, 0x2f, 0x21, 0x22, 0x21, 0x30, 0x28, + 0x3d, 0x23, 0x26, 0x21, 0x28, 0x26, 0x26, 0x31, + // Entry 140 - 17F + 0x3b, 0x29, 0x21, 0x29, 0x21, 0x21, 0x21, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x23, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x24, 0x24, + 0x2f, 0x23, 0x32, 0x2f, 0x27, 0x2f, 0x21, +} + +// regionInclusionBits is an array of bit vectors where every vector represents +// a set of region groupings. These sets are used to compute the distance +// between two regions for the purpose of language matching. +// Size: 584 bytes, 73 elements +var regionInclusionBits = [73]uint64{ + // Entry 0 - 1F + 0x0000000102400813, 0x00000000200007a3, 0x0000000000003844, 0x0000000040000808, + 0x00000000803c0011, 0x0000000020000022, 0x0000000040000844, 0x0000000020000082, + 0x0000000000000102, 0x0000000020000202, 0x0000000020000402, 0x000000004000384d, + 0x0000000000001804, 0x0000000040002804, 0x0000000000404000, 0x0000000000408000, + 0x0000000000410000, 0x0000000002020000, 0x0000000000040010, 0x0000000000080010, + 0x0000000000100010, 0x0000000000200010, 0x0000000001c1c001, 0x0000000000c00000, + 0x0000000001400000, 0x000000001e020001, 0x0000000006000000, 0x000000000a000000, + 0x0000000012000000, 0x00000000200006a2, 0x0000000040002848, 0x0000000080000010, + // Entry 20 - 3F + 0x0000000100000001, 0x0000000000000001, 0x0000000080000000, 0x0000000000020000, + 0x0000000001000000, 0x0000000000008000, 0x0000000000002000, 0x0000000000000200, + 0x0000000000000008, 0x0000000000200000, 0x0000000110000000, 0x0000000000040000, + 0x0000000008000000, 0x0000000000000020, 0x0000000104000000, 0x0000000000000080, + 0x0000000000001000, 0x0000000000010000, 0x0000000000000400, 0x0000000004000000, + 0x0000000000000040, 0x0000000010000000, 0x0000000000004000, 0x0000000101000000, + 0x0000000108000000, 0x0000000000000100, 0x0000000100020000, 0x0000000000080000, + 0x0000000000100000, 0x0000000000800000, 0x00000001ffffffff, 0x0000000122400fb3, + // Entry 40 - 5F + 0x00000001827c0813, 0x000000014240385f, 0x0000000103c1c813, 0x000000011e420813, + 0x0000000112000001, 0x0000000106000001, 0x0000000101400001, 0x000000010a000001, + 0x0000000102020001, +} + +// regionInclusionNext marks, for each entry in regionInclusionBits, the set of +// all groups that are reachable from the groups set in the respective entry. +// Size: 73 bytes, 73 elements +var regionInclusionNext = [73]uint8{ + // Entry 0 - 3F + 0x3e, 0x3f, 0x0b, 0x0b, 0x40, 0x01, 0x0b, 0x01, + 0x01, 0x01, 0x01, 0x41, 0x0b, 0x0b, 0x16, 0x16, + 0x16, 0x19, 0x04, 0x04, 0x04, 0x04, 0x42, 0x16, + 0x16, 0x43, 0x19, 0x19, 0x19, 0x01, 0x0b, 0x04, + 0x00, 0x00, 0x1f, 0x11, 0x18, 0x0f, 0x0d, 0x09, + 0x03, 0x15, 0x44, 0x12, 0x1b, 0x05, 0x45, 0x07, + 0x0c, 0x10, 0x0a, 0x1a, 0x06, 0x1c, 0x0e, 0x46, + 0x47, 0x08, 0x48, 0x13, 0x14, 0x17, 0x3e, 0x3e, + // Entry 40 - 7F + 0x3e, 0x3e, 0x3e, 0x3e, 0x43, 0x43, 0x42, 0x43, + 0x43, +} + +type parentRel struct { + lang uint16 + script uint16 + maxScript uint16 + toRegion uint16 + fromRegion []uint16 +} + +// Size: 414 bytes, 5 elements +var parents = [5]parentRel{ + 0: {lang: 0x139, script: 0x0, maxScript: 0x5b, toRegion: 0x1, fromRegion: []uint16{0x1a, 0x25, 0x26, 0x2f, 0x34, 0x36, 0x3d, 0x42, 0x46, 0x48, 0x49, 0x4a, 0x50, 0x52, 0x5d, 0x5e, 0x62, 0x65, 0x6e, 0x74, 0x75, 0x76, 0x7c, 0x7d, 0x80, 0x81, 0x82, 0x84, 0x8d, 0x8e, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0xa0, 0xa1, 0xa5, 0xa8, 0xaa, 0xae, 0xb2, 0xb5, 0xb6, 0xc0, 0xc7, 0xcb, 0xcc, 0xcd, 0xcf, 0xd1, 0xd3, 0xd6, 0xd7, 0xde, 0xe0, 0xe1, 0xe7, 0xe8, 0xe9, 0xec, 0xf1, 0x108, 0x10a, 0x10b, 0x10c, 0x10e, 0x10f, 0x113, 0x118, 0x11c, 0x11e, 0x120, 0x126, 0x12a, 0x12d, 0x12e, 0x130, 0x132, 0x13a, 0x13d, 0x140, 0x143, 0x162, 0x163, 0x165}}, + 1: {lang: 0x139, script: 0x0, maxScript: 0x5b, toRegion: 0x1a, fromRegion: []uint16{0x2e, 0x4e, 0x61, 0x64, 0x73, 0xda, 0x10d, 0x110}}, + 2: {lang: 0x13e, script: 0x0, maxScript: 0x5b, toRegion: 0x1f, fromRegion: []uint16{0x2c, 0x3f, 0x41, 0x48, 0x51, 0x54, 0x57, 0x5a, 0x66, 0x6a, 0x8a, 0x90, 0xd0, 0xd9, 0xe3, 0xe5, 0xed, 0xf2, 0x11b, 0x136, 0x137, 0x13c}}, + 3: {lang: 0x3c0, script: 0x0, maxScript: 0x5b, toRegion: 0xef, fromRegion: []uint16{0x2a, 0x4e, 0x5b, 0x87, 0x8c, 0xb8, 0xc7, 0xd2, 0x119, 0x127}}, + 4: {lang: 0x529, script: 0x3c, maxScript: 0x3c, toRegion: 0x8e, fromRegion: []uint16{0xc7}}, +} + +// Total table size 30466 bytes (29KiB); checksum: 7544152B diff --git a/vendor/golang.org/x/text/internal/language/tags.go b/vendor/golang.org/x/text/internal/language/tags.go new file mode 100644 index 000000000..e7afd3188 --- /dev/null +++ b/vendor/golang.org/x/text/internal/language/tags.go @@ -0,0 +1,48 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed. +// It simplifies safe initialization of Tag values. +func MustParse(s string) Tag { + t, err := Parse(s) + if err != nil { + panic(err) + } + return t +} + +// MustParseBase is like ParseBase, but panics if the given base cannot be parsed. +// It simplifies safe initialization of Base values. +func MustParseBase(s string) Language { + b, err := ParseBase(s) + if err != nil { + panic(err) + } + return b +} + +// MustParseScript is like ParseScript, but panics if the given script cannot be +// parsed. It simplifies safe initialization of Script values. +func MustParseScript(s string) Script { + scr, err := ParseScript(s) + if err != nil { + panic(err) + } + return scr +} + +// MustParseRegion is like ParseRegion, but panics if the given region cannot be +// parsed. It simplifies safe initialization of Region values. +func MustParseRegion(s string) Region { + r, err := ParseRegion(s) + if err != nil { + panic(err) + } + return r +} + +// Und is the root language. +var Und Tag diff --git a/vendor/golang.org/x/text/internal/tag/tag.go b/vendor/golang.org/x/text/internal/tag/tag.go new file mode 100644 index 000000000..b5d348891 --- /dev/null +++ b/vendor/golang.org/x/text/internal/tag/tag.go @@ -0,0 +1,100 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package tag contains functionality handling tags and related data. +package tag // import "golang.org/x/text/internal/tag" + +import "sort" + +// An Index converts tags to a compact numeric value. +// +// All elements are of size 4. Tags may be up to 4 bytes long. Excess bytes can +// be used to store additional information about the tag. +type Index string + +// Elem returns the element data at the given index. +func (s Index) Elem(x int) string { + return string(s[x*4 : x*4+4]) +} + +// Index reports the index of the given key or -1 if it could not be found. +// Only the first len(key) bytes from the start of the 4-byte entries will be +// considered for the search and the first match in Index will be returned. +func (s Index) Index(key []byte) int { + n := len(key) + // search the index of the first entry with an equal or higher value than + // key in s. + index := sort.Search(len(s)/4, func(i int) bool { + return cmp(s[i*4:i*4+n], key) != -1 + }) + i := index * 4 + if cmp(s[i:i+len(key)], key) != 0 { + return -1 + } + return index +} + +// Next finds the next occurrence of key after index x, which must have been +// obtained from a call to Index using the same key. It returns x+1 or -1. +func (s Index) Next(key []byte, x int) int { + if x++; x*4 < len(s) && cmp(s[x*4:x*4+len(key)], key) == 0 { + return x + } + return -1 +} + +// cmp returns an integer comparing a and b lexicographically. +func cmp(a Index, b []byte) int { + n := len(a) + if len(b) < n { + n = len(b) + } + for i, c := range b[:n] { + switch { + case a[i] > c: + return 1 + case a[i] < c: + return -1 + } + } + switch { + case len(a) < len(b): + return -1 + case len(a) > len(b): + return 1 + } + return 0 +} + +// Compare returns an integer comparing a and b lexicographically. +func Compare(a string, b []byte) int { + return cmp(Index(a), b) +} + +// FixCase reformats b to the same pattern of cases as form. +// If returns false if string b is malformed. +func FixCase(form string, b []byte) bool { + if len(form) != len(b) { + return false + } + for i, c := range b { + if form[i] <= 'Z' { + if c >= 'a' { + c -= 'z' - 'Z' + } + if c < 'A' || 'Z' < c { + return false + } + } else { + if c <= 'Z' { + c += 'z' - 'Z' + } + if c < 'a' || 'z' < c { + return false + } + } + b[i] = c + } + return true +} diff --git a/vendor/golang.org/x/text/language/coverage.go b/vendor/golang.org/x/text/language/coverage.go new file mode 100644 index 000000000..a24fd1a4d --- /dev/null +++ b/vendor/golang.org/x/text/language/coverage.go @@ -0,0 +1,187 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "fmt" + "sort" + + "golang.org/x/text/internal/language" +) + +// The Coverage interface is used to define the level of coverage of an +// internationalization service. Note that not all types are supported by all +// services. As lists may be generated on the fly, it is recommended that users +// of a Coverage cache the results. +type Coverage interface { + // Tags returns the list of supported tags. + Tags() []Tag + + // BaseLanguages returns the list of supported base languages. + BaseLanguages() []Base + + // Scripts returns the list of supported scripts. + Scripts() []Script + + // Regions returns the list of supported regions. + Regions() []Region +} + +var ( + // Supported defines a Coverage that lists all supported subtags. Tags + // always returns nil. + Supported Coverage = allSubtags{} +) + +// TODO: +// - Support Variants, numbering systems. +// - CLDR coverage levels. +// - Set of common tags defined in this package. + +type allSubtags struct{} + +// Regions returns the list of supported regions. As all regions are in a +// consecutive range, it simply returns a slice of numbers in increasing order. +// The "undefined" region is not returned. +func (s allSubtags) Regions() []Region { + reg := make([]Region, language.NumRegions) + for i := range reg { + reg[i] = Region{language.Region(i + 1)} + } + return reg +} + +// Scripts returns the list of supported scripts. As all scripts are in a +// consecutive range, it simply returns a slice of numbers in increasing order. +// The "undefined" script is not returned. +func (s allSubtags) Scripts() []Script { + scr := make([]Script, language.NumScripts) + for i := range scr { + scr[i] = Script{language.Script(i + 1)} + } + return scr +} + +// BaseLanguages returns the list of all supported base languages. It generates +// the list by traversing the internal structures. +func (s allSubtags) BaseLanguages() []Base { + bs := language.BaseLanguages() + base := make([]Base, len(bs)) + for i, b := range bs { + base[i] = Base{b} + } + return base +} + +// Tags always returns nil. +func (s allSubtags) Tags() []Tag { + return nil +} + +// coverage is used by NewCoverage which is used as a convenient way for +// creating Coverage implementations for partially defined data. Very often a +// package will only need to define a subset of slices. coverage provides a +// convenient way to do this. Moreover, packages using NewCoverage, instead of +// their own implementation, will not break if later new slice types are added. +type coverage struct { + tags func() []Tag + bases func() []Base + scripts func() []Script + regions func() []Region +} + +func (s *coverage) Tags() []Tag { + if s.tags == nil { + return nil + } + return s.tags() +} + +// bases implements sort.Interface and is used to sort base languages. +type bases []Base + +func (b bases) Len() int { + return len(b) +} + +func (b bases) Swap(i, j int) { + b[i], b[j] = b[j], b[i] +} + +func (b bases) Less(i, j int) bool { + return b[i].langID < b[j].langID +} + +// BaseLanguages returns the result from calling s.bases if it is specified or +// otherwise derives the set of supported base languages from tags. +func (s *coverage) BaseLanguages() []Base { + if s.bases == nil { + tags := s.Tags() + if len(tags) == 0 { + return nil + } + a := make([]Base, len(tags)) + for i, t := range tags { + a[i] = Base{language.Language(t.lang())} + } + sort.Sort(bases(a)) + k := 0 + for i := 1; i < len(a); i++ { + if a[k] != a[i] { + k++ + a[k] = a[i] + } + } + return a[:k+1] + } + return s.bases() +} + +func (s *coverage) Scripts() []Script { + if s.scripts == nil { + return nil + } + return s.scripts() +} + +func (s *coverage) Regions() []Region { + if s.regions == nil { + return nil + } + return s.regions() +} + +// NewCoverage returns a Coverage for the given lists. It is typically used by +// packages providing internationalization services to define their level of +// coverage. A list may be of type []T or func() []T, where T is either Tag, +// Base, Script or Region. The returned Coverage derives the value for Bases +// from Tags if no func or slice for []Base is specified. For other unspecified +// types the returned Coverage will return nil for the respective methods. +func NewCoverage(list ...interface{}) Coverage { + s := &coverage{} + for _, x := range list { + switch v := x.(type) { + case func() []Base: + s.bases = v + case func() []Script: + s.scripts = v + case func() []Region: + s.regions = v + case func() []Tag: + s.tags = v + case []Base: + s.bases = func() []Base { return v } + case []Script: + s.scripts = func() []Script { return v } + case []Region: + s.regions = func() []Region { return v } + case []Tag: + s.tags = func() []Tag { return v } + default: + panic(fmt.Sprintf("language: unsupported set type %T", v)) + } + } + return s +} diff --git a/vendor/golang.org/x/text/language/doc.go b/vendor/golang.org/x/text/language/doc.go new file mode 100644 index 000000000..212b77c90 --- /dev/null +++ b/vendor/golang.org/x/text/language/doc.go @@ -0,0 +1,98 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package language implements BCP 47 language tags and related functionality. +// +// The most important function of package language is to match a list of +// user-preferred languages to a list of supported languages. +// It alleviates the developer of dealing with the complexity of this process +// and provides the user with the best experience +// (see https://blog.golang.org/matchlang). +// +// # Matching preferred against supported languages +// +// A Matcher for an application that supports English, Australian English, +// Danish, and standard Mandarin can be created as follows: +// +// var matcher = language.NewMatcher([]language.Tag{ +// language.English, // The first language is used as fallback. +// language.MustParse("en-AU"), +// language.Danish, +// language.Chinese, +// }) +// +// This list of supported languages is typically implied by the languages for +// which there exists translations of the user interface. +// +// User-preferred languages usually come as a comma-separated list of BCP 47 +// language tags. +// The MatchString finds best matches for such strings: +// +// handler(w http.ResponseWriter, r *http.Request) { +// lang, _ := r.Cookie("lang") +// accept := r.Header.Get("Accept-Language") +// tag, _ := language.MatchStrings(matcher, lang.String(), accept) +// +// // tag should now be used for the initialization of any +// // locale-specific service. +// } +// +// The Matcher's Match method can be used to match Tags directly. +// +// Matchers are aware of the intricacies of equivalence between languages, such +// as deprecated subtags, legacy tags, macro languages, mutual +// intelligibility between scripts and languages, and transparently passing +// BCP 47 user configuration. +// For instance, it will know that a reader of Bokmål Danish can read Norwegian +// and will know that Cantonese ("yue") is a good match for "zh-HK". +// +// # Using match results +// +// To guarantee a consistent user experience to the user it is important to +// use the same language tag for the selection of any locale-specific services. +// For example, it is utterly confusing to substitute spelled-out numbers +// or dates in one language in text of another language. +// More subtly confusing is using the wrong sorting order or casing +// algorithm for a certain language. +// +// All the packages in x/text that provide locale-specific services +// (e.g. collate, cases) should be initialized with the tag that was +// obtained at the start of an interaction with the user. +// +// Note that Tag that is returned by Match and MatchString may differ from any +// of the supported languages, as it may contain carried over settings from +// the user tags. +// This may be inconvenient when your application has some additional +// locale-specific data for your supported languages. +// Match and MatchString both return the index of the matched supported tag +// to simplify associating such data with the matched tag. +// +// # Canonicalization +// +// If one uses the Matcher to compare languages one does not need to +// worry about canonicalization. +// +// The meaning of a Tag varies per application. The language package +// therefore delays canonicalization and preserves information as much +// as possible. The Matcher, however, will always take into account that +// two different tags may represent the same language. +// +// By default, only legacy and deprecated tags are converted into their +// canonical equivalent. All other information is preserved. This approach makes +// the confidence scores more accurate and allows matchers to distinguish +// between variants that are otherwise lost. +// +// As a consequence, two tags that should be treated as identical according to +// BCP 47 or CLDR, like "en-Latn" and "en", will be represented differently. The +// Matcher handles such distinctions, though, and is aware of the +// equivalence relations. The CanonType type can be used to alter the +// canonicalization form. +// +// # References +// +// BCP 47 - Tags for Identifying Languages http://tools.ietf.org/html/bcp47 +package language // import "golang.org/x/text/language" + +// TODO: explanation on how to match languages for your own locale-specific +// service. diff --git a/vendor/golang.org/x/text/language/language.go b/vendor/golang.org/x/text/language/language.go new file mode 100644 index 000000000..4d9c66121 --- /dev/null +++ b/vendor/golang.org/x/text/language/language.go @@ -0,0 +1,605 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go -output tables.go + +package language + +// TODO: Remove above NOTE after: +// - verifying that tables are dropped correctly (most notably matcher tables). + +import ( + "strings" + + "golang.org/x/text/internal/language" + "golang.org/x/text/internal/language/compact" +) + +// Tag represents a BCP 47 language tag. It is used to specify an instance of a +// specific language or locale. All language tag values are guaranteed to be +// well-formed. +type Tag compact.Tag + +func makeTag(t language.Tag) (tag Tag) { + return Tag(compact.Make(t)) +} + +func (t *Tag) tag() language.Tag { + return (*compact.Tag)(t).Tag() +} + +func (t *Tag) isCompact() bool { + return (*compact.Tag)(t).IsCompact() +} + +// TODO: improve performance. +func (t *Tag) lang() language.Language { return t.tag().LangID } +func (t *Tag) region() language.Region { return t.tag().RegionID } +func (t *Tag) script() language.Script { return t.tag().ScriptID } + +// Make is a convenience wrapper for Parse that omits the error. +// In case of an error, a sensible default is returned. +func Make(s string) Tag { + return Default.Make(s) +} + +// Make is a convenience wrapper for c.Parse that omits the error. +// In case of an error, a sensible default is returned. +func (c CanonType) Make(s string) Tag { + t, _ := c.Parse(s) + return t +} + +// Raw returns the raw base language, script and region, without making an +// attempt to infer their values. +func (t Tag) Raw() (b Base, s Script, r Region) { + tt := t.tag() + return Base{tt.LangID}, Script{tt.ScriptID}, Region{tt.RegionID} +} + +// IsRoot returns true if t is equal to language "und". +func (t Tag) IsRoot() bool { + return compact.Tag(t).IsRoot() +} + +// CanonType can be used to enable or disable various types of canonicalization. +type CanonType int + +const ( + // Replace deprecated base languages with their preferred replacements. + DeprecatedBase CanonType = 1 << iota + // Replace deprecated scripts with their preferred replacements. + DeprecatedScript + // Replace deprecated regions with their preferred replacements. + DeprecatedRegion + // Remove redundant scripts. + SuppressScript + // Normalize legacy encodings. This includes legacy languages defined in + // CLDR as well as bibliographic codes defined in ISO-639. + Legacy + // Map the dominant language of a macro language group to the macro language + // subtag. For example cmn -> zh. + Macro + // The CLDR flag should be used if full compatibility with CLDR is required. + // There are a few cases where language.Tag may differ from CLDR. To follow all + // of CLDR's suggestions, use All|CLDR. + CLDR + + // Raw can be used to Compose or Parse without Canonicalization. + Raw CanonType = 0 + + // Replace all deprecated tags with their preferred replacements. + Deprecated = DeprecatedBase | DeprecatedScript | DeprecatedRegion + + // All canonicalizations recommended by BCP 47. + BCP47 = Deprecated | SuppressScript + + // All canonicalizations. + All = BCP47 | Legacy | Macro + + // Default is the canonicalization used by Parse, Make and Compose. To + // preserve as much information as possible, canonicalizations that remove + // potentially valuable information are not included. The Matcher is + // designed to recognize similar tags that would be the same if + // they were canonicalized using All. + Default = Deprecated | Legacy + + canonLang = DeprecatedBase | Legacy | Macro + + // TODO: LikelyScript, LikelyRegion: suppress similar to ICU. +) + +// canonicalize returns the canonicalized equivalent of the tag and +// whether there was any change. +func canonicalize(c CanonType, t language.Tag) (language.Tag, bool) { + if c == Raw { + return t, false + } + changed := false + if c&SuppressScript != 0 { + if t.LangID.SuppressScript() == t.ScriptID { + t.ScriptID = 0 + changed = true + } + } + if c&canonLang != 0 { + for { + if l, aliasType := t.LangID.Canonicalize(); l != t.LangID { + switch aliasType { + case language.Legacy: + if c&Legacy != 0 { + if t.LangID == _sh && t.ScriptID == 0 { + t.ScriptID = _Latn + } + t.LangID = l + changed = true + } + case language.Macro: + if c&Macro != 0 { + // We deviate here from CLDR. The mapping "nb" -> "no" + // qualifies as a typical Macro language mapping. However, + // for legacy reasons, CLDR maps "no", the macro language + // code for Norwegian, to the dominant variant "nb". This + // change is currently under consideration for CLDR as well. + // See https://unicode.org/cldr/trac/ticket/2698 and also + // https://unicode.org/cldr/trac/ticket/1790 for some of the + // practical implications. TODO: this check could be removed + // if CLDR adopts this change. + if c&CLDR == 0 || t.LangID != _nb { + changed = true + t.LangID = l + } + } + case language.Deprecated: + if c&DeprecatedBase != 0 { + if t.LangID == _mo && t.RegionID == 0 { + t.RegionID = _MD + } + t.LangID = l + changed = true + // Other canonicalization types may still apply. + continue + } + } + } else if c&Legacy != 0 && t.LangID == _no && c&CLDR != 0 { + t.LangID = _nb + changed = true + } + break + } + } + if c&DeprecatedScript != 0 { + if t.ScriptID == _Qaai { + changed = true + t.ScriptID = _Zinh + } + } + if c&DeprecatedRegion != 0 { + if r := t.RegionID.Canonicalize(); r != t.RegionID { + changed = true + t.RegionID = r + } + } + return t, changed +} + +// Canonicalize returns the canonicalized equivalent of the tag. +func (c CanonType) Canonicalize(t Tag) (Tag, error) { + // First try fast path. + if t.isCompact() { + if _, changed := canonicalize(c, compact.Tag(t).Tag()); !changed { + return t, nil + } + } + // It is unlikely that one will canonicalize a tag after matching. So do + // a slow but simple approach here. + if tag, changed := canonicalize(c, t.tag()); changed { + tag.RemakeString() + return makeTag(tag), nil + } + return t, nil + +} + +// Confidence indicates the level of certainty for a given return value. +// For example, Serbian may be written in Cyrillic or Latin script. +// The confidence level indicates whether a value was explicitly specified, +// whether it is typically the only possible value, or whether there is +// an ambiguity. +type Confidence int + +const ( + No Confidence = iota // full confidence that there was no match + Low // most likely value picked out of a set of alternatives + High // value is generally assumed to be the correct match + Exact // exact match or explicitly specified value +) + +var confName = []string{"No", "Low", "High", "Exact"} + +func (c Confidence) String() string { + return confName[c] +} + +// String returns the canonical string representation of the language tag. +func (t Tag) String() string { + return t.tag().String() +} + +// MarshalText implements encoding.TextMarshaler. +func (t Tag) MarshalText() (text []byte, err error) { + return t.tag().MarshalText() +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (t *Tag) UnmarshalText(text []byte) error { + var tag language.Tag + err := tag.UnmarshalText(text) + *t = makeTag(tag) + return err +} + +// Base returns the base language of the language tag. If the base language is +// unspecified, an attempt will be made to infer it from the context. +// It uses a variant of CLDR's Add Likely Subtags algorithm. This is subject to change. +func (t Tag) Base() (Base, Confidence) { + if b := t.lang(); b != 0 { + return Base{b}, Exact + } + tt := t.tag() + c := High + if tt.ScriptID == 0 && !tt.RegionID.IsCountry() { + c = Low + } + if tag, err := tt.Maximize(); err == nil && tag.LangID != 0 { + return Base{tag.LangID}, c + } + return Base{0}, No +} + +// Script infers the script for the language tag. If it was not explicitly given, it will infer +// a most likely candidate. +// If more than one script is commonly used for a language, the most likely one +// is returned with a low confidence indication. For example, it returns (Cyrl, Low) +// for Serbian. +// If a script cannot be inferred (Zzzz, No) is returned. We do not use Zyyy (undetermined) +// as one would suspect from the IANA registry for BCP 47. In a Unicode context Zyyy marks +// common characters (like 1, 2, 3, '.', etc.) and is therefore more like multiple scripts. +// See https://www.unicode.org/reports/tr24/#Values for more details. Zzzz is also used for +// unknown value in CLDR. (Zzzz, Exact) is returned if Zzzz was explicitly specified. +// Note that an inferred script is never guaranteed to be the correct one. Latin is +// almost exclusively used for Afrikaans, but Arabic has been used for some texts +// in the past. Also, the script that is commonly used may change over time. +// It uses a variant of CLDR's Add Likely Subtags algorithm. This is subject to change. +func (t Tag) Script() (Script, Confidence) { + if scr := t.script(); scr != 0 { + return Script{scr}, Exact + } + tt := t.tag() + sc, c := language.Script(_Zzzz), No + if scr := tt.LangID.SuppressScript(); scr != 0 { + // Note: it is not always the case that a language with a suppress + // script value is only written in one script (e.g. kk, ms, pa). + if tt.RegionID == 0 { + return Script{scr}, High + } + sc, c = scr, High + } + if tag, err := tt.Maximize(); err == nil { + if tag.ScriptID != sc { + sc, c = tag.ScriptID, Low + } + } else { + tt, _ = canonicalize(Deprecated|Macro, tt) + if tag, err := tt.Maximize(); err == nil && tag.ScriptID != sc { + sc, c = tag.ScriptID, Low + } + } + return Script{sc}, c +} + +// Region returns the region for the language tag. If it was not explicitly given, it will +// infer a most likely candidate from the context. +// It uses a variant of CLDR's Add Likely Subtags algorithm. This is subject to change. +func (t Tag) Region() (Region, Confidence) { + if r := t.region(); r != 0 { + return Region{r}, Exact + } + tt := t.tag() + if tt, err := tt.Maximize(); err == nil { + return Region{tt.RegionID}, Low // TODO: differentiate between high and low. + } + tt, _ = canonicalize(Deprecated|Macro, tt) + if tag, err := tt.Maximize(); err == nil { + return Region{tag.RegionID}, Low + } + return Region{_ZZ}, No // TODO: return world instead of undetermined? +} + +// Variants returns the variants specified explicitly for this language tag. +// or nil if no variant was specified. +func (t Tag) Variants() []Variant { + if !compact.Tag(t).MayHaveVariants() { + return nil + } + v := []Variant{} + x, str := "", t.tag().Variants() + for str != "" { + x, str = nextToken(str) + v = append(v, Variant{x}) + } + return v +} + +// Parent returns the CLDR parent of t. In CLDR, missing fields in data for a +// specific language are substituted with fields from the parent language. +// The parent for a language may change for newer versions of CLDR. +// +// Parent returns a tag for a less specific language that is mutually +// intelligible or Und if there is no such language. This may not be the same as +// simply stripping the last BCP 47 subtag. For instance, the parent of "zh-TW" +// is "zh-Hant", and the parent of "zh-Hant" is "und". +func (t Tag) Parent() Tag { + return Tag(compact.Tag(t).Parent()) +} + +// nextToken returns token t and the rest of the string. +func nextToken(s string) (t, tail string) { + p := strings.Index(s[1:], "-") + if p == -1 { + return s[1:], "" + } + p++ + return s[1:p], s[p:] +} + +// Extension is a single BCP 47 extension. +type Extension struct { + s string +} + +// String returns the string representation of the extension, including the +// type tag. +func (e Extension) String() string { + return e.s +} + +// ParseExtension parses s as an extension and returns it on success. +func ParseExtension(s string) (e Extension, err error) { + ext, err := language.ParseExtension(s) + return Extension{ext}, err +} + +// Type returns the one-byte extension type of e. It returns 0 for the zero +// exception. +func (e Extension) Type() byte { + if e.s == "" { + return 0 + } + return e.s[0] +} + +// Tokens returns the list of tokens of e. +func (e Extension) Tokens() []string { + return strings.Split(e.s, "-") +} + +// Extension returns the extension of type x for tag t. It will return +// false for ok if t does not have the requested extension. The returned +// extension will be invalid in this case. +func (t Tag) Extension(x byte) (ext Extension, ok bool) { + if !compact.Tag(t).MayHaveExtensions() { + return Extension{}, false + } + e, ok := t.tag().Extension(x) + return Extension{e}, ok +} + +// Extensions returns all extensions of t. +func (t Tag) Extensions() []Extension { + if !compact.Tag(t).MayHaveExtensions() { + return nil + } + e := []Extension{} + for _, ext := range t.tag().Extensions() { + e = append(e, Extension{ext}) + } + return e +} + +// TypeForKey returns the type associated with the given key, where key and type +// are of the allowed values defined for the Unicode locale extension ('u') in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +// TypeForKey will traverse the inheritance chain to get the correct value. +// +// If there are multiple types associated with a key, only the first will be +// returned. If there is no type associated with a key, it returns the empty +// string. +func (t Tag) TypeForKey(key string) string { + if !compact.Tag(t).MayHaveExtensions() { + if key != "rg" && key != "va" { + return "" + } + } + return t.tag().TypeForKey(key) +} + +// SetTypeForKey returns a new Tag with the key set to type, where key and type +// are of the allowed values defined for the Unicode locale extension ('u') in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +// An empty value removes an existing pair with the same key. +func (t Tag) SetTypeForKey(key, value string) (Tag, error) { + tt, err := t.tag().SetTypeForKey(key, value) + return makeTag(tt), err +} + +// NumCompactTags is the number of compact tags. The maximum tag is +// NumCompactTags-1. +const NumCompactTags = compact.NumCompactTags + +// CompactIndex returns an index, where 0 <= index < NumCompactTags, for tags +// for which data exists in the text repository.The index will change over time +// and should not be stored in persistent storage. If t does not match a compact +// index, exact will be false and the compact index will be returned for the +// first match after repeatedly taking the Parent of t. +func CompactIndex(t Tag) (index int, exact bool) { + id, exact := compact.LanguageID(compact.Tag(t)) + return int(id), exact +} + +var root = language.Tag{} + +// Base is an ISO 639 language code, used for encoding the base language +// of a language tag. +type Base struct { + langID language.Language +} + +// ParseBase parses a 2- or 3-letter ISO 639 code. +// It returns a ValueError if s is a well-formed but unknown language identifier +// or another error if another error occurred. +func ParseBase(s string) (Base, error) { + l, err := language.ParseBase(s) + return Base{l}, err +} + +// String returns the BCP 47 representation of the base language. +func (b Base) String() string { + return b.langID.String() +} + +// ISO3 returns the ISO 639-3 language code. +func (b Base) ISO3() string { + return b.langID.ISO3() +} + +// IsPrivateUse reports whether this language code is reserved for private use. +func (b Base) IsPrivateUse() bool { + return b.langID.IsPrivateUse() +} + +// Script is a 4-letter ISO 15924 code for representing scripts. +// It is idiomatically represented in title case. +type Script struct { + scriptID language.Script +} + +// ParseScript parses a 4-letter ISO 15924 code. +// It returns a ValueError if s is a well-formed but unknown script identifier +// or another error if another error occurred. +func ParseScript(s string) (Script, error) { + sc, err := language.ParseScript(s) + return Script{sc}, err +} + +// String returns the script code in title case. +// It returns "Zzzz" for an unspecified script. +func (s Script) String() string { + return s.scriptID.String() +} + +// IsPrivateUse reports whether this script code is reserved for private use. +func (s Script) IsPrivateUse() bool { + return s.scriptID.IsPrivateUse() +} + +// Region is an ISO 3166-1 or UN M.49 code for representing countries and regions. +type Region struct { + regionID language.Region +} + +// EncodeM49 returns the Region for the given UN M.49 code. +// It returns an error if r is not a valid code. +func EncodeM49(r int) (Region, error) { + rid, err := language.EncodeM49(r) + return Region{rid}, err +} + +// ParseRegion parses a 2- or 3-letter ISO 3166-1 or a UN M.49 code. +// It returns a ValueError if s is a well-formed but unknown region identifier +// or another error if another error occurred. +func ParseRegion(s string) (Region, error) { + r, err := language.ParseRegion(s) + return Region{r}, err +} + +// String returns the BCP 47 representation for the region. +// It returns "ZZ" for an unspecified region. +func (r Region) String() string { + return r.regionID.String() +} + +// ISO3 returns the 3-letter ISO code of r. +// Note that not all regions have a 3-letter ISO code. +// In such cases this method returns "ZZZ". +func (r Region) ISO3() string { + return r.regionID.ISO3() +} + +// M49 returns the UN M.49 encoding of r, or 0 if this encoding +// is not defined for r. +func (r Region) M49() int { + return r.regionID.M49() +} + +// IsPrivateUse reports whether r has the ISO 3166 User-assigned status. This +// may include private-use tags that are assigned by CLDR and used in this +// implementation. So IsPrivateUse and IsCountry can be simultaneously true. +func (r Region) IsPrivateUse() bool { + return r.regionID.IsPrivateUse() +} + +// IsCountry returns whether this region is a country or autonomous area. This +// includes non-standard definitions from CLDR. +func (r Region) IsCountry() bool { + return r.regionID.IsCountry() +} + +// IsGroup returns whether this region defines a collection of regions. This +// includes non-standard definitions from CLDR. +func (r Region) IsGroup() bool { + return r.regionID.IsGroup() +} + +// Contains returns whether Region c is contained by Region r. It returns true +// if c == r. +func (r Region) Contains(c Region) bool { + return r.regionID.Contains(c.regionID) +} + +// TLD returns the country code top-level domain (ccTLD). UK is returned for GB. +// In all other cases it returns either the region itself or an error. +// +// This method may return an error for a region for which there exists a +// canonical form with a ccTLD. To get that ccTLD canonicalize r first. The +// region will already be canonicalized it was obtained from a Tag that was +// obtained using any of the default methods. +func (r Region) TLD() (Region, error) { + tld, err := r.regionID.TLD() + return Region{tld}, err +} + +// Canonicalize returns the region or a possible replacement if the region is +// deprecated. It will not return a replacement for deprecated regions that +// are split into multiple regions. +func (r Region) Canonicalize() Region { + return Region{r.regionID.Canonicalize()} +} + +// Variant represents a registered variant of a language as defined by BCP 47. +type Variant struct { + variant string +} + +// ParseVariant parses and returns a Variant. An error is returned if s is not +// a valid variant. +func ParseVariant(s string) (Variant, error) { + v, err := language.ParseVariant(s) + return Variant{v.String()}, err +} + +// String returns the string representation of the variant. +func (v Variant) String() string { + return v.variant +} diff --git a/vendor/golang.org/x/text/language/match.go b/vendor/golang.org/x/text/language/match.go new file mode 100644 index 000000000..1153baf29 --- /dev/null +++ b/vendor/golang.org/x/text/language/match.go @@ -0,0 +1,735 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "errors" + "strings" + + "golang.org/x/text/internal/language" +) + +// A MatchOption configures a Matcher. +type MatchOption func(*matcher) + +// PreferSameScript will, in the absence of a match, result in the first +// preferred tag with the same script as a supported tag to match this supported +// tag. The default is currently true, but this may change in the future. +func PreferSameScript(preferSame bool) MatchOption { + return func(m *matcher) { m.preferSameScript = preferSame } +} + +// TODO(v1.0.0): consider making Matcher a concrete type, instead of interface. +// There doesn't seem to be too much need for multiple types. +// Making it a concrete type allows MatchStrings to be a method, which will +// improve its discoverability. + +// MatchStrings parses and matches the given strings until one of them matches +// the language in the Matcher. A string may be an Accept-Language header as +// handled by ParseAcceptLanguage. The default language is returned if no +// other language matched. +func MatchStrings(m Matcher, lang ...string) (tag Tag, index int) { + for _, accept := range lang { + desired, _, err := ParseAcceptLanguage(accept) + if err != nil { + continue + } + if tag, index, conf := m.Match(desired...); conf != No { + return tag, index + } + } + tag, index, _ = m.Match() + return +} + +// Matcher is the interface that wraps the Match method. +// +// Match returns the best match for any of the given tags, along with +// a unique index associated with the returned tag and a confidence +// score. +type Matcher interface { + Match(t ...Tag) (tag Tag, index int, c Confidence) +} + +// Comprehends reports the confidence score for a speaker of a given language +// to being able to comprehend the written form of an alternative language. +func Comprehends(speaker, alternative Tag) Confidence { + _, _, c := NewMatcher([]Tag{alternative}).Match(speaker) + return c +} + +// NewMatcher returns a Matcher that matches an ordered list of preferred tags +// against a list of supported tags based on written intelligibility, closeness +// of dialect, equivalence of subtags and various other rules. It is initialized +// with the list of supported tags. The first element is used as the default +// value in case no match is found. +// +// Its Match method matches the first of the given Tags to reach a certain +// confidence threshold. The tags passed to Match should therefore be specified +// in order of preference. Extensions are ignored for matching. +// +// The index returned by the Match method corresponds to the index of the +// matched tag in t, but is augmented with the Unicode extension ('u')of the +// corresponding preferred tag. This allows user locale options to be passed +// transparently. +func NewMatcher(t []Tag, options ...MatchOption) Matcher { + return newMatcher(t, options) +} + +func (m *matcher) Match(want ...Tag) (t Tag, index int, c Confidence) { + var tt language.Tag + match, w, c := m.getBest(want...) + if match != nil { + tt, index = match.tag, match.index + } else { + // TODO: this should be an option + tt = m.default_.tag + if m.preferSameScript { + outer: + for _, w := range want { + script, _ := w.Script() + if script.scriptID == 0 { + // Don't do anything if there is no script, such as with + // private subtags. + continue + } + for i, h := range m.supported { + if script.scriptID == h.maxScript { + tt, index = h.tag, i + break outer + } + } + } + } + // TODO: select first language tag based on script. + } + if w.RegionID != tt.RegionID && w.RegionID != 0 { + if w.RegionID != 0 && tt.RegionID != 0 && tt.RegionID.Contains(w.RegionID) { + tt.RegionID = w.RegionID + tt.RemakeString() + } else if r := w.RegionID.String(); len(r) == 2 { + // TODO: also filter macro and deprecated. + tt, _ = tt.SetTypeForKey("rg", strings.ToLower(r)+"zzzz") + } + } + // Copy options from the user-provided tag into the result tag. This is hard + // to do after the fact, so we do it here. + // TODO: add in alternative variants to -u-va-. + // TODO: add preferred region to -u-rg-. + if e := w.Extensions(); len(e) > 0 { + b := language.Builder{} + b.SetTag(tt) + for _, e := range e { + b.AddExt(e) + } + tt = b.Make() + } + return makeTag(tt), index, c +} + +// ErrMissingLikelyTagsData indicates no information was available +// to compute likely values of missing tags. +var ErrMissingLikelyTagsData = errors.New("missing likely tags data") + +// func (t *Tag) setTagsFrom(id Tag) { +// t.LangID = id.LangID +// t.ScriptID = id.ScriptID +// t.RegionID = id.RegionID +// } + +// Tag Matching +// CLDR defines an algorithm for finding the best match between two sets of language +// tags. The basic algorithm defines how to score a possible match and then find +// the match with the best score +// (see https://www.unicode.org/reports/tr35/#LanguageMatching). +// Using scoring has several disadvantages. The scoring obfuscates the importance of +// the various factors considered, making the algorithm harder to understand. Using +// scoring also requires the full score to be computed for each pair of tags. +// +// We will use a different algorithm which aims to have the following properties: +// - clarity on the precedence of the various selection factors, and +// - improved performance by allowing early termination of a comparison. +// +// Matching algorithm (overview) +// Input: +// - supported: a set of supported tags +// - default: the default tag to return in case there is no match +// - desired: list of desired tags, ordered by preference, starting with +// the most-preferred. +// +// Algorithm: +// 1) Set the best match to the lowest confidence level +// 2) For each tag in "desired": +// a) For each tag in "supported": +// 1) compute the match between the two tags. +// 2) if the match is better than the previous best match, replace it +// with the new match. (see next section) +// b) if the current best match is Exact and pin is true the result will be +// frozen to the language found thusfar, although better matches may +// still be found for the same language. +// 3) If the best match so far is below a certain threshold, return "default". +// +// Ranking: +// We use two phases to determine whether one pair of tags are a better match +// than another pair of tags. First, we determine a rough confidence level. If the +// levels are different, the one with the highest confidence wins. +// Second, if the rough confidence levels are identical, we use a set of tie-breaker +// rules. +// +// The confidence level of matching a pair of tags is determined by finding the +// lowest confidence level of any matches of the corresponding subtags (the +// result is deemed as good as its weakest link). +// We define the following levels: +// Exact - An exact match of a subtag, before adding likely subtags. +// MaxExact - An exact match of a subtag, after adding likely subtags. +// [See Note 2]. +// High - High level of mutual intelligibility between different subtag +// variants. +// Low - Low level of mutual intelligibility between different subtag +// variants. +// No - No mutual intelligibility. +// +// The following levels can occur for each type of subtag: +// Base: Exact, MaxExact, High, Low, No +// Script: Exact, MaxExact [see Note 3], Low, No +// Region: Exact, MaxExact, High +// Variant: Exact, High +// Private: Exact, No +// +// Any result with a confidence level of Low or higher is deemed a possible match. +// Once a desired tag matches any of the supported tags with a level of MaxExact +// or higher, the next desired tag is not considered (see Step 2.b). +// Note that CLDR provides languageMatching data that defines close equivalence +// classes for base languages, scripts and regions. +// +// Tie-breaking +// If we get the same confidence level for two matches, we apply a sequence of +// tie-breaking rules. The first that succeeds defines the result. The rules are +// applied in the following order. +// 1) Original language was defined and was identical. +// 2) Original region was defined and was identical. +// 3) Distance between two maximized regions was the smallest. +// 4) Original script was defined and was identical. +// 5) Distance from want tag to have tag using the parent relation [see Note 5.] +// If there is still no winner after these rules are applied, the first match +// found wins. +// +// Notes: +// [2] In practice, as matching of Exact is done in a separate phase from +// matching the other levels, we reuse the Exact level to mean MaxExact in +// the second phase. As a consequence, we only need the levels defined by +// the Confidence type. The MaxExact confidence level is mapped to High in +// the public API. +// [3] We do not differentiate between maximized script values that were derived +// from suppressScript versus most likely tag data. We determined that in +// ranking the two, one ranks just after the other. Moreover, the two cannot +// occur concurrently. As a consequence, they are identical for practical +// purposes. +// [4] In case of deprecated, macro-equivalents and legacy mappings, we assign +// the MaxExact level to allow iw vs he to still be a closer match than +// en-AU vs en-US, for example. +// [5] In CLDR a locale inherits fields that are unspecified for this locale +// from its parent. Therefore, if a locale is a parent of another locale, +// it is a strong measure for closeness, especially when no other tie +// breaker rule applies. One could also argue it is inconsistent, for +// example, when pt-AO matches pt (which CLDR equates with pt-BR), even +// though its parent is pt-PT according to the inheritance rules. +// +// Implementation Details: +// There are several performance considerations worth pointing out. Most notably, +// we preprocess as much as possible (within reason) at the time of creation of a +// matcher. This includes: +// - creating a per-language map, which includes data for the raw base language +// and its canonicalized variant (if applicable), +// - expanding entries for the equivalence classes defined in CLDR's +// languageMatch data. +// The per-language map ensures that typically only a very small number of tags +// need to be considered. The pre-expansion of canonicalized subtags and +// equivalence classes reduces the amount of map lookups that need to be done at +// runtime. + +// matcher keeps a set of supported language tags, indexed by language. +type matcher struct { + default_ *haveTag + supported []*haveTag + index map[language.Language]*matchHeader + passSettings bool + preferSameScript bool +} + +// matchHeader has the lists of tags for exact matches and matches based on +// maximized and canonicalized tags for a given language. +type matchHeader struct { + haveTags []*haveTag + original bool +} + +// haveTag holds a supported Tag and its maximized script and region. The maximized +// or canonicalized language is not stored as it is not needed during matching. +type haveTag struct { + tag language.Tag + + // index of this tag in the original list of supported tags. + index int + + // conf is the maximum confidence that can result from matching this haveTag. + // When conf < Exact this means it was inserted after applying a CLDR equivalence rule. + conf Confidence + + // Maximized region and script. + maxRegion language.Region + maxScript language.Script + + // altScript may be checked as an alternative match to maxScript. If altScript + // matches, the confidence level for this match is Low. Theoretically there + // could be multiple alternative scripts. This does not occur in practice. + altScript language.Script + + // nextMax is the index of the next haveTag with the same maximized tags. + nextMax uint16 +} + +func makeHaveTag(tag language.Tag, index int) (haveTag, language.Language) { + max := tag + if tag.LangID != 0 || tag.RegionID != 0 || tag.ScriptID != 0 { + max, _ = canonicalize(All, max) + max, _ = max.Maximize() + max.RemakeString() + } + return haveTag{tag, index, Exact, max.RegionID, max.ScriptID, altScript(max.LangID, max.ScriptID), 0}, max.LangID +} + +// altScript returns an alternative script that may match the given script with +// a low confidence. At the moment, the langMatch data allows for at most one +// script to map to another and we rely on this to keep the code simple. +func altScript(l language.Language, s language.Script) language.Script { + for _, alt := range matchScript { + // TODO: also match cases where language is not the same. + if (language.Language(alt.wantLang) == l || language.Language(alt.haveLang) == l) && + language.Script(alt.haveScript) == s { + return language.Script(alt.wantScript) + } + } + return 0 +} + +// addIfNew adds a haveTag to the list of tags only if it is a unique tag. +// Tags that have the same maximized values are linked by index. +func (h *matchHeader) addIfNew(n haveTag, exact bool) { + h.original = h.original || exact + // Don't add new exact matches. + for _, v := range h.haveTags { + if equalsRest(v.tag, n.tag) { + return + } + } + // Allow duplicate maximized tags, but create a linked list to allow quickly + // comparing the equivalents and bail out. + for i, v := range h.haveTags { + if v.maxScript == n.maxScript && + v.maxRegion == n.maxRegion && + v.tag.VariantOrPrivateUseTags() == n.tag.VariantOrPrivateUseTags() { + for h.haveTags[i].nextMax != 0 { + i = int(h.haveTags[i].nextMax) + } + h.haveTags[i].nextMax = uint16(len(h.haveTags)) + break + } + } + h.haveTags = append(h.haveTags, &n) +} + +// header returns the matchHeader for the given language. It creates one if +// it doesn't already exist. +func (m *matcher) header(l language.Language) *matchHeader { + if h := m.index[l]; h != nil { + return h + } + h := &matchHeader{} + m.index[l] = h + return h +} + +func toConf(d uint8) Confidence { + if d <= 10 { + return High + } + if d < 30 { + return Low + } + return No +} + +// newMatcher builds an index for the given supported tags and returns it as +// a matcher. It also expands the index by considering various equivalence classes +// for a given tag. +func newMatcher(supported []Tag, options []MatchOption) *matcher { + m := &matcher{ + index: make(map[language.Language]*matchHeader), + preferSameScript: true, + } + for _, o := range options { + o(m) + } + if len(supported) == 0 { + m.default_ = &haveTag{} + return m + } + // Add supported languages to the index. Add exact matches first to give + // them precedence. + for i, tag := range supported { + tt := tag.tag() + pair, _ := makeHaveTag(tt, i) + m.header(tt.LangID).addIfNew(pair, true) + m.supported = append(m.supported, &pair) + } + m.default_ = m.header(supported[0].lang()).haveTags[0] + // Keep these in two different loops to support the case that two equivalent + // languages are distinguished, such as iw and he. + for i, tag := range supported { + tt := tag.tag() + pair, max := makeHaveTag(tt, i) + if max != tt.LangID { + m.header(max).addIfNew(pair, true) + } + } + + // update is used to add indexes in the map for equivalent languages. + // update will only add entries to original indexes, thus not computing any + // transitive relations. + update := func(want, have uint16, conf Confidence) { + if hh := m.index[language.Language(have)]; hh != nil { + if !hh.original { + return + } + hw := m.header(language.Language(want)) + for _, ht := range hh.haveTags { + v := *ht + if conf < v.conf { + v.conf = conf + } + v.nextMax = 0 // this value needs to be recomputed + if v.altScript != 0 { + v.altScript = altScript(language.Language(want), v.maxScript) + } + hw.addIfNew(v, conf == Exact && hh.original) + } + } + } + + // Add entries for languages with mutual intelligibility as defined by CLDR's + // languageMatch data. + for _, ml := range matchLang { + update(ml.want, ml.have, toConf(ml.distance)) + if !ml.oneway { + update(ml.have, ml.want, toConf(ml.distance)) + } + } + + // Add entries for possible canonicalizations. This is an optimization to + // ensure that only one map lookup needs to be done at runtime per desired tag. + // First we match deprecated equivalents. If they are perfect equivalents + // (their canonicalization simply substitutes a different language code, but + // nothing else), the match confidence is Exact, otherwise it is High. + for i, lm := range language.AliasMap { + // If deprecated codes match and there is no fiddling with the script + // or region, we consider it an exact match. + conf := Exact + if language.AliasTypes[i] != language.Macro { + if !isExactEquivalent(language.Language(lm.From)) { + conf = High + } + update(lm.To, lm.From, conf) + } + update(lm.From, lm.To, conf) + } + return m +} + +// getBest gets the best matching tag in m for any of the given tags, taking into +// account the order of preference of the given tags. +func (m *matcher) getBest(want ...Tag) (got *haveTag, orig language.Tag, c Confidence) { + best := bestMatch{} + for i, ww := range want { + w := ww.tag() + var max language.Tag + // Check for exact match first. + h := m.index[w.LangID] + if w.LangID != 0 { + if h == nil { + continue + } + // Base language is defined. + max, _ = canonicalize(Legacy|Deprecated|Macro, w) + // A region that is added through canonicalization is stronger than + // a maximized region: set it in the original (e.g. mo -> ro-MD). + if w.RegionID != max.RegionID { + w.RegionID = max.RegionID + } + // TODO: should we do the same for scripts? + // See test case: en, sr, nl ; sh ; sr + max, _ = max.Maximize() + } else { + // Base language is not defined. + if h != nil { + for i := range h.haveTags { + have := h.haveTags[i] + if equalsRest(have.tag, w) { + return have, w, Exact + } + } + } + if w.ScriptID == 0 && w.RegionID == 0 { + // We skip all tags matching und for approximate matching, including + // private tags. + continue + } + max, _ = w.Maximize() + if h = m.index[max.LangID]; h == nil { + continue + } + } + pin := true + for _, t := range want[i+1:] { + if w.LangID == t.lang() { + pin = false + break + } + } + // Check for match based on maximized tag. + for i := range h.haveTags { + have := h.haveTags[i] + best.update(have, w, max.ScriptID, max.RegionID, pin) + if best.conf == Exact { + for have.nextMax != 0 { + have = h.haveTags[have.nextMax] + best.update(have, w, max.ScriptID, max.RegionID, pin) + } + return best.have, best.want, best.conf + } + } + } + if best.conf <= No { + if len(want) != 0 { + return nil, want[0].tag(), No + } + return nil, language.Tag{}, No + } + return best.have, best.want, best.conf +} + +// bestMatch accumulates the best match so far. +type bestMatch struct { + have *haveTag + want language.Tag + conf Confidence + pinnedRegion language.Region + pinLanguage bool + sameRegionGroup bool + // Cached results from applying tie-breaking rules. + origLang bool + origReg bool + paradigmReg bool + regGroupDist uint8 + origScript bool +} + +// update updates the existing best match if the new pair is considered to be a +// better match. To determine if the given pair is a better match, it first +// computes the rough confidence level. If this surpasses the current match, it +// will replace it and update the tie-breaker rule cache. If there is a tie, it +// proceeds with applying a series of tie-breaker rules. If there is no +// conclusive winner after applying the tie-breaker rules, it leaves the current +// match as the preferred match. +// +// If pin is true and have and tag are a strong match, it will henceforth only +// consider matches for this language. This corresponds to the idea that most +// users have a strong preference for the first defined language. A user can +// still prefer a second language over a dialect of the preferred language by +// explicitly specifying dialects, e.g. "en, nl, en-GB". In this case pin should +// be false. +func (m *bestMatch) update(have *haveTag, tag language.Tag, maxScript language.Script, maxRegion language.Region, pin bool) { + // Bail if the maximum attainable confidence is below that of the current best match. + c := have.conf + if c < m.conf { + return + } + // Don't change the language once we already have found an exact match. + if m.pinLanguage && tag.LangID != m.want.LangID { + return + } + // Pin the region group if we are comparing tags for the same language. + if tag.LangID == m.want.LangID && m.sameRegionGroup { + _, sameGroup := regionGroupDist(m.pinnedRegion, have.maxRegion, have.maxScript, m.want.LangID) + if !sameGroup { + return + } + } + if c == Exact && have.maxScript == maxScript { + // If there is another language and then another entry of this language, + // don't pin anything, otherwise pin the language. + m.pinLanguage = pin + } + if equalsRest(have.tag, tag) { + } else if have.maxScript != maxScript { + // There is usually very little comprehension between different scripts. + // In a few cases there may still be Low comprehension. This possibility + // is pre-computed and stored in have.altScript. + if Low < m.conf || have.altScript != maxScript { + return + } + c = Low + } else if have.maxRegion != maxRegion { + if High < c { + // There is usually a small difference between languages across regions. + c = High + } + } + + // We store the results of the computations of the tie-breaker rules along + // with the best match. There is no need to do the checks once we determine + // we have a winner, but we do still need to do the tie-breaker computations. + // We use "beaten" to keep track if we still need to do the checks. + beaten := false // true if the new pair defeats the current one. + if c != m.conf { + if c < m.conf { + return + } + beaten = true + } + + // Tie-breaker rules: + // We prefer if the pre-maximized language was specified and identical. + origLang := have.tag.LangID == tag.LangID && tag.LangID != 0 + if !beaten && m.origLang != origLang { + if m.origLang { + return + } + beaten = true + } + + // We prefer if the pre-maximized region was specified and identical. + origReg := have.tag.RegionID == tag.RegionID && tag.RegionID != 0 + if !beaten && m.origReg != origReg { + if m.origReg { + return + } + beaten = true + } + + regGroupDist, sameGroup := regionGroupDist(have.maxRegion, maxRegion, maxScript, tag.LangID) + if !beaten && m.regGroupDist != regGroupDist { + if regGroupDist > m.regGroupDist { + return + } + beaten = true + } + + paradigmReg := isParadigmLocale(tag.LangID, have.maxRegion) + if !beaten && m.paradigmReg != paradigmReg { + if !paradigmReg { + return + } + beaten = true + } + + // Next we prefer if the pre-maximized script was specified and identical. + origScript := have.tag.ScriptID == tag.ScriptID && tag.ScriptID != 0 + if !beaten && m.origScript != origScript { + if m.origScript { + return + } + beaten = true + } + + // Update m to the newly found best match. + if beaten { + m.have = have + m.want = tag + m.conf = c + m.pinnedRegion = maxRegion + m.sameRegionGroup = sameGroup + m.origLang = origLang + m.origReg = origReg + m.paradigmReg = paradigmReg + m.origScript = origScript + m.regGroupDist = regGroupDist + } +} + +func isParadigmLocale(lang language.Language, r language.Region) bool { + for _, e := range paradigmLocales { + if language.Language(e[0]) == lang && (r == language.Region(e[1]) || r == language.Region(e[2])) { + return true + } + } + return false +} + +// regionGroupDist computes the distance between two regions based on their +// CLDR grouping. +func regionGroupDist(a, b language.Region, script language.Script, lang language.Language) (dist uint8, same bool) { + const defaultDistance = 4 + + aGroup := uint(regionToGroups[a]) << 1 + bGroup := uint(regionToGroups[b]) << 1 + for _, ri := range matchRegion { + if language.Language(ri.lang) == lang && (ri.script == 0 || language.Script(ri.script) == script) { + group := uint(1 << (ri.group &^ 0x80)) + if 0x80&ri.group == 0 { + if aGroup&bGroup&group != 0 { // Both regions are in the group. + return ri.distance, ri.distance == defaultDistance + } + } else { + if (aGroup|bGroup)&group == 0 { // Both regions are not in the group. + return ri.distance, ri.distance == defaultDistance + } + } + } + } + return defaultDistance, true +} + +// equalsRest compares everything except the language. +func equalsRest(a, b language.Tag) bool { + // TODO: don't include extensions in this comparison. To do this efficiently, + // though, we should handle private tags separately. + return a.ScriptID == b.ScriptID && a.RegionID == b.RegionID && a.VariantOrPrivateUseTags() == b.VariantOrPrivateUseTags() +} + +// isExactEquivalent returns true if canonicalizing the language will not alter +// the script or region of a tag. +func isExactEquivalent(l language.Language) bool { + for _, o := range notEquivalent { + if o == l { + return false + } + } + return true +} + +var notEquivalent []language.Language + +func init() { + // Create a list of all languages for which canonicalization may alter the + // script or region. + for _, lm := range language.AliasMap { + tag := language.Tag{LangID: language.Language(lm.From)} + if tag, _ = canonicalize(All, tag); tag.ScriptID != 0 || tag.RegionID != 0 { + notEquivalent = append(notEquivalent, language.Language(lm.From)) + } + } + // Maximize undefined regions of paradigm locales. + for i, v := range paradigmLocales { + t := language.Tag{LangID: language.Language(v[0])} + max, _ := t.Maximize() + if v[1] == 0 { + paradigmLocales[i][1] = uint16(max.RegionID) + } + if v[2] == 0 { + paradigmLocales[i][2] = uint16(max.RegionID) + } + } +} diff --git a/vendor/golang.org/x/text/language/parse.go b/vendor/golang.org/x/text/language/parse.go new file mode 100644 index 000000000..4d57222e7 --- /dev/null +++ b/vendor/golang.org/x/text/language/parse.go @@ -0,0 +1,256 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "errors" + "sort" + "strconv" + "strings" + + "golang.org/x/text/internal/language" +) + +// ValueError is returned by any of the parsing functions when the +// input is well-formed but the respective subtag is not recognized +// as a valid value. +type ValueError interface { + error + + // Subtag returns the subtag for which the error occurred. + Subtag() string +} + +// Parse parses the given BCP 47 string and returns a valid Tag. If parsing +// failed it returns an error and any part of the tag that could be parsed. +// If parsing succeeded but an unknown value was found, it returns +// ValueError. The Tag returned in this case is just stripped of the unknown +// value. All other values are preserved. It accepts tags in the BCP 47 format +// and extensions to this standard defined in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +// The resulting tag is canonicalized using the default canonicalization type. +func Parse(s string) (t Tag, err error) { + return Default.Parse(s) +} + +// Parse parses the given BCP 47 string and returns a valid Tag. If parsing +// failed it returns an error and any part of the tag that could be parsed. +// If parsing succeeded but an unknown value was found, it returns +// ValueError. The Tag returned in this case is just stripped of the unknown +// value. All other values are preserved. It accepts tags in the BCP 47 format +// and extensions to this standard defined in +// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. +// The resulting tag is canonicalized using the canonicalization type c. +func (c CanonType) Parse(s string) (t Tag, err error) { + defer func() { + if recover() != nil { + t = Tag{} + err = language.ErrSyntax + } + }() + + tt, err := language.Parse(s) + if err != nil { + return makeTag(tt), err + } + tt, changed := canonicalize(c, tt) + if changed { + tt.RemakeString() + } + return makeTag(tt), err +} + +// Compose creates a Tag from individual parts, which may be of type Tag, Base, +// Script, Region, Variant, []Variant, Extension, []Extension or error. If a +// Base, Script or Region or slice of type Variant or Extension is passed more +// than once, the latter will overwrite the former. Variants and Extensions are +// accumulated, but if two extensions of the same type are passed, the latter +// will replace the former. For -u extensions, though, the key-type pairs are +// added, where later values overwrite older ones. A Tag overwrites all former +// values and typically only makes sense as the first argument. The resulting +// tag is returned after canonicalizing using the Default CanonType. If one or +// more errors are encountered, one of the errors is returned. +func Compose(part ...interface{}) (t Tag, err error) { + return Default.Compose(part...) +} + +// Compose creates a Tag from individual parts, which may be of type Tag, Base, +// Script, Region, Variant, []Variant, Extension, []Extension or error. If a +// Base, Script or Region or slice of type Variant or Extension is passed more +// than once, the latter will overwrite the former. Variants and Extensions are +// accumulated, but if two extensions of the same type are passed, the latter +// will replace the former. For -u extensions, though, the key-type pairs are +// added, where later values overwrite older ones. A Tag overwrites all former +// values and typically only makes sense as the first argument. The resulting +// tag is returned after canonicalizing using CanonType c. If one or more errors +// are encountered, one of the errors is returned. +func (c CanonType) Compose(part ...interface{}) (t Tag, err error) { + defer func() { + if recover() != nil { + t = Tag{} + err = language.ErrSyntax + } + }() + + var b language.Builder + if err = update(&b, part...); err != nil { + return und, err + } + b.Tag, _ = canonicalize(c, b.Tag) + return makeTag(b.Make()), err +} + +var errInvalidArgument = errors.New("invalid Extension or Variant") + +func update(b *language.Builder, part ...interface{}) (err error) { + for _, x := range part { + switch v := x.(type) { + case Tag: + b.SetTag(v.tag()) + case Base: + b.Tag.LangID = v.langID + case Script: + b.Tag.ScriptID = v.scriptID + case Region: + b.Tag.RegionID = v.regionID + case Variant: + if v.variant == "" { + err = errInvalidArgument + break + } + b.AddVariant(v.variant) + case Extension: + if v.s == "" { + err = errInvalidArgument + break + } + b.SetExt(v.s) + case []Variant: + b.ClearVariants() + for _, v := range v { + b.AddVariant(v.variant) + } + case []Extension: + b.ClearExtensions() + for _, e := range v { + b.SetExt(e.s) + } + // TODO: support parsing of raw strings based on morphology or just extensions? + case error: + if v != nil { + err = v + } + } + } + return +} + +var errInvalidWeight = errors.New("ParseAcceptLanguage: invalid weight") +var errTagListTooLarge = errors.New("tag list exceeds max length") + +// ParseAcceptLanguage parses the contents of an Accept-Language header as +// defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and +// a list of corresponding quality weights. It is more permissive than RFC 2616 +// and may return non-nil slices even if the input is not valid. +// The Tags will be sorted by highest weight first and then by first occurrence. +// Tags with a weight of zero will be dropped. An error will be returned if the +// input could not be parsed. +func ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) { + defer func() { + if recover() != nil { + tag = nil + q = nil + err = language.ErrSyntax + } + }() + + if strings.Count(s, "-") > 1000 { + return nil, nil, errTagListTooLarge + } + + var entry string + for s != "" { + if entry, s = split(s, ','); entry == "" { + continue + } + + entry, weight := split(entry, ';') + + // Scan the language. + t, err := Parse(entry) + if err != nil { + id, ok := acceptFallback[entry] + if !ok { + return nil, nil, err + } + t = makeTag(language.Tag{LangID: id}) + } + + // Scan the optional weight. + w := 1.0 + if weight != "" { + weight = consume(weight, 'q') + weight = consume(weight, '=') + // consume returns the empty string when a token could not be + // consumed, resulting in an error for ParseFloat. + if w, err = strconv.ParseFloat(weight, 32); err != nil { + return nil, nil, errInvalidWeight + } + // Drop tags with a quality weight of 0. + if w <= 0 { + continue + } + } + + tag = append(tag, t) + q = append(q, float32(w)) + } + sort.Stable(&tagSort{tag, q}) + return tag, q, nil +} + +// consume removes a leading token c from s and returns the result or the empty +// string if there is no such token. +func consume(s string, c byte) string { + if s == "" || s[0] != c { + return "" + } + return strings.TrimSpace(s[1:]) +} + +func split(s string, c byte) (head, tail string) { + if i := strings.IndexByte(s, c); i >= 0 { + return strings.TrimSpace(s[:i]), strings.TrimSpace(s[i+1:]) + } + return strings.TrimSpace(s), "" +} + +// Add hack mapping to deal with a small number of cases that occur +// in Accept-Language (with reasonable frequency). +var acceptFallback = map[string]language.Language{ + "english": _en, + "deutsch": _de, + "italian": _it, + "french": _fr, + "*": _mul, // defined in the spec to match all languages. +} + +type tagSort struct { + tag []Tag + q []float32 +} + +func (s *tagSort) Len() int { + return len(s.q) +} + +func (s *tagSort) Less(i, j int) bool { + return s.q[i] > s.q[j] +} + +func (s *tagSort) Swap(i, j int) { + s.tag[i], s.tag[j] = s.tag[j], s.tag[i] + s.q[i], s.q[j] = s.q[j], s.q[i] +} diff --git a/vendor/golang.org/x/text/language/tables.go b/vendor/golang.org/x/text/language/tables.go new file mode 100644 index 000000000..a6573dcb2 --- /dev/null +++ b/vendor/golang.org/x/text/language/tables.go @@ -0,0 +1,298 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package language + +// CLDRVersion is the CLDR version from which the tables in this package are derived. +const CLDRVersion = "32" + +const ( + _de = 269 + _en = 313 + _fr = 350 + _it = 505 + _mo = 784 + _no = 879 + _nb = 839 + _pt = 960 + _sh = 1031 + _mul = 806 + _und = 0 +) +const ( + _001 = 1 + _419 = 31 + _BR = 65 + _CA = 73 + _ES = 111 + _GB = 124 + _MD = 189 + _PT = 239 + _UK = 307 + _US = 310 + _ZZ = 358 + _XA = 324 + _XC = 326 + _XK = 334 +) +const ( + _Latn = 91 + _Hani = 57 + _Hans = 59 + _Hant = 60 + _Qaaa = 149 + _Qaai = 157 + _Qabx = 198 + _Zinh = 255 + _Zyyy = 260 + _Zzzz = 261 +) + +var regionToGroups = []uint8{ // 359 elements + // Entry 0 - 3F + 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x04, + // Entry 40 - 7F + 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, + 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, + // Entry 80 - BF + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x04, 0x01, 0x00, 0x04, 0x02, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x04, + // Entry C0 - FF + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x01, 0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // Entry 100 - 13F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, + 0x00, 0x00, 0x04, 0x00, 0x04, 0x04, 0x05, 0x00, + // Entry 140 - 17F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +} // Size: 383 bytes + +var paradigmLocales = [][3]uint16{ // 3 elements + 0: [3]uint16{0x139, 0x0, 0x7c}, + 1: [3]uint16{0x13e, 0x0, 0x1f}, + 2: [3]uint16{0x3c0, 0x41, 0xef}, +} // Size: 42 bytes + +type mutualIntelligibility struct { + want uint16 + have uint16 + distance uint8 + oneway bool +} +type scriptIntelligibility struct { + wantLang uint16 + haveLang uint16 + wantScript uint8 + haveScript uint8 + distance uint8 +} +type regionIntelligibility struct { + lang uint16 + script uint8 + group uint8 + distance uint8 +} + +// matchLang holds pairs of langIDs of base languages that are typically +// mutually intelligible. Each pair is associated with a confidence and +// whether the intelligibility goes one or both ways. +var matchLang = []mutualIntelligibility{ // 113 elements + 0: {want: 0x1d1, have: 0xb7, distance: 0x4, oneway: false}, + 1: {want: 0x407, have: 0xb7, distance: 0x4, oneway: false}, + 2: {want: 0x407, have: 0x1d1, distance: 0x4, oneway: false}, + 3: {want: 0x407, have: 0x432, distance: 0x4, oneway: false}, + 4: {want: 0x43a, have: 0x1, distance: 0x4, oneway: false}, + 5: {want: 0x1a3, have: 0x10d, distance: 0x4, oneway: true}, + 6: {want: 0x295, have: 0x10d, distance: 0x4, oneway: true}, + 7: {want: 0x101, have: 0x36f, distance: 0x8, oneway: false}, + 8: {want: 0x101, have: 0x347, distance: 0x8, oneway: false}, + 9: {want: 0x5, have: 0x3e2, distance: 0xa, oneway: true}, + 10: {want: 0xd, have: 0x139, distance: 0xa, oneway: true}, + 11: {want: 0x16, have: 0x367, distance: 0xa, oneway: true}, + 12: {want: 0x21, have: 0x139, distance: 0xa, oneway: true}, + 13: {want: 0x56, have: 0x13e, distance: 0xa, oneway: true}, + 14: {want: 0x58, have: 0x3e2, distance: 0xa, oneway: true}, + 15: {want: 0x71, have: 0x3e2, distance: 0xa, oneway: true}, + 16: {want: 0x75, have: 0x139, distance: 0xa, oneway: true}, + 17: {want: 0x82, have: 0x1be, distance: 0xa, oneway: true}, + 18: {want: 0xa5, have: 0x139, distance: 0xa, oneway: true}, + 19: {want: 0xb2, have: 0x15e, distance: 0xa, oneway: true}, + 20: {want: 0xdd, have: 0x153, distance: 0xa, oneway: true}, + 21: {want: 0xe5, have: 0x139, distance: 0xa, oneway: true}, + 22: {want: 0xe9, have: 0x3a, distance: 0xa, oneway: true}, + 23: {want: 0xf0, have: 0x15e, distance: 0xa, oneway: true}, + 24: {want: 0xf9, have: 0x15e, distance: 0xa, oneway: true}, + 25: {want: 0x100, have: 0x139, distance: 0xa, oneway: true}, + 26: {want: 0x130, have: 0x139, distance: 0xa, oneway: true}, + 27: {want: 0x13c, have: 0x139, distance: 0xa, oneway: true}, + 28: {want: 0x140, have: 0x151, distance: 0xa, oneway: true}, + 29: {want: 0x145, have: 0x13e, distance: 0xa, oneway: true}, + 30: {want: 0x158, have: 0x101, distance: 0xa, oneway: true}, + 31: {want: 0x16d, have: 0x367, distance: 0xa, oneway: true}, + 32: {want: 0x16e, have: 0x139, distance: 0xa, oneway: true}, + 33: {want: 0x16f, have: 0x139, distance: 0xa, oneway: true}, + 34: {want: 0x17e, have: 0x139, distance: 0xa, oneway: true}, + 35: {want: 0x190, have: 0x13e, distance: 0xa, oneway: true}, + 36: {want: 0x194, have: 0x13e, distance: 0xa, oneway: true}, + 37: {want: 0x1a4, have: 0x1be, distance: 0xa, oneway: true}, + 38: {want: 0x1b4, have: 0x139, distance: 0xa, oneway: true}, + 39: {want: 0x1b8, have: 0x139, distance: 0xa, oneway: true}, + 40: {want: 0x1d4, have: 0x15e, distance: 0xa, oneway: true}, + 41: {want: 0x1d7, have: 0x3e2, distance: 0xa, oneway: true}, + 42: {want: 0x1d9, have: 0x139, distance: 0xa, oneway: true}, + 43: {want: 0x1e7, have: 0x139, distance: 0xa, oneway: true}, + 44: {want: 0x1f8, have: 0x139, distance: 0xa, oneway: true}, + 45: {want: 0x20e, have: 0x1e1, distance: 0xa, oneway: true}, + 46: {want: 0x210, have: 0x139, distance: 0xa, oneway: true}, + 47: {want: 0x22d, have: 0x15e, distance: 0xa, oneway: true}, + 48: {want: 0x242, have: 0x3e2, distance: 0xa, oneway: true}, + 49: {want: 0x24a, have: 0x139, distance: 0xa, oneway: true}, + 50: {want: 0x251, have: 0x139, distance: 0xa, oneway: true}, + 51: {want: 0x265, have: 0x139, distance: 0xa, oneway: true}, + 52: {want: 0x274, have: 0x48a, distance: 0xa, oneway: true}, + 53: {want: 0x28a, have: 0x3e2, distance: 0xa, oneway: true}, + 54: {want: 0x28e, have: 0x1f9, distance: 0xa, oneway: true}, + 55: {want: 0x2a3, have: 0x139, distance: 0xa, oneway: true}, + 56: {want: 0x2b5, have: 0x15e, distance: 0xa, oneway: true}, + 57: {want: 0x2b8, have: 0x139, distance: 0xa, oneway: true}, + 58: {want: 0x2be, have: 0x139, distance: 0xa, oneway: true}, + 59: {want: 0x2c3, have: 0x15e, distance: 0xa, oneway: true}, + 60: {want: 0x2ed, have: 0x139, distance: 0xa, oneway: true}, + 61: {want: 0x2f1, have: 0x15e, distance: 0xa, oneway: true}, + 62: {want: 0x2fa, have: 0x139, distance: 0xa, oneway: true}, + 63: {want: 0x2ff, have: 0x7e, distance: 0xa, oneway: true}, + 64: {want: 0x304, have: 0x139, distance: 0xa, oneway: true}, + 65: {want: 0x30b, have: 0x3e2, distance: 0xa, oneway: true}, + 66: {want: 0x31b, have: 0x1be, distance: 0xa, oneway: true}, + 67: {want: 0x31f, have: 0x1e1, distance: 0xa, oneway: true}, + 68: {want: 0x320, have: 0x139, distance: 0xa, oneway: true}, + 69: {want: 0x331, have: 0x139, distance: 0xa, oneway: true}, + 70: {want: 0x351, have: 0x139, distance: 0xa, oneway: true}, + 71: {want: 0x36a, have: 0x347, distance: 0xa, oneway: false}, + 72: {want: 0x36a, have: 0x36f, distance: 0xa, oneway: true}, + 73: {want: 0x37a, have: 0x139, distance: 0xa, oneway: true}, + 74: {want: 0x387, have: 0x139, distance: 0xa, oneway: true}, + 75: {want: 0x389, have: 0x139, distance: 0xa, oneway: true}, + 76: {want: 0x38b, have: 0x15e, distance: 0xa, oneway: true}, + 77: {want: 0x390, have: 0x139, distance: 0xa, oneway: true}, + 78: {want: 0x395, have: 0x139, distance: 0xa, oneway: true}, + 79: {want: 0x39d, have: 0x139, distance: 0xa, oneway: true}, + 80: {want: 0x3a5, have: 0x139, distance: 0xa, oneway: true}, + 81: {want: 0x3be, have: 0x139, distance: 0xa, oneway: true}, + 82: {want: 0x3c4, have: 0x13e, distance: 0xa, oneway: true}, + 83: {want: 0x3d4, have: 0x10d, distance: 0xa, oneway: true}, + 84: {want: 0x3d9, have: 0x139, distance: 0xa, oneway: true}, + 85: {want: 0x3e5, have: 0x15e, distance: 0xa, oneway: true}, + 86: {want: 0x3e9, have: 0x1be, distance: 0xa, oneway: true}, + 87: {want: 0x3fa, have: 0x139, distance: 0xa, oneway: true}, + 88: {want: 0x40c, have: 0x139, distance: 0xa, oneway: true}, + 89: {want: 0x423, have: 0x139, distance: 0xa, oneway: true}, + 90: {want: 0x429, have: 0x139, distance: 0xa, oneway: true}, + 91: {want: 0x431, have: 0x139, distance: 0xa, oneway: true}, + 92: {want: 0x43b, have: 0x139, distance: 0xa, oneway: true}, + 93: {want: 0x43e, have: 0x1e1, distance: 0xa, oneway: true}, + 94: {want: 0x445, have: 0x139, distance: 0xa, oneway: true}, + 95: {want: 0x450, have: 0x139, distance: 0xa, oneway: true}, + 96: {want: 0x461, have: 0x139, distance: 0xa, oneway: true}, + 97: {want: 0x467, have: 0x3e2, distance: 0xa, oneway: true}, + 98: {want: 0x46f, have: 0x139, distance: 0xa, oneway: true}, + 99: {want: 0x476, have: 0x3e2, distance: 0xa, oneway: true}, + 100: {want: 0x3883, have: 0x139, distance: 0xa, oneway: true}, + 101: {want: 0x480, have: 0x139, distance: 0xa, oneway: true}, + 102: {want: 0x482, have: 0x139, distance: 0xa, oneway: true}, + 103: {want: 0x494, have: 0x3e2, distance: 0xa, oneway: true}, + 104: {want: 0x49d, have: 0x139, distance: 0xa, oneway: true}, + 105: {want: 0x4ac, have: 0x529, distance: 0xa, oneway: true}, + 106: {want: 0x4b4, have: 0x139, distance: 0xa, oneway: true}, + 107: {want: 0x4bc, have: 0x3e2, distance: 0xa, oneway: true}, + 108: {want: 0x4e5, have: 0x15e, distance: 0xa, oneway: true}, + 109: {want: 0x4f2, have: 0x139, distance: 0xa, oneway: true}, + 110: {want: 0x512, have: 0x139, distance: 0xa, oneway: true}, + 111: {want: 0x518, have: 0x139, distance: 0xa, oneway: true}, + 112: {want: 0x52f, have: 0x139, distance: 0xa, oneway: true}, +} // Size: 702 bytes + +// matchScript holds pairs of scriptIDs where readers of one script +// can typically also read the other. Each is associated with a confidence. +var matchScript = []scriptIntelligibility{ // 26 elements + 0: {wantLang: 0x432, haveLang: 0x432, wantScript: 0x5b, haveScript: 0x20, distance: 0x5}, + 1: {wantLang: 0x432, haveLang: 0x432, wantScript: 0x20, haveScript: 0x5b, distance: 0x5}, + 2: {wantLang: 0x58, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa}, + 3: {wantLang: 0xa5, haveLang: 0x139, wantScript: 0xe, haveScript: 0x5b, distance: 0xa}, + 4: {wantLang: 0x1d7, haveLang: 0x3e2, wantScript: 0x8, haveScript: 0x20, distance: 0xa}, + 5: {wantLang: 0x210, haveLang: 0x139, wantScript: 0x2e, haveScript: 0x5b, distance: 0xa}, + 6: {wantLang: 0x24a, haveLang: 0x139, wantScript: 0x4f, haveScript: 0x5b, distance: 0xa}, + 7: {wantLang: 0x251, haveLang: 0x139, wantScript: 0x53, haveScript: 0x5b, distance: 0xa}, + 8: {wantLang: 0x2b8, haveLang: 0x139, wantScript: 0x58, haveScript: 0x5b, distance: 0xa}, + 9: {wantLang: 0x304, haveLang: 0x139, wantScript: 0x6f, haveScript: 0x5b, distance: 0xa}, + 10: {wantLang: 0x331, haveLang: 0x139, wantScript: 0x76, haveScript: 0x5b, distance: 0xa}, + 11: {wantLang: 0x351, haveLang: 0x139, wantScript: 0x22, haveScript: 0x5b, distance: 0xa}, + 12: {wantLang: 0x395, haveLang: 0x139, wantScript: 0x83, haveScript: 0x5b, distance: 0xa}, + 13: {wantLang: 0x39d, haveLang: 0x139, wantScript: 0x36, haveScript: 0x5b, distance: 0xa}, + 14: {wantLang: 0x3be, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa}, + 15: {wantLang: 0x3fa, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa}, + 16: {wantLang: 0x40c, haveLang: 0x139, wantScript: 0xd6, haveScript: 0x5b, distance: 0xa}, + 17: {wantLang: 0x450, haveLang: 0x139, wantScript: 0xe6, haveScript: 0x5b, distance: 0xa}, + 18: {wantLang: 0x461, haveLang: 0x139, wantScript: 0xe9, haveScript: 0x5b, distance: 0xa}, + 19: {wantLang: 0x46f, haveLang: 0x139, wantScript: 0x2c, haveScript: 0x5b, distance: 0xa}, + 20: {wantLang: 0x476, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa}, + 21: {wantLang: 0x4b4, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa}, + 22: {wantLang: 0x4bc, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa}, + 23: {wantLang: 0x512, haveLang: 0x139, wantScript: 0x3e, haveScript: 0x5b, distance: 0xa}, + 24: {wantLang: 0x529, haveLang: 0x529, wantScript: 0x3b, haveScript: 0x3c, distance: 0xf}, + 25: {wantLang: 0x529, haveLang: 0x529, wantScript: 0x3c, haveScript: 0x3b, distance: 0x13}, +} // Size: 232 bytes + +var matchRegion = []regionIntelligibility{ // 15 elements + 0: {lang: 0x3a, script: 0x0, group: 0x4, distance: 0x4}, + 1: {lang: 0x3a, script: 0x0, group: 0x84, distance: 0x4}, + 2: {lang: 0x139, script: 0x0, group: 0x1, distance: 0x4}, + 3: {lang: 0x139, script: 0x0, group: 0x81, distance: 0x4}, + 4: {lang: 0x13e, script: 0x0, group: 0x3, distance: 0x4}, + 5: {lang: 0x13e, script: 0x0, group: 0x83, distance: 0x4}, + 6: {lang: 0x3c0, script: 0x0, group: 0x3, distance: 0x4}, + 7: {lang: 0x3c0, script: 0x0, group: 0x83, distance: 0x4}, + 8: {lang: 0x529, script: 0x3c, group: 0x2, distance: 0x4}, + 9: {lang: 0x529, script: 0x3c, group: 0x82, distance: 0x4}, + 10: {lang: 0x3a, script: 0x0, group: 0x80, distance: 0x5}, + 11: {lang: 0x139, script: 0x0, group: 0x80, distance: 0x5}, + 12: {lang: 0x13e, script: 0x0, group: 0x80, distance: 0x5}, + 13: {lang: 0x3c0, script: 0x0, group: 0x80, distance: 0x5}, + 14: {lang: 0x529, script: 0x3c, group: 0x80, distance: 0x5}, +} // Size: 114 bytes + +// Total table size 1473 bytes (1KiB); checksum: 7BB90B5C diff --git a/vendor/golang.org/x/text/language/tags.go b/vendor/golang.org/x/text/language/tags.go new file mode 100644 index 000000000..42ea79266 --- /dev/null +++ b/vendor/golang.org/x/text/language/tags.go @@ -0,0 +1,145 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import "golang.org/x/text/internal/language/compact" + +// TODO: Various sets of commonly use tags and regions. + +// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed. +// It simplifies safe initialization of Tag values. +func MustParse(s string) Tag { + t, err := Parse(s) + if err != nil { + panic(err) + } + return t +} + +// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed. +// It simplifies safe initialization of Tag values. +func (c CanonType) MustParse(s string) Tag { + t, err := c.Parse(s) + if err != nil { + panic(err) + } + return t +} + +// MustParseBase is like ParseBase, but panics if the given base cannot be parsed. +// It simplifies safe initialization of Base values. +func MustParseBase(s string) Base { + b, err := ParseBase(s) + if err != nil { + panic(err) + } + return b +} + +// MustParseScript is like ParseScript, but panics if the given script cannot be +// parsed. It simplifies safe initialization of Script values. +func MustParseScript(s string) Script { + scr, err := ParseScript(s) + if err != nil { + panic(err) + } + return scr +} + +// MustParseRegion is like ParseRegion, but panics if the given region cannot be +// parsed. It simplifies safe initialization of Region values. +func MustParseRegion(s string) Region { + r, err := ParseRegion(s) + if err != nil { + panic(err) + } + return r +} + +var ( + und = Tag{} + + Und Tag = Tag{} + + Afrikaans Tag = Tag(compact.Afrikaans) + Amharic Tag = Tag(compact.Amharic) + Arabic Tag = Tag(compact.Arabic) + ModernStandardArabic Tag = Tag(compact.ModernStandardArabic) + Azerbaijani Tag = Tag(compact.Azerbaijani) + Bulgarian Tag = Tag(compact.Bulgarian) + Bengali Tag = Tag(compact.Bengali) + Catalan Tag = Tag(compact.Catalan) + Czech Tag = Tag(compact.Czech) + Danish Tag = Tag(compact.Danish) + German Tag = Tag(compact.German) + Greek Tag = Tag(compact.Greek) + English Tag = Tag(compact.English) + AmericanEnglish Tag = Tag(compact.AmericanEnglish) + BritishEnglish Tag = Tag(compact.BritishEnglish) + Spanish Tag = Tag(compact.Spanish) + EuropeanSpanish Tag = Tag(compact.EuropeanSpanish) + LatinAmericanSpanish Tag = Tag(compact.LatinAmericanSpanish) + Estonian Tag = Tag(compact.Estonian) + Persian Tag = Tag(compact.Persian) + Finnish Tag = Tag(compact.Finnish) + Filipino Tag = Tag(compact.Filipino) + French Tag = Tag(compact.French) + CanadianFrench Tag = Tag(compact.CanadianFrench) + Gujarati Tag = Tag(compact.Gujarati) + Hebrew Tag = Tag(compact.Hebrew) + Hindi Tag = Tag(compact.Hindi) + Croatian Tag = Tag(compact.Croatian) + Hungarian Tag = Tag(compact.Hungarian) + Armenian Tag = Tag(compact.Armenian) + Indonesian Tag = Tag(compact.Indonesian) + Icelandic Tag = Tag(compact.Icelandic) + Italian Tag = Tag(compact.Italian) + Japanese Tag = Tag(compact.Japanese) + Georgian Tag = Tag(compact.Georgian) + Kazakh Tag = Tag(compact.Kazakh) + Khmer Tag = Tag(compact.Khmer) + Kannada Tag = Tag(compact.Kannada) + Korean Tag = Tag(compact.Korean) + Kirghiz Tag = Tag(compact.Kirghiz) + Lao Tag = Tag(compact.Lao) + Lithuanian Tag = Tag(compact.Lithuanian) + Latvian Tag = Tag(compact.Latvian) + Macedonian Tag = Tag(compact.Macedonian) + Malayalam Tag = Tag(compact.Malayalam) + Mongolian Tag = Tag(compact.Mongolian) + Marathi Tag = Tag(compact.Marathi) + Malay Tag = Tag(compact.Malay) + Burmese Tag = Tag(compact.Burmese) + Nepali Tag = Tag(compact.Nepali) + Dutch Tag = Tag(compact.Dutch) + Norwegian Tag = Tag(compact.Norwegian) + Punjabi Tag = Tag(compact.Punjabi) + Polish Tag = Tag(compact.Polish) + Portuguese Tag = Tag(compact.Portuguese) + BrazilianPortuguese Tag = Tag(compact.BrazilianPortuguese) + EuropeanPortuguese Tag = Tag(compact.EuropeanPortuguese) + Romanian Tag = Tag(compact.Romanian) + Russian Tag = Tag(compact.Russian) + Sinhala Tag = Tag(compact.Sinhala) + Slovak Tag = Tag(compact.Slovak) + Slovenian Tag = Tag(compact.Slovenian) + Albanian Tag = Tag(compact.Albanian) + Serbian Tag = Tag(compact.Serbian) + SerbianLatin Tag = Tag(compact.SerbianLatin) + Swedish Tag = Tag(compact.Swedish) + Swahili Tag = Tag(compact.Swahili) + Tamil Tag = Tag(compact.Tamil) + Telugu Tag = Tag(compact.Telugu) + Thai Tag = Tag(compact.Thai) + Turkish Tag = Tag(compact.Turkish) + Ukrainian Tag = Tag(compact.Ukrainian) + Urdu Tag = Tag(compact.Urdu) + Uzbek Tag = Tag(compact.Uzbek) + Vietnamese Tag = Tag(compact.Vietnamese) + Chinese Tag = Tag(compact.Chinese) + SimplifiedChinese Tag = Tag(compact.SimplifiedChinese) + TraditionalChinese Tag = Tag(compact.TraditionalChinese) + Zulu Tag = Tag(compact.Zulu) +) diff --git a/vendor/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE new file mode 100644 index 000000000..2a7cf70da --- /dev/null +++ b/vendor/golang.org/x/tools/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +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. + * Neither the name of Google LLC 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 +OWNER 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/vendor/golang.org/x/tools/PATENTS b/vendor/golang.org/x/tools/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/golang.org/x/tools/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/tools/cover/profile.go b/vendor/golang.org/x/tools/cover/profile.go new file mode 100644 index 000000000..47a9a5411 --- /dev/null +++ b/vendor/golang.org/x/tools/cover/profile.go @@ -0,0 +1,266 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package cover provides support for parsing coverage profiles +// generated by "go test -coverprofile=cover.out". +package cover // import "golang.org/x/tools/cover" + +import ( + "bufio" + "errors" + "fmt" + "io" + "math" + "os" + "sort" + "strconv" + "strings" +) + +// Profile represents the profiling data for a specific file. +type Profile struct { + FileName string + Mode string + Blocks []ProfileBlock +} + +// ProfileBlock represents a single block of profiling data. +type ProfileBlock struct { + StartLine, StartCol int + EndLine, EndCol int + NumStmt, Count int +} + +type byFileName []*Profile + +func (p byFileName) Len() int { return len(p) } +func (p byFileName) Less(i, j int) bool { return p[i].FileName < p[j].FileName } +func (p byFileName) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// ParseProfiles parses profile data in the specified file and returns a +// Profile for each source file described therein. +func ParseProfiles(fileName string) ([]*Profile, error) { + pf, err := os.Open(fileName) + if err != nil { + return nil, err + } + defer pf.Close() + return ParseProfilesFromReader(pf) +} + +// ParseProfilesFromReader parses profile data from the Reader and +// returns a Profile for each source file described therein. +func ParseProfilesFromReader(rd io.Reader) ([]*Profile, error) { + // First line is "mode: foo", where foo is "set", "count", or "atomic". + // Rest of file is in the format + // encoding/base64/base64.go:34.44,37.40 3 1 + // where the fields are: name.go:line.column,line.column numberOfStatements count + files := make(map[string]*Profile) + s := bufio.NewScanner(rd) + mode := "" + for s.Scan() { + line := s.Text() + if mode == "" { + const p = "mode: " + if !strings.HasPrefix(line, p) || line == p { + return nil, fmt.Errorf("bad mode line: %v", line) + } + mode = line[len(p):] + continue + } + fn, b, err := parseLine(line) + if err != nil { + return nil, fmt.Errorf("line %q doesn't match expected format: %v", line, err) + } + p := files[fn] + if p == nil { + p = &Profile{ + FileName: fn, + Mode: mode, + } + files[fn] = p + } + p.Blocks = append(p.Blocks, b) + } + if err := s.Err(); err != nil { + return nil, err + } + for _, p := range files { + sort.Sort(blocksByStart(p.Blocks)) + // Merge samples from the same location. + j := 1 + for i := 1; i < len(p.Blocks); i++ { + b := p.Blocks[i] + last := p.Blocks[j-1] + if b.StartLine == last.StartLine && + b.StartCol == last.StartCol && + b.EndLine == last.EndLine && + b.EndCol == last.EndCol { + if b.NumStmt != last.NumStmt { + return nil, fmt.Errorf("inconsistent NumStmt: changed from %d to %d", last.NumStmt, b.NumStmt) + } + if mode == "set" { + p.Blocks[j-1].Count |= b.Count + } else { + p.Blocks[j-1].Count += b.Count + } + continue + } + p.Blocks[j] = b + j++ + } + p.Blocks = p.Blocks[:j] + } + // Generate a sorted slice. + profiles := make([]*Profile, 0, len(files)) + for _, profile := range files { + profiles = append(profiles, profile) + } + sort.Sort(byFileName(profiles)) + return profiles, nil +} + +// parseLine parses a line from a coverage file. +// It is equivalent to the regex +// ^(.+):([0-9]+)\.([0-9]+),([0-9]+)\.([0-9]+) ([0-9]+) ([0-9]+)$ +// +// However, it is much faster: https://golang.org/cl/179377 +func parseLine(l string) (fileName string, block ProfileBlock, err error) { + end := len(l) + + b := ProfileBlock{} + b.Count, end, err = seekBack(l, ' ', end, "Count") + if err != nil { + return "", b, err + } + b.NumStmt, end, err = seekBack(l, ' ', end, "NumStmt") + if err != nil { + return "", b, err + } + b.EndCol, end, err = seekBack(l, '.', end, "EndCol") + if err != nil { + return "", b, err + } + b.EndLine, end, err = seekBack(l, ',', end, "EndLine") + if err != nil { + return "", b, err + } + b.StartCol, end, err = seekBack(l, '.', end, "StartCol") + if err != nil { + return "", b, err + } + b.StartLine, end, err = seekBack(l, ':', end, "StartLine") + if err != nil { + return "", b, err + } + fn := l[0:end] + if fn == "" { + return "", b, errors.New("a FileName cannot be blank") + } + return fn, b, nil +} + +// seekBack searches backwards from end to find sep in l, then returns the +// value between sep and end as an integer. +// If seekBack fails, the returned error will reference what. +func seekBack(l string, sep byte, end int, what string) (value int, nextSep int, err error) { + // Since we're seeking backwards and we know only ASCII is legal for these values, + // we can ignore the possibility of non-ASCII characters. + for start := end - 1; start >= 0; start-- { + if l[start] == sep { + i, err := strconv.Atoi(l[start+1 : end]) + if err != nil { + return 0, 0, fmt.Errorf("couldn't parse %q: %v", what, err) + } + if i < 0 { + return 0, 0, fmt.Errorf("negative values are not allowed for %s, found %d", what, i) + } + return i, start, nil + } + } + return 0, 0, fmt.Errorf("couldn't find a %s before %s", string(sep), what) +} + +type blocksByStart []ProfileBlock + +func (b blocksByStart) Len() int { return len(b) } +func (b blocksByStart) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b blocksByStart) Less(i, j int) bool { + bi, bj := b[i], b[j] + return bi.StartLine < bj.StartLine || bi.StartLine == bj.StartLine && bi.StartCol < bj.StartCol +} + +// Boundary represents the position in a source file of the beginning or end of a +// block as reported by the coverage profile. In HTML mode, it will correspond to +// the opening or closing of a <span> tag and will be used to colorize the source +type Boundary struct { + Offset int // Location as a byte offset in the source file. + Start bool // Is this the start of a block? + Count int // Event count from the cover profile. + Norm float64 // Count normalized to [0..1]. + Index int // Order in input file. +} + +// Boundaries returns a Profile as a set of Boundary objects within the provided src. +func (p *Profile) Boundaries(src []byte) (boundaries []Boundary) { + // Find maximum count. + max := 0 + for _, b := range p.Blocks { + if b.Count > max { + max = b.Count + } + } + // Divisor for normalization. + divisor := math.Log(float64(max)) + + // boundary returns a Boundary, populating the Norm field with a normalized Count. + index := 0 + boundary := func(offset int, start bool, count int) Boundary { + b := Boundary{Offset: offset, Start: start, Count: count, Index: index} + index++ + if !start || count == 0 { + return b + } + if max <= 1 { + b.Norm = 0.8 // Profile is in"set" mode; we want a heat map. Use cov8 in the CSS. + } else if count > 0 { + b.Norm = math.Log(float64(count)) / divisor + } + return b + } + + line, col := 1, 2 // TODO: Why is this 2? + for si, bi := 0, 0; si < len(src) && bi < len(p.Blocks); { + b := p.Blocks[bi] + if b.StartLine == line && b.StartCol == col { + boundaries = append(boundaries, boundary(si, true, b.Count)) + } + if b.EndLine == line && b.EndCol == col || line > b.EndLine { + boundaries = append(boundaries, boundary(si, false, 0)) + bi++ + continue // Don't advance through src; maybe the next block starts here. + } + if src[si] == '\n' { + line++ + col = 0 + } + col++ + si++ + } + sort.Sort(boundariesByPos(boundaries)) + return +} + +type boundariesByPos []Boundary + +func (b boundariesByPos) Len() int { return len(b) } +func (b boundariesByPos) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b boundariesByPos) Less(i, j int) bool { + if b[i].Offset == b[j].Offset { + // Boundaries at the same offset should be ordered according to + // their original position. + return b[i].Index < b[j].Index + } + return b[i].Offset < b[j].Offset +} diff --git a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go new file mode 100644 index 000000000..0e0ba4c03 --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go @@ -0,0 +1,229 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package inspector provides helper functions for traversal over the +// syntax trees of a package, including node filtering by type, and +// materialization of the traversal stack. +// +// During construction, the inspector does a complete traversal and +// builds a list of push/pop events and their node type. Subsequent +// method calls that request a traversal scan this list, rather than walk +// the AST, and perform type filtering using efficient bit sets. +// +// Experiments suggest the inspector's traversals are about 2.5x faster +// than ast.Inspect, but it may take around 5 traversals for this +// benefit to amortize the inspector's construction cost. +// If efficiency is the primary concern, do not use Inspector for +// one-off traversals. +package inspector + +// There are four orthogonal features in a traversal: +// 1 type filtering +// 2 pruning +// 3 postorder calls to f +// 4 stack +// Rather than offer all of them in the API, +// only a few combinations are exposed: +// - Preorder is the fastest and has fewest features, +// but is the most commonly needed traversal. +// - Nodes and WithStack both provide pruning and postorder calls, +// even though few clients need it, because supporting two versions +// is not justified. +// More combinations could be supported by expressing them as +// wrappers around a more generic traversal, but this was measured +// and found to degrade performance significantly (30%). + +import ( + "go/ast" +) + +// An Inspector provides methods for inspecting +// (traversing) the syntax trees of a package. +type Inspector struct { + events []event +} + +// New returns an Inspector for the specified syntax trees. +func New(files []*ast.File) *Inspector { + return &Inspector{traverse(files)} +} + +// An event represents a push or a pop +// of an ast.Node during a traversal. +type event struct { + node ast.Node + typ uint64 // typeOf(node) on push event, or union of typ strictly between push and pop events on pop events + index int // index of corresponding push or pop event +} + +// TODO: Experiment with storing only the second word of event.node (unsafe.Pointer). +// Type can be recovered from the sole bit in typ. + +// Preorder visits all the nodes of the files supplied to New in +// depth-first order. It calls f(n) for each node n before it visits +// n's children. +// +// The complete traversal sequence is determined by ast.Inspect. +// The types argument, if non-empty, enables type-based filtering of +// events. The function f is called only for nodes whose type +// matches an element of the types slice. +func (in *Inspector) Preorder(types []ast.Node, f func(ast.Node)) { + // Because it avoids postorder calls to f, and the pruning + // check, Preorder is almost twice as fast as Nodes. The two + // features seem to contribute similar slowdowns (~1.4x each). + + // This function is equivalent to the PreorderSeq call below, + // but to avoid the additional dynamic call (which adds 13-35% + // to the benchmarks), we expand it out. + // + // in.PreorderSeq(types...)(func(n ast.Node) bool { + // f(n) + // return true + // }) + + mask := maskOf(types) + for i := 0; i < len(in.events); { + ev := in.events[i] + if ev.index > i { + // push + if ev.typ&mask != 0 { + f(ev.node) + } + pop := ev.index + if in.events[pop].typ&mask == 0 { + // Subtrees do not contain types: skip them and pop. + i = pop + 1 + continue + } + } + i++ + } +} + +// Nodes visits the nodes of the files supplied to New in depth-first +// order. It calls f(n, true) for each node n before it visits n's +// children. If f returns true, Nodes invokes f recursively for each +// of the non-nil children of the node, followed by a call of +// f(n, false). +// +// The complete traversal sequence is determined by ast.Inspect. +// The types argument, if non-empty, enables type-based filtering of +// events. The function f if is called only for nodes whose type +// matches an element of the types slice. +func (in *Inspector) Nodes(types []ast.Node, f func(n ast.Node, push bool) (proceed bool)) { + mask := maskOf(types) + for i := 0; i < len(in.events); { + ev := in.events[i] + if ev.index > i { + // push + pop := ev.index + if ev.typ&mask != 0 { + if !f(ev.node, true) { + i = pop + 1 // jump to corresponding pop + 1 + continue + } + } + if in.events[pop].typ&mask == 0 { + // Subtrees do not contain types: skip them. + i = pop + continue + } + } else { + // pop + push := ev.index + if in.events[push].typ&mask != 0 { + f(ev.node, false) + } + } + i++ + } +} + +// WithStack visits nodes in a similar manner to Nodes, but it +// supplies each call to f an additional argument, the current +// traversal stack. The stack's first element is the outermost node, +// an *ast.File; its last is the innermost, n. +func (in *Inspector) WithStack(types []ast.Node, f func(n ast.Node, push bool, stack []ast.Node) (proceed bool)) { + mask := maskOf(types) + var stack []ast.Node + for i := 0; i < len(in.events); { + ev := in.events[i] + if ev.index > i { + // push + pop := ev.index + stack = append(stack, ev.node) + if ev.typ&mask != 0 { + if !f(ev.node, true, stack) { + i = pop + 1 + stack = stack[:len(stack)-1] + continue + } + } + if in.events[pop].typ&mask == 0 { + // Subtrees does not contain types: skip them. + i = pop + continue + } + } else { + // pop + push := ev.index + if in.events[push].typ&mask != 0 { + f(ev.node, false, stack) + } + stack = stack[:len(stack)-1] + } + i++ + } +} + +// traverse builds the table of events representing a traversal. +func traverse(files []*ast.File) []event { + // Preallocate approximate number of events + // based on source file extent. + // This makes traverse faster by 4x (!). + var extent int + for _, f := range files { + extent += int(f.End() - f.Pos()) + } + // This estimate is based on the net/http package. + capacity := extent * 33 / 100 + if capacity > 1e6 { + capacity = 1e6 // impose some reasonable maximum + } + events := make([]event, 0, capacity) + + var stack []event + stack = append(stack, event{}) // include an extra event so file nodes have a parent + for _, f := range files { + ast.Inspect(f, func(n ast.Node) bool { + if n != nil { + // push + ev := event{ + node: n, + typ: 0, // temporarily used to accumulate type bits of subtree + index: len(events), // push event temporarily holds own index + } + stack = append(stack, ev) + events = append(events, ev) + } else { + // pop + top := len(stack) - 1 + ev := stack[top] + typ := typeOf(ev.node) + push := ev.index + parent := top - 1 + + events[push].typ = typ // set type of push + stack[parent].typ |= typ | ev.typ // parent's typ contains push and pop's typs. + events[push].index = len(events) // make push refer to pop + + stack = stack[:top] + events = append(events, ev) + } + return true + }) + } + + return events +} diff --git a/vendor/golang.org/x/tools/go/ast/inspector/iter.go b/vendor/golang.org/x/tools/go/ast/inspector/iter.go new file mode 100644 index 000000000..b7e959114 --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/inspector/iter.go @@ -0,0 +1,85 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.23 + +package inspector + +import ( + "go/ast" + "iter" +) + +// PreorderSeq returns an iterator that visits all the +// nodes of the files supplied to New in depth-first order. +// It visits each node n before n's children. +// The complete traversal sequence is determined by ast.Inspect. +// +// The types argument, if non-empty, enables type-based +// filtering of events: only nodes whose type matches an +// element of the types slice are included in the sequence. +func (in *Inspector) PreorderSeq(types ...ast.Node) iter.Seq[ast.Node] { + + // This implementation is identical to Preorder, + // except that it supports breaking out of the loop. + + return func(yield func(ast.Node) bool) { + mask := maskOf(types) + for i := 0; i < len(in.events); { + ev := in.events[i] + if ev.index > i { + // push + if ev.typ&mask != 0 { + if !yield(ev.node) { + break + } + } + pop := ev.index + if in.events[pop].typ&mask == 0 { + // Subtrees do not contain types: skip them and pop. + i = pop + 1 + continue + } + } + i++ + } + } +} + +// All[N] returns an iterator over all the nodes of type N. +// N must be a pointer-to-struct type that implements ast.Node. +// +// Example: +// +// for call := range All[*ast.CallExpr](in) { ... } +func All[N interface { + *S + ast.Node +}, S any](in *Inspector) iter.Seq[N] { + + // To avoid additional dynamic call overheads, + // we duplicate rather than call the logic of PreorderSeq. + + mask := typeOf((N)(nil)) + return func(yield func(N) bool) { + for i := 0; i < len(in.events); { + ev := in.events[i] + if ev.index > i { + // push + if ev.typ&mask != 0 { + if !yield(ev.node.(N)) { + break + } + } + pop := ev.index + if in.events[pop].typ&mask == 0 { + // Subtrees do not contain types: skip them and pop. + i = pop + 1 + continue + } + } + i++ + } + } +} diff --git a/vendor/golang.org/x/tools/go/ast/inspector/typeof.go b/vendor/golang.org/x/tools/go/ast/inspector/typeof.go new file mode 100644 index 000000000..2a872f89d --- /dev/null +++ b/vendor/golang.org/x/tools/go/ast/inspector/typeof.go @@ -0,0 +1,227 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package inspector + +// This file defines func typeOf(ast.Node) uint64. +// +// The initial map-based implementation was too slow; +// see https://go-review.googlesource.com/c/tools/+/135655/1/go/ast/inspector/inspector.go#196 + +import ( + "go/ast" + "math" +) + +const ( + nArrayType = iota + nAssignStmt + nBadDecl + nBadExpr + nBadStmt + nBasicLit + nBinaryExpr + nBlockStmt + nBranchStmt + nCallExpr + nCaseClause + nChanType + nCommClause + nComment + nCommentGroup + nCompositeLit + nDeclStmt + nDeferStmt + nEllipsis + nEmptyStmt + nExprStmt + nField + nFieldList + nFile + nForStmt + nFuncDecl + nFuncLit + nFuncType + nGenDecl + nGoStmt + nIdent + nIfStmt + nImportSpec + nIncDecStmt + nIndexExpr + nIndexListExpr + nInterfaceType + nKeyValueExpr + nLabeledStmt + nMapType + nPackage + nParenExpr + nRangeStmt + nReturnStmt + nSelectStmt + nSelectorExpr + nSendStmt + nSliceExpr + nStarExpr + nStructType + nSwitchStmt + nTypeAssertExpr + nTypeSpec + nTypeSwitchStmt + nUnaryExpr + nValueSpec +) + +// typeOf returns a distinct single-bit value that represents the type of n. +// +// Various implementations were benchmarked with BenchmarkNewInspector: +// +// GOGC=off +// - type switch 4.9-5.5ms 2.1ms +// - binary search over a sorted list of types 5.5-5.9ms 2.5ms +// - linear scan, frequency-ordered list 5.9-6.1ms 2.7ms +// - linear scan, unordered list 6.4ms 2.7ms +// - hash table 6.5ms 3.1ms +// +// A perfect hash seemed like overkill. +// +// The compiler's switch statement is the clear winner +// as it produces a binary tree in code, +// with constant conditions and good branch prediction. +// (Sadly it is the most verbose in source code.) +// Binary search suffered from poor branch prediction. +func typeOf(n ast.Node) uint64 { + // Fast path: nearly half of all nodes are identifiers. + if _, ok := n.(*ast.Ident); ok { + return 1 << nIdent + } + + // These cases include all nodes encountered by ast.Inspect. + switch n.(type) { + case *ast.ArrayType: + return 1 << nArrayType + case *ast.AssignStmt: + return 1 << nAssignStmt + case *ast.BadDecl: + return 1 << nBadDecl + case *ast.BadExpr: + return 1 << nBadExpr + case *ast.BadStmt: + return 1 << nBadStmt + case *ast.BasicLit: + return 1 << nBasicLit + case *ast.BinaryExpr: + return 1 << nBinaryExpr + case *ast.BlockStmt: + return 1 << nBlockStmt + case *ast.BranchStmt: + return 1 << nBranchStmt + case *ast.CallExpr: + return 1 << nCallExpr + case *ast.CaseClause: + return 1 << nCaseClause + case *ast.ChanType: + return 1 << nChanType + case *ast.CommClause: + return 1 << nCommClause + case *ast.Comment: + return 1 << nComment + case *ast.CommentGroup: + return 1 << nCommentGroup + case *ast.CompositeLit: + return 1 << nCompositeLit + case *ast.DeclStmt: + return 1 << nDeclStmt + case *ast.DeferStmt: + return 1 << nDeferStmt + case *ast.Ellipsis: + return 1 << nEllipsis + case *ast.EmptyStmt: + return 1 << nEmptyStmt + case *ast.ExprStmt: + return 1 << nExprStmt + case *ast.Field: + return 1 << nField + case *ast.FieldList: + return 1 << nFieldList + case *ast.File: + return 1 << nFile + case *ast.ForStmt: + return 1 << nForStmt + case *ast.FuncDecl: + return 1 << nFuncDecl + case *ast.FuncLit: + return 1 << nFuncLit + case *ast.FuncType: + return 1 << nFuncType + case *ast.GenDecl: + return 1 << nGenDecl + case *ast.GoStmt: + return 1 << nGoStmt + case *ast.Ident: + return 1 << nIdent + case *ast.IfStmt: + return 1 << nIfStmt + case *ast.ImportSpec: + return 1 << nImportSpec + case *ast.IncDecStmt: + return 1 << nIncDecStmt + case *ast.IndexExpr: + return 1 << nIndexExpr + case *ast.IndexListExpr: + return 1 << nIndexListExpr + case *ast.InterfaceType: + return 1 << nInterfaceType + case *ast.KeyValueExpr: + return 1 << nKeyValueExpr + case *ast.LabeledStmt: + return 1 << nLabeledStmt + case *ast.MapType: + return 1 << nMapType + case *ast.Package: + return 1 << nPackage + case *ast.ParenExpr: + return 1 << nParenExpr + case *ast.RangeStmt: + return 1 << nRangeStmt + case *ast.ReturnStmt: + return 1 << nReturnStmt + case *ast.SelectStmt: + return 1 << nSelectStmt + case *ast.SelectorExpr: + return 1 << nSelectorExpr + case *ast.SendStmt: + return 1 << nSendStmt + case *ast.SliceExpr: + return 1 << nSliceExpr + case *ast.StarExpr: + return 1 << nStarExpr + case *ast.StructType: + return 1 << nStructType + case *ast.SwitchStmt: + return 1 << nSwitchStmt + case *ast.TypeAssertExpr: + return 1 << nTypeAssertExpr + case *ast.TypeSpec: + return 1 << nTypeSpec + case *ast.TypeSwitchStmt: + return 1 << nTypeSwitchStmt + case *ast.UnaryExpr: + return 1 << nUnaryExpr + case *ast.ValueSpec: + return 1 << nValueSpec + } + return 0 +} + +func maskOf(nodes []ast.Node) uint64 { + if nodes == nil { + return math.MaxUint64 // match all node types + } + var mask uint64 + for _, n := range nodes { + mask |= typeOf(n) + } + return mask +} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go index 191bea48c..8b462f3df 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go @@ -1,4 +1,4 @@ -// Copyright 2015 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.12.2 +// protoc v4.24.4 // source: google/api/annotations.proto package annotations diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go index 83774fbcb..636edb460 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.12 +// protoc v4.24.4 // source: google/api/client.proto package annotations @@ -409,6 +409,9 @@ type Publishing struct { // Optional link to proto reference documentation. Example: // https://cloud.google.com/pubsub/lite/docs/reference/rpc ProtoReferenceDocumentationUri string `protobuf:"bytes,110,opt,name=proto_reference_documentation_uri,json=protoReferenceDocumentationUri,proto3" json:"proto_reference_documentation_uri,omitempty"` + // Optional link to REST reference documentation. Example: + // https://cloud.google.com/pubsub/lite/docs/reference/rest + RestReferenceDocumentationUri string `protobuf:"bytes,111,opt,name=rest_reference_documentation_uri,json=restReferenceDocumentationUri,proto3" json:"rest_reference_documentation_uri,omitempty"` } func (x *Publishing) Reset() { @@ -513,6 +516,13 @@ func (x *Publishing) GetProtoReferenceDocumentationUri() string { return "" } +func (x *Publishing) GetRestReferenceDocumentationUri() string { + if x != nil { + return x.RestReferenceDocumentationUri + } + return "" +} + // Settings for Java client libraries. type JavaSettings struct { state protoimpl.MessageState @@ -1033,6 +1043,18 @@ type MethodSettings struct { // total_poll_timeout: // seconds: 54000 # 90 minutes LongRunning *MethodSettings_LongRunning `protobuf:"bytes,2,opt,name=long_running,json=longRunning,proto3" json:"long_running,omitempty"` + // List of top-level fields of the request message, that should be + // automatically populated by the client libraries based on their + // (google.api.field_info).format. Currently supported format: UUID4. + // + // Example of a YAML configuration: + // + // publishing: + // method_settings: + // - selector: google.example.v1.ExampleService.CreateExample + // auto_populated_fields: + // - request_id + AutoPopulatedFields []string `protobuf:"bytes,3,rep,name=auto_populated_fields,json=autoPopulatedFields,proto3" json:"auto_populated_fields,omitempty"` } func (x *MethodSettings) Reset() { @@ -1081,6 +1103,13 @@ func (x *MethodSettings) GetLongRunning() *MethodSettings_LongRunning { return nil } +func (x *MethodSettings) GetAutoPopulatedFields() []string { + if x != nil { + return x.AutoPopulatedFields + } + return nil +} + // Describes settings to use when generating API methods that use the // long-running operation pattern. // All default values below are from those used in the client library @@ -1191,6 +1220,14 @@ var file_google_api_client_proto_extTypes = []protoimpl.ExtensionInfo{ Tag: "bytes,1050,opt,name=oauth_scopes", Filename: "google/api/client.proto", }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 525000001, + Name: "google.api.api_version", + Tag: "bytes,525000001,opt,name=api_version", + Filename: "google/api/client.proto", + }, } // Extension fields to descriptorpb.MethodOptions. @@ -1272,6 +1309,23 @@ var ( // // optional string oauth_scopes = 1050; E_OauthScopes = &file_google_api_client_proto_extTypes[2] + // The API version of this service, which should be sent by version-aware + // clients to the service. This allows services to abide by the schema and + // behavior of the service at the time this API version was deployed. + // The format of the API version must be treated as opaque by clients. + // Services may use a format with an apparent structure, but clients must + // not rely on this to determine components within an API version, or attempt + // to construct other valid API versions. Note that this is for upcoming + // functionality and may not be implemented for all services. + // + // Example: + // + // service Foo { + // option (google.api.api_version) = "v1_20230821_preview"; + // } + // + // optional string api_version = 525000001; + E_ApiVersion = &file_google_api_client_proto_extTypes[3] ) var File_google_api_client_proto protoreflect.FileDescriptor @@ -1336,7 +1390,7 @@ var file_google_api_client_proto_rawDesc = []byte{ 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0a, 0x67, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x22, 0xab, 0x04, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x73, 0x22, 0xf4, 0x04, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, @@ -1371,150 +1425,163 @@ var file_google_api_client_proto_rawDesc = []byte{ 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, - 0x69, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x72, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x4a, + 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, + 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, + 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, - 0x0a, 0x0b, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, 0x70, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, - 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0b, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xae, - 0x04, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, - 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, - 0x35, 0x0a, 0x16, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x15, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x4a, 0x0a, 0x0c, 0x52, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, + 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x0a, 0x47, - 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x8e, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0c, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, - 0x94, 0x02, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, - 0x47, 0x0a, 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, - 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, - 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, - 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, - 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, - 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, - 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, + 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0c, 0x4e, + 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xae, 0x04, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, + 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38, + 0x0a, 0x18, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x16, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x16, 0x68, 0x61, 0x6e, 0x64, + 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72, + 0x69, 0x74, 0x74, 0x65, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, + 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x0c, 0x52, 0x75, 0x62, 0x79, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x0a, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xc2, + 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, + 0x0c, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, + 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x6f, + 0x5f, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x6f, 0x70, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x94, 0x02, 0x0a, + 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x12, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, + 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, + 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, 0x78, + 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x61, + 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, + 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x53, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x07, 0x0a, + 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, + 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, 0x2a, 0x67, 0x0a, 0x18, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x41, 0x44, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53, 0x10, - 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, - 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, - 0x45, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, 0x2a, 0x67, 0x0a, 0x18, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4c, 0x49, 0x45, - 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x49, - 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x0a, - 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41, - 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x69, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, - 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, - 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x0a, 0x12, 0x13, 0x0a, + 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, + 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x43, + 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, + 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x61, 0x75, + 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x44, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0xba, 0xab, 0xfa, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x69, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1587,10 +1654,11 @@ var file_google_api_client_proto_depIdxs = []int32{ 20, // 28: google.api.method_signature:extendee -> google.protobuf.MethodOptions 21, // 29: google.api.default_host:extendee -> google.protobuf.ServiceOptions 21, // 30: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions - 31, // [31:31] is the sub-list for method output_type - 31, // [31:31] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 28, // [28:31] is the sub-list for extension extendee + 21, // 31: google.api.api_version:extendee -> google.protobuf.ServiceOptions + 32, // [32:32] is the sub-list for method output_type + 32, // [32:32] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 28, // [28:32] is the sub-list for extension extendee 0, // [0:28] is the sub-list for field type_name } @@ -1764,7 +1832,7 @@ func file_google_api_client_proto_init() { RawDescriptor: file_google_api_client_proto_rawDesc, NumEnums: 2, NumMessages: 16, - NumExtensions: 3, + NumExtensions: 4, NumServices: 0, }, GoTypes: file_google_api_client_proto_goTypes, diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go index 6ce01ac9a..08505ba3f 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.12 +// protoc v4.24.4 // source: google/api/field_behavior.proto package annotations @@ -195,21 +195,21 @@ var file_google_api_field_behavior_proto_rawDesc = []byte{ 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4e, - 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, 0x08, 0x3a, 0x60, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, + 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, 0x08, 0x3a, 0x64, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, - 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x02, 0x10, 0x00, 0x52, + 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x42, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go index d02e6bbc8..d339dfb02 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.12 +// protoc v4.24.4 // source: google/api/field_info.proto package annotations @@ -56,9 +56,9 @@ const ( FieldInfo_IPV4 FieldInfo_Format = 2 // Internet Protocol v6 value as defined by [RFC // 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - // normalized to entirely lowercase letters, and zero-padded partial and - // empty octets. For example, the value `2001:DB8::` would be normalized to - // `2001:0db8:0:0`. + // normalized to entirely lowercase letters with zeros compressed, following + // [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + // the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. FieldInfo_IPV6 FieldInfo_Format = 3 // An IP address in either v4 or v6 format as described by the individual // values defined herein. See the comments on the IPV4 and IPV6 types for diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go index 8a0e1c345..76ea76df3 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/api/http.proto package annotations diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go index bbcc12d29..7a3fd93fc 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/api/resource.proto package annotations diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go index 9a9ae04c2..1d8397b02 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/api/routing.proto package annotations diff --git a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go index 454948669..498020e33 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/api/launch_stage.proto package api diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go index cc5d52fbc..bd46edbe7 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/rpc/code.proto package code diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go index 7bd161e48..3e5621827 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/rpc/error_details.proto package errdetails diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go index a6b508188..6ad1b1c1d 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.9 +// protoc v4.24.4 // source: google/rpc/status.proto package status diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md index 608aa6e1a..0854d298e 100644 --- a/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ b/vendor/google.golang.org/grpc/CONTRIBUTING.md @@ -66,7 +66,7 @@ How to get your contributions merged smoothly and quickly. - **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on. - - `VET_SKIP_PROTO=1 ./vet.sh` to catch vet errors + - `./scripts/vet.sh` to catch vet errors - `go test -cpu 1,4 -timeout 7m ./...` to run the tests - `go test -race -cpu 1,4 -timeout 7m ./...` to run tests in race mode diff --git a/vendor/google.golang.org/grpc/MAINTAINERS.md b/vendor/google.golang.org/grpc/MAINTAINERS.md index c6672c0a3..6a8a07781 100644 --- a/vendor/google.golang.org/grpc/MAINTAINERS.md +++ b/vendor/google.golang.org/grpc/MAINTAINERS.md @@ -9,6 +9,7 @@ for general contribution guidelines. ## Maintainers (in alphabetical order) +- [atollena](https://github.com/atollena), Datadog, Inc. - [cesarghali](https://github.com/cesarghali), Google LLC - [dfawley](https://github.com/dfawley), Google LLC - [easwars](https://github.com/easwars), Google LLC diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile index 1f8960922..be38384ff 100644 --- a/vendor/google.golang.org/grpc/Makefile +++ b/vendor/google.golang.org/grpc/Makefile @@ -30,17 +30,20 @@ testdeps: GO111MODULE=on go get -d -v -t google.golang.org/grpc/... vet: vetdeps - ./vet.sh + ./scripts/vet.sh vetdeps: - ./vet.sh -install + ./scripts/vet.sh -install .PHONY: \ all \ build \ clean \ + deps \ proto \ test \ + testsubmodule \ testrace \ + testdeps \ vet \ vetdeps diff --git a/vendor/google.golang.org/grpc/README.md b/vendor/google.golang.org/grpc/README.md index ab0fbb79b..b572707c6 100644 --- a/vendor/google.golang.org/grpc/README.md +++ b/vendor/google.golang.org/grpc/README.md @@ -10,7 +10,7 @@ RPC framework that puts mobile and HTTP/2 first. For more information see the ## Prerequisites -- **[Go][]**: any one of the **three latest major** [releases][go-releases]. +- **[Go][]**: any one of the **two latest major** [releases][go-releases]. ## Installation diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index d79560a2e..f391744f7 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -54,13 +54,14 @@ var ( // an init() function), and is not thread-safe. If multiple Balancers are // registered with the same name, the one registered last will take effect. func Register(b Builder) { - if strings.ToLower(b.Name()) != b.Name() { + name := strings.ToLower(b.Name()) + if name != b.Name() { // TODO: Skip the use of strings.ToLower() to index the map after v1.59 // is released to switch to case sensitive balancer registry. Also, // remove this warning and update the docstrings for Register and Get. logger.Warningf("Balancer registered with name %q. grpc-go will be switching to case sensitive balancer registries soon", b.Name()) } - m[strings.ToLower(b.Name())] = b + m[name] = b } // unregisterForTesting deletes the balancer with the given name from the @@ -232,8 +233,8 @@ type BuildOptions struct { // implementations which do not communicate with a remote load balancer // server can ignore this field. Authority string - // ChannelzParentID is the parent ClientConn's channelz ID. - ChannelzParentID *channelz.Identifier + // ChannelzParent is the parent ClientConn's channelz channel. + ChannelzParent channelz.Identifier // CustomUserAgent is the custom user agent set on the parent ClientConn. // The balancer should set the same custom user agent if it creates a // ClientConn. diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go index f35453028..0adc98866 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go @@ -19,8 +19,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.22.0 +// protoc-gen-go v1.34.1 +// protoc v4.25.2 // source: grpc/lb/v1/load_balancer.proto package grpc_lb_v1 diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go index 00d0954b3..57a792a7b 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go @@ -19,8 +19,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.22.0 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v4.25.2 // source: grpc/lb/v1/load_balancer.proto package grpc_lb_v1 @@ -34,8 +34,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( LoadBalancer_BalanceLoad_FullMethodName = "/grpc.lb.v1.LoadBalancer/BalanceLoad" @@ -58,11 +58,12 @@ func NewLoadBalancerClient(cc grpc.ClientConnInterface) LoadBalancerClient { } func (c *loadBalancerClient) BalanceLoad(ctx context.Context, opts ...grpc.CallOption) (LoadBalancer_BalanceLoadClient, error) { - stream, err := c.cc.NewStream(ctx, &LoadBalancer_ServiceDesc.Streams[0], LoadBalancer_BalanceLoad_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &LoadBalancer_ServiceDesc.Streams[0], LoadBalancer_BalanceLoad_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &loadBalancerBalanceLoadClient{stream} + x := &loadBalancerBalanceLoadClient{ClientStream: stream} return x, nil } @@ -116,7 +117,7 @@ func RegisterLoadBalancerServer(s grpc.ServiceRegistrar, srv LoadBalancerServer) } func _LoadBalancer_BalanceLoad_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(LoadBalancerServer).BalanceLoad(&loadBalancerBalanceLoadServer{stream}) + return srv.(LoadBalancerServer).BalanceLoad(&loadBalancerBalanceLoadServer{ServerStream: stream}) } type LoadBalancer_BalanceLoadServer interface { diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go index 86ba65be4..47a3e938d 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go @@ -44,8 +44,8 @@ import ( "google.golang.org/grpc/internal/resolver/dns" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" + "google.golang.org/protobuf/types/known/durationpb" - durationpb "github.com/golang/protobuf/ptypes/duration" lbpb "google.golang.org/grpc/balancer/grpclb/grpc_lb_v1" ) diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_config.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_config.go index 8942c3131..96a57c8c7 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_config.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_config.go @@ -21,14 +21,14 @@ package grpclb import ( "encoding/json" - "google.golang.org/grpc" + "google.golang.org/grpc/balancer/pickfirst" "google.golang.org/grpc/balancer/roundrobin" "google.golang.org/grpc/serviceconfig" ) const ( roundRobinName = roundrobin.Name - pickFirstName = grpc.PickFirstBalancerName + pickFirstName = pickfirst.Name ) type grpclbServiceConfig struct { diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_picker.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_picker.go index 20c5f2ec3..671bc663f 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_picker.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_picker.go @@ -19,13 +19,13 @@ package grpclb import ( + "math/rand" "sync" "sync/atomic" "google.golang.org/grpc/balancer" lbpb "google.golang.org/grpc/balancer/grpclb/grpc_lb_v1" "google.golang.org/grpc/codes" - "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/status" ) @@ -112,7 +112,7 @@ type rrPicker struct { func newRRPicker(readySCs []balancer.SubConn) *rrPicker { return &rrPicker{ subConns: readySCs, - subConnsNext: grpcrand.Intn(len(readySCs)), + subConnsNext: rand.Intn(len(readySCs)), } } @@ -147,7 +147,7 @@ func newLBPicker(serverList []*lbpb.Server, readySCs []balancer.SubConn, stats * return &lbPicker{ serverList: serverList, subConns: readySCs, - subConnsNext: grpcrand.Intn(len(readySCs)), + subConnsNext: rand.Intn(len(readySCs)), stats: stats, } } diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go index c8fe1edd8..506fae0d4 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go @@ -26,7 +26,6 @@ import ( "sync" "time" - "github.com/golang/protobuf/proto" "google.golang.org/grpc" "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" @@ -36,8 +35,9 @@ import ( "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/resolver" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" - timestamppb "github.com/golang/protobuf/ptypes/timestamp" lbpb "google.golang.org/grpc/balancer/grpclb/grpc_lb_v1" ) @@ -246,7 +246,7 @@ func (lb *lbBalancer) newRemoteBalancerCCWrapper() error { // Explicitly set pickfirst as the balancer. dopts = append(dopts, grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"pick_first"}`)) dopts = append(dopts, grpc.WithResolvers(lb.manualResolver)) - dopts = append(dopts, grpc.WithChannelzParentID(lb.opt.ChannelzParentID)) + dopts = append(dopts, grpc.WithChannelzParentID(lb.opt.ChannelzParent)) // Enable Keepalive for grpclb client. dopts = append(dopts, grpc.WithKeepaliveParams(keepalive.ClientParameters{ diff --git a/vendor/google.golang.org/grpc/pickfirst.go b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go similarity index 71% rename from vendor/google.golang.org/grpc/pickfirst.go rename to vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go index 2e9cf66b4..07527603f 100644 --- a/vendor/google.golang.org/grpc/pickfirst.go +++ b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go @@ -16,68 +16,60 @@ * */ -package grpc +// Package pickfirst contains the pick_first load balancing policy. +package pickfirst import ( "encoding/json" "errors" "fmt" + "math/rand" "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/internal/envconfig" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal" internalgrpclog "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/internal/pretty" "google.golang.org/grpc/resolver" "google.golang.org/grpc/serviceconfig" ) +func init() { + balancer.Register(pickfirstBuilder{}) + internal.ShuffleAddressListForTesting = func(n int, swap func(i, j int)) { rand.Shuffle(n, swap) } +} + +var logger = grpclog.Component("pick-first-lb") + const ( - // PickFirstBalancerName is the name of the pick_first balancer. - PickFirstBalancerName = "pick_first" - logPrefix = "[pick-first-lb %p] " + // Name is the name of the pick_first balancer. + Name = "pick_first" + logPrefix = "[pick-first-lb %p] " ) -func newPickfirstBuilder() balancer.Builder { - return &pickfirstBuilder{} -} - type pickfirstBuilder struct{} -func (*pickfirstBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { +func (pickfirstBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { b := &pickfirstBalancer{cc: cc} b.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(logPrefix, b)) return b } -func (*pickfirstBuilder) Name() string { - return PickFirstBalancerName +func (pickfirstBuilder) Name() string { + return Name } type pfConfig struct { serviceconfig.LoadBalancingConfig `json:"-"` // If set to true, instructs the LB policy to shuffle the order of the list - // of addresses received from the name resolver before attempting to + // of endpoints received from the name resolver before attempting to // connect to them. ShuffleAddressList bool `json:"shuffleAddressList"` } -func (*pickfirstBuilder) ParseConfig(js json.RawMessage) (serviceconfig.LoadBalancingConfig, error) { - if !envconfig.PickFirstLBConfig { - // Prior to supporting loadbalancing configuration, the pick_first LB - // policy did not implement the balancer.ConfigParser interface. This - // meant that if a non-empty configuration was passed to it, the service - // config unmarshaling code would throw a warning log, but would - // continue using the pick_first LB policy. The code below ensures the - // same behavior is retained if the env var is not set. - if string(js) != "{}" { - logger.Warningf("Ignoring non-empty balancer configuration %q for the pick_first LB policy", string(js)) - } - return nil, nil - } - +func (pickfirstBuilder) ParseConfig(js json.RawMessage) (serviceconfig.LoadBalancingConfig, error) { var cfg pfConfig if err := json.Unmarshal(js, &cfg); err != nil { return nil, fmt.Errorf("pickfirst: unable to unmarshal LB policy config: %s, error: %v", string(js), err) @@ -111,9 +103,14 @@ func (b *pickfirstBalancer) ResolverError(err error) { }) } +type Shuffler interface { + ShuffleAddressListForTesting(n int, swap func(i, j int)) +} + +func ShuffleAddressListForTesting(n int, swap func(i, j int)) { rand.Shuffle(n, swap) } + func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState) error { - addrs := state.ResolverState.Addresses - if len(addrs) == 0 { + if len(state.ResolverState.Addresses) == 0 && len(state.ResolverState.Endpoints) == 0 { // The resolver reported an empty address list. Treat it like an error by // calling b.ResolverError. if b.subConn != nil { @@ -125,22 +122,49 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState b.ResolverError(errors.New("produced zero addresses")) return balancer.ErrBadResolverState } - // We don't have to guard this block with the env var because ParseConfig // already does so. cfg, ok := state.BalancerConfig.(pfConfig) if state.BalancerConfig != nil && !ok { return fmt.Errorf("pickfirst: received illegal BalancerConfig (type %T): %v", state.BalancerConfig, state.BalancerConfig) } - if cfg.ShuffleAddressList { - addrs = append([]resolver.Address{}, addrs...) - grpcrand.Shuffle(len(addrs), func(i, j int) { addrs[i], addrs[j] = addrs[j], addrs[i] }) - } if b.logger.V(2) { b.logger.Infof("Received new config %s, resolver state %s", pretty.ToJSON(cfg), pretty.ToJSON(state.ResolverState)) } + var addrs []resolver.Address + if endpoints := state.ResolverState.Endpoints; len(endpoints) != 0 { + // Perform the optional shuffling described in gRFC A62. The shuffling will + // change the order of endpoints but not touch the order of the addresses + // within each endpoint. - A61 + if cfg.ShuffleAddressList { + endpoints = append([]resolver.Endpoint{}, endpoints...) + internal.ShuffleAddressListForTesting.(func(int, func(int, int)))(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] }) + } + + // "Flatten the list by concatenating the ordered list of addresses for each + // of the endpoints, in order." - A61 + for _, endpoint := range endpoints { + // "In the flattened list, interleave addresses from the two address + // families, as per RFC-8304 section 4." - A61 + // TODO: support the above language. + addrs = append(addrs, endpoint.Addresses...) + } + } else { + // Endpoints not set, process addresses until we migrate resolver + // emissions fully to Endpoints. The top channel does wrap emitted + // addresses with endpoints, however some balancers such as weighted + // target do not forwarrd the corresponding correct endpoints down/split + // endpoints properly. Once all balancers correctly forward endpoints + // down, can delete this else conditional. + addrs = state.ResolverState.Addresses + if cfg.ShuffleAddressList { + addrs = append([]resolver.Address{}, addrs...) + rand.Shuffle(len(addrs), func(i, j int) { addrs[i], addrs[j] = addrs[j], addrs[i] }) + } + } + if b.subConn != nil { b.cc.UpdateAddresses(b.subConn, addrs) return nil @@ -257,7 +281,3 @@ func (i *idlePicker) Pick(balancer.PickInfo) (balancer.PickResult, error) { i.subConn.Connect() return balancer.PickResult{}, balancer.ErrNoSubConnAvailable } - -func init() { - balancer.Register(newPickfirstBuilder()) -} diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go index f7031ad22..260255d31 100644 --- a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go +++ b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go @@ -22,12 +22,12 @@ package roundrobin import ( + "math/rand" "sync/atomic" "google.golang.org/grpc/balancer" "google.golang.org/grpc/balancer/base" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/internal/grpcrand" ) // Name is the name of round_robin balancer. @@ -60,7 +60,7 @@ func (*rrPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker { // Start at a random index, as the same RR balancer rebuilds a new // picker when SubConn states change, and we don't want to apply excess // load to the first server in the list. - next: uint32(grpcrand.Intn(len(scs))), + next: uint32(rand.Intn(len(scs))), } } diff --git a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go deleted file mode 100644 index a4411c22b..000000000 --- a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go +++ /dev/null @@ -1,454 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "context" - "fmt" - "strings" - "sync" - - "google.golang.org/grpc/balancer" - "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/internal/balancer/gracefulswitch" - "google.golang.org/grpc/internal/channelz" - "google.golang.org/grpc/internal/grpcsync" - "google.golang.org/grpc/resolver" -) - -type ccbMode int - -const ( - ccbModeActive = iota - ccbModeIdle - ccbModeClosed - ccbModeExitingIdle -) - -// ccBalancerWrapper sits between the ClientConn and the Balancer. -// -// ccBalancerWrapper implements methods corresponding to the ones on the -// balancer.Balancer interface. The ClientConn is free to call these methods -// concurrently and the ccBalancerWrapper ensures that calls from the ClientConn -// to the Balancer happen synchronously and in order. -// -// ccBalancerWrapper also implements the balancer.ClientConn interface and is -// passed to the Balancer implementations. It invokes unexported methods on the -// ClientConn to handle these calls from the Balancer. -// -// It uses the gracefulswitch.Balancer internally to ensure that balancer -// switches happen in a graceful manner. -type ccBalancerWrapper struct { - // The following fields are initialized when the wrapper is created and are - // read-only afterwards, and therefore can be accessed without a mutex. - cc *ClientConn - opts balancer.BuildOptions - - // Outgoing (gRPC --> balancer) calls are guaranteed to execute in a - // mutually exclusive manner as they are scheduled in the serializer. Fields - // accessed *only* in these serializer callbacks, can therefore be accessed - // without a mutex. - balancer *gracefulswitch.Balancer - curBalancerName string - - // mu guards access to the below fields. Access to the serializer and its - // cancel function needs to be mutex protected because they are overwritten - // when the wrapper exits idle mode. - mu sync.Mutex - serializer *grpcsync.CallbackSerializer // To serialize all outoing calls. - serializerCancel context.CancelFunc // To close the seralizer at close/enterIdle time. - mode ccbMode // Tracks the current mode of the wrapper. -} - -// newCCBalancerWrapper creates a new balancer wrapper. The underlying balancer -// is not created until the switchTo() method is invoked. -func newCCBalancerWrapper(cc *ClientConn, bopts balancer.BuildOptions) *ccBalancerWrapper { - ctx, cancel := context.WithCancel(context.Background()) - ccb := &ccBalancerWrapper{ - cc: cc, - opts: bopts, - serializer: grpcsync.NewCallbackSerializer(ctx), - serializerCancel: cancel, - } - ccb.balancer = gracefulswitch.NewBalancer(ccb, bopts) - return ccb -} - -// updateClientConnState is invoked by grpc to push a ClientConnState update to -// the underlying balancer. -func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error { - ccb.mu.Lock() - errCh := make(chan error, 1) - // Here and everywhere else where Schedule() is called, it is done with the - // lock held. But the lock guards only the scheduling part. The actual - // callback is called asynchronously without the lock being held. - ok := ccb.serializer.Schedule(func(_ context.Context) { - errCh <- ccb.balancer.UpdateClientConnState(*ccs) - }) - if !ok { - // If we are unable to schedule a function with the serializer, it - // indicates that it has been closed. A serializer is only closed when - // the wrapper is closed or is in idle. - ccb.mu.Unlock() - return fmt.Errorf("grpc: cannot send state update to a closed or idle balancer") - } - ccb.mu.Unlock() - - // We get here only if the above call to Schedule succeeds, in which case it - // is guaranteed that the scheduled function will run. Therefore it is safe - // to block on this channel. - err := <-errCh - if logger.V(2) && err != nil { - logger.Infof("error from balancer.UpdateClientConnState: %v", err) - } - return err -} - -// updateSubConnState is invoked by grpc to push a subConn state update to the -// underlying balancer. -func (ccb *ccBalancerWrapper) updateSubConnState(sc balancer.SubConn, s connectivity.State, err error) { - ccb.mu.Lock() - ccb.serializer.Schedule(func(_ context.Context) { - // Even though it is optional for balancers, gracefulswitch ensures - // opts.StateListener is set, so this cannot ever be nil. - sc.(*acBalancerWrapper).stateListener(balancer.SubConnState{ConnectivityState: s, ConnectionError: err}) - }) - ccb.mu.Unlock() -} - -func (ccb *ccBalancerWrapper) resolverError(err error) { - ccb.mu.Lock() - ccb.serializer.Schedule(func(_ context.Context) { - ccb.balancer.ResolverError(err) - }) - ccb.mu.Unlock() -} - -// switchTo is invoked by grpc to instruct the balancer wrapper to switch to the -// LB policy identified by name. -// -// ClientConn calls newCCBalancerWrapper() at creation time. Upon receipt of the -// first good update from the name resolver, it determines the LB policy to use -// and invokes the switchTo() method. Upon receipt of every subsequent update -// from the name resolver, it invokes this method. -// -// the ccBalancerWrapper keeps track of the current LB policy name, and skips -// the graceful balancer switching process if the name does not change. -func (ccb *ccBalancerWrapper) switchTo(name string) { - ccb.mu.Lock() - ccb.serializer.Schedule(func(_ context.Context) { - // TODO: Other languages use case-sensitive balancer registries. We should - // switch as well. See: https://github.com/grpc/grpc-go/issues/5288. - if strings.EqualFold(ccb.curBalancerName, name) { - return - } - ccb.buildLoadBalancingPolicy(name) - }) - ccb.mu.Unlock() -} - -// buildLoadBalancingPolicy performs the following: -// - retrieve a balancer builder for the given name. Use the default LB -// policy, pick_first, if no LB policy with name is found in the registry. -// - instruct the gracefulswitch balancer to switch to the above builder. This -// will actually build the new balancer. -// - update the `curBalancerName` field -// -// Must be called from a serializer callback. -func (ccb *ccBalancerWrapper) buildLoadBalancingPolicy(name string) { - builder := balancer.Get(name) - if builder == nil { - channelz.Warningf(logger, ccb.cc.channelzID, "Channel switches to new LB policy %q, since the specified LB policy %q was not registered", PickFirstBalancerName, name) - builder = newPickfirstBuilder() - } else { - channelz.Infof(logger, ccb.cc.channelzID, "Channel switches to new LB policy %q", name) - } - - if err := ccb.balancer.SwitchTo(builder); err != nil { - channelz.Errorf(logger, ccb.cc.channelzID, "Channel failed to build new LB policy %q: %v", name, err) - return - } - ccb.curBalancerName = builder.Name() -} - -func (ccb *ccBalancerWrapper) close() { - channelz.Info(logger, ccb.cc.channelzID, "ccBalancerWrapper: closing") - ccb.closeBalancer(ccbModeClosed) -} - -// enterIdleMode is invoked by grpc when the channel enters idle mode upon -// expiry of idle_timeout. This call blocks until the balancer is closed. -func (ccb *ccBalancerWrapper) enterIdleMode() { - channelz.Info(logger, ccb.cc.channelzID, "ccBalancerWrapper: entering idle mode") - ccb.closeBalancer(ccbModeIdle) -} - -// closeBalancer is invoked when the channel is being closed or when it enters -// idle mode upon expiry of idle_timeout. -func (ccb *ccBalancerWrapper) closeBalancer(m ccbMode) { - ccb.mu.Lock() - if ccb.mode == ccbModeClosed || ccb.mode == ccbModeIdle { - ccb.mu.Unlock() - return - } - - ccb.mode = m - done := ccb.serializer.Done() - b := ccb.balancer - ok := ccb.serializer.Schedule(func(_ context.Context) { - // Close the serializer to ensure that no more calls from gRPC are sent - // to the balancer. - ccb.serializerCancel() - // Empty the current balancer name because we don't have a balancer - // anymore and also so that we act on the next call to switchTo by - // creating a new balancer specified by the new resolver. - ccb.curBalancerName = "" - }) - if !ok { - ccb.mu.Unlock() - return - } - ccb.mu.Unlock() - - // Give enqueued callbacks a chance to finish before closing the balancer. - <-done - b.Close() -} - -// exitIdleMode is invoked by grpc when the channel exits idle mode either -// because of an RPC or because of an invocation of the Connect() API. This -// recreates the balancer that was closed previously when entering idle mode. -// -// If the channel is not in idle mode, we know for a fact that we are here as a -// result of the user calling the Connect() method on the ClientConn. In this -// case, we can simply forward the call to the underlying balancer, instructing -// it to reconnect to the backends. -func (ccb *ccBalancerWrapper) exitIdleMode() { - ccb.mu.Lock() - if ccb.mode == ccbModeClosed { - // Request to exit idle is a no-op when wrapper is already closed. - ccb.mu.Unlock() - return - } - - if ccb.mode == ccbModeIdle { - // Recreate the serializer which was closed when we entered idle. - ctx, cancel := context.WithCancel(context.Background()) - ccb.serializer = grpcsync.NewCallbackSerializer(ctx) - ccb.serializerCancel = cancel - } - - // The ClientConn guarantees that mutual exclusion between close() and - // exitIdleMode(), and since we just created a new serializer, we can be - // sure that the below function will be scheduled. - done := make(chan struct{}) - ccb.serializer.Schedule(func(_ context.Context) { - defer close(done) - - ccb.mu.Lock() - defer ccb.mu.Unlock() - - if ccb.mode != ccbModeIdle { - ccb.balancer.ExitIdle() - return - } - - // Gracefulswitch balancer does not support a switchTo operation after - // being closed. Hence we need to create a new one here. - ccb.balancer = gracefulswitch.NewBalancer(ccb, ccb.opts) - ccb.mode = ccbModeActive - channelz.Info(logger, ccb.cc.channelzID, "ccBalancerWrapper: exiting idle mode") - - }) - ccb.mu.Unlock() - - <-done -} - -func (ccb *ccBalancerWrapper) isIdleOrClosed() bool { - ccb.mu.Lock() - defer ccb.mu.Unlock() - return ccb.mode == ccbModeIdle || ccb.mode == ccbModeClosed -} - -func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) { - if ccb.isIdleOrClosed() { - return nil, fmt.Errorf("grpc: cannot create SubConn when balancer is closed or idle") - } - - if len(addrs) == 0 { - return nil, fmt.Errorf("grpc: cannot create SubConn with empty address list") - } - ac, err := ccb.cc.newAddrConn(addrs, opts) - if err != nil { - channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err) - return nil, err - } - acbw := &acBalancerWrapper{ - ccb: ccb, - ac: ac, - producers: make(map[balancer.ProducerBuilder]*refCountedProducer), - stateListener: opts.StateListener, - } - ac.acbw = acbw - return acbw, nil -} - -func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) { - // The graceful switch balancer will never call this. - logger.Errorf("ccb RemoveSubConn(%v) called unexpectedly, sc") -} - -func (ccb *ccBalancerWrapper) UpdateAddresses(sc balancer.SubConn, addrs []resolver.Address) { - if ccb.isIdleOrClosed() { - return - } - - acbw, ok := sc.(*acBalancerWrapper) - if !ok { - return - } - acbw.UpdateAddresses(addrs) -} - -func (ccb *ccBalancerWrapper) UpdateState(s balancer.State) { - if ccb.isIdleOrClosed() { - return - } - - // Update picker before updating state. Even though the ordering here does - // not matter, it can lead to multiple calls of Pick in the common start-up - // case where we wait for ready and then perform an RPC. If the picker is - // updated later, we could call the "connecting" picker when the state is - // updated, and then call the "ready" picker after the picker gets updated. - ccb.cc.blockingpicker.updatePicker(s.Picker) - ccb.cc.csMgr.updateState(s.ConnectivityState) -} - -func (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOptions) { - if ccb.isIdleOrClosed() { - return - } - - ccb.cc.resolveNow(o) -} - -func (ccb *ccBalancerWrapper) Target() string { - return ccb.cc.target -} - -// acBalancerWrapper is a wrapper on top of ac for balancers. -// It implements balancer.SubConn interface. -type acBalancerWrapper struct { - ac *addrConn // read-only - ccb *ccBalancerWrapper // read-only - stateListener func(balancer.SubConnState) - - mu sync.Mutex - producers map[balancer.ProducerBuilder]*refCountedProducer -} - -func (acbw *acBalancerWrapper) String() string { - return fmt.Sprintf("SubConn(id:%d)", acbw.ac.channelzID.Int()) -} - -func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) { - acbw.ac.updateAddrs(addrs) -} - -func (acbw *acBalancerWrapper) Connect() { - go acbw.ac.connect() -} - -func (acbw *acBalancerWrapper) Shutdown() { - ccb := acbw.ccb - if ccb.isIdleOrClosed() { - // It it safe to ignore this call when the balancer is closed or in idle - // because the ClientConn takes care of closing the connections. - // - // Not returning early from here when the balancer is closed or in idle - // leads to a deadlock though, because of the following sequence of - // calls when holding cc.mu: - // cc.exitIdleMode --> ccb.enterIdleMode --> gsw.Close --> - // ccb.RemoveAddrConn --> cc.removeAddrConn - return - } - - ccb.cc.removeAddrConn(acbw.ac, errConnDrain) -} - -// NewStream begins a streaming RPC on the addrConn. If the addrConn is not -// ready, blocks until it is or ctx expires. Returns an error when the context -// expires or the addrConn is shut down. -func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { - transport, err := acbw.ac.getTransport(ctx) - if err != nil { - return nil, err - } - return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) -} - -// Invoke performs a unary RPC. If the addrConn is not ready, returns -// errSubConnNotReady. -func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args any, reply any, opts ...CallOption) error { - cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) - if err != nil { - return err - } - if err := cs.SendMsg(args); err != nil { - return err - } - return cs.RecvMsg(reply) -} - -type refCountedProducer struct { - producer balancer.Producer - refs int // number of current refs to the producer - close func() // underlying producer's close function -} - -func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { - acbw.mu.Lock() - defer acbw.mu.Unlock() - - // Look up existing producer from this builder. - pData := acbw.producers[pb] - if pData == nil { - // Not found; create a new one and add it to the producers map. - p, close := pb.Build(acbw) - pData = &refCountedProducer{producer: p, close: close} - acbw.producers[pb] = pData - } - // Account for this new reference. - pData.refs++ - - // Return a cleanup function wrapped in a OnceFunc to remove this reference - // and delete the refCountedProducer from the map if the total reference - // count goes to zero. - unref := func() { - acbw.mu.Lock() - pData.refs-- - if pData.refs == 0 { - defer pData.close() // Run outside the acbw mutex - delete(acbw.producers, pb) - } - acbw.mu.Unlock() - } - return pData.producer, grpcsync.OnceFunc(unref) -} diff --git a/vendor/google.golang.org/grpc/balancer_wrapper.go b/vendor/google.golang.org/grpc/balancer_wrapper.go new file mode 100644 index 000000000..4161fdf47 --- /dev/null +++ b/vendor/google.golang.org/grpc/balancer_wrapper.go @@ -0,0 +1,341 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "context" + "fmt" + "sync" + + "google.golang.org/grpc/balancer" + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/internal/balancer/gracefulswitch" + "google.golang.org/grpc/internal/channelz" + "google.golang.org/grpc/internal/grpcsync" + "google.golang.org/grpc/resolver" +) + +// ccBalancerWrapper sits between the ClientConn and the Balancer. +// +// ccBalancerWrapper implements methods corresponding to the ones on the +// balancer.Balancer interface. The ClientConn is free to call these methods +// concurrently and the ccBalancerWrapper ensures that calls from the ClientConn +// to the Balancer happen in order by performing them in the serializer, without +// any mutexes held. +// +// ccBalancerWrapper also implements the balancer.ClientConn interface and is +// passed to the Balancer implementations. It invokes unexported methods on the +// ClientConn to handle these calls from the Balancer. +// +// It uses the gracefulswitch.Balancer internally to ensure that balancer +// switches happen in a graceful manner. +type ccBalancerWrapper struct { + // The following fields are initialized when the wrapper is created and are + // read-only afterwards, and therefore can be accessed without a mutex. + cc *ClientConn + opts balancer.BuildOptions + serializer *grpcsync.CallbackSerializer + serializerCancel context.CancelFunc + + // The following fields are only accessed within the serializer or during + // initialization. + curBalancerName string + balancer *gracefulswitch.Balancer + + // The following field is protected by mu. Caller must take cc.mu before + // taking mu. + mu sync.Mutex + closed bool +} + +// newCCBalancerWrapper creates a new balancer wrapper in idle state. The +// underlying balancer is not created until the updateClientConnState() method +// is invoked. +func newCCBalancerWrapper(cc *ClientConn) *ccBalancerWrapper { + ctx, cancel := context.WithCancel(cc.ctx) + ccb := &ccBalancerWrapper{ + cc: cc, + opts: balancer.BuildOptions{ + DialCreds: cc.dopts.copts.TransportCredentials, + CredsBundle: cc.dopts.copts.CredsBundle, + Dialer: cc.dopts.copts.Dialer, + Authority: cc.authority, + CustomUserAgent: cc.dopts.copts.UserAgent, + ChannelzParent: cc.channelz, + Target: cc.parsedTarget, + }, + serializer: grpcsync.NewCallbackSerializer(ctx), + serializerCancel: cancel, + } + ccb.balancer = gracefulswitch.NewBalancer(ccb, ccb.opts) + return ccb +} + +// updateClientConnState is invoked by grpc to push a ClientConnState update to +// the underlying balancer. This is always executed from the serializer, so +// it is safe to call into the balancer here. +func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error { + errCh := make(chan error) + ok := ccb.serializer.Schedule(func(ctx context.Context) { + defer close(errCh) + if ctx.Err() != nil || ccb.balancer == nil { + return + } + name := gracefulswitch.ChildName(ccs.BalancerConfig) + if ccb.curBalancerName != name { + ccb.curBalancerName = name + channelz.Infof(logger, ccb.cc.channelz, "Channel switches to new LB policy %q", name) + } + err := ccb.balancer.UpdateClientConnState(*ccs) + if logger.V(2) && err != nil { + logger.Infof("error from balancer.UpdateClientConnState: %v", err) + } + errCh <- err + }) + if !ok { + return nil + } + return <-errCh +} + +// resolverError is invoked by grpc to push a resolver error to the underlying +// balancer. The call to the balancer is executed from the serializer. +func (ccb *ccBalancerWrapper) resolverError(err error) { + ccb.serializer.Schedule(func(ctx context.Context) { + if ctx.Err() != nil || ccb.balancer == nil { + return + } + ccb.balancer.ResolverError(err) + }) +} + +// close initiates async shutdown of the wrapper. cc.mu must be held when +// calling this function. To determine the wrapper has finished shutting down, +// the channel should block on ccb.serializer.Done() without cc.mu held. +func (ccb *ccBalancerWrapper) close() { + ccb.mu.Lock() + ccb.closed = true + ccb.mu.Unlock() + channelz.Info(logger, ccb.cc.channelz, "ccBalancerWrapper: closing") + ccb.serializer.Schedule(func(context.Context) { + if ccb.balancer == nil { + return + } + ccb.balancer.Close() + ccb.balancer = nil + }) + ccb.serializerCancel() +} + +// exitIdle invokes the balancer's exitIdle method in the serializer. +func (ccb *ccBalancerWrapper) exitIdle() { + ccb.serializer.Schedule(func(ctx context.Context) { + if ctx.Err() != nil || ccb.balancer == nil { + return + } + ccb.balancer.ExitIdle() + }) +} + +func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) { + ccb.cc.mu.Lock() + defer ccb.cc.mu.Unlock() + + ccb.mu.Lock() + if ccb.closed { + ccb.mu.Unlock() + return nil, fmt.Errorf("balancer is being closed; no new SubConns allowed") + } + ccb.mu.Unlock() + + if len(addrs) == 0 { + return nil, fmt.Errorf("grpc: cannot create SubConn with empty address list") + } + ac, err := ccb.cc.newAddrConnLocked(addrs, opts) + if err != nil { + channelz.Warningf(logger, ccb.cc.channelz, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err) + return nil, err + } + acbw := &acBalancerWrapper{ + ccb: ccb, + ac: ac, + producers: make(map[balancer.ProducerBuilder]*refCountedProducer), + stateListener: opts.StateListener, + } + ac.acbw = acbw + return acbw, nil +} + +func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) { + // The graceful switch balancer will never call this. + logger.Errorf("ccb RemoveSubConn(%v) called unexpectedly, sc") +} + +func (ccb *ccBalancerWrapper) UpdateAddresses(sc balancer.SubConn, addrs []resolver.Address) { + acbw, ok := sc.(*acBalancerWrapper) + if !ok { + return + } + acbw.UpdateAddresses(addrs) +} + +func (ccb *ccBalancerWrapper) UpdateState(s balancer.State) { + ccb.cc.mu.Lock() + defer ccb.cc.mu.Unlock() + if ccb.cc.conns == nil { + // The CC has been closed; ignore this update. + return + } + + ccb.mu.Lock() + if ccb.closed { + ccb.mu.Unlock() + return + } + ccb.mu.Unlock() + // Update picker before updating state. Even though the ordering here does + // not matter, it can lead to multiple calls of Pick in the common start-up + // case where we wait for ready and then perform an RPC. If the picker is + // updated later, we could call the "connecting" picker when the state is + // updated, and then call the "ready" picker after the picker gets updated. + + // Note that there is no need to check if the balancer wrapper was closed, + // as we know the graceful switch LB policy will not call cc if it has been + // closed. + ccb.cc.pickerWrapper.updatePicker(s.Picker) + ccb.cc.csMgr.updateState(s.ConnectivityState) +} + +func (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOptions) { + ccb.cc.mu.RLock() + defer ccb.cc.mu.RUnlock() + + ccb.mu.Lock() + if ccb.closed { + ccb.mu.Unlock() + return + } + ccb.mu.Unlock() + ccb.cc.resolveNowLocked(o) +} + +func (ccb *ccBalancerWrapper) Target() string { + return ccb.cc.target +} + +// acBalancerWrapper is a wrapper on top of ac for balancers. +// It implements balancer.SubConn interface. +type acBalancerWrapper struct { + ac *addrConn // read-only + ccb *ccBalancerWrapper // read-only + stateListener func(balancer.SubConnState) + + mu sync.Mutex + producers map[balancer.ProducerBuilder]*refCountedProducer +} + +// updateState is invoked by grpc to push a subConn state update to the +// underlying balancer. +func (acbw *acBalancerWrapper) updateState(s connectivity.State, err error) { + acbw.ccb.serializer.Schedule(func(ctx context.Context) { + if ctx.Err() != nil || acbw.ccb.balancer == nil { + return + } + // Even though it is optional for balancers, gracefulswitch ensures + // opts.StateListener is set, so this cannot ever be nil. + // TODO: delete this comment when UpdateSubConnState is removed. + acbw.stateListener(balancer.SubConnState{ConnectivityState: s, ConnectionError: err}) + }) +} + +func (acbw *acBalancerWrapper) String() string { + return fmt.Sprintf("SubConn(id:%d)", acbw.ac.channelz.ID) +} + +func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) { + acbw.ac.updateAddrs(addrs) +} + +func (acbw *acBalancerWrapper) Connect() { + go acbw.ac.connect() +} + +func (acbw *acBalancerWrapper) Shutdown() { + acbw.ccb.cc.removeAddrConn(acbw.ac, errConnDrain) +} + +// NewStream begins a streaming RPC on the addrConn. If the addrConn is not +// ready, blocks until it is or ctx expires. Returns an error when the context +// expires or the addrConn is shut down. +func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { + transport, err := acbw.ac.getTransport(ctx) + if err != nil { + return nil, err + } + return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) +} + +// Invoke performs a unary RPC. If the addrConn is not ready, returns +// errSubConnNotReady. +func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args any, reply any, opts ...CallOption) error { + cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) + if err != nil { + return err + } + if err := cs.SendMsg(args); err != nil { + return err + } + return cs.RecvMsg(reply) +} + +type refCountedProducer struct { + producer balancer.Producer + refs int // number of current refs to the producer + close func() // underlying producer's close function +} + +func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { + acbw.mu.Lock() + defer acbw.mu.Unlock() + + // Look up existing producer from this builder. + pData := acbw.producers[pb] + if pData == nil { + // Not found; create a new one and add it to the producers map. + p, close := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: close} + acbw.producers[pb] = pData + } + // Account for this new reference. + pData.refs++ + + // Return a cleanup function wrapped in a OnceFunc to remove this reference + // and delete the refCountedProducer from the map if the total reference + // count goes to zero. + unref := func() { + acbw.mu.Lock() + pData.refs-- + if pData.refs == 0 { + defer pData.close() // Run outside the acbw mutex + delete(acbw.producers, pb) + } + acbw.mu.Unlock() + } + return pData.producer, grpcsync.OnceFunc(unref) +} diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index 595480112..63c639e4f 100644 --- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -18,8 +18,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.22.0 +// protoc-gen-go v1.34.1 +// protoc v4.25.2 // source: grpc/binlog/v1/binarylog.proto package grpc_binarylog_v1 @@ -430,7 +430,7 @@ type ClientHeader struct { MethodName string `protobuf:"bytes,2,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // A single process may be used to run multiple virtual // servers with different identities. - // The authority is the name of such a server identitiy. + // The authority is the name of such a server identity. // It is typically a portion of the URI in the form of // <host> or <host>:<port> . Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 429c389e4..423be7b43 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -31,15 +31,13 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/balancer/base" + "google.golang.org/grpc/balancer/pickfirst" "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal" - "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/idle" - "google.golang.org/grpc/internal/pretty" iresolver "google.golang.org/grpc/internal/resolver" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" @@ -48,9 +46,9 @@ import ( "google.golang.org/grpc/status" _ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin. - _ "google.golang.org/grpc/internal/resolver/dns" // To register dns resolver. _ "google.golang.org/grpc/internal/resolver/passthrough" // To register passthrough resolver. _ "google.golang.org/grpc/internal/resolver/unix" // To register unix resolver. + _ "google.golang.org/grpc/resolver/dns" // To register dns resolver. ) const ( @@ -69,12 +67,14 @@ var ( errConnDrain = errors.New("grpc: the connection is drained") // errConnClosing indicates that the connection is closing. errConnClosing = errors.New("grpc: the connection is closing") - // errConnIdling indicates the the connection is being closed as the channel + // errConnIdling indicates the connection is being closed as the channel // is moving to an idle mode due to inactivity. errConnIdling = errors.New("grpc: the connection is closing due to channel idleness") // invalidDefaultServiceConfigErrPrefix is used to prefix the json parsing error for the default // service config. invalidDefaultServiceConfigErrPrefix = "grpc: the provided default service config is invalid" + // PickFirstBalancerName is the name of the pick_first balancer. + PickFirstBalancerName = pickfirst.Name ) // The following errors are returned from Dial and DialContext @@ -103,11 +103,6 @@ const ( defaultReadBufSize = 32 * 1024 ) -// Dial creates a client connection to the given target. -func Dial(target string, opts ...DialOption) (*ClientConn, error) { - return DialContext(context.Background(), target, opts...) -} - type defaultConfigSelector struct { sc *ServiceConfig } @@ -119,47 +114,30 @@ func (dcs *defaultConfigSelector) SelectConfig(rpcInfo iresolver.RPCInfo) (*ires }, nil } -// DialContext creates a client connection to the given target. By default, it's -// a non-blocking dial (the function won't wait for connections to be -// established, and connecting happens in the background). To make it a blocking -// dial, use WithBlock() dial option. -// -// In the non-blocking case, the ctx does not act against the connection. It -// only controls the setup steps. -// -// In the blocking case, ctx can be used to cancel or expire the pending -// connection. Once this function returns, the cancellation and expiration of -// ctx will be noop. Users should call ClientConn.Close to terminate all the -// pending operations after this function returns. +// NewClient creates a new gRPC "channel" for the target URI provided. No I/O +// is performed. Use of the ClientConn for RPCs will automatically cause it to +// connect. Connect may be used to manually create a connection, but for most +// users this is unnecessary. // // The target name syntax is defined in -// https://github.com/grpc/grpc/blob/master/doc/naming.md. -// e.g. to use dns resolver, a "dns:///" prefix should be applied to the target. -func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *ClientConn, err error) { +// https://github.com/grpc/grpc/blob/master/doc/naming.md. e.g. to use dns +// resolver, a "dns:///" prefix should be applied to the target. +// +// The DialOptions returned by WithBlock, WithTimeout, +// WithReturnConnectionError, and FailOnNonTempDialError are ignored by this +// function. +func NewClient(target string, opts ...DialOption) (conn *ClientConn, err error) { cc := &ClientConn{ target: target, conns: make(map[*addrConn]struct{}), dopts: defaultDialOptions(), - czData: new(channelzData), } - // We start the channel off in idle mode, but kick it out of idle at the end - // of this method, instead of waiting for the first RPC. Other gRPC - // implementations do wait for the first RPC to kick the channel out of - // idle. But doing so would be a major behavior change for our users who are - // used to seeing the channel active after Dial. - // - // Taking this approach of kicking it out of idle at the end of this method - // allows us to share the code between channel creation and exiting idle - // mode. This will also make it easy for us to switch to starting the - // channel off in idle, if at all we ever get to do that. - cc.idlenessState = ccIdlenessStateIdle - cc.retryThrottler.Store((*retryThrottler)(nil)) cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil}) cc.ctx, cc.cancel = context.WithCancel(context.Background()) - cc.exitIdleCond = sync.NewCond(&cc.mu) + // Apply dial options. disableGlobalOpts := false for _, opt := range opts { if _, ok := opt.(*disableGlobalDialOptions); ok { @@ -178,26 +156,24 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * opt.apply(&cc.dopts) } - chainUnaryClientInterceptors(cc) - chainStreamClientInterceptors(cc) - - defer func() { - if err != nil { - cc.Close() - } - }() + // Determine the resolver to use. + if err := cc.initParsedTargetAndResolverBuilder(); err != nil { + return nil, err + } - // Register ClientConn with channelz. - cc.channelzRegistration(target) + for _, opt := range globalPerTargetDialOptions { + opt.DialOptionForTarget(cc.parsedTarget.URL).apply(&cc.dopts) + } - cc.csMgr = newConnectivityStateManager(cc.ctx, cc.channelzID) + chainUnaryClientInterceptors(cc) + chainStreamClientInterceptors(cc) if err := cc.validateTransportCredentials(); err != nil { return nil, err } if cc.dopts.defaultServiceConfigRawJSON != nil { - scpr := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON) + scpr := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON, cc.dopts.maxCallAttempts) if scpr.Err != nil { return nil, fmt.Errorf("%s: %v", invalidDefaultServiceConfigErrPrefix, scpr.Err) } @@ -205,10 +181,68 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } cc.mkp = cc.dopts.copts.KeepaliveParams - if cc.dopts.copts.UserAgent != "" { - cc.dopts.copts.UserAgent += " " + grpcUA - } else { - cc.dopts.copts.UserAgent = grpcUA + if err = cc.initAuthority(); err != nil { + return nil, err + } + + // Register ClientConn with channelz. Note that this is only done after + // channel creation cannot fail. + cc.channelzRegistration(target) + channelz.Infof(logger, cc.channelz, "parsed dial target is: %#v", cc.parsedTarget) + channelz.Infof(logger, cc.channelz, "Channel authority set to %q", cc.authority) + + cc.csMgr = newConnectivityStateManager(cc.ctx, cc.channelz) + cc.pickerWrapper = newPickerWrapper(cc.dopts.copts.StatsHandlers) + + cc.initIdleStateLocked() // Safe to call without the lock, since nothing else has a reference to cc. + cc.idlenessMgr = idle.NewManager((*idler)(cc), cc.dopts.idleTimeout) + return cc, nil +} + +// Dial calls DialContext(context.Background(), target, opts...). +// +// Deprecated: use NewClient instead. Will be supported throughout 1.x. +func Dial(target string, opts ...DialOption) (*ClientConn, error) { + return DialContext(context.Background(), target, opts...) +} + +// DialContext calls NewClient and then exits idle mode. If WithBlock(true) is +// used, it calls Connect and WaitForStateChange until either the context +// expires or the state of the ClientConn is Ready. +// +// One subtle difference between NewClient and Dial and DialContext is that the +// former uses "dns" as the default name resolver, while the latter use +// "passthrough" for backward compatibility. This distinction should not matter +// to most users, but could matter to legacy users that specify a custom dialer +// and expect it to receive the target string directly. +// +// Deprecated: use NewClient instead. Will be supported throughout 1.x. +func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *ClientConn, err error) { + // At the end of this method, we kick the channel out of idle, rather than + // waiting for the first rpc. + opts = append([]DialOption{withDefaultScheme("passthrough")}, opts...) + cc, err := NewClient(target, opts...) + if err != nil { + return nil, err + } + + // We start the channel off in idle mode, but kick it out of idle now, + // instead of waiting for the first RPC. This is the legacy behavior of + // Dial. + defer func() { + if err != nil { + cc.Close() + } + }() + + // This creates the name resolver, load balancer, etc. + if err := cc.idlenessMgr.ExitIdleMode(); err != nil { + return nil, err + } + + // Return now for non-blocking dials. + if !cc.dopts.block { + return cc, nil } if cc.dopts.timeout > 0 { @@ -231,49 +265,6 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } }() - if cc.dopts.bs == nil { - cc.dopts.bs = backoff.DefaultExponential - } - - // Determine the resolver to use. - if err := cc.parseTargetAndFindResolver(); err != nil { - return nil, err - } - if err = cc.determineAuthority(); err != nil { - return nil, err - } - - if cc.dopts.scChan != nil { - // Blocking wait for the initial service config. - select { - case sc, ok := <-cc.dopts.scChan: - if ok { - cc.sc = &sc - cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{&sc}) - } - case <-ctx.Done(): - return nil, ctx.Err() - } - } - if cc.dopts.scChan != nil { - go cc.scWatcher() - } - - // This creates the name resolver, load balancer, blocking picker etc. - if err := cc.exitIdleMode(); err != nil { - return nil, err - } - - // Configure idleness support with configured idle timeout or default idle - // timeout duration. Idleness can be explicitly disabled by the user, by - // setting the dial option to 0. - cc.idlenessMgr = idle.NewManager(idle.ManagerOptions{Enforcer: (*idler)(cc), Timeout: cc.dopts.idleTimeout, Logger: logger}) - - // Return early for non-blocking dials. - if !cc.dopts.block { - return cc, nil - } - // A blocking dial blocks until the clientConn is ready. for { s := cc.GetState() @@ -305,23 +296,23 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * // addTraceEvent is a helper method to add a trace event on the channel. If the // channel is a nested one, the same event is also added on the parent channel. func (cc *ClientConn) addTraceEvent(msg string) { - ted := &channelz.TraceEventDesc{ + ted := &channelz.TraceEvent{ Desc: fmt.Sprintf("Channel %s", msg), Severity: channelz.CtInfo, } - if cc.dopts.channelzParentID != nil { - ted.Parent = &channelz.TraceEventDesc{ - Desc: fmt.Sprintf("Nested channel(id:%d) %s", cc.channelzID.Int(), msg), + if cc.dopts.channelzParent != nil { + ted.Parent = &channelz.TraceEvent{ + Desc: fmt.Sprintf("Nested channel(id:%d) %s", cc.channelz.ID, msg), Severity: channelz.CtInfo, } } - channelz.AddTraceEvent(logger, cc.channelzID, 0, ted) + channelz.AddTraceEvent(logger, cc.channelz, 0, ted) } type idler ClientConn -func (i *idler) EnterIdleMode() error { - return (*ClientConn)(i).enterIdleMode() +func (i *idler) EnterIdleMode() { + (*ClientConn)(i).enterIdleMode() } func (i *idler) ExitIdleMode() error { @@ -329,117 +320,71 @@ func (i *idler) ExitIdleMode() error { } // exitIdleMode moves the channel out of idle mode by recreating the name -// resolver and load balancer. -func (cc *ClientConn) exitIdleMode() error { +// resolver and load balancer. This should never be called directly; use +// cc.idlenessMgr.ExitIdleMode instead. +func (cc *ClientConn) exitIdleMode() (err error) { cc.mu.Lock() if cc.conns == nil { cc.mu.Unlock() return errConnClosing } - if cc.idlenessState != ccIdlenessStateIdle { - channelz.Infof(logger, cc.channelzID, "ClientConn asked to exit idle mode, current mode is %v", cc.idlenessState) - cc.mu.Unlock() - return nil - } - - defer func() { - // When Close() and exitIdleMode() race against each other, one of the - // following two can happen: - // - Close() wins the race and runs first. exitIdleMode() runs after, and - // sees that the ClientConn is already closed and hence returns early. - // - exitIdleMode() wins the race and runs first and recreates the balancer - // and releases the lock before recreating the resolver. If Close() runs - // in this window, it will wait for exitIdleMode to complete. - // - // We achieve this synchronization using the below condition variable. - cc.mu.Lock() - cc.idlenessState = ccIdlenessStateActive - cc.exitIdleCond.Signal() - cc.mu.Unlock() - }() - - cc.idlenessState = ccIdlenessStateExitingIdle - exitedIdle := false - if cc.blockingpicker == nil { - cc.blockingpicker = newPickerWrapper(cc.dopts.copts.StatsHandlers) - } else { - cc.blockingpicker.exitIdleMode() - exitedIdle = true - } - - var credsClone credentials.TransportCredentials - if creds := cc.dopts.copts.TransportCredentials; creds != nil { - credsClone = creds.Clone() - } - if cc.balancerWrapper == nil { - cc.balancerWrapper = newCCBalancerWrapper(cc, balancer.BuildOptions{ - DialCreds: credsClone, - CredsBundle: cc.dopts.copts.CredsBundle, - Dialer: cc.dopts.copts.Dialer, - Authority: cc.authority, - CustomUserAgent: cc.dopts.copts.UserAgent, - ChannelzParentID: cc.channelzID, - Target: cc.parsedTarget, - }) - } else { - cc.balancerWrapper.exitIdleMode() - } - cc.firstResolveEvent = grpcsync.NewEvent() cc.mu.Unlock() // This needs to be called without cc.mu because this builds a new resolver - // which might update state or report error inline which needs to be handled - // by cc.updateResolverState() which also grabs cc.mu. - if err := cc.initResolverWrapper(credsClone); err != nil { + // which might update state or report error inline, which would then need to + // acquire cc.mu. + if err := cc.resolverWrapper.start(); err != nil { return err } - if exitedIdle { - cc.addTraceEvent("exiting idle mode") - } + cc.addTraceEvent("exiting idle mode") return nil } +// initIdleStateLocked initializes common state to how it should be while idle. +func (cc *ClientConn) initIdleStateLocked() { + cc.resolverWrapper = newCCResolverWrapper(cc) + cc.balancerWrapper = newCCBalancerWrapper(cc) + cc.firstResolveEvent = grpcsync.NewEvent() + // cc.conns == nil is a proxy for the ClientConn being closed. So, instead + // of setting it to nil here, we recreate the map. This also means that we + // don't have to do this when exiting idle mode. + cc.conns = make(map[*addrConn]struct{}) +} + // enterIdleMode puts the channel in idle mode, and as part of it shuts down the -// name resolver, load balancer and any subchannels. -func (cc *ClientConn) enterIdleMode() error { +// name resolver, load balancer, and any subchannels. This should never be +// called directly; use cc.idlenessMgr.EnterIdleMode instead. +func (cc *ClientConn) enterIdleMode() { cc.mu.Lock() - defer cc.mu.Unlock() if cc.conns == nil { - return ErrClientConnClosing - } - if cc.idlenessState != ccIdlenessStateActive { - channelz.Warningf(logger, cc.channelzID, "ClientConn asked to enter idle mode, current mode is %v", cc.idlenessState) - return nil + cc.mu.Unlock() + return } - // cc.conns == nil is a proxy for the ClientConn being closed. So, instead - // of setting it to nil here, we recreate the map. This also means that we - // don't have to do this when exiting idle mode. conns := cc.conns - cc.conns = make(map[*addrConn]struct{}) - // TODO: Currently, we close the resolver wrapper upon entering idle mode - // and create a new one upon exiting idle mode. This means that the - // `cc.resolverWrapper` field would be overwritten everytime we exit idle - // mode. While this means that we need to hold `cc.mu` when accessing - // `cc.resolverWrapper`, it makes the code simpler in the wrapper. We should - // try to do the same for the balancer and picker wrappers too. - cc.resolverWrapper.close() - cc.blockingpicker.enterIdleMode() - cc.balancerWrapper.enterIdleMode() + rWrapper := cc.resolverWrapper + rWrapper.close() + cc.pickerWrapper.reset() + bWrapper := cc.balancerWrapper + bWrapper.close() cc.csMgr.updateState(connectivity.Idle) - cc.idlenessState = ccIdlenessStateIdle cc.addTraceEvent("entering idle mode") - go func() { - for ac := range conns { - ac.tearDown(errConnIdling) - } - }() + cc.initIdleStateLocked() - return nil + cc.mu.Unlock() + + // Block until the name resolver and LB policy are closed. + <-rWrapper.serializer.Done() + <-bWrapper.serializer.Done() + + // Close all subchannels after the LB policy is closed. + for ac := range conns { + ac.tearDown(errConnIdling) + } } // validateTransportCredentials performs a series of checks on the configured @@ -478,14 +423,15 @@ func (cc *ClientConn) validateTransportCredentials() error { } // channelzRegistration registers the newly created ClientConn with channelz and -// stores the returned identifier in `cc.channelzID` and `cc.csMgr.channelzID`. -// A channelz trace event is emitted for ClientConn creation. If the newly -// created ClientConn is a nested one, i.e a valid parent ClientConn ID is -// specified via a dial option, the trace event is also added to the parent. +// stores the returned identifier in `cc.channelz`. A channelz trace event is +// emitted for ClientConn creation. If the newly created ClientConn is a nested +// one, i.e a valid parent ClientConn ID is specified via a dial option, the +// trace event is also added to the parent. // // Doesn't grab cc.mu as this method is expected to be called only at Dial time. func (cc *ClientConn) channelzRegistration(target string) { - cc.channelzID = channelz.RegisterChannel(&channelzChannel{cc}, cc.dopts.channelzParentID, target) + parentChannel, _ := cc.dopts.channelzParent.(*channelz.Channel) + cc.channelz = channelz.RegisterChannel(parentChannel, target) cc.addTraceEvent("created") } @@ -552,11 +498,11 @@ func getChainStreamer(interceptors []StreamClientInterceptor, curr int, finalStr } // newConnectivityStateManager creates an connectivityStateManager with -// the specified id. -func newConnectivityStateManager(ctx context.Context, id *channelz.Identifier) *connectivityStateManager { +// the specified channel. +func newConnectivityStateManager(ctx context.Context, channel *channelz.Channel) *connectivityStateManager { return &connectivityStateManager{ - channelzID: id, - pubSub: grpcsync.NewPubSub(ctx), + channelz: channel, + pubSub: grpcsync.NewPubSub(ctx), } } @@ -570,7 +516,7 @@ type connectivityStateManager struct { mu sync.Mutex state connectivity.State notifyChan chan struct{} - channelzID *channelz.Identifier + channelz *channelz.Channel pubSub *grpcsync.PubSub } @@ -587,9 +533,10 @@ func (csm *connectivityStateManager) updateState(state connectivity.State) { return } csm.state = state + csm.channelz.ChannelMetrics.State.Store(&state) csm.pubSub.Publish(state) - channelz.Infof(logger, csm.channelzID, "Channel Connectivity change to %v", state) + channelz.Infof(logger, csm.channelz, "Channel Connectivity change to %v", state) if csm.notifyChan != nil { // There are other goroutines waiting on this channel. close(csm.notifyChan) @@ -643,72 +590,40 @@ type ClientConn struct { cancel context.CancelFunc // Cancelled on close. // The following are initialized at dial time, and are read-only after that. - target string // User's dial target. - parsedTarget resolver.Target // See parseTargetAndFindResolver(). - authority string // See determineAuthority(). - dopts dialOptions // Default and user specified dial options. - channelzID *channelz.Identifier // Channelz identifier for the channel. - resolverBuilder resolver.Builder // See parseTargetAndFindResolver(). - balancerWrapper *ccBalancerWrapper // Uses gracefulswitch.balancer underneath. - idlenessMgr idle.Manager + target string // User's dial target. + parsedTarget resolver.Target // See initParsedTargetAndResolverBuilder(). + authority string // See initAuthority(). + dopts dialOptions // Default and user specified dial options. + channelz *channelz.Channel // Channelz object. + resolverBuilder resolver.Builder // See initParsedTargetAndResolverBuilder(). + idlenessMgr *idle.Manager // The following provide their own synchronization, and therefore don't // require cc.mu to be held to access them. csMgr *connectivityStateManager - blockingpicker *pickerWrapper + pickerWrapper *pickerWrapper safeConfigSelector iresolver.SafeConfigSelector - czData *channelzData retryThrottler atomic.Value // Updated from service config. - // firstResolveEvent is used to track whether the name resolver sent us at - // least one update. RPCs block on this event. - firstResolveEvent *grpcsync.Event - // mu protects the following fields. // TODO: split mu so the same mutex isn't used for everything. mu sync.RWMutex - resolverWrapper *ccResolverWrapper // Initialized in Dial; cleared in Close. + resolverWrapper *ccResolverWrapper // Always recreated whenever entering idle to simplify Close. + balancerWrapper *ccBalancerWrapper // Always recreated whenever entering idle to simplify Close. sc *ServiceConfig // Latest service config received from the resolver. conns map[*addrConn]struct{} // Set to nil on close. mkp keepalive.ClientParameters // May be updated upon receipt of a GoAway. - idlenessState ccIdlenessState // Tracks idleness state of the channel. - exitIdleCond *sync.Cond // Signalled when channel exits idle. + // firstResolveEvent is used to track whether the name resolver sent us at + // least one update. RPCs block on this event. May be accessed without mu + // if we know we cannot be asked to enter idle mode while accessing it (e.g. + // when the idle manager has already been closed, or if we are already + // entering idle mode). + firstResolveEvent *grpcsync.Event lceMu sync.Mutex // protects lastConnectionError lastConnectionError error } -// ccIdlenessState tracks the idleness state of the channel. -// -// Channels start off in `active` and move to `idle` after a period of -// inactivity. When moving back to `active` upon an incoming RPC, they -// transition through `exiting_idle`. This state is useful for synchronization -// with Close(). -// -// This state tracking is mostly for self-protection. The idlenessManager is -// expected to keep track of the state as well, and is expected not to call into -// the ClientConn unnecessarily. -type ccIdlenessState int8 - -const ( - ccIdlenessStateActive ccIdlenessState = iota - ccIdlenessStateIdle - ccIdlenessStateExitingIdle -) - -func (s ccIdlenessState) String() string { - switch s { - case ccIdlenessStateActive: - return "active" - case ccIdlenessStateIdle: - return "idle" - case ccIdlenessStateExitingIdle: - return "exitingIdle" - default: - return "unknown" - } -} - // WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or // ctx expires. A true value is returned in former case and false in latter. // @@ -748,29 +663,15 @@ func (cc *ClientConn) GetState() connectivity.State { // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. func (cc *ClientConn) Connect() { - cc.exitIdleMode() + if err := cc.idlenessMgr.ExitIdleMode(); err != nil { + cc.addTraceEvent(err.Error()) + return + } // If the ClientConn was not in idle mode, we need to call ExitIdle on the // LB policy so that connections can be created. - cc.balancerWrapper.exitIdleMode() -} - -func (cc *ClientConn) scWatcher() { - for { - select { - case sc, ok := <-cc.dopts.scChan: - if !ok { - return - } - cc.mu.Lock() - // TODO: load balance policy runtime change is ignored. - // We may revisit this decision in the future. - cc.sc = &sc - cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{&sc}) - cc.mu.Unlock() - case <-cc.ctx.Done(): - return - } - } + cc.mu.Lock() + cc.balancerWrapper.exitIdle() + cc.mu.Unlock() } // waitForResolvedAddrs blocks until the resolver has provided addresses or the @@ -795,7 +696,7 @@ func (cc *ClientConn) waitForResolvedAddrs(ctx context.Context) error { var emptyServiceConfig *ServiceConfig func init() { - cfg := parseServiceConfig("{}") + cfg := parseServiceConfig("{}", defaultMaxCallAttempts) if cfg.Err != nil { panic(fmt.Sprintf("impossible error parsing empty service config: %v", cfg.Err)) } @@ -804,29 +705,28 @@ func init() { internal.SubscribeToConnectivityStateChanges = func(cc *ClientConn, s grpcsync.Subscriber) func() { return cc.csMgr.pubSub.Subscribe(s) } - internal.EnterIdleModeForTesting = func(cc *ClientConn) error { - return cc.enterIdleMode() + internal.EnterIdleModeForTesting = func(cc *ClientConn) { + cc.idlenessMgr.EnterIdleModeForTesting() } internal.ExitIdleModeForTesting = func(cc *ClientConn) error { - return cc.exitIdleMode() + return cc.idlenessMgr.ExitIdleMode() } } -func (cc *ClientConn) maybeApplyDefaultServiceConfig(addrs []resolver.Address) { +func (cc *ClientConn) maybeApplyDefaultServiceConfig() { if cc.sc != nil { - cc.applyServiceConfigAndBalancer(cc.sc, nil, addrs) + cc.applyServiceConfigAndBalancer(cc.sc, nil) return } if cc.dopts.defaultServiceConfig != nil { - cc.applyServiceConfigAndBalancer(cc.dopts.defaultServiceConfig, &defaultConfigSelector{cc.dopts.defaultServiceConfig}, addrs) + cc.applyServiceConfigAndBalancer(cc.dopts.defaultServiceConfig, &defaultConfigSelector{cc.dopts.defaultServiceConfig}) } else { - cc.applyServiceConfigAndBalancer(emptyServiceConfig, &defaultConfigSelector{emptyServiceConfig}, addrs) + cc.applyServiceConfigAndBalancer(emptyServiceConfig, &defaultConfigSelector{emptyServiceConfig}) } } -func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { +func (cc *ClientConn) updateResolverStateAndUnlock(s resolver.State, err error) error { defer cc.firstResolveEvent.Fire() - cc.mu.Lock() // Check if the ClientConn is already closed. Some fields (e.g. // balancerWrapper) are set to nil when closing the ClientConn, and could // cause nil pointer panic if we don't have this check. @@ -839,7 +739,7 @@ func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { // May need to apply the initial service config in case the resolver // doesn't support service configs, or doesn't provide a service config // with the new addresses. - cc.maybeApplyDefaultServiceConfig(nil) + cc.maybeApplyDefaultServiceConfig() cc.balancerWrapper.resolverError(err) @@ -850,10 +750,10 @@ func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { var ret error if cc.dopts.disableServiceConfig { - channelz.Infof(logger, cc.channelzID, "ignoring service config from resolver (%v) and applying the default because service config is disabled", s.ServiceConfig) - cc.maybeApplyDefaultServiceConfig(s.Addresses) + channelz.Infof(logger, cc.channelz, "ignoring service config from resolver (%v) and applying the default because service config is disabled", s.ServiceConfig) + cc.maybeApplyDefaultServiceConfig() } else if s.ServiceConfig == nil { - cc.maybeApplyDefaultServiceConfig(s.Addresses) + cc.maybeApplyDefaultServiceConfig() // TODO: do we need to apply a failing LB policy if there is no // default, per the error handling design? } else { @@ -861,18 +761,18 @@ func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { configSelector := iresolver.GetConfigSelector(s) if configSelector != nil { if len(s.ServiceConfig.Config.(*ServiceConfig).Methods) != 0 { - channelz.Infof(logger, cc.channelzID, "method configs in service config will be ignored due to presence of config selector") + channelz.Infof(logger, cc.channelz, "method configs in service config will be ignored due to presence of config selector") } } else { configSelector = &defaultConfigSelector{sc} } - cc.applyServiceConfigAndBalancer(sc, configSelector, s.Addresses) + cc.applyServiceConfigAndBalancer(sc, configSelector) } else { ret = balancer.ErrBadResolverState if cc.sc == nil { // Apply the failing LB only if we haven't received valid service config // from the name resolver in the past. - cc.applyFailingLB(s.ServiceConfig) + cc.applyFailingLBLocked(s.ServiceConfig) cc.mu.Unlock() return ret } @@ -881,7 +781,7 @@ func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { var balCfg serviceconfig.LoadBalancingConfig if cc.sc != nil && cc.sc.lbConfig != nil { - balCfg = cc.sc.lbConfig.cfg + balCfg = cc.sc.lbConfig } bw := cc.balancerWrapper cc.mu.Unlock() @@ -894,15 +794,13 @@ func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { return ret } -// applyFailingLB is akin to configuring an LB policy on the channel which +// applyFailingLBLocked is akin to configuring an LB policy on the channel which // always fails RPCs. Here, an actual LB policy is not configured, but an always // erroring picker is configured, which returns errors with information about // what was invalid in the received service config. A config selector with no // service config is configured, and the connectivity state of the channel is // set to TransientFailure. -// -// Caller must hold cc.mu. -func (cc *ClientConn) applyFailingLB(sc *serviceconfig.ParseResult) { +func (cc *ClientConn) applyFailingLBLocked(sc *serviceconfig.ParseResult) { var err error if sc.Err != nil { err = status.Errorf(codes.Unavailable, "error parsing service config: %v", sc.Err) @@ -910,14 +808,10 @@ func (cc *ClientConn) applyFailingLB(sc *serviceconfig.ParseResult) { err = status.Errorf(codes.Unavailable, "illegal service config type: %T", sc.Config) } cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil}) - cc.blockingpicker.updatePicker(base.NewErrPicker(err)) + cc.pickerWrapper.updatePicker(base.NewErrPicker(err)) cc.csMgr.updateState(connectivity.TransientFailure) } -func (cc *ClientConn) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State, err error) { - cc.balancerWrapper.updateSubConnState(sc, s, err) -} - // Makes a copy of the input addresses slice and clears out the balancer // attributes field. Addresses are passed during subconn creation and address // update operations. In both cases, we will clear the balancer attributes by @@ -932,42 +826,39 @@ func copyAddressesWithoutBalancerAttributes(in []resolver.Address) []resolver.Ad return out } -// newAddrConn creates an addrConn for addrs and adds it to cc.conns. +// newAddrConnLocked creates an addrConn for addrs and adds it to cc.conns. // // Caller needs to make sure len(addrs) > 0. -func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (*addrConn, error) { +func (cc *ClientConn) newAddrConnLocked(addrs []resolver.Address, opts balancer.NewSubConnOptions) (*addrConn, error) { + if cc.conns == nil { + return nil, ErrClientConnClosing + } + ac := &addrConn{ state: connectivity.Idle, cc: cc, addrs: copyAddressesWithoutBalancerAttributes(addrs), scopts: opts, dopts: cc.dopts, - czData: new(channelzData), + channelz: channelz.RegisterSubChannel(cc.channelz, ""), resetBackoff: make(chan struct{}), stateChan: make(chan struct{}), } ac.ctx, ac.cancel = context.WithCancel(cc.ctx) - // Track ac in cc. This needs to be done before any getTransport(...) is called. - cc.mu.Lock() - defer cc.mu.Unlock() - if cc.conns == nil { - return nil, ErrClientConnClosing - } + // Start with our address set to the first address; this may be updated if + // we connect to different addresses. + ac.channelz.ChannelMetrics.Target.Store(&addrs[0].Addr) - var err error - ac.channelzID, err = channelz.RegisterSubChannel(ac, cc.channelzID, "") - if err != nil { - return nil, err - } - channelz.AddTraceEvent(logger, ac.channelzID, 0, &channelz.TraceEventDesc{ + channelz.AddTraceEvent(logger, ac.channelz, 0, &channelz.TraceEvent{ Desc: "Subchannel created", Severity: channelz.CtInfo, - Parent: &channelz.TraceEventDesc{ - Desc: fmt.Sprintf("Subchannel(id:%d) created", ac.channelzID.Int()), + Parent: &channelz.TraceEvent{ + Desc: fmt.Sprintf("Subchannel(id:%d) created", ac.channelz.ID), Severity: channelz.CtInfo, }, }) + // Track ac in cc. This needs to be done before any getTransport(...) is called. cc.conns[ac] = struct{}{} return ac, nil } @@ -985,38 +876,27 @@ func (cc *ClientConn) removeAddrConn(ac *addrConn, err error) { ac.tearDown(err) } -func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric { - return &channelz.ChannelInternalMetric{ - State: cc.GetState(), - Target: cc.target, - CallsStarted: atomic.LoadInt64(&cc.czData.callsStarted), - CallsSucceeded: atomic.LoadInt64(&cc.czData.callsSucceeded), - CallsFailed: atomic.LoadInt64(&cc.czData.callsFailed), - LastCallStartedTimestamp: time.Unix(0, atomic.LoadInt64(&cc.czData.lastCallStartedTime)), - } -} - // Target returns the target string of the ClientConn. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. func (cc *ClientConn) Target() string { return cc.target } +// CanonicalTarget returns the canonical target string of the ClientConn. +func (cc *ClientConn) CanonicalTarget() string { + return cc.parsedTarget.String() +} + func (cc *ClientConn) incrCallsStarted() { - atomic.AddInt64(&cc.czData.callsStarted, 1) - atomic.StoreInt64(&cc.czData.lastCallStartedTime, time.Now().UnixNano()) + cc.channelz.ChannelMetrics.CallsStarted.Add(1) + cc.channelz.ChannelMetrics.LastCallStartedTimestamp.Store(time.Now().UnixNano()) } func (cc *ClientConn) incrCallsSucceeded() { - atomic.AddInt64(&cc.czData.callsSucceeded, 1) + cc.channelz.ChannelMetrics.CallsSucceeded.Add(1) } func (cc *ClientConn) incrCallsFailed() { - atomic.AddInt64(&cc.czData.callsFailed, 1) + cc.channelz.ChannelMetrics.CallsFailed.Add(1) } // connect starts creating a transport. @@ -1059,10 +939,14 @@ func equalAddresses(a, b []resolver.Address) bool { // updateAddrs updates ac.addrs with the new addresses list and handles active // connections or connection attempts. func (ac *addrConn) updateAddrs(addrs []resolver.Address) { - ac.mu.Lock() - channelz.Infof(logger, ac.channelzID, "addrConn: updateAddrs curAddr: %v, addrs: %v", pretty.ToJSON(ac.curAddr), pretty.ToJSON(addrs)) - addrs = copyAddressesWithoutBalancerAttributes(addrs) + limit := len(addrs) + if limit > 5 { + limit = 5 + } + channelz.Infof(logger, ac.channelz, "addrConn: updateAddrs addrs (%d of %d): %v", limit, len(addrs), addrs[:limit]) + + ac.mu.Lock() if equalAddresses(ac.addrs, addrs) { ac.mu.Unlock() return @@ -1174,13 +1058,13 @@ func (cc *ClientConn) healthCheckConfig() *healthCheckConfig { } func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, balancer.PickResult, error) { - return cc.blockingpicker.pick(ctx, failfast, balancer.PickInfo{ + return cc.pickerWrapper.pick(ctx, failfast, balancer.PickInfo{ Ctx: ctx, FullMethodName: method, }) } -func (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, configSelector iresolver.ConfigSelector, addrs []resolver.Address) { +func (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, configSelector iresolver.ConfigSelector) { if sc == nil { // should never reach here. return @@ -1201,27 +1085,16 @@ func (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, configSel } else { cc.retryThrottler.Store((*retryThrottler)(nil)) } - - var newBalancerName string - if cc.sc == nil || (cc.sc.lbConfig == nil && cc.sc.LB == nil) { - // No service config or no LB policy specified in config. - newBalancerName = PickFirstBalancerName - } else if cc.sc.lbConfig != nil { - newBalancerName = cc.sc.lbConfig.name - } else { // cc.sc.LB != nil - newBalancerName = *cc.sc.LB - } - cc.balancerWrapper.switchTo(newBalancerName) } func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) { cc.mu.RLock() - r := cc.resolverWrapper + cc.resolverWrapper.resolveNow(o) cc.mu.RUnlock() - if r == nil { - return - } - go r.resolveNow(o) +} + +func (cc *ClientConn) resolveNowLocked(o resolver.ResolveNowOptions) { + cc.resolverWrapper.resolveNow(o) } // ResetConnectBackoff wakes up all subchannels in transient failure and causes @@ -1253,40 +1126,32 @@ func (cc *ClientConn) Close() error { <-cc.csMgr.pubSub.Done() }() + // Prevent calls to enter/exit idle immediately, and ensure we are not + // currently entering/exiting idle mode. + cc.idlenessMgr.Close() + cc.mu.Lock() if cc.conns == nil { cc.mu.Unlock() return ErrClientConnClosing } - for cc.idlenessState == ccIdlenessStateExitingIdle { - cc.exitIdleCond.Wait() - } - conns := cc.conns cc.conns = nil cc.csMgr.updateState(connectivity.Shutdown) - pWrapper := cc.blockingpicker - rWrapper := cc.resolverWrapper - bWrapper := cc.balancerWrapper - idlenessMgr := cc.idlenessMgr + // We can safely unlock and continue to access all fields now as + // cc.conns==nil, preventing any further operations on cc. cc.mu.Unlock() + cc.resolverWrapper.close() // The order of closing matters here since the balancer wrapper assumes the // picker is closed before it is closed. - if pWrapper != nil { - pWrapper.close() - } - if bWrapper != nil { - bWrapper.close() - } - if rWrapper != nil { - rWrapper.close() - } - if idlenessMgr != nil { - idlenessMgr.Close() - } + cc.pickerWrapper.close() + cc.balancerWrapper.close() + + <-cc.resolverWrapper.serializer.Done() + <-cc.balancerWrapper.serializer.Done() for ac := range conns { ac.tearDown(ErrClientConnClosing) @@ -1295,7 +1160,7 @@ func (cc *ClientConn) Close() error { // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add // trace reference to the entity being deleted, and thus prevent it from being // deleted right away. - channelz.RemoveEntry(cc.channelzID) + channelz.RemoveEntry(cc.channelz.ID) return nil } @@ -1307,7 +1172,7 @@ type addrConn struct { cc *ClientConn dopts dialOptions - acbw balancer.SubConn + acbw *acBalancerWrapper scopts balancer.NewSubConnOptions // transport is set when there's a viable transport (note: ac state may not be READY as LB channel @@ -1316,6 +1181,10 @@ type addrConn struct { // is received, transport is closed, ac has been torn down). transport transport.ClientTransport // The current transport. + // This mutex is used on the RPC path, so its usage should be minimized as + // much as possible. + // TODO: Find a lock-free way to retrieve the transport and state from the + // addrConn. mu sync.Mutex curAddr resolver.Address // The current address. addrs []resolver.Address // All addresses that the resolver resolved to. @@ -1327,8 +1196,7 @@ type addrConn struct { backoffIdx int // Needs to be stateful for resetConnectBackoff. resetBackoff chan struct{} - channelzID *channelz.Identifier - czData *channelzData + channelz *channelz.SubChannel } // Note: this requires a lock on ac.mu. @@ -1340,12 +1208,13 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error) close(ac.stateChan) ac.stateChan = make(chan struct{}) ac.state = s + ac.channelz.ChannelMetrics.State.Store(&s) if lastErr == nil { - channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v", s) + channelz.Infof(logger, ac.channelz, "Subchannel Connectivity change to %v", s) } else { - channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v, last error: %s", s, lastErr) + channelz.Infof(logger, ac.channelz, "Subchannel Connectivity change to %v, last error: %s", s, lastErr) } - ac.cc.handleSubConnStateChange(ac.acbw, s, lastErr) + ac.acbw.updateState(s, lastErr) } // adjustParams updates parameters used to create transports upon @@ -1441,6 +1310,7 @@ func (ac *addrConn) resetTransport() { func (ac *addrConn) tryAllAddrs(ctx context.Context, addrs []resolver.Address, connectDeadline time.Time) error { var firstConnErr error for _, addr := range addrs { + ac.channelz.ChannelMetrics.Target.Store(&addr.Addr) if ctx.Err() != nil { return errConnClosing } @@ -1456,7 +1326,7 @@ func (ac *addrConn) tryAllAddrs(ctx context.Context, addrs []resolver.Address, c } ac.mu.Unlock() - channelz.Infof(logger, ac.channelzID, "Subchannel picks a new address %q to connect", addr.Addr) + channelz.Infof(logger, ac.channelz, "Subchannel picks a new address %q to connect", addr.Addr) err := ac.createTransport(ctx, addr, copts, connectDeadline) if err == nil { @@ -1509,7 +1379,7 @@ func (ac *addrConn) createTransport(ctx context.Context, addr resolver.Address, connectCtx, cancel := context.WithDeadline(ctx, connectDeadline) defer cancel() - copts.ChannelzParentID = ac.channelzID + copts.ChannelzParent = ac.channelz newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onClose) if err != nil { @@ -1518,7 +1388,7 @@ func (ac *addrConn) createTransport(ctx context.Context, addr resolver.Address, } // newTr is either nil, or closed. hcancel() - channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s. Err: %v", addr, err) + channelz.Warningf(logger, ac.channelz, "grpc: addrConn.createTransport failed to connect to %s. Err: %v", addr, err) return err } @@ -1590,7 +1460,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { // The health package is not imported to set health check function. // // TODO: add a link to the health check doc in the error message. - channelz.Error(logger, ac.channelzID, "Health check is requested but health check function is not set.") + channelz.Error(logger, ac.channelz, "Health check is requested but health check function is not set.") return } @@ -1620,9 +1490,9 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { err := ac.cc.dopts.healthCheckFunc(ctx, newStream, setConnectivityState, healthCheckConfig.ServiceName) if err != nil { if status.Code(err) == codes.Unimplemented { - channelz.Error(logger, ac.channelzID, "Subchannel health check is unimplemented at server side, thus health check is disabled") + channelz.Error(logger, ac.channelz, "Subchannel health check is unimplemented at server side, thus health check is disabled") } else { - channelz.Errorf(logger, ac.channelzID, "Health checking failed: %v", err) + channelz.Errorf(logger, ac.channelz, "Health checking failed: %v", err) } } }() @@ -1687,18 +1557,18 @@ func (ac *addrConn) tearDown(err error) { ac.cancel() ac.curAddr = resolver.Address{} - channelz.AddTraceEvent(logger, ac.channelzID, 0, &channelz.TraceEventDesc{ + channelz.AddTraceEvent(logger, ac.channelz, 0, &channelz.TraceEvent{ Desc: "Subchannel deleted", Severity: channelz.CtInfo, - Parent: &channelz.TraceEventDesc{ - Desc: fmt.Sprintf("Subchannel(id:%d) deleted", ac.channelzID.Int()), + Parent: &channelz.TraceEvent{ + Desc: fmt.Sprintf("Subchannel(id:%d) deleted", ac.channelz.ID), Severity: channelz.CtInfo, }, }) // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add // trace reference to the entity being deleted, and thus prevent it from // being deleted right away. - channelz.RemoveEntry(ac.channelzID) + channelz.RemoveEntry(ac.channelz.ID) ac.mu.Unlock() // We have to release the lock before the call to GracefulClose/Close here @@ -1725,39 +1595,6 @@ func (ac *addrConn) tearDown(err error) { } } -func (ac *addrConn) getState() connectivity.State { - ac.mu.Lock() - defer ac.mu.Unlock() - return ac.state -} - -func (ac *addrConn) ChannelzMetric() *channelz.ChannelInternalMetric { - ac.mu.Lock() - addr := ac.curAddr.Addr - ac.mu.Unlock() - return &channelz.ChannelInternalMetric{ - State: ac.getState(), - Target: addr, - CallsStarted: atomic.LoadInt64(&ac.czData.callsStarted), - CallsSucceeded: atomic.LoadInt64(&ac.czData.callsSucceeded), - CallsFailed: atomic.LoadInt64(&ac.czData.callsFailed), - LastCallStartedTimestamp: time.Unix(0, atomic.LoadInt64(&ac.czData.lastCallStartedTime)), - } -} - -func (ac *addrConn) incrCallsStarted() { - atomic.AddInt64(&ac.czData.callsStarted, 1) - atomic.StoreInt64(&ac.czData.lastCallStartedTime, time.Now().UnixNano()) -} - -func (ac *addrConn) incrCallsSucceeded() { - atomic.AddInt64(&ac.czData.callsSucceeded, 1) -} - -func (ac *addrConn) incrCallsFailed() { - atomic.AddInt64(&ac.czData.callsFailed, 1) -} - type retryThrottler struct { max float64 thresh float64 @@ -1795,12 +1632,17 @@ func (rt *retryThrottler) successfulRPC() { } } -type channelzChannel struct { - cc *ClientConn +func (ac *addrConn) incrCallsStarted() { + ac.channelz.ChannelMetrics.CallsStarted.Add(1) + ac.channelz.ChannelMetrics.LastCallStartedTimestamp.Store(time.Now().UnixNano()) } -func (c *channelzChannel) ChannelzMetric() *channelz.ChannelInternalMetric { - return c.cc.channelzMetric() +func (ac *addrConn) incrCallsSucceeded() { + ac.channelz.ChannelMetrics.CallsSucceeded.Add(1) +} + +func (ac *addrConn) incrCallsFailed() { + ac.channelz.ChannelMetrics.CallsFailed.Add(1) } // ErrClientConnTimeout indicates that the ClientConn cannot establish the @@ -1834,22 +1676,19 @@ func (cc *ClientConn) connectionError() error { return cc.lastConnectionError } -// parseTargetAndFindResolver parses the user's dial target and stores the -// parsed target in `cc.parsedTarget`. +// initParsedTargetAndResolverBuilder parses the user's dial target and stores +// the parsed target in `cc.parsedTarget`. // // The resolver to use is determined based on the scheme in the parsed target // and the same is stored in `cc.resolverBuilder`. // // Doesn't grab cc.mu as this method is expected to be called only at Dial time. -func (cc *ClientConn) parseTargetAndFindResolver() error { - channelz.Infof(logger, cc.channelzID, "original dial target is: %q", cc.target) +func (cc *ClientConn) initParsedTargetAndResolverBuilder() error { + logger.Infof("original dial target is: %q", cc.target) var rb resolver.Builder parsedTarget, err := parseTarget(cc.target) - if err != nil { - channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err) - } else { - channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) + if err == nil { rb = cc.getResolver(parsedTarget.URL.Scheme) if rb != nil { cc.parsedTarget = parsedTarget @@ -1861,17 +1700,19 @@ func (cc *ClientConn) parseTargetAndFindResolver() error { // We are here because the user's dial target did not contain a scheme or // specified an unregistered scheme. We should fallback to the default // scheme, except when a custom dialer is specified in which case, we should - // always use passthrough scheme. - defScheme := resolver.GetDefaultScheme() - channelz.Infof(logger, cc.channelzID, "fallback to scheme %q", defScheme) + // always use passthrough scheme. For either case, we need to respect any overridden + // global defaults set by the user. + defScheme := cc.dopts.defaultScheme + if internal.UserSetDefaultScheme { + defScheme = resolver.GetDefaultScheme() + } + canonicalTarget := defScheme + ":///" + cc.target parsedTarget, err = parseTarget(canonicalTarget) if err != nil { - channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", canonicalTarget, err) return err } - channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) rb = cc.getResolver(parsedTarget.URL.Scheme) if rb == nil { return fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme) @@ -1893,6 +1734,8 @@ func parseTarget(target string) (resolver.Target, error) { return resolver.Target{URL: *u}, nil } +// encodeAuthority escapes the authority string based on valid chars defined in +// https://datatracker.ietf.org/doc/html/rfc3986#section-3.2. func encodeAuthority(authority string) string { const upperhex = "0123456789ABCDEF" @@ -1909,7 +1752,7 @@ func encodeAuthority(authority string) string { return false case '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=': // Subdelim characters return false - case ':', '[', ']', '@': // Authority related delimeters + case ':', '[', ']', '@': // Authority related delimiters return false } // Everything else must be escaped. @@ -1959,7 +1802,7 @@ func encodeAuthority(authority string) string { // credentials do not match the authority configured through the dial option. // // Doesn't grab cc.mu as this method is expected to be called only at Dial time. -func (cc *ClientConn) determineAuthority() error { +func (cc *ClientConn) initAuthority() error { dopts := cc.dopts // Historically, we had two options for users to specify the serverName or // authority for a channel. One was through the transport credentials @@ -1981,58 +1824,16 @@ func (cc *ClientConn) determineAuthority() error { } endpoint := cc.parsedTarget.Endpoint() - target := cc.target - switch { - case authorityFromDialOption != "": + if authorityFromDialOption != "" { cc.authority = authorityFromDialOption - case authorityFromCreds != "": + } else if authorityFromCreds != "" { cc.authority = authorityFromCreds - case strings.HasPrefix(target, "unix:") || strings.HasPrefix(target, "unix-abstract:"): - // TODO: remove when the unix resolver implements optional interface to - // return channel authority. - cc.authority = "localhost" - case strings.HasPrefix(endpoint, ":"): + } else if auth, ok := cc.resolverBuilder.(resolver.AuthorityOverrider); ok { + cc.authority = auth.OverrideAuthority(cc.parsedTarget) + } else if strings.HasPrefix(endpoint, ":") { cc.authority = "localhost" + endpoint - default: - // TODO: Define an optional interface on the resolver builder to return - // the channel authority given the user's dial target. For resolvers - // which don't implement this interface, we will use the endpoint from - // "scheme://authority/endpoint" as the default authority. - // Escape the endpoint to handle use cases where the endpoint - // might not be a valid authority by default. - // For example an endpoint which has multiple paths like - // 'a/b/c', which is not a valid authority by default. + } else { cc.authority = encodeAuthority(endpoint) } - channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority) - return nil -} - -// initResolverWrapper creates a ccResolverWrapper, which builds the name -// resolver. This method grabs the lock to assign the newly built resolver -// wrapper to the cc.resolverWrapper field. -func (cc *ClientConn) initResolverWrapper(creds credentials.TransportCredentials) error { - rw, err := newCCResolverWrapper(cc, ccResolverWrapperOpts{ - target: cc.parsedTarget, - builder: cc.resolverBuilder, - bOpts: resolver.BuildOptions{ - DisableServiceConfig: cc.dopts.disableServiceConfig, - DialCreds: creds, - CredsBundle: cc.dopts.copts.CredsBundle, - Dialer: cc.dopts.copts.Dialer, - }, - channelzID: cc.channelzID, - }) - if err != nil { - return fmt.Errorf("failed to build resolver: %v", err) - } - // Resolver implementations may report state update or error inline when - // built (or right after), and this is handled in cc.updateResolverState. - // Also, an error from the resolver might lead to a re-resolution request - // from the balancer, which is handled in resolveNow() where - // `cc.resolverWrapper` is accessed. Hence, we need to hold the lock here. - cc.mu.Lock() - cc.resolverWrapper = rw - cc.mu.Unlock() return nil } diff --git a/vendor/google.golang.org/grpc/codegen.sh b/vendor/google.golang.org/grpc/codegen.sh deleted file mode 100644 index 4cdc6ba7c..000000000 --- a/vendor/google.golang.org/grpc/codegen.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# This script serves as an example to demonstrate how to generate the gRPC-Go -# interface and the related messages from .proto file. -# -# It assumes the installation of i) Google proto buffer compiler at -# https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen -# plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have -# not, please install them first. -# -# We recommend running this script at $GOPATH/src. -# -# If this is not what you need, feel free to make your own scripts. Again, this -# script is for demonstration purpose. -# -proto=$1 -protoc --go_out=plugins=grpc:. $proto diff --git a/vendor/google.golang.org/grpc/codes/codes.go b/vendor/google.golang.org/grpc/codes/codes.go index 11b106182..0b42c302b 100644 --- a/vendor/google.golang.org/grpc/codes/codes.go +++ b/vendor/google.golang.org/grpc/codes/codes.go @@ -25,7 +25,13 @@ import ( "strconv" ) -// A Code is an unsigned 32-bit error code as defined in the gRPC spec. +// A Code is a status code defined according to the [gRPC documentation]. +// +// Only the codes defined as consts in this package are valid codes. Do not use +// other code values. Behavior of other codes is implementation-specific and +// interoperability between implementations is not guaranteed. +// +// [gRPC documentation]: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md type Code uint32 const ( @@ -229,7 +235,7 @@ func (c *Code) UnmarshalJSON(b []byte) error { if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { if ci >= _maxCode { - return fmt.Errorf("invalid code: %q", ci) + return fmt.Errorf("invalid code: %d", ci) } *c = Code(ci) diff --git a/vendor/google.golang.org/grpc/credentials/alts/alts.go b/vendor/google.golang.org/grpc/credentials/alts/alts.go index 579adf210..afcdb8a0d 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/alts.go +++ b/vendor/google.golang.org/grpc/credentials/alts/alts.go @@ -43,7 +43,7 @@ import ( const ( // hypervisorHandshakerServiceAddress represents the default ALTS gRPC // handshaker service address in the hypervisor. - hypervisorHandshakerServiceAddress = "metadata.google.internal.:8080" + hypervisorHandshakerServiceAddress = "dns:///metadata.google.internal.:8080" // defaultTimeout specifies the server handshake timeout. defaultTimeout = 30.0 * time.Second // The following constants specify the minimum and maximum acceptable diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go b/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go index 0854e7af6..6c867dd85 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go @@ -25,6 +25,7 @@ import ( "fmt" "io" "net" + "time" "golang.org/x/sync/semaphore" grpc "google.golang.org/grpc" @@ -60,8 +61,6 @@ var ( // control number of concurrent created (but not closed) handshakes. clientHandshakes = semaphore.NewWeighted(int64(envconfig.ALTSMaxConcurrentHandshakes)) serverHandshakes = semaphore.NewWeighted(int64(envconfig.ALTSMaxConcurrentHandshakes)) - // errDropped occurs when maxPendingHandshakes is reached. - errDropped = errors.New("maximum number of concurrent ALTS handshakes is reached") // errOutOfBound occurs when the handshake service returns a consumed // bytes value larger than the buffer that was passed to it originally. errOutOfBound = errors.New("handshaker service consumed bytes value is out-of-bound") @@ -155,8 +154,8 @@ func NewServerHandshaker(ctx context.Context, conn *grpc.ClientConn, c net.Conn, // ClientHandshake starts and completes a client ALTS handshake for GCP. Once // done, ClientHandshake returns a secure connection. func (h *altsHandshaker) ClientHandshake(ctx context.Context) (net.Conn, credentials.AuthInfo, error) { - if !clientHandshakes.TryAcquire(1) { - return nil, nil, errDropped + if err := clientHandshakes.Acquire(ctx, 1); err != nil { + return nil, nil, err } defer clientHandshakes.Release(1) @@ -208,8 +207,8 @@ func (h *altsHandshaker) ClientHandshake(ctx context.Context) (net.Conn, credent // ServerHandshake starts and completes a server ALTS handshake for GCP. Once // done, ServerHandshake returns a secure connection. func (h *altsHandshaker) ServerHandshake(ctx context.Context) (net.Conn, credentials.AuthInfo, error) { - if !serverHandshakes.TryAcquire(1) { - return nil, nil, errDropped + if err := serverHandshakes.Acquire(ctx, 1); err != nil { + return nil, nil, err } defer serverHandshakes.Release(1) @@ -308,8 +307,10 @@ func (h *altsHandshaker) accessHandshakerService(req *altspb.HandshakerReq) (*al // the results. Handshaker service takes care of frame parsing, so we read // whatever received from the network and send it to the handshaker service. func (h *altsHandshaker) processUntilDone(resp *altspb.HandshakerResp, extra []byte) (*altspb.HandshakerResult, []byte, error) { + var lastWriteTime time.Time for { if len(resp.OutFrames) > 0 { + lastWriteTime = time.Now() if _, err := h.conn.Write(resp.OutFrames); err != nil { return nil, nil, err } @@ -333,11 +334,15 @@ func (h *altsHandshaker) processUntilDone(resp *altspb.HandshakerResp, extra []b // Append extra bytes from the previous interaction with the // handshaker service with the current buffer read from conn. p := append(extra, buf[:n]...) + // Compute the time elapsed since the last write to the peer. + timeElapsed := time.Since(lastWriteTime) + timeElapsedMs := uint32(timeElapsed.Milliseconds()) // From here on, p and extra point to the same slice. resp, err = h.accessHandshakerService(&altspb.HandshakerReq{ ReqOneof: &altspb.HandshakerReq_Next{ Next: &altspb.NextHandshakeMessageReq{ - InBytes: p, + InBytes: p, + NetworkLatencyMs: timeElapsedMs, }, }, }) diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/altscontext.pb.go b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/altscontext.pb.go index c7cf1810a..38cb5cf0d 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/altscontext.pb.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/altscontext.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.22.0 +// protoc-gen-go v1.34.1 +// protoc v4.25.2 // source: grpc/gcp/altscontext.proto package grpc_gcp diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go index 81d0f1140..55fc7f65f 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.22.0 +// protoc-gen-go v1.34.1 +// protoc v4.25.2 // source: grpc/gcp/handshaker.proto package grpc_gcp @@ -331,6 +331,11 @@ type StartClientHandshakeReq struct { RpcVersions *RpcProtocolVersions `protobuf:"bytes,9,opt,name=rpc_versions,json=rpcVersions,proto3" json:"rpc_versions,omitempty"` // (Optional) Maximum frame size supported by the client. MaxFrameSize uint32 `protobuf:"varint,10,opt,name=max_frame_size,json=maxFrameSize,proto3" json:"max_frame_size,omitempty"` + // (Optional) An access token created by the caller only intended for use in + // ALTS connections. The access token that should be used to authenticate to + // the peer. The access token MUST be strongly bound to the ALTS credentials + // used to establish the connection that the token is sent over. + AccessToken string `protobuf:"bytes,11,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` } func (x *StartClientHandshakeReq) Reset() { @@ -435,6 +440,13 @@ func (x *StartClientHandshakeReq) GetMaxFrameSize() uint32 { return 0 } +func (x *StartClientHandshakeReq) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + type ServerHandshakeParameters struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -446,6 +458,11 @@ type ServerHandshakeParameters struct { // (Optional) A list of local identities supported by the server, if // specified. Otherwise, the handshaker chooses a default local identity. LocalIdentities []*Identity `protobuf:"bytes,2,rep,name=local_identities,json=localIdentities,proto3" json:"local_identities,omitempty"` + // A token created by the caller only intended for use in + // ALTS connections. The token should be used to authenticate to + // the peer. The token MUST be strongly bound to the ALTS credentials + // used to establish the connection that the token is sent over. + Token *string `protobuf:"bytes,3,opt,name=token,proto3,oneof" json:"token,omitempty"` } func (x *ServerHandshakeParameters) Reset() { @@ -494,6 +511,13 @@ func (x *ServerHandshakeParameters) GetLocalIdentities() []*Identity { return nil } +func (x *ServerHandshakeParameters) GetToken() string { + if x != nil && x.Token != nil { + return *x.Token + } + return "" +} + type StartServerHandshakeReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -613,6 +637,10 @@ type NextHandshakeMessageReq struct { // that the peer's out_frames are split into multiple NextHandshakerMessageReq // messages. InBytes []byte `protobuf:"bytes,1,opt,name=in_bytes,json=inBytes,proto3" json:"in_bytes,omitempty"` + // Number of milliseconds between when the application send the last handshake + // message to the peer and when the application received the current handshake + // message (in the in_bytes field) from the peer. + NetworkLatencyMs uint32 `protobuf:"varint,2,opt,name=network_latency_ms,json=networkLatencyMs,proto3" json:"network_latency_ms,omitempty"` } func (x *NextHandshakeMessageReq) Reset() { @@ -654,6 +682,13 @@ func (x *NextHandshakeMessageReq) GetInBytes() []byte { return nil } +func (x *NextHandshakeMessageReq) GetNetworkLatencyMs() uint32 { + if x != nil { + return x.NetworkLatencyMs + } + return 0 +} + type HandshakerReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1036,7 +1071,7 @@ var file_grpc_gcp_handshaker_proto_rawDesc = []byte{ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x22, 0xd3, 0x04, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x22, 0xf6, 0x04, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x12, 0x5b, 0x0a, 0x1b, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, @@ -1073,132 +1108,139 @@ var file_grpc_gcp_handshaker_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, - 0x3d, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0f, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa5, - 0x04, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, - 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, - 0x6d, 0x0a, 0x14, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, - 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x68, 0x61, 0x6e, 0x64, 0x73, - 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x63, 0x70, 0x2e, 0x52, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x6b, 0x0a, 0x18, 0x48, 0x61, 0x6e, - 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, - 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x34, 0x0a, 0x17, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x61, - 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, - 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x46, - 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x73, - 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x48, - 0x00, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, - 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x61, 0x6e, 0x64, - 0x73, 0x68, 0x61, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x48, - 0x00, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x5f, 0x6f, - 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x9a, 0x03, 0x0a, 0x10, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, - 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x37, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x63, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x70, 0x65, 0x65, - 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x6e, - 0x12, 0x49, 0x0a, 0x11, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x52, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x70, 0x65, 0x65, 0x72, - 0x52, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, - 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, + 0x6d, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x19, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa5, 0x04, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x6d, 0x0a, 0x14, 0x68, 0x61, 0x6e, 0x64, 0x73, + 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, + 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, + 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x13, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x39, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0f, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, + 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x72, 0x70, 0x63, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x52, 0x70, 0x63, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, + 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, + 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x22, 0x40, 0x0a, 0x10, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x48, 0x61, 0x6e, 0x64, - 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2a, 0x4a, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x1e, 0x48, 0x41, 0x4e, - 0x44, 0x53, 0x48, 0x41, 0x4b, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x54, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x4c, 0x54, 0x53, 0x10, 0x02, - 0x2a, 0x45, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x1c, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, - 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x02, 0x32, 0x5b, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x73, - 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0b, - 0x44, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x12, 0x17, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, - 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x28, 0x01, 0x30, 0x01, 0x42, 0x6b, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x0f, 0x48, - 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, - 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x2f, 0x61, 0x6c, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x63, - 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x1a, 0x6b, 0x0a, 0x18, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x62, + 0x0a, 0x17, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x4d, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x12, 0x46, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, + 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x46, 0x0a, 0x0c, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, + 0x6b, 0x65, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x4e, 0x65, + 0x78, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x42, 0x0b, 0x0a, + 0x09, 0x72, 0x65, 0x71, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x9a, 0x03, 0x0a, 0x10, 0x48, + 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x31, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6b, + 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x52, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x39, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x63, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, + 0x65, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x49, 0x0a, 0x11, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x72, + 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x52, 0x70, 0x63, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x0f, 0x70, 0x65, 0x65, 0x72, 0x52, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x40, 0x0a, 0x10, 0x48, 0x61, 0x6e, 0x64, 0x73, + 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0e, 0x48, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, + 0x6f, 0x75, 0x74, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x6f, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x48, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, + 0x70, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x4a, 0x0a, 0x11, 0x48, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x22, 0x0a, 0x1e, 0x48, 0x41, 0x4e, 0x44, 0x53, 0x48, 0x41, 0x4b, 0x45, 0x5f, 0x50, 0x52, 0x4f, + 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x41, 0x4c, 0x54, 0x53, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x1c, 0x4e, 0x45, 0x54, + 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, + 0x43, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x02, 0x32, 0x5b, 0x0a, + 0x11, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x44, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, + 0x65, 0x12, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x48, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x63, 0x70, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x6b, 0x0a, 0x15, 0x69, 0x6f, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x42, 0x0f, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2f, 0x61, 0x6c, 0x74, 0x73, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x5f, 0x67, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1396,6 +1438,7 @@ func file_grpc_gcp_handshaker_proto_init() { (*Identity_ServiceAccount)(nil), (*Identity_Hostname)(nil), } + file_grpc_gcp_handshaker_proto_msgTypes[3].OneofWrappers = []interface{}{} file_grpc_gcp_handshaker_proto_msgTypes[6].OneofWrappers = []interface{}{ (*HandshakerReq_ClientStart)(nil), (*HandshakerReq_ServerStart)(nil), diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go index 39ecccf87..358074b64 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.22.0 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v4.25.2 // source: grpc/gcp/handshaker.proto package grpc_gcp @@ -32,8 +32,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( HandshakerService_DoHandshake_FullMethodName = "/grpc.gcp.HandshakerService/DoHandshake" @@ -49,7 +49,7 @@ type HandshakerServiceClient interface { // messages with next. Each time client sends a request, the handshaker // service expects to respond. Client does not have to wait for service's // response before sending next request. - DoHandshake(ctx context.Context, opts ...grpc.CallOption) (HandshakerService_DoHandshakeClient, error) + DoHandshake(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[HandshakerReq, HandshakerResp], error) } type handshakerServiceClient struct { @@ -60,36 +60,18 @@ func NewHandshakerServiceClient(cc grpc.ClientConnInterface) HandshakerServiceCl return &handshakerServiceClient{cc} } -func (c *handshakerServiceClient) DoHandshake(ctx context.Context, opts ...grpc.CallOption) (HandshakerService_DoHandshakeClient, error) { - stream, err := c.cc.NewStream(ctx, &HandshakerService_ServiceDesc.Streams[0], HandshakerService_DoHandshake_FullMethodName, opts...) +func (c *handshakerServiceClient) DoHandshake(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[HandshakerReq, HandshakerResp], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &HandshakerService_ServiceDesc.Streams[0], HandshakerService_DoHandshake_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &handshakerServiceDoHandshakeClient{stream} + x := &grpc.GenericClientStream[HandshakerReq, HandshakerResp]{ClientStream: stream} return x, nil } -type HandshakerService_DoHandshakeClient interface { - Send(*HandshakerReq) error - Recv() (*HandshakerResp, error) - grpc.ClientStream -} - -type handshakerServiceDoHandshakeClient struct { - grpc.ClientStream -} - -func (x *handshakerServiceDoHandshakeClient) Send(m *HandshakerReq) error { - return x.ClientStream.SendMsg(m) -} - -func (x *handshakerServiceDoHandshakeClient) Recv() (*HandshakerResp, error) { - m := new(HandshakerResp) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type HandshakerService_DoHandshakeClient = grpc.BidiStreamingClient[HandshakerReq, HandshakerResp] // HandshakerServiceServer is the server API for HandshakerService service. // All implementations must embed UnimplementedHandshakerServiceServer @@ -101,7 +83,7 @@ type HandshakerServiceServer interface { // messages with next. Each time client sends a request, the handshaker // service expects to respond. Client does not have to wait for service's // response before sending next request. - DoHandshake(HandshakerService_DoHandshakeServer) error + DoHandshake(grpc.BidiStreamingServer[HandshakerReq, HandshakerResp]) error mustEmbedUnimplementedHandshakerServiceServer() } @@ -109,7 +91,7 @@ type HandshakerServiceServer interface { type UnimplementedHandshakerServiceServer struct { } -func (UnimplementedHandshakerServiceServer) DoHandshake(HandshakerService_DoHandshakeServer) error { +func (UnimplementedHandshakerServiceServer) DoHandshake(grpc.BidiStreamingServer[HandshakerReq, HandshakerResp]) error { return status.Errorf(codes.Unimplemented, "method DoHandshake not implemented") } func (UnimplementedHandshakerServiceServer) mustEmbedUnimplementedHandshakerServiceServer() {} @@ -126,30 +108,11 @@ func RegisterHandshakerServiceServer(s grpc.ServiceRegistrar, srv HandshakerServ } func _HandshakerService_DoHandshake_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(HandshakerServiceServer).DoHandshake(&handshakerServiceDoHandshakeServer{stream}) + return srv.(HandshakerServiceServer).DoHandshake(&grpc.GenericServerStream[HandshakerReq, HandshakerResp]{ServerStream: stream}) } -type HandshakerService_DoHandshakeServer interface { - Send(*HandshakerResp) error - Recv() (*HandshakerReq, error) - grpc.ServerStream -} - -type handshakerServiceDoHandshakeServer struct { - grpc.ServerStream -} - -func (x *handshakerServiceDoHandshakeServer) Send(m *HandshakerResp) error { - return x.ServerStream.SendMsg(m) -} - -func (x *handshakerServiceDoHandshakeServer) Recv() (*HandshakerReq, error) { - m := new(HandshakerReq) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type HandshakerService_DoHandshakeServer = grpc.BidiStreamingServer[HandshakerReq, HandshakerResp] // HandshakerService_ServiceDesc is the grpc.ServiceDesc for HandshakerService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/transport_security_common.pb.go b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/transport_security_common.pb.go index 69f094758..18cc9cfbd 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/transport_security_common.pb.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/transport_security_common.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.22.0 +// protoc-gen-go v1.34.1 +// protoc v4.25.2 // source: grpc/gcp/transport_security_common.proto package grpc_gcp diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 5feac3aa0..665e790bb 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -28,9 +28,9 @@ import ( "fmt" "net" - "github.com/golang/protobuf/proto" "google.golang.org/grpc/attributes" icredentials "google.golang.org/grpc/internal/credentials" + "google.golang.org/protobuf/proto" ) // PerRPCCredentials defines the common interface for the credentials which need to @@ -237,7 +237,7 @@ func ClientHandshakeInfoFromContext(ctx context.Context) ClientHandshakeInfo { } // CheckSecurityLevel checks if a connection's security level is greater than or equal to the specified one. -// It returns success if 1) the condition is satisified or 2) AuthInfo struct does not implement GetCommonAuthInfo() method +// It returns success if 1) the condition is satisfied or 2) AuthInfo struct does not implement GetCommonAuthInfo() method // or 3) CommonAuthInfo.SecurityLevel has an invalid zero value. For 2) and 3), it is for the purpose of backward-compatibility. // // This API is experimental. diff --git a/vendor/google.golang.org/grpc/credentials/google/xds.go b/vendor/google.golang.org/grpc/credentials/google/xds.go index 2c5c8b9ee..cccb22271 100644 --- a/vendor/google.golang.org/grpc/credentials/google/xds.go +++ b/vendor/google.golang.org/grpc/credentials/google/xds.go @@ -25,7 +25,7 @@ import ( "strings" "google.golang.org/grpc/credentials" - "google.golang.org/grpc/internal" + "google.golang.org/grpc/internal/xds" ) const cfeClusterNamePrefix = "google_cfe_" @@ -63,7 +63,7 @@ func clusterName(ctx context.Context) string { if chi.Attributes == nil { return "" } - cluster, _ := internal.GetXDSHandshakeClusterName(chi.Attributes) + cluster, _ := xds.GetXDSHandshakeClusterName(chi.Attributes) return cluster } diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index 877b7cd21..411435854 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -27,9 +27,13 @@ import ( "net/url" "os" + "google.golang.org/grpc/grpclog" credinternal "google.golang.org/grpc/internal/credentials" + "google.golang.org/grpc/internal/envconfig" ) +var logger = grpclog.Component("credentials") + // TLSInfo contains the auth information for a TLS authenticated connection. // It implements the AuthInfo interface. type TLSInfo struct { @@ -44,10 +48,25 @@ func (t TLSInfo) AuthType() string { return "tls" } +// cipherSuiteLookup returns the string version of a TLS cipher suite ID. +func cipherSuiteLookup(cipherSuiteID uint16) string { + for _, s := range tls.CipherSuites() { + if s.ID == cipherSuiteID { + return s.Name + } + } + for _, s := range tls.InsecureCipherSuites() { + if s.ID == cipherSuiteID { + return s.Name + } + } + return fmt.Sprintf("unknown ID: %v", cipherSuiteID) +} + // GetSecurityValue returns security info requested by channelz. func (t TLSInfo) GetSecurityValue() ChannelzSecurityValue { v := &TLSChannelzSecurityValue{ - StandardName: cipherSuiteLookup[t.State.CipherSuite], + StandardName: cipherSuiteLookup(t.State.CipherSuite), } // Currently there's no way to get LocalCertificate info from tls package. if len(t.State.PeerCertificates) > 0 { @@ -97,6 +116,22 @@ func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawCon conn.Close() return nil, nil, ctx.Err() } + + // The negotiated protocol can be either of the following: + // 1. h2: When the server supports ALPN. Only HTTP/2 can be negotiated since + // it is the only protocol advertised by the client during the handshake. + // The tls library ensures that the server chooses a protocol advertised + // by the client. + // 2. "" (empty string): If the server doesn't support ALPN. ALPN is a requirement + // for using HTTP/2 over TLS. We can terminate the connection immediately. + np := conn.ConnectionState().NegotiatedProtocol + if np == "" { + if envconfig.EnforceALPNEnabled { + conn.Close() + return nil, nil, fmt.Errorf("credentials: cannot check peer: missing selected ALPN property") + } + logger.Warningf("Allowing TLS connection to server %q with ALPN disabled. TLS connections to servers with ALPN disabled will be disallowed in future grpc-go releases", cfg.ServerName) + } tlsInfo := TLSInfo{ State: conn.ConnectionState(), CommonAuthInfo: CommonAuthInfo{ @@ -116,8 +151,20 @@ func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) conn.Close() return nil, nil, err } + cs := conn.ConnectionState() + // The negotiated application protocol can be empty only if the client doesn't + // support ALPN. In such cases, we can close the connection since ALPN is required + // for using HTTP/2 over TLS. + if cs.NegotiatedProtocol == "" { + if envconfig.EnforceALPNEnabled { + conn.Close() + return nil, nil, fmt.Errorf("credentials: cannot check peer: missing selected ALPN property") + } else if logger.V(2) { + logger.Info("Allowing TLS connection from client with ALPN disabled. TLS connections with ALPN disabled will be disallowed in future grpc-go releases") + } + } tlsInfo := TLSInfo{ - State: conn.ConnectionState(), + State: cs, CommonAuthInfo: CommonAuthInfo{ SecurityLevel: PrivacyAndIntegrity, }, @@ -138,10 +185,39 @@ func (c *tlsCreds) OverrideServerName(serverNameOverride string) error { return nil } +// The following cipher suites are forbidden for use with HTTP/2 by +// https://datatracker.ietf.org/doc/html/rfc7540#appendix-A +var tls12ForbiddenCipherSuites = map[uint16]struct{}{ + tls.TLS_RSA_WITH_AES_128_CBC_SHA: {}, + tls.TLS_RSA_WITH_AES_256_CBC_SHA: {}, + tls.TLS_RSA_WITH_AES_128_GCM_SHA256: {}, + tls.TLS_RSA_WITH_AES_256_GCM_SHA384: {}, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: {}, + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: {}, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: {}, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: {}, +} + // NewTLS uses c to construct a TransportCredentials based on TLS. func NewTLS(c *tls.Config) TransportCredentials { tc := &tlsCreds{credinternal.CloneTLSConfig(c)} tc.config.NextProtos = credinternal.AppendH2ToNextProtos(tc.config.NextProtos) + // If the user did not configure a MinVersion and did not configure a + // MaxVersion < 1.2, use MinVersion=1.2, which is required by + // https://datatracker.ietf.org/doc/html/rfc7540#section-9.2 + if tc.config.MinVersion == 0 && (tc.config.MaxVersion == 0 || tc.config.MaxVersion >= tls.VersionTLS12) { + tc.config.MinVersion = tls.VersionTLS12 + } + // If the user did not configure CipherSuites, use all "secure" cipher + // suites reported by the TLS package, but remove some explicitly forbidden + // by https://datatracker.ietf.org/doc/html/rfc7540#appendix-A + if tc.config.CipherSuites == nil { + for _, cs := range tls.CipherSuites() { + if _, ok := tls12ForbiddenCipherSuites[cs.ID]; !ok { + tc.config.CipherSuites = append(tc.config.CipherSuites, cs.ID) + } + } + } return tc } @@ -205,32 +281,3 @@ type TLSChannelzSecurityValue struct { LocalCertificate []byte RemoteCertificate []byte } - -var cipherSuiteLookup = map[uint16]string{ - tls.TLS_RSA_WITH_RC4_128_SHA: "TLS_RSA_WITH_RC4_128_SHA", - tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - tls.TLS_RSA_WITH_AES_128_CBC_SHA: "TLS_RSA_WITH_AES_128_CBC_SHA", - tls.TLS_RSA_WITH_AES_256_CBC_SHA: "TLS_RSA_WITH_AES_256_CBC_SHA", - tls.TLS_RSA_WITH_AES_128_GCM_SHA256: "TLS_RSA_WITH_AES_128_GCM_SHA256", - tls.TLS_RSA_WITH_AES_256_GCM_SHA384: "TLS_RSA_WITH_AES_256_GCM_SHA384", - tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", - tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA: "TLS_ECDHE_RSA_WITH_RC4_128_SHA", - tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - tls.TLS_FALLBACK_SCSV: "TLS_FALLBACK_SCSV", - tls.TLS_RSA_WITH_AES_128_CBC_SHA256: "TLS_RSA_WITH_AES_128_CBC_SHA256", - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", - tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", - tls.TLS_AES_128_GCM_SHA256: "TLS_AES_128_GCM_SHA256", - tls.TLS_AES_256_GCM_SHA384: "TLS_AES_256_GCM_SHA384", - tls.TLS_CHACHA20_POLY1305_SHA256: "TLS_CHACHA20_POLY1305_SHA256", -} diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index cfc9fd85e..f5453d48a 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -21,6 +21,7 @@ package grpc import ( "context" "net" + "net/url" "time" "google.golang.org/grpc/backoff" @@ -36,6 +37,11 @@ import ( "google.golang.org/grpc/stats" ) +const ( + // https://github.com/grpc/proposal/blob/master/A6-client-retries.md#limits-on-retries-and-hedges + defaultMaxCallAttempts = 5 +) + func init() { internal.AddGlobalDialOptions = func(opt ...DialOption) { globalDialOptions = append(globalDialOptions, opt...) @@ -43,9 +49,18 @@ func init() { internal.ClearGlobalDialOptions = func() { globalDialOptions = nil } + internal.AddGlobalPerTargetDialOptions = func(opt any) { + if ptdo, ok := opt.(perTargetDialOption); ok { + globalPerTargetDialOptions = append(globalPerTargetDialOptions, ptdo) + } + } + internal.ClearGlobalPerTargetDialOptions = func() { + globalPerTargetDialOptions = nil + } internal.WithBinaryLogger = withBinaryLogger internal.JoinDialOptions = newJoinDialOption internal.DisableGlobalDialOptions = newDisableGlobalDialOptions + internal.WithRecvBufferPool = withRecvBufferPool } // dialOptions configure a Dial call. dialOptions are set by the DialOption @@ -63,12 +78,11 @@ type dialOptions struct { block bool returnLastError bool timeout time.Duration - scChan <-chan ServiceConfig authority string binaryLogger binarylog.Logger copts transport.ConnectOptions callOptions []CallOption - channelzParentID *channelz.Identifier + channelzParent channelz.Identifier disableServiceConfig bool disableRetry bool disableHealthCheck bool @@ -79,6 +93,8 @@ type dialOptions struct { resolvers []resolver.Builder idleTimeout time.Duration recvBufferPool SharedBufferPool + defaultScheme string + maxCallAttempts int } // DialOption configures how we set up the connection. @@ -88,6 +104,19 @@ type DialOption interface { var globalDialOptions []DialOption +// perTargetDialOption takes a parsed target and returns a dial option to apply. +// +// This gets called after NewClient() parses the target, and allows per target +// configuration set through a returned DialOption. The DialOption will not take +// effect if specifies a resolver builder, as that Dial Option is factored in +// while parsing target. +type perTargetDialOption interface { + // DialOption returns a Dial Option to apply. + DialOptionForTarget(parsedTarget url.URL) DialOption +} + +var globalPerTargetDialOptions []perTargetDialOption + // EmptyDialOption does not alter the dial configuration. It can be embedded in // another structure to build custom dial options. // @@ -154,9 +183,7 @@ func WithSharedWriteBuffer(val bool) DialOption { } // WithWriteBufferSize determines how much data can be batched before doing a -// write on the wire. The corresponding memory allocation for this buffer will -// be twice the size to keep syscalls low. The default value for this buffer is -// 32KB. +// write on the wire. The default value for this buffer is 32KB. // // Zero or negative values will disable the write buffer such that each write // will be on underlying connection. Note: A Send call may not directly @@ -250,19 +277,6 @@ func WithDecompressor(dc Decompressor) DialOption { }) } -// WithServiceConfig returns a DialOption which has a channel to read the -// service configuration. -// -// Deprecated: service config should be received through name resolver or via -// WithDefaultServiceConfig, as specified at -// https://github.com/grpc/grpc/blob/master/doc/service_config.md. Will be -// removed in a future 1.x release. -func WithServiceConfig(c <-chan ServiceConfig) DialOption { - return newFuncDialOption(func(o *dialOptions) { - o.scChan = c - }) -} - // WithConnectParams configures the ClientConn to use the provided ConnectParams // for creating and maintaining connections to servers. // @@ -314,6 +328,9 @@ func withBackoff(bs internalbackoff.Strategy) DialOption { // // Use of this feature is not recommended. For more information, please see: // https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md +// +// Deprecated: this DialOption is not supported by NewClient. +// Will be supported throughout 1.x. func WithBlock() DialOption { return newFuncDialOption(func(o *dialOptions) { o.block = true @@ -328,10 +345,8 @@ func WithBlock() DialOption { // Use of this feature is not recommended. For more information, please see: // https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md // -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. +// Deprecated: this DialOption is not supported by NewClient. +// Will be supported throughout 1.x. func WithReturnConnectionError() DialOption { return newFuncDialOption(func(o *dialOptions) { o.block = true @@ -401,8 +416,8 @@ func WithCredentialsBundle(b credentials.Bundle) DialOption { // WithTimeout returns a DialOption that configures a timeout for dialing a // ClientConn initially. This is valid if and only if WithBlock() is present. // -// Deprecated: use DialContext instead of Dial and context.WithTimeout -// instead. Will be supported throughout 1.x. +// Deprecated: this DialOption is not supported by NewClient. +// Will be supported throughout 1.x. func WithTimeout(d time.Duration) DialOption { return newFuncDialOption(func(o *dialOptions) { o.timeout = d @@ -413,6 +428,17 @@ func WithTimeout(d time.Duration) DialOption { // connections. If FailOnNonTempDialError() is set to true, and an error is // returned by f, gRPC checks the error's Temporary() method to decide if it // should try to reconnect to the network address. +// +// Note: All supported releases of Go (as of December 2023) override the OS +// defaults for TCP keepalive time and interval to 15s. To enable TCP keepalive +// with OS defaults for keepalive time and interval, use a net.Dialer that sets +// the KeepAlive field to a negative value, and sets the SO_KEEPALIVE socket +// option to true from the Control field. For a concrete example of how to do +// this, see internal.NetDialerWithTCPKeepalive(). +// +// For more information, please see [issue 23459] in the Go github repo. +// +// [issue 23459]: https://github.com/golang/go/issues/23459 func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption { return newFuncDialOption(func(o *dialOptions) { o.copts.Dialer = f @@ -473,9 +499,8 @@ func withBinaryLogger(bl binarylog.Logger) DialOption { // Use of this feature is not recommended. For more information, please see: // https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md // -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// Deprecated: this DialOption is not supported by NewClient. +// This API may be changed or removed in a // later release. func FailOnNonTempDialError(f bool) DialOption { return newFuncDialOption(func(o *dialOptions) { @@ -487,7 +512,7 @@ func FailOnNonTempDialError(f bool) DialOption { // the RPCs. func WithUserAgent(s string) DialOption { return newFuncDialOption(func(o *dialOptions) { - o.copts.UserAgent = s + o.copts.UserAgent = s + " " + grpcUA }) } @@ -557,9 +582,9 @@ func WithAuthority(a string) DialOption { // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. -func WithChannelzParentID(id *channelz.Identifier) DialOption { +func WithChannelzParentID(c channelz.Identifier) DialOption { return newFuncDialOption(func(o *dialOptions) { - o.channelzParentID = id + o.channelzParent = c }) } @@ -604,12 +629,22 @@ func WithDisableRetry() DialOption { }) } +// MaxHeaderListSizeDialOption is a DialOption that specifies the maximum +// (uncompressed) size of header list that the client is prepared to accept. +type MaxHeaderListSizeDialOption struct { + MaxHeaderListSize uint32 +} + +func (o MaxHeaderListSizeDialOption) apply(do *dialOptions) { + do.copts.MaxHeaderListSize = &o.MaxHeaderListSize +} + // WithMaxHeaderListSize returns a DialOption that specifies the maximum // (uncompressed) size of header list that the client is prepared to accept. func WithMaxHeaderListSize(s uint32) DialOption { - return newFuncDialOption(func(o *dialOptions) { - o.copts.MaxHeaderListSize = &s - }) + return MaxHeaderListSizeDialOption{ + MaxHeaderListSize: s, + } } // WithDisableHealthCheck disables the LB channel health checking for all @@ -637,18 +672,22 @@ func withHealthCheckFunc(f internal.HealthChecker) DialOption { func defaultDialOptions() dialOptions { return dialOptions{ - healthCheckFunc: internal.HealthCheckFunc, copts: transport.ConnectOptions{ - WriteBufferSize: defaultWriteBufSize, ReadBufferSize: defaultReadBufSize, + WriteBufferSize: defaultWriteBufSize, UseProxy: true, + UserAgent: grpcUA, }, - recvBufferPool: nopBufferPool{}, - idleTimeout: 30 * time.Minute, + bs: internalbackoff.DefaultExponential, + healthCheckFunc: internal.HealthCheckFunc, + idleTimeout: 30 * time.Minute, + recvBufferPool: nopBufferPool{}, + defaultScheme: "dns", + maxCallAttempts: defaultMaxCallAttempts, } } -// withGetMinConnectDeadline specifies the function that clientconn uses to +// withMinConnectDeadline specifies the function that clientconn uses to // get minConnectDeadline. This can be used to make connection attempts happen // faster/slower. // @@ -659,6 +698,14 @@ func withMinConnectDeadline(f func() time.Duration) DialOption { }) } +// withDefaultScheme is used to allow Dial to use "passthrough" as the default +// name resolver, while NewClient uses "dns" otherwise. +func withDefaultScheme(s string) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.defaultScheme = s + }) +} + // WithResolvers allows a list of resolver implementations to be registered // locally with the ClientConn without needing to be globally registered via // resolver.Register. They will be matched against the scheme used for the @@ -694,6 +741,23 @@ func WithIdleTimeout(d time.Duration) DialOption { }) } +// WithMaxCallAttempts returns a DialOption that configures the maximum number +// of attempts per call (including retries and hedging) using the channel. +// Service owners may specify a higher value for these parameters, but higher +// values will be treated as equal to the maximum value by the client +// implementation. This mitigates security concerns related to the service +// config being transferred to the client via DNS. +// +// A value of 5 will be used if this dial option is not set or n < 2. +func WithMaxCallAttempts(n int) DialOption { + return newFuncDialOption(func(o *dialOptions) { + if n < 2 { + n = defaultMaxCallAttempts + } + o.maxCallAttempts = n + }) +} + // WithRecvBufferPool returns a DialOption that configures the ClientConn // to use the provided shared buffer pool for parsing incoming messages. Depending // on the application's workload, this could result in reduced memory allocation. @@ -705,11 +769,13 @@ func WithIdleTimeout(d time.Duration) DialOption { // options are used: WithStatsHandler, EnableTracing, or binary logging. In such // cases, the shared buffer pool will be ignored. // -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. +// Deprecated: use experimental.WithRecvBufferPool instead. Will be deleted in +// v1.60.0 or later. func WithRecvBufferPool(bufferPool SharedBufferPool) DialOption { + return withRecvBufferPool(bufferPool) +} + +func withRecvBufferPool(bufferPool SharedBufferPool) DialOption { return newFuncDialOption(func(o *dialOptions) { o.recvBufferPool = bufferPool }) diff --git a/vendor/google.golang.org/grpc/encoding/proto/proto.go b/vendor/google.golang.org/grpc/encoding/proto/proto.go index 0ee3d3bae..66d5cdf03 100644 --- a/vendor/google.golang.org/grpc/encoding/proto/proto.go +++ b/vendor/google.golang.org/grpc/encoding/proto/proto.go @@ -23,8 +23,9 @@ package proto import ( "fmt" - "github.com/golang/protobuf/proto" "google.golang.org/grpc/encoding" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/protoadapt" ) // Name is the name registered for the proto compressor. @@ -38,21 +39,34 @@ func init() { type codec struct{} func (codec) Marshal(v any) ([]byte, error) { - vv, ok := v.(proto.Message) - if !ok { + vv := messageV2Of(v) + if vv == nil { return nil, fmt.Errorf("failed to marshal, message is %T, want proto.Message", v) } + return proto.Marshal(vv) } func (codec) Unmarshal(data []byte, v any) error { - vv, ok := v.(proto.Message) - if !ok { + vv := messageV2Of(v) + if vv == nil { return fmt.Errorf("failed to unmarshal, message is %T, want proto.Message", v) } + return proto.Unmarshal(data, vv) } +func messageV2Of(v any) proto.Message { + switch v := v.(type) { + case protoadapt.MessageV1: + return protoadapt.MessageV2Of(v) + case protoadapt.MessageV2: + return v + } + + return nil +} + func (codec) Name() string { return Name } diff --git a/vendor/google.golang.org/grpc/internal/backoff/backoff.go b/vendor/google.golang.org/grpc/internal/backoff/backoff.go index fed1c011a..b15cf482d 100644 --- a/vendor/google.golang.org/grpc/internal/backoff/backoff.go +++ b/vendor/google.golang.org/grpc/internal/backoff/backoff.go @@ -25,10 +25,10 @@ package backoff import ( "context" "errors" + "math/rand" "time" grpcbackoff "google.golang.org/grpc/backoff" - "google.golang.org/grpc/internal/grpcrand" ) // Strategy defines the methodology for backing off after a grpc connection @@ -67,7 +67,7 @@ func (bc Exponential) Backoff(retries int) time.Duration { } // Randomize backoff delays so that if a cluster of requests start at // the same time, they won't operate in lockstep. - backoff *= 1 + bc.Config.Jitter*(grpcrand.Float64()*2-1) + backoff *= 1 + bc.Config.Jitter*(rand.Float64()*2-1) if backoff < 0 { return 0 } diff --git a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go new file mode 100644 index 000000000..13821a926 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go @@ -0,0 +1,82 @@ +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package gracefulswitch + +import ( + "encoding/json" + "fmt" + + "google.golang.org/grpc/balancer" + "google.golang.org/grpc/serviceconfig" +) + +type lbConfig struct { + serviceconfig.LoadBalancingConfig + + childBuilder balancer.Builder + childConfig serviceconfig.LoadBalancingConfig +} + +func ChildName(l serviceconfig.LoadBalancingConfig) string { + return l.(*lbConfig).childBuilder.Name() +} + +// ParseConfig parses a child config list and returns a LB config for the +// gracefulswitch Balancer. +// +// cfg is expected to be a json.RawMessage containing a JSON array of LB policy +// names + configs as the format of the "loadBalancingConfig" field in +// ServiceConfig. It returns a type that should be passed to +// UpdateClientConnState in the BalancerConfig field. +func ParseConfig(cfg json.RawMessage) (serviceconfig.LoadBalancingConfig, error) { + var lbCfg []map[string]json.RawMessage + if err := json.Unmarshal(cfg, &lbCfg); err != nil { + return nil, err + } + for i, e := range lbCfg { + if len(e) != 1 { + return nil, fmt.Errorf("expected a JSON struct with one entry; received entry %v at index %d", e, i) + } + + var name string + var jsonCfg json.RawMessage + for name, jsonCfg = range e { + } + + builder := balancer.Get(name) + if builder == nil { + // Skip unregistered balancer names. + continue + } + + parser, ok := builder.(balancer.ConfigParser) + if !ok { + // This is a valid child with no config. + return &lbConfig{childBuilder: builder}, nil + } + + cfg, err := parser.ParseConfig(jsonCfg) + if err != nil { + return nil, fmt.Errorf("error parsing config for policy %q: %v", name, err) + } + return &lbConfig{childBuilder: builder, childConfig: cfg}, nil + } + + return nil, fmt.Errorf("no supported policies found in config: %v", string(cfg)) +} diff --git a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go index 3c594e6e4..73bb4c4ee 100644 --- a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go +++ b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go @@ -94,14 +94,23 @@ func (gsb *Balancer) balancerCurrentOrPending(bw *balancerWrapper) bool { // process is not complete when this method returns. This method must be called // synchronously alongside the rest of the balancer.Balancer methods this // Graceful Switch Balancer implements. +// +// Deprecated: use ParseConfig and pass a parsed config to UpdateClientConnState +// to cause the Balancer to automatically change to the new child when necessary. func (gsb *Balancer) SwitchTo(builder balancer.Builder) error { + _, err := gsb.switchTo(builder) + return err +} + +func (gsb *Balancer) switchTo(builder balancer.Builder) (*balancerWrapper, error) { gsb.mu.Lock() if gsb.closed { gsb.mu.Unlock() - return errBalancerClosed + return nil, errBalancerClosed } bw := &balancerWrapper{ - gsb: gsb, + builder: builder, + gsb: gsb, lastState: balancer.State{ ConnectivityState: connectivity.Connecting, Picker: base.NewErrPicker(balancer.ErrNoSubConnAvailable), @@ -129,7 +138,7 @@ func (gsb *Balancer) SwitchTo(builder balancer.Builder) error { gsb.balancerCurrent = nil } gsb.mu.Unlock() - return balancer.ErrBadResolverState + return nil, balancer.ErrBadResolverState } // This write doesn't need to take gsb.mu because this field never gets read @@ -138,7 +147,7 @@ func (gsb *Balancer) SwitchTo(builder balancer.Builder) error { // bw.Balancer field will never be forwarded to until this SwitchTo() // function returns. bw.Balancer = newBalancer - return nil + return bw, nil } // Returns nil if the graceful switch balancer is closed. @@ -152,12 +161,32 @@ func (gsb *Balancer) latestBalancer() *balancerWrapper { } // UpdateClientConnState forwards the update to the latest balancer created. +// +// If the state's BalancerConfig is the config returned by a call to +// gracefulswitch.ParseConfig, then this function will automatically SwitchTo +// the balancer indicated by the config before forwarding its config to it, if +// necessary. func (gsb *Balancer) UpdateClientConnState(state balancer.ClientConnState) error { // The resolver data is only relevant to the most recent LB Policy. balToUpdate := gsb.latestBalancer() + gsbCfg, ok := state.BalancerConfig.(*lbConfig) + if ok { + // Switch to the child in the config unless it is already active. + if balToUpdate == nil || gsbCfg.childBuilder.Name() != balToUpdate.builder.Name() { + var err error + balToUpdate, err = gsb.switchTo(gsbCfg.childBuilder) + if err != nil { + return fmt.Errorf("could not switch to new child balancer: %w", err) + } + } + // Unwrap the child balancer's config. + state.BalancerConfig = gsbCfg.childConfig + } + if balToUpdate == nil { return errBalancerClosed } + // Perform this call without gsb.mu to prevent deadlocks if the child calls // back into the channel. The latest balancer can never be closed during a // call from the channel, even without gsb.mu held. @@ -169,6 +198,10 @@ func (gsb *Balancer) ResolverError(err error) { // The resolver data is only relevant to the most recent LB Policy. balToUpdate := gsb.latestBalancer() if balToUpdate == nil { + gsb.cc.UpdateState(balancer.State{ + ConnectivityState: connectivity.TransientFailure, + Picker: base.NewErrPicker(err), + }) return } // Perform this call without gsb.mu to prevent deadlocks if the child calls @@ -261,7 +294,8 @@ func (gsb *Balancer) Close() { // graceful switch logic. type balancerWrapper struct { balancer.Balancer - gsb *Balancer + gsb *Balancer + builder balancer.Builder lastState balancer.State subconns map[balancer.SubConn]bool // subconns created by this balancer diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index 0f31274a3..aa4505a87 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -25,11 +25,12 @@ import ( "sync/atomic" "time" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" ) type callIDGenerator struct { @@ -64,7 +65,7 @@ type TruncatingMethodLogger struct { callID uint64 idWithinCallGen *callIDGenerator - sink Sink // TODO(blog): make this plugable. + sink Sink // TODO(blog): make this pluggable. } // NewTruncatingMethodLogger returns a new truncating method logger. @@ -79,7 +80,7 @@ func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger { callID: idGen.next(), idWithinCallGen: &callIDGenerator{}, - sink: DefaultSink, // TODO(blog): make it plugable. + sink: DefaultSink, // TODO(blog): make it pluggable. } } @@ -88,7 +89,7 @@ func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger { // in TruncatingMethodLogger as possible. func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry { m := c.toProto() - timestamp, _ := ptypes.TimestampProto(time.Now()) + timestamp := timestamppb.Now() m.Timestamp = timestamp m.CallId = ml.callID m.SequenceIdWithinCall = ml.idWithinCallGen.next() @@ -178,7 +179,7 @@ func (c *ClientHeader) toProto() *binlogpb.GrpcLogEntry { Authority: c.Authority, } if c.Timeout > 0 { - clientHeader.Timeout = ptypes.DurationProto(c.Timeout) + clientHeader.Timeout = durationpb.New(c.Timeout) } ret := &binlogpb.GrpcLogEntry{ Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, @@ -396,7 +397,7 @@ func metadataKeyOmit(key string) bool { switch key { case "lb-token", ":path", ":authority", "content-encoding", "content-type", "user-agent", "te": return true - case "grpc-trace-bin": // grpc-trace-bin is special because it's visiable to users. + case "grpc-trace-bin": // grpc-trace-bin is special because it's visible to users. return false } return strings.HasPrefix(key, "grpc-") diff --git a/vendor/google.golang.org/grpc/internal/binarylog/sink.go b/vendor/google.golang.org/grpc/internal/binarylog/sink.go index 264de387c..9ea598b14 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/sink.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/sink.go @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/golang/protobuf/proto" binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + "google.golang.org/protobuf/proto" ) var ( diff --git a/vendor/google.golang.org/grpc/internal/buffer/unbounded.go b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go index 4399c3df4..11f91668a 100644 --- a/vendor/google.golang.org/grpc/internal/buffer/unbounded.go +++ b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go @@ -18,7 +18,10 @@ // Package buffer provides an implementation of an unbounded buffer. package buffer -import "sync" +import ( + "errors" + "sync" +) // Unbounded is an implementation of an unbounded buffer which does not use // extra goroutines. This is typically used for passing updates from one entity @@ -36,6 +39,7 @@ import "sync" type Unbounded struct { c chan any closed bool + closing bool mu sync.Mutex backlog []any } @@ -45,32 +49,32 @@ func NewUnbounded() *Unbounded { return &Unbounded{c: make(chan any, 1)} } +var errBufferClosed = errors.New("Put called on closed buffer.Unbounded") + // Put adds t to the unbounded buffer. -func (b *Unbounded) Put(t any) { +func (b *Unbounded) Put(t any) error { b.mu.Lock() defer b.mu.Unlock() - if b.closed { - return + if b.closing { + return errBufferClosed } if len(b.backlog) == 0 { select { case b.c <- t: - return + return nil default: } } b.backlog = append(b.backlog, t) + return nil } -// Load sends the earliest buffered data, if any, onto the read channel -// returned by Get(). Users are expected to call this every time they read a +// Load sends the earliest buffered data, if any, onto the read channel returned +// by Get(). Users are expected to call this every time they successfully read a // value from the read channel. func (b *Unbounded) Load() { b.mu.Lock() defer b.mu.Unlock() - if b.closed { - return - } if len(b.backlog) > 0 { select { case b.c <- b.backlog[0]: @@ -78,6 +82,8 @@ func (b *Unbounded) Load() { b.backlog = b.backlog[1:] default: } + } else if b.closing && !b.closed { + close(b.c) } } @@ -88,18 +94,23 @@ func (b *Unbounded) Load() { // send the next buffered value onto the channel if there is any. // // If the unbounded buffer is closed, the read channel returned by this method -// is closed. +// is closed after all data is drained. func (b *Unbounded) Get() <-chan any { return b.c } -// Close closes the unbounded buffer. +// Close closes the unbounded buffer. No subsequent data may be Put(), and the +// channel returned from Get() will be closed after all the data is read and +// Load() is called for the final time. func (b *Unbounded) Close() { b.mu.Lock() defer b.mu.Unlock() - if b.closed { + if b.closing { return } - b.closed = true - close(b.c) + b.closing = true + if len(b.backlog) == 0 { + b.closed = true + close(b.c) + } } diff --git a/vendor/google.golang.org/grpc/internal/channelz/channel.go b/vendor/google.golang.org/grpc/internal/channelz/channel.go new file mode 100644 index 000000000..d7e9e1d54 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/channelz/channel.go @@ -0,0 +1,255 @@ +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package channelz + +import ( + "fmt" + "sync/atomic" + + "google.golang.org/grpc/connectivity" +) + +// Channel represents a channel within channelz, which includes metrics and +// internal channelz data, such as channelz id, child list, etc. +type Channel struct { + Entity + // ID is the channelz id of this channel. + ID int64 + // RefName is the human readable reference string of this channel. + RefName string + + closeCalled bool + nestedChans map[int64]string + subChans map[int64]string + Parent *Channel + trace *ChannelTrace + // traceRefCount is the number of trace events that reference this channel. + // Non-zero traceRefCount means the trace of this channel cannot be deleted. + traceRefCount int32 + + ChannelMetrics ChannelMetrics +} + +// Implemented to make Channel implement the Identifier interface used for +// nesting. +func (c *Channel) channelzIdentifier() {} + +func (c *Channel) String() string { + if c.Parent == nil { + return fmt.Sprintf("Channel #%d", c.ID) + } + return fmt.Sprintf("%s Channel #%d", c.Parent, c.ID) +} + +func (c *Channel) id() int64 { + return c.ID +} + +func (c *Channel) SubChans() map[int64]string { + db.mu.RLock() + defer db.mu.RUnlock() + return copyMap(c.subChans) +} + +func (c *Channel) NestedChans() map[int64]string { + db.mu.RLock() + defer db.mu.RUnlock() + return copyMap(c.nestedChans) +} + +func (c *Channel) Trace() *ChannelTrace { + db.mu.RLock() + defer db.mu.RUnlock() + return c.trace.copy() +} + +type ChannelMetrics struct { + // The current connectivity state of the channel. + State atomic.Pointer[connectivity.State] + // The target this channel originally tried to connect to. May be absent + Target atomic.Pointer[string] + // The number of calls started on the channel. + CallsStarted atomic.Int64 + // The number of calls that have completed with an OK status. + CallsSucceeded atomic.Int64 + // The number of calls that have a completed with a non-OK status. + CallsFailed atomic.Int64 + // The last time a call was started on the channel. + LastCallStartedTimestamp atomic.Int64 +} + +// CopyFrom copies the metrics in o to c. For testing only. +func (c *ChannelMetrics) CopyFrom(o *ChannelMetrics) { + c.State.Store(o.State.Load()) + c.Target.Store(o.Target.Load()) + c.CallsStarted.Store(o.CallsStarted.Load()) + c.CallsSucceeded.Store(o.CallsSucceeded.Load()) + c.CallsFailed.Store(o.CallsFailed.Load()) + c.LastCallStartedTimestamp.Store(o.LastCallStartedTimestamp.Load()) +} + +// Equal returns true iff the metrics of c are the same as the metrics of o. +// For testing only. +func (c *ChannelMetrics) Equal(o any) bool { + oc, ok := o.(*ChannelMetrics) + if !ok { + return false + } + if (c.State.Load() == nil) != (oc.State.Load() == nil) { + return false + } + if c.State.Load() != nil && *c.State.Load() != *oc.State.Load() { + return false + } + if (c.Target.Load() == nil) != (oc.Target.Load() == nil) { + return false + } + if c.Target.Load() != nil && *c.Target.Load() != *oc.Target.Load() { + return false + } + return c.CallsStarted.Load() == oc.CallsStarted.Load() && + c.CallsFailed.Load() == oc.CallsFailed.Load() && + c.CallsSucceeded.Load() == oc.CallsSucceeded.Load() && + c.LastCallStartedTimestamp.Load() == oc.LastCallStartedTimestamp.Load() +} + +func strFromPointer(s *string) string { + if s == nil { + return "" + } + return *s +} + +func (c *ChannelMetrics) String() string { + return fmt.Sprintf("State: %v, Target: %s, CallsStarted: %v, CallsSucceeded: %v, CallsFailed: %v, LastCallStartedTimestamp: %v", + c.State.Load(), strFromPointer(c.Target.Load()), c.CallsStarted.Load(), c.CallsSucceeded.Load(), c.CallsFailed.Load(), c.LastCallStartedTimestamp.Load(), + ) +} + +func NewChannelMetricForTesting(state connectivity.State, target string, started, succeeded, failed, timestamp int64) *ChannelMetrics { + c := &ChannelMetrics{} + c.State.Store(&state) + c.Target.Store(&target) + c.CallsStarted.Store(started) + c.CallsSucceeded.Store(succeeded) + c.CallsFailed.Store(failed) + c.LastCallStartedTimestamp.Store(timestamp) + return c +} + +func (c *Channel) addChild(id int64, e entry) { + switch v := e.(type) { + case *SubChannel: + c.subChans[id] = v.RefName + case *Channel: + c.nestedChans[id] = v.RefName + default: + logger.Errorf("cannot add a child (id = %d) of type %T to a channel", id, e) + } +} + +func (c *Channel) deleteChild(id int64) { + delete(c.subChans, id) + delete(c.nestedChans, id) + c.deleteSelfIfReady() +} + +func (c *Channel) triggerDelete() { + c.closeCalled = true + c.deleteSelfIfReady() +} + +func (c *Channel) getParentID() int64 { + if c.Parent == nil { + return -1 + } + return c.Parent.ID +} + +// deleteSelfFromTree tries to delete the channel from the channelz entry relation tree, which means +// deleting the channel reference from its parent's child list. +// +// In order for a channel to be deleted from the tree, it must meet the criteria that, removal of the +// corresponding grpc object has been invoked, and the channel does not have any children left. +// +// The returned boolean value indicates whether the channel has been successfully deleted from tree. +func (c *Channel) deleteSelfFromTree() (deleted bool) { + if !c.closeCalled || len(c.subChans)+len(c.nestedChans) != 0 { + return false + } + // not top channel + if c.Parent != nil { + c.Parent.deleteChild(c.ID) + } + return true +} + +// deleteSelfFromMap checks whether it is valid to delete the channel from the map, which means +// deleting the channel from channelz's tracking entirely. Users can no longer use id to query the +// channel, and its memory will be garbage collected. +// +// The trace reference count of the channel must be 0 in order to be deleted from the map. This is +// specified in the channel tracing gRFC that as long as some other trace has reference to an entity, +// the trace of the referenced entity must not be deleted. In order to release the resource allocated +// by grpc, the reference to the grpc object is reset to a dummy object. +// +// deleteSelfFromMap must be called after deleteSelfFromTree returns true. +// +// It returns a bool to indicate whether the channel can be safely deleted from map. +func (c *Channel) deleteSelfFromMap() (delete bool) { + return c.getTraceRefCount() == 0 +} + +// deleteSelfIfReady tries to delete the channel itself from the channelz database. +// The delete process includes two steps: +// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its +// parent's child list. +// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id +// will return entry not found error. +func (c *Channel) deleteSelfIfReady() { + if !c.deleteSelfFromTree() { + return + } + if !c.deleteSelfFromMap() { + return + } + db.deleteEntry(c.ID) + c.trace.clear() +} + +func (c *Channel) getChannelTrace() *ChannelTrace { + return c.trace +} + +func (c *Channel) incrTraceRefCount() { + atomic.AddInt32(&c.traceRefCount, 1) +} + +func (c *Channel) decrTraceRefCount() { + atomic.AddInt32(&c.traceRefCount, -1) +} + +func (c *Channel) getTraceRefCount() int { + i := atomic.LoadInt32(&c.traceRefCount) + return int(i) +} + +func (c *Channel) getRefName() string { + return c.RefName +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/channelmap.go b/vendor/google.golang.org/grpc/internal/channelz/channelmap.go new file mode 100644 index 000000000..dfe18b089 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/channelz/channelmap.go @@ -0,0 +1,402 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package channelz + +import ( + "fmt" + "sort" + "sync" + "time" +) + +// entry represents a node in the channelz database. +type entry interface { + // addChild adds a child e, whose channelz id is id to child list + addChild(id int64, e entry) + // deleteChild deletes a child with channelz id to be id from child list + deleteChild(id int64) + // triggerDelete tries to delete self from channelz database. However, if + // child list is not empty, then deletion from the database is on hold until + // the last child is deleted from database. + triggerDelete() + // deleteSelfIfReady check whether triggerDelete() has been called before, + // and whether child list is now empty. If both conditions are met, then + // delete self from database. + deleteSelfIfReady() + // getParentID returns parent ID of the entry. 0 value parent ID means no parent. + getParentID() int64 + Entity +} + +// channelMap is the storage data structure for channelz. +// +// Methods of channelMap can be divided in two two categories with respect to +// locking. +// +// 1. Methods acquire the global lock. +// 2. Methods that can only be called when global lock is held. +// +// A second type of method need always to be called inside a first type of method. +type channelMap struct { + mu sync.RWMutex + topLevelChannels map[int64]struct{} + channels map[int64]*Channel + subChannels map[int64]*SubChannel + sockets map[int64]*Socket + servers map[int64]*Server +} + +func newChannelMap() *channelMap { + return &channelMap{ + topLevelChannels: make(map[int64]struct{}), + channels: make(map[int64]*Channel), + subChannels: make(map[int64]*SubChannel), + sockets: make(map[int64]*Socket), + servers: make(map[int64]*Server), + } +} + +func (c *channelMap) addServer(id int64, s *Server) { + c.mu.Lock() + defer c.mu.Unlock() + s.cm = c + c.servers[id] = s +} + +func (c *channelMap) addChannel(id int64, cn *Channel, isTopChannel bool, pid int64) { + c.mu.Lock() + defer c.mu.Unlock() + cn.trace.cm = c + c.channels[id] = cn + if isTopChannel { + c.topLevelChannels[id] = struct{}{} + } else if p := c.channels[pid]; p != nil { + p.addChild(id, cn) + } else { + logger.Infof("channel %d references invalid parent ID %d", id, pid) + } +} + +func (c *channelMap) addSubChannel(id int64, sc *SubChannel, pid int64) { + c.mu.Lock() + defer c.mu.Unlock() + sc.trace.cm = c + c.subChannels[id] = sc + if p := c.channels[pid]; p != nil { + p.addChild(id, sc) + } else { + logger.Infof("subchannel %d references invalid parent ID %d", id, pid) + } +} + +func (c *channelMap) addSocket(s *Socket) { + c.mu.Lock() + defer c.mu.Unlock() + s.cm = c + c.sockets[s.ID] = s + if s.Parent == nil { + logger.Infof("normal socket %d has no parent", s.ID) + } + s.Parent.(entry).addChild(s.ID, s) +} + +// removeEntry triggers the removal of an entry, which may not indeed delete the +// entry, if it has to wait on the deletion of its children and until no other +// entity's channel trace references it. It may lead to a chain of entry +// deletion. For example, deleting the last socket of a gracefully shutting down +// server will lead to the server being also deleted. +func (c *channelMap) removeEntry(id int64) { + c.mu.Lock() + defer c.mu.Unlock() + c.findEntry(id).triggerDelete() +} + +// tracedChannel represents tracing operations which are present on both +// channels and subChannels. +type tracedChannel interface { + getChannelTrace() *ChannelTrace + incrTraceRefCount() + decrTraceRefCount() + getRefName() string +} + +// c.mu must be held by the caller +func (c *channelMap) decrTraceRefCount(id int64) { + e := c.findEntry(id) + if v, ok := e.(tracedChannel); ok { + v.decrTraceRefCount() + e.deleteSelfIfReady() + } +} + +// c.mu must be held by the caller. +func (c *channelMap) findEntry(id int64) entry { + if v, ok := c.channels[id]; ok { + return v + } + if v, ok := c.subChannels[id]; ok { + return v + } + if v, ok := c.servers[id]; ok { + return v + } + if v, ok := c.sockets[id]; ok { + return v + } + return &dummyEntry{idNotFound: id} +} + +// c.mu must be held by the caller +// +// deleteEntry deletes an entry from the channelMap. Before calling this method, +// caller must check this entry is ready to be deleted, i.e removeEntry() has +// been called on it, and no children still exist. +func (c *channelMap) deleteEntry(id int64) entry { + if v, ok := c.sockets[id]; ok { + delete(c.sockets, id) + return v + } + if v, ok := c.subChannels[id]; ok { + delete(c.subChannels, id) + return v + } + if v, ok := c.channels[id]; ok { + delete(c.channels, id) + delete(c.topLevelChannels, id) + return v + } + if v, ok := c.servers[id]; ok { + delete(c.servers, id) + return v + } + return &dummyEntry{idNotFound: id} +} + +func (c *channelMap) traceEvent(id int64, desc *TraceEvent) { + c.mu.Lock() + defer c.mu.Unlock() + child := c.findEntry(id) + childTC, ok := child.(tracedChannel) + if !ok { + return + } + childTC.getChannelTrace().append(&traceEvent{Desc: desc.Desc, Severity: desc.Severity, Timestamp: time.Now()}) + if desc.Parent != nil { + parent := c.findEntry(child.getParentID()) + var chanType RefChannelType + switch child.(type) { + case *Channel: + chanType = RefChannel + case *SubChannel: + chanType = RefSubChannel + } + if parentTC, ok := parent.(tracedChannel); ok { + parentTC.getChannelTrace().append(&traceEvent{ + Desc: desc.Parent.Desc, + Severity: desc.Parent.Severity, + Timestamp: time.Now(), + RefID: id, + RefName: childTC.getRefName(), + RefType: chanType, + }) + childTC.incrTraceRefCount() + } + } +} + +type int64Slice []int64 + +func (s int64Slice) Len() int { return len(s) } +func (s int64Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s int64Slice) Less(i, j int) bool { return s[i] < s[j] } + +func copyMap(m map[int64]string) map[int64]string { + n := make(map[int64]string) + for k, v := range m { + n[k] = v + } + return n +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func (c *channelMap) getTopChannels(id int64, maxResults int) ([]*Channel, bool) { + if maxResults <= 0 { + maxResults = EntriesPerPage + } + c.mu.RLock() + defer c.mu.RUnlock() + l := int64(len(c.topLevelChannels)) + ids := make([]int64, 0, l) + + for k := range c.topLevelChannels { + ids = append(ids, k) + } + sort.Sort(int64Slice(ids)) + idx := sort.Search(len(ids), func(i int) bool { return ids[i] >= id }) + end := true + var t []*Channel + for _, v := range ids[idx:] { + if len(t) == maxResults { + end = false + break + } + if cn, ok := c.channels[v]; ok { + t = append(t, cn) + } + } + return t, end +} + +func (c *channelMap) getServers(id int64, maxResults int) ([]*Server, bool) { + if maxResults <= 0 { + maxResults = EntriesPerPage + } + c.mu.RLock() + defer c.mu.RUnlock() + ids := make([]int64, 0, len(c.servers)) + for k := range c.servers { + ids = append(ids, k) + } + sort.Sort(int64Slice(ids)) + idx := sort.Search(len(ids), func(i int) bool { return ids[i] >= id }) + end := true + var s []*Server + for _, v := range ids[idx:] { + if len(s) == maxResults { + end = false + break + } + if svr, ok := c.servers[v]; ok { + s = append(s, svr) + } + } + return s, end +} + +func (c *channelMap) getServerSockets(id int64, startID int64, maxResults int) ([]*Socket, bool) { + if maxResults <= 0 { + maxResults = EntriesPerPage + } + c.mu.RLock() + defer c.mu.RUnlock() + svr, ok := c.servers[id] + if !ok { + // server with id doesn't exist. + return nil, true + } + svrskts := svr.sockets + ids := make([]int64, 0, len(svrskts)) + sks := make([]*Socket, 0, min(len(svrskts), maxResults)) + for k := range svrskts { + ids = append(ids, k) + } + sort.Sort(int64Slice(ids)) + idx := sort.Search(len(ids), func(i int) bool { return ids[i] >= startID }) + end := true + for _, v := range ids[idx:] { + if len(sks) == maxResults { + end = false + break + } + if ns, ok := c.sockets[v]; ok { + sks = append(sks, ns) + } + } + return sks, end +} + +func (c *channelMap) getChannel(id int64) *Channel { + c.mu.RLock() + defer c.mu.RUnlock() + return c.channels[id] +} + +func (c *channelMap) getSubChannel(id int64) *SubChannel { + c.mu.RLock() + defer c.mu.RUnlock() + return c.subChannels[id] +} + +func (c *channelMap) getSocket(id int64) *Socket { + c.mu.RLock() + defer c.mu.RUnlock() + return c.sockets[id] +} + +func (c *channelMap) getServer(id int64) *Server { + c.mu.RLock() + defer c.mu.RUnlock() + return c.servers[id] +} + +type dummyEntry struct { + // dummyEntry is a fake entry to handle entry not found case. + idNotFound int64 + Entity +} + +func (d *dummyEntry) String() string { + return fmt.Sprintf("non-existent entity #%d", d.idNotFound) +} + +func (d *dummyEntry) ID() int64 { return d.idNotFound } + +func (d *dummyEntry) addChild(id int64, e entry) { + // Note: It is possible for a normal program to reach here under race + // condition. For example, there could be a race between ClientConn.Close() + // info being propagated to addrConn and http2Client. ClientConn.Close() + // cancel the context and result in http2Client to error. The error info is + // then caught by transport monitor and before addrConn.tearDown() is called + // in side ClientConn.Close(). Therefore, the addrConn will create a new + // transport. And when registering the new transport in channelz, its parent + // addrConn could have already been torn down and deleted from channelz + // tracking, and thus reach the code here. + logger.Infof("attempt to add child of type %T with id %d to a parent (id=%d) that doesn't currently exist", e, id, d.idNotFound) +} + +func (d *dummyEntry) deleteChild(id int64) { + // It is possible for a normal program to reach here under race condition. + // Refer to the example described in addChild(). + logger.Infof("attempt to delete child with id %d from a parent (id=%d) that doesn't currently exist", id, d.idNotFound) +} + +func (d *dummyEntry) triggerDelete() { + logger.Warningf("attempt to delete an entry (id=%d) that doesn't currently exist", d.idNotFound) +} + +func (*dummyEntry) deleteSelfIfReady() { + // code should not reach here. deleteSelfIfReady is always called on an existing entry. +} + +func (*dummyEntry) getParentID() int64 { + return 0 +} + +// Entity is implemented by all channelz types. +type Entity interface { + isEntity() + fmt.Stringer + id() int64 +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/funcs.go b/vendor/google.golang.org/grpc/internal/channelz/funcs.go index 5395e7752..03e24e150 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/funcs.go +++ b/vendor/google.golang.org/grpc/internal/channelz/funcs.go @@ -16,25 +16,16 @@ * */ -// Package channelz defines APIs for enabling channelz service, entry +// Package channelz defines internal APIs for enabling channelz service, entry // registration/deletion, and accessing channelz data. It also defines channelz // metric struct formats. -// -// All APIs in this package are experimental. package channelz import ( - "errors" - "sort" - "sync" "sync/atomic" "time" - "google.golang.org/grpc/grpclog" -) - -const ( - defaultMaxTraceEntry int32 = 30 + "google.golang.org/grpc/internal" ) var ( @@ -42,19 +33,20 @@ var ( // outside this package except by tests. IDGen IDGenerator - db dbWrapper - // EntryPerPage defines the number of channelz entries to be shown on a web page. - EntryPerPage = int64(50) - curState int32 - maxTraceEntry = defaultMaxTraceEntry + db *channelMap = newChannelMap() + // EntriesPerPage defines the number of channelz entries to be shown on a web page. + EntriesPerPage = 50 + curState int32 ) // TurnOn turns on channelz data collection. func TurnOn() { - if !IsOn() { - db.set(newChannelMap()) - IDGen.Reset() - atomic.StoreInt32(&curState, 1) + atomic.StoreInt32(&curState, 1) +} + +func init() { + internal.ChannelzTurnOffForTesting = func() { + atomic.StoreInt32(&curState, 0) } } @@ -63,49 +55,15 @@ func IsOn() bool { return atomic.LoadInt32(&curState) == 1 } -// SetMaxTraceEntry sets maximum number of trace entry per entity (i.e. channel/subchannel). -// Setting it to 0 will disable channel tracing. -func SetMaxTraceEntry(i int32) { - atomic.StoreInt32(&maxTraceEntry, i) -} - -// ResetMaxTraceEntryToDefault resets the maximum number of trace entry per entity to default. -func ResetMaxTraceEntryToDefault() { - atomic.StoreInt32(&maxTraceEntry, defaultMaxTraceEntry) -} - -func getMaxTraceEntry() int { - i := atomic.LoadInt32(&maxTraceEntry) - return int(i) -} - -// dbWarpper wraps around a reference to internal channelz data storage, and -// provide synchronized functionality to set and get the reference. -type dbWrapper struct { - mu sync.RWMutex - DB *channelMap -} - -func (d *dbWrapper) set(db *channelMap) { - d.mu.Lock() - d.DB = db - d.mu.Unlock() -} - -func (d *dbWrapper) get() *channelMap { - d.mu.RLock() - defer d.mu.RUnlock() - return d.DB -} - // GetTopChannels returns a slice of top channel's ChannelMetric, along with a // boolean indicating whether there's more top channels to be queried for. // -// The arg id specifies that only top channel with id at or above it will be included -// in the result. The returned slice is up to a length of the arg maxResults or -// EntryPerPage if maxResults is zero, and is sorted in ascending id order. -func GetTopChannels(id int64, maxResults int64) ([]*ChannelMetric, bool) { - return db.get().GetTopChannels(id, maxResults) +// The arg id specifies that only top channel with id at or above it will be +// included in the result. The returned slice is up to a length of the arg +// maxResults or EntriesPerPage if maxResults is zero, and is sorted in ascending +// id order. +func GetTopChannels(id int64, maxResults int) ([]*Channel, bool) { + return db.getTopChannels(id, maxResults) } // GetServers returns a slice of server's ServerMetric, along with a @@ -113,73 +71,69 @@ func GetTopChannels(id int64, maxResults int64) ([]*ChannelMetric, bool) { // // The arg id specifies that only server with id at or above it will be included // in the result. The returned slice is up to a length of the arg maxResults or -// EntryPerPage if maxResults is zero, and is sorted in ascending id order. -func GetServers(id int64, maxResults int64) ([]*ServerMetric, bool) { - return db.get().GetServers(id, maxResults) +// EntriesPerPage if maxResults is zero, and is sorted in ascending id order. +func GetServers(id int64, maxResults int) ([]*Server, bool) { + return db.getServers(id, maxResults) } // GetServerSockets returns a slice of server's (identified by id) normal socket's -// SocketMetric, along with a boolean indicating whether there's more sockets to +// SocketMetrics, along with a boolean indicating whether there's more sockets to // be queried for. // // The arg startID specifies that only sockets with id at or above it will be // included in the result. The returned slice is up to a length of the arg maxResults -// or EntryPerPage if maxResults is zero, and is sorted in ascending id order. -func GetServerSockets(id int64, startID int64, maxResults int64) ([]*SocketMetric, bool) { - return db.get().GetServerSockets(id, startID, maxResults) +// or EntriesPerPage if maxResults is zero, and is sorted in ascending id order. +func GetServerSockets(id int64, startID int64, maxResults int) ([]*Socket, bool) { + return db.getServerSockets(id, startID, maxResults) } -// GetChannel returns the ChannelMetric for the channel (identified by id). -func GetChannel(id int64) *ChannelMetric { - return db.get().GetChannel(id) +// GetChannel returns the Channel for the channel (identified by id). +func GetChannel(id int64) *Channel { + return db.getChannel(id) } -// GetSubChannel returns the SubChannelMetric for the subchannel (identified by id). -func GetSubChannel(id int64) *SubChannelMetric { - return db.get().GetSubChannel(id) +// GetSubChannel returns the SubChannel for the subchannel (identified by id). +func GetSubChannel(id int64) *SubChannel { + return db.getSubChannel(id) } -// GetSocket returns the SocketInternalMetric for the socket (identified by id). -func GetSocket(id int64) *SocketMetric { - return db.get().GetSocket(id) +// GetSocket returns the Socket for the socket (identified by id). +func GetSocket(id int64) *Socket { + return db.getSocket(id) } // GetServer returns the ServerMetric for the server (identified by id). -func GetServer(id int64) *ServerMetric { - return db.get().GetServer(id) +func GetServer(id int64) *Server { + return db.getServer(id) } // RegisterChannel registers the given channel c in the channelz database with -// ref as its reference name, and adds it to the child list of its parent -// (identified by pid). pid == nil means no parent. +// target as its target and reference name, and adds it to the child list of its +// parent. parent == nil means no parent. // // Returns a unique channelz identifier assigned to this channel. // // If channelz is not turned ON, the channelz database is not mutated. -func RegisterChannel(c Channel, pid *Identifier, ref string) *Identifier { +func RegisterChannel(parent *Channel, target string) *Channel { id := IDGen.genID() - var parent int64 - isTopChannel := true - if pid != nil { - isTopChannel = false - parent = pid.Int() - } if !IsOn() { - return newIdentifer(RefChannel, id, pid) + return &Channel{ID: id} } - cn := &channel{ - refName: ref, - c: c, - subChans: make(map[int64]string), + isTopChannel := parent == nil + + cn := &Channel{ + ID: id, + RefName: target, nestedChans: make(map[int64]string), - id: id, - pid: parent, - trace: &channelTrace{createdTime: time.Now(), events: make([]*TraceEvent, 0, getMaxTraceEntry())}, + subChans: make(map[int64]string), + Parent: parent, + trace: &ChannelTrace{CreationTime: time.Now(), Events: make([]*traceEvent, 0, getMaxTraceEntry())}, } - db.get().addChannel(id, cn, isTopChannel, parent) - return newIdentifer(RefChannel, id, pid) + cn.ChannelMetrics.Target.Store(&target) + db.addChannel(id, cn, isTopChannel, cn.getParentID()) + return cn } // RegisterSubChannel registers the given subChannel c in the channelz database @@ -189,555 +143,67 @@ func RegisterChannel(c Channel, pid *Identifier, ref string) *Identifier { // Returns a unique channelz identifier assigned to this subChannel. // // If channelz is not turned ON, the channelz database is not mutated. -func RegisterSubChannel(c Channel, pid *Identifier, ref string) (*Identifier, error) { - if pid == nil { - return nil, errors.New("a SubChannel's parent id cannot be nil") - } +func RegisterSubChannel(parent *Channel, ref string) *SubChannel { id := IDGen.genID() - if !IsOn() { - return newIdentifer(RefSubChannel, id, pid), nil + sc := &SubChannel{ + ID: id, + RefName: ref, + parent: parent, } - sc := &subChannel{ - refName: ref, - c: c, - sockets: make(map[int64]string), - id: id, - pid: pid.Int(), - trace: &channelTrace{createdTime: time.Now(), events: make([]*TraceEvent, 0, getMaxTraceEntry())}, + if !IsOn() { + return sc } - db.get().addSubChannel(id, sc, pid.Int()) - return newIdentifer(RefSubChannel, id, pid), nil + + sc.sockets = make(map[int64]string) + sc.trace = &ChannelTrace{CreationTime: time.Now(), Events: make([]*traceEvent, 0, getMaxTraceEntry())} + db.addSubChannel(id, sc, parent.ID) + return sc } // RegisterServer registers the given server s in channelz database. It returns // the unique channelz tracking id assigned to this server. // // If channelz is not turned ON, the channelz database is not mutated. -func RegisterServer(s Server, ref string) *Identifier { +func RegisterServer(ref string) *Server { id := IDGen.genID() if !IsOn() { - return newIdentifer(RefServer, id, nil) + return &Server{ID: id} } - svr := &server{ - refName: ref, - s: s, + svr := &Server{ + RefName: ref, sockets: make(map[int64]string), listenSockets: make(map[int64]string), - id: id, - } - db.get().addServer(id, svr) - return newIdentifer(RefServer, id, nil) -} - -// RegisterListenSocket registers the given listen socket s in channelz database -// with ref as its reference name, and add it to the child list of its parent -// (identified by pid). It returns the unique channelz tracking id assigned to -// this listen socket. -// -// If channelz is not turned ON, the channelz database is not mutated. -func RegisterListenSocket(s Socket, pid *Identifier, ref string) (*Identifier, error) { - if pid == nil { - return nil, errors.New("a ListenSocket's parent id cannot be 0") + ID: id, } - id := IDGen.genID() - if !IsOn() { - return newIdentifer(RefListenSocket, id, pid), nil - } - - ls := &listenSocket{refName: ref, s: s, id: id, pid: pid.Int()} - db.get().addListenSocket(id, ls, pid.Int()) - return newIdentifer(RefListenSocket, id, pid), nil + db.addServer(id, svr) + return svr } -// RegisterNormalSocket registers the given normal socket s in channelz database +// RegisterSocket registers the given normal socket s in channelz database // with ref as its reference name, and adds it to the child list of its parent -// (identified by pid). It returns the unique channelz tracking id assigned to -// this normal socket. +// (identified by skt.Parent, which must be set). It returns the unique channelz +// tracking id assigned to this normal socket. // // If channelz is not turned ON, the channelz database is not mutated. -func RegisterNormalSocket(s Socket, pid *Identifier, ref string) (*Identifier, error) { - if pid == nil { - return nil, errors.New("a NormalSocket's parent id cannot be 0") - } - id := IDGen.genID() - if !IsOn() { - return newIdentifer(RefNormalSocket, id, pid), nil +func RegisterSocket(skt *Socket) *Socket { + skt.ID = IDGen.genID() + if IsOn() { + db.addSocket(skt) } - - ns := &normalSocket{refName: ref, s: s, id: id, pid: pid.Int()} - db.get().addNormalSocket(id, ns, pid.Int()) - return newIdentifer(RefNormalSocket, id, pid), nil + return skt } // RemoveEntry removes an entry with unique channelz tracking id to be id from // channelz database. // // If channelz is not turned ON, this function is a no-op. -func RemoveEntry(id *Identifier) { +func RemoveEntry(id int64) { if !IsOn() { return } - db.get().removeEntry(id.Int()) -} - -// TraceEventDesc is what the caller of AddTraceEvent should provide to describe -// the event to be added to the channel trace. -// -// The Parent field is optional. It is used for an event that will be recorded -// in the entity's parent trace. -type TraceEventDesc struct { - Desc string - Severity Severity - Parent *TraceEventDesc -} - -// AddTraceEvent adds trace related to the entity with specified id, using the -// provided TraceEventDesc. -// -// If channelz is not turned ON, this will simply log the event descriptions. -func AddTraceEvent(l grpclog.DepthLoggerV2, id *Identifier, depth int, desc *TraceEventDesc) { - // Log only the trace description associated with the bottom most entity. - switch desc.Severity { - case CtUnknown, CtInfo: - l.InfoDepth(depth+1, withParens(id)+desc.Desc) - case CtWarning: - l.WarningDepth(depth+1, withParens(id)+desc.Desc) - case CtError: - l.ErrorDepth(depth+1, withParens(id)+desc.Desc) - } - - if getMaxTraceEntry() == 0 { - return - } - if IsOn() { - db.get().traceEvent(id.Int(), desc) - } -} - -// channelMap is the storage data structure for channelz. -// Methods of channelMap can be divided in two two categories with respect to locking. -// 1. Methods acquire the global lock. -// 2. Methods that can only be called when global lock is held. -// A second type of method need always to be called inside a first type of method. -type channelMap struct { - mu sync.RWMutex - topLevelChannels map[int64]struct{} - servers map[int64]*server - channels map[int64]*channel - subChannels map[int64]*subChannel - listenSockets map[int64]*listenSocket - normalSockets map[int64]*normalSocket -} - -func newChannelMap() *channelMap { - return &channelMap{ - topLevelChannels: make(map[int64]struct{}), - channels: make(map[int64]*channel), - listenSockets: make(map[int64]*listenSocket), - normalSockets: make(map[int64]*normalSocket), - servers: make(map[int64]*server), - subChannels: make(map[int64]*subChannel), - } -} - -func (c *channelMap) addServer(id int64, s *server) { - c.mu.Lock() - s.cm = c - c.servers[id] = s - c.mu.Unlock() -} - -func (c *channelMap) addChannel(id int64, cn *channel, isTopChannel bool, pid int64) { - c.mu.Lock() - cn.cm = c - cn.trace.cm = c - c.channels[id] = cn - if isTopChannel { - c.topLevelChannels[id] = struct{}{} - } else { - c.findEntry(pid).addChild(id, cn) - } - c.mu.Unlock() -} - -func (c *channelMap) addSubChannel(id int64, sc *subChannel, pid int64) { - c.mu.Lock() - sc.cm = c - sc.trace.cm = c - c.subChannels[id] = sc - c.findEntry(pid).addChild(id, sc) - c.mu.Unlock() -} - -func (c *channelMap) addListenSocket(id int64, ls *listenSocket, pid int64) { - c.mu.Lock() - ls.cm = c - c.listenSockets[id] = ls - c.findEntry(pid).addChild(id, ls) - c.mu.Unlock() -} - -func (c *channelMap) addNormalSocket(id int64, ns *normalSocket, pid int64) { - c.mu.Lock() - ns.cm = c - c.normalSockets[id] = ns - c.findEntry(pid).addChild(id, ns) - c.mu.Unlock() -} - -// removeEntry triggers the removal of an entry, which may not indeed delete the entry, if it has to -// wait on the deletion of its children and until no other entity's channel trace references it. -// It may lead to a chain of entry deletion. For example, deleting the last socket of a gracefully -// shutting down server will lead to the server being also deleted. -func (c *channelMap) removeEntry(id int64) { - c.mu.Lock() - c.findEntry(id).triggerDelete() - c.mu.Unlock() -} - -// c.mu must be held by the caller -func (c *channelMap) decrTraceRefCount(id int64) { - e := c.findEntry(id) - if v, ok := e.(tracedChannel); ok { - v.decrTraceRefCount() - e.deleteSelfIfReady() - } -} - -// c.mu must be held by the caller. -func (c *channelMap) findEntry(id int64) entry { - var v entry - var ok bool - if v, ok = c.channels[id]; ok { - return v - } - if v, ok = c.subChannels[id]; ok { - return v - } - if v, ok = c.servers[id]; ok { - return v - } - if v, ok = c.listenSockets[id]; ok { - return v - } - if v, ok = c.normalSockets[id]; ok { - return v - } - return &dummyEntry{idNotFound: id} -} - -// c.mu must be held by the caller -// deleteEntry simply deletes an entry from the channelMap. Before calling this -// method, caller must check this entry is ready to be deleted, i.e removeEntry() -// has been called on it, and no children still exist. -// Conditionals are ordered by the expected frequency of deletion of each entity -// type, in order to optimize performance. -func (c *channelMap) deleteEntry(id int64) { - var ok bool - if _, ok = c.normalSockets[id]; ok { - delete(c.normalSockets, id) - return - } - if _, ok = c.subChannels[id]; ok { - delete(c.subChannels, id) - return - } - if _, ok = c.channels[id]; ok { - delete(c.channels, id) - delete(c.topLevelChannels, id) - return - } - if _, ok = c.listenSockets[id]; ok { - delete(c.listenSockets, id) - return - } - if _, ok = c.servers[id]; ok { - delete(c.servers, id) - return - } -} - -func (c *channelMap) traceEvent(id int64, desc *TraceEventDesc) { - c.mu.Lock() - child := c.findEntry(id) - childTC, ok := child.(tracedChannel) - if !ok { - c.mu.Unlock() - return - } - childTC.getChannelTrace().append(&TraceEvent{Desc: desc.Desc, Severity: desc.Severity, Timestamp: time.Now()}) - if desc.Parent != nil { - parent := c.findEntry(child.getParentID()) - var chanType RefChannelType - switch child.(type) { - case *channel: - chanType = RefChannel - case *subChannel: - chanType = RefSubChannel - } - if parentTC, ok := parent.(tracedChannel); ok { - parentTC.getChannelTrace().append(&TraceEvent{ - Desc: desc.Parent.Desc, - Severity: desc.Parent.Severity, - Timestamp: time.Now(), - RefID: id, - RefName: childTC.getRefName(), - RefType: chanType, - }) - childTC.incrTraceRefCount() - } - } - c.mu.Unlock() -} - -type int64Slice []int64 - -func (s int64Slice) Len() int { return len(s) } -func (s int64Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s int64Slice) Less(i, j int) bool { return s[i] < s[j] } - -func copyMap(m map[int64]string) map[int64]string { - n := make(map[int64]string) - for k, v := range m { - n[k] = v - } - return n -} - -func min(a, b int64) int64 { - if a < b { - return a - } - return b -} - -func (c *channelMap) GetTopChannels(id int64, maxResults int64) ([]*ChannelMetric, bool) { - if maxResults <= 0 { - maxResults = EntryPerPage - } - c.mu.RLock() - l := int64(len(c.topLevelChannels)) - ids := make([]int64, 0, l) - cns := make([]*channel, 0, min(l, maxResults)) - - for k := range c.topLevelChannels { - ids = append(ids, k) - } - sort.Sort(int64Slice(ids)) - idx := sort.Search(len(ids), func(i int) bool { return ids[i] >= id }) - count := int64(0) - var end bool - var t []*ChannelMetric - for i, v := range ids[idx:] { - if count == maxResults { - break - } - if cn, ok := c.channels[v]; ok { - cns = append(cns, cn) - t = append(t, &ChannelMetric{ - NestedChans: copyMap(cn.nestedChans), - SubChans: copyMap(cn.subChans), - }) - count++ - } - if i == len(ids[idx:])-1 { - end = true - break - } - } - c.mu.RUnlock() - if count == 0 { - end = true - } - - for i, cn := range cns { - t[i].ChannelData = cn.c.ChannelzMetric() - t[i].ID = cn.id - t[i].RefName = cn.refName - t[i].Trace = cn.trace.dumpData() - } - return t, end -} - -func (c *channelMap) GetServers(id, maxResults int64) ([]*ServerMetric, bool) { - if maxResults <= 0 { - maxResults = EntryPerPage - } - c.mu.RLock() - l := int64(len(c.servers)) - ids := make([]int64, 0, l) - ss := make([]*server, 0, min(l, maxResults)) - for k := range c.servers { - ids = append(ids, k) - } - sort.Sort(int64Slice(ids)) - idx := sort.Search(len(ids), func(i int) bool { return ids[i] >= id }) - count := int64(0) - var end bool - var s []*ServerMetric - for i, v := range ids[idx:] { - if count == maxResults { - break - } - if svr, ok := c.servers[v]; ok { - ss = append(ss, svr) - s = append(s, &ServerMetric{ - ListenSockets: copyMap(svr.listenSockets), - }) - count++ - } - if i == len(ids[idx:])-1 { - end = true - break - } - } - c.mu.RUnlock() - if count == 0 { - end = true - } - - for i, svr := range ss { - s[i].ServerData = svr.s.ChannelzMetric() - s[i].ID = svr.id - s[i].RefName = svr.refName - } - return s, end -} - -func (c *channelMap) GetServerSockets(id int64, startID int64, maxResults int64) ([]*SocketMetric, bool) { - if maxResults <= 0 { - maxResults = EntryPerPage - } - var svr *server - var ok bool - c.mu.RLock() - if svr, ok = c.servers[id]; !ok { - // server with id doesn't exist. - c.mu.RUnlock() - return nil, true - } - svrskts := svr.sockets - l := int64(len(svrskts)) - ids := make([]int64, 0, l) - sks := make([]*normalSocket, 0, min(l, maxResults)) - for k := range svrskts { - ids = append(ids, k) - } - sort.Sort(int64Slice(ids)) - idx := sort.Search(len(ids), func(i int) bool { return ids[i] >= startID }) - count := int64(0) - var end bool - for i, v := range ids[idx:] { - if count == maxResults { - break - } - if ns, ok := c.normalSockets[v]; ok { - sks = append(sks, ns) - count++ - } - if i == len(ids[idx:])-1 { - end = true - break - } - } - c.mu.RUnlock() - if count == 0 { - end = true - } - s := make([]*SocketMetric, 0, len(sks)) - for _, ns := range sks { - sm := &SocketMetric{} - sm.SocketData = ns.s.ChannelzMetric() - sm.ID = ns.id - sm.RefName = ns.refName - s = append(s, sm) - } - return s, end -} - -func (c *channelMap) GetChannel(id int64) *ChannelMetric { - cm := &ChannelMetric{} - var cn *channel - var ok bool - c.mu.RLock() - if cn, ok = c.channels[id]; !ok { - // channel with id doesn't exist. - c.mu.RUnlock() - return nil - } - cm.NestedChans = copyMap(cn.nestedChans) - cm.SubChans = copyMap(cn.subChans) - // cn.c can be set to &dummyChannel{} when deleteSelfFromMap is called. Save a copy of cn.c when - // holding the lock to prevent potential data race. - chanCopy := cn.c - c.mu.RUnlock() - cm.ChannelData = chanCopy.ChannelzMetric() - cm.ID = cn.id - cm.RefName = cn.refName - cm.Trace = cn.trace.dumpData() - return cm -} - -func (c *channelMap) GetSubChannel(id int64) *SubChannelMetric { - cm := &SubChannelMetric{} - var sc *subChannel - var ok bool - c.mu.RLock() - if sc, ok = c.subChannels[id]; !ok { - // subchannel with id doesn't exist. - c.mu.RUnlock() - return nil - } - cm.Sockets = copyMap(sc.sockets) - // sc.c can be set to &dummyChannel{} when deleteSelfFromMap is called. Save a copy of sc.c when - // holding the lock to prevent potential data race. - chanCopy := sc.c - c.mu.RUnlock() - cm.ChannelData = chanCopy.ChannelzMetric() - cm.ID = sc.id - cm.RefName = sc.refName - cm.Trace = sc.trace.dumpData() - return cm -} - -func (c *channelMap) GetSocket(id int64) *SocketMetric { - sm := &SocketMetric{} - c.mu.RLock() - if ls, ok := c.listenSockets[id]; ok { - c.mu.RUnlock() - sm.SocketData = ls.s.ChannelzMetric() - sm.ID = ls.id - sm.RefName = ls.refName - return sm - } - if ns, ok := c.normalSockets[id]; ok { - c.mu.RUnlock() - sm.SocketData = ns.s.ChannelzMetric() - sm.ID = ns.id - sm.RefName = ns.refName - return sm - } - c.mu.RUnlock() - return nil -} - -func (c *channelMap) GetServer(id int64) *ServerMetric { - sm := &ServerMetric{} - var svr *server - var ok bool - c.mu.RLock() - if svr, ok = c.servers[id]; !ok { - c.mu.RUnlock() - return nil - } - sm.ListenSockets = copyMap(svr.listenSockets) - c.mu.RUnlock() - sm.ID = svr.id - sm.RefName = svr.refName - sm.ServerData = svr.s.ChannelzMetric() - return sm + db.removeEntry(id) } // IDGenerator is an incrementing atomic that tracks IDs for channelz entities. @@ -754,3 +220,11 @@ func (i *IDGenerator) Reset() { func (i *IDGenerator) genID() int64 { return atomic.AddInt64(&i.id, 1) } + +// Identifier is an opaque channelz identifier used to expose channelz symbols +// outside of grpc. Currently only implemented by Channel since no other +// types require exposure outside grpc. +type Identifier interface { + Entity + channelzIdentifier() +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/id.go b/vendor/google.golang.org/grpc/internal/channelz/id.go deleted file mode 100644 index c9a27acd3..000000000 --- a/vendor/google.golang.org/grpc/internal/channelz/id.go +++ /dev/null @@ -1,75 +0,0 @@ -/* - * - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package channelz - -import "fmt" - -// Identifier is an opaque identifier which uniquely identifies an entity in the -// channelz database. -type Identifier struct { - typ RefChannelType - id int64 - str string - pid *Identifier -} - -// Type returns the entity type corresponding to id. -func (id *Identifier) Type() RefChannelType { - return id.typ -} - -// Int returns the integer identifier corresponding to id. -func (id *Identifier) Int() int64 { - return id.id -} - -// String returns a string representation of the entity corresponding to id. -// -// This includes some information about the parent as well. Examples: -// Top-level channel: [Channel #channel-number] -// Nested channel: [Channel #parent-channel-number Channel #channel-number] -// Sub channel: [Channel #parent-channel SubChannel #subchannel-number] -func (id *Identifier) String() string { - return id.str -} - -// Equal returns true if other is the same as id. -func (id *Identifier) Equal(other *Identifier) bool { - if (id != nil) != (other != nil) { - return false - } - if id == nil && other == nil { - return true - } - return id.typ == other.typ && id.id == other.id && id.pid == other.pid -} - -// NewIdentifierForTesting returns a new opaque identifier to be used only for -// testing purposes. -func NewIdentifierForTesting(typ RefChannelType, id int64, pid *Identifier) *Identifier { - return newIdentifer(typ, id, pid) -} - -func newIdentifer(typ RefChannelType, id int64, pid *Identifier) *Identifier { - str := fmt.Sprintf("%s #%d", typ, id) - if pid != nil { - str = fmt.Sprintf("%s %s", pid, str) - } - return &Identifier{typ: typ, id: id, str: str, pid: pid} -} diff --git a/vendor/google.golang.org/grpc/internal/channelz/logging.go b/vendor/google.golang.org/grpc/internal/channelz/logging.go index f89e6f77b..ee4d72125 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/logging.go +++ b/vendor/google.golang.org/grpc/internal/channelz/logging.go @@ -26,53 +26,49 @@ import ( var logger = grpclog.Component("channelz") -func withParens(id *Identifier) string { - return "[" + id.String() + "] " -} - // Info logs and adds a trace event if channelz is on. -func Info(l grpclog.DepthLoggerV2, id *Identifier, args ...any) { - AddTraceEvent(l, id, 1, &TraceEventDesc{ +func Info(l grpclog.DepthLoggerV2, e Entity, args ...any) { + AddTraceEvent(l, e, 1, &TraceEvent{ Desc: fmt.Sprint(args...), Severity: CtInfo, }) } // Infof logs and adds a trace event if channelz is on. -func Infof(l grpclog.DepthLoggerV2, id *Identifier, format string, args ...any) { - AddTraceEvent(l, id, 1, &TraceEventDesc{ +func Infof(l grpclog.DepthLoggerV2, e Entity, format string, args ...any) { + AddTraceEvent(l, e, 1, &TraceEvent{ Desc: fmt.Sprintf(format, args...), Severity: CtInfo, }) } // Warning logs and adds a trace event if channelz is on. -func Warning(l grpclog.DepthLoggerV2, id *Identifier, args ...any) { - AddTraceEvent(l, id, 1, &TraceEventDesc{ +func Warning(l grpclog.DepthLoggerV2, e Entity, args ...any) { + AddTraceEvent(l, e, 1, &TraceEvent{ Desc: fmt.Sprint(args...), Severity: CtWarning, }) } // Warningf logs and adds a trace event if channelz is on. -func Warningf(l grpclog.DepthLoggerV2, id *Identifier, format string, args ...any) { - AddTraceEvent(l, id, 1, &TraceEventDesc{ +func Warningf(l grpclog.DepthLoggerV2, e Entity, format string, args ...any) { + AddTraceEvent(l, e, 1, &TraceEvent{ Desc: fmt.Sprintf(format, args...), Severity: CtWarning, }) } // Error logs and adds a trace event if channelz is on. -func Error(l grpclog.DepthLoggerV2, id *Identifier, args ...any) { - AddTraceEvent(l, id, 1, &TraceEventDesc{ +func Error(l grpclog.DepthLoggerV2, e Entity, args ...any) { + AddTraceEvent(l, e, 1, &TraceEvent{ Desc: fmt.Sprint(args...), Severity: CtError, }) } // Errorf logs and adds a trace event if channelz is on. -func Errorf(l grpclog.DepthLoggerV2, id *Identifier, format string, args ...any) { - AddTraceEvent(l, id, 1, &TraceEventDesc{ +func Errorf(l grpclog.DepthLoggerV2, e Entity, format string, args ...any) { + AddTraceEvent(l, e, 1, &TraceEvent{ Desc: fmt.Sprintf(format, args...), Severity: CtError, }) diff --git a/vendor/google.golang.org/grpc/internal/channelz/server.go b/vendor/google.golang.org/grpc/internal/channelz/server.go new file mode 100644 index 000000000..cdfc49d6e --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/channelz/server.go @@ -0,0 +1,119 @@ +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package channelz + +import ( + "fmt" + "sync/atomic" +) + +// Server is the channelz representation of a server. +type Server struct { + Entity + ID int64 + RefName string + + ServerMetrics ServerMetrics + + closeCalled bool + sockets map[int64]string + listenSockets map[int64]string + cm *channelMap +} + +// ServerMetrics defines a struct containing metrics for servers. +type ServerMetrics struct { + // The number of incoming calls started on the server. + CallsStarted atomic.Int64 + // The number of incoming calls that have completed with an OK status. + CallsSucceeded atomic.Int64 + // The number of incoming calls that have a completed with a non-OK status. + CallsFailed atomic.Int64 + // The last time a call was started on the server. + LastCallStartedTimestamp atomic.Int64 +} + +// NewServerMetricsForTesting returns an initialized ServerMetrics. +func NewServerMetricsForTesting(started, succeeded, failed, timestamp int64) *ServerMetrics { + sm := &ServerMetrics{} + sm.CallsStarted.Store(started) + sm.CallsSucceeded.Store(succeeded) + sm.CallsFailed.Store(failed) + sm.LastCallStartedTimestamp.Store(timestamp) + return sm +} + +func (sm *ServerMetrics) CopyFrom(o *ServerMetrics) { + sm.CallsStarted.Store(o.CallsStarted.Load()) + sm.CallsSucceeded.Store(o.CallsSucceeded.Load()) + sm.CallsFailed.Store(o.CallsFailed.Load()) + sm.LastCallStartedTimestamp.Store(o.LastCallStartedTimestamp.Load()) +} + +// ListenSockets returns the listening sockets for s. +func (s *Server) ListenSockets() map[int64]string { + db.mu.RLock() + defer db.mu.RUnlock() + return copyMap(s.listenSockets) +} + +// String returns a printable description of s. +func (s *Server) String() string { + return fmt.Sprintf("Server #%d", s.ID) +} + +func (s *Server) id() int64 { + return s.ID +} + +func (s *Server) addChild(id int64, e entry) { + switch v := e.(type) { + case *Socket: + switch v.SocketType { + case SocketTypeNormal: + s.sockets[id] = v.RefName + case SocketTypeListen: + s.listenSockets[id] = v.RefName + } + default: + logger.Errorf("cannot add a child (id = %d) of type %T to a server", id, e) + } +} + +func (s *Server) deleteChild(id int64) { + delete(s.sockets, id) + delete(s.listenSockets, id) + s.deleteSelfIfReady() +} + +func (s *Server) triggerDelete() { + s.closeCalled = true + s.deleteSelfIfReady() +} + +func (s *Server) deleteSelfIfReady() { + if !s.closeCalled || len(s.sockets)+len(s.listenSockets) != 0 { + return + } + s.cm.deleteEntry(s.ID) +} + +func (s *Server) getParentID() int64 { + return 0 +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/socket.go b/vendor/google.golang.org/grpc/internal/channelz/socket.go new file mode 100644 index 000000000..fa64834b2 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/channelz/socket.go @@ -0,0 +1,130 @@ +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package channelz + +import ( + "fmt" + "net" + "sync/atomic" + + "google.golang.org/grpc/credentials" +) + +// SocketMetrics defines the struct that the implementor of Socket interface +// should return from ChannelzMetric(). +type SocketMetrics struct { + // The number of streams that have been started. + StreamsStarted atomic.Int64 + // The number of streams that have ended successfully: + // On client side, receiving frame with eos bit set. + // On server side, sending frame with eos bit set. + StreamsSucceeded atomic.Int64 + // The number of streams that have ended unsuccessfully: + // On client side, termination without receiving frame with eos bit set. + // On server side, termination without sending frame with eos bit set. + StreamsFailed atomic.Int64 + // The number of messages successfully sent on this socket. + MessagesSent atomic.Int64 + MessagesReceived atomic.Int64 + // The number of keep alives sent. This is typically implemented with HTTP/2 + // ping messages. + KeepAlivesSent atomic.Int64 + // The last time a stream was created by this endpoint. Usually unset for + // servers. + LastLocalStreamCreatedTimestamp atomic.Int64 + // The last time a stream was created by the remote endpoint. Usually unset + // for clients. + LastRemoteStreamCreatedTimestamp atomic.Int64 + // The last time a message was sent by this endpoint. + LastMessageSentTimestamp atomic.Int64 + // The last time a message was received by this endpoint. + LastMessageReceivedTimestamp atomic.Int64 +} + +// EphemeralSocketMetrics are metrics that change rapidly and are tracked +// outside of channelz. +type EphemeralSocketMetrics struct { + // The amount of window, granted to the local endpoint by the remote endpoint. + // This may be slightly out of date due to network latency. This does NOT + // include stream level or TCP level flow control info. + LocalFlowControlWindow int64 + // The amount of window, granted to the remote endpoint by the local endpoint. + // This may be slightly out of date due to network latency. This does NOT + // include stream level or TCP level flow control info. + RemoteFlowControlWindow int64 +} + +type SocketType string + +const ( + SocketTypeNormal = "NormalSocket" + SocketTypeListen = "ListenSocket" +) + +type Socket struct { + Entity + SocketType SocketType + ID int64 + Parent Entity + cm *channelMap + SocketMetrics SocketMetrics + EphemeralMetrics func() *EphemeralSocketMetrics + + RefName string + // The locally bound address. Immutable. + LocalAddr net.Addr + // The remote bound address. May be absent. Immutable. + RemoteAddr net.Addr + // Optional, represents the name of the remote endpoint, if different than + // the original target name. Immutable. + RemoteName string + // Immutable. + SocketOptions *SocketOptionData + // Immutable. + Security credentials.ChannelzSecurityValue +} + +func (ls *Socket) String() string { + return fmt.Sprintf("%s %s #%d", ls.Parent, ls.SocketType, ls.ID) +} + +func (ls *Socket) id() int64 { + return ls.ID +} + +func (ls *Socket) addChild(id int64, e entry) { + logger.Errorf("cannot add a child (id = %d) of type %T to a listen socket", id, e) +} + +func (ls *Socket) deleteChild(id int64) { + logger.Errorf("cannot delete a child (id = %d) from a listen socket", id) +} + +func (ls *Socket) triggerDelete() { + ls.cm.deleteEntry(ls.ID) + ls.Parent.(entry).deleteChild(ls.ID) +} + +func (ls *Socket) deleteSelfIfReady() { + logger.Errorf("cannot call deleteSelfIfReady on a listen socket") +} + +func (ls *Socket) getParentID() int64 { + return ls.Parent.id() +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/subchannel.go b/vendor/google.golang.org/grpc/internal/channelz/subchannel.go new file mode 100644 index 000000000..3b88e4cba --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/channelz/subchannel.go @@ -0,0 +1,151 @@ +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package channelz + +import ( + "fmt" + "sync/atomic" +) + +// SubChannel is the channelz representation of a subchannel. +type SubChannel struct { + Entity + // ID is the channelz id of this subchannel. + ID int64 + // RefName is the human readable reference string of this subchannel. + RefName string + closeCalled bool + sockets map[int64]string + parent *Channel + trace *ChannelTrace + traceRefCount int32 + + ChannelMetrics ChannelMetrics +} + +func (sc *SubChannel) String() string { + return fmt.Sprintf("%s SubChannel #%d", sc.parent, sc.ID) +} + +func (sc *SubChannel) id() int64 { + return sc.ID +} + +func (sc *SubChannel) Sockets() map[int64]string { + db.mu.RLock() + defer db.mu.RUnlock() + return copyMap(sc.sockets) +} + +func (sc *SubChannel) Trace() *ChannelTrace { + db.mu.RLock() + defer db.mu.RUnlock() + return sc.trace.copy() +} + +func (sc *SubChannel) addChild(id int64, e entry) { + if v, ok := e.(*Socket); ok && v.SocketType == SocketTypeNormal { + sc.sockets[id] = v.RefName + } else { + logger.Errorf("cannot add a child (id = %d) of type %T to a subChannel", id, e) + } +} + +func (sc *SubChannel) deleteChild(id int64) { + delete(sc.sockets, id) + sc.deleteSelfIfReady() +} + +func (sc *SubChannel) triggerDelete() { + sc.closeCalled = true + sc.deleteSelfIfReady() +} + +func (sc *SubChannel) getParentID() int64 { + return sc.parent.ID +} + +// deleteSelfFromTree tries to delete the subchannel from the channelz entry relation tree, which +// means deleting the subchannel reference from its parent's child list. +// +// In order for a subchannel to be deleted from the tree, it must meet the criteria that, removal of +// the corresponding grpc object has been invoked, and the subchannel does not have any children left. +// +// The returned boolean value indicates whether the channel has been successfully deleted from tree. +func (sc *SubChannel) deleteSelfFromTree() (deleted bool) { + if !sc.closeCalled || len(sc.sockets) != 0 { + return false + } + sc.parent.deleteChild(sc.ID) + return true +} + +// deleteSelfFromMap checks whether it is valid to delete the subchannel from the map, which means +// deleting the subchannel from channelz's tracking entirely. Users can no longer use id to query +// the subchannel, and its memory will be garbage collected. +// +// The trace reference count of the subchannel must be 0 in order to be deleted from the map. This is +// specified in the channel tracing gRFC that as long as some other trace has reference to an entity, +// the trace of the referenced entity must not be deleted. In order to release the resource allocated +// by grpc, the reference to the grpc object is reset to a dummy object. +// +// deleteSelfFromMap must be called after deleteSelfFromTree returns true. +// +// It returns a bool to indicate whether the channel can be safely deleted from map. +func (sc *SubChannel) deleteSelfFromMap() (delete bool) { + return sc.getTraceRefCount() == 0 +} + +// deleteSelfIfReady tries to delete the subchannel itself from the channelz database. +// The delete process includes two steps: +// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from +// its parent's child list. +// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup +// by id will return entry not found error. +func (sc *SubChannel) deleteSelfIfReady() { + if !sc.deleteSelfFromTree() { + return + } + if !sc.deleteSelfFromMap() { + return + } + db.deleteEntry(sc.ID) + sc.trace.clear() +} + +func (sc *SubChannel) getChannelTrace() *ChannelTrace { + return sc.trace +} + +func (sc *SubChannel) incrTraceRefCount() { + atomic.AddInt32(&sc.traceRefCount, 1) +} + +func (sc *SubChannel) decrTraceRefCount() { + atomic.AddInt32(&sc.traceRefCount, -1) +} + +func (sc *SubChannel) getTraceRefCount() int { + i := atomic.LoadInt32(&sc.traceRefCount) + return int(i) +} + +func (sc *SubChannel) getRefName() string { + return sc.RefName +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/types_linux.go b/vendor/google.golang.org/grpc/internal/channelz/syscall_linux.go similarity index 83% rename from vendor/google.golang.org/grpc/internal/channelz/types_linux.go rename to vendor/google.golang.org/grpc/internal/channelz/syscall_linux.go index 1b1c4cce3..5ac73ff83 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/types_linux.go +++ b/vendor/google.golang.org/grpc/internal/channelz/syscall_linux.go @@ -49,3 +49,17 @@ func (s *SocketOptionData) Getsockopt(fd uintptr) { s.TCPInfo = v } } + +// GetSocketOption gets the socket option info of the conn. +func GetSocketOption(socket any) *SocketOptionData { + c, ok := socket.(syscall.Conn) + if !ok { + return nil + } + data := &SocketOptionData{} + if rawConn, err := c.SyscallConn(); err == nil { + rawConn.Control(data.Getsockopt) + return data + } + return nil +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go b/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go similarity index 90% rename from vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go rename to vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go index 8b06eed1a..d1ed8df6a 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go +++ b/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go @@ -1,5 +1,4 @@ //go:build !linux -// +build !linux /* * @@ -41,3 +40,8 @@ func (s *SocketOptionData) Getsockopt(fd uintptr) { logger.Warning("Channelz: socket options are not supported on non-linux environments") }) } + +// GetSocketOption gets the socket option info of the conn. +func GetSocketOption(c any) *SocketOptionData { + return nil +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/trace.go b/vendor/google.golang.org/grpc/internal/channelz/trace.go new file mode 100644 index 000000000..36b867403 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/channelz/trace.go @@ -0,0 +1,204 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package channelz + +import ( + "fmt" + "sync" + "sync/atomic" + "time" + + "google.golang.org/grpc/grpclog" +) + +const ( + defaultMaxTraceEntry int32 = 30 +) + +var maxTraceEntry = defaultMaxTraceEntry + +// SetMaxTraceEntry sets maximum number of trace entries per entity (i.e. +// channel/subchannel). Setting it to 0 will disable channel tracing. +func SetMaxTraceEntry(i int32) { + atomic.StoreInt32(&maxTraceEntry, i) +} + +// ResetMaxTraceEntryToDefault resets the maximum number of trace entries per +// entity to default. +func ResetMaxTraceEntryToDefault() { + atomic.StoreInt32(&maxTraceEntry, defaultMaxTraceEntry) +} + +func getMaxTraceEntry() int { + i := atomic.LoadInt32(&maxTraceEntry) + return int(i) +} + +// traceEvent is an internal representation of a single trace event +type traceEvent struct { + // Desc is a simple description of the trace event. + Desc string + // Severity states the severity of this trace event. + Severity Severity + // Timestamp is the event time. + Timestamp time.Time + // RefID is the id of the entity that gets referenced in the event. RefID is 0 if no other entity is + // involved in this event. + // e.g. SubChannel (id: 4[]) Created. --> RefID = 4, RefName = "" (inside []) + RefID int64 + // RefName is the reference name for the entity that gets referenced in the event. + RefName string + // RefType indicates the referenced entity type, i.e Channel or SubChannel. + RefType RefChannelType +} + +// TraceEvent is what the caller of AddTraceEvent should provide to describe the +// event to be added to the channel trace. +// +// The Parent field is optional. It is used for an event that will be recorded +// in the entity's parent trace. +type TraceEvent struct { + Desc string + Severity Severity + Parent *TraceEvent +} + +type ChannelTrace struct { + cm *channelMap + clearCalled bool + CreationTime time.Time + EventNum int64 + mu sync.Mutex + Events []*traceEvent +} + +func (c *ChannelTrace) copy() *ChannelTrace { + return &ChannelTrace{ + CreationTime: c.CreationTime, + EventNum: c.EventNum, + Events: append(([]*traceEvent)(nil), c.Events...), + } +} + +func (c *ChannelTrace) append(e *traceEvent) { + c.mu.Lock() + if len(c.Events) == getMaxTraceEntry() { + del := c.Events[0] + c.Events = c.Events[1:] + if del.RefID != 0 { + // start recursive cleanup in a goroutine to not block the call originated from grpc. + go func() { + // need to acquire c.cm.mu lock to call the unlocked attemptCleanup func. + c.cm.mu.Lock() + c.cm.decrTraceRefCount(del.RefID) + c.cm.mu.Unlock() + }() + } + } + e.Timestamp = time.Now() + c.Events = append(c.Events, e) + c.EventNum++ + c.mu.Unlock() +} + +func (c *ChannelTrace) clear() { + if c.clearCalled { + return + } + c.clearCalled = true + c.mu.Lock() + for _, e := range c.Events { + if e.RefID != 0 { + // caller should have already held the c.cm.mu lock. + c.cm.decrTraceRefCount(e.RefID) + } + } + c.mu.Unlock() +} + +// Severity is the severity level of a trace event. +// The canonical enumeration of all valid values is here: +// https://github.com/grpc/grpc-proto/blob/9b13d199cc0d4703c7ea26c9c330ba695866eb23/grpc/channelz/v1/channelz.proto#L126. +type Severity int + +const ( + // CtUnknown indicates unknown severity of a trace event. + CtUnknown Severity = iota + // CtInfo indicates info level severity of a trace event. + CtInfo + // CtWarning indicates warning level severity of a trace event. + CtWarning + // CtError indicates error level severity of a trace event. + CtError +) + +// RefChannelType is the type of the entity being referenced in a trace event. +type RefChannelType int + +const ( + // RefUnknown indicates an unknown entity type, the zero value for this type. + RefUnknown RefChannelType = iota + // RefChannel indicates the referenced entity is a Channel. + RefChannel + // RefSubChannel indicates the referenced entity is a SubChannel. + RefSubChannel + // RefServer indicates the referenced entity is a Server. + RefServer + // RefListenSocket indicates the referenced entity is a ListenSocket. + RefListenSocket + // RefNormalSocket indicates the referenced entity is a NormalSocket. + RefNormalSocket +) + +var refChannelTypeToString = map[RefChannelType]string{ + RefUnknown: "Unknown", + RefChannel: "Channel", + RefSubChannel: "SubChannel", + RefServer: "Server", + RefListenSocket: "ListenSocket", + RefNormalSocket: "NormalSocket", +} + +func (r RefChannelType) String() string { + return refChannelTypeToString[r] +} + +// AddTraceEvent adds trace related to the entity with specified id, using the +// provided TraceEventDesc. +// +// If channelz is not turned ON, this will simply log the event descriptions. +func AddTraceEvent(l grpclog.DepthLoggerV2, e Entity, depth int, desc *TraceEvent) { + // Log only the trace description associated with the bottom most entity. + d := fmt.Sprintf("[%s]%s", e, desc.Desc) + switch desc.Severity { + case CtUnknown, CtInfo: + l.InfoDepth(depth+1, d) + case CtWarning: + l.WarningDepth(depth+1, d) + case CtError: + l.ErrorDepth(depth+1, d) + } + + if getMaxTraceEntry() == 0 { + return + } + if IsOn() { + db.traceEvent(e.id(), desc) + } +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/types.go b/vendor/google.golang.org/grpc/internal/channelz/types.go deleted file mode 100644 index 1d4020f53..000000000 --- a/vendor/google.golang.org/grpc/internal/channelz/types.go +++ /dev/null @@ -1,727 +0,0 @@ -/* - * - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package channelz - -import ( - "net" - "sync" - "sync/atomic" - "time" - - "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/credentials" -) - -// entry represents a node in the channelz database. -type entry interface { - // addChild adds a child e, whose channelz id is id to child list - addChild(id int64, e entry) - // deleteChild deletes a child with channelz id to be id from child list - deleteChild(id int64) - // triggerDelete tries to delete self from channelz database. However, if child - // list is not empty, then deletion from the database is on hold until the last - // child is deleted from database. - triggerDelete() - // deleteSelfIfReady check whether triggerDelete() has been called before, and whether child - // list is now empty. If both conditions are met, then delete self from database. - deleteSelfIfReady() - // getParentID returns parent ID of the entry. 0 value parent ID means no parent. - getParentID() int64 -} - -// dummyEntry is a fake entry to handle entry not found case. -type dummyEntry struct { - idNotFound int64 -} - -func (d *dummyEntry) addChild(id int64, e entry) { - // Note: It is possible for a normal program to reach here under race condition. - // For example, there could be a race between ClientConn.Close() info being propagated - // to addrConn and http2Client. ClientConn.Close() cancel the context and result - // in http2Client to error. The error info is then caught by transport monitor - // and before addrConn.tearDown() is called in side ClientConn.Close(). Therefore, - // the addrConn will create a new transport. And when registering the new transport in - // channelz, its parent addrConn could have already been torn down and deleted - // from channelz tracking, and thus reach the code here. - logger.Infof("attempt to add child of type %T with id %d to a parent (id=%d) that doesn't currently exist", e, id, d.idNotFound) -} - -func (d *dummyEntry) deleteChild(id int64) { - // It is possible for a normal program to reach here under race condition. - // Refer to the example described in addChild(). - logger.Infof("attempt to delete child with id %d from a parent (id=%d) that doesn't currently exist", id, d.idNotFound) -} - -func (d *dummyEntry) triggerDelete() { - logger.Warningf("attempt to delete an entry (id=%d) that doesn't currently exist", d.idNotFound) -} - -func (*dummyEntry) deleteSelfIfReady() { - // code should not reach here. deleteSelfIfReady is always called on an existing entry. -} - -func (*dummyEntry) getParentID() int64 { - return 0 -} - -// ChannelMetric defines the info channelz provides for a specific Channel, which -// includes ChannelInternalMetric and channelz-specific data, such as channelz id, -// child list, etc. -type ChannelMetric struct { - // ID is the channelz id of this channel. - ID int64 - // RefName is the human readable reference string of this channel. - RefName string - // ChannelData contains channel internal metric reported by the channel through - // ChannelzMetric(). - ChannelData *ChannelInternalMetric - // NestedChans tracks the nested channel type children of this channel in the format of - // a map from nested channel channelz id to corresponding reference string. - NestedChans map[int64]string - // SubChans tracks the subchannel type children of this channel in the format of a - // map from subchannel channelz id to corresponding reference string. - SubChans map[int64]string - // Sockets tracks the socket type children of this channel in the format of a map - // from socket channelz id to corresponding reference string. - // Note current grpc implementation doesn't allow channel having sockets directly, - // therefore, this is field is unused. - Sockets map[int64]string - // Trace contains the most recent traced events. - Trace *ChannelTrace -} - -// SubChannelMetric defines the info channelz provides for a specific SubChannel, -// which includes ChannelInternalMetric and channelz-specific data, such as -// channelz id, child list, etc. -type SubChannelMetric struct { - // ID is the channelz id of this subchannel. - ID int64 - // RefName is the human readable reference string of this subchannel. - RefName string - // ChannelData contains subchannel internal metric reported by the subchannel - // through ChannelzMetric(). - ChannelData *ChannelInternalMetric - // NestedChans tracks the nested channel type children of this subchannel in the format of - // a map from nested channel channelz id to corresponding reference string. - // Note current grpc implementation doesn't allow subchannel to have nested channels - // as children, therefore, this field is unused. - NestedChans map[int64]string - // SubChans tracks the subchannel type children of this subchannel in the format of a - // map from subchannel channelz id to corresponding reference string. - // Note current grpc implementation doesn't allow subchannel to have subchannels - // as children, therefore, this field is unused. - SubChans map[int64]string - // Sockets tracks the socket type children of this subchannel in the format of a map - // from socket channelz id to corresponding reference string. - Sockets map[int64]string - // Trace contains the most recent traced events. - Trace *ChannelTrace -} - -// ChannelInternalMetric defines the struct that the implementor of Channel interface -// should return from ChannelzMetric(). -type ChannelInternalMetric struct { - // current connectivity state of the channel. - State connectivity.State - // The target this channel originally tried to connect to. May be absent - Target string - // The number of calls started on the channel. - CallsStarted int64 - // The number of calls that have completed with an OK status. - CallsSucceeded int64 - // The number of calls that have a completed with a non-OK status. - CallsFailed int64 - // The last time a call was started on the channel. - LastCallStartedTimestamp time.Time -} - -// ChannelTrace stores traced events on a channel/subchannel and related info. -type ChannelTrace struct { - // EventNum is the number of events that ever got traced (i.e. including those that have been deleted) - EventNum int64 - // CreationTime is the creation time of the trace. - CreationTime time.Time - // Events stores the most recent trace events (up to $maxTraceEntry, newer event will overwrite the - // oldest one) - Events []*TraceEvent -} - -// TraceEvent represent a single trace event -type TraceEvent struct { - // Desc is a simple description of the trace event. - Desc string - // Severity states the severity of this trace event. - Severity Severity - // Timestamp is the event time. - Timestamp time.Time - // RefID is the id of the entity that gets referenced in the event. RefID is 0 if no other entity is - // involved in this event. - // e.g. SubChannel (id: 4[]) Created. --> RefID = 4, RefName = "" (inside []) - RefID int64 - // RefName is the reference name for the entity that gets referenced in the event. - RefName string - // RefType indicates the referenced entity type, i.e Channel or SubChannel. - RefType RefChannelType -} - -// Channel is the interface that should be satisfied in order to be tracked by -// channelz as Channel or SubChannel. -type Channel interface { - ChannelzMetric() *ChannelInternalMetric -} - -type dummyChannel struct{} - -func (d *dummyChannel) ChannelzMetric() *ChannelInternalMetric { - return &ChannelInternalMetric{} -} - -type channel struct { - refName string - c Channel - closeCalled bool - nestedChans map[int64]string - subChans map[int64]string - id int64 - pid int64 - cm *channelMap - trace *channelTrace - // traceRefCount is the number of trace events that reference this channel. - // Non-zero traceRefCount means the trace of this channel cannot be deleted. - traceRefCount int32 -} - -func (c *channel) addChild(id int64, e entry) { - switch v := e.(type) { - case *subChannel: - c.subChans[id] = v.refName - case *channel: - c.nestedChans[id] = v.refName - default: - logger.Errorf("cannot add a child (id = %d) of type %T to a channel", id, e) - } -} - -func (c *channel) deleteChild(id int64) { - delete(c.subChans, id) - delete(c.nestedChans, id) - c.deleteSelfIfReady() -} - -func (c *channel) triggerDelete() { - c.closeCalled = true - c.deleteSelfIfReady() -} - -func (c *channel) getParentID() int64 { - return c.pid -} - -// deleteSelfFromTree tries to delete the channel from the channelz entry relation tree, which means -// deleting the channel reference from its parent's child list. -// -// In order for a channel to be deleted from the tree, it must meet the criteria that, removal of the -// corresponding grpc object has been invoked, and the channel does not have any children left. -// -// The returned boolean value indicates whether the channel has been successfully deleted from tree. -func (c *channel) deleteSelfFromTree() (deleted bool) { - if !c.closeCalled || len(c.subChans)+len(c.nestedChans) != 0 { - return false - } - // not top channel - if c.pid != 0 { - c.cm.findEntry(c.pid).deleteChild(c.id) - } - return true -} - -// deleteSelfFromMap checks whether it is valid to delete the channel from the map, which means -// deleting the channel from channelz's tracking entirely. Users can no longer use id to query the -// channel, and its memory will be garbage collected. -// -// The trace reference count of the channel must be 0 in order to be deleted from the map. This is -// specified in the channel tracing gRFC that as long as some other trace has reference to an entity, -// the trace of the referenced entity must not be deleted. In order to release the resource allocated -// by grpc, the reference to the grpc object is reset to a dummy object. -// -// deleteSelfFromMap must be called after deleteSelfFromTree returns true. -// -// It returns a bool to indicate whether the channel can be safely deleted from map. -func (c *channel) deleteSelfFromMap() (delete bool) { - if c.getTraceRefCount() != 0 { - c.c = &dummyChannel{} - return false - } - return true -} - -// deleteSelfIfReady tries to delete the channel itself from the channelz database. -// The delete process includes two steps: -// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its -// parent's child list. -// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id -// will return entry not found error. -func (c *channel) deleteSelfIfReady() { - if !c.deleteSelfFromTree() { - return - } - if !c.deleteSelfFromMap() { - return - } - c.cm.deleteEntry(c.id) - c.trace.clear() -} - -func (c *channel) getChannelTrace() *channelTrace { - return c.trace -} - -func (c *channel) incrTraceRefCount() { - atomic.AddInt32(&c.traceRefCount, 1) -} - -func (c *channel) decrTraceRefCount() { - atomic.AddInt32(&c.traceRefCount, -1) -} - -func (c *channel) getTraceRefCount() int { - i := atomic.LoadInt32(&c.traceRefCount) - return int(i) -} - -func (c *channel) getRefName() string { - return c.refName -} - -type subChannel struct { - refName string - c Channel - closeCalled bool - sockets map[int64]string - id int64 - pid int64 - cm *channelMap - trace *channelTrace - traceRefCount int32 -} - -func (sc *subChannel) addChild(id int64, e entry) { - if v, ok := e.(*normalSocket); ok { - sc.sockets[id] = v.refName - } else { - logger.Errorf("cannot add a child (id = %d) of type %T to a subChannel", id, e) - } -} - -func (sc *subChannel) deleteChild(id int64) { - delete(sc.sockets, id) - sc.deleteSelfIfReady() -} - -func (sc *subChannel) triggerDelete() { - sc.closeCalled = true - sc.deleteSelfIfReady() -} - -func (sc *subChannel) getParentID() int64 { - return sc.pid -} - -// deleteSelfFromTree tries to delete the subchannel from the channelz entry relation tree, which -// means deleting the subchannel reference from its parent's child list. -// -// In order for a subchannel to be deleted from the tree, it must meet the criteria that, removal of -// the corresponding grpc object has been invoked, and the subchannel does not have any children left. -// -// The returned boolean value indicates whether the channel has been successfully deleted from tree. -func (sc *subChannel) deleteSelfFromTree() (deleted bool) { - if !sc.closeCalled || len(sc.sockets) != 0 { - return false - } - sc.cm.findEntry(sc.pid).deleteChild(sc.id) - return true -} - -// deleteSelfFromMap checks whether it is valid to delete the subchannel from the map, which means -// deleting the subchannel from channelz's tracking entirely. Users can no longer use id to query -// the subchannel, and its memory will be garbage collected. -// -// The trace reference count of the subchannel must be 0 in order to be deleted from the map. This is -// specified in the channel tracing gRFC that as long as some other trace has reference to an entity, -// the trace of the referenced entity must not be deleted. In order to release the resource allocated -// by grpc, the reference to the grpc object is reset to a dummy object. -// -// deleteSelfFromMap must be called after deleteSelfFromTree returns true. -// -// It returns a bool to indicate whether the channel can be safely deleted from map. -func (sc *subChannel) deleteSelfFromMap() (delete bool) { - if sc.getTraceRefCount() != 0 { - // free the grpc struct (i.e. addrConn) - sc.c = &dummyChannel{} - return false - } - return true -} - -// deleteSelfIfReady tries to delete the subchannel itself from the channelz database. -// The delete process includes two steps: -// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from -// its parent's child list. -// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup -// by id will return entry not found error. -func (sc *subChannel) deleteSelfIfReady() { - if !sc.deleteSelfFromTree() { - return - } - if !sc.deleteSelfFromMap() { - return - } - sc.cm.deleteEntry(sc.id) - sc.trace.clear() -} - -func (sc *subChannel) getChannelTrace() *channelTrace { - return sc.trace -} - -func (sc *subChannel) incrTraceRefCount() { - atomic.AddInt32(&sc.traceRefCount, 1) -} - -func (sc *subChannel) decrTraceRefCount() { - atomic.AddInt32(&sc.traceRefCount, -1) -} - -func (sc *subChannel) getTraceRefCount() int { - i := atomic.LoadInt32(&sc.traceRefCount) - return int(i) -} - -func (sc *subChannel) getRefName() string { - return sc.refName -} - -// SocketMetric defines the info channelz provides for a specific Socket, which -// includes SocketInternalMetric and channelz-specific data, such as channelz id, etc. -type SocketMetric struct { - // ID is the channelz id of this socket. - ID int64 - // RefName is the human readable reference string of this socket. - RefName string - // SocketData contains socket internal metric reported by the socket through - // ChannelzMetric(). - SocketData *SocketInternalMetric -} - -// SocketInternalMetric defines the struct that the implementor of Socket interface -// should return from ChannelzMetric(). -type SocketInternalMetric struct { - // The number of streams that have been started. - StreamsStarted int64 - // The number of streams that have ended successfully: - // On client side, receiving frame with eos bit set. - // On server side, sending frame with eos bit set. - StreamsSucceeded int64 - // The number of streams that have ended unsuccessfully: - // On client side, termination without receiving frame with eos bit set. - // On server side, termination without sending frame with eos bit set. - StreamsFailed int64 - // The number of messages successfully sent on this socket. - MessagesSent int64 - MessagesReceived int64 - // The number of keep alives sent. This is typically implemented with HTTP/2 - // ping messages. - KeepAlivesSent int64 - // The last time a stream was created by this endpoint. Usually unset for - // servers. - LastLocalStreamCreatedTimestamp time.Time - // The last time a stream was created by the remote endpoint. Usually unset - // for clients. - LastRemoteStreamCreatedTimestamp time.Time - // The last time a message was sent by this endpoint. - LastMessageSentTimestamp time.Time - // The last time a message was received by this endpoint. - LastMessageReceivedTimestamp time.Time - // The amount of window, granted to the local endpoint by the remote endpoint. - // This may be slightly out of date due to network latency. This does NOT - // include stream level or TCP level flow control info. - LocalFlowControlWindow int64 - // The amount of window, granted to the remote endpoint by the local endpoint. - // This may be slightly out of date due to network latency. This does NOT - // include stream level or TCP level flow control info. - RemoteFlowControlWindow int64 - // The locally bound address. - LocalAddr net.Addr - // The remote bound address. May be absent. - RemoteAddr net.Addr - // Optional, represents the name of the remote endpoint, if different than - // the original target name. - RemoteName string - SocketOptions *SocketOptionData - Security credentials.ChannelzSecurityValue -} - -// Socket is the interface that should be satisfied in order to be tracked by -// channelz as Socket. -type Socket interface { - ChannelzMetric() *SocketInternalMetric -} - -type listenSocket struct { - refName string - s Socket - id int64 - pid int64 - cm *channelMap -} - -func (ls *listenSocket) addChild(id int64, e entry) { - logger.Errorf("cannot add a child (id = %d) of type %T to a listen socket", id, e) -} - -func (ls *listenSocket) deleteChild(id int64) { - logger.Errorf("cannot delete a child (id = %d) from a listen socket", id) -} - -func (ls *listenSocket) triggerDelete() { - ls.cm.deleteEntry(ls.id) - ls.cm.findEntry(ls.pid).deleteChild(ls.id) -} - -func (ls *listenSocket) deleteSelfIfReady() { - logger.Errorf("cannot call deleteSelfIfReady on a listen socket") -} - -func (ls *listenSocket) getParentID() int64 { - return ls.pid -} - -type normalSocket struct { - refName string - s Socket - id int64 - pid int64 - cm *channelMap -} - -func (ns *normalSocket) addChild(id int64, e entry) { - logger.Errorf("cannot add a child (id = %d) of type %T to a normal socket", id, e) -} - -func (ns *normalSocket) deleteChild(id int64) { - logger.Errorf("cannot delete a child (id = %d) from a normal socket", id) -} - -func (ns *normalSocket) triggerDelete() { - ns.cm.deleteEntry(ns.id) - ns.cm.findEntry(ns.pid).deleteChild(ns.id) -} - -func (ns *normalSocket) deleteSelfIfReady() { - logger.Errorf("cannot call deleteSelfIfReady on a normal socket") -} - -func (ns *normalSocket) getParentID() int64 { - return ns.pid -} - -// ServerMetric defines the info channelz provides for a specific Server, which -// includes ServerInternalMetric and channelz-specific data, such as channelz id, -// child list, etc. -type ServerMetric struct { - // ID is the channelz id of this server. - ID int64 - // RefName is the human readable reference string of this server. - RefName string - // ServerData contains server internal metric reported by the server through - // ChannelzMetric(). - ServerData *ServerInternalMetric - // ListenSockets tracks the listener socket type children of this server in the - // format of a map from socket channelz id to corresponding reference string. - ListenSockets map[int64]string -} - -// ServerInternalMetric defines the struct that the implementor of Server interface -// should return from ChannelzMetric(). -type ServerInternalMetric struct { - // The number of incoming calls started on the server. - CallsStarted int64 - // The number of incoming calls that have completed with an OK status. - CallsSucceeded int64 - // The number of incoming calls that have a completed with a non-OK status. - CallsFailed int64 - // The last time a call was started on the server. - LastCallStartedTimestamp time.Time -} - -// Server is the interface to be satisfied in order to be tracked by channelz as -// Server. -type Server interface { - ChannelzMetric() *ServerInternalMetric -} - -type server struct { - refName string - s Server - closeCalled bool - sockets map[int64]string - listenSockets map[int64]string - id int64 - cm *channelMap -} - -func (s *server) addChild(id int64, e entry) { - switch v := e.(type) { - case *normalSocket: - s.sockets[id] = v.refName - case *listenSocket: - s.listenSockets[id] = v.refName - default: - logger.Errorf("cannot add a child (id = %d) of type %T to a server", id, e) - } -} - -func (s *server) deleteChild(id int64) { - delete(s.sockets, id) - delete(s.listenSockets, id) - s.deleteSelfIfReady() -} - -func (s *server) triggerDelete() { - s.closeCalled = true - s.deleteSelfIfReady() -} - -func (s *server) deleteSelfIfReady() { - if !s.closeCalled || len(s.sockets)+len(s.listenSockets) != 0 { - return - } - s.cm.deleteEntry(s.id) -} - -func (s *server) getParentID() int64 { - return 0 -} - -type tracedChannel interface { - getChannelTrace() *channelTrace - incrTraceRefCount() - decrTraceRefCount() - getRefName() string -} - -type channelTrace struct { - cm *channelMap - clearCalled bool - createdTime time.Time - eventCount int64 - mu sync.Mutex - events []*TraceEvent -} - -func (c *channelTrace) append(e *TraceEvent) { - c.mu.Lock() - if len(c.events) == getMaxTraceEntry() { - del := c.events[0] - c.events = c.events[1:] - if del.RefID != 0 { - // start recursive cleanup in a goroutine to not block the call originated from grpc. - go func() { - // need to acquire c.cm.mu lock to call the unlocked attemptCleanup func. - c.cm.mu.Lock() - c.cm.decrTraceRefCount(del.RefID) - c.cm.mu.Unlock() - }() - } - } - e.Timestamp = time.Now() - c.events = append(c.events, e) - c.eventCount++ - c.mu.Unlock() -} - -func (c *channelTrace) clear() { - if c.clearCalled { - return - } - c.clearCalled = true - c.mu.Lock() - for _, e := range c.events { - if e.RefID != 0 { - // caller should have already held the c.cm.mu lock. - c.cm.decrTraceRefCount(e.RefID) - } - } - c.mu.Unlock() -} - -// Severity is the severity level of a trace event. -// The canonical enumeration of all valid values is here: -// https://github.com/grpc/grpc-proto/blob/9b13d199cc0d4703c7ea26c9c330ba695866eb23/grpc/channelz/v1/channelz.proto#L126. -type Severity int - -const ( - // CtUnknown indicates unknown severity of a trace event. - CtUnknown Severity = iota - // CtInfo indicates info level severity of a trace event. - CtInfo - // CtWarning indicates warning level severity of a trace event. - CtWarning - // CtError indicates error level severity of a trace event. - CtError -) - -// RefChannelType is the type of the entity being referenced in a trace event. -type RefChannelType int - -const ( - // RefUnknown indicates an unknown entity type, the zero value for this type. - RefUnknown RefChannelType = iota - // RefChannel indicates the referenced entity is a Channel. - RefChannel - // RefSubChannel indicates the referenced entity is a SubChannel. - RefSubChannel - // RefServer indicates the referenced entity is a Server. - RefServer - // RefListenSocket indicates the referenced entity is a ListenSocket. - RefListenSocket - // RefNormalSocket indicates the referenced entity is a NormalSocket. - RefNormalSocket -) - -var refChannelTypeToString = map[RefChannelType]string{ - RefUnknown: "Unknown", - RefChannel: "Channel", - RefSubChannel: "SubChannel", - RefServer: "Server", - RefListenSocket: "ListenSocket", - RefNormalSocket: "NormalSocket", -} - -func (r RefChannelType) String() string { - return refChannelTypeToString[r] -} - -func (c *channelTrace) dumpData() *ChannelTrace { - c.mu.Lock() - ct := &ChannelTrace{EventNum: c.eventCount, CreationTime: c.createdTime} - ct.Events = c.events[:len(c.events)] - c.mu.Unlock() - return ct -} diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 3cf10ddfb..d90648713 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -28,17 +28,11 @@ import ( var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). TXTErrIgnore = boolFromEnv("GRPC_GO_IGNORE_TXT_ERRORS", true) - // AdvertiseCompressors is set if registered compressor should be advertised - // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). - AdvertiseCompressors = boolFromEnv("GRPC_GO_ADVERTISE_COMPRESSORS", true) // RingHashCap indicates the maximum ring size which defaults to 4096 // entries but may be overridden by setting the environment variable // "GRPC_RING_HASH_CAP". This does not override the default bounds // checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M). RingHashCap = uint64FromEnv("GRPC_RING_HASH_CAP", 4096, 1, 8*1024*1024) - // PickFirstLBConfig is set if we should support configuration of the - // pick_first LB policy. - PickFirstLBConfig = boolFromEnv("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG", true) // LeastRequestLB is set if we should support the least_request_experimental // LB policy, which can be enabled by setting the environment variable // "GRPC_EXPERIMENTAL_ENABLE_LEAST_REQUEST" to "true". @@ -46,6 +40,12 @@ var ( // ALTSMaxConcurrentHandshakes is the maximum number of concurrent ALTS // handshakes that can be performed. ALTSMaxConcurrentHandshakes = uint64FromEnv("GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES", 100, 1, 100) + // EnforceALPNEnabled is set if TLS connections to servers with ALPN disabled + // should be rejected. The HTTP/2 protocol requires ALPN to be enabled, this + // option is present for backward compatibility. This option may be overridden + // by setting the environment variable "GRPC_ENFORCE_ALPN_ENABLED" to "true" + // or "false". + EnforceALPNEnabled = boolFromEnv("GRPC_ENFORCE_ALPN_ENABLED", false) ) func boolFromEnv(envVar string, def bool) bool { diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go index 02b4b6a1c..29f234acb 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go @@ -50,46 +50,7 @@ var ( // // When both bootstrap FileName and FileContent are set, FileName is used. XDSBootstrapFileContent = os.Getenv(XDSBootstrapFileContentEnv) - // XDSRingHash indicates whether ring hash support is enabled, which can be - // disabled by setting the environment variable - // "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" to "false". - XDSRingHash = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH", true) - // XDSClientSideSecurity is used to control processing of security - // configuration on the client-side. - // - // Note that there is no env var protection for the server-side because we - // have a brand new API on the server-side and users explicitly need to use - // the new API to get security integration on the server. - XDSClientSideSecurity = boolFromEnv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT", true) - // XDSAggregateAndDNS indicates whether processing of aggregated cluster and - // DNS cluster is enabled, which can be disabled by setting the environment - // variable "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" - // to "false". - XDSAggregateAndDNS = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER", true) - - // XDSRBAC indicates whether xDS configured RBAC HTTP Filter is enabled, - // which can be disabled by setting the environment variable - // "GRPC_XDS_EXPERIMENTAL_RBAC" to "false". - XDSRBAC = boolFromEnv("GRPC_XDS_EXPERIMENTAL_RBAC", true) - // XDSOutlierDetection indicates whether outlier detection support is - // enabled, which can be disabled by setting the environment variable - // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "false". - XDSOutlierDetection = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION", true) - // XDSFederation indicates whether federation support is enabled, which can - // be enabled by setting the environment variable - // "GRPC_EXPERIMENTAL_XDS_FEDERATION" to "true". - XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", true) - - // XDSRLS indicates whether processing of Cluster Specifier plugins and - // support for the RLS CLuster Specifier is enabled, which can be disabled by - // setting the environment variable "GRPC_EXPERIMENTAL_XDS_RLS_LB" to - // "false". - XDSRLS = boolFromEnv("GRPC_EXPERIMENTAL_XDS_RLS_LB", true) // C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing. C2PResolverTestOnlyTrafficDirectorURI = os.Getenv("GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI") - // XDSCustomLBPolicy indicates whether Custom LB Policies are enabled, which - // can be disabled by setting the environment variable - // "GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG" to "false". - XDSCustomLBPolicy = boolFromEnv("GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG", true) ) diff --git a/vendor/google.golang.org/grpc/internal/experimental.go b/vendor/google.golang.org/grpc/internal/experimental.go new file mode 100644 index 000000000..7f7044e17 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/experimental.go @@ -0,0 +1,28 @@ +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package internal + +var ( + // WithRecvBufferPool is implemented by the grpc package and returns a dial + // option to configure a shared buffer pool for a grpc.ClientConn. + WithRecvBufferPool any // func (grpc.SharedBufferPool) grpc.DialOption + + // RecvBufferPool is implemented by the grpc package and returns a server + // option to configure a shared buffer pool for a grpc.Server. + RecvBufferPool any // func (grpc.SharedBufferPool) grpc.ServerOption +) diff --git a/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go b/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go deleted file mode 100644 index aa97273e7..000000000 --- a/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go +++ /dev/null @@ -1,95 +0,0 @@ -/* - * - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// Package grpcrand implements math/rand functions in a concurrent-safe way -// with a global random source, independent of math/rand's global source. -package grpcrand - -import ( - "math/rand" - "sync" - "time" -) - -var ( - r = rand.New(rand.NewSource(time.Now().UnixNano())) - mu sync.Mutex -) - -// Int implements rand.Int on the grpcrand global source. -func Int() int { - mu.Lock() - defer mu.Unlock() - return r.Int() -} - -// Int63n implements rand.Int63n on the grpcrand global source. -func Int63n(n int64) int64 { - mu.Lock() - defer mu.Unlock() - return r.Int63n(n) -} - -// Intn implements rand.Intn on the grpcrand global source. -func Intn(n int) int { - mu.Lock() - defer mu.Unlock() - return r.Intn(n) -} - -// Int31n implements rand.Int31n on the grpcrand global source. -func Int31n(n int32) int32 { - mu.Lock() - defer mu.Unlock() - return r.Int31n(n) -} - -// Float64 implements rand.Float64 on the grpcrand global source. -func Float64() float64 { - mu.Lock() - defer mu.Unlock() - return r.Float64() -} - -// Uint64 implements rand.Uint64 on the grpcrand global source. -func Uint64() uint64 { - mu.Lock() - defer mu.Unlock() - return r.Uint64() -} - -// Uint32 implements rand.Uint32 on the grpcrand global source. -func Uint32() uint32 { - mu.Lock() - defer mu.Unlock() - return r.Uint32() -} - -// ExpFloat64 implements rand.ExpFloat64 on the grpcrand global source. -func ExpFloat64() float64 { - mu.Lock() - defer mu.Unlock() - return r.ExpFloat64() -} - -// Shuffle implements rand.Shuffle on the grpcrand global source. -var Shuffle = func(n int, f func(int, int)) { - mu.Lock() - defer mu.Unlock() - r.Shuffle(n, f) -} diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go index 900917dbe..f7f40a16a 100644 --- a/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go +++ b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go @@ -20,7 +20,6 @@ package grpcsync import ( "context" - "sync" "google.golang.org/grpc/internal/buffer" ) @@ -38,8 +37,6 @@ type CallbackSerializer struct { done chan struct{} callbacks *buffer.Unbounded - closedMu sync.Mutex - closed bool } // NewCallbackSerializer returns a new CallbackSerializer instance. The provided @@ -65,56 +62,34 @@ func NewCallbackSerializer(ctx context.Context) *CallbackSerializer { // callbacks to be executed by the serializer. It is not possible to add // callbacks once the context passed to NewCallbackSerializer is cancelled. func (cs *CallbackSerializer) Schedule(f func(ctx context.Context)) bool { - cs.closedMu.Lock() - defer cs.closedMu.Unlock() - - if cs.closed { - return false - } - cs.callbacks.Put(f) - return true + return cs.callbacks.Put(f) == nil } func (cs *CallbackSerializer) run(ctx context.Context) { - var backlog []func(context.Context) - defer close(cs.done) + + // TODO: when Go 1.21 is the oldest supported version, this loop and Close + // can be replaced with: + // + // context.AfterFunc(ctx, cs.callbacks.Close) for ctx.Err() == nil { select { case <-ctx.Done(): // Do nothing here. Next iteration of the for loop will not happen, // since ctx.Err() would be non-nil. - case callback, ok := <-cs.callbacks.Get(): - if !ok { - return - } + case cb := <-cs.callbacks.Get(): cs.callbacks.Load() - callback.(func(ctx context.Context))(ctx) + cb.(func(context.Context))(ctx) } } - // Fetch pending callbacks if any, and execute them before returning from - // this method and closing cs.done. - cs.closedMu.Lock() - cs.closed = true - backlog = cs.fetchPendingCallbacks() + // Close the buffer to prevent new callbacks from being added. cs.callbacks.Close() - cs.closedMu.Unlock() - for _, b := range backlog { - b(ctx) - } -} -func (cs *CallbackSerializer) fetchPendingCallbacks() []func(context.Context) { - var backlog []func(context.Context) - for { - select { - case b := <-cs.callbacks.Get(): - backlog = append(backlog, b.(func(context.Context))) - cs.callbacks.Load() - default: - return backlog - } + // Run all pending callbacks. + for cb := range cs.callbacks.Get() { + cs.callbacks.Load() + cb.(func(context.Context))(ctx) } } diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go index 9f4090967..e8d866984 100644 --- a/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go +++ b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go @@ -20,8 +20,6 @@ package grpcutil import ( "strings" - - "google.golang.org/grpc/internal/envconfig" ) // RegisteredCompressorNames holds names of the registered compressors. @@ -40,8 +38,5 @@ func IsCompressorNameRegistered(name string) bool { // RegisteredCompressors returns a string of registered compressor names // separated by comma. func RegisteredCompressors() string { - if !envconfig.AdvertiseCompressors { - return "" - } return strings.Join(RegisteredCompressorNames, ",") } diff --git a/vendor/google.golang.org/grpc/internal/idle/idle.go b/vendor/google.golang.org/grpc/internal/idle/idle.go index 6c272476e..fe49cb74c 100644 --- a/vendor/google.golang.org/grpc/internal/idle/idle.go +++ b/vendor/google.golang.org/grpc/internal/idle/idle.go @@ -26,8 +26,6 @@ import ( "sync" "sync/atomic" "time" - - "google.golang.org/grpc/grpclog" ) // For overriding in unit tests. @@ -39,27 +37,12 @@ var timeAfterFunc = func(d time.Duration, f func()) *time.Timer { // and exit from idle mode. type Enforcer interface { ExitIdleMode() error - EnterIdleMode() error -} - -// Manager defines the functionality required to track RPC activity on a -// channel. -type Manager interface { - OnCallBegin() error - OnCallEnd() - Close() + EnterIdleMode() } -type noopManager struct{} - -func (noopManager) OnCallBegin() error { return nil } -func (noopManager) OnCallEnd() {} -func (noopManager) Close() {} - -// manager implements the Manager interface. It uses atomic operations to -// synchronize access to shared state and a mutex to guarantee mutual exclusion -// in a critical section. -type manager struct { +// Manager implements idleness detection and calls the configured Enforcer to +// enter/exit idle mode when appropriate. Must be created by NewManager. +type Manager struct { // State accessed atomically. lastCallEndTime int64 // Unix timestamp in nanos; time when the most recent RPC completed. activeCallsCount int32 // Count of active RPCs; -math.MaxInt32 means channel is idle or is trying to get there. @@ -69,8 +52,7 @@ type manager struct { // Can be accessed without atomics or mutex since these are set at creation // time and read-only after that. enforcer Enforcer // Functionality provided by grpc.ClientConn. - timeout int64 // Idle timeout duration nanos stored as an int64. - logger grpclog.LoggerV2 + timeout time.Duration // idleMu is used to guarantee mutual exclusion in two scenarios: // - Opposing intentions: @@ -88,57 +70,48 @@ type manager struct { timer *time.Timer } -// ManagerOptions is a collection of options used by -// NewManager. -type ManagerOptions struct { - Enforcer Enforcer - Timeout time.Duration - Logger grpclog.LoggerV2 +// NewManager creates a new idleness manager implementation for the +// given idle timeout. It begins in idle mode. +func NewManager(enforcer Enforcer, timeout time.Duration) *Manager { + return &Manager{ + enforcer: enforcer, + timeout: timeout, + actuallyIdle: true, + activeCallsCount: -math.MaxInt32, + } } -// NewManager creates a new idleness manager implementation for the -// given idle timeout. -func NewManager(opts ManagerOptions) Manager { - if opts.Timeout == 0 { - return noopManager{} +// resetIdleTimerLocked resets the idle timer to the given duration. Called +// when exiting idle mode or when the timer fires and we need to reset it. +func (m *Manager) resetIdleTimerLocked(d time.Duration) { + if m.isClosed() || m.timeout == 0 || m.actuallyIdle { + return } - m := &manager{ - enforcer: opts.Enforcer, - timeout: int64(opts.Timeout), - logger: opts.Logger, + // It is safe to ignore the return value from Reset() because this method is + // only ever called from the timer callback or when exiting idle mode. + if m.timer != nil { + m.timer.Stop() } - m.timer = timeAfterFunc(opts.Timeout, m.handleIdleTimeout) - return m + m.timer = timeAfterFunc(d, m.handleIdleTimeout) } -// resetIdleTimer resets the idle timer to the given duration. This method -// should only be called from the timer callback. -func (m *manager) resetIdleTimer(d time.Duration) { +func (m *Manager) resetIdleTimer(d time.Duration) { m.idleMu.Lock() defer m.idleMu.Unlock() - - if m.timer == nil { - // Only close sets timer to nil. We are done. - return - } - - // It is safe to ignore the return value from Reset() because this method is - // only ever called from the timer callback, which means the timer has - // already fired. - m.timer.Reset(d) + m.resetIdleTimerLocked(d) } // handleIdleTimeout is the timer callback that is invoked upon expiry of the // configured idle timeout. The channel is considered inactive if there are no // ongoing calls and no RPC activity since the last time the timer fired. -func (m *manager) handleIdleTimeout() { +func (m *Manager) handleIdleTimeout() { if m.isClosed() { return } if atomic.LoadInt32(&m.activeCallsCount) > 0 { - m.resetIdleTimer(time.Duration(m.timeout)) + m.resetIdleTimer(m.timeout) return } @@ -148,24 +121,12 @@ func (m *manager) handleIdleTimeout() { // Set the timer to fire after a duration of idle timeout, calculated // from the time the most recent RPC completed. atomic.StoreInt32(&m.activeSinceLastTimerCheck, 0) - m.resetIdleTimer(time.Duration(atomic.LoadInt64(&m.lastCallEndTime) + m.timeout - time.Now().UnixNano())) + m.resetIdleTimer(time.Duration(atomic.LoadInt64(&m.lastCallEndTime)-time.Now().UnixNano()) + m.timeout) return } - // This CAS operation is extremely likely to succeed given that there has - // been no activity since the last time we were here. Setting the - // activeCallsCount to -math.MaxInt32 indicates to OnCallBegin() that the - // channel is either in idle mode or is trying to get there. - if !atomic.CompareAndSwapInt32(&m.activeCallsCount, 0, -math.MaxInt32) { - // This CAS operation can fail if an RPC started after we checked for - // activity at the top of this method, or one was ongoing from before - // the last time we were here. In both case, reset the timer and return. - m.resetIdleTimer(time.Duration(m.timeout)) - return - } - - // Now that we've set the active calls count to -math.MaxInt32, it's time to - // actually move to idle mode. + // Now that we've checked that there has been no activity, attempt to enter + // idle mode, which is very likely to succeed. if m.tryEnterIdleMode() { // Successfully entered idle mode. No timer needed until we exit idle. return @@ -174,8 +135,7 @@ func (m *manager) handleIdleTimeout() { // Failed to enter idle mode due to a concurrent RPC that kept the channel // active, or because of an error from the channel. Undo the attempt to // enter idle, and reset the timer to try again later. - atomic.AddInt32(&m.activeCallsCount, math.MaxInt32) - m.resetIdleTimer(time.Duration(m.timeout)) + m.resetIdleTimer(m.timeout) } // tryEnterIdleMode instructs the channel to enter idle mode. But before @@ -185,36 +145,49 @@ func (m *manager) handleIdleTimeout() { // Return value indicates whether or not the channel moved to idle mode. // // Holds idleMu which ensures mutual exclusion with exitIdleMode. -func (m *manager) tryEnterIdleMode() bool { +func (m *Manager) tryEnterIdleMode() bool { + // Setting the activeCallsCount to -math.MaxInt32 indicates to OnCallBegin() + // that the channel is either in idle mode or is trying to get there. + if !atomic.CompareAndSwapInt32(&m.activeCallsCount, 0, -math.MaxInt32) { + // This CAS operation can fail if an RPC started after we checked for + // activity in the timer handler, or one was ongoing from before the + // last time the timer fired, or if a test is attempting to enter idle + // mode without checking. In all cases, abort going into idle mode. + return false + } + // N.B. if we fail to enter idle mode after this, we must re-add + // math.MaxInt32 to m.activeCallsCount. + m.idleMu.Lock() defer m.idleMu.Unlock() if atomic.LoadInt32(&m.activeCallsCount) != -math.MaxInt32 { // We raced and lost to a new RPC. Very rare, but stop entering idle. + atomic.AddInt32(&m.activeCallsCount, math.MaxInt32) return false } if atomic.LoadInt32(&m.activeSinceLastTimerCheck) == 1 { - // An very short RPC could have come in (and also finished) after we + // A very short RPC could have come in (and also finished) after we // checked for calls count and activity in handleIdleTimeout(), but // before the CAS operation. So, we need to check for activity again. + atomic.AddInt32(&m.activeCallsCount, math.MaxInt32) return false } - // No new RPCs have come in since we last set the active calls count value - // -math.MaxInt32 in the timer callback. And since we have the lock, it is - // safe to enter idle mode now. - if err := m.enforcer.EnterIdleMode(); err != nil { - m.logger.Errorf("Failed to enter idle mode: %v", err) - return false - } - - // Successfully entered idle mode. + // No new RPCs have come in since we set the active calls count value to + // -math.MaxInt32. And since we have the lock, it is safe to enter idle mode + // unconditionally now. + m.enforcer.EnterIdleMode() m.actuallyIdle = true return true } +func (m *Manager) EnterIdleModeForTesting() { + m.tryEnterIdleMode() +} + // OnCallBegin is invoked at the start of every RPC. -func (m *manager) OnCallBegin() error { +func (m *Manager) OnCallBegin() error { if m.isClosed() { return nil } @@ -227,7 +200,7 @@ func (m *manager) OnCallBegin() error { // Channel is either in idle mode or is in the process of moving to idle // mode. Attempt to exit idle mode to allow this RPC. - if err := m.exitIdleMode(); err != nil { + if err := m.ExitIdleMode(); err != nil { // Undo the increment to calls count, and return an error causing the // RPC to fail. atomic.AddInt32(&m.activeCallsCount, -1) @@ -238,28 +211,30 @@ func (m *manager) OnCallBegin() error { return nil } -// exitIdleMode instructs the channel to exit idle mode. -// -// Holds idleMu which ensures mutual exclusion with tryEnterIdleMode. -func (m *manager) exitIdleMode() error { +// ExitIdleMode instructs m to call the enforcer's ExitIdleMode and update m's +// internal state. +func (m *Manager) ExitIdleMode() error { + // Holds idleMu which ensures mutual exclusion with tryEnterIdleMode. m.idleMu.Lock() defer m.idleMu.Unlock() - if !m.actuallyIdle { - // This can happen in two scenarios: + if m.isClosed() || !m.actuallyIdle { + // This can happen in three scenarios: // - handleIdleTimeout() set the calls count to -math.MaxInt32 and called // tryEnterIdleMode(). But before the latter could grab the lock, an RPC // came in and OnCallBegin() noticed that the calls count is negative. // - Channel is in idle mode, and multiple new RPCs come in at the same // time, all of them notice a negative calls count in OnCallBegin and get // here. The first one to get the lock would got the channel to exit idle. + // - Channel is not in idle mode, and the user calls Connect which calls + // m.ExitIdleMode. // - // Either way, nothing to do here. + // In any case, there is nothing to do here. return nil } if err := m.enforcer.ExitIdleMode(); err != nil { - return fmt.Errorf("channel failed to exit idle mode: %v", err) + return fmt.Errorf("failed to exit idle mode: %w", err) } // Undo the idle entry process. This also respects any new RPC attempts. @@ -267,12 +242,12 @@ func (m *manager) exitIdleMode() error { m.actuallyIdle = false // Start a new timer to fire after the configured idle timeout. - m.timer = timeAfterFunc(time.Duration(m.timeout), m.handleIdleTimeout) + m.resetIdleTimerLocked(m.timeout) return nil } // OnCallEnd is invoked at the end of every RPC. -func (m *manager) OnCallEnd() { +func (m *Manager) OnCallEnd() { if m.isClosed() { return } @@ -287,15 +262,17 @@ func (m *manager) OnCallEnd() { atomic.AddInt32(&m.activeCallsCount, -1) } -func (m *manager) isClosed() bool { +func (m *Manager) isClosed() bool { return atomic.LoadInt32(&m.closed) == 1 } -func (m *manager) Close() { +func (m *Manager) Close() { atomic.StoreInt32(&m.closed, 1) m.idleMu.Lock() - m.timer.Stop() - m.timer = nil + if m.timer != nil { + m.timer.Stop() + m.timer = nil + } m.idleMu.Unlock() } diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index 0d94c63e0..5d6653986 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -57,7 +57,7 @@ var ( // GetXDSHandshakeInfoForTesting returns a pointer to the xds.HandshakeInfo // stored in the passed in attributes. This is set by // credentials/xds/xds.go. - GetXDSHandshakeInfoForTesting any // func (*attributes.Attributes) *xds.HandshakeInfo + GetXDSHandshakeInfoForTesting any // func (*attributes.Attributes) *unsafe.Pointer // GetServerCredentials returns the transport credentials configured on a // gRPC server. An xDS-enabled server needs to know what type of credentials // is configured on the underlying gRPC server. This is set by server.go. @@ -68,11 +68,11 @@ var ( // This is used in the 1.0 release of gcp/observability, and thus must not be // deleted or changed. CanonicalString any // func (codes.Code) string - // DrainServerTransports initiates a graceful close of existing connections - // on a gRPC server accepted on the provided listener address. An - // xDS-enabled server invokes this method on a grpc.Server when a particular - // listener moves to "not-serving" mode. - DrainServerTransports any // func(*grpc.Server, string) + // IsRegisteredMethod returns whether the passed in method is registered as + // a method on the server. + IsRegisteredMethod any // func(*grpc.Server, string) bool + // ServerFromContext returns the server from the context. + ServerFromContext any // func(context.Context) *grpc.Server // AddGlobalServerOptions adds an array of ServerOption that will be // effective globally for newly created servers. The priority will be: 1. // user-provided; 2. this method; 3. default values. @@ -106,6 +106,14 @@ var ( // This is used in the 1.0 release of gcp/observability, and thus must not be // deleted or changed. ClearGlobalDialOptions func() + + // AddGlobalPerTargetDialOptions adds a PerTargetDialOption that will be + // configured for newly created ClientConns. + AddGlobalPerTargetDialOptions any // func (opt any) + // ClearGlobalPerTargetDialOptions clears the slice of global late apply + // dial options. + ClearGlobalPerTargetDialOptions func() + // JoinDialOptions combines the dial options passed as arguments into a // single dial option. JoinDialOptions any // func(...grpc.DialOption) grpc.DialOption @@ -126,7 +134,8 @@ var ( // deleted or changed. BinaryLogger any // func(binarylog.Logger) grpc.ServerOption - // SubscribeToConnectivityStateChanges adds a grpcsync.Subscriber to a provided grpc.ClientConn + // SubscribeToConnectivityStateChanges adds a grpcsync.Subscriber to a + // provided grpc.ClientConn. SubscribeToConnectivityStateChanges any // func(*grpc.ClientConn, grpcsync.Subscriber) // NewXDSResolverWithConfigForTesting creates a new xds resolver builder using @@ -177,13 +186,32 @@ var ( GRPCResolverSchemeExtraMetadata string = "xds" // EnterIdleModeForTesting gets the ClientConn to enter IDLE mode. - EnterIdleModeForTesting any // func(*grpc.ClientConn) error + EnterIdleModeForTesting any // func(*grpc.ClientConn) // ExitIdleModeForTesting gets the ClientConn to exit IDLE mode. ExitIdleModeForTesting any // func(*grpc.ClientConn) error + + ChannelzTurnOffForTesting func() + + // TriggerXDSResourceNotFoundForTesting causes the provided xDS Client to + // invoke resource-not-found error for the given resource type and name. + TriggerXDSResourceNotFoundForTesting any // func(xdsclient.XDSClient, xdsresource.Type, string) error + + // FromOutgoingContextRaw returns the un-merged, intermediary contents of + // metadata.rawMD. + FromOutgoingContextRaw any // func(context.Context) (metadata.MD, [][]string, bool) + + // UserSetDefaultScheme is set to true if the user has overridden the + // default resolver scheme. + UserSetDefaultScheme bool = false + + // ShuffleAddressListForTesting pseudo-randomizes the order of addresses. n + // is the number of elements. swap swaps the elements with indexes i and j. + ShuffleAddressListForTesting any // func(n int, swap func(i, j int)) ) -// HealthChecker defines the signature of the client-side LB channel health checking function. +// HealthChecker defines the signature of the client-side LB channel health +// checking function. // // The implementation is expected to create a health checking RPC stream by // calling newStream(), watch for the health status of serviceName, and report diff --git a/vendor/google.golang.org/grpc/internal/pretty/pretty.go b/vendor/google.golang.org/grpc/internal/pretty/pretty.go index 703319137..dbee7a60d 100644 --- a/vendor/google.golang.org/grpc/internal/pretty/pretty.go +++ b/vendor/google.golang.org/grpc/internal/pretty/pretty.go @@ -24,10 +24,8 @@ import ( "encoding/json" "fmt" - "github.com/golang/protobuf/jsonpb" - protov1 "github.com/golang/protobuf/proto" "google.golang.org/protobuf/encoding/protojson" - protov2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/protoadapt" ) const jsonIndent = " " @@ -36,21 +34,14 @@ const jsonIndent = " " // // If marshal fails, it falls back to fmt.Sprintf("%+v"). func ToJSON(e any) string { - switch ee := e.(type) { - case protov1.Message: - mm := jsonpb.Marshaler{Indent: jsonIndent} - ret, err := mm.MarshalToString(ee) - if err != nil { - // This may fail for proto.Anys, e.g. for xDS v2, LDS, the v2 - // messages are not imported, and this will fail because the message - // is not found. - return fmt.Sprintf("%+v", ee) - } - return ret - case protov2.Message: + if ee, ok := e.(protoadapt.MessageV1); ok { + e = protoadapt.MessageV2Of(ee) + } + + if ee, ok := e.(protoadapt.MessageV2); ok { mm := protojson.MarshalOptions{ - Multiline: true, Indent: jsonIndent, + Multiline: true, } ret, err := mm.Marshal(ee) if err != nil { @@ -60,13 +51,13 @@ func ToJSON(e any) string { return fmt.Sprintf("%+v", ee) } return string(ret) - default: - ret, err := json.MarshalIndent(ee, "", jsonIndent) - if err != nil { - return fmt.Sprintf("%+v", ee) - } - return string(ret) } + + ret, err := json.MarshalIndent(e, "", jsonIndent) + if err != nil { + return fmt.Sprintf("%+v", e) + } + return string(ret) } // FormatJSON formats the input json bytes with indentation. diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 99e1e5b36..4552db16b 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -23,8 +23,8 @@ package dns import ( "context" "encoding/json" - "errors" "fmt" + "math/rand" "net" "os" "strconv" @@ -36,26 +36,37 @@ import ( "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/envconfig" - "google.golang.org/grpc/internal/grpcrand" + "google.golang.org/grpc/internal/resolver/dns/internal" "google.golang.org/grpc/resolver" "google.golang.org/grpc/serviceconfig" ) -// EnableSRVLookups controls whether the DNS resolver attempts to fetch gRPCLB -// addresses from SRV records. Must not be changed after init time. -var EnableSRVLookups = false - -var logger = grpclog.Component("dns") - -// Globals to stub out in tests. TODO: Perhaps these two can be combined into a -// single variable for testing the resolver? var ( - newTimer = time.NewTimer - newTimerDNSResRate = time.NewTimer + // EnableSRVLookups controls whether the DNS resolver attempts to fetch gRPCLB + // addresses from SRV records. Must not be changed after init time. + EnableSRVLookups = false + + // MinResolutionInterval is the minimum interval at which re-resolutions are + // allowed. This helps to prevent excessive re-resolution. + MinResolutionInterval = 30 * time.Second + + // ResolvingTimeout specifies the maximum duration for a DNS resolution request. + // If the timeout expires before a response is received, the request will be canceled. + // + // It is recommended to set this value at application startup. Avoid modifying this variable + // after initialization as it's not thread-safe for concurrent modification. + ResolvingTimeout = 30 * time.Second + + logger = grpclog.Component("dns") ) func init() { resolver.Register(NewBuilder()) + internal.TimeAfterFunc = time.After + internal.TimeNowFunc = time.Now + internal.TimeUntilFunc = time.Until + internal.NewNetResolver = newNetResolver + internal.AddressDialer = addressDialer } const ( @@ -70,23 +81,6 @@ const ( txtAttribute = "grpc_config=" ) -var ( - errMissingAddr = errors.New("dns resolver: missing address") - - // Addresses ending with a colon that is supposed to be the separator - // between host and port is not allowed. E.g. "::" is a valid address as - // it is an IPv6 address (host only) and "[::]:" is invalid as it ends with - // a colon as the host and port separator - errEndsWithColon = errors.New("dns resolver: missing port after port-separator colon") -) - -var ( - defaultResolver netResolver = net.DefaultResolver - // To prevent excessive re-resolution, we enforce a rate limit on DNS - // resolution requests. - minDNSResRate = 30 * time.Second -) - var addressDialer = func(address string) func(context.Context, string, string) (net.Conn, error) { return func(ctx context.Context, network, _ string) (net.Conn, error) { var dialer net.Dialer @@ -94,7 +88,11 @@ var addressDialer = func(address string) func(context.Context, string, string) ( } } -var newNetResolver = func(authority string) (netResolver, error) { +var newNetResolver = func(authority string) (internal.NetResolver, error) { + if authority == "" { + return net.DefaultResolver, nil + } + host, port, err := parseTarget(authority, defaultDNSSvrPort) if err != nil { return nil, err @@ -104,7 +102,7 @@ var newNetResolver = func(authority string) (netResolver, error) { return &net.Resolver{ PreferGo: true, - Dial: addressDialer(authorityWithPort), + Dial: internal.AddressDialer(authorityWithPort), }, nil } @@ -142,13 +140,9 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts disableServiceConfig: opts.DisableServiceConfig, } - if target.URL.Host == "" { - d.resolver = defaultResolver - } else { - d.resolver, err = newNetResolver(target.URL.Host) - if err != nil { - return nil, err - } + d.resolver, err = internal.NewNetResolver(target.URL.Host) + if err != nil { + return nil, err } d.wg.Add(1) @@ -161,12 +155,6 @@ func (b *dnsBuilder) Scheme() string { return "dns" } -type netResolver interface { - LookupHost(ctx context.Context, host string) (addrs []string, err error) - LookupSRV(ctx context.Context, service, proto, name string) (cname string, addrs []*net.SRV, err error) - LookupTXT(ctx context.Context, name string) (txts []string, err error) -} - // deadResolver is a resolver that does nothing. type deadResolver struct{} @@ -178,7 +166,7 @@ func (deadResolver) Close() {} type dnsResolver struct { host string port string - resolver netResolver + resolver internal.NetResolver ctx context.Context cancel context.CancelFunc cc resolver.ClientConn @@ -223,45 +211,43 @@ func (d *dnsResolver) watcher() { err = d.cc.UpdateState(*state) } - var timer *time.Timer + var nextResolutionTime time.Time if err == nil { // Success resolving, wait for the next ResolveNow. However, also wait 30 // seconds at the very least to prevent constantly re-resolving. backoffIndex = 1 - timer = newTimerDNSResRate(minDNSResRate) + nextResolutionTime = internal.TimeNowFunc().Add(MinResolutionInterval) select { case <-d.ctx.Done(): - timer.Stop() return case <-d.rn: } } else { // Poll on an error found in DNS Resolver or an error received from // ClientConn. - timer = newTimer(backoff.DefaultExponential.Backoff(backoffIndex)) + nextResolutionTime = internal.TimeNowFunc().Add(backoff.DefaultExponential.Backoff(backoffIndex)) backoffIndex++ } select { case <-d.ctx.Done(): - timer.Stop() return - case <-timer.C: + case <-internal.TimeAfterFunc(internal.TimeUntilFunc(nextResolutionTime)): } } } -func (d *dnsResolver) lookupSRV() ([]resolver.Address, error) { +func (d *dnsResolver) lookupSRV(ctx context.Context) ([]resolver.Address, error) { if !EnableSRVLookups { return nil, nil } var newAddrs []resolver.Address - _, srvs, err := d.resolver.LookupSRV(d.ctx, "grpclb", "tcp", d.host) + _, srvs, err := d.resolver.LookupSRV(ctx, "grpclb", "tcp", d.host) if err != nil { err = handleDNSError(err, "SRV") // may become nil return nil, err } for _, s := range srvs { - lbAddrs, err := d.resolver.LookupHost(d.ctx, s.Target) + lbAddrs, err := d.resolver.LookupHost(ctx, s.Target) if err != nil { err = handleDNSError(err, "A") // may become nil if err == nil { @@ -298,8 +284,8 @@ func handleDNSError(err error, lookupType string) error { return err } -func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult { - ss, err := d.resolver.LookupTXT(d.ctx, txtPrefix+d.host) +func (d *dnsResolver) lookupTXT(ctx context.Context) *serviceconfig.ParseResult { + ss, err := d.resolver.LookupTXT(ctx, txtPrefix+d.host) if err != nil { if envconfig.TXTErrIgnore { return nil @@ -326,8 +312,8 @@ func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult { return d.cc.ParseServiceConfig(sc) } -func (d *dnsResolver) lookupHost() ([]resolver.Address, error) { - addrs, err := d.resolver.LookupHost(d.ctx, d.host) +func (d *dnsResolver) lookupHost(ctx context.Context) ([]resolver.Address, error) { + addrs, err := d.resolver.LookupHost(ctx, d.host) if err != nil { err = handleDNSError(err, "A") return nil, err @@ -345,8 +331,10 @@ func (d *dnsResolver) lookupHost() ([]resolver.Address, error) { } func (d *dnsResolver) lookup() (*resolver.State, error) { - srv, srvErr := d.lookupSRV() - addrs, hostErr := d.lookupHost() + ctx, cancel := context.WithTimeout(d.ctx, ResolvingTimeout) + defer cancel() + srv, srvErr := d.lookupSRV(ctx) + addrs, hostErr := d.lookupHost(ctx) if hostErr != nil && (srvErr != nil || len(srv) == 0) { return nil, hostErr } @@ -356,7 +344,7 @@ func (d *dnsResolver) lookup() (*resolver.State, error) { state = grpclbstate.Set(state, &grpclbstate.State{BalancerAddresses: srv}) } if !d.disableServiceConfig { - state.ServiceConfig = d.lookupTXT() + state.ServiceConfig = d.lookupTXT(ctx) } return &state, nil } @@ -387,7 +375,7 @@ func formatIP(addr string) (addrIP string, ok bool) { // target: ":80" defaultPort: "443" returns host: "localhost", port: "80" func parseTarget(target, defaultPort string) (host, port string, err error) { if target == "" { - return "", "", errMissingAddr + return "", "", internal.ErrMissingAddr } if ip := net.ParseIP(target); ip != nil { // target is an IPv4 or IPv6(without brackets) address @@ -397,7 +385,7 @@ func parseTarget(target, defaultPort string) (host, port string, err error) { if port == "" { // If the port field is empty (target ends with colon), e.g. "[::1]:", // this is an error. - return "", "", errEndsWithColon + return "", "", internal.ErrEndsWithColon } // target has port, i.e ipv4-host:port, [ipv6-host]:port, host-name:port if host == "" { @@ -437,7 +425,7 @@ func chosenByPercentage(a *int) bool { if a == nil { return true } - return grpcrand.Intn(100)+1 <= *a + return rand.Intn(100)+1 <= *a } func canaryingSC(js string) string { diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/internal/internal.go b/vendor/google.golang.org/grpc/internal/resolver/dns/internal/internal.go new file mode 100644 index 000000000..c0eae4f5f --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/internal/internal.go @@ -0,0 +1,77 @@ +/* + * + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package internal contains functionality internal to the dns resolver package. +package internal + +import ( + "context" + "errors" + "net" + "time" +) + +// NetResolver groups the methods on net.Resolver that are used by the DNS +// resolver implementation. This allows the default net.Resolver instance to be +// overridden from tests. +type NetResolver interface { + LookupHost(ctx context.Context, host string) (addrs []string, err error) + LookupSRV(ctx context.Context, service, proto, name string) (cname string, addrs []*net.SRV, err error) + LookupTXT(ctx context.Context, name string) (txts []string, err error) +} + +var ( + // ErrMissingAddr is the error returned when building a DNS resolver when + // the provided target name is empty. + ErrMissingAddr = errors.New("dns resolver: missing address") + + // ErrEndsWithColon is the error returned when building a DNS resolver when + // the provided target name ends with a colon that is supposed to be the + // separator between host and port. E.g. "::" is a valid address as it is + // an IPv6 address (host only) and "[::]:" is invalid as it ends with a + // colon as the host and port separator + ErrEndsWithColon = errors.New("dns resolver: missing port after port-separator colon") +) + +// The following vars are overridden from tests. +var ( + // TimeAfterFunc is used by the DNS resolver to wait for the given duration + // to elapse. In non-test code, this is implemented by time.After. In test + // code, this can be used to control the amount of time the resolver is + // blocked waiting for the duration to elapse. + TimeAfterFunc func(time.Duration) <-chan time.Time + + // TimeNowFunc is used by the DNS resolver to get the current time. + // In non-test code, this is implemented by time.Now. In test code, + // this can be used to control the current time for the resolver. + TimeNowFunc func() time.Time + + // TimeUntilFunc is used by the DNS resolver to calculate the remaining + // wait time for re-resolution. In non-test code, this is implemented by + // time.Until. In test code, this can be used to control the remaining + // time for resolver to wait for re-resolution. + TimeUntilFunc func(time.Time) time.Duration + + // NewNetResolver returns the net.Resolver instance for the given target. + NewNetResolver func(string) (NetResolver, error) + + // AddressDialer is the dialer used to dial the DNS server. It accepts the + // Host portion of the URL corresponding to the user's dial target and + // returns a dial function. + AddressDialer func(address string) func(context.Context, string, string) (net.Conn, error) +) diff --git a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go index 160911687..27cd81af9 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go +++ b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go @@ -61,6 +61,10 @@ func (b *builder) Scheme() string { return b.scheme } +func (b *builder) OverrideAuthority(resolver.Target) string { + return "localhost" +} + type nopResolver struct { } diff --git a/vendor/google.golang.org/grpc/internal/status/status.go b/vendor/google.golang.org/grpc/internal/status/status.go index 03ef2fedd..c7dbc8205 100644 --- a/vendor/google.golang.org/grpc/internal/status/status.go +++ b/vendor/google.golang.org/grpc/internal/status/status.go @@ -31,10 +31,11 @@ import ( "errors" "fmt" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/protoadapt" + "google.golang.org/protobuf/types/known/anypb" ) // Status represents an RPC status code, message, and details. It is immutable @@ -130,14 +131,14 @@ func (s *Status) Err() error { // WithDetails returns a new status with the provided details messages appended to the status. // If any errors are encountered, it returns nil and the first error encountered. -func (s *Status) WithDetails(details ...proto.Message) (*Status, error) { +func (s *Status) WithDetails(details ...protoadapt.MessageV1) (*Status, error) { if s.Code() == codes.OK { return nil, errors.New("no error details for status with code OK") } // s.Code() != OK implies that s.Proto() != nil. p := s.Proto() for _, detail := range details { - any, err := ptypes.MarshalAny(detail) + any, err := anypb.New(protoadapt.MessageV2Of(detail)) if err != nil { return nil, err } @@ -154,12 +155,12 @@ func (s *Status) Details() []any { } details := make([]any, 0, len(s.s.Details)) for _, any := range s.s.Details { - detail := &ptypes.DynamicAny{} - if err := ptypes.UnmarshalAny(any, detail); err != nil { + detail, err := any.UnmarshalNew() + if err != nil { details = append(details, err) continue } - details = append(details, detail.Message) + details = append(details, detail) } return details } diff --git a/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go b/vendor/google.golang.org/grpc/internal/tcp_keepalive_others.go similarity index 69% rename from vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go rename to vendor/google.golang.org/grpc/internal/tcp_keepalive_others.go index b5568b22e..4f347edd4 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go +++ b/vendor/google.golang.org/grpc/internal/tcp_keepalive_others.go @@ -1,9 +1,7 @@ -//go:build !linux -// +build !linux +//go:build !unix && !windows /* - * - * Copyright 2018 gRPC authors. + * Copyright 2023 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +17,13 @@ * */ -package channelz +package internal + +import ( + "net" +) -// GetSocketOption gets the socket option info of the conn. -func GetSocketOption(c any) *SocketOptionData { - return nil +// NetDialerWithTCPKeepalive returns a vanilla net.Dialer on non-unix platforms. +func NetDialerWithTCPKeepalive() *net.Dialer { + return &net.Dialer{} } diff --git a/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go b/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go new file mode 100644 index 000000000..078137b7f --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go @@ -0,0 +1,54 @@ +//go:build unix + +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package internal + +import ( + "net" + "syscall" + "time" + + "golang.org/x/sys/unix" +) + +// NetDialerWithTCPKeepalive returns a net.Dialer that enables TCP keepalives on +// the underlying connection with OS default values for keepalive parameters. +// +// TODO: Once https://github.com/golang/go/issues/62254 lands, and the +// appropriate Go version becomes less than our least supported Go version, we +// should look into using the new API to make things more straightforward. +func NetDialerWithTCPKeepalive() *net.Dialer { + return &net.Dialer{ + // Setting a negative value here prevents the Go stdlib from overriding + // the values of TCP keepalive time and interval. It also prevents the + // Go stdlib from enabling TCP keepalives by default. + KeepAlive: time.Duration(-1), + // This method is called after the underlying network socket is created, + // but before dialing the socket (or calling its connect() method). The + // combination of unconditionally enabling TCP keepalives here, and + // disabling the overriding of TCP keepalive parameters by setting the + // KeepAlive field to a negative value above, results in OS defaults for + // the TCP keealive interval and time parameters. + Control: func(_, _ string, c syscall.RawConn) error { + return c.Control(func(fd uintptr) { + unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_KEEPALIVE, 1) + }) + }, + } +} diff --git a/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go b/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go new file mode 100644 index 000000000..fd7d43a89 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go @@ -0,0 +1,54 @@ +//go:build windows + +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package internal + +import ( + "net" + "syscall" + "time" + + "golang.org/x/sys/windows" +) + +// NetDialerWithTCPKeepalive returns a net.Dialer that enables TCP keepalives on +// the underlying connection with OS default values for keepalive parameters. +// +// TODO: Once https://github.com/golang/go/issues/62254 lands, and the +// appropriate Go version becomes less than our least supported Go version, we +// should look into using the new API to make things more straightforward. +func NetDialerWithTCPKeepalive() *net.Dialer { + return &net.Dialer{ + // Setting a negative value here prevents the Go stdlib from overriding + // the values of TCP keepalive time and interval. It also prevents the + // Go stdlib from enabling TCP keepalives by default. + KeepAlive: time.Duration(-1), + // This method is called after the underlying network socket is created, + // but before dialing the socket (or calling its connect() method). The + // combination of unconditionally enabling TCP keepalives here, and + // disabling the overriding of TCP keepalive parameters by setting the + // KeepAlive field to a negative value above, results in OS defaults for + // the TCP keealive interval and time parameters. + Control: func(_, _ string, c syscall.RawConn) error { + return c.Control(func(fd uintptr) { + windows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_KEEPALIVE, 1) + }) + }, + } +} diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index b330ccedc..3deadfb4a 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -193,7 +193,7 @@ type goAway struct { code http2.ErrCode debugData []byte headsUp bool - closeConn error // if set, loopyWriter will exit, resulting in conn closure + closeConn error // if set, loopyWriter will exit with this error } func (*goAway) isTransportResponseFrame() bool { return false } @@ -336,7 +336,7 @@ func (c *controlBuffer) put(it cbItem) error { return err } -func (c *controlBuffer) executeAndPut(f func(it any) bool, it cbItem) (bool, error) { +func (c *controlBuffer) executeAndPut(f func() bool, it cbItem) (bool, error) { var wakeUp bool c.mu.Lock() if c.err != nil { @@ -344,7 +344,7 @@ func (c *controlBuffer) executeAndPut(f func(it any) bool, it cbItem) (bool, err return false, c.err } if f != nil { - if !f(it) { // f wasn't successful + if !f() { // f wasn't successful c.mu.Unlock() return false, nil } @@ -495,21 +495,22 @@ type loopyWriter struct { ssGoAwayHandler func(*goAway) (bool, error) } -func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger) *loopyWriter { +func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger, goAwayHandler func(*goAway) (bool, error)) *loopyWriter { var buf bytes.Buffer l := &loopyWriter{ - side: s, - cbuf: cbuf, - sendQuota: defaultWindowSize, - oiws: defaultWindowSize, - estdStreams: make(map[uint32]*outStream), - activeStreams: newOutStreamList(), - framer: fr, - hBuf: &buf, - hEnc: hpack.NewEncoder(&buf), - bdpEst: bdpEst, - conn: conn, - logger: logger, + side: s, + cbuf: cbuf, + sendQuota: defaultWindowSize, + oiws: defaultWindowSize, + estdStreams: make(map[uint32]*outStream), + activeStreams: newOutStreamList(), + framer: fr, + hBuf: &buf, + hEnc: hpack.NewEncoder(&buf), + bdpEst: bdpEst, + conn: conn, + logger: logger, + ssGoAwayHandler: goAwayHandler, } return l } @@ -535,8 +536,8 @@ const minBatchSize = 1000 // size is too low to give stream goroutines a chance to fill it up. // // Upon exiting, if the error causing the exit is not an I/O error, run() -// flushes and closes the underlying connection. Otherwise, the connection is -// left open to allow the I/O error to be encountered by the reader instead. +// flushes the underlying connection. The connection is always left open to +// allow different closing behavior on the client and server. func (l *loopyWriter) run() (err error) { defer func() { if l.logger.V(logLevel) { @@ -544,7 +545,6 @@ func (l *loopyWriter) run() (err error) { } if !isIOError(err) { l.framer.writer.Flush() - l.conn.Close() } l.cbuf.finish() }() diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index 17f7a21b5..4a3ddce29 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -35,7 +35,6 @@ import ( "sync" "time" - "github.com/golang/protobuf/proto" "golang.org/x/net/http2" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" @@ -45,20 +44,17 @@ import ( "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // NewServerHandlerTransport returns a ServerTransport handling gRPC from // inside an http.Handler, or writes an HTTP error to w and returns an error. // It requires that the http Server supports HTTP/2. func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []stats.Handler) (ServerTransport, error) { - if r.ProtoMajor != 2 { - msg := "gRPC requires HTTP/2" - http.Error(w, msg, http.StatusBadRequest) - return nil, errors.New(msg) - } - if r.Method != "POST" { + if r.Method != http.MethodPost { + w.Header().Set("Allow", http.MethodPost) msg := fmt.Sprintf("invalid gRPC request method %q", r.Method) - http.Error(w, msg, http.StatusBadRequest) + http.Error(w, msg, http.StatusMethodNotAllowed) return nil, errors.New(msg) } contentType := r.Header.Get("Content-Type") @@ -69,17 +65,36 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s http.Error(w, msg, http.StatusUnsupportedMediaType) return nil, errors.New(msg) } + if r.ProtoMajor != 2 { + msg := "gRPC requires HTTP/2" + http.Error(w, msg, http.StatusHTTPVersionNotSupported) + return nil, errors.New(msg) + } if _, ok := w.(http.Flusher); !ok { msg := "gRPC requires a ResponseWriter supporting http.Flusher" http.Error(w, msg, http.StatusInternalServerError) return nil, errors.New(msg) } + var localAddr net.Addr + if la := r.Context().Value(http.LocalAddrContextKey); la != nil { + localAddr, _ = la.(net.Addr) + } + var authInfo credentials.AuthInfo + if r.TLS != nil { + authInfo = credentials.TLSInfo{State: *r.TLS, CommonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: credentials.PrivacyAndIntegrity}} + } + p := peer.Peer{ + Addr: strAddr(r.RemoteAddr), + LocalAddr: localAddr, + AuthInfo: authInfo, + } st := &serverHandlerTransport{ rw: w, req: r, closedCh: make(chan struct{}), writes: make(chan func()), + peer: p, contentType: contentType, contentSubtype: contentSubtype, stats: stats, @@ -134,6 +149,8 @@ type serverHandlerTransport struct { headerMD metadata.MD + peer peer.Peer + closeOnce sync.Once closedCh chan struct{} // closed on Close @@ -165,7 +182,13 @@ func (ht *serverHandlerTransport) Close(err error) { }) } -func (ht *serverHandlerTransport) RemoteAddr() net.Addr { return strAddr(ht.req.RemoteAddr) } +func (ht *serverHandlerTransport) Peer() *peer.Peer { + return &peer.Peer{ + Addr: ht.peer.Addr, + LocalAddr: ht.peer.LocalAddr, + AuthInfo: ht.peer.AuthInfo, + } +} // strAddr is a net.Addr backed by either a TCP "ip:port" string, or // the empty string if unknown. @@ -347,10 +370,8 @@ func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error { return err } -func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream)) { +func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream func(*Stream)) { // With this transport type there will be exactly 1 stream: this HTTP request. - - ctx := ht.req.Context() var cancel context.CancelFunc if ht.timeoutSet { ctx, cancel = context.WithTimeout(ctx, ht.timeout) @@ -370,34 +391,19 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream)) { ht.Close(errors.New("request is done processing")) }() + ctx = metadata.NewIncomingContext(ctx, ht.headerMD) req := ht.req - s := &Stream{ - id: 0, // irrelevant - requestRead: func(int) {}, - cancel: cancel, - buf: newRecvBuffer(), - st: ht, - method: req.URL.Path, - recvCompress: req.Header.Get("grpc-encoding"), - contentSubtype: ht.contentSubtype, - } - pr := &peer.Peer{ - Addr: ht.RemoteAddr(), - } - if req.TLS != nil { - pr.AuthInfo = credentials.TLSInfo{State: *req.TLS, CommonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: credentials.PrivacyAndIntegrity}} - } - ctx = metadata.NewIncomingContext(ctx, ht.headerMD) - s.ctx = peer.NewContext(ctx, pr) - for _, sh := range ht.stats { - s.ctx = sh.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) - inHeader := &stats.InHeader{ - FullMethod: s.method, - RemoteAddr: ht.RemoteAddr(), - Compression: s.recvCompress, - } - sh.HandleRPC(s.ctx, inHeader) + id: 0, // irrelevant + ctx: ctx, + requestRead: func(int) {}, + cancel: cancel, + buf: newRecvBuffer(), + st: ht, + method: req.URL.Path, + recvCompress: req.Header.Get("grpc-encoding"), + contentSubtype: ht.contentSubtype, + headerWireLength: 0, // won't have access to header wire length until golang/go#18997. } s.trReader = &transportReader{ reader: &recvBufferReader{ctx: s.ctx, ctxDone: s.ctx.Done(), recv: s.buf, freeBuffer: func(*bytes.Buffer) {}}, diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index d6f5c4935..3c63c7069 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -36,6 +36,7 @@ import ( "golang.org/x/net/http2/hpack" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/channelz" icredentials "google.golang.org/grpc/internal/credentials" "google.golang.org/grpc/internal/grpclog" @@ -43,7 +44,7 @@ import ( "google.golang.org/grpc/internal/grpcutil" imetadata "google.golang.org/grpc/internal/metadata" istatus "google.golang.org/grpc/internal/status" - "google.golang.org/grpc/internal/syscall" + isyscall "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/internal/transport/networktype" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" @@ -58,6 +59,8 @@ import ( // atomically. var clientConnectionCounter uint64 +var metadataFromOutgoingContextRaw = internal.FromOutgoingContextRaw.(func(context.Context) (metadata.MD, [][]string, bool)) + // http2Client implements the ClientTransport interface with HTTP2. type http2Client struct { lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. @@ -111,11 +114,11 @@ type http2Client struct { streamQuota int64 streamsQuotaAvailable chan struct{} waitingStreams uint32 - nextID uint32 registeredCompressors string // Do not access controlBuf with mu held. mu sync.Mutex // guard the following variables + nextID uint32 state transportState activeStreams map[uint32]*Stream // prevGoAway ID records the Last-Stream-ID in the previous GOAway frame. @@ -137,9 +140,7 @@ type http2Client struct { // variable. kpDormant bool - // Fields below are for channelz metric collection. - channelzID *channelz.Identifier - czData *channelzData + channelz *channelz.Socket onClose func(GoAwayReason) @@ -176,7 +177,7 @@ func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error if networkType == "tcp" && useProxy { return proxyDial(ctx, address, grpcUA) } - return (&net.Dialer{}).DialContext(ctx, networkType, address) + return internal.NetDialerWithTCPKeepalive().DialContext(ctx, networkType, address) } func isTemporary(err error) bool { @@ -262,7 +263,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } keepaliveEnabled := false if kp.Time != infinity { - if err = syscall.SetTCPUserTimeout(conn, kp.Timeout); err != nil { + if err = isyscall.SetTCPUserTimeout(conn, kp.Timeout); err != nil { return nil, connectionErrorf(false, err, "transport: failed to set TCP_USER_TIMEOUT: %v", err) } keepaliveEnabled = true @@ -316,6 +317,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts if opts.MaxHeaderListSize != nil { maxHeaderListSize = *opts.MaxHeaderListSize } + t := &http2Client{ ctx: ctx, ctxDone: ctx.Done(), // Cache Done chan. @@ -343,11 +345,25 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts maxConcurrentStreams: defaultMaxStreamsClient, streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), - czData: new(channelzData), keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), onClose: onClose, } + var czSecurity credentials.ChannelzSecurityValue + if au, ok := authInfo.(credentials.ChannelzSecurityInfo); ok { + czSecurity = au.GetSecurityValue() + } + t.channelz = channelz.RegisterSocket( + &channelz.Socket{ + SocketType: channelz.SocketTypeNormal, + Parent: opts.ChannelzParent, + SocketMetrics: channelz.SocketMetrics{}, + EphemeralMetrics: t.socketMetrics, + LocalAddr: t.localAddr, + RemoteAddr: t.remoteAddr, + SocketOptions: channelz.GetSocketOption(t.conn), + Security: czSecurity, + }) t.logger = prefixLoggerForClientTransport(t) // Add peer information to the http2client context. t.ctx = peer.NewContext(t.ctx, t.getPeer()) @@ -378,10 +394,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } sh.HandleConn(t.ctx, connBegin) } - t.channelzID, err = channelz.RegisterNormalSocket(t, opts.ChannelzParentID, fmt.Sprintf("%s -> %s", t.localAddr, t.remoteAddr)) - if err != nil { - return nil, err - } if t.keepaliveEnabled { t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() @@ -396,10 +408,10 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts readerErrCh := make(chan error, 1) go t.reader(readerErrCh) defer func() { - if err == nil { - err = <-readerErrCh - } if err != nil { + // writerDone should be closed since the loopy goroutine + // wouldn't have started in the case this function returns an error. + close(t.writerDone) t.Close(err) } }() @@ -446,9 +458,19 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts if err := t.framer.writer.Flush(); err != nil { return nil, err } + // Block until the server preface is received successfully or an error occurs. + if err = <-readerErrCh; err != nil { + return nil, err + } go func() { - t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger) - t.loopy.run() + t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler) + if err := t.loopy.run(); !isIOError(err) { + // Immediately close the connection, as the loopy writer returns + // when there are no more active streams and we were draining (the + // server sent a GOAWAY). For I/O errors, the reader will hit it + // after draining any remaining incoming data. + t.conn.Close() + } close(t.writerDone) }() return t, nil @@ -493,9 +515,21 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { func (t *http2Client) getPeer() *peer.Peer { return &peer.Peer{ - Addr: t.remoteAddr, - AuthInfo: t.authInfo, // Can be nil + Addr: t.remoteAddr, + AuthInfo: t.authInfo, // Can be nil + LocalAddr: t.localAddr, + } +} + +// OutgoingGoAwayHandler writes a GOAWAY to the connection. Always returns (false, err) as we want the GoAway +// to be the last frame loopy writes to the transport. +func (t *http2Client) outgoingGoAwayHandler(g *goAway) (bool, error) { + t.mu.Lock() + defer t.mu.Unlock() + if err := t.framer.fr.WriteGoAway(t.nextID-2, http2.ErrCodeNo, g.debugData); err != nil { + return false, err } + return false, g.closeConn } func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) ([]hpack.HeaderField, error) { @@ -566,7 +600,7 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-trace-bin", Value: encodeBinHeader(b)}) } - if md, added, ok := metadata.FromOutgoingContextRaw(ctx); ok { + if md, added, ok := metadataFromOutgoingContextRaw(ctx); ok { var k string for k, vv := range md { // HTTP doesn't allow you to set pseudoheaders after non pseudoheaders were set. @@ -746,8 +780,8 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, return ErrConnClosing } if channelz.IsOn() { - atomic.AddInt64(&t.czData.streamsStarted, 1) - atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano()) + t.channelz.SocketMetrics.StreamsStarted.Add(1) + t.channelz.SocketMetrics.LastLocalStreamCreatedTimestamp.Store(time.Now().UnixNano()) } // If the keepalive goroutine has gone dormant, wake it up. if t.kpDormant { @@ -762,7 +796,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, firstTry := true var ch chan struct{} transportDrainRequired := false - checkForStreamQuota := func(it any) bool { + checkForStreamQuota := func() bool { if t.streamQuota <= 0 { // Can go negative if server decreases it. if firstTry { t.waitingStreams++ @@ -774,23 +808,24 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, t.waitingStreams-- } t.streamQuota-- - h := it.(*headerFrame) - h.streamID = t.nextID - t.nextID += 2 - // Drain client transport if nextID > MaxStreamID which signals gRPC that - // the connection is closed and a new one must be created for subsequent RPCs. - transportDrainRequired = t.nextID > MaxStreamID - - s.id = h.streamID - s.fc = &inFlow{limit: uint32(t.initialWindowSize)} t.mu.Lock() if t.state == draining || t.activeStreams == nil { // Can be niled from Close(). t.mu.Unlock() return false // Don't create a stream if the transport is already closed. } + + hdr.streamID = t.nextID + t.nextID += 2 + // Drain client transport if nextID > MaxStreamID which signals gRPC that + // the connection is closed and a new one must be created for subsequent RPCs. + transportDrainRequired = t.nextID > MaxStreamID + + s.id = hdr.streamID + s.fc = &inFlow{limit: uint32(t.initialWindowSize)} t.activeStreams[s.id] = s t.mu.Unlock() + if t.streamQuota > 0 && t.waitingStreams > 0 { select { case t.streamsQuotaAvailable <- struct{}{}: @@ -800,13 +835,12 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, return true } var hdrListSizeErr error - checkForHeaderListSize := func(it any) bool { + checkForHeaderListSize := func() bool { if t.maxSendHeaderListSize == nil { return true } - hdrFrame := it.(*headerFrame) var sz int64 - for _, f := range hdrFrame.hf { + for _, f := range hdr.hf { if sz += int64(f.Size()); sz > int64(*t.maxSendHeaderListSize) { hdrListSizeErr = status.Errorf(codes.Internal, "header list size to send violates the maximum size (%d bytes) set by server", *t.maxSendHeaderListSize) return false @@ -815,8 +849,8 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, return true } for { - success, err := t.controlBuf.executeAndPut(func(it any) bool { - return checkForHeaderListSize(it) && checkForStreamQuota(it) + success, err := t.controlBuf.executeAndPut(func() bool { + return checkForHeaderListSize() && checkForStreamQuota() }, hdr) if err != nil { // Connection closed. @@ -918,16 +952,16 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. t.mu.Unlock() if channelz.IsOn() { if eosReceived { - atomic.AddInt64(&t.czData.streamsSucceeded, 1) + t.channelz.SocketMetrics.StreamsSucceeded.Add(1) } else { - atomic.AddInt64(&t.czData.streamsFailed, 1) + t.channelz.SocketMetrics.StreamsFailed.Add(1) } } }, rst: rst, rstCode: rstCode, } - addBackStreamQuota := func(any) bool { + addBackStreamQuota := func() bool { t.streamQuota++ if t.streamQuota > 0 && t.waitingStreams > 0 { select { @@ -947,7 +981,7 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. // Close kicks off the shutdown process of the transport. This should be called // only once on a transport. Once it is called, the transport should not be -// accessed any more. +// accessed anymore. func (t *http2Client) Close(err error) { t.mu.Lock() // Make sure we only close once. @@ -972,10 +1006,13 @@ func (t *http2Client) Close(err error) { t.kpDormancyCond.Signal() } t.mu.Unlock() - t.controlBuf.finish() + // Per HTTP/2 spec, a GOAWAY frame must be sent before closing the + // connection. See https://httpwg.org/specs/rfc7540.html#GOAWAY. + t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte("client transport shutdown"), closeConn: err}) + <-t.writerDone t.cancel() t.conn.Close() - channelz.RemoveEntry(t.channelzID) + channelz.RemoveEntry(t.channelz.ID) // Append info about previous goaways if there were any, since this may be important // for understanding the root cause for this connection to be closed. _, goAwayDebugMessage := t.GetGoAwayReason() @@ -1080,7 +1117,7 @@ func (t *http2Client) updateWindow(s *Stream, n uint32) { // for the transport and the stream based on the current bdp // estimation. func (t *http2Client) updateFlowControl(n uint32) { - updateIWS := func(any) bool { + updateIWS := func() bool { t.initialWindowSize = int32(n) t.mu.Lock() for _, s := range t.activeStreams { @@ -1233,7 +1270,7 @@ func (t *http2Client) handleSettings(f *http2.SettingsFrame, isFirst bool) { } updateFuncs = append(updateFuncs, updateStreamQuota) } - t.controlBuf.executeAndPut(func(any) bool { + t.controlBuf.executeAndPut(func() bool { for _, f := range updateFuncs { f() } @@ -1321,10 +1358,8 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { for streamID, stream := range t.activeStreams { if streamID > id && streamID <= upperLimit { // The stream was unprocessed by the server. - if streamID > id && streamID <= upperLimit { - atomic.StoreUint32(&stream.unprocessed, 1) - streamsToClose = append(streamsToClose, stream) - } + atomic.StoreUint32(&stream.unprocessed, 1) + streamsToClose = append(streamsToClose, stream) } } t.mu.Unlock() @@ -1700,7 +1735,7 @@ func (t *http2Client) keepalive() { // keepalive timer expired. In both cases, we need to send a ping. if !outstandingPing { if channelz.IsOn() { - atomic.AddInt64(&t.czData.kpCount, 1) + t.channelz.SocketMetrics.KeepAlivesSent.Add(1) } t.controlBuf.put(p) timeoutLeft = t.kp.Timeout @@ -1730,40 +1765,23 @@ func (t *http2Client) GoAway() <-chan struct{} { return t.goAway } -func (t *http2Client) ChannelzMetric() *channelz.SocketInternalMetric { - s := channelz.SocketInternalMetric{ - StreamsStarted: atomic.LoadInt64(&t.czData.streamsStarted), - StreamsSucceeded: atomic.LoadInt64(&t.czData.streamsSucceeded), - StreamsFailed: atomic.LoadInt64(&t.czData.streamsFailed), - MessagesSent: atomic.LoadInt64(&t.czData.msgSent), - MessagesReceived: atomic.LoadInt64(&t.czData.msgRecv), - KeepAlivesSent: atomic.LoadInt64(&t.czData.kpCount), - LastLocalStreamCreatedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastStreamCreatedTime)), - LastMessageSentTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgSentTime)), - LastMessageReceivedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgRecvTime)), - LocalFlowControlWindow: int64(t.fc.getSize()), - SocketOptions: channelz.GetSocketOption(t.conn), - LocalAddr: t.localAddr, - RemoteAddr: t.remoteAddr, - // RemoteName : - } - if au, ok := t.authInfo.(credentials.ChannelzSecurityInfo); ok { - s.Security = au.GetSecurityValue() - } - s.RemoteFlowControlWindow = t.getOutFlowWindow() - return &s +func (t *http2Client) socketMetrics() *channelz.EphemeralSocketMetrics { + return &channelz.EphemeralSocketMetrics{ + LocalFlowControlWindow: int64(t.fc.getSize()), + RemoteFlowControlWindow: t.getOutFlowWindow(), + } } func (t *http2Client) RemoteAddr() net.Addr { return t.remoteAddr } func (t *http2Client) IncrMsgSent() { - atomic.AddInt64(&t.czData.msgSent, 1) - atomic.StoreInt64(&t.czData.lastMsgSentTime, time.Now().UnixNano()) + t.channelz.SocketMetrics.MessagesSent.Add(1) + t.channelz.SocketMetrics.LastMessageSentTimestamp.Store(time.Now().UnixNano()) } func (t *http2Client) IncrMsgRecv() { - atomic.AddInt64(&t.czData.msgRecv, 1) - atomic.StoreInt64(&t.czData.lastMsgRecvTime, time.Now().UnixNano()) + t.channelz.SocketMetrics.MessagesReceived.Add(1) + t.channelz.SocketMetrics.LastMessageReceivedTimestamp.Store(time.Now().UnixNano()) } func (t *http2Client) getOutFlowWindow() int64 { diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 6fa1eb419..b7091165b 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -25,6 +25,7 @@ import ( "fmt" "io" "math" + "math/rand" "net" "net/http" "strconv" @@ -32,18 +33,17 @@ import ( "sync/atomic" "time" - "github.com/golang/protobuf/proto" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/grpcutil" "google.golang.org/grpc/internal/pretty" "google.golang.org/grpc/internal/syscall" + "google.golang.org/protobuf/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" - "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" @@ -68,18 +68,15 @@ var serverConnectionCounter uint64 // http2Server implements the ServerTransport interface with HTTP2. type http2Server struct { - lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. - ctx context.Context - done chan struct{} - conn net.Conn - loopy *loopyWriter - readerDone chan struct{} // sync point to enable testing. - writerDone chan struct{} // sync point to enable testing. - remoteAddr net.Addr - localAddr net.Addr - authInfo credentials.AuthInfo // auth info about the connection - inTapHandle tap.ServerInHandle - framer *framer + lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. + done chan struct{} + conn net.Conn + loopy *loopyWriter + readerDone chan struct{} // sync point to enable testing. + loopyWriterDone chan struct{} + peer peer.Peer + inTapHandle tap.ServerInHandle + framer *framer // The max number of concurrent streams. maxStreams uint32 // controlBuf delivers all the control related tasks (e.g., window @@ -121,8 +118,7 @@ type http2Server struct { idle time.Time // Fields below are for channelz metric collection. - channelzID *channelz.Identifier - czData *channelzData + channelz *channelz.Socket bufferPool *bufferPool connectionID uint64 @@ -243,16 +239,18 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, } done := make(chan struct{}) + peer := peer.Peer{ + Addr: conn.RemoteAddr(), + LocalAddr: conn.LocalAddr(), + AuthInfo: authInfo, + } t := &http2Server{ - ctx: setConnection(context.Background(), rawConn), done: done, conn: conn, - remoteAddr: conn.RemoteAddr(), - localAddr: conn.LocalAddr(), - authInfo: authInfo, + peer: peer, framer: framer, readerDone: make(chan struct{}), - writerDone: make(chan struct{}), + loopyWriterDone: make(chan struct{}), maxStreams: config.MaxStreams, inTapHandle: config.InTapHandle, fc: &trInFlow{limit: uint32(icwz)}, @@ -263,12 +261,25 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, idle: time.Now(), kep: kep, initialWindowSize: iwz, - czData: new(channelzData), bufferPool: newBufferPool(), } + var czSecurity credentials.ChannelzSecurityValue + if au, ok := authInfo.(credentials.ChannelzSecurityInfo); ok { + czSecurity = au.GetSecurityValue() + } + t.channelz = channelz.RegisterSocket( + &channelz.Socket{ + SocketType: channelz.SocketTypeNormal, + Parent: config.ChannelzParent, + SocketMetrics: channelz.SocketMetrics{}, + EphemeralMetrics: t.socketMetrics, + LocalAddr: t.peer.LocalAddr, + RemoteAddr: t.peer.Addr, + SocketOptions: channelz.GetSocketOption(t.conn), + Security: czSecurity, + }, + ) t.logger = prefixLoggerForServerTransport(t) - // Add peer information to the http2server context. - t.ctx = peer.NewContext(t.ctx, t.getPeer()) t.controlBuf = newControlBuffer(t.done) if dynamicWindow { @@ -277,18 +288,6 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, updateFlowControl: t.updateFlowControl, } } - for _, sh := range t.stats { - t.ctx = sh.TagConn(t.ctx, &stats.ConnTagInfo{ - RemoteAddr: t.remoteAddr, - LocalAddr: t.localAddr, - }) - connBegin := &stats.ConnBegin{} - sh.HandleConn(t.ctx, connBegin) - } - t.channelzID, err = channelz.RegisterNormalSocket(t, config.ChannelzParentID, fmt.Sprintf("%s -> %s", t.remoteAddr, t.localAddr)) - if err != nil { - return nil, err - } t.connectionID = atomic.AddUint64(&serverConnectionCounter, 1) t.framer.writer.Flush() @@ -331,10 +330,27 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, t.handleSettings(sf) go func() { - t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger) - t.loopy.ssGoAwayHandler = t.outgoingGoAwayHandler - t.loopy.run() - close(t.writerDone) + t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler) + err := t.loopy.run() + close(t.loopyWriterDone) + if !isIOError(err) { + // Close the connection if a non-I/O error occurs (for I/O errors + // the reader will also encounter the error and close). Wait 1 + // second before closing the connection, or when the reader is done + // (i.e. the client already closed the connection or a connection + // error occurred). This avoids the potential problem where there + // is unread data on the receive side of the connection, which, if + // closed, would lead to a TCP RST instead of FIN, and the client + // encountering errors. For more info: + // https://github.com/grpc/grpc-go/issues/5358 + timer := time.NewTimer(time.Second) + defer timer.Stop() + select { + case <-t.readerDone: + case <-timer.C: + } + t.conn.Close() + } }() go t.keepalive() return t, nil @@ -342,7 +358,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, // operateHeaders takes action on the decoded headers. Returns an error if fatal // error encountered and transport needs to close, otherwise returns nil. -func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream)) error { +func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeadersFrame, handle func(*Stream)) error { // Acquire max stream ID lock for entire duration t.maxStreamMu.Lock() defer t.maxStreamMu.Unlock() @@ -369,10 +385,11 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( buf := newRecvBuffer() s := &Stream{ - id: streamID, - st: t, - buf: buf, - fc: &inFlow{limit: uint32(t.initialWindowSize)}, + id: streamID, + st: t, + buf: buf, + fc: &inFlow{limit: uint32(t.initialWindowSize)}, + headerWireLength: int(frame.Header().Length), } var ( // if false, content-type was missing or invalid @@ -511,9 +528,9 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( s.state = streamReadDone } if timeoutSet { - s.ctx, s.cancel = context.WithTimeout(t.ctx, timeout) + s.ctx, s.cancel = context.WithTimeout(ctx, timeout) } else { - s.ctx, s.cancel = context.WithCancel(t.ctx) + s.ctx, s.cancel = context.WithCancel(ctx) } // Attach the received metadata to the context. @@ -586,24 +603,12 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( } t.mu.Unlock() if channelz.IsOn() { - atomic.AddInt64(&t.czData.streamsStarted, 1) - atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano()) + t.channelz.SocketMetrics.StreamsStarted.Add(1) + t.channelz.SocketMetrics.LastRemoteStreamCreatedTimestamp.Store(time.Now().UnixNano()) } s.requestRead = func(n int) { t.adjustWindow(s, uint32(n)) } - for _, sh := range t.stats { - s.ctx = sh.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) - inHeader := &stats.InHeader{ - FullMethod: s.method, - RemoteAddr: t.remoteAddr, - LocalAddr: t.localAddr, - Compression: s.recvCompress, - WireLength: int(frame.Header().Length), - Header: mdata.Copy(), - } - sh.HandleRPC(s.ctx, inHeader) - } s.ctxDone = s.ctx.Done() s.wq = newWriteQuota(defaultWriteQuota, s.ctxDone) s.trReader = &transportReader{ @@ -629,8 +634,11 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( // HandleStreams receives incoming streams using the given handler. This is // typically run in a separate goroutine. // traceCtx attaches trace to ctx and returns the new context. -func (t *http2Server) HandleStreams(handle func(*Stream)) { - defer close(t.readerDone) +func (t *http2Server) HandleStreams(ctx context.Context, handle func(*Stream)) { + defer func() { + close(t.readerDone) + <-t.loopyWriterDone + }() for { t.controlBuf.throttle() frame, err := t.framer.fr.ReadFrame() @@ -655,18 +663,20 @@ func (t *http2Server) HandleStreams(handle func(*Stream)) { } continue } - if err == io.EOF || err == io.ErrUnexpectedEOF { - t.Close(err) - return - } t.Close(err) return } switch frame := frame.(type) { case *http2.MetaHeadersFrame: - if err := t.operateHeaders(frame, handle); err != nil { - t.Close(err) - break + if err := t.operateHeaders(ctx, frame, handle); err != nil { + // Any error processing client headers, e.g. invalid stream ID, + // is considered a protocol violation. + t.controlBuf.put(&goAway{ + code: http2.ErrCodeProtocol, + debugData: []byte(err.Error()), + closeConn: err, + }) + continue } case *http2.DataFrame: t.handleData(frame) @@ -849,7 +859,7 @@ func (t *http2Server) handleSettings(f *http2.SettingsFrame) { } return nil }) - t.controlBuf.executeAndPut(func(any) bool { + t.controlBuf.executeAndPut(func() bool { for _, f := range updateFuncs { f() } @@ -979,7 +989,12 @@ func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error { } } if err := t.writeHeaderLocked(s); err != nil { - return status.Convert(err).Err() + switch e := err.(type) { + case ConnectionError: + return status.Error(codes.Unavailable, e.Desc) + default: + return status.Convert(err).Err() + } } return nil } @@ -998,12 +1013,13 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: s.sendCompress}) } headerFields = appendHeaderFieldsFromMD(headerFields, s.header) - success, err := t.controlBuf.executeAndPut(t.checkForHeaderListSize, &headerFrame{ + hf := &headerFrame{ streamID: s.id, hf: headerFields, endStream: false, onWrite: t.setResetPingStrikes, - }) + } + success, err := t.controlBuf.executeAndPut(func() bool { return t.checkForHeaderListSize(hf) }, hf) if !success { if err != nil { return err @@ -1192,12 +1208,12 @@ func (t *http2Server) keepalive() { continue } if outstandingPing && kpTimeoutLeft <= 0 { - t.Close(fmt.Errorf("keepalive ping not acked within timeout %s", t.kp.Time)) + t.Close(fmt.Errorf("keepalive ping not acked within timeout %s", t.kp.Timeout)) return } if !outstandingPing { if channelz.IsOn() { - atomic.AddInt64(&t.czData.kpCount, 1) + t.channelz.SocketMetrics.KeepAlivesSent.Add(1) } t.controlBuf.put(p) kpTimeoutLeft = t.kp.Timeout @@ -1237,15 +1253,11 @@ func (t *http2Server) Close(err error) { if err := t.conn.Close(); err != nil && t.logger.V(logLevel) { t.logger.Infof("Error closing underlying net.Conn during Close: %v", err) } - channelz.RemoveEntry(t.channelzID) + channelz.RemoveEntry(t.channelz.ID) // Cancel all active streams. for _, s := range streams { s.cancel() } - for _, sh := range t.stats { - connEnd := &stats.ConnEnd{} - sh.HandleConn(t.ctx, connEnd) - } } // deleteStream deletes the stream s from transport's active streams. @@ -1262,9 +1274,9 @@ func (t *http2Server) deleteStream(s *Stream, eosReceived bool) { if channelz.IsOn() { if eosReceived { - atomic.AddInt64(&t.czData.streamsSucceeded, 1) + t.channelz.SocketMetrics.StreamsSucceeded.Add(1) } else { - atomic.AddInt64(&t.czData.streamsFailed, 1) + t.channelz.SocketMetrics.StreamsFailed.Add(1) } } } @@ -1311,10 +1323,6 @@ func (t *http2Server) closeStream(s *Stream, rst bool, rstCode http2.ErrCode, eo }) } -func (t *http2Server) RemoteAddr() net.Addr { - return t.remoteAddr -} - func (t *http2Server) Drain(debugData string) { t.mu.Lock() defer t.mu.Unlock() @@ -1351,6 +1359,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { if err := t.framer.fr.WriteGoAway(sid, g.code, g.debugData); err != nil { return false, err } + t.framer.writer.Flush() if retErr != nil { return false, retErr } @@ -1371,7 +1380,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { return false, err } go func() { - timer := time.NewTimer(time.Minute) + timer := time.NewTimer(5 * time.Second) defer timer.Stop() select { case <-t.drainEvent.Done(): @@ -1384,38 +1393,21 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { return false, nil } -func (t *http2Server) ChannelzMetric() *channelz.SocketInternalMetric { - s := channelz.SocketInternalMetric{ - StreamsStarted: atomic.LoadInt64(&t.czData.streamsStarted), - StreamsSucceeded: atomic.LoadInt64(&t.czData.streamsSucceeded), - StreamsFailed: atomic.LoadInt64(&t.czData.streamsFailed), - MessagesSent: atomic.LoadInt64(&t.czData.msgSent), - MessagesReceived: atomic.LoadInt64(&t.czData.msgRecv), - KeepAlivesSent: atomic.LoadInt64(&t.czData.kpCount), - LastRemoteStreamCreatedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastStreamCreatedTime)), - LastMessageSentTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgSentTime)), - LastMessageReceivedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgRecvTime)), - LocalFlowControlWindow: int64(t.fc.getSize()), - SocketOptions: channelz.GetSocketOption(t.conn), - LocalAddr: t.localAddr, - RemoteAddr: t.remoteAddr, - // RemoteName : - } - if au, ok := t.authInfo.(credentials.ChannelzSecurityInfo); ok { - s.Security = au.GetSecurityValue() - } - s.RemoteFlowControlWindow = t.getOutFlowWindow() - return &s +func (t *http2Server) socketMetrics() *channelz.EphemeralSocketMetrics { + return &channelz.EphemeralSocketMetrics{ + LocalFlowControlWindow: int64(t.fc.getSize()), + RemoteFlowControlWindow: t.getOutFlowWindow(), + } } func (t *http2Server) IncrMsgSent() { - atomic.AddInt64(&t.czData.msgSent, 1) - atomic.StoreInt64(&t.czData.lastMsgSentTime, time.Now().UnixNano()) + t.channelz.SocketMetrics.MessagesSent.Add(1) + t.channelz.SocketMetrics.LastMessageSentTimestamp.Add(1) } func (t *http2Server) IncrMsgRecv() { - atomic.AddInt64(&t.czData.msgRecv, 1) - atomic.StoreInt64(&t.czData.lastMsgRecvTime, time.Now().UnixNano()) + t.channelz.SocketMetrics.MessagesReceived.Add(1) + t.channelz.SocketMetrics.LastMessageReceivedTimestamp.Add(1) } func (t *http2Server) getOutFlowWindow() int64 { @@ -1433,10 +1425,12 @@ func (t *http2Server) getOutFlowWindow() int64 { } } -func (t *http2Server) getPeer() *peer.Peer { +// Peer returns the peer of the transport. +func (t *http2Server) Peer() *peer.Peer { return &peer.Peer{ - Addr: t.remoteAddr, - AuthInfo: t.authInfo, // Can be nil + Addr: t.peer.Addr, + LocalAddr: t.peer.LocalAddr, + AuthInfo: t.peer.AuthInfo, // Can be nil } } @@ -1446,7 +1440,7 @@ func getJitter(v time.Duration) time.Duration { } // Generate a jitter between +/- 10% of the value. r := int64(v / 10) - j := grpcrand.Int63n(2*r) - r + j := rand.Int63n(2*r) - r return time.Duration(j) } @@ -1461,6 +1455,6 @@ func GetConnection(ctx context.Context) net.Conn { // SetConnection adds the connection to the context to be able to get // information about the destination ip and port for an incoming RPC. This also // allows any unary or streaming interceptors to see the connection. -func setConnection(ctx context.Context, conn net.Conn) context.Context { +func SetConnection(ctx context.Context, conn net.Conn) context.Context { return context.WithValue(ctx, connectionKey{}, conn) } diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go index dc29d590e..39cef3bd4 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http_util.go +++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go @@ -418,10 +418,9 @@ func newFramer(conn net.Conn, writeBufferSize, readBufferSize int, sharedWriteBu return f } -func getWriteBufferPool(writeBufferSize int) *sync.Pool { +func getWriteBufferPool(size int) *sync.Pool { writeBufferMutex.Lock() defer writeBufferMutex.Unlock() - size := writeBufferSize * 2 pool, ok := writeBufferPoolMap[size] if ok { return pool diff --git a/vendor/google.golang.org/grpc/internal/transport/proxy.go b/vendor/google.golang.org/grpc/internal/transport/proxy.go index 415961987..24fa10325 100644 --- a/vendor/google.golang.org/grpc/internal/transport/proxy.go +++ b/vendor/google.golang.org/grpc/internal/transport/proxy.go @@ -28,6 +28,8 @@ import ( "net/http" "net/http/httputil" "net/url" + + "google.golang.org/grpc/internal" ) const proxyAuthHeaderKey = "Proxy-Authorization" @@ -112,7 +114,7 @@ func doHTTPConnectHandshake(ctx context.Context, conn net.Conn, backendAddr stri // proxyDial dials, connecting to a proxy first if necessary. Checks if a proxy // is necessary, dials, does the HTTP CONNECT handshake, and returns the // connection. -func proxyDial(ctx context.Context, addr string, grpcUA string) (conn net.Conn, err error) { +func proxyDial(ctx context.Context, addr string, grpcUA string) (net.Conn, error) { newAddr := addr proxyURL, err := mapAddress(addr) if err != nil { @@ -122,15 +124,15 @@ func proxyDial(ctx context.Context, addr string, grpcUA string) (conn net.Conn, newAddr = proxyURL.Host } - conn, err = (&net.Dialer{}).DialContext(ctx, "tcp", newAddr) + conn, err := internal.NetDialerWithTCPKeepalive().DialContext(ctx, "tcp", newAddr) if err != nil { - return + return nil, err } - if proxyURL != nil { + if proxyURL == nil { // proxy is disabled if proxyURL is nil. - conn, err = doHTTPConnectHandshake(ctx, conn, addr, proxyURL, grpcUA) + return conn, err } - return + return doHTTPConnectHandshake(ctx, conn, addr, proxyURL, grpcUA) } func sendHTTPRequest(ctx context.Context, req *http.Request, conn net.Conn) error { diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index aac056e72..4b39c0ade 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -28,6 +28,7 @@ import ( "fmt" "io" "net" + "strings" "sync" "sync/atomic" "time" @@ -37,6 +38,7 @@ import ( "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" "google.golang.org/grpc/resolver" "google.golang.org/grpc/stats" "google.golang.org/grpc/status" @@ -265,7 +267,8 @@ type Stream struct { // headerValid indicates whether a valid header was received. Only // meaningful after headerChan is closed (always call waitOnHeader() before // reading its value). Not valid on server side. - headerValid bool + headerValid bool + headerWireLength int // Only set on server side. // hdrMu protects header and trailer metadata on the server-side. hdrMu sync.Mutex @@ -301,7 +304,7 @@ func (s *Stream) isHeaderSent() bool { } // updateHeaderSent updates headerSent and returns true -// if it was alreay set. It is valid only on server-side. +// if it was already set. It is valid only on server-side. func (s *Stream) updateHeaderSent() bool { return atomic.SwapUint32(&s.headerSent, 1) == 1 } @@ -360,8 +363,12 @@ func (s *Stream) SendCompress() string { // ClientAdvertisedCompressors returns the compressor names advertised by the // client via grpc-accept-encoding header. -func (s *Stream) ClientAdvertisedCompressors() string { - return s.clientAdvertisedCompressors +func (s *Stream) ClientAdvertisedCompressors() []string { + values := strings.Split(s.clientAdvertisedCompressors, ",") + for i, v := range values { + values[i] = strings.TrimSpace(v) + } + return values } // Done returns a channel which is closed when it receives the final status @@ -425,6 +432,12 @@ func (s *Stream) Context() context.Context { return s.ctx } +// SetContext sets the context of the stream. This will be deleted once the +// stats handler callouts all move to gRPC layer. +func (s *Stream) SetContext(ctx context.Context) { + s.ctx = ctx +} + // Method returns the method for the stream. func (s *Stream) Method() string { return s.method @@ -437,6 +450,12 @@ func (s *Stream) Status() *status.Status { return s.status } +// HeaderWireLength returns the size of the headers of the stream as received +// from the wire. Valid only on the server. +func (s *Stream) HeaderWireLength() int { + return s.headerWireLength +} + // SetHeader sets the header metadata. This can be called multiple times. // Server side only. // This should not be called in parallel to other data writes. @@ -552,7 +571,7 @@ type ServerConfig struct { WriteBufferSize int ReadBufferSize int SharedWriteBuffer bool - ChannelzParentID *channelz.Identifier + ChannelzParent *channelz.Server MaxHeaderListSize *uint32 HeaderTableSize *uint32 } @@ -587,8 +606,8 @@ type ConnectOptions struct { ReadBufferSize int // SharedWriteBuffer indicates whether connections should reuse write buffer SharedWriteBuffer bool - // ChannelzParentID sets the addrConn id which initiate the creation of this client transport. - ChannelzParentID *channelz.Identifier + // ChannelzParent sets the addrConn id which initiated the creation of this client transport. + ChannelzParent *channelz.SubChannel // MaxHeaderListSize sets the max (uncompressed) size of header list that is prepared to be received. MaxHeaderListSize *uint32 // UseProxy specifies if a proxy should be used. @@ -698,7 +717,7 @@ type ClientTransport interface { // Write methods for a given Stream will be called serially. type ServerTransport interface { // HandleStreams receives incoming streams using the given handler. - HandleStreams(func(*Stream)) + HandleStreams(context.Context, func(*Stream)) // WriteHeader sends the header metadata for the given stream. // WriteHeader may not be called on all streams. @@ -717,8 +736,8 @@ type ServerTransport interface { // handlers will be terminated asynchronously. Close(err error) - // RemoteAddr returns the remote network address. - RemoteAddr() net.Addr + // Peer returns the peer of the server transport. + Peer() *peer.Peer // Drain notifies the client this ServerTransport stops accepting new RPCs. Drain(debugData string) @@ -801,30 +820,6 @@ const ( GoAwayTooManyPings GoAwayReason = 2 ) -// channelzData is used to store channelz related data for http2Client and http2Server. -// These fields cannot be embedded in the original structs (e.g. http2Client), since to do atomic -// operation on int64 variable on 32-bit machine, user is responsible to enforce memory alignment. -// Here, by grouping those int64 fields inside a struct, we are enforcing the alignment. -type channelzData struct { - kpCount int64 - // The number of streams that have started, including already finished ones. - streamsStarted int64 - // Client side: The number of streams that have ended successfully by receiving - // EoS bit set frame from server. - // Server side: The number of streams that have ended successfully by sending - // frame with EoS bit set. - streamsSucceeded int64 - streamsFailed int64 - // lastStreamCreatedTime stores the timestamp that the last stream gets created. It is of int64 type - // instead of time.Time since it's more costly to atomically update time.Time variable than int64 - // variable. The same goes for lastMsgSentTime and lastMsgRecvTime. - lastStreamCreatedTime int64 - msgSent int64 - msgRecv int64 - lastMsgSentTime int64 - lastMsgRecvTime int64 -} - // ContextErr converts the error from context package into a status error. func ContextErr(err error) error { switch err { diff --git a/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go b/vendor/google.golang.org/grpc/internal/xds/xds.go similarity index 89% rename from vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go rename to vendor/google.golang.org/grpc/internal/xds/xds.go index e8b492774..024c388b7 100644 --- a/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go +++ b/vendor/google.golang.org/grpc/internal/xds/xds.go @@ -14,7 +14,9 @@ * limitations under the License. */ -package internal +// Package xds contains methods to Get/Set handshake cluster names. It is separated +// out from the top level /internal package to avoid circular dependencies. +package xds import ( "google.golang.org/grpc/attributes" diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go index a2cdcaf12..1e9485fd6 100644 --- a/vendor/google.golang.org/grpc/metadata/metadata.go +++ b/vendor/google.golang.org/grpc/metadata/metadata.go @@ -25,8 +25,14 @@ import ( "context" "fmt" "strings" + + "google.golang.org/grpc/internal" ) +func init() { + internal.FromOutgoingContextRaw = fromOutgoingContextRaw +} + // DecodeKeyValue returns k, v, nil. // // Deprecated: use k and v directly instead. @@ -153,14 +159,16 @@ func Join(mds ...MD) MD { type mdIncomingKey struct{} type mdOutgoingKey struct{} -// NewIncomingContext creates a new context with incoming md attached. +// NewIncomingContext creates a new context with incoming md attached. md must +// not be modified after calling this function. func NewIncomingContext(ctx context.Context, md MD) context.Context { return context.WithValue(ctx, mdIncomingKey{}, md) } // NewOutgoingContext creates a new context with outgoing md attached. If used // in conjunction with AppendToOutgoingContext, NewOutgoingContext will -// overwrite any previously-appended metadata. +// overwrite any previously-appended metadata. md must not be modified after +// calling this function. func NewOutgoingContext(ctx context.Context, md MD) context.Context { return context.WithValue(ctx, mdOutgoingKey{}, rawMD{md: md}) } @@ -203,7 +211,8 @@ func FromIncomingContext(ctx context.Context) (MD, bool) { } // ValueFromIncomingContext returns the metadata value corresponding to the metadata -// key from the incoming metadata if it exists. Key must be lower-case. +// key from the incoming metadata if it exists. Keys are matched in a case insensitive +// manner. // // # Experimental // @@ -219,33 +228,29 @@ func ValueFromIncomingContext(ctx context.Context, key string) []string { return copyOf(v) } for k, v := range md { - // We need to manually convert all keys to lower case, because MD is a - // map, and there's no guarantee that the MD attached to the context is - // created using our helper functions. - if strings.ToLower(k) == key { + // Case insenitive comparison: MD is a map, and there's no guarantee + // that the MD attached to the context is created using our helper + // functions. + if strings.EqualFold(k, key) { return copyOf(v) } } return nil } -// the returned slice must not be modified in place func copyOf(v []string) []string { vals := make([]string, len(v)) copy(vals, v) return vals } -// FromOutgoingContextRaw returns the un-merged, intermediary contents of rawMD. +// fromOutgoingContextRaw returns the un-merged, intermediary contents of rawMD. // // Remember to perform strings.ToLower on the keys, for both the returned MD (MD // is a map, there's no guarantee it's created using our helper functions) and // the extra kv pairs (AppendToOutgoingContext doesn't turn them into // lowercase). -// -// This is intended for gRPC-internal use ONLY. Users should use -// FromOutgoingContext instead. -func FromOutgoingContextRaw(ctx context.Context) (MD, [][]string, bool) { +func fromOutgoingContextRaw(ctx context.Context) (MD, [][]string, bool) { raw, ok := ctx.Value(mdOutgoingKey{}).(rawMD) if !ok { return nil, nil, false diff --git a/vendor/google.golang.org/grpc/peer/peer.go b/vendor/google.golang.org/grpc/peer/peer.go index e01d219ff..499a49c8c 100644 --- a/vendor/google.golang.org/grpc/peer/peer.go +++ b/vendor/google.golang.org/grpc/peer/peer.go @@ -22,7 +22,9 @@ package peer import ( "context" + "fmt" "net" + "strings" "google.golang.org/grpc/credentials" ) @@ -32,11 +34,41 @@ import ( type Peer struct { // Addr is the peer address. Addr net.Addr + // LocalAddr is the local address. + LocalAddr net.Addr // AuthInfo is the authentication information of the transport. // It is nil if there is no transport security being used. AuthInfo credentials.AuthInfo } +// String ensures the Peer types implements the Stringer interface in order to +// allow to print a context with a peerKey value effectively. +func (p *Peer) String() string { + if p == nil { + return "Peer<nil>" + } + sb := &strings.Builder{} + sb.WriteString("Peer{") + if p.Addr != nil { + fmt.Fprintf(sb, "Addr: '%s', ", p.Addr.String()) + } else { + fmt.Fprintf(sb, "Addr: <nil>, ") + } + if p.LocalAddr != nil { + fmt.Fprintf(sb, "LocalAddr: '%s', ", p.LocalAddr.String()) + } else { + fmt.Fprintf(sb, "LocalAddr: <nil>, ") + } + if p.AuthInfo != nil { + fmt.Fprintf(sb, "AuthInfo: '%s'", p.AuthInfo.AuthType()) + } else { + fmt.Fprintf(sb, "AuthInfo: <nil>") + } + sb.WriteString("}") + + return sb.String() +} + type peerKey struct{} // NewContext creates a new context with peer information attached. diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 236837f41..bdaa2130e 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -20,8 +20,9 @@ package grpc import ( "context" + "fmt" "io" - "sync" + "sync/atomic" "google.golang.org/grpc/balancer" "google.golang.org/grpc/codes" @@ -32,40 +33,43 @@ import ( "google.golang.org/grpc/status" ) +// pickerGeneration stores a picker and a channel used to signal that a picker +// newer than this one is available. +type pickerGeneration struct { + // picker is the picker produced by the LB policy. May be nil if a picker + // has never been produced. + picker balancer.Picker + // blockingCh is closed when the picker has been invalidated because there + // is a new one available. + blockingCh chan struct{} +} + // pickerWrapper is a wrapper of balancer.Picker. It blocks on certain pick // actions and unblock when there's a picker update. type pickerWrapper struct { - mu sync.Mutex - done bool - idle bool - blockingCh chan struct{} - picker balancer.Picker + // If pickerGen holds a nil pointer, the pickerWrapper is closed. + pickerGen atomic.Pointer[pickerGeneration] statsHandlers []stats.Handler // to record blocking picker calls } func newPickerWrapper(statsHandlers []stats.Handler) *pickerWrapper { - return &pickerWrapper{ - blockingCh: make(chan struct{}), + pw := &pickerWrapper{ statsHandlers: statsHandlers, } + pw.pickerGen.Store(&pickerGeneration{ + blockingCh: make(chan struct{}), + }) + return pw } -// updatePicker is called by UpdateBalancerState. It unblocks all blocked pick. +// updatePicker is called by UpdateState calls from the LB policy. It +// unblocks all blocked pick. func (pw *pickerWrapper) updatePicker(p balancer.Picker) { - pw.mu.Lock() - if pw.done || pw.idle { - // There is a small window where a picker update from the LB policy can - // race with the channel going to idle mode. If the picker is idle here, - // it is because the channel asked it to do so, and therefore it is sage - // to ignore the update from the LB policy. - pw.mu.Unlock() - return - } - pw.picker = p - // pw.blockingCh should never be nil. - close(pw.blockingCh) - pw.blockingCh = make(chan struct{}) - pw.mu.Unlock() + old := pw.pickerGen.Swap(&pickerGeneration{ + picker: p, + blockingCh: make(chan struct{}), + }) + close(old.blockingCh) } // doneChannelzWrapper performs the following: @@ -102,27 +106,24 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. var lastPickErr error for { - pw.mu.Lock() - if pw.done { - pw.mu.Unlock() + pg := pw.pickerGen.Load() + if pg == nil { return nil, balancer.PickResult{}, ErrClientConnClosing } - - if pw.picker == nil { - ch = pw.blockingCh + if pg.picker == nil { + ch = pg.blockingCh } - if ch == pw.blockingCh { + if ch == pg.blockingCh { // This could happen when either: // - pw.picker is nil (the previous if condition), or - // - has called pick on the current picker. - pw.mu.Unlock() + // - we have already called pick on the current picker. select { case <-ctx.Done(): var errStr string if lastPickErr != nil { errStr = "latest balancer error: " + lastPickErr.Error() } else { - errStr = ctx.Err().Error() + errStr = fmt.Sprintf("received context error while waiting for new LB policy update: %s", ctx.Err().Error()) } switch ctx.Err() { case context.DeadlineExceeded: @@ -149,9 +150,8 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } } - ch = pw.blockingCh - p := pw.picker - pw.mu.Unlock() + ch = pg.blockingCh + p := pg.picker pickResult, err := p.Pick(info) if err != nil { @@ -201,32 +201,15 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } func (pw *pickerWrapper) close() { - pw.mu.Lock() - defer pw.mu.Unlock() - if pw.done { - return - } - pw.done = true - close(pw.blockingCh) + old := pw.pickerGen.Swap(nil) + close(old.blockingCh) } -func (pw *pickerWrapper) enterIdleMode() { - pw.mu.Lock() - defer pw.mu.Unlock() - if pw.done { - return - } - pw.idle = true -} - -func (pw *pickerWrapper) exitIdleMode() { - pw.mu.Lock() - defer pw.mu.Unlock() - if pw.done { - return - } - pw.blockingCh = make(chan struct{}) - pw.idle = false +// reset clears the pickerWrapper and prepares it for being used again when idle +// mode is exited. +func (pw *pickerWrapper) reset() { + old := pw.pickerGen.Swap(&pickerGeneration{blockingCh: make(chan struct{})}) + close(old.blockingCh) } // dropError is a wrapper error that indicates the LB policy wishes to drop the diff --git a/vendor/google.golang.org/grpc/regenerate.sh b/vendor/google.golang.org/grpc/regenerate.sh index a6f26c8ab..3edca296c 100644 --- a/vendor/google.golang.org/grpc/regenerate.sh +++ b/vendor/google.golang.org/grpc/regenerate.sh @@ -63,7 +63,7 @@ LEGACY_SOURCES=( # Generates only the new gRPC Service symbols SOURCES=( - $(git ls-files --exclude-standard --cached --others "*.proto" | grep -v '^\(profiling/proto/service.proto\|reflection/grpc_reflection_v1alpha/reflection.proto\)$') + $(git ls-files --exclude-standard --cached --others "*.proto" | grep -v '^profiling/proto/service.proto$') ${WORKDIR}/grpc-proto/grpc/gcp/altscontext.proto ${WORKDIR}/grpc-proto/grpc/gcp/handshaker.proto ${WORKDIR}/grpc-proto/grpc/gcp/transport_security_common.proto @@ -93,7 +93,7 @@ Mgrpc/testing/empty.proto=google.golang.org/grpc/interop/grpc_testing for src in ${SOURCES[@]}; do echo "protoc ${src}" - protoc --go_out=${OPTS}:${WORKDIR}/out --go-grpc_out=${OPTS}:${WORKDIR}/out \ + protoc --go_out=${OPTS}:${WORKDIR}/out --go-grpc_out=${OPTS},use_generic_streams_experimental=true:${WORKDIR}/out \ -I"." \ -I${WORKDIR}/grpc-proto \ -I${WORKDIR}/googleapis \ @@ -118,6 +118,6 @@ mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/ # grpc_testing_not_regenerate/*.pb.go are not re-generated, # see grpc_testing_not_regenerate/README.md for details. -rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testing_not_regenerate/*.pb.go +rm ${WORKDIR}/out/google.golang.org/grpc/reflection/test/grpc_testing_not_regenerate/*.pb.go cp -R ${WORKDIR}/out/google.golang.org/grpc/* . diff --git a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go new file mode 100644 index 000000000..ef3d6ed6c --- /dev/null +++ b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go @@ -0,0 +1,60 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package dns implements a dns resolver to be installed as the default resolver +// in grpc. +package dns + +import ( + "time" + + "google.golang.org/grpc/internal/resolver/dns" + "google.golang.org/grpc/resolver" +) + +// SetResolvingTimeout sets the maximum duration for DNS resolution requests. +// +// This function affects the global timeout used by all channels using the DNS +// name resolver scheme. +// +// It must be called only at application startup, before any gRPC calls are +// made. Modifying this value after initialization is not thread-safe. +// +// The default value is 30 seconds. Setting the timeout too low may result in +// premature timeouts during resolution, while setting it too high may lead to +// unnecessary delays in service discovery. Choose a value appropriate for your +// specific needs and network environment. +func SetResolvingTimeout(timeout time.Duration) { + dns.ResolvingTimeout = timeout +} + +// NewBuilder creates a dnsBuilder which is used to factory DNS resolvers. +// +// Deprecated: import grpc and use resolver.Get("dns") instead. +func NewBuilder() resolver.Builder { + return dns.NewBuilder() +} + +// SetMinResolutionInterval sets the default minimum interval at which DNS +// re-resolutions are allowed. This helps to prevent excessive re-resolution. +// +// It must be called only at application startup, before any gRPC calls are +// made. Modifying this value after initialization is not thread-safe. +func SetMinResolutionInterval(d time.Duration) { + dns.MinResolutionInterval = d +} diff --git a/vendor/google.golang.org/grpc/resolver/manual/manual.go b/vendor/google.golang.org/grpc/resolver/manual/manual.go index 0a4262342..f2efa2a2c 100644 --- a/vendor/google.golang.org/grpc/resolver/manual/manual.go +++ b/vendor/google.golang.org/grpc/resolver/manual/manual.go @@ -78,12 +78,12 @@ func (r *Resolver) InitialState(s resolver.State) { func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { r.BuildCallback(target, cc, opts) r.mu.Lock() + defer r.mu.Unlock() r.CC = cc if r.lastSeenState != nil { err := r.CC.UpdateState(*r.lastSeenState) go r.UpdateStateCallback(err) } - r.mu.Unlock() return r, nil } @@ -105,15 +105,22 @@ func (r *Resolver) Close() { // UpdateState calls CC.UpdateState. func (r *Resolver) UpdateState(s resolver.State) { r.mu.Lock() - err := r.CC.UpdateState(s) + defer r.mu.Unlock() + var err error + if r.CC == nil { + panic("cannot update state as grpc.Dial with resolver has not been called") + } + err = r.CC.UpdateState(s) r.lastSeenState = &s - r.mu.Unlock() r.UpdateStateCallback(err) } // ReportError calls CC.ReportError. func (r *Resolver) ReportError(err error) { r.mu.Lock() + defer r.mu.Unlock() + if r.CC == nil { + panic("cannot report error as grpc.Dial with resolver has not been called") + } r.CC.ReportError(err) - r.mu.Unlock() } diff --git a/vendor/google.golang.org/grpc/resolver/map.go b/vendor/google.golang.org/grpc/resolver/map.go index 804be887d..ada5b9bb7 100644 --- a/vendor/google.golang.org/grpc/resolver/map.go +++ b/vendor/google.golang.org/grpc/resolver/map.go @@ -136,3 +136,116 @@ func (a *AddressMap) Values() []any { } return ret } + +type endpointNode struct { + addrs map[string]struct{} +} + +// Equal returns whether the unordered set of addrs are the same between the +// endpoint nodes. +func (en *endpointNode) Equal(en2 *endpointNode) bool { + if len(en.addrs) != len(en2.addrs) { + return false + } + for addr := range en.addrs { + if _, ok := en2.addrs[addr]; !ok { + return false + } + } + return true +} + +func toEndpointNode(endpoint Endpoint) endpointNode { + en := make(map[string]struct{}) + for _, addr := range endpoint.Addresses { + en[addr.Addr] = struct{}{} + } + return endpointNode{ + addrs: en, + } +} + +// EndpointMap is a map of endpoints to arbitrary values keyed on only the +// unordered set of address strings within an endpoint. This map is not thread +// safe, thus it is unsafe to access concurrently. Must be created via +// NewEndpointMap; do not construct directly. +type EndpointMap struct { + endpoints map[*endpointNode]any +} + +// NewEndpointMap creates a new EndpointMap. +func NewEndpointMap() *EndpointMap { + return &EndpointMap{ + endpoints: make(map[*endpointNode]any), + } +} + +// Get returns the value for the address in the map, if present. +func (em *EndpointMap) Get(e Endpoint) (value any, ok bool) { + en := toEndpointNode(e) + if endpoint := em.find(en); endpoint != nil { + return em.endpoints[endpoint], true + } + return nil, false +} + +// Set updates or adds the value to the address in the map. +func (em *EndpointMap) Set(e Endpoint, value any) { + en := toEndpointNode(e) + if endpoint := em.find(en); endpoint != nil { + em.endpoints[endpoint] = value + return + } + em.endpoints[&en] = value +} + +// Len returns the number of entries in the map. +func (em *EndpointMap) Len() int { + return len(em.endpoints) +} + +// Keys returns a slice of all current map keys, as endpoints specifying the +// addresses present in the endpoint keys, in which uniqueness is determined by +// the unordered set of addresses. Thus, endpoint information returned is not +// the full endpoint data (drops duplicated addresses and attributes) but can be +// used for EndpointMap accesses. +func (em *EndpointMap) Keys() []Endpoint { + ret := make([]Endpoint, 0, len(em.endpoints)) + for en := range em.endpoints { + var endpoint Endpoint + for addr := range en.addrs { + endpoint.Addresses = append(endpoint.Addresses, Address{Addr: addr}) + } + ret = append(ret, endpoint) + } + return ret +} + +// Values returns a slice of all current map values. +func (em *EndpointMap) Values() []any { + ret := make([]any, 0, len(em.endpoints)) + for _, val := range em.endpoints { + ret = append(ret, val) + } + return ret +} + +// find returns a pointer to the endpoint node in em if the endpoint node is +// already present. If not found, nil is returned. The comparisons are done on +// the unordered set of addresses within an endpoint. +func (em EndpointMap) find(e endpointNode) *endpointNode { + for endpoint := range em.endpoints { + if e.Equal(endpoint) { + return endpoint + } + } + return nil +} + +// Delete removes the specified endpoint from the map. +func (em *EndpointMap) Delete(e Endpoint) { + en := toEndpointNode(e) + if entry := em.find(en); entry != nil { + delete(em.endpoints, entry) + } +} diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index 11384e228..202854511 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -29,6 +29,7 @@ import ( "google.golang.org/grpc/attributes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal" "google.golang.org/grpc/serviceconfig" ) @@ -63,16 +64,18 @@ func Get(scheme string) Builder { } // SetDefaultScheme sets the default scheme that will be used. The default -// default scheme is "passthrough". +// scheme is initially set to "passthrough". // // NOTE: this function must only be called during initialization time (i.e. in // an init() function), and is not thread-safe. The scheme set last overrides // previously set values. func SetDefaultScheme(scheme string) { defaultScheme = scheme + internal.UserSetDefaultScheme = true } -// GetDefaultScheme gets the default scheme that will be used. +// GetDefaultScheme gets the default scheme that will be used by grpc.Dial. If +// SetDefaultScheme is never called, the default scheme used by grpc.NewClient is "dns" instead. func GetDefaultScheme() string { return defaultScheme } @@ -168,6 +171,9 @@ type BuildOptions struct { // field. In most cases though, it is not appropriate, and this field may // be ignored. Dialer func(context.Context, string) (net.Conn, error) + // Authority is the effective authority of the clientconn for which the + // resolver is built. + Authority string } // An Endpoint is one network endpoint, or server, which may have multiple @@ -240,11 +246,6 @@ type ClientConn interface { // // Deprecated: Use UpdateState instead. NewAddress(addresses []Address) - // NewServiceConfig is called by resolver to notify ClientConn a new - // service config. The service config should be provided as a json string. - // - // Deprecated: Use UpdateState instead. - NewServiceConfig(serviceConfig string) // ParseServiceConfig parses the provided service config and returns an // object that provides the parsed config. ParseServiceConfig(serviceConfigJSON string) *serviceconfig.ParseResult @@ -286,6 +287,11 @@ func (t Target) Endpoint() string { return strings.TrimPrefix(endpoint, "/") } +// String returns the canonical string representation of Target. +func (t Target) String() string { + return t.URL.Scheme + "://" + t.URL.Host + "/" + t.Endpoint() +} + // Builder creates a resolver that will be used to watch name resolution updates. type Builder interface { // Build creates a new resolver for the given target. @@ -314,3 +320,13 @@ type Resolver interface { // Close closes the resolver. Close() } + +// AuthorityOverrider is implemented by Builders that wish to override the +// default authority for the ClientConn. +// By default, the authority used is target.Endpoint(). +type AuthorityOverrider interface { + // OverrideAuthority returns the authority to use for a ClientConn with the + // given target. The implementation must generate it without blocking, + // typically in line, and must keep it unchanged. + OverrideAuthority(Target) string +} diff --git a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go deleted file mode 100644 index d68330560..000000000 --- a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go +++ /dev/null @@ -1,247 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "context" - "strings" - "sync" - - "google.golang.org/grpc/balancer" - "google.golang.org/grpc/internal/channelz" - "google.golang.org/grpc/internal/grpcsync" - "google.golang.org/grpc/internal/pretty" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/serviceconfig" -) - -// resolverStateUpdater wraps the single method used by ccResolverWrapper to -// report a state update from the actual resolver implementation. -type resolverStateUpdater interface { - updateResolverState(s resolver.State, err error) error -} - -// ccResolverWrapper is a wrapper on top of cc for resolvers. -// It implements resolver.ClientConn interface. -type ccResolverWrapper struct { - // The following fields are initialized when the wrapper is created and are - // read-only afterwards, and therefore can be accessed without a mutex. - cc resolverStateUpdater - channelzID *channelz.Identifier - ignoreServiceConfig bool - opts ccResolverWrapperOpts - serializer *grpcsync.CallbackSerializer // To serialize all incoming calls. - serializerCancel context.CancelFunc // To close the serializer, accessed only from close(). - - // All incoming (resolver --> gRPC) calls are guaranteed to execute in a - // mutually exclusive manner as they are scheduled on the serializer. - // Fields accessed *only* in these serializer callbacks, can therefore be - // accessed without a mutex. - curState resolver.State - - // mu guards access to the below fields. - mu sync.Mutex - closed bool - resolver resolver.Resolver // Accessed only from outgoing calls. -} - -// ccResolverWrapperOpts wraps the arguments to be passed when creating a new -// ccResolverWrapper. -type ccResolverWrapperOpts struct { - target resolver.Target // User specified dial target to resolve. - builder resolver.Builder // Resolver builder to use. - bOpts resolver.BuildOptions // Resolver build options to use. - channelzID *channelz.Identifier // Channelz identifier for the channel. -} - -// newCCResolverWrapper uses the resolver.Builder to build a Resolver and -// returns a ccResolverWrapper object which wraps the newly built resolver. -func newCCResolverWrapper(cc resolverStateUpdater, opts ccResolverWrapperOpts) (*ccResolverWrapper, error) { - ctx, cancel := context.WithCancel(context.Background()) - ccr := &ccResolverWrapper{ - cc: cc, - channelzID: opts.channelzID, - ignoreServiceConfig: opts.bOpts.DisableServiceConfig, - opts: opts, - serializer: grpcsync.NewCallbackSerializer(ctx), - serializerCancel: cancel, - } - - // Cannot hold the lock at build time because the resolver can send an - // update or error inline and these incoming calls grab the lock to schedule - // a callback in the serializer. - r, err := opts.builder.Build(opts.target, ccr, opts.bOpts) - if err != nil { - cancel() - return nil, err - } - - // Any error reported by the resolver at build time that leads to a - // re-resolution request from the balancer is dropped by grpc until we - // return from this function. So, we don't have to handle pending resolveNow - // requests here. - ccr.mu.Lock() - ccr.resolver = r - ccr.mu.Unlock() - - return ccr, nil -} - -func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) { - ccr.mu.Lock() - defer ccr.mu.Unlock() - - // ccr.resolver field is set only after the call to Build() returns. But in - // the process of building, the resolver may send an error update which when - // propagated to the balancer may result in a re-resolution request. - if ccr.closed || ccr.resolver == nil { - return - } - ccr.resolver.ResolveNow(o) -} - -func (ccr *ccResolverWrapper) close() { - ccr.mu.Lock() - if ccr.closed { - ccr.mu.Unlock() - return - } - - channelz.Info(logger, ccr.channelzID, "Closing the name resolver") - - // Close the serializer to ensure that no more calls from the resolver are - // handled, before actually closing the resolver. - ccr.serializerCancel() - ccr.closed = true - r := ccr.resolver - ccr.mu.Unlock() - - // Give enqueued callbacks a chance to finish. - <-ccr.serializer.Done() - - // Spawn a goroutine to close the resolver (since it may block trying to - // cleanup all allocated resources) and return early. - go r.Close() -} - -// serializerScheduleLocked is a convenience method to schedule a function to be -// run on the serializer while holding ccr.mu. -func (ccr *ccResolverWrapper) serializerScheduleLocked(f func(context.Context)) { - ccr.mu.Lock() - ccr.serializer.Schedule(f) - ccr.mu.Unlock() -} - -// UpdateState is called by resolver implementations to report new state to gRPC -// which includes addresses and service config. -func (ccr *ccResolverWrapper) UpdateState(s resolver.State) error { - errCh := make(chan error, 1) - if s.Endpoints == nil { - s.Endpoints = make([]resolver.Endpoint, 0, len(s.Addresses)) - for _, a := range s.Addresses { - ep := resolver.Endpoint{Addresses: []resolver.Address{a}, Attributes: a.BalancerAttributes} - ep.Addresses[0].BalancerAttributes = nil - s.Endpoints = append(s.Endpoints, ep) - } - } - ok := ccr.serializer.Schedule(func(context.Context) { - ccr.addChannelzTraceEvent(s) - ccr.curState = s - if err := ccr.cc.updateResolverState(ccr.curState, nil); err == balancer.ErrBadResolverState { - errCh <- balancer.ErrBadResolverState - return - } - errCh <- nil - }) - if !ok { - // The only time when Schedule() fail to add the callback to the - // serializer is when the serializer is closed, and this happens only - // when the resolver wrapper is closed. - return nil - } - return <-errCh -} - -// ReportError is called by resolver implementations to report errors -// encountered during name resolution to gRPC. -func (ccr *ccResolverWrapper) ReportError(err error) { - ccr.serializerScheduleLocked(func(_ context.Context) { - channelz.Warningf(logger, ccr.channelzID, "ccResolverWrapper: reporting error to cc: %v", err) - ccr.cc.updateResolverState(resolver.State{}, err) - }) -} - -// NewAddress is called by the resolver implementation to send addresses to -// gRPC. -func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { - ccr.serializerScheduleLocked(func(_ context.Context) { - ccr.addChannelzTraceEvent(resolver.State{Addresses: addrs, ServiceConfig: ccr.curState.ServiceConfig}) - ccr.curState.Addresses = addrs - ccr.cc.updateResolverState(ccr.curState, nil) - }) -} - -// NewServiceConfig is called by the resolver implementation to send service -// configs to gRPC. -func (ccr *ccResolverWrapper) NewServiceConfig(sc string) { - ccr.serializerScheduleLocked(func(_ context.Context) { - channelz.Infof(logger, ccr.channelzID, "ccResolverWrapper: got new service config: %s", sc) - if ccr.ignoreServiceConfig { - channelz.Info(logger, ccr.channelzID, "Service config lookups disabled; ignoring config") - return - } - scpr := parseServiceConfig(sc) - if scpr.Err != nil { - channelz.Warningf(logger, ccr.channelzID, "ccResolverWrapper: error parsing service config: %v", scpr.Err) - return - } - ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: scpr}) - ccr.curState.ServiceConfig = scpr - ccr.cc.updateResolverState(ccr.curState, nil) - }) -} - -// ParseServiceConfig is called by resolver implementations to parse a JSON -// representation of the service config. -func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult { - return parseServiceConfig(scJSON) -} - -// addChannelzTraceEvent adds a channelz trace event containing the new -// state received from resolver implementations. -func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { - var updates []string - var oldSC, newSC *ServiceConfig - var oldOK, newOK bool - if ccr.curState.ServiceConfig != nil { - oldSC, oldOK = ccr.curState.ServiceConfig.Config.(*ServiceConfig) - } - if s.ServiceConfig != nil { - newSC, newOK = s.ServiceConfig.Config.(*ServiceConfig) - } - if oldOK != newOK || (oldOK && newOK && oldSC.rawJSONString != newSC.rawJSONString) { - updates = append(updates, "service config updated") - } - if len(ccr.curState.Addresses) > 0 && len(s.Addresses) == 0 { - updates = append(updates, "resolver returned an empty address list") - } else if len(ccr.curState.Addresses) == 0 && len(s.Addresses) > 0 { - updates = append(updates, "resolver returned new addresses") - } - channelz.Infof(logger, ccr.channelzID, "Resolver state updated: %s (%v)", pretty.ToJSON(s), strings.Join(updates, "; ")) -} diff --git a/vendor/google.golang.org/grpc/resolver_wrapper.go b/vendor/google.golang.org/grpc/resolver_wrapper.go new file mode 100644 index 000000000..c5fb45236 --- /dev/null +++ b/vendor/google.golang.org/grpc/resolver_wrapper.go @@ -0,0 +1,198 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "context" + "strings" + "sync" + + "google.golang.org/grpc/internal/channelz" + "google.golang.org/grpc/internal/grpcsync" + "google.golang.org/grpc/internal/pretty" + "google.golang.org/grpc/resolver" + "google.golang.org/grpc/serviceconfig" +) + +// ccResolverWrapper is a wrapper on top of cc for resolvers. +// It implements resolver.ClientConn interface. +type ccResolverWrapper struct { + // The following fields are initialized when the wrapper is created and are + // read-only afterwards, and therefore can be accessed without a mutex. + cc *ClientConn + ignoreServiceConfig bool + serializer *grpcsync.CallbackSerializer + serializerCancel context.CancelFunc + + resolver resolver.Resolver // only accessed within the serializer + + // The following fields are protected by mu. Caller must take cc.mu before + // taking mu. + mu sync.Mutex + curState resolver.State + closed bool +} + +// newCCResolverWrapper initializes the ccResolverWrapper. It can only be used +// after calling start, which builds the resolver. +func newCCResolverWrapper(cc *ClientConn) *ccResolverWrapper { + ctx, cancel := context.WithCancel(cc.ctx) + return &ccResolverWrapper{ + cc: cc, + ignoreServiceConfig: cc.dopts.disableServiceConfig, + serializer: grpcsync.NewCallbackSerializer(ctx), + serializerCancel: cancel, + } +} + +// start builds the name resolver using the resolver.Builder in cc and returns +// any error encountered. It must always be the first operation performed on +// any newly created ccResolverWrapper, except that close may be called instead. +func (ccr *ccResolverWrapper) start() error { + errCh := make(chan error) + ccr.serializer.Schedule(func(ctx context.Context) { + if ctx.Err() != nil { + return + } + opts := resolver.BuildOptions{ + DisableServiceConfig: ccr.cc.dopts.disableServiceConfig, + DialCreds: ccr.cc.dopts.copts.TransportCredentials, + CredsBundle: ccr.cc.dopts.copts.CredsBundle, + Dialer: ccr.cc.dopts.copts.Dialer, + Authority: ccr.cc.authority, + } + var err error + ccr.resolver, err = ccr.cc.resolverBuilder.Build(ccr.cc.parsedTarget, ccr, opts) + errCh <- err + }) + return <-errCh +} + +func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) { + ccr.serializer.Schedule(func(ctx context.Context) { + if ctx.Err() != nil || ccr.resolver == nil { + return + } + ccr.resolver.ResolveNow(o) + }) +} + +// close initiates async shutdown of the wrapper. To determine the wrapper has +// finished shutting down, the channel should block on ccr.serializer.Done() +// without cc.mu held. +func (ccr *ccResolverWrapper) close() { + channelz.Info(logger, ccr.cc.channelz, "Closing the name resolver") + ccr.mu.Lock() + ccr.closed = true + ccr.mu.Unlock() + + ccr.serializer.Schedule(func(context.Context) { + if ccr.resolver == nil { + return + } + ccr.resolver.Close() + ccr.resolver = nil + }) + ccr.serializerCancel() +} + +// UpdateState is called by resolver implementations to report new state to gRPC +// which includes addresses and service config. +func (ccr *ccResolverWrapper) UpdateState(s resolver.State) error { + ccr.cc.mu.Lock() + ccr.mu.Lock() + if ccr.closed { + ccr.mu.Unlock() + ccr.cc.mu.Unlock() + return nil + } + if s.Endpoints == nil { + s.Endpoints = make([]resolver.Endpoint, 0, len(s.Addresses)) + for _, a := range s.Addresses { + ep := resolver.Endpoint{Addresses: []resolver.Address{a}, Attributes: a.BalancerAttributes} + ep.Addresses[0].BalancerAttributes = nil + s.Endpoints = append(s.Endpoints, ep) + } + } + ccr.addChannelzTraceEvent(s) + ccr.curState = s + ccr.mu.Unlock() + return ccr.cc.updateResolverStateAndUnlock(s, nil) +} + +// ReportError is called by resolver implementations to report errors +// encountered during name resolution to gRPC. +func (ccr *ccResolverWrapper) ReportError(err error) { + ccr.cc.mu.Lock() + ccr.mu.Lock() + if ccr.closed { + ccr.mu.Unlock() + ccr.cc.mu.Unlock() + return + } + ccr.mu.Unlock() + channelz.Warningf(logger, ccr.cc.channelz, "ccResolverWrapper: reporting error to cc: %v", err) + ccr.cc.updateResolverStateAndUnlock(resolver.State{}, err) +} + +// NewAddress is called by the resolver implementation to send addresses to +// gRPC. +func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { + ccr.cc.mu.Lock() + ccr.mu.Lock() + if ccr.closed { + ccr.mu.Unlock() + ccr.cc.mu.Unlock() + return + } + s := resolver.State{Addresses: addrs, ServiceConfig: ccr.curState.ServiceConfig} + ccr.addChannelzTraceEvent(s) + ccr.curState = s + ccr.mu.Unlock() + ccr.cc.updateResolverStateAndUnlock(s, nil) +} + +// ParseServiceConfig is called by resolver implementations to parse a JSON +// representation of the service config. +func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult { + return parseServiceConfig(scJSON, ccr.cc.dopts.maxCallAttempts) +} + +// addChannelzTraceEvent adds a channelz trace event containing the new +// state received from resolver implementations. +func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { + var updates []string + var oldSC, newSC *ServiceConfig + var oldOK, newOK bool + if ccr.curState.ServiceConfig != nil { + oldSC, oldOK = ccr.curState.ServiceConfig.Config.(*ServiceConfig) + } + if s.ServiceConfig != nil { + newSC, newOK = s.ServiceConfig.Config.(*ServiceConfig) + } + if oldOK != newOK || (oldOK && newOK && oldSC.rawJSONString != newSC.rawJSONString) { + updates = append(updates, "service config updated") + } + if len(ccr.curState.Addresses) > 0 && len(s.Addresses) == 0 { + updates = append(updates, "resolver returned an empty address list") + } else if len(ccr.curState.Addresses) == 0 && len(s.Addresses) > 0 { + updates = append(updates, "resolver returned new addresses") + } + channelz.Infof(logger, ccr.cc.channelz, "Resolver state updated: %s (%v)", pretty.ToJSON(s), strings.Join(updates, "; ")) +} diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index b7723aa09..fdd49e6e9 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -189,6 +189,20 @@ type EmptyCallOption struct{} func (EmptyCallOption) before(*callInfo) error { return nil } func (EmptyCallOption) after(*callInfo, *csAttempt) {} +// StaticMethod returns a CallOption which specifies that a call is being made +// to a method that is static, which means the method is known at compile time +// and doesn't change at runtime. This can be used as a signal to stats plugins +// that this method is safe to include as a key to a measurement. +func StaticMethod() CallOption { + return StaticMethodCallOption{} +} + +// StaticMethodCallOption is a CallOption that specifies that a call comes +// from a static method. +type StaticMethodCallOption struct { + EmptyCallOption +} + // Header returns a CallOptions that retrieves the header metadata // for a unary RPC. func Header(md *metadata.MD) CallOption { @@ -640,14 +654,18 @@ func encode(c baseCodec, msg any) ([]byte, error) { return b, nil } -// compress returns the input bytes compressed by compressor or cp. If both -// compressors are nil, returns nil. +// compress returns the input bytes compressed by compressor or cp. +// If both compressors are nil, or if the message has zero length, returns nil, +// indicating no compression was done. // // TODO(dfawley): eliminate cp parameter by wrapping Compressor in an encoding.Compressor. func compress(in []byte, cp Compressor, compressor encoding.Compressor) ([]byte, error) { if compressor == nil && cp == nil { return nil, nil } + if len(in) == 0 { + return nil, nil + } wrapErr := func(err error) error { return status.Errorf(codes.Internal, "grpc: error while compressing: %v", err.Error()) } @@ -726,17 +744,19 @@ type payloadInfo struct { uncompressedBytes []byte } -func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor) ([]byte, error) { - pf, buf, err := p.recvMsg(maxReceiveMessageSize) +// recvAndDecompress reads a message from the stream, decompressing it if necessary. +// +// Cancelling the returned cancel function releases the buffer back to the pool. So the caller should cancel as soon as +// the buffer is no longer needed. +func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, +) (uncompressedBuf []byte, cancel func(), err error) { + pf, compressedBuf, err := p.recvMsg(maxReceiveMessageSize) if err != nil { - return nil, err - } - if payInfo != nil { - payInfo.compressedLength = len(buf) + return nil, nil, err } if st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil); st != nil { - return nil, st.Err() + return nil, nil, st.Err() } var size int @@ -744,21 +764,35 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei // To match legacy behavior, if the decompressor is set by WithDecompressor or RPCDecompressor, // use this decompressor as the default. if dc != nil { - buf, err = dc.Do(bytes.NewReader(buf)) - size = len(buf) + uncompressedBuf, err = dc.Do(bytes.NewReader(compressedBuf)) + size = len(uncompressedBuf) } else { - buf, size, err = decompress(compressor, buf, maxReceiveMessageSize) + uncompressedBuf, size, err = decompress(compressor, compressedBuf, maxReceiveMessageSize) } if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) + return nil, nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) } if size > maxReceiveMessageSize { // TODO: Revisit the error code. Currently keep it consistent with java // implementation. - return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max (%d vs. %d)", size, maxReceiveMessageSize) + return nil, nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max (%d vs. %d)", size, maxReceiveMessageSize) } + } else { + uncompressedBuf = compressedBuf } - return buf, nil + + if payInfo != nil { + payInfo.compressedLength = len(compressedBuf) + payInfo.uncompressedBytes = uncompressedBuf + + cancel = func() {} + } else { + cancel = func() { + p.recvBufferPool.Put(&compressedBuf) + } + } + + return uncompressedBuf, cancel, nil } // Using compressor, decompress d, returning data and size. @@ -778,6 +812,9 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize // size is used as an estimate to size the buffer, but we // will read more data if available. // +MinRead so ReadFrom will not reallocate if size is correct. + // + // TODO: If we ensure that the buffer size is the same as the DecompressedSize, + // we can also utilize the recv buffer pool here. buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead)) bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) return buf.Bytes(), int(bytesRead), err @@ -793,18 +830,15 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize // dc takes precedence over compressor. // TODO(dfawley): wrap the old compressor/decompressor using the new API? func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor) error { - buf, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor) + buf, cancel, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor) if err != nil { return err } + defer cancel() + if err := c.Unmarshal(buf, m); err != nil { return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message: %v", err) } - if payInfo != nil { - payInfo.uncompressedBytes = buf - } else { - p.recvBufferPool.Put(&buf) - } return nil } @@ -928,22 +962,9 @@ func setCallInfoCodec(c *callInfo) error { return nil } -// channelzData is used to store channelz related data for ClientConn, addrConn and Server. -// These fields cannot be embedded in the original structs (e.g. ClientConn), since to do atomic -// operation on int64 variable on 32-bit machine, user is responsible to enforce memory alignment. -// Here, by grouping those int64 fields inside a struct, we are enforcing the alignment. -type channelzData struct { - callsStarted int64 - callsFailed int64 - callsSucceeded int64 - // lastCallStartedTime stores the timestamp that last call starts. It is of int64 type instead of - // time.Time since it's more costly to atomically update time.Time variable than int64 variable. - lastCallStartedTime int64 -} - // The SupportPackageIsVersion variables are referenced from generated protocol // buffer files to ensure compatibility with the gRPC version used. The latest -// support package version is 7. +// support package version is 9. // // Older versions are kept for compatibility. // @@ -954,6 +975,8 @@ const ( SupportPackageIsVersion5 = true SupportPackageIsVersion6 = true SupportPackageIsVersion7 = true + SupportPackageIsVersion8 = true + SupportPackageIsVersion9 = true ) const grpcUA = "grpc-go/" + Version diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 8f60d4214..89f8e4792 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -33,8 +33,6 @@ import ( "sync/atomic" "time" - "golang.org/x/net/trace" - "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/encoding" @@ -70,9 +68,10 @@ func init() { internal.GetServerCredentials = func(srv *Server) credentials.TransportCredentials { return srv.opts.creds } - internal.DrainServerTransports = func(srv *Server, addr string) { - srv.drainServerTransports(addr) + internal.IsRegisteredMethod = func(srv *Server, method string) bool { + return srv.isRegisteredMethod(method) } + internal.ServerFromContext = serverFromContext internal.AddGlobalServerOptions = func(opt ...ServerOption) { globalServerOptions = append(globalServerOptions, opt...) } @@ -81,6 +80,7 @@ func init() { } internal.BinaryLogger = binaryLogger internal.JoinServerOptions = newJoinServerOption + internal.RecvBufferPool = recvBufferPool } var statusOK = status.New(codes.OK, "") @@ -129,17 +129,18 @@ type Server struct { drain bool cv *sync.Cond // signaled when connections close for GracefulStop services map[string]*serviceInfo // service name -> service info - events trace.EventLog + events traceEventLog quit *grpcsync.Event done *grpcsync.Event channelzRemoveOnce sync.Once - serveWG sync.WaitGroup // counts active Serve goroutines for GracefulStop + serveWG sync.WaitGroup // counts active Serve goroutines for Stop/GracefulStop + handlersWG sync.WaitGroup // counts active method handler goroutines - channelzID *channelz.Identifier - czData *channelzData + channelz *channelz.Server - serverWorkerChannel chan func() + serverWorkerChannel chan func() + serverWorkerChannelClose func() } type serverOptions struct { @@ -170,6 +171,7 @@ type serverOptions struct { headerTableSize *uint32 numServerWorkers uint32 recvBufferPool SharedBufferPool + waitForHandlers bool } var defaultServerOptions = serverOptions{ @@ -246,11 +248,9 @@ func SharedWriteBuffer(val bool) ServerOption { } // WriteBufferSize determines how much data can be batched before doing a write -// on the wire. The corresponding memory allocation for this buffer will be -// twice the size to keep syscalls low. The default value for this buffer is -// 32KB. Zero or negative values will disable the write buffer such that each -// write will be on underlying connection. -// Note: A Send call may not directly translate to a write. +// on the wire. The default value for this buffer is 32KB. Zero or negative +// values will disable the write buffer such that each write will be on underlying +// connection. Note: A Send call may not directly translate to a write. func WriteBufferSize(s int) ServerOption { return newFuncServerOption(func(o *serverOptions) { o.writeBufferSize = s @@ -527,12 +527,22 @@ func ConnectionTimeout(d time.Duration) ServerOption { }) } +// MaxHeaderListSizeServerOption is a ServerOption that sets the max +// (uncompressed) size of header list that the server is prepared to accept. +type MaxHeaderListSizeServerOption struct { + MaxHeaderListSize uint32 +} + +func (o MaxHeaderListSizeServerOption) apply(so *serverOptions) { + so.maxHeaderListSize = &o.MaxHeaderListSize +} + // MaxHeaderListSize returns a ServerOption that sets the max (uncompressed) size // of header list that the server is prepared to accept. func MaxHeaderListSize(s uint32) ServerOption { - return newFuncServerOption(func(o *serverOptions) { - o.maxHeaderListSize = &s - }) + return MaxHeaderListSizeServerOption{ + MaxHeaderListSize: s, + } } // HeaderTableSize returns a ServerOption that sets the size of dynamic @@ -567,6 +577,21 @@ func NumStreamWorkers(numServerWorkers uint32) ServerOption { }) } +// WaitForHandlers cause Stop to wait until all outstanding method handlers have +// exited before returning. If false, Stop will return as soon as all +// connections have closed, but method handlers may still be running. By +// default, Stop does not wait for method handlers to return. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. +func WaitForHandlers(w bool) ServerOption { + return newFuncServerOption(func(o *serverOptions) { + o.waitForHandlers = w + }) +} + // RecvBufferPool returns a ServerOption that configures the server // to use the provided shared buffer pool for parsing incoming messages. Depending // on the application's workload, this could result in reduced memory allocation. @@ -578,11 +603,13 @@ func NumStreamWorkers(numServerWorkers uint32) ServerOption { // options are used: StatsHandler, EnableTracing, or binary logging. In such // cases, the shared buffer pool will be ignored. // -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. +// Deprecated: use experimental.WithRecvBufferPool instead. Will be deleted in +// v1.60.0 or later. func RecvBufferPool(bufferPool SharedBufferPool) ServerOption { + return recvBufferPool(bufferPool) +} + +func recvBufferPool(bufferPool SharedBufferPool) ServerOption { return newFuncServerOption(func(o *serverOptions) { o.recvBufferPool = bufferPool }) @@ -616,15 +643,14 @@ func (s *Server) serverWorker() { // connections to reduce the time spent overall on runtime.morestack. func (s *Server) initServerWorkers() { s.serverWorkerChannel = make(chan func()) + s.serverWorkerChannelClose = grpcsync.OnceFunc(func() { + close(s.serverWorkerChannel) + }) for i := uint32(0); i < s.opts.numServerWorkers; i++ { go s.serverWorker() } } -func (s *Server) stopServerWorkers() { - close(s.serverWorkerChannel) -} - // NewServer creates a gRPC server which has no service registered and has not // started to accept requests yet. func NewServer(opt ...ServerOption) *Server { @@ -642,22 +668,21 @@ func NewServer(opt ...ServerOption) *Server { services: make(map[string]*serviceInfo), quit: grpcsync.NewEvent(), done: grpcsync.NewEvent(), - czData: new(channelzData), + channelz: channelz.RegisterServer(""), } chainUnaryServerInterceptors(s) chainStreamServerInterceptors(s) s.cv = sync.NewCond(&s.mu) if EnableTracing { _, file, line, _ := runtime.Caller(1) - s.events = trace.NewEventLog("grpc.Server", fmt.Sprintf("%s:%d", file, line)) + s.events = newTraceEventLog("grpc.Server", fmt.Sprintf("%s:%d", file, line)) } if s.opts.numServerWorkers > 0 { s.initServerWorkers() } - s.channelzID = channelz.RegisterServer(&channelzServer{s}, "") - channelz.Info(logger, s.channelzID, "Server created") + channelz.Info(logger, s.channelz, "Server created") return s } @@ -783,20 +808,13 @@ var ErrServerStopped = errors.New("grpc: the server has been stopped") type listenSocket struct { net.Listener - channelzID *channelz.Identifier -} - -func (l *listenSocket) ChannelzMetric() *channelz.SocketInternalMetric { - return &channelz.SocketInternalMetric{ - SocketOptions: channelz.GetSocketOption(l.Listener), - LocalAddr: l.Listener.Addr(), - } + channelz *channelz.Socket } func (l *listenSocket) Close() error { err := l.Listener.Close() - channelz.RemoveEntry(l.channelzID) - channelz.Info(logger, l.channelzID, "ListenSocket deleted") + channelz.RemoveEntry(l.channelz.ID) + channelz.Info(logger, l.channelz, "ListenSocket deleted") return err } @@ -806,6 +824,18 @@ func (l *listenSocket) Close() error { // Serve returns when lis.Accept fails with fatal errors. lis will be closed when // this method returns. // Serve will return a non-nil error unless Stop or GracefulStop is called. +// +// Note: All supported releases of Go (as of December 2023) override the OS +// defaults for TCP keepalive time and interval to 15s. To enable TCP keepalive +// with OS defaults for keepalive time and interval, callers need to do the +// following two things: +// - pass a net.Listener created by calling the Listen method on a +// net.ListenConfig with the `KeepAlive` field set to a negative value. This +// will result in the Go standard library not overriding OS defaults for TCP +// keepalive interval and time. But this will also result in the Go standard +// library not enabling TCP keepalives by default. +// - override the Accept method on the passed in net.Listener and set the +// SO_KEEPALIVE socket option to enable TCP keepalives, with OS defaults. func (s *Server) Serve(lis net.Listener) error { s.mu.Lock() s.printf("serving") @@ -826,7 +856,16 @@ func (s *Server) Serve(lis net.Listener) error { } }() - ls := &listenSocket{Listener: lis} + ls := &listenSocket{ + Listener: lis, + channelz: channelz.RegisterSocket(&channelz.Socket{ + SocketType: channelz.SocketTypeListen, + Parent: s.channelz, + RefName: lis.Addr().String(), + LocalAddr: lis.Addr(), + SocketOptions: channelz.GetSocketOption(lis)}, + ), + } s.lis[ls] = true defer func() { @@ -838,14 +877,8 @@ func (s *Server) Serve(lis net.Listener) error { s.mu.Unlock() }() - var err error - ls.channelzID, err = channelz.RegisterListenSocket(ls, s.channelzID, lis.Addr().String()) - if err != nil { - s.mu.Unlock() - return err - } s.mu.Unlock() - channelz.Info(logger, ls.channelzID, "ListenSocket created") + channelz.Info(logger, ls.channelz, "ListenSocket created") var tempDelay time.Duration // how long to sleep on accept failure for { @@ -913,24 +946,21 @@ func (s *Server) handleRawConn(lisAddr string, rawConn net.Conn) { return } + if cc, ok := rawConn.(interface { + PassServerTransport(transport.ServerTransport) + }); ok { + cc.PassServerTransport(st) + } + if !s.addConn(lisAddr, st) { return } go func() { - s.serveStreams(st) + s.serveStreams(context.Background(), st, rawConn) s.removeConn(lisAddr, st) }() } -func (s *Server) drainServerTransports(addr string) { - s.mu.Lock() - conns := s.conns[addr] - for st := range conns { - st.Drain("") - } - s.mu.Unlock() -} - // newHTTP2Transport sets up a http/2 transport (using the // gRPC http2 server transport in transport/http2_server.go). func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { @@ -947,7 +977,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { WriteBufferSize: s.opts.writeBufferSize, ReadBufferSize: s.opts.readBufferSize, SharedWriteBuffer: s.opts.sharedWriteBuffer, - ChannelzParentID: s.channelzID, + ChannelzParent: s.channelz, MaxHeaderListSize: s.opts.maxHeaderListSize, HeaderTableSize: s.opts.headerTableSize, } @@ -961,7 +991,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { if err != credentials.ErrConnDispatched { // Don't log on ErrConnDispatched and io.EOF to prevent log spam. if err != io.EOF { - channelz.Info(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err) + channelz.Info(logger, s.channelz, "grpc: Server.Serve failed to create ServerTransport: ", err) } c.Close() } @@ -971,18 +1001,31 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { return st } -func (s *Server) serveStreams(st transport.ServerTransport) { - defer st.Close(errors.New("finished serving streams for the server transport")) - var wg sync.WaitGroup +func (s *Server) serveStreams(ctx context.Context, st transport.ServerTransport, rawConn net.Conn) { + ctx = transport.SetConnection(ctx, rawConn) + ctx = peer.NewContext(ctx, st.Peer()) + for _, sh := range s.opts.statsHandlers { + ctx = sh.TagConn(ctx, &stats.ConnTagInfo{ + RemoteAddr: st.Peer().Addr, + LocalAddr: st.Peer().LocalAddr, + }) + sh.HandleConn(ctx, &stats.ConnBegin{}) + } - streamQuota := newHandlerQuota(s.opts.maxConcurrentStreams) - st.HandleStreams(func(stream *transport.Stream) { - wg.Add(1) + defer func() { + st.Close(errors.New("finished serving streams for the server transport")) + for _, sh := range s.opts.statsHandlers { + sh.HandleConn(ctx, &stats.ConnEnd{}) + } + }() + streamQuota := newHandlerQuota(s.opts.maxConcurrentStreams) + st.HandleStreams(ctx, func(stream *transport.Stream) { + s.handlersWG.Add(1) streamQuota.acquire() f := func() { defer streamQuota.release() - defer wg.Done() + defer s.handlersWG.Done() s.handleStream(st, stream) } @@ -996,7 +1039,6 @@ func (s *Server) serveStreams(st transport.ServerTransport) { } go f() }) - wg.Wait() } var _ http.Handler = (*Server)(nil) @@ -1040,7 +1082,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } defer s.removeConn(listenerAddressForServeHTTP, st) - s.serveStreams(st) + s.serveStreams(r.Context(), st, nil) } func (s *Server) addConn(addr string, st transport.ServerTransport) bool { @@ -1081,37 +1123,28 @@ func (s *Server) removeConn(addr string, st transport.ServerTransport) { } } -func (s *Server) channelzMetric() *channelz.ServerInternalMetric { - return &channelz.ServerInternalMetric{ - CallsStarted: atomic.LoadInt64(&s.czData.callsStarted), - CallsSucceeded: atomic.LoadInt64(&s.czData.callsSucceeded), - CallsFailed: atomic.LoadInt64(&s.czData.callsFailed), - LastCallStartedTimestamp: time.Unix(0, atomic.LoadInt64(&s.czData.lastCallStartedTime)), - } -} - func (s *Server) incrCallsStarted() { - atomic.AddInt64(&s.czData.callsStarted, 1) - atomic.StoreInt64(&s.czData.lastCallStartedTime, time.Now().UnixNano()) + s.channelz.ServerMetrics.CallsStarted.Add(1) + s.channelz.ServerMetrics.LastCallStartedTimestamp.Store(time.Now().UnixNano()) } func (s *Server) incrCallsSucceeded() { - atomic.AddInt64(&s.czData.callsSucceeded, 1) + s.channelz.ServerMetrics.CallsSucceeded.Add(1) } func (s *Server) incrCallsFailed() { - atomic.AddInt64(&s.czData.callsFailed, 1) + s.channelz.ServerMetrics.CallsFailed.Add(1) } func (s *Server) sendResponse(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, msg any, cp Compressor, opts *transport.Options, comp encoding.Compressor) error { data, err := encode(s.getCodec(stream.ContentSubtype()), msg) if err != nil { - channelz.Error(logger, s.channelzID, "grpc: server failed to encode response: ", err) + channelz.Error(logger, s.channelz, "grpc: server failed to encode response: ", err) return err } compData, err := compress(data, cp, comp) if err != nil { - channelz.Error(logger, s.channelzID, "grpc: server failed to compress response: ", err) + channelz.Error(logger, s.channelz, "grpc: server failed to compress response: ", err) return err } hdr, payload := msgHeader(data, compData) @@ -1302,10 +1335,11 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor if len(shs) != 0 || len(binlogs) != 0 { payInfo = &payloadInfo{} } - d, err := recvAndDecompress(&parser{r: stream, recvBufferPool: s.opts.recvBufferPool}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp) + + d, cancel, err := recvAndDecompress(&parser{r: stream, recvBufferPool: s.opts.recvBufferPool}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp) if err != nil { if e := t.WriteStatus(stream, status.Convert(err)); e != nil { - channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) + channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e) } return err } @@ -1313,6 +1347,8 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor t.IncrMsgRecv() } df := func(v any) error { + defer cancel() + if err := s.getCodec(stream.ContentSubtype()).Unmarshal(d, v); err != nil { return status.Errorf(codes.Internal, "grpc: error unmarshalling request: %v", err) } @@ -1354,7 +1390,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor trInfo.tr.SetError() } if e := t.WriteStatus(stream, appStatus); e != nil { - channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) + channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e) } if len(binlogs) != 0 { if h, _ := stream.Header(); h.Len() > 0 { @@ -1394,7 +1430,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor } if sts, ok := status.FromError(err); ok { if e := t.WriteStatus(stream, sts); e != nil { - channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) + channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e) } } else { switch st := err.(type) { @@ -1689,15 +1725,16 @@ func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTran func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream) { ctx := stream.Context() + ctx = contextWithServer(ctx, s) var ti *traceInfo if EnableTracing { - tr := trace.New("grpc.Recv."+methodFamily(stream.Method()), stream.Method()) - ctx = trace.NewContext(ctx, tr) + tr := newTrace("grpc.Recv."+methodFamily(stream.Method()), stream.Method()) + ctx = newTraceContext(ctx, tr) ti = &traceInfo{ tr: tr, firstLine: firstLine{ client: false, - remoteAddr: t.RemoteAddr(), + remoteAddr: t.Peer().Addr, }, } if dl, ok := ctx.Deadline(); ok { @@ -1721,7 +1758,7 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str ti.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true) ti.tr.SetError() } - channelz.Warningf(logger, s.channelzID, "grpc: Server.handleStream failed to write status: %v", err) + channelz.Warningf(logger, s.channelz, "grpc: Server.handleStream failed to write status: %v", err) } if ti != nil { ti.tr.Finish() @@ -1731,6 +1768,22 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str service := sm[:pos] method := sm[pos+1:] + md, _ := metadata.FromIncomingContext(ctx) + for _, sh := range s.opts.statsHandlers { + ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: stream.Method()}) + sh.HandleRPC(ctx, &stats.InHeader{ + FullMethod: stream.Method(), + RemoteAddr: t.Peer().Addr, + LocalAddr: t.Peer().LocalAddr, + Compression: stream.RecvCompress(), + WireLength: stream.HeaderWireLength(), + Header: md, + }) + } + // To have calls in stream callouts work. Will delete once all stats handler + // calls come from the gRPC layer. + stream.SetContext(ctx) + srv, knownService := s.services[service] if knownService { if md, ok := srv.methods[method]; ok { @@ -1762,7 +1815,7 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str ti.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true) ti.tr.SetError() } - channelz.Warningf(logger, s.channelzID, "grpc: Server.handleStream failed to write status: %v", err) + channelz.Warningf(logger, s.channelz, "grpc: Server.handleStream failed to write status: %v", err) } if ti != nil { ti.tr.Finish() @@ -1820,62 +1873,71 @@ func ServerTransportStreamFromContext(ctx context.Context) ServerTransportStream // pending RPCs on the client side will get notified by connection // errors. func (s *Server) Stop() { - s.quit.Fire() + s.stop(false) +} - defer func() { - s.serveWG.Wait() - s.done.Fire() - }() +// GracefulStop stops the gRPC server gracefully. It stops the server from +// accepting new connections and RPCs and blocks until all the pending RPCs are +// finished. +func (s *Server) GracefulStop() { + s.stop(true) +} - s.channelzRemoveOnce.Do(func() { channelz.RemoveEntry(s.channelzID) }) +func (s *Server) stop(graceful bool) { + s.quit.Fire() + defer s.done.Fire() + s.channelzRemoveOnce.Do(func() { channelz.RemoveEntry(s.channelz.ID) }) s.mu.Lock() - listeners := s.lis - s.lis = nil - conns := s.conns - s.conns = nil - // interrupt GracefulStop if Stop and GracefulStop are called concurrently. - s.cv.Broadcast() + s.closeListenersLocked() + // Wait for serving threads to be ready to exit. Only then can we be sure no + // new conns will be created. s.mu.Unlock() + s.serveWG.Wait() - for lis := range listeners { - lis.Close() + s.mu.Lock() + defer s.mu.Unlock() + + if graceful { + s.drainAllServerTransportsLocked() + } else { + s.closeServerTransportsLocked() } - for _, cs := range conns { - for st := range cs { - st.Close(errors.New("Server.Stop called")) - } + + for len(s.conns) != 0 { + s.cv.Wait() } + s.conns = nil + if s.opts.numServerWorkers > 0 { - s.stopServerWorkers() + // Closing the channel (only once, via grpcsync.OnceFunc) after all the + // connections have been closed above ensures that there are no + // goroutines executing the callback passed to st.HandleStreams (where + // the channel is written to). + s.serverWorkerChannelClose() + } + + if graceful || s.opts.waitForHandlers { + s.handlersWG.Wait() } - s.mu.Lock() if s.events != nil { s.events.Finish() s.events = nil } - s.mu.Unlock() } -// GracefulStop stops the gRPC server gracefully. It stops the server from -// accepting new connections and RPCs and blocks until all the pending RPCs are -// finished. -func (s *Server) GracefulStop() { - s.quit.Fire() - defer s.done.Fire() - - s.channelzRemoveOnce.Do(func() { channelz.RemoveEntry(s.channelzID) }) - s.mu.Lock() - if s.conns == nil { - s.mu.Unlock() - return +// s.mu must be held by the caller. +func (s *Server) closeServerTransportsLocked() { + for _, conns := range s.conns { + for st := range conns { + st.Close(errors.New("Server.Stop called")) + } } +} - for lis := range s.lis { - lis.Close() - } - s.lis = nil +// s.mu must be held by the caller. +func (s *Server) drainAllServerTransportsLocked() { if !s.drain { for _, conns := range s.conns { for st := range conns { @@ -1884,22 +1946,14 @@ func (s *Server) GracefulStop() { } s.drain = true } +} - // Wait for serving threads to be ready to exit. Only then can we be sure no - // new conns will be created. - s.mu.Unlock() - s.serveWG.Wait() - s.mu.Lock() - - for len(s.conns) != 0 { - s.cv.Wait() - } - s.conns = nil - if s.events != nil { - s.events.Finish() - s.events = nil +// s.mu must be held by the caller. +func (s *Server) closeListenersLocked() { + for lis := range s.lis { + lis.Close() } - s.mu.Unlock() + s.lis = nil } // contentSubtype must be lowercase @@ -1913,11 +1967,50 @@ func (s *Server) getCodec(contentSubtype string) baseCodec { } codec := encoding.GetCodec(contentSubtype) if codec == nil { + logger.Warningf("Unsupported codec %q. Defaulting to %q for now. This will start to fail in future releases.", contentSubtype, proto.Name) return encoding.GetCodec(proto.Name) } return codec } +type serverKey struct{} + +// serverFromContext gets the Server from the context. +func serverFromContext(ctx context.Context) *Server { + s, _ := ctx.Value(serverKey{}).(*Server) + return s +} + +// contextWithServer sets the Server in the context. +func contextWithServer(ctx context.Context, server *Server) context.Context { + return context.WithValue(ctx, serverKey{}, server) +} + +// isRegisteredMethod returns whether the passed in method is registered as a +// method on the server. /service/method and service/method will match if the +// service and method are registered on the server. +func (s *Server) isRegisteredMethod(serviceMethod string) bool { + if serviceMethod != "" && serviceMethod[0] == '/' { + serviceMethod = serviceMethod[1:] + } + pos := strings.LastIndex(serviceMethod, "/") + if pos == -1 { // Invalid method name syntax. + return false + } + service := serviceMethod[:pos] + method := serviceMethod[pos+1:] + srv, knownService := s.services[service] + if knownService { + if _, ok := srv.methods[method]; ok { + return true + } + if _, ok := srv.streams[method]; ok { + return true + } + } + return false +} + // SetHeader sets the header metadata to be sent from the server to the client. // The context provided must be the context passed to the server's handler. // @@ -2019,7 +2112,7 @@ func ClientSupportedCompressors(ctx context.Context) ([]string, error) { return nil, fmt.Errorf("failed to fetch the stream from the given context %v", ctx) } - return strings.Split(stream.ClientAdvertisedCompressors(), ","), nil + return stream.ClientAdvertisedCompressors(), nil } // SetTrailer sets the trailer metadata that will be sent when an RPC returns. @@ -2049,17 +2142,9 @@ func Method(ctx context.Context) (string, bool) { return s.Method(), true } -type channelzServer struct { - s *Server -} - -func (c *channelzServer) ChannelzMetric() *channelz.ServerInternalMetric { - return c.s.channelzMetric() -} - // validateSendCompressor returns an error when given compressor name cannot be // handled by the server or the client based on the advertised compressors. -func validateSendCompressor(name, clientCompressors string) error { +func validateSendCompressor(name string, clientCompressors []string) error { if name == encoding.Identity { return nil } @@ -2068,7 +2153,7 @@ func validateSendCompressor(name, clientCompressors string) error { return fmt.Errorf("compressor not registered %q", name) } - for _, c := range strings.Split(clientCompressors, ",") { + for _, c := range clientCompressors { if c == name { return nil // found match } diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index 0df11fc09..2671c5ef6 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -25,8 +25,11 @@ import ( "reflect" "time" + "google.golang.org/grpc/balancer" + "google.golang.org/grpc/balancer/pickfirst" "google.golang.org/grpc/codes" "google.golang.org/grpc/internal" + "google.golang.org/grpc/internal/balancer/gracefulswitch" internalserviceconfig "google.golang.org/grpc/internal/serviceconfig" "google.golang.org/grpc/serviceconfig" ) @@ -41,11 +44,6 @@ const maxInt = int(^uint(0) >> 1) // https://github.com/grpc/grpc/blob/master/doc/service_config.md type MethodConfig = internalserviceconfig.MethodConfig -type lbConfig struct { - name string - cfg serviceconfig.LoadBalancingConfig -} - // ServiceConfig is provided by the service provider and contains parameters for how // clients that connect to the service should behave. // @@ -55,14 +53,9 @@ type lbConfig struct { type ServiceConfig struct { serviceconfig.Config - // LB is the load balancer the service providers recommends. This is - // deprecated; lbConfigs is preferred. If lbConfig and LB are both present, - // lbConfig will be used. - LB *string - // lbConfig is the service config's load balancing configuration. If // lbConfig and LB are both present, lbConfig will be used. - lbConfig *lbConfig + lbConfig serviceconfig.LoadBalancingConfig // Methods contains a map for the methods in this service. If there is an // exact match for a method (i.e. /service/method) in the map, use the @@ -164,38 +157,55 @@ type jsonMC struct { // TODO(lyuxuan): delete this struct after cleaning up old service config implementation. type jsonSC struct { LoadBalancingPolicy *string - LoadBalancingConfig *internalserviceconfig.BalancerConfig + LoadBalancingConfig *json.RawMessage MethodConfig *[]jsonMC RetryThrottling *retryThrottlingPolicy HealthCheckConfig *healthCheckConfig } func init() { - internal.ParseServiceConfig = parseServiceConfig + internal.ParseServiceConfig = func(js string) *serviceconfig.ParseResult { + return parseServiceConfig(js, defaultMaxCallAttempts) + } } -func parseServiceConfig(js string) *serviceconfig.ParseResult { +func parseServiceConfig(js string, maxAttempts int) *serviceconfig.ParseResult { if len(js) == 0 { return &serviceconfig.ParseResult{Err: fmt.Errorf("no JSON service config provided")} } var rsc jsonSC err := json.Unmarshal([]byte(js), &rsc) if err != nil { - logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) + logger.Warningf("grpc: unmarshalling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } sc := ServiceConfig{ - LB: rsc.LoadBalancingPolicy, Methods: make(map[string]MethodConfig), retryThrottling: rsc.RetryThrottling, healthCheckConfig: rsc.HealthCheckConfig, rawJSONString: js, } - if c := rsc.LoadBalancingConfig; c != nil { - sc.lbConfig = &lbConfig{ - name: c.Name, - cfg: c.Config, + c := rsc.LoadBalancingConfig + if c == nil { + name := pickfirst.Name + if rsc.LoadBalancingPolicy != nil { + name = *rsc.LoadBalancingPolicy + } + if balancer.Get(name) == nil { + name = pickfirst.Name + } + cfg := []map[string]any{{name: struct{}{}}} + strCfg, err := json.Marshal(cfg) + if err != nil { + return &serviceconfig.ParseResult{Err: fmt.Errorf("unexpected error marshaling simple LB config: %w", err)} } + r := json.RawMessage(strCfg) + c = &r } + cfg, err := gracefulswitch.ParseConfig(*c) + if err != nil { + return &serviceconfig.ParseResult{Err: err} + } + sc.lbConfig = cfg if rsc.MethodConfig == nil { return &serviceconfig.ParseResult{Config: &sc} @@ -211,8 +221,8 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { WaitForReady: m.WaitForReady, Timeout: (*time.Duration)(m.Timeout), } - if mc.RetryPolicy, err = convertRetryPolicy(m.RetryPolicy); err != nil { - logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) + if mc.RetryPolicy, err = convertRetryPolicy(m.RetryPolicy, maxAttempts); err != nil { + logger.Warningf("grpc: unmarshalling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } if m.MaxRequestMessageBytes != nil { @@ -232,13 +242,13 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { for i, n := range *m.Name { path, err := n.generatePath() if err != nil { - logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshalling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } if _, ok := paths[path]; ok { err = errDuplicatedName - logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshalling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } paths[path] = struct{}{} @@ -257,7 +267,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { return &serviceconfig.ParseResult{Config: &sc} } -func convertRetryPolicy(jrp *jsonRetryPolicy) (p *internalserviceconfig.RetryPolicy, err error) { +func convertRetryPolicy(jrp *jsonRetryPolicy, maxAttempts int) (p *internalserviceconfig.RetryPolicy, err error) { if jrp == nil { return nil, nil } @@ -271,17 +281,16 @@ func convertRetryPolicy(jrp *jsonRetryPolicy) (p *internalserviceconfig.RetryPol return nil, nil } + if jrp.MaxAttempts < maxAttempts { + maxAttempts = jrp.MaxAttempts + } rp := &internalserviceconfig.RetryPolicy{ - MaxAttempts: jrp.MaxAttempts, + MaxAttempts: maxAttempts, InitialBackoff: time.Duration(jrp.InitialBackoff), MaxBackoff: time.Duration(jrp.MaxBackoff), BackoffMultiplier: jrp.BackoffMultiplier, RetryableStatusCodes: make(map[codes.Code]bool), } - if rp.MaxAttempts > 5 { - // TODO(retry): Make the max maxAttempts configurable. - rp.MaxAttempts = 5 - } for _, code := range jrp.RetryableStatusCodes { rp.RetryableStatusCodes[code] = true } diff --git a/vendor/google.golang.org/grpc/stats/stats.go b/vendor/google.golang.org/grpc/stats/stats.go index 4ab70e2d4..fdb0bd651 100644 --- a/vendor/google.golang.org/grpc/stats/stats.go +++ b/vendor/google.golang.org/grpc/stats/stats.go @@ -73,9 +73,12 @@ func (*PickerUpdated) isRPCStats() {} type InPayload struct { // Client is true if this InPayload is from client side. Client bool - // Payload is the payload with original type. + // Payload is the payload with original type. This may be modified after + // the call to HandleRPC which provides the InPayload returns and must be + // copied if needed later. Payload any // Data is the serialized message payload. + // Deprecated: Data will be removed in the next release. Data []byte // Length is the size of the uncompressed payload data. Does not include any @@ -143,9 +146,12 @@ func (s *InTrailer) isRPCStats() {} type OutPayload struct { // Client is true if this OutPayload is from client side. Client bool - // Payload is the payload with original type. + // Payload is the payload with original type. This may be modified after + // the call to HandleRPC which provides the OutPayload returns and must be + // copied if needed later. Payload any // Data is the serialized message payload. + // Deprecated: Data will be removed in the next release. Data []byte // Length is the size of the uncompressed payload data. Does not include any // framing (gRPC or HTTP/2). diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index b14b2fbea..8051ef5b5 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -23,11 +23,11 @@ import ( "errors" "io" "math" + "math/rand" "strconv" "sync" "time" - "golang.org/x/net/trace" "google.golang.org/grpc/balancer" "google.golang.org/grpc/codes" "google.golang.org/grpc/encoding" @@ -35,7 +35,6 @@ import ( "google.golang.org/grpc/internal/balancerload" "google.golang.org/grpc/internal/binarylog" "google.golang.org/grpc/internal/channelz" - "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/internal/grpcutil" imetadata "google.golang.org/grpc/internal/metadata" iresolver "google.golang.org/grpc/internal/resolver" @@ -48,6 +47,8 @@ import ( "google.golang.org/grpc/status" ) +var metadataFromOutgoingContextRaw = internal.FromOutgoingContextRaw.(func(context.Context) (metadata.MD, [][]string, bool)) + // StreamHandler defines the handler called by gRPC server to complete the // execution of a streaming RPC. // @@ -184,7 +185,7 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth // when the RPC completes. opts = append([]CallOption{OnFinish(func(error) { cc.idlenessMgr.OnCallEnd() })}, opts...) - if md, added, ok := metadata.FromOutgoingContextRaw(ctx); ok { + if md, added, ok := metadataFromOutgoingContextRaw(ctx); ok { // validate md if err := imetadata.Validate(md); err != nil { return nil, status.Error(codes.Internal, err.Error()) @@ -429,7 +430,7 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) var trInfo *traceInfo if EnableTracing { trInfo = &traceInfo{ - tr: trace.New("grpc.Sent."+methodFamily(method), method), + tr: newTrace("grpc.Sent."+methodFamily(method), method), firstLine: firstLine{ client: true, }, @@ -438,7 +439,7 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) trInfo.firstLine.deadline = time.Until(deadline) } trInfo.tr.LazyLog(&trInfo.firstLine, false) - ctx = trace.NewContext(ctx, trInfo.tr) + ctx = newTraceContext(ctx, trInfo.tr) } if cs.cc.parsedTarget.URL.Scheme == internal.GRPCResolverSchemeExtraMetadata { @@ -515,6 +516,7 @@ func (a *csAttempt) newStream() error { return toRPCErr(nse.Err) } a.s = s + a.ctx = s.Context() a.p = &parser{r: s, recvBufferPool: a.cs.cc.dopts.recvBufferPool} return nil } @@ -654,13 +656,13 @@ func (a *csAttempt) shouldRetry(err error) (bool, error) { if len(sps) == 1 { var e error if pushback, e = strconv.Atoi(sps[0]); e != nil || pushback < 0 { - channelz.Infof(logger, cs.cc.channelzID, "Server retry pushback specified to abort (%q).", sps[0]) + channelz.Infof(logger, cs.cc.channelz, "Server retry pushback specified to abort (%q).", sps[0]) cs.retryThrottler.throttle() // This counts as a failure for throttling. return false, err } hasPushback = true } else if len(sps) > 1 { - channelz.Warningf(logger, cs.cc.channelzID, "Server retry pushback specified multiple values (%q); not retrying.", sps) + channelz.Warningf(logger, cs.cc.channelz, "Server retry pushback specified multiple values (%q); not retrying.", sps) cs.retryThrottler.throttle() // This counts as a failure for throttling. return false, err } @@ -697,7 +699,7 @@ func (a *csAttempt) shouldRetry(err error) (bool, error) { if max := float64(rp.MaxBackoff); cur > max { cur = max } - dur = time.Duration(grpcrand.Int63n(int64(cur))) + dur = time.Duration(rand.Int63n(int64(cur))) cs.numRetriesSincePushback++ } diff --git a/vendor/google.golang.org/grpc/stream_interfaces.go b/vendor/google.golang.org/grpc/stream_interfaces.go new file mode 100644 index 000000000..8b813529c --- /dev/null +++ b/vendor/google.golang.org/grpc/stream_interfaces.go @@ -0,0 +1,152 @@ +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +// ServerStreamingClient represents the client side of a server-streaming (one +// request, many responses) RPC. It is generic over the type of the response +// message. It is used in generated code. +type ServerStreamingClient[Res any] interface { + Recv() (*Res, error) + ClientStream +} + +// ServerStreamingServer represents the server side of a server-streaming (one +// request, many responses) RPC. It is generic over the type of the response +// message. It is used in generated code. +type ServerStreamingServer[Res any] interface { + Send(*Res) error + ServerStream +} + +// ClientStreamingClient represents the client side of a client-streaming (many +// requests, one response) RPC. It is generic over both the type of the request +// message stream and the type of the unary response message. It is used in +// generated code. +type ClientStreamingClient[Req any, Res any] interface { + Send(*Req) error + CloseAndRecv() (*Res, error) + ClientStream +} + +// ClientStreamingServer represents the server side of a client-streaming (many +// requests, one response) RPC. It is generic over both the type of the request +// message stream and the type of the unary response message. It is used in +// generated code. +type ClientStreamingServer[Req any, Res any] interface { + Recv() (*Req, error) + SendAndClose(*Res) error + ServerStream +} + +// BidiStreamingClient represents the client side of a bidirectional-streaming +// (many requests, many responses) RPC. It is generic over both the type of the +// request message stream and the type of the response message stream. It is +// used in generated code. +type BidiStreamingClient[Req any, Res any] interface { + Send(*Req) error + Recv() (*Res, error) + ClientStream +} + +// BidiStreamingServer represents the server side of a bidirectional-streaming +// (many requests, many responses) RPC. It is generic over both the type of the +// request message stream and the type of the response message stream. It is +// used in generated code. +type BidiStreamingServer[Req any, Res any] interface { + Recv() (*Req, error) + Send(*Res) error + ServerStream +} + +// GenericClientStream implements the ServerStreamingClient, ClientStreamingClient, +// and BidiStreamingClient interfaces. It is used in generated code. +type GenericClientStream[Req any, Res any] struct { + ClientStream +} + +var _ ServerStreamingClient[string] = (*GenericClientStream[int, string])(nil) +var _ ClientStreamingClient[int, string] = (*GenericClientStream[int, string])(nil) +var _ BidiStreamingClient[int, string] = (*GenericClientStream[int, string])(nil) + +// Send pushes one message into the stream of requests to be consumed by the +// server. The type of message which can be sent is determined by the Req type +// parameter of the GenericClientStream receiver. +func (x *GenericClientStream[Req, Res]) Send(m *Req) error { + return x.ClientStream.SendMsg(m) +} + +// Recv reads one message from the stream of responses generated by the server. +// The type of the message returned is determined by the Res type parameter +// of the GenericClientStream receiver. +func (x *GenericClientStream[Req, Res]) Recv() (*Res, error) { + m := new(Res) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// CloseAndRecv closes the sending side of the stream, then receives the unary +// response from the server. The type of message which it returns is determined +// by the Res type parameter of the GenericClientStream receiver. +func (x *GenericClientStream[Req, Res]) CloseAndRecv() (*Res, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(Res) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// GenericServerStream implements the ServerStreamingServer, ClientStreamingServer, +// and BidiStreamingServer interfaces. It is used in generated code. +type GenericServerStream[Req any, Res any] struct { + ServerStream +} + +var _ ServerStreamingServer[string] = (*GenericServerStream[int, string])(nil) +var _ ClientStreamingServer[int, string] = (*GenericServerStream[int, string])(nil) +var _ BidiStreamingServer[int, string] = (*GenericServerStream[int, string])(nil) + +// Send pushes one message into the stream of responses to be consumed by the +// client. The type of message which can be sent is determined by the Res +// type parameter of the serverStreamServer receiver. +func (x *GenericServerStream[Req, Res]) Send(m *Res) error { + return x.ServerStream.SendMsg(m) +} + +// SendAndClose pushes the unary response to the client. The type of message +// which can be sent is determined by the Res type parameter of the +// clientStreamServer receiver. +func (x *GenericServerStream[Req, Res]) SendAndClose(m *Res) error { + return x.ServerStream.SendMsg(m) +} + +// Recv reads one message from the stream of requests generated by the client. +// The type of the message returned is determined by the Req type parameter +// of the clientStreamServer receiver. +func (x *GenericServerStream[Req, Res]) Recv() (*Req, error) { + m := new(Req) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} diff --git a/vendor/google.golang.org/grpc/trace.go b/vendor/google.golang.org/grpc/trace.go index 9ded79321..10f4f798f 100644 --- a/vendor/google.golang.org/grpc/trace.go +++ b/vendor/google.golang.org/grpc/trace.go @@ -26,8 +26,6 @@ import ( "strings" "sync" "time" - - "golang.org/x/net/trace" ) // EnableTracing controls whether to trace RPCs using the golang.org/x/net/trace package. @@ -44,9 +42,31 @@ func methodFamily(m string) string { return m } +// traceEventLog mirrors golang.org/x/net/trace.EventLog. +// +// It exists in order to avoid importing x/net/trace on grpcnotrace builds. +type traceEventLog interface { + Printf(format string, a ...any) + Errorf(format string, a ...any) + Finish() +} + +// traceLog mirrors golang.org/x/net/trace.Trace. +// +// It exists in order to avoid importing x/net/trace on grpcnotrace builds. +type traceLog interface { + LazyLog(x fmt.Stringer, sensitive bool) + LazyPrintf(format string, a ...any) + SetError() + SetRecycler(f func(any)) + SetTraceInfo(traceID, spanID uint64) + SetMaxEvents(m int) + Finish() +} + // traceInfo contains tracing information for an RPC. type traceInfo struct { - tr trace.Trace + tr traceLog firstLine firstLine } diff --git a/vendor/google.golang.org/grpc/trace_notrace.go b/vendor/google.golang.org/grpc/trace_notrace.go new file mode 100644 index 000000000..1da3a2308 --- /dev/null +++ b/vendor/google.golang.org/grpc/trace_notrace.go @@ -0,0 +1,52 @@ +//go:build grpcnotrace + +/* + * + * Copyright 2024 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +// grpcnotrace can be used to avoid importing golang.org/x/net/trace, which in +// turn enables binaries using gRPC-Go for dead code elimination, which can +// yield 10-15% improvements in binary size when tracing is not needed. + +import ( + "context" + "fmt" +) + +type notrace struct{} + +func (notrace) LazyLog(x fmt.Stringer, sensitive bool) {} +func (notrace) LazyPrintf(format string, a ...any) {} +func (notrace) SetError() {} +func (notrace) SetRecycler(f func(any)) {} +func (notrace) SetTraceInfo(traceID, spanID uint64) {} +func (notrace) SetMaxEvents(m int) {} +func (notrace) Finish() {} + +func newTrace(family, title string) traceLog { + return notrace{} +} + +func newTraceContext(ctx context.Context, tr traceLog) context.Context { + return ctx +} + +func newTraceEventLog(family, title string) traceEventLog { + return nil +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/util_linux.go b/vendor/google.golang.org/grpc/trace_withtrace.go similarity index 59% rename from vendor/google.golang.org/grpc/internal/channelz/util_linux.go rename to vendor/google.golang.org/grpc/trace_withtrace.go index 98288c3f8..88d6e8571 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/util_linux.go +++ b/vendor/google.golang.org/grpc/trace_withtrace.go @@ -1,6 +1,8 @@ +//go:build !grpcnotrace + /* * - * Copyright 2018 gRPC authors. + * Copyright 2024 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,22 +18,22 @@ * */ -package channelz +package grpc import ( - "syscall" + "context" + + t "golang.org/x/net/trace" ) -// GetSocketOption gets the socket option info of the conn. -func GetSocketOption(socket any) *SocketOptionData { - c, ok := socket.(syscall.Conn) - if !ok { - return nil - } - data := &SocketOptionData{} - if rawConn, err := c.SyscallConn(); err == nil { - rawConn.Control(data.Getsockopt) - return data - } - return nil +func newTrace(family, title string) traceLog { + return t.New(family, title) +} + +func newTraceContext(ctx context.Context, tr traceLog) context.Context { + return t.NewContext(ctx, tr) +} + +func newTraceEventLog(family, title string) traceEventLog { + return t.NewEventLog(family, title) } diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 6d2cadd79..bafaef99b 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.59.0" +const Version = "1.65.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh deleted file mode 100644 index bb480f1f9..000000000 --- a/vendor/google.golang.org/grpc/vet.sh +++ /dev/null @@ -1,212 +0,0 @@ -#!/bin/bash - -set -ex # Exit on error; debugging enabled. -set -o pipefail # Fail a pipe if any sub-command fails. - -# not makes sure the command passed to it does not exit with a return code of 0. -not() { - # This is required instead of the earlier (! $COMMAND) because subshells and - # pipefail don't work the same on Darwin as in Linux. - ! "$@" -} - -die() { - echo "$@" >&2 - exit 1 -} - -fail_on_output() { - tee /dev/stderr | not read -} - -# Check to make sure it's safe to modify the user's git repo. -git status --porcelain | fail_on_output - -# Undo any edits made by this script. -cleanup() { - git reset --hard HEAD -} -trap cleanup EXIT - -PATH="${HOME}/go/bin:${GOROOT}/bin:${PATH}" -go version - -if [[ "$1" = "-install" ]]; then - # Install the pinned versions as defined in module tools. - pushd ./test/tools - go install \ - golang.org/x/lint/golint \ - golang.org/x/tools/cmd/goimports \ - honnef.co/go/tools/cmd/staticcheck \ - github.com/client9/misspell/cmd/misspell - popd - if [[ -z "${VET_SKIP_PROTO}" ]]; then - if [[ "${GITHUB_ACTIONS}" = "true" ]]; then - PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files. - PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip - pushd /home/runner/go - wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} - unzip ${PROTOC_FILENAME} - bin/protoc --version - popd - elif not which protoc > /dev/null; then - die "Please install protoc into your path" - fi - fi - exit 0 -elif [[ "$#" -ne 0 ]]; then - die "Unknown argument(s): $*" -fi - -# - Check that generated proto files are up to date. -if [[ -z "${VET_SKIP_PROTO}" ]]; then - make proto && git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) -fi - -if [[ -n "${VET_ONLY_PROTO}" ]]; then - exit 0 -fi - -# - Ensure all source files contain a copyright message. -# (Done in two parts because Darwin "git grep" has broken support for compound -# exclusion matches.) -(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output - -# - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. -not grep 'func Test[^(]' *_test.go -not grep 'func Test[^(]' test/*.go - -# - Do not import x/net/context. -not git grep -l 'x/net/context' -- "*.go" - -# - Do not import math/rand for real library code. Use internal/grpcrand for -# thread safety. -git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' - -# - Do not use "interface{}"; use "any" instead. -git grep -l 'interface{}' -- "*.go" 2>&1 | not grep -v '\.pb\.go\|protoc-gen-go-grpc' - -# - Do not call grpclog directly. Use grpclog.Component instead. -git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' - -# - Ensure all ptypes proto packages are renamed when importing. -not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" - -# - Ensure all usages of grpc_testing package are renamed when importing. -not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go" - -# - Ensure all xds proto imports are renamed to *pb or *grpc. -git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "' - -misspell -error . - -# - gofmt, goimports, golint (with exceptions for generated code), go vet, -# go mod tidy. -# Perform these checks on each module inside gRPC. -for MOD_FILE in $(find . -name 'go.mod'); do - MOD_DIR=$(dirname ${MOD_FILE}) - pushd ${MOD_DIR} - go vet -all ./... | fail_on_output - gofmt -s -d -l . 2>&1 | fail_on_output - goimports -l . 2>&1 | not grep -vE "\.pb\.go" - golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" - - go mod tidy -compat=1.19 - git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) - popd -done - -# - Collection of static analysis checks -# -# TODO(dfawley): don't use deprecated functions in examples or first-party -# plugins. -# TODO(dfawley): enable ST1019 (duplicate imports) but allow for protobufs. -SC_OUT="$(mktemp)" -staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... > "${SC_OUT}" || true -# Error if anything other than deprecation warnings are printed. -not grep -v "is deprecated:.*SA1019" "${SC_OUT}" -# Only ignore the following deprecated types/fields/functions. -not grep -Fv '.CredsBundle -.HeaderMap -.Metadata is deprecated: use Attributes -.NewAddress -.NewServiceConfig -.Type is deprecated: use Attributes -BuildVersion is deprecated -balancer.ErrTransientFailure -balancer.Picker -extDesc.Filename is deprecated -github.com/golang/protobuf/jsonpb is deprecated -grpc.CallCustomCodec -grpc.Code -grpc.Compressor -grpc.CustomCodec -grpc.Decompressor -grpc.MaxMsgSize -grpc.MethodConfig -grpc.NewGZIPCompressor -grpc.NewGZIPDecompressor -grpc.RPCCompressor -grpc.RPCDecompressor -grpc.ServiceConfig -grpc.WithCompressor -grpc.WithDecompressor -grpc.WithDialer -grpc.WithMaxMsgSize -grpc.WithServiceConfig -grpc.WithTimeout -http.CloseNotifier -info.SecurityVersion -proto is deprecated -proto.InternalMessageInfo is deprecated -proto.EnumName is deprecated -proto.ErrInternalBadWireType is deprecated -proto.FileDescriptor is deprecated -proto.Marshaler is deprecated -proto.MessageType is deprecated -proto.RegisterEnum is deprecated -proto.RegisterFile is deprecated -proto.RegisterType is deprecated -proto.RegisterExtension is deprecated -proto.RegisteredExtension is deprecated -proto.RegisteredExtensions is deprecated -proto.RegisterMapType is deprecated -proto.Unmarshaler is deprecated -Target is deprecated: Use the Target field in the BuildOptions instead. -xxx_messageInfo_ -' "${SC_OUT}" - -# - special golint on package comments. -lint_package_comment_per_package() { - # Number of files in this go package. - fileCount=$(go list -f '{{len .GoFiles}}' $1) - if [ ${fileCount} -eq 0 ]; then - return 0 - fi - # Number of package errors generated by golint. - lintPackageCommentErrorsCount=$(golint --min_confidence 0 $1 | grep -c "should have a package comment") - # golint complains about every file that's missing the package comment. If the - # number of files for this package is greater than the number of errors, there's - # at least one file with package comment, good. Otherwise, fail. - if [ ${fileCount} -le ${lintPackageCommentErrorsCount} ]; then - echo "Package $1 (with ${fileCount} files) is missing package comment" - return 1 - fi -} -lint_package_comment() { - set +ex - - count=0 - for i in $(go list ./...); do - lint_package_comment_per_package "$i" - ((count += $?)) - done - - set -ex - return $count -} -lint_package_comment - -echo SUCCESS diff --git a/vendor/google.golang.org/protobuf/protoadapt/convert.go b/vendor/google.golang.org/protobuf/protoadapt/convert.go new file mode 100644 index 000000000..ea276d15a --- /dev/null +++ b/vendor/google.golang.org/protobuf/protoadapt/convert.go @@ -0,0 +1,31 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package protoadapt bridges the original and new proto APIs. +package protoadapt + +import ( + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/runtime/protoimpl" +) + +// MessageV1 is the original [github.com/golang/protobuf/proto.Message] type. +type MessageV1 = protoiface.MessageV1 + +// MessageV2 is the [google.golang.org/protobuf/proto.Message] type used by the +// current [google.golang.org/protobuf] module, adding support for reflection. +type MessageV2 = proto.Message + +// MessageV1Of converts a v2 message to a v1 message. +// It returns nil if m is nil. +func MessageV1Of(m MessageV2) MessageV1 { + return protoimpl.X.ProtoMessageV1Of(m) +} + +// MessageV2Of converts a v1 message to a v2 message. +// It returns nil if m is nil. +func MessageV2Of(m MessageV1) MessageV2 { + return protoimpl.X.ProtoMessageV2Of(m) +} diff --git a/vendor/gopkg.in/evanphx/json-patch.v4/.gitignore b/vendor/gopkg.in/evanphx/json-patch.v4/.gitignore new file mode 100644 index 000000000..b7ed7f956 --- /dev/null +++ b/vendor/gopkg.in/evanphx/json-patch.v4/.gitignore @@ -0,0 +1,6 @@ +# editor and IDE paraphernalia +.idea +.vscode + +# macOS paraphernalia +.DS_Store diff --git a/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE b/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE new file mode 100644 index 000000000..df76d7d77 --- /dev/null +++ b/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2014, Evan Phoenix +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. +* Neither the name of the Evan Phoenix 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 OWNER 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/vendor/gopkg.in/evanphx/json-patch.v4/README.md b/vendor/gopkg.in/evanphx/json-patch.v4/README.md new file mode 100644 index 000000000..28e351693 --- /dev/null +++ b/vendor/gopkg.in/evanphx/json-patch.v4/README.md @@ -0,0 +1,317 @@ +# JSON-Patch +`jsonpatch` is a library which provides functionality for both applying +[RFC6902 JSON patches](http://tools.ietf.org/html/rfc6902) against documents, as +well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). + +[![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) +[![Build Status](https://travis-ci.org/evanphx/json-patch.svg?branch=master)](https://travis-ci.org/evanphx/json-patch) +[![Report Card](https://goreportcard.com/badge/github.com/evanphx/json-patch)](https://goreportcard.com/report/github.com/evanphx/json-patch) + +# Get It! + +**Latest and greatest**: +```bash +go get -u github.com/evanphx/json-patch/v5 +``` + +**Stable Versions**: +* Version 5: `go get -u gopkg.in/evanphx/json-patch.v5` +* Version 4: `go get -u gopkg.in/evanphx/json-patch.v4` + +(previous versions below `v3` are unavailable) + +# Use It! +* [Create and apply a merge patch](#create-and-apply-a-merge-patch) +* [Create and apply a JSON Patch](#create-and-apply-a-json-patch) +* [Comparing JSON documents](#comparing-json-documents) +* [Combine merge patches](#combine-merge-patches) + + +# Configuration + +* There is a global configuration variable `jsonpatch.SupportNegativeIndices`. + This defaults to `true` and enables the non-standard practice of allowing + negative indices to mean indices starting at the end of an array. This + functionality can be disabled by setting `jsonpatch.SupportNegativeIndices = + false`. + +* There is a global configuration variable `jsonpatch.AccumulatedCopySizeLimit`, + which limits the total size increase in bytes caused by "copy" operations in a + patch. It defaults to 0, which means there is no limit. + +These global variables control the behavior of `jsonpatch.Apply`. + +An alternative to `jsonpatch.Apply` is `jsonpatch.ApplyWithOptions` whose behavior +is controlled by an `options` parameter of type `*jsonpatch.ApplyOptions`. + +Structure `jsonpatch.ApplyOptions` includes the configuration options above +and adds two new options: `AllowMissingPathOnRemove` and `EnsurePathExistsOnAdd`. + +When `AllowMissingPathOnRemove` is set to `true`, `jsonpatch.ApplyWithOptions` will ignore +`remove` operations whose `path` points to a non-existent location in the JSON document. +`AllowMissingPathOnRemove` defaults to `false` which will lead to `jsonpatch.ApplyWithOptions` +returning an error when hitting a missing `path` on `remove`. + +When `EnsurePathExistsOnAdd` is set to `true`, `jsonpatch.ApplyWithOptions` will make sure +that `add` operations produce all the `path` elements that are missing from the target object. + +Use `jsonpatch.NewApplyOptions` to create an instance of `jsonpatch.ApplyOptions` +whose values are populated from the global configuration variables. + +## Create and apply a merge patch +Given both an original JSON document and a modified JSON document, you can create +a [Merge Patch](https://tools.ietf.org/html/rfc7396) document. + +It can describe the changes needed to convert from the original to the +modified JSON document. + +Once you have a merge patch, you can apply it to other JSON documents using the +`jsonpatch.MergePatch(document, patch)` function. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + // Let's create a merge patch from these two documents... + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + target := []byte(`{"name": "Jane", "age": 24}`) + + patch, err := jsonpatch.CreateMergePatch(original, target) + if err != nil { + panic(err) + } + + // Now lets apply the patch against a different JSON document... + + alternative := []byte(`{"name": "Tina", "age": 28, "height": 3.75}`) + modifiedAlternative, err := jsonpatch.MergePatch(alternative, patch) + + fmt.Printf("patch document: %s\n", patch) + fmt.Printf("updated alternative doc: %s\n", modifiedAlternative) +} +``` + +When ran, you get the following output: + +```bash +$ go run main.go +patch document: {"height":null,"name":"Jane"} +updated alternative doc: {"age":28,"name":"Jane"} +``` + +## Create and apply a JSON Patch +You can create patch objects using `DecodePatch([]byte)`, which can then +be applied against JSON documents. + +The following is an example of creating a patch from two operations, and +applying it against a JSON document. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + patchJSON := []byte(`[ + {"op": "replace", "path": "/name", "value": "Jane"}, + {"op": "remove", "path": "/height"} + ]`) + + patch, err := jsonpatch.DecodePatch(patchJSON) + if err != nil { + panic(err) + } + + modified, err := patch.Apply(original) + if err != nil { + panic(err) + } + + fmt.Printf("Original document: %s\n", original) + fmt.Printf("Modified document: %s\n", modified) +} +``` + +When ran, you get the following output: + +```bash +$ go run main.go +Original document: {"name": "John", "age": 24, "height": 3.21} +Modified document: {"age":24,"name":"Jane"} +``` + +## Comparing JSON documents +Due to potential whitespace and ordering differences, one cannot simply compare +JSON strings or byte-arrays directly. + +As such, you can instead use `jsonpatch.Equal(document1, document2)` to +determine if two JSON documents are _structurally_ equal. This ignores +whitespace differences, and key-value ordering. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + similar := []byte(` + { + "age": 24, + "height": 3.21, + "name": "John" + } + `) + different := []byte(`{"name": "Jane", "age": 20, "height": 3.37}`) + + if jsonpatch.Equal(original, similar) { + fmt.Println(`"original" is structurally equal to "similar"`) + } + + if !jsonpatch.Equal(original, different) { + fmt.Println(`"original" is _not_ structurally equal to "different"`) + } +} +``` + +When ran, you get the following output: +```bash +$ go run main.go +"original" is structurally equal to "similar" +"original" is _not_ structurally equal to "different" +``` + +## Combine merge patches +Given two JSON merge patch documents, it is possible to combine them into a +single merge patch which can describe both set of changes. + +The resulting merge patch can be used such that applying it results in a +document structurally similar as merging each merge patch to the document +in succession. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + + nameAndHeight := []byte(`{"height":null,"name":"Jane"}`) + ageAndEyes := []byte(`{"age":4.23,"eyes":"blue"}`) + + // Let's combine these merge patch documents... + combinedPatch, err := jsonpatch.MergeMergePatches(nameAndHeight, ageAndEyes) + if err != nil { + panic(err) + } + + // Apply each patch individual against the original document + withoutCombinedPatch, err := jsonpatch.MergePatch(original, nameAndHeight) + if err != nil { + panic(err) + } + + withoutCombinedPatch, err = jsonpatch.MergePatch(withoutCombinedPatch, ageAndEyes) + if err != nil { + panic(err) + } + + // Apply the combined patch against the original document + + withCombinedPatch, err := jsonpatch.MergePatch(original, combinedPatch) + if err != nil { + panic(err) + } + + // Do both result in the same thing? They should! + if jsonpatch.Equal(withCombinedPatch, withoutCombinedPatch) { + fmt.Println("Both JSON documents are structurally the same!") + } + + fmt.Printf("combined merge patch: %s", combinedPatch) +} +``` + +When ran, you get the following output: +```bash +$ go run main.go +Both JSON documents are structurally the same! +combined merge patch: {"age":4.23,"eyes":"blue","height":null,"name":"Jane"} +``` + +# CLI for comparing JSON documents +You can install the commandline program `json-patch`. + +This program can take multiple JSON patch documents as arguments, +and fed a JSON document from `stdin`. It will apply the patch(es) against +the document and output the modified doc. + +**patch.1.json** +```json +[ + {"op": "replace", "path": "/name", "value": "Jane"}, + {"op": "remove", "path": "/height"} +] +``` + +**patch.2.json** +```json +[ + {"op": "add", "path": "/address", "value": "123 Main St"}, + {"op": "replace", "path": "/age", "value": "21"} +] +``` + +**document.json** +```json +{ + "name": "John", + "age": 24, + "height": 3.21 +} +``` + +You can then run: + +```bash +$ go install github.com/evanphx/json-patch/cmd/json-patch +$ cat document.json | json-patch -p patch.1.json -p patch.2.json +{"address":"123 Main St","age":"21","name":"Jane"} +``` + +# Help It! +Contributions are welcomed! Leave [an issue](https://github.com/evanphx/json-patch/issues) +or [create a PR](https://github.com/evanphx/json-patch/compare). + + +Before creating a pull request, we'd ask that you make sure tests are passing +and that you have added new tests when applicable. + +Contributors can run tests using: + +```bash +go test -cover ./... +``` + +Builds for pull requests are tested automatically +using [TravisCI](https://travis-ci.org/evanphx/json-patch). diff --git a/vendor/gopkg.in/evanphx/json-patch.v4/errors.go b/vendor/gopkg.in/evanphx/json-patch.v4/errors.go new file mode 100644 index 000000000..75304b443 --- /dev/null +++ b/vendor/gopkg.in/evanphx/json-patch.v4/errors.go @@ -0,0 +1,38 @@ +package jsonpatch + +import "fmt" + +// AccumulatedCopySizeError is an error type returned when the accumulated size +// increase caused by copy operations in a patch operation has exceeded the +// limit. +type AccumulatedCopySizeError struct { + limit int64 + accumulated int64 +} + +// NewAccumulatedCopySizeError returns an AccumulatedCopySizeError. +func NewAccumulatedCopySizeError(l, a int64) *AccumulatedCopySizeError { + return &AccumulatedCopySizeError{limit: l, accumulated: a} +} + +// Error implements the error interface. +func (a *AccumulatedCopySizeError) Error() string { + return fmt.Sprintf("Unable to complete the copy, the accumulated size increase of copy is %d, exceeding the limit %d", a.accumulated, a.limit) +} + +// ArraySizeError is an error type returned when the array size has exceeded +// the limit. +type ArraySizeError struct { + limit int + size int +} + +// NewArraySizeError returns an ArraySizeError. +func NewArraySizeError(l, s int) *ArraySizeError { + return &ArraySizeError{limit: l, size: s} +} + +// Error implements the error interface. +func (a *ArraySizeError) Error() string { + return fmt.Sprintf("Unable to create array of size %d, limit is %d", a.size, a.limit) +} diff --git a/vendor/gopkg.in/evanphx/json-patch.v4/merge.go b/vendor/gopkg.in/evanphx/json-patch.v4/merge.go new file mode 100644 index 000000000..ad88d4018 --- /dev/null +++ b/vendor/gopkg.in/evanphx/json-patch.v4/merge.go @@ -0,0 +1,389 @@ +package jsonpatch + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" +) + +func merge(cur, patch *lazyNode, mergeMerge bool) *lazyNode { + curDoc, err := cur.intoDoc() + + if err != nil { + pruneNulls(patch) + return patch + } + + patchDoc, err := patch.intoDoc() + + if err != nil { + return patch + } + + mergeDocs(curDoc, patchDoc, mergeMerge) + + return cur +} + +func mergeDocs(doc, patch *partialDoc, mergeMerge bool) { + for k, v := range *patch { + if v == nil { + if mergeMerge { + (*doc)[k] = nil + } else { + delete(*doc, k) + } + } else { + cur, ok := (*doc)[k] + + if !ok || cur == nil { + if !mergeMerge { + pruneNulls(v) + } + + (*doc)[k] = v + } else { + (*doc)[k] = merge(cur, v, mergeMerge) + } + } + } +} + +func pruneNulls(n *lazyNode) { + sub, err := n.intoDoc() + + if err == nil { + pruneDocNulls(sub) + } else { + ary, err := n.intoAry() + + if err == nil { + pruneAryNulls(ary) + } + } +} + +func pruneDocNulls(doc *partialDoc) *partialDoc { + for k, v := range *doc { + if v == nil { + delete(*doc, k) + } else { + pruneNulls(v) + } + } + + return doc +} + +func pruneAryNulls(ary *partialArray) *partialArray { + newAry := []*lazyNode{} + + for _, v := range *ary { + if v != nil { + pruneNulls(v) + } + newAry = append(newAry, v) + } + + *ary = newAry + + return ary +} + +var ErrBadJSONDoc = fmt.Errorf("Invalid JSON Document") +var ErrBadJSONPatch = fmt.Errorf("Invalid JSON Patch") +var errBadMergeTypes = fmt.Errorf("Mismatched JSON Documents") + +// MergeMergePatches merges two merge patches together, such that +// applying this resulting merged merge patch to a document yields the same +// as merging each merge patch to the document in succession. +func MergeMergePatches(patch1Data, patch2Data []byte) ([]byte, error) { + return doMergePatch(patch1Data, patch2Data, true) +} + +// MergePatch merges the patchData into the docData. +func MergePatch(docData, patchData []byte) ([]byte, error) { + return doMergePatch(docData, patchData, false) +} + +func doMergePatch(docData, patchData []byte, mergeMerge bool) ([]byte, error) { + doc := &partialDoc{} + + docErr := json.Unmarshal(docData, doc) + + patch := &partialDoc{} + + patchErr := json.Unmarshal(patchData, patch) + + if _, ok := docErr.(*json.SyntaxError); ok { + return nil, ErrBadJSONDoc + } + + if _, ok := patchErr.(*json.SyntaxError); ok { + return nil, ErrBadJSONPatch + } + + if docErr == nil && *doc == nil { + return nil, ErrBadJSONDoc + } + + if patchErr == nil && *patch == nil { + return nil, ErrBadJSONPatch + } + + if docErr != nil || patchErr != nil { + // Not an error, just not a doc, so we turn straight into the patch + if patchErr == nil { + if mergeMerge { + doc = patch + } else { + doc = pruneDocNulls(patch) + } + } else { + patchAry := &partialArray{} + patchErr = json.Unmarshal(patchData, patchAry) + + if patchErr != nil { + return nil, ErrBadJSONPatch + } + + pruneAryNulls(patchAry) + + out, patchErr := json.Marshal(patchAry) + + if patchErr != nil { + return nil, ErrBadJSONPatch + } + + return out, nil + } + } else { + mergeDocs(doc, patch, mergeMerge) + } + + return json.Marshal(doc) +} + +// resemblesJSONArray indicates whether the byte-slice "appears" to be +// a JSON array or not. +// False-positives are possible, as this function does not check the internal +// structure of the array. It only checks that the outer syntax is present and +// correct. +func resemblesJSONArray(input []byte) bool { + input = bytes.TrimSpace(input) + + hasPrefix := bytes.HasPrefix(input, []byte("[")) + hasSuffix := bytes.HasSuffix(input, []byte("]")) + + return hasPrefix && hasSuffix +} + +// CreateMergePatch will return a merge patch document capable of converting +// the original document(s) to the modified document(s). +// The parameters can be bytes of either two JSON Documents, or two arrays of +// JSON documents. +// The merge patch returned follows the specification defined at http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-07 +func CreateMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalResemblesArray := resemblesJSONArray(originalJSON) + modifiedResemblesArray := resemblesJSONArray(modifiedJSON) + + // Do both byte-slices seem like JSON arrays? + if originalResemblesArray && modifiedResemblesArray { + return createArrayMergePatch(originalJSON, modifiedJSON) + } + + // Are both byte-slices are not arrays? Then they are likely JSON objects... + if !originalResemblesArray && !modifiedResemblesArray { + return createObjectMergePatch(originalJSON, modifiedJSON) + } + + // None of the above? Then return an error because of mismatched types. + return nil, errBadMergeTypes +} + +// createObjectMergePatch will return a merge-patch document capable of +// converting the original document to the modified document. +func createObjectMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalDoc := map[string]interface{}{} + modifiedDoc := map[string]interface{}{} + + err := json.Unmarshal(originalJSON, &originalDoc) + if err != nil { + return nil, ErrBadJSONDoc + } + + err = json.Unmarshal(modifiedJSON, &modifiedDoc) + if err != nil { + return nil, ErrBadJSONDoc + } + + dest, err := getDiff(originalDoc, modifiedDoc) + if err != nil { + return nil, err + } + + return json.Marshal(dest) +} + +// createArrayMergePatch will return an array of merge-patch documents capable +// of converting the original document to the modified document for each +// pair of JSON documents provided in the arrays. +// Arrays of mismatched sizes will result in an error. +func createArrayMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalDocs := []json.RawMessage{} + modifiedDocs := []json.RawMessage{} + + err := json.Unmarshal(originalJSON, &originalDocs) + if err != nil { + return nil, ErrBadJSONDoc + } + + err = json.Unmarshal(modifiedJSON, &modifiedDocs) + if err != nil { + return nil, ErrBadJSONDoc + } + + total := len(originalDocs) + if len(modifiedDocs) != total { + return nil, ErrBadJSONDoc + } + + result := []json.RawMessage{} + for i := 0; i < len(originalDocs); i++ { + original := originalDocs[i] + modified := modifiedDocs[i] + + patch, err := createObjectMergePatch(original, modified) + if err != nil { + return nil, err + } + + result = append(result, json.RawMessage(patch)) + } + + return json.Marshal(result) +} + +// Returns true if the array matches (must be json types). +// As is idiomatic for go, an empty array is not the same as a nil array. +func matchesArray(a, b []interface{}) bool { + if len(a) != len(b) { + return false + } + if (a == nil && b != nil) || (a != nil && b == nil) { + return false + } + for i := range a { + if !matchesValue(a[i], b[i]) { + return false + } + } + return true +} + +// Returns true if the values matches (must be json types) +// The types of the values must match, otherwise it will always return false +// If two map[string]interface{} are given, all elements must match. +func matchesValue(av, bv interface{}) bool { + if reflect.TypeOf(av) != reflect.TypeOf(bv) { + return false + } + switch at := av.(type) { + case string: + bt := bv.(string) + if bt == at { + return true + } + case float64: + bt := bv.(float64) + if bt == at { + return true + } + case bool: + bt := bv.(bool) + if bt == at { + return true + } + case nil: + // Both nil, fine. + return true + case map[string]interface{}: + bt := bv.(map[string]interface{}) + if len(bt) != len(at) { + return false + } + for key := range bt { + av, aOK := at[key] + bv, bOK := bt[key] + if aOK != bOK { + return false + } + if !matchesValue(av, bv) { + return false + } + } + return true + case []interface{}: + bt := bv.([]interface{}) + return matchesArray(at, bt) + } + return false +} + +// getDiff returns the (recursive) difference between a and b as a map[string]interface{}. +func getDiff(a, b map[string]interface{}) (map[string]interface{}, error) { + into := map[string]interface{}{} + for key, bv := range b { + av, ok := a[key] + // value was added + if !ok { + into[key] = bv + continue + } + // If types have changed, replace completely + if reflect.TypeOf(av) != reflect.TypeOf(bv) { + into[key] = bv + continue + } + // Types are the same, compare values + switch at := av.(type) { + case map[string]interface{}: + bt := bv.(map[string]interface{}) + dst := make(map[string]interface{}, len(bt)) + dst, err := getDiff(at, bt) + if err != nil { + return nil, err + } + if len(dst) > 0 { + into[key] = dst + } + case string, float64, bool: + if !matchesValue(av, bv) { + into[key] = bv + } + case []interface{}: + bt := bv.([]interface{}) + if !matchesArray(at, bt) { + into[key] = bv + } + case nil: + switch bv.(type) { + case nil: + // Both nil, fine. + default: + into[key] = bv + } + default: + panic(fmt.Sprintf("Unknown type:%T in key %s", av, key)) + } + } + // Now add all deleted values as nil + for key := range a { + _, found := b[key] + if !found { + into[key] = nil + } + } + return into, nil +} diff --git a/vendor/gopkg.in/evanphx/json-patch.v4/patch.go b/vendor/gopkg.in/evanphx/json-patch.v4/patch.go new file mode 100644 index 000000000..dc2b7e51e --- /dev/null +++ b/vendor/gopkg.in/evanphx/json-patch.v4/patch.go @@ -0,0 +1,851 @@ +package jsonpatch + +import ( + "bytes" + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/pkg/errors" +) + +const ( + eRaw = iota + eDoc + eAry +) + +var ( + // SupportNegativeIndices decides whether to support non-standard practice of + // allowing negative indices to mean indices starting at the end of an array. + // Default to true. + SupportNegativeIndices bool = true + // AccumulatedCopySizeLimit limits the total size increase in bytes caused by + // "copy" operations in a patch. + AccumulatedCopySizeLimit int64 = 0 +) + +var ( + ErrTestFailed = errors.New("test failed") + ErrMissing = errors.New("missing value") + ErrUnknownType = errors.New("unknown object type") + ErrInvalid = errors.New("invalid state detected") + ErrInvalidIndex = errors.New("invalid index referenced") +) + +type lazyNode struct { + raw *json.RawMessage + doc partialDoc + ary partialArray + which int +} + +// Operation is a single JSON-Patch step, such as a single 'add' operation. +type Operation map[string]*json.RawMessage + +// Patch is an ordered collection of Operations. +type Patch []Operation + +type partialDoc map[string]*lazyNode +type partialArray []*lazyNode + +type container interface { + get(key string) (*lazyNode, error) + set(key string, val *lazyNode) error + add(key string, val *lazyNode) error + remove(key string) error +} + +func newLazyNode(raw *json.RawMessage) *lazyNode { + return &lazyNode{raw: raw, doc: nil, ary: nil, which: eRaw} +} + +func (n *lazyNode) MarshalJSON() ([]byte, error) { + switch n.which { + case eRaw: + return json.Marshal(n.raw) + case eDoc: + return json.Marshal(n.doc) + case eAry: + return json.Marshal(n.ary) + default: + return nil, ErrUnknownType + } +} + +func (n *lazyNode) UnmarshalJSON(data []byte) error { + dest := make(json.RawMessage, len(data)) + copy(dest, data) + n.raw = &dest + n.which = eRaw + return nil +} + +func deepCopy(src *lazyNode) (*lazyNode, int, error) { + if src == nil { + return nil, 0, nil + } + a, err := src.MarshalJSON() + if err != nil { + return nil, 0, err + } + sz := len(a) + ra := make(json.RawMessage, sz) + copy(ra, a) + return newLazyNode(&ra), sz, nil +} + +func (n *lazyNode) intoDoc() (*partialDoc, error) { + if n.which == eDoc { + return &n.doc, nil + } + + if n.raw == nil { + return nil, ErrInvalid + } + + err := json.Unmarshal(*n.raw, &n.doc) + + if err != nil { + return nil, err + } + + n.which = eDoc + return &n.doc, nil +} + +func (n *lazyNode) intoAry() (*partialArray, error) { + if n.which == eAry { + return &n.ary, nil + } + + if n.raw == nil { + return nil, ErrInvalid + } + + err := json.Unmarshal(*n.raw, &n.ary) + + if err != nil { + return nil, err + } + + n.which = eAry + return &n.ary, nil +} + +func (n *lazyNode) compact() []byte { + buf := &bytes.Buffer{} + + if n.raw == nil { + return nil + } + + err := json.Compact(buf, *n.raw) + + if err != nil { + return *n.raw + } + + return buf.Bytes() +} + +func (n *lazyNode) tryDoc() bool { + if n.raw == nil { + return false + } + + err := json.Unmarshal(*n.raw, &n.doc) + + if err != nil { + return false + } + + n.which = eDoc + return true +} + +func (n *lazyNode) tryAry() bool { + if n.raw == nil { + return false + } + + err := json.Unmarshal(*n.raw, &n.ary) + + if err != nil { + return false + } + + n.which = eAry + return true +} + +func (n *lazyNode) equal(o *lazyNode) bool { + if n.which == eRaw { + if !n.tryDoc() && !n.tryAry() { + if o.which != eRaw { + return false + } + + return bytes.Equal(n.compact(), o.compact()) + } + } + + if n.which == eDoc { + if o.which == eRaw { + if !o.tryDoc() { + return false + } + } + + if o.which != eDoc { + return false + } + + if len(n.doc) != len(o.doc) { + return false + } + + for k, v := range n.doc { + ov, ok := o.doc[k] + + if !ok { + return false + } + + if (v == nil) != (ov == nil) { + return false + } + + if v == nil && ov == nil { + continue + } + + if !v.equal(ov) { + return false + } + } + + return true + } + + if o.which != eAry && !o.tryAry() { + return false + } + + if len(n.ary) != len(o.ary) { + return false + } + + for idx, val := range n.ary { + if !val.equal(o.ary[idx]) { + return false + } + } + + return true +} + +// Kind reads the "op" field of the Operation. +func (o Operation) Kind() string { + if obj, ok := o["op"]; ok && obj != nil { + var op string + + err := json.Unmarshal(*obj, &op) + + if err != nil { + return "unknown" + } + + return op + } + + return "unknown" +} + +// Path reads the "path" field of the Operation. +func (o Operation) Path() (string, error) { + if obj, ok := o["path"]; ok && obj != nil { + var op string + + err := json.Unmarshal(*obj, &op) + + if err != nil { + return "unknown", err + } + + return op, nil + } + + return "unknown", errors.Wrapf(ErrMissing, "operation missing path field") +} + +// From reads the "from" field of the Operation. +func (o Operation) From() (string, error) { + if obj, ok := o["from"]; ok && obj != nil { + var op string + + err := json.Unmarshal(*obj, &op) + + if err != nil { + return "unknown", err + } + + return op, nil + } + + return "unknown", errors.Wrapf(ErrMissing, "operation, missing from field") +} + +func (o Operation) value() *lazyNode { + if obj, ok := o["value"]; ok { + return newLazyNode(obj) + } + + return nil +} + +// ValueInterface decodes the operation value into an interface. +func (o Operation) ValueInterface() (interface{}, error) { + if obj, ok := o["value"]; ok && obj != nil { + var v interface{} + + err := json.Unmarshal(*obj, &v) + + if err != nil { + return nil, err + } + + return v, nil + } + + return nil, errors.Wrapf(ErrMissing, "operation, missing value field") +} + +func isArray(buf []byte) bool { +Loop: + for _, c := range buf { + switch c { + case ' ': + case '\n': + case '\t': + continue + case '[': + return true + default: + break Loop + } + } + + return false +} + +func findObject(pd *container, path string) (container, string) { + doc := *pd + + split := strings.Split(path, "/") + + if len(split) < 2 { + return nil, "" + } + + parts := split[1 : len(split)-1] + + key := split[len(split)-1] + + var err error + + for _, part := range parts { + + next, ok := doc.get(decodePatchKey(part)) + + if next == nil || ok != nil { + return nil, "" + } + + if isArray(*next.raw) { + doc, err = next.intoAry() + + if err != nil { + return nil, "" + } + } else { + doc, err = next.intoDoc() + + if err != nil { + return nil, "" + } + } + } + + return doc, decodePatchKey(key) +} + +func (d *partialDoc) set(key string, val *lazyNode) error { + (*d)[key] = val + return nil +} + +func (d *partialDoc) add(key string, val *lazyNode) error { + (*d)[key] = val + return nil +} + +func (d *partialDoc) get(key string) (*lazyNode, error) { + return (*d)[key], nil +} + +func (d *partialDoc) remove(key string) error { + _, ok := (*d)[key] + if !ok { + return errors.Wrapf(ErrMissing, "Unable to remove nonexistent key: %s", key) + } + + delete(*d, key) + return nil +} + +// set should only be used to implement the "replace" operation, so "key" must +// be an already existing index in "d". +func (d *partialArray) set(key string, val *lazyNode) error { + idx, err := strconv.Atoi(key) + if err != nil { + return err + } + + if idx < 0 { + if !SupportNegativeIndices { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + if idx < -len(*d) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + idx += len(*d) + } + + (*d)[idx] = val + return nil +} + +func (d *partialArray) add(key string, val *lazyNode) error { + if key == "-" { + *d = append(*d, val) + return nil + } + + idx, err := strconv.Atoi(key) + if err != nil { + return errors.Wrapf(err, "value was not a proper array index: '%s'", key) + } + + sz := len(*d) + 1 + + ary := make([]*lazyNode, sz) + + cur := *d + + if idx >= len(ary) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + + if idx < 0 { + if !SupportNegativeIndices { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + if idx < -len(ary) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + idx += len(ary) + } + + copy(ary[0:idx], cur[0:idx]) + ary[idx] = val + copy(ary[idx+1:], cur[idx:]) + + *d = ary + return nil +} + +func (d *partialArray) get(key string) (*lazyNode, error) { + idx, err := strconv.Atoi(key) + + if err != nil { + return nil, err + } + + if idx < 0 { + if !SupportNegativeIndices { + return nil, errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + if idx < -len(*d) { + return nil, errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + idx += len(*d) + } + + if idx >= len(*d) { + return nil, errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + + return (*d)[idx], nil +} + +func (d *partialArray) remove(key string) error { + idx, err := strconv.Atoi(key) + if err != nil { + return err + } + + cur := *d + + if idx >= len(cur) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + + if idx < 0 { + if !SupportNegativeIndices { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + if idx < -len(cur) { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } + idx += len(cur) + } + + ary := make([]*lazyNode, len(cur)-1) + + copy(ary[0:idx], cur[0:idx]) + copy(ary[idx:], cur[idx+1:]) + + *d = ary + return nil + +} + +func (p Patch) add(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return errors.Wrapf(ErrMissing, "add operation failed to decode path") + } + + con, key := findObject(doc, path) + + if con == nil { + return errors.Wrapf(ErrMissing, "add operation does not apply: doc is missing path: \"%s\"", path) + } + + err = con.add(key, op.value()) + if err != nil { + return errors.Wrapf(err, "error in add for path: '%s'", path) + } + + return nil +} + +func (p Patch) remove(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return errors.Wrapf(ErrMissing, "remove operation failed to decode path") + } + + con, key := findObject(doc, path) + + if con == nil { + return errors.Wrapf(ErrMissing, "remove operation does not apply: doc is missing path: \"%s\"", path) + } + + err = con.remove(key) + if err != nil { + return errors.Wrapf(err, "error in remove for path: '%s'", path) + } + + return nil +} + +func (p Patch) replace(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return errors.Wrapf(err, "replace operation failed to decode path") + } + + if path == "" { + val := op.value() + + if val.which == eRaw { + if !val.tryDoc() { + if !val.tryAry() { + return errors.Wrapf(err, "replace operation value must be object or array") + } + } + } + + switch val.which { + case eAry: + *doc = &val.ary + case eDoc: + *doc = &val.doc + case eRaw: + return errors.Wrapf(err, "replace operation hit impossible case") + } + + return nil + } + + con, key := findObject(doc, path) + + if con == nil { + return errors.Wrapf(ErrMissing, "replace operation does not apply: doc is missing path: %s", path) + } + + _, ok := con.get(key) + if ok != nil { + return errors.Wrapf(ErrMissing, "replace operation does not apply: doc is missing key: %s", path) + } + + err = con.set(key, op.value()) + if err != nil { + return errors.Wrapf(err, "error in remove for path: '%s'", path) + } + + return nil +} + +func (p Patch) move(doc *container, op Operation) error { + from, err := op.From() + if err != nil { + return errors.Wrapf(err, "move operation failed to decode from") + } + + con, key := findObject(doc, from) + + if con == nil { + return errors.Wrapf(ErrMissing, "move operation does not apply: doc is missing from path: %s", from) + } + + val, err := con.get(key) + if err != nil { + return errors.Wrapf(err, "error in move for path: '%s'", key) + } + + err = con.remove(key) + if err != nil { + return errors.Wrapf(err, "error in move for path: '%s'", key) + } + + path, err := op.Path() + if err != nil { + return errors.Wrapf(err, "move operation failed to decode path") + } + + con, key = findObject(doc, path) + + if con == nil { + return errors.Wrapf(ErrMissing, "move operation does not apply: doc is missing destination path: %s", path) + } + + err = con.add(key, val) + if err != nil { + return errors.Wrapf(err, "error in move for path: '%s'", path) + } + + return nil +} + +func (p Patch) test(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return errors.Wrapf(err, "test operation failed to decode path") + } + + if path == "" { + var self lazyNode + + switch sv := (*doc).(type) { + case *partialDoc: + self.doc = *sv + self.which = eDoc + case *partialArray: + self.ary = *sv + self.which = eAry + } + + if self.equal(op.value()) { + return nil + } + + return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) + } + + con, key := findObject(doc, path) + + if con == nil { + return errors.Wrapf(ErrMissing, "test operation does not apply: is missing path: %s", path) + } + + val, err := con.get(key) + if err != nil { + return errors.Wrapf(err, "error in test for path: '%s'", path) + } + + if val == nil { + if op.value().raw == nil { + return nil + } + return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) + } else if op.value() == nil { + return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) + } + + if val.equal(op.value()) { + return nil + } + + return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) +} + +func (p Patch) copy(doc *container, op Operation, accumulatedCopySize *int64) error { + from, err := op.From() + if err != nil { + return errors.Wrapf(err, "copy operation failed to decode from") + } + + con, key := findObject(doc, from) + + if con == nil { + return errors.Wrapf(ErrMissing, "copy operation does not apply: doc is missing from path: %s", from) + } + + val, err := con.get(key) + if err != nil { + return errors.Wrapf(err, "error in copy for from: '%s'", from) + } + + path, err := op.Path() + if err != nil { + return errors.Wrapf(ErrMissing, "copy operation failed to decode path") + } + + con, key = findObject(doc, path) + + if con == nil { + return errors.Wrapf(ErrMissing, "copy operation does not apply: doc is missing destination path: %s", path) + } + + valCopy, sz, err := deepCopy(val) + if err != nil { + return errors.Wrapf(err, "error while performing deep copy") + } + + (*accumulatedCopySize) += int64(sz) + if AccumulatedCopySizeLimit > 0 && *accumulatedCopySize > AccumulatedCopySizeLimit { + return NewAccumulatedCopySizeError(AccumulatedCopySizeLimit, *accumulatedCopySize) + } + + err = con.add(key, valCopy) + if err != nil { + return errors.Wrapf(err, "error while adding value during copy") + } + + return nil +} + +// Equal indicates if 2 JSON documents have the same structural equality. +func Equal(a, b []byte) bool { + ra := make(json.RawMessage, len(a)) + copy(ra, a) + la := newLazyNode(&ra) + + rb := make(json.RawMessage, len(b)) + copy(rb, b) + lb := newLazyNode(&rb) + + return la.equal(lb) +} + +// DecodePatch decodes the passed JSON document as an RFC 6902 patch. +func DecodePatch(buf []byte) (Patch, error) { + var p Patch + + err := json.Unmarshal(buf, &p) + + if err != nil { + return nil, err + } + + return p, nil +} + +// Apply mutates a JSON document according to the patch, and returns the new +// document. +func (p Patch) Apply(doc []byte) ([]byte, error) { + return p.ApplyIndent(doc, "") +} + +// ApplyIndent mutates a JSON document according to the patch, and returns the new +// document indented. +func (p Patch) ApplyIndent(doc []byte, indent string) ([]byte, error) { + if len(doc) == 0 { + return doc, nil + } + + var pd container + if doc[0] == '[' { + pd = &partialArray{} + } else { + pd = &partialDoc{} + } + + err := json.Unmarshal(doc, pd) + + if err != nil { + return nil, err + } + + err = nil + + var accumulatedCopySize int64 + + for _, op := range p { + switch op.Kind() { + case "add": + err = p.add(&pd, op) + case "remove": + err = p.remove(&pd, op) + case "replace": + err = p.replace(&pd, op) + case "move": + err = p.move(&pd, op) + case "test": + err = p.test(&pd, op) + case "copy": + err = p.copy(&pd, op, &accumulatedCopySize) + default: + err = fmt.Errorf("Unexpected kind: %s", op.Kind()) + } + + if err != nil { + return nil, err + } + } + + if indent != "" { + return json.MarshalIndent(pd, "", indent) + } + + return json.Marshal(pd) +} + +// From http://tools.ietf.org/html/rfc6901#section-4 : +// +// Evaluation of each reference token begins by decoding any escaped +// character sequence. This is performed by first transforming any +// occurrence of the sequence '~1' to '/', and then transforming any +// occurrence of the sequence '~0' to '~'. + +var ( + rfc6901Decoder = strings.NewReplacer("~1", "/", "~0", "~") +) + +func decodePatchKey(k string) string { + return rfc6901Decoder.Replace(k) +} diff --git a/vendor/helm.sh/helm/v3/LICENSE b/vendor/helm.sh/helm/v3/LICENSE new file mode 100644 index 000000000..21c57fae2 --- /dev/null +++ b/vendor/helm.sh/helm/v3/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 The Kubernetes Authors All Rights Reserved + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/helm.sh/helm/v3/internal/fileutil/fileutil.go b/vendor/helm.sh/helm/v3/internal/fileutil/fileutil.go new file mode 100644 index 000000000..4ea09cca4 --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/fileutil/fileutil.go @@ -0,0 +1,50 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fileutil + +import ( + "io" + "os" + "path/filepath" + + "helm.sh/helm/v3/internal/third_party/dep/fs" +) + +// AtomicWriteFile atomically (as atomic as os.Rename allows) writes a file to a +// disk. +func AtomicWriteFile(filename string, reader io.Reader, mode os.FileMode) error { + tempFile, err := os.CreateTemp(filepath.Split(filename)) + if err != nil { + return err + } + tempName := tempFile.Name() + + if _, err := io.Copy(tempFile, reader); err != nil { + tempFile.Close() // return value is ignored as we are already on error path + return err + } + + if err := tempFile.Close(); err != nil { + return err + } + + if err := os.Chmod(tempName, mode); err != nil { + return err + } + + return fs.RenameWithFallback(tempName, filename) +} diff --git a/vendor/helm.sh/helm/v3/internal/resolver/resolver.go b/vendor/helm.sh/helm/v3/internal/resolver/resolver.go new file mode 100644 index 000000000..b6f45da9e --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/resolver/resolver.go @@ -0,0 +1,262 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resolver + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "path/filepath" + "strings" + "time" + + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/helmpath" + "helm.sh/helm/v3/pkg/provenance" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/repo" +) + +// Resolver resolves dependencies from semantic version ranges to a particular version. +type Resolver struct { + chartpath string + cachepath string + registryClient *registry.Client +} + +// New creates a new resolver for a given chart, helm home and registry client. +func New(chartpath, cachepath string, registryClient *registry.Client) *Resolver { + return &Resolver{ + chartpath: chartpath, + cachepath: cachepath, + registryClient: registryClient, + } +} + +// Resolve resolves dependencies and returns a lock file with the resolution. +func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string) (*chart.Lock, error) { + + // Now we clone the dependencies, locking as we go. + locked := make([]*chart.Dependency, len(reqs)) + missing := []string{} + for i, d := range reqs { + constraint, err := semver.NewConstraint(d.Version) + if err != nil { + return nil, errors.Wrapf(err, "dependency %q has an invalid version/constraint format", d.Name) + } + + if d.Repository == "" { + // Local chart subfolder + if _, err := GetLocalPath(filepath.Join("charts", d.Name), r.chartpath); err != nil { + return nil, err + } + + locked[i] = &chart.Dependency{ + Name: d.Name, + Repository: "", + Version: d.Version, + } + continue + } + if strings.HasPrefix(d.Repository, "file://") { + chartpath, err := GetLocalPath(d.Repository, r.chartpath) + if err != nil { + return nil, err + } + + ch, err := loader.LoadDir(chartpath) + if err != nil { + return nil, err + } + + v, err := semver.NewVersion(ch.Metadata.Version) + if err != nil { + // Not a legit entry. + continue + } + + if !constraint.Check(v) { + missing = append(missing, fmt.Sprintf("%q (repository %q, version %q)", d.Name, d.Repository, d.Version)) + continue + } + + locked[i] = &chart.Dependency{ + Name: d.Name, + Repository: d.Repository, + Version: ch.Metadata.Version, + } + continue + } + + repoName := repoNames[d.Name] + // if the repository was not defined, but the dependency defines a repository url, bypass the cache + if repoName == "" && d.Repository != "" { + locked[i] = &chart.Dependency{ + Name: d.Name, + Repository: d.Repository, + Version: d.Version, + } + continue + } + + var vs repo.ChartVersions + var version string + var ok bool + found := true + if !registry.IsOCI(d.Repository) { + repoIndex, err := repo.LoadIndexFile(filepath.Join(r.cachepath, helmpath.CacheIndexFile(repoName))) + if err != nil { + return nil, errors.Wrapf(err, "no cached repository for %s found. (try 'helm repo update')", repoName) + } + + vs, ok = repoIndex.Entries[d.Name] + if !ok { + return nil, errors.Errorf("%s chart not found in repo %s", d.Name, d.Repository) + } + found = false + } else { + version = d.Version + + // Check to see if an explicit version has been provided + _, err := semver.NewVersion(version) + + // Use an explicit version, otherwise search for tags + if err == nil { + vs = []*repo.ChartVersion{{ + Metadata: &chart.Metadata{ + Version: version, + }, + }} + + } else { + // Retrieve list of tags for repository + ref := fmt.Sprintf("%s/%s", strings.TrimPrefix(d.Repository, fmt.Sprintf("%s://", registry.OCIScheme)), d.Name) + tags, err := r.registryClient.Tags(ref) + if err != nil { + return nil, errors.Wrapf(err, "could not retrieve list of tags for repository %s", d.Repository) + } + + vs = make(repo.ChartVersions, len(tags)) + for ti, t := range tags { + // Mock chart version objects + version := &repo.ChartVersion{ + Metadata: &chart.Metadata{ + Version: t, + }, + } + vs[ti] = version + } + } + } + + locked[i] = &chart.Dependency{ + Name: d.Name, + Repository: d.Repository, + Version: version, + } + // The versions are already sorted and hence the first one to satisfy the constraint is used + for _, ver := range vs { + v, err := semver.NewVersion(ver.Version) + // OCI does not need URLs + if err != nil || (!registry.IsOCI(d.Repository) && len(ver.URLs) == 0) { + // Not a legit entry. + continue + } + if constraint.Check(v) { + found = true + locked[i].Version = v.Original() + break + } + } + + if !found { + missing = append(missing, fmt.Sprintf("%q (repository %q, version %q)", d.Name, d.Repository, d.Version)) + } + } + if len(missing) > 0 { + return nil, errors.Errorf("can't get a valid version for %d subchart(s): %s. Make sure a matching chart version exists in the repo, or change the version constraint in Chart.yaml", len(missing), strings.Join(missing, ", ")) + } + + digest, err := HashReq(reqs, locked) + if err != nil { + return nil, err + } + + return &chart.Lock{ + Generated: time.Now(), + Digest: digest, + Dependencies: locked, + }, nil +} + +// HashReq generates a hash of the dependencies. +// +// This should be used only to compare against another hash generated by this +// function. +func HashReq(req, lock []*chart.Dependency) (string, error) { + data, err := json.Marshal([2][]*chart.Dependency{req, lock}) + if err != nil { + return "", err + } + s, err := provenance.Digest(bytes.NewBuffer(data)) + return "sha256:" + s, err +} + +// HashV2Req generates a hash of requirements generated in Helm v2. +// +// This should be used only to compare against another hash generated by the +// Helm v2 hash function. It is to handle issue: +// https://github.com/helm/helm/issues/7233 +func HashV2Req(req []*chart.Dependency) (string, error) { + dep := make(map[string][]*chart.Dependency) + dep["dependencies"] = req + data, err := json.Marshal(dep) + if err != nil { + return "", err + } + s, err := provenance.Digest(bytes.NewBuffer(data)) + return "sha256:" + s, err +} + +// GetLocalPath generates absolute local path when use +// "file://" in repository of dependencies +func GetLocalPath(repo, chartpath string) (string, error) { + var depPath string + var err error + p := strings.TrimPrefix(repo, "file://") + + // root path is absolute + if strings.HasPrefix(p, "/") { + if depPath, err = filepath.Abs(p); err != nil { + return "", err + } + } else { + depPath = filepath.Join(chartpath, p) + } + + if _, err = os.Stat(depPath); os.IsNotExist(err) { + return "", errors.Errorf("directory %s not found", depPath) + } else if err != nil { + return "", err + } + + return depPath, nil +} diff --git a/vendor/helm.sh/helm/v3/internal/sympath/walk.go b/vendor/helm.sh/helm/v3/internal/sympath/walk.go new file mode 100644 index 000000000..6b221fb6c --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/sympath/walk.go @@ -0,0 +1,120 @@ +/* +Copyright (c) for portions of walk.go are held by The Go Authors, 2009 and are +provided under the BSD license. + +https://github.com/golang/go/blob/master/LICENSE + +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sympath + +import ( + "log" + "os" + "path/filepath" + "sort" + + "github.com/pkg/errors" +) + +// Walk walks the file tree rooted at root, calling walkFn for each file or directory +// in the tree, including root. All errors that arise visiting files and directories +// are filtered by walkFn. The files are walked in lexical order, which makes the +// output deterministic but means that for very large directories Walk can be +// inefficient. Walk follows symbolic links. +func Walk(root string, walkFn filepath.WalkFunc) error { + info, err := os.Lstat(root) + if err != nil { + err = walkFn(root, nil, err) + } else { + err = symwalk(root, info, walkFn) + } + if err == filepath.SkipDir { + return nil + } + return err +} + +// readDirNames reads the directory named by dirname and returns +// a sorted list of directory entries. +func readDirNames(dirname string) ([]string, error) { + f, err := os.Open(dirname) + if err != nil { + return nil, err + } + names, err := f.Readdirnames(-1) + f.Close() + if err != nil { + return nil, err + } + sort.Strings(names) + return names, nil +} + +// symwalk recursively descends path, calling walkFn. +func symwalk(path string, info os.FileInfo, walkFn filepath.WalkFunc) error { + // Recursively walk symlinked directories. + if IsSymlink(info) { + resolved, err := filepath.EvalSymlinks(path) + if err != nil { + return errors.Wrapf(err, "error evaluating symlink %s", path) + } + //This log message is to highlight a symlink that is being used within a chart, symlinks can be used for nefarious reasons. + log.Printf("found symbolic link in path: %s resolves to %s. Contents of linked file included and used", path, resolved) + if info, err = os.Lstat(resolved); err != nil { + return err + } + if err := symwalk(path, info, walkFn); err != nil && err != filepath.SkipDir { + return err + } + return nil + } + + if err := walkFn(path, info, nil); err != nil { + return err + } + + if !info.IsDir() { + return nil + } + + names, err := readDirNames(path) + if err != nil { + return walkFn(path, info, err) + } + + for _, name := range names { + filename := filepath.Join(path, name) + fileInfo, err := os.Lstat(filename) + if err != nil { + if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir { + return err + } + } else { + err = symwalk(filename, fileInfo, walkFn) + if err != nil { + if (!fileInfo.IsDir() && !IsSymlink(fileInfo)) || err != filepath.SkipDir { + return err + } + } + } + } + return nil +} + +// IsSymlink is used to determine if the fileinfo is a symbolic link. +func IsSymlink(fi os.FileInfo) bool { + return fi.Mode()&os.ModeSymlink != 0 +} diff --git a/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/fs.go b/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/fs.go new file mode 100644 index 000000000..d29bb5f87 --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/fs.go @@ -0,0 +1,372 @@ +/* +Copyright (c) for portions of fs.go are held by The Go Authors, 2016 and are provided under +the BSD license. + +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. + * Neither the name of Google Inc. 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 +OWNER 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. +*/ + +package fs + +import ( + "io" + "os" + "path/filepath" + "runtime" + "syscall" + + "github.com/pkg/errors" +) + +// fs contains a copy of a few functions from dep tool code to avoid a dependency on golang/dep. +// This code is copied from https://github.com/golang/dep/blob/37d6c560cdf407be7b6cd035b23dba89df9275cf/internal/fs/fs.go +// No changes to the code were made other than removing some unused functions + +// RenameWithFallback attempts to rename a file or directory, but falls back to +// copying in the event of a cross-device link error. If the fallback copy +// succeeds, src is still removed, emulating normal rename behavior. +func RenameWithFallback(src, dst string) error { + _, err := os.Stat(src) + if err != nil { + return errors.Wrapf(err, "cannot stat %s", src) + } + + err = os.Rename(src, dst) + if err == nil { + return nil + } + + return renameFallback(err, src, dst) +} + +// renameByCopy attempts to rename a file or directory by copying it to the +// destination and then removing the src thus emulating the rename behavior. +func renameByCopy(src, dst string) error { + var cerr error + if dir, _ := IsDir(src); dir { + cerr = CopyDir(src, dst) + if cerr != nil { + cerr = errors.Wrap(cerr, "copying directory failed") + } + } else { + cerr = copyFile(src, dst) + if cerr != nil { + cerr = errors.Wrap(cerr, "copying file failed") + } + } + + if cerr != nil { + return errors.Wrapf(cerr, "rename fallback failed: cannot rename %s to %s", src, dst) + } + + return errors.Wrapf(os.RemoveAll(src), "cannot delete %s", src) +} + +var ( + errSrcNotDir = errors.New("source is not a directory") + errDstExist = errors.New("destination already exists") +) + +// CopyDir recursively copies a directory tree, attempting to preserve permissions. +// Source directory must exist, destination directory must *not* exist. +func CopyDir(src, dst string) error { + src = filepath.Clean(src) + dst = filepath.Clean(dst) + + // We use os.Lstat() here to ensure we don't fall in a loop where a symlink + // actually links to a one of its parent directories. + fi, err := os.Lstat(src) + if err != nil { + return err + } + if !fi.IsDir() { + return errSrcNotDir + } + + _, err = os.Stat(dst) + if err != nil && !os.IsNotExist(err) { + return err + } + if err == nil { + return errDstExist + } + + if err = os.MkdirAll(dst, fi.Mode()); err != nil { + return errors.Wrapf(err, "cannot mkdir %s", dst) + } + + entries, err := os.ReadDir(src) + if err != nil { + return errors.Wrapf(err, "cannot read directory %s", dst) + } + + for _, entry := range entries { + srcPath := filepath.Join(src, entry.Name()) + dstPath := filepath.Join(dst, entry.Name()) + + if entry.IsDir() { + if err = CopyDir(srcPath, dstPath); err != nil { + return errors.Wrap(err, "copying directory failed") + } + } else { + // This will include symlinks, which is what we want when + // copying things. + if err = copyFile(srcPath, dstPath); err != nil { + return errors.Wrap(err, "copying file failed") + } + } + } + + return nil +} + +// copyFile copies the contents of the file named src to the file named +// by dst. The file will be created if it does not already exist. If the +// destination file exists, all its contents will be replaced by the contents +// of the source file. The file mode will be copied from the source. +func copyFile(src, dst string) (err error) { + if sym, err := IsSymlink(src); err != nil { + return errors.Wrap(err, "symlink check failed") + } else if sym { + if err := cloneSymlink(src, dst); err != nil { + if runtime.GOOS == "windows" { + // If cloning the symlink fails on Windows because the user + // does not have the required privileges, ignore the error and + // fall back to copying the file contents. + // + // ERROR_PRIVILEGE_NOT_HELD is 1314 (0x522): + // https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx + if lerr, ok := err.(*os.LinkError); ok && lerr.Err != syscall.Errno(1314) { + return err + } + } else { + return err + } + } else { + return nil + } + } + + in, err := os.Open(src) + if err != nil { + return + } + defer in.Close() + + out, err := os.Create(dst) + if err != nil { + return + } + + if _, err = io.Copy(out, in); err != nil { + out.Close() + return + } + + // Check for write errors on Close + if err = out.Close(); err != nil { + return + } + + si, err := os.Stat(src) + if err != nil { + return + } + + // Temporary fix for Go < 1.9 + // + // See: https://github.com/golang/dep/issues/774 + // and https://github.com/golang/go/issues/20829 + if runtime.GOOS == "windows" { + dst = fixLongPath(dst) + } + err = os.Chmod(dst, si.Mode()) + + return +} + +// cloneSymlink will create a new symlink that points to the resolved path of sl. +// If sl is a relative symlink, dst will also be a relative symlink. +func cloneSymlink(sl, dst string) error { + resolved, err := os.Readlink(sl) + if err != nil { + return err + } + + return os.Symlink(resolved, dst) +} + +// IsDir determines is the path given is a directory or not. +func IsDir(name string) (bool, error) { + fi, err := os.Stat(name) + if err != nil { + return false, err + } + if !fi.IsDir() { + return false, errors.Errorf("%q is not a directory", name) + } + return true, nil +} + +// IsSymlink determines if the given path is a symbolic link. +func IsSymlink(path string) (bool, error) { + l, err := os.Lstat(path) + if err != nil { + return false, err + } + + return l.Mode()&os.ModeSymlink == os.ModeSymlink, nil +} + +// fixLongPath returns the extended-length (\\?\-prefixed) form of +// path when needed, in order to avoid the default 260 character file +// path limit imposed by Windows. If path is not easily converted to +// the extended-length form (for example, if path is a relative path +// or contains .. elements), or is short enough, fixLongPath returns +// path unmodified. +// +// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath +func fixLongPath(path string) string { + // Do nothing (and don't allocate) if the path is "short". + // Empirically (at least on the Windows Server 2013 builder), + // the kernel is arbitrarily okay with < 248 bytes. That + // matches what the docs above say: + // "When using an API to create a directory, the specified + // path cannot be so long that you cannot append an 8.3 file + // name (that is, the directory name cannot exceed MAX_PATH + // minus 12)." Since MAX_PATH is 260, 260 - 12 = 248. + // + // The MSDN docs appear to say that a normal path that is 248 bytes long + // will work; empirically the path must be less than 248 bytes long. + if len(path) < 248 { + // Don't fix. (This is how Go 1.7 and earlier worked, + // not automatically generating the \\?\ form) + return path + } + + // The extended form begins with \\?\, as in + // \\?\c:\windows\foo.txt or \\?\UNC\server\share\foo.txt. + // The extended form disables evaluation of . and .. path + // elements and disables the interpretation of / as equivalent + // to \. The conversion here rewrites / to \ and elides + // . elements as well as trailing or duplicate separators. For + // simplicity it avoids the conversion entirely for relative + // paths or paths containing .. elements. For now, + // \\server\share paths are not converted to + // \\?\UNC\server\share paths because the rules for doing so + // are less well-specified. + if len(path) >= 2 && path[:2] == `\\` { + // Don't canonicalize UNC paths. + return path + } + if !isAbs(path) { + // Relative path + return path + } + + const prefix = `\\?` + + pathbuf := make([]byte, len(prefix)+len(path)+len(`\`)) + copy(pathbuf, prefix) + n := len(path) + r, w := 0, len(prefix) + for r < n { + switch { + case os.IsPathSeparator(path[r]): + // empty block + r++ + case path[r] == '.' && (r+1 == n || os.IsPathSeparator(path[r+1])): + // /./ + r++ + case r+1 < n && path[r] == '.' && path[r+1] == '.' && (r+2 == n || os.IsPathSeparator(path[r+2])): + // /../ is currently unhandled + return path + default: + pathbuf[w] = '\\' + w++ + for ; r < n && !os.IsPathSeparator(path[r]); r++ { + pathbuf[w] = path[r] + w++ + } + } + } + // A drive's root directory needs a trailing \ + if w == len(`\\?\c:`) { + pathbuf[w] = '\\' + w++ + } + return string(pathbuf[:w]) +} + +func isAbs(path string) (b bool) { + v := volumeName(path) + if v == "" { + return false + } + path = path[len(v):] + if path == "" { + return false + } + return os.IsPathSeparator(path[0]) +} + +func volumeName(path string) (v string) { + if len(path) < 2 { + return "" + } + // with drive letter + c := path[0] + if path[1] == ':' && + ('0' <= c && c <= '9' || 'a' <= c && c <= 'z' || + 'A' <= c && c <= 'Z') { + return path[:2] + } + // is it UNC + if l := len(path); l >= 5 && os.IsPathSeparator(path[0]) && os.IsPathSeparator(path[1]) && + !os.IsPathSeparator(path[2]) && path[2] != '.' { + // first, leading `\\` and next shouldn't be `\`. its server name. + for n := 3; n < l-1; n++ { + // second, next '\' shouldn't be repeated. + if os.IsPathSeparator(path[n]) { + n++ + // third, following something characters. its share name. + if !os.IsPathSeparator(path[n]) { + if path[n] == '.' { + break + } + for ; n < l; n++ { + if os.IsPathSeparator(path[n]) { + break + } + } + return path[:n] + } + break + } + } + } + return "" +} diff --git a/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/rename.go b/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/rename.go new file mode 100644 index 000000000..a3e5e56a6 --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/rename.go @@ -0,0 +1,58 @@ +//go:build !windows + +/* +Copyright (c) for portions of rename.go are held by The Go Authors, 2016 and are provided under +the BSD license. + +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. + * Neither the name of Google Inc. 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 +OWNER 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. +*/ + +package fs + +import ( + "os" + "syscall" + + "github.com/pkg/errors" +) + +// renameFallback attempts to determine the appropriate fallback to failed rename +// operation depending on the resulting error. +func renameFallback(err error, src, dst string) error { + // Rename may fail if src and dst are on different devices; fall back to + // copy if we detect that case. syscall.EXDEV is the common name for the + // cross device link error which has varying output text across different + // operating systems. + terr, ok := err.(*os.LinkError) + if !ok { + return err + } else if terr.Err != syscall.EXDEV { + return errors.Wrapf(terr, "link error: cannot rename %s to %s", src, dst) + } + + return renameByCopy(src, dst) +} diff --git a/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/rename_windows.go b/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/rename_windows.go new file mode 100644 index 000000000..a377720a6 --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/third_party/dep/fs/rename_windows.go @@ -0,0 +1,69 @@ +//go:build windows + +/* +Copyright (c) for portions of rename_windows.go are held by The Go Authors, 2016 and are provided under +the BSD license. + +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. + * Neither the name of Google Inc. 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 +OWNER 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. +*/ + +package fs + +import ( + "os" + "syscall" + + "github.com/pkg/errors" +) + +// renameFallback attempts to determine the appropriate fallback to failed rename +// operation depending on the resulting error. +func renameFallback(err error, src, dst string) error { + // Rename may fail if src and dst are on different devices; fall back to + // copy if we detect that case. syscall.EXDEV is the common name for the + // cross device link error which has varying output text across different + // operating systems. + terr, ok := err.(*os.LinkError) + if !ok { + return err + } + + if terr.Err != syscall.EXDEV { + // In windows it can drop down to an operating system call that + // returns an operating system error with a different number and + // message. Checking for that as a fall back. + noerr, ok := terr.Err.(syscall.Errno) + + // 0x11 (ERROR_NOT_SAME_DEVICE) is the windows error. + // See https://msdn.microsoft.com/en-us/library/cc231199.aspx + if ok && noerr != 0x11 { + return errors.Wrapf(terr, "link error: cannot rename %s to %s", src, dst) + } + } + + return renameByCopy(src, dst) +} diff --git a/vendor/helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util/deploymentutil.go b/vendor/helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util/deploymentutil.go new file mode 100644 index 000000000..ae62d0e6f --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util/deploymentutil.go @@ -0,0 +1,178 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "context" + "sort" + + apps "k8s.io/api/apps/v1" + v1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + intstrutil "k8s.io/apimachinery/pkg/util/intstr" + appsclient "k8s.io/client-go/kubernetes/typed/apps/v1" +) + +// deploymentutil contains a copy of a few functions from Kubernetes controller code to avoid a dependency on k8s.io/kubernetes. +// This code is copied from https://github.com/kubernetes/kubernetes/blob/e856613dd5bb00bcfaca6974431151b5c06cbed5/pkg/controller/deployment/util/deployment_util.go +// No changes to the code were made other than removing some unused functions + +// RsListFunc returns the ReplicaSet from the ReplicaSet namespace and the List metav1.ListOptions. +type RsListFunc func(string, metav1.ListOptions) ([]*apps.ReplicaSet, error) + +// ListReplicaSets returns a slice of RSes the given deployment targets. +// Note that this does NOT attempt to reconcile ControllerRef (adopt/orphan), +// because only the controller itself should do that. +// However, it does filter out anything whose ControllerRef doesn't match. +func ListReplicaSets(deployment *apps.Deployment, getRSList RsListFunc) ([]*apps.ReplicaSet, error) { + // TODO: Right now we list replica sets by their labels. We should list them by selector, i.e. the replica set's selector + // should be a superset of the deployment's selector, see https://github.com/kubernetes/kubernetes/issues/19830. + namespace := deployment.Namespace + selector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector) + if err != nil { + return nil, err + } + options := metav1.ListOptions{LabelSelector: selector.String()} + all, err := getRSList(namespace, options) + if err != nil { + return nil, err + } + // Only include those whose ControllerRef matches the Deployment. + owned := make([]*apps.ReplicaSet, 0, len(all)) + for _, rs := range all { + if metav1.IsControlledBy(rs, deployment) { + owned = append(owned, rs) + } + } + return owned, nil +} + +// ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker. +type ReplicaSetsByCreationTimestamp []*apps.ReplicaSet + +func (o ReplicaSetsByCreationTimestamp) Len() int { return len(o) } +func (o ReplicaSetsByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } +func (o ReplicaSetsByCreationTimestamp) Less(i, j int) bool { + if o[i].CreationTimestamp.Equal(&o[j].CreationTimestamp) { + return o[i].Name < o[j].Name + } + return o[i].CreationTimestamp.Before(&o[j].CreationTimestamp) +} + +// FindNewReplicaSet returns the new RS this given deployment targets (the one with the same pod template). +func FindNewReplicaSet(deployment *apps.Deployment, rsList []*apps.ReplicaSet) *apps.ReplicaSet { + sort.Sort(ReplicaSetsByCreationTimestamp(rsList)) + for i := range rsList { + if EqualIgnoreHash(&rsList[i].Spec.Template, &deployment.Spec.Template) { + // In rare cases, such as after cluster upgrades, Deployment may end up with + // having more than one new ReplicaSets that have the same template as its template, + // see https://github.com/kubernetes/kubernetes/issues/40415 + // We deterministically choose the oldest new ReplicaSet. + return rsList[i] + } + } + // new ReplicaSet does not exist. + return nil +} + +// EqualIgnoreHash returns true if two given podTemplateSpec are equal, ignoring the diff in value of Labels[pod-template-hash] +// We ignore pod-template-hash because: +// 1. The hash result would be different upon podTemplateSpec API changes +// (e.g. the addition of a new field will cause the hash code to change) +// 2. The deployment template won't have hash labels +func EqualIgnoreHash(template1, template2 *v1.PodTemplateSpec) bool { + t1Copy := template1.DeepCopy() + t2Copy := template2.DeepCopy() + // Remove hash labels from template.Labels before comparing + delete(t1Copy.Labels, apps.DefaultDeploymentUniqueLabelKey) + delete(t2Copy.Labels, apps.DefaultDeploymentUniqueLabelKey) + return apiequality.Semantic.DeepEqual(t1Copy, t2Copy) +} + +// GetNewReplicaSet returns a replica set that matches the intent of the given deployment; get ReplicaSetList from client interface. +// Returns nil if the new replica set doesn't exist yet. +func GetNewReplicaSet(deployment *apps.Deployment, c appsclient.AppsV1Interface) (*apps.ReplicaSet, error) { + rsList, err := ListReplicaSets(deployment, RsListFromClient(c)) + if err != nil { + return nil, err + } + return FindNewReplicaSet(deployment, rsList), nil +} + +// RsListFromClient returns an rsListFunc that wraps the given client. +func RsListFromClient(c appsclient.AppsV1Interface) RsListFunc { + return func(namespace string, options metav1.ListOptions) ([]*apps.ReplicaSet, error) { + rsList, err := c.ReplicaSets(namespace).List(context.Background(), options) + if err != nil { + return nil, err + } + var ret []*apps.ReplicaSet + for i := range rsList.Items { + ret = append(ret, &rsList.Items[i]) + } + return ret, err + } +} + +// IsRollingUpdate returns true if the strategy type is a rolling update. +func IsRollingUpdate(deployment *apps.Deployment) bool { + return deployment.Spec.Strategy.Type == apps.RollingUpdateDeploymentStrategyType +} + +// MaxUnavailable returns the maximum unavailable pods a rolling deployment can take. +func MaxUnavailable(deployment apps.Deployment) int32 { + if !IsRollingUpdate(&deployment) || *(deployment.Spec.Replicas) == 0 { + return int32(0) + } + // Error caught by validation + _, maxUnavailable, _ := ResolveFenceposts(deployment.Spec.Strategy.RollingUpdate.MaxSurge, deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, *(deployment.Spec.Replicas)) + if maxUnavailable > *deployment.Spec.Replicas { + return *deployment.Spec.Replicas + } + return maxUnavailable +} + +// ResolveFenceposts resolves both maxSurge and maxUnavailable. This needs to happen in one +// step. For example: +// +// 2 desired, max unavailable 1%, surge 0% - should scale old(-1), then new(+1), then old(-1), then new(+1) +// 1 desired, max unavailable 1%, surge 0% - should scale old(-1), then new(+1) +// 2 desired, max unavailable 25%, surge 1% - should scale new(+1), then old(-1), then new(+1), then old(-1) +// 1 desired, max unavailable 25%, surge 1% - should scale new(+1), then old(-1) +// 2 desired, max unavailable 0%, surge 1% - should scale new(+1), then old(-1), then new(+1), then old(-1) +// 1 desired, max unavailable 0%, surge 1% - should scale new(+1), then old(-1) +func ResolveFenceposts(maxSurge, maxUnavailable *intstrutil.IntOrString, desired int32) (int32, int32, error) { + surge, err := intstrutil.GetValueFromIntOrPercent(intstrutil.ValueOrDefault(maxSurge, intstrutil.FromInt(0)), int(desired), true) + if err != nil { + return 0, 0, err + } + unavailable, err := intstrutil.GetValueFromIntOrPercent(intstrutil.ValueOrDefault(maxUnavailable, intstrutil.FromInt(0)), int(desired), false) + if err != nil { + return 0, 0, err + } + + if surge == 0 && unavailable == 0 { + // Validation should never allow the user to explicitly use zero values for both maxSurge + // maxUnavailable. Due to rounding down maxUnavailable though, it may resolve to zero. + // If both fenceposts resolve to zero, then we should set maxUnavailable to 1 on the + // theory that surge might not work due to quota. + unavailable = 1 + } + + return int32(surge), int32(unavailable), nil +} diff --git a/vendor/helm.sh/helm/v3/internal/tlsutil/cfg.go b/vendor/helm.sh/helm/v3/internal/tlsutil/cfg.go new file mode 100644 index 000000000..8b9d4329f --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/tlsutil/cfg.go @@ -0,0 +1,58 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tlsutil + +import ( + "crypto/tls" + "crypto/x509" + "os" + + "github.com/pkg/errors" +) + +// Options represents configurable options used to create client and server TLS configurations. +type Options struct { + CaCertFile string + // If either the KeyFile or CertFile is empty, ClientConfig() will not load them. + KeyFile string + CertFile string + // Client-only options + InsecureSkipVerify bool +} + +// ClientConfig returns a TLS configuration for use by a Helm client. +func ClientConfig(opts Options) (cfg *tls.Config, err error) { + var cert *tls.Certificate + var pool *x509.CertPool + + if opts.CertFile != "" || opts.KeyFile != "" { + if cert, err = CertFromFilePair(opts.CertFile, opts.KeyFile); err != nil { + if os.IsNotExist(err) { + return nil, errors.Wrapf(err, "could not load x509 key pair (cert: %q, key: %q)", opts.CertFile, opts.KeyFile) + } + return nil, errors.Wrapf(err, "could not read x509 key pair (cert: %q, key: %q)", opts.CertFile, opts.KeyFile) + } + } + if !opts.InsecureSkipVerify && opts.CaCertFile != "" { + if pool, err = CertPoolFromFile(opts.CaCertFile); err != nil { + return nil, err + } + } + + cfg = &tls.Config{InsecureSkipVerify: opts.InsecureSkipVerify, Certificates: []tls.Certificate{*cert}, RootCAs: pool} + return cfg, nil +} diff --git a/vendor/helm.sh/helm/v3/internal/tlsutil/tls.go b/vendor/helm.sh/helm/v3/internal/tlsutil/tls.go new file mode 100644 index 000000000..7cd1dace9 --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/tlsutil/tls.go @@ -0,0 +1,78 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tlsutil + +import ( + "crypto/tls" + "crypto/x509" + "os" + + "github.com/pkg/errors" +) + +// NewClientTLS returns tls.Config appropriate for client auth. +func NewClientTLS(certFile, keyFile, caFile string, insecureSkipTLSverify bool) (*tls.Config, error) { + config := tls.Config{ + InsecureSkipVerify: insecureSkipTLSverify, + } + + if certFile != "" && keyFile != "" { + cert, err := CertFromFilePair(certFile, keyFile) + if err != nil { + return nil, err + } + config.Certificates = []tls.Certificate{*cert} + } + + if caFile != "" { + cp, err := CertPoolFromFile(caFile) + if err != nil { + return nil, err + } + config.RootCAs = cp + } + + return &config, nil +} + +// CertPoolFromFile returns an x509.CertPool containing the certificates +// in the given PEM-encoded file. +// Returns an error if the file could not be read, a certificate could not +// be parsed, or if the file does not contain any certificates +func CertPoolFromFile(filename string) (*x509.CertPool, error) { + b, err := os.ReadFile(filename) + if err != nil { + return nil, errors.Errorf("can't read CA file: %v", filename) + } + cp := x509.NewCertPool() + if !cp.AppendCertsFromPEM(b) { + return nil, errors.Errorf("failed to append certificates from file: %s", filename) + } + return cp, nil +} + +// CertFromFilePair returns a tls.Certificate containing the +// certificates public/private key pair from a pair of given PEM-encoded files. +// Returns an error if the file could not be read, a certificate could not +// be parsed, or if the file does not contain any certificates +func CertFromFilePair(certFile, keyFile string) (*tls.Certificate, error) { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + return nil, errors.Wrapf(err, "can't load key pair from cert %s and key %s", certFile, keyFile) + } + return &cert, err +} diff --git a/vendor/helm.sh/helm/v3/internal/urlutil/urlutil.go b/vendor/helm.sh/helm/v3/internal/urlutil/urlutil.go new file mode 100644 index 000000000..a8cf7398c --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/urlutil/urlutil.go @@ -0,0 +1,73 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package urlutil + +import ( + "net/url" + "path" + "path/filepath" +) + +// URLJoin joins a base URL to one or more path components. +// +// It's like filepath.Join for URLs. If the baseURL is pathish, this will still +// perform a join. +// +// If the URL is unparsable, this returns an error. +func URLJoin(baseURL string, paths ...string) (string, error) { + u, err := url.Parse(baseURL) + if err != nil { + return "", err + } + // We want path instead of filepath because path always uses /. + all := []string{u.Path} + all = append(all, paths...) + u.Path = path.Join(all...) + return u.String(), nil +} + +// Equal normalizes two URLs and then compares for equality. +func Equal(a, b string) bool { + au, err := url.Parse(a) + if err != nil { + a = filepath.Clean(a) + b = filepath.Clean(b) + // If urls are paths, return true only if they are an exact match + return a == b + } + bu, err := url.Parse(b) + if err != nil { + return false + } + + for _, u := range []*url.URL{au, bu} { + if u.Path == "" { + u.Path = "/" + } + u.Path = filepath.Clean(u.Path) + } + return au.String() == bu.String() +} + +// ExtractHostname returns hostname from URL +func ExtractHostname(addr string) (string, error) { + u, err := url.Parse(addr) + if err != nil { + return "", err + } + return u.Hostname(), nil +} diff --git a/vendor/helm.sh/helm/v3/internal/version/version.go b/vendor/helm.sh/helm/v3/internal/version/version.go new file mode 100644 index 000000000..539659f5e --- /dev/null +++ b/vendor/helm.sh/helm/v3/internal/version/version.go @@ -0,0 +1,81 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version // import "helm.sh/helm/v3/internal/version" + +import ( + "flag" + "runtime" + "strings" +) + +var ( + // version is the current version of Helm. + // Update this whenever making a new release. + // The version is of the format Major.Minor.Patch[-Prerelease][+BuildMetadata] + // + // Increment major number for new feature additions and behavioral changes. + // Increment minor number for bug fixes and performance enhancements. + version = "v3.16" + + // metadata is extra build time data + metadata = "" + // gitCommit is the git sha1 + gitCommit = "" + // gitTreeState is the state of the git tree + gitTreeState = "" +) + +// BuildInfo describes the compile time information. +type BuildInfo struct { + // Version is the current semver. + Version string `json:"version,omitempty"` + // GitCommit is the git sha1. + GitCommit string `json:"git_commit,omitempty"` + // GitTreeState is the state of the git tree. + GitTreeState string `json:"git_tree_state,omitempty"` + // GoVersion is the version of the Go compiler used. + GoVersion string `json:"go_version,omitempty"` +} + +// GetVersion returns the semver string of the version +func GetVersion() string { + if metadata == "" { + return version + } + return version + "+" + metadata +} + +// GetUserAgent returns a user agent for user with an HTTP client +func GetUserAgent() string { + return "Helm/" + strings.TrimPrefix(GetVersion(), "v") +} + +// Get returns build info +func Get() BuildInfo { + v := BuildInfo{ + Version: GetVersion(), + GitCommit: gitCommit, + GitTreeState: gitTreeState, + GoVersion: runtime.Version(), + } + + // HACK(bacongobbler): strip out GoVersion during a test run for consistent test output + if flag.Lookup("test.v") != nil { + v.GoVersion = "" + } + return v +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/action.go b/vendor/helm.sh/helm/v3/pkg/action/action.go new file mode 100644 index 000000000..fe91de048 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/action.go @@ -0,0 +1,427 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "fmt" + "os" + "path" + "path/filepath" + "regexp" + "strings" + + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/client-go/discovery" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/engine" + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/postrender" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/releaseutil" + "helm.sh/helm/v3/pkg/storage" + "helm.sh/helm/v3/pkg/storage/driver" + "helm.sh/helm/v3/pkg/time" +) + +// Timestamper is a function capable of producing a timestamp.Timestamper. +// +// By default, this is a time.Time function from the Helm time package. This can +// be overridden for testing though, so that timestamps are predictable. +var Timestamper = time.Now + +var ( + // errMissingChart indicates that a chart was not provided. + errMissingChart = errors.New("no chart provided") + // errMissingRelease indicates that a release (name) was not provided. + errMissingRelease = errors.New("no release provided") + // errInvalidRevision indicates that an invalid release revision number was provided. + errInvalidRevision = errors.New("invalid release revision") + // errPending indicates that another instance of Helm is already applying an operation on a release. + errPending = errors.New("another operation (install/upgrade/rollback) is in progress") +) + +// ValidName is a regular expression for resource names. +// +// DEPRECATED: This will be removed in Helm 4, and is no longer used here. See +// pkg/lint/rules.validateMetadataNameFunc for the replacement. +// +// According to the Kubernetes help text, the regular expression it uses is: +// +// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* +// +// This follows the above regular expression (but requires a full string match, not partial). +// +// The Kubernetes documentation is here, though it is not entirely correct: +// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +var ValidName = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`) + +// Configuration injects the dependencies that all actions share. +type Configuration struct { + // RESTClientGetter is an interface that loads Kubernetes clients. + RESTClientGetter RESTClientGetter + + // Releases stores records of releases. + Releases *storage.Storage + + // KubeClient is a Kubernetes API client. + KubeClient kube.Interface + + // RegistryClient is a client for working with registries + RegistryClient *registry.Client + + // Capabilities describes the capabilities of the Kubernetes cluster. + Capabilities *chartutil.Capabilities + + Log func(string, ...interface{}) +} + +// renderResources renders the templates in a chart +// +// TODO: This function is badly in need of a refactor. +// TODO: As part of the refactor the duplicate code in cmd/helm/template.go should be removed +// +// This code has to do with writing files to disk. +func (cfg *Configuration) renderResources(ch *chart.Chart, values chartutil.Values, releaseName, outputDir string, subNotes, useReleaseName, includeCrds bool, pr postrender.PostRenderer, interactWithRemote, enableDNS, hideSecret bool) ([]*release.Hook, *bytes.Buffer, string, error) { + hs := []*release.Hook{} + b := bytes.NewBuffer(nil) + + caps, err := cfg.getCapabilities() + if err != nil { + return hs, b, "", err + } + + if ch.Metadata.KubeVersion != "" { + if !chartutil.IsCompatibleRange(ch.Metadata.KubeVersion, caps.KubeVersion.String()) { + return hs, b, "", errors.Errorf("chart requires kubeVersion: %s which is incompatible with Kubernetes %s", ch.Metadata.KubeVersion, caps.KubeVersion.String()) + } + } + + var files map[string]string + var err2 error + + // A `helm template` should not talk to the remote cluster. However, commands with the flag + //`--dry-run` with the value of `false`, `none`, or `server` should try to interact with the cluster. + // It may break in interesting and exotic ways because other data (e.g. discovery) is mocked. + if interactWithRemote && cfg.RESTClientGetter != nil { + restConfig, err := cfg.RESTClientGetter.ToRESTConfig() + if err != nil { + return hs, b, "", err + } + e := engine.New(restConfig) + e.EnableDNS = enableDNS + files, err2 = e.Render(ch, values) + } else { + var e engine.Engine + e.EnableDNS = enableDNS + files, err2 = e.Render(ch, values) + } + + if err2 != nil { + return hs, b, "", err2 + } + + // NOTES.txt gets rendered like all the other files, but because it's not a hook nor a resource, + // pull it out of here into a separate file so that we can actually use the output of the rendered + // text file. We have to spin through this map because the file contains path information, so we + // look for terminating NOTES.txt. We also remove it from the files so that we don't have to skip + // it in the sortHooks. + var notesBuffer bytes.Buffer + for k, v := range files { + if strings.HasSuffix(k, notesFileSuffix) { + if subNotes || (k == path.Join(ch.Name(), "templates", notesFileSuffix)) { + // If buffer contains data, add newline before adding more + if notesBuffer.Len() > 0 { + notesBuffer.WriteString("\n") + } + notesBuffer.WriteString(v) + } + delete(files, k) + } + } + notes := notesBuffer.String() + + // Sort hooks, manifests, and partials. Only hooks and manifests are returned, + // as partials are not used after renderer.Render. Empty manifests are also + // removed here. + hs, manifests, err := releaseutil.SortManifests(files, nil, releaseutil.InstallOrder) + if err != nil { + // By catching parse errors here, we can prevent bogus releases from going + // to Kubernetes. + // + // We return the files as a big blob of data to help the user debug parser + // errors. + for name, content := range files { + if strings.TrimSpace(content) == "" { + continue + } + fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, content) + } + return hs, b, "", err + } + + // Aggregate all valid manifests into one big doc. + fileWritten := make(map[string]bool) + + if includeCrds { + for _, crd := range ch.CRDObjects() { + if outputDir == "" { + fmt.Fprintf(b, "---\n# Source: %s\n%s\n", crd.Filename, string(crd.File.Data[:])) + } else { + err = writeToFile(outputDir, crd.Filename, string(crd.File.Data[:]), fileWritten[crd.Filename]) + if err != nil { + return hs, b, "", err + } + fileWritten[crd.Filename] = true + } + } + } + + for _, m := range manifests { + if outputDir == "" { + if hideSecret && m.Head.Kind == "Secret" && m.Head.Version == "v1" { + fmt.Fprintf(b, "---\n# Source: %s\n# HIDDEN: The Secret output has been suppressed\n", m.Name) + } else { + fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content) + } + } else { + newDir := outputDir + if useReleaseName { + newDir = filepath.Join(outputDir, releaseName) + } + // NOTE: We do not have to worry about the post-renderer because + // output dir is only used by `helm template`. In the next major + // release, we should move this logic to template only as it is not + // used by install or upgrade + err = writeToFile(newDir, m.Name, m.Content, fileWritten[m.Name]) + if err != nil { + return hs, b, "", err + } + fileWritten[m.Name] = true + } + } + + if pr != nil { + b, err = pr.Run(b) + if err != nil { + return hs, b, notes, errors.Wrap(err, "error while running post render on files") + } + } + + return hs, b, notes, nil +} + +// RESTClientGetter gets the rest client +type RESTClientGetter interface { + ToRESTConfig() (*rest.Config, error) + ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error) + ToRESTMapper() (meta.RESTMapper, error) +} + +// DebugLog sets the logger that writes debug strings +type DebugLog func(format string, v ...interface{}) + +// capabilities builds a Capabilities from discovery information. +func (cfg *Configuration) getCapabilities() (*chartutil.Capabilities, error) { + if cfg.Capabilities != nil { + return cfg.Capabilities, nil + } + dc, err := cfg.RESTClientGetter.ToDiscoveryClient() + if err != nil { + return nil, errors.Wrap(err, "could not get Kubernetes discovery client") + } + // force a discovery cache invalidation to always fetch the latest server version/capabilities. + dc.Invalidate() + kubeVersion, err := dc.ServerVersion() + if err != nil { + return nil, errors.Wrap(err, "could not get server version from Kubernetes") + } + // Issue #6361: + // Client-Go emits an error when an API service is registered but unimplemented. + // We trap that error here and print a warning. But since the discovery client continues + // building the API object, it is correctly populated with all valid APIs. + // See https://github.com/kubernetes/kubernetes/issues/72051#issuecomment-521157642 + apiVersions, err := GetVersionSet(dc) + if err != nil { + if discovery.IsGroupDiscoveryFailedError(err) { + cfg.Log("WARNING: The Kubernetes server has an orphaned API service. Server reports: %s", err) + cfg.Log("WARNING: To fix this, kubectl delete apiservice <service-name>") + } else { + return nil, errors.Wrap(err, "could not get apiVersions from Kubernetes") + } + } + + cfg.Capabilities = &chartutil.Capabilities{ + APIVersions: apiVersions, + KubeVersion: chartutil.KubeVersion{ + Version: kubeVersion.GitVersion, + Major: kubeVersion.Major, + Minor: kubeVersion.Minor, + }, + HelmVersion: chartutil.DefaultCapabilities.HelmVersion, + } + return cfg.Capabilities, nil +} + +// KubernetesClientSet creates a new kubernetes ClientSet based on the configuration +func (cfg *Configuration) KubernetesClientSet() (kubernetes.Interface, error) { + conf, err := cfg.RESTClientGetter.ToRESTConfig() + if err != nil { + return nil, errors.Wrap(err, "unable to generate config for kubernetes client") + } + + return kubernetes.NewForConfig(conf) +} + +// Now generates a timestamp +// +// If the configuration has a Timestamper on it, that will be used. +// Otherwise, this will use time.Now(). +func (cfg *Configuration) Now() time.Time { + return Timestamper() +} + +func (cfg *Configuration) releaseContent(name string, version int) (*release.Release, error) { + if err := chartutil.ValidateReleaseName(name); err != nil { + return nil, errors.Errorf("releaseContent: Release name is invalid: %s", name) + } + + if version <= 0 { + return cfg.Releases.Last(name) + } + + return cfg.Releases.Get(name, version) +} + +// GetVersionSet retrieves a set of available k8s API versions +func GetVersionSet(client discovery.ServerResourcesInterface) (chartutil.VersionSet, error) { + groups, resources, err := client.ServerGroupsAndResources() + if err != nil && !discovery.IsGroupDiscoveryFailedError(err) { + return chartutil.DefaultVersionSet, errors.Wrap(err, "could not get apiVersions from Kubernetes") + } + + // FIXME: The Kubernetes test fixture for cli appears to always return nil + // for calls to Discovery().ServerGroupsAndResources(). So in this case, we + // return the default API list. This is also a safe value to return in any + // other odd-ball case. + if len(groups) == 0 && len(resources) == 0 { + return chartutil.DefaultVersionSet, nil + } + + versionMap := make(map[string]interface{}) + var versions []string + + // Extract the groups + for _, g := range groups { + for _, gv := range g.Versions { + versionMap[gv.GroupVersion] = struct{}{} + } + } + + // Extract the resources + var id string + var ok bool + for _, r := range resources { + for _, rl := range r.APIResources { + + // A Kind at a GroupVersion can show up more than once. We only want + // it displayed once in the final output. + id = path.Join(r.GroupVersion, rl.Kind) + if _, ok = versionMap[id]; !ok { + versionMap[id] = struct{}{} + } + } + } + + // Convert to a form that NewVersionSet can use + for k := range versionMap { + versions = append(versions, k) + } + + return chartutil.VersionSet(versions), nil +} + +// recordRelease with an update operation in case reuse has been set. +func (cfg *Configuration) recordRelease(r *release.Release) { + if err := cfg.Releases.Update(r); err != nil { + cfg.Log("warning: Failed to update release %s: %s", r.Name, err) + } +} + +// Init initializes the action configuration +func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog) error { + kc := kube.New(getter) + kc.Log = log + + lazyClient := &lazyClient{ + namespace: namespace, + clientFn: kc.Factory.KubernetesClientSet, + } + + var store *storage.Storage + switch helmDriver { + case "secret", "secrets", "": + d := driver.NewSecrets(newSecretClient(lazyClient)) + d.Log = log + store = storage.Init(d) + case "configmap", "configmaps": + d := driver.NewConfigMaps(newConfigMapClient(lazyClient)) + d.Log = log + store = storage.Init(d) + case "memory": + var d *driver.Memory + if cfg.Releases != nil { + if mem, ok := cfg.Releases.Driver.(*driver.Memory); ok { + // This function can be called more than once (e.g., helm list --all-namespaces). + // If a memory driver was already initialized, re-use it but set the possibly new namespace. + // We re-use it in case some releases where already created in the existing memory driver. + d = mem + } + } + if d == nil { + d = driver.NewMemory() + } + d.SetNamespace(namespace) + store = storage.Init(d) + case "sql": + d, err := driver.NewSQL( + os.Getenv("HELM_DRIVER_SQL_CONNECTION_STRING"), + log, + namespace, + ) + if err != nil { + return errors.Wrap(err, "unable to instantiate SQL driver") + } + store = storage.Init(d) + default: + return errors.Errorf("unknown driver %q", helmDriver) + } + + cfg.RESTClientGetter = getter + cfg.KubeClient = kc + cfg.Releases = store + cfg.Log = log + + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/dependency.go b/vendor/helm.sh/helm/v3/pkg/action/dependency.go new file mode 100644 index 000000000..3265f1f17 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/dependency.go @@ -0,0 +1,230 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "github.com/Masterminds/semver/v3" + "github.com/gosuri/uitable" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" +) + +// Dependency is the action for building a given chart's dependency tree. +// +// It provides the implementation of 'helm dependency' and its respective subcommands. +type Dependency struct { + Verify bool + Keyring string + SkipRefresh bool + ColumnWidth uint +} + +// NewDependency creates a new Dependency object with the given configuration. +func NewDependency() *Dependency { + return &Dependency{ + ColumnWidth: 80, + } +} + +// List executes 'helm dependency list'. +func (d *Dependency) List(chartpath string, out io.Writer) error { + c, err := loader.Load(chartpath) + if err != nil { + return err + } + + if c.Metadata.Dependencies == nil { + fmt.Fprintf(out, "WARNING: no dependencies at %s\n", filepath.Join(chartpath, "charts")) + return nil + } + + d.printDependencies(chartpath, out, c) + fmt.Fprintln(out) + d.printMissing(chartpath, out, c.Metadata.Dependencies) + return nil +} + +// dependencyStatus returns a string describing the status of a dependency viz a viz the parent chart. +func (d *Dependency) dependencyStatus(chartpath string, dep *chart.Dependency, parent *chart.Chart) string { + filename := fmt.Sprintf("%s-%s.tgz", dep.Name, "*") + + // If a chart is unpacked, this will check the unpacked chart's `charts/` directory for tarballs. + // Technically, this is COMPLETELY unnecessary, and should be removed in Helm 4. It is here + // to preserved backward compatibility. In Helm 2/3, there is a "difference" between + // the tgz version (which outputs "ok" if it unpacks) and the loaded version (which outputs + // "unpacked"). Early in Helm 2's history, this would have made a difference. But it no + // longer does. However, since this code shipped with Helm 3, the output must remain stable + // until Helm 4. + switch archives, err := filepath.Glob(filepath.Join(chartpath, "charts", filename)); { + case err != nil: + return "bad pattern" + case len(archives) > 1: + // See if the second part is a SemVer + found := []string{} + for _, arc := range archives { + // we need to trip the prefix dirs and the extension off. + filename = strings.TrimSuffix(filepath.Base(arc), ".tgz") + maybeVersion := strings.TrimPrefix(filename, fmt.Sprintf("%s-", dep.Name)) + + if _, err := semver.StrictNewVersion(maybeVersion); err == nil { + // If the version parsed without an error, it is possibly a valid + // version. + found = append(found, arc) + } + } + + if l := len(found); l == 1 { + // If we get here, we do the same thing as in len(archives) == 1. + if r := statArchiveForStatus(found[0], dep); r != "" { + return r + } + + // Fall through and look for directories + } else if l > 1 { + return "too many matches" + } + + // The sanest thing to do here is to fall through and see if we have any directory + // matches. + + case len(archives) == 1: + archive := archives[0] + if r := statArchiveForStatus(archive, dep); r != "" { + return r + } + + } + // End unnecessary code. + + var depChart *chart.Chart + for _, item := range parent.Dependencies() { + if item.Name() == dep.Name { + depChart = item + } + } + + if depChart == nil { + return "missing" + } + + if depChart.Metadata.Version != dep.Version { + constraint, err := semver.NewConstraint(dep.Version) + if err != nil { + return "invalid version" + } + + v, err := semver.NewVersion(depChart.Metadata.Version) + if err != nil { + return "invalid version" + } + + if !constraint.Check(v) { + return "wrong version" + } + } + + return "unpacked" +} + +// stat an archive and return a message if the stat is successful +// +// This is a refactor of the code originally in dependencyStatus. It is here to +// support legacy behavior, and should be removed in Helm 4. +func statArchiveForStatus(archive string, dep *chart.Dependency) string { + if _, err := os.Stat(archive); err == nil { + c, err := loader.Load(archive) + if err != nil { + return "corrupt" + } + if c.Name() != dep.Name { + return "misnamed" + } + + if c.Metadata.Version != dep.Version { + constraint, err := semver.NewConstraint(dep.Version) + if err != nil { + return "invalid version" + } + + v, err := semver.NewVersion(c.Metadata.Version) + if err != nil { + return "invalid version" + } + + if !constraint.Check(v) { + return "wrong version" + } + } + return "ok" + } + return "" +} + +// printDependencies prints all of the dependencies in the yaml file. +func (d *Dependency) printDependencies(chartpath string, out io.Writer, c *chart.Chart) { + table := uitable.New() + table.MaxColWidth = d.ColumnWidth + table.AddRow("NAME", "VERSION", "REPOSITORY", "STATUS") + for _, row := range c.Metadata.Dependencies { + table.AddRow(row.Name, row.Version, row.Repository, d.dependencyStatus(chartpath, row, c)) + } + fmt.Fprintln(out, table) +} + +// printMissing prints warnings about charts that are present on disk, but are +// not in Chart.yaml. +func (d *Dependency) printMissing(chartpath string, out io.Writer, reqs []*chart.Dependency) { + folder := filepath.Join(chartpath, "charts/*") + files, err := filepath.Glob(folder) + if err != nil { + fmt.Fprintln(out, err) + return + } + + for _, f := range files { + fi, err := os.Stat(f) + if err != nil { + fmt.Fprintf(out, "Warning: %s\n", err) + } + // Skip anything that is not a directory and not a tgz file. + if !fi.IsDir() && filepath.Ext(f) != ".tgz" { + continue + } + c, err := loader.Load(f) + if err != nil { + fmt.Fprintf(out, "WARNING: %q is not a chart.\n", f) + continue + } + found := false + for _, d := range reqs { + if d.Name == c.Name() { + found = true + break + } + } + if !found { + fmt.Fprintf(out, "WARNING: %q is not in Chart.yaml.\n", f) + } + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/doc.go b/vendor/helm.sh/helm/v3/pkg/action/doc.go new file mode 100644 index 000000000..3c91bd618 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/doc.go @@ -0,0 +1,22 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package action contains the logic for each action that Helm can perform. +// +// This is a library for calling top-level Helm actions like 'install', +// 'upgrade', or 'list'. Actions approximately match the command line +// invocations that the Helm client uses. +package action diff --git a/vendor/helm.sh/helm/v3/pkg/action/get.go b/vendor/helm.sh/helm/v3/pkg/action/get.go new file mode 100644 index 000000000..f44b53307 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/get.go @@ -0,0 +1,47 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "helm.sh/helm/v3/pkg/release" +) + +// Get is the action for checking a given release's information. +// +// It provides the implementation of 'helm get' and its respective subcommands (except `helm get values`). +type Get struct { + cfg *Configuration + + // Initializing Version to 0 will get the latest revision of the release. + Version int +} + +// NewGet creates a new Get object with the given configuration. +func NewGet(cfg *Configuration) *Get { + return &Get{ + cfg: cfg, + } +} + +// Run executes 'helm get' against the given release. +func (g *Get) Run(name string) (*release.Release, error) { + if err := g.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + return g.cfg.releaseContent(name, g.Version) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/get_metadata.go b/vendor/helm.sh/helm/v3/pkg/action/get_metadata.go new file mode 100644 index 000000000..ec096ae16 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/get_metadata.go @@ -0,0 +1,69 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import "time" + +// GetMetadata is the action for checking a given release's metadata. +// +// It provides the implementation of 'helm get metadata'. +type GetMetadata struct { + cfg *Configuration + + Version int +} + +type Metadata struct { + Name string `json:"name" yaml:"name"` + Chart string `json:"chart" yaml:"chart"` + Version string `json:"version" yaml:"version"` + AppVersion string `json:"appVersion" yaml:"appVersion"` + Namespace string `json:"namespace" yaml:"namespace"` + Revision int `json:"revision" yaml:"revision"` + Status string `json:"status" yaml:"status"` + DeployedAt string `json:"deployedAt" yaml:"deployedAt"` +} + +// NewGetMetadata creates a new GetMetadata object with the given configuration. +func NewGetMetadata(cfg *Configuration) *GetMetadata { + return &GetMetadata{ + cfg: cfg, + } +} + +// Run executes 'helm get metadata' against the given release. +func (g *GetMetadata) Run(name string) (*Metadata, error) { + if err := g.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + rel, err := g.cfg.releaseContent(name, g.Version) + if err != nil { + return nil, err + } + + return &Metadata{ + Name: rel.Name, + Chart: rel.Chart.Metadata.Name, + Version: rel.Chart.Metadata.Version, + AppVersion: rel.Chart.Metadata.AppVersion, + Namespace: rel.Namespace, + Revision: rel.Version, + Status: rel.Info.Status.String(), + DeployedAt: rel.Info.LastDeployed.Format(time.RFC3339), + }, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/get_values.go b/vendor/helm.sh/helm/v3/pkg/action/get_values.go new file mode 100644 index 000000000..9c32db213 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/get_values.go @@ -0,0 +1,60 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "helm.sh/helm/v3/pkg/chartutil" +) + +// GetValues is the action for checking a given release's values. +// +// It provides the implementation of 'helm get values'. +type GetValues struct { + cfg *Configuration + + Version int + AllValues bool +} + +// NewGetValues creates a new GetValues object with the given configuration. +func NewGetValues(cfg *Configuration) *GetValues { + return &GetValues{ + cfg: cfg, + } +} + +// Run executes 'helm get values' against the given release. +func (g *GetValues) Run(name string) (map[string]interface{}, error) { + if err := g.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + rel, err := g.cfg.releaseContent(name, g.Version) + if err != nil { + return nil, err + } + + // If the user wants all values, compute the values and return. + if g.AllValues { + cfg, err := chartutil.CoalesceValues(rel.Chart, rel.Config) + if err != nil { + return nil, err + } + return cfg, nil + } + return rel.Config, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/history.go b/vendor/helm.sh/helm/v3/pkg/action/history.go new file mode 100644 index 000000000..0430aaf7a --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/history.go @@ -0,0 +1,58 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/release" +) + +// History is the action for checking the release's ledger. +// +// It provides the implementation of 'helm history'. +// It returns all the revisions for a specific release. +// To list up to one revision of every release in one specific, or in all, +// namespaces, see the List action. +type History struct { + cfg *Configuration + + Max int + Version int +} + +// NewHistory creates a new History object with the given configuration. +func NewHistory(cfg *Configuration) *History { + return &History{ + cfg: cfg, + } +} + +// Run executes 'helm history' against the given release. +func (h *History) Run(name string) ([]*release.Release, error) { + if err := h.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + if err := chartutil.ValidateReleaseName(name); err != nil { + return nil, errors.Errorf("release name is invalid: %s", name) + } + + h.cfg.Log("getting history for release %s", name) + return h.cfg.Releases.History(name) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/hooks.go b/vendor/helm.sh/helm/v3/pkg/action/hooks.go new file mode 100644 index 000000000..4bffb6ae0 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/hooks.go @@ -0,0 +1,160 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "sort" + "time" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/release" + helmtime "helm.sh/helm/v3/pkg/time" +) + +// execHook executes all of the hooks for the given hook event. +func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, timeout time.Duration) error { + executingHooks := []*release.Hook{} + + for _, h := range rl.Hooks { + for _, e := range h.Events { + if e == hook { + executingHooks = append(executingHooks, h) + } + } + } + + // hooke are pre-ordered by kind, so keep order stable + sort.Stable(hookByWeight(executingHooks)) + + for _, h := range executingHooks { + // Set default delete policy to before-hook-creation + if h.DeletePolicies == nil || len(h.DeletePolicies) == 0 { + // TODO(jlegrone): Only apply before-hook-creation delete policy to run to completion + // resources. For all other resource types update in place if a + // resource with the same name already exists and is owned by the + // current release. + h.DeletePolicies = []release.HookDeletePolicy{release.HookBeforeHookCreation} + } + + if err := cfg.deleteHookByPolicy(h, release.HookBeforeHookCreation, timeout); err != nil { + return err + } + + resources, err := cfg.KubeClient.Build(bytes.NewBufferString(h.Manifest), true) + if err != nil { + return errors.Wrapf(err, "unable to build kubernetes object for %s hook %s", hook, h.Path) + } + + // Record the time at which the hook was applied to the cluster + h.LastRun = release.HookExecution{ + StartedAt: helmtime.Now(), + Phase: release.HookPhaseRunning, + } + cfg.recordRelease(rl) + + // As long as the implementation of WatchUntilReady does not panic, HookPhaseFailed or HookPhaseSucceeded + // should always be set by this function. If we fail to do that for any reason, then HookPhaseUnknown is + // the most appropriate value to surface. + h.LastRun.Phase = release.HookPhaseUnknown + + // Create hook resources + if _, err := cfg.KubeClient.Create(resources); err != nil { + h.LastRun.CompletedAt = helmtime.Now() + h.LastRun.Phase = release.HookPhaseFailed + return errors.Wrapf(err, "warning: Hook %s %s failed", hook, h.Path) + } + + // Watch hook resources until they have completed + err = cfg.KubeClient.WatchUntilReady(resources, timeout) + // Note the time of success/failure + h.LastRun.CompletedAt = helmtime.Now() + // Mark hook as succeeded or failed + if err != nil { + h.LastRun.Phase = release.HookPhaseFailed + // If a hook is failed, check the annotation of the hook to determine whether the hook should be deleted + // under failed condition. If so, then clear the corresponding resource object in the hook + if err := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); err != nil { + return err + } + return err + } + h.LastRun.Phase = release.HookPhaseSucceeded + } + + // If all hooks are successful, check the annotation of each hook to determine whether the hook should be deleted + // under succeeded condition. If so, then clear the corresponding resource object in each hook + for i := len(executingHooks) - 1; i >= 0; i-- { + h := executingHooks[i] + if err := cfg.deleteHookByPolicy(h, release.HookSucceeded, timeout); err != nil { + return err + } + } + + return nil +} + +// hookByWeight is a sorter for hooks +type hookByWeight []*release.Hook + +func (x hookByWeight) Len() int { return len(x) } +func (x hookByWeight) Swap(i, j int) { x[i], x[j] = x[j], x[i] } +func (x hookByWeight) Less(i, j int) bool { + if x[i].Weight == x[j].Weight { + return x[i].Name < x[j].Name + } + return x[i].Weight < x[j].Weight +} + +// deleteHookByPolicy deletes a hook if the hook policy instructs it to +func (cfg *Configuration) deleteHookByPolicy(h *release.Hook, policy release.HookDeletePolicy, timeout time.Duration) error { + // Never delete CustomResourceDefinitions; this could cause lots of + // cascading garbage collection. + if h.Kind == "CustomResourceDefinition" { + return nil + } + if hookHasDeletePolicy(h, policy) { + resources, err := cfg.KubeClient.Build(bytes.NewBufferString(h.Manifest), false) + if err != nil { + return errors.Wrapf(err, "unable to build kubernetes object for deleting hook %s", h.Path) + } + _, errs := cfg.KubeClient.Delete(resources) + if len(errs) > 0 { + return errors.New(joinErrors(errs)) + } + + //wait for resources until they are deleted to avoid conflicts + if kubeClient, ok := cfg.KubeClient.(kube.InterfaceExt); ok { + if err := kubeClient.WaitForDelete(resources, timeout); err != nil { + return err + } + } + } + return nil +} + +// hookHasDeletePolicy determines whether the defined hook deletion policy matches the hook deletion polices +// supported by helm. If so, mark the hook as one should be deleted. +func hookHasDeletePolicy(h *release.Hook, policy release.HookDeletePolicy) bool { + for _, v := range h.DeletePolicies { + if policy == v { + return true + } + } + return false +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/install.go b/vendor/helm.sh/helm/v3/pkg/action/install.go new file mode 100644 index 000000000..7ca40c88a --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/install.go @@ -0,0 +1,831 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "context" + "fmt" + "io" + "net/url" + "os" + "path" + "path/filepath" + "strings" + "sync" + "text/template" + "time" + + "github.com/Masterminds/sprig/v3" + "github.com/pkg/errors" + v1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/cli-runtime/pkg/resource" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/downloader" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/kube" + kubefake "helm.sh/helm/v3/pkg/kube/fake" + "helm.sh/helm/v3/pkg/postrender" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/releaseutil" + "helm.sh/helm/v3/pkg/repo" + "helm.sh/helm/v3/pkg/storage" + "helm.sh/helm/v3/pkg/storage/driver" +) + +// notesFileSuffix that we want to treat special. It goes through the templating engine +// but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually +// wants to see this file after rendering in the status command. However, it must be a suffix +// since there can be filepath in front of it. +const notesFileSuffix = "NOTES.txt" + +const defaultDirectoryPermission = 0755 + +// Install performs an installation operation. +type Install struct { + cfg *Configuration + + ChartPathOptions + + ClientOnly bool + Force bool + CreateNamespace bool + DryRun bool + DryRunOption string + // HideSecret can be set to true when DryRun is enabled in order to hide + // Kubernetes Secrets in the output. It cannot be used outside of DryRun. + HideSecret bool + DisableHooks bool + Replace bool + Wait bool + WaitForJobs bool + Devel bool + DependencyUpdate bool + Timeout time.Duration + Namespace string + ReleaseName string + GenerateName bool + NameTemplate string + Description string + OutputDir string + Atomic bool + SkipCRDs bool + SubNotes bool + HideNotes bool + SkipSchemaValidation bool + DisableOpenAPIValidation bool + IncludeCRDs bool + Labels map[string]string + // KubeVersion allows specifying a custom kubernetes version to use and + // APIVersions allows a manual set of supported API Versions to be passed + // (for things like templating). These are ignored if ClientOnly is false + KubeVersion *chartutil.KubeVersion + APIVersions chartutil.VersionSet + // Used by helm template to render charts with .Release.IsUpgrade. Ignored if Dry-Run is false + IsUpgrade bool + // Enable DNS lookups when rendering templates + EnableDNS bool + // Used by helm template to add the release as part of OutputDir path + // OutputDir/<ReleaseName> + UseReleaseName bool + // TakeOwnership will ignore the check for helm annotations and take ownership of the resources. + TakeOwnership bool + PostRenderer postrender.PostRenderer + // Lock to control raceconditions when the process receives a SIGTERM + Lock sync.Mutex +} + +// ChartPathOptions captures common options used for controlling chart paths +type ChartPathOptions struct { + CaFile string // --ca-file + CertFile string // --cert-file + KeyFile string // --key-file + InsecureSkipTLSverify bool // --insecure-skip-verify + PlainHTTP bool // --plain-http + Keyring string // --keyring + Password string // --password + PassCredentialsAll bool // --pass-credentials + RepoURL string // --repo + Username string // --username + Verify bool // --verify + Version string // --version + + // registryClient provides a registry client but is not added with + // options from a flag + registryClient *registry.Client +} + +// NewInstall creates a new Install object with the given configuration. +func NewInstall(cfg *Configuration) *Install { + in := &Install{ + cfg: cfg, + } + in.ChartPathOptions.registryClient = cfg.RegistryClient + + return in +} + +// SetRegistryClient sets the registry client for the install action +func (i *Install) SetRegistryClient(registryClient *registry.Client) { + i.ChartPathOptions.registryClient = registryClient +} + +// GetRegistryClient get the registry client. +func (i *Install) GetRegistryClient() *registry.Client { + return i.ChartPathOptions.registryClient +} + +func (i *Install) installCRDs(crds []chart.CRD) error { + // We do these one file at a time in the order they were read. + totalItems := []*resource.Info{} + for _, obj := range crds { + // Read in the resources + res, err := i.cfg.KubeClient.Build(bytes.NewBuffer(obj.File.Data), false) + if err != nil { + return errors.Wrapf(err, "failed to install CRD %s", obj.Name) + } + + // Send them to Kube + if _, err := i.cfg.KubeClient.Create(res); err != nil { + // If the error is CRD already exists, continue. + if apierrors.IsAlreadyExists(err) { + crdName := res[0].Name + i.cfg.Log("CRD %s is already present. Skipping.", crdName) + continue + } + return errors.Wrapf(err, "failed to install CRD %s", obj.Name) + } + totalItems = append(totalItems, res...) + } + if len(totalItems) > 0 { + // Give time for the CRD to be recognized. + if err := i.cfg.KubeClient.Wait(totalItems, 60*time.Second); err != nil { + return err + } + + // If we have already gathered the capabilities, we need to invalidate + // the cache so that the new CRDs are recognized. This should only be + // the case when an action configuration is reused for multiple actions, + // as otherwise it is later loaded by ourselves when getCapabilities + // is called later on in the installation process. + if i.cfg.Capabilities != nil { + discoveryClient, err := i.cfg.RESTClientGetter.ToDiscoveryClient() + if err != nil { + return err + } + + i.cfg.Log("Clearing discovery cache") + discoveryClient.Invalidate() + + _, _ = discoveryClient.ServerGroups() + } + + // Invalidate the REST mapper, since it will not have the new CRDs + // present. + restMapper, err := i.cfg.RESTClientGetter.ToRESTMapper() + if err != nil { + return err + } + if resettable, ok := restMapper.(meta.ResettableRESTMapper); ok { + i.cfg.Log("Clearing REST mapper cache") + resettable.Reset() + } + } + return nil +} + +// Run executes the installation +// +// If DryRun is set to true, this will prepare the release, but not install it + +func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release.Release, error) { + ctx := context.Background() + return i.RunWithContext(ctx, chrt, vals) +} + +// Run executes the installation with Context +// +// When the task is cancelled through ctx, the function returns and the install +// proceeds in the background. +func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals map[string]interface{}) (*release.Release, error) { + // Check reachability of cluster unless in client-only mode (e.g. `helm template` without `--validate`) + if !i.ClientOnly { + if err := i.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + } + + // HideSecret must be used with dry run. Otherwise, return an error. + if !i.isDryRun() && i.HideSecret { + return nil, errors.New("Hiding Kubernetes secrets requires a dry-run mode") + } + + if err := i.availableName(); err != nil { + return nil, err + } + + if err := chartutil.ProcessDependenciesWithMerge(chrt, vals); err != nil { + return nil, err + } + + var interactWithRemote bool + if !i.isDryRun() || i.DryRunOption == "server" || i.DryRunOption == "none" || i.DryRunOption == "false" { + interactWithRemote = true + } + + // Pre-install anything in the crd/ directory. We do this before Helm + // contacts the upstream server and builds the capabilities object. + if crds := chrt.CRDObjects(); !i.ClientOnly && !i.SkipCRDs && len(crds) > 0 { + // On dry run, bail here + if i.isDryRun() { + i.cfg.Log("WARNING: This chart or one of its subcharts contains CRDs. Rendering may fail or contain inaccuracies.") + } else if err := i.installCRDs(crds); err != nil { + return nil, err + } + } + + if i.ClientOnly { + // Add mock objects in here so it doesn't use Kube API server + // NOTE(bacongobbler): used for `helm template` + i.cfg.Capabilities = chartutil.DefaultCapabilities.Copy() + if i.KubeVersion != nil { + i.cfg.Capabilities.KubeVersion = *i.KubeVersion + } + i.cfg.Capabilities.APIVersions = append(i.cfg.Capabilities.APIVersions, i.APIVersions...) + i.cfg.KubeClient = &kubefake.PrintingKubeClient{Out: io.Discard} + + mem := driver.NewMemory() + mem.SetNamespace(i.Namespace) + i.cfg.Releases = storage.Init(mem) + } else if !i.ClientOnly && len(i.APIVersions) > 0 { + i.cfg.Log("API Version list given outside of client only mode, this list will be ignored") + } + + // Make sure if Atomic is set, that wait is set as well. This makes it so + // the user doesn't have to specify both + i.Wait = i.Wait || i.Atomic + + caps, err := i.cfg.getCapabilities() + if err != nil { + return nil, err + } + + // special case for helm template --is-upgrade + isUpgrade := i.IsUpgrade && i.isDryRun() + options := chartutil.ReleaseOptions{ + Name: i.ReleaseName, + Namespace: i.Namespace, + Revision: 1, + IsInstall: !isUpgrade, + IsUpgrade: isUpgrade, + } + valuesToRender, err := chartutil.ToRenderValuesWithSchemaValidation(chrt, vals, options, caps, i.SkipSchemaValidation) + if err != nil { + return nil, err + } + + if driver.ContainsSystemLabels(i.Labels) { + return nil, fmt.Errorf("user supplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels()) + } + + rel := i.createRelease(chrt, vals, i.Labels) + + var manifestDoc *bytes.Buffer + rel.Hooks, manifestDoc, rel.Info.Notes, err = i.cfg.renderResources(chrt, valuesToRender, i.ReleaseName, i.OutputDir, i.SubNotes, i.UseReleaseName, i.IncludeCRDs, i.PostRenderer, interactWithRemote, i.EnableDNS, i.HideSecret) + // Even for errors, attach this if available + if manifestDoc != nil { + rel.Manifest = manifestDoc.String() + } + // Check error from render + if err != nil { + rel.SetStatus(release.StatusFailed, fmt.Sprintf("failed to render resource: %s", err.Error())) + // Return a release with partial data so that the client can show debugging information. + return rel, err + } + + // Mark this release as in-progress + rel.SetStatus(release.StatusPendingInstall, "Initial install underway") + + var toBeAdopted kube.ResourceList + resources, err := i.cfg.KubeClient.Build(bytes.NewBufferString(rel.Manifest), !i.DisableOpenAPIValidation) + if err != nil { + return nil, errors.Wrap(err, "unable to build kubernetes objects from release manifest") + } + + // It is safe to use "force" here because these are resources currently rendered by the chart. + err = resources.Visit(setMetadataVisitor(rel.Name, rel.Namespace, true)) + if err != nil { + return nil, err + } + + // Install requires an extra validation step of checking that resources + // don't already exist before we actually create resources. If we continue + // forward and create the release object with resources that already exist, + // we'll end up in a state where we will delete those resources upon + // deleting the release because the manifest will be pointing at that + // resource + if !i.ClientOnly && !isUpgrade && len(resources) > 0 { + if i.TakeOwnership { + toBeAdopted, err = requireAdoption(resources) + } else { + toBeAdopted, err = existingResourceConflict(resources, rel.Name, rel.Namespace) + } + if err != nil { + return nil, errors.Wrap(err, "Unable to continue with install") + } + } + + // Bail out here if it is a dry run + if i.isDryRun() { + rel.Info.Description = "Dry run complete" + return rel, nil + } + + if i.CreateNamespace { + ns := &v1.Namespace{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Namespace", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: i.Namespace, + Labels: map[string]string{ + "name": i.Namespace, + }, + }, + } + buf, err := yaml.Marshal(ns) + if err != nil { + return nil, err + } + resourceList, err := i.cfg.KubeClient.Build(bytes.NewBuffer(buf), true) + if err != nil { + return nil, err + } + if _, err := i.cfg.KubeClient.Create(resourceList); err != nil && !apierrors.IsAlreadyExists(err) { + return nil, err + } + } + + // If Replace is true, we need to supersede the last release. + if i.Replace { + if err := i.replaceRelease(rel); err != nil { + return nil, err + } + } + + // Store the release in history before continuing (new in Helm 3). We always know + // that this is a create operation. + if err := i.cfg.Releases.Create(rel); err != nil { + // We could try to recover gracefully here, but since nothing has been installed + // yet, this is probably safer than trying to continue when we know storage is + // not working. + return rel, err + } + + rel, err = i.performInstallCtx(ctx, rel, toBeAdopted, resources) + if err != nil { + rel, err = i.failRelease(rel, err) + } + return rel, err +} + +func (i *Install) performInstallCtx(ctx context.Context, rel *release.Release, toBeAdopted kube.ResourceList, resources kube.ResourceList) (*release.Release, error) { + type Msg struct { + r *release.Release + e error + } + resultChan := make(chan Msg, 1) + + go func() { + rel, err := i.performInstall(rel, toBeAdopted, resources) + resultChan <- Msg{rel, err} + }() + select { + case <-ctx.Done(): + err := ctx.Err() + return rel, err + case msg := <-resultChan: + return msg.r, msg.e + } +} + +// isDryRun returns true if Upgrade is set to run as a DryRun +func (i *Install) isDryRun() bool { + if i.DryRun || i.DryRunOption == "client" || i.DryRunOption == "server" || i.DryRunOption == "true" { + return true + } + return false +} + +func (i *Install) performInstall(rel *release.Release, toBeAdopted kube.ResourceList, resources kube.ResourceList) (*release.Release, error) { + var err error + // pre-install hooks + if !i.DisableHooks { + if err := i.cfg.execHook(rel, release.HookPreInstall, i.Timeout); err != nil { + return rel, fmt.Errorf("failed pre-install: %s", err) + } + } + + // At this point, we can do the install. Note that before we were detecting whether to + // do an update, but it's not clear whether we WANT to do an update if the re-use is set + // to true, since that is basically an upgrade operation. + if len(toBeAdopted) == 0 && len(resources) > 0 { + _, err = i.cfg.KubeClient.Create(resources) + } else if len(resources) > 0 { + _, err = i.cfg.KubeClient.Update(toBeAdopted, resources, i.Force) + } + if err != nil { + return rel, err + } + + if i.Wait { + if i.WaitForJobs { + err = i.cfg.KubeClient.WaitWithJobs(resources, i.Timeout) + } else { + err = i.cfg.KubeClient.Wait(resources, i.Timeout) + } + if err != nil { + return rel, err + } + } + + if !i.DisableHooks { + if err := i.cfg.execHook(rel, release.HookPostInstall, i.Timeout); err != nil { + return rel, fmt.Errorf("failed post-install: %s", err) + } + } + + if len(i.Description) > 0 { + rel.SetStatus(release.StatusDeployed, i.Description) + } else { + rel.SetStatus(release.StatusDeployed, "Install complete") + } + + // This is a tricky case. The release has been created, but the result + // cannot be recorded. The truest thing to tell the user is that the + // release was created. However, the user will not be able to do anything + // further with this release. + // + // One possible strategy would be to do a timed retry to see if we can get + // this stored in the future. + if err := i.recordRelease(rel); err != nil { + i.cfg.Log("failed to record the release: %s", err) + } + + return rel, nil +} + +func (i *Install) failRelease(rel *release.Release, err error) (*release.Release, error) { + rel.SetStatus(release.StatusFailed, fmt.Sprintf("Release %q failed: %s", i.ReleaseName, err.Error())) + if i.Atomic { + i.cfg.Log("Install failed and atomic is set, uninstalling release") + uninstall := NewUninstall(i.cfg) + uninstall.DisableHooks = i.DisableHooks + uninstall.KeepHistory = false + uninstall.Timeout = i.Timeout + if _, uninstallErr := uninstall.Run(i.ReleaseName); uninstallErr != nil { + return rel, errors.Wrapf(uninstallErr, "an error occurred while uninstalling the release. original install error: %s", err) + } + return rel, errors.Wrapf(err, "release %s failed, and has been uninstalled due to atomic being set", i.ReleaseName) + } + i.recordRelease(rel) // Ignore the error, since we have another error to deal with. + return rel, err +} + +// availableName tests whether a name is available +// +// Roughly, this will return an error if name is +// +// - empty +// - too long +// - already in use, and not deleted +// - used by a deleted release, and i.Replace is false +func (i *Install) availableName() error { + start := i.ReleaseName + + if err := chartutil.ValidateReleaseName(start); err != nil { + return errors.Wrapf(err, "release name %q", start) + } + // On dry run, bail here + if i.isDryRun() { + return nil + } + + h, err := i.cfg.Releases.History(start) + if err != nil || len(h) < 1 { + return nil + } + releaseutil.Reverse(h, releaseutil.SortByRevision) + rel := h[0] + + if st := rel.Info.Status; i.Replace && (st == release.StatusUninstalled || st == release.StatusFailed) { + return nil + } + return errors.New("cannot re-use a name that is still in use") +} + +// createRelease creates a new release object +func (i *Install) createRelease(chrt *chart.Chart, rawVals map[string]interface{}, labels map[string]string) *release.Release { + ts := i.cfg.Now() + return &release.Release{ + Name: i.ReleaseName, + Namespace: i.Namespace, + Chart: chrt, + Config: rawVals, + Info: &release.Info{ + FirstDeployed: ts, + LastDeployed: ts, + Status: release.StatusUnknown, + }, + Version: 1, + Labels: labels, + } +} + +// recordRelease with an update operation in case reuse has been set. +func (i *Install) recordRelease(r *release.Release) error { + // This is a legacy function which has been reduced to a oneliner. Could probably + // refactor it out. + return i.cfg.Releases.Update(r) +} + +// replaceRelease replaces an older release with this one +// +// This allows us to re-use names by superseding an existing release with a new one +func (i *Install) replaceRelease(rel *release.Release) error { + hist, err := i.cfg.Releases.History(rel.Name) + if err != nil || len(hist) == 0 { + // No releases exist for this name, so we can return early + return nil + } + + releaseutil.Reverse(hist, releaseutil.SortByRevision) + last := hist[0] + + // Update version to the next available + rel.Version = last.Version + 1 + + // Do not change the status of a failed release. + if last.Info.Status == release.StatusFailed { + return nil + } + + // For any other status, mark it as superseded and store the old record + last.SetStatus(release.StatusSuperseded, "superseded by new release") + return i.recordRelease(last) +} + +// write the <data> to <output-dir>/<name>. <append> controls if the file is created or content will be appended +func writeToFile(outputDir string, name string, data string, append bool) error { + outfileName := strings.Join([]string{outputDir, name}, string(filepath.Separator)) + + err := ensureDirectoryForFile(outfileName) + if err != nil { + return err + } + + f, err := createOrOpenFile(outfileName, append) + if err != nil { + return err + } + + defer f.Close() + + _, err = f.WriteString(fmt.Sprintf("---\n# Source: %s\n%s\n", name, data)) + + if err != nil { + return err + } + + fmt.Printf("wrote %s\n", outfileName) + return nil +} + +func createOrOpenFile(filename string, append bool) (*os.File, error) { + if append { + return os.OpenFile(filename, os.O_APPEND|os.O_WRONLY, 0600) + } + return os.Create(filename) +} + +// check if the directory exists to create file. creates if doesn't exist +func ensureDirectoryForFile(file string) error { + baseDir := path.Dir(file) + _, err := os.Stat(baseDir) + if err != nil && !os.IsNotExist(err) { + return err + } + + return os.MkdirAll(baseDir, defaultDirectoryPermission) +} + +// NameAndChart returns the name and chart that should be used. +// +// This will read the flags and handle name generation if necessary. +func (i *Install) NameAndChart(args []string) (string, string, error) { + flagsNotSet := func() error { + if i.GenerateName { + return errors.New("cannot set --generate-name and also specify a name") + } + if i.NameTemplate != "" { + return errors.New("cannot set --name-template and also specify a name") + } + return nil + } + + if len(args) > 2 { + return args[0], args[1], errors.Errorf("expected at most two arguments, unexpected arguments: %v", strings.Join(args[2:], ", ")) + } + + if len(args) == 2 { + return args[0], args[1], flagsNotSet() + } + + if i.NameTemplate != "" { + name, err := TemplateName(i.NameTemplate) + return name, args[0], err + } + + if i.ReleaseName != "" { + return i.ReleaseName, args[0], nil + } + + if !i.GenerateName { + return "", args[0], errors.New("must either provide a name or specify --generate-name") + } + + base := filepath.Base(args[0]) + if base == "." || base == "" { + base = "chart" + } + // if present, strip out the file extension from the name + if idx := strings.Index(base, "."); idx != -1 { + base = base[0:idx] + } + + return fmt.Sprintf("%s-%d", base, time.Now().Unix()), args[0], nil +} + +// TemplateName renders a name template, returning the name or an error. +func TemplateName(nameTemplate string) (string, error) { + if nameTemplate == "" { + return "", nil + } + + t, err := template.New("name-template").Funcs(sprig.TxtFuncMap()).Parse(nameTemplate) + if err != nil { + return "", err + } + var b bytes.Buffer + if err := t.Execute(&b, nil); err != nil { + return "", err + } + + return b.String(), nil +} + +// CheckDependencies checks the dependencies for a chart. +func CheckDependencies(ch *chart.Chart, reqs []*chart.Dependency) error { + var missing []string + +OUTER: + for _, r := range reqs { + for _, d := range ch.Dependencies() { + if d.Name() == r.Name { + continue OUTER + } + } + missing = append(missing, r.Name) + } + + if len(missing) > 0 { + return errors.Errorf("found in Chart.yaml, but missing in charts/ directory: %s", strings.Join(missing, ", ")) + } + return nil +} + +// LocateChart looks for a chart directory in known places, and returns either the full path or an error. +// +// This does not ensure that the chart is well-formed; only that the requested filename exists. +// +// Order of resolution: +// - relative to current working directory +// - if path is absolute or begins with '.', error out here +// - URL +// +// If 'verify' was set on ChartPathOptions, this will attempt to also verify the chart. +func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (string, error) { + if registry.IsOCI(name) && c.registryClient == nil { + return "", fmt.Errorf("unable to lookup chart %q, missing registry client", name) + } + + name = strings.TrimSpace(name) + version := strings.TrimSpace(c.Version) + + if _, err := os.Stat(name); err == nil { + abs, err := filepath.Abs(name) + if err != nil { + return abs, err + } + if c.Verify { + if _, err := downloader.VerifyChart(abs, c.Keyring); err != nil { + return "", err + } + } + return abs, nil + } + if filepath.IsAbs(name) || strings.HasPrefix(name, ".") { + return name, errors.Errorf("path %q not found", name) + } + + dl := downloader.ChartDownloader{ + Out: os.Stdout, + Keyring: c.Keyring, + Getters: getter.All(settings), + Options: []getter.Option{ + getter.WithPassCredentialsAll(c.PassCredentialsAll), + getter.WithTLSClientConfig(c.CertFile, c.KeyFile, c.CaFile), + getter.WithInsecureSkipVerifyTLS(c.InsecureSkipTLSverify), + getter.WithPlainHTTP(c.PlainHTTP), + }, + RepositoryConfig: settings.RepositoryConfig, + RepositoryCache: settings.RepositoryCache, + RegistryClient: c.registryClient, + } + + if registry.IsOCI(name) { + dl.Options = append(dl.Options, getter.WithRegistryClient(c.registryClient)) + } + + if c.Verify { + dl.Verify = downloader.VerifyAlways + } + if c.RepoURL != "" { + chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(c.RepoURL, c.Username, c.Password, name, version, + c.CertFile, c.KeyFile, c.CaFile, c.InsecureSkipTLSverify, c.PassCredentialsAll, getter.All(settings)) + if err != nil { + return "", err + } + name = chartURL + + // Only pass the user/pass on when the user has said to or when the + // location of the chart repo and the chart are the same domain. + u1, err := url.Parse(c.RepoURL) + if err != nil { + return "", err + } + u2, err := url.Parse(chartURL) + if err != nil { + return "", err + } + + // Host on URL (returned from url.Parse) contains the port if present. + // This check ensures credentials are not passed between different + // services on different ports. + if c.PassCredentialsAll || (u1.Scheme == u2.Scheme && u1.Host == u2.Host) { + dl.Options = append(dl.Options, getter.WithBasicAuth(c.Username, c.Password)) + } else { + dl.Options = append(dl.Options, getter.WithBasicAuth("", "")) + } + } else { + dl.Options = append(dl.Options, getter.WithBasicAuth(c.Username, c.Password)) + } + + if err := os.MkdirAll(settings.RepositoryCache, 0755); err != nil { + return "", err + } + + filename, _, err := dl.DownloadTo(name, version, settings.RepositoryCache) + if err != nil { + return "", err + } + + lname, err := filepath.Abs(filename) + if err != nil { + return filename, err + } + return lname, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/lazyclient.go b/vendor/helm.sh/helm/v3/pkg/action/lazyclient.go new file mode 100644 index 000000000..9037782bb --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/lazyclient.go @@ -0,0 +1,197 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "context" + "sync" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applycorev1 "k8s.io/client-go/applyconfigurations/core/v1" + "k8s.io/client-go/kubernetes" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +// lazyClient is a workaround to deal with Kubernetes having an unstable client API. +// In Kubernetes v1.18 the defaults where removed which broke creating a +// client without an explicit configuration. ಠ_ಠ +type lazyClient struct { + // client caches an initialized kubernetes client + initClient sync.Once + client kubernetes.Interface + clientErr error + + // clientFn loads a kubernetes client + clientFn func() (*kubernetes.Clientset, error) + + // namespace passed to each client request + namespace string +} + +func (s *lazyClient) init() error { + s.initClient.Do(func() { + s.client, s.clientErr = s.clientFn() + }) + return s.clientErr +} + +// secretClient implements a corev1.SecretsInterface +type secretClient struct{ *lazyClient } + +var _ corev1.SecretInterface = (*secretClient)(nil) + +func newSecretClient(lc *lazyClient) *secretClient { + return &secretClient{lazyClient: lc} +} + +func (s *secretClient) Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (result *v1.Secret, err error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).Create(ctx, secret, opts) +} + +func (s *secretClient) Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (*v1.Secret, error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).Update(ctx, secret, opts) +} + +func (s *secretClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + if err := s.init(); err != nil { + return err + } + return s.client.CoreV1().Secrets(s.namespace).Delete(ctx, name, opts) +} + +func (s *secretClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + if err := s.init(); err != nil { + return err + } + return s.client.CoreV1().Secrets(s.namespace).DeleteCollection(ctx, opts, listOpts) +} + +func (s *secretClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Secret, error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).Get(ctx, name, opts) +} + +func (s *secretClient) List(ctx context.Context, opts metav1.ListOptions) (*v1.SecretList, error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).List(ctx, opts) +} + +func (s *secretClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).Watch(ctx, opts) +} + +func (s *secretClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*v1.Secret, error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).Patch(ctx, name, pt, data, opts, subresources...) +} + +func (s *secretClient) Apply(ctx context.Context, secretConfiguration *applycorev1.SecretApplyConfiguration, opts metav1.ApplyOptions) (*v1.Secret, error) { + if err := s.init(); err != nil { + return nil, err + } + return s.client.CoreV1().Secrets(s.namespace).Apply(ctx, secretConfiguration, opts) +} + +// configMapClient implements a corev1.ConfigMapInterface +type configMapClient struct{ *lazyClient } + +var _ corev1.ConfigMapInterface = (*configMapClient)(nil) + +func newConfigMapClient(lc *lazyClient) *configMapClient { + return &configMapClient{lazyClient: lc} +} + +func (c *configMapClient) Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (*v1.ConfigMap, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Create(ctx, configMap, opts) +} + +func (c *configMapClient) Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (*v1.ConfigMap, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Update(ctx, configMap, opts) +} + +func (c *configMapClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + if err := c.init(); err != nil { + return err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Delete(ctx, name, opts) +} + +func (c *configMapClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + if err := c.init(); err != nil { + return err + } + return c.client.CoreV1().ConfigMaps(c.namespace).DeleteCollection(ctx, opts, listOpts) +} + +func (c *configMapClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConfigMap, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Get(ctx, name, opts) +} + +func (c *configMapClient) List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigMapList, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).List(ctx, opts) +} + +func (c *configMapClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Watch(ctx, opts) +} + +func (c *configMapClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*v1.ConfigMap, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Patch(ctx, name, pt, data, opts, subresources...) +} + +func (c *configMapClient) Apply(ctx context.Context, configMap *applycorev1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions) (*v1.ConfigMap, error) { + if err := c.init(); err != nil { + return nil, err + } + return c.client.CoreV1().ConfigMaps(c.namespace).Apply(ctx, configMap, opts) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/lint.go b/vendor/helm.sh/helm/v3/pkg/action/lint.go new file mode 100644 index 000000000..63a1bf354 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/lint.go @@ -0,0 +1,130 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/lint" + "helm.sh/helm/v3/pkg/lint/support" +) + +// Lint is the action for checking that the semantics of a chart are well-formed. +// +// It provides the implementation of 'helm lint'. +type Lint struct { + Strict bool + Namespace string + WithSubcharts bool + Quiet bool + SkipSchemaValidation bool + KubeVersion *chartutil.KubeVersion +} + +// LintResult is the result of Lint +type LintResult struct { + TotalChartsLinted int + Messages []support.Message + Errors []error +} + +// NewLint creates a new Lint object with the given configuration. +func NewLint() *Lint { + return &Lint{} +} + +// Run executes 'helm Lint' against the given chart. +func (l *Lint) Run(paths []string, vals map[string]interface{}) *LintResult { + lowestTolerance := support.ErrorSev + if l.Strict { + lowestTolerance = support.WarningSev + } + result := &LintResult{} + for _, path := range paths { + linter, err := lintChart(path, vals, l.Namespace, l.KubeVersion, l.SkipSchemaValidation) + if err != nil { + result.Errors = append(result.Errors, err) + continue + } + + result.Messages = append(result.Messages, linter.Messages...) + result.TotalChartsLinted++ + for _, msg := range linter.Messages { + if msg.Severity >= lowestTolerance { + result.Errors = append(result.Errors, msg.Err) + } + } + } + return result +} + +// HasWarningsOrErrors checks is LintResult has any warnings or errors +func HasWarningsOrErrors(result *LintResult) bool { + for _, msg := range result.Messages { + if msg.Severity > support.InfoSev { + return true + } + } + return len(result.Errors) > 0 +} + +func lintChart(path string, vals map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion, skipSchemaValidation bool) (support.Linter, error) { + var chartPath string + linter := support.Linter{} + + if strings.HasSuffix(path, ".tgz") || strings.HasSuffix(path, ".tar.gz") { + tempDir, err := os.MkdirTemp("", "helm-lint") + if err != nil { + return linter, errors.Wrap(err, "unable to create temp dir to extract tarball") + } + defer os.RemoveAll(tempDir) + + file, err := os.Open(path) + if err != nil { + return linter, errors.Wrap(err, "unable to open tarball") + } + defer file.Close() + + if err = chartutil.Expand(tempDir, file); err != nil { + return linter, errors.Wrap(err, "unable to extract tarball") + } + + files, err := os.ReadDir(tempDir) + if err != nil { + return linter, errors.Wrapf(err, "unable to read temporary output directory %s", tempDir) + } + if !files[0].IsDir() { + return linter, errors.Errorf("unexpected file %s in temporary output directory %s", files[0].Name(), tempDir) + } + + chartPath = filepath.Join(tempDir, files[0].Name()) + } else { + chartPath = path + } + + // Guard: Error out if this is not a chart. + if _, err := os.Stat(filepath.Join(chartPath, "Chart.yaml")); err != nil { + return linter, errors.Wrap(err, "unable to check Chart.yaml file in chart") + } + + return lint.AllWithKubeVersionAndSchemaValidation(chartPath, vals, namespace, kubeVersion, skipSchemaValidation), nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/list.go b/vendor/helm.sh/helm/v3/pkg/action/list.go new file mode 100644 index 000000000..af0725c4a --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/list.go @@ -0,0 +1,324 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "path" + "regexp" + + "k8s.io/apimachinery/pkg/labels" + + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/releaseutil" +) + +// ListStates represents zero or more status codes that a list item may have set +// +// Because this is used as a bitmask filter, more than one bit can be flipped +// in the ListStates. +type ListStates uint + +const ( + // ListDeployed filters on status "deployed" + ListDeployed ListStates = 1 << iota + // ListUninstalled filters on status "uninstalled" + ListUninstalled + // ListUninstalling filters on status "uninstalling" (uninstall in progress) + ListUninstalling + // ListPendingInstall filters on status "pending" (deployment in progress) + ListPendingInstall + // ListPendingUpgrade filters on status "pending_upgrade" (upgrade in progress) + ListPendingUpgrade + // ListPendingRollback filters on status "pending_rollback" (rollback in progress) + ListPendingRollback + // ListSuperseded filters on status "superseded" (historical release version that is no longer deployed) + ListSuperseded + // ListFailed filters on status "failed" (release version not deployed because of error) + ListFailed + // ListUnknown filters on an unknown status + ListUnknown +) + +// FromName takes a state name and returns a ListStates representation. +// +// Currently, there are only names for individual flipped bits, so the returned +// ListStates will only match one of the constants. However, it is possible that +// this behavior could change in the future. +func (s ListStates) FromName(str string) ListStates { + switch str { + case "deployed": + return ListDeployed + case "uninstalled": + return ListUninstalled + case "superseded": + return ListSuperseded + case "failed": + return ListFailed + case "uninstalling": + return ListUninstalling + case "pending-install": + return ListPendingInstall + case "pending-upgrade": + return ListPendingUpgrade + case "pending-rollback": + return ListPendingRollback + } + return ListUnknown +} + +// ListAll is a convenience for enabling all list filters +const ListAll = ListDeployed | ListUninstalled | ListUninstalling | ListPendingInstall | ListPendingRollback | ListPendingUpgrade | ListSuperseded | ListFailed + +// Sorter is a top-level sort +type Sorter uint + +const ( + // ByNameDesc sorts by descending lexicographic order + ByNameDesc Sorter = iota + 1 + // ByDateAsc sorts by ascending dates (oldest updated release first) + ByDateAsc + // ByDateDesc sorts by descending dates (latest updated release first) + ByDateDesc +) + +// List is the action for listing releases. +// +// It provides, for example, the implementation of 'helm list'. +// It returns no more than one revision of every release in one specific, or in +// all, namespaces. +// To list all the revisions of a specific release, see the History action. +type List struct { + cfg *Configuration + + // All ignores the limit/offset + All bool + // AllNamespaces searches across namespaces + AllNamespaces bool + // Sort indicates the sort to use + // + // see pkg/releaseutil for several useful sorters + Sort Sorter + // Overrides the default lexicographic sorting + ByDate bool + SortReverse bool + // StateMask accepts a bitmask of states for items to show. + // The default is ListDeployed + StateMask ListStates + // Limit is the number of items to return per Run() + Limit int + // Offset is the starting index for the Run() call + Offset int + // Filter is a filter that is applied to the results + Filter string + Short bool + NoHeaders bool + TimeFormat string + Uninstalled bool + Superseded bool + Uninstalling bool + Deployed bool + Failed bool + Pending bool + Selector string +} + +// NewList constructs a new *List +func NewList(cfg *Configuration) *List { + return &List{ + StateMask: ListDeployed | ListFailed, + cfg: cfg, + } +} + +// Run executes the list command, returning a set of matches. +func (l *List) Run() ([]*release.Release, error) { + if err := l.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + var filter *regexp.Regexp + if l.Filter != "" { + var err error + filter, err = regexp.Compile(l.Filter) + if err != nil { + return nil, err + } + } + + results, err := l.cfg.Releases.List(func(rel *release.Release) bool { + // Skip anything that doesn't match the filter. + if filter != nil && !filter.MatchString(rel.Name) { + return false + } + + return true + }) + + if err != nil { + return nil, err + } + + if results == nil { + return results, nil + } + + // by definition, superseded releases are never shown if + // only the latest releases are returned. so if requested statemask + // is _only_ ListSuperseded, skip the latest release filter + if l.StateMask != ListSuperseded { + results = filterLatestReleases(results) + } + + // State mask application must occur after filtering to + // latest releases, otherwise outdated entries can be returned + results = l.filterStateMask(results) + + // Skip anything that doesn't match the selector + selectorObj, err := labels.Parse(l.Selector) + if err != nil { + return nil, err + } + results = l.filterSelector(results, selectorObj) + + // Unfortunately, we have to sort before truncating, which can incur substantial overhead + l.sort(results) + + // Guard on offset + if l.Offset >= len(results) { + return []*release.Release{}, nil + } + + // Calculate the limit and offset, and then truncate results if necessary. + limit := len(results) + if l.Limit > 0 && l.Limit < limit { + limit = l.Limit + } + last := l.Offset + limit + if l := len(results); l < last { + last = l + } + results = results[l.Offset:last] + + return results, err +} + +// sort is an in-place sort where order is based on the value of a.Sort +func (l *List) sort(rels []*release.Release) { + if l.SortReverse { + l.Sort = ByNameDesc + } + + if l.ByDate { + l.Sort = ByDateDesc + if l.SortReverse { + l.Sort = ByDateAsc + } + } + + switch l.Sort { + case ByDateDesc: + releaseutil.SortByDate(rels) + case ByDateAsc: + releaseutil.Reverse(rels, releaseutil.SortByDate) + case ByNameDesc: + releaseutil.Reverse(rels, releaseutil.SortByName) + default: + releaseutil.SortByName(rels) + } +} + +// filterLatestReleases returns a list scrubbed of old releases. +func filterLatestReleases(releases []*release.Release) []*release.Release { + latestReleases := make(map[string]*release.Release) + + for _, rls := range releases { + name, namespace := rls.Name, rls.Namespace + key := path.Join(namespace, name) + if latestRelease, exists := latestReleases[key]; exists && latestRelease.Version > rls.Version { + continue + } + latestReleases[key] = rls + } + + var list = make([]*release.Release, 0, len(latestReleases)) + for _, rls := range latestReleases { + list = append(list, rls) + } + return list +} + +func (l *List) filterStateMask(releases []*release.Release) []*release.Release { + desiredStateReleases := make([]*release.Release, 0) + + for _, rls := range releases { + currentStatus := l.StateMask.FromName(rls.Info.Status.String()) + mask := l.StateMask & currentStatus + if mask == 0 { + continue + } + desiredStateReleases = append(desiredStateReleases, rls) + } + + return desiredStateReleases +} + +func (l *List) filterSelector(releases []*release.Release, selector labels.Selector) []*release.Release { + desiredStateReleases := make([]*release.Release, 0) + + for _, rls := range releases { + if selector.Matches(labels.Set(rls.Labels)) { + desiredStateReleases = append(desiredStateReleases, rls) + } + } + + return desiredStateReleases +} + +// SetStateMask calculates the state mask based on parameters. +func (l *List) SetStateMask() { + if l.All { + l.StateMask = ListAll + return + } + + state := ListStates(0) + if l.Deployed { + state |= ListDeployed + } + if l.Uninstalled { + state |= ListUninstalled + } + if l.Uninstalling { + state |= ListUninstalling + } + if l.Pending { + state |= ListPendingInstall | ListPendingRollback | ListPendingUpgrade + } + if l.Failed { + state |= ListFailed + } + if l.Superseded { + state |= ListSuperseded + } + + // Apply a default + if state == 0 { + state = ListDeployed | ListFailed + } + + l.StateMask = state +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/package.go b/vendor/helm.sh/helm/v3/pkg/action/package.go new file mode 100644 index 000000000..013b32f55 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/package.go @@ -0,0 +1,181 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bufio" + "fmt" + "os" + "syscall" + + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" + "golang.org/x/term" + + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/provenance" +) + +// Package is the action for packaging a chart. +// +// It provides the implementation of 'helm package'. +type Package struct { + Sign bool + Key string + Keyring string + PassphraseFile string + Version string + AppVersion string + Destination string + DependencyUpdate bool + + RepositoryConfig string + RepositoryCache string +} + +// NewPackage creates a new Package object with the given configuration. +func NewPackage() *Package { + return &Package{} +} + +// Run executes 'helm package' against the given chart and returns the path to the packaged chart. +func (p *Package) Run(path string, _ map[string]interface{}) (string, error) { + ch, err := loader.LoadDir(path) + if err != nil { + return "", err + } + + // If version is set, modify the version. + if p.Version != "" { + ch.Metadata.Version = p.Version + } + + if err := validateVersion(ch.Metadata.Version); err != nil { + return "", err + } + + if p.AppVersion != "" { + ch.Metadata.AppVersion = p.AppVersion + } + + if reqs := ch.Metadata.Dependencies; reqs != nil { + if err := CheckDependencies(ch, reqs); err != nil { + return "", err + } + } + + var dest string + if p.Destination == "." { + // Save to the current working directory. + dest, err = os.Getwd() + if err != nil { + return "", err + } + } else { + // Otherwise save to set destination + dest = p.Destination + } + + name, err := chartutil.Save(ch, dest) + if err != nil { + return "", errors.Wrap(err, "failed to save") + } + + if p.Sign { + err = p.Clearsign(name) + } + + return name, err +} + +// validateVersion Verify that version is a Version, and error out if it is not. +func validateVersion(ver string) error { + if _, err := semver.NewVersion(ver); err != nil { + return err + } + return nil +} + +// Clearsign signs a chart +func (p *Package) Clearsign(filename string) error { + // Load keyring + signer, err := provenance.NewFromKeyring(p.Keyring, p.Key) + if err != nil { + return err + } + + passphraseFetcher := promptUser + if p.PassphraseFile != "" { + passphraseFetcher, err = passphraseFileFetcher(p.PassphraseFile, os.Stdin) + if err != nil { + return err + } + } + + if err := signer.DecryptKey(passphraseFetcher); err != nil { + return err + } + + sig, err := signer.ClearSign(filename) + if err != nil { + return err + } + + return os.WriteFile(filename+".prov", []byte(sig), 0644) +} + +// promptUser implements provenance.PassphraseFetcher +func promptUser(name string) ([]byte, error) { + fmt.Printf("Password for key %q > ", name) + // syscall.Stdin is not an int in all environments and needs to be coerced + // into one there (e.g., Windows) + pw, err := term.ReadPassword(int(syscall.Stdin)) + fmt.Println() + return pw, err +} + +func passphraseFileFetcher(passphraseFile string, stdin *os.File) (provenance.PassphraseFetcher, error) { + file, err := openPassphraseFile(passphraseFile, stdin) + if err != nil { + return nil, err + } + defer file.Close() + + reader := bufio.NewReader(file) + passphrase, _, err := reader.ReadLine() + if err != nil { + return nil, err + } + return func(_ string) ([]byte, error) { + return passphrase, nil + }, nil +} + +func openPassphraseFile(passphraseFile string, stdin *os.File) (*os.File, error) { + if passphraseFile == "-" { + stat, err := stdin.Stat() + if err != nil { + return nil, err + } + if (stat.Mode() & os.ModeNamedPipe) == 0 { + return nil, errors.New("specified reading passphrase from stdin, without input on stdin") + } + return stdin, nil + } + return os.Open(passphraseFile) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/pull.go b/vendor/helm.sh/helm/v3/pkg/action/pull.go new file mode 100644 index 000000000..787553125 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/pull.go @@ -0,0 +1,172 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/downloader" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/repo" +) + +// Pull is the action for checking a given release's information. +// +// It provides the implementation of 'helm pull'. +type Pull struct { + ChartPathOptions + + Settings *cli.EnvSettings // TODO: refactor this out of pkg/action + + Devel bool + Untar bool + VerifyLater bool + UntarDir string + DestDir string + cfg *Configuration +} + +type PullOpt func(*Pull) + +func WithConfig(cfg *Configuration) PullOpt { + return func(p *Pull) { + p.cfg = cfg + } +} + +// NewPull creates a new Pull object. +func NewPull() *Pull { + return NewPullWithOpts() +} + +// NewPullWithOpts creates a new pull, with configuration options. +func NewPullWithOpts(opts ...PullOpt) *Pull { + p := &Pull{} + for _, fn := range opts { + fn(p) + } + + return p +} + +// SetRegistryClient sets the registry client on the pull configuration object. +func (p *Pull) SetRegistryClient(client *registry.Client) { + p.cfg.RegistryClient = client +} + +// Run executes 'helm pull' against the given release. +func (p *Pull) Run(chartRef string) (string, error) { + var out strings.Builder + + c := downloader.ChartDownloader{ + Out: &out, + Keyring: p.Keyring, + Verify: downloader.VerifyNever, + Getters: getter.All(p.Settings), + Options: []getter.Option{ + getter.WithBasicAuth(p.Username, p.Password), + getter.WithPassCredentialsAll(p.PassCredentialsAll), + getter.WithTLSClientConfig(p.CertFile, p.KeyFile, p.CaFile), + getter.WithInsecureSkipVerifyTLS(p.InsecureSkipTLSverify), + getter.WithPlainHTTP(p.PlainHTTP), + }, + RegistryClient: p.cfg.RegistryClient, + RepositoryConfig: p.Settings.RepositoryConfig, + RepositoryCache: p.Settings.RepositoryCache, + } + + if registry.IsOCI(chartRef) { + c.Options = append(c.Options, + getter.WithRegistryClient(p.cfg.RegistryClient)) + c.RegistryClient = p.cfg.RegistryClient + } + + if p.Verify { + c.Verify = downloader.VerifyAlways + } else if p.VerifyLater { + c.Verify = downloader.VerifyLater + } + + // If untar is set, we fetch to a tempdir, then untar and copy after + // verification. + dest := p.DestDir + if p.Untar { + var err error + dest, err = os.MkdirTemp("", "helm-") + if err != nil { + return out.String(), errors.Wrap(err, "failed to untar") + } + defer os.RemoveAll(dest) + } + + if p.RepoURL != "" { + chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(p.RepoURL, p.Username, p.Password, chartRef, p.Version, p.CertFile, p.KeyFile, p.CaFile, p.InsecureSkipTLSverify, p.PassCredentialsAll, getter.All(p.Settings)) + if err != nil { + return out.String(), err + } + chartRef = chartURL + } + + saved, v, err := c.DownloadTo(chartRef, p.Version, dest) + if err != nil { + return out.String(), err + } + + if p.Verify { + for name := range v.SignedBy.Identities { + fmt.Fprintf(&out, "Signed by: %v\n", name) + } + fmt.Fprintf(&out, "Using Key With Fingerprint: %X\n", v.SignedBy.PrimaryKey.Fingerprint) + fmt.Fprintf(&out, "Chart Hash Verified: %s\n", v.FileHash) + } + + // After verification, untar the chart into the requested directory. + if p.Untar { + ud := p.UntarDir + if !filepath.IsAbs(ud) { + ud = filepath.Join(p.DestDir, ud) + } + // Let udCheck to check conflict file/dir without replacing ud when untarDir is the current directory(.). + udCheck := ud + if udCheck == "." { + _, udCheck = filepath.Split(chartRef) + } else { + _, chartName := filepath.Split(chartRef) + udCheck = filepath.Join(udCheck, chartName) + } + + if _, err := os.Stat(udCheck); err != nil { + if err := os.MkdirAll(udCheck, 0755); err != nil { + return out.String(), errors.Wrap(err, "failed to untar (mkdir)") + } + + } else { + return out.String(), errors.Errorf("failed to untar: a file or directory with the name %s already exists", udCheck) + } + + return out.String(), chartutil.ExpandFile(ud, saved) + } + return out.String(), nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/push.go b/vendor/helm.sh/helm/v3/pkg/action/push.go new file mode 100644 index 000000000..68d2ba42d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/push.go @@ -0,0 +1,112 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "io" + "strings" + + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/pusher" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/uploader" +) + +// Push is the action for uploading a chart. +// +// It provides the implementation of 'helm push'. +type Push struct { + Settings *cli.EnvSettings + cfg *Configuration + certFile string + keyFile string + caFile string + insecureSkipTLSverify bool + plainHTTP bool + out io.Writer +} + +// PushOpt is a type of function that sets options for a push action. +type PushOpt func(*Push) + +// WithPushConfig sets the cfg field on the push configuration object. +func WithPushConfig(cfg *Configuration) PushOpt { + return func(p *Push) { + p.cfg = cfg + } +} + +// WithTLSClientConfig sets the certFile, keyFile, and caFile fields on the push configuration object. +func WithTLSClientConfig(certFile, keyFile, caFile string) PushOpt { + return func(p *Push) { + p.certFile = certFile + p.keyFile = keyFile + p.caFile = caFile + } +} + +// WithInsecureSkipTLSVerify determines if a TLS Certificate will be checked +func WithInsecureSkipTLSVerify(insecureSkipTLSVerify bool) PushOpt { + return func(p *Push) { + p.insecureSkipTLSverify = insecureSkipTLSVerify + } +} + +// WithPlainHTTP configures the use of plain HTTP connections. +func WithPlainHTTP(plainHTTP bool) PushOpt { + return func(p *Push) { + p.plainHTTP = plainHTTP + } +} + +// WithOptWriter sets the registryOut field on the push configuration object. +func WithPushOptWriter(out io.Writer) PushOpt { + return func(p *Push) { + p.out = out + } +} + +// NewPushWithOpts creates a new push, with configuration options. +func NewPushWithOpts(opts ...PushOpt) *Push { + p := &Push{} + for _, fn := range opts { + fn(p) + } + return p +} + +// Run executes 'helm push' against the given chart archive. +func (p *Push) Run(chartRef string, remote string) (string, error) { + var out strings.Builder + + c := uploader.ChartUploader{ + Out: &out, + Pushers: pusher.All(p.Settings), + Options: []pusher.Option{ + pusher.WithTLSClientConfig(p.certFile, p.keyFile, p.caFile), + pusher.WithInsecureSkipTLSVerify(p.insecureSkipTLSverify), + pusher.WithPlainHTTP(p.plainHTTP), + }, + } + + if registry.IsOCI(remote) { + // Don't use the default registry client if tls options are set. + c.Options = append(c.Options, pusher.WithRegistryClient(p.cfg.RegistryClient)) + } + + return out.String(), c.UploadTo(chartRef, remote) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/registry_login.go b/vendor/helm.sh/helm/v3/pkg/action/registry_login.go new file mode 100644 index 000000000..cd144e1e7 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/registry_login.go @@ -0,0 +1,88 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "io" + + "helm.sh/helm/v3/pkg/registry" +) + +// RegistryLogin performs a registry login operation. +type RegistryLogin struct { + cfg *Configuration + certFile string + keyFile string + caFile string + insecure bool +} + +type RegistryLoginOpt func(*RegistryLogin) error + +// WithCertFile specifies the path to the certificate file to use for TLS. +func WithCertFile(certFile string) RegistryLoginOpt { + return func(r *RegistryLogin) error { + r.certFile = certFile + return nil + } +} + +// WithKeyFile specifies whether to very certificates when communicating. +func WithInsecure(insecure bool) RegistryLoginOpt { + return func(r *RegistryLogin) error { + r.insecure = insecure + return nil + } +} + +// WithKeyFile specifies the path to the key file to use for TLS. +func WithKeyFile(keyFile string) RegistryLoginOpt { + return func(r *RegistryLogin) error { + r.keyFile = keyFile + return nil + } +} + +// WithCAFile specifies the path to the CA file to use for TLS. +func WithCAFile(caFile string) RegistryLoginOpt { + return func(r *RegistryLogin) error { + r.caFile = caFile + return nil + } +} + +// NewRegistryLogin creates a new RegistryLogin object with the given configuration. +func NewRegistryLogin(cfg *Configuration) *RegistryLogin { + return &RegistryLogin{ + cfg: cfg, + } +} + +// Run executes the registry login operation +func (a *RegistryLogin) Run(_ io.Writer, hostname string, username string, password string, opts ...RegistryLoginOpt) error { + for _, opt := range opts { + if err := opt(a); err != nil { + return err + } + } + + return a.cfg.RegistryClient.Login( + hostname, + registry.LoginOptBasicAuth(username, password), + registry.LoginOptInsecure(a.insecure), + registry.LoginOptTLSClientConfig(a.certFile, a.keyFile, a.caFile)) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/registry_logout.go b/vendor/helm.sh/helm/v3/pkg/action/registry_logout.go new file mode 100644 index 000000000..7ce92defc --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/registry_logout.go @@ -0,0 +1,38 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "io" +) + +// RegistryLogout performs a registry login operation. +type RegistryLogout struct { + cfg *Configuration +} + +// NewRegistryLogout creates a new RegistryLogout object with the given configuration. +func NewRegistryLogout(cfg *Configuration) *RegistryLogout { + return &RegistryLogout{ + cfg: cfg, + } +} + +// Run executes the registry logout operation +func (a *RegistryLogout) Run(_ io.Writer, hostname string) error { + return a.cfg.RegistryClient.Logout(hostname) +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/release_testing.go b/vendor/helm.sh/helm/v3/pkg/action/release_testing.go new file mode 100644 index 000000000..aaffe47ca --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/release_testing.go @@ -0,0 +1,153 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "context" + "fmt" + "io" + "sort" + "time" + + "github.com/pkg/errors" + v1 "k8s.io/api/core/v1" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/release" +) + +const ( + ExcludeNameFilter = "!name" + IncludeNameFilter = "name" +) + +// ReleaseTesting is the action for testing a release. +// +// It provides the implementation of 'helm test'. +type ReleaseTesting struct { + cfg *Configuration + Timeout time.Duration + // Used for fetching logs from test pods + Namespace string + Filters map[string][]string + HideNotes bool +} + +// NewReleaseTesting creates a new ReleaseTesting object with the given configuration. +func NewReleaseTesting(cfg *Configuration) *ReleaseTesting { + return &ReleaseTesting{ + cfg: cfg, + Filters: map[string][]string{}, + } +} + +// Run executes 'helm test' against the given release. +func (r *ReleaseTesting) Run(name string) (*release.Release, error) { + if err := r.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + if err := chartutil.ValidateReleaseName(name); err != nil { + return nil, errors.Errorf("releaseTest: Release name is invalid: %s", name) + } + + // finds the non-deleted release with the given name + rel, err := r.cfg.Releases.Last(name) + if err != nil { + return rel, err + } + + skippedHooks := []*release.Hook{} + executingHooks := []*release.Hook{} + if len(r.Filters[ExcludeNameFilter]) != 0 { + for _, h := range rel.Hooks { + if contains(r.Filters[ExcludeNameFilter], h.Name) { + skippedHooks = append(skippedHooks, h) + } else { + executingHooks = append(executingHooks, h) + } + } + rel.Hooks = executingHooks + } + if len(r.Filters[IncludeNameFilter]) != 0 { + executingHooks = nil + for _, h := range rel.Hooks { + if contains(r.Filters[IncludeNameFilter], h.Name) { + executingHooks = append(executingHooks, h) + } else { + skippedHooks = append(skippedHooks, h) + } + } + rel.Hooks = executingHooks + } + + if err := r.cfg.execHook(rel, release.HookTest, r.Timeout); err != nil { + rel.Hooks = append(skippedHooks, rel.Hooks...) + r.cfg.Releases.Update(rel) + return rel, err + } + + rel.Hooks = append(skippedHooks, rel.Hooks...) + return rel, r.cfg.Releases.Update(rel) +} + +// GetPodLogs will write the logs for all test pods in the given release into +// the given writer. These can be immediately output to the user or captured for +// other uses +func (r *ReleaseTesting) GetPodLogs(out io.Writer, rel *release.Release) error { + client, err := r.cfg.KubernetesClientSet() + if err != nil { + return errors.Wrap(err, "unable to get kubernetes client to fetch pod logs") + } + + hooksByWight := append([]*release.Hook{}, rel.Hooks...) + sort.Stable(hookByWeight(hooksByWight)) + for _, h := range hooksByWight { + for _, e := range h.Events { + if e == release.HookTest { + if contains(r.Filters[ExcludeNameFilter], h.Name) { + continue + } + if len(r.Filters[IncludeNameFilter]) > 0 && !contains(r.Filters[IncludeNameFilter], h.Name) { + continue + } + req := client.CoreV1().Pods(r.Namespace).GetLogs(h.Name, &v1.PodLogOptions{}) + logReader, err := req.Stream(context.Background()) + if err != nil { + return errors.Wrapf(err, "unable to get pod logs for %s", h.Name) + } + + fmt.Fprintf(out, "POD LOGS: %s\n", h.Name) + _, err = io.Copy(out, logReader) + fmt.Fprintln(out) + if err != nil { + return errors.Wrapf(err, "unable to write pod logs for %s", h.Name) + } + } + } + } + return nil +} + +func contains(arr []string, value string) bool { + for _, item := range arr { + if item == value { + return true + } + } + return false +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/resource_policy.go b/vendor/helm.sh/helm/v3/pkg/action/resource_policy.go new file mode 100644 index 000000000..63e83f3d9 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/resource_policy.go @@ -0,0 +1,46 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "strings" + + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/releaseutil" +) + +func filterManifestsToKeep(manifests []releaseutil.Manifest) (keep, remaining []releaseutil.Manifest) { + for _, m := range manifests { + if m.Head.Metadata == nil || m.Head.Metadata.Annotations == nil || len(m.Head.Metadata.Annotations) == 0 { + remaining = append(remaining, m) + continue + } + + resourcePolicyType, ok := m.Head.Metadata.Annotations[kube.ResourcePolicyAnno] + if !ok { + remaining = append(remaining, m) + continue + } + + resourcePolicyType = strings.ToLower(strings.TrimSpace(resourcePolicyType)) + if resourcePolicyType == kube.KeepPolicy { + keep = append(keep, m) + } + + } + return keep, remaining +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/rollback.go b/vendor/helm.sh/helm/v3/pkg/action/rollback.go new file mode 100644 index 000000000..b0be17d13 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/rollback.go @@ -0,0 +1,265 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "fmt" + "strings" + "time" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/release" + helmtime "helm.sh/helm/v3/pkg/time" +) + +// Rollback is the action for rolling back to a given release. +// +// It provides the implementation of 'helm rollback'. +type Rollback struct { + cfg *Configuration + + Version int + Timeout time.Duration + Wait bool + WaitForJobs bool + DisableHooks bool + DryRun bool + Recreate bool // will (if true) recreate pods after a rollback. + Force bool // will (if true) force resource upgrade through uninstall/recreate if needed + CleanupOnFail bool + MaxHistory int // MaxHistory limits the maximum number of revisions saved per release +} + +// NewRollback creates a new Rollback object with the given configuration. +func NewRollback(cfg *Configuration) *Rollback { + return &Rollback{ + cfg: cfg, + } +} + +// Run executes 'helm rollback' against the given release. +func (r *Rollback) Run(name string) error { + if err := r.cfg.KubeClient.IsReachable(); err != nil { + return err + } + + r.cfg.Releases.MaxHistory = r.MaxHistory + + r.cfg.Log("preparing rollback of %s", name) + currentRelease, targetRelease, err := r.prepareRollback(name) + if err != nil { + return err + } + + if !r.DryRun { + r.cfg.Log("creating rolled back release for %s", name) + if err := r.cfg.Releases.Create(targetRelease); err != nil { + return err + } + } + + r.cfg.Log("performing rollback of %s", name) + if _, err := r.performRollback(currentRelease, targetRelease); err != nil { + return err + } + + if !r.DryRun { + r.cfg.Log("updating status for rolled back release for %s", name) + if err := r.cfg.Releases.Update(targetRelease); err != nil { + return err + } + } + return nil +} + +// prepareRollback finds the previous release and prepares a new release object with +// the previous release's configuration +func (r *Rollback) prepareRollback(name string) (*release.Release, *release.Release, error) { + if err := chartutil.ValidateReleaseName(name); err != nil { + return nil, nil, errors.Errorf("prepareRollback: Release name is invalid: %s", name) + } + + if r.Version < 0 { + return nil, nil, errInvalidRevision + } + + currentRelease, err := r.cfg.Releases.Last(name) + if err != nil { + return nil, nil, err + } + + previousVersion := r.Version + if r.Version == 0 { + previousVersion = currentRelease.Version - 1 + } + + historyReleases, err := r.cfg.Releases.History(name) + if err != nil { + return nil, nil, err + } + + // Check if the history version to be rolled back exists + previousVersionExist := false + for _, historyRelease := range historyReleases { + version := historyRelease.Version + if previousVersion == version { + previousVersionExist = true + break + } + } + if !previousVersionExist { + return nil, nil, errors.Errorf("release has no %d version", previousVersion) + } + + r.cfg.Log("rolling back %s (current: v%d, target: v%d)", name, currentRelease.Version, previousVersion) + + previousRelease, err := r.cfg.Releases.Get(name, previousVersion) + if err != nil { + return nil, nil, err + } + + // Store a new release object with previous release's configuration + targetRelease := &release.Release{ + Name: name, + Namespace: currentRelease.Namespace, + Chart: previousRelease.Chart, + Config: previousRelease.Config, + Info: &release.Info{ + FirstDeployed: currentRelease.Info.FirstDeployed, + LastDeployed: helmtime.Now(), + Status: release.StatusPendingRollback, + Notes: previousRelease.Info.Notes, + // Because we lose the reference to previous version elsewhere, we set the + // message here, and only override it later if we experience failure. + Description: fmt.Sprintf("Rollback to %d", previousVersion), + }, + Version: currentRelease.Version + 1, + Labels: previousRelease.Labels, + Manifest: previousRelease.Manifest, + Hooks: previousRelease.Hooks, + } + + return currentRelease, targetRelease, nil +} + +func (r *Rollback) performRollback(currentRelease, targetRelease *release.Release) (*release.Release, error) { + if r.DryRun { + r.cfg.Log("dry run for %s", targetRelease.Name) + return targetRelease, nil + } + + current, err := r.cfg.KubeClient.Build(bytes.NewBufferString(currentRelease.Manifest), false) + if err != nil { + return targetRelease, errors.Wrap(err, "unable to build kubernetes objects from current release manifest") + } + target, err := r.cfg.KubeClient.Build(bytes.NewBufferString(targetRelease.Manifest), false) + if err != nil { + return targetRelease, errors.Wrap(err, "unable to build kubernetes objects from new release manifest") + } + + // pre-rollback hooks + if !r.DisableHooks { + if err := r.cfg.execHook(targetRelease, release.HookPreRollback, r.Timeout); err != nil { + return targetRelease, err + } + } else { + r.cfg.Log("rollback hooks disabled for %s", targetRelease.Name) + } + + // It is safe to use "force" here because these are resources currently rendered by the chart. + err = target.Visit(setMetadataVisitor(targetRelease.Name, targetRelease.Namespace, true)) + if err != nil { + return targetRelease, errors.Wrap(err, "unable to set metadata visitor from target release") + } + results, err := r.cfg.KubeClient.Update(current, target, r.Force) + + if err != nil { + msg := fmt.Sprintf("Rollback %q failed: %s", targetRelease.Name, err) + r.cfg.Log("warning: %s", msg) + currentRelease.Info.Status = release.StatusSuperseded + targetRelease.Info.Status = release.StatusFailed + targetRelease.Info.Description = msg + r.cfg.recordRelease(currentRelease) + r.cfg.recordRelease(targetRelease) + if r.CleanupOnFail { + r.cfg.Log("Cleanup on fail set, cleaning up %d resources", len(results.Created)) + _, errs := r.cfg.KubeClient.Delete(results.Created) + if errs != nil { + var errorList []string + for _, e := range errs { + errorList = append(errorList, e.Error()) + } + return targetRelease, errors.Wrapf(fmt.Errorf("unable to cleanup resources: %s", strings.Join(errorList, ", ")), "an error occurred while cleaning up resources. original rollback error: %s", err) + } + r.cfg.Log("Resource cleanup complete") + } + return targetRelease, err + } + + if r.Recreate { + // NOTE: Because this is not critical for a release to succeed, we just + // log if an error occurs and continue onward. If we ever introduce log + // levels, we should make these error level logs so users are notified + // that they'll need to go do the cleanup on their own + if err := recreate(r.cfg, results.Updated); err != nil { + r.cfg.Log(err.Error()) + } + } + + if r.Wait { + if r.WaitForJobs { + if err := r.cfg.KubeClient.WaitWithJobs(target, r.Timeout); err != nil { + targetRelease.SetStatus(release.StatusFailed, fmt.Sprintf("Release %q failed: %s", targetRelease.Name, err.Error())) + r.cfg.recordRelease(currentRelease) + r.cfg.recordRelease(targetRelease) + return targetRelease, errors.Wrapf(err, "release %s failed", targetRelease.Name) + } + } else { + if err := r.cfg.KubeClient.Wait(target, r.Timeout); err != nil { + targetRelease.SetStatus(release.StatusFailed, fmt.Sprintf("Release %q failed: %s", targetRelease.Name, err.Error())) + r.cfg.recordRelease(currentRelease) + r.cfg.recordRelease(targetRelease) + return targetRelease, errors.Wrapf(err, "release %s failed", targetRelease.Name) + } + } + } + + // post-rollback hooks + if !r.DisableHooks { + if err := r.cfg.execHook(targetRelease, release.HookPostRollback, r.Timeout); err != nil { + return targetRelease, err + } + } + + deployed, err := r.cfg.Releases.DeployedAll(currentRelease.Name) + if err != nil && !strings.Contains(err.Error(), "has no deployed releases") { + return nil, err + } + // Supersede all previous deployments, see issue #2941. + for _, rel := range deployed { + r.cfg.Log("superseding previous deployment %d", rel.Version) + rel.Info.Status = release.StatusSuperseded + r.cfg.recordRelease(rel) + } + + targetRelease.Info.Status = release.StatusDeployed + + return targetRelease, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/show.go b/vendor/helm.sh/helm/v3/pkg/action/show.go new file mode 100644 index 000000000..6ed855b83 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/show.go @@ -0,0 +1,165 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "fmt" + "strings" + + "github.com/pkg/errors" + "k8s.io/cli-runtime/pkg/printers" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/registry" +) + +// ShowOutputFormat is the format of the output of `helm show` +type ShowOutputFormat string + +const ( + // ShowAll is the format which shows all the information of a chart + ShowAll ShowOutputFormat = "all" + // ShowChart is the format which only shows the chart's definition + ShowChart ShowOutputFormat = "chart" + // ShowValues is the format which only shows the chart's values + ShowValues ShowOutputFormat = "values" + // ShowReadme is the format which only shows the chart's README + ShowReadme ShowOutputFormat = "readme" + // ShowCRDs is the format which only shows the chart's CRDs + ShowCRDs ShowOutputFormat = "crds" +) + +var readmeFileNames = []string{"readme.md", "readme.txt", "readme"} + +func (o ShowOutputFormat) String() string { + return string(o) +} + +// Show is the action for checking a given release's information. +// +// It provides the implementation of 'helm show' and its respective subcommands. +type Show struct { + ChartPathOptions + Devel bool + OutputFormat ShowOutputFormat + JSONPathTemplate string + chart *chart.Chart // for testing +} + +// NewShow creates a new Show object with the given configuration. +// Deprecated: Use NewShowWithConfig +// TODO Helm 4: Fold NewShowWithConfig back into NewShow +func NewShow(output ShowOutputFormat) *Show { + return &Show{ + OutputFormat: output, + } +} + +// NewShowWithConfig creates a new Show object with the given configuration. +func NewShowWithConfig(output ShowOutputFormat, cfg *Configuration) *Show { + sh := &Show{ + OutputFormat: output, + } + sh.ChartPathOptions.registryClient = cfg.RegistryClient + + return sh +} + +// SetRegistryClient sets the registry client to use when pulling a chart from a registry. +func (s *Show) SetRegistryClient(client *registry.Client) { + s.ChartPathOptions.registryClient = client +} + +// Run executes 'helm show' against the given release. +func (s *Show) Run(chartpath string) (string, error) { + if s.chart == nil { + chrt, err := loader.Load(chartpath) + if err != nil { + return "", err + } + s.chart = chrt + } + cf, err := yaml.Marshal(s.chart.Metadata) + if err != nil { + return "", err + } + + var out strings.Builder + if s.OutputFormat == ShowChart || s.OutputFormat == ShowAll { + fmt.Fprintf(&out, "%s\n", cf) + } + + if (s.OutputFormat == ShowValues || s.OutputFormat == ShowAll) && s.chart.Values != nil { + if s.OutputFormat == ShowAll { + fmt.Fprintln(&out, "---") + } + if s.JSONPathTemplate != "" { + printer, err := printers.NewJSONPathPrinter(s.JSONPathTemplate) + if err != nil { + return "", errors.Wrapf(err, "error parsing jsonpath %s", s.JSONPathTemplate) + } + printer.Execute(&out, s.chart.Values) + } else { + for _, f := range s.chart.Raw { + if f.Name == chartutil.ValuesfileName { + fmt.Fprintln(&out, string(f.Data)) + } + } + } + } + + if s.OutputFormat == ShowReadme || s.OutputFormat == ShowAll { + readme := findReadme(s.chart.Files) + if readme != nil { + if s.OutputFormat == ShowAll { + fmt.Fprintln(&out, "---") + } + fmt.Fprintf(&out, "%s\n", readme.Data) + } + } + + if s.OutputFormat == ShowCRDs || s.OutputFormat == ShowAll { + crds := s.chart.CRDObjects() + if len(crds) > 0 { + if s.OutputFormat == ShowAll && !bytes.HasPrefix(crds[0].File.Data, []byte("---")) { + fmt.Fprintln(&out, "---") + } + for _, crd := range crds { + fmt.Fprintf(&out, "%s\n", string(crd.File.Data)) + } + } + } + return out.String(), nil +} + +func findReadme(files []*chart.File) (file *chart.File) { + for _, file := range files { + for _, n := range readmeFileNames { + if file == nil { + continue + } + if strings.EqualFold(file.Name, n) { + return file + } + } + } + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/status.go b/vendor/helm.sh/helm/v3/pkg/action/status.go new file mode 100644 index 000000000..ee1c9d613 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/status.go @@ -0,0 +1,95 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "errors" + + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/release" +) + +// Status is the action for checking the deployment status of releases. +// +// It provides the implementation of 'helm status'. +type Status struct { + cfg *Configuration + + Version int + + // If true, display description to output format, + // only affect print type table. + // TODO Helm 4: Remove this flag and output the description by default. + ShowDescription bool + + // ShowResources sets if the resources should be retrieved with the status. + // TODO Helm 4: Remove this flag and output the resources by default. + ShowResources bool + + // ShowResourcesTable is used with ShowResources. When true this will cause + // the resulting objects to be retrieved as a kind=table. + ShowResourcesTable bool +} + +// NewStatus creates a new Status object with the given configuration. +func NewStatus(cfg *Configuration) *Status { + return &Status{ + cfg: cfg, + } +} + +// Run executes 'helm status' against the given release. +func (s *Status) Run(name string) (*release.Release, error) { + if err := s.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + if !s.ShowResources { + return s.cfg.releaseContent(name, s.Version) + } + + rel, err := s.cfg.releaseContent(name, s.Version) + if err != nil { + return nil, err + } + + if kubeClient, ok := s.cfg.KubeClient.(kube.InterfaceResources); ok { + var resources kube.ResourceList + if s.ShowResourcesTable { + resources, err = kubeClient.BuildTable(bytes.NewBufferString(rel.Manifest), false) + if err != nil { + return nil, err + } + } else { + resources, err = s.cfg.KubeClient.Build(bytes.NewBufferString(rel.Manifest), false) + if err != nil { + return nil, err + } + } + + resp, err := kubeClient.Get(resources, true) + if err != nil { + return nil, err + } + + rel.Info.Resources = resp + + return rel, nil + } + return nil, errors.New("unable to get kubeClient with interface InterfaceResources") +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/uninstall.go b/vendor/helm.sh/helm/v3/pkg/action/uninstall.go new file mode 100644 index 000000000..ac0c4fee8 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/uninstall.go @@ -0,0 +1,247 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "strings" + "time" + + "github.com/pkg/errors" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/releaseutil" + helmtime "helm.sh/helm/v3/pkg/time" +) + +// Uninstall is the action for uninstalling releases. +// +// It provides the implementation of 'helm uninstall'. +type Uninstall struct { + cfg *Configuration + + DisableHooks bool + DryRun bool + IgnoreNotFound bool + KeepHistory bool + Wait bool + DeletionPropagation string + Timeout time.Duration + Description string +} + +// NewUninstall creates a new Uninstall object with the given configuration. +func NewUninstall(cfg *Configuration) *Uninstall { + return &Uninstall{ + cfg: cfg, + } +} + +// Run uninstalls the given release. +func (u *Uninstall) Run(name string) (*release.UninstallReleaseResponse, error) { + if err := u.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + if u.DryRun { + // In the dry run case, just see if the release exists + r, err := u.cfg.releaseContent(name, 0) + if err != nil { + return &release.UninstallReleaseResponse{}, err + } + return &release.UninstallReleaseResponse{Release: r}, nil + } + + if err := chartutil.ValidateReleaseName(name); err != nil { + return nil, errors.Errorf("uninstall: Release name is invalid: %s", name) + } + + rels, err := u.cfg.Releases.History(name) + if err != nil { + if u.IgnoreNotFound { + return nil, nil + } + return nil, errors.Wrapf(err, "uninstall: Release not loaded: %s", name) + } + if len(rels) < 1 { + return nil, errMissingRelease + } + + releaseutil.SortByRevision(rels) + rel := rels[len(rels)-1] + + // TODO: Are there any cases where we want to force a delete even if it's + // already marked deleted? + if rel.Info.Status == release.StatusUninstalled { + if !u.KeepHistory { + if err := u.purgeReleases(rels...); err != nil { + return nil, errors.Wrap(err, "uninstall: Failed to purge the release") + } + return &release.UninstallReleaseResponse{Release: rel}, nil + } + return nil, errors.Errorf("the release named %q is already deleted", name) + } + + u.cfg.Log("uninstall: Deleting %s", name) + rel.Info.Status = release.StatusUninstalling + rel.Info.Deleted = helmtime.Now() + rel.Info.Description = "Deletion in progress (or silently failed)" + res := &release.UninstallReleaseResponse{Release: rel} + + if !u.DisableHooks { + if err := u.cfg.execHook(rel, release.HookPreDelete, u.Timeout); err != nil { + return res, err + } + } else { + u.cfg.Log("delete hooks disabled for %s", name) + } + + // From here on out, the release is currently considered to be in StatusUninstalling + // state. + if err := u.cfg.Releases.Update(rel); err != nil { + u.cfg.Log("uninstall: Failed to store updated release: %s", err) + } + + deletedResources, kept, errs := u.deleteRelease(rel) + if errs != nil { + u.cfg.Log("uninstall: Failed to delete release: %s", errs) + return nil, errors.Errorf("failed to delete release: %s", name) + } + + if kept != "" { + kept = "These resources were kept due to the resource policy:\n" + kept + } + res.Info = kept + + if u.Wait { + if kubeClient, ok := u.cfg.KubeClient.(kube.InterfaceExt); ok { + if err := kubeClient.WaitForDelete(deletedResources, u.Timeout); err != nil { + errs = append(errs, err) + } + } + } + + if !u.DisableHooks { + if err := u.cfg.execHook(rel, release.HookPostDelete, u.Timeout); err != nil { + errs = append(errs, err) + } + } + + rel.Info.Status = release.StatusUninstalled + if len(u.Description) > 0 { + rel.Info.Description = u.Description + } else { + rel.Info.Description = "Uninstallation complete" + } + + if !u.KeepHistory { + u.cfg.Log("purge requested for %s", name) + err := u.purgeReleases(rels...) + if err != nil { + errs = append(errs, errors.Wrap(err, "uninstall: Failed to purge the release")) + } + + // Return the errors that occurred while deleting the release, if any + if len(errs) > 0 { + return res, errors.Errorf("uninstallation completed with %d error(s): %s", len(errs), joinErrors(errs)) + } + + return res, nil + } + + if err := u.cfg.Releases.Update(rel); err != nil { + u.cfg.Log("uninstall: Failed to store updated release: %s", err) + } + + if len(errs) > 0 { + return res, errors.Errorf("uninstallation completed with %d error(s): %s", len(errs), joinErrors(errs)) + } + return res, nil +} + +func (u *Uninstall) purgeReleases(rels ...*release.Release) error { + for _, rel := range rels { + if _, err := u.cfg.Releases.Delete(rel.Name, rel.Version); err != nil { + return err + } + } + return nil +} + +func joinErrors(errs []error) string { + es := make([]string, 0, len(errs)) + for _, e := range errs { + es = append(es, e.Error()) + } + return strings.Join(es, "; ") +} + +// deleteRelease deletes the release and returns list of delete resources and manifests that were kept in the deletion process +func (u *Uninstall) deleteRelease(rel *release.Release) (kube.ResourceList, string, []error) { + var errs []error + + manifests := releaseutil.SplitManifests(rel.Manifest) + _, files, err := releaseutil.SortManifests(manifests, nil, releaseutil.UninstallOrder) + if err != nil { + // We could instead just delete everything in no particular order. + // FIXME: One way to delete at this point would be to try a label-based + // deletion. The problem with this is that we could get a false positive + // and delete something that was not legitimately part of this release. + return nil, rel.Manifest, []error{errors.Wrap(err, "corrupted release record. You must manually delete the resources")} + } + + filesToKeep, filesToDelete := filterManifestsToKeep(files) + var kept string + for _, f := range filesToKeep { + kept += "[" + f.Head.Kind + "] " + f.Head.Metadata.Name + "\n" + } + + var builder strings.Builder + for _, file := range filesToDelete { + builder.WriteString("\n---\n" + file.Content) + } + + resources, err := u.cfg.KubeClient.Build(strings.NewReader(builder.String()), false) + if err != nil { + return nil, "", []error{errors.Wrap(err, "unable to build kubernetes objects for delete")} + } + if len(resources) > 0 { + if kubeClient, ok := u.cfg.KubeClient.(kube.InterfaceDeletionPropagation); ok { + _, errs = kubeClient.DeleteWithPropagationPolicy(resources, parseCascadingFlag(u.cfg, u.DeletionPropagation)) + return resources, kept, errs + } + _, errs = u.cfg.KubeClient.Delete(resources) + } + return resources, kept, errs +} + +func parseCascadingFlag(cfg *Configuration, cascadingFlag string) v1.DeletionPropagation { + switch cascadingFlag { + case "orphan": + return v1.DeletePropagationOrphan + case "foreground": + return v1.DeletePropagationForeground + case "background": + return v1.DeletePropagationBackground + default: + cfg.Log("uninstall: given cascade value: %s, defaulting to delete propagation background", cascadingFlag) + return v1.DeletePropagationBackground + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/upgrade.go b/vendor/helm.sh/helm/v3/pkg/action/upgrade.go new file mode 100644 index 000000000..a08d68495 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/upgrade.go @@ -0,0 +1,646 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "context" + "fmt" + "strings" + "sync" + "time" + + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/cli-runtime/pkg/resource" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/postrender" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/releaseutil" + "helm.sh/helm/v3/pkg/storage/driver" +) + +// Upgrade is the action for upgrading releases. +// +// It provides the implementation of 'helm upgrade'. +type Upgrade struct { + cfg *Configuration + + ChartPathOptions + + // Install is a purely informative flag that indicates whether this upgrade was done in "install" mode. + // + // Applications may use this to determine whether this Upgrade operation was done as part of a + // pure upgrade (Upgrade.Install == false) or as part of an install-or-upgrade operation + // (Upgrade.Install == true). + // + // Setting this to `true` will NOT cause `Upgrade` to perform an install if the release does not exist. + // That process must be handled by creating an Install action directly. See cmd/upgrade.go for an + // example of how this flag is used. + Install bool + // Devel indicates that the operation is done in devel mode. + Devel bool + // Namespace is the namespace in which this operation should be performed. + Namespace string + // SkipCRDs skips installing CRDs when install flag is enabled during upgrade + SkipCRDs bool + // Timeout is the timeout for this operation + Timeout time.Duration + // Wait determines whether the wait operation should be performed after the upgrade is requested. + Wait bool + // WaitForJobs determines whether the wait operation for the Jobs should be performed after the upgrade is requested. + WaitForJobs bool + // DisableHooks disables hook processing if set to true. + DisableHooks bool + // DryRun controls whether the operation is prepared, but not executed. + DryRun bool + // DryRunOption controls whether the operation is prepared, but not executed with options on whether or not to interact with the remote cluster. + DryRunOption string + // HideSecret can be set to true when DryRun is enabled in order to hide + // Kubernetes Secrets in the output. It cannot be used outside of DryRun. + HideSecret bool + // Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway. + // + // This should be used with caution. + Force bool + // ResetValues will reset the values to the chart's built-ins rather than merging with existing. + ResetValues bool + // ReuseValues will re-use the user's last supplied values. + ReuseValues bool + // ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values. + ResetThenReuseValues bool + // Recreate will (if true) recreate pods after a rollback. + Recreate bool + // MaxHistory limits the maximum number of revisions saved per release + MaxHistory int + // Atomic, if true, will roll back on failure. + Atomic bool + // CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update. + CleanupOnFail bool + // SubNotes determines whether sub-notes are rendered in the chart. + SubNotes bool + // HideNotes determines whether notes are output during upgrade + HideNotes bool + // SkipSchemaValidation determines if JSON schema validation is disabled. + SkipSchemaValidation bool + // Description is the description of this operation + Description string + Labels map[string]string + // PostRender is an optional post-renderer + // + // If this is non-nil, then after templates are rendered, they will be sent to the + // post renderer before sending to the Kubernetes API server. + PostRenderer postrender.PostRenderer + // DisableOpenAPIValidation controls whether OpenAPI validation is enforced. + DisableOpenAPIValidation bool + // Get missing dependencies + DependencyUpdate bool + // Lock to control raceconditions when the process receives a SIGTERM + Lock sync.Mutex + // Enable DNS lookups when rendering templates + EnableDNS bool + // TakeOwnership will skip the check for helm annotations and adopt all existing resources. + TakeOwnership bool +} + +type resultMessage struct { + r *release.Release + e error +} + +// NewUpgrade creates a new Upgrade object with the given configuration. +func NewUpgrade(cfg *Configuration) *Upgrade { + up := &Upgrade{ + cfg: cfg, + } + up.ChartPathOptions.registryClient = cfg.RegistryClient + + return up +} + +// SetRegistryClient sets the registry client to use when fetching charts. +func (u *Upgrade) SetRegistryClient(client *registry.Client) { + u.ChartPathOptions.registryClient = client +} + +// Run executes the upgrade on the given release. +func (u *Upgrade) Run(name string, chart *chart.Chart, vals map[string]interface{}) (*release.Release, error) { + ctx := context.Background() + return u.RunWithContext(ctx, name, chart, vals) +} + +// RunWithContext executes the upgrade on the given release with context. +func (u *Upgrade) RunWithContext(ctx context.Context, name string, chart *chart.Chart, vals map[string]interface{}) (*release.Release, error) { + if err := u.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + + // Make sure if Atomic is set, that wait is set as well. This makes it so + // the user doesn't have to specify both + u.Wait = u.Wait || u.Atomic + + if err := chartutil.ValidateReleaseName(name); err != nil { + return nil, errors.Errorf("release name is invalid: %s", name) + } + + u.cfg.Log("preparing upgrade for %s", name) + currentRelease, upgradedRelease, err := u.prepareUpgrade(name, chart, vals) + if err != nil { + return nil, err + } + + u.cfg.Releases.MaxHistory = u.MaxHistory + + u.cfg.Log("performing update for %s", name) + res, err := u.performUpgrade(ctx, currentRelease, upgradedRelease) + if err != nil { + return res, err + } + + // Do not update for dry runs + if !u.isDryRun() { + u.cfg.Log("updating status for upgraded release for %s", name) + if err := u.cfg.Releases.Update(upgradedRelease); err != nil { + return res, err + } + } + + return res, nil +} + +// isDryRun returns true if Upgrade is set to run as a DryRun +func (u *Upgrade) isDryRun() bool { + if u.DryRun || u.DryRunOption == "client" || u.DryRunOption == "server" || u.DryRunOption == "true" { + return true + } + return false +} + +// prepareUpgrade builds an upgraded release for an upgrade operation. +func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[string]interface{}) (*release.Release, *release.Release, error) { + if chart == nil { + return nil, nil, errMissingChart + } + + // HideSecret must be used with dry run. Otherwise, return an error. + if !u.isDryRun() && u.HideSecret { + return nil, nil, errors.New("Hiding Kubernetes secrets requires a dry-run mode") + } + + // finds the last non-deleted release with the given name + lastRelease, err := u.cfg.Releases.Last(name) + if err != nil { + // to keep existing behavior of returning the "%q has no deployed releases" error when an existing release does not exist + if errors.Is(err, driver.ErrReleaseNotFound) { + return nil, nil, driver.NewErrNoDeployedReleases(name) + } + return nil, nil, err + } + + // Concurrent `helm upgrade`s will either fail here with `errPending` or when creating the release with "already exists". This should act as a pessimistic lock. + if lastRelease.Info.Status.IsPending() { + return nil, nil, errPending + } + + var currentRelease *release.Release + if lastRelease.Info.Status == release.StatusDeployed { + // no need to retrieve the last deployed release from storage as the last release is deployed + currentRelease = lastRelease + } else { + // finds the deployed release with the given name + currentRelease, err = u.cfg.Releases.Deployed(name) + if err != nil { + if errors.Is(err, driver.ErrNoDeployedReleases) && + (lastRelease.Info.Status == release.StatusFailed || lastRelease.Info.Status == release.StatusSuperseded) { + currentRelease = lastRelease + } else { + return nil, nil, err + } + } + } + + // determine if values will be reused + vals, err = u.reuseValues(chart, currentRelease, vals) + if err != nil { + return nil, nil, err + } + + if err := chartutil.ProcessDependenciesWithMerge(chart, vals); err != nil { + return nil, nil, err + } + + // Increment revision count. This is passed to templates, and also stored on + // the release object. + revision := lastRelease.Version + 1 + + options := chartutil.ReleaseOptions{ + Name: name, + Namespace: currentRelease.Namespace, + Revision: revision, + IsUpgrade: true, + } + + caps, err := u.cfg.getCapabilities() + if err != nil { + return nil, nil, err + } + valuesToRender, err := chartutil.ToRenderValuesWithSchemaValidation(chart, vals, options, caps, u.SkipSchemaValidation) + if err != nil { + return nil, nil, err + } + + // Determine whether or not to interact with remote + var interactWithRemote bool + if !u.isDryRun() || u.DryRunOption == "server" || u.DryRunOption == "none" || u.DryRunOption == "false" { + interactWithRemote = true + } + + hooks, manifestDoc, notesTxt, err := u.cfg.renderResources(chart, valuesToRender, "", "", u.SubNotes, false, false, u.PostRenderer, interactWithRemote, u.EnableDNS, u.HideSecret) + if err != nil { + return nil, nil, err + } + + if driver.ContainsSystemLabels(u.Labels) { + return nil, nil, fmt.Errorf("user supplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels()) + } + + // Store an upgraded release. + upgradedRelease := &release.Release{ + Name: name, + Namespace: currentRelease.Namespace, + Chart: chart, + Config: vals, + Info: &release.Info{ + FirstDeployed: currentRelease.Info.FirstDeployed, + LastDeployed: Timestamper(), + Status: release.StatusPendingUpgrade, + Description: "Preparing upgrade", // This should be overwritten later. + }, + Version: revision, + Manifest: manifestDoc.String(), + Hooks: hooks, + Labels: mergeCustomLabels(lastRelease.Labels, u.Labels), + } + + if len(notesTxt) > 0 { + upgradedRelease.Info.Notes = notesTxt + } + err = validateManifest(u.cfg.KubeClient, manifestDoc.Bytes(), !u.DisableOpenAPIValidation) + return currentRelease, upgradedRelease, err +} + +func (u *Upgrade) performUpgrade(ctx context.Context, originalRelease, upgradedRelease *release.Release) (*release.Release, error) { + current, err := u.cfg.KubeClient.Build(bytes.NewBufferString(originalRelease.Manifest), false) + if err != nil { + // Checking for removed Kubernetes API error so can provide a more informative error message to the user + // Ref: https://github.com/helm/helm/issues/7219 + if strings.Contains(err.Error(), "unable to recognize \"\": no matches for kind") { + return upgradedRelease, errors.Wrap(err, "current release manifest contains removed kubernetes api(s) for this "+ + "kubernetes version and it is therefore unable to build the kubernetes "+ + "objects for performing the diff. error from kubernetes") + } + return upgradedRelease, errors.Wrap(err, "unable to build kubernetes objects from current release manifest") + } + target, err := u.cfg.KubeClient.Build(bytes.NewBufferString(upgradedRelease.Manifest), !u.DisableOpenAPIValidation) + if err != nil { + return upgradedRelease, errors.Wrap(err, "unable to build kubernetes objects from new release manifest") + } + + // It is safe to use force only on target because these are resources currently rendered by the chart. + err = target.Visit(setMetadataVisitor(upgradedRelease.Name, upgradedRelease.Namespace, true)) + if err != nil { + return upgradedRelease, err + } + + // Do a basic diff using gvk + name to figure out what new resources are being created so we can validate they don't already exist + existingResources := make(map[string]bool) + for _, r := range current { + existingResources[objectKey(r)] = true + } + + var toBeCreated kube.ResourceList + for _, r := range target { + if !existingResources[objectKey(r)] { + toBeCreated = append(toBeCreated, r) + } + } + + var toBeUpdated kube.ResourceList + if u.TakeOwnership { + toBeUpdated, err = requireAdoption(toBeCreated) + } else { + toBeUpdated, err = existingResourceConflict(toBeCreated, upgradedRelease.Name, upgradedRelease.Namespace) + } + if err != nil { + return nil, errors.Wrap(err, "Unable to continue with update") + } + + toBeUpdated.Visit(func(r *resource.Info, err error) error { + if err != nil { + return err + } + current.Append(r) + return nil + }) + + // Run if it is a dry run + if u.isDryRun() { + u.cfg.Log("dry run for %s", upgradedRelease.Name) + if len(u.Description) > 0 { + upgradedRelease.Info.Description = u.Description + } else { + upgradedRelease.Info.Description = "Dry run complete" + } + return upgradedRelease, nil + } + + u.cfg.Log("creating upgraded release for %s", upgradedRelease.Name) + if err := u.cfg.Releases.Create(upgradedRelease); err != nil { + return nil, err + } + rChan := make(chan resultMessage) + ctxChan := make(chan resultMessage) + doneChan := make(chan interface{}) + defer close(doneChan) + go u.releasingUpgrade(rChan, upgradedRelease, current, target, originalRelease) + go u.handleContext(ctx, doneChan, ctxChan, upgradedRelease) + select { + case result := <-rChan: + return result.r, result.e + case result := <-ctxChan: + return result.r, result.e + } +} + +// Function used to lock the Mutex, this is important for the case when the atomic flag is set. +// In that case the upgrade will finish before the rollback is finished so it is necessary to wait for the rollback to finish. +// The rollback will be trigger by the function failRelease +func (u *Upgrade) reportToPerformUpgrade(c chan<- resultMessage, rel *release.Release, created kube.ResourceList, err error) { + u.Lock.Lock() + if err != nil { + rel, err = u.failRelease(rel, created, err) + } + c <- resultMessage{r: rel, e: err} + u.Lock.Unlock() +} + +// Setup listener for SIGINT and SIGTERM +func (u *Upgrade) handleContext(ctx context.Context, done chan interface{}, c chan<- resultMessage, upgradedRelease *release.Release) { + select { + case <-ctx.Done(): + err := ctx.Err() + + // when the atomic flag is set the ongoing release finish first and doesn't give time for the rollback happens. + u.reportToPerformUpgrade(c, upgradedRelease, kube.ResourceList{}, err) + case <-done: + return + } +} +func (u *Upgrade) releasingUpgrade(c chan<- resultMessage, upgradedRelease *release.Release, current kube.ResourceList, target kube.ResourceList, originalRelease *release.Release) { + // pre-upgrade hooks + + if !u.DisableHooks { + if err := u.cfg.execHook(upgradedRelease, release.HookPreUpgrade, u.Timeout); err != nil { + u.reportToPerformUpgrade(c, upgradedRelease, kube.ResourceList{}, fmt.Errorf("pre-upgrade hooks failed: %s", err)) + return + } + } else { + u.cfg.Log("upgrade hooks disabled for %s", upgradedRelease.Name) + } + + results, err := u.cfg.KubeClient.Update(current, target, u.Force) + if err != nil { + u.cfg.recordRelease(originalRelease) + u.reportToPerformUpgrade(c, upgradedRelease, results.Created, err) + return + } + + if u.Recreate { + // NOTE: Because this is not critical for a release to succeed, we just + // log if an error occurs and continue onward. If we ever introduce log + // levels, we should make these error level logs so users are notified + // that they'll need to go do the cleanup on their own + if err := recreate(u.cfg, results.Updated); err != nil { + u.cfg.Log(err.Error()) + } + } + + if u.Wait { + u.cfg.Log( + "waiting for release %s resources (created: %d updated: %d deleted: %d)", + upgradedRelease.Name, len(results.Created), len(results.Updated), len(results.Deleted)) + if u.WaitForJobs { + if err := u.cfg.KubeClient.WaitWithJobs(target, u.Timeout); err != nil { + u.cfg.recordRelease(originalRelease) + u.reportToPerformUpgrade(c, upgradedRelease, results.Created, err) + return + } + } else { + if err := u.cfg.KubeClient.Wait(target, u.Timeout); err != nil { + u.cfg.recordRelease(originalRelease) + u.reportToPerformUpgrade(c, upgradedRelease, results.Created, err) + return + } + } + } + + // post-upgrade hooks + if !u.DisableHooks { + if err := u.cfg.execHook(upgradedRelease, release.HookPostUpgrade, u.Timeout); err != nil { + u.reportToPerformUpgrade(c, upgradedRelease, results.Created, fmt.Errorf("post-upgrade hooks failed: %s", err)) + return + } + } + + originalRelease.Info.Status = release.StatusSuperseded + u.cfg.recordRelease(originalRelease) + + upgradedRelease.Info.Status = release.StatusDeployed + if len(u.Description) > 0 { + upgradedRelease.Info.Description = u.Description + } else { + upgradedRelease.Info.Description = "Upgrade complete" + } + u.reportToPerformUpgrade(c, upgradedRelease, nil, nil) +} + +func (u *Upgrade) failRelease(rel *release.Release, created kube.ResourceList, err error) (*release.Release, error) { + msg := fmt.Sprintf("Upgrade %q failed: %s", rel.Name, err) + u.cfg.Log("warning: %s", msg) + + rel.Info.Status = release.StatusFailed + rel.Info.Description = msg + u.cfg.recordRelease(rel) + if u.CleanupOnFail && len(created) > 0 { + u.cfg.Log("Cleanup on fail set, cleaning up %d resources", len(created)) + _, errs := u.cfg.KubeClient.Delete(created) + if errs != nil { + var errorList []string + for _, e := range errs { + errorList = append(errorList, e.Error()) + } + return rel, errors.Wrapf(fmt.Errorf("unable to cleanup resources: %s", strings.Join(errorList, ", ")), "an error occurred while cleaning up resources. original upgrade error: %s", err) + } + u.cfg.Log("Resource cleanup complete") + } + if u.Atomic { + u.cfg.Log("Upgrade failed and atomic is set, rolling back to last successful release") + + // As a protection, get the last successful release before rollback. + // If there are no successful releases, bail out + hist := NewHistory(u.cfg) + fullHistory, herr := hist.Run(rel.Name) + if herr != nil { + return rel, errors.Wrapf(herr, "an error occurred while finding last successful release. original upgrade error: %s", err) + } + + // There isn't a way to tell if a previous release was successful, but + // generally failed releases do not get superseded unless the next + // release is successful, so this should be relatively safe + filteredHistory := releaseutil.FilterFunc(func(r *release.Release) bool { + return r.Info.Status == release.StatusSuperseded || r.Info.Status == release.StatusDeployed + }).Filter(fullHistory) + if len(filteredHistory) == 0 { + return rel, errors.Wrap(err, "unable to find a previously successful release when attempting to rollback. original upgrade error") + } + + releaseutil.Reverse(filteredHistory, releaseutil.SortByRevision) + + rollin := NewRollback(u.cfg) + rollin.Version = filteredHistory[0].Version + rollin.Wait = true + rollin.WaitForJobs = u.WaitForJobs + rollin.DisableHooks = u.DisableHooks + rollin.Recreate = u.Recreate + rollin.Force = u.Force + rollin.Timeout = u.Timeout + if rollErr := rollin.Run(rel.Name); rollErr != nil { + return rel, errors.Wrapf(rollErr, "an error occurred while rolling back the release. original upgrade error: %s", err) + } + return rel, errors.Wrapf(err, "release %s failed, and has been rolled back due to atomic being set", rel.Name) + } + + return rel, err +} + +// reuseValues copies values from the current release to a new release if the +// new release does not have any values. +// +// If the request already has values, or if there are no values in the current +// release, this does nothing. +// +// This is skipped if the u.ResetValues flag is set, in which case the +// request values are not altered. +func (u *Upgrade) reuseValues(chart *chart.Chart, current *release.Release, newVals map[string]interface{}) (map[string]interface{}, error) { + if u.ResetValues { + // If ResetValues is set, we completely ignore current.Config. + u.cfg.Log("resetting values to the chart's original version") + return newVals, nil + } + + // If the ReuseValues flag is set, we always copy the old values over the new config's values. + if u.ReuseValues { + u.cfg.Log("reusing the old release's values") + + // We have to regenerate the old coalesced values: + oldVals, err := chartutil.CoalesceValues(current.Chart, current.Config) + if err != nil { + return nil, errors.Wrap(err, "failed to rebuild old values") + } + + newVals = chartutil.CoalesceTables(newVals, current.Config) + + chart.Values = oldVals + + return newVals, nil + } + + // If the ResetThenReuseValues flag is set, we use the new chart's values, but we copy the old config's values over the new config's values. + if u.ResetThenReuseValues { + u.cfg.Log("merging values from old release to new values") + + newVals = chartutil.CoalesceTables(newVals, current.Config) + + return newVals, nil + } + + if len(newVals) == 0 && len(current.Config) > 0 { + u.cfg.Log("copying values from %s (v%d) to new release.", current.Name, current.Version) + newVals = current.Config + } + return newVals, nil +} + +func validateManifest(c kube.Interface, manifest []byte, openAPIValidation bool) error { + _, err := c.Build(bytes.NewReader(manifest), openAPIValidation) + return err +} + +// recreate captures all the logic for recreating pods for both upgrade and +// rollback. If we end up refactoring rollback to use upgrade, this can just be +// made an unexported method on the upgrade action. +func recreate(cfg *Configuration, resources kube.ResourceList) error { + for _, res := range resources { + versioned := kube.AsVersioned(res) + selector, err := kube.SelectorsForObject(versioned) + if err != nil { + // If no selector is returned, it means this object is + // definitely not a pod, so continue onward + continue + } + + client, err := cfg.KubernetesClientSet() + if err != nil { + return errors.Wrapf(err, "unable to recreate pods for object %s/%s because an error occurred", res.Namespace, res.Name) + } + + pods, err := client.CoreV1().Pods(res.Namespace).List(context.Background(), metav1.ListOptions{ + LabelSelector: selector.String(), + }) + if err != nil { + return errors.Wrapf(err, "unable to recreate pods for object %s/%s because an error occurred", res.Namespace, res.Name) + } + + // Restart pods + for _, pod := range pods.Items { + // Delete each pod for get them restarted with changed spec. + if err := client.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, *metav1.NewPreconditionDeleteOptions(string(pod.UID))); err != nil { + return errors.Wrapf(err, "unable to recreate pods for object %s/%s because an error occurred", res.Namespace, res.Name) + } + } + } + return nil +} + +func objectKey(r *resource.Info) string { + gvk := r.Object.GetObjectKind().GroupVersionKind() + return fmt.Sprintf("%s/%s/%s/%s", gvk.GroupVersion().String(), gvk.Kind, r.Namespace, r.Name) +} + +func mergeCustomLabels(current, desired map[string]string) map[string]string { + labels := mergeStrStrMaps(current, desired) + for k, v := range labels { + if v == "null" { + delete(labels, k) + } + } + return labels +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/validate.go b/vendor/helm.sh/helm/v3/pkg/action/validate.go new file mode 100644 index 000000000..127e9bf96 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/validate.go @@ -0,0 +1,209 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "fmt" + + "github.com/pkg/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/cli-runtime/pkg/resource" + + "helm.sh/helm/v3/pkg/kube" +) + +var accessor = meta.NewAccessor() + +const ( + appManagedByLabel = "app.kubernetes.io/managed-by" + appManagedByHelm = "Helm" + helmReleaseNameAnnotation = "meta.helm.sh/release-name" + helmReleaseNamespaceAnnotation = "meta.helm.sh/release-namespace" +) + +// requireAdoption returns the subset of resources that already exist in the cluster. +func requireAdoption(resources kube.ResourceList) (kube.ResourceList, error) { + var requireUpdate kube.ResourceList + + err := resources.Visit(func(info *resource.Info, err error) error { + if err != nil { + return err + } + + helper := resource.NewHelper(info.Client, info.Mapping) + _, err = helper.Get(info.Namespace, info.Name) + if err != nil { + if apierrors.IsNotFound(err) { + return nil + } + return errors.Wrapf(err, "could not get information about the resource %s", resourceString(info)) + } + + requireUpdate.Append(info) + return nil + }) + + return requireUpdate, err +} + +func existingResourceConflict(resources kube.ResourceList, releaseName, releaseNamespace string) (kube.ResourceList, error) { + var requireUpdate kube.ResourceList + + err := resources.Visit(func(info *resource.Info, err error) error { + if err != nil { + return err + } + + helper := resource.NewHelper(info.Client, info.Mapping) + existing, err := helper.Get(info.Namespace, info.Name) + if err != nil { + if apierrors.IsNotFound(err) { + return nil + } + return errors.Wrapf(err, "could not get information about the resource %s", resourceString(info)) + } + + // Allow adoption of the resource if it is managed by Helm and is annotated with correct release name and namespace. + if err := checkOwnership(existing, releaseName, releaseNamespace); err != nil { + return fmt.Errorf("%s exists and cannot be imported into the current release: %s", resourceString(info), err) + } + + requireUpdate.Append(info) + return nil + }) + + return requireUpdate, err +} + +func checkOwnership(obj runtime.Object, releaseName, releaseNamespace string) error { + lbls, err := accessor.Labels(obj) + if err != nil { + return err + } + annos, err := accessor.Annotations(obj) + if err != nil { + return err + } + + var errs []error + if err := requireValue(lbls, appManagedByLabel, appManagedByHelm); err != nil { + errs = append(errs, fmt.Errorf("label validation error: %s", err)) + } + if err := requireValue(annos, helmReleaseNameAnnotation, releaseName); err != nil { + errs = append(errs, fmt.Errorf("annotation validation error: %s", err)) + } + if err := requireValue(annos, helmReleaseNamespaceAnnotation, releaseNamespace); err != nil { + errs = append(errs, fmt.Errorf("annotation validation error: %s", err)) + } + + if len(errs) > 0 { + err := errors.New("invalid ownership metadata") + for _, e := range errs { + err = fmt.Errorf("%w; %s", err, e) + } + return err + } + + return nil +} + +func requireValue(meta map[string]string, k, v string) error { + actual, ok := meta[k] + if !ok { + return fmt.Errorf("missing key %q: must be set to %q", k, v) + } + if actual != v { + return fmt.Errorf("key %q must equal %q: current value is %q", k, v, actual) + } + return nil +} + +// setMetadataVisitor adds release tracking metadata to all resources. If force is enabled, existing +// ownership metadata will be overwritten. Otherwise an error will be returned if any resource has an +// existing and conflicting value for the managed by label or Helm release/namespace annotations. +func setMetadataVisitor(releaseName, releaseNamespace string, force bool) resource.VisitorFunc { + return func(info *resource.Info, err error) error { + if err != nil { + return err + } + + if !force { + if err := checkOwnership(info.Object, releaseName, releaseNamespace); err != nil { + return fmt.Errorf("%s cannot be owned: %s", resourceString(info), err) + } + } + + if err := mergeLabels(info.Object, map[string]string{ + appManagedByLabel: appManagedByHelm, + }); err != nil { + return fmt.Errorf( + "%s labels could not be updated: %s", + resourceString(info), err, + ) + } + + if err := mergeAnnotations(info.Object, map[string]string{ + helmReleaseNameAnnotation: releaseName, + helmReleaseNamespaceAnnotation: releaseNamespace, + }); err != nil { + return fmt.Errorf( + "%s annotations could not be updated: %s", + resourceString(info), err, + ) + } + + return nil + } +} + +func resourceString(info *resource.Info) string { + _, k := info.Mapping.GroupVersionKind.ToAPIVersionAndKind() + return fmt.Sprintf( + "%s %q in namespace %q", + k, info.Name, info.Namespace, + ) +} + +func mergeLabels(obj runtime.Object, labels map[string]string) error { + current, err := accessor.Labels(obj) + if err != nil { + return err + } + return accessor.SetLabels(obj, mergeStrStrMaps(current, labels)) +} + +func mergeAnnotations(obj runtime.Object, annotations map[string]string) error { + current, err := accessor.Annotations(obj) + if err != nil { + return err + } + return accessor.SetAnnotations(obj, mergeStrStrMaps(current, annotations)) +} + +// merge two maps, always taking the value on the right +func mergeStrStrMaps(current, desired map[string]string) map[string]string { + result := make(map[string]string) + for k, v := range current { + result[k] = v + } + for k, desiredVal := range desired { + result[k] = desiredVal + } + return result +} diff --git a/vendor/helm.sh/helm/v3/pkg/action/verify.go b/vendor/helm.sh/helm/v3/pkg/action/verify.go new file mode 100644 index 000000000..f36239496 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/action/verify.go @@ -0,0 +1,59 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "fmt" + "strings" + + "helm.sh/helm/v3/pkg/downloader" +) + +// Verify is the action for building a given chart's Verify tree. +// +// It provides the implementation of 'helm verify'. +type Verify struct { + Keyring string + Out string +} + +// NewVerify creates a new Verify object with the given configuration. +func NewVerify() *Verify { + return &Verify{} +} + +// Run executes 'helm verify'. +func (v *Verify) Run(chartfile string) error { + var out strings.Builder + p, err := downloader.VerifyChart(chartfile, v.Keyring) + if err != nil { + return err + } + + for name := range p.SignedBy.Identities { + fmt.Fprintf(&out, "Signed by: %v\n", name) + } + fmt.Fprintf(&out, "Using Key With Fingerprint: %X\n", p.SignedBy.PrimaryKey.Fingerprint) + fmt.Fprintf(&out, "Chart Hash Verified: %s\n", p.FileHash) + + // TODO(mattfarina): The output is set as a property rather than returned + // to maintain the Go API. In Helm v4 this function should return the out + // and the property on the struct can be removed. + v.Out = out.String() + + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/chart.go b/vendor/helm.sh/helm/v3/pkg/chart/chart.go new file mode 100644 index 000000000..a3bed63a3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/chart.go @@ -0,0 +1,173 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chart + +import ( + "path/filepath" + "regexp" + "strings" +) + +// APIVersionV1 is the API version number for version 1. +const APIVersionV1 = "v1" + +// APIVersionV2 is the API version number for version 2. +const APIVersionV2 = "v2" + +// aliasNameFormat defines the characters that are legal in an alias name. +var aliasNameFormat = regexp.MustCompile("^[a-zA-Z0-9_-]+$") + +// Chart is a helm package that contains metadata, a default config, zero or more +// optionally parameterizable templates, and zero or more charts (dependencies). +type Chart struct { + // Raw contains the raw contents of the files originally contained in the chart archive. + // + // This should not be used except in special cases like `helm show values`, + // where we want to display the raw values, comments and all. + Raw []*File `json:"-"` + // Metadata is the contents of the Chartfile. + Metadata *Metadata `json:"metadata"` + // Lock is the contents of Chart.lock. + Lock *Lock `json:"lock"` + // Templates for this chart. + Templates []*File `json:"templates"` + // Values are default config for this chart. + Values map[string]interface{} `json:"values"` + // Schema is an optional JSON schema for imposing structure on Values + Schema []byte `json:"schema"` + // Files are miscellaneous files in a chart archive, + // e.g. README, LICENSE, etc. + Files []*File `json:"files"` + + parent *Chart + dependencies []*Chart +} + +type CRD struct { + // Name is the File.Name for the crd file + Name string + // Filename is the File obj Name including (sub-)chart.ChartFullPath + Filename string + // File is the File obj for the crd + File *File +} + +// SetDependencies replaces the chart dependencies. +func (ch *Chart) SetDependencies(charts ...*Chart) { + ch.dependencies = nil + ch.AddDependency(charts...) +} + +// Name returns the name of the chart. +func (ch *Chart) Name() string { + if ch.Metadata == nil { + return "" + } + return ch.Metadata.Name +} + +// AddDependency determines if the chart is a subchart. +func (ch *Chart) AddDependency(charts ...*Chart) { + for i, x := range charts { + charts[i].parent = ch + ch.dependencies = append(ch.dependencies, x) + } +} + +// Root finds the root chart. +func (ch *Chart) Root() *Chart { + if ch.IsRoot() { + return ch + } + return ch.Parent().Root() +} + +// Dependencies are the charts that this chart depends on. +func (ch *Chart) Dependencies() []*Chart { return ch.dependencies } + +// IsRoot determines if the chart is the root chart. +func (ch *Chart) IsRoot() bool { return ch.parent == nil } + +// Parent returns a subchart's parent chart. +func (ch *Chart) Parent() *Chart { return ch.parent } + +// ChartPath returns the full path to this chart in dot notation. +func (ch *Chart) ChartPath() string { + if !ch.IsRoot() { + return ch.Parent().ChartPath() + "." + ch.Name() + } + return ch.Name() +} + +// ChartFullPath returns the full path to this chart. +func (ch *Chart) ChartFullPath() string { + if !ch.IsRoot() { + return ch.Parent().ChartFullPath() + "/charts/" + ch.Name() + } + return ch.Name() +} + +// Validate validates the metadata. +func (ch *Chart) Validate() error { + return ch.Metadata.Validate() +} + +// AppVersion returns the appversion of the chart. +func (ch *Chart) AppVersion() string { + if ch.Metadata == nil { + return "" + } + return ch.Metadata.AppVersion +} + +// CRDs returns a list of File objects in the 'crds/' directory of a Helm chart. +// Deprecated: use CRDObjects() +func (ch *Chart) CRDs() []*File { + files := []*File{} + // Find all resources in the crds/ directory + for _, f := range ch.Files { + if strings.HasPrefix(f.Name, "crds/") && hasManifestExtension(f.Name) { + files = append(files, f) + } + } + // Get CRDs from dependencies, too. + for _, dep := range ch.Dependencies() { + files = append(files, dep.CRDs()...) + } + return files +} + +// CRDObjects returns a list of CRD objects in the 'crds/' directory of a Helm chart & subcharts +func (ch *Chart) CRDObjects() []CRD { + crds := []CRD{} + // Find all resources in the crds/ directory + for _, f := range ch.Files { + if strings.HasPrefix(f.Name, "crds/") && hasManifestExtension(f.Name) { + mycrd := CRD{Name: f.Name, Filename: filepath.Join(ch.ChartFullPath(), f.Name), File: f} + crds = append(crds, mycrd) + } + } + // Get CRDs from dependencies, too. + for _, dep := range ch.Dependencies() { + crds = append(crds, dep.CRDObjects()...) + } + return crds +} + +func hasManifestExtension(fname string) bool { + ext := filepath.Ext(fname) + return strings.EqualFold(ext, ".yaml") || strings.EqualFold(ext, ".yml") || strings.EqualFold(ext, ".json") +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/dependency.go b/vendor/helm.sh/helm/v3/pkg/chart/dependency.go new file mode 100644 index 000000000..4ef5eeb32 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/dependency.go @@ -0,0 +1,82 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chart + +import "time" + +// Dependency describes a chart upon which another chart depends. +// +// Dependencies can be used to express developer intent, or to capture the state +// of a chart. +type Dependency struct { + // Name is the name of the dependency. + // + // This must mach the name in the dependency's Chart.yaml. + Name string `json:"name"` + // Version is the version (range) of this chart. + // + // A lock file will always produce a single version, while a dependency + // may contain a semantic version range. + Version string `json:"version,omitempty"` + // The URL to the repository. + // + // Appending `index.yaml` to this string should result in a URL that can be + // used to fetch the repository index. + Repository string `json:"repository"` + // A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled ) + Condition string `json:"condition,omitempty"` + // Tags can be used to group charts for enabling/disabling together + Tags []string `json:"tags,omitempty"` + // Enabled bool determines if chart should be loaded + Enabled bool `json:"enabled,omitempty"` + // ImportValues holds the mapping of source values to parent key to be imported. Each item can be a + // string or pair of child/parent sublist items. + ImportValues []interface{} `json:"import-values,omitempty"` + // Alias usable alias to be used for the chart + Alias string `json:"alias,omitempty"` +} + +// Validate checks for common problems with the dependency datastructure in +// the chart. This check must be done at load time before the dependency's charts are +// loaded. +func (d *Dependency) Validate() error { + if d == nil { + return ValidationError("dependencies must not contain empty or null nodes") + } + d.Name = sanitizeString(d.Name) + d.Version = sanitizeString(d.Version) + d.Repository = sanitizeString(d.Repository) + d.Condition = sanitizeString(d.Condition) + for i := range d.Tags { + d.Tags[i] = sanitizeString(d.Tags[i]) + } + if d.Alias != "" && !aliasNameFormat.MatchString(d.Alias) { + return ValidationErrorf("dependency %q has disallowed characters in the alias", d.Name) + } + return nil +} + +// Lock is a lock file for dependencies. +// +// It represents the state that the dependencies should be in. +type Lock struct { + // Generated is the date the lock file was last generated. + Generated time.Time `json:"generated"` + // Digest is a hash of the dependencies in Chart.yaml. + Digest string `json:"digest"` + // Dependencies is the list of dependencies that this lock file has locked. + Dependencies []*Dependency `json:"dependencies"` +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/errors.go b/vendor/helm.sh/helm/v3/pkg/chart/errors.go new file mode 100644 index 000000000..2fad5f370 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/errors.go @@ -0,0 +1,30 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chart + +import "fmt" + +// ValidationError represents a data validation error. +type ValidationError string + +func (v ValidationError) Error() string { + return "validation: " + string(v) +} + +// ValidationErrorf takes a message and formatting options and creates a ValidationError +func ValidationErrorf(msg string, args ...interface{}) ValidationError { + return ValidationError(fmt.Sprintf(msg, args...)) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/file.go b/vendor/helm.sh/helm/v3/pkg/chart/file.go new file mode 100644 index 000000000..9dd7c08d5 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/file.go @@ -0,0 +1,27 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chart + +// File represents a file as a name/value pair. +// +// By convention, name is a relative path within the scope of the chart's +// base directory. +type File struct { + // Name is the path-like name of the template. + Name string `json:"name"` + // Data is the template as byte data. + Data []byte `json:"data"` +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/loader/archive.go b/vendor/helm.sh/helm/v3/pkg/chart/loader/archive.go new file mode 100644 index 000000000..8bb549346 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/loader/archive.go @@ -0,0 +1,205 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "archive/tar" + "bytes" + "compress/gzip" + "fmt" + "io" + "net/http" + "os" + "path" + "regexp" + "strings" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chart" +) + +var drivePathPattern = regexp.MustCompile(`^[a-zA-Z]:/`) + +// FileLoader loads a chart from a file +type FileLoader string + +// Load loads a chart +func (l FileLoader) Load() (*chart.Chart, error) { + return LoadFile(string(l)) +} + +// LoadFile loads from an archive file. +func LoadFile(name string) (*chart.Chart, error) { + if fi, err := os.Stat(name); err != nil { + return nil, err + } else if fi.IsDir() { + return nil, errors.New("cannot load a directory") + } + + raw, err := os.Open(name) + if err != nil { + return nil, err + } + defer raw.Close() + + err = ensureArchive(name, raw) + if err != nil { + return nil, err + } + + c, err := LoadArchive(raw) + if err != nil { + if err == gzip.ErrHeader { + return nil, fmt.Errorf("file '%s' does not appear to be a valid chart file (details: %s)", name, err) + } + } + return c, err +} + +// ensureArchive's job is to return an informative error if the file does not appear to be a gzipped archive. +// +// Sometimes users will provide a values.yaml for an argument where a chart is expected. One common occurrence +// of this is invoking `helm template values.yaml mychart` which would otherwise produce a confusing error +// if we didn't check for this. +func ensureArchive(name string, raw *os.File) error { + defer raw.Seek(0, 0) // reset read offset to allow archive loading to proceed. + + // Check the file format to give us a chance to provide the user with more actionable feedback. + buffer := make([]byte, 512) + _, err := raw.Read(buffer) + if err != nil && err != io.EOF { + return fmt.Errorf("file '%s' cannot be read: %s", name, err) + } + + // Helm may identify achieve of the application/x-gzip as application/vnd.ms-fontobject. + // Fix for: https://github.com/helm/helm/issues/12261 + if contentType := http.DetectContentType(buffer); contentType != "application/x-gzip" && !isGZipApplication(buffer) { + // TODO: Is there a way to reliably test if a file content is YAML? ghodss/yaml accepts a wide + // variety of content (Makefile, .zshrc) as valid YAML without errors. + + // Wrong content type. Let's check if it's yaml and give an extra hint? + if strings.HasSuffix(name, ".yml") || strings.HasSuffix(name, ".yaml") { + return fmt.Errorf("file '%s' seems to be a YAML file, but expected a gzipped archive", name) + } + return fmt.Errorf("file '%s' does not appear to be a gzipped archive; got '%s'", name, contentType) + } + return nil +} + +// isGZipApplication checks whether the archive is of the application/x-gzip type. +func isGZipApplication(data []byte) bool { + sig := []byte("\x1F\x8B\x08") + return bytes.HasPrefix(data, sig) +} + +// LoadArchiveFiles reads in files out of an archive into memory. This function +// performs important path security checks and should always be used before +// expanding a tarball +func LoadArchiveFiles(in io.Reader) ([]*BufferedFile, error) { + unzipped, err := gzip.NewReader(in) + if err != nil { + return nil, err + } + defer unzipped.Close() + + files := []*BufferedFile{} + tr := tar.NewReader(unzipped) + for { + b := bytes.NewBuffer(nil) + hd, err := tr.Next() + if err == io.EOF { + break + } + if err != nil { + return nil, err + } + + if hd.FileInfo().IsDir() { + // Use this instead of hd.Typeflag because we don't have to do any + // inference chasing. + continue + } + + switch hd.Typeflag { + // We don't want to process these extension header files. + case tar.TypeXGlobalHeader, tar.TypeXHeader: + continue + } + + // Archive could contain \ if generated on Windows + delimiter := "/" + if strings.ContainsRune(hd.Name, '\\') { + delimiter = "\\" + } + + parts := strings.Split(hd.Name, delimiter) + n := strings.Join(parts[1:], delimiter) + + // Normalize the path to the / delimiter + n = strings.ReplaceAll(n, delimiter, "/") + + if path.IsAbs(n) { + return nil, errors.New("chart illegally contains absolute paths") + } + + n = path.Clean(n) + if n == "." { + // In this case, the original path was relative when it should have been absolute. + return nil, errors.Errorf("chart illegally contains content outside the base directory: %q", hd.Name) + } + if strings.HasPrefix(n, "..") { + return nil, errors.New("chart illegally references parent directory") + } + + // In some particularly arcane acts of path creativity, it is possible to intermix + // UNIX and Windows style paths in such a way that you produce a result of the form + // c:/foo even after all the built-in absolute path checks. So we explicitly check + // for this condition. + if drivePathPattern.MatchString(n) { + return nil, errors.New("chart contains illegally named files") + } + + if parts[0] == "Chart.yaml" { + return nil, errors.New("chart yaml not in base directory") + } + + if _, err := io.Copy(b, tr); err != nil { + return nil, err + } + + data := bytes.TrimPrefix(b.Bytes(), utf8bom) + + files = append(files, &BufferedFile{Name: n, Data: data}) + b.Reset() + } + + if len(files) == 0 { + return nil, errors.New("no files in chart archive") + } + return files, nil +} + +// LoadArchive loads from a reader containing a compressed tar archive. +func LoadArchive(in io.Reader) (*chart.Chart, error) { + files, err := LoadArchiveFiles(in) + if err != nil { + return nil, err + } + + return LoadFiles(files) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/loader/directory.go b/vendor/helm.sh/helm/v3/pkg/chart/loader/directory.go new file mode 100644 index 000000000..9bcbee60c --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/loader/directory.go @@ -0,0 +1,119 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "bytes" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/internal/sympath" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/ignore" +) + +var utf8bom = []byte{0xEF, 0xBB, 0xBF} + +// DirLoader loads a chart from a directory +type DirLoader string + +// Load loads the chart +func (l DirLoader) Load() (*chart.Chart, error) { + return LoadDir(string(l)) +} + +// LoadDir loads from a directory. +// +// This loads charts only from directories. +func LoadDir(dir string) (*chart.Chart, error) { + topdir, err := filepath.Abs(dir) + if err != nil { + return nil, err + } + + // Just used for errors. + c := &chart.Chart{} + + rules := ignore.Empty() + ifile := filepath.Join(topdir, ignore.HelmIgnore) + if _, err := os.Stat(ifile); err == nil { + r, err := ignore.ParseFile(ifile) + if err != nil { + return c, err + } + rules = r + } + rules.AddDefaults() + + files := []*BufferedFile{} + topdir += string(filepath.Separator) + + walk := func(name string, fi os.FileInfo, err error) error { + n := strings.TrimPrefix(name, topdir) + if n == "" { + // No need to process top level. Avoid bug with helmignore .* matching + // empty names. See issue 1779. + return nil + } + + // Normalize to / since it will also work on Windows + n = filepath.ToSlash(n) + + if err != nil { + return err + } + if fi.IsDir() { + // Directory-based ignore rules should involve skipping the entire + // contents of that directory. + if rules.Ignore(n, fi) { + return filepath.SkipDir + } + return nil + } + + // If a .helmignore file matches, skip this file. + if rules.Ignore(n, fi) { + return nil + } + + // Irregular files include devices, sockets, and other uses of files that + // are not regular files. In Go they have a file mode type bit set. + // See https://golang.org/pkg/os/#FileMode for examples. + if !fi.Mode().IsRegular() { + return fmt.Errorf("cannot load irregular file %s as it has file mode type bits set", name) + } + + data, err := os.ReadFile(name) + if err != nil { + return errors.Wrapf(err, "error reading %s", n) + } + + data = bytes.TrimPrefix(data, utf8bom) + + files = append(files, &BufferedFile{Name: n, Data: data}) + return nil + } + if err = sympath.Walk(topdir, walk); err != nil { + return c, err + } + + return LoadFiles(files) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/loader/load.go b/vendor/helm.sh/helm/v3/pkg/chart/loader/load.go new file mode 100644 index 000000000..f59c35a5e --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/loader/load.go @@ -0,0 +1,203 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "bytes" + "log" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" +) + +// ChartLoader loads a chart. +type ChartLoader interface { + Load() (*chart.Chart, error) +} + +// Loader returns a new ChartLoader appropriate for the given chart name +func Loader(name string) (ChartLoader, error) { + fi, err := os.Stat(name) + if err != nil { + return nil, err + } + if fi.IsDir() { + return DirLoader(name), nil + } + return FileLoader(name), nil + +} + +// Load takes a string name, tries to resolve it to a file or directory, and then loads it. +// +// This is the preferred way to load a chart. It will discover the chart encoding +// and hand off to the appropriate chart reader. +// +// If a .helmignore file is present, the directory loader will skip loading any files +// matching it. But .helmignore is not evaluated when reading out of an archive. +func Load(name string) (*chart.Chart, error) { + l, err := Loader(name) + if err != nil { + return nil, err + } + return l.Load() +} + +// BufferedFile represents an archive file buffered for later processing. +type BufferedFile struct { + Name string + Data []byte +} + +// LoadFiles loads from in-memory files. +func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { + c := new(chart.Chart) + subcharts := make(map[string][]*BufferedFile) + + // do not rely on assumed ordering of files in the chart and crash + // if Chart.yaml was not coming early enough to initialize metadata + for _, f := range files { + c.Raw = append(c.Raw, &chart.File{Name: f.Name, Data: f.Data}) + if f.Name == "Chart.yaml" { + if c.Metadata == nil { + c.Metadata = new(chart.Metadata) + } + if err := yaml.Unmarshal(f.Data, c.Metadata); err != nil { + return c, errors.Wrap(err, "cannot load Chart.yaml") + } + // NOTE(bacongobbler): while the chart specification says that APIVersion must be set, + // Helm 2 accepted charts that did not provide an APIVersion in their chart metadata. + // Because of that, if APIVersion is unset, we should assume we're loading a v1 chart. + if c.Metadata.APIVersion == "" { + c.Metadata.APIVersion = chart.APIVersionV1 + } + } + } + for _, f := range files { + switch { + case f.Name == "Chart.yaml": + // already processed + continue + case f.Name == "Chart.lock": + c.Lock = new(chart.Lock) + if err := yaml.Unmarshal(f.Data, &c.Lock); err != nil { + return c, errors.Wrap(err, "cannot load Chart.lock") + } + case f.Name == "values.yaml": + c.Values = make(map[string]interface{}) + if err := yaml.Unmarshal(f.Data, &c.Values); err != nil { + return c, errors.Wrap(err, "cannot load values.yaml") + } + case f.Name == "values.schema.json": + c.Schema = f.Data + + // Deprecated: requirements.yaml is deprecated use Chart.yaml. + // We will handle it for you because we are nice people + case f.Name == "requirements.yaml": + if c.Metadata == nil { + c.Metadata = new(chart.Metadata) + } + if c.Metadata.APIVersion != chart.APIVersionV1 { + log.Printf("Warning: Dependencies are handled in Chart.yaml since apiVersion \"v2\". We recommend migrating dependencies to Chart.yaml.") + } + if err := yaml.Unmarshal(f.Data, c.Metadata); err != nil { + return c, errors.Wrap(err, "cannot load requirements.yaml") + } + if c.Metadata.APIVersion == chart.APIVersionV1 { + c.Files = append(c.Files, &chart.File{Name: f.Name, Data: f.Data}) + } + // Deprecated: requirements.lock is deprecated use Chart.lock. + case f.Name == "requirements.lock": + c.Lock = new(chart.Lock) + if err := yaml.Unmarshal(f.Data, &c.Lock); err != nil { + return c, errors.Wrap(err, "cannot load requirements.lock") + } + if c.Metadata == nil { + c.Metadata = new(chart.Metadata) + } + if c.Metadata.APIVersion != chart.APIVersionV1 { + log.Printf("Warning: Dependency locking is handled in Chart.lock since apiVersion \"v2\". We recommend migrating to Chart.lock.") + } + if c.Metadata.APIVersion == chart.APIVersionV1 { + c.Files = append(c.Files, &chart.File{Name: f.Name, Data: f.Data}) + } + + case strings.HasPrefix(f.Name, "templates/"): + c.Templates = append(c.Templates, &chart.File{Name: f.Name, Data: f.Data}) + case strings.HasPrefix(f.Name, "charts/"): + if filepath.Ext(f.Name) == ".prov" { + c.Files = append(c.Files, &chart.File{Name: f.Name, Data: f.Data}) + continue + } + + fname := strings.TrimPrefix(f.Name, "charts/") + cname := strings.SplitN(fname, "/", 2)[0] + subcharts[cname] = append(subcharts[cname], &BufferedFile{Name: fname, Data: f.Data}) + default: + c.Files = append(c.Files, &chart.File{Name: f.Name, Data: f.Data}) + } + } + + if c.Metadata == nil { + return c, errors.New("Chart.yaml file is missing") + } + + if err := c.Validate(); err != nil { + return c, err + } + + for n, files := range subcharts { + var sc *chart.Chart + var err error + switch { + case strings.IndexAny(n, "_.") == 0: + continue + case filepath.Ext(n) == ".tgz": + file := files[0] + if file.Name != n { + return c, errors.Errorf("error unpacking tar in %s: expected %s, got %s", c.Name(), n, file.Name) + } + // Untar the chart and add to c.Dependencies + sc, err = LoadArchive(bytes.NewBuffer(file.Data)) + default: + // We have to trim the prefix off of every file, and ignore any file + // that is in charts/, but isn't actually a chart. + buff := make([]*BufferedFile, 0, len(files)) + for _, f := range files { + parts := strings.SplitN(f.Name, "/", 2) + if len(parts) < 2 { + continue + } + f.Name = parts[1] + buff = append(buff, f) + } + sc, err = LoadFiles(buff) + } + + if err != nil { + return c, errors.Wrapf(err, "error unpacking %s in %s", n, c.Name()) + } + c.AddDependency(sc) + } + + return c, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chart/metadata.go b/vendor/helm.sh/helm/v3/pkg/chart/metadata.go new file mode 100644 index 000000000..a08a97cd1 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chart/metadata.go @@ -0,0 +1,178 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chart + +import ( + "path/filepath" + "strings" + "unicode" + + "github.com/Masterminds/semver/v3" +) + +// Maintainer describes a Chart maintainer. +type Maintainer struct { + // Name is a user name or organization name + Name string `json:"name,omitempty"` + // Email is an optional email address to contact the named maintainer + Email string `json:"email,omitempty"` + // URL is an optional URL to an address for the named maintainer + URL string `json:"url,omitempty"` +} + +// Validate checks valid data and sanitizes string characters. +func (m *Maintainer) Validate() error { + if m == nil { + return ValidationError("maintainers must not contain empty or null nodes") + } + m.Name = sanitizeString(m.Name) + m.Email = sanitizeString(m.Email) + m.URL = sanitizeString(m.URL) + return nil +} + +// Metadata for a Chart file. This models the structure of a Chart.yaml file. +type Metadata struct { + // The name of the chart. Required. + Name string `json:"name,omitempty"` + // The URL to a relevant project page, git repo, or contact person + Home string `json:"home,omitempty"` + // Source is the URL to the source code of this chart + Sources []string `json:"sources,omitempty"` + // A SemVer 2 conformant version string of the chart. Required. + Version string `json:"version,omitempty"` + // A one-sentence description of the chart + Description string `json:"description,omitempty"` + // A list of string keywords + Keywords []string `json:"keywords,omitempty"` + // A list of name and URL/email address combinations for the maintainer(s) + Maintainers []*Maintainer `json:"maintainers,omitempty"` + // The URL to an icon file. + Icon string `json:"icon,omitempty"` + // The API Version of this chart. Required. + APIVersion string `json:"apiVersion,omitempty"` + // The condition to check to enable chart + Condition string `json:"condition,omitempty"` + // The tags to check to enable chart + Tags string `json:"tags,omitempty"` + // The version of the application enclosed inside of this chart. + AppVersion string `json:"appVersion,omitempty"` + // Whether or not this chart is deprecated + Deprecated bool `json:"deprecated,omitempty"` + // Annotations are additional mappings uninterpreted by Helm, + // made available for inspection by other applications. + Annotations map[string]string `json:"annotations,omitempty"` + // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. + KubeVersion string `json:"kubeVersion,omitempty"` + // Dependencies are a list of dependencies for a chart. + Dependencies []*Dependency `json:"dependencies,omitempty"` + // Specifies the chart type: application or library + Type string `json:"type,omitempty"` +} + +// Validate checks the metadata for known issues and sanitizes string +// characters. +func (md *Metadata) Validate() error { + if md == nil { + return ValidationError("chart.metadata is required") + } + + md.Name = sanitizeString(md.Name) + md.Description = sanitizeString(md.Description) + md.Home = sanitizeString(md.Home) + md.Icon = sanitizeString(md.Icon) + md.Condition = sanitizeString(md.Condition) + md.Tags = sanitizeString(md.Tags) + md.AppVersion = sanitizeString(md.AppVersion) + md.KubeVersion = sanitizeString(md.KubeVersion) + for i := range md.Sources { + md.Sources[i] = sanitizeString(md.Sources[i]) + } + for i := range md.Keywords { + md.Keywords[i] = sanitizeString(md.Keywords[i]) + } + + if md.APIVersion == "" { + return ValidationError("chart.metadata.apiVersion is required") + } + if md.Name == "" { + return ValidationError("chart.metadata.name is required") + } + + if md.Name != filepath.Base(md.Name) { + return ValidationErrorf("chart.metadata.name %q is invalid", md.Name) + } + + if md.Version == "" { + return ValidationError("chart.metadata.version is required") + } + if !isValidSemver(md.Version) { + return ValidationErrorf("chart.metadata.version %q is invalid", md.Version) + } + if !isValidChartType(md.Type) { + return ValidationError("chart.metadata.type must be application or library") + } + + for _, m := range md.Maintainers { + if err := m.Validate(); err != nil { + return err + } + } + + // Aliases need to be validated here to make sure that the alias name does + // not contain any illegal characters. + dependencies := map[string]*Dependency{} + for _, dependency := range md.Dependencies { + if err := dependency.Validate(); err != nil { + return err + } + key := dependency.Name + if dependency.Alias != "" { + key = dependency.Alias + } + if dependencies[key] != nil { + return ValidationErrorf("more than one dependency with name or alias %q", key) + } + dependencies[key] = dependency + } + return nil +} + +func isValidChartType(in string) bool { + switch in { + case "", "application", "library": + return true + } + return false +} + +func isValidSemver(v string) bool { + _, err := semver.NewVersion(v) + return err == nil +} + +// sanitizeString normalize spaces and removes non-printable characters. +func sanitizeString(str string) string { + return strings.Map(func(r rune) rune { + if unicode.IsSpace(r) { + return ' ' + } + if unicode.IsPrint(r) { + return r + } + return -1 + }, str) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/capabilities.go b/vendor/helm.sh/helm/v3/pkg/chartutil/capabilities.go new file mode 100644 index 000000000..48fab0ea4 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/capabilities.go @@ -0,0 +1,126 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "fmt" + "strconv" + + "github.com/Masterminds/semver/v3" + "k8s.io/client-go/kubernetes/scheme" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + + helmversion "helm.sh/helm/v3/internal/version" +) + +var ( + // The Kubernetes version can be set by LDFLAGS. In order to do that the value + // must be a string. + k8sVersionMajor = "1" + k8sVersionMinor = "20" + + // DefaultVersionSet is the default version set, which includes only Core V1 ("v1"). + DefaultVersionSet = allKnownVersions() + + // DefaultCapabilities is the default set of capabilities. + DefaultCapabilities = &Capabilities{ + KubeVersion: KubeVersion{ + Version: fmt.Sprintf("v%s.%s.0", k8sVersionMajor, k8sVersionMinor), + Major: k8sVersionMajor, + Minor: k8sVersionMinor, + }, + APIVersions: DefaultVersionSet, + HelmVersion: helmversion.Get(), + } +) + +// Capabilities describes the capabilities of the Kubernetes cluster. +type Capabilities struct { + // KubeVersion is the Kubernetes version. + KubeVersion KubeVersion + // APIVersions are supported Kubernetes API versions. + APIVersions VersionSet + // HelmVersion is the build information for this helm version + HelmVersion helmversion.BuildInfo +} + +func (capabilities *Capabilities) Copy() *Capabilities { + return &Capabilities{ + KubeVersion: capabilities.KubeVersion, + APIVersions: capabilities.APIVersions, + HelmVersion: capabilities.HelmVersion, + } +} + +// KubeVersion is the Kubernetes version. +type KubeVersion struct { + Version string // Kubernetes version + Major string // Kubernetes major version + Minor string // Kubernetes minor version +} + +// String implements fmt.Stringer +func (kv *KubeVersion) String() string { return kv.Version } + +// GitVersion returns the Kubernetes version string. +// +// Deprecated: use KubeVersion.Version. +func (kv *KubeVersion) GitVersion() string { return kv.Version } + +// ParseKubeVersion parses kubernetes version from string +func ParseKubeVersion(version string) (*KubeVersion, error) { + sv, err := semver.NewVersion(version) + if err != nil { + return nil, err + } + return &KubeVersion{ + Version: "v" + sv.String(), + Major: strconv.FormatUint(sv.Major(), 10), + Minor: strconv.FormatUint(sv.Minor(), 10), + }, nil +} + +// VersionSet is a set of Kubernetes API versions. +type VersionSet []string + +// Has returns true if the version string is in the set. +// +// vs.Has("apps/v1") +func (v VersionSet) Has(apiVersion string) bool { + for _, x := range v { + if x == apiVersion { + return true + } + } + return false +} + +func allKnownVersions() VersionSet { + // We should register the built in extension APIs as well so CRDs are + // supported in the default version set. This has caused problems with `helm + // template` in the past, so let's be safe + apiextensionsv1beta1.AddToScheme(scheme.Scheme) + apiextensionsv1.AddToScheme(scheme.Scheme) + + groups := scheme.Scheme.PrioritizedVersionsAllGroups() + vs := make(VersionSet, 0, len(groups)) + for _, gv := range groups { + vs = append(vs, gv.String()) + } + return vs +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/chartfile.go b/vendor/helm.sh/helm/v3/pkg/chartutil/chartfile.go new file mode 100644 index 000000000..4f537a6e7 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/chartfile.go @@ -0,0 +1,92 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "os" + "path/filepath" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" +) + +// LoadChartfile loads a Chart.yaml file into a *chart.Metadata. +func LoadChartfile(filename string) (*chart.Metadata, error) { + b, err := os.ReadFile(filename) + if err != nil { + return nil, err + } + y := new(chart.Metadata) + err = yaml.Unmarshal(b, y) + return y, err +} + +// SaveChartfile saves the given metadata as a Chart.yaml file at the given path. +// +// 'filename' should be the complete path and filename ('foo/Chart.yaml') +func SaveChartfile(filename string, cf *chart.Metadata) error { + // Pull out the dependencies of a v1 Chart, since there's no way + // to tell the serializer to skip a field for just this use case + savedDependencies := cf.Dependencies + if cf.APIVersion == chart.APIVersionV1 { + cf.Dependencies = nil + } + out, err := yaml.Marshal(cf) + if cf.APIVersion == chart.APIVersionV1 { + cf.Dependencies = savedDependencies + } + if err != nil { + return err + } + return os.WriteFile(filename, out, 0644) +} + +// IsChartDir validate a chart directory. +// +// Checks for a valid Chart.yaml. +func IsChartDir(dirName string) (bool, error) { + if fi, err := os.Stat(dirName); err != nil { + return false, err + } else if !fi.IsDir() { + return false, errors.Errorf("%q is not a directory", dirName) + } + + chartYaml := filepath.Join(dirName, ChartfileName) + if _, err := os.Stat(chartYaml); os.IsNotExist(err) { + return false, errors.Errorf("no %s exists in directory %q", ChartfileName, dirName) + } + + chartYamlContent, err := os.ReadFile(chartYaml) + if err != nil { + return false, errors.Errorf("cannot read %s in directory %q", ChartfileName, dirName) + } + + chartContent := new(chart.Metadata) + if err := yaml.Unmarshal(chartYamlContent, &chartContent); err != nil { + return false, err + } + if chartContent == nil { + return false, errors.Errorf("chart metadata (%s) missing", ChartfileName) + } + if chartContent.Name == "" { + return false, errors.Errorf("invalid chart (%s): name must not be empty", ChartfileName) + } + + return true, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/coalesce.go b/vendor/helm.sh/helm/v3/pkg/chartutil/coalesce.go new file mode 100644 index 000000000..f0272fd6a --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/coalesce.go @@ -0,0 +1,293 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "fmt" + "log" + + "github.com/mitchellh/copystructure" + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chart" +) + +func concatPrefix(a, b string) string { + if a == "" { + return b + } + return fmt.Sprintf("%s.%s", a, b) +} + +// CoalesceValues coalesces all of the values in a chart (and its subcharts). +// +// Values are coalesced together using the following rules: +// +// - Values in a higher level chart always override values in a lower-level +// dependency chart +// - Scalar values and arrays are replaced, maps are merged +// - A chart has access to all of the variables for it, as well as all of +// the values destined for its dependencies. +func CoalesceValues(chrt *chart.Chart, vals map[string]interface{}) (Values, error) { + valsCopy, err := copyValues(vals) + if err != nil { + return vals, err + } + return coalesce(log.Printf, chrt, valsCopy, "", false) +} + +// MergeValues is used to merge the values in a chart and its subcharts. This +// is different from Coalescing as nil/null values are preserved. +// +// Values are coalesced together using the following rules: +// +// - Values in a higher level chart always override values in a lower-level +// dependency chart +// - Scalar values and arrays are replaced, maps are merged +// - A chart has access to all of the variables for it, as well as all of +// the values destined for its dependencies. +// +// Retaining Nils is useful when processes early in a Helm action or business +// logic need to retain them for when Coalescing will happen again later in the +// business logic. +func MergeValues(chrt *chart.Chart, vals map[string]interface{}) (Values, error) { + valsCopy, err := copyValues(vals) + if err != nil { + return vals, err + } + return coalesce(log.Printf, chrt, valsCopy, "", true) +} + +func copyValues(vals map[string]interface{}) (Values, error) { + v, err := copystructure.Copy(vals) + if err != nil { + return vals, err + } + + valsCopy := v.(map[string]interface{}) + // if we have an empty map, make sure it is initialized + if valsCopy == nil { + valsCopy = make(map[string]interface{}) + } + + return valsCopy, nil +} + +type printFn func(format string, v ...interface{}) + +// coalesce coalesces the dest values and the chart values, giving priority to the dest values. +// +// This is a helper function for CoalesceValues and MergeValues. +// +// Note, the merge argument specifies whether this is being used by MergeValues +// or CoalesceValues. Coalescing removes null values and their keys in some +// situations while merging keeps the null values. +func coalesce(printf printFn, ch *chart.Chart, dest map[string]interface{}, prefix string, merge bool) (map[string]interface{}, error) { + coalesceValues(printf, ch, dest, prefix, merge) + return coalesceDeps(printf, ch, dest, prefix, merge) +} + +// coalesceDeps coalesces the dependencies of the given chart. +func coalesceDeps(printf printFn, chrt *chart.Chart, dest map[string]interface{}, prefix string, merge bool) (map[string]interface{}, error) { + for _, subchart := range chrt.Dependencies() { + if c, ok := dest[subchart.Name()]; !ok { + // If dest doesn't already have the key, create it. + dest[subchart.Name()] = make(map[string]interface{}) + } else if !istable(c) { + return dest, errors.Errorf("type mismatch on %s: %t", subchart.Name(), c) + } + if dv, ok := dest[subchart.Name()]; ok { + dvmap := dv.(map[string]interface{}) + subPrefix := concatPrefix(prefix, chrt.Metadata.Name) + // Get globals out of dest and merge them into dvmap. + coalesceGlobals(printf, dvmap, dest, subPrefix, merge) + // Now coalesce the rest of the values. + var err error + dest[subchart.Name()], err = coalesce(printf, subchart, dvmap, subPrefix, merge) + if err != nil { + return dest, err + } + } + } + return dest, nil +} + +// coalesceGlobals copies the globals out of src and merges them into dest. +// +// For convenience, returns dest. +func coalesceGlobals(printf printFn, dest, src map[string]interface{}, prefix string, _ bool) { + var dg, sg map[string]interface{} + + if destglob, ok := dest[GlobalKey]; !ok { + dg = make(map[string]interface{}) + } else if dg, ok = destglob.(map[string]interface{}); !ok { + printf("warning: skipping globals because destination %s is not a table.", GlobalKey) + return + } + + if srcglob, ok := src[GlobalKey]; !ok { + sg = make(map[string]interface{}) + } else if sg, ok = srcglob.(map[string]interface{}); !ok { + printf("warning: skipping globals because source %s is not a table.", GlobalKey) + return + } + + // EXPERIMENTAL: In the past, we have disallowed globals to test tables. This + // reverses that decision. It may somehow be possible to introduce a loop + // here, but I haven't found a way. So for the time being, let's allow + // tables in globals. + for key, val := range sg { + if istable(val) { + vv := copyMap(val.(map[string]interface{})) + if destv, ok := dg[key]; !ok { + // Here there is no merge. We're just adding. + dg[key] = vv + } else { + if destvmap, ok := destv.(map[string]interface{}); !ok { + printf("Conflict: cannot merge map onto non-map for %q. Skipping.", key) + } else { + // Basically, we reverse order of coalesce here to merge + // top-down. + subPrefix := concatPrefix(prefix, key) + // In this location coalesceTablesFullKey should always have + // merge set to true. The output of coalesceGlobals is run + // through coalesce where any nils will be removed. + coalesceTablesFullKey(printf, vv, destvmap, subPrefix, true) + dg[key] = vv + } + } + } else if dv, ok := dg[key]; ok && istable(dv) { + // It's not clear if this condition can actually ever trigger. + printf("key %s is table. Skipping", key) + } else { + // TODO: Do we need to do any additional checking on the value? + dg[key] = val + } + } + dest[GlobalKey] = dg +} + +func copyMap(src map[string]interface{}) map[string]interface{} { + m := make(map[string]interface{}, len(src)) + for k, v := range src { + m[k] = v + } + return m +} + +// coalesceValues builds up a values map for a particular chart. +// +// Values in v will override the values in the chart. +func coalesceValues(printf printFn, c *chart.Chart, v map[string]interface{}, prefix string, merge bool) { + subPrefix := concatPrefix(prefix, c.Metadata.Name) + + // Using c.Values directly when coalescing a table can cause problems where + // the original c.Values is altered. Creating a deep copy stops the problem. + // This section is fault-tolerant as there is no ability to return an error. + valuesCopy, err := copystructure.Copy(c.Values) + var vc map[string]interface{} + var ok bool + if err != nil { + // If there is an error something is wrong with copying c.Values it + // means there is a problem in the deep copying package or something + // wrong with c.Values. In this case we will use c.Values and report + // an error. + printf("warning: unable to copy values, err: %s", err) + vc = c.Values + } else { + vc, ok = valuesCopy.(map[string]interface{}) + if !ok { + // c.Values has a map[string]interface{} structure. If the copy of + // it cannot be treated as map[string]interface{} there is something + // strangely wrong. Log it and use c.Values + printf("warning: unable to convert values copy to values type") + vc = c.Values + } + } + + for key, val := range vc { + if value, ok := v[key]; ok { + if value == nil && !merge { + // When the YAML value is null and we are coalescing instead of + // merging, we remove the value's key. + // This allows Helm's various sources of values (value files or --set) to + // remove incompatible keys from any previous chart, file, or set values. + delete(v, key) + } else if dest, ok := value.(map[string]interface{}); ok { + // if v[key] is a table, merge nv's val table into v[key]. + src, ok := val.(map[string]interface{}) + if !ok { + // If the original value is nil, there is nothing to coalesce, so we don't print + // the warning + if val != nil { + printf("warning: skipped value for %s.%s: Not a table.", subPrefix, key) + } + } else { + // Because v has higher precedence than nv, dest values override src + // values. + coalesceTablesFullKey(printf, dest, src, concatPrefix(subPrefix, key), merge) + } + } + } else { + // If the key is not in v, copy it from nv. + v[key] = val + } + } +} + +// CoalesceTables merges a source map into a destination map. +// +// dest is considered authoritative. +func CoalesceTables(dst, src map[string]interface{}) map[string]interface{} { + return coalesceTablesFullKey(log.Printf, dst, src, "", false) +} + +func MergeTables(dst, src map[string]interface{}) map[string]interface{} { + return coalesceTablesFullKey(log.Printf, dst, src, "", true) +} + +// coalesceTablesFullKey merges a source map into a destination map. +// +// dest is considered authoritative. +func coalesceTablesFullKey(printf printFn, dst, src map[string]interface{}, prefix string, merge bool) map[string]interface{} { + // When --reuse-values is set but there are no modifications yet, return new values + if src == nil { + return dst + } + if dst == nil { + return src + } + // Because dest has higher precedence than src, dest values override src + // values. + for key, val := range src { + fullkey := concatPrefix(prefix, key) + if dv, ok := dst[key]; ok && !merge && dv == nil { + delete(dst, key) + } else if !ok { + dst[key] = val + } else if istable(val) { + if istable(dv) { + coalesceTablesFullKey(printf, dv.(map[string]interface{}), val.(map[string]interface{}), fullkey, merge) + } else { + printf("warning: cannot overwrite table with non table for %s (%v)", fullkey, val) + } + } else if istable(dv) && val != nil { + printf("warning: destination for %s is a table. Ignoring non-table value (%v)", fullkey, val) + } + } + return dst +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/compatible.go b/vendor/helm.sh/helm/v3/pkg/chartutil/compatible.go new file mode 100644 index 000000000..f4656c913 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/compatible.go @@ -0,0 +1,34 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import "github.com/Masterminds/semver/v3" + +// IsCompatibleRange compares a version to a constraint. +// It returns true if the version matches the constraint, and false in all other cases. +func IsCompatibleRange(constraint, ver string) bool { + sv, err := semver.NewVersion(ver) + if err != nil { + return false + } + + c, err := semver.NewConstraint(constraint) + if err != nil { + return false + } + return c.Check(sv) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/create.go b/vendor/helm.sh/helm/v3/pkg/chartutil/create.go new file mode 100644 index 000000000..e9769932f --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/create.go @@ -0,0 +1,721 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "fmt" + "io" + "os" + "path/filepath" + "regexp" + "strings" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" +) + +// chartName is a regular expression for testing the supplied name of a chart. +// This regular expression is probably stricter than it needs to be. We can relax it +// somewhat. Newline characters, as well as $, quotes, +, parens, and % are known to be +// problematic. +var chartName = regexp.MustCompile("^[a-zA-Z0-9._-]+$") + +const ( + // ChartfileName is the default Chart file name. + ChartfileName = "Chart.yaml" + // ValuesfileName is the default values file name. + ValuesfileName = "values.yaml" + // SchemafileName is the default values schema file name. + SchemafileName = "values.schema.json" + // TemplatesDir is the relative directory name for templates. + TemplatesDir = "templates" + // ChartsDir is the relative directory name for charts dependencies. + ChartsDir = "charts" + // TemplatesTestsDir is the relative directory name for tests. + TemplatesTestsDir = TemplatesDir + sep + "tests" + // IgnorefileName is the name of the Helm ignore file. + IgnorefileName = ".helmignore" + // IngressFileName is the name of the example ingress file. + IngressFileName = TemplatesDir + sep + "ingress.yaml" + // DeploymentName is the name of the example deployment file. + DeploymentName = TemplatesDir + sep + "deployment.yaml" + // ServiceName is the name of the example service file. + ServiceName = TemplatesDir + sep + "service.yaml" + // ServiceAccountName is the name of the example serviceaccount file. + ServiceAccountName = TemplatesDir + sep + "serviceaccount.yaml" + // HorizontalPodAutoscalerName is the name of the example hpa file. + HorizontalPodAutoscalerName = TemplatesDir + sep + "hpa.yaml" + // NotesName is the name of the example NOTES.txt file. + NotesName = TemplatesDir + sep + "NOTES.txt" + // HelpersName is the name of the example helpers file. + HelpersName = TemplatesDir + sep + "_helpers.tpl" + // TestConnectionName is the name of the example test file. + TestConnectionName = TemplatesTestsDir + sep + "test-connection.yaml" +) + +// maxChartNameLength is lower than the limits we know of with certain file systems, +// and with certain Kubernetes fields. +const maxChartNameLength = 250 + +const sep = string(filepath.Separator) + +const defaultChartfile = `apiVersion: v2 +name: %s +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" +` + +const defaultValues = `# Default values for %s. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +replicaCount: 1 + +# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +image: + repository: nginx + # This sets the pull policy for images. + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# This is to override the chart name. +nameOverride: "" +fullnameOverride: "" + +#This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# This is for setting Kubernetes Annotations to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} +# This is for setting Kubernetes Labels to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + port: 80 + +# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +livenessProbe: + httpGet: + path: / + port: http +readinessProbe: + httpGet: + path: / + port: http + +#This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} +` + +const defaultIgnore = `# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +` + +const defaultIngress = `{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "<CHARTNAME>.fullname" . }} + labels: + {{- include "<CHARTNAME>.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "<CHARTNAME>.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} +` + +const defaultDeployment = `apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "<CHARTNAME>.fullname" . }} + labels: + {{- include "<CHARTNAME>.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "<CHARTNAME>.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "<CHARTNAME>.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "<CHARTNAME>.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} +` + +const defaultService = `apiVersion: v1 +kind: Service +metadata: + name: {{ include "<CHARTNAME>.fullname" . }} + labels: + {{- include "<CHARTNAME>.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "<CHARTNAME>.selectorLabels" . | nindent 4 }} +` + +const defaultServiceAccount = `{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "<CHARTNAME>.serviceAccountName" . }} + labels: + {{- include "<CHARTNAME>.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} +` + +const defaultHorizontalPodAutoscaler = `{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "<CHARTNAME>.fullname" . }} + labels: + {{- include "<CHARTNAME>.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "<CHARTNAME>.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} +` + +const defaultNotes = `1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "<CHARTNAME>.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "<CHARTNAME>.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "<CHARTNAME>.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "<CHARTNAME>.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} +` + +const defaultHelpers = `{{/* +Expand the name of the chart. +*/}} +{{- define "<CHARTNAME>.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "<CHARTNAME>.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "<CHARTNAME>.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "<CHARTNAME>.labels" -}} +helm.sh/chart: {{ include "<CHARTNAME>.chart" . }} +{{ include "<CHARTNAME>.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "<CHARTNAME>.selectorLabels" -}} +app.kubernetes.io/name: {{ include "<CHARTNAME>.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "<CHARTNAME>.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "<CHARTNAME>.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} +` + +const defaultTestConnection = `apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "<CHARTNAME>.fullname" . }}-test-connection" + labels: + {{- include "<CHARTNAME>.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "<CHARTNAME>.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never +` + +// Stderr is an io.Writer to which error messages can be written +// +// In Helm 4, this will be replaced. It is needed in Helm 3 to preserve API backward +// compatibility. +var Stderr io.Writer = os.Stderr + +// CreateFrom creates a new chart, but scaffolds it from the src chart. +func CreateFrom(chartfile *chart.Metadata, dest, src string) error { + schart, err := loader.Load(src) + if err != nil { + return errors.Wrapf(err, "could not load %s", src) + } + + schart.Metadata = chartfile + + var updatedTemplates []*chart.File + + for _, template := range schart.Templates { + newData := transform(string(template.Data), schart.Name()) + updatedTemplates = append(updatedTemplates, &chart.File{Name: template.Name, Data: newData}) + } + + schart.Templates = updatedTemplates + b, err := yaml.Marshal(schart.Values) + if err != nil { + return errors.Wrap(err, "reading values file") + } + + var m map[string]interface{} + if err := yaml.Unmarshal(transform(string(b), schart.Name()), &m); err != nil { + return errors.Wrap(err, "transforming values file") + } + schart.Values = m + + // SaveDir looks for the file values.yaml when saving rather than the values + // key in order to preserve the comments in the YAML. The name placeholder + // needs to be replaced on that file. + for _, f := range schart.Raw { + if f.Name == ValuesfileName { + f.Data = transform(string(f.Data), schart.Name()) + } + } + + return SaveDir(schart, dest) +} + +// Create creates a new chart in a directory. +// +// Inside of dir, this will create a directory based on the name of +// chartfile.Name. It will then write the Chart.yaml into this directory and +// create the (empty) appropriate directories. +// +// The returned string will point to the newly created directory. It will be +// an absolute path, even if the provided base directory was relative. +// +// If dir does not exist, this will return an error. +// If Chart.yaml or any directories cannot be created, this will return an +// error. In such a case, this will attempt to clean up by removing the +// new chart directory. +func Create(name, dir string) (string, error) { + + // Sanity-check the name of a chart so user doesn't create one that causes problems. + if err := validateChartName(name); err != nil { + return "", err + } + + path, err := filepath.Abs(dir) + if err != nil { + return path, err + } + + if fi, err := os.Stat(path); err != nil { + return path, err + } else if !fi.IsDir() { + return path, errors.Errorf("no such directory %s", path) + } + + cdir := filepath.Join(path, name) + if fi, err := os.Stat(cdir); err == nil && !fi.IsDir() { + return cdir, errors.Errorf("file %s already exists and is not a directory", cdir) + } + + files := []struct { + path string + content []byte + }{ + { + // Chart.yaml + path: filepath.Join(cdir, ChartfileName), + content: []byte(fmt.Sprintf(defaultChartfile, name)), + }, + { + // values.yaml + path: filepath.Join(cdir, ValuesfileName), + content: []byte(fmt.Sprintf(defaultValues, name)), + }, + { + // .helmignore + path: filepath.Join(cdir, IgnorefileName), + content: []byte(defaultIgnore), + }, + { + // ingress.yaml + path: filepath.Join(cdir, IngressFileName), + content: transform(defaultIngress, name), + }, + { + // deployment.yaml + path: filepath.Join(cdir, DeploymentName), + content: transform(defaultDeployment, name), + }, + { + // service.yaml + path: filepath.Join(cdir, ServiceName), + content: transform(defaultService, name), + }, + { + // serviceaccount.yaml + path: filepath.Join(cdir, ServiceAccountName), + content: transform(defaultServiceAccount, name), + }, + { + // hpa.yaml + path: filepath.Join(cdir, HorizontalPodAutoscalerName), + content: transform(defaultHorizontalPodAutoscaler, name), + }, + { + // NOTES.txt + path: filepath.Join(cdir, NotesName), + content: transform(defaultNotes, name), + }, + { + // _helpers.tpl + path: filepath.Join(cdir, HelpersName), + content: transform(defaultHelpers, name), + }, + { + // test-connection.yaml + path: filepath.Join(cdir, TestConnectionName), + content: transform(defaultTestConnection, name), + }, + } + + for _, file := range files { + if _, err := os.Stat(file.path); err == nil { + // There is no handle to a preferred output stream here. + fmt.Fprintf(Stderr, "WARNING: File %q already exists. Overwriting.\n", file.path) + } + if err := writeFile(file.path, file.content); err != nil { + return cdir, err + } + } + // Need to add the ChartsDir explicitly as it does not contain any file OOTB + if err := os.MkdirAll(filepath.Join(cdir, ChartsDir), 0755); err != nil { + return cdir, err + } + return cdir, nil +} + +// transform performs a string replacement of the specified source for +// a given key with the replacement string +func transform(src, replacement string) []byte { + return []byte(strings.ReplaceAll(src, "<CHARTNAME>", replacement)) +} + +func writeFile(name string, content []byte) error { + if err := os.MkdirAll(filepath.Dir(name), 0755); err != nil { + return err + } + return os.WriteFile(name, content, 0644) +} + +func validateChartName(name string) error { + if name == "" || len(name) > maxChartNameLength { + return fmt.Errorf("chart name must be between 1 and %d characters", maxChartNameLength) + } + if !chartName.MatchString(name) { + return fmt.Errorf("chart name must match the regular expression %q", chartName.String()) + } + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/dependencies.go b/vendor/helm.sh/helm/v3/pkg/chartutil/dependencies.go new file mode 100644 index 000000000..36a341927 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/dependencies.go @@ -0,0 +1,356 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "log" + "strings" + + "github.com/mitchellh/copystructure" + + "helm.sh/helm/v3/pkg/chart" +) + +// ProcessDependencies checks through this chart's dependencies, processing accordingly. +// +// TODO: For Helm v4 this can be combined with or turned into ProcessDependenciesWithMerge +func ProcessDependencies(c *chart.Chart, v Values) error { + if err := processDependencyEnabled(c, v, ""); err != nil { + return err + } + return processDependencyImportValues(c, false) +} + +// ProcessDependenciesWithMerge checks through this chart's dependencies, processing accordingly. +// It is similar to ProcessDependencies but it does not remove nil values during +// the import/export handling process. +func ProcessDependenciesWithMerge(c *chart.Chart, v Values) error { + if err := processDependencyEnabled(c, v, ""); err != nil { + return err + } + return processDependencyImportValues(c, true) +} + +// processDependencyConditions disables charts based on condition path value in values +func processDependencyConditions(reqs []*chart.Dependency, cvals Values, cpath string) { + if reqs == nil { + return + } + for _, r := range reqs { + for _, c := range strings.Split(strings.TrimSpace(r.Condition), ",") { + if len(c) > 0 { + // retrieve value + vv, err := cvals.PathValue(cpath + c) + if err == nil { + // if not bool, warn + if bv, ok := vv.(bool); ok { + r.Enabled = bv + break + } + log.Printf("Warning: Condition path '%s' for chart %s returned non-bool value", c, r.Name) + } else if _, ok := err.(ErrNoValue); !ok { + // this is a real error + log.Printf("Warning: PathValue returned error %v", err) + } + } + } + } +} + +// processDependencyTags disables charts based on tags in values +func processDependencyTags(reqs []*chart.Dependency, cvals Values) { + if reqs == nil { + return + } + vt, err := cvals.Table("tags") + if err != nil { + return + } + for _, r := range reqs { + var hasTrue, hasFalse bool + for _, k := range r.Tags { + if b, ok := vt[k]; ok { + // if not bool, warn + if bv, ok := b.(bool); ok { + if bv { + hasTrue = true + } else { + hasFalse = true + } + } else { + log.Printf("Warning: Tag '%s' for chart %s returned non-bool value", k, r.Name) + } + } + } + if !hasTrue && hasFalse { + r.Enabled = false + } else if hasTrue || !hasTrue && !hasFalse { + r.Enabled = true + } + } +} + +func getAliasDependency(charts []*chart.Chart, dep *chart.Dependency) *chart.Chart { + for _, c := range charts { + if c == nil { + continue + } + if c.Name() != dep.Name { + continue + } + if !IsCompatibleRange(dep.Version, c.Metadata.Version) { + continue + } + + out := *c + md := *c.Metadata + out.Metadata = &md + + if dep.Alias != "" { + md.Name = dep.Alias + } + return &out + } + return nil +} + +// processDependencyEnabled removes disabled charts from dependencies +func processDependencyEnabled(c *chart.Chart, v map[string]interface{}, path string) error { + if c.Metadata.Dependencies == nil { + return nil + } + + var chartDependencies []*chart.Chart + // If any dependency is not a part of Chart.yaml + // then this should be added to chartDependencies. + // However, if the dependency is already specified in Chart.yaml + // we should not add it, as it would be processed from Chart.yaml anyway. + +Loop: + for _, existing := range c.Dependencies() { + for _, req := range c.Metadata.Dependencies { + if existing.Name() == req.Name && IsCompatibleRange(req.Version, existing.Metadata.Version) { + continue Loop + } + } + chartDependencies = append(chartDependencies, existing) + } + + for _, req := range c.Metadata.Dependencies { + if req == nil { + continue + } + if chartDependency := getAliasDependency(c.Dependencies(), req); chartDependency != nil { + chartDependencies = append(chartDependencies, chartDependency) + } + if req.Alias != "" { + req.Name = req.Alias + } + } + c.SetDependencies(chartDependencies...) + + // set all to true + for _, lr := range c.Metadata.Dependencies { + lr.Enabled = true + } + cvals, err := CoalesceValues(c, v) + if err != nil { + return err + } + // flag dependencies as enabled/disabled + processDependencyTags(c.Metadata.Dependencies, cvals) + processDependencyConditions(c.Metadata.Dependencies, cvals, path) + // make a map of charts to remove + rm := map[string]struct{}{} + for _, r := range c.Metadata.Dependencies { + if !r.Enabled { + // remove disabled chart + rm[r.Name] = struct{}{} + } + } + // don't keep disabled charts in new slice + cd := []*chart.Chart{} + copy(cd, c.Dependencies()[:0]) + for _, n := range c.Dependencies() { + if _, ok := rm[n.Metadata.Name]; !ok { + cd = append(cd, n) + } + } + // don't keep disabled charts in metadata + cdMetadata := []*chart.Dependency{} + copy(cdMetadata, c.Metadata.Dependencies[:0]) + for _, n := range c.Metadata.Dependencies { + if _, ok := rm[n.Name]; !ok { + cdMetadata = append(cdMetadata, n) + } + } + + // recursively call self to process sub dependencies + for _, t := range cd { + subpath := path + t.Metadata.Name + "." + if err := processDependencyEnabled(t, cvals, subpath); err != nil { + return err + } + } + // set the correct dependencies in metadata + c.Metadata.Dependencies = nil + c.Metadata.Dependencies = append(c.Metadata.Dependencies, cdMetadata...) + c.SetDependencies(cd...) + + return nil +} + +// pathToMap creates a nested map given a YAML path in dot notation. +func pathToMap(path string, data map[string]interface{}) map[string]interface{} { + if path == "." { + return data + } + return set(parsePath(path), data) +} + +func set(path []string, data map[string]interface{}) map[string]interface{} { + if len(path) == 0 { + return nil + } + cur := data + for i := len(path) - 1; i >= 0; i-- { + cur = map[string]interface{}{path[i]: cur} + } + return cur +} + +// processImportValues merges values from child to parent based on the chart's dependencies' ImportValues field. +func processImportValues(c *chart.Chart, merge bool) error { + if c.Metadata.Dependencies == nil { + return nil + } + // combine chart values and empty config to get Values + var cvals Values + var err error + if merge { + cvals, err = MergeValues(c, nil) + } else { + cvals, err = CoalesceValues(c, nil) + } + if err != nil { + return err + } + b := make(map[string]interface{}) + // import values from each dependency if specified in import-values + for _, r := range c.Metadata.Dependencies { + var outiv []interface{} + for _, riv := range r.ImportValues { + switch iv := riv.(type) { + case map[string]interface{}: + child := iv["child"].(string) + parent := iv["parent"].(string) + + outiv = append(outiv, map[string]string{ + "child": child, + "parent": parent, + }) + + // get child table + vv, err := cvals.Table(r.Name + "." + child) + if err != nil { + log.Printf("Warning: ImportValues missing table from chart %s: %v", r.Name, err) + continue + } + // create value map from child to be merged into parent + if merge { + b = MergeTables(b, pathToMap(parent, vv.AsMap())) + } else { + b = CoalesceTables(b, pathToMap(parent, vv.AsMap())) + } + case string: + child := "exports." + iv + outiv = append(outiv, map[string]string{ + "child": child, + "parent": ".", + }) + vm, err := cvals.Table(r.Name + "." + child) + if err != nil { + log.Printf("Warning: ImportValues missing table: %v", err) + continue + } + if merge { + b = MergeTables(b, vm.AsMap()) + } else { + b = CoalesceTables(b, vm.AsMap()) + } + } + } + r.ImportValues = outiv + } + + // Imported values from a child to a parent chart have a lower priority than + // the parents values. This enables parent charts to import a large section + // from a child and then override select parts. This is why b is merged into + // cvals in the code below and not the other way around. + if merge { + // deep copying the cvals as there are cases where pointers can end + // up in the cvals when they are copied onto b in ways that break things. + cvals = deepCopyMap(cvals) + c.Values = MergeTables(cvals, b) + } else { + // Trimming the nil values from cvals is needed for backwards compatibility. + // Previously, the b value had been populated with cvals along with some + // overrides. This caused the coalescing functionality to remove the + // nil/null values. This trimming is for backwards compat. + cvals = trimNilValues(cvals) + c.Values = CoalesceTables(cvals, b) + } + + return nil +} + +func deepCopyMap(vals map[string]interface{}) map[string]interface{} { + valsCopy, err := copystructure.Copy(vals) + if err != nil { + return vals + } + return valsCopy.(map[string]interface{}) +} + +func trimNilValues(vals map[string]interface{}) map[string]interface{} { + valsCopy, err := copystructure.Copy(vals) + if err != nil { + return vals + } + valsCopyMap := valsCopy.(map[string]interface{}) + for key, val := range valsCopyMap { + if val == nil { + // Iterate over the values and remove nil keys + delete(valsCopyMap, key) + } else if istable(val) { + // Recursively call into ourselves to remove keys from inner tables + valsCopyMap[key] = trimNilValues(val.(map[string]interface{})) + } + } + + return valsCopyMap +} + +// processDependencyImportValues imports specified chart values from child to parent. +func processDependencyImportValues(c *chart.Chart, merge bool) error { + for _, d := range c.Dependencies() { + // recurse + if err := processDependencyImportValues(d, merge); err != nil { + return err + } + } + return processImportValues(c, merge) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/doc.go b/vendor/helm.sh/helm/v3/pkg/chartutil/doc.go new file mode 100644 index 000000000..49c55ac52 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/doc.go @@ -0,0 +1,45 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package chartutil contains tools for working with charts. + +Charts are described in the chart package (pkg/chart). +This package provides utilities for serializing and deserializing charts. + +A chart can be represented on the file system in one of two ways: + + - As a directory that contains a Chart.yaml file and other chart things. + - As a tarred gzipped file containing a directory that then contains a + Chart.yaml file. + +This package provides utilities for working with those file formats. + +The preferred way of loading a chart is using 'loader.Load`: + + chart, err := loader.Load(filename) + +This will attempt to discover whether the file at 'filename' is a directory or +a chart archive. It will then load accordingly. + +For accepting raw compressed tar file data from an io.Reader, the +'loader.LoadArchive()' will read in the data, uncompress it, and unpack it +into a Chart. + +When creating charts in memory, use the 'helm.sh/helm/pkg/chart' +package directly. +*/ +package chartutil // import "helm.sh/helm/v3/pkg/chartutil" diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/errors.go b/vendor/helm.sh/helm/v3/pkg/chartutil/errors.go new file mode 100644 index 000000000..0a4046d2e --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/errors.go @@ -0,0 +1,43 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "fmt" +) + +// ErrNoTable indicates that a chart does not have a matching table. +type ErrNoTable struct { + Key string +} + +func (e ErrNoTable) Error() string { return fmt.Sprintf("%q is not a table", e.Key) } + +// ErrNoValue indicates that Values does not contain a key with a value +type ErrNoValue struct { + Key string +} + +func (e ErrNoValue) Error() string { return fmt.Sprintf("%q is not a value", e.Key) } + +type ErrInvalidChartName struct { + Name string +} + +func (e ErrInvalidChartName) Error() string { + return fmt.Sprintf("%q is not a valid chart name", e.Name) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/expand.go b/vendor/helm.sh/helm/v3/pkg/chartutil/expand.go new file mode 100644 index 000000000..7ae1ae6fa --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/expand.go @@ -0,0 +1,90 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "io" + "os" + "path/filepath" + + securejoin "github.com/cyphar/filepath-securejoin" + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" +) + +// Expand uncompresses and extracts a chart into the specified directory. +func Expand(dir string, r io.Reader) error { + files, err := loader.LoadArchiveFiles(r) + if err != nil { + return err + } + + // Get the name of the chart + var chartName string + for _, file := range files { + if file.Name == "Chart.yaml" { + ch := &chart.Metadata{} + if err := yaml.Unmarshal(file.Data, ch); err != nil { + return errors.Wrap(err, "cannot load Chart.yaml") + } + chartName = ch.Name + } + } + if chartName == "" { + return errors.New("chart name not specified") + } + + // Find the base directory + chartdir, err := securejoin.SecureJoin(dir, chartName) + if err != nil { + return err + } + + // Copy all files verbatim. We don't parse these files because parsing can remove + // comments. + for _, file := range files { + outpath, err := securejoin.SecureJoin(chartdir, file.Name) + if err != nil { + return err + } + + // Make sure the necessary subdirs get created. + basedir := filepath.Dir(outpath) + if err := os.MkdirAll(basedir, 0755); err != nil { + return err + } + + if err := os.WriteFile(outpath, file.Data, 0644); err != nil { + return err + } + } + + return nil +} + +// ExpandFile expands the src file into the dest directory. +func ExpandFile(dest, src string) error { + h, err := os.Open(src) + if err != nil { + return err + } + defer h.Close() + return Expand(dest, h) +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/jsonschema.go b/vendor/helm.sh/helm/v3/pkg/chartutil/jsonschema.go new file mode 100644 index 000000000..7b9768fd3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/jsonschema.go @@ -0,0 +1,93 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "bytes" + "fmt" + "strings" + + "github.com/pkg/errors" + "github.com/xeipuuv/gojsonschema" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" +) + +// ValidateAgainstSchema checks that values does not violate the structure laid out in schema +func ValidateAgainstSchema(chrt *chart.Chart, values map[string]interface{}) error { + var sb strings.Builder + if chrt.Schema != nil { + err := ValidateAgainstSingleSchema(values, chrt.Schema) + if err != nil { + sb.WriteString(fmt.Sprintf("%s:\n", chrt.Name())) + sb.WriteString(err.Error()) + } + } + + // For each dependency, recursively call this function with the coalesced values + for _, subchart := range chrt.Dependencies() { + subchartValues := values[subchart.Name()].(map[string]interface{}) + if err := ValidateAgainstSchema(subchart, subchartValues); err != nil { + sb.WriteString(err.Error()) + } + } + + if sb.Len() > 0 { + return errors.New(sb.String()) + } + + return nil +} + +// ValidateAgainstSingleSchema checks that values does not violate the structure laid out in this schema +func ValidateAgainstSingleSchema(values Values, schemaJSON []byte) (reterr error) { + defer func() { + if r := recover(); r != nil { + reterr = fmt.Errorf("unable to validate schema: %s", r) + } + }() + + valuesData, err := yaml.Marshal(values) + if err != nil { + return err + } + valuesJSON, err := yaml.YAMLToJSON(valuesData) + if err != nil { + return err + } + if bytes.Equal(valuesJSON, []byte("null")) { + valuesJSON = []byte("{}") + } + schemaLoader := gojsonschema.NewBytesLoader(schemaJSON) + valuesLoader := gojsonschema.NewBytesLoader(valuesJSON) + + result, err := gojsonschema.Validate(schemaLoader, valuesLoader) + if err != nil { + return err + } + + if !result.Valid() { + var sb strings.Builder + for _, desc := range result.Errors() { + sb.WriteString(fmt.Sprintf("- %s\n", desc)) + } + return errors.New(sb.String()) + } + + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/save.go b/vendor/helm.sh/helm/v3/pkg/chartutil/save.go new file mode 100644 index 000000000..4ee90709c --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/save.go @@ -0,0 +1,264 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "archive/tar" + "compress/gzip" + "encoding/json" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" +) + +var headerBytes = []byte("+aHR0cHM6Ly95b3V0dS5iZS96OVV6MWljandyTQo=") + +// SaveDir saves a chart as files in a directory. +// +// This takes the chart name, and creates a new subdirectory inside of the given dest +// directory, writing the chart's contents to that subdirectory. +func SaveDir(c *chart.Chart, dest string) error { + // Create the chart directory + err := validateName(c.Name()) + if err != nil { + return err + } + outdir := filepath.Join(dest, c.Name()) + if fi, err := os.Stat(outdir); err == nil && !fi.IsDir() { + return errors.Errorf("file %s already exists and is not a directory", outdir) + } + if err := os.MkdirAll(outdir, 0755); err != nil { + return err + } + + // Save the chart file. + if err := SaveChartfile(filepath.Join(outdir, ChartfileName), c.Metadata); err != nil { + return err + } + + // Save values.yaml + for _, f := range c.Raw { + if f.Name == ValuesfileName { + vf := filepath.Join(outdir, ValuesfileName) + if err := writeFile(vf, f.Data); err != nil { + return err + } + } + } + + // Save values.schema.json if it exists + if c.Schema != nil { + filename := filepath.Join(outdir, SchemafileName) + if err := writeFile(filename, c.Schema); err != nil { + return err + } + } + + // Save templates and files + for _, o := range [][]*chart.File{c.Templates, c.Files} { + for _, f := range o { + n := filepath.Join(outdir, f.Name) + if err := writeFile(n, f.Data); err != nil { + return err + } + } + } + + // Save dependencies + base := filepath.Join(outdir, ChartsDir) + for _, dep := range c.Dependencies() { + // Here, we write each dependency as a tar file. + if _, err := Save(dep, base); err != nil { + return errors.Wrapf(err, "saving %s", dep.ChartFullPath()) + } + } + return nil +} + +// Save creates an archived chart to the given directory. +// +// This takes an existing chart and a destination directory. +// +// If the directory is /foo, and the chart is named bar, with version 1.0.0, this +// will generate /foo/bar-1.0.0.tgz. +// +// This returns the absolute path to the chart archive file. +func Save(c *chart.Chart, outDir string) (string, error) { + if err := c.Validate(); err != nil { + return "", errors.Wrap(err, "chart validation") + } + + filename := fmt.Sprintf("%s-%s.tgz", c.Name(), c.Metadata.Version) + filename = filepath.Join(outDir, filename) + dir := filepath.Dir(filename) + if stat, err := os.Stat(dir); err != nil { + if os.IsNotExist(err) { + if err2 := os.MkdirAll(dir, 0755); err2 != nil { + return "", err2 + } + } else { + return "", errors.Wrapf(err, "stat %s", dir) + } + } else if !stat.IsDir() { + return "", errors.Errorf("is not a directory: %s", dir) + } + + f, err := os.Create(filename) + if err != nil { + return "", err + } + + // Wrap in gzip writer + zipper := gzip.NewWriter(f) + zipper.Header.Extra = headerBytes + zipper.Header.Comment = "Helm" + + // Wrap in tar writer + twriter := tar.NewWriter(zipper) + rollback := false + defer func() { + twriter.Close() + zipper.Close() + f.Close() + if rollback { + os.Remove(filename) + } + }() + + if err := writeTarContents(twriter, c, ""); err != nil { + rollback = true + return filename, err + } + return filename, nil +} + +func writeTarContents(out *tar.Writer, c *chart.Chart, prefix string) error { + err := validateName(c.Name()) + if err != nil { + return err + } + base := filepath.Join(prefix, c.Name()) + + // Pull out the dependencies of a v1 Chart, since there's no way + // to tell the serializer to skip a field for just this use case + savedDependencies := c.Metadata.Dependencies + if c.Metadata.APIVersion == chart.APIVersionV1 { + c.Metadata.Dependencies = nil + } + // Save Chart.yaml + cdata, err := yaml.Marshal(c.Metadata) + if c.Metadata.APIVersion == chart.APIVersionV1 { + c.Metadata.Dependencies = savedDependencies + } + if err != nil { + return err + } + if err := writeToTar(out, filepath.Join(base, ChartfileName), cdata); err != nil { + return err + } + + // Save Chart.lock + // TODO: remove the APIVersion check when APIVersionV1 is not used anymore + if c.Metadata.APIVersion == chart.APIVersionV2 { + if c.Lock != nil { + ldata, err := yaml.Marshal(c.Lock) + if err != nil { + return err + } + if err := writeToTar(out, filepath.Join(base, "Chart.lock"), ldata); err != nil { + return err + } + } + } + + // Save values.yaml + for _, f := range c.Raw { + if f.Name == ValuesfileName { + if err := writeToTar(out, filepath.Join(base, ValuesfileName), f.Data); err != nil { + return err + } + } + } + + // Save values.schema.json if it exists + if c.Schema != nil { + if !json.Valid(c.Schema) { + return errors.New("Invalid JSON in " + SchemafileName) + } + if err := writeToTar(out, filepath.Join(base, SchemafileName), c.Schema); err != nil { + return err + } + } + + // Save templates + for _, f := range c.Templates { + n := filepath.Join(base, f.Name) + if err := writeToTar(out, n, f.Data); err != nil { + return err + } + } + + // Save files + for _, f := range c.Files { + n := filepath.Join(base, f.Name) + if err := writeToTar(out, n, f.Data); err != nil { + return err + } + } + + // Save dependencies + for _, dep := range c.Dependencies() { + if err := writeTarContents(out, dep, filepath.Join(base, ChartsDir)); err != nil { + return err + } + } + return nil +} + +// writeToTar writes a single file to a tar archive. +func writeToTar(out *tar.Writer, name string, body []byte) error { + // TODO: Do we need to create dummy parent directory names if none exist? + h := &tar.Header{ + Name: filepath.ToSlash(name), + Mode: 0644, + Size: int64(len(body)), + ModTime: time.Now(), + } + if err := out.WriteHeader(h); err != nil { + return err + } + _, err := out.Write(body) + return err +} + +// If the name has directory name has characters which would change the location +// they need to be removed. +func validateName(name string) error { + nname := filepath.Base(name) + + if nname != name { + return ErrInvalidChartName{name} + } + + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/validate_name.go b/vendor/helm.sh/helm/v3/pkg/chartutil/validate_name.go new file mode 100644 index 000000000..05c090cb6 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/validate_name.go @@ -0,0 +1,112 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "fmt" + "regexp" + + "github.com/pkg/errors" +) + +// validName is a regular expression for resource names. +// +// According to the Kubernetes help text, the regular expression it uses is: +// +// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* +// +// This follows the above regular expression (but requires a full string match, not partial). +// +// The Kubernetes documentation is here, though it is not entirely correct: +// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +var validName = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`) + +var ( + // errMissingName indicates that a release (name) was not provided. + errMissingName = errors.New("no name provided") + + // errInvalidName indicates that an invalid release name was provided + errInvalidName = fmt.Errorf( + "invalid release name, must match regex %s and the length must not be longer than 53", + validName.String()) + + // errInvalidKubernetesName indicates that the name does not meet the Kubernetes + // restrictions on metadata names. + errInvalidKubernetesName = fmt.Errorf( + "invalid metadata name, must match regex %s and the length must not be longer than 253", + validName.String()) +) + +const ( + // According to the Kubernetes docs (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names) + // some resource names have a max length of 63 characters while others have a max + // length of 253 characters. As we cannot be sure the resources used in a chart, we + // therefore need to limit it to 63 chars and reserve 10 chars for additional part to name + // of the resource. The reason is that chart maintainers can use release name as part of + // the resource name (and some additional chars). + maxReleaseNameLen = 53 + // maxMetadataNameLen is the maximum length Kubernetes allows for any name. + maxMetadataNameLen = 253 +) + +// ValidateReleaseName performs checks for an entry for a Helm release name +// +// For Helm to allow a name, it must be below a certain character count (53) and also match +// a regular expression. +// +// According to the Kubernetes help text, the regular expression it uses is: +// +// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* +// +// This follows the above regular expression (but requires a full string match, not partial). +// +// The Kubernetes documentation is here, though it is not entirely correct: +// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +func ValidateReleaseName(name string) error { + // This case is preserved for backwards compatibility + if name == "" { + return errMissingName + + } + if len(name) > maxReleaseNameLen || !validName.MatchString(name) { + return errInvalidName + } + return nil +} + +// ValidateMetadataName validates the name field of a Kubernetes metadata object. +// +// Empty strings, strings longer than 253 chars, or strings that don't match the regexp +// will fail. +// +// According to the Kubernetes help text, the regular expression it uses is: +// +// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* +// +// This follows the above regular expression (but requires a full string match, not partial). +// +// The Kubernetes documentation is here, though it is not entirely correct: +// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +// +// Deprecated: remove in Helm 4. Name validation now uses rules defined in +// pkg/lint/rules.validateMetadataNameFunc() +func ValidateMetadataName(name string) error { + if name == "" || len(name) > maxMetadataNameLen || !validName.MatchString(name) { + return errInvalidKubernetesName + } + return nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/chartutil/values.go b/vendor/helm.sh/helm/v3/pkg/chartutil/values.go new file mode 100644 index 000000000..61c633a6d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/chartutil/values.go @@ -0,0 +1,221 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package chartutil + +import ( + "fmt" + "io" + "os" + "strings" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" +) + +// GlobalKey is the name of the Values key that is used for storing global vars. +const GlobalKey = "global" + +// Values represents a collection of chart values. +type Values map[string]interface{} + +// YAML encodes the Values into a YAML string. +func (v Values) YAML() (string, error) { + b, err := yaml.Marshal(v) + return string(b), err +} + +// Table gets a table (YAML subsection) from a Values object. +// +// The table is returned as a Values. +// +// Compound table names may be specified with dots: +// +// foo.bar +// +// The above will be evaluated as "The table bar inside the table +// foo". +// +// An ErrNoTable is returned if the table does not exist. +func (v Values) Table(name string) (Values, error) { + table := v + var err error + + for _, n := range parsePath(name) { + if table, err = tableLookup(table, n); err != nil { + break + } + } + return table, err +} + +// AsMap is a utility function for converting Values to a map[string]interface{}. +// +// It protects against nil map panics. +func (v Values) AsMap() map[string]interface{} { + if len(v) == 0 { + return map[string]interface{}{} + } + return v +} + +// Encode writes serialized Values information to the given io.Writer. +func (v Values) Encode(w io.Writer) error { + out, err := yaml.Marshal(v) + if err != nil { + return err + } + _, err = w.Write(out) + return err +} + +func tableLookup(v Values, simple string) (Values, error) { + v2, ok := v[simple] + if !ok { + return v, ErrNoTable{simple} + } + if vv, ok := v2.(map[string]interface{}); ok { + return vv, nil + } + + // This catches a case where a value is of type Values, but doesn't (for some + // reason) match the map[string]interface{}. This has been observed in the + // wild, and might be a result of a nil map of type Values. + if vv, ok := v2.(Values); ok { + return vv, nil + } + + return Values{}, ErrNoTable{simple} +} + +// ReadValues will parse YAML byte data into a Values. +func ReadValues(data []byte) (vals Values, err error) { + err = yaml.Unmarshal(data, &vals) + if len(vals) == 0 { + vals = Values{} + } + return vals, err +} + +// ReadValuesFile will parse a YAML file into a map of values. +func ReadValuesFile(filename string) (Values, error) { + data, err := os.ReadFile(filename) + if err != nil { + return map[string]interface{}{}, err + } + return ReadValues(data) +} + +// ReleaseOptions represents the additional release options needed +// for the composition of the final values struct +type ReleaseOptions struct { + Name string + Namespace string + Revision int + IsUpgrade bool + IsInstall bool +} + +// ToRenderValues composes the struct from the data coming from the Releases, Charts and Values files +// +// This takes both ReleaseOptions and Capabilities to merge into the render values. +func ToRenderValues(chrt *chart.Chart, chrtVals map[string]interface{}, options ReleaseOptions, caps *Capabilities) (Values, error) { + return ToRenderValuesWithSchemaValidation(chrt, chrtVals, options, caps, false) +} + +// ToRenderValuesWithSchemaValidation composes the struct from the data coming from the Releases, Charts and Values files +// +// This takes both ReleaseOptions and Capabilities to merge into the render values. +func ToRenderValuesWithSchemaValidation(chrt *chart.Chart, chrtVals map[string]interface{}, options ReleaseOptions, caps *Capabilities, skipSchemaValidation bool) (Values, error) { + if caps == nil { + caps = DefaultCapabilities + } + top := map[string]interface{}{ + "Chart": chrt.Metadata, + "Capabilities": caps, + "Release": map[string]interface{}{ + "Name": options.Name, + "Namespace": options.Namespace, + "IsUpgrade": options.IsUpgrade, + "IsInstall": options.IsInstall, + "Revision": options.Revision, + "Service": "Helm", + }, + } + + vals, err := CoalesceValues(chrt, chrtVals) + if err != nil { + return top, err + } + + if !skipSchemaValidation { + if err := ValidateAgainstSchema(chrt, vals); err != nil { + errFmt := "values don't meet the specifications of the schema(s) in the following chart(s):\n%s" + return top, fmt.Errorf(errFmt, err.Error()) + } + } + + top["Values"] = vals + return top, nil +} + +// istable is a special-purpose function to see if the present thing matches the definition of a YAML table. +func istable(v interface{}) bool { + _, ok := v.(map[string]interface{}) + return ok +} + +// PathValue takes a path that traverses a YAML structure and returns the value at the end of that path. +// The path starts at the root of the YAML structure and is comprised of YAML keys separated by periods. +// Given the following YAML data the value at path "chapter.one.title" is "Loomings". +// +// chapter: +// one: +// title: "Loomings" +func (v Values) PathValue(path string) (interface{}, error) { + if path == "" { + return nil, errors.New("YAML path cannot be empty") + } + return v.pathValue(parsePath(path)) +} + +func (v Values) pathValue(path []string) (interface{}, error) { + if len(path) == 1 { + // if exists must be root key not table + if _, ok := v[path[0]]; ok && !istable(v[path[0]]) { + return v[path[0]], nil + } + return nil, ErrNoValue{path[0]} + } + + key, path := path[len(path)-1], path[:len(path)-1] + // get our table for table path + t, err := v.Table(joinPath(path...)) + if err != nil { + return nil, ErrNoValue{key} + } + // check table for key and ensure value is not a table + if k, ok := t[key]; ok && !istable(k) { + return k, nil + } + return nil, ErrNoValue{key} +} + +func parsePath(key string) []string { return strings.Split(key, ".") } + +func joinPath(path ...string) string { return strings.Join(path, ".") } diff --git a/vendor/helm.sh/helm/v3/pkg/cli/environment.go b/vendor/helm.sh/helm/v3/pkg/cli/environment.go new file mode 100644 index 000000000..0f28c61fd --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/cli/environment.go @@ -0,0 +1,266 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package cli describes the operating environment for the Helm CLI. + +Helm's environment encapsulates all of the service dependencies Helm has. +These dependencies are expressed as interfaces so that alternate implementations +(mocks, etc.) can be easily generated. +*/ +package cli + +import ( + "fmt" + "net/http" + "os" + "strconv" + "strings" + + "github.com/spf13/pflag" + "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/client-go/rest" + + "helm.sh/helm/v3/internal/version" + "helm.sh/helm/v3/pkg/helmpath" +) + +// defaultMaxHistory sets the maximum number of releases to 0: unlimited +const defaultMaxHistory = 10 + +// defaultBurstLimit sets the default client-side throttling limit +const defaultBurstLimit = 100 + +// defaultQPS sets the default QPS value to 0 to use library defaults unless specified +const defaultQPS = float32(0) + +// EnvSettings describes all of the environment settings. +type EnvSettings struct { + namespace string + config *genericclioptions.ConfigFlags + + // KubeConfig is the path to the kubeconfig file + KubeConfig string + // KubeContext is the name of the kubeconfig context. + KubeContext string + // Bearer KubeToken used for authentication + KubeToken string + // Username to impersonate for the operation + KubeAsUser string + // Groups to impersonate for the operation, multiple groups parsed from a comma delimited list + KubeAsGroups []string + // Kubernetes API Server Endpoint for authentication + KubeAPIServer string + // Custom certificate authority file. + KubeCaFile string + // KubeInsecureSkipTLSVerify indicates if server's certificate will not be checked for validity. + // This makes the HTTPS connections insecure + KubeInsecureSkipTLSVerify bool + // KubeTLSServerName overrides the name to use for server certificate validation. + // If it is not provided, the hostname used to contact the server is used + KubeTLSServerName string + // Debug indicates whether or not Helm is running in Debug mode. + Debug bool + // RegistryConfig is the path to the registry config file. + RegistryConfig string + // RepositoryConfig is the path to the repositories file. + RepositoryConfig string + // RepositoryCache is the path to the repository cache directory. + RepositoryCache string + // PluginsDirectory is the path to the plugins directory. + PluginsDirectory string + // MaxHistory is the max release history maintained. + MaxHistory int + // BurstLimit is the default client-side throttling limit. + BurstLimit int + // QPS is queries per second which may be used to avoid throttling. + QPS float32 +} + +func New() *EnvSettings { + env := &EnvSettings{ + namespace: os.Getenv("HELM_NAMESPACE"), + MaxHistory: envIntOr("HELM_MAX_HISTORY", defaultMaxHistory), + KubeContext: os.Getenv("HELM_KUBECONTEXT"), + KubeToken: os.Getenv("HELM_KUBETOKEN"), + KubeAsUser: os.Getenv("HELM_KUBEASUSER"), + KubeAsGroups: envCSV("HELM_KUBEASGROUPS"), + KubeAPIServer: os.Getenv("HELM_KUBEAPISERVER"), + KubeCaFile: os.Getenv("HELM_KUBECAFILE"), + KubeTLSServerName: os.Getenv("HELM_KUBETLS_SERVER_NAME"), + KubeInsecureSkipTLSVerify: envBoolOr("HELM_KUBEINSECURE_SKIP_TLS_VERIFY", false), + PluginsDirectory: envOr("HELM_PLUGINS", helmpath.DataPath("plugins")), + RegistryConfig: envOr("HELM_REGISTRY_CONFIG", helmpath.ConfigPath("registry/config.json")), + RepositoryConfig: envOr("HELM_REPOSITORY_CONFIG", helmpath.ConfigPath("repositories.yaml")), + RepositoryCache: envOr("HELM_REPOSITORY_CACHE", helmpath.CachePath("repository")), + BurstLimit: envIntOr("HELM_BURST_LIMIT", defaultBurstLimit), + QPS: envFloat32Or("HELM_QPS", defaultQPS), + } + env.Debug, _ = strconv.ParseBool(os.Getenv("HELM_DEBUG")) + + // bind to kubernetes config flags + config := &genericclioptions.ConfigFlags{ + Namespace: &env.namespace, + Context: &env.KubeContext, + BearerToken: &env.KubeToken, + APIServer: &env.KubeAPIServer, + CAFile: &env.KubeCaFile, + KubeConfig: &env.KubeConfig, + Impersonate: &env.KubeAsUser, + Insecure: &env.KubeInsecureSkipTLSVerify, + TLSServerName: &env.KubeTLSServerName, + ImpersonateGroup: &env.KubeAsGroups, + WrapConfigFn: func(config *rest.Config) *rest.Config { + config.Burst = env.BurstLimit + config.QPS = env.QPS + config.Wrap(func(rt http.RoundTripper) http.RoundTripper { + return &retryingRoundTripper{wrapped: rt} + }) + config.UserAgent = version.GetUserAgent() + return config + }, + } + if env.BurstLimit != defaultBurstLimit { + config = config.WithDiscoveryBurst(env.BurstLimit) + } + env.config = config + + return env +} + +// AddFlags binds flags to the given flagset. +func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) { + fs.StringVarP(&s.namespace, "namespace", "n", s.namespace, "namespace scope for this request") + fs.StringVar(&s.KubeConfig, "kubeconfig", "", "path to the kubeconfig file") + fs.StringVar(&s.KubeContext, "kube-context", s.KubeContext, "name of the kubeconfig context to use") + fs.StringVar(&s.KubeToken, "kube-token", s.KubeToken, "bearer token used for authentication") + fs.StringVar(&s.KubeAsUser, "kube-as-user", s.KubeAsUser, "username to impersonate for the operation") + fs.StringArrayVar(&s.KubeAsGroups, "kube-as-group", s.KubeAsGroups, "group to impersonate for the operation, this flag can be repeated to specify multiple groups.") + fs.StringVar(&s.KubeAPIServer, "kube-apiserver", s.KubeAPIServer, "the address and the port for the Kubernetes API server") + fs.StringVar(&s.KubeCaFile, "kube-ca-file", s.KubeCaFile, "the certificate authority file for the Kubernetes API server connection") + fs.StringVar(&s.KubeTLSServerName, "kube-tls-server-name", s.KubeTLSServerName, "server name to use for Kubernetes API server certificate validation. If it is not provided, the hostname used to contact the server is used") + fs.BoolVar(&s.KubeInsecureSkipTLSVerify, "kube-insecure-skip-tls-verify", s.KubeInsecureSkipTLSVerify, "if true, the Kubernetes API server's certificate will not be checked for validity. This will make your HTTPS connections insecure") + fs.BoolVar(&s.Debug, "debug", s.Debug, "enable verbose output") + fs.StringVar(&s.RegistryConfig, "registry-config", s.RegistryConfig, "path to the registry config file") + fs.StringVar(&s.RepositoryConfig, "repository-config", s.RepositoryConfig, "path to the file containing repository names and URLs") + fs.StringVar(&s.RepositoryCache, "repository-cache", s.RepositoryCache, "path to the directory containing cached repository indexes") + fs.IntVar(&s.BurstLimit, "burst-limit", s.BurstLimit, "client-side default throttling limit") + fs.Float32Var(&s.QPS, "qps", s.QPS, "queries per second used when communicating with the Kubernetes API, not including bursting") +} + +func envOr(name, def string) string { + if v, ok := os.LookupEnv(name); ok { + return v + } + return def +} + +func envBoolOr(name string, def bool) bool { + if name == "" { + return def + } + envVal := envOr(name, strconv.FormatBool(def)) + ret, err := strconv.ParseBool(envVal) + if err != nil { + return def + } + return ret +} + +func envIntOr(name string, def int) int { + if name == "" { + return def + } + envVal := envOr(name, strconv.Itoa(def)) + ret, err := strconv.Atoi(envVal) + if err != nil { + return def + } + return ret +} + +func envFloat32Or(name string, def float32) float32 { + if name == "" { + return def + } + envVal := envOr(name, strconv.FormatFloat(float64(def), 'f', 2, 32)) + ret, err := strconv.ParseFloat(envVal, 32) + if err != nil { + return def + } + return float32(ret) +} + +func envCSV(name string) (ls []string) { + trimmed := strings.Trim(os.Getenv(name), ", ") + if trimmed != "" { + ls = strings.Split(trimmed, ",") + } + return +} + +func (s *EnvSettings) EnvVars() map[string]string { + envvars := map[string]string{ + "HELM_BIN": os.Args[0], + "HELM_CACHE_HOME": helmpath.CachePath(""), + "HELM_CONFIG_HOME": helmpath.ConfigPath(""), + "HELM_DATA_HOME": helmpath.DataPath(""), + "HELM_DEBUG": fmt.Sprint(s.Debug), + "HELM_PLUGINS": s.PluginsDirectory, + "HELM_REGISTRY_CONFIG": s.RegistryConfig, + "HELM_REPOSITORY_CACHE": s.RepositoryCache, + "HELM_REPOSITORY_CONFIG": s.RepositoryConfig, + "HELM_NAMESPACE": s.Namespace(), + "HELM_MAX_HISTORY": strconv.Itoa(s.MaxHistory), + "HELM_BURST_LIMIT": strconv.Itoa(s.BurstLimit), + "HELM_QPS": strconv.FormatFloat(float64(s.QPS), 'f', 2, 32), + + // broken, these are populated from helm flags and not kubeconfig. + "HELM_KUBECONTEXT": s.KubeContext, + "HELM_KUBETOKEN": s.KubeToken, + "HELM_KUBEASUSER": s.KubeAsUser, + "HELM_KUBEASGROUPS": strings.Join(s.KubeAsGroups, ","), + "HELM_KUBEAPISERVER": s.KubeAPIServer, + "HELM_KUBECAFILE": s.KubeCaFile, + "HELM_KUBEINSECURE_SKIP_TLS_VERIFY": strconv.FormatBool(s.KubeInsecureSkipTLSVerify), + "HELM_KUBETLS_SERVER_NAME": s.KubeTLSServerName, + } + if s.KubeConfig != "" { + envvars["KUBECONFIG"] = s.KubeConfig + } + return envvars +} + +// Namespace gets the namespace from the configuration +func (s *EnvSettings) Namespace() string { + if ns, _, err := s.config.ToRawKubeConfigLoader().Namespace(); err == nil { + return ns + } + if s.namespace != "" { + return s.namespace + } + return "default" +} + +// SetNamespace sets the namespace in the configuration +func (s *EnvSettings) SetNamespace(namespace string) { + s.namespace = namespace +} + +// RESTClientGetter gets the kubeconfig from EnvSettings +func (s *EnvSettings) RESTClientGetter() genericclioptions.RESTClientGetter { + return s.config +} diff --git a/vendor/helm.sh/helm/v3/pkg/cli/roundtripper.go b/vendor/helm.sh/helm/v3/pkg/cli/roundtripper.go new file mode 100644 index 000000000..9cd4eacba --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/cli/roundtripper.go @@ -0,0 +1,80 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cli + +import ( + "bytes" + "encoding/json" + "io" + "net/http" + "strings" +) + +type retryingRoundTripper struct { + wrapped http.RoundTripper +} + +func (rt *retryingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + return rt.roundTrip(req, 1, nil) +} + +func (rt *retryingRoundTripper) roundTrip(req *http.Request, retry int, prevResp *http.Response) (*http.Response, error) { + if retry < 0 { + return prevResp, nil + } + resp, rtErr := rt.wrapped.RoundTrip(req) + if rtErr != nil { + return resp, rtErr + } + if resp.StatusCode < 500 { + return resp, rtErr + } + if resp.Header.Get("content-type") != "application/json" { + return resp, rtErr + } + b, err := io.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + return resp, rtErr + } + + var ke kubernetesError + r := bytes.NewReader(b) + err = json.NewDecoder(r).Decode(&ke) + r.Seek(0, io.SeekStart) + resp.Body = io.NopCloser(r) + if err != nil { + return resp, rtErr + } + if ke.Code < 500 { + return resp, rtErr + } + // Matches messages like "etcdserver: leader changed" + if strings.HasSuffix(ke.Message, "etcdserver: leader changed") { + return rt.roundTrip(req, retry-1, resp) + } + // Matches messages like "rpc error: code = Unknown desc = raft proposal dropped" + if strings.HasSuffix(ke.Message, "raft proposal dropped") { + return rt.roundTrip(req, retry-1, resp) + } + return resp, rtErr +} + +type kubernetesError struct { + Message string `json:"message"` + Code int `json:"code"` +} diff --git a/vendor/helm.sh/helm/v3/pkg/downloader/chart_downloader.go b/vendor/helm.sh/helm/v3/pkg/downloader/chart_downloader.go new file mode 100644 index 000000000..a95894e00 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/downloader/chart_downloader.go @@ -0,0 +1,406 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package downloader + +import ( + "fmt" + "io" + "net/url" + "os" + "path/filepath" + "strings" + + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" + + "helm.sh/helm/v3/internal/fileutil" + "helm.sh/helm/v3/internal/urlutil" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/helmpath" + "helm.sh/helm/v3/pkg/provenance" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/repo" +) + +// VerificationStrategy describes a strategy for determining whether to verify a chart. +type VerificationStrategy int + +const ( + // VerifyNever will skip all verification of a chart. + VerifyNever VerificationStrategy = iota + // VerifyIfPossible will attempt a verification, it will not error if verification + // data is missing. But it will not stop processing if verification fails. + VerifyIfPossible + // VerifyAlways will always attempt a verification, and will fail if the + // verification fails. + VerifyAlways + // VerifyLater will fetch verification data, but not do any verification. + // This is to accommodate the case where another step of the process will + // perform verification. + VerifyLater +) + +// ErrNoOwnerRepo indicates that a given chart URL can't be found in any repos. +var ErrNoOwnerRepo = errors.New("could not find a repo containing the given URL") + +// ChartDownloader handles downloading a chart. +// +// It is capable of performing verifications on charts as well. +type ChartDownloader struct { + // Out is the location to write warning and info messages. + Out io.Writer + // Verify indicates what verification strategy to use. + Verify VerificationStrategy + // Keyring is the keyring file used for verification. + Keyring string + // Getter collection for the operation + Getters getter.Providers + // Options provide parameters to be passed along to the Getter being initialized. + Options []getter.Option + RegistryClient *registry.Client + RepositoryConfig string + RepositoryCache string +} + +// DownloadTo retrieves a chart. Depending on the settings, it may also download a provenance file. +// +// If Verify is set to VerifyNever, the verification will be nil. +// If Verify is set to VerifyIfPossible, this will return a verification (or nil on failure), and print a warning on failure. +// If Verify is set to VerifyAlways, this will return a verification or an error if the verification fails. +// If Verify is set to VerifyLater, this will download the prov file (if it exists), but not verify it. +// +// For VerifyNever and VerifyIfPossible, the Verification may be empty. +// +// Returns a string path to the location where the file was downloaded and a verification +// (if provenance was verified), or an error if something bad happened. +func (c *ChartDownloader) DownloadTo(ref, version, dest string) (string, *provenance.Verification, error) { + u, err := c.ResolveChartVersion(ref, version) + if err != nil { + return "", nil, err + } + + g, err := c.Getters.ByScheme(u.Scheme) + if err != nil { + return "", nil, err + } + + data, err := g.Get(u.String(), c.Options...) + if err != nil { + return "", nil, err + } + + name := filepath.Base(u.Path) + if u.Scheme == registry.OCIScheme { + idx := strings.LastIndexByte(name, ':') + name = fmt.Sprintf("%s-%s.tgz", name[:idx], name[idx+1:]) + } + + destfile := filepath.Join(dest, name) + if err := fileutil.AtomicWriteFile(destfile, data, 0644); err != nil { + return destfile, nil, err + } + + // If provenance is requested, verify it. + ver := &provenance.Verification{} + if c.Verify > VerifyNever { + body, err := g.Get(u.String() + ".prov") + if err != nil { + if c.Verify == VerifyAlways { + return destfile, ver, errors.Errorf("failed to fetch provenance %q", u.String()+".prov") + } + fmt.Fprintf(c.Out, "WARNING: Verification not found for %s: %s\n", ref, err) + return destfile, ver, nil + } + provfile := destfile + ".prov" + if err := fileutil.AtomicWriteFile(provfile, body, 0644); err != nil { + return destfile, nil, err + } + + if c.Verify != VerifyLater { + ver, err = VerifyChart(destfile, c.Keyring) + if err != nil { + // Fail always in this case, since it means the verification step + // failed. + return destfile, ver, err + } + } + } + return destfile, ver, nil +} + +func (c *ChartDownloader) getOciURI(ref, version string, u *url.URL) (*url.URL, error) { + var tag string + var err error + + // Evaluate whether an explicit version has been provided. Otherwise, determine version to use + _, errSemVer := semver.NewVersion(version) + if errSemVer == nil { + tag = version + } else { + // Retrieve list of repository tags + tags, err := c.RegistryClient.Tags(strings.TrimPrefix(ref, fmt.Sprintf("%s://", registry.OCIScheme))) + if err != nil { + return nil, err + } + if len(tags) == 0 { + return nil, errors.Errorf("Unable to locate any tags in provided repository: %s", ref) + } + + // Determine if version provided + // If empty, try to get the highest available tag + // If exact version, try to find it + // If semver constraint string, try to find a match + tag, err = registry.GetTagMatchingVersionOrConstraint(tags, version) + if err != nil { + return nil, err + } + } + + u.Path = fmt.Sprintf("%s:%s", u.Path, tag) + + return u, err +} + +// ResolveChartVersion resolves a chart reference to a URL. +// +// It returns the URL and sets the ChartDownloader's Options that can fetch +// the URL using the appropriate Getter. +// +// A reference may be an HTTP URL, an oci reference URL, a 'reponame/chartname' +// reference, or a local path. +// +// A version is a SemVer string (1.2.3-beta.1+f334a6789). +// +// - For fully qualified URLs, the version will be ignored (since URLs aren't versioned) +// - For a chart reference +// - If version is non-empty, this will return the URL for that version +// - If version is empty, this will return the URL for the latest version +// - If no version can be found, an error is returned +func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, error) { + u, err := url.Parse(ref) + if err != nil { + return nil, errors.Errorf("invalid chart URL format: %s", ref) + } + + if registry.IsOCI(u.String()) { + return c.getOciURI(ref, version, u) + } + + rf, err := loadRepoConfig(c.RepositoryConfig) + if err != nil { + return u, err + } + + if u.IsAbs() && len(u.Host) > 0 && len(u.Path) > 0 { + // In this case, we have to find the parent repo that contains this chart + // URL. And this is an unfortunate problem, as it requires actually going + // through each repo cache file and finding a matching URL. But basically + // we want to find the repo in case we have special SSL cert config + // for that repo. + + rc, err := c.scanReposForURL(ref, rf) + if err != nil { + // If there is no special config, return the default HTTP client and + // swallow the error. + if err == ErrNoOwnerRepo { + // Make sure to add the ref URL as the URL for the getter + c.Options = append(c.Options, getter.WithURL(ref)) + return u, nil + } + return u, err + } + + // If we get here, we don't need to go through the next phase of looking + // up the URL. We have it already. So we just set the parameters and return. + c.Options = append( + c.Options, + getter.WithURL(rc.URL), + ) + if rc.CertFile != "" || rc.KeyFile != "" || rc.CAFile != "" { + c.Options = append(c.Options, getter.WithTLSClientConfig(rc.CertFile, rc.KeyFile, rc.CAFile)) + } + if rc.Username != "" && rc.Password != "" { + c.Options = append( + c.Options, + getter.WithBasicAuth(rc.Username, rc.Password), + getter.WithPassCredentialsAll(rc.PassCredentialsAll), + ) + } + return u, nil + } + + // See if it's of the form: repo/path_to_chart + p := strings.SplitN(u.Path, "/", 2) + if len(p) < 2 { + return u, errors.Errorf("non-absolute URLs should be in form of repo_name/path_to_chart, got: %s", u) + } + + repoName := p[0] + chartName := p[1] + rc, err := pickChartRepositoryConfigByName(repoName, rf.Repositories) + + if err != nil { + return u, err + } + + // Now that we have the chart repository information we can use that URL + // to set the URL for the getter. + c.Options = append(c.Options, getter.WithURL(rc.URL)) + + r, err := repo.NewChartRepository(rc, c.Getters) + if err != nil { + return u, err + } + + if r != nil && r.Config != nil { + if r.Config.CertFile != "" || r.Config.KeyFile != "" || r.Config.CAFile != "" { + c.Options = append(c.Options, getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile)) + } + if r.Config.Username != "" && r.Config.Password != "" { + c.Options = append(c.Options, + getter.WithBasicAuth(r.Config.Username, r.Config.Password), + getter.WithPassCredentialsAll(r.Config.PassCredentialsAll), + ) + } + } + + // Next, we need to load the index, and actually look up the chart. + idxFile := filepath.Join(c.RepositoryCache, helmpath.CacheIndexFile(r.Config.Name)) + i, err := repo.LoadIndexFile(idxFile) + if err != nil { + return u, errors.Wrap(err, "no cached repo found. (try 'helm repo update')") + } + + cv, err := i.Get(chartName, version) + if err != nil { + return u, errors.Wrapf(err, "chart %q matching %s not found in %s index. (try 'helm repo update')", chartName, version, r.Config.Name) + } + + if len(cv.URLs) == 0 { + return u, errors.Errorf("chart %q has no downloadable URLs", ref) + } + + // TODO: Seems that picking first URL is not fully correct + resolvedURL, err := repo.ResolveReferenceURL(rc.URL, cv.URLs[0]) + + if err != nil { + return u, errors.Errorf("invalid chart URL format: %s", ref) + } + + return url.Parse(resolvedURL) +} + +// VerifyChart takes a path to a chart archive and a keyring, and verifies the chart. +// +// It assumes that a chart archive file is accompanied by a provenance file whose +// name is the archive file name plus the ".prov" extension. +func VerifyChart(path, keyring string) (*provenance.Verification, error) { + // For now, error out if it's not a tar file. + switch fi, err := os.Stat(path); { + case err != nil: + return nil, err + case fi.IsDir(): + return nil, errors.New("unpacked charts cannot be verified") + case !isTar(path): + return nil, errors.New("chart must be a tgz file") + } + + provfile := path + ".prov" + if _, err := os.Stat(provfile); err != nil { + return nil, errors.Wrapf(err, "could not load provenance file %s", provfile) + } + + sig, err := provenance.NewFromKeyring(keyring, "") + if err != nil { + return nil, errors.Wrap(err, "failed to load keyring") + } + return sig.Verify(path, provfile) +} + +// isTar tests whether the given file is a tar file. +// +// Currently, this simply checks extension, since a subsequent function will +// untar the file and validate its binary format. +func isTar(filename string) bool { + return strings.EqualFold(filepath.Ext(filename), ".tgz") +} + +func pickChartRepositoryConfigByName(name string, cfgs []*repo.Entry) (*repo.Entry, error) { + for _, rc := range cfgs { + if rc.Name == name { + if rc.URL == "" { + return nil, errors.Errorf("no URL found for repository %s", name) + } + return rc, nil + } + } + return nil, errors.Errorf("repo %s not found", name) +} + +// scanReposForURL scans all repos to find which repo contains the given URL. +// +// This will attempt to find the given URL in all of the known repositories files. +// +// If the URL is found, this will return the repo entry that contained that URL. +// +// If all of the repos are checked, but the URL is not found, an ErrNoOwnerRepo +// error is returned. +// +// Other errors may be returned when repositories cannot be loaded or searched. +// +// Technically, the fact that a URL is not found in a repo is not a failure indication. +// Charts are not required to be included in an index before they are valid. So +// be mindful of this case. +// +// The same URL can technically exist in two or more repositories. This algorithm +// will return the first one it finds. Order is determined by the order of repositories +// in the repositories.yaml file. +func (c *ChartDownloader) scanReposForURL(u string, rf *repo.File) (*repo.Entry, error) { + // FIXME: This is far from optimal. Larger installations and index files will + // incur a performance hit for this type of scanning. + for _, rc := range rf.Repositories { + r, err := repo.NewChartRepository(rc, c.Getters) + if err != nil { + return nil, err + } + + idxFile := filepath.Join(c.RepositoryCache, helmpath.CacheIndexFile(r.Config.Name)) + i, err := repo.LoadIndexFile(idxFile) + if err != nil { + return nil, errors.Wrap(err, "no cached repo found. (try 'helm repo update')") + } + + for _, entry := range i.Entries { + for _, ver := range entry { + for _, dl := range ver.URLs { + if urlutil.Equal(u, dl) { + return rc, nil + } + } + } + } + } + // This means that there is no repo file for the given URL. + return nil, ErrNoOwnerRepo +} + +func loadRepoConfig(file string) (*repo.File, error) { + r, err := repo.LoadFile(file) + if err != nil && !os.IsNotExist(errors.Cause(err)) { + return nil, err + } + return r, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/downloader/doc.go b/vendor/helm.sh/helm/v3/pkg/downloader/doc.go new file mode 100644 index 000000000..848468090 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/downloader/doc.go @@ -0,0 +1,24 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package downloader provides a library for downloading charts. + +This package contains various tools for downloading charts from repository +servers, and then storing them in Helm-specific directory structures. This +library contains many functions that depend on a specific +filesystem layout. +*/ +package downloader diff --git a/vendor/helm.sh/helm/v3/pkg/downloader/manager.go b/vendor/helm.sh/helm/v3/pkg/downloader/manager.go new file mode 100644 index 000000000..ec4056d27 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/downloader/manager.go @@ -0,0 +1,905 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package downloader + +import ( + "crypto" + "encoding/hex" + "fmt" + "io" + "log" + "net/url" + "os" + "path" + "path/filepath" + "regexp" + "strings" + "sync" + + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/internal/resolver" + "helm.sh/helm/v3/internal/third_party/dep/fs" + "helm.sh/helm/v3/internal/urlutil" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/helmpath" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/repo" +) + +// ErrRepoNotFound indicates that chart repositories can't be found in local repo cache. +// The value of Repos is missing repos. +type ErrRepoNotFound struct { + Repos []string +} + +// Error implements the error interface. +func (e ErrRepoNotFound) Error() string { + return fmt.Sprintf("no repository definition for %s", strings.Join(e.Repos, ", ")) +} + +// Manager handles the lifecycle of fetching, resolving, and storing dependencies. +type Manager struct { + // Out is used to print warnings and notifications. + Out io.Writer + // ChartPath is the path to the unpacked base chart upon which this operates. + ChartPath string + // Verification indicates whether the chart should be verified. + Verify VerificationStrategy + // Debug is the global "--debug" flag + Debug bool + // Keyring is the key ring file. + Keyring string + // SkipUpdate indicates that the repository should not be updated first. + SkipUpdate bool + // Getter collection for the operation + Getters []getter.Provider + RegistryClient *registry.Client + RepositoryConfig string + RepositoryCache string +} + +// Build rebuilds a local charts directory from a lockfile. +// +// If the lockfile is not present, this will run a Manager.Update() +// +// If SkipUpdate is set, this will not update the repository. +func (m *Manager) Build() error { + c, err := m.loadChartDir() + if err != nil { + return err + } + + // If a lock file is found, run a build from that. Otherwise, just do + // an update. + lock := c.Lock + if lock == nil { + return m.Update() + } + + // Check that all of the repos we're dependent on actually exist. + req := c.Metadata.Dependencies + + // If using apiVersion v1, calculate the hash before resolve repo names + // because resolveRepoNames will change req if req uses repo alias + // and Helm 2 calculate the digest from the original req + // Fix for: https://github.com/helm/helm/issues/7619 + var v2Sum string + if c.Metadata.APIVersion == chart.APIVersionV1 { + v2Sum, err = resolver.HashV2Req(req) + if err != nil { + return errors.New("the lock file (requirements.lock) is out of sync with the dependencies file (requirements.yaml). Please update the dependencies") + } + } + + if _, err := m.resolveRepoNames(req); err != nil { + return err + } + + if sum, err := resolver.HashReq(req, lock.Dependencies); err != nil || sum != lock.Digest { + // If lock digest differs and chart is apiVersion v1, it maybe because the lock was built + // with Helm 2 and therefore should be checked with Helm v2 hash + // Fix for: https://github.com/helm/helm/issues/7233 + if c.Metadata.APIVersion == chart.APIVersionV1 { + log.Println("warning: a valid Helm v3 hash was not found. Checking against Helm v2 hash...") + if v2Sum != lock.Digest { + return errors.New("the lock file (requirements.lock) is out of sync with the dependencies file (requirements.yaml). Please update the dependencies") + } + } else { + return errors.New("the lock file (Chart.lock) is out of sync with the dependencies file (Chart.yaml). Please update the dependencies") + } + } + + // Check that all of the repos we're dependent on actually exist. + if err := m.hasAllRepos(lock.Dependencies); err != nil { + return err + } + + if !m.SkipUpdate { + // For each repo in the file, update the cached copy of that repo + if err := m.UpdateRepositories(); err != nil { + return err + } + } + + // Now we need to fetch every package here into charts/ + return m.downloadAll(lock.Dependencies) +} + +// Update updates a local charts directory. +// +// It first reads the Chart.yaml file, and then attempts to +// negotiate versions based on that. It will download the versions +// from remote chart repositories unless SkipUpdate is true. +func (m *Manager) Update() error { + c, err := m.loadChartDir() + if err != nil { + return err + } + + // If no dependencies are found, we consider this a successful + // completion. + req := c.Metadata.Dependencies + if req == nil { + return nil + } + + // Get the names of the repositories the dependencies need that Helm is + // configured to know about. + repoNames, err := m.resolveRepoNames(req) + if err != nil { + return err + } + + // For the repositories Helm is not configured to know about, ensure Helm + // has some information about them and, when possible, the index files + // locally. + // TODO(mattfarina): Repositories should be explicitly added by end users + // rather than automatic. In Helm v4 require users to add repositories. They + // should have to add them in order to make sure they are aware of the + // repositories and opt-in to any locations, for security. + repoNames, err = m.ensureMissingRepos(repoNames, req) + if err != nil { + return err + } + + // For each of the repositories Helm is configured to know about, update + // the index information locally. + if !m.SkipUpdate { + if err := m.UpdateRepositories(); err != nil { + return err + } + } + + // Now we need to find out which version of a chart best satisfies the + // dependencies in the Chart.yaml + lock, err := m.resolve(req, repoNames) + if err != nil { + return err + } + + // Now we need to fetch every package here into charts/ + if err := m.downloadAll(lock.Dependencies); err != nil { + return err + } + + // downloadAll might overwrite dependency version, recalculate lock digest + newDigest, err := resolver.HashReq(req, lock.Dependencies) + if err != nil { + return err + } + lock.Digest = newDigest + + // If the lock file hasn't changed, don't write a new one. + oldLock := c.Lock + if oldLock != nil && oldLock.Digest == lock.Digest { + return nil + } + + // Finally, we need to write the lockfile. + return writeLock(m.ChartPath, lock, c.Metadata.APIVersion == chart.APIVersionV1) +} + +func (m *Manager) loadChartDir() (*chart.Chart, error) { + if fi, err := os.Stat(m.ChartPath); err != nil { + return nil, errors.Wrapf(err, "could not find %s", m.ChartPath) + } else if !fi.IsDir() { + return nil, errors.New("only unpacked charts can be updated") + } + return loader.LoadDir(m.ChartPath) +} + +// resolve takes a list of dependencies and translates them into an exact version to download. +// +// This returns a lock file, which has all of the dependencies normalized to a specific version. +func (m *Manager) resolve(req []*chart.Dependency, repoNames map[string]string) (*chart.Lock, error) { + res := resolver.New(m.ChartPath, m.RepositoryCache, m.RegistryClient) + return res.Resolve(req, repoNames) +} + +// downloadAll takes a list of dependencies and downloads them into charts/ +// +// It will delete versions of the chart that exist on disk and might cause +// a conflict. +func (m *Manager) downloadAll(deps []*chart.Dependency) error { + repos, err := m.loadChartRepositories() + if err != nil { + return err + } + + destPath := filepath.Join(m.ChartPath, "charts") + tmpPath := filepath.Join(m.ChartPath, fmt.Sprintf("tmpcharts-%d", os.Getpid())) + + // Check if 'charts' directory is not actually a directory. If it does not exist, create it. + if fi, err := os.Stat(destPath); err == nil { + if !fi.IsDir() { + return errors.Errorf("%q is not a directory", destPath) + } + } else if os.IsNotExist(err) { + if err := os.MkdirAll(destPath, 0755); err != nil { + return err + } + } else { + return fmt.Errorf("unable to retrieve file info for '%s': %v", destPath, err) + } + + // Prepare tmpPath + if err := os.MkdirAll(tmpPath, 0755); err != nil { + return err + } + defer os.RemoveAll(tmpPath) + + fmt.Fprintf(m.Out, "Saving %d charts\n", len(deps)) + var saveError error + churls := make(map[string]struct{}) + for _, dep := range deps { + // No repository means the chart is in charts directory + if dep.Repository == "" { + fmt.Fprintf(m.Out, "Dependency %s did not declare a repository. Assuming it exists in the charts directory\n", dep.Name) + // NOTE: we are only validating the local dependency conforms to the constraints. No copying to tmpPath is necessary. + chartPath := filepath.Join(destPath, dep.Name) + ch, err := loader.LoadDir(chartPath) + if err != nil { + return fmt.Errorf("unable to load chart '%s': %v", chartPath, err) + } + + constraint, err := semver.NewConstraint(dep.Version) + if err != nil { + return fmt.Errorf("dependency %s has an invalid version/constraint format: %s", dep.Name, err) + } + + v, err := semver.NewVersion(ch.Metadata.Version) + if err != nil { + return fmt.Errorf("invalid version %s for dependency %s: %s", dep.Version, dep.Name, err) + } + + if !constraint.Check(v) { + saveError = fmt.Errorf("dependency %s at version %s does not satisfy the constraint %s", dep.Name, ch.Metadata.Version, dep.Version) + break + } + continue + } + if strings.HasPrefix(dep.Repository, "file://") { + if m.Debug { + fmt.Fprintf(m.Out, "Archiving %s from repo %s\n", dep.Name, dep.Repository) + } + ver, err := tarFromLocalDir(m.ChartPath, dep.Name, dep.Repository, dep.Version, tmpPath) + if err != nil { + saveError = err + break + } + dep.Version = ver + continue + } + + // Any failure to resolve/download a chart should fail: + // https://github.com/helm/helm/issues/1439 + churl, username, password, insecureskiptlsverify, passcredentialsall, caFile, certFile, keyFile, err := m.findChartURL(dep.Name, dep.Version, dep.Repository, repos) + if err != nil { + saveError = errors.Wrapf(err, "could not find %s", churl) + break + } + + if _, ok := churls[churl]; ok { + fmt.Fprintf(m.Out, "Already downloaded %s from repo %s\n", dep.Name, dep.Repository) + continue + } + + fmt.Fprintf(m.Out, "Downloading %s from repo %s\n", dep.Name, dep.Repository) + + dl := ChartDownloader{ + Out: m.Out, + Verify: m.Verify, + Keyring: m.Keyring, + RepositoryConfig: m.RepositoryConfig, + RepositoryCache: m.RepositoryCache, + RegistryClient: m.RegistryClient, + Getters: m.Getters, + Options: []getter.Option{ + getter.WithBasicAuth(username, password), + getter.WithPassCredentialsAll(passcredentialsall), + getter.WithInsecureSkipVerifyTLS(insecureskiptlsverify), + getter.WithTLSClientConfig(certFile, keyFile, caFile), + }, + } + + version := "" + if registry.IsOCI(churl) { + churl, version, err = parseOCIRef(churl) + if err != nil { + return errors.Wrapf(err, "could not parse OCI reference") + } + dl.Options = append(dl.Options, + getter.WithRegistryClient(m.RegistryClient), + getter.WithTagName(version)) + } + + if _, _, err = dl.DownloadTo(churl, version, tmpPath); err != nil { + saveError = errors.Wrapf(err, "could not download %s", churl) + break + } + + churls[churl] = struct{}{} + } + + // TODO: this should probably be refactored to be a []error, so we can capture and provide more information rather than "last error wins". + if saveError == nil { + // now we can move all downloaded charts to destPath and delete outdated dependencies + if err := m.safeMoveDeps(deps, tmpPath, destPath); err != nil { + return err + } + } else { + fmt.Fprintln(m.Out, "Save error occurred: ", saveError) + return saveError + } + return nil +} + +func parseOCIRef(chartRef string) (string, string, error) { + refTagRegexp := regexp.MustCompile(`^(oci://[^:]+(:[0-9]{1,5})?[^:]+):(.*)$`) + caps := refTagRegexp.FindStringSubmatch(chartRef) + if len(caps) != 4 { + return "", "", errors.Errorf("improperly formatted oci chart reference: %s", chartRef) + } + chartRef = caps[1] + tag := caps[3] + + return chartRef, tag, nil +} + +// safeMoveDep moves all dependencies in the source and moves them into dest. +// +// It does this by first matching the file name to an expected pattern, then loading +// the file to verify that it is a chart. +// +// Any charts in dest that do not exist in source are removed (barring local dependencies) +// +// Because it requires tar file introspection, it is more intensive than a basic move. +// +// This will only return errors that should stop processing entirely. Other errors +// will emit log messages or be ignored. +func (m *Manager) safeMoveDeps(deps []*chart.Dependency, source, dest string) error { + existsInSourceDirectory := map[string]bool{} + isLocalDependency := map[string]bool{} + sourceFiles, err := os.ReadDir(source) + if err != nil { + return err + } + // attempt to read destFiles; fail fast if we can't + destFiles, err := os.ReadDir(dest) + if err != nil { + return err + } + + for _, dep := range deps { + if dep.Repository == "" { + isLocalDependency[dep.Name] = true + } + } + + for _, file := range sourceFiles { + if file.IsDir() { + continue + } + filename := file.Name() + sourcefile := filepath.Join(source, filename) + destfile := filepath.Join(dest, filename) + existsInSourceDirectory[filename] = true + if _, err := loader.LoadFile(sourcefile); err != nil { + fmt.Fprintf(m.Out, "Could not verify %s for moving: %s (Skipping)", sourcefile, err) + continue + } + // NOTE: no need to delete the dest; os.Rename replaces it. + if err := fs.RenameWithFallback(sourcefile, destfile); err != nil { + fmt.Fprintf(m.Out, "Unable to move %s to charts dir %s (Skipping)", sourcefile, err) + continue + } + } + + fmt.Fprintln(m.Out, "Deleting outdated charts") + // find all files that exist in dest that do not exist in source; delete them (outdated dependencies) + for _, file := range destFiles { + if !file.IsDir() && !existsInSourceDirectory[file.Name()] { + fname := filepath.Join(dest, file.Name()) + ch, err := loader.LoadFile(fname) + if err != nil { + fmt.Fprintf(m.Out, "Could not verify %s for deletion: %s (Skipping)\n", fname, err) + continue + } + // local dependency - skip + if isLocalDependency[ch.Name()] { + continue + } + if err := os.Remove(fname); err != nil { + fmt.Fprintf(m.Out, "Could not delete %s: %s (Skipping)", fname, err) + continue + } + } + } + + return nil +} + +// hasAllRepos ensures that all of the referenced deps are in the local repo cache. +func (m *Manager) hasAllRepos(deps []*chart.Dependency) error { + rf, err := loadRepoConfig(m.RepositoryConfig) + if err != nil { + return err + } + repos := rf.Repositories + + // Verify that all repositories referenced in the deps are actually known + // by Helm. + missing := []string{} +Loop: + for _, dd := range deps { + // If repo is from local path or OCI, continue + if strings.HasPrefix(dd.Repository, "file://") || registry.IsOCI(dd.Repository) { + continue + } + + if dd.Repository == "" { + continue + } + for _, repo := range repos { + if urlutil.Equal(repo.URL, strings.TrimSuffix(dd.Repository, "/")) { + continue Loop + } + } + missing = append(missing, dd.Repository) + } + if len(missing) > 0 { + return ErrRepoNotFound{missing} + } + return nil +} + +// ensureMissingRepos attempts to ensure the repository information for repos +// not managed by Helm is present. This takes in the repoNames Helm is configured +// to work with along with the chart dependencies. It will find the deps not +// in a known repo and attempt to ensure the data is present for steps like +// version resolution. +func (m *Manager) ensureMissingRepos(repoNames map[string]string, deps []*chart.Dependency) (map[string]string, error) { + + var ru []*repo.Entry + + for _, dd := range deps { + + // If the chart is in the local charts directory no repository needs + // to be specified. + if dd.Repository == "" { + continue + } + + // When the repoName for a dependency is known we can skip ensuring + if _, ok := repoNames[dd.Name]; ok { + continue + } + + // The generated repository name, which will result in an index being + // locally cached, has a name pattern of "helm-manager-" followed by a + // sha256 of the repo name. This assumes end users will never create + // repositories with these names pointing to other repositories. Using + // this method of naming allows the existing repository pulling and + // resolution code to do most of the work. + rn, err := key(dd.Repository) + if err != nil { + return repoNames, err + } + rn = managerKeyPrefix + rn + + repoNames[dd.Name] = rn + + // Assuming the repository is generally available. For Helm managed + // access controls the repository needs to be added through the user + // managed system. This path will work for public charts, like those + // supplied by Bitnami, but not for protected charts, like corp ones + // behind a username and pass. + ri := &repo.Entry{ + Name: rn, + URL: dd.Repository, + } + ru = append(ru, ri) + } + + // Calls to UpdateRepositories (a public function) will only update + // repositories configured by the user. Here we update repos found in + // the dependencies that are not known to the user if update skipping + // is not configured. + if !m.SkipUpdate && len(ru) > 0 { + fmt.Fprintln(m.Out, "Getting updates for unmanaged Helm repositories...") + if err := m.parallelRepoUpdate(ru); err != nil { + return repoNames, err + } + } + + return repoNames, nil +} + +// resolveRepoNames returns the repo names of the referenced deps which can be used to fetch the cached index file +// and replaces aliased repository URLs into resolved URLs in dependencies. +func (m *Manager) resolveRepoNames(deps []*chart.Dependency) (map[string]string, error) { + rf, err := loadRepoConfig(m.RepositoryConfig) + if err != nil { + if os.IsNotExist(err) { + return make(map[string]string), nil + } + return nil, err + } + repos := rf.Repositories + + reposMap := make(map[string]string) + + // Verify that all repositories referenced in the deps are actually known + // by Helm. + missing := []string{} + for _, dd := range deps { + // Don't map the repository, we don't need to download chart from charts directory + if dd.Repository == "" { + continue + } + // if dep chart is from local path, verify the path is valid + if strings.HasPrefix(dd.Repository, "file://") { + if _, err := resolver.GetLocalPath(dd.Repository, m.ChartPath); err != nil { + return nil, err + } + + if m.Debug { + fmt.Fprintf(m.Out, "Repository from local path: %s\n", dd.Repository) + } + reposMap[dd.Name] = dd.Repository + continue + } + + if registry.IsOCI(dd.Repository) { + reposMap[dd.Name] = dd.Repository + continue + } + + found := false + + for _, repo := range repos { + if (strings.HasPrefix(dd.Repository, "@") && strings.TrimPrefix(dd.Repository, "@") == repo.Name) || + (strings.HasPrefix(dd.Repository, "alias:") && strings.TrimPrefix(dd.Repository, "alias:") == repo.Name) { + found = true + dd.Repository = repo.URL + reposMap[dd.Name] = repo.Name + break + } else if urlutil.Equal(repo.URL, dd.Repository) { + found = true + reposMap[dd.Name] = repo.Name + break + } + } + if !found { + repository := dd.Repository + // Add if URL + _, err := url.ParseRequestURI(repository) + if err == nil { + reposMap[repository] = repository + continue + } + missing = append(missing, repository) + } + } + if len(missing) > 0 { + errorMessage := fmt.Sprintf("no repository definition for %s. Please add them via 'helm repo add'", strings.Join(missing, ", ")) + // It is common for people to try to enter "stable" as a repository instead of the actual URL. + // For this case, let's give them a suggestion. + containsNonURL := false + for _, repo := range missing { + if !strings.Contains(repo, "//") && !strings.HasPrefix(repo, "@") && !strings.HasPrefix(repo, "alias:") { + containsNonURL = true + } + } + if containsNonURL { + errorMessage += ` +Note that repositories must be URLs or aliases. For example, to refer to the "example" +repository, use "https://charts.example.com/" or "@example" instead of +"example". Don't forget to add the repo, too ('helm repo add').` + } + return nil, errors.New(errorMessage) + } + return reposMap, nil +} + +// UpdateRepositories updates all of the local repos to the latest. +func (m *Manager) UpdateRepositories() error { + rf, err := loadRepoConfig(m.RepositoryConfig) + if err != nil { + return err + } + repos := rf.Repositories + if len(repos) > 0 { + fmt.Fprintln(m.Out, "Hang tight while we grab the latest from your chart repositories...") + // This prints warnings straight to out. + if err := m.parallelRepoUpdate(repos); err != nil { + return err + } + fmt.Fprintln(m.Out, "Update Complete. ⎈Happy Helming!⎈") + } + return nil +} + +func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error { + + var wg sync.WaitGroup + for _, c := range repos { + r, err := repo.NewChartRepository(c, m.Getters) + if err != nil { + return err + } + r.CachePath = m.RepositoryCache + wg.Add(1) + go func(r *repo.ChartRepository) { + if _, err := r.DownloadIndexFile(); err != nil { + // For those dependencies that are not known to helm and using a + // generated key name we display the repo url. + if strings.HasPrefix(r.Config.Name, managerKeyPrefix) { + fmt.Fprintf(m.Out, "...Unable to get an update from the %q chart repository:\n\t%s\n", r.Config.URL, err) + } else { + fmt.Fprintf(m.Out, "...Unable to get an update from the %q chart repository (%s):\n\t%s\n", r.Config.Name, r.Config.URL, err) + } + } else { + // For those dependencies that are not known to helm and using a + // generated key name we display the repo url. + if strings.HasPrefix(r.Config.Name, managerKeyPrefix) { + fmt.Fprintf(m.Out, "...Successfully got an update from the %q chart repository\n", r.Config.URL) + } else { + fmt.Fprintf(m.Out, "...Successfully got an update from the %q chart repository\n", r.Config.Name) + } + } + wg.Done() + }(r) + } + wg.Wait() + + return nil +} + +// findChartURL searches the cache of repo data for a chart that has the name and the repoURL specified. +// +// 'name' is the name of the chart. Version is an exact semver, or an empty string. If empty, the +// newest version will be returned. +// +// repoURL is the repository to search +// +// If it finds a URL that is "relative", it will prepend the repoURL. +func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, insecureskiptlsverify, passcredentialsall bool, caFile, certFile, keyFile string, err error) { + if registry.IsOCI(repoURL) { + return fmt.Sprintf("%s/%s:%s", repoURL, name, version), "", "", false, false, "", "", "", nil + } + + for _, cr := range repos { + + if urlutil.Equal(repoURL, cr.Config.URL) { + var entry repo.ChartVersions + entry, err = findEntryByName(name, cr) + if err != nil { + // TODO: Where linting is skipped in this function we should + // refactor to remove naked returns while ensuring the same + // behavior + //nolint:nakedret + return + } + var ve *repo.ChartVersion + ve, err = findVersionedEntry(version, entry) + if err != nil { + //nolint:nakedret + return + } + url, err = normalizeURL(repoURL, ve.URLs[0]) + if err != nil { + //nolint:nakedret + return + } + username = cr.Config.Username + password = cr.Config.Password + passcredentialsall = cr.Config.PassCredentialsAll + insecureskiptlsverify = cr.Config.InsecureSkipTLSverify + caFile = cr.Config.CAFile + certFile = cr.Config.CertFile + keyFile = cr.Config.KeyFile + //nolint:nakedret + return + } + } + url, err = repo.FindChartInRepoURL(repoURL, name, version, certFile, keyFile, caFile, m.Getters) + if err == nil { + return url, username, password, false, false, "", "", "", err + } + err = errors.Errorf("chart %s not found in %s: %s", name, repoURL, err) + return url, username, password, false, false, "", "", "", err +} + +// findEntryByName finds an entry in the chart repository whose name matches the given name. +// +// It returns the ChartVersions for that entry. +func findEntryByName(name string, cr *repo.ChartRepository) (repo.ChartVersions, error) { + for ename, entry := range cr.IndexFile.Entries { + if ename == name { + return entry, nil + } + } + return nil, errors.New("entry not found") +} + +// findVersionedEntry takes a ChartVersions list and returns a single chart version that satisfies the version constraints. +// +// If version is empty, the first chart found is returned. +func findVersionedEntry(version string, vers repo.ChartVersions) (*repo.ChartVersion, error) { + for _, verEntry := range vers { + if len(verEntry.URLs) == 0 { + // Not a legit entry. + continue + } + + if version == "" || versionEquals(version, verEntry.Version) { + return verEntry, nil + } + } + return nil, errors.New("no matching version") +} + +func versionEquals(v1, v2 string) bool { + sv1, err := semver.NewVersion(v1) + if err != nil { + // Fallback to string comparison. + return v1 == v2 + } + sv2, err := semver.NewVersion(v2) + if err != nil { + return false + } + return sv1.Equal(sv2) +} + +func normalizeURL(baseURL, urlOrPath string) (string, error) { + u, err := url.Parse(urlOrPath) + if err != nil { + return urlOrPath, err + } + if u.IsAbs() { + return u.String(), nil + } + u2, err := url.Parse(baseURL) + if err != nil { + return urlOrPath, errors.Wrap(err, "base URL failed to parse") + } + + u2.RawPath = path.Join(u2.RawPath, urlOrPath) + u2.Path = path.Join(u2.Path, urlOrPath) + return u2.String(), nil +} + +// loadChartRepositories reads the repositories.yaml, and then builds a map of +// ChartRepositories. +// +// The key is the local name (which is only present in the repositories.yaml). +func (m *Manager) loadChartRepositories() (map[string]*repo.ChartRepository, error) { + indices := map[string]*repo.ChartRepository{} + + // Load repositories.yaml file + rf, err := loadRepoConfig(m.RepositoryConfig) + if err != nil { + return indices, errors.Wrapf(err, "failed to load %s", m.RepositoryConfig) + } + + for _, re := range rf.Repositories { + lname := re.Name + idxFile := filepath.Join(m.RepositoryCache, helmpath.CacheIndexFile(lname)) + index, err := repo.LoadIndexFile(idxFile) + if err != nil { + return indices, err + } + + // TODO: use constructor + cr := &repo.ChartRepository{ + Config: re, + IndexFile: index, + } + indices[lname] = cr + } + return indices, nil +} + +// writeLock writes a lockfile to disk +func writeLock(chartpath string, lock *chart.Lock, legacyLockfile bool) error { + data, err := yaml.Marshal(lock) + if err != nil { + return err + } + lockfileName := "Chart.lock" + if legacyLockfile { + lockfileName = "requirements.lock" + } + dest := filepath.Join(chartpath, lockfileName) + return os.WriteFile(dest, data, 0644) +} + +// archive a dep chart from local directory and save it into destPath +func tarFromLocalDir(chartpath, name, repo, version, destPath string) (string, error) { + if !strings.HasPrefix(repo, "file://") { + return "", errors.Errorf("wrong format: chart %s repository %s", name, repo) + } + + origPath, err := resolver.GetLocalPath(repo, chartpath) + if err != nil { + return "", err + } + + ch, err := loader.LoadDir(origPath) + if err != nil { + return "", err + } + + constraint, err := semver.NewConstraint(version) + if err != nil { + return "", errors.Wrapf(err, "dependency %s has an invalid version/constraint format", name) + } + + v, err := semver.NewVersion(ch.Metadata.Version) + if err != nil { + return "", err + } + + if constraint.Check(v) { + _, err = chartutil.Save(ch, destPath) + return ch.Metadata.Version, err + } + + return "", errors.Errorf("can't get a valid version for dependency %s", name) +} + +// The prefix to use for cache keys created by the manager for repo names +const managerKeyPrefix = "helm-manager-" + +// key is used to turn a name, such as a repository url, into a filesystem +// safe name that is unique for querying. To accomplish this a unique hash of +// the string is used. +func key(name string) (string, error) { + in := strings.NewReader(name) + hash := crypto.SHA256.New() + if _, err := io.Copy(hash, in); err != nil { + return "", nil + } + return hex.EncodeToString(hash.Sum(nil)), nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/engine/doc.go b/vendor/helm.sh/helm/v3/pkg/engine/doc.go new file mode 100644 index 000000000..6b3443aaf --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/engine/doc.go @@ -0,0 +1,24 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package engine implements the Go text template engine as needed for Helm. + +When Helm renders templates it does so with additional functions and different +modes (e.g., strict, lint mode). This package handles the helm specific +implementation. +*/ +package engine // import "helm.sh/helm/v3/pkg/engine" diff --git a/vendor/helm.sh/helm/v3/pkg/engine/engine.go b/vendor/helm.sh/helm/v3/pkg/engine/engine.go new file mode 100644 index 000000000..df3a600a3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/engine/engine.go @@ -0,0 +1,441 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package engine + +import ( + "fmt" + "log" + "path" + "path/filepath" + "regexp" + "sort" + "strings" + "text/template" + + "github.com/pkg/errors" + "k8s.io/client-go/rest" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chartutil" +) + +// Engine is an implementation of the Helm rendering implementation for templates. +type Engine struct { + // If strict is enabled, template rendering will fail if a template references + // a value that was not passed in. + Strict bool + // In LintMode, some 'required' template values may be missing, so don't fail + LintMode bool + // optional provider of clients to talk to the Kubernetes API + clientProvider *ClientProvider + // EnableDNS tells the engine to allow DNS lookups when rendering templates + EnableDNS bool +} + +// New creates a new instance of Engine using the passed in rest config. +func New(config *rest.Config) Engine { + var clientProvider ClientProvider = clientProviderFromConfig{config} + return Engine{ + clientProvider: &clientProvider, + } +} + +// Render takes a chart, optional values, and value overrides, and attempts to render the Go templates. +// +// Render can be called repeatedly on the same engine. +// +// This will look in the chart's 'templates' data (e.g. the 'templates/' directory) +// and attempt to render the templates there using the values passed in. +// +// Values are scoped to their templates. A dependency template will not have +// access to the values set for its parent. If chart "foo" includes chart "bar", +// "bar" will not have access to the values for "foo". +// +// Values should be prepared with something like `chartutils.ReadValues`. +// +// Values are passed through the templates according to scope. If the top layer +// chart includes the chart foo, which includes the chart bar, the values map +// will be examined for a table called "foo". If "foo" is found in vals, +// that section of the values will be passed into the "foo" chart. And if that +// section contains a value named "bar", that value will be passed on to the +// bar chart during render time. +func (e Engine) Render(chrt *chart.Chart, values chartutil.Values) (map[string]string, error) { + tmap := allTemplates(chrt, values) + return e.render(tmap) +} + +// Render takes a chart, optional values, and value overrides, and attempts to +// render the Go templates using the default options. +func Render(chrt *chart.Chart, values chartutil.Values) (map[string]string, error) { + return new(Engine).Render(chrt, values) +} + +// RenderWithClient takes a chart, optional values, and value overrides, and attempts to +// render the Go templates using the default options. This engine is client aware and so can have template +// functions that interact with the client. +func RenderWithClient(chrt *chart.Chart, values chartutil.Values, config *rest.Config) (map[string]string, error) { + var clientProvider ClientProvider = clientProviderFromConfig{config} + return Engine{ + clientProvider: &clientProvider, + }.Render(chrt, values) +} + +// RenderWithClientProvider takes a chart, optional values, and value overrides, and attempts to +// render the Go templates using the default options. This engine is client aware and so can have template +// functions that interact with the client. +// This function differs from RenderWithClient in that it lets you customize the way a dynamic client is constructed. +func RenderWithClientProvider(chrt *chart.Chart, values chartutil.Values, clientProvider ClientProvider) (map[string]string, error) { + return Engine{ + clientProvider: &clientProvider, + }.Render(chrt, values) +} + +// renderable is an object that can be rendered. +type renderable struct { + // tpl is the current template. + tpl string + // vals are the values to be supplied to the template. + vals chartutil.Values + // namespace prefix to the templates of the current chart + basePath string +} + +const warnStartDelim = "HELM_ERR_START" +const warnEndDelim = "HELM_ERR_END" +const recursionMaxNums = 1000 + +var warnRegex = regexp.MustCompile(warnStartDelim + `((?s).*)` + warnEndDelim) + +func warnWrap(warn string) string { + return warnStartDelim + warn + warnEndDelim +} + +// 'include' needs to be defined in the scope of a 'tpl' template as +// well as regular file-loaded templates. +func includeFun(t *template.Template, includedNames map[string]int) func(string, interface{}) (string, error) { + return func(name string, data interface{}) (string, error) { + var buf strings.Builder + if v, ok := includedNames[name]; ok { + if v > recursionMaxNums { + return "", errors.Wrapf(fmt.Errorf("unable to execute template"), "rendering template has a nested reference name: %s", name) + } + includedNames[name]++ + } else { + includedNames[name] = 1 + } + err := t.ExecuteTemplate(&buf, name, data) + includedNames[name]-- + return buf.String(), err + } +} + +// As does 'tpl', so that nested calls to 'tpl' see the templates +// defined by their enclosing contexts. +func tplFun(parent *template.Template, includedNames map[string]int, strict bool) func(string, interface{}) (string, error) { + return func(tpl string, vals interface{}) (string, error) { + t, err := parent.Clone() + if err != nil { + return "", errors.Wrapf(err, "cannot clone template") + } + + // Re-inject the missingkey option, see text/template issue https://github.com/golang/go/issues/43022 + // We have to go by strict from our engine configuration, as the option fields are private in Template. + // TODO: Remove workaround (and the strict parameter) once we build only with golang versions with a fix. + if strict { + t.Option("missingkey=error") + } else { + t.Option("missingkey=zero") + } + + // Re-inject 'include' so that it can close over our clone of t; + // this lets any 'define's inside tpl be 'include'd. + t.Funcs(template.FuncMap{ + "include": includeFun(t, includedNames), + "tpl": tplFun(t, includedNames, strict), + }) + + // We need a .New template, as template text which is just blanks + // or comments after parsing out defines just adds new named + // template definitions without changing the main template. + // https://pkg.go.dev/text/template#Template.Parse + // Use the parent's name for lack of a better way to identify the tpl + // text string. (Maybe we could use a hash appended to the name?) + t, err = t.New(parent.Name()).Parse(tpl) + if err != nil { + return "", errors.Wrapf(err, "cannot parse template %q", tpl) + } + + var buf strings.Builder + if err := t.Execute(&buf, vals); err != nil { + return "", errors.Wrapf(err, "error during tpl function execution for %q", tpl) + } + + // See comment in renderWithReferences explaining the <no value> hack. + return strings.ReplaceAll(buf.String(), "<no value>", ""), nil + } +} + +// initFunMap creates the Engine's FuncMap and adds context-specific functions. +func (e Engine) initFunMap(t *template.Template) { + funcMap := funcMap() + includedNames := make(map[string]int) + + // Add the template-rendering functions here so we can close over t. + funcMap["include"] = includeFun(t, includedNames) + funcMap["tpl"] = tplFun(t, includedNames, e.Strict) + + // Add the `required` function here so we can use lintMode + funcMap["required"] = func(warn string, val interface{}) (interface{}, error) { + if val == nil { + if e.LintMode { + // Don't fail on missing required values when linting + log.Printf("[INFO] Missing required value: %s", warn) + return "", nil + } + return val, errors.Errorf(warnWrap(warn)) + } else if _, ok := val.(string); ok { + if val == "" { + if e.LintMode { + // Don't fail on missing required values when linting + log.Printf("[INFO] Missing required value: %s", warn) + return "", nil + } + return val, errors.Errorf(warnWrap(warn)) + } + } + return val, nil + } + + // Override sprig fail function for linting and wrapping message + funcMap["fail"] = func(msg string) (string, error) { + if e.LintMode { + // Don't fail when linting + log.Printf("[INFO] Fail: %s", msg) + return "", nil + } + return "", errors.New(warnWrap(msg)) + } + + // If we are not linting and have a cluster connection, provide a Kubernetes-backed + // implementation. + if !e.LintMode && e.clientProvider != nil { + funcMap["lookup"] = newLookupFunction(*e.clientProvider) + } + + // When DNS lookups are not enabled override the sprig function and return + // an empty string. + if !e.EnableDNS { + funcMap["getHostByName"] = func(_ string) string { + return "" + } + } + + t.Funcs(funcMap) +} + +// render takes a map of templates/values and renders them. +func (e Engine) render(tpls map[string]renderable) (rendered map[string]string, err error) { + // Basically, what we do here is start with an empty parent template and then + // build up a list of templates -- one for each file. Once all of the templates + // have been parsed, we loop through again and execute every template. + // + // The idea with this process is to make it possible for more complex templates + // to share common blocks, but to make the entire thing feel like a file-based + // template engine. + defer func() { + if r := recover(); r != nil { + err = errors.Errorf("rendering template failed: %v", r) + } + }() + t := template.New("gotpl") + if e.Strict { + t.Option("missingkey=error") + } else { + // Not that zero will attempt to add default values for types it knows, + // but will still emit <no value> for others. We mitigate that later. + t.Option("missingkey=zero") + } + + e.initFunMap(t) + + // We want to parse the templates in a predictable order. The order favors + // higher-level (in file system) templates over deeply nested templates. + keys := sortTemplates(tpls) + + for _, filename := range keys { + r := tpls[filename] + if _, err := t.New(filename).Parse(r.tpl); err != nil { + return map[string]string{}, cleanupParseError(filename, err) + } + } + + rendered = make(map[string]string, len(keys)) + for _, filename := range keys { + // Don't render partials. We don't care out the direct output of partials. + // They are only included from other templates. + if strings.HasPrefix(path.Base(filename), "_") { + continue + } + // At render time, add information about the template that is being rendered. + vals := tpls[filename].vals + vals["Template"] = chartutil.Values{"Name": filename, "BasePath": tpls[filename].basePath} + var buf strings.Builder + if err := t.ExecuteTemplate(&buf, filename, vals); err != nil { + return map[string]string{}, cleanupExecError(filename, err) + } + + // Work around the issue where Go will emit "<no value>" even if Options(missing=zero) + // is set. Since missing=error will never get here, we do not need to handle + // the Strict case. + rendered[filename] = strings.ReplaceAll(buf.String(), "<no value>", "") + } + + return rendered, nil +} + +func cleanupParseError(filename string, err error) error { + tokens := strings.Split(err.Error(), ": ") + if len(tokens) == 1 { + // This might happen if a non-templating error occurs + return fmt.Errorf("parse error in (%s): %s", filename, err) + } + // The first token is "template" + // The second token is either "filename:lineno" or "filename:lineNo:columnNo" + location := tokens[1] + // The remaining tokens make up a stacktrace-like chain, ending with the relevant error + errMsg := tokens[len(tokens)-1] + return fmt.Errorf("parse error at (%s): %s", string(location), errMsg) +} + +func cleanupExecError(filename string, err error) error { + if _, isExecError := err.(template.ExecError); !isExecError { + return err + } + + tokens := strings.SplitN(err.Error(), ": ", 3) + if len(tokens) != 3 { + // This might happen if a non-templating error occurs + return fmt.Errorf("execution error in (%s): %s", filename, err) + } + + // The first token is "template" + // The second token is either "filename:lineno" or "filename:lineNo:columnNo" + location := tokens[1] + + parts := warnRegex.FindStringSubmatch(tokens[2]) + if len(parts) >= 2 { + return fmt.Errorf("execution error at (%s): %s", string(location), parts[1]) + } + + return err +} + +func sortTemplates(tpls map[string]renderable) []string { + keys := make([]string, len(tpls)) + i := 0 + for key := range tpls { + keys[i] = key + i++ + } + sort.Sort(sort.Reverse(byPathLen(keys))) + return keys +} + +type byPathLen []string + +func (p byPathLen) Len() int { return len(p) } +func (p byPathLen) Swap(i, j int) { p[j], p[i] = p[i], p[j] } +func (p byPathLen) Less(i, j int) bool { + a, b := p[i], p[j] + ca, cb := strings.Count(a, "/"), strings.Count(b, "/") + if ca == cb { + return strings.Compare(a, b) == -1 + } + return ca < cb +} + +// allTemplates returns all templates for a chart and its dependencies. +// +// As it goes, it also prepares the values in a scope-sensitive manner. +func allTemplates(c *chart.Chart, vals chartutil.Values) map[string]renderable { + templates := make(map[string]renderable) + recAllTpls(c, templates, vals) + return templates +} + +// recAllTpls recurses through the templates in a chart. +// +// As it recurses, it also sets the values to be appropriate for the template +// scope. +func recAllTpls(c *chart.Chart, templates map[string]renderable, vals chartutil.Values) map[string]interface{} { + subCharts := make(map[string]interface{}) + chartMetaData := struct { + chart.Metadata + IsRoot bool + }{*c.Metadata, c.IsRoot()} + + next := map[string]interface{}{ + "Chart": chartMetaData, + "Files": newFiles(c.Files), + "Release": vals["Release"], + "Capabilities": vals["Capabilities"], + "Values": make(chartutil.Values), + "Subcharts": subCharts, + } + + // If there is a {{.Values.ThisChart}} in the parent metadata, + // copy that into the {{.Values}} for this template. + if c.IsRoot() { + next["Values"] = vals["Values"] + } else if vs, err := vals.Table("Values." + c.Name()); err == nil { + next["Values"] = vs + } + + for _, child := range c.Dependencies() { + subCharts[child.Name()] = recAllTpls(child, templates, next) + } + + newParentID := c.ChartFullPath() + for _, t := range c.Templates { + if t == nil { + continue + } + if !isTemplateValid(c, t.Name) { + continue + } + templates[path.Join(newParentID, t.Name)] = renderable{ + tpl: string(t.Data), + vals: next, + basePath: path.Join(newParentID, "templates"), + } + } + + return next +} + +// isTemplateValid returns true if the template is valid for the chart type +func isTemplateValid(ch *chart.Chart, templateName string) bool { + if isLibraryChart(ch) { + return strings.HasPrefix(filepath.Base(templateName), "_") + } + return true +} + +// isLibraryChart returns true if the chart is a library chart +func isLibraryChart(c *chart.Chart) bool { + return strings.EqualFold(c.Metadata.Type, "library") +} diff --git a/vendor/helm.sh/helm/v3/pkg/engine/files.go b/vendor/helm.sh/helm/v3/pkg/engine/files.go new file mode 100644 index 000000000..f2cfdb3f3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/engine/files.go @@ -0,0 +1,165 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package engine + +import ( + "encoding/base64" + "path" + "strings" + + "github.com/gobwas/glob" + + "helm.sh/helm/v3/pkg/chart" +) + +// files is a map of files in a chart that can be accessed from a template. +type files map[string][]byte + +// NewFiles creates a new files from chart files. +// Given an []*chart.File (the format for files in a chart.Chart), extract a map of files. +func newFiles(from []*chart.File) files { + files := make(map[string][]byte) + for _, f := range from { + files[f.Name] = f.Data + } + return files +} + +// GetBytes gets a file by path. +// +// The returned data is raw. In a template context, this is identical to calling +// {{index .Files $path}}. +// +// This is intended to be accessed from within a template, so a missed key returns +// an empty []byte. +func (f files) GetBytes(name string) []byte { + if v, ok := f[name]; ok { + return v + } + return []byte{} +} + +// Get returns a string representation of the given file. +// +// Fetch the contents of a file as a string. It is designed to be called in a +// template. +// +// {{.Files.Get "foo"}} +func (f files) Get(name string) string { + return string(f.GetBytes(name)) +} + +// Glob takes a glob pattern and returns another files object only containing +// matched files. +// +// This is designed to be called from a template. +// +// {{ range $name, $content := .Files.Glob("foo/**") }} +// {{ $name }}: | +// {{ .Files.Get($name) | indent 4 }}{{ end }} +func (f files) Glob(pattern string) files { + g, err := glob.Compile(pattern, '/') + if err != nil { + g, _ = glob.Compile("**") + } + + nf := newFiles(nil) + for name, contents := range f { + if g.Match(name) { + nf[name] = contents + } + } + + return nf +} + +// AsConfig turns a Files group and flattens it to a YAML map suitable for +// including in the 'data' section of a Kubernetes ConfigMap definition. +// Duplicate keys will be overwritten, so be aware that your file names +// (regardless of path) should be unique. +// +// This is designed to be called from a template, and will return empty string +// (via toYAML function) if it cannot be serialized to YAML, or if the Files +// object is nil. +// +// The output will not be indented, so you will want to pipe this to the +// 'indent' template function. +// +// data: +// +// {{ .Files.Glob("config/**").AsConfig() | indent 4 }} +func (f files) AsConfig() string { + if f == nil { + return "" + } + + m := make(map[string]string) + + // Explicitly convert to strings, and file names + for k, v := range f { + m[path.Base(k)] = string(v) + } + + return toYAML(m) +} + +// AsSecrets returns the base64-encoded value of a Files object suitable for +// including in the 'data' section of a Kubernetes Secret definition. +// Duplicate keys will be overwritten, so be aware that your file names +// (regardless of path) should be unique. +// +// This is designed to be called from a template, and will return empty string +// (via toYAML function) if it cannot be serialized to YAML, or if the Files +// object is nil. +// +// The output will not be indented, so you will want to pipe this to the +// 'indent' template function. +// +// data: +// +// {{ .Files.Glob("secrets/*").AsSecrets() | indent 4 }} +func (f files) AsSecrets() string { + if f == nil { + return "" + } + + m := make(map[string]string) + + for k, v := range f { + m[path.Base(k)] = base64.StdEncoding.EncodeToString(v) + } + + return toYAML(m) +} + +// Lines returns each line of a named file (split by "\n") as a slice, so it can +// be ranged over in your templates. +// +// This is designed to be called from a template. +// +// {{ range .Files.Lines "foo/bar.html" }} +// {{ . }}{{ end }} +func (f files) Lines(path string) []string { + if f == nil || f[path] == nil { + return []string{} + } + s := string(f[path]) + if s[len(s)-1] == '\n' { + s = s[:len(s)-1] + } + return strings.Split(s, "\n") +} diff --git a/vendor/helm.sh/helm/v3/pkg/engine/funcs.go b/vendor/helm.sh/helm/v3/pkg/engine/funcs.go new file mode 100644 index 000000000..8f05a3a1d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/engine/funcs.go @@ -0,0 +1,176 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package engine + +import ( + "bytes" + "encoding/json" + "strings" + "text/template" + + "github.com/BurntSushi/toml" + "github.com/Masterminds/sprig/v3" + "sigs.k8s.io/yaml" +) + +// funcMap returns a mapping of all of the functions that Engine has. +// +// Because some functions are late-bound (e.g. contain context-sensitive +// data), the functions may not all perform identically outside of an Engine +// as they will inside of an Engine. +// +// Known late-bound functions: +// +// - "include" +// - "tpl" +// +// These are late-bound in Engine.Render(). The +// version included in the FuncMap is a placeholder. +func funcMap() template.FuncMap { + f := sprig.TxtFuncMap() + delete(f, "env") + delete(f, "expandenv") + + // Add some extra functionality + extra := template.FuncMap{ + "toToml": toTOML, + "toYaml": toYAML, + "fromYaml": fromYAML, + "fromYamlArray": fromYAMLArray, + "toJson": toJSON, + "fromJson": fromJSON, + "fromJsonArray": fromJSONArray, + + // This is a placeholder for the "include" function, which is + // late-bound to a template. By declaring it here, we preserve the + // integrity of the linter. + "include": func(string, interface{}) string { return "not implemented" }, + "tpl": func(string, interface{}) interface{} { return "not implemented" }, + "required": func(string, interface{}) (interface{}, error) { return "not implemented", nil }, + // Provide a placeholder for the "lookup" function, which requires a kubernetes + // connection. + "lookup": func(string, string, string, string) (map[string]interface{}, error) { + return map[string]interface{}{}, nil + }, + } + + for k, v := range extra { + f[k] = v + } + + return f +} + +// toYAML takes an interface, marshals it to yaml, and returns a string. It will +// always return a string, even on marshal error (empty string). +// +// This is designed to be called from a template. +func toYAML(v interface{}) string { + data, err := yaml.Marshal(v) + if err != nil { + // Swallow errors inside of a template. + return "" + } + return strings.TrimSuffix(string(data), "\n") +} + +// fromYAML converts a YAML document into a map[string]interface{}. +// +// This is not a general-purpose YAML parser, and will not parse all valid +// YAML documents. Additionally, because its intended use is within templates +// it tolerates errors. It will insert the returned error message string into +// m["Error"] in the returned map. +func fromYAML(str string) map[string]interface{} { + m := map[string]interface{}{} + + if err := yaml.Unmarshal([]byte(str), &m); err != nil { + m["Error"] = err.Error() + } + return m +} + +// fromYAMLArray converts a YAML array into a []interface{}. +// +// This is not a general-purpose YAML parser, and will not parse all valid +// YAML documents. Additionally, because its intended use is within templates +// it tolerates errors. It will insert the returned error message string as +// the first and only item in the returned array. +func fromYAMLArray(str string) []interface{} { + a := []interface{}{} + + if err := yaml.Unmarshal([]byte(str), &a); err != nil { + a = []interface{}{err.Error()} + } + return a +} + +// toTOML takes an interface, marshals it to toml, and returns a string. It will +// always return a string, even on marshal error (empty string). +// +// This is designed to be called from a template. +func toTOML(v interface{}) string { + b := bytes.NewBuffer(nil) + e := toml.NewEncoder(b) + err := e.Encode(v) + if err != nil { + return err.Error() + } + return b.String() +} + +// toJSON takes an interface, marshals it to json, and returns a string. It will +// always return a string, even on marshal error (empty string). +// +// This is designed to be called from a template. +func toJSON(v interface{}) string { + data, err := json.Marshal(v) + if err != nil { + // Swallow errors inside of a template. + return "" + } + return string(data) +} + +// fromJSON converts a JSON document into a map[string]interface{}. +// +// This is not a general-purpose JSON parser, and will not parse all valid +// JSON documents. Additionally, because its intended use is within templates +// it tolerates errors. It will insert the returned error message string into +// m["Error"] in the returned map. +func fromJSON(str string) map[string]interface{} { + m := make(map[string]interface{}) + + if err := json.Unmarshal([]byte(str), &m); err != nil { + m["Error"] = err.Error() + } + return m +} + +// fromJSONArray converts a JSON array into a []interface{}. +// +// This is not a general-purpose JSON parser, and will not parse all valid +// JSON documents. Additionally, because its intended use is within templates +// it tolerates errors. It will insert the returned error message string as +// the first and only item in the returned array. +func fromJSONArray(str string) []interface{} { + a := []interface{}{} + + if err := json.Unmarshal([]byte(str), &a); err != nil { + a = []interface{}{err.Error()} + } + return a +} diff --git a/vendor/helm.sh/helm/v3/pkg/engine/lookup_func.go b/vendor/helm.sh/helm/v3/pkg/engine/lookup_func.go new file mode 100644 index 000000000..75e85098d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/engine/lookup_func.go @@ -0,0 +1,143 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package engine + +import ( + "context" + "log" + "strings" + + "github.com/pkg/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/discovery" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/rest" +) + +type lookupFunc = func(apiversion string, resource string, namespace string, name string) (map[string]interface{}, error) + +// NewLookupFunction returns a function for looking up objects in the cluster. +// +// If the resource does not exist, no error is raised. +// +// This function is considered deprecated, and will be renamed in Helm 4. It will no +// longer be a public function. +func NewLookupFunction(config *rest.Config) lookupFunc { + return newLookupFunction(clientProviderFromConfig{config: config}) +} + +type ClientProvider interface { + // GetClientFor returns a dynamic.NamespaceableResourceInterface suitable for interacting with resources + // corresponding to the provided apiVersion and kind, as well as a boolean indicating whether the resources + // are namespaced. + GetClientFor(apiVersion, kind string) (dynamic.NamespaceableResourceInterface, bool, error) +} + +type clientProviderFromConfig struct { + config *rest.Config +} + +func (c clientProviderFromConfig) GetClientFor(apiVersion, kind string) (dynamic.NamespaceableResourceInterface, bool, error) { + return getDynamicClientOnKind(apiVersion, kind, c.config) +} + +func newLookupFunction(clientProvider ClientProvider) lookupFunc { + return func(apiversion string, kind string, namespace string, name string) (map[string]interface{}, error) { + var client dynamic.ResourceInterface + c, namespaced, err := clientProvider.GetClientFor(apiversion, kind) + if err != nil { + return map[string]interface{}{}, err + } + if namespaced && namespace != "" { + client = c.Namespace(namespace) + } else { + client = c + } + if name != "" { + // this will return a single object + obj, err := client.Get(context.Background(), name, metav1.GetOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + // Just return an empty interface when the object was not found. + // That way, users can use `if not (lookup ...)` in their templates. + return map[string]interface{}{}, nil + } + return map[string]interface{}{}, err + } + return obj.UnstructuredContent(), nil + } + // this will return a list + obj, err := client.List(context.Background(), metav1.ListOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + // Just return an empty interface when the object was not found. + // That way, users can use `if not (lookup ...)` in their templates. + return map[string]interface{}{}, nil + } + return map[string]interface{}{}, err + } + return obj.UnstructuredContent(), nil + } +} + +// getDynamicClientOnKind returns a dynamic client on an Unstructured type. This client can be further namespaced. +func getDynamicClientOnKind(apiversion string, kind string, config *rest.Config) (dynamic.NamespaceableResourceInterface, bool, error) { + gvk := schema.FromAPIVersionAndKind(apiversion, kind) + apiRes, err := getAPIResourceForGVK(gvk, config) + if err != nil { + log.Printf("[ERROR] unable to get apiresource from unstructured: %s , error %s", gvk.String(), err) + return nil, false, errors.Wrapf(err, "unable to get apiresource from unstructured: %s", gvk.String()) + } + gvr := schema.GroupVersionResource{ + Group: apiRes.Group, + Version: apiRes.Version, + Resource: apiRes.Name, + } + intf, err := dynamic.NewForConfig(config) + if err != nil { + log.Printf("[ERROR] unable to get dynamic client %s", err) + return nil, false, err + } + res := intf.Resource(gvr) + return res, apiRes.Namespaced, nil +} + +func getAPIResourceForGVK(gvk schema.GroupVersionKind, config *rest.Config) (metav1.APIResource, error) { + res := metav1.APIResource{} + discoveryClient, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + log.Printf("[ERROR] unable to create discovery client %s", err) + return res, err + } + resList, err := discoveryClient.ServerResourcesForGroupVersion(gvk.GroupVersion().String()) + if err != nil { + log.Printf("[ERROR] unable to retrieve resource list for: %s , error: %s", gvk.GroupVersion().String(), err) + return res, err + } + for _, resource := range resList.APIResources { + // if a resource contains a "/" it's referencing a subresource. we don't support subresource for now. + if resource.Kind == gvk.Kind && !strings.Contains(resource.Name, "/") { + res = resource + res.Group = gvk.Group + res.Version = gvk.Version + break + } + } + return res, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/getter/doc.go b/vendor/helm.sh/helm/v3/pkg/getter/doc.go new file mode 100644 index 000000000..11cf6153e --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/getter/doc.go @@ -0,0 +1,22 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package getter provides a generalize tool for fetching data by scheme. + +This provides a method by which the plugin system can load arbitrary protocol +handlers based upon a URL scheme. +*/ +package getter diff --git a/vendor/helm.sh/helm/v3/pkg/getter/getter.go b/vendor/helm.sh/helm/v3/pkg/getter/getter.go new file mode 100644 index 000000000..45ab4da7e --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/getter/getter.go @@ -0,0 +1,212 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package getter + +import ( + "bytes" + "net/http" + "time" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/registry" +) + +// options are generic parameters to be provided to the getter during instantiation. +// +// Getters may or may not ignore these parameters as they are passed in. +type options struct { + url string + certFile string + keyFile string + caFile string + unTar bool + insecureSkipVerifyTLS bool + plainHTTP bool + username string + password string + passCredentialsAll bool + userAgent string + version string + registryClient *registry.Client + timeout time.Duration + transport *http.Transport +} + +// Option allows specifying various settings configurable by the user for overriding the defaults +// used when performing Get operations with the Getter. +type Option func(*options) + +// WithURL informs the getter the server name that will be used when fetching objects. Used in conjunction with +// WithTLSClientConfig to set the TLSClientConfig's server name. +func WithURL(url string) Option { + return func(opts *options) { + opts.url = url + } +} + +// WithBasicAuth sets the request's Authorization header to use the provided credentials +func WithBasicAuth(username, password string) Option { + return func(opts *options) { + opts.username = username + opts.password = password + } +} + +func WithPassCredentialsAll(pass bool) Option { + return func(opts *options) { + opts.passCredentialsAll = pass + } +} + +// WithUserAgent sets the request's User-Agent header to use the provided agent name. +func WithUserAgent(userAgent string) Option { + return func(opts *options) { + opts.userAgent = userAgent + } +} + +// WithInsecureSkipVerifyTLS determines if a TLS Certificate will be checked +func WithInsecureSkipVerifyTLS(insecureSkipVerifyTLS bool) Option { + return func(opts *options) { + opts.insecureSkipVerifyTLS = insecureSkipVerifyTLS + } +} + +// WithTLSClientConfig sets the client auth with the provided credentials. +func WithTLSClientConfig(certFile, keyFile, caFile string) Option { + return func(opts *options) { + opts.certFile = certFile + opts.keyFile = keyFile + opts.caFile = caFile + } +} + +func WithPlainHTTP(plainHTTP bool) Option { + return func(opts *options) { + opts.plainHTTP = plainHTTP + } +} + +// WithTimeout sets the timeout for requests +func WithTimeout(timeout time.Duration) Option { + return func(opts *options) { + opts.timeout = timeout + } +} + +func WithTagName(tagname string) Option { + return func(opts *options) { + opts.version = tagname + } +} + +func WithRegistryClient(client *registry.Client) Option { + return func(opts *options) { + opts.registryClient = client + } +} + +func WithUntar() Option { + return func(opts *options) { + opts.unTar = true + } +} + +// WithTransport sets the http.Transport to allow overwriting the HTTPGetter default. +func WithTransport(transport *http.Transport) Option { + return func(opts *options) { + opts.transport = transport + } +} + +// Getter is an interface to support GET to the specified URL. +type Getter interface { + // Get file content by url string + Get(url string, options ...Option) (*bytes.Buffer, error) +} + +// Constructor is the function for every getter which creates a specific instance +// according to the configuration +type Constructor func(options ...Option) (Getter, error) + +// Provider represents any getter and the schemes that it supports. +// +// For example, an HTTP provider may provide one getter that handles both +// 'http' and 'https' schemes. +type Provider struct { + Schemes []string + New Constructor +} + +// Provides returns true if the given scheme is supported by this Provider. +func (p Provider) Provides(scheme string) bool { + for _, i := range p.Schemes { + if i == scheme { + return true + } + } + return false +} + +// Providers is a collection of Provider objects. +type Providers []Provider + +// ByScheme returns a Provider that handles the given scheme. +// +// If no provider handles this scheme, this will return an error. +func (p Providers) ByScheme(scheme string) (Getter, error) { + for _, pp := range p { + if pp.Provides(scheme) { + return pp.New() + } + } + return nil, errors.Errorf("scheme %q not supported", scheme) +} + +const ( + // The cost timeout references curl's default connection timeout. + // https://github.com/curl/curl/blob/master/lib/connect.h#L40C21-L40C21 + // The helm commands are usually executed manually. Considering the acceptable waiting time, we reduced the entire request time to 120s. + DefaultHTTPTimeout = 120 +) + +var defaultOptions = []Option{WithTimeout(time.Second * DefaultHTTPTimeout)} + +var httpProvider = Provider{ + Schemes: []string{"http", "https"}, + New: func(options ...Option) (Getter, error) { + options = append(options, defaultOptions...) + return NewHTTPGetter(options...) + }, +} + +var ociProvider = Provider{ + Schemes: []string{registry.OCIScheme}, + New: NewOCIGetter, +} + +// All finds all of the registered getters as a list of Provider instances. +// Currently, the built-in getters and the discovered plugins with downloader +// notations are collected. +func All(settings *cli.EnvSettings) Providers { + result := Providers{httpProvider, ociProvider} + pluginDownloaders, _ := collectPlugins(settings) + result = append(result, pluginDownloaders...) + return result +} diff --git a/vendor/helm.sh/helm/v3/pkg/getter/httpgetter.go b/vendor/helm.sh/helm/v3/pkg/getter/httpgetter.go new file mode 100644 index 000000000..b53e558e3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/getter/httpgetter.go @@ -0,0 +1,157 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package getter + +import ( + "bytes" + "crypto/tls" + "io" + "net/http" + "net/url" + "sync" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/internal/tlsutil" + "helm.sh/helm/v3/internal/urlutil" + "helm.sh/helm/v3/internal/version" +) + +// HTTPGetter is the default HTTP(/S) backend handler +type HTTPGetter struct { + opts options + transport *http.Transport + once sync.Once +} + +// Get performs a Get from repo.Getter and returns the body. +func (g *HTTPGetter) Get(href string, options ...Option) (*bytes.Buffer, error) { + for _, opt := range options { + opt(&g.opts) + } + return g.get(href) +} + +func (g *HTTPGetter) get(href string) (*bytes.Buffer, error) { + // Set a helm specific user agent so that a repo server and metrics can + // separate helm calls from other tools interacting with repos. + req, err := http.NewRequest(http.MethodGet, href, nil) + if err != nil { + return nil, err + } + + req.Header.Set("User-Agent", version.GetUserAgent()) + if g.opts.userAgent != "" { + req.Header.Set("User-Agent", g.opts.userAgent) + } + + // Before setting the basic auth credentials, make sure the URL associated + // with the basic auth is the one being fetched. + u1, err := url.Parse(g.opts.url) + if err != nil { + return nil, errors.Wrap(err, "Unable to parse getter URL") + } + u2, err := url.Parse(href) + if err != nil { + return nil, errors.Wrap(err, "Unable to parse URL getting from") + } + + // Host on URL (returned from url.Parse) contains the port if present. + // This check ensures credentials are not passed between different + // services on different ports. + if g.opts.passCredentialsAll || (u1.Scheme == u2.Scheme && u1.Host == u2.Host) { + if g.opts.username != "" && g.opts.password != "" { + req.SetBasicAuth(g.opts.username, g.opts.password) + } + } + + client, err := g.httpClient() + if err != nil { + return nil, err + } + + resp, err := client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return nil, errors.Errorf("failed to fetch %s : %s", href, resp.Status) + } + + buf := bytes.NewBuffer(nil) + _, err = io.Copy(buf, resp.Body) + return buf, err +} + +// NewHTTPGetter constructs a valid http/https client as a Getter +func NewHTTPGetter(options ...Option) (Getter, error) { + var client HTTPGetter + + for _, opt := range options { + opt(&client.opts) + } + + return &client, nil +} + +func (g *HTTPGetter) httpClient() (*http.Client, error) { + if g.opts.transport != nil { + return &http.Client{ + Transport: g.opts.transport, + Timeout: g.opts.timeout, + }, nil + } + + g.once.Do(func() { + g.transport = &http.Transport{ + DisableCompression: true, + Proxy: http.ProxyFromEnvironment, + } + }) + + if (g.opts.certFile != "" && g.opts.keyFile != "") || g.opts.caFile != "" || g.opts.insecureSkipVerifyTLS { + tlsConf, err := tlsutil.NewClientTLS(g.opts.certFile, g.opts.keyFile, g.opts.caFile, g.opts.insecureSkipVerifyTLS) + if err != nil { + return nil, errors.Wrap(err, "can't create TLS config for client") + } + + sni, err := urlutil.ExtractHostname(g.opts.url) + if err != nil { + return nil, err + } + tlsConf.ServerName = sni + + g.transport.TLSClientConfig = tlsConf + } + + if g.opts.insecureSkipVerifyTLS { + if g.transport.TLSClientConfig == nil { + g.transport.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: true, + } + } else { + g.transport.TLSClientConfig.InsecureSkipVerify = true + } + } + + client := &http.Client{ + Transport: g.transport, + Timeout: g.opts.timeout, + } + + return client, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go b/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go new file mode 100644 index 000000000..0547cdcbb --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go @@ -0,0 +1,156 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package getter + +import ( + "bytes" + "fmt" + "net" + "net/http" + "strings" + "sync" + "time" + + "helm.sh/helm/v3/internal/tlsutil" + "helm.sh/helm/v3/internal/urlutil" + "helm.sh/helm/v3/pkg/registry" +) + +// OCIGetter is the default HTTP(/S) backend handler +type OCIGetter struct { + opts options + transport *http.Transport + once sync.Once +} + +// Get performs a Get from repo.Getter and returns the body. +func (g *OCIGetter) Get(href string, options ...Option) (*bytes.Buffer, error) { + for _, opt := range options { + opt(&g.opts) + } + return g.get(href) +} + +func (g *OCIGetter) get(href string) (*bytes.Buffer, error) { + client := g.opts.registryClient + // if the user has already provided a configured registry client, use it, + // this is particularly true when user has his own way of handling the client credentials. + if client == nil { + c, err := g.newRegistryClient() + if err != nil { + return nil, err + } + client = c + } + + ref := strings.TrimPrefix(href, fmt.Sprintf("%s://", registry.OCIScheme)) + + var pullOpts []registry.PullOption + requestingProv := strings.HasSuffix(ref, ".prov") + if requestingProv { + ref = strings.TrimSuffix(ref, ".prov") + pullOpts = append(pullOpts, + registry.PullOptWithChart(false), + registry.PullOptWithProv(true)) + } + + result, err := client.Pull(ref, pullOpts...) + if err != nil { + return nil, err + } + + if requestingProv { + return bytes.NewBuffer(result.Prov.Data), nil + } + return bytes.NewBuffer(result.Chart.Data), nil +} + +// NewOCIGetter constructs a valid http/https client as a Getter +func NewOCIGetter(ops ...Option) (Getter, error) { + var client OCIGetter + + for _, opt := range ops { + opt(&client.opts) + } + + return &client, nil +} + +func (g *OCIGetter) newRegistryClient() (*registry.Client, error) { + if g.opts.transport != nil { + client, err := registry.NewClient( + registry.ClientOptHTTPClient(&http.Client{ + Transport: g.opts.transport, + Timeout: g.opts.timeout, + }), + ) + if err != nil { + return nil, err + } + return client, nil + } + + g.once.Do(func() { + g.transport = &http.Transport{ + // From https://github.com/google/go-containerregistry/blob/31786c6cbb82d6ec4fb8eb79cd9387905130534e/pkg/v1/remote/options.go#L87 + DisableCompression: true, + DialContext: (&net.Dialer{ + // By default we wrap the transport in retries, so reduce the + // default dial timeout to 5s to avoid 5x 30s of connection + // timeouts when doing the "ping" on certain http registries. + Timeout: 5 * time.Second, + KeepAlive: 30 * time.Second, + }).DialContext, + ForceAttemptHTTP2: true, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + Proxy: http.ProxyFromEnvironment, + } + }) + + if (g.opts.certFile != "" && g.opts.keyFile != "") || g.opts.caFile != "" || g.opts.insecureSkipVerifyTLS { + tlsConf, err := tlsutil.NewClientTLS(g.opts.certFile, g.opts.keyFile, g.opts.caFile, g.opts.insecureSkipVerifyTLS) + if err != nil { + return nil, fmt.Errorf("can't create TLS config for client: %w", err) + } + + sni, err := urlutil.ExtractHostname(g.opts.url) + if err != nil { + return nil, err + } + tlsConf.ServerName = sni + + g.transport.TLSClientConfig = tlsConf + } + + opts := []registry.ClientOption{registry.ClientOptHTTPClient(&http.Client{ + Transport: g.transport, + Timeout: g.opts.timeout, + })} + if g.opts.plainHTTP { + opts = append(opts, registry.ClientOptPlainHTTP()) + } + + client, err := registry.NewClient(opts...) + + if err != nil { + return nil, err + } + + return client, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/getter/plugingetter.go b/vendor/helm.sh/helm/v3/pkg/getter/plugingetter.go new file mode 100644 index 000000000..a371b52eb --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/getter/plugingetter.go @@ -0,0 +1,110 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package getter + +import ( + "bytes" + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/plugin" +) + +// collectPlugins scans for getter plugins. +// This will load plugins according to the cli. +func collectPlugins(settings *cli.EnvSettings) (Providers, error) { + plugins, err := plugin.FindPlugins(settings.PluginsDirectory) + if err != nil { + return nil, err + } + var result Providers + for _, plugin := range plugins { + for _, downloader := range plugin.Metadata.Downloaders { + result = append(result, Provider{ + Schemes: downloader.Protocols, + New: NewPluginGetter( + downloader.Command, + settings, + plugin.Metadata.Name, + plugin.Dir, + ), + }) + } + } + return result, nil +} + +// pluginGetter is a generic type to invoke custom downloaders, +// implemented in plugins. +type pluginGetter struct { + command string + settings *cli.EnvSettings + name string + base string + opts options +} + +func (p *pluginGetter) setupOptionsEnv(env []string) []string { + env = append(env, fmt.Sprintf("HELM_PLUGIN_USERNAME=%s", p.opts.username)) + env = append(env, fmt.Sprintf("HELM_PLUGIN_PASSWORD=%s", p.opts.password)) + env = append(env, fmt.Sprintf("HELM_PLUGIN_PASS_CREDENTIALS_ALL=%t", p.opts.passCredentialsAll)) + return env +} + +// Get runs downloader plugin command +func (p *pluginGetter) Get(href string, options ...Option) (*bytes.Buffer, error) { + for _, opt := range options { + opt(&p.opts) + } + commands := strings.Split(p.command, " ") + argv := append(commands[1:], p.opts.certFile, p.opts.keyFile, p.opts.caFile, href) + prog := exec.Command(filepath.Join(p.base, commands[0]), argv...) + plugin.SetupPluginEnv(p.settings, p.name, p.base) + prog.Env = p.setupOptionsEnv(os.Environ()) + buf := bytes.NewBuffer(nil) + prog.Stdout = buf + prog.Stderr = os.Stderr + if err := prog.Run(); err != nil { + if eerr, ok := err.(*exec.ExitError); ok { + os.Stderr.Write(eerr.Stderr) + return nil, errors.Errorf("plugin %q exited with error", p.command) + } + return nil, err + } + return buf, nil +} + +// NewPluginGetter constructs a valid plugin getter +func NewPluginGetter(command string, settings *cli.EnvSettings, name, base string) Constructor { + return func(options ...Option) (Getter, error) { + result := &pluginGetter{ + command: command, + settings: settings, + name: name, + base: base, + } + for _, opt := range options { + opt(&result.opts) + } + return result, nil + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/helmpath/home.go b/vendor/helm.sh/helm/v3/pkg/helmpath/home.go new file mode 100644 index 000000000..bd43e8890 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/helmpath/home.go @@ -0,0 +1,44 @@ +// Copyright The Helm Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package helmpath calculates filesystem paths to Helm's configuration, cache and data. +package helmpath + +// This helper builds paths to Helm's configuration, cache and data paths. +const lp = lazypath("helm") + +// ConfigPath returns the path where Helm stores configuration. +func ConfigPath(elem ...string) string { return lp.configPath(elem...) } + +// CachePath returns the path where Helm stores cached objects. +func CachePath(elem ...string) string { return lp.cachePath(elem...) } + +// DataPath returns the path where Helm stores data. +func DataPath(elem ...string) string { return lp.dataPath(elem...) } + +// CacheIndexFile returns the path to an index for the given named repository. +func CacheIndexFile(name string) string { + if name != "" { + name += "-" + } + return name + "index.yaml" +} + +// CacheChartsFile returns the path to a text file listing all the charts +// within the given named repository. +func CacheChartsFile(name string) string { + if name != "" { + name += "-" + } + return name + "charts.txt" +} diff --git a/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath.go b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath.go new file mode 100644 index 000000000..6b4f1fc77 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath.go @@ -0,0 +1,72 @@ +// Copyright The Helm Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package helmpath + +import ( + "os" + "path/filepath" + + "helm.sh/helm/v3/pkg/helmpath/xdg" +) + +const ( + // CacheHomeEnvVar is the environment variable used by Helm + // for the cache directory. When no value is set a default is used. + CacheHomeEnvVar = "HELM_CACHE_HOME" + + // ConfigHomeEnvVar is the environment variable used by Helm + // for the config directory. When no value is set a default is used. + ConfigHomeEnvVar = "HELM_CONFIG_HOME" + + // DataHomeEnvVar is the environment variable used by Helm + // for the data directory. When no value is set a default is used. + DataHomeEnvVar = "HELM_DATA_HOME" +) + +// lazypath is a lazy-loaded path buffer for the XDG base directory specification. +type lazypath string + +func (l lazypath) path(helmEnvVar, xdgEnvVar string, defaultFn func() string, elem ...string) string { + + // There is an order to checking for a path. + // 1. See if a Helm specific environment variable has been set. + // 2. Check if an XDG environment variable is set + // 3. Fall back to a default + base := os.Getenv(helmEnvVar) + if base != "" { + return filepath.Join(base, filepath.Join(elem...)) + } + base = os.Getenv(xdgEnvVar) + if base == "" { + base = defaultFn() + } + return filepath.Join(base, string(l), filepath.Join(elem...)) +} + +// cachePath defines the base directory relative to which user specific non-essential data files +// should be stored. +func (l lazypath) cachePath(elem ...string) string { + return l.path(CacheHomeEnvVar, xdg.CacheHomeEnvVar, cacheHome, filepath.Join(elem...)) +} + +// configPath defines the base directory relative to which user specific configuration files should +// be stored. +func (l lazypath) configPath(elem ...string) string { + return l.path(ConfigHomeEnvVar, xdg.ConfigHomeEnvVar, configHome, filepath.Join(elem...)) +} + +// dataPath defines the base directory relative to which user specific data files should be stored. +func (l lazypath) dataPath(elem ...string) string { + return l.path(DataHomeEnvVar, xdg.DataHomeEnvVar, dataHome, filepath.Join(elem...)) +} diff --git a/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_darwin.go b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_darwin.go new file mode 100644 index 000000000..eba6dde15 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_darwin.go @@ -0,0 +1,34 @@ +// Copyright The Helm Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build darwin + +package helmpath + +import ( + "path/filepath" + + "k8s.io/client-go/util/homedir" +) + +func dataHome() string { + return filepath.Join(homedir.HomeDir(), "Library") +} + +func configHome() string { + return filepath.Join(homedir.HomeDir(), "Library", "Preferences") +} + +func cacheHome() string { + return filepath.Join(homedir.HomeDir(), "Library", "Caches") +} diff --git a/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_unix.go b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_unix.go new file mode 100644 index 000000000..82fb4b6f1 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_unix.go @@ -0,0 +1,45 @@ +// Copyright The Helm Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build !windows && !darwin + +package helmpath + +import ( + "path/filepath" + + "k8s.io/client-go/util/homedir" +) + +// dataHome defines the base directory relative to which user specific data files should be stored. +// +// If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share is used. +func dataHome() string { + return filepath.Join(homedir.HomeDir(), ".local", "share") +} + +// configHome defines the base directory relative to which user specific configuration files should +// be stored. +// +// If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config is used. +func configHome() string { + return filepath.Join(homedir.HomeDir(), ".config") +} + +// cacheHome defines the base directory relative to which user specific non-essential data files +// should be stored. +// +// If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache is used. +func cacheHome() string { + return filepath.Join(homedir.HomeDir(), ".cache") +} diff --git a/vendor/google.golang.org/genproto/internal/doc.go b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_windows.go similarity index 63% rename from vendor/google.golang.org/genproto/internal/doc.go rename to vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_windows.go index 90e89b4aa..230aee2a9 100644 --- a/vendor/google.golang.org/genproto/internal/doc.go +++ b/vendor/helm.sh/helm/v3/pkg/helmpath/lazypath_windows.go @@ -1,17 +1,24 @@ -// Copyright 2023 Google LLC -// +// Copyright The Helm Authors. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// + +// http://www.apache.org/licenses/LICENSE-2.0 + // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// This file makes internal an importable go package -// for use with backreferences from submodules. -package internal +//go:build windows + +package helmpath + +import "os" + +func dataHome() string { return configHome() } + +func configHome() string { return os.Getenv("APPDATA") } + +func cacheHome() string { return os.Getenv("TEMP") } diff --git a/vendor/helm.sh/helm/v3/pkg/helmpath/xdg/xdg.go b/vendor/helm.sh/helm/v3/pkg/helmpath/xdg/xdg.go new file mode 100644 index 000000000..eaa3e6864 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/helmpath/xdg/xdg.go @@ -0,0 +1,34 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package xdg holds constants pertaining to XDG Base Directory Specification. +// +// The XDG Base Directory Specification https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +// specifies the environment variables that define user-specific base directories for various categories of files. +package xdg + +const ( + // CacheHomeEnvVar is the environment variable used by the + // XDG base directory specification for the cache directory. + CacheHomeEnvVar = "XDG_CACHE_HOME" + + // ConfigHomeEnvVar is the environment variable used by the + // XDG base directory specification for the config directory. + ConfigHomeEnvVar = "XDG_CONFIG_HOME" + + // DataHomeEnvVar is the environment variable used by the + // XDG base directory specification for the data directory. + DataHomeEnvVar = "XDG_DATA_HOME" +) diff --git a/vendor/helm.sh/helm/v3/pkg/ignore/doc.go b/vendor/helm.sh/helm/v3/pkg/ignore/doc.go new file mode 100644 index 000000000..1f5e91847 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/ignore/doc.go @@ -0,0 +1,68 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package ignore provides tools for writing ignore files (a la .gitignore). + +This provides both an ignore parser and a file-aware processor. + +The format of ignore files closely follows, but does not exactly match, the +format for .gitignore files (https://git-scm.com/docs/gitignore). + +The formatting rules are as follows: + + - Parsing is line-by-line + - Empty lines are ignored + - Lines that begin with # (comments) will be ignored + - Leading and trailing spaces are always ignored + - Inline comments are NOT supported ('foo* # Any foo' does not contain a comment) + - There is no support for multi-line patterns + - Shell glob patterns are supported. See Go's "path/filepath".Match + - If a pattern begins with a leading !, the match will be negated. + - If a pattern begins with a leading /, only paths relatively rooted will match. + - If the pattern ends with a trailing /, only directories will match + - If a pattern contains no slashes, file basenames are tested (not paths) + - The pattern sequence "**", while legal in a glob, will cause an error here + (to indicate incompatibility with .gitignore). + +Example: + + # Match any file named foo.txt + foo.txt + + # Match any text file + *.txt + + # Match only directories named mydir + mydir/ + + # Match only text files in the top-level directory + /*.txt + + # Match only the file foo.txt in the top-level directory + /foo.txt + + # Match any file named ab.txt, ac.txt, or ad.txt + a[b-d].txt + +Notable differences from .gitignore: + - The '**' syntax is not supported. + - The globbing library is Go's 'filepath.Match', not fnmatch(3) + - Trailing spaces are always ignored (there is no supported escape sequence) + - The evaluation of escape sequences has not been tested for compatibility + - There is no support for '\!' as a special leading sequence. +*/ +package ignore // import "helm.sh/helm/v3/pkg/ignore" diff --git a/vendor/helm.sh/helm/v3/pkg/ignore/rules.go b/vendor/helm.sh/helm/v3/pkg/ignore/rules.go new file mode 100644 index 000000000..88de407ad --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/ignore/rules.go @@ -0,0 +1,228 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package ignore + +import ( + "bufio" + "bytes" + "io" + "log" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" +) + +// HelmIgnore default name of an ignorefile. +const HelmIgnore = ".helmignore" + +// Rules is a collection of path matching rules. +// +// Parse() and ParseFile() will construct and populate new Rules. +// Empty() will create an immutable empty ruleset. +type Rules struct { + patterns []*pattern +} + +// Empty builds an empty ruleset. +func Empty() *Rules { + return &Rules{patterns: []*pattern{}} +} + +// AddDefaults adds default ignore patterns. +// +// Ignore all dotfiles in "templates/" +func (r *Rules) AddDefaults() { + r.parseRule(`templates/.?*`) +} + +// ParseFile parses a helmignore file and returns the *Rules. +func ParseFile(file string) (*Rules, error) { + f, err := os.Open(file) + if err != nil { + return nil, err + } + defer f.Close() + return Parse(f) +} + +// Parse parses a rules file +func Parse(file io.Reader) (*Rules, error) { + r := &Rules{patterns: []*pattern{}} + + s := bufio.NewScanner(file) + currentLine := 0 + utf8bom := []byte{0xEF, 0xBB, 0xBF} + for s.Scan() { + scannedBytes := s.Bytes() + // We trim UTF8 BOM + if currentLine == 0 { + scannedBytes = bytes.TrimPrefix(scannedBytes, utf8bom) + } + line := string(scannedBytes) + currentLine++ + + if err := r.parseRule(line); err != nil { + return r, err + } + } + return r, s.Err() +} + +// Ignore evaluates the file at the given path, and returns true if it should be ignored. +// +// Ignore evaluates path against the rules in order. Evaluation stops when a match +// is found. Matching a negative rule will stop evaluation. +func (r *Rules) Ignore(path string, fi os.FileInfo) bool { + // Don't match on empty dirs. + if path == "" { + return false + } + + // Disallow ignoring the current working directory. + // See issue: + // 1776 (New York City) Hamilton: "Pardon me, are you Aaron Burr, sir?" + if path == "." || path == "./" { + return false + } + for _, p := range r.patterns { + if p.match == nil { + log.Printf("ignore: no matcher supplied for %q", p.raw) + return false + } + + // For negative rules, we need to capture and return non-matches, + // and continue for matches. + if p.negate { + if p.mustDir && !fi.IsDir() { + return true + } + if !p.match(path, fi) { + return true + } + continue + } + + // If the rule is looking for directories, and this is not a directory, + // skip it. + if p.mustDir && !fi.IsDir() { + continue + } + if p.match(path, fi) { + return true + } + } + return false +} + +// parseRule parses a rule string and creates a pattern, which is then stored in the Rules object. +func (r *Rules) parseRule(rule string) error { + rule = strings.TrimSpace(rule) + + // Ignore blank lines + if rule == "" { + return nil + } + // Comment + if strings.HasPrefix(rule, "#") { + return nil + } + + // Fail any rules that contain ** + if strings.Contains(rule, "**") { + return errors.New("double-star (**) syntax is not supported") + } + + // Fail any patterns that can't compile. A non-empty string must be + // given to Match() to avoid optimization that skips rule evaluation. + if _, err := filepath.Match(rule, "abc"); err != nil { + return err + } + + p := &pattern{raw: rule} + + // Negation is handled at a higher level, so strip the leading ! from the + // string. + if strings.HasPrefix(rule, "!") { + p.negate = true + rule = rule[1:] + } + + // Directory verification is handled by a higher level, so the trailing / + // is removed from the rule. That way, a directory named "foo" matches, + // even if the supplied string does not contain a literal slash character. + if strings.HasSuffix(rule, "/") { + p.mustDir = true + rule = strings.TrimSuffix(rule, "/") + } + + if strings.HasPrefix(rule, "/") { + // Require path matches the root path. + p.match = func(n string, _ os.FileInfo) bool { + rule = strings.TrimPrefix(rule, "/") + ok, err := filepath.Match(rule, n) + if err != nil { + log.Printf("Failed to compile %q: %s", rule, err) + return false + } + return ok + } + } else if strings.Contains(rule, "/") { + // require structural match. + p.match = func(n string, _ os.FileInfo) bool { + ok, err := filepath.Match(rule, n) + if err != nil { + log.Printf("Failed to compile %q: %s", rule, err) + return false + } + return ok + } + } else { + p.match = func(n string, _ os.FileInfo) bool { + // When there is no slash in the pattern, we evaluate ONLY the + // filename. + n = filepath.Base(n) + ok, err := filepath.Match(rule, n) + if err != nil { + log.Printf("Failed to compile %q: %s", rule, err) + return false + } + return ok + } + } + + r.patterns = append(r.patterns, p) + return nil +} + +// matcher is a function capable of computing a match. +// +// It returns true if the rule matches. +type matcher func(name string, fi os.FileInfo) bool + +// pattern describes a pattern to be matched in a rule set. +type pattern struct { + // raw is the unparsed string, with nothing stripped. + raw string + // match is the matcher function. + match matcher + // negate indicates that the rule's outcome should be negated. + negate bool + // mustDir indicates that the matched file must be a directory. + mustDir bool +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/client.go b/vendor/helm.sh/helm/v3/pkg/kube/client.go new file mode 100644 index 000000000..d979fd22c --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/client.go @@ -0,0 +1,850 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "os" + "path/filepath" + "reflect" + "strings" + "sync" + "time" + + jsonpatch "github.com/evanphx/json-patch" + "github.com/pkg/errors" + batch "k8s.io/api/batch/v1" + v1 "k8s.io/api/core/v1" + apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + + multierror "github.com/hashicorp/go-multierror" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/cli-runtime/pkg/resource" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + cachetools "k8s.io/client-go/tools/cache" + watchtools "k8s.io/client-go/tools/watch" + cmdutil "k8s.io/kubectl/pkg/cmd/util" +) + +// ErrNoObjectsVisited indicates that during a visit operation, no matching objects were found. +var ErrNoObjectsVisited = errors.New("no objects visited") + +var metadataAccessor = meta.NewAccessor() + +// ManagedFieldsManager is the name of the manager of Kubernetes managedFields +// first introduced in Kubernetes 1.18 +var ManagedFieldsManager string + +// Client represents a client capable of communicating with the Kubernetes API. +type Client struct { + // Factory provides a minimal version of the kubectl Factory interface. If + // you need the full Factory you can type switch to the full interface. + // Since Kubernetes Go API does not provide backwards compatibility across + // minor versions, this API does not follow Helm backwards compatibility. + // Helm is exposing Kubernetes in this property and cannot guarantee this + // will not change. The minimal interface only has the functions that Helm + // needs. The smaller surface area of the interface means there is a lower + // chance of it changing. + Factory Factory + Log func(string, ...interface{}) + // Namespace allows to bypass the kubeconfig file for the choice of the namespace + Namespace string + + kubeClient *kubernetes.Clientset +} + +var addToScheme sync.Once + +// New creates a new Client. +func New(getter genericclioptions.RESTClientGetter) *Client { + if getter == nil { + getter = genericclioptions.NewConfigFlags(true) + } + // Add CRDs to the scheme. They are missing by default. + addToScheme.Do(func() { + if err := apiextv1.AddToScheme(scheme.Scheme); err != nil { + // This should never happen. + panic(err) + } + if err := apiextv1beta1.AddToScheme(scheme.Scheme); err != nil { + panic(err) + } + }) + return &Client{ + Factory: cmdutil.NewFactory(getter), + Log: nopLogger, + } +} + +var nopLogger = func(_ string, _ ...interface{}) {} + +// getKubeClient get or create a new KubernetesClientSet +func (c *Client) getKubeClient() (*kubernetes.Clientset, error) { + var err error + if c.kubeClient == nil { + c.kubeClient, err = c.Factory.KubernetesClientSet() + } + + return c.kubeClient, err +} + +// IsReachable tests connectivity to the cluster. +func (c *Client) IsReachable() error { + client, err := c.getKubeClient() + if err == genericclioptions.ErrEmptyConfig { + // re-replace kubernetes ErrEmptyConfig error with a friendly error + // moar workarounds for Kubernetes API breaking. + return errors.New("Kubernetes cluster unreachable") + } + if err != nil { + return errors.Wrap(err, "Kubernetes cluster unreachable") + } + if _, err := client.ServerVersion(); err != nil { + return errors.Wrap(err, "Kubernetes cluster unreachable") + } + return nil +} + +// Create creates Kubernetes resources specified in the resource list. +func (c *Client) Create(resources ResourceList) (*Result, error) { + c.Log("creating %d resource(s)", len(resources)) + if err := perform(resources, createResource); err != nil { + return nil, err + } + return &Result{Created: resources}, nil +} + +func transformRequests(req *rest.Request) { + tableParam := strings.Join([]string{ + fmt.Sprintf("application/json;as=Table;v=%s;g=%s", metav1.SchemeGroupVersion.Version, metav1.GroupName), + fmt.Sprintf("application/json;as=Table;v=%s;g=%s", metav1beta1.SchemeGroupVersion.Version, metav1beta1.GroupName), + "application/json", + }, ",") + req.SetHeader("Accept", tableParam) + + // if sorting, ensure we receive the full object in order to introspect its fields via jsonpath + req.Param("includeObject", "Object") +} + +// Get retrieves the resource objects supplied. If related is set to true the +// related pods are fetched as well. If the passed in resources are a table kind +// the related resources will also be fetched as kind=table. +func (c *Client) Get(resources ResourceList, related bool) (map[string][]runtime.Object, error) { + buf := new(bytes.Buffer) + objs := make(map[string][]runtime.Object) + + podSelectors := []map[string]string{} + err := resources.Visit(func(info *resource.Info, err error) error { + if err != nil { + return err + } + + gvk := info.ResourceMapping().GroupVersionKind + vk := gvk.Version + "/" + gvk.Kind + obj, err := getResource(info) + if err != nil { + fmt.Fprintf(buf, "Get resource %s failed, err:%v\n", info.Name, err) + } else { + objs[vk] = append(objs[vk], obj) + + // Only fetch related pods if they are requested + if related { + // Discover if the existing object is a table. If it is, request + // the pods as Tables. Otherwise request them normally. + objGVK := obj.GetObjectKind().GroupVersionKind() + var isTable bool + if objGVK.Kind == "Table" { + isTable = true + } + + objs, err = c.getSelectRelationPod(info, objs, isTable, &podSelectors) + if err != nil { + c.Log("Warning: get the relation pod is failed, err:%s", err.Error()) + } + } + } + + return nil + }) + if err != nil { + return nil, err + } + + return objs, nil +} + +func (c *Client) getSelectRelationPod(info *resource.Info, objs map[string][]runtime.Object, table bool, podSelectors *[]map[string]string) (map[string][]runtime.Object, error) { + if info == nil { + return objs, nil + } + c.Log("get relation pod of object: %s/%s/%s", info.Namespace, info.Mapping.GroupVersionKind.Kind, info.Name) + selector, ok, _ := getSelectorFromObject(info.Object) + if !ok { + return objs, nil + } + + for index := range *podSelectors { + if reflect.DeepEqual((*podSelectors)[index], selector) { + // check if pods for selectors are already added. This avoids duplicate printing of pods + return objs, nil + } + } + + *podSelectors = append(*podSelectors, selector) + + var infos []*resource.Info + var err error + if table { + infos, err = c.Factory.NewBuilder(). + Unstructured(). + ContinueOnError(). + NamespaceParam(info.Namespace). + DefaultNamespace(). + ResourceTypes("pods"). + LabelSelector(labels.Set(selector).AsSelector().String()). + TransformRequests(transformRequests). + Do().Infos() + if err != nil { + return objs, err + } + } else { + infos, err = c.Factory.NewBuilder(). + Unstructured(). + ContinueOnError(). + NamespaceParam(info.Namespace). + DefaultNamespace(). + ResourceTypes("pods"). + LabelSelector(labels.Set(selector).AsSelector().String()). + Do().Infos() + if err != nil { + return objs, err + } + } + vk := "v1/Pod(related)" + + for _, info := range infos { + objs[vk] = append(objs[vk], info.Object) + } + return objs, nil +} + +func getSelectorFromObject(obj runtime.Object) (map[string]string, bool, error) { + typed := obj.(*unstructured.Unstructured) + kind := typed.Object["kind"] + switch kind { + case "ReplicaSet", "Deployment", "StatefulSet", "DaemonSet", "Job": + return unstructured.NestedStringMap(typed.Object, "spec", "selector", "matchLabels") + case "ReplicationController": + return unstructured.NestedStringMap(typed.Object, "spec", "selector") + default: + return nil, false, nil + } +} + +func getResource(info *resource.Info) (runtime.Object, error) { + obj, err := resource.NewHelper(info.Client, info.Mapping).Get(info.Namespace, info.Name) + if err != nil { + return nil, err + } + return obj, nil +} + +// Wait waits up to the given timeout for the specified resources to be ready. +func (c *Client) Wait(resources ResourceList, timeout time.Duration) error { + cs, err := c.getKubeClient() + if err != nil { + return err + } + checker := NewReadyChecker(cs, c.Log, PausedAsReady(true)) + w := waiter{ + c: checker, + log: c.Log, + timeout: timeout, + } + return w.waitForResources(resources) +} + +// WaitWithJobs wait up to the given timeout for the specified resources to be ready, including jobs. +func (c *Client) WaitWithJobs(resources ResourceList, timeout time.Duration) error { + cs, err := c.getKubeClient() + if err != nil { + return err + } + checker := NewReadyChecker(cs, c.Log, PausedAsReady(true), CheckJobs(true)) + w := waiter{ + c: checker, + log: c.Log, + timeout: timeout, + } + return w.waitForResources(resources) +} + +// WaitForDelete wait up to the given timeout for the specified resources to be deleted. +func (c *Client) WaitForDelete(resources ResourceList, timeout time.Duration) error { + w := waiter{ + log: c.Log, + timeout: timeout, + } + return w.waitForDeletedResources(resources) +} + +func (c *Client) namespace() string { + if c.Namespace != "" { + return c.Namespace + } + if ns, _, err := c.Factory.ToRawKubeConfigLoader().Namespace(); err == nil { + return ns + } + return v1.NamespaceDefault +} + +// newBuilder returns a new resource builder for structured api objects. +func (c *Client) newBuilder() *resource.Builder { + return c.Factory.NewBuilder(). + ContinueOnError(). + NamespaceParam(c.namespace()). + DefaultNamespace(). + Flatten() +} + +// Build validates for Kubernetes objects and returns unstructured infos. +func (c *Client) Build(reader io.Reader, validate bool) (ResourceList, error) { + validationDirective := metav1.FieldValidationIgnore + if validate { + validationDirective = metav1.FieldValidationStrict + } + + schema, err := c.Factory.Validator(validationDirective) + if err != nil { + return nil, err + } + result, err := c.newBuilder(). + Unstructured(). + Schema(schema). + Stream(reader, ""). + Do().Infos() + return result, scrubValidationError(err) +} + +// BuildTable validates for Kubernetes objects and returns unstructured infos. +// The returned kind is a Table. +func (c *Client) BuildTable(reader io.Reader, validate bool) (ResourceList, error) { + validationDirective := metav1.FieldValidationIgnore + if validate { + validationDirective = metav1.FieldValidationStrict + } + + schema, err := c.Factory.Validator(validationDirective) + if err != nil { + return nil, err + } + result, err := c.newBuilder(). + Unstructured(). + Schema(schema). + Stream(reader, ""). + TransformRequests(transformRequests). + Do().Infos() + return result, scrubValidationError(err) +} + +// Update takes the current list of objects and target list of objects and +// creates resources that don't already exist, updates resources that have been +// modified in the target configuration, and deletes resources from the current +// configuration that are not present in the target configuration. If an error +// occurs, a Result will still be returned with the error, containing all +// resource updates, creations, and deletions that were attempted. These can be +// used for cleanup or other logging purposes. +func (c *Client) Update(original, target ResourceList, force bool) (*Result, error) { + updateErrors := []string{} + res := &Result{} + + c.Log("checking %d resources for changes", len(target)) + err := target.Visit(func(info *resource.Info, err error) error { + if err != nil { + return err + } + + helper := resource.NewHelper(info.Client, info.Mapping).WithFieldManager(getManagedFieldsManager()) + if _, err := helper.Get(info.Namespace, info.Name); err != nil { + if !apierrors.IsNotFound(err) { + return errors.Wrap(err, "could not get information about the resource") + } + + // Append the created resource to the results, even if something fails + res.Created = append(res.Created, info) + + // Since the resource does not exist, create it. + if err := createResource(info); err != nil { + return errors.Wrap(err, "failed to create resource") + } + + kind := info.Mapping.GroupVersionKind.Kind + c.Log("Created a new %s called %q in %s\n", kind, info.Name, info.Namespace) + return nil + } + + originalInfo := original.Get(info) + if originalInfo == nil { + kind := info.Mapping.GroupVersionKind.Kind + return errors.Errorf("no %s with the name %q found", kind, info.Name) + } + + if err := updateResource(c, info, originalInfo.Object, force); err != nil { + c.Log("error updating the resource %q:\n\t %v", info.Name, err) + updateErrors = append(updateErrors, err.Error()) + } + // Because we check for errors later, append the info regardless + res.Updated = append(res.Updated, info) + + return nil + }) + + switch { + case err != nil: + return res, err + case len(updateErrors) != 0: + return res, errors.Errorf(strings.Join(updateErrors, " && ")) + } + + for _, info := range original.Difference(target) { + c.Log("Deleting %s %q in namespace %s...", info.Mapping.GroupVersionKind.Kind, info.Name, info.Namespace) + + if err := info.Get(); err != nil { + c.Log("Unable to get obj %q, err: %s", info.Name, err) + continue + } + annotations, err := metadataAccessor.Annotations(info.Object) + if err != nil { + c.Log("Unable to get annotations on %q, err: %s", info.Name, err) + } + if annotations != nil && annotations[ResourcePolicyAnno] == KeepPolicy { + c.Log("Skipping delete of %q due to annotation [%s=%s]", info.Name, ResourcePolicyAnno, KeepPolicy) + continue + } + if err := deleteResource(info, metav1.DeletePropagationBackground); err != nil { + c.Log("Failed to delete %q, err: %s", info.ObjectName(), err) + continue + } + res.Deleted = append(res.Deleted, info) + } + return res, nil +} + +// Delete deletes Kubernetes resources specified in the resources list with +// background cascade deletion. It will attempt to delete all resources even +// if one or more fail and collect any errors. All successfully deleted items +// will be returned in the `Deleted` ResourceList that is part of the result. +func (c *Client) Delete(resources ResourceList) (*Result, []error) { + return rdelete(c, resources, metav1.DeletePropagationBackground) +} + +// Delete deletes Kubernetes resources specified in the resources list with +// given deletion propagation policy. It will attempt to delete all resources even +// if one or more fail and collect any errors. All successfully deleted items +// will be returned in the `Deleted` ResourceList that is part of the result. +func (c *Client) DeleteWithPropagationPolicy(resources ResourceList, policy metav1.DeletionPropagation) (*Result, []error) { + return rdelete(c, resources, policy) +} + +func rdelete(c *Client, resources ResourceList, propagation metav1.DeletionPropagation) (*Result, []error) { + var errs []error + res := &Result{} + mtx := sync.Mutex{} + err := perform(resources, func(info *resource.Info) error { + c.Log("Starting delete for %q %s", info.Name, info.Mapping.GroupVersionKind.Kind) + err := deleteResource(info, propagation) + if err == nil || apierrors.IsNotFound(err) { + if err != nil { + c.Log("Ignoring delete failure for %q %s: %v", info.Name, info.Mapping.GroupVersionKind, err) + } + mtx.Lock() + defer mtx.Unlock() + res.Deleted = append(res.Deleted, info) + return nil + } + mtx.Lock() + defer mtx.Unlock() + // Collect the error and continue on + errs = append(errs, err) + return nil + }) + if err != nil { + if errors.Is(err, ErrNoObjectsVisited) { + err = fmt.Errorf("object not found, skipping delete: %w", err) + } + errs = append(errs, err) + } + if errs != nil { + return nil, errs + } + return res, nil +} + +func (c *Client) watchTimeout(t time.Duration) func(*resource.Info) error { + return func(info *resource.Info) error { + return c.watchUntilReady(t, info) + } +} + +// WatchUntilReady watches the resources given and waits until it is ready. +// +// This method is mainly for hook implementations. It watches for a resource to +// hit a particular milestone. The milestone depends on the Kind. +// +// For most kinds, it checks to see if the resource is marked as Added or Modified +// by the Kubernetes event stream. For some kinds, it does more: +// +// - Jobs: A job is marked "Ready" when it has successfully completed. This is +// ascertained by watching the Status fields in a job's output. +// - Pods: A pod is marked "Ready" when it has successfully completed. This is +// ascertained by watching the status.phase field in a pod's output. +// +// Handling for other kinds will be added as necessary. +func (c *Client) WatchUntilReady(resources ResourceList, timeout time.Duration) error { + // For jobs, there's also the option to do poll c.Jobs(namespace).Get(): + // https://github.com/adamreese/kubernetes/blob/master/test/e2e/job.go#L291-L300 + return perform(resources, c.watchTimeout(timeout)) +} + +func perform(infos ResourceList, fn func(*resource.Info) error) error { + var result error + + if len(infos) == 0 { + return ErrNoObjectsVisited + } + + errs := make(chan error) + go batchPerform(infos, fn, errs) + + for range infos { + err := <-errs + if err != nil { + result = multierror.Append(result, err) + } + } + + return result +} + +// getManagedFieldsManager returns the manager string. If one was set it will be returned. +// Otherwise, one is calculated based on the name of the binary. +func getManagedFieldsManager() string { + + // When a manager is explicitly set use it + if ManagedFieldsManager != "" { + return ManagedFieldsManager + } + + // When no manager is set and no calling application can be found it is unknown + if len(os.Args[0]) == 0 { + return "unknown" + } + + // When there is an application that can be determined and no set manager + // use the base name. This is one of the ways Kubernetes libs handle figuring + // names out. + return filepath.Base(os.Args[0]) +} + +func batchPerform(infos ResourceList, fn func(*resource.Info) error, errs chan<- error) { + var kind string + var wg sync.WaitGroup + for _, info := range infos { + currentKind := info.Object.GetObjectKind().GroupVersionKind().Kind + if kind != currentKind { + wg.Wait() + kind = currentKind + } + wg.Add(1) + go func(i *resource.Info) { + errs <- fn(i) + wg.Done() + }(info) + } +} + +func createResource(info *resource.Info) error { + obj, err := resource.NewHelper(info.Client, info.Mapping).WithFieldManager(getManagedFieldsManager()).Create(info.Namespace, true, info.Object) + if err != nil { + return err + } + return info.Refresh(obj, true) +} + +func deleteResource(info *resource.Info, policy metav1.DeletionPropagation) error { + opts := &metav1.DeleteOptions{PropagationPolicy: &policy} + _, err := resource.NewHelper(info.Client, info.Mapping).WithFieldManager(getManagedFieldsManager()).DeleteWithOptions(info.Namespace, info.Name, opts) + return err +} + +func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.PatchType, error) { + oldData, err := json.Marshal(current) + if err != nil { + return nil, types.StrategicMergePatchType, errors.Wrap(err, "serializing current configuration") + } + newData, err := json.Marshal(target.Object) + if err != nil { + return nil, types.StrategicMergePatchType, errors.Wrap(err, "serializing target configuration") + } + + // Fetch the current object for the three way merge + helper := resource.NewHelper(target.Client, target.Mapping).WithFieldManager(getManagedFieldsManager()) + currentObj, err := helper.Get(target.Namespace, target.Name) + if err != nil && !apierrors.IsNotFound(err) { + return nil, types.StrategicMergePatchType, errors.Wrapf(err, "unable to get data for current object %s/%s", target.Namespace, target.Name) + } + + // Even if currentObj is nil (because it was not found), it will marshal just fine + currentData, err := json.Marshal(currentObj) + if err != nil { + return nil, types.StrategicMergePatchType, errors.Wrap(err, "serializing live configuration") + } + + // Get a versioned object + versionedObject := AsVersioned(target) + + // Unstructured objects, such as CRDs, may not have a not registered error + // returned from ConvertToVersion. Anything that's unstructured should + // use the jsonpatch.CreateMergePatch. Strategic Merge Patch is not supported + // on objects like CRDs. + _, isUnstructured := versionedObject.(runtime.Unstructured) + + // On newer K8s versions, CRDs aren't unstructured but has this dedicated type + _, isCRD := versionedObject.(*apiextv1beta1.CustomResourceDefinition) + + if isUnstructured || isCRD { + // fall back to generic JSON merge patch + patch, err := jsonpatch.CreateMergePatch(oldData, newData) + return patch, types.MergePatchType, err + } + + patchMeta, err := strategicpatch.NewPatchMetaFromStruct(versionedObject) + if err != nil { + return nil, types.StrategicMergePatchType, errors.Wrap(err, "unable to create patch metadata from object") + } + + patch, err := strategicpatch.CreateThreeWayMergePatch(oldData, newData, currentData, patchMeta, true) + return patch, types.StrategicMergePatchType, err +} + +func updateResource(c *Client, target *resource.Info, currentObj runtime.Object, force bool) error { + var ( + obj runtime.Object + helper = resource.NewHelper(target.Client, target.Mapping).WithFieldManager(getManagedFieldsManager()) + kind = target.Mapping.GroupVersionKind.Kind + ) + + // if --force is applied, attempt to replace the existing resource with the new object. + if force { + var err error + obj, err = helper.Replace(target.Namespace, target.Name, true, target.Object) + if err != nil { + return errors.Wrap(err, "failed to replace object") + } + c.Log("Replaced %q with kind %s for kind %s", target.Name, currentObj.GetObjectKind().GroupVersionKind().Kind, kind) + } else { + patch, patchType, err := createPatch(target, currentObj) + if err != nil { + return errors.Wrap(err, "failed to create patch") + } + + if patch == nil || string(patch) == "{}" { + c.Log("Looks like there are no changes for %s %q", kind, target.Name) + // This needs to happen to make sure that Helm has the latest info from the API + // Otherwise there will be no labels and other functions that use labels will panic + if err := target.Get(); err != nil { + return errors.Wrap(err, "failed to refresh resource information") + } + return nil + } + // send patch to server + c.Log("Patch %s %q in namespace %s", kind, target.Name, target.Namespace) + obj, err = helper.Patch(target.Namespace, target.Name, patchType, patch, nil) + if err != nil { + return errors.Wrapf(err, "cannot patch %q with kind %s", target.Name, kind) + } + } + + target.Refresh(obj, true) + return nil +} + +func (c *Client) watchUntilReady(timeout time.Duration, info *resource.Info) error { + kind := info.Mapping.GroupVersionKind.Kind + switch kind { + case "Job", "Pod": + default: + return nil + } + + c.Log("Watching for changes to %s %s with timeout of %v", kind, info.Name, timeout) + + // Use a selector on the name of the resource. This should be unique for the + // given version and kind + selector, err := fields.ParseSelector(fmt.Sprintf("metadata.name=%s", info.Name)) + if err != nil { + return err + } + lw := cachetools.NewListWatchFromClient(info.Client, info.Mapping.Resource.Resource, info.Namespace, selector) + + // What we watch for depends on the Kind. + // - For a Job, we watch for completion. + // - For all else, we watch until Ready. + // In the future, we might want to add some special logic for types + // like Ingress, Volume, etc. + + ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout) + defer cancel() + _, err = watchtools.UntilWithSync(ctx, lw, &unstructured.Unstructured{}, nil, func(e watch.Event) (bool, error) { + // Make sure the incoming object is versioned as we use unstructured + // objects when we build manifests + obj := convertWithMapper(e.Object, info.Mapping) + switch e.Type { + case watch.Added, watch.Modified: + // For things like a secret or a config map, this is the best indicator + // we get. We care mostly about jobs, where what we want to see is + // the status go into a good state. For other types, like ReplicaSet + // we don't really do anything to support these as hooks. + c.Log("Add/Modify event for %s: %v", info.Name, e.Type) + switch kind { + case "Job": + return c.waitForJob(obj, info.Name) + case "Pod": + return c.waitForPodSuccess(obj, info.Name) + } + return true, nil + case watch.Deleted: + c.Log("Deleted event for %s", info.Name) + return true, nil + case watch.Error: + // Handle error and return with an error. + c.Log("Error event for %s", info.Name) + return true, errors.Errorf("failed to deploy %s", info.Name) + default: + return false, nil + } + }) + return err +} + +// waitForJob is a helper that waits for a job to complete. +// +// This operates on an event returned from a watcher. +func (c *Client) waitForJob(obj runtime.Object, name string) (bool, error) { + o, ok := obj.(*batch.Job) + if !ok { + return true, errors.Errorf("expected %s to be a *batch.Job, got %T", name, obj) + } + + for _, c := range o.Status.Conditions { + if c.Type == batch.JobComplete && c.Status == "True" { + return true, nil + } else if c.Type == batch.JobFailed && c.Status == "True" { + return true, errors.Errorf("job %s failed: %s", name, c.Reason) + } + } + + c.Log("%s: Jobs active: %d, jobs failed: %d, jobs succeeded: %d", name, o.Status.Active, o.Status.Failed, o.Status.Succeeded) + return false, nil +} + +// waitForPodSuccess is a helper that waits for a pod to complete. +// +// This operates on an event returned from a watcher. +func (c *Client) waitForPodSuccess(obj runtime.Object, name string) (bool, error) { + o, ok := obj.(*v1.Pod) + if !ok { + return true, errors.Errorf("expected %s to be a *v1.Pod, got %T", name, obj) + } + + switch o.Status.Phase { + case v1.PodSucceeded: + c.Log("Pod %s succeeded", o.Name) + return true, nil + case v1.PodFailed: + return true, errors.Errorf("pod %s failed", o.Name) + case v1.PodPending: + c.Log("Pod %s pending", o.Name) + case v1.PodRunning: + c.Log("Pod %s running", o.Name) + } + + return false, nil +} + +// scrubValidationError removes kubectl info from the message. +func scrubValidationError(err error) error { + if err == nil { + return nil + } + const stopValidateMessage = "if you choose to ignore these errors, turn validation off with --validate=false" + + if strings.Contains(err.Error(), stopValidateMessage) { + return errors.New(strings.ReplaceAll(err.Error(), "; "+stopValidateMessage, "")) + } + return err +} + +// WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase +// and returns said phase (PodSucceeded or PodFailed qualify). +func (c *Client) WaitAndGetCompletedPodPhase(name string, timeout time.Duration) (v1.PodPhase, error) { + client, err := c.getKubeClient() + if err != nil { + return v1.PodUnknown, err + } + to := int64(timeout) + watcher, err := client.CoreV1().Pods(c.namespace()).Watch(context.Background(), metav1.ListOptions{ + FieldSelector: fmt.Sprintf("metadata.name=%s", name), + TimeoutSeconds: &to, + }) + if err != nil { + return v1.PodUnknown, err + } + + for event := range watcher.ResultChan() { + p, ok := event.Object.(*v1.Pod) + if !ok { + return v1.PodUnknown, fmt.Errorf("%s not a pod", name) + } + switch p.Status.Phase { + case v1.PodFailed: + return v1.PodFailed, nil + case v1.PodSucceeded: + return v1.PodSucceeded, nil + } + } + + return v1.PodUnknown, err +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/config.go b/vendor/helm.sh/helm/v3/pkg/kube/config.go new file mode 100644 index 000000000..e00c9acb1 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/config.go @@ -0,0 +1,30 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import "k8s.io/cli-runtime/pkg/genericclioptions" + +// GetConfig returns a Kubernetes client config. +// +// Deprecated +func GetConfig(kubeconfig, context, namespace string) *genericclioptions.ConfigFlags { + cf := genericclioptions.NewConfigFlags(true) + cf.Namespace = &namespace + cf.Context = &context + cf.KubeConfig = &kubeconfig + return cf +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/converter.go b/vendor/helm.sh/helm/v3/pkg/kube/converter.go new file mode 100644 index 000000000..3bf0e358c --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/converter.go @@ -0,0 +1,69 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import ( + "sync" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/cli-runtime/pkg/resource" + "k8s.io/client-go/kubernetes/scheme" +) + +var k8sNativeScheme *runtime.Scheme +var k8sNativeSchemeOnce sync.Once + +// AsVersioned converts the given info into a runtime.Object with the correct +// group and version set +func AsVersioned(info *resource.Info) runtime.Object { + return convertWithMapper(info.Object, info.Mapping) +} + +// convertWithMapper converts the given object with the optional provided +// RESTMapping. If no mapping is provided, the default schema versioner is used +func convertWithMapper(obj runtime.Object, mapping *meta.RESTMapping) runtime.Object { + s := kubernetesNativeScheme() + var gv = runtime.GroupVersioner(schema.GroupVersions(s.PrioritizedVersionsAllGroups())) + if mapping != nil { + gv = mapping.GroupVersionKind.GroupVersion() + } + if obj, err := runtime.ObjectConvertor(s).ConvertToVersion(obj, gv); err == nil { + return obj + } + return obj +} + +// kubernetesNativeScheme returns a clean *runtime.Scheme with _only_ Kubernetes +// native resources added to it. This is required to break free of custom resources +// that may have been added to scheme.Scheme due to Helm being used as a package in +// combination with e.g. a versioned kube client. If we would not do this, the client +// may attempt to perform e.g. a 3-way-merge strategy patch for custom resources. +func kubernetesNativeScheme() *runtime.Scheme { + k8sNativeSchemeOnce.Do(func() { + k8sNativeScheme = runtime.NewScheme() + scheme.AddToScheme(k8sNativeScheme) + // API extensions are not in the above scheme set, + // and must thus be added separately. + apiextensionsv1beta1.AddToScheme(k8sNativeScheme) + apiextensionsv1.AddToScheme(k8sNativeScheme) + }) + return k8sNativeScheme +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/factory.go b/vendor/helm.sh/helm/v3/pkg/kube/factory.go new file mode 100644 index 000000000..f19d62dc3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/factory.go @@ -0,0 +1,51 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import ( + "k8s.io/cli-runtime/pkg/resource" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/kubectl/pkg/validation" +) + +// Factory provides abstractions that allow the Kubectl command to be extended across multiple types +// of resources and different API sets. +// This interface is a minimal copy of the kubectl Factory interface containing only the functions +// needed by Helm. Since Kubernetes Go APIs, including interfaces, can change in any minor release +// this interface is not covered by the Helm backwards compatibility guarantee. The reasons for the +// minimal copy is that it does not include the full interface. Changes or additions to functions +// Helm does not need are not impacted or exposed. This minimizes the impact of Kubernetes changes +// being exposed. +type Factory interface { + // ToRawKubeConfigLoader return kubeconfig loader as-is + ToRawKubeConfigLoader() clientcmd.ClientConfig + + // DynamicClient returns a dynamic client ready for use + DynamicClient() (dynamic.Interface, error) + + // KubernetesClientSet gives you back an external clientset + KubernetesClientSet() (*kubernetes.Clientset, error) + + // NewBuilder returns an object that assists in loading objects from both disk and the server + // and which implements the common patterns for CLI interactions with generic resources. + NewBuilder() *resource.Builder + + // Returns a schema that can validate objects stored on disk. + Validator(validationDirective string) (validation.Schema, error) +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/fake/fake.go b/vendor/helm.sh/helm/v3/pkg/kube/fake/fake.go new file mode 100644 index 000000000..267020d57 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/fake/fake.go @@ -0,0 +1,160 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fake implements various fake KubeClients for use in testing +package fake + +import ( + "io" + "time" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/cli-runtime/pkg/resource" + + "helm.sh/helm/v3/pkg/kube" +) + +// FailingKubeClient implements KubeClient for testing purposes. It also has +// additional errors you can set to fail different functions, otherwise it +// delegates all its calls to `PrintingKubeClient` +type FailingKubeClient struct { + PrintingKubeClient + CreateError error + GetError error + WaitError error + DeleteError error + DeleteWithPropagationError error + WatchUntilReadyError error + UpdateError error + BuildError error + BuildTableError error + BuildDummy bool + BuildUnstructuredError error + WaitAndGetCompletedPodPhaseError error + WaitDuration time.Duration +} + +// Create returns the configured error if set or prints +func (f *FailingKubeClient) Create(resources kube.ResourceList) (*kube.Result, error) { + if f.CreateError != nil { + return nil, f.CreateError + } + return f.PrintingKubeClient.Create(resources) +} + +// Get returns the configured error if set or prints +func (f *FailingKubeClient) Get(resources kube.ResourceList, related bool) (map[string][]runtime.Object, error) { + if f.GetError != nil { + return nil, f.GetError + } + return f.PrintingKubeClient.Get(resources, related) +} + +// Waits the amount of time defined on f.WaitDuration, then returns the configured error if set or prints. +func (f *FailingKubeClient) Wait(resources kube.ResourceList, d time.Duration) error { + time.Sleep(f.WaitDuration) + if f.WaitError != nil { + return f.WaitError + } + return f.PrintingKubeClient.Wait(resources, d) +} + +// WaitWithJobs returns the configured error if set or prints +func (f *FailingKubeClient) WaitWithJobs(resources kube.ResourceList, d time.Duration) error { + if f.WaitError != nil { + return f.WaitError + } + return f.PrintingKubeClient.WaitWithJobs(resources, d) +} + +// WaitForDelete returns the configured error if set or prints +func (f *FailingKubeClient) WaitForDelete(resources kube.ResourceList, d time.Duration) error { + if f.WaitError != nil { + return f.WaitError + } + return f.PrintingKubeClient.WaitForDelete(resources, d) +} + +// Delete returns the configured error if set or prints +func (f *FailingKubeClient) Delete(resources kube.ResourceList) (*kube.Result, []error) { + if f.DeleteError != nil { + return nil, []error{f.DeleteError} + } + return f.PrintingKubeClient.Delete(resources) +} + +// WatchUntilReady returns the configured error if set or prints +func (f *FailingKubeClient) WatchUntilReady(resources kube.ResourceList, d time.Duration) error { + if f.WatchUntilReadyError != nil { + return f.WatchUntilReadyError + } + return f.PrintingKubeClient.WatchUntilReady(resources, d) +} + +// Update returns the configured error if set or prints +func (f *FailingKubeClient) Update(r, modified kube.ResourceList, ignoreMe bool) (*kube.Result, error) { + if f.UpdateError != nil { + return &kube.Result{}, f.UpdateError + } + return f.PrintingKubeClient.Update(r, modified, ignoreMe) +} + +// Build returns the configured error if set or prints +func (f *FailingKubeClient) Build(r io.Reader, _ bool) (kube.ResourceList, error) { + if f.BuildError != nil { + return []*resource.Info{}, f.BuildError + } + if f.BuildDummy { + return createDummyResourceList(), nil + } + return f.PrintingKubeClient.Build(r, false) +} + +// BuildTable returns the configured error if set or prints +func (f *FailingKubeClient) BuildTable(r io.Reader, _ bool) (kube.ResourceList, error) { + if f.BuildTableError != nil { + return []*resource.Info{}, f.BuildTableError + } + return f.PrintingKubeClient.BuildTable(r, false) +} + +// WaitAndGetCompletedPodPhase returns the configured error if set or prints +func (f *FailingKubeClient) WaitAndGetCompletedPodPhase(s string, d time.Duration) (v1.PodPhase, error) { + if f.WaitAndGetCompletedPodPhaseError != nil { + return v1.PodSucceeded, f.WaitAndGetCompletedPodPhaseError + } + return f.PrintingKubeClient.WaitAndGetCompletedPodPhase(s, d) +} + +// DeleteWithPropagationPolicy returns the configured error if set or prints +func (f *FailingKubeClient) DeleteWithPropagationPolicy(resources kube.ResourceList, policy metav1.DeletionPropagation) (*kube.Result, []error) { + if f.DeleteWithPropagationError != nil { + return nil, []error{f.DeleteWithPropagationError} + } + return f.PrintingKubeClient.DeleteWithPropagationPolicy(resources, policy) +} + +func createDummyResourceList() kube.ResourceList { + var resInfo resource.Info + resInfo.Name = "dummyName" + resInfo.Namespace = "dummyNamespace" + var resourceList kube.ResourceList + resourceList.Append(&resInfo) + return resourceList + +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/fake/printer.go b/vendor/helm.sh/helm/v3/pkg/kube/fake/printer.go new file mode 100644 index 000000000..cc2c84b40 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/fake/printer.go @@ -0,0 +1,136 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "io" + "strings" + "time" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/cli-runtime/pkg/resource" + + "helm.sh/helm/v3/pkg/kube" +) + +// PrintingKubeClient implements KubeClient, but simply prints the reader to +// the given output. +type PrintingKubeClient struct { + Out io.Writer +} + +// IsReachable checks if the cluster is reachable +func (p *PrintingKubeClient) IsReachable() error { + return nil +} + +// Create prints the values of what would be created with a real KubeClient. +func (p *PrintingKubeClient) Create(resources kube.ResourceList) (*kube.Result, error) { + _, err := io.Copy(p.Out, bufferize(resources)) + if err != nil { + return nil, err + } + return &kube.Result{Created: resources}, nil +} + +func (p *PrintingKubeClient) Get(resources kube.ResourceList, _ bool) (map[string][]runtime.Object, error) { + _, err := io.Copy(p.Out, bufferize(resources)) + if err != nil { + return nil, err + } + return make(map[string][]runtime.Object), nil +} + +func (p *PrintingKubeClient) Wait(resources kube.ResourceList, _ time.Duration) error { + _, err := io.Copy(p.Out, bufferize(resources)) + return err +} + +func (p *PrintingKubeClient) WaitWithJobs(resources kube.ResourceList, _ time.Duration) error { + _, err := io.Copy(p.Out, bufferize(resources)) + return err +} + +func (p *PrintingKubeClient) WaitForDelete(resources kube.ResourceList, _ time.Duration) error { + _, err := io.Copy(p.Out, bufferize(resources)) + return err +} + +// Delete implements KubeClient delete. +// +// It only prints out the content to be deleted. +func (p *PrintingKubeClient) Delete(resources kube.ResourceList) (*kube.Result, []error) { + _, err := io.Copy(p.Out, bufferize(resources)) + if err != nil { + return nil, []error{err} + } + return &kube.Result{Deleted: resources}, nil +} + +// WatchUntilReady implements KubeClient WatchUntilReady. +func (p *PrintingKubeClient) WatchUntilReady(resources kube.ResourceList, _ time.Duration) error { + _, err := io.Copy(p.Out, bufferize(resources)) + return err +} + +// Update implements KubeClient Update. +func (p *PrintingKubeClient) Update(_, modified kube.ResourceList, _ bool) (*kube.Result, error) { + _, err := io.Copy(p.Out, bufferize(modified)) + if err != nil { + return nil, err + } + // TODO: This doesn't completely mock out have some that get created, + // updated, and deleted. I don't think these are used in any unit tests, but + // we may want to refactor a way to handle future tests + return &kube.Result{Updated: modified}, nil +} + +// Build implements KubeClient Build. +func (p *PrintingKubeClient) Build(_ io.Reader, _ bool) (kube.ResourceList, error) { + return []*resource.Info{}, nil +} + +// BuildTable implements KubeClient BuildTable. +func (p *PrintingKubeClient) BuildTable(_ io.Reader, _ bool) (kube.ResourceList, error) { + return []*resource.Info{}, nil +} + +// WaitAndGetCompletedPodPhase implements KubeClient WaitAndGetCompletedPodPhase. +func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(_ string, _ time.Duration) (v1.PodPhase, error) { + return v1.PodSucceeded, nil +} + +// DeleteWithPropagationPolicy implements KubeClient delete. +// +// It only prints out the content to be deleted. +func (p *PrintingKubeClient) DeleteWithPropagationPolicy(resources kube.ResourceList, _ metav1.DeletionPropagation) (*kube.Result, []error) { + _, err := io.Copy(p.Out, bufferize(resources)) + if err != nil { + return nil, []error{err} + } + return &kube.Result{Deleted: resources}, nil +} + +func bufferize(resources kube.ResourceList) io.Reader { + var builder strings.Builder + for _, info := range resources { + builder.WriteString(info.String() + "\n") + } + return strings.NewReader(builder.String()) +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/interface.go b/vendor/helm.sh/helm/v3/pkg/kube/interface.go new file mode 100644 index 000000000..ce42ed950 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/interface.go @@ -0,0 +1,116 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube + +import ( + "io" + "time" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// Interface represents a client capable of communicating with the Kubernetes API. +// +// A KubernetesClient must be concurrency safe. +type Interface interface { + // Create creates one or more resources. + Create(resources ResourceList) (*Result, error) + + // Wait waits up to the given timeout for the specified resources to be ready. + Wait(resources ResourceList, timeout time.Duration) error + + // WaitWithJobs wait up to the given timeout for the specified resources to be ready, including jobs. + WaitWithJobs(resources ResourceList, timeout time.Duration) error + + // Delete destroys one or more resources. + Delete(resources ResourceList) (*Result, []error) + + // WatchUntilReady watches the resources given and waits until it is ready. + // + // This method is mainly for hook implementations. It watches for a resource to + // hit a particular milestone. The milestone depends on the Kind. + // + // For Jobs, "ready" means the Job ran to completion (exited without error). + // For Pods, "ready" means the Pod phase is marked "succeeded". + // For all other kinds, it means the kind was created or modified without + // error. + WatchUntilReady(resources ResourceList, timeout time.Duration) error + + // Update updates one or more resources or creates the resource + // if it doesn't exist. + Update(original, target ResourceList, force bool) (*Result, error) + + // Build creates a resource list from a Reader. + // + // Reader must contain a YAML stream (one or more YAML documents separated + // by "\n---\n") + // + // Validates against OpenAPI schema if validate is true. + Build(reader io.Reader, validate bool) (ResourceList, error) + + // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase + // and returns said phase (PodSucceeded or PodFailed qualify). + WaitAndGetCompletedPodPhase(name string, timeout time.Duration) (v1.PodPhase, error) + + // IsReachable checks whether the client is able to connect to the cluster. + IsReachable() error +} + +// InterfaceExt is introduced to avoid breaking backwards compatibility for Interface implementers. +// +// TODO Helm 4: Remove InterfaceExt and integrate its method(s) into the Interface. +type InterfaceExt interface { + // WaitForDelete wait up to the given timeout for the specified resources to be deleted. + WaitForDelete(resources ResourceList, timeout time.Duration) error +} + +// InterfaceDeletionPropagation is introduced to avoid breaking backwards compatibility for Interface implementers. +// +// TODO Helm 4: Remove InterfaceDeletionPropagation and integrate its method(s) into the Interface. +type InterfaceDeletionPropagation interface { + // Delete destroys one or more resources. The deletion propagation is handled as per the given deletion propagation value. + DeleteWithPropagationPolicy(resources ResourceList, policy metav1.DeletionPropagation) (*Result, []error) +} + +// InterfaceResources is introduced to avoid breaking backwards compatibility for Interface implementers. +// +// TODO Helm 4: Remove InterfaceResources and integrate its method(s) into the Interface. +type InterfaceResources interface { + // Get details of deployed resources. + // The first argument is a list of resources to get. The second argument + // specifies if related pods should be fetched. For example, the pods being + // managed by a deployment. + Get(resources ResourceList, related bool) (map[string][]runtime.Object, error) + + // BuildTable creates a resource list from a Reader. This differs from + // Interface.Build() in that a table kind is returned. A table is useful + // if you want to use a printer to display the information. + // + // Reader must contain a YAML stream (one or more YAML documents separated + // by "\n---\n") + // + // Validates against OpenAPI schema if validate is true. + // TODO Helm 4: Integrate into Build with an argument + BuildTable(reader io.Reader, validate bool) (ResourceList, error) +} + +var _ Interface = (*Client)(nil) +var _ InterfaceExt = (*Client)(nil) +var _ InterfaceDeletionPropagation = (*Client)(nil) +var _ InterfaceResources = (*Client)(nil) diff --git a/vendor/helm.sh/helm/v3/pkg/kube/ready.go b/vendor/helm.sh/helm/v3/pkg/kube/ready.go new file mode 100644 index 000000000..55c4a39bf --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/ready.go @@ -0,0 +1,463 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import ( + "context" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + appsv1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta2 "k8s.io/api/apps/v1beta2" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/cli-runtime/pkg/resource" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + + deploymentutil "helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util" +) + +// ReadyCheckerOption is a function that configures a ReadyChecker. +type ReadyCheckerOption func(*ReadyChecker) + +// PausedAsReady returns a ReadyCheckerOption that configures a ReadyChecker +// to consider paused resources to be ready. For example a Deployment +// with spec.paused equal to true would be considered ready. +func PausedAsReady(pausedAsReady bool) ReadyCheckerOption { + return func(c *ReadyChecker) { + c.pausedAsReady = pausedAsReady + } +} + +// CheckJobs returns a ReadyCheckerOption that configures a ReadyChecker +// to consider readiness of Job resources. +func CheckJobs(checkJobs bool) ReadyCheckerOption { + return func(c *ReadyChecker) { + c.checkJobs = checkJobs + } +} + +// NewReadyChecker creates a new checker. Passed ReadyCheckerOptions can +// be used to override defaults. +func NewReadyChecker(cl kubernetes.Interface, log func(string, ...interface{}), opts ...ReadyCheckerOption) ReadyChecker { + c := ReadyChecker{ + client: cl, + log: log, + } + if c.log == nil { + c.log = nopLogger + } + for _, opt := range opts { + opt(&c) + } + return c +} + +// ReadyChecker is a type that can check core Kubernetes types for readiness. +type ReadyChecker struct { + client kubernetes.Interface + log func(string, ...interface{}) + checkJobs bool + pausedAsReady bool +} + +// IsReady checks if v is ready. It supports checking readiness for pods, +// deployments, persistent volume claims, services, daemon sets, custom +// resource definitions, stateful sets, replication controllers, jobs (optional), +// and replica sets. All other resource kinds are always considered ready. +// +// IsReady will fetch the latest state of the object from the server prior to +// performing readiness checks, and it will return any error encountered. +func (c *ReadyChecker) IsReady(ctx context.Context, v *resource.Info) (bool, error) { + switch value := AsVersioned(v).(type) { + case *corev1.Pod: + pod, err := c.client.CoreV1().Pods(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil || !c.isPodReady(pod) { + return false, err + } + case *batchv1.Job: + if c.checkJobs { + job, err := c.client.BatchV1().Jobs(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + ready, err := c.jobReady(job) + return ready, err + } + case *appsv1.Deployment, *appsv1beta1.Deployment, *appsv1beta2.Deployment, *extensionsv1beta1.Deployment: + currentDeployment, err := c.client.AppsV1().Deployments(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + return c.pausedAsReady, nil + } + // Find RS associated with deployment + newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, c.client.AppsV1()) + if err != nil || newReplicaSet == nil { + return false, err + } + if !c.deploymentReady(newReplicaSet, currentDeployment) { + return false, nil + } + case *corev1.PersistentVolumeClaim: + claim, err := c.client.CoreV1().PersistentVolumeClaims(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if !c.volumeReady(claim) { + return false, nil + } + case *corev1.Service: + svc, err := c.client.CoreV1().Services(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if !c.serviceReady(svc) { + return false, nil + } + case *extensionsv1beta1.DaemonSet, *appsv1.DaemonSet, *appsv1beta2.DaemonSet: + ds, err := c.client.AppsV1().DaemonSets(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if !c.daemonSetReady(ds) { + return false, nil + } + case *apiextv1beta1.CustomResourceDefinition: + if err := v.Get(); err != nil { + return false, err + } + crd := &apiextv1beta1.CustomResourceDefinition{} + if err := scheme.Scheme.Convert(v.Object, crd, nil); err != nil { + return false, err + } + if !c.crdBetaReady(*crd) { + return false, nil + } + case *apiextv1.CustomResourceDefinition: + if err := v.Get(); err != nil { + return false, err + } + crd := &apiextv1.CustomResourceDefinition{} + if err := scheme.Scheme.Convert(v.Object, crd, nil); err != nil { + return false, err + } + if !c.crdReady(*crd) { + return false, nil + } + case *appsv1.StatefulSet, *appsv1beta1.StatefulSet, *appsv1beta2.StatefulSet: + sts, err := c.client.AppsV1().StatefulSets(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if !c.statefulSetReady(sts) { + return false, nil + } + case *corev1.ReplicationController: + rc, err := c.client.CoreV1().ReplicationControllers(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if !c.replicationControllerReady(rc) { + return false, nil + } + ready, err := c.podsReadyForObject(ctx, v.Namespace, value) + if !ready || err != nil { + return false, err + } + case *extensionsv1beta1.ReplicaSet, *appsv1beta2.ReplicaSet, *appsv1.ReplicaSet: + rs, err := c.client.AppsV1().ReplicaSets(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + if !c.replicaSetReady(rs) { + return false, nil + } + ready, err := c.podsReadyForObject(ctx, v.Namespace, value) + if !ready || err != nil { + return false, err + } + } + return true, nil +} + +func (c *ReadyChecker) podsReadyForObject(ctx context.Context, namespace string, obj runtime.Object) (bool, error) { + pods, err := c.podsforObject(ctx, namespace, obj) + if err != nil { + return false, err + } + for _, pod := range pods { + if !c.isPodReady(&pod) { + return false, nil + } + } + return true, nil +} + +func (c *ReadyChecker) podsforObject(ctx context.Context, namespace string, obj runtime.Object) ([]corev1.Pod, error) { + selector, err := SelectorsForObject(obj) + if err != nil { + return nil, err + } + list, err := getPods(ctx, c.client, namespace, selector.String()) + return list, err +} + +// isPodReady returns true if a pod is ready; false otherwise. +func (c *ReadyChecker) isPodReady(pod *corev1.Pod) bool { + for _, c := range pod.Status.Conditions { + if c.Type == corev1.PodReady && c.Status == corev1.ConditionTrue { + return true + } + } + c.log("Pod is not ready: %s/%s", pod.GetNamespace(), pod.GetName()) + return false +} + +func (c *ReadyChecker) jobReady(job *batchv1.Job) (bool, error) { + if job.Status.Failed > *job.Spec.BackoffLimit { + c.log("Job is failed: %s/%s", job.GetNamespace(), job.GetName()) + // If a job is failed, it can't recover, so throw an error + return false, fmt.Errorf("job is failed: %s/%s", job.GetNamespace(), job.GetName()) + } + if job.Spec.Completions != nil && job.Status.Succeeded < *job.Spec.Completions { + c.log("Job is not completed: %s/%s", job.GetNamespace(), job.GetName()) + return false, nil + } + return true, nil +} + +func (c *ReadyChecker) serviceReady(s *corev1.Service) bool { + // ExternalName Services are external to cluster so helm shouldn't be checking to see if they're 'ready' (i.e. have an IP Set) + if s.Spec.Type == corev1.ServiceTypeExternalName { + return true + } + + // Ensure that the service cluster IP is not empty + if s.Spec.ClusterIP == "" { + c.log("Service does not have cluster IP address: %s/%s", s.GetNamespace(), s.GetName()) + return false + } + + // This checks if the service has a LoadBalancer and that balancer has an Ingress defined + if s.Spec.Type == corev1.ServiceTypeLoadBalancer { + // do not wait when at least 1 external IP is set + if len(s.Spec.ExternalIPs) > 0 { + c.log("Service %s/%s has external IP addresses (%v), marking as ready", s.GetNamespace(), s.GetName(), s.Spec.ExternalIPs) + return true + } + + if s.Status.LoadBalancer.Ingress == nil { + c.log("Service does not have load balancer ingress IP address: %s/%s", s.GetNamespace(), s.GetName()) + return false + } + } + + return true +} + +func (c *ReadyChecker) volumeReady(v *corev1.PersistentVolumeClaim) bool { + if v.Status.Phase != corev1.ClaimBound { + c.log("PersistentVolumeClaim is not bound: %s/%s", v.GetNamespace(), v.GetName()) + return false + } + return true +} + +func (c *ReadyChecker) deploymentReady(rs *appsv1.ReplicaSet, dep *appsv1.Deployment) bool { + // Verify the replicaset readiness + if !c.replicaSetReady(rs) { + return false + } + // Verify the generation observed by the deployment controller matches the spec generation + if dep.Status.ObservedGeneration != dep.ObjectMeta.Generation { + c.log("Deployment is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).", dep.Namespace, dep.Name, dep.Status.ObservedGeneration, dep.ObjectMeta.Generation) + return false + } + + expectedReady := *dep.Spec.Replicas - deploymentutil.MaxUnavailable(*dep) + if !(rs.Status.ReadyReplicas >= expectedReady) { + c.log("Deployment is not ready: %s/%s. %d out of %d expected pods are ready", dep.Namespace, dep.Name, rs.Status.ReadyReplicas, expectedReady) + return false + } + return true +} + +func (c *ReadyChecker) daemonSetReady(ds *appsv1.DaemonSet) bool { + // Verify the generation observed by the daemonSet controller matches the spec generation + if ds.Status.ObservedGeneration != ds.ObjectMeta.Generation { + c.log("DaemonSet is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).", ds.Namespace, ds.Name, ds.Status.ObservedGeneration, ds.ObjectMeta.Generation) + return false + } + + // If the update strategy is not a rolling update, there will be nothing to wait for + if ds.Spec.UpdateStrategy.Type != appsv1.RollingUpdateDaemonSetStrategyType { + return true + } + + // Make sure all the updated pods have been scheduled + if ds.Status.UpdatedNumberScheduled != ds.Status.DesiredNumberScheduled { + c.log("DaemonSet is not ready: %s/%s. %d out of %d expected pods have been scheduled", ds.Namespace, ds.Name, ds.Status.UpdatedNumberScheduled, ds.Status.DesiredNumberScheduled) + return false + } + maxUnavailable, err := intstr.GetScaledValueFromIntOrPercent(ds.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable, int(ds.Status.DesiredNumberScheduled), true) + if err != nil { + // If for some reason the value is invalid, set max unavailable to the + // number of desired replicas. This is the same behavior as the + // `MaxUnavailable` function in deploymentutil + maxUnavailable = int(ds.Status.DesiredNumberScheduled) + } + + expectedReady := int(ds.Status.DesiredNumberScheduled) - maxUnavailable + if !(int(ds.Status.NumberReady) >= expectedReady) { + c.log("DaemonSet is not ready: %s/%s. %d out of %d expected pods are ready", ds.Namespace, ds.Name, ds.Status.NumberReady, expectedReady) + return false + } + return true +} + +// Because the v1 extensions API is not available on all supported k8s versions +// yet and because Go doesn't support generics, we need to have a duplicate +// function to support the v1beta1 types +func (c *ReadyChecker) crdBetaReady(crd apiextv1beta1.CustomResourceDefinition) bool { + for _, cond := range crd.Status.Conditions { + switch cond.Type { + case apiextv1beta1.Established: + if cond.Status == apiextv1beta1.ConditionTrue { + return true + } + case apiextv1beta1.NamesAccepted: + if cond.Status == apiextv1beta1.ConditionFalse { + // This indicates a naming conflict, but it's probably not the + // job of this function to fail because of that. Instead, + // we treat it as a success, since the process should be able to + // continue. + return true + } + } + } + return false +} + +func (c *ReadyChecker) crdReady(crd apiextv1.CustomResourceDefinition) bool { + for _, cond := range crd.Status.Conditions { + switch cond.Type { + case apiextv1.Established: + if cond.Status == apiextv1.ConditionTrue { + return true + } + case apiextv1.NamesAccepted: + if cond.Status == apiextv1.ConditionFalse { + // This indicates a naming conflict, but it's probably not the + // job of this function to fail because of that. Instead, + // we treat it as a success, since the process should be able to + // continue. + return true + } + } + } + return false +} + +func (c *ReadyChecker) statefulSetReady(sts *appsv1.StatefulSet) bool { + // Verify the generation observed by the statefulSet controller matches the spec generation + if sts.Status.ObservedGeneration != sts.ObjectMeta.Generation { + c.log("StatefulSet is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).", sts.Namespace, sts.Name, sts.Status.ObservedGeneration, sts.ObjectMeta.Generation) + return false + } + + // If the update strategy is not a rolling update, there will be nothing to wait for + if sts.Spec.UpdateStrategy.Type != appsv1.RollingUpdateStatefulSetStrategyType { + c.log("StatefulSet skipped ready check: %s/%s. updateStrategy is %v", sts.Namespace, sts.Name, sts.Spec.UpdateStrategy.Type) + return true + } + + // Dereference all the pointers because StatefulSets like them + var partition int + // 1 is the default for replicas if not set + replicas := 1 + // For some reason, even if the update strategy is a rolling update, the + // actual rollingUpdate field can be nil. If it is, we can safely assume + // there is no partition value + if sts.Spec.UpdateStrategy.RollingUpdate != nil && sts.Spec.UpdateStrategy.RollingUpdate.Partition != nil { + partition = int(*sts.Spec.UpdateStrategy.RollingUpdate.Partition) + } + if sts.Spec.Replicas != nil { + replicas = int(*sts.Spec.Replicas) + } + + // Because an update strategy can use partitioning, we need to calculate the + // number of updated replicas we should have. For example, if the replicas + // is set to 3 and the partition is 2, we'd expect only one pod to be + // updated + expectedReplicas := replicas - partition + + // Make sure all the updated pods have been scheduled + if int(sts.Status.UpdatedReplicas) < expectedReplicas { + c.log("StatefulSet is not ready: %s/%s. %d out of %d expected pods have been scheduled", sts.Namespace, sts.Name, sts.Status.UpdatedReplicas, expectedReplicas) + return false + } + + if int(sts.Status.ReadyReplicas) != replicas { + c.log("StatefulSet is not ready: %s/%s. %d out of %d expected pods are ready", sts.Namespace, sts.Name, sts.Status.ReadyReplicas, replicas) + return false + } + // This check only makes sense when all partitions are being upgraded otherwise during a + // partitioned rolling upgrade, this condition will never evaluate to true, leading to + // error. + if partition == 0 && sts.Status.CurrentRevision != sts.Status.UpdateRevision { + c.log("StatefulSet is not ready: %s/%s. currentRevision %s does not yet match updateRevision %s", sts.Namespace, sts.Name, sts.Status.CurrentRevision, sts.Status.UpdateRevision) + return false + } + + c.log("StatefulSet is ready: %s/%s. %d out of %d expected pods are ready", sts.Namespace, sts.Name, sts.Status.ReadyReplicas, replicas) + return true +} + +func (c *ReadyChecker) replicationControllerReady(rc *corev1.ReplicationController) bool { + // Verify the generation observed by the replicationController controller matches the spec generation + if rc.Status.ObservedGeneration != rc.ObjectMeta.Generation { + c.log("ReplicationController is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).", rc.Namespace, rc.Name, rc.Status.ObservedGeneration, rc.ObjectMeta.Generation) + return false + } + return true +} + +func (c *ReadyChecker) replicaSetReady(rs *appsv1.ReplicaSet) bool { + // Verify the generation observed by the replicaSet controller matches the spec generation + if rs.Status.ObservedGeneration != rs.ObjectMeta.Generation { + c.log("ReplicaSet is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).", rs.Namespace, rs.Name, rs.Status.ObservedGeneration, rs.ObjectMeta.Generation) + return false + } + return true +} + +func getPods(ctx context.Context, client kubernetes.Interface, namespace, selector string) ([]corev1.Pod, error) { + list, err := client.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{ + LabelSelector: selector, + }) + return list.Items, err +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/resource.go b/vendor/helm.sh/helm/v3/pkg/kube/resource.go new file mode 100644 index 000000000..d441db8a7 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/resource.go @@ -0,0 +1,85 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import "k8s.io/cli-runtime/pkg/resource" + +// ResourceList provides convenience methods for comparing collections of Infos. +type ResourceList []*resource.Info + +// Append adds an Info to the Result. +func (r *ResourceList) Append(val *resource.Info) { + *r = append(*r, val) +} + +// Visit implements resource.Visitor. The visitor stops if fn returns an error. +func (r ResourceList) Visit(fn resource.VisitorFunc) error { + for _, i := range r { + if err := fn(i, nil); err != nil { + return err + } + } + return nil +} + +// Filter returns a new Result with Infos that satisfy the predicate fn. +func (r ResourceList) Filter(fn func(*resource.Info) bool) ResourceList { + var result ResourceList + for _, i := range r { + if fn(i) { + result.Append(i) + } + } + return result +} + +// Get returns the Info from the result that matches the name and kind. +func (r ResourceList) Get(info *resource.Info) *resource.Info { + for _, i := range r { + if isMatchingInfo(i, info) { + return i + } + } + return nil +} + +// Contains checks to see if an object exists. +func (r ResourceList) Contains(info *resource.Info) bool { + for _, i := range r { + if isMatchingInfo(i, info) { + return true + } + } + return false +} + +// Difference will return a new Result with objects not contained in rs. +func (r ResourceList) Difference(rs ResourceList) ResourceList { + return r.Filter(func(info *resource.Info) bool { + return !rs.Contains(info) + }) +} + +// Intersect will return a new Result with objects contained in both Results. +func (r ResourceList) Intersect(rs ResourceList) ResourceList { + return r.Filter(rs.Contains) +} + +// isMatchingInfo returns true if infos match on Name and GroupVersionKind. +func isMatchingInfo(a, b *resource.Info) bool { + return a.Name == b.Name && a.Namespace == b.Namespace && a.Mapping.GroupVersionKind.Kind == b.Mapping.GroupVersionKind.Kind +} diff --git a/vendor/helm.sh/helm/v3/pkg/kube/resource_policy.go b/vendor/helm.sh/helm/v3/pkg/kube/resource_policy.go new file mode 100644 index 000000000..46b8680dd --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/resource_policy.go @@ -0,0 +1,27 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +// ResourcePolicyAnno is the annotation name for a resource policy +const ResourcePolicyAnno = "helm.sh/resource-policy" + +// KeepPolicy is the resource policy type for keep +// +// This resource policy type allows resources to skip being deleted +// +// during an uninstallRelease action. +const KeepPolicy = "keep" diff --git a/vendor/helm.sh/helm/v3/pkg/kube/result.go b/vendor/helm.sh/helm/v3/pkg/kube/result.go new file mode 100644 index 000000000..c3e171c2e --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/result.go @@ -0,0 +1,28 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube + +// Result contains the information of created, updated, and deleted resources +// for various kube API calls along with helper methods for using those +// resources +type Result struct { + Created ResourceList + Updated ResourceList + Deleted ResourceList +} + +// If needed, we can add methods to the Result type for things like diffing diff --git a/vendor/helm.sh/helm/v3/pkg/kube/wait.go b/vendor/helm.sh/helm/v3/pkg/kube/wait.go new file mode 100644 index 000000000..36110d0de --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/kube/wait.go @@ -0,0 +1,166 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/pkg/errors" + appsv1 "k8s.io/api/apps/v1" + appsv1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta2 "k8s.io/api/apps/v1beta2" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/cli-runtime/pkg/resource" + + "k8s.io/apimachinery/pkg/util/wait" +) + +type waiter struct { + c ReadyChecker + timeout time.Duration + log func(string, ...interface{}) +} + +// waitForResources polls to get the current status of all pods, PVCs, Services and +// Jobs(optional) until all are ready or a timeout is reached +func (w *waiter) waitForResources(created ResourceList) error { + w.log("beginning wait for %d resources with timeout of %v", len(created), w.timeout) + + ctx, cancel := context.WithTimeout(context.Background(), w.timeout) + defer cancel() + + numberOfErrors := make([]int, len(created)) + for i := range numberOfErrors { + numberOfErrors[i] = 0 + } + + return wait.PollUntilContextCancel(ctx, 2*time.Second, true, func(ctx context.Context) (bool, error) { + waitRetries := 30 + for i, v := range created { + ready, err := w.c.IsReady(ctx, v) + + if waitRetries > 0 && w.isRetryableError(err, v) { + numberOfErrors[i]++ + if numberOfErrors[i] > waitRetries { + w.log("Max number of retries reached") + return false, err + } + w.log("Retrying as current number of retries %d less than max number of retries %d", numberOfErrors[i]-1, waitRetries) + return false, nil + } + numberOfErrors[i] = 0 + if !ready { + return false, err + } + } + return true, nil + }) +} + +func (w *waiter) isRetryableError(err error, resource *resource.Info) bool { + if err == nil { + return false + } + w.log("Error received when checking status of resource %s. Error: '%s', Resource details: '%s'", resource.Name, err, resource) + if ev, ok := err.(*apierrors.StatusError); ok { + statusCode := ev.Status().Code + retryable := w.isRetryableHTTPStatusCode(statusCode) + w.log("Status code received: %d. Retryable error? %t", statusCode, retryable) + return retryable + } + w.log("Retryable error? %t", true) + return true +} + +func (w *waiter) isRetryableHTTPStatusCode(httpStatusCode int32) bool { + return httpStatusCode == 0 || httpStatusCode == http.StatusTooManyRequests || (httpStatusCode >= 500 && httpStatusCode != http.StatusNotImplemented) +} + +// waitForDeletedResources polls to check if all the resources are deleted or a timeout is reached +func (w *waiter) waitForDeletedResources(deleted ResourceList) error { + w.log("beginning wait for %d resources to be deleted with timeout of %v", len(deleted), w.timeout) + + ctx, cancel := context.WithTimeout(context.Background(), w.timeout) + defer cancel() + + return wait.PollUntilContextCancel(ctx, 2*time.Second, true, func(_ context.Context) (bool, error) { + for _, v := range deleted { + err := v.Get() + if err == nil || !apierrors.IsNotFound(err) { + return false, err + } + } + return true, nil + }) +} + +// SelectorsForObject returns the pod label selector for a given object +// +// Modified version of https://github.com/kubernetes/kubernetes/blob/v1.14.1/pkg/kubectl/polymorphichelpers/helpers.go#L84 +func SelectorsForObject(object runtime.Object) (selector labels.Selector, err error) { + switch t := object.(type) { + case *extensionsv1beta1.ReplicaSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1.ReplicaSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1beta2.ReplicaSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *corev1.ReplicationController: + selector = labels.SelectorFromSet(t.Spec.Selector) + case *appsv1.StatefulSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1beta1.StatefulSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1beta2.StatefulSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *extensionsv1beta1.DaemonSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1.DaemonSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1beta2.DaemonSet: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *extensionsv1beta1.Deployment: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1.Deployment: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1beta1.Deployment: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *appsv1beta2.Deployment: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *batchv1.Job: + selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector) + case *corev1.Service: + if t.Spec.Selector == nil || len(t.Spec.Selector) == 0 { + return nil, fmt.Errorf("invalid service '%s': Service is defined without a selector", t.Name) + } + selector = labels.SelectorFromSet(t.Spec.Selector) + + default: + return nil, fmt.Errorf("selector for %T not implemented", object) + } + + return selector, errors.Wrap(err, "invalid label selector") +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/lint.go b/vendor/helm.sh/helm/v3/pkg/lint/lint.go new file mode 100644 index 000000000..ef23ee7c8 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/lint.go @@ -0,0 +1,48 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package lint // import "helm.sh/helm/v3/pkg/lint" + +import ( + "path/filepath" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/lint/rules" + "helm.sh/helm/v3/pkg/lint/support" +) + +// All runs all the available linters on the given base directory. +func All(basedir string, values map[string]interface{}, namespace string, _ bool) support.Linter { + return AllWithKubeVersion(basedir, values, namespace, nil) +} + +// AllWithKubeVersion runs all the available linters on the given base directory, allowing to specify the kubernetes version. +func AllWithKubeVersion(basedir string, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion) support.Linter { + return AllWithKubeVersionAndSchemaValidation(basedir, values, namespace, kubeVersion, false) +} + +// AllWithKubeVersionAndSchemaValidation runs all the available linters on the given base directory, allowing to specify the kubernetes version and if schema validation is enabled or not. +func AllWithKubeVersionAndSchemaValidation(basedir string, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion, skipSchemaValidation bool) support.Linter { + // Using abs path to get directory context + chartDir, _ := filepath.Abs(basedir) + + linter := support.Linter{ChartDir: chartDir} + rules.Chartfile(&linter) + rules.ValuesWithOverrides(&linter, values) + rules.TemplatesWithSkipSchemaValidation(&linter, values, namespace, kubeVersion, skipSchemaValidation) + rules.Dependencies(&linter) + return linter +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/rules/chartfile.go b/vendor/helm.sh/helm/v3/pkg/lint/rules/chartfile.go new file mode 100644 index 000000000..910602b7d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/rules/chartfile.go @@ -0,0 +1,213 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules // import "helm.sh/helm/v3/pkg/lint/rules" + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/Masterminds/semver/v3" + "github.com/asaskevich/govalidator" + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/lint/support" +) + +// Chartfile runs a set of linter rules related to Chart.yaml file +func Chartfile(linter *support.Linter) { + chartFileName := "Chart.yaml" + chartPath := filepath.Join(linter.ChartDir, chartFileName) + + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartYamlNotDirectory(chartPath)) + + chartFile, err := chartutil.LoadChartfile(chartPath) + validChartFile := linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartYamlFormat(err)) + + // Guard clause. Following linter rules require a parsable ChartFile + if !validChartFile { + return + } + + // type check for Chart.yaml . ignoring error as any parse + // errors would already be caught in the above load function + chartFileForTypeCheck, _ := loadChartFileForTypeCheck(chartPath) + + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartName(chartFile)) + + // Chart metadata + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartAPIVersion(chartFile)) + + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartVersionType(chartFileForTypeCheck)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartVersion(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartAppVersionType(chartFileForTypeCheck)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartMaintainer(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartSources(chartFile)) + linter.RunLinterRule(support.InfoSev, chartFileName, validateChartIconPresence(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartIconURL(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartType(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartDependencies(chartFile)) +} + +func validateChartVersionType(data map[string]interface{}) error { + return isStringValue(data, "version") +} + +func validateChartAppVersionType(data map[string]interface{}) error { + return isStringValue(data, "appVersion") +} + +func isStringValue(data map[string]interface{}, key string) error { + value, ok := data[key] + if !ok { + return nil + } + valueType := fmt.Sprintf("%T", value) + if valueType != "string" { + return errors.Errorf("%s should be of type string but it's of type %s", key, valueType) + } + return nil +} + +func validateChartYamlNotDirectory(chartPath string) error { + fi, err := os.Stat(chartPath) + + if err == nil && fi.IsDir() { + return errors.New("should be a file, not a directory") + } + return nil +} + +func validateChartYamlFormat(chartFileError error) error { + if chartFileError != nil { + return errors.Errorf("unable to parse YAML\n\t%s", chartFileError.Error()) + } + return nil +} + +func validateChartName(cf *chart.Metadata) error { + if cf.Name == "" { + return errors.New("name is required") + } + name := filepath.Base(cf.Name) + if name != cf.Name { + return fmt.Errorf("chart name %q is invalid", cf.Name) + } + return nil +} + +func validateChartAPIVersion(cf *chart.Metadata) error { + if cf.APIVersion == "" { + return errors.New("apiVersion is required. The value must be either \"v1\" or \"v2\"") + } + + if cf.APIVersion != chart.APIVersionV1 && cf.APIVersion != chart.APIVersionV2 { + return fmt.Errorf("apiVersion '%s' is not valid. The value must be either \"v1\" or \"v2\"", cf.APIVersion) + } + + return nil +} + +func validateChartVersion(cf *chart.Metadata) error { + if cf.Version == "" { + return errors.New("version is required") + } + + version, err := semver.NewVersion(cf.Version) + + if err != nil { + return errors.Errorf("version '%s' is not a valid SemVer", cf.Version) + } + + c, err := semver.NewConstraint(">0.0.0-0") + if err != nil { + return err + } + valid, msg := c.Validate(version) + + if !valid && len(msg) > 0 { + return errors.Errorf("version %v", msg[0]) + } + + return nil +} + +func validateChartMaintainer(cf *chart.Metadata) error { + for _, maintainer := range cf.Maintainers { + if maintainer.Name == "" { + return errors.New("each maintainer requires a name") + } else if maintainer.Email != "" && !govalidator.IsEmail(maintainer.Email) { + return errors.Errorf("invalid email '%s' for maintainer '%s'", maintainer.Email, maintainer.Name) + } else if maintainer.URL != "" && !govalidator.IsURL(maintainer.URL) { + return errors.Errorf("invalid url '%s' for maintainer '%s'", maintainer.URL, maintainer.Name) + } + } + return nil +} + +func validateChartSources(cf *chart.Metadata) error { + for _, source := range cf.Sources { + if source == "" || !govalidator.IsRequestURL(source) { + return errors.Errorf("invalid source URL '%s'", source) + } + } + return nil +} + +func validateChartIconPresence(cf *chart.Metadata) error { + if cf.Icon == "" { + return errors.New("icon is recommended") + } + return nil +} + +func validateChartIconURL(cf *chart.Metadata) error { + if cf.Icon != "" && !govalidator.IsRequestURL(cf.Icon) { + return errors.Errorf("invalid icon URL '%s'", cf.Icon) + } + return nil +} + +func validateChartDependencies(cf *chart.Metadata) error { + if len(cf.Dependencies) > 0 && cf.APIVersion != chart.APIVersionV2 { + return fmt.Errorf("dependencies are not valid in the Chart file with apiVersion '%s'. They are valid in apiVersion '%s'", cf.APIVersion, chart.APIVersionV2) + } + return nil +} + +func validateChartType(cf *chart.Metadata) error { + if len(cf.Type) > 0 && cf.APIVersion != chart.APIVersionV2 { + return fmt.Errorf("chart type is not valid in apiVersion '%s'. It is valid in apiVersion '%s'", cf.APIVersion, chart.APIVersionV2) + } + return nil +} + +// loadChartFileForTypeCheck loads the Chart.yaml +// in a generic form of a map[string]interface{}, so that the type +// of the values can be checked +func loadChartFileForTypeCheck(filename string) (map[string]interface{}, error) { + b, err := os.ReadFile(filename) + if err != nil { + return nil, err + } + y := make(map[string]interface{}) + err = yaml.Unmarshal(b, &y) + return y, err +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/rules/dependencies.go b/vendor/helm.sh/helm/v3/pkg/lint/rules/dependencies.go new file mode 100644 index 000000000..f1ab1dcad --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/rules/dependencies.go @@ -0,0 +1,103 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules // import "helm.sh/helm/v3/pkg/lint/rules" + +import ( + "fmt" + "strings" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/lint/support" +) + +// Dependencies runs lints against a chart's dependencies +// +// See https://github.com/helm/helm/issues/7910 +func Dependencies(linter *support.Linter) { + c, err := loader.LoadDir(linter.ChartDir) + if !linter.RunLinterRule(support.ErrorSev, "", validateChartFormat(err)) { + return + } + + linter.RunLinterRule(support.ErrorSev, linter.ChartDir, validateDependencyInMetadata(c)) + linter.RunLinterRule(support.ErrorSev, linter.ChartDir, validateDependenciesUnique(c)) + linter.RunLinterRule(support.WarningSev, linter.ChartDir, validateDependencyInChartsDir(c)) +} + +func validateChartFormat(chartError error) error { + if chartError != nil { + return errors.Errorf("unable to load chart\n\t%s", chartError) + } + return nil +} + +func validateDependencyInChartsDir(c *chart.Chart) (err error) { + dependencies := map[string]struct{}{} + missing := []string{} + for _, dep := range c.Dependencies() { + dependencies[dep.Metadata.Name] = struct{}{} + } + for _, dep := range c.Metadata.Dependencies { + if _, ok := dependencies[dep.Name]; !ok { + missing = append(missing, dep.Name) + } + } + if len(missing) > 0 { + err = fmt.Errorf("chart directory is missing these dependencies: %s", strings.Join(missing, ",")) + } + return err +} + +func validateDependencyInMetadata(c *chart.Chart) (err error) { + dependencies := map[string]struct{}{} + missing := []string{} + for _, dep := range c.Metadata.Dependencies { + dependencies[dep.Name] = struct{}{} + } + for _, dep := range c.Dependencies() { + if _, ok := dependencies[dep.Metadata.Name]; !ok { + missing = append(missing, dep.Metadata.Name) + } + } + if len(missing) > 0 { + err = fmt.Errorf("chart metadata is missing these dependencies: %s", strings.Join(missing, ",")) + } + return err +} + +func validateDependenciesUnique(c *chart.Chart) (err error) { + dependencies := map[string]*chart.Dependency{} + shadowing := []string{} + + for _, dep := range c.Metadata.Dependencies { + key := dep.Name + if dep.Alias != "" { + key = dep.Alias + } + if dependencies[key] != nil { + shadowing = append(shadowing, key) + } + dependencies[key] = dep + } + if len(shadowing) > 0 { + err = fmt.Errorf("multiple dependencies with name or alias: %s", strings.Join(shadowing, ",")) + } + return err +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/rules/deprecations.go b/vendor/helm.sh/helm/v3/pkg/lint/rules/deprecations.go new file mode 100644 index 000000000..90e7748a4 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/rules/deprecations.go @@ -0,0 +1,106 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules // import "helm.sh/helm/v3/pkg/lint/rules" + +import ( + "fmt" + "strconv" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/endpoints/deprecation" + kscheme "k8s.io/client-go/kubernetes/scheme" + + "helm.sh/helm/v3/pkg/chartutil" +) + +var ( + // This should be set in the Makefile based on the version of client-go being imported. + // These constants will be overwritten with LDFLAGS. The version components must be + // strings in order for LDFLAGS to set them. + k8sVersionMajor = "1" + k8sVersionMinor = "20" +) + +// deprecatedAPIError indicates than an API is deprecated in Kubernetes +type deprecatedAPIError struct { + Deprecated string + Message string +} + +func (e deprecatedAPIError) Error() string { + msg := e.Message + return msg +} + +func validateNoDeprecations(resource *K8sYamlStruct, kubeVersion *chartutil.KubeVersion) error { + // if `resource` does not have an APIVersion or Kind, we cannot test it for deprecation + if resource.APIVersion == "" { + return nil + } + if resource.Kind == "" { + return nil + } + + majorVersion := k8sVersionMajor + minorVersion := k8sVersionMinor + + if kubeVersion != nil { + majorVersion = kubeVersion.Major + minorVersion = kubeVersion.Minor + } + + runtimeObject, err := resourceToRuntimeObject(resource) + if err != nil { + // do not error for non-kubernetes resources + if runtime.IsNotRegisteredError(err) { + return nil + } + return err + } + + maj, err := strconv.Atoi(majorVersion) + if err != nil { + return err + } + min, err := strconv.Atoi(minorVersion) + if err != nil { + return err + } + + if !deprecation.IsDeprecated(runtimeObject, maj, min) { + return nil + } + gvk := fmt.Sprintf("%s %s", resource.APIVersion, resource.Kind) + return deprecatedAPIError{ + Deprecated: gvk, + Message: deprecation.WarningMessage(runtimeObject), + } +} + +func resourceToRuntimeObject(resource *K8sYamlStruct) (runtime.Object, error) { + scheme := runtime.NewScheme() + kscheme.AddToScheme(scheme) + + gvk := schema.FromAPIVersionAndKind(resource.APIVersion, resource.Kind) + out, err := scheme.New(gvk) + if err != nil { + return nil, err + } + out.GetObjectKind().SetGroupVersionKind(gvk) + return out, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/rules/template.go b/vendor/helm.sh/helm/v3/pkg/lint/rules/template.go new file mode 100644 index 000000000..41d1a1bab --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/rules/template.go @@ -0,0 +1,356 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules + +import ( + "bufio" + "bytes" + "fmt" + "io" + "os" + "path" + "path/filepath" + "regexp" + "strings" + + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/api/validation" + apipath "k8s.io/apimachinery/pkg/api/validation/path" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apimachinery/pkg/util/yaml" + + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/engine" + "helm.sh/helm/v3/pkg/lint/support" +) + +var ( + crdHookSearch = regexp.MustCompile(`"?helm\.sh/hook"?:\s+crd-install`) + releaseTimeSearch = regexp.MustCompile(`\.Release\.Time`) +) + +// Templates lints the templates in the Linter. +func Templates(linter *support.Linter, values map[string]interface{}, namespace string, _ bool) { + TemplatesWithKubeVersion(linter, values, namespace, nil) +} + +// TemplatesWithKubeVersion lints the templates in the Linter, allowing to specify the kubernetes version. +func TemplatesWithKubeVersion(linter *support.Linter, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion) { + TemplatesWithSkipSchemaValidation(linter, values, namespace, kubeVersion, false) +} + +// TemplatesWithSkipSchemaValidation lints the templates in the Linter, allowing to specify the kubernetes version and if schema validation is enabled or not. +func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion, skipSchemaValidation bool) { + fpath := "templates/" + templatesPath := filepath.Join(linter.ChartDir, fpath) + + templatesDirExist := linter.RunLinterRule(support.WarningSev, fpath, validateTemplatesDir(templatesPath)) + + // Templates directory is optional for now + if !templatesDirExist { + return + } + + // Load chart and parse templates + chart, err := loader.Load(linter.ChartDir) + + chartLoaded := linter.RunLinterRule(support.ErrorSev, fpath, err) + + if !chartLoaded { + return + } + + options := chartutil.ReleaseOptions{ + Name: "test-release", + Namespace: namespace, + } + + caps := chartutil.DefaultCapabilities.Copy() + if kubeVersion != nil { + caps.KubeVersion = *kubeVersion + } + + // lint ignores import-values + // See https://github.com/helm/helm/issues/9658 + if err := chartutil.ProcessDependenciesWithMerge(chart, values); err != nil { + return + } + + cvals, err := chartutil.CoalesceValues(chart, values) + if err != nil { + return + } + + valuesToRender, err := chartutil.ToRenderValuesWithSchemaValidation(chart, cvals, options, caps, skipSchemaValidation) + if err != nil { + linter.RunLinterRule(support.ErrorSev, fpath, err) + return + } + var e engine.Engine + e.LintMode = true + renderedContentMap, err := e.Render(chart, valuesToRender) + + renderOk := linter.RunLinterRule(support.ErrorSev, fpath, err) + + if !renderOk { + return + } + + /* Iterate over all the templates to check: + - It is a .yaml file + - All the values in the template file is defined + - {{}} include | quote + - Generated content is a valid Yaml file + - Metadata.Namespace is not set + */ + for _, template := range chart.Templates { + fileName, data := template.Name, template.Data + fpath = fileName + + linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) + // These are v3 specific checks to make sure and warn people if their + // chart is not compatible with v3 + linter.RunLinterRule(support.WarningSev, fpath, validateNoCRDHooks(data)) + linter.RunLinterRule(support.ErrorSev, fpath, validateNoReleaseTime(data)) + + // We only apply the following lint rules to yaml files + if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { + continue + } + + // NOTE: disabled for now, Refs https://github.com/helm/helm/issues/1463 + // Check that all the templates have a matching value + // linter.RunLinterRule(support.WarningSev, fpath, validateNoMissingValues(templatesPath, valuesToRender, preExecutedTemplate)) + + // NOTE: disabled for now, Refs https://github.com/helm/helm/issues/1037 + // linter.RunLinterRule(support.WarningSev, fpath, validateQuotes(string(preExecutedTemplate))) + + renderedContent := renderedContentMap[path.Join(chart.Name(), fileName)] + if strings.TrimSpace(renderedContent) != "" { + linter.RunLinterRule(support.WarningSev, fpath, validateTopIndentLevel(renderedContent)) + + decoder := yaml.NewYAMLOrJSONDecoder(strings.NewReader(renderedContent), 4096) + + // Lint all resources if the file contains multiple documents separated by --- + for { + // Even though K8sYamlStruct only defines a few fields, an error in any other + // key will be raised as well + var yamlStruct *K8sYamlStruct + + err := decoder.Decode(&yamlStruct) + if err == io.EOF { + break + } + + // If YAML linting fails here, it will always fail in the next block as well, so we should return here. + // fix https://github.com/helm/helm/issues/11391 + if !linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err)) { + return + } + if yamlStruct != nil { + // NOTE: set to warnings to allow users to support out-of-date kubernetes + // Refs https://github.com/helm/helm/issues/8596 + linter.RunLinterRule(support.WarningSev, fpath, validateMetadataName(yamlStruct)) + linter.RunLinterRule(support.WarningSev, fpath, validateNoDeprecations(yamlStruct, kubeVersion)) + + linter.RunLinterRule(support.ErrorSev, fpath, validateMatchSelector(yamlStruct, renderedContent)) + linter.RunLinterRule(support.ErrorSev, fpath, validateListAnnotations(yamlStruct, renderedContent)) + } + } + } + } +} + +// validateTopIndentLevel checks that the content does not start with an indent level > 0. +// +// This error can occur when a template accidentally inserts space. It can cause +// unpredictable errors depending on whether the text is normalized before being passed +// into the YAML parser. So we trap it here. +// +// See https://github.com/helm/helm/issues/8467 +func validateTopIndentLevel(content string) error { + // Read lines until we get to a non-empty one + scanner := bufio.NewScanner(bytes.NewBufferString(content)) + for scanner.Scan() { + line := scanner.Text() + // If line is empty, skip + if strings.TrimSpace(line) == "" { + continue + } + // If it starts with one or more spaces, this is an error + if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") { + return fmt.Errorf("document starts with an illegal indent: %q, which may cause parsing problems", line) + } + // Any other condition passes. + return nil + } + return scanner.Err() +} + +// Validation functions +func validateTemplatesDir(templatesPath string) error { + if fi, err := os.Stat(templatesPath); err == nil { + if !fi.IsDir() { + return errors.New("not a directory") + } + } + return nil +} + +func validateAllowedExtension(fileName string) error { + ext := filepath.Ext(fileName) + validExtensions := []string{".yaml", ".yml", ".tpl", ".txt"} + + for _, b := range validExtensions { + if b == ext { + return nil + } + } + + return errors.Errorf("file extension '%s' not valid. Valid extensions are .yaml, .yml, .tpl, or .txt", ext) +} + +func validateYamlContent(err error) error { + return errors.Wrap(err, "unable to parse YAML") +} + +// validateMetadataName uses the correct validation function for the object +// Kind, or if not set, defaults to the standard definition of a subdomain in +// DNS (RFC 1123), used by most resources. +func validateMetadataName(obj *K8sYamlStruct) error { + fn := validateMetadataNameFunc(obj) + allErrs := field.ErrorList{} + for _, msg := range fn(obj.Metadata.Name, false) { + allErrs = append(allErrs, field.Invalid(field.NewPath("metadata").Child("name"), obj.Metadata.Name, msg)) + } + if len(allErrs) > 0 { + return errors.Wrapf(allErrs.ToAggregate(), "object name does not conform to Kubernetes naming requirements: %q", obj.Metadata.Name) + } + return nil +} + +// validateMetadataNameFunc will return a name validation function for the +// object kind, if defined below. +// +// Rules should match those set in the various api validations: +// https://github.com/kubernetes/kubernetes/blob/v1.20.0/pkg/apis/core/validation/validation.go#L205-L274 +// https://github.com/kubernetes/kubernetes/blob/v1.20.0/pkg/apis/apps/validation/validation.go#L39 +// ... +// +// Implementing here to avoid importing k/k. +// +// If no mapping is defined, returns NameIsDNSSubdomain. This is used by object +// kinds that don't have special requirements, so is the most likely to work if +// new kinds are added. +func validateMetadataNameFunc(obj *K8sYamlStruct) validation.ValidateNameFunc { + switch strings.ToLower(obj.Kind) { + case "pod", "node", "secret", "endpoints", "resourcequota", // core + "controllerrevision", "daemonset", "deployment", "replicaset", "statefulset", // apps + "autoscaler", // autoscaler + "cronjob", "job", // batch + "lease", // coordination + "endpointslice", // discovery + "networkpolicy", "ingress", // networking + "podsecuritypolicy", // policy + "priorityclass", // scheduling + "podpreset", // settings + "storageclass", "volumeattachment", "csinode": // storage + return validation.NameIsDNSSubdomain + case "service": + return validation.NameIsDNS1035Label + case "namespace": + return validation.ValidateNamespaceName + case "serviceaccount": + return validation.ValidateServiceAccountName + case "certificatesigningrequest": + // No validation. + // https://github.com/kubernetes/kubernetes/blob/v1.20.0/pkg/apis/certificates/validation/validation.go#L137-L140 + return func(_ string, _ bool) []string { return nil } + case "role", "clusterrole", "rolebinding", "clusterrolebinding": + // https://github.com/kubernetes/kubernetes/blob/v1.20.0/pkg/apis/rbac/validation/validation.go#L32-L34 + return func(name string, _ bool) []string { + return apipath.IsValidPathSegmentName(name) + } + default: + return validation.NameIsDNSSubdomain + } +} + +func validateNoCRDHooks(manifest []byte) error { + if crdHookSearch.Match(manifest) { + return errors.New("manifest is a crd-install hook. This hook is no longer supported in v3 and all CRDs should also exist the crds/ directory at the top level of the chart") + } + return nil +} + +func validateNoReleaseTime(manifest []byte) error { + if releaseTimeSearch.Match(manifest) { + return errors.New(".Release.Time has been removed in v3, please replace with the `now` function in your templates") + } + return nil +} + +// validateMatchSelector ensures that template specs have a selector declared. +// See https://github.com/helm/helm/issues/1990 +func validateMatchSelector(yamlStruct *K8sYamlStruct, manifest string) error { + switch yamlStruct.Kind { + case "Deployment", "ReplicaSet", "DaemonSet", "StatefulSet": + // verify that matchLabels or matchExpressions is present + if !(strings.Contains(manifest, "matchLabels") || strings.Contains(manifest, "matchExpressions")) { + return fmt.Errorf("a %s must contain matchLabels or matchExpressions, and %q does not", yamlStruct.Kind, yamlStruct.Metadata.Name) + } + } + return nil +} +func validateListAnnotations(yamlStruct *K8sYamlStruct, manifest string) error { + if yamlStruct.Kind == "List" { + m := struct { + Items []struct { + Metadata struct { + Annotations map[string]string + } + } + }{} + + if err := yaml.Unmarshal([]byte(manifest), &m); err != nil { + return validateYamlContent(err) + } + + for _, i := range m.Items { + if _, ok := i.Metadata.Annotations["helm.sh/resource-policy"]; ok { + return errors.New("Annotation 'helm.sh/resource-policy' within List objects are ignored") + } + } + } + return nil +} + +// K8sYamlStruct stubs a Kubernetes YAML file. +// +// DEPRECATED: In Helm 4, this will be made a private type, as it is for use only within +// the rules package. +type K8sYamlStruct struct { + APIVersion string `json:"apiVersion"` + Kind string + Metadata k8sYamlMetadata +} + +type k8sYamlMetadata struct { + Namespace string + Name string +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/rules/values.go b/vendor/helm.sh/helm/v3/pkg/lint/rules/values.go new file mode 100644 index 000000000..538d8381b --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/rules/values.go @@ -0,0 +1,86 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules + +import ( + "os" + "path/filepath" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/lint/support" +) + +// Values lints a chart's values.yaml file. +// +// This function is deprecated and will be removed in Helm 4. +func Values(linter *support.Linter) { + ValuesWithOverrides(linter, map[string]interface{}{}) +} + +// ValuesWithOverrides tests the values.yaml file. +// +// If a schema is present in the chart, values are tested against that. Otherwise, +// they are only tested for well-formedness. +// +// If additional values are supplied, they are coalesced into the values in values.yaml. +func ValuesWithOverrides(linter *support.Linter, values map[string]interface{}) { + file := "values.yaml" + vf := filepath.Join(linter.ChartDir, file) + fileExists := linter.RunLinterRule(support.InfoSev, file, validateValuesFileExistence(vf)) + + if !fileExists { + return + } + + linter.RunLinterRule(support.ErrorSev, file, validateValuesFile(vf, values)) +} + +func validateValuesFileExistence(valuesPath string) error { + _, err := os.Stat(valuesPath) + if err != nil { + return errors.Errorf("file does not exist") + } + return nil +} + +func validateValuesFile(valuesPath string, overrides map[string]interface{}) error { + values, err := chartutil.ReadValuesFile(valuesPath) + if err != nil { + return errors.Wrap(err, "unable to parse YAML") + } + + // Helm 3.0.0 carried over the values linting from Helm 2.x, which only tests the top + // level values against the top-level expectations. Subchart values are not linted. + // We could change that. For now, though, we retain that strategy, and thus can + // coalesce tables (like reuse-values does) instead of doing the full chart + // CoalesceValues + coalescedValues := chartutil.CoalesceTables(make(map[string]interface{}, len(overrides)), overrides) + coalescedValues = chartutil.CoalesceTables(coalescedValues, values) + + ext := filepath.Ext(valuesPath) + schemaPath := valuesPath[:len(valuesPath)-len(ext)] + ".schema.json" + schema, err := os.ReadFile(schemaPath) + if len(schema) == 0 { + return nil + } + if err != nil { + return err + } + return chartutil.ValidateAgainstSingleSchema(coalescedValues, schema) +} diff --git a/vendor/helm.sh/helm/v3/pkg/lint/support/doc.go b/vendor/helm.sh/helm/v3/pkg/lint/support/doc.go new file mode 100644 index 000000000..bffefe8ff --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/support/doc.go @@ -0,0 +1,23 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package support contains tools for linting charts. + +Linting is the process of testing charts for errors or warnings regarding +formatting, compilation, or standards compliance. +*/ +package support // import "helm.sh/helm/v3/pkg/lint/support" diff --git a/vendor/helm.sh/helm/v3/pkg/lint/support/message.go b/vendor/helm.sh/helm/v3/pkg/lint/support/message.go new file mode 100644 index 000000000..5efbc7a61 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/lint/support/message.go @@ -0,0 +1,76 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package support + +import "fmt" + +// Severity indicates the severity of a Message. +const ( + // UnknownSev indicates that the severity of the error is unknown, and should not stop processing. + UnknownSev = iota + // InfoSev indicates information, for example missing values.yaml file + InfoSev + // WarningSev indicates that something does not meet code standards, but will likely function. + WarningSev + // ErrorSev indicates that something will not likely function. + ErrorSev +) + +// sev matches the *Sev states. +var sev = []string{"UNKNOWN", "INFO", "WARNING", "ERROR"} + +// Linter encapsulates a linting run of a particular chart. +type Linter struct { + Messages []Message + // The highest severity of all the failing lint rules + HighestSeverity int + ChartDir string +} + +// Message describes an error encountered while linting. +type Message struct { + // Severity is one of the *Sev constants + Severity int + Path string + Err error +} + +func (m Message) Error() string { + return fmt.Sprintf("[%s] %s: %s", sev[m.Severity], m.Path, m.Err.Error()) +} + +// NewMessage creates a new Message struct +func NewMessage(severity int, path string, err error) Message { + return Message{Severity: severity, Path: path, Err: err} +} + +// RunLinterRule returns true if the validation passed +func (l *Linter) RunLinterRule(severity int, path string, err error) bool { + // severity is out of bound + if severity < 0 || severity >= len(sev) { + return false + } + + if err != nil { + l.Messages = append(l.Messages, NewMessage(severity, path, err)) + + if severity > l.HighestSeverity { + l.HighestSeverity = severity + } + } + return err == nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/plugin/hooks.go b/vendor/helm.sh/helm/v3/pkg/plugin/hooks.go new file mode 100644 index 000000000..e3481515f --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/plugin/hooks.go @@ -0,0 +1,29 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package plugin // import "helm.sh/helm/v3/pkg/plugin" + +// Types of hooks +const ( + // Install is executed after the plugin is added. + Install = "install" + // Delete is executed after the plugin is removed. + Delete = "delete" + // Update is executed after the plugin is updated. + Update = "update" +) + +// Hooks is a map of events to commands. +type Hooks map[string]string diff --git a/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go b/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go new file mode 100644 index 000000000..5bb743481 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go @@ -0,0 +1,288 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package plugin // import "helm.sh/helm/v3/pkg/plugin" + +import ( + "fmt" + "os" + "path/filepath" + "regexp" + "runtime" + "strings" + "unicode" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/cli" +) + +const PluginFileName = "plugin.yaml" + +// Downloaders represents the plugins capability if it can retrieve +// charts from special sources +type Downloaders struct { + // Protocols are the list of schemes from the charts URL. + Protocols []string `json:"protocols"` + // Command is the executable path with which the plugin performs + // the actual download for the corresponding Protocols + Command string `json:"command"` +} + +// PlatformCommand represents a command for a particular operating system and architecture +type PlatformCommand struct { + OperatingSystem string `json:"os"` + Architecture string `json:"arch"` + Command string `json:"command"` +} + +// Metadata describes a plugin. +// +// This is the plugin equivalent of a chart.Metadata. +type Metadata struct { + // Name is the name of the plugin + Name string `json:"name"` + + // Version is a SemVer 2 version of the plugin. + Version string `json:"version"` + + // Usage is the single-line usage text shown in help + Usage string `json:"usage"` + + // Description is a long description shown in places like `helm help` + Description string `json:"description"` + + // Command is the command, as a single string. + // + // The command will be passed through environment expansion, so env vars can + // be present in this command. Unless IgnoreFlags is set, this will + // also merge the flags passed from Helm. + // + // Note that command is not executed in a shell. To do so, we suggest + // pointing the command to a shell script. + // + // The following rules will apply to processing commands: + // - If platformCommand is present, it will be searched first + // - If both OS and Arch match the current platform, search will stop and the command will be executed + // - If OS matches and there is no more specific match, the command will be executed + // - If no OS/Arch match is found, the default command will be executed + // - If no command is present and no matches are found in platformCommand, Helm will exit with an error + PlatformCommand []PlatformCommand `json:"platformCommand"` + Command string `json:"command"` + + // IgnoreFlags ignores any flags passed in from Helm + // + // For example, if the plugin is invoked as `helm --debug myplugin`, if this + // is false, `--debug` will be appended to `--command`. If this is true, + // the `--debug` flag will be discarded. + IgnoreFlags bool `json:"ignoreFlags"` + + // Hooks are commands that will run on events. + Hooks Hooks + + // Downloaders field is used if the plugin supply downloader mechanism + // for special protocols. + Downloaders []Downloaders `json:"downloaders"` + + // UseTunnelDeprecated indicates that this command needs a tunnel. + // Setting this will cause a number of side effects, such as the + // automatic setting of HELM_HOST. + // DEPRECATED and unused, but retained for backwards compatibility with Helm 2 plugins. Remove in Helm 4 + UseTunnelDeprecated bool `json:"useTunnel,omitempty"` +} + +// Plugin represents a plugin. +type Plugin struct { + // Metadata is a parsed representation of a plugin.yaml + Metadata *Metadata + // Dir is the string path to the directory that holds the plugin. + Dir string +} + +// The following rules will apply to processing the Plugin.PlatformCommand.Command: +// - If both OS and Arch match the current platform, search will stop and the command will be prepared for execution +// - If OS matches and there is no more specific match, the command will be prepared for execution +// - If no OS/Arch match is found, return nil +func getPlatformCommand(cmds []PlatformCommand) []string { + var command []string + eq := strings.EqualFold + for _, c := range cmds { + if eq(c.OperatingSystem, runtime.GOOS) { + command = strings.Split(c.Command, " ") + } + if eq(c.OperatingSystem, runtime.GOOS) && eq(c.Architecture, runtime.GOARCH) { + return strings.Split(c.Command, " ") + } + } + return command +} + +// PrepareCommand takes a Plugin.PlatformCommand.Command, a Plugin.Command and will applying the following processing: +// - If platformCommand is present, it will be searched first +// - If both OS and Arch match the current platform, search will stop and the command will be prepared for execution +// - If OS matches and there is no more specific match, the command will be prepared for execution +// - If no OS/Arch match is found, the default command will be prepared for execution +// - If no command is present and no matches are found in platformCommand, will exit with an error +// +// It merges extraArgs into any arguments supplied in the plugin. It +// returns the name of the command and an args array. +// +// The result is suitable to pass to exec.Command. +func (p *Plugin) PrepareCommand(extraArgs []string) (string, []string, error) { + var parts []string + platCmdLen := len(p.Metadata.PlatformCommand) + if platCmdLen > 0 { + parts = getPlatformCommand(p.Metadata.PlatformCommand) + } + if platCmdLen == 0 || parts == nil { + parts = strings.Split(p.Metadata.Command, " ") + } + if len(parts) == 0 || parts[0] == "" { + return "", nil, fmt.Errorf("no plugin command is applicable") + } + + main := os.ExpandEnv(parts[0]) + baseArgs := []string{} + if len(parts) > 1 { + for _, cmdpart := range parts[1:] { + cmdexp := os.ExpandEnv(cmdpart) + baseArgs = append(baseArgs, cmdexp) + } + } + if !p.Metadata.IgnoreFlags { + baseArgs = append(baseArgs, extraArgs...) + } + return main, baseArgs, nil +} + +// validPluginName is a regular expression that validates plugin names. +// +// Plugin names can only contain the ASCII characters a-z, A-Z, 0-9, ​_​ and ​-. +var validPluginName = regexp.MustCompile("^[A-Za-z0-9_-]+$") + +// validatePluginData validates a plugin's YAML data. +func validatePluginData(plug *Plugin, filepath string) error { + // When metadata section missing, initialize with no data + if plug.Metadata == nil { + plug.Metadata = &Metadata{} + } + if !validPluginName.MatchString(plug.Metadata.Name) { + return fmt.Errorf("invalid plugin name at %q", filepath) + } + plug.Metadata.Usage = sanitizeString(plug.Metadata.Usage) + + // We could also validate SemVer, executable, and other fields should we so choose. + return nil +} + +// sanitizeString normalize spaces and removes non-printable characters. +func sanitizeString(str string) string { + return strings.Map(func(r rune) rune { + if unicode.IsSpace(r) { + return ' ' + } + if unicode.IsPrint(r) { + return r + } + return -1 + }, str) +} + +func detectDuplicates(plugs []*Plugin) error { + names := map[string]string{} + + for _, plug := range plugs { + if oldpath, ok := names[plug.Metadata.Name]; ok { + return fmt.Errorf( + "two plugins claim the name %q at %q and %q", + plug.Metadata.Name, + oldpath, + plug.Dir, + ) + } + names[plug.Metadata.Name] = plug.Dir + } + + return nil +} + +// LoadDir loads a plugin from the given directory. +func LoadDir(dirname string) (*Plugin, error) { + pluginfile := filepath.Join(dirname, PluginFileName) + data, err := os.ReadFile(pluginfile) + if err != nil { + return nil, errors.Wrapf(err, "failed to read plugin at %q", pluginfile) + } + + plug := &Plugin{Dir: dirname} + if err := yaml.UnmarshalStrict(data, &plug.Metadata); err != nil { + return nil, errors.Wrapf(err, "failed to load plugin at %q", pluginfile) + } + return plug, validatePluginData(plug, pluginfile) +} + +// LoadAll loads all plugins found beneath the base directory. +// +// This scans only one directory level. +func LoadAll(basedir string) ([]*Plugin, error) { + plugins := []*Plugin{} + // We want basedir/*/plugin.yaml + scanpath := filepath.Join(basedir, "*", PluginFileName) + matches, err := filepath.Glob(scanpath) + if err != nil { + return plugins, errors.Wrapf(err, "failed to find plugins in %q", scanpath) + } + + if matches == nil { + return plugins, nil + } + + for _, yaml := range matches { + dir := filepath.Dir(yaml) + p, err := LoadDir(dir) + if err != nil { + return plugins, err + } + plugins = append(plugins, p) + } + return plugins, detectDuplicates(plugins) +} + +// FindPlugins returns a list of YAML files that describe plugins. +func FindPlugins(plugdirs string) ([]*Plugin, error) { + found := []*Plugin{} + // Let's get all UNIXy and allow path separators + for _, p := range filepath.SplitList(plugdirs) { + matches, err := LoadAll(p) + if err != nil { + return matches, err + } + found = append(found, matches...) + } + return found, nil +} + +// SetupPluginEnv prepares os.Env for plugins. It operates on os.Env because +// the plugin subsystem itself needs access to the environment variables +// created here. +func SetupPluginEnv(settings *cli.EnvSettings, name, base string) { + env := settings.EnvVars() + env["HELM_PLUGIN_NAME"] = name + env["HELM_PLUGIN_DIR"] = base + for key, val := range env { + os.Setenv(key, val) + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/postrender/exec.go b/vendor/helm.sh/helm/v3/pkg/postrender/exec.go new file mode 100644 index 000000000..167e737d6 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/postrender/exec.go @@ -0,0 +1,109 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package postrender + +import ( + "bytes" + "io" + "os/exec" + "path/filepath" + + "github.com/pkg/errors" +) + +type execRender struct { + binaryPath string + args []string +} + +// NewExec returns a PostRenderer implementation that calls the provided binary. +// It returns an error if the binary cannot be found. If the path does not +// contain any separators, it will search in $PATH, otherwise it will resolve +// any relative paths to a fully qualified path +func NewExec(binaryPath string, args ...string) (PostRenderer, error) { + fullPath, err := getFullPath(binaryPath) + if err != nil { + return nil, err + } + return &execRender{fullPath, args}, nil +} + +// Run the configured binary for the post render +func (p *execRender) Run(renderedManifests *bytes.Buffer) (*bytes.Buffer, error) { + cmd := exec.Command(p.binaryPath, p.args...) + stdin, err := cmd.StdinPipe() + if err != nil { + return nil, err + } + + var postRendered = &bytes.Buffer{} + var stderr = &bytes.Buffer{} + cmd.Stdout = postRendered + cmd.Stderr = stderr + + go func() { + defer stdin.Close() + io.Copy(stdin, renderedManifests) + }() + err = cmd.Run() + if err != nil { + return nil, errors.Wrapf(err, "error while running command %s. error output:\n%s", p.binaryPath, stderr.String()) + } + + return postRendered, nil +} + +// getFullPath returns the full filepath to the binary to execute. If the path +// does not contain any separators, it will search in $PATH, otherwise it will +// resolve any relative paths to a fully qualified path +func getFullPath(binaryPath string) (string, error) { + // NOTE(thomastaylor312): I am leaving this code commented out here. During + // the implementation of post-render, it was brought up that if we are + // relying on plugins, we should actually use the plugin system so it can + // properly handle multiple OSs. This will be a feature add in the future, + // so I left this code for reference. It can be deleted or reused once the + // feature is implemented + + // Manually check the plugin dir first + // if !strings.Contains(binaryPath, string(filepath.Separator)) { + // // First check the plugin dir + // pluginDir := helmpath.DataPath("plugins") // Default location + // // If location for plugins is explicitly set, check there + // if v, ok := os.LookupEnv("HELM_PLUGINS"); ok { + // pluginDir = v + // } + // // The plugins variable can actually contain multiple paths, so loop through those + // for _, p := range filepath.SplitList(pluginDir) { + // _, err := os.Stat(filepath.Join(p, binaryPath)) + // if err != nil && !os.IsNotExist(err) { + // return "", err + // } else if err == nil { + // binaryPath = filepath.Join(p, binaryPath) + // break + // } + // } + // } + + // Now check for the binary using the given path or check if it exists in + // the path and is executable + checkedPath, err := exec.LookPath(binaryPath) + if err != nil { + return "", errors.Wrapf(err, "unable to find binary at %s", binaryPath) + } + + return filepath.Abs(checkedPath) +} diff --git a/vendor/helm.sh/helm/v3/pkg/postrender/postrender.go b/vendor/helm.sh/helm/v3/pkg/postrender/postrender.go new file mode 100644 index 000000000..3af384290 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/postrender/postrender.go @@ -0,0 +1,29 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package postrender contains an interface that can be implemented for custom +// post-renderers and an exec implementation that can be used for arbitrary +// binaries and scripts +package postrender + +import "bytes" + +type PostRenderer interface { + // Run expects a single buffer filled with Helm rendered manifests. It + // expects the modified results to be returned on a separate buffer or an + // error if there was an issue or failure while running the post render step + Run(renderedManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error) +} diff --git a/vendor/helm.sh/helm/v3/pkg/provenance/doc.go b/vendor/helm.sh/helm/v3/pkg/provenance/doc.go new file mode 100644 index 000000000..0c7ae0618 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/provenance/doc.go @@ -0,0 +1,38 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package provenance provides tools for establishing the authenticity of a chart. + +In Helm, provenance is established via several factors. The primary factor is the +cryptographic signature of a chart. Chart authors may sign charts, which in turn +provide the necessary metadata to ensure the integrity of the chart file, the +Chart.yaml, and the referenced Docker images. + +A provenance file is clear-signed. This provides cryptographic verification that +a particular block of information (Chart.yaml, archive file, images) have not +been tampered with or altered. To learn more, read the GnuPG documentation on +clear signatures: +https://www.gnupg.org/gph/en/manual/x135.html + +The cryptography used by Helm should be compatible with OpenGPG. For example, +you should be able to verify a signature by importing the desired public key +and using `gpg --verify`, `keybase pgp verify`, or similar: + + $ gpg --verify some.sig + gpg: Signature made Mon Jul 25 17:23:44 2016 MDT using RSA key ID 1FC18762 + gpg: Good signature from "Helm Testing (This key should only be used for testing. DO NOT TRUST.) <helm-testing@helm.sh>" [ultimate] +*/ +package provenance // import "helm.sh/helm/v3/pkg/provenance" diff --git a/vendor/helm.sh/helm/v3/pkg/provenance/sign.go b/vendor/helm.sh/helm/v3/pkg/provenance/sign.go new file mode 100644 index 000000000..7f89ef3f5 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/provenance/sign.go @@ -0,0 +1,427 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package provenance + +import ( + "bytes" + "crypto" + "encoding/hex" + "io" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + "golang.org/x/crypto/openpgp" //nolint + "golang.org/x/crypto/openpgp/clearsign" //nolint + "golang.org/x/crypto/openpgp/packet" //nolint + "sigs.k8s.io/yaml" + + hapi "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" +) + +var defaultPGPConfig = packet.Config{ + DefaultHash: crypto.SHA512, +} + +// SumCollection represents a collection of file and image checksums. +// +// Files are of the form: +// +// FILENAME: "sha256:SUM" +// +// Images are of the form: +// +// "IMAGE:TAG": "sha256:SUM" +// +// Docker optionally supports sha512, and if this is the case, the hash marker +// will be 'sha512' instead of 'sha256'. +type SumCollection struct { + Files map[string]string `json:"files"` + Images map[string]string `json:"images,omitempty"` +} + +// Verification contains information about a verification operation. +type Verification struct { + // SignedBy contains the entity that signed a chart. + SignedBy *openpgp.Entity + // FileHash is the hash, prepended with the scheme, for the file that was verified. + FileHash string + // FileName is the name of the file that FileHash verifies. + FileName string +} + +// Signatory signs things. +// +// Signatories can be constructed from a PGP private key file using NewFromFiles +// or they can be constructed manually by setting the Entity to a valid +// PGP entity. +// +// The same Signatory can be used to sign or validate multiple charts. +type Signatory struct { + // The signatory for this instance of Helm. This is used for signing. + Entity *openpgp.Entity + // The keyring for this instance of Helm. This is used for verification. + KeyRing openpgp.EntityList +} + +// NewFromFiles constructs a new Signatory from the PGP key in the given filename. +// +// This will emit an error if it cannot find a valid GPG keyfile (entity) at the +// given location. +// +// Note that the keyfile may have just a public key, just a private key, or +// both. The Signatory methods may have different requirements of the keys. For +// example, ClearSign must have a valid `openpgp.Entity.PrivateKey` before it +// can sign something. +func NewFromFiles(keyfile, keyringfile string) (*Signatory, error) { + e, err := loadKey(keyfile) + if err != nil { + return nil, err + } + + ring, err := loadKeyRing(keyringfile) + if err != nil { + return nil, err + } + + return &Signatory{ + Entity: e, + KeyRing: ring, + }, nil +} + +// NewFromKeyring reads a keyring file and creates a Signatory. +// +// If id is not the empty string, this will also try to find an Entity in the +// keyring whose name matches, and set that as the signing entity. It will return +// an error if the id is not empty and also not found. +func NewFromKeyring(keyringfile, id string) (*Signatory, error) { + ring, err := loadKeyRing(keyringfile) + if err != nil { + return nil, err + } + + s := &Signatory{KeyRing: ring} + + // If the ID is empty, we can return now. + if id == "" { + return s, nil + } + + // We're gonna go all GnuPG on this and look for a string that _contains_. If + // two or more keys contain the string and none are a direct match, we error + // out. + var candidate *openpgp.Entity + vague := false + for _, e := range ring { + for n := range e.Identities { + if n == id { + s.Entity = e + return s, nil + } + if strings.Contains(n, id) { + if candidate != nil { + vague = true + } + candidate = e + } + } + } + if vague { + return s, errors.Errorf("more than one key contain the id %q", id) + } + + s.Entity = candidate + return s, nil +} + +// PassphraseFetcher returns a passphrase for decrypting keys. +// +// This is used as a callback to read a passphrase from some other location. The +// given name is the Name field on the key, typically of the form: +// +// USER_NAME (COMMENT) <EMAIL> +type PassphraseFetcher func(name string) ([]byte, error) + +// DecryptKey decrypts a private key in the Signatory. +// +// If the key is not encrypted, this will return without error. +// +// If the key does not exist, this will return an error. +// +// If the key exists, but cannot be unlocked with the passphrase returned by +// the PassphraseFetcher, this will return an error. +// +// If the key is successfully unlocked, it will return nil. +func (s *Signatory) DecryptKey(fn PassphraseFetcher) error { + if s.Entity == nil { + return errors.New("private key not found") + } else if s.Entity.PrivateKey == nil { + return errors.New("provided key is not a private key. Try providing a keyring with secret keys") + } + + // Nothing else to do if key is not encrypted. + if !s.Entity.PrivateKey.Encrypted { + return nil + } + + fname := "Unknown" + for i := range s.Entity.Identities { + if i != "" { + fname = i + break + } + } + + p, err := fn(fname) + if err != nil { + return err + } + + return s.Entity.PrivateKey.Decrypt(p) +} + +// ClearSign signs a chart with the given key. +// +// This takes the path to a chart archive file and a key, and it returns a clear signature. +// +// The Signatory must have a valid Entity.PrivateKey for this to work. If it does +// not, an error will be returned. +func (s *Signatory) ClearSign(chartpath string) (string, error) { + if s.Entity == nil { + return "", errors.New("private key not found") + } else if s.Entity.PrivateKey == nil { + return "", errors.New("provided key is not a private key. Try providing a keyring with secret keys") + } + + if fi, err := os.Stat(chartpath); err != nil { + return "", err + } else if fi.IsDir() { + return "", errors.New("cannot sign a directory") + } + + out := bytes.NewBuffer(nil) + + b, err := messageBlock(chartpath) + if err != nil { + return "", err + } + + // Sign the buffer + w, err := clearsign.Encode(out, s.Entity.PrivateKey, &defaultPGPConfig) + if err != nil { + return "", err + } + + _, err = io.Copy(w, b) + + if err != nil { + // NB: We intentionally don't call `w.Close()` here! `w.Close()` is the method which + // actually does the PGP signing, and therefore is the part which uses the private key. + // In other words, if we call Close here, there's a risk that there's an attempt to use the + // private key to sign garbage data (since we know that io.Copy failed, `w` won't contain + // anything useful). + return "", errors.Wrap(err, "failed to write to clearsign encoder") + } + + err = w.Close() + if err != nil { + return "", errors.Wrap(err, "failed to either sign or armor message block") + } + + return out.String(), nil +} + +// Verify checks a signature and verifies that it is legit for a chart. +func (s *Signatory) Verify(chartpath, sigpath string) (*Verification, error) { + ver := &Verification{} + for _, fname := range []string{chartpath, sigpath} { + if fi, err := os.Stat(fname); err != nil { + return ver, err + } else if fi.IsDir() { + return ver, errors.Errorf("%s cannot be a directory", fname) + } + } + + // First verify the signature + sig, err := s.decodeSignature(sigpath) + if err != nil { + return ver, errors.Wrap(err, "failed to decode signature") + } + + by, err := s.verifySignature(sig) + if err != nil { + return ver, err + } + ver.SignedBy = by + + // Second, verify the hash of the tarball. + sum, err := DigestFile(chartpath) + if err != nil { + return ver, err + } + _, sums, err := parseMessageBlock(sig.Plaintext) + if err != nil { + return ver, err + } + + sum = "sha256:" + sum + basename := filepath.Base(chartpath) + if sha, ok := sums.Files[basename]; !ok { + return ver, errors.Errorf("provenance does not contain a SHA for a file named %q", basename) + } else if sha != sum { + return ver, errors.Errorf("sha256 sum does not match for %s: %q != %q", basename, sha, sum) + } + ver.FileHash = sum + ver.FileName = basename + + // TODO: when image signing is added, verify that here. + + return ver, nil +} + +func (s *Signatory) decodeSignature(filename string) (*clearsign.Block, error) { + data, err := os.ReadFile(filename) + if err != nil { + return nil, err + } + + block, _ := clearsign.Decode(data) + if block == nil { + // There was no sig in the file. + return nil, errors.New("signature block not found") + } + + return block, nil +} + +// verifySignature verifies that the given block is validly signed, and returns the signer. +func (s *Signatory) verifySignature(block *clearsign.Block) (*openpgp.Entity, error) { + return openpgp.CheckDetachedSignature( + s.KeyRing, + bytes.NewBuffer(block.Bytes), + block.ArmoredSignature.Body, + ) +} + +func messageBlock(chartpath string) (*bytes.Buffer, error) { + var b *bytes.Buffer + // Checksum the archive + chash, err := DigestFile(chartpath) + if err != nil { + return b, err + } + + base := filepath.Base(chartpath) + sums := &SumCollection{ + Files: map[string]string{ + base: "sha256:" + chash, + }, + } + + // Load the archive into memory. + chart, err := loader.LoadFile(chartpath) + if err != nil { + return b, err + } + + // Buffer a hash + checksums YAML file + data, err := yaml.Marshal(chart.Metadata) + if err != nil { + return b, err + } + + // FIXME: YAML uses ---\n as a file start indicator, but this is not legal in a PGP + // clearsign block. So we use ...\n, which is the YAML document end marker. + // http://yaml.org/spec/1.2/spec.html#id2800168 + b = bytes.NewBuffer(data) + b.WriteString("\n...\n") + + data, err = yaml.Marshal(sums) + if err != nil { + return b, err + } + b.Write(data) + + return b, nil +} + +// parseMessageBlock +func parseMessageBlock(data []byte) (*hapi.Metadata, *SumCollection, error) { + // This sucks. + parts := bytes.Split(data, []byte("\n...\n")) + if len(parts) < 2 { + return nil, nil, errors.New("message block must have at least two parts") + } + + md := &hapi.Metadata{} + sc := &SumCollection{} + + if err := yaml.Unmarshal(parts[0], md); err != nil { + return md, sc, err + } + err := yaml.Unmarshal(parts[1], sc) + return md, sc, err +} + +// loadKey loads a GPG key found at a particular path. +func loadKey(keypath string) (*openpgp.Entity, error) { + f, err := os.Open(keypath) + if err != nil { + return nil, err + } + defer f.Close() + + pr := packet.NewReader(f) + return openpgp.ReadEntity(pr) +} + +func loadKeyRing(ringpath string) (openpgp.EntityList, error) { + f, err := os.Open(ringpath) + if err != nil { + return nil, err + } + defer f.Close() + return openpgp.ReadKeyRing(f) +} + +// DigestFile calculates a SHA256 hash (like Docker) for a given file. +// +// It takes the path to the archive file, and returns a string representation of +// the SHA256 sum. +// +// The intended use of this function is to generate a sum of a chart TGZ file. +func DigestFile(filename string) (string, error) { + f, err := os.Open(filename) + if err != nil { + return "", err + } + defer f.Close() + return Digest(f) +} + +// Digest hashes a reader and returns a SHA256 digest. +// +// Helm uses SHA256 as its default hash for all non-cryptographic applications. +func Digest(in io.Reader) (string, error) { + hash := crypto.SHA256.New() + if _, err := io.Copy(hash, in); err != nil { + return "", nil + } + return hex.EncodeToString(hash.Sum(nil)), nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/pusher/doc.go b/vendor/helm.sh/helm/v3/pkg/pusher/doc.go new file mode 100644 index 000000000..df89ab112 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/pusher/doc.go @@ -0,0 +1,21 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package pusher provides a generalized tool for uploading data by scheme. +This provides a method by which the plugin system can load arbitrary protocol +handlers based upon a URL scheme. +*/ +package pusher diff --git a/vendor/helm.sh/helm/v3/pkg/pusher/ocipusher.go b/vendor/helm.sh/helm/v3/pkg/pusher/ocipusher.go new file mode 100644 index 000000000..b37a0c605 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/pusher/ocipusher.go @@ -0,0 +1,156 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pusher + +import ( + "fmt" + "net" + "net/http" + "os" + "path" + "strings" + "time" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/internal/tlsutil" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/registry" + "helm.sh/helm/v3/pkg/time/ctime" +) + +// OCIPusher is the default OCI backend handler +type OCIPusher struct { + opts options +} + +// Push performs a Push from repo.Pusher. +func (pusher *OCIPusher) Push(chartRef, href string, options ...Option) error { + for _, opt := range options { + opt(&pusher.opts) + } + return pusher.push(chartRef, href) +} + +func (pusher *OCIPusher) push(chartRef, href string) error { + stat, err := os.Stat(chartRef) + if err != nil { + if os.IsNotExist(err) { + return errors.Errorf("%s: no such file", chartRef) + } + return err + } + if stat.IsDir() { + return errors.New("cannot push directory, must provide chart archive (.tgz)") + } + + meta, err := loader.Load(chartRef) + if err != nil { + return err + } + + client := pusher.opts.registryClient + if client == nil { + c, err := pusher.newRegistryClient() + if err != nil { + return err + } + client = c + } + + chartBytes, err := os.ReadFile(chartRef) + if err != nil { + return err + } + + var pushOpts []registry.PushOption + provRef := fmt.Sprintf("%s.prov", chartRef) + if _, err := os.Stat(provRef); err == nil { + provBytes, err := os.ReadFile(provRef) + if err != nil { + return err + } + pushOpts = append(pushOpts, registry.PushOptProvData(provBytes)) + } + + ref := fmt.Sprintf("%s:%s", + path.Join(strings.TrimPrefix(href, fmt.Sprintf("%s://", registry.OCIScheme)), meta.Metadata.Name), + meta.Metadata.Version) + + chartCreationTime := ctime.Created(stat) + pushOpts = append(pushOpts, registry.PushOptCreationTime(chartCreationTime.Format(time.RFC3339))) + + _, err = client.Push(chartBytes, ref, pushOpts...) + return err +} + +// NewOCIPusher constructs a valid OCI client as a Pusher +func NewOCIPusher(ops ...Option) (Pusher, error) { + var client OCIPusher + + for _, opt := range ops { + opt(&client.opts) + } + + return &client, nil +} + +func (pusher *OCIPusher) newRegistryClient() (*registry.Client, error) { + if (pusher.opts.certFile != "" && pusher.opts.keyFile != "") || pusher.opts.caFile != "" || pusher.opts.insecureSkipTLSverify { + tlsConf, err := tlsutil.NewClientTLS(pusher.opts.certFile, pusher.opts.keyFile, pusher.opts.caFile, pusher.opts.insecureSkipTLSverify) + if err != nil { + return nil, errors.Wrap(err, "can't create TLS config for client") + } + + registryClient, err := registry.NewClient( + registry.ClientOptHTTPClient(&http.Client{ + // From https://github.com/google/go-containerregistry/blob/31786c6cbb82d6ec4fb8eb79cd9387905130534e/pkg/v1/remote/options.go#L87 + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + // By default we wrap the transport in retries, so reduce the + // default dial timeout to 5s to avoid 5x 30s of connection + // timeouts when doing the "ping" on certain http registries. + Timeout: 5 * time.Second, + KeepAlive: 30 * time.Second, + }).DialContext, + ForceAttemptHTTP2: true, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + TLSClientConfig: tlsConf, + }, + }), + registry.ClientOptEnableCache(true), + ) + if err != nil { + return nil, err + } + return registryClient, nil + } + + opts := []registry.ClientOption{registry.ClientOptEnableCache(true)} + if pusher.opts.plainHTTP { + opts = append(opts, registry.ClientOptPlainHTTP()) + } + + registryClient, err := registry.NewClient(opts...) + if err != nil { + return nil, err + } + return registryClient, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/pusher/pusher.go b/vendor/helm.sh/helm/v3/pkg/pusher/pusher.go new file mode 100644 index 000000000..5b8a9160f --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/pusher/pusher.go @@ -0,0 +1,122 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pusher + +import ( + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/registry" +) + +// options are generic parameters to be provided to the pusher during instantiation. +// +// Pushers may or may not ignore these parameters as they are passed in. +type options struct { + registryClient *registry.Client + certFile string + keyFile string + caFile string + insecureSkipTLSverify bool + plainHTTP bool +} + +// Option allows specifying various settings configurable by the user for overriding the defaults +// used when performing Push operations with the Pusher. +type Option func(*options) + +// WithRegistryClient sets the registryClient option. +func WithRegistryClient(client *registry.Client) Option { + return func(opts *options) { + opts.registryClient = client + } +} + +// WithTLSClientConfig sets the client auth with the provided credentials. +func WithTLSClientConfig(certFile, keyFile, caFile string) Option { + return func(opts *options) { + opts.certFile = certFile + opts.keyFile = keyFile + opts.caFile = caFile + } +} + +// WithInsecureSkipTLSVerify determines if a TLS Certificate will be checked +func WithInsecureSkipTLSVerify(insecureSkipTLSVerify bool) Option { + return func(opts *options) { + opts.insecureSkipTLSverify = insecureSkipTLSVerify + } +} + +func WithPlainHTTP(plainHTTP bool) Option { + return func(opts *options) { + opts.plainHTTP = plainHTTP + } +} + +// Pusher is an interface to support upload to the specified URL. +type Pusher interface { + // Push file content by url string + Push(chartRef, url string, options ...Option) error +} + +// Constructor is the function for every pusher which creates a specific instance +// according to the configuration +type Constructor func(options ...Option) (Pusher, error) + +// Provider represents any pusher and the schemes that it supports. +type Provider struct { + Schemes []string + New Constructor +} + +// Provides returns true if the given scheme is supported by this Provider. +func (p Provider) Provides(scheme string) bool { + for _, i := range p.Schemes { + if i == scheme { + return true + } + } + return false +} + +// Providers is a collection of Provider objects. +type Providers []Provider + +// ByScheme returns a Provider that handles the given scheme. +// +// If no provider handles this scheme, this will return an error. +func (p Providers) ByScheme(scheme string) (Pusher, error) { + for _, pp := range p { + if pp.Provides(scheme) { + return pp.New() + } + } + return nil, errors.Errorf("scheme %q not supported", scheme) +} + +var ociProvider = Provider{ + Schemes: []string{registry.OCIScheme}, + New: NewOCIPusher, +} + +// All finds all of the registered pushers as a list of Provider instances. +// Currently, just the built-in pushers are collected. +func All(_ *cli.EnvSettings) Providers { + result := Providers{ociProvider} + return result +} diff --git a/vendor/helm.sh/helm/v3/pkg/registry/client.go b/vendor/helm.sh/helm/v3/pkg/registry/client.go new file mode 100644 index 000000000..42f736816 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/registry/client.go @@ -0,0 +1,703 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/pkg/registry" + +import ( + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "sort" + "strings" + + "github.com/Masterminds/semver/v3" + "github.com/containerd/containerd/remotes" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "oras.land/oras-go/pkg/auth" + dockerauth "oras.land/oras-go/pkg/auth/docker" + "oras.land/oras-go/pkg/content" + "oras.land/oras-go/pkg/oras" + "oras.land/oras-go/pkg/registry" + registryremote "oras.land/oras-go/pkg/registry/remote" + registryauth "oras.land/oras-go/pkg/registry/remote/auth" + + "helm.sh/helm/v3/internal/version" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/helmpath" +) + +// See https://github.com/helm/helm/issues/10166 +const registryUnderscoreMessage = ` +OCI artifact references (e.g. tags) do not support the plus sign (+). To support +storing semantic versions, Helm adopts the convention of changing plus (+) to +an underscore (_) in chart version tags when pushing to a registry and back to +a plus (+) when pulling from a registry.` + +type ( + // Client works with OCI-compliant registries + Client struct { + debug bool + enableCache bool + // path to repository config file e.g. ~/.docker/config.json + credentialsFile string + out io.Writer + authorizer auth.Client + registryAuthorizer *registryauth.Client + resolver func(ref registry.Reference) (remotes.Resolver, error) + httpClient *http.Client + plainHTTP bool + } + + // ClientOption allows specifying various settings configurable by the user for overriding the defaults + // used when creating a new default client + ClientOption func(*Client) +) + +// NewClient returns a new registry client with config +func NewClient(options ...ClientOption) (*Client, error) { + client := &Client{ + out: io.Discard, + } + for _, option := range options { + option(client) + } + if client.credentialsFile == "" { + client.credentialsFile = helmpath.ConfigPath(CredentialsFileBasename) + } + if client.authorizer == nil { + authClient, err := dockerauth.NewClientWithDockerFallback(client.credentialsFile) + if err != nil { + return nil, err + } + client.authorizer = authClient + } + + resolverFn := client.resolver // copy for avoiding recursive call + client.resolver = func(ref registry.Reference) (remotes.Resolver, error) { + if resolverFn != nil { + // validate if the resolverFn returns a valid resolver + if resolver, err := resolverFn(ref); resolver != nil && err == nil { + return resolver, nil + } + } + headers := http.Header{} + headers.Set("User-Agent", version.GetUserAgent()) + opts := []auth.ResolverOption{auth.WithResolverHeaders(headers)} + if client.httpClient != nil { + opts = append(opts, auth.WithResolverClient(client.httpClient)) + } + if client.plainHTTP { + opts = append(opts, auth.WithResolverPlainHTTP()) + } + resolver, err := client.authorizer.ResolverWithOpts(opts...) + if err != nil { + return nil, err + } + return resolver, nil + } + + // allocate a cache if option is set + var cache registryauth.Cache + if client.enableCache { + cache = registryauth.DefaultCache + } + if client.registryAuthorizer == nil { + client.registryAuthorizer = &registryauth.Client{ + Client: client.httpClient, + Header: http.Header{ + "User-Agent": {version.GetUserAgent()}, + }, + Cache: cache, + Credential: func(_ context.Context, reg string) (registryauth.Credential, error) { + dockerClient, ok := client.authorizer.(*dockerauth.Client) + if !ok { + return registryauth.EmptyCredential, errors.New("unable to obtain docker client") + } + + username, password, err := dockerClient.Credential(reg) + if err != nil { + return registryauth.EmptyCredential, errors.New("unable to retrieve credentials") + } + + // A blank returned username and password value is a bearer token + if username == "" && password != "" { + return registryauth.Credential{ + RefreshToken: password, + }, nil + } + + return registryauth.Credential{ + Username: username, + Password: password, + }, nil + + }, + } + + } + return client, nil +} + +// ClientOptDebug returns a function that sets the debug setting on client options set +func ClientOptDebug(debug bool) ClientOption { + return func(client *Client) { + client.debug = debug + } +} + +// ClientOptEnableCache returns a function that sets the enableCache setting on a client options set +func ClientOptEnableCache(enableCache bool) ClientOption { + return func(client *Client) { + client.enableCache = enableCache + } +} + +// ClientOptWriter returns a function that sets the writer setting on client options set +func ClientOptWriter(out io.Writer) ClientOption { + return func(client *Client) { + client.out = out + } +} + +// ClientOptCredentialsFile returns a function that sets the credentialsFile setting on a client options set +func ClientOptCredentialsFile(credentialsFile string) ClientOption { + return func(client *Client) { + client.credentialsFile = credentialsFile + } +} + +// ClientOptHTTPClient returns a function that sets the httpClient setting on a client options set +func ClientOptHTTPClient(httpClient *http.Client) ClientOption { + return func(client *Client) { + client.httpClient = httpClient + } +} + +func ClientOptPlainHTTP() ClientOption { + return func(c *Client) { + c.plainHTTP = true + } +} + +// ClientOptResolver returns a function that sets the resolver setting on a client options set +func ClientOptResolver(resolver remotes.Resolver) ClientOption { + return func(client *Client) { + client.resolver = func(_ registry.Reference) (remotes.Resolver, error) { + return resolver, nil + } + } +} + +type ( + // LoginOption allows specifying various settings on login + LoginOption func(*loginOperation) + + loginOperation struct { + username string + password string + insecure bool + certFile string + keyFile string + caFile string + } +) + +// Login logs into a registry +func (c *Client) Login(host string, options ...LoginOption) error { + operation := &loginOperation{} + for _, option := range options { + option(operation) + } + authorizerLoginOpts := []auth.LoginOption{ + auth.WithLoginContext(ctx(c.out, c.debug)), + auth.WithLoginHostname(host), + auth.WithLoginUsername(operation.username), + auth.WithLoginSecret(operation.password), + auth.WithLoginUserAgent(version.GetUserAgent()), + auth.WithLoginTLS(operation.certFile, operation.keyFile, operation.caFile), + } + if operation.insecure { + authorizerLoginOpts = append(authorizerLoginOpts, auth.WithLoginInsecure()) + } + if err := c.authorizer.LoginWithOpts(authorizerLoginOpts...); err != nil { + return err + } + fmt.Fprintln(c.out, "Login Succeeded") + return nil +} + +// LoginOptBasicAuth returns a function that sets the username/password settings on login +func LoginOptBasicAuth(username string, password string) LoginOption { + return func(operation *loginOperation) { + operation.username = username + operation.password = password + } +} + +// LoginOptInsecure returns a function that sets the insecure setting on login +func LoginOptInsecure(insecure bool) LoginOption { + return func(operation *loginOperation) { + operation.insecure = insecure + } +} + +// LoginOptTLSClientConfig returns a function that sets the TLS settings on login. +func LoginOptTLSClientConfig(certFile, keyFile, caFile string) LoginOption { + return func(operation *loginOperation) { + operation.certFile = certFile + operation.keyFile = keyFile + operation.caFile = caFile + } +} + +type ( + // LogoutOption allows specifying various settings on logout + LogoutOption func(*logoutOperation) + + logoutOperation struct{} +) + +// Logout logs out of a registry +func (c *Client) Logout(host string, opts ...LogoutOption) error { + operation := &logoutOperation{} + for _, opt := range opts { + opt(operation) + } + if err := c.authorizer.Logout(ctx(c.out, c.debug), host); err != nil { + return err + } + fmt.Fprintf(c.out, "Removing login credentials for %s\n", host) + return nil +} + +type ( + // PullOption allows specifying various settings on pull + PullOption func(*pullOperation) + + // PullResult is the result returned upon successful pull. + PullResult struct { + Manifest *DescriptorPullSummary `json:"manifest"` + Config *DescriptorPullSummary `json:"config"` + Chart *DescriptorPullSummaryWithMeta `json:"chart"` + Prov *DescriptorPullSummary `json:"prov"` + Ref string `json:"ref"` + } + + DescriptorPullSummary struct { + Data []byte `json:"-"` + Digest string `json:"digest"` + Size int64 `json:"size"` + } + + DescriptorPullSummaryWithMeta struct { + DescriptorPullSummary + Meta *chart.Metadata `json:"meta"` + } + + pullOperation struct { + withChart bool + withProv bool + ignoreMissingProv bool + } +) + +// Pull downloads a chart from a registry +func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { + parsedRef, err := parseReference(ref) + if err != nil { + return nil, err + } + + operation := &pullOperation{ + withChart: true, // By default, always download the chart layer + } + for _, option := range options { + option(operation) + } + if !operation.withChart && !operation.withProv { + return nil, errors.New( + "must specify at least one layer to pull (chart/prov)") + } + memoryStore := content.NewMemory() + allowedMediaTypes := []string{ + ConfigMediaType, + } + minNumDescriptors := 1 // 1 for the config + if operation.withChart { + minNumDescriptors++ + allowedMediaTypes = append(allowedMediaTypes, ChartLayerMediaType, LegacyChartLayerMediaType) + } + if operation.withProv { + if !operation.ignoreMissingProv { + minNumDescriptors++ + } + allowedMediaTypes = append(allowedMediaTypes, ProvLayerMediaType) + } + + var descriptors, layers []ocispec.Descriptor + remotesResolver, err := c.resolver(parsedRef) + if err != nil { + return nil, err + } + registryStore := content.Registry{Resolver: remotesResolver} + + manifest, err := oras.Copy(ctx(c.out, c.debug), registryStore, parsedRef.String(), memoryStore, "", + oras.WithPullEmptyNameAllowed(), + oras.WithAllowedMediaTypes(allowedMediaTypes), + oras.WithLayerDescriptors(func(l []ocispec.Descriptor) { + layers = l + })) + if err != nil { + return nil, err + } + + descriptors = append(descriptors, manifest) + descriptors = append(descriptors, layers...) + + numDescriptors := len(descriptors) + if numDescriptors < minNumDescriptors { + return nil, fmt.Errorf("manifest does not contain minimum number of descriptors (%d), descriptors found: %d", + minNumDescriptors, numDescriptors) + } + var configDescriptor *ocispec.Descriptor + var chartDescriptor *ocispec.Descriptor + var provDescriptor *ocispec.Descriptor + for _, descriptor := range descriptors { + d := descriptor + switch d.MediaType { + case ConfigMediaType: + configDescriptor = &d + case ChartLayerMediaType: + chartDescriptor = &d + case ProvLayerMediaType: + provDescriptor = &d + case LegacyChartLayerMediaType: + chartDescriptor = &d + fmt.Fprintf(c.out, "Warning: chart media type %s is deprecated\n", LegacyChartLayerMediaType) + } + } + if configDescriptor == nil { + return nil, fmt.Errorf("could not load config with mediatype %s", ConfigMediaType) + } + if operation.withChart && chartDescriptor == nil { + return nil, fmt.Errorf("manifest does not contain a layer with mediatype %s", + ChartLayerMediaType) + } + var provMissing bool + if operation.withProv && provDescriptor == nil { + if operation.ignoreMissingProv { + provMissing = true + } else { + return nil, fmt.Errorf("manifest does not contain a layer with mediatype %s", + ProvLayerMediaType) + } + } + result := &PullResult{ + Manifest: &DescriptorPullSummary{ + Digest: manifest.Digest.String(), + Size: manifest.Size, + }, + Config: &DescriptorPullSummary{ + Digest: configDescriptor.Digest.String(), + Size: configDescriptor.Size, + }, + Chart: &DescriptorPullSummaryWithMeta{}, + Prov: &DescriptorPullSummary{}, + Ref: parsedRef.String(), + } + var getManifestErr error + if _, manifestData, ok := memoryStore.Get(manifest); !ok { + getManifestErr = errors.Errorf("Unable to retrieve blob with digest %s", manifest.Digest) + } else { + result.Manifest.Data = manifestData + } + if getManifestErr != nil { + return nil, getManifestErr + } + var getConfigDescriptorErr error + if _, configData, ok := memoryStore.Get(*configDescriptor); !ok { + getConfigDescriptorErr = errors.Errorf("Unable to retrieve blob with digest %s", configDescriptor.Digest) + } else { + result.Config.Data = configData + var meta *chart.Metadata + if err := json.Unmarshal(configData, &meta); err != nil { + return nil, err + } + result.Chart.Meta = meta + } + if getConfigDescriptorErr != nil { + return nil, getConfigDescriptorErr + } + if operation.withChart { + var getChartDescriptorErr error + if _, chartData, ok := memoryStore.Get(*chartDescriptor); !ok { + getChartDescriptorErr = errors.Errorf("Unable to retrieve blob with digest %s", chartDescriptor.Digest) + } else { + result.Chart.Data = chartData + result.Chart.Digest = chartDescriptor.Digest.String() + result.Chart.Size = chartDescriptor.Size + } + if getChartDescriptorErr != nil { + return nil, getChartDescriptorErr + } + } + if operation.withProv && !provMissing { + var getProvDescriptorErr error + if _, provData, ok := memoryStore.Get(*provDescriptor); !ok { + getProvDescriptorErr = errors.Errorf("Unable to retrieve blob with digest %s", provDescriptor.Digest) + } else { + result.Prov.Data = provData + result.Prov.Digest = provDescriptor.Digest.String() + result.Prov.Size = provDescriptor.Size + } + if getProvDescriptorErr != nil { + return nil, getProvDescriptorErr + } + } + + fmt.Fprintf(c.out, "Pulled: %s\n", result.Ref) + fmt.Fprintf(c.out, "Digest: %s\n", result.Manifest.Digest) + + if strings.Contains(result.Ref, "_") { + fmt.Fprintf(c.out, "%s contains an underscore.\n", result.Ref) + fmt.Fprint(c.out, registryUnderscoreMessage+"\n") + } + + return result, nil +} + +// PullOptWithChart returns a function that sets the withChart setting on pull +func PullOptWithChart(withChart bool) PullOption { + return func(operation *pullOperation) { + operation.withChart = withChart + } +} + +// PullOptWithProv returns a function that sets the withProv setting on pull +func PullOptWithProv(withProv bool) PullOption { + return func(operation *pullOperation) { + operation.withProv = withProv + } +} + +// PullOptIgnoreMissingProv returns a function that sets the ignoreMissingProv setting on pull +func PullOptIgnoreMissingProv(ignoreMissingProv bool) PullOption { + return func(operation *pullOperation) { + operation.ignoreMissingProv = ignoreMissingProv + } +} + +type ( + // PushOption allows specifying various settings on push + PushOption func(*pushOperation) + + // PushResult is the result returned upon successful push. + PushResult struct { + Manifest *descriptorPushSummary `json:"manifest"` + Config *descriptorPushSummary `json:"config"` + Chart *descriptorPushSummaryWithMeta `json:"chart"` + Prov *descriptorPushSummary `json:"prov"` + Ref string `json:"ref"` + } + + descriptorPushSummary struct { + Digest string `json:"digest"` + Size int64 `json:"size"` + } + + descriptorPushSummaryWithMeta struct { + descriptorPushSummary + Meta *chart.Metadata `json:"meta"` + } + + pushOperation struct { + provData []byte + strictMode bool + creationTime string + } +) + +// Push uploads a chart to a registry. +func (c *Client) Push(data []byte, ref string, options ...PushOption) (*PushResult, error) { + parsedRef, err := parseReference(ref) + if err != nil { + return nil, err + } + + operation := &pushOperation{ + strictMode: true, // By default, enable strict mode + } + for _, option := range options { + option(operation) + } + meta, err := extractChartMeta(data) + if err != nil { + return nil, err + } + if operation.strictMode { + if !strings.HasSuffix(ref, fmt.Sprintf("/%s:%s", meta.Name, meta.Version)) { + return nil, errors.New( + "strict mode enabled, ref basename and tag must match the chart name and version") + } + } + memoryStore := content.NewMemory() + chartDescriptor, err := memoryStore.Add("", ChartLayerMediaType, data) + if err != nil { + return nil, err + } + + configData, err := json.Marshal(meta) + if err != nil { + return nil, err + } + + configDescriptor, err := memoryStore.Add("", ConfigMediaType, configData) + if err != nil { + return nil, err + } + + descriptors := []ocispec.Descriptor{chartDescriptor} + var provDescriptor ocispec.Descriptor + if operation.provData != nil { + provDescriptor, err = memoryStore.Add("", ProvLayerMediaType, operation.provData) + if err != nil { + return nil, err + } + + descriptors = append(descriptors, provDescriptor) + } + + ociAnnotations := generateOCIAnnotations(meta, operation.creationTime) + + manifestData, manifest, err := content.GenerateManifest(&configDescriptor, ociAnnotations, descriptors...) + if err != nil { + return nil, err + } + + if err := memoryStore.StoreManifest(parsedRef.String(), manifest, manifestData); err != nil { + return nil, err + } + + remotesResolver, err := c.resolver(parsedRef) + if err != nil { + return nil, err + } + registryStore := content.Registry{Resolver: remotesResolver} + _, err = oras.Copy(ctx(c.out, c.debug), memoryStore, parsedRef.String(), registryStore, "", + oras.WithNameValidation(nil)) + if err != nil { + return nil, err + } + chartSummary := &descriptorPushSummaryWithMeta{ + Meta: meta, + } + chartSummary.Digest = chartDescriptor.Digest.String() + chartSummary.Size = chartDescriptor.Size + result := &PushResult{ + Manifest: &descriptorPushSummary{ + Digest: manifest.Digest.String(), + Size: manifest.Size, + }, + Config: &descriptorPushSummary{ + Digest: configDescriptor.Digest.String(), + Size: configDescriptor.Size, + }, + Chart: chartSummary, + Prov: &descriptorPushSummary{}, // prevent nil references + Ref: parsedRef.String(), + } + if operation.provData != nil { + result.Prov = &descriptorPushSummary{ + Digest: provDescriptor.Digest.String(), + Size: provDescriptor.Size, + } + } + fmt.Fprintf(c.out, "Pushed: %s\n", result.Ref) + fmt.Fprintf(c.out, "Digest: %s\n", result.Manifest.Digest) + if strings.Contains(parsedRef.Reference, "_") { + fmt.Fprintf(c.out, "%s contains an underscore.\n", result.Ref) + fmt.Fprint(c.out, registryUnderscoreMessage+"\n") + } + + return result, err +} + +// PushOptProvData returns a function that sets the prov bytes setting on push +func PushOptProvData(provData []byte) PushOption { + return func(operation *pushOperation) { + operation.provData = provData + } +} + +// PushOptStrictMode returns a function that sets the strictMode setting on push +func PushOptStrictMode(strictMode bool) PushOption { + return func(operation *pushOperation) { + operation.strictMode = strictMode + } +} + +// PushOptCreationDate returns a function that sets the creation time +func PushOptCreationTime(creationTime string) PushOption { + return func(operation *pushOperation) { + operation.creationTime = creationTime + } +} + +// Tags provides a sorted list all semver compliant tags for a given repository +func (c *Client) Tags(ref string) ([]string, error) { + parsedReference, err := registry.ParseReference(ref) + if err != nil { + return nil, err + } + + repository := registryremote.Repository{ + Reference: parsedReference, + Client: c.registryAuthorizer, + PlainHTTP: c.plainHTTP, + } + + var registryTags []string + + registryTags, err = registry.Tags(ctx(c.out, c.debug), &repository) + if err != nil { + return nil, err + } + + var tagVersions []*semver.Version + for _, tag := range registryTags { + // Change underscore (_) back to plus (+) for Helm + // See https://github.com/helm/helm/issues/10166 + tagVersion, err := semver.StrictNewVersion(strings.ReplaceAll(tag, "_", "+")) + if err == nil { + tagVersions = append(tagVersions, tagVersion) + } + } + + // Sort the collection + sort.Sort(sort.Reverse(semver.Collection(tagVersions))) + + tags := make([]string, len(tagVersions)) + + for iTv, tv := range tagVersions { + tags[iTv] = tv.String() + } + + return tags, nil + +} diff --git a/vendor/helm.sh/helm/v3/pkg/registry/constants.go b/vendor/helm.sh/helm/v3/pkg/registry/constants.go new file mode 100644 index 000000000..570b6f0d3 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/registry/constants.go @@ -0,0 +1,37 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/pkg/registry" + +const ( + // OCIScheme is the URL scheme for OCI-based requests + OCIScheme = "oci" + + // CredentialsFileBasename is the filename for auth credentials file + CredentialsFileBasename = "registry/config.json" + + // ConfigMediaType is the reserved media type for the Helm chart manifest config + ConfigMediaType = "application/vnd.cncf.helm.config.v1+json" + + // ChartLayerMediaType is the reserved media type for Helm chart package content + ChartLayerMediaType = "application/vnd.cncf.helm.chart.content.v1.tar+gzip" + + // ProvLayerMediaType is the reserved media type for Helm chart provenance files + ProvLayerMediaType = "application/vnd.cncf.helm.chart.provenance.v1.prov" + + // LegacyChartLayerMediaType is the legacy reserved media type for Helm chart package content. + LegacyChartLayerMediaType = "application/tar+gzip" +) diff --git a/vendor/helm.sh/helm/v3/pkg/registry/util.go b/vendor/helm.sh/helm/v3/pkg/registry/util.go new file mode 100644 index 000000000..727cdae03 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/registry/util.go @@ -0,0 +1,249 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/pkg/registry" + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strings" + "time" + + helmtime "helm.sh/helm/v3/pkg/time" + + "github.com/Masterminds/semver/v3" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + orascontext "oras.land/oras-go/pkg/context" + "oras.land/oras-go/pkg/registry" + + "helm.sh/helm/v3/internal/tlsutil" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" +) + +var immutableOciAnnotations = []string{ + ocispec.AnnotationVersion, + ocispec.AnnotationTitle, +} + +// IsOCI determines whether or not a URL is to be treated as an OCI URL +func IsOCI(url string) bool { + return strings.HasPrefix(url, fmt.Sprintf("%s://", OCIScheme)) +} + +// ContainsTag determines whether a tag is found in a provided list of tags +func ContainsTag(tags []string, tag string) bool { + for _, t := range tags { + if tag == t { + return true + } + } + return false +} + +func GetTagMatchingVersionOrConstraint(tags []string, versionString string) (string, error) { + var constraint *semver.Constraints + if versionString == "" { + // If string is empty, set wildcard constraint + constraint, _ = semver.NewConstraint("*") + } else { + // when customer inputs specific version, check whether there's an exact match first + for _, v := range tags { + if versionString == v { + return v, nil + } + } + + // Otherwise set constraint to the string given + var err error + constraint, err = semver.NewConstraint(versionString) + if err != nil { + return "", err + } + } + + // Otherwise try to find the first available version matching the string, + // in case it is a constraint + for _, v := range tags { + test, err := semver.NewVersion(v) + if err != nil { + continue + } + if constraint.Check(test) { + return v, nil + } + } + + return "", errors.Errorf("Could not locate a version matching provided version string %s", versionString) +} + +// extractChartMeta is used to extract a chart metadata from a byte array +func extractChartMeta(chartData []byte) (*chart.Metadata, error) { + ch, err := loader.LoadArchive(bytes.NewReader(chartData)) + if err != nil { + return nil, err + } + return ch.Metadata, nil +} + +// ctx retrieves a fresh context. +// disable verbose logging coming from ORAS (unless debug is enabled) +func ctx(out io.Writer, debug bool) context.Context { + if !debug { + return orascontext.Background() + } + ctx := orascontext.WithLoggerFromWriter(context.Background(), out) + orascontext.GetLogger(ctx).Logger.SetLevel(logrus.DebugLevel) + return ctx +} + +// parseReference will parse and validate the reference, and clean tags when +// applicable tags are only cleaned when plus (+) signs are present, and are +// converted to underscores (_) before pushing +// See https://github.com/helm/helm/issues/10166 +func parseReference(raw string) (registry.Reference, error) { + // The sole possible reference modification is replacing plus (+) signs + // present in tags with underscores (_). To do this properly, we first + // need to identify a tag, and then pass it on to the reference parser + // NOTE: Passing immediately to the reference parser will fail since (+) + // signs are an invalid tag character, and simply replacing all plus (+) + // occurrences could invalidate other portions of the URI + parts := strings.Split(raw, ":") + if len(parts) > 1 && !strings.Contains(parts[len(parts)-1], "/") { + tag := parts[len(parts)-1] + + if tag != "" { + // Replace any plus (+) signs with known underscore (_) conversion + newTag := strings.ReplaceAll(tag, "+", "_") + raw = strings.ReplaceAll(raw, tag, newTag) + } + } + + return registry.ParseReference(raw) +} + +// NewRegistryClientWithTLS is a helper function to create a new registry client with TLS enabled. +func NewRegistryClientWithTLS(out io.Writer, certFile, keyFile, caFile string, insecureSkipTLSverify bool, registryConfig string, debug bool) (*Client, error) { + tlsConf, err := tlsutil.NewClientTLS(certFile, keyFile, caFile, insecureSkipTLSverify) + if err != nil { + return nil, fmt.Errorf("can't create TLS config for client: %s", err) + } + // Create a new registry client + registryClient, err := NewClient( + ClientOptDebug(debug), + ClientOptEnableCache(true), + ClientOptWriter(out), + ClientOptCredentialsFile(registryConfig), + ClientOptHTTPClient(&http.Client{ + Transport: &http.Transport{ + TLSClientConfig: tlsConf, + Proxy: http.ProxyFromEnvironment, + }, + }), + ) + if err != nil { + return nil, err + } + return registryClient, nil +} + +// generateOCIAnnotations will generate OCI annotations to include within the OCI manifest +func generateOCIAnnotations(meta *chart.Metadata, creationTime string) map[string]string { + + // Get annotations from Chart attributes + ociAnnotations := generateChartOCIAnnotations(meta, creationTime) + + // Copy Chart annotations +annotations: + for chartAnnotationKey, chartAnnotationValue := range meta.Annotations { + + // Avoid overriding key properties + for _, immutableOciKey := range immutableOciAnnotations { + if immutableOciKey == chartAnnotationKey { + continue annotations + } + } + + // Add chart annotation + ociAnnotations[chartAnnotationKey] = chartAnnotationValue + } + + return ociAnnotations +} + +// getChartOCIAnnotations will generate OCI annotations from the provided chart +func generateChartOCIAnnotations(meta *chart.Metadata, creationTime string) map[string]string { + chartOCIAnnotations := map[string]string{} + + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationDescription, meta.Description) + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationTitle, meta.Name) + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationVersion, meta.Version) + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationURL, meta.Home) + + if len(creationTime) == 0 { + creationTime = helmtime.Now().UTC().Format(time.RFC3339) + } + + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationCreated, creationTime) + + if len(meta.Sources) > 0 { + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationSource, meta.Sources[0]) + } + + if meta.Maintainers != nil && len(meta.Maintainers) > 0 { + var maintainerSb strings.Builder + + for maintainerIdx, maintainer := range meta.Maintainers { + + if len(maintainer.Name) > 0 { + maintainerSb.WriteString(maintainer.Name) + } + + if len(maintainer.Email) > 0 { + maintainerSb.WriteString(" (") + maintainerSb.WriteString(maintainer.Email) + maintainerSb.WriteString(")") + } + + if maintainerIdx < len(meta.Maintainers)-1 { + maintainerSb.WriteString(", ") + } + + } + + chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationAuthors, maintainerSb.String()) + + } + + return chartOCIAnnotations +} + +// addToMap takes an existing map and adds an item if the value is not empty +func addToMap(inputMap map[string]string, newKey string, newValue string) map[string]string { + + // Add item to map if its + if len(strings.TrimSpace(newValue)) > 0 { + inputMap[newKey] = newValue + } + + return inputMap + +} diff --git a/vendor/helm.sh/helm/v3/pkg/release/hook.go b/vendor/helm.sh/helm/v3/pkg/release/hook.go new file mode 100644 index 000000000..cb9955582 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/release/hook.go @@ -0,0 +1,106 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package release + +import ( + "helm.sh/helm/v3/pkg/time" +) + +// HookEvent specifies the hook event +type HookEvent string + +// Hook event types +const ( + HookPreInstall HookEvent = "pre-install" + HookPostInstall HookEvent = "post-install" + HookPreDelete HookEvent = "pre-delete" + HookPostDelete HookEvent = "post-delete" + HookPreUpgrade HookEvent = "pre-upgrade" + HookPostUpgrade HookEvent = "post-upgrade" + HookPreRollback HookEvent = "pre-rollback" + HookPostRollback HookEvent = "post-rollback" + HookTest HookEvent = "test" +) + +func (x HookEvent) String() string { return string(x) } + +// HookDeletePolicy specifies the hook delete policy +type HookDeletePolicy string + +// Hook delete policy types +const ( + HookSucceeded HookDeletePolicy = "hook-succeeded" + HookFailed HookDeletePolicy = "hook-failed" + HookBeforeHookCreation HookDeletePolicy = "before-hook-creation" +) + +func (x HookDeletePolicy) String() string { return string(x) } + +// HookAnnotation is the label name for a hook +const HookAnnotation = "helm.sh/hook" + +// HookWeightAnnotation is the label name for a hook weight +const HookWeightAnnotation = "helm.sh/hook-weight" + +// HookDeleteAnnotation is the label name for the delete policy for a hook +const HookDeleteAnnotation = "helm.sh/hook-delete-policy" + +// Hook defines a hook object. +type Hook struct { + Name string `json:"name,omitempty"` + // Kind is the Kubernetes kind. + Kind string `json:"kind,omitempty"` + // Path is the chart-relative path to the template. + Path string `json:"path,omitempty"` + // Manifest is the manifest contents. + Manifest string `json:"manifest,omitempty"` + // Events are the events that this hook fires on. + Events []HookEvent `json:"events,omitempty"` + // LastRun indicates the date/time this was last run. + LastRun HookExecution `json:"last_run,omitempty"` + // Weight indicates the sort order for execution among similar Hook type + Weight int `json:"weight,omitempty"` + // DeletePolicies are the policies that indicate when to delete the hook + DeletePolicies []HookDeletePolicy `json:"delete_policies,omitempty"` +} + +// A HookExecution records the result for the last execution of a hook for a given release. +type HookExecution struct { + // StartedAt indicates the date/time this hook was started + StartedAt time.Time `json:"started_at,omitempty"` + // CompletedAt indicates the date/time this hook was completed. + CompletedAt time.Time `json:"completed_at,omitempty"` + // Phase indicates whether the hook completed successfully + Phase HookPhase `json:"phase"` +} + +// A HookPhase indicates the state of a hook execution +type HookPhase string + +const ( + // HookPhaseUnknown indicates that a hook is in an unknown state + HookPhaseUnknown HookPhase = "Unknown" + // HookPhaseRunning indicates that a hook is currently executing + HookPhaseRunning HookPhase = "Running" + // HookPhaseSucceeded indicates that hook execution succeeded + HookPhaseSucceeded HookPhase = "Succeeded" + // HookPhaseFailed indicates that hook execution failed + HookPhaseFailed HookPhase = "Failed" +) + +// String converts a hook phase to a printable string +func (x HookPhase) String() string { return string(x) } diff --git a/vendor/helm.sh/helm/v3/pkg/release/info.go b/vendor/helm.sh/helm/v3/pkg/release/info.go new file mode 100644 index 000000000..b030a8a54 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/release/info.go @@ -0,0 +1,40 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package release + +import ( + "k8s.io/apimachinery/pkg/runtime" + + "helm.sh/helm/v3/pkg/time" +) + +// Info describes release information. +type Info struct { + // FirstDeployed is when the release was first deployed. + FirstDeployed time.Time `json:"first_deployed,omitempty"` + // LastDeployed is when the release was last deployed. + LastDeployed time.Time `json:"last_deployed,omitempty"` + // Deleted tracks when this object was deleted. + Deleted time.Time `json:"deleted"` + // Description is human-friendly "log entry" about this release. + Description string `json:"description,omitempty"` + // Status is the current state of the release + Status Status `json:"status,omitempty"` + // Contains the rendered templates/NOTES.txt if available + Notes string `json:"notes,omitempty"` + // Contains the deployed resources information + Resources map[string][]runtime.Object `json:"resources,omitempty"` +} diff --git a/vendor/helm.sh/helm/v3/pkg/release/mock.go b/vendor/helm.sh/helm/v3/pkg/release/mock.go new file mode 100644 index 000000000..a28e1dc16 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/release/mock.go @@ -0,0 +1,116 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package release + +import ( + "fmt" + "math/rand" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/time" +) + +// MockHookTemplate is the hook template used for all mock release objects. +var MockHookTemplate = `apiVersion: v1 +kind: Job +metadata: + annotations: + "helm.sh/hook": pre-install +` + +// MockManifest is the manifest used for all mock release objects. +var MockManifest = `apiVersion: v1 +kind: Secret +metadata: + name: fixture +` + +// MockReleaseOptions allows for user-configurable options on mock release objects. +type MockReleaseOptions struct { + Name string + Version int + Chart *chart.Chart + Status Status + Namespace string +} + +// Mock creates a mock release object based on options set by MockReleaseOptions. This function should typically not be used outside of testing. +func Mock(opts *MockReleaseOptions) *Release { + date := time.Unix(242085845, 0).UTC() + + name := opts.Name + if name == "" { + name = "testrelease-" + fmt.Sprint(rand.Intn(100)) + } + + version := 1 + if opts.Version != 0 { + version = opts.Version + } + + namespace := opts.Namespace + if namespace == "" { + namespace = "default" + } + + ch := opts.Chart + if opts.Chart == nil { + ch = &chart.Chart{ + Metadata: &chart.Metadata{ + Name: "foo", + Version: "0.1.0-beta.1", + AppVersion: "1.0", + }, + Templates: []*chart.File{ + {Name: "templates/foo.tpl", Data: []byte(MockManifest)}, + }, + } + } + + scode := StatusDeployed + if len(opts.Status) > 0 { + scode = opts.Status + } + + info := &Info{ + FirstDeployed: date, + LastDeployed: date, + Status: scode, + Description: "Release mock", + Notes: "Some mock release notes!", + } + + return &Release{ + Name: name, + Info: info, + Chart: ch, + Config: map[string]interface{}{"name": "value"}, + Version: version, + Namespace: namespace, + Hooks: []*Hook{ + { + Name: "pre-install-hook", + Kind: "Job", + Path: "pre-install-hook.yaml", + Manifest: MockHookTemplate, + LastRun: HookExecution{}, + Events: []HookEvent{HookPreInstall}, + }, + }, + Manifest: MockManifest, + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/release/release.go b/vendor/helm.sh/helm/v3/pkg/release/release.go new file mode 100644 index 000000000..b90612873 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/release/release.go @@ -0,0 +1,49 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package release + +import "helm.sh/helm/v3/pkg/chart" + +// Release describes a deployment of a chart, together with the chart +// and the variables used to deploy that chart. +type Release struct { + // Name is the name of the release + Name string `json:"name,omitempty"` + // Info provides information about a release + Info *Info `json:"info,omitempty"` + // Chart is the chart that was released. + Chart *chart.Chart `json:"chart,omitempty"` + // Config is the set of extra Values added to the chart. + // These values override the default values inside of the chart. + Config map[string]interface{} `json:"config,omitempty"` + // Manifest is the string representation of the rendered template. + Manifest string `json:"manifest,omitempty"` + // Hooks are all of the hooks declared for this release. + Hooks []*Hook `json:"hooks,omitempty"` + // Version is an int which represents the revision of the release. + Version int `json:"version,omitempty"` + // Namespace is the kubernetes namespace of the release. + Namespace string `json:"namespace,omitempty"` + // Labels of the release. + // Disabled encoding into Json cause labels are stored in storage driver metadata field. + Labels map[string]string `json:"-"` +} + +// SetStatus is a helper for setting the status on a release. +func (r *Release) SetStatus(status Status, msg string) { + r.Info.Status = status + r.Info.Description = msg +} diff --git a/vendor/helm.sh/helm/v3/pkg/release/responses.go b/vendor/helm.sh/helm/v3/pkg/release/responses.go new file mode 100644 index 000000000..7ee1fc2ee --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/release/responses.go @@ -0,0 +1,24 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package release + +// UninstallReleaseResponse represents a successful response to an uninstall request. +type UninstallReleaseResponse struct { + // Release is the release that was marked deleted. + Release *Release `json:"release,omitempty"` + // Info is an uninstall message + Info string `json:"info,omitempty"` +} diff --git a/vendor/helm.sh/helm/v3/pkg/release/status.go b/vendor/helm.sh/helm/v3/pkg/release/status.go new file mode 100644 index 000000000..edd27a5f1 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/release/status.go @@ -0,0 +1,49 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package release + +// Status is the status of a release +type Status string + +// Describe the status of a release +// NOTE: Make sure to update cmd/helm/status.go when adding or modifying any of these statuses. +const ( + // StatusUnknown indicates that a release is in an uncertain state. + StatusUnknown Status = "unknown" + // StatusDeployed indicates that the release has been pushed to Kubernetes. + StatusDeployed Status = "deployed" + // StatusUninstalled indicates that a release has been uninstalled from Kubernetes. + StatusUninstalled Status = "uninstalled" + // StatusSuperseded indicates that this release object is outdated and a newer one exists. + StatusSuperseded Status = "superseded" + // StatusFailed indicates that the release was not successfully deployed. + StatusFailed Status = "failed" + // StatusUninstalling indicates that an uninstall operation is underway. + StatusUninstalling Status = "uninstalling" + // StatusPendingInstall indicates that an install operation is underway. + StatusPendingInstall Status = "pending-install" + // StatusPendingUpgrade indicates that an upgrade operation is underway. + StatusPendingUpgrade Status = "pending-upgrade" + // StatusPendingRollback indicates that a rollback operation is underway. + StatusPendingRollback Status = "pending-rollback" +) + +func (x Status) String() string { return string(x) } + +// IsPending determines if this status is a state or a transition. +func (x Status) IsPending() bool { + return x == StatusPendingInstall || x == StatusPendingUpgrade || x == StatusPendingRollback +} diff --git a/vendor/helm.sh/helm/v3/pkg/releaseutil/filter.go b/vendor/helm.sh/helm/v3/pkg/releaseutil/filter.go new file mode 100644 index 000000000..dbd0df8e2 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/releaseutil/filter.go @@ -0,0 +1,78 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package releaseutil // import "helm.sh/helm/v3/pkg/releaseutil" + +import rspb "helm.sh/helm/v3/pkg/release" + +// FilterFunc returns true if the release object satisfies +// the predicate of the underlying filter func. +type FilterFunc func(*rspb.Release) bool + +// Check applies the FilterFunc to the release object. +func (fn FilterFunc) Check(rls *rspb.Release) bool { + if rls == nil { + return false + } + return fn(rls) +} + +// Filter applies the filter(s) to the list of provided releases +// returning the list that satisfies the filtering predicate. +func (fn FilterFunc) Filter(rels []*rspb.Release) (rets []*rspb.Release) { + for _, rel := range rels { + if fn.Check(rel) { + rets = append(rets, rel) + } + } + return +} + +// Any returns a FilterFunc that filters a list of releases +// determined by the predicate 'f0 || f1 || ... || fn'. +func Any(filters ...FilterFunc) FilterFunc { + return func(rls *rspb.Release) bool { + for _, filter := range filters { + if filter(rls) { + return true + } + } + return false + } +} + +// All returns a FilterFunc that filters a list of releases +// determined by the predicate 'f0 && f1 && ... && fn'. +func All(filters ...FilterFunc) FilterFunc { + return func(rls *rspb.Release) bool { + for _, filter := range filters { + if !filter(rls) { + return false + } + } + return true + } +} + +// StatusFilter filters a set of releases by status code. +func StatusFilter(status rspb.Status) FilterFunc { + return FilterFunc(func(rls *rspb.Release) bool { + if rls == nil { + return true + } + return rls.Info.Status == status + }) +} diff --git a/vendor/helm.sh/helm/v3/pkg/releaseutil/kind_sorter.go b/vendor/helm.sh/helm/v3/pkg/releaseutil/kind_sorter.go new file mode 100644 index 000000000..bb8e84dda --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/releaseutil/kind_sorter.go @@ -0,0 +1,160 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package releaseutil + +import ( + "sort" + + "helm.sh/helm/v3/pkg/release" +) + +// KindSortOrder is an ordering of Kinds. +type KindSortOrder []string + +// InstallOrder is the order in which manifests should be installed (by Kind). +// +// Those occurring earlier in the list get installed before those occurring later in the list. +var InstallOrder KindSortOrder = []string{ + "PriorityClass", + "Namespace", + "NetworkPolicy", + "ResourceQuota", + "LimitRange", + "PodSecurityPolicy", + "PodDisruptionBudget", + "ServiceAccount", + "Secret", + "SecretList", + "ConfigMap", + "StorageClass", + "PersistentVolume", + "PersistentVolumeClaim", + "CustomResourceDefinition", + "ClusterRole", + "ClusterRoleList", + "ClusterRoleBinding", + "ClusterRoleBindingList", + "Role", + "RoleList", + "RoleBinding", + "RoleBindingList", + "Service", + "DaemonSet", + "Pod", + "ReplicationController", + "ReplicaSet", + "Deployment", + "HorizontalPodAutoscaler", + "StatefulSet", + "Job", + "CronJob", + "IngressClass", + "Ingress", + "APIService", +} + +// UninstallOrder is the order in which manifests should be uninstalled (by Kind). +// +// Those occurring earlier in the list get uninstalled before those occurring later in the list. +var UninstallOrder KindSortOrder = []string{ + "APIService", + "Ingress", + "IngressClass", + "Service", + "CronJob", + "Job", + "StatefulSet", + "HorizontalPodAutoscaler", + "Deployment", + "ReplicaSet", + "ReplicationController", + "Pod", + "DaemonSet", + "RoleBindingList", + "RoleBinding", + "RoleList", + "Role", + "ClusterRoleBindingList", + "ClusterRoleBinding", + "ClusterRoleList", + "ClusterRole", + "CustomResourceDefinition", + "PersistentVolumeClaim", + "PersistentVolume", + "StorageClass", + "ConfigMap", + "SecretList", + "Secret", + "ServiceAccount", + "PodDisruptionBudget", + "PodSecurityPolicy", + "LimitRange", + "ResourceQuota", + "NetworkPolicy", + "Namespace", + "PriorityClass", +} + +// sort manifests by kind. +// +// Results are sorted by 'ordering', keeping order of items with equal kind/priority +func sortManifestsByKind(manifests []Manifest, ordering KindSortOrder) []Manifest { + sort.SliceStable(manifests, func(i, j int) bool { + return lessByKind(manifests[i], manifests[j], manifests[i].Head.Kind, manifests[j].Head.Kind, ordering) + }) + + return manifests +} + +// sort hooks by kind, using an out-of-place sort to preserve the input parameters. +// +// Results are sorted by 'ordering', keeping order of items with equal kind/priority +func sortHooksByKind(hooks []*release.Hook, ordering KindSortOrder) []*release.Hook { + h := hooks + sort.SliceStable(h, func(i, j int) bool { + return lessByKind(h[i], h[j], h[i].Kind, h[j].Kind, ordering) + }) + + return h +} + +func lessByKind(_ interface{}, _ interface{}, kindA string, kindB string, o KindSortOrder) bool { + ordering := make(map[string]int, len(o)) + for v, k := range o { + ordering[k] = v + } + + first, aok := ordering[kindA] + second, bok := ordering[kindB] + + if !aok && !bok { + // if both are unknown then sort alphabetically by kind, keep original order if same kind + if kindA != kindB { + return kindA < kindB + } + return first < second + } + // unknown kind is last + if !aok { + return false + } + if !bok { + return true + } + // sort different kinds, keep original order if same priority + return first < second +} diff --git a/vendor/helm.sh/helm/v3/pkg/releaseutil/manifest.go b/vendor/helm.sh/helm/v3/pkg/releaseutil/manifest.go new file mode 100644 index 000000000..0b04a4599 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/releaseutil/manifest.go @@ -0,0 +1,72 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package releaseutil + +import ( + "fmt" + "regexp" + "strconv" + "strings" +) + +// SimpleHead defines what the structure of the head of a manifest file +type SimpleHead struct { + Version string `json:"apiVersion"` + Kind string `json:"kind,omitempty"` + Metadata *struct { + Name string `json:"name"` + Annotations map[string]string `json:"annotations"` + } `json:"metadata,omitempty"` +} + +var sep = regexp.MustCompile("(?:^|\\s*\n)---\\s*") + +// SplitManifests takes a string of manifest and returns a map contains individual manifests +func SplitManifests(bigFile string) map[string]string { + // Basically, we're quickly splitting a stream of YAML documents into an + // array of YAML docs. The file name is just a place holder, but should be + // integer-sortable so that manifests get output in the same order as the + // input (see `BySplitManifestsOrder`). + tpl := "manifest-%d" + res := map[string]string{} + // Making sure that any extra whitespace in YAML stream doesn't interfere in splitting documents correctly. + bigFileTmp := strings.TrimSpace(bigFile) + docs := sep.Split(bigFileTmp, -1) + var count int + for _, d := range docs { + if d == "" { + continue + } + + d = strings.TrimSpace(d) + res[fmt.Sprintf(tpl, count)] = d + count = count + 1 + } + return res +} + +// BySplitManifestsOrder sorts by in-file manifest order, as provided in function `SplitManifests` +type BySplitManifestsOrder []string + +func (a BySplitManifestsOrder) Len() int { return len(a) } +func (a BySplitManifestsOrder) Less(i, j int) bool { + // Split `manifest-%d` + anum, _ := strconv.ParseInt(a[i][len("manifest-"):], 10, 0) + bnum, _ := strconv.ParseInt(a[j][len("manifest-"):], 10, 0) + return anum < bnum +} +func (a BySplitManifestsOrder) Swap(i, j int) { a[i], a[j] = a[j], a[i] } diff --git a/vendor/helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go b/vendor/helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go new file mode 100644 index 000000000..4b6109929 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go @@ -0,0 +1,231 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package releaseutil + +import ( + "log" + "path" + "sort" + "strconv" + "strings" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/release" +) + +// Manifest represents a manifest file, which has a name and some content. +type Manifest struct { + Name string + Content string + Head *SimpleHead +} + +// manifestFile represents a file that contains a manifest. +type manifestFile struct { + entries map[string]string + path string +} + +// result is an intermediate structure used during sorting. +type result struct { + hooks []*release.Hook + generic []Manifest +} + +// TODO: Refactor this out. It's here because naming conventions were not followed through. +// So fix the Test hook names and then remove this. +var events = map[string]release.HookEvent{ + release.HookPreInstall.String(): release.HookPreInstall, + release.HookPostInstall.String(): release.HookPostInstall, + release.HookPreDelete.String(): release.HookPreDelete, + release.HookPostDelete.String(): release.HookPostDelete, + release.HookPreUpgrade.String(): release.HookPreUpgrade, + release.HookPostUpgrade.String(): release.HookPostUpgrade, + release.HookPreRollback.String(): release.HookPreRollback, + release.HookPostRollback.String(): release.HookPostRollback, + release.HookTest.String(): release.HookTest, + // Support test-success for backward compatibility with Helm 2 tests + "test-success": release.HookTest, +} + +// SortManifests takes a map of filename/YAML contents, splits the file +// by manifest entries, and sorts the entries into hook types. +// +// The resulting hooks struct will be populated with all of the generated hooks. +// Any file that does not declare one of the hook types will be placed in the +// 'generic' bucket. +// +// Files that do not parse into the expected format are simply placed into a map and +// returned. +func SortManifests(files map[string]string, _ chartutil.VersionSet, ordering KindSortOrder) ([]*release.Hook, []Manifest, error) { + result := &result{} + + var sortedFilePaths []string + for filePath := range files { + sortedFilePaths = append(sortedFilePaths, filePath) + } + sort.Strings(sortedFilePaths) + + for _, filePath := range sortedFilePaths { + content := files[filePath] + + // Skip partials. We could return these as a separate map, but there doesn't + // seem to be any need for that at this time. + if strings.HasPrefix(path.Base(filePath), "_") { + continue + } + // Skip empty files and log this. + if strings.TrimSpace(content) == "" { + continue + } + + manifestFile := &manifestFile{ + entries: SplitManifests(content), + path: filePath, + } + + if err := manifestFile.sort(result); err != nil { + return result.hooks, result.generic, err + } + } + + return sortHooksByKind(result.hooks, ordering), sortManifestsByKind(result.generic, ordering), nil +} + +// sort takes a manifestFile object which may contain multiple resource definition +// entries and sorts each entry by hook types, and saves the resulting hooks and +// generic manifests (or non-hooks) to the result struct. +// +// To determine hook type, it looks for a YAML structure like this: +// +// kind: SomeKind +// apiVersion: v1 +// metadata: +// annotations: +// helm.sh/hook: pre-install +// +// To determine the policy to delete the hook, it looks for a YAML structure like this: +// +// kind: SomeKind +// apiVersion: v1 +// metadata: +// annotations: +// helm.sh/hook-delete-policy: hook-succeeded +func (file *manifestFile) sort(result *result) error { + // Go through manifests in order found in file (function `SplitManifests` creates integer-sortable keys) + var sortedEntryKeys []string + for entryKey := range file.entries { + sortedEntryKeys = append(sortedEntryKeys, entryKey) + } + sort.Sort(BySplitManifestsOrder(sortedEntryKeys)) + + for _, entryKey := range sortedEntryKeys { + m := file.entries[entryKey] + + var entry SimpleHead + if err := yaml.Unmarshal([]byte(m), &entry); err != nil { + return errors.Wrapf(err, "YAML parse error on %s", file.path) + } + + if !hasAnyAnnotation(entry) { + result.generic = append(result.generic, Manifest{ + Name: file.path, + Content: m, + Head: &entry, + }) + continue + } + + hookTypes, ok := entry.Metadata.Annotations[release.HookAnnotation] + if !ok { + result.generic = append(result.generic, Manifest{ + Name: file.path, + Content: m, + Head: &entry, + }) + continue + } + + hw := calculateHookWeight(entry) + + h := &release.Hook{ + Name: entry.Metadata.Name, + Kind: entry.Kind, + Path: file.path, + Manifest: m, + Events: []release.HookEvent{}, + Weight: hw, + DeletePolicies: []release.HookDeletePolicy{}, + } + + isUnknownHook := false + for _, hookType := range strings.Split(hookTypes, ",") { + hookType = strings.ToLower(strings.TrimSpace(hookType)) + e, ok := events[hookType] + if !ok { + isUnknownHook = true + break + } + h.Events = append(h.Events, e) + } + + if isUnknownHook { + log.Printf("info: skipping unknown hook: %q", hookTypes) + continue + } + + result.hooks = append(result.hooks, h) + + operateAnnotationValues(entry, release.HookDeleteAnnotation, func(value string) { + h.DeletePolicies = append(h.DeletePolicies, release.HookDeletePolicy(value)) + }) + } + + return nil +} + +// hasAnyAnnotation returns true if the given entry has any annotations at all. +func hasAnyAnnotation(entry SimpleHead) bool { + return entry.Metadata != nil && + entry.Metadata.Annotations != nil && + len(entry.Metadata.Annotations) != 0 +} + +// calculateHookWeight finds the weight in the hook weight annotation. +// +// If no weight is found, the assigned weight is 0 +func calculateHookWeight(entry SimpleHead) int { + hws := entry.Metadata.Annotations[release.HookWeightAnnotation] + hw, err := strconv.Atoi(hws) + if err != nil { + hw = 0 + } + return hw +} + +// operateAnnotationValues finds the given annotation and runs the operate function with the value of that annotation +func operateAnnotationValues(entry SimpleHead, annotation string, operate func(p string)) { + if dps, ok := entry.Metadata.Annotations[annotation]; ok { + for _, dp := range strings.Split(dps, ",") { + dp = strings.ToLower(strings.TrimSpace(dp)) + operate(dp) + } + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/releaseutil/sorter.go b/vendor/helm.sh/helm/v3/pkg/releaseutil/sorter.go new file mode 100644 index 000000000..1a8aa78a6 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/releaseutil/sorter.go @@ -0,0 +1,78 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package releaseutil // import "helm.sh/helm/v3/pkg/releaseutil" + +import ( + "sort" + + rspb "helm.sh/helm/v3/pkg/release" +) + +type list []*rspb.Release + +func (s list) Len() int { return len(s) } +func (s list) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// ByName sorts releases by name +type ByName struct{ list } + +// Less compares to releases +func (s ByName) Less(i, j int) bool { return s.list[i].Name < s.list[j].Name } + +// ByDate sorts releases by date +type ByDate struct{ list } + +// Less compares to releases +func (s ByDate) Less(i, j int) bool { + ti := s.list[i].Info.LastDeployed.Unix() + tj := s.list[j].Info.LastDeployed.Unix() + return ti < tj +} + +// ByRevision sorts releases by revision number +type ByRevision struct{ list } + +// Less compares to releases +func (s ByRevision) Less(i, j int) bool { + return s.list[i].Version < s.list[j].Version +} + +// Reverse reverses the list of releases sorted by the sort func. +func Reverse(list []*rspb.Release, sortFn func([]*rspb.Release)) { + sortFn(list) + for i, j := 0, len(list)-1; i < j; i, j = i+1, j-1 { + list[i], list[j] = list[j], list[i] + } +} + +// SortByName returns the list of releases sorted +// in lexicographical order. +func SortByName(list []*rspb.Release) { + sort.Sort(ByName{list}) +} + +// SortByDate returns the list of releases sorted by a +// release's last deployed time (in seconds). +func SortByDate(list []*rspb.Release) { + sort.Sort(ByDate{list}) +} + +// SortByRevision returns the list of releases sorted by a +// release's revision number (release.Version). +func SortByRevision(list []*rspb.Release) { + sort.Sort(ByRevision{list}) +} diff --git a/vendor/helm.sh/helm/v3/pkg/repo/chartrepo.go b/vendor/helm.sh/helm/v3/pkg/repo/chartrepo.go new file mode 100644 index 000000000..970e96da2 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/repo/chartrepo.go @@ -0,0 +1,317 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package repo // import "helm.sh/helm/v3/pkg/repo" + +import ( + "crypto/rand" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "log" + "net/url" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/helmpath" + "helm.sh/helm/v3/pkg/provenance" +) + +// Entry represents a collection of parameters for chart repository +type Entry struct { + Name string `json:"name"` + URL string `json:"url"` + Username string `json:"username"` + Password string `json:"password"` + CertFile string `json:"certFile"` + KeyFile string `json:"keyFile"` + CAFile string `json:"caFile"` + InsecureSkipTLSverify bool `json:"insecure_skip_tls_verify"` + PassCredentialsAll bool `json:"pass_credentials_all"` +} + +// ChartRepository represents a chart repository +type ChartRepository struct { + Config *Entry + ChartPaths []string + IndexFile *IndexFile + Client getter.Getter + CachePath string +} + +// NewChartRepository constructs ChartRepository +func NewChartRepository(cfg *Entry, getters getter.Providers) (*ChartRepository, error) { + u, err := url.Parse(cfg.URL) + if err != nil { + return nil, errors.Errorf("invalid chart URL format: %s", cfg.URL) + } + + client, err := getters.ByScheme(u.Scheme) + if err != nil { + return nil, errors.Errorf("could not find protocol handler for: %s", u.Scheme) + } + + return &ChartRepository{ + Config: cfg, + IndexFile: NewIndexFile(), + Client: client, + CachePath: helmpath.CachePath("repository"), + }, nil +} + +// Load loads a directory of charts as if it were a repository. +// +// It requires the presence of an index.yaml file in the directory. +// +// Deprecated: remove in Helm 4. +func (r *ChartRepository) Load() error { + dirInfo, err := os.Stat(r.Config.Name) + if err != nil { + return err + } + if !dirInfo.IsDir() { + return errors.Errorf("%q is not a directory", r.Config.Name) + } + + // FIXME: Why are we recursively walking directories? + // FIXME: Why are we not reading the repositories.yaml to figure out + // what repos to use? + filepath.Walk(r.Config.Name, func(path string, f os.FileInfo, _ error) error { + if !f.IsDir() { + if strings.Contains(f.Name(), "-index.yaml") { + i, err := LoadIndexFile(path) + if err != nil { + return err + } + r.IndexFile = i + } else if strings.HasSuffix(f.Name(), ".tgz") { + r.ChartPaths = append(r.ChartPaths, path) + } + } + return nil + }) + return nil +} + +// DownloadIndexFile fetches the index from a repository. +func (r *ChartRepository) DownloadIndexFile() (string, error) { + indexURL, err := ResolveReferenceURL(r.Config.URL, "index.yaml") + if err != nil { + return "", err + } + + resp, err := r.Client.Get(indexURL, + getter.WithURL(r.Config.URL), + getter.WithInsecureSkipVerifyTLS(r.Config.InsecureSkipTLSverify), + getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile), + getter.WithBasicAuth(r.Config.Username, r.Config.Password), + getter.WithPassCredentialsAll(r.Config.PassCredentialsAll), + ) + if err != nil { + return "", err + } + + index, err := io.ReadAll(resp) + if err != nil { + return "", err + } + + indexFile, err := loadIndex(index, r.Config.URL) + if err != nil { + return "", err + } + + // Create the chart list file in the cache directory + var charts strings.Builder + for name := range indexFile.Entries { + fmt.Fprintln(&charts, name) + } + chartsFile := filepath.Join(r.CachePath, helmpath.CacheChartsFile(r.Config.Name)) + os.MkdirAll(filepath.Dir(chartsFile), 0755) + os.WriteFile(chartsFile, []byte(charts.String()), 0644) + + // Create the index file in the cache directory + fname := filepath.Join(r.CachePath, helmpath.CacheIndexFile(r.Config.Name)) + os.MkdirAll(filepath.Dir(fname), 0755) + return fname, os.WriteFile(fname, index, 0644) +} + +// Index generates an index for the chart repository and writes an index.yaml file. +func (r *ChartRepository) Index() error { + err := r.generateIndex() + if err != nil { + return err + } + return r.saveIndexFile() +} + +func (r *ChartRepository) saveIndexFile() error { + index, err := yaml.Marshal(r.IndexFile) + if err != nil { + return err + } + return os.WriteFile(filepath.Join(r.Config.Name, indexPath), index, 0644) +} + +func (r *ChartRepository) generateIndex() error { + for _, path := range r.ChartPaths { + ch, err := loader.Load(path) + if err != nil { + return err + } + + digest, err := provenance.DigestFile(path) + if err != nil { + return err + } + + if !r.IndexFile.Has(ch.Name(), ch.Metadata.Version) { + if err := r.IndexFile.MustAdd(ch.Metadata, path, r.Config.URL, digest); err != nil { + return errors.Wrapf(err, "failed adding to %s to index", path) + } + } + // TODO: If a chart exists, but has a different Digest, should we error? + } + r.IndexFile.SortEntries() + return nil +} + +// FindChartInRepoURL finds chart in chart repository pointed by repoURL +// without adding repo to repositories +func FindChartInRepoURL(repoURL, chartName, chartVersion, certFile, keyFile, caFile string, getters getter.Providers) (string, error) { + return FindChartInAuthRepoURL(repoURL, "", "", chartName, chartVersion, certFile, keyFile, caFile, getters) +} + +// FindChartInAuthRepoURL finds chart in chart repository pointed by repoURL +// without adding repo to repositories, like FindChartInRepoURL, +// but it also receives credentials for the chart repository. +func FindChartInAuthRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile string, getters getter.Providers) (string, error) { + return FindChartInAuthAndTLSRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile, false, getters) +} + +// FindChartInAuthAndTLSRepoURL finds chart in chart repository pointed by repoURL +// without adding repo to repositories, like FindChartInRepoURL, +// but it also receives credentials and TLS verify flag for the chart repository. +// TODO Helm 4, FindChartInAuthAndTLSRepoURL should be integrated into FindChartInAuthRepoURL. +func FindChartInAuthAndTLSRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile string, insecureSkipTLSverify bool, getters getter.Providers) (string, error) { + return FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile, insecureSkipTLSverify, false, getters) +} + +// FindChartInAuthAndTLSAndPassRepoURL finds chart in chart repository pointed by repoURL +// without adding repo to repositories, like FindChartInRepoURL, +// but it also receives credentials, TLS verify flag, and if credentials should +// be passed on to other domains. +// TODO Helm 4, FindChartInAuthAndTLSAndPassRepoURL should be integrated into FindChartInAuthRepoURL. +func FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile string, insecureSkipTLSverify, passCredentialsAll bool, getters getter.Providers) (string, error) { + + // Download and write the index file to a temporary location + buf := make([]byte, 20) + rand.Read(buf) + name := strings.ReplaceAll(base64.StdEncoding.EncodeToString(buf), "/", "-") + + c := Entry{ + URL: repoURL, + Username: username, + Password: password, + PassCredentialsAll: passCredentialsAll, + CertFile: certFile, + KeyFile: keyFile, + CAFile: caFile, + Name: name, + InsecureSkipTLSverify: insecureSkipTLSverify, + } + r, err := NewChartRepository(&c, getters) + if err != nil { + return "", err + } + idx, err := r.DownloadIndexFile() + if err != nil { + return "", errors.Wrapf(err, "looks like %q is not a valid chart repository or cannot be reached", repoURL) + } + defer func() { + os.RemoveAll(filepath.Join(r.CachePath, helmpath.CacheChartsFile(r.Config.Name))) + os.RemoveAll(filepath.Join(r.CachePath, helmpath.CacheIndexFile(r.Config.Name))) + }() + + // Read the index file for the repository to get chart information and return chart URL + repoIndex, err := LoadIndexFile(idx) + if err != nil { + return "", err + } + + errMsg := fmt.Sprintf("chart %q", chartName) + if chartVersion != "" { + errMsg = fmt.Sprintf("%s version %q", errMsg, chartVersion) + } + cv, err := repoIndex.Get(chartName, chartVersion) + if err != nil { + return "", errors.Errorf("%s not found in %s repository", errMsg, repoURL) + } + + if len(cv.URLs) == 0 { + return "", errors.Errorf("%s has no downloadable URLs", errMsg) + } + + chartURL := cv.URLs[0] + + absoluteChartURL, err := ResolveReferenceURL(repoURL, chartURL) + if err != nil { + return "", errors.Wrap(err, "failed to make chart URL absolute") + } + + return absoluteChartURL, nil +} + +// ResolveReferenceURL resolves refURL relative to baseURL. +// If refURL is absolute, it simply returns refURL. +func ResolveReferenceURL(baseURL, refURL string) (string, error) { + parsedRefURL, err := url.Parse(refURL) + if err != nil { + return "", errors.Wrapf(err, "failed to parse %s as URL", refURL) + } + + if parsedRefURL.IsAbs() { + return refURL, nil + } + + parsedBaseURL, err := url.Parse(baseURL) + if err != nil { + return "", errors.Wrapf(err, "failed to parse %s as URL", baseURL) + } + + // We need a trailing slash for ResolveReference to work, but make sure there isn't already one + parsedBaseURL.RawPath = strings.TrimSuffix(parsedBaseURL.RawPath, "/") + "/" + parsedBaseURL.Path = strings.TrimSuffix(parsedBaseURL.Path, "/") + "/" + + resolvedURL := parsedBaseURL.ResolveReference(parsedRefURL) + resolvedURL.RawQuery = parsedBaseURL.RawQuery + return resolvedURL.String(), nil +} + +func (e *Entry) String() string { + buf, err := json.Marshal(e) + if err != nil { + log.Panic(err) + } + return string(buf) +} diff --git a/vendor/helm.sh/helm/v3/pkg/repo/doc.go b/vendor/helm.sh/helm/v3/pkg/repo/doc.go new file mode 100644 index 000000000..fc54bbf7a --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/repo/doc.go @@ -0,0 +1,94 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package repo implements the Helm Chart Repository. + +A chart repository is an HTTP server that provides information on charts. A local +repository cache is an on-disk representation of a chart repository. + +There are two important file formats for chart repositories. + +The first is the 'index.yaml' format, which is expressed like this: + + apiVersion: v1 + entries: + frobnitz: + - created: 2016-09-29T12:14:34.830161306-06:00 + description: This is a frobnitz. + digest: 587bd19a9bd9d2bc4a6d25ab91c8c8e7042c47b4ac246e37bf8e1e74386190f4 + home: http://example.com + keywords: + - frobnitz + - sprocket + - dodad + maintainers: + - email: helm@example.com + name: The Helm Team + - email: nobody@example.com + name: Someone Else + name: frobnitz + urls: + - http://example-charts.com/testdata/repository/frobnitz-1.2.3.tgz + version: 1.2.3 + sprocket: + - created: 2016-09-29T12:14:34.830507606-06:00 + description: This is a sprocket" + digest: 8505ff813c39502cc849a38e1e4a8ac24b8e6e1dcea88f4c34ad9b7439685ae6 + home: http://example.com + keywords: + - frobnitz + - sprocket + - dodad + maintainers: + - email: helm@example.com + name: The Helm Team + - email: nobody@example.com + name: Someone Else + name: sprocket + urls: + - http://example-charts.com/testdata/repository/sprocket-1.2.0.tgz + version: 1.2.0 + generated: 2016-09-29T12:14:34.829721375-06:00 + +An index.yaml file contains the necessary descriptive information about what +charts are available in a repository, and how to get them. + +The second file format is the repositories.yaml file format. This file is for +facilitating local cached copies of one or more chart repositories. + +The format of a repository.yaml file is: + + apiVersion: v1 + generated: TIMESTAMP + repositories: + - name: stable + url: http://example.com/charts + cache: stable-index.yaml + - name: incubator + url: http://example.com/incubator + cache: incubator-index.yaml + +This file maps three bits of information about a repository: + + - The name the user uses to refer to it + - The fully qualified URL to the repository (index.yaml will be appended) + - The name of the local cachefile + +The format for both files was changed after Helm v2.0.0-Alpha.4. Helm is not +backwards compatible with those earlier versions. +*/ +package repo diff --git a/vendor/helm.sh/helm/v3/pkg/repo/index.go b/vendor/helm.sh/helm/v3/pkg/repo/index.go new file mode 100644 index 000000000..e1ce3c62d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/repo/index.go @@ -0,0 +1,416 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package repo + +import ( + "bytes" + "encoding/json" + "log" + "os" + "path" + "path/filepath" + "sort" + "strings" + "time" + + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "helm.sh/helm/v3/internal/fileutil" + "helm.sh/helm/v3/internal/urlutil" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/provenance" +) + +var indexPath = "index.yaml" + +// APIVersionV1 is the v1 API version for index and repository files. +const APIVersionV1 = "v1" + +var ( + // ErrNoAPIVersion indicates that an API version was not specified. + ErrNoAPIVersion = errors.New("no API version specified") + // ErrNoChartVersion indicates that a chart with the given version is not found. + ErrNoChartVersion = errors.New("no chart version found") + // ErrNoChartName indicates that a chart with the given name is not found. + ErrNoChartName = errors.New("no chart name found") + // ErrEmptyIndexYaml indicates that the content of index.yaml is empty. + ErrEmptyIndexYaml = errors.New("empty index.yaml file") +) + +// ChartVersions is a list of versioned chart references. +// Implements a sorter on Version. +type ChartVersions []*ChartVersion + +// Len returns the length. +func (c ChartVersions) Len() int { return len(c) } + +// Swap swaps the position of two items in the versions slice. +func (c ChartVersions) Swap(i, j int) { c[i], c[j] = c[j], c[i] } + +// Less returns true if the version of entry a is less than the version of entry b. +func (c ChartVersions) Less(a, b int) bool { + // Failed parse pushes to the back. + i, err := semver.NewVersion(c[a].Version) + if err != nil { + return true + } + j, err := semver.NewVersion(c[b].Version) + if err != nil { + return false + } + return i.LessThan(j) +} + +// IndexFile represents the index file in a chart repository +type IndexFile struct { + // This is used ONLY for validation against chartmuseum's index files and is discarded after validation. + ServerInfo map[string]interface{} `json:"serverInfo,omitempty"` + APIVersion string `json:"apiVersion"` + Generated time.Time `json:"generated"` + Entries map[string]ChartVersions `json:"entries"` + PublicKeys []string `json:"publicKeys,omitempty"` + + // Annotations are additional mappings uninterpreted by Helm. They are made available for + // other applications to add information to the index file. + Annotations map[string]string `json:"annotations,omitempty"` +} + +// NewIndexFile initializes an index. +func NewIndexFile() *IndexFile { + return &IndexFile{ + APIVersion: APIVersionV1, + Generated: time.Now(), + Entries: map[string]ChartVersions{}, + PublicKeys: []string{}, + } +} + +// LoadIndexFile takes a file at the given path and returns an IndexFile object +func LoadIndexFile(path string) (*IndexFile, error) { + b, err := os.ReadFile(path) + if err != nil { + return nil, err + } + i, err := loadIndex(b, path) + if err != nil { + return nil, errors.Wrapf(err, "error loading %s", path) + } + return i, nil +} + +// MustAdd adds a file to the index +// This can leave the index in an unsorted state +func (i IndexFile) MustAdd(md *chart.Metadata, filename, baseURL, digest string) error { + if i.Entries == nil { + return errors.New("entries not initialized") + } + + if md.APIVersion == "" { + md.APIVersion = chart.APIVersionV1 + } + if err := md.Validate(); err != nil { + return errors.Wrapf(err, "validate failed for %s", filename) + } + + u := filename + if baseURL != "" { + _, file := filepath.Split(filename) + var err error + u, err = urlutil.URLJoin(baseURL, file) + if err != nil { + u = path.Join(baseURL, file) + } + } + cr := &ChartVersion{ + URLs: []string{u}, + Metadata: md, + Digest: digest, + Created: time.Now(), + } + ee := i.Entries[md.Name] + i.Entries[md.Name] = append(ee, cr) + return nil +} + +// Add adds a file to the index and logs an error. +// +// Deprecated: Use index.MustAdd instead. +func (i IndexFile) Add(md *chart.Metadata, filename, baseURL, digest string) { + if err := i.MustAdd(md, filename, baseURL, digest); err != nil { + log.Printf("skipping loading invalid entry for chart %q %q from %s: %s", md.Name, md.Version, filename, err) + } +} + +// Has returns true if the index has an entry for a chart with the given name and exact version. +func (i IndexFile) Has(name, version string) bool { + _, err := i.Get(name, version) + return err == nil +} + +// SortEntries sorts the entries by version in descending order. +// +// In canonical form, the individual version records should be sorted so that +// the most recent release for every version is in the 0th slot in the +// Entries.ChartVersions array. That way, tooling can predict the newest +// version without needing to parse SemVers. +func (i IndexFile) SortEntries() { + for _, versions := range i.Entries { + sort.Sort(sort.Reverse(versions)) + } +} + +// Get returns the ChartVersion for the given name. +// +// If version is empty, this will return the chart with the latest stable version, +// prerelease versions will be skipped. +func (i IndexFile) Get(name, version string) (*ChartVersion, error) { + vs, ok := i.Entries[name] + if !ok { + return nil, ErrNoChartName + } + if len(vs) == 0 { + return nil, ErrNoChartVersion + } + + var constraint *semver.Constraints + if version == "" { + constraint, _ = semver.NewConstraint("*") + } else { + var err error + constraint, err = semver.NewConstraint(version) + if err != nil { + return nil, err + } + } + + // when customer inputs specific version, check whether there's an exact match first + if len(version) != 0 { + for _, ver := range vs { + if version == ver.Version { + return ver, nil + } + } + } + + for _, ver := range vs { + test, err := semver.NewVersion(ver.Version) + if err != nil { + continue + } + + if constraint.Check(test) { + return ver, nil + } + } + return nil, errors.Errorf("no chart version found for %s-%s", name, version) +} + +// WriteFile writes an index file to the given destination path. +// +// The mode on the file is set to 'mode'. +func (i IndexFile) WriteFile(dest string, mode os.FileMode) error { + b, err := yaml.Marshal(i) + if err != nil { + return err + } + return fileutil.AtomicWriteFile(dest, bytes.NewReader(b), mode) +} + +// WriteJSONFile writes an index file in JSON format to the given destination +// path. +// +// The mode on the file is set to 'mode'. +func (i IndexFile) WriteJSONFile(dest string, mode os.FileMode) error { + b, err := json.MarshalIndent(i, "", " ") + if err != nil { + return err + } + return fileutil.AtomicWriteFile(dest, bytes.NewReader(b), mode) +} + +// Merge merges the given index file into this index. +// +// This merges by name and version. +// +// If one of the entries in the given index does _not_ already exist, it is added. +// In all other cases, the existing record is preserved. +// +// This can leave the index in an unsorted state +func (i *IndexFile) Merge(f *IndexFile) { + for _, cvs := range f.Entries { + for _, cv := range cvs { + if !i.Has(cv.Name, cv.Version) { + e := i.Entries[cv.Name] + i.Entries[cv.Name] = append(e, cv) + } + } + } +} + +// ChartVersion represents a chart entry in the IndexFile +type ChartVersion struct { + *chart.Metadata + URLs []string `json:"urls"` + Created time.Time `json:"created,omitempty"` + Removed bool `json:"removed,omitempty"` + Digest string `json:"digest,omitempty"` + + // ChecksumDeprecated is deprecated in Helm 3, and therefore ignored. Helm 3 replaced + // this with Digest. However, with a strict YAML parser enabled, a field must be + // present on the struct for backwards compatibility. + ChecksumDeprecated string `json:"checksum,omitempty"` + + // EngineDeprecated is deprecated in Helm 3, and therefore ignored. However, with a strict + // YAML parser enabled, this field must be present. + EngineDeprecated string `json:"engine,omitempty"` + + // TillerVersionDeprecated is deprecated in Helm 3, and therefore ignored. However, with a strict + // YAML parser enabled, this field must be present. + TillerVersionDeprecated string `json:"tillerVersion,omitempty"` + + // URLDeprecated is deprecated in Helm 3, superseded by URLs. It is ignored. However, + // with a strict YAML parser enabled, this must be present on the struct. + URLDeprecated string `json:"url,omitempty"` +} + +// IndexDirectory reads a (flat) directory and generates an index. +// +// It indexes only charts that have been packaged (*.tgz). +// +// The index returned will be in an unsorted state +func IndexDirectory(dir, baseURL string) (*IndexFile, error) { + archives, err := filepath.Glob(filepath.Join(dir, "*.tgz")) + if err != nil { + return nil, err + } + moreArchives, err := filepath.Glob(filepath.Join(dir, "**/*.tgz")) + if err != nil { + return nil, err + } + archives = append(archives, moreArchives...) + + index := NewIndexFile() + for _, arch := range archives { + fname, err := filepath.Rel(dir, arch) + if err != nil { + return index, err + } + + var parentDir string + parentDir, fname = filepath.Split(fname) + // filepath.Split appends an extra slash to the end of parentDir. We want to strip that out. + parentDir = strings.TrimSuffix(parentDir, string(os.PathSeparator)) + parentURL, err := urlutil.URLJoin(baseURL, parentDir) + if err != nil { + parentURL = path.Join(baseURL, parentDir) + } + + c, err := loader.Load(arch) + if err != nil { + // Assume this is not a chart. + continue + } + hash, err := provenance.DigestFile(arch) + if err != nil { + return index, err + } + if err := index.MustAdd(c.Metadata, fname, parentURL, hash); err != nil { + return index, errors.Wrapf(err, "failed adding to %s to index", fname) + } + } + return index, nil +} + +// loadIndex loads an index file and does minimal validity checking. +// +// The source parameter is only used for logging. +// This will fail if API Version is not set (ErrNoAPIVersion) or if the unmarshal fails. +func loadIndex(data []byte, source string) (*IndexFile, error) { + i := &IndexFile{} + + if len(data) == 0 { + return i, ErrEmptyIndexYaml + } + + if err := jsonOrYamlUnmarshal(data, i); err != nil { + return i, err + } + + for name, cvs := range i.Entries { + for idx := len(cvs) - 1; idx >= 0; idx-- { + if cvs[idx] == nil { + log.Printf("skipping loading invalid entry for chart %q from %s: empty entry", name, source) + continue + } + // When metadata section missing, initialize with no data + if cvs[idx].Metadata == nil { + cvs[idx].Metadata = &chart.Metadata{} + } + if cvs[idx].APIVersion == "" { + cvs[idx].APIVersion = chart.APIVersionV1 + } + if err := cvs[idx].Validate(); ignoreSkippableChartValidationError(err) != nil { + log.Printf("skipping loading invalid entry for chart %q %q from %s: %s", name, cvs[idx].Version, source, err) + cvs = append(cvs[:idx], cvs[idx+1:]...) + } + } + // adjust slice to only contain a set of valid versions + i.Entries[name] = cvs + } + i.SortEntries() + if i.APIVersion == "" { + return i, ErrNoAPIVersion + } + return i, nil +} + +// jsonOrYamlUnmarshal unmarshals the given byte slice containing JSON or YAML +// into the provided interface. +// +// It automatically detects whether the data is in JSON or YAML format by +// checking its validity as JSON. If the data is valid JSON, it will use the +// `encoding/json` package to unmarshal it. Otherwise, it will use the +// `sigs.k8s.io/yaml` package to unmarshal the YAML data. +func jsonOrYamlUnmarshal(b []byte, i interface{}) error { + if json.Valid(b) { + return json.Unmarshal(b, i) + } + return yaml.UnmarshalStrict(b, i) +} + +// ignoreSkippableChartValidationError inspect the given error and returns nil if +// the error isn't important for index loading +// +// In particular, charts may introduce validations that don't impact repository indexes +// And repository indexes may be generated by older/non-compliant software, which doesn't +// conform to all validations. +func ignoreSkippableChartValidationError(err error) error { + verr, ok := err.(chart.ValidationError) + if !ok { + return err + } + + // https://github.com/helm/helm/issues/12748 (JFrog repository strips alias field) + if strings.HasPrefix(verr.Error(), "validation: more than one dependency with name or alias") { + return nil + } + + return err +} diff --git a/vendor/helm.sh/helm/v3/pkg/repo/repo.go b/vendor/helm.sh/helm/v3/pkg/repo/repo.go new file mode 100644 index 000000000..834d554bd --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/repo/repo.go @@ -0,0 +1,125 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package repo // import "helm.sh/helm/v3/pkg/repo" + +import ( + "os" + "path/filepath" + "time" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" +) + +// File represents the repositories.yaml file +type File struct { + APIVersion string `json:"apiVersion"` + Generated time.Time `json:"generated"` + Repositories []*Entry `json:"repositories"` +} + +// NewFile generates an empty repositories file. +// +// Generated and APIVersion are automatically set. +func NewFile() *File { + return &File{ + APIVersion: APIVersionV1, + Generated: time.Now(), + Repositories: []*Entry{}, + } +} + +// LoadFile takes a file at the given path and returns a File object +func LoadFile(path string) (*File, error) { + r := new(File) + b, err := os.ReadFile(path) + if err != nil { + return r, errors.Wrapf(err, "couldn't load repositories file (%s)", path) + } + + err = yaml.Unmarshal(b, r) + return r, err +} + +// Add adds one or more repo entries to a repo file. +func (r *File) Add(re ...*Entry) { + r.Repositories = append(r.Repositories, re...) +} + +// Update attempts to replace one or more repo entries in a repo file. If an +// entry with the same name doesn't exist in the repo file it will add it. +func (r *File) Update(re ...*Entry) { + for _, target := range re { + r.update(target) + } +} + +func (r *File) update(e *Entry) { + for j, repo := range r.Repositories { + if repo.Name == e.Name { + r.Repositories[j] = e + return + } + } + r.Add(e) +} + +// Has returns true if the given name is already a repository name. +func (r *File) Has(name string) bool { + entry := r.Get(name) + return entry != nil +} + +// Get returns an entry with the given name if it exists, otherwise returns nil +func (r *File) Get(name string) *Entry { + for _, entry := range r.Repositories { + if entry.Name == name { + return entry + } + } + return nil +} + +// Remove removes the entry from the list of repositories. +func (r *File) Remove(name string) bool { + cp := []*Entry{} + found := false + for _, rf := range r.Repositories { + if rf == nil { + continue + } + if rf.Name == name { + found = true + continue + } + cp = append(cp, rf) + } + r.Repositories = cp + return found +} + +// WriteFile writes a repositories file to the given path. +func (r *File) WriteFile(path string, perm os.FileMode) error { + data, err := yaml.Marshal(r) + if err != nil { + return err + } + if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil { + return err + } + return os.WriteFile(path, data, perm) +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/cfgmaps.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/cfgmaps.go new file mode 100644 index 000000000..5fd64ea59 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/cfgmaps.go @@ -0,0 +1,263 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver // import "helm.sh/helm/v3/pkg/storage/driver" + +import ( + "context" + "strconv" + "strings" + "time" + + "github.com/pkg/errors" + v1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kblabels "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/validation" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + + rspb "helm.sh/helm/v3/pkg/release" +) + +var _ Driver = (*ConfigMaps)(nil) + +// ConfigMapsDriverName is the string name of the driver. +const ConfigMapsDriverName = "ConfigMap" + +// ConfigMaps is a wrapper around an implementation of a kubernetes +// ConfigMapsInterface. +type ConfigMaps struct { + impl corev1.ConfigMapInterface + Log func(string, ...interface{}) +} + +// NewConfigMaps initializes a new ConfigMaps wrapping an implementation of +// the kubernetes ConfigMapsInterface. +func NewConfigMaps(impl corev1.ConfigMapInterface) *ConfigMaps { + return &ConfigMaps{ + impl: impl, + Log: func(_ string, _ ...interface{}) {}, + } +} + +// Name returns the name of the driver. +func (cfgmaps *ConfigMaps) Name() string { + return ConfigMapsDriverName +} + +// Get fetches the release named by key. The corresponding release is returned +// or error if not found. +func (cfgmaps *ConfigMaps) Get(key string) (*rspb.Release, error) { + // fetch the configmap holding the release named by key + obj, err := cfgmaps.impl.Get(context.Background(), key, metav1.GetOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + return nil, ErrReleaseNotFound + } + + cfgmaps.Log("get: failed to get %q: %s", key, err) + return nil, err + } + // found the configmap, decode the base64 data string + r, err := decodeRelease(obj.Data["release"]) + if err != nil { + cfgmaps.Log("get: failed to decode data %q: %s", key, err) + return nil, err + } + r.Labels = filterSystemLabels(obj.ObjectMeta.Labels) + // return the release object + return r, nil +} + +// List fetches all releases and returns the list releases such +// that filter(release) == true. An error is returned if the +// configmap fails to retrieve the releases. +func (cfgmaps *ConfigMaps) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { + lsel := kblabels.Set{"owner": "helm"}.AsSelector() + opts := metav1.ListOptions{LabelSelector: lsel.String()} + + list, err := cfgmaps.impl.List(context.Background(), opts) + if err != nil { + cfgmaps.Log("list: failed to list: %s", err) + return nil, err + } + + var results []*rspb.Release + + // iterate over the configmaps object list + // and decode each release + for _, item := range list.Items { + rls, err := decodeRelease(item.Data["release"]) + if err != nil { + cfgmaps.Log("list: failed to decode release: %v: %s", item, err) + continue + } + + rls.Labels = item.ObjectMeta.Labels + + if filter(rls) { + results = append(results, rls) + } + } + return results, nil +} + +// Query fetches all releases that match the provided map of labels. +// An error is returned if the configmap fails to retrieve the releases. +func (cfgmaps *ConfigMaps) Query(labels map[string]string) ([]*rspb.Release, error) { + ls := kblabels.Set{} + for k, v := range labels { + if errs := validation.IsValidLabelValue(v); len(errs) != 0 { + return nil, errors.Errorf("invalid label value: %q: %s", v, strings.Join(errs, "; ")) + } + ls[k] = v + } + + opts := metav1.ListOptions{LabelSelector: ls.AsSelector().String()} + + list, err := cfgmaps.impl.List(context.Background(), opts) + if err != nil { + cfgmaps.Log("query: failed to query with labels: %s", err) + return nil, err + } + + if len(list.Items) == 0 { + return nil, ErrReleaseNotFound + } + + var results []*rspb.Release + for _, item := range list.Items { + rls, err := decodeRelease(item.Data["release"]) + if err != nil { + cfgmaps.Log("query: failed to decode release: %s", err) + continue + } + rls.Labels = item.ObjectMeta.Labels + results = append(results, rls) + } + return results, nil +} + +// Create creates a new ConfigMap holding the release. If the +// ConfigMap already exists, ErrReleaseExists is returned. +func (cfgmaps *ConfigMaps) Create(key string, rls *rspb.Release) error { + // set labels for configmaps object meta data + var lbs labels + + lbs.init() + lbs.fromMap(rls.Labels) + lbs.set("createdAt", strconv.Itoa(int(time.Now().Unix()))) + + // create a new configmap to hold the release + obj, err := newConfigMapsObject(key, rls, lbs) + if err != nil { + cfgmaps.Log("create: failed to encode release %q: %s", rls.Name, err) + return err + } + // push the configmap object out into the kubiverse + if _, err := cfgmaps.impl.Create(context.Background(), obj, metav1.CreateOptions{}); err != nil { + if apierrors.IsAlreadyExists(err) { + return ErrReleaseExists + } + + cfgmaps.Log("create: failed to create: %s", err) + return err + } + return nil +} + +// Update updates the ConfigMap holding the release. If not found +// the ConfigMap is created to hold the release. +func (cfgmaps *ConfigMaps) Update(key string, rls *rspb.Release) error { + // set labels for configmaps object meta data + var lbs labels + + lbs.init() + lbs.fromMap(rls.Labels) + lbs.set("modifiedAt", strconv.Itoa(int(time.Now().Unix()))) + + // create a new configmap object to hold the release + obj, err := newConfigMapsObject(key, rls, lbs) + if err != nil { + cfgmaps.Log("update: failed to encode release %q: %s", rls.Name, err) + return err + } + // push the configmap object out into the kubiverse + _, err = cfgmaps.impl.Update(context.Background(), obj, metav1.UpdateOptions{}) + if err != nil { + cfgmaps.Log("update: failed to update: %s", err) + return err + } + return nil +} + +// Delete deletes the ConfigMap holding the release named by key. +func (cfgmaps *ConfigMaps) Delete(key string) (rls *rspb.Release, err error) { + // fetch the release to check existence + if rls, err = cfgmaps.Get(key); err != nil { + return nil, err + } + // delete the release + if err = cfgmaps.impl.Delete(context.Background(), key, metav1.DeleteOptions{}); err != nil { + return rls, err + } + return rls, nil +} + +// newConfigMapsObject constructs a kubernetes ConfigMap object +// to store a release. Each configmap data entry is the base64 +// encoded gzipped string of a release. +// +// The following labels are used within each configmap: +// +// "modifiedAt" - timestamp indicating when this configmap was last modified. (set in Update) +// "createdAt" - timestamp indicating when this configmap was created. (set in Create) +// "version" - version of the release. +// "status" - status of the release (see pkg/release/status.go for variants) +// "owner" - owner of the configmap, currently "helm". +// "name" - name of the release. +func newConfigMapsObject(key string, rls *rspb.Release, lbs labels) (*v1.ConfigMap, error) { + const owner = "helm" + + // encode the release + s, err := encodeRelease(rls) + if err != nil { + return nil, err + } + + if lbs == nil { + lbs.init() + } + + // apply custom labels + lbs.fromMap(rls.Labels) + + // apply labels + lbs.set("name", rls.Name) + lbs.set("owner", owner) + lbs.set("status", rls.Info.Status.String()) + lbs.set("version", strconv.Itoa(rls.Version)) + + // create and return configmap object + return &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: key, + Labels: lbs.toMap(), + }, + Data: map[string]string{"release": s}, + }, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/driver.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/driver.go new file mode 100644 index 000000000..9c01f3766 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/driver.go @@ -0,0 +1,105 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver // import "helm.sh/helm/v3/pkg/storage/driver" + +import ( + "fmt" + + "github.com/pkg/errors" + + rspb "helm.sh/helm/v3/pkg/release" +) + +var ( + // ErrReleaseNotFound indicates that a release is not found. + ErrReleaseNotFound = errors.New("release: not found") + // ErrReleaseExists indicates that a release already exists. + ErrReleaseExists = errors.New("release: already exists") + // ErrInvalidKey indicates that a release key could not be parsed. + ErrInvalidKey = errors.New("release: invalid key") + // ErrNoDeployedReleases indicates that there are no releases with the given key in the deployed state + ErrNoDeployedReleases = errors.New("has no deployed releases") +) + +// StorageDriverError records an error and the release name that caused it +type StorageDriverError struct { + ReleaseName string + Err error +} + +func (e *StorageDriverError) Error() string { + return fmt.Sprintf("%q %s", e.ReleaseName, e.Err.Error()) +} + +func (e *StorageDriverError) Unwrap() error { return e.Err } + +func NewErrNoDeployedReleases(releaseName string) error { + return &StorageDriverError{ + ReleaseName: releaseName, + Err: ErrNoDeployedReleases, + } +} + +// Creator is the interface that wraps the Create method. +// +// Create stores the release or returns ErrReleaseExists +// if an identical release already exists. +type Creator interface { + Create(key string, rls *rspb.Release) error +} + +// Updator is the interface that wraps the Update method. +// +// Update updates an existing release or returns +// ErrReleaseNotFound if the release does not exist. +type Updator interface { + Update(key string, rls *rspb.Release) error +} + +// Deletor is the interface that wraps the Delete method. +// +// Delete deletes the release named by key or returns +// ErrReleaseNotFound if the release does not exist. +type Deletor interface { + Delete(key string) (*rspb.Release, error) +} + +// Queryor is the interface that wraps the Get and List methods. +// +// Get returns the release named by key or returns ErrReleaseNotFound +// if the release does not exist. +// +// List returns the set of all releases that satisfy the filter predicate. +// +// Query returns the set of all releases that match the provided label set. +type Queryor interface { + Get(key string) (*rspb.Release, error) + List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) + Query(labels map[string]string) ([]*rspb.Release, error) +} + +// Driver is the interface composed of Creator, Updator, Deletor, and Queryor +// interfaces. It defines the behavior for storing, updating, deleted, +// and retrieving Helm releases from some underlying storage mechanism, +// e.g. memory, configmaps. +type Driver interface { + Creator + Updator + Deletor + Queryor + Name() string +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/labels.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/labels.go new file mode 100644 index 000000000..eb7118fe5 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/labels.go @@ -0,0 +1,48 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver + +// labels is a map of key value pairs to be included as metadata in a configmap object. +type labels map[string]string + +func (lbs *labels) init() { *lbs = labels(make(map[string]string)) } +func (lbs labels) get(key string) string { return lbs[key] } +func (lbs labels) set(key, val string) { lbs[key] = val } + +func (lbs labels) keys() (ls []string) { + for key := range lbs { + ls = append(ls, key) + } + return +} + +func (lbs labels) match(set labels) bool { + for _, key := range set.keys() { + if lbs.get(key) != set.get(key) { + return false + } + } + return true +} + +func (lbs labels) toMap() map[string]string { return lbs } + +func (lbs *labels) fromMap(kvs map[string]string) { + for k, v := range kvs { + lbs.set(k, v) + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/memory.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/memory.go new file mode 100644 index 000000000..91378f588 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/memory.go @@ -0,0 +1,240 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver + +import ( + "strconv" + "strings" + "sync" + + rspb "helm.sh/helm/v3/pkg/release" +) + +var _ Driver = (*Memory)(nil) + +const ( + // MemoryDriverName is the string name of this driver. + MemoryDriverName = "Memory" + + defaultNamespace = "default" +) + +// A map of release names to list of release records +type memReleases map[string]records + +// Memory is the in-memory storage driver implementation. +type Memory struct { + sync.RWMutex + namespace string + // A map of namespaces to releases + cache map[string]memReleases +} + +// NewMemory initializes a new memory driver. +func NewMemory() *Memory { + return &Memory{cache: map[string]memReleases{}, namespace: "default"} +} + +// SetNamespace sets a specific namespace in which releases will be accessed. +// An empty string indicates all namespaces (for the list operation) +func (mem *Memory) SetNamespace(ns string) { + mem.namespace = ns +} + +// Name returns the name of the driver. +func (mem *Memory) Name() string { + return MemoryDriverName +} + +// Get returns the release named by key or returns ErrReleaseNotFound. +func (mem *Memory) Get(key string) (*rspb.Release, error) { + defer unlock(mem.rlock()) + + keyWithoutPrefix := strings.TrimPrefix(key, "sh.helm.release.v1.") + switch elems := strings.Split(keyWithoutPrefix, ".v"); len(elems) { + case 2: + name, ver := elems[0], elems[1] + if _, err := strconv.Atoi(ver); err != nil { + return nil, ErrInvalidKey + } + if recs, ok := mem.cache[mem.namespace][name]; ok { + if r := recs.Get(key); r != nil { + return r.rls, nil + } + } + return nil, ErrReleaseNotFound + default: + return nil, ErrInvalidKey + } +} + +// List returns the list of all releases such that filter(release) == true +func (mem *Memory) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { + defer unlock(mem.rlock()) + + var ls []*rspb.Release + for namespace := range mem.cache { + if mem.namespace != "" { + // Should only list releases of this namespace + namespace = mem.namespace + } + for _, recs := range mem.cache[namespace] { + recs.Iter(func(_ int, rec *record) bool { + if filter(rec.rls) { + ls = append(ls, rec.rls) + } + return true + }) + } + if mem.namespace != "" { + // Should only list releases of this namespace + break + } + } + return ls, nil +} + +// Query returns the set of releases that match the provided set of labels +func (mem *Memory) Query(keyvals map[string]string) ([]*rspb.Release, error) { + defer unlock(mem.rlock()) + + var lbs labels + + lbs.init() + lbs.fromMap(keyvals) + + var ls []*rspb.Release + for namespace := range mem.cache { + if mem.namespace != "" { + // Should only query releases of this namespace + namespace = mem.namespace + } + for _, recs := range mem.cache[namespace] { + recs.Iter(func(_ int, rec *record) bool { + // A query for a release name that doesn't exist (has been deleted) + // can cause rec to be nil. + if rec == nil { + return false + } + if rec.lbs.match(lbs) { + ls = append(ls, rec.rls) + } + return true + }) + } + if mem.namespace != "" { + // Should only query releases of this namespace + break + } + } + + if len(ls) == 0 { + return nil, ErrReleaseNotFound + } + + return ls, nil +} + +// Create creates a new release or returns ErrReleaseExists. +func (mem *Memory) Create(key string, rls *rspb.Release) error { + defer unlock(mem.wlock()) + + // For backwards compatibility, we protect against an unset namespace + namespace := rls.Namespace + if namespace == "" { + namespace = defaultNamespace + } + mem.SetNamespace(namespace) + + if _, ok := mem.cache[namespace]; !ok { + mem.cache[namespace] = memReleases{} + } + + if recs, ok := mem.cache[namespace][rls.Name]; ok { + if err := recs.Add(newRecord(key, rls)); err != nil { + return err + } + mem.cache[namespace][rls.Name] = recs + return nil + } + mem.cache[namespace][rls.Name] = records{newRecord(key, rls)} + return nil +} + +// Update updates a release or returns ErrReleaseNotFound. +func (mem *Memory) Update(key string, rls *rspb.Release) error { + defer unlock(mem.wlock()) + + // For backwards compatibility, we protect against an unset namespace + namespace := rls.Namespace + if namespace == "" { + namespace = defaultNamespace + } + mem.SetNamespace(namespace) + + if _, ok := mem.cache[namespace]; ok { + if rs, ok := mem.cache[namespace][rls.Name]; ok && rs.Exists(key) { + rs.Replace(key, newRecord(key, rls)) + return nil + } + } + return ErrReleaseNotFound +} + +// Delete deletes a release or returns ErrReleaseNotFound. +func (mem *Memory) Delete(key string) (*rspb.Release, error) { + defer unlock(mem.wlock()) + + keyWithoutPrefix := strings.TrimPrefix(key, "sh.helm.release.v1.") + elems := strings.Split(keyWithoutPrefix, ".v") + + if len(elems) != 2 { + return nil, ErrInvalidKey + } + + name, ver := elems[0], elems[1] + if _, err := strconv.Atoi(ver); err != nil { + return nil, ErrInvalidKey + } + if _, ok := mem.cache[mem.namespace]; ok { + if recs, ok := mem.cache[mem.namespace][name]; ok { + if r := recs.Remove(key); r != nil { + // recs.Remove changes the slice reference, so we have to re-assign it. + mem.cache[mem.namespace][name] = recs + return r.rls, nil + } + } + } + return nil, ErrReleaseNotFound +} + +// wlock locks mem for writing +func (mem *Memory) wlock() func() { + mem.Lock() + return func() { mem.Unlock() } +} + +// rlock locks mem for reading +func (mem *Memory) rlock() func() { + mem.RLock() + return func() { mem.RUnlock() } +} + +// unlock calls fn which reverses a mem.rlock or mem.wlock. e.g: +// ```defer unlock(mem.rlock())```, locks mem for reading at the +// call point of defer and unlocks upon exiting the block. +func unlock(fn func()) { fn() } diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/records.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/records.go new file mode 100644 index 000000000..9df173384 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/records.go @@ -0,0 +1,124 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver // import "helm.sh/helm/v3/pkg/storage/driver" + +import ( + "sort" + "strconv" + + rspb "helm.sh/helm/v3/pkg/release" +) + +// records holds a list of in-memory release records +type records []*record + +func (rs records) Len() int { return len(rs) } +func (rs records) Swap(i, j int) { rs[i], rs[j] = rs[j], rs[i] } +func (rs records) Less(i, j int) bool { return rs[i].rls.Version < rs[j].rls.Version } + +func (rs *records) Add(r *record) error { + if r == nil { + return nil + } + + if rs.Exists(r.key) { + return ErrReleaseExists + } + + *rs = append(*rs, r) + sort.Sort(*rs) + + return nil +} + +func (rs records) Get(key string) *record { + if i, ok := rs.Index(key); ok { + return rs[i] + } + return nil +} + +func (rs *records) Iter(fn func(int, *record) bool) { + cp := make([]*record, len(*rs)) + copy(cp, *rs) + + for i, r := range cp { + if !fn(i, r) { + return + } + } +} + +func (rs *records) Index(key string) (int, bool) { + for i, r := range *rs { + if r.key == key { + return i, true + } + } + return -1, false +} + +func (rs records) Exists(key string) bool { + _, ok := rs.Index(key) + return ok +} + +func (rs *records) Remove(key string) (r *record) { + if i, ok := rs.Index(key); ok { + return rs.removeAt(i) + } + return nil +} + +func (rs *records) Replace(key string, rec *record) *record { + if i, ok := rs.Index(key); ok { + old := (*rs)[i] + (*rs)[i] = rec + return old + } + return nil +} + +func (rs *records) removeAt(index int) *record { + r := (*rs)[index] + (*rs)[index] = nil + copy((*rs)[index:], (*rs)[index+1:]) + *rs = (*rs)[:len(*rs)-1] + return r +} + +// record is the data structure used to cache releases +// for the in-memory storage driver +type record struct { + key string + lbs labels + rls *rspb.Release +} + +// newRecord creates a new in-memory release record +func newRecord(key string, rls *rspb.Release) *record { + var lbs labels + + lbs.init() + lbs.set("name", rls.Name) + lbs.set("owner", "helm") + lbs.set("status", rls.Info.Status.String()) + lbs.set("version", strconv.Itoa(rls.Version)) + + // return &record{key: key, lbs: lbs, rls: proto.Clone(rls).(*rspb.Release)} + return &record{key: key, lbs: lbs, rls: rls} +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/secrets.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/secrets.go new file mode 100644 index 000000000..9c2f805f2 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/secrets.go @@ -0,0 +1,256 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver // import "helm.sh/helm/v3/pkg/storage/driver" + +import ( + "context" + "strconv" + "strings" + "time" + + "github.com/pkg/errors" + v1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kblabels "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/validation" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + + rspb "helm.sh/helm/v3/pkg/release" +) + +var _ Driver = (*Secrets)(nil) + +// SecretsDriverName is the string name of the driver. +const SecretsDriverName = "Secret" + +// Secrets is a wrapper around an implementation of a kubernetes +// SecretsInterface. +type Secrets struct { + impl corev1.SecretInterface + Log func(string, ...interface{}) +} + +// NewSecrets initializes a new Secrets wrapping an implementation of +// the kubernetes SecretsInterface. +func NewSecrets(impl corev1.SecretInterface) *Secrets { + return &Secrets{ + impl: impl, + Log: func(_ string, _ ...interface{}) {}, + } +} + +// Name returns the name of the driver. +func (secrets *Secrets) Name() string { + return SecretsDriverName +} + +// Get fetches the release named by key. The corresponding release is returned +// or error if not found. +func (secrets *Secrets) Get(key string) (*rspb.Release, error) { + // fetch the secret holding the release named by key + obj, err := secrets.impl.Get(context.Background(), key, metav1.GetOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + return nil, ErrReleaseNotFound + } + return nil, errors.Wrapf(err, "get: failed to get %q", key) + } + // found the secret, decode the base64 data string + r, err := decodeRelease(string(obj.Data["release"])) + r.Labels = filterSystemLabels(obj.ObjectMeta.Labels) + return r, errors.Wrapf(err, "get: failed to decode data %q", key) +} + +// List fetches all releases and returns the list releases such +// that filter(release) == true. An error is returned if the +// secret fails to retrieve the releases. +func (secrets *Secrets) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { + lsel := kblabels.Set{"owner": "helm"}.AsSelector() + opts := metav1.ListOptions{LabelSelector: lsel.String()} + + list, err := secrets.impl.List(context.Background(), opts) + if err != nil { + return nil, errors.Wrap(err, "list: failed to list") + } + + var results []*rspb.Release + + // iterate over the secrets object list + // and decode each release + for _, item := range list.Items { + rls, err := decodeRelease(string(item.Data["release"])) + if err != nil { + secrets.Log("list: failed to decode release: %v: %s", item, err) + continue + } + + rls.Labels = item.ObjectMeta.Labels + + if filter(rls) { + results = append(results, rls) + } + } + return results, nil +} + +// Query fetches all releases that match the provided map of labels. +// An error is returned if the secret fails to retrieve the releases. +func (secrets *Secrets) Query(labels map[string]string) ([]*rspb.Release, error) { + ls := kblabels.Set{} + for k, v := range labels { + if errs := validation.IsValidLabelValue(v); len(errs) != 0 { + return nil, errors.Errorf("invalid label value: %q: %s", v, strings.Join(errs, "; ")) + } + ls[k] = v + } + + opts := metav1.ListOptions{LabelSelector: ls.AsSelector().String()} + + list, err := secrets.impl.List(context.Background(), opts) + if err != nil { + return nil, errors.Wrap(err, "query: failed to query with labels") + } + + if len(list.Items) == 0 { + return nil, ErrReleaseNotFound + } + + var results []*rspb.Release + for _, item := range list.Items { + rls, err := decodeRelease(string(item.Data["release"])) + if err != nil { + secrets.Log("query: failed to decode release: %s", err) + continue + } + rls.Labels = item.ObjectMeta.Labels + results = append(results, rls) + } + return results, nil +} + +// Create creates a new Secret holding the release. If the +// Secret already exists, ErrReleaseExists is returned. +func (secrets *Secrets) Create(key string, rls *rspb.Release) error { + // set labels for secrets object meta data + var lbs labels + + lbs.init() + lbs.fromMap(rls.Labels) + lbs.set("createdAt", strconv.Itoa(int(time.Now().Unix()))) + + // create a new secret to hold the release + obj, err := newSecretsObject(key, rls, lbs) + if err != nil { + return errors.Wrapf(err, "create: failed to encode release %q", rls.Name) + } + // push the secret object out into the kubiverse + if _, err := secrets.impl.Create(context.Background(), obj, metav1.CreateOptions{}); err != nil { + if apierrors.IsAlreadyExists(err) { + return ErrReleaseExists + } + + return errors.Wrap(err, "create: failed to create") + } + return nil +} + +// Update updates the Secret holding the release. If not found +// the Secret is created to hold the release. +func (secrets *Secrets) Update(key string, rls *rspb.Release) error { + // set labels for secrets object meta data + var lbs labels + + lbs.init() + lbs.fromMap(rls.Labels) + lbs.set("modifiedAt", strconv.Itoa(int(time.Now().Unix()))) + + // create a new secret object to hold the release + obj, err := newSecretsObject(key, rls, lbs) + if err != nil { + return errors.Wrapf(err, "update: failed to encode release %q", rls.Name) + } + // push the secret object out into the kubiverse + _, err = secrets.impl.Update(context.Background(), obj, metav1.UpdateOptions{}) + return errors.Wrap(err, "update: failed to update") +} + +// Delete deletes the Secret holding the release named by key. +func (secrets *Secrets) Delete(key string) (rls *rspb.Release, err error) { + // fetch the release to check existence + if rls, err = secrets.Get(key); err != nil { + return nil, err + } + // delete the release + err = secrets.impl.Delete(context.Background(), key, metav1.DeleteOptions{}) + return rls, err +} + +// newSecretsObject constructs a kubernetes Secret object +// to store a release. Each secret data entry is the base64 +// encoded gzipped string of a release. +// +// The following labels are used within each secret: +// +// "modifiedAt" - timestamp indicating when this secret was last modified. (set in Update) +// "createdAt" - timestamp indicating when this secret was created. (set in Create) +// "version" - version of the release. +// "status" - status of the release (see pkg/release/status.go for variants) +// "owner" - owner of the secret, currently "helm". +// "name" - name of the release. +func newSecretsObject(key string, rls *rspb.Release, lbs labels) (*v1.Secret, error) { + const owner = "helm" + + // encode the release + s, err := encodeRelease(rls) + if err != nil { + return nil, err + } + + if lbs == nil { + lbs.init() + } + + // apply custom labels + lbs.fromMap(rls.Labels) + + // apply labels + lbs.set("name", rls.Name) + lbs.set("owner", owner) + lbs.set("status", rls.Info.Status.String()) + lbs.set("version", strconv.Itoa(rls.Version)) + + // create and return secret object. + // Helm 3 introduced setting the 'Type' field + // in the Kubernetes storage object. + // Helm defines the field content as follows: + // <helm_domain>/<helm_object>.v<helm_object_version> + // Type field for Helm 3: helm.sh/release.v1 + // Note: Version starts at 'v1' for Helm 3 and + // should be incremented if the release object + // metadata is modified. + // This would potentially be a breaking change + // and should only happen between major versions. + return &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: key, + Labels: lbs.toMap(), + }, + Type: "helm.sh/release.v1", + Data: map[string][]byte{"release": []byte(s)}, + }, nil +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/sql.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/sql.go new file mode 100644 index 000000000..33bde9b6a --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/sql.go @@ -0,0 +1,697 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver // import "helm.sh/helm/v3/pkg/storage/driver" + +import ( + "fmt" + "sort" + "strconv" + "time" + + "github.com/jmoiron/sqlx" + migrate "github.com/rubenv/sql-migrate" + + sq "github.com/Masterminds/squirrel" + + // Import pq for postgres dialect + _ "github.com/lib/pq" + + rspb "helm.sh/helm/v3/pkg/release" +) + +var _ Driver = (*SQL)(nil) + +var labelMap = map[string]struct{}{ + "modifiedAt": {}, + "createdAt": {}, + "version": {}, + "status": {}, + "owner": {}, + "name": {}, +} + +const postgreSQLDialect = "postgres" + +// SQLDriverName is the string name of this driver. +const SQLDriverName = "SQL" + +const sqlReleaseTableName = "releases_v1" +const sqlCustomLabelsTableName = "custom_labels_v1" + +const ( + sqlReleaseTableKeyColumn = "key" + sqlReleaseTableTypeColumn = "type" + sqlReleaseTableBodyColumn = "body" + sqlReleaseTableNameColumn = "name" + sqlReleaseTableNamespaceColumn = "namespace" + sqlReleaseTableVersionColumn = "version" + sqlReleaseTableStatusColumn = "status" + sqlReleaseTableOwnerColumn = "owner" + sqlReleaseTableCreatedAtColumn = "createdAt" + sqlReleaseTableModifiedAtColumn = "modifiedAt" + + sqlCustomLabelsTableReleaseKeyColumn = "releaseKey" + sqlCustomLabelsTableReleaseNamespaceColumn = "releaseNamespace" + sqlCustomLabelsTableKeyColumn = "key" + sqlCustomLabelsTableValueColumn = "value" +) + +// Following limits based on k8s labels limits - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set +const ( + sqlCustomLabelsTableKeyMaxLength = 253 + 1 + 63 + sqlCustomLabelsTableValueMaxLength = 63 +) + +const ( + sqlReleaseDefaultOwner = "helm" + sqlReleaseDefaultType = "helm.sh/release.v1" +) + +// SQL is the sql storage driver implementation. +type SQL struct { + db *sqlx.DB + namespace string + statementBuilder sq.StatementBuilderType + + Log func(string, ...interface{}) +} + +// Name returns the name of the driver. +func (s *SQL) Name() string { + return SQLDriverName +} + +// Check if all migrations al +func (s *SQL) checkAlreadyApplied(migrations []*migrate.Migration) bool { + // make map (set) of ids for fast search + migrationsIDs := make(map[string]struct{}) + for _, migration := range migrations { + migrationsIDs[migration.Id] = struct{}{} + } + + // get list of applied migrations + migrate.SetDisableCreateTable(true) + records, err := migrate.GetMigrationRecords(s.db.DB, postgreSQLDialect) + migrate.SetDisableCreateTable(false) + if err != nil { + s.Log("checkAlreadyApplied: failed to get migration records: %v", err) + return false + } + + for _, record := range records { + if _, ok := migrationsIDs[record.Id]; ok { + s.Log("checkAlreadyApplied: found previous migration (Id: %v) applied at %v", record.Id, record.AppliedAt) + delete(migrationsIDs, record.Id) + } + } + + // check if all migrations applied + if len(migrationsIDs) != 0 { + for id := range migrationsIDs { + s.Log("checkAlreadyApplied: find unapplied migration (id: %v)", id) + } + return false + } + return true +} + +func (s *SQL) ensureDBSetup() error { + + migrations := &migrate.MemoryMigrationSource{ + Migrations: []*migrate.Migration{ + { + Id: "init", + Up: []string{ + fmt.Sprintf(` + CREATE TABLE %s ( + %s VARCHAR(90), + %s VARCHAR(64) NOT NULL, + %s TEXT NOT NULL, + %s VARCHAR(64) NOT NULL, + %s VARCHAR(64) NOT NULL, + %s INTEGER NOT NULL, + %s TEXT NOT NULL, + %s TEXT NOT NULL, + %s INTEGER NOT NULL, + %s INTEGER NOT NULL DEFAULT 0, + PRIMARY KEY(%s, %s) + ); + CREATE INDEX ON %s (%s, %s); + CREATE INDEX ON %s (%s); + CREATE INDEX ON %s (%s); + CREATE INDEX ON %s (%s); + CREATE INDEX ON %s (%s); + CREATE INDEX ON %s (%s); + + GRANT ALL ON %s TO PUBLIC; + + ALTER TABLE %s ENABLE ROW LEVEL SECURITY; + `, + sqlReleaseTableName, + sqlReleaseTableKeyColumn, + sqlReleaseTableTypeColumn, + sqlReleaseTableBodyColumn, + sqlReleaseTableNameColumn, + sqlReleaseTableNamespaceColumn, + sqlReleaseTableVersionColumn, + sqlReleaseTableStatusColumn, + sqlReleaseTableOwnerColumn, + sqlReleaseTableCreatedAtColumn, + sqlReleaseTableModifiedAtColumn, + sqlReleaseTableKeyColumn, + sqlReleaseTableNamespaceColumn, + sqlReleaseTableName, + sqlReleaseTableKeyColumn, + sqlReleaseTableNamespaceColumn, + sqlReleaseTableName, + sqlReleaseTableVersionColumn, + sqlReleaseTableName, + sqlReleaseTableStatusColumn, + sqlReleaseTableName, + sqlReleaseTableOwnerColumn, + sqlReleaseTableName, + sqlReleaseTableCreatedAtColumn, + sqlReleaseTableName, + sqlReleaseTableModifiedAtColumn, + sqlReleaseTableName, + sqlReleaseTableName, + ), + }, + Down: []string{ + fmt.Sprintf(` + DROP TABLE %s; + `, sqlReleaseTableName), + }, + }, + { + Id: "custom_labels", + Up: []string{ + fmt.Sprintf(` + CREATE TABLE %s ( + %s VARCHAR(64), + %s VARCHAR(67), + %s VARCHAR(%d), + %s VARCHAR(%d) + ); + CREATE INDEX ON %s (%s, %s); + + GRANT ALL ON %s TO PUBLIC; + ALTER TABLE %s ENABLE ROW LEVEL SECURITY; + `, + sqlCustomLabelsTableName, + sqlCustomLabelsTableReleaseKeyColumn, + sqlCustomLabelsTableReleaseNamespaceColumn, + sqlCustomLabelsTableKeyColumn, + sqlCustomLabelsTableKeyMaxLength, + sqlCustomLabelsTableValueColumn, + sqlCustomLabelsTableValueMaxLength, + sqlCustomLabelsTableName, + sqlCustomLabelsTableReleaseKeyColumn, + sqlCustomLabelsTableReleaseNamespaceColumn, + sqlCustomLabelsTableName, + sqlCustomLabelsTableName, + ), + }, + Down: []string{ + fmt.Sprintf(` + DELETE TABLE %s; + `, sqlCustomLabelsTableName), + }, + }, + }, + } + + // Check that init migration already applied + if s.checkAlreadyApplied(migrations.Migrations) { + return nil + } + + // Populate the database with the relations we need if they don't exist yet + _, err := migrate.Exec(s.db.DB, postgreSQLDialect, migrations, migrate.Up) + return err +} + +// SQLReleaseWrapper describes how Helm releases are stored in an SQL database +type SQLReleaseWrapper struct { + // The primary key, made of {release-name}.{release-version} + Key string `db:"key"` + + // See https://github.com/helm/helm/blob/c9fe3d118caec699eb2565df9838673af379ce12/pkg/storage/driver/secrets.go#L231 + Type string `db:"type"` + + // The rspb.Release body, as a base64-encoded string + Body string `db:"body"` + + // Release "labels" that can be used as filters in the storage.Query(labels map[string]string) + // we implemented. Note that allowing Helm users to filter against new dimensions will require a + // new migration to be added, and the Create and/or update functions to be updated accordingly. + Name string `db:"name"` + Namespace string `db:"namespace"` + Version int `db:"version"` + Status string `db:"status"` + Owner string `db:"owner"` + CreatedAt int `db:"createdAt"` + ModifiedAt int `db:"modifiedAt"` +} + +type SQLReleaseCustomLabelWrapper struct { + ReleaseKey string `db:"release_key"` + ReleaseNamespace string `db:"release_namespace"` + Key string `db:"key"` + Value string `db:"value"` +} + +// NewSQL initializes a new sql driver. +func NewSQL(connectionString string, logger func(string, ...interface{}), namespace string) (*SQL, error) { + db, err := sqlx.Connect(postgreSQLDialect, connectionString) + if err != nil { + return nil, err + } + + driver := &SQL{ + db: db, + Log: logger, + statementBuilder: sq.StatementBuilder.PlaceholderFormat(sq.Dollar), + } + + if err := driver.ensureDBSetup(); err != nil { + return nil, err + } + + driver.namespace = namespace + + return driver, nil +} + +// Get returns the release named by key. +func (s *SQL) Get(key string) (*rspb.Release, error) { + var record SQLReleaseWrapper + + qb := s.statementBuilder. + Select(sqlReleaseTableBodyColumn). + From(sqlReleaseTableName). + Where(sq.Eq{sqlReleaseTableKeyColumn: key}). + Where(sq.Eq{sqlReleaseTableNamespaceColumn: s.namespace}) + + query, args, err := qb.ToSql() + if err != nil { + s.Log("failed to build query: %v", err) + return nil, err + } + + // Get will return an error if the result is empty + if err := s.db.Get(&record, query, args...); err != nil { + s.Log("got SQL error when getting release %s: %v", key, err) + return nil, ErrReleaseNotFound + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("get: failed to decode data %q: %v", key, err) + return nil, err + } + + if release.Labels, err = s.getReleaseCustomLabels(key, s.namespace); err != nil { + s.Log("failed to get release %s/%s custom labels: %v", s.namespace, key, err) + return nil, err + } + + return release, nil +} + +// List returns the list of all releases such that filter(release) == true +func (s *SQL) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { + sb := s.statementBuilder. + Select(sqlReleaseTableKeyColumn, sqlReleaseTableNamespaceColumn, sqlReleaseTableBodyColumn). + From(sqlReleaseTableName). + Where(sq.Eq{sqlReleaseTableOwnerColumn: sqlReleaseDefaultOwner}) + + // If a namespace was specified, we only list releases from that namespace + if s.namespace != "" { + sb = sb.Where(sq.Eq{sqlReleaseTableNamespaceColumn: s.namespace}) + } + + query, args, err := sb.ToSql() + if err != nil { + s.Log("failed to build query: %v", err) + return nil, err + } + + var records = []SQLReleaseWrapper{} + if err := s.db.Select(&records, query, args...); err != nil { + s.Log("list: failed to list: %v", err) + return nil, err + } + + var releases []*rspb.Release + for _, record := range records { + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("list: failed to decode release: %v: %v", record, err) + continue + } + + if release.Labels, err = s.getReleaseCustomLabels(record.Key, record.Namespace); err != nil { + s.Log("failed to get release %s/%s custom labels: %v", record.Namespace, record.Key, err) + return nil, err + } + for k, v := range getReleaseSystemLabels(release) { + release.Labels[k] = v + } + + if filter(release) { + releases = append(releases, release) + } + } + + return releases, nil +} + +// Query returns the set of releases that match the provided set of labels. +func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { + sb := s.statementBuilder. + Select(sqlReleaseTableKeyColumn, sqlReleaseTableNamespaceColumn, sqlReleaseTableBodyColumn). + From(sqlReleaseTableName) + + keys := make([]string, 0, len(labels)) + for key := range labels { + keys = append(keys, key) + } + sort.Strings(keys) + for _, key := range keys { + if _, ok := labelMap[key]; ok { + sb = sb.Where(sq.Eq{key: labels[key]}) + } else { + s.Log("unknown label %s", key) + return nil, fmt.Errorf("unknown label %s", key) + } + } + + // If a namespace was specified, we only list releases from that namespace + if s.namespace != "" { + sb = sb.Where(sq.Eq{sqlReleaseTableNamespaceColumn: s.namespace}) + } + + // Build our query + query, args, err := sb.ToSql() + if err != nil { + s.Log("failed to build query: %v", err) + return nil, err + } + + var records = []SQLReleaseWrapper{} + if err := s.db.Select(&records, query, args...); err != nil { + s.Log("list: failed to query with labels: %v", err) + return nil, err + } + + if len(records) == 0 { + return nil, ErrReleaseNotFound + } + + var releases []*rspb.Release + for _, record := range records { + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("list: failed to decode release: %v: %v", record, err) + continue + } + + if release.Labels, err = s.getReleaseCustomLabels(record.Key, record.Namespace); err != nil { + s.Log("failed to get release %s/%s custom labels: %v", record.Namespace, record.Key, err) + return nil, err + } + + releases = append(releases, release) + } + + if len(releases) == 0 { + return nil, ErrReleaseNotFound + } + + return releases, nil +} + +// Create creates a new release. +func (s *SQL) Create(key string, rls *rspb.Release) error { + namespace := rls.Namespace + if namespace == "" { + namespace = defaultNamespace + } + s.namespace = namespace + + body, err := encodeRelease(rls) + if err != nil { + s.Log("failed to encode release: %v", err) + return err + } + + transaction, err := s.db.Beginx() + if err != nil { + s.Log("failed to start SQL transaction: %v", err) + return fmt.Errorf("error beginning transaction: %v", err) + } + + insertQuery, args, err := s.statementBuilder. + Insert(sqlReleaseTableName). + Columns( + sqlReleaseTableKeyColumn, + sqlReleaseTableTypeColumn, + sqlReleaseTableBodyColumn, + sqlReleaseTableNameColumn, + sqlReleaseTableNamespaceColumn, + sqlReleaseTableVersionColumn, + sqlReleaseTableStatusColumn, + sqlReleaseTableOwnerColumn, + sqlReleaseTableCreatedAtColumn, + ). + Values( + key, + sqlReleaseDefaultType, + body, + rls.Name, + namespace, + int(rls.Version), + rls.Info.Status.String(), + sqlReleaseDefaultOwner, + int(time.Now().Unix()), + ).ToSql() + if err != nil { + s.Log("failed to build insert query: %v", err) + return err + } + + if _, err := transaction.Exec(insertQuery, args...); err != nil { + defer transaction.Rollback() + + selectQuery, args, buildErr := s.statementBuilder. + Select(sqlReleaseTableKeyColumn). + From(sqlReleaseTableName). + Where(sq.Eq{sqlReleaseTableKeyColumn: key}). + Where(sq.Eq{sqlReleaseTableNamespaceColumn: s.namespace}). + ToSql() + if buildErr != nil { + s.Log("failed to build select query: %v", buildErr) + return err + } + + var record SQLReleaseWrapper + if err := transaction.Get(&record, selectQuery, args...); err == nil { + s.Log("release %s already exists", key) + return ErrReleaseExists + } + + s.Log("failed to store release %s in SQL database: %v", key, err) + return err + } + + // Filtering labels before insert cause in SQL storage driver system releases are stored in separate columns of release table + for k, v := range filterSystemLabels(rls.Labels) { + insertLabelsQuery, args, err := s.statementBuilder. + Insert(sqlCustomLabelsTableName). + Columns( + sqlCustomLabelsTableReleaseKeyColumn, + sqlCustomLabelsTableReleaseNamespaceColumn, + sqlCustomLabelsTableKeyColumn, + sqlCustomLabelsTableValueColumn, + ). + Values( + key, + namespace, + k, + v, + ).ToSql() + + if err != nil { + defer transaction.Rollback() + s.Log("failed to build insert query: %v", err) + return err + } + + if _, err := transaction.Exec(insertLabelsQuery, args...); err != nil { + defer transaction.Rollback() + s.Log("failed to write Labels: %v", err) + return err + } + } + defer transaction.Commit() + + return nil +} + +// Update updates a release. +func (s *SQL) Update(key string, rls *rspb.Release) error { + namespace := rls.Namespace + if namespace == "" { + namespace = defaultNamespace + } + s.namespace = namespace + + body, err := encodeRelease(rls) + if err != nil { + s.Log("failed to encode release: %v", err) + return err + } + + query, args, err := s.statementBuilder. + Update(sqlReleaseTableName). + Set(sqlReleaseTableBodyColumn, body). + Set(sqlReleaseTableNameColumn, rls.Name). + Set(sqlReleaseTableVersionColumn, int(rls.Version)). + Set(sqlReleaseTableStatusColumn, rls.Info.Status.String()). + Set(sqlReleaseTableOwnerColumn, sqlReleaseDefaultOwner). + Set(sqlReleaseTableModifiedAtColumn, int(time.Now().Unix())). + Where(sq.Eq{sqlReleaseTableKeyColumn: key}). + Where(sq.Eq{sqlReleaseTableNamespaceColumn: namespace}). + ToSql() + + if err != nil { + s.Log("failed to build update query: %v", err) + return err + } + + if _, err := s.db.Exec(query, args...); err != nil { + s.Log("failed to update release %s in SQL database: %v", key, err) + return err + } + + return nil +} + +// Delete deletes a release or returns ErrReleaseNotFound. +func (s *SQL) Delete(key string) (*rspb.Release, error) { + transaction, err := s.db.Beginx() + if err != nil { + s.Log("failed to start SQL transaction: %v", err) + return nil, fmt.Errorf("error beginning transaction: %v", err) + } + + selectQuery, args, err := s.statementBuilder. + Select(sqlReleaseTableBodyColumn). + From(sqlReleaseTableName). + Where(sq.Eq{sqlReleaseTableKeyColumn: key}). + Where(sq.Eq{sqlReleaseTableNamespaceColumn: s.namespace}). + ToSql() + if err != nil { + s.Log("failed to build select query: %v", err) + return nil, err + } + + var record SQLReleaseWrapper + err = transaction.Get(&record, selectQuery, args...) + if err != nil { + s.Log("release %s not found: %v", key, err) + return nil, ErrReleaseNotFound + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("failed to decode release %s: %v", key, err) + transaction.Rollback() + return nil, err + } + defer transaction.Commit() + + deleteQuery, args, err := s.statementBuilder. + Delete(sqlReleaseTableName). + Where(sq.Eq{sqlReleaseTableKeyColumn: key}). + Where(sq.Eq{sqlReleaseTableNamespaceColumn: s.namespace}). + ToSql() + if err != nil { + s.Log("failed to build delete query: %v", err) + return nil, err + } + + _, err = transaction.Exec(deleteQuery, args...) + if err != nil { + s.Log("failed perform delete query: %v", err) + return release, err + } + + if release.Labels, err = s.getReleaseCustomLabels(key, s.namespace); err != nil { + s.Log("failed to get release %s/%s custom labels: %v", s.namespace, key, err) + return nil, err + } + + deleteCustomLabelsQuery, args, err := s.statementBuilder. + Delete(sqlCustomLabelsTableName). + Where(sq.Eq{sqlCustomLabelsTableReleaseKeyColumn: key}). + Where(sq.Eq{sqlCustomLabelsTableReleaseNamespaceColumn: s.namespace}). + ToSql() + + if err != nil { + s.Log("failed to build delete Labels query: %v", err) + return nil, err + } + _, err = transaction.Exec(deleteCustomLabelsQuery, args...) + return release, err +} + +// Get release custom labels from database +func (s *SQL) getReleaseCustomLabels(key string, _ string) (map[string]string, error) { + query, args, err := s.statementBuilder. + Select(sqlCustomLabelsTableKeyColumn, sqlCustomLabelsTableValueColumn). + From(sqlCustomLabelsTableName). + Where(sq.Eq{sqlCustomLabelsTableReleaseKeyColumn: key, + sqlCustomLabelsTableReleaseNamespaceColumn: s.namespace}). + ToSql() + if err != nil { + return nil, err + } + + var labelsList = []SQLReleaseCustomLabelWrapper{} + if err := s.db.Select(&labelsList, query, args...); err != nil { + return nil, err + } + + labelsMap := make(map[string]string) + for _, i := range labelsList { + labelsMap[i.Key] = i.Value + } + + return filterSystemLabels(labelsMap), nil +} + +// Rebuild system labels from release object +func getReleaseSystemLabels(rls *rspb.Release) map[string]string { + return map[string]string{ + "name": rls.Name, + "owner": sqlReleaseDefaultOwner, + "status": rls.Info.Status.String(), + "version": strconv.Itoa(rls.Version), + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/driver/util.go b/vendor/helm.sh/helm/v3/pkg/storage/driver/util.go new file mode 100644 index 000000000..7bda5ec96 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/driver/util.go @@ -0,0 +1,122 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver // import "helm.sh/helm/v3/pkg/storage/driver" + +import ( + "bytes" + "compress/gzip" + "encoding/base64" + "encoding/json" + "io" + + rspb "helm.sh/helm/v3/pkg/release" +) + +var b64 = base64.StdEncoding + +var magicGzip = []byte{0x1f, 0x8b, 0x08} + +var systemLabels = []string{"name", "owner", "status", "version", "createdAt", "modifiedAt"} + +// encodeRelease encodes a release returning a base64 encoded +// gzipped string representation, or error. +func encodeRelease(rls *rspb.Release) (string, error) { + b, err := json.Marshal(rls) + if err != nil { + return "", err + } + var buf bytes.Buffer + w, err := gzip.NewWriterLevel(&buf, gzip.BestCompression) + if err != nil { + return "", err + } + if _, err = w.Write(b); err != nil { + return "", err + } + w.Close() + + return b64.EncodeToString(buf.Bytes()), nil +} + +// decodeRelease decodes the bytes of data into a release +// type. Data must contain a base64 encoded gzipped string of a +// valid release, otherwise an error is returned. +func decodeRelease(data string) (*rspb.Release, error) { + // base64 decode string + b, err := b64.DecodeString(data) + if err != nil { + return nil, err + } + + // For backwards compatibility with releases that were stored before + // compression was introduced we skip decompression if the + // gzip magic header is not found + if len(b) > 3 && bytes.Equal(b[0:3], magicGzip) { + r, err := gzip.NewReader(bytes.NewReader(b)) + if err != nil { + return nil, err + } + defer r.Close() + b2, err := io.ReadAll(r) + if err != nil { + return nil, err + } + b = b2 + } + + var rls rspb.Release + // unmarshal release object bytes + if err := json.Unmarshal(b, &rls); err != nil { + return nil, err + } + return &rls, nil +} + +// Checks if label is system +func isSystemLabel(key string) bool { + for _, v := range GetSystemLabels() { + if key == v { + return true + } + } + return false +} + +// Removes system labels from labels map +func filterSystemLabels(lbs map[string]string) map[string]string { + result := make(map[string]string) + for k, v := range lbs { + if !isSystemLabel(k) { + result[k] = v + } + } + return result +} + +// Checks if labels array contains system labels +func ContainsSystemLabels(lbs map[string]string) bool { + for k := range lbs { + if isSystemLabel(k) { + return true + } + } + return false +} + +func GetSystemLabels() []string { + return systemLabels +} diff --git a/vendor/helm.sh/helm/v3/pkg/storage/storage.go b/vendor/helm.sh/helm/v3/pkg/storage/storage.go new file mode 100644 index 000000000..0da0688fd --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/storage/storage.go @@ -0,0 +1,266 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package storage // import "helm.sh/helm/v3/pkg/storage" + +import ( + "fmt" + "strings" + + "github.com/pkg/errors" + + rspb "helm.sh/helm/v3/pkg/release" + relutil "helm.sh/helm/v3/pkg/releaseutil" + "helm.sh/helm/v3/pkg/storage/driver" +) + +// HelmStorageType is the type field of the Kubernetes storage object which stores the Helm release +// version. It is modified slightly replacing the '/': sh.helm/release.v1 +// Note: The version 'v1' is incremented if the release object metadata is +// modified between major releases. +// This constant is used as a prefix for the Kubernetes storage object name. +const HelmStorageType = "sh.helm.release.v1" + +// Storage represents a storage engine for a Release. +type Storage struct { + driver.Driver + + // MaxHistory specifies the maximum number of historical releases that will + // be retained, including the most recent release. Values of 0 or less are + // ignored (meaning no limits are imposed). + MaxHistory int + + Log func(string, ...interface{}) +} + +// Get retrieves the release from storage. An error is returned +// if the storage driver failed to fetch the release, or the +// release identified by the key, version pair does not exist. +func (s *Storage) Get(name string, version int) (*rspb.Release, error) { + s.Log("getting release %q", makeKey(name, version)) + return s.Driver.Get(makeKey(name, version)) +} + +// Create creates a new storage entry holding the release. An +// error is returned if the storage driver fails to store the +// release, or a release with an identical key already exists. +func (s *Storage) Create(rls *rspb.Release) error { + s.Log("creating release %q", makeKey(rls.Name, rls.Version)) + if s.MaxHistory > 0 { + // Want to make space for one more release. + if err := s.removeLeastRecent(rls.Name, s.MaxHistory-1); err != nil && + !errors.Is(err, driver.ErrReleaseNotFound) { + return err + } + } + return s.Driver.Create(makeKey(rls.Name, rls.Version), rls) +} + +// Update updates the release in storage. An error is returned if the +// storage backend fails to update the release or if the release +// does not exist. +func (s *Storage) Update(rls *rspb.Release) error { + s.Log("updating release %q", makeKey(rls.Name, rls.Version)) + return s.Driver.Update(makeKey(rls.Name, rls.Version), rls) +} + +// Delete deletes the release from storage. An error is returned if +// the storage backend fails to delete the release or if the release +// does not exist. +func (s *Storage) Delete(name string, version int) (*rspb.Release, error) { + s.Log("deleting release %q", makeKey(name, version)) + return s.Driver.Delete(makeKey(name, version)) +} + +// ListReleases returns all releases from storage. An error is returned if the +// storage backend fails to retrieve the releases. +func (s *Storage) ListReleases() ([]*rspb.Release, error) { + s.Log("listing all releases in storage") + return s.Driver.List(func(_ *rspb.Release) bool { return true }) +} + +// ListUninstalled returns all releases with Status == UNINSTALLED. An error is returned +// if the storage backend fails to retrieve the releases. +func (s *Storage) ListUninstalled() ([]*rspb.Release, error) { + s.Log("listing uninstalled releases in storage") + return s.Driver.List(func(rls *rspb.Release) bool { + return relutil.StatusFilter(rspb.StatusUninstalled).Check(rls) + }) +} + +// ListDeployed returns all releases with Status == DEPLOYED. An error is returned +// if the storage backend fails to retrieve the releases. +func (s *Storage) ListDeployed() ([]*rspb.Release, error) { + s.Log("listing all deployed releases in storage") + return s.Driver.List(func(rls *rspb.Release) bool { + return relutil.StatusFilter(rspb.StatusDeployed).Check(rls) + }) +} + +// Deployed returns the last deployed release with the provided release name, or +// returns driver.NewErrNoDeployedReleases if not found. +func (s *Storage) Deployed(name string) (*rspb.Release, error) { + ls, err := s.DeployedAll(name) + if err != nil { + return nil, err + } + + if len(ls) == 0 { + return nil, driver.NewErrNoDeployedReleases(name) + } + + // If executed concurrently, Helm's database gets corrupted + // and multiple releases are DEPLOYED. Take the latest. + relutil.Reverse(ls, relutil.SortByRevision) + + return ls[0], nil +} + +// DeployedAll returns all deployed releases with the provided name, or +// returns driver.NewErrNoDeployedReleases if not found. +func (s *Storage) DeployedAll(name string) ([]*rspb.Release, error) { + s.Log("getting deployed releases from %q history", name) + + ls, err := s.Driver.Query(map[string]string{ + "name": name, + "owner": "helm", + "status": "deployed", + }) + if err == nil { + return ls, nil + } + if strings.Contains(err.Error(), "not found") { + return nil, driver.NewErrNoDeployedReleases(name) + } + return nil, err +} + +// History returns the revision history for the release with the provided name, or +// returns driver.ErrReleaseNotFound if no such release name exists. +func (s *Storage) History(name string) ([]*rspb.Release, error) { + s.Log("getting release history for %q", name) + + return s.Driver.Query(map[string]string{"name": name, "owner": "helm"}) +} + +// removeLeastRecent removes items from history until the length number of releases +// does not exceed max. +// +// We allow max to be set explicitly so that calling functions can "make space" +// for the new records they are going to write. +func (s *Storage) removeLeastRecent(name string, max int) error { + if max < 0 { + return nil + } + h, err := s.History(name) + if err != nil { + return err + } + if len(h) <= max { + return nil + } + + // We want oldest to newest + relutil.SortByRevision(h) + + lastDeployed, err := s.Deployed(name) + if err != nil && !errors.Is(err, driver.ErrNoDeployedReleases) { + return err + } + + var toDelete []*rspb.Release + for _, rel := range h { + // once we have enough releases to delete to reach the max, stop + if len(h)-len(toDelete) == max { + break + } + if lastDeployed != nil { + if rel.Version != lastDeployed.Version { + toDelete = append(toDelete, rel) + } + } else { + toDelete = append(toDelete, rel) + } + } + + // Delete as many as possible. In the case of API throughput limitations, + // multiple invocations of this function will eventually delete them all. + errs := []error{} + for _, rel := range toDelete { + err = s.deleteReleaseVersion(name, rel.Version) + if err != nil { + errs = append(errs, err) + } + } + + s.Log("Pruned %d record(s) from %s with %d error(s)", len(toDelete), name, len(errs)) + switch c := len(errs); c { + case 0: + return nil + case 1: + return errs[0] + default: + return errors.Errorf("encountered %d deletion errors. First is: %s", c, errs[0]) + } +} + +func (s *Storage) deleteReleaseVersion(name string, version int) error { + key := makeKey(name, version) + _, err := s.Delete(name, version) + if err != nil { + s.Log("error pruning %s from release history: %s", key, err) + return err + } + return nil +} + +// Last fetches the last revision of the named release. +func (s *Storage) Last(name string) (*rspb.Release, error) { + s.Log("getting last revision of %q", name) + h, err := s.History(name) + if err != nil { + return nil, err + } + if len(h) == 0 { + return nil, errors.Errorf("no revision for release %q", name) + } + + relutil.Reverse(h, relutil.SortByRevision) + return h[0], nil +} + +// makeKey concatenates the Kubernetes storage object type, a release name and version +// into a string with format:```<helm_storage_type>.<release_name>.v<release_version>```. +// The storage type is prepended to keep name uniqueness between different +// release storage types. An example of clash when not using the type: +// https://github.com/helm/helm/issues/6435. +// This key is used to uniquely identify storage objects. +func makeKey(rlsname string, version int) string { + return fmt.Sprintf("%s.%s.v%d", HelmStorageType, rlsname, version) +} + +// Init initializes a new storage backend with the driver d. +// If d is nil, the default in-memory driver is used. +func Init(d driver.Driver) *Storage { + // default driver is in memory + if d == nil { + d = driver.NewMemory() + } + return &Storage{ + Driver: d, + Log: func(_ string, _ ...interface{}) {}, + } +} diff --git a/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime.go b/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime.go new file mode 100644 index 000000000..f2998d76d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime.go @@ -0,0 +1,25 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package ctime + +import ( + "os" + "time" +) + +func Created(fi os.FileInfo) time.Time { + return created(fi) +} diff --git a/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime_linux.go b/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime_linux.go new file mode 100644 index 000000000..c3cea1d78 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime_linux.go @@ -0,0 +1,30 @@ +//go:build linux + +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package ctime + +import ( + "os" + "syscall" + "time" +) + +func created(fi os.FileInfo) time.Time { + st := fi.Sys().(*syscall.Stat_t) + //nolint + return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec)) +} diff --git a/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime_other.go b/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime_other.go new file mode 100644 index 000000000..f21ed7347 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/time/ctime/ctime_other.go @@ -0,0 +1,27 @@ +//go:build !linux + +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package ctime + +import ( + "os" + "time" +) + +func created(fi os.FileInfo) time.Time { + return fi.ModTime() +} diff --git a/vendor/helm.sh/helm/v3/pkg/time/time.go b/vendor/helm.sh/helm/v3/pkg/time/time.go new file mode 100644 index 000000000..1abe8ae3d --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/time/time.go @@ -0,0 +1,91 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package time contains a wrapper for time.Time in the standard library and +// associated methods. This package mainly exists to work around an issue in Go +// where the serializer doesn't omit an empty value for time: +// https://github.com/golang/go/issues/11939. As such, this can be removed if a +// proposal is ever accepted for Go +package time + +import ( + "bytes" + "time" +) + +// emptyString contains an empty JSON string value to be used as output +var emptyString = `""` + +// Time is a convenience wrapper around stdlib time, but with different +// marshalling and unmarshaling for zero values +type Time struct { + time.Time +} + +// Now returns the current time. It is a convenience wrapper around time.Now() +func Now() Time { + return Time{time.Now()} +} + +func (t Time) MarshalJSON() ([]byte, error) { + if t.Time.IsZero() { + return []byte(emptyString), nil + } + + return t.Time.MarshalJSON() +} + +func (t *Time) UnmarshalJSON(b []byte) error { + if bytes.Equal(b, []byte("null")) { + return nil + } + // If it is empty, we don't have to set anything since time.Time is not a + // pointer and will be set to the zero value + if bytes.Equal([]byte(emptyString), b) { + return nil + } + + return t.Time.UnmarshalJSON(b) +} + +func Parse(layout, value string) (Time, error) { + t, err := time.Parse(layout, value) + return Time{Time: t}, err +} +func ParseInLocation(layout, value string, loc *time.Location) (Time, error) { + t, err := time.ParseInLocation(layout, value, loc) + return Time{Time: t}, err +} + +func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time { + return Time{Time: time.Date(year, month, day, hour, min, sec, nsec, loc)} +} + +func Unix(sec int64, nsec int64) Time { return Time{Time: time.Unix(sec, nsec)} } + +func (t Time) Add(d time.Duration) Time { return Time{Time: t.Time.Add(d)} } +func (t Time) AddDate(years int, months int, days int) Time { + return Time{Time: t.Time.AddDate(years, months, days)} +} +func (t Time) After(u Time) bool { return t.Time.After(u.Time) } +func (t Time) Before(u Time) bool { return t.Time.Before(u.Time) } +func (t Time) Equal(u Time) bool { return t.Time.Equal(u.Time) } +func (t Time) In(loc *time.Location) Time { return Time{Time: t.Time.In(loc)} } +func (t Time) Local() Time { return Time{Time: t.Time.Local()} } +func (t Time) Round(d time.Duration) Time { return Time{Time: t.Time.Round(d)} } +func (t Time) Sub(u Time) time.Duration { return t.Time.Sub(u.Time) } +func (t Time) Truncate(d time.Duration) Time { return Time{Time: t.Time.Truncate(d)} } +func (t Time) UTC() Time { return Time{Time: t.Time.UTC()} } diff --git a/vendor/helm.sh/helm/v3/pkg/uploader/chart_uploader.go b/vendor/helm.sh/helm/v3/pkg/uploader/chart_uploader.go new file mode 100644 index 000000000..d7e940406 --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/uploader/chart_uploader.go @@ -0,0 +1,58 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package uploader + +import ( + "fmt" + "io" + "net/url" + + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/pusher" + "helm.sh/helm/v3/pkg/registry" +) + +// ChartUploader handles uploading a chart. +type ChartUploader struct { + // Out is the location to write warning and info messages. + Out io.Writer + // Pusher collection for the operation + Pushers pusher.Providers + // Options provide parameters to be passed along to the Pusher being initialized. + Options []pusher.Option + // RegistryClient is a client for interacting with registries. + RegistryClient *registry.Client +} + +// UploadTo uploads a chart. Depending on the settings, it may also upload a provenance file. +func (c *ChartUploader) UploadTo(ref, remote string) error { + u, err := url.Parse(remote) + if err != nil { + return errors.Errorf("invalid chart URL format: %s", remote) + } + + if u.Scheme == "" { + return fmt.Errorf("scheme prefix missing from remote (e.g. \"%s://\")", registry.OCIScheme) + } + + p, err := c.Pushers.ByScheme(u.Scheme) + if err != nil { + return err + } + + return p.Push(ref, u.String(), c.Options...) +} diff --git a/vendor/helm.sh/helm/v3/pkg/uploader/doc.go b/vendor/helm.sh/helm/v3/pkg/uploader/doc.go new file mode 100644 index 000000000..112ddbf2c --- /dev/null +++ b/vendor/helm.sh/helm/v3/pkg/uploader/doc.go @@ -0,0 +1,21 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package uploader provides a library for uploading charts. + +This package contains tools for uploading charts to registries. +*/ +package uploader diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go b/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go new file mode 100644 index 000000000..ffb9f56d8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go @@ -0,0 +1,68 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package path + +import ( + "fmt" + "strings" +) + +// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) +var NameMayNotBe = []string{".", ".."} + +// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store) +var NameMayNotContain = []string{"/", "%"} + +// IsValidPathSegmentName validates the name can be safely encoded as a path segment +func IsValidPathSegmentName(name string) []string { + for _, illegalName := range NameMayNotBe { + if name == illegalName { + return []string{fmt.Sprintf(`may not be '%s'`, illegalName)} + } + } + + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment +// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid +func IsValidPathSegmentPrefix(name string) []string { + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// ValidatePathSegmentName validates the name can be safely encoded as a path segment +func ValidatePathSegmentName(name string, prefix bool) []string { + if prefix { + return IsValidPathSegmentPrefix(name) + } + + return IsValidPathSegmentName(name) +} diff --git a/vendor/k8s.io/apiserver/LICENSE b/vendor/k8s.io/apiserver/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/k8s.io/apiserver/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go b/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go new file mode 100644 index 000000000..7f8986fae --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go @@ -0,0 +1,134 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deprecation + +import ( + "fmt" + "regexp" + "strconv" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" +) + +type apiLifecycleDeprecated interface { + APILifecycleDeprecated() (major, minor int) +} + +type apiLifecycleRemoved interface { + APILifecycleRemoved() (major, minor int) +} + +type apiLifecycleReplacement interface { + APILifecycleReplacement() schema.GroupVersionKind +} + +// extract all digits at the beginning of the string +var leadingDigits = regexp.MustCompile(`^(\d+)`) + +// MajorMinor parses a numeric major/minor version from the provided version info. +// The minor version drops all characters after the first non-digit character: +// +// version.Info{Major:"1", Minor:"2+"} -> 1,2 +// version.Info{Major:"1", Minor:"2.3-build4"} -> 1,2 +func MajorMinor(v version.Info) (int, int, error) { + major, err := strconv.Atoi(v.Major) + if err != nil { + return 0, 0, err + } + minor, err := strconv.Atoi(leadingDigits.FindString(v.Minor)) + if err != nil { + return 0, 0, err + } + return major, minor, nil +} + +// IsDeprecated returns true if obj implements APILifecycleDeprecated() and returns +// a major/minor version that is non-zero and is <= the specified current major/minor version. +func IsDeprecated(obj runtime.Object, currentMajor, currentMinor int) bool { + deprecated, isDeprecated := obj.(apiLifecycleDeprecated) + if !isDeprecated { + return false + } + + deprecatedMajor, deprecatedMinor := deprecated.APILifecycleDeprecated() + // no deprecation version expressed + if deprecatedMajor == 0 && deprecatedMinor == 0 { + return false + } + // no current version info available + if currentMajor == 0 && currentMinor == 0 { + return true + } + // compare deprecation version to current version + if deprecatedMajor > currentMajor { + return false + } + if deprecatedMajor == currentMajor && deprecatedMinor > currentMinor { + return false + } + return true +} + +// RemovedRelease returns the major/minor version in which the given object is unavailable (in the form "<major>.<minor>") +// if the object implements APILifecycleRemoved() to indicate a non-zero removal version, and returns an empty string otherwise. +func RemovedRelease(obj runtime.Object) string { + if removed, hasRemovalInfo := obj.(apiLifecycleRemoved); hasRemovalInfo { + removedMajor, removedMinor := removed.APILifecycleRemoved() + if removedMajor != 0 || removedMinor != 0 { + return fmt.Sprintf("%d.%d", removedMajor, removedMinor) + } + } + return "" +} + +// WarningMessage returns a human-readable deprecation warning if the object implements APILifecycleDeprecated() +// to indicate a non-zero deprecated major/minor version and has a populated GetObjectKind().GroupVersionKind(). +func WarningMessage(obj runtime.Object) string { + deprecated, isDeprecated := obj.(apiLifecycleDeprecated) + if !isDeprecated { + return "" + } + + deprecatedMajor, deprecatedMinor := deprecated.APILifecycleDeprecated() + if deprecatedMajor == 0 && deprecatedMinor == 0 { + return "" + } + + gvk := obj.GetObjectKind().GroupVersionKind() + if gvk.Empty() { + return "" + } + deprecationWarning := fmt.Sprintf("%s %s is deprecated in v%d.%d+", gvk.GroupVersion().String(), gvk.Kind, deprecatedMajor, deprecatedMinor) + + if removed, hasRemovalInfo := obj.(apiLifecycleRemoved); hasRemovalInfo { + removedMajor, removedMinor := removed.APILifecycleRemoved() + if removedMajor != 0 || removedMinor != 0 { + deprecationWarning = deprecationWarning + fmt.Sprintf(", unavailable in v%d.%d+", removedMajor, removedMinor) + } + } + + if replaced, hasReplacement := obj.(apiLifecycleReplacement); hasReplacement { + replacement := replaced.APILifecycleReplacement() + if !replacement.Empty() { + deprecationWarning = deprecationWarning + fmt.Sprintf("; use %s %s", replacement.GroupVersion().String(), replacement.Kind) + } + } + + return deprecationWarning +} diff --git a/vendor/k8s.io/client-go/util/retry/OWNERS b/vendor/k8s.io/client-go/util/retry/OWNERS new file mode 100644 index 000000000..75736b5aa --- /dev/null +++ b/vendor/k8s.io/client-go/util/retry/OWNERS @@ -0,0 +1,4 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +reviewers: + - caesarxuchao diff --git a/vendor/k8s.io/client-go/util/retry/util.go b/vendor/k8s.io/client-go/util/retry/util.go new file mode 100644 index 000000000..0c6e504a6 --- /dev/null +++ b/vendor/k8s.io/client-go/util/retry/util.go @@ -0,0 +1,105 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package retry + +import ( + "time" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/util/wait" +) + +// DefaultRetry is the recommended retry for a conflict where multiple clients +// are making changes to the same resource. +var DefaultRetry = wait.Backoff{ + Steps: 5, + Duration: 10 * time.Millisecond, + Factor: 1.0, + Jitter: 0.1, +} + +// DefaultBackoff is the recommended backoff for a conflict where a client +// may be attempting to make an unrelated modification to a resource under +// active management by one or more controllers. +var DefaultBackoff = wait.Backoff{ + Steps: 4, + Duration: 10 * time.Millisecond, + Factor: 5.0, + Jitter: 0.1, +} + +// OnError allows the caller to retry fn in case the error returned by fn is retriable +// according to the provided function. backoff defines the maximum retries and the wait +// interval between two retries. +func OnError(backoff wait.Backoff, retriable func(error) bool, fn func() error) error { + var lastErr error + err := wait.ExponentialBackoff(backoff, func() (bool, error) { + err := fn() + switch { + case err == nil: + return true, nil + case retriable(err): + lastErr = err + return false, nil + default: + return false, err + } + }) + if err == wait.ErrWaitTimeout { + err = lastErr + } + return err +} + +// RetryOnConflict is used to make an update to a resource when you have to worry about +// conflicts caused by other code making unrelated updates to the resource at the same +// time. fn should fetch the resource to be modified, make appropriate changes to it, try +// to update it, and return (unmodified) the error from the update function. On a +// successful update, RetryOnConflict will return nil. If the update function returns a +// "Conflict" error, RetryOnConflict will wait some amount of time as described by +// backoff, and then try again. On a non-"Conflict" error, or if it retries too many times +// and gives up, RetryOnConflict will return an error to the caller. +// +// err := retry.RetryOnConflict(retry.DefaultRetry, func() error { +// // Fetch the resource here; you need to refetch it on every try, since +// // if you got a conflict on the last update attempt then you need to get +// // the current version before making your own changes. +// pod, err := c.Pods("mynamespace").Get(name, metav1.GetOptions{}) +// if err != nil { +// return err +// } +// +// // Make whatever updates to the resource are needed +// pod.Status.Phase = v1.PodFailed +// +// // Try to update +// _, err = c.Pods("mynamespace").UpdateStatus(pod) +// // You have to return err itself here (not wrapped inside another error) +// // so that RetryOnConflict can identify it correctly. +// return err +// }) +// if err != nil { +// // May be conflict if max retries were hit, or may be something unrelated +// // like permissions or a network error +// return err +// } +// ... +// +// TODO: Make Backoff an interface? +func RetryOnConflict(backoff wait.Backoff, fn func() error) error { + return OnError(backoff, errors.IsConflict, fn) +} diff --git a/vendor/k8s.io/utils/net/multi_listen.go b/vendor/k8s.io/utils/net/multi_listen.go new file mode 100644 index 000000000..7cb7795be --- /dev/null +++ b/vendor/k8s.io/utils/net/multi_listen.go @@ -0,0 +1,195 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "context" + "fmt" + "net" + "sync" +) + +// connErrPair pairs conn and error which is returned by accept on sub-listeners. +type connErrPair struct { + conn net.Conn + err error +} + +// multiListener implements net.Listener +type multiListener struct { + listeners []net.Listener + wg sync.WaitGroup + + // connCh passes accepted connections, from child listeners to parent. + connCh chan connErrPair + // stopCh communicates from parent to child listeners. + stopCh chan struct{} +} + +// compile time check to ensure *multiListener implements net.Listener +var _ net.Listener = &multiListener{} + +// MultiListen returns net.Listener which can listen on and accept connections for +// the given network on multiple addresses. Internally it uses stdlib to create +// sub-listener and multiplexes connection requests using go-routines. +// The network must be "tcp", "tcp4" or "tcp6". +// It follows the semantics of net.Listen that primarily means: +// 1. If the host is an unspecified/zero IP address with "tcp" network, MultiListen +// listens on all available unicast and anycast IP addresses of the local system. +// 2. Use "tcp4" or "tcp6" to exclusively listen on IPv4 or IPv6 family, respectively. +// 3. The host can accept names (e.g, localhost) and it will create a listener for at +// most one of the host's IP. +func MultiListen(ctx context.Context, network string, addrs ...string) (net.Listener, error) { + var lc net.ListenConfig + return multiListen( + ctx, + network, + addrs, + func(ctx context.Context, network, address string) (net.Listener, error) { + return lc.Listen(ctx, network, address) + }) +} + +// multiListen implements MultiListen by consuming stdlib functions as dependency allowing +// mocking for unit-testing. +func multiListen( + ctx context.Context, + network string, + addrs []string, + listenFunc func(ctx context.Context, network, address string) (net.Listener, error), +) (net.Listener, error) { + if !(network == "tcp" || network == "tcp4" || network == "tcp6") { + return nil, fmt.Errorf("network %q not supported", network) + } + if len(addrs) == 0 { + return nil, fmt.Errorf("no address provided to listen on") + } + + ml := &multiListener{ + connCh: make(chan connErrPair), + stopCh: make(chan struct{}), + } + for _, addr := range addrs { + l, err := listenFunc(ctx, network, addr) + if err != nil { + // close all the sub-listeners and exit + _ = ml.Close() + return nil, err + } + ml.listeners = append(ml.listeners, l) + } + + for _, l := range ml.listeners { + ml.wg.Add(1) + go func(l net.Listener) { + defer ml.wg.Done() + for { + // Accept() is blocking, unless ml.Close() is called, in which + // case it will return immediately with an error. + conn, err := l.Accept() + // This assumes that ANY error from Accept() will terminate the + // sub-listener. We could maybe be more precise, but it + // doesn't seem necessary. + terminate := err != nil + + select { + case ml.connCh <- connErrPair{conn: conn, err: err}: + case <-ml.stopCh: + // In case we accepted a connection AND were stopped, and + // this select-case was chosen, just throw away the + // connection. This avoids potentially blocking on connCh + // or leaking a connection. + if conn != nil { + _ = conn.Close() + } + terminate = true + } + // Make sure we don't loop on Accept() returning an error and + // the select choosing the channel case. + if terminate { + return + } + } + }(l) + } + return ml, nil +} + +// Accept implements net.Listener. It waits for and returns a connection from +// any of the sub-listener. +func (ml *multiListener) Accept() (net.Conn, error) { + // wait for any sub-listener to enqueue an accepted connection + connErr, ok := <-ml.connCh + if !ok { + // The channel will be closed only when Close() is called on the + // multiListener. Closing of this channel implies that all + // sub-listeners are also closed, which causes a "use of closed + // network connection" error on their Accept() calls. We return the + // same error for multiListener.Accept() if multiListener.Close() + // has already been called. + return nil, fmt.Errorf("use of closed network connection") + } + return connErr.conn, connErr.err +} + +// Close implements net.Listener. It will close all sub-listeners and wait for +// the go-routines to exit. +func (ml *multiListener) Close() error { + // Make sure this can be called repeatedly without explosions. + select { + case <-ml.stopCh: + return fmt.Errorf("use of closed network connection") + default: + } + + // Tell all sub-listeners to stop. + close(ml.stopCh) + + // Closing the listeners causes Accept() to immediately return an error in + // the sub-listener go-routines. + for _, l := range ml.listeners { + _ = l.Close() + } + + // Wait for all the sub-listener go-routines to exit. + ml.wg.Wait() + close(ml.connCh) + + // Drain any already-queued connections. + for connErr := range ml.connCh { + if connErr.conn != nil { + _ = connErr.conn.Close() + } + } + return nil +} + +// Addr is an implementation of the net.Listener interface. It always returns +// the address of the first listener. Callers should use conn.LocalAddr() to +// obtain the actual local address of the sub-listener. +func (ml *multiListener) Addr() net.Addr { + return ml.listeners[0].Addr() +} + +// Addrs is like Addr, but returns the address for all registered listeners. +func (ml *multiListener) Addrs() []net.Addr { + var ret []net.Addr + for _, l := range ml.listeners { + ret = append(ret, l.Addr()) + } + return ret +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 903cabb94..0fc886acc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -17,13 +17,38 @@ cloud.google.com/go/storage cloud.google.com/go/storage/internal cloud.google.com/go/storage/internal/apiv2 cloud.google.com/go/storage/internal/apiv2/storagepb +# dario.cat/mergo v1.0.1 +## explicit; go 1.13 +dario.cat/mergo +# github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 +## explicit; go 1.20 +github.com/AdaLogics/go-fuzz-headers # github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 ## explicit; go 1.16 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm +# github.com/BurntSushi/toml v1.3.2 +## explicit; go 1.16 +github.com/BurntSushi/toml +github.com/BurntSushi/toml/internal # github.com/MakeNowJust/heredoc v1.0.0 ## explicit; go 1.12 github.com/MakeNowJust/heredoc +# github.com/Masterminds/goutils v1.1.1 +## explicit +github.com/Masterminds/goutils +# github.com/Masterminds/semver/v3 v3.3.0 +## explicit; go 1.21 +github.com/Masterminds/semver/v3 +# github.com/Masterminds/sprig/v3 v3.3.0 +## explicit; go 1.21 +github.com/Masterminds/sprig/v3 +# github.com/Masterminds/squirrel v1.5.4 +## explicit; go 1.14 +github.com/Masterminds/squirrel +# github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 +## explicit; go 1.13 +github.com/asaskevich/govalidator # github.com/aws/aws-sdk-go v1.48.0 ## explicit; go 1.19 github.com/aws/aws-sdk-go/aws @@ -83,6 +108,9 @@ github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile +# github.com/blang/semver/v4 v4.0.0 +## explicit; go 1.14 +github.com/blang/semver/v4 # github.com/blendle/zapdriver v1.3.1 ## explicit; go 1.12 github.com/blendle/zapdriver @@ -95,12 +123,83 @@ github.com/chai2010/gettext-go github.com/chai2010/gettext-go/mo github.com/chai2010/gettext-go/plural github.com/chai2010/gettext-go/po +# github.com/containerd/containerd v1.7.23 +## explicit; go 1.21 +github.com/containerd/containerd/archive/compression +github.com/containerd/containerd/content +github.com/containerd/containerd/content/local +github.com/containerd/containerd/errdefs +github.com/containerd/containerd/filters +github.com/containerd/containerd/images +github.com/containerd/containerd/labels +github.com/containerd/containerd/log +github.com/containerd/containerd/pkg/randutil +github.com/containerd/containerd/reference +github.com/containerd/containerd/remotes +github.com/containerd/containerd/remotes/docker +github.com/containerd/containerd/remotes/docker/auth +github.com/containerd/containerd/remotes/docker/schema1 +github.com/containerd/containerd/remotes/errors +github.com/containerd/containerd/tracing +github.com/containerd/containerd/version +# github.com/containerd/errdefs v0.3.0 +## explicit; go 1.20 +github.com/containerd/errdefs +# github.com/containerd/log v0.1.0 +## explicit; go 1.20 +github.com/containerd/log +# github.com/containerd/platforms v0.2.1 +## explicit; go 1.20 +github.com/containerd/platforms # github.com/cpuguy83/go-md2man/v2 v2.0.4 ## explicit; go 1.11 github.com/cpuguy83/go-md2man/v2/md2man -# github.com/davecgh/go-spew v1.1.1 +# github.com/cyphar/filepath-securejoin v0.3.4 +## explicit; go 1.21 +github.com/cyphar/filepath-securejoin +# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew +# github.com/distribution/reference v0.6.0 +## explicit; go 1.20 +github.com/distribution/reference +# github.com/docker/cli v25.0.1+incompatible +## explicit +github.com/docker/cli/cli/config +github.com/docker/cli/cli/config/configfile +github.com/docker/cli/cli/config/credentials +github.com/docker/cli/cli/config/types +# github.com/docker/distribution v2.8.3+incompatible +## explicit +github.com/docker/distribution +github.com/docker/distribution/metrics +github.com/docker/distribution/registry/api/errcode +github.com/docker/distribution/registry/api/v2 +github.com/docker/distribution/registry/client +github.com/docker/distribution/registry/client/auth +github.com/docker/distribution/registry/client/auth/challenge +github.com/docker/distribution/registry/client/transport +github.com/docker/distribution/registry/storage/cache +github.com/docker/distribution/registry/storage/cache/memory +# github.com/docker/docker v25.0.6+incompatible +## explicit +github.com/docker/docker/api/types/filters +github.com/docker/docker/api/types/registry +github.com/docker/docker/api/types/versions +github.com/docker/docker/errdefs +github.com/docker/docker/pkg/homedir +github.com/docker/docker/pkg/ioutils +github.com/docker/docker/registry +# github.com/docker/docker-credential-helpers v0.7.0 +## explicit; go 1.18 +github.com/docker/docker-credential-helpers/client +github.com/docker/docker-credential-helpers/credentials +# github.com/docker/go-connections v0.5.0 +## explicit; go 1.18 +github.com/docker/go-connections/tlsconfig +# github.com/docker/go-metrics v0.0.1 +## explicit; go 1.11 +github.com/docker/go-metrics # github.com/emicklei/go-restful/v3 v3.12.1 ## explicit; go 1.13 github.com/emicklei/go-restful/v3 @@ -118,15 +217,32 @@ github.com/exponent-io/jsonpath # github.com/fatih/camelcase v1.0.0 ## explicit github.com/fatih/camelcase +# github.com/fatih/color v1.13.0 +## explicit; go 1.13 +github.com/fatih/color +# github.com/felixge/httpsnoop v1.0.4 +## explicit; go 1.13 +github.com/felixge/httpsnoop # github.com/fsnotify/fsnotify v1.7.0 ## explicit; go 1.17 github.com/fsnotify/fsnotify # github.com/go-errors/errors v1.4.2 ## explicit; go 1.14 github.com/go-errors/errors +# github.com/go-gorp/gorp/v3 v3.1.0 +## explicit; go 1.18 +github.com/go-gorp/gorp/v3 # github.com/go-logr/logr v1.4.2 ## explicit; go 1.18 github.com/go-logr/logr +github.com/go-logr/logr/funcr +github.com/go-logr/logr/slogr +# github.com/go-logr/stdr v1.2.2 +## explicit; go 1.16 +github.com/go-logr/stdr +# github.com/go-logr/zapr v1.3.0 +## explicit; go 1.18 +github.com/go-logr/zapr # github.com/go-openapi/jsonpointer v0.21.0 ## explicit; go 1.20 github.com/go-openapi/jsonpointer @@ -141,6 +257,19 @@ github.com/go-openapi/swag ## explicit; go 1.20 github.com/go-resty/resty/v2 github.com/go-resty/resty/v2/shellescape +# github.com/go-task/slim-sprig/v3 v3.0.0 +## explicit; go 1.20 +github.com/go-task/slim-sprig/v3 +# github.com/gobwas/glob v0.2.3 +## explicit +github.com/gobwas/glob +github.com/gobwas/glob/compiler +github.com/gobwas/glob/match +github.com/gobwas/glob/syntax +github.com/gobwas/glob/syntax/ast +github.com/gobwas/glob/syntax/lexer +github.com/gobwas/glob/util/runes +github.com/gobwas/glob/util/strings # github.com/gogo/protobuf v1.3.2 ## explicit; go 1.15 github.com/gogo/protobuf/proto @@ -187,6 +316,9 @@ github.com/google/go-containerregistry/pkg/name ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource +# github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db +## explicit; go 1.22 +github.com/google/pprof/profile # github.com/google/s2a-go v0.1.7 ## explicit; go 1.19 github.com/google/s2a-go @@ -230,9 +362,23 @@ github.com/googleapis/gax-go/v2/internal # github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 ## explicit; go 1.11 github.com/googleapis/google-cloud-go-testing/storage/stiface +# github.com/gorilla/mux v1.8.0 +## explicit; go 1.12 +github.com/gorilla/mux +# github.com/gosuri/uitable v0.0.4 +## explicit +github.com/gosuri/uitable +github.com/gosuri/uitable/util/strutil +github.com/gosuri/uitable/util/wordwrap # github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 ## explicit github.com/gregjones/httpcache +# github.com/hashicorp/errwrap v1.1.0 +## explicit +github.com/hashicorp/errwrap +# github.com/hashicorp/go-multierror v1.1.1 +## explicit; go 1.13 +github.com/hashicorp/go-multierror # github.com/hashicorp/hcl v1.0.0 ## explicit github.com/hashicorp/hcl @@ -245,6 +391,9 @@ github.com/hashicorp/hcl/hcl/token github.com/hashicorp/hcl/json/parser github.com/hashicorp/hcl/json/scanner github.com/hashicorp/hcl/json/token +# github.com/huandu/xstrings v1.5.0 +## explicit; go 1.12 +github.com/huandu/xstrings # github.com/imdario/mergo v0.3.16 ## explicit; go 1.13 github.com/imdario/mergo @@ -254,6 +403,10 @@ github.com/inconshreveable/mousetrap # github.com/jmespath/go-jmespath v0.4.0 ## explicit; go 1.14 github.com/jmespath/go-jmespath +# github.com/jmoiron/sqlx v1.4.0 +## explicit; go 1.10 +github.com/jmoiron/sqlx +github.com/jmoiron/sqlx/reflectx # github.com/josharian/intern v1.0.0 ## explicit; go 1.5 github.com/josharian/intern @@ -281,6 +434,17 @@ github.com/kserve/kserve/pkg/constants github.com/kserve/kserve/pkg/credentials/gcs github.com/kserve/kserve/pkg/credentials/s3 github.com/kserve/kserve/pkg/utils +# github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 +## explicit +github.com/lann/builder +# github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 +## explicit +github.com/lann/ps +# github.com/lib/pq v1.10.9 +## explicit; go 1.13 +github.com/lib/pq +github.com/lib/pq/oid +github.com/lib/pq/scram # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter @@ -292,6 +456,18 @@ github.com/magiconair/properties github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter +# github.com/mattn/go-colorable v0.1.13 +## explicit; go 1.15 +github.com/mattn/go-colorable +# github.com/mattn/go-isatty v0.0.17 +## explicit; go 1.15 +github.com/mattn/go-isatty +# github.com/mattn/go-runewidth v0.0.9 +## explicit; go 1.9 +github.com/mattn/go-runewidth +# github.com/mitchellh/copystructure v1.2.0 +## explicit; go 1.15 +github.com/mitchellh/copystructure # github.com/mitchellh/go-homedir v1.1.0 ## explicit github.com/mitchellh/go-homedir @@ -301,11 +477,17 @@ github.com/mitchellh/go-wordwrap # github.com/mitchellh/mapstructure v1.4.3 ## explicit; go 1.14 github.com/mitchellh/mapstructure -# github.com/moby/spdystream v0.2.0 +# github.com/mitchellh/reflectwalk v1.0.2 +## explicit +github.com/mitchellh/reflectwalk +# github.com/moby/locker v1.0.1 +## explicit; go 1.13 +github.com/moby/locker +# github.com/moby/spdystream v0.4.0 ## explicit; go 1.13 github.com/moby/spdystream github.com/moby/spdystream/spdy -# github.com/moby/term v0.0.0-20221205130635-1aeaba878587 +# github.com/moby/term v0.5.0 ## explicit; go 1.18 github.com/moby/term github.com/moby/term/windows @@ -321,10 +503,49 @@ github.com/monochromegane/go-gitignore # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg +# github.com/onsi/ginkgo/v2 v2.22.0 +## explicit; go 1.22.0 +github.com/onsi/ginkgo/v2 +github.com/onsi/ginkgo/v2/config +github.com/onsi/ginkgo/v2/formatter +github.com/onsi/ginkgo/v2/ginkgo +github.com/onsi/ginkgo/v2/ginkgo/build +github.com/onsi/ginkgo/v2/ginkgo/command +github.com/onsi/ginkgo/v2/ginkgo/generators +github.com/onsi/ginkgo/v2/ginkgo/internal +github.com/onsi/ginkgo/v2/ginkgo/labels +github.com/onsi/ginkgo/v2/ginkgo/outline +github.com/onsi/ginkgo/v2/ginkgo/run +github.com/onsi/ginkgo/v2/ginkgo/unfocus +github.com/onsi/ginkgo/v2/ginkgo/watch +github.com/onsi/ginkgo/v2/internal +github.com/onsi/ginkgo/v2/internal/global +github.com/onsi/ginkgo/v2/internal/interrupt_handler +github.com/onsi/ginkgo/v2/internal/parallel_support +github.com/onsi/ginkgo/v2/internal/testingtproxy +github.com/onsi/ginkgo/v2/reporters +github.com/onsi/ginkgo/v2/types +# github.com/onsi/gomega v1.36.1 +## explicit; go 1.22 +github.com/onsi/gomega +github.com/onsi/gomega/format +github.com/onsi/gomega/internal +github.com/onsi/gomega/internal/gutil +github.com/onsi/gomega/matchers +github.com/onsi/gomega/matchers/internal/miter +github.com/onsi/gomega/matchers/support/goraph/bipartitegraph +github.com/onsi/gomega/matchers/support/goraph/edge +github.com/onsi/gomega/matchers/support/goraph/node +github.com/onsi/gomega/matchers/support/goraph/util +github.com/onsi/gomega/types # github.com/opencontainers/go-digest v1.0.0 ## explicit; go 1.13 github.com/opencontainers/go-digest -# github.com/pelletier/go-toml v1.9.4 +# github.com/opencontainers/image-spec v1.1.0 +## explicit; go 1.18 +github.com/opencontainers/image-spec/specs-go +github.com/opencontainers/image-spec/specs-go/v1 +# github.com/pelletier/go-toml v1.9.5 ## explicit; go 1.12 github.com/pelletier/go-toml # github.com/peterbourgon/diskv v2.0.1+incompatible @@ -333,7 +554,7 @@ github.com/peterbourgon/diskv # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors -# github.com/pmezard/go-difflib v1.0.0 +# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib # github.com/prometheus/client_golang v1.20.5 @@ -365,18 +586,25 @@ github.com/ray-project/kuberay/ray-operator/pkg/client/applyconfiguration/ray/v1 github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/scheme github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1 +# github.com/rubenv/sql-migrate v1.7.0 +## explicit; go 1.21 +github.com/rubenv/sql-migrate +github.com/rubenv/sql-migrate/sqlparse # github.com/russross/blackfriday/v2 v2.1.0 ## explicit github.com/russross/blackfriday/v2 -# github.com/sirupsen/logrus v1.9.1 +# github.com/shopspring/decimal v1.4.0 +## explicit; go 1.10 +github.com/shopspring/decimal +# github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 github.com/sirupsen/logrus # github.com/spf13/afero v1.6.0 ## explicit; go 1.13 github.com/spf13/afero github.com/spf13/afero/mem -# github.com/spf13/cast v1.4.1 -## explicit +# github.com/spf13/cast v1.7.0 +## explicit; go 1.19 github.com/spf13/cast # github.com/spf13/cobra v1.8.1 ## explicit; go 1.15 @@ -402,6 +630,15 @@ github.com/stretchr/testify/assert # github.com/subosito/gotenv v1.2.0 ## explicit github.com/subosito/gotenv +# github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb +## explicit +github.com/xeipuuv/gojsonpointer +# github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 +## explicit +github.com/xeipuuv/gojsonreference +# github.com/xeipuuv/gojsonschema v1.2.0 +## explicit +github.com/xeipuuv/gojsonschema # github.com/xlab/treeprint v1.2.0 ## explicit; go 1.13 github.com/xlab/treeprint @@ -424,6 +661,33 @@ go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate +# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 +## explicit; go 1.21 +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil +# go.opentelemetry.io/otel v1.28.0 +## explicit; go 1.21 +go.opentelemetry.io/otel +go.opentelemetry.io/otel/attribute +go.opentelemetry.io/otel/baggage +go.opentelemetry.io/otel/codes +go.opentelemetry.io/otel/internal +go.opentelemetry.io/otel/internal/attribute +go.opentelemetry.io/otel/internal/baggage +go.opentelemetry.io/otel/internal/global +go.opentelemetry.io/otel/propagation +go.opentelemetry.io/otel/semconv/v1.20.0 +go.opentelemetry.io/otel/semconv/v1.21.0 +go.opentelemetry.io/otel/semconv/v1.24.0 +# go.opentelemetry.io/otel/metric v1.28.0 +## explicit; go 1.21 +go.opentelemetry.io/otel/metric +go.opentelemetry.io/otel/metric/embedded +# go.opentelemetry.io/otel/trace v1.28.0 +## explicit; go 1.21 +go.opentelemetry.io/otel/trace +go.opentelemetry.io/otel/trace/embedded # go.starlark.net v0.0.0-20230525235612-a134d8f9ddca ## explicit; go 1.16 go.starlark.net/internal/compile @@ -448,7 +712,9 @@ go.uber.org/zap/internal/stacktrace go.uber.org/zap/zapcore # golang.org/x/crypto v0.29.0 ## explicit; go 1.20 +golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish +golang.org/x/crypto/cast5 golang.org/x/crypto/chacha20 golang.org/x/crypto/chacha20poly1305 golang.org/x/crypto/cryptobyte @@ -457,13 +723,26 @@ golang.org/x/crypto/curve25519 golang.org/x/crypto/hkdf golang.org/x/crypto/internal/alias golang.org/x/crypto/internal/poly1305 +golang.org/x/crypto/openpgp +golang.org/x/crypto/openpgp/armor +golang.org/x/crypto/openpgp/clearsign +golang.org/x/crypto/openpgp/elgamal +golang.org/x/crypto/openpgp/errors +golang.org/x/crypto/openpgp/packet +golang.org/x/crypto/openpgp/s2k +golang.org/x/crypto/pbkdf2 +golang.org/x/crypto/scrypt golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf # golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 ## explicit; go 1.20 golang.org/x/exp/maps -# golang.org/x/net v0.29.0 +# golang.org/x/net v0.30.0 ## explicit; go 1.18 +golang.org/x/net/context +golang.org/x/net/html +golang.org/x/net/html/atom +golang.org/x/net/html/charset golang.org/x/net/http/httpguts golang.org/x/net/http2 golang.org/x/net/http2/h2c @@ -493,6 +772,7 @@ golang.org/x/sync/semaphore # golang.org/x/sys v0.27.0 ## explicit; go 1.18 golang.org/x/sys/cpu +golang.org/x/sys/execabs golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows @@ -502,10 +782,20 @@ golang.org/x/term # golang.org/x/text v0.20.0 ## explicit; go 1.18 golang.org/x/text/encoding +golang.org/x/text/encoding/charmap +golang.org/x/text/encoding/htmlindex golang.org/x/text/encoding/internal golang.org/x/text/encoding/internal/identifier +golang.org/x/text/encoding/japanese +golang.org/x/text/encoding/korean +golang.org/x/text/encoding/simplifiedchinese +golang.org/x/text/encoding/traditionalchinese golang.org/x/text/encoding/unicode +golang.org/x/text/internal/language +golang.org/x/text/internal/language/compact +golang.org/x/text/internal/tag golang.org/x/text/internal/utf8internal +golang.org/x/text/language golang.org/x/text/runes golang.org/x/text/secure/bidirule golang.org/x/text/transform @@ -514,6 +804,10 @@ golang.org/x/text/unicode/norm # golang.org/x/time v0.6.0 ## explicit; go 1.18 golang.org/x/time/rate +# golang.org/x/tools v0.26.0 +## explicit; go 1.22.0 +golang.org/x/tools/cover +golang.org/x/tools/go/ast/inspector # golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 ## explicit; go 1.18 golang.org/x/xerrors @@ -539,22 +833,21 @@ google.golang.org/api/transport google.golang.org/api/transport/grpc google.golang.org/api/transport/http google.golang.org/api/transport/http/internal/propagation -# google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 +# google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 ## explicit; go 1.19 google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr -google.golang.org/genproto/internal -# google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 -## explicit; go 1.19 +# google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 +## explicit; go 1.20 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations -# google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 -## explicit; go 1.19 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 +## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/code google.golang.org/genproto/googleapis/rpc/errdetails google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.59.0 -## explicit; go 1.19 +# google.golang.org/grpc v1.65.0 +## explicit; go 1.21 google.golang.org/grpc google.golang.org/grpc/attributes google.golang.org/grpc/backoff @@ -563,6 +856,7 @@ google.golang.org/grpc/balancer/base google.golang.org/grpc/balancer/grpclb google.golang.org/grpc/balancer/grpclb/grpc_lb_v1 google.golang.org/grpc/balancer/grpclb/state +google.golang.org/grpc/balancer/pickfirst google.golang.org/grpc/balancer/roundrobin google.golang.org/grpc/binarylog/grpc_binarylog_v1 google.golang.org/grpc/channelz @@ -593,7 +887,6 @@ google.golang.org/grpc/internal/credentials google.golang.org/grpc/internal/envconfig google.golang.org/grpc/internal/googlecloud google.golang.org/grpc/internal/grpclog -google.golang.org/grpc/internal/grpcrand google.golang.org/grpc/internal/grpcsync google.golang.org/grpc/internal/grpcutil google.golang.org/grpc/internal/idle @@ -601,6 +894,7 @@ google.golang.org/grpc/internal/metadata google.golang.org/grpc/internal/pretty google.golang.org/grpc/internal/resolver google.golang.org/grpc/internal/resolver/dns +google.golang.org/grpc/internal/resolver/dns/internal google.golang.org/grpc/internal/resolver/passthrough google.golang.org/grpc/internal/resolver/unix google.golang.org/grpc/internal/serviceconfig @@ -608,10 +902,12 @@ google.golang.org/grpc/internal/status google.golang.org/grpc/internal/syscall google.golang.org/grpc/internal/transport google.golang.org/grpc/internal/transport/networktype +google.golang.org/grpc/internal/xds google.golang.org/grpc/keepalive google.golang.org/grpc/metadata google.golang.org/grpc/peer google.golang.org/grpc/resolver +google.golang.org/grpc/resolver/dns google.golang.org/grpc/resolver/manual google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats @@ -645,6 +941,7 @@ google.golang.org/protobuf/internal/set google.golang.org/protobuf/internal/strs google.golang.org/protobuf/internal/version google.golang.org/protobuf/proto +google.golang.org/protobuf/protoadapt google.golang.org/protobuf/reflect/protodesc google.golang.org/protobuf/reflect/protoreflect google.golang.org/protobuf/reflect/protoregistry @@ -659,6 +956,9 @@ google.golang.org/protobuf/types/known/fieldmaskpb google.golang.org/protobuf/types/known/structpb google.golang.org/protobuf/types/known/timestamppb google.golang.org/protobuf/types/known/wrapperspb +# gopkg.in/evanphx/json-patch.v4 v4.12.0 +## explicit +gopkg.in/evanphx/json-patch.v4 # gopkg.in/inf.v0 v0.9.1 ## explicit gopkg.in/inf.v0 @@ -671,11 +971,50 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 +# helm.sh/helm/v3 v3.16.3 +## explicit; go 1.22.0 +helm.sh/helm/v3/internal/fileutil +helm.sh/helm/v3/internal/resolver +helm.sh/helm/v3/internal/sympath +helm.sh/helm/v3/internal/third_party/dep/fs +helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util +helm.sh/helm/v3/internal/tlsutil +helm.sh/helm/v3/internal/urlutil +helm.sh/helm/v3/internal/version +helm.sh/helm/v3/pkg/action +helm.sh/helm/v3/pkg/chart +helm.sh/helm/v3/pkg/chart/loader +helm.sh/helm/v3/pkg/chartutil +helm.sh/helm/v3/pkg/cli +helm.sh/helm/v3/pkg/downloader +helm.sh/helm/v3/pkg/engine +helm.sh/helm/v3/pkg/getter +helm.sh/helm/v3/pkg/helmpath +helm.sh/helm/v3/pkg/helmpath/xdg +helm.sh/helm/v3/pkg/ignore +helm.sh/helm/v3/pkg/kube +helm.sh/helm/v3/pkg/kube/fake +helm.sh/helm/v3/pkg/lint +helm.sh/helm/v3/pkg/lint/rules +helm.sh/helm/v3/pkg/lint/support +helm.sh/helm/v3/pkg/plugin +helm.sh/helm/v3/pkg/postrender +helm.sh/helm/v3/pkg/provenance +helm.sh/helm/v3/pkg/pusher +helm.sh/helm/v3/pkg/registry +helm.sh/helm/v3/pkg/release +helm.sh/helm/v3/pkg/releaseutil +helm.sh/helm/v3/pkg/repo +helm.sh/helm/v3/pkg/storage +helm.sh/helm/v3/pkg/storage/driver +helm.sh/helm/v3/pkg/time +helm.sh/helm/v3/pkg/time/ctime +helm.sh/helm/v3/pkg/uploader # istio.io/api v1.19.4 ## explicit; go 1.18 istio.io/api/networking/v1alpha3 istio.io/api/type/v1beta1 -# k8s.io/api v0.30.2 => k8s.io/api v0.28.4 +# k8s.io/api v0.31.1 => k8s.io/api v0.28.4 ## explicit; go 1.20 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -732,7 +1071,7 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.29.6 => k8s.io/apiextensions-apiserver v0.28.4 +# k8s.io/apiextensions-apiserver v0.31.1 => k8s.io/apiextensions-apiserver v0.28.4 ## explicit; go 1.20 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -743,13 +1082,14 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -# k8s.io/apimachinery v0.30.2 => k8s.io/apimachinery v0.28.5 +# k8s.io/apimachinery v0.31.1 => k8s.io/apimachinery v0.28.5 ## explicit; go 1.20 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta k8s.io/apimachinery/pkg/api/resource k8s.io/apimachinery/pkg/api/validation +k8s.io/apimachinery/pkg/api/validation/path k8s.io/apimachinery/pkg/apis/meta/internalversion k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme k8s.io/apimachinery/pkg/apis/meta/v1 @@ -801,13 +1141,16 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/cli-runtime v0.28.4 => k8s.io/cli-runtime v0.28.4 +# k8s.io/apiserver v0.31.1 => k8s.io/apiserver v0.28.4 +## explicit; go 1.20 +k8s.io/apiserver/pkg/endpoints/deprecation +# k8s.io/cli-runtime v0.31.1 => k8s.io/cli-runtime v0.28.4 ## explicit; go 1.20 k8s.io/cli-runtime/pkg/genericclioptions k8s.io/cli-runtime/pkg/genericiooptions k8s.io/cli-runtime/pkg/printers k8s.io/cli-runtime/pkg/resource -# k8s.io/client-go v0.29.6 => k8s.io/client-go v0.28.4 +# k8s.io/client-go v0.31.1 => k8s.io/client-go v0.28.4 ## explicit; go 1.20 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1 @@ -965,8 +1308,9 @@ k8s.io/client-go/util/flowcontrol k8s.io/client-go/util/homedir k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil +k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/component-base v0.29.6 => k8s.io/component-base v0.28.4 +# k8s.io/component-base v0.31.1 => k8s.io/component-base v0.28.4 ## explicit; go 1.20 k8s.io/component-base/config k8s.io/component-base/config/v1alpha1 @@ -992,7 +1336,7 @@ k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/util/proto/validation k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/kubectl v0.26.4 => k8s.io/kubectl v0.28.4 +# k8s.io/kubectl v0.31.1 => k8s.io/kubectl v0.28.4 ## explicit; go 1.20 k8s.io/kubectl/pkg/apps k8s.io/kubectl/pkg/cmd/util @@ -1016,7 +1360,7 @@ k8s.io/kubectl/pkg/util/storage k8s.io/kubectl/pkg/util/templates k8s.io/kubectl/pkg/util/term k8s.io/kubectl/pkg/validation -# k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 +# k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock @@ -1063,6 +1407,20 @@ knative.dev/serving/pkg/apis/serving/v1 knative.dev/serving/pkg/autoscaler/config knative.dev/serving/pkg/autoscaler/config/autoscalerconfig knative.dev/serving/pkg/networking +# oras.land/oras-go v1.2.5 +## explicit; go 1.18 +oras.land/oras-go/pkg/artifact +oras.land/oras-go/pkg/auth +oras.land/oras-go/pkg/auth/docker +oras.land/oras-go/pkg/content +oras.land/oras-go/pkg/context +oras.land/oras-go/pkg/oras +oras.land/oras-go/pkg/registry +oras.land/oras-go/pkg/registry/remote +oras.land/oras-go/pkg/registry/remote/auth +oras.land/oras-go/pkg/registry/remote/internal/errutil +oras.land/oras-go/pkg/registry/remote/internal/syncutil +oras.land/oras-go/pkg/target # sigs.k8s.io/controller-runtime v0.17.5 ## explicit; go 1.21 sigs.k8s.io/controller-runtime @@ -1080,19 +1438,26 @@ sigs.k8s.io/controller-runtime/pkg/config/v1alpha1 sigs.k8s.io/controller-runtime/pkg/controller sigs.k8s.io/controller-runtime/pkg/controller/controllerutil sigs.k8s.io/controller-runtime/pkg/conversion +sigs.k8s.io/controller-runtime/pkg/envtest sigs.k8s.io/controller-runtime/pkg/event sigs.k8s.io/controller-runtime/pkg/handler sigs.k8s.io/controller-runtime/pkg/healthz sigs.k8s.io/controller-runtime/pkg/internal/controller sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics sigs.k8s.io/controller-runtime/pkg/internal/field/selector +sigs.k8s.io/controller-runtime/pkg/internal/flock sigs.k8s.io/controller-runtime/pkg/internal/httpserver sigs.k8s.io/controller-runtime/pkg/internal/log sigs.k8s.io/controller-runtime/pkg/internal/recorder sigs.k8s.io/controller-runtime/pkg/internal/source sigs.k8s.io/controller-runtime/pkg/internal/syncs +sigs.k8s.io/controller-runtime/pkg/internal/testing/addr +sigs.k8s.io/controller-runtime/pkg/internal/testing/certs +sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane +sigs.k8s.io/controller-runtime/pkg/internal/testing/process sigs.k8s.io/controller-runtime/pkg/leaderelection sigs.k8s.io/controller-runtime/pkg/log +sigs.k8s.io/controller-runtime/pkg/log/zap sigs.k8s.io/controller-runtime/pkg/manager sigs.k8s.io/controller-runtime/pkg/manager/signals sigs.k8s.io/controller-runtime/pkg/metrics @@ -1111,8 +1476,8 @@ sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics ## explicit; go 1.18 sigs.k8s.io/json sigs.k8s.io/json/internal/golang/encoding/json -# sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 -## explicit; go 1.19 +# sigs.k8s.io/kustomize/api v0.17.2 +## explicit; go 1.21 sigs.k8s.io/kustomize/api/filters/annotations sigs.k8s.io/kustomize/api/filters/fieldspec sigs.k8s.io/kustomize/api/filters/filtersutil @@ -1132,12 +1497,14 @@ sigs.k8s.io/kustomize/api/filters/suffix sigs.k8s.io/kustomize/api/filters/valueadd sigs.k8s.io/kustomize/api/hasher sigs.k8s.io/kustomize/api/ifc -sigs.k8s.io/kustomize/api/image sigs.k8s.io/kustomize/api/internal/accumulator sigs.k8s.io/kustomize/api/internal/builtins sigs.k8s.io/kustomize/api/internal/generators sigs.k8s.io/kustomize/api/internal/git +sigs.k8s.io/kustomize/api/internal/image +sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts sigs.k8s.io/kustomize/api/internal/kusterr +sigs.k8s.io/kustomize/api/internal/loader sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig sigs.k8s.io/kustomize/api/internal/plugins/builtinhelpers sigs.k8s.io/kustomize/api/internal/plugins/execplugin @@ -1148,17 +1515,15 @@ sigs.k8s.io/kustomize/api/internal/target sigs.k8s.io/kustomize/api/internal/utils sigs.k8s.io/kustomize/api/internal/validate sigs.k8s.io/kustomize/api/konfig -sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts sigs.k8s.io/kustomize/api/krusty sigs.k8s.io/kustomize/api/kv -sigs.k8s.io/kustomize/api/loader sigs.k8s.io/kustomize/api/provenance sigs.k8s.io/kustomize/api/provider sigs.k8s.io/kustomize/api/resmap sigs.k8s.io/kustomize/api/resource sigs.k8s.io/kustomize/api/types -# sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 -## explicit; go 1.19 +# sigs.k8s.io/kustomize/kyaml v0.17.1 +## explicit; go 1.21 sigs.k8s.io/kustomize/kyaml/comments sigs.k8s.io/kustomize/kyaml/errors sigs.k8s.io/kustomize/kyaml/ext @@ -1168,7 +1533,6 @@ sigs.k8s.io/kustomize/kyaml/fn/runtime/container sigs.k8s.io/kustomize/kyaml/fn/runtime/exec sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil sigs.k8s.io/kustomize/kyaml/fn/runtime/starlark -sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/qri-io/starlib/util sigs.k8s.io/kustomize/kyaml/kio sigs.k8s.io/kustomize/kyaml/kio/filters @@ -1212,6 +1576,7 @@ sigs.k8s.io/structured-merge-diff/v4/value ## explicit; go 1.12 sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 +sigs.k8s.io/yaml/goyaml.v3 # k8s.io/api => k8s.io/api v0.28.4 # k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.4 # k8s.io/apimachinery => k8s.io/apimachinery v0.28.5 diff --git a/vendor/oras.land/oras-go/LICENSE b/vendor/oras.land/oras-go/LICENSE new file mode 100644 index 000000000..a67d16938 --- /dev/null +++ b/vendor/oras.land/oras-go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 ORAS Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/oras.land/oras-go/pkg/artifact/consts.go b/vendor/oras.land/oras-go/pkg/artifact/consts.go new file mode 100644 index 000000000..929348723 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/artifact/consts.go @@ -0,0 +1,22 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package artifact + +const ( + // UnknownConfigMediaType is the default mediaType used when no + // config media type is specified. + UnknownConfigMediaType = "application/vnd.unknown.config.v1+json" +) diff --git a/vendor/oras.land/oras-go/pkg/auth/client.go b/vendor/oras.land/oras-go/pkg/auth/client.go new file mode 100644 index 000000000..2c3be4a61 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/client.go @@ -0,0 +1,45 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package auth + +import ( + "context" + "errors" + "net/http" + + "github.com/containerd/containerd/remotes" +) + +// Common errors +var ( + ErrNotLoggedIn = errors.New("not logged in") +) + +// Client provides authentication operations for remotes. +type Client interface { + // Login logs in to a remote server identified by the hostname. + // Deprecated: use LoginWithOpts + Login(ctx context.Context, hostname, username, secret string, insecure bool) error + // LoginWithOpts logs in to a remote server identified by the hostname with custom options + LoginWithOpts(options ...LoginOption) error + // Logout logs out from a remote server identified by the hostname. + Logout(ctx context.Context, hostname string) error + // Resolver returns a new authenticated resolver. + // Deprecated: use ResolverWithOpts + Resolver(ctx context.Context, client *http.Client, plainHTTP bool) (remotes.Resolver, error) + // ResolverWithOpts returns a new authenticated resolver with custom options. + ResolverWithOpts(options ...ResolverOption) (remotes.Resolver, error) +} diff --git a/vendor/oras.land/oras-go/pkg/auth/client_opts.go b/vendor/oras.land/oras-go/pkg/auth/client_opts.go new file mode 100644 index 000000000..f385b2408 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/client_opts.go @@ -0,0 +1,123 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package auth + +import ( + "context" + "net/http" +) + +type ( + // LoginOption allows specifying various settings on login. + LoginOption func(*LoginSettings) + + // LoginSettings represent all the various settings on login. + LoginSettings struct { + Context context.Context + Hostname string + Username string + Secret string + CertFile string + KeyFile string + CAFile string + Insecure bool + UserAgent string + } +) + +// WithLoginContext returns a function that sets the Context setting on login. +func WithLoginContext(context context.Context) LoginOption { + return func(settings *LoginSettings) { + settings.Context = context + } +} + +// WithLoginHostname returns a function that sets the Hostname setting on login. +func WithLoginHostname(hostname string) LoginOption { + return func(settings *LoginSettings) { + settings.Hostname = hostname + } +} + +// WithLoginUsername returns a function that sets the Username setting on login. +func WithLoginUsername(username string) LoginOption { + return func(settings *LoginSettings) { + settings.Username = username + } +} + +// WithLoginSecret returns a function that sets the Secret setting on login. +func WithLoginSecret(secret string) LoginOption { + return func(settings *LoginSettings) { + settings.Secret = secret + } +} + +// WithLoginInsecure returns a function that sets the Insecure setting to true on login. +func WithLoginInsecure() LoginOption { + return func(settings *LoginSettings) { + settings.Insecure = true + } +} + +// WithLoginTLS returns a function that sets the tls settings on login. +func WithLoginTLS(certFile, keyFile, caFile string) LoginOption { + return func(settings *LoginSettings) { + settings.CertFile = certFile + settings.KeyFile = keyFile + settings.CAFile = caFile + } +} + +// WithLoginUserAgent returns a function that sets the UserAgent setting on login. +func WithLoginUserAgent(userAgent string) LoginOption { + return func(settings *LoginSettings) { + settings.UserAgent = userAgent + } +} + +type ( + // ResolverOption allows specifying various settings on the resolver. + ResolverOption func(*ResolverSettings) + + // ResolverSettings represent all the various settings on a resolver. + ResolverSettings struct { + Client *http.Client + PlainHTTP bool + Headers http.Header + } +) + +// WithResolverClient returns a function that sets the Client setting on resolver. +func WithResolverClient(client *http.Client) ResolverOption { + return func(settings *ResolverSettings) { + settings.Client = client + } +} + +// WithResolverPlainHTTP returns a function that sets the PlainHTTP setting to true on resolver. +func WithResolverPlainHTTP() ResolverOption { + return func(settings *ResolverSettings) { + settings.PlainHTTP = true + } +} + +// WithResolverHeaders returns a function that sets the Headers setting on resolver. +func WithResolverHeaders(headers http.Header) ResolverOption { + return func(settings *ResolverSettings) { + settings.Headers = headers + } +} diff --git a/vendor/oras.land/oras-go/pkg/auth/docker/client.go b/vendor/oras.land/oras-go/pkg/auth/docker/client.go new file mode 100644 index 000000000..b225c89c0 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/docker/client.go @@ -0,0 +1,123 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package docker + +import ( + "os" + + "github.com/docker/cli/cli/config" + "github.com/docker/cli/cli/config/configfile" + "github.com/docker/cli/cli/config/credentials" + "github.com/pkg/errors" + + "oras.land/oras-go/pkg/auth" +) + +// Client provides authentication operations for docker registries. +type Client struct { + configs []*configfile.ConfigFile +} + +// NewClient creates a new auth client based on provided config paths. +// If not config path is provided, the default path is used. +// Credentials are read from the first config and fall backs to next. +// All changes will only be written to the first config file. +func NewClient(configPaths ...string) (auth.Client, error) { + if len(configPaths) == 0 { + cfg, err := config.Load(config.Dir()) + if err != nil { + return nil, err + } + if !cfg.ContainsAuth() { + cfg.CredentialsStore = credentials.DetectDefaultStore(cfg.CredentialsStore) + } + + return &Client{ + configs: []*configfile.ConfigFile{cfg}, + }, nil + } + + var configs []*configfile.ConfigFile + for _, path := range configPaths { + cfg, err := loadConfigFile(path) + if err != nil { + return nil, errors.Wrap(err, path) + } + configs = append(configs, cfg) + } + + return &Client{ + configs: configs, + }, nil +} + +// NewClientWithDockerFallback creates a new auth client +// which falls back on Docker's default config path. +// This allows support for ~/.docker/config.json as a fallback, +// as well as support for the DOCKER_CONFIG environment variable. +func NewClientWithDockerFallback(configPaths ...string) (auth.Client, error) { + if len(configPaths) == 0 { + return NewClient() + } + + var configs []*configfile.ConfigFile + for _, path := range configPaths { + cfg, err := loadConfigFile(path) + if err != nil { + return nil, errors.Wrap(err, path) + } + configs = append(configs, cfg) + } + + // Add the Docker default config last + dockerFallbackCfg, err := config.Load(config.Dir()) + if err != nil { + return nil, err + } + if !dockerFallbackCfg.ContainsAuth() { + dockerFallbackCfg.CredentialsStore = credentials.DetectDefaultStore(dockerFallbackCfg.CredentialsStore) + } + configs = append(configs, dockerFallbackCfg) + + return &Client{ + configs: configs, + }, nil +} + +func (c *Client) primaryCredentialsStore(hostname string) credentials.Store { + return c.configs[0].GetCredentialsStore(hostname) +} + +// loadConfigFile reads the configuration files from the given path. +func loadConfigFile(path string) (*configfile.ConfigFile, error) { + cfg := configfile.New(path) + if _, err := os.Stat(path); err == nil { + file, err := os.Open(path) + if err != nil { + return nil, err + } + defer file.Close() + if err := cfg.LoadFromReader(file); err != nil { + return nil, err + } + } else if !os.IsNotExist(err) { + return nil, err + } + if !cfg.ContainsAuth() { + cfg.CredentialsStore = credentials.DetectDefaultStore(cfg.CredentialsStore) + } + return cfg, nil +} diff --git a/vendor/oras.land/oras-go/pkg/auth/docker/login.go b/vendor/oras.land/oras-go/pkg/auth/docker/login.go new file mode 100644 index 000000000..086e9342d --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/docker/login.go @@ -0,0 +1,103 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package docker + +import ( + "context" + + ctypes "github.com/docker/cli/cli/config/types" + apiregistry "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/registry" + + iface "oras.land/oras-go/pkg/auth" +) + +const IndexHostname = "index.docker.io" + +// Login logs in to a docker registry identified by the hostname. +// Deprecated: use LoginWithOpts +func (c *Client) Login(ctx context.Context, hostname, username, secret string, insecure bool) error { + settings := &iface.LoginSettings{ + Context: ctx, + Hostname: hostname, + Username: username, + Secret: secret, + Insecure: insecure, + } + return c.login(settings) +} + +// LoginWithOpts logs in to a docker registry identified by the hostname with custom options. +func (c *Client) LoginWithOpts(options ...iface.LoginOption) error { + settings := &iface.LoginSettings{} + for _, option := range options { + option(settings) + } + return c.login(settings) +} + +func (c *Client) login(settings *iface.LoginSettings) error { + hostname := resolveHostname(settings.Hostname) + cred := apiregistry.AuthConfig{ + Username: settings.Username, + ServerAddress: hostname, + } + if settings.Username == "" { + cred.IdentityToken = settings.Secret + } else { + cred.Password = settings.Secret + } + + opts := registry.ServiceOptions{} + + if settings.Insecure { + opts.InsecureRegistries = []string{hostname} + } + + // Login to ensure valid credential + remote, err := registry.NewService(opts) + if err != nil { + return err + } + ctx := settings.Context + if ctx == nil { + ctx = context.Background() + } + userAgent := settings.UserAgent + if userAgent == "" { + userAgent = "oras" + } + + var token string + if (settings.CertFile != "" && settings.KeyFile != "") || settings.CAFile != "" { + _, token, err = c.loginWithTLS(ctx, remote, settings.CertFile, settings.KeyFile, settings.CAFile, &cred, userAgent) + } else { + _, token, err = remote.Auth(ctx, &cred, userAgent) + } + + if err != nil { + return err + } + + if token != "" { + cred.Username = "" + cred.Password = "" + cred.IdentityToken = token + } + + // Store credential + return c.primaryCredentialsStore(hostname).Store(ctypes.AuthConfig(cred)) +} diff --git a/vendor/oras.land/oras-go/pkg/auth/docker/login_tls.go b/vendor/oras.land/oras-go/pkg/auth/docker/login_tls.go new file mode 100644 index 000000000..2320ff1b3 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/docker/login_tls.go @@ -0,0 +1,220 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package docker + +import ( + "context" + "crypto/tls" + "fmt" + "net" + "net/http" + "net/url" + "strings" + "time" + + "github.com/docker/distribution/registry/api/errcode" + "github.com/docker/distribution/registry/client/auth" + "github.com/docker/distribution/registry/client/transport" + apiregistry "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/errdefs" + "github.com/docker/docker/registry" + "github.com/docker/go-connections/tlsconfig" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// The following functions are adapted from github.com/docker/docker/registry +// We need these to support passing in a transport that has custom TLS configuration +// They are not exposed in the docker/registry package that's why they are copied here + +type loginCredentialStore struct { + authConfig *apiregistry.AuthConfig +} + +func (lcs loginCredentialStore) Basic(*url.URL) (string, string) { + return lcs.authConfig.Username, lcs.authConfig.Password +} + +func (lcs loginCredentialStore) RefreshToken(*url.URL, string) string { + return lcs.authConfig.IdentityToken +} + +func (lcs loginCredentialStore) SetRefreshToken(u *url.URL, service, token string) { + lcs.authConfig.IdentityToken = token +} + +// loginWithTLS tries to login to the v2 registry server. +// A custom tls.Config is used to override the default TLS configuration of the different registry endpoints. +// The tls.Config is created using the provided certificate, certificate key and certificate authority. +func (c *Client) loginWithTLS(ctx context.Context, service *registry.Service, certFile, keyFile, caFile string, authConfig *apiregistry.AuthConfig, userAgent string) (string, string, error) { + tlsConfig, err := tlsconfig.Client(tlsconfig.Options{CAFile: caFile, CertFile: certFile, KeyFile: keyFile}) + if err != nil { + return "", "", err + } + + endpoints, err := c.getEndpoints(authConfig.ServerAddress, service) + if err != nil { + return "", "", err + } + + var status, token string + for _, endpoint := range endpoints { + endpoint.TLSConfig = tlsConfig + status, token, err = loginV2(authConfig, endpoint, userAgent) + + if err != nil { + if isNotAuthorizedError(err) { + return "", "", err + } + + logrus.WithError(err).Infof("Error logging in to endpoint, trying next endpoint") + continue + } + + return status, token, nil + } + + return "", "", err +} + +// getEndpoints returns the endpoints for the given hostname. +func (c *Client) getEndpoints(address string, service *registry.Service) ([]registry.APIEndpoint, error) { + var registryHostName = IndexHostname + + if address != "" { + if !strings.HasPrefix(address, "https://") && !strings.HasPrefix(address, "http://") { + address = fmt.Sprintf("https://%s", address) + } + u, err := url.Parse(address) + if err != nil { + return nil, errdefs.InvalidParameter(errors.Wrapf(err, "unable to parse server address")) + } + registryHostName = u.Host + } + + // Lookup endpoints for authentication using "LookupPushEndpoints", which + // excludes mirrors to prevent sending credentials of the upstream registry + // to a mirror. + endpoints, err := service.LookupPushEndpoints(registryHostName) + if err != nil { + return nil, errdefs.InvalidParameter(err) + } + + return endpoints, nil +} + +// loginV2 tries to login to the v2 registry server. The given registry +// endpoint will be pinged to get authorization challenges. These challenges +// will be used to authenticate against the registry to validate credentials. +func loginV2(authConfig *apiregistry.AuthConfig, endpoint registry.APIEndpoint, userAgent string) (string, string, error) { + var ( + endpointStr = strings.TrimRight(endpoint.URL.String(), "/") + "/v2/" + modifiers = registry.Headers(userAgent, nil) + authTransport = transport.NewTransport(newTransport(endpoint.TLSConfig), modifiers...) + credentialAuthConfig = *authConfig + creds = loginCredentialStore{authConfig: &credentialAuthConfig} + ) + + logrus.Debugf("attempting v2 login to registry endpoint %s", endpointStr) + + loginClient, err := v2AuthHTTPClient(endpoint.URL, authTransport, modifiers, creds, nil) + if err != nil { + return "", "", err + } + + req, err := http.NewRequest(http.MethodGet, endpointStr, nil) + if err != nil { + return "", "", err + } + + resp, err := loginClient.Do(req) + if err != nil { + err = translateV2AuthError(err) + return "", "", err + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusOK { + return "Login Succeeded", credentialAuthConfig.IdentityToken, nil + } + + // TODO(dmcgowan): Attempt to further interpret result, status code and error code string + return "", "", errors.Errorf("login attempt to %s failed with status: %d %s", endpointStr, resp.StatusCode, http.StatusText(resp.StatusCode)) +} + +// newTransport returns a new HTTP transport. If tlsConfig is nil, it uses the +// default TLS configuration. +func newTransport(tlsConfig *tls.Config) *http.Transport { + if tlsConfig == nil { + tlsConfig = tlsconfig.ServerDefault() + } + + direct := &net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + } + + return &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: direct.DialContext, + TLSHandshakeTimeout: 10 * time.Second, + TLSClientConfig: tlsConfig, + // TODO(dmcgowan): Call close idle connections when complete and use keep alive + DisableKeepAlives: true, + } +} + +func v2AuthHTTPClient(endpoint *url.URL, authTransport http.RoundTripper, modifiers []transport.RequestModifier, creds auth.CredentialStore, scopes []auth.Scope) (*http.Client, error) { + challengeManager, err := registry.PingV2Registry(endpoint, authTransport) + if err != nil { + return nil, err + } + + tokenHandlerOptions := auth.TokenHandlerOptions{ + Transport: authTransport, + Credentials: creds, + OfflineAccess: true, + ClientID: registry.AuthClientID, + Scopes: scopes, + } + tokenHandler := auth.NewTokenHandlerWithOptions(tokenHandlerOptions) + basicHandler := auth.NewBasicHandler(creds) + modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler, basicHandler)) + + return &http.Client{ + Transport: transport.NewTransport(authTransport, modifiers...), + Timeout: 15 * time.Second, + }, nil +} + +func translateV2AuthError(err error) error { + switch e := err.(type) { + case *url.Error: + switch e2 := e.Err.(type) { + case errcode.Error: + switch e2.Code { + case errcode.ErrorCodeUnauthorized: + return errdefs.Unauthorized(err) + } + } + } + + return err +} + +func isNotAuthorizedError(err error) bool { + return strings.Contains(err.Error(), "401 Unauthorized") +} diff --git a/vendor/oras.land/oras-go/pkg/auth/docker/logout.go b/vendor/oras.land/oras-go/pkg/auth/docker/logout.go new file mode 100644 index 000000000..ada1f2687 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/docker/logout.go @@ -0,0 +1,42 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package docker + +import ( + "context" + + "github.com/docker/cli/cli/config/configfile" + + "oras.land/oras-go/pkg/auth" +) + +// Logout logs out from a docker registry identified by the hostname. +func (c *Client) Logout(_ context.Context, hostname string) error { + hostname = resolveHostname(hostname) + + var configs []*configfile.ConfigFile + for _, config := range c.configs { + if _, ok := config.AuthConfigs[hostname]; ok { + configs = append(configs, config) + } + } + if len(configs) == 0 { + return auth.ErrNotLoggedIn + } + + // Log out form the primary config only as backups are read-only. + return c.primaryCredentialsStore(hostname).Erase(hostname) +} diff --git a/vendor/oras.land/oras-go/pkg/auth/docker/resolver.go b/vendor/oras.land/oras-go/pkg/auth/docker/resolver.go new file mode 100644 index 000000000..e749c2d2c --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/auth/docker/resolver.go @@ -0,0 +1,86 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package docker + +import ( + "context" + "net/http" + + "github.com/containerd/containerd/remotes" + "github.com/containerd/containerd/remotes/docker" + ctypes "github.com/docker/cli/cli/config/types" + "github.com/docker/docker/registry" + + iface "oras.land/oras-go/pkg/auth" +) + +// Resolver returns a new authenticated resolver. +// Deprecated: use ResolverWithOpts +func (c *Client) Resolver(_ context.Context, client *http.Client, plainHTTP bool) (remotes.Resolver, error) { + return docker.NewResolver(docker.ResolverOptions{ + Credentials: c.Credential, + Client: client, + PlainHTTP: plainHTTP, + }), nil +} + +// ResolverWithOpts returns a new authenticated resolver with custom options. +func (c *Client) ResolverWithOpts(options ...iface.ResolverOption) (remotes.Resolver, error) { + settings := &iface.ResolverSettings{} + for _, option := range options { + option(settings) + } + return docker.NewResolver(docker.ResolverOptions{ + Credentials: c.Credential, + Client: settings.Client, + PlainHTTP: settings.PlainHTTP, + Headers: settings.Headers, + }), nil +} + +// Credential returns the login credential of the request host. +func (c *Client) Credential(hostname string) (string, string, error) { + hostname = resolveHostname(hostname) + var ( + auth ctypes.AuthConfig + err error + ) + for _, cfg := range c.configs { + auth, err = cfg.GetAuthConfig(hostname) + if err != nil { + // fall back to next config + continue + } + if auth.IdentityToken != "" { + return "", auth.IdentityToken, nil + } + if auth.Username == "" && auth.Password == "" { + // fall back to next config + continue + } + return auth.Username, auth.Password, nil + } + return "", "", err +} + +// resolveHostname resolves Docker specific hostnames +func resolveHostname(hostname string) string { + switch hostname { + case registry.IndexHostname, registry.IndexName, registry.DefaultV2Registry.Host: + return registry.IndexServer + } + return hostname +} diff --git a/vendor/oras.land/oras-go/pkg/content/consts.go b/vendor/oras.land/oras-go/pkg/content/consts.go new file mode 100644 index 000000000..ae59fdaa4 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/consts.go @@ -0,0 +1,57 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +const ( + // DefaultBlobMediaType specifies the default blob media type + DefaultBlobMediaType = ocispec.MediaTypeImageLayer + // DefaultBlobDirMediaType specifies the default blob directory media type + DefaultBlobDirMediaType = ocispec.MediaTypeImageLayerGzip +) + +const ( + // TempFilePattern specifies the pattern to create temporary files + TempFilePattern = "oras" +) + +const ( + // AnnotationDigest is the annotation key for the digest of the uncompressed content + AnnotationDigest = "io.deis.oras.content.digest" + // AnnotationUnpack is the annotation key for indication of unpacking + AnnotationUnpack = "io.deis.oras.content.unpack" +) + +const ( + // OCIImageIndexFile is the file name of the index from the OCI Image Layout Specification + // Reference: https://github.com/opencontainers/image-spec/blob/master/image-layout.md#indexjson-file + OCIImageIndexFile = "index.json" +) + +const ( + // DefaultBlocksize default size of each slice of bytes read in each write through in gunzipand untar. + // Simply uses the same size as io.Copy() + DefaultBlocksize = 32768 +) + +const ( + // what you get for a blank digest + BlankHash = digest.Digest("sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") +) diff --git a/vendor/oras.land/oras-go/pkg/content/decompress.go b/vendor/oras.land/oras-go/pkg/content/decompress.go new file mode 100644 index 000000000..ecde9c9a5 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/decompress.go @@ -0,0 +1,151 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "context" + "errors" + "strings" + + ctrcontent "github.com/containerd/containerd/content" + "github.com/containerd/containerd/remotes" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// Decompress store to decompress content and extract from tar, if needed, wrapping +// another store. By default, a FileStore will simply take each artifact and write it to +// a file, as a MemoryStore will do into memory. If the artifact is gzipped or tarred, +// you might want to store the actual object inside tar or gzip. Wrap your Store +// with Decompress, and it will check the media-type and, if relevant, +// gunzip and/or untar. +// +// For example: +// +// fileStore := NewFileStore(rootPath) +// Decompress := store.NewDecompress(fileStore, WithBlocksize(blocksize)) +// +// The above example works if there is no tar, i.e. each artifact is just a single file, perhaps gzipped, +// or if there is only one file in each tar archive. In other words, when each content.Writer has only one target output stream. +// However, if you have multiple files in each tar archive, each archive of which is an artifact layer, then +// you need a way to select how to handle each file in the tar archive. In other words, when each content.Writer has more than one +// target output stream. In that case, use the following example: +// +// multiStore := NewMultiStore(rootPath) // some store that can handle different filenames +// Decompress := store.NewDecompress(multiStore, WithBlocksize(blocksize), WithMultiWriterIngester()) +// +type Decompress struct { + pusher remotes.Pusher + blocksize int + multiWriterIngester bool +} + +func NewDecompress(pusher remotes.Pusher, opts ...WriterOpt) Decompress { + // we have to reprocess the opts to find the blocksize + var wOpts WriterOpts + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + // TODO: we probably should handle errors here + continue + } + } + + return Decompress{pusher, wOpts.Blocksize, wOpts.MultiWriterIngester} +} + +// Push get a content.Writer +func (d Decompress) Push(ctx context.Context, desc ocispec.Descriptor) (ctrcontent.Writer, error) { + // the logic is straightforward: + // - if there is a desc in the opts, and the mediatype is tar or tar+gzip, then pass the correct decompress writer + // - else, pass the regular writer + var ( + writer ctrcontent.Writer + err error + multiIngester MultiWriterPusher + ok bool + ) + + // check to see if we are supposed to use a MultiWriterIngester + if d.multiWriterIngester { + multiIngester, ok = d.pusher.(MultiWriterPusher) + if !ok { + return nil, errors.New("configured to use multiwriter ingester, but ingester does not implement multiwriter") + } + } + + // figure out if compression and/or archive exists + // before we pass it down, we need to strip anything we are removing here + // and possibly update the digest, since the store indexes things by digest + hasGzip, hasTar, modifiedMediaType := checkCompression(desc.MediaType) + desc.MediaType = modifiedMediaType + // determine if we pass it blocksize, only if positive + writerOpts := []WriterOpt{} + if d.blocksize > 0 { + writerOpts = append(writerOpts, WithBlocksize(d.blocksize)) + } + + writer, err = d.pusher.Push(ctx, desc) + if err != nil { + return nil, err + } + + // do we need to wrap with an untar writer? + if hasTar { + // if not multiingester, get a regular writer + if multiIngester == nil { + writer = NewUntarWriter(writer, writerOpts...) + } else { + writers, err := multiIngester.Pushers(ctx, desc) + if err != nil { + return nil, err + } + writer = NewUntarWriterByName(writers, writerOpts...) + } + } + if hasGzip { + if writer == nil { + writer, err = d.pusher.Push(ctx, desc) + if err != nil { + return nil, err + } + } + writer = NewGunzipWriter(writer, writerOpts...) + } + return writer, nil +} + +// checkCompression check if the mediatype uses gzip compression or tar. +// Returns if it has gzip and/or tar, as well as the base media type without +// those suffixes. +func checkCompression(mediaType string) (gzip, tar bool, mt string) { + mt = mediaType + gzipSuffix := "+gzip" + gzipAltSuffix := ".gzip" + tarSuffix := ".tar" + switch { + case strings.HasSuffix(mt, gzipSuffix): + mt = mt[:len(mt)-len(gzipSuffix)] + gzip = true + case strings.HasSuffix(mt, gzipAltSuffix): + mt = mt[:len(mt)-len(gzipAltSuffix)] + gzip = true + } + + if strings.HasSuffix(mt, tarSuffix) { + mt = mt[:len(mt)-len(tarSuffix)] + tar = true + } + return +} diff --git a/vendor/oras.land/oras-go/pkg/content/errors.go b/vendor/oras.land/oras-go/pkg/content/errors.go new file mode 100644 index 000000000..72b2e727a --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/errors.go @@ -0,0 +1,33 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import "errors" + +// Common errors +var ( + ErrNotFound = errors.New("not_found") + ErrNoName = errors.New("no_name") + ErrUnsupportedSize = errors.New("unsupported_size") + ErrUnsupportedVersion = errors.New("unsupported_version") + ErrInvalidReference = errors.New("invalid_reference") +) + +// FileStore errors +var ( + ErrPathTraversalDisallowed = errors.New("path_traversal_disallowed") + ErrOverwriteDisallowed = errors.New("overwrite_disallowed") +) diff --git a/vendor/oras.land/oras-go/pkg/content/file.go b/vendor/oras.land/oras-go/pkg/content/file.go new file mode 100644 index 000000000..70f46d1ae --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/file.go @@ -0,0 +1,534 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "bytes" + "compress/gzip" + "context" + _ "crypto/sha256" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "sync" + "time" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/remotes" + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" +) + +// File provides content via files from the file system +type File struct { + DisableOverwrite bool + AllowPathTraversalOnWrite bool + + // Reproducible enables stripping times from added files + Reproducible bool + + root string + descriptor *sync.Map // map[digest.Digest]ocispec.Descriptor + pathMap *sync.Map // map[name string](file string) + memoryMap *sync.Map // map[digest.Digest]([]byte) + refMap *sync.Map // map[string]ocispec.Descriptor + tmpFiles *sync.Map + ignoreNoName bool +} + +// NewFile creats a new file target. It represents a single root reference and all of its components. +func NewFile(rootPath string, opts ...WriterOpt) *File { + // we have to process the opts to find if they told us to change defaults + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + continue + } + } + return &File{ + root: rootPath, + descriptor: &sync.Map{}, + pathMap: &sync.Map{}, + memoryMap: &sync.Map{}, + refMap: &sync.Map{}, + tmpFiles: &sync.Map{}, + ignoreNoName: wOpts.IgnoreNoName, + } +} + +func (s *File) Resolver() remotes.Resolver { + return s +} + +func (s *File) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error) { + desc, ok := s.getRef(ref) + if !ok { + return "", ocispec.Descriptor{}, fmt.Errorf("unknown reference: %s", ref) + } + return ref, desc, nil +} + +func (s *File) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error) { + if _, ok := s.refMap.Load(ref); !ok { + return nil, fmt.Errorf("unknown reference: %s", ref) + } + return s, nil +} + +// Fetch get an io.ReadCloser for the specific content +func (s *File) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + // first see if it is in the in-memory manifest map + manifest, ok := s.getMemory(desc) + if ok { + return ioutil.NopCloser(bytes.NewReader(manifest)), nil + } + desc, ok = s.get(desc) + if !ok { + return nil, ErrNotFound + } + name, ok := ResolveName(desc) + if !ok { + return nil, ErrNoName + } + path := s.ResolvePath(name) + return os.Open(path) +} + +func (s *File) Pusher(ctx context.Context, ref string) (remotes.Pusher, error) { + var tag, hash string + parts := strings.SplitN(ref, "@", 2) + if len(parts) > 0 { + tag = parts[0] + } + if len(parts) > 1 { + hash = parts[1] + } + return &filePusher{ + store: s, + ref: tag, + hash: hash, + }, nil +} + +type filePusher struct { + store *File + ref string + hash string +} + +func (s *filePusher) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) { + name, ok := ResolveName(desc) + now := time.Now() + if !ok { + // if we were not told to ignore NoName, then return an error + if !s.store.ignoreNoName { + return nil, ErrNoName + } + + // just return a nil writer - we do not want to calculate the hash, so just use + // whatever was passed in the descriptor + return NewIoContentWriter(ioutil.Discard, WithOutputHash(desc.Digest)), nil + } + path, err := s.store.resolveWritePath(name) + if err != nil { + return nil, err + } + file, afterCommit, err := s.store.createWritePath(path, desc, name) + if err != nil { + return nil, err + } + + return &fileWriter{ + store: s.store, + file: file, + desc: desc, + digester: digest.Canonical.Digester(), + status: content.Status{ + Ref: name, + Total: desc.Size, + StartedAt: now, + UpdatedAt: now, + }, + afterCommit: afterCommit, + }, nil +} + +// Add adds a file reference from a path, either directory or single file, +// and returns the reference descriptor. +func (s *File) Add(name, mediaType, path string) (ocispec.Descriptor, error) { + if path == "" { + path = name + } + path = s.MapPath(name, path) + + fileInfo, err := os.Stat(path) + if err != nil { + return ocispec.Descriptor{}, err + } + + var desc ocispec.Descriptor + if fileInfo.IsDir() { + desc, err = s.descFromDir(name, mediaType, path) + } else { + desc, err = s.descFromFile(fileInfo, mediaType, path) + } + if err != nil { + return ocispec.Descriptor{}, err + } + if desc.Annotations == nil { + desc.Annotations = make(map[string]string) + } + desc.Annotations[ocispec.AnnotationTitle] = name + + s.set(desc) + return desc, nil +} + +// Load is a lower-level memory-only version of Add. Rather than taking a path, +// generating a descriptor and creating a reference, it takes raw data and a descriptor +// that describes that data and stores it in memory. It will disappear at process +// termination. +// +// It is especially useful for adding ephemeral data, such as config, that must +// exist in order to walk a manifest. +func (s *File) Load(desc ocispec.Descriptor, data []byte) error { + s.memoryMap.Store(desc.Digest, data) + return nil +} + +// Ref gets a reference's descriptor and content +func (s *File) Ref(ref string) (ocispec.Descriptor, []byte, error) { + desc, ok := s.getRef(ref) + if !ok { + return ocispec.Descriptor{}, nil, ErrNotFound + } + // first see if it is in the in-memory manifest map + manifest, ok := s.getMemory(desc) + if !ok { + return ocispec.Descriptor{}, nil, ErrNotFound + } + return desc, manifest, nil +} + +func (s *File) descFromFile(info os.FileInfo, mediaType, path string) (ocispec.Descriptor, error) { + file, err := os.Open(path) + if err != nil { + return ocispec.Descriptor{}, err + } + defer file.Close() + digest, err := digest.FromReader(file) + if err != nil { + return ocispec.Descriptor{}, err + } + + if mediaType == "" { + mediaType = DefaultBlobMediaType + } + return ocispec.Descriptor{ + MediaType: mediaType, + Digest: digest, + Size: info.Size(), + }, nil +} + +func (s *File) descFromDir(name, mediaType, root string) (ocispec.Descriptor, error) { + // generate temp file + file, err := s.tempFile() + if err != nil { + return ocispec.Descriptor{}, err + } + defer file.Close() + s.MapPath(name, file.Name()) + + // compress directory + digester := digest.Canonical.Digester() + zw := gzip.NewWriter(io.MultiWriter(file, digester.Hash())) + defer zw.Close() + tarDigester := digest.Canonical.Digester() + if err := tarDirectory(root, name, io.MultiWriter(zw, tarDigester.Hash()), s.Reproducible); err != nil { + return ocispec.Descriptor{}, err + } + + // flush all + if err := zw.Close(); err != nil { + return ocispec.Descriptor{}, err + } + if err := file.Sync(); err != nil { + return ocispec.Descriptor{}, err + } + + // generate descriptor + if mediaType == "" { + mediaType = DefaultBlobDirMediaType + } + info, err := file.Stat() + if err != nil { + return ocispec.Descriptor{}, err + } + return ocispec.Descriptor{ + MediaType: mediaType, + Digest: digester.Digest(), + Size: info.Size(), + Annotations: map[string]string{ + AnnotationDigest: tarDigester.Digest().String(), + AnnotationUnpack: "true", + }, + }, nil +} + +func (s *File) tempFile() (*os.File, error) { + file, err := ioutil.TempFile("", TempFilePattern) + if err != nil { + return nil, err + } + s.tmpFiles.Store(file.Name(), file) + return file, nil +} + +// Close frees up resources used by the file store +func (s *File) Close() error { + var errs []string + s.tmpFiles.Range(func(name, _ interface{}) bool { + if err := os.Remove(name.(string)); err != nil { + errs = append(errs, err.Error()) + } + return true + }) + if len(errs) > 0 { + return errors.New(strings.Join(errs, "; ")) + } + return nil +} + +func (s *File) resolveWritePath(name string) (string, error) { + path := s.ResolvePath(name) + if !s.AllowPathTraversalOnWrite { + base, err := filepath.Abs(s.root) + if err != nil { + return "", err + } + target, err := filepath.Abs(path) + if err != nil { + return "", err + } + rel, err := filepath.Rel(base, target) + if err != nil { + return "", ErrPathTraversalDisallowed + } + rel = filepath.ToSlash(rel) + if strings.HasPrefix(rel, "../") || rel == ".." { + return "", ErrPathTraversalDisallowed + } + } + if s.DisableOverwrite { + if _, err := os.Stat(path); err == nil { + return "", ErrOverwriteDisallowed + } else if !os.IsNotExist(err) { + return "", err + } + } + return path, nil +} + +func (s *File) createWritePath(path string, desc ocispec.Descriptor, prefix string) (*os.File, func() error, error) { + if value, ok := desc.Annotations[AnnotationUnpack]; !ok || value != "true" { + if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil { + return nil, nil, err + } + file, err := os.Create(path) + return file, nil, err + } + + if err := os.MkdirAll(path, 0755); err != nil { + return nil, nil, err + } + file, err := s.tempFile() + checksum := desc.Annotations[AnnotationDigest] + afterCommit := func() error { + return extractTarGzip(path, prefix, file.Name(), checksum) + } + return file, afterCommit, err +} + +// MapPath maps name to path +func (s *File) MapPath(name, path string) string { + path = s.resolvePath(path) + s.pathMap.Store(name, path) + return path +} + +// ResolvePath returns the path by name +func (s *File) ResolvePath(name string) string { + if value, ok := s.pathMap.Load(name); ok { + if path, ok := value.(string); ok { + return path + } + } + + // using the name as a fallback solution + return s.resolvePath(name) +} + +func (s *File) resolvePath(path string) string { + if filepath.IsAbs(path) { + return path + } + return filepath.Join(s.root, path) +} + +func (s *File) set(desc ocispec.Descriptor) { + s.descriptor.Store(desc.Digest, desc) +} + +func (s *File) get(desc ocispec.Descriptor) (ocispec.Descriptor, bool) { + value, ok := s.descriptor.Load(desc.Digest) + if !ok { + return ocispec.Descriptor{}, false + } + desc, ok = value.(ocispec.Descriptor) + return desc, ok +} + +func (s *File) getMemory(desc ocispec.Descriptor) ([]byte, bool) { + value, ok := s.memoryMap.Load(desc.Digest) + if !ok { + return nil, false + } + content, ok := value.([]byte) + return content, ok +} + +func (s *File) getRef(ref string) (ocispec.Descriptor, bool) { + value, ok := s.refMap.Load(ref) + if !ok { + return ocispec.Descriptor{}, false + } + desc, ok := value.(ocispec.Descriptor) + return desc, ok +} + +// StoreManifest stores a manifest linked to by the provided ref. The children of the +// manifest, such as layers and config, should already exist in the file store, either +// as files linked via Add(), or via Load(). If they do not exist, then a typical +// Fetcher that walks the manifest will hit an unresolved hash. +// +// StoreManifest does *not* validate their presence. +func (s *File) StoreManifest(ref string, desc ocispec.Descriptor, manifest []byte) error { + s.refMap.Store(ref, desc) + s.memoryMap.Store(desc.Digest, manifest) + return nil +} + +type fileWriter struct { + store *File + file *os.File + desc ocispec.Descriptor + digester digest.Digester + status content.Status + afterCommit func() error +} + +func (w *fileWriter) Status() (content.Status, error) { + return w.status, nil +} + +// Digest returns the current digest of the content, up to the current write. +// +// Cannot be called concurrently with `Write`. +func (w *fileWriter) Digest() digest.Digest { + return w.digester.Digest() +} + +// Write p to the transaction. +func (w *fileWriter) Write(p []byte) (n int, err error) { + n, err = w.file.Write(p) + w.digester.Hash().Write(p[:n]) + w.status.Offset += int64(len(p)) + w.status.UpdatedAt = time.Now() + return n, err +} + +func (w *fileWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + var base content.Info + for _, opt := range opts { + if err := opt(&base); err != nil { + return err + } + } + + if w.file == nil { + return errors.Wrap(errdefs.ErrFailedPrecondition, "cannot commit on closed writer") + } + file := w.file + w.file = nil + + if err := file.Sync(); err != nil { + file.Close() + return errors.Wrap(err, "sync failed") + } + + fileInfo, err := file.Stat() + if err != nil { + file.Close() + return errors.Wrap(err, "stat failed") + } + if err := file.Close(); err != nil { + return errors.Wrap(err, "failed to close file") + } + + if size > 0 && size != fileInfo.Size() { + return errors.Wrapf(errdefs.ErrFailedPrecondition, "unexpected commit size %d, expected %d", fileInfo.Size(), size) + } + if dgst := w.digester.Digest(); expected != "" && expected != dgst { + return errors.Wrapf(errdefs.ErrFailedPrecondition, "unexpected commit digest %s, expected %s", dgst, expected) + } + + w.store.set(w.desc) + if w.afterCommit != nil { + return w.afterCommit() + } + return nil +} + +// Close the writer, flushing any unwritten data and leaving the progress in +// tact. +func (w *fileWriter) Close() error { + if w.file == nil { + return nil + } + + w.file.Sync() + err := w.file.Close() + w.file = nil + return err +} + +func (w *fileWriter) Truncate(size int64) error { + if size != 0 { + return ErrUnsupportedSize + } + w.status.Offset = 0 + w.digester.Hash().Reset() + if _, err := w.file.Seek(0, io.SeekStart); err != nil { + return err + } + return w.file.Truncate(0) +} diff --git a/vendor/oras.land/oras-go/pkg/content/gunzip.go b/vendor/oras.land/oras-go/pkg/content/gunzip.go new file mode 100644 index 000000000..65c4646f2 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/gunzip.go @@ -0,0 +1,72 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "compress/gzip" + "fmt" + "io" + + "github.com/containerd/containerd/content" +) + +// NewGunzipWriter wrap a writer with a gunzip, so that the stream is gunzipped +// +// By default, it calculates the hash when writing. If the option `skipHash` is true, +// it will skip doing the hash. Skipping the hash is intended to be used only +// if you are confident about the validity of the data being passed to the writer, +// and wish to save on the hashing time. +func NewGunzipWriter(writer content.Writer, opts ...WriterOpt) content.Writer { + // process opts for default + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil + } + } + return NewPassthroughWriter(writer, func(r io.Reader, w io.Writer, done chan<- error) { + gr, err := gzip.NewReader(r) + if err != nil { + done <- fmt.Errorf("error creating gzip reader: %v", err) + return + } + // write out the uncompressed data + b := make([]byte, wOpts.Blocksize, wOpts.Blocksize) + for { + var n int + n, err = gr.Read(b) + if err != nil && err != io.EOF { + err = fmt.Errorf("GunzipWriter data read error: %v\n", err) + break + } + l := n + if n > len(b) { + l = len(b) + } + if _, err2 := w.Write(b[:l]); err2 != nil { + err = fmt.Errorf("GunzipWriter: error writing to underlying writer: %v", err2) + break + } + if err == io.EOF { + // clear the error + err = nil + break + } + } + gr.Close() + done <- err + }, opts...) +} diff --git a/vendor/oras.land/oras-go/pkg/content/interface.go b/vendor/oras.land/oras-go/pkg/content/interface.go new file mode 100644 index 000000000..f5e312cca --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/interface.go @@ -0,0 +1,26 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "github.com/containerd/containerd/remotes" +) + +// ProvideIngester is the interface that groups the basic Read and Write methods. +type Store interface { + remotes.Pusher + remotes.Fetcher +} diff --git a/vendor/oras.land/oras-go/pkg/content/iowriter.go b/vendor/oras.land/oras-go/pkg/content/iowriter.go new file mode 100644 index 000000000..e9e2ed8bf --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/iowriter.go @@ -0,0 +1,112 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "context" + "io" + "io/ioutil" + + "github.com/containerd/containerd/content" + "github.com/opencontainers/go-digest" +) + +// IoContentWriter writer that wraps an io.Writer, so the results can be streamed to +// an open io.Writer. For example, can be used to pull a layer and write it to a file, or device. +type IoContentWriter struct { + writer io.Writer + digester digest.Digester + size int64 + hash *digest.Digest +} + +// NewIoContentWriter create a new IoContentWriter. +// +// By default, it calculates the hash when writing. If the option `skipHash` is true, +// it will skip doing the hash. Skipping the hash is intended to be used only +// if you are confident about the validity of the data being passed to the writer, +// and wish to save on the hashing time. +func NewIoContentWriter(writer io.Writer, opts ...WriterOpt) content.Writer { + w := writer + if w == nil { + w = ioutil.Discard + } + // process opts for default + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil + } + } + ioc := &IoContentWriter{ + writer: w, + digester: digest.Canonical.Digester(), + // we take the OutputHash, since the InputHash goes to the passthrough writer, + // which then passes the processed output to us + hash: wOpts.OutputHash, + } + return NewPassthroughWriter(ioc, func(r io.Reader, w io.Writer, done chan<- error) { + // write out the data to the io writer + var ( + err error + ) + // we could use io.Copy, but calling it with the default blocksize is identical to + // io.CopyBuffer. Otherwise, we would need some way to let the user flag "I want to use + // io.Copy", when it should not matter to them + b := make([]byte, wOpts.Blocksize, wOpts.Blocksize) + _, err = io.CopyBuffer(w, r, b) + done <- err + }, opts...) +} + +func (w *IoContentWriter) Write(p []byte) (n int, err error) { + n, err = w.writer.Write(p) + if err != nil { + return 0, err + } + w.size += int64(n) + if w.hash == nil { + w.digester.Hash().Write(p[:n]) + } + return +} + +func (w *IoContentWriter) Close() error { + return nil +} + +// Digest may return empty digest or panics until committed. +func (w *IoContentWriter) Digest() digest.Digest { + return w.digester.Digest() +} + +// Commit commits the blob (but no roll-back is guaranteed on an error). +// size and expected can be zero-value when unknown. +// Commit always closes the writer, even on error. +// ErrAlreadyExists aborts the writer. +func (w *IoContentWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + return nil +} + +// Status returns the current state of write +func (w *IoContentWriter) Status() (content.Status, error) { + return content.Status{}, nil +} + +// Truncate updates the size of the target blob +func (w *IoContentWriter) Truncate(size int64) error { + return nil +} diff --git a/vendor/oras.land/oras-go/pkg/content/manifest.go b/vendor/oras.land/oras-go/pkg/content/manifest.go new file mode 100644 index 000000000..9830920b4 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/manifest.go @@ -0,0 +1,95 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package content + +import ( + "encoding/json" + "sort" + + "github.com/opencontainers/go-digest" + specs "github.com/opencontainers/image-spec/specs-go" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + artifact "oras.land/oras-go/pkg/artifact" +) + +// GenerateManifest generates a manifest. The manifest will include the provided config, +// and descs as layers. Raw bytes will be returned. +func GenerateManifest(config *ocispec.Descriptor, annotations map[string]string, descs ...ocispec.Descriptor) ([]byte, ocispec.Descriptor, error) { + // Config - either it was set, or we have to set it + if config == nil { + _, configGen, err := GenerateConfig(nil) + if err != nil { + return nil, ocispec.Descriptor{}, err + } + config = &configGen + } + return pack(*config, annotations, descs) +} + +// GenerateConfig generates a blank config with optional annotations. +func GenerateConfig(annotations map[string]string) ([]byte, ocispec.Descriptor, error) { + configBytes := []byte("{}") + dig := digest.FromBytes(configBytes) + config := ocispec.Descriptor{ + MediaType: artifact.UnknownConfigMediaType, + Digest: dig, + Size: int64(len(configBytes)), + Annotations: annotations, + } + return configBytes, config, nil +} + +// GenerateManifestAndConfig generates a config and then a manifest. Raw bytes will be returned. +func GenerateManifestAndConfig(manifestAnnotations map[string]string, configAnnotations map[string]string, descs ...ocispec.Descriptor) (manifest []byte, manifestDesc ocispec.Descriptor, config []byte, configDesc ocispec.Descriptor, err error) { + config, configDesc, err = GenerateConfig(configAnnotations) + if err != nil { + return nil, ocispec.Descriptor{}, nil, ocispec.Descriptor{}, err + } + manifest, manifestDesc, err = GenerateManifest(&configDesc, manifestAnnotations, descs...) + if err != nil { + return nil, ocispec.Descriptor{}, nil, ocispec.Descriptor{}, err + } + return +} + +// pack given a bunch of descriptors, create a manifest that references all of them +func pack(config ocispec.Descriptor, annotations map[string]string, descriptors []ocispec.Descriptor) ([]byte, ocispec.Descriptor, error) { + if descriptors == nil { + descriptors = []ocispec.Descriptor{} // make it an empty array to prevent potential server-side bugs + } + // sort descriptors alphanumerically by sha hash so it always is consistent + sort.Slice(descriptors, func(i, j int) bool { + return descriptors[i].Digest < descriptors[j].Digest + }) + manifest := ocispec.Manifest{ + Versioned: specs.Versioned{ + SchemaVersion: 2, // historical value. does not pertain to OCI or docker version + }, + Config: config, + Layers: descriptors, + Annotations: annotations, + } + manifestBytes, err := json.Marshal(manifest) + if err != nil { + return nil, ocispec.Descriptor{}, err + } + manifestDescriptor := ocispec.Descriptor{ + MediaType: ocispec.MediaTypeImageManifest, + Digest: digest.FromBytes(manifestBytes), + Size: int64(len(manifestBytes)), + } + + return manifestBytes, manifestDescriptor, nil +} diff --git a/vendor/oras.land/oras-go/pkg/content/memory.go b/vendor/oras.land/oras-go/pkg/content/memory.go new file mode 100644 index 000000000..5c194b15a --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/memory.go @@ -0,0 +1,284 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "bytes" + "context" + "fmt" + "io" + "io/ioutil" + "strings" + "sync" + "time" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/remotes" + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" +) + +// Memory provides content from the memory +type Memory struct { + descriptor map[digest.Digest]ocispec.Descriptor + content map[digest.Digest][]byte + nameMap map[string]ocispec.Descriptor + refMap map[string]ocispec.Descriptor + lock *sync.Mutex +} + +// NewMemory creats a new memory store +func NewMemory() *Memory { + return &Memory{ + descriptor: make(map[digest.Digest]ocispec.Descriptor), + content: make(map[digest.Digest][]byte), + nameMap: make(map[string]ocispec.Descriptor), + refMap: make(map[string]ocispec.Descriptor), + lock: &sync.Mutex{}, + } +} + +func (s *Memory) Resolver() remotes.Resolver { + return s +} + +func (s *Memory) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error) { + desc, ok := s.refMap[ref] + if !ok { + return "", ocispec.Descriptor{}, fmt.Errorf("unknown reference: %s", ref) + } + return ref, desc, nil +} + +func (s *Memory) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error) { + if _, ok := s.refMap[ref]; !ok { + return nil, fmt.Errorf("unknown reference: %s", ref) + } + return s, nil +} + +// Fetch get an io.ReadCloser for the specific content +func (s *Memory) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + _, content, ok := s.Get(desc) + if !ok { + return nil, ErrNotFound + } + return ioutil.NopCloser(bytes.NewReader(content)), nil +} + +func (s *Memory) Pusher(ctx context.Context, ref string) (remotes.Pusher, error) { + var tag, hash string + parts := strings.SplitN(ref, "@", 2) + if len(parts) > 0 { + tag = parts[0] + } + if len(parts) > 1 { + hash = parts[1] + } + return &memoryPusher{ + store: s, + ref: tag, + hash: hash, + }, nil +} + +type memoryPusher struct { + store *Memory + ref string + hash string +} + +func (s *memoryPusher) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) { + name, _ := ResolveName(desc) + now := time.Now() + // is this the root? + if desc.Digest.String() == s.hash { + s.store.refMap[s.ref] = desc + } + return &memoryWriter{ + store: s.store, + buffer: bytes.NewBuffer(nil), + desc: desc, + digester: digest.Canonical.Digester(), + status: content.Status{ + Ref: name, + Total: desc.Size, + StartedAt: now, + UpdatedAt: now, + }, + }, nil +} + +// Add adds content, generating a descriptor and returning it. +func (s *Memory) Add(name, mediaType string, content []byte) (ocispec.Descriptor, error) { + var annotations map[string]string + if name != "" { + annotations = map[string]string{ + ocispec.AnnotationTitle: name, + } + } + + if mediaType == "" { + mediaType = DefaultBlobMediaType + } + + desc := ocispec.Descriptor{ + MediaType: mediaType, + Digest: digest.FromBytes(content), + Size: int64(len(content)), + Annotations: annotations, + } + + s.Set(desc, content) + return desc, nil +} + +// Set adds the content to the store +func (s *Memory) Set(desc ocispec.Descriptor, content []byte) { + s.lock.Lock() + defer s.lock.Unlock() + + s.descriptor[desc.Digest] = desc + s.content[desc.Digest] = content + + if name, ok := ResolveName(desc); ok && name != "" { + s.nameMap[name] = desc + } +} + +// Get finds the content from the store +func (s *Memory) Get(desc ocispec.Descriptor) (ocispec.Descriptor, []byte, bool) { + s.lock.Lock() + defer s.lock.Unlock() + + desc, ok := s.descriptor[desc.Digest] + if !ok { + return ocispec.Descriptor{}, nil, false + } + content, ok := s.content[desc.Digest] + return desc, content, ok +} + +// GetByName finds the content from the store by name (i.e. AnnotationTitle) +func (s *Memory) GetByName(name string) (ocispec.Descriptor, []byte, bool) { + s.lock.Lock() + defer s.lock.Unlock() + + desc, ok := s.nameMap[name] + if !ok { + return ocispec.Descriptor{}, nil, false + } + content, ok := s.content[desc.Digest] + return desc, content, ok +} + +// StoreManifest stores a manifest linked to by the provided ref. The children of the +// manifest, such as layers and config, should already exist in the file store, either +// as files linked via Add(), or via Set(). If they do not exist, then a typical +// Fetcher that walks the manifest will hit an unresolved hash. +// +// StoreManifest does *not* validate their presence. +func (s *Memory) StoreManifest(ref string, desc ocispec.Descriptor, manifest []byte) error { + s.refMap[ref] = desc + s.Add("", desc.MediaType, manifest) + return nil +} + +func descFromBytes(b []byte, mediaType string) (ocispec.Descriptor, error) { + digest, err := digest.FromReader(bytes.NewReader(b)) + if err != nil { + return ocispec.Descriptor{}, err + } + + if mediaType == "" { + mediaType = DefaultBlobMediaType + } + return ocispec.Descriptor{ + MediaType: mediaType, + Digest: digest, + Size: int64(len(b)), + }, nil +} + +type memoryWriter struct { + store *Memory + buffer *bytes.Buffer + desc ocispec.Descriptor + digester digest.Digester + status content.Status +} + +func (w *memoryWriter) Status() (content.Status, error) { + return w.status, nil +} + +// Digest returns the current digest of the content, up to the current write. +// +// Cannot be called concurrently with `Write`. +func (w *memoryWriter) Digest() digest.Digest { + return w.digester.Digest() +} + +// Write p to the transaction. +func (w *memoryWriter) Write(p []byte) (n int, err error) { + n, err = w.buffer.Write(p) + w.digester.Hash().Write(p[:n]) + w.status.Offset += int64(len(p)) + w.status.UpdatedAt = time.Now() + return n, err +} + +func (w *memoryWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + var base content.Info + for _, opt := range opts { + if err := opt(&base); err != nil { + return err + } + } + + if w.buffer == nil { + return errors.Wrap(errdefs.ErrFailedPrecondition, "cannot commit on closed writer") + } + content := w.buffer.Bytes() + w.buffer = nil + + if size > 0 && size != int64(len(content)) { + return errors.Wrapf(errdefs.ErrFailedPrecondition, "unexpected commit size %d, expected %d", len(content), size) + } + if dgst := w.digester.Digest(); expected != "" && expected != dgst { + return errors.Wrapf(errdefs.ErrFailedPrecondition, "unexpected commit digest %s, expected %s", dgst, expected) + } + + w.store.Set(w.desc, content) + return nil +} + +func (w *memoryWriter) Close() error { + w.buffer = nil + return nil +} + +func (w *memoryWriter) Truncate(size int64) error { + if size != 0 { + return ErrUnsupportedSize + } + w.status.Offset = 0 + w.digester.Hash().Reset() + w.buffer.Truncate(0) + return nil +} diff --git a/vendor/oras.land/oras-go/pkg/content/multireader.go b/vendor/oras.land/oras-go/pkg/content/multireader.go new file mode 100644 index 000000000..8dba773da --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/multireader.go @@ -0,0 +1,56 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "context" + "fmt" + "io" + + "github.com/containerd/containerd/remotes" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// MultiReader store to read content from multiple stores. It finds the content by asking each underlying +// store to find the content, which it does based on the hash. +// +// Example: +// fileStore := NewFileStore(rootPath) +// memoryStore := NewMemoryStore() +// // load up content in fileStore and memoryStore +// multiStore := MultiReader([]content.Provider{fileStore, memoryStore}) +// +// You now can use multiStore anywhere that content.Provider is accepted +type MultiReader struct { + stores []remotes.Fetcher +} + +// AddStore add a store to read from +func (m *MultiReader) AddStore(store ...remotes.Fetcher) { + m.stores = append(m.stores, store...) +} + +// ReaderAt get a reader +func (m MultiReader) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + for _, store := range m.stores { + r, err := store.Fetch(ctx, desc) + if r != nil && err == nil { + return r, nil + } + } + // we did not find any + return nil, fmt.Errorf("not found") +} diff --git a/vendor/oras.land/oras-go/pkg/content/multiwriter.go b/vendor/oras.land/oras-go/pkg/content/multiwriter.go new file mode 100644 index 000000000..1e69bcdf3 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/multiwriter.go @@ -0,0 +1,42 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "context" + + ctrcontent "github.com/containerd/containerd/content" + "github.com/containerd/containerd/remotes" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// MultiWriterIngester an ingester that can provide a single writer or multiple writers for a single +// descriptor. Useful when the target of a descriptor can have multiple items within it, e.g. a layer +// that is a tar file with multiple files, each of which should go to a different stream, some of which +// should not be handled at all. +type MultiWriterIngester interface { + ctrcontent.Ingester + Writers(ctx context.Context, opts ...ctrcontent.WriterOpt) (func(string) (ctrcontent.Writer, error), error) +} + +// MultiWriterPusher a pusher that can provide a single writer or multiple writers for a single +// descriptor. Useful when the target of a descriptor can have multiple items within it, e.g. a layer +// that is a tar file with multiple files, each of which should go to a different stream, some of which +// should not be handled at all. +type MultiWriterPusher interface { + remotes.Pusher + Pushers(ctx context.Context, desc ocispec.Descriptor) (func(string) (ctrcontent.Writer, error), error) +} diff --git a/vendor/oras.land/oras-go/pkg/content/oci.go b/vendor/oras.land/oras-go/pkg/content/oci.go new file mode 100644 index 000000000..c5849ad76 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/oci.go @@ -0,0 +1,335 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package content + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/content/local" + "github.com/containerd/containerd/remotes" + "github.com/opencontainers/go-digest" + specs "github.com/opencontainers/image-spec/specs-go" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// OCI provides content from the file system with the OCI-Image layout. +// Reference: https://github.com/opencontainers/image-spec/blob/master/image-layout.md +type OCI struct { + content.Store + + root string + index *ocispec.Index + nameMap map[string]ocispec.Descriptor +} + +// NewOCI creates a new OCI store +func NewOCI(rootPath string) (*OCI, error) { + fileStore, err := local.NewStore(rootPath) + if err != nil { + return nil, err + } + + store := &OCI{ + Store: fileStore, + root: rootPath, + } + if err := store.validateOCILayoutFile(); err != nil { + return nil, err + } + if err := store.LoadIndex(); err != nil { + return nil, err + } + + return store, nil +} + +// LoadIndex reads the index.json from the file system +func (s *OCI) LoadIndex() error { + path := filepath.Join(s.root, OCIImageIndexFile) + indexFile, err := os.Open(path) + if err != nil { + if !os.IsNotExist(err) { + return err + } + s.index = &ocispec.Index{ + Versioned: specs.Versioned{ + SchemaVersion: 2, // historical value + }, + } + s.nameMap = make(map[string]ocispec.Descriptor) + + return nil + } + defer indexFile.Close() + + if err := json.NewDecoder(indexFile).Decode(&s.index); err != nil { + return err + } + + s.nameMap = make(map[string]ocispec.Descriptor) + for _, desc := range s.index.Manifests { + if name := desc.Annotations[ocispec.AnnotationRefName]; name != "" { + s.nameMap[name] = desc + } + } + + return nil +} + +// SaveIndex writes the index.json to the file system +func (s *OCI) SaveIndex() error { + // first need to update the index + var descs []ocispec.Descriptor + for name, desc := range s.nameMap { + if desc.Annotations == nil { + desc.Annotations = map[string]string{} + } + desc.Annotations[ocispec.AnnotationRefName] = name + descs = append(descs, desc) + } + s.index.Manifests = descs + indexJSON, err := json.Marshal(s.index) + if err != nil { + return err + } + + path := filepath.Join(s.root, OCIImageIndexFile) + return ioutil.WriteFile(path, indexJSON, 0644) +} + +func (s *OCI) Resolver() remotes.Resolver { + return s +} + +func (s *OCI) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error) { + if err := s.LoadIndex(); err != nil { + return "", ocispec.Descriptor{}, err + } + desc, ok := s.nameMap[ref] + if !ok { + return "", ocispec.Descriptor{}, fmt.Errorf("reference %s not in store", ref) + } + return ref, desc, nil +} + +func (s *OCI) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error) { + if err := s.LoadIndex(); err != nil { + return nil, err + } + if _, ok := s.nameMap[ref]; !ok { + return nil, fmt.Errorf("reference %s not in store", ref) + } + return s, nil +} + +// Fetch get an io.ReadCloser for the specific content +func (s *OCI) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + readerAt, err := s.Store.ReaderAt(ctx, desc) + if err != nil { + return nil, err + } + // just wrap the ReaderAt with a Reader + return ioutil.NopCloser(&ReaderAtWrapper{readerAt: readerAt}), nil +} + +// Pusher get a remotes.Pusher for the given ref +func (s *OCI) Pusher(ctx context.Context, ref string) (remotes.Pusher, error) { + // separate the tag based ref from the hash + var ( + baseRef, hash string + ) + parts := strings.SplitN(ref, "@", 2) + baseRef = parts[0] + if len(parts) > 1 { + hash = parts[1] + } + return &ociPusher{oci: s, ref: baseRef, digest: hash}, nil +} + +// AddReference adds or updates an reference to index. +func (s *OCI) AddReference(name string, desc ocispec.Descriptor) { + if desc.Annotations == nil { + desc.Annotations = map[string]string{ + ocispec.AnnotationRefName: name, + } + } else { + desc.Annotations[ocispec.AnnotationRefName] = name + } + + if _, ok := s.nameMap[name]; ok { + s.nameMap[name] = desc + + for i, ref := range s.index.Manifests { + if name == ref.Annotations[ocispec.AnnotationRefName] { + s.index.Manifests[i] = desc + return + } + } + + // Process should not reach here. + // Fallthrough to `Add` scenario and recover. + s.index.Manifests = append(s.index.Manifests, desc) + return + } + + s.index.Manifests = append(s.index.Manifests, desc) + s.nameMap[name] = desc +} + +// DeleteReference deletes an reference from index. +func (s *OCI) DeleteReference(name string) { + if _, ok := s.nameMap[name]; !ok { + return + } + + delete(s.nameMap, name) + for i, desc := range s.index.Manifests { + if name == desc.Annotations[ocispec.AnnotationRefName] { + s.index.Manifests[i] = s.index.Manifests[len(s.index.Manifests)-1] + s.index.Manifests = s.index.Manifests[:len(s.index.Manifests)-1] + return + } + } +} + +// ListReferences lists all references in index. +func (s *OCI) ListReferences() map[string]ocispec.Descriptor { + return s.nameMap +} + +// validateOCILayoutFile ensures the `oci-layout` file +func (s *OCI) validateOCILayoutFile() error { + layoutFilePath := filepath.Join(s.root, ocispec.ImageLayoutFile) + layoutFile, err := os.Open(layoutFilePath) + if err != nil { + if !os.IsNotExist(err) { + return err + } + + layout := ocispec.ImageLayout{ + Version: ocispec.ImageLayoutVersion, + } + layoutJSON, err := json.Marshal(layout) + if err != nil { + return err + } + + return ioutil.WriteFile(layoutFilePath, layoutJSON, 0644) + } + defer layoutFile.Close() + + var layout *ocispec.ImageLayout + err = json.NewDecoder(layoutFile).Decode(&layout) + if err != nil { + return err + } + if layout.Version != ocispec.ImageLayoutVersion { + return ErrUnsupportedVersion + } + + return nil +} + +// Info will return metadata about content available in the content store. +// Abort completely cancels the ingest operation targeted by ref. +func (s *OCI) Info(ctx context.Context, dgst digest.Digest) (content.Info, error) { + return s.Store.Info(ctx, dgst) +} + +// TODO: implement (needed to create a content.Store) +// Update updates mutable information related to content. +// If one or more fieldpaths are provided, only those +// fields will be updated. +// Mutable fields: +// labels.* +func (s *OCI) Update(ctx context.Context, info content.Info, fieldpaths ...string) (content.Info, error) { + return content.Info{}, errors.New("not yet implemented: Update (content.Store interface)") +} + +// TODO: implement (needed to create a content.Store) +// Walk will call fn for each item in the content store which +// match the provided filters. If no filters are given all +// items will be walked. +func (s *OCI) Walk(ctx context.Context, fn content.WalkFunc, filters ...string) error { + return errors.New("not yet implemented: Walk (content.Store interface)") +} + +// Delete removes the content from the store. +func (s *OCI) Delete(ctx context.Context, dgst digest.Digest) error { + return s.Store.Delete(ctx, dgst) +} + +// TODO: implement (needed to create a content.Store) +func (s *OCI) Status(ctx context.Context, ref string) (content.Status, error) { + // Status returns the status of the provided ref. + return content.Status{}, errors.New("not yet implemented: Status (content.Store interface)") +} + +// TODO: implement (needed to create a content.Store) +// ListStatuses returns the status of any active ingestions whose ref match the +// provided regular expression. If empty, all active ingestions will be +// returned. +func (s *OCI) ListStatuses(ctx context.Context, filters ...string) ([]content.Status, error) { + return []content.Status{}, errors.New("not yet implemented: ListStatuses (content.Store interface)") +} + +// TODO: implement (needed to create a content.Store) +// Abort completely cancels the ingest operation targeted by ref. +func (s *OCI) Abort(ctx context.Context, ref string) error { + return errors.New("not yet implemented: Abort (content.Store interface)") +} + +// ReaderAt provides contents +func (s *OCI) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error) { + return s.Store.ReaderAt(ctx, desc) +} + +// ociPusher to push content for a single referencem can handle multiple descriptors. +// Needs to be able to recognize when a root manifest is being pushed and to create the tag +// for it. +type ociPusher struct { + oci *OCI + ref string + digest string +} + +// Push get a writer for a single Descriptor +func (p *ociPusher) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) { + // do we need to create a tag? + switch desc.MediaType { + case ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex: + // if the hash of the content matches that which was provided as the hash for the root, mark it + if p.digest != "" && p.digest == desc.Digest.String() { + if err := p.oci.LoadIndex(); err != nil { + return nil, err + } + p.oci.nameMap[p.ref] = desc + if err := p.oci.SaveIndex(); err != nil { + return nil, err + } + } + } + + return p.oci.Store.Writer(ctx, content.WithDescriptor(desc), content.WithRef(p.ref)) +} diff --git a/vendor/oras.land/oras-go/pkg/content/opts.go b/vendor/oras.land/oras-go/pkg/content/opts.go new file mode 100644 index 000000000..f6eaac692 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/opts.go @@ -0,0 +1,112 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "errors" + + "github.com/opencontainers/go-digest" +) + +type WriterOpts struct { + InputHash *digest.Digest + OutputHash *digest.Digest + Blocksize int + MultiWriterIngester bool + IgnoreNoName bool +} + +type WriterOpt func(*WriterOpts) error + +func DefaultWriterOpts() WriterOpts { + return WriterOpts{ + InputHash: nil, + OutputHash: nil, + Blocksize: DefaultBlocksize, + IgnoreNoName: true, + } +} + +// WithInputHash provide the expected input hash to a writer. Writers +// may suppress their own calculation of a hash on the stream, taking this +// hash instead. If the Writer processes the data before passing it on to another +// Writer layer, this is the hash of the *input* stream. +// +// To have a blank hash, use WithInputHash(BlankHash). +func WithInputHash(hash digest.Digest) WriterOpt { + return func(w *WriterOpts) error { + w.InputHash = &hash + return nil + } +} + +// WithOutputHash provide the expected output hash to a writer. Writers +// may suppress their own calculation of a hash on the stream, taking this +// hash instead. If the Writer processes the data before passing it on to another +// Writer layer, this is the hash of the *output* stream. +// +// To have a blank hash, use WithInputHash(BlankHash). +func WithOutputHash(hash digest.Digest) WriterOpt { + return func(w *WriterOpts) error { + w.OutputHash = &hash + return nil + } +} + +// WithBlocksize set the blocksize used by the processor of data. +// The default is DefaultBlocksize, which is the same as that used by io.Copy. +// Includes a safety check to ensure the caller doesn't actively set it to <= 0. +func WithBlocksize(blocksize int) WriterOpt { + return func(w *WriterOpts) error { + if blocksize <= 0 { + return errors.New("blocksize must be greater than or equal to 0") + } + w.Blocksize = blocksize + return nil + } +} + +// WithMultiWriterIngester the passed ingester also implements MultiWriter +// and should be used as such. If this is set to true, but the ingester does not +// implement MultiWriter, calling Writer should return an error. +func WithMultiWriterIngester() WriterOpt { + return func(w *WriterOpts) error { + w.MultiWriterIngester = true + return nil + } +} + +// WithErrorOnNoName some ingesters, when creating a Writer, do not return an error if +// the descriptor does not have a valid name on the descriptor. Passing WithErrorOnNoName +// tells the writer to return an error instead of passing the data to a nil writer. +func WithErrorOnNoName() WriterOpt { + return func(w *WriterOpts) error { + w.IgnoreNoName = false + return nil + } +} + +// WithIgnoreNoName some ingesters, when creating a Writer, return an error if +// the descriptor does not have a valid name on the descriptor. Passing WithIgnoreNoName +// tells the writer not to return an error, but rather to pass the data to a nil writer. +// +// Deprecated: Use WithErrorOnNoName +func WithIgnoreNoName() WriterOpt { + return func(w *WriterOpts) error { + w.IgnoreNoName = true + return nil + } +} diff --git a/vendor/oras.land/oras-go/pkg/content/passthrough.go b/vendor/oras.land/oras-go/pkg/content/passthrough.go new file mode 100644 index 000000000..d54c4256c --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/passthrough.go @@ -0,0 +1,286 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "context" + "errors" + "io" + "time" + + "github.com/containerd/containerd/content" + "github.com/opencontainers/go-digest" +) + +// PassthroughWriter takes an input stream and passes it through to an underlying writer, +// while providing the ability to manipulate the stream before it gets passed through +type PassthroughWriter struct { + writer content.Writer + pipew *io.PipeWriter + digester digest.Digester + size int64 + underlyingWriter *underlyingWriter + reader *io.PipeReader + hash *digest.Digest + done chan error +} + +// NewPassthroughWriter creates a pass-through writer that allows for processing +// the content via an arbitrary function. The function should do whatever processing it +// wants, reading from the Reader to the Writer. When done, it must indicate via +// sending an error or nil to the Done +func NewPassthroughWriter(writer content.Writer, f func(r io.Reader, w io.Writer, done chan<- error), opts ...WriterOpt) content.Writer { + // process opts for default + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil + } + } + + r, w := io.Pipe() + pw := &PassthroughWriter{ + writer: writer, + pipew: w, + digester: digest.Canonical.Digester(), + underlyingWriter: &underlyingWriter{ + writer: writer, + digester: digest.Canonical.Digester(), + hash: wOpts.OutputHash, + }, + reader: r, + hash: wOpts.InputHash, + done: make(chan error, 1), + } + go f(r, pw.underlyingWriter, pw.done) + return pw +} + +func (pw *PassthroughWriter) Write(p []byte) (n int, err error) { + n, err = pw.pipew.Write(p) + if pw.hash == nil { + pw.digester.Hash().Write(p[:n]) + } + pw.size += int64(n) + return +} + +func (pw *PassthroughWriter) Close() error { + if pw.pipew != nil { + pw.pipew.Close() + } + pw.writer.Close() + return nil +} + +// Digest may return empty digest or panics until committed. +func (pw *PassthroughWriter) Digest() digest.Digest { + if pw.hash != nil { + return *pw.hash + } + return pw.digester.Digest() +} + +// Commit commits the blob (but no roll-back is guaranteed on an error). +// size and expected can be zero-value when unknown. +// Commit always closes the writer, even on error. +// ErrAlreadyExists aborts the writer. +func (pw *PassthroughWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + if pw.pipew != nil { + pw.pipew.Close() + } + err := <-pw.done + if pw.reader != nil { + pw.reader.Close() + } + if err != nil && err != io.EOF { + return err + } + + // Some underlying writers will validate an expected digest, so we need the option to pass it + // that digest. That is why we caluclate the digest of the underlying writer throughout the write process. + return pw.writer.Commit(ctx, pw.underlyingWriter.size, pw.underlyingWriter.Digest(), opts...) +} + +// Status returns the current state of write +func (pw *PassthroughWriter) Status() (content.Status, error) { + return pw.writer.Status() +} + +// Truncate updates the size of the target blob +func (pw *PassthroughWriter) Truncate(size int64) error { + return pw.writer.Truncate(size) +} + +// underlyingWriter implementation of io.Writer to write to the underlying +// io.Writer +type underlyingWriter struct { + writer content.Writer + digester digest.Digester + size int64 + hash *digest.Digest +} + +// Write write to the underlying writer +func (u *underlyingWriter) Write(p []byte) (int, error) { + n, err := u.writer.Write(p) + if err != nil { + return 0, err + } + + if u.hash == nil { + u.digester.Hash().Write(p) + } + u.size += int64(len(p)) + return n, nil +} + +// Size get total size written +func (u *underlyingWriter) Size() int64 { + return u.size +} + +// Digest may return empty digest or panics until committed. +func (u *underlyingWriter) Digest() digest.Digest { + if u.hash != nil { + return *u.hash + } + return u.digester.Digest() +} + +// PassthroughMultiWriter single writer that passes through to multiple writers, allowing the passthrough +// function to select which writer to use. +type PassthroughMultiWriter struct { + writers []*PassthroughWriter + pipew *io.PipeWriter + digester digest.Digester + size int64 + reader *io.PipeReader + hash *digest.Digest + done chan error + startedAt time.Time + updatedAt time.Time +} + +func NewPassthroughMultiWriter(writers func(name string) (content.Writer, error), f func(r io.Reader, getwriter func(name string) io.Writer, done chan<- error), opts ...WriterOpt) content.Writer { + // process opts for default + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil + } + } + + r, w := io.Pipe() + + pmw := &PassthroughMultiWriter{ + startedAt: time.Now(), + updatedAt: time.Now(), + done: make(chan error, 1), + digester: digest.Canonical.Digester(), + hash: wOpts.InputHash, + pipew: w, + reader: r, + } + + // get our output writers + getwriter := func(name string) io.Writer { + writer, err := writers(name) + if err != nil || writer == nil { + return nil + } + pw := &PassthroughWriter{ + writer: writer, + digester: digest.Canonical.Digester(), + underlyingWriter: &underlyingWriter{ + writer: writer, + digester: digest.Canonical.Digester(), + hash: wOpts.OutputHash, + }, + done: make(chan error, 1), + } + pmw.writers = append(pmw.writers, pw) + return pw.underlyingWriter + } + go f(r, getwriter, pmw.done) + return pmw +} + +func (pmw *PassthroughMultiWriter) Write(p []byte) (n int, err error) { + n, err = pmw.pipew.Write(p) + if pmw.hash == nil { + pmw.digester.Hash().Write(p[:n]) + } + pmw.size += int64(n) + pmw.updatedAt = time.Now() + return +} + +func (pmw *PassthroughMultiWriter) Close() error { + pmw.pipew.Close() + for _, w := range pmw.writers { + w.Close() + } + return nil +} + +// Digest may return empty digest or panics until committed. +func (pmw *PassthroughMultiWriter) Digest() digest.Digest { + if pmw.hash != nil { + return *pmw.hash + } + return pmw.digester.Digest() +} + +// Commit commits the blob (but no roll-back is guaranteed on an error). +// size and expected can be zero-value when unknown. +// Commit always closes the writer, even on error. +// ErrAlreadyExists aborts the writer. +func (pmw *PassthroughMultiWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + pmw.pipew.Close() + err := <-pmw.done + if pmw.reader != nil { + pmw.reader.Close() + } + if err != nil && err != io.EOF { + return err + } + + // Some underlying writers will validate an expected digest, so we need the option to pass it + // that digest. That is why we caluclate the digest of the underlying writer throughout the write process. + for _, w := range pmw.writers { + // maybe this should be Commit(ctx, pw.underlyingWriter.size, pw.underlyingWriter.Digest(), opts...) + w.done <- err + if err := w.Commit(ctx, size, expected, opts...); err != nil { + return err + } + } + return nil +} + +// Status returns the current state of write +func (pmw *PassthroughMultiWriter) Status() (content.Status, error) { + return content.Status{ + StartedAt: pmw.startedAt, + UpdatedAt: pmw.updatedAt, + Total: pmw.size, + }, nil +} + +// Truncate updates the size of the target blob, but cannot do anything with a multiwriter +func (pmw *PassthroughMultiWriter) Truncate(size int64) error { + return errors.New("truncate unavailable on multiwriter") +} diff --git a/vendor/oras.land/oras-go/pkg/content/readerat.go b/vendor/oras.land/oras-go/pkg/content/readerat.go new file mode 100644 index 000000000..7e2cb9b80 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/readerat.go @@ -0,0 +1,68 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package content + +import ( + "io" + + "github.com/containerd/containerd/content" +) + +// ensure interface +var ( + _ content.ReaderAt = sizeReaderAt{} +) + +type readAtCloser interface { + io.ReaderAt + io.Closer +} + +type sizeReaderAt struct { + readAtCloser + size int64 +} + +func (ra sizeReaderAt) Size() int64 { + return ra.size +} + +func NopCloserAt(r io.ReaderAt) nopCloserAt { + return nopCloserAt{r} +} + +type nopCloserAt struct { + io.ReaderAt +} + +func (n nopCloserAt) Close() error { + return nil +} + +// readerAtWrapper wraps a ReaderAt to give a Reader +type ReaderAtWrapper struct { + offset int64 + readerAt io.ReaderAt +} + +func (r *ReaderAtWrapper) Read(p []byte) (n int, err error) { + n, err = r.readerAt.ReadAt(p, r.offset) + r.offset += int64(n) + return +} + +func NewReaderAtWrapper(readerAt io.ReaderAt) *ReaderAtWrapper { + return &ReaderAtWrapper{readerAt: readerAt} +} diff --git a/vendor/oras.land/oras-go/pkg/content/registry.go b/vendor/oras.land/oras-go/pkg/content/registry.go new file mode 100644 index 000000000..aa22567c6 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/registry.go @@ -0,0 +1,84 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package content + +import ( + "context" + "crypto/tls" + "fmt" + "net/http" + "os" + + auth "oras.land/oras-go/pkg/auth/docker" + + "github.com/containerd/containerd/remotes" + "github.com/containerd/containerd/remotes/docker" +) + +// RegistryOptions provide configuration options to a Registry +type RegistryOptions struct { + Configs []string + Username string + Password string + Insecure bool + PlainHTTP bool +} + +// Registry provides content from a spec-compliant registry. Create an use a new one for each +// registry with unique configuration of RegistryOptions. +type Registry struct { + remotes.Resolver +} + +// NewRegistry creates a new Registry store +func NewRegistry(opts RegistryOptions) (*Registry, error) { + return &Registry{ + Resolver: newResolver(opts.Username, opts.Password, opts.Insecure, opts.PlainHTTP, opts.Configs...), + }, nil +} + +func newResolver(username, password string, insecure bool, plainHTTP bool, configs ...string) remotes.Resolver { + + opts := docker.ResolverOptions{ + PlainHTTP: plainHTTP, + } + + client := http.DefaultClient + if insecure { + client.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + } + } + opts.Client = client + + if username != "" || password != "" { + opts.Credentials = func(hostName string) (string, string, error) { + return username, password, nil + } + return docker.NewResolver(opts) + } + cli, err := auth.NewClient(configs...) + if err != nil { + fmt.Fprintf(os.Stderr, "WARNING: Error loading auth file: %v\n", err) + } + resolver, err := cli.Resolver(context.Background(), client, plainHTTP) + if err != nil { + fmt.Fprintf(os.Stderr, "WARNING: Error loading resolver: %v\n", err) + resolver = docker.NewResolver(opts) + } + return resolver +} diff --git a/vendor/oras.land/oras-go/pkg/content/untar.go b/vendor/oras.land/oras-go/pkg/content/untar.go new file mode 100644 index 000000000..fe95a81a4 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/untar.go @@ -0,0 +1,157 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "archive/tar" + "fmt" + "io" + + "github.com/containerd/containerd/content" +) + +// NewUntarWriter wrap a writer with an untar, so that the stream is untarred +// +// By default, it calculates the hash when writing. If the option `skipHash` is true, +// it will skip doing the hash. Skipping the hash is intended to be used only +// if you are confident about the validity of the data being passed to the writer, +// and wish to save on the hashing time. +func NewUntarWriter(writer content.Writer, opts ...WriterOpt) content.Writer { + // process opts for default + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil + } + } + + return NewPassthroughWriter(writer, func(r io.Reader, w io.Writer, done chan<- error) { + tr := tar.NewReader(r) + var err error + for { + _, err := tr.Next() + if err == io.EOF { + // clear the error, since we do not pass an io.EOF + err = nil + break // End of archive + } + if err != nil { + // pass the error on + err = fmt.Errorf("UntarWriter tar file header read error: %v", err) + break + } + // write out the untarred data + // we can handle io.EOF, just go to the next file + // any other errors should stop and get reported + b := make([]byte, wOpts.Blocksize, wOpts.Blocksize) + for { + var n int + n, err = tr.Read(b) + if err != nil && err != io.EOF { + err = fmt.Errorf("UntarWriter file data read error: %v\n", err) + break + } + l := n + if n > len(b) { + l = len(b) + } + if _, err2 := w.Write(b[:l]); err2 != nil { + err = fmt.Errorf("UntarWriter error writing to underlying writer: %v", err2) + break + } + if err == io.EOF { + // go to the next file + break + } + } + // did we break with a non-nil and non-EOF error? + if err != nil && err != io.EOF { + break + } + } + done <- err + }, opts...) +} + +// NewUntarWriterByName wrap multiple writers with an untar, so that the stream is untarred and passed +// to the appropriate writer, based on the filename. If a filename is not found, it is up to the called func +// to determine how to process it. +func NewUntarWriterByName(writers func(string) (content.Writer, error), opts ...WriterOpt) content.Writer { + // process opts for default + wOpts := DefaultWriterOpts() + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil + } + } + + // need a PassthroughMultiWriter here + return NewPassthroughMultiWriter(writers, func(r io.Reader, getwriter func(name string) io.Writer, done chan<- error) { + tr := tar.NewReader(r) + var err error + for { + header, err := tr.Next() + if err == io.EOF { + // clear the error, since we do not pass an io.EOF + err = nil + break // End of archive + } + if err != nil { + // pass the error on + err = fmt.Errorf("UntarWriter tar file header read error: %v", err) + break + } + // get the filename + filename := header.Name + + // get the writer for this filename + w := getwriter(filename) + if w == nil { + continue + } + + // write out the untarred data + // we can handle io.EOF, just go to the next file + // any other errors should stop and get reported + b := make([]byte, wOpts.Blocksize, wOpts.Blocksize) + for { + var n int + n, err = tr.Read(b) + if err != nil && err != io.EOF { + err = fmt.Errorf("UntarWriter file data read error: %v\n", err) + break + } + l := n + if n > len(b) { + l = len(b) + } + if _, err2 := w.Write(b[:l]); err2 != nil { + err = fmt.Errorf("UntarWriter error writing to underlying writer at for name '%s': %v", filename, err2) + break + } + if err == io.EOF { + // go to the next file + break + } + } + // did we break with a non-nil and non-EOF error? + if err != nil && err != io.EOF { + break + } + } + done <- err + }, opts...) +} diff --git a/vendor/oras.land/oras-go/pkg/content/utils.go b/vendor/oras.land/oras-go/pkg/content/utils.go new file mode 100644 index 000000000..c31c54aae --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/content/utils.go @@ -0,0 +1,223 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package content + +import ( + "archive/tar" + "compress/gzip" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "time" + + digest "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" +) + +// ResolveName resolves name from descriptor +func ResolveName(desc ocispec.Descriptor) (string, bool) { + name, ok := desc.Annotations[ocispec.AnnotationTitle] + return name, ok +} + +// tarDirectory walks the directory specified by path, and tar those files with a new +// path prefix. +func tarDirectory(root, prefix string, w io.Writer, stripTimes bool) error { + tw := tar.NewWriter(w) + defer tw.Close() + if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + // Rename path + name, err := filepath.Rel(root, path) + if err != nil { + return err + } + name = filepath.Join(prefix, name) + name = filepath.ToSlash(name) + + // Generate header + var link string + mode := info.Mode() + if mode&os.ModeSymlink != 0 { + if link, err = os.Readlink(path); err != nil { + return err + } + } + header, err := tar.FileInfoHeader(info, link) + if err != nil { + return errors.Wrap(err, path) + } + header.Name = name + header.Uid = 0 + header.Gid = 0 + header.Uname = "" + header.Gname = "" + + if stripTimes { + header.ModTime = time.Time{} + header.AccessTime = time.Time{} + header.ChangeTime = time.Time{} + } + + // Write file + if err := tw.WriteHeader(header); err != nil { + return errors.Wrap(err, "tar") + } + if mode.IsRegular() { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + if _, err := io.Copy(tw, file); err != nil { + return errors.Wrap(err, path) + } + } + + return nil + }); err != nil { + return err + } + return nil +} + +// extractTarDirectory extracts tar file to a directory specified by the `root` +// parameter. The file name prefix is ensured to be the string specified by the +// `prefix` parameter and is trimmed. +func extractTarDirectory(root, prefix string, r io.Reader) error { + tr := tar.NewReader(r) + for { + header, err := tr.Next() + if err != nil { + if err == io.EOF { + return nil + } + return err + } + + // Name check + name := header.Name + path, err := ensureBasePath(root, prefix, name) + if err != nil { + return err + } + path = filepath.Join(root, path) + + // Link check + switch header.Typeflag { + case tar.TypeLink, tar.TypeSymlink: + link := header.Linkname + if !filepath.IsAbs(link) { + link = filepath.Join(filepath.Dir(name), link) + } + if _, err := ensureBasePath(root, prefix, link); err != nil { + return err + } + } + + // Create content + switch header.Typeflag { + case tar.TypeReg: + err = writeFile(path, tr, header.FileInfo().Mode()) + case tar.TypeDir: + err = os.MkdirAll(path, header.FileInfo().Mode()) + case tar.TypeLink: + err = os.Link(header.Linkname, path) + case tar.TypeSymlink: + err = os.Symlink(header.Linkname, path) + default: + continue // Non-regular files are skipped + } + if err != nil { + return err + } + + // Change access time and modification time if possible (error ignored) + os.Chtimes(path, header.AccessTime, header.ModTime) + } +} + +// ensureBasePath ensures the target path is in the base path, +// returning its relative path to the base path. +func ensureBasePath(root, base, target string) (string, error) { + path, err := filepath.Rel(base, target) + if err != nil { + return "", err + } + cleanPath := filepath.ToSlash(filepath.Clean(path)) + if cleanPath == ".." || strings.HasPrefix(cleanPath, "../") { + return "", fmt.Errorf("%q is outside of %q", target, base) + } + + // No symbolic link allowed in the relative path + dir := filepath.Dir(path) + for dir != "." { + if info, err := os.Lstat(filepath.Join(root, dir)); err != nil { + if !os.IsNotExist(err) { + return "", err + } + } else if info.Mode()&os.ModeSymlink != 0 { + return "", fmt.Errorf("no symbolic link allowed between %q and %q", base, target) + } + dir = filepath.Dir(dir) + } + + return path, nil +} + +func writeFile(path string, r io.Reader, perm os.FileMode) error { + file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) + if err != nil { + return err + } + defer file.Close() + _, err = io.Copy(file, r) + return err +} + +func extractTarGzip(root, prefix, filename, checksum string) error { + file, err := os.Open(filename) + if err != nil { + return err + } + defer file.Close() + zr, err := gzip.NewReader(file) + if err != nil { + return err + } + defer zr.Close() + var r io.Reader = zr + var verifier digest.Verifier + if checksum != "" { + if digest, err := digest.Parse(checksum); err == nil { + verifier = digest.Verifier() + r = io.TeeReader(r, verifier) + } + } + if err := extractTarDirectory(root, prefix, r); err != nil { + return err + } + if verifier != nil && !verifier.Verified() { + return errors.New("content digest mismatch") + } + return nil +} diff --git a/vendor/oras.land/oras-go/pkg/context/context.go b/vendor/oras.land/oras-go/pkg/context/context.go new file mode 100644 index 000000000..af0ac8469 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/context/context.go @@ -0,0 +1,24 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package context + +import "context" + +// Background returns a default context with logger discarded. +func Background() context.Context { + ctx := context.Background() + return WithLoggerDiscarded(ctx) +} diff --git a/vendor/oras.land/oras-go/pkg/context/logger.go b/vendor/oras.land/oras-go/pkg/context/logger.go new file mode 100644 index 000000000..2fb2e5271 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/context/logger.go @@ -0,0 +1,50 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package context + +import ( + "context" + "io" + "io/ioutil" + + "github.com/containerd/containerd/log" + "github.com/sirupsen/logrus" +) + +// WithLogger returns a new context with the provided logger. +// This method wraps github.com/containerd/containerd/log.WithLogger() +func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context { + return log.WithLogger(ctx, logger) +} + +// WithLoggerFromWriter returns a new context with the logger, writting to the provided logger. +func WithLoggerFromWriter(ctx context.Context, writer io.Writer) context.Context { + logger := logrus.New() + logger.Out = writer + entry := logrus.NewEntry(logger) + return WithLogger(ctx, entry) +} + +// WithLoggerDiscarded returns a new context with the logger, writting to nothing. +func WithLoggerDiscarded(ctx context.Context) context.Context { + return WithLoggerFromWriter(ctx, ioutil.Discard) +} + +// GetLogger retrieves the current logger from the context. +// This method wraps github.com/containerd/containerd/log.GetLogger() +func GetLogger(ctx context.Context) *logrus.Entry { + return log.GetLogger(ctx) +} diff --git a/vendor/oras.land/oras-go/pkg/oras/copy.go b/vendor/oras.land/oras-go/pkg/oras/copy.go new file mode 100644 index 000000000..ebf63276c --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/oras/copy.go @@ -0,0 +1,213 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package oras + +import ( + "bytes" + "context" + "fmt" + "sync" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/images" + "github.com/containerd/containerd/log" + "github.com/containerd/containerd/remotes" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "oras.land/oras-go/pkg/target" +) + +// Copy copy a ref from one target.Target to a ref in another target.Target. If toRef is blank, reuses fromRef +// Returns the root +// Descriptor of the copied item. Can use the root to retrieve child elements from target.Target. +func Copy(ctx context.Context, from target.Target, fromRef string, to target.Target, toRef string, opts ...CopyOpt) (ocispec.Descriptor, error) { + if from == nil { + return ocispec.Descriptor{}, ErrFromTargetUndefined + } + if to == nil { + return ocispec.Descriptor{}, ErrToTargetUndefined + } + // blank toRef + if toRef == "" { + toRef = fromRef + } + opt := copyOptsDefaults() + for _, o := range opts { + if err := o(opt); err != nil { + return ocispec.Descriptor{}, err + } + } + + if from == nil { + return ocispec.Descriptor{}, ErrFromResolverUndefined + } + if to == nil { + return ocispec.Descriptor{}, ErrToResolverUndefined + } + + // for the "from", we resolve the ref, then use resolver.Fetcher to fetch the various content blobs + // for the "to", we simply use resolver.Pusher to push the various content blobs + + _, desc, err := from.Resolve(ctx, fromRef) + if err != nil { + return ocispec.Descriptor{}, err + } + + fetcher, err := from.Fetcher(ctx, fromRef) + if err != nil { + return ocispec.Descriptor{}, err + } + // construct the reference we send to the pusher using the digest, so it knows what the root is + pushRef := fmt.Sprintf("%s@%s", toRef, desc.Digest.String()) + pusher, err := to.Pusher(ctx, pushRef) + if err != nil { + return ocispec.Descriptor{}, err + } + + if err := transferContent(ctx, desc, fetcher, pusher, opt); err != nil { + return ocispec.Descriptor{}, err + } + return desc, nil +} + +func transferContent(ctx context.Context, desc ocispec.Descriptor, fetcher remotes.Fetcher, pusher remotes.Pusher, opts *copyOpts) error { + var descriptors, manifests []ocispec.Descriptor + lock := &sync.Mutex{} + picker := images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + if isAllowedMediaType(desc.MediaType, opts.allowedMediaTypes...) { + if opts.filterName(desc) { + lock.Lock() + defer lock.Unlock() + descriptors = append(descriptors, desc) + } + return nil, nil + } + return nil, nil + }) + + // we use a hybrid store - a cache wrapping the underlying pusher - for two reasons: + // 1. so that we can cache the manifests as pushing them, then retrieve them later to push in reverse order after the blobs + // 2. so that we can retrieve them to analyze and find children in the Dispatch routine + store := opts.contentProvideIngesterPusherFetcher + if store == nil { + store = newHybridStoreFromPusher(pusher, opts.cachedMediaTypes, true) + } + + // fetchHandler pushes to the *store*, which may or may not cache it + baseFetchHandler := func(p remotes.Pusher, f remotes.Fetcher) images.HandlerFunc { + return images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + cw, err := p.Push(ctx, desc) + if err != nil { + if !errdefs.IsAlreadyExists(err) { + return nil, err + } + + return nil, nil + } + defer cw.Close() + + rc, err := f.Fetch(ctx, desc) + if err != nil { + return nil, err + } + defer rc.Close() + return nil, content.Copy(ctx, cw, rc, desc.Size, desc.Digest) + }) + } + + // track all of our manifests that will be cached + fetchHandler := images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + if isAllowedMediaType(desc.MediaType, opts.cachedMediaTypes...) { + lock.Lock() + defer lock.Unlock() + manifests = append(manifests, desc) + } + return baseFetchHandler(store, fetcher)(ctx, desc) + }) + + handlers := []images.Handler{ + filterHandler(opts, opts.allowedMediaTypes...), + } + handlers = append(handlers, opts.baseHandlers...) + handlers = append(handlers, + fetchHandler, + picker, + images.ChildrenHandler(&ProviderWrapper{Fetcher: store}), + ) + handlers = append(handlers, opts.callbackHandlers...) + + if err := opts.dispatch(ctx, images.Handlers(handlers...), nil, desc); err != nil { + return err + } + + // we cached all of the manifests, so push those out + // Iterate in reverse order as seen, parent always uploaded after child + for i := len(manifests) - 1; i >= 0; i-- { + _, err := baseFetchHandler(pusher, store)(ctx, manifests[i]) + if err != nil { + return err + } + } + + // if the option to request the root manifest was passed, accommodate it + if opts.saveManifest != nil && len(manifests) > 0 { + rc, err := store.Fetch(ctx, manifests[0]) + if err != nil { + return fmt.Errorf("could not get root manifest to save based on CopyOpt: %v", err) + } + defer rc.Close() + buf := new(bytes.Buffer) + if _, err := buf.ReadFrom(rc); err != nil { + return fmt.Errorf("unable to read data for root manifest to save based on CopyOpt: %v", err) + } + // get the root manifest from the store + opts.saveManifest(buf.Bytes()) + } + + // if the option to request the layers was passed, accommodate it + if opts.saveLayers != nil && len(descriptors) > 0 { + opts.saveLayers(descriptors) + } + return nil +} + +func filterHandler(opts *copyOpts, allowedMediaTypes ...string) images.HandlerFunc { + return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + switch { + case isAllowedMediaType(desc.MediaType, ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex): + return nil, nil + case isAllowedMediaType(desc.MediaType, allowedMediaTypes...): + if opts.filterName(desc) { + return nil, nil + } + log.G(ctx).Warnf("blob no name: %v", desc.Digest) + default: + log.G(ctx).Warnf("unknown type: %v", desc.MediaType) + } + return nil, images.ErrStopHandler + } +} + +func isAllowedMediaType(mediaType string, allowedMediaTypes ...string) bool { + if len(allowedMediaTypes) == 0 { + return true + } + for _, allowedMediaType := range allowedMediaTypes { + if mediaType == allowedMediaType { + return true + } + } + return false +} diff --git a/vendor/oras.land/oras-go/pkg/oras/errors.go b/vendor/oras.land/oras-go/pkg/oras/errors.go new file mode 100644 index 000000000..6c5f9f240 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/oras/errors.go @@ -0,0 +1,42 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package oras + +import ( + "errors" + "fmt" +) + +// Common errors +var ( + ErrResolverUndefined = errors.New("resolver undefined") + ErrFromResolverUndefined = errors.New("from target resolver undefined") + ErrToResolverUndefined = errors.New("to target resolver undefined") + ErrFromTargetUndefined = errors.New("from target undefined") + ErrToTargetUndefined = errors.New("from target undefined") +) + +// Path validation related errors +var ( + ErrDirtyPath = errors.New("dirty path") + ErrPathNotSlashSeparated = errors.New("path not slash separated") + ErrAbsolutePathDisallowed = errors.New("absolute path disallowed") + ErrPathTraversalDisallowed = errors.New("path traversal disallowed") +) + +// ErrStopProcessing is used to stop processing an oras operation. +// This error only makes sense in sequential pulling operation. +var ErrStopProcessing = fmt.Errorf("stop processing") diff --git a/vendor/oras.land/oras-go/pkg/oras/opts.go b/vendor/oras.land/oras-go/pkg/oras/opts.go new file mode 100644 index 000000000..042a775b0 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/oras/opts.go @@ -0,0 +1,254 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package oras + +import ( + "context" + "fmt" + "io" + "path/filepath" + "strings" + "sync" + + "github.com/containerd/containerd/images" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "golang.org/x/sync/semaphore" + orascontent "oras.land/oras-go/pkg/content" +) + +func copyOptsDefaults() *copyOpts { + return &copyOpts{ + dispatch: images.Dispatch, + filterName: filterName, + cachedMediaTypes: []string{ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex}, + validateName: ValidateNameAsPath, + } +} + +type CopyOpt func(o *copyOpts) error + +type copyOpts struct { + allowedMediaTypes []string + dispatch func(context.Context, images.Handler, *semaphore.Weighted, ...ocispec.Descriptor) error + baseHandlers []images.Handler + callbackHandlers []images.Handler + contentProvideIngesterPusherFetcher orascontent.Store + filterName func(ocispec.Descriptor) bool + cachedMediaTypes []string + + saveManifest func([]byte) + saveLayers func([]ocispec.Descriptor) + validateName func(desc ocispec.Descriptor) error + + userAgent string +} + +// ValidateNameAsPath validates name in the descriptor as file path in order +// to generate good packages intended to be pulled using the FileStore or +// the oras cli. +// For cross-platform considerations, only unix paths are accepted. +func ValidateNameAsPath(desc ocispec.Descriptor) error { + // no empty name + path, ok := orascontent.ResolveName(desc) + if !ok || path == "" { + return orascontent.ErrNoName + } + + // path should be clean + if target := filepath.ToSlash(filepath.Clean(path)); target != path { + return errors.Wrap(ErrDirtyPath, path) + } + + // path should be slash-separated + if strings.Contains(path, "\\") { + return errors.Wrap(ErrPathNotSlashSeparated, path) + } + + // disallow absolute path: covers unix and windows format + if strings.HasPrefix(path, "/") { + return errors.Wrap(ErrAbsolutePathDisallowed, path) + } + if len(path) > 2 { + c := path[0] + if path[1] == ':' && path[2] == '/' && ('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z') { + return errors.Wrap(ErrAbsolutePathDisallowed, path) + } + } + + // disallow path traversal + if strings.HasPrefix(path, "../") || path == ".." { + return errors.Wrap(ErrPathTraversalDisallowed, path) + } + + return nil +} + +// dispatchBFS behaves the same as images.Dispatch() but in sequence with breath-first search. +func dispatchBFS(ctx context.Context, handler images.Handler, weighted *semaphore.Weighted, descs ...ocispec.Descriptor) error { + for i := 0; i < len(descs); i++ { + desc := descs[i] + children, err := handler.Handle(ctx, desc) + if err != nil { + switch err := errors.Cause(err); err { + case images.ErrSkipDesc: + continue // don't traverse the children. + case ErrStopProcessing: + return nil + } + return err + } + descs = append(descs, children...) + } + return nil +} + +func filterName(desc ocispec.Descriptor) bool { + // needs to be filled in + return true +} + +// WithAdditionalCachedMediaTypes adds media types normally cached in memory when pulling. +// This does not replace the default media types, but appends to them +func WithAdditionalCachedMediaTypes(cachedMediaTypes ...string) CopyOpt { + return func(o *copyOpts) error { + o.cachedMediaTypes = append(o.cachedMediaTypes, cachedMediaTypes...) + return nil + } +} + +// WithAllowedMediaType sets the allowed media types +func WithAllowedMediaType(allowedMediaTypes ...string) CopyOpt { + return func(o *copyOpts) error { + o.allowedMediaTypes = append(o.allowedMediaTypes, allowedMediaTypes...) + return nil + } +} + +// WithAllowedMediaTypes sets the allowed media types +func WithAllowedMediaTypes(allowedMediaTypes []string) CopyOpt { + return func(o *copyOpts) error { + o.allowedMediaTypes = append(o.allowedMediaTypes, allowedMediaTypes...) + return nil + } +} + +// WithPullByBFS opt to pull in sequence with breath-first search +func WithPullByBFS(o *copyOpts) error { + o.dispatch = dispatchBFS + return nil +} + +// WithPullBaseHandler provides base handlers, which will be called before +// any pull specific handlers. +func WithPullBaseHandler(handlers ...images.Handler) CopyOpt { + return func(o *copyOpts) error { + o.baseHandlers = append(o.baseHandlers, handlers...) + return nil + } +} + +// WithPullCallbackHandler provides callback handlers, which will be called after +// any pull specific handlers. +func WithPullCallbackHandler(handlers ...images.Handler) CopyOpt { + return func(o *copyOpts) error { + o.callbackHandlers = append(o.callbackHandlers, handlers...) + return nil + } +} + +// WithContentProvideIngester opt to the provided Provider and Ingester +// for file system I/O, including caches. +func WithContentStore(store orascontent.Store) CopyOpt { + return func(o *copyOpts) error { + o.contentProvideIngesterPusherFetcher = store + return nil + } +} + +// WithPullEmptyNameAllowed allows pulling blobs with empty name. +func WithPullEmptyNameAllowed() CopyOpt { + return func(o *copyOpts) error { + o.filterName = func(ocispec.Descriptor) bool { + return true + } + return nil + } +} + +// WithPullStatusTrack report results to stdout +func WithPullStatusTrack(writer io.Writer) CopyOpt { + return WithPullCallbackHandler(pullStatusTrack(writer)) +} + +func pullStatusTrack(writer io.Writer) images.Handler { + var printLock sync.Mutex + return images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { + if name, ok := orascontent.ResolveName(desc); ok { + digestString := desc.Digest.String() + if err := desc.Digest.Validate(); err == nil { + if algo := desc.Digest.Algorithm(); algo == digest.SHA256 { + digestString = desc.Digest.Encoded()[:12] + } + } + printLock.Lock() + defer printLock.Unlock() + fmt.Fprintln(writer, "Downloaded", digestString, name) + } + return nil, nil + }) +} + +// WithNameValidation validates the image title in the descriptor. +// Pass nil to disable name validation. +func WithNameValidation(validate func(desc ocispec.Descriptor) error) CopyOpt { + return func(o *copyOpts) error { + o.validateName = validate + return nil + } +} + +// WithUserAgent set the user agent string in http communications +func WithUserAgent(agent string) CopyOpt { + return func(o *copyOpts) error { + o.userAgent = agent + return nil + } +} + +// WithLayerDescriptors passes the slice of Descriptors for layers to the +// provided func. If the passed parameter is nil, returns an error. +func WithLayerDescriptors(save func([]ocispec.Descriptor)) CopyOpt { + return func(o *copyOpts) error { + if save == nil { + return errors.New("layers save func must be non-nil") + } + o.saveLayers = save + return nil + } +} + +// WithRootManifest passes the root manifest for the artifacts to the provided +// func. If the passed parameter is nil, returns an error. +func WithRootManifest(save func(b []byte)) CopyOpt { + return func(o *copyOpts) error { + if save == nil { + return errors.New("manifest save func must be non-nil") + } + o.saveManifest = save + return nil + } +} diff --git a/vendor/oras.land/oras-go/pkg/oras/provider.go b/vendor/oras.land/oras-go/pkg/oras/provider.go new file mode 100644 index 000000000..97736ad3c --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/oras/provider.go @@ -0,0 +1,79 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package oras + +import ( + "context" + "errors" + "io" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/remotes" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// ProviderWrapper wraps a remote.Fetcher to make a content.Provider, which is useful for things +type ProviderWrapper struct { + Fetcher remotes.Fetcher +} + +func (p *ProviderWrapper) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error) { + if p.Fetcher == nil { + return nil, errors.New("no Fetcher provided") + } + return &fetcherReaderAt{ + ctx: ctx, + fetcher: p.Fetcher, + desc: desc, + offset: 0, + }, nil +} + +type fetcherReaderAt struct { + ctx context.Context + fetcher remotes.Fetcher + desc ocispec.Descriptor + rc io.ReadCloser + offset int64 +} + +func (f *fetcherReaderAt) Close() error { + if f.rc == nil { + return nil + } + return f.rc.Close() +} + +func (f *fetcherReaderAt) Size() int64 { + return f.desc.Size +} + +func (f *fetcherReaderAt) ReadAt(p []byte, off int64) (n int, err error) { + // if we do not have a readcloser, get it + if f.rc == nil || f.offset != off { + rc, err := f.fetcher.Fetch(f.ctx, f.desc) + if err != nil { + return 0, err + } + f.rc = rc + } + + n, err = io.ReadFull(f.rc, p) + if err != nil { + return n, err + } + f.offset += int64(n) + return n, err +} diff --git a/vendor/oras.land/oras-go/pkg/oras/store.go b/vendor/oras.land/oras-go/pkg/oras/store.go new file mode 100644 index 000000000..edb835625 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/oras/store.go @@ -0,0 +1,213 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package oras + +import ( + "context" + "io" + "io/ioutil" + "time" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/remotes" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sync/errgroup" + + orascontent "oras.land/oras-go/pkg/content" +) + +type hybridStore struct { + cache *orascontent.Memory + cachedMediaTypes []string + cacheOnly bool + provider content.Provider + ingester content.Ingester +} + +func newHybridStoreFromPusher(pusher remotes.Pusher, cachedMediaTypes []string, cacheOnly bool) *hybridStore { + // construct an ingester from a pusher + ingester := pusherIngester{ + pusher: pusher, + } + return &hybridStore{ + cache: orascontent.NewMemory(), + cachedMediaTypes: cachedMediaTypes, + ingester: ingester, + cacheOnly: cacheOnly, + } +} + +func (s *hybridStore) Set(desc ocispec.Descriptor, content []byte) { + s.cache.Set(desc, content) +} + +func (s *hybridStore) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error) { + reader, err := s.cache.Fetch(ctx, desc) + if err == nil { + return reader, err + } + if s.provider != nil { + rat, err := s.provider.ReaderAt(ctx, desc) + return ioutil.NopCloser(orascontent.NewReaderAtWrapper(rat)), err + } + return nil, err +} + +func (s *hybridStore) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) { + return s.Writer(ctx, content.WithDescriptor(desc)) +} + +// Writer begins or resumes the active writer identified by desc +func (s *hybridStore) Writer(ctx context.Context, opts ...content.WriterOpt) (content.Writer, error) { + var wOpts content.WriterOpts + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil, err + } + } + + if isAllowedMediaType(wOpts.Desc.MediaType, s.cachedMediaTypes...) || s.ingester == nil { + pusher, err := s.cache.Pusher(ctx, "") + if err != nil { + return nil, err + } + cacheWriter, err := pusher.Push(ctx, wOpts.Desc) + if err != nil { + return nil, err + } + // if we cache it only, do not pass it through + if s.cacheOnly { + return cacheWriter, nil + } + ingesterWriter, err := s.ingester.Writer(ctx, opts...) + switch { + case err == nil: + return newTeeWriter(wOpts.Desc, cacheWriter, ingesterWriter), nil + case errdefs.IsAlreadyExists(err): + return cacheWriter, nil + } + return nil, err + } + return s.ingester.Writer(ctx, opts...) +} + +// teeWriter tees the content to one or more content.Writer +type teeWriter struct { + writers []content.Writer + digester digest.Digester + status content.Status +} + +func newTeeWriter(desc ocispec.Descriptor, writers ...content.Writer) *teeWriter { + now := time.Now() + return &teeWriter{ + writers: writers, + digester: digest.Canonical.Digester(), + status: content.Status{ + Total: desc.Size, + StartedAt: now, + UpdatedAt: now, + }, + } +} + +func (t *teeWriter) Close() error { + g := new(errgroup.Group) + for _, w := range t.writers { + w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines + g.Go(func() error { + return w.Close() + }) + } + return g.Wait() +} + +func (t *teeWriter) Write(p []byte) (n int, err error) { + g := new(errgroup.Group) + for _, w := range t.writers { + w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines + g.Go(func() error { + n, err := w.Write(p[:]) + if err != nil { + return err + } + if n != len(p) { + return io.ErrShortWrite + } + return nil + }) + } + err = g.Wait() + n = len(p) + if err != nil { + return n, err + } + _, _ = t.digester.Hash().Write(p[:n]) + t.status.Offset += int64(len(p)) + t.status.UpdatedAt = time.Now() + + return n, nil +} + +// Digest may return empty digest or panics until committed. +func (t *teeWriter) Digest() digest.Digest { + return t.digester.Digest() +} + +func (t *teeWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + g := new(errgroup.Group) + for _, w := range t.writers { + w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines + g.Go(func() error { + return w.Commit(ctx, size, expected, opts...) + }) + } + return g.Wait() +} + +// Status returns the current state of write +func (t *teeWriter) Status() (content.Status, error) { + return t.status, nil +} + +// Truncate updates the size of the target blob +func (t *teeWriter) Truncate(size int64) error { + g := new(errgroup.Group) + for _, w := range t.writers { + w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines + g.Go(func() error { + return w.Truncate(size) + }) + } + return g.Wait() +} + +// pusherIngester simple wrapper to get an ingester from a pusher +type pusherIngester struct { + pusher remotes.Pusher +} + +func (p pusherIngester) Writer(ctx context.Context, opts ...content.WriterOpt) (content.Writer, error) { + var wOpts content.WriterOpts + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return nil, err + } + } + return p.pusher.Push(ctx, wOpts.Desc) +} diff --git a/vendor/oras.land/oras-go/pkg/registry/reference.go b/vendor/oras.land/oras-go/pkg/registry/reference.go new file mode 100644 index 000000000..299651cd1 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/reference.go @@ -0,0 +1,177 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package registry + +import ( + "fmt" + "net/url" + "regexp" + "strings" + + "github.com/opencontainers/go-digest" + errdef "oras.land/oras-go/pkg/content" +) + +// regular expressions for components. +var ( + // repositoryRegexp is adapted from the distribution implementation. + // The repository name set under OCI distribution spec is a subset of the + // the docker spec. For maximum compability, the docker spec is verified at + // the client side. Further check is left to the server side. + // References: + // - https://github.com/distribution/distribution/blob/v2.7.1/reference/regexp.go#L53 + // - https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests + repositoryRegexp = regexp.MustCompile(`^[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*(?:/[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*)*$`) + + // tagRegexp checks the tag name. + // The docker and OCI spec have the same regular expression. + // Reference: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests + tagRegexp = regexp.MustCompile(`^[\w][\w.-]{0,127}$`) +) + +// Reference references to a descriptor in the registry. +type Reference struct { + // Registry is the name of the registry. + // It is usually the domain name of the registry optionally with a port. + Registry string + + // Repository is the name of the repository. + Repository string + + // Reference is the reference of the object in the repository. + // A reference can be a tag or a digest. + Reference string +} + +// ParseReference parses a string into a artifact reference. +// If the reference contains both the tag and the digest, the tag will be +// dropped. +// Digest is recognized only if the corresponding algorithm is available. +func ParseReference(raw string) (Reference, error) { + parts := strings.SplitN(raw, "/", 2) + if len(parts) == 1 { + return Reference{}, fmt.Errorf("%w: missing repository", errdef.ErrInvalidReference) + } + registry, path := parts[0], parts[1] + var repository string + var reference string + if index := strings.Index(path, "@"); index != -1 { + // digest found + repository = path[:index] + reference = path[index+1:] + + // drop tag since the digest is present. + if index := strings.Index(repository, ":"); index != -1 { + repository = repository[:index] + } + } else if index := strings.Index(path, ":"); index != -1 { + // tag found + repository = path[:index] + reference = path[index+1:] + } else { + // empty reference + repository = path + } + res := Reference{ + Registry: registry, + Repository: repository, + Reference: reference, + } + if err := res.Validate(); err != nil { + return Reference{}, err + } + return res, nil +} + +// Validate validates the entire reference. +func (r Reference) Validate() error { + err := r.ValidateRegistry() + if err != nil { + return err + } + err = r.ValidateRepository() + if err != nil { + return err + } + return r.ValidateReference() +} + +// ValidateRegistry validates the registry. +func (r Reference) ValidateRegistry() error { + uri, err := url.ParseRequestURI("dummy://" + r.Registry) + if err != nil || uri.Host != r.Registry { + return fmt.Errorf("%w: invalid registry", errdef.ErrInvalidReference) + } + return nil +} + +// ValidateRepository validates the repository. +func (r Reference) ValidateRepository() error { + if !repositoryRegexp.MatchString(r.Repository) { + return fmt.Errorf("%w: invalid repository", errdef.ErrInvalidReference) + } + return nil +} + +// ValidateReference validates the reference. +func (r Reference) ValidateReference() error { + if r.Reference == "" { + return nil + } + if _, err := r.Digest(); err == nil { + return nil + } + if !tagRegexp.MatchString(r.Reference) { + return fmt.Errorf("%w: invalid tag", errdef.ErrInvalidReference) + } + return nil +} + +// Host returns the host name of the registry. +func (r Reference) Host() string { + if r.Registry == "docker.io" { + return "registry-1.docker.io" + } + return r.Registry +} + +// ReferenceOrDefault returns the reference or the default reference if empty. +func (r Reference) ReferenceOrDefault() string { + if r.Reference == "" { + return "latest" + } + return r.Reference +} + +// Digest returns the reference as a digest. +func (r Reference) Digest() (digest.Digest, error) { + return digest.Parse(r.Reference) +} + +// String implements `fmt.Stringer` and returns the reference string. +// The resulted string is meaningful only if the reference is valid. +func (r Reference) String() string { + if r.Repository == "" { + return r.Registry + } + ref := r.Registry + "/" + r.Repository + if r.Reference == "" { + return ref + } + if d, err := r.Digest(); err == nil { + return ref + "@" + d.String() + } + return ref + ":" + r.Reference +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/auth/cache.go b/vendor/oras.land/oras-go/pkg/registry/remote/auth/cache.go new file mode 100644 index 000000000..070588373 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/auth/cache.go @@ -0,0 +1,158 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package auth + +import ( + "context" + "strings" + "sync" + + errdef "oras.land/oras-go/pkg/content" + "oras.land/oras-go/pkg/registry/remote/internal/syncutil" +) + +// DefaultCache is the sharable cache used by DefaultClient. +var DefaultCache Cache = NewCache() + +// Cache caches the auth-scheme and auth-token for the "Authorization" header in +// accessing the remote registry. +// Precisely, the header is `Authorization: auth-scheme auth-token`. +// The `auth-token` is a generic term as `token68` in RFC 7235 section 2.1. +type Cache interface { + // GetScheme returns the auth-scheme part cached for the given registry. + // A single registry is assumed to have a consistent scheme. + // If a registry has different schemes per path, the auth client is still + // workable. However, the cache may not be effective as the cache cannot + // correctly guess the scheme. + GetScheme(ctx context.Context, registry string) (Scheme, error) + + // GetToken returns the auth-token part cached for the given registry of a + // given scheme. + // The underlying implementation MAY cache the token for all schemes for the + // given registry. + GetToken(ctx context.Context, registry string, scheme Scheme, key string) (string, error) + + // Set fetches the token using the given fetch function and caches the token + // for the given scheme with the given key for the given registry. + // The return values of the fetch function is returned by this function. + // The underlying implementation MAY combine the fetch operation if the Set + // function is invoked multiple times at the same time. + Set(ctx context.Context, registry string, scheme Scheme, key string, fetch func(context.Context) (string, error)) (string, error) +} + +// cacheEntry is a cache entry for a single registry. +type cacheEntry struct { + scheme Scheme + tokens sync.Map // map[string]string +} + +// concurrentCache is a cache suitable for concurrent invocation. +type concurrentCache struct { + status sync.Map // map[string]*syncutil.Once + cache sync.Map // map[string]*cacheEntry +} + +// NewCache creates a new go-routine safe cache instance. +func NewCache() Cache { + return &concurrentCache{} +} + +// GetScheme returns the auth-scheme part cached for the given registry. +func (cc *concurrentCache) GetScheme(ctx context.Context, registry string) (Scheme, error) { + entry, ok := cc.cache.Load(registry) + if !ok { + return SchemeUnknown, errdef.ErrNotFound + } + return entry.(*cacheEntry).scheme, nil +} + +// GetToken returns the auth-token part cached for the given registry of a given +// scheme. +func (cc *concurrentCache) GetToken(ctx context.Context, registry string, scheme Scheme, key string) (string, error) { + entryValue, ok := cc.cache.Load(registry) + if !ok { + return "", errdef.ErrNotFound + } + entry := entryValue.(*cacheEntry) + if entry.scheme != scheme { + return "", errdef.ErrNotFound + } + if token, ok := entry.tokens.Load(key); ok { + return token.(string), nil + } + return "", errdef.ErrNotFound +} + +// Set fetches the token using the given fetch function and caches the token +// for the given scheme with the given key for the given registry. +// Set combines the fetch operation if the Set is invoked multiple times at the +// same time. +func (cc *concurrentCache) Set(ctx context.Context, registry string, scheme Scheme, key string, fetch func(context.Context) (string, error)) (string, error) { + // fetch token + statusKey := strings.Join([]string{ + registry, + scheme.String(), + key, + }, " ") + statusValue, _ := cc.status.LoadOrStore(statusKey, syncutil.NewOnce()) + fetchOnce := statusValue.(*syncutil.Once) + fetchedFirst, result, err := fetchOnce.Do(ctx, func() (interface{}, error) { + return fetch(ctx) + }) + if fetchedFirst { + cc.status.Delete(statusKey) + } + if err != nil { + return "", err + } + token := result.(string) + if !fetchedFirst { + return token, nil + } + + // cache token + newEntry := &cacheEntry{ + scheme: scheme, + } + entryValue, exists := cc.cache.LoadOrStore(registry, newEntry) + entry := entryValue.(*cacheEntry) + if exists && entry.scheme != scheme { + // there is a scheme change, which is not expected in most scenarios. + // force invalidating all previous cache. + entry = newEntry + cc.cache.Store(registry, entry) + } + entry.tokens.Store(key, token) + + return token, nil +} + +// noCache is a cache implementation that does not do cache at all. +type noCache struct{} + +// GetScheme always returns not found error as it has no cache. +func (noCache) GetScheme(ctx context.Context, registry string) (Scheme, error) { + return SchemeUnknown, errdef.ErrNotFound +} + +// GetToken always returns not found error as it has no cache. +func (noCache) GetToken(ctx context.Context, registry string, scheme Scheme, key string) (string, error) { + return "", errdef.ErrNotFound +} + +// Set calls fetch directly without caching. +func (noCache) Set(ctx context.Context, registry string, scheme Scheme, key string, fetch func(context.Context) (string, error)) (string, error) { + return fetch(ctx) +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/auth/challenge.go b/vendor/oras.land/oras-go/pkg/registry/remote/auth/challenge.go new file mode 100644 index 000000000..e2d28a11e --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/auth/challenge.go @@ -0,0 +1,166 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package auth + +import ( + "strconv" + "strings" +) + +// Scheme define the authentication method. +type Scheme byte + +const ( + // SchemeUnknown represents unknown or unsupported schemes + SchemeUnknown Scheme = iota + + // SchemeBasic represents the "Basic" HTTP authentication scheme. + // Reference: https://tools.ietf.org/html/rfc7617 + SchemeBasic + + // SchemeBearer represents the Bearer token in OAuth 2.0. + // Reference: https://tools.ietf.org/html/rfc6750 + SchemeBearer +) + +// parseScheme parse the authentication scheme from the given string +// case-insensitively. +func parseScheme(scheme string) Scheme { + switch { + case strings.EqualFold(scheme, "basic"): + return SchemeBasic + case strings.EqualFold(scheme, "bearer"): + return SchemeBearer + } + return SchemeUnknown +} + +// String return the string for the scheme. +func (s Scheme) String() string { + switch s { + case SchemeBasic: + return "Basic" + case SchemeBearer: + return "Bearer" + } + return "Unknown" +} + +// parseChallenge parses the "WWW-Authenticate" header returned by the remote +// registry, and extracts parameters if scheme is Bearer. +// References: +// - https://docs.docker.com/registry/spec/auth/token/#how-to-authenticate +// - https://tools.ietf.org/html/rfc7235#section-2.1 +func parseChallenge(header string) (scheme Scheme, params map[string]string) { + // as defined in RFC 7235 section 2.1, we have + // challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ] + // auth-scheme = token + // auth-param = token BWS "=" BWS ( token / quoted-string ) + // + // since we focus parameters only on Bearer, we have + // challenge = auth-scheme [ 1*SP #auth-param ] + schemeString, rest := parseToken(header) + scheme = parseScheme(schemeString) + + // fast path for non bearer challenge + if scheme != SchemeBearer { + return + } + + // parse params for bearer auth. + // combining RFC 7235 section 2.1 with RFC 7230 section 7, we have + // #auth-param => auth-param *( OWS "," OWS auth-param ) + var key, value string + for { + key, rest = parseToken(skipSpace(rest)) + if key == "" { + return + } + + rest = skipSpace(rest) + if rest == "" || rest[0] != '=' { + return + } + rest = skipSpace(rest[1:]) + if rest == "" { + return + } + + if rest[0] == '"' { + prefix, err := strconv.QuotedPrefix(rest) + if err != nil { + return + } + value, err = strconv.Unquote(prefix) + if err != nil { + return + } + rest = rest[len(prefix):] + } else { + value, rest = parseToken(rest) + if value == "" { + return + } + } + if params == nil { + params = map[string]string{ + key: value, + } + } else { + params[key] = value + } + + rest = skipSpace(rest) + if rest == "" || rest[0] != ',' { + return + } + rest = rest[1:] + } +} + +// isNotTokenChar reports whether rune is not a `tchar` defined in RFC 7230 +// section 3.2.6. +func isNotTokenChar(r rune) bool { + // tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + // / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + // / DIGIT / ALPHA + // ; any VCHAR, except delimiters + return (r < 'A' || r > 'Z') && (r < 'a' || r > 'z') && + (r < '0' || r > '9') && !strings.ContainsRune("!#$%&'*+-.^_`|~", r) +} + +// parseToken finds the next token from the given string. If no token found, +// an empty token is returned and the whole of the input is returned in rest. +// Note: Since token = 1*tchar, empty string is not a valid token. +func parseToken(s string) (token, rest string) { + if i := strings.IndexFunc(s, isNotTokenChar); i != -1 { + return s[:i], s[i:] + } + return s, "" +} + +// skipSpace skips "bad" whitespace (BWS) defined in RFC 7230 section 3.2.3. +func skipSpace(s string) string { + // OWS = *( SP / HTAB ) + // ; optional whitespace + // BWS = OWS + // ; "bad" whitespace + if i := strings.IndexFunc(s, func(r rune) bool { + return r != ' ' && r != '\t' + }); i != -1 { + return s[i:] + } + return s +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/auth/client.go b/vendor/oras.land/oras-go/pkg/registry/remote/auth/client.go new file mode 100644 index 000000000..ef1c9479d --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/auth/client.go @@ -0,0 +1,367 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package auth + +import ( + "context" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "oras.land/oras-go/pkg/registry/remote/internal/errutil" +) + +// DefaultClient is the default auth-decorated client. +var DefaultClient = &Client{ + Header: http.Header{ + "User-Agent": {"oras-go"}, + }, + Cache: DefaultCache, +} + +// maxResponseBytes specifies the default limit on how many response bytes are +// allowed in the server's response from authorization service servers. +// A typical response message from authorization service servers is around 1 to +// 4 KiB. Since the size of a token must be smaller than the HTTP header size +// limit, which is usually 16 KiB. As specified by the distribution, the +// response may contain 2 identical tokens, that is, 16 x 2 = 32 KiB. +// Hence, 128 KiB should be sufficient. +// References: https://docs.docker.com/registry/spec/auth/token/ +var maxResponseBytes int64 = 128 * 1024 // 128 KiB + +// defaultClientID specifies the default client ID used in OAuth2. +// See also ClientID. +var defaultClientID = "oras-go" + +// Client is an auth-decorated HTTP client. +// Its zero value is a usable client that uses http.DefaultClient with no cache. +type Client struct { + // Client is the underlying HTTP client used to access the remote + // server. + // If nil, http.DefaultClient is used. + Client *http.Client + + // Header contains the custom headers to be added to each request. + Header http.Header + + // Credential specifies the function for resolving the credential for the + // given registry (i.e. host:port). + // `EmptyCredential` is a valid return value and should not be considered as + // an error. + // If nil, the credential is always resolved to `EmptyCredential`. + Credential func(context.Context, string) (Credential, error) + + // Cache caches credentials for direct accessing the remote registry. + // If nil, no cache is used. + Cache Cache + + // ClientID used in fetching OAuth2 token as a required field. + // If empty, a default client ID is used. + // Reference: https://docs.docker.com/registry/spec/auth/oauth/#getting-a-token + ClientID string + + // ForceAttemptOAuth2 controls whether to follow OAuth2 with password grant + // instead the distribution spec when authenticating using username and + // password. + // References: + // - https://docs.docker.com/registry/spec/auth/jwt/ + // - https://docs.docker.com/registry/spec/auth/oauth/ + ForceAttemptOAuth2 bool +} + +// client returns an HTTP client used to access the remote registry. +// http.DefaultClient is return if the client is not configured. +func (c *Client) client() *http.Client { + if c.Client == nil { + return http.DefaultClient + } + return c.Client +} + +// send adds headers to the request and sends the request to the remote server. +func (c *Client) send(req *http.Request) (*http.Response, error) { + for key, values := range c.Header { + req.Header[key] = append(req.Header[key], values...) + } + return c.client().Do(req) +} + +// credential resolves the credential for the given registry. +func (c *Client) credential(ctx context.Context, reg string) (Credential, error) { + if c.Credential == nil { + return EmptyCredential, nil + } + return c.Credential(ctx, reg) +} + +// cache resolves the cache. +// noCache is return if the cache is not configured. +func (c *Client) cache() Cache { + if c.Cache == nil { + return noCache{} + } + return c.Cache +} + +// SetUserAgent sets the user agent for all out-going requests. +func (c *Client) SetUserAgent(userAgent string) { + if c.Header == nil { + c.Header = http.Header{} + } + c.Header.Set("User-Agent", userAgent) +} + +// Do sends the request to the remote server with resolving authentication +// attempted. +// On authentication failure due to bad credential, +// - Do returns error if it fails to fetch token for bearer auth. +// - Do returns the registry response without error for basic auth. +func (c *Client) Do(originalReq *http.Request) (*http.Response, error) { + ctx := originalReq.Context() + req := originalReq.Clone(ctx) + + // attempt cached auth token + var attemptedKey string + cache := c.cache() + registry := originalReq.Host + scheme, err := cache.GetScheme(ctx, registry) + if err == nil { + switch scheme { + case SchemeBasic: + token, err := cache.GetToken(ctx, registry, SchemeBasic, "") + if err == nil { + req.Header.Set("Authorization", "Basic "+token) + } + case SchemeBearer: + scopes := GetScopes(ctx) + attemptedKey = strings.Join(scopes, " ") + token, err := cache.GetToken(ctx, registry, SchemeBearer, attemptedKey) + if err == nil { + req.Header.Set("Authorization", "Bearer "+token) + } + } + } + + resp, err := c.send(req) + if err != nil { + return nil, err + } + if resp.StatusCode != http.StatusUnauthorized { + return resp, nil + } + + // attempt again with credentials for recognized schemes + challenge := resp.Header.Get("Www-Authenticate") + scheme, params := parseChallenge(challenge) + switch scheme { + case SchemeBasic: + resp.Body.Close() + + token, err := cache.Set(ctx, registry, SchemeBasic, "", func(ctx context.Context) (string, error) { + return c.fetchBasicAuth(ctx, registry) + }) + if err != nil { + return nil, fmt.Errorf("%s %q: %w", resp.Request.Method, resp.Request.URL, err) + } + + req = originalReq.Clone(ctx) + req.Header.Set("Authorization", "Basic "+token) + case SchemeBearer: + resp.Body.Close() + + // merge hinted scopes with challenged scopes + scopes := GetScopes(ctx) + if scope := params["scope"]; scope != "" { + scopes = append(scopes, strings.Split(scope, " ")...) + scopes = CleanScopes(scopes) + } + key := strings.Join(scopes, " ") + + // attempt the cache again if there is a scope change + if key != attemptedKey { + if token, err := cache.GetToken(ctx, registry, SchemeBearer, key); err == nil { + req = originalReq.Clone(ctx) + req.Header.Set("Authorization", "Bearer "+token) + + resp, err := c.send(req) + if err != nil { + return nil, err + } + if resp.StatusCode != http.StatusUnauthorized { + return resp, nil + } + resp.Body.Close() + } + } + + // attempt with credentials + realm := params["realm"] + service := params["service"] + token, err := cache.Set(ctx, registry, SchemeBearer, key, func(ctx context.Context) (string, error) { + return c.fetchBearerToken(ctx, registry, realm, service, scopes) + }) + if err != nil { + return nil, fmt.Errorf("%s %q: %w", resp.Request.Method, resp.Request.URL, err) + } + + req = originalReq.Clone(ctx) + req.Header.Set("Authorization", "Bearer "+token) + default: + return resp, nil + } + + return c.send(req) +} + +// fetchBasicAuth fetches a basic auth token for the basic challenge. +func (c *Client) fetchBasicAuth(ctx context.Context, registry string) (string, error) { + cred, err := c.credential(ctx, registry) + if err != nil { + return "", fmt.Errorf("failed to resolve credential: %w", err) + } + if cred == EmptyCredential { + return "", errors.New("credential required for basic auth") + } + if cred.Username == "" || cred.Password == "" { + return "", errors.New("missing username or password for basic auth") + } + auth := cred.Username + ":" + cred.Password + return base64.StdEncoding.EncodeToString([]byte(auth)), nil +} + +// fetchBearerToken fetches an access token for the bearer challenge. +func (c *Client) fetchBearerToken(ctx context.Context, registry, realm, service string, scopes []string) (string, error) { + cred, err := c.credential(ctx, registry) + if err != nil { + return "", err + } + if cred.AccessToken != "" { + return cred.AccessToken, nil + } + if cred == EmptyCredential || (cred.RefreshToken == "" && !c.ForceAttemptOAuth2) { + return c.fetchDistributionToken(ctx, realm, service, scopes, cred.Username, cred.Password) + } + return c.fetchOAuth2Token(ctx, realm, service, scopes, cred) +} + +// fetchDistributionToken fetches an access token as defined by the distribution +// specification. +// It fetches anonymous tokens if no credential is provided. +// References: +// - https://docs.docker.com/registry/spec/auth/jwt/ +// - https://docs.docker.com/registry/spec/auth/token/ +func (c *Client) fetchDistributionToken(ctx context.Context, realm, service string, scopes []string, username, password string) (string, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, realm, nil) + if err != nil { + return "", err + } + if username != "" || password != "" { + req.SetBasicAuth(username, password) + } + q := req.URL.Query() + if service != "" { + q.Set("service", service) + } + for _, scope := range scopes { + q.Add("scope", scope) + } + req.URL.RawQuery = q.Encode() + + resp, err := c.send(req) + if err != nil { + return "", err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return "", errutil.ParseErrorResponse(resp) + } + + // As specified in https://docs.docker.com/registry/spec/auth/token/ section + // "Token Response Fields", the token is either in `token` or + // `access_token`. If both present, they are identical. + var result struct { + Token string `json:"token"` + AccessToken string `json:"access_token"` + } + lr := io.LimitReader(resp.Body, maxResponseBytes) + if err := json.NewDecoder(lr).Decode(&result); err != nil { + return "", fmt.Errorf("%s %q: failed to decode response: %w", resp.Request.Method, resp.Request.URL, err) + } + if result.AccessToken != "" { + return result.AccessToken, nil + } + if result.Token != "" { + return result.Token, nil + } + return "", fmt.Errorf("%s %q: empty token returned", resp.Request.Method, resp.Request.URL) +} + +// fetchOAuth2Token fetches an OAuth2 access token. +// Reference: https://docs.docker.com/registry/spec/auth/oauth/ +func (c *Client) fetchOAuth2Token(ctx context.Context, realm, service string, scopes []string, cred Credential) (string, error) { + form := url.Values{} + if cred.RefreshToken != "" { + form.Set("grant_type", "refresh_token") + form.Set("refresh_token", cred.RefreshToken) + } else if cred.Username != "" && cred.Password != "" { + form.Set("grant_type", "password") + form.Set("username", cred.Username) + form.Set("password", cred.Password) + } else { + return "", errors.New("missing username or password for bearer auth") + } + form.Set("service", service) + clientID := c.ClientID + if clientID == "" { + clientID = defaultClientID + } + form.Set("client_id", clientID) + if len(scopes) != 0 { + form.Set("scope", strings.Join(scopes, " ")) + } + body := strings.NewReader(form.Encode()) + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, realm, body) + if err != nil { + return "", err + } + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + + resp, err := c.send(req) + if err != nil { + return "", err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return "", errutil.ParseErrorResponse(resp) + } + + var result struct { + AccessToken string `json:"access_token"` + } + lr := io.LimitReader(resp.Body, maxResponseBytes) + if err := json.NewDecoder(lr).Decode(&result); err != nil { + return "", fmt.Errorf("%s %q: failed to decode response: %w", resp.Request.Method, resp.Request.URL, err) + } + if result.AccessToken != "" { + return result.AccessToken, nil + } + return "", fmt.Errorf("%s %q: empty token returned", resp.Request.Method, resp.Request.URL) +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/auth/credential.go b/vendor/oras.land/oras-go/pkg/registry/remote/auth/credential.go new file mode 100644 index 000000000..2cd9f774b --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/auth/credential.go @@ -0,0 +1,39 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package auth + +// EmptyCredential represents an empty credential. +var EmptyCredential Credential + +// Credential contains authentication credentials used to access remote +// registries. +type Credential struct { + // Username is the name of the user for the remote registry. + Username string + + // Password is the secret associated with the username. + Password string + + // RefreshToken is a bearer token to be sent to the authorization service + // for fetching access tokens. + // A refresh token is often referred as an identity token. + // Reference: https://docs.docker.com/registry/spec/auth/oauth/ + RefreshToken string + + // AccessToken is a bearer token to be sent to the registry. + // An access token is often referred as a registry token. + // Reference: https://docs.docker.com/registry/spec/auth/token/ + AccessToken string +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/auth/scope.go b/vendor/oras.land/oras-go/pkg/registry/remote/auth/scope.go new file mode 100644 index 000000000..3b865dd60 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/auth/scope.go @@ -0,0 +1,231 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package auth + +import ( + "context" + "sort" + "strings" +) + +// Actions used in scopes. +// Reference: https://docs.docker.com/registry/spec/auth/scope/ +const ( + // ActionPull represents generic read access for resources of the repository + // type. + ActionPull = "pull" + + // ActionPush represents generic write access for resources of the + // repository type. + ActionPush = "push" + + // ActionDelete represents the delete permission for resources of the + // repository type. + ActionDelete = "delete" +) + +// ScopeRegistryCatalog is the scope for registry catalog access. +const ScopeRegistryCatalog = "registry:catalog:*" + +// ScopeRepository returns a repository scope with given actions. +// Reference: https://docs.docker.com/registry/spec/auth/scope/ +func ScopeRepository(repository string, actions ...string) string { + actions = cleanActions(actions) + if repository == "" || len(actions) == 0 { + return "" + } + return strings.Join([]string{ + "repository", + repository, + strings.Join(actions, ","), + }, ":") +} + +// scopesContextKey is the context key for scopes. +type scopesContextKey struct{} + +// WithScopes returns a context with scopes added. Scopes are de-duplicated. +// Scopes are used as hints for the auth client to fetch bearer tokens with +// larger scopes. +// For example, uploading blob to the repository "hello-world" does HEAD request +// first then POST and PUT. The HEAD request will return a challenge for scope +// `repository:hello-world:pull`, and the auth client will fetch a token for +// that challenge. Later, the POST request will return a challenge for scope +// `repository:hello-world:push`, and the auth client will fetch a token for +// that challenge again. By invoking `WithScopes()` with the scope +// `repository:hello-world:pull,push`, the auth client with cache is hinted to +// fetch a token via a single token fetch request for all the HEAD, POST, PUT +// requests. +// Passing an empty list of scopes will virtually remove the scope hints in the +// context. +// Reference: https://docs.docker.com/registry/spec/auth/scope/ +func WithScopes(ctx context.Context, scopes ...string) context.Context { + scopes = CleanScopes(scopes) + return context.WithValue(ctx, scopesContextKey{}, scopes) +} + +// AppendScopes appends additional scopes to the existing scopes in the context +// and returns a new context. The resulted scopes are de-duplicated. +// The append operation does modify the existing scope in the context passed in. +func AppendScopes(ctx context.Context, scopes ...string) context.Context { + if len(scopes) == 0 { + return ctx + } + return WithScopes(ctx, append(GetScopes(ctx), scopes...)...) +} + +// GetScopes returns the scopes in the context. +func GetScopes(ctx context.Context) []string { + if scopes, ok := ctx.Value(scopesContextKey{}).([]string); ok { + return append([]string(nil), scopes...) + } + return nil +} + +// CleanScopes merges and sort the actions in ascending order if the scopes have +// the same resource type and name. The final scopes are sorted in ascending +// order. In other words, the scopes passed in are de-duplicated and sorted. +// Therefore, the output of this function is deterministic. +// If there is a wildcard `*` in the action, other actions in the same resource +// type and name are ignored. +func CleanScopes(scopes []string) []string { + // fast paths + switch len(scopes) { + case 0: + return nil + case 1: + scope := scopes[0] + i := strings.LastIndex(scope, ":") + if i == -1 { + return []string{scope} + } + actionList := strings.Split(scope[i+1:], ",") + actionList = cleanActions(actionList) + if len(actionList) == 0 { + return nil + } + actions := strings.Join(actionList, ",") + scope = scope[:i+1] + actions + return []string{scope} + } + + // slow path + var result []string + + // merge recognizable scopes + resourceTypes := make(map[string]map[string]map[string]struct{}) + for _, scope := range scopes { + // extract resource type + i := strings.Index(scope, ":") + if i == -1 { + result = append(result, scope) + continue + } + resourceType := scope[:i] + + // extract resource name and actions + rest := scope[i+1:] + i = strings.LastIndex(rest, ":") + if i == -1 { + result = append(result, scope) + continue + } + resourceName := rest[:i] + actions := rest[i+1:] + if actions == "" { + // drop scope since no action found + continue + } + + // add to the intermediate map for de-duplication + namedActions := resourceTypes[resourceType] + if namedActions == nil { + namedActions = make(map[string]map[string]struct{}) + resourceTypes[resourceType] = namedActions + } + actionSet := namedActions[resourceName] + if actionSet == nil { + actionSet = make(map[string]struct{}) + namedActions[resourceName] = actionSet + } + for _, action := range strings.Split(actions, ",") { + if action != "" { + actionSet[action] = struct{}{} + } + } + } + + // reconstruct scopes + for resourceType, namedActions := range resourceTypes { + for resourceName, actionSet := range namedActions { + if len(actionSet) == 0 { + continue + } + var actions []string + for action := range actionSet { + if action == "*" { + actions = []string{"*"} + break + } + actions = append(actions, action) + } + sort.Strings(actions) + scope := resourceType + ":" + resourceName + ":" + strings.Join(actions, ",") + result = append(result, scope) + } + } + + // sort and return + sort.Strings(result) + return result +} + +// cleanActions removes the duplicated actions and sort in ascending order. +// If there is a wildcard `*` in the action, other actions are ignored. +func cleanActions(actions []string) []string { + // fast paths + switch len(actions) { + case 0: + return nil + case 1: + if actions[0] == "" { + return nil + } + return actions + } + + // slow path + sort.Strings(actions) + n := 0 + for i := 0; i < len(actions); i++ { + if actions[i] == "*" { + return []string{"*"} + } + if actions[i] != actions[n] { + n++ + if n != i { + actions[n] = actions[i] + } + } + } + n++ + if actions[0] == "" { + if n == 1 { + return nil + } + return actions[1:n] + } + return actions[:n] +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/internal/errutil/errors.go b/vendor/oras.land/oras-go/pkg/registry/remote/internal/errutil/errors.go new file mode 100644 index 000000000..201ecce89 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/internal/errutil/errors.go @@ -0,0 +1,83 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package errutil + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "strings" + "unicode" +) + +// maxErrorBytes specifies the default limit on how many response bytes are +// allowed in the server's error response. +// A typical error message is around 200 bytes. Hence, 8 KiB should be +// sufficient. +var maxErrorBytes int64 = 8 * 1024 // 8 KiB + +// requestError contains a single error. +type requestError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +// Error returns a error string describing the error. +func (e requestError) Error() string { + code := strings.Map(func(r rune) rune { + if r == '_' { + return ' ' + } + return unicode.ToLower(r) + }, e.Code) + if e.Message == "" { + return code + } + return fmt.Sprintf("%s: %s", code, e.Message) +} + +// requestErrors is a bundle of requestError. +type requestErrors []requestError + +// Error returns a error string describing the error. +func (errs requestErrors) Error() string { + switch len(errs) { + case 0: + return "<nil>" + case 1: + return errs[0].Error() + } + var errmsgs []string + for _, err := range errs { + errmsgs = append(errmsgs, err.Error()) + } + return strings.Join(errmsgs, "; ") +} + +// ParseErrorResponse parses the error returned by the remote registry. +func ParseErrorResponse(resp *http.Response) error { + var errmsg string + var body struct { + Errors requestErrors `json:"errors"` + } + lr := io.LimitReader(resp.Body, maxErrorBytes) + if err := json.NewDecoder(lr).Decode(&body); err == nil && len(body.Errors) > 0 { + errmsg = body.Errors.Error() + } else { + errmsg = http.StatusText(resp.StatusCode) + } + return fmt.Errorf("%s %q: unexpected status code %d: %s", resp.Request.Method, resp.Request.URL, resp.StatusCode, errmsg) +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/internal/syncutil/once.go b/vendor/oras.land/oras-go/pkg/registry/remote/internal/syncutil/once.go new file mode 100644 index 000000000..a685360b6 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/internal/syncutil/once.go @@ -0,0 +1,69 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package syncutil + +import "context" + +// Once is an object that will perform exactly one action. +// Unlike sync.Once, this Once allowes the action to have return values. +type Once struct { + result interface{} + err error + status chan bool +} + +// NewOnce creates a new Once instance. +func NewOnce() *Once { + status := make(chan bool, 1) + status <- true + return &Once{ + status: status, + } +} + +// Do calls the function f if and only if Do is being called first time or all +// previous function calls are cancelled, deadline exceeded, or panicking. +// When `once.Do(ctx, f)` is called multiple times, the return value of the +// first call of the function f is stored, and is directly returned for other +// calls. +// Besides the return value of the function f, including the error, Do returns +// true if the function f passed is called first and is not cancelled, deadline +// exceeded, or panicking. Otherwise, returns false. +func (o *Once) Do(ctx context.Context, f func() (interface{}, error)) (bool, interface{}, error) { + defer func() { + if r := recover(); r != nil { + o.status <- true + panic(r) + } + }() + for { + select { + case inProgress := <-o.status: + if !inProgress { + return false, o.result, o.err + } + result, err := f() + if err == context.Canceled || err == context.DeadlineExceeded { + o.status <- true + return false, nil, err + } + o.result, o.err = result, err + close(o.status) + return true, result, err + case <-ctx.Done(): + return false, nil, ctx.Err() + } + } +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/repository.go b/vendor/oras.land/oras-go/pkg/registry/remote/repository.go new file mode 100644 index 000000000..0fbd37b66 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/repository.go @@ -0,0 +1,171 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package remote + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "strconv" + + errdef "oras.land/oras-go/pkg/content" + "oras.land/oras-go/pkg/registry" + "oras.land/oras-go/pkg/registry/remote/auth" + "oras.land/oras-go/pkg/registry/remote/internal/errutil" +) + +// Client is an interface for a HTTP client. +type Client interface { + // Do sends an HTTP request and returns an HTTP response. + // + // Unlike http.RoundTripper, Client can attempt to interpret the response + // and handle higher-level protocol details such as redirects and + // authentication. + // + // Like http.RoundTripper, Client should not modify the request, and must + // always close the request body. + Do(*http.Request) (*http.Response, error) +} + +// Repository is an HTTP client to a remote repository. +type Repository struct { + // Client is the underlying HTTP client used to access the remote registry. + // If nil, auth.DefaultClient is used. + Client Client + + // Reference references the remote repository. + Reference registry.Reference + + // PlainHTTP signals the transport to access the remote repository via HTTP + // instead of HTTPS. + PlainHTTP bool + + // ManifestMediaTypes is used in `Accept` header for resolving manifests from + // references. It is also used in identifying manifests and blobs from + // descriptors. + // If an empty list is present, default manifest media types are used. + ManifestMediaTypes []string + + // TagListPageSize specifies the page size when invoking the tag list API. + // If zero, the page size is determined by the remote registry. + // Reference: https://docs.docker.com/registry/spec/api/#tags + TagListPageSize int + + // ReferrerListPageSize specifies the page size when invoking the Referrers + // API. + // If zero, the page size is determined by the remote registry. + // Reference: https://github.com/oras-project/artifacts-spec/blob/main/manifest-referrers-api.md + ReferrerListPageSize int + + // MaxMetadataBytes specifies a limit on how many response bytes are allowed + // in the server's response to the metadata APIs, such as catalog list, tag + // list, and referrers list. + // If zero, a default (currently 4MiB) is used. + MaxMetadataBytes int64 +} + +// NewRepository creates a client to the remote repository identified by a +// reference. +// Example: localhost:5000/hello-world +func NewRepository(reference string) (*Repository, error) { + ref, err := registry.ParseReference(reference) + if err != nil { + return nil, err + } + return &Repository{ + Reference: ref, + }, nil +} + +// client returns an HTTP client used to access the remote repository. +// A default HTTP client is return if the client is not configured. +func (r *Repository) client() Client { + if r.Client == nil { + return auth.DefaultClient + } + return r.Client +} + +// parseReference validates the reference. +// Both simplified or fully qualified references are accepted as input. +// A fully qualified reference is returned on success. +func (r *Repository) parseReference(reference string) (registry.Reference, error) { + ref, err := registry.ParseReference(reference) + if err != nil { + ref = registry.Reference{ + Registry: r.Reference.Registry, + Repository: r.Reference.Repository, + Reference: reference, + } + if err = ref.ValidateReference(); err != nil { + return registry.Reference{}, err + } + return ref, nil + } + if ref.Registry == r.Reference.Registry && ref.Repository == r.Reference.Repository { + return ref, nil + } + return registry.Reference{}, fmt.Errorf("%w %q: expect %q", errdef.ErrInvalidReference, ref, r.Reference) +} + +// Tags lists the tags available in the repository. +func (r *Repository) Tags(ctx context.Context, fn func(tags []string) error) error { + ctx = withScopeHint(ctx, r.Reference, auth.ActionPull) + url := buildRepositoryTagListURL(r.PlainHTTP, r.Reference) + var err error + for err == nil { + url, err = r.tags(ctx, fn, url) + } + if err != errNoLink { + return err + } + return nil +} + +// tags returns a single page of tag list with the next link. +func (r *Repository) tags(ctx context.Context, fn func(tags []string) error, url string) (string, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return "", err + } + if r.TagListPageSize > 0 { + q := req.URL.Query() + q.Set("n", strconv.Itoa(r.TagListPageSize)) + req.URL.RawQuery = q.Encode() + } + + resp, err := r.client().Do(req) + if err != nil { + return "", err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return "", errutil.ParseErrorResponse(resp) + } + var page struct { + Tags []string `json:"tags"` + } + lr := limitReader(resp.Body, r.MaxMetadataBytes) + if err := json.NewDecoder(lr).Decode(&page); err != nil { + return "", fmt.Errorf("%s %q: failed to decode response: %w", resp.Request.Method, resp.Request.URL, err) + } + if err := fn(page.Tags); err != nil { + return "", err + } + + return parseLink(resp) +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/url.go b/vendor/oras.land/oras-go/pkg/registry/remote/url.go new file mode 100644 index 000000000..f01752020 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/url.go @@ -0,0 +1,42 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package remote + +import ( + "fmt" + + "oras.land/oras-go/pkg/registry" +) + +// buildScheme returns HTTP scheme used to access the remote registry. +func buildScheme(plainHTTP bool) string { + if plainHTTP { + return "http" + } + return "https" +} + +// buildRepositoryBaseURL builds the base endpoint of the remote repository. +// Format: <scheme>://<registry>/v2/<repository> +func buildRepositoryBaseURL(plainHTTP bool, ref registry.Reference) string { + return fmt.Sprintf("%s://%s/v2/%s", buildScheme(plainHTTP), ref.Host(), ref.Repository) +} + +// buildRepositoryTagListURL builds the URL for accessing the tag list API. +// Format: <scheme>://<registry>/v2/<repository>/tags/list +// Reference: https://docs.docker.com/registry/spec/api/#tags +func buildRepositoryTagListURL(plainHTTP bool, ref registry.Reference) string { + return buildRepositoryBaseURL(plainHTTP, ref) + "/tags/list" +} diff --git a/vendor/oras.land/oras-go/pkg/registry/remote/utils.go b/vendor/oras.land/oras-go/pkg/registry/remote/utils.go new file mode 100644 index 000000000..eaa84f0f4 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/remote/utils.go @@ -0,0 +1,72 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package remote + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "strings" + + "oras.land/oras-go/pkg/registry" + "oras.land/oras-go/pkg/registry/remote/auth" +) + +// defaultMaxMetadataBytes specifies the default limit on how many response +// bytes are allowed in the server's response to the metadata APIs. +// See also: Repository.MaxMetadataBytes +var defaultMaxMetadataBytes int64 = 4 * 1024 * 1024 // 4 MiB + +// errNoLink is returned by parseLink() when no Link header is present. +var errNoLink = errors.New("no Link header in response") + +// parseLink returns the URL of the response's "Link" header, if present. +func parseLink(resp *http.Response) (string, error) { + link := resp.Header.Get("Link") + if link == "" { + return "", errNoLink + } + if link[0] != '<' { + return "", fmt.Errorf("invalid next link %q: missing '<'", link) + } + if i := strings.IndexByte(link, '>'); i == -1 { + return "", fmt.Errorf("invalid next link %q: missing '>'", link) + } else { + link = link[1:i] + } + + linkURL, err := resp.Request.URL.Parse(link) + if err != nil { + return "", err + } + return linkURL.String(), nil +} + +// limitReader returns a Reader that reads from r but stops with EOF after n +// bytes. If n is zero, defaultMaxMetadataBytes is used. +func limitReader(r io.Reader, n int64) io.Reader { + if n == 0 { + n = defaultMaxMetadataBytes + } + return io.LimitReader(r, n) +} + +// withScopeHint adds a hinted scope to the context. +func withScopeHint(ctx context.Context, ref registry.Reference, actions ...string) context.Context { + scope := auth.ScopeRepository(ref.Repository, actions...) + return auth.AppendScopes(ctx, scope) +} diff --git a/vendor/oras.land/oras-go/pkg/registry/repository.go b/vendor/oras.land/oras-go/pkg/registry/repository.go new file mode 100644 index 000000000..bcffbe8d2 --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/registry/repository.go @@ -0,0 +1,57 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package registry + +import ( + "context" +) + +// Repository is an ORAS target and an union of the blob and the manifest CASs. +// As specified by https://docs.docker.com/registry/spec/api/, it is natural to +// assume that content.Resolver interface only works for manifests. Tagging a +// blob may be resulted in an `ErrUnsupported` error. However, this interface +// does not restrict tagging blobs. +// Since a repository is an union of the blob and the manifest CASs, all +// operations defined in the `BlobStore` are executed depending on the media +// type of the given descriptor accordingly. +// Furthurmore, this interface also provides the ability to enforce the +// separation of the blob and the manifests CASs. +type Repository interface { + + // Tags lists the tags available in the repository. + // Since the returned tag list may be paginated by the underlying + // implementation, a function should be passed in to process the paginated + // tag list. + // Note: When implemented by a remote registry, the tags API is called. + // However, not all registries supports pagination or conforms the + // specification. + // References: + // - https://github.com/opencontainers/distribution-spec/blob/main/spec.md#content-discovery + // - https://docs.docker.com/registry/spec/api/#tags + // See also `Tags()` in this package. + Tags(ctx context.Context, fn func(tags []string) error) error +} + +// Tags lists the tags available in the repository. +func Tags(ctx context.Context, repo Repository) ([]string, error) { + var res []string + if err := repo.Tags(ctx, func(tags []string) error { + res = append(res, tags...) + return nil + }); err != nil { + return nil, err + } + return res, nil +} diff --git a/vendor/oras.land/oras-go/pkg/target/target.go b/vendor/oras.land/oras-go/pkg/target/target.go new file mode 100644 index 000000000..4398f14eb --- /dev/null +++ b/vendor/oras.land/oras-go/pkg/target/target.go @@ -0,0 +1,26 @@ +/* +Copyright The ORAS Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package target + +import ( + "github.com/containerd/containerd/remotes" +) + +// Target represents a place to which one can send/push or retrieve/pull artifacts. +// Anything that implements the Target interface can be used as a place to send or +// retrieve artifacts. +type Target interface { + remotes.Resolver +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go new file mode 100644 index 000000000..5fdd657cd --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go @@ -0,0 +1,465 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package envtest + +import ( + "bufio" + "bytes" + "context" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "time" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + k8syaml "k8s.io/apimachinery/pkg/util/yaml" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/util/retry" + "k8s.io/utils/ptr" + "sigs.k8s.io/yaml" + + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/webhook/conversion" +) + +// CRDInstallOptions are the options for installing CRDs. +type CRDInstallOptions struct { + // Scheme is used to determine if conversion webhooks should be enabled + // for a particular CRD / object. + // + // Conversion webhooks are going to be enabled if an object in the scheme + // implements Hub and Spoke conversions. + // + // If nil, scheme.Scheme is used. + Scheme *runtime.Scheme + + // Paths is a list of paths to the directories or files containing CRDs + Paths []string + + // CRDs is a list of CRDs to install + CRDs []*apiextensionsv1.CustomResourceDefinition + + // ErrorIfPathMissing will cause an error if a Path does not exist + ErrorIfPathMissing bool + + // MaxTime is the max time to wait + MaxTime time.Duration + + // PollInterval is the interval to check + PollInterval time.Duration + + // CleanUpAfterUse will cause the CRDs listed for installation to be + // uninstalled when terminating the test environment. + // Defaults to false. + CleanUpAfterUse bool + + // WebhookOptions contains the conversion webhook information to install + // on the CRDs. This field is usually inherited by the EnvTest options. + // + // If you're passing this field manually, you need to make sure that + // the CA information and host port is filled in properly. + WebhookOptions WebhookInstallOptions +} + +const ( + defaultPollInterval = 100 * time.Millisecond + defaultMaxWait = 10 * time.Second +) + +// InstallCRDs installs a collection of CRDs into a cluster by reading the crd yaml files from a directory. +func InstallCRDs(config *rest.Config, options CRDInstallOptions) ([]*apiextensionsv1.CustomResourceDefinition, error) { + defaultCRDOptions(&options) + + // Read the CRD yamls into options.CRDs + if err := readCRDFiles(&options); err != nil { + return nil, fmt.Errorf("unable to read CRD files: %w", err) + } + + if err := modifyConversionWebhooks(options.CRDs, options.Scheme, options.WebhookOptions); err != nil { + return nil, err + } + + // Create the CRDs in the apiserver + if err := CreateCRDs(config, options.CRDs); err != nil { + return options.CRDs, fmt.Errorf("unable to create CRD instances: %w", err) + } + + // Wait for the CRDs to appear as Resources in the apiserver + if err := WaitForCRDs(config, options.CRDs, options); err != nil { + return options.CRDs, fmt.Errorf("something went wrong waiting for CRDs to appear as API resources: %w", err) + } + + return options.CRDs, nil +} + +// readCRDFiles reads the directories of CRDs in options.Paths and adds the CRD structs to options.CRDs. +func readCRDFiles(options *CRDInstallOptions) error { + if len(options.Paths) > 0 { + crdList, err := renderCRDs(options) + if err != nil { + return err + } + + options.CRDs = append(options.CRDs, crdList...) + } + return nil +} + +// defaultCRDOptions sets the default values for CRDs. +func defaultCRDOptions(o *CRDInstallOptions) { + if o.Scheme == nil { + o.Scheme = scheme.Scheme + } + if o.MaxTime == 0 { + o.MaxTime = defaultMaxWait + } + if o.PollInterval == 0 { + o.PollInterval = defaultPollInterval + } +} + +// WaitForCRDs waits for the CRDs to appear in discovery. +func WaitForCRDs(config *rest.Config, crds []*apiextensionsv1.CustomResourceDefinition, options CRDInstallOptions) error { + // Add each CRD to a map of GroupVersion to Resource + waitingFor := map[schema.GroupVersion]*sets.Set[string]{} + for _, crd := range crds { + gvs := []schema.GroupVersion{} + for _, version := range crd.Spec.Versions { + if version.Served { + gvs = append(gvs, schema.GroupVersion{Group: crd.Spec.Group, Version: version.Name}) + } + } + + for _, gv := range gvs { + log.V(1).Info("adding API in waitlist", "GV", gv) + if _, found := waitingFor[gv]; !found { + // Initialize the set + waitingFor[gv] = &sets.Set[string]{} + } + // Add the Resource + waitingFor[gv].Insert(crd.Spec.Names.Plural) + } + } + + // Poll until all resources are found in discovery + p := &poller{config: config, waitingFor: waitingFor} + return wait.PollUntilContextTimeout(context.TODO(), options.PollInterval, options.MaxTime, true, p.poll) +} + +// poller checks if all the resources have been found in discovery, and returns false if not. +type poller struct { + // config is used to get discovery + config *rest.Config + + // waitingFor is the map of resources keyed by group version that have not yet been found in discovery + waitingFor map[schema.GroupVersion]*sets.Set[string] +} + +// poll checks if all the resources have been found in discovery, and returns false if not. +func (p *poller) poll(ctx context.Context) (done bool, err error) { + // Create a new clientset to avoid any client caching of discovery + cs, err := clientset.NewForConfig(p.config) + if err != nil { + return false, err + } + + allFound := true + for gv, resources := range p.waitingFor { + // All resources found, do nothing + if resources.Len() == 0 { + delete(p.waitingFor, gv) + continue + } + + // Get the Resources for this GroupVersion + // TODO: Maybe the controller-runtime client should be able to do this... + resourceList, err := cs.Discovery().ServerResourcesForGroupVersion(gv.Group + "/" + gv.Version) + if err != nil { + return false, nil //nolint:nilerr + } + + // Remove each found resource from the resources set that we are waiting for + for _, resource := range resourceList.APIResources { + resources.Delete(resource.Name) + } + + // Still waiting on some resources in this group version + if resources.Len() != 0 { + allFound = false + } + } + return allFound, nil +} + +// UninstallCRDs uninstalls a collection of CRDs by reading the crd yaml files from a directory. +func UninstallCRDs(config *rest.Config, options CRDInstallOptions) error { + // Read the CRD yamls into options.CRDs + if err := readCRDFiles(&options); err != nil { + return err + } + + // Delete the CRDs from the apiserver + cs, err := client.New(config, client.Options{}) + if err != nil { + return err + } + + // Uninstall each CRD + for _, crd := range options.CRDs { + crd := crd + log.V(1).Info("uninstalling CRD", "crd", crd.GetName()) + if err := cs.Delete(context.TODO(), crd); err != nil { + // If CRD is not found, we can consider success + if !apierrors.IsNotFound(err) { + return err + } + } + } + + return nil +} + +// CreateCRDs creates the CRDs. +func CreateCRDs(config *rest.Config, crds []*apiextensionsv1.CustomResourceDefinition) error { + cs, err := client.New(config, client.Options{}) + if err != nil { + return fmt.Errorf("unable to create client: %w", err) + } + + // Create each CRD + for _, crd := range crds { + crd := crd + log.V(1).Info("installing CRD", "crd", crd.GetName()) + existingCrd := crd.DeepCopy() + err := cs.Get(context.TODO(), client.ObjectKey{Name: crd.GetName()}, existingCrd) + switch { + case apierrors.IsNotFound(err): + if err := cs.Create(context.TODO(), crd); err != nil { + return fmt.Errorf("unable to create CRD %q: %w", crd.GetName(), err) + } + case err != nil: + return fmt.Errorf("unable to get CRD %q to check if it exists: %w", crd.GetName(), err) + default: + log.V(1).Info("CRD already exists, updating", "crd", crd.GetName()) + if err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { + if err := cs.Get(context.TODO(), client.ObjectKey{Name: crd.GetName()}, existingCrd); err != nil { + return err + } + crd.SetResourceVersion(existingCrd.GetResourceVersion()) + return cs.Update(context.TODO(), crd) + }); err != nil { + return err + } + } + } + return nil +} + +// renderCRDs iterate through options.Paths and extract all CRD files. +func renderCRDs(options *CRDInstallOptions) ([]*apiextensionsv1.CustomResourceDefinition, error) { + type GVKN struct { + GVK schema.GroupVersionKind + Name string + } + + crds := map[GVKN]*apiextensionsv1.CustomResourceDefinition{} + + for _, path := range options.Paths { + var ( + err error + info os.FileInfo + files []string + filePath = path + ) + + // Return the error if ErrorIfPathMissing exists + if info, err = os.Stat(path); os.IsNotExist(err) { + if options.ErrorIfPathMissing { + return nil, err + } + continue + } + + if !info.IsDir() { + filePath, files = filepath.Dir(path), []string{info.Name()} + } else { + entries, err := os.ReadDir(path) + if err != nil { + return nil, err + } + for _, e := range entries { + files = append(files, e.Name()) + } + } + + log.V(1).Info("reading CRDs from path", "path", path) + crdList, err := readCRDs(filePath, files) + if err != nil { + return nil, err + } + + for i, crd := range crdList { + gvkn := GVKN{GVK: crd.GroupVersionKind(), Name: crd.GetName()} + if _, found := crds[gvkn]; found { + // Currently, we only print a log when there are duplicates. We may want to error out if that makes more sense. + log.Info("there are more than one CRD definitions with the same <Group, Version, Kind, Name>", "GVKN", gvkn) + } + // We always use the CRD definition that we found last. + crds[gvkn] = crdList[i] + } + } + + // Converting map to a list to return + res := []*apiextensionsv1.CustomResourceDefinition{} + for _, obj := range crds { + res = append(res, obj) + } + return res, nil +} + +// modifyConversionWebhooks takes all the registered CustomResourceDefinitions and applies modifications +// to conditionally enable webhooks if the type is registered within the scheme. +func modifyConversionWebhooks(crds []*apiextensionsv1.CustomResourceDefinition, scheme *runtime.Scheme, webhookOptions WebhookInstallOptions) error { + if len(webhookOptions.LocalServingCAData) == 0 { + return nil + } + + // Determine all registered convertible types. + convertibles := map[schema.GroupKind]struct{}{} + for gvk := range scheme.AllKnownTypes() { + obj, err := scheme.New(gvk) + if err != nil { + return err + } + if ok, err := conversion.IsConvertible(scheme, obj); ok && err == nil { + convertibles[gvk.GroupKind()] = struct{}{} + } + } + + // generate host port. + hostPort, err := webhookOptions.generateHostPort() + if err != nil { + return err + } + url := ptr.To(fmt.Sprintf("https://%s/convert", hostPort)) + + for i := range crds { + // Continue if we're preserving unknown fields. + if crds[i].Spec.PreserveUnknownFields { + continue + } + if !webhookOptions.IgnoreSchemeConvertible { + // Continue if the GroupKind isn't registered as being convertible, + // and remove any existing conversion webhooks if they exist. + // This is to prevent the CRD from being rejected by the apiserver, usually + // manifests that are generated by controller-gen will have a conversion + // webhook set, but we don't want to enable it if the type isn't registered. + if _, ok := convertibles[schema.GroupKind{ + Group: crds[i].Spec.Group, + Kind: crds[i].Spec.Names.Kind, + }]; !ok { + crds[i].Spec.Conversion = nil + continue + } + } + if crds[i].Spec.Conversion == nil { + crds[i].Spec.Conversion = &apiextensionsv1.CustomResourceConversion{ + Webhook: &apiextensionsv1.WebhookConversion{}, + } + } + crds[i].Spec.Conversion.Strategy = apiextensionsv1.WebhookConverter + crds[i].Spec.Conversion.Webhook.ConversionReviewVersions = []string{"v1", "v1beta1"} + crds[i].Spec.Conversion.Webhook.ClientConfig = &apiextensionsv1.WebhookClientConfig{ + Service: nil, + URL: url, + CABundle: webhookOptions.LocalServingCAData, + } + } + + return nil +} + +// readCRDs reads the CRDs from files and Unmarshals them into structs. +func readCRDs(basePath string, files []string) ([]*apiextensionsv1.CustomResourceDefinition, error) { + var crds []*apiextensionsv1.CustomResourceDefinition + + // White list the file extensions that may contain CRDs + crdExts := sets.NewString(".json", ".yaml", ".yml") + + for _, file := range files { + // Only parse allowlisted file types + if !crdExts.Has(filepath.Ext(file)) { + continue + } + + // Unmarshal CRDs from file into structs + docs, err := readDocuments(filepath.Join(basePath, file)) + if err != nil { + return nil, err + } + + for _, doc := range docs { + crd := &apiextensionsv1.CustomResourceDefinition{} + if err = yaml.Unmarshal(doc, crd); err != nil { + return nil, err + } + + if crd.Kind != "CustomResourceDefinition" || crd.Spec.Names.Kind == "" || crd.Spec.Group == "" { + continue + } + crds = append(crds, crd) + } + + log.V(1).Info("read CRDs from file", "file", file) + } + return crds, nil +} + +// readDocuments reads documents from file. +func readDocuments(fp string) ([][]byte, error) { + b, err := os.ReadFile(fp) + if err != nil { + return nil, err + } + + docs := [][]byte{} + reader := k8syaml.NewYAMLReader(bufio.NewReader(bytes.NewReader(b))) + for { + // Read document + doc, err := reader.Read() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + + return nil, err + } + + docs = append(docs, doc) + } + + return docs, nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/doc.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/doc.go new file mode 100644 index 000000000..412e794cc --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/doc.go @@ -0,0 +1,26 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package envtest provides libraries for integration testing by starting a local control plane +// +// Control plane binaries (etcd and kube-apiserver) are loaded by default from +// /usr/local/kubebuilder/bin. This can be overridden by setting the +// KUBEBUILDER_ASSETS environment variable, or by directly creating a +// ControlPlane for the Environment to use. +// +// Environment can also be configured to work with an existing cluster, and +// simply load CRDs and provide client configuration. +package envtest diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/helper.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/helper.go new file mode 100644 index 000000000..d3b52017d --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/helper.go @@ -0,0 +1,69 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package envtest + +import ( + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/client-go/kubernetes/scheme" +) + +var ( + crdScheme = scheme.Scheme +) + +// init is required to correctly initialize the crdScheme package variable. +func init() { + _ = apiextensionsv1.AddToScheme(crdScheme) +} + +// mergePaths merges two string slices containing paths. +// This function makes no guarantees about order of the merged slice. +func mergePaths(s1, s2 []string) []string { + m := make(map[string]struct{}) + for _, s := range s1 { + m[s] = struct{}{} + } + for _, s := range s2 { + m[s] = struct{}{} + } + merged := make([]string, len(m)) + i := 0 + for key := range m { + merged[i] = key + i++ + } + return merged +} + +// mergeCRDs merges two CRD slices using their names. +// This function makes no guarantees about order of the merged slice. +func mergeCRDs(s1, s2 []*apiextensionsv1.CustomResourceDefinition) []*apiextensionsv1.CustomResourceDefinition { + m := make(map[string]*apiextensionsv1.CustomResourceDefinition) + for _, obj := range s1 { + m[obj.GetName()] = obj + } + for _, obj := range s2 { + m[obj.GetName()] = obj + } + merged := make([]*apiextensionsv1.CustomResourceDefinition, len(m)) + i := 0 + for _, obj := range m { + merged[i] = obj.DeepCopy() + i++ + } + return merged +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go new file mode 100644 index 000000000..690483fe3 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go @@ -0,0 +1,362 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package envtest + +import ( + "fmt" + "os" + "strings" + "time" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + "sigs.k8s.io/controller-runtime/pkg/client/config" + logf "sigs.k8s.io/controller-runtime/pkg/internal/log" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/process" +) + +var log = logf.RuntimeLog.WithName("test-env") + +/* +It's possible to override some defaults, by setting the following environment variables: +* USE_EXISTING_CLUSTER (boolean): if set to true, envtest will use an existing cluster +* TEST_ASSET_KUBE_APISERVER (string): path to the api-server binary to use +* TEST_ASSET_ETCD (string): path to the etcd binary to use +* TEST_ASSET_KUBECTL (string): path to the kubectl binary to use +* KUBEBUILDER_ASSETS (string): directory containing the binaries to use (api-server, etcd and kubectl). Defaults to /usr/local/kubebuilder/bin. +* KUBEBUILDER_CONTROLPLANE_START_TIMEOUT (string supported by time.ParseDuration): timeout for test control plane to start. Defaults to 20s. +* KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT (string supported by time.ParseDuration): timeout for test control plane to start. Defaults to 20s. +* KUBEBUILDER_ATTACH_CONTROL_PLANE_OUTPUT (boolean): if set to true, the control plane's stdout and stderr are attached to os.Stdout and os.Stderr +*/ +const ( + envUseExistingCluster = "USE_EXISTING_CLUSTER" + envStartTimeout = "KUBEBUILDER_CONTROLPLANE_START_TIMEOUT" + envStopTimeout = "KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT" + envAttachOutput = "KUBEBUILDER_ATTACH_CONTROL_PLANE_OUTPUT" + StartTimeout = 60 + StopTimeout = 60 + + defaultKubebuilderControlPlaneStartTimeout = 20 * time.Second + defaultKubebuilderControlPlaneStopTimeout = 20 * time.Second +) + +// internal types we expose as part of our public API. +type ( + // ControlPlane is the re-exported ControlPlane type from the internal testing package. + ControlPlane = controlplane.ControlPlane + + // APIServer is the re-exported APIServer from the internal testing package. + APIServer = controlplane.APIServer + + // Etcd is the re-exported Etcd from the internal testing package. + Etcd = controlplane.Etcd + + // User represents a Kubernetes user to provision for auth purposes. + User = controlplane.User + + // AuthenticatedUser represets a Kubernetes user that's been provisioned. + AuthenticatedUser = controlplane.AuthenticatedUser + + // ListenAddr indicates the address and port that the API server should listen on. + ListenAddr = process.ListenAddr + + // SecureServing contains details describing how the API server should serve + // its secure endpoint. + SecureServing = controlplane.SecureServing + + // Authn is an authentication method that can be used with the control plane to + // provision users. + Authn = controlplane.Authn + + // Arguments allows configuring a process's flags. + Arguments = process.Arguments + + // Arg is a single flag with one or more values. + Arg = process.Arg +) + +var ( + // EmptyArguments constructs a new set of flags with nothing set. + // + // This is mostly useful for testing helper methods -- you'll want to call + // Configure on the APIServer (or etcd) to configure their arguments. + EmptyArguments = process.EmptyArguments +) + +// Environment creates a Kubernetes test environment that will start / stop the Kubernetes control plane and +// install extension APIs. +type Environment struct { + // ControlPlane is the ControlPlane including the apiserver and etcd + ControlPlane controlplane.ControlPlane + + // Scheme is used to determine if conversion webhooks should be enabled + // for a particular CRD / object. + // + // Conversion webhooks are going to be enabled if an object in the scheme + // implements Hub and Spoke conversions. + // + // If nil, scheme.Scheme is used. + Scheme *runtime.Scheme + + // Config can be used to talk to the apiserver. It's automatically + // populated if not set using the standard controller-runtime config + // loading. + Config *rest.Config + + // CRDInstallOptions are the options for installing CRDs. + CRDInstallOptions CRDInstallOptions + + // WebhookInstallOptions are the options for installing webhooks. + WebhookInstallOptions WebhookInstallOptions + + // ErrorIfCRDPathMissing provides an interface for the underlying + // CRDInstallOptions.ErrorIfPathMissing. It prevents silent failures + // for missing CRD paths. + ErrorIfCRDPathMissing bool + + // CRDs is a list of CRDs to install. + // If both this field and CRDs field in CRDInstallOptions are specified, the + // values are merged. + CRDs []*apiextensionsv1.CustomResourceDefinition + + // CRDDirectoryPaths is a list of paths containing CRD yaml or json configs. + // If both this field and Paths field in CRDInstallOptions are specified, the + // values are merged. + CRDDirectoryPaths []string + + // BinaryAssetsDirectory is the path where the binaries required for the envtest are + // located in the local environment. This field can be overridden by setting KUBEBUILDER_ASSETS. + BinaryAssetsDirectory string + + // UseExistingCluster indicates that this environments should use an + // existing kubeconfig, instead of trying to stand up a new control plane. + // This is useful in cases that need aggregated API servers and the like. + UseExistingCluster *bool + + // ControlPlaneStartTimeout is the maximum duration each controlplane component + // may take to start. It defaults to the KUBEBUILDER_CONTROLPLANE_START_TIMEOUT + // environment variable or 20 seconds if unspecified + ControlPlaneStartTimeout time.Duration + + // ControlPlaneStopTimeout is the maximum duration each controlplane component + // may take to stop. It defaults to the KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT + // environment variable or 20 seconds if unspecified + ControlPlaneStopTimeout time.Duration + + // AttachControlPlaneOutput indicates if control plane output will be attached to os.Stdout and os.Stderr. + // Enable this to get more visibility of the testing control plane. + // It respect KUBEBUILDER_ATTACH_CONTROL_PLANE_OUTPUT environment variable. + AttachControlPlaneOutput bool +} + +// Stop stops a running server. +// Previously installed CRDs, as listed in CRDInstallOptions.CRDs, will be uninstalled +// if CRDInstallOptions.CleanUpAfterUse are set to true. +func (te *Environment) Stop() error { + if te.CRDInstallOptions.CleanUpAfterUse { + if err := UninstallCRDs(te.Config, te.CRDInstallOptions); err != nil { + return err + } + } + + if err := te.WebhookInstallOptions.Cleanup(); err != nil { + return err + } + + if te.useExistingCluster() { + return nil + } + + return te.ControlPlane.Stop() +} + +// Start starts a local Kubernetes server and updates te.ApiserverPort with the port it is listening on. +func (te *Environment) Start() (*rest.Config, error) { + if te.useExistingCluster() { + log.V(1).Info("using existing cluster") + if te.Config == nil { + // we want to allow people to pass in their own config, so + // only load a config if it hasn't already been set. + log.V(1).Info("automatically acquiring client configuration") + + var err error + te.Config, err = config.GetConfig() + if err != nil { + return nil, fmt.Errorf("unable to get configuration for existing cluster: %w", err) + } + } + } else { + apiServer := te.ControlPlane.GetAPIServer() + + if te.ControlPlane.Etcd == nil { + te.ControlPlane.Etcd = &controlplane.Etcd{} + } + + if os.Getenv(envAttachOutput) == "true" { + te.AttachControlPlaneOutput = true + } + if te.AttachControlPlaneOutput { + if apiServer.Out == nil { + apiServer.Out = os.Stdout + } + if apiServer.Err == nil { + apiServer.Err = os.Stderr + } + if te.ControlPlane.Etcd.Out == nil { + te.ControlPlane.Etcd.Out = os.Stdout + } + if te.ControlPlane.Etcd.Err == nil { + te.ControlPlane.Etcd.Err = os.Stderr + } + } + + apiServer.Path = process.BinPathFinder("kube-apiserver", te.BinaryAssetsDirectory) + te.ControlPlane.Etcd.Path = process.BinPathFinder("etcd", te.BinaryAssetsDirectory) + te.ControlPlane.KubectlPath = process.BinPathFinder("kubectl", te.BinaryAssetsDirectory) + + if err := te.defaultTimeouts(); err != nil { + return nil, fmt.Errorf("failed to default controlplane timeouts: %w", err) + } + te.ControlPlane.Etcd.StartTimeout = te.ControlPlaneStartTimeout + te.ControlPlane.Etcd.StopTimeout = te.ControlPlaneStopTimeout + apiServer.StartTimeout = te.ControlPlaneStartTimeout + apiServer.StopTimeout = te.ControlPlaneStopTimeout + + log.V(1).Info("starting control plane") + if err := te.startControlPlane(); err != nil { + return nil, fmt.Errorf("unable to start control plane itself: %w", err) + } + + // Create the *rest.Config for creating new clients + baseConfig := &rest.Config{ + // gotta go fast during tests -- we don't really care about overwhelming our test API server + QPS: 1000.0, + Burst: 2000.0, + } + + adminInfo := User{Name: "admin", Groups: []string{"system:masters"}} + adminUser, err := te.ControlPlane.AddUser(adminInfo, baseConfig) + if err != nil { + return te.Config, fmt.Errorf("unable to provision admin user: %w", err) + } + te.Config = adminUser.Config() + } + + // Set the default scheme if nil. + if te.Scheme == nil { + te.Scheme = scheme.Scheme + } + + // Call PrepWithoutInstalling to setup certificates first + // and have them available to patch CRD conversion webhook as well. + if err := te.WebhookInstallOptions.PrepWithoutInstalling(); err != nil { + return nil, err + } + + log.V(1).Info("installing CRDs") + if te.CRDInstallOptions.Scheme == nil { + te.CRDInstallOptions.Scheme = te.Scheme + } + te.CRDInstallOptions.CRDs = mergeCRDs(te.CRDInstallOptions.CRDs, te.CRDs) + te.CRDInstallOptions.Paths = mergePaths(te.CRDInstallOptions.Paths, te.CRDDirectoryPaths) + te.CRDInstallOptions.ErrorIfPathMissing = te.ErrorIfCRDPathMissing + te.CRDInstallOptions.WebhookOptions = te.WebhookInstallOptions + crds, err := InstallCRDs(te.Config, te.CRDInstallOptions) + if err != nil { + return te.Config, fmt.Errorf("unable to install CRDs onto control plane: %w", err) + } + te.CRDs = crds + + log.V(1).Info("installing webhooks") + if err := te.WebhookInstallOptions.Install(te.Config); err != nil { + return nil, fmt.Errorf("unable to install webhooks onto control plane: %w", err) + } + return te.Config, nil +} + +// AddUser provisions a new user for connecting to this Environment. The user will +// have the specified name & belong to the specified groups. +// +// If you specify a "base" config, the returned REST Config will contain those +// settings as well as any required by the authentication method. You can use +// this to easily specify options like QPS. +// +// This is effectively a convinience alias for ControlPlane.AddUser -- see that +// for more low-level details. +func (te *Environment) AddUser(user User, baseConfig *rest.Config) (*AuthenticatedUser, error) { + return te.ControlPlane.AddUser(user, baseConfig) +} + +func (te *Environment) startControlPlane() error { + numTries, maxRetries := 0, 5 + var err error + for ; numTries < maxRetries; numTries++ { + // Start the control plane - retry if it fails + err = te.ControlPlane.Start() + if err == nil { + break + } + log.Error(err, "unable to start the controlplane", "tries", numTries) + } + if numTries == maxRetries { + return fmt.Errorf("failed to start the controlplane. retried %d times: %w", numTries, err) + } + return nil +} + +func (te *Environment) defaultTimeouts() error { + var err error + if te.ControlPlaneStartTimeout == 0 { + if envVal := os.Getenv(envStartTimeout); envVal != "" { + te.ControlPlaneStartTimeout, err = time.ParseDuration(envVal) + if err != nil { + return err + } + } else { + te.ControlPlaneStartTimeout = defaultKubebuilderControlPlaneStartTimeout + } + } + + if te.ControlPlaneStopTimeout == 0 { + if envVal := os.Getenv(envStopTimeout); envVal != "" { + te.ControlPlaneStopTimeout, err = time.ParseDuration(envVal) + if err != nil { + return err + } + } else { + te.ControlPlaneStopTimeout = defaultKubebuilderControlPlaneStopTimeout + } + } + return nil +} + +func (te *Environment) useExistingCluster() bool { + if te.UseExistingCluster == nil { + return strings.ToLower(os.Getenv(envUseExistingCluster)) == "true" + } + return *te.UseExistingCluster +} + +// DefaultKubeAPIServerFlags exposes the default args for the APIServer so that +// you can use those to append your own additional arguments. +// +// Deprecated: use APIServer.Configure() instead. +var DefaultKubeAPIServerFlags = controlplane.APIServerDefaultArgs //nolint:staticcheck diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go new file mode 100644 index 000000000..e4e54e472 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go @@ -0,0 +1,451 @@ +/* +Copyright 2019 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package envtest + +import ( + "context" + "fmt" + "net" + "os" + "path/filepath" + "time" + + admissionv1 "k8s.io/api/admissionregistration/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client/apiutil" + "sigs.k8s.io/yaml" + + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/addr" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/certs" +) + +// WebhookInstallOptions are the options for installing mutating or validating webhooks. +type WebhookInstallOptions struct { + // Paths is a list of paths to the directories or files containing the mutating or validating webhooks yaml or json configs. + Paths []string + + // MutatingWebhooks is a list of MutatingWebhookConfigurations to install + MutatingWebhooks []*admissionv1.MutatingWebhookConfiguration + + // ValidatingWebhooks is a list of ValidatingWebhookConfigurations to install + ValidatingWebhooks []*admissionv1.ValidatingWebhookConfiguration + + // IgnoreSchemeConvertible, will modify any CRD conversion webhook to use the local serving host and port, + // bypassing the need to have the types registered in the Scheme. This is useful for testing CRD conversion webhooks + // with unregistered or unstructured types. + IgnoreSchemeConvertible bool + + // IgnoreErrorIfPathMissing will ignore an error if a DirectoryPath does not exist when set to true + IgnoreErrorIfPathMissing bool + + // LocalServingHost is the host for serving webhooks on. + // it will be automatically populated + LocalServingHost string + + // LocalServingPort is the allocated port for serving webhooks on. + // it will be automatically populated by a random available local port + LocalServingPort int + + // LocalServingCertDir is the allocated directory for serving certificates. + // it will be automatically populated by the local temp dir + LocalServingCertDir string + + // CAData is the CA that can be used to trust the serving certificates in LocalServingCertDir. + LocalServingCAData []byte + + // LocalServingHostExternalName is the hostname to use to reach the webhook server. + LocalServingHostExternalName string + + // MaxTime is the max time to wait + MaxTime time.Duration + + // PollInterval is the interval to check + PollInterval time.Duration +} + +// ModifyWebhookDefinitions modifies webhook definitions by: +// - applying CABundle based on the provided tinyca +// - if webhook client config uses service spec, it's removed and replaced with direct url. +func (o *WebhookInstallOptions) ModifyWebhookDefinitions() error { + caData := o.LocalServingCAData + + // generate host port. + hostPort, err := o.generateHostPort() + if err != nil { + return err + } + + for i := range o.MutatingWebhooks { + for j := range o.MutatingWebhooks[i].Webhooks { + updateClientConfig(&o.MutatingWebhooks[i].Webhooks[j].ClientConfig, hostPort, caData) + } + } + + for i := range o.ValidatingWebhooks { + for j := range o.ValidatingWebhooks[i].Webhooks { + updateClientConfig(&o.ValidatingWebhooks[i].Webhooks[j].ClientConfig, hostPort, caData) + } + } + return nil +} + +func updateClientConfig(cc *admissionv1.WebhookClientConfig, hostPort string, caData []byte) { + cc.CABundle = caData + if cc.Service != nil && cc.Service.Path != nil { + url := fmt.Sprintf("https://%s/%s", hostPort, *cc.Service.Path) + cc.URL = &url + cc.Service = nil + } +} + +func (o *WebhookInstallOptions) generateHostPort() (string, error) { + if o.LocalServingPort == 0 { + port, host, err := addr.Suggest(o.LocalServingHost) + if err != nil { + return "", fmt.Errorf("unable to grab random port for serving webhooks on: %w", err) + } + o.LocalServingPort = port + o.LocalServingHost = host + } + host := o.LocalServingHostExternalName + if host == "" { + host = o.LocalServingHost + } + return net.JoinHostPort(host, fmt.Sprintf("%d", o.LocalServingPort)), nil +} + +// PrepWithoutInstalling does the setup parts of Install (populating host-port, +// setting up CAs, etc), without actually truing to do anything with webhook +// definitions. This is largely useful for internal testing of +// controller-runtime, where we need a random host-port & caData for webhook +// tests, but may be useful in similar scenarios. +func (o *WebhookInstallOptions) PrepWithoutInstalling() error { + if err := o.setupCA(); err != nil { + return err + } + + if err := parseWebhook(o); err != nil { + return err + } + + return o.ModifyWebhookDefinitions() +} + +// Install installs specified webhooks to the API server. +func (o *WebhookInstallOptions) Install(config *rest.Config) error { + defaultWebhookOptions(o) + + if len(o.LocalServingCAData) == 0 { + if err := o.PrepWithoutInstalling(); err != nil { + return err + } + } + + if err := createWebhooks(config, o.MutatingWebhooks, o.ValidatingWebhooks); err != nil { + return err + } + + return WaitForWebhooks(config, o.MutatingWebhooks, o.ValidatingWebhooks, *o) +} + +// Cleanup cleans up cert directories. +func (o *WebhookInstallOptions) Cleanup() error { + if o.LocalServingCertDir != "" { + return os.RemoveAll(o.LocalServingCertDir) + } + return nil +} + +// defaultWebhookOptions sets the default values for Webhooks. +func defaultWebhookOptions(o *WebhookInstallOptions) { + if o.MaxTime == 0 { + o.MaxTime = defaultMaxWait + } + if o.PollInterval == 0 { + o.PollInterval = defaultPollInterval + } +} + +// WaitForWebhooks waits for the Webhooks to be available through API server. +func WaitForWebhooks(config *rest.Config, + mutatingWebhooks []*admissionv1.MutatingWebhookConfiguration, + validatingWebhooks []*admissionv1.ValidatingWebhookConfiguration, + options WebhookInstallOptions, +) error { + waitingFor := map[schema.GroupVersionKind]*sets.Set[string]{} + + for _, hook := range mutatingWebhooks { + h := hook + gvk, err := apiutil.GVKForObject(h, scheme.Scheme) + if err != nil { + return fmt.Errorf("unable to get gvk for MutatingWebhookConfiguration %s: %w", hook.GetName(), err) + } + + if _, ok := waitingFor[gvk]; !ok { + waitingFor[gvk] = &sets.Set[string]{} + } + waitingFor[gvk].Insert(h.GetName()) + } + + for _, hook := range validatingWebhooks { + h := hook + gvk, err := apiutil.GVKForObject(h, scheme.Scheme) + if err != nil { + return fmt.Errorf("unable to get gvk for ValidatingWebhookConfiguration %s: %w", hook.GetName(), err) + } + + if _, ok := waitingFor[gvk]; !ok { + waitingFor[gvk] = &sets.Set[string]{} + } + waitingFor[gvk].Insert(hook.GetName()) + } + + // Poll until all resources are found in discovery + p := &webhookPoller{config: config, waitingFor: waitingFor} + return wait.PollUntilContextTimeout(context.TODO(), options.PollInterval, options.MaxTime, true, p.poll) +} + +// poller checks if all the resources have been found in discovery, and returns false if not. +type webhookPoller struct { + // config is used to get discovery + config *rest.Config + + // waitingFor is the map of resources keyed by group version that have not yet been found in discovery + waitingFor map[schema.GroupVersionKind]*sets.Set[string] +} + +// poll checks if all the resources have been found in discovery, and returns false if not. +func (p *webhookPoller) poll(ctx context.Context) (done bool, err error) { + // Create a new clientset to avoid any client caching of discovery + c, err := client.New(p.config, client.Options{}) + if err != nil { + return false, err + } + + allFound := true + for gvk, names := range p.waitingFor { + if names.Len() == 0 { + delete(p.waitingFor, gvk) + continue + } + for _, name := range names.UnsortedList() { + obj := &unstructured.Unstructured{} + obj.SetGroupVersionKind(gvk) + err := c.Get(context.Background(), client.ObjectKey{ + Namespace: "", + Name: name, + }, obj) + + if err == nil { + names.Delete(name) + } + + if apierrors.IsNotFound(err) { + allFound = false + } + if err != nil { + return false, err + } + } + } + return allFound, nil +} + +// setupCA creates CA for testing and writes them to disk. +func (o *WebhookInstallOptions) setupCA() error { + hookCA, err := certs.NewTinyCA() + if err != nil { + return fmt.Errorf("unable to set up webhook CA: %w", err) + } + + names := []string{"localhost", o.LocalServingHost, o.LocalServingHostExternalName} + hookCert, err := hookCA.NewServingCert(names...) + if err != nil { + return fmt.Errorf("unable to set up webhook serving certs: %w", err) + } + + localServingCertsDir, err := os.MkdirTemp("", "envtest-serving-certs-") + o.LocalServingCertDir = localServingCertsDir + if err != nil { + return fmt.Errorf("unable to create directory for webhook serving certs: %w", err) + } + + certData, keyData, err := hookCert.AsBytes() + if err != nil { + return fmt.Errorf("unable to marshal webhook serving certs: %w", err) + } + + if err := os.WriteFile(filepath.Join(localServingCertsDir, "tls.crt"), certData, 0640); err != nil { //nolint:gosec + return fmt.Errorf("unable to write webhook serving cert to disk: %w", err) + } + if err := os.WriteFile(filepath.Join(localServingCertsDir, "tls.key"), keyData, 0640); err != nil { //nolint:gosec + return fmt.Errorf("unable to write webhook serving key to disk: %w", err) + } + + o.LocalServingCAData = certData + return err +} + +func createWebhooks(config *rest.Config, mutHooks []*admissionv1.MutatingWebhookConfiguration, valHooks []*admissionv1.ValidatingWebhookConfiguration) error { + cs, err := client.New(config, client.Options{}) + if err != nil { + return err + } + + // Create each webhook + for _, hook := range mutHooks { + hook := hook + log.V(1).Info("installing mutating webhook", "webhook", hook.GetName()) + if err := ensureCreated(cs, hook); err != nil { + return err + } + } + for _, hook := range valHooks { + hook := hook + log.V(1).Info("installing validating webhook", "webhook", hook.GetName()) + if err := ensureCreated(cs, hook); err != nil { + return err + } + } + return nil +} + +// ensureCreated creates or update object if already exists in the cluster. +func ensureCreated(cs client.Client, obj client.Object) error { + existing := obj.DeepCopyObject().(client.Object) + err := cs.Get(context.Background(), client.ObjectKey{Name: obj.GetName()}, existing) + switch { + case apierrors.IsNotFound(err): + if err := cs.Create(context.Background(), obj); err != nil { + return err + } + case err != nil: + return err + default: + log.V(1).Info("Webhook configuration already exists, updating", "webhook", obj.GetName()) + obj.SetResourceVersion(existing.GetResourceVersion()) + if err := cs.Update(context.Background(), obj); err != nil { + return err + } + } + return nil +} + +// parseWebhook reads the directories or files of Webhooks in options.Paths and adds the Webhook structs to options. +func parseWebhook(options *WebhookInstallOptions) error { + if len(options.Paths) > 0 { + for _, path := range options.Paths { + _, err := os.Stat(path) + if options.IgnoreErrorIfPathMissing && os.IsNotExist(err) { + continue // skip this path + } + if !options.IgnoreErrorIfPathMissing && os.IsNotExist(err) { + return err // treat missing path as error + } + mutHooks, valHooks, err := readWebhooks(path) + if err != nil { + return err + } + options.MutatingWebhooks = append(options.MutatingWebhooks, mutHooks...) + options.ValidatingWebhooks = append(options.ValidatingWebhooks, valHooks...) + } + } + return nil +} + +// readWebhooks reads the Webhooks from files and Unmarshals them into structs +// returns slice of mutating and validating webhook configurations. +func readWebhooks(path string) ([]*admissionv1.MutatingWebhookConfiguration, []*admissionv1.ValidatingWebhookConfiguration, error) { + // Get the webhook files + var files []string + var err error + log.V(1).Info("reading Webhooks from path", "path", path) + info, err := os.Stat(path) + if err != nil { + return nil, nil, err + } + if !info.IsDir() { + path, files = filepath.Dir(path), []string{info.Name()} + } else { + entries, err := os.ReadDir(path) + if err != nil { + return nil, nil, err + } + for _, e := range entries { + files = append(files, e.Name()) + } + } + + // file extensions that may contain Webhooks + resourceExtensions := sets.NewString(".json", ".yaml", ".yml") + + var mutHooks []*admissionv1.MutatingWebhookConfiguration + var valHooks []*admissionv1.ValidatingWebhookConfiguration + for _, file := range files { + // Only parse allowlisted file types + if !resourceExtensions.Has(filepath.Ext(file)) { + continue + } + + // Unmarshal Webhooks from file into structs + docs, err := readDocuments(filepath.Join(path, file)) + if err != nil { + return nil, nil, err + } + + for _, doc := range docs { + var generic metav1.PartialObjectMetadata + if err = yaml.Unmarshal(doc, &generic); err != nil { + return nil, nil, err + } + + const ( + admissionregv1 = "admissionregistration.k8s.io/v1" + ) + switch { + case generic.Kind == "MutatingWebhookConfiguration": + if generic.APIVersion != admissionregv1 { + return nil, nil, fmt.Errorf("only v1 is supported right now for MutatingWebhookConfiguration (name: %s)", generic.Name) + } + hook := &admissionv1.MutatingWebhookConfiguration{} + if err := yaml.Unmarshal(doc, hook); err != nil { + return nil, nil, err + } + mutHooks = append(mutHooks, hook) + case generic.Kind == "ValidatingWebhookConfiguration": + if generic.APIVersion != admissionregv1 { + return nil, nil, fmt.Errorf("only v1 is supported right now for ValidatingWebhookConfiguration (name: %s)", generic.Name) + } + hook := &admissionv1.ValidatingWebhookConfiguration{} + if err := yaml.Unmarshal(doc, hook); err != nil { + return nil, nil, err + } + valHooks = append(valHooks, hook) + default: + continue + } + } + + log.V(1).Info("read webhooks from file", "file", file) + } + return mutHooks, valHooks, nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/doc.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/doc.go new file mode 100644 index 000000000..11e39823e --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package flock is copied from k8s.io/kubernetes/pkg/util/flock to avoid +// importing k8s.io/kubernetes as a dependency. +// +// Provides file locking functionalities on unix systems. +package flock diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/errors.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/errors.go new file mode 100644 index 000000000..ee7a43437 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/errors.go @@ -0,0 +1,24 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flock + +import "errors" + +var ( + // ErrAlreadyLocked is returned when the file is already locked. + ErrAlreadyLocked = errors.New("the file is already locked") +) diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go new file mode 100644 index 000000000..069a5b3a2 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go @@ -0,0 +1,24 @@ +// +build !linux,!darwin,!freebsd,!openbsd,!netbsd,!dragonfly + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flock + +// Acquire is not implemented on non-unix systems. +func Acquire(path string) error { + return nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go new file mode 100644 index 000000000..71ec576df --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go @@ -0,0 +1,48 @@ +//go:build linux || darwin || freebsd || openbsd || netbsd || dragonfly +// +build linux darwin freebsd openbsd netbsd dragonfly + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flock + +import ( + "errors" + "fmt" + "os" + + "golang.org/x/sys/unix" +) + +// Acquire acquires a lock on a file for the duration of the process. This method +// is reentrant. +func Acquire(path string) error { + fd, err := unix.Open(path, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0600) + if err != nil { + if errors.Is(err, os.ErrExist) { + return fmt.Errorf("cannot lock file %q: %w", path, ErrAlreadyLocked) + } + return err + } + + // We don't need to close the fd since we should hold + // it until the process exits. + err = unix.Flock(fd, unix.LOCK_NB|unix.LOCK_EX) + if errors.Is(err, unix.EWOULDBLOCK) { // This condition requires LOCK_NB. + return fmt.Errorf("cannot lock file %q: %w", path, ErrAlreadyLocked) + } + return err +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go new file mode 100644 index 000000000..ffa33a886 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go @@ -0,0 +1,142 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package addr + +import ( + "errors" + "fmt" + "io/fs" + "net" + "os" + "path/filepath" + "strings" + "time" + + "sigs.k8s.io/controller-runtime/pkg/internal/flock" +) + +// TODO(directxman12): interface / release functionality for external port managers + +const ( + portReserveTime = 2 * time.Minute + portConflictRetry = 100 + portFilePrefix = "port-" +) + +var ( + cacheDir string +) + +func init() { + baseDir, err := os.UserCacheDir() + if err == nil { + cacheDir = filepath.Join(baseDir, "kubebuilder-envtest") + err = os.MkdirAll(cacheDir, 0o750) + } + if err != nil { + // Either we didn't get a cache directory, or we can't use it + baseDir = os.TempDir() + cacheDir = filepath.Join(baseDir, "kubebuilder-envtest") + err = os.MkdirAll(cacheDir, 0o750) + } + if err != nil { + panic(err) + } +} + +type portCache struct{} + +func (c *portCache) add(port int) (bool, error) { + // Remove outdated ports. + if err := fs.WalkDir(os.DirFS(cacheDir), ".", func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if d.IsDir() || !d.Type().IsRegular() || !strings.HasPrefix(path, portFilePrefix) { + return nil + } + info, err := d.Info() + if err != nil { + // No-op if file no longer exists; may have been deleted by another + // process/thread trying to allocate ports. + if errors.Is(err, fs.ErrNotExist) { + return nil + } + return err + } + if time.Since(info.ModTime()) > portReserveTime { + if err := os.Remove(filepath.Join(cacheDir, path)); err != nil { + // No-op if file no longer exists; may have been deleted by another + // process/thread trying to allocate ports. + if os.IsNotExist(err) { + return nil + } + return err + } + } + return nil + }); err != nil { + return false, err + } + // Try allocating new port, by acquiring a file. + path := fmt.Sprintf("%s/%s%d", cacheDir, portFilePrefix, port) + if err := flock.Acquire(path); errors.Is(err, flock.ErrAlreadyLocked) { + return false, nil + } else if err != nil { + return false, err + } + return true, nil +} + +var cache = &portCache{} + +func suggest(listenHost string) (*net.TCPListener, int, string, error) { + if listenHost == "" { + listenHost = "localhost" + } + addr, err := net.ResolveTCPAddr("tcp", net.JoinHostPort(listenHost, "0")) + if err != nil { + return nil, -1, "", err + } + l, err := net.ListenTCP("tcp", addr) + if err != nil { + return nil, -1, "", err + } + return l, l.Addr().(*net.TCPAddr).Port, + addr.IP.String(), + nil +} + +// Suggest suggests an address a process can listen on. It returns +// a tuple consisting of a free port and the hostname resolved to its IP. +// It makes sure that new port allocated does not conflict with old ports +// allocated within 1 minute. +func Suggest(listenHost string) (int, string, error) { + for i := 0; i < portConflictRetry; i++ { + listener, port, resolvedHost, err := suggest(listenHost) + if err != nil { + return -1, "", err + } + defer listener.Close() + if ok, err := cache.add(port); ok { + return port, resolvedHost, nil + } else if err != nil { + return -1, "", err + } + } + return -1, "", fmt.Errorf("no free ports found after %d retries", portConflictRetry) +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/certs/tinyca.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/certs/tinyca.go new file mode 100644 index 000000000..b4188237e --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/certs/tinyca.go @@ -0,0 +1,224 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certs + +// NB(directxman12): nothing has verified that this has good settings. In fact, +// the setting generated here are probably terrible, but they're fine for integration +// tests. These ABSOLUTELY SHOULD NOT ever be exposed in the public API. They're +// ONLY for use with envtest's ability to configure webhook testing. +// If I didn't otherwise not want to add a dependency on cfssl, I'd just use that. + +import ( + "crypto" + "crypto/ecdsa" + "crypto/elliptic" + crand "crypto/rand" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "fmt" + "math/big" + "net" + "time" + + certutil "k8s.io/client-go/util/cert" +) + +var ( + ellipticCurve = elliptic.P256() + bigOne = big.NewInt(1) +) + +// CertPair is a private key and certificate for use for client auth, as a CA, or serving. +type CertPair struct { + Key crypto.Signer + Cert *x509.Certificate +} + +// CertBytes returns the PEM-encoded version of the certificate for this pair. +func (k CertPair) CertBytes() []byte { + return pem.EncodeToMemory(&pem.Block{ + Type: "CERTIFICATE", + Bytes: k.Cert.Raw, + }) +} + +// AsBytes encodes keypair in the appropriate formats for on-disk storage (PEM and +// PKCS8, respectively). +func (k CertPair) AsBytes() (cert []byte, key []byte, err error) { + cert = k.CertBytes() + + rawKeyData, err := x509.MarshalPKCS8PrivateKey(k.Key) + if err != nil { + return nil, nil, fmt.Errorf("unable to encode private key: %w", err) + } + + key = pem.EncodeToMemory(&pem.Block{ + Type: "PRIVATE KEY", + Bytes: rawKeyData, + }) + + return cert, key, nil +} + +// TinyCA supports signing serving certs and client-certs, +// and can be used as an auth mechanism with envtest. +type TinyCA struct { + CA CertPair + orgName string + + nextSerial *big.Int +} + +// newPrivateKey generates a new private key of a relatively sane size (see +// rsaKeySize). +func newPrivateKey() (crypto.Signer, error) { + return ecdsa.GenerateKey(ellipticCurve, crand.Reader) +} + +// NewTinyCA creates a new a tiny CA utility for provisioning serving certs and client certs FOR TESTING ONLY. +// Don't use this for anything else! +func NewTinyCA() (*TinyCA, error) { + caPrivateKey, err := newPrivateKey() + if err != nil { + return nil, fmt.Errorf("unable to generate private key for CA: %w", err) + } + caCfg := certutil.Config{CommonName: "envtest-environment", Organization: []string{"envtest"}} + caCert, err := certutil.NewSelfSignedCACert(caCfg, caPrivateKey) + if err != nil { + return nil, fmt.Errorf("unable to generate certificate for CA: %w", err) + } + + return &TinyCA{ + CA: CertPair{Key: caPrivateKey, Cert: caCert}, + orgName: "envtest", + nextSerial: big.NewInt(1), + }, nil +} + +func (c *TinyCA) makeCert(cfg certutil.Config) (CertPair, error) { + now := time.Now() + + key, err := newPrivateKey() + if err != nil { + return CertPair{}, fmt.Errorf("unable to create private key: %w", err) + } + + serial := new(big.Int).Set(c.nextSerial) + c.nextSerial.Add(c.nextSerial, bigOne) + + template := x509.Certificate{ + Subject: pkix.Name{CommonName: cfg.CommonName, Organization: cfg.Organization}, + DNSNames: cfg.AltNames.DNSNames, + IPAddresses: cfg.AltNames.IPs, + SerialNumber: serial, + + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: cfg.Usages, + + // technically not necessary for testing, but let's set anyway just in case. + NotBefore: now.UTC(), + // 1 week -- the default for cfssl, and just long enough for a + // long-term test, but not too long that anyone would try to use this + // seriously. + NotAfter: now.Add(168 * time.Hour).UTC(), + } + + certRaw, err := x509.CreateCertificate(crand.Reader, &template, c.CA.Cert, key.Public(), c.CA.Key) + if err != nil { + return CertPair{}, fmt.Errorf("unable to create certificate: %w", err) + } + + cert, err := x509.ParseCertificate(certRaw) + if err != nil { + return CertPair{}, fmt.Errorf("generated invalid certificate, could not parse: %w", err) + } + + return CertPair{ + Key: key, + Cert: cert, + }, nil +} + +// NewServingCert returns a new CertPair for a serving HTTPS on localhost (or other specified names). +func (c *TinyCA) NewServingCert(names ...string) (CertPair, error) { + if len(names) == 0 { + names = []string{"localhost"} + } + dnsNames, ips, err := resolveNames(names) + if err != nil { + return CertPair{}, err + } + + return c.makeCert(certutil.Config{ + CommonName: "localhost", + Organization: []string{c.orgName}, + AltNames: certutil.AltNames{ + DNSNames: dnsNames, + IPs: ips, + }, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + }) +} + +// ClientInfo describes some Kubernetes user for the purposes of creating +// client certificates. +type ClientInfo struct { + // Name is the user name (embedded as the cert's CommonName) + Name string + // Groups are the groups to which this user belongs (embedded as the cert's + // Organization) + Groups []string +} + +// NewClientCert produces a new CertPair suitable for use with Kubernetes +// client cert auth with an API server validating based on this CA. +func (c *TinyCA) NewClientCert(user ClientInfo) (CertPair, error) { + return c.makeCert(certutil.Config{ + CommonName: user.Name, + Organization: user.Groups, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + }) +} + +func resolveNames(names []string) ([]string, []net.IP, error) { + dnsNames := []string{} + ips := []net.IP{} + for _, name := range names { + if name == "" { + continue + } + ip := net.ParseIP(name) + if ip == nil { + dnsNames = append(dnsNames, name) + // Also resolve to IPs. + nameIPs, err := net.LookupHost(name) + if err != nil { + return nil, nil, err + } + for _, nameIP := range nameIPs { + ip = net.ParseIP(nameIP) + if ip != nil { + ips = append(ips, ip) + } + } + } else { + ips = append(ips, ip) + } + } + return dnsNames, ips, nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/apiserver.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/apiserver.go new file mode 100644 index 000000000..c9a1a232e --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/apiserver.go @@ -0,0 +1,468 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controlplane + +import ( + "fmt" + "io" + "net/url" + "os" + "path/filepath" + "strconv" + "time" + + "sigs.k8s.io/controller-runtime/pkg/internal/testing/addr" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/certs" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/process" +) + +const ( + // saKeyFile is the name of the service account signing private key file. + saKeyFile = "sa-signer.key" + // saKeyFile is the name of the service account signing public key (cert) file. + saCertFile = "sa-signer.crt" +) + +// SecureServing provides/configures how the API server serves on the secure port. +type SecureServing struct { + // ListenAddr contains the host & port to serve on. + // + // Configurable. If unset, it will be defaulted. + process.ListenAddr + // CA contains the CA that signed the API server's serving certificates. + // + // Read-only. + CA []byte + // Authn can be used to provision users, and override what type of + // authentication is used to provision users. + // + // Configurable. If unset, it will be defaulted. + Authn +} + +// APIServer knows how to run a kubernetes apiserver. +type APIServer struct { + // URL is the address the ApiServer should listen on for client + // connections. + // + // If set, this will configure the *insecure* serving details. + // If unset, it will contain the insecure port if insecure serving is enabled, + // and otherwise will contain the secure port. + // + // If this is not specified, we default to a random free port on localhost. + // + // Deprecated: use InsecureServing (for the insecure URL) or SecureServing, ideally. + URL *url.URL + + // SecurePort is the additional secure port that the APIServer should listen on. + // + // If set, this will override SecureServing.Port. + // + // Deprecated: use SecureServing. + SecurePort int + + // SecureServing indicates how the API server will serve on the secure port. + // + // Some parts are configurable. Will be defaulted if unset. + SecureServing + + // InsecureServing indicates how the API server will serve on the insecure port. + // + // If unset, the insecure port will be disabled. Set to an empty struct to get + // default values. + // + // Deprecated: does not work with Kubernetes versions 1.20 and above. Use secure + // serving instead. + InsecureServing *process.ListenAddr + + // Path is the path to the apiserver binary. + // + // If this is left as the empty string, we will attempt to locate a binary, + // by checking for the TEST_ASSET_KUBE_APISERVER environment variable, and + // the default test assets directory. See the "Binaries" section above (in + // doc.go) for details. + Path string + + // Args is a list of arguments which will passed to the APIServer binary. + // Before they are passed on, they will be evaluated as go-template strings. + // This means you can use fields which are defined and exported on this + // APIServer struct (e.g. "--cert-dir={{ .Dir }}"). + // Those templates will be evaluated after the defaulting of the APIServer's + // fields has already happened and just before the binary actually gets + // started. Thus you have access to calculated fields like `URL` and others. + // + // If not specified, the minimal set of arguments to run the APIServer will + // be used. + // + // They will be loaded into the same argument set as Configure. Each flag + // will be Append-ed to the configured arguments just before launch. + // + // Deprecated: use Configure instead. + Args []string + + // CertDir is a path to a directory containing whatever certificates the + // APIServer will need. + // + // If left unspecified, then the Start() method will create a fresh temporary + // directory, and the Stop() method will clean it up. + CertDir string + + // EtcdURL is the URL of the Etcd the APIServer should use. + // + // If this is not specified, the Start() method will return an error. + EtcdURL *url.URL + + // StartTimeout, StopTimeout specify the time the APIServer is allowed to + // take when starting and stoppping before an error is emitted. + // + // If not specified, these default to 20 seconds. + StartTimeout time.Duration + StopTimeout time.Duration + + // Out, Err specify where APIServer should write its StdOut, StdErr to. + // + // If not specified, the output will be discarded. + Out io.Writer + Err io.Writer + + processState *process.State + + // args contains the structured arguments to use for running the API server + // Lazily initialized by .Configure(), Defaulted eventually with .defaultArgs() + args *process.Arguments +} + +// Configure returns Arguments that may be used to customize the +// flags used to launch the API server. A set of defaults will +// be applied underneath. +func (s *APIServer) Configure() *process.Arguments { + if s.args == nil { + s.args = process.EmptyArguments() + } + return s.args +} + +// Start starts the apiserver, waits for it to come up, and returns an error, +// if occurred. +func (s *APIServer) Start() error { + if err := s.prepare(); err != nil { + return err + } + return s.processState.Start(s.Out, s.Err) +} + +func (s *APIServer) prepare() error { + if err := s.setProcessState(); err != nil { + return err + } + return s.Authn.Start() +} + +// configurePorts configures the serving ports for this API server. +// +// Most of this method currently deals with making the deprecated fields +// take precedence over the new fields. +func (s *APIServer) configurePorts() error { + // prefer the old fields to the new fields if a user set one, + // otherwise, default the new fields and populate the old ones. + + // Insecure: URL, InsecureServing + if s.URL != nil { + s.InsecureServing = &process.ListenAddr{ + Address: s.URL.Hostname(), + Port: s.URL.Port(), + } + } else if insec := s.InsecureServing; insec != nil { + if insec.Port == "" || insec.Address == "" { + port, host, err := addr.Suggest("") + if err != nil { + return fmt.Errorf("unable to provision unused insecure port: %w", err) + } + s.InsecureServing.Port = strconv.Itoa(port) + s.InsecureServing.Address = host + } + s.URL = s.InsecureServing.URL("http", "") + } + + // Secure: SecurePort, SecureServing + if s.SecurePort != 0 { + s.SecureServing.Port = strconv.Itoa(s.SecurePort) + // if we don't have an address, try the insecure address, and otherwise + // default to loopback. + if s.SecureServing.Address == "" { + if s.InsecureServing != nil { + s.SecureServing.Address = s.InsecureServing.Address + } else { + s.SecureServing.Address = "127.0.0.1" + } + } + } else if s.SecureServing.Port == "" || s.SecureServing.Address == "" { + port, host, err := addr.Suggest("") + if err != nil { + return fmt.Errorf("unable to provision unused secure port: %w", err) + } + s.SecureServing.Port = strconv.Itoa(port) + s.SecureServing.Address = host + s.SecurePort = port + } + + return nil +} + +func (s *APIServer) setProcessState() error { + if s.EtcdURL == nil { + return fmt.Errorf("expected EtcdURL to be configured") + } + + var err error + + // unconditionally re-set this so we can successfully restart + // TODO(directxman12): we supported this in the past, but do we actually + // want to support re-using an API server object to restart? The loss + // of provisioned users is surprising to say the least. + s.processState = &process.State{ + Dir: s.CertDir, + Path: s.Path, + StartTimeout: s.StartTimeout, + StopTimeout: s.StopTimeout, + } + if err := s.processState.Init("kube-apiserver"); err != nil { + return err + } + + if err := s.configurePorts(); err != nil { + return err + } + + // the secure port will always be on, so use that + s.processState.HealthCheck.URL = *s.SecureServing.URL("https", "/healthz") + + s.CertDir = s.processState.Dir + s.Path = s.processState.Path + s.StartTimeout = s.processState.StartTimeout + s.StopTimeout = s.processState.StopTimeout + + if err := s.populateAPIServerCerts(); err != nil { + return err + } + + if s.SecureServing.Authn == nil { + authn, err := NewCertAuthn() + if err != nil { + return err + } + s.SecureServing.Authn = authn + } + + if err := s.Authn.Configure(s.CertDir, s.Configure()); err != nil { + return err + } + + // NB(directxman12): insecure port is a mess: + // - 1.19 and below have the `--insecure-port` flag, and require it to be set to zero to + // disable it, otherwise the default will be used and we'll conflict. + // - 1.20 requires the flag to be unset or set to zero, and yells at you if you configure it + // - 1.24 won't have the flag at all... + // + // In an effort to automatically do the right thing during this mess, we do feature discovery + // on the flags, and hope that we've "parsed" them properly. + // + // TODO(directxman12): once we support 1.20 as the min version (might be when 1.24 comes out, + // might be around 1.25 or 1.26), remove this logic and the corresponding line in API server's + // default args. + if err := s.discoverFlags(); err != nil { + return err + } + + s.processState.Args, s.Args, err = process.TemplateAndArguments(s.Args, s.Configure(), process.TemplateDefaults{ //nolint:staticcheck + Data: s, + Defaults: s.defaultArgs(), + MinimalDefaults: map[string][]string{ + // as per kubernetes-sigs/controller-runtime#641, we need this (we + // probably need other stuff too, but this is the only thing that was + // previously considered a "minimal default") + "service-cluster-ip-range": {"10.0.0.0/24"}, + + // we need *some* authorization mode for health checks on the secure port, + // so default to RBAC unless the user set something else (in which case + // this'll be ignored due to SliceToArguments using AppendNoDefaults). + "authorization-mode": {"RBAC"}, + }, + }) + if err != nil { + return err + } + + return nil +} + +// discoverFlags checks for certain flags that *must* be set in certain +// versions, and *must not* be set in others. +func (s *APIServer) discoverFlags() error { + // Present: <1.24, Absent: >= 1.24 + present, err := s.processState.CheckFlag("insecure-port") + if err != nil { + return err + } + + if !present { + s.Configure().Disable("insecure-port") + } + + return nil +} + +func (s *APIServer) defaultArgs() map[string][]string { + args := map[string][]string{ + "service-cluster-ip-range": {"10.0.0.0/24"}, + "allow-privileged": {"true"}, + // we're keeping this disabled because if enabled, default SA is + // missing which would force all tests to create one in normal + // apiserver operation this SA is created by controller, but that is + // not run in integration environment + "disable-admission-plugins": {"ServiceAccount"}, + "cert-dir": {s.CertDir}, + "authorization-mode": {"RBAC"}, + "secure-port": {s.SecureServing.Port}, + // NB(directxman12): previously we didn't set the bind address for the secure + // port. It *shouldn't* make a difference unless people are doing something really + // funky, but if you start to get bug reports look here ;-) + "bind-address": {s.SecureServing.Address}, + + // required on 1.20+, fine to leave on for <1.20 + "service-account-issuer": {s.SecureServing.URL("https", "/").String()}, + "service-account-key-file": {filepath.Join(s.CertDir, saCertFile)}, + "service-account-signing-key-file": {filepath.Join(s.CertDir, saKeyFile)}, + } + if s.EtcdURL != nil { + args["etcd-servers"] = []string{s.EtcdURL.String()} + } + if s.URL != nil { + args["insecure-port"] = []string{s.URL.Port()} + args["insecure-bind-address"] = []string{s.URL.Hostname()} + } else { + // TODO(directxman12): remove this once 1.21 is the lowest version we support + // (this might be a while, but this line'll break as of 1.24, so see the comment + // in Start + args["insecure-port"] = []string{"0"} + } + return args +} + +func (s *APIServer) populateAPIServerCerts() error { + _, statErr := os.Stat(filepath.Join(s.CertDir, "apiserver.crt")) + if !os.IsNotExist(statErr) { + return statErr + } + + ca, err := certs.NewTinyCA() + if err != nil { + return err + } + + servingCerts, err := ca.NewServingCert() + if err != nil { + return err + } + + certData, keyData, err := servingCerts.AsBytes() + if err != nil { + return err + } + + if err := os.WriteFile(filepath.Join(s.CertDir, "apiserver.crt"), certData, 0640); err != nil { //nolint:gosec + return err + } + if err := os.WriteFile(filepath.Join(s.CertDir, "apiserver.key"), keyData, 0640); err != nil { //nolint:gosec + return err + } + + s.SecureServing.CA = ca.CA.CertBytes() + + // service account signing files too + saCA, err := certs.NewTinyCA() + if err != nil { + return err + } + + saCert, saKey, err := saCA.CA.AsBytes() + if err != nil { + return err + } + + if err := os.WriteFile(filepath.Join(s.CertDir, saCertFile), saCert, 0640); err != nil { //nolint:gosec + return err + } + return os.WriteFile(filepath.Join(s.CertDir, saKeyFile), saKey, 0640) //nolint:gosec +} + +// Stop stops this process gracefully, waits for its termination, and cleans up +// the CertDir if necessary. +func (s *APIServer) Stop() error { + if s.processState != nil { + if s.processState.DirNeedsCleaning { + s.CertDir = "" // reset the directory if it was randomly allocated, so that we can safely restart + } + if err := s.processState.Stop(); err != nil { + return err + } + } + return s.Authn.Stop() +} + +// APIServerDefaultArgs exposes the default args for the APIServer so that you +// can use those to append your own additional arguments. +// +// Note that these arguments don't handle newer API servers well to due the more +// complex feature detection neeeded. It's recommended that you switch to .Configure +// as you upgrade API server versions. +// +// Deprecated: use APIServer.Configure(). +var APIServerDefaultArgs = []string{ + "--advertise-address=127.0.0.1", + "--etcd-servers={{ if .EtcdURL }}{{ .EtcdURL.String }}{{ end }}", + "--cert-dir={{ .CertDir }}", + "--insecure-port={{ if .URL }}{{ .URL.Port }}{{else}}0{{ end }}", + "{{ if .URL }}--insecure-bind-address={{ .URL.Hostname }}{{ end }}", + "--secure-port={{ if .SecurePort }}{{ .SecurePort }}{{ end }}", + // we're keeping this disabled because if enabled, default SA is missing which would force all tests to create one + // in normal apiserver operation this SA is created by controller, but that is not run in integration environment + "--disable-admission-plugins=ServiceAccount", + "--service-cluster-ip-range=10.0.0.0/24", + "--allow-privileged=true", + // NB(directxman12): we also enable RBAC if nothing else was enabled +} + +// PrepareAPIServer is an internal-only (NEVER SHOULD BE EXPOSED) +// function that sets up the API server just before starting it, +// without actually starting it. This saves time on tests. +// +// NB(directxman12): do not expose this outside of internal -- it's unsafe to +// use, because things like port allocation could race even more than they +// currently do if you later call start! +func PrepareAPIServer(s *APIServer) error { + return s.prepare() +} + +// APIServerArguments is an internal-only (NEVER SHOULD BE EXPOSED) +// function that sets up the API server just before starting it, +// without actually starting it. It's public to make testing easier. +// +// NB(directxman12): do not expose this outside of internal. +func APIServerArguments(s *APIServer) []string { + return s.processState.Args +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/auth.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/auth.go new file mode 100644 index 000000000..16c86a712 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/auth.go @@ -0,0 +1,142 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controlplane + +import ( + "fmt" + "os" + "path/filepath" + + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/certs" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/process" +) + +// User represents a Kubernetes user. +type User struct { + // Name is the user's Name. + Name string + // Groups are the groups to which the user belongs. + Groups []string +} + +// Authn knows how to configure an API server for a particular type of authentication, +// and provision users under that authentication scheme. +// +// The methods must be called in the following order (as presented below in the interface +// for a mnemonic): +// +// 1. Configure +// 2. Start +// 3. AddUsers (0+ calls) +// 4. Stop. +type Authn interface { + // Configure provides the working directory to this authenticator, + // and configures the given API server arguments to make use of this authenticator. + // + // Should be called first. + Configure(workDir string, args *process.Arguments) error + // Start runs this authenticator. Will be called just before API server start. + // + // Must be called after Configure. + Start() error + // AddUser provisions a user, returning a copy of the given base rest.Config + // configured to authenticate as that users. + // + // May only be called while the authenticator is "running". + AddUser(user User, baseCfg *rest.Config) (*rest.Config, error) + // Stop shuts down this authenticator. + Stop() error +} + +// CertAuthn is an authenticator (Authn) that makes use of client certificate authn. +type CertAuthn struct { + // ca is the CA used to sign the client certs + ca *certs.TinyCA + // certDir is the directory used to write the CA crt file + // so that the API server can read it. + certDir string +} + +// NewCertAuthn creates a new client-cert-based Authn with a new CA. +func NewCertAuthn() (*CertAuthn, error) { + ca, err := certs.NewTinyCA() + if err != nil { + return nil, fmt.Errorf("unable to provision client certificate auth CA: %w", err) + } + return &CertAuthn{ + ca: ca, + }, nil +} + +// AddUser provisions a new user that's authenticated via certificates, with +// the given uesrname and groups embedded in the certificate as expected by the +// API server. +func (c *CertAuthn) AddUser(user User, baseCfg *rest.Config) (*rest.Config, error) { + certs, err := c.ca.NewClientCert(certs.ClientInfo{ + Name: user.Name, + Groups: user.Groups, + }) + if err != nil { + return nil, fmt.Errorf("unable to create client certificates for %s: %w", user.Name, err) + } + + crt, key, err := certs.AsBytes() + if err != nil { + return nil, fmt.Errorf("unable to serialize client certificates for %s: %w", user.Name, err) + } + + cfg := rest.CopyConfig(baseCfg) + cfg.CertData = crt + cfg.KeyData = key + + return cfg, nil +} + +// caCrtPath returns the path to the on-disk client-cert CA crt file. +func (c *CertAuthn) caCrtPath() string { + return filepath.Join(c.certDir, "client-cert-auth-ca.crt") +} + +// Configure provides the working directory to this authenticator, +// and configures the given API server arguments to make use of this authenticator. +func (c *CertAuthn) Configure(workDir string, args *process.Arguments) error { + c.certDir = workDir + args.Set("client-ca-file", c.caCrtPath()) + return nil +} + +// Start runs this authenticator. Will be called just before API server start. +// +// Must be called after Configure. +func (c *CertAuthn) Start() error { + if len(c.certDir) == 0 { + return fmt.Errorf("start called before configure") + } + caCrt := c.ca.CA.CertBytes() + if err := os.WriteFile(c.caCrtPath(), caCrt, 0640); err != nil { //nolint:gosec + return fmt.Errorf("unable to save the client certificate CA to %s: %w", c.caCrtPath(), err) + } + + return nil +} + +// Stop shuts down this authenticator. +func (c *CertAuthn) Stop() error { + // no-op -- our workdir is cleaned up for us automatically + return nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/etcd.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/etcd.go new file mode 100644 index 000000000..c30d21329 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/etcd.go @@ -0,0 +1,202 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controlplane + +import ( + "io" + "net" + "net/url" + "strconv" + "time" + + "sigs.k8s.io/controller-runtime/pkg/internal/testing/addr" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/process" +) + +// Etcd knows how to run an etcd server. +type Etcd struct { + // URL is the address the Etcd should listen on for client connections. + // + // If this is not specified, we default to a random free port on localhost. + URL *url.URL + + // Path is the path to the etcd binary. + // + // If this is left as the empty string, we will attempt to locate a binary, + // by checking for the TEST_ASSET_ETCD environment variable, and the default + // test assets directory. See the "Binaries" section above (in doc.go) for + // details. + Path string + + // Args is a list of arguments which will passed to the Etcd binary. Before + // they are passed on, the`y will be evaluated as go-template strings. This + // means you can use fields which are defined and exported on this Etcd + // struct (e.g. "--data-dir={{ .Dir }}"). + // Those templates will be evaluated after the defaulting of the Etcd's + // fields has already happened and just before the binary actually gets + // started. Thus you have access to calculated fields like `URL` and others. + // + // If not specified, the minimal set of arguments to run the Etcd will be + // used. + // + // They will be loaded into the same argument set as Configure. Each flag + // will be Append-ed to the configured arguments just before launch. + // + // Deprecated: use Configure instead. + Args []string + + // DataDir is a path to a directory in which etcd can store its state. + // + // If left unspecified, then the Start() method will create a fresh temporary + // directory, and the Stop() method will clean it up. + DataDir string + + // StartTimeout, StopTimeout specify the time the Etcd is allowed to + // take when starting and stopping before an error is emitted. + // + // If not specified, these default to 20 seconds. + StartTimeout time.Duration + StopTimeout time.Duration + + // Out, Err specify where Etcd should write its StdOut, StdErr to. + // + // If not specified, the output will be discarded. + Out io.Writer + Err io.Writer + + // processState contains the actual details about this running process + processState *process.State + + // args contains the structured arguments to use for running etcd. + // Lazily initialized by .Configure(), Defaulted eventually with .defaultArgs() + args *process.Arguments + + // listenPeerURL is the address the Etcd should listen on for peer connections. + // It's automatically generated and a random port is picked during execution. + listenPeerURL *url.URL +} + +// Start starts the etcd, waits for it to come up, and returns an error, if one +// occurred. +func (e *Etcd) Start() error { + if err := e.setProcessState(); err != nil { + return err + } + return e.processState.Start(e.Out, e.Err) +} + +func (e *Etcd) setProcessState() error { + e.processState = &process.State{ + Dir: e.DataDir, + Path: e.Path, + StartTimeout: e.StartTimeout, + StopTimeout: e.StopTimeout, + } + + // unconditionally re-set this so we can successfully restart + // TODO(directxman12): we supported this in the past, but do we actually + // want to support re-using an API server object to restart? The loss + // of provisioned users is surprising to say the least. + if err := e.processState.Init("etcd"); err != nil { + return err + } + + // Set the listen url. + if e.URL == nil { + port, host, err := addr.Suggest("") + if err != nil { + return err + } + e.URL = &url.URL{ + Scheme: "http", + Host: net.JoinHostPort(host, strconv.Itoa(port)), + } + } + + // Set the listen peer URL. + { + port, host, err := addr.Suggest("") + if err != nil { + return err + } + e.listenPeerURL = &url.URL{ + Scheme: "http", + Host: net.JoinHostPort(host, strconv.Itoa(port)), + } + } + + // can use /health as of etcd 3.3.0 + e.processState.HealthCheck.URL = *e.URL + e.processState.HealthCheck.Path = "/health" + + e.DataDir = e.processState.Dir + e.Path = e.processState.Path + e.StartTimeout = e.processState.StartTimeout + e.StopTimeout = e.processState.StopTimeout + + var err error + e.processState.Args, e.Args, err = process.TemplateAndArguments(e.Args, e.Configure(), process.TemplateDefaults{ //nolint:staticcheck + Data: e, + Defaults: e.defaultArgs(), + }) + return err +} + +// Stop stops this process gracefully, waits for its termination, and cleans up +// the DataDir if necessary. +func (e *Etcd) Stop() error { + if e.processState.DirNeedsCleaning { + e.DataDir = "" // reset the directory if it was randomly allocated, so that we can safely restart + } + return e.processState.Stop() +} + +func (e *Etcd) defaultArgs() map[string][]string { + args := map[string][]string{ + "listen-peer-urls": {e.listenPeerURL.String()}, + "data-dir": {e.DataDir}, + } + if e.URL != nil { + args["advertise-client-urls"] = []string{e.URL.String()} + args["listen-client-urls"] = []string{e.URL.String()} + } + + // Add unsafe no fsync, available from etcd 3.5 + if ok, _ := e.processState.CheckFlag("unsafe-no-fsync"); ok { + args["unsafe-no-fsync"] = []string{"true"} + } + return args +} + +// Configure returns Arguments that may be used to customize the +// flags used to launch etcd. A set of defaults will +// be applied underneath. +func (e *Etcd) Configure() *process.Arguments { + if e.args == nil { + e.args = process.EmptyArguments() + } + return e.args +} + +// EtcdDefaultArgs exposes the default args for Etcd so that you +// can use those to append your own additional arguments. +var EtcdDefaultArgs = []string{ + "--listen-peer-urls=http://localhost:0", + "--advertise-client-urls={{ if .URL }}{{ .URL.String }}{{ end }}", + "--listen-client-urls={{ if .URL }}{{ .URL.String }}{{ end }}", + "--data-dir={{ .DataDir }}", +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go new file mode 100644 index 000000000..a41bb77c4 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go @@ -0,0 +1,120 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controlplane + +import ( + "bytes" + "fmt" + "io" + "net/url" + "os/exec" + + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + kcapi "k8s.io/client-go/tools/clientcmd/api" + + "sigs.k8s.io/controller-runtime/pkg/internal/testing/process" +) + +const ( + envtestName = "envtest" +) + +// KubeConfigFromREST reverse-engineers a kubeconfig file from a rest.Config. +// The options are tailored towards the rest.Configs we generate, so they're +// not broadly applicable. +// +// This is not intended to be exposed beyond internal for the above reasons. +func KubeConfigFromREST(cfg *rest.Config) ([]byte, error) { + kubeConfig := kcapi.NewConfig() + protocol := "https" + if !rest.IsConfigTransportTLS(*cfg) { + protocol = "http" + } + + // cfg.Host is a URL, so we need to parse it so we can properly append the API path + baseURL, err := url.Parse(cfg.Host) + if err != nil { + return nil, fmt.Errorf("unable to interpret config's host value as a URL: %w", err) + } + + kubeConfig.Clusters[envtestName] = &kcapi.Cluster{ + // TODO(directxman12): if client-go ever decides to expose defaultServerUrlFor(config), + // we can just use that. Note that this is not the same as the public DefaultServerURL, + // which requires us to pass a bunch of stuff in manually. + Server: (&url.URL{Scheme: protocol, Host: baseURL.Host, Path: cfg.APIPath}).String(), + CertificateAuthorityData: cfg.CAData, + } + kubeConfig.AuthInfos[envtestName] = &kcapi.AuthInfo{ + // try to cover all auth strategies that aren't plugins + ClientCertificateData: cfg.CertData, + ClientKeyData: cfg.KeyData, + Token: cfg.BearerToken, + Username: cfg.Username, + Password: cfg.Password, + } + kcCtx := kcapi.NewContext() + kcCtx.Cluster = envtestName + kcCtx.AuthInfo = envtestName + kubeConfig.Contexts[envtestName] = kcCtx + kubeConfig.CurrentContext = envtestName + + contents, err := clientcmd.Write(*kubeConfig) + if err != nil { + return nil, fmt.Errorf("unable to serialize kubeconfig file: %w", err) + } + return contents, nil +} + +// KubeCtl is a wrapper around the kubectl binary. +type KubeCtl struct { + // Path where the kubectl binary can be found. + // + // If this is left empty, we will attempt to locate a binary, by checking for + // the TEST_ASSET_KUBECTL environment variable, and the default test assets + // directory. See the "Binaries" section above (in doc.go) for details. + Path string + + // Opts can be used to configure additional flags which will be used each + // time the wrapped binary is called. + // + // For example, you might want to use this to set the URL of the APIServer to + // connect to. + Opts []string +} + +// Run executes the wrapped binary with some preconfigured options and the +// arguments given to this method. It returns Readers for the stdout and +// stderr. +func (k *KubeCtl) Run(args ...string) (stdout, stderr io.Reader, err error) { + if k.Path == "" { + k.Path = process.BinPathFinder("kubectl", "") + } + + stdoutBuffer := &bytes.Buffer{} + stderrBuffer := &bytes.Buffer{} + allArgs := append(k.Opts, args...) + + cmd := exec.Command(k.Path, allArgs...) + cmd.Stdout = stdoutBuffer + cmd.Stderr = stderrBuffer + cmd.SysProcAttr = process.GetSysProcAttr() + + err = cmd.Run() + + return stdoutBuffer, stderrBuffer, err +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/plane.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/plane.go new file mode 100644 index 000000000..456183a7a --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/plane.go @@ -0,0 +1,259 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controlplane + +import ( + "fmt" + "net/url" + "os" + + kerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/certs" +) + +// NewTinyCA creates a new a tiny CA utility for provisioning serving certs and client certs FOR TESTING ONLY. +// Don't use this for anything else! +var NewTinyCA = certs.NewTinyCA + +// ControlPlane is a struct that knows how to start your test control plane. +// +// Right now, that means Etcd and your APIServer. This is likely to increase in +// future. +type ControlPlane struct { + APIServer *APIServer + Etcd *Etcd + + // Kubectl will override the default asset search path for kubectl + KubectlPath string + + // for the deprecated methods (Kubectl, etc) + defaultUserCfg *rest.Config + defaultUserKubectl *KubeCtl +} + +// Start will start your control plane processes. To stop them, call Stop(). +func (f *ControlPlane) Start() (retErr error) { + if f.Etcd == nil { + f.Etcd = &Etcd{} + } + if err := f.Etcd.Start(); err != nil { + return err + } + defer func() { + if retErr != nil { + _ = f.Etcd.Stop() + } + }() + + if f.APIServer == nil { + f.APIServer = &APIServer{} + } + f.APIServer.EtcdURL = f.Etcd.URL + if err := f.APIServer.Start(); err != nil { + return err + } + defer func() { + if retErr != nil { + _ = f.APIServer.Stop() + } + }() + + // provision the default user -- can be removed when the related + // methods are removed. The default user has admin permissions to + // mimic legacy no-authz setups. + user, err := f.AddUser(User{Name: "default", Groups: []string{"system:masters"}}, &rest.Config{}) + if err != nil { + return fmt.Errorf("unable to provision the default (legacy) user: %w", err) + } + kubectl, err := user.Kubectl() + if err != nil { + return fmt.Errorf("unable to provision the default (legacy) kubeconfig: %w", err) + } + f.defaultUserCfg = user.Config() + f.defaultUserKubectl = kubectl + return nil +} + +// Stop will stop your control plane processes, and clean up their data. +func (f *ControlPlane) Stop() error { + var errList []error + + if f.APIServer != nil { + if err := f.APIServer.Stop(); err != nil { + errList = append(errList, err) + } + } + + if f.Etcd != nil { + if err := f.Etcd.Stop(); err != nil { + errList = append(errList, err) + } + } + + return kerrors.NewAggregate(errList) +} + +// APIURL returns the URL you should connect to to talk to your API server. +// +// If insecure serving is configured, this will contain the insecure port. +// Otherwise, it will contain the secure port. +// +// Deprecated: use AddUser instead, or APIServer.{Ins|S}ecureServing.URL if +// you really want just the URL. +func (f *ControlPlane) APIURL() *url.URL { + return f.APIServer.URL +} + +// KubeCtl returns a pre-configured KubeCtl, ready to connect to this +// ControlPlane. +// +// Deprecated: use AddUser & AuthenticatedUser.Kubectl instead. +func (f *ControlPlane) KubeCtl() *KubeCtl { + return f.defaultUserKubectl +} + +// RESTClientConfig returns a pre-configured restconfig, ready to connect to +// this ControlPlane. +// +// Deprecated: use AddUser & AuthenticatedUser.Config instead. +func (f *ControlPlane) RESTClientConfig() (*rest.Config, error) { + return f.defaultUserCfg, nil +} + +// AuthenticatedUser contains access information for an provisioned user, +// including REST config, kubeconfig contents, and access to a KubeCtl instance. +// +// It's not "safe" to use the methods on this till after the API server has been +// started (due to certificate initialization and such). The various methods will +// panic if this is done. +type AuthenticatedUser struct { + // cfg is the rest.Config for connecting to the API server. It's lazily initialized. + cfg *rest.Config + // cfgIsComplete indicates the cfg has had late-initialized fields (e.g. + // API server CA data) initialized. + cfgIsComplete bool + + // apiServer is a handle to the APIServer that's used when finalizing cfg + // and producing the kubectl instance. + plane *ControlPlane + + // kubectl is our existing, provisioned kubectl. We don't provision one + // till someone actually asks for it. + kubectl *KubeCtl +} + +// Config returns the REST config that can be used to connect to the API server +// as this user. +// +// Will panic if used before the API server is started. +func (u *AuthenticatedUser) Config() *rest.Config { + // NB(directxman12): we choose to panic here for ergonomics sake, and because there's + // not really much you can do to "handle" this error. This machinery is intended to be + // used in tests anyway, so panicing is not a particularly big deal. + if u.cfgIsComplete { + return u.cfg + } + if len(u.plane.APIServer.SecureServing.CA) == 0 { + panic("the API server has not yet been started, please do that before accessing connection details") + } + + u.cfg.CAData = u.plane.APIServer.SecureServing.CA + u.cfg.Host = u.plane.APIServer.SecureServing.URL("https", "/").String() + u.cfgIsComplete = true + return u.cfg +} + +// KubeConfig returns a KubeConfig that's roughly equivalent to this user's REST config. +// +// Will panic if used before the API server is started. +func (u AuthenticatedUser) KubeConfig() ([]byte, error) { + // NB(directxman12): we don't return the actual API object to avoid yet another + // piece of kubernetes API in our public API, and also because generally the thing + // you want to do with this is just write it out to a file for external debugging + // purposes, etc. + return KubeConfigFromREST(u.Config()) +} + +// Kubectl returns a KubeCtl instance for talking to the API server as this user. It uses +// a kubeconfig equivalent to that returned by .KubeConfig. +// +// Will panic if used before the API server is started. +func (u *AuthenticatedUser) Kubectl() (*KubeCtl, error) { + if u.kubectl != nil { + return u.kubectl, nil + } + if len(u.plane.APIServer.CertDir) == 0 { + panic("the API server has not yet been started, please do that before accessing connection details") + } + + // cleaning this up is handled when our tmpDir is deleted + out, err := os.CreateTemp(u.plane.APIServer.CertDir, "*.kubecfg") + if err != nil { + return nil, fmt.Errorf("unable to create file for kubeconfig: %w", err) + } + defer out.Close() + contents, err := KubeConfigFromREST(u.Config()) + if err != nil { + return nil, err + } + if _, err := out.Write(contents); err != nil { + return nil, fmt.Errorf("unable to write kubeconfig to disk at %s: %w", out.Name(), err) + } + k := &KubeCtl{ + Path: u.plane.KubectlPath, + } + k.Opts = append(k.Opts, fmt.Sprintf("--kubeconfig=%s", out.Name())) + u.kubectl = k + return k, nil +} + +// AddUser provisions a new user in the cluster. It uses the APIServer's authentication +// strategy -- see APIServer.SecureServing.Authn. +// +// Unlike AddUser, it's safe to pass a nil rest.Config here if you have no +// particular opinions about the config. +// +// The default authentication strategy is not guaranteed to any specific strategy, but it is +// guaranteed to be callable both before and after Start has been called (but, as noted in the +// AuthenticatedUser docs, the given user objects are only valid after Start has been called). +func (f *ControlPlane) AddUser(user User, baseConfig *rest.Config) (*AuthenticatedUser, error) { + if f.GetAPIServer().SecureServing.Authn == nil { + return nil, fmt.Errorf("no API server authentication is configured yet. The API server defaults one when Start is called, did you mean to use that?") + } + + if baseConfig == nil { + baseConfig = &rest.Config{} + } + cfg, err := f.GetAPIServer().SecureServing.AddUser(user, baseConfig) + if err != nil { + return nil, err + } + + return &AuthenticatedUser{ + cfg: cfg, + plane: f, + }, nil +} + +// GetAPIServer returns this ControlPlane's APIServer, initializing it if necessary. +func (f *ControlPlane) GetAPIServer() *APIServer { + if f.APIServer == nil { + f.APIServer = &APIServer{} + } + return f.APIServer +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go new file mode 100644 index 000000000..391eec1fa --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go @@ -0,0 +1,340 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package process + +import ( + "bytes" + "html/template" + "sort" + "strings" +) + +// RenderTemplates returns an []string to render the templates +// +// Deprecated: will be removed in favor of Arguments. +func RenderTemplates(argTemplates []string, data interface{}) (args []string, err error) { + var t *template.Template + + for _, arg := range argTemplates { + t, err = template.New(arg).Parse(arg) + if err != nil { + args = nil + return + } + + buf := &bytes.Buffer{} + err = t.Execute(buf, data) + if err != nil { + args = nil + return + } + args = append(args, buf.String()) + } + + return +} + +// SliceToArguments converts a slice of arguments to structured arguments, +// appending each argument that starts with `--` and contains an `=` to the +// argument set (ignoring defaults), returning the rest. +// +// Deprecated: will be removed when RenderTemplates is removed. +func SliceToArguments(sliceArgs []string, args *Arguments) []string { + var rest []string + for i, arg := range sliceArgs { + if arg == "--" { + rest = append(rest, sliceArgs[i:]...) + return rest + } + // skip non-flag arguments, skip arguments w/o equals because we + // can't tell if the next argument should take a value + if !strings.HasPrefix(arg, "--") || !strings.Contains(arg, "=") { + rest = append(rest, arg) + continue + } + + parts := strings.SplitN(arg[2:], "=", 2) + name := parts[0] + val := parts[1] + + args.AppendNoDefaults(name, val) + } + + return rest +} + +// TemplateDefaults specifies defaults to be used for joining structured arguments with templates. +// +// Deprecated: will be removed when RenderTemplates is removed. +type TemplateDefaults struct { + // Data will be used to render the template. + Data interface{} + // Defaults will be used to default structured arguments if no template is passed. + Defaults map[string][]string + // MinimalDefaults will be used to default structured arguments if a template is passed. + // Use this for flags which *must* be present. + MinimalDefaults map[string][]string // for api server service-cluster-ip-range +} + +// TemplateAndArguments joins structured arguments and non-structured arguments, preserving existing +// behavior. Namely: +// +// 1. if templ has len > 0, it will be rendered against data +// 2. the rendered template values that look like `--foo=bar` will be split +// and appended to args, the rest will be kept around +// 3. the given args will be rendered as string form. If a template is given, +// no defaults will be used, otherwise defaults will be used +// 4. a result of [args..., rest...] will be returned +// +// It returns the resulting rendered arguments, plus the arguments that were +// not transferred to `args` during rendering. +// +// Deprecated: will be removed when RenderTemplates is removed. +func TemplateAndArguments(templ []string, args *Arguments, data TemplateDefaults) (allArgs []string, nonFlagishArgs []string, err error) { + if len(templ) == 0 { // 3 & 4 (no template case) + return args.AsStrings(data.Defaults), nil, nil + } + + // 1: render the template + rendered, err := RenderTemplates(templ, data.Data) + if err != nil { + return nil, nil, err + } + + // 2: filter out structured args and add them to args + rest := SliceToArguments(rendered, args) + + // 3 (template case): render structured args, no defaults (matching the + // legacy case where if Args was specified, no defaults were used) + res := args.AsStrings(data.MinimalDefaults) + + // 4: return the rendered structured args + all non-structured args + return append(res, rest...), rest, nil +} + +// EmptyArguments constructs an empty set of flags with no defaults. +func EmptyArguments() *Arguments { + return &Arguments{ + values: make(map[string]Arg), + } +} + +// Arguments are structured, overridable arguments. +// Each Arguments object contains some set of default arguments, which may +// be appended to, or overridden. +// +// When ready, you can serialize them to pass to exec.Command and friends using +// AsStrings. +// +// All flag-setting methods return the *same* instance of Arguments so that you +// can chain calls. +type Arguments struct { + // values contains the user-set values for the arguments. + // `values[key] = dontPass` means "don't pass this flag" + // `values[key] = passAsName` means "pass this flag without args like --key` + // `values[key] = []string{a, b, c}` means "--key=a --key=b --key=c` + // any values not explicitly set here will be copied from defaults on final rendering. + values map[string]Arg +} + +// Arg is an argument that has one or more values, +// and optionally falls back to default values. +type Arg interface { + // Append adds new values to this argument, returning + // a new instance contain the new value. The intermediate + // argument should generally be assumed to be consumed. + Append(vals ...string) Arg + // Get returns the full set of values, optionally including + // the passed in defaults. If it returns nil, this will be + // skipped. If it returns a non-nil empty slice, it'll be + // assumed that the argument should be passed as name-only. + Get(defaults []string) []string +} + +type userArg []string + +func (a userArg) Append(vals ...string) Arg { + return userArg(append(a, vals...)) //nolint:unconvert +} +func (a userArg) Get(_ []string) []string { + return []string(a) +} + +type defaultedArg []string + +func (a defaultedArg) Append(vals ...string) Arg { + return defaultedArg(append(a, vals...)) //nolint:unconvert +} +func (a defaultedArg) Get(defaults []string) []string { + res := append([]string(nil), defaults...) + return append(res, a...) +} + +type dontPassArg struct{} + +func (a dontPassArg) Append(vals ...string) Arg { + return userArg(vals) +} +func (dontPassArg) Get(_ []string) []string { + return nil +} + +type passAsNameArg struct{} + +func (a passAsNameArg) Append(_ ...string) Arg { + return passAsNameArg{} +} +func (passAsNameArg) Get(_ []string) []string { + return []string{} +} + +var ( + // DontPass indicates that the given argument will not actually be + // rendered. + DontPass Arg = dontPassArg{} + // PassAsName indicates that the given flag will be passed as `--key` + // without any value. + PassAsName Arg = passAsNameArg{} +) + +// AsStrings serializes this set of arguments to a slice of strings appropriate +// for passing to exec.Command and friends, making use of the given defaults +// as indicated for each particular argument. +// +// - Any flag in defaults that's not in Arguments will be present in the output +// - Any flag that's present in Arguments will be passed the corresponding +// defaults to do with as it will (ignore, append-to, suppress, etc). +func (a *Arguments) AsStrings(defaults map[string][]string) []string { + // sort for deterministic ordering + keysInOrder := make([]string, 0, len(defaults)+len(a.values)) + for key := range defaults { + if _, userSet := a.values[key]; userSet { + continue + } + keysInOrder = append(keysInOrder, key) + } + for key := range a.values { + keysInOrder = append(keysInOrder, key) + } + sort.Strings(keysInOrder) + + var res []string + for _, key := range keysInOrder { + vals := a.Get(key).Get(defaults[key]) + switch { + case vals == nil: // don't pass + continue + case len(vals) == 0: // pass as name + res = append(res, "--"+key) + default: + for _, val := range vals { + res = append(res, "--"+key+"="+val) + } + } + } + + return res +} + +// Get returns the value of the given flag. If nil, +// it will not be passed in AsString, otherwise: +// +// len == 0 --> `--key`, len > 0 --> `--key=val1 --key=val2 ...`. +func (a *Arguments) Get(key string) Arg { + if vals, ok := a.values[key]; ok { + return vals + } + return defaultedArg(nil) +} + +// Enable configures the given key to be passed as a "name-only" flag, +// like, `--key`. +func (a *Arguments) Enable(key string) *Arguments { + a.values[key] = PassAsName + return a +} + +// Disable prevents this flag from be passed. +func (a *Arguments) Disable(key string) *Arguments { + a.values[key] = DontPass + return a +} + +// Append adds additional values to this flag. If this flag has +// yet to be set, initial values will include defaults. If you want +// to intentionally ignore defaults/start from scratch, call AppendNoDefaults. +// +// Multiple values will look like `--key=value1 --key=value2 ...`. +func (a *Arguments) Append(key string, values ...string) *Arguments { + vals, present := a.values[key] + if !present { + vals = defaultedArg{} + } + a.values[key] = vals.Append(values...) + return a +} + +// AppendNoDefaults adds additional values to this flag. However, +// unlike Append, it will *not* copy values from defaults. +func (a *Arguments) AppendNoDefaults(key string, values ...string) *Arguments { + vals, present := a.values[key] + if !present { + vals = userArg{} + } + a.values[key] = vals.Append(values...) + return a +} + +// Set resets the given flag to the specified values, ignoring any existing +// values or defaults. +func (a *Arguments) Set(key string, values ...string) *Arguments { + a.values[key] = userArg(values) + return a +} + +// SetRaw sets the given flag to the given Arg value directly. Use this if +// you need to do some complicated deferred logic or something. +// +// Otherwise behaves like Set. +func (a *Arguments) SetRaw(key string, val Arg) *Arguments { + a.values[key] = val + return a +} + +// FuncArg is a basic implementation of Arg that can be used for custom argument logic, +// like pulling values out of APIServer, or dynamically calculating values just before +// launch. +// +// The given function will be mapped directly to Arg#Get, and will generally be +// used in conjunction with SetRaw. For example, to set `--some-flag` to the +// API server's CertDir, you could do: +// +// server.Configure().SetRaw("--some-flag", FuncArg(func(defaults []string) []string { +// return []string{server.CertDir} +// })) +// +// FuncArg ignores Appends; if you need to support appending values too, consider implementing +// Arg directly. +type FuncArg func([]string) []string + +// Append is a no-op for FuncArg, and just returns itself. +func (a FuncArg) Append(vals ...string) Arg { return a } + +// Get delegates functionality to the FuncArg function itself. +func (a FuncArg) Get(defaults []string) []string { + return a(defaults) +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/bin_path_finder.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/bin_path_finder.go new file mode 100644 index 000000000..e1428aa6e --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/bin_path_finder.go @@ -0,0 +1,70 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package process + +import ( + "os" + "path/filepath" + "regexp" + "strings" +) + +const ( + // EnvAssetsPath is the environment variable that stores the global test + // binary location override. + EnvAssetsPath = "KUBEBUILDER_ASSETS" + // EnvAssetOverridePrefix is the environment variable prefix for per-binary + // location overrides. + EnvAssetOverridePrefix = "TEST_ASSET_" + // AssetsDefaultPath is the default location to look for test binaries in, + // if no override was provided. + AssetsDefaultPath = "/usr/local/kubebuilder/bin" +) + +// BinPathFinder finds the path to the given named binary, using the following locations +// in order of precedence (highest first). Notice that the various env vars only need +// to be set -- the asset is not checked for existence on the filesystem. +// +// 1. TEST_ASSET_{tr/a-z-/A-Z_/} (if set; asset overrides -- EnvAssetOverridePrefix) +// 1. KUBEBUILDER_ASSETS (if set; global asset path -- EnvAssetsPath) +// 3. assetDirectory (if set; per-config asset directory) +// 4. /usr/local/kubebuilder/bin (AssetsDefaultPath). +func BinPathFinder(symbolicName, assetDirectory string) (binPath string) { + punctuationPattern := regexp.MustCompile("[^A-Z0-9]+") + sanitizedName := punctuationPattern.ReplaceAllString(strings.ToUpper(symbolicName), "_") + leadingNumberPattern := regexp.MustCompile("^[0-9]+") + sanitizedName = leadingNumberPattern.ReplaceAllString(sanitizedName, "") + envVar := EnvAssetOverridePrefix + sanitizedName + + // TEST_ASSET_XYZ + if val, ok := os.LookupEnv(envVar); ok { + return val + } + + // KUBEBUILDER_ASSETS + if val, ok := os.LookupEnv(EnvAssetsPath); ok { + return filepath.Join(val, symbolicName) + } + + // assetDirectory + if assetDirectory != "" { + return filepath.Join(assetDirectory, symbolicName) + } + + // default path + return filepath.Join(AssetsDefaultPath, symbolicName) +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go new file mode 100644 index 000000000..df13b341a --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go @@ -0,0 +1,28 @@ +//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos +// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package process + +import "syscall" + +// GetSysProcAttr returns the SysProcAttr to use for the process, +// for non-unix systems this returns nil. +func GetSysProcAttr() *syscall.SysProcAttr { + return nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go new file mode 100644 index 000000000..83ad509af --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go @@ -0,0 +1,33 @@ +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos + +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package process + +import ( + "golang.org/x/sys/unix" +) + +// GetSysProcAttr returns the SysProcAttr to use for the process, +// for unix systems this returns a SysProcAttr with Setpgid set to true, +// which inherits the parent's process group id. +func GetSysProcAttr() *unix.SysProcAttr { + return &unix.SysProcAttr{ + Setpgid: true, + } +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go new file mode 100644 index 000000000..03f252524 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go @@ -0,0 +1,276 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package process + +import ( + "crypto/tls" + "fmt" + "io" + "net" + "net/http" + "net/url" + "os" + "os/exec" + "path" + "regexp" + "sync" + "syscall" + "time" +) + +// ListenAddr represents some listening address and port. +type ListenAddr struct { + Address string + Port string +} + +// URL returns a URL for this address with the given scheme and subpath. +func (l *ListenAddr) URL(scheme string, path string) *url.URL { + return &url.URL{ + Scheme: scheme, + Host: l.HostPort(), + Path: path, + } +} + +// HostPort returns the joined host-port pair for this address. +func (l *ListenAddr) HostPort() string { + return net.JoinHostPort(l.Address, l.Port) +} + +// HealthCheck describes the information needed to health-check a process via +// some health-check URL. +type HealthCheck struct { + url.URL + + // HealthCheckPollInterval is the interval which will be used for polling the + // endpoint described by Host, Port, and Path. + // + // If left empty it will default to 100 Milliseconds. + PollInterval time.Duration +} + +// State define the state of the process. +type State struct { + Cmd *exec.Cmd + + // HealthCheck describes how to check if this process is up. If we get an http.StatusOK, + // we assume the process is ready to operate. + // + // For example, the /healthz endpoint of the k8s API server, or the /health endpoint of etcd. + HealthCheck HealthCheck + + Args []string + + StopTimeout time.Duration + StartTimeout time.Duration + + Dir string + DirNeedsCleaning bool + Path string + + // ready holds whether the process is currently in ready state (hit the ready condition) or not. + // It will be set to true on a successful `Start()` and set to false on a successful `Stop()` + ready bool + + // waitDone is closed when our call to wait finishes up, and indicates that + // our process has terminated. + waitDone chan struct{} + errMu sync.Mutex + exitErr error + exited bool +} + +// Init sets up this process, configuring binary paths if missing, initializing +// temporary directories, etc. +// +// This defaults all defaultable fields. +func (ps *State) Init(name string) error { + if ps.Path == "" { + if name == "" { + return fmt.Errorf("must have at least one of name or path") + } + ps.Path = BinPathFinder(name, "") + } + + if ps.Dir == "" { + newDir, err := os.MkdirTemp("", "k8s_test_framework_") + if err != nil { + return err + } + ps.Dir = newDir + ps.DirNeedsCleaning = true + } + + if ps.StartTimeout == 0 { + ps.StartTimeout = 20 * time.Second + } + + if ps.StopTimeout == 0 { + ps.StopTimeout = 20 * time.Second + } + return nil +} + +type stopChannel chan struct{} + +// CheckFlag checks the help output of this command for the presence of the given flag, specified +// without the leading `--` (e.g. `CheckFlag("insecure-port")` checks for `--insecure-port`), +// returning true if the flag is present. +func (ps *State) CheckFlag(flag string) (bool, error) { + cmd := exec.Command(ps.Path, "--help") + outContents, err := cmd.CombinedOutput() + if err != nil { + return false, fmt.Errorf("unable to run command %q to check for flag %q: %w", ps.Path, flag, err) + } + pat := `(?m)^\s*--` + flag + `\b` // (m --> multi-line --> ^ matches start of line) + matched, err := regexp.Match(pat, outContents) + if err != nil { + return false, fmt.Errorf("unable to check command %q for flag %q in help output: %w", ps.Path, flag, err) + } + return matched, nil +} + +// Start starts the apiserver, waits for it to come up, and returns an error, +// if occurred. +func (ps *State) Start(stdout, stderr io.Writer) (err error) { + if ps.ready { + return nil + } + + ps.Cmd = exec.Command(ps.Path, ps.Args...) + ps.Cmd.Stdout = stdout + ps.Cmd.Stderr = stderr + ps.Cmd.SysProcAttr = GetSysProcAttr() + + ready := make(chan bool) + timedOut := time.After(ps.StartTimeout) + pollerStopCh := make(stopChannel) + go pollURLUntilOK(ps.HealthCheck.URL, ps.HealthCheck.PollInterval, ready, pollerStopCh) + + ps.waitDone = make(chan struct{}) + + if err := ps.Cmd.Start(); err != nil { + ps.errMu.Lock() + defer ps.errMu.Unlock() + ps.exited = true + return err + } + go func() { + defer close(ps.waitDone) + err := ps.Cmd.Wait() + + ps.errMu.Lock() + defer ps.errMu.Unlock() + ps.exitErr = err + ps.exited = true + }() + + select { + case <-ready: + ps.ready = true + return nil + case <-ps.waitDone: + close(pollerStopCh) + return fmt.Errorf("timeout waiting for process %s to start successfully "+ + "(it may have failed to start, or stopped unexpectedly before becoming ready)", + path.Base(ps.Path)) + case <-timedOut: + close(pollerStopCh) + if ps.Cmd != nil { + // intentionally ignore this -- we might've crashed, failed to start, etc + ps.Cmd.Process.Signal(syscall.SIGTERM) //nolint:errcheck + } + return fmt.Errorf("timeout waiting for process %s to start", path.Base(ps.Path)) + } +} + +// Exited returns true if the process exited, and may also +// return an error (as per Cmd.Wait) if the process did not +// exit with error code 0. +func (ps *State) Exited() (bool, error) { + ps.errMu.Lock() + defer ps.errMu.Unlock() + return ps.exited, ps.exitErr +} + +func pollURLUntilOK(url url.URL, interval time.Duration, ready chan bool, stopCh stopChannel) { + client := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + // there's probably certs *somewhere*, + // but it's fine to just skip validating + // them for health checks during testing + InsecureSkipVerify: true, //nolint:gosec + }, + }, + } + if interval <= 0 { + interval = 100 * time.Millisecond + } + for { + res, err := client.Get(url.String()) + if err == nil { + res.Body.Close() + if res.StatusCode == http.StatusOK { + ready <- true + return + } + } + + select { + case <-stopCh: + return + default: + time.Sleep(interval) + } + } +} + +// Stop stops this process gracefully, waits for its termination, and cleans up +// the CertDir if necessary. +func (ps *State) Stop() error { + // Always clear the directory if we need to. + defer func() { + if ps.DirNeedsCleaning { + _ = os.RemoveAll(ps.Dir) + } + }() + if ps.Cmd == nil { + return nil + } + if done, _ := ps.Exited(); done { + return nil + } + if err := ps.Cmd.Process.Signal(syscall.SIGTERM); err != nil { + return fmt.Errorf("unable to signal for process %s to stop: %w", ps.Path, err) + } + + timedOut := time.After(ps.StopTimeout) + + select { + case <-ps.waitDone: + break + case <-timedOut: + if err := ps.Cmd.Process.Signal(syscall.SIGKILL); err != nil { + return fmt.Errorf("unable to kill process %s: %w", ps.Path, err) + } + return fmt.Errorf("timeout waiting for process %s to stop", path.Base(ps.Path)) + } + ps.ready = false + return nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go new file mode 100644 index 000000000..fb492b14d --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go @@ -0,0 +1,168 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package zap contains helpers for setting up a new logr.Logger instance +// using the Zap logging framework. +package zap + +import ( + "flag" + "fmt" + "strconv" + "strings" + + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +var levelStrings = map[string]zapcore.Level{ + "debug": zap.DebugLevel, + "info": zap.InfoLevel, + "error": zap.ErrorLevel, +} + +var stackLevelStrings = map[string]zapcore.Level{ + "info": zap.InfoLevel, + "error": zap.ErrorLevel, + "panic": zap.PanicLevel, +} + +type encoderFlag struct { + setFunc func(NewEncoderFunc) + value string +} + +var _ flag.Value = &encoderFlag{} + +func (ev *encoderFlag) String() string { + return ev.value +} + +func (ev *encoderFlag) Type() string { + return "encoder" +} + +func (ev *encoderFlag) Set(flagValue string) error { + val := strings.ToLower(flagValue) + switch val { + case "json": + ev.setFunc(newJSONEncoder) + case "console": + ev.setFunc(newConsoleEncoder) + default: + return fmt.Errorf("invalid encoder value \"%s\"", flagValue) + } + ev.value = flagValue + return nil +} + +type levelFlag struct { + setFunc func(zapcore.LevelEnabler) + value string +} + +var _ flag.Value = &levelFlag{} + +func (ev *levelFlag) Set(flagValue string) error { + level, validLevel := levelStrings[strings.ToLower(flagValue)] + if !validLevel { + logLevel, err := strconv.Atoi(flagValue) + if err != nil { + return fmt.Errorf("invalid log level \"%s\"", flagValue) + } + if logLevel > 0 { + intLevel := -1 * logLevel + ev.setFunc(zap.NewAtomicLevelAt(zapcore.Level(int8(intLevel)))) + } else { + return fmt.Errorf("invalid log level \"%s\"", flagValue) + } + } else { + ev.setFunc(zap.NewAtomicLevelAt(level)) + } + ev.value = flagValue + return nil +} + +func (ev *levelFlag) String() string { + return ev.value +} + +func (ev *levelFlag) Type() string { + return "level" +} + +type stackTraceFlag struct { + setFunc func(zapcore.LevelEnabler) + value string +} + +var _ flag.Value = &stackTraceFlag{} + +func (ev *stackTraceFlag) Set(flagValue string) error { + level, validLevel := stackLevelStrings[strings.ToLower(flagValue)] + if !validLevel { + return fmt.Errorf("invalid stacktrace level \"%s\"", flagValue) + } + ev.setFunc(zap.NewAtomicLevelAt(level)) + ev.value = flagValue + return nil +} + +func (ev *stackTraceFlag) String() string { + return ev.value +} + +func (ev *stackTraceFlag) Type() string { + return "level" +} + +type timeEncodingFlag struct { + setFunc func(zapcore.TimeEncoder) + value string +} + +var _ flag.Value = &timeEncodingFlag{} + +func (ev *timeEncodingFlag) String() string { + return ev.value +} + +func (ev *timeEncodingFlag) Type() string { + return "time-encoding" +} + +func (ev *timeEncodingFlag) Set(flagValue string) error { + val := strings.ToLower(flagValue) + switch val { + case "rfc3339nano": + ev.setFunc(zapcore.RFC3339NanoTimeEncoder) + case "rfc3339": + ev.setFunc(zapcore.RFC3339TimeEncoder) + case "iso8601": + ev.setFunc(zapcore.ISO8601TimeEncoder) + case "millis": + ev.setFunc(zapcore.EpochMillisTimeEncoder) + case "nanos": + ev.setFunc(zapcore.EpochNanosTimeEncoder) + case "epoch": + ev.setFunc(zapcore.EpochTimeEncoder) + default: + return fmt.Errorf("invalid time-encoding value \"%s\"", flagValue) + } + + ev.value = flagValue + return nil +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/kube_helpers.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/kube_helpers.go new file mode 100644 index 000000000..3b4ebfdaa --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/kube_helpers.go @@ -0,0 +1,111 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package zap + +import ( + "fmt" + "reflect" + + "go.uber.org/zap/buffer" + "go.uber.org/zap/zapcore" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" +) + +// KubeAwareEncoder is a Kubernetes-aware Zap Encoder. +// Instead of trying to force Kubernetes objects to implement +// ObjectMarshaller, we just implement a wrapper around a normal +// ObjectMarshaller that checks for Kubernetes objects. +type KubeAwareEncoder struct { + // Encoder is the zapcore.Encoder that this encoder delegates to + zapcore.Encoder + + // Verbose controls whether or not the full object is printed. + // If false, only name, namespace, api version, and kind are printed. + // Otherwise, the full object is logged. + Verbose bool +} + +// kubeObjectWrapper is a zapcore.ObjectMarshaler for Kubernetes objects. +type kubeObjectWrapper struct { + obj runtime.Object +} + +// MarshalLogObject implements zapcore.ObjectMarshaler. +func (w kubeObjectWrapper) MarshalLogObject(enc zapcore.ObjectEncoder) error { + // TODO(directxman12): log kind and apiversion if not set explicitly (common case) + // -- needs an a scheme to convert to the GVK. + + if reflect.ValueOf(w.obj).IsNil() { + return fmt.Errorf("got nil for runtime.Object") + } + + if gvk := w.obj.GetObjectKind().GroupVersionKind(); gvk.Version != "" { + enc.AddString("apiVersion", gvk.GroupVersion().String()) + enc.AddString("kind", gvk.Kind) + } + + objMeta, err := meta.Accessor(w.obj) + if err != nil { + return fmt.Errorf("got runtime.Object without object metadata: %v", w.obj) + } + + if ns := objMeta.GetNamespace(); ns != "" { + enc.AddString("namespace", ns) + } + enc.AddString("name", objMeta.GetName()) + + return nil +} + +// NB(directxman12): can't just override AddReflected, since the encoder calls AddReflected on itself directly + +// Clone implements zapcore.Encoder. +func (k *KubeAwareEncoder) Clone() zapcore.Encoder { + return &KubeAwareEncoder{ + Encoder: k.Encoder.Clone(), + } +} + +// EncodeEntry implements zapcore.Encoder. +func (k *KubeAwareEncoder) EncodeEntry(entry zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error) { + if k.Verbose { + // Kubernetes objects implement fmt.Stringer, so if we + // want verbose output, just delegate to that. + return k.Encoder.EncodeEntry(entry, fields) + } + + for i, field := range fields { + // intercept stringer fields that happen to be Kubernetes runtime.Object or + // types.NamespacedName values (Kubernetes runtime.Objects commonly + // implement String, apparently). + // *unstructured.Unstructured does NOT implement fmt.Striger interface. + // We have handle it specially. + if field.Type == zapcore.StringerType || field.Type == zapcore.ReflectType { + switch val := field.Interface.(type) { + case runtime.Object: + fields[i] = zapcore.Field{ + Type: zapcore.ObjectMarshalerType, + Key: field.Key, + Interface: kubeObjectWrapper{obj: val}, + } + } + } + } + + return k.Encoder.EncodeEntry(entry, fields) +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/zap.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/zap.go new file mode 100644 index 000000000..3a114667b --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/zap.go @@ -0,0 +1,303 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package zap contains helpers for setting up a new logr.Logger instance +// using the Zap logging framework. +package zap + +import ( + "flag" + "io" + "os" + "time" + + "github.com/go-logr/logr" + "github.com/go-logr/zapr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +// EncoderConfigOption is a function that can modify a `zapcore.EncoderConfig`. +type EncoderConfigOption func(*zapcore.EncoderConfig) + +// NewEncoderFunc is a function that creates an Encoder using the provided EncoderConfigOptions. +type NewEncoderFunc func(...EncoderConfigOption) zapcore.Encoder + +// New returns a brand new Logger configured with Opts. It +// uses KubeAwareEncoder which adds Type information and +// Namespace/Name to the log. +func New(opts ...Opts) logr.Logger { + return zapr.NewLogger(NewRaw(opts...)) +} + +// Opts allows to manipulate Options. +type Opts func(*Options) + +// UseDevMode sets the logger to use (or not use) development mode (more +// human-readable output, extra stack traces and logging information, etc). +// See Options.Development. +func UseDevMode(enabled bool) Opts { + return func(o *Options) { + o.Development = enabled + } +} + +// WriteTo configures the logger to write to the given io.Writer, instead of standard error. +// See Options.DestWriter. +func WriteTo(out io.Writer) Opts { + return func(o *Options) { + o.DestWriter = out + } +} + +// Encoder configures how the logger will encode the output e.g JSON or console. +// See Options.Encoder. +func Encoder(encoder zapcore.Encoder) func(o *Options) { + return func(o *Options) { + o.Encoder = encoder + } +} + +// JSONEncoder configures the logger to use a JSON Encoder. +func JSONEncoder(opts ...EncoderConfigOption) func(o *Options) { + return func(o *Options) { + o.Encoder = newJSONEncoder(opts...) + } +} + +func newJSONEncoder(opts ...EncoderConfigOption) zapcore.Encoder { + encoderConfig := zap.NewProductionEncoderConfig() + for _, opt := range opts { + opt(&encoderConfig) + } + return zapcore.NewJSONEncoder(encoderConfig) +} + +// ConsoleEncoder configures the logger to use a Console encoder. +func ConsoleEncoder(opts ...EncoderConfigOption) func(o *Options) { + return func(o *Options) { + o.Encoder = newConsoleEncoder(opts...) + } +} + +func newConsoleEncoder(opts ...EncoderConfigOption) zapcore.Encoder { + encoderConfig := zap.NewDevelopmentEncoderConfig() + for _, opt := range opts { + opt(&encoderConfig) + } + return zapcore.NewConsoleEncoder(encoderConfig) +} + +// Level sets Options.Level, which configures the minimum enabled logging level e.g Debug, Info. +// A zap log level should be multiplied by -1 to get the logr verbosity. +// For example, to get logr verbosity of 3, pass zapcore.Level(-3) to this Opts. +// See https://pkg.go.dev/github.com/go-logr/zapr for how zap level relates to logr verbosity. +func Level(level zapcore.LevelEnabler) func(o *Options) { + return func(o *Options) { + o.Level = level + } +} + +// StacktraceLevel sets Options.StacktraceLevel, which configures the logger to record a stack trace +// for all messages at or above a given level. +// See the Level Opts for the relationship of zap log level to logr verbosity. +func StacktraceLevel(stacktraceLevel zapcore.LevelEnabler) func(o *Options) { + return func(o *Options) { + o.StacktraceLevel = stacktraceLevel + } +} + +// RawZapOpts allows appending arbitrary zap.Options to configure the underlying zap logger. +// See Options.ZapOpts. +func RawZapOpts(zapOpts ...zap.Option) func(o *Options) { + return func(o *Options) { + o.ZapOpts = append(o.ZapOpts, zapOpts...) + } +} + +// Options contains all possible settings. +type Options struct { + // Development configures the logger to use a Zap development config + // (stacktraces on warnings, no sampling), otherwise a Zap production + // config will be used (stacktraces on errors, sampling). + Development bool + // Encoder configures how Zap will encode the output. Defaults to + // console when Development is true and JSON otherwise + Encoder zapcore.Encoder + // EncoderConfigOptions can modify the EncoderConfig needed to initialize an Encoder. + // See https://pkg.go.dev/go.uber.org/zap/zapcore#EncoderConfig for the list of options + // that can be configured. + // Note that the EncoderConfigOptions are not applied when the Encoder option is already set. + EncoderConfigOptions []EncoderConfigOption + // NewEncoder configures Encoder using the provided EncoderConfigOptions. + // Note that the NewEncoder function is not used when the Encoder option is already set. + NewEncoder NewEncoderFunc + // DestWriter controls the destination of the log output. Defaults to + // os.Stderr. + DestWriter io.Writer + // Level configures the verbosity of the logging. + // Defaults to Debug when Development is true and Info otherwise. + // A zap log level should be multiplied by -1 to get the logr verbosity. + // For example, to get logr verbosity of 3, set this field to zapcore.Level(-3). + // See https://pkg.go.dev/github.com/go-logr/zapr for how zap level relates to logr verbosity. + Level zapcore.LevelEnabler + // StacktraceLevel is the level at and above which stacktraces will + // be recorded for all messages. Defaults to Warn when Development + // is true and Error otherwise. + // See Level for the relationship of zap log level to logr verbosity. + StacktraceLevel zapcore.LevelEnabler + // ZapOpts allows passing arbitrary zap.Options to configure on the + // underlying Zap logger. + ZapOpts []zap.Option + // TimeEncoder specifies the encoder for the timestamps in log messages. + // Defaults to RFC3339TimeEncoder. + TimeEncoder zapcore.TimeEncoder +} + +// addDefaults adds defaults to the Options. +func (o *Options) addDefaults() { + if o.DestWriter == nil { + o.DestWriter = os.Stderr + } + + if o.Development { + if o.NewEncoder == nil { + o.NewEncoder = newConsoleEncoder + } + if o.Level == nil { + lvl := zap.NewAtomicLevelAt(zap.DebugLevel) + o.Level = &lvl + } + if o.StacktraceLevel == nil { + lvl := zap.NewAtomicLevelAt(zap.WarnLevel) + o.StacktraceLevel = &lvl + } + o.ZapOpts = append(o.ZapOpts, zap.Development()) + } else { + if o.NewEncoder == nil { + o.NewEncoder = newJSONEncoder + } + if o.Level == nil { + lvl := zap.NewAtomicLevelAt(zap.InfoLevel) + o.Level = &lvl + } + if o.StacktraceLevel == nil { + lvl := zap.NewAtomicLevelAt(zap.ErrorLevel) + o.StacktraceLevel = &lvl + } + // Disable sampling for increased Debug levels. Otherwise, this will + // cause index out of bounds errors in the sampling code. + if !o.Level.Enabled(zapcore.Level(-2)) { + o.ZapOpts = append(o.ZapOpts, + zap.WrapCore(func(core zapcore.Core) zapcore.Core { + return zapcore.NewSamplerWithOptions(core, time.Second, 100, 100) + })) + } + } + + if o.TimeEncoder == nil { + o.TimeEncoder = zapcore.RFC3339TimeEncoder + } + f := func(ecfg *zapcore.EncoderConfig) { + ecfg.EncodeTime = o.TimeEncoder + } + // prepend instead of append it in case someone adds a time encoder option in it + o.EncoderConfigOptions = append([]EncoderConfigOption{f}, o.EncoderConfigOptions...) + + if o.Encoder == nil { + o.Encoder = o.NewEncoder(o.EncoderConfigOptions...) + } + o.ZapOpts = append(o.ZapOpts, zap.AddStacktrace(o.StacktraceLevel)) +} + +// NewRaw returns a new zap.Logger configured with the passed Opts +// or their defaults. It uses KubeAwareEncoder which adds Type +// information and Namespace/Name to the log. +func NewRaw(opts ...Opts) *zap.Logger { + o := &Options{} + for _, opt := range opts { + opt(o) + } + o.addDefaults() + + // this basically mimics New<type>Config, but with a custom sink + sink := zapcore.AddSync(o.DestWriter) + + o.ZapOpts = append(o.ZapOpts, zap.ErrorOutput(sink)) + log := zap.New(zapcore.NewCore(&KubeAwareEncoder{Encoder: o.Encoder, Verbose: o.Development}, sink, o.Level)) + log = log.WithOptions(o.ZapOpts...) + return log +} + +// BindFlags will parse the given flagset for zap option flags and set the log options accordingly: +// - zap-devel: +// Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn) +// Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) +// - zap-encoder: Zap log encoding (one of 'json' or 'console') +// - zap-log-level: Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', +// or any integer value > 0 which corresponds to custom debug levels of increasing verbosity"). +// - zap-stacktrace-level: Zap Level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') +// - zap-time-encoding: Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'), +// Defaults to 'epoch'. +func (o *Options) BindFlags(fs *flag.FlagSet) { + // Set Development mode value + fs.BoolVar(&o.Development, "zap-devel", o.Development, + "Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). "+ + "Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)") + + // Set Encoder value + var encVal encoderFlag + encVal.setFunc = func(fromFlag NewEncoderFunc) { + o.NewEncoder = fromFlag + } + fs.Var(&encVal, "zap-encoder", "Zap log encoding (one of 'json' or 'console')") + + // Set the Log Level + var levelVal levelFlag + levelVal.setFunc = func(fromFlag zapcore.LevelEnabler) { + o.Level = fromFlag + } + fs.Var(&levelVal, "zap-log-level", + "Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', "+ + "or any integer value > 0 which corresponds to custom debug levels of increasing verbosity") + + // Set the StrackTrace Level + var stackVal stackTraceFlag + stackVal.setFunc = func(fromFlag zapcore.LevelEnabler) { + o.StacktraceLevel = fromFlag + } + fs.Var(&stackVal, "zap-stacktrace-level", + "Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').") + + // Set the time encoding + var timeEncoderVal timeEncodingFlag + timeEncoderVal.setFunc = func(fromFlag zapcore.TimeEncoder) { + o.TimeEncoder = fromFlag + } + fs.Var(&timeEncoderVal, "zap-time-encoding", "Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.") +} + +// UseFlagOptions configures the logger to use the Options set by parsing zap option flags from the CLI. +// +// opts := zap.Options{} +// opts.BindFlags(flag.CommandLine) +// flag.Parse() +// log := zap.New(zap.UseFlagOptions(&opts)) +func UseFlagOptions(in *Options) Opts { + return func(o *Options) { + *o = *in + } +} diff --git a/vendor/sigs.k8s.io/kustomize/api/filters/imagetag/updater.go b/vendor/sigs.k8s.io/kustomize/api/filters/imagetag/updater.go index d2a728498..58297d441 100644 --- a/vendor/sigs.k8s.io/kustomize/api/filters/imagetag/updater.go +++ b/vendor/sigs.k8s.io/kustomize/api/filters/imagetag/updater.go @@ -6,7 +6,7 @@ package imagetag import ( "sigs.k8s.io/kustomize/api/filters/filtersutil" - "sigs.k8s.io/kustomize/api/image" + "sigs.k8s.io/kustomize/api/internal/image" "sigs.k8s.io/kustomize/api/types" "sigs.k8s.io/kustomize/kyaml/yaml" ) diff --git a/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go b/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go index 4815f10a2..ff83420cb 100644 --- a/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go +++ b/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go @@ -284,9 +284,9 @@ func (f Filter) roleRefFilter() sieveFunc { return previousIdSelectedByGvk(roleRefGvk) } -func prefixSuffixEquals(other resource.ResCtx) sieveFunc { +func prefixSuffixEquals(other resource.ResCtx, allowEmpty bool) sieveFunc { return func(r *resource.Resource) bool { - return r.PrefixesSuffixesEquals(other) + return r.PrefixesSuffixesEquals(other, allowEmpty) } } @@ -325,7 +325,10 @@ func (f Filter) selectReferral( if len(candidates) == 1 { return candidates[0], nil } - candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer)) + candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, true)) + if len(candidates) > 1 { + candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, false)) + } if len(candidates) == 1 { return candidates[0], nil } diff --git a/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go b/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go index 5749d6ddf..671567d9a 100644 --- a/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go +++ b/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go @@ -6,7 +6,7 @@ package patchjson6902 import ( "strings" - jsonpatch "github.com/evanphx/json-patch" + jsonpatch "gopkg.in/evanphx/json-patch.v4" "sigs.k8s.io/kustomize/kyaml/kio" "sigs.k8s.io/kustomize/kyaml/yaml" k8syaml "sigs.k8s.io/yaml" diff --git a/vendor/sigs.k8s.io/kustomize/api/filters/replacement/replacement.go b/vendor/sigs.k8s.io/kustomize/api/filters/replacement/replacement.go index d4fea260b..bea5690c4 100644 --- a/vendor/sigs.k8s.io/kustomize/api/filters/replacement/replacement.go +++ b/vendor/sigs.k8s.io/kustomize/api/filters/replacement/replacement.go @@ -126,8 +126,8 @@ func applyReplacement(nodes []*yaml.RNode, value *yaml.RNode, targetSelectors [] } // filter targets by matching resource IDs - for i, id := range ids { - if id.IsSelectedBy(selector.Select.ResId) && !rejectId(selector.Reject, &ids[i]) { + for _, id := range ids { + if id.IsSelectedBy(selector.Select.ResId) && !containsRejectId(selector.Reject, ids) { err := copyValueToTarget(possibleTarget, value, selector) if err != nil { return nil, err @@ -168,10 +168,15 @@ func matchesAnnoAndLabelSelector(n *yaml.RNode, selector *types.Selector) (bool, return annoMatch && labelMatch, nil } -func rejectId(rejects []*types.Selector, id *resid.ResId) bool { +func containsRejectId(rejects []*types.Selector, ids []resid.ResId) bool { for _, r := range rejects { - if !r.ResId.IsEmpty() && id.IsSelectedBy(r.ResId) { - return true + if r.ResId.IsEmpty() { + continue + } + for _, id := range ids { + if id.IsSelectedBy(r.ResId) { + return true + } } } return false diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/loadconfigfromcrds.go b/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/loadconfigfromcrds.go index afe6da2e7..f60c517b7 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/loadconfigfromcrds.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/loadconfigfromcrds.go @@ -144,7 +144,7 @@ func loadCrdIntoConfig( } _, label := property.Extensions.GetString(xLabelSelector) if label { - err = theConfig.AddLabelFieldSpec( + err = theConfig.AddCommonLabelsFieldSpec( makeFs(theGvk, append(path, propName))) if err != nil { return diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go index 113f56ea7..c93c18c00 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go @@ -12,11 +12,12 @@ import ( "regexp" "strings" - "github.com/imdario/mergo" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/types" "sigs.k8s.io/kustomize/kyaml/errors" "sigs.k8s.io/kustomize/kyaml/kio" + kyaml "sigs.k8s.io/kustomize/kyaml/yaml" + "sigs.k8s.io/kustomize/kyaml/yaml/merge2" "sigs.k8s.io/yaml" ) @@ -53,6 +54,15 @@ func (p *HelmChartInflationGeneratorPlugin) Config( if h.GeneralConfig().HelmConfig.Command == "" { return fmt.Errorf("must specify --helm-command") } + + // CLI args takes precedence + if h.GeneralConfig().HelmConfig.KubeVersion != "" { + p.HelmChart.KubeVersion = h.GeneralConfig().HelmConfig.KubeVersion + } + if len(h.GeneralConfig().HelmConfig.ApiVersions) != 0 { + p.HelmChart.ApiVersions = h.GeneralConfig().HelmConfig.ApiVersions + } + p.h = h if err = yaml.Unmarshal(config, p); err != nil { return @@ -91,7 +101,7 @@ func (p *HelmChartInflationGeneratorPlugin) validateArgs() (err error) { // be under the loader root (unless root restrictions are // disabled). if p.ValuesFile == "" { - p.ValuesFile = filepath.Join(p.ChartHome, p.Name, "values.yaml") + p.ValuesFile = filepath.Join(p.absChartHome(), p.Name, "values.yaml") } for i, file := range p.AdditionalValuesFiles { // use Load() to enforce root restrictions @@ -132,10 +142,17 @@ func (p *HelmChartInflationGeneratorPlugin) errIfIllegalValuesMerge() error { } func (p *HelmChartInflationGeneratorPlugin) absChartHome() string { + var chartHome string if filepath.IsAbs(p.ChartHome) { - return p.ChartHome + chartHome = p.ChartHome + } else { + chartHome = filepath.Join(p.h.Loader().Root(), p.ChartHome) } - return filepath.Join(p.h.Loader().Root(), p.ChartHome) + + if p.Version != "" && p.Repo != "" { + return filepath.Join(chartHome, fmt.Sprintf("%s-%s", p.Name, p.Version)) + } + return chartHome } func (p *HelmChartInflationGeneratorPlugin) runHelmCommand( @@ -185,18 +202,33 @@ func (p *HelmChartInflationGeneratorPlugin) replaceValuesInline() error { if err != nil { return err } - chValues := make(map[string]interface{}) - if err = yaml.Unmarshal(pValues, &chValues); err != nil { - return err + chValues, err := kyaml.Parse(string(pValues)) + if err != nil { + return errors.WrapPrefixf(err, "could not parse values file into rnode") } + inlineValues, err := kyaml.FromMap(p.ValuesInline) + if err != nil { + return errors.WrapPrefixf(err, "could not parse values inline into rnode") + } + var outValues *kyaml.RNode switch p.ValuesMerge { + // Function `merge2.Merge` overrides values in dest with values from src. + // To achieve override or merge behavior, we pass parameters in different order. + // Object passed as dest will be modified, so we copy it just in case someone + // decides to use it after this is called. case valuesMergeOptionOverride: - err = mergo.Merge( - &chValues, p.ValuesInline, mergo.WithOverride) + outValues, err = merge2.Merge(inlineValues, chValues.Copy(), kyaml.MergeOptions{}) case valuesMergeOptionMerge: - err = mergo.Merge(&chValues, p.ValuesInline) + outValues, err = merge2.Merge(chValues, inlineValues.Copy(), kyaml.MergeOptions{}) + } + if err != nil { + return errors.WrapPrefixf(err, "could not merge values") + } + mapValues, err := outValues.Map() + if err != nil { + return errors.WrapPrefixf(err, "could not parse merged values into map") } - p.ValuesInline = chValues + p.ValuesInline = mapValues return err } @@ -281,8 +313,18 @@ func (p *HelmChartInflationGeneratorPlugin) pullCommand() []string { "pull", "--untar", "--untardir", p.absChartHome(), - "--repo", p.Repo, - p.Name} + } + + switch { + case strings.HasPrefix(p.Repo, "oci://"): + args = append(args, strings.TrimSuffix(p.Repo, "/")+"/"+p.Name) + case p.Repo != "": + args = append(args, "--repo", p.Repo) + fallthrough + default: + args = append(args, p.Name) + } + if p.Version != "" { args = append(args, "--version", p.Version) } diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go index 5ee5353f4..04625e510 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go @@ -6,7 +6,7 @@ package builtins import ( "fmt" - jsonpatch "github.com/evanphx/json-patch" + jsonpatch "gopkg.in/evanphx/json-patch.v4" "sigs.k8s.io/kustomize/api/filters/patchjson6902" "sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/resmap" diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go index 45be1ef25..8e6eb4112 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go @@ -7,104 +7,123 @@ import ( "fmt" "strings" - jsonpatch "github.com/evanphx/json-patch" + jsonpatch "gopkg.in/evanphx/json-patch.v4" "sigs.k8s.io/kustomize/api/filters/patchjson6902" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/resource" "sigs.k8s.io/kustomize/api/types" + "sigs.k8s.io/kustomize/kyaml/errors" "sigs.k8s.io/kustomize/kyaml/kio/kioutil" "sigs.k8s.io/yaml" ) type PatchTransformerPlugin struct { - loadedPatch *resource.Resource - decodedPatch jsonpatch.Patch - Path string `json:"path,omitempty" yaml:"path,omitempty"` - Patch string `json:"patch,omitempty" yaml:"patch,omitempty"` - Target *types.Selector `json:"target,omitempty" yaml:"target,omitempty"` - Options map[string]bool `json:"options,omitempty" yaml:"options,omitempty"` + smPatches []*resource.Resource // strategic-merge patches + jsonPatches jsonpatch.Patch // json6902 patch + // patchText is pure patch text created by Path or Patch + patchText string + // patchSource is patch source message + patchSource string + Path string `json:"path,omitempty" yaml:"path,omitempty"` + Patch string `json:"patch,omitempty" yaml:"patch,omitempty"` + Target *types.Selector `json:"target,omitempty" yaml:"target,omitempty"` + Options map[string]bool `json:"options,omitempty" yaml:"options,omitempty"` } -func (p *PatchTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) error { - err := yaml.Unmarshal(c, p) - if err != nil { +func (p *PatchTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) error { + if err := yaml.Unmarshal(c, p); err != nil { return err } + p.Patch = strings.TrimSpace(p.Patch) - if p.Patch == "" && p.Path == "" { - return fmt.Errorf( - "must specify one of patch and path in\n%s", string(c)) - } - if p.Patch != "" && p.Path != "" { - return fmt.Errorf( - "patch and path can't be set at the same time\n%s", string(c)) - } - if p.Path != "" { - loaded, loadErr := h.Loader().Load(p.Path) - if loadErr != nil { - return loadErr + switch { + case p.Patch == "" && p.Path == "": + return fmt.Errorf("must specify one of patch and path in\n%s", string(c)) + case p.Patch != "" && p.Path != "": + return fmt.Errorf("patch and path can't be set at the same time\n%s", string(c)) + case p.Patch != "": + p.patchText = p.Patch + p.patchSource = fmt.Sprintf("[patch: %q]", p.patchText) + case p.Path != "": + loaded, err := h.Loader().Load(p.Path) + if err != nil { + return fmt.Errorf("failed to get the patch file from path(%s): %w", p.Path, err) } - p.Patch = string(loaded) + p.patchText = string(loaded) + p.patchSource = fmt.Sprintf("[path: %q]", p.Path) } - patchSM, errSM := h.ResmapFactory().RF().FromBytes([]byte(p.Patch)) - patchJson, errJson := jsonPatchFromBytes([]byte(p.Patch)) + patchesSM, errSM := h.ResmapFactory().RF().SliceFromBytes([]byte(p.patchText)) + patchesJson, errJson := jsonPatchFromBytes([]byte(p.patchText)) + if (errSM == nil && errJson == nil) || - (patchSM != nil && patchJson != nil) { + (patchesSM != nil && patchesJson != nil) { return fmt.Errorf( - "illegally qualifies as both an SM and JSON patch: [%v]", - p.Patch) + "illegally qualifies as both an SM and JSON patch: %s", + p.patchSource) } if errSM != nil && errJson != nil { return fmt.Errorf( - "unable to parse SM or JSON patch from [%v]", p.Patch) + "unable to parse SM or JSON patch from %s", p.patchSource) } if errSM == nil { - p.loadedPatch = patchSM - if p.Options["allowNameChange"] { - p.loadedPatch.AllowNameChange() - } - if p.Options["allowKindChange"] { - p.loadedPatch.AllowKindChange() + p.smPatches = patchesSM + for _, loadedPatch := range p.smPatches { + if p.Options["allowNameChange"] { + loadedPatch.AllowNameChange() + } + if p.Options["allowKindChange"] { + loadedPatch.AllowKindChange() + } } } else { - p.decodedPatch = patchJson + p.jsonPatches = patchesJson } return nil } func (p *PatchTransformerPlugin) Transform(m resmap.ResMap) error { - if p.loadedPatch == nil { - return p.transformJson6902(m, p.decodedPatch) + if p.smPatches != nil { + return p.transformStrategicMerge(m) } - // The patch was a strategic merge patch - return p.transformStrategicMerge(m, p.loadedPatch) + return p.transformJson6902(m) } -// transformStrategicMerge applies the provided strategic merge patch -// to all the resources in the ResMap that match either the Target or -// the identifier of the patch. -func (p *PatchTransformerPlugin) transformStrategicMerge(m resmap.ResMap, patch *resource.Resource) error { - if p.Target == nil { - target, err := m.GetById(patch.OrgId()) +// transformStrategicMerge applies each loaded strategic merge patch +// to the resource in the ResMap that matches the identifier of the patch. +// If only one patch is specified, the Target can be used instead. +func (p *PatchTransformerPlugin) transformStrategicMerge(m resmap.ResMap) error { + if p.Target != nil { + if len(p.smPatches) > 1 { + // detail: https://github.com/kubernetes-sigs/kustomize/issues/5049#issuecomment-1440604403 + return fmt.Errorf("Multiple Strategic-Merge Patches in one `patches` entry is not allowed to set `patches.target` field: %s", p.patchSource) + } + + // single patch + patch := p.smPatches[0] + selected, err := m.Select(*p.Target) if err != nil { - return err + return fmt.Errorf("unable to find patch target %q in `resources`: %w", p.Target, err) } - return target.ApplySmPatch(patch) + return errors.Wrap(m.ApplySmPatch(resource.MakeIdSet(selected), patch)) } - selected, err := m.Select(*p.Target) - if err != nil { - return err + + for _, patch := range p.smPatches { + target, err := m.GetById(patch.OrgId()) + if err != nil { + return fmt.Errorf("no resource matches strategic merge patch %q: %w", patch.OrgId(), err) + } + if err := target.ApplySmPatch(patch); err != nil { + return errors.Wrap(err) + } } - return m.ApplySmPatch(resource.MakeIdSet(selected), patch) + return nil } -// transformJson6902 applies the provided json6902 patch -// to all the resources in the ResMap that match the Target. -func (p *PatchTransformerPlugin) transformJson6902(m resmap.ResMap, patch jsonpatch.Patch) error { +// transformJson6902 applies json6902 Patch to all the resources in the ResMap that match Target. +func (p *PatchTransformerPlugin) transformJson6902(m resmap.ResMap) error { if p.Target == nil { - return fmt.Errorf("must specify a target for patch %s", p.Patch) + return fmt.Errorf("must specify a target for JSON patch %s", p.patchSource) } resources, err := m.Select(*p.Target) if err != nil { @@ -114,7 +133,7 @@ func (p *PatchTransformerPlugin) transformJson6902(m resmap.ResMap, patch jsonpa res.StorePreviousId() internalAnnotations := kioutil.GetInternalAnnotations(&res.RNode) err = res.ApplyFilter(patchjson6902.Filter{ - Patch: p.Patch, + Patch: p.patchText, }) if err != nil { return err @@ -129,16 +148,17 @@ func (p *PatchTransformerPlugin) transformJson6902(m resmap.ResMap, patch jsonpa return nil } -// jsonPatchFromBytes loads a Json 6902 patch from -// a bytes input -func jsonPatchFromBytes( - in []byte) (jsonpatch.Patch, error) { +// jsonPatchFromBytes loads a Json 6902 patch from a bytes input +func jsonPatchFromBytes(in []byte) (jsonpatch.Patch, error) { ops := string(in) if ops == "" { return nil, fmt.Errorf("empty json patch operations") } if ops[0] != '[' { + // TODO(5049): + // In the case of multiple yaml documents, return error instead of ignoring all but first. + // Details: https://github.com/kubernetes-sigs/kustomize/pull/5194#discussion_r1256686728 jsonOps, err := yaml.YAMLToJSON(in) if err != nil { return nil, err diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/SortOrderTransformer.go b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/SortOrderTransformer.go index 687f21a60..c50f627fe 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/builtins/SortOrderTransformer.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/builtins/SortOrderTransformer.go @@ -74,34 +74,16 @@ func (p *SortOrderTransformerPlugin) Transform(m resmap.ResMap) (err error) { // Sort if p.SortOptions.Order == types.LegacySortOrder { - s := newLegacyIDSorter(m.AllIds(), p.SortOptions.LegacySortOptions) + s := newLegacyIDSorter(m.Resources(), p.SortOptions.LegacySortOptions) sort.Sort(s) - err = applyOrdering(m, s.resids) - if err != nil { - return err - } - } - return nil -} -// applyOrdering takes resources (given in ResMap) and a desired ordering given -// as a sequence of ResIds, and updates the ResMap's resources to match the -// ordering. -func applyOrdering(m resmap.ResMap, ordering []resid.ResId) error { - var err error - resources := make([]*resource.Resource, m.Size()) - // Clear and refill with the correct order - for i, id := range ordering { - resources[i], err = m.GetByCurrentId(id) - if err != nil { - return errors.WrapPrefixf(err, "expected match for sorting") - } - } - m.Clear() - for _, r := range resources { - err = m.Append(r) - if err != nil { - return errors.WrapPrefixf(err, "SortOrderTransformer: Failed to append to resources") + // Clear the map and re-add the resources in the sorted order. + m.Clear() + for _, r := range s.resources { + err := m.Append(r) + if err != nil { + return errors.WrapPrefixf(err, "SortOrderTransformer: Failed to append to resources") + } } } return nil @@ -117,12 +99,17 @@ func applyOrdering(m resmap.ResMap, ordering []resid.ResId) error { type legacyIDSorter struct { // resids only stores the metadata of the object. This is an optimization as // it's expensive to compute these again and again during ordering. - resids []resid.ResId + resids []resid.ResId + // Initially, we sorted the metadata (ResId) of each object and then called GetByCurrentId on each to construct the final list. + // The problem is that GetByCurrentId is inefficient and does a linear scan in a list every time we do that. + // So instead, we sort resources alongside the ResIds. + resources []*resource.Resource + typeOrders map[string]int } func newLegacyIDSorter( - resids []resid.ResId, + resources []*resource.Resource, options *types.LegacySortOptions) *legacyIDSorter { // Precalculate a resource ranking based on the priority lists. var typeOrders = func() map[string]int { @@ -135,10 +122,13 @@ func newLegacyIDSorter( } return m }() - return &legacyIDSorter{ - resids: resids, - typeOrders: typeOrders, + + ret := &legacyIDSorter{typeOrders: typeOrders} + for _, res := range resources { + ret.resids = append(ret.resids, res.CurId()) + ret.resources = append(ret.resources, res) } + return ret } var _ sort.Interface = legacyIDSorter{} @@ -146,6 +136,7 @@ var _ sort.Interface = legacyIDSorter{} func (a legacyIDSorter) Len() int { return len(a.resids) } func (a legacyIDSorter) Swap(i, j int) { a.resids[i], a.resids[j] = a.resids[j], a.resids[i] + a.resources[i], a.resources[j] = a.resources[j], a.resources[i] } func (a legacyIDSorter) Less(i, j int) bool { if !a.resids[i].Gvk.Equals(a.resids[j].Gvk) { diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/git/cloner.go b/vendor/sigs.k8s.io/kustomize/api/internal/git/cloner.go index d15fa7590..2098cdd31 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/git/cloner.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/git/cloner.go @@ -22,10 +22,16 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error { if err = r.run("init"); err != nil { return err } + // git relative submodule need origin, see https://github.com/kubernetes-sigs/kustomize/issues/5131 + if err = r.run("remote", "add", "origin", repoSpec.CloneSpec()); err != nil { + return err + } ref := "HEAD" if repoSpec.Ref != "" { ref = repoSpec.Ref } + // we use repoSpec.CloneSpec() instead of origin because on error, + // the prior prints the actual repo url for the user. if err = r.run("fetch", "--depth=1", repoSpec.CloneSpec(), ref); err != nil { return err } diff --git a/vendor/sigs.k8s.io/kustomize/api/image/image.go b/vendor/sigs.k8s.io/kustomize/api/internal/image/image.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/image/image.go rename to vendor/sigs.k8s.io/kustomize/api/internal/image/image.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/commonannotations.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/commonannotations.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/commonannotations.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/commonannotations.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/commonlabels.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/commonlabels.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/commonlabels.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/commonlabels.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/defaultconfig.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/defaultconfig.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/defaultconfig.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/defaultconfig.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/doc.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/doc.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/doc.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/doc.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/images.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/images.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/images.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/images.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/metadatalabels.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/metadatalabels.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/metadatalabels.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/metadatalabels.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/nameprefix.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/nameprefix.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/nameprefix.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/nameprefix.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/namereference.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/namereference.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/namereference.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/namereference.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/namespace.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/namespace.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/namespace.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/namespace.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/namesuffix.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/namesuffix.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/namesuffix.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/namesuffix.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/replicas.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/replicas.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/replicas.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/replicas.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/templatelabels.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/templatelabels.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/templatelabels.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/templatelabels.go diff --git a/vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/varreference.go b/vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/varreference.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts/varreference.go rename to vendor/sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts/varreference.go diff --git a/vendor/sigs.k8s.io/kustomize/api/loader/errors.go b/vendor/sigs.k8s.io/kustomize/api/internal/loader/errors.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/loader/errors.go rename to vendor/sigs.k8s.io/kustomize/api/internal/loader/errors.go diff --git a/vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go b/vendor/sigs.k8s.io/kustomize/api/internal/loader/fileloader.go similarity index 75% rename from vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go rename to vendor/sigs.k8s.io/kustomize/api/internal/loader/fileloader.go index 672ca29b3..6ecc9fcef 100644 --- a/vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/loader/fileloader.go @@ -25,7 +25,7 @@ func IsRemoteFile(path string) bool { return err == nil && (u.Scheme == "http" || u.Scheme == "https") } -// fileLoader is a kustomization's interface to files. +// FileLoader is a kustomization's interface to files. // // The directory in which a kustomization file sits // is referred to below as the kustomization's _root_. @@ -38,49 +38,48 @@ func IsRemoteFile(path string) bool { // // * supplemental data paths // -// `Load` is used to visit these paths. +// `Load` is used to visit these paths. // -// These paths refer to resources, patches, -// data for ConfigMaps and Secrets, etc. +// These paths refer to resources, patches, +// data for ConfigMaps and Secrets, etc. // -// The loadRestrictor may disallow certain paths -// or classes of paths. +// The loadRestrictor may disallow certain paths +// or classes of paths. // // * bases (other kustomizations) // -// `New` is used to load bases. +// `New` is used to load bases. // -// A base can be either a remote git repo URL, or -// a directory specified relative to the current -// root. In the former case, the repo is locally -// cloned, and the new loader is rooted on a path -// in that clone. +// A base can be either a remote git repo URL, or +// a directory specified relative to the current +// root. In the former case, the repo is locally +// cloned, and the new loader is rooted on a path +// in that clone. // -// As loaders create new loaders, a root history -// is established, and used to disallow: +// As loaders create new loaders, a root history +// is established, and used to disallow: // -// - A base that is a repository that, in turn, -// specifies a base repository seen previously -// in the loading stack (a cycle). +// - A base that is a repository that, in turn, +// specifies a base repository seen previously +// in the loading stack (a cycle). // -// - An overlay depending on a base positioned at -// or above it. I.e. '../foo' is OK, but '.', -// '..', '../..', etc. are disallowed. Allowing -// such a base has no advantages and encourages -// cycles, particularly if some future change -// were to introduce globbing to file -// specifications in the kustomization file. +// - An overlay depending on a base positioned at +// or above it. I.e. '../foo' is OK, but '.', +// '..', '../..', etc. are disallowed. Allowing +// such a base has no advantages and encourages +// cycles, particularly if some future change +// were to introduce globbing to file +// specifications in the kustomization file. // // These restrictions assure that kustomizations // are self-contained and relocatable, and impose // some safety when relying on remote kustomizations, // e.g. a remotely loaded ConfigMap generator specified // to read from /etc/passwd will fail. -// -type fileLoader struct { +type FileLoader struct { // Loader that spawned this loader. // Used to avoid cycles. - referrer *fileLoader + referrer *FileLoader // An absolute, cleaned path to a directory. // The Load function will read non-absolute @@ -107,23 +106,9 @@ type fileLoader struct { cleaner func() error } -// NewFileLoaderAtCwd returns a loader that loads from PWD. -// A convenience for kustomize edit commands. -func NewFileLoaderAtCwd(fSys filesys.FileSystem) *fileLoader { - return newLoaderOrDie( - RestrictionRootOnly, fSys, filesys.SelfDir) -} - -// NewFileLoaderAtRoot returns a loader that loads from "/". -// A convenience for tests. -func NewFileLoaderAtRoot(fSys filesys.FileSystem) *fileLoader { - return newLoaderOrDie( - RestrictionRootOnly, fSys, filesys.Separator) -} - // Repo returns the absolute path to the repo that contains Root if this fileLoader was created from a url // or the empty string otherwise. -func (fl *fileLoader) Repo() string { +func (fl *FileLoader) Repo() string { if fl.repoSpec != nil { return fl.repoSpec.Dir.String() } @@ -132,13 +117,13 @@ func (fl *fileLoader) Repo() string { // Root returns the absolute path that is prepended to any // relative paths used in Load. -func (fl *fileLoader) Root() string { +func (fl *FileLoader) Root() string { return fl.root.String() } -func newLoaderOrDie( +func NewLoaderOrDie( lr LoadRestrictorFunc, - fSys filesys.FileSystem, path string) *fileLoader { + fSys filesys.FileSystem, path string) *FileLoader { root, err := filesys.ConfirmDir(fSys, path) if err != nil { log.Fatalf("unable to make loader at '%s'; %v", path, err) @@ -147,12 +132,12 @@ func newLoaderOrDie( lr, root, fSys, nil, git.ClonerUsingGitExec) } -// newLoaderAtConfirmedDir returns a new fileLoader with given root. +// newLoaderAtConfirmedDir returns a new FileLoader with given root. func newLoaderAtConfirmedDir( lr LoadRestrictorFunc, root filesys.ConfirmedDir, fSys filesys.FileSystem, - referrer *fileLoader, cloner git.Cloner) *fileLoader { - return &fileLoader{ + referrer *FileLoader, cloner git.Cloner) *FileLoader { + return &FileLoader{ loadRestrictor: lr, root: root, referrer: referrer, @@ -164,7 +149,7 @@ func newLoaderAtConfirmedDir( // New returns a new Loader, rooted relative to current loader, // or rooted in a temp directory holding a git repo clone. -func (fl *fileLoader) New(path string) (ifc.Loader, error) { +func (fl *FileLoader) New(path string) (ifc.Loader, error) { if path == "" { return nil, errors.Errorf("new root cannot be empty") } @@ -200,7 +185,7 @@ func (fl *fileLoader) New(path string) (ifc.Loader, error) { // directory holding a cloned git repo. func newLoaderAtGitClone( repoSpec *git.RepoSpec, fSys filesys.FileSystem, - referrer *fileLoader, cloner git.Cloner) (ifc.Loader, error) { + referrer *FileLoader, cloner git.Cloner) (ifc.Loader, error) { cleaner := repoSpec.Cleaner(fSys) err := cloner(repoSpec) if err != nil { @@ -229,7 +214,7 @@ func newLoaderAtGitClone( return nil, fmt.Errorf("%q refers to directory outside of repo %q", repoSpec.AbsPath(), repoSpec.CloneDir()) } - return &fileLoader{ + return &FileLoader{ // Clones never allowed to escape root. loadRestrictor: RestrictionRootOnly, root: root, @@ -241,7 +226,7 @@ func newLoaderAtGitClone( }, nil } -func (fl *fileLoader) errIfGitContainmentViolation( +func (fl *FileLoader) errIfGitContainmentViolation( base filesys.ConfirmedDir) error { containingRepo := fl.containingRepo() if containingRepo == nil { @@ -259,7 +244,7 @@ func (fl *fileLoader) errIfGitContainmentViolation( // Looks back through referrers for a git repo, returning nil // if none found. -func (fl *fileLoader) containingRepo() *git.RepoSpec { +func (fl *FileLoader) containingRepo() *git.RepoSpec { if fl.repoSpec != nil { return fl.repoSpec } @@ -271,7 +256,7 @@ func (fl *fileLoader) containingRepo() *git.RepoSpec { // errIfArgEqualOrHigher tests whether the argument, // is equal to or above the root of any ancestor. -func (fl *fileLoader) errIfArgEqualOrHigher( +func (fl *FileLoader) errIfArgEqualOrHigher( candidateRoot filesys.ConfirmedDir) error { if fl.root.HasPrefix(candidateRoot) { return fmt.Errorf( @@ -288,7 +273,7 @@ func (fl *fileLoader) errIfArgEqualOrHigher( // I.e. Allow a distinction between git URI with // path foo and tag bar and a git URI with the same // path but a different tag? -func (fl *fileLoader) errIfRepoCycle(newRepoSpec *git.RepoSpec) error { +func (fl *FileLoader) errIfRepoCycle(newRepoSpec *git.RepoSpec) error { // TODO(monopole): Use parsed data instead of Raw(). if fl.repoSpec != nil && strings.HasPrefix(fl.repoSpec.Raw(), newRepoSpec.Raw()) { @@ -305,7 +290,7 @@ func (fl *fileLoader) errIfRepoCycle(newRepoSpec *git.RepoSpec) error { // Load returns the content of file at the given path, // else an error. Relative paths are taken relative // to the root. -func (fl *fileLoader) Load(path string) ([]byte, error) { +func (fl *FileLoader) Load(path string) ([]byte, error) { if IsRemoteFile(path) { return fl.httpClientGetContent(path) } @@ -319,7 +304,7 @@ func (fl *fileLoader) Load(path string) ([]byte, error) { return fl.fSys.ReadFile(path) } -func (fl *fileLoader) httpClientGetContent(path string) ([]byte, error) { +func (fl *FileLoader) httpClientGetContent(path string) ([]byte, error) { var hc *http.Client if fl.http != nil { hc = fl.http @@ -344,6 +329,6 @@ func (fl *fileLoader) httpClientGetContent(path string) ([]byte, error) { } // Cleanup runs the cleaner. -func (fl *fileLoader) Cleanup() error { +func (fl *FileLoader) Cleanup() error { return fl.cleaner() } diff --git a/vendor/sigs.k8s.io/kustomize/api/loader/loader.go b/vendor/sigs.k8s.io/kustomize/api/internal/loader/loader.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/loader/loader.go rename to vendor/sigs.k8s.io/kustomize/api/internal/loader/loader.go diff --git a/vendor/sigs.k8s.io/kustomize/api/loader/loadrestrictions.go b/vendor/sigs.k8s.io/kustomize/api/internal/loader/loadrestrictions.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/api/loader/loadrestrictions.go rename to vendor/sigs.k8s.io/kustomize/api/internal/loader/loadrestrictions.go diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go index bf5e3f8a3..434941b6e 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go @@ -33,7 +33,7 @@ func loadDefaultConfig( // makeTransformerConfigFromBytes returns a TransformerConfig object from bytes func makeTransformerConfigFromBytes(data []byte) (*TransformerConfig, error) { var t TransformerConfig - err := yaml.Unmarshal(data, &t) + err := yaml.UnmarshalStrict(data, &t) if err != nil { return nil, err } diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go index 36ef42c27..eb0f30733 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go @@ -47,6 +47,8 @@ type NameBackReferences struct { // TODO: rename json 'fieldSpecs' to 'referrers' for clarity. // This will, however, break anyone using a custom config. Referrers types.FsSlice `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"` + + // Note: If any new pointer based members are added, DeepCopy needs to be updated } func (n NameBackReferences) String() string { @@ -66,6 +68,17 @@ func (s nbrSlice) Less(i, j int) bool { return s[i].Gvk.IsLessThan(s[j].Gvk) } +// DeepCopy returns a new copy of nbrSlice +func (s nbrSlice) DeepCopy() nbrSlice { + ret := make(nbrSlice, len(s)) + copy(ret, s) + for i, slice := range ret { + ret[i].Referrers = slice.Referrers.DeepCopy() + } + + return ret +} + func (s nbrSlice) mergeAll(o nbrSlice) (result nbrSlice, err error) { result = s for _, r := range o { diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/transformerconfig.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/transformerconfig.go index 69b8bd4fb..c539c290d 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/transformerconfig.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/transformerconfig.go @@ -6,19 +6,22 @@ package builtinconfig import ( "log" "sort" + "sync" "sigs.k8s.io/kustomize/api/ifc" - "sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts" + "sigs.k8s.io/kustomize/api/internal/konfig/builtinpluginconsts" "sigs.k8s.io/kustomize/api/types" "sigs.k8s.io/kustomize/kyaml/errors" ) // TransformerConfig holds the data needed to perform transformations. type TransformerConfig struct { + // if any fields are added, update the DeepCopy implementation NamePrefix types.FsSlice `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"` NameSuffix types.FsSlice `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"` NameSpace types.FsSlice `json:"namespace,omitempty" yaml:"namespace,omitempty"` CommonLabels types.FsSlice `json:"commonLabels,omitempty" yaml:"commonLabels,omitempty"` + Labels types.FsSlice `json:"labels,omitempty" yaml:"labels,omitempty"` TemplateLabels types.FsSlice `json:"templateLabels,omitempty" yaml:"templateLabels,omitempty"` CommonAnnotations types.FsSlice `json:"commonAnnotations,omitempty" yaml:"commonAnnotations,omitempty"` NameReference nbrSlice `json:"nameReference,omitempty" yaml:"nameReference,omitempty"` @@ -32,14 +35,44 @@ func MakeEmptyConfig() *TransformerConfig { return &TransformerConfig{} } +// DeepCopy returns a new copy of TransformerConfig +func (t *TransformerConfig) DeepCopy() *TransformerConfig { + return &TransformerConfig{ + NamePrefix: t.NamePrefix.DeepCopy(), + NameSuffix: t.NameSuffix.DeepCopy(), + NameSpace: t.NameSpace.DeepCopy(), + CommonLabels: t.CommonLabels.DeepCopy(), + Labels: t.Labels.DeepCopy(), + TemplateLabels: t.TemplateLabels.DeepCopy(), + CommonAnnotations: t.CommonAnnotations.DeepCopy(), + NameReference: t.NameReference.DeepCopy(), + VarReference: t.VarReference.DeepCopy(), + Images: t.Images.DeepCopy(), + Replicas: t.Replicas.DeepCopy(), + } +} + +// the default transformer config is initialized by MakeDefaultConfig, +// and must only be accessed via that function. +var ( + initDefaultConfig sync.Once //nolint:gochecknoglobals + defaultConfig *TransformerConfig //nolint:gochecknoglobals +) + // MakeDefaultConfig returns a default TransformerConfig. func MakeDefaultConfig() *TransformerConfig { - c, err := makeTransformerConfigFromBytes( - builtinpluginconsts.GetDefaultFieldSpecs()) - if err != nil { - log.Fatalf("Unable to make default transformconfig: %v", err) - } - return c + // parsing is expensive when having a large tree with many kustomization modules, so only do it once + initDefaultConfig.Do(func() { + var err error + defaultConfig, err = makeTransformerConfigFromBytes( + builtinpluginconsts.GetDefaultFieldSpecs()) + if err != nil { + log.Fatalf("Unable to make default transformconfig: %v", err) + } + }) + + // return a copy to avoid any mutations to protect the reference copy + return defaultConfig.DeepCopy() } // MakeTransformerConfig returns a merger of custom config, @@ -63,6 +96,7 @@ func (t *TransformerConfig) sortFields() { sort.Sort(t.NameSuffix) sort.Sort(t.NameSpace) sort.Sort(t.CommonLabels) + sort.Sort(t.Labels) sort.Sort(t.TemplateLabels) sort.Sort(t.CommonAnnotations) sort.Sort(t.NameReference) @@ -83,12 +117,18 @@ func (t *TransformerConfig) AddSuffixFieldSpec(fs types.FieldSpec) (err error) { return err } -// AddLabelFieldSpec adds a FieldSpec to CommonLabels -func (t *TransformerConfig) AddLabelFieldSpec(fs types.FieldSpec) (err error) { +// AddCommonLabelsFieldSpec adds a FieldSpec to CommonLabels +func (t *TransformerConfig) AddCommonLabelsFieldSpec(fs types.FieldSpec) (err error) { t.CommonLabels, err = t.CommonLabels.MergeOne(fs) return err } +// AddLabelsFieldSpec adds a FieldSpec to Labels +func (t *TransformerConfig) AddLabelsFieldSpec(fs types.FieldSpec) (err error) { + t.Labels, err = t.Labels.MergeOne(fs) + return err //nolint:wrapcheck +} + // AddAnnotationFieldSpec adds a FieldSpec to CommonAnnotations func (t *TransformerConfig) AddAnnotationFieldSpec(fs types.FieldSpec) (err error) { t.CommonAnnotations, err = t.CommonAnnotations.MergeOne(fs) @@ -131,6 +171,10 @@ func (t *TransformerConfig) Merge(input *TransformerConfig) ( if err != nil { return nil, errors.WrapPrefixf(err, "failed to merge CommonLabels fieldSpec") } + merged.Labels, err = t.Labels.MergeAll(input.Labels) + if err != nil { + return nil, errors.WrapPrefixf(err, "failed to merge Labels fieldSpec") + } merged.TemplateLabels, err = t.TemplateLabels.MergeAll(input.TemplateLabels) if err != nil { return nil, errors.WrapPrefixf(err, "failed to merge TemplateLabels fieldSpec") diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go index 001731f78..71c52884f 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go @@ -6,6 +6,7 @@ package execplugin import ( "bytes" "fmt" + "log" "os" "os/exec" "runtime" @@ -21,6 +22,7 @@ import ( const ( tmpConfigFilePrefix = "kust-plugin-config-" + maxArgStringLength = 131071 ) // ExecPlugin record the name and args of an executable @@ -169,23 +171,35 @@ func (p *ExecPlugin) invokePlugin(input []byte) ([]byte, error) { p.path, append([]string{f.Name()}, p.args...)...) cmd.Env = p.getEnv() cmd.Stdin = bytes.NewReader(input) - cmd.Stderr = os.Stderr + var stdErr bytes.Buffer + cmd.Stderr = &stdErr if _, err := os.Stat(p.h.Loader().Root()); err == nil { cmd.Dir = p.h.Loader().Root() } result, err := cmd.Output() if err != nil { return nil, errors.WrapPrefixf( - err, "failure in plugin configured via %s; %v", - f.Name(), err.Error()) + fmt.Errorf("failure in plugin configured via %s; %w", + f.Name(), err), stdErr.String()) } return result, os.Remove(f.Name()) } func (p *ExecPlugin) getEnv() []string { env := os.Environ() - env = append(env, - "KUSTOMIZE_PLUGIN_CONFIG_STRING="+string(p.cfg), - "KUSTOMIZE_PLUGIN_CONFIG_ROOT="+p.h.Loader().Root()) + pluginConfigString := "KUSTOMIZE_PLUGIN_CONFIG_STRING=" + string(p.cfg) + if len(pluginConfigString) <= maxArgStringLength { + env = append(env, pluginConfigString) + } else { + log.Printf("KUSTOMIZE_PLUGIN_CONFIG_STRING exceeds hard limit of %d characters, the environment variable "+ + "will be omitted", maxArgStringLength) + } + pluginConfigRoot := "KUSTOMIZE_PLUGIN_CONFIG_ROOT=" + p.h.Loader().Root() + if len(pluginConfigRoot) <= maxArgStringLength { + env = append(env, pluginConfigRoot) + } else { + log.Printf("KUSTOMIZE_PLUGIN_CONFIG_ROOT exceeds hard limit of %d characters, the environment variable "+ + "will be omitted", maxArgStringLength) + } return env } diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go new file mode 100644 index 000000000..3757cfc64 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go @@ -0,0 +1,62 @@ +// Copyright 2024 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 +//go:build !kustomize_disable_go_plugin_support + +package loader + +import ( + "fmt" + "log" + "plugin" + "reflect" + + "sigs.k8s.io/kustomize/api/internal/plugins/utils" + "sigs.k8s.io/kustomize/api/konfig" + "sigs.k8s.io/kustomize/api/resmap" + "sigs.k8s.io/kustomize/kyaml/errors" + "sigs.k8s.io/kustomize/kyaml/resid" +) + +// registry is a means to avoid trying to load the same .so file +// into memory more than once, which results in an error. +// Each test makes its own loader, and tries to load its own plugins, +// but the loaded .so files are in shared memory, so one will get +// "this plugin already loaded" errors if the registry is maintained +// as a Loader instance variable. So make it a package variable. +var registry = make(map[string]resmap.Configurable) //nolint:gochecknoglobals + +func copyPlugin(c resmap.Configurable) resmap.Configurable { + indirect := reflect.Indirect(reflect.ValueOf(c)) + newIndirect := reflect.New(indirect.Type()) + newIndirect.Elem().Set(reflect.ValueOf(indirect.Interface())) + newNamed := newIndirect.Interface() + return newNamed.(resmap.Configurable) //nolint:forcetypeassert +} + +func (l *Loader) loadGoPlugin(id resid.ResId, absPath string) (resmap.Configurable, error) { + regId := relativePluginPath(id) + if c, ok := registry[regId]; ok { + return copyPlugin(c), nil + } + if !utils.FileExists(absPath) { + return nil, fmt.Errorf( + "expected file with Go object code at: %s", absPath) + } + log.Printf("Attempting plugin load from %q", absPath) + p, err := plugin.Open(absPath) + if err != nil { + return nil, errors.WrapPrefixf(err, "plugin %s fails to load", absPath) + } + symbol, err := p.Lookup(konfig.PluginSymbol) + if err != nil { + return nil, errors.WrapPrefixf( + err, "plugin %s doesn't have symbol %s", + regId, konfig.PluginSymbol) + } + c, ok := symbol.(resmap.Configurable) + if !ok { + return nil, fmt.Errorf("plugin %q not configurable", regId) + } + registry[regId] = c + return copyPlugin(c), nil +} diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go new file mode 100644 index 000000000..5531b7967 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go @@ -0,0 +1,25 @@ +// Copyright 2024 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 + +// The build tag "kustomize_disable_go_plugin_support" is used to deactivate the +// kustomize API's dependency on the "plugins" package. This is beneficial for +// applications that need to embed it but do not have requirements for dynamic +// Go plugins. +// Including plugins as a dependency can lead to an increase in binary size due +// to the population of ELF's sections such as .dynsym and .dynstr. +// By utilizing this flag, applications have the flexibility to exclude the +// import if they do not require support for dynamic Go plugins. +//go:build kustomize_disable_go_plugin_support + +package loader + +import ( + "fmt" + + "sigs.k8s.io/kustomize/api/resmap" + "sigs.k8s.io/kustomize/kyaml/resid" +) + +func (l *Loader) loadGoPlugin(_ resid.ResId, _ string) (resmap.Configurable, error) { + return nil, fmt.Errorf("plugin load is disabled") +} diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go index 1758e5cf6..e494df767 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go @@ -5,18 +5,14 @@ package loader import ( "fmt" - "log" "os" "path/filepath" - "plugin" - "reflect" "strings" "sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/internal/plugins/builtinhelpers" "sigs.k8s.io/kustomize/api/internal/plugins/execplugin" "sigs.k8s.io/kustomize/api/internal/plugins/fnplugin" - "sigs.k8s.io/kustomize/api/internal/plugins/utils" "sigs.k8s.io/kustomize/api/konfig" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/resource" @@ -287,46 +283,3 @@ func (l *Loader) loadExecOrGoPlugin(resId resid.ResId) (resmap.Configurable, err return c, nil } -// registry is a means to avoid trying to load the same .so file -// into memory more than once, which results in an error. -// Each test makes its own loader, and tries to load its own plugins, -// but the loaded .so files are in shared memory, so one will get -// "this plugin already loaded" errors if the registry is maintained -// as a Loader instance variable. So make it a package variable. -var registry = make(map[string]resmap.Configurable) - -func (l *Loader) loadGoPlugin(id resid.ResId, absPath string) (resmap.Configurable, error) { - regId := relativePluginPath(id) - if c, ok := registry[regId]; ok { - return copyPlugin(c), nil - } - if !utils.FileExists(absPath) { - return nil, fmt.Errorf( - "expected file with Go object code at: %s", absPath) - } - log.Printf("Attempting plugin load from '%s'", absPath) - p, err := plugin.Open(absPath) - if err != nil { - return nil, errors.WrapPrefixf(err, "plugin %s fails to load", absPath) - } - symbol, err := p.Lookup(konfig.PluginSymbol) - if err != nil { - return nil, errors.WrapPrefixf( - err, "plugin %s doesn't have symbol %s", - regId, konfig.PluginSymbol) - } - c, ok := symbol.(resmap.Configurable) - if !ok { - return nil, fmt.Errorf("plugin '%s' not configurable", regId) - } - registry[regId] = c - return copyPlugin(c), nil -} - -func copyPlugin(c resmap.Configurable) resmap.Configurable { - indirect := reflect.Indirect(reflect.ValueOf(c)) - newIndirect := reflect.New(indirect.Type()) - newIndirect.Elem().Set(reflect.ValueOf(indirect.Interface())) - newNamed := newIndirect.Interface() - return newNamed.(resmap.Configurable) -} diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go b/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go index 6e06a14ba..44c82bc59 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go @@ -13,12 +13,12 @@ import ( "sigs.k8s.io/kustomize/api/internal/accumulator" "sigs.k8s.io/kustomize/api/internal/builtins" "sigs.k8s.io/kustomize/api/internal/kusterr" + load "sigs.k8s.io/kustomize/api/internal/loader" "sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig" "sigs.k8s.io/kustomize/api/internal/plugins/builtinhelpers" "sigs.k8s.io/kustomize/api/internal/plugins/loader" "sigs.k8s.io/kustomize/api/internal/utils" "sigs.k8s.io/kustomize/api/konfig" - load "sigs.k8s.io/kustomize/api/loader" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/resource" "sigs.k8s.io/kustomize/api/types" @@ -202,10 +202,6 @@ func (kt *KustTarget) accumulateTarget(ra *accumulator.ResAccumulator) ( if err != nil { return nil, errors.WrapPrefixf(err, "accumulating resources") } - ra, err = kt.accumulateComponents(ra, kt.kustomization.Components) - if err != nil { - return nil, errors.WrapPrefixf(err, "accumulating components") - } tConfig, err := builtinconfig.MakeTransformerConfig( kt.ldr, kt.kustomization.Configurations) if err != nil { @@ -230,6 +226,14 @@ func (kt *KustTarget) accumulateTarget(ra *accumulator.ResAccumulator) ( if err != nil { return nil, err } + + // components are expected to execute after reading resources and adding generators ,before applying transformers and validation. + // https://github.com/kubernetes-sigs/kustomize/pull/5170#discussion_r1212101287 + ra, err = kt.accumulateComponents(ra, kt.kustomization.Components) + if err != nil { + return nil, errors.WrapPrefixf(err, "accumulating components") + } + err = kt.runTransformers(ra) if err != nil { return nil, err @@ -421,7 +425,14 @@ func (kt *KustTarget) accumulateResources( } ldr, err := kt.ldr.New(path) if err != nil { - if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file + // If accumulateFile found malformed YAML and there was a failure + // loading the resource as a base, then the resource is likely a + // file. The loader failure message is unnecessary, and could be + // confusing. Report only the file load error. + // + // However, a loader timeout implies there is a git repo at the + // path. In that case, both errors could be important. + if kusterr.IsMalformedYAMLError(errF) && !utils.IsErrTimeout(err) { return nil, errF } return nil, errors.WrapPrefixf( diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget_configplugin.go b/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget_configplugin.go index b589961e5..1ba028a36 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget_configplugin.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget_configplugin.go @@ -275,13 +275,25 @@ var transformerConfigurators = map[builtinhelpers.BuiltinPluginType]func( if len(kt.kustomization.Labels) == 0 && len(kt.kustomization.CommonLabels) == 0 { return } + + type labelStruct struct { + Labels map[string]string + FieldSpecs []types.FieldSpec + } + for _, label := range kt.kustomization.Labels { - var c struct { - Labels map[string]string - FieldSpecs []types.FieldSpec - } + var c labelStruct + c.Labels = label.Pairs fss := types.FsSlice(label.FieldSpecs) + + // merge labels specified in the label section of transformer configs + // these apply to selectors and templates + fss, err := fss.MergeAll(tc.Labels) + if err != nil { + return nil, fmt.Errorf("failed to merge labels: %w", err) + } + // merge the custom fieldSpecs with the default if label.IncludeSelectors { fss, err = fss.MergeAll(tc.CommonLabels) @@ -297,7 +309,7 @@ var transformerConfigurators = map[builtinhelpers.BuiltinPluginType]func( fss, err = fss.MergeOne(types.FieldSpec{Path: "metadata/labels", CreateIfNotPresent: true}) } if err != nil { - return nil, err + return nil, fmt.Errorf("failed to merge labels: %w", err) } c.FieldSpecs = fss p := f() @@ -307,10 +319,9 @@ var transformerConfigurators = map[builtinhelpers.BuiltinPluginType]func( } result = append(result, p) } - var c struct { - Labels map[string]string - FieldSpecs []types.FieldSpec - } + + var c labelStruct + c.Labels = kt.kustomization.CommonLabels c.FieldSpecs = tc.CommonLabels p := f() diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go b/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go index c1761d2c6..a0d861c7b 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go @@ -15,11 +15,11 @@ type errTimeOut struct { cmd string } -func NewErrTimeOut(d time.Duration, c string) errTimeOut { - return errTimeOut{duration: d, cmd: c} +func NewErrTimeOut(d time.Duration, c string) *errTimeOut { + return &errTimeOut{duration: d, cmd: c} } -func (e errTimeOut) Error() string { +func (e *errTimeOut) Error() string { return fmt.Sprintf("hit %s timeout running '%s'", e.duration, e.cmd) } diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/utils/timedcall.go b/vendor/sigs.k8s.io/kustomize/api/internal/utils/timedcall.go index 0afadd0c3..cda53f864 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/utils/timedcall.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/utils/timedcall.go @@ -10,7 +10,7 @@ import ( // TimedCall runs fn, failing if it doesn't complete in the given duration. // The description is used in the timeout error message. func TimedCall(description string, d time.Duration, fn func() error) error { - done := make(chan error) + done := make(chan error, 1) timer := time.NewTimer(d) defer timer.Stop() go func() { done <- fn() }() diff --git a/vendor/sigs.k8s.io/kustomize/api/krusty/kustomizer.go b/vendor/sigs.k8s.io/kustomize/api/krusty/kustomizer.go index 8c7684054..999cbf453 100644 --- a/vendor/sigs.k8s.io/kustomize/api/krusty/kustomizer.go +++ b/vendor/sigs.k8s.io/kustomize/api/krusty/kustomizer.go @@ -8,11 +8,11 @@ import ( "log" "sigs.k8s.io/kustomize/api/internal/builtins" + fLdr "sigs.k8s.io/kustomize/api/internal/loader" pLdr "sigs.k8s.io/kustomize/api/internal/plugins/loader" "sigs.k8s.io/kustomize/api/internal/target" "sigs.k8s.io/kustomize/api/internal/utils" "sigs.k8s.io/kustomize/api/konfig" - fLdr "sigs.k8s.io/kustomize/api/loader" "sigs.k8s.io/kustomize/api/provenance" "sigs.k8s.io/kustomize/api/provider" "sigs.k8s.io/kustomize/api/resmap" diff --git a/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go b/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go index 0e24fc36c..c637ac2e1 100644 --- a/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go +++ b/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go @@ -8,6 +8,8 @@ import ( "runtime" "runtime/debug" "strings" + + "github.com/blang/semver/v4" ) // These variables are set at build time using ldflags. @@ -62,9 +64,42 @@ func GetProvenance() Provenance { p.GitCommit = setting.Value } } + + for _, dep := range info.Deps { + if dep != nil && dep.Path == "sigs.k8s.io/kustomize/kustomize/v5" { + if dep.Version != "devel" { + continue + } + v, err := GetMostRecentTag(*dep) + if err != nil { + fmt.Printf("failed to get most recent tag for %s: %v\n", dep.Path, err) + continue + } + p.Version = v + } + } + return p } +func GetMostRecentTag(m debug.Module) (string, error) { + for m.Replace != nil { + m = *m.Replace + } + + split := strings.Split(m.Version, "-") + sv, err := semver.Parse(strings.TrimPrefix(split[0], "v")) + + if err != nil { + return "", fmt.Errorf("failed to parse version %s: %w", m.Version, err) + } + + if len(split) > 1 && sv.Patch > 0 { + sv.Patch -= 1 + } + return fmt.Sprintf("v%s", sv.FinalizeVersion()), nil +} + // Short returns the shortened provenance stamp. func (v Provenance) Short() string { return fmt.Sprintf( diff --git a/vendor/sigs.k8s.io/kustomize/api/resmap/reswrangler.go b/vendor/sigs.k8s.io/kustomize/api/resmap/reswrangler.go index 411e4e813..2e34fae6a 100644 --- a/vendor/sigs.k8s.io/kustomize/api/resmap/reswrangler.go +++ b/vendor/sigs.k8s.io/kustomize/api/resmap/reswrangler.go @@ -696,8 +696,7 @@ func (m *resWrangler) DeAnchor() (err error) { } // ApplySmPatch applies the patch, and errors on Id collisions. -func (m *resWrangler) ApplySmPatch( - selectedSet *resource.IdSet, patch *resource.Resource) error { +func (m *resWrangler) ApplySmPatch(selectedSet *resource.IdSet, patch *resource.Resource) error { var list []*resource.Resource for _, res := range m.rList { if selectedSet.Contains(res.CurId()) { diff --git a/vendor/sigs.k8s.io/kustomize/api/resource/factory.go b/vendor/sigs.k8s.io/kustomize/api/resource/factory.go index cbda87237..fef2f6e49 100644 --- a/vendor/sigs.k8s.io/kustomize/api/resource/factory.go +++ b/vendor/sigs.k8s.io/kustomize/api/resource/factory.go @@ -41,30 +41,36 @@ func (rf *Factory) Hasher() ifc.KustHasher { } // FromMap returns a new instance of Resource. -func (rf *Factory) FromMap(m map[string]interface{}) *Resource { - return rf.FromMapAndOption(m, nil) +func (rf *Factory) FromMap(m map[string]interface{}) (*Resource, error) { + res, err := rf.FromMapAndOption(m, nil) + if err != nil { + return nil, fmt.Errorf("failed to create resource from map: %w", err) + } + return res, nil } // FromMapWithName returns a new instance with the given "original" name. -func (rf *Factory) FromMapWithName(n string, m map[string]interface{}) *Resource { +func (rf *Factory) FromMapWithName(n string, m map[string]interface{}) (*Resource, error) { return rf.FromMapWithNamespaceAndName(resid.DefaultNamespace, n, m) } // FromMapWithNamespaceAndName returns a new instance with the given "original" namespace. -func (rf *Factory) FromMapWithNamespaceAndName(ns string, n string, m map[string]interface{}) *Resource { - r := rf.FromMapAndOption(m, nil) - return r.setPreviousId(ns, n, r.GetKind()) +func (rf *Factory) FromMapWithNamespaceAndName(ns string, n string, m map[string]interface{}) (*Resource, error) { + r, err := rf.FromMapAndOption(m, nil) + if err != nil { + return nil, fmt.Errorf("failed to create resource from map: %w", err) + } + return r.setPreviousId(ns, n, r.GetKind()), nil } // FromMapAndOption returns a new instance of Resource with given options. func (rf *Factory) FromMapAndOption( - m map[string]interface{}, args *types.GeneratorArgs) *Resource { + m map[string]interface{}, args *types.GeneratorArgs) (*Resource, error) { n, err := yaml.FromMap(m) if err != nil { - // TODO: return err instead of log. - log.Fatal(err) + return nil, fmt.Errorf("failed to convert map to YAML node: %w", err) } - return rf.makeOne(n, args) + return rf.makeOne(n, args), nil } // makeOne returns a new instance of Resource. diff --git a/vendor/sigs.k8s.io/kustomize/api/resource/resource.go b/vendor/sigs.k8s.io/kustomize/api/resource/resource.go index ae1a98be0..9884a672c 100644 --- a/vendor/sigs.k8s.io/kustomize/api/resource/resource.go +++ b/vendor/sigs.k8s.io/kustomize/api/resource/resource.go @@ -287,12 +287,25 @@ func (r *Resource) getCsvAnnotation(name string) []string { return strings.Split(annotations[name], ",") } -// PrefixesSuffixesEquals is conceptually doing the same task -// as OutermostPrefixSuffix but performs a deeper comparison -// of the suffix and prefix slices. -func (r *Resource) PrefixesSuffixesEquals(o ResCtx) bool { - return utils.SameEndingSubSlice(r.GetNamePrefixes(), o.GetNamePrefixes()) && - utils.SameEndingSubSlice(r.GetNameSuffixes(), o.GetNameSuffixes()) +// PrefixesSuffixesEquals is conceptually doing the same task as +// OutermostPrefixSuffix but performs a deeper comparison of the suffix and +// prefix slices. +// The allowEmpty flag determines whether an empty prefix/suffix +// should be considered a match on anything. +// This is used when filtering, starting with a coarser pass allowing empty +// matches, before requiring exact matches if there are multiple +// remaining candidates. +func (r *Resource) PrefixesSuffixesEquals(o ResCtx, allowEmpty bool) bool { + if allowEmpty { + eitherPrefixEmpty := len(r.GetNamePrefixes()) == 0 || len(o.GetNamePrefixes()) == 0 + eitherSuffixEmpty := len(r.GetNameSuffixes()) == 0 || len(o.GetNameSuffixes()) == 0 + + return (eitherPrefixEmpty || utils.SameEndingSubSlice(r.GetNamePrefixes(), o.GetNamePrefixes())) && + (eitherSuffixEmpty || utils.SameEndingSubSlice(r.GetNameSuffixes(), o.GetNameSuffixes())) + } else { + return utils.SameEndingSubSlice(r.GetNamePrefixes(), o.GetNamePrefixes()) && + utils.SameEndingSubSlice(r.GetNameSuffixes(), o.GetNameSuffixes()) + } } // RemoveBuildAnnotations removes annotations created by the build process. diff --git a/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go b/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go index 8d3579544..8b78889ea 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go @@ -30,6 +30,8 @@ type FieldSpec struct { resid.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` CreateIfNotPresent bool `json:"create,omitempty" yaml:"create,omitempty"` + + // Note: If any new pointer based members are added, FsSlice.DeepCopy needs to be updated } func (fs FieldSpec) String() string { @@ -50,6 +52,13 @@ func (s FsSlice) Less(i, j int) bool { return s[i].Gvk.IsLessThan(s[j].Gvk) } +// DeepCopy returns a new copy of FsSlice +func (s FsSlice) DeepCopy() FsSlice { + ret := make(FsSlice, len(s)) + copy(ret, s) + return ret +} + // MergeAll merges the argument into this, returning the result. // Items already present are ignored. // Items that conflict (primary key matches, but remain data differs) diff --git a/vendor/sigs.k8s.io/kustomize/api/types/generatorargs.go b/vendor/sigs.k8s.io/kustomize/api/types/generatorargs.go index a4145db3d..eae221bed 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/generatorargs.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/generatorargs.go @@ -5,7 +5,7 @@ package types // GeneratorArgs contains arguments common to ConfigMap and Secret generators. type GeneratorArgs struct { - // Namespace for the configmap, optional + // Namespace for the resource, optional Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` // Name - actually the partial name - of the generated resource. diff --git a/vendor/sigs.k8s.io/kustomize/api/types/helmchartargs.go b/vendor/sigs.k8s.io/kustomize/api/types/helmchartargs.go index 15ea7178f..1ed89c01c 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/helmchartargs.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/helmchartargs.go @@ -88,6 +88,9 @@ type HelmChart struct { // ApiVersions is the kubernetes apiversions used for Capabilities.APIVersions ApiVersions []string `json:"apiVersions,omitempty" yaml:"apiVersions,omitempty"` + // KubeVersion is the kubernetes version used by Helm for Capabilities.KubeVersion" + KubeVersion string `json:"kubeVersion,omitempty" yaml:"kubeVersion,omitempty"` + // NameTemplate is for specifying the name template used to name the release. NameTemplate string `json:"nameTemplate,omitempty" yaml:"nameTemplate,omitempty"` @@ -172,6 +175,10 @@ func (h HelmChart) AsHelmArgs(absChartHome string) []string { for _, apiVer := range h.ApiVersions { args = append(args, "--api-versions", apiVer) } + if h.KubeVersion != "" { + args = append(args, "--kube-version", h.KubeVersion) + } + if h.IncludeCRDs { args = append(args, "--include-crds") } diff --git a/vendor/sigs.k8s.io/kustomize/api/types/kustomization.go b/vendor/sigs.k8s.io/kustomize/api/types/kustomization.go index 41376bedd..f86ec0b9e 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/kustomization.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/kustomization.go @@ -188,6 +188,7 @@ const ( deprecatedPatchesJson6902Message = "# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead." + " " + deprecatedWarningToRunEditFix deprecatedPatchesStrategicMergeMessage = "# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead." + " " + deprecatedWarningToRunEditFix deprecatedVarsMessage = "# Warning: 'vars' is deprecated. Please use 'replacements' instead." + " " + deprecatedWarningToRunEditFixExperimential + deprecatedCommonLabelsWarningMessage = "# Warning: 'commonLabels' is deprecated. Please use 'labels' instead." + " " + deprecatedWarningToRunEditFix ) // CheckDeprecatedFields check deprecated field is used or not. @@ -196,6 +197,9 @@ func (k *Kustomization) CheckDeprecatedFields() *[]string { if k.Bases != nil { warningMessages = append(warningMessages, deprecatedBaseWarningMessage) } + if k.CommonLabels != nil { + warningMessages = append(warningMessages, deprecatedCommonLabelsWarningMessage) + } if k.ImageTags != nil { warningMessages = append(warningMessages, deprecatedImageTagsWarningMessage) } diff --git a/vendor/sigs.k8s.io/kustomize/api/types/labels.go b/vendor/sigs.k8s.io/kustomize/api/types/labels.go index 05ba890f9..35f7fb2a5 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/labels.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/labels.go @@ -6,12 +6,12 @@ package types type Label struct { // Pairs contains the key-value pairs for labels to add Pairs map[string]string `json:"pairs,omitempty" yaml:"pairs,omitempty"` - // IncludeSelectors inidicates should transformer include the + // IncludeSelectors indicates whether the transformer should include the // fieldSpecs for selectors. Custom fieldSpecs specified by // FieldSpecs will be merged with builtin fieldSpecs if this // is true. IncludeSelectors bool `json:"includeSelectors,omitempty" yaml:"includeSelectors,omitempty"` - // IncludeTemplates inidicates should transformer include the + // IncludeTemplates indicates whether the transformer should include the // spec/template/metadata fieldSpec. Custom fieldSpecs specified by // FieldSpecs will be merged with spec/template/metadata fieldSpec if this // is true. If IncludeSelectors is true, IncludeTemplates is not needed. diff --git a/vendor/sigs.k8s.io/kustomize/api/types/pluginconfig.go b/vendor/sigs.k8s.io/kustomize/api/types/pluginconfig.go index 741e5debc..aa511ae79 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/pluginconfig.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/pluginconfig.go @@ -4,8 +4,10 @@ package types type HelmConfig struct { - Enabled bool - Command string + Enabled bool + Command string + ApiVersions []string + KubeVersion string } // PluginConfig holds plugin configuration. diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/openapi.go b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/openapi.go index eb5396d85..41ee0afc5 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/openapi.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/openapi.go @@ -44,6 +44,16 @@ var ( customSchema []byte //nolint:gochecknoglobals ) +// schemaParseStatus is used in cases when a schema should be parsed, but the +// parsing may be delayed to a later time. +type schemaParseStatus uint32 + +const ( + schemaNotParsed schemaParseStatus = iota + schemaParseDelayed + schemaParsed +) + // openapiData contains the parsed openapi state. this is in a struct rather than // a list of vars so that it can be reset from tests. type openapiData struct { @@ -57,13 +67,17 @@ type openapiData struct { // is namespaceable or not namespaceabilityByResourceType map[yaml.TypeMeta]bool - // noUseBuiltInSchema stores whether we want to prevent using the built-n + // noUseBuiltInSchema stores whether we want to prevent using the built-in // Kubernetes schema as part of the global schema noUseBuiltInSchema bool // schemaInit stores whether or not we've parsed the schema already, // so that we only reparse the when necessary (to speed up performance) schemaInit bool + + // defaultBuiltInSchemaParseStatus stores the parse status of the default + // built-in schema. + defaultBuiltInSchemaParseStatus schemaParseStatus } type format string @@ -387,18 +401,45 @@ func GetSchema(s string, schema *spec.Schema) (*ResourceSchema, error) { // be true if the resource is namespace-scoped, and false if the type is // cluster-scoped. func IsNamespaceScoped(typeMeta yaml.TypeMeta) (bool, bool) { - if res, f := precomputedIsNamespaceScoped[typeMeta]; f { - return res, true + if isNamespaceScoped, found := precomputedIsNamespaceScoped[typeMeta]; found { + return isNamespaceScoped, found + } + if isInitSchemaNeededForNamespaceScopeCheck() { + initSchema() } - return isNamespaceScopedFromSchema(typeMeta) -} - -func isNamespaceScopedFromSchema(typeMeta yaml.TypeMeta) (bool, bool) { - initSchema() isNamespaceScoped, found := globalSchema.namespaceabilityByResourceType[typeMeta] return isNamespaceScoped, found } +// isInitSchemaNeededForNamespaceScopeCheck returns true if initSchema is needed +// to ensure globalSchema.namespaceabilityByResourceType is fully populated for +// cases where a custom or non-default built-in schema is in use. +func isInitSchemaNeededForNamespaceScopeCheck() bool { + schemaLock.Lock() + defer schemaLock.Unlock() + + if globalSchema.schemaInit { + return false // globalSchema already is initialized. + } + if customSchema != nil { + return true // initSchema is needed. + } + if kubernetesOpenAPIVersion == "" || kubernetesOpenAPIVersion == kubernetesOpenAPIDefaultVersion { + // The default built-in schema is in use. Since + // precomputedIsNamespaceScoped aligns with the default built-in schema + // (verified by TestIsNamespaceScopedPrecompute), there is no need to + // call initSchema. + if globalSchema.defaultBuiltInSchemaParseStatus == schemaNotParsed { + // The schema may be needed for purposes other than namespace scope + // checks. Flag it to be parsed when that need arises. + globalSchema.defaultBuiltInSchemaParseStatus = schemaParseDelayed + } + return false + } + // A non-default built-in schema is in use. initSchema is needed. + return true +} + // IsCertainlyClusterScoped returns true for Node, Namespace, etc. and // false for Pod, Deployment, etc. and kinds that aren't recognized in the // openapi data. See: @@ -638,13 +679,19 @@ func initSchema() { panic(fmt.Errorf("invalid schema file: %w", err)) } } else { - if kubernetesOpenAPIVersion == "" { + if kubernetesOpenAPIVersion == "" || kubernetesOpenAPIVersion == kubernetesOpenAPIDefaultVersion { parseBuiltinSchema(kubernetesOpenAPIDefaultVersion) + globalSchema.defaultBuiltInSchemaParseStatus = schemaParsed } else { parseBuiltinSchema(kubernetesOpenAPIVersion) } } + if globalSchema.defaultBuiltInSchemaParseStatus == schemaParseDelayed { + parseBuiltinSchema(kubernetesOpenAPIDefaultVersion) + globalSchema.defaultBuiltInSchemaParseStatus = schemaParsed + } + if err := parse(kustomizationapi.MustAsset(kustomizationAPIAssetName), JsonOrYaml); err != nil { // this should never happen panic(err) diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/alias.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/alias.go index 5f45424d9..12c72ae83 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/alias.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/alias.go @@ -7,7 +7,7 @@ import ( "bytes" "io" - "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" + yaml "sigs.k8s.io/yaml/goyaml.v3" ) const ( diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/compatibility.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/compatibility.go index a47114000..55709322a 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/compatibility.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/compatibility.go @@ -7,9 +7,9 @@ import ( "reflect" "strings" - y1_1 "gopkg.in/yaml.v2" "k8s.io/kube-openapi/pkg/validation/spec" - y1_2 "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" + y1_1 "sigs.k8s.io/yaml/goyaml.v2" + y1_2 "sigs.k8s.io/yaml/goyaml.v3" ) // typeToTag maps OpenAPI schema types to yaml 1.2 tags @@ -47,7 +47,7 @@ func FormatNonStringStyle(node *Node, schema spec.Schema) { } // if the node tag is null, make sure we don't add any non-null tags - // https://github.com/GoogleContainerTools/kpt/issues/2321 + // https://github.com/kptdev/kpt/issues/2321 if node.Tag == NodeTagNull { // must NOT quote null values node.Style = 0 diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go index ae63d258b..e0802a897 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go @@ -11,7 +11,7 @@ import ( "github.com/davecgh/go-spew/spew" "sigs.k8s.io/kustomize/kyaml/errors" - "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" + yaml "sigs.k8s.io/yaml/goyaml.v3" ) // Append creates an ElementAppender @@ -690,6 +690,10 @@ type FieldSetter struct { // when setting it. Otherwise, if an existing node is found, the style is // retained. OverrideStyle bool `yaml:"overrideStyle,omitempty"` + + // AppendKeyStyle defines the style of the key when no existing node is + // found, and a new node is appended. + AppendKeyStyle Style `yaml:"appendKeyStyle,omitempty"` } func (s FieldSetter) Filter(rn *RNode) (*RNode, error) { @@ -720,8 +724,14 @@ func (s FieldSetter) Filter(rn *RNode) (*RNode, error) { return rn, nil } - // Clear the field if it is empty, or explicitly null - if s.Value == nil || s.Value.IsTaggedNull() { + // Clearing nil fields: + // 1. Clear any fields with no value + // 2. Clear any "null" YAML fields unless we explicitly want to keep them + // This is to balance + // 1. Persisting 'null' values passed by the user (see issue #4628) + // 2. Avoiding producing noisy documents that add any field defaulting to + // 'nil' even if they weren't present in the source document + if s.Value == nil || (s.Value.IsTaggedNull() && !s.Value.ShouldKeep) { return rn.Pipe(Clear(s.Name)) } @@ -747,6 +757,7 @@ func (s FieldSetter) Filter(rn *RNode) (*RNode, error) { &yaml.Node{ Kind: yaml.ScalarNode, Value: s.Name, + Style: s.AppendKeyStyle, HeadComment: s.Comments.HeadComment, LineComment: s.Comments.LineComment, FootComment: s.Comments.FootComment, diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/kfns.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/kfns.go index 2ae8c1665..a7d901672 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/kfns.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/kfns.go @@ -5,7 +5,7 @@ package yaml import ( "sigs.k8s.io/kustomize/kyaml/errors" - "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" + yaml "sigs.k8s.io/yaml/goyaml.v3" ) // AnnotationClearer removes an annotation at metadata.annotations. diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/match.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/match.go index 1749d3872..8e40d4c2b 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/match.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/match.go @@ -10,7 +10,7 @@ import ( "strings" "sigs.k8s.io/kustomize/kyaml/errors" - "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" + yaml "sigs.k8s.io/yaml/goyaml.v3" ) // PathMatcher returns all RNodes matching the path wrapped in a SequenceNode. diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go index 8b328ab9d..3b23019e1 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go @@ -45,9 +45,9 @@ func MergeStrings(srcStr, destStr string, infer bool, mergeOptions yaml.MergeOpt } type Merger struct { - // for forwards compatibility when new functions are added to the interface } +// for forwards compatibility when new functions are added to the interface var _ walk.Visitor = Merger{} func (m Merger) VisitMap(nodes walk.Sources, s *openapi.ResourceSchema) (*yaml.RNode, error) { @@ -66,8 +66,7 @@ func (m Merger) VisitMap(nodes walk.Sources, s *openapi.ResourceSchema) (*yaml.R // If Origin is missing, preserve explicitly set null in Dest ("null", "~", etc) if nodes.Origin().IsNil() && !nodes.Dest().IsNil() && len(nodes.Dest().YNode().Value) > 0 { - // Return a new node so that it won't have a "!!null" tag and therefore won't be cleared. - return yaml.NewScalarRNode(nodes.Dest().YNode().Value), nil + return yaml.MakePersistentNullNode(nodes.Dest().YNode().Value), nil } return nodes.Origin(), nil diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go index 7406c525e..07c782d73 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go @@ -13,10 +13,10 @@ import ( "strings" "sigs.k8s.io/kustomize/kyaml/errors" - "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" "sigs.k8s.io/kustomize/kyaml/sliceutil" "sigs.k8s.io/kustomize/kyaml/utils" "sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels" + yaml "sigs.k8s.io/yaml/goyaml.v3" ) // MakeNullNode returns an RNode that represents an empty document. @@ -24,6 +24,20 @@ func MakeNullNode() *RNode { return NewRNode(&Node{Tag: NodeTagNull}) } +// MakePersistentNullNode returns an RNode that should be persisted, +// even when merging +func MakePersistentNullNode(value string) *RNode { + n := NewRNode( + &Node{ + Tag: NodeTagNull, + Value: value, + Kind: yaml.ScalarNode, + }, + ) + n.ShouldKeep = true + return n +} + // IsMissingOrNull is true if the RNode is nil or explicitly tagged null. // TODO: make this a method on RNode. func IsMissingOrNull(node *RNode) bool { @@ -214,6 +228,9 @@ type RNode struct { // object root: object root value *yaml.Node + // Whether we should keep this node, even if otherwise we would clear it + ShouldKeep bool + Match []string } diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/types.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/types.go index 897e2edaa..73f5d8406 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/types.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/types.go @@ -8,8 +8,8 @@ import ( "strings" "sigs.k8s.io/kustomize/kyaml/errors" - "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml" "sigs.k8s.io/kustomize/kyaml/sets" + yaml "sigs.k8s.io/yaml/goyaml.v3" ) // CopyYNode returns a distinct copy of its argument. diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/walk/map.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/walk/map.go index 998af6d32..afeec0a5a 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/walk/map.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/walk/map.go @@ -58,7 +58,7 @@ func (l Walker) walkMap() (*yaml.RNode, error) { if l.Schema != nil { s = l.Schema.Field(key) } - fv, commentSch := l.fieldValue(key) + fv, commentSch, keyStyles := l.fieldValue(key) if commentSch != nil { s = commentSch } @@ -90,7 +90,13 @@ func (l Walker) walkMap() (*yaml.RNode, error) { } // this handles empty and non-empty values - _, err = dest.Pipe(yaml.FieldSetter{Name: key, Comments: comments, Value: val}) + fieldSetter := yaml.FieldSetter{ + Name: key, + Comments: comments, + AppendKeyStyle: keyStyles[val], + Value: val, + } + _, err = dest.Pipe(fieldSetter) if err != nil { return nil, err } @@ -153,10 +159,12 @@ func (l Walker) fieldNames() []string { return result } -// fieldValue returns a slice containing each source's value for fieldName -func (l Walker) fieldValue(fieldName string) ([]*yaml.RNode, *openapi.ResourceSchema) { +// fieldValue returns a slice containing each source's value for fieldName, the +// schema, and a map of each source's value to the style for the source's key. +func (l Walker) fieldValue(fieldName string) ([]*yaml.RNode, *openapi.ResourceSchema, map[*yaml.RNode]yaml.Style) { var fields []*yaml.RNode var sch *openapi.ResourceSchema + keyStyles := make(map[*yaml.RNode]yaml.Style, len(l.Sources)) for i := range l.Sources { if l.Sources[i] == nil { fields = append(fields, nil) @@ -165,9 +173,12 @@ func (l Walker) fieldValue(fieldName string) ([]*yaml.RNode, *openapi.ResourceSc field := l.Sources[i].Field(fieldName) f, s := l.valueIfPresent(field) fields = append(fields, f) + if field != nil && field.Key != nil && field.Key.YNode() != nil { + keyStyles[f] = field.Key.YNode().Style + } if sch == nil && !s.IsMissingOrNull() { sch = s } } - return fields, sch + return fields, sch, keyStyles } diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/LICENSE b/vendor/sigs.k8s.io/yaml/goyaml.v3/LICENSE similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/LICENSE rename to vendor/sigs.k8s.io/yaml/goyaml.v3/LICENSE diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/NOTICE b/vendor/sigs.k8s.io/yaml/goyaml.v3/NOTICE similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/NOTICE rename to vendor/sigs.k8s.io/yaml/goyaml.v3/NOTICE diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v3/OWNERS b/vendor/sigs.k8s.io/yaml/goyaml.v3/OWNERS new file mode 100644 index 000000000..73be0a3a9 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v3/OWNERS @@ -0,0 +1,24 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- dims +- jpbetz +- smarterclayton +- deads2k +- sttts +- liggitt +- natasha41575 +- knverey +reviewers: +- dims +- thockin +- jpbetz +- smarterclayton +- deads2k +- derekwaynecarr +- mikedanese +- liggitt +- sttts +- tallclair +labels: +- sig/api-machinery diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/README.md b/vendor/sigs.k8s.io/yaml/goyaml.v3/README.md similarity index 87% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/README.md rename to vendor/sigs.k8s.io/yaml/goyaml.v3/README.md index 08eb1babd..b1a6b2e9e 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/README.md +++ b/vendor/sigs.k8s.io/yaml/goyaml.v3/README.md @@ -1,3 +1,13 @@ +# go-yaml fork + +This package is a fork of the go-yaml library and is intended solely for consumption +by kubernetes projects. In this fork, we plan to support only critical changes required for +kubernetes, such as small bug fixes and regressions. Larger, general-purpose feature requests +should be made in the upstream go-yaml library, and we will reject such changes in this fork +unless we are pulling them from upstream. + +This fork is based on v3.0.1: https://github.com/go-yaml/yaml/releases/tag/v3.0.1. + # YAML support for the Go language Introduction diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/apic.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/apic.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/apic.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/apic.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/decode.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/decode.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/decode.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/decode.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/emitterc.go similarity index 95% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/emitterc.go index f0f3d1867..6ea0ae8c1 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v3/emitterc.go @@ -226,7 +226,7 @@ func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_ } // Increase the indentation level. -func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool, compact_seq bool) bool { +func yaml_emitter_increase_indent_compact(emitter *yaml_emitter_t, flow, indentless bool, compact_seq bool) bool { emitter.indents = append(emitter.indents, emitter.indent) if emitter.indent < 0 { if flow { @@ -241,10 +241,14 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) - } - if compact_seq { - emitter.indent = emitter.indent - 2 + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) + if compact_seq { + // The value compact_seq passed in is almost always set to `false` when this function is called, + // except when we are dealing with sequence nodes. So this gets triggered to subtract 2 only when we + // are increasing the indent to account for sequence nodes, which will be correct because we need to + // subtract 2 to account for the - at the beginning of the sequence node. + emitter.indent = emitter.indent - 2 + } } } return true @@ -491,7 +495,7 @@ func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_eve if !yaml_emitter_emit_node(emitter, event, true, false, false, false) { return false } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -537,7 +541,7 @@ func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_e if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { return false } - if !yaml_emitter_increase_indent(emitter, true, false, false) { + if !yaml_emitter_increase_indent(emitter, true, false) { return false } emitter.flow_level++ @@ -560,7 +564,7 @@ func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_e if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { return false } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -605,7 +609,7 @@ func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_e return false } } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -620,7 +624,7 @@ func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_eve if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { return false } - if !yaml_emitter_increase_indent(emitter, true, false, false) { + if !yaml_emitter_increase_indent(emitter, true, false) { return false } emitter.flow_level++ @@ -646,7 +650,7 @@ func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_eve if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { return false } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -719,7 +723,7 @@ func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_e return false } } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -731,9 +735,16 @@ func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_e // Expect a block item node. func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { if first { + // emitter.mapping context tells us if we are currently in a mapping context. + // emiiter.column tells us which column we are in in the yaml output. 0 is the first char of the column. + // emitter.indentation tells us if the last character was an indentation character. + // emitter.compact_sequence_indent tells us if '- ' is considered part of the indentation for sequence elements. + // So, `seq` means that we are in a mapping context, and we are either at the first char of the column or + // the last character was not an indentation character, and we consider '- ' part of the indentation + // for sequence elements. seq := emitter.mapping_context && (emitter.column == 0 || !emitter.indention) && emitter.compact_sequence_indent - if !yaml_emitter_increase_indent(emitter, false, false, seq){ + if !yaml_emitter_increase_indent_compact(emitter, false, false, seq) { return false } } @@ -757,7 +768,7 @@ func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_ if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { return false } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -769,7 +780,7 @@ func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_ // Expect a block key node. func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { if first { - if !yaml_emitter_increase_indent(emitter, false, false, false) { + if !yaml_emitter_increase_indent(emitter, false, false) { return false } } @@ -833,7 +844,7 @@ func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_ } else if event.sequence_style() != yaml_FLOW_SEQUENCE_STYLE && (event.typ == yaml_MAPPING_START_EVENT || event.typ == yaml_SEQUENCE_START_EVENT) { // An indented block follows, so write the comment right now. emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment @@ -843,7 +854,7 @@ func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_ if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { return false } - if !yaml_emitter_process_line_comment(emitter, false) { + if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { @@ -901,7 +912,7 @@ func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool if !yaml_emitter_process_tag(emitter) { return false } - if !yaml_emitter_increase_indent(emitter, true, false, false) { + if !yaml_emitter_increase_indent(emitter, true, false) { return false } if !yaml_emitter_process_scalar(emitter) { @@ -1149,8 +1160,12 @@ func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool { } // Write an line comment. -func yaml_emitter_process_line_comment(emitter *yaml_emitter_t, linebreak bool) bool { +func yaml_emitter_process_line_comment_linebreak(emitter *yaml_emitter_t, linebreak bool) bool { if len(emitter.line_comment) == 0 { + // The next 3 lines are needed to resolve an issue with leading newlines + // See https://github.com/go-yaml/yaml/issues/755 + // When linebreak is set to true, put_break will be called and will add + // the needed newline. if linebreak && !put_break(emitter) { return false } @@ -1902,7 +1917,7 @@ func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bo if !yaml_emitter_write_block_scalar_hints(emitter, value) { return false } - if !yaml_emitter_process_line_comment(emitter, true) { + if !yaml_emitter_process_line_comment_linebreak(emitter, true) { return false } //emitter.indention = true @@ -1939,7 +1954,7 @@ func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) boo if !yaml_emitter_write_block_scalar_hints(emitter, value) { return false } - if !yaml_emitter_process_line_comment(emitter, true) { + if !yaml_emitter_process_line_comment_linebreak(emitter, true) { return false } diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/encode.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/encode.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/encode.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/encode.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/parserc.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/parserc.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/parserc.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/parserc.go diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v3/patch.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/patch.go new file mode 100644 index 000000000..b98c3321e --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v3/patch.go @@ -0,0 +1,39 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package yaml + +// yaml_emitter_increase_indent preserves the original signature and delegates to +// yaml_emitter_increase_indent_compact without compact-sequence indentation +func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { + return yaml_emitter_increase_indent_compact(emitter, flow, indentless, false) +} + +// CompactSeqIndent makes it so that '- ' is considered part of the indentation. +func (e *Encoder) CompactSeqIndent() { + e.encoder.emitter.compact_sequence_indent = true +} + +// DefaultSeqIndent makes it so that '- ' is not considered part of the indentation. +func (e *Encoder) DefaultSeqIndent() { + e.encoder.emitter.compact_sequence_indent = false +} + +// yaml_emitter_process_line_comment preserves the original signature and delegates to +// yaml_emitter_process_line_comment_linebreak passing false for linebreak +func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool { + return yaml_emitter_process_line_comment_linebreak(emitter, false) +} diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/readerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/readerc.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/readerc.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/readerc.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/resolve.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/resolve.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/resolve.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/resolve.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/scannerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/scannerc.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/scannerc.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/scannerc.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/sorter.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/sorter.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/sorter.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/sorter.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/writerc.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/writerc.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/yaml.go similarity index 98% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/yaml.go index bb6418dba..8cec6da48 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v3/yaml.go @@ -278,16 +278,6 @@ func (e *Encoder) SetIndent(spaces int) { e.encoder.indent = spaces } -// CompactSeqIndent makes it so that '- ' is considered part of the indentation. -func (e *Encoder) CompactSeqIndent() { - e.encoder.emitter.compact_sequence_indent = true -} - -// DefaultSeqIndent makes it so that '- ' is not considered part of the indentation. -func (e *Encoder) DefaultSeqIndent() { - e.encoder.emitter.compact_sequence_indent = false -} - // Close closes the encoder by writing any remaining data. // It does not write a stream terminating string "...". func (e *Encoder) Close() (err error) { diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlh.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/yamlh.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlh.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/yamlh.go diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlprivateh.go b/vendor/sigs.k8s.io/yaml/goyaml.v3/yamlprivateh.go similarity index 100% rename from vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlprivateh.go rename to vendor/sigs.k8s.io/yaml/goyaml.v3/yamlprivateh.go